diff options
author | Jiri Kosina <jkosina@suse.cz> | 2011-02-15 04:24:31 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-02-15 04:24:31 -0500 |
commit | 0a9d59a2461477bd9ed143c01af9df3f8f00fa81 (patch) | |
tree | df997d1cfb0786427a0df1fbd6f0640fa4248cf4 /arch | |
parent | a23ce6da9677d245aa0aadc99f4197030350ab54 (diff) | |
parent | 795abaf1e4e188c4171e3cd3dbb11a9fcacaf505 (diff) |
Merge branch 'master' into for-next
Diffstat (limited to 'arch')
939 files changed, 14448 insertions, 6551 deletions
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig index 943fe6930f7..47f63d48014 100644 --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig | |||
@@ -8,6 +8,9 @@ config ALPHA | |||
8 | select HAVE_IRQ_WORK | 8 | select HAVE_IRQ_WORK |
9 | select HAVE_PERF_EVENTS | 9 | select HAVE_PERF_EVENTS |
10 | select HAVE_DMA_ATTRS | 10 | select HAVE_DMA_ATTRS |
11 | select HAVE_GENERIC_HARDIRQS | ||
12 | select GENERIC_IRQ_PROBE | ||
13 | select AUTO_IRQ_AFFINITY if SMP | ||
11 | help | 14 | help |
12 | The Alpha is a 64-bit general-purpose processor designed and | 15 | The Alpha is a 64-bit general-purpose processor designed and |
13 | marketed by the Digital Equipment Corporation of blessed memory, | 16 | marketed by the Digital Equipment Corporation of blessed memory, |
@@ -68,19 +71,6 @@ config GENERIC_IOMAP | |||
68 | bool | 71 | bool |
69 | default n | 72 | default n |
70 | 73 | ||
71 | config GENERIC_HARDIRQS | ||
72 | bool | ||
73 | default y | ||
74 | |||
75 | config GENERIC_IRQ_PROBE | ||
76 | bool | ||
77 | default y | ||
78 | |||
79 | config AUTO_IRQ_AFFINITY | ||
80 | bool | ||
81 | depends on SMP | ||
82 | default y | ||
83 | |||
84 | source "init/Kconfig" | 74 | source "init/Kconfig" |
85 | source "kernel/Kconfig.freezer" | 75 | source "kernel/Kconfig.freezer" |
86 | 76 | ||
diff --git a/arch/alpha/include/asm/io.h b/arch/alpha/include/asm/io.h index eda9b909aa0..56ff9650135 100644 --- a/arch/alpha/include/asm/io.h +++ b/arch/alpha/include/asm/io.h | |||
@@ -37,8 +37,9 @@ | |||
37 | */ | 37 | */ |
38 | extern inline void __set_hae(unsigned long new_hae) | 38 | extern inline void __set_hae(unsigned long new_hae) |
39 | { | 39 | { |
40 | unsigned long flags; | 40 | unsigned long flags = swpipl(IPL_MAX); |
41 | local_irq_save(flags); | 41 | |
42 | barrier(); | ||
42 | 43 | ||
43 | alpha_mv.hae_cache = new_hae; | 44 | alpha_mv.hae_cache = new_hae; |
44 | *alpha_mv.hae_register = new_hae; | 45 | *alpha_mv.hae_register = new_hae; |
@@ -46,7 +47,8 @@ extern inline void __set_hae(unsigned long new_hae) | |||
46 | /* Re-read to make sure it was written. */ | 47 | /* Re-read to make sure it was written. */ |
47 | new_hae = *alpha_mv.hae_register; | 48 | new_hae = *alpha_mv.hae_register; |
48 | 49 | ||
49 | local_irq_restore(flags); | 50 | setipl(flags); |
51 | barrier(); | ||
50 | } | 52 | } |
51 | 53 | ||
52 | extern inline void set_hae(unsigned long new_hae) | 54 | extern inline void set_hae(unsigned long new_hae) |
diff --git a/arch/alpha/include/asm/mman.h b/arch/alpha/include/asm/mman.h index 99c56d47879..72db984f878 100644 --- a/arch/alpha/include/asm/mman.h +++ b/arch/alpha/include/asm/mman.h | |||
@@ -53,6 +53,9 @@ | |||
53 | #define MADV_MERGEABLE 12 /* KSM may merge identical pages */ | 53 | #define MADV_MERGEABLE 12 /* KSM may merge identical pages */ |
54 | #define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages */ | 54 | #define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages */ |
55 | 55 | ||
56 | #define MADV_HUGEPAGE 14 /* Worth backing with hugepages */ | ||
57 | #define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages */ | ||
58 | |||
56 | /* compatibility flags */ | 59 | /* compatibility flags */ |
57 | #define MAP_FILE 0 | 60 | #define MAP_FILE 0 |
58 | 61 | ||
diff --git a/arch/alpha/kernel/Makefile b/arch/alpha/kernel/Makefile index 1ee9b5b629b..9bb7b858ed2 100644 --- a/arch/alpha/kernel/Makefile +++ b/arch/alpha/kernel/Makefile | |||
@@ -3,8 +3,8 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | extra-y := head.o vmlinux.lds | 5 | extra-y := head.o vmlinux.lds |
6 | EXTRA_AFLAGS := $(KBUILD_CFLAGS) | 6 | asflags-y := $(KBUILD_CFLAGS) |
7 | EXTRA_CFLAGS := -Werror -Wno-sign-compare | 7 | ccflags-y := -Werror -Wno-sign-compare |
8 | 8 | ||
9 | obj-y := entry.o traps.o process.o init_task.o osf_sys.o irq.o \ | 9 | obj-y := entry.o traps.o process.o init_task.o osf_sys.o irq.o \ |
10 | irq_alpha.o signal.o setup.o ptrace.o time.o \ | 10 | irq_alpha.o signal.o setup.o ptrace.o time.o \ |
diff --git a/arch/alpha/kernel/irq.c b/arch/alpha/kernel/irq.c index fe912984d9b..9ab234f48dd 100644 --- a/arch/alpha/kernel/irq.c +++ b/arch/alpha/kernel/irq.c | |||
@@ -44,10 +44,11 @@ static char irq_user_affinity[NR_IRQS]; | |||
44 | 44 | ||
45 | int irq_select_affinity(unsigned int irq) | 45 | int irq_select_affinity(unsigned int irq) |
46 | { | 46 | { |
47 | struct irq_desc *desc = irq_to_desc[irq]; | ||
47 | static int last_cpu; | 48 | static int last_cpu; |
48 | int cpu = last_cpu + 1; | 49 | int cpu = last_cpu + 1; |
49 | 50 | ||
50 | if (!irq_desc[irq].chip->set_affinity || irq_user_affinity[irq]) | 51 | if (!desc || !get_irq_desc_chip(desc)->set_affinity || irq_user_affinity[irq]) |
51 | return 1; | 52 | return 1; |
52 | 53 | ||
53 | while (!cpu_possible(cpu) || | 54 | while (!cpu_possible(cpu) || |
@@ -55,8 +56,8 @@ int irq_select_affinity(unsigned int irq) | |||
55 | cpu = (cpu < (NR_CPUS-1) ? cpu + 1 : 0); | 56 | cpu = (cpu < (NR_CPUS-1) ? cpu + 1 : 0); |
56 | last_cpu = cpu; | 57 | last_cpu = cpu; |
57 | 58 | ||
58 | cpumask_copy(irq_desc[irq].affinity, cpumask_of(cpu)); | 59 | cpumask_copy(desc->affinity, cpumask_of(cpu)); |
59 | irq_desc[irq].chip->set_affinity(irq, cpumask_of(cpu)); | 60 | get_irq_desc_chip(desc)->set_affinity(irq, cpumask_of(cpu)); |
60 | return 0; | 61 | return 0; |
61 | } | 62 | } |
62 | #endif /* CONFIG_SMP */ | 63 | #endif /* CONFIG_SMP */ |
@@ -67,6 +68,7 @@ show_interrupts(struct seq_file *p, void *v) | |||
67 | int j; | 68 | int j; |
68 | int irq = *(loff_t *) v; | 69 | int irq = *(loff_t *) v; |
69 | struct irqaction * action; | 70 | struct irqaction * action; |
71 | struct irq_desc *desc; | ||
70 | unsigned long flags; | 72 | unsigned long flags; |
71 | 73 | ||
72 | #ifdef CONFIG_SMP | 74 | #ifdef CONFIG_SMP |
@@ -79,8 +81,13 @@ show_interrupts(struct seq_file *p, void *v) | |||
79 | #endif | 81 | #endif |
80 | 82 | ||
81 | if (irq < ACTUAL_NR_IRQS) { | 83 | if (irq < ACTUAL_NR_IRQS) { |
82 | raw_spin_lock_irqsave(&irq_desc[irq].lock, flags); | 84 | desc = irq_to_desc(irq); |
83 | action = irq_desc[irq].action; | 85 | |
86 | if (!desc) | ||
87 | return 0; | ||
88 | |||
89 | raw_spin_lock_irqsave(&desc->lock, flags); | ||
90 | action = desc->action; | ||
84 | if (!action) | 91 | if (!action) |
85 | goto unlock; | 92 | goto unlock; |
86 | seq_printf(p, "%3d: ", irq); | 93 | seq_printf(p, "%3d: ", irq); |
@@ -90,7 +97,7 @@ show_interrupts(struct seq_file *p, void *v) | |||
90 | for_each_online_cpu(j) | 97 | for_each_online_cpu(j) |
91 | seq_printf(p, "%10u ", kstat_irqs_cpu(irq, j)); | 98 | seq_printf(p, "%10u ", kstat_irqs_cpu(irq, j)); |
92 | #endif | 99 | #endif |
93 | seq_printf(p, " %14s", irq_desc[irq].chip->name); | 100 | seq_printf(p, " %14s", get_irq_desc_chip(desc)->name); |
94 | seq_printf(p, " %c%s", | 101 | seq_printf(p, " %c%s", |
95 | (action->flags & IRQF_DISABLED)?'+':' ', | 102 | (action->flags & IRQF_DISABLED)?'+':' ', |
96 | action->name); | 103 | action->name); |
@@ -103,7 +110,7 @@ show_interrupts(struct seq_file *p, void *v) | |||
103 | 110 | ||
104 | seq_putc(p, '\n'); | 111 | seq_putc(p, '\n'); |
105 | unlock: | 112 | unlock: |
106 | raw_spin_unlock_irqrestore(&irq_desc[irq].lock, flags); | 113 | raw_spin_unlock_irqrestore(&desc->lock, flags); |
107 | } else if (irq == ACTUAL_NR_IRQS) { | 114 | } else if (irq == ACTUAL_NR_IRQS) { |
108 | #ifdef CONFIG_SMP | 115 | #ifdef CONFIG_SMP |
109 | seq_puts(p, "IPI: "); | 116 | seq_puts(p, "IPI: "); |
@@ -142,8 +149,10 @@ handle_irq(int irq) | |||
142 | * handled by some other CPU. (or is disabled) | 149 | * handled by some other CPU. (or is disabled) |
143 | */ | 150 | */ |
144 | static unsigned int illegal_count=0; | 151 | static unsigned int illegal_count=0; |
152 | struct irq_desc *desc = irq_to_desc(irq); | ||
145 | 153 | ||
146 | if ((unsigned) irq > ACTUAL_NR_IRQS && illegal_count < MAX_ILLEGAL_IRQS ) { | 154 | if (!desc || ((unsigned) irq > ACTUAL_NR_IRQS && |
155 | illegal_count < MAX_ILLEGAL_IRQS)) { | ||
147 | irq_err_count++; | 156 | irq_err_count++; |
148 | illegal_count++; | 157 | illegal_count++; |
149 | printk(KERN_CRIT "device_interrupt: invalid interrupt %d\n", | 158 | printk(KERN_CRIT "device_interrupt: invalid interrupt %d\n", |
@@ -151,14 +160,14 @@ handle_irq(int irq) | |||
151 | return; | 160 | return; |
152 | } | 161 | } |
153 | 162 | ||
154 | irq_enter(); | ||
155 | /* | 163 | /* |
156 | * __do_IRQ() must be called with IPL_MAX. Note that we do not | 164 | * From here we must proceed with IPL_MAX. Note that we do not |
157 | * explicitly enable interrupts afterwards - some MILO PALcode | 165 | * explicitly enable interrupts afterwards - some MILO PALcode |
158 | * (namely LX164 one) seems to have severe problems with RTI | 166 | * (namely LX164 one) seems to have severe problems with RTI |
159 | * at IPL 0. | 167 | * at IPL 0. |
160 | */ | 168 | */ |
161 | local_irq_disable(); | 169 | local_irq_disable(); |
162 | __do_IRQ(irq); | 170 | irq_enter(); |
171 | generic_handle_irq_desc(irq, desc); | ||
163 | irq_exit(); | 172 | irq_exit(); |
164 | } | 173 | } |
diff --git a/arch/alpha/kernel/irq_alpha.c b/arch/alpha/kernel/irq_alpha.c index 4c8bb374eb0..2d0679b6093 100644 --- a/arch/alpha/kernel/irq_alpha.c +++ b/arch/alpha/kernel/irq_alpha.c | |||
@@ -219,31 +219,23 @@ process_mcheck_info(unsigned long vector, unsigned long la_ptr, | |||
219 | * processed by PALcode, and comes in via entInt vector 1. | 219 | * processed by PALcode, and comes in via entInt vector 1. |
220 | */ | 220 | */ |
221 | 221 | ||
222 | static void rtc_enable_disable(unsigned int irq) { } | ||
223 | static unsigned int rtc_startup(unsigned int irq) { return 0; } | ||
224 | |||
225 | struct irqaction timer_irqaction = { | 222 | struct irqaction timer_irqaction = { |
226 | .handler = timer_interrupt, | 223 | .handler = timer_interrupt, |
227 | .flags = IRQF_DISABLED, | 224 | .flags = IRQF_DISABLED, |
228 | .name = "timer", | 225 | .name = "timer", |
229 | }; | 226 | }; |
230 | 227 | ||
231 | static struct irq_chip rtc_irq_type = { | ||
232 | .name = "RTC", | ||
233 | .startup = rtc_startup, | ||
234 | .shutdown = rtc_enable_disable, | ||
235 | .enable = rtc_enable_disable, | ||
236 | .disable = rtc_enable_disable, | ||
237 | .ack = rtc_enable_disable, | ||
238 | .end = rtc_enable_disable, | ||
239 | }; | ||
240 | |||
241 | void __init | 228 | void __init |
242 | init_rtc_irq(void) | 229 | init_rtc_irq(void) |
243 | { | 230 | { |
244 | irq_desc[RTC_IRQ].status = IRQ_DISABLED; | 231 | struct irq_desc *desc = irq_to_desc(RTC_IRQ); |
245 | irq_desc[RTC_IRQ].chip = &rtc_irq_type; | 232 | |
246 | setup_irq(RTC_IRQ, &timer_irqaction); | 233 | if (desc) { |
234 | desc->status |= IRQ_DISABLED; | ||
235 | set_irq_chip_and_handler_name(RTC_IRQ, &no_irq_chip, | ||
236 | handle_simple_irq, "RTC"); | ||
237 | setup_irq(RTC_IRQ, &timer_irqaction); | ||
238 | } | ||
247 | } | 239 | } |
248 | 240 | ||
249 | /* Dummy irqactions. */ | 241 | /* Dummy irqactions. */ |
diff --git a/arch/alpha/kernel/irq_i8259.c b/arch/alpha/kernel/irq_i8259.c index 83a9ac28089..956ea0ed169 100644 --- a/arch/alpha/kernel/irq_i8259.c +++ b/arch/alpha/kernel/irq_i8259.c | |||
@@ -69,28 +69,11 @@ i8259a_mask_and_ack_irq(unsigned int irq) | |||
69 | spin_unlock(&i8259_irq_lock); | 69 | spin_unlock(&i8259_irq_lock); |
70 | } | 70 | } |
71 | 71 | ||
72 | unsigned int | ||
73 | i8259a_startup_irq(unsigned int irq) | ||
74 | { | ||
75 | i8259a_enable_irq(irq); | ||
76 | return 0; /* never anything pending */ | ||
77 | } | ||
78 | |||
79 | void | ||
80 | i8259a_end_irq(unsigned int irq) | ||
81 | { | ||
82 | if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) | ||
83 | i8259a_enable_irq(irq); | ||
84 | } | ||
85 | |||
86 | struct irq_chip i8259a_irq_type = { | 72 | struct irq_chip i8259a_irq_type = { |
87 | .name = "XT-PIC", | 73 | .name = "XT-PIC", |
88 | .startup = i8259a_startup_irq, | 74 | .unmask = i8259a_enable_irq, |
89 | .shutdown = i8259a_disable_irq, | 75 | .mask = i8259a_disable_irq, |
90 | .enable = i8259a_enable_irq, | 76 | .mask_ack = i8259a_mask_and_ack_irq, |
91 | .disable = i8259a_disable_irq, | ||
92 | .ack = i8259a_mask_and_ack_irq, | ||
93 | .end = i8259a_end_irq, | ||
94 | }; | 77 | }; |
95 | 78 | ||
96 | void __init | 79 | void __init |
@@ -107,8 +90,7 @@ init_i8259a_irqs(void) | |||
107 | outb(0xff, 0xA1); /* mask all of 8259A-2 */ | 90 | outb(0xff, 0xA1); /* mask all of 8259A-2 */ |
108 | 91 | ||
109 | for (i = 0; i < 16; i++) { | 92 | for (i = 0; i < 16; i++) { |
110 | irq_desc[i].status = IRQ_DISABLED; | 93 | set_irq_chip_and_handler(i, &i8259a_irq_type, handle_level_irq); |
111 | irq_desc[i].chip = &i8259a_irq_type; | ||
112 | } | 94 | } |
113 | 95 | ||
114 | setup_irq(2, &cascade); | 96 | setup_irq(2, &cascade); |
diff --git a/arch/alpha/kernel/irq_pyxis.c b/arch/alpha/kernel/irq_pyxis.c index 989ce46a0cf..2863458c853 100644 --- a/arch/alpha/kernel/irq_pyxis.c +++ b/arch/alpha/kernel/irq_pyxis.c | |||
@@ -40,20 +40,6 @@ pyxis_disable_irq(unsigned int irq) | |||
40 | pyxis_update_irq_hw(cached_irq_mask &= ~(1UL << (irq - 16))); | 40 | pyxis_update_irq_hw(cached_irq_mask &= ~(1UL << (irq - 16))); |
41 | } | 41 | } |
42 | 42 | ||
43 | static unsigned int | ||
44 | pyxis_startup_irq(unsigned int irq) | ||
45 | { | ||
46 | pyxis_enable_irq(irq); | ||
47 | return 0; | ||
48 | } | ||
49 | |||
50 | static void | ||
51 | pyxis_end_irq(unsigned int irq) | ||
52 | { | ||
53 | if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) | ||
54 | pyxis_enable_irq(irq); | ||
55 | } | ||
56 | |||
57 | static void | 43 | static void |
58 | pyxis_mask_and_ack_irq(unsigned int irq) | 44 | pyxis_mask_and_ack_irq(unsigned int irq) |
59 | { | 45 | { |
@@ -72,12 +58,9 @@ pyxis_mask_and_ack_irq(unsigned int irq) | |||
72 | 58 | ||
73 | static struct irq_chip pyxis_irq_type = { | 59 | static struct irq_chip pyxis_irq_type = { |
74 | .name = "PYXIS", | 60 | .name = "PYXIS", |
75 | .startup = pyxis_startup_irq, | 61 | .mask_ack = pyxis_mask_and_ack_irq, |
76 | .shutdown = pyxis_disable_irq, | 62 | .mask = pyxis_disable_irq, |
77 | .enable = pyxis_enable_irq, | 63 | .unmask = pyxis_enable_irq, |
78 | .disable = pyxis_disable_irq, | ||
79 | .ack = pyxis_mask_and_ack_irq, | ||
80 | .end = pyxis_end_irq, | ||
81 | }; | 64 | }; |
82 | 65 | ||
83 | void | 66 | void |
@@ -119,8 +102,8 @@ init_pyxis_irqs(unsigned long ignore_mask) | |||
119 | for (i = 16; i < 48; ++i) { | 102 | for (i = 16; i < 48; ++i) { |
120 | if ((ignore_mask >> i) & 1) | 103 | if ((ignore_mask >> i) & 1) |
121 | continue; | 104 | continue; |
122 | irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; | 105 | set_irq_chip_and_handler(i, &pyxis_irq_type, handle_level_irq); |
123 | irq_desc[i].chip = &pyxis_irq_type; | 106 | irq_to_desc(i)->status |= IRQ_LEVEL; |
124 | } | 107 | } |
125 | 108 | ||
126 | setup_irq(16+7, &isa_cascade_irqaction); | 109 | setup_irq(16+7, &isa_cascade_irqaction); |
diff --git a/arch/alpha/kernel/irq_srm.c b/arch/alpha/kernel/irq_srm.c index d63e93e1e8b..0e57e828b41 100644 --- a/arch/alpha/kernel/irq_srm.c +++ b/arch/alpha/kernel/irq_srm.c | |||
@@ -33,29 +33,12 @@ srm_disable_irq(unsigned int irq) | |||
33 | spin_unlock(&srm_irq_lock); | 33 | spin_unlock(&srm_irq_lock); |
34 | } | 34 | } |
35 | 35 | ||
36 | static unsigned int | ||
37 | srm_startup_irq(unsigned int irq) | ||
38 | { | ||
39 | srm_enable_irq(irq); | ||
40 | return 0; | ||
41 | } | ||
42 | |||
43 | static void | ||
44 | srm_end_irq(unsigned int irq) | ||
45 | { | ||
46 | if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) | ||
47 | srm_enable_irq(irq); | ||
48 | } | ||
49 | |||
50 | /* Handle interrupts from the SRM, assuming no additional weirdness. */ | 36 | /* Handle interrupts from the SRM, assuming no additional weirdness. */ |
51 | static struct irq_chip srm_irq_type = { | 37 | static struct irq_chip srm_irq_type = { |
52 | .name = "SRM", | 38 | .name = "SRM", |
53 | .startup = srm_startup_irq, | 39 | .unmask = srm_enable_irq, |
54 | .shutdown = srm_disable_irq, | 40 | .mask = srm_disable_irq, |
55 | .enable = srm_enable_irq, | 41 | .mask_ack = srm_disable_irq, |
56 | .disable = srm_disable_irq, | ||
57 | .ack = srm_disable_irq, | ||
58 | .end = srm_end_irq, | ||
59 | }; | 42 | }; |
60 | 43 | ||
61 | void __init | 44 | void __init |
@@ -68,8 +51,8 @@ init_srm_irqs(long max, unsigned long ignore_mask) | |||
68 | for (i = 16; i < max; ++i) { | 51 | for (i = 16; i < max; ++i) { |
69 | if (i < 64 && ((ignore_mask >> i) & 1)) | 52 | if (i < 64 && ((ignore_mask >> i) & 1)) |
70 | continue; | 53 | continue; |
71 | irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; | 54 | set_irq_chip_and_handler(i, &srm_irq_type, handle_level_irq); |
72 | irq_desc[i].chip = &srm_irq_type; | 55 | irq_to_desc(i)->status |= IRQ_LEVEL; |
73 | } | 56 | } |
74 | } | 57 | } |
75 | 58 | ||
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index 547e8b84b2f..fe698b5045e 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c | |||
@@ -951,9 +951,6 @@ SYSCALL_DEFINE2(osf_utimes, const char __user *, filename, | |||
951 | return do_utimes(AT_FDCWD, filename, tvs ? tv : NULL, 0); | 951 | return do_utimes(AT_FDCWD, filename, tvs ? tv : NULL, 0); |
952 | } | 952 | } |
953 | 953 | ||
954 | #define MAX_SELECT_SECONDS \ | ||
955 | ((unsigned long) (MAX_SCHEDULE_TIMEOUT / HZ)-1) | ||
956 | |||
957 | SYSCALL_DEFINE5(osf_select, int, n, fd_set __user *, inp, fd_set __user *, outp, | 954 | SYSCALL_DEFINE5(osf_select, int, n, fd_set __user *, inp, fd_set __user *, outp, |
958 | fd_set __user *, exp, struct timeval32 __user *, tvp) | 955 | fd_set __user *, exp, struct timeval32 __user *, tvp) |
959 | { | 956 | { |
diff --git a/arch/alpha/kernel/sys_alcor.c b/arch/alpha/kernel/sys_alcor.c index 20a30b8b965..7bef6176823 100644 --- a/arch/alpha/kernel/sys_alcor.c +++ b/arch/alpha/kernel/sys_alcor.c | |||
@@ -65,13 +65,6 @@ alcor_mask_and_ack_irq(unsigned int irq) | |||
65 | *(vuip)GRU_INT_CLEAR = 0; mb(); | 65 | *(vuip)GRU_INT_CLEAR = 0; mb(); |
66 | } | 66 | } |
67 | 67 | ||
68 | static unsigned int | ||
69 | alcor_startup_irq(unsigned int irq) | ||
70 | { | ||
71 | alcor_enable_irq(irq); | ||
72 | return 0; | ||
73 | } | ||
74 | |||
75 | static void | 68 | static void |
76 | alcor_isa_mask_and_ack_irq(unsigned int irq) | 69 | alcor_isa_mask_and_ack_irq(unsigned int irq) |
77 | { | 70 | { |
@@ -82,21 +75,11 @@ alcor_isa_mask_and_ack_irq(unsigned int irq) | |||
82 | *(vuip)GRU_INT_CLEAR = 0; mb(); | 75 | *(vuip)GRU_INT_CLEAR = 0; mb(); |
83 | } | 76 | } |
84 | 77 | ||
85 | static void | ||
86 | alcor_end_irq(unsigned int irq) | ||
87 | { | ||
88 | if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) | ||
89 | alcor_enable_irq(irq); | ||
90 | } | ||
91 | |||
92 | static struct irq_chip alcor_irq_type = { | 78 | static struct irq_chip alcor_irq_type = { |
93 | .name = "ALCOR", | 79 | .name = "ALCOR", |
94 | .startup = alcor_startup_irq, | 80 | .unmask = alcor_enable_irq, |
95 | .shutdown = alcor_disable_irq, | 81 | .mask = alcor_disable_irq, |
96 | .enable = alcor_enable_irq, | 82 | .mask_ack = alcor_mask_and_ack_irq, |
97 | .disable = alcor_disable_irq, | ||
98 | .ack = alcor_mask_and_ack_irq, | ||
99 | .end = alcor_end_irq, | ||
100 | }; | 83 | }; |
101 | 84 | ||
102 | static void | 85 | static void |
@@ -142,8 +125,8 @@ alcor_init_irq(void) | |||
142 | on while IRQ probing. */ | 125 | on while IRQ probing. */ |
143 | if (i >= 16+20 && i <= 16+30) | 126 | if (i >= 16+20 && i <= 16+30) |
144 | continue; | 127 | continue; |
145 | irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; | 128 | set_irq_chip_and_handler(i, &alcor_irq_type, handle_level_irq); |
146 | irq_desc[i].chip = &alcor_irq_type; | 129 | irq_to_desc(i)->status |= IRQ_LEVEL; |
147 | } | 130 | } |
148 | i8259a_irq_type.ack = alcor_isa_mask_and_ack_irq; | 131 | i8259a_irq_type.ack = alcor_isa_mask_and_ack_irq; |
149 | 132 | ||
diff --git a/arch/alpha/kernel/sys_cabriolet.c b/arch/alpha/kernel/sys_cabriolet.c index 14c8898d19e..b0c916493ae 100644 --- a/arch/alpha/kernel/sys_cabriolet.c +++ b/arch/alpha/kernel/sys_cabriolet.c | |||
@@ -57,28 +57,11 @@ cabriolet_disable_irq(unsigned int irq) | |||
57 | cabriolet_update_irq_hw(irq, cached_irq_mask |= 1UL << irq); | 57 | cabriolet_update_irq_hw(irq, cached_irq_mask |= 1UL << irq); |
58 | } | 58 | } |
59 | 59 | ||
60 | static unsigned int | ||
61 | cabriolet_startup_irq(unsigned int irq) | ||
62 | { | ||
63 | cabriolet_enable_irq(irq); | ||
64 | return 0; /* never anything pending */ | ||
65 | } | ||
66 | |||
67 | static void | ||
68 | cabriolet_end_irq(unsigned int irq) | ||
69 | { | ||
70 | if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) | ||
71 | cabriolet_enable_irq(irq); | ||
72 | } | ||
73 | |||
74 | static struct irq_chip cabriolet_irq_type = { | 60 | static struct irq_chip cabriolet_irq_type = { |
75 | .name = "CABRIOLET", | 61 | .name = "CABRIOLET", |
76 | .startup = cabriolet_startup_irq, | 62 | .unmask = cabriolet_enable_irq, |
77 | .shutdown = cabriolet_disable_irq, | 63 | .mask = cabriolet_disable_irq, |
78 | .enable = cabriolet_enable_irq, | 64 | .mask_ack = cabriolet_disable_irq, |
79 | .disable = cabriolet_disable_irq, | ||
80 | .ack = cabriolet_disable_irq, | ||
81 | .end = cabriolet_end_irq, | ||
82 | }; | 65 | }; |
83 | 66 | ||
84 | static void | 67 | static void |
@@ -122,8 +105,9 @@ common_init_irq(void (*srm_dev_int)(unsigned long v)) | |||
122 | outb(0xff, 0x806); | 105 | outb(0xff, 0x806); |
123 | 106 | ||
124 | for (i = 16; i < 35; ++i) { | 107 | for (i = 16; i < 35; ++i) { |
125 | irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; | 108 | set_irq_chip_and_handler(i, &cabriolet_irq_type, |
126 | irq_desc[i].chip = &cabriolet_irq_type; | 109 | handle_level_irq); |
110 | irq_to_desc(i)->status |= IRQ_LEVEL; | ||
127 | } | 111 | } |
128 | } | 112 | } |
129 | 113 | ||
diff --git a/arch/alpha/kernel/sys_dp264.c b/arch/alpha/kernel/sys_dp264.c index 4026502ab70..edad5f759cc 100644 --- a/arch/alpha/kernel/sys_dp264.c +++ b/arch/alpha/kernel/sys_dp264.c | |||
@@ -115,20 +115,6 @@ dp264_disable_irq(unsigned int irq) | |||
115 | spin_unlock(&dp264_irq_lock); | 115 | spin_unlock(&dp264_irq_lock); |
116 | } | 116 | } |
117 | 117 | ||
118 | static unsigned int | ||
119 | dp264_startup_irq(unsigned int irq) | ||
120 | { | ||
121 | dp264_enable_irq(irq); | ||
122 | return 0; /* never anything pending */ | ||
123 | } | ||
124 | |||
125 | static void | ||
126 | dp264_end_irq(unsigned int irq) | ||
127 | { | ||
128 | if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) | ||
129 | dp264_enable_irq(irq); | ||
130 | } | ||
131 | |||
132 | static void | 118 | static void |
133 | clipper_enable_irq(unsigned int irq) | 119 | clipper_enable_irq(unsigned int irq) |
134 | { | 120 | { |
@@ -147,20 +133,6 @@ clipper_disable_irq(unsigned int irq) | |||
147 | spin_unlock(&dp264_irq_lock); | 133 | spin_unlock(&dp264_irq_lock); |
148 | } | 134 | } |
149 | 135 | ||
150 | static unsigned int | ||
151 | clipper_startup_irq(unsigned int irq) | ||
152 | { | ||
153 | clipper_enable_irq(irq); | ||
154 | return 0; /* never anything pending */ | ||
155 | } | ||
156 | |||
157 | static void | ||
158 | clipper_end_irq(unsigned int irq) | ||
159 | { | ||
160 | if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) | ||
161 | clipper_enable_irq(irq); | ||
162 | } | ||
163 | |||
164 | static void | 136 | static void |
165 | cpu_set_irq_affinity(unsigned int irq, cpumask_t affinity) | 137 | cpu_set_irq_affinity(unsigned int irq, cpumask_t affinity) |
166 | { | 138 | { |
@@ -200,23 +172,17 @@ clipper_set_affinity(unsigned int irq, const struct cpumask *affinity) | |||
200 | 172 | ||
201 | static struct irq_chip dp264_irq_type = { | 173 | static struct irq_chip dp264_irq_type = { |
202 | .name = "DP264", | 174 | .name = "DP264", |
203 | .startup = dp264_startup_irq, | 175 | .unmask = dp264_enable_irq, |
204 | .shutdown = dp264_disable_irq, | 176 | .mask = dp264_disable_irq, |
205 | .enable = dp264_enable_irq, | 177 | .mask_ack = dp264_disable_irq, |
206 | .disable = dp264_disable_irq, | ||
207 | .ack = dp264_disable_irq, | ||
208 | .end = dp264_end_irq, | ||
209 | .set_affinity = dp264_set_affinity, | 178 | .set_affinity = dp264_set_affinity, |
210 | }; | 179 | }; |
211 | 180 | ||
212 | static struct irq_chip clipper_irq_type = { | 181 | static struct irq_chip clipper_irq_type = { |
213 | .name = "CLIPPER", | 182 | .name = "CLIPPER", |
214 | .startup = clipper_startup_irq, | 183 | .unmask = clipper_enable_irq, |
215 | .shutdown = clipper_disable_irq, | 184 | .mask = clipper_disable_irq, |
216 | .enable = clipper_enable_irq, | 185 | .mask_ack = clipper_disable_irq, |
217 | .disable = clipper_disable_irq, | ||
218 | .ack = clipper_disable_irq, | ||
219 | .end = clipper_end_irq, | ||
220 | .set_affinity = clipper_set_affinity, | 186 | .set_affinity = clipper_set_affinity, |
221 | }; | 187 | }; |
222 | 188 | ||
@@ -302,8 +268,8 @@ init_tsunami_irqs(struct irq_chip * ops, int imin, int imax) | |||
302 | { | 268 | { |
303 | long i; | 269 | long i; |
304 | for (i = imin; i <= imax; ++i) { | 270 | for (i = imin; i <= imax; ++i) { |
305 | irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; | 271 | irq_to_desc(i)->status |= IRQ_LEVEL; |
306 | irq_desc[i].chip = ops; | 272 | set_irq_chip_and_handler(i, ops, handle_level_irq); |
307 | } | 273 | } |
308 | } | 274 | } |
309 | 275 | ||
diff --git a/arch/alpha/kernel/sys_eb64p.c b/arch/alpha/kernel/sys_eb64p.c index df2090ce5e7..ae5f29d127b 100644 --- a/arch/alpha/kernel/sys_eb64p.c +++ b/arch/alpha/kernel/sys_eb64p.c | |||
@@ -55,28 +55,11 @@ eb64p_disable_irq(unsigned int irq) | |||
55 | eb64p_update_irq_hw(irq, cached_irq_mask |= 1 << irq); | 55 | eb64p_update_irq_hw(irq, cached_irq_mask |= 1 << irq); |
56 | } | 56 | } |
57 | 57 | ||
58 | static unsigned int | ||
59 | eb64p_startup_irq(unsigned int irq) | ||
60 | { | ||
61 | eb64p_enable_irq(irq); | ||
62 | return 0; /* never anything pending */ | ||
63 | } | ||
64 | |||
65 | static void | ||
66 | eb64p_end_irq(unsigned int irq) | ||
67 | { | ||
68 | if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) | ||
69 | eb64p_enable_irq(irq); | ||
70 | } | ||
71 | |||
72 | static struct irq_chip eb64p_irq_type = { | 58 | static struct irq_chip eb64p_irq_type = { |
73 | .name = "EB64P", | 59 | .name = "EB64P", |
74 | .startup = eb64p_startup_irq, | 60 | .unmask = eb64p_enable_irq, |
75 | .shutdown = eb64p_disable_irq, | 61 | .mask = eb64p_disable_irq, |
76 | .enable = eb64p_enable_irq, | 62 | .mask_ack = eb64p_disable_irq, |
77 | .disable = eb64p_disable_irq, | ||
78 | .ack = eb64p_disable_irq, | ||
79 | .end = eb64p_end_irq, | ||
80 | }; | 63 | }; |
81 | 64 | ||
82 | static void | 65 | static void |
@@ -135,8 +118,8 @@ eb64p_init_irq(void) | |||
135 | init_i8259a_irqs(); | 118 | init_i8259a_irqs(); |
136 | 119 | ||
137 | for (i = 16; i < 32; ++i) { | 120 | for (i = 16; i < 32; ++i) { |
138 | irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; | 121 | irq_to_desc(i)->status |= IRQ_LEVEL; |
139 | irq_desc[i].chip = &eb64p_irq_type; | 122 | set_irq_chip_and_handler(i, &eb64p_irq_type, handle_level_irq); |
140 | } | 123 | } |
141 | 124 | ||
142 | common_init_isa_dma(); | 125 | common_init_isa_dma(); |
diff --git a/arch/alpha/kernel/sys_eiger.c b/arch/alpha/kernel/sys_eiger.c index 3ca1dbcf404..1121bc5c6c6 100644 --- a/arch/alpha/kernel/sys_eiger.c +++ b/arch/alpha/kernel/sys_eiger.c | |||
@@ -66,28 +66,11 @@ eiger_disable_irq(unsigned int irq) | |||
66 | eiger_update_irq_hw(irq, mask); | 66 | eiger_update_irq_hw(irq, mask); |
67 | } | 67 | } |
68 | 68 | ||
69 | static unsigned int | ||
70 | eiger_startup_irq(unsigned int irq) | ||
71 | { | ||
72 | eiger_enable_irq(irq); | ||
73 | return 0; /* never anything pending */ | ||
74 | } | ||
75 | |||
76 | static void | ||
77 | eiger_end_irq(unsigned int irq) | ||
78 | { | ||
79 | if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) | ||
80 | eiger_enable_irq(irq); | ||
81 | } | ||
82 | |||
83 | static struct irq_chip eiger_irq_type = { | 69 | static struct irq_chip eiger_irq_type = { |
84 | .name = "EIGER", | 70 | .name = "EIGER", |
85 | .startup = eiger_startup_irq, | 71 | .unmask = eiger_enable_irq, |
86 | .shutdown = eiger_disable_irq, | 72 | .mask = eiger_disable_irq, |
87 | .enable = eiger_enable_irq, | 73 | .mask_ack = eiger_disable_irq, |
88 | .disable = eiger_disable_irq, | ||
89 | .ack = eiger_disable_irq, | ||
90 | .end = eiger_end_irq, | ||
91 | }; | 74 | }; |
92 | 75 | ||
93 | static void | 76 | static void |
@@ -153,8 +136,8 @@ eiger_init_irq(void) | |||
153 | init_i8259a_irqs(); | 136 | init_i8259a_irqs(); |
154 | 137 | ||
155 | for (i = 16; i < 128; ++i) { | 138 | for (i = 16; i < 128; ++i) { |
156 | irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; | 139 | irq_to_desc(i)->status |= IRQ_LEVEL; |
157 | irq_desc[i].chip = &eiger_irq_type; | 140 | set_irq_chip_and_handler(i, &eiger_irq_type, handle_level_irq); |
158 | } | 141 | } |
159 | } | 142 | } |
160 | 143 | ||
diff --git a/arch/alpha/kernel/sys_jensen.c b/arch/alpha/kernel/sys_jensen.c index 7a7ae36fff9..34f55e03d33 100644 --- a/arch/alpha/kernel/sys_jensen.c +++ b/arch/alpha/kernel/sys_jensen.c | |||
@@ -62,30 +62,6 @@ | |||
62 | * world. | 62 | * world. |
63 | */ | 63 | */ |
64 | 64 | ||
65 | static unsigned int | ||
66 | jensen_local_startup(unsigned int irq) | ||
67 | { | ||
68 | /* the parport is really hw IRQ 1, silly Jensen. */ | ||
69 | if (irq == 7) | ||
70 | i8259a_startup_irq(1); | ||
71 | else | ||
72 | /* | ||
73 | * For all true local interrupts, set the flag that prevents | ||
74 | * the IPL from being dropped during handler processing. | ||
75 | */ | ||
76 | if (irq_desc[irq].action) | ||
77 | irq_desc[irq].action->flags |= IRQF_DISABLED; | ||
78 | return 0; | ||
79 | } | ||
80 | |||
81 | static void | ||
82 | jensen_local_shutdown(unsigned int irq) | ||
83 | { | ||
84 | /* the parport is really hw IRQ 1, silly Jensen. */ | ||
85 | if (irq == 7) | ||
86 | i8259a_disable_irq(1); | ||
87 | } | ||
88 | |||
89 | static void | 65 | static void |
90 | jensen_local_enable(unsigned int irq) | 66 | jensen_local_enable(unsigned int irq) |
91 | { | 67 | { |
@@ -103,29 +79,18 @@ jensen_local_disable(unsigned int irq) | |||
103 | } | 79 | } |
104 | 80 | ||
105 | static void | 81 | static void |
106 | jensen_local_ack(unsigned int irq) | 82 | jensen_local_mask_ack(unsigned int irq) |
107 | { | 83 | { |
108 | /* the parport is really hw IRQ 1, silly Jensen. */ | 84 | /* the parport is really hw IRQ 1, silly Jensen. */ |
109 | if (irq == 7) | 85 | if (irq == 7) |
110 | i8259a_mask_and_ack_irq(1); | 86 | i8259a_mask_and_ack_irq(1); |
111 | } | 87 | } |
112 | 88 | ||
113 | static void | ||
114 | jensen_local_end(unsigned int irq) | ||
115 | { | ||
116 | /* the parport is really hw IRQ 1, silly Jensen. */ | ||
117 | if (irq == 7) | ||
118 | i8259a_end_irq(1); | ||
119 | } | ||
120 | |||
121 | static struct irq_chip jensen_local_irq_type = { | 89 | static struct irq_chip jensen_local_irq_type = { |
122 | .name = "LOCAL", | 90 | .name = "LOCAL", |
123 | .startup = jensen_local_startup, | 91 | .unmask = jensen_local_enable, |
124 | .shutdown = jensen_local_shutdown, | 92 | .mask = jensen_local_disable, |
125 | .enable = jensen_local_enable, | 93 | .mask_ack = jensen_local_mask_ack, |
126 | .disable = jensen_local_disable, | ||
127 | .ack = jensen_local_ack, | ||
128 | .end = jensen_local_end, | ||
129 | }; | 94 | }; |
130 | 95 | ||
131 | static void | 96 | static void |
@@ -158,7 +123,7 @@ jensen_device_interrupt(unsigned long vector) | |||
158 | } | 123 | } |
159 | 124 | ||
160 | /* If there is no handler yet... */ | 125 | /* If there is no handler yet... */ |
161 | if (irq_desc[irq].action == NULL) { | 126 | if (!irq_has_action(irq)) { |
162 | /* If it is a local interrupt that cannot be masked... */ | 127 | /* If it is a local interrupt that cannot be masked... */ |
163 | if (vector >= 0x900) | 128 | if (vector >= 0x900) |
164 | { | 129 | { |
@@ -206,11 +171,11 @@ jensen_init_irq(void) | |||
206 | { | 171 | { |
207 | init_i8259a_irqs(); | 172 | init_i8259a_irqs(); |
208 | 173 | ||
209 | irq_desc[1].chip = &jensen_local_irq_type; | 174 | set_irq_chip_and_handler(1, &jensen_local_irq_type, handle_level_irq); |
210 | irq_desc[4].chip = &jensen_local_irq_type; | 175 | set_irq_chip_and_handler(4, &jensen_local_irq_type, handle_level_irq); |
211 | irq_desc[3].chip = &jensen_local_irq_type; | 176 | set_irq_chip_and_handler(3, &jensen_local_irq_type, handle_level_irq); |
212 | irq_desc[7].chip = &jensen_local_irq_type; | 177 | set_irq_chip_and_handler(7, &jensen_local_irq_type, handle_level_irq); |
213 | irq_desc[9].chip = &jensen_local_irq_type; | 178 | set_irq_chip_and_handler(9, &jensen_local_irq_type, handle_level_irq); |
214 | 179 | ||
215 | common_init_isa_dma(); | 180 | common_init_isa_dma(); |
216 | } | 181 | } |
diff --git a/arch/alpha/kernel/sys_marvel.c b/arch/alpha/kernel/sys_marvel.c index 0bb3b5c4f69..2bfc9f1b1dd 100644 --- a/arch/alpha/kernel/sys_marvel.c +++ b/arch/alpha/kernel/sys_marvel.c | |||
@@ -143,20 +143,6 @@ io7_disable_irq(unsigned int irq) | |||
143 | spin_unlock(&io7->irq_lock); | 143 | spin_unlock(&io7->irq_lock); |
144 | } | 144 | } |
145 | 145 | ||
146 | static unsigned int | ||
147 | io7_startup_irq(unsigned int irq) | ||
148 | { | ||
149 | io7_enable_irq(irq); | ||
150 | return 0; /* never anything pending */ | ||
151 | } | ||
152 | |||
153 | static void | ||
154 | io7_end_irq(unsigned int irq) | ||
155 | { | ||
156 | if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) | ||
157 | io7_enable_irq(irq); | ||
158 | } | ||
159 | |||
160 | static void | 146 | static void |
161 | marvel_irq_noop(unsigned int irq) | 147 | marvel_irq_noop(unsigned int irq) |
162 | { | 148 | { |
@@ -171,32 +157,22 @@ marvel_irq_noop_return(unsigned int irq) | |||
171 | 157 | ||
172 | static struct irq_chip marvel_legacy_irq_type = { | 158 | static struct irq_chip marvel_legacy_irq_type = { |
173 | .name = "LEGACY", | 159 | .name = "LEGACY", |
174 | .startup = marvel_irq_noop_return, | 160 | .mask = marvel_irq_noop, |
175 | .shutdown = marvel_irq_noop, | 161 | .unmask = marvel_irq_noop, |
176 | .enable = marvel_irq_noop, | ||
177 | .disable = marvel_irq_noop, | ||
178 | .ack = marvel_irq_noop, | ||
179 | .end = marvel_irq_noop, | ||
180 | }; | 162 | }; |
181 | 163 | ||
182 | static struct irq_chip io7_lsi_irq_type = { | 164 | static struct irq_chip io7_lsi_irq_type = { |
183 | .name = "LSI", | 165 | .name = "LSI", |
184 | .startup = io7_startup_irq, | 166 | .unmask = io7_enable_irq, |
185 | .shutdown = io7_disable_irq, | 167 | .mask = io7_disable_irq, |
186 | .enable = io7_enable_irq, | 168 | .mask_ack = io7_disable_irq, |
187 | .disable = io7_disable_irq, | ||
188 | .ack = io7_disable_irq, | ||
189 | .end = io7_end_irq, | ||
190 | }; | 169 | }; |
191 | 170 | ||
192 | static struct irq_chip io7_msi_irq_type = { | 171 | static struct irq_chip io7_msi_irq_type = { |
193 | .name = "MSI", | 172 | .name = "MSI", |
194 | .startup = io7_startup_irq, | 173 | .unmask = io7_enable_irq, |
195 | .shutdown = io7_disable_irq, | 174 | .mask = io7_disable_irq, |
196 | .enable = io7_enable_irq, | ||
197 | .disable = io7_disable_irq, | ||
198 | .ack = marvel_irq_noop, | 175 | .ack = marvel_irq_noop, |
199 | .end = io7_end_irq, | ||
200 | }; | 176 | }; |
201 | 177 | ||
202 | static void | 178 | static void |
@@ -304,8 +280,8 @@ init_io7_irqs(struct io7 *io7, | |||
304 | 280 | ||
305 | /* Set up the lsi irqs. */ | 281 | /* Set up the lsi irqs. */ |
306 | for (i = 0; i < 128; ++i) { | 282 | for (i = 0; i < 128; ++i) { |
307 | irq_desc[base + i].status = IRQ_DISABLED | IRQ_LEVEL; | 283 | irq_to_desc(base + i)->status |= IRQ_LEVEL; |
308 | irq_desc[base + i].chip = lsi_ops; | 284 | set_irq_chip_and_handler(base + i, lsi_ops, handle_level_irq); |
309 | } | 285 | } |
310 | 286 | ||
311 | /* Disable the implemented irqs in hardware. */ | 287 | /* Disable the implemented irqs in hardware. */ |
@@ -318,8 +294,8 @@ init_io7_irqs(struct io7 *io7, | |||
318 | 294 | ||
319 | /* Set up the msi irqs. */ | 295 | /* Set up the msi irqs. */ |
320 | for (i = 128; i < (128 + 512); ++i) { | 296 | for (i = 128; i < (128 + 512); ++i) { |
321 | irq_desc[base + i].status = IRQ_DISABLED | IRQ_LEVEL; | 297 | irq_to_desc(base + i)->status |= IRQ_LEVEL; |
322 | irq_desc[base + i].chip = msi_ops; | 298 | set_irq_chip_and_handler(base + i, msi_ops, handle_level_irq); |
323 | } | 299 | } |
324 | 300 | ||
325 | for (i = 0; i < 16; ++i) | 301 | for (i = 0; i < 16; ++i) |
@@ -336,8 +312,8 @@ marvel_init_irq(void) | |||
336 | 312 | ||
337 | /* Reserve the legacy irqs. */ | 313 | /* Reserve the legacy irqs. */ |
338 | for (i = 0; i < 16; ++i) { | 314 | for (i = 0; i < 16; ++i) { |
339 | irq_desc[i].status = IRQ_DISABLED; | 315 | set_irq_chip_and_handler(i, &marvel_legacy_irq_type, |
340 | irq_desc[i].chip = &marvel_legacy_irq_type; | 316 | handle_level_irq); |
341 | } | 317 | } |
342 | 318 | ||
343 | /* Init the io7 irqs. */ | 319 | /* Init the io7 irqs. */ |
diff --git a/arch/alpha/kernel/sys_mikasa.c b/arch/alpha/kernel/sys_mikasa.c index ee886516981..bcc1639e8ef 100644 --- a/arch/alpha/kernel/sys_mikasa.c +++ b/arch/alpha/kernel/sys_mikasa.c | |||
@@ -54,28 +54,11 @@ mikasa_disable_irq(unsigned int irq) | |||
54 | mikasa_update_irq_hw(cached_irq_mask &= ~(1 << (irq - 16))); | 54 | mikasa_update_irq_hw(cached_irq_mask &= ~(1 << (irq - 16))); |
55 | } | 55 | } |
56 | 56 | ||
57 | static unsigned int | ||
58 | mikasa_startup_irq(unsigned int irq) | ||
59 | { | ||
60 | mikasa_enable_irq(irq); | ||
61 | return 0; | ||
62 | } | ||
63 | |||
64 | static void | ||
65 | mikasa_end_irq(unsigned int irq) | ||
66 | { | ||
67 | if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) | ||
68 | mikasa_enable_irq(irq); | ||
69 | } | ||
70 | |||
71 | static struct irq_chip mikasa_irq_type = { | 57 | static struct irq_chip mikasa_irq_type = { |
72 | .name = "MIKASA", | 58 | .name = "MIKASA", |
73 | .startup = mikasa_startup_irq, | 59 | .unmask = mikasa_enable_irq, |
74 | .shutdown = mikasa_disable_irq, | 60 | .mask = mikasa_disable_irq, |
75 | .enable = mikasa_enable_irq, | 61 | .mask_ack = mikasa_disable_irq, |
76 | .disable = mikasa_disable_irq, | ||
77 | .ack = mikasa_disable_irq, | ||
78 | .end = mikasa_end_irq, | ||
79 | }; | 62 | }; |
80 | 63 | ||
81 | static void | 64 | static void |
@@ -115,8 +98,8 @@ mikasa_init_irq(void) | |||
115 | mikasa_update_irq_hw(0); | 98 | mikasa_update_irq_hw(0); |
116 | 99 | ||
117 | for (i = 16; i < 32; ++i) { | 100 | for (i = 16; i < 32; ++i) { |
118 | irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; | 101 | irq_to_desc(i)->status |= IRQ_LEVEL; |
119 | irq_desc[i].chip = &mikasa_irq_type; | 102 | set_irq_chip_and_handler(i, &mikasa_irq_type, handle_level_irq); |
120 | } | 103 | } |
121 | 104 | ||
122 | init_i8259a_irqs(); | 105 | init_i8259a_irqs(); |
diff --git a/arch/alpha/kernel/sys_noritake.c b/arch/alpha/kernel/sys_noritake.c index 86503fe73a8..e88f4ae1260 100644 --- a/arch/alpha/kernel/sys_noritake.c +++ b/arch/alpha/kernel/sys_noritake.c | |||
@@ -59,28 +59,11 @@ noritake_disable_irq(unsigned int irq) | |||
59 | noritake_update_irq_hw(irq, cached_irq_mask &= ~(1 << (irq - 16))); | 59 | noritake_update_irq_hw(irq, cached_irq_mask &= ~(1 << (irq - 16))); |
60 | } | 60 | } |
61 | 61 | ||
62 | static unsigned int | ||
63 | noritake_startup_irq(unsigned int irq) | ||
64 | { | ||
65 | noritake_enable_irq(irq); | ||
66 | return 0; | ||
67 | } | ||
68 | |||
69 | static void | ||
70 | noritake_end_irq(unsigned int irq) | ||
71 | { | ||
72 | if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) | ||
73 | noritake_enable_irq(irq); | ||
74 | } | ||
75 | |||
76 | static struct irq_chip noritake_irq_type = { | 62 | static struct irq_chip noritake_irq_type = { |
77 | .name = "NORITAKE", | 63 | .name = "NORITAKE", |
78 | .startup = noritake_startup_irq, | 64 | .unmask = noritake_enable_irq, |
79 | .shutdown = noritake_disable_irq, | 65 | .mask = noritake_disable_irq, |
80 | .enable = noritake_enable_irq, | 66 | .mask_ack = noritake_disable_irq, |
81 | .disable = noritake_disable_irq, | ||
82 | .ack = noritake_disable_irq, | ||
83 | .end = noritake_end_irq, | ||
84 | }; | 67 | }; |
85 | 68 | ||
86 | static void | 69 | static void |
@@ -144,8 +127,8 @@ noritake_init_irq(void) | |||
144 | outw(0, 0x54c); | 127 | outw(0, 0x54c); |
145 | 128 | ||
146 | for (i = 16; i < 48; ++i) { | 129 | for (i = 16; i < 48; ++i) { |
147 | irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; | 130 | irq_to_desc(i)->status |= IRQ_LEVEL; |
148 | irq_desc[i].chip = &noritake_irq_type; | 131 | set_irq_chip_and_handler(i, &noritake_irq_type, handle_level_irq); |
149 | } | 132 | } |
150 | 133 | ||
151 | init_i8259a_irqs(); | 134 | init_i8259a_irqs(); |
diff --git a/arch/alpha/kernel/sys_rawhide.c b/arch/alpha/kernel/sys_rawhide.c index 26c322bf89e..6a51364dd1c 100644 --- a/arch/alpha/kernel/sys_rawhide.c +++ b/arch/alpha/kernel/sys_rawhide.c | |||
@@ -121,28 +121,11 @@ rawhide_mask_and_ack_irq(unsigned int irq) | |||
121 | spin_unlock(&rawhide_irq_lock); | 121 | spin_unlock(&rawhide_irq_lock); |
122 | } | 122 | } |
123 | 123 | ||
124 | static unsigned int | ||
125 | rawhide_startup_irq(unsigned int irq) | ||
126 | { | ||
127 | rawhide_enable_irq(irq); | ||
128 | return 0; | ||
129 | } | ||
130 | |||
131 | static void | ||
132 | rawhide_end_irq(unsigned int irq) | ||
133 | { | ||
134 | if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) | ||
135 | rawhide_enable_irq(irq); | ||
136 | } | ||
137 | |||
138 | static struct irq_chip rawhide_irq_type = { | 124 | static struct irq_chip rawhide_irq_type = { |
139 | .name = "RAWHIDE", | 125 | .name = "RAWHIDE", |
140 | .startup = rawhide_startup_irq, | 126 | .unmask = rawhide_enable_irq, |
141 | .shutdown = rawhide_disable_irq, | 127 | .mask = rawhide_disable_irq, |
142 | .enable = rawhide_enable_irq, | 128 | .mask_ack = rawhide_mask_and_ack_irq, |
143 | .disable = rawhide_disable_irq, | ||
144 | .ack = rawhide_mask_and_ack_irq, | ||
145 | .end = rawhide_end_irq, | ||
146 | }; | 129 | }; |
147 | 130 | ||
148 | static void | 131 | static void |
@@ -194,8 +177,8 @@ rawhide_init_irq(void) | |||
194 | } | 177 | } |
195 | 178 | ||
196 | for (i = 16; i < 128; ++i) { | 179 | for (i = 16; i < 128; ++i) { |
197 | irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; | 180 | irq_to_desc(i)->status |= IRQ_LEVEL; |
198 | irq_desc[i].chip = &rawhide_irq_type; | 181 | set_irq_chip_and_handler(i, &rawhide_irq_type, handle_level_irq); |
199 | } | 182 | } |
200 | 183 | ||
201 | init_i8259a_irqs(); | 184 | init_i8259a_irqs(); |
diff --git a/arch/alpha/kernel/sys_rx164.c b/arch/alpha/kernel/sys_rx164.c index be161129eab..89e7e37ec84 100644 --- a/arch/alpha/kernel/sys_rx164.c +++ b/arch/alpha/kernel/sys_rx164.c | |||
@@ -58,28 +58,11 @@ rx164_disable_irq(unsigned int irq) | |||
58 | rx164_update_irq_hw(cached_irq_mask &= ~(1UL << (irq - 16))); | 58 | rx164_update_irq_hw(cached_irq_mask &= ~(1UL << (irq - 16))); |
59 | } | 59 | } |
60 | 60 | ||
61 | static unsigned int | ||
62 | rx164_startup_irq(unsigned int irq) | ||
63 | { | ||
64 | rx164_enable_irq(irq); | ||
65 | return 0; | ||
66 | } | ||
67 | |||
68 | static void | ||
69 | rx164_end_irq(unsigned int irq) | ||
70 | { | ||
71 | if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) | ||
72 | rx164_enable_irq(irq); | ||
73 | } | ||
74 | |||
75 | static struct irq_chip rx164_irq_type = { | 61 | static struct irq_chip rx164_irq_type = { |
76 | .name = "RX164", | 62 | .name = "RX164", |
77 | .startup = rx164_startup_irq, | 63 | .unmask = rx164_enable_irq, |
78 | .shutdown = rx164_disable_irq, | 64 | .mask = rx164_disable_irq, |
79 | .enable = rx164_enable_irq, | 65 | .mask_ack = rx164_disable_irq, |
80 | .disable = rx164_disable_irq, | ||
81 | .ack = rx164_disable_irq, | ||
82 | .end = rx164_end_irq, | ||
83 | }; | 66 | }; |
84 | 67 | ||
85 | static void | 68 | static void |
@@ -116,8 +99,8 @@ rx164_init_irq(void) | |||
116 | 99 | ||
117 | rx164_update_irq_hw(0); | 100 | rx164_update_irq_hw(0); |
118 | for (i = 16; i < 40; ++i) { | 101 | for (i = 16; i < 40; ++i) { |
119 | irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; | 102 | irq_to_desc(i)->status |= IRQ_LEVEL; |
120 | irq_desc[i].chip = &rx164_irq_type; | 103 | set_irq_chip_and_handler(i, &rx164_irq_type, handle_level_irq); |
121 | } | 104 | } |
122 | 105 | ||
123 | init_i8259a_irqs(); | 106 | init_i8259a_irqs(); |
diff --git a/arch/alpha/kernel/sys_sable.c b/arch/alpha/kernel/sys_sable.c index b2abe27a23c..5c4423d1b06 100644 --- a/arch/alpha/kernel/sys_sable.c +++ b/arch/alpha/kernel/sys_sable.c | |||
@@ -474,20 +474,6 @@ sable_lynx_disable_irq(unsigned int irq) | |||
474 | #endif | 474 | #endif |
475 | } | 475 | } |
476 | 476 | ||
477 | static unsigned int | ||
478 | sable_lynx_startup_irq(unsigned int irq) | ||
479 | { | ||
480 | sable_lynx_enable_irq(irq); | ||
481 | return 0; | ||
482 | } | ||
483 | |||
484 | static void | ||
485 | sable_lynx_end_irq(unsigned int irq) | ||
486 | { | ||
487 | if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) | ||
488 | sable_lynx_enable_irq(irq); | ||
489 | } | ||
490 | |||
491 | static void | 477 | static void |
492 | sable_lynx_mask_and_ack_irq(unsigned int irq) | 478 | sable_lynx_mask_and_ack_irq(unsigned int irq) |
493 | { | 479 | { |
@@ -503,12 +489,9 @@ sable_lynx_mask_and_ack_irq(unsigned int irq) | |||
503 | 489 | ||
504 | static struct irq_chip sable_lynx_irq_type = { | 490 | static struct irq_chip sable_lynx_irq_type = { |
505 | .name = "SABLE/LYNX", | 491 | .name = "SABLE/LYNX", |
506 | .startup = sable_lynx_startup_irq, | 492 | .unmask = sable_lynx_enable_irq, |
507 | .shutdown = sable_lynx_disable_irq, | 493 | .mask = sable_lynx_disable_irq, |
508 | .enable = sable_lynx_enable_irq, | 494 | .mask_ack = sable_lynx_mask_and_ack_irq, |
509 | .disable = sable_lynx_disable_irq, | ||
510 | .ack = sable_lynx_mask_and_ack_irq, | ||
511 | .end = sable_lynx_end_irq, | ||
512 | }; | 495 | }; |
513 | 496 | ||
514 | static void | 497 | static void |
@@ -535,8 +518,9 @@ sable_lynx_init_irq(int nr_of_irqs) | |||
535 | long i; | 518 | long i; |
536 | 519 | ||
537 | for (i = 0; i < nr_of_irqs; ++i) { | 520 | for (i = 0; i < nr_of_irqs; ++i) { |
538 | irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; | 521 | irq_to_desc(i)->status |= IRQ_LEVEL; |
539 | irq_desc[i].chip = &sable_lynx_irq_type; | 522 | set_irq_chip_and_handler(i, &sable_lynx_irq_type, |
523 | handle_level_irq); | ||
540 | } | 524 | } |
541 | 525 | ||
542 | common_init_isa_dma(); | 526 | common_init_isa_dma(); |
diff --git a/arch/alpha/kernel/sys_takara.c b/arch/alpha/kernel/sys_takara.c index 4da596b6adb..f8a1e8a862f 100644 --- a/arch/alpha/kernel/sys_takara.c +++ b/arch/alpha/kernel/sys_takara.c | |||
@@ -60,28 +60,11 @@ takara_disable_irq(unsigned int irq) | |||
60 | takara_update_irq_hw(irq, mask); | 60 | takara_update_irq_hw(irq, mask); |
61 | } | 61 | } |
62 | 62 | ||
63 | static unsigned int | ||
64 | takara_startup_irq(unsigned int irq) | ||
65 | { | ||
66 | takara_enable_irq(irq); | ||
67 | return 0; /* never anything pending */ | ||
68 | } | ||
69 | |||
70 | static void | ||
71 | takara_end_irq(unsigned int irq) | ||
72 | { | ||
73 | if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) | ||
74 | takara_enable_irq(irq); | ||
75 | } | ||
76 | |||
77 | static struct irq_chip takara_irq_type = { | 63 | static struct irq_chip takara_irq_type = { |
78 | .name = "TAKARA", | 64 | .name = "TAKARA", |
79 | .startup = takara_startup_irq, | 65 | .unmask = takara_enable_irq, |
80 | .shutdown = takara_disable_irq, | 66 | .mask = takara_disable_irq, |
81 | .enable = takara_enable_irq, | 67 | .mask_ack = takara_disable_irq, |
82 | .disable = takara_disable_irq, | ||
83 | .ack = takara_disable_irq, | ||
84 | .end = takara_end_irq, | ||
85 | }; | 68 | }; |
86 | 69 | ||
87 | static void | 70 | static void |
@@ -153,8 +136,8 @@ takara_init_irq(void) | |||
153 | takara_update_irq_hw(i, -1); | 136 | takara_update_irq_hw(i, -1); |
154 | 137 | ||
155 | for (i = 16; i < 128; ++i) { | 138 | for (i = 16; i < 128; ++i) { |
156 | irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; | 139 | irq_to_desc(i)->status |= IRQ_LEVEL; |
157 | irq_desc[i].chip = &takara_irq_type; | 140 | set_irq_chip_and_handler(i, &takara_irq_type, handle_level_irq); |
158 | } | 141 | } |
159 | 142 | ||
160 | common_init_isa_dma(); | 143 | common_init_isa_dma(); |
diff --git a/arch/alpha/kernel/sys_titan.c b/arch/alpha/kernel/sys_titan.c index 9008d0f20c5..e02494bf5ef 100644 --- a/arch/alpha/kernel/sys_titan.c +++ b/arch/alpha/kernel/sys_titan.c | |||
@@ -129,20 +129,6 @@ titan_disable_irq(unsigned int irq) | |||
129 | spin_unlock(&titan_irq_lock); | 129 | spin_unlock(&titan_irq_lock); |
130 | } | 130 | } |
131 | 131 | ||
132 | static unsigned int | ||
133 | titan_startup_irq(unsigned int irq) | ||
134 | { | ||
135 | titan_enable_irq(irq); | ||
136 | return 0; /* never anything pending */ | ||
137 | } | ||
138 | |||
139 | static void | ||
140 | titan_end_irq(unsigned int irq) | ||
141 | { | ||
142 | if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) | ||
143 | titan_enable_irq(irq); | ||
144 | } | ||
145 | |||
146 | static void | 132 | static void |
147 | titan_cpu_set_irq_affinity(unsigned int irq, cpumask_t affinity) | 133 | titan_cpu_set_irq_affinity(unsigned int irq, cpumask_t affinity) |
148 | { | 134 | { |
@@ -189,20 +175,17 @@ init_titan_irqs(struct irq_chip * ops, int imin, int imax) | |||
189 | { | 175 | { |
190 | long i; | 176 | long i; |
191 | for (i = imin; i <= imax; ++i) { | 177 | for (i = imin; i <= imax; ++i) { |
192 | irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL; | 178 | irq_to_desc(i)->status |= IRQ_LEVEL; |
193 | irq_desc[i].chip = ops; | 179 | set_irq_chip_and_handler(i, ops, handle_level_irq); |
194 | } | 180 | } |
195 | } | 181 | } |
196 | 182 | ||
197 | static struct irq_chip titan_irq_type = { | 183 | static struct irq_chip titan_irq_type = { |
198 | .name = "TITAN", | 184 | .name = "TITAN", |
199 | .startup = titan_startup_irq, | 185 | .unmask = titan_enable_irq, |
200 | .shutdown = titan_disable_irq, | 186 | .mask = titan_disable_irq, |
201 | .enable = titan_enable_irq, | 187 | .mask_ack = titan_disable_irq, |
202 | .disable = titan_disable_irq, | 188 | .set_affinity = titan_set_irq_affinity, |
203 | .ack = titan_disable_irq, | ||
204 | .end = titan_end_irq, | ||
205 | .set_affinity = titan_set_irq_affinity, | ||
206 | }; | 189 | }; |
207 | 190 | ||
208 | static irqreturn_t | 191 | static irqreturn_t |
diff --git a/arch/alpha/kernel/sys_wildfire.c b/arch/alpha/kernel/sys_wildfire.c index 62fd972e18e..eec52594d41 100644 --- a/arch/alpha/kernel/sys_wildfire.c +++ b/arch/alpha/kernel/sys_wildfire.c | |||
@@ -139,32 +139,11 @@ wildfire_mask_and_ack_irq(unsigned int irq) | |||
139 | spin_unlock(&wildfire_irq_lock); | 139 | spin_unlock(&wildfire_irq_lock); |
140 | } | 140 | } |
141 | 141 | ||
142 | static unsigned int | ||
143 | wildfire_startup_irq(unsigned int irq) | ||
144 | { | ||
145 | wildfire_enable_irq(irq); | ||
146 | return 0; /* never anything pending */ | ||
147 | } | ||
148 | |||
149 | static void | ||
150 | wildfire_end_irq(unsigned int irq) | ||
151 | { | ||
152 | #if 0 | ||
153 | if (!irq_desc[irq].action) | ||
154 | printk("got irq %d\n", irq); | ||
155 | #endif | ||
156 | if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) | ||
157 | wildfire_enable_irq(irq); | ||
158 | } | ||
159 | |||
160 | static struct irq_chip wildfire_irq_type = { | 142 | static struct irq_chip wildfire_irq_type = { |
161 | .name = "WILDFIRE", | 143 | .name = "WILDFIRE", |
162 | .startup = wildfire_startup_irq, | 144 | .unmask = wildfire_enable_irq, |
163 | .shutdown = wildfire_disable_irq, | 145 | .mask = wildfire_disable_irq, |
164 | .enable = wildfire_enable_irq, | 146 | .mask_ack = wildfire_mask_and_ack_irq, |
165 | .disable = wildfire_disable_irq, | ||
166 | .ack = wildfire_mask_and_ack_irq, | ||
167 | .end = wildfire_end_irq, | ||
168 | }; | 147 | }; |
169 | 148 | ||
170 | static void __init | 149 | static void __init |
@@ -198,15 +177,18 @@ wildfire_init_irq_per_pca(int qbbno, int pcano) | |||
198 | for (i = 0; i < 16; ++i) { | 177 | for (i = 0; i < 16; ++i) { |
199 | if (i == 2) | 178 | if (i == 2) |
200 | continue; | 179 | continue; |
201 | irq_desc[i+irq_bias].status = IRQ_DISABLED | IRQ_LEVEL; | 180 | irq_to_desc(i+irq_bias)->status |= IRQ_LEVEL; |
202 | irq_desc[i+irq_bias].chip = &wildfire_irq_type; | 181 | set_irq_chip_and_handler(i+irq_bias, &wildfire_irq_type, |
182 | handle_level_irq); | ||
203 | } | 183 | } |
204 | 184 | ||
205 | irq_desc[36+irq_bias].status = IRQ_DISABLED | IRQ_LEVEL; | 185 | irq_to_desc(36+irq_bias)->status |= IRQ_LEVEL; |
206 | irq_desc[36+irq_bias].chip = &wildfire_irq_type; | 186 | set_irq_chip_and_handler(36+irq_bias, &wildfire_irq_type, |
187 | handle_level_irq); | ||
207 | for (i = 40; i < 64; ++i) { | 188 | for (i = 40; i < 64; ++i) { |
208 | irq_desc[i+irq_bias].status = IRQ_DISABLED | IRQ_LEVEL; | 189 | irq_to_desc(i+irq_bias)->status |= IRQ_LEVEL; |
209 | irq_desc[i+irq_bias].chip = &wildfire_irq_type; | 190 | set_irq_chip_and_handler(i+irq_bias, &wildfire_irq_type, |
191 | handle_level_irq); | ||
210 | } | 192 | } |
211 | 193 | ||
212 | setup_irq(32+irq_bias, &isa_enable); | 194 | setup_irq(32+irq_bias, &isa_enable); |
diff --git a/arch/alpha/lib/Makefile b/arch/alpha/lib/Makefile index 9b72c59c95b..c0a83ab62b7 100644 --- a/arch/alpha/lib/Makefile +++ b/arch/alpha/lib/Makefile | |||
@@ -2,8 +2,8 @@ | |||
2 | # Makefile for alpha-specific library files.. | 2 | # Makefile for alpha-specific library files.. |
3 | # | 3 | # |
4 | 4 | ||
5 | EXTRA_AFLAGS := $(KBUILD_CFLAGS) | 5 | asflags-y := $(KBUILD_CFLAGS) |
6 | EXTRA_CFLAGS := -Werror | 6 | ccflags-y := -Werror |
7 | 7 | ||
8 | # Many of these routines have implementations tuned for ev6. | 8 | # Many of these routines have implementations tuned for ev6. |
9 | # Choose them iff we're targeting ev6 specifically. | 9 | # Choose them iff we're targeting ev6 specifically. |
diff --git a/arch/alpha/math-emu/Makefile b/arch/alpha/math-emu/Makefile index 359ef087e69..7f467199524 100644 --- a/arch/alpha/math-emu/Makefile +++ b/arch/alpha/math-emu/Makefile | |||
@@ -2,7 +2,7 @@ | |||
2 | # Makefile for the FPU instruction emulation. | 2 | # Makefile for the FPU instruction emulation. |
3 | # | 3 | # |
4 | 4 | ||
5 | EXTRA_CFLAGS := -w | 5 | ccflags-y := -w |
6 | 6 | ||
7 | obj-$(CONFIG_MATHEMU) += math-emu.o | 7 | obj-$(CONFIG_MATHEMU) += math-emu.o |
8 | 8 | ||
diff --git a/arch/alpha/mm/Makefile b/arch/alpha/mm/Makefile index 09399c5386c..c993d3f93cf 100644 --- a/arch/alpha/mm/Makefile +++ b/arch/alpha/mm/Makefile | |||
@@ -2,7 +2,7 @@ | |||
2 | # Makefile for the linux alpha-specific parts of the memory manager. | 2 | # Makefile for the linux alpha-specific parts of the memory manager. |
3 | # | 3 | # |
4 | 4 | ||
5 | EXTRA_CFLAGS := -Werror | 5 | ccflags-y := -Werror |
6 | 6 | ||
7 | obj-y := init.o fault.o extable.o | 7 | obj-y := init.o fault.o extable.o |
8 | 8 | ||
diff --git a/arch/alpha/oprofile/Makefile b/arch/alpha/oprofile/Makefile index 4aa56247bdc..3473de751b0 100644 --- a/arch/alpha/oprofile/Makefile +++ b/arch/alpha/oprofile/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | EXTRA_CFLAGS := -Werror -Wno-sign-compare | 1 | ccflags-y := -Werror -Wno-sign-compare |
2 | 2 | ||
3 | obj-$(CONFIG_OPROFILE) += oprofile.o | 3 | obj-$(CONFIG_OPROFILE) += oprofile.o |
4 | 4 | ||
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index e2f80116759..5cff165b7eb 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -26,6 +26,8 @@ config ARM | |||
26 | select HAVE_REGS_AND_STACK_ACCESS_API | 26 | select HAVE_REGS_AND_STACK_ACCESS_API |
27 | select HAVE_HW_BREAKPOINT if (PERF_EVENTS && (CPU_V6 || CPU_V7)) | 27 | select HAVE_HW_BREAKPOINT if (PERF_EVENTS && (CPU_V6 || CPU_V7)) |
28 | select HAVE_C_RECORDMCOUNT | 28 | select HAVE_C_RECORDMCOUNT |
29 | select HAVE_GENERIC_HARDIRQS | ||
30 | select HAVE_SPARSE_IRQ | ||
29 | help | 31 | help |
30 | The ARM series is a line of low-power-consumption RISC chip designs | 32 | The ARM series is a line of low-power-consumption RISC chip designs |
31 | licensed by ARM Ltd and targeted at embedded applications and | 33 | licensed by ARM Ltd and targeted at embedded applications and |
@@ -97,10 +99,6 @@ config MCA | |||
97 | <file:Documentation/mca.txt> (and especially the web page given | 99 | <file:Documentation/mca.txt> (and especially the web page given |
98 | there) before attempting to build an MCA bus kernel. | 100 | there) before attempting to build an MCA bus kernel. |
99 | 101 | ||
100 | config GENERIC_HARDIRQS | ||
101 | bool | ||
102 | default y | ||
103 | |||
104 | config STACKTRACE_SUPPORT | 102 | config STACKTRACE_SUPPORT |
105 | bool | 103 | bool |
106 | default y | 104 | default y |
@@ -180,9 +178,6 @@ config FIQ | |||
180 | config ARCH_MTD_XIP | 178 | config ARCH_MTD_XIP |
181 | bool | 179 | bool |
182 | 180 | ||
183 | config GENERIC_HARDIRQS_NO__DO_IRQ | ||
184 | def_bool y | ||
185 | |||
186 | config ARM_L1_CACHE_SHIFT_6 | 181 | config ARM_L1_CACHE_SHIFT_6 |
187 | bool | 182 | bool |
188 | help | 183 | help |
@@ -368,7 +363,7 @@ config ARCH_MXS | |||
368 | bool "Freescale MXS-based" | 363 | bool "Freescale MXS-based" |
369 | select GENERIC_CLOCKEVENTS | 364 | select GENERIC_CLOCKEVENTS |
370 | select ARCH_REQUIRE_GPIOLIB | 365 | select ARCH_REQUIRE_GPIOLIB |
371 | select COMMON_CLKDEV | 366 | select CLKDEV_LOOKUP |
372 | help | 367 | help |
373 | Support for Freescale MXS-based family of processors | 368 | Support for Freescale MXS-based family of processors |
374 | 369 | ||
@@ -771,6 +766,7 @@ config ARCH_S5PV310 | |||
771 | select ARCH_SPARSEMEM_ENABLE | 766 | select ARCH_SPARSEMEM_ENABLE |
772 | select GENERIC_GPIO | 767 | select GENERIC_GPIO |
773 | select HAVE_CLK | 768 | select HAVE_CLK |
769 | select ARCH_HAS_CPUFREQ | ||
774 | select GENERIC_CLOCKEVENTS | 770 | select GENERIC_CLOCKEVENTS |
775 | select HAVE_S3C_RTC if RTC_CLASS | 771 | select HAVE_S3C_RTC if RTC_CLASS |
776 | select HAVE_S3C2410_I2C if I2C | 772 | select HAVE_S3C2410_I2C if I2C |
@@ -1281,7 +1277,7 @@ config SMP | |||
1281 | config SMP_ON_UP | 1277 | config SMP_ON_UP |
1282 | bool "Allow booting SMP kernel on uniprocessor systems (EXPERIMENTAL)" | 1278 | bool "Allow booting SMP kernel on uniprocessor systems (EXPERIMENTAL)" |
1283 | depends on EXPERIMENTAL | 1279 | depends on EXPERIMENTAL |
1284 | depends on SMP && !XIP | 1280 | depends on SMP && !XIP_KERNEL |
1285 | default y | 1281 | default y |
1286 | help | 1282 | help |
1287 | SMP kernels contain instructions which fail on non-SMP processors. | 1283 | SMP kernels contain instructions which fail on non-SMP processors. |
@@ -1452,15 +1448,6 @@ config HW_PERF_EVENTS | |||
1452 | Enable hardware performance counter support for perf events. If | 1448 | Enable hardware performance counter support for perf events. If |
1453 | disabled, perf events will use software events only. | 1449 | disabled, perf events will use software events only. |
1454 | 1450 | ||
1455 | config SPARSE_IRQ | ||
1456 | def_bool n | ||
1457 | help | ||
1458 | This enables support for sparse irqs. This is useful in general | ||
1459 | as most CPUs have a fairly sparse array of IRQ vectors, which | ||
1460 | the irq_desc then maps directly on to. Systems with a high | ||
1461 | number of off-chip IRQs will want to treat this as | ||
1462 | experimental until they have been independently verified. | ||
1463 | |||
1464 | source "mm/Kconfig" | 1451 | source "mm/Kconfig" |
1465 | 1452 | ||
1466 | config FORCE_MAX_ZONEORDER | 1453 | config FORCE_MAX_ZONEORDER |
diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c index 0b89ef00133..22437721115 100644 --- a/arch/arm/common/gic.c +++ b/arch/arm/common/gic.c | |||
@@ -50,57 +50,56 @@ struct gic_chip_data { | |||
50 | 50 | ||
51 | static struct gic_chip_data gic_data[MAX_GIC_NR] __read_mostly; | 51 | static struct gic_chip_data gic_data[MAX_GIC_NR] __read_mostly; |
52 | 52 | ||
53 | static inline void __iomem *gic_dist_base(unsigned int irq) | 53 | static inline void __iomem *gic_dist_base(struct irq_data *d) |
54 | { | 54 | { |
55 | struct gic_chip_data *gic_data = get_irq_chip_data(irq); | 55 | struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d); |
56 | return gic_data->dist_base; | 56 | return gic_data->dist_base; |
57 | } | 57 | } |
58 | 58 | ||
59 | static inline void __iomem *gic_cpu_base(unsigned int irq) | 59 | static inline void __iomem *gic_cpu_base(struct irq_data *d) |
60 | { | 60 | { |
61 | struct gic_chip_data *gic_data = get_irq_chip_data(irq); | 61 | struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d); |
62 | return gic_data->cpu_base; | 62 | return gic_data->cpu_base; |
63 | } | 63 | } |
64 | 64 | ||
65 | static inline unsigned int gic_irq(unsigned int irq) | 65 | static inline unsigned int gic_irq(struct irq_data *d) |
66 | { | 66 | { |
67 | struct gic_chip_data *gic_data = get_irq_chip_data(irq); | 67 | struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d); |
68 | return irq - gic_data->irq_offset; | 68 | return d->irq - gic_data->irq_offset; |
69 | } | 69 | } |
70 | 70 | ||
71 | /* | 71 | /* |
72 | * Routines to acknowledge, disable and enable interrupts | 72 | * Routines to acknowledge, disable and enable interrupts |
73 | */ | 73 | */ |
74 | static void gic_ack_irq(unsigned int irq) | 74 | static void gic_ack_irq(struct irq_data *d) |
75 | { | 75 | { |
76 | |||
77 | spin_lock(&irq_controller_lock); | 76 | spin_lock(&irq_controller_lock); |
78 | writel(gic_irq(irq), gic_cpu_base(irq) + GIC_CPU_EOI); | 77 | writel(gic_irq(d), gic_cpu_base(d) + GIC_CPU_EOI); |
79 | spin_unlock(&irq_controller_lock); | 78 | spin_unlock(&irq_controller_lock); |
80 | } | 79 | } |
81 | 80 | ||
82 | static void gic_mask_irq(unsigned int irq) | 81 | static void gic_mask_irq(struct irq_data *d) |
83 | { | 82 | { |
84 | u32 mask = 1 << (irq % 32); | 83 | u32 mask = 1 << (d->irq % 32); |
85 | 84 | ||
86 | spin_lock(&irq_controller_lock); | 85 | spin_lock(&irq_controller_lock); |
87 | writel(mask, gic_dist_base(irq) + GIC_DIST_ENABLE_CLEAR + (gic_irq(irq) / 32) * 4); | 86 | writel(mask, gic_dist_base(d) + GIC_DIST_ENABLE_CLEAR + (gic_irq(d) / 32) * 4); |
88 | spin_unlock(&irq_controller_lock); | 87 | spin_unlock(&irq_controller_lock); |
89 | } | 88 | } |
90 | 89 | ||
91 | static void gic_unmask_irq(unsigned int irq) | 90 | static void gic_unmask_irq(struct irq_data *d) |
92 | { | 91 | { |
93 | u32 mask = 1 << (irq % 32); | 92 | u32 mask = 1 << (d->irq % 32); |
94 | 93 | ||
95 | spin_lock(&irq_controller_lock); | 94 | spin_lock(&irq_controller_lock); |
96 | writel(mask, gic_dist_base(irq) + GIC_DIST_ENABLE_SET + (gic_irq(irq) / 32) * 4); | 95 | writel(mask, gic_dist_base(d) + GIC_DIST_ENABLE_SET + (gic_irq(d) / 32) * 4); |
97 | spin_unlock(&irq_controller_lock); | 96 | spin_unlock(&irq_controller_lock); |
98 | } | 97 | } |
99 | 98 | ||
100 | static int gic_set_type(unsigned int irq, unsigned int type) | 99 | static int gic_set_type(struct irq_data *d, unsigned int type) |
101 | { | 100 | { |
102 | void __iomem *base = gic_dist_base(irq); | 101 | void __iomem *base = gic_dist_base(d); |
103 | unsigned int gicirq = gic_irq(irq); | 102 | unsigned int gicirq = gic_irq(d); |
104 | u32 enablemask = 1 << (gicirq % 32); | 103 | u32 enablemask = 1 << (gicirq % 32); |
105 | u32 enableoff = (gicirq / 32) * 4; | 104 | u32 enableoff = (gicirq / 32) * 4; |
106 | u32 confmask = 0x2 << ((gicirq % 16) * 2); | 105 | u32 confmask = 0x2 << ((gicirq % 16) * 2); |
@@ -143,21 +142,22 @@ static int gic_set_type(unsigned int irq, unsigned int type) | |||
143 | } | 142 | } |
144 | 143 | ||
145 | #ifdef CONFIG_SMP | 144 | #ifdef CONFIG_SMP |
146 | static int gic_set_cpu(unsigned int irq, const struct cpumask *mask_val) | 145 | static int |
146 | gic_set_cpu(struct irq_data *d, const struct cpumask *mask_val, bool force) | ||
147 | { | 147 | { |
148 | void __iomem *reg = gic_dist_base(irq) + GIC_DIST_TARGET + (gic_irq(irq) & ~3); | 148 | void __iomem *reg = gic_dist_base(d) + GIC_DIST_TARGET + (gic_irq(d) & ~3); |
149 | unsigned int shift = (irq % 4) * 8; | 149 | unsigned int shift = (d->irq % 4) * 8; |
150 | unsigned int cpu = cpumask_first(mask_val); | 150 | unsigned int cpu = cpumask_first(mask_val); |
151 | u32 val; | 151 | u32 val; |
152 | struct irq_desc *desc; | 152 | struct irq_desc *desc; |
153 | 153 | ||
154 | spin_lock(&irq_controller_lock); | 154 | spin_lock(&irq_controller_lock); |
155 | desc = irq_to_desc(irq); | 155 | desc = irq_to_desc(d->irq); |
156 | if (desc == NULL) { | 156 | if (desc == NULL) { |
157 | spin_unlock(&irq_controller_lock); | 157 | spin_unlock(&irq_controller_lock); |
158 | return -EINVAL; | 158 | return -EINVAL; |
159 | } | 159 | } |
160 | desc->node = cpu; | 160 | d->node = cpu; |
161 | val = readl(reg) & ~(0xff << shift); | 161 | val = readl(reg) & ~(0xff << shift); |
162 | val |= 1 << (cpu + shift); | 162 | val |= 1 << (cpu + shift); |
163 | writel(val, reg); | 163 | writel(val, reg); |
@@ -175,7 +175,7 @@ static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc) | |||
175 | unsigned long status; | 175 | unsigned long status; |
176 | 176 | ||
177 | /* primary controller ack'ing */ | 177 | /* primary controller ack'ing */ |
178 | chip->ack(irq); | 178 | chip->irq_ack(&desc->irq_data); |
179 | 179 | ||
180 | spin_lock(&irq_controller_lock); | 180 | spin_lock(&irq_controller_lock); |
181 | status = readl(chip_data->cpu_base + GIC_CPU_INTACK); | 181 | status = readl(chip_data->cpu_base + GIC_CPU_INTACK); |
@@ -193,17 +193,17 @@ static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc) | |||
193 | 193 | ||
194 | out: | 194 | out: |
195 | /* primary controller unmasking */ | 195 | /* primary controller unmasking */ |
196 | chip->unmask(irq); | 196 | chip->irq_unmask(&desc->irq_data); |
197 | } | 197 | } |
198 | 198 | ||
199 | static struct irq_chip gic_chip = { | 199 | static struct irq_chip gic_chip = { |
200 | .name = "GIC", | 200 | .name = "GIC", |
201 | .ack = gic_ack_irq, | 201 | .irq_ack = gic_ack_irq, |
202 | .mask = gic_mask_irq, | 202 | .irq_mask = gic_mask_irq, |
203 | .unmask = gic_unmask_irq, | 203 | .irq_unmask = gic_unmask_irq, |
204 | .set_type = gic_set_type, | 204 | .irq_set_type = gic_set_type, |
205 | #ifdef CONFIG_SMP | 205 | #ifdef CONFIG_SMP |
206 | .set_affinity = gic_set_cpu, | 206 | .irq_set_affinity = gic_set_cpu, |
207 | #endif | 207 | #endif |
208 | }; | 208 | }; |
209 | 209 | ||
@@ -337,7 +337,7 @@ void __cpuinit gic_enable_ppi(unsigned int irq) | |||
337 | 337 | ||
338 | local_irq_save(flags); | 338 | local_irq_save(flags); |
339 | irq_to_desc(irq)->status |= IRQ_NOPROBE; | 339 | irq_to_desc(irq)->status |= IRQ_NOPROBE; |
340 | gic_unmask_irq(irq); | 340 | gic_unmask_irq(irq_get_irq_data(irq)); |
341 | local_irq_restore(flags); | 341 | local_irq_restore(flags); |
342 | } | 342 | } |
343 | 343 | ||
diff --git a/arch/arm/common/it8152.c b/arch/arm/common/it8152.c index 665ebf7e62a..fcddd48fe9d 100644 --- a/arch/arm/common/it8152.c +++ b/arch/arm/common/it8152.c | |||
@@ -31,8 +31,10 @@ | |||
31 | 31 | ||
32 | #define MAX_SLOTS 21 | 32 | #define MAX_SLOTS 21 |
33 | 33 | ||
34 | static void it8152_mask_irq(unsigned int irq) | 34 | static void it8152_mask_irq(struct irq_data *d) |
35 | { | 35 | { |
36 | unsigned int irq = d->irq; | ||
37 | |||
36 | if (irq >= IT8152_LD_IRQ(0)) { | 38 | if (irq >= IT8152_LD_IRQ(0)) { |
37 | __raw_writel((__raw_readl(IT8152_INTC_LDCNIMR) | | 39 | __raw_writel((__raw_readl(IT8152_INTC_LDCNIMR) | |
38 | (1 << (irq - IT8152_LD_IRQ(0)))), | 40 | (1 << (irq - IT8152_LD_IRQ(0)))), |
@@ -48,8 +50,10 @@ static void it8152_mask_irq(unsigned int irq) | |||
48 | } | 50 | } |
49 | } | 51 | } |
50 | 52 | ||
51 | static void it8152_unmask_irq(unsigned int irq) | 53 | static void it8152_unmask_irq(struct irq_data *d) |
52 | { | 54 | { |
55 | unsigned int irq = d->irq; | ||
56 | |||
53 | if (irq >= IT8152_LD_IRQ(0)) { | 57 | if (irq >= IT8152_LD_IRQ(0)) { |
54 | __raw_writel((__raw_readl(IT8152_INTC_LDCNIMR) & | 58 | __raw_writel((__raw_readl(IT8152_INTC_LDCNIMR) & |
55 | ~(1 << (irq - IT8152_LD_IRQ(0)))), | 59 | ~(1 << (irq - IT8152_LD_IRQ(0)))), |
@@ -67,9 +71,9 @@ static void it8152_unmask_irq(unsigned int irq) | |||
67 | 71 | ||
68 | static struct irq_chip it8152_irq_chip = { | 72 | static struct irq_chip it8152_irq_chip = { |
69 | .name = "it8152", | 73 | .name = "it8152", |
70 | .ack = it8152_mask_irq, | 74 | .irq_ack = it8152_mask_irq, |
71 | .mask = it8152_mask_irq, | 75 | .irq_mask = it8152_mask_irq, |
72 | .unmask = it8152_unmask_irq, | 76 | .irq_unmask = it8152_unmask_irq, |
73 | }; | 77 | }; |
74 | 78 | ||
75 | void it8152_init_irq(void) | 79 | void it8152_init_irq(void) |
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c index 9dff07c80dd..a026a6bf489 100644 --- a/arch/arm/common/locomo.c +++ b/arch/arm/common/locomo.c | |||
@@ -144,7 +144,7 @@ static void locomo_handler(unsigned int irq, struct irq_desc *desc) | |||
144 | int req, i; | 144 | int req, i; |
145 | 145 | ||
146 | /* Acknowledge the parent IRQ */ | 146 | /* Acknowledge the parent IRQ */ |
147 | desc->chip->ack(irq); | 147 | desc->irq_data.chip->irq_ack(&desc->irq_data); |
148 | 148 | ||
149 | /* check why this interrupt was generated */ | 149 | /* check why this interrupt was generated */ |
150 | req = locomo_readl(lchip->base + LOCOMO_ICR) & 0x0f00; | 150 | req = locomo_readl(lchip->base + LOCOMO_ICR) & 0x0f00; |
@@ -161,33 +161,33 @@ static void locomo_handler(unsigned int irq, struct irq_desc *desc) | |||
161 | } | 161 | } |
162 | } | 162 | } |
163 | 163 | ||
164 | static void locomo_ack_irq(unsigned int irq) | 164 | static void locomo_ack_irq(struct irq_data *d) |
165 | { | 165 | { |
166 | } | 166 | } |
167 | 167 | ||
168 | static void locomo_mask_irq(unsigned int irq) | 168 | static void locomo_mask_irq(struct irq_data *d) |
169 | { | 169 | { |
170 | struct locomo *lchip = get_irq_chip_data(irq); | 170 | struct locomo *lchip = irq_data_get_irq_chip_data(d); |
171 | unsigned int r; | 171 | unsigned int r; |
172 | r = locomo_readl(lchip->base + LOCOMO_ICR); | 172 | r = locomo_readl(lchip->base + LOCOMO_ICR); |
173 | r &= ~(0x0010 << (irq - lchip->irq_base)); | 173 | r &= ~(0x0010 << (d->irq - lchip->irq_base)); |
174 | locomo_writel(r, lchip->base + LOCOMO_ICR); | 174 | locomo_writel(r, lchip->base + LOCOMO_ICR); |
175 | } | 175 | } |
176 | 176 | ||
177 | static void locomo_unmask_irq(unsigned int irq) | 177 | static void locomo_unmask_irq(struct irq_data *d) |
178 | { | 178 | { |
179 | struct locomo *lchip = get_irq_chip_data(irq); | 179 | struct locomo *lchip = irq_data_get_irq_chip_data(d); |
180 | unsigned int r; | 180 | unsigned int r; |
181 | r = locomo_readl(lchip->base + LOCOMO_ICR); | 181 | r = locomo_readl(lchip->base + LOCOMO_ICR); |
182 | r |= (0x0010 << (irq - lchip->irq_base)); | 182 | r |= (0x0010 << (d->irq - lchip->irq_base)); |
183 | locomo_writel(r, lchip->base + LOCOMO_ICR); | 183 | locomo_writel(r, lchip->base + LOCOMO_ICR); |
184 | } | 184 | } |
185 | 185 | ||
186 | static struct irq_chip locomo_chip = { | 186 | static struct irq_chip locomo_chip = { |
187 | .name = "LOCOMO", | 187 | .name = "LOCOMO", |
188 | .ack = locomo_ack_irq, | 188 | .irq_ack = locomo_ack_irq, |
189 | .mask = locomo_mask_irq, | 189 | .irq_mask = locomo_mask_irq, |
190 | .unmask = locomo_unmask_irq, | 190 | .irq_unmask = locomo_unmask_irq, |
191 | }; | 191 | }; |
192 | 192 | ||
193 | static void locomo_setup_irq(struct locomo *lchip) | 193 | static void locomo_setup_irq(struct locomo *lchip) |
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index c0258a8c103..eb9796b0dab 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c | |||
@@ -210,7 +210,7 @@ sa1111_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
210 | 210 | ||
211 | sa1111_writel(stat0, mapbase + SA1111_INTSTATCLR0); | 211 | sa1111_writel(stat0, mapbase + SA1111_INTSTATCLR0); |
212 | 212 | ||
213 | desc->chip->ack(irq); | 213 | desc->irq_data.chip->irq_ack(&desc->irq_data); |
214 | 214 | ||
215 | sa1111_writel(stat1, mapbase + SA1111_INTSTATCLR1); | 215 | sa1111_writel(stat1, mapbase + SA1111_INTSTATCLR1); |
216 | 216 | ||
@@ -228,35 +228,35 @@ sa1111_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
228 | generic_handle_irq(i + sachip->irq_base); | 228 | generic_handle_irq(i + sachip->irq_base); |
229 | 229 | ||
230 | /* For level-based interrupts */ | 230 | /* For level-based interrupts */ |
231 | desc->chip->unmask(irq); | 231 | desc->irq_data.chip->irq_unmask(&desc->irq_data); |
232 | } | 232 | } |
233 | 233 | ||
234 | #define SA1111_IRQMASK_LO(x) (1 << (x - sachip->irq_base)) | 234 | #define SA1111_IRQMASK_LO(x) (1 << (x - sachip->irq_base)) |
235 | #define SA1111_IRQMASK_HI(x) (1 << (x - sachip->irq_base - 32)) | 235 | #define SA1111_IRQMASK_HI(x) (1 << (x - sachip->irq_base - 32)) |
236 | 236 | ||
237 | static void sa1111_ack_irq(unsigned int irq) | 237 | static void sa1111_ack_irq(struct irq_data *d) |
238 | { | 238 | { |
239 | } | 239 | } |
240 | 240 | ||
241 | static void sa1111_mask_lowirq(unsigned int irq) | 241 | static void sa1111_mask_lowirq(struct irq_data *d) |
242 | { | 242 | { |
243 | struct sa1111 *sachip = get_irq_chip_data(irq); | 243 | struct sa1111 *sachip = irq_data_get_irq_chip_data(d); |
244 | void __iomem *mapbase = sachip->base + SA1111_INTC; | 244 | void __iomem *mapbase = sachip->base + SA1111_INTC; |
245 | unsigned long ie0; | 245 | unsigned long ie0; |
246 | 246 | ||
247 | ie0 = sa1111_readl(mapbase + SA1111_INTEN0); | 247 | ie0 = sa1111_readl(mapbase + SA1111_INTEN0); |
248 | ie0 &= ~SA1111_IRQMASK_LO(irq); | 248 | ie0 &= ~SA1111_IRQMASK_LO(d->irq); |
249 | writel(ie0, mapbase + SA1111_INTEN0); | 249 | writel(ie0, mapbase + SA1111_INTEN0); |
250 | } | 250 | } |
251 | 251 | ||
252 | static void sa1111_unmask_lowirq(unsigned int irq) | 252 | static void sa1111_unmask_lowirq(struct irq_data *d) |
253 | { | 253 | { |
254 | struct sa1111 *sachip = get_irq_chip_data(irq); | 254 | struct sa1111 *sachip = irq_data_get_irq_chip_data(d); |
255 | void __iomem *mapbase = sachip->base + SA1111_INTC; | 255 | void __iomem *mapbase = sachip->base + SA1111_INTC; |
256 | unsigned long ie0; | 256 | unsigned long ie0; |
257 | 257 | ||
258 | ie0 = sa1111_readl(mapbase + SA1111_INTEN0); | 258 | ie0 = sa1111_readl(mapbase + SA1111_INTEN0); |
259 | ie0 |= SA1111_IRQMASK_LO(irq); | 259 | ie0 |= SA1111_IRQMASK_LO(d->irq); |
260 | sa1111_writel(ie0, mapbase + SA1111_INTEN0); | 260 | sa1111_writel(ie0, mapbase + SA1111_INTEN0); |
261 | } | 261 | } |
262 | 262 | ||
@@ -267,11 +267,11 @@ static void sa1111_unmask_lowirq(unsigned int irq) | |||
267 | * be triggered. In fact, its very difficult, if not impossible to get | 267 | * be triggered. In fact, its very difficult, if not impossible to get |
268 | * INTSET to re-trigger the interrupt. | 268 | * INTSET to re-trigger the interrupt. |
269 | */ | 269 | */ |
270 | static int sa1111_retrigger_lowirq(unsigned int irq) | 270 | static int sa1111_retrigger_lowirq(struct irq_data *d) |
271 | { | 271 | { |
272 | struct sa1111 *sachip = get_irq_chip_data(irq); | 272 | struct sa1111 *sachip = irq_data_get_irq_chip_data(d); |
273 | void __iomem *mapbase = sachip->base + SA1111_INTC; | 273 | void __iomem *mapbase = sachip->base + SA1111_INTC; |
274 | unsigned int mask = SA1111_IRQMASK_LO(irq); | 274 | unsigned int mask = SA1111_IRQMASK_LO(d->irq); |
275 | unsigned long ip0; | 275 | unsigned long ip0; |
276 | int i; | 276 | int i; |
277 | 277 | ||
@@ -279,21 +279,21 @@ static int sa1111_retrigger_lowirq(unsigned int irq) | |||
279 | for (i = 0; i < 8; i++) { | 279 | for (i = 0; i < 8; i++) { |
280 | sa1111_writel(ip0 ^ mask, mapbase + SA1111_INTPOL0); | 280 | sa1111_writel(ip0 ^ mask, mapbase + SA1111_INTPOL0); |
281 | sa1111_writel(ip0, mapbase + SA1111_INTPOL0); | 281 | sa1111_writel(ip0, mapbase + SA1111_INTPOL0); |
282 | if (sa1111_readl(mapbase + SA1111_INTSTATCLR1) & mask) | 282 | if (sa1111_readl(mapbase + SA1111_INTSTATCLR0) & mask) |
283 | break; | 283 | break; |
284 | } | 284 | } |
285 | 285 | ||
286 | if (i == 8) | 286 | if (i == 8) |
287 | printk(KERN_ERR "Danger Will Robinson: failed to " | 287 | printk(KERN_ERR "Danger Will Robinson: failed to " |
288 | "re-trigger IRQ%d\n", irq); | 288 | "re-trigger IRQ%d\n", d->irq); |
289 | return i == 8 ? -1 : 0; | 289 | return i == 8 ? -1 : 0; |
290 | } | 290 | } |
291 | 291 | ||
292 | static int sa1111_type_lowirq(unsigned int irq, unsigned int flags) | 292 | static int sa1111_type_lowirq(struct irq_data *d, unsigned int flags) |
293 | { | 293 | { |
294 | struct sa1111 *sachip = get_irq_chip_data(irq); | 294 | struct sa1111 *sachip = irq_data_get_irq_chip_data(d); |
295 | void __iomem *mapbase = sachip->base + SA1111_INTC; | 295 | void __iomem *mapbase = sachip->base + SA1111_INTC; |
296 | unsigned int mask = SA1111_IRQMASK_LO(irq); | 296 | unsigned int mask = SA1111_IRQMASK_LO(d->irq); |
297 | unsigned long ip0; | 297 | unsigned long ip0; |
298 | 298 | ||
299 | if (flags == IRQ_TYPE_PROBE) | 299 | if (flags == IRQ_TYPE_PROBE) |
@@ -313,11 +313,11 @@ static int sa1111_type_lowirq(unsigned int irq, unsigned int flags) | |||
313 | return 0; | 313 | return 0; |
314 | } | 314 | } |
315 | 315 | ||
316 | static int sa1111_wake_lowirq(unsigned int irq, unsigned int on) | 316 | static int sa1111_wake_lowirq(struct irq_data *d, unsigned int on) |
317 | { | 317 | { |
318 | struct sa1111 *sachip = get_irq_chip_data(irq); | 318 | struct sa1111 *sachip = irq_data_get_irq_chip_data(d); |
319 | void __iomem *mapbase = sachip->base + SA1111_INTC; | 319 | void __iomem *mapbase = sachip->base + SA1111_INTC; |
320 | unsigned int mask = SA1111_IRQMASK_LO(irq); | 320 | unsigned int mask = SA1111_IRQMASK_LO(d->irq); |
321 | unsigned long we0; | 321 | unsigned long we0; |
322 | 322 | ||
323 | we0 = sa1111_readl(mapbase + SA1111_WAKEEN0); | 323 | we0 = sa1111_readl(mapbase + SA1111_WAKEEN0); |
@@ -332,33 +332,33 @@ static int sa1111_wake_lowirq(unsigned int irq, unsigned int on) | |||
332 | 332 | ||
333 | static struct irq_chip sa1111_low_chip = { | 333 | static struct irq_chip sa1111_low_chip = { |
334 | .name = "SA1111-l", | 334 | .name = "SA1111-l", |
335 | .ack = sa1111_ack_irq, | 335 | .irq_ack = sa1111_ack_irq, |
336 | .mask = sa1111_mask_lowirq, | 336 | .irq_mask = sa1111_mask_lowirq, |
337 | .unmask = sa1111_unmask_lowirq, | 337 | .irq_unmask = sa1111_unmask_lowirq, |
338 | .retrigger = sa1111_retrigger_lowirq, | 338 | .irq_retrigger = sa1111_retrigger_lowirq, |
339 | .set_type = sa1111_type_lowirq, | 339 | .irq_set_type = sa1111_type_lowirq, |
340 | .set_wake = sa1111_wake_lowirq, | 340 | .irq_set_wake = sa1111_wake_lowirq, |
341 | }; | 341 | }; |
342 | 342 | ||
343 | static void sa1111_mask_highirq(unsigned int irq) | 343 | static void sa1111_mask_highirq(struct irq_data *d) |
344 | { | 344 | { |
345 | struct sa1111 *sachip = get_irq_chip_data(irq); | 345 | struct sa1111 *sachip = irq_data_get_irq_chip_data(d); |
346 | void __iomem *mapbase = sachip->base + SA1111_INTC; | 346 | void __iomem *mapbase = sachip->base + SA1111_INTC; |
347 | unsigned long ie1; | 347 | unsigned long ie1; |
348 | 348 | ||
349 | ie1 = sa1111_readl(mapbase + SA1111_INTEN1); | 349 | ie1 = sa1111_readl(mapbase + SA1111_INTEN1); |
350 | ie1 &= ~SA1111_IRQMASK_HI(irq); | 350 | ie1 &= ~SA1111_IRQMASK_HI(d->irq); |
351 | sa1111_writel(ie1, mapbase + SA1111_INTEN1); | 351 | sa1111_writel(ie1, mapbase + SA1111_INTEN1); |
352 | } | 352 | } |
353 | 353 | ||
354 | static void sa1111_unmask_highirq(unsigned int irq) | 354 | static void sa1111_unmask_highirq(struct irq_data *d) |
355 | { | 355 | { |
356 | struct sa1111 *sachip = get_irq_chip_data(irq); | 356 | struct sa1111 *sachip = irq_data_get_irq_chip_data(d); |
357 | void __iomem *mapbase = sachip->base + SA1111_INTC; | 357 | void __iomem *mapbase = sachip->base + SA1111_INTC; |
358 | unsigned long ie1; | 358 | unsigned long ie1; |
359 | 359 | ||
360 | ie1 = sa1111_readl(mapbase + SA1111_INTEN1); | 360 | ie1 = sa1111_readl(mapbase + SA1111_INTEN1); |
361 | ie1 |= SA1111_IRQMASK_HI(irq); | 361 | ie1 |= SA1111_IRQMASK_HI(d->irq); |
362 | sa1111_writel(ie1, mapbase + SA1111_INTEN1); | 362 | sa1111_writel(ie1, mapbase + SA1111_INTEN1); |
363 | } | 363 | } |
364 | 364 | ||
@@ -369,11 +369,11 @@ static void sa1111_unmask_highirq(unsigned int irq) | |||
369 | * be triggered. In fact, its very difficult, if not impossible to get | 369 | * be triggered. In fact, its very difficult, if not impossible to get |
370 | * INTSET to re-trigger the interrupt. | 370 | * INTSET to re-trigger the interrupt. |
371 | */ | 371 | */ |
372 | static int sa1111_retrigger_highirq(unsigned int irq) | 372 | static int sa1111_retrigger_highirq(struct irq_data *d) |
373 | { | 373 | { |
374 | struct sa1111 *sachip = get_irq_chip_data(irq); | 374 | struct sa1111 *sachip = irq_data_get_irq_chip_data(d); |
375 | void __iomem *mapbase = sachip->base + SA1111_INTC; | 375 | void __iomem *mapbase = sachip->base + SA1111_INTC; |
376 | unsigned int mask = SA1111_IRQMASK_HI(irq); | 376 | unsigned int mask = SA1111_IRQMASK_HI(d->irq); |
377 | unsigned long ip1; | 377 | unsigned long ip1; |
378 | int i; | 378 | int i; |
379 | 379 | ||
@@ -387,15 +387,15 @@ static int sa1111_retrigger_highirq(unsigned int irq) | |||
387 | 387 | ||
388 | if (i == 8) | 388 | if (i == 8) |
389 | printk(KERN_ERR "Danger Will Robinson: failed to " | 389 | printk(KERN_ERR "Danger Will Robinson: failed to " |
390 | "re-trigger IRQ%d\n", irq); | 390 | "re-trigger IRQ%d\n", d->irq); |
391 | return i == 8 ? -1 : 0; | 391 | return i == 8 ? -1 : 0; |
392 | } | 392 | } |
393 | 393 | ||
394 | static int sa1111_type_highirq(unsigned int irq, unsigned int flags) | 394 | static int sa1111_type_highirq(struct irq_data *d, unsigned int flags) |
395 | { | 395 | { |
396 | struct sa1111 *sachip = get_irq_chip_data(irq); | 396 | struct sa1111 *sachip = irq_data_get_irq_chip_data(d); |
397 | void __iomem *mapbase = sachip->base + SA1111_INTC; | 397 | void __iomem *mapbase = sachip->base + SA1111_INTC; |
398 | unsigned int mask = SA1111_IRQMASK_HI(irq); | 398 | unsigned int mask = SA1111_IRQMASK_HI(d->irq); |
399 | unsigned long ip1; | 399 | unsigned long ip1; |
400 | 400 | ||
401 | if (flags == IRQ_TYPE_PROBE) | 401 | if (flags == IRQ_TYPE_PROBE) |
@@ -415,11 +415,11 @@ static int sa1111_type_highirq(unsigned int irq, unsigned int flags) | |||
415 | return 0; | 415 | return 0; |
416 | } | 416 | } |
417 | 417 | ||
418 | static int sa1111_wake_highirq(unsigned int irq, unsigned int on) | 418 | static int sa1111_wake_highirq(struct irq_data *d, unsigned int on) |
419 | { | 419 | { |
420 | struct sa1111 *sachip = get_irq_chip_data(irq); | 420 | struct sa1111 *sachip = irq_data_get_irq_chip_data(d); |
421 | void __iomem *mapbase = sachip->base + SA1111_INTC; | 421 | void __iomem *mapbase = sachip->base + SA1111_INTC; |
422 | unsigned int mask = SA1111_IRQMASK_HI(irq); | 422 | unsigned int mask = SA1111_IRQMASK_HI(d->irq); |
423 | unsigned long we1; | 423 | unsigned long we1; |
424 | 424 | ||
425 | we1 = sa1111_readl(mapbase + SA1111_WAKEEN1); | 425 | we1 = sa1111_readl(mapbase + SA1111_WAKEEN1); |
@@ -434,12 +434,12 @@ static int sa1111_wake_highirq(unsigned int irq, unsigned int on) | |||
434 | 434 | ||
435 | static struct irq_chip sa1111_high_chip = { | 435 | static struct irq_chip sa1111_high_chip = { |
436 | .name = "SA1111-h", | 436 | .name = "SA1111-h", |
437 | .ack = sa1111_ack_irq, | 437 | .irq_ack = sa1111_ack_irq, |
438 | .mask = sa1111_mask_highirq, | 438 | .irq_mask = sa1111_mask_highirq, |
439 | .unmask = sa1111_unmask_highirq, | 439 | .irq_unmask = sa1111_unmask_highirq, |
440 | .retrigger = sa1111_retrigger_highirq, | 440 | .irq_retrigger = sa1111_retrigger_highirq, |
441 | .set_type = sa1111_type_highirq, | 441 | .irq_set_type = sa1111_type_highirq, |
442 | .set_wake = sa1111_wake_highirq, | 442 | .irq_set_wake = sa1111_wake_highirq, |
443 | }; | 443 | }; |
444 | 444 | ||
445 | static void sa1111_setup_irq(struct sa1111 *sachip) | 445 | static void sa1111_setup_irq(struct sa1111 *sachip) |
diff --git a/arch/arm/common/vic.c b/arch/arm/common/vic.c index cb660bc54d7..ae5fe7292e0 100644 --- a/arch/arm/common/vic.c +++ b/arch/arm/common/vic.c | |||
@@ -204,26 +204,26 @@ static void __init vic_pm_register(void __iomem *base, unsigned int irq, u32 res | |||
204 | static inline void vic_pm_register(void __iomem *base, unsigned int irq, u32 arg1) { } | 204 | static inline void vic_pm_register(void __iomem *base, unsigned int irq, u32 arg1) { } |
205 | #endif /* CONFIG_PM */ | 205 | #endif /* CONFIG_PM */ |
206 | 206 | ||
207 | static void vic_ack_irq(unsigned int irq) | 207 | static void vic_ack_irq(struct irq_data *d) |
208 | { | 208 | { |
209 | void __iomem *base = get_irq_chip_data(irq); | 209 | void __iomem *base = irq_data_get_irq_chip_data(d); |
210 | irq &= 31; | 210 | unsigned int irq = d->irq & 31; |
211 | writel(1 << irq, base + VIC_INT_ENABLE_CLEAR); | 211 | writel(1 << irq, base + VIC_INT_ENABLE_CLEAR); |
212 | /* moreover, clear the soft-triggered, in case it was the reason */ | 212 | /* moreover, clear the soft-triggered, in case it was the reason */ |
213 | writel(1 << irq, base + VIC_INT_SOFT_CLEAR); | 213 | writel(1 << irq, base + VIC_INT_SOFT_CLEAR); |
214 | } | 214 | } |
215 | 215 | ||
216 | static void vic_mask_irq(unsigned int irq) | 216 | static void vic_mask_irq(struct irq_data *d) |
217 | { | 217 | { |
218 | void __iomem *base = get_irq_chip_data(irq); | 218 | void __iomem *base = irq_data_get_irq_chip_data(d); |
219 | irq &= 31; | 219 | unsigned int irq = d->irq & 31; |
220 | writel(1 << irq, base + VIC_INT_ENABLE_CLEAR); | 220 | writel(1 << irq, base + VIC_INT_ENABLE_CLEAR); |
221 | } | 221 | } |
222 | 222 | ||
223 | static void vic_unmask_irq(unsigned int irq) | 223 | static void vic_unmask_irq(struct irq_data *d) |
224 | { | 224 | { |
225 | void __iomem *base = get_irq_chip_data(irq); | 225 | void __iomem *base = irq_data_get_irq_chip_data(d); |
226 | irq &= 31; | 226 | unsigned int irq = d->irq & 31; |
227 | writel(1 << irq, base + VIC_INT_ENABLE); | 227 | writel(1 << irq, base + VIC_INT_ENABLE); |
228 | } | 228 | } |
229 | 229 | ||
@@ -242,10 +242,10 @@ static struct vic_device *vic_from_irq(unsigned int irq) | |||
242 | return NULL; | 242 | return NULL; |
243 | } | 243 | } |
244 | 244 | ||
245 | static int vic_set_wake(unsigned int irq, unsigned int on) | 245 | static int vic_set_wake(struct irq_data *d, unsigned int on) |
246 | { | 246 | { |
247 | struct vic_device *v = vic_from_irq(irq); | 247 | struct vic_device *v = vic_from_irq(d->irq); |
248 | unsigned int off = irq & 31; | 248 | unsigned int off = d->irq & 31; |
249 | u32 bit = 1 << off; | 249 | u32 bit = 1 << off; |
250 | 250 | ||
251 | if (!v) | 251 | if (!v) |
@@ -267,10 +267,10 @@ static int vic_set_wake(unsigned int irq, unsigned int on) | |||
267 | 267 | ||
268 | static struct irq_chip vic_chip = { | 268 | static struct irq_chip vic_chip = { |
269 | .name = "VIC", | 269 | .name = "VIC", |
270 | .ack = vic_ack_irq, | 270 | .irq_ack = vic_ack_irq, |
271 | .mask = vic_mask_irq, | 271 | .irq_mask = vic_mask_irq, |
272 | .unmask = vic_unmask_irq, | 272 | .irq_unmask = vic_unmask_irq, |
273 | .set_wake = vic_set_wake, | 273 | .irq_set_wake = vic_set_wake, |
274 | }; | 274 | }; |
275 | 275 | ||
276 | static void __init vic_disable(void __iomem *base) | 276 | static void __init vic_disable(void __iomem *base) |
diff --git a/arch/arm/configs/ag5evm_defconfig b/arch/arm/configs/ag5evm_defconfig index 2b9cf56db36..212ead354a6 100644 --- a/arch/arm/configs/ag5evm_defconfig +++ b/arch/arm/configs/ag5evm_defconfig | |||
@@ -10,7 +10,7 @@ CONFIG_NAMESPACES=y | |||
10 | # CONFIG_PID_NS is not set | 10 | # CONFIG_PID_NS is not set |
11 | CONFIG_BLK_DEV_INITRD=y | 11 | CONFIG_BLK_DEV_INITRD=y |
12 | CONFIG_INITRAMFS_SOURCE="" | 12 | CONFIG_INITRAMFS_SOURCE="" |
13 | CONFIG_EMBEDDED=y | 13 | CONFIG_EXPERT=y |
14 | CONFIG_SLAB=y | 14 | CONFIG_SLAB=y |
15 | # CONFIG_BLK_DEV_BSG is not set | 15 | # CONFIG_BLK_DEV_BSG is not set |
16 | # CONFIG_IOSCHED_DEADLINE is not set | 16 | # CONFIG_IOSCHED_DEADLINE is not set |
diff --git a/arch/arm/configs/am200epdkit_defconfig b/arch/arm/configs/am200epdkit_defconfig index 5536c488dd0..f0dea52e49c 100644 --- a/arch/arm/configs/am200epdkit_defconfig +++ b/arch/arm/configs/am200epdkit_defconfig | |||
@@ -3,7 +3,7 @@ CONFIG_LOCALVERSION="gum" | |||
3 | # CONFIG_SWAP is not set | 3 | # CONFIG_SWAP is not set |
4 | CONFIG_SYSVIPC=y | 4 | CONFIG_SYSVIPC=y |
5 | CONFIG_SYSFS_DEPRECATED_V2=y | 5 | CONFIG_SYSFS_DEPRECATED_V2=y |
6 | CONFIG_EMBEDDED=y | 6 | CONFIG_EXPERT=y |
7 | # CONFIG_SYSCTL_SYSCALL is not set | 7 | # CONFIG_SYSCTL_SYSCALL is not set |
8 | # CONFIG_EPOLL is not set | 8 | # CONFIG_EPOLL is not set |
9 | # CONFIG_SHMEM is not set | 9 | # CONFIG_SHMEM is not set |
diff --git a/arch/arm/configs/at572d940hfek_defconfig b/arch/arm/configs/at572d940hfek_defconfig index 695e32d4fb5..1b1158ae8f8 100644 --- a/arch/arm/configs/at572d940hfek_defconfig +++ b/arch/arm/configs/at572d940hfek_defconfig | |||
@@ -17,7 +17,7 @@ CONFIG_SYSFS_DEPRECATED_V2=y | |||
17 | CONFIG_RELAY=y | 17 | CONFIG_RELAY=y |
18 | CONFIG_BLK_DEV_INITRD=y | 18 | CONFIG_BLK_DEV_INITRD=y |
19 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 19 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
20 | CONFIG_EMBEDDED=y | 20 | CONFIG_EXPERT=y |
21 | CONFIG_SLAB=y | 21 | CONFIG_SLAB=y |
22 | CONFIG_PROFILING=y | 22 | CONFIG_PROFILING=y |
23 | CONFIG_OPROFILE=m | 23 | CONFIG_OPROFILE=m |
diff --git a/arch/arm/configs/badge4_defconfig b/arch/arm/configs/badge4_defconfig index 3a1ad15a779..5b54abbeb0b 100644 --- a/arch/arm/configs/badge4_defconfig +++ b/arch/arm/configs/badge4_defconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | 1 | CONFIG_EXPERIMENTAL=y |
2 | CONFIG_LOG_BUF_SHIFT=14 | 2 | CONFIG_LOG_BUF_SHIFT=14 |
3 | CONFIG_EMBEDDED=y | 3 | CONFIG_EXPERT=y |
4 | CONFIG_MODULES=y | 4 | CONFIG_MODULES=y |
5 | CONFIG_MODVERSIONS=y | 5 | CONFIG_MODVERSIONS=y |
6 | CONFIG_ARCH_SA1100=y | 6 | CONFIG_ARCH_SA1100=y |
diff --git a/arch/arm/configs/bcmring_defconfig b/arch/arm/configs/bcmring_defconfig index 75984cd1e23..795374d48f8 100644 --- a/arch/arm/configs/bcmring_defconfig +++ b/arch/arm/configs/bcmring_defconfig | |||
@@ -2,7 +2,7 @@ CONFIG_EXPERIMENTAL=y | |||
2 | # CONFIG_LOCALVERSION_AUTO is not set | 2 | # CONFIG_LOCALVERSION_AUTO is not set |
3 | # CONFIG_SWAP is not set | 3 | # CONFIG_SWAP is not set |
4 | CONFIG_SYSVIPC=y | 4 | CONFIG_SYSVIPC=y |
5 | CONFIG_EMBEDDED=y | 5 | CONFIG_EXPERT=y |
6 | CONFIG_KALLSYMS_EXTRA_PASS=y | 6 | CONFIG_KALLSYMS_EXTRA_PASS=y |
7 | # CONFIG_HOTPLUG is not set | 7 | # CONFIG_HOTPLUG is not set |
8 | # CONFIG_ELF_CORE is not set | 8 | # CONFIG_ELF_CORE is not set |
diff --git a/arch/arm/configs/cm_x2xx_defconfig b/arch/arm/configs/cm_x2xx_defconfig index dcfbcf3b6c3..a93ff8da5ba 100644 --- a/arch/arm/configs/cm_x2xx_defconfig +++ b/arch/arm/configs/cm_x2xx_defconfig | |||
@@ -6,7 +6,7 @@ CONFIG_IKCONFIG_PROC=y | |||
6 | CONFIG_LOG_BUF_SHIFT=14 | 6 | CONFIG_LOG_BUF_SHIFT=14 |
7 | CONFIG_SYSFS_DEPRECATED_V2=y | 7 | CONFIG_SYSFS_DEPRECATED_V2=y |
8 | CONFIG_BLK_DEV_INITRD=y | 8 | CONFIG_BLK_DEV_INITRD=y |
9 | CONFIG_EMBEDDED=y | 9 | CONFIG_EXPERT=y |
10 | # CONFIG_VM_EVENT_COUNTERS is not set | 10 | # CONFIG_VM_EVENT_COUNTERS is not set |
11 | # CONFIG_SLUB_DEBUG is not set | 11 | # CONFIG_SLUB_DEBUG is not set |
12 | # CONFIG_COMPAT_BRK is not set | 12 | # CONFIG_COMPAT_BRK is not set |
diff --git a/arch/arm/configs/colibri_pxa270_defconfig b/arch/arm/configs/colibri_pxa270_defconfig index f52c64e36d8..2ef2c5e8aae 100644 --- a/arch/arm/configs/colibri_pxa270_defconfig +++ b/arch/arm/configs/colibri_pxa270_defconfig | |||
@@ -8,7 +8,7 @@ CONFIG_IKCONFIG_PROC=y | |||
8 | CONFIG_LOG_BUF_SHIFT=14 | 8 | CONFIG_LOG_BUF_SHIFT=14 |
9 | CONFIG_SYSFS_DEPRECATED_V2=y | 9 | CONFIG_SYSFS_DEPRECATED_V2=y |
10 | CONFIG_BLK_DEV_INITRD=y | 10 | CONFIG_BLK_DEV_INITRD=y |
11 | CONFIG_EMBEDDED=y | 11 | CONFIG_EXPERT=y |
12 | CONFIG_KALLSYMS_EXTRA_PASS=y | 12 | CONFIG_KALLSYMS_EXTRA_PASS=y |
13 | CONFIG_SLAB=y | 13 | CONFIG_SLAB=y |
14 | CONFIG_MODULES=y | 14 | CONFIG_MODULES=y |
diff --git a/arch/arm/configs/collie_defconfig b/arch/arm/configs/collie_defconfig index 310f9a6270b..6c56ad086c7 100644 --- a/arch/arm/configs/collie_defconfig +++ b/arch/arm/configs/collie_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_SYSVIPC=y | |||
4 | CONFIG_LOG_BUF_SHIFT=14 | 4 | CONFIG_LOG_BUF_SHIFT=14 |
5 | CONFIG_BLK_DEV_INITRD=y | 5 | CONFIG_BLK_DEV_INITRD=y |
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | # CONFIG_BASE_FULL is not set | 8 | # CONFIG_BASE_FULL is not set |
9 | # CONFIG_EPOLL is not set | 9 | # CONFIG_EPOLL is not set |
10 | CONFIG_SLOB=y | 10 | CONFIG_SLOB=y |
diff --git a/arch/arm/configs/corgi_defconfig b/arch/arm/configs/corgi_defconfig index 4a1fa81ed37..e53c4756384 100644 --- a/arch/arm/configs/corgi_defconfig +++ b/arch/arm/configs/corgi_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_BSD_PROCESS_ACCT=y | |||
4 | CONFIG_LOG_BUF_SHIFT=14 | 4 | CONFIG_LOG_BUF_SHIFT=14 |
5 | CONFIG_SYSFS_DEPRECATED_V2=y | 5 | CONFIG_SYSFS_DEPRECATED_V2=y |
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | CONFIG_PROFILING=y | 8 | CONFIG_PROFILING=y |
9 | CONFIG_OPROFILE=m | 9 | CONFIG_OPROFILE=m |
10 | CONFIG_MODULES=y | 10 | CONFIG_MODULES=y |
diff --git a/arch/arm/configs/da8xx_omapl_defconfig b/arch/arm/configs/da8xx_omapl_defconfig index cdc40c4b8c4..88ccde058ba 100644 --- a/arch/arm/configs/da8xx_omapl_defconfig +++ b/arch/arm/configs/da8xx_omapl_defconfig | |||
@@ -6,7 +6,7 @@ CONFIG_IKCONFIG=y | |||
6 | CONFIG_IKCONFIG_PROC=y | 6 | CONFIG_IKCONFIG_PROC=y |
7 | CONFIG_LOG_BUF_SHIFT=14 | 7 | CONFIG_LOG_BUF_SHIFT=14 |
8 | CONFIG_BLK_DEV_INITRD=y | 8 | CONFIG_BLK_DEV_INITRD=y |
9 | CONFIG_EMBEDDED=y | 9 | CONFIG_EXPERT=y |
10 | CONFIG_MODULES=y | 10 | CONFIG_MODULES=y |
11 | CONFIG_MODULE_UNLOAD=y | 11 | CONFIG_MODULE_UNLOAD=y |
12 | CONFIG_MODULE_FORCE_UNLOAD=y | 12 | CONFIG_MODULE_FORCE_UNLOAD=y |
diff --git a/arch/arm/configs/davinci_all_defconfig b/arch/arm/configs/davinci_all_defconfig index 2519cc5a5f8..889922ad229 100644 --- a/arch/arm/configs/davinci_all_defconfig +++ b/arch/arm/configs/davinci_all_defconfig | |||
@@ -6,7 +6,7 @@ CONFIG_IKCONFIG=y | |||
6 | CONFIG_IKCONFIG_PROC=y | 6 | CONFIG_IKCONFIG_PROC=y |
7 | CONFIG_LOG_BUF_SHIFT=14 | 7 | CONFIG_LOG_BUF_SHIFT=14 |
8 | CONFIG_BLK_DEV_INITRD=y | 8 | CONFIG_BLK_DEV_INITRD=y |
9 | CONFIG_EMBEDDED=y | 9 | CONFIG_EXPERT=y |
10 | CONFIG_MODULES=y | 10 | CONFIG_MODULES=y |
11 | CONFIG_MODULE_UNLOAD=y | 11 | CONFIG_MODULE_UNLOAD=y |
12 | CONFIG_MODULE_FORCE_UNLOAD=y | 12 | CONFIG_MODULE_FORCE_UNLOAD=y |
diff --git a/arch/arm/configs/dove_defconfig b/arch/arm/configs/dove_defconfig index 9359e1bf32c..54bf5eec801 100644 --- a/arch/arm/configs/dove_defconfig +++ b/arch/arm/configs/dove_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | 1 | CONFIG_EXPERIMENTAL=y |
2 | CONFIG_SYSVIPC=y | 2 | CONFIG_SYSVIPC=y |
3 | CONFIG_LOG_BUF_SHIFT=14 | 3 | CONFIG_LOG_BUF_SHIFT=14 |
4 | CONFIG_EMBEDDED=y | 4 | CONFIG_EXPERT=y |
5 | CONFIG_SLAB=y | 5 | CONFIG_SLAB=y |
6 | CONFIG_MODULES=y | 6 | CONFIG_MODULES=y |
7 | CONFIG_MODULE_UNLOAD=y | 7 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/arm/configs/ebsa110_defconfig b/arch/arm/configs/ebsa110_defconfig index c3194186920..14559dbb4c2 100644 --- a/arch/arm/configs/ebsa110_defconfig +++ b/arch/arm/configs/ebsa110_defconfig | |||
@@ -2,7 +2,7 @@ CONFIG_EXPERIMENTAL=y | |||
2 | CONFIG_SYSVIPC=y | 2 | CONFIG_SYSVIPC=y |
3 | CONFIG_BSD_PROCESS_ACCT=y | 3 | CONFIG_BSD_PROCESS_ACCT=y |
4 | CONFIG_LOG_BUF_SHIFT=14 | 4 | CONFIG_LOG_BUF_SHIFT=14 |
5 | CONFIG_EMBEDDED=y | 5 | CONFIG_EXPERT=y |
6 | CONFIG_MODULES=y | 6 | CONFIG_MODULES=y |
7 | CONFIG_ARCH_EBSA110=y | 7 | CONFIG_ARCH_EBSA110=y |
8 | CONFIG_PCCARD=m | 8 | CONFIG_PCCARD=m |
diff --git a/arch/arm/configs/edb7211_defconfig b/arch/arm/configs/edb7211_defconfig index 7b62be1561e..d52ded350a1 100644 --- a/arch/arm/configs/edb7211_defconfig +++ b/arch/arm/configs/edb7211_defconfig | |||
@@ -2,7 +2,7 @@ CONFIG_EXPERIMENTAL=y | |||
2 | CONFIG_SYSVIPC=y | 2 | CONFIG_SYSVIPC=y |
3 | CONFIG_LOG_BUF_SHIFT=14 | 3 | CONFIG_LOG_BUF_SHIFT=14 |
4 | CONFIG_BLK_DEV_INITRD=y | 4 | CONFIG_BLK_DEV_INITRD=y |
5 | CONFIG_EMBEDDED=y | 5 | CONFIG_EXPERT=y |
6 | # CONFIG_HOTPLUG is not set | 6 | # CONFIG_HOTPLUG is not set |
7 | CONFIG_ARCH_CLPS711X=y | 7 | CONFIG_ARCH_CLPS711X=y |
8 | CONFIG_ARCH_EDB7211=y | 8 | CONFIG_ARCH_EDB7211=y |
diff --git a/arch/arm/configs/em_x270_defconfig b/arch/arm/configs/em_x270_defconfig index d7db34f7970..60a21e01eb7 100644 --- a/arch/arm/configs/em_x270_defconfig +++ b/arch/arm/configs/em_x270_defconfig | |||
@@ -6,7 +6,7 @@ CONFIG_IKCONFIG_PROC=y | |||
6 | CONFIG_LOG_BUF_SHIFT=14 | 6 | CONFIG_LOG_BUF_SHIFT=14 |
7 | CONFIG_SYSFS_DEPRECATED_V2=y | 7 | CONFIG_SYSFS_DEPRECATED_V2=y |
8 | CONFIG_BLK_DEV_INITRD=y | 8 | CONFIG_BLK_DEV_INITRD=y |
9 | CONFIG_EMBEDDED=y | 9 | CONFIG_EXPERT=y |
10 | # CONFIG_VM_EVENT_COUNTERS is not set | 10 | # CONFIG_VM_EVENT_COUNTERS is not set |
11 | # CONFIG_SLUB_DEBUG is not set | 11 | # CONFIG_SLUB_DEBUG is not set |
12 | # CONFIG_COMPAT_BRK is not set | 12 | # CONFIG_COMPAT_BRK is not set |
diff --git a/arch/arm/configs/ep93xx_defconfig b/arch/arm/configs/ep93xx_defconfig index 6d6689cdf39..8e97b2f7cee 100644 --- a/arch/arm/configs/ep93xx_defconfig +++ b/arch/arm/configs/ep93xx_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_IKCONFIG=y | |||
4 | CONFIG_IKCONFIG_PROC=y | 4 | CONFIG_IKCONFIG_PROC=y |
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_SYSFS_DEPRECATED_V2=y | 6 | CONFIG_SYSFS_DEPRECATED_V2=y |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | CONFIG_SLAB=y | 8 | CONFIG_SLAB=y |
9 | CONFIG_MODULES=y | 9 | CONFIG_MODULES=y |
10 | CONFIG_MODULE_UNLOAD=y | 10 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/arm/configs/eseries_pxa_defconfig b/arch/arm/configs/eseries_pxa_defconfig index 1691dea582f..d68ac67c201 100644 --- a/arch/arm/configs/eseries_pxa_defconfig +++ b/arch/arm/configs/eseries_pxa_defconfig | |||
@@ -2,7 +2,7 @@ CONFIG_EXPERIMENTAL=y | |||
2 | CONFIG_SYSVIPC=y | 2 | CONFIG_SYSVIPC=y |
3 | CONFIG_LOG_BUF_SHIFT=14 | 3 | CONFIG_LOG_BUF_SHIFT=14 |
4 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 4 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
5 | CONFIG_EMBEDDED=y | 5 | CONFIG_EXPERT=y |
6 | # CONFIG_KALLSYMS is not set | 6 | # CONFIG_KALLSYMS is not set |
7 | # CONFIG_COMPAT_BRK is not set | 7 | # CONFIG_COMPAT_BRK is not set |
8 | CONFIG_SLAB=y | 8 | CONFIG_SLAB=y |
diff --git a/arch/arm/configs/ezx_defconfig b/arch/arm/configs/ezx_defconfig index c4eeb6d1cbf..227a477346e 100644 --- a/arch/arm/configs/ezx_defconfig +++ b/arch/arm/configs/ezx_defconfig | |||
@@ -7,7 +7,7 @@ CONFIG_SYSFS_DEPRECATED_V2=y | |||
7 | CONFIG_BLK_DEV_INITRD=y | 7 | CONFIG_BLK_DEV_INITRD=y |
8 | CONFIG_RD_BZIP2=y | 8 | CONFIG_RD_BZIP2=y |
9 | CONFIG_RD_LZMA=y | 9 | CONFIG_RD_LZMA=y |
10 | CONFIG_EMBEDDED=y | 10 | CONFIG_EXPERT=y |
11 | # CONFIG_COMPAT_BRK is not set | 11 | # CONFIG_COMPAT_BRK is not set |
12 | CONFIG_SLAB=y | 12 | CONFIG_SLAB=y |
13 | CONFIG_MODULES=y | 13 | CONFIG_MODULES=y |
diff --git a/arch/arm/configs/footbridge_defconfig b/arch/arm/configs/footbridge_defconfig index 4f925ead261..038518ab39a 100644 --- a/arch/arm/configs/footbridge_defconfig +++ b/arch/arm/configs/footbridge_defconfig | |||
@@ -3,7 +3,7 @@ CONFIG_SYSVIPC=y | |||
3 | CONFIG_BSD_PROCESS_ACCT=y | 3 | CONFIG_BSD_PROCESS_ACCT=y |
4 | CONFIG_LOG_BUF_SHIFT=14 | 4 | CONFIG_LOG_BUF_SHIFT=14 |
5 | CONFIG_BLK_DEV_INITRD=y | 5 | CONFIG_BLK_DEV_INITRD=y |
6 | CONFIG_EMBEDDED=y | 6 | CONFIG_EXPERT=y |
7 | # CONFIG_HOTPLUG is not set | 7 | # CONFIG_HOTPLUG is not set |
8 | CONFIG_MODULES=y | 8 | CONFIG_MODULES=y |
9 | CONFIG_ARCH_FOOTBRIDGE=y | 9 | CONFIG_ARCH_FOOTBRIDGE=y |
diff --git a/arch/arm/configs/fortunet_defconfig b/arch/arm/configs/fortunet_defconfig index e11c7eab8ed..840fced7529 100644 --- a/arch/arm/configs/fortunet_defconfig +++ b/arch/arm/configs/fortunet_defconfig | |||
@@ -2,7 +2,7 @@ CONFIG_EXPERIMENTAL=y | |||
2 | CONFIG_SYSVIPC=y | 2 | CONFIG_SYSVIPC=y |
3 | CONFIG_LOG_BUF_SHIFT=14 | 3 | CONFIG_LOG_BUF_SHIFT=14 |
4 | CONFIG_BLK_DEV_INITRD=y | 4 | CONFIG_BLK_DEV_INITRD=y |
5 | CONFIG_EMBEDDED=y | 5 | CONFIG_EXPERT=y |
6 | # CONFIG_HOTPLUG is not set | 6 | # CONFIG_HOTPLUG is not set |
7 | CONFIG_ARCH_CLPS711X=y | 7 | CONFIG_ARCH_CLPS711X=y |
8 | CONFIG_ARCH_FORTUNET=y | 8 | CONFIG_ARCH_FORTUNET=y |
diff --git a/arch/arm/configs/h5000_defconfig b/arch/arm/configs/h5000_defconfig index ac336f10000..37903e3f0ef 100644 --- a/arch/arm/configs/h5000_defconfig +++ b/arch/arm/configs/h5000_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_IKCONFIG=y | |||
4 | CONFIG_IKCONFIG_PROC=y | 4 | CONFIG_IKCONFIG_PROC=y |
5 | CONFIG_LOG_BUF_SHIFT=16 | 5 | CONFIG_LOG_BUF_SHIFT=16 |
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | # CONFIG_UID16 is not set | 8 | # CONFIG_UID16 is not set |
9 | CONFIG_SLAB=y | 9 | CONFIG_SLAB=y |
10 | CONFIG_MODULES=y | 10 | CONFIG_MODULES=y |
diff --git a/arch/arm/configs/imote2_defconfig b/arch/arm/configs/imote2_defconfig index ade55c8c408..176ec22af03 100644 --- a/arch/arm/configs/imote2_defconfig +++ b/arch/arm/configs/imote2_defconfig | |||
@@ -6,7 +6,7 @@ CONFIG_SYSFS_DEPRECATED_V2=y | |||
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | CONFIG_RD_BZIP2=y | 7 | CONFIG_RD_BZIP2=y |
8 | CONFIG_RD_LZMA=y | 8 | CONFIG_RD_LZMA=y |
9 | CONFIG_EMBEDDED=y | 9 | CONFIG_EXPERT=y |
10 | # CONFIG_COMPAT_BRK is not set | 10 | # CONFIG_COMPAT_BRK is not set |
11 | CONFIG_SLAB=y | 11 | CONFIG_SLAB=y |
12 | CONFIG_MODULES=y | 12 | CONFIG_MODULES=y |
diff --git a/arch/arm/configs/ixp2000_defconfig b/arch/arm/configs/ixp2000_defconfig index 90832468454..8405aded97a 100644 --- a/arch/arm/configs/ixp2000_defconfig +++ b/arch/arm/configs/ixp2000_defconfig | |||
@@ -3,7 +3,7 @@ CONFIG_SYSVIPC=y | |||
3 | CONFIG_BSD_PROCESS_ACCT=y | 3 | CONFIG_BSD_PROCESS_ACCT=y |
4 | CONFIG_LOG_BUF_SHIFT=14 | 4 | CONFIG_LOG_BUF_SHIFT=14 |
5 | CONFIG_BLK_DEV_INITRD=y | 5 | CONFIG_BLK_DEV_INITRD=y |
6 | CONFIG_EMBEDDED=y | 6 | CONFIG_EXPERT=y |
7 | # CONFIG_HOTPLUG is not set | 7 | # CONFIG_HOTPLUG is not set |
8 | CONFIG_SLAB=y | 8 | CONFIG_SLAB=y |
9 | CONFIG_MODULES=y | 9 | CONFIG_MODULES=y |
diff --git a/arch/arm/configs/ixp23xx_defconfig b/arch/arm/configs/ixp23xx_defconfig index 7fc056a8569..688717612e9 100644 --- a/arch/arm/configs/ixp23xx_defconfig +++ b/arch/arm/configs/ixp23xx_defconfig | |||
@@ -3,7 +3,7 @@ CONFIG_SYSVIPC=y | |||
3 | CONFIG_BSD_PROCESS_ACCT=y | 3 | CONFIG_BSD_PROCESS_ACCT=y |
4 | CONFIG_LOG_BUF_SHIFT=14 | 4 | CONFIG_LOG_BUF_SHIFT=14 |
5 | CONFIG_BLK_DEV_INITRD=y | 5 | CONFIG_BLK_DEV_INITRD=y |
6 | CONFIG_EMBEDDED=y | 6 | CONFIG_EXPERT=y |
7 | CONFIG_SLAB=y | 7 | CONFIG_SLAB=y |
8 | CONFIG_MODULES=y | 8 | CONFIG_MODULES=y |
9 | CONFIG_MODULE_UNLOAD=y | 9 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/arm/configs/ixp4xx_defconfig b/arch/arm/configs/ixp4xx_defconfig index 5c502393400..063e2ab2c8f 100644 --- a/arch/arm/configs/ixp4xx_defconfig +++ b/arch/arm/configs/ixp4xx_defconfig | |||
@@ -3,7 +3,7 @@ CONFIG_SYSVIPC=y | |||
3 | CONFIG_BSD_PROCESS_ACCT=y | 3 | CONFIG_BSD_PROCESS_ACCT=y |
4 | CONFIG_LOG_BUF_SHIFT=14 | 4 | CONFIG_LOG_BUF_SHIFT=14 |
5 | CONFIG_BLK_DEV_INITRD=y | 5 | CONFIG_BLK_DEV_INITRD=y |
6 | CONFIG_EMBEDDED=y | 6 | CONFIG_EXPERT=y |
7 | CONFIG_MODULES=y | 7 | CONFIG_MODULES=y |
8 | CONFIG_MODVERSIONS=y | 8 | CONFIG_MODVERSIONS=y |
9 | # CONFIG_BLK_DEV_BSG is not set | 9 | # CONFIG_BLK_DEV_BSG is not set |
diff --git a/arch/arm/configs/loki_defconfig b/arch/arm/configs/loki_defconfig index e1eaff7f553..1ba752b2dc6 100644 --- a/arch/arm/configs/loki_defconfig +++ b/arch/arm/configs/loki_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | 1 | CONFIG_EXPERIMENTAL=y |
2 | CONFIG_SYSVIPC=y | 2 | CONFIG_SYSVIPC=y |
3 | CONFIG_LOG_BUF_SHIFT=14 | 3 | CONFIG_LOG_BUF_SHIFT=14 |
4 | CONFIG_EMBEDDED=y | 4 | CONFIG_EXPERT=y |
5 | CONFIG_SLAB=y | 5 | CONFIG_SLAB=y |
6 | CONFIG_MODULES=y | 6 | CONFIG_MODULES=y |
7 | CONFIG_MODULE_UNLOAD=y | 7 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/arm/configs/lpd7a400_defconfig b/arch/arm/configs/lpd7a400_defconfig index 20caaaba4a0..5a48f171204 100644 --- a/arch/arm/configs/lpd7a400_defconfig +++ b/arch/arm/configs/lpd7a400_defconfig | |||
@@ -3,7 +3,7 @@ CONFIG_EXPERIMENTAL=y | |||
3 | CONFIG_SYSVIPC=y | 3 | CONFIG_SYSVIPC=y |
4 | CONFIG_IKCONFIG=y | 4 | CONFIG_IKCONFIG=y |
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_EMBEDDED=y | 6 | CONFIG_EXPERT=y |
7 | # CONFIG_HOTPLUG is not set | 7 | # CONFIG_HOTPLUG is not set |
8 | # CONFIG_EPOLL is not set | 8 | # CONFIG_EPOLL is not set |
9 | # CONFIG_IOSCHED_DEADLINE is not set | 9 | # CONFIG_IOSCHED_DEADLINE is not set |
diff --git a/arch/arm/configs/lpd7a404_defconfig b/arch/arm/configs/lpd7a404_defconfig index 1efcce97b4a..22d0631de00 100644 --- a/arch/arm/configs/lpd7a404_defconfig +++ b/arch/arm/configs/lpd7a404_defconfig | |||
@@ -3,7 +3,7 @@ CONFIG_EXPERIMENTAL=y | |||
3 | CONFIG_SYSVIPC=y | 3 | CONFIG_SYSVIPC=y |
4 | CONFIG_IKCONFIG=y | 4 | CONFIG_IKCONFIG=y |
5 | CONFIG_LOG_BUF_SHIFT=16 | 5 | CONFIG_LOG_BUF_SHIFT=16 |
6 | CONFIG_EMBEDDED=y | 6 | CONFIG_EXPERT=y |
7 | # CONFIG_HOTPLUG is not set | 7 | # CONFIG_HOTPLUG is not set |
8 | # CONFIG_EPOLL is not set | 8 | # CONFIG_EPOLL is not set |
9 | CONFIG_SLAB=y | 9 | CONFIG_SLAB=y |
diff --git a/arch/arm/configs/magician_defconfig b/arch/arm/configs/magician_defconfig index af805e8fd03..a88e64d4e9a 100644 --- a/arch/arm/configs/magician_defconfig +++ b/arch/arm/configs/magician_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_IKCONFIG=y | |||
4 | CONFIG_IKCONFIG_PROC=y | 4 | CONFIG_IKCONFIG_PROC=y |
5 | CONFIG_LOG_BUF_SHIFT=16 | 5 | CONFIG_LOG_BUF_SHIFT=16 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | # CONFIG_UID16 is not set | 8 | # CONFIG_UID16 is not set |
9 | CONFIG_SLAB=y | 9 | CONFIG_SLAB=y |
10 | CONFIG_MODULES=y | 10 | CONFIG_MODULES=y |
diff --git a/arch/arm/configs/mv78xx0_defconfig b/arch/arm/configs/mv78xx0_defconfig index b0d082422d4..7305ebddb51 100644 --- a/arch/arm/configs/mv78xx0_defconfig +++ b/arch/arm/configs/mv78xx0_defconfig | |||
@@ -2,7 +2,7 @@ CONFIG_EXPERIMENTAL=y | |||
2 | CONFIG_SYSVIPC=y | 2 | CONFIG_SYSVIPC=y |
3 | CONFIG_LOG_BUF_SHIFT=14 | 3 | CONFIG_LOG_BUF_SHIFT=14 |
4 | CONFIG_SYSFS_DEPRECATED_V2=y | 4 | CONFIG_SYSFS_DEPRECATED_V2=y |
5 | CONFIG_EMBEDDED=y | 5 | CONFIG_EXPERT=y |
6 | CONFIG_KALLSYMS_ALL=y | 6 | CONFIG_KALLSYMS_ALL=y |
7 | # CONFIG_SLUB_DEBUG is not set | 7 | # CONFIG_SLUB_DEBUG is not set |
8 | CONFIG_PROFILING=y | 8 | CONFIG_PROFILING=y |
diff --git a/arch/arm/configs/mx1_defconfig b/arch/arm/configs/mx1_defconfig index 2f38d971543..b39b5ced8a1 100644 --- a/arch/arm/configs/mx1_defconfig +++ b/arch/arm/configs/mx1_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_IKCONFIG=y | |||
4 | CONFIG_IKCONFIG_PROC=y | 4 | CONFIG_IKCONFIG_PROC=y |
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_SYSFS_DEPRECATED_V2=y | 6 | CONFIG_SYSFS_DEPRECATED_V2=y |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | CONFIG_SLAB=y | 8 | CONFIG_SLAB=y |
9 | CONFIG_MODULES=y | 9 | CONFIG_MODULES=y |
10 | CONFIG_MODULE_UNLOAD=y | 10 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/arm/configs/mx21_defconfig b/arch/arm/configs/mx21_defconfig index 6454e18e2ab..411f88dd440 100644 --- a/arch/arm/configs/mx21_defconfig +++ b/arch/arm/configs/mx21_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_SYSVIPC=y | |||
4 | CONFIG_LOG_BUF_SHIFT=14 | 4 | CONFIG_LOG_BUF_SHIFT=14 |
5 | CONFIG_SYSFS_DEPRECATED_V2=y | 5 | CONFIG_SYSFS_DEPRECATED_V2=y |
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | CONFIG_KALLSYMS_EXTRA_PASS=y | 8 | CONFIG_KALLSYMS_EXTRA_PASS=y |
9 | CONFIG_SLAB=y | 9 | CONFIG_SLAB=y |
10 | CONFIG_MODULES=y | 10 | CONFIG_MODULES=y |
diff --git a/arch/arm/configs/mx27_defconfig b/arch/arm/configs/mx27_defconfig index 813cfb366c1..9ad4c656c9b 100644 --- a/arch/arm/configs/mx27_defconfig +++ b/arch/arm/configs/mx27_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_SYSVIPC=y | |||
4 | CONFIG_POSIX_MQUEUE=y | 4 | CONFIG_POSIX_MQUEUE=y |
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | CONFIG_KALLSYMS_EXTRA_PASS=y | 8 | CONFIG_KALLSYMS_EXTRA_PASS=y |
9 | # CONFIG_COMPAT_BRK is not set | 9 | # CONFIG_COMPAT_BRK is not set |
10 | CONFIG_SLAB=y | 10 | CONFIG_SLAB=y |
diff --git a/arch/arm/configs/mx3_defconfig b/arch/arm/configs/mx3_defconfig index e648ea3429b..7c4b30b3495 100644 --- a/arch/arm/configs/mx3_defconfig +++ b/arch/arm/configs/mx3_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_IKCONFIG=y | |||
4 | CONFIG_IKCONFIG_PROC=y | 4 | CONFIG_IKCONFIG_PROC=y |
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_SYSFS_DEPRECATED_V2=y | 6 | CONFIG_SYSFS_DEPRECATED_V2=y |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | CONFIG_SLAB=y | 8 | CONFIG_SLAB=y |
9 | CONFIG_MODULES=y | 9 | CONFIG_MODULES=y |
10 | CONFIG_MODULE_UNLOAD=y | 10 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/arm/configs/mx51_defconfig b/arch/arm/configs/mx51_defconfig index 5c7a87260fa..9cba68cfa51 100644 --- a/arch/arm/configs/mx51_defconfig +++ b/arch/arm/configs/mx51_defconfig | |||
@@ -3,7 +3,7 @@ CONFIG_EXPERIMENTAL=y | |||
3 | CONFIG_SYSVIPC=y | 3 | CONFIG_SYSVIPC=y |
4 | CONFIG_LOG_BUF_SHIFT=18 | 4 | CONFIG_LOG_BUF_SHIFT=18 |
5 | CONFIG_RELAY=y | 5 | CONFIG_RELAY=y |
6 | CONFIG_EMBEDDED=y | 6 | CONFIG_EXPERT=y |
7 | # CONFIG_SLUB_DEBUG is not set | 7 | # CONFIG_SLUB_DEBUG is not set |
8 | # CONFIG_COMPAT_BRK is not set | 8 | # CONFIG_COMPAT_BRK is not set |
9 | CONFIG_MODULES=y | 9 | CONFIG_MODULES=y |
diff --git a/arch/arm/configs/nhk8815_defconfig b/arch/arm/configs/nhk8815_defconfig index 0e2dc26ebe6..37207d1bf44 100644 --- a/arch/arm/configs/nhk8815_defconfig +++ b/arch/arm/configs/nhk8815_defconfig | |||
@@ -7,7 +7,7 @@ CONFIG_IKCONFIG_PROC=y | |||
7 | CONFIG_LOG_BUF_SHIFT=14 | 7 | CONFIG_LOG_BUF_SHIFT=14 |
8 | CONFIG_SYSFS_DEPRECATED_V2=y | 8 | CONFIG_SYSFS_DEPRECATED_V2=y |
9 | CONFIG_BLK_DEV_INITRD=y | 9 | CONFIG_BLK_DEV_INITRD=y |
10 | CONFIG_EMBEDDED=y | 10 | CONFIG_EXPERT=y |
11 | CONFIG_KALLSYMS_ALL=y | 11 | CONFIG_KALLSYMS_ALL=y |
12 | CONFIG_SLAB=y | 12 | CONFIG_SLAB=y |
13 | CONFIG_MODULES=y | 13 | CONFIG_MODULES=y |
diff --git a/arch/arm/configs/omap1_defconfig b/arch/arm/configs/omap1_defconfig index a350cc6bfe6..7b63462b349 100644 --- a/arch/arm/configs/omap1_defconfig +++ b/arch/arm/configs/omap1_defconfig | |||
@@ -6,7 +6,7 @@ CONFIG_BSD_PROCESS_ACCT=y | |||
6 | CONFIG_IKCONFIG=y | 6 | CONFIG_IKCONFIG=y |
7 | CONFIG_LOG_BUF_SHIFT=14 | 7 | CONFIG_LOG_BUF_SHIFT=14 |
8 | CONFIG_BLK_DEV_INITRD=y | 8 | CONFIG_BLK_DEV_INITRD=y |
9 | CONFIG_EMBEDDED=y | 9 | CONFIG_EXPERT=y |
10 | # CONFIG_KALLSYMS is not set | 10 | # CONFIG_KALLSYMS is not set |
11 | # CONFIG_ELF_CORE is not set | 11 | # CONFIG_ELF_CORE is not set |
12 | # CONFIG_BASE_FULL is not set | 12 | # CONFIG_BASE_FULL is not set |
diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig index ccedde1371c..ae890caa17a 100644 --- a/arch/arm/configs/omap2plus_defconfig +++ b/arch/arm/configs/omap2plus_defconfig | |||
@@ -6,7 +6,7 @@ CONFIG_IKCONFIG=y | |||
6 | CONFIG_IKCONFIG_PROC=y | 6 | CONFIG_IKCONFIG_PROC=y |
7 | CONFIG_LOG_BUF_SHIFT=16 | 7 | CONFIG_LOG_BUF_SHIFT=16 |
8 | CONFIG_BLK_DEV_INITRD=y | 8 | CONFIG_BLK_DEV_INITRD=y |
9 | CONFIG_EMBEDDED=y | 9 | CONFIG_EXPERT=y |
10 | # CONFIG_SYSCTL_SYSCALL is not set | 10 | # CONFIG_SYSCTL_SYSCALL is not set |
11 | CONFIG_KALLSYMS_EXTRA_PASS=y | 11 | CONFIG_KALLSYMS_EXTRA_PASS=y |
12 | CONFIG_SLAB=y | 12 | CONFIG_SLAB=y |
diff --git a/arch/arm/configs/orion5x_defconfig b/arch/arm/configs/orion5x_defconfig index 439323b3b0e..a288d703395 100644 --- a/arch/arm/configs/orion5x_defconfig +++ b/arch/arm/configs/orion5x_defconfig | |||
@@ -2,7 +2,7 @@ CONFIG_EXPERIMENTAL=y | |||
2 | CONFIG_SYSVIPC=y | 2 | CONFIG_SYSVIPC=y |
3 | CONFIG_LOG_BUF_SHIFT=14 | 3 | CONFIG_LOG_BUF_SHIFT=14 |
4 | CONFIG_SYSFS_DEPRECATED_V2=y | 4 | CONFIG_SYSFS_DEPRECATED_V2=y |
5 | CONFIG_EMBEDDED=y | 5 | CONFIG_EXPERT=y |
6 | # CONFIG_SLUB_DEBUG is not set | 6 | # CONFIG_SLUB_DEBUG is not set |
7 | CONFIG_PROFILING=y | 7 | CONFIG_PROFILING=y |
8 | CONFIG_OPROFILE=y | 8 | CONFIG_OPROFILE=y |
diff --git a/arch/arm/configs/pcm027_defconfig b/arch/arm/configs/pcm027_defconfig index 583a0610bd0..2f136c30a98 100644 --- a/arch/arm/configs/pcm027_defconfig +++ b/arch/arm/configs/pcm027_defconfig | |||
@@ -7,7 +7,7 @@ CONFIG_IKCONFIG=y | |||
7 | CONFIG_IKCONFIG_PROC=y | 7 | CONFIG_IKCONFIG_PROC=y |
8 | CONFIG_LOG_BUF_SHIFT=14 | 8 | CONFIG_LOG_BUF_SHIFT=14 |
9 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 9 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
10 | CONFIG_EMBEDDED=y | 10 | CONFIG_EXPERT=y |
11 | # CONFIG_KALLSYMS is not set | 11 | # CONFIG_KALLSYMS is not set |
12 | CONFIG_SLAB=y | 12 | CONFIG_SLAB=y |
13 | CONFIG_MODULES=y | 13 | CONFIG_MODULES=y |
diff --git a/arch/arm/configs/pcontrol_g20_defconfig b/arch/arm/configs/pcontrol_g20_defconfig index b42ee62c4d7..c75c9fcede5 100644 --- a/arch/arm/configs/pcontrol_g20_defconfig +++ b/arch/arm/configs/pcontrol_g20_defconfig | |||
@@ -10,7 +10,7 @@ CONFIG_IKCONFIG_PROC=y | |||
10 | CONFIG_LOG_BUF_SHIFT=14 | 10 | CONFIG_LOG_BUF_SHIFT=14 |
11 | CONFIG_NAMESPACES=y | 11 | CONFIG_NAMESPACES=y |
12 | CONFIG_BLK_DEV_INITRD=y | 12 | CONFIG_BLK_DEV_INITRD=y |
13 | CONFIG_EMBEDDED=y | 13 | CONFIG_EXPERT=y |
14 | # CONFIG_SYSCTL_SYSCALL is not set | 14 | # CONFIG_SYSCTL_SYSCALL is not set |
15 | # CONFIG_KALLSYMS is not set | 15 | # CONFIG_KALLSYMS is not set |
16 | # CONFIG_VM_EVENT_COUNTERS is not set | 16 | # CONFIG_VM_EVENT_COUNTERS is not set |
diff --git a/arch/arm/configs/pleb_defconfig b/arch/arm/configs/pleb_defconfig index d1efbdc1e6d..cb08cc561da 100644 --- a/arch/arm/configs/pleb_defconfig +++ b/arch/arm/configs/pleb_defconfig | |||
@@ -3,7 +3,7 @@ CONFIG_EXPERIMENTAL=y | |||
3 | CONFIG_SYSVIPC=y | 3 | CONFIG_SYSVIPC=y |
4 | CONFIG_LOG_BUF_SHIFT=14 | 4 | CONFIG_LOG_BUF_SHIFT=14 |
5 | CONFIG_BLK_DEV_INITRD=y | 5 | CONFIG_BLK_DEV_INITRD=y |
6 | CONFIG_EMBEDDED=y | 6 | CONFIG_EXPERT=y |
7 | # CONFIG_HOTPLUG is not set | 7 | # CONFIG_HOTPLUG is not set |
8 | # CONFIG_SHMEM is not set | 8 | # CONFIG_SHMEM is not set |
9 | CONFIG_MODULES=y | 9 | CONFIG_MODULES=y |
diff --git a/arch/arm/configs/pnx4008_defconfig b/arch/arm/configs/pnx4008_defconfig index bd481f04276..35a31ccacc3 100644 --- a/arch/arm/configs/pnx4008_defconfig +++ b/arch/arm/configs/pnx4008_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_BSD_PROCESS_ACCT=y | |||
5 | CONFIG_AUDIT=y | 5 | CONFIG_AUDIT=y |
6 | CONFIG_LOG_BUF_SHIFT=14 | 6 | CONFIG_LOG_BUF_SHIFT=14 |
7 | CONFIG_BLK_DEV_INITRD=y | 7 | CONFIG_BLK_DEV_INITRD=y |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | CONFIG_SLAB=y | 9 | CONFIG_SLAB=y |
10 | CONFIG_MODULES=y | 10 | CONFIG_MODULES=y |
11 | CONFIG_MODULE_UNLOAD=y | 11 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/arm/configs/simpad_defconfig b/arch/arm/configs/simpad_defconfig index af3b12e3b46..d3358155bf8 100644 --- a/arch/arm/configs/simpad_defconfig +++ b/arch/arm/configs/simpad_defconfig | |||
@@ -2,7 +2,7 @@ CONFIG_EXPERIMENTAL=y | |||
2 | CONFIG_LOCALVERSION="oe1" | 2 | CONFIG_LOCALVERSION="oe1" |
3 | CONFIG_SYSVIPC=y | 3 | CONFIG_SYSVIPC=y |
4 | CONFIG_LOG_BUF_SHIFT=14 | 4 | CONFIG_LOG_BUF_SHIFT=14 |
5 | CONFIG_EMBEDDED=y | 5 | CONFIG_EXPERT=y |
6 | CONFIG_KALLSYMS_ALL=y | 6 | CONFIG_KALLSYMS_ALL=y |
7 | CONFIG_KALLSYMS_EXTRA_PASS=y | 7 | CONFIG_KALLSYMS_EXTRA_PASS=y |
8 | CONFIG_MODULES=y | 8 | CONFIG_MODULES=y |
diff --git a/arch/arm/configs/spitz_defconfig b/arch/arm/configs/spitz_defconfig index aebd4bb0ad0..70158273c6d 100644 --- a/arch/arm/configs/spitz_defconfig +++ b/arch/arm/configs/spitz_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_BSD_PROCESS_ACCT=y | |||
4 | CONFIG_LOG_BUF_SHIFT=14 | 4 | CONFIG_LOG_BUF_SHIFT=14 |
5 | CONFIG_SYSFS_DEPRECATED_V2=y | 5 | CONFIG_SYSFS_DEPRECATED_V2=y |
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | CONFIG_PROFILING=y | 8 | CONFIG_PROFILING=y |
9 | CONFIG_OPROFILE=m | 9 | CONFIG_OPROFILE=m |
10 | CONFIG_MODULES=y | 10 | CONFIG_MODULES=y |
diff --git a/arch/arm/configs/stmp378x_defconfig b/arch/arm/configs/stmp378x_defconfig index 94a2d904bf9..1079c2b6eb3 100644 --- a/arch/arm/configs/stmp378x_defconfig +++ b/arch/arm/configs/stmp378x_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_POSIX_MQUEUE=y | |||
5 | CONFIG_BSD_PROCESS_ACCT=y | 5 | CONFIG_BSD_PROCESS_ACCT=y |
6 | CONFIG_SYSFS_DEPRECATED_V2=y | 6 | CONFIG_SYSFS_DEPRECATED_V2=y |
7 | CONFIG_BLK_DEV_INITRD=y | 7 | CONFIG_BLK_DEV_INITRD=y |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | CONFIG_SLAB=y | 9 | CONFIG_SLAB=y |
10 | CONFIG_MODULES=y | 10 | CONFIG_MODULES=y |
11 | CONFIG_MODULE_UNLOAD=y | 11 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/arm/configs/stmp37xx_defconfig b/arch/arm/configs/stmp37xx_defconfig index d8ee58cfa87..564a5cc4408 100644 --- a/arch/arm/configs/stmp37xx_defconfig +++ b/arch/arm/configs/stmp37xx_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_POSIX_MQUEUE=y | |||
5 | CONFIG_BSD_PROCESS_ACCT=y | 5 | CONFIG_BSD_PROCESS_ACCT=y |
6 | CONFIG_SYSFS_DEPRECATED_V2=y | 6 | CONFIG_SYSFS_DEPRECATED_V2=y |
7 | CONFIG_BLK_DEV_INITRD=y | 7 | CONFIG_BLK_DEV_INITRD=y |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | CONFIG_SLAB=y | 9 | CONFIG_SLAB=y |
10 | CONFIG_MODULES=y | 10 | CONFIG_MODULES=y |
11 | CONFIG_MODULE_UNLOAD=y | 11 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/arm/configs/tct_hammer_defconfig b/arch/arm/configs/tct_hammer_defconfig index e89ca19489c..95c0f0d63db 100644 --- a/arch/arm/configs/tct_hammer_defconfig +++ b/arch/arm/configs/tct_hammer_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_SYSVIPC=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_SYSFS_DEPRECATED_V2=y | 6 | CONFIG_SYSFS_DEPRECATED_V2=y |
7 | CONFIG_BLK_DEV_INITRD=y | 7 | CONFIG_BLK_DEV_INITRD=y |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | # CONFIG_KALLSYMS is not set | 9 | # CONFIG_KALLSYMS is not set |
10 | # CONFIG_BUG is not set | 10 | # CONFIG_BUG is not set |
11 | # CONFIG_ELF_CORE is not set | 11 | # CONFIG_ELF_CORE is not set |
diff --git a/arch/arm/configs/trizeps4_defconfig b/arch/arm/configs/trizeps4_defconfig index 37f48342827..3162173fa75 100644 --- a/arch/arm/configs/trizeps4_defconfig +++ b/arch/arm/configs/trizeps4_defconfig | |||
@@ -7,7 +7,7 @@ CONFIG_IKCONFIG=y | |||
7 | CONFIG_IKCONFIG_PROC=y | 7 | CONFIG_IKCONFIG_PROC=y |
8 | CONFIG_LOG_BUF_SHIFT=14 | 8 | CONFIG_LOG_BUF_SHIFT=14 |
9 | CONFIG_BLK_DEV_INITRD=y | 9 | CONFIG_BLK_DEV_INITRD=y |
10 | CONFIG_EMBEDDED=y | 10 | CONFIG_EXPERT=y |
11 | CONFIG_KALLSYMS_EXTRA_PASS=y | 11 | CONFIG_KALLSYMS_EXTRA_PASS=y |
12 | CONFIG_SLAB=y | 12 | CONFIG_SLAB=y |
13 | CONFIG_MODULES=y | 13 | CONFIG_MODULES=y |
diff --git a/arch/arm/configs/u300_defconfig b/arch/arm/configs/u300_defconfig index c1c252cdca6..4a5a12681be 100644 --- a/arch/arm/configs/u300_defconfig +++ b/arch/arm/configs/u300_defconfig | |||
@@ -3,7 +3,7 @@ CONFIG_EXPERIMENTAL=y | |||
3 | # CONFIG_SWAP is not set | 3 | # CONFIG_SWAP is not set |
4 | CONFIG_SYSVIPC=y | 4 | CONFIG_SYSVIPC=y |
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_EMBEDDED=y | 6 | CONFIG_EXPERT=y |
7 | # CONFIG_AIO is not set | 7 | # CONFIG_AIO is not set |
8 | # CONFIG_VM_EVENT_COUNTERS is not set | 8 | # CONFIG_VM_EVENT_COUNTERS is not set |
9 | CONFIG_MODULES=y | 9 | CONFIG_MODULES=y |
diff --git a/arch/arm/configs/viper_defconfig b/arch/arm/configs/viper_defconfig index 9d7bf5e0d0f..8b0c717378f 100644 --- a/arch/arm/configs/viper_defconfig +++ b/arch/arm/configs/viper_defconfig | |||
@@ -3,7 +3,7 @@ CONFIG_EXPERIMENTAL=y | |||
3 | CONFIG_SYSVIPC=y | 3 | CONFIG_SYSVIPC=y |
4 | CONFIG_LOG_BUF_SHIFT=13 | 4 | CONFIG_LOG_BUF_SHIFT=13 |
5 | CONFIG_SYSFS_DEPRECATED_V2=y | 5 | CONFIG_SYSFS_DEPRECATED_V2=y |
6 | CONFIG_EMBEDDED=y | 6 | CONFIG_EXPERT=y |
7 | # CONFIG_ELF_CORE is not set | 7 | # CONFIG_ELF_CORE is not set |
8 | # CONFIG_SHMEM is not set | 8 | # CONFIG_SHMEM is not set |
9 | CONFIG_SLAB=y | 9 | CONFIG_SLAB=y |
diff --git a/arch/arm/configs/xcep_defconfig b/arch/arm/configs/xcep_defconfig index 70d47dbae6d..5b550414364 100644 --- a/arch/arm/configs/xcep_defconfig +++ b/arch/arm/configs/xcep_defconfig | |||
@@ -8,7 +8,7 @@ CONFIG_IKCONFIG_PROC=y | |||
8 | CONFIG_LOG_BUF_SHIFT=16 | 8 | CONFIG_LOG_BUF_SHIFT=16 |
9 | CONFIG_SYSFS_DEPRECATED_V2=y | 9 | CONFIG_SYSFS_DEPRECATED_V2=y |
10 | CONFIG_BLK_DEV_INITRD=y | 10 | CONFIG_BLK_DEV_INITRD=y |
11 | CONFIG_EMBEDDED=y | 11 | CONFIG_EXPERT=y |
12 | # CONFIG_UID16 is not set | 12 | # CONFIG_UID16 is not set |
13 | # CONFIG_SHMEM is not set | 13 | # CONFIG_SHMEM is not set |
14 | # CONFIG_VM_EVENT_COUNTERS is not set | 14 | # CONFIG_VM_EVENT_COUNTERS is not set |
diff --git a/arch/arm/include/asm/bitops.h b/arch/arm/include/asm/bitops.h index 338ff19ae44..7b1bb2bbaf8 100644 --- a/arch/arm/include/asm/bitops.h +++ b/arch/arm/include/asm/bitops.h | |||
@@ -285,7 +285,7 @@ static inline int fls(int x) | |||
285 | if (__builtin_constant_p(x)) | 285 | if (__builtin_constant_p(x)) |
286 | return constant_fls(x); | 286 | return constant_fls(x); |
287 | 287 | ||
288 | asm("clz\t%0, %1" : "=r" (ret) : "r" (x) : "cc"); | 288 | asm("clz\t%0, %1" : "=r" (ret) : "r" (x)); |
289 | ret = 32 - ret; | 289 | ret = 32 - ret; |
290 | return ret; | 290 | return ret; |
291 | } | 291 | } |
diff --git a/arch/arm/include/asm/hardware/sp810.h b/arch/arm/include/asm/hardware/sp810.h index a101f10bb5b..721847dc68a 100644 --- a/arch/arm/include/asm/hardware/sp810.h +++ b/arch/arm/include/asm/hardware/sp810.h | |||
@@ -50,6 +50,12 @@ | |||
50 | #define SCPCELLID2 0xFF8 | 50 | #define SCPCELLID2 0xFF8 |
51 | #define SCPCELLID3 0xFFC | 51 | #define SCPCELLID3 0xFFC |
52 | 52 | ||
53 | #define SCCTRL_TIMEREN0SEL_REFCLK (0 << 15) | ||
54 | #define SCCTRL_TIMEREN0SEL_TIMCLK (1 << 15) | ||
55 | |||
56 | #define SCCTRL_TIMEREN1SEL_REFCLK (0 << 17) | ||
57 | #define SCCTRL_TIMEREN1SEL_TIMCLK (1 << 17) | ||
58 | |||
53 | static inline void sysctl_soft_reset(void __iomem *base) | 59 | static inline void sysctl_soft_reset(void __iomem *base) |
54 | { | 60 | { |
55 | /* writing any value to SCSYSSTAT reg will reset system */ | 61 | /* writing any value to SCSYSSTAT reg will reset system */ |
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h index 20e0f7c9e03..d66605dea55 100644 --- a/arch/arm/include/asm/io.h +++ b/arch/arm/include/asm/io.h | |||
@@ -95,6 +95,15 @@ static inline void __iomem *__typesafe_io(unsigned long addr) | |||
95 | return (void __iomem *)addr; | 95 | return (void __iomem *)addr; |
96 | } | 96 | } |
97 | 97 | ||
98 | /* IO barriers */ | ||
99 | #ifdef CONFIG_ARM_DMA_MEM_BUFFERABLE | ||
100 | #define __iormb() rmb() | ||
101 | #define __iowmb() wmb() | ||
102 | #else | ||
103 | #define __iormb() do { } while (0) | ||
104 | #define __iowmb() do { } while (0) | ||
105 | #endif | ||
106 | |||
98 | /* | 107 | /* |
99 | * Now, pick up the machine-defined IO definitions | 108 | * Now, pick up the machine-defined IO definitions |
100 | */ | 109 | */ |
@@ -125,17 +134,17 @@ static inline void __iomem *__typesafe_io(unsigned long addr) | |||
125 | * The {in,out}[bwl] macros are for emulating x86-style PCI/ISA IO space. | 134 | * The {in,out}[bwl] macros are for emulating x86-style PCI/ISA IO space. |
126 | */ | 135 | */ |
127 | #ifdef __io | 136 | #ifdef __io |
128 | #define outb(v,p) __raw_writeb(v,__io(p)) | 137 | #define outb(v,p) ({ __iowmb(); __raw_writeb(v,__io(p)); }) |
129 | #define outw(v,p) __raw_writew((__force __u16) \ | 138 | #define outw(v,p) ({ __iowmb(); __raw_writew((__force __u16) \ |
130 | cpu_to_le16(v),__io(p)) | 139 | cpu_to_le16(v),__io(p)); }) |
131 | #define outl(v,p) __raw_writel((__force __u32) \ | 140 | #define outl(v,p) ({ __iowmb(); __raw_writel((__force __u32) \ |
132 | cpu_to_le32(v),__io(p)) | 141 | cpu_to_le32(v),__io(p)); }) |
133 | 142 | ||
134 | #define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __v; }) | 143 | #define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __iormb(); __v; }) |
135 | #define inw(p) ({ __u16 __v = le16_to_cpu((__force __le16) \ | 144 | #define inw(p) ({ __u16 __v = le16_to_cpu((__force __le16) \ |
136 | __raw_readw(__io(p))); __v; }) | 145 | __raw_readw(__io(p))); __iormb(); __v; }) |
137 | #define inl(p) ({ __u32 __v = le32_to_cpu((__force __le32) \ | 146 | #define inl(p) ({ __u32 __v = le32_to_cpu((__force __le32) \ |
138 | __raw_readl(__io(p))); __v; }) | 147 | __raw_readl(__io(p))); __iormb(); __v; }) |
139 | 148 | ||
140 | #define outsb(p,d,l) __raw_writesb(__io(p),d,l) | 149 | #define outsb(p,d,l) __raw_writesb(__io(p),d,l) |
141 | #define outsw(p,d,l) __raw_writesw(__io(p),d,l) | 150 | #define outsw(p,d,l) __raw_writesw(__io(p),d,l) |
@@ -192,14 +201,6 @@ extern void _memset_io(volatile void __iomem *, int, size_t); | |||
192 | #define writel_relaxed(v,c) ((void)__raw_writel((__force u32) \ | 201 | #define writel_relaxed(v,c) ((void)__raw_writel((__force u32) \ |
193 | cpu_to_le32(v),__mem_pci(c))) | 202 | cpu_to_le32(v),__mem_pci(c))) |
194 | 203 | ||
195 | #ifdef CONFIG_ARM_DMA_MEM_BUFFERABLE | ||
196 | #define __iormb() rmb() | ||
197 | #define __iowmb() wmb() | ||
198 | #else | ||
199 | #define __iormb() do { } while (0) | ||
200 | #define __iowmb() do { } while (0) | ||
201 | #endif | ||
202 | |||
203 | #define readb(c) ({ u8 __v = readb_relaxed(c); __iormb(); __v; }) | 204 | #define readb(c) ({ u8 __v = readb_relaxed(c); __iormb(); __v; }) |
204 | #define readw(c) ({ u16 __v = readw_relaxed(c); __iormb(); __v; }) | 205 | #define readw(c) ({ u16 __v = readw_relaxed(c); __iormb(); __v; }) |
205 | #define readl(c) ({ u32 __v = readl_relaxed(c); __iormb(); __v; }) | 206 | #define readl(c) ({ u32 __v = readl_relaxed(c); __iormb(); __v; }) |
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index 23c2e8e5c0f..d0ee74b7cf8 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h | |||
@@ -188,7 +188,7 @@ | |||
188 | * translation for translating DMA addresses. Use the driver | 188 | * translation for translating DMA addresses. Use the driver |
189 | * DMA support - see dma-mapping.h. | 189 | * DMA support - see dma-mapping.h. |
190 | */ | 190 | */ |
191 | static inline unsigned long virt_to_phys(void *x) | 191 | static inline unsigned long virt_to_phys(const volatile void *x) |
192 | { | 192 | { |
193 | return __virt_to_phys((unsigned long)(x)); | 193 | return __virt_to_phys((unsigned long)(x)); |
194 | } | 194 | } |
diff --git a/arch/arm/include/asm/sched_clock.h b/arch/arm/include/asm/sched_clock.h index a84628be1a7..c8e6ddf3e86 100644 --- a/arch/arm/include/asm/sched_clock.h +++ b/arch/arm/include/asm/sched_clock.h | |||
@@ -115,4 +115,6 @@ static inline void init_fixed_sched_clock(struct clock_data *cd, | |||
115 | } | 115 | } |
116 | } | 116 | } |
117 | 117 | ||
118 | extern void sched_clock_postinit(void); | ||
119 | |||
118 | #endif | 120 | #endif |
diff --git a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c index eed2f795e1b..2ad62df3773 100644 --- a/arch/arm/kernel/ecard.c +++ b/arch/arm/kernel/ecard.c | |||
@@ -443,40 +443,40 @@ static expansioncard_ops_t ecard_default_ops = { | |||
443 | * | 443 | * |
444 | * They are not meant to be called directly, but via enable/disable_irq. | 444 | * They are not meant to be called directly, but via enable/disable_irq. |
445 | */ | 445 | */ |
446 | static void ecard_irq_unmask(unsigned int irqnr) | 446 | static void ecard_irq_unmask(struct irq_data *d) |
447 | { | 447 | { |
448 | ecard_t *ec = slot_to_ecard(irqnr - 32); | 448 | ecard_t *ec = slot_to_ecard(d->irq - 32); |
449 | 449 | ||
450 | if (ec) { | 450 | if (ec) { |
451 | if (!ec->ops) | 451 | if (!ec->ops) |
452 | ec->ops = &ecard_default_ops; | 452 | ec->ops = &ecard_default_ops; |
453 | 453 | ||
454 | if (ec->claimed && ec->ops->irqenable) | 454 | if (ec->claimed && ec->ops->irqenable) |
455 | ec->ops->irqenable(ec, irqnr); | 455 | ec->ops->irqenable(ec, d->irq); |
456 | else | 456 | else |
457 | printk(KERN_ERR "ecard: rejecting request to " | 457 | printk(KERN_ERR "ecard: rejecting request to " |
458 | "enable IRQs for %d\n", irqnr); | 458 | "enable IRQs for %d\n", d->irq); |
459 | } | 459 | } |
460 | } | 460 | } |
461 | 461 | ||
462 | static void ecard_irq_mask(unsigned int irqnr) | 462 | static void ecard_irq_mask(struct irq_data *d) |
463 | { | 463 | { |
464 | ecard_t *ec = slot_to_ecard(irqnr - 32); | 464 | ecard_t *ec = slot_to_ecard(d->irq - 32); |
465 | 465 | ||
466 | if (ec) { | 466 | if (ec) { |
467 | if (!ec->ops) | 467 | if (!ec->ops) |
468 | ec->ops = &ecard_default_ops; | 468 | ec->ops = &ecard_default_ops; |
469 | 469 | ||
470 | if (ec->ops && ec->ops->irqdisable) | 470 | if (ec->ops && ec->ops->irqdisable) |
471 | ec->ops->irqdisable(ec, irqnr); | 471 | ec->ops->irqdisable(ec, d->irq); |
472 | } | 472 | } |
473 | } | 473 | } |
474 | 474 | ||
475 | static struct irq_chip ecard_chip = { | 475 | static struct irq_chip ecard_chip = { |
476 | .name = "ECARD", | 476 | .name = "ECARD", |
477 | .ack = ecard_irq_mask, | 477 | .irq_ack = ecard_irq_mask, |
478 | .mask = ecard_irq_mask, | 478 | .irq_mask = ecard_irq_mask, |
479 | .unmask = ecard_irq_unmask, | 479 | .irq_unmask = ecard_irq_unmask, |
480 | }; | 480 | }; |
481 | 481 | ||
482 | void ecard_enablefiq(unsigned int fiqnr) | 482 | void ecard_enablefiq(unsigned int fiqnr) |
@@ -551,7 +551,7 @@ static void ecard_check_lockup(struct irq_desc *desc) | |||
551 | printk(KERN_ERR "\nInterrupt lockup detected - " | 551 | printk(KERN_ERR "\nInterrupt lockup detected - " |
552 | "disabling all expansion card interrupts\n"); | 552 | "disabling all expansion card interrupts\n"); |
553 | 553 | ||
554 | desc->chip->mask(IRQ_EXPANSIONCARD); | 554 | desc->irq_data.chip->irq_mask(&desc->irq_data); |
555 | ecard_dump_irq_state(); | 555 | ecard_dump_irq_state(); |
556 | } | 556 | } |
557 | } else | 557 | } else |
@@ -574,7 +574,7 @@ ecard_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
574 | ecard_t *ec; | 574 | ecard_t *ec; |
575 | int called = 0; | 575 | int called = 0; |
576 | 576 | ||
577 | desc->chip->mask(irq); | 577 | desc->irq_data.chip->irq_mask(&desc->irq_data); |
578 | for (ec = cards; ec; ec = ec->next) { | 578 | for (ec = cards; ec; ec = ec->next) { |
579 | int pending; | 579 | int pending; |
580 | 580 | ||
@@ -591,7 +591,7 @@ ecard_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
591 | called ++; | 591 | called ++; |
592 | } | 592 | } |
593 | } | 593 | } |
594 | desc->chip->unmask(irq); | 594 | desc->irq_data.chip->irq_unmask(&desc->irq_data); |
595 | 595 | ||
596 | if (called == 0) | 596 | if (called == 0) |
597 | ecard_check_lockup(desc); | 597 | ecard_check_lockup(desc); |
diff --git a/arch/arm/kernel/head-common.S b/arch/arm/kernel/head-common.S index bbecaac1e01..8f57515bbdb 100644 --- a/arch/arm/kernel/head-common.S +++ b/arch/arm/kernel/head-common.S | |||
@@ -60,6 +60,8 @@ str_a1: .asciz "\nError: unrecognized/unsupported machine ID (r1 = 0x" | |||
60 | str_a2: .asciz ").\n\nAvailable machine support:\n\nID (hex)\tNAME\n" | 60 | str_a2: .asciz ").\n\nAvailable machine support:\n\nID (hex)\tNAME\n" |
61 | str_a3: .asciz "\nPlease check your kernel config and/or bootloader.\n" | 61 | str_a3: .asciz "\nPlease check your kernel config and/or bootloader.\n" |
62 | .align | 62 | .align |
63 | #else | ||
64 | b __error | ||
63 | #endif | 65 | #endif |
64 | 66 | ||
65 | /* | 67 | /* |
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index f17d9a09e8f..c0225da3fb2 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S | |||
@@ -392,24 +392,22 @@ ENDPROC(__turn_mmu_on) | |||
392 | 392 | ||
393 | #ifdef CONFIG_SMP_ON_UP | 393 | #ifdef CONFIG_SMP_ON_UP |
394 | __fixup_smp: | 394 | __fixup_smp: |
395 | mov r4, #0x00070000 | 395 | and r3, r9, #0x000f0000 @ architecture version |
396 | orr r3, r4, #0xff000000 @ mask 0xff070000 | 396 | teq r3, #0x000f0000 @ CPU ID supported? |
397 | orr r4, r4, #0x41000000 @ val 0x41070000 | ||
398 | and r0, r9, r3 | ||
399 | teq r0, r4 @ ARM CPU and ARMv6/v7? | ||
400 | bne __fixup_smp_on_up @ no, assume UP | 397 | bne __fixup_smp_on_up @ no, assume UP |
401 | 398 | ||
402 | orr r3, r3, #0x0000ff00 | 399 | bic r3, r9, #0x00ff0000 |
403 | orr r3, r3, #0x000000f0 @ mask 0xff07fff0 | 400 | bic r3, r3, #0x0000000f @ mask 0xff00fff0 |
401 | mov r4, #0x41000000 | ||
404 | orr r4, r4, #0x0000b000 | 402 | orr r4, r4, #0x0000b000 |
405 | orr r4, r4, #0x00000020 @ val 0x4107b020 | 403 | orr r4, r4, #0x00000020 @ val 0x4100b020 |
406 | and r0, r9, r3 | 404 | teq r3, r4 @ ARM 11MPCore? |
407 | teq r0, r4 @ ARM 11MPCore? | ||
408 | moveq pc, lr @ yes, assume SMP | 405 | moveq pc, lr @ yes, assume SMP |
409 | 406 | ||
410 | mrc p15, 0, r0, c0, c0, 5 @ read MPIDR | 407 | mrc p15, 0, r0, c0, c0, 5 @ read MPIDR |
411 | tst r0, #1 << 31 | 408 | and r0, r0, #0xc0000000 @ multiprocessing extensions and |
412 | movne pc, lr @ bit 31 => SMP | 409 | teq r0, #0x80000000 @ not part of a uniprocessor system? |
410 | moveq pc, lr @ yes, assume SMP | ||
413 | 411 | ||
414 | __fixup_smp_on_up: | 412 | __fixup_smp_on_up: |
415 | adr r0, 1f | 413 | adr r0, 1f |
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index 8135438b881..28536e352de 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c | |||
@@ -88,7 +88,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
88 | seq_printf(p, "%*d: ", prec, i); | 88 | seq_printf(p, "%*d: ", prec, i); |
89 | for_each_present_cpu(cpu) | 89 | for_each_present_cpu(cpu) |
90 | seq_printf(p, "%10u ", kstat_irqs_cpu(i, cpu)); | 90 | seq_printf(p, "%10u ", kstat_irqs_cpu(i, cpu)); |
91 | seq_printf(p, " %10s", desc->chip->name ? : "-"); | 91 | seq_printf(p, " %10s", desc->irq_data.chip->name ? : "-"); |
92 | seq_printf(p, " %s", action->name); | 92 | seq_printf(p, " %s", action->name); |
93 | for (action = action->next; action; action = action->next) | 93 | for (action = action->next; action; action = action->next) |
94 | seq_printf(p, ", %s", action->name); | 94 | seq_printf(p, ", %s", action->name); |
@@ -181,10 +181,11 @@ int __init arch_probe_nr_irqs(void) | |||
181 | 181 | ||
182 | static void route_irq(struct irq_desc *desc, unsigned int irq, unsigned int cpu) | 182 | static void route_irq(struct irq_desc *desc, unsigned int irq, unsigned int cpu) |
183 | { | 183 | { |
184 | pr_debug("IRQ%u: moving from cpu%u to cpu%u\n", irq, desc->node, cpu); | 184 | pr_debug("IRQ%u: moving from cpu%u to cpu%u\n", irq, desc->irq_data.node, cpu); |
185 | 185 | ||
186 | raw_spin_lock_irq(&desc->lock); | 186 | raw_spin_lock_irq(&desc->lock); |
187 | desc->chip->set_affinity(irq, cpumask_of(cpu)); | 187 | desc->irq_data.chip->irq_set_affinity(&desc->irq_data, |
188 | cpumask_of(cpu), false); | ||
188 | raw_spin_unlock_irq(&desc->lock); | 189 | raw_spin_unlock_irq(&desc->lock); |
189 | } | 190 | } |
190 | 191 | ||
@@ -199,16 +200,18 @@ void migrate_irqs(void) | |||
199 | struct irq_desc *desc; | 200 | struct irq_desc *desc; |
200 | 201 | ||
201 | for_each_irq_desc(i, desc) { | 202 | for_each_irq_desc(i, desc) { |
202 | if (desc->node == cpu) { | 203 | struct irq_data *d = &desc->irq_data; |
203 | unsigned int newcpu = cpumask_any_and(desc->affinity, | 204 | |
205 | if (d->node == cpu) { | ||
206 | unsigned int newcpu = cpumask_any_and(d->affinity, | ||
204 | cpu_online_mask); | 207 | cpu_online_mask); |
205 | if (newcpu >= nr_cpu_ids) { | 208 | if (newcpu >= nr_cpu_ids) { |
206 | if (printk_ratelimit()) | 209 | if (printk_ratelimit()) |
207 | printk(KERN_INFO "IRQ%u no longer affine to CPU%u\n", | 210 | printk(KERN_INFO "IRQ%u no longer affine to CPU%u\n", |
208 | i, cpu); | 211 | i, cpu); |
209 | 212 | ||
210 | cpumask_setall(desc->affinity); | 213 | cpumask_setall(d->affinity); |
211 | newcpu = cpumask_any_and(desc->affinity, | 214 | newcpu = cpumask_any_and(d->affinity, |
212 | cpu_online_mask); | 215 | cpu_online_mask); |
213 | } | 216 | } |
214 | 217 | ||
diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c index 0c1bb68ff4a..2cfe8161b47 100644 --- a/arch/arm/kernel/module.c +++ b/arch/arm/kernel/module.c | |||
@@ -38,17 +38,9 @@ | |||
38 | #ifdef CONFIG_MMU | 38 | #ifdef CONFIG_MMU |
39 | void *module_alloc(unsigned long size) | 39 | void *module_alloc(unsigned long size) |
40 | { | 40 | { |
41 | struct vm_struct *area; | 41 | return __vmalloc_node_range(size, 1, MODULES_VADDR, MODULES_END, |
42 | 42 | GFP_KERNEL, PAGE_KERNEL_EXEC, -1, | |
43 | size = PAGE_ALIGN(size); | 43 | __builtin_return_address(0)); |
44 | if (!size) | ||
45 | return NULL; | ||
46 | |||
47 | area = __get_vm_area(size, VM_ALLOC, MODULES_VADDR, MODULES_END); | ||
48 | if (!area) | ||
49 | return NULL; | ||
50 | |||
51 | return __vmalloc_area(area, GFP_KERNEL, PAGE_KERNEL_EXEC); | ||
52 | } | 44 | } |
53 | #else /* CONFIG_MMU */ | 45 | #else /* CONFIG_MMU */ |
54 | void *module_alloc(unsigned long size) | 46 | void *module_alloc(unsigned long size) |
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index e76fcaadce0..94bbedbed63 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
@@ -483,6 +483,7 @@ unsigned long arch_randomize_brk(struct mm_struct *mm) | |||
483 | return randomize_range(mm->brk, range_end, 0) ? : mm->brk; | 483 | return randomize_range(mm->brk, range_end, 0) ? : mm->brk; |
484 | } | 484 | } |
485 | 485 | ||
486 | #ifdef CONFIG_MMU | ||
486 | /* | 487 | /* |
487 | * The vectors page is always readable from user space for the | 488 | * The vectors page is always readable from user space for the |
488 | * atomic helpers and the signal restart code. Let's declare a mapping | 489 | * atomic helpers and the signal restart code. Let's declare a mapping |
@@ -503,3 +504,4 @@ const char *arch_vma_name(struct vm_area_struct *vma) | |||
503 | { | 504 | { |
504 | return (vma->vm_start == 0xffff0000) ? "[vectors]" : NULL; | 505 | return (vma->vm_start == 0xffff0000) ? "[vectors]" : NULL; |
505 | } | 506 | } |
507 | #endif | ||
diff --git a/arch/arm/kernel/sched_clock.c b/arch/arm/kernel/sched_clock.c index 2cdcc9287c7..9a46370fe9d 100644 --- a/arch/arm/kernel/sched_clock.c +++ b/arch/arm/kernel/sched_clock.c | |||
@@ -34,7 +34,7 @@ void __init init_sched_clock(struct clock_data *cd, void (*update)(void), | |||
34 | sched_clock_update_fn = update; | 34 | sched_clock_update_fn = update; |
35 | 35 | ||
36 | /* calculate the mult/shift to convert counter ticks to ns. */ | 36 | /* calculate the mult/shift to convert counter ticks to ns. */ |
37 | clocks_calc_mult_shift(&cd->mult, &cd->shift, rate, NSEC_PER_SEC, 60); | 37 | clocks_calc_mult_shift(&cd->mult, &cd->shift, rate, NSEC_PER_SEC, 0); |
38 | 38 | ||
39 | r = rate; | 39 | r = rate; |
40 | if (r >= 4000000) { | 40 | if (r >= 4000000) { |
@@ -60,10 +60,15 @@ void __init init_sched_clock(struct clock_data *cd, void (*update)(void), | |||
60 | * sets the initial epoch. | 60 | * sets the initial epoch. |
61 | */ | 61 | */ |
62 | sched_clock_timer.data = msecs_to_jiffies(w - (w / 10)); | 62 | sched_clock_timer.data = msecs_to_jiffies(w - (w / 10)); |
63 | sched_clock_poll(sched_clock_timer.data); | 63 | update(); |
64 | 64 | ||
65 | /* | 65 | /* |
66 | * Ensure that sched_clock() starts off at 0ns | 66 | * Ensure that sched_clock() starts off at 0ns |
67 | */ | 67 | */ |
68 | cd->epoch_ns = 0; | 68 | cd->epoch_ns = 0; |
69 | } | 69 | } |
70 | |||
71 | void __init sched_clock_postinit(void) | ||
72 | { | ||
73 | sched_clock_poll(sched_clock_timer.data); | ||
74 | } | ||
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 3455ad33de4..420b8d6485d 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -518,25 +518,21 @@ setup_ramdisk(int doload, int prompt, int image_start, unsigned int rd_sz) | |||
518 | #endif | 518 | #endif |
519 | } | 519 | } |
520 | 520 | ||
521 | static void __init | 521 | static void __init request_standard_resources(struct machine_desc *mdesc) |
522 | request_standard_resources(struct meminfo *mi, struct machine_desc *mdesc) | ||
523 | { | 522 | { |
523 | struct memblock_region *region; | ||
524 | struct resource *res; | 524 | struct resource *res; |
525 | int i; | ||
526 | 525 | ||
527 | kernel_code.start = virt_to_phys(_text); | 526 | kernel_code.start = virt_to_phys(_text); |
528 | kernel_code.end = virt_to_phys(_etext - 1); | 527 | kernel_code.end = virt_to_phys(_etext - 1); |
529 | kernel_data.start = virt_to_phys(_sdata); | 528 | kernel_data.start = virt_to_phys(_sdata); |
530 | kernel_data.end = virt_to_phys(_end - 1); | 529 | kernel_data.end = virt_to_phys(_end - 1); |
531 | 530 | ||
532 | for (i = 0; i < mi->nr_banks; i++) { | 531 | for_each_memblock(memory, region) { |
533 | if (mi->bank[i].size == 0) | ||
534 | continue; | ||
535 | |||
536 | res = alloc_bootmem_low(sizeof(*res)); | 532 | res = alloc_bootmem_low(sizeof(*res)); |
537 | res->name = "System RAM"; | 533 | res->name = "System RAM"; |
538 | res->start = mi->bank[i].start; | 534 | res->start = __pfn_to_phys(memblock_region_memory_base_pfn(region)); |
539 | res->end = mi->bank[i].start + mi->bank[i].size - 1; | 535 | res->end = __pfn_to_phys(memblock_region_memory_end_pfn(region)) - 1; |
540 | res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; | 536 | res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; |
541 | 537 | ||
542 | request_resource(&iomem_resource, res); | 538 | request_resource(&iomem_resource, res); |
@@ -650,15 +646,17 @@ static int __init parse_tag_revision(const struct tag *tag) | |||
650 | 646 | ||
651 | __tagtable(ATAG_REVISION, parse_tag_revision); | 647 | __tagtable(ATAG_REVISION, parse_tag_revision); |
652 | 648 | ||
653 | #ifndef CONFIG_CMDLINE_FORCE | ||
654 | static int __init parse_tag_cmdline(const struct tag *tag) | 649 | static int __init parse_tag_cmdline(const struct tag *tag) |
655 | { | 650 | { |
651 | #ifndef CONFIG_CMDLINE_FORCE | ||
656 | strlcpy(default_command_line, tag->u.cmdline.cmdline, COMMAND_LINE_SIZE); | 652 | strlcpy(default_command_line, tag->u.cmdline.cmdline, COMMAND_LINE_SIZE); |
653 | #else | ||
654 | pr_warning("Ignoring tag cmdline (using the default kernel command line)\n"); | ||
655 | #endif /* CONFIG_CMDLINE_FORCE */ | ||
657 | return 0; | 656 | return 0; |
658 | } | 657 | } |
659 | 658 | ||
660 | __tagtable(ATAG_CMDLINE, parse_tag_cmdline); | 659 | __tagtable(ATAG_CMDLINE, parse_tag_cmdline); |
661 | #endif /* CONFIG_CMDLINE_FORCE */ | ||
662 | 660 | ||
663 | /* | 661 | /* |
664 | * Scan the tag table for this tag, and call its parse function. | 662 | * Scan the tag table for this tag, and call its parse function. |
@@ -857,7 +855,7 @@ void __init setup_arch(char **cmdline_p) | |||
857 | arm_memblock_init(&meminfo, mdesc); | 855 | arm_memblock_init(&meminfo, mdesc); |
858 | 856 | ||
859 | paging_init(mdesc); | 857 | paging_init(mdesc); |
860 | request_standard_resources(&meminfo, mdesc); | 858 | request_standard_resources(mdesc); |
861 | 859 | ||
862 | #ifdef CONFIG_SMP | 860 | #ifdef CONFIG_SMP |
863 | if (is_smp()) | 861 | if (is_smp()) |
diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c index dd790745b3e..60636f499cb 100644 --- a/arch/arm/kernel/smp_twd.c +++ b/arch/arm/kernel/smp_twd.c | |||
@@ -36,6 +36,7 @@ static void twd_set_mode(enum clock_event_mode mode, | |||
36 | /* timer load already set up */ | 36 | /* timer load already set up */ |
37 | ctrl = TWD_TIMER_CONTROL_ENABLE | TWD_TIMER_CONTROL_IT_ENABLE | 37 | ctrl = TWD_TIMER_CONTROL_ENABLE | TWD_TIMER_CONTROL_IT_ENABLE |
38 | | TWD_TIMER_CONTROL_PERIODIC; | 38 | | TWD_TIMER_CONTROL_PERIODIC; |
39 | __raw_writel(twd_timer_rate / HZ, twd_base + TWD_TIMER_LOAD); | ||
39 | break; | 40 | break; |
40 | case CLOCK_EVT_MODE_ONESHOT: | 41 | case CLOCK_EVT_MODE_ONESHOT: |
41 | /* period set, and timer enabled in 'next_event' hook */ | 42 | /* period set, and timer enabled in 'next_event' hook */ |
@@ -81,7 +82,7 @@ int twd_timer_ack(void) | |||
81 | 82 | ||
82 | static void __cpuinit twd_calibrate_rate(void) | 83 | static void __cpuinit twd_calibrate_rate(void) |
83 | { | 84 | { |
84 | unsigned long load, count; | 85 | unsigned long count; |
85 | u64 waitjiffies; | 86 | u64 waitjiffies; |
86 | 87 | ||
87 | /* | 88 | /* |
@@ -114,12 +115,8 @@ static void __cpuinit twd_calibrate_rate(void) | |||
114 | twd_timer_rate = (0xFFFFFFFFU - count) * (HZ / 5); | 115 | twd_timer_rate = (0xFFFFFFFFU - count) * (HZ / 5); |
115 | 116 | ||
116 | printk("%lu.%02luMHz.\n", twd_timer_rate / 1000000, | 117 | printk("%lu.%02luMHz.\n", twd_timer_rate / 1000000, |
117 | (twd_timer_rate / 100000) % 100); | 118 | (twd_timer_rate / 1000000) % 100); |
118 | } | 119 | } |
119 | |||
120 | load = twd_timer_rate / HZ; | ||
121 | |||
122 | __raw_writel(load, twd_base + TWD_TIMER_LOAD); | ||
123 | } | 120 | } |
124 | 121 | ||
125 | /* | 122 | /* |
diff --git a/arch/arm/kernel/stacktrace.c b/arch/arm/kernel/stacktrace.c index c2e112e1a05..381d23a497c 100644 --- a/arch/arm/kernel/stacktrace.c +++ b/arch/arm/kernel/stacktrace.c | |||
@@ -94,10 +94,13 @@ void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace) | |||
94 | if (tsk != current) { | 94 | if (tsk != current) { |
95 | #ifdef CONFIG_SMP | 95 | #ifdef CONFIG_SMP |
96 | /* | 96 | /* |
97 | * What guarantees do we have here that 'tsk' | 97 | * What guarantees do we have here that 'tsk' is not |
98 | * is not running on another CPU? | 98 | * running on another CPU? For now, ignore it as we |
99 | * can't guarantee we won't explode. | ||
99 | */ | 100 | */ |
100 | BUG(); | 101 | if (trace->nr_entries < trace->max_entries) |
102 | trace->entries[trace->nr_entries++] = ULONG_MAX; | ||
103 | return; | ||
101 | #else | 104 | #else |
102 | data.no_sched_functions = 1; | 105 | data.no_sched_functions = 1; |
103 | frame.fp = thread_saved_fp(tsk); | 106 | frame.fp = thread_saved_fp(tsk); |
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index f1e2eb19a67..3d76bf23373 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c | |||
@@ -29,6 +29,7 @@ | |||
29 | 29 | ||
30 | #include <asm/leds.h> | 30 | #include <asm/leds.h> |
31 | #include <asm/thread_info.h> | 31 | #include <asm/thread_info.h> |
32 | #include <asm/sched_clock.h> | ||
32 | #include <asm/stacktrace.h> | 33 | #include <asm/stacktrace.h> |
33 | #include <asm/mach/arch.h> | 34 | #include <asm/mach/arch.h> |
34 | #include <asm/mach/time.h> | 35 | #include <asm/mach/time.h> |
@@ -163,5 +164,8 @@ void __init time_init(void) | |||
163 | { | 164 | { |
164 | system_timer = machine_desc->timer; | 165 | system_timer = machine_desc->timer; |
165 | system_timer->init(); | 166 | system_timer->init(); |
167 | #ifdef CONFIG_HAVE_SCHED_CLOCK | ||
168 | sched_clock_postinit(); | ||
169 | #endif | ||
166 | } | 170 | } |
167 | 171 | ||
diff --git a/arch/arm/lib/delay.S b/arch/arm/lib/delay.S index 8d6a8762ab8..3c9a05c8d20 100644 --- a/arch/arm/lib/delay.S +++ b/arch/arm/lib/delay.S | |||
@@ -25,11 +25,15 @@ ENTRY(__udelay) | |||
25 | ldr r2, .LC1 | 25 | ldr r2, .LC1 |
26 | mul r0, r2, r0 | 26 | mul r0, r2, r0 |
27 | ENTRY(__const_udelay) @ 0 <= r0 <= 0x7fffff06 | 27 | ENTRY(__const_udelay) @ 0 <= r0 <= 0x7fffff06 |
28 | mov r1, #-1 | ||
28 | ldr r2, .LC0 | 29 | ldr r2, .LC0 |
29 | ldr r2, [r2] @ max = 0x01ffffff | 30 | ldr r2, [r2] @ max = 0x01ffffff |
31 | add r0, r0, r1, lsr #32-14 | ||
30 | mov r0, r0, lsr #14 @ max = 0x0001ffff | 32 | mov r0, r0, lsr #14 @ max = 0x0001ffff |
33 | add r2, r2, r1, lsr #32-10 | ||
31 | mov r2, r2, lsr #10 @ max = 0x00007fff | 34 | mov r2, r2, lsr #10 @ max = 0x00007fff |
32 | mul r0, r2, r0 @ max = 2^32-1 | 35 | mul r0, r2, r0 @ max = 2^32-1 |
36 | add r0, r0, r1, lsr #32-6 | ||
33 | movs r0, r0, lsr #6 | 37 | movs r0, r0, lsr #6 |
34 | moveq pc, lr | 38 | moveq pc, lr |
35 | 39 | ||
diff --git a/arch/arm/mach-aaec2000/core.c b/arch/arm/mach-aaec2000/core.c index 3ef68330452..f8465bd17e6 100644 --- a/arch/arm/mach-aaec2000/core.c +++ b/arch/arm/mach-aaec2000/core.c | |||
@@ -68,25 +68,25 @@ void __init aaec2000_map_io(void) | |||
68 | /* | 68 | /* |
69 | * Interrupt handling routines | 69 | * Interrupt handling routines |
70 | */ | 70 | */ |
71 | static void aaec2000_int_ack(unsigned int irq) | 71 | static void aaec2000_int_ack(struct irq_data *d) |
72 | { | 72 | { |
73 | IRQ_INTSR = 1 << irq; | 73 | IRQ_INTSR = 1 << d->irq; |
74 | } | 74 | } |
75 | 75 | ||
76 | static void aaec2000_int_mask(unsigned int irq) | 76 | static void aaec2000_int_mask(struct irq_data *d) |
77 | { | 77 | { |
78 | IRQ_INTENC |= (1 << irq); | 78 | IRQ_INTENC |= (1 << d->irq); |
79 | } | 79 | } |
80 | 80 | ||
81 | static void aaec2000_int_unmask(unsigned int irq) | 81 | static void aaec2000_int_unmask(struct irq_data *d) |
82 | { | 82 | { |
83 | IRQ_INTENS |= (1 << irq); | 83 | IRQ_INTENS |= (1 << d->irq); |
84 | } | 84 | } |
85 | 85 | ||
86 | static struct irq_chip aaec2000_irq_chip = { | 86 | static struct irq_chip aaec2000_irq_chip = { |
87 | .ack = aaec2000_int_ack, | 87 | .irq_ack = aaec2000_int_ack, |
88 | .mask = aaec2000_int_mask, | 88 | .irq_mask = aaec2000_int_mask, |
89 | .unmask = aaec2000_int_unmask, | 89 | .irq_unmask = aaec2000_int_unmask, |
90 | }; | 90 | }; |
91 | 91 | ||
92 | void __init aaec2000_init_irq(void) | 92 | void __init aaec2000_init_irq(void) |
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index c015b684b4f..19390231a0e 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig | |||
@@ -362,6 +362,12 @@ config MACH_CPU9G20 | |||
362 | Select this if you are using a Eukrea Electromatique's | 362 | Select this if you are using a Eukrea Electromatique's |
363 | CPU9G20 Board <http://www.eukrea.com/> | 363 | CPU9G20 Board <http://www.eukrea.com/> |
364 | 364 | ||
365 | config MACH_ACMENETUSFOXG20 | ||
366 | bool "Acme Systems srl FOX Board G20" | ||
367 | help | ||
368 | Select this if you are using Acme Systems | ||
369 | FOX Board G20 <http://www.acmesystems.it> | ||
370 | |||
365 | config MACH_PORTUXG20 | 371 | config MACH_PORTUXG20 |
366 | bool "taskit PortuxG20" | 372 | bool "taskit PortuxG20" |
367 | help | 373 | help |
@@ -381,6 +387,13 @@ config MACH_PCONTROL_G20 | |||
381 | Select this if you are using taskit's Stamp9G20 CPU module on this | 387 | Select this if you are using taskit's Stamp9G20 CPU module on this |
382 | carrier board, beeing the decentralized unit of a building automation | 388 | carrier board, beeing the decentralized unit of a building automation |
383 | system; featuring nvram, eth-switch, iso-rs485, display, io | 389 | system; featuring nvram, eth-switch, iso-rs485, display, io |
390 | |||
391 | config MACH_GSIA18S | ||
392 | bool "GS_IA18_S board" | ||
393 | help | ||
394 | This enables support for the GS_IA18_S board | ||
395 | produced by GeoSIG Ltd company. This is an internet accelerograph. | ||
396 | <http://www.geosig.com> | ||
384 | endif | 397 | endif |
385 | 398 | ||
386 | if (ARCH_AT91SAM9260 || ARCH_AT91SAM9G20) | 399 | if (ARCH_AT91SAM9260 || ARCH_AT91SAM9G20) |
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile index d13add71f72..a83835e0c18 100644 --- a/arch/arm/mach-at91/Makefile +++ b/arch/arm/mach-at91/Makefile | |||
@@ -63,9 +63,11 @@ obj-$(CONFIG_MACH_AT91SAM9RLEK) += board-sam9rlek.o | |||
63 | # AT91SAM9G20 board-specific support | 63 | # AT91SAM9G20 board-specific support |
64 | obj-$(CONFIG_MACH_AT91SAM9G20EK) += board-sam9g20ek.o | 64 | obj-$(CONFIG_MACH_AT91SAM9G20EK) += board-sam9g20ek.o |
65 | obj-$(CONFIG_MACH_CPU9G20) += board-cpu9krea.o | 65 | obj-$(CONFIG_MACH_CPU9G20) += board-cpu9krea.o |
66 | obj-$(CONFIG_MACH_ACMENETUSFOXG20) += board-foxg20.o | ||
66 | obj-$(CONFIG_MACH_STAMP9G20) += board-stamp9g20.o | 67 | obj-$(CONFIG_MACH_STAMP9G20) += board-stamp9g20.o |
67 | obj-$(CONFIG_MACH_PORTUXG20) += board-stamp9g20.o | 68 | obj-$(CONFIG_MACH_PORTUXG20) += board-stamp9g20.o |
68 | obj-$(CONFIG_MACH_PCONTROL_G20) += board-pcontrol-g20.o board-stamp9g20.o | 69 | obj-$(CONFIG_MACH_PCONTROL_G20) += board-pcontrol-g20.o board-stamp9g20.o |
70 | obj-$(CONFIG_MACH_GSIA18S) += board-gsia18s.o board-stamp9g20.o | ||
69 | 71 | ||
70 | # AT91SAM9260/AT91SAM9G20 board-specific support | 72 | # AT91SAM9260/AT91SAM9G20 board-specific support |
71 | obj-$(CONFIG_MACH_SNAPPER_9260) += board-snapper9260.o | 73 | obj-$(CONFIG_MACH_SNAPPER_9260) += board-snapper9260.o |
diff --git a/arch/arm/mach-at91/board-foxg20.c b/arch/arm/mach-at91/board-foxg20.c new file mode 100644 index 00000000000..dfc7dfe738e --- /dev/null +++ b/arch/arm/mach-at91/board-foxg20.c | |||
@@ -0,0 +1,274 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2005 SAN People | ||
3 | * Copyright (C) 2008 Atmel | ||
4 | * Copyright (C) 2010 Lee McLoughlin - lee@lmmrtech.com | ||
5 | * Copyright (C) 2010 Sergio Tanzilli - tanzilli@acmesystems.it | ||
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 as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | */ | ||
21 | |||
22 | #include <linux/types.h> | ||
23 | #include <linux/init.h> | ||
24 | #include <linux/mm.h> | ||
25 | #include <linux/module.h> | ||
26 | #include <linux/platform_device.h> | ||
27 | #include <linux/spi/spi.h> | ||
28 | #include <linux/spi/at73c213.h> | ||
29 | #include <linux/gpio.h> | ||
30 | #include <linux/gpio_keys.h> | ||
31 | #include <linux/input.h> | ||
32 | #include <linux/clk.h> | ||
33 | #include <linux/w1-gpio.h> | ||
34 | |||
35 | #include <mach/hardware.h> | ||
36 | #include <asm/setup.h> | ||
37 | #include <asm/mach-types.h> | ||
38 | #include <asm/irq.h> | ||
39 | |||
40 | #include <asm/mach/arch.h> | ||
41 | #include <asm/mach/map.h> | ||
42 | #include <asm/mach/irq.h> | ||
43 | |||
44 | #include <mach/board.h> | ||
45 | #include <mach/at91sam9_smc.h> | ||
46 | |||
47 | #include "sam9_smc.h" | ||
48 | #include "generic.h" | ||
49 | |||
50 | /* | ||
51 | * The FOX Board G20 hardware comes as the "Netus G20" board with | ||
52 | * just the cpu, ram, dataflash and two header connectors. | ||
53 | * This is plugged into the FOX Board which provides the ethernet, | ||
54 | * usb, rtc, leds, switch, ... | ||
55 | * | ||
56 | * For more info visit: http://www.acmesystems.it/foxg20 | ||
57 | */ | ||
58 | |||
59 | |||
60 | static void __init foxg20_map_io(void) | ||
61 | { | ||
62 | /* Initialize processor: 18.432 MHz crystal */ | ||
63 | at91sam9260_initialize(18432000); | ||
64 | |||
65 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
66 | at91_register_uart(0, 0, 0); | ||
67 | |||
68 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
69 | at91_register_uart(AT91SAM9260_ID_US0, 1, | ||
70 | ATMEL_UART_CTS | ||
71 | | ATMEL_UART_RTS | ||
72 | | ATMEL_UART_DTR | ||
73 | | ATMEL_UART_DSR | ||
74 | | ATMEL_UART_DCD | ||
75 | | ATMEL_UART_RI); | ||
76 | |||
77 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
78 | at91_register_uart(AT91SAM9260_ID_US1, 2, | ||
79 | ATMEL_UART_CTS | ||
80 | | ATMEL_UART_RTS); | ||
81 | |||
82 | /* USART2 on ttyS3. (Rx & Tx only) */ | ||
83 | at91_register_uart(AT91SAM9260_ID_US2, 3, 0); | ||
84 | |||
85 | /* USART3 on ttyS4. (Rx, Tx, RTS, CTS) */ | ||
86 | at91_register_uart(AT91SAM9260_ID_US3, 4, | ||
87 | ATMEL_UART_CTS | ||
88 | | ATMEL_UART_RTS); | ||
89 | |||
90 | /* USART4 on ttyS5. (Rx & Tx only) */ | ||
91 | at91_register_uart(AT91SAM9260_ID_US4, 5, 0); | ||
92 | |||
93 | /* USART5 on ttyS6. (Rx & Tx only) */ | ||
94 | at91_register_uart(AT91SAM9260_ID_US5, 6, 0); | ||
95 | |||
96 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
97 | at91_set_serial_console(0); | ||
98 | |||
99 | /* Set the internal pull-up resistor on DRXD */ | ||
100 | at91_set_A_periph(AT91_PIN_PB14, 1); | ||
101 | |||
102 | } | ||
103 | |||
104 | static void __init foxg20_init_irq(void) | ||
105 | { | ||
106 | at91sam9260_init_interrupts(NULL); | ||
107 | } | ||
108 | |||
109 | |||
110 | /* | ||
111 | * USB Host port | ||
112 | */ | ||
113 | static struct at91_usbh_data __initdata foxg20_usbh_data = { | ||
114 | .ports = 2, | ||
115 | }; | ||
116 | |||
117 | /* | ||
118 | * USB Device port | ||
119 | */ | ||
120 | static struct at91_udc_data __initdata foxg20_udc_data = { | ||
121 | .vbus_pin = AT91_PIN_PC6, | ||
122 | .pullup_pin = 0, /* pull-up driven by UDC */ | ||
123 | }; | ||
124 | |||
125 | |||
126 | /* | ||
127 | * SPI devices. | ||
128 | */ | ||
129 | static struct spi_board_info foxg20_spi_devices[] = { | ||
130 | #if !defined(CONFIG_MMC_AT91) | ||
131 | { | ||
132 | .modalias = "mtd_dataflash", | ||
133 | .chip_select = 1, | ||
134 | .max_speed_hz = 15 * 1000 * 1000, | ||
135 | .bus_num = 0, | ||
136 | }, | ||
137 | #endif | ||
138 | }; | ||
139 | |||
140 | |||
141 | /* | ||
142 | * MACB Ethernet device | ||
143 | */ | ||
144 | static struct at91_eth_data __initdata foxg20_macb_data = { | ||
145 | .phy_irq_pin = AT91_PIN_PA7, | ||
146 | .is_rmii = 1, | ||
147 | }; | ||
148 | |||
149 | /* | ||
150 | * MCI (SD/MMC) | ||
151 | * det_pin, wp_pin and vcc_pin are not connected | ||
152 | */ | ||
153 | static struct at91_mmc_data __initdata foxg20_mmc_data = { | ||
154 | .slot_b = 1, | ||
155 | .wire4 = 1, | ||
156 | }; | ||
157 | |||
158 | |||
159 | /* | ||
160 | * LEDs | ||
161 | */ | ||
162 | static struct gpio_led foxg20_leds[] = { | ||
163 | { /* user led, red */ | ||
164 | .name = "user_led", | ||
165 | .gpio = AT91_PIN_PC7, | ||
166 | .active_low = 0, | ||
167 | .default_trigger = "heartbeat", | ||
168 | }, | ||
169 | }; | ||
170 | |||
171 | |||
172 | /* | ||
173 | * GPIO Buttons | ||
174 | */ | ||
175 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | ||
176 | static struct gpio_keys_button foxg20_buttons[] = { | ||
177 | { | ||
178 | .gpio = AT91_PIN_PC4, | ||
179 | .code = BTN_1, | ||
180 | .desc = "Button 1", | ||
181 | .active_low = 1, | ||
182 | .wakeup = 1, | ||
183 | }, | ||
184 | }; | ||
185 | |||
186 | static struct gpio_keys_platform_data foxg20_button_data = { | ||
187 | .buttons = foxg20_buttons, | ||
188 | .nbuttons = ARRAY_SIZE(foxg20_buttons), | ||
189 | }; | ||
190 | |||
191 | static struct platform_device foxg20_button_device = { | ||
192 | .name = "gpio-keys", | ||
193 | .id = -1, | ||
194 | .num_resources = 0, | ||
195 | .dev = { | ||
196 | .platform_data = &foxg20_button_data, | ||
197 | } | ||
198 | }; | ||
199 | |||
200 | static void __init foxg20_add_device_buttons(void) | ||
201 | { | ||
202 | at91_set_gpio_input(AT91_PIN_PC4, 1); /* btn1 */ | ||
203 | at91_set_deglitch(AT91_PIN_PC4, 1); | ||
204 | |||
205 | platform_device_register(&foxg20_button_device); | ||
206 | } | ||
207 | #else | ||
208 | static void __init foxg20_add_device_buttons(void) {} | ||
209 | #endif | ||
210 | |||
211 | |||
212 | #if defined(CONFIG_W1_MASTER_GPIO) || defined(CONFIG_W1_MASTER_GPIO_MODULE) | ||
213 | static struct w1_gpio_platform_data w1_gpio_pdata = { | ||
214 | /* If you choose to use a pin other than PB16 it needs to be 3.3V */ | ||
215 | .pin = AT91_PIN_PB16, | ||
216 | .is_open_drain = 1, | ||
217 | }; | ||
218 | |||
219 | static struct platform_device w1_device = { | ||
220 | .name = "w1-gpio", | ||
221 | .id = -1, | ||
222 | .dev.platform_data = &w1_gpio_pdata, | ||
223 | }; | ||
224 | |||
225 | static void __init at91_add_device_w1(void) | ||
226 | { | ||
227 | at91_set_GPIO_periph(w1_gpio_pdata.pin, 1); | ||
228 | at91_set_multi_drive(w1_gpio_pdata.pin, 1); | ||
229 | platform_device_register(&w1_device); | ||
230 | } | ||
231 | |||
232 | #endif | ||
233 | |||
234 | |||
235 | static struct i2c_board_info __initdata foxg20_i2c_devices[] = { | ||
236 | { | ||
237 | I2C_BOARD_INFO("24c512", 0x50), | ||
238 | }, | ||
239 | }; | ||
240 | |||
241 | |||
242 | static void __init foxg20_board_init(void) | ||
243 | { | ||
244 | /* Serial */ | ||
245 | at91_add_device_serial(); | ||
246 | /* USB Host */ | ||
247 | at91_add_device_usbh(&foxg20_usbh_data); | ||
248 | /* USB Device */ | ||
249 | at91_add_device_udc(&foxg20_udc_data); | ||
250 | /* SPI */ | ||
251 | at91_add_device_spi(foxg20_spi_devices, ARRAY_SIZE(foxg20_spi_devices)); | ||
252 | /* Ethernet */ | ||
253 | at91_add_device_eth(&foxg20_macb_data); | ||
254 | /* MMC */ | ||
255 | at91_add_device_mmc(0, &foxg20_mmc_data); | ||
256 | /* I2C */ | ||
257 | at91_add_device_i2c(foxg20_i2c_devices, ARRAY_SIZE(foxg20_i2c_devices)); | ||
258 | /* LEDs */ | ||
259 | at91_gpio_leds(foxg20_leds, ARRAY_SIZE(foxg20_leds)); | ||
260 | /* Push Buttons */ | ||
261 | foxg20_add_device_buttons(); | ||
262 | #if defined(CONFIG_W1_MASTER_GPIO) || defined(CONFIG_W1_MASTER_GPIO_MODULE) | ||
263 | at91_add_device_w1(); | ||
264 | #endif | ||
265 | } | ||
266 | |||
267 | MACHINE_START(ACMENETUSFOXG20, "Acme Systems srl FOX Board G20") | ||
268 | /* Maintainer: Sergio Tanzilli */ | ||
269 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
270 | .timer = &at91sam926x_timer, | ||
271 | .map_io = foxg20_map_io, | ||
272 | .init_irq = foxg20_init_irq, | ||
273 | .init_machine = foxg20_board_init, | ||
274 | MACHINE_END | ||
diff --git a/arch/arm/mach-at91/board-gsia18s.c b/arch/arm/mach-at91/board-gsia18s.c new file mode 100644 index 00000000000..bc28136ee24 --- /dev/null +++ b/arch/arm/mach-at91/board-gsia18s.c | |||
@@ -0,0 +1,584 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Christian Glindkamp <christian.glindkamp@taskit.de> | ||
3 | * taskit GmbH | ||
4 | * 2010 Igor Plyatov <plyatov@gmail.com> | ||
5 | * GeoSIG Ltd | ||
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 as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | */ | ||
21 | |||
22 | #include <linux/platform_device.h> | ||
23 | #include <linux/gpio.h> | ||
24 | #include <linux/w1-gpio.h> | ||
25 | #include <linux/i2c.h> | ||
26 | #include <linux/i2c/pcf857x.h> | ||
27 | #include <linux/gpio_keys.h> | ||
28 | #include <linux/input.h> | ||
29 | |||
30 | #include <asm/mach-types.h> | ||
31 | #include <asm/mach/arch.h> | ||
32 | |||
33 | #include <mach/board.h> | ||
34 | #include <mach/at91sam9_smc.h> | ||
35 | #include <mach/gsia18s.h> | ||
36 | #include <mach/stamp9g20.h> | ||
37 | |||
38 | #include "sam9_smc.h" | ||
39 | #include "generic.h" | ||
40 | |||
41 | static void __init gsia18s_map_io(void) | ||
42 | { | ||
43 | stamp9g20_map_io(); | ||
44 | |||
45 | /* | ||
46 | * USART0 on ttyS1 (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI). | ||
47 | * Used for Internal Analog Modem. | ||
48 | */ | ||
49 | at91_register_uart(AT91SAM9260_ID_US0, 1, | ||
50 | ATMEL_UART_CTS | ATMEL_UART_RTS | | ||
51 | ATMEL_UART_DTR | ATMEL_UART_DSR | | ||
52 | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
53 | /* | ||
54 | * USART1 on ttyS2 (Rx, Tx, CTS, RTS). | ||
55 | * Used for GPS or WiFi or Data stream. | ||
56 | */ | ||
57 | at91_register_uart(AT91SAM9260_ID_US1, 2, | ||
58 | ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
59 | /* | ||
60 | * USART2 on ttyS3 (Rx, Tx, CTS, RTS). | ||
61 | * Used for External Modem. | ||
62 | */ | ||
63 | at91_register_uart(AT91SAM9260_ID_US2, 3, | ||
64 | ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
65 | /* | ||
66 | * USART3 on ttyS4 (Rx, Tx, RTS). | ||
67 | * Used for RS-485. | ||
68 | */ | ||
69 | at91_register_uart(AT91SAM9260_ID_US3, 4, ATMEL_UART_RTS); | ||
70 | |||
71 | /* | ||
72 | * USART4 on ttyS5 (Rx, Tx). | ||
73 | * Used for TRX433 Radio Module. | ||
74 | */ | ||
75 | at91_register_uart(AT91SAM9260_ID_US4, 5, 0); | ||
76 | } | ||
77 | |||
78 | static void __init init_irq(void) | ||
79 | { | ||
80 | at91sam9260_init_interrupts(NULL); | ||
81 | } | ||
82 | |||
83 | /* | ||
84 | * Two USB Host ports | ||
85 | */ | ||
86 | static struct at91_usbh_data __initdata usbh_data = { | ||
87 | .ports = 2, | ||
88 | }; | ||
89 | |||
90 | /* | ||
91 | * USB Device port | ||
92 | */ | ||
93 | static struct at91_udc_data __initdata udc_data = { | ||
94 | .vbus_pin = AT91_PIN_PA22, | ||
95 | .pullup_pin = 0, /* pull-up driven by UDC */ | ||
96 | }; | ||
97 | |||
98 | /* | ||
99 | * MACB Ethernet device | ||
100 | */ | ||
101 | static struct at91_eth_data __initdata macb_data = { | ||
102 | .phy_irq_pin = AT91_PIN_PA28, | ||
103 | .is_rmii = 1, | ||
104 | }; | ||
105 | |||
106 | /* | ||
107 | * LEDs and GPOs | ||
108 | */ | ||
109 | static struct gpio_led gpio_leds[] = { | ||
110 | { | ||
111 | .name = "gpo:spi1reset", | ||
112 | .gpio = AT91_PIN_PC1, | ||
113 | .active_low = 0, | ||
114 | .default_trigger = "none", | ||
115 | .default_state = LEDS_GPIO_DEFSTATE_OFF, | ||
116 | }, | ||
117 | { | ||
118 | .name = "gpo:trig_net_out", | ||
119 | .gpio = AT91_PIN_PB20, | ||
120 | .active_low = 0, | ||
121 | .default_trigger = "none", | ||
122 | .default_state = LEDS_GPIO_DEFSTATE_OFF, | ||
123 | }, | ||
124 | { | ||
125 | .name = "gpo:trig_net_dir", | ||
126 | .gpio = AT91_PIN_PB19, | ||
127 | .active_low = 0, | ||
128 | .default_trigger = "none", | ||
129 | .default_state = LEDS_GPIO_DEFSTATE_OFF, | ||
130 | }, | ||
131 | { | ||
132 | .name = "gpo:charge_dis", | ||
133 | .gpio = AT91_PIN_PC2, | ||
134 | .active_low = 0, | ||
135 | .default_trigger = "none", | ||
136 | .default_state = LEDS_GPIO_DEFSTATE_OFF, | ||
137 | }, | ||
138 | { | ||
139 | .name = "led:event", | ||
140 | .gpio = AT91_PIN_PB17, | ||
141 | .active_low = 1, | ||
142 | .default_trigger = "none", | ||
143 | .default_state = LEDS_GPIO_DEFSTATE_OFF, | ||
144 | }, | ||
145 | { | ||
146 | .name = "led:lan", | ||
147 | .gpio = AT91_PIN_PB18, | ||
148 | .active_low = 1, | ||
149 | .default_trigger = "none", | ||
150 | .default_state = LEDS_GPIO_DEFSTATE_OFF, | ||
151 | }, | ||
152 | { | ||
153 | .name = "led:error", | ||
154 | .gpio = AT91_PIN_PB16, | ||
155 | .active_low = 1, | ||
156 | .default_trigger = "none", | ||
157 | .default_state = LEDS_GPIO_DEFSTATE_ON, | ||
158 | } | ||
159 | }; | ||
160 | |||
161 | static struct gpio_led_platform_data gpio_led_info = { | ||
162 | .leds = gpio_leds, | ||
163 | .num_leds = ARRAY_SIZE(gpio_leds), | ||
164 | }; | ||
165 | |||
166 | static struct platform_device leds = { | ||
167 | .name = "leds-gpio", | ||
168 | .id = 0, | ||
169 | .dev = { | ||
170 | .platform_data = &gpio_led_info, | ||
171 | } | ||
172 | }; | ||
173 | |||
174 | static void __init gsia18s_leds_init(void) | ||
175 | { | ||
176 | platform_device_register(&leds); | ||
177 | } | ||
178 | |||
179 | /* PCF8574 0x20 GPIO - U1 on the GS_IA18-CB_V3 board */ | ||
180 | static struct gpio_led pcf_gpio_leds1[] = { | ||
181 | { /* bit 0 */ | ||
182 | .name = "gpo:hdc_power", | ||
183 | .gpio = PCF_GPIO_HDC_POWER, | ||
184 | .active_low = 0, | ||
185 | .default_trigger = "none", | ||
186 | .default_state = LEDS_GPIO_DEFSTATE_OFF, | ||
187 | }, | ||
188 | { /* bit 1 */ | ||
189 | .name = "gpo:wifi_setup", | ||
190 | .gpio = PCF_GPIO_WIFI_SETUP, | ||
191 | .active_low = 1, | ||
192 | .default_trigger = "none", | ||
193 | .default_state = LEDS_GPIO_DEFSTATE_OFF, | ||
194 | }, | ||
195 | { /* bit 2 */ | ||
196 | .name = "gpo:wifi_enable", | ||
197 | .gpio = PCF_GPIO_WIFI_ENABLE, | ||
198 | .active_low = 1, | ||
199 | .default_trigger = "none", | ||
200 | .default_state = LEDS_GPIO_DEFSTATE_OFF, | ||
201 | }, | ||
202 | { /* bit 3 */ | ||
203 | .name = "gpo:wifi_reset", | ||
204 | .gpio = PCF_GPIO_WIFI_RESET, | ||
205 | .active_low = 1, | ||
206 | .default_trigger = "none", | ||
207 | .default_state = LEDS_GPIO_DEFSTATE_ON, | ||
208 | }, | ||
209 | /* bit 4 used as GPI */ | ||
210 | { /* bit 5 */ | ||
211 | .name = "gpo:gps_setup", | ||
212 | .gpio = PCF_GPIO_GPS_SETUP, | ||
213 | .active_low = 1, | ||
214 | .default_trigger = "none", | ||
215 | .default_state = LEDS_GPIO_DEFSTATE_OFF, | ||
216 | }, | ||
217 | { /* bit 6 */ | ||
218 | .name = "gpo:gps_standby", | ||
219 | .gpio = PCF_GPIO_GPS_STANDBY, | ||
220 | .active_low = 0, | ||
221 | .default_trigger = "none", | ||
222 | .default_state = LEDS_GPIO_DEFSTATE_ON, | ||
223 | }, | ||
224 | { /* bit 7 */ | ||
225 | .name = "gpo:gps_power", | ||
226 | .gpio = PCF_GPIO_GPS_POWER, | ||
227 | .active_low = 0, | ||
228 | .default_trigger = "none", | ||
229 | .default_state = LEDS_GPIO_DEFSTATE_OFF, | ||
230 | } | ||
231 | }; | ||
232 | |||
233 | static struct gpio_led_platform_data pcf_gpio_led_info1 = { | ||
234 | .leds = pcf_gpio_leds1, | ||
235 | .num_leds = ARRAY_SIZE(pcf_gpio_leds1), | ||
236 | }; | ||
237 | |||
238 | static struct platform_device pcf_leds1 = { | ||
239 | .name = "leds-gpio", /* GS_IA18-CB_board */ | ||
240 | .id = 1, | ||
241 | .dev = { | ||
242 | .platform_data = &pcf_gpio_led_info1, | ||
243 | } | ||
244 | }; | ||
245 | |||
246 | /* PCF8574 0x22 GPIO - U1 on the GS_2G_OPT1-A_V0 board (Alarm) */ | ||
247 | static struct gpio_led pcf_gpio_leds2[] = { | ||
248 | { /* bit 0 */ | ||
249 | .name = "gpo:alarm_1", | ||
250 | .gpio = PCF_GPIO_ALARM1, | ||
251 | .active_low = 1, | ||
252 | .default_trigger = "none", | ||
253 | .default_state = LEDS_GPIO_DEFSTATE_OFF, | ||
254 | }, | ||
255 | { /* bit 1 */ | ||
256 | .name = "gpo:alarm_2", | ||
257 | .gpio = PCF_GPIO_ALARM2, | ||
258 | .active_low = 1, | ||
259 | .default_trigger = "none", | ||
260 | .default_state = LEDS_GPIO_DEFSTATE_OFF, | ||
261 | }, | ||
262 | { /* bit 2 */ | ||
263 | .name = "gpo:alarm_3", | ||
264 | .gpio = PCF_GPIO_ALARM3, | ||
265 | .active_low = 1, | ||
266 | .default_trigger = "none", | ||
267 | .default_state = LEDS_GPIO_DEFSTATE_OFF, | ||
268 | }, | ||
269 | { /* bit 3 */ | ||
270 | .name = "gpo:alarm_4", | ||
271 | .gpio = PCF_GPIO_ALARM4, | ||
272 | .active_low = 1, | ||
273 | .default_trigger = "none", | ||
274 | .default_state = LEDS_GPIO_DEFSTATE_OFF, | ||
275 | }, | ||
276 | /* bits 4, 5, 6 not used */ | ||
277 | { /* bit 7 */ | ||
278 | .name = "gpo:alarm_v_relay_on", | ||
279 | .gpio = PCF_GPIO_ALARM_V_RELAY_ON, | ||
280 | .active_low = 0, | ||
281 | .default_trigger = "none", | ||
282 | .default_state = LEDS_GPIO_DEFSTATE_OFF, | ||
283 | }, | ||
284 | }; | ||
285 | |||
286 | static struct gpio_led_platform_data pcf_gpio_led_info2 = { | ||
287 | .leds = pcf_gpio_leds2, | ||
288 | .num_leds = ARRAY_SIZE(pcf_gpio_leds2), | ||
289 | }; | ||
290 | |||
291 | static struct platform_device pcf_leds2 = { | ||
292 | .name = "leds-gpio", | ||
293 | .id = 2, | ||
294 | .dev = { | ||
295 | .platform_data = &pcf_gpio_led_info2, | ||
296 | } | ||
297 | }; | ||
298 | |||
299 | /* PCF8574 0x24 GPIO U1 on the GS_2G-OPT23-A_V0 board (Modem) */ | ||
300 | static struct gpio_led pcf_gpio_leds3[] = { | ||
301 | { /* bit 0 */ | ||
302 | .name = "gpo:modem_power", | ||
303 | .gpio = PCF_GPIO_MODEM_POWER, | ||
304 | .active_low = 1, | ||
305 | .default_trigger = "none", | ||
306 | .default_state = LEDS_GPIO_DEFSTATE_OFF, | ||
307 | }, | ||
308 | /* bits 1 and 2 not used */ | ||
309 | { /* bit 3 */ | ||
310 | .name = "gpo:modem_reset", | ||
311 | .gpio = PCF_GPIO_MODEM_RESET, | ||
312 | .active_low = 1, | ||
313 | .default_trigger = "none", | ||
314 | .default_state = LEDS_GPIO_DEFSTATE_ON, | ||
315 | }, | ||
316 | /* bits 4, 5 and 6 not used */ | ||
317 | { /* bit 7 */ | ||
318 | .name = "gpo:trx_reset", | ||
319 | .gpio = PCF_GPIO_TRX_RESET, | ||
320 | .active_low = 1, | ||
321 | .default_trigger = "none", | ||
322 | .default_state = LEDS_GPIO_DEFSTATE_ON, | ||
323 | } | ||
324 | }; | ||
325 | |||
326 | static struct gpio_led_platform_data pcf_gpio_led_info3 = { | ||
327 | .leds = pcf_gpio_leds3, | ||
328 | .num_leds = ARRAY_SIZE(pcf_gpio_leds3), | ||
329 | }; | ||
330 | |||
331 | static struct platform_device pcf_leds3 = { | ||
332 | .name = "leds-gpio", | ||
333 | .id = 3, | ||
334 | .dev = { | ||
335 | .platform_data = &pcf_gpio_led_info3, | ||
336 | } | ||
337 | }; | ||
338 | |||
339 | static void __init gsia18s_pcf_leds_init(void) | ||
340 | { | ||
341 | platform_device_register(&pcf_leds1); | ||
342 | platform_device_register(&pcf_leds2); | ||
343 | platform_device_register(&pcf_leds3); | ||
344 | } | ||
345 | |||
346 | /* | ||
347 | * SPI busses. | ||
348 | */ | ||
349 | static struct spi_board_info gsia18s_spi_devices[] = { | ||
350 | { /* User accessible spi0, cs0 used for communication with MSP RTC */ | ||
351 | .modalias = "spidev", | ||
352 | .bus_num = 0, | ||
353 | .chip_select = 0, | ||
354 | .max_speed_hz = 580000, | ||
355 | .mode = SPI_MODE_1, | ||
356 | }, | ||
357 | { /* User accessible spi1, cs0 used for communication with int. DSP */ | ||
358 | .modalias = "spidev", | ||
359 | .bus_num = 1, | ||
360 | .chip_select = 0, | ||
361 | .max_speed_hz = 5600000, | ||
362 | .mode = SPI_MODE_0, | ||
363 | }, | ||
364 | { /* User accessible spi1, cs1 used for communication with ext. DSP */ | ||
365 | .modalias = "spidev", | ||
366 | .bus_num = 1, | ||
367 | .chip_select = 1, | ||
368 | .max_speed_hz = 5600000, | ||
369 | .mode = SPI_MODE_0, | ||
370 | }, | ||
371 | { /* User accessible spi1, cs2 used for communication with ext. DSP */ | ||
372 | .modalias = "spidev", | ||
373 | .bus_num = 1, | ||
374 | .chip_select = 2, | ||
375 | .max_speed_hz = 5600000, | ||
376 | .mode = SPI_MODE_0, | ||
377 | }, | ||
378 | { /* User accessible spi1, cs3 used for communication with ext. DSP */ | ||
379 | .modalias = "spidev", | ||
380 | .bus_num = 1, | ||
381 | .chip_select = 3, | ||
382 | .max_speed_hz = 5600000, | ||
383 | .mode = SPI_MODE_0, | ||
384 | } | ||
385 | }; | ||
386 | |||
387 | /* | ||
388 | * GPI Buttons | ||
389 | */ | ||
390 | static struct gpio_keys_button buttons[] = { | ||
391 | { | ||
392 | .gpio = GPIO_TRIG_NET_IN, | ||
393 | .code = BTN_1, | ||
394 | .desc = "TRIG_NET_IN", | ||
395 | .type = EV_KEY, | ||
396 | .active_low = 0, | ||
397 | .wakeup = 1, | ||
398 | }, | ||
399 | { /* SW80 on the GS_IA18_S-MN board*/ | ||
400 | .gpio = GPIO_CARD_UNMOUNT_0, | ||
401 | .code = BTN_2, | ||
402 | .desc = "Card umount 0", | ||
403 | .type = EV_KEY, | ||
404 | .active_low = 1, | ||
405 | .wakeup = 1, | ||
406 | }, | ||
407 | { /* SW79 on the GS_IA18_S-MN board*/ | ||
408 | .gpio = GPIO_CARD_UNMOUNT_1, | ||
409 | .code = BTN_3, | ||
410 | .desc = "Card umount 1", | ||
411 | .type = EV_KEY, | ||
412 | .active_low = 1, | ||
413 | .wakeup = 1, | ||
414 | }, | ||
415 | { /* SW280 on the GS_IA18-CB board*/ | ||
416 | .gpio = GPIO_KEY_POWER, | ||
417 | .code = KEY_POWER, | ||
418 | .desc = "Power Off Button", | ||
419 | .type = EV_KEY, | ||
420 | .active_low = 0, | ||
421 | .wakeup = 1, | ||
422 | } | ||
423 | }; | ||
424 | |||
425 | static struct gpio_keys_platform_data button_data = { | ||
426 | .buttons = buttons, | ||
427 | .nbuttons = ARRAY_SIZE(buttons), | ||
428 | }; | ||
429 | |||
430 | static struct platform_device button_device = { | ||
431 | .name = "gpio-keys", | ||
432 | .id = -1, | ||
433 | .num_resources = 0, | ||
434 | .dev = { | ||
435 | .platform_data = &button_data, | ||
436 | } | ||
437 | }; | ||
438 | |||
439 | static void __init gsia18s_add_device_buttons(void) | ||
440 | { | ||
441 | at91_set_gpio_input(GPIO_TRIG_NET_IN, 1); | ||
442 | at91_set_deglitch(GPIO_TRIG_NET_IN, 1); | ||
443 | at91_set_gpio_input(GPIO_CARD_UNMOUNT_0, 1); | ||
444 | at91_set_deglitch(GPIO_CARD_UNMOUNT_0, 1); | ||
445 | at91_set_gpio_input(GPIO_CARD_UNMOUNT_1, 1); | ||
446 | at91_set_deglitch(GPIO_CARD_UNMOUNT_1, 1); | ||
447 | at91_set_gpio_input(GPIO_KEY_POWER, 0); | ||
448 | at91_set_deglitch(GPIO_KEY_POWER, 1); | ||
449 | |||
450 | platform_device_register(&button_device); | ||
451 | } | ||
452 | |||
453 | /* | ||
454 | * I2C | ||
455 | */ | ||
456 | static int pcf8574x_0x20_setup(struct i2c_client *client, int gpio, | ||
457 | unsigned int ngpio, void *context) | ||
458 | { | ||
459 | int status; | ||
460 | |||
461 | status = gpio_request(gpio + PCF_GPIO_ETH_DETECT, "eth_det"); | ||
462 | if (status < 0) { | ||
463 | pr_err("error: can't request GPIO%d\n", | ||
464 | gpio + PCF_GPIO_ETH_DETECT); | ||
465 | return status; | ||
466 | } | ||
467 | status = gpio_direction_input(gpio + PCF_GPIO_ETH_DETECT); | ||
468 | if (status < 0) { | ||
469 | pr_err("error: can't setup GPIO%d as input\n", | ||
470 | gpio + PCF_GPIO_ETH_DETECT); | ||
471 | return status; | ||
472 | } | ||
473 | status = gpio_export(gpio + PCF_GPIO_ETH_DETECT, false); | ||
474 | if (status < 0) { | ||
475 | pr_err("error: can't export GPIO%d\n", | ||
476 | gpio + PCF_GPIO_ETH_DETECT); | ||
477 | return status; | ||
478 | } | ||
479 | status = gpio_sysfs_set_active_low(gpio + PCF_GPIO_ETH_DETECT, 1); | ||
480 | if (status < 0) { | ||
481 | pr_err("error: gpio_sysfs_set active_low(GPIO%d, 1)\n", | ||
482 | gpio + PCF_GPIO_ETH_DETECT); | ||
483 | return status; | ||
484 | } | ||
485 | |||
486 | return 0; | ||
487 | } | ||
488 | |||
489 | static int pcf8574x_0x20_teardown(struct i2c_client *client, int gpio, | ||
490 | unsigned ngpio, void *context) | ||
491 | { | ||
492 | gpio_free(gpio + PCF_GPIO_ETH_DETECT); | ||
493 | return 0; | ||
494 | } | ||
495 | |||
496 | static struct pcf857x_platform_data pcf20_pdata = { | ||
497 | .gpio_base = GS_IA18_S_PCF_GPIO_BASE0, | ||
498 | .n_latch = (1 << 4), | ||
499 | .setup = pcf8574x_0x20_setup, | ||
500 | .teardown = pcf8574x_0x20_teardown, | ||
501 | }; | ||
502 | |||
503 | static struct pcf857x_platform_data pcf22_pdata = { | ||
504 | .gpio_base = GS_IA18_S_PCF_GPIO_BASE1, | ||
505 | }; | ||
506 | |||
507 | static struct pcf857x_platform_data pcf24_pdata = { | ||
508 | .gpio_base = GS_IA18_S_PCF_GPIO_BASE2, | ||
509 | }; | ||
510 | |||
511 | static struct i2c_board_info __initdata gsia18s_i2c_devices[] = { | ||
512 | { /* U1 on the GS_IA18-CB_V3 board */ | ||
513 | I2C_BOARD_INFO("pcf8574", 0x20), | ||
514 | .platform_data = &pcf20_pdata, | ||
515 | }, | ||
516 | { /* U1 on the GS_2G_OPT1-A_V0 board (Alarm) */ | ||
517 | I2C_BOARD_INFO("pcf8574", 0x22), | ||
518 | .platform_data = &pcf22_pdata, | ||
519 | }, | ||
520 | { /* U1 on the GS_2G-OPT23-A_V0 board (Modem) */ | ||
521 | I2C_BOARD_INFO("pcf8574", 0x24), | ||
522 | .platform_data = &pcf24_pdata, | ||
523 | }, | ||
524 | { /* U161 on the GS_IA18_S-MN board */ | ||
525 | I2C_BOARD_INFO("24c1024", 0x50), | ||
526 | }, | ||
527 | { /* U162 on the GS_IA18_S-MN board */ | ||
528 | I2C_BOARD_INFO("24c01", 0x53), | ||
529 | }, | ||
530 | }; | ||
531 | |||
532 | /* | ||
533 | * Compact Flash | ||
534 | */ | ||
535 | static struct at91_cf_data __initdata gsia18s_cf1_data = { | ||
536 | .irq_pin = AT91_PIN_PA27, | ||
537 | .det_pin = AT91_PIN_PB30, | ||
538 | .rst_pin = AT91_PIN_PB31, | ||
539 | .chipselect = 5, | ||
540 | .flags = AT91_CF_TRUE_IDE, | ||
541 | }; | ||
542 | |||
543 | /* Power Off by RTC */ | ||
544 | static void gsia18s_power_off(void) | ||
545 | { | ||
546 | pr_notice("Power supply will be switched off automatically now or after 60 seconds without ArmDAS.\n"); | ||
547 | at91_set_gpio_output(AT91_PIN_PA25, 1); | ||
548 | /* Spin to death... */ | ||
549 | while (1) | ||
550 | ; | ||
551 | } | ||
552 | |||
553 | static int __init gsia18s_power_off_init(void) | ||
554 | { | ||
555 | pm_power_off = gsia18s_power_off; | ||
556 | return 0; | ||
557 | } | ||
558 | |||
559 | /* ---------------------------------------------------------------------------*/ | ||
560 | |||
561 | static void __init gsia18s_board_init(void) | ||
562 | { | ||
563 | stamp9g20_board_init(); | ||
564 | at91_add_device_usbh(&usbh_data); | ||
565 | at91_add_device_udc(&udc_data); | ||
566 | at91_add_device_eth(&macb_data); | ||
567 | gsia18s_leds_init(); | ||
568 | gsia18s_pcf_leds_init(); | ||
569 | gsia18s_add_device_buttons(); | ||
570 | at91_add_device_i2c(gsia18s_i2c_devices, | ||
571 | ARRAY_SIZE(gsia18s_i2c_devices)); | ||
572 | at91_add_device_cf(&gsia18s_cf1_data); | ||
573 | at91_add_device_spi(gsia18s_spi_devices, | ||
574 | ARRAY_SIZE(gsia18s_spi_devices)); | ||
575 | gsia18s_power_off_init(); | ||
576 | } | ||
577 | |||
578 | MACHINE_START(GSIA18S, "GS_IA18_S") | ||
579 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
580 | .timer = &at91sam926x_timer, | ||
581 | .map_io = gsia18s_map_io, | ||
582 | .init_irq = init_irq, | ||
583 | .init_machine = gsia18s_board_init, | ||
584 | MACHINE_END | ||
diff --git a/arch/arm/mach-at91/board-sam9m10g45ek.c b/arch/arm/mach-at91/board-sam9m10g45ek.c index 86ff4b52db3..6c999dbd2bc 100644 --- a/arch/arm/mach-at91/board-sam9m10g45ek.c +++ b/arch/arm/mach-at91/board-sam9m10g45ek.c | |||
@@ -37,7 +37,6 @@ | |||
37 | #include <asm/mach/map.h> | 37 | #include <asm/mach/map.h> |
38 | #include <asm/mach/irq.h> | 38 | #include <asm/mach/irq.h> |
39 | 39 | ||
40 | #include <mach/hardware.h> | ||
41 | #include <mach/board.h> | 40 | #include <mach/board.h> |
42 | #include <mach/gpio.h> | 41 | #include <mach/gpio.h> |
43 | #include <mach/at91sam9_smc.h> | 42 | #include <mach/at91sam9_smc.h> |
diff --git a/arch/arm/mach-at91/gpio.c b/arch/arm/mach-at91/gpio.c index ae4772e744a..af818a21587 100644 --- a/arch/arm/mach-at91/gpio.c +++ b/arch/arm/mach-at91/gpio.c | |||
@@ -274,10 +274,10 @@ EXPORT_SYMBOL(at91_get_gpio_value); | |||
274 | static u32 wakeups[MAX_GPIO_BANKS]; | 274 | static u32 wakeups[MAX_GPIO_BANKS]; |
275 | static u32 backups[MAX_GPIO_BANKS]; | 275 | static u32 backups[MAX_GPIO_BANKS]; |
276 | 276 | ||
277 | static int gpio_irq_set_wake(unsigned pin, unsigned state) | 277 | static int gpio_irq_set_wake(struct irq_data *d, unsigned state) |
278 | { | 278 | { |
279 | unsigned mask = pin_to_mask(pin); | 279 | unsigned mask = pin_to_mask(d->irq); |
280 | unsigned bank = (pin - PIN_BASE) / 32; | 280 | unsigned bank = (d->irq - PIN_BASE) / 32; |
281 | 281 | ||
282 | if (unlikely(bank >= MAX_GPIO_BANKS)) | 282 | if (unlikely(bank >= MAX_GPIO_BANKS)) |
283 | return -EINVAL; | 283 | return -EINVAL; |
@@ -344,25 +344,25 @@ void at91_gpio_resume(void) | |||
344 | * IRQ0..IRQ6 should be configurable, e.g. level vs edge triggering. | 344 | * IRQ0..IRQ6 should be configurable, e.g. level vs edge triggering. |
345 | */ | 345 | */ |
346 | 346 | ||
347 | static void gpio_irq_mask(unsigned pin) | 347 | static void gpio_irq_mask(struct irq_data *d) |
348 | { | 348 | { |
349 | void __iomem *pio = pin_to_controller(pin); | 349 | void __iomem *pio = pin_to_controller(d->irq); |
350 | unsigned mask = pin_to_mask(pin); | 350 | unsigned mask = pin_to_mask(d->irq); |
351 | 351 | ||
352 | if (pio) | 352 | if (pio) |
353 | __raw_writel(mask, pio + PIO_IDR); | 353 | __raw_writel(mask, pio + PIO_IDR); |
354 | } | 354 | } |
355 | 355 | ||
356 | static void gpio_irq_unmask(unsigned pin) | 356 | static void gpio_irq_unmask(struct irq_data *d) |
357 | { | 357 | { |
358 | void __iomem *pio = pin_to_controller(pin); | 358 | void __iomem *pio = pin_to_controller(d->irq); |
359 | unsigned mask = pin_to_mask(pin); | 359 | unsigned mask = pin_to_mask(d->irq); |
360 | 360 | ||
361 | if (pio) | 361 | if (pio) |
362 | __raw_writel(mask, pio + PIO_IER); | 362 | __raw_writel(mask, pio + PIO_IER); |
363 | } | 363 | } |
364 | 364 | ||
365 | static int gpio_irq_type(unsigned pin, unsigned type) | 365 | static int gpio_irq_type(struct irq_data *d, unsigned type) |
366 | { | 366 | { |
367 | switch (type) { | 367 | switch (type) { |
368 | case IRQ_TYPE_NONE: | 368 | case IRQ_TYPE_NONE: |
@@ -375,10 +375,10 @@ static int gpio_irq_type(unsigned pin, unsigned type) | |||
375 | 375 | ||
376 | static struct irq_chip gpio_irqchip = { | 376 | static struct irq_chip gpio_irqchip = { |
377 | .name = "GPIO", | 377 | .name = "GPIO", |
378 | .mask = gpio_irq_mask, | 378 | .irq_mask = gpio_irq_mask, |
379 | .unmask = gpio_irq_unmask, | 379 | .irq_unmask = gpio_irq_unmask, |
380 | .set_type = gpio_irq_type, | 380 | .irq_set_type = gpio_irq_type, |
381 | .set_wake = gpio_irq_set_wake, | 381 | .irq_set_wake = gpio_irq_set_wake, |
382 | }; | 382 | }; |
383 | 383 | ||
384 | static void gpio_irq_handler(unsigned irq, struct irq_desc *desc) | 384 | static void gpio_irq_handler(unsigned irq, struct irq_desc *desc) |
@@ -393,7 +393,7 @@ static void gpio_irq_handler(unsigned irq, struct irq_desc *desc) | |||
393 | pio = at91_gpio->regbase; | 393 | pio = at91_gpio->regbase; |
394 | 394 | ||
395 | /* temporarily mask (level sensitive) parent IRQ */ | 395 | /* temporarily mask (level sensitive) parent IRQ */ |
396 | desc->chip->ack(irq); | 396 | desc->irq_data.chip->irq_ack(&desc->irq_data); |
397 | for (;;) { | 397 | for (;;) { |
398 | /* Reading ISR acks pending (edge triggered) GPIO interrupts. | 398 | /* Reading ISR acks pending (edge triggered) GPIO interrupts. |
399 | * When there none are pending, we're finished unless we need | 399 | * When there none are pending, we're finished unless we need |
@@ -419,7 +419,7 @@ static void gpio_irq_handler(unsigned irq, struct irq_desc *desc) | |||
419 | * another IRQ must be generated before it actually gets | 419 | * another IRQ must be generated before it actually gets |
420 | * here to be disabled on the GPIO controller. | 420 | * here to be disabled on the GPIO controller. |
421 | */ | 421 | */ |
422 | gpio_irq_mask(pin); | 422 | gpio_irq_mask(irq_get_irq_data(pin)); |
423 | } | 423 | } |
424 | else | 424 | else |
425 | generic_handle_irq(pin); | 425 | generic_handle_irq(pin); |
@@ -429,7 +429,7 @@ static void gpio_irq_handler(unsigned irq, struct irq_desc *desc) | |||
429 | isr >>= 1; | 429 | isr >>= 1; |
430 | } | 430 | } |
431 | } | 431 | } |
432 | desc->chip->unmask(irq); | 432 | desc->irq_data.chip->irq_unmask(&desc->irq_data); |
433 | /* now it may re-trigger */ | 433 | /* now it may re-trigger */ |
434 | } | 434 | } |
435 | 435 | ||
diff --git a/arch/arm/mach-at91/include/mach/gsia18s.h b/arch/arm/mach-at91/include/mach/gsia18s.h new file mode 100644 index 00000000000..307c194926f --- /dev/null +++ b/arch/arm/mach-at91/include/mach/gsia18s.h | |||
@@ -0,0 +1,33 @@ | |||
1 | /* Buttons */ | ||
2 | #define GPIO_TRIG_NET_IN AT91_PIN_PB21 | ||
3 | #define GPIO_CARD_UNMOUNT_0 AT91_PIN_PB13 | ||
4 | #define GPIO_CARD_UNMOUNT_1 AT91_PIN_PB12 | ||
5 | #define GPIO_KEY_POWER AT91_PIN_PA25 | ||
6 | |||
7 | /* PCF8574 0x20 GPIO - U1 on the GS_IA18-CB_V3 board */ | ||
8 | #define GS_IA18_S_PCF_GPIO_BASE0 NR_BUILTIN_GPIO | ||
9 | #define PCF_GPIO_HDC_POWER (GS_IA18_S_PCF_GPIO_BASE0 + 0) | ||
10 | #define PCF_GPIO_WIFI_SETUP (GS_IA18_S_PCF_GPIO_BASE0 + 1) | ||
11 | #define PCF_GPIO_WIFI_ENABLE (GS_IA18_S_PCF_GPIO_BASE0 + 2) | ||
12 | #define PCF_GPIO_WIFI_RESET (GS_IA18_S_PCF_GPIO_BASE0 + 3) | ||
13 | #define PCF_GPIO_ETH_DETECT 4 /* this is a GPI */ | ||
14 | #define PCF_GPIO_GPS_SETUP (GS_IA18_S_PCF_GPIO_BASE0 + 5) | ||
15 | #define PCF_GPIO_GPS_STANDBY (GS_IA18_S_PCF_GPIO_BASE0 + 6) | ||
16 | #define PCF_GPIO_GPS_POWER (GS_IA18_S_PCF_GPIO_BASE0 + 7) | ||
17 | |||
18 | /* PCF8574 0x22 GPIO - U1 on the GS_2G_OPT1-A_V0 board (Alarm) */ | ||
19 | #define GS_IA18_S_PCF_GPIO_BASE1 (GS_IA18_S_PCF_GPIO_BASE0 + 8) | ||
20 | #define PCF_GPIO_ALARM1 (GS_IA18_S_PCF_GPIO_BASE1 + 0) | ||
21 | #define PCF_GPIO_ALARM2 (GS_IA18_S_PCF_GPIO_BASE1 + 1) | ||
22 | #define PCF_GPIO_ALARM3 (GS_IA18_S_PCF_GPIO_BASE1 + 2) | ||
23 | #define PCF_GPIO_ALARM4 (GS_IA18_S_PCF_GPIO_BASE1 + 3) | ||
24 | /* bits 4, 5, 6 not used */ | ||
25 | #define PCF_GPIO_ALARM_V_RELAY_ON (GS_IA18_S_PCF_GPIO_BASE1 + 7) | ||
26 | |||
27 | /* PCF8574 0x24 GPIO U1 on the GS_2G-OPT23-A_V0 board (Modem) */ | ||
28 | #define GS_IA18_S_PCF_GPIO_BASE2 (GS_IA18_S_PCF_GPIO_BASE1 + 8) | ||
29 | #define PCF_GPIO_MODEM_POWER (GS_IA18_S_PCF_GPIO_BASE2 + 0) | ||
30 | #define PCF_GPIO_MODEM_RESET (GS_IA18_S_PCF_GPIO_BASE2 + 3) | ||
31 | /* bits 1, 2, 4, 5 not used */ | ||
32 | #define PCF_GPIO_TRX_RESET (GS_IA18_S_PCF_GPIO_BASE2 + 6) | ||
33 | /* bit 7 not used */ | ||
diff --git a/arch/arm/mach-at91/irq.c b/arch/arm/mach-at91/irq.c index da3494a5342..b56d6b3a408 100644 --- a/arch/arm/mach-at91/irq.c +++ b/arch/arm/mach-at91/irq.c | |||
@@ -34,23 +34,23 @@ | |||
34 | #include <asm/mach/map.h> | 34 | #include <asm/mach/map.h> |
35 | 35 | ||
36 | 36 | ||
37 | static void at91_aic_mask_irq(unsigned int irq) | 37 | static void at91_aic_mask_irq(struct irq_data *d) |
38 | { | 38 | { |
39 | /* Disable interrupt on AIC */ | 39 | /* Disable interrupt on AIC */ |
40 | at91_sys_write(AT91_AIC_IDCR, 1 << irq); | 40 | at91_sys_write(AT91_AIC_IDCR, 1 << d->irq); |
41 | } | 41 | } |
42 | 42 | ||
43 | static void at91_aic_unmask_irq(unsigned int irq) | 43 | static void at91_aic_unmask_irq(struct irq_data *d) |
44 | { | 44 | { |
45 | /* Enable interrupt on AIC */ | 45 | /* Enable interrupt on AIC */ |
46 | at91_sys_write(AT91_AIC_IECR, 1 << irq); | 46 | at91_sys_write(AT91_AIC_IECR, 1 << d->irq); |
47 | } | 47 | } |
48 | 48 | ||
49 | unsigned int at91_extern_irq; | 49 | unsigned int at91_extern_irq; |
50 | 50 | ||
51 | #define is_extern_irq(irq) ((1 << (irq)) & at91_extern_irq) | 51 | #define is_extern_irq(irq) ((1 << (irq)) & at91_extern_irq) |
52 | 52 | ||
53 | static int at91_aic_set_type(unsigned irq, unsigned type) | 53 | static int at91_aic_set_type(struct irq_data *d, unsigned type) |
54 | { | 54 | { |
55 | unsigned int smr, srctype; | 55 | unsigned int smr, srctype; |
56 | 56 | ||
@@ -62,13 +62,13 @@ static int at91_aic_set_type(unsigned irq, unsigned type) | |||
62 | srctype = AT91_AIC_SRCTYPE_RISING; | 62 | srctype = AT91_AIC_SRCTYPE_RISING; |
63 | break; | 63 | break; |
64 | case IRQ_TYPE_LEVEL_LOW: | 64 | case IRQ_TYPE_LEVEL_LOW: |
65 | if ((irq == AT91_ID_FIQ) || is_extern_irq(irq)) /* only supported on external interrupts */ | 65 | if ((d->irq == AT91_ID_FIQ) || is_extern_irq(d->irq)) /* only supported on external interrupts */ |
66 | srctype = AT91_AIC_SRCTYPE_LOW; | 66 | srctype = AT91_AIC_SRCTYPE_LOW; |
67 | else | 67 | else |
68 | return -EINVAL; | 68 | return -EINVAL; |
69 | break; | 69 | break; |
70 | case IRQ_TYPE_EDGE_FALLING: | 70 | case IRQ_TYPE_EDGE_FALLING: |
71 | if ((irq == AT91_ID_FIQ) || is_extern_irq(irq)) /* only supported on external interrupts */ | 71 | if ((d->irq == AT91_ID_FIQ) || is_extern_irq(d->irq)) /* only supported on external interrupts */ |
72 | srctype = AT91_AIC_SRCTYPE_FALLING; | 72 | srctype = AT91_AIC_SRCTYPE_FALLING; |
73 | else | 73 | else |
74 | return -EINVAL; | 74 | return -EINVAL; |
@@ -77,8 +77,8 @@ static int at91_aic_set_type(unsigned irq, unsigned type) | |||
77 | return -EINVAL; | 77 | return -EINVAL; |
78 | } | 78 | } |
79 | 79 | ||
80 | smr = at91_sys_read(AT91_AIC_SMR(irq)) & ~AT91_AIC_SRCTYPE; | 80 | smr = at91_sys_read(AT91_AIC_SMR(d->irq)) & ~AT91_AIC_SRCTYPE; |
81 | at91_sys_write(AT91_AIC_SMR(irq), smr | srctype); | 81 | at91_sys_write(AT91_AIC_SMR(d->irq), smr | srctype); |
82 | return 0; | 82 | return 0; |
83 | } | 83 | } |
84 | 84 | ||
@@ -87,15 +87,15 @@ static int at91_aic_set_type(unsigned irq, unsigned type) | |||
87 | static u32 wakeups; | 87 | static u32 wakeups; |
88 | static u32 backups; | 88 | static u32 backups; |
89 | 89 | ||
90 | static int at91_aic_set_wake(unsigned irq, unsigned value) | 90 | static int at91_aic_set_wake(struct irq_data *d, unsigned value) |
91 | { | 91 | { |
92 | if (unlikely(irq >= 32)) | 92 | if (unlikely(d->irq >= 32)) |
93 | return -EINVAL; | 93 | return -EINVAL; |
94 | 94 | ||
95 | if (value) | 95 | if (value) |
96 | wakeups |= (1 << irq); | 96 | wakeups |= (1 << d->irq); |
97 | else | 97 | else |
98 | wakeups &= ~(1 << irq); | 98 | wakeups &= ~(1 << d->irq); |
99 | 99 | ||
100 | return 0; | 100 | return 0; |
101 | } | 101 | } |
@@ -119,11 +119,11 @@ void at91_irq_resume(void) | |||
119 | 119 | ||
120 | static struct irq_chip at91_aic_chip = { | 120 | static struct irq_chip at91_aic_chip = { |
121 | .name = "AIC", | 121 | .name = "AIC", |
122 | .ack = at91_aic_mask_irq, | 122 | .irq_ack = at91_aic_mask_irq, |
123 | .mask = at91_aic_mask_irq, | 123 | .irq_mask = at91_aic_mask_irq, |
124 | .unmask = at91_aic_unmask_irq, | 124 | .irq_unmask = at91_aic_unmask_irq, |
125 | .set_type = at91_aic_set_type, | 125 | .irq_set_type = at91_aic_set_type, |
126 | .set_wake = at91_aic_set_wake, | 126 | .irq_set_wake = at91_aic_set_wake, |
127 | }; | 127 | }; |
128 | 128 | ||
129 | /* | 129 | /* |
diff --git a/arch/arm/mach-bcmring/irq.c b/arch/arm/mach-bcmring/irq.c index e3152631eb3..84dcda0d1d9 100644 --- a/arch/arm/mach-bcmring/irq.c +++ b/arch/arm/mach-bcmring/irq.c | |||
@@ -30,61 +30,61 @@ | |||
30 | #include <mach/csp/intcHw_reg.h> | 30 | #include <mach/csp/intcHw_reg.h> |
31 | #include <mach/csp/mm_io.h> | 31 | #include <mach/csp/mm_io.h> |
32 | 32 | ||
33 | static void bcmring_mask_irq0(unsigned int irq) | 33 | static void bcmring_mask_irq0(struct irq_data *d) |
34 | { | 34 | { |
35 | writel(1 << (irq - IRQ_INTC0_START), | 35 | writel(1 << (d->irq - IRQ_INTC0_START), |
36 | MM_IO_BASE_INTC0 + INTCHW_INTENCLEAR); | 36 | MM_IO_BASE_INTC0 + INTCHW_INTENCLEAR); |
37 | } | 37 | } |
38 | 38 | ||
39 | static void bcmring_unmask_irq0(unsigned int irq) | 39 | static void bcmring_unmask_irq0(struct irq_data *d) |
40 | { | 40 | { |
41 | writel(1 << (irq - IRQ_INTC0_START), | 41 | writel(1 << (d->irq - IRQ_INTC0_START), |
42 | MM_IO_BASE_INTC0 + INTCHW_INTENABLE); | 42 | MM_IO_BASE_INTC0 + INTCHW_INTENABLE); |
43 | } | 43 | } |
44 | 44 | ||
45 | static void bcmring_mask_irq1(unsigned int irq) | 45 | static void bcmring_mask_irq1(struct irq_data *d) |
46 | { | 46 | { |
47 | writel(1 << (irq - IRQ_INTC1_START), | 47 | writel(1 << (d->irq - IRQ_INTC1_START), |
48 | MM_IO_BASE_INTC1 + INTCHW_INTENCLEAR); | 48 | MM_IO_BASE_INTC1 + INTCHW_INTENCLEAR); |
49 | } | 49 | } |
50 | 50 | ||
51 | static void bcmring_unmask_irq1(unsigned int irq) | 51 | static void bcmring_unmask_irq1(struct irq_data *d) |
52 | { | 52 | { |
53 | writel(1 << (irq - IRQ_INTC1_START), | 53 | writel(1 << (d->irq - IRQ_INTC1_START), |
54 | MM_IO_BASE_INTC1 + INTCHW_INTENABLE); | 54 | MM_IO_BASE_INTC1 + INTCHW_INTENABLE); |
55 | } | 55 | } |
56 | 56 | ||
57 | static void bcmring_mask_irq2(unsigned int irq) | 57 | static void bcmring_mask_irq2(struct irq_data *d) |
58 | { | 58 | { |
59 | writel(1 << (irq - IRQ_SINTC_START), | 59 | writel(1 << (d->irq - IRQ_SINTC_START), |
60 | MM_IO_BASE_SINTC + INTCHW_INTENCLEAR); | 60 | MM_IO_BASE_SINTC + INTCHW_INTENCLEAR); |
61 | } | 61 | } |
62 | 62 | ||
63 | static void bcmring_unmask_irq2(unsigned int irq) | 63 | static void bcmring_unmask_irq2(struct irq_data *d) |
64 | { | 64 | { |
65 | writel(1 << (irq - IRQ_SINTC_START), | 65 | writel(1 << (d->irq - IRQ_SINTC_START), |
66 | MM_IO_BASE_SINTC + INTCHW_INTENABLE); | 66 | MM_IO_BASE_SINTC + INTCHW_INTENABLE); |
67 | } | 67 | } |
68 | 68 | ||
69 | static struct irq_chip bcmring_irq0_chip = { | 69 | static struct irq_chip bcmring_irq0_chip = { |
70 | .name = "ARM-INTC0", | 70 | .name = "ARM-INTC0", |
71 | .ack = bcmring_mask_irq0, | 71 | .irq_ack = bcmring_mask_irq0, |
72 | .mask = bcmring_mask_irq0, /* mask a specific interrupt, blocking its delivery. */ | 72 | .irq_mask = bcmring_mask_irq0, /* mask a specific interrupt, blocking its delivery. */ |
73 | .unmask = bcmring_unmask_irq0, /* unmaks an interrupt */ | 73 | .irq_unmask = bcmring_unmask_irq0, /* unmaks an interrupt */ |
74 | }; | 74 | }; |
75 | 75 | ||
76 | static struct irq_chip bcmring_irq1_chip = { | 76 | static struct irq_chip bcmring_irq1_chip = { |
77 | .name = "ARM-INTC1", | 77 | .name = "ARM-INTC1", |
78 | .ack = bcmring_mask_irq1, | 78 | .irq_ack = bcmring_mask_irq1, |
79 | .mask = bcmring_mask_irq1, | 79 | .irq_mask = bcmring_mask_irq1, |
80 | .unmask = bcmring_unmask_irq1, | 80 | .irq_unmask = bcmring_unmask_irq1, |
81 | }; | 81 | }; |
82 | 82 | ||
83 | static struct irq_chip bcmring_irq2_chip = { | 83 | static struct irq_chip bcmring_irq2_chip = { |
84 | .name = "ARM-SINTC", | 84 | .name = "ARM-SINTC", |
85 | .ack = bcmring_mask_irq2, | 85 | .irq_ack = bcmring_mask_irq2, |
86 | .mask = bcmring_mask_irq2, | 86 | .irq_mask = bcmring_mask_irq2, |
87 | .unmask = bcmring_unmask_irq2, | 87 | .irq_unmask = bcmring_unmask_irq2, |
88 | }; | 88 | }; |
89 | 89 | ||
90 | static void vic_init(void __iomem *base, struct irq_chip *chip, | 90 | static void vic_init(void __iomem *base, struct irq_chip *chip, |
diff --git a/arch/arm/mach-clps711x/irq.c b/arch/arm/mach-clps711x/irq.c index 9a12d856228..86da7a1b2bb 100644 --- a/arch/arm/mach-clps711x/irq.c +++ b/arch/arm/mach-clps711x/irq.c | |||
@@ -27,24 +27,24 @@ | |||
27 | 27 | ||
28 | #include <asm/hardware/clps7111.h> | 28 | #include <asm/hardware/clps7111.h> |
29 | 29 | ||
30 | static void int1_mask(unsigned int irq) | 30 | static void int1_mask(struct irq_data *d) |
31 | { | 31 | { |
32 | u32 intmr1; | 32 | u32 intmr1; |
33 | 33 | ||
34 | intmr1 = clps_readl(INTMR1); | 34 | intmr1 = clps_readl(INTMR1); |
35 | intmr1 &= ~(1 << irq); | 35 | intmr1 &= ~(1 << d->irq); |
36 | clps_writel(intmr1, INTMR1); | 36 | clps_writel(intmr1, INTMR1); |
37 | } | 37 | } |
38 | 38 | ||
39 | static void int1_ack(unsigned int irq) | 39 | static void int1_ack(struct irq_data *d) |
40 | { | 40 | { |
41 | u32 intmr1; | 41 | u32 intmr1; |
42 | 42 | ||
43 | intmr1 = clps_readl(INTMR1); | 43 | intmr1 = clps_readl(INTMR1); |
44 | intmr1 &= ~(1 << irq); | 44 | intmr1 &= ~(1 << d->irq); |
45 | clps_writel(intmr1, INTMR1); | 45 | clps_writel(intmr1, INTMR1); |
46 | 46 | ||
47 | switch (irq) { | 47 | switch (d->irq) { |
48 | case IRQ_CSINT: clps_writel(0, COEOI); break; | 48 | case IRQ_CSINT: clps_writel(0, COEOI); break; |
49 | case IRQ_TC1OI: clps_writel(0, TC1EOI); break; | 49 | case IRQ_TC1OI: clps_writel(0, TC1EOI); break; |
50 | case IRQ_TC2OI: clps_writel(0, TC2EOI); break; | 50 | case IRQ_TC2OI: clps_writel(0, TC2EOI); break; |
@@ -54,56 +54,56 @@ static void int1_ack(unsigned int irq) | |||
54 | } | 54 | } |
55 | } | 55 | } |
56 | 56 | ||
57 | static void int1_unmask(unsigned int irq) | 57 | static void int1_unmask(struct irq_data *d) |
58 | { | 58 | { |
59 | u32 intmr1; | 59 | u32 intmr1; |
60 | 60 | ||
61 | intmr1 = clps_readl(INTMR1); | 61 | intmr1 = clps_readl(INTMR1); |
62 | intmr1 |= 1 << irq; | 62 | intmr1 |= 1 << d->irq; |
63 | clps_writel(intmr1, INTMR1); | 63 | clps_writel(intmr1, INTMR1); |
64 | } | 64 | } |
65 | 65 | ||
66 | static struct irq_chip int1_chip = { | 66 | static struct irq_chip int1_chip = { |
67 | .ack = int1_ack, | 67 | .irq_ack = int1_ack, |
68 | .mask = int1_mask, | 68 | .irq_mask = int1_mask, |
69 | .unmask = int1_unmask, | 69 | .irq_unmask = int1_unmask, |
70 | }; | 70 | }; |
71 | 71 | ||
72 | static void int2_mask(unsigned int irq) | 72 | static void int2_mask(struct irq_data *d) |
73 | { | 73 | { |
74 | u32 intmr2; | 74 | u32 intmr2; |
75 | 75 | ||
76 | intmr2 = clps_readl(INTMR2); | 76 | intmr2 = clps_readl(INTMR2); |
77 | intmr2 &= ~(1 << (irq - 16)); | 77 | intmr2 &= ~(1 << (d->irq - 16)); |
78 | clps_writel(intmr2, INTMR2); | 78 | clps_writel(intmr2, INTMR2); |
79 | } | 79 | } |
80 | 80 | ||
81 | static void int2_ack(unsigned int irq) | 81 | static void int2_ack(struct irq_data *d) |
82 | { | 82 | { |
83 | u32 intmr2; | 83 | u32 intmr2; |
84 | 84 | ||
85 | intmr2 = clps_readl(INTMR2); | 85 | intmr2 = clps_readl(INTMR2); |
86 | intmr2 &= ~(1 << (irq - 16)); | 86 | intmr2 &= ~(1 << (d->irq - 16)); |
87 | clps_writel(intmr2, INTMR2); | 87 | clps_writel(intmr2, INTMR2); |
88 | 88 | ||
89 | switch (irq) { | 89 | switch (d->irq) { |
90 | case IRQ_KBDINT: clps_writel(0, KBDEOI); break; | 90 | case IRQ_KBDINT: clps_writel(0, KBDEOI); break; |
91 | } | 91 | } |
92 | } | 92 | } |
93 | 93 | ||
94 | static void int2_unmask(unsigned int irq) | 94 | static void int2_unmask(struct irq_data *d) |
95 | { | 95 | { |
96 | u32 intmr2; | 96 | u32 intmr2; |
97 | 97 | ||
98 | intmr2 = clps_readl(INTMR2); | 98 | intmr2 = clps_readl(INTMR2); |
99 | intmr2 |= 1 << (irq - 16); | 99 | intmr2 |= 1 << (d->irq - 16); |
100 | clps_writel(intmr2, INTMR2); | 100 | clps_writel(intmr2, INTMR2); |
101 | } | 101 | } |
102 | 102 | ||
103 | static struct irq_chip int2_chip = { | 103 | static struct irq_chip int2_chip = { |
104 | .ack = int2_ack, | 104 | .irq_ack = int2_ack, |
105 | .mask = int2_mask, | 105 | .irq_mask = int2_mask, |
106 | .unmask = int2_unmask, | 106 | .irq_unmask = int2_unmask, |
107 | }; | 107 | }; |
108 | 108 | ||
109 | void __init clps711x_init_irq(void) | 109 | void __init clps711x_init_irq(void) |
diff --git a/arch/arm/mach-davinci/cp_intc.c b/arch/arm/mach-davinci/cp_intc.c index bb4c40ecb80..9abc80a86a2 100644 --- a/arch/arm/mach-davinci/cp_intc.c +++ b/arch/arm/mach-davinci/cp_intc.c | |||
@@ -26,30 +26,30 @@ static inline void cp_intc_write(unsigned long value, unsigned offset) | |||
26 | __raw_writel(value, davinci_intc_base + offset); | 26 | __raw_writel(value, davinci_intc_base + offset); |
27 | } | 27 | } |
28 | 28 | ||
29 | static void cp_intc_ack_irq(unsigned int irq) | 29 | static void cp_intc_ack_irq(struct irq_data *d) |
30 | { | 30 | { |
31 | cp_intc_write(irq, CP_INTC_SYS_STAT_IDX_CLR); | 31 | cp_intc_write(d->irq, CP_INTC_SYS_STAT_IDX_CLR); |
32 | } | 32 | } |
33 | 33 | ||
34 | /* Disable interrupt */ | 34 | /* Disable interrupt */ |
35 | static void cp_intc_mask_irq(unsigned int irq) | 35 | static void cp_intc_mask_irq(struct irq_data *d) |
36 | { | 36 | { |
37 | /* XXX don't know why we need to disable nIRQ here... */ | 37 | /* XXX don't know why we need to disable nIRQ here... */ |
38 | cp_intc_write(1, CP_INTC_HOST_ENABLE_IDX_CLR); | 38 | cp_intc_write(1, CP_INTC_HOST_ENABLE_IDX_CLR); |
39 | cp_intc_write(irq, CP_INTC_SYS_ENABLE_IDX_CLR); | 39 | cp_intc_write(d->irq, CP_INTC_SYS_ENABLE_IDX_CLR); |
40 | cp_intc_write(1, CP_INTC_HOST_ENABLE_IDX_SET); | 40 | cp_intc_write(1, CP_INTC_HOST_ENABLE_IDX_SET); |
41 | } | 41 | } |
42 | 42 | ||
43 | /* Enable interrupt */ | 43 | /* Enable interrupt */ |
44 | static void cp_intc_unmask_irq(unsigned int irq) | 44 | static void cp_intc_unmask_irq(struct irq_data *d) |
45 | { | 45 | { |
46 | cp_intc_write(irq, CP_INTC_SYS_ENABLE_IDX_SET); | 46 | cp_intc_write(d->irq, CP_INTC_SYS_ENABLE_IDX_SET); |
47 | } | 47 | } |
48 | 48 | ||
49 | static int cp_intc_set_irq_type(unsigned int irq, unsigned int flow_type) | 49 | static int cp_intc_set_irq_type(struct irq_data *d, unsigned int flow_type) |
50 | { | 50 | { |
51 | unsigned reg = BIT_WORD(irq); | 51 | unsigned reg = BIT_WORD(d->irq); |
52 | unsigned mask = BIT_MASK(irq); | 52 | unsigned mask = BIT_MASK(d->irq); |
53 | unsigned polarity = cp_intc_read(CP_INTC_SYS_POLARITY(reg)); | 53 | unsigned polarity = cp_intc_read(CP_INTC_SYS_POLARITY(reg)); |
54 | unsigned type = cp_intc_read(CP_INTC_SYS_TYPE(reg)); | 54 | unsigned type = cp_intc_read(CP_INTC_SYS_TYPE(reg)); |
55 | 55 | ||
@@ -85,18 +85,18 @@ static int cp_intc_set_irq_type(unsigned int irq, unsigned int flow_type) | |||
85 | * generic drivers which call {enable|disable}_irq_wake for | 85 | * generic drivers which call {enable|disable}_irq_wake for |
86 | * wake up interrupt sources (eg RTC on DA850). | 86 | * wake up interrupt sources (eg RTC on DA850). |
87 | */ | 87 | */ |
88 | static int cp_intc_set_wake(unsigned int irq, unsigned int on) | 88 | static int cp_intc_set_wake(struct irq_data *d, unsigned int on) |
89 | { | 89 | { |
90 | return 0; | 90 | return 0; |
91 | } | 91 | } |
92 | 92 | ||
93 | static struct irq_chip cp_intc_irq_chip = { | 93 | static struct irq_chip cp_intc_irq_chip = { |
94 | .name = "cp_intc", | 94 | .name = "cp_intc", |
95 | .ack = cp_intc_ack_irq, | 95 | .irq_ack = cp_intc_ack_irq, |
96 | .mask = cp_intc_mask_irq, | 96 | .irq_mask = cp_intc_mask_irq, |
97 | .unmask = cp_intc_unmask_irq, | 97 | .irq_unmask = cp_intc_unmask_irq, |
98 | .set_type = cp_intc_set_irq_type, | 98 | .irq_set_type = cp_intc_set_irq_type, |
99 | .set_wake = cp_intc_set_wake, | 99 | .irq_set_wake = cp_intc_set_wake, |
100 | }; | 100 | }; |
101 | 101 | ||
102 | void __init cp_intc_init(void) | 102 | void __init cp_intc_init(void) |
diff --git a/arch/arm/mach-davinci/gpio.c b/arch/arm/mach-davinci/gpio.c index bf0ff587e46..20d66e5e466 100644 --- a/arch/arm/mach-davinci/gpio.c +++ b/arch/arm/mach-davinci/gpio.c | |||
@@ -205,20 +205,20 @@ pure_initcall(davinci_gpio_setup); | |||
205 | * serve as EDMA event triggers. | 205 | * serve as EDMA event triggers. |
206 | */ | 206 | */ |
207 | 207 | ||
208 | static void gpio_irq_disable(unsigned irq) | 208 | static void gpio_irq_disable(struct irq_data *d) |
209 | { | 209 | { |
210 | struct davinci_gpio_regs __iomem *g = irq2regs(irq); | 210 | struct davinci_gpio_regs __iomem *g = irq2regs(d->irq); |
211 | u32 mask = (u32) get_irq_data(irq); | 211 | u32 mask = (u32) irq_data_get_irq_data(d); |
212 | 212 | ||
213 | __raw_writel(mask, &g->clr_falling); | 213 | __raw_writel(mask, &g->clr_falling); |
214 | __raw_writel(mask, &g->clr_rising); | 214 | __raw_writel(mask, &g->clr_rising); |
215 | } | 215 | } |
216 | 216 | ||
217 | static void gpio_irq_enable(unsigned irq) | 217 | static void gpio_irq_enable(struct irq_data *d) |
218 | { | 218 | { |
219 | struct davinci_gpio_regs __iomem *g = irq2regs(irq); | 219 | struct davinci_gpio_regs __iomem *g = irq2regs(d->irq); |
220 | u32 mask = (u32) get_irq_data(irq); | 220 | u32 mask = (u32) irq_data_get_irq_data(d); |
221 | unsigned status = irq_desc[irq].status; | 221 | unsigned status = irq_desc[d->irq].status; |
222 | 222 | ||
223 | status &= IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING; | 223 | status &= IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING; |
224 | if (!status) | 224 | if (!status) |
@@ -230,19 +230,19 @@ static void gpio_irq_enable(unsigned irq) | |||
230 | __raw_writel(mask, &g->set_rising); | 230 | __raw_writel(mask, &g->set_rising); |
231 | } | 231 | } |
232 | 232 | ||
233 | static int gpio_irq_type(unsigned irq, unsigned trigger) | 233 | static int gpio_irq_type(struct irq_data *d, unsigned trigger) |
234 | { | 234 | { |
235 | struct davinci_gpio_regs __iomem *g = irq2regs(irq); | 235 | struct davinci_gpio_regs __iomem *g = irq2regs(d->irq); |
236 | u32 mask = (u32) get_irq_data(irq); | 236 | u32 mask = (u32) irq_data_get_irq_data(d); |
237 | 237 | ||
238 | if (trigger & ~(IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING)) | 238 | if (trigger & ~(IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING)) |
239 | return -EINVAL; | 239 | return -EINVAL; |
240 | 240 | ||
241 | irq_desc[irq].status &= ~IRQ_TYPE_SENSE_MASK; | 241 | irq_desc[d->irq].status &= ~IRQ_TYPE_SENSE_MASK; |
242 | irq_desc[irq].status |= trigger; | 242 | irq_desc[d->irq].status |= trigger; |
243 | 243 | ||
244 | /* don't enable the IRQ if it's currently disabled */ | 244 | /* don't enable the IRQ if it's currently disabled */ |
245 | if (irq_desc[irq].depth == 0) { | 245 | if (irq_desc[d->irq].depth == 0) { |
246 | __raw_writel(mask, (trigger & IRQ_TYPE_EDGE_FALLING) | 246 | __raw_writel(mask, (trigger & IRQ_TYPE_EDGE_FALLING) |
247 | ? &g->set_falling : &g->clr_falling); | 247 | ? &g->set_falling : &g->clr_falling); |
248 | __raw_writel(mask, (trigger & IRQ_TYPE_EDGE_RISING) | 248 | __raw_writel(mask, (trigger & IRQ_TYPE_EDGE_RISING) |
@@ -253,9 +253,9 @@ static int gpio_irq_type(unsigned irq, unsigned trigger) | |||
253 | 253 | ||
254 | static struct irq_chip gpio_irqchip = { | 254 | static struct irq_chip gpio_irqchip = { |
255 | .name = "GPIO", | 255 | .name = "GPIO", |
256 | .enable = gpio_irq_enable, | 256 | .irq_enable = gpio_irq_enable, |
257 | .disable = gpio_irq_disable, | 257 | .irq_disable = gpio_irq_disable, |
258 | .set_type = gpio_irq_type, | 258 | .irq_set_type = gpio_irq_type, |
259 | }; | 259 | }; |
260 | 260 | ||
261 | static void | 261 | static void |
@@ -269,8 +269,8 @@ gpio_irq_handler(unsigned irq, struct irq_desc *desc) | |||
269 | mask <<= 16; | 269 | mask <<= 16; |
270 | 270 | ||
271 | /* temporarily mask (level sensitive) parent IRQ */ | 271 | /* temporarily mask (level sensitive) parent IRQ */ |
272 | desc->chip->mask(irq); | 272 | desc->irq_data.chip->irq_mask(&desc->irq_data); |
273 | desc->chip->ack(irq); | 273 | desc->irq_data.chip->irq_ack(&desc->irq_data); |
274 | while (1) { | 274 | while (1) { |
275 | u32 status; | 275 | u32 status; |
276 | int n; | 276 | int n; |
@@ -293,7 +293,7 @@ gpio_irq_handler(unsigned irq, struct irq_desc *desc) | |||
293 | status >>= res; | 293 | status >>= res; |
294 | } | 294 | } |
295 | } | 295 | } |
296 | desc->chip->unmask(irq); | 296 | desc->irq_data.chip->irq_unmask(&desc->irq_data); |
297 | /* now it may re-trigger */ | 297 | /* now it may re-trigger */ |
298 | } | 298 | } |
299 | 299 | ||
@@ -320,10 +320,10 @@ static int gpio_to_irq_unbanked(struct gpio_chip *chip, unsigned offset) | |||
320 | return -ENODEV; | 320 | return -ENODEV; |
321 | } | 321 | } |
322 | 322 | ||
323 | static int gpio_irq_type_unbanked(unsigned irq, unsigned trigger) | 323 | static int gpio_irq_type_unbanked(struct irq_data *d, unsigned trigger) |
324 | { | 324 | { |
325 | struct davinci_gpio_regs __iomem *g = irq2regs(irq); | 325 | struct davinci_gpio_regs __iomem *g = irq2regs(d->irq); |
326 | u32 mask = (u32) get_irq_data(irq); | 326 | u32 mask = (u32) irq_data_get_irq_data(d); |
327 | 327 | ||
328 | if (trigger & ~(IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING)) | 328 | if (trigger & ~(IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING)) |
329 | return -EINVAL; | 329 | return -EINVAL; |
@@ -397,7 +397,7 @@ static int __init davinci_gpio_irq_setup(void) | |||
397 | irq = bank_irq; | 397 | irq = bank_irq; |
398 | gpio_irqchip_unbanked = *get_irq_desc_chip(irq_to_desc(irq)); | 398 | gpio_irqchip_unbanked = *get_irq_desc_chip(irq_to_desc(irq)); |
399 | gpio_irqchip_unbanked.name = "GPIO-AINTC"; | 399 | gpio_irqchip_unbanked.name = "GPIO-AINTC"; |
400 | gpio_irqchip_unbanked.set_type = gpio_irq_type_unbanked; | 400 | gpio_irqchip_unbanked.irq_set_type = gpio_irq_type_unbanked; |
401 | 401 | ||
402 | /* default trigger: both edges */ | 402 | /* default trigger: both edges */ |
403 | g = gpio2regs(0); | 403 | g = gpio2regs(0); |
diff --git a/arch/arm/mach-davinci/irq.c b/arch/arm/mach-davinci/irq.c index 784ddf3c5ad..5e05c9b64e1 100644 --- a/arch/arm/mach-davinci/irq.c +++ b/arch/arm/mach-davinci/irq.c | |||
@@ -53,14 +53,14 @@ static inline void davinci_irq_writel(unsigned long value, int offset) | |||
53 | } | 53 | } |
54 | 54 | ||
55 | /* Disable interrupt */ | 55 | /* Disable interrupt */ |
56 | static void davinci_mask_irq(unsigned int irq) | 56 | static void davinci_mask_irq(struct irq_data *d) |
57 | { | 57 | { |
58 | unsigned int mask; | 58 | unsigned int mask; |
59 | u32 l; | 59 | u32 l; |
60 | 60 | ||
61 | mask = 1 << IRQ_BIT(irq); | 61 | mask = 1 << IRQ_BIT(d->irq); |
62 | 62 | ||
63 | if (irq > 31) { | 63 | if (d->irq > 31) { |
64 | l = davinci_irq_readl(IRQ_ENT_REG1_OFFSET); | 64 | l = davinci_irq_readl(IRQ_ENT_REG1_OFFSET); |
65 | l &= ~mask; | 65 | l &= ~mask; |
66 | davinci_irq_writel(l, IRQ_ENT_REG1_OFFSET); | 66 | davinci_irq_writel(l, IRQ_ENT_REG1_OFFSET); |
@@ -72,14 +72,14 @@ static void davinci_mask_irq(unsigned int irq) | |||
72 | } | 72 | } |
73 | 73 | ||
74 | /* Enable interrupt */ | 74 | /* Enable interrupt */ |
75 | static void davinci_unmask_irq(unsigned int irq) | 75 | static void davinci_unmask_irq(struct irq_data *d) |
76 | { | 76 | { |
77 | unsigned int mask; | 77 | unsigned int mask; |
78 | u32 l; | 78 | u32 l; |
79 | 79 | ||
80 | mask = 1 << IRQ_BIT(irq); | 80 | mask = 1 << IRQ_BIT(d->irq); |
81 | 81 | ||
82 | if (irq > 31) { | 82 | if (d->irq > 31) { |
83 | l = davinci_irq_readl(IRQ_ENT_REG1_OFFSET); | 83 | l = davinci_irq_readl(IRQ_ENT_REG1_OFFSET); |
84 | l |= mask; | 84 | l |= mask; |
85 | davinci_irq_writel(l, IRQ_ENT_REG1_OFFSET); | 85 | davinci_irq_writel(l, IRQ_ENT_REG1_OFFSET); |
@@ -91,23 +91,23 @@ static void davinci_unmask_irq(unsigned int irq) | |||
91 | } | 91 | } |
92 | 92 | ||
93 | /* EOI interrupt */ | 93 | /* EOI interrupt */ |
94 | static void davinci_ack_irq(unsigned int irq) | 94 | static void davinci_ack_irq(struct irq_data *d) |
95 | { | 95 | { |
96 | unsigned int mask; | 96 | unsigned int mask; |
97 | 97 | ||
98 | mask = 1 << IRQ_BIT(irq); | 98 | mask = 1 << IRQ_BIT(d->irq); |
99 | 99 | ||
100 | if (irq > 31) | 100 | if (d->irq > 31) |
101 | davinci_irq_writel(mask, IRQ_REG1_OFFSET); | 101 | davinci_irq_writel(mask, IRQ_REG1_OFFSET); |
102 | else | 102 | else |
103 | davinci_irq_writel(mask, IRQ_REG0_OFFSET); | 103 | davinci_irq_writel(mask, IRQ_REG0_OFFSET); |
104 | } | 104 | } |
105 | 105 | ||
106 | static struct irq_chip davinci_irq_chip_0 = { | 106 | static struct irq_chip davinci_irq_chip_0 = { |
107 | .name = "AINTC", | 107 | .name = "AINTC", |
108 | .ack = davinci_ack_irq, | 108 | .irq_ack = davinci_ack_irq, |
109 | .mask = davinci_mask_irq, | 109 | .irq_mask = davinci_mask_irq, |
110 | .unmask = davinci_unmask_irq, | 110 | .irq_unmask = davinci_unmask_irq, |
111 | }; | 111 | }; |
112 | 112 | ||
113 | /* ARM Interrupt Controller Initialization */ | 113 | /* ARM Interrupt Controller Initialization */ |
diff --git a/arch/arm/mach-dove/irq.c b/arch/arm/mach-dove/irq.c index 61bfcb3b08c..9317f0558b5 100644 --- a/arch/arm/mach-dove/irq.c +++ b/arch/arm/mach-dove/irq.c | |||
@@ -36,9 +36,9 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
36 | } | 36 | } |
37 | } | 37 | } |
38 | 38 | ||
39 | static void pmu_irq_mask(unsigned int irq) | 39 | static void pmu_irq_mask(struct irq_data *d) |
40 | { | 40 | { |
41 | int pin = irq_to_pmu(irq); | 41 | int pin = irq_to_pmu(d->irq); |
42 | u32 u; | 42 | u32 u; |
43 | 43 | ||
44 | u = readl(PMU_INTERRUPT_MASK); | 44 | u = readl(PMU_INTERRUPT_MASK); |
@@ -46,9 +46,9 @@ static void pmu_irq_mask(unsigned int irq) | |||
46 | writel(u, PMU_INTERRUPT_MASK); | 46 | writel(u, PMU_INTERRUPT_MASK); |
47 | } | 47 | } |
48 | 48 | ||
49 | static void pmu_irq_unmask(unsigned int irq) | 49 | static void pmu_irq_unmask(struct irq_data *d) |
50 | { | 50 | { |
51 | int pin = irq_to_pmu(irq); | 51 | int pin = irq_to_pmu(d->irq); |
52 | u32 u; | 52 | u32 u; |
53 | 53 | ||
54 | u = readl(PMU_INTERRUPT_MASK); | 54 | u = readl(PMU_INTERRUPT_MASK); |
@@ -56,9 +56,9 @@ static void pmu_irq_unmask(unsigned int irq) | |||
56 | writel(u, PMU_INTERRUPT_MASK); | 56 | writel(u, PMU_INTERRUPT_MASK); |
57 | } | 57 | } |
58 | 58 | ||
59 | static void pmu_irq_ack(unsigned int irq) | 59 | static void pmu_irq_ack(struct irq_data *d) |
60 | { | 60 | { |
61 | int pin = irq_to_pmu(irq); | 61 | int pin = irq_to_pmu(d->irq); |
62 | u32 u; | 62 | u32 u; |
63 | 63 | ||
64 | u = ~(1 << (pin & 31)); | 64 | u = ~(1 << (pin & 31)); |
@@ -67,9 +67,9 @@ static void pmu_irq_ack(unsigned int irq) | |||
67 | 67 | ||
68 | static struct irq_chip pmu_irq_chip = { | 68 | static struct irq_chip pmu_irq_chip = { |
69 | .name = "pmu_irq", | 69 | .name = "pmu_irq", |
70 | .mask = pmu_irq_mask, | 70 | .irq_mask = pmu_irq_mask, |
71 | .unmask = pmu_irq_unmask, | 71 | .irq_unmask = pmu_irq_unmask, |
72 | .ack = pmu_irq_ack, | 72 | .irq_ack = pmu_irq_ack, |
73 | }; | 73 | }; |
74 | 74 | ||
75 | static void pmu_irq_handler(unsigned int irq, struct irq_desc *desc) | 75 | static void pmu_irq_handler(unsigned int irq, struct irq_desc *desc) |
diff --git a/arch/arm/mach-ebsa110/core.c b/arch/arm/mach-ebsa110/core.c index 5df4099fc14..7df083f37fa 100644 --- a/arch/arm/mach-ebsa110/core.c +++ b/arch/arm/mach-ebsa110/core.c | |||
@@ -35,20 +35,20 @@ | |||
35 | #define IRQ_STAT 0xff000000 /* read */ | 35 | #define IRQ_STAT 0xff000000 /* read */ |
36 | #define IRQ_MCLR 0xff000000 /* write */ | 36 | #define IRQ_MCLR 0xff000000 /* write */ |
37 | 37 | ||
38 | static void ebsa110_mask_irq(unsigned int irq) | 38 | static void ebsa110_mask_irq(struct irq_data *d) |
39 | { | 39 | { |
40 | __raw_writeb(1 << irq, IRQ_MCLR); | 40 | __raw_writeb(1 << d->irq, IRQ_MCLR); |
41 | } | 41 | } |
42 | 42 | ||
43 | static void ebsa110_unmask_irq(unsigned int irq) | 43 | static void ebsa110_unmask_irq(struct irq_data *d) |
44 | { | 44 | { |
45 | __raw_writeb(1 << irq, IRQ_MSET); | 45 | __raw_writeb(1 << d->irq, IRQ_MSET); |
46 | } | 46 | } |
47 | 47 | ||
48 | static struct irq_chip ebsa110_irq_chip = { | 48 | static struct irq_chip ebsa110_irq_chip = { |
49 | .ack = ebsa110_mask_irq, | 49 | .irq_ack = ebsa110_mask_irq, |
50 | .mask = ebsa110_mask_irq, | 50 | .irq_mask = ebsa110_mask_irq, |
51 | .unmask = ebsa110_unmask_irq, | 51 | .irq_unmask = ebsa110_unmask_irq, |
52 | }; | 52 | }; |
53 | 53 | ||
54 | static void __init ebsa110_init_irq(void) | 54 | static void __init ebsa110_init_irq(void) |
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index ffdf87be295..82079545adc 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c | |||
@@ -838,7 +838,7 @@ EXPORT_SYMBOL(ep93xx_i2s_release); | |||
838 | static struct resource ep93xx_ac97_resources[] = { | 838 | static struct resource ep93xx_ac97_resources[] = { |
839 | { | 839 | { |
840 | .start = EP93XX_AAC_PHYS_BASE, | 840 | .start = EP93XX_AAC_PHYS_BASE, |
841 | .end = EP93XX_AAC_PHYS_BASE + 0xb0 - 1, | 841 | .end = EP93XX_AAC_PHYS_BASE + 0xac - 1, |
842 | .flags = IORESOURCE_MEM, | 842 | .flags = IORESOURCE_MEM, |
843 | }, | 843 | }, |
844 | { | 844 | { |
diff --git a/arch/arm/mach-ep93xx/gpio.c b/arch/arm/mach-ep93xx/gpio.c index cf547ad7ebd..bec34b83495 100644 --- a/arch/arm/mach-ep93xx/gpio.c +++ b/arch/arm/mach-ep93xx/gpio.c | |||
@@ -112,13 +112,13 @@ static void ep93xx_gpio_f_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
112 | generic_handle_irq(gpio_irq); | 112 | generic_handle_irq(gpio_irq); |
113 | } | 113 | } |
114 | 114 | ||
115 | static void ep93xx_gpio_irq_ack(unsigned int irq) | 115 | static void ep93xx_gpio_irq_ack(struct irq_data *d) |
116 | { | 116 | { |
117 | int line = irq_to_gpio(irq); | 117 | int line = irq_to_gpio(d->irq); |
118 | int port = line >> 3; | 118 | int port = line >> 3; |
119 | int port_mask = 1 << (line & 7); | 119 | int port_mask = 1 << (line & 7); |
120 | 120 | ||
121 | if ((irq_desc[irq].status & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH) { | 121 | if ((irq_desc[d->irq].status & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH) { |
122 | gpio_int_type2[port] ^= port_mask; /* switch edge direction */ | 122 | gpio_int_type2[port] ^= port_mask; /* switch edge direction */ |
123 | ep93xx_gpio_update_int_params(port); | 123 | ep93xx_gpio_update_int_params(port); |
124 | } | 124 | } |
@@ -126,13 +126,13 @@ static void ep93xx_gpio_irq_ack(unsigned int irq) | |||
126 | __raw_writeb(port_mask, EP93XX_GPIO_REG(eoi_register_offset[port])); | 126 | __raw_writeb(port_mask, EP93XX_GPIO_REG(eoi_register_offset[port])); |
127 | } | 127 | } |
128 | 128 | ||
129 | static void ep93xx_gpio_irq_mask_ack(unsigned int irq) | 129 | static void ep93xx_gpio_irq_mask_ack(struct irq_data *d) |
130 | { | 130 | { |
131 | int line = irq_to_gpio(irq); | 131 | int line = irq_to_gpio(d->irq); |
132 | int port = line >> 3; | 132 | int port = line >> 3; |
133 | int port_mask = 1 << (line & 7); | 133 | int port_mask = 1 << (line & 7); |
134 | 134 | ||
135 | if ((irq_desc[irq].status & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH) | 135 | if ((irq_desc[d->irq].status & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH) |
136 | gpio_int_type2[port] ^= port_mask; /* switch edge direction */ | 136 | gpio_int_type2[port] ^= port_mask; /* switch edge direction */ |
137 | 137 | ||
138 | gpio_int_unmasked[port] &= ~port_mask; | 138 | gpio_int_unmasked[port] &= ~port_mask; |
@@ -141,18 +141,18 @@ static void ep93xx_gpio_irq_mask_ack(unsigned int irq) | |||
141 | __raw_writeb(port_mask, EP93XX_GPIO_REG(eoi_register_offset[port])); | 141 | __raw_writeb(port_mask, EP93XX_GPIO_REG(eoi_register_offset[port])); |
142 | } | 142 | } |
143 | 143 | ||
144 | static void ep93xx_gpio_irq_mask(unsigned int irq) | 144 | static void ep93xx_gpio_irq_mask(struct irq_data *d) |
145 | { | 145 | { |
146 | int line = irq_to_gpio(irq); | 146 | int line = irq_to_gpio(d->irq); |
147 | int port = line >> 3; | 147 | int port = line >> 3; |
148 | 148 | ||
149 | gpio_int_unmasked[port] &= ~(1 << (line & 7)); | 149 | gpio_int_unmasked[port] &= ~(1 << (line & 7)); |
150 | ep93xx_gpio_update_int_params(port); | 150 | ep93xx_gpio_update_int_params(port); |
151 | } | 151 | } |
152 | 152 | ||
153 | static void ep93xx_gpio_irq_unmask(unsigned int irq) | 153 | static void ep93xx_gpio_irq_unmask(struct irq_data *d) |
154 | { | 154 | { |
155 | int line = irq_to_gpio(irq); | 155 | int line = irq_to_gpio(d->irq); |
156 | int port = line >> 3; | 156 | int port = line >> 3; |
157 | 157 | ||
158 | gpio_int_unmasked[port] |= 1 << (line & 7); | 158 | gpio_int_unmasked[port] |= 1 << (line & 7); |
@@ -164,10 +164,10 @@ static void ep93xx_gpio_irq_unmask(unsigned int irq) | |||
164 | * edge (1) triggered, while gpio_int_type2 controls whether it | 164 | * edge (1) triggered, while gpio_int_type2 controls whether it |
165 | * triggers on low/falling (0) or high/rising (1). | 165 | * triggers on low/falling (0) or high/rising (1). |
166 | */ | 166 | */ |
167 | static int ep93xx_gpio_irq_type(unsigned int irq, unsigned int type) | 167 | static int ep93xx_gpio_irq_type(struct irq_data *d, unsigned int type) |
168 | { | 168 | { |
169 | struct irq_desc *desc = irq_desc + irq; | 169 | struct irq_desc *desc = irq_desc + d->irq; |
170 | const int gpio = irq_to_gpio(irq); | 170 | const int gpio = irq_to_gpio(d->irq); |
171 | const int port = gpio >> 3; | 171 | const int port = gpio >> 3; |
172 | const int port_mask = 1 << (gpio & 7); | 172 | const int port_mask = 1 << (gpio & 7); |
173 | 173 | ||
@@ -220,11 +220,11 @@ static int ep93xx_gpio_irq_type(unsigned int irq, unsigned int type) | |||
220 | 220 | ||
221 | static struct irq_chip ep93xx_gpio_irq_chip = { | 221 | static struct irq_chip ep93xx_gpio_irq_chip = { |
222 | .name = "GPIO", | 222 | .name = "GPIO", |
223 | .ack = ep93xx_gpio_irq_ack, | 223 | .irq_ack = ep93xx_gpio_irq_ack, |
224 | .mask_ack = ep93xx_gpio_irq_mask_ack, | 224 | .irq_mask_ack = ep93xx_gpio_irq_mask_ack, |
225 | .mask = ep93xx_gpio_irq_mask, | 225 | .irq_mask = ep93xx_gpio_irq_mask, |
226 | .unmask = ep93xx_gpio_irq_unmask, | 226 | .irq_unmask = ep93xx_gpio_irq_unmask, |
227 | .set_type = ep93xx_gpio_irq_type, | 227 | .irq_set_type = ep93xx_gpio_irq_type, |
228 | }; | 228 | }; |
229 | 229 | ||
230 | void __init ep93xx_gpio_init_irq(void) | 230 | void __init ep93xx_gpio_init_irq(void) |
@@ -427,6 +427,13 @@ void __init ep93xx_gpio_init(void) | |||
427 | { | 427 | { |
428 | int i; | 428 | int i; |
429 | 429 | ||
430 | /* Set Ports C, D, E, G, and H for GPIO use */ | ||
431 | ep93xx_devcfg_set_bits(EP93XX_SYSCON_DEVCFG_KEYS | | ||
432 | EP93XX_SYSCON_DEVCFG_GONK | | ||
433 | EP93XX_SYSCON_DEVCFG_EONIDE | | ||
434 | EP93XX_SYSCON_DEVCFG_GONIDE | | ||
435 | EP93XX_SYSCON_DEVCFG_HONIDE); | ||
436 | |||
430 | for (i = 0; i < ARRAY_SIZE(ep93xx_gpio_banks); i++) | 437 | for (i = 0; i < ARRAY_SIZE(ep93xx_gpio_banks); i++) |
431 | gpiochip_add(&ep93xx_gpio_banks[i].chip); | 438 | gpiochip_add(&ep93xx_gpio_banks[i].chip); |
432 | } | 439 | } |
diff --git a/arch/arm/mach-footbridge/common.c b/arch/arm/mach-footbridge/common.c index 88b3dd89be8..84c5f258f2d 100644 --- a/arch/arm/mach-footbridge/common.c +++ b/arch/arm/mach-footbridge/common.c | |||
@@ -75,20 +75,20 @@ static const int fb_irq_mask[] = { | |||
75 | IRQ_MASK_PCI_PERR, /* 19 */ | 75 | IRQ_MASK_PCI_PERR, /* 19 */ |
76 | }; | 76 | }; |
77 | 77 | ||
78 | static void fb_mask_irq(unsigned int irq) | 78 | static void fb_mask_irq(struct irq_data *d) |
79 | { | 79 | { |
80 | *CSR_IRQ_DISABLE = fb_irq_mask[_DC21285_INR(irq)]; | 80 | *CSR_IRQ_DISABLE = fb_irq_mask[_DC21285_INR(d->irq)]; |
81 | } | 81 | } |
82 | 82 | ||
83 | static void fb_unmask_irq(unsigned int irq) | 83 | static void fb_unmask_irq(struct irq_data *d) |
84 | { | 84 | { |
85 | *CSR_IRQ_ENABLE = fb_irq_mask[_DC21285_INR(irq)]; | 85 | *CSR_IRQ_ENABLE = fb_irq_mask[_DC21285_INR(d->irq)]; |
86 | } | 86 | } |
87 | 87 | ||
88 | static struct irq_chip fb_chip = { | 88 | static struct irq_chip fb_chip = { |
89 | .ack = fb_mask_irq, | 89 | .irq_ack = fb_mask_irq, |
90 | .mask = fb_mask_irq, | 90 | .irq_mask = fb_mask_irq, |
91 | .unmask = fb_unmask_irq, | 91 | .irq_unmask = fb_unmask_irq, |
92 | }; | 92 | }; |
93 | 93 | ||
94 | static void __init __fb_init_irq(void) | 94 | static void __init __fb_init_irq(void) |
diff --git a/arch/arm/mach-footbridge/include/mach/debug-macro.S b/arch/arm/mach-footbridge/include/mach/debug-macro.S index 3c9e0c40c67..30b971d6581 100644 --- a/arch/arm/mach-footbridge/include/mach/debug-macro.S +++ b/arch/arm/mach-footbridge/include/mach/debug-macro.S | |||
@@ -17,8 +17,8 @@ | |||
17 | /* For NetWinder debugging */ | 17 | /* For NetWinder debugging */ |
18 | .macro addruart, rp, rv | 18 | .macro addruart, rp, rv |
19 | mov \rp, #0x000003f8 | 19 | mov \rp, #0x000003f8 |
20 | orr \rv, \rp, #0x7c000000 @ physical | 20 | orr \rv, \rp, #0xff000000 @ virtual |
21 | orr \rp, \rp, #0xff000000 @ virtual | 21 | orr \rp, \rp, #0x7c000000 @ physical |
22 | .endm | 22 | .endm |
23 | 23 | ||
24 | #define UART_SHIFT 0 | 24 | #define UART_SHIFT 0 |
diff --git a/arch/arm/mach-footbridge/isa-irq.c b/arch/arm/mach-footbridge/isa-irq.c index 8bfd06aeb64..de7a5cb5dbe 100644 --- a/arch/arm/mach-footbridge/isa-irq.c +++ b/arch/arm/mach-footbridge/isa-irq.c | |||
@@ -30,61 +30,61 @@ | |||
30 | 30 | ||
31 | #include "common.h" | 31 | #include "common.h" |
32 | 32 | ||
33 | static void isa_mask_pic_lo_irq(unsigned int irq) | 33 | static void isa_mask_pic_lo_irq(struct irq_data *d) |
34 | { | 34 | { |
35 | unsigned int mask = 1 << (irq & 7); | 35 | unsigned int mask = 1 << (d->irq & 7); |
36 | 36 | ||
37 | outb(inb(PIC_MASK_LO) | mask, PIC_MASK_LO); | 37 | outb(inb(PIC_MASK_LO) | mask, PIC_MASK_LO); |
38 | } | 38 | } |
39 | 39 | ||
40 | static void isa_ack_pic_lo_irq(unsigned int irq) | 40 | static void isa_ack_pic_lo_irq(struct irq_data *d) |
41 | { | 41 | { |
42 | unsigned int mask = 1 << (irq & 7); | 42 | unsigned int mask = 1 << (d->irq & 7); |
43 | 43 | ||
44 | outb(inb(PIC_MASK_LO) | mask, PIC_MASK_LO); | 44 | outb(inb(PIC_MASK_LO) | mask, PIC_MASK_LO); |
45 | outb(0x20, PIC_LO); | 45 | outb(0x20, PIC_LO); |
46 | } | 46 | } |
47 | 47 | ||
48 | static void isa_unmask_pic_lo_irq(unsigned int irq) | 48 | static void isa_unmask_pic_lo_irq(struct irq_data *d) |
49 | { | 49 | { |
50 | unsigned int mask = 1 << (irq & 7); | 50 | unsigned int mask = 1 << (d->irq & 7); |
51 | 51 | ||
52 | outb(inb(PIC_MASK_LO) & ~mask, PIC_MASK_LO); | 52 | outb(inb(PIC_MASK_LO) & ~mask, PIC_MASK_LO); |
53 | } | 53 | } |
54 | 54 | ||
55 | static struct irq_chip isa_lo_chip = { | 55 | static struct irq_chip isa_lo_chip = { |
56 | .ack = isa_ack_pic_lo_irq, | 56 | .irq_ack = isa_ack_pic_lo_irq, |
57 | .mask = isa_mask_pic_lo_irq, | 57 | .irq_mask = isa_mask_pic_lo_irq, |
58 | .unmask = isa_unmask_pic_lo_irq, | 58 | .irq_unmask = isa_unmask_pic_lo_irq, |
59 | }; | 59 | }; |
60 | 60 | ||
61 | static void isa_mask_pic_hi_irq(unsigned int irq) | 61 | static void isa_mask_pic_hi_irq(struct irq_data *d) |
62 | { | 62 | { |
63 | unsigned int mask = 1 << (irq & 7); | 63 | unsigned int mask = 1 << (d->irq & 7); |
64 | 64 | ||
65 | outb(inb(PIC_MASK_HI) | mask, PIC_MASK_HI); | 65 | outb(inb(PIC_MASK_HI) | mask, PIC_MASK_HI); |
66 | } | 66 | } |
67 | 67 | ||
68 | static void isa_ack_pic_hi_irq(unsigned int irq) | 68 | static void isa_ack_pic_hi_irq(struct irq_data *d) |
69 | { | 69 | { |
70 | unsigned int mask = 1 << (irq & 7); | 70 | unsigned int mask = 1 << (d->irq & 7); |
71 | 71 | ||
72 | outb(inb(PIC_MASK_HI) | mask, PIC_MASK_HI); | 72 | outb(inb(PIC_MASK_HI) | mask, PIC_MASK_HI); |
73 | outb(0x62, PIC_LO); | 73 | outb(0x62, PIC_LO); |
74 | outb(0x20, PIC_HI); | 74 | outb(0x20, PIC_HI); |
75 | } | 75 | } |
76 | 76 | ||
77 | static void isa_unmask_pic_hi_irq(unsigned int irq) | 77 | static void isa_unmask_pic_hi_irq(struct irq_data *d) |
78 | { | 78 | { |
79 | unsigned int mask = 1 << (irq & 7); | 79 | unsigned int mask = 1 << (d->irq & 7); |
80 | 80 | ||
81 | outb(inb(PIC_MASK_HI) & ~mask, PIC_MASK_HI); | 81 | outb(inb(PIC_MASK_HI) & ~mask, PIC_MASK_HI); |
82 | } | 82 | } |
83 | 83 | ||
84 | static struct irq_chip isa_hi_chip = { | 84 | static struct irq_chip isa_hi_chip = { |
85 | .ack = isa_ack_pic_hi_irq, | 85 | .irq_ack = isa_ack_pic_hi_irq, |
86 | .mask = isa_mask_pic_hi_irq, | 86 | .irq_mask = isa_mask_pic_hi_irq, |
87 | .unmask = isa_unmask_pic_hi_irq, | 87 | .irq_unmask = isa_unmask_pic_hi_irq, |
88 | }; | 88 | }; |
89 | 89 | ||
90 | static void | 90 | static void |
diff --git a/arch/arm/mach-gemini/gpio.c b/arch/arm/mach-gemini/gpio.c index fe3bd5ac8b1..fa3d333f21e 100644 --- a/arch/arm/mach-gemini/gpio.c +++ b/arch/arm/mach-gemini/gpio.c | |||
@@ -54,33 +54,33 @@ static void _set_gpio_irqenable(unsigned int base, unsigned int index, | |||
54 | __raw_writel(reg, base + GPIO_INT_EN); | 54 | __raw_writel(reg, base + GPIO_INT_EN); |
55 | } | 55 | } |
56 | 56 | ||
57 | static void gpio_ack_irq(unsigned int irq) | 57 | static void gpio_ack_irq(struct irq_data *d) |
58 | { | 58 | { |
59 | unsigned int gpio = irq_to_gpio(irq); | 59 | unsigned int gpio = irq_to_gpio(d->irq); |
60 | unsigned int base = GPIO_BASE(gpio / 32); | 60 | unsigned int base = GPIO_BASE(gpio / 32); |
61 | 61 | ||
62 | __raw_writel(1 << (gpio % 32), base + GPIO_INT_CLR); | 62 | __raw_writel(1 << (gpio % 32), base + GPIO_INT_CLR); |
63 | } | 63 | } |
64 | 64 | ||
65 | static void gpio_mask_irq(unsigned int irq) | 65 | static void gpio_mask_irq(struct irq_data *d) |
66 | { | 66 | { |
67 | unsigned int gpio = irq_to_gpio(irq); | 67 | unsigned int gpio = irq_to_gpio(d->irq); |
68 | unsigned int base = GPIO_BASE(gpio / 32); | 68 | unsigned int base = GPIO_BASE(gpio / 32); |
69 | 69 | ||
70 | _set_gpio_irqenable(base, gpio % 32, 0); | 70 | _set_gpio_irqenable(base, gpio % 32, 0); |
71 | } | 71 | } |
72 | 72 | ||
73 | static void gpio_unmask_irq(unsigned int irq) | 73 | static void gpio_unmask_irq(struct irq_data *d) |
74 | { | 74 | { |
75 | unsigned int gpio = irq_to_gpio(irq); | 75 | unsigned int gpio = irq_to_gpio(d->irq); |
76 | unsigned int base = GPIO_BASE(gpio / 32); | 76 | unsigned int base = GPIO_BASE(gpio / 32); |
77 | 77 | ||
78 | _set_gpio_irqenable(base, gpio % 32, 1); | 78 | _set_gpio_irqenable(base, gpio % 32, 1); |
79 | } | 79 | } |
80 | 80 | ||
81 | static int gpio_set_irq_type(unsigned int irq, unsigned int type) | 81 | static int gpio_set_irq_type(struct irq_data *d, unsigned int type) |
82 | { | 82 | { |
83 | unsigned int gpio = irq_to_gpio(irq); | 83 | unsigned int gpio = irq_to_gpio(d->irq); |
84 | unsigned int gpio_mask = 1 << (gpio % 32); | 84 | unsigned int gpio_mask = 1 << (gpio % 32); |
85 | unsigned int base = GPIO_BASE(gpio / 32); | 85 | unsigned int base = GPIO_BASE(gpio / 32); |
86 | unsigned int reg_both, reg_level, reg_type; | 86 | unsigned int reg_both, reg_level, reg_type; |
@@ -120,7 +120,7 @@ static int gpio_set_irq_type(unsigned int irq, unsigned int type) | |||
120 | __raw_writel(reg_level, base + GPIO_INT_LEVEL); | 120 | __raw_writel(reg_level, base + GPIO_INT_LEVEL); |
121 | __raw_writel(reg_both, base + GPIO_INT_BOTH_EDGE); | 121 | __raw_writel(reg_both, base + GPIO_INT_BOTH_EDGE); |
122 | 122 | ||
123 | gpio_ack_irq(irq); | 123 | gpio_ack_irq(d->irq); |
124 | 124 | ||
125 | return 0; | 125 | return 0; |
126 | } | 126 | } |
@@ -146,10 +146,10 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
146 | 146 | ||
147 | static struct irq_chip gpio_irq_chip = { | 147 | static struct irq_chip gpio_irq_chip = { |
148 | .name = "GPIO", | 148 | .name = "GPIO", |
149 | .ack = gpio_ack_irq, | 149 | .irq_ack = gpio_ack_irq, |
150 | .mask = gpio_mask_irq, | 150 | .irq_mask = gpio_mask_irq, |
151 | .unmask = gpio_unmask_irq, | 151 | .irq_unmask = gpio_unmask_irq, |
152 | .set_type = gpio_set_irq_type, | 152 | .irq_set_type = gpio_set_irq_type, |
153 | }; | 153 | }; |
154 | 154 | ||
155 | static void _set_gpio_direction(struct gpio_chip *chip, unsigned offset, | 155 | static void _set_gpio_direction(struct gpio_chip *chip, unsigned offset, |
diff --git a/arch/arm/mach-gemini/irq.c b/arch/arm/mach-gemini/irq.c index 9e613ca8120..96bc227dd84 100644 --- a/arch/arm/mach-gemini/irq.c +++ b/arch/arm/mach-gemini/irq.c | |||
@@ -32,34 +32,34 @@ | |||
32 | #define FIQ_LEVEL(base_addr) (base_addr + 0x30) | 32 | #define FIQ_LEVEL(base_addr) (base_addr + 0x30) |
33 | #define FIQ_STATUS(base_addr) (base_addr + 0x34) | 33 | #define FIQ_STATUS(base_addr) (base_addr + 0x34) |
34 | 34 | ||
35 | static void gemini_ack_irq(unsigned int irq) | 35 | static void gemini_ack_irq(struct irq_data *d) |
36 | { | 36 | { |
37 | __raw_writel(1 << irq, IRQ_CLEAR(IO_ADDRESS(GEMINI_INTERRUPT_BASE))); | 37 | __raw_writel(1 << d->irq, IRQ_CLEAR(IO_ADDRESS(GEMINI_INTERRUPT_BASE))); |
38 | } | 38 | } |
39 | 39 | ||
40 | static void gemini_mask_irq(unsigned int irq) | 40 | static void gemini_mask_irq(struct irq_data *d) |
41 | { | 41 | { |
42 | unsigned int mask; | 42 | unsigned int mask; |
43 | 43 | ||
44 | mask = __raw_readl(IRQ_MASK(IO_ADDRESS(GEMINI_INTERRUPT_BASE))); | 44 | mask = __raw_readl(IRQ_MASK(IO_ADDRESS(GEMINI_INTERRUPT_BASE))); |
45 | mask &= ~(1 << irq); | 45 | mask &= ~(1 << d->irq); |
46 | __raw_writel(mask, IRQ_MASK(IO_ADDRESS(GEMINI_INTERRUPT_BASE))); | 46 | __raw_writel(mask, IRQ_MASK(IO_ADDRESS(GEMINI_INTERRUPT_BASE))); |
47 | } | 47 | } |
48 | 48 | ||
49 | static void gemini_unmask_irq(unsigned int irq) | 49 | static void gemini_unmask_irq(struct irq_data *d) |
50 | { | 50 | { |
51 | unsigned int mask; | 51 | unsigned int mask; |
52 | 52 | ||
53 | mask = __raw_readl(IRQ_MASK(IO_ADDRESS(GEMINI_INTERRUPT_BASE))); | 53 | mask = __raw_readl(IRQ_MASK(IO_ADDRESS(GEMINI_INTERRUPT_BASE))); |
54 | mask |= (1 << irq); | 54 | mask |= (1 << d->irq); |
55 | __raw_writel(mask, IRQ_MASK(IO_ADDRESS(GEMINI_INTERRUPT_BASE))); | 55 | __raw_writel(mask, IRQ_MASK(IO_ADDRESS(GEMINI_INTERRUPT_BASE))); |
56 | } | 56 | } |
57 | 57 | ||
58 | static struct irq_chip gemini_irq_chip = { | 58 | static struct irq_chip gemini_irq_chip = { |
59 | .name = "INTC", | 59 | .name = "INTC", |
60 | .ack = gemini_ack_irq, | 60 | .irq_ack = gemini_ack_irq, |
61 | .mask = gemini_mask_irq, | 61 | .irq_mask = gemini_mask_irq, |
62 | .unmask = gemini_unmask_irq, | 62 | .irq_unmask = gemini_unmask_irq, |
63 | }; | 63 | }; |
64 | 64 | ||
65 | static struct resource irq_resource = { | 65 | static struct resource irq_resource = { |
diff --git a/arch/arm/mach-h720x/common.c b/arch/arm/mach-h720x/common.c index bdb3f670680..1f28c90932c 100644 --- a/arch/arm/mach-h720x/common.c +++ b/arch/arm/mach-h720x/common.c | |||
@@ -52,17 +52,17 @@ unsigned long h720x_gettimeoffset(void) | |||
52 | /* | 52 | /* |
53 | * mask Global irq's | 53 | * mask Global irq's |
54 | */ | 54 | */ |
55 | static void mask_global_irq (unsigned int irq ) | 55 | static void mask_global_irq(struct irq_data *d) |
56 | { | 56 | { |
57 | CPU_REG (IRQC_VIRT, IRQC_IER) &= ~(1 << irq); | 57 | CPU_REG (IRQC_VIRT, IRQC_IER) &= ~(1 << d->irq); |
58 | } | 58 | } |
59 | 59 | ||
60 | /* | 60 | /* |
61 | * unmask Global irq's | 61 | * unmask Global irq's |
62 | */ | 62 | */ |
63 | static void unmask_global_irq (unsigned int irq ) | 63 | static void unmask_global_irq(struct irq_data *d) |
64 | { | 64 | { |
65 | CPU_REG (IRQC_VIRT, IRQC_IER) |= (1 << irq); | 65 | CPU_REG (IRQC_VIRT, IRQC_IER) |= (1 << d->irq); |
66 | } | 66 | } |
67 | 67 | ||
68 | 68 | ||
@@ -70,10 +70,10 @@ static void unmask_global_irq (unsigned int irq ) | |||
70 | * ack GPIO irq's | 70 | * ack GPIO irq's |
71 | * Ack only for edge triggered int's valid | 71 | * Ack only for edge triggered int's valid |
72 | */ | 72 | */ |
73 | static void inline ack_gpio_irq(u32 irq) | 73 | static void inline ack_gpio_irq(struct irq_data *d) |
74 | { | 74 | { |
75 | u32 reg_base = GPIO_VIRT(IRQ_TO_REGNO(irq)); | 75 | u32 reg_base = GPIO_VIRT(IRQ_TO_REGNO(d->irq)); |
76 | u32 bit = IRQ_TO_BIT(irq); | 76 | u32 bit = IRQ_TO_BIT(d->irq); |
77 | if ( (CPU_REG (reg_base, GPIO_EDGE) & bit)) | 77 | if ( (CPU_REG (reg_base, GPIO_EDGE) & bit)) |
78 | CPU_REG (reg_base, GPIO_CLR) = bit; | 78 | CPU_REG (reg_base, GPIO_CLR) = bit; |
79 | } | 79 | } |
@@ -81,20 +81,20 @@ static void inline ack_gpio_irq(u32 irq) | |||
81 | /* | 81 | /* |
82 | * mask GPIO irq's | 82 | * mask GPIO irq's |
83 | */ | 83 | */ |
84 | static void inline mask_gpio_irq(u32 irq) | 84 | static void inline mask_gpio_irq(struct irq_data *d) |
85 | { | 85 | { |
86 | u32 reg_base = GPIO_VIRT(IRQ_TO_REGNO(irq)); | 86 | u32 reg_base = GPIO_VIRT(IRQ_TO_REGNO(d->irq)); |
87 | u32 bit = IRQ_TO_BIT(irq); | 87 | u32 bit = IRQ_TO_BIT(d->irq); |
88 | CPU_REG (reg_base, GPIO_MASK) &= ~bit; | 88 | CPU_REG (reg_base, GPIO_MASK) &= ~bit; |
89 | } | 89 | } |
90 | 90 | ||
91 | /* | 91 | /* |
92 | * unmask GPIO irq's | 92 | * unmask GPIO irq's |
93 | */ | 93 | */ |
94 | static void inline unmask_gpio_irq(u32 irq) | 94 | static void inline unmask_gpio_irq(struct irq_data *d) |
95 | { | 95 | { |
96 | u32 reg_base = GPIO_VIRT(IRQ_TO_REGNO(irq)); | 96 | u32 reg_base = GPIO_VIRT(IRQ_TO_REGNO(d->irq)); |
97 | u32 bit = IRQ_TO_BIT(irq); | 97 | u32 bit = IRQ_TO_BIT(d->irq); |
98 | CPU_REG (reg_base, GPIO_MASK) |= bit; | 98 | CPU_REG (reg_base, GPIO_MASK) |= bit; |
99 | } | 99 | } |
100 | 100 | ||
@@ -170,15 +170,15 @@ h720x_gpioe_demux_handler(unsigned int irq_unused, struct irq_desc *desc) | |||
170 | #endif | 170 | #endif |
171 | 171 | ||
172 | static struct irq_chip h720x_global_chip = { | 172 | static struct irq_chip h720x_global_chip = { |
173 | .ack = mask_global_irq, | 173 | .irq_ack = mask_global_irq, |
174 | .mask = mask_global_irq, | 174 | .irq_mask = mask_global_irq, |
175 | .unmask = unmask_global_irq, | 175 | .irq_unmask = unmask_global_irq, |
176 | }; | 176 | }; |
177 | 177 | ||
178 | static struct irq_chip h720x_gpio_chip = { | 178 | static struct irq_chip h720x_gpio_chip = { |
179 | .ack = ack_gpio_irq, | 179 | .irq_ack = ack_gpio_irq, |
180 | .mask = mask_gpio_irq, | 180 | .irq_mask = mask_gpio_irq, |
181 | .unmask = unmask_gpio_irq, | 181 | .irq_unmask = unmask_gpio_irq, |
182 | }; | 182 | }; |
183 | 183 | ||
184 | /* | 184 | /* |
diff --git a/arch/arm/mach-h720x/cpu-h7202.c b/arch/arm/mach-h720x/cpu-h7202.c index fd33a19c813..ac3f9144237 100644 --- a/arch/arm/mach-h720x/cpu-h7202.c +++ b/arch/arm/mach-h720x/cpu-h7202.c | |||
@@ -141,27 +141,27 @@ h7202_timer_interrupt(int irq, void *dev_id) | |||
141 | /* | 141 | /* |
142 | * mask multiplexed timer IRQs | 142 | * mask multiplexed timer IRQs |
143 | */ | 143 | */ |
144 | static void inline mask_timerx_irq (u32 irq) | 144 | static void inline mask_timerx_irq(struct irq_data *d) |
145 | { | 145 | { |
146 | unsigned int bit; | 146 | unsigned int bit; |
147 | bit = 2 << ((irq == IRQ_TIMER64B) ? 4 : (irq - IRQ_TIMER1)); | 147 | bit = 2 << ((d->irq == IRQ_TIMER64B) ? 4 : (d->irq - IRQ_TIMER1)); |
148 | CPU_REG (TIMER_VIRT, TIMER_TOPCTRL) &= ~bit; | 148 | CPU_REG (TIMER_VIRT, TIMER_TOPCTRL) &= ~bit; |
149 | } | 149 | } |
150 | 150 | ||
151 | /* | 151 | /* |
152 | * unmask multiplexed timer IRQs | 152 | * unmask multiplexed timer IRQs |
153 | */ | 153 | */ |
154 | static void inline unmask_timerx_irq (u32 irq) | 154 | static void inline unmask_timerx_irq(struct irq_data *d) |
155 | { | 155 | { |
156 | unsigned int bit; | 156 | unsigned int bit; |
157 | bit = 2 << ((irq == IRQ_TIMER64B) ? 4 : (irq - IRQ_TIMER1)); | 157 | bit = 2 << ((d->irq == IRQ_TIMER64B) ? 4 : (d->irq - IRQ_TIMER1)); |
158 | CPU_REG (TIMER_VIRT, TIMER_TOPCTRL) |= bit; | 158 | CPU_REG (TIMER_VIRT, TIMER_TOPCTRL) |= bit; |
159 | } | 159 | } |
160 | 160 | ||
161 | static struct irq_chip h7202_timerx_chip = { | 161 | static struct irq_chip h7202_timerx_chip = { |
162 | .ack = mask_timerx_irq, | 162 | .irq_ack = mask_timerx_irq, |
163 | .mask = mask_timerx_irq, | 163 | .irq_mask = mask_timerx_irq, |
164 | .unmask = unmask_timerx_irq, | 164 | .irq_unmask = unmask_timerx_irq, |
165 | }; | 165 | }; |
166 | 166 | ||
167 | static struct irqaction h7202_timer_irq = { | 167 | static struct irqaction h7202_timer_irq = { |
diff --git a/arch/arm/mach-h720x/h7201-eval.c b/arch/arm/mach-h720x/h7201-eval.c index 79f0b896e44..629454d71c8 100644 --- a/arch/arm/mach-h720x/h7201-eval.c +++ b/arch/arm/mach-h720x/h7201-eval.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <asm/types.h> | 23 | #include <asm/types.h> |
24 | #include <asm/mach-types.h> | 24 | #include <asm/mach-types.h> |
25 | #include <asm/page.h> | 25 | #include <asm/page.h> |
26 | #include <asm/pgtable.h> | ||
27 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
28 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
29 | #include "common.h" | 28 | #include "common.h" |
diff --git a/arch/arm/mach-h720x/h7202-eval.c b/arch/arm/mach-h720x/h7202-eval.c index cc28b1efe04..e9f46b69635 100644 --- a/arch/arm/mach-h720x/h7202-eval.c +++ b/arch/arm/mach-h720x/h7202-eval.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <asm/types.h> | 23 | #include <asm/types.h> |
24 | #include <asm/mach-types.h> | 24 | #include <asm/mach-types.h> |
25 | #include <asm/page.h> | 25 | #include <asm/page.h> |
26 | #include <asm/pgtable.h> | ||
27 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
28 | #include <mach/irqs.h> | 27 | #include <mach/irqs.h> |
29 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 17d2e608a21..56684b51707 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
@@ -243,6 +243,7 @@ config MACH_MX27_3DS | |||
243 | select IMX_HAVE_PLATFORM_MXC_EHCI | 243 | select IMX_HAVE_PLATFORM_MXC_EHCI |
244 | select IMX_HAVE_PLATFORM_MXC_MMC | 244 | select IMX_HAVE_PLATFORM_MXC_MMC |
245 | select IMX_HAVE_PLATFORM_SPI_IMX | 245 | select IMX_HAVE_PLATFORM_SPI_IMX |
246 | select MXC_DEBUG_BOARD | ||
246 | select MXC_ULPI if USB_ULPI | 247 | select MXC_ULPI if USB_ULPI |
247 | help | 248 | help |
248 | Include support for MX27PDK platform. This includes specific | 249 | Include support for MX27PDK platform. This includes specific |
diff --git a/arch/arm/mach-imx/mach-mx25_3ds.c b/arch/arm/mach-imx/mach-mx25_3ds.c index aa76cfd9f34..8382e790207 100644 --- a/arch/arm/mach-imx/mach-mx25_3ds.c +++ b/arch/arm/mach-imx/mach-mx25_3ds.c | |||
@@ -180,7 +180,7 @@ static const uint32_t mx25pdk_keymap[] = { | |||
180 | KEY(3, 3, KEY_POWER), | 180 | KEY(3, 3, KEY_POWER), |
181 | }; | 181 | }; |
182 | 182 | ||
183 | static const struct matrix_keymap_data mx25pdk_keymap_data __initdata = { | 183 | static const struct matrix_keymap_data mx25pdk_keymap_data __initconst = { |
184 | .keymap = mx25pdk_keymap, | 184 | .keymap = mx25pdk_keymap, |
185 | .keymap_size = ARRAY_SIZE(mx25pdk_keymap), | 185 | .keymap_size = ARRAY_SIZE(mx25pdk_keymap), |
186 | }; | 186 | }; |
diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c index 6fd0f8f6deb..164331518bd 100644 --- a/arch/arm/mach-imx/mach-mx27_3ds.c +++ b/arch/arm/mach-imx/mach-mx27_3ds.c | |||
@@ -37,12 +37,15 @@ | |||
37 | #include <mach/common.h> | 37 | #include <mach/common.h> |
38 | #include <mach/iomux-mx27.h> | 38 | #include <mach/iomux-mx27.h> |
39 | #include <mach/ulpi.h> | 39 | #include <mach/ulpi.h> |
40 | #include <mach/irqs.h> | ||
41 | #include <mach/3ds_debugboard.h> | ||
40 | 42 | ||
41 | #include "devices-imx27.h" | 43 | #include "devices-imx27.h" |
42 | 44 | ||
43 | #define SD1_EN_GPIO (GPIO_PORTB + 25) | 45 | #define SD1_EN_GPIO (GPIO_PORTB + 25) |
44 | #define OTG_PHY_RESET_GPIO (GPIO_PORTB + 23) | 46 | #define OTG_PHY_RESET_GPIO (GPIO_PORTB + 23) |
45 | #define SPI2_SS0 (GPIO_PORTD + 21) | 47 | #define SPI2_SS0 (GPIO_PORTD + 21) |
48 | #define EXPIO_PARENT_INT (MXC_INTERNAL_IRQS + GPIO_PORTC + 28) | ||
46 | 49 | ||
47 | static const int mx27pdk_pins[] __initconst = { | 50 | static const int mx27pdk_pins[] __initconst = { |
48 | /* UART1 */ | 51 | /* UART1 */ |
@@ -215,10 +218,10 @@ static struct regulator_init_data vgen_init = { | |||
215 | 218 | ||
216 | static struct mc13783_regulator_init_data mx27_3ds_regulators[] = { | 219 | static struct mc13783_regulator_init_data mx27_3ds_regulators[] = { |
217 | { | 220 | { |
218 | .id = MC13783_REGU_VMMC1, | 221 | .id = MC13783_REG_VMMC1, |
219 | .init_data = &vmmc1_init, | 222 | .init_data = &vmmc1_init, |
220 | }, { | 223 | }, { |
221 | .id = MC13783_REGU_VGEN, | 224 | .id = MC13783_REG_VGEN, |
222 | .init_data = &vgen_init, | 225 | .init_data = &vgen_init, |
223 | }, | 226 | }, |
224 | }; | 227 | }; |
@@ -276,6 +279,9 @@ static void __init mx27pdk_init(void) | |||
276 | imx27_add_spi_imx1(&spi2_pdata); | 279 | imx27_add_spi_imx1(&spi2_pdata); |
277 | spi_register_board_info(mx27_3ds_spi_devs, | 280 | spi_register_board_info(mx27_3ds_spi_devs, |
278 | ARRAY_SIZE(mx27_3ds_spi_devs)); | 281 | ARRAY_SIZE(mx27_3ds_spi_devs)); |
282 | |||
283 | if (mxc_expio_init(MX27_CS5_BASE_ADDR, EXPIO_PARENT_INT)) | ||
284 | pr_warn("Init of the debugboard failed, all devices on the debugboard are unusable.\n"); | ||
279 | } | 285 | } |
280 | 286 | ||
281 | static void __init mx27pdk_timer_init(void) | 287 | static void __init mx27pdk_timer_init(void) |
diff --git a/arch/arm/mach-integrator/cpu.c b/arch/arm/mach-integrator/cpu.c index a3fbcb3adc2..fbb45777989 100644 --- a/arch/arm/mach-integrator/cpu.c +++ b/arch/arm/mach-integrator/cpu.c | |||
@@ -173,7 +173,7 @@ static unsigned int integrator_get(unsigned int cpu) | |||
173 | 173 | ||
174 | if (machine_is_integrator()) { | 174 | if (machine_is_integrator()) { |
175 | vco.s = (cm_osc >> 8) & 7; | 175 | vco.s = (cm_osc >> 8) & 7; |
176 | } else if (machine_is_cintegrator()) { | 176 | } else { |
177 | vco.s = 1; | 177 | vco.s = 1; |
178 | } | 178 | } |
179 | vco.v = cm_osc & 255; | 179 | vco.v = cm_osc & 255; |
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c index 2774df8021d..b666443b5cb 100644 --- a/arch/arm/mach-integrator/integrator_ap.c +++ b/arch/arm/mach-integrator/integrator_ap.c | |||
@@ -156,21 +156,21 @@ static void __init ap_map_io(void) | |||
156 | 156 | ||
157 | #define INTEGRATOR_SC_VALID_INT 0x003fffff | 157 | #define INTEGRATOR_SC_VALID_INT 0x003fffff |
158 | 158 | ||
159 | static void sc_mask_irq(unsigned int irq) | 159 | static void sc_mask_irq(struct irq_data *d) |
160 | { | 160 | { |
161 | writel(1 << irq, VA_IC_BASE + IRQ_ENABLE_CLEAR); | 161 | writel(1 << d->irq, VA_IC_BASE + IRQ_ENABLE_CLEAR); |
162 | } | 162 | } |
163 | 163 | ||
164 | static void sc_unmask_irq(unsigned int irq) | 164 | static void sc_unmask_irq(struct irq_data *d) |
165 | { | 165 | { |
166 | writel(1 << irq, VA_IC_BASE + IRQ_ENABLE_SET); | 166 | writel(1 << d->irq, VA_IC_BASE + IRQ_ENABLE_SET); |
167 | } | 167 | } |
168 | 168 | ||
169 | static struct irq_chip sc_chip = { | 169 | static struct irq_chip sc_chip = { |
170 | .name = "SC", | 170 | .name = "SC", |
171 | .ack = sc_mask_irq, | 171 | .irq_ack = sc_mask_irq, |
172 | .mask = sc_mask_irq, | 172 | .irq_mask = sc_mask_irq, |
173 | .unmask = sc_unmask_irq, | 173 | .irq_unmask = sc_unmask_irq, |
174 | }; | 174 | }; |
175 | 175 | ||
176 | static void __init ap_init_irq(void) | 176 | static void __init ap_init_irq(void) |
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c index 85e48a5f77b..e9327da1382 100644 --- a/arch/arm/mach-integrator/integrator_cp.c +++ b/arch/arm/mach-integrator/integrator_cp.c | |||
@@ -146,61 +146,61 @@ static void __init intcp_map_io(void) | |||
146 | #define sic_writel __raw_writel | 146 | #define sic_writel __raw_writel |
147 | #define sic_readl __raw_readl | 147 | #define sic_readl __raw_readl |
148 | 148 | ||
149 | static void cic_mask_irq(unsigned int irq) | 149 | static void cic_mask_irq(struct irq_data *d) |
150 | { | 150 | { |
151 | irq -= IRQ_CIC_START; | 151 | unsigned int irq = d->irq - IRQ_CIC_START; |
152 | cic_writel(1 << irq, INTCP_VA_CIC_BASE + IRQ_ENABLE_CLEAR); | 152 | cic_writel(1 << irq, INTCP_VA_CIC_BASE + IRQ_ENABLE_CLEAR); |
153 | } | 153 | } |
154 | 154 | ||
155 | static void cic_unmask_irq(unsigned int irq) | 155 | static void cic_unmask_irq(struct irq_data *d) |
156 | { | 156 | { |
157 | irq -= IRQ_CIC_START; | 157 | unsigned int irq = d->irq - IRQ_CIC_START; |
158 | cic_writel(1 << irq, INTCP_VA_CIC_BASE + IRQ_ENABLE_SET); | 158 | cic_writel(1 << irq, INTCP_VA_CIC_BASE + IRQ_ENABLE_SET); |
159 | } | 159 | } |
160 | 160 | ||
161 | static struct irq_chip cic_chip = { | 161 | static struct irq_chip cic_chip = { |
162 | .name = "CIC", | 162 | .name = "CIC", |
163 | .ack = cic_mask_irq, | 163 | .irq_ack = cic_mask_irq, |
164 | .mask = cic_mask_irq, | 164 | .irq_mask = cic_mask_irq, |
165 | .unmask = cic_unmask_irq, | 165 | .irq_unmask = cic_unmask_irq, |
166 | }; | 166 | }; |
167 | 167 | ||
168 | static void pic_mask_irq(unsigned int irq) | 168 | static void pic_mask_irq(struct irq_data *d) |
169 | { | 169 | { |
170 | irq -= IRQ_PIC_START; | 170 | unsigned int irq = d->irq - IRQ_PIC_START; |
171 | pic_writel(1 << irq, INTCP_VA_PIC_BASE + IRQ_ENABLE_CLEAR); | 171 | pic_writel(1 << irq, INTCP_VA_PIC_BASE + IRQ_ENABLE_CLEAR); |
172 | } | 172 | } |
173 | 173 | ||
174 | static void pic_unmask_irq(unsigned int irq) | 174 | static void pic_unmask_irq(struct irq_data *d) |
175 | { | 175 | { |
176 | irq -= IRQ_PIC_START; | 176 | unsigned int irq = d->irq - IRQ_PIC_START; |
177 | pic_writel(1 << irq, INTCP_VA_PIC_BASE + IRQ_ENABLE_SET); | 177 | pic_writel(1 << irq, INTCP_VA_PIC_BASE + IRQ_ENABLE_SET); |
178 | } | 178 | } |
179 | 179 | ||
180 | static struct irq_chip pic_chip = { | 180 | static struct irq_chip pic_chip = { |
181 | .name = "PIC", | 181 | .name = "PIC", |
182 | .ack = pic_mask_irq, | 182 | .irq_ack = pic_mask_irq, |
183 | .mask = pic_mask_irq, | 183 | .irq_mask = pic_mask_irq, |
184 | .unmask = pic_unmask_irq, | 184 | .irq_unmask = pic_unmask_irq, |
185 | }; | 185 | }; |
186 | 186 | ||
187 | static void sic_mask_irq(unsigned int irq) | 187 | static void sic_mask_irq(struct irq_data *d) |
188 | { | 188 | { |
189 | irq -= IRQ_SIC_START; | 189 | unsigned int irq = d->irq - IRQ_SIC_START; |
190 | sic_writel(1 << irq, INTCP_VA_SIC_BASE + IRQ_ENABLE_CLEAR); | 190 | sic_writel(1 << irq, INTCP_VA_SIC_BASE + IRQ_ENABLE_CLEAR); |
191 | } | 191 | } |
192 | 192 | ||
193 | static void sic_unmask_irq(unsigned int irq) | 193 | static void sic_unmask_irq(struct irq_data *d) |
194 | { | 194 | { |
195 | irq -= IRQ_SIC_START; | 195 | unsigned int irq = d->irq - IRQ_SIC_START; |
196 | sic_writel(1 << irq, INTCP_VA_SIC_BASE + IRQ_ENABLE_SET); | 196 | sic_writel(1 << irq, INTCP_VA_SIC_BASE + IRQ_ENABLE_SET); |
197 | } | 197 | } |
198 | 198 | ||
199 | static struct irq_chip sic_chip = { | 199 | static struct irq_chip sic_chip = { |
200 | .name = "SIC", | 200 | .name = "SIC", |
201 | .ack = sic_mask_irq, | 201 | .irq_ack = sic_mask_irq, |
202 | .mask = sic_mask_irq, | 202 | .irq_mask = sic_mask_irq, |
203 | .unmask = sic_unmask_irq, | 203 | .irq_unmask = sic_unmask_irq, |
204 | }; | 204 | }; |
205 | 205 | ||
206 | static void | 206 | static void |
diff --git a/arch/arm/mach-iop13xx/irq.c b/arch/arm/mach-iop13xx/irq.c index 0d099ca87bd..a233470dd10 100644 --- a/arch/arm/mach-iop13xx/irq.c +++ b/arch/arm/mach-iop13xx/irq.c | |||
@@ -123,79 +123,79 @@ static void write_intsize(u32 val) | |||
123 | 123 | ||
124 | /* 0 = Interrupt Masked and 1 = Interrupt not masked */ | 124 | /* 0 = Interrupt Masked and 1 = Interrupt not masked */ |
125 | static void | 125 | static void |
126 | iop13xx_irq_mask0 (unsigned int irq) | 126 | iop13xx_irq_mask0 (struct irq_data *d) |
127 | { | 127 | { |
128 | write_intctl_0(read_intctl_0() & ~(1 << (irq - 0))); | 128 | write_intctl_0(read_intctl_0() & ~(1 << (d->irq - 0))); |
129 | } | 129 | } |
130 | 130 | ||
131 | static void | 131 | static void |
132 | iop13xx_irq_mask1 (unsigned int irq) | 132 | iop13xx_irq_mask1 (struct irq_data *d) |
133 | { | 133 | { |
134 | write_intctl_1(read_intctl_1() & ~(1 << (irq - 32))); | 134 | write_intctl_1(read_intctl_1() & ~(1 << (d->irq - 32))); |
135 | } | 135 | } |
136 | 136 | ||
137 | static void | 137 | static void |
138 | iop13xx_irq_mask2 (unsigned int irq) | 138 | iop13xx_irq_mask2 (struct irq_data *d) |
139 | { | 139 | { |
140 | write_intctl_2(read_intctl_2() & ~(1 << (irq - 64))); | 140 | write_intctl_2(read_intctl_2() & ~(1 << (d->irq - 64))); |
141 | } | 141 | } |
142 | 142 | ||
143 | static void | 143 | static void |
144 | iop13xx_irq_mask3 (unsigned int irq) | 144 | iop13xx_irq_mask3 (struct irq_data *d) |
145 | { | 145 | { |
146 | write_intctl_3(read_intctl_3() & ~(1 << (irq - 96))); | 146 | write_intctl_3(read_intctl_3() & ~(1 << (d->irq - 96))); |
147 | } | 147 | } |
148 | 148 | ||
149 | static void | 149 | static void |
150 | iop13xx_irq_unmask0(unsigned int irq) | 150 | iop13xx_irq_unmask0(struct irq_data *d) |
151 | { | 151 | { |
152 | write_intctl_0(read_intctl_0() | (1 << (irq - 0))); | 152 | write_intctl_0(read_intctl_0() | (1 << (d->irq - 0))); |
153 | } | 153 | } |
154 | 154 | ||
155 | static void | 155 | static void |
156 | iop13xx_irq_unmask1(unsigned int irq) | 156 | iop13xx_irq_unmask1(struct irq_data *d) |
157 | { | 157 | { |
158 | write_intctl_1(read_intctl_1() | (1 << (irq - 32))); | 158 | write_intctl_1(read_intctl_1() | (1 << (d->irq - 32))); |
159 | } | 159 | } |
160 | 160 | ||
161 | static void | 161 | static void |
162 | iop13xx_irq_unmask2(unsigned int irq) | 162 | iop13xx_irq_unmask2(struct irq_data *d) |
163 | { | 163 | { |
164 | write_intctl_2(read_intctl_2() | (1 << (irq - 64))); | 164 | write_intctl_2(read_intctl_2() | (1 << (d->irq - 64))); |
165 | } | 165 | } |
166 | 166 | ||
167 | static void | 167 | static void |
168 | iop13xx_irq_unmask3(unsigned int irq) | 168 | iop13xx_irq_unmask3(struct irq_data *d) |
169 | { | 169 | { |
170 | write_intctl_3(read_intctl_3() | (1 << (irq - 96))); | 170 | write_intctl_3(read_intctl_3() | (1 << (d->irq - 96))); |
171 | } | 171 | } |
172 | 172 | ||
173 | static struct irq_chip iop13xx_irqchip1 = { | 173 | static struct irq_chip iop13xx_irqchip1 = { |
174 | .name = "IOP13xx-1", | 174 | .name = "IOP13xx-1", |
175 | .ack = iop13xx_irq_mask0, | 175 | .irq_ack = iop13xx_irq_mask0, |
176 | .mask = iop13xx_irq_mask0, | 176 | .irq_mask = iop13xx_irq_mask0, |
177 | .unmask = iop13xx_irq_unmask0, | 177 | .irq_unmask = iop13xx_irq_unmask0, |
178 | }; | 178 | }; |
179 | 179 | ||
180 | static struct irq_chip iop13xx_irqchip2 = { | 180 | static struct irq_chip iop13xx_irqchip2 = { |
181 | .name = "IOP13xx-2", | 181 | .name = "IOP13xx-2", |
182 | .ack = iop13xx_irq_mask1, | 182 | .irq_ack = iop13xx_irq_mask1, |
183 | .mask = iop13xx_irq_mask1, | 183 | .irq_mask = iop13xx_irq_mask1, |
184 | .unmask = iop13xx_irq_unmask1, | 184 | .irq_unmask = iop13xx_irq_unmask1, |
185 | }; | 185 | }; |
186 | 186 | ||
187 | static struct irq_chip iop13xx_irqchip3 = { | 187 | static struct irq_chip iop13xx_irqchip3 = { |
188 | .name = "IOP13xx-3", | 188 | .name = "IOP13xx-3", |
189 | .ack = iop13xx_irq_mask2, | 189 | .irq_ack = iop13xx_irq_mask2, |
190 | .mask = iop13xx_irq_mask2, | 190 | .irq_mask = iop13xx_irq_mask2, |
191 | .unmask = iop13xx_irq_unmask2, | 191 | .irq_unmask = iop13xx_irq_unmask2, |
192 | }; | 192 | }; |
193 | 193 | ||
194 | static struct irq_chip iop13xx_irqchip4 = { | 194 | static struct irq_chip iop13xx_irqchip4 = { |
195 | .name = "IOP13xx-4", | 195 | .name = "IOP13xx-4", |
196 | .ack = iop13xx_irq_mask3, | 196 | .irq_ack = iop13xx_irq_mask3, |
197 | .mask = iop13xx_irq_mask3, | 197 | .irq_mask = iop13xx_irq_mask3, |
198 | .unmask = iop13xx_irq_unmask3, | 198 | .irq_unmask = iop13xx_irq_unmask3, |
199 | }; | 199 | }; |
200 | 200 | ||
201 | extern void iop_init_cp6_handler(void); | 201 | extern void iop_init_cp6_handler(void); |
diff --git a/arch/arm/mach-iop13xx/msi.c b/arch/arm/mach-iop13xx/msi.c index 7149fcc16c8..c9c02e3698b 100644 --- a/arch/arm/mach-iop13xx/msi.c +++ b/arch/arm/mach-iop13xx/msi.c | |||
@@ -156,14 +156,14 @@ void arch_teardown_msi_irq(unsigned int irq) | |||
156 | destroy_irq(irq); | 156 | destroy_irq(irq); |
157 | } | 157 | } |
158 | 158 | ||
159 | static void iop13xx_msi_nop(unsigned int irq) | 159 | static void iop13xx_msi_nop(struct irq_data *d) |
160 | { | 160 | { |
161 | return; | 161 | return; |
162 | } | 162 | } |
163 | 163 | ||
164 | static struct irq_chip iop13xx_msi_chip = { | 164 | static struct irq_chip iop13xx_msi_chip = { |
165 | .name = "PCI-MSI", | 165 | .name = "PCI-MSI", |
166 | .ack = iop13xx_msi_nop, | 166 | .irq_ack = iop13xx_msi_nop, |
167 | .irq_enable = unmask_msi_irq, | 167 | .irq_enable = unmask_msi_irq, |
168 | .irq_disable = mask_msi_irq, | 168 | .irq_disable = mask_msi_irq, |
169 | .irq_mask = mask_msi_irq, | 169 | .irq_mask = mask_msi_irq, |
diff --git a/arch/arm/mach-iop32x/irq.c b/arch/arm/mach-iop32x/irq.c index ba59b2d17db..d3426a12059 100644 --- a/arch/arm/mach-iop32x/irq.c +++ b/arch/arm/mach-iop32x/irq.c | |||
@@ -32,24 +32,24 @@ static void intstr_write(u32 val) | |||
32 | } | 32 | } |
33 | 33 | ||
34 | static void | 34 | static void |
35 | iop32x_irq_mask(unsigned int irq) | 35 | iop32x_irq_mask(struct irq_data *d) |
36 | { | 36 | { |
37 | iop32x_mask &= ~(1 << irq); | 37 | iop32x_mask &= ~(1 << d->irq); |
38 | intctl_write(iop32x_mask); | 38 | intctl_write(iop32x_mask); |
39 | } | 39 | } |
40 | 40 | ||
41 | static void | 41 | static void |
42 | iop32x_irq_unmask(unsigned int irq) | 42 | iop32x_irq_unmask(struct irq_data *d) |
43 | { | 43 | { |
44 | iop32x_mask |= 1 << irq; | 44 | iop32x_mask |= 1 << d->irq; |
45 | intctl_write(iop32x_mask); | 45 | intctl_write(iop32x_mask); |
46 | } | 46 | } |
47 | 47 | ||
48 | struct irq_chip ext_chip = { | 48 | struct irq_chip ext_chip = { |
49 | .name = "IOP32x", | 49 | .name = "IOP32x", |
50 | .ack = iop32x_irq_mask, | 50 | .irq_ack = iop32x_irq_mask, |
51 | .mask = iop32x_irq_mask, | 51 | .irq_mask = iop32x_irq_mask, |
52 | .unmask = iop32x_irq_unmask, | 52 | .irq_unmask = iop32x_irq_unmask, |
53 | }; | 53 | }; |
54 | 54 | ||
55 | void __init iop32x_init_irq(void) | 55 | void __init iop32x_init_irq(void) |
diff --git a/arch/arm/mach-iop33x/irq.c b/arch/arm/mach-iop33x/irq.c index abb4ea2ed4f..0ff2f74363a 100644 --- a/arch/arm/mach-iop33x/irq.c +++ b/arch/arm/mach-iop33x/irq.c | |||
@@ -53,45 +53,45 @@ static void intsize_write(u32 val) | |||
53 | } | 53 | } |
54 | 54 | ||
55 | static void | 55 | static void |
56 | iop33x_irq_mask1 (unsigned int irq) | 56 | iop33x_irq_mask1 (struct irq_data *d) |
57 | { | 57 | { |
58 | iop33x_mask0 &= ~(1 << irq); | 58 | iop33x_mask0 &= ~(1 << d->irq); |
59 | intctl0_write(iop33x_mask0); | 59 | intctl0_write(iop33x_mask0); |
60 | } | 60 | } |
61 | 61 | ||
62 | static void | 62 | static void |
63 | iop33x_irq_mask2 (unsigned int irq) | 63 | iop33x_irq_mask2 (struct irq_data *d) |
64 | { | 64 | { |
65 | iop33x_mask1 &= ~(1 << (irq - 32)); | 65 | iop33x_mask1 &= ~(1 << (d->irq - 32)); |
66 | intctl1_write(iop33x_mask1); | 66 | intctl1_write(iop33x_mask1); |
67 | } | 67 | } |
68 | 68 | ||
69 | static void | 69 | static void |
70 | iop33x_irq_unmask1(unsigned int irq) | 70 | iop33x_irq_unmask1(struct irq_data *d) |
71 | { | 71 | { |
72 | iop33x_mask0 |= 1 << irq; | 72 | iop33x_mask0 |= 1 << d->irq; |
73 | intctl0_write(iop33x_mask0); | 73 | intctl0_write(iop33x_mask0); |
74 | } | 74 | } |
75 | 75 | ||
76 | static void | 76 | static void |
77 | iop33x_irq_unmask2(unsigned int irq) | 77 | iop33x_irq_unmask2(struct irq_data *d) |
78 | { | 78 | { |
79 | iop33x_mask1 |= (1 << (irq - 32)); | 79 | iop33x_mask1 |= (1 << (d->irq - 32)); |
80 | intctl1_write(iop33x_mask1); | 80 | intctl1_write(iop33x_mask1); |
81 | } | 81 | } |
82 | 82 | ||
83 | struct irq_chip iop33x_irqchip1 = { | 83 | struct irq_chip iop33x_irqchip1 = { |
84 | .name = "IOP33x-1", | 84 | .name = "IOP33x-1", |
85 | .ack = iop33x_irq_mask1, | 85 | .irq_ack = iop33x_irq_mask1, |
86 | .mask = iop33x_irq_mask1, | 86 | .irq_mask = iop33x_irq_mask1, |
87 | .unmask = iop33x_irq_unmask1, | 87 | .irq_unmask = iop33x_irq_unmask1, |
88 | }; | 88 | }; |
89 | 89 | ||
90 | struct irq_chip iop33x_irqchip2 = { | 90 | struct irq_chip iop33x_irqchip2 = { |
91 | .name = "IOP33x-2", | 91 | .name = "IOP33x-2", |
92 | .ack = iop33x_irq_mask2, | 92 | .irq_ack = iop33x_irq_mask2, |
93 | .mask = iop33x_irq_mask2, | 93 | .irq_mask = iop33x_irq_mask2, |
94 | .unmask = iop33x_irq_unmask2, | 94 | .irq_unmask = iop33x_irq_unmask2, |
95 | }; | 95 | }; |
96 | 96 | ||
97 | void __init iop33x_init_irq(void) | 97 | void __init iop33x_init_irq(void) |
diff --git a/arch/arm/mach-ixp2000/core.c b/arch/arm/mach-ixp2000/core.c index e24e3d05397..5fc4e064b65 100644 --- a/arch/arm/mach-ixp2000/core.c +++ b/arch/arm/mach-ixp2000/core.c | |||
@@ -309,9 +309,9 @@ static void ixp2000_GPIO_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
309 | } | 309 | } |
310 | } | 310 | } |
311 | 311 | ||
312 | static int ixp2000_GPIO_irq_type(unsigned int irq, unsigned int type) | 312 | static int ixp2000_GPIO_irq_type(struct irq_data *d, unsigned int type) |
313 | { | 313 | { |
314 | int line = irq - IRQ_IXP2000_GPIO0; | 314 | int line = d->irq - IRQ_IXP2000_GPIO0; |
315 | 315 | ||
316 | /* | 316 | /* |
317 | * First, configure this GPIO line as an input. | 317 | * First, configure this GPIO line as an input. |
@@ -342,8 +342,10 @@ static int ixp2000_GPIO_irq_type(unsigned int irq, unsigned int type) | |||
342 | return 0; | 342 | return 0; |
343 | } | 343 | } |
344 | 344 | ||
345 | static void ixp2000_GPIO_irq_mask_ack(unsigned int irq) | 345 | static void ixp2000_GPIO_irq_mask_ack(struct irq_data *d) |
346 | { | 346 | { |
347 | unsigned int irq = d->irq; | ||
348 | |||
347 | ixp2000_reg_write(IXP2000_GPIO_INCR, (1 << (irq - IRQ_IXP2000_GPIO0))); | 349 | ixp2000_reg_write(IXP2000_GPIO_INCR, (1 << (irq - IRQ_IXP2000_GPIO0))); |
348 | 350 | ||
349 | ixp2000_reg_write(IXP2000_GPIO_EDSR, (1 << (irq - IRQ_IXP2000_GPIO0))); | 351 | ixp2000_reg_write(IXP2000_GPIO_EDSR, (1 << (irq - IRQ_IXP2000_GPIO0))); |
@@ -351,38 +353,42 @@ static void ixp2000_GPIO_irq_mask_ack(unsigned int irq) | |||
351 | ixp2000_reg_wrb(IXP2000_GPIO_INST, (1 << (irq - IRQ_IXP2000_GPIO0))); | 353 | ixp2000_reg_wrb(IXP2000_GPIO_INST, (1 << (irq - IRQ_IXP2000_GPIO0))); |
352 | } | 354 | } |
353 | 355 | ||
354 | static void ixp2000_GPIO_irq_mask(unsigned int irq) | 356 | static void ixp2000_GPIO_irq_mask(struct irq_data *d) |
355 | { | 357 | { |
358 | unsigned int irq = d->irq; | ||
359 | |||
356 | ixp2000_reg_wrb(IXP2000_GPIO_INCR, (1 << (irq - IRQ_IXP2000_GPIO0))); | 360 | ixp2000_reg_wrb(IXP2000_GPIO_INCR, (1 << (irq - IRQ_IXP2000_GPIO0))); |
357 | } | 361 | } |
358 | 362 | ||
359 | static void ixp2000_GPIO_irq_unmask(unsigned int irq) | 363 | static void ixp2000_GPIO_irq_unmask(struct irq_data *d) |
360 | { | 364 | { |
365 | unsigned int irq = d->irq; | ||
366 | |||
361 | ixp2000_reg_write(IXP2000_GPIO_INSR, (1 << (irq - IRQ_IXP2000_GPIO0))); | 367 | ixp2000_reg_write(IXP2000_GPIO_INSR, (1 << (irq - IRQ_IXP2000_GPIO0))); |
362 | } | 368 | } |
363 | 369 | ||
364 | static struct irq_chip ixp2000_GPIO_irq_chip = { | 370 | static struct irq_chip ixp2000_GPIO_irq_chip = { |
365 | .ack = ixp2000_GPIO_irq_mask_ack, | 371 | .irq_ack = ixp2000_GPIO_irq_mask_ack, |
366 | .mask = ixp2000_GPIO_irq_mask, | 372 | .irq_mask = ixp2000_GPIO_irq_mask, |
367 | .unmask = ixp2000_GPIO_irq_unmask, | 373 | .irq_unmask = ixp2000_GPIO_irq_unmask, |
368 | .set_type = ixp2000_GPIO_irq_type, | 374 | .irq_set_type = ixp2000_GPIO_irq_type, |
369 | }; | 375 | }; |
370 | 376 | ||
371 | static void ixp2000_pci_irq_mask(unsigned int irq) | 377 | static void ixp2000_pci_irq_mask(struct irq_data *d) |
372 | { | 378 | { |
373 | unsigned long temp = *IXP2000_PCI_XSCALE_INT_ENABLE; | 379 | unsigned long temp = *IXP2000_PCI_XSCALE_INT_ENABLE; |
374 | if (irq == IRQ_IXP2000_PCIA) | 380 | if (d->irq == IRQ_IXP2000_PCIA) |
375 | ixp2000_reg_wrb(IXP2000_PCI_XSCALE_INT_ENABLE, (temp & ~(1 << 26))); | 381 | ixp2000_reg_wrb(IXP2000_PCI_XSCALE_INT_ENABLE, (temp & ~(1 << 26))); |
376 | else if (irq == IRQ_IXP2000_PCIB) | 382 | else if (d->irq == IRQ_IXP2000_PCIB) |
377 | ixp2000_reg_wrb(IXP2000_PCI_XSCALE_INT_ENABLE, (temp & ~(1 << 27))); | 383 | ixp2000_reg_wrb(IXP2000_PCI_XSCALE_INT_ENABLE, (temp & ~(1 << 27))); |
378 | } | 384 | } |
379 | 385 | ||
380 | static void ixp2000_pci_irq_unmask(unsigned int irq) | 386 | static void ixp2000_pci_irq_unmask(struct irq_data *d) |
381 | { | 387 | { |
382 | unsigned long temp = *IXP2000_PCI_XSCALE_INT_ENABLE; | 388 | unsigned long temp = *IXP2000_PCI_XSCALE_INT_ENABLE; |
383 | if (irq == IRQ_IXP2000_PCIA) | 389 | if (d->irq == IRQ_IXP2000_PCIA) |
384 | ixp2000_reg_write(IXP2000_PCI_XSCALE_INT_ENABLE, (temp | (1 << 26))); | 390 | ixp2000_reg_write(IXP2000_PCI_XSCALE_INT_ENABLE, (temp | (1 << 26))); |
385 | else if (irq == IRQ_IXP2000_PCIB) | 391 | else if (d->irq == IRQ_IXP2000_PCIB) |
386 | ixp2000_reg_write(IXP2000_PCI_XSCALE_INT_ENABLE, (temp | (1 << 27))); | 392 | ixp2000_reg_write(IXP2000_PCI_XSCALE_INT_ENABLE, (temp | (1 << 27))); |
387 | } | 393 | } |
388 | 394 | ||
@@ -401,44 +407,44 @@ static void ixp2000_err_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
401 | } | 407 | } |
402 | } | 408 | } |
403 | 409 | ||
404 | static void ixp2000_err_irq_mask(unsigned int irq) | 410 | static void ixp2000_err_irq_mask(struct irq_data *d) |
405 | { | 411 | { |
406 | ixp2000_reg_write(IXP2000_IRQ_ERR_ENABLE_CLR, | 412 | ixp2000_reg_write(IXP2000_IRQ_ERR_ENABLE_CLR, |
407 | (1 << (irq - IRQ_IXP2000_DRAM0_MIN_ERR))); | 413 | (1 << (d->irq - IRQ_IXP2000_DRAM0_MIN_ERR))); |
408 | } | 414 | } |
409 | 415 | ||
410 | static void ixp2000_err_irq_unmask(unsigned int irq) | 416 | static void ixp2000_err_irq_unmask(struct irq_data *d) |
411 | { | 417 | { |
412 | ixp2000_reg_write(IXP2000_IRQ_ERR_ENABLE_SET, | 418 | ixp2000_reg_write(IXP2000_IRQ_ERR_ENABLE_SET, |
413 | (1 << (irq - IRQ_IXP2000_DRAM0_MIN_ERR))); | 419 | (1 << (d->irq - IRQ_IXP2000_DRAM0_MIN_ERR))); |
414 | } | 420 | } |
415 | 421 | ||
416 | static struct irq_chip ixp2000_err_irq_chip = { | 422 | static struct irq_chip ixp2000_err_irq_chip = { |
417 | .ack = ixp2000_err_irq_mask, | 423 | .irq_ack = ixp2000_err_irq_mask, |
418 | .mask = ixp2000_err_irq_mask, | 424 | .irq_mask = ixp2000_err_irq_mask, |
419 | .unmask = ixp2000_err_irq_unmask | 425 | .irq_unmask = ixp2000_err_irq_unmask |
420 | }; | 426 | }; |
421 | 427 | ||
422 | static struct irq_chip ixp2000_pci_irq_chip = { | 428 | static struct irq_chip ixp2000_pci_irq_chip = { |
423 | .ack = ixp2000_pci_irq_mask, | 429 | .irq_ack = ixp2000_pci_irq_mask, |
424 | .mask = ixp2000_pci_irq_mask, | 430 | .irq_mask = ixp2000_pci_irq_mask, |
425 | .unmask = ixp2000_pci_irq_unmask | 431 | .irq_unmask = ixp2000_pci_irq_unmask |
426 | }; | 432 | }; |
427 | 433 | ||
428 | static void ixp2000_irq_mask(unsigned int irq) | 434 | static void ixp2000_irq_mask(struct irq_data *d) |
429 | { | 435 | { |
430 | ixp2000_reg_wrb(IXP2000_IRQ_ENABLE_CLR, (1 << irq)); | 436 | ixp2000_reg_wrb(IXP2000_IRQ_ENABLE_CLR, (1 << d->irq)); |
431 | } | 437 | } |
432 | 438 | ||
433 | static void ixp2000_irq_unmask(unsigned int irq) | 439 | static void ixp2000_irq_unmask(struct irq_data *d) |
434 | { | 440 | { |
435 | ixp2000_reg_write(IXP2000_IRQ_ENABLE_SET, (1 << irq)); | 441 | ixp2000_reg_write(IXP2000_IRQ_ENABLE_SET, (1 << d->irq)); |
436 | } | 442 | } |
437 | 443 | ||
438 | static struct irq_chip ixp2000_irq_chip = { | 444 | static struct irq_chip ixp2000_irq_chip = { |
439 | .ack = ixp2000_irq_mask, | 445 | .irq_ack = ixp2000_irq_mask, |
440 | .mask = ixp2000_irq_mask, | 446 | .irq_mask = ixp2000_irq_mask, |
441 | .unmask = ixp2000_irq_unmask | 447 | .irq_unmask = ixp2000_irq_unmask |
442 | }; | 448 | }; |
443 | 449 | ||
444 | void __init ixp2000_init_irq(void) | 450 | void __init ixp2000_init_irq(void) |
diff --git a/arch/arm/mach-ixp2000/ixdp2x00.c b/arch/arm/mach-ixp2000/ixdp2x00.c index 91fffb9b208..7d90d3f13ee 100644 --- a/arch/arm/mach-ixp2000/ixdp2x00.c +++ b/arch/arm/mach-ixp2000/ixdp2x00.c | |||
@@ -63,7 +63,7 @@ static struct slowport_cfg slowport_cpld_cfg = { | |||
63 | }; | 63 | }; |
64 | #endif | 64 | #endif |
65 | 65 | ||
66 | static void ixdp2x00_irq_mask(unsigned int irq) | 66 | static void ixdp2x00_irq_mask(struct irq_data *d) |
67 | { | 67 | { |
68 | unsigned long dummy; | 68 | unsigned long dummy; |
69 | static struct slowport_cfg old_cfg; | 69 | static struct slowport_cfg old_cfg; |
@@ -78,7 +78,7 @@ static void ixdp2x00_irq_mask(unsigned int irq) | |||
78 | #endif | 78 | #endif |
79 | 79 | ||
80 | dummy = *board_irq_mask; | 80 | dummy = *board_irq_mask; |
81 | dummy |= IXP2000_BOARD_IRQ_MASK(irq); | 81 | dummy |= IXP2000_BOARD_IRQ_MASK(d->irq); |
82 | ixp2000_reg_wrb(board_irq_mask, dummy); | 82 | ixp2000_reg_wrb(board_irq_mask, dummy); |
83 | 83 | ||
84 | #ifdef CONFIG_ARCH_IXDP2400 | 84 | #ifdef CONFIG_ARCH_IXDP2400 |
@@ -87,7 +87,7 @@ static void ixdp2x00_irq_mask(unsigned int irq) | |||
87 | #endif | 87 | #endif |
88 | } | 88 | } |
89 | 89 | ||
90 | static void ixdp2x00_irq_unmask(unsigned int irq) | 90 | static void ixdp2x00_irq_unmask(struct irq_data *d) |
91 | { | 91 | { |
92 | unsigned long dummy; | 92 | unsigned long dummy; |
93 | static struct slowport_cfg old_cfg; | 93 | static struct slowport_cfg old_cfg; |
@@ -98,7 +98,7 @@ static void ixdp2x00_irq_unmask(unsigned int irq) | |||
98 | #endif | 98 | #endif |
99 | 99 | ||
100 | dummy = *board_irq_mask; | 100 | dummy = *board_irq_mask; |
101 | dummy &= ~IXP2000_BOARD_IRQ_MASK(irq); | 101 | dummy &= ~IXP2000_BOARD_IRQ_MASK(d->irq); |
102 | ixp2000_reg_wrb(board_irq_mask, dummy); | 102 | ixp2000_reg_wrb(board_irq_mask, dummy); |
103 | 103 | ||
104 | if (machine_is_ixdp2400()) | 104 | if (machine_is_ixdp2400()) |
@@ -111,7 +111,7 @@ static void ixdp2x00_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
111 | static struct slowport_cfg old_cfg; | 111 | static struct slowport_cfg old_cfg; |
112 | int i; | 112 | int i; |
113 | 113 | ||
114 | desc->chip->mask(irq); | 114 | desc->irq_data.chip->irq_mask(&desc->irq_data); |
115 | 115 | ||
116 | #ifdef CONFIG_ARCH_IXDP2400 | 116 | #ifdef CONFIG_ARCH_IXDP2400 |
117 | if (machine_is_ixdp2400()) | 117 | if (machine_is_ixdp2400()) |
@@ -133,13 +133,13 @@ static void ixdp2x00_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
133 | } | 133 | } |
134 | } | 134 | } |
135 | 135 | ||
136 | desc->chip->unmask(irq); | 136 | desc->irq_data.chip->irq_unmask(&desc->irq_data); |
137 | } | 137 | } |
138 | 138 | ||
139 | static struct irq_chip ixdp2x00_cpld_irq_chip = { | 139 | static struct irq_chip ixdp2x00_cpld_irq_chip = { |
140 | .ack = ixdp2x00_irq_mask, | 140 | .irq_ack = ixdp2x00_irq_mask, |
141 | .mask = ixdp2x00_irq_mask, | 141 | .irq_mask = ixdp2x00_irq_mask, |
142 | .unmask = ixdp2x00_irq_unmask | 142 | .irq_unmask = ixdp2x00_irq_unmask |
143 | }; | 143 | }; |
144 | 144 | ||
145 | void __init ixdp2x00_init_irq(volatile unsigned long *stat_reg, volatile unsigned long *mask_reg, unsigned long nr_of_irqs) | 145 | void __init ixdp2x00_init_irq(volatile unsigned long *stat_reg, volatile unsigned long *mask_reg, unsigned long nr_of_irqs) |
diff --git a/arch/arm/mach-ixp2000/ixdp2x01.c b/arch/arm/mach-ixp2000/ixdp2x01.c index 6c121bdbe31..34b1b2af37c 100644 --- a/arch/arm/mach-ixp2000/ixdp2x01.c +++ b/arch/arm/mach-ixp2000/ixdp2x01.c | |||
@@ -48,16 +48,16 @@ | |||
48 | /************************************************************************* | 48 | /************************************************************************* |
49 | * IXDP2x01 IRQ Handling | 49 | * IXDP2x01 IRQ Handling |
50 | *************************************************************************/ | 50 | *************************************************************************/ |
51 | static void ixdp2x01_irq_mask(unsigned int irq) | 51 | static void ixdp2x01_irq_mask(struct irq_data *d) |
52 | { | 52 | { |
53 | ixp2000_reg_wrb(IXDP2X01_INT_MASK_SET_REG, | 53 | ixp2000_reg_wrb(IXDP2X01_INT_MASK_SET_REG, |
54 | IXP2000_BOARD_IRQ_MASK(irq)); | 54 | IXP2000_BOARD_IRQ_MASK(d->irq)); |
55 | } | 55 | } |
56 | 56 | ||
57 | static void ixdp2x01_irq_unmask(unsigned int irq) | 57 | static void ixdp2x01_irq_unmask(struct irq_data *d) |
58 | { | 58 | { |
59 | ixp2000_reg_write(IXDP2X01_INT_MASK_CLR_REG, | 59 | ixp2000_reg_write(IXDP2X01_INT_MASK_CLR_REG, |
60 | IXP2000_BOARD_IRQ_MASK(irq)); | 60 | IXP2000_BOARD_IRQ_MASK(d->irq)); |
61 | } | 61 | } |
62 | 62 | ||
63 | static u32 valid_irq_mask; | 63 | static u32 valid_irq_mask; |
@@ -67,7 +67,7 @@ static void ixdp2x01_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
67 | u32 ex_interrupt; | 67 | u32 ex_interrupt; |
68 | int i; | 68 | int i; |
69 | 69 | ||
70 | desc->chip->mask(irq); | 70 | desc->irq_data.chip->irq_mask(&desc->irq_data); |
71 | 71 | ||
72 | ex_interrupt = *IXDP2X01_INT_STAT_REG & valid_irq_mask; | 72 | ex_interrupt = *IXDP2X01_INT_STAT_REG & valid_irq_mask; |
73 | 73 | ||
@@ -83,13 +83,13 @@ static void ixdp2x01_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
83 | } | 83 | } |
84 | } | 84 | } |
85 | 85 | ||
86 | desc->chip->unmask(irq); | 86 | desc->irq_data.chip->irq_unmask(&desc->irq_data); |
87 | } | 87 | } |
88 | 88 | ||
89 | static struct irq_chip ixdp2x01_irq_chip = { | 89 | static struct irq_chip ixdp2x01_irq_chip = { |
90 | .mask = ixdp2x01_irq_mask, | 90 | .irq_mask = ixdp2x01_irq_mask, |
91 | .ack = ixdp2x01_irq_mask, | 91 | .irq_ack = ixdp2x01_irq_mask, |
92 | .unmask = ixdp2x01_irq_unmask | 92 | .irq_unmask = ixdp2x01_irq_unmask |
93 | }; | 93 | }; |
94 | 94 | ||
95 | /* | 95 | /* |
diff --git a/arch/arm/mach-ixp23xx/core.c b/arch/arm/mach-ixp23xx/core.c index aa4c4420ff3..9c8a3390321 100644 --- a/arch/arm/mach-ixp23xx/core.c +++ b/arch/arm/mach-ixp23xx/core.c | |||
@@ -111,9 +111,9 @@ enum ixp23xx_irq_type { | |||
111 | 111 | ||
112 | static void ixp23xx_config_irq(unsigned int, enum ixp23xx_irq_type); | 112 | static void ixp23xx_config_irq(unsigned int, enum ixp23xx_irq_type); |
113 | 113 | ||
114 | static int ixp23xx_irq_set_type(unsigned int irq, unsigned int type) | 114 | static int ixp23xx_irq_set_type(struct irq_data *d, unsigned int type) |
115 | { | 115 | { |
116 | int line = irq - IRQ_IXP23XX_GPIO6 + 6; | 116 | int line = d->irq - IRQ_IXP23XX_GPIO6 + 6; |
117 | u32 int_style; | 117 | u32 int_style; |
118 | enum ixp23xx_irq_type irq_type; | 118 | enum ixp23xx_irq_type irq_type; |
119 | volatile u32 *int_reg; | 119 | volatile u32 *int_reg; |
@@ -149,7 +149,7 @@ static int ixp23xx_irq_set_type(unsigned int irq, unsigned int type) | |||
149 | return -EINVAL; | 149 | return -EINVAL; |
150 | } | 150 | } |
151 | 151 | ||
152 | ixp23xx_config_irq(irq, irq_type); | 152 | ixp23xx_config_irq(d->irq, irq_type); |
153 | 153 | ||
154 | if (line >= 8) { /* pins 8-15 */ | 154 | if (line >= 8) { /* pins 8-15 */ |
155 | line -= 8; | 155 | line -= 8; |
@@ -173,9 +173,10 @@ static int ixp23xx_irq_set_type(unsigned int irq, unsigned int type) | |||
173 | return 0; | 173 | return 0; |
174 | } | 174 | } |
175 | 175 | ||
176 | static void ixp23xx_irq_mask(unsigned int irq) | 176 | static void ixp23xx_irq_mask(struct irq_data *d) |
177 | { | 177 | { |
178 | volatile unsigned long *intr_reg; | 178 | volatile unsigned long *intr_reg; |
179 | unsigned int irq = d->irq; | ||
179 | 180 | ||
180 | if (irq >= 56) | 181 | if (irq >= 56) |
181 | irq += 8; | 182 | irq += 8; |
@@ -184,9 +185,9 @@ static void ixp23xx_irq_mask(unsigned int irq) | |||
184 | *intr_reg &= ~(1 << (irq % 32)); | 185 | *intr_reg &= ~(1 << (irq % 32)); |
185 | } | 186 | } |
186 | 187 | ||
187 | static void ixp23xx_irq_ack(unsigned int irq) | 188 | static void ixp23xx_irq_ack(struct irq_data *d) |
188 | { | 189 | { |
189 | int line = irq - IRQ_IXP23XX_GPIO6 + 6; | 190 | int line = d->irq - IRQ_IXP23XX_GPIO6 + 6; |
190 | 191 | ||
191 | if ((line < 6) || (line > 15)) | 192 | if ((line < 6) || (line > 15)) |
192 | return; | 193 | return; |
@@ -198,11 +199,12 @@ static void ixp23xx_irq_ack(unsigned int irq) | |||
198 | * Level triggered interrupts on GPIO lines can only be cleared when the | 199 | * Level triggered interrupts on GPIO lines can only be cleared when the |
199 | * interrupt condition disappears. | 200 | * interrupt condition disappears. |
200 | */ | 201 | */ |
201 | static void ixp23xx_irq_level_unmask(unsigned int irq) | 202 | static void ixp23xx_irq_level_unmask(struct irq_data *d) |
202 | { | 203 | { |
203 | volatile unsigned long *intr_reg; | 204 | volatile unsigned long *intr_reg; |
205 | unsigned int irq = d->irq; | ||
204 | 206 | ||
205 | ixp23xx_irq_ack(irq); | 207 | ixp23xx_irq_ack(d); |
206 | 208 | ||
207 | if (irq >= 56) | 209 | if (irq >= 56) |
208 | irq += 8; | 210 | irq += 8; |
@@ -211,9 +213,10 @@ static void ixp23xx_irq_level_unmask(unsigned int irq) | |||
211 | *intr_reg |= (1 << (irq % 32)); | 213 | *intr_reg |= (1 << (irq % 32)); |
212 | } | 214 | } |
213 | 215 | ||
214 | static void ixp23xx_irq_edge_unmask(unsigned int irq) | 216 | static void ixp23xx_irq_edge_unmask(struct irq_data *d) |
215 | { | 217 | { |
216 | volatile unsigned long *intr_reg; | 218 | volatile unsigned long *intr_reg; |
219 | unsigned int irq = d->irq; | ||
217 | 220 | ||
218 | if (irq >= 56) | 221 | if (irq >= 56) |
219 | irq += 8; | 222 | irq += 8; |
@@ -223,26 +226,30 @@ static void ixp23xx_irq_edge_unmask(unsigned int irq) | |||
223 | } | 226 | } |
224 | 227 | ||
225 | static struct irq_chip ixp23xx_irq_level_chip = { | 228 | static struct irq_chip ixp23xx_irq_level_chip = { |
226 | .ack = ixp23xx_irq_mask, | 229 | .irq_ack = ixp23xx_irq_mask, |
227 | .mask = ixp23xx_irq_mask, | 230 | .irq_mask = ixp23xx_irq_mask, |
228 | .unmask = ixp23xx_irq_level_unmask, | 231 | .irq_unmask = ixp23xx_irq_level_unmask, |
229 | .set_type = ixp23xx_irq_set_type | 232 | .irq_set_type = ixp23xx_irq_set_type |
230 | }; | 233 | }; |
231 | 234 | ||
232 | static struct irq_chip ixp23xx_irq_edge_chip = { | 235 | static struct irq_chip ixp23xx_irq_edge_chip = { |
233 | .ack = ixp23xx_irq_ack, | 236 | .irq_ack = ixp23xx_irq_ack, |
234 | .mask = ixp23xx_irq_mask, | 237 | .irq_mask = ixp23xx_irq_mask, |
235 | .unmask = ixp23xx_irq_edge_unmask, | 238 | .irq_unmask = ixp23xx_irq_edge_unmask, |
236 | .set_type = ixp23xx_irq_set_type | 239 | .irq_set_type = ixp23xx_irq_set_type |
237 | }; | 240 | }; |
238 | 241 | ||
239 | static void ixp23xx_pci_irq_mask(unsigned int irq) | 242 | static void ixp23xx_pci_irq_mask(struct irq_data *d) |
240 | { | 243 | { |
244 | unsigned int irq = d->irq; | ||
245 | |||
241 | *IXP23XX_PCI_XSCALE_INT_ENABLE &= ~(1 << (IRQ_IXP23XX_INTA + 27 - irq)); | 246 | *IXP23XX_PCI_XSCALE_INT_ENABLE &= ~(1 << (IRQ_IXP23XX_INTA + 27 - irq)); |
242 | } | 247 | } |
243 | 248 | ||
244 | static void ixp23xx_pci_irq_unmask(unsigned int irq) | 249 | static void ixp23xx_pci_irq_unmask(struct irq_data *d) |
245 | { | 250 | { |
251 | unsigned int irq = d->irq; | ||
252 | |||
246 | *IXP23XX_PCI_XSCALE_INT_ENABLE |= (1 << (IRQ_IXP23XX_INTA + 27 - irq)); | 253 | *IXP23XX_PCI_XSCALE_INT_ENABLE |= (1 << (IRQ_IXP23XX_INTA + 27 - irq)); |
247 | } | 254 | } |
248 | 255 | ||
@@ -256,7 +263,7 @@ static void pci_handler(unsigned int irq, struct irq_desc *desc) | |||
256 | 263 | ||
257 | pci_interrupt = *IXP23XX_PCI_XSCALE_INT_STATUS; | 264 | pci_interrupt = *IXP23XX_PCI_XSCALE_INT_STATUS; |
258 | 265 | ||
259 | desc->chip->ack(irq); | 266 | desc->irq_data.chip->irq_ack(&desc->irq_data); |
260 | 267 | ||
261 | /* See which PCI_INTA, or PCI_INTB interrupted */ | 268 | /* See which PCI_INTA, or PCI_INTB interrupted */ |
262 | if (pci_interrupt & (1 << 26)) { | 269 | if (pci_interrupt & (1 << 26)) { |
@@ -269,13 +276,13 @@ static void pci_handler(unsigned int irq, struct irq_desc *desc) | |||
269 | 276 | ||
270 | generic_handle_irq(irqno); | 277 | generic_handle_irq(irqno); |
271 | 278 | ||
272 | desc->chip->unmask(irq); | 279 | desc->irq_data.chip->irq_unmask(&desc->irq_data); |
273 | } | 280 | } |
274 | 281 | ||
275 | static struct irq_chip ixp23xx_pci_irq_chip = { | 282 | static struct irq_chip ixp23xx_pci_irq_chip = { |
276 | .ack = ixp23xx_pci_irq_mask, | 283 | .irq_ack = ixp23xx_pci_irq_mask, |
277 | .mask = ixp23xx_pci_irq_mask, | 284 | .irq_mask = ixp23xx_pci_irq_mask, |
278 | .unmask = ixp23xx_pci_irq_unmask | 285 | .irq_unmask = ixp23xx_pci_irq_unmask |
279 | }; | 286 | }; |
280 | 287 | ||
281 | static void ixp23xx_config_irq(unsigned int irq, enum ixp23xx_irq_type type) | 288 | static void ixp23xx_config_irq(unsigned int irq, enum ixp23xx_irq_type type) |
diff --git a/arch/arm/mach-ixp23xx/ixdp2351.c b/arch/arm/mach-ixp23xx/ixdp2351.c index 664e39c2a90..181116aa659 100644 --- a/arch/arm/mach-ixp23xx/ixdp2351.c +++ b/arch/arm/mach-ixp23xx/ixdp2351.c | |||
@@ -48,14 +48,14 @@ | |||
48 | /* | 48 | /* |
49 | * IXDP2351 Interrupt Handling | 49 | * IXDP2351 Interrupt Handling |
50 | */ | 50 | */ |
51 | static void ixdp2351_inta_mask(unsigned int irq) | 51 | static void ixdp2351_inta_mask(struct irq_data *d) |
52 | { | 52 | { |
53 | *IXDP2351_CPLD_INTA_MASK_SET_REG = IXDP2351_INTA_IRQ_MASK(irq); | 53 | *IXDP2351_CPLD_INTA_MASK_SET_REG = IXDP2351_INTA_IRQ_MASK(d->irq); |
54 | } | 54 | } |
55 | 55 | ||
56 | static void ixdp2351_inta_unmask(unsigned int irq) | 56 | static void ixdp2351_inta_unmask(struct irq_data *d) |
57 | { | 57 | { |
58 | *IXDP2351_CPLD_INTA_MASK_CLR_REG = IXDP2351_INTA_IRQ_MASK(irq); | 58 | *IXDP2351_CPLD_INTA_MASK_CLR_REG = IXDP2351_INTA_IRQ_MASK(d->irq); |
59 | } | 59 | } |
60 | 60 | ||
61 | static void ixdp2351_inta_handler(unsigned int irq, struct irq_desc *desc) | 61 | static void ixdp2351_inta_handler(unsigned int irq, struct irq_desc *desc) |
@@ -64,7 +64,7 @@ static void ixdp2351_inta_handler(unsigned int irq, struct irq_desc *desc) | |||
64 | *IXDP2351_CPLD_INTA_STAT_REG & IXDP2351_INTA_IRQ_VALID; | 64 | *IXDP2351_CPLD_INTA_STAT_REG & IXDP2351_INTA_IRQ_VALID; |
65 | int i; | 65 | int i; |
66 | 66 | ||
67 | desc->chip->mask(irq); | 67 | desc->irq_data.chip->irq_mask(&desc->irq_data); |
68 | 68 | ||
69 | for (i = 0; i < IXDP2351_INTA_IRQ_NUM; i++) { | 69 | for (i = 0; i < IXDP2351_INTA_IRQ_NUM; i++) { |
70 | if (ex_interrupt & (1 << i)) { | 70 | if (ex_interrupt & (1 << i)) { |
@@ -74,23 +74,23 @@ static void ixdp2351_inta_handler(unsigned int irq, struct irq_desc *desc) | |||
74 | } | 74 | } |
75 | } | 75 | } |
76 | 76 | ||
77 | desc->chip->unmask(irq); | 77 | desc->irq_data.chip->irq_unmask(&desc->irq_data); |
78 | } | 78 | } |
79 | 79 | ||
80 | static struct irq_chip ixdp2351_inta_chip = { | 80 | static struct irq_chip ixdp2351_inta_chip = { |
81 | .ack = ixdp2351_inta_mask, | 81 | .irq_ack = ixdp2351_inta_mask, |
82 | .mask = ixdp2351_inta_mask, | 82 | .irq_mask = ixdp2351_inta_mask, |
83 | .unmask = ixdp2351_inta_unmask | 83 | .irq_unmask = ixdp2351_inta_unmask |
84 | }; | 84 | }; |
85 | 85 | ||
86 | static void ixdp2351_intb_mask(unsigned int irq) | 86 | static void ixdp2351_intb_mask(struct irq_data *d) |
87 | { | 87 | { |
88 | *IXDP2351_CPLD_INTB_MASK_SET_REG = IXDP2351_INTB_IRQ_MASK(irq); | 88 | *IXDP2351_CPLD_INTB_MASK_SET_REG = IXDP2351_INTB_IRQ_MASK(d->irq); |
89 | } | 89 | } |
90 | 90 | ||
91 | static void ixdp2351_intb_unmask(unsigned int irq) | 91 | static void ixdp2351_intb_unmask(struct irq_data *d) |
92 | { | 92 | { |
93 | *IXDP2351_CPLD_INTB_MASK_CLR_REG = IXDP2351_INTB_IRQ_MASK(irq); | 93 | *IXDP2351_CPLD_INTB_MASK_CLR_REG = IXDP2351_INTB_IRQ_MASK(d->irq); |
94 | } | 94 | } |
95 | 95 | ||
96 | static void ixdp2351_intb_handler(unsigned int irq, struct irq_desc *desc) | 96 | static void ixdp2351_intb_handler(unsigned int irq, struct irq_desc *desc) |
@@ -99,7 +99,7 @@ static void ixdp2351_intb_handler(unsigned int irq, struct irq_desc *desc) | |||
99 | *IXDP2351_CPLD_INTB_STAT_REG & IXDP2351_INTB_IRQ_VALID; | 99 | *IXDP2351_CPLD_INTB_STAT_REG & IXDP2351_INTB_IRQ_VALID; |
100 | int i; | 100 | int i; |
101 | 101 | ||
102 | desc->chip->ack(irq); | 102 | desc->irq_data.chip->irq_ack(&desc->irq_data); |
103 | 103 | ||
104 | for (i = 0; i < IXDP2351_INTB_IRQ_NUM; i++) { | 104 | for (i = 0; i < IXDP2351_INTB_IRQ_NUM; i++) { |
105 | if (ex_interrupt & (1 << i)) { | 105 | if (ex_interrupt & (1 << i)) { |
@@ -109,13 +109,13 @@ static void ixdp2351_intb_handler(unsigned int irq, struct irq_desc *desc) | |||
109 | } | 109 | } |
110 | } | 110 | } |
111 | 111 | ||
112 | desc->chip->unmask(irq); | 112 | desc->irq_data.chip->irq_unmask(&desc->irq_data); |
113 | } | 113 | } |
114 | 114 | ||
115 | static struct irq_chip ixdp2351_intb_chip = { | 115 | static struct irq_chip ixdp2351_intb_chip = { |
116 | .ack = ixdp2351_intb_mask, | 116 | .irq_ack = ixdp2351_intb_mask, |
117 | .mask = ixdp2351_intb_mask, | 117 | .irq_mask = ixdp2351_intb_mask, |
118 | .unmask = ixdp2351_intb_unmask | 118 | .irq_unmask = ixdp2351_intb_unmask |
119 | }; | 119 | }; |
120 | 120 | ||
121 | void __init ixdp2351_init_irq(void) | 121 | void __init ixdp2351_init_irq(void) |
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c index 4dbfcbb9163..9fd894271d5 100644 --- a/arch/arm/mach-ixp4xx/common.c +++ b/arch/arm/mach-ixp4xx/common.c | |||
@@ -128,9 +128,9 @@ int irq_to_gpio(unsigned int irq) | |||
128 | } | 128 | } |
129 | EXPORT_SYMBOL(irq_to_gpio); | 129 | EXPORT_SYMBOL(irq_to_gpio); |
130 | 130 | ||
131 | static int ixp4xx_set_irq_type(unsigned int irq, unsigned int type) | 131 | static int ixp4xx_set_irq_type(struct irq_data *d, unsigned int type) |
132 | { | 132 | { |
133 | int line = irq2gpio[irq]; | 133 | int line = irq2gpio[d->irq]; |
134 | u32 int_style; | 134 | u32 int_style; |
135 | enum ixp4xx_irq_type irq_type; | 135 | enum ixp4xx_irq_type irq_type; |
136 | volatile u32 *int_reg; | 136 | volatile u32 *int_reg; |
@@ -167,9 +167,9 @@ static int ixp4xx_set_irq_type(unsigned int irq, unsigned int type) | |||
167 | } | 167 | } |
168 | 168 | ||
169 | if (irq_type == IXP4XX_IRQ_EDGE) | 169 | if (irq_type == IXP4XX_IRQ_EDGE) |
170 | ixp4xx_irq_edge |= (1 << irq); | 170 | ixp4xx_irq_edge |= (1 << d->irq); |
171 | else | 171 | else |
172 | ixp4xx_irq_edge &= ~(1 << irq); | 172 | ixp4xx_irq_edge &= ~(1 << d->irq); |
173 | 173 | ||
174 | if (line >= 8) { /* pins 8-15 */ | 174 | if (line >= 8) { /* pins 8-15 */ |
175 | line -= 8; | 175 | line -= 8; |
@@ -188,22 +188,22 @@ static int ixp4xx_set_irq_type(unsigned int irq, unsigned int type) | |||
188 | *int_reg |= (int_style << (line * IXP4XX_GPIO_STYLE_SIZE)); | 188 | *int_reg |= (int_style << (line * IXP4XX_GPIO_STYLE_SIZE)); |
189 | 189 | ||
190 | /* Configure the line as an input */ | 190 | /* Configure the line as an input */ |
191 | gpio_line_config(irq2gpio[irq], IXP4XX_GPIO_IN); | 191 | gpio_line_config(irq2gpio[d->irq], IXP4XX_GPIO_IN); |
192 | 192 | ||
193 | return 0; | 193 | return 0; |
194 | } | 194 | } |
195 | 195 | ||
196 | static void ixp4xx_irq_mask(unsigned int irq) | 196 | static void ixp4xx_irq_mask(struct irq_data *d) |
197 | { | 197 | { |
198 | if ((cpu_is_ixp46x() || cpu_is_ixp43x()) && irq >= 32) | 198 | if ((cpu_is_ixp46x() || cpu_is_ixp43x()) && d->irq >= 32) |
199 | *IXP4XX_ICMR2 &= ~(1 << (irq - 32)); | 199 | *IXP4XX_ICMR2 &= ~(1 << (d->irq - 32)); |
200 | else | 200 | else |
201 | *IXP4XX_ICMR &= ~(1 << irq); | 201 | *IXP4XX_ICMR &= ~(1 << d->irq); |
202 | } | 202 | } |
203 | 203 | ||
204 | static void ixp4xx_irq_ack(unsigned int irq) | 204 | static void ixp4xx_irq_ack(struct irq_data *d) |
205 | { | 205 | { |
206 | int line = (irq < 32) ? irq2gpio[irq] : -1; | 206 | int line = (d->irq < 32) ? irq2gpio[d->irq] : -1; |
207 | 207 | ||
208 | if (line >= 0) | 208 | if (line >= 0) |
209 | *IXP4XX_GPIO_GPISR = (1 << line); | 209 | *IXP4XX_GPIO_GPISR = (1 << line); |
@@ -213,23 +213,23 @@ static void ixp4xx_irq_ack(unsigned int irq) | |||
213 | * Level triggered interrupts on GPIO lines can only be cleared when the | 213 | * Level triggered interrupts on GPIO lines can only be cleared when the |
214 | * interrupt condition disappears. | 214 | * interrupt condition disappears. |
215 | */ | 215 | */ |
216 | static void ixp4xx_irq_unmask(unsigned int irq) | 216 | static void ixp4xx_irq_unmask(struct irq_data *d) |
217 | { | 217 | { |
218 | if (!(ixp4xx_irq_edge & (1 << irq))) | 218 | if (!(ixp4xx_irq_edge & (1 << d->irq))) |
219 | ixp4xx_irq_ack(irq); | 219 | ixp4xx_irq_ack(d); |
220 | 220 | ||
221 | if ((cpu_is_ixp46x() || cpu_is_ixp43x()) && irq >= 32) | 221 | if ((cpu_is_ixp46x() || cpu_is_ixp43x()) && d->irq >= 32) |
222 | *IXP4XX_ICMR2 |= (1 << (irq - 32)); | 222 | *IXP4XX_ICMR2 |= (1 << (d->irq - 32)); |
223 | else | 223 | else |
224 | *IXP4XX_ICMR |= (1 << irq); | 224 | *IXP4XX_ICMR |= (1 << d->irq); |
225 | } | 225 | } |
226 | 226 | ||
227 | static struct irq_chip ixp4xx_irq_chip = { | 227 | static struct irq_chip ixp4xx_irq_chip = { |
228 | .name = "IXP4xx", | 228 | .name = "IXP4xx", |
229 | .ack = ixp4xx_irq_ack, | 229 | .irq_ack = ixp4xx_irq_ack, |
230 | .mask = ixp4xx_irq_mask, | 230 | .irq_mask = ixp4xx_irq_mask, |
231 | .unmask = ixp4xx_irq_unmask, | 231 | .irq_unmask = ixp4xx_irq_unmask, |
232 | .set_type = ixp4xx_set_irq_type, | 232 | .irq_set_type = ixp4xx_set_irq_type, |
233 | }; | 233 | }; |
234 | 234 | ||
235 | void __init ixp4xx_init_irq(void) | 235 | void __init ixp4xx_init_irq(void) |
@@ -432,7 +432,7 @@ static struct clocksource clocksource_ixp4xx = { | |||
432 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 432 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
433 | }; | 433 | }; |
434 | 434 | ||
435 | unsigned long ixp4xx_timer_freq = FREQ; | 435 | unsigned long ixp4xx_timer_freq = IXP4XX_TIMER_FREQ; |
436 | EXPORT_SYMBOL(ixp4xx_timer_freq); | 436 | EXPORT_SYMBOL(ixp4xx_timer_freq); |
437 | static void __init ixp4xx_clocksource_init(void) | 437 | static void __init ixp4xx_clocksource_init(void) |
438 | { | 438 | { |
@@ -496,7 +496,7 @@ static struct clock_event_device clockevent_ixp4xx = { | |||
496 | 496 | ||
497 | static void __init ixp4xx_clockevent_init(void) | 497 | static void __init ixp4xx_clockevent_init(void) |
498 | { | 498 | { |
499 | clockevent_ixp4xx.mult = div_sc(FREQ, NSEC_PER_SEC, | 499 | clockevent_ixp4xx.mult = div_sc(IXP4XX_TIMER_FREQ, NSEC_PER_SEC, |
500 | clockevent_ixp4xx.shift); | 500 | clockevent_ixp4xx.shift); |
501 | clockevent_ixp4xx.max_delta_ns = | 501 | clockevent_ixp4xx.max_delta_ns = |
502 | clockevent_delta2ns(0xfffffffe, &clockevent_ixp4xx); | 502 | clockevent_delta2ns(0xfffffffe, &clockevent_ixp4xx); |
diff --git a/arch/arm/mach-ixp4xx/include/mach/timex.h b/arch/arm/mach-ixp4xx/include/mach/timex.h index 2c3f93c3eb7..c9e930f2933 100644 --- a/arch/arm/mach-ixp4xx/include/mach/timex.h +++ b/arch/arm/mach-ixp4xx/include/mach/timex.h | |||
@@ -10,6 +10,7 @@ | |||
10 | * 66.66... MHz. We do a convulted calculation of CLOCK_TICK_RATE b/c the | 10 | * 66.66... MHz. We do a convulted calculation of CLOCK_TICK_RATE b/c the |
11 | * timer register ignores the bottom 2 bits of the LATCH value. | 11 | * timer register ignores the bottom 2 bits of the LATCH value. |
12 | */ | 12 | */ |
13 | #define FREQ 66666000 | 13 | #define IXP4XX_TIMER_FREQ 66666000 |
14 | #define CLOCK_TICK_RATE (((FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ) | 14 | #define CLOCK_TICK_RATE \ |
15 | (((IXP4XX_TIMER_FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ) | ||
15 | 16 | ||
diff --git a/arch/arm/mach-ixp4xx/ixp4xx_qmgr.c b/arch/arm/mach-ixp4xx/ixp4xx_qmgr.c index bfdbe4b5a3c..852f7c9f87d 100644 --- a/arch/arm/mach-ixp4xx/ixp4xx_qmgr.c +++ b/arch/arm/mach-ixp4xx/ixp4xx_qmgr.c | |||
@@ -265,6 +265,11 @@ void qmgr_release_queue(unsigned int queue) | |||
265 | qmgr_queue_descs[queue], queue); | 265 | qmgr_queue_descs[queue], queue); |
266 | qmgr_queue_descs[queue][0] = '\x0'; | 266 | qmgr_queue_descs[queue][0] = '\x0'; |
267 | #endif | 267 | #endif |
268 | |||
269 | while ((addr = qmgr_get_entry(queue))) | ||
270 | printk(KERN_ERR "qmgr: released queue %i not empty: 0x%08X\n", | ||
271 | queue, addr); | ||
272 | |||
268 | __raw_writel(0, &qmgr_regs->sram[queue]); | 273 | __raw_writel(0, &qmgr_regs->sram[queue]); |
269 | 274 | ||
270 | used_sram_bitmap[0] &= ~mask[0]; | 275 | used_sram_bitmap[0] &= ~mask[0]; |
@@ -275,10 +280,6 @@ void qmgr_release_queue(unsigned int queue) | |||
275 | spin_unlock_irq(&qmgr_lock); | 280 | spin_unlock_irq(&qmgr_lock); |
276 | 281 | ||
277 | module_put(THIS_MODULE); | 282 | module_put(THIS_MODULE); |
278 | |||
279 | while ((addr = qmgr_get_entry(queue))) | ||
280 | printk(KERN_ERR "qmgr: released queue %i not empty: 0x%08X\n", | ||
281 | queue, addr); | ||
282 | } | 283 | } |
283 | 284 | ||
284 | static int qmgr_init(void) | 285 | static int qmgr_init(void) |
diff --git a/arch/arm/mach-ks8695/irq.c b/arch/arm/mach-ks8695/irq.c index e375c1d53f8..7998ccaa633 100644 --- a/arch/arm/mach-ks8695/irq.c +++ b/arch/arm/mach-ks8695/irq.c | |||
@@ -34,29 +34,29 @@ | |||
34 | #include <mach/regs-irq.h> | 34 | #include <mach/regs-irq.h> |
35 | #include <mach/regs-gpio.h> | 35 | #include <mach/regs-gpio.h> |
36 | 36 | ||
37 | static void ks8695_irq_mask(unsigned int irqno) | 37 | static void ks8695_irq_mask(struct irq_data *d) |
38 | { | 38 | { |
39 | unsigned long inten; | 39 | unsigned long inten; |
40 | 40 | ||
41 | inten = __raw_readl(KS8695_IRQ_VA + KS8695_INTEN); | 41 | inten = __raw_readl(KS8695_IRQ_VA + KS8695_INTEN); |
42 | inten &= ~(1 << irqno); | 42 | inten &= ~(1 << d->irq); |
43 | 43 | ||
44 | __raw_writel(inten, KS8695_IRQ_VA + KS8695_INTEN); | 44 | __raw_writel(inten, KS8695_IRQ_VA + KS8695_INTEN); |
45 | } | 45 | } |
46 | 46 | ||
47 | static void ks8695_irq_unmask(unsigned int irqno) | 47 | static void ks8695_irq_unmask(struct irq_data *d) |
48 | { | 48 | { |
49 | unsigned long inten; | 49 | unsigned long inten; |
50 | 50 | ||
51 | inten = __raw_readl(KS8695_IRQ_VA + KS8695_INTEN); | 51 | inten = __raw_readl(KS8695_IRQ_VA + KS8695_INTEN); |
52 | inten |= (1 << irqno); | 52 | inten |= (1 << d->irq); |
53 | 53 | ||
54 | __raw_writel(inten, KS8695_IRQ_VA + KS8695_INTEN); | 54 | __raw_writel(inten, KS8695_IRQ_VA + KS8695_INTEN); |
55 | } | 55 | } |
56 | 56 | ||
57 | static void ks8695_irq_ack(unsigned int irqno) | 57 | static void ks8695_irq_ack(struct irq_data *d) |
58 | { | 58 | { |
59 | __raw_writel((1 << irqno), KS8695_IRQ_VA + KS8695_INTST); | 59 | __raw_writel((1 << d->irq), KS8695_IRQ_VA + KS8695_INTST); |
60 | } | 60 | } |
61 | 61 | ||
62 | 62 | ||
@@ -64,7 +64,7 @@ static struct irq_chip ks8695_irq_level_chip; | |||
64 | static struct irq_chip ks8695_irq_edge_chip; | 64 | static struct irq_chip ks8695_irq_edge_chip; |
65 | 65 | ||
66 | 66 | ||
67 | static int ks8695_irq_set_type(unsigned int irqno, unsigned int type) | 67 | static int ks8695_irq_set_type(struct irq_data *d, unsigned int type) |
68 | { | 68 | { |
69 | unsigned long ctrl, mode; | 69 | unsigned long ctrl, mode; |
70 | unsigned short level_triggered = 0; | 70 | unsigned short level_triggered = 0; |
@@ -93,7 +93,7 @@ static int ks8695_irq_set_type(unsigned int irqno, unsigned int type) | |||
93 | return -EINVAL; | 93 | return -EINVAL; |
94 | } | 94 | } |
95 | 95 | ||
96 | switch (irqno) { | 96 | switch (d->irq) { |
97 | case KS8695_IRQ_EXTERN0: | 97 | case KS8695_IRQ_EXTERN0: |
98 | ctrl &= ~IOPC_IOEINT0TM; | 98 | ctrl &= ~IOPC_IOEINT0TM; |
99 | ctrl |= IOPC_IOEINT0_MODE(mode); | 99 | ctrl |= IOPC_IOEINT0_MODE(mode); |
@@ -115,12 +115,12 @@ static int ks8695_irq_set_type(unsigned int irqno, unsigned int type) | |||
115 | } | 115 | } |
116 | 116 | ||
117 | if (level_triggered) { | 117 | if (level_triggered) { |
118 | set_irq_chip(irqno, &ks8695_irq_level_chip); | 118 | set_irq_chip(d->irq, &ks8695_irq_level_chip); |
119 | set_irq_handler(irqno, handle_level_irq); | 119 | set_irq_handler(d->irq, handle_level_irq); |
120 | } | 120 | } |
121 | else { | 121 | else { |
122 | set_irq_chip(irqno, &ks8695_irq_edge_chip); | 122 | set_irq_chip(d->irq, &ks8695_irq_edge_chip); |
123 | set_irq_handler(irqno, handle_edge_irq); | 123 | set_irq_handler(d->irq, handle_edge_irq); |
124 | } | 124 | } |
125 | 125 | ||
126 | __raw_writel(ctrl, KS8695_GPIO_VA + KS8695_IOPC); | 126 | __raw_writel(ctrl, KS8695_GPIO_VA + KS8695_IOPC); |
@@ -128,17 +128,17 @@ static int ks8695_irq_set_type(unsigned int irqno, unsigned int type) | |||
128 | } | 128 | } |
129 | 129 | ||
130 | static struct irq_chip ks8695_irq_level_chip = { | 130 | static struct irq_chip ks8695_irq_level_chip = { |
131 | .ack = ks8695_irq_mask, | 131 | .irq_ack = ks8695_irq_mask, |
132 | .mask = ks8695_irq_mask, | 132 | .irq_mask = ks8695_irq_mask, |
133 | .unmask = ks8695_irq_unmask, | 133 | .irq_unmask = ks8695_irq_unmask, |
134 | .set_type = ks8695_irq_set_type, | 134 | .irq_set_type = ks8695_irq_set_type, |
135 | }; | 135 | }; |
136 | 136 | ||
137 | static struct irq_chip ks8695_irq_edge_chip = { | 137 | static struct irq_chip ks8695_irq_edge_chip = { |
138 | .ack = ks8695_irq_ack, | 138 | .irq_ack = ks8695_irq_ack, |
139 | .mask = ks8695_irq_mask, | 139 | .irq_mask = ks8695_irq_mask, |
140 | .unmask = ks8695_irq_unmask, | 140 | .irq_unmask = ks8695_irq_unmask, |
141 | .set_type = ks8695_irq_set_type, | 141 | .irq_set_type = ks8695_irq_set_type, |
142 | }; | 142 | }; |
143 | 143 | ||
144 | void __init ks8695_init_irq(void) | 144 | void __init ks8695_init_irq(void) |
@@ -164,7 +164,8 @@ void __init ks8695_init_irq(void) | |||
164 | 164 | ||
165 | /* Edge-triggered interrupts */ | 165 | /* Edge-triggered interrupts */ |
166 | default: | 166 | default: |
167 | ks8695_irq_ack(irq); /* clear pending bit */ | 167 | /* clear pending bit */ |
168 | ks8695_irq_ack(irq_get_irq_data(irq)); | ||
168 | set_irq_chip(irq, &ks8695_irq_edge_chip); | 169 | set_irq_chip(irq, &ks8695_irq_edge_chip); |
169 | set_irq_handler(irq, handle_edge_irq); | 170 | set_irq_handler(irq, handle_edge_irq); |
170 | } | 171 | } |
diff --git a/arch/arm/mach-lh7a40x/arch-kev7a400.c b/arch/arm/mach-lh7a40x/arch-kev7a400.c index 9088c16662e..71129c33c7d 100644 --- a/arch/arm/mach-lh7a40x/arch-kev7a400.c +++ b/arch/arm/mach-lh7a40x/arch-kev7a400.c | |||
@@ -46,28 +46,28 @@ void __init kev7a400_map_io(void) | |||
46 | 46 | ||
47 | static u16 CPLD_IRQ_mask; /* Mask for CPLD IRQs, 1 == unmasked */ | 47 | static u16 CPLD_IRQ_mask; /* Mask for CPLD IRQs, 1 == unmasked */ |
48 | 48 | ||
49 | static void kev7a400_ack_cpld_irq (u32 irq) | 49 | static void kev7a400_ack_cpld_irq(struct irq_data *d) |
50 | { | 50 | { |
51 | CPLD_CL_INT = 1 << (irq - IRQ_KEV7A400_CPLD); | 51 | CPLD_CL_INT = 1 << (d->irq - IRQ_KEV7A400_CPLD); |
52 | } | 52 | } |
53 | 53 | ||
54 | static void kev7a400_mask_cpld_irq (u32 irq) | 54 | static void kev7a400_mask_cpld_irq(struct irq_data *d) |
55 | { | 55 | { |
56 | CPLD_IRQ_mask &= ~(1 << (irq - IRQ_KEV7A400_CPLD)); | 56 | CPLD_IRQ_mask &= ~(1 << (d->irq - IRQ_KEV7A400_CPLD)); |
57 | CPLD_WR_PB_INT_MASK = CPLD_IRQ_mask; | 57 | CPLD_WR_PB_INT_MASK = CPLD_IRQ_mask; |
58 | } | 58 | } |
59 | 59 | ||
60 | static void kev7a400_unmask_cpld_irq (u32 irq) | 60 | static void kev7a400_unmask_cpld_irq(struct irq_data *d) |
61 | { | 61 | { |
62 | CPLD_IRQ_mask |= 1 << (irq - IRQ_KEV7A400_CPLD); | 62 | CPLD_IRQ_mask |= 1 << (d->irq - IRQ_KEV7A400_CPLD); |
63 | CPLD_WR_PB_INT_MASK = CPLD_IRQ_mask; | 63 | CPLD_WR_PB_INT_MASK = CPLD_IRQ_mask; |
64 | } | 64 | } |
65 | 65 | ||
66 | static struct irq_chip kev7a400_cpld_chip = { | 66 | static struct irq_chip kev7a400_cpld_chip = { |
67 | .name = "CPLD", | 67 | .name = "CPLD", |
68 | .ack = kev7a400_ack_cpld_irq, | 68 | .irq_ack = kev7a400_ack_cpld_irq, |
69 | .mask = kev7a400_mask_cpld_irq, | 69 | .irq_mask = kev7a400_mask_cpld_irq, |
70 | .unmask = kev7a400_unmask_cpld_irq, | 70 | .irq_unmask = kev7a400_unmask_cpld_irq, |
71 | }; | 71 | }; |
72 | 72 | ||
73 | 73 | ||
diff --git a/arch/arm/mach-lh7a40x/arch-lpd7a40x.c b/arch/arm/mach-lh7a40x/arch-lpd7a40x.c index 7315a569aea..e735546181a 100644 --- a/arch/arm/mach-lh7a40x/arch-lpd7a40x.c +++ b/arch/arm/mach-lh7a40x/arch-lpd7a40x.c | |||
@@ -159,7 +159,7 @@ static void __init lpd7a40x_init (void) | |||
159 | #endif | 159 | #endif |
160 | } | 160 | } |
161 | 161 | ||
162 | static void lh7a40x_ack_cpld_irq (u32 irq) | 162 | static void lh7a40x_ack_cpld_irq(struct irq_data *d) |
163 | { | 163 | { |
164 | /* CPLD doesn't have ack capability, but some devices may */ | 164 | /* CPLD doesn't have ack capability, but some devices may */ |
165 | 165 | ||
@@ -167,14 +167,14 @@ static void lh7a40x_ack_cpld_irq (u32 irq) | |||
167 | /* The touch control *must* mask the interrupt because the | 167 | /* The touch control *must* mask the interrupt because the |
168 | * interrupt bit is read by the driver to determine if the pen | 168 | * interrupt bit is read by the driver to determine if the pen |
169 | * is still down. */ | 169 | * is still down. */ |
170 | if (irq == IRQ_TOUCH) | 170 | if (d->irq == IRQ_TOUCH) |
171 | CPLD_INTERRUPTS |= CPLD_INTMASK_TOUCH; | 171 | CPLD_INTERRUPTS |= CPLD_INTMASK_TOUCH; |
172 | #endif | 172 | #endif |
173 | } | 173 | } |
174 | 174 | ||
175 | static void lh7a40x_mask_cpld_irq (u32 irq) | 175 | static void lh7a40x_mask_cpld_irq(struct irq_data *d) |
176 | { | 176 | { |
177 | switch (irq) { | 177 | switch (d->irq) { |
178 | case IRQ_LPD7A40X_ETH_INT: | 178 | case IRQ_LPD7A40X_ETH_INT: |
179 | CPLD_INTERRUPTS |= CPLD_INTMASK_ETHERNET; | 179 | CPLD_INTERRUPTS |= CPLD_INTMASK_ETHERNET; |
180 | break; | 180 | break; |
@@ -186,9 +186,9 @@ static void lh7a40x_mask_cpld_irq (u32 irq) | |||
186 | } | 186 | } |
187 | } | 187 | } |
188 | 188 | ||
189 | static void lh7a40x_unmask_cpld_irq (u32 irq) | 189 | static void lh7a40x_unmask_cpld_irq(struct irq_data *d) |
190 | { | 190 | { |
191 | switch (irq) { | 191 | switch (d->irq) { |
192 | case IRQ_LPD7A40X_ETH_INT: | 192 | case IRQ_LPD7A40X_ETH_INT: |
193 | CPLD_INTERRUPTS &= ~CPLD_INTMASK_ETHERNET; | 193 | CPLD_INTERRUPTS &= ~CPLD_INTMASK_ETHERNET; |
194 | break; | 194 | break; |
@@ -201,17 +201,17 @@ static void lh7a40x_unmask_cpld_irq (u32 irq) | |||
201 | } | 201 | } |
202 | 202 | ||
203 | static struct irq_chip lpd7a40x_cpld_chip = { | 203 | static struct irq_chip lpd7a40x_cpld_chip = { |
204 | .name = "CPLD", | 204 | .name = "CPLD", |
205 | .ack = lh7a40x_ack_cpld_irq, | 205 | .irq_ack = lh7a40x_ack_cpld_irq, |
206 | .mask = lh7a40x_mask_cpld_irq, | 206 | .irq_mask = lh7a40x_mask_cpld_irq, |
207 | .unmask = lh7a40x_unmask_cpld_irq, | 207 | .irq_unmask = lh7a40x_unmask_cpld_irq, |
208 | }; | 208 | }; |
209 | 209 | ||
210 | static void lpd7a40x_cpld_handler (unsigned int irq, struct irq_desc *desc) | 210 | static void lpd7a40x_cpld_handler (unsigned int irq, struct irq_desc *desc) |
211 | { | 211 | { |
212 | unsigned int mask = CPLD_INTERRUPTS; | 212 | unsigned int mask = CPLD_INTERRUPTS; |
213 | 213 | ||
214 | desc->chip->ack (irq); | 214 | desc->irq_data.chip->irq_ack(&desc->irq_data); |
215 | 215 | ||
216 | if ((mask & (1<<0)) == 0) /* WLAN */ | 216 | if ((mask & (1<<0)) == 0) /* WLAN */ |
217 | generic_handle_irq(IRQ_LPD7A40X_ETH_INT); | 217 | generic_handle_irq(IRQ_LPD7A40X_ETH_INT); |
@@ -221,7 +221,8 @@ static void lpd7a40x_cpld_handler (unsigned int irq, struct irq_desc *desc) | |||
221 | generic_handle_irq(IRQ_TOUCH); | 221 | generic_handle_irq(IRQ_TOUCH); |
222 | #endif | 222 | #endif |
223 | 223 | ||
224 | desc->chip->unmask (irq); /* Level-triggered need this */ | 224 | /* Level-triggered need this */ |
225 | desc->irq_data.chip->irq_unmask(&desc->irq_data); | ||
225 | } | 226 | } |
226 | 227 | ||
227 | 228 | ||
diff --git a/arch/arm/mach-lh7a40x/irq-lh7a400.c b/arch/arm/mach-lh7a40x/irq-lh7a400.c index 1ad3afcf6b3..f2e7e655ca3 100644 --- a/arch/arm/mach-lh7a40x/irq-lh7a400.c +++ b/arch/arm/mach-lh7a40x/irq-lh7a400.c | |||
@@ -21,34 +21,34 @@ | |||
21 | 21 | ||
22 | /* CPU IRQ handling */ | 22 | /* CPU IRQ handling */ |
23 | 23 | ||
24 | static void lh7a400_mask_irq (u32 irq) | 24 | static void lh7a400_mask_irq(struct irq_data *d) |
25 | { | 25 | { |
26 | INTC_INTENC = (1 << irq); | 26 | INTC_INTENC = (1 << d->irq); |
27 | } | 27 | } |
28 | 28 | ||
29 | static void lh7a400_unmask_irq (u32 irq) | 29 | static void lh7a400_unmask_irq(struct irq_data *d) |
30 | { | 30 | { |
31 | INTC_INTENS = (1 << irq); | 31 | INTC_INTENS = (1 << d->irq); |
32 | } | 32 | } |
33 | 33 | ||
34 | static void lh7a400_ack_gpio_irq (u32 irq) | 34 | static void lh7a400_ack_gpio_irq(struct irq_data *d) |
35 | { | 35 | { |
36 | GPIO_GPIOFEOI = (1 << IRQ_TO_GPIO (irq)); | 36 | GPIO_GPIOFEOI = (1 << IRQ_TO_GPIO (d->irq)); |
37 | INTC_INTENC = (1 << irq); | 37 | INTC_INTENC = (1 << d->irq); |
38 | } | 38 | } |
39 | 39 | ||
40 | static struct irq_chip lh7a400_internal_chip = { | 40 | static struct irq_chip lh7a400_internal_chip = { |
41 | .name = "MPU", | 41 | .name = "MPU", |
42 | .ack = lh7a400_mask_irq, /* Level triggering -> mask is ack */ | 42 | .irq_ack = lh7a400_mask_irq, /* Level triggering -> mask is ack */ |
43 | .mask = lh7a400_mask_irq, | 43 | .irq_mask = lh7a400_mask_irq, |
44 | .unmask = lh7a400_unmask_irq, | 44 | .irq_unmask = lh7a400_unmask_irq, |
45 | }; | 45 | }; |
46 | 46 | ||
47 | static struct irq_chip lh7a400_gpio_chip = { | 47 | static struct irq_chip lh7a400_gpio_chip = { |
48 | .name = "GPIO", | 48 | .name = "GPIO", |
49 | .ack = lh7a400_ack_gpio_irq, | 49 | .irq_ack = lh7a400_ack_gpio_irq, |
50 | .mask = lh7a400_mask_irq, | 50 | .irq_mask = lh7a400_mask_irq, |
51 | .unmask = lh7a400_unmask_irq, | 51 | .irq_unmask = lh7a400_unmask_irq, |
52 | }; | 52 | }; |
53 | 53 | ||
54 | 54 | ||
diff --git a/arch/arm/mach-lh7a40x/irq-lh7a404.c b/arch/arm/mach-lh7a40x/irq-lh7a404.c index 12b045b688c..14b17338957 100644 --- a/arch/arm/mach-lh7a40x/irq-lh7a404.c +++ b/arch/arm/mach-lh7a40x/irq-lh7a404.c | |||
@@ -43,64 +43,64 @@ static unsigned char irq_pri_vic2[] = { | |||
43 | 43 | ||
44 | /* CPU IRQ handling */ | 44 | /* CPU IRQ handling */ |
45 | 45 | ||
46 | static void lh7a404_vic1_mask_irq (u32 irq) | 46 | static void lh7a404_vic1_mask_irq(struct irq_data *d) |
47 | { | 47 | { |
48 | VIC1_INTENCLR = (1 << irq); | 48 | VIC1_INTENCLR = (1 << d->irq); |
49 | } | 49 | } |
50 | 50 | ||
51 | static void lh7a404_vic1_unmask_irq (u32 irq) | 51 | static void lh7a404_vic1_unmask_irq(struct irq_data *d) |
52 | { | 52 | { |
53 | VIC1_INTEN = (1 << irq); | 53 | VIC1_INTEN = (1 << d->irq); |
54 | } | 54 | } |
55 | 55 | ||
56 | static void lh7a404_vic2_mask_irq (u32 irq) | 56 | static void lh7a404_vic2_mask_irq(struct irq_data *d) |
57 | { | 57 | { |
58 | VIC2_INTENCLR = (1 << (irq - 32)); | 58 | VIC2_INTENCLR = (1 << (d->irq - 32)); |
59 | } | 59 | } |
60 | 60 | ||
61 | static void lh7a404_vic2_unmask_irq (u32 irq) | 61 | static void lh7a404_vic2_unmask_irq(struct irq_data *d) |
62 | { | 62 | { |
63 | VIC2_INTEN = (1 << (irq - 32)); | 63 | VIC2_INTEN = (1 << (d->irq - 32)); |
64 | } | 64 | } |
65 | 65 | ||
66 | static void lh7a404_vic1_ack_gpio_irq (u32 irq) | 66 | static void lh7a404_vic1_ack_gpio_irq(struct irq_data *d) |
67 | { | 67 | { |
68 | GPIO_GPIOFEOI = (1 << IRQ_TO_GPIO (irq)); | 68 | GPIO_GPIOFEOI = (1 << IRQ_TO_GPIO (d->irq)); |
69 | VIC1_INTENCLR = (1 << irq); | 69 | VIC1_INTENCLR = (1 << d->irq); |
70 | } | 70 | } |
71 | 71 | ||
72 | static void lh7a404_vic2_ack_gpio_irq (u32 irq) | 72 | static void lh7a404_vic2_ack_gpio_irq(struct irq_data *d) |
73 | { | 73 | { |
74 | GPIO_GPIOFEOI = (1 << IRQ_TO_GPIO (irq)); | 74 | GPIO_GPIOFEOI = (1 << IRQ_TO_GPIO (d->irq)); |
75 | VIC2_INTENCLR = (1 << irq); | 75 | VIC2_INTENCLR = (1 << d->irq); |
76 | } | 76 | } |
77 | 77 | ||
78 | static struct irq_chip lh7a404_vic1_chip = { | 78 | static struct irq_chip lh7a404_vic1_chip = { |
79 | .name = "VIC1", | 79 | .name = "VIC1", |
80 | .ack = lh7a404_vic1_mask_irq, /* Because level-triggered */ | 80 | .irq_ack = lh7a404_vic1_mask_irq, /* Because level-triggered */ |
81 | .mask = lh7a404_vic1_mask_irq, | 81 | .irq_mask = lh7a404_vic1_mask_irq, |
82 | .unmask = lh7a404_vic1_unmask_irq, | 82 | .irq_unmask = lh7a404_vic1_unmask_irq, |
83 | }; | 83 | }; |
84 | 84 | ||
85 | static struct irq_chip lh7a404_vic2_chip = { | 85 | static struct irq_chip lh7a404_vic2_chip = { |
86 | .name = "VIC2", | 86 | .name = "VIC2", |
87 | .ack = lh7a404_vic2_mask_irq, /* Because level-triggered */ | 87 | .irq_ack = lh7a404_vic2_mask_irq, /* Because level-triggered */ |
88 | .mask = lh7a404_vic2_mask_irq, | 88 | .irq_mask = lh7a404_vic2_mask_irq, |
89 | .unmask = lh7a404_vic2_unmask_irq, | 89 | .irq_unmask = lh7a404_vic2_unmask_irq, |
90 | }; | 90 | }; |
91 | 91 | ||
92 | static struct irq_chip lh7a404_gpio_vic1_chip = { | 92 | static struct irq_chip lh7a404_gpio_vic1_chip = { |
93 | .name = "GPIO-VIC1", | 93 | .name = "GPIO-VIC1", |
94 | .ack = lh7a404_vic1_ack_gpio_irq, | 94 | .irq_ack = lh7a404_vic1_ack_gpio_irq, |
95 | .mask = lh7a404_vic1_mask_irq, | 95 | .irq_mask = lh7a404_vic1_mask_irq, |
96 | .unmask = lh7a404_vic1_unmask_irq, | 96 | .irq_unmask = lh7a404_vic1_unmask_irq, |
97 | }; | 97 | }; |
98 | 98 | ||
99 | static struct irq_chip lh7a404_gpio_vic2_chip = { | 99 | static struct irq_chip lh7a404_gpio_vic2_chip = { |
100 | .name = "GPIO-VIC2", | 100 | .name = "GPIO-VIC2", |
101 | .ack = lh7a404_vic2_ack_gpio_irq, | 101 | .irq_ack = lh7a404_vic2_ack_gpio_irq, |
102 | .mask = lh7a404_vic2_mask_irq, | 102 | .irq_mask = lh7a404_vic2_mask_irq, |
103 | .unmask = lh7a404_vic2_unmask_irq, | 103 | .irq_unmask = lh7a404_vic2_unmask_irq, |
104 | }; | 104 | }; |
105 | 105 | ||
106 | /* IRQ initialization */ | 106 | /* IRQ initialization */ |
diff --git a/arch/arm/mach-lh7a40x/irq-lpd7a40x.c b/arch/arm/mach-lh7a40x/irq-lpd7a40x.c index fd033bb4342..1bfdcddcb93 100644 --- a/arch/arm/mach-lh7a40x/irq-lpd7a40x.c +++ b/arch/arm/mach-lh7a40x/irq-lpd7a40x.c | |||
@@ -20,14 +20,14 @@ | |||
20 | 20 | ||
21 | #include "common.h" | 21 | #include "common.h" |
22 | 22 | ||
23 | static void lh7a40x_ack_cpld_irq (u32 irq) | 23 | static void lh7a40x_ack_cpld_irq(struct irq_data *d) |
24 | { | 24 | { |
25 | /* CPLD doesn't have ack capability */ | 25 | /* CPLD doesn't have ack capability */ |
26 | } | 26 | } |
27 | 27 | ||
28 | static void lh7a40x_mask_cpld_irq (u32 irq) | 28 | static void lh7a40x_mask_cpld_irq(struct irq_data *d) |
29 | { | 29 | { |
30 | switch (irq) { | 30 | switch (d->irq) { |
31 | case IRQ_LPD7A40X_ETH_INT: | 31 | case IRQ_LPD7A40X_ETH_INT: |
32 | CPLD_INTERRUPTS = CPLD_INTERRUPTS | 0x4; | 32 | CPLD_INTERRUPTS = CPLD_INTERRUPTS | 0x4; |
33 | break; | 33 | break; |
@@ -37,9 +37,9 @@ static void lh7a40x_mask_cpld_irq (u32 irq) | |||
37 | } | 37 | } |
38 | } | 38 | } |
39 | 39 | ||
40 | static void lh7a40x_unmask_cpld_irq (u32 irq) | 40 | static void lh7a40x_unmask_cpld_irq(struct irq_data *d) |
41 | { | 41 | { |
42 | switch (irq) { | 42 | switch (d->irq) { |
43 | case IRQ_LPD7A40X_ETH_INT: | 43 | case IRQ_LPD7A40X_ETH_INT: |
44 | CPLD_INTERRUPTS = CPLD_INTERRUPTS & ~ 0x4; | 44 | CPLD_INTERRUPTS = CPLD_INTERRUPTS & ~ 0x4; |
45 | break; | 45 | break; |
@@ -50,17 +50,17 @@ static void lh7a40x_unmask_cpld_irq (u32 irq) | |||
50 | } | 50 | } |
51 | 51 | ||
52 | static struct irq_chip lh7a40x_cpld_chip = { | 52 | static struct irq_chip lh7a40x_cpld_chip = { |
53 | .name = "CPLD", | 53 | .name = "CPLD", |
54 | .ack = lh7a40x_ack_cpld_irq, | 54 | .irq_ack = lh7a40x_ack_cpld_irq, |
55 | .mask = lh7a40x_mask_cpld_irq, | 55 | .irq_mask = lh7a40x_mask_cpld_irq, |
56 | .unmask = lh7a40x_unmask_cpld_irq, | 56 | .irq_unmask = lh7a40x_unmask_cpld_irq, |
57 | }; | 57 | }; |
58 | 58 | ||
59 | static void lh7a40x_cpld_handler (unsigned int irq, struct irq_desc *desc) | 59 | static void lh7a40x_cpld_handler (unsigned int irq, struct irq_desc *desc) |
60 | { | 60 | { |
61 | unsigned int mask = CPLD_INTERRUPTS; | 61 | unsigned int mask = CPLD_INTERRUPTS; |
62 | 62 | ||
63 | desc->chip->ack (irq); | 63 | desc->irq_data.chip->ack (irq); |
64 | 64 | ||
65 | if ((mask & 0x1) == 0) /* WLAN */ | 65 | if ((mask & 0x1) == 0) /* WLAN */ |
66 | generic_handle_irq(IRQ_LPD7A40X_ETH_INT); | 66 | generic_handle_irq(IRQ_LPD7A40X_ETH_INT); |
@@ -68,7 +68,7 @@ static void lh7a40x_cpld_handler (unsigned int irq, struct irq_desc *desc) | |||
68 | if ((mask & 0x2) == 0) /* Touch */ | 68 | if ((mask & 0x2) == 0) /* Touch */ |
69 | generic_handle_irq(IRQ_LPD7A400_TS); | 69 | generic_handle_irq(IRQ_LPD7A400_TS); |
70 | 70 | ||
71 | desc->chip->unmask (irq); /* Level-triggered need this */ | 71 | desc->irq_data.chip->unmask (irq); /* Level-triggered need this */ |
72 | } | 72 | } |
73 | 73 | ||
74 | 74 | ||
diff --git a/arch/arm/mach-lpc32xx/irq.c b/arch/arm/mach-lpc32xx/irq.c index bd0df26c415..316ecbf6c58 100644 --- a/arch/arm/mach-lpc32xx/irq.c +++ b/arch/arm/mach-lpc32xx/irq.c | |||
@@ -191,38 +191,38 @@ static void get_controller(unsigned int irq, unsigned int *base, | |||
191 | } | 191 | } |
192 | } | 192 | } |
193 | 193 | ||
194 | static void lpc32xx_mask_irq(unsigned int irq) | 194 | static void lpc32xx_mask_irq(struct irq_data *d) |
195 | { | 195 | { |
196 | unsigned int reg, ctrl, mask; | 196 | unsigned int reg, ctrl, mask; |
197 | 197 | ||
198 | get_controller(irq, &ctrl, &mask); | 198 | get_controller(d->irq, &ctrl, &mask); |
199 | 199 | ||
200 | reg = __raw_readl(LPC32XX_INTC_MASK(ctrl)) & ~mask; | 200 | reg = __raw_readl(LPC32XX_INTC_MASK(ctrl)) & ~mask; |
201 | __raw_writel(reg, LPC32XX_INTC_MASK(ctrl)); | 201 | __raw_writel(reg, LPC32XX_INTC_MASK(ctrl)); |
202 | } | 202 | } |
203 | 203 | ||
204 | static void lpc32xx_unmask_irq(unsigned int irq) | 204 | static void lpc32xx_unmask_irq(struct irq_data *d) |
205 | { | 205 | { |
206 | unsigned int reg, ctrl, mask; | 206 | unsigned int reg, ctrl, mask; |
207 | 207 | ||
208 | get_controller(irq, &ctrl, &mask); | 208 | get_controller(d->irq, &ctrl, &mask); |
209 | 209 | ||
210 | reg = __raw_readl(LPC32XX_INTC_MASK(ctrl)) | mask; | 210 | reg = __raw_readl(LPC32XX_INTC_MASK(ctrl)) | mask; |
211 | __raw_writel(reg, LPC32XX_INTC_MASK(ctrl)); | 211 | __raw_writel(reg, LPC32XX_INTC_MASK(ctrl)); |
212 | } | 212 | } |
213 | 213 | ||
214 | static void lpc32xx_ack_irq(unsigned int irq) | 214 | static void lpc32xx_ack_irq(struct irq_data *d) |
215 | { | 215 | { |
216 | unsigned int ctrl, mask; | 216 | unsigned int ctrl, mask; |
217 | 217 | ||
218 | get_controller(irq, &ctrl, &mask); | 218 | get_controller(d->irq, &ctrl, &mask); |
219 | 219 | ||
220 | __raw_writel(mask, LPC32XX_INTC_RAW_STAT(ctrl)); | 220 | __raw_writel(mask, LPC32XX_INTC_RAW_STAT(ctrl)); |
221 | 221 | ||
222 | /* Also need to clear pending wake event */ | 222 | /* Also need to clear pending wake event */ |
223 | if (lpc32xx_events[irq].mask != 0) | 223 | if (lpc32xx_events[d->irq].mask != 0) |
224 | __raw_writel(lpc32xx_events[irq].mask, | 224 | __raw_writel(lpc32xx_events[d->irq].mask, |
225 | lpc32xx_events[irq].event_group->rawstat_reg); | 225 | lpc32xx_events[d->irq].event_group->rawstat_reg); |
226 | } | 226 | } |
227 | 227 | ||
228 | static void __lpc32xx_set_irq_type(unsigned int irq, int use_high_level, | 228 | static void __lpc32xx_set_irq_type(unsigned int irq, int use_high_level, |
@@ -261,27 +261,27 @@ static void __lpc32xx_set_irq_type(unsigned int irq, int use_high_level, | |||
261 | } | 261 | } |
262 | } | 262 | } |
263 | 263 | ||
264 | static int lpc32xx_set_irq_type(unsigned int irq, unsigned int type) | 264 | static int lpc32xx_set_irq_type(struct irq_data *d, unsigned int type) |
265 | { | 265 | { |
266 | switch (type) { | 266 | switch (type) { |
267 | case IRQ_TYPE_EDGE_RISING: | 267 | case IRQ_TYPE_EDGE_RISING: |
268 | /* Rising edge sensitive */ | 268 | /* Rising edge sensitive */ |
269 | __lpc32xx_set_irq_type(irq, 1, 1); | 269 | __lpc32xx_set_irq_type(d->irq, 1, 1); |
270 | break; | 270 | break; |
271 | 271 | ||
272 | case IRQ_TYPE_EDGE_FALLING: | 272 | case IRQ_TYPE_EDGE_FALLING: |
273 | /* Falling edge sensitive */ | 273 | /* Falling edge sensitive */ |
274 | __lpc32xx_set_irq_type(irq, 0, 1); | 274 | __lpc32xx_set_irq_type(d->irq, 0, 1); |
275 | break; | 275 | break; |
276 | 276 | ||
277 | case IRQ_TYPE_LEVEL_LOW: | 277 | case IRQ_TYPE_LEVEL_LOW: |
278 | /* Low level sensitive */ | 278 | /* Low level sensitive */ |
279 | __lpc32xx_set_irq_type(irq, 0, 0); | 279 | __lpc32xx_set_irq_type(d->irq, 0, 0); |
280 | break; | 280 | break; |
281 | 281 | ||
282 | case IRQ_TYPE_LEVEL_HIGH: | 282 | case IRQ_TYPE_LEVEL_HIGH: |
283 | /* High level sensitive */ | 283 | /* High level sensitive */ |
284 | __lpc32xx_set_irq_type(irq, 1, 0); | 284 | __lpc32xx_set_irq_type(d->irq, 1, 0); |
285 | break; | 285 | break; |
286 | 286 | ||
287 | /* Other modes are not supported */ | 287 | /* Other modes are not supported */ |
@@ -290,33 +290,33 @@ static int lpc32xx_set_irq_type(unsigned int irq, unsigned int type) | |||
290 | } | 290 | } |
291 | 291 | ||
292 | /* Ok to use the level handler for all types */ | 292 | /* Ok to use the level handler for all types */ |
293 | set_irq_handler(irq, handle_level_irq); | 293 | set_irq_handler(d->irq, handle_level_irq); |
294 | 294 | ||
295 | return 0; | 295 | return 0; |
296 | } | 296 | } |
297 | 297 | ||
298 | static int lpc32xx_irq_wake(unsigned int irqno, unsigned int state) | 298 | static int lpc32xx_irq_wake(struct irq_data *d, unsigned int state) |
299 | { | 299 | { |
300 | unsigned long eventreg; | 300 | unsigned long eventreg; |
301 | 301 | ||
302 | if (lpc32xx_events[irqno].mask != 0) { | 302 | if (lpc32xx_events[d->irq].mask != 0) { |
303 | eventreg = __raw_readl(lpc32xx_events[irqno]. | 303 | eventreg = __raw_readl(lpc32xx_events[d->irq]. |
304 | event_group->enab_reg); | 304 | event_group->enab_reg); |
305 | 305 | ||
306 | if (state) | 306 | if (state) |
307 | eventreg |= lpc32xx_events[irqno].mask; | 307 | eventreg |= lpc32xx_events[d->irq].mask; |
308 | else | 308 | else |
309 | eventreg &= ~lpc32xx_events[irqno].mask; | 309 | eventreg &= ~lpc32xx_events[d->irq].mask; |
310 | 310 | ||
311 | __raw_writel(eventreg, | 311 | __raw_writel(eventreg, |
312 | lpc32xx_events[irqno].event_group->enab_reg); | 312 | lpc32xx_events[d->irq].event_group->enab_reg); |
313 | 313 | ||
314 | return 0; | 314 | return 0; |
315 | } | 315 | } |
316 | 316 | ||
317 | /* Clear event */ | 317 | /* Clear event */ |
318 | __raw_writel(lpc32xx_events[irqno].mask, | 318 | __raw_writel(lpc32xx_events[d->irq].mask, |
319 | lpc32xx_events[irqno].event_group->rawstat_reg); | 319 | lpc32xx_events[d->irq].event_group->rawstat_reg); |
320 | 320 | ||
321 | return -ENODEV; | 321 | return -ENODEV; |
322 | } | 322 | } |
@@ -336,11 +336,11 @@ static void __init lpc32xx_set_default_mappings(unsigned int apr, | |||
336 | } | 336 | } |
337 | 337 | ||
338 | static struct irq_chip lpc32xx_irq_chip = { | 338 | static struct irq_chip lpc32xx_irq_chip = { |
339 | .ack = lpc32xx_ack_irq, | 339 | .irq_ack = lpc32xx_ack_irq, |
340 | .mask = lpc32xx_mask_irq, | 340 | .irq_mask = lpc32xx_mask_irq, |
341 | .unmask = lpc32xx_unmask_irq, | 341 | .irq_unmask = lpc32xx_unmask_irq, |
342 | .set_type = lpc32xx_set_irq_type, | 342 | .irq_set_type = lpc32xx_set_irq_type, |
343 | .set_wake = lpc32xx_irq_wake | 343 | .irq_set_wake = lpc32xx_irq_wake |
344 | }; | 344 | }; |
345 | 345 | ||
346 | static void lpc32xx_sic1_handler(unsigned int irq, struct irq_desc *desc) | 346 | static void lpc32xx_sic1_handler(unsigned int irq, struct irq_desc *desc) |
diff --git a/arch/arm/mach-mmp/include/mach/mfp-mmp2.h b/arch/arm/mach-mmp/include/mach/mfp-mmp2.h index 117e3036608..4ad38629c3f 100644 --- a/arch/arm/mach-mmp/include/mach/mfp-mmp2.h +++ b/arch/arm/mach-mmp/include/mach/mfp-mmp2.h | |||
@@ -6,7 +6,7 @@ | |||
6 | #define MFP_DRIVE_VERY_SLOW (0x0 << 13) | 6 | #define MFP_DRIVE_VERY_SLOW (0x0 << 13) |
7 | #define MFP_DRIVE_SLOW (0x2 << 13) | 7 | #define MFP_DRIVE_SLOW (0x2 << 13) |
8 | #define MFP_DRIVE_MEDIUM (0x4 << 13) | 8 | #define MFP_DRIVE_MEDIUM (0x4 << 13) |
9 | #define MFP_DRIVE_FAST (0x8 << 13) | 9 | #define MFP_DRIVE_FAST (0x6 << 13) |
10 | 10 | ||
11 | /* GPIO */ | 11 | /* GPIO */ |
12 | #define GPIO0_GPIO MFP_CFG(GPIO0, AF0) | 12 | #define GPIO0_GPIO MFP_CFG(GPIO0, AF0) |
diff --git a/arch/arm/mach-mmp/include/mach/mfp-pxa910.h b/arch/arm/mach-mmp/include/mach/mfp-pxa910.h index 7e8a80f25dd..fbd7ee8e489 100644 --- a/arch/arm/mach-mmp/include/mach/mfp-pxa910.h +++ b/arch/arm/mach-mmp/include/mach/mfp-pxa910.h | |||
@@ -6,7 +6,7 @@ | |||
6 | #define MFP_DRIVE_VERY_SLOW (0x0 << 13) | 6 | #define MFP_DRIVE_VERY_SLOW (0x0 << 13) |
7 | #define MFP_DRIVE_SLOW (0x2 << 13) | 7 | #define MFP_DRIVE_SLOW (0x2 << 13) |
8 | #define MFP_DRIVE_MEDIUM (0x4 << 13) | 8 | #define MFP_DRIVE_MEDIUM (0x4 << 13) |
9 | #define MFP_DRIVE_FAST (0x8 << 13) | 9 | #define MFP_DRIVE_FAST (0x6 << 13) |
10 | 10 | ||
11 | /* UART2 */ | 11 | /* UART2 */ |
12 | #define GPIO47_UART2_RXD MFP_CFG(GPIO47, AF6) | 12 | #define GPIO47_UART2_RXD MFP_CFG(GPIO47, AF6) |
diff --git a/arch/arm/mach-mmp/irq-mmp2.c b/arch/arm/mach-mmp/irq-mmp2.c index 01342be91c3..fa037038e7b 100644 --- a/arch/arm/mach-mmp/irq-mmp2.c +++ b/arch/arm/mach-mmp/irq-mmp2.c | |||
@@ -20,48 +20,48 @@ | |||
20 | 20 | ||
21 | #include "common.h" | 21 | #include "common.h" |
22 | 22 | ||
23 | static void icu_mask_irq(unsigned int irq) | 23 | static void icu_mask_irq(struct irq_data *d) |
24 | { | 24 | { |
25 | uint32_t r = __raw_readl(ICU_INT_CONF(irq)); | 25 | uint32_t r = __raw_readl(ICU_INT_CONF(d->irq)); |
26 | 26 | ||
27 | r &= ~ICU_INT_ROUTE_PJ4_IRQ; | 27 | r &= ~ICU_INT_ROUTE_PJ4_IRQ; |
28 | __raw_writel(r, ICU_INT_CONF(irq)); | 28 | __raw_writel(r, ICU_INT_CONF(d->irq)); |
29 | } | 29 | } |
30 | 30 | ||
31 | static void icu_unmask_irq(unsigned int irq) | 31 | static void icu_unmask_irq(struct irq_data *d) |
32 | { | 32 | { |
33 | uint32_t r = __raw_readl(ICU_INT_CONF(irq)); | 33 | uint32_t r = __raw_readl(ICU_INT_CONF(d->irq)); |
34 | 34 | ||
35 | r |= ICU_INT_ROUTE_PJ4_IRQ; | 35 | r |= ICU_INT_ROUTE_PJ4_IRQ; |
36 | __raw_writel(r, ICU_INT_CONF(irq)); | 36 | __raw_writel(r, ICU_INT_CONF(d->irq)); |
37 | } | 37 | } |
38 | 38 | ||
39 | static struct irq_chip icu_irq_chip = { | 39 | static struct irq_chip icu_irq_chip = { |
40 | .name = "icu_irq", | 40 | .name = "icu_irq", |
41 | .mask = icu_mask_irq, | 41 | .irq_mask = icu_mask_irq, |
42 | .mask_ack = icu_mask_irq, | 42 | .irq_mask_ack = icu_mask_irq, |
43 | .unmask = icu_unmask_irq, | 43 | .irq_unmask = icu_unmask_irq, |
44 | }; | 44 | }; |
45 | 45 | ||
46 | static void pmic_irq_ack(unsigned int irq) | 46 | static void pmic_irq_ack(struct irq_data *d) |
47 | { | 47 | { |
48 | if (irq == IRQ_MMP2_PMIC) | 48 | if (d->irq == IRQ_MMP2_PMIC) |
49 | mmp2_clear_pmic_int(); | 49 | mmp2_clear_pmic_int(); |
50 | } | 50 | } |
51 | 51 | ||
52 | #define SECOND_IRQ_MASK(_name_, irq_base, prefix) \ | 52 | #define SECOND_IRQ_MASK(_name_, irq_base, prefix) \ |
53 | static void _name_##_mask_irq(unsigned int irq) \ | 53 | static void _name_##_mask_irq(struct irq_data *d) \ |
54 | { \ | 54 | { \ |
55 | uint32_t r; \ | 55 | uint32_t r; \ |
56 | r = __raw_readl(prefix##_MASK) | (1 << (irq - irq_base)); \ | 56 | r = __raw_readl(prefix##_MASK) | (1 << (d->irq - irq_base)); \ |
57 | __raw_writel(r, prefix##_MASK); \ | 57 | __raw_writel(r, prefix##_MASK); \ |
58 | } | 58 | } |
59 | 59 | ||
60 | #define SECOND_IRQ_UNMASK(_name_, irq_base, prefix) \ | 60 | #define SECOND_IRQ_UNMASK(_name_, irq_base, prefix) \ |
61 | static void _name_##_unmask_irq(unsigned int irq) \ | 61 | static void _name_##_unmask_irq(struct irq_data *d) \ |
62 | { \ | 62 | { \ |
63 | uint32_t r; \ | 63 | uint32_t r; \ |
64 | r = __raw_readl(prefix##_MASK) & ~(1 << (irq - irq_base)); \ | 64 | r = __raw_readl(prefix##_MASK) & ~(1 << (d->irq - irq_base)); \ |
65 | __raw_writel(r, prefix##_MASK); \ | 65 | __raw_writel(r, prefix##_MASK); \ |
66 | } | 66 | } |
67 | 67 | ||
@@ -88,8 +88,8 @@ SECOND_IRQ_UNMASK(_name_, irq_base, prefix) \ | |||
88 | SECOND_IRQ_DEMUX(_name_, irq_base, prefix) \ | 88 | SECOND_IRQ_DEMUX(_name_, irq_base, prefix) \ |
89 | static struct irq_chip _name_##_irq_chip = { \ | 89 | static struct irq_chip _name_##_irq_chip = { \ |
90 | .name = #_name_, \ | 90 | .name = #_name_, \ |
91 | .mask = _name_##_mask_irq, \ | 91 | .irq_mask = _name_##_mask_irq, \ |
92 | .unmask = _name_##_unmask_irq, \ | 92 | .irq_unmask = _name_##_unmask_irq, \ |
93 | } | 93 | } |
94 | 94 | ||
95 | SECOND_IRQ_CHIP(pmic, IRQ_MMP2_PMIC_BASE, MMP2_ICU_INT4); | 95 | SECOND_IRQ_CHIP(pmic, IRQ_MMP2_PMIC_BASE, MMP2_ICU_INT4); |
@@ -103,10 +103,12 @@ static void init_mux_irq(struct irq_chip *chip, int start, int num) | |||
103 | int irq; | 103 | int irq; |
104 | 104 | ||
105 | for (irq = start; num > 0; irq++, num--) { | 105 | for (irq = start; num > 0; irq++, num--) { |
106 | struct irq_data *d = irq_get_irq_data(irq); | ||
107 | |||
106 | /* mask and clear the IRQ */ | 108 | /* mask and clear the IRQ */ |
107 | chip->mask(irq); | 109 | chip->irq_mask(d); |
108 | if (chip->ack) | 110 | if (chip->irq_ack) |
109 | chip->ack(irq); | 111 | chip->irq_ack(d); |
110 | 112 | ||
111 | set_irq_chip(irq, chip); | 113 | set_irq_chip(irq, chip); |
112 | set_irq_flags(irq, IRQF_VALID); | 114 | set_irq_flags(irq, IRQF_VALID); |
@@ -119,7 +121,7 @@ void __init mmp2_init_icu(void) | |||
119 | int irq; | 121 | int irq; |
120 | 122 | ||
121 | for (irq = 0; irq < IRQ_MMP2_MUX_BASE; irq++) { | 123 | for (irq = 0; irq < IRQ_MMP2_MUX_BASE; irq++) { |
122 | icu_mask_irq(irq); | 124 | icu_mask_irq(irq_get_irq_data(irq)); |
123 | set_irq_chip(irq, &icu_irq_chip); | 125 | set_irq_chip(irq, &icu_irq_chip); |
124 | set_irq_flags(irq, IRQF_VALID); | 126 | set_irq_flags(irq, IRQF_VALID); |
125 | 127 | ||
@@ -139,7 +141,7 @@ void __init mmp2_init_icu(void) | |||
139 | /* NOTE: IRQ_MMP2_PMIC requires the PMIC MFPR register | 141 | /* NOTE: IRQ_MMP2_PMIC requires the PMIC MFPR register |
140 | * to be written to clear the interrupt | 142 | * to be written to clear the interrupt |
141 | */ | 143 | */ |
142 | pmic_irq_chip.ack = pmic_irq_ack; | 144 | pmic_irq_chip.irq_ack = pmic_irq_ack; |
143 | 145 | ||
144 | init_mux_irq(&pmic_irq_chip, IRQ_MMP2_PMIC_BASE, 2); | 146 | init_mux_irq(&pmic_irq_chip, IRQ_MMP2_PMIC_BASE, 2); |
145 | init_mux_irq(&rtc_irq_chip, IRQ_MMP2_RTC_BASE, 2); | 147 | init_mux_irq(&rtc_irq_chip, IRQ_MMP2_RTC_BASE, 2); |
diff --git a/arch/arm/mach-mmp/irq-pxa168.c b/arch/arm/mach-mmp/irq-pxa168.c index 52ff2f065eb..f86b450cb93 100644 --- a/arch/arm/mach-mmp/irq-pxa168.c +++ b/arch/arm/mach-mmp/irq-pxa168.c | |||
@@ -25,21 +25,21 @@ | |||
25 | #define PRIORITY_DEFAULT 0x1 | 25 | #define PRIORITY_DEFAULT 0x1 |
26 | #define PRIORITY_NONE 0x0 /* means IRQ disabled */ | 26 | #define PRIORITY_NONE 0x0 /* means IRQ disabled */ |
27 | 27 | ||
28 | static void icu_mask_irq(unsigned int irq) | 28 | static void icu_mask_irq(struct irq_data *d) |
29 | { | 29 | { |
30 | __raw_writel(PRIORITY_NONE, ICU_INT_CONF(irq)); | 30 | __raw_writel(PRIORITY_NONE, ICU_INT_CONF(d->irq)); |
31 | } | 31 | } |
32 | 32 | ||
33 | static void icu_unmask_irq(unsigned int irq) | 33 | static void icu_unmask_irq(struct irq_data *d) |
34 | { | 34 | { |
35 | __raw_writel(IRQ_ROUTE_TO_AP | PRIORITY_DEFAULT, ICU_INT_CONF(irq)); | 35 | __raw_writel(IRQ_ROUTE_TO_AP | PRIORITY_DEFAULT, ICU_INT_CONF(d->irq)); |
36 | } | 36 | } |
37 | 37 | ||
38 | static struct irq_chip icu_irq_chip = { | 38 | static struct irq_chip icu_irq_chip = { |
39 | .name = "icu_irq", | 39 | .name = "icu_irq", |
40 | .ack = icu_mask_irq, | 40 | .irq_ack = icu_mask_irq, |
41 | .mask = icu_mask_irq, | 41 | .irq_mask = icu_mask_irq, |
42 | .unmask = icu_unmask_irq, | 42 | .irq_unmask = icu_unmask_irq, |
43 | }; | 43 | }; |
44 | 44 | ||
45 | void __init icu_init_irq(void) | 45 | void __init icu_init_irq(void) |
@@ -47,7 +47,7 @@ void __init icu_init_irq(void) | |||
47 | int irq; | 47 | int irq; |
48 | 48 | ||
49 | for (irq = 0; irq < 64; irq++) { | 49 | for (irq = 0; irq < 64; irq++) { |
50 | icu_mask_irq(irq); | 50 | icu_mask_irq(irq_get_irq_data(irq)); |
51 | set_irq_chip(irq, &icu_irq_chip); | 51 | set_irq_chip(irq, &icu_irq_chip); |
52 | set_irq_handler(irq, handle_level_irq); | 52 | set_irq_handler(irq, handle_level_irq); |
53 | set_irq_flags(irq, IRQF_VALID); | 53 | set_irq_flags(irq, IRQF_VALID); |
diff --git a/arch/arm/mach-msm/board-qsd8x50.c b/arch/arm/mach-msm/board-qsd8x50.c index 2e8391307f5..6dde8185205 100644 --- a/arch/arm/mach-msm/board-qsd8x50.c +++ b/arch/arm/mach-msm/board-qsd8x50.c | |||
@@ -43,7 +43,7 @@ static const unsigned qsd8x50_surf_smc91x_gpio __initdata = 156; | |||
43 | * at run-time: they vary from board to board, and the true | 43 | * at run-time: they vary from board to board, and the true |
44 | * configuration won't be known until boot. | 44 | * configuration won't be known until boot. |
45 | */ | 45 | */ |
46 | static struct resource smc91x_resources[] __initdata = { | 46 | static struct resource smc91x_resources[] = { |
47 | [0] = { | 47 | [0] = { |
48 | .flags = IORESOURCE_MEM, | 48 | .flags = IORESOURCE_MEM, |
49 | }, | 49 | }, |
@@ -52,7 +52,7 @@ static struct resource smc91x_resources[] __initdata = { | |||
52 | }, | 52 | }, |
53 | }; | 53 | }; |
54 | 54 | ||
55 | static struct platform_device smc91x_device __initdata = { | 55 | static struct platform_device smc91x_device = { |
56 | .name = "smc91x", | 56 | .name = "smc91x", |
57 | .id = 0, | 57 | .id = 0, |
58 | .num_resources = ARRAY_SIZE(smc91x_resources), | 58 | .num_resources = ARRAY_SIZE(smc91x_resources), |
diff --git a/arch/arm/mach-msm/board-trout-gpio.c b/arch/arm/mach-msm/board-trout-gpio.c index f8c09ef6666..a604ec1e44b 100644 --- a/arch/arm/mach-msm/board-trout-gpio.c +++ b/arch/arm/mach-msm/board-trout-gpio.c | |||
@@ -113,52 +113,52 @@ static struct msm_gpio_chip msm_gpio_banks[] = { | |||
113 | TROUT_GPIO_BANK("VIRTUAL", 0x12, TROUT_GPIO_VIRTUAL_BASE, 0), | 113 | TROUT_GPIO_BANK("VIRTUAL", 0x12, TROUT_GPIO_VIRTUAL_BASE, 0), |
114 | }; | 114 | }; |
115 | 115 | ||
116 | static void trout_gpio_irq_ack(unsigned int irq) | 116 | static void trout_gpio_irq_ack(struct irq_data *d) |
117 | { | 117 | { |
118 | int bank = TROUT_INT_TO_BANK(irq); | 118 | int bank = TROUT_INT_TO_BANK(d->irq); |
119 | uint8_t mask = TROUT_INT_TO_MASK(irq); | 119 | uint8_t mask = TROUT_INT_TO_MASK(d->irq); |
120 | int reg = TROUT_BANK_TO_STAT_REG(bank); | 120 | int reg = TROUT_BANK_TO_STAT_REG(bank); |
121 | /*printk(KERN_INFO "trout_gpio_irq_ack irq %d\n", irq);*/ | 121 | /*printk(KERN_INFO "trout_gpio_irq_ack irq %d\n", d->irq);*/ |
122 | writeb(mask, TROUT_CPLD_BASE + reg); | 122 | writeb(mask, TROUT_CPLD_BASE + reg); |
123 | } | 123 | } |
124 | 124 | ||
125 | static void trout_gpio_irq_mask(unsigned int irq) | 125 | static void trout_gpio_irq_mask(struct irq_data *d) |
126 | { | 126 | { |
127 | unsigned long flags; | 127 | unsigned long flags; |
128 | uint8_t reg_val; | 128 | uint8_t reg_val; |
129 | int bank = TROUT_INT_TO_BANK(irq); | 129 | int bank = TROUT_INT_TO_BANK(d->irq); |
130 | uint8_t mask = TROUT_INT_TO_MASK(irq); | 130 | uint8_t mask = TROUT_INT_TO_MASK(d->irq); |
131 | int reg = TROUT_BANK_TO_MASK_REG(bank); | 131 | int reg = TROUT_BANK_TO_MASK_REG(bank); |
132 | 132 | ||
133 | local_irq_save(flags); | 133 | local_irq_save(flags); |
134 | reg_val = trout_int_mask[bank] |= mask; | 134 | reg_val = trout_int_mask[bank] |= mask; |
135 | /*printk(KERN_INFO "trout_gpio_irq_mask irq %d => %d:%02x\n", | 135 | /*printk(KERN_INFO "trout_gpio_irq_mask irq %d => %d:%02x\n", |
136 | irq, bank, reg_val);*/ | 136 | d->irq, bank, reg_val);*/ |
137 | writeb(reg_val, TROUT_CPLD_BASE + reg); | 137 | writeb(reg_val, TROUT_CPLD_BASE + reg); |
138 | local_irq_restore(flags); | 138 | local_irq_restore(flags); |
139 | } | 139 | } |
140 | 140 | ||
141 | static void trout_gpio_irq_unmask(unsigned int irq) | 141 | static void trout_gpio_irq_unmask(struct irq_data *d) |
142 | { | 142 | { |
143 | unsigned long flags; | 143 | unsigned long flags; |
144 | uint8_t reg_val; | 144 | uint8_t reg_val; |
145 | int bank = TROUT_INT_TO_BANK(irq); | 145 | int bank = TROUT_INT_TO_BANK(d->irq); |
146 | uint8_t mask = TROUT_INT_TO_MASK(irq); | 146 | uint8_t mask = TROUT_INT_TO_MASK(d->irq); |
147 | int reg = TROUT_BANK_TO_MASK_REG(bank); | 147 | int reg = TROUT_BANK_TO_MASK_REG(bank); |
148 | 148 | ||
149 | local_irq_save(flags); | 149 | local_irq_save(flags); |
150 | reg_val = trout_int_mask[bank] &= ~mask; | 150 | reg_val = trout_int_mask[bank] &= ~mask; |
151 | /*printk(KERN_INFO "trout_gpio_irq_unmask irq %d => %d:%02x\n", | 151 | /*printk(KERN_INFO "trout_gpio_irq_unmask irq %d => %d:%02x\n", |
152 | irq, bank, reg_val);*/ | 152 | d->irq, bank, reg_val);*/ |
153 | writeb(reg_val, TROUT_CPLD_BASE + reg); | 153 | writeb(reg_val, TROUT_CPLD_BASE + reg); |
154 | local_irq_restore(flags); | 154 | local_irq_restore(flags); |
155 | } | 155 | } |
156 | 156 | ||
157 | int trout_gpio_irq_set_wake(unsigned int irq, unsigned int on) | 157 | int trout_gpio_irq_set_wake(struct irq_data *d, unsigned int on) |
158 | { | 158 | { |
159 | unsigned long flags; | 159 | unsigned long flags; |
160 | int bank = TROUT_INT_TO_BANK(irq); | 160 | int bank = TROUT_INT_TO_BANK(d->irq); |
161 | uint8_t mask = TROUT_INT_TO_MASK(irq); | 161 | uint8_t mask = TROUT_INT_TO_MASK(d->irq); |
162 | 162 | ||
163 | local_irq_save(flags); | 163 | local_irq_save(flags); |
164 | if(on) | 164 | if(on) |
@@ -198,15 +198,15 @@ static void trout_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
198 | } | 198 | } |
199 | int_base += TROUT_INT_BANK0_COUNT; | 199 | int_base += TROUT_INT_BANK0_COUNT; |
200 | } | 200 | } |
201 | desc->chip->ack(irq); | 201 | desc->irq_data.chip->irq_ack(&desc->irq_data); |
202 | } | 202 | } |
203 | 203 | ||
204 | static struct irq_chip trout_gpio_irq_chip = { | 204 | static struct irq_chip trout_gpio_irq_chip = { |
205 | .name = "troutgpio", | 205 | .name = "troutgpio", |
206 | .ack = trout_gpio_irq_ack, | 206 | .irq_ack = trout_gpio_irq_ack, |
207 | .mask = trout_gpio_irq_mask, | 207 | .irq_mask = trout_gpio_irq_mask, |
208 | .unmask = trout_gpio_irq_unmask, | 208 | .irq_unmask = trout_gpio_irq_unmask, |
209 | .set_wake = trout_gpio_irq_set_wake, | 209 | .irq_set_wake = trout_gpio_irq_set_wake, |
210 | }; | 210 | }; |
211 | 211 | ||
212 | /* | 212 | /* |
diff --git a/arch/arm/mach-msm/gpio.c b/arch/arm/mach-msm/gpio.c index 33051b509e8..176af9dcb8e 100644 --- a/arch/arm/mach-msm/gpio.c +++ b/arch/arm/mach-msm/gpio.c | |||
@@ -225,21 +225,21 @@ struct msm_gpio_chip msm_gpio_chips[] = { | |||
225 | #endif | 225 | #endif |
226 | }; | 226 | }; |
227 | 227 | ||
228 | static void msm_gpio_irq_ack(unsigned int irq) | 228 | static void msm_gpio_irq_ack(struct irq_data *d) |
229 | { | 229 | { |
230 | unsigned long irq_flags; | 230 | unsigned long irq_flags; |
231 | struct msm_gpio_chip *msm_chip = get_irq_chip_data(irq); | 231 | struct msm_gpio_chip *msm_chip = irq_data_get_irq_chip_data(d); |
232 | spin_lock_irqsave(&msm_chip->lock, irq_flags); | 232 | spin_lock_irqsave(&msm_chip->lock, irq_flags); |
233 | msm_gpio_clear_detect_status(msm_chip, | 233 | msm_gpio_clear_detect_status(msm_chip, |
234 | irq - gpio_to_irq(msm_chip->chip.base)); | 234 | d->irq - gpio_to_irq(msm_chip->chip.base)); |
235 | spin_unlock_irqrestore(&msm_chip->lock, irq_flags); | 235 | spin_unlock_irqrestore(&msm_chip->lock, irq_flags); |
236 | } | 236 | } |
237 | 237 | ||
238 | static void msm_gpio_irq_mask(unsigned int irq) | 238 | static void msm_gpio_irq_mask(struct irq_data *d) |
239 | { | 239 | { |
240 | unsigned long irq_flags; | 240 | unsigned long irq_flags; |
241 | struct msm_gpio_chip *msm_chip = get_irq_chip_data(irq); | 241 | struct msm_gpio_chip *msm_chip = irq_data_get_irq_chip_data(d); |
242 | unsigned offset = irq - gpio_to_irq(msm_chip->chip.base); | 242 | unsigned offset = d->irq - gpio_to_irq(msm_chip->chip.base); |
243 | 243 | ||
244 | spin_lock_irqsave(&msm_chip->lock, irq_flags); | 244 | spin_lock_irqsave(&msm_chip->lock, irq_flags); |
245 | /* level triggered interrupts are also latched */ | 245 | /* level triggered interrupts are also latched */ |
@@ -250,11 +250,11 @@ static void msm_gpio_irq_mask(unsigned int irq) | |||
250 | spin_unlock_irqrestore(&msm_chip->lock, irq_flags); | 250 | spin_unlock_irqrestore(&msm_chip->lock, irq_flags); |
251 | } | 251 | } |
252 | 252 | ||
253 | static void msm_gpio_irq_unmask(unsigned int irq) | 253 | static void msm_gpio_irq_unmask(struct irq_data *d) |
254 | { | 254 | { |
255 | unsigned long irq_flags; | 255 | unsigned long irq_flags; |
256 | struct msm_gpio_chip *msm_chip = get_irq_chip_data(irq); | 256 | struct msm_gpio_chip *msm_chip = irq_data_get_irq_chip_data(d); |
257 | unsigned offset = irq - gpio_to_irq(msm_chip->chip.base); | 257 | unsigned offset = d->irq - gpio_to_irq(msm_chip->chip.base); |
258 | 258 | ||
259 | spin_lock_irqsave(&msm_chip->lock, irq_flags); | 259 | spin_lock_irqsave(&msm_chip->lock, irq_flags); |
260 | /* level triggered interrupts are also latched */ | 260 | /* level triggered interrupts are also latched */ |
@@ -265,11 +265,11 @@ static void msm_gpio_irq_unmask(unsigned int irq) | |||
265 | spin_unlock_irqrestore(&msm_chip->lock, irq_flags); | 265 | spin_unlock_irqrestore(&msm_chip->lock, irq_flags); |
266 | } | 266 | } |
267 | 267 | ||
268 | static int msm_gpio_irq_set_wake(unsigned int irq, unsigned int on) | 268 | static int msm_gpio_irq_set_wake(struct irq_data *d, unsigned int on) |
269 | { | 269 | { |
270 | unsigned long irq_flags; | 270 | unsigned long irq_flags; |
271 | struct msm_gpio_chip *msm_chip = get_irq_chip_data(irq); | 271 | struct msm_gpio_chip *msm_chip = irq_data_get_irq_chip_data(d); |
272 | unsigned offset = irq - gpio_to_irq(msm_chip->chip.base); | 272 | unsigned offset = d->irq - gpio_to_irq(msm_chip->chip.base); |
273 | 273 | ||
274 | spin_lock_irqsave(&msm_chip->lock, irq_flags); | 274 | spin_lock_irqsave(&msm_chip->lock, irq_flags); |
275 | 275 | ||
@@ -282,21 +282,21 @@ static int msm_gpio_irq_set_wake(unsigned int irq, unsigned int on) | |||
282 | return 0; | 282 | return 0; |
283 | } | 283 | } |
284 | 284 | ||
285 | static int msm_gpio_irq_set_type(unsigned int irq, unsigned int flow_type) | 285 | static int msm_gpio_irq_set_type(struct irq_data *d, unsigned int flow_type) |
286 | { | 286 | { |
287 | unsigned long irq_flags; | 287 | unsigned long irq_flags; |
288 | struct msm_gpio_chip *msm_chip = get_irq_chip_data(irq); | 288 | struct msm_gpio_chip *msm_chip = irq_data_get_irq_chip_data(d); |
289 | unsigned offset = irq - gpio_to_irq(msm_chip->chip.base); | 289 | unsigned offset = d->irq - gpio_to_irq(msm_chip->chip.base); |
290 | unsigned val, mask = BIT(offset); | 290 | unsigned val, mask = BIT(offset); |
291 | 291 | ||
292 | spin_lock_irqsave(&msm_chip->lock, irq_flags); | 292 | spin_lock_irqsave(&msm_chip->lock, irq_flags); |
293 | val = readl(msm_chip->regs.int_edge); | 293 | val = readl(msm_chip->regs.int_edge); |
294 | if (flow_type & IRQ_TYPE_EDGE_BOTH) { | 294 | if (flow_type & IRQ_TYPE_EDGE_BOTH) { |
295 | writel(val | mask, msm_chip->regs.int_edge); | 295 | writel(val | mask, msm_chip->regs.int_edge); |
296 | irq_desc[irq].handle_irq = handle_edge_irq; | 296 | irq_desc[d->irq].handle_irq = handle_edge_irq; |
297 | } else { | 297 | } else { |
298 | writel(val & ~mask, msm_chip->regs.int_edge); | 298 | writel(val & ~mask, msm_chip->regs.int_edge); |
299 | irq_desc[irq].handle_irq = handle_level_irq; | 299 | irq_desc[d->irq].handle_irq = handle_level_irq; |
300 | } | 300 | } |
301 | if ((flow_type & IRQ_TYPE_EDGE_BOTH) == IRQ_TYPE_EDGE_BOTH) { | 301 | if ((flow_type & IRQ_TYPE_EDGE_BOTH) == IRQ_TYPE_EDGE_BOTH) { |
302 | msm_chip->both_edge_detect |= mask; | 302 | msm_chip->both_edge_detect |= mask; |
@@ -333,16 +333,16 @@ static void msm_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
333 | msm_chip->chip.base + j); | 333 | msm_chip->chip.base + j); |
334 | } | 334 | } |
335 | } | 335 | } |
336 | desc->chip->ack(irq); | 336 | desc->irq_data.chip->irq_ack(&desc->irq_data); |
337 | } | 337 | } |
338 | 338 | ||
339 | static struct irq_chip msm_gpio_irq_chip = { | 339 | static struct irq_chip msm_gpio_irq_chip = { |
340 | .name = "msmgpio", | 340 | .name = "msmgpio", |
341 | .ack = msm_gpio_irq_ack, | 341 | .irq_ack = msm_gpio_irq_ack, |
342 | .mask = msm_gpio_irq_mask, | 342 | .irq_mask = msm_gpio_irq_mask, |
343 | .unmask = msm_gpio_irq_unmask, | 343 | .irq_unmask = msm_gpio_irq_unmask, |
344 | .set_wake = msm_gpio_irq_set_wake, | 344 | .irq_set_wake = msm_gpio_irq_set_wake, |
345 | .set_type = msm_gpio_irq_set_type, | 345 | .irq_set_type = msm_gpio_irq_set_type, |
346 | }; | 346 | }; |
347 | 347 | ||
348 | static int __init msm_init_gpio(void) | 348 | static int __init msm_init_gpio(void) |
diff --git a/arch/arm/mach-msm/irq-vic.c b/arch/arm/mach-msm/irq-vic.c index 99f2c347303..68c28bbdc96 100644 --- a/arch/arm/mach-msm/irq-vic.c +++ b/arch/arm/mach-msm/irq-vic.c | |||
@@ -226,19 +226,18 @@ static inline void msm_irq_write_all_regs(void __iomem *base, unsigned int val) | |||
226 | writel(val, base + (i * 4)); | 226 | writel(val, base + (i * 4)); |
227 | } | 227 | } |
228 | 228 | ||
229 | static void msm_irq_ack(unsigned int irq) | 229 | static void msm_irq_ack(struct irq_data *d) |
230 | { | 230 | { |
231 | void __iomem *reg = VIC_INT_TO_REG_ADDR(VIC_INT_CLEAR0, irq); | 231 | void __iomem *reg = VIC_INT_TO_REG_ADDR(VIC_INT_CLEAR0, d->irq); |
232 | irq = 1 << (irq & 31); | 232 | writel(1 << (d->irq & 31), reg); |
233 | writel(irq, reg); | ||
234 | } | 233 | } |
235 | 234 | ||
236 | static void msm_irq_mask(unsigned int irq) | 235 | static void msm_irq_mask(struct irq_data *d) |
237 | { | 236 | { |
238 | void __iomem *reg = VIC_INT_TO_REG_ADDR(VIC_INT_ENCLEAR0, irq); | 237 | void __iomem *reg = VIC_INT_TO_REG_ADDR(VIC_INT_ENCLEAR0, d->irq); |
239 | unsigned index = VIC_INT_TO_REG_INDEX(irq); | 238 | unsigned index = VIC_INT_TO_REG_INDEX(d->irq); |
240 | uint32_t mask = 1UL << (irq & 31); | 239 | uint32_t mask = 1UL << (d->irq & 31); |
241 | int smsm_irq = msm_irq_to_smsm[irq]; | 240 | int smsm_irq = msm_irq_to_smsm[d->irq]; |
242 | 241 | ||
243 | msm_irq_shadow_reg[index].int_en[0] &= ~mask; | 242 | msm_irq_shadow_reg[index].int_en[0] &= ~mask; |
244 | writel(mask, reg); | 243 | writel(mask, reg); |
@@ -250,12 +249,12 @@ static void msm_irq_mask(unsigned int irq) | |||
250 | } | 249 | } |
251 | } | 250 | } |
252 | 251 | ||
253 | static void msm_irq_unmask(unsigned int irq) | 252 | static void msm_irq_unmask(struct irq_data *d) |
254 | { | 253 | { |
255 | void __iomem *reg = VIC_INT_TO_REG_ADDR(VIC_INT_ENSET0, irq); | 254 | void __iomem *reg = VIC_INT_TO_REG_ADDR(VIC_INT_ENSET0, d->irq); |
256 | unsigned index = VIC_INT_TO_REG_INDEX(irq); | 255 | unsigned index = VIC_INT_TO_REG_INDEX(d->irq); |
257 | uint32_t mask = 1UL << (irq & 31); | 256 | uint32_t mask = 1UL << (d->irq & 31); |
258 | int smsm_irq = msm_irq_to_smsm[irq]; | 257 | int smsm_irq = msm_irq_to_smsm[d->irq]; |
259 | 258 | ||
260 | msm_irq_shadow_reg[index].int_en[0] |= mask; | 259 | msm_irq_shadow_reg[index].int_en[0] |= mask; |
261 | writel(mask, reg); | 260 | writel(mask, reg); |
@@ -268,14 +267,14 @@ static void msm_irq_unmask(unsigned int irq) | |||
268 | } | 267 | } |
269 | } | 268 | } |
270 | 269 | ||
271 | static int msm_irq_set_wake(unsigned int irq, unsigned int on) | 270 | static int msm_irq_set_wake(struct irq_data *d, unsigned int on) |
272 | { | 271 | { |
273 | unsigned index = VIC_INT_TO_REG_INDEX(irq); | 272 | unsigned index = VIC_INT_TO_REG_INDEX(d->irq); |
274 | uint32_t mask = 1UL << (irq & 31); | 273 | uint32_t mask = 1UL << (d->irq & 31); |
275 | int smsm_irq = msm_irq_to_smsm[irq]; | 274 | int smsm_irq = msm_irq_to_smsm[d->irq]; |
276 | 275 | ||
277 | if (smsm_irq == 0) { | 276 | if (smsm_irq == 0) { |
278 | printk(KERN_ERR "msm_irq_set_wake: bad wakeup irq %d\n", irq); | 277 | printk(KERN_ERR "msm_irq_set_wake: bad wakeup irq %d\n", d->irq); |
279 | return -EINVAL; | 278 | return -EINVAL; |
280 | } | 279 | } |
281 | if (on) | 280 | if (on) |
@@ -294,12 +293,12 @@ static int msm_irq_set_wake(unsigned int irq, unsigned int on) | |||
294 | return 0; | 293 | return 0; |
295 | } | 294 | } |
296 | 295 | ||
297 | static int msm_irq_set_type(unsigned int irq, unsigned int flow_type) | 296 | static int msm_irq_set_type(struct irq_data *d, unsigned int flow_type) |
298 | { | 297 | { |
299 | void __iomem *treg = VIC_INT_TO_REG_ADDR(VIC_INT_TYPE0, irq); | 298 | void __iomem *treg = VIC_INT_TO_REG_ADDR(VIC_INT_TYPE0, d->irq); |
300 | void __iomem *preg = VIC_INT_TO_REG_ADDR(VIC_INT_POLARITY0, irq); | 299 | void __iomem *preg = VIC_INT_TO_REG_ADDR(VIC_INT_POLARITY0, d->irq); |
301 | unsigned index = VIC_INT_TO_REG_INDEX(irq); | 300 | unsigned index = VIC_INT_TO_REG_INDEX(d->irq); |
302 | int b = 1 << (irq & 31); | 301 | int b = 1 << (d->irq & 31); |
303 | uint32_t polarity; | 302 | uint32_t polarity; |
304 | uint32_t type; | 303 | uint32_t type; |
305 | 304 | ||
@@ -314,11 +313,11 @@ static int msm_irq_set_type(unsigned int irq, unsigned int flow_type) | |||
314 | type = msm_irq_shadow_reg[index].int_type; | 313 | type = msm_irq_shadow_reg[index].int_type; |
315 | if (flow_type & (IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING)) { | 314 | if (flow_type & (IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING)) { |
316 | type |= b; | 315 | type |= b; |
317 | irq_desc[irq].handle_irq = handle_edge_irq; | 316 | irq_desc[d->irq].handle_irq = handle_edge_irq; |
318 | } | 317 | } |
319 | if (flow_type & (IRQF_TRIGGER_HIGH | IRQF_TRIGGER_LOW)) { | 318 | if (flow_type & (IRQF_TRIGGER_HIGH | IRQF_TRIGGER_LOW)) { |
320 | type &= ~b; | 319 | type &= ~b; |
321 | irq_desc[irq].handle_irq = handle_level_irq; | 320 | irq_desc[d->irq].handle_irq = handle_level_irq; |
322 | } | 321 | } |
323 | writel(type, treg); | 322 | writel(type, treg); |
324 | msm_irq_shadow_reg[index].int_type = type; | 323 | msm_irq_shadow_reg[index].int_type = type; |
@@ -326,13 +325,13 @@ static int msm_irq_set_type(unsigned int irq, unsigned int flow_type) | |||
326 | } | 325 | } |
327 | 326 | ||
328 | static struct irq_chip msm_irq_chip = { | 327 | static struct irq_chip msm_irq_chip = { |
329 | .name = "msm", | 328 | .name = "msm", |
330 | .disable = msm_irq_mask, | 329 | .irq_disable = msm_irq_mask, |
331 | .ack = msm_irq_ack, | 330 | .irq_ack = msm_irq_ack, |
332 | .mask = msm_irq_mask, | 331 | .irq_mask = msm_irq_mask, |
333 | .unmask = msm_irq_unmask, | 332 | .irq_unmask = msm_irq_unmask, |
334 | .set_wake = msm_irq_set_wake, | 333 | .irq_set_wake = msm_irq_set_wake, |
335 | .set_type = msm_irq_set_type, | 334 | .irq_set_type = msm_irq_set_type, |
336 | }; | 335 | }; |
337 | 336 | ||
338 | void __init msm_init_irq(void) | 337 | void __init msm_init_irq(void) |
diff --git a/arch/arm/mach-msm/irq.c b/arch/arm/mach-msm/irq.c index 6c8d5f8caef..0b27d899f40 100644 --- a/arch/arm/mach-msm/irq.c +++ b/arch/arm/mach-msm/irq.c | |||
@@ -64,35 +64,34 @@ | |||
64 | #define VIC_VECTPRIORITY(n) VIC_REG(0x0200+((n) * 4)) | 64 | #define VIC_VECTPRIORITY(n) VIC_REG(0x0200+((n) * 4)) |
65 | #define VIC_VECTADDR(n) VIC_REG(0x0400+((n) * 4)) | 65 | #define VIC_VECTADDR(n) VIC_REG(0x0400+((n) * 4)) |
66 | 66 | ||
67 | static void msm_irq_ack(unsigned int irq) | 67 | static void msm_irq_ack(struct irq_data *d) |
68 | { | 68 | { |
69 | void __iomem *reg = VIC_INT_CLEAR0 + ((irq & 32) ? 4 : 0); | 69 | void __iomem *reg = VIC_INT_CLEAR0 + ((d->irq & 32) ? 4 : 0); |
70 | irq = 1 << (irq & 31); | 70 | writel(1 << (d->irq & 31), reg); |
71 | writel(irq, reg); | ||
72 | } | 71 | } |
73 | 72 | ||
74 | static void msm_irq_mask(unsigned int irq) | 73 | static void msm_irq_mask(struct irq_data *d) |
75 | { | 74 | { |
76 | void __iomem *reg = VIC_INT_ENCLEAR0 + ((irq & 32) ? 4 : 0); | 75 | void __iomem *reg = VIC_INT_ENCLEAR0 + ((d->irq & 32) ? 4 : 0); |
77 | writel(1 << (irq & 31), reg); | 76 | writel(1 << (d->irq & 31), reg); |
78 | } | 77 | } |
79 | 78 | ||
80 | static void msm_irq_unmask(unsigned int irq) | 79 | static void msm_irq_unmask(struct irq_data *d) |
81 | { | 80 | { |
82 | void __iomem *reg = VIC_INT_ENSET0 + ((irq & 32) ? 4 : 0); | 81 | void __iomem *reg = VIC_INT_ENSET0 + ((d->irq & 32) ? 4 : 0); |
83 | writel(1 << (irq & 31), reg); | 82 | writel(1 << (d->irq & 31), reg); |
84 | } | 83 | } |
85 | 84 | ||
86 | static int msm_irq_set_wake(unsigned int irq, unsigned int on) | 85 | static int msm_irq_set_wake(struct irq_data *d, unsigned int on) |
87 | { | 86 | { |
88 | return -EINVAL; | 87 | return -EINVAL; |
89 | } | 88 | } |
90 | 89 | ||
91 | static int msm_irq_set_type(unsigned int irq, unsigned int flow_type) | 90 | static int msm_irq_set_type(struct irq_data *d, unsigned int flow_type) |
92 | { | 91 | { |
93 | void __iomem *treg = VIC_INT_TYPE0 + ((irq & 32) ? 4 : 0); | 92 | void __iomem *treg = VIC_INT_TYPE0 + ((d->irq & 32) ? 4 : 0); |
94 | void __iomem *preg = VIC_INT_POLARITY0 + ((irq & 32) ? 4 : 0); | 93 | void __iomem *preg = VIC_INT_POLARITY0 + ((d->irq & 32) ? 4 : 0); |
95 | int b = 1 << (irq & 31); | 94 | int b = 1 << (d->irq & 31); |
96 | 95 | ||
97 | if (flow_type & (IRQF_TRIGGER_FALLING | IRQF_TRIGGER_LOW)) | 96 | if (flow_type & (IRQF_TRIGGER_FALLING | IRQF_TRIGGER_LOW)) |
98 | writel(readl(preg) | b, preg); | 97 | writel(readl(preg) | b, preg); |
@@ -101,22 +100,22 @@ static int msm_irq_set_type(unsigned int irq, unsigned int flow_type) | |||
101 | 100 | ||
102 | if (flow_type & (IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING)) { | 101 | if (flow_type & (IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING)) { |
103 | writel(readl(treg) | b, treg); | 102 | writel(readl(treg) | b, treg); |
104 | irq_desc[irq].handle_irq = handle_edge_irq; | 103 | irq_desc[d->irq].handle_irq = handle_edge_irq; |
105 | } | 104 | } |
106 | if (flow_type & (IRQF_TRIGGER_HIGH | IRQF_TRIGGER_LOW)) { | 105 | if (flow_type & (IRQF_TRIGGER_HIGH | IRQF_TRIGGER_LOW)) { |
107 | writel(readl(treg) & (~b), treg); | 106 | writel(readl(treg) & (~b), treg); |
108 | irq_desc[irq].handle_irq = handle_level_irq; | 107 | irq_desc[d->irq].handle_irq = handle_level_irq; |
109 | } | 108 | } |
110 | return 0; | 109 | return 0; |
111 | } | 110 | } |
112 | 111 | ||
113 | static struct irq_chip msm_irq_chip = { | 112 | static struct irq_chip msm_irq_chip = { |
114 | .name = "msm", | 113 | .name = "msm", |
115 | .ack = msm_irq_ack, | 114 | .irq_ack = msm_irq_ack, |
116 | .mask = msm_irq_mask, | 115 | .irq_mask = msm_irq_mask, |
117 | .unmask = msm_irq_unmask, | 116 | .irq_unmask = msm_irq_unmask, |
118 | .set_wake = msm_irq_set_wake, | 117 | .irq_set_wake = msm_irq_set_wake, |
119 | .set_type = msm_irq_set_type, | 118 | .irq_set_type = msm_irq_set_type, |
120 | }; | 119 | }; |
121 | 120 | ||
122 | void __init msm_init_irq(void) | 121 | void __init msm_init_irq(void) |
diff --git a/arch/arm/mach-msm/sirc.c b/arch/arm/mach-msm/sirc.c index 152eefda3ce..11b54c7aeb0 100644 --- a/arch/arm/mach-msm/sirc.c +++ b/arch/arm/mach-msm/sirc.c | |||
@@ -42,12 +42,11 @@ static struct sirc_cascade_regs sirc_reg_table[] = { | |||
42 | 42 | ||
43 | /* Mask off the given interrupt. Keep the int_enable mask in sync with | 43 | /* Mask off the given interrupt. Keep the int_enable mask in sync with |
44 | the enable reg, so it can be restored after power collapse. */ | 44 | the enable reg, so it can be restored after power collapse. */ |
45 | static void sirc_irq_mask(unsigned int irq) | 45 | static void sirc_irq_mask(struct irq_data *d) |
46 | { | 46 | { |
47 | unsigned int mask; | 47 | unsigned int mask; |
48 | 48 | ||
49 | 49 | mask = 1 << (d->irq - FIRST_SIRC_IRQ); | |
50 | mask = 1 << (irq - FIRST_SIRC_IRQ); | ||
51 | writel(mask, sirc_regs.int_enable_clear); | 50 | writel(mask, sirc_regs.int_enable_clear); |
52 | int_enable &= ~mask; | 51 | int_enable &= ~mask; |
53 | return; | 52 | return; |
@@ -55,31 +54,31 @@ static void sirc_irq_mask(unsigned int irq) | |||
55 | 54 | ||
56 | /* Unmask the given interrupt. Keep the int_enable mask in sync with | 55 | /* Unmask the given interrupt. Keep the int_enable mask in sync with |
57 | the enable reg, so it can be restored after power collapse. */ | 56 | the enable reg, so it can be restored after power collapse. */ |
58 | static void sirc_irq_unmask(unsigned int irq) | 57 | static void sirc_irq_unmask(struct irq_data *d) |
59 | { | 58 | { |
60 | unsigned int mask; | 59 | unsigned int mask; |
61 | 60 | ||
62 | mask = 1 << (irq - FIRST_SIRC_IRQ); | 61 | mask = 1 << (d->irq - FIRST_SIRC_IRQ); |
63 | writel(mask, sirc_regs.int_enable_set); | 62 | writel(mask, sirc_regs.int_enable_set); |
64 | int_enable |= mask; | 63 | int_enable |= mask; |
65 | return; | 64 | return; |
66 | } | 65 | } |
67 | 66 | ||
68 | static void sirc_irq_ack(unsigned int irq) | 67 | static void sirc_irq_ack(struct irq_data *d) |
69 | { | 68 | { |
70 | unsigned int mask; | 69 | unsigned int mask; |
71 | 70 | ||
72 | mask = 1 << (irq - FIRST_SIRC_IRQ); | 71 | mask = 1 << (d->irq - FIRST_SIRC_IRQ); |
73 | writel(mask, sirc_regs.int_clear); | 72 | writel(mask, sirc_regs.int_clear); |
74 | return; | 73 | return; |
75 | } | 74 | } |
76 | 75 | ||
77 | static int sirc_irq_set_wake(unsigned int irq, unsigned int on) | 76 | static int sirc_irq_set_wake(struct irq_data *d, unsigned int on) |
78 | { | 77 | { |
79 | unsigned int mask; | 78 | unsigned int mask; |
80 | 79 | ||
81 | /* Used to set the interrupt enable mask during power collapse. */ | 80 | /* Used to set the interrupt enable mask during power collapse. */ |
82 | mask = 1 << (irq - FIRST_SIRC_IRQ); | 81 | mask = 1 << (d->irq - FIRST_SIRC_IRQ); |
83 | if (on) | 82 | if (on) |
84 | wake_enable |= mask; | 83 | wake_enable |= mask; |
85 | else | 84 | else |
@@ -88,12 +87,12 @@ static int sirc_irq_set_wake(unsigned int irq, unsigned int on) | |||
88 | return 0; | 87 | return 0; |
89 | } | 88 | } |
90 | 89 | ||
91 | static int sirc_irq_set_type(unsigned int irq, unsigned int flow_type) | 90 | static int sirc_irq_set_type(struct irq_data *d, unsigned int flow_type) |
92 | { | 91 | { |
93 | unsigned int mask; | 92 | unsigned int mask; |
94 | unsigned int val; | 93 | unsigned int val; |
95 | 94 | ||
96 | mask = 1 << (irq - FIRST_SIRC_IRQ); | 95 | mask = 1 << (d->irq - FIRST_SIRC_IRQ); |
97 | val = readl(sirc_regs.int_polarity); | 96 | val = readl(sirc_regs.int_polarity); |
98 | 97 | ||
99 | if (flow_type & (IRQF_TRIGGER_LOW | IRQF_TRIGGER_FALLING)) | 98 | if (flow_type & (IRQF_TRIGGER_LOW | IRQF_TRIGGER_FALLING)) |
@@ -106,10 +105,10 @@ static int sirc_irq_set_type(unsigned int irq, unsigned int flow_type) | |||
106 | val = readl(sirc_regs.int_type); | 105 | val = readl(sirc_regs.int_type); |
107 | if (flow_type & (IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING)) { | 106 | if (flow_type & (IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING)) { |
108 | val |= mask; | 107 | val |= mask; |
109 | irq_desc[irq].handle_irq = handle_edge_irq; | 108 | irq_desc[d->irq].handle_irq = handle_edge_irq; |
110 | } else { | 109 | } else { |
111 | val &= ~mask; | 110 | val &= ~mask; |
112 | irq_desc[irq].handle_irq = handle_level_irq; | 111 | irq_desc[d->irq].handle_irq = handle_level_irq; |
113 | } | 112 | } |
114 | 113 | ||
115 | writel(val, sirc_regs.int_type); | 114 | writel(val, sirc_regs.int_type); |
@@ -139,16 +138,16 @@ static void sirc_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
139 | ; | 138 | ; |
140 | generic_handle_irq(sirq+FIRST_SIRC_IRQ); | 139 | generic_handle_irq(sirq+FIRST_SIRC_IRQ); |
141 | 140 | ||
142 | desc->chip->ack(irq); | 141 | desc->irq_data.chip->irq_ack(&desc->irq_data); |
143 | } | 142 | } |
144 | 143 | ||
145 | static struct irq_chip sirc_irq_chip = { | 144 | static struct irq_chip sirc_irq_chip = { |
146 | .name = "sirc", | 145 | .name = "sirc", |
147 | .ack = sirc_irq_ack, | 146 | .irq_ack = sirc_irq_ack, |
148 | .mask = sirc_irq_mask, | 147 | .irq_mask = sirc_irq_mask, |
149 | .unmask = sirc_irq_unmask, | 148 | .irq_unmask = sirc_irq_unmask, |
150 | .set_wake = sirc_irq_set_wake, | 149 | .irq_set_wake = sirc_irq_set_wake, |
151 | .set_type = sirc_irq_set_type, | 150 | .irq_set_type = sirc_irq_set_type, |
152 | }; | 151 | }; |
153 | 152 | ||
154 | void __init msm_init_sirc(void) | 153 | void __init msm_init_sirc(void) |
diff --git a/arch/arm/mach-mx3/mach-mx31_3ds.c b/arch/arm/mach-mx3/mach-mx31_3ds.c index 899a969e92f..0d65db885be 100644 --- a/arch/arm/mach-mx3/mach-mx31_3ds.c +++ b/arch/arm/mach-mx3/mach-mx31_3ds.c | |||
@@ -147,10 +147,10 @@ static struct mc13783_regulator_init_data mx31_3ds_regulators[] = { | |||
147 | .init_data = &pwgtx_init, | 147 | .init_data = &pwgtx_init, |
148 | }, { | 148 | }, { |
149 | 149 | ||
150 | .id = MC13783_REGU_GPO1, /* Turn on 1.8V */ | 150 | .id = MC13783_REG_GPO1, /* Turn on 1.8V */ |
151 | .init_data = &gpo_init, | 151 | .init_data = &gpo_init, |
152 | }, { | 152 | }, { |
153 | .id = MC13783_REGU_GPO3, /* Turn on 3.3V */ | 153 | .id = MC13783_REG_GPO3, /* Turn on 3.3V */ |
154 | .init_data = &gpo_init, | 154 | .init_data = &gpo_init, |
155 | }, | 155 | }, |
156 | }; | 156 | }; |
diff --git a/arch/arm/mach-mx3/mach-mx31ads.c b/arch/arm/mach-mx3/mach-mx31ads.c index b993b9bf617..88b97d62b57 100644 --- a/arch/arm/mach-mx3/mach-mx31ads.c +++ b/arch/arm/mach-mx3/mach-mx31ads.c | |||
@@ -162,9 +162,9 @@ static void mx31ads_expio_irq_handler(u32 irq, struct irq_desc *desc) | |||
162 | * Disable an expio pin's interrupt by setting the bit in the imr. | 162 | * Disable an expio pin's interrupt by setting the bit in the imr. |
163 | * @param irq an expio virtual irq number | 163 | * @param irq an expio virtual irq number |
164 | */ | 164 | */ |
165 | static void expio_mask_irq(u32 irq) | 165 | static void expio_mask_irq(struct irq_data *d) |
166 | { | 166 | { |
167 | u32 expio = MXC_IRQ_TO_EXPIO(irq); | 167 | u32 expio = MXC_IRQ_TO_EXPIO(d->irq); |
168 | /* mask the interrupt */ | 168 | /* mask the interrupt */ |
169 | __raw_writew(1 << expio, PBC_INTMASK_CLEAR_REG); | 169 | __raw_writew(1 << expio, PBC_INTMASK_CLEAR_REG); |
170 | __raw_readw(PBC_INTMASK_CLEAR_REG); | 170 | __raw_readw(PBC_INTMASK_CLEAR_REG); |
@@ -174,9 +174,9 @@ static void expio_mask_irq(u32 irq) | |||
174 | * Acknowledge an expanded io pin's interrupt by clearing the bit in the isr. | 174 | * Acknowledge an expanded io pin's interrupt by clearing the bit in the isr. |
175 | * @param irq an expanded io virtual irq number | 175 | * @param irq an expanded io virtual irq number |
176 | */ | 176 | */ |
177 | static void expio_ack_irq(u32 irq) | 177 | static void expio_ack_irq(struct irq_data *d) |
178 | { | 178 | { |
179 | u32 expio = MXC_IRQ_TO_EXPIO(irq); | 179 | u32 expio = MXC_IRQ_TO_EXPIO(d->irq); |
180 | /* clear the interrupt status */ | 180 | /* clear the interrupt status */ |
181 | __raw_writew(1 << expio, PBC_INTSTATUS_REG); | 181 | __raw_writew(1 << expio, PBC_INTSTATUS_REG); |
182 | } | 182 | } |
@@ -185,18 +185,18 @@ static void expio_ack_irq(u32 irq) | |||
185 | * Enable a expio pin's interrupt by clearing the bit in the imr. | 185 | * Enable a expio pin's interrupt by clearing the bit in the imr. |
186 | * @param irq a expio virtual irq number | 186 | * @param irq a expio virtual irq number |
187 | */ | 187 | */ |
188 | static void expio_unmask_irq(u32 irq) | 188 | static void expio_unmask_irq(struct irq_data *d) |
189 | { | 189 | { |
190 | u32 expio = MXC_IRQ_TO_EXPIO(irq); | 190 | u32 expio = MXC_IRQ_TO_EXPIO(d->irq); |
191 | /* unmask the interrupt */ | 191 | /* unmask the interrupt */ |
192 | __raw_writew(1 << expio, PBC_INTMASK_SET_REG); | 192 | __raw_writew(1 << expio, PBC_INTMASK_SET_REG); |
193 | } | 193 | } |
194 | 194 | ||
195 | static struct irq_chip expio_irq_chip = { | 195 | static struct irq_chip expio_irq_chip = { |
196 | .name = "EXPIO(CPLD)", | 196 | .name = "EXPIO(CPLD)", |
197 | .ack = expio_ack_irq, | 197 | .irq_ack = expio_ack_irq, |
198 | .mask = expio_mask_irq, | 198 | .irq_mask = expio_mask_irq, |
199 | .unmask = expio_unmask_irq, | 199 | .irq_unmask = expio_unmask_irq, |
200 | }; | 200 | }; |
201 | 201 | ||
202 | static void __init mx31ads_init_expio(void) | 202 | static void __init mx31ads_init_expio(void) |
diff --git a/arch/arm/mach-mx5/Kconfig b/arch/arm/mach-mx5/Kconfig index 55254b6e946..de4fa992fc3 100644 --- a/arch/arm/mach-mx5/Kconfig +++ b/arch/arm/mach-mx5/Kconfig | |||
@@ -50,6 +50,7 @@ config MACH_MX51_BABBAGE | |||
50 | config MACH_MX51_3DS | 50 | config MACH_MX51_3DS |
51 | bool "Support MX51PDK (3DS)" | 51 | bool "Support MX51PDK (3DS)" |
52 | select SOC_IMX51 | 52 | select SOC_IMX51 |
53 | select IMX_HAVE_PLATFORM_IMX_KEYPAD | ||
53 | select IMX_HAVE_PLATFORM_IMX_UART | 54 | select IMX_HAVE_PLATFORM_IMX_UART |
54 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | 55 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX |
55 | select IMX_HAVE_PLATFORM_SPI_IMX | 56 | select IMX_HAVE_PLATFORM_SPI_IMX |
@@ -77,6 +78,7 @@ choice | |||
77 | config MACH_EUKREA_MBIMX51_BASEBOARD | 78 | config MACH_EUKREA_MBIMX51_BASEBOARD |
78 | prompt "Eukrea MBIMX51 development board" | 79 | prompt "Eukrea MBIMX51 development board" |
79 | bool | 80 | bool |
81 | select IMX_HAVE_PLATFORM_IMX_KEYPAD | ||
80 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | 82 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX |
81 | help | 83 | help |
82 | This adds board specific devices that can be found on Eukrea's | 84 | This adds board specific devices that can be found on Eukrea's |
@@ -124,10 +126,28 @@ config MACH_MX53_EVK | |||
124 | bool "Support MX53 EVK platforms" | 126 | bool "Support MX53 EVK platforms" |
125 | select SOC_IMX53 | 127 | select SOC_IMX53 |
126 | select IMX_HAVE_PLATFORM_IMX_UART | 128 | select IMX_HAVE_PLATFORM_IMX_UART |
129 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
130 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | ||
131 | select IMX_HAVE_PLATFORM_SPI_IMX | ||
127 | help | 132 | help |
128 | Include support for MX53 EVK platform. This includes specific | 133 | Include support for MX53 EVK platform. This includes specific |
129 | configurations for the board and its peripherals. | 134 | configurations for the board and its peripherals. |
130 | 135 | ||
136 | config MACH_MX53_SMD | ||
137 | bool "Support MX53 SMD platforms" | ||
138 | select SOC_IMX53 | ||
139 | select IMX_HAVE_PLATFORM_IMX_UART | ||
140 | help | ||
141 | Include support for MX53 SMD platform. This includes specific | ||
142 | configurations for the board and its peripherals. | ||
143 | |||
144 | config MACH_MX53_LOCO | ||
145 | bool "Support MX53 LOCO platforms" | ||
146 | select SOC_IMX53 | ||
147 | select IMX_HAVE_PLATFORM_IMX_UART | ||
148 | help | ||
149 | Include support for MX53 LOCO platform. This includes specific | ||
150 | configurations for the board and its peripherals. | ||
131 | 151 | ||
132 | config MACH_MX50_RDP | 152 | config MACH_MX50_RDP |
133 | bool "Support MX50 reference design platform" | 153 | bool "Support MX50 reference design platform" |
diff --git a/arch/arm/mach-mx5/Makefile b/arch/arm/mach-mx5/Makefile index 0c398baf11f..0d43be98e51 100644 --- a/arch/arm/mach-mx5/Makefile +++ b/arch/arm/mach-mx5/Makefile | |||
@@ -10,6 +10,8 @@ obj-$(CONFIG_CPU_FREQ_IMX) += cpu_op-mx51.o | |||
10 | obj-$(CONFIG_MACH_MX51_BABBAGE) += board-mx51_babbage.o | 10 | obj-$(CONFIG_MACH_MX51_BABBAGE) += board-mx51_babbage.o |
11 | obj-$(CONFIG_MACH_MX51_3DS) += board-mx51_3ds.o | 11 | obj-$(CONFIG_MACH_MX51_3DS) += board-mx51_3ds.o |
12 | obj-$(CONFIG_MACH_MX53_EVK) += board-mx53_evk.o | 12 | obj-$(CONFIG_MACH_MX53_EVK) += board-mx53_evk.o |
13 | obj-$(CONFIG_MACH_MX53_SMD) += board-mx53_smd.o | ||
14 | obj-$(CONFIG_MACH_MX53_LOCO) += board-mx53_loco.o | ||
13 | obj-$(CONFIG_MACH_EUKREA_CPUIMX51) += board-cpuimx51.o | 15 | obj-$(CONFIG_MACH_EUKREA_CPUIMX51) += board-cpuimx51.o |
14 | obj-$(CONFIG_MACH_EUKREA_MBIMX51_BASEBOARD) += eukrea_mbimx51-baseboard.o | 16 | obj-$(CONFIG_MACH_EUKREA_MBIMX51_BASEBOARD) += eukrea_mbimx51-baseboard.o |
15 | obj-$(CONFIG_MACH_EUKREA_CPUIMX51SD) += board-cpuimx51sd.o | 17 | obj-$(CONFIG_MACH_EUKREA_CPUIMX51SD) += board-cpuimx51sd.o |
diff --git a/arch/arm/mach-mx5/board-mx51_3ds.c b/arch/arm/mach-mx5/board-mx51_3ds.c index e42bd2eb034..49d64484237 100644 --- a/arch/arm/mach-mx5/board-mx51_3ds.c +++ b/arch/arm/mach-mx5/board-mx51_3ds.c | |||
@@ -12,7 +12,6 @@ | |||
12 | 12 | ||
13 | #include <linux/irq.h> | 13 | #include <linux/irq.h> |
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <linux/input/matrix_keypad.h> | ||
16 | #include <linux/spi/spi.h> | 15 | #include <linux/spi/spi.h> |
17 | 16 | ||
18 | #include <asm/mach-types.h> | 17 | #include <asm/mach-types.h> |
@@ -120,14 +119,14 @@ static int mx51_3ds_board_keymap[] = { | |||
120 | KEY(3, 5, KEY_BACK) | 119 | KEY(3, 5, KEY_BACK) |
121 | }; | 120 | }; |
122 | 121 | ||
123 | static struct matrix_keymap_data mx51_3ds_map_data = { | 122 | static const struct matrix_keymap_data mx51_3ds_map_data __initconst = { |
124 | .keymap = mx51_3ds_board_keymap, | 123 | .keymap = mx51_3ds_board_keymap, |
125 | .keymap_size = ARRAY_SIZE(mx51_3ds_board_keymap), | 124 | .keymap_size = ARRAY_SIZE(mx51_3ds_board_keymap), |
126 | }; | 125 | }; |
127 | 126 | ||
128 | static void mxc_init_keypad(void) | 127 | static void mxc_init_keypad(void) |
129 | { | 128 | { |
130 | mxc_register_device(&mxc_keypad_device, &mx51_3ds_map_data); | 129 | imx51_add_imx_keypad(&mx51_3ds_map_data); |
131 | } | 130 | } |
132 | #else | 131 | #else |
133 | static inline void mxc_init_keypad(void) | 132 | static inline void mxc_init_keypad(void) |
diff --git a/arch/arm/mach-mx5/board-mx53_evk.c b/arch/arm/mach-mx5/board-mx53_evk.c index fa97d0d5dd0..caee04c0823 100644 --- a/arch/arm/mach-mx5/board-mx53_evk.c +++ b/arch/arm/mach-mx5/board-mx53_evk.c | |||
@@ -21,6 +21,11 @@ | |||
21 | 21 | ||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/clk.h> | 23 | #include <linux/clk.h> |
24 | #include <linux/fec.h> | ||
25 | #include <linux/delay.h> | ||
26 | #include <linux/gpio.h> | ||
27 | #include <linux/spi/flash.h> | ||
28 | #include <linux/spi/spi.h> | ||
24 | #include <mach/common.h> | 29 | #include <mach/common.h> |
25 | #include <mach/hardware.h> | 30 | #include <mach/hardware.h> |
26 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
@@ -29,6 +34,10 @@ | |||
29 | #include <mach/imx-uart.h> | 34 | #include <mach/imx-uart.h> |
30 | #include <mach/iomux-mx53.h> | 35 | #include <mach/iomux-mx53.h> |
31 | 36 | ||
37 | #define SMD_FEC_PHY_RST IMX_GPIO_NR(7, 6) | ||
38 | #define EVK_ECSPI1_CS0 IMX_GPIO_NR(2, 30) | ||
39 | #define EVK_ECSPI1_CS1 IMX_GPIO_NR(3, 19) | ||
40 | |||
32 | #include "crm_regs.h" | 41 | #include "crm_regs.h" |
33 | #include "devices-imx53.h" | 42 | #include "devices-imx53.h" |
34 | 43 | ||
@@ -47,6 +56,14 @@ static iomux_v3_cfg_t mx53_evk_pads[] = { | |||
47 | MX53_PAD_ATA_CS_1__UART3_RXD, | 56 | MX53_PAD_ATA_CS_1__UART3_RXD, |
48 | MX53_PAD_ATA_DA_1__UART3_CTS, | 57 | MX53_PAD_ATA_DA_1__UART3_CTS, |
49 | MX53_PAD_ATA_DA_2__UART3_RTS, | 58 | MX53_PAD_ATA_DA_2__UART3_RTS, |
59 | |||
60 | MX53_PAD_EIM_D16__CSPI1_SCLK, | ||
61 | MX53_PAD_EIM_D17__CSPI1_MISO, | ||
62 | MX53_PAD_EIM_D18__CSPI1_MOSI, | ||
63 | |||
64 | /* ecspi chip select lines */ | ||
65 | MX53_PAD_EIM_EB2__GPIO_2_30, | ||
66 | MX53_PAD_EIM_D19__GPIO_3_19, | ||
50 | }; | 67 | }; |
51 | 68 | ||
52 | static const struct imxuart_platform_data mx53_evk_uart_pdata __initconst = { | 69 | static const struct imxuart_platform_data mx53_evk_uart_pdata __initconst = { |
@@ -60,11 +77,68 @@ static inline void mx53_evk_init_uart(void) | |||
60 | imx53_add_imx_uart(2, &mx53_evk_uart_pdata); | 77 | imx53_add_imx_uart(2, &mx53_evk_uart_pdata); |
61 | } | 78 | } |
62 | 79 | ||
80 | static const struct imxi2c_platform_data mx53_evk_i2c_data __initconst = { | ||
81 | .bitrate = 100000, | ||
82 | }; | ||
83 | |||
84 | static inline void mx53_evk_fec_reset(void) | ||
85 | { | ||
86 | int ret; | ||
87 | |||
88 | /* reset FEC PHY */ | ||
89 | ret = gpio_request(SMD_FEC_PHY_RST, "fec-phy-reset"); | ||
90 | if (ret) { | ||
91 | printk(KERN_ERR"failed to get GPIO_FEC_PHY_RESET: %d\n", ret); | ||
92 | return; | ||
93 | } | ||
94 | gpio_direction_output(SMD_FEC_PHY_RST, 0); | ||
95 | gpio_set_value(SMD_FEC_PHY_RST, 0); | ||
96 | msleep(1); | ||
97 | gpio_set_value(SMD_FEC_PHY_RST, 1); | ||
98 | } | ||
99 | |||
100 | static struct fec_platform_data mx53_evk_fec_pdata = { | ||
101 | .phy = PHY_INTERFACE_MODE_RMII, | ||
102 | }; | ||
103 | |||
104 | static struct spi_board_info mx53_evk_spi_board_info[] __initdata = { | ||
105 | { | ||
106 | .modalias = "mtd_dataflash", | ||
107 | .max_speed_hz = 25000000, | ||
108 | .bus_num = 0, | ||
109 | .chip_select = 1, | ||
110 | .mode = SPI_MODE_0, | ||
111 | .platform_data = NULL, | ||
112 | }, | ||
113 | }; | ||
114 | |||
115 | static int mx53_evk_spi_cs[] = { | ||
116 | EVK_ECSPI1_CS0, | ||
117 | EVK_ECSPI1_CS1, | ||
118 | }; | ||
119 | |||
120 | static const struct spi_imx_master mx53_evk_spi_data __initconst = { | ||
121 | .chipselect = mx53_evk_spi_cs, | ||
122 | .num_chipselect = ARRAY_SIZE(mx53_evk_spi_cs), | ||
123 | }; | ||
124 | |||
63 | static void __init mx53_evk_board_init(void) | 125 | static void __init mx53_evk_board_init(void) |
64 | { | 126 | { |
65 | mxc_iomux_v3_setup_multiple_pads(mx53_evk_pads, | 127 | mxc_iomux_v3_setup_multiple_pads(mx53_evk_pads, |
66 | ARRAY_SIZE(mx53_evk_pads)); | 128 | ARRAY_SIZE(mx53_evk_pads)); |
67 | mx53_evk_init_uart(); | 129 | mx53_evk_init_uart(); |
130 | mx53_evk_fec_reset(); | ||
131 | imx53_add_fec(&mx53_evk_fec_pdata); | ||
132 | |||
133 | imx53_add_imx_i2c(0, &mx53_evk_i2c_data); | ||
134 | imx53_add_imx_i2c(1, &mx53_evk_i2c_data); | ||
135 | |||
136 | imx53_add_sdhci_esdhc_imx(0, NULL); | ||
137 | imx53_add_sdhci_esdhc_imx(1, NULL); | ||
138 | |||
139 | spi_register_board_info(mx53_evk_spi_board_info, | ||
140 | ARRAY_SIZE(mx53_evk_spi_board_info)); | ||
141 | imx53_add_ecspi(0, &mx53_evk_spi_data); | ||
68 | } | 142 | } |
69 | 143 | ||
70 | static void __init mx53_evk_timer_init(void) | 144 | static void __init mx53_evk_timer_init(void) |
diff --git a/arch/arm/mach-mx5/board-mx53_loco.c b/arch/arm/mach-mx5/board-mx53_loco.c new file mode 100644 index 00000000000..d1348e04ace --- /dev/null +++ b/arch/arm/mach-mx5/board-mx53_loco.c | |||
@@ -0,0 +1,111 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2011 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 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 along | ||
17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | */ | ||
20 | |||
21 | #include <linux/init.h> | ||
22 | #include <linux/clk.h> | ||
23 | #include <linux/fec.h> | ||
24 | #include <linux/delay.h> | ||
25 | #include <linux/gpio.h> | ||
26 | |||
27 | #include <mach/common.h> | ||
28 | #include <mach/hardware.h> | ||
29 | #include <mach/imx-uart.h> | ||
30 | #include <mach/iomux-mx53.h> | ||
31 | |||
32 | #include <asm/mach-types.h> | ||
33 | #include <asm/mach/arch.h> | ||
34 | #include <asm/mach/time.h> | ||
35 | |||
36 | #include "crm_regs.h" | ||
37 | #include "devices-imx53.h" | ||
38 | |||
39 | #define LOCO_FEC_PHY_RST IMX_GPIO_NR(7, 6) | ||
40 | |||
41 | static iomux_v3_cfg_t mx53_loco_pads[] = { | ||
42 | MX53_PAD_CSI0_D10__UART1_TXD, | ||
43 | MX53_PAD_CSI0_D11__UART1_RXD, | ||
44 | MX53_PAD_ATA_DIOW__UART1_TXD, | ||
45 | MX53_PAD_ATA_DMACK__UART1_RXD, | ||
46 | |||
47 | MX53_PAD_ATA_BUFFER_EN__UART2_RXD, | ||
48 | MX53_PAD_ATA_DMARQ__UART2_TXD, | ||
49 | MX53_PAD_ATA_DIOR__UART2_RTS, | ||
50 | MX53_PAD_ATA_INTRQ__UART2_CTS, | ||
51 | |||
52 | MX53_PAD_ATA_CS_0__UART3_TXD, | ||
53 | MX53_PAD_ATA_CS_1__UART3_RXD, | ||
54 | MX53_PAD_ATA_DA_1__UART3_CTS, | ||
55 | MX53_PAD_ATA_DA_2__UART3_RTS, | ||
56 | }; | ||
57 | |||
58 | static const struct imxuart_platform_data mx53_loco_uart_data __initconst = { | ||
59 | .flags = IMXUART_HAVE_RTSCTS, | ||
60 | }; | ||
61 | |||
62 | static inline void mx53_loco_init_uart(void) | ||
63 | { | ||
64 | imx53_add_imx_uart(0, &mx53_loco_uart_data); | ||
65 | imx53_add_imx_uart(1, &mx53_loco_uart_data); | ||
66 | imx53_add_imx_uart(2, &mx53_loco_uart_data); | ||
67 | } | ||
68 | |||
69 | static inline void mx53_loco_fec_reset(void) | ||
70 | { | ||
71 | int ret; | ||
72 | |||
73 | /* reset FEC PHY */ | ||
74 | ret = gpio_request(LOCO_FEC_PHY_RST, "fec-phy-reset"); | ||
75 | if (ret) { | ||
76 | printk(KERN_ERR"failed to get GPIO_FEC_PHY_RESET: %d\n", ret); | ||
77 | return; | ||
78 | } | ||
79 | gpio_direction_output(LOCO_FEC_PHY_RST, 0); | ||
80 | msleep(1); | ||
81 | gpio_set_value(LOCO_FEC_PHY_RST, 1); | ||
82 | } | ||
83 | |||
84 | static struct fec_platform_data mx53_loco_fec_data = { | ||
85 | .phy = PHY_INTERFACE_MODE_RMII, | ||
86 | }; | ||
87 | |||
88 | static void __init mx53_loco_board_init(void) | ||
89 | { | ||
90 | mxc_iomux_v3_setup_multiple_pads(mx53_loco_pads, | ||
91 | ARRAY_SIZE(mx53_loco_pads)); | ||
92 | mx53_loco_init_uart(); | ||
93 | mx53_loco_fec_reset(); | ||
94 | imx53_add_fec(&mx53_loco_fec_data); | ||
95 | } | ||
96 | |||
97 | static void __init mx53_loco_timer_init(void) | ||
98 | { | ||
99 | mx53_clocks_init(32768, 24000000, 0, 0); | ||
100 | } | ||
101 | |||
102 | static struct sys_timer mx53_loco_timer = { | ||
103 | .init = mx53_loco_timer_init, | ||
104 | }; | ||
105 | |||
106 | MACHINE_START(MX53_LOCO, "Freescale MX53 LOCO Board") | ||
107 | .map_io = mx53_map_io, | ||
108 | .init_irq = mx53_init_irq, | ||
109 | .init_machine = mx53_loco_board_init, | ||
110 | .timer = &mx53_loco_timer, | ||
111 | MACHINE_END | ||
diff --git a/arch/arm/mach-mx5/board-mx53_smd.c b/arch/arm/mach-mx5/board-mx53_smd.c new file mode 100644 index 00000000000..7970f7a4858 --- /dev/null +++ b/arch/arm/mach-mx5/board-mx53_smd.c | |||
@@ -0,0 +1,111 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2011 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 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 along | ||
17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | */ | ||
20 | |||
21 | #include <linux/init.h> | ||
22 | #include <linux/clk.h> | ||
23 | #include <linux/fec.h> | ||
24 | #include <linux/delay.h> | ||
25 | #include <linux/gpio.h> | ||
26 | |||
27 | #include <mach/common.h> | ||
28 | #include <mach/hardware.h> | ||
29 | #include <mach/imx-uart.h> | ||
30 | #include <mach/iomux-mx53.h> | ||
31 | |||
32 | #include <asm/mach-types.h> | ||
33 | #include <asm/mach/arch.h> | ||
34 | #include <asm/mach/time.h> | ||
35 | |||
36 | #include "crm_regs.h" | ||
37 | #include "devices-imx53.h" | ||
38 | |||
39 | #define SMD_FEC_PHY_RST IMX_GPIO_NR(7, 6) | ||
40 | |||
41 | static iomux_v3_cfg_t mx53_smd_pads[] = { | ||
42 | MX53_PAD_CSI0_D10__UART1_TXD, | ||
43 | MX53_PAD_CSI0_D11__UART1_RXD, | ||
44 | MX53_PAD_ATA_DIOW__UART1_TXD, | ||
45 | MX53_PAD_ATA_DMACK__UART1_RXD, | ||
46 | |||
47 | MX53_PAD_ATA_BUFFER_EN__UART2_RXD, | ||
48 | MX53_PAD_ATA_DMARQ__UART2_TXD, | ||
49 | MX53_PAD_ATA_DIOR__UART2_RTS, | ||
50 | MX53_PAD_ATA_INTRQ__UART2_CTS, | ||
51 | |||
52 | MX53_PAD_ATA_CS_0__UART3_TXD, | ||
53 | MX53_PAD_ATA_CS_1__UART3_RXD, | ||
54 | MX53_PAD_ATA_DA_1__UART3_CTS, | ||
55 | MX53_PAD_ATA_DA_2__UART3_RTS, | ||
56 | }; | ||
57 | |||
58 | static const struct imxuart_platform_data mx53_smd_uart_data __initconst = { | ||
59 | .flags = IMXUART_HAVE_RTSCTS, | ||
60 | }; | ||
61 | |||
62 | static inline void mx53_smd_init_uart(void) | ||
63 | { | ||
64 | imx53_add_imx_uart(0, &mx53_smd_uart_data); | ||
65 | imx53_add_imx_uart(1, &mx53_smd_uart_data); | ||
66 | imx53_add_imx_uart(2, &mx53_smd_uart_data); | ||
67 | } | ||
68 | |||
69 | static inline void mx53_smd_fec_reset(void) | ||
70 | { | ||
71 | int ret; | ||
72 | |||
73 | /* reset FEC PHY */ | ||
74 | ret = gpio_request(SMD_FEC_PHY_RST, "fec-phy-reset"); | ||
75 | if (ret) { | ||
76 | printk(KERN_ERR"failed to get GPIO_FEC_PHY_RESET: %d\n", ret); | ||
77 | return; | ||
78 | } | ||
79 | gpio_direction_output(SMD_FEC_PHY_RST, 0); | ||
80 | msleep(1); | ||
81 | gpio_set_value(SMD_FEC_PHY_RST, 1); | ||
82 | } | ||
83 | |||
84 | static struct fec_platform_data mx53_smd_fec_data = { | ||
85 | .phy = PHY_INTERFACE_MODE_RMII, | ||
86 | }; | ||
87 | |||
88 | static void __init mx53_smd_board_init(void) | ||
89 | { | ||
90 | mxc_iomux_v3_setup_multiple_pads(mx53_smd_pads, | ||
91 | ARRAY_SIZE(mx53_smd_pads)); | ||
92 | mx53_smd_init_uart(); | ||
93 | mx53_smd_fec_reset(); | ||
94 | imx53_add_fec(&mx53_smd_fec_data); | ||
95 | } | ||
96 | |||
97 | static void __init mx53_smd_timer_init(void) | ||
98 | { | ||
99 | mx53_clocks_init(32768, 24000000, 22579200, 0); | ||
100 | } | ||
101 | |||
102 | static struct sys_timer mx53_smd_timer = { | ||
103 | .init = mx53_smd_timer_init, | ||
104 | }; | ||
105 | |||
106 | MACHINE_START(MX53_SMD, "Freescale MX53 SMD Board") | ||
107 | .map_io = mx53_map_io, | ||
108 | .init_irq = mx53_init_irq, | ||
109 | .init_machine = mx53_smd_board_init, | ||
110 | .timer = &mx53_smd_timer, | ||
111 | MACHINE_END | ||
diff --git a/arch/arm/mach-mx5/clock-mx51-mx53.c b/arch/arm/mach-mx5/clock-mx51-mx53.c index 785e1a33618..0a19e7567c0 100644 --- a/arch/arm/mach-mx5/clock-mx51-mx53.c +++ b/arch/arm/mach-mx5/clock-mx51-mx53.c | |||
@@ -1191,6 +1191,11 @@ DEFINE_CLOCK(gpt_ipg_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG10_OFFSET, | |||
1191 | DEFINE_CLOCK(gpt_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG9_OFFSET, | 1191 | DEFINE_CLOCK(gpt_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG9_OFFSET, |
1192 | NULL, NULL, &ipg_clk, &gpt_ipg_clk); | 1192 | NULL, NULL, &ipg_clk, &gpt_ipg_clk); |
1193 | 1193 | ||
1194 | DEFINE_CLOCK(pwm1_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG6_OFFSET, | ||
1195 | NULL, NULL, &ipg_clk, NULL); | ||
1196 | DEFINE_CLOCK(pwm2_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG8_OFFSET, | ||
1197 | NULL, NULL, &ipg_clk, NULL); | ||
1198 | |||
1194 | /* I2C */ | 1199 | /* I2C */ |
1195 | DEFINE_CLOCK(i2c1_clk, 0, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG9_OFFSET, | 1200 | DEFINE_CLOCK(i2c1_clk, 0, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG9_OFFSET, |
1196 | NULL, NULL, &ipg_clk, NULL); | 1201 | NULL, NULL, &ipg_clk, NULL); |
@@ -1283,6 +1288,8 @@ static struct clk_lookup mx51_lookups[] = { | |||
1283 | _REGISTER_CLOCK("imx-uart.2", NULL, uart3_clk) | 1288 | _REGISTER_CLOCK("imx-uart.2", NULL, uart3_clk) |
1284 | _REGISTER_CLOCK(NULL, "gpt", gpt_clk) | 1289 | _REGISTER_CLOCK(NULL, "gpt", gpt_clk) |
1285 | _REGISTER_CLOCK("fec.0", NULL, fec_clk) | 1290 | _REGISTER_CLOCK("fec.0", NULL, fec_clk) |
1291 | _REGISTER_CLOCK("mxc_pwm.0", "pwm", pwm1_clk) | ||
1292 | _REGISTER_CLOCK("mxc_pwm.1", "pwm", pwm2_clk) | ||
1286 | _REGISTER_CLOCK("imx-i2c.0", NULL, i2c1_clk) | 1293 | _REGISTER_CLOCK("imx-i2c.0", NULL, i2c1_clk) |
1287 | _REGISTER_CLOCK("imx-i2c.1", NULL, i2c2_clk) | 1294 | _REGISTER_CLOCK("imx-i2c.1", NULL, i2c2_clk) |
1288 | _REGISTER_CLOCK("imx-i2c.2", NULL, hsi2c_clk) | 1295 | _REGISTER_CLOCK("imx-i2c.2", NULL, hsi2c_clk) |
@@ -1295,7 +1302,7 @@ static struct clk_lookup mx51_lookups[] = { | |||
1295 | _REGISTER_CLOCK("mxc-ehci.2", "usb_ahb", usb_ahb_clk) | 1302 | _REGISTER_CLOCK("mxc-ehci.2", "usb_ahb", usb_ahb_clk) |
1296 | _REGISTER_CLOCK("fsl-usb2-udc", "usb", usboh3_clk) | 1303 | _REGISTER_CLOCK("fsl-usb2-udc", "usb", usboh3_clk) |
1297 | _REGISTER_CLOCK("fsl-usb2-udc", "usb_ahb", ahb_clk) | 1304 | _REGISTER_CLOCK("fsl-usb2-udc", "usb_ahb", ahb_clk) |
1298 | _REGISTER_CLOCK("imx-keypad.0", NULL, kpp_clk) | 1305 | _REGISTER_CLOCK("imx-keypad", NULL, kpp_clk) |
1299 | _REGISTER_CLOCK("mxc_nand", NULL, nfc_clk) | 1306 | _REGISTER_CLOCK("mxc_nand", NULL, nfc_clk) |
1300 | _REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk) | 1307 | _REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk) |
1301 | _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk) | 1308 | _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk) |
@@ -1326,6 +1333,13 @@ static struct clk_lookup mx53_lookups[] = { | |||
1326 | _REGISTER_CLOCK(NULL, "gpt", gpt_clk) | 1333 | _REGISTER_CLOCK(NULL, "gpt", gpt_clk) |
1327 | _REGISTER_CLOCK("fec.0", NULL, fec_clk) | 1334 | _REGISTER_CLOCK("fec.0", NULL, fec_clk) |
1328 | _REGISTER_CLOCK(NULL, "iim_clk", iim_clk) | 1335 | _REGISTER_CLOCK(NULL, "iim_clk", iim_clk) |
1336 | _REGISTER_CLOCK("imx-i2c.0", NULL, i2c1_clk) | ||
1337 | _REGISTER_CLOCK("imx-i2c.1", NULL, i2c2_clk) | ||
1338 | _REGISTER_CLOCK("sdhci-esdhc-imx.0", NULL, esdhc1_clk) | ||
1339 | _REGISTER_CLOCK("sdhci-esdhc-imx.1", NULL, esdhc2_clk) | ||
1340 | _REGISTER_CLOCK("imx53-ecspi.0", NULL, ecspi1_clk) | ||
1341 | _REGISTER_CLOCK("imx53-ecspi.1", NULL, ecspi2_clk) | ||
1342 | _REGISTER_CLOCK("imx53-cspi.0", NULL, cspi_clk) | ||
1329 | }; | 1343 | }; |
1330 | 1344 | ||
1331 | static void clk_tree_init(void) | 1345 | static void clk_tree_init(void) |
@@ -1363,7 +1377,6 @@ int __init mx51_clocks_init(unsigned long ckil, unsigned long osc, | |||
1363 | 1377 | ||
1364 | clk_tree_init(); | 1378 | clk_tree_init(); |
1365 | 1379 | ||
1366 | clk_set_parent(&uart_root_clk, &pll3_sw_clk); | ||
1367 | clk_enable(&cpu_clk); | 1380 | clk_enable(&cpu_clk); |
1368 | clk_enable(&main_bus_clk); | 1381 | clk_enable(&main_bus_clk); |
1369 | 1382 | ||
@@ -1406,6 +1419,7 @@ int __init mx53_clocks_init(unsigned long ckil, unsigned long osc, | |||
1406 | 1419 | ||
1407 | clk_tree_init(); | 1420 | clk_tree_init(); |
1408 | 1421 | ||
1422 | clk_set_parent(&uart_root_clk, &pll3_sw_clk); | ||
1409 | clk_enable(&cpu_clk); | 1423 | clk_enable(&cpu_clk); |
1410 | clk_enable(&main_bus_clk); | 1424 | clk_enable(&main_bus_clk); |
1411 | 1425 | ||
diff --git a/arch/arm/mach-mx5/devices-imx51.h b/arch/arm/mach-mx5/devices-imx51.h index 6302e467000..7fff485e560 100644 --- a/arch/arm/mach-mx5/devices-imx51.h +++ b/arch/arm/mach-mx5/devices-imx51.h | |||
@@ -47,3 +47,11 @@ extern const struct imx_spi_imx_data imx51_ecspi_data[] __initconst; | |||
47 | extern const struct imx_imx2_wdt_data imx51_imx2_wdt_data[] __initconst; | 47 | extern const struct imx_imx2_wdt_data imx51_imx2_wdt_data[] __initconst; |
48 | #define imx51_add_imx2_wdt(id, pdata) \ | 48 | #define imx51_add_imx2_wdt(id, pdata) \ |
49 | imx_add_imx2_wdt(&imx51_imx2_wdt_data[id]) | 49 | imx_add_imx2_wdt(&imx51_imx2_wdt_data[id]) |
50 | |||
51 | extern const struct imx_mxc_pwm_data imx51_mxc_pwm_data[] __initconst; | ||
52 | #define imx51_add_mxc_pwm(id) \ | ||
53 | imx_add_mxc_pwm(&imx51_mxc_pwm_data[id]) | ||
54 | |||
55 | extern const struct imx_imx_keypad_data imx51_imx_keypad_data __initconst; | ||
56 | #define imx51_add_imx_keypad(pdata) \ | ||
57 | imx_add_imx_keypad(&imx51_imx_keypad_data, pdata) | ||
diff --git a/arch/arm/mach-mx5/devices-imx53.h b/arch/arm/mach-mx5/devices-imx53.h index 9d0ec2507fa..8639735a117 100644 --- a/arch/arm/mach-mx5/devices-imx53.h +++ b/arch/arm/mach-mx5/devices-imx53.h | |||
@@ -8,6 +8,24 @@ | |||
8 | #include <mach/mx53.h> | 8 | #include <mach/mx53.h> |
9 | #include <mach/devices-common.h> | 9 | #include <mach/devices-common.h> |
10 | 10 | ||
11 | extern const struct imx_fec_data imx53_fec_data __initconst; | ||
12 | #define imx53_add_fec(pdata) \ | ||
13 | imx_add_fec(&imx53_fec_data, pdata) | ||
14 | |||
11 | extern const struct imx_imx_uart_1irq_data imx53_imx_uart_data[] __initconst; | 15 | extern const struct imx_imx_uart_1irq_data imx53_imx_uart_data[] __initconst; |
12 | #define imx53_add_imx_uart(id, pdata) \ | 16 | #define imx53_add_imx_uart(id, pdata) \ |
13 | imx_add_imx_uart_1irq(&imx53_imx_uart_data[id], pdata) | 17 | imx_add_imx_uart_1irq(&imx53_imx_uart_data[id], pdata) |
18 | |||
19 | |||
20 | extern const struct imx_imx_i2c_data imx53_imx_i2c_data[] __initconst; | ||
21 | #define imx53_add_imx_i2c(id, pdata) \ | ||
22 | imx_add_imx_i2c(&imx53_imx_i2c_data[id], pdata) | ||
23 | |||
24 | extern const struct imx_sdhci_esdhc_imx_data | ||
25 | imx53_sdhci_esdhc_imx_data[] __initconst; | ||
26 | #define imx53_add_sdhci_esdhc_imx(id, pdata) \ | ||
27 | imx_add_sdhci_esdhc_imx(&imx53_sdhci_esdhc_imx_data[id], pdata) | ||
28 | |||
29 | extern const struct imx_spi_imx_data imx53_ecspi_data[] __initconst; | ||
30 | #define imx53_add_ecspi(id, pdata) \ | ||
31 | imx_add_spi_imx(&imx53_ecspi_data[id], pdata) | ||
diff --git a/arch/arm/mach-mx5/devices.c b/arch/arm/mach-mx5/devices.c index 1bda5cb339d..153ada53e57 100644 --- a/arch/arm/mach-mx5/devices.c +++ b/arch/arm/mach-mx5/devices.c | |||
@@ -120,25 +120,6 @@ struct platform_device mxc_usbh2_device = { | |||
120 | }, | 120 | }, |
121 | }; | 121 | }; |
122 | 122 | ||
123 | static struct resource mxc_kpp_resources[] = { | ||
124 | { | ||
125 | .start = MX51_MXC_INT_KPP, | ||
126 | .end = MX51_MXC_INT_KPP, | ||
127 | .flags = IORESOURCE_IRQ, | ||
128 | } , { | ||
129 | .start = MX51_KPP_BASE_ADDR, | ||
130 | .end = MX51_KPP_BASE_ADDR + 0x8 - 1, | ||
131 | .flags = IORESOURCE_MEM, | ||
132 | }, | ||
133 | }; | ||
134 | |||
135 | struct platform_device mxc_keypad_device = { | ||
136 | .name = "imx-keypad", | ||
137 | .id = 0, | ||
138 | .num_resources = ARRAY_SIZE(mxc_kpp_resources), | ||
139 | .resource = mxc_kpp_resources, | ||
140 | }; | ||
141 | |||
142 | static struct mxc_gpio_port mxc_gpio_ports[] = { | 123 | static struct mxc_gpio_port mxc_gpio_ports[] = { |
143 | { | 124 | { |
144 | .chip.label = "gpio-0", | 125 | .chip.label = "gpio-0", |
diff --git a/arch/arm/mach-mx5/devices.h b/arch/arm/mach-mx5/devices.h index 16891aa3573..55a5129bc29 100644 --- a/arch/arm/mach-mx5/devices.h +++ b/arch/arm/mach-mx5/devices.h | |||
@@ -3,4 +3,3 @@ extern struct platform_device mxc_usbh1_device; | |||
3 | extern struct platform_device mxc_usbh2_device; | 3 | extern struct platform_device mxc_usbh2_device; |
4 | extern struct platform_device mxc_usbdr_udc_device; | 4 | extern struct platform_device mxc_usbdr_udc_device; |
5 | extern struct platform_device mxc_hsi2c_device; | 5 | extern struct platform_device mxc_hsi2c_device; |
6 | extern struct platform_device mxc_keypad_device; | ||
diff --git a/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c b/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c index c96d018ff8a..e83ffadb65f 100644 --- a/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c +++ b/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/fsl_devices.h> | 21 | #include <linux/fsl_devices.h> |
22 | #include <linux/i2c/tsc2007.h> | 22 | #include <linux/i2c/tsc2007.h> |
23 | #include <linux/leds.h> | 23 | #include <linux/leds.h> |
24 | #include <linux/input/matrix_keypad.h> | ||
25 | 24 | ||
26 | #include <mach/common.h> | 25 | #include <mach/common.h> |
27 | #include <mach/hardware.h> | 26 | #include <mach/hardware.h> |
@@ -157,7 +156,7 @@ static int mbimx51_keymap[] = { | |||
157 | KEY(3, 3, KEY_ENTER), | 156 | KEY(3, 3, KEY_ENTER), |
158 | }; | 157 | }; |
159 | 158 | ||
160 | static struct matrix_keymap_data mbimx51_map_data = { | 159 | static const struct matrix_keymap_data mbimx51_map_data __initconst = { |
161 | .keymap = mbimx51_keymap, | 160 | .keymap = mbimx51_keymap, |
162 | .keymap_size = ARRAY_SIZE(mbimx51_keymap), | 161 | .keymap_size = ARRAY_SIZE(mbimx51_keymap), |
163 | }; | 162 | }; |
@@ -209,7 +208,7 @@ void __init eukrea_mbimx51_baseboard_init(void) | |||
209 | 208 | ||
210 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 209 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
211 | 210 | ||
212 | mxc_register_device(&mxc_keypad_device, &mbimx51_map_data); | 211 | imx51_add_imx_keypad(&mbimx51_map_data); |
213 | 212 | ||
214 | gpio_request(MBIMX51_TSC2007_GPIO, "tsc2007_irq"); | 213 | gpio_request(MBIMX51_TSC2007_GPIO, "tsc2007_irq"); |
215 | gpio_direction_input(MBIMX51_TSC2007_GPIO); | 214 | gpio_direction_input(MBIMX51_TSC2007_GPIO); |
diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig index c4ac7b41519..8bfc8df5461 100644 --- a/arch/arm/mach-mxs/Kconfig +++ b/arch/arm/mach-mxs/Kconfig | |||
@@ -15,7 +15,7 @@ comment "MXS platforms:" | |||
15 | config MACH_MX23EVK | 15 | config MACH_MX23EVK |
16 | bool "Support MX23EVK Platform" | 16 | bool "Support MX23EVK Platform" |
17 | select SOC_IMX23 | 17 | select SOC_IMX23 |
18 | select MXS_HAVE_PLATFORM_DUART | 18 | select MXS_HAVE_AMBA_DUART |
19 | default y | 19 | default y |
20 | help | 20 | help |
21 | Include support for MX23EVK platform. This includes specific | 21 | Include support for MX23EVK platform. This includes specific |
@@ -24,7 +24,7 @@ config MACH_MX23EVK | |||
24 | config MACH_MX28EVK | 24 | config MACH_MX28EVK |
25 | bool "Support MX28EVK Platform" | 25 | bool "Support MX28EVK Platform" |
26 | select SOC_IMX28 | 26 | select SOC_IMX28 |
27 | select MXS_HAVE_PLATFORM_DUART | 27 | select MXS_HAVE_AMBA_DUART |
28 | select MXS_HAVE_PLATFORM_FEC | 28 | select MXS_HAVE_PLATFORM_FEC |
29 | default y | 29 | default y |
30 | help | 30 | help |
diff --git a/arch/arm/mach-mxs/clock-mx23.c b/arch/arm/mach-mxs/clock-mx23.c index 8f5a19ab558..ca72a05ed9c 100644 --- a/arch/arm/mach-mxs/clock-mx23.c +++ b/arch/arm/mach-mxs/clock-mx23.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/clk.h> | 21 | #include <linux/clk.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/jiffies.h> | 23 | #include <linux/jiffies.h> |
24 | #include <linux/clkdev.h> | ||
24 | 25 | ||
25 | #include <asm/clkdev.h> | 26 | #include <asm/clkdev.h> |
26 | #include <asm/div64.h> | 27 | #include <asm/div64.h> |
@@ -303,7 +304,7 @@ static int name##_set_rate(struct clk *clk, unsigned long rate) \ | |||
303 | reg = __raw_readl(CLKCTRL_BASE_ADDR + HW_CLKCTRL_##dr); \ | 304 | reg = __raw_readl(CLKCTRL_BASE_ADDR + HW_CLKCTRL_##dr); \ |
304 | reg &= ~BM_CLKCTRL_##dr##_DIV; \ | 305 | reg &= ~BM_CLKCTRL_##dr##_DIV; \ |
305 | reg |= div << BP_CLKCTRL_##dr##_DIV; \ | 306 | reg |= div << BP_CLKCTRL_##dr##_DIV; \ |
306 | if (reg | (1 << clk->enable_shift)) { \ | 307 | if (reg & (1 << clk->enable_shift)) { \ |
307 | pr_err("%s: clock is gated\n", __func__); \ | 308 | pr_err("%s: clock is gated\n", __func__); \ |
308 | return -EINVAL; \ | 309 | return -EINVAL; \ |
309 | } \ | 310 | } \ |
@@ -346,7 +347,7 @@ static int name##_set_parent(struct clk *clk, struct clk *parent) \ | |||
346 | { \ | 347 | { \ |
347 | if (parent != clk->parent) { \ | 348 | if (parent != clk->parent) { \ |
348 | __raw_writel(BM_CLKCTRL_CLKSEQ_BYPASS_##bit, \ | 349 | __raw_writel(BM_CLKCTRL_CLKSEQ_BYPASS_##bit, \ |
349 | HW_CLKCTRL_CLKSEQ_TOG); \ | 350 | CLKCTRL_BASE_ADDR + HW_CLKCTRL_CLKSEQ_TOG); \ |
350 | clk->parent = parent; \ | 351 | clk->parent = parent; \ |
351 | } \ | 352 | } \ |
352 | \ | 353 | \ |
@@ -437,10 +438,12 @@ _DEFINE_CLOCK(clk32k_clk, XTAL, TIMROT_CLK32K_GATE, &ref_xtal_clk); | |||
437 | }, | 438 | }, |
438 | 439 | ||
439 | static struct clk_lookup lookups[] = { | 440 | static struct clk_lookup lookups[] = { |
440 | _REGISTER_CLOCK("mxs-duart.0", NULL, uart_clk) | 441 | /* for amba bus driver */ |
442 | _REGISTER_CLOCK("duart", "apb_pclk", xbus_clk) | ||
443 | /* for amba-pl011 driver */ | ||
444 | _REGISTER_CLOCK("duart", NULL, uart_clk) | ||
441 | _REGISTER_CLOCK("rtc", NULL, rtc_clk) | 445 | _REGISTER_CLOCK("rtc", NULL, rtc_clk) |
442 | _REGISTER_CLOCK(NULL, "hclk", hbus_clk) | 446 | _REGISTER_CLOCK(NULL, "hclk", hbus_clk) |
443 | _REGISTER_CLOCK(NULL, "xclk", xbus_clk) | ||
444 | _REGISTER_CLOCK(NULL, "usb", usb_clk) | 447 | _REGISTER_CLOCK(NULL, "usb", usb_clk) |
445 | _REGISTER_CLOCK(NULL, "audio", audio_clk) | 448 | _REGISTER_CLOCK(NULL, "audio", audio_clk) |
446 | _REGISTER_CLOCK(NULL, "pwm", pwm_clk) | 449 | _REGISTER_CLOCK(NULL, "pwm", pwm_clk) |
@@ -518,6 +521,12 @@ int __init mx23_clocks_init(void) | |||
518 | { | 521 | { |
519 | clk_misc_init(); | 522 | clk_misc_init(); |
520 | 523 | ||
524 | clk_enable(&cpu_clk); | ||
525 | clk_enable(&hbus_clk); | ||
526 | clk_enable(&xbus_clk); | ||
527 | clk_enable(&emi_clk); | ||
528 | clk_enable(&uart_clk); | ||
529 | |||
521 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); | 530 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); |
522 | 531 | ||
523 | mxs_timer_init(&clk32k_clk, MX23_INT_TIMER0); | 532 | mxs_timer_init(&clk32k_clk, MX23_INT_TIMER0); |
diff --git a/arch/arm/mach-mxs/clock-mx28.c b/arch/arm/mach-mxs/clock-mx28.c index 74e2103c601..fd1c4c54b8e 100644 --- a/arch/arm/mach-mxs/clock-mx28.c +++ b/arch/arm/mach-mxs/clock-mx28.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/clk.h> | 21 | #include <linux/clk.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/jiffies.h> | 23 | #include <linux/jiffies.h> |
24 | #include <linux/clkdev.h> | ||
24 | 25 | ||
25 | #include <asm/clkdev.h> | 26 | #include <asm/clkdev.h> |
26 | #include <asm/div64.h> | 27 | #include <asm/div64.h> |
@@ -354,12 +355,12 @@ static int name##_set_rate(struct clk *clk, unsigned long rate) \ | |||
354 | } else { \ | 355 | } else { \ |
355 | reg &= ~BM_CLKCTRL_##dr##_DIV; \ | 356 | reg &= ~BM_CLKCTRL_##dr##_DIV; \ |
356 | reg |= div << BP_CLKCTRL_##dr##_DIV; \ | 357 | reg |= div << BP_CLKCTRL_##dr##_DIV; \ |
357 | if (reg | (1 << clk->enable_shift)) { \ | 358 | if (reg & (1 << clk->enable_shift)) { \ |
358 | pr_err("%s: clock is gated\n", __func__); \ | 359 | pr_err("%s: clock is gated\n", __func__); \ |
359 | return -EINVAL; \ | 360 | return -EINVAL; \ |
360 | } \ | 361 | } \ |
361 | } \ | 362 | } \ |
362 | __raw_writel(reg, CLKCTRL_BASE_ADDR + HW_CLKCTRL_CPU); \ | 363 | __raw_writel(reg, CLKCTRL_BASE_ADDR + HW_CLKCTRL_##dr); \ |
363 | \ | 364 | \ |
364 | for (i = 10000; i; i--) \ | 365 | for (i = 10000; i; i--) \ |
365 | if (!(__raw_readl(CLKCTRL_BASE_ADDR + \ | 366 | if (!(__raw_readl(CLKCTRL_BASE_ADDR + \ |
@@ -482,7 +483,7 @@ static int name##_set_parent(struct clk *clk, struct clk *parent) \ | |||
482 | { \ | 483 | { \ |
483 | if (parent != clk->parent) { \ | 484 | if (parent != clk->parent) { \ |
484 | __raw_writel(BM_CLKCTRL_CLKSEQ_BYPASS_##bit, \ | 485 | __raw_writel(BM_CLKCTRL_CLKSEQ_BYPASS_##bit, \ |
485 | HW_CLKCTRL_CLKSEQ_TOG); \ | 486 | CLKCTRL_BASE_ADDR + HW_CLKCTRL_CLKSEQ_TOG); \ |
486 | clk->parent = parent; \ | 487 | clk->parent = parent; \ |
487 | } \ | 488 | } \ |
488 | \ | 489 | \ |
@@ -602,8 +603,12 @@ _DEFINE_CLOCK(fec_clk, ENET, DISABLE, &hbus_clk); | |||
602 | }, | 603 | }, |
603 | 604 | ||
604 | static struct clk_lookup lookups[] = { | 605 | static struct clk_lookup lookups[] = { |
605 | _REGISTER_CLOCK("mxs-duart.0", NULL, uart_clk) | 606 | /* for amba bus driver */ |
606 | _REGISTER_CLOCK("fec.0", NULL, fec_clk) | 607 | _REGISTER_CLOCK("duart", "apb_pclk", xbus_clk) |
608 | /* for amba-pl011 driver */ | ||
609 | _REGISTER_CLOCK("duart", NULL, uart_clk) | ||
610 | _REGISTER_CLOCK("imx28-fec.0", NULL, fec_clk) | ||
611 | _REGISTER_CLOCK("imx28-fec.1", NULL, fec_clk) | ||
607 | _REGISTER_CLOCK("rtc", NULL, rtc_clk) | 612 | _REGISTER_CLOCK("rtc", NULL, rtc_clk) |
608 | _REGISTER_CLOCK("pll2", NULL, pll2_clk) | 613 | _REGISTER_CLOCK("pll2", NULL, pll2_clk) |
609 | _REGISTER_CLOCK(NULL, "hclk", hbus_clk) | 614 | _REGISTER_CLOCK(NULL, "hclk", hbus_clk) |
@@ -726,6 +731,12 @@ int __init mx28_clocks_init(void) | |||
726 | { | 731 | { |
727 | clk_misc_init(); | 732 | clk_misc_init(); |
728 | 733 | ||
734 | clk_enable(&cpu_clk); | ||
735 | clk_enable(&hbus_clk); | ||
736 | clk_enable(&xbus_clk); | ||
737 | clk_enable(&emi_clk); | ||
738 | clk_enable(&uart_clk); | ||
739 | |||
729 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); | 740 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); |
730 | 741 | ||
731 | mxs_timer_init(&clk32k_clk, MX28_INT_TIMER0); | 742 | mxs_timer_init(&clk32k_clk, MX28_INT_TIMER0); |
diff --git a/arch/arm/mach-mxs/clock.c b/arch/arm/mach-mxs/clock.c index e7d2269cf70..a7093c88e6a 100644 --- a/arch/arm/mach-mxs/clock.c +++ b/arch/arm/mach-mxs/clock.c | |||
@@ -57,7 +57,6 @@ static void __clk_disable(struct clk *clk) | |||
57 | if (clk->disable) | 57 | if (clk->disable) |
58 | clk->disable(clk); | 58 | clk->disable(clk); |
59 | __clk_disable(clk->parent); | 59 | __clk_disable(clk->parent); |
60 | __clk_disable(clk->secondary); | ||
61 | } | 60 | } |
62 | } | 61 | } |
63 | 62 | ||
@@ -68,7 +67,6 @@ static int __clk_enable(struct clk *clk) | |||
68 | 67 | ||
69 | if (clk->usecount++ == 0) { | 68 | if (clk->usecount++ == 0) { |
70 | __clk_enable(clk->parent); | 69 | __clk_enable(clk->parent); |
71 | __clk_enable(clk->secondary); | ||
72 | 70 | ||
73 | if (clk->enable) | 71 | if (clk->enable) |
74 | clk->enable(clk); | 72 | clk->enable(clk); |
diff --git a/arch/arm/mach-mxs/devices-mx23.h b/arch/arm/mach-mxs/devices-mx23.h index d0f49fc0abb..1256788561d 100644 --- a/arch/arm/mach-mxs/devices-mx23.h +++ b/arch/arm/mach-mxs/devices-mx23.h | |||
@@ -11,6 +11,6 @@ | |||
11 | #include <mach/mx23.h> | 11 | #include <mach/mx23.h> |
12 | #include <mach/devices-common.h> | 12 | #include <mach/devices-common.h> |
13 | 13 | ||
14 | extern const struct mxs_duart_data mx23_duart_data __initconst; | 14 | extern const struct amba_device mx23_duart_device __initconst; |
15 | #define mx23_add_duart() \ | 15 | #define mx23_add_duart() \ |
16 | mxs_add_duart(&mx23_duart_data) | 16 | mxs_add_duart(&mx23_duart_device) |
diff --git a/arch/arm/mach-mxs/devices-mx28.h b/arch/arm/mach-mxs/devices-mx28.h index 00b736c434b..33773a6333a 100644 --- a/arch/arm/mach-mxs/devices-mx28.h +++ b/arch/arm/mach-mxs/devices-mx28.h | |||
@@ -11,9 +11,9 @@ | |||
11 | #include <mach/mx28.h> | 11 | #include <mach/mx28.h> |
12 | #include <mach/devices-common.h> | 12 | #include <mach/devices-common.h> |
13 | 13 | ||
14 | extern const struct mxs_duart_data mx28_duart_data __initconst; | 14 | extern const struct amba_device mx28_duart_device __initconst; |
15 | #define mx28_add_duart() \ | 15 | #define mx28_add_duart() \ |
16 | mxs_add_duart(&mx28_duart_data) | 16 | mxs_add_duart(&mx28_duart_device) |
17 | 17 | ||
18 | extern const struct mxs_fec_data mx28_fec_data[] __initconst; | 18 | extern const struct mxs_fec_data mx28_fec_data[] __initconst; |
19 | #define mx28_add_fec(id, pdata) \ | 19 | #define mx28_add_fec(id, pdata) \ |
diff --git a/arch/arm/mach-mxs/devices.c b/arch/arm/mach-mxs/devices.c index 6b60f02ca2e..c20d54740b0 100644 --- a/arch/arm/mach-mxs/devices.c +++ b/arch/arm/mach-mxs/devices.c | |||
@@ -19,9 +19,8 @@ | |||
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/err.h> | ||
23 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
24 | #include <mach/common.h> | 23 | #include <linux/amba/bus.h> |
25 | 24 | ||
26 | struct platform_device *__init mxs_add_platform_device_dmamask( | 25 | struct platform_device *__init mxs_add_platform_device_dmamask( |
27 | const char *name, int id, | 26 | const char *name, int id, |
@@ -73,3 +72,17 @@ err: | |||
73 | 72 | ||
74 | return pdev; | 73 | return pdev; |
75 | } | 74 | } |
75 | |||
76 | int __init mxs_add_amba_device(const struct amba_device *dev) | ||
77 | { | ||
78 | struct amba_device *adev = kmalloc(sizeof(*adev), GFP_KERNEL); | ||
79 | |||
80 | if (!adev) { | ||
81 | pr_err("%s: failed to allocate memory", __func__); | ||
82 | return -ENOMEM; | ||
83 | } | ||
84 | |||
85 | *adev = *dev; | ||
86 | |||
87 | return amba_device_register(adev, &iomem_resource); | ||
88 | } | ||
diff --git a/arch/arm/mach-mxs/devices/Kconfig b/arch/arm/mach-mxs/devices/Kconfig index a35a2dc5539..cf7dc1ae575 100644 --- a/arch/arm/mach-mxs/devices/Kconfig +++ b/arch/arm/mach-mxs/devices/Kconfig | |||
@@ -1,5 +1,6 @@ | |||
1 | config MXS_HAVE_PLATFORM_DUART | 1 | config MXS_HAVE_AMBA_DUART |
2 | bool | 2 | bool |
3 | select ARM_AMBA | ||
3 | 4 | ||
4 | config MXS_HAVE_PLATFORM_FEC | 5 | config MXS_HAVE_PLATFORM_FEC |
5 | bool | 6 | bool |
diff --git a/arch/arm/mach-mxs/devices/Makefile b/arch/arm/mach-mxs/devices/Makefile index 4b5266a3e6d..d0a09f6934b 100644 --- a/arch/arm/mach-mxs/devices/Makefile +++ b/arch/arm/mach-mxs/devices/Makefile | |||
@@ -1,2 +1,2 @@ | |||
1 | obj-$(CONFIG_MXS_HAVE_PLATFORM_DUART) += platform-duart.o | 1 | obj-$(CONFIG_MXS_HAVE_AMBA_DUART) += amba-duart.o |
2 | obj-$(CONFIG_MXS_HAVE_PLATFORM_FEC) += platform-fec.o | 2 | obj-$(CONFIG_MXS_HAVE_PLATFORM_FEC) += platform-fec.o |
diff --git a/arch/arm/mach-mxs/devices/amba-duart.c b/arch/arm/mach-mxs/devices/amba-duart.c new file mode 100644 index 00000000000..a559db09b49 --- /dev/null +++ b/arch/arm/mach-mxs/devices/amba-duart.c | |||
@@ -0,0 +1,40 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009-2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * Copyright 2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it under | ||
8 | * the terms of the GNU General Public License version 2 as published by the | ||
9 | * Free Software Foundation. | ||
10 | */ | ||
11 | #include <asm/irq.h> | ||
12 | #include <mach/mx23.h> | ||
13 | #include <mach/mx28.h> | ||
14 | #include <mach/devices-common.h> | ||
15 | |||
16 | #define MXS_AMBA_DUART_DEVICE(name, soc) \ | ||
17 | const struct amba_device name##_device __initconst = { \ | ||
18 | .dev = { \ | ||
19 | .init_name = "duart", \ | ||
20 | }, \ | ||
21 | .res = { \ | ||
22 | .start = soc ## _DUART_BASE_ADDR, \ | ||
23 | .end = (soc ## _DUART_BASE_ADDR) + SZ_8K - 1, \ | ||
24 | .flags = IORESOURCE_MEM, \ | ||
25 | }, \ | ||
26 | .irq = {soc ## _INT_DUART, NO_IRQ}, \ | ||
27 | } | ||
28 | |||
29 | #ifdef CONFIG_SOC_IMX23 | ||
30 | MXS_AMBA_DUART_DEVICE(mx23_duart, MX23); | ||
31 | #endif | ||
32 | |||
33 | #ifdef CONFIG_SOC_IMX28 | ||
34 | MXS_AMBA_DUART_DEVICE(mx28_duart, MX28); | ||
35 | #endif | ||
36 | |||
37 | int __init mxs_add_duart(const struct amba_device *dev) | ||
38 | { | ||
39 | return mxs_add_amba_device(dev); | ||
40 | } | ||
diff --git a/arch/arm/mach-mxs/devices/platform-duart.c b/arch/arm/mach-mxs/devices/platform-duart.c deleted file mode 100644 index 2fe0df5b0aa..00000000000 --- a/arch/arm/mach-mxs/devices/platform-duart.c +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009-2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * Copyright 2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it under | ||
8 | * the terms of the GNU General Public License version 2 as published by the | ||
9 | * Free Software Foundation. | ||
10 | */ | ||
11 | #include <mach/mx23.h> | ||
12 | #include <mach/mx28.h> | ||
13 | #include <mach/devices-common.h> | ||
14 | |||
15 | #define mxs_duart_data_entry(soc) \ | ||
16 | { \ | ||
17 | .iobase = soc ## _DUART_BASE_ADDR, \ | ||
18 | .irq = soc ## _INT_DUART, \ | ||
19 | } | ||
20 | |||
21 | #ifdef CONFIG_SOC_IMX23 | ||
22 | const struct mxs_duart_data mx23_duart_data __initconst = | ||
23 | mxs_duart_data_entry(MX23); | ||
24 | #endif | ||
25 | |||
26 | #ifdef CONFIG_SOC_IMX28 | ||
27 | const struct mxs_duart_data mx28_duart_data __initconst = | ||
28 | mxs_duart_data_entry(MX28); | ||
29 | #endif | ||
30 | |||
31 | struct platform_device *__init mxs_add_duart( | ||
32 | const struct mxs_duart_data *data) | ||
33 | { | ||
34 | struct resource res[] = { | ||
35 | { | ||
36 | .start = data->iobase, | ||
37 | .end = data->iobase + SZ_8K - 1, | ||
38 | .flags = IORESOURCE_MEM, | ||
39 | }, { | ||
40 | .start = data->irq, | ||
41 | .end = data->irq, | ||
42 | .flags = IORESOURCE_IRQ, | ||
43 | }, | ||
44 | }; | ||
45 | |||
46 | return mxs_add_platform_device("mxs-duart", 0, res, ARRAY_SIZE(res), | ||
47 | NULL, 0); | ||
48 | } | ||
diff --git a/arch/arm/mach-mxs/devices/platform-fec.c b/arch/arm/mach-mxs/devices/platform-fec.c index c08168cf3de..c42dff72b46 100644 --- a/arch/arm/mach-mxs/devices/platform-fec.c +++ b/arch/arm/mach-mxs/devices/platform-fec.c | |||
@@ -45,6 +45,6 @@ struct platform_device *__init mxs_add_fec( | |||
45 | }, | 45 | }, |
46 | }; | 46 | }; |
47 | 47 | ||
48 | return mxs_add_platform_device("fec", data->id, | 48 | return mxs_add_platform_device("imx28-fec", data->id, |
49 | res, ARRAY_SIZE(res), pdata, sizeof(*pdata)); | 49 | res, ARRAY_SIZE(res), pdata, sizeof(*pdata)); |
50 | } | 50 | } |
diff --git a/arch/arm/mach-mxs/gpio.c b/arch/arm/mach-mxs/gpio.c index d7ad7a61366..cb0c0e83a52 100644 --- a/arch/arm/mach-mxs/gpio.c +++ b/arch/arm/mach-mxs/gpio.c | |||
@@ -139,6 +139,8 @@ static void mxs_gpio_irq_handler(u32 irq, struct irq_desc *desc) | |||
139 | struct mxs_gpio_port *port = (struct mxs_gpio_port *)get_irq_data(irq); | 139 | struct mxs_gpio_port *port = (struct mxs_gpio_port *)get_irq_data(irq); |
140 | u32 gpio_irq_no_base = port->virtual_irq_start; | 140 | u32 gpio_irq_no_base = port->virtual_irq_start; |
141 | 141 | ||
142 | desc->irq_data.chip->irq_ack(&desc->irq_data); | ||
143 | |||
142 | irq_stat = __raw_readl(port->base + PINCTRL_IRQSTAT(port->id)) & | 144 | irq_stat = __raw_readl(port->base + PINCTRL_IRQSTAT(port->id)) & |
143 | __raw_readl(port->base + PINCTRL_IRQEN(port->id)); | 145 | __raw_readl(port->base + PINCTRL_IRQEN(port->id)); |
144 | 146 | ||
diff --git a/arch/arm/mach-mxs/include/mach/clock.h b/arch/arm/mach-mxs/include/mach/clock.h index 041e276d8a3..592c9ab5d76 100644 --- a/arch/arm/mach-mxs/include/mach/clock.h +++ b/arch/arm/mach-mxs/include/mach/clock.h | |||
@@ -29,8 +29,6 @@ struct clk { | |||
29 | int id; | 29 | int id; |
30 | /* Source clock this clk depends on */ | 30 | /* Source clock this clk depends on */ |
31 | struct clk *parent; | 31 | struct clk *parent; |
32 | /* Secondary clock to enable/disable with this clock */ | ||
33 | struct clk *secondary; | ||
34 | /* Reference count of clock enable/disable */ | 32 | /* Reference count of clock enable/disable */ |
35 | __s8 usecount; | 33 | __s8 usecount; |
36 | /* Register bit position for clock's enable/disable control. */ | 34 | /* Register bit position for clock's enable/disable control. */ |
diff --git a/arch/arm/mach-mxs/include/mach/devices-common.h b/arch/arm/mach-mxs/include/mach/devices-common.h index 3da48d4d327..6c3d1a10343 100644 --- a/arch/arm/mach-mxs/include/mach/devices-common.h +++ b/arch/arm/mach-mxs/include/mach/devices-common.h | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/platform_device.h> | 10 | #include <linux/platform_device.h> |
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/amba/bus.h> | ||
12 | 13 | ||
13 | struct platform_device *mxs_add_platform_device_dmamask( | 14 | struct platform_device *mxs_add_platform_device_dmamask( |
14 | const char *name, int id, | 15 | const char *name, int id, |
@@ -24,14 +25,10 @@ static inline struct platform_device *mxs_add_platform_device( | |||
24 | name, id, res, num_resources, data, size_data, 0); | 25 | name, id, res, num_resources, data, size_data, 0); |
25 | } | 26 | } |
26 | 27 | ||
28 | int __init mxs_add_amba_device(const struct amba_device *dev); | ||
29 | |||
27 | /* duart */ | 30 | /* duart */ |
28 | struct mxs_duart_data { | 31 | int __init mxs_add_duart(const struct amba_device *dev); |
29 | resource_size_t iobase; | ||
30 | resource_size_t iosize; | ||
31 | resource_size_t irq; | ||
32 | }; | ||
33 | struct platform_device *__init mxs_add_duart( | ||
34 | const struct mxs_duart_data *data); | ||
35 | 32 | ||
36 | /* fec */ | 33 | /* fec */ |
37 | #include <linux/fec.h> | 34 | #include <linux/fec.h> |
diff --git a/arch/arm/mach-mxs/mach-mx28evk.c b/arch/arm/mach-mxs/mach-mx28evk.c index d162e95910f..8e2c5975001 100644 --- a/arch/arm/mach-mxs/mach-mx28evk.c +++ b/arch/arm/mach-mxs/mach-mx28evk.c | |||
@@ -57,6 +57,19 @@ static const iomux_cfg_t mx28evk_pads[] __initconst = { | |||
57 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | 57 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), |
58 | MX28_PAD_ENET_CLK__CLKCTRL_ENET | | 58 | MX28_PAD_ENET_CLK__CLKCTRL_ENET | |
59 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | 59 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), |
60 | /* fec1 */ | ||
61 | MX28_PAD_ENET0_CRS__ENET1_RX_EN | | ||
62 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
63 | MX28_PAD_ENET0_RXD2__ENET1_RXD0 | | ||
64 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
65 | MX28_PAD_ENET0_RXD3__ENET1_RXD1 | | ||
66 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
67 | MX28_PAD_ENET0_COL__ENET1_TX_EN | | ||
68 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
69 | MX28_PAD_ENET0_TXD2__ENET1_TXD0 | | ||
70 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
71 | MX28_PAD_ENET0_TXD3__ENET1_TXD1 | | ||
72 | (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP), | ||
60 | /* phy power line */ | 73 | /* phy power line */ |
61 | MX28_PAD_SSP1_DATA3__GPIO_2_15 | | 74 | MX28_PAD_SSP1_DATA3__GPIO_2_15 | |
62 | (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | 75 | (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), |
@@ -106,8 +119,14 @@ static void __init mx28evk_fec_reset(void) | |||
106 | gpio_set_value(MX28EVK_FEC_PHY_RESET, 1); | 119 | gpio_set_value(MX28EVK_FEC_PHY_RESET, 1); |
107 | } | 120 | } |
108 | 121 | ||
109 | static const struct fec_platform_data mx28_fec_pdata __initconst = { | 122 | static struct fec_platform_data mx28_fec_pdata[] = { |
110 | .phy = PHY_INTERFACE_MODE_RMII, | 123 | { |
124 | /* fec0 */ | ||
125 | .phy = PHY_INTERFACE_MODE_RMII, | ||
126 | }, { | ||
127 | /* fec1 */ | ||
128 | .phy = PHY_INTERFACE_MODE_RMII, | ||
129 | }, | ||
111 | }; | 130 | }; |
112 | 131 | ||
113 | static void __init mx28evk_init(void) | 132 | static void __init mx28evk_init(void) |
@@ -117,7 +136,8 @@ static void __init mx28evk_init(void) | |||
117 | mx28_add_duart(); | 136 | mx28_add_duart(); |
118 | 137 | ||
119 | mx28evk_fec_reset(); | 138 | mx28evk_fec_reset(); |
120 | mx28_add_fec(0, &mx28_fec_pdata); | 139 | mx28_add_fec(0, &mx28_fec_pdata[0]); |
140 | mx28_add_fec(1, &mx28_fec_pdata[1]); | ||
121 | } | 141 | } |
122 | 142 | ||
123 | static void __init mx28evk_timer_init(void) | 143 | static void __init mx28evk_timer_init(void) |
diff --git a/arch/arm/mach-netx/generic.c b/arch/arm/mach-netx/generic.c index 43da8bb4926..29ffa750fbe 100644 --- a/arch/arm/mach-netx/generic.c +++ b/arch/arm/mach-netx/generic.c | |||
@@ -88,13 +88,13 @@ netx_hif_demux_handler(unsigned int irq_unused, struct irq_desc *desc) | |||
88 | } | 88 | } |
89 | 89 | ||
90 | static int | 90 | static int |
91 | netx_hif_irq_type(unsigned int _irq, unsigned int type) | 91 | netx_hif_irq_type(struct irq_data *d, unsigned int type) |
92 | { | 92 | { |
93 | unsigned int val, irq; | 93 | unsigned int val, irq; |
94 | 94 | ||
95 | val = readl(NETX_DPMAS_IF_CONF1); | 95 | val = readl(NETX_DPMAS_IF_CONF1); |
96 | 96 | ||
97 | irq = _irq - NETX_IRQ_HIF_CHAINED(0); | 97 | irq = d->irq - NETX_IRQ_HIF_CHAINED(0); |
98 | 98 | ||
99 | if (type & IRQ_TYPE_EDGE_RISING) { | 99 | if (type & IRQ_TYPE_EDGE_RISING) { |
100 | DEBUG_IRQ("rising edges\n"); | 100 | DEBUG_IRQ("rising edges\n"); |
@@ -119,49 +119,49 @@ netx_hif_irq_type(unsigned int _irq, unsigned int type) | |||
119 | } | 119 | } |
120 | 120 | ||
121 | static void | 121 | static void |
122 | netx_hif_ack_irq(unsigned int _irq) | 122 | netx_hif_ack_irq(struct irq_data *d) |
123 | { | 123 | { |
124 | unsigned int val, irq; | 124 | unsigned int val, irq; |
125 | 125 | ||
126 | irq = _irq - NETX_IRQ_HIF_CHAINED(0); | 126 | irq = d->irq - NETX_IRQ_HIF_CHAINED(0); |
127 | writel((1 << 24) << irq, NETX_DPMAS_INT_STAT); | 127 | writel((1 << 24) << irq, NETX_DPMAS_INT_STAT); |
128 | 128 | ||
129 | val = readl(NETX_DPMAS_INT_EN); | 129 | val = readl(NETX_DPMAS_INT_EN); |
130 | val &= ~((1 << 24) << irq); | 130 | val &= ~((1 << 24) << irq); |
131 | writel(val, NETX_DPMAS_INT_EN); | 131 | writel(val, NETX_DPMAS_INT_EN); |
132 | 132 | ||
133 | DEBUG_IRQ("%s: irq %d\n", __func__, _irq); | 133 | DEBUG_IRQ("%s: irq %d\n", __func__, d->irq); |
134 | } | 134 | } |
135 | 135 | ||
136 | static void | 136 | static void |
137 | netx_hif_mask_irq(unsigned int _irq) | 137 | netx_hif_mask_irq(struct irq_data *d) |
138 | { | 138 | { |
139 | unsigned int val, irq; | 139 | unsigned int val, irq; |
140 | 140 | ||
141 | irq = _irq - NETX_IRQ_HIF_CHAINED(0); | 141 | irq = d->irq - NETX_IRQ_HIF_CHAINED(0); |
142 | val = readl(NETX_DPMAS_INT_EN); | 142 | val = readl(NETX_DPMAS_INT_EN); |
143 | val &= ~((1 << 24) << irq); | 143 | val &= ~((1 << 24) << irq); |
144 | writel(val, NETX_DPMAS_INT_EN); | 144 | writel(val, NETX_DPMAS_INT_EN); |
145 | DEBUG_IRQ("%s: irq %d\n", __func__, _irq); | 145 | DEBUG_IRQ("%s: irq %d\n", __func__, d->irq); |
146 | } | 146 | } |
147 | 147 | ||
148 | static void | 148 | static void |
149 | netx_hif_unmask_irq(unsigned int _irq) | 149 | netx_hif_unmask_irq(struct irq_data *d) |
150 | { | 150 | { |
151 | unsigned int val, irq; | 151 | unsigned int val, irq; |
152 | 152 | ||
153 | irq = _irq - NETX_IRQ_HIF_CHAINED(0); | 153 | irq = d->irq - NETX_IRQ_HIF_CHAINED(0); |
154 | val = readl(NETX_DPMAS_INT_EN); | 154 | val = readl(NETX_DPMAS_INT_EN); |
155 | val |= (1 << 24) << irq; | 155 | val |= (1 << 24) << irq; |
156 | writel(val, NETX_DPMAS_INT_EN); | 156 | writel(val, NETX_DPMAS_INT_EN); |
157 | DEBUG_IRQ("%s: irq %d\n", __func__, _irq); | 157 | DEBUG_IRQ("%s: irq %d\n", __func__, d->irq); |
158 | } | 158 | } |
159 | 159 | ||
160 | static struct irq_chip netx_hif_chip = { | 160 | static struct irq_chip netx_hif_chip = { |
161 | .ack = netx_hif_ack_irq, | 161 | .irq_ack = netx_hif_ack_irq, |
162 | .mask = netx_hif_mask_irq, | 162 | .irq_mask = netx_hif_mask_irq, |
163 | .unmask = netx_hif_unmask_irq, | 163 | .irq_unmask = netx_hif_unmask_irq, |
164 | .set_type = netx_hif_irq_type, | 164 | .irq_set_type = netx_hif_irq_type, |
165 | }; | 165 | }; |
166 | 166 | ||
167 | void __init netx_init_irq(void) | 167 | void __init netx_init_irq(void) |
diff --git a/arch/arm/mach-ns9xxx/board-a9m9750dev.c b/arch/arm/mach-ns9xxx/board-a9m9750dev.c index b45bb3b802f..0c0d5248c36 100644 --- a/arch/arm/mach-ns9xxx/board-a9m9750dev.c +++ b/arch/arm/mach-ns9xxx/board-a9m9750dev.c | |||
@@ -37,44 +37,44 @@ void __init board_a9m9750dev_map_io(void) | |||
37 | ARRAY_SIZE(board_a9m9750dev_io_desc)); | 37 | ARRAY_SIZE(board_a9m9750dev_io_desc)); |
38 | } | 38 | } |
39 | 39 | ||
40 | static void a9m9750dev_fpga_ack_irq(unsigned int irq) | 40 | static void a9m9750dev_fpga_ack_irq(struct irq_data *d) |
41 | { | 41 | { |
42 | /* nothing */ | 42 | /* nothing */ |
43 | } | 43 | } |
44 | 44 | ||
45 | static void a9m9750dev_fpga_mask_irq(unsigned int irq) | 45 | static void a9m9750dev_fpga_mask_irq(struct irq_data *d) |
46 | { | 46 | { |
47 | u8 ier; | 47 | u8 ier; |
48 | 48 | ||
49 | ier = __raw_readb(FPGA_IER); | 49 | ier = __raw_readb(FPGA_IER); |
50 | 50 | ||
51 | ier &= ~(1 << (irq - FPGA_IRQ(0))); | 51 | ier &= ~(1 << (d->irq - FPGA_IRQ(0))); |
52 | 52 | ||
53 | __raw_writeb(ier, FPGA_IER); | 53 | __raw_writeb(ier, FPGA_IER); |
54 | } | 54 | } |
55 | 55 | ||
56 | static void a9m9750dev_fpga_maskack_irq(unsigned int irq) | 56 | static void a9m9750dev_fpga_maskack_irq(struct irq_data *d) |
57 | { | 57 | { |
58 | a9m9750dev_fpga_mask_irq(irq); | 58 | a9m9750dev_fpga_mask_irq(d); |
59 | a9m9750dev_fpga_ack_irq(irq); | 59 | a9m9750dev_fpga_ack_irq(d); |
60 | } | 60 | } |
61 | 61 | ||
62 | static void a9m9750dev_fpga_unmask_irq(unsigned int irq) | 62 | static void a9m9750dev_fpga_unmask_irq(struct irq_data *d) |
63 | { | 63 | { |
64 | u8 ier; | 64 | u8 ier; |
65 | 65 | ||
66 | ier = __raw_readb(FPGA_IER); | 66 | ier = __raw_readb(FPGA_IER); |
67 | 67 | ||
68 | ier |= 1 << (irq - FPGA_IRQ(0)); | 68 | ier |= 1 << (d->irq - FPGA_IRQ(0)); |
69 | 69 | ||
70 | __raw_writeb(ier, FPGA_IER); | 70 | __raw_writeb(ier, FPGA_IER); |
71 | } | 71 | } |
72 | 72 | ||
73 | static struct irq_chip a9m9750dev_fpga_chip = { | 73 | static struct irq_chip a9m9750dev_fpga_chip = { |
74 | .ack = a9m9750dev_fpga_ack_irq, | 74 | .irq_ack = a9m9750dev_fpga_ack_irq, |
75 | .mask = a9m9750dev_fpga_mask_irq, | 75 | .irq_mask = a9m9750dev_fpga_mask_irq, |
76 | .mask_ack = a9m9750dev_fpga_maskack_irq, | 76 | .irq_mask_ack = a9m9750dev_fpga_maskack_irq, |
77 | .unmask = a9m9750dev_fpga_unmask_irq, | 77 | .irq_unmask = a9m9750dev_fpga_unmask_irq, |
78 | }; | 78 | }; |
79 | 79 | ||
80 | static void a9m9750dev_fpga_demux_handler(unsigned int irq, | 80 | static void a9m9750dev_fpga_demux_handler(unsigned int irq, |
@@ -82,7 +82,7 @@ static void a9m9750dev_fpga_demux_handler(unsigned int irq, | |||
82 | { | 82 | { |
83 | u8 stat = __raw_readb(FPGA_ISR); | 83 | u8 stat = __raw_readb(FPGA_ISR); |
84 | 84 | ||
85 | desc->chip->mask_ack(irq); | 85 | desc->irq_data.chip->irq_mask_ack(&desc->irq_data); |
86 | 86 | ||
87 | while (stat != 0) { | 87 | while (stat != 0) { |
88 | int irqno = fls(stat) - 1; | 88 | int irqno = fls(stat) - 1; |
@@ -92,7 +92,7 @@ static void a9m9750dev_fpga_demux_handler(unsigned int irq, | |||
92 | generic_handle_irq(FPGA_IRQ(irqno)); | 92 | generic_handle_irq(FPGA_IRQ(irqno)); |
93 | } | 93 | } |
94 | 94 | ||
95 | desc->chip->unmask(irq); | 95 | desc->irq_data.chip->irq_unmask(&desc->irq_data); |
96 | } | 96 | } |
97 | 97 | ||
98 | void __init board_a9m9750dev_init_irq(void) | 98 | void __init board_a9m9750dev_init_irq(void) |
diff --git a/arch/arm/mach-ns9xxx/irq.c b/arch/arm/mach-ns9xxx/irq.c index 038f24d4702..389fa5c669d 100644 --- a/arch/arm/mach-ns9xxx/irq.c +++ b/arch/arm/mach-ns9xxx/irq.c | |||
@@ -22,40 +22,40 @@ | |||
22 | #define irq2prio(i) (i) | 22 | #define irq2prio(i) (i) |
23 | #define prio2irq(p) (p) | 23 | #define prio2irq(p) (p) |
24 | 24 | ||
25 | static void ns9xxx_mask_irq(unsigned int irq) | 25 | static void ns9xxx_mask_irq(struct irq_data *d) |
26 | { | 26 | { |
27 | /* XXX: better use cpp symbols */ | 27 | /* XXX: better use cpp symbols */ |
28 | int prio = irq2prio(irq); | 28 | int prio = irq2prio(d->irq); |
29 | u32 ic = __raw_readl(SYS_IC(prio / 4)); | 29 | u32 ic = __raw_readl(SYS_IC(prio / 4)); |
30 | ic &= ~(1 << (7 + 8 * (3 - (prio & 3)))); | 30 | ic &= ~(1 << (7 + 8 * (3 - (prio & 3)))); |
31 | __raw_writel(ic, SYS_IC(prio / 4)); | 31 | __raw_writel(ic, SYS_IC(prio / 4)); |
32 | } | 32 | } |
33 | 33 | ||
34 | static void ns9xxx_ack_irq(unsigned int irq) | 34 | static void ns9xxx_ack_irq(struct irq_data *d) |
35 | { | 35 | { |
36 | __raw_writel(0, SYS_ISRADDR); | 36 | __raw_writel(0, SYS_ISRADDR); |
37 | } | 37 | } |
38 | 38 | ||
39 | static void ns9xxx_maskack_irq(unsigned int irq) | 39 | static void ns9xxx_maskack_irq(struct irq_data *d) |
40 | { | 40 | { |
41 | ns9xxx_mask_irq(irq); | 41 | ns9xxx_mask_irq(d); |
42 | ns9xxx_ack_irq(irq); | 42 | ns9xxx_ack_irq(d); |
43 | } | 43 | } |
44 | 44 | ||
45 | static void ns9xxx_unmask_irq(unsigned int irq) | 45 | static void ns9xxx_unmask_irq(struct irq_data *d) |
46 | { | 46 | { |
47 | /* XXX: better use cpp symbols */ | 47 | /* XXX: better use cpp symbols */ |
48 | int prio = irq2prio(irq); | 48 | int prio = irq2prio(d->irq); |
49 | u32 ic = __raw_readl(SYS_IC(prio / 4)); | 49 | u32 ic = __raw_readl(SYS_IC(prio / 4)); |
50 | ic |= 1 << (7 + 8 * (3 - (prio & 3))); | 50 | ic |= 1 << (7 + 8 * (3 - (prio & 3))); |
51 | __raw_writel(ic, SYS_IC(prio / 4)); | 51 | __raw_writel(ic, SYS_IC(prio / 4)); |
52 | } | 52 | } |
53 | 53 | ||
54 | static struct irq_chip ns9xxx_chip = { | 54 | static struct irq_chip ns9xxx_chip = { |
55 | .ack = ns9xxx_ack_irq, | 55 | .irq_ack = ns9xxx_ack_irq, |
56 | .mask = ns9xxx_mask_irq, | 56 | .irq_mask = ns9xxx_mask_irq, |
57 | .mask_ack = ns9xxx_maskack_irq, | 57 | .irq_mask_ack = ns9xxx_maskack_irq, |
58 | .unmask = ns9xxx_unmask_irq, | 58 | .irq_unmask = ns9xxx_unmask_irq, |
59 | }; | 59 | }; |
60 | 60 | ||
61 | #if 0 | 61 | #if 0 |
@@ -92,10 +92,10 @@ static void handle_prio_irq(unsigned int irq, struct irq_desc *desc) | |||
92 | 92 | ||
93 | if (desc->status & IRQ_DISABLED) | 93 | if (desc->status & IRQ_DISABLED) |
94 | out_mask: | 94 | out_mask: |
95 | desc->chip->mask(irq); | 95 | desc->irq_data.chip->irq_mask(&desc->irq_data); |
96 | 96 | ||
97 | /* ack unconditionally to unmask lower prio irqs */ | 97 | /* ack unconditionally to unmask lower prio irqs */ |
98 | desc->chip->ack(irq); | 98 | desc->irq_data.chip->irq_ack(&desc->irq_data); |
99 | 99 | ||
100 | raw_spin_unlock(&desc->lock); | 100 | raw_spin_unlock(&desc->lock); |
101 | } | 101 | } |
diff --git a/arch/arm/mach-nuc93x/irq.c b/arch/arm/mach-nuc93x/irq.c index a7a88ea4ec3..1f8a05a2283 100644 --- a/arch/arm/mach-nuc93x/irq.c +++ b/arch/arm/mach-nuc93x/irq.c | |||
@@ -25,9 +25,9 @@ | |||
25 | #include <mach/hardware.h> | 25 | #include <mach/hardware.h> |
26 | #include <mach/regs-irq.h> | 26 | #include <mach/regs-irq.h> |
27 | 27 | ||
28 | static void nuc93x_irq_mask(unsigned int irq) | 28 | static void nuc93x_irq_mask(struct irq_data *d) |
29 | { | 29 | { |
30 | __raw_writel(1 << irq, REG_AIC_MDCR); | 30 | __raw_writel(1 << d->irq, REG_AIC_MDCR); |
31 | } | 31 | } |
32 | 32 | ||
33 | /* | 33 | /* |
@@ -35,21 +35,21 @@ static void nuc93x_irq_mask(unsigned int irq) | |||
35 | * to REG_AIC_EOSCR for ACK | 35 | * to REG_AIC_EOSCR for ACK |
36 | */ | 36 | */ |
37 | 37 | ||
38 | static void nuc93x_irq_ack(unsigned int irq) | 38 | static void nuc93x_irq_ack(struct irq_data *d) |
39 | { | 39 | { |
40 | __raw_writel(0x01, REG_AIC_EOSCR); | 40 | __raw_writel(0x01, REG_AIC_EOSCR); |
41 | } | 41 | } |
42 | 42 | ||
43 | static void nuc93x_irq_unmask(unsigned int irq) | 43 | static void nuc93x_irq_unmask(struct irq_data *d) |
44 | { | 44 | { |
45 | __raw_writel(1 << irq, REG_AIC_MECR); | 45 | __raw_writel(1 << d->irq, REG_AIC_MECR); |
46 | 46 | ||
47 | } | 47 | } |
48 | 48 | ||
49 | static struct irq_chip nuc93x_irq_chip = { | 49 | static struct irq_chip nuc93x_irq_chip = { |
50 | .ack = nuc93x_irq_ack, | 50 | .irq_ack = nuc93x_irq_ack, |
51 | .mask = nuc93x_irq_mask, | 51 | .irq_mask = nuc93x_irq_mask, |
52 | .unmask = nuc93x_irq_unmask, | 52 | .irq_unmask = nuc93x_irq_unmask, |
53 | }; | 53 | }; |
54 | 54 | ||
55 | void __init nuc93x_init_irq(void) | 55 | void __init nuc93x_init_irq(void) |
diff --git a/arch/arm/mach-omap1/Kconfig b/arch/arm/mach-omap1/Kconfig index 8d2f2daba0c..e0a028161dd 100644 --- a/arch/arm/mach-omap1/Kconfig +++ b/arch/arm/mach-omap1/Kconfig | |||
@@ -9,6 +9,7 @@ config ARCH_OMAP730 | |||
9 | depends on ARCH_OMAP1 | 9 | depends on ARCH_OMAP1 |
10 | bool "OMAP730 Based System" | 10 | bool "OMAP730 Based System" |
11 | select CPU_ARM926T | 11 | select CPU_ARM926T |
12 | select OMAP_MPU_TIMER | ||
12 | select ARCH_OMAP_OTG | 13 | select ARCH_OMAP_OTG |
13 | 14 | ||
14 | config ARCH_OMAP850 | 15 | config ARCH_OMAP850 |
@@ -22,6 +23,7 @@ config ARCH_OMAP15XX | |||
22 | default y | 23 | default y |
23 | bool "OMAP15xx Based System" | 24 | bool "OMAP15xx Based System" |
24 | select CPU_ARM925T | 25 | select CPU_ARM925T |
26 | select OMAP_MPU_TIMER | ||
25 | 27 | ||
26 | config ARCH_OMAP16XX | 28 | config ARCH_OMAP16XX |
27 | depends on ARCH_OMAP1 | 29 | depends on ARCH_OMAP1 |
diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile index 6ee19504845..ba6009f2767 100644 --- a/arch/arm/mach-omap1/Makefile +++ b/arch/arm/mach-omap1/Makefile | |||
@@ -3,12 +3,11 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | # Common support | 5 | # Common support |
6 | obj-y := io.o id.o sram.o irq.o mux.o flash.o serial.o devices.o dma.o | 6 | obj-y := io.o id.o sram.o time.o irq.o mux.o flash.o serial.o devices.o dma.o |
7 | obj-y += clock.o clock_data.o opp_data.o | 7 | obj-y += clock.o clock_data.o opp_data.o |
8 | 8 | ||
9 | obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o | 9 | obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o |
10 | 10 | ||
11 | obj-$(CONFIG_OMAP_MPU_TIMER) += time.o | ||
12 | obj-$(CONFIG_OMAP_32K_TIMER) += timer32k.o | 11 | obj-$(CONFIG_OMAP_32K_TIMER) += timer32k.o |
13 | 12 | ||
14 | # Power Management | 13 | # Power Management |
diff --git a/arch/arm/mach-omap1/ams-delta-fiq.c b/arch/arm/mach-omap1/ams-delta-fiq.c index 6c994e2d887..152b32c15e2 100644 --- a/arch/arm/mach-omap1/ams-delta-fiq.c +++ b/arch/arm/mach-omap1/ams-delta-fiq.c | |||
@@ -49,7 +49,7 @@ static irqreturn_t deferred_fiq(int irq, void *dev_id) | |||
49 | 49 | ||
50 | irq_desc = irq_to_desc(IH_GPIO_BASE); | 50 | irq_desc = irq_to_desc(IH_GPIO_BASE); |
51 | if (irq_desc) | 51 | if (irq_desc) |
52 | irq_chip = irq_desc->chip; | 52 | irq_chip = irq_desc->irq_data.chip; |
53 | 53 | ||
54 | /* | 54 | /* |
55 | * For each handled GPIO interrupt, keep calling its interrupt handler | 55 | * For each handled GPIO interrupt, keep calling its interrupt handler |
@@ -62,13 +62,15 @@ static irqreturn_t deferred_fiq(int irq, void *dev_id) | |||
62 | 62 | ||
63 | while (irq_counter[gpio] < fiq_count) { | 63 | while (irq_counter[gpio] < fiq_count) { |
64 | if (gpio != AMS_DELTA_GPIO_PIN_KEYBRD_CLK) { | 64 | if (gpio != AMS_DELTA_GPIO_PIN_KEYBRD_CLK) { |
65 | struct irq_data *d = irq_get_irq_data(irq_num); | ||
66 | |||
65 | /* | 67 | /* |
66 | * It looks like handle_edge_irq() that | 68 | * It looks like handle_edge_irq() that |
67 | * OMAP GPIO edge interrupts default to, | 69 | * OMAP GPIO edge interrupts default to, |
68 | * expects interrupt already unmasked. | 70 | * expects interrupt already unmasked. |
69 | */ | 71 | */ |
70 | if (irq_chip && irq_chip->unmask) | 72 | if (irq_chip && irq_chip->irq_unmask) |
71 | irq_chip->unmask(irq_num); | 73 | irq_chip->irq_unmask(d); |
72 | } | 74 | } |
73 | generic_handle_irq(irq_num); | 75 | generic_handle_irq(irq_num); |
74 | 76 | ||
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index bd0495a9ac3..22cc8c8df6c 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c | |||
@@ -179,6 +179,22 @@ static struct omap_board_config_kernel ams_delta_config[] = { | |||
179 | { OMAP_TAG_LCD, &ams_delta_lcd_config }, | 179 | { OMAP_TAG_LCD, &ams_delta_lcd_config }, |
180 | }; | 180 | }; |
181 | 181 | ||
182 | static struct resource ams_delta_nand_resources[] = { | ||
183 | [0] = { | ||
184 | .start = OMAP1_MPUIO_BASE, | ||
185 | .end = OMAP1_MPUIO_BASE + | ||
186 | OMAP_MPUIO_IO_CNTL + sizeof(u32) - 1, | ||
187 | .flags = IORESOURCE_MEM, | ||
188 | }, | ||
189 | }; | ||
190 | |||
191 | static struct platform_device ams_delta_nand_device = { | ||
192 | .name = "ams-delta-nand", | ||
193 | .id = -1, | ||
194 | .num_resources = ARRAY_SIZE(ams_delta_nand_resources), | ||
195 | .resource = ams_delta_nand_resources, | ||
196 | }; | ||
197 | |||
182 | static struct resource ams_delta_kp_resources[] = { | 198 | static struct resource ams_delta_kp_resources[] = { |
183 | [0] = { | 199 | [0] = { |
184 | .start = INT_KEYBOARD, | 200 | .start = INT_KEYBOARD, |
@@ -265,6 +281,7 @@ static struct omap1_cam_platform_data ams_delta_camera_platform_data = { | |||
265 | }; | 281 | }; |
266 | 282 | ||
267 | static struct platform_device *ams_delta_devices[] __initdata = { | 283 | static struct platform_device *ams_delta_devices[] __initdata = { |
284 | &ams_delta_nand_device, | ||
268 | &ams_delta_kp_device, | 285 | &ams_delta_kp_device, |
269 | &ams_delta_lcd_device, | 286 | &ams_delta_lcd_device, |
270 | &ams_delta_led_device, | 287 | &ams_delta_led_device, |
diff --git a/arch/arm/mach-omap1/fpga.c b/arch/arm/mach-omap1/fpga.c index 8780e75cdc3..0ace7998aaa 100644 --- a/arch/arm/mach-omap1/fpga.c +++ b/arch/arm/mach-omap1/fpga.c | |||
@@ -30,9 +30,9 @@ | |||
30 | #include <plat/fpga.h> | 30 | #include <plat/fpga.h> |
31 | #include <mach/gpio.h> | 31 | #include <mach/gpio.h> |
32 | 32 | ||
33 | static void fpga_mask_irq(unsigned int irq) | 33 | static void fpga_mask_irq(struct irq_data *d) |
34 | { | 34 | { |
35 | irq -= OMAP_FPGA_IRQ_BASE; | 35 | unsigned int irq = d->irq - OMAP_FPGA_IRQ_BASE; |
36 | 36 | ||
37 | if (irq < 8) | 37 | if (irq < 8) |
38 | __raw_writeb((__raw_readb(OMAP1510_FPGA_IMR_LO) | 38 | __raw_writeb((__raw_readb(OMAP1510_FPGA_IMR_LO) |
@@ -58,14 +58,14 @@ static inline u32 get_fpga_unmasked_irqs(void) | |||
58 | } | 58 | } |
59 | 59 | ||
60 | 60 | ||
61 | static void fpga_ack_irq(unsigned int irq) | 61 | static void fpga_ack_irq(struct irq_data *d) |
62 | { | 62 | { |
63 | /* Don't need to explicitly ACK FPGA interrupts */ | 63 | /* Don't need to explicitly ACK FPGA interrupts */ |
64 | } | 64 | } |
65 | 65 | ||
66 | static void fpga_unmask_irq(unsigned int irq) | 66 | static void fpga_unmask_irq(struct irq_data *d) |
67 | { | 67 | { |
68 | irq -= OMAP_FPGA_IRQ_BASE; | 68 | unsigned int irq = d->irq - OMAP_FPGA_IRQ_BASE; |
69 | 69 | ||
70 | if (irq < 8) | 70 | if (irq < 8) |
71 | __raw_writeb((__raw_readb(OMAP1510_FPGA_IMR_LO) | (1 << irq)), | 71 | __raw_writeb((__raw_readb(OMAP1510_FPGA_IMR_LO) | (1 << irq)), |
@@ -78,10 +78,10 @@ static void fpga_unmask_irq(unsigned int irq) | |||
78 | | (1 << (irq - 16))), INNOVATOR_FPGA_IMR2); | 78 | | (1 << (irq - 16))), INNOVATOR_FPGA_IMR2); |
79 | } | 79 | } |
80 | 80 | ||
81 | static void fpga_mask_ack_irq(unsigned int irq) | 81 | static void fpga_mask_ack_irq(struct irq_data *d) |
82 | { | 82 | { |
83 | fpga_mask_irq(irq); | 83 | fpga_mask_irq(d); |
84 | fpga_ack_irq(irq); | 84 | fpga_ack_irq(d); |
85 | } | 85 | } |
86 | 86 | ||
87 | void innovator_fpga_IRQ_demux(unsigned int irq, struct irq_desc *desc) | 87 | void innovator_fpga_IRQ_demux(unsigned int irq, struct irq_desc *desc) |
@@ -105,17 +105,17 @@ void innovator_fpga_IRQ_demux(unsigned int irq, struct irq_desc *desc) | |||
105 | 105 | ||
106 | static struct irq_chip omap_fpga_irq_ack = { | 106 | static struct irq_chip omap_fpga_irq_ack = { |
107 | .name = "FPGA-ack", | 107 | .name = "FPGA-ack", |
108 | .ack = fpga_mask_ack_irq, | 108 | .irq_ack = fpga_mask_ack_irq, |
109 | .mask = fpga_mask_irq, | 109 | .irq_mask = fpga_mask_irq, |
110 | .unmask = fpga_unmask_irq, | 110 | .irq_unmask = fpga_unmask_irq, |
111 | }; | 111 | }; |
112 | 112 | ||
113 | 113 | ||
114 | static struct irq_chip omap_fpga_irq = { | 114 | static struct irq_chip omap_fpga_irq = { |
115 | .name = "FPGA", | 115 | .name = "FPGA", |
116 | .ack = fpga_ack_irq, | 116 | .irq_ack = fpga_ack_irq, |
117 | .mask = fpga_mask_irq, | 117 | .irq_mask = fpga_mask_irq, |
118 | .unmask = fpga_unmask_irq, | 118 | .irq_unmask = fpga_unmask_irq, |
119 | }; | 119 | }; |
120 | 120 | ||
121 | /* | 121 | /* |
diff --git a/arch/arm/mach-omap1/include/mach/entry-macro.S b/arch/arm/mach-omap1/include/mach/entry-macro.S index c9be6d4d83e..bfb4fb1d738 100644 --- a/arch/arm/mach-omap1/include/mach/entry-macro.S +++ b/arch/arm/mach-omap1/include/mach/entry-macro.S | |||
@@ -14,19 +14,6 @@ | |||
14 | #include <mach/irqs.h> | 14 | #include <mach/irqs.h> |
15 | #include <asm/hardware/gic.h> | 15 | #include <asm/hardware/gic.h> |
16 | 16 | ||
17 | /* | ||
18 | * We use __glue to avoid errors with multiple definitions of | ||
19 | * .globl omap_irq_flags as it's included from entry-armv.S but not | ||
20 | * from entry-common.S. | ||
21 | */ | ||
22 | #ifdef __glue | ||
23 | .pushsection .data | ||
24 | .globl omap_irq_flags | ||
25 | omap_irq_flags: | ||
26 | .word 0 | ||
27 | .popsection | ||
28 | #endif | ||
29 | |||
30 | .macro disable_fiq | 17 | .macro disable_fiq |
31 | .endm | 18 | .endm |
32 | 19 | ||
diff --git a/arch/arm/mach-omap1/irq.c b/arch/arm/mach-omap1/irq.c index 6bddbc869f4..731dd33bff5 100644 --- a/arch/arm/mach-omap1/irq.c +++ b/arch/arm/mach-omap1/irq.c | |||
@@ -57,6 +57,7 @@ struct omap_irq_bank { | |||
57 | unsigned long wake_enable; | 57 | unsigned long wake_enable; |
58 | }; | 58 | }; |
59 | 59 | ||
60 | u32 omap_irq_flags; | ||
60 | static unsigned int irq_bank_count; | 61 | static unsigned int irq_bank_count; |
61 | static struct omap_irq_bank *irq_banks; | 62 | static struct omap_irq_bank *irq_banks; |
62 | 63 | ||
@@ -70,48 +71,48 @@ static inline void irq_bank_writel(unsigned long value, int bank, int offset) | |||
70 | omap_writel(value, irq_banks[bank].base_reg + offset); | 71 | omap_writel(value, irq_banks[bank].base_reg + offset); |
71 | } | 72 | } |
72 | 73 | ||
73 | static void omap_ack_irq(unsigned int irq) | 74 | static void omap_ack_irq(struct irq_data *d) |
74 | { | 75 | { |
75 | if (irq > 31) | 76 | if (d->irq > 31) |
76 | omap_writel(0x1, OMAP_IH2_BASE + IRQ_CONTROL_REG_OFFSET); | 77 | omap_writel(0x1, OMAP_IH2_BASE + IRQ_CONTROL_REG_OFFSET); |
77 | 78 | ||
78 | omap_writel(0x1, OMAP_IH1_BASE + IRQ_CONTROL_REG_OFFSET); | 79 | omap_writel(0x1, OMAP_IH1_BASE + IRQ_CONTROL_REG_OFFSET); |
79 | } | 80 | } |
80 | 81 | ||
81 | static void omap_mask_irq(unsigned int irq) | 82 | static void omap_mask_irq(struct irq_data *d) |
82 | { | 83 | { |
83 | int bank = IRQ_BANK(irq); | 84 | int bank = IRQ_BANK(d->irq); |
84 | u32 l; | 85 | u32 l; |
85 | 86 | ||
86 | l = omap_readl(irq_banks[bank].base_reg + IRQ_MIR_REG_OFFSET); | 87 | l = omap_readl(irq_banks[bank].base_reg + IRQ_MIR_REG_OFFSET); |
87 | l |= 1 << IRQ_BIT(irq); | 88 | l |= 1 << IRQ_BIT(d->irq); |
88 | omap_writel(l, irq_banks[bank].base_reg + IRQ_MIR_REG_OFFSET); | 89 | omap_writel(l, irq_banks[bank].base_reg + IRQ_MIR_REG_OFFSET); |
89 | } | 90 | } |
90 | 91 | ||
91 | static void omap_unmask_irq(unsigned int irq) | 92 | static void omap_unmask_irq(struct irq_data *d) |
92 | { | 93 | { |
93 | int bank = IRQ_BANK(irq); | 94 | int bank = IRQ_BANK(d->irq); |
94 | u32 l; | 95 | u32 l; |
95 | 96 | ||
96 | l = omap_readl(irq_banks[bank].base_reg + IRQ_MIR_REG_OFFSET); | 97 | l = omap_readl(irq_banks[bank].base_reg + IRQ_MIR_REG_OFFSET); |
97 | l &= ~(1 << IRQ_BIT(irq)); | 98 | l &= ~(1 << IRQ_BIT(d->irq)); |
98 | omap_writel(l, irq_banks[bank].base_reg + IRQ_MIR_REG_OFFSET); | 99 | omap_writel(l, irq_banks[bank].base_reg + IRQ_MIR_REG_OFFSET); |
99 | } | 100 | } |
100 | 101 | ||
101 | static void omap_mask_ack_irq(unsigned int irq) | 102 | static void omap_mask_ack_irq(struct irq_data *d) |
102 | { | 103 | { |
103 | omap_mask_irq(irq); | 104 | omap_mask_irq(d); |
104 | omap_ack_irq(irq); | 105 | omap_ack_irq(d); |
105 | } | 106 | } |
106 | 107 | ||
107 | static int omap_wake_irq(unsigned int irq, unsigned int enable) | 108 | static int omap_wake_irq(struct irq_data *d, unsigned int enable) |
108 | { | 109 | { |
109 | int bank = IRQ_BANK(irq); | 110 | int bank = IRQ_BANK(d->irq); |
110 | 111 | ||
111 | if (enable) | 112 | if (enable) |
112 | irq_banks[bank].wake_enable |= IRQ_BIT(irq); | 113 | irq_banks[bank].wake_enable |= IRQ_BIT(d->irq); |
113 | else | 114 | else |
114 | irq_banks[bank].wake_enable &= ~IRQ_BIT(irq); | 115 | irq_banks[bank].wake_enable &= ~IRQ_BIT(d->irq); |
115 | 116 | ||
116 | return 0; | 117 | return 0; |
117 | } | 118 | } |
@@ -168,15 +169,14 @@ static struct omap_irq_bank omap1610_irq_banks[] = { | |||
168 | 169 | ||
169 | static struct irq_chip omap_irq_chip = { | 170 | static struct irq_chip omap_irq_chip = { |
170 | .name = "MPU", | 171 | .name = "MPU", |
171 | .ack = omap_mask_ack_irq, | 172 | .irq_ack = omap_mask_ack_irq, |
172 | .mask = omap_mask_irq, | 173 | .irq_mask = omap_mask_irq, |
173 | .unmask = omap_unmask_irq, | 174 | .irq_unmask = omap_unmask_irq, |
174 | .set_wake = omap_wake_irq, | 175 | .irq_set_wake = omap_wake_irq, |
175 | }; | 176 | }; |
176 | 177 | ||
177 | void __init omap_init_irq(void) | 178 | void __init omap_init_irq(void) |
178 | { | 179 | { |
179 | extern unsigned int omap_irq_flags; | ||
180 | int i, j; | 180 | int i, j; |
181 | 181 | ||
182 | #if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) | 182 | #if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) |
@@ -239,9 +239,9 @@ void __init omap_init_irq(void) | |||
239 | /* Unmask level 2 handler */ | 239 | /* Unmask level 2 handler */ |
240 | 240 | ||
241 | if (cpu_is_omap7xx()) | 241 | if (cpu_is_omap7xx()) |
242 | omap_unmask_irq(INT_7XX_IH2_IRQ); | 242 | omap_unmask_irq(irq_get_irq_data(INT_7XX_IH2_IRQ)); |
243 | else if (cpu_is_omap15xx()) | 243 | else if (cpu_is_omap15xx()) |
244 | omap_unmask_irq(INT_1510_IH2_IRQ); | 244 | omap_unmask_irq(irq_get_irq_data(INT_1510_IH2_IRQ)); |
245 | else if (cpu_is_omap16xx()) | 245 | else if (cpu_is_omap16xx()) |
246 | omap_unmask_irq(INT_1610_IH2_IRQ); | 246 | omap_unmask_irq(irq_get_irq_data(INT_1610_IH2_IRQ)); |
247 | } | 247 | } |
diff --git a/arch/arm/mach-omap1/lcd_dma.c b/arch/arm/mach-omap1/lcd_dma.c index c9088d85da0..453809359ba 100644 --- a/arch/arm/mach-omap1/lcd_dma.c +++ b/arch/arm/mach-omap1/lcd_dma.c | |||
@@ -37,7 +37,7 @@ int omap_lcd_dma_running(void) | |||
37 | * On OMAP1510, internal LCD controller will start the transfer | 37 | * On OMAP1510, internal LCD controller will start the transfer |
38 | * when it gets enabled, so assume DMA running if LCD enabled. | 38 | * when it gets enabled, so assume DMA running if LCD enabled. |
39 | */ | 39 | */ |
40 | if (cpu_is_omap1510()) | 40 | if (cpu_is_omap15xx()) |
41 | if (omap_readw(OMAP_LCDC_CONTROL) & OMAP_LCDC_CTRL_LCD_EN) | 41 | if (omap_readw(OMAP_LCDC_CONTROL) & OMAP_LCDC_CTRL_LCD_EN) |
42 | return 1; | 42 | return 1; |
43 | 43 | ||
@@ -95,7 +95,7 @@ EXPORT_SYMBOL(omap_set_lcd_dma_single_transfer); | |||
95 | 95 | ||
96 | void omap_set_lcd_dma_b1_rotation(int rotate) | 96 | void omap_set_lcd_dma_b1_rotation(int rotate) |
97 | { | 97 | { |
98 | if (cpu_is_omap1510()) { | 98 | if (cpu_is_omap15xx()) { |
99 | printk(KERN_ERR "DMA rotation is not supported in 1510 mode\n"); | 99 | printk(KERN_ERR "DMA rotation is not supported in 1510 mode\n"); |
100 | BUG(); | 100 | BUG(); |
101 | return; | 101 | return; |
@@ -106,7 +106,7 @@ EXPORT_SYMBOL(omap_set_lcd_dma_b1_rotation); | |||
106 | 106 | ||
107 | void omap_set_lcd_dma_b1_mirror(int mirror) | 107 | void omap_set_lcd_dma_b1_mirror(int mirror) |
108 | { | 108 | { |
109 | if (cpu_is_omap1510()) { | 109 | if (cpu_is_omap15xx()) { |
110 | printk(KERN_ERR "DMA mirror is not supported in 1510 mode\n"); | 110 | printk(KERN_ERR "DMA mirror is not supported in 1510 mode\n"); |
111 | BUG(); | 111 | BUG(); |
112 | } | 112 | } |
@@ -116,7 +116,7 @@ EXPORT_SYMBOL(omap_set_lcd_dma_b1_mirror); | |||
116 | 116 | ||
117 | void omap_set_lcd_dma_b1_vxres(unsigned long vxres) | 117 | void omap_set_lcd_dma_b1_vxres(unsigned long vxres) |
118 | { | 118 | { |
119 | if (cpu_is_omap1510()) { | 119 | if (cpu_is_omap15xx()) { |
120 | printk(KERN_ERR "DMA virtual resulotion is not supported " | 120 | printk(KERN_ERR "DMA virtual resulotion is not supported " |
121 | "in 1510 mode\n"); | 121 | "in 1510 mode\n"); |
122 | BUG(); | 122 | BUG(); |
@@ -127,7 +127,7 @@ EXPORT_SYMBOL(omap_set_lcd_dma_b1_vxres); | |||
127 | 127 | ||
128 | void omap_set_lcd_dma_b1_scale(unsigned int xscale, unsigned int yscale) | 128 | void omap_set_lcd_dma_b1_scale(unsigned int xscale, unsigned int yscale) |
129 | { | 129 | { |
130 | if (cpu_is_omap1510()) { | 130 | if (cpu_is_omap15xx()) { |
131 | printk(KERN_ERR "DMA scale is not supported in 1510 mode\n"); | 131 | printk(KERN_ERR "DMA scale is not supported in 1510 mode\n"); |
132 | BUG(); | 132 | BUG(); |
133 | } | 133 | } |
@@ -177,7 +177,7 @@ static void set_b1_regs(void) | |||
177 | bottom = PIXADDR(lcd_dma.xres - 1, lcd_dma.yres - 1); | 177 | bottom = PIXADDR(lcd_dma.xres - 1, lcd_dma.yres - 1); |
178 | /* 1510 DMA requires the bottom address to be 2 more | 178 | /* 1510 DMA requires the bottom address to be 2 more |
179 | * than the actual last memory access location. */ | 179 | * than the actual last memory access location. */ |
180 | if (cpu_is_omap1510() && | 180 | if (cpu_is_omap15xx() && |
181 | lcd_dma.data_type == OMAP_DMA_DATA_TYPE_S32) | 181 | lcd_dma.data_type == OMAP_DMA_DATA_TYPE_S32) |
182 | bottom += 2; | 182 | bottom += 2; |
183 | ei = PIXSTEP(0, 0, 1, 0); | 183 | ei = PIXSTEP(0, 0, 1, 0); |
@@ -241,7 +241,7 @@ static void set_b1_regs(void) | |||
241 | return; /* Suppress warning about uninitialized vars */ | 241 | return; /* Suppress warning about uninitialized vars */ |
242 | } | 242 | } |
243 | 243 | ||
244 | if (cpu_is_omap1510()) { | 244 | if (cpu_is_omap15xx()) { |
245 | omap_writew(top >> 16, OMAP1510_DMA_LCD_TOP_F1_U); | 245 | omap_writew(top >> 16, OMAP1510_DMA_LCD_TOP_F1_U); |
246 | omap_writew(top, OMAP1510_DMA_LCD_TOP_F1_L); | 246 | omap_writew(top, OMAP1510_DMA_LCD_TOP_F1_L); |
247 | omap_writew(bottom >> 16, OMAP1510_DMA_LCD_BOT_F1_U); | 247 | omap_writew(bottom >> 16, OMAP1510_DMA_LCD_BOT_F1_U); |
@@ -343,7 +343,7 @@ void omap_free_lcd_dma(void) | |||
343 | BUG(); | 343 | BUG(); |
344 | return; | 344 | return; |
345 | } | 345 | } |
346 | if (!cpu_is_omap1510()) | 346 | if (!cpu_is_omap15xx()) |
347 | omap_writew(omap_readw(OMAP1610_DMA_LCD_CCR) & ~1, | 347 | omap_writew(omap_readw(OMAP1610_DMA_LCD_CCR) & ~1, |
348 | OMAP1610_DMA_LCD_CCR); | 348 | OMAP1610_DMA_LCD_CCR); |
349 | lcd_dma.reserved = 0; | 349 | lcd_dma.reserved = 0; |
@@ -360,7 +360,7 @@ void omap_enable_lcd_dma(void) | |||
360 | * connected. Otherwise the OMAP internal controller will | 360 | * connected. Otherwise the OMAP internal controller will |
361 | * start the transfer when it gets enabled. | 361 | * start the transfer when it gets enabled. |
362 | */ | 362 | */ |
363 | if (cpu_is_omap1510() || !lcd_dma.ext_ctrl) | 363 | if (cpu_is_omap15xx() || !lcd_dma.ext_ctrl) |
364 | return; | 364 | return; |
365 | 365 | ||
366 | w = omap_readw(OMAP1610_DMA_LCD_CTRL); | 366 | w = omap_readw(OMAP1610_DMA_LCD_CTRL); |
@@ -378,14 +378,14 @@ EXPORT_SYMBOL(omap_enable_lcd_dma); | |||
378 | void omap_setup_lcd_dma(void) | 378 | void omap_setup_lcd_dma(void) |
379 | { | 379 | { |
380 | BUG_ON(lcd_dma.active); | 380 | BUG_ON(lcd_dma.active); |
381 | if (!cpu_is_omap1510()) { | 381 | if (!cpu_is_omap15xx()) { |
382 | /* Set some reasonable defaults */ | 382 | /* Set some reasonable defaults */ |
383 | omap_writew(0x5440, OMAP1610_DMA_LCD_CCR); | 383 | omap_writew(0x5440, OMAP1610_DMA_LCD_CCR); |
384 | omap_writew(0x9102, OMAP1610_DMA_LCD_CSDP); | 384 | omap_writew(0x9102, OMAP1610_DMA_LCD_CSDP); |
385 | omap_writew(0x0004, OMAP1610_DMA_LCD_LCH_CTRL); | 385 | omap_writew(0x0004, OMAP1610_DMA_LCD_LCH_CTRL); |
386 | } | 386 | } |
387 | set_b1_regs(); | 387 | set_b1_regs(); |
388 | if (!cpu_is_omap1510()) { | 388 | if (!cpu_is_omap15xx()) { |
389 | u16 w; | 389 | u16 w; |
390 | 390 | ||
391 | w = omap_readw(OMAP1610_DMA_LCD_CCR); | 391 | w = omap_readw(OMAP1610_DMA_LCD_CCR); |
@@ -407,7 +407,7 @@ void omap_stop_lcd_dma(void) | |||
407 | u16 w; | 407 | u16 w; |
408 | 408 | ||
409 | lcd_dma.active = 0; | 409 | lcd_dma.active = 0; |
410 | if (cpu_is_omap1510() || !lcd_dma.ext_ctrl) | 410 | if (cpu_is_omap15xx() || !lcd_dma.ext_ctrl) |
411 | return; | 411 | return; |
412 | 412 | ||
413 | w = omap_readw(OMAP1610_DMA_LCD_CCR); | 413 | w = omap_readw(OMAP1610_DMA_LCD_CCR); |
diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c index ed7a61ff916..6885d2fac18 100644 --- a/arch/arm/mach-omap1/time.c +++ b/arch/arm/mach-omap1/time.c | |||
@@ -49,11 +49,15 @@ | |||
49 | #include <mach/hardware.h> | 49 | #include <mach/hardware.h> |
50 | #include <asm/leds.h> | 50 | #include <asm/leds.h> |
51 | #include <asm/irq.h> | 51 | #include <asm/irq.h> |
52 | #include <asm/sched_clock.h> | ||
53 | |||
52 | #include <asm/mach/irq.h> | 54 | #include <asm/mach/irq.h> |
53 | #include <asm/mach/time.h> | 55 | #include <asm/mach/time.h> |
54 | 56 | ||
55 | #include <plat/common.h> | 57 | #include <plat/common.h> |
56 | 58 | ||
59 | #ifdef CONFIG_OMAP_MPU_TIMER | ||
60 | |||
57 | #define OMAP_MPU_TIMER_BASE OMAP_MPU_TIMER1_BASE | 61 | #define OMAP_MPU_TIMER_BASE OMAP_MPU_TIMER1_BASE |
58 | #define OMAP_MPU_TIMER_OFFSET 0x100 | 62 | #define OMAP_MPU_TIMER_OFFSET 0x100 |
59 | 63 | ||
@@ -67,7 +71,7 @@ typedef struct { | |||
67 | ((volatile omap_mpu_timer_regs_t*)OMAP1_IO_ADDRESS(OMAP_MPU_TIMER_BASE + \ | 71 | ((volatile omap_mpu_timer_regs_t*)OMAP1_IO_ADDRESS(OMAP_MPU_TIMER_BASE + \ |
68 | (n)*OMAP_MPU_TIMER_OFFSET)) | 72 | (n)*OMAP_MPU_TIMER_OFFSET)) |
69 | 73 | ||
70 | static inline unsigned long omap_mpu_timer_read(int nr) | 74 | static inline unsigned long notrace omap_mpu_timer_read(int nr) |
71 | { | 75 | { |
72 | volatile omap_mpu_timer_regs_t* timer = omap_mpu_timer_base(nr); | 76 | volatile omap_mpu_timer_regs_t* timer = omap_mpu_timer_base(nr); |
73 | return timer->read_tim; | 77 | return timer->read_tim; |
@@ -212,6 +216,32 @@ static struct clocksource clocksource_mpu = { | |||
212 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 216 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
213 | }; | 217 | }; |
214 | 218 | ||
219 | static DEFINE_CLOCK_DATA(cd); | ||
220 | |||
221 | static inline unsigned long long notrace _omap_mpu_sched_clock(void) | ||
222 | { | ||
223 | u32 cyc = mpu_read(&clocksource_mpu); | ||
224 | return cyc_to_sched_clock(&cd, cyc, (u32)~0); | ||
225 | } | ||
226 | |||
227 | #ifndef CONFIG_OMAP_32K_TIMER | ||
228 | unsigned long long notrace sched_clock(void) | ||
229 | { | ||
230 | return _omap_mpu_sched_clock(); | ||
231 | } | ||
232 | #else | ||
233 | static unsigned long long notrace omap_mpu_sched_clock(void) | ||
234 | { | ||
235 | return _omap_mpu_sched_clock(); | ||
236 | } | ||
237 | #endif | ||
238 | |||
239 | static void notrace mpu_update_sched_clock(void) | ||
240 | { | ||
241 | u32 cyc = mpu_read(&clocksource_mpu); | ||
242 | update_sched_clock(&cd, cyc, (u32)~0); | ||
243 | } | ||
244 | |||
215 | static void __init omap_init_clocksource(unsigned long rate) | 245 | static void __init omap_init_clocksource(unsigned long rate) |
216 | { | 246 | { |
217 | static char err[] __initdata = KERN_ERR | 247 | static char err[] __initdata = KERN_ERR |
@@ -219,17 +249,13 @@ static void __init omap_init_clocksource(unsigned long rate) | |||
219 | 249 | ||
220 | setup_irq(INT_TIMER2, &omap_mpu_timer2_irq); | 250 | setup_irq(INT_TIMER2, &omap_mpu_timer2_irq); |
221 | omap_mpu_timer_start(1, ~0, 1); | 251 | omap_mpu_timer_start(1, ~0, 1); |
252 | init_sched_clock(&cd, mpu_update_sched_clock, 32, rate); | ||
222 | 253 | ||
223 | if (clocksource_register_hz(&clocksource_mpu, rate)) | 254 | if (clocksource_register_hz(&clocksource_mpu, rate)) |
224 | printk(err, clocksource_mpu.name); | 255 | printk(err, clocksource_mpu.name); |
225 | } | 256 | } |
226 | 257 | ||
227 | /* | 258 | static void __init omap_mpu_timer_init(void) |
228 | * --------------------------------------------------------------------------- | ||
229 | * Timer initialization | ||
230 | * --------------------------------------------------------------------------- | ||
231 | */ | ||
232 | static void __init omap_timer_init(void) | ||
233 | { | 259 | { |
234 | struct clk *ck_ref = clk_get(NULL, "ck_ref"); | 260 | struct clk *ck_ref = clk_get(NULL, "ck_ref"); |
235 | unsigned long rate; | 261 | unsigned long rate; |
@@ -246,6 +272,66 @@ static void __init omap_timer_init(void) | |||
246 | omap_init_clocksource(rate); | 272 | omap_init_clocksource(rate); |
247 | } | 273 | } |
248 | 274 | ||
275 | #else | ||
276 | static inline void omap_mpu_timer_init(void) | ||
277 | { | ||
278 | pr_err("Bogus timer, should not happen\n"); | ||
279 | } | ||
280 | #endif /* CONFIG_OMAP_MPU_TIMER */ | ||
281 | |||
282 | #if defined(CONFIG_OMAP_MPU_TIMER) && defined(CONFIG_OMAP_32K_TIMER) | ||
283 | static unsigned long long (*preferred_sched_clock)(void); | ||
284 | |||
285 | unsigned long long notrace sched_clock(void) | ||
286 | { | ||
287 | if (!preferred_sched_clock) | ||
288 | return 0; | ||
289 | |||
290 | return preferred_sched_clock(); | ||
291 | } | ||
292 | |||
293 | static inline void preferred_sched_clock_init(bool use_32k_sched_clock) | ||
294 | { | ||
295 | if (use_32k_sched_clock) | ||
296 | preferred_sched_clock = omap_32k_sched_clock; | ||
297 | else | ||
298 | preferred_sched_clock = omap_mpu_sched_clock; | ||
299 | } | ||
300 | #else | ||
301 | static inline void preferred_sched_clock_init(bool use_32k_sched_clcok) | ||
302 | { | ||
303 | } | ||
304 | #endif | ||
305 | |||
306 | static inline int omap_32k_timer_usable(void) | ||
307 | { | ||
308 | int res = false; | ||
309 | |||
310 | if (cpu_is_omap730() || cpu_is_omap15xx()) | ||
311 | return res; | ||
312 | |||
313 | #ifdef CONFIG_OMAP_32K_TIMER | ||
314 | res = omap_32k_timer_init(); | ||
315 | #endif | ||
316 | |||
317 | return res; | ||
318 | } | ||
319 | |||
320 | /* | ||
321 | * --------------------------------------------------------------------------- | ||
322 | * Timer initialization | ||
323 | * --------------------------------------------------------------------------- | ||
324 | */ | ||
325 | static void __init omap_timer_init(void) | ||
326 | { | ||
327 | if (omap_32k_timer_usable()) { | ||
328 | preferred_sched_clock_init(1); | ||
329 | } else { | ||
330 | omap_mpu_timer_init(); | ||
331 | preferred_sched_clock_init(0); | ||
332 | } | ||
333 | } | ||
334 | |||
249 | struct sys_timer omap_timer = { | 335 | struct sys_timer omap_timer = { |
250 | .init = omap_timer_init, | 336 | .init = omap_timer_init, |
251 | }; | 337 | }; |
diff --git a/arch/arm/mach-omap1/timer32k.c b/arch/arm/mach-omap1/timer32k.c index 20cfbcc6c60..13d7b8f145b 100644 --- a/arch/arm/mach-omap1/timer32k.c +++ b/arch/arm/mach-omap1/timer32k.c | |||
@@ -52,10 +52,9 @@ | |||
52 | #include <asm/irq.h> | 52 | #include <asm/irq.h> |
53 | #include <asm/mach/irq.h> | 53 | #include <asm/mach/irq.h> |
54 | #include <asm/mach/time.h> | 54 | #include <asm/mach/time.h> |
55 | #include <plat/common.h> | ||
55 | #include <plat/dmtimer.h> | 56 | #include <plat/dmtimer.h> |
56 | 57 | ||
57 | struct sys_timer omap_timer; | ||
58 | |||
59 | /* | 58 | /* |
60 | * --------------------------------------------------------------------------- | 59 | * --------------------------------------------------------------------------- |
61 | * 32KHz OS timer | 60 | * 32KHz OS timer |
@@ -181,14 +180,14 @@ static __init void omap_init_32k_timer(void) | |||
181 | * Timer initialization | 180 | * Timer initialization |
182 | * --------------------------------------------------------------------------- | 181 | * --------------------------------------------------------------------------- |
183 | */ | 182 | */ |
184 | static void __init omap_timer_init(void) | 183 | bool __init omap_32k_timer_init(void) |
185 | { | 184 | { |
185 | omap_init_clocksource_32k(); | ||
186 | |||
186 | #ifdef CONFIG_OMAP_DM_TIMER | 187 | #ifdef CONFIG_OMAP_DM_TIMER |
187 | omap_dm_timer_init(); | 188 | omap_dm_timer_init(); |
188 | #endif | 189 | #endif |
189 | omap_init_32k_timer(); | 190 | omap_init_32k_timer(); |
190 | } | ||
191 | 191 | ||
192 | struct sys_timer omap_timer = { | 192 | return true; |
193 | .init = omap_timer_init, | 193 | } |
194 | }; | ||
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index a70bdf28e2b..07d1b20b114 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c | |||
@@ -554,6 +554,7 @@ static void __init omap_sfh7741prox_init(void) | |||
554 | 554 | ||
555 | #ifdef CONFIG_OMAP_MUX | 555 | #ifdef CONFIG_OMAP_MUX |
556 | static struct omap_board_mux board_mux[] __initdata = { | 556 | static struct omap_board_mux board_mux[] __initdata = { |
557 | OMAP4_MUX(USBB2_ULPITLL_CLK, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), | ||
557 | { .reg_offset = OMAP_MUX_TERMINATOR }, | 558 | { .reg_offset = OMAP_MUX_TERMINATOR }, |
558 | }; | 559 | }; |
559 | #else | 560 | #else |
@@ -576,11 +577,12 @@ static void __init omap_4430sdp_init(void) | |||
576 | omap4_twl6030_hsmmc_init(mmc); | 577 | omap4_twl6030_hsmmc_init(mmc); |
577 | 578 | ||
578 | /* Power on the ULPI PHY */ | 579 | /* Power on the ULPI PHY */ |
579 | if (gpio_is_valid(OMAP4SDP_MDM_PWR_EN_GPIO)) { | 580 | status = gpio_request(OMAP4SDP_MDM_PWR_EN_GPIO, "USBB1 PHY VMDM_3V3"); |
580 | /* FIXME: Assumes pad is already muxed for GPIO mode */ | 581 | if (status) |
581 | gpio_request(OMAP4SDP_MDM_PWR_EN_GPIO, "USBB1 PHY VMDM_3V3"); | 582 | pr_err("%s: Could not get USBB1 PHY GPIO\n", __func__); |
583 | else | ||
582 | gpio_direction_output(OMAP4SDP_MDM_PWR_EN_GPIO, 1); | 584 | gpio_direction_output(OMAP4SDP_MDM_PWR_EN_GPIO, 1); |
583 | } | 585 | |
584 | usb_ehci_init(&ehci_pdata); | 586 | usb_ehci_init(&ehci_pdata); |
585 | usb_musb_init(&musb_board_data); | 587 | usb_musb_init(&musb_board_data); |
586 | 588 | ||
diff --git a/arch/arm/mach-omap2/board-cm-t3517.c b/arch/arm/mach-omap2/board-cm-t3517.c index 5b0c77732df..8f9a64d650e 100644 --- a/arch/arm/mach-omap2/board-cm-t3517.c +++ b/arch/arm/mach-omap2/board-cm-t3517.c | |||
@@ -124,8 +124,9 @@ static inline void cm_t3517_init_hecc(void) {} | |||
124 | #if defined(CONFIG_RTC_DRV_V3020) || defined(CONFIG_RTC_DRV_V3020_MODULE) | 124 | #if defined(CONFIG_RTC_DRV_V3020) || defined(CONFIG_RTC_DRV_V3020_MODULE) |
125 | #define RTC_IO_GPIO (153) | 125 | #define RTC_IO_GPIO (153) |
126 | #define RTC_WR_GPIO (154) | 126 | #define RTC_WR_GPIO (154) |
127 | #define RTC_RD_GPIO (160) | 127 | #define RTC_RD_GPIO (53) |
128 | #define RTC_CS_GPIO (163) | 128 | #define RTC_CS_GPIO (163) |
129 | #define RTC_CS_EN_GPIO (160) | ||
129 | 130 | ||
130 | struct v3020_platform_data cm_t3517_v3020_pdata = { | 131 | struct v3020_platform_data cm_t3517_v3020_pdata = { |
131 | .use_gpio = 1, | 132 | .use_gpio = 1, |
@@ -145,6 +146,16 @@ static struct platform_device cm_t3517_rtc_device = { | |||
145 | 146 | ||
146 | static void __init cm_t3517_init_rtc(void) | 147 | static void __init cm_t3517_init_rtc(void) |
147 | { | 148 | { |
149 | int err; | ||
150 | |||
151 | err = gpio_request(RTC_CS_EN_GPIO, "rtc cs en"); | ||
152 | if (err) { | ||
153 | pr_err("CM-T3517: rtc cs en gpio request failed: %d\n", err); | ||
154 | return; | ||
155 | } | ||
156 | |||
157 | gpio_direction_output(RTC_CS_EN_GPIO, 1); | ||
158 | |||
148 | platform_device_register(&cm_t3517_rtc_device); | 159 | platform_device_register(&cm_t3517_rtc_device); |
149 | } | 160 | } |
150 | #else | 161 | #else |
@@ -214,12 +225,12 @@ static struct mtd_partition cm_t3517_nand_partitions[] = { | |||
214 | }, | 225 | }, |
215 | { | 226 | { |
216 | .name = "linux", | 227 | .name = "linux", |
217 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x280000 */ | 228 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x2A0000 */ |
218 | .size = 32 * NAND_BLOCK_SIZE, | 229 | .size = 32 * NAND_BLOCK_SIZE, |
219 | }, | 230 | }, |
220 | { | 231 | { |
221 | .name = "rootfs", | 232 | .name = "rootfs", |
222 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x680000 */ | 233 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x6A0000 */ |
223 | .size = MTDPART_SIZ_FULL, | 234 | .size = MTDPART_SIZ_FULL, |
224 | }, | 235 | }, |
225 | }; | 236 | }; |
@@ -256,11 +267,19 @@ static void __init cm_t3517_init_irq(void) | |||
256 | static struct omap_board_mux board_mux[] __initdata = { | 267 | static struct omap_board_mux board_mux[] __initdata = { |
257 | /* GPIO186 - Green LED */ | 268 | /* GPIO186 - Green LED */ |
258 | OMAP3_MUX(SYS_CLKOUT2, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), | 269 | OMAP3_MUX(SYS_CLKOUT2, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), |
259 | /* RTC GPIOs: IO, WR#, RD#, CS# */ | 270 | |
271 | /* RTC GPIOs: */ | ||
272 | /* IO - GPIO153 */ | ||
260 | OMAP3_MUX(MCBSP4_DR, OMAP_MUX_MODE4 | OMAP_PIN_INPUT), | 273 | OMAP3_MUX(MCBSP4_DR, OMAP_MUX_MODE4 | OMAP_PIN_INPUT), |
274 | /* WR# - GPIO154 */ | ||
261 | OMAP3_MUX(MCBSP4_DX, OMAP_MUX_MODE4 | OMAP_PIN_INPUT), | 275 | OMAP3_MUX(MCBSP4_DX, OMAP_MUX_MODE4 | OMAP_PIN_INPUT), |
262 | OMAP3_MUX(MCBSP_CLKS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT), | 276 | /* RD# - GPIO53 */ |
277 | OMAP3_MUX(GPMC_NCS2, OMAP_MUX_MODE4 | OMAP_PIN_INPUT), | ||
278 | /* CS# - GPIO163 */ | ||
263 | OMAP3_MUX(UART3_CTS_RCTX, OMAP_MUX_MODE4 | OMAP_PIN_INPUT), | 279 | OMAP3_MUX(UART3_CTS_RCTX, OMAP_MUX_MODE4 | OMAP_PIN_INPUT), |
280 | /* CS EN - GPIO160 */ | ||
281 | OMAP3_MUX(MCBSP_CLKS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT), | ||
282 | |||
264 | /* HSUSB1 RESET */ | 283 | /* HSUSB1 RESET */ |
265 | OMAP3_MUX(UART2_TX, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), | 284 | OMAP3_MUX(UART2_TX, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), |
266 | /* HSUSB2 RESET */ | 285 | /* HSUSB2 RESET */ |
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c index 00bb1fc5e01..9a2a31e011c 100644 --- a/arch/arm/mach-omap2/board-devkit8000.c +++ b/arch/arm/mach-omap2/board-devkit8000.c | |||
@@ -115,9 +115,6 @@ static struct omap2_hsmmc_info mmc[] = { | |||
115 | 115 | ||
116 | static int devkit8000_panel_enable_lcd(struct omap_dss_device *dssdev) | 116 | static int devkit8000_panel_enable_lcd(struct omap_dss_device *dssdev) |
117 | { | 117 | { |
118 | twl_i2c_write_u8(TWL4030_MODULE_GPIO, 0x80, REG_GPIODATADIR1); | ||
119 | twl_i2c_write_u8(TWL4030_MODULE_LED, 0x0, 0x0); | ||
120 | |||
121 | if (gpio_is_valid(dssdev->reset_gpio)) | 118 | if (gpio_is_valid(dssdev->reset_gpio)) |
122 | gpio_set_value_cansleep(dssdev->reset_gpio, 1); | 119 | gpio_set_value_cansleep(dssdev->reset_gpio, 1); |
123 | return 0; | 120 | return 0; |
@@ -247,6 +244,8 @@ static struct gpio_led gpio_leds[]; | |||
247 | static int devkit8000_twl_gpio_setup(struct device *dev, | 244 | static int devkit8000_twl_gpio_setup(struct device *dev, |
248 | unsigned gpio, unsigned ngpio) | 245 | unsigned gpio, unsigned ngpio) |
249 | { | 246 | { |
247 | int ret; | ||
248 | |||
250 | omap_mux_init_gpio(29, OMAP_PIN_INPUT); | 249 | omap_mux_init_gpio(29, OMAP_PIN_INPUT); |
251 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ | 250 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ |
252 | mmc[0].gpio_cd = gpio + 0; | 251 | mmc[0].gpio_cd = gpio + 0; |
@@ -255,17 +254,23 @@ static int devkit8000_twl_gpio_setup(struct device *dev, | |||
255 | /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */ | 254 | /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */ |
256 | gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; | 255 | gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; |
257 | 256 | ||
258 | /* gpio + 1 is "LCD_PWREN" (out, active high) */ | 257 | /* TWL4030_GPIO_MAX + 0 is "LCD_PWREN" (out, active high) */ |
259 | devkit8000_lcd_device.reset_gpio = gpio + 1; | 258 | devkit8000_lcd_device.reset_gpio = gpio + TWL4030_GPIO_MAX + 0; |
260 | gpio_request(devkit8000_lcd_device.reset_gpio, "LCD_PWREN"); | 259 | ret = gpio_request_one(devkit8000_lcd_device.reset_gpio, |
261 | /* Disable until needed */ | 260 | GPIOF_DIR_OUT | GPIOF_INIT_LOW, "LCD_PWREN"); |
262 | gpio_direction_output(devkit8000_lcd_device.reset_gpio, 0); | 261 | if (ret < 0) { |
262 | devkit8000_lcd_device.reset_gpio = -EINVAL; | ||
263 | printk(KERN_ERR "Failed to request GPIO for LCD_PWRN\n"); | ||
264 | } | ||
263 | 265 | ||
264 | /* gpio + 7 is "DVI_PD" (out, active low) */ | 266 | /* gpio + 7 is "DVI_PD" (out, active low) */ |
265 | devkit8000_dvi_device.reset_gpio = gpio + 7; | 267 | devkit8000_dvi_device.reset_gpio = gpio + 7; |
266 | gpio_request(devkit8000_dvi_device.reset_gpio, "DVI PowerDown"); | 268 | ret = gpio_request_one(devkit8000_dvi_device.reset_gpio, |
267 | /* Disable until needed */ | 269 | GPIOF_DIR_OUT | GPIOF_INIT_LOW, "DVI PowerDown"); |
268 | gpio_direction_output(devkit8000_dvi_device.reset_gpio, 0); | 270 | if (ret < 0) { |
271 | devkit8000_dvi_device.reset_gpio = -EINVAL; | ||
272 | printk(KERN_ERR "Failed to request GPIO for DVI PowerDown\n"); | ||
273 | } | ||
269 | 274 | ||
270 | return 0; | 275 | return 0; |
271 | } | 276 | } |
@@ -275,8 +280,7 @@ static struct twl4030_gpio_platform_data devkit8000_gpio_data = { | |||
275 | .irq_base = TWL4030_GPIO_IRQ_BASE, | 280 | .irq_base = TWL4030_GPIO_IRQ_BASE, |
276 | .irq_end = TWL4030_GPIO_IRQ_END, | 281 | .irq_end = TWL4030_GPIO_IRQ_END, |
277 | .use_leds = true, | 282 | .use_leds = true, |
278 | .pullups = BIT(1), | 283 | .pulldowns = BIT(1) | BIT(2) | BIT(6) | BIT(8) | BIT(13) |
279 | .pulldowns = BIT(2) | BIT(6) | BIT(7) | BIT(8) | BIT(13) | ||
280 | | BIT(15) | BIT(16) | BIT(17), | 284 | | BIT(15) | BIT(16) | BIT(17), |
281 | .setup = devkit8000_twl_gpio_setup, | 285 | .setup = devkit8000_twl_gpio_setup, |
282 | }; | 286 | }; |
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c index ebaa230e67e..3be85a1f55f 100644 --- a/arch/arm/mach-omap2/board-igep0020.c +++ b/arch/arm/mach-omap2/board-igep0020.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | #include <linux/gpio.h> | 18 | #include <linux/gpio.h> |
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/input.h> | ||
20 | 21 | ||
21 | #include <linux/regulator/machine.h> | 22 | #include <linux/regulator/machine.h> |
22 | #include <linux/regulator/fixed.h> | 23 | #include <linux/regulator/fixed.h> |
@@ -541,6 +542,37 @@ static struct twl4030_codec_data igep2_codec_data = { | |||
541 | .audio = &igep2_audio_data, | 542 | .audio = &igep2_audio_data, |
542 | }; | 543 | }; |
543 | 544 | ||
545 | static int igep2_keymap[] = { | ||
546 | KEY(0, 0, KEY_LEFT), | ||
547 | KEY(0, 1, KEY_RIGHT), | ||
548 | KEY(0, 2, KEY_A), | ||
549 | KEY(0, 3, KEY_B), | ||
550 | KEY(1, 0, KEY_DOWN), | ||
551 | KEY(1, 1, KEY_UP), | ||
552 | KEY(1, 2, KEY_E), | ||
553 | KEY(1, 3, KEY_F), | ||
554 | KEY(2, 0, KEY_ENTER), | ||
555 | KEY(2, 1, KEY_I), | ||
556 | KEY(2, 2, KEY_J), | ||
557 | KEY(2, 3, KEY_K), | ||
558 | KEY(3, 0, KEY_M), | ||
559 | KEY(3, 1, KEY_N), | ||
560 | KEY(3, 2, KEY_O), | ||
561 | KEY(3, 3, KEY_P) | ||
562 | }; | ||
563 | |||
564 | static struct matrix_keymap_data igep2_keymap_data = { | ||
565 | .keymap = igep2_keymap, | ||
566 | .keymap_size = ARRAY_SIZE(igep2_keymap), | ||
567 | }; | ||
568 | |||
569 | static struct twl4030_keypad_data igep2_keypad_pdata = { | ||
570 | .keymap_data = &igep2_keymap_data, | ||
571 | .rows = 4, | ||
572 | .cols = 4, | ||
573 | .rep = 1, | ||
574 | }; | ||
575 | |||
544 | static struct twl4030_platform_data igep2_twldata = { | 576 | static struct twl4030_platform_data igep2_twldata = { |
545 | .irq_base = TWL4030_IRQ_BASE, | 577 | .irq_base = TWL4030_IRQ_BASE, |
546 | .irq_end = TWL4030_IRQ_END, | 578 | .irq_end = TWL4030_IRQ_END, |
@@ -549,6 +581,7 @@ static struct twl4030_platform_data igep2_twldata = { | |||
549 | .usb = &igep2_usb_data, | 581 | .usb = &igep2_usb_data, |
550 | .codec = &igep2_codec_data, | 582 | .codec = &igep2_codec_data, |
551 | .gpio = &igep2_twl4030_gpio_pdata, | 583 | .gpio = &igep2_twl4030_gpio_pdata, |
584 | .keypad = &igep2_keypad_pdata, | ||
552 | .vmmc1 = &igep2_vmmc1, | 585 | .vmmc1 = &igep2_vmmc1, |
553 | .vpll2 = &igep2_vpll2, | 586 | .vpll2 = &igep2_vpll2, |
554 | .vio = &igep2_vio, | 587 | .vio = &igep2_vio, |
diff --git a/arch/arm/mach-omap2/board-igep0030.c b/arch/arm/mach-omap2/board-igep0030.c index bcccd68f185..4dc62a9b9cb 100644 --- a/arch/arm/mach-omap2/board-igep0030.c +++ b/arch/arm/mach-omap2/board-igep0030.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | 20 | ||
21 | #include <linux/regulator/machine.h> | 21 | #include <linux/regulator/machine.h> |
22 | #include <linux/regulator/fixed.h> | ||
22 | #include <linux/i2c/twl.h> | 23 | #include <linux/i2c/twl.h> |
23 | #include <linux/mmc/host.h> | 24 | #include <linux/mmc/host.h> |
24 | 25 | ||
@@ -43,7 +44,7 @@ | |||
43 | #define IGEP3_GPIO_WIFI_NRESET 139 | 44 | #define IGEP3_GPIO_WIFI_NRESET 139 |
44 | #define IGEP3_GPIO_BT_NRESET 137 | 45 | #define IGEP3_GPIO_BT_NRESET 137 |
45 | 46 | ||
46 | #define IGEP3_GPIO_USBH_NRESET 115 | 47 | #define IGEP3_GPIO_USBH_NRESET 183 |
47 | 48 | ||
48 | 49 | ||
49 | #if defined(CONFIG_MTD_ONENAND_OMAP2) || \ | 50 | #if defined(CONFIG_MTD_ONENAND_OMAP2) || \ |
@@ -103,7 +104,7 @@ static struct platform_device igep3_onenand_device = { | |||
103 | }, | 104 | }, |
104 | }; | 105 | }; |
105 | 106 | ||
106 | void __init igep3_flash_init(void) | 107 | static void __init igep3_flash_init(void) |
107 | { | 108 | { |
108 | u8 cs = 0; | 109 | u8 cs = 0; |
109 | u8 onenandcs = GPMC_CS_NUM + 1; | 110 | u8 onenandcs = GPMC_CS_NUM + 1; |
@@ -137,12 +138,11 @@ void __init igep3_flash_init(void) | |||
137 | } | 138 | } |
138 | 139 | ||
139 | #else | 140 | #else |
140 | void __init igep3_flash_init(void) {} | 141 | static void __init igep3_flash_init(void) {} |
141 | #endif | 142 | #endif |
142 | 143 | ||
143 | static struct regulator_consumer_supply igep3_vmmc1_supply = { | 144 | static struct regulator_consumer_supply igep3_vmmc1_supply = |
144 | .supply = "vmmc", | 145 | REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0"); |
145 | }; | ||
146 | 146 | ||
147 | /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ | 147 | /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ |
148 | static struct regulator_init_data igep3_vmmc1 = { | 148 | static struct regulator_init_data igep3_vmmc1 = { |
@@ -159,6 +159,52 @@ static struct regulator_init_data igep3_vmmc1 = { | |||
159 | .consumer_supplies = &igep3_vmmc1_supply, | 159 | .consumer_supplies = &igep3_vmmc1_supply, |
160 | }; | 160 | }; |
161 | 161 | ||
162 | static struct regulator_consumer_supply igep3_vio_supply = | ||
163 | REGULATOR_SUPPLY("vmmc_aux", "mmci-omap-hs.1"); | ||
164 | |||
165 | static struct regulator_init_data igep3_vio = { | ||
166 | .constraints = { | ||
167 | .min_uV = 1800000, | ||
168 | .max_uV = 1800000, | ||
169 | .apply_uV = 1, | ||
170 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
171 | | REGULATOR_MODE_STANDBY, | ||
172 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
173 | | REGULATOR_CHANGE_MODE | ||
174 | | REGULATOR_CHANGE_STATUS, | ||
175 | }, | ||
176 | .num_consumer_supplies = 1, | ||
177 | .consumer_supplies = &igep3_vio_supply, | ||
178 | }; | ||
179 | |||
180 | static struct regulator_consumer_supply igep3_vmmc2_supply = | ||
181 | REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"); | ||
182 | |||
183 | static struct regulator_init_data igep3_vmmc2 = { | ||
184 | .constraints = { | ||
185 | .valid_modes_mask = REGULATOR_MODE_NORMAL, | ||
186 | .always_on = 1, | ||
187 | }, | ||
188 | .num_consumer_supplies = 1, | ||
189 | .consumer_supplies = &igep3_vmmc2_supply, | ||
190 | }; | ||
191 | |||
192 | static struct fixed_voltage_config igep3_vwlan = { | ||
193 | .supply_name = "vwlan", | ||
194 | .microvolts = 3300000, | ||
195 | .gpio = -EINVAL, | ||
196 | .enabled_at_boot = 1, | ||
197 | .init_data = &igep3_vmmc2, | ||
198 | }; | ||
199 | |||
200 | static struct platform_device igep3_vwlan_device = { | ||
201 | .name = "reg-fixed-voltage", | ||
202 | .id = 0, | ||
203 | .dev = { | ||
204 | .platform_data = &igep3_vwlan, | ||
205 | }, | ||
206 | }; | ||
207 | |||
162 | static struct omap2_hsmmc_info mmc[] = { | 208 | static struct omap2_hsmmc_info mmc[] = { |
163 | [0] = { | 209 | [0] = { |
164 | .mmc = 1, | 210 | .mmc = 1, |
@@ -254,12 +300,6 @@ static int igep3_twl4030_gpio_setup(struct device *dev, | |||
254 | mmc[0].gpio_cd = gpio + 0; | 300 | mmc[0].gpio_cd = gpio + 0; |
255 | omap2_hsmmc_init(mmc); | 301 | omap2_hsmmc_init(mmc); |
256 | 302 | ||
257 | /* | ||
258 | * link regulators to MMC adapters ... we "know" the | ||
259 | * regulators will be set up only *after* we return. | ||
260 | */ | ||
261 | igep3_vmmc1_supply.dev = mmc[0].dev; | ||
262 | |||
263 | /* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */ | 303 | /* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */ |
264 | #if !defined(CONFIG_LEDS_GPIO) && !defined(CONFIG_LEDS_GPIO_MODULE) | 304 | #if !defined(CONFIG_LEDS_GPIO) && !defined(CONFIG_LEDS_GPIO_MODULE) |
265 | if ((gpio_request(gpio+TWL4030_GPIO_MAX+1, "gpio-led:green:d1") == 0) | 305 | if ((gpio_request(gpio+TWL4030_GPIO_MAX+1, "gpio-led:green:d1") == 0) |
@@ -287,6 +327,10 @@ static struct twl4030_usb_data igep3_twl4030_usb_data = { | |||
287 | .usb_mode = T2_USB_MODE_ULPI, | 327 | .usb_mode = T2_USB_MODE_ULPI, |
288 | }; | 328 | }; |
289 | 329 | ||
330 | static struct platform_device *igep3_devices[] __initdata = { | ||
331 | &igep3_vwlan_device, | ||
332 | }; | ||
333 | |||
290 | static void __init igep3_init_irq(void) | 334 | static void __init igep3_init_irq(void) |
291 | { | 335 | { |
292 | omap2_init_common_infrastructure(); | 336 | omap2_init_common_infrastructure(); |
@@ -303,6 +347,7 @@ static struct twl4030_platform_data igep3_twl4030_pdata = { | |||
303 | .usb = &igep3_twl4030_usb_data, | 347 | .usb = &igep3_twl4030_usb_data, |
304 | .gpio = &igep3_twl4030_gpio_pdata, | 348 | .gpio = &igep3_twl4030_gpio_pdata, |
305 | .vmmc1 = &igep3_vmmc1, | 349 | .vmmc1 = &igep3_vmmc1, |
350 | .vio = &igep3_vio, | ||
306 | }; | 351 | }; |
307 | 352 | ||
308 | static struct i2c_board_info __initdata igep3_i2c_boardinfo[] = { | 353 | static struct i2c_board_info __initdata igep3_i2c_boardinfo[] = { |
@@ -363,8 +408,20 @@ static void __init igep3_wifi_bt_init(void) | |||
363 | void __init igep3_wifi_bt_init(void) {} | 408 | void __init igep3_wifi_bt_init(void) {} |
364 | #endif | 409 | #endif |
365 | 410 | ||
411 | static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | ||
412 | .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, | ||
413 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, | ||
414 | .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, | ||
415 | |||
416 | .phy_reset = true, | ||
417 | .reset_gpio_port[0] = -EINVAL, | ||
418 | .reset_gpio_port[1] = IGEP3_GPIO_USBH_NRESET, | ||
419 | .reset_gpio_port[2] = -EINVAL, | ||
420 | }; | ||
421 | |||
366 | #ifdef CONFIG_OMAP_MUX | 422 | #ifdef CONFIG_OMAP_MUX |
367 | static struct omap_board_mux board_mux[] __initdata = { | 423 | static struct omap_board_mux board_mux[] __initdata = { |
424 | OMAP3_MUX(I2C2_SDA, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), | ||
368 | { .reg_offset = OMAP_MUX_TERMINATOR }, | 425 | { .reg_offset = OMAP_MUX_TERMINATOR }, |
369 | }; | 426 | }; |
370 | #endif | 427 | #endif |
@@ -375,9 +432,10 @@ static void __init igep3_init(void) | |||
375 | 432 | ||
376 | /* Register I2C busses and drivers */ | 433 | /* Register I2C busses and drivers */ |
377 | igep3_i2c_init(); | 434 | igep3_i2c_init(); |
378 | 435 | platform_add_devices(igep3_devices, ARRAY_SIZE(igep3_devices)); | |
379 | omap_serial_init(); | 436 | omap_serial_init(); |
380 | usb_musb_init(&musb_board_data); | 437 | usb_musb_init(&musb_board_data); |
438 | usb_ehci_init(&ehci_pdata); | ||
381 | 439 | ||
382 | igep3_flash_init(); | 440 | igep3_flash_init(); |
383 | igep3_leds_init(); | 441 | igep3_leds_init(); |
@@ -392,6 +450,7 @@ static void __init igep3_init(void) | |||
392 | 450 | ||
393 | MACHINE_START(IGEP0030, "IGEP OMAP3 module") | 451 | MACHINE_START(IGEP0030, "IGEP OMAP3 module") |
394 | .boot_params = 0x80000100, | 452 | .boot_params = 0x80000100, |
453 | .reserve = omap_reserve, | ||
395 | .map_io = omap3_map_io, | 454 | .map_io = omap3_map_io, |
396 | .init_irq = igep3_init_irq, | 455 | .init_irq = igep3_init_irq, |
397 | .init_machine = igep3_init, | 456 | .init_machine = igep3_init, |
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index a4fe8e1ee1b..46d814ab565 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c | |||
@@ -207,7 +207,7 @@ static struct omap_dss_device beagle_dvi_device = { | |||
207 | .driver_name = "generic_dpi_panel", | 207 | .driver_name = "generic_dpi_panel", |
208 | .data = &dvi_panel, | 208 | .data = &dvi_panel, |
209 | .phy.dpi.data_lines = 24, | 209 | .phy.dpi.data_lines = 24, |
210 | .reset_gpio = 170, | 210 | .reset_gpio = -EINVAL, |
211 | }; | 211 | }; |
212 | 212 | ||
213 | static struct omap_dss_device beagle_tv_device = { | 213 | static struct omap_dss_device beagle_tv_device = { |
@@ -279,6 +279,8 @@ static struct gpio_led gpio_leds[]; | |||
279 | static int beagle_twl_gpio_setup(struct device *dev, | 279 | static int beagle_twl_gpio_setup(struct device *dev, |
280 | unsigned gpio, unsigned ngpio) | 280 | unsigned gpio, unsigned ngpio) |
281 | { | 281 | { |
282 | int r; | ||
283 | |||
282 | if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { | 284 | if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { |
283 | mmc[0].gpio_wp = -EINVAL; | 285 | mmc[0].gpio_wp = -EINVAL; |
284 | } else if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C1_3) || | 286 | } else if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C1_3) || |
@@ -299,17 +301,63 @@ static int beagle_twl_gpio_setup(struct device *dev, | |||
299 | /* REVISIT: need ehci-omap hooks for external VBUS | 301 | /* REVISIT: need ehci-omap hooks for external VBUS |
300 | * power switch and overcurrent detect | 302 | * power switch and overcurrent detect |
301 | */ | 303 | */ |
304 | if (omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XM) { | ||
305 | r = gpio_request(gpio + 1, "EHCI_nOC"); | ||
306 | if (!r) { | ||
307 | r = gpio_direction_input(gpio + 1); | ||
308 | if (r) | ||
309 | gpio_free(gpio + 1); | ||
310 | } | ||
311 | if (r) | ||
312 | pr_err("%s: unable to configure EHCI_nOC\n", __func__); | ||
313 | } | ||
302 | 314 | ||
303 | gpio_request(gpio + 1, "EHCI_nOC"); | 315 | /* |
304 | gpio_direction_input(gpio + 1); | 316 | * TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active |
305 | 317 | * high / others active low) | |
306 | /* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */ | 318 | */ |
307 | gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR"); | 319 | gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR"); |
308 | gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0); | 320 | if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) |
321 | gpio_direction_output(gpio + TWL4030_GPIO_MAX, 1); | ||
322 | else | ||
323 | gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0); | ||
324 | |||
325 | /* DVI reset GPIO is different between beagle revisions */ | ||
326 | if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) | ||
327 | beagle_dvi_device.reset_gpio = 129; | ||
328 | else | ||
329 | beagle_dvi_device.reset_gpio = 170; | ||
309 | 330 | ||
310 | /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */ | 331 | /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */ |
311 | gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; | 332 | gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; |
312 | 333 | ||
334 | /* | ||
335 | * gpio + 1 on Xm controls the TFP410's enable line (active low) | ||
336 | * gpio + 2 control varies depending on the board rev as follows: | ||
337 | * P7/P8 revisions(prototype): Camera EN | ||
338 | * A2+ revisions (production): LDO (supplies DVI, serial, led blocks) | ||
339 | */ | ||
340 | if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { | ||
341 | r = gpio_request(gpio + 1, "nDVI_PWR_EN"); | ||
342 | if (!r) { | ||
343 | r = gpio_direction_output(gpio + 1, 0); | ||
344 | if (r) | ||
345 | gpio_free(gpio + 1); | ||
346 | } | ||
347 | if (r) | ||
348 | pr_err("%s: unable to configure nDVI_PWR_EN\n", | ||
349 | __func__); | ||
350 | r = gpio_request(gpio + 2, "DVI_LDO_EN"); | ||
351 | if (!r) { | ||
352 | r = gpio_direction_output(gpio + 2, 1); | ||
353 | if (r) | ||
354 | gpio_free(gpio + 2); | ||
355 | } | ||
356 | if (r) | ||
357 | pr_err("%s: unable to configure DVI_LDO_EN\n", | ||
358 | __func__); | ||
359 | } | ||
360 | |||
313 | return 0; | 361 | return 0; |
314 | } | 362 | } |
315 | 363 | ||
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index 3094e200784..e944025d5ef 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/clk.h> | ||
22 | #include <linux/io.h> | 23 | #include <linux/io.h> |
23 | #include <linux/leds.h> | 24 | #include <linux/leds.h> |
24 | #include <linux/gpio.h> | 25 | #include <linux/gpio.h> |
@@ -95,7 +96,16 @@ static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | |||
95 | static void __init omap4_ehci_init(void) | 96 | static void __init omap4_ehci_init(void) |
96 | { | 97 | { |
97 | int ret; | 98 | int ret; |
99 | struct clk *phy_ref_clk; | ||
98 | 100 | ||
101 | /* FREF_CLK3 provides the 19.2 MHz reference clock to the PHY */ | ||
102 | phy_ref_clk = clk_get(NULL, "auxclk3_ck"); | ||
103 | if (IS_ERR(phy_ref_clk)) { | ||
104 | pr_err("Cannot request auxclk3\n"); | ||
105 | goto error1; | ||
106 | } | ||
107 | clk_set_rate(phy_ref_clk, 19200000); | ||
108 | clk_enable(phy_ref_clk); | ||
99 | 109 | ||
100 | /* disable the power to the usb hub prior to init */ | 110 | /* disable the power to the usb hub prior to init */ |
101 | ret = gpio_request(GPIO_HUB_POWER, "hub_power"); | 111 | ret = gpio_request(GPIO_HUB_POWER, "hub_power"); |
@@ -399,8 +409,6 @@ static void __init omap4_panda_init(void) | |||
399 | platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices)); | 409 | platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices)); |
400 | omap_serial_init(); | 410 | omap_serial_init(); |
401 | omap4_twl6030_hsmmc_init(mmc); | 411 | omap4_twl6030_hsmmc_init(mmc); |
402 | /* OMAP4 Panda uses internal transceiver so register nop transceiver */ | ||
403 | usb_nop_xceiv_register(); | ||
404 | omap4_ehci_init(); | 412 | omap4_ehci_init(); |
405 | usb_musb_init(&musb_board_data); | 413 | usb_musb_init(&musb_board_data); |
406 | } | 414 | } |
diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c index cb77be7ac44..39a71bb8a30 100644 --- a/arch/arm/mach-omap2/board-rm680.c +++ b/arch/arm/mach-omap2/board-rm680.c | |||
@@ -40,9 +40,6 @@ static struct regulator_consumer_supply rm680_vemmc_consumers[] = { | |||
40 | static struct regulator_init_data rm680_vemmc = { | 40 | static struct regulator_init_data rm680_vemmc = { |
41 | .constraints = { | 41 | .constraints = { |
42 | .name = "rm680_vemmc", | 42 | .name = "rm680_vemmc", |
43 | .min_uV = 2900000, | ||
44 | .max_uV = 2900000, | ||
45 | .apply_uV = 1, | ||
46 | .valid_modes_mask = REGULATOR_MODE_NORMAL | 43 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
47 | | REGULATOR_MODE_STANDBY, | 44 | | REGULATOR_MODE_STANDBY, |
48 | .valid_ops_mask = REGULATOR_CHANGE_STATUS | 45 | .valid_ops_mask = REGULATOR_CHANGE_STATUS |
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c index 14d95afa3f0..e0e040f34c6 100644 --- a/arch/arm/mach-omap2/board-zoom-peripherals.c +++ b/arch/arm/mach-omap2/board-zoom-peripherals.c | |||
@@ -192,7 +192,7 @@ static struct platform_device omap_vwlan_device = { | |||
192 | }, | 192 | }, |
193 | }; | 193 | }; |
194 | 194 | ||
195 | struct wl12xx_platform_data omap_zoom_wlan_data __initdata = { | 195 | static struct wl12xx_platform_data omap_zoom_wlan_data __initdata = { |
196 | .irq = OMAP_GPIO_IRQ(OMAP_ZOOM_WLAN_IRQ_GPIO), | 196 | .irq = OMAP_GPIO_IRQ(OMAP_ZOOM_WLAN_IRQ_GPIO), |
197 | /* ZOOM ref clock is 26 MHz */ | 197 | /* ZOOM ref clock is 26 MHz */ |
198 | .board_ref_clock = 1, | 198 | .board_ref_clock = 1, |
@@ -286,7 +286,7 @@ static int zoom_twl_gpio_setup(struct device *dev, | |||
286 | } | 286 | } |
287 | 287 | ||
288 | /* EXTMUTE callback function */ | 288 | /* EXTMUTE callback function */ |
289 | void zoom2_set_hs_extmute(int mute) | 289 | static void zoom2_set_hs_extmute(int mute) |
290 | { | 290 | { |
291 | gpio_set_value(ZOOM2_HEADSET_EXTMUTE_GPIO, mute); | 291 | gpio_set_value(ZOOM2_HEADSET_EXTMUTE_GPIO, mute); |
292 | } | 292 | } |
diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c index d3ab1c9e50b..403a4a1d3f9 100644 --- a/arch/arm/mach-omap2/clock3xxx_data.c +++ b/arch/arm/mach-omap2/clock3xxx_data.c | |||
@@ -3286,7 +3286,7 @@ static struct omap_clk omap3xxx_clks[] = { | |||
3286 | CLK(NULL, "cpefuse_fck", &cpefuse_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), | 3286 | CLK(NULL, "cpefuse_fck", &cpefuse_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), |
3287 | CLK(NULL, "ts_fck", &ts_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), | 3287 | CLK(NULL, "ts_fck", &ts_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), |
3288 | CLK(NULL, "usbtll_fck", &usbtll_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), | 3288 | CLK(NULL, "usbtll_fck", &usbtll_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), |
3289 | CLK("ehci-omap.0", "usbtll_fck", &usbtll_fck, CK_3430ES2 | CK_AM35XX), | 3289 | CLK("ehci-omap.0", "usbtll_fck", &usbtll_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), |
3290 | CLK("omap-mcbsp.1", "prcm_fck", &core_96m_fck, CK_3XXX), | 3290 | CLK("omap-mcbsp.1", "prcm_fck", &core_96m_fck, CK_3XXX), |
3291 | CLK("omap-mcbsp.5", "prcm_fck", &core_96m_fck, CK_3XXX), | 3291 | CLK("omap-mcbsp.5", "prcm_fck", &core_96m_fck, CK_3XXX), |
3292 | CLK(NULL, "core_96m_fck", &core_96m_fck, CK_3XXX), | 3292 | CLK(NULL, "core_96m_fck", &core_96m_fck, CK_3XXX), |
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c index e8cb32fd7f1..de9ec8ddd2a 100644 --- a/arch/arm/mach-omap2/clock44xx_data.c +++ b/arch/arm/mach-omap2/clock44xx_data.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include "cm2_44xx.h" | 34 | #include "cm2_44xx.h" |
35 | #include "cm-regbits-44xx.h" | 35 | #include "cm-regbits-44xx.h" |
36 | #include "prm44xx.h" | 36 | #include "prm44xx.h" |
37 | #include "prm44xx.h" | ||
38 | #include "prm-regbits-44xx.h" | 37 | #include "prm-regbits-44xx.h" |
39 | #include "control.h" | 38 | #include "control.h" |
40 | #include "scrm44xx.h" | 39 | #include "scrm44xx.h" |
diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c index e20b98636ab..58e42f76603 100644 --- a/arch/arm/mach-omap2/clockdomain.c +++ b/arch/arm/mach-omap2/clockdomain.c | |||
@@ -423,6 +423,12 @@ int clkdm_add_wkdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2) | |||
423 | { | 423 | { |
424 | struct clkdm_dep *cd; | 424 | struct clkdm_dep *cd; |
425 | 425 | ||
426 | if (!cpu_is_omap24xx() && !cpu_is_omap34xx()) { | ||
427 | pr_err("clockdomain: %s/%s: %s: not yet implemented\n", | ||
428 | clkdm1->name, clkdm2->name, __func__); | ||
429 | return -EINVAL; | ||
430 | } | ||
431 | |||
426 | if (!clkdm1 || !clkdm2) | 432 | if (!clkdm1 || !clkdm2) |
427 | return -EINVAL; | 433 | return -EINVAL; |
428 | 434 | ||
@@ -458,6 +464,12 @@ int clkdm_del_wkdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2) | |||
458 | { | 464 | { |
459 | struct clkdm_dep *cd; | 465 | struct clkdm_dep *cd; |
460 | 466 | ||
467 | if (!cpu_is_omap24xx() && !cpu_is_omap34xx()) { | ||
468 | pr_err("clockdomain: %s/%s: %s: not yet implemented\n", | ||
469 | clkdm1->name, clkdm2->name, __func__); | ||
470 | return -EINVAL; | ||
471 | } | ||
472 | |||
461 | if (!clkdm1 || !clkdm2) | 473 | if (!clkdm1 || !clkdm2) |
462 | return -EINVAL; | 474 | return -EINVAL; |
463 | 475 | ||
@@ -500,6 +512,12 @@ int clkdm_read_wkdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2) | |||
500 | if (!clkdm1 || !clkdm2) | 512 | if (!clkdm1 || !clkdm2) |
501 | return -EINVAL; | 513 | return -EINVAL; |
502 | 514 | ||
515 | if (!cpu_is_omap24xx() && !cpu_is_omap34xx()) { | ||
516 | pr_err("clockdomain: %s/%s: %s: not yet implemented\n", | ||
517 | clkdm1->name, clkdm2->name, __func__); | ||
518 | return -EINVAL; | ||
519 | } | ||
520 | |||
503 | cd = _clkdm_deps_lookup(clkdm2, clkdm1->wkdep_srcs); | 521 | cd = _clkdm_deps_lookup(clkdm2, clkdm1->wkdep_srcs); |
504 | if (IS_ERR(cd)) { | 522 | if (IS_ERR(cd)) { |
505 | pr_debug("clockdomain: hardware cannot set/clear wake up of " | 523 | pr_debug("clockdomain: hardware cannot set/clear wake up of " |
@@ -527,6 +545,12 @@ int clkdm_clear_all_wkdeps(struct clockdomain *clkdm) | |||
527 | struct clkdm_dep *cd; | 545 | struct clkdm_dep *cd; |
528 | u32 mask = 0; | 546 | u32 mask = 0; |
529 | 547 | ||
548 | if (!cpu_is_omap24xx() && !cpu_is_omap34xx()) { | ||
549 | pr_err("clockdomain: %s: %s: not yet implemented\n", | ||
550 | clkdm->name, __func__); | ||
551 | return -EINVAL; | ||
552 | } | ||
553 | |||
530 | if (!clkdm) | 554 | if (!clkdm) |
531 | return -EINVAL; | 555 | return -EINVAL; |
532 | 556 | ||
@@ -830,8 +854,7 @@ void omap2_clkdm_allow_idle(struct clockdomain *clkdm) | |||
830 | * dependency code and data for OMAP4. | 854 | * dependency code and data for OMAP4. |
831 | */ | 855 | */ |
832 | if (cpu_is_omap44xx()) { | 856 | if (cpu_is_omap44xx()) { |
833 | WARN_ONCE(1, "clockdomain: OMAP4 wakeup/sleep dependency " | 857 | pr_err("clockdomain: %s: OMAP4 wakeup/sleep dependency support: not yet implemented\n", clkdm->name); |
834 | "support is not yet implemented\n"); | ||
835 | } else { | 858 | } else { |
836 | if (atomic_read(&clkdm->usecount) > 0) | 859 | if (atomic_read(&clkdm->usecount) > 0) |
837 | _clkdm_add_autodeps(clkdm); | 860 | _clkdm_add_autodeps(clkdm); |
@@ -872,8 +895,7 @@ void omap2_clkdm_deny_idle(struct clockdomain *clkdm) | |||
872 | * dependency code and data for OMAP4. | 895 | * dependency code and data for OMAP4. |
873 | */ | 896 | */ |
874 | if (cpu_is_omap44xx()) { | 897 | if (cpu_is_omap44xx()) { |
875 | WARN_ONCE(1, "clockdomain: OMAP4 wakeup/sleep dependency " | 898 | pr_err("clockdomain: %s: OMAP4 wakeup/sleep dependency support: not yet implemented\n", clkdm->name); |
876 | "support is not yet implemented\n"); | ||
877 | } else { | 899 | } else { |
878 | if (atomic_read(&clkdm->usecount) > 0) | 900 | if (atomic_read(&clkdm->usecount) > 0) |
879 | _clkdm_del_autodeps(clkdm); | 901 | _clkdm_del_autodeps(clkdm); |
diff --git a/arch/arm/mach-omap2/clockdomain.h b/arch/arm/mach-omap2/clockdomain.h index de3faa20b46..9b459c26fb8 100644 --- a/arch/arm/mach-omap2/clockdomain.h +++ b/arch/arm/mach-omap2/clockdomain.h | |||
@@ -103,9 +103,7 @@ struct clockdomain { | |||
103 | const char *name; | 103 | const char *name; |
104 | struct powerdomain *ptr; | 104 | struct powerdomain *ptr; |
105 | } pwrdm; | 105 | } pwrdm; |
106 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) | ||
107 | const u16 clktrctrl_mask; | 106 | const u16 clktrctrl_mask; |
108 | #endif | ||
109 | const u8 flags; | 107 | const u8 flags; |
110 | const u8 dep_bit; | 108 | const u8 dep_bit; |
111 | const u8 prcm_partition; | 109 | const u8 prcm_partition; |
diff --git a/arch/arm/mach-omap2/clockdomains44xx_data.c b/arch/arm/mach-omap2/clockdomains44xx_data.c index 51920fc7fc5..10622c914ab 100644 --- a/arch/arm/mach-omap2/clockdomains44xx_data.c +++ b/arch/arm/mach-omap2/clockdomains44xx_data.c | |||
@@ -30,8 +30,6 @@ | |||
30 | #include "cm1_44xx.h" | 30 | #include "cm1_44xx.h" |
31 | #include "cm2_44xx.h" | 31 | #include "cm2_44xx.h" |
32 | 32 | ||
33 | #include "cm1_44xx.h" | ||
34 | #include "cm2_44xx.h" | ||
35 | #include "cm-regbits-44xx.h" | 33 | #include "cm-regbits-44xx.h" |
36 | #include "prm44xx.h" | 34 | #include "prm44xx.h" |
37 | #include "prcm44xx.h" | 35 | #include "prcm44xx.h" |
diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c index 11b89e9687f..f7b22a16f38 100644 --- a/arch/arm/mach-omap2/cpuidle34xx.c +++ b/arch/arm/mach-omap2/cpuidle34xx.c | |||
@@ -47,6 +47,8 @@ | |||
47 | 47 | ||
48 | #define OMAP3_STATE_MAX OMAP3_STATE_C7 | 48 | #define OMAP3_STATE_MAX OMAP3_STATE_C7 |
49 | 49 | ||
50 | #define CPUIDLE_FLAG_CHECK_BM 0x10000 /* use omap3_enter_idle_bm() */ | ||
51 | |||
50 | struct omap3_processor_cx { | 52 | struct omap3_processor_cx { |
51 | u8 valid; | 53 | u8 valid; |
52 | u8 type; | 54 | u8 type; |
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 381f4eb9235..2c9c912f2c4 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
@@ -978,7 +978,7 @@ static int __init omap2_init_devices(void) | |||
978 | arch_initcall(omap2_init_devices); | 978 | arch_initcall(omap2_init_devices); |
979 | 979 | ||
980 | #if defined(CONFIG_OMAP_WATCHDOG) || defined(CONFIG_OMAP_WATCHDOG_MODULE) | 980 | #if defined(CONFIG_OMAP_WATCHDOG) || defined(CONFIG_OMAP_WATCHDOG_MODULE) |
981 | struct omap_device_pm_latency omap_wdt_latency[] = { | 981 | static struct omap_device_pm_latency omap_wdt_latency[] = { |
982 | [0] = { | 982 | [0] = { |
983 | .deactivate_func = omap_device_idle_hwmods, | 983 | .deactivate_func = omap_device_idle_hwmods, |
984 | .activate_func = omap_device_enable_hwmods, | 984 | .activate_func = omap_device_enable_hwmods, |
diff --git a/arch/arm/mach-omap2/dma.c b/arch/arm/mach-omap2/dma.c index d2f15f5cfd3..34922b2d2e3 100644 --- a/arch/arm/mach-omap2/dma.c +++ b/arch/arm/mach-omap2/dma.c | |||
@@ -264,7 +264,7 @@ static int __init omap2_system_dma_init_dev(struct omap_hwmod *oh, void *unused) | |||
264 | if (IS_ERR(od)) { | 264 | if (IS_ERR(od)) { |
265 | pr_err("%s: Cant build omap_device for %s:%s.\n", | 265 | pr_err("%s: Cant build omap_device for %s:%s.\n", |
266 | __func__, name, oh->name); | 266 | __func__, name, oh->name); |
267 | return IS_ERR(od); | 267 | return PTR_ERR(od); |
268 | } | 268 | } |
269 | 269 | ||
270 | mem = platform_get_resource(&od->pdev, IORESOURCE_MEM, 0); | 270 | mem = platform_get_resource(&od->pdev, IORESOURCE_MEM, 0); |
diff --git a/arch/arm/mach-omap2/include/mach/entry-macro.S b/arch/arm/mach-omap2/include/mach/entry-macro.S index befa321c4c1..81985a665cb 100644 --- a/arch/arm/mach-omap2/include/mach/entry-macro.S +++ b/arch/arm/mach-omap2/include/mach/entry-macro.S | |||
@@ -38,20 +38,6 @@ | |||
38 | */ | 38 | */ |
39 | 39 | ||
40 | #ifdef MULTI_OMAP2 | 40 | #ifdef MULTI_OMAP2 |
41 | |||
42 | /* | ||
43 | * We use __glue to avoid errors with multiple definitions of | ||
44 | * .globl omap_irq_base as it's included from entry-armv.S but not | ||
45 | * from entry-common.S. | ||
46 | */ | ||
47 | #ifdef __glue | ||
48 | .pushsection .data | ||
49 | .globl omap_irq_base | ||
50 | omap_irq_base: | ||
51 | .word 0 | ||
52 | .popsection | ||
53 | #endif | ||
54 | |||
55 | /* | 41 | /* |
56 | * Configure the interrupt base on the first interrupt. | 42 | * Configure the interrupt base on the first interrupt. |
57 | * See also omap_irq_base_init for setting omap_irq_base. | 43 | * See also omap_irq_base_init for setting omap_irq_base. |
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index e66687b0b9d..c2032041d26 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
@@ -314,14 +314,13 @@ static int _set_hwmod_postsetup_state(struct omap_hwmod *oh, void *data) | |||
314 | return omap_hwmod_set_postsetup_state(oh, *(u8 *)data); | 314 | return omap_hwmod_set_postsetup_state(oh, *(u8 *)data); |
315 | } | 315 | } |
316 | 316 | ||
317 | void __iomem *omap_irq_base; | ||
318 | |||
317 | /* | 319 | /* |
318 | * Initialize asm_irq_base for entry-macro.S | 320 | * Initialize asm_irq_base for entry-macro.S |
319 | */ | 321 | */ |
320 | static inline void omap_irq_base_init(void) | 322 | static inline void omap_irq_base_init(void) |
321 | { | 323 | { |
322 | extern void __iomem *omap_irq_base; | ||
323 | |||
324 | #ifdef MULTI_OMAP2 | ||
325 | if (cpu_is_omap24xx()) | 324 | if (cpu_is_omap24xx()) |
326 | omap_irq_base = OMAP2_L4_IO_ADDRESS(OMAP24XX_IC_BASE); | 325 | omap_irq_base = OMAP2_L4_IO_ADDRESS(OMAP24XX_IC_BASE); |
327 | else if (cpu_is_omap34xx()) | 326 | else if (cpu_is_omap34xx()) |
@@ -330,7 +329,6 @@ static inline void omap_irq_base_init(void) | |||
330 | omap_irq_base = OMAP2_L4_IO_ADDRESS(OMAP44XX_GIC_CPU_BASE); | 329 | omap_irq_base = OMAP2_L4_IO_ADDRESS(OMAP44XX_GIC_CPU_BASE); |
331 | else | 330 | else |
332 | pr_err("Could not initialize omap_irq_base\n"); | 331 | pr_err("Could not initialize omap_irq_base\n"); |
333 | #endif | ||
334 | } | 332 | } |
335 | 333 | ||
336 | void __init omap2_init_common_infrastructure(void) | 334 | void __init omap2_init_common_infrastructure(void) |
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c index 85bf8ca95fd..23049c487c4 100644 --- a/arch/arm/mach-omap2/irq.c +++ b/arch/arm/mach-omap2/irq.c | |||
@@ -100,13 +100,14 @@ static int omap_check_spurious(unsigned int irq) | |||
100 | } | 100 | } |
101 | 101 | ||
102 | /* XXX: FIQ and additional INTC support (only MPU at the moment) */ | 102 | /* XXX: FIQ and additional INTC support (only MPU at the moment) */ |
103 | static void omap_ack_irq(unsigned int irq) | 103 | static void omap_ack_irq(struct irq_data *d) |
104 | { | 104 | { |
105 | intc_bank_write_reg(0x1, &irq_banks[0], INTC_CONTROL); | 105 | intc_bank_write_reg(0x1, &irq_banks[0], INTC_CONTROL); |
106 | } | 106 | } |
107 | 107 | ||
108 | static void omap_mask_irq(unsigned int irq) | 108 | static void omap_mask_irq(struct irq_data *d) |
109 | { | 109 | { |
110 | unsigned int irq = d->irq; | ||
110 | int offset = irq & (~(IRQ_BITS_PER_REG - 1)); | 111 | int offset = irq & (~(IRQ_BITS_PER_REG - 1)); |
111 | 112 | ||
112 | if (cpu_is_omap34xx()) { | 113 | if (cpu_is_omap34xx()) { |
@@ -128,8 +129,9 @@ static void omap_mask_irq(unsigned int irq) | |||
128 | intc_bank_write_reg(1 << irq, &irq_banks[0], INTC_MIR_SET0 + offset); | 129 | intc_bank_write_reg(1 << irq, &irq_banks[0], INTC_MIR_SET0 + offset); |
129 | } | 130 | } |
130 | 131 | ||
131 | static void omap_unmask_irq(unsigned int irq) | 132 | static void omap_unmask_irq(struct irq_data *d) |
132 | { | 133 | { |
134 | unsigned int irq = d->irq; | ||
133 | int offset = irq & (~(IRQ_BITS_PER_REG - 1)); | 135 | int offset = irq & (~(IRQ_BITS_PER_REG - 1)); |
134 | 136 | ||
135 | irq &= (IRQ_BITS_PER_REG - 1); | 137 | irq &= (IRQ_BITS_PER_REG - 1); |
@@ -137,17 +139,17 @@ static void omap_unmask_irq(unsigned int irq) | |||
137 | intc_bank_write_reg(1 << irq, &irq_banks[0], INTC_MIR_CLEAR0 + offset); | 139 | intc_bank_write_reg(1 << irq, &irq_banks[0], INTC_MIR_CLEAR0 + offset); |
138 | } | 140 | } |
139 | 141 | ||
140 | static void omap_mask_ack_irq(unsigned int irq) | 142 | static void omap_mask_ack_irq(struct irq_data *d) |
141 | { | 143 | { |
142 | omap_mask_irq(irq); | 144 | omap_mask_irq(d); |
143 | omap_ack_irq(irq); | 145 | omap_ack_irq(d); |
144 | } | 146 | } |
145 | 147 | ||
146 | static struct irq_chip omap_irq_chip = { | 148 | static struct irq_chip omap_irq_chip = { |
147 | .name = "INTC", | 149 | .name = "INTC", |
148 | .ack = omap_mask_ack_irq, | 150 | .irq_ack = omap_mask_ack_irq, |
149 | .mask = omap_mask_irq, | 151 | .irq_mask = omap_mask_irq, |
150 | .unmask = omap_unmask_irq, | 152 | .irq_unmask = omap_unmask_irq, |
151 | }; | 153 | }; |
152 | 154 | ||
153 | static void __init omap_irq_bank_init_one(struct omap_irq_bank *bank) | 155 | static void __init omap_irq_bank_init_one(struct omap_irq_bank *bank) |
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index 17bd6394d22..98148b6c36e 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c | |||
@@ -160,7 +160,7 @@ static int __init _omap_mux_get_by_name(struct omap_mux_partition *partition, | |||
160 | struct omap_mux *mux = NULL; | 160 | struct omap_mux *mux = NULL; |
161 | struct omap_mux_entry *e; | 161 | struct omap_mux_entry *e; |
162 | const char *mode_name; | 162 | const char *mode_name; |
163 | int found = 0, found_mode, mode0_len = 0; | 163 | int found = 0, found_mode = 0, mode0_len = 0; |
164 | struct list_head *muxmodes = &partition->muxmodes; | 164 | struct list_head *muxmodes = &partition->muxmodes; |
165 | 165 | ||
166 | mode_name = strchr(muxname, '.'); | 166 | mode_name = strchr(muxname, '.'); |
@@ -893,7 +893,7 @@ static struct omap_mux * __init omap_mux_list_add( | |||
893 | return NULL; | 893 | return NULL; |
894 | 894 | ||
895 | m = &entry->mux; | 895 | m = &entry->mux; |
896 | memcpy(m, src, sizeof(struct omap_mux_entry)); | 896 | entry->mux = *src; |
897 | 897 | ||
898 | #ifdef CONFIG_OMAP_MUX | 898 | #ifdef CONFIG_OMAP_MUX |
899 | if (omap_mux_copy_names(src, m)) { | 899 | if (omap_mux_copy_names(src, m)) { |
@@ -1000,6 +1000,7 @@ int __init omap_mux_init(const char *name, u32 flags, | |||
1000 | if (!partition->base) { | 1000 | if (!partition->base) { |
1001 | pr_err("%s: Could not ioremap mux partition at 0x%08x\n", | 1001 | pr_err("%s: Could not ioremap mux partition at 0x%08x\n", |
1002 | __func__, partition->phys); | 1002 | __func__, partition->phys); |
1003 | kfree(partition); | ||
1003 | return -ENODEV; | 1004 | return -ENODEV; |
1004 | } | 1005 | } |
1005 | 1006 | ||
diff --git a/arch/arm/mach-omap2/mux34xx.c b/arch/arm/mach-omap2/mux34xx.c index 440c98e9a51..17f80e4ab16 100644 --- a/arch/arm/mach-omap2/mux34xx.c +++ b/arch/arm/mach-omap2/mux34xx.c | |||
@@ -703,7 +703,7 @@ static struct omap_mux __initdata omap3_muxmodes[] = { | |||
703 | * Signals different on CBC package compared to the superset | 703 | * Signals different on CBC package compared to the superset |
704 | */ | 704 | */ |
705 | #if defined(CONFIG_OMAP_MUX) && defined(CONFIG_OMAP_PACKAGE_CBC) | 705 | #if defined(CONFIG_OMAP_MUX) && defined(CONFIG_OMAP_PACKAGE_CBC) |
706 | struct omap_mux __initdata omap3_cbc_subset[] = { | 706 | static struct omap_mux __initdata omap3_cbc_subset[] = { |
707 | { .reg_offset = OMAP_MUX_TERMINATOR }, | 707 | { .reg_offset = OMAP_MUX_TERMINATOR }, |
708 | }; | 708 | }; |
709 | #else | 709 | #else |
@@ -721,7 +721,7 @@ struct omap_mux __initdata omap3_cbc_subset[] = { | |||
721 | */ | 721 | */ |
722 | #if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS) \ | 722 | #if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS) \ |
723 | && defined(CONFIG_OMAP_PACKAGE_CBC) | 723 | && defined(CONFIG_OMAP_PACKAGE_CBC) |
724 | struct omap_ball __initdata omap3_cbc_ball[] = { | 724 | static struct omap_ball __initdata omap3_cbc_ball[] = { |
725 | _OMAP3_BALLENTRY(CAM_D0, "ae16", NULL), | 725 | _OMAP3_BALLENTRY(CAM_D0, "ae16", NULL), |
726 | _OMAP3_BALLENTRY(CAM_D1, "ae15", NULL), | 726 | _OMAP3_BALLENTRY(CAM_D1, "ae15", NULL), |
727 | _OMAP3_BALLENTRY(CAM_D10, "d25", NULL), | 727 | _OMAP3_BALLENTRY(CAM_D10, "d25", NULL), |
diff --git a/arch/arm/mach-omap2/mux44xx.c b/arch/arm/mach-omap2/mux44xx.c index 980f11d45c7..c322e7bdaa1 100644 --- a/arch/arm/mach-omap2/mux44xx.c +++ b/arch/arm/mach-omap2/mux44xx.c | |||
@@ -544,7 +544,7 @@ static struct omap_mux __initdata omap4_core_muxmodes[] = { | |||
544 | */ | 544 | */ |
545 | #if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS) \ | 545 | #if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS) \ |
546 | && defined(CONFIG_OMAP_PACKAGE_CBL) | 546 | && defined(CONFIG_OMAP_PACKAGE_CBL) |
547 | struct omap_ball __initdata omap4_core_cbl_ball[] = { | 547 | static struct omap_ball __initdata omap4_core_cbl_ball[] = { |
548 | _OMAP4_BALLENTRY(GPMC_AD0, "c12", NULL), | 548 | _OMAP4_BALLENTRY(GPMC_AD0, "c12", NULL), |
549 | _OMAP4_BALLENTRY(GPMC_AD1, "d12", NULL), | 549 | _OMAP4_BALLENTRY(GPMC_AD1, "d12", NULL), |
550 | _OMAP4_BALLENTRY(GPMC_AD2, "c13", NULL), | 550 | _OMAP4_BALLENTRY(GPMC_AD2, "c13", NULL), |
@@ -1262,7 +1262,7 @@ static struct omap_mux __initdata omap4_es2_core_muxmodes[] = { | |||
1262 | */ | 1262 | */ |
1263 | #if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS) \ | 1263 | #if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS) \ |
1264 | && defined(CONFIG_OMAP_PACKAGE_CBS) | 1264 | && defined(CONFIG_OMAP_PACKAGE_CBS) |
1265 | struct omap_ball __initdata omap4_core_cbs_ball[] = { | 1265 | static struct omap_ball __initdata omap4_core_cbs_ball[] = { |
1266 | _OMAP4_BALLENTRY(GPMC_AD0, "c12", NULL), | 1266 | _OMAP4_BALLENTRY(GPMC_AD0, "c12", NULL), |
1267 | _OMAP4_BALLENTRY(GPMC_AD1, "d12", NULL), | 1267 | _OMAP4_BALLENTRY(GPMC_AD1, "d12", NULL), |
1268 | _OMAP4_BALLENTRY(GPMC_AD2, "c13", NULL), | 1268 | _OMAP4_BALLENTRY(GPMC_AD2, "c13", NULL), |
@@ -1546,7 +1546,7 @@ static struct omap_mux __initdata omap4_wkup_muxmodes[] = { | |||
1546 | */ | 1546 | */ |
1547 | #if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS) \ | 1547 | #if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS) \ |
1548 | && defined(CONFIG_OMAP_PACKAGE_CBL) | 1548 | && defined(CONFIG_OMAP_PACKAGE_CBL) |
1549 | struct omap_ball __initdata omap4_wkup_cbl_cbs_ball[] = { | 1549 | static struct omap_ball __initdata omap4_wkup_cbl_cbs_ball[] = { |
1550 | _OMAP4_BALLENTRY(SIM_IO, "h4", NULL), | 1550 | _OMAP4_BALLENTRY(SIM_IO, "h4", NULL), |
1551 | _OMAP4_BALLENTRY(SIM_CLK, "j2", NULL), | 1551 | _OMAP4_BALLENTRY(SIM_CLK, "j2", NULL), |
1552 | _OMAP4_BALLENTRY(SIM_RESET, "g2", NULL), | 1552 | _OMAP4_BALLENTRY(SIM_RESET, "g2", NULL), |
diff --git a/arch/arm/mach-omap2/omap_twl.c b/arch/arm/mach-omap2/omap_twl.c index 15f8c6c1bb0..00e1d2b5368 100644 --- a/arch/arm/mach-omap2/omap_twl.c +++ b/arch/arm/mach-omap2/omap_twl.c | |||
@@ -20,6 +20,8 @@ | |||
20 | 20 | ||
21 | #include <plat/voltage.h> | 21 | #include <plat/voltage.h> |
22 | 22 | ||
23 | #include "pm.h" | ||
24 | |||
23 | #define OMAP3_SRI2C_SLAVE_ADDR 0x12 | 25 | #define OMAP3_SRI2C_SLAVE_ADDR 0x12 |
24 | #define OMAP3_VDD_MPU_SR_CONTROL_REG 0x00 | 26 | #define OMAP3_VDD_MPU_SR_CONTROL_REG 0x00 |
25 | #define OMAP3_VDD_CORE_SR_CONTROL_REG 0x01 | 27 | #define OMAP3_VDD_CORE_SR_CONTROL_REG 0x01 |
@@ -60,17 +62,17 @@ static u8 smps_offset; | |||
60 | 62 | ||
61 | #define REG_SMPS_OFFSET 0xE0 | 63 | #define REG_SMPS_OFFSET 0xE0 |
62 | 64 | ||
63 | unsigned long twl4030_vsel_to_uv(const u8 vsel) | 65 | static unsigned long twl4030_vsel_to_uv(const u8 vsel) |
64 | { | 66 | { |
65 | return (((vsel * 125) + 6000)) * 100; | 67 | return (((vsel * 125) + 6000)) * 100; |
66 | } | 68 | } |
67 | 69 | ||
68 | u8 twl4030_uv_to_vsel(unsigned long uv) | 70 | static u8 twl4030_uv_to_vsel(unsigned long uv) |
69 | { | 71 | { |
70 | return DIV_ROUND_UP(uv - 600000, 12500); | 72 | return DIV_ROUND_UP(uv - 600000, 12500); |
71 | } | 73 | } |
72 | 74 | ||
73 | unsigned long twl6030_vsel_to_uv(const u8 vsel) | 75 | static unsigned long twl6030_vsel_to_uv(const u8 vsel) |
74 | { | 76 | { |
75 | /* | 77 | /* |
76 | * In TWL6030 depending on the value of SMPS_OFFSET | 78 | * In TWL6030 depending on the value of SMPS_OFFSET |
@@ -102,7 +104,7 @@ unsigned long twl6030_vsel_to_uv(const u8 vsel) | |||
102 | return ((((vsel - 1) * 125) + 6000)) * 100; | 104 | return ((((vsel - 1) * 125) + 6000)) * 100; |
103 | } | 105 | } |
104 | 106 | ||
105 | u8 twl6030_uv_to_vsel(unsigned long uv) | 107 | static u8 twl6030_uv_to_vsel(unsigned long uv) |
106 | { | 108 | { |
107 | /* | 109 | /* |
108 | * In TWL6030 depending on the value of SMPS_OFFSET | 110 | * In TWL6030 depending on the value of SMPS_OFFSET |
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c index 9e5dc8ed51e..97feb3ab6a6 100644 --- a/arch/arm/mach-omap2/pm24xx.c +++ b/arch/arm/mach-omap2/pm24xx.c | |||
@@ -134,7 +134,7 @@ static void omap2_enter_full_retention(void) | |||
134 | 134 | ||
135 | /* Block console output in case it is on one of the OMAP UARTs */ | 135 | /* Block console output in case it is on one of the OMAP UARTs */ |
136 | if (!is_suspending()) | 136 | if (!is_suspending()) |
137 | if (try_acquire_console_sem()) | 137 | if (!console_trylock()) |
138 | goto no_sleep; | 138 | goto no_sleep; |
139 | 139 | ||
140 | omap_uart_prepare_idle(0); | 140 | omap_uart_prepare_idle(0); |
@@ -151,7 +151,7 @@ static void omap2_enter_full_retention(void) | |||
151 | omap_uart_resume_idle(0); | 151 | omap_uart_resume_idle(0); |
152 | 152 | ||
153 | if (!is_suspending()) | 153 | if (!is_suspending()) |
154 | release_console_sem(); | 154 | console_unlock(); |
155 | 155 | ||
156 | no_sleep: | 156 | no_sleep: |
157 | if (omap2_pm_debug) { | 157 | if (omap2_pm_debug) { |
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 8cbbeade4b8..2f864e4b085 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c | |||
@@ -168,9 +168,10 @@ static void omap3_core_restore_context(void) | |||
168 | * once during boot sequence, but this works as we are not using secure | 168 | * once during boot sequence, but this works as we are not using secure |
169 | * services. | 169 | * services. |
170 | */ | 170 | */ |
171 | static void omap3_save_secure_ram_context(u32 target_mpu_state) | 171 | static void omap3_save_secure_ram_context(void) |
172 | { | 172 | { |
173 | u32 ret; | 173 | u32 ret; |
174 | int mpu_next_state = pwrdm_read_next_pwrst(mpu_pwrdm); | ||
174 | 175 | ||
175 | if (omap_type() != OMAP2_DEVICE_TYPE_GP) { | 176 | if (omap_type() != OMAP2_DEVICE_TYPE_GP) { |
176 | /* | 177 | /* |
@@ -181,7 +182,7 @@ static void omap3_save_secure_ram_context(u32 target_mpu_state) | |||
181 | pwrdm_set_next_pwrst(mpu_pwrdm, PWRDM_POWER_ON); | 182 | pwrdm_set_next_pwrst(mpu_pwrdm, PWRDM_POWER_ON); |
182 | ret = _omap_save_secure_sram((u32 *) | 183 | ret = _omap_save_secure_sram((u32 *) |
183 | __pa(omap3_secure_ram_storage)); | 184 | __pa(omap3_secure_ram_storage)); |
184 | pwrdm_set_next_pwrst(mpu_pwrdm, target_mpu_state); | 185 | pwrdm_set_next_pwrst(mpu_pwrdm, mpu_next_state); |
185 | /* Following is for error tracking, it should not happen */ | 186 | /* Following is for error tracking, it should not happen */ |
186 | if (ret) { | 187 | if (ret) { |
187 | printk(KERN_ERR "save_secure_sram() returns %08x\n", | 188 | printk(KERN_ERR "save_secure_sram() returns %08x\n", |
@@ -398,7 +399,7 @@ void omap_sram_idle(void) | |||
398 | if (!is_suspending()) | 399 | if (!is_suspending()) |
399 | if (per_next_state < PWRDM_POWER_ON || | 400 | if (per_next_state < PWRDM_POWER_ON || |
400 | core_next_state < PWRDM_POWER_ON) | 401 | core_next_state < PWRDM_POWER_ON) |
401 | if (try_acquire_console_sem()) | 402 | if (!console_trylock()) |
402 | goto console_still_active; | 403 | goto console_still_active; |
403 | 404 | ||
404 | /* PER */ | 405 | /* PER */ |
@@ -481,7 +482,7 @@ void omap_sram_idle(void) | |||
481 | } | 482 | } |
482 | 483 | ||
483 | if (!is_suspending()) | 484 | if (!is_suspending()) |
484 | release_console_sem(); | 485 | console_unlock(); |
485 | 486 | ||
486 | console_still_active: | 487 | console_still_active: |
487 | /* Disable IO-PAD and IO-CHAIN wakeup */ | 488 | /* Disable IO-PAD and IO-CHAIN wakeup */ |
@@ -1094,7 +1095,7 @@ static int __init omap3_pm_init(void) | |||
1094 | local_fiq_disable(); | 1095 | local_fiq_disable(); |
1095 | 1096 | ||
1096 | omap_dma_global_context_save(); | 1097 | omap_dma_global_context_save(); |
1097 | omap3_save_secure_ram_context(PWRDM_POWER_ON); | 1098 | omap3_save_secure_ram_context(); |
1098 | omap_dma_global_context_restore(); | 1099 | omap_dma_global_context_restore(); |
1099 | 1100 | ||
1100 | local_irq_enable(); | 1101 | local_irq_enable(); |
diff --git a/arch/arm/mach-omap2/pm_bus.c b/arch/arm/mach-omap2/pm_bus.c index 784989f8f2f..5acd2ab298b 100644 --- a/arch/arm/mach-omap2/pm_bus.c +++ b/arch/arm/mach-omap2/pm_bus.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <plat/omap-pm.h> | 20 | #include <plat/omap-pm.h> |
21 | 21 | ||
22 | #ifdef CONFIG_PM_RUNTIME | 22 | #ifdef CONFIG_PM_RUNTIME |
23 | int omap_pm_runtime_suspend(struct device *dev) | 23 | static int omap_pm_runtime_suspend(struct device *dev) |
24 | { | 24 | { |
25 | struct platform_device *pdev = to_platform_device(dev); | 25 | struct platform_device *pdev = to_platform_device(dev); |
26 | int r, ret = 0; | 26 | int r, ret = 0; |
@@ -37,7 +37,7 @@ int omap_pm_runtime_suspend(struct device *dev) | |||
37 | return ret; | 37 | return ret; |
38 | }; | 38 | }; |
39 | 39 | ||
40 | int omap_pm_runtime_resume(struct device *dev) | 40 | static int omap_pm_runtime_resume(struct device *dev) |
41 | { | 41 | { |
42 | struct platform_device *pdev = to_platform_device(dev); | 42 | struct platform_device *pdev = to_platform_device(dev); |
43 | int r; | 43 | int r; |
diff --git a/arch/arm/mach-omap2/powerdomain2xxx_3xxx.c b/arch/arm/mach-omap2/powerdomain2xxx_3xxx.c index d5233890370..cf600e22bf8 100644 --- a/arch/arm/mach-omap2/powerdomain2xxx_3xxx.c +++ b/arch/arm/mach-omap2/powerdomain2xxx_3xxx.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <plat/prcm.h> | 19 | #include <plat/prcm.h> |
20 | 20 | ||
21 | #include "powerdomain.h" | 21 | #include "powerdomain.h" |
22 | #include "prm-regbits-34xx.h" | ||
23 | #include "prm.h" | 22 | #include "prm.h" |
24 | #include "prm-regbits-24xx.h" | 23 | #include "prm-regbits-24xx.h" |
25 | #include "prm-regbits-34xx.h" | 24 | #include "prm-regbits-34xx.h" |
diff --git a/arch/arm/mach-omap2/prm2xxx_3xxx.h b/arch/arm/mach-omap2/prm2xxx_3xxx.h index 53d44f6e373..49654c8d18f 100644 --- a/arch/arm/mach-omap2/prm2xxx_3xxx.h +++ b/arch/arm/mach-omap2/prm2xxx_3xxx.h | |||
@@ -228,7 +228,67 @@ | |||
228 | 228 | ||
229 | 229 | ||
230 | #ifndef __ASSEMBLER__ | 230 | #ifndef __ASSEMBLER__ |
231 | 231 | /* | |
232 | * Stub omap2xxx/omap3xxx functions so that common files | ||
233 | * continue to build when custom builds are used | ||
234 | */ | ||
235 | #if defined(CONFIG_ARCH_OMAP4) && !(defined(CONFIG_ARCH_OMAP2) || \ | ||
236 | defined(CONFIG_ARCH_OMAP3)) | ||
237 | static inline u32 omap2_prm_read_mod_reg(s16 module, u16 idx) | ||
238 | { | ||
239 | WARN(1, "prm: omap2xxx/omap3xxx specific function and " | ||
240 | "not suppose to be used on omap4\n"); | ||
241 | return 0; | ||
242 | } | ||
243 | static inline void omap2_prm_write_mod_reg(u32 val, s16 module, u16 idx) | ||
244 | { | ||
245 | WARN(1, "prm: omap2xxx/omap3xxx specific function and " | ||
246 | "not suppose to be used on omap4\n"); | ||
247 | } | ||
248 | static inline u32 omap2_prm_rmw_mod_reg_bits(u32 mask, u32 bits, | ||
249 | s16 module, s16 idx) | ||
250 | { | ||
251 | WARN(1, "prm: omap2xxx/omap3xxx specific function and " | ||
252 | "not suppose to be used on omap4\n"); | ||
253 | return 0; | ||
254 | } | ||
255 | static inline u32 omap2_prm_set_mod_reg_bits(u32 bits, s16 module, s16 idx) | ||
256 | { | ||
257 | WARN(1, "prm: omap2xxx/omap3xxx specific function and " | ||
258 | "not suppose to be used on omap4\n"); | ||
259 | return 0; | ||
260 | } | ||
261 | static inline u32 omap2_prm_clear_mod_reg_bits(u32 bits, s16 module, s16 idx) | ||
262 | { | ||
263 | WARN(1, "prm: omap2xxx/omap3xxx specific function and " | ||
264 | "not suppose to be used on omap4\n"); | ||
265 | return 0; | ||
266 | } | ||
267 | static inline u32 omap2_prm_read_mod_bits_shift(s16 domain, s16 idx, u32 mask) | ||
268 | { | ||
269 | WARN(1, "prm: omap2xxx/omap3xxx specific function and " | ||
270 | "not suppose to be used on omap4\n"); | ||
271 | return 0; | ||
272 | } | ||
273 | static inline int omap2_prm_is_hardreset_asserted(s16 prm_mod, u8 shift) | ||
274 | { | ||
275 | WARN(1, "prm: omap2xxx/omap3xxx specific function and " | ||
276 | "not suppose to be used on omap4\n"); | ||
277 | return 0; | ||
278 | } | ||
279 | static inline int omap2_prm_assert_hardreset(s16 prm_mod, u8 shift) | ||
280 | { | ||
281 | WARN(1, "prm: omap2xxx/omap3xxx specific function and " | ||
282 | "not suppose to be used on omap4\n"); | ||
283 | return 0; | ||
284 | } | ||
285 | static inline int omap2_prm_deassert_hardreset(s16 prm_mod, u8 shift) | ||
286 | { | ||
287 | WARN(1, "prm: omap2xxx/omap3xxx specific function and " | ||
288 | "not suppose to be used on omap4\n"); | ||
289 | return 0; | ||
290 | } | ||
291 | #else | ||
232 | /* Power/reset management domain register get/set */ | 292 | /* Power/reset management domain register get/set */ |
233 | extern u32 omap2_prm_read_mod_reg(s16 module, u16 idx); | 293 | extern u32 omap2_prm_read_mod_reg(s16 module, u16 idx); |
234 | extern void omap2_prm_write_mod_reg(u32 val, s16 module, u16 idx); | 294 | extern void omap2_prm_write_mod_reg(u32 val, s16 module, u16 idx); |
@@ -242,6 +302,7 @@ extern int omap2_prm_is_hardreset_asserted(s16 prm_mod, u8 shift); | |||
242 | extern int omap2_prm_assert_hardreset(s16 prm_mod, u8 shift); | 302 | extern int omap2_prm_assert_hardreset(s16 prm_mod, u8 shift); |
243 | extern int omap2_prm_deassert_hardreset(s16 prm_mod, u8 shift); | 303 | extern int omap2_prm_deassert_hardreset(s16 prm_mod, u8 shift); |
244 | 304 | ||
305 | #endif /* CONFIG_ARCH_OMAP4 */ | ||
245 | #endif | 306 | #endif |
246 | 307 | ||
247 | /* | 308 | /* |
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index 302da7403a1..32e91a9c8b6 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c | |||
@@ -812,7 +812,7 @@ void __init omap_serial_init_port(struct omap_board_data *bdata) | |||
812 | 812 | ||
813 | oh->dev_attr = uart; | 813 | oh->dev_attr = uart; |
814 | 814 | ||
815 | acquire_console_sem(); /* in case the earlycon is on the UART */ | 815 | console_lock(); /* in case the earlycon is on the UART */ |
816 | 816 | ||
817 | /* | 817 | /* |
818 | * Because of early UART probing, UART did not get idled | 818 | * Because of early UART probing, UART did not get idled |
@@ -838,7 +838,7 @@ void __init omap_serial_init_port(struct omap_board_data *bdata) | |||
838 | omap_uart_block_sleep(uart); | 838 | omap_uart_block_sleep(uart); |
839 | uart->timeout = DEFAULT_TIMEOUT; | 839 | uart->timeout = DEFAULT_TIMEOUT; |
840 | 840 | ||
841 | release_console_sem(); | 841 | console_unlock(); |
842 | 842 | ||
843 | if ((cpu_is_omap34xx() && uart->padconf) || | 843 | if ((cpu_is_omap34xx() && uart->padconf) || |
844 | (uart->wk_en && uart->wk_mask)) { | 844 | (uart->wk_en && uart->wk_mask)) { |
diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c index 77ecebf3fae..c37e823266d 100644 --- a/arch/arm/mach-omap2/smartreflex.c +++ b/arch/arm/mach-omap2/smartreflex.c | |||
@@ -780,8 +780,7 @@ static int omap_sr_autocomp_show(void *data, u64 *val) | |||
780 | struct omap_sr *sr_info = (struct omap_sr *) data; | 780 | struct omap_sr *sr_info = (struct omap_sr *) data; |
781 | 781 | ||
782 | if (!sr_info) { | 782 | if (!sr_info) { |
783 | pr_warning("%s: omap_sr struct for sr_%s not found\n", | 783 | pr_warning("%s: omap_sr struct not found\n", __func__); |
784 | __func__, sr_info->voltdm->name); | ||
785 | return -EINVAL; | 784 | return -EINVAL; |
786 | } | 785 | } |
787 | 786 | ||
@@ -795,8 +794,7 @@ static int omap_sr_autocomp_store(void *data, u64 val) | |||
795 | struct omap_sr *sr_info = (struct omap_sr *) data; | 794 | struct omap_sr *sr_info = (struct omap_sr *) data; |
796 | 795 | ||
797 | if (!sr_info) { | 796 | if (!sr_info) { |
798 | pr_warning("%s: omap_sr struct for sr_%s not found\n", | 797 | pr_warning("%s: omap_sr struct not found\n", __func__); |
799 | __func__, sr_info->voltdm->name); | ||
800 | return -EINVAL; | 798 | return -EINVAL; |
801 | } | 799 | } |
802 | 800 | ||
@@ -834,7 +832,8 @@ static int __init omap_sr_probe(struct platform_device *pdev) | |||
834 | 832 | ||
835 | if (!pdata) { | 833 | if (!pdata) { |
836 | dev_err(&pdev->dev, "%s: platform data missing\n", __func__); | 834 | dev_err(&pdev->dev, "%s: platform data missing\n", __func__); |
837 | return -EINVAL; | 835 | ret = -EINVAL; |
836 | goto err_free_devinfo; | ||
838 | } | 837 | } |
839 | 838 | ||
840 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 839 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
@@ -966,7 +965,7 @@ static int __devexit omap_sr_remove(struct platform_device *pdev) | |||
966 | } | 965 | } |
967 | 966 | ||
968 | sr_info = _sr_lookup(pdata->voltdm); | 967 | sr_info = _sr_lookup(pdata->voltdm); |
969 | if (!sr_info) { | 968 | if (IS_ERR(sr_info)) { |
970 | dev_warn(&pdev->dev, "%s: omap_sr struct not found\n", | 969 | dev_warn(&pdev->dev, "%s: omap_sr struct not found\n", |
971 | __func__); | 970 | __func__); |
972 | return -EINVAL; | 971 | return -EINVAL; |
diff --git a/arch/arm/mach-omap2/sr_device.c b/arch/arm/mach-omap2/sr_device.c index 786d685c09a..b1e0af18a26 100644 --- a/arch/arm/mach-omap2/sr_device.c +++ b/arch/arm/mach-omap2/sr_device.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <plat/voltage.h> | 27 | #include <plat/voltage.h> |
28 | 28 | ||
29 | #include "control.h" | 29 | #include "control.h" |
30 | #include "pm.h" | ||
30 | 31 | ||
31 | static bool sr_enable_on_init; | 32 | static bool sr_enable_on_init; |
32 | 33 | ||
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c index 4e48e786bec..7b7c2683ae7 100644 --- a/arch/arm/mach-omap2/timer-gp.c +++ b/arch/arm/mach-omap2/timer-gp.c | |||
@@ -42,6 +42,8 @@ | |||
42 | 42 | ||
43 | #include "timer-gp.h" | 43 | #include "timer-gp.h" |
44 | 44 | ||
45 | #include <plat/common.h> | ||
46 | |||
45 | /* MAX_GPTIMER_ID: number of GPTIMERs on the chip */ | 47 | /* MAX_GPTIMER_ID: number of GPTIMERs on the chip */ |
46 | #define MAX_GPTIMER_ID 12 | 48 | #define MAX_GPTIMER_ID 12 |
47 | 49 | ||
@@ -176,10 +178,14 @@ static void __init omap2_gp_clockevent_init(void) | |||
176 | /* | 178 | /* |
177 | * When 32k-timer is enabled, don't use GPTimer for clocksource | 179 | * When 32k-timer is enabled, don't use GPTimer for clocksource |
178 | * instead, just leave default clocksource which uses the 32k | 180 | * instead, just leave default clocksource which uses the 32k |
179 | * sync counter. See clocksource setup in see plat-omap/common.c. | 181 | * sync counter. See clocksource setup in plat-omap/counter_32k.c |
180 | */ | 182 | */ |
181 | 183 | ||
182 | static inline void __init omap2_gp_clocksource_init(void) {} | 184 | static void __init omap2_gp_clocksource_init(void) |
185 | { | ||
186 | omap_init_clocksource_32k(); | ||
187 | } | ||
188 | |||
183 | #else | 189 | #else |
184 | /* | 190 | /* |
185 | * clocksource | 191 | * clocksource |
diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c index ed6079c94c5..12be525b8df 100644 --- a/arch/arm/mach-omap2/voltage.c +++ b/arch/arm/mach-omap2/voltage.c | |||
@@ -471,6 +471,7 @@ static void __init vdd_debugfs_init(struct omap_vdd_info *vdd) | |||
471 | strcat(name, vdd->voltdm.name); | 471 | strcat(name, vdd->voltdm.name); |
472 | 472 | ||
473 | vdd->debug_dir = debugfs_create_dir(name, voltage_dir); | 473 | vdd->debug_dir = debugfs_create_dir(name, voltage_dir); |
474 | kfree(name); | ||
474 | if (IS_ERR(vdd->debug_dir)) { | 475 | if (IS_ERR(vdd->debug_dir)) { |
475 | pr_warning("%s: Unable to create debugfs directory for" | 476 | pr_warning("%s: Unable to create debugfs directory for" |
476 | " vdd_%s\n", __func__, vdd->voltdm.name); | 477 | " vdd_%s\n", __func__, vdd->voltdm.name); |
diff --git a/arch/arm/mach-omap2/wd_timer.c b/arch/arm/mach-omap2/wd_timer.c index b0c4907ab3c..4067669d96c 100644 --- a/arch/arm/mach-omap2/wd_timer.c +++ b/arch/arm/mach-omap2/wd_timer.c | |||
@@ -13,6 +13,8 @@ | |||
13 | 13 | ||
14 | #include <plat/omap_hwmod.h> | 14 | #include <plat/omap_hwmod.h> |
15 | 15 | ||
16 | #include "wd_timer.h" | ||
17 | |||
16 | /* | 18 | /* |
17 | * In order to avoid any assumptions from bootloader regarding WDT | 19 | * In order to avoid any assumptions from bootloader regarding WDT |
18 | * settings, WDT module is reset during init. This enables the watchdog | 20 | * settings, WDT module is reset during init. This enables the watchdog |
diff --git a/arch/arm/mach-pnx4008/irq.c b/arch/arm/mach-pnx4008/irq.c index a9ce02b4bf1..c69c180aec7 100644 --- a/arch/arm/mach-pnx4008/irq.c +++ b/arch/arm/mach-pnx4008/irq.c | |||
@@ -36,44 +36,44 @@ | |||
36 | 36 | ||
37 | static u8 pnx4008_irq_type[NR_IRQS] = PNX4008_IRQ_TYPES; | 37 | static u8 pnx4008_irq_type[NR_IRQS] = PNX4008_IRQ_TYPES; |
38 | 38 | ||
39 | static void pnx4008_mask_irq(unsigned int irq) | 39 | static void pnx4008_mask_irq(struct irq_data *d) |
40 | { | 40 | { |
41 | __raw_writel(__raw_readl(INTC_ER(irq)) & ~INTC_BIT(irq), INTC_ER(irq)); /* mask interrupt */ | 41 | __raw_writel(__raw_readl(INTC_ER(d->irq)) & ~INTC_BIT(d->irq), INTC_ER(d->irq)); /* mask interrupt */ |
42 | } | 42 | } |
43 | 43 | ||
44 | static void pnx4008_unmask_irq(unsigned int irq) | 44 | static void pnx4008_unmask_irq(struct irq_data *d) |
45 | { | 45 | { |
46 | __raw_writel(__raw_readl(INTC_ER(irq)) | INTC_BIT(irq), INTC_ER(irq)); /* unmask interrupt */ | 46 | __raw_writel(__raw_readl(INTC_ER(d->irq)) | INTC_BIT(d->irq), INTC_ER(d->irq)); /* unmask interrupt */ |
47 | } | 47 | } |
48 | 48 | ||
49 | static void pnx4008_mask_ack_irq(unsigned int irq) | 49 | static void pnx4008_mask_ack_irq(struct irq_data *d) |
50 | { | 50 | { |
51 | __raw_writel(__raw_readl(INTC_ER(irq)) & ~INTC_BIT(irq), INTC_ER(irq)); /* mask interrupt */ | 51 | __raw_writel(__raw_readl(INTC_ER(d->irq)) & ~INTC_BIT(d->irq), INTC_ER(d->irq)); /* mask interrupt */ |
52 | __raw_writel(INTC_BIT(irq), INTC_SR(irq)); /* clear interrupt status */ | 52 | __raw_writel(INTC_BIT(d->irq), INTC_SR(d->irq)); /* clear interrupt status */ |
53 | } | 53 | } |
54 | 54 | ||
55 | static int pnx4008_set_irq_type(unsigned int irq, unsigned int type) | 55 | static int pnx4008_set_irq_type(struct irq_data *d, unsigned int type) |
56 | { | 56 | { |
57 | switch (type) { | 57 | switch (type) { |
58 | case IRQ_TYPE_EDGE_RISING: | 58 | case IRQ_TYPE_EDGE_RISING: |
59 | __raw_writel(__raw_readl(INTC_ATR(irq)) | INTC_BIT(irq), INTC_ATR(irq)); /*edge sensitive */ | 59 | __raw_writel(__raw_readl(INTC_ATR(d->irq)) | INTC_BIT(d->irq), INTC_ATR(d->irq)); /*edge sensitive */ |
60 | __raw_writel(__raw_readl(INTC_APR(irq)) | INTC_BIT(irq), INTC_APR(irq)); /*rising edge */ | 60 | __raw_writel(__raw_readl(INTC_APR(d->irq)) | INTC_BIT(d->irq), INTC_APR(d->irq)); /*rising edge */ |
61 | set_irq_handler(irq, handle_edge_irq); | 61 | set_irq_handler(d->irq, handle_edge_irq); |
62 | break; | 62 | break; |
63 | case IRQ_TYPE_EDGE_FALLING: | 63 | case IRQ_TYPE_EDGE_FALLING: |
64 | __raw_writel(__raw_readl(INTC_ATR(irq)) | INTC_BIT(irq), INTC_ATR(irq)); /*edge sensitive */ | 64 | __raw_writel(__raw_readl(INTC_ATR(d->irq)) | INTC_BIT(d->irq), INTC_ATR(d->irq)); /*edge sensitive */ |
65 | __raw_writel(__raw_readl(INTC_APR(irq)) & ~INTC_BIT(irq), INTC_APR(irq)); /*falling edge */ | 65 | __raw_writel(__raw_readl(INTC_APR(d->irq)) & ~INTC_BIT(d->irq), INTC_APR(d->irq)); /*falling edge */ |
66 | set_irq_handler(irq, handle_edge_irq); | 66 | set_irq_handler(d->irq, handle_edge_irq); |
67 | break; | 67 | break; |
68 | case IRQ_TYPE_LEVEL_LOW: | 68 | case IRQ_TYPE_LEVEL_LOW: |
69 | __raw_writel(__raw_readl(INTC_ATR(irq)) & ~INTC_BIT(irq), INTC_ATR(irq)); /*level sensitive */ | 69 | __raw_writel(__raw_readl(INTC_ATR(d->irq)) & ~INTC_BIT(d->irq), INTC_ATR(d->irq)); /*level sensitive */ |
70 | __raw_writel(__raw_readl(INTC_APR(irq)) & ~INTC_BIT(irq), INTC_APR(irq)); /*low level */ | 70 | __raw_writel(__raw_readl(INTC_APR(d->irq)) & ~INTC_BIT(d->irq), INTC_APR(d->irq)); /*low level */ |
71 | set_irq_handler(irq, handle_level_irq); | 71 | set_irq_handler(d->irq, handle_level_irq); |
72 | break; | 72 | break; |
73 | case IRQ_TYPE_LEVEL_HIGH: | 73 | case IRQ_TYPE_LEVEL_HIGH: |
74 | __raw_writel(__raw_readl(INTC_ATR(irq)) & ~INTC_BIT(irq), INTC_ATR(irq)); /*level sensitive */ | 74 | __raw_writel(__raw_readl(INTC_ATR(d->irq)) & ~INTC_BIT(d->irq), INTC_ATR(d->irq)); /*level sensitive */ |
75 | __raw_writel(__raw_readl(INTC_APR(irq)) | INTC_BIT(irq), INTC_APR(irq)); /* high level */ | 75 | __raw_writel(__raw_readl(INTC_APR(d->irq)) | INTC_BIT(d->irq), INTC_APR(d->irq)); /* high level */ |
76 | set_irq_handler(irq, handle_level_irq); | 76 | set_irq_handler(d->irq, handle_level_irq); |
77 | break; | 77 | break; |
78 | 78 | ||
79 | /* IRQ_TYPE_EDGE_BOTH is not supported */ | 79 | /* IRQ_TYPE_EDGE_BOTH is not supported */ |
@@ -85,10 +85,10 @@ static int pnx4008_set_irq_type(unsigned int irq, unsigned int type) | |||
85 | } | 85 | } |
86 | 86 | ||
87 | static struct irq_chip pnx4008_irq_chip = { | 87 | static struct irq_chip pnx4008_irq_chip = { |
88 | .ack = pnx4008_mask_ack_irq, | 88 | .irq_ack = pnx4008_mask_ack_irq, |
89 | .mask = pnx4008_mask_irq, | 89 | .irq_mask = pnx4008_mask_irq, |
90 | .unmask = pnx4008_unmask_irq, | 90 | .irq_unmask = pnx4008_unmask_irq, |
91 | .set_type = pnx4008_set_irq_type, | 91 | .irq_set_type = pnx4008_set_irq_type, |
92 | }; | 92 | }; |
93 | 93 | ||
94 | void __init pnx4008_init_irq(void) | 94 | void __init pnx4008_init_irq(void) |
@@ -99,14 +99,18 @@ void __init pnx4008_init_irq(void) | |||
99 | for (i = 0; i < NR_IRQS; i++) { | 99 | for (i = 0; i < NR_IRQS; i++) { |
100 | set_irq_flags(i, IRQF_VALID); | 100 | set_irq_flags(i, IRQF_VALID); |
101 | set_irq_chip(i, &pnx4008_irq_chip); | 101 | set_irq_chip(i, &pnx4008_irq_chip); |
102 | pnx4008_set_irq_type(i, pnx4008_irq_type[i]); | 102 | pnx4008_set_irq_type(irq_get_irq_data(i), pnx4008_irq_type[i]); |
103 | } | 103 | } |
104 | 104 | ||
105 | /* configure and enable IRQ 0,1,30,31 (cascade interrupts) */ | 105 | /* configure and enable IRQ 0,1,30,31 (cascade interrupts) */ |
106 | pnx4008_set_irq_type(SUB1_IRQ_N, pnx4008_irq_type[SUB1_IRQ_N]); | 106 | pnx4008_set_irq_type(irq_get_irq_data(SUB1_IRQ_N), |
107 | pnx4008_set_irq_type(SUB2_IRQ_N, pnx4008_irq_type[SUB2_IRQ_N]); | 107 | pnx4008_irq_type[SUB1_IRQ_N]); |
108 | pnx4008_set_irq_type(SUB1_FIQ_N, pnx4008_irq_type[SUB1_FIQ_N]); | 108 | pnx4008_set_irq_type(irq_get_irq_data(SUB2_IRQ_N), |
109 | pnx4008_set_irq_type(SUB2_FIQ_N, pnx4008_irq_type[SUB2_FIQ_N]); | 109 | pnx4008_irq_type[SUB2_IRQ_N]); |
110 | pnx4008_set_irq_type(irq_get_irq_data(SUB1_FIQ_N), | ||
111 | pnx4008_irq_type[SUB1_FIQ_N]); | ||
112 | pnx4008_set_irq_type(irq_get_irq_data(SUB2_FIQ_N), | ||
113 | pnx4008_irq_type[SUB2_FIQ_N]); | ||
110 | 114 | ||
111 | /* mask all others */ | 115 | /* mask all others */ |
112 | __raw_writel((1 << SUB2_FIQ_N) | (1 << SUB1_FIQ_N) | | 116 | __raw_writel((1 << SUB2_FIQ_N) | (1 << SUB1_FIQ_N) | |
diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c index ccb2d0cebcc..a134a1413e0 100644 --- a/arch/arm/mach-pxa/balloon3.c +++ b/arch/arm/mach-pxa/balloon3.c | |||
@@ -477,25 +477,25 @@ static inline void balloon3_leds_init(void) {} | |||
477 | /****************************************************************************** | 477 | /****************************************************************************** |
478 | * FPGA IRQ | 478 | * FPGA IRQ |
479 | ******************************************************************************/ | 479 | ******************************************************************************/ |
480 | static void balloon3_mask_irq(unsigned int irq) | 480 | static void balloon3_mask_irq(struct irq_data *d) |
481 | { | 481 | { |
482 | int balloon3_irq = (irq - BALLOON3_IRQ(0)); | 482 | int balloon3_irq = (d->irq - BALLOON3_IRQ(0)); |
483 | balloon3_irq_enabled &= ~(1 << balloon3_irq); | 483 | balloon3_irq_enabled &= ~(1 << balloon3_irq); |
484 | __raw_writel(~balloon3_irq_enabled, BALLOON3_INT_CONTROL_REG); | 484 | __raw_writel(~balloon3_irq_enabled, BALLOON3_INT_CONTROL_REG); |
485 | } | 485 | } |
486 | 486 | ||
487 | static void balloon3_unmask_irq(unsigned int irq) | 487 | static void balloon3_unmask_irq(struct irq_data *d) |
488 | { | 488 | { |
489 | int balloon3_irq = (irq - BALLOON3_IRQ(0)); | 489 | int balloon3_irq = (d->irq - BALLOON3_IRQ(0)); |
490 | balloon3_irq_enabled |= (1 << balloon3_irq); | 490 | balloon3_irq_enabled |= (1 << balloon3_irq); |
491 | __raw_writel(~balloon3_irq_enabled, BALLOON3_INT_CONTROL_REG); | 491 | __raw_writel(~balloon3_irq_enabled, BALLOON3_INT_CONTROL_REG); |
492 | } | 492 | } |
493 | 493 | ||
494 | static struct irq_chip balloon3_irq_chip = { | 494 | static struct irq_chip balloon3_irq_chip = { |
495 | .name = "FPGA", | 495 | .name = "FPGA", |
496 | .ack = balloon3_mask_irq, | 496 | .irq_ack = balloon3_mask_irq, |
497 | .mask = balloon3_mask_irq, | 497 | .irq_mask = balloon3_mask_irq, |
498 | .unmask = balloon3_unmask_irq, | 498 | .irq_unmask = balloon3_unmask_irq, |
499 | }; | 499 | }; |
500 | 500 | ||
501 | static void balloon3_irq_handler(unsigned int irq, struct irq_desc *desc) | 501 | static void balloon3_irq_handler(unsigned int irq, struct irq_desc *desc) |
@@ -504,8 +504,13 @@ static void balloon3_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
504 | balloon3_irq_enabled; | 504 | balloon3_irq_enabled; |
505 | do { | 505 | do { |
506 | /* clear useless edge notification */ | 506 | /* clear useless edge notification */ |
507 | if (desc->chip->ack) | 507 | if (desc->irq_data.chip->irq_ack) { |
508 | desc->chip->ack(BALLOON3_AUX_NIRQ); | 508 | struct irq_data *d; |
509 | |||
510 | d = irq_get_irq_data(BALLOON3_AUX_NIRQ); | ||
511 | desc->irq_data.chip->irq_ack(d); | ||
512 | } | ||
513 | |||
509 | while (pending) { | 514 | while (pending) { |
510 | irq = BALLOON3_IRQ(0) + __ffs(pending); | 515 | irq = BALLOON3_IRQ(0) + __ffs(pending); |
511 | generic_handle_irq(irq); | 516 | generic_handle_irq(irq); |
diff --git a/arch/arm/mach-pxa/clock-pxa3xx.c b/arch/arm/mach-pxa/clock-pxa3xx.c index 1b08a34ab23..3f864cd0bd2 100644 --- a/arch/arm/mach-pxa/clock-pxa3xx.c +++ b/arch/arm/mach-pxa/clock-pxa3xx.c | |||
@@ -115,7 +115,6 @@ static unsigned long clk_pxa3xx_smemc_getrate(struct clk *clk) | |||
115 | { | 115 | { |
116 | unsigned long acsr = ACSR; | 116 | unsigned long acsr = ACSR; |
117 | unsigned long memclkcfg = __raw_readl(MEMCLKCFG); | 117 | unsigned long memclkcfg = __raw_readl(MEMCLKCFG); |
118 | unsigned int smcfs = (acsr >> 23) & 0x7; | ||
119 | 118 | ||
120 | return BASE_CLK * smcfs_mult[(acsr >> 23) & 0x7] / | 119 | return BASE_CLK * smcfs_mult[(acsr >> 23) & 0x7] / |
121 | df_clkdiv[(memclkcfg >> 16) & 0x3]; | 120 | df_clkdiv[(memclkcfg >> 16) & 0x3]; |
diff --git a/arch/arm/mach-pxa/cm-x2xx-pci.c b/arch/arm/mach-pxa/cm-x2xx-pci.c index 0f313059977..a2380cd76f8 100644 --- a/arch/arm/mach-pxa/cm-x2xx-pci.c +++ b/arch/arm/mach-pxa/cm-x2xx-pci.c | |||
@@ -59,7 +59,7 @@ void __init cmx2xx_pci_adjust_zones(unsigned long *zone_size, | |||
59 | static void cmx2xx_it8152_irq_demux(unsigned int irq, struct irq_desc *desc) | 59 | static void cmx2xx_it8152_irq_demux(unsigned int irq, struct irq_desc *desc) |
60 | { | 60 | { |
61 | /* clear our parent irq */ | 61 | /* clear our parent irq */ |
62 | desc->chip->ack(irq); | 62 | desc->irq_data.chip->irq_ack(&desc->irq_data); |
63 | 63 | ||
64 | it8152_irq_demux(irq, desc); | 64 | it8152_irq_demux(irq, desc); |
65 | } | 65 | } |
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c index d6e15f71fc0..f5d91efc296 100644 --- a/arch/arm/mach-pxa/generic.c +++ b/arch/arm/mach-pxa/generic.c | |||
@@ -22,7 +22,6 @@ | |||
22 | 22 | ||
23 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
24 | #include <asm/system.h> | 24 | #include <asm/system.h> |
25 | #include <asm/pgtable.h> | ||
26 | #include <asm/mach/map.h> | 25 | #include <asm/mach/map.h> |
27 | #include <asm/mach-types.h> | 26 | #include <asm/mach-types.h> |
28 | 27 | ||
diff --git a/arch/arm/mach-pxa/generic.h b/arch/arm/mach-pxa/generic.h index 6205dc9a2b9..a079d8baa45 100644 --- a/arch/arm/mach-pxa/generic.h +++ b/arch/arm/mach-pxa/generic.h | |||
@@ -9,11 +9,13 @@ | |||
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | struct irq_data; | ||
12 | struct sys_timer; | 13 | struct sys_timer; |
13 | 14 | ||
14 | extern struct sys_timer pxa_timer; | 15 | extern struct sys_timer pxa_timer; |
15 | extern void __init pxa_init_irq(int irq_nr, | 16 | extern void __init pxa_init_irq(int irq_nr, |
16 | int (*set_wake)(unsigned int, unsigned int)); | 17 | int (*set_wake)(struct irq_data *, |
18 | unsigned int)); | ||
17 | extern void __init pxa25x_init_irq(void); | 19 | extern void __init pxa25x_init_irq(void); |
18 | #ifdef CONFIG_CPU_PXA26x | 20 | #ifdef CONFIG_CPU_PXA26x |
19 | extern void __init pxa26x_init_irq(void); | 21 | extern void __init pxa26x_init_irq(void); |
diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c index 54e91c9e71c..2693e3c3776 100644 --- a/arch/arm/mach-pxa/irq.c +++ b/arch/arm/mach-pxa/irq.c | |||
@@ -53,37 +53,48 @@ static inline int cpu_has_ipr(void) | |||
53 | return !cpu_is_pxa25x(); | 53 | return !cpu_is_pxa25x(); |
54 | } | 54 | } |
55 | 55 | ||
56 | static void pxa_mask_irq(unsigned int irq) | 56 | static inline void __iomem *irq_base(int i) |
57 | { | ||
58 | static unsigned long phys_base[] = { | ||
59 | 0x40d00000, | ||
60 | 0x40d0009c, | ||
61 | 0x40d00130, | ||
62 | }; | ||
63 | |||
64 | return (void __iomem *)io_p2v(phys_base[i]); | ||
65 | } | ||
66 | |||
67 | static void pxa_mask_irq(struct irq_data *d) | ||
57 | { | 68 | { |
58 | void __iomem *base = get_irq_chip_data(irq); | 69 | void __iomem *base = irq_data_get_irq_chip_data(d); |
59 | uint32_t icmr = __raw_readl(base + ICMR); | 70 | uint32_t icmr = __raw_readl(base + ICMR); |
60 | 71 | ||
61 | icmr &= ~(1 << IRQ_BIT(irq)); | 72 | icmr &= ~(1 << IRQ_BIT(d->irq)); |
62 | __raw_writel(icmr, base + ICMR); | 73 | __raw_writel(icmr, base + ICMR); |
63 | } | 74 | } |
64 | 75 | ||
65 | static void pxa_unmask_irq(unsigned int irq) | 76 | static void pxa_unmask_irq(struct irq_data *d) |
66 | { | 77 | { |
67 | void __iomem *base = get_irq_chip_data(irq); | 78 | void __iomem *base = irq_data_get_irq_chip_data(d); |
68 | uint32_t icmr = __raw_readl(base + ICMR); | 79 | uint32_t icmr = __raw_readl(base + ICMR); |
69 | 80 | ||
70 | icmr |= 1 << IRQ_BIT(irq); | 81 | icmr |= 1 << IRQ_BIT(d->irq); |
71 | __raw_writel(icmr, base + ICMR); | 82 | __raw_writel(icmr, base + ICMR); |
72 | } | 83 | } |
73 | 84 | ||
74 | static struct irq_chip pxa_internal_irq_chip = { | 85 | static struct irq_chip pxa_internal_irq_chip = { |
75 | .name = "SC", | 86 | .name = "SC", |
76 | .ack = pxa_mask_irq, | 87 | .irq_ack = pxa_mask_irq, |
77 | .mask = pxa_mask_irq, | 88 | .irq_mask = pxa_mask_irq, |
78 | .unmask = pxa_unmask_irq, | 89 | .irq_unmask = pxa_unmask_irq, |
79 | }; | 90 | }; |
80 | 91 | ||
81 | /* | 92 | /* |
82 | * GPIO IRQs for GPIO 0 and 1 | 93 | * GPIO IRQs for GPIO 0 and 1 |
83 | */ | 94 | */ |
84 | static int pxa_set_low_gpio_type(unsigned int irq, unsigned int type) | 95 | static int pxa_set_low_gpio_type(struct irq_data *d, unsigned int type) |
85 | { | 96 | { |
86 | int gpio = irq - IRQ_GPIO0; | 97 | int gpio = d->irq - IRQ_GPIO0; |
87 | 98 | ||
88 | if (__gpio_is_occupied(gpio)) { | 99 | if (__gpio_is_occupied(gpio)) { |
89 | pr_err("%s failed: GPIO is configured\n", __func__); | 100 | pr_err("%s failed: GPIO is configured\n", __func__); |
@@ -103,31 +114,17 @@ static int pxa_set_low_gpio_type(unsigned int irq, unsigned int type) | |||
103 | return 0; | 114 | return 0; |
104 | } | 115 | } |
105 | 116 | ||
106 | static void pxa_ack_low_gpio(unsigned int irq) | 117 | static void pxa_ack_low_gpio(struct irq_data *d) |
107 | { | ||
108 | GEDR0 = (1 << (irq - IRQ_GPIO0)); | ||
109 | } | ||
110 | |||
111 | static void pxa_mask_low_gpio(unsigned int irq) | ||
112 | { | ||
113 | struct irq_desc *desc = irq_to_desc(irq); | ||
114 | |||
115 | desc->chip->mask(irq); | ||
116 | } | ||
117 | |||
118 | static void pxa_unmask_low_gpio(unsigned int irq) | ||
119 | { | 118 | { |
120 | struct irq_desc *desc = irq_to_desc(irq); | 119 | GEDR0 = (1 << (d->irq - IRQ_GPIO0)); |
121 | |||
122 | desc->chip->unmask(irq); | ||
123 | } | 120 | } |
124 | 121 | ||
125 | static struct irq_chip pxa_low_gpio_chip = { | 122 | static struct irq_chip pxa_low_gpio_chip = { |
126 | .name = "GPIO-l", | 123 | .name = "GPIO-l", |
127 | .ack = pxa_ack_low_gpio, | 124 | .irq_ack = pxa_ack_low_gpio, |
128 | .mask = pxa_mask_low_gpio, | 125 | .irq_mask = pxa_mask_irq, |
129 | .unmask = pxa_unmask_low_gpio, | 126 | .irq_unmask = pxa_unmask_irq, |
130 | .set_type = pxa_set_low_gpio_type, | 127 | .irq_set_type = pxa_set_low_gpio_type, |
131 | }; | 128 | }; |
132 | 129 | ||
133 | static void __init pxa_init_low_gpio_irq(set_wake_t fn) | 130 | static void __init pxa_init_low_gpio_irq(set_wake_t fn) |
@@ -141,22 +138,12 @@ static void __init pxa_init_low_gpio_irq(set_wake_t fn) | |||
141 | 138 | ||
142 | for (irq = IRQ_GPIO0; irq <= IRQ_GPIO1; irq++) { | 139 | for (irq = IRQ_GPIO0; irq <= IRQ_GPIO1; irq++) { |
143 | set_irq_chip(irq, &pxa_low_gpio_chip); | 140 | set_irq_chip(irq, &pxa_low_gpio_chip); |
141 | set_irq_chip_data(irq, irq_base(0)); | ||
144 | set_irq_handler(irq, handle_edge_irq); | 142 | set_irq_handler(irq, handle_edge_irq); |
145 | set_irq_flags(irq, IRQF_VALID); | 143 | set_irq_flags(irq, IRQF_VALID); |
146 | } | 144 | } |
147 | 145 | ||
148 | pxa_low_gpio_chip.set_wake = fn; | 146 | pxa_low_gpio_chip.irq_set_wake = fn; |
149 | } | ||
150 | |||
151 | static inline void __iomem *irq_base(int i) | ||
152 | { | ||
153 | static unsigned long phys_base[] = { | ||
154 | 0x40d00000, | ||
155 | 0x40d0009c, | ||
156 | 0x40d00130, | ||
157 | }; | ||
158 | |||
159 | return (void __iomem *)io_p2v(phys_base[i >> 5]); | ||
160 | } | 147 | } |
161 | 148 | ||
162 | void __init pxa_init_irq(int irq_nr, set_wake_t fn) | 149 | void __init pxa_init_irq(int irq_nr, set_wake_t fn) |
@@ -168,7 +155,7 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn) | |||
168 | pxa_internal_irq_nr = irq_nr; | 155 | pxa_internal_irq_nr = irq_nr; |
169 | 156 | ||
170 | for (n = 0; n < irq_nr; n += 32) { | 157 | for (n = 0; n < irq_nr; n += 32) { |
171 | void __iomem *base = irq_base(n); | 158 | void __iomem *base = irq_base(n >> 5); |
172 | 159 | ||
173 | __raw_writel(0, base + ICMR); /* disable all IRQs */ | 160 | __raw_writel(0, base + ICMR); /* disable all IRQs */ |
174 | __raw_writel(0, base + ICLR); /* all IRQs are IRQ, not FIQ */ | 161 | __raw_writel(0, base + ICLR); /* all IRQs are IRQ, not FIQ */ |
@@ -188,7 +175,7 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn) | |||
188 | /* only unmasked interrupts kick us out of idle */ | 175 | /* only unmasked interrupts kick us out of idle */ |
189 | __raw_writel(1, irq_base(0) + ICCR); | 176 | __raw_writel(1, irq_base(0) + ICCR); |
190 | 177 | ||
191 | pxa_internal_irq_chip.set_wake = fn; | 178 | pxa_internal_irq_chip.irq_set_wake = fn; |
192 | pxa_init_low_gpio_irq(fn); | 179 | pxa_init_low_gpio_irq(fn); |
193 | } | 180 | } |
194 | 181 | ||
@@ -200,7 +187,7 @@ static int pxa_irq_suspend(struct sys_device *dev, pm_message_t state) | |||
200 | { | 187 | { |
201 | int i; | 188 | int i; |
202 | 189 | ||
203 | for (i = 0; i < pxa_internal_irq_nr; i += 32) { | 190 | for (i = 0; i < pxa_internal_irq_nr / 32; i++) { |
204 | void __iomem *base = irq_base(i); | 191 | void __iomem *base = irq_base(i); |
205 | 192 | ||
206 | saved_icmr[i] = __raw_readl(base + ICMR); | 193 | saved_icmr[i] = __raw_readl(base + ICMR); |
@@ -219,14 +206,14 @@ static int pxa_irq_resume(struct sys_device *dev) | |||
219 | { | 206 | { |
220 | int i; | 207 | int i; |
221 | 208 | ||
222 | for (i = 0; i < pxa_internal_irq_nr; i += 32) { | 209 | for (i = 0; i < pxa_internal_irq_nr / 32; i++) { |
223 | void __iomem *base = irq_base(i); | 210 | void __iomem *base = irq_base(i); |
224 | 211 | ||
225 | __raw_writel(saved_icmr[i], base + ICMR); | 212 | __raw_writel(saved_icmr[i], base + ICMR); |
226 | __raw_writel(0, base + ICLR); | 213 | __raw_writel(0, base + ICLR); |
227 | } | 214 | } |
228 | 215 | ||
229 | if (!cpu_is_pxa25x()) | 216 | if (cpu_has_ipr()) |
230 | for (i = 0; i < pxa_internal_irq_nr; i++) | 217 | for (i = 0; i < pxa_internal_irq_nr; i++) |
231 | __raw_writel(saved_ipr[i], IRQ_BASE + IPR(i)); | 218 | __raw_writel(saved_ipr[i], IRQ_BASE + IPR(i)); |
232 | 219 | ||
diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c index 8ab62a67780..c9a3e775c2d 100644 --- a/arch/arm/mach-pxa/lpd270.c +++ b/arch/arm/mach-pxa/lpd270.c | |||
@@ -95,9 +95,9 @@ static unsigned long lpd270_pin_config[] __initdata = { | |||
95 | 95 | ||
96 | static unsigned int lpd270_irq_enabled; | 96 | static unsigned int lpd270_irq_enabled; |
97 | 97 | ||
98 | static void lpd270_mask_irq(unsigned int irq) | 98 | static void lpd270_mask_irq(struct irq_data *d) |
99 | { | 99 | { |
100 | int lpd270_irq = irq - LPD270_IRQ(0); | 100 | int lpd270_irq = d->irq - LPD270_IRQ(0); |
101 | 101 | ||
102 | __raw_writew(~(1 << lpd270_irq), LPD270_INT_STATUS); | 102 | __raw_writew(~(1 << lpd270_irq), LPD270_INT_STATUS); |
103 | 103 | ||
@@ -105,9 +105,9 @@ static void lpd270_mask_irq(unsigned int irq) | |||
105 | __raw_writew(lpd270_irq_enabled, LPD270_INT_MASK); | 105 | __raw_writew(lpd270_irq_enabled, LPD270_INT_MASK); |
106 | } | 106 | } |
107 | 107 | ||
108 | static void lpd270_unmask_irq(unsigned int irq) | 108 | static void lpd270_unmask_irq(struct irq_data *d) |
109 | { | 109 | { |
110 | int lpd270_irq = irq - LPD270_IRQ(0); | 110 | int lpd270_irq = d->irq - LPD270_IRQ(0); |
111 | 111 | ||
112 | lpd270_irq_enabled |= 1 << lpd270_irq; | 112 | lpd270_irq_enabled |= 1 << lpd270_irq; |
113 | __raw_writew(lpd270_irq_enabled, LPD270_INT_MASK); | 113 | __raw_writew(lpd270_irq_enabled, LPD270_INT_MASK); |
@@ -115,9 +115,9 @@ static void lpd270_unmask_irq(unsigned int irq) | |||
115 | 115 | ||
116 | static struct irq_chip lpd270_irq_chip = { | 116 | static struct irq_chip lpd270_irq_chip = { |
117 | .name = "CPLD", | 117 | .name = "CPLD", |
118 | .ack = lpd270_mask_irq, | 118 | .irq_ack = lpd270_mask_irq, |
119 | .mask = lpd270_mask_irq, | 119 | .irq_mask = lpd270_mask_irq, |
120 | .unmask = lpd270_unmask_irq, | 120 | .irq_unmask = lpd270_unmask_irq, |
121 | }; | 121 | }; |
122 | 122 | ||
123 | static void lpd270_irq_handler(unsigned int irq, struct irq_desc *desc) | 123 | static void lpd270_irq_handler(unsigned int irq, struct irq_desc *desc) |
@@ -126,7 +126,8 @@ static void lpd270_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
126 | 126 | ||
127 | pending = __raw_readw(LPD270_INT_STATUS) & lpd270_irq_enabled; | 127 | pending = __raw_readw(LPD270_INT_STATUS) & lpd270_irq_enabled; |
128 | do { | 128 | do { |
129 | desc->chip->ack(irq); /* clear useless edge notification */ | 129 | /* clear useless edge notification */ |
130 | desc->irq_data.chip->irq_ack(&desc->irq_data); | ||
130 | if (likely(pending)) { | 131 | if (likely(pending)) { |
131 | irq = LPD270_IRQ(0) + __ffs(pending); | 132 | irq = LPD270_IRQ(0) + __ffs(pending); |
132 | generic_handle_irq(irq); | 133 | generic_handle_irq(irq); |
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c index 3072dbea5c1..dca20de306b 100644 --- a/arch/arm/mach-pxa/lubbock.c +++ b/arch/arm/mach-pxa/lubbock.c | |||
@@ -122,15 +122,15 @@ EXPORT_SYMBOL(lubbock_set_misc_wr); | |||
122 | 122 | ||
123 | static unsigned long lubbock_irq_enabled; | 123 | static unsigned long lubbock_irq_enabled; |
124 | 124 | ||
125 | static void lubbock_mask_irq(unsigned int irq) | 125 | static void lubbock_mask_irq(struct irq_data *d) |
126 | { | 126 | { |
127 | int lubbock_irq = (irq - LUBBOCK_IRQ(0)); | 127 | int lubbock_irq = (d->irq - LUBBOCK_IRQ(0)); |
128 | LUB_IRQ_MASK_EN = (lubbock_irq_enabled &= ~(1 << lubbock_irq)); | 128 | LUB_IRQ_MASK_EN = (lubbock_irq_enabled &= ~(1 << lubbock_irq)); |
129 | } | 129 | } |
130 | 130 | ||
131 | static void lubbock_unmask_irq(unsigned int irq) | 131 | static void lubbock_unmask_irq(struct irq_data *d) |
132 | { | 132 | { |
133 | int lubbock_irq = (irq - LUBBOCK_IRQ(0)); | 133 | int lubbock_irq = (d->irq - LUBBOCK_IRQ(0)); |
134 | /* the irq can be acknowledged only if deasserted, so it's done here */ | 134 | /* the irq can be acknowledged only if deasserted, so it's done here */ |
135 | LUB_IRQ_SET_CLR &= ~(1 << lubbock_irq); | 135 | LUB_IRQ_SET_CLR &= ~(1 << lubbock_irq); |
136 | LUB_IRQ_MASK_EN = (lubbock_irq_enabled |= (1 << lubbock_irq)); | 136 | LUB_IRQ_MASK_EN = (lubbock_irq_enabled |= (1 << lubbock_irq)); |
@@ -138,16 +138,17 @@ static void lubbock_unmask_irq(unsigned int irq) | |||
138 | 138 | ||
139 | static struct irq_chip lubbock_irq_chip = { | 139 | static struct irq_chip lubbock_irq_chip = { |
140 | .name = "FPGA", | 140 | .name = "FPGA", |
141 | .ack = lubbock_mask_irq, | 141 | .irq_ack = lubbock_mask_irq, |
142 | .mask = lubbock_mask_irq, | 142 | .irq_mask = lubbock_mask_irq, |
143 | .unmask = lubbock_unmask_irq, | 143 | .irq_unmask = lubbock_unmask_irq, |
144 | }; | 144 | }; |
145 | 145 | ||
146 | static void lubbock_irq_handler(unsigned int irq, struct irq_desc *desc) | 146 | static void lubbock_irq_handler(unsigned int irq, struct irq_desc *desc) |
147 | { | 147 | { |
148 | unsigned long pending = LUB_IRQ_SET_CLR & lubbock_irq_enabled; | 148 | unsigned long pending = LUB_IRQ_SET_CLR & lubbock_irq_enabled; |
149 | do { | 149 | do { |
150 | desc->chip->ack(irq); /* clear our parent irq */ | 150 | /* clear our parent irq */ |
151 | desc->irq_data.chip->irq_ack(&desc->irq_data); | ||
151 | if (likely(pending)) { | 152 | if (likely(pending)) { |
152 | irq = LUBBOCK_IRQ(0) + __ffs(pending); | 153 | irq = LUBBOCK_IRQ(0) + __ffs(pending); |
153 | generic_handle_irq(irq); | 154 | generic_handle_irq(irq); |
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c index 740c03590e3..d4b6f2375f2 100644 --- a/arch/arm/mach-pxa/mainstone.c +++ b/arch/arm/mach-pxa/mainstone.c | |||
@@ -123,15 +123,15 @@ static unsigned long mainstone_pin_config[] = { | |||
123 | 123 | ||
124 | static unsigned long mainstone_irq_enabled; | 124 | static unsigned long mainstone_irq_enabled; |
125 | 125 | ||
126 | static void mainstone_mask_irq(unsigned int irq) | 126 | static void mainstone_mask_irq(struct irq_data *d) |
127 | { | 127 | { |
128 | int mainstone_irq = (irq - MAINSTONE_IRQ(0)); | 128 | int mainstone_irq = (d->irq - MAINSTONE_IRQ(0)); |
129 | MST_INTMSKENA = (mainstone_irq_enabled &= ~(1 << mainstone_irq)); | 129 | MST_INTMSKENA = (mainstone_irq_enabled &= ~(1 << mainstone_irq)); |
130 | } | 130 | } |
131 | 131 | ||
132 | static void mainstone_unmask_irq(unsigned int irq) | 132 | static void mainstone_unmask_irq(struct irq_data *d) |
133 | { | 133 | { |
134 | int mainstone_irq = (irq - MAINSTONE_IRQ(0)); | 134 | int mainstone_irq = (d->irq - MAINSTONE_IRQ(0)); |
135 | /* the irq can be acknowledged only if deasserted, so it's done here */ | 135 | /* the irq can be acknowledged only if deasserted, so it's done here */ |
136 | MST_INTSETCLR &= ~(1 << mainstone_irq); | 136 | MST_INTSETCLR &= ~(1 << mainstone_irq); |
137 | MST_INTMSKENA = (mainstone_irq_enabled |= (1 << mainstone_irq)); | 137 | MST_INTMSKENA = (mainstone_irq_enabled |= (1 << mainstone_irq)); |
@@ -139,16 +139,17 @@ static void mainstone_unmask_irq(unsigned int irq) | |||
139 | 139 | ||
140 | static struct irq_chip mainstone_irq_chip = { | 140 | static struct irq_chip mainstone_irq_chip = { |
141 | .name = "FPGA", | 141 | .name = "FPGA", |
142 | .ack = mainstone_mask_irq, | 142 | .irq_ack = mainstone_mask_irq, |
143 | .mask = mainstone_mask_irq, | 143 | .irq_mask = mainstone_mask_irq, |
144 | .unmask = mainstone_unmask_irq, | 144 | .irq_unmask = mainstone_unmask_irq, |
145 | }; | 145 | }; |
146 | 146 | ||
147 | static void mainstone_irq_handler(unsigned int irq, struct irq_desc *desc) | 147 | static void mainstone_irq_handler(unsigned int irq, struct irq_desc *desc) |
148 | { | 148 | { |
149 | unsigned long pending = MST_INTSETCLR & mainstone_irq_enabled; | 149 | unsigned long pending = MST_INTSETCLR & mainstone_irq_enabled; |
150 | do { | 150 | do { |
151 | desc->chip->ack(irq); /* clear useless edge notification */ | 151 | /* clear useless edge notification */ |
152 | desc->irq_data.chip->irq_ack(&desc->irq_data); | ||
152 | if (likely(pending)) { | 153 | if (likely(pending)) { |
153 | irq = MAINSTONE_IRQ(0) + __ffs(pending); | 154 | irq = MAINSTONE_IRQ(0) + __ffs(pending); |
154 | generic_handle_irq(irq); | 155 | generic_handle_irq(irq); |
diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c index f33647a8e0b..90820faa711 100644 --- a/arch/arm/mach-pxa/pcm990-baseboard.c +++ b/arch/arm/mach-pxa/pcm990-baseboard.c | |||
@@ -241,23 +241,23 @@ static struct platform_device pcm990_backlight_device = { | |||
241 | 241 | ||
242 | static unsigned long pcm990_irq_enabled; | 242 | static unsigned long pcm990_irq_enabled; |
243 | 243 | ||
244 | static void pcm990_mask_ack_irq(unsigned int irq) | 244 | static void pcm990_mask_ack_irq(struct irq_data *d) |
245 | { | 245 | { |
246 | int pcm990_irq = (irq - PCM027_IRQ(0)); | 246 | int pcm990_irq = (d->irq - PCM027_IRQ(0)); |
247 | PCM990_INTMSKENA = (pcm990_irq_enabled &= ~(1 << pcm990_irq)); | 247 | PCM990_INTMSKENA = (pcm990_irq_enabled &= ~(1 << pcm990_irq)); |
248 | } | 248 | } |
249 | 249 | ||
250 | static void pcm990_unmask_irq(unsigned int irq) | 250 | static void pcm990_unmask_irq(struct irq_data *d) |
251 | { | 251 | { |
252 | int pcm990_irq = (irq - PCM027_IRQ(0)); | 252 | int pcm990_irq = (d->irq - PCM027_IRQ(0)); |
253 | /* the irq can be acknowledged only if deasserted, so it's done here */ | 253 | /* the irq can be acknowledged only if deasserted, so it's done here */ |
254 | PCM990_INTSETCLR |= 1 << pcm990_irq; | 254 | PCM990_INTSETCLR |= 1 << pcm990_irq; |
255 | PCM990_INTMSKENA = (pcm990_irq_enabled |= (1 << pcm990_irq)); | 255 | PCM990_INTMSKENA = (pcm990_irq_enabled |= (1 << pcm990_irq)); |
256 | } | 256 | } |
257 | 257 | ||
258 | static struct irq_chip pcm990_irq_chip = { | 258 | static struct irq_chip pcm990_irq_chip = { |
259 | .mask_ack = pcm990_mask_ack_irq, | 259 | .irq_mask_ack = pcm990_mask_ack_irq, |
260 | .unmask = pcm990_unmask_irq, | 260 | .irq_unmask = pcm990_unmask_irq, |
261 | }; | 261 | }; |
262 | 262 | ||
263 | static void pcm990_irq_handler(unsigned int irq, struct irq_desc *desc) | 263 | static void pcm990_irq_handler(unsigned int irq, struct irq_desc *desc) |
@@ -265,7 +265,8 @@ static void pcm990_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
265 | unsigned long pending = (~PCM990_INTSETCLR) & pcm990_irq_enabled; | 265 | unsigned long pending = (~PCM990_INTSETCLR) & pcm990_irq_enabled; |
266 | 266 | ||
267 | do { | 267 | do { |
268 | desc->chip->ack(irq); /* clear our parent IRQ */ | 268 | /* clear our parent IRQ */ |
269 | desc->irq_data.chip->irq_ack(&desc->irq_data); | ||
269 | if (likely(pending)) { | 270 | if (likely(pending)) { |
270 | irq = PCM027_IRQ(0) + __ffs(pending); | 271 | irq = PCM027_IRQ(0) + __ffs(pending); |
271 | generic_handle_irq(irq); | 272 | generic_handle_irq(irq); |
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index 3f5241c8489..fbc5b775f89 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/suspend.h> | 23 | #include <linux/suspend.h> |
24 | #include <linux/sysdev.h> | 24 | #include <linux/sysdev.h> |
25 | #include <linux/irq.h> | ||
25 | 26 | ||
26 | #include <asm/mach/map.h> | 27 | #include <asm/mach/map.h> |
27 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
@@ -282,15 +283,15 @@ static inline void pxa25x_init_pm(void) {} | |||
282 | /* PXA25x: supports wakeup from GPIO0..GPIO15 and RTC alarm | 283 | /* PXA25x: supports wakeup from GPIO0..GPIO15 and RTC alarm |
283 | */ | 284 | */ |
284 | 285 | ||
285 | static int pxa25x_set_wake(unsigned int irq, unsigned int on) | 286 | static int pxa25x_set_wake(struct irq_data *d, unsigned int on) |
286 | { | 287 | { |
287 | int gpio = IRQ_TO_GPIO(irq); | 288 | int gpio = IRQ_TO_GPIO(d->irq); |
288 | uint32_t mask = 0; | 289 | uint32_t mask = 0; |
289 | 290 | ||
290 | if (gpio >= 0 && gpio < 85) | 291 | if (gpio >= 0 && gpio < 85) |
291 | return gpio_set_wake(gpio, on); | 292 | return gpio_set_wake(gpio, on); |
292 | 293 | ||
293 | if (irq == IRQ_RTCAlrm) { | 294 | if (d->irq == IRQ_RTCAlrm) { |
294 | mask = PWER_RTC; | 295 | mask = PWER_RTC; |
295 | goto set_pwer; | 296 | goto set_pwer; |
296 | } | 297 | } |
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index b2130b7a7b5..987301ff4c3 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
19 | #include <linux/sysdev.h> | 19 | #include <linux/sysdev.h> |
20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
21 | #include <linux/irq.h> | ||
21 | 22 | ||
22 | #include <asm/mach/map.h> | 23 | #include <asm/mach/map.h> |
23 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
@@ -343,18 +344,18 @@ static inline void pxa27x_init_pm(void) {} | |||
343 | /* PXA27x: Various gpios can issue wakeup events. This logic only | 344 | /* PXA27x: Various gpios can issue wakeup events. This logic only |
344 | * handles the simple cases, not the WEMUX2 and WEMUX3 options | 345 | * handles the simple cases, not the WEMUX2 and WEMUX3 options |
345 | */ | 346 | */ |
346 | static int pxa27x_set_wake(unsigned int irq, unsigned int on) | 347 | static int pxa27x_set_wake(struct irq_data *d, unsigned int on) |
347 | { | 348 | { |
348 | int gpio = IRQ_TO_GPIO(irq); | 349 | int gpio = IRQ_TO_GPIO(d->irq); |
349 | uint32_t mask; | 350 | uint32_t mask; |
350 | 351 | ||
351 | if (gpio >= 0 && gpio < 128) | 352 | if (gpio >= 0 && gpio < 128) |
352 | return gpio_set_wake(gpio, on); | 353 | return gpio_set_wake(gpio, on); |
353 | 354 | ||
354 | if (irq == IRQ_KEYPAD) | 355 | if (d->irq == IRQ_KEYPAD) |
355 | return keypad_set_wake(on); | 356 | return keypad_set_wake(on); |
356 | 357 | ||
357 | switch (irq) { | 358 | switch (d->irq) { |
358 | case IRQ_RTCAlrm: | 359 | case IRQ_RTCAlrm: |
359 | mask = PWER_RTC; | 360 | mask = PWER_RTC; |
360 | break; | 361 | break; |
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index e14818f5d95..a7a19e1cd64 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c | |||
@@ -229,11 +229,11 @@ static void __init pxa3xx_init_pm(void) | |||
229 | pxa_cpu_pm_fns = &pxa3xx_cpu_pm_fns; | 229 | pxa_cpu_pm_fns = &pxa3xx_cpu_pm_fns; |
230 | } | 230 | } |
231 | 231 | ||
232 | static int pxa3xx_set_wake(unsigned int irq, unsigned int on) | 232 | static int pxa3xx_set_wake(struct irq_data *d, unsigned int on) |
233 | { | 233 | { |
234 | unsigned long flags, mask = 0; | 234 | unsigned long flags, mask = 0; |
235 | 235 | ||
236 | switch (irq) { | 236 | switch (d->irq) { |
237 | case IRQ_SSP3: | 237 | case IRQ_SSP3: |
238 | mask = ADXER_MFP_WSSP3; | 238 | mask = ADXER_MFP_WSSP3; |
239 | break; | 239 | break; |
@@ -322,40 +322,40 @@ static inline void pxa3xx_init_pm(void) {} | |||
322 | #define pxa3xx_set_wake NULL | 322 | #define pxa3xx_set_wake NULL |
323 | #endif | 323 | #endif |
324 | 324 | ||
325 | static void pxa_ack_ext_wakeup(unsigned int irq) | 325 | static void pxa_ack_ext_wakeup(struct irq_data *d) |
326 | { | 326 | { |
327 | PECR |= PECR_IS(irq - IRQ_WAKEUP0); | 327 | PECR |= PECR_IS(d->irq - IRQ_WAKEUP0); |
328 | } | 328 | } |
329 | 329 | ||
330 | static void pxa_mask_ext_wakeup(unsigned int irq) | 330 | static void pxa_mask_ext_wakeup(struct irq_data *d) |
331 | { | 331 | { |
332 | ICMR2 &= ~(1 << ((irq - PXA_IRQ(0)) & 0x1f)); | 332 | ICMR2 &= ~(1 << ((d->irq - PXA_IRQ(0)) & 0x1f)); |
333 | PECR &= ~PECR_IE(irq - IRQ_WAKEUP0); | 333 | PECR &= ~PECR_IE(d->irq - IRQ_WAKEUP0); |
334 | } | 334 | } |
335 | 335 | ||
336 | static void pxa_unmask_ext_wakeup(unsigned int irq) | 336 | static void pxa_unmask_ext_wakeup(struct irq_data *d) |
337 | { | 337 | { |
338 | ICMR2 |= 1 << ((irq - PXA_IRQ(0)) & 0x1f); | 338 | ICMR2 |= 1 << ((d->irq - PXA_IRQ(0)) & 0x1f); |
339 | PECR |= PECR_IE(irq - IRQ_WAKEUP0); | 339 | PECR |= PECR_IE(d->irq - IRQ_WAKEUP0); |
340 | } | 340 | } |
341 | 341 | ||
342 | static int pxa_set_ext_wakeup_type(unsigned int irq, unsigned int flow_type) | 342 | static int pxa_set_ext_wakeup_type(struct irq_data *d, unsigned int flow_type) |
343 | { | 343 | { |
344 | if (flow_type & IRQ_TYPE_EDGE_RISING) | 344 | if (flow_type & IRQ_TYPE_EDGE_RISING) |
345 | PWER |= 1 << (irq - IRQ_WAKEUP0); | 345 | PWER |= 1 << (d->irq - IRQ_WAKEUP0); |
346 | 346 | ||
347 | if (flow_type & IRQ_TYPE_EDGE_FALLING) | 347 | if (flow_type & IRQ_TYPE_EDGE_FALLING) |
348 | PWER |= 1 << (irq - IRQ_WAKEUP0 + 2); | 348 | PWER |= 1 << (d->irq - IRQ_WAKEUP0 + 2); |
349 | 349 | ||
350 | return 0; | 350 | return 0; |
351 | } | 351 | } |
352 | 352 | ||
353 | static struct irq_chip pxa_ext_wakeup_chip = { | 353 | static struct irq_chip pxa_ext_wakeup_chip = { |
354 | .name = "WAKEUP", | 354 | .name = "WAKEUP", |
355 | .ack = pxa_ack_ext_wakeup, | 355 | .irq_ack = pxa_ack_ext_wakeup, |
356 | .mask = pxa_mask_ext_wakeup, | 356 | .irq_mask = pxa_mask_ext_wakeup, |
357 | .unmask = pxa_unmask_ext_wakeup, | 357 | .irq_unmask = pxa_unmask_ext_wakeup, |
358 | .set_type = pxa_set_ext_wakeup_type, | 358 | .irq_set_type = pxa_set_ext_wakeup_type, |
359 | }; | 359 | }; |
360 | 360 | ||
361 | static void __init pxa_init_ext_wakeup_irq(set_wake_t fn) | 361 | static void __init pxa_init_ext_wakeup_irq(set_wake_t fn) |
@@ -368,7 +368,7 @@ static void __init pxa_init_ext_wakeup_irq(set_wake_t fn) | |||
368 | set_irq_flags(irq, IRQF_VALID); | 368 | set_irq_flags(irq, IRQF_VALID); |
369 | } | 369 | } |
370 | 370 | ||
371 | pxa_ext_wakeup_chip.set_wake = fn; | 371 | pxa_ext_wakeup_chip.irq_set_wake = fn; |
372 | } | 372 | } |
373 | 373 | ||
374 | void __init pxa3xx_init_irq(void) | 374 | void __init pxa3xx_init_irq(void) |
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index 0bc938729c4..b49a2c21124 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/spi/corgi_lcd.h> | 25 | #include <linux/spi/corgi_lcd.h> |
26 | #include <linux/spi/pxa2xx_spi.h> | 26 | #include <linux/spi/pxa2xx_spi.h> |
27 | #include <linux/mtd/sharpsl.h> | 27 | #include <linux/mtd/sharpsl.h> |
28 | #include <linux/mtd/physmap.h> | ||
28 | #include <linux/input/matrix_keypad.h> | 29 | #include <linux/input/matrix_keypad.h> |
29 | #include <linux/regulator/machine.h> | 30 | #include <linux/regulator/machine.h> |
30 | #include <linux/io.h> | 31 | #include <linux/io.h> |
diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c index de69b203afa..49eeeab2368 100644 --- a/arch/arm/mach-pxa/viper.c +++ b/arch/arm/mach-pxa/viper.c | |||
@@ -249,9 +249,9 @@ static inline int viper_bit_to_irq(int bit) | |||
249 | return viper_isa_irqs[bit] + PXA_ISA_IRQ(0); | 249 | return viper_isa_irqs[bit] + PXA_ISA_IRQ(0); |
250 | } | 250 | } |
251 | 251 | ||
252 | static void viper_ack_irq(unsigned int irq) | 252 | static void viper_ack_irq(struct irq_data *d) |
253 | { | 253 | { |
254 | int viper_irq = viper_irq_to_bitmask(irq); | 254 | int viper_irq = viper_irq_to_bitmask(d->irq); |
255 | 255 | ||
256 | if (viper_irq & 0xff) | 256 | if (viper_irq & 0xff) |
257 | VIPER_LO_IRQ_STATUS = viper_irq; | 257 | VIPER_LO_IRQ_STATUS = viper_irq; |
@@ -259,14 +259,14 @@ static void viper_ack_irq(unsigned int irq) | |||
259 | VIPER_HI_IRQ_STATUS = (viper_irq >> 8); | 259 | VIPER_HI_IRQ_STATUS = (viper_irq >> 8); |
260 | } | 260 | } |
261 | 261 | ||
262 | static void viper_mask_irq(unsigned int irq) | 262 | static void viper_mask_irq(struct irq_data *d) |
263 | { | 263 | { |
264 | viper_irq_enabled_mask &= ~(viper_irq_to_bitmask(irq)); | 264 | viper_irq_enabled_mask &= ~(viper_irq_to_bitmask(d->irq)); |
265 | } | 265 | } |
266 | 266 | ||
267 | static void viper_unmask_irq(unsigned int irq) | 267 | static void viper_unmask_irq(struct irq_data *d) |
268 | { | 268 | { |
269 | viper_irq_enabled_mask |= viper_irq_to_bitmask(irq); | 269 | viper_irq_enabled_mask |= viper_irq_to_bitmask(d->irq); |
270 | } | 270 | } |
271 | 271 | ||
272 | static inline unsigned long viper_irq_pending(void) | 272 | static inline unsigned long viper_irq_pending(void) |
@@ -283,7 +283,7 @@ static void viper_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
283 | do { | 283 | do { |
284 | /* we're in a chained irq handler, | 284 | /* we're in a chained irq handler, |
285 | * so ack the interrupt by hand */ | 285 | * so ack the interrupt by hand */ |
286 | desc->chip->ack(irq); | 286 | desc->irq_data.chip->irq_ack(&desc->irq_data); |
287 | 287 | ||
288 | if (likely(pending)) { | 288 | if (likely(pending)) { |
289 | irq = viper_bit_to_irq(__ffs(pending)); | 289 | irq = viper_bit_to_irq(__ffs(pending)); |
@@ -294,10 +294,10 @@ static void viper_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
294 | } | 294 | } |
295 | 295 | ||
296 | static struct irq_chip viper_irq_chip = { | 296 | static struct irq_chip viper_irq_chip = { |
297 | .name = "ISA", | 297 | .name = "ISA", |
298 | .ack = viper_ack_irq, | 298 | .irq_ack = viper_ack_irq, |
299 | .mask = viper_mask_irq, | 299 | .irq_mask = viper_mask_irq, |
300 | .unmask = viper_unmask_irq | 300 | .irq_unmask = viper_unmask_irq |
301 | }; | 301 | }; |
302 | 302 | ||
303 | static void __init viper_init_irq(void) | 303 | static void __init viper_init_irq(void) |
diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c index bf034c7670d..f4b053b3581 100644 --- a/arch/arm/mach-pxa/zeus.c +++ b/arch/arm/mach-pxa/zeus.c | |||
@@ -83,19 +83,19 @@ static inline int zeus_bit_to_irq(int bit) | |||
83 | return zeus_isa_irqs[bit] + PXA_ISA_IRQ(0); | 83 | return zeus_isa_irqs[bit] + PXA_ISA_IRQ(0); |
84 | } | 84 | } |
85 | 85 | ||
86 | static void zeus_ack_irq(unsigned int irq) | 86 | static void zeus_ack_irq(struct irq_data *d) |
87 | { | 87 | { |
88 | __raw_writew(zeus_irq_to_bitmask(irq), ZEUS_CPLD_ISA_IRQ); | 88 | __raw_writew(zeus_irq_to_bitmask(d->irq), ZEUS_CPLD_ISA_IRQ); |
89 | } | 89 | } |
90 | 90 | ||
91 | static void zeus_mask_irq(unsigned int irq) | 91 | static void zeus_mask_irq(struct irq_data *d) |
92 | { | 92 | { |
93 | zeus_irq_enabled_mask &= ~(zeus_irq_to_bitmask(irq)); | 93 | zeus_irq_enabled_mask &= ~(zeus_irq_to_bitmask(d->irq)); |
94 | } | 94 | } |
95 | 95 | ||
96 | static void zeus_unmask_irq(unsigned int irq) | 96 | static void zeus_unmask_irq(struct irq_data *d) |
97 | { | 97 | { |
98 | zeus_irq_enabled_mask |= zeus_irq_to_bitmask(irq); | 98 | zeus_irq_enabled_mask |= zeus_irq_to_bitmask(d->irq); |
99 | } | 99 | } |
100 | 100 | ||
101 | static inline unsigned long zeus_irq_pending(void) | 101 | static inline unsigned long zeus_irq_pending(void) |
@@ -111,7 +111,7 @@ static void zeus_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
111 | do { | 111 | do { |
112 | /* we're in a chained irq handler, | 112 | /* we're in a chained irq handler, |
113 | * so ack the interrupt by hand */ | 113 | * so ack the interrupt by hand */ |
114 | desc->chip->ack(gpio_to_irq(ZEUS_ISA_GPIO)); | 114 | desc->irq_data.chip->irq_ack(&desc->irq_data); |
115 | 115 | ||
116 | if (likely(pending)) { | 116 | if (likely(pending)) { |
117 | irq = zeus_bit_to_irq(__ffs(pending)); | 117 | irq = zeus_bit_to_irq(__ffs(pending)); |
@@ -122,10 +122,10 @@ static void zeus_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
122 | } | 122 | } |
123 | 123 | ||
124 | static struct irq_chip zeus_irq_chip = { | 124 | static struct irq_chip zeus_irq_chip = { |
125 | .name = "ISA", | 125 | .name = "ISA", |
126 | .ack = zeus_ack_irq, | 126 | .irq_ack = zeus_ack_irq, |
127 | .mask = zeus_mask_irq, | 127 | .irq_mask = zeus_mask_irq, |
128 | .unmask = zeus_unmask_irq, | 128 | .irq_unmask = zeus_unmask_irq, |
129 | }; | 129 | }; |
130 | 130 | ||
131 | static void __init zeus_init_irq(void) | 131 | static void __init zeus_init_irq(void) |
@@ -830,8 +830,8 @@ static void __init zeus_init(void) | |||
830 | pr_info("Zeus CPLD V%dI%d\n", (system_rev & 0xf0) >> 4, (system_rev & 0x0f)); | 830 | pr_info("Zeus CPLD V%dI%d\n", (system_rev & 0xf0) >> 4, (system_rev & 0x0f)); |
831 | 831 | ||
832 | /* Fix timings for dm9000s (CS1/CS2)*/ | 832 | /* Fix timings for dm9000s (CS1/CS2)*/ |
833 | msc0 = __raw_readl(MSC0) & 0x0000ffff | (dm9000_msc << 16); | 833 | msc0 = (__raw_readl(MSC0) & 0x0000ffff) | (dm9000_msc << 16); |
834 | msc1 = __raw_readl(MSC1) & 0xffff0000 | dm9000_msc; | 834 | msc1 = (__raw_readl(MSC1) & 0xffff0000) | dm9000_msc; |
835 | __raw_writel(msc0, MSC0); | 835 | __raw_writel(msc0, MSC0); |
836 | __raw_writel(msc1, MSC1); | 836 | __raw_writel(msc1, MSC1); |
837 | 837 | ||
diff --git a/arch/arm/mach-realview/Kconfig b/arch/arm/mach-realview/Kconfig index b4575ae9648..7ca138a943a 100644 --- a/arch/arm/mach-realview/Kconfig +++ b/arch/arm/mach-realview/Kconfig | |||
@@ -2,52 +2,56 @@ menu "RealView platform type" | |||
2 | depends on ARCH_REALVIEW | 2 | depends on ARCH_REALVIEW |
3 | 3 | ||
4 | config MACH_REALVIEW_EB | 4 | config MACH_REALVIEW_EB |
5 | bool "Support RealView/EB platform" | 5 | bool "Support RealView(R) Emulation Baseboard" |
6 | select ARM_GIC | 6 | select ARM_GIC |
7 | help | 7 | help |
8 | Include support for the ARM(R) RealView Emulation Baseboard platform. | 8 | Include support for the ARM(R) RealView(R) Emulation Baseboard |
9 | platform. | ||
9 | 10 | ||
10 | config REALVIEW_EB_A9MP | 11 | config REALVIEW_EB_A9MP |
11 | bool "Support Multicore Cortex-A9" | 12 | bool "Support Multicore Cortex-A9 Tile" |
12 | depends on MACH_REALVIEW_EB | 13 | depends on MACH_REALVIEW_EB |
13 | select CPU_V7 | 14 | select CPU_V7 |
14 | help | 15 | help |
15 | Enable support for the Cortex-A9MPCore tile on the Realview platform. | 16 | Enable support for the Cortex-A9MPCore tile fitted to the |
17 | Realview(R) Emulation Baseboard platform. | ||
16 | 18 | ||
17 | config REALVIEW_EB_ARM11MP | 19 | config REALVIEW_EB_ARM11MP |
18 | bool "Support ARM11MPCore tile" | 20 | bool "Support ARM11MPCore Tile" |
19 | depends on MACH_REALVIEW_EB | 21 | depends on MACH_REALVIEW_EB |
20 | select CPU_V6 | 22 | select CPU_V6 |
21 | select ARCH_HAS_BARRIERS if SMP | 23 | select ARCH_HAS_BARRIERS if SMP |
22 | help | 24 | help |
23 | Enable support for the ARM11MPCore tile on the Realview platform. | 25 | Enable support for the ARM11MPCore tile fitted to the Realview(R) |
26 | Emulation Baseboard platform. | ||
24 | 27 | ||
25 | config REALVIEW_EB_ARM11MP_REVB | 28 | config REALVIEW_EB_ARM11MP_REVB |
26 | bool "Support ARM11MPCore RevB tile" | 29 | bool "Support ARM11MPCore RevB Tile" |
27 | depends on REALVIEW_EB_ARM11MP | 30 | depends on REALVIEW_EB_ARM11MP |
28 | help | 31 | help |
29 | Enable support for the ARM11MPCore RevB tile on the Realview | 32 | Enable support for the ARM11MPCore Revision B tile on the |
30 | platform. Since there are device address differences, a | 33 | Realview(R) Emulation Baseboard platform. Since there are device |
31 | kernel built with this option enabled is not compatible with | 34 | address differences, a kernel built with this option enabled is |
32 | other revisions of the ARM11MPCore tile. | 35 | not compatible with other revisions of the ARM11MPCore tile. |
33 | 36 | ||
34 | config MACH_REALVIEW_PB11MP | 37 | config MACH_REALVIEW_PB11MP |
35 | bool "Support RealView/PB11MPCore platform" | 38 | bool "Support RealView(R) Platform Baseboard for ARM11MPCore" |
36 | select CPU_V6 | 39 | select CPU_V6 |
37 | select ARM_GIC | 40 | select ARM_GIC |
38 | select HAVE_PATA_PLATFORM | 41 | select HAVE_PATA_PLATFORM |
39 | select ARCH_HAS_BARRIERS if SMP | 42 | select ARCH_HAS_BARRIERS if SMP |
40 | help | 43 | help |
41 | Include support for the ARM(R) RealView MPCore Platform Baseboard. | 44 | Include support for the ARM(R) RealView(R) Platform Baseboard for |
42 | PB11MPCore is a platform with an on-board ARM11MPCore and has | 45 | the ARM11MPCore. This platform has an on-board ARM11MPCore and has |
43 | support for PCI-E and Compact Flash. | 46 | support for PCI-E and Compact Flash. |
44 | 47 | ||
45 | config MACH_REALVIEW_PB1176 | 48 | config MACH_REALVIEW_PB1176 |
46 | bool "Support RealView/PB1176 platform" | 49 | bool "Support RealView(R) Platform Baseboard for ARM1176JZF-S" |
47 | select CPU_V6 | 50 | select CPU_V6 |
48 | select ARM_GIC | 51 | select ARM_GIC |
49 | help | 52 | help |
50 | Include support for the ARM(R) RealView ARM1176 Platform Baseboard. | 53 | Include support for the ARM(R) RealView(R) Platform Baseboard for |
54 | ARM1176JZF-S. | ||
51 | 55 | ||
52 | config REALVIEW_PB1176_SECURE_FLASH | 56 | config REALVIEW_PB1176_SECURE_FLASH |
53 | bool "Allow access to the secure flash memory block" | 57 | bool "Allow access to the secure flash memory block" |
@@ -59,23 +63,24 @@ config REALVIEW_PB1176_SECURE_FLASH | |||
59 | block (64MB @ 0x3c000000) is required. | 63 | block (64MB @ 0x3c000000) is required. |
60 | 64 | ||
61 | config MACH_REALVIEW_PBA8 | 65 | config MACH_REALVIEW_PBA8 |
62 | bool "Support RealView/PB-A8 platform" | 66 | bool "Support RealView(R) Platform Baseboard for Cortex(tm)-A8 platform" |
63 | select CPU_V7 | 67 | select CPU_V7 |
64 | select ARM_GIC | 68 | select ARM_GIC |
65 | select HAVE_PATA_PLATFORM | 69 | select HAVE_PATA_PLATFORM |
66 | help | 70 | help |
67 | Include support for the ARM(R) RealView Cortex-A8 Platform Baseboard. | 71 | Include support for the ARM(R) RealView Platform Baseboard for |
68 | PB-A8 is a platform with an on-board Cortex-A8 and has support for | 72 | Cortex(tm)-A8. This platform has an on-board Cortex-A8 and has |
69 | PCI-E and Compact Flash. | 73 | support for PCI-E and Compact Flash. |
70 | 74 | ||
71 | config MACH_REALVIEW_PBX | 75 | config MACH_REALVIEW_PBX |
72 | bool "Support RealView/PBX platform" | 76 | bool "Support RealView(R) Platform Baseboard Explore" |
73 | select ARM_GIC | 77 | select ARM_GIC |
74 | select HAVE_PATA_PLATFORM | 78 | select HAVE_PATA_PLATFORM |
75 | select ARCH_SPARSEMEM_ENABLE if CPU_V7 && !REALVIEW_HIGH_PHYS_OFFSET | 79 | select ARCH_SPARSEMEM_ENABLE if CPU_V7 && !REALVIEW_HIGH_PHYS_OFFSET |
76 | select ZONE_DMA if SPARSEMEM | 80 | select ZONE_DMA if SPARSEMEM |
77 | help | 81 | help |
78 | Include support for the ARM(R) RealView PBX platform. | 82 | Include support for the ARM(R) RealView(R) Platform Baseboard |
83 | Explore. | ||
79 | 84 | ||
80 | config REALVIEW_HIGH_PHYS_OFFSET | 85 | config REALVIEW_HIGH_PHYS_OFFSET |
81 | bool "High physical base address for the RealView platform" | 86 | bool "High physical base address for the RealView platform" |
diff --git a/arch/arm/mach-realview/platsmp.c b/arch/arm/mach-realview/platsmp.c index a22bf67f2f7..6959d13d908 100644 --- a/arch/arm/mach-realview/platsmp.c +++ b/arch/arm/mach-realview/platsmp.c | |||
@@ -41,7 +41,7 @@ volatile int __cpuinitdata pen_release = -1; | |||
41 | * observers, irrespective of whether they're taking part in coherency | 41 | * observers, irrespective of whether they're taking part in coherency |
42 | * or not. This is necessary for the hotplug code to work reliably. | 42 | * or not. This is necessary for the hotplug code to work reliably. |
43 | */ | 43 | */ |
44 | static void write_pen_release(int val) | 44 | static void __cpuinit write_pen_release(int val) |
45 | { | 45 | { |
46 | pen_release = val; | 46 | pen_release = val; |
47 | smp_wmb(); | 47 | smp_wmb(); |
diff --git a/arch/arm/mach-rpc/irq.c b/arch/arm/mach-rpc/irq.c index 9dd15d679c5..d29cd9b737f 100644 --- a/arch/arm/mach-rpc/irq.c +++ b/arch/arm/mach-rpc/irq.c | |||
@@ -6,110 +6,110 @@ | |||
6 | #include <asm/hardware/iomd.h> | 6 | #include <asm/hardware/iomd.h> |
7 | #include <asm/irq.h> | 7 | #include <asm/irq.h> |
8 | 8 | ||
9 | static void iomd_ack_irq_a(unsigned int irq) | 9 | static void iomd_ack_irq_a(struct irq_data *d) |
10 | { | 10 | { |
11 | unsigned int val, mask; | 11 | unsigned int val, mask; |
12 | 12 | ||
13 | mask = 1 << irq; | 13 | mask = 1 << d->irq; |
14 | val = iomd_readb(IOMD_IRQMASKA); | 14 | val = iomd_readb(IOMD_IRQMASKA); |
15 | iomd_writeb(val & ~mask, IOMD_IRQMASKA); | 15 | iomd_writeb(val & ~mask, IOMD_IRQMASKA); |
16 | iomd_writeb(mask, IOMD_IRQCLRA); | 16 | iomd_writeb(mask, IOMD_IRQCLRA); |
17 | } | 17 | } |
18 | 18 | ||
19 | static void iomd_mask_irq_a(unsigned int irq) | 19 | static void iomd_mask_irq_a(struct irq_data *d) |
20 | { | 20 | { |
21 | unsigned int val, mask; | 21 | unsigned int val, mask; |
22 | 22 | ||
23 | mask = 1 << irq; | 23 | mask = 1 << d->irq; |
24 | val = iomd_readb(IOMD_IRQMASKA); | 24 | val = iomd_readb(IOMD_IRQMASKA); |
25 | iomd_writeb(val & ~mask, IOMD_IRQMASKA); | 25 | iomd_writeb(val & ~mask, IOMD_IRQMASKA); |
26 | } | 26 | } |
27 | 27 | ||
28 | static void iomd_unmask_irq_a(unsigned int irq) | 28 | static void iomd_unmask_irq_a(struct irq_data *d) |
29 | { | 29 | { |
30 | unsigned int val, mask; | 30 | unsigned int val, mask; |
31 | 31 | ||
32 | mask = 1 << irq; | 32 | mask = 1 << d->irq; |
33 | val = iomd_readb(IOMD_IRQMASKA); | 33 | val = iomd_readb(IOMD_IRQMASKA); |
34 | iomd_writeb(val | mask, IOMD_IRQMASKA); | 34 | iomd_writeb(val | mask, IOMD_IRQMASKA); |
35 | } | 35 | } |
36 | 36 | ||
37 | static struct irq_chip iomd_a_chip = { | 37 | static struct irq_chip iomd_a_chip = { |
38 | .ack = iomd_ack_irq_a, | 38 | .irq_ack = iomd_ack_irq_a, |
39 | .mask = iomd_mask_irq_a, | 39 | .irq_mask = iomd_mask_irq_a, |
40 | .unmask = iomd_unmask_irq_a, | 40 | .irq_unmask = iomd_unmask_irq_a, |
41 | }; | 41 | }; |
42 | 42 | ||
43 | static void iomd_mask_irq_b(unsigned int irq) | 43 | static void iomd_mask_irq_b(struct irq_data *d) |
44 | { | 44 | { |
45 | unsigned int val, mask; | 45 | unsigned int val, mask; |
46 | 46 | ||
47 | mask = 1 << (irq & 7); | 47 | mask = 1 << (d->irq & 7); |
48 | val = iomd_readb(IOMD_IRQMASKB); | 48 | val = iomd_readb(IOMD_IRQMASKB); |
49 | iomd_writeb(val & ~mask, IOMD_IRQMASKB); | 49 | iomd_writeb(val & ~mask, IOMD_IRQMASKB); |
50 | } | 50 | } |
51 | 51 | ||
52 | static void iomd_unmask_irq_b(unsigned int irq) | 52 | static void iomd_unmask_irq_b(struct irq_data *d) |
53 | { | 53 | { |
54 | unsigned int val, mask; | 54 | unsigned int val, mask; |
55 | 55 | ||
56 | mask = 1 << (irq & 7); | 56 | mask = 1 << (d->irq & 7); |
57 | val = iomd_readb(IOMD_IRQMASKB); | 57 | val = iomd_readb(IOMD_IRQMASKB); |
58 | iomd_writeb(val | mask, IOMD_IRQMASKB); | 58 | iomd_writeb(val | mask, IOMD_IRQMASKB); |
59 | } | 59 | } |
60 | 60 | ||
61 | static struct irq_chip iomd_b_chip = { | 61 | static struct irq_chip iomd_b_chip = { |
62 | .ack = iomd_mask_irq_b, | 62 | .irq_ack = iomd_mask_irq_b, |
63 | .mask = iomd_mask_irq_b, | 63 | .irq_mask = iomd_mask_irq_b, |
64 | .unmask = iomd_unmask_irq_b, | 64 | .irq_unmask = iomd_unmask_irq_b, |
65 | }; | 65 | }; |
66 | 66 | ||
67 | static void iomd_mask_irq_dma(unsigned int irq) | 67 | static void iomd_mask_irq_dma(struct irq_data *d) |
68 | { | 68 | { |
69 | unsigned int val, mask; | 69 | unsigned int val, mask; |
70 | 70 | ||
71 | mask = 1 << (irq & 7); | 71 | mask = 1 << (d->irq & 7); |
72 | val = iomd_readb(IOMD_DMAMASK); | 72 | val = iomd_readb(IOMD_DMAMASK); |
73 | iomd_writeb(val & ~mask, IOMD_DMAMASK); | 73 | iomd_writeb(val & ~mask, IOMD_DMAMASK); |
74 | } | 74 | } |
75 | 75 | ||
76 | static void iomd_unmask_irq_dma(unsigned int irq) | 76 | static void iomd_unmask_irq_dma(struct irq_data *d) |
77 | { | 77 | { |
78 | unsigned int val, mask; | 78 | unsigned int val, mask; |
79 | 79 | ||
80 | mask = 1 << (irq & 7); | 80 | mask = 1 << (d->irq & 7); |
81 | val = iomd_readb(IOMD_DMAMASK); | 81 | val = iomd_readb(IOMD_DMAMASK); |
82 | iomd_writeb(val | mask, IOMD_DMAMASK); | 82 | iomd_writeb(val | mask, IOMD_DMAMASK); |
83 | } | 83 | } |
84 | 84 | ||
85 | static struct irq_chip iomd_dma_chip = { | 85 | static struct irq_chip iomd_dma_chip = { |
86 | .ack = iomd_mask_irq_dma, | 86 | .irq_ack = iomd_mask_irq_dma, |
87 | .mask = iomd_mask_irq_dma, | 87 | .irq_mask = iomd_mask_irq_dma, |
88 | .unmask = iomd_unmask_irq_dma, | 88 | .irq_unmask = iomd_unmask_irq_dma, |
89 | }; | 89 | }; |
90 | 90 | ||
91 | static void iomd_mask_irq_fiq(unsigned int irq) | 91 | static void iomd_mask_irq_fiq(struct irq_data *d) |
92 | { | 92 | { |
93 | unsigned int val, mask; | 93 | unsigned int val, mask; |
94 | 94 | ||
95 | mask = 1 << (irq & 7); | 95 | mask = 1 << (d->irq & 7); |
96 | val = iomd_readb(IOMD_FIQMASK); | 96 | val = iomd_readb(IOMD_FIQMASK); |
97 | iomd_writeb(val & ~mask, IOMD_FIQMASK); | 97 | iomd_writeb(val & ~mask, IOMD_FIQMASK); |
98 | } | 98 | } |
99 | 99 | ||
100 | static void iomd_unmask_irq_fiq(unsigned int irq) | 100 | static void iomd_unmask_irq_fiq(struct irq_data *d) |
101 | { | 101 | { |
102 | unsigned int val, mask; | 102 | unsigned int val, mask; |
103 | 103 | ||
104 | mask = 1 << (irq & 7); | 104 | mask = 1 << (d->irq & 7); |
105 | val = iomd_readb(IOMD_FIQMASK); | 105 | val = iomd_readb(IOMD_FIQMASK); |
106 | iomd_writeb(val | mask, IOMD_FIQMASK); | 106 | iomd_writeb(val | mask, IOMD_FIQMASK); |
107 | } | 107 | } |
108 | 108 | ||
109 | static struct irq_chip iomd_fiq_chip = { | 109 | static struct irq_chip iomd_fiq_chip = { |
110 | .ack = iomd_mask_irq_fiq, | 110 | .irq_ack = iomd_mask_irq_fiq, |
111 | .mask = iomd_mask_irq_fiq, | 111 | .irq_mask = iomd_mask_irq_fiq, |
112 | .unmask = iomd_unmask_irq_fiq, | 112 | .irq_unmask = iomd_unmask_irq_fiq, |
113 | }; | 113 | }; |
114 | 114 | ||
115 | void __init rpc_init_irq(void) | 115 | void __init rpc_init_irq(void) |
diff --git a/arch/arm/mach-s3c2410/bast-irq.c b/arch/arm/mach-s3c2410/bast-irq.c index 217b102866d..606cb6b1cc4 100644 --- a/arch/arm/mach-s3c2410/bast-irq.c +++ b/arch/arm/mach-s3c2410/bast-irq.c | |||
@@ -75,38 +75,38 @@ static unsigned char bast_pc104_irqmasks[] = { | |||
75 | static unsigned char bast_pc104_irqs[] = { 3, 5, 7, 10 }; | 75 | static unsigned char bast_pc104_irqs[] = { 3, 5, 7, 10 }; |
76 | 76 | ||
77 | static void | 77 | static void |
78 | bast_pc104_mask(unsigned int irqno) | 78 | bast_pc104_mask(struct irq_data *data) |
79 | { | 79 | { |
80 | unsigned long temp; | 80 | unsigned long temp; |
81 | 81 | ||
82 | temp = __raw_readb(BAST_VA_PC104_IRQMASK); | 82 | temp = __raw_readb(BAST_VA_PC104_IRQMASK); |
83 | temp &= ~bast_pc104_irqmasks[irqno]; | 83 | temp &= ~bast_pc104_irqmasks[data->irq]; |
84 | __raw_writeb(temp, BAST_VA_PC104_IRQMASK); | 84 | __raw_writeb(temp, BAST_VA_PC104_IRQMASK); |
85 | } | 85 | } |
86 | 86 | ||
87 | static void | 87 | static void |
88 | bast_pc104_maskack(unsigned int irqno) | 88 | bast_pc104_maskack(struct irq_data *data) |
89 | { | 89 | { |
90 | struct irq_desc *desc = irq_desc + IRQ_ISA; | 90 | struct irq_desc *desc = irq_desc + IRQ_ISA; |
91 | 91 | ||
92 | bast_pc104_mask(irqno); | 92 | bast_pc104_mask(data); |
93 | desc->chip->ack(IRQ_ISA); | 93 | desc->irq_data.chip->irq_ack(&desc->irq_data); |
94 | } | 94 | } |
95 | 95 | ||
96 | static void | 96 | static void |
97 | bast_pc104_unmask(unsigned int irqno) | 97 | bast_pc104_unmask(struct irq_data *data) |
98 | { | 98 | { |
99 | unsigned long temp; | 99 | unsigned long temp; |
100 | 100 | ||
101 | temp = __raw_readb(BAST_VA_PC104_IRQMASK); | 101 | temp = __raw_readb(BAST_VA_PC104_IRQMASK); |
102 | temp |= bast_pc104_irqmasks[irqno]; | 102 | temp |= bast_pc104_irqmasks[data->irq]; |
103 | __raw_writeb(temp, BAST_VA_PC104_IRQMASK); | 103 | __raw_writeb(temp, BAST_VA_PC104_IRQMASK); |
104 | } | 104 | } |
105 | 105 | ||
106 | static struct irq_chip bast_pc104_chip = { | 106 | static struct irq_chip bast_pc104_chip = { |
107 | .mask = bast_pc104_mask, | 107 | .irq_mask = bast_pc104_mask, |
108 | .unmask = bast_pc104_unmask, | 108 | .irq_unmask = bast_pc104_unmask, |
109 | .ack = bast_pc104_maskack | 109 | .irq_ack = bast_pc104_maskack |
110 | }; | 110 | }; |
111 | 111 | ||
112 | static void | 112 | static void |
@@ -123,7 +123,7 @@ bast_irq_pc104_demux(unsigned int irq, | |||
123 | /* ack if we get an irq with nothing (ie, startup) */ | 123 | /* ack if we get an irq with nothing (ie, startup) */ |
124 | 124 | ||
125 | desc = irq_desc + IRQ_ISA; | 125 | desc = irq_desc + IRQ_ISA; |
126 | desc->chip->ack(IRQ_ISA); | 126 | desc->irq_data.chip->irq_ack(&desc->irq_data); |
127 | } else { | 127 | } else { |
128 | /* handle the IRQ */ | 128 | /* handle the IRQ */ |
129 | 129 | ||
diff --git a/arch/arm/mach-s3c2410/include/mach/irqs.h b/arch/arm/mach-s3c2410/include/mach/irqs.h index 11bb0f08fe6..e5a68ea1311 100644 --- a/arch/arm/mach-s3c2410/include/mach/irqs.h +++ b/arch/arm/mach-s3c2410/include/mach/irqs.h | |||
@@ -152,8 +152,8 @@ | |||
152 | 152 | ||
153 | #define IRQ_S3C2416_HSMMC0 S3C2410_IRQ(21) /* S3C2416/S3C2450 */ | 153 | #define IRQ_S3C2416_HSMMC0 S3C2410_IRQ(21) /* S3C2416/S3C2450 */ |
154 | 154 | ||
155 | #define IRQ_HSMMC0 IRQ_S3C2443_HSMMC | 155 | #define IRQ_HSMMC0 IRQ_S3C2416_HSMMC0 |
156 | #define IRQ_HSMMC1 IRQ_S3C2416_HSMMC0 | 156 | #define IRQ_HSMMC1 IRQ_S3C2443_HSMMC |
157 | 157 | ||
158 | #define IRQ_S3C2443_LCD1 S3C2410_IRQSUB(14) | 158 | #define IRQ_S3C2443_LCD1 S3C2410_IRQSUB(14) |
159 | #define IRQ_S3C2443_LCD2 S3C2410_IRQSUB(15) | 159 | #define IRQ_S3C2443_LCD2 S3C2410_IRQSUB(15) |
diff --git a/arch/arm/mach-s3c2410/include/mach/map.h b/arch/arm/mach-s3c2410/include/mach/map.h index cd3983ad416..25bbf5a942d 100644 --- a/arch/arm/mach-s3c2410/include/mach/map.h +++ b/arch/arm/mach-s3c2410/include/mach/map.h | |||
@@ -112,8 +112,8 @@ | |||
112 | #define S3C_PA_IIC S3C2410_PA_IIC | 112 | #define S3C_PA_IIC S3C2410_PA_IIC |
113 | #define S3C_PA_UART S3C24XX_PA_UART | 113 | #define S3C_PA_UART S3C24XX_PA_UART |
114 | #define S3C_PA_USBHOST S3C2410_PA_USBHOST | 114 | #define S3C_PA_USBHOST S3C2410_PA_USBHOST |
115 | #define S3C_PA_HSMMC0 S3C2443_PA_HSMMC | 115 | #define S3C_PA_HSMMC0 S3C2416_PA_HSMMC0 |
116 | #define S3C_PA_HSMMC1 S3C2416_PA_HSMMC0 | 116 | #define S3C_PA_HSMMC1 S3C2443_PA_HSMMC |
117 | #define S3C_PA_WDT S3C2410_PA_WATCHDOG | 117 | #define S3C_PA_WDT S3C2410_PA_WATCHDOG |
118 | #define S3C_PA_NAND S3C24XX_PA_NAND | 118 | #define S3C_PA_NAND S3C24XX_PA_NAND |
119 | 119 | ||
diff --git a/arch/arm/mach-s3c2410/include/mach/regs-s3c2443-clock.h b/arch/arm/mach-s3c2410/include/mach/regs-s3c2443-clock.h index 101aeea2231..44494a56e68 100644 --- a/arch/arm/mach-s3c2410/include/mach/regs-s3c2443-clock.h +++ b/arch/arm/mach-s3c2410/include/mach/regs-s3c2443-clock.h | |||
@@ -86,6 +86,7 @@ | |||
86 | #define S3C2443_HCLKCON_LCDC (1<<9) | 86 | #define S3C2443_HCLKCON_LCDC (1<<9) |
87 | #define S3C2443_HCLKCON_USBH (1<<11) | 87 | #define S3C2443_HCLKCON_USBH (1<<11) |
88 | #define S3C2443_HCLKCON_USBD (1<<12) | 88 | #define S3C2443_HCLKCON_USBD (1<<12) |
89 | #define S3C2416_HCLKCON_HSMMC0 (1<<15) | ||
89 | #define S3C2443_HCLKCON_HSMMC (1<<16) | 90 | #define S3C2443_HCLKCON_HSMMC (1<<16) |
90 | #define S3C2443_HCLKCON_CFC (1<<17) | 91 | #define S3C2443_HCLKCON_CFC (1<<17) |
91 | #define S3C2443_HCLKCON_SSMC (1<<18) | 92 | #define S3C2443_HCLKCON_SSMC (1<<18) |
diff --git a/arch/arm/mach-s3c2412/irq.c b/arch/arm/mach-s3c2412/irq.c index 6000ca9d181..eddb52ba5b6 100644 --- a/arch/arm/mach-s3c2412/irq.c +++ b/arch/arm/mach-s3c2412/irq.c | |||
@@ -49,9 +49,9 @@ | |||
49 | */ | 49 | */ |
50 | 50 | ||
51 | static void | 51 | static void |
52 | s3c2412_irq_mask(unsigned int irqno) | 52 | s3c2412_irq_mask(struct irq_data *data) |
53 | { | 53 | { |
54 | unsigned long bitval = 1UL << (irqno - IRQ_EINT0); | 54 | unsigned long bitval = 1UL << (data->irq - IRQ_EINT0); |
55 | unsigned long mask; | 55 | unsigned long mask; |
56 | 56 | ||
57 | mask = __raw_readl(S3C2410_INTMSK); | 57 | mask = __raw_readl(S3C2410_INTMSK); |
@@ -62,9 +62,9 @@ s3c2412_irq_mask(unsigned int irqno) | |||
62 | } | 62 | } |
63 | 63 | ||
64 | static inline void | 64 | static inline void |
65 | s3c2412_irq_ack(unsigned int irqno) | 65 | s3c2412_irq_ack(struct irq_data *data) |
66 | { | 66 | { |
67 | unsigned long bitval = 1UL << (irqno - IRQ_EINT0); | 67 | unsigned long bitval = 1UL << (data->irq - IRQ_EINT0); |
68 | 68 | ||
69 | __raw_writel(bitval, S3C2412_EINTPEND); | 69 | __raw_writel(bitval, S3C2412_EINTPEND); |
70 | __raw_writel(bitval, S3C2410_SRCPND); | 70 | __raw_writel(bitval, S3C2410_SRCPND); |
@@ -72,9 +72,9 @@ s3c2412_irq_ack(unsigned int irqno) | |||
72 | } | 72 | } |
73 | 73 | ||
74 | static inline void | 74 | static inline void |
75 | s3c2412_irq_maskack(unsigned int irqno) | 75 | s3c2412_irq_maskack(struct irq_data *data) |
76 | { | 76 | { |
77 | unsigned long bitval = 1UL << (irqno - IRQ_EINT0); | 77 | unsigned long bitval = 1UL << (data->irq - IRQ_EINT0); |
78 | unsigned long mask; | 78 | unsigned long mask; |
79 | 79 | ||
80 | mask = __raw_readl(S3C2410_INTMSK); | 80 | mask = __raw_readl(S3C2410_INTMSK); |
@@ -89,9 +89,9 @@ s3c2412_irq_maskack(unsigned int irqno) | |||
89 | } | 89 | } |
90 | 90 | ||
91 | static void | 91 | static void |
92 | s3c2412_irq_unmask(unsigned int irqno) | 92 | s3c2412_irq_unmask(struct irq_data *data) |
93 | { | 93 | { |
94 | unsigned long bitval = 1UL << (irqno - IRQ_EINT0); | 94 | unsigned long bitval = 1UL << (data->irq - IRQ_EINT0); |
95 | unsigned long mask; | 95 | unsigned long mask; |
96 | 96 | ||
97 | mask = __raw_readl(S3C2412_EINTMASK); | 97 | mask = __raw_readl(S3C2412_EINTMASK); |
@@ -102,11 +102,11 @@ s3c2412_irq_unmask(unsigned int irqno) | |||
102 | } | 102 | } |
103 | 103 | ||
104 | static struct irq_chip s3c2412_irq_eint0t4 = { | 104 | static struct irq_chip s3c2412_irq_eint0t4 = { |
105 | .ack = s3c2412_irq_ack, | 105 | .irq_ack = s3c2412_irq_ack, |
106 | .mask = s3c2412_irq_mask, | 106 | .irq_mask = s3c2412_irq_mask, |
107 | .unmask = s3c2412_irq_unmask, | 107 | .irq_unmask = s3c2412_irq_unmask, |
108 | .set_wake = s3c_irq_wake, | 108 | .irq_set_wake = s3c_irq_wake, |
109 | .set_type = s3c_irqext_type, | 109 | .irq_set_type = s3c_irqext_type, |
110 | }; | 110 | }; |
111 | 111 | ||
112 | #define INTBIT(x) (1 << ((x) - S3C2410_IRQSUB(0))) | 112 | #define INTBIT(x) (1 << ((x) - S3C2410_IRQSUB(0))) |
@@ -132,29 +132,29 @@ static void s3c2412_irq_demux_cfsdi(unsigned int irq, struct irq_desc *desc) | |||
132 | #define INTMSK_CFSDI (1UL << (IRQ_S3C2412_CFSDI - IRQ_EINT0)) | 132 | #define INTMSK_CFSDI (1UL << (IRQ_S3C2412_CFSDI - IRQ_EINT0)) |
133 | #define SUBMSK_CFSDI INTMSK_SUB(IRQ_S3C2412_SDI, IRQ_S3C2412_CF) | 133 | #define SUBMSK_CFSDI INTMSK_SUB(IRQ_S3C2412_SDI, IRQ_S3C2412_CF) |
134 | 134 | ||
135 | static void s3c2412_irq_cfsdi_mask(unsigned int irqno) | 135 | static void s3c2412_irq_cfsdi_mask(struct irq_data *data) |
136 | { | 136 | { |
137 | s3c_irqsub_mask(irqno, INTMSK_CFSDI, SUBMSK_CFSDI); | 137 | s3c_irqsub_mask(data->irq, INTMSK_CFSDI, SUBMSK_CFSDI); |
138 | } | 138 | } |
139 | 139 | ||
140 | static void s3c2412_irq_cfsdi_unmask(unsigned int irqno) | 140 | static void s3c2412_irq_cfsdi_unmask(struct irq_data *data) |
141 | { | 141 | { |
142 | s3c_irqsub_unmask(irqno, INTMSK_CFSDI); | 142 | s3c_irqsub_unmask(data->irq, INTMSK_CFSDI); |
143 | } | 143 | } |
144 | 144 | ||
145 | static void s3c2412_irq_cfsdi_ack(unsigned int irqno) | 145 | static void s3c2412_irq_cfsdi_ack(struct irq_data *data) |
146 | { | 146 | { |
147 | s3c_irqsub_maskack(irqno, INTMSK_CFSDI, SUBMSK_CFSDI); | 147 | s3c_irqsub_maskack(data->irq, INTMSK_CFSDI, SUBMSK_CFSDI); |
148 | } | 148 | } |
149 | 149 | ||
150 | static struct irq_chip s3c2412_irq_cfsdi = { | 150 | static struct irq_chip s3c2412_irq_cfsdi = { |
151 | .name = "s3c2412-cfsdi", | 151 | .name = "s3c2412-cfsdi", |
152 | .ack = s3c2412_irq_cfsdi_ack, | 152 | .irq_ack = s3c2412_irq_cfsdi_ack, |
153 | .mask = s3c2412_irq_cfsdi_mask, | 153 | .irq_mask = s3c2412_irq_cfsdi_mask, |
154 | .unmask = s3c2412_irq_cfsdi_unmask, | 154 | .irq_unmask = s3c2412_irq_cfsdi_unmask, |
155 | }; | 155 | }; |
156 | 156 | ||
157 | static int s3c2412_irq_rtc_wake(unsigned int irqno, unsigned int state) | 157 | static int s3c2412_irq_rtc_wake(struct irq_data *data, unsigned int state) |
158 | { | 158 | { |
159 | unsigned long pwrcfg; | 159 | unsigned long pwrcfg; |
160 | 160 | ||
@@ -165,7 +165,7 @@ static int s3c2412_irq_rtc_wake(unsigned int irqno, unsigned int state) | |||
165 | pwrcfg |= S3C2412_PWRCFG_RTC_MASKIRQ; | 165 | pwrcfg |= S3C2412_PWRCFG_RTC_MASKIRQ; |
166 | __raw_writel(pwrcfg, S3C2412_PWRCFG); | 166 | __raw_writel(pwrcfg, S3C2412_PWRCFG); |
167 | 167 | ||
168 | return s3c_irq_chip.set_wake(irqno, state); | 168 | return s3c_irq_chip.irq_set_wake(data, state); |
169 | } | 169 | } |
170 | 170 | ||
171 | static struct irq_chip s3c2412_irq_rtc_chip; | 171 | static struct irq_chip s3c2412_irq_rtc_chip; |
@@ -193,7 +193,7 @@ static int s3c2412_irq_add(struct sys_device *sysdev) | |||
193 | /* change RTC IRQ's set wake method */ | 193 | /* change RTC IRQ's set wake method */ |
194 | 194 | ||
195 | s3c2412_irq_rtc_chip = s3c_irq_chip; | 195 | s3c2412_irq_rtc_chip = s3c_irq_chip; |
196 | s3c2412_irq_rtc_chip.set_wake = s3c2412_irq_rtc_wake; | 196 | s3c2412_irq_rtc_chip.irq_set_wake = s3c2412_irq_rtc_wake; |
197 | 197 | ||
198 | set_irq_chip(IRQ_RTC, &s3c2412_irq_rtc_chip); | 198 | set_irq_chip(IRQ_RTC, &s3c2412_irq_rtc_chip); |
199 | 199 | ||
diff --git a/arch/arm/mach-s3c2416/Kconfig b/arch/arm/mach-s3c2416/Kconfig index df8d14974c9..69b48a7d1db 100644 --- a/arch/arm/mach-s3c2416/Kconfig +++ b/arch/arm/mach-s3c2416/Kconfig | |||
@@ -31,6 +31,17 @@ config S3C2416_PM | |||
31 | help | 31 | help |
32 | Internal config node to apply S3C2416 power management | 32 | Internal config node to apply S3C2416 power management |
33 | 33 | ||
34 | config S3C2416_SETUP_SDHCI | ||
35 | bool | ||
36 | select S3C2416_SETUP_SDHCI_GPIO | ||
37 | help | ||
38 | Internal helper functions for S3C2416 based SDHCI systems | ||
39 | |||
40 | config S3C2416_SETUP_SDHCI_GPIO | ||
41 | bool | ||
42 | help | ||
43 | Common setup code for SDHCI gpio. | ||
44 | |||
34 | menu "S3C2416 Machines" | 45 | menu "S3C2416 Machines" |
35 | 46 | ||
36 | config MACH_SMDK2416 | 47 | config MACH_SMDK2416 |
@@ -42,6 +53,7 @@ config MACH_SMDK2416 | |||
42 | select S3C_DEV_HSMMC1 | 53 | select S3C_DEV_HSMMC1 |
43 | select S3C_DEV_NAND | 54 | select S3C_DEV_NAND |
44 | select S3C_DEV_USB_HOST | 55 | select S3C_DEV_USB_HOST |
56 | select S3C2416_SETUP_SDHCI | ||
45 | select S3C2416_PM if PM | 57 | select S3C2416_PM if PM |
46 | help | 58 | help |
47 | Say Y here if you are using an SMDK2416 | 59 | Say Y here if you are using an SMDK2416 |
diff --git a/arch/arm/mach-s3c2416/Makefile b/arch/arm/mach-s3c2416/Makefile index ef038d62ffd..7b805b279ca 100644 --- a/arch/arm/mach-s3c2416/Makefile +++ b/arch/arm/mach-s3c2416/Makefile | |||
@@ -14,6 +14,10 @@ obj-$(CONFIG_CPU_S3C2416) += irq.o | |||
14 | obj-$(CONFIG_S3C2416_PM) += pm.o | 14 | obj-$(CONFIG_S3C2416_PM) += pm.o |
15 | #obj-$(CONFIG_S3C2416_DMA) += dma.o | 15 | #obj-$(CONFIG_S3C2416_DMA) += dma.o |
16 | 16 | ||
17 | # Device setup | ||
18 | obj-$(CONFIG_S3C2416_SETUP_SDHCI) += setup-sdhci.o | ||
19 | obj-$(CONFIG_S3C2416_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o | ||
20 | |||
17 | # Machine support | 21 | # Machine support |
18 | 22 | ||
19 | obj-$(CONFIG_MACH_SMDK2416) += mach-smdk2416.o | 23 | obj-$(CONFIG_MACH_SMDK2416) += mach-smdk2416.o |
diff --git a/arch/arm/mach-s3c2416/clock.c b/arch/arm/mach-s3c2416/clock.c index 7ccf5a2a2bf..3b02d8506e2 100644 --- a/arch/arm/mach-s3c2416/clock.c +++ b/arch/arm/mach-s3c2416/clock.c | |||
@@ -38,12 +38,11 @@ static unsigned int armdiv[8] = { | |||
38 | [7] = 8, | 38 | [7] = 8, |
39 | }; | 39 | }; |
40 | 40 | ||
41 | /* ID to hardware numbering, 0 is HSMMC1, 1 is HSMMC0 */ | ||
42 | static struct clksrc_clk hsmmc_div[] = { | 41 | static struct clksrc_clk hsmmc_div[] = { |
43 | [0] = { | 42 | [0] = { |
44 | .clk = { | 43 | .clk = { |
45 | .name = "hsmmc-div", | 44 | .name = "hsmmc-div", |
46 | .id = 1, | 45 | .id = 0, |
47 | .parent = &clk_esysclk.clk, | 46 | .parent = &clk_esysclk.clk, |
48 | }, | 47 | }, |
49 | .reg_div = { .reg = S3C2416_CLKDIV2, .size = 2, .shift = 6 }, | 48 | .reg_div = { .reg = S3C2416_CLKDIV2, .size = 2, .shift = 6 }, |
@@ -51,7 +50,7 @@ static struct clksrc_clk hsmmc_div[] = { | |||
51 | [1] = { | 50 | [1] = { |
52 | .clk = { | 51 | .clk = { |
53 | .name = "hsmmc-div", | 52 | .name = "hsmmc-div", |
54 | .id = 0, | 53 | .id = 1, |
55 | .parent = &clk_esysclk.clk, | 54 | .parent = &clk_esysclk.clk, |
56 | }, | 55 | }, |
57 | .reg_div = { .reg = S3C2443_CLKDIV1, .size = 2, .shift = 6 }, | 56 | .reg_div = { .reg = S3C2443_CLKDIV1, .size = 2, .shift = 6 }, |
@@ -61,7 +60,7 @@ static struct clksrc_clk hsmmc_div[] = { | |||
61 | static struct clksrc_clk hsmmc_mux[] = { | 60 | static struct clksrc_clk hsmmc_mux[] = { |
62 | [0] = { | 61 | [0] = { |
63 | .clk = { | 62 | .clk = { |
64 | .id = 1, | 63 | .id = 0, |
65 | .name = "hsmmc-if", | 64 | .name = "hsmmc-if", |
66 | .ctrlbit = (1 << 6), | 65 | .ctrlbit = (1 << 6), |
67 | .enable = s3c2443_clkcon_enable_s, | 66 | .enable = s3c2443_clkcon_enable_s, |
@@ -77,7 +76,7 @@ static struct clksrc_clk hsmmc_mux[] = { | |||
77 | }, | 76 | }, |
78 | [1] = { | 77 | [1] = { |
79 | .clk = { | 78 | .clk = { |
80 | .id = 0, | 79 | .id = 1, |
81 | .name = "hsmmc-if", | 80 | .name = "hsmmc-if", |
82 | .ctrlbit = (1 << 12), | 81 | .ctrlbit = (1 << 12), |
83 | .enable = s3c2443_clkcon_enable_s, | 82 | .enable = s3c2443_clkcon_enable_s, |
@@ -93,6 +92,13 @@ static struct clksrc_clk hsmmc_mux[] = { | |||
93 | }, | 92 | }, |
94 | }; | 93 | }; |
95 | 94 | ||
95 | static struct clk hsmmc0_clk = { | ||
96 | .name = "hsmmc", | ||
97 | .id = 0, | ||
98 | .parent = &clk_h, | ||
99 | .enable = s3c2443_clkcon_enable_h, | ||
100 | .ctrlbit = S3C2416_HCLKCON_HSMMC0, | ||
101 | }; | ||
96 | 102 | ||
97 | static inline unsigned int s3c2416_fclk_div(unsigned long clkcon0) | 103 | static inline unsigned int s3c2416_fclk_div(unsigned long clkcon0) |
98 | { | 104 | { |
@@ -130,6 +136,8 @@ void __init s3c2416_init_clocks(int xtal) | |||
130 | for (ptr = 0; ptr < ARRAY_SIZE(clksrcs); ptr++) | 136 | for (ptr = 0; ptr < ARRAY_SIZE(clksrcs); ptr++) |
131 | s3c_register_clksrc(clksrcs[ptr], 1); | 137 | s3c_register_clksrc(clksrcs[ptr], 1); |
132 | 138 | ||
139 | s3c24xx_register_clock(&hsmmc0_clk); | ||
140 | |||
133 | s3c_pwmclk_init(); | 141 | s3c_pwmclk_init(); |
134 | 142 | ||
135 | } | 143 | } |
diff --git a/arch/arm/mach-s3c2416/irq.c b/arch/arm/mach-s3c2416/irq.c index 00174daf152..680fe386aca 100644 --- a/arch/arm/mach-s3c2416/irq.c +++ b/arch/arm/mach-s3c2416/irq.c | |||
@@ -77,28 +77,27 @@ static void s3c2416_irq_demux_wdtac97(unsigned int irq, struct irq_desc *desc) | |||
77 | #define INTMSK_WDTAC97 (1UL << (IRQ_WDT - IRQ_EINT0)) | 77 | #define INTMSK_WDTAC97 (1UL << (IRQ_WDT - IRQ_EINT0)) |
78 | #define SUBMSK_WDTAC97 INTMSK(IRQ_S3C2443_WDT, IRQ_S3C2443_AC97) | 78 | #define SUBMSK_WDTAC97 INTMSK(IRQ_S3C2443_WDT, IRQ_S3C2443_AC97) |
79 | 79 | ||
80 | static void s3c2416_irq_wdtac97_mask(unsigned int irqno) | 80 | static void s3c2416_irq_wdtac97_mask(struct irq_data *data) |
81 | { | 81 | { |
82 | s3c_irqsub_mask(irqno, INTMSK_WDTAC97, SUBMSK_WDTAC97); | 82 | s3c_irqsub_mask(data->irq, INTMSK_WDTAC97, SUBMSK_WDTAC97); |
83 | } | 83 | } |
84 | 84 | ||
85 | static void s3c2416_irq_wdtac97_unmask(unsigned int irqno) | 85 | static void s3c2416_irq_wdtac97_unmask(struct irq_data *data) |
86 | { | 86 | { |
87 | s3c_irqsub_unmask(irqno, INTMSK_WDTAC97); | 87 | s3c_irqsub_unmask(data->irq, INTMSK_WDTAC97); |
88 | } | 88 | } |
89 | 89 | ||
90 | static void s3c2416_irq_wdtac97_ack(unsigned int irqno) | 90 | static void s3c2416_irq_wdtac97_ack(struct irq_data *data) |
91 | { | 91 | { |
92 | s3c_irqsub_maskack(irqno, INTMSK_WDTAC97, SUBMSK_WDTAC97); | 92 | s3c_irqsub_maskack(data->irq, INTMSK_WDTAC97, SUBMSK_WDTAC97); |
93 | } | 93 | } |
94 | 94 | ||
95 | static struct irq_chip s3c2416_irq_wdtac97 = { | 95 | static struct irq_chip s3c2416_irq_wdtac97 = { |
96 | .mask = s3c2416_irq_wdtac97_mask, | 96 | .irq_mask = s3c2416_irq_wdtac97_mask, |
97 | .unmask = s3c2416_irq_wdtac97_unmask, | 97 | .irq_unmask = s3c2416_irq_wdtac97_unmask, |
98 | .ack = s3c2416_irq_wdtac97_ack, | 98 | .irq_ack = s3c2416_irq_wdtac97_ack, |
99 | }; | 99 | }; |
100 | 100 | ||
101 | |||
102 | /* LCD sub interrupts */ | 101 | /* LCD sub interrupts */ |
103 | 102 | ||
104 | static void s3c2416_irq_demux_lcd(unsigned int irq, struct irq_desc *desc) | 103 | static void s3c2416_irq_demux_lcd(unsigned int irq, struct irq_desc *desc) |
@@ -109,28 +108,27 @@ static void s3c2416_irq_demux_lcd(unsigned int irq, struct irq_desc *desc) | |||
109 | #define INTMSK_LCD (1UL << (IRQ_LCD - IRQ_EINT0)) | 108 | #define INTMSK_LCD (1UL << (IRQ_LCD - IRQ_EINT0)) |
110 | #define SUBMSK_LCD INTMSK(IRQ_S3C2443_LCD1, IRQ_S3C2443_LCD4) | 109 | #define SUBMSK_LCD INTMSK(IRQ_S3C2443_LCD1, IRQ_S3C2443_LCD4) |
111 | 110 | ||
112 | static void s3c2416_irq_lcd_mask(unsigned int irqno) | 111 | static void s3c2416_irq_lcd_mask(struct irq_data *data) |
113 | { | 112 | { |
114 | s3c_irqsub_mask(irqno, INTMSK_LCD, SUBMSK_LCD); | 113 | s3c_irqsub_mask(data->irq, INTMSK_LCD, SUBMSK_LCD); |
115 | } | 114 | } |
116 | 115 | ||
117 | static void s3c2416_irq_lcd_unmask(unsigned int irqno) | 116 | static void s3c2416_irq_lcd_unmask(struct irq_data *data) |
118 | { | 117 | { |
119 | s3c_irqsub_unmask(irqno, INTMSK_LCD); | 118 | s3c_irqsub_unmask(data->irq, INTMSK_LCD); |
120 | } | 119 | } |
121 | 120 | ||
122 | static void s3c2416_irq_lcd_ack(unsigned int irqno) | 121 | static void s3c2416_irq_lcd_ack(struct irq_data *data) |
123 | { | 122 | { |
124 | s3c_irqsub_maskack(irqno, INTMSK_LCD, SUBMSK_LCD); | 123 | s3c_irqsub_maskack(data->irq, INTMSK_LCD, SUBMSK_LCD); |
125 | } | 124 | } |
126 | 125 | ||
127 | static struct irq_chip s3c2416_irq_lcd = { | 126 | static struct irq_chip s3c2416_irq_lcd = { |
128 | .mask = s3c2416_irq_lcd_mask, | 127 | .irq_mask = s3c2416_irq_lcd_mask, |
129 | .unmask = s3c2416_irq_lcd_unmask, | 128 | .irq_unmask = s3c2416_irq_lcd_unmask, |
130 | .ack = s3c2416_irq_lcd_ack, | 129 | .irq_ack = s3c2416_irq_lcd_ack, |
131 | }; | 130 | }; |
132 | 131 | ||
133 | |||
134 | /* DMA sub interrupts */ | 132 | /* DMA sub interrupts */ |
135 | 133 | ||
136 | static void s3c2416_irq_demux_dma(unsigned int irq, struct irq_desc *desc) | 134 | static void s3c2416_irq_demux_dma(unsigned int irq, struct irq_desc *desc) |
@@ -142,28 +140,27 @@ static void s3c2416_irq_demux_dma(unsigned int irq, struct irq_desc *desc) | |||
142 | #define SUBMSK_DMA INTMSK(IRQ_S3C2443_DMA0, IRQ_S3C2443_DMA5) | 140 | #define SUBMSK_DMA INTMSK(IRQ_S3C2443_DMA0, IRQ_S3C2443_DMA5) |
143 | 141 | ||
144 | 142 | ||
145 | static void s3c2416_irq_dma_mask(unsigned int irqno) | 143 | static void s3c2416_irq_dma_mask(struct irq_data *data) |
146 | { | 144 | { |
147 | s3c_irqsub_mask(irqno, INTMSK_DMA, SUBMSK_DMA); | 145 | s3c_irqsub_mask(data->irq, INTMSK_DMA, SUBMSK_DMA); |
148 | } | 146 | } |
149 | 147 | ||
150 | static void s3c2416_irq_dma_unmask(unsigned int irqno) | 148 | static void s3c2416_irq_dma_unmask(struct irq_data *data) |
151 | { | 149 | { |
152 | s3c_irqsub_unmask(irqno, INTMSK_DMA); | 150 | s3c_irqsub_unmask(data->irq, INTMSK_DMA); |
153 | } | 151 | } |
154 | 152 | ||
155 | static void s3c2416_irq_dma_ack(unsigned int irqno) | 153 | static void s3c2416_irq_dma_ack(struct irq_data *data) |
156 | { | 154 | { |
157 | s3c_irqsub_maskack(irqno, INTMSK_DMA, SUBMSK_DMA); | 155 | s3c_irqsub_maskack(data->irq, INTMSK_DMA, SUBMSK_DMA); |
158 | } | 156 | } |
159 | 157 | ||
160 | static struct irq_chip s3c2416_irq_dma = { | 158 | static struct irq_chip s3c2416_irq_dma = { |
161 | .mask = s3c2416_irq_dma_mask, | 159 | .irq_mask = s3c2416_irq_dma_mask, |
162 | .unmask = s3c2416_irq_dma_unmask, | 160 | .irq_unmask = s3c2416_irq_dma_unmask, |
163 | .ack = s3c2416_irq_dma_ack, | 161 | .irq_ack = s3c2416_irq_dma_ack, |
164 | }; | 162 | }; |
165 | 163 | ||
166 | |||
167 | /* UART3 sub interrupts */ | 164 | /* UART3 sub interrupts */ |
168 | 165 | ||
169 | static void s3c2416_irq_demux_uart3(unsigned int irq, struct irq_desc *desc) | 166 | static void s3c2416_irq_demux_uart3(unsigned int irq, struct irq_desc *desc) |
@@ -174,28 +171,27 @@ static void s3c2416_irq_demux_uart3(unsigned int irq, struct irq_desc *desc) | |||
174 | #define INTMSK_UART3 (1UL << (IRQ_S3C2443_UART3 - IRQ_EINT0)) | 171 | #define INTMSK_UART3 (1UL << (IRQ_S3C2443_UART3 - IRQ_EINT0)) |
175 | #define SUBMSK_UART3 (0x7 << (IRQ_S3C2443_RX3 - S3C2410_IRQSUB(0))) | 172 | #define SUBMSK_UART3 (0x7 << (IRQ_S3C2443_RX3 - S3C2410_IRQSUB(0))) |
176 | 173 | ||
177 | static void s3c2416_irq_uart3_mask(unsigned int irqno) | 174 | static void s3c2416_irq_uart3_mask(struct irq_data *data) |
178 | { | 175 | { |
179 | s3c_irqsub_mask(irqno, INTMSK_UART3, SUBMSK_UART3); | 176 | s3c_irqsub_mask(data->irq, INTMSK_UART3, SUBMSK_UART3); |
180 | } | 177 | } |
181 | 178 | ||
182 | static void s3c2416_irq_uart3_unmask(unsigned int irqno) | 179 | static void s3c2416_irq_uart3_unmask(struct irq_data *data) |
183 | { | 180 | { |
184 | s3c_irqsub_unmask(irqno, INTMSK_UART3); | 181 | s3c_irqsub_unmask(data->irq, INTMSK_UART3); |
185 | } | 182 | } |
186 | 183 | ||
187 | static void s3c2416_irq_uart3_ack(unsigned int irqno) | 184 | static void s3c2416_irq_uart3_ack(struct irq_data *data) |
188 | { | 185 | { |
189 | s3c_irqsub_maskack(irqno, INTMSK_UART3, SUBMSK_UART3); | 186 | s3c_irqsub_maskack(data->irq, INTMSK_UART3, SUBMSK_UART3); |
190 | } | 187 | } |
191 | 188 | ||
192 | static struct irq_chip s3c2416_irq_uart3 = { | 189 | static struct irq_chip s3c2416_irq_uart3 = { |
193 | .mask = s3c2416_irq_uart3_mask, | 190 | .irq_mask = s3c2416_irq_uart3_mask, |
194 | .unmask = s3c2416_irq_uart3_unmask, | 191 | .irq_unmask = s3c2416_irq_uart3_unmask, |
195 | .ack = s3c2416_irq_uart3_ack, | 192 | .irq_ack = s3c2416_irq_uart3_ack, |
196 | }; | 193 | }; |
197 | 194 | ||
198 | |||
199 | /* IRQ initialisation code */ | 195 | /* IRQ initialisation code */ |
200 | 196 | ||
201 | static int __init s3c2416_add_sub(unsigned int base, | 197 | static int __init s3c2416_add_sub(unsigned int base, |
diff --git a/arch/arm/mach-s3c2416/mach-smdk2416.c b/arch/arm/mach-s3c2416/mach-smdk2416.c index 7fc366476d7..3f83177246c 100644 --- a/arch/arm/mach-s3c2416/mach-smdk2416.c +++ b/arch/arm/mach-s3c2416/mach-smdk2416.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <plat/devs.h> | 46 | #include <plat/devs.h> |
47 | #include <plat/cpu.h> | 47 | #include <plat/cpu.h> |
48 | #include <plat/nand.h> | 48 | #include <plat/nand.h> |
49 | #include <plat/sdhci.h> | ||
49 | 50 | ||
50 | #include <plat/regs-fb-v4.h> | 51 | #include <plat/regs-fb-v4.h> |
51 | #include <plat/fb.h> | 52 | #include <plat/fb.h> |
@@ -110,6 +111,13 @@ static struct s3c2410_uartcfg smdk2416_uartcfgs[] __initdata = { | |||
110 | .ucon = UCON, | 111 | .ucon = UCON, |
111 | .ulcon = ULCON | 0x50, | 112 | .ulcon = ULCON | 0x50, |
112 | .ufcon = UFCON, | 113 | .ufcon = UFCON, |
114 | }, | ||
115 | [3] = { | ||
116 | .hwport = 3, | ||
117 | .flags = 0, | ||
118 | .ucon = UCON, | ||
119 | .ulcon = ULCON, | ||
120 | .ufcon = UFCON, | ||
113 | } | 121 | } |
114 | }; | 122 | }; |
115 | 123 | ||
@@ -159,6 +167,18 @@ static struct s3c_fb_platdata smdk2416_fb_platdata = { | |||
159 | .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, | 167 | .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, |
160 | }; | 168 | }; |
161 | 169 | ||
170 | static struct s3c_sdhci_platdata smdk2416_hsmmc0_pdata __initdata = { | ||
171 | .max_width = 4, | ||
172 | .cd_type = S3C_SDHCI_CD_GPIO, | ||
173 | .ext_cd_gpio = S3C2410_GPF(1), | ||
174 | .ext_cd_gpio_invert = 1, | ||
175 | }; | ||
176 | |||
177 | static struct s3c_sdhci_platdata smdk2416_hsmmc1_pdata __initdata = { | ||
178 | .max_width = 4, | ||
179 | .cd_type = S3C_SDHCI_CD_NONE, | ||
180 | }; | ||
181 | |||
162 | static struct platform_device *smdk2416_devices[] __initdata = { | 182 | static struct platform_device *smdk2416_devices[] __initdata = { |
163 | &s3c_device_fb, | 183 | &s3c_device_fb, |
164 | &s3c_device_wdt, | 184 | &s3c_device_wdt, |
@@ -180,6 +200,9 @@ static void __init smdk2416_machine_init(void) | |||
180 | s3c_i2c0_set_platdata(NULL); | 200 | s3c_i2c0_set_platdata(NULL); |
181 | s3c_fb_set_platdata(&smdk2416_fb_platdata); | 201 | s3c_fb_set_platdata(&smdk2416_fb_platdata); |
182 | 202 | ||
203 | s3c_sdhci0_set_platdata(&smdk2416_hsmmc0_pdata); | ||
204 | s3c_sdhci1_set_platdata(&smdk2416_hsmmc1_pdata); | ||
205 | |||
183 | gpio_request(S3C2410_GPB(4), "USBHost Power"); | 206 | gpio_request(S3C2410_GPB(4), "USBHost Power"); |
184 | gpio_direction_output(S3C2410_GPB(4), 1); | 207 | gpio_direction_output(S3C2410_GPB(4), 1); |
185 | 208 | ||
diff --git a/arch/arm/mach-s3c2416/s3c2416.c b/arch/arm/mach-s3c2416/s3c2416.c index 63f39cdc097..ba7fd873743 100644 --- a/arch/arm/mach-s3c2416/s3c2416.c +++ b/arch/arm/mach-s3c2416/s3c2416.c | |||
@@ -53,6 +53,7 @@ | |||
53 | #include <plat/s3c2416.h> | 53 | #include <plat/s3c2416.h> |
54 | #include <plat/devs.h> | 54 | #include <plat/devs.h> |
55 | #include <plat/cpu.h> | 55 | #include <plat/cpu.h> |
56 | #include <plat/sdhci.h> | ||
56 | 57 | ||
57 | #include <plat/iic-core.h> | 58 | #include <plat/iic-core.h> |
58 | #include <plat/fb-core.h> | 59 | #include <plat/fb-core.h> |
@@ -115,6 +116,10 @@ void __init s3c2416_map_io(void) | |||
115 | s3c24xx_gpiocfg_default.set_pull = s3c_gpio_setpull_updown; | 116 | s3c24xx_gpiocfg_default.set_pull = s3c_gpio_setpull_updown; |
116 | s3c24xx_gpiocfg_default.get_pull = s3c_gpio_getpull_updown; | 117 | s3c24xx_gpiocfg_default.get_pull = s3c_gpio_getpull_updown; |
117 | 118 | ||
119 | /* initialize device information early */ | ||
120 | s3c2416_default_sdhci0(); | ||
121 | s3c2416_default_sdhci1(); | ||
122 | |||
118 | iotable_init(s3c2416_iodesc, ARRAY_SIZE(s3c2416_iodesc)); | 123 | iotable_init(s3c2416_iodesc, ARRAY_SIZE(s3c2416_iodesc)); |
119 | } | 124 | } |
120 | 125 | ||
diff --git a/arch/arm/mach-s3c2416/setup-sdhci-gpio.c b/arch/arm/mach-s3c2416/setup-sdhci-gpio.c new file mode 100644 index 00000000000..f65cb3ef16c --- /dev/null +++ b/arch/arm/mach-s3c2416/setup-sdhci-gpio.c | |||
@@ -0,0 +1,34 @@ | |||
1 | /* linux/arch/arm/plat-s3c2416/setup-sdhci-gpio.c | ||
2 | * | ||
3 | * Copyright 2010 Promwad Innovation Company | ||
4 | * Yauhen Kharuzhy <yauhen.kharuzhy@promwad.com> | ||
5 | * | ||
6 | * S3C2416 - Helper functions for setting up SDHCI device(s) GPIO (HSMMC) | ||
7 | * | ||
8 | * Based on mach-s3c64xx/setup-sdhci-gpio.c | ||
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 | #include <linux/kernel.h> | ||
16 | #include <linux/types.h> | ||
17 | #include <linux/interrupt.h> | ||
18 | #include <linux/platform_device.h> | ||
19 | #include <linux/io.h> | ||
20 | #include <linux/gpio.h> | ||
21 | |||
22 | #include <mach/regs-gpio.h> | ||
23 | #include <plat/gpio-cfg.h> | ||
24 | |||
25 | void s3c2416_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width) | ||
26 | { | ||
27 | s3c_gpio_cfgrange_nopull(S3C2410_GPE(5), 2 + width, S3C_GPIO_SFN(2)); | ||
28 | } | ||
29 | |||
30 | void s3c2416_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width) | ||
31 | { | ||
32 | s3c_gpio_cfgrange_nopull(S3C2410_GPL(0), width, S3C_GPIO_SFN(2)); | ||
33 | s3c_gpio_cfgrange_nopull(S3C2410_GPL(8), 2, S3C_GPIO_SFN(2)); | ||
34 | } | ||
diff --git a/arch/arm/mach-s3c2416/setup-sdhci.c b/arch/arm/mach-s3c2416/setup-sdhci.c new file mode 100644 index 00000000000..ed34fad8f2c --- /dev/null +++ b/arch/arm/mach-s3c2416/setup-sdhci.c | |||
@@ -0,0 +1,61 @@ | |||
1 | /* linux/arch/arm/mach-s3c2416/setup-sdhci.c | ||
2 | * | ||
3 | * Copyright 2010 Promwad Innovation Company | ||
4 | * Yauhen Kharuzhy <yauhen.kharuzhy@promwad.com> | ||
5 | * | ||
6 | * S3C2416 - Helper functions for settign up SDHCI device(s) (HSMMC) | ||
7 | * | ||
8 | * Based on mach-s3c64xx/setup-sdhci.c | ||
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 | #include <linux/kernel.h> | ||
16 | #include <linux/types.h> | ||
17 | #include <linux/interrupt.h> | ||
18 | #include <linux/platform_device.h> | ||
19 | #include <linux/io.h> | ||
20 | |||
21 | #include <linux/mmc/card.h> | ||
22 | #include <linux/mmc/host.h> | ||
23 | |||
24 | #include <plat/regs-sdhci.h> | ||
25 | #include <plat/sdhci.h> | ||
26 | |||
27 | /* clock sources for the mmc bus clock, order as for the ctrl2[5..4] */ | ||
28 | |||
29 | char *s3c2416_hsmmc_clksrcs[4] = { | ||
30 | [0] = "hsmmc", | ||
31 | [1] = "hsmmc", | ||
32 | [2] = "hsmmc-if", | ||
33 | /* [3] = "48m", - note not successfully used yet */ | ||
34 | }; | ||
35 | |||
36 | void s3c2416_setup_sdhci_cfg_card(struct platform_device *dev, | ||
37 | void __iomem *r, | ||
38 | struct mmc_ios *ios, | ||
39 | struct mmc_card *card) | ||
40 | { | ||
41 | u32 ctrl2, ctrl3; | ||
42 | |||
43 | ctrl2 = __raw_readl(r + S3C_SDHCI_CONTROL2); | ||
44 | ctrl2 &= S3C_SDHCI_CTRL2_SELBASECLK_MASK; | ||
45 | ctrl2 |= (S3C64XX_SDHCI_CTRL2_ENSTAASYNCCLR | | ||
46 | S3C64XX_SDHCI_CTRL2_ENCMDCNFMSK | | ||
47 | S3C_SDHCI_CTRL2_ENFBCLKRX | | ||
48 | S3C_SDHCI_CTRL2_DFCNT_NONE | | ||
49 | S3C_SDHCI_CTRL2_ENCLKOUTHOLD); | ||
50 | |||
51 | if (ios->clock < 25 * 1000000) | ||
52 | ctrl3 = (S3C_SDHCI_CTRL3_FCSEL3 | | ||
53 | S3C_SDHCI_CTRL3_FCSEL2 | | ||
54 | S3C_SDHCI_CTRL3_FCSEL1 | | ||
55 | S3C_SDHCI_CTRL3_FCSEL0); | ||
56 | else | ||
57 | ctrl3 = (S3C_SDHCI_CTRL3_FCSEL1 | S3C_SDHCI_CTRL3_FCSEL0); | ||
58 | |||
59 | __raw_writel(ctrl2, r + S3C_SDHCI_CONTROL2); | ||
60 | __raw_writel(ctrl3, r + S3C_SDHCI_CONTROL3); | ||
61 | } | ||
diff --git a/arch/arm/mach-s3c2440/irq.c b/arch/arm/mach-s3c2440/irq.c index 0c049b95c37..acad4428bef 100644 --- a/arch/arm/mach-s3c2440/irq.c +++ b/arch/arm/mach-s3c2440/irq.c | |||
@@ -69,27 +69,27 @@ static void s3c_irq_demux_wdtac97(unsigned int irq, | |||
69 | #define INTMSK_WDT (1UL << (IRQ_WDT - IRQ_EINT0)) | 69 | #define INTMSK_WDT (1UL << (IRQ_WDT - IRQ_EINT0)) |
70 | 70 | ||
71 | static void | 71 | static void |
72 | s3c_irq_wdtac97_mask(unsigned int irqno) | 72 | s3c_irq_wdtac97_mask(struct irq_data *data) |
73 | { | 73 | { |
74 | s3c_irqsub_mask(irqno, INTMSK_WDT, 3<<13); | 74 | s3c_irqsub_mask(data->irq, INTMSK_WDT, 3 << 13); |
75 | } | 75 | } |
76 | 76 | ||
77 | static void | 77 | static void |
78 | s3c_irq_wdtac97_unmask(unsigned int irqno) | 78 | s3c_irq_wdtac97_unmask(struct irq_data *data) |
79 | { | 79 | { |
80 | s3c_irqsub_unmask(irqno, INTMSK_WDT); | 80 | s3c_irqsub_unmask(data->irq, INTMSK_WDT); |
81 | } | 81 | } |
82 | 82 | ||
83 | static void | 83 | static void |
84 | s3c_irq_wdtac97_ack(unsigned int irqno) | 84 | s3c_irq_wdtac97_ack(struct irq_data *data) |
85 | { | 85 | { |
86 | s3c_irqsub_maskack(irqno, INTMSK_WDT, 3<<13); | 86 | s3c_irqsub_maskack(data->irq, INTMSK_WDT, 3 << 13); |
87 | } | 87 | } |
88 | 88 | ||
89 | static struct irq_chip s3c_irq_wdtac97 = { | 89 | static struct irq_chip s3c_irq_wdtac97 = { |
90 | .mask = s3c_irq_wdtac97_mask, | 90 | .irq_mask = s3c_irq_wdtac97_mask, |
91 | .unmask = s3c_irq_wdtac97_unmask, | 91 | .irq_unmask = s3c_irq_wdtac97_unmask, |
92 | .ack = s3c_irq_wdtac97_ack, | 92 | .irq_ack = s3c_irq_wdtac97_ack, |
93 | }; | 93 | }; |
94 | 94 | ||
95 | static int s3c2440_irq_add(struct sys_device *sysdev) | 95 | static int s3c2440_irq_add(struct sys_device *sysdev) |
diff --git a/arch/arm/mach-s3c2440/s3c244x-irq.c b/arch/arm/mach-s3c2440/s3c244x-irq.c index a75c0c2431e..83daf4ece76 100644 --- a/arch/arm/mach-s3c2440/s3c244x-irq.c +++ b/arch/arm/mach-s3c2440/s3c244x-irq.c | |||
@@ -68,27 +68,27 @@ static void s3c_irq_demux_cam(unsigned int irq, | |||
68 | #define INTMSK_CAM (1UL << (IRQ_CAM - IRQ_EINT0)) | 68 | #define INTMSK_CAM (1UL << (IRQ_CAM - IRQ_EINT0)) |
69 | 69 | ||
70 | static void | 70 | static void |
71 | s3c_irq_cam_mask(unsigned int irqno) | 71 | s3c_irq_cam_mask(struct irq_data *data) |
72 | { | 72 | { |
73 | s3c_irqsub_mask(irqno, INTMSK_CAM, 3<<11); | 73 | s3c_irqsub_mask(data->irq, INTMSK_CAM, 3 << 11); |
74 | } | 74 | } |
75 | 75 | ||
76 | static void | 76 | static void |
77 | s3c_irq_cam_unmask(unsigned int irqno) | 77 | s3c_irq_cam_unmask(struct irq_data *data) |
78 | { | 78 | { |
79 | s3c_irqsub_unmask(irqno, INTMSK_CAM); | 79 | s3c_irqsub_unmask(data->irq, INTMSK_CAM); |
80 | } | 80 | } |
81 | 81 | ||
82 | static void | 82 | static void |
83 | s3c_irq_cam_ack(unsigned int irqno) | 83 | s3c_irq_cam_ack(struct irq_data *data) |
84 | { | 84 | { |
85 | s3c_irqsub_maskack(irqno, INTMSK_CAM, 3<<11); | 85 | s3c_irqsub_maskack(data->irq, INTMSK_CAM, 3 << 11); |
86 | } | 86 | } |
87 | 87 | ||
88 | static struct irq_chip s3c_irq_cam = { | 88 | static struct irq_chip s3c_irq_cam = { |
89 | .mask = s3c_irq_cam_mask, | 89 | .irq_mask = s3c_irq_cam_mask, |
90 | .unmask = s3c_irq_cam_unmask, | 90 | .irq_unmask = s3c_irq_cam_unmask, |
91 | .ack = s3c_irq_cam_ack, | 91 | .irq_ack = s3c_irq_cam_ack, |
92 | }; | 92 | }; |
93 | 93 | ||
94 | static int s3c244x_irq_add(struct sys_device *sysdev) | 94 | static int s3c244x_irq_add(struct sys_device *sysdev) |
diff --git a/arch/arm/mach-s3c2443/Kconfig b/arch/arm/mach-s3c2443/Kconfig index 31babec90ce..d8eb86823df 100644 --- a/arch/arm/mach-s3c2443/Kconfig +++ b/arch/arm/mach-s3c2443/Kconfig | |||
@@ -10,6 +10,7 @@ config CPU_S3C2443 | |||
10 | select CPU_LLSERIAL_S3C2440 | 10 | select CPU_LLSERIAL_S3C2440 |
11 | select SAMSUNG_CLKSRC | 11 | select SAMSUNG_CLKSRC |
12 | select S3C2443_CLOCK | 12 | select S3C2443_CLOCK |
13 | select S3C_GPIO_PULL_S3C2443 | ||
13 | help | 14 | help |
14 | Support for the S3C2443 SoC from the S3C24XX line | 15 | Support for the S3C2443 SoC from the S3C24XX line |
15 | 16 | ||
@@ -25,7 +26,7 @@ config MACH_SMDK2443 | |||
25 | bool "SMDK2443" | 26 | bool "SMDK2443" |
26 | select CPU_S3C2443 | 27 | select CPU_S3C2443 |
27 | select MACH_SMDK | 28 | select MACH_SMDK |
28 | select S3C_DEV_HSMMC | 29 | select S3C_DEV_HSMMC1 |
29 | help | 30 | help |
30 | Say Y here if you are using an SMDK2443 | 31 | Say Y here if you are using an SMDK2443 |
31 | 32 | ||
diff --git a/arch/arm/mach-s3c2443/clock.c b/arch/arm/mach-s3c2443/clock.c index 0c3c0c884cd..f4ec6d5715c 100644 --- a/arch/arm/mach-s3c2443/clock.c +++ b/arch/arm/mach-s3c2443/clock.c | |||
@@ -196,7 +196,7 @@ static struct clksrc_clk clk_hsspi = { | |||
196 | static struct clksrc_clk clk_hsmmc_div = { | 196 | static struct clksrc_clk clk_hsmmc_div = { |
197 | .clk = { | 197 | .clk = { |
198 | .name = "hsmmc-div", | 198 | .name = "hsmmc-div", |
199 | .id = -1, | 199 | .id = 1, |
200 | .parent = &clk_esysclk.clk, | 200 | .parent = &clk_esysclk.clk, |
201 | }, | 201 | }, |
202 | .reg_div = { .reg = S3C2443_CLKDIV1, .size = 2, .shift = 6 }, | 202 | .reg_div = { .reg = S3C2443_CLKDIV1, .size = 2, .shift = 6 }, |
@@ -231,7 +231,7 @@ static int s3c2443_enable_hsmmc(struct clk *clk, int enable) | |||
231 | 231 | ||
232 | static struct clk clk_hsmmc = { | 232 | static struct clk clk_hsmmc = { |
233 | .name = "hsmmc-if", | 233 | .name = "hsmmc-if", |
234 | .id = -1, | 234 | .id = 1, |
235 | .parent = &clk_hsmmc_div.clk, | 235 | .parent = &clk_hsmmc_div.clk, |
236 | .enable = s3c2443_enable_hsmmc, | 236 | .enable = s3c2443_enable_hsmmc, |
237 | .ops = &(struct clk_ops) { | 237 | .ops = &(struct clk_ops) { |
diff --git a/arch/arm/mach-s3c2443/irq.c b/arch/arm/mach-s3c2443/irq.c index 893424767ce..c7820f9c135 100644 --- a/arch/arm/mach-s3c2443/irq.c +++ b/arch/arm/mach-s3c2443/irq.c | |||
@@ -75,28 +75,27 @@ static void s3c2443_irq_demux_wdtac97(unsigned int irq, struct irq_desc *desc) | |||
75 | #define INTMSK_WDTAC97 (1UL << (IRQ_WDT - IRQ_EINT0)) | 75 | #define INTMSK_WDTAC97 (1UL << (IRQ_WDT - IRQ_EINT0)) |
76 | #define SUBMSK_WDTAC97 INTMSK(IRQ_S3C2443_WDT, IRQ_S3C2443_AC97) | 76 | #define SUBMSK_WDTAC97 INTMSK(IRQ_S3C2443_WDT, IRQ_S3C2443_AC97) |
77 | 77 | ||
78 | static void s3c2443_irq_wdtac97_mask(unsigned int irqno) | 78 | static void s3c2443_irq_wdtac97_mask(struct irq_data *data) |
79 | { | 79 | { |
80 | s3c_irqsub_mask(irqno, INTMSK_WDTAC97, SUBMSK_WDTAC97); | 80 | s3c_irqsub_mask(data->irq, INTMSK_WDTAC97, SUBMSK_WDTAC97); |
81 | } | 81 | } |
82 | 82 | ||
83 | static void s3c2443_irq_wdtac97_unmask(unsigned int irqno) | 83 | static void s3c2443_irq_wdtac97_unmask(struct irq_data *data) |
84 | { | 84 | { |
85 | s3c_irqsub_unmask(irqno, INTMSK_WDTAC97); | 85 | s3c_irqsub_unmask(data->irq, INTMSK_WDTAC97); |
86 | } | 86 | } |
87 | 87 | ||
88 | static void s3c2443_irq_wdtac97_ack(unsigned int irqno) | 88 | static void s3c2443_irq_wdtac97_ack(struct irq_data *data) |
89 | { | 89 | { |
90 | s3c_irqsub_maskack(irqno, INTMSK_WDTAC97, SUBMSK_WDTAC97); | 90 | s3c_irqsub_maskack(data->irq, INTMSK_WDTAC97, SUBMSK_WDTAC97); |
91 | } | 91 | } |
92 | 92 | ||
93 | static struct irq_chip s3c2443_irq_wdtac97 = { | 93 | static struct irq_chip s3c2443_irq_wdtac97 = { |
94 | .mask = s3c2443_irq_wdtac97_mask, | 94 | .irq_mask = s3c2443_irq_wdtac97_mask, |
95 | .unmask = s3c2443_irq_wdtac97_unmask, | 95 | .irq_unmask = s3c2443_irq_wdtac97_unmask, |
96 | .ack = s3c2443_irq_wdtac97_ack, | 96 | .irq_ack = s3c2443_irq_wdtac97_ack, |
97 | }; | 97 | }; |
98 | 98 | ||
99 | |||
100 | /* LCD sub interrupts */ | 99 | /* LCD sub interrupts */ |
101 | 100 | ||
102 | static void s3c2443_irq_demux_lcd(unsigned int irq, struct irq_desc *desc) | 101 | static void s3c2443_irq_demux_lcd(unsigned int irq, struct irq_desc *desc) |
@@ -107,28 +106,27 @@ static void s3c2443_irq_demux_lcd(unsigned int irq, struct irq_desc *desc) | |||
107 | #define INTMSK_LCD (1UL << (IRQ_LCD - IRQ_EINT0)) | 106 | #define INTMSK_LCD (1UL << (IRQ_LCD - IRQ_EINT0)) |
108 | #define SUBMSK_LCD INTMSK(IRQ_S3C2443_LCD1, IRQ_S3C2443_LCD4) | 107 | #define SUBMSK_LCD INTMSK(IRQ_S3C2443_LCD1, IRQ_S3C2443_LCD4) |
109 | 108 | ||
110 | static void s3c2443_irq_lcd_mask(unsigned int irqno) | 109 | static void s3c2443_irq_lcd_mask(struct irq_data *data) |
111 | { | 110 | { |
112 | s3c_irqsub_mask(irqno, INTMSK_LCD, SUBMSK_LCD); | 111 | s3c_irqsub_mask(data->irq, INTMSK_LCD, SUBMSK_LCD); |
113 | } | 112 | } |
114 | 113 | ||
115 | static void s3c2443_irq_lcd_unmask(unsigned int irqno) | 114 | static void s3c2443_irq_lcd_unmask(struct irq_data *data) |
116 | { | 115 | { |
117 | s3c_irqsub_unmask(irqno, INTMSK_LCD); | 116 | s3c_irqsub_unmask(data->irq, INTMSK_LCD); |
118 | } | 117 | } |
119 | 118 | ||
120 | static void s3c2443_irq_lcd_ack(unsigned int irqno) | 119 | static void s3c2443_irq_lcd_ack(struct irq_data *data) |
121 | { | 120 | { |
122 | s3c_irqsub_maskack(irqno, INTMSK_LCD, SUBMSK_LCD); | 121 | s3c_irqsub_maskack(data->irq, INTMSK_LCD, SUBMSK_LCD); |
123 | } | 122 | } |
124 | 123 | ||
125 | static struct irq_chip s3c2443_irq_lcd = { | 124 | static struct irq_chip s3c2443_irq_lcd = { |
126 | .mask = s3c2443_irq_lcd_mask, | 125 | .irq_mask = s3c2443_irq_lcd_mask, |
127 | .unmask = s3c2443_irq_lcd_unmask, | 126 | .irq_unmask = s3c2443_irq_lcd_unmask, |
128 | .ack = s3c2443_irq_lcd_ack, | 127 | .irq_ack = s3c2443_irq_lcd_ack, |
129 | }; | 128 | }; |
130 | 129 | ||
131 | |||
132 | /* DMA sub interrupts */ | 130 | /* DMA sub interrupts */ |
133 | 131 | ||
134 | static void s3c2443_irq_demux_dma(unsigned int irq, struct irq_desc *desc) | 132 | static void s3c2443_irq_demux_dma(unsigned int irq, struct irq_desc *desc) |
@@ -139,29 +137,27 @@ static void s3c2443_irq_demux_dma(unsigned int irq, struct irq_desc *desc) | |||
139 | #define INTMSK_DMA (1UL << (IRQ_S3C2443_DMA - IRQ_EINT0)) | 137 | #define INTMSK_DMA (1UL << (IRQ_S3C2443_DMA - IRQ_EINT0)) |
140 | #define SUBMSK_DMA INTMSK(IRQ_S3C2443_DMA0, IRQ_S3C2443_DMA5) | 138 | #define SUBMSK_DMA INTMSK(IRQ_S3C2443_DMA0, IRQ_S3C2443_DMA5) |
141 | 139 | ||
142 | 140 | static void s3c2443_irq_dma_mask(struct irq_data *data) | |
143 | static void s3c2443_irq_dma_mask(unsigned int irqno) | ||
144 | { | 141 | { |
145 | s3c_irqsub_mask(irqno, INTMSK_DMA, SUBMSK_DMA); | 142 | s3c_irqsub_mask(data->irq, INTMSK_DMA, SUBMSK_DMA); |
146 | } | 143 | } |
147 | 144 | ||
148 | static void s3c2443_irq_dma_unmask(unsigned int irqno) | 145 | static void s3c2443_irq_dma_unmask(struct irq_data *data) |
149 | { | 146 | { |
150 | s3c_irqsub_unmask(irqno, INTMSK_DMA); | 147 | s3c_irqsub_unmask(data->irq, INTMSK_DMA); |
151 | } | 148 | } |
152 | 149 | ||
153 | static void s3c2443_irq_dma_ack(unsigned int irqno) | 150 | static void s3c2443_irq_dma_ack(struct irq_data *data) |
154 | { | 151 | { |
155 | s3c_irqsub_maskack(irqno, INTMSK_DMA, SUBMSK_DMA); | 152 | s3c_irqsub_maskack(data->irq, INTMSK_DMA, SUBMSK_DMA); |
156 | } | 153 | } |
157 | 154 | ||
158 | static struct irq_chip s3c2443_irq_dma = { | 155 | static struct irq_chip s3c2443_irq_dma = { |
159 | .mask = s3c2443_irq_dma_mask, | 156 | .irq_mask = s3c2443_irq_dma_mask, |
160 | .unmask = s3c2443_irq_dma_unmask, | 157 | .irq_unmask = s3c2443_irq_dma_unmask, |
161 | .ack = s3c2443_irq_dma_ack, | 158 | .irq_ack = s3c2443_irq_dma_ack, |
162 | }; | 159 | }; |
163 | 160 | ||
164 | |||
165 | /* UART3 sub interrupts */ | 161 | /* UART3 sub interrupts */ |
166 | 162 | ||
167 | static void s3c2443_irq_demux_uart3(unsigned int irq, struct irq_desc *desc) | 163 | static void s3c2443_irq_demux_uart3(unsigned int irq, struct irq_desc *desc) |
@@ -172,28 +168,27 @@ static void s3c2443_irq_demux_uart3(unsigned int irq, struct irq_desc *desc) | |||
172 | #define INTMSK_UART3 (1UL << (IRQ_S3C2443_UART3 - IRQ_EINT0)) | 168 | #define INTMSK_UART3 (1UL << (IRQ_S3C2443_UART3 - IRQ_EINT0)) |
173 | #define SUBMSK_UART3 (0x7 << (IRQ_S3C2443_RX3 - S3C2410_IRQSUB(0))) | 169 | #define SUBMSK_UART3 (0x7 << (IRQ_S3C2443_RX3 - S3C2410_IRQSUB(0))) |
174 | 170 | ||
175 | static void s3c2443_irq_uart3_mask(unsigned int irqno) | 171 | static void s3c2443_irq_uart3_mask(struct irq_data *data) |
176 | { | 172 | { |
177 | s3c_irqsub_mask(irqno, INTMSK_UART3, SUBMSK_UART3); | 173 | s3c_irqsub_mask(data->irq, INTMSK_UART3, SUBMSK_UART3); |
178 | } | 174 | } |
179 | 175 | ||
180 | static void s3c2443_irq_uart3_unmask(unsigned int irqno) | 176 | static void s3c2443_irq_uart3_unmask(struct irq_data *data) |
181 | { | 177 | { |
182 | s3c_irqsub_unmask(irqno, INTMSK_UART3); | 178 | s3c_irqsub_unmask(data->irq, INTMSK_UART3); |
183 | } | 179 | } |
184 | 180 | ||
185 | static void s3c2443_irq_uart3_ack(unsigned int irqno) | 181 | static void s3c2443_irq_uart3_ack(struct irq_data *data) |
186 | { | 182 | { |
187 | s3c_irqsub_maskack(irqno, INTMSK_UART3, SUBMSK_UART3); | 183 | s3c_irqsub_maskack(data->irq, INTMSK_UART3, SUBMSK_UART3); |
188 | } | 184 | } |
189 | 185 | ||
190 | static struct irq_chip s3c2443_irq_uart3 = { | 186 | static struct irq_chip s3c2443_irq_uart3 = { |
191 | .mask = s3c2443_irq_uart3_mask, | 187 | .irq_mask = s3c2443_irq_uart3_mask, |
192 | .unmask = s3c2443_irq_uart3_unmask, | 188 | .irq_unmask = s3c2443_irq_uart3_unmask, |
193 | .ack = s3c2443_irq_uart3_ack, | 189 | .irq_ack = s3c2443_irq_uart3_ack, |
194 | }; | 190 | }; |
195 | 191 | ||
196 | |||
197 | /* CAM sub interrupts */ | 192 | /* CAM sub interrupts */ |
198 | 193 | ||
199 | static void s3c2443_irq_demux_cam(unsigned int irq, struct irq_desc *desc) | 194 | static void s3c2443_irq_demux_cam(unsigned int irq, struct irq_desc *desc) |
@@ -204,25 +199,25 @@ static void s3c2443_irq_demux_cam(unsigned int irq, struct irq_desc *desc) | |||
204 | #define INTMSK_CAM (1UL << (IRQ_CAM - IRQ_EINT0)) | 199 | #define INTMSK_CAM (1UL << (IRQ_CAM - IRQ_EINT0)) |
205 | #define SUBMSK_CAM INTMSK(IRQ_S3C2440_CAM_C, IRQ_S3C2440_CAM_P) | 200 | #define SUBMSK_CAM INTMSK(IRQ_S3C2440_CAM_C, IRQ_S3C2440_CAM_P) |
206 | 201 | ||
207 | static void s3c2443_irq_cam_mask(unsigned int irqno) | 202 | static void s3c2443_irq_cam_mask(struct irq_data *data) |
208 | { | 203 | { |
209 | s3c_irqsub_mask(irqno, INTMSK_CAM, SUBMSK_CAM); | 204 | s3c_irqsub_mask(data->irq, INTMSK_CAM, SUBMSK_CAM); |
210 | } | 205 | } |
211 | 206 | ||
212 | static void s3c2443_irq_cam_unmask(unsigned int irqno) | 207 | static void s3c2443_irq_cam_unmask(struct irq_data *data) |
213 | { | 208 | { |
214 | s3c_irqsub_unmask(irqno, INTMSK_CAM); | 209 | s3c_irqsub_unmask(data->irq, INTMSK_CAM); |
215 | } | 210 | } |
216 | 211 | ||
217 | static void s3c2443_irq_cam_ack(unsigned int irqno) | 212 | static void s3c2443_irq_cam_ack(struct irq_data *data) |
218 | { | 213 | { |
219 | s3c_irqsub_maskack(irqno, INTMSK_CAM, SUBMSK_CAM); | 214 | s3c_irqsub_maskack(data->irq, INTMSK_CAM, SUBMSK_CAM); |
220 | } | 215 | } |
221 | 216 | ||
222 | static struct irq_chip s3c2443_irq_cam = { | 217 | static struct irq_chip s3c2443_irq_cam = { |
223 | .mask = s3c2443_irq_cam_mask, | 218 | .irq_mask = s3c2443_irq_cam_mask, |
224 | .unmask = s3c2443_irq_cam_unmask, | 219 | .irq_unmask = s3c2443_irq_cam_unmask, |
225 | .ack = s3c2443_irq_cam_ack, | 220 | .irq_ack = s3c2443_irq_cam_ack, |
226 | }; | 221 | }; |
227 | 222 | ||
228 | /* IRQ initialisation code */ | 223 | /* IRQ initialisation code */ |
diff --git a/arch/arm/mach-s3c2443/mach-smdk2443.c b/arch/arm/mach-s3c2443/mach-smdk2443.c index 4337f0a9960..514275e43ca 100644 --- a/arch/arm/mach-s3c2443/mach-smdk2443.c +++ b/arch/arm/mach-s3c2443/mach-smdk2443.c | |||
@@ -99,13 +99,20 @@ static struct s3c2410_uartcfg smdk2443_uartcfgs[] __initdata = { | |||
99 | .ucon = 0x3c5, | 99 | .ucon = 0x3c5, |
100 | .ulcon = 0x43, | 100 | .ulcon = 0x43, |
101 | .ufcon = 0x51, | 101 | .ufcon = 0x51, |
102 | }, | ||
103 | [3] = { | ||
104 | .hwport = 3, | ||
105 | .flags = 0, | ||
106 | .ucon = 0x3c5, | ||
107 | .ulcon = 0x03, | ||
108 | .ufcon = 0x51, | ||
102 | } | 109 | } |
103 | }; | 110 | }; |
104 | 111 | ||
105 | static struct platform_device *smdk2443_devices[] __initdata = { | 112 | static struct platform_device *smdk2443_devices[] __initdata = { |
106 | &s3c_device_wdt, | 113 | &s3c_device_wdt, |
107 | &s3c_device_i2c0, | 114 | &s3c_device_i2c0, |
108 | &s3c_device_hsmmc0, | 115 | &s3c_device_hsmmc1, |
109 | #ifdef CONFIG_SND_SOC_SMDK2443_WM9710 | 116 | #ifdef CONFIG_SND_SOC_SMDK2443_WM9710 |
110 | &s3c_device_ac97, | 117 | &s3c_device_ac97, |
111 | #endif | 118 | #endif |
diff --git a/arch/arm/mach-s3c2443/s3c2443.c b/arch/arm/mach-s3c2443/s3c2443.c index 33d18dd1ebd..e6a28ba52c7 100644 --- a/arch/arm/mach-s3c2443/s3c2443.c +++ b/arch/arm/mach-s3c2443/s3c2443.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/list.h> | 16 | #include <linux/list.h> |
17 | #include <linux/timer.h> | 17 | #include <linux/timer.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/gpio.h> | ||
19 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
20 | #include <linux/serial_core.h> | 21 | #include <linux/serial_core.h> |
21 | #include <linux/sysdev.h> | 22 | #include <linux/sysdev.h> |
@@ -32,6 +33,9 @@ | |||
32 | #include <mach/regs-s3c2443-clock.h> | 33 | #include <mach/regs-s3c2443-clock.h> |
33 | #include <mach/reset.h> | 34 | #include <mach/reset.h> |
34 | 35 | ||
36 | #include <plat/gpio-core.h> | ||
37 | #include <plat/gpio-cfg.h> | ||
38 | #include <plat/gpio-cfg-helpers.h> | ||
35 | #include <plat/s3c2443.h> | 39 | #include <plat/s3c2443.h> |
36 | #include <plat/devs.h> | 40 | #include <plat/devs.h> |
37 | #include <plat/cpu.h> | 41 | #include <plat/cpu.h> |
@@ -86,6 +90,9 @@ void __init s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no) | |||
86 | 90 | ||
87 | void __init s3c2443_map_io(void) | 91 | void __init s3c2443_map_io(void) |
88 | { | 92 | { |
93 | s3c24xx_gpiocfg_default.set_pull = s3c_gpio_setpull_s3c2443; | ||
94 | s3c24xx_gpiocfg_default.get_pull = s3c_gpio_getpull_s3c2443; | ||
95 | |||
89 | iotable_init(s3c2443_iodesc, ARRAY_SIZE(s3c2443_iodesc)); | 96 | iotable_init(s3c2443_iodesc, ARRAY_SIZE(s3c2443_iodesc)); |
90 | } | 97 | } |
91 | 98 | ||
diff --git a/arch/arm/mach-s3c64xx/clock.c b/arch/arm/mach-s3c64xx/clock.c index 1c98d2ff2ed..dd378206450 100644 --- a/arch/arm/mach-s3c64xx/clock.c +++ b/arch/arm/mach-s3c64xx/clock.c | |||
@@ -127,7 +127,7 @@ int s3c64xx_sclk_ctrl(struct clk *clk, int enable) | |||
127 | return s3c64xx_gate(S3C_SCLK_GATE, clk, enable); | 127 | return s3c64xx_gate(S3C_SCLK_GATE, clk, enable); |
128 | } | 128 | } |
129 | 129 | ||
130 | static struct clk init_clocks_disable[] = { | 130 | static struct clk init_clocks_off[] = { |
131 | { | 131 | { |
132 | .name = "nand", | 132 | .name = "nand", |
133 | .id = -1, | 133 | .id = -1, |
@@ -834,10 +834,6 @@ static struct clk *clks[] __initdata = { | |||
834 | void __init s3c64xx_register_clocks(unsigned long xtal, | 834 | void __init s3c64xx_register_clocks(unsigned long xtal, |
835 | unsigned armclk_divlimit) | 835 | unsigned armclk_divlimit) |
836 | { | 836 | { |
837 | struct clk *clkp; | ||
838 | int ret; | ||
839 | int ptr; | ||
840 | |||
841 | armclk_mask = armclk_divlimit; | 837 | armclk_mask = armclk_divlimit; |
842 | 838 | ||
843 | s3c24xx_register_baseclocks(xtal); | 839 | s3c24xx_register_baseclocks(xtal); |
@@ -845,17 +841,8 @@ void __init s3c64xx_register_clocks(unsigned long xtal, | |||
845 | 841 | ||
846 | s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); | 842 | s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); |
847 | 843 | ||
848 | clkp = init_clocks_disable; | 844 | s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); |
849 | for (ptr = 0; ptr < ARRAY_SIZE(init_clocks_disable); ptr++, clkp++) { | 845 | s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); |
850 | |||
851 | ret = s3c24xx_register_clock(clkp); | ||
852 | if (ret < 0) { | ||
853 | printk(KERN_ERR "Failed to register clock %s (%d)\n", | ||
854 | clkp->name, ret); | ||
855 | } | ||
856 | |||
857 | (clkp->enable)(clkp, 0); | ||
858 | } | ||
859 | 846 | ||
860 | s3c24xx_register_clocks(clks1, ARRAY_SIZE(clks1)); | 847 | s3c24xx_register_clocks(clks1, ARRAY_SIZE(clks1)); |
861 | s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); | 848 | s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); |
diff --git a/arch/arm/mach-s3c64xx/dma.c b/arch/arm/mach-s3c64xx/dma.c index 372ea685545..135db1b4125 100644 --- a/arch/arm/mach-s3c64xx/dma.c +++ b/arch/arm/mach-s3c64xx/dma.c | |||
@@ -212,6 +212,7 @@ static int s3c64xx_dma_start(struct s3c2410_dma_chan *chan) | |||
212 | 212 | ||
213 | config = readl(chan->regs + PL080S_CH_CONFIG); | 213 | config = readl(chan->regs + PL080S_CH_CONFIG); |
214 | config |= PL080_CONFIG_ENABLE; | 214 | config |= PL080_CONFIG_ENABLE; |
215 | config &= ~PL080_CONFIG_HALT; | ||
215 | 216 | ||
216 | pr_debug("%s: writing config %08x\n", __func__, config); | 217 | pr_debug("%s: writing config %08x\n", __func__, config); |
217 | writel(config, chan->regs + PL080S_CH_CONFIG); | 218 | writel(config, chan->regs + PL080S_CH_CONFIG); |
diff --git a/arch/arm/mach-s3c64xx/irq-eint.c b/arch/arm/mach-s3c64xx/irq-eint.c index 5682d6a7f4a..2ead8189da7 100644 --- a/arch/arm/mach-s3c64xx/irq-eint.c +++ b/arch/arm/mach-s3c64xx/irq-eint.c | |||
@@ -30,41 +30,41 @@ | |||
30 | #include <plat/pm.h> | 30 | #include <plat/pm.h> |
31 | 31 | ||
32 | #define eint_offset(irq) ((irq) - IRQ_EINT(0)) | 32 | #define eint_offset(irq) ((irq) - IRQ_EINT(0)) |
33 | #define eint_irq_to_bit(irq) (1 << eint_offset(irq)) | 33 | #define eint_irq_to_bit(irq) ((u32)(1 << eint_offset(irq))) |
34 | 34 | ||
35 | static inline void s3c_irq_eint_mask(unsigned int irq) | 35 | static inline void s3c_irq_eint_mask(struct irq_data *data) |
36 | { | 36 | { |
37 | u32 mask; | 37 | u32 mask; |
38 | 38 | ||
39 | mask = __raw_readl(S3C64XX_EINT0MASK); | 39 | mask = __raw_readl(S3C64XX_EINT0MASK); |
40 | mask |= eint_irq_to_bit(irq); | 40 | mask |= (u32)data->chip_data; |
41 | __raw_writel(mask, S3C64XX_EINT0MASK); | 41 | __raw_writel(mask, S3C64XX_EINT0MASK); |
42 | } | 42 | } |
43 | 43 | ||
44 | static void s3c_irq_eint_unmask(unsigned int irq) | 44 | static void s3c_irq_eint_unmask(struct irq_data *data) |
45 | { | 45 | { |
46 | u32 mask; | 46 | u32 mask; |
47 | 47 | ||
48 | mask = __raw_readl(S3C64XX_EINT0MASK); | 48 | mask = __raw_readl(S3C64XX_EINT0MASK); |
49 | mask &= ~eint_irq_to_bit(irq); | 49 | mask &= ~((u32)data->chip_data); |
50 | __raw_writel(mask, S3C64XX_EINT0MASK); | 50 | __raw_writel(mask, S3C64XX_EINT0MASK); |
51 | } | 51 | } |
52 | 52 | ||
53 | static inline void s3c_irq_eint_ack(unsigned int irq) | 53 | static inline void s3c_irq_eint_ack(struct irq_data *data) |
54 | { | 54 | { |
55 | __raw_writel(eint_irq_to_bit(irq), S3C64XX_EINT0PEND); | 55 | __raw_writel((u32)data->chip_data, S3C64XX_EINT0PEND); |
56 | } | 56 | } |
57 | 57 | ||
58 | static void s3c_irq_eint_maskack(unsigned int irq) | 58 | static void s3c_irq_eint_maskack(struct irq_data *data) |
59 | { | 59 | { |
60 | /* compiler should in-line these */ | 60 | /* compiler should in-line these */ |
61 | s3c_irq_eint_mask(irq); | 61 | s3c_irq_eint_mask(data); |
62 | s3c_irq_eint_ack(irq); | 62 | s3c_irq_eint_ack(data); |
63 | } | 63 | } |
64 | 64 | ||
65 | static int s3c_irq_eint_set_type(unsigned int irq, unsigned int type) | 65 | static int s3c_irq_eint_set_type(struct irq_data *data, unsigned int type) |
66 | { | 66 | { |
67 | int offs = eint_offset(irq); | 67 | int offs = eint_offset(data->irq); |
68 | int pin, pin_val; | 68 | int pin, pin_val; |
69 | int shift; | 69 | int shift; |
70 | u32 ctrl, mask; | 70 | u32 ctrl, mask; |
@@ -140,12 +140,12 @@ static int s3c_irq_eint_set_type(unsigned int irq, unsigned int type) | |||
140 | 140 | ||
141 | static struct irq_chip s3c_irq_eint = { | 141 | static struct irq_chip s3c_irq_eint = { |
142 | .name = "s3c-eint", | 142 | .name = "s3c-eint", |
143 | .mask = s3c_irq_eint_mask, | 143 | .irq_mask = s3c_irq_eint_mask, |
144 | .unmask = s3c_irq_eint_unmask, | 144 | .irq_unmask = s3c_irq_eint_unmask, |
145 | .mask_ack = s3c_irq_eint_maskack, | 145 | .irq_mask_ack = s3c_irq_eint_maskack, |
146 | .ack = s3c_irq_eint_ack, | 146 | .irq_ack = s3c_irq_eint_ack, |
147 | .set_type = s3c_irq_eint_set_type, | 147 | .irq_set_type = s3c_irq_eint_set_type, |
148 | .set_wake = s3c_irqext_wake, | 148 | .irq_set_wake = s3c_irqext_wake, |
149 | }; | 149 | }; |
150 | 150 | ||
151 | /* s3c_irq_demux_eint | 151 | /* s3c_irq_demux_eint |
@@ -198,6 +198,7 @@ static int __init s3c64xx_init_irq_eint(void) | |||
198 | 198 | ||
199 | for (irq = IRQ_EINT(0); irq <= IRQ_EINT(27); irq++) { | 199 | for (irq = IRQ_EINT(0); irq <= IRQ_EINT(27); irq++) { |
200 | set_irq_chip(irq, &s3c_irq_eint); | 200 | set_irq_chip(irq, &s3c_irq_eint); |
201 | set_irq_chip_data(irq, (void *)eint_irq_to_bit(irq)); | ||
201 | set_irq_handler(irq, handle_level_irq); | 202 | set_irq_handler(irq, handle_level_irq); |
202 | set_irq_flags(irq, IRQF_VALID); | 203 | set_irq_flags(irq, IRQF_VALID); |
203 | } | 204 | } |
diff --git a/arch/arm/mach-s5p6442/clock.c b/arch/arm/mach-s5p6442/clock.c index 16d6e7e61b5..fbbc7bede68 100644 --- a/arch/arm/mach-s5p6442/clock.c +++ b/arch/arm/mach-s5p6442/clock.c | |||
@@ -340,7 +340,7 @@ void __init_or_cpufreq s5p6442_setup_clocks(void) | |||
340 | clk_pclkd1.rate = pclkd1; | 340 | clk_pclkd1.rate = pclkd1; |
341 | } | 341 | } |
342 | 342 | ||
343 | static struct clk init_clocks_disable[] = { | 343 | static struct clk init_clocks_off[] = { |
344 | { | 344 | { |
345 | .name = "pdma", | 345 | .name = "pdma", |
346 | .id = -1, | 346 | .id = -1, |
@@ -408,23 +408,13 @@ static struct clk *clks[] __initdata = { | |||
408 | 408 | ||
409 | void __init s5p6442_register_clocks(void) | 409 | void __init s5p6442_register_clocks(void) |
410 | { | 410 | { |
411 | struct clk *clkptr; | ||
412 | int i, ret; | ||
413 | |||
414 | s3c24xx_register_clocks(clks, ARRAY_SIZE(clks)); | 411 | s3c24xx_register_clocks(clks, ARRAY_SIZE(clks)); |
415 | 412 | ||
416 | s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); | 413 | s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); |
417 | s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); | 414 | s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); |
418 | 415 | ||
419 | clkptr = init_clocks_disable; | 416 | s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); |
420 | for (i = 0; i < ARRAY_SIZE(init_clocks_disable); i++, clkptr++) { | 417 | s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); |
421 | ret = s3c24xx_register_clock(clkptr); | ||
422 | if (ret < 0) { | ||
423 | printk(KERN_ERR "Fail to register clock %s (%d)\n", | ||
424 | clkptr->name, ret); | ||
425 | } else | ||
426 | (clkptr->enable)(clkptr, 0); | ||
427 | } | ||
428 | 418 | ||
429 | s3c_pwmclk_init(); | 419 | s3c_pwmclk_init(); |
430 | } | 420 | } |
diff --git a/arch/arm/mach-s5p6442/include/mach/map.h b/arch/arm/mach-s5p6442/include/mach/map.h index 31fb2e68d52..203dd5a18bd 100644 --- a/arch/arm/mach-s5p6442/include/mach/map.h +++ b/arch/arm/mach-s5p6442/include/mach/map.h | |||
@@ -28,6 +28,9 @@ | |||
28 | #define S5P6442_PA_VIC1 (0xE4100000) | 28 | #define S5P6442_PA_VIC1 (0xE4100000) |
29 | #define S5P6442_PA_VIC2 (0xE4200000) | 29 | #define S5P6442_PA_VIC2 (0xE4200000) |
30 | 30 | ||
31 | #define S5P6442_PA_SROMC (0xE7000000) | ||
32 | #define S5P_PA_SROMC S5P6442_PA_SROMC | ||
33 | |||
31 | #define S5P6442_PA_MDMA 0xE8000000 | 34 | #define S5P6442_PA_MDMA 0xE8000000 |
32 | #define S5P6442_PA_PDMA 0xE9000000 | 35 | #define S5P6442_PA_PDMA 0xE9000000 |
33 | 36 | ||
diff --git a/arch/arm/mach-s5p6442/mach-smdk6442.c b/arch/arm/mach-s5p6442/mach-smdk6442.c index 819fd80d00a..eaf6b9c489f 100644 --- a/arch/arm/mach-s5p6442/mach-smdk6442.c +++ b/arch/arm/mach-s5p6442/mach-smdk6442.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/serial_core.h> | 14 | #include <linux/serial_core.h> |
15 | #include <linux/i2c.h> | ||
15 | 16 | ||
16 | #include <asm/mach/arch.h> | 17 | #include <asm/mach/arch.h> |
17 | #include <asm/mach/map.h> | 18 | #include <asm/mach/map.h> |
@@ -25,6 +26,7 @@ | |||
25 | #include <plat/s5p6442.h> | 26 | #include <plat/s5p6442.h> |
26 | #include <plat/devs.h> | 27 | #include <plat/devs.h> |
27 | #include <plat/cpu.h> | 28 | #include <plat/cpu.h> |
29 | #include <plat/iic.h> | ||
28 | 30 | ||
29 | /* Following are default values for UCON, ULCON and UFCON UART registers */ | 31 | /* Following are default values for UCON, ULCON and UFCON UART registers */ |
30 | #define SMDK6442_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | 32 | #define SMDK6442_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ |
@@ -65,10 +67,16 @@ static struct s3c2410_uartcfg smdk6442_uartcfgs[] __initdata = { | |||
65 | }; | 67 | }; |
66 | 68 | ||
67 | static struct platform_device *smdk6442_devices[] __initdata = { | 69 | static struct platform_device *smdk6442_devices[] __initdata = { |
70 | &s3c_device_i2c0, | ||
71 | &samsung_asoc_dma, | ||
68 | &s5p6442_device_iis0, | 72 | &s5p6442_device_iis0, |
69 | &s3c_device_wdt, | 73 | &s3c_device_wdt, |
70 | }; | 74 | }; |
71 | 75 | ||
76 | static struct i2c_board_info smdk6442_i2c_devs0[] __initdata = { | ||
77 | { I2C_BOARD_INFO("wm8580", 0x1b), }, | ||
78 | }; | ||
79 | |||
72 | static void __init smdk6442_map_io(void) | 80 | static void __init smdk6442_map_io(void) |
73 | { | 81 | { |
74 | s5p_init_io(NULL, 0, S5P_VA_CHIPID); | 82 | s5p_init_io(NULL, 0, S5P_VA_CHIPID); |
@@ -78,6 +86,9 @@ static void __init smdk6442_map_io(void) | |||
78 | 86 | ||
79 | static void __init smdk6442_machine_init(void) | 87 | static void __init smdk6442_machine_init(void) |
80 | { | 88 | { |
89 | s3c_i2c0_set_platdata(NULL); | ||
90 | i2c_register_board_info(0, smdk6442_i2c_devs0, | ||
91 | ARRAY_SIZE(smdk6442_i2c_devs0)); | ||
81 | platform_add_devices(smdk6442_devices, ARRAY_SIZE(smdk6442_devices)); | 92 | platform_add_devices(smdk6442_devices, ARRAY_SIZE(smdk6442_devices)); |
82 | } | 93 | } |
83 | 94 | ||
diff --git a/arch/arm/mach-s5p6442/setup-i2c0.c b/arch/arm/mach-s5p6442/setup-i2c0.c index 662695dd776..aad85656b0c 100644 --- a/arch/arm/mach-s5p6442/setup-i2c0.c +++ b/arch/arm/mach-s5p6442/setup-i2c0.c | |||
@@ -14,12 +14,15 @@ | |||
14 | 14 | ||
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
17 | #include <linux/gpio.h> | ||
17 | 18 | ||
18 | struct platform_device; /* don't need the contents */ | 19 | struct platform_device; /* don't need the contents */ |
19 | 20 | ||
21 | #include <plat/gpio-cfg.h> | ||
20 | #include <plat/iic.h> | 22 | #include <plat/iic.h> |
21 | 23 | ||
22 | void s3c_i2c0_cfg_gpio(struct platform_device *dev) | 24 | void s3c_i2c0_cfg_gpio(struct platform_device *dev) |
23 | { | 25 | { |
24 | /* Will be populated later */ | 26 | s3c_gpio_cfgall_range(S5P6442_GPD1(0), 2, |
27 | S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP); | ||
25 | } | 28 | } |
diff --git a/arch/arm/mach-s5p64x0/Makefile b/arch/arm/mach-s5p64x0/Makefile index 2655829e6bf..ae6bf6feba8 100644 --- a/arch/arm/mach-s5p64x0/Makefile +++ b/arch/arm/mach-s5p64x0/Makefile | |||
@@ -12,9 +12,9 @@ obj- := | |||
12 | 12 | ||
13 | # Core support for S5P64X0 system | 13 | # Core support for S5P64X0 system |
14 | 14 | ||
15 | obj-$(CONFIG_ARCH_S5P64X0) += cpu.o init.o clock.o dma.o | 15 | obj-$(CONFIG_ARCH_S5P64X0) += cpu.o init.o clock.o dma.o gpiolib.o |
16 | obj-$(CONFIG_ARCH_S5P64X0) += setup-i2c0.o | 16 | obj-$(CONFIG_ARCH_S5P64X0) += setup-i2c0.o |
17 | obj-$(CONFIG_CPU_S5P6440) += clock-s5p6440.o gpio.o | 17 | obj-$(CONFIG_CPU_S5P6440) += clock-s5p6440.o |
18 | obj-$(CONFIG_CPU_S5P6450) += clock-s5p6450.o | 18 | obj-$(CONFIG_CPU_S5P6450) += clock-s5p6450.o |
19 | 19 | ||
20 | # machine support | 20 | # machine support |
diff --git a/arch/arm/mach-s5p64x0/clock-s5p6440.c b/arch/arm/mach-s5p64x0/clock-s5p6440.c index 409c5fc3670..9f12c2ebf41 100644 --- a/arch/arm/mach-s5p64x0/clock-s5p6440.c +++ b/arch/arm/mach-s5p64x0/clock-s5p6440.c | |||
@@ -133,7 +133,7 @@ static struct clksrc_clk clk_pclk_low = { | |||
133 | * recommended to keep the following clocks disabled until the driver requests | 133 | * recommended to keep the following clocks disabled until the driver requests |
134 | * for enabling the clock. | 134 | * for enabling the clock. |
135 | */ | 135 | */ |
136 | static struct clk init_clocks_disable[] = { | 136 | static struct clk init_clocks_off[] = { |
137 | { | 137 | { |
138 | .name = "nand", | 138 | .name = "nand", |
139 | .id = -1, | 139 | .id = -1, |
@@ -419,7 +419,7 @@ static struct clksrc_sources clkset_audio = { | |||
419 | static struct clksrc_clk clksrcs[] = { | 419 | static struct clksrc_clk clksrcs[] = { |
420 | { | 420 | { |
421 | .clk = { | 421 | .clk = { |
422 | .name = "mmc_bus", | 422 | .name = "sclk_mmc", |
423 | .id = 0, | 423 | .id = 0, |
424 | .ctrlbit = (1 << 24), | 424 | .ctrlbit = (1 << 24), |
425 | .enable = s5p64x0_sclk_ctrl, | 425 | .enable = s5p64x0_sclk_ctrl, |
@@ -429,7 +429,7 @@ static struct clksrc_clk clksrcs[] = { | |||
429 | .reg_div = { .reg = S5P64X0_CLK_DIV1, .shift = 0, .size = 4 }, | 429 | .reg_div = { .reg = S5P64X0_CLK_DIV1, .shift = 0, .size = 4 }, |
430 | }, { | 430 | }, { |
431 | .clk = { | 431 | .clk = { |
432 | .name = "mmc_bus", | 432 | .name = "sclk_mmc", |
433 | .id = 1, | 433 | .id = 1, |
434 | .ctrlbit = (1 << 25), | 434 | .ctrlbit = (1 << 25), |
435 | .enable = s5p64x0_sclk_ctrl, | 435 | .enable = s5p64x0_sclk_ctrl, |
@@ -439,7 +439,7 @@ static struct clksrc_clk clksrcs[] = { | |||
439 | .reg_div = { .reg = S5P64X0_CLK_DIV1, .shift = 4, .size = 4 }, | 439 | .reg_div = { .reg = S5P64X0_CLK_DIV1, .shift = 4, .size = 4 }, |
440 | }, { | 440 | }, { |
441 | .clk = { | 441 | .clk = { |
442 | .name = "mmc_bus", | 442 | .name = "sclk_mmc", |
443 | .id = 2, | 443 | .id = 2, |
444 | .ctrlbit = (1 << 26), | 444 | .ctrlbit = (1 << 26), |
445 | .enable = s5p64x0_sclk_ctrl, | 445 | .enable = s5p64x0_sclk_ctrl, |
@@ -602,8 +602,6 @@ static struct clk *clks[] __initdata = { | |||
602 | 602 | ||
603 | void __init s5p6440_register_clocks(void) | 603 | void __init s5p6440_register_clocks(void) |
604 | { | 604 | { |
605 | struct clk *clkp; | ||
606 | int ret; | ||
607 | int ptr; | 605 | int ptr; |
608 | 606 | ||
609 | s3c24xx_register_clocks(clks, ARRAY_SIZE(clks)); | 607 | s3c24xx_register_clocks(clks, ARRAY_SIZE(clks)); |
@@ -614,16 +612,8 @@ void __init s5p6440_register_clocks(void) | |||
614 | s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); | 612 | s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); |
615 | s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); | 613 | s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); |
616 | 614 | ||
617 | clkp = init_clocks_disable; | 615 | s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); |
618 | for (ptr = 0; ptr < ARRAY_SIZE(init_clocks_disable); ptr++, clkp++) { | 616 | s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); |
619 | |||
620 | ret = s3c24xx_register_clock(clkp); | ||
621 | if (ret < 0) { | ||
622 | printk(KERN_ERR "Failed to register clock %s (%d)\n", | ||
623 | clkp->name, ret); | ||
624 | } | ||
625 | (clkp->enable)(clkp, 0); | ||
626 | } | ||
627 | 617 | ||
628 | s3c_pwmclk_init(); | 618 | s3c_pwmclk_init(); |
629 | } | 619 | } |
diff --git a/arch/arm/mach-s5p64x0/clock-s5p6450.c b/arch/arm/mach-s5p64x0/clock-s5p6450.c index 7fc6abd3591..4eec457ddcc 100644 --- a/arch/arm/mach-s5p64x0/clock-s5p6450.c +++ b/arch/arm/mach-s5p64x0/clock-s5p6450.c | |||
@@ -181,7 +181,7 @@ static struct clksrc_clk clk_pclk_low = { | |||
181 | * recommended to keep the following clocks disabled until the driver requests | 181 | * recommended to keep the following clocks disabled until the driver requests |
182 | * for enabling the clock. | 182 | * for enabling the clock. |
183 | */ | 183 | */ |
184 | static struct clk init_clocks_disable[] = { | 184 | static struct clk init_clocks_off[] = { |
185 | { | 185 | { |
186 | .name = "usbhost", | 186 | .name = "usbhost", |
187 | .id = -1, | 187 | .id = -1, |
@@ -231,6 +231,12 @@ static struct clk init_clocks_disable[] = { | |||
231 | .enable = s5p64x0_pclk_ctrl, | 231 | .enable = s5p64x0_pclk_ctrl, |
232 | .ctrlbit = (1 << 5), | 232 | .ctrlbit = (1 << 5), |
233 | }, { | 233 | }, { |
234 | .name = "rtc", | ||
235 | .id = -1, | ||
236 | .parent = &clk_pclk_low.clk, | ||
237 | .enable = s5p64x0_pclk_ctrl, | ||
238 | .ctrlbit = (1 << 6), | ||
239 | }, { | ||
234 | .name = "adc", | 240 | .name = "adc", |
235 | .id = -1, | 241 | .id = -1, |
236 | .parent = &clk_pclk_low.clk, | 242 | .parent = &clk_pclk_low.clk, |
@@ -261,6 +267,18 @@ static struct clk init_clocks_disable[] = { | |||
261 | .enable = s5p64x0_pclk_ctrl, | 267 | .enable = s5p64x0_pclk_ctrl, |
262 | .ctrlbit = (1 << 26), | 268 | .ctrlbit = (1 << 26), |
263 | }, { | 269 | }, { |
270 | .name = "iis", | ||
271 | .id = 1, | ||
272 | .parent = &clk_pclk_low.clk, | ||
273 | .enable = s5p64x0_pclk_ctrl, | ||
274 | .ctrlbit = (1 << 15), | ||
275 | }, { | ||
276 | .name = "iis", | ||
277 | .id = 2, | ||
278 | .parent = &clk_pclk_low.clk, | ||
279 | .enable = s5p64x0_pclk_ctrl, | ||
280 | .ctrlbit = (1 << 16), | ||
281 | }, { | ||
264 | .name = "i2c", | 282 | .name = "i2c", |
265 | .id = 1, | 283 | .id = 1, |
266 | .parent = &clk_pclk_low.clk, | 284 | .parent = &clk_pclk_low.clk, |
@@ -633,8 +651,6 @@ void __init_or_cpufreq s5p6450_setup_clocks(void) | |||
633 | 651 | ||
634 | void __init s5p6450_register_clocks(void) | 652 | void __init s5p6450_register_clocks(void) |
635 | { | 653 | { |
636 | struct clk *clkp; | ||
637 | int ret; | ||
638 | int ptr; | 654 | int ptr; |
639 | 655 | ||
640 | for (ptr = 0; ptr < ARRAY_SIZE(sysclks); ptr++) | 656 | for (ptr = 0; ptr < ARRAY_SIZE(sysclks); ptr++) |
@@ -643,16 +659,8 @@ void __init s5p6450_register_clocks(void) | |||
643 | s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); | 659 | s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); |
644 | s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); | 660 | s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); |
645 | 661 | ||
646 | clkp = init_clocks_disable; | 662 | s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); |
647 | for (ptr = 0; ptr < ARRAY_SIZE(init_clocks_disable); ptr++, clkp++) { | 663 | s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); |
648 | |||
649 | ret = s3c24xx_register_clock(clkp); | ||
650 | if (ret < 0) { | ||
651 | printk(KERN_ERR "Failed to register clock %s (%d)\n", | ||
652 | clkp->name, ret); | ||
653 | } | ||
654 | (clkp->enable)(clkp, 0); | ||
655 | } | ||
656 | 664 | ||
657 | s3c_pwmclk_init(); | 665 | s3c_pwmclk_init(); |
658 | } | 666 | } |
diff --git a/arch/arm/mach-s5p64x0/dev-audio.c b/arch/arm/mach-s5p64x0/dev-audio.c index 14f89e73b8d..35f1f226dab 100644 --- a/arch/arm/mach-s5p64x0/dev-audio.c +++ b/arch/arm/mach-s5p64x0/dev-audio.c | |||
@@ -24,13 +24,13 @@ static const char *rclksrc[] = { | |||
24 | [1] = "sclk_audio2", | 24 | [1] = "sclk_audio2", |
25 | }; | 25 | }; |
26 | 26 | ||
27 | static int s5p64x0_cfg_i2s(struct platform_device *pdev) | 27 | static int s5p6440_cfg_i2s(struct platform_device *pdev) |
28 | { | 28 | { |
29 | /* configure GPIO for i2s port */ | ||
30 | switch (pdev->id) { | 29 | switch (pdev->id) { |
31 | case 0: | 30 | case 0: |
32 | s3c_gpio_cfgpin_range(S5P6440_GPR(4), 5, S3C_GPIO_SFN(5)); | 31 | s3c_gpio_cfgpin_range(S5P6440_GPC(4), 2, S3C_GPIO_SFN(5)); |
33 | s3c_gpio_cfgpin_range(S5P6440_GPR(13), 2, S3C_GPIO_SFN(5)); | 32 | s3c_gpio_cfgpin(S5P6440_GPC(7), S3C_GPIO_SFN(5)); |
33 | s3c_gpio_cfgpin_range(S5P6440_GPH(6), 4, S3C_GPIO_SFN(5)); | ||
34 | break; | 34 | break; |
35 | default: | 35 | default: |
36 | printk(KERN_ERR "Invalid Device %d\n", pdev->id); | 36 | printk(KERN_ERR "Invalid Device %d\n", pdev->id); |
@@ -40,8 +40,8 @@ static int s5p64x0_cfg_i2s(struct platform_device *pdev) | |||
40 | return 0; | 40 | return 0; |
41 | } | 41 | } |
42 | 42 | ||
43 | static struct s3c_audio_pdata s5p64x0_i2s_pdata = { | 43 | static struct s3c_audio_pdata s5p6440_i2s_pdata = { |
44 | .cfg_gpio = s5p64x0_cfg_i2s, | 44 | .cfg_gpio = s5p6440_cfg_i2s, |
45 | .type = { | 45 | .type = { |
46 | .i2s = { | 46 | .i2s = { |
47 | .quirks = QUIRK_PRI_6CHAN, | 47 | .quirks = QUIRK_PRI_6CHAN, |
@@ -50,7 +50,7 @@ static struct s3c_audio_pdata s5p64x0_i2s_pdata = { | |||
50 | }, | 50 | }, |
51 | }; | 51 | }; |
52 | 52 | ||
53 | static struct resource s5p64x0_iis0_resource[] = { | 53 | static struct resource s5p64x0_i2s0_resource[] = { |
54 | [0] = { | 54 | [0] = { |
55 | .start = S5P64X0_PA_I2S, | 55 | .start = S5P64X0_PA_I2S, |
56 | .end = S5P64X0_PA_I2S + 0x100 - 1, | 56 | .end = S5P64X0_PA_I2S + 0x100 - 1, |
@@ -71,20 +71,117 @@ static struct resource s5p64x0_iis0_resource[] = { | |||
71 | struct platform_device s5p6440_device_iis = { | 71 | struct platform_device s5p6440_device_iis = { |
72 | .name = "samsung-i2s", | 72 | .name = "samsung-i2s", |
73 | .id = 0, | 73 | .id = 0, |
74 | .num_resources = ARRAY_SIZE(s5p64x0_iis0_resource), | 74 | .num_resources = ARRAY_SIZE(s5p64x0_i2s0_resource), |
75 | .resource = s5p64x0_iis0_resource, | 75 | .resource = s5p64x0_i2s0_resource, |
76 | .dev = { | 76 | .dev = { |
77 | .platform_data = &s5p64x0_i2s_pdata, | 77 | .platform_data = &s5p6440_i2s_pdata, |
78 | }, | ||
79 | }; | ||
80 | |||
81 | static int s5p6450_cfg_i2s(struct platform_device *pdev) | ||
82 | { | ||
83 | switch (pdev->id) { | ||
84 | case 0: | ||
85 | s3c_gpio_cfgpin_range(S5P6450_GPR(4), 5, S3C_GPIO_SFN(5)); | ||
86 | s3c_gpio_cfgpin_range(S5P6450_GPR(13), 2, S3C_GPIO_SFN(5)); | ||
87 | break; | ||
88 | case 1: | ||
89 | s3c_gpio_cfgpin(S5P6440_GPB(4), S3C_GPIO_SFN(5)); | ||
90 | s3c_gpio_cfgpin_range(S5P6450_GPC(0), 4, S3C_GPIO_SFN(5)); | ||
91 | break; | ||
92 | case 2: | ||
93 | s3c_gpio_cfgpin_range(S5P6450_GPK(0), 5, S3C_GPIO_SFN(5)); | ||
94 | break; | ||
95 | default: | ||
96 | printk(KERN_ERR "Invalid Device %d\n", pdev->id); | ||
97 | return -EINVAL; | ||
98 | } | ||
99 | |||
100 | return 0; | ||
101 | } | ||
102 | |||
103 | static struct s3c_audio_pdata s5p6450_i2s0_pdata = { | ||
104 | .cfg_gpio = s5p6450_cfg_i2s, | ||
105 | .type = { | ||
106 | .i2s = { | ||
107 | .quirks = QUIRK_PRI_6CHAN, | ||
108 | .src_clk = rclksrc, | ||
109 | }, | ||
78 | }, | 110 | }, |
79 | }; | 111 | }; |
80 | 112 | ||
81 | struct platform_device s5p6450_device_iis0 = { | 113 | struct platform_device s5p6450_device_iis0 = { |
82 | .name = "samsung-i2s", | 114 | .name = "samsung-i2s", |
83 | .id = 0, | 115 | .id = 0, |
84 | .num_resources = ARRAY_SIZE(s5p64x0_iis0_resource), | 116 | .num_resources = ARRAY_SIZE(s5p64x0_i2s0_resource), |
85 | .resource = s5p64x0_iis0_resource, | 117 | .resource = s5p64x0_i2s0_resource, |
118 | .dev = { | ||
119 | .platform_data = &s5p6450_i2s0_pdata, | ||
120 | }, | ||
121 | }; | ||
122 | |||
123 | static struct s3c_audio_pdata s5p6450_i2s_pdata = { | ||
124 | .cfg_gpio = s5p6450_cfg_i2s, | ||
125 | .type = { | ||
126 | .i2s = { | ||
127 | .src_clk = rclksrc, | ||
128 | }, | ||
129 | }, | ||
130 | }; | ||
131 | |||
132 | static struct resource s5p6450_i2s1_resource[] = { | ||
133 | [0] = { | ||
134 | .start = S5P6450_PA_I2S1, | ||
135 | .end = S5P6450_PA_I2S1 + 0x100 - 1, | ||
136 | .flags = IORESOURCE_MEM, | ||
137 | }, | ||
138 | [1] = { | ||
139 | .start = DMACH_I2S1_TX, | ||
140 | .end = DMACH_I2S1_TX, | ||
141 | .flags = IORESOURCE_DMA, | ||
142 | }, | ||
143 | [2] = { | ||
144 | .start = DMACH_I2S1_RX, | ||
145 | .end = DMACH_I2S1_RX, | ||
146 | .flags = IORESOURCE_DMA, | ||
147 | }, | ||
148 | }; | ||
149 | |||
150 | struct platform_device s5p6450_device_iis1 = { | ||
151 | .name = "samsung-i2s", | ||
152 | .id = 1, | ||
153 | .num_resources = ARRAY_SIZE(s5p6450_i2s1_resource), | ||
154 | .resource = s5p6450_i2s1_resource, | ||
155 | .dev = { | ||
156 | .platform_data = &s5p6450_i2s_pdata, | ||
157 | }, | ||
158 | }; | ||
159 | |||
160 | static struct resource s5p6450_i2s2_resource[] = { | ||
161 | [0] = { | ||
162 | .start = S5P6450_PA_I2S2, | ||
163 | .end = S5P6450_PA_I2S2 + 0x100 - 1, | ||
164 | .flags = IORESOURCE_MEM, | ||
165 | }, | ||
166 | [1] = { | ||
167 | .start = DMACH_I2S2_TX, | ||
168 | .end = DMACH_I2S2_TX, | ||
169 | .flags = IORESOURCE_DMA, | ||
170 | }, | ||
171 | [2] = { | ||
172 | .start = DMACH_I2S2_RX, | ||
173 | .end = DMACH_I2S2_RX, | ||
174 | .flags = IORESOURCE_DMA, | ||
175 | }, | ||
176 | }; | ||
177 | |||
178 | struct platform_device s5p6450_device_iis2 = { | ||
179 | .name = "samsung-i2s", | ||
180 | .id = 2, | ||
181 | .num_resources = ARRAY_SIZE(s5p6450_i2s2_resource), | ||
182 | .resource = s5p6450_i2s2_resource, | ||
86 | .dev = { | 183 | .dev = { |
87 | .platform_data = &s5p64x0_i2s_pdata, | 184 | .platform_data = &s5p6450_i2s_pdata, |
88 | }, | 185 | }, |
89 | }; | 186 | }; |
90 | 187 | ||
diff --git a/arch/arm/mach-s5p64x0/gpio.c b/arch/arm/mach-s5p64x0/gpiolib.c index 39159dd5a29..e7fb3b004e7 100644 --- a/arch/arm/mach-s5p64x0/gpio.c +++ b/arch/arm/mach-s5p64x0/gpiolib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* linux/arch/arm/mach-s5p64x0/gpio.c | 1 | /* linux/arch/arm/mach-s5p64x0/gpiolib.c |
2 | * | 2 | * |
3 | * Copyright (c) 2009-2010 Samsung Electronics Co., Ltd. | 3 | * Copyright (c) 2009-2010 Samsung Electronics Co., Ltd. |
4 | * http://www.samsung.com | 4 | * http://www.samsung.com |
@@ -17,13 +17,12 @@ | |||
17 | 17 | ||
18 | #include <mach/map.h> | 18 | #include <mach/map.h> |
19 | #include <mach/regs-gpio.h> | 19 | #include <mach/regs-gpio.h> |
20 | #include <mach/regs-clock.h> | ||
20 | 21 | ||
21 | #include <plat/gpio-core.h> | 22 | #include <plat/gpio-core.h> |
22 | #include <plat/gpio-cfg.h> | 23 | #include <plat/gpio-cfg.h> |
23 | #include <plat/gpio-cfg-helpers.h> | 24 | #include <plat/gpio-cfg-helpers.h> |
24 | 25 | ||
25 | /* To be implemented S5P6450 GPIO */ | ||
26 | |||
27 | /* | 26 | /* |
28 | * S5P6440 GPIO bank summary: | 27 | * S5P6440 GPIO bank summary: |
29 | * | 28 | * |
@@ -40,6 +39,25 @@ | |||
40 | * P 8 2Bit Yes 8 | 39 | * P 8 2Bit Yes 8 |
41 | * R 15 4Bit[2] Yes 8 | 40 | * R 15 4Bit[2] Yes 8 |
42 | * | 41 | * |
42 | * S5P6450 GPIO bank summary: | ||
43 | * | ||
44 | * Bank GPIOs Style SlpCon ExtInt Group | ||
45 | * A 6 4Bit Yes 1 | ||
46 | * B 7 4Bit Yes 1 | ||
47 | * C 8 4Bit Yes 2 | ||
48 | * D 8 4Bit Yes None | ||
49 | * F 2 2Bit Yes None | ||
50 | * G 14 4Bit[2] Yes 5 | ||
51 | * H 10 4Bit[2] Yes 6 | ||
52 | * I 16 2Bit Yes None | ||
53 | * J 12 2Bit Yes None | ||
54 | * K 5 4Bit Yes None | ||
55 | * N 16 2Bit No IRQ_EINT | ||
56 | * P 11 2Bit Yes 8 | ||
57 | * Q 14 2Bit Yes None | ||
58 | * R 15 4Bit[2] Yes None | ||
59 | * S 8 2Bit Yes None | ||
60 | * | ||
43 | * [1] BANKF pins 14,15 do not form part of the external interrupt sources | 61 | * [1] BANKF pins 14,15 do not form part of the external interrupt sources |
44 | * [2] BANK has two control registers, GPxCON0 and GPxCON1 | 62 | * [2] BANK has two control registers, GPxCON0 and GPxCON1 |
45 | */ | 63 | */ |
@@ -190,7 +208,7 @@ static struct s3c_gpio_cfg s5p64x0_gpio_cfgs[] = { | |||
190 | 208 | ||
191 | static struct s3c_gpio_chip s5p6440_gpio_4bit[] = { | 209 | static struct s3c_gpio_chip s5p6440_gpio_4bit[] = { |
192 | { | 210 | { |
193 | .base = S5P6440_GPA_BASE, | 211 | .base = S5P64X0_GPA_BASE, |
194 | .config = &s5p64x0_gpio_cfgs[1], | 212 | .config = &s5p64x0_gpio_cfgs[1], |
195 | .chip = { | 213 | .chip = { |
196 | .base = S5P6440_GPA(0), | 214 | .base = S5P6440_GPA(0), |
@@ -198,7 +216,7 @@ static struct s3c_gpio_chip s5p6440_gpio_4bit[] = { | |||
198 | .label = "GPA", | 216 | .label = "GPA", |
199 | }, | 217 | }, |
200 | }, { | 218 | }, { |
201 | .base = S5P6440_GPB_BASE, | 219 | .base = S5P64X0_GPB_BASE, |
202 | .config = &s5p64x0_gpio_cfgs[1], | 220 | .config = &s5p64x0_gpio_cfgs[1], |
203 | .chip = { | 221 | .chip = { |
204 | .base = S5P6440_GPB(0), | 222 | .base = S5P6440_GPB(0), |
@@ -206,7 +224,7 @@ static struct s3c_gpio_chip s5p6440_gpio_4bit[] = { | |||
206 | .label = "GPB", | 224 | .label = "GPB", |
207 | }, | 225 | }, |
208 | }, { | 226 | }, { |
209 | .base = S5P6440_GPC_BASE, | 227 | .base = S5P64X0_GPC_BASE, |
210 | .config = &s5p64x0_gpio_cfgs[1], | 228 | .config = &s5p64x0_gpio_cfgs[1], |
211 | .chip = { | 229 | .chip = { |
212 | .base = S5P6440_GPC(0), | 230 | .base = S5P6440_GPC(0), |
@@ -214,7 +232,7 @@ static struct s3c_gpio_chip s5p6440_gpio_4bit[] = { | |||
214 | .label = "GPC", | 232 | .label = "GPC", |
215 | }, | 233 | }, |
216 | }, { | 234 | }, { |
217 | .base = S5P6440_GPG_BASE, | 235 | .base = S5P64X0_GPG_BASE, |
218 | .config = &s5p64x0_gpio_cfgs[1], | 236 | .config = &s5p64x0_gpio_cfgs[1], |
219 | .chip = { | 237 | .chip = { |
220 | .base = S5P6440_GPG(0), | 238 | .base = S5P6440_GPG(0), |
@@ -226,7 +244,7 @@ static struct s3c_gpio_chip s5p6440_gpio_4bit[] = { | |||
226 | 244 | ||
227 | static struct s3c_gpio_chip s5p6440_gpio_4bit2[] = { | 245 | static struct s3c_gpio_chip s5p6440_gpio_4bit2[] = { |
228 | { | 246 | { |
229 | .base = S5P6440_GPH_BASE + 0x4, | 247 | .base = S5P64X0_GPH_BASE + 0x4, |
230 | .config = &s5p64x0_gpio_cfgs[1], | 248 | .config = &s5p64x0_gpio_cfgs[1], |
231 | .chip = { | 249 | .chip = { |
232 | .base = S5P6440_GPH(0), | 250 | .base = S5P6440_GPH(0), |
@@ -238,7 +256,7 @@ static struct s3c_gpio_chip s5p6440_gpio_4bit2[] = { | |||
238 | 256 | ||
239 | static struct s3c_gpio_chip s5p6440_gpio_rbank_4bit2[] = { | 257 | static struct s3c_gpio_chip s5p6440_gpio_rbank_4bit2[] = { |
240 | { | 258 | { |
241 | .base = S5P6440_GPR_BASE + 0x4, | 259 | .base = S5P64X0_GPR_BASE + 0x4, |
242 | .config = &s5p64x0_gpio_cfgs[2], | 260 | .config = &s5p64x0_gpio_cfgs[2], |
243 | .chip = { | 261 | .chip = { |
244 | .base = S5P6440_GPR(0), | 262 | .base = S5P6440_GPR(0), |
@@ -250,7 +268,7 @@ static struct s3c_gpio_chip s5p6440_gpio_rbank_4bit2[] = { | |||
250 | 268 | ||
251 | static struct s3c_gpio_chip s5p6440_gpio_2bit[] = { | 269 | static struct s3c_gpio_chip s5p6440_gpio_2bit[] = { |
252 | { | 270 | { |
253 | .base = S5P6440_GPF_BASE, | 271 | .base = S5P64X0_GPF_BASE, |
254 | .config = &s5p64x0_gpio_cfgs[5], | 272 | .config = &s5p64x0_gpio_cfgs[5], |
255 | .chip = { | 273 | .chip = { |
256 | .base = S5P6440_GPF(0), | 274 | .base = S5P6440_GPF(0), |
@@ -258,7 +276,7 @@ static struct s3c_gpio_chip s5p6440_gpio_2bit[] = { | |||
258 | .label = "GPF", | 276 | .label = "GPF", |
259 | }, | 277 | }, |
260 | }, { | 278 | }, { |
261 | .base = S5P6440_GPI_BASE, | 279 | .base = S5P64X0_GPI_BASE, |
262 | .config = &s5p64x0_gpio_cfgs[3], | 280 | .config = &s5p64x0_gpio_cfgs[3], |
263 | .chip = { | 281 | .chip = { |
264 | .base = S5P6440_GPI(0), | 282 | .base = S5P6440_GPI(0), |
@@ -266,7 +284,7 @@ static struct s3c_gpio_chip s5p6440_gpio_2bit[] = { | |||
266 | .label = "GPI", | 284 | .label = "GPI", |
267 | }, | 285 | }, |
268 | }, { | 286 | }, { |
269 | .base = S5P6440_GPJ_BASE, | 287 | .base = S5P64X0_GPJ_BASE, |
270 | .config = &s5p64x0_gpio_cfgs[3], | 288 | .config = &s5p64x0_gpio_cfgs[3], |
271 | .chip = { | 289 | .chip = { |
272 | .base = S5P6440_GPJ(0), | 290 | .base = S5P6440_GPJ(0), |
@@ -274,7 +292,7 @@ static struct s3c_gpio_chip s5p6440_gpio_2bit[] = { | |||
274 | .label = "GPJ", | 292 | .label = "GPJ", |
275 | }, | 293 | }, |
276 | }, { | 294 | }, { |
277 | .base = S5P6440_GPN_BASE, | 295 | .base = S5P64X0_GPN_BASE, |
278 | .config = &s5p64x0_gpio_cfgs[4], | 296 | .config = &s5p64x0_gpio_cfgs[4], |
279 | .chip = { | 297 | .chip = { |
280 | .base = S5P6440_GPN(0), | 298 | .base = S5P6440_GPN(0), |
@@ -282,7 +300,7 @@ static struct s3c_gpio_chip s5p6440_gpio_2bit[] = { | |||
282 | .label = "GPN", | 300 | .label = "GPN", |
283 | }, | 301 | }, |
284 | }, { | 302 | }, { |
285 | .base = S5P6440_GPP_BASE, | 303 | .base = S5P64X0_GPP_BASE, |
286 | .config = &s5p64x0_gpio_cfgs[5], | 304 | .config = &s5p64x0_gpio_cfgs[5], |
287 | .chip = { | 305 | .chip = { |
288 | .base = S5P6440_GPP(0), | 306 | .base = S5P6440_GPP(0), |
@@ -292,6 +310,142 @@ static struct s3c_gpio_chip s5p6440_gpio_2bit[] = { | |||
292 | }, | 310 | }, |
293 | }; | 311 | }; |
294 | 312 | ||
313 | static struct s3c_gpio_chip s5p6450_gpio_4bit[] = { | ||
314 | { | ||
315 | .base = S5P64X0_GPA_BASE, | ||
316 | .config = &s5p64x0_gpio_cfgs[1], | ||
317 | .chip = { | ||
318 | .base = S5P6450_GPA(0), | ||
319 | .ngpio = S5P6450_GPIO_A_NR, | ||
320 | .label = "GPA", | ||
321 | }, | ||
322 | }, { | ||
323 | .base = S5P64X0_GPB_BASE, | ||
324 | .config = &s5p64x0_gpio_cfgs[1], | ||
325 | .chip = { | ||
326 | .base = S5P6450_GPB(0), | ||
327 | .ngpio = S5P6450_GPIO_B_NR, | ||
328 | .label = "GPB", | ||
329 | }, | ||
330 | }, { | ||
331 | .base = S5P64X0_GPC_BASE, | ||
332 | .config = &s5p64x0_gpio_cfgs[1], | ||
333 | .chip = { | ||
334 | .base = S5P6450_GPC(0), | ||
335 | .ngpio = S5P6450_GPIO_C_NR, | ||
336 | .label = "GPC", | ||
337 | }, | ||
338 | }, { | ||
339 | .base = S5P6450_GPD_BASE, | ||
340 | .config = &s5p64x0_gpio_cfgs[1], | ||
341 | .chip = { | ||
342 | .base = S5P6450_GPD(0), | ||
343 | .ngpio = S5P6450_GPIO_D_NR, | ||
344 | .label = "GPD", | ||
345 | }, | ||
346 | }, { | ||
347 | .base = S5P6450_GPK_BASE, | ||
348 | .config = &s5p64x0_gpio_cfgs[1], | ||
349 | .chip = { | ||
350 | .base = S5P6450_GPK(0), | ||
351 | .ngpio = S5P6450_GPIO_K_NR, | ||
352 | .label = "GPK", | ||
353 | }, | ||
354 | }, | ||
355 | }; | ||
356 | |||
357 | static struct s3c_gpio_chip s5p6450_gpio_4bit2[] = { | ||
358 | { | ||
359 | .base = S5P64X0_GPG_BASE + 0x4, | ||
360 | .config = &s5p64x0_gpio_cfgs[1], | ||
361 | .chip = { | ||
362 | .base = S5P6450_GPG(0), | ||
363 | .ngpio = S5P6450_GPIO_G_NR, | ||
364 | .label = "GPG", | ||
365 | }, | ||
366 | }, { | ||
367 | .base = S5P64X0_GPH_BASE + 0x4, | ||
368 | .config = &s5p64x0_gpio_cfgs[1], | ||
369 | .chip = { | ||
370 | .base = S5P6450_GPH(0), | ||
371 | .ngpio = S5P6450_GPIO_H_NR, | ||
372 | .label = "GPH", | ||
373 | }, | ||
374 | }, | ||
375 | }; | ||
376 | |||
377 | static struct s3c_gpio_chip s5p6450_gpio_rbank_4bit2[] = { | ||
378 | { | ||
379 | .base = S5P64X0_GPR_BASE + 0x4, | ||
380 | .config = &s5p64x0_gpio_cfgs[2], | ||
381 | .chip = { | ||
382 | .base = S5P6450_GPR(0), | ||
383 | .ngpio = S5P6450_GPIO_R_NR, | ||
384 | .label = "GPR", | ||
385 | }, | ||
386 | }, | ||
387 | }; | ||
388 | |||
389 | static struct s3c_gpio_chip s5p6450_gpio_2bit[] = { | ||
390 | { | ||
391 | .base = S5P64X0_GPF_BASE, | ||
392 | .config = &s5p64x0_gpio_cfgs[5], | ||
393 | .chip = { | ||
394 | .base = S5P6450_GPF(0), | ||
395 | .ngpio = S5P6450_GPIO_F_NR, | ||
396 | .label = "GPF", | ||
397 | }, | ||
398 | }, { | ||
399 | .base = S5P64X0_GPI_BASE, | ||
400 | .config = &s5p64x0_gpio_cfgs[3], | ||
401 | .chip = { | ||
402 | .base = S5P6450_GPI(0), | ||
403 | .ngpio = S5P6450_GPIO_I_NR, | ||
404 | .label = "GPI", | ||
405 | }, | ||
406 | }, { | ||
407 | .base = S5P64X0_GPJ_BASE, | ||
408 | .config = &s5p64x0_gpio_cfgs[3], | ||
409 | .chip = { | ||
410 | .base = S5P6450_GPJ(0), | ||
411 | .ngpio = S5P6450_GPIO_J_NR, | ||
412 | .label = "GPJ", | ||
413 | }, | ||
414 | }, { | ||
415 | .base = S5P64X0_GPN_BASE, | ||
416 | .config = &s5p64x0_gpio_cfgs[4], | ||
417 | .chip = { | ||
418 | .base = S5P6450_GPN(0), | ||
419 | .ngpio = S5P6450_GPIO_N_NR, | ||
420 | .label = "GPN", | ||
421 | }, | ||
422 | }, { | ||
423 | .base = S5P64X0_GPP_BASE, | ||
424 | .config = &s5p64x0_gpio_cfgs[5], | ||
425 | .chip = { | ||
426 | .base = S5P6450_GPP(0), | ||
427 | .ngpio = S5P6450_GPIO_P_NR, | ||
428 | .label = "GPP", | ||
429 | }, | ||
430 | }, { | ||
431 | .base = S5P6450_GPQ_BASE, | ||
432 | .config = &s5p64x0_gpio_cfgs[4], | ||
433 | .chip = { | ||
434 | .base = S5P6450_GPQ(0), | ||
435 | .ngpio = S5P6450_GPIO_Q_NR, | ||
436 | .label = "GPQ", | ||
437 | }, | ||
438 | }, { | ||
439 | .base = S5P6450_GPS_BASE, | ||
440 | .config = &s5p64x0_gpio_cfgs[5], | ||
441 | .chip = { | ||
442 | .base = S5P6450_GPS(0), | ||
443 | .ngpio = S5P6450_GPIO_S_NR, | ||
444 | .label = "GPS", | ||
445 | }, | ||
446 | }, | ||
447 | }; | ||
448 | |||
295 | void __init s5p64x0_gpiolib_set_cfg(struct s3c_gpio_cfg *chipcfg, int nr_chips) | 449 | void __init s5p64x0_gpiolib_set_cfg(struct s3c_gpio_cfg *chipcfg, int nr_chips) |
296 | { | 450 | { |
297 | for (; nr_chips > 0; nr_chips--, chipcfg++) { | 451 | for (; nr_chips > 0; nr_chips--, chipcfg++) { |
@@ -317,26 +471,41 @@ static void __init s5p64x0_gpio_add_rbank_4bit2(struct s3c_gpio_chip *chip, | |||
317 | } | 471 | } |
318 | } | 472 | } |
319 | 473 | ||
320 | static int __init s5p6440_gpiolib_init(void) | 474 | static int __init s5p64x0_gpiolib_init(void) |
321 | { | 475 | { |
322 | struct s3c_gpio_chip *chips = s5p6440_gpio_2bit; | 476 | unsigned int chipid; |
323 | int nr_chips = ARRAY_SIZE(s5p6440_gpio_2bit); | 477 | |
478 | chipid = __raw_readl(S5P64X0_SYS_ID); | ||
324 | 479 | ||
325 | s5p64x0_gpiolib_set_cfg(s5p64x0_gpio_cfgs, | 480 | s5p64x0_gpiolib_set_cfg(s5p64x0_gpio_cfgs, |
326 | ARRAY_SIZE(s5p64x0_gpio_cfgs)); | 481 | ARRAY_SIZE(s5p64x0_gpio_cfgs)); |
327 | 482 | ||
328 | for (; nr_chips > 0; nr_chips--, chips++) | 483 | if ((chipid & 0xff000) == 0x50000) { |
329 | s3c_gpiolib_add(chips); | 484 | samsung_gpiolib_add_2bit_chips(s5p6450_gpio_2bit, |
485 | ARRAY_SIZE(s5p6450_gpio_2bit)); | ||
486 | |||
487 | samsung_gpiolib_add_4bit_chips(s5p6450_gpio_4bit, | ||
488 | ARRAY_SIZE(s5p6450_gpio_4bit)); | ||
330 | 489 | ||
331 | samsung_gpiolib_add_4bit_chips(s5p6440_gpio_4bit, | 490 | samsung_gpiolib_add_4bit2_chips(s5p6450_gpio_4bit2, |
332 | ARRAY_SIZE(s5p6440_gpio_4bit)); | 491 | ARRAY_SIZE(s5p6450_gpio_4bit2)); |
333 | 492 | ||
334 | samsung_gpiolib_add_4bit2_chips(s5p6440_gpio_4bit2, | 493 | s5p64x0_gpio_add_rbank_4bit2(s5p6450_gpio_rbank_4bit2, |
335 | ARRAY_SIZE(s5p6440_gpio_4bit2)); | 494 | ARRAY_SIZE(s5p6450_gpio_rbank_4bit2)); |
495 | } else { | ||
496 | samsung_gpiolib_add_2bit_chips(s5p6440_gpio_2bit, | ||
497 | ARRAY_SIZE(s5p6440_gpio_2bit)); | ||
336 | 498 | ||
337 | s5p64x0_gpio_add_rbank_4bit2(s5p6440_gpio_rbank_4bit2, | 499 | samsung_gpiolib_add_4bit_chips(s5p6440_gpio_4bit, |
338 | ARRAY_SIZE(s5p6440_gpio_rbank_4bit2)); | 500 | ARRAY_SIZE(s5p6440_gpio_4bit)); |
501 | |||
502 | samsung_gpiolib_add_4bit2_chips(s5p6440_gpio_4bit2, | ||
503 | ARRAY_SIZE(s5p6440_gpio_4bit2)); | ||
504 | |||
505 | s5p64x0_gpio_add_rbank_4bit2(s5p6440_gpio_rbank_4bit2, | ||
506 | ARRAY_SIZE(s5p6440_gpio_rbank_4bit2)); | ||
507 | } | ||
339 | 508 | ||
340 | return 0; | 509 | return 0; |
341 | } | 510 | } |
342 | arch_initcall(s5p6440_gpiolib_init); | 511 | core_initcall(s5p64x0_gpiolib_init); |
diff --git a/arch/arm/mach-s5p64x0/include/mach/map.h b/arch/arm/mach-s5p64x0/include/mach/map.h index 31e534156e0..a9365e5ba61 100644 --- a/arch/arm/mach-s5p64x0/include/mach/map.h +++ b/arch/arm/mach-s5p64x0/include/mach/map.h | |||
@@ -29,6 +29,9 @@ | |||
29 | #define S5P64X0_PA_VIC0 (0xE4000000) | 29 | #define S5P64X0_PA_VIC0 (0xE4000000) |
30 | #define S5P64X0_PA_VIC1 (0xE4100000) | 30 | #define S5P64X0_PA_VIC1 (0xE4100000) |
31 | 31 | ||
32 | #define S5P64X0_PA_SROMC (0xE7000000) | ||
33 | #define S5P_PA_SROMC S5P64X0_PA_SROMC | ||
34 | |||
32 | #define S5P64X0_PA_PDMA (0xE9000000) | 35 | #define S5P64X0_PA_PDMA (0xE9000000) |
33 | 36 | ||
34 | #define S5P64X0_PA_TIMER (0xEA000000) | 37 | #define S5P64X0_PA_TIMER (0xEA000000) |
@@ -63,6 +66,8 @@ | |||
63 | #define S5P64X0_PA_HSMMC(x) (0xED800000 + ((x) * 0x100000)) | 66 | #define S5P64X0_PA_HSMMC(x) (0xED800000 + ((x) * 0x100000)) |
64 | 67 | ||
65 | #define S5P64X0_PA_I2S (0xF2000000) | 68 | #define S5P64X0_PA_I2S (0xF2000000) |
69 | #define S5P6450_PA_I2S1 0xF2800000 | ||
70 | #define S5P6450_PA_I2S2 0xF2900000 | ||
66 | 71 | ||
67 | #define S5P64X0_PA_PCM (0xF2100000) | 72 | #define S5P64X0_PA_PCM (0xF2100000) |
68 | 73 | ||
diff --git a/arch/arm/mach-s5p64x0/include/mach/regs-gpio.h b/arch/arm/mach-s5p64x0/include/mach/regs-gpio.h index 85f448e20a8..0953ef6b1c7 100644 --- a/arch/arm/mach-s5p64x0/include/mach/regs-gpio.h +++ b/arch/arm/mach-s5p64x0/include/mach/regs-gpio.h | |||
@@ -15,48 +15,23 @@ | |||
15 | 15 | ||
16 | #include <mach/map.h> | 16 | #include <mach/map.h> |
17 | 17 | ||
18 | /* Will be implemented S5P6442 GPIOlib */ | ||
19 | |||
20 | /* Base addresses for each of the banks */ | 18 | /* Base addresses for each of the banks */ |
21 | 19 | ||
22 | #define S5P6440_GPA_BASE (S5P_VA_GPIO + 0x0000) | 20 | #define S5P64X0_GPA_BASE (S5P_VA_GPIO + 0x0000) |
23 | #define S5P6440_GPB_BASE (S5P_VA_GPIO + 0x0020) | 21 | #define S5P64X0_GPB_BASE (S5P_VA_GPIO + 0x0020) |
24 | #define S5P6440_GPC_BASE (S5P_VA_GPIO + 0x0040) | 22 | #define S5P64X0_GPC_BASE (S5P_VA_GPIO + 0x0040) |
25 | #define S5P6440_GPF_BASE (S5P_VA_GPIO + 0x00A0) | 23 | #define S5P64X0_GPF_BASE (S5P_VA_GPIO + 0x00A0) |
26 | #define S5P6440_GPG_BASE (S5P_VA_GPIO + 0x00C0) | 24 | #define S5P64X0_GPG_BASE (S5P_VA_GPIO + 0x00C0) |
27 | #define S5P6440_GPH_BASE (S5P_VA_GPIO + 0x00E0) | 25 | #define S5P64X0_GPH_BASE (S5P_VA_GPIO + 0x00E0) |
28 | #define S5P6440_GPI_BASE (S5P_VA_GPIO + 0x0100) | 26 | #define S5P64X0_GPI_BASE (S5P_VA_GPIO + 0x0100) |
29 | #define S5P6440_GPJ_BASE (S5P_VA_GPIO + 0x0120) | 27 | #define S5P64X0_GPJ_BASE (S5P_VA_GPIO + 0x0120) |
30 | #define S5P6440_GPN_BASE (S5P_VA_GPIO + 0x0830) | 28 | #define S5P64X0_GPN_BASE (S5P_VA_GPIO + 0x0830) |
31 | #define S5P6440_GPP_BASE (S5P_VA_GPIO + 0x0160) | 29 | #define S5P64X0_GPP_BASE (S5P_VA_GPIO + 0x0160) |
32 | #define S5P6440_GPR_BASE (S5P_VA_GPIO + 0x0290) | 30 | #define S5P64X0_GPR_BASE (S5P_VA_GPIO + 0x0290) |
33 | 31 | ||
34 | #define S5P6440_EINT0CON0 (S5P_VA_GPIO + 0x900) | 32 | #define S5P6450_GPD_BASE (S5P_VA_GPIO + 0x0060) |
35 | #define S5P6440_EINT0FLTCON0 (S5P_VA_GPIO + 0x910) | 33 | #define S5P6450_GPK_BASE (S5P_VA_GPIO + 0x0140) |
36 | #define S5P6440_EINT0FLTCON1 (S5P_VA_GPIO + 0x914) | 34 | #define S5P6450_GPQ_BASE (S5P_VA_GPIO + 0x0180) |
37 | #define S5P6440_EINT0MASK (S5P_VA_GPIO + 0x920) | 35 | #define S5P6450_GPS_BASE (S5P_VA_GPIO + 0x0300) |
38 | #define S5P6440_EINT0PEND (S5P_VA_GPIO + 0x924) | ||
39 | |||
40 | /* for LCD */ | ||
41 | |||
42 | #define S5P6440_SPCON_LCD_SEL_RGB (1 << 0) | ||
43 | #define S5P6440_SPCON_LCD_SEL_MASK (3 << 0) | ||
44 | |||
45 | /* | ||
46 | * These set of macros are not really useful for the | ||
47 | * GPF/GPI/GPJ/GPN/GPP, useful for others set of GPIO's (4 bit) | ||
48 | */ | ||
49 | |||
50 | #define S5P6440_GPIO_CONMASK(__gpio) (0xf << ((__gpio) * 4)) | ||
51 | #define S5P6440_GPIO_INPUT(__gpio) (0x0 << ((__gpio) * 4)) | ||
52 | #define S5P6440_GPIO_OUTPUT(__gpio) (0x1 << ((__gpio) * 4)) | ||
53 | |||
54 | /* | ||
55 | * Use these macros for GPF/GPI/GPJ/GPN/GPP set of GPIO (2 bit) | ||
56 | */ | ||
57 | |||
58 | #define S5P6440_GPIO2_CONMASK(__gpio) (0x3 << ((__gpio) * 2)) | ||
59 | #define S5P6440_GPIO2_INPUT(__gpio) (0x0 << ((__gpio) * 2)) | ||
60 | #define S5P6440_GPIO2_OUTPUT(__gpio) (0x1 << ((__gpio) * 2)) | ||
61 | 36 | ||
62 | #endif /* __ASM_ARCH_REGS_GPIO_H */ | 37 | #endif /* __ASM_ARCH_REGS_GPIO_H */ |
diff --git a/arch/arm/mach-s5p64x0/mach-smdk6440.c b/arch/arm/mach-s5p64x0/mach-smdk6440.c index 87c3f03c618..e5beb84e239 100644 --- a/arch/arm/mach-s5p64x0/mach-smdk6440.c +++ b/arch/arm/mach-s5p64x0/mach-smdk6440.c | |||
@@ -95,6 +95,7 @@ static struct platform_device *smdk6440_devices[] __initdata = { | |||
95 | &s3c_device_i2c1, | 95 | &s3c_device_i2c1, |
96 | &s3c_device_ts, | 96 | &s3c_device_ts, |
97 | &s3c_device_wdt, | 97 | &s3c_device_wdt, |
98 | &samsung_asoc_dma, | ||
98 | &s5p6440_device_iis, | 99 | &s5p6440_device_iis, |
99 | }; | 100 | }; |
100 | 101 | ||
@@ -117,6 +118,7 @@ static struct s3c2410_platform_i2c s5p6440_i2c1_data __initdata = { | |||
117 | 118 | ||
118 | static struct i2c_board_info smdk6440_i2c_devs0[] __initdata = { | 119 | static struct i2c_board_info smdk6440_i2c_devs0[] __initdata = { |
119 | { I2C_BOARD_INFO("24c08", 0x50), }, | 120 | { I2C_BOARD_INFO("24c08", 0x50), }, |
121 | { I2C_BOARD_INFO("wm8580", 0x1b), }, | ||
120 | }; | 122 | }; |
121 | 123 | ||
122 | static struct i2c_board_info smdk6440_i2c_devs1[] __initdata = { | 124 | static struct i2c_board_info smdk6440_i2c_devs1[] __initdata = { |
diff --git a/arch/arm/mach-s5p64x0/mach-smdk6450.c b/arch/arm/mach-s5p64x0/mach-smdk6450.c index d609f5af2b9..3a20de0a926 100644 --- a/arch/arm/mach-s5p64x0/mach-smdk6450.c +++ b/arch/arm/mach-s5p64x0/mach-smdk6450.c | |||
@@ -113,6 +113,7 @@ static struct platform_device *smdk6450_devices[] __initdata = { | |||
113 | &s3c_device_i2c1, | 113 | &s3c_device_i2c1, |
114 | &s3c_device_ts, | 114 | &s3c_device_ts, |
115 | &s3c_device_wdt, | 115 | &s3c_device_wdt, |
116 | &samsung_asoc_dma, | ||
116 | &s5p6450_device_iis0, | 117 | &s5p6450_device_iis0, |
117 | /* s5p6450_device_spi0 will be added */ | 118 | /* s5p6450_device_spi0 will be added */ |
118 | }; | 119 | }; |
@@ -135,6 +136,7 @@ static struct s3c2410_platform_i2c s5p6450_i2c1_data __initdata = { | |||
135 | }; | 136 | }; |
136 | 137 | ||
137 | static struct i2c_board_info smdk6450_i2c_devs0[] __initdata = { | 138 | static struct i2c_board_info smdk6450_i2c_devs0[] __initdata = { |
139 | { I2C_BOARD_INFO("wm8580", 0x1b), }, | ||
138 | { I2C_BOARD_INFO("24c08", 0x50), }, /* Samsung KS24C080C EEPROM */ | 140 | { I2C_BOARD_INFO("24c08", 0x50), }, /* Samsung KS24C080C EEPROM */ |
139 | }; | 141 | }; |
140 | 142 | ||
diff --git a/arch/arm/mach-s5pc100/clock.c b/arch/arm/mach-s5pc100/clock.c index 2d4a761a516..0305e9b8282 100644 --- a/arch/arm/mach-s5pc100/clock.c +++ b/arch/arm/mach-s5pc100/clock.c | |||
@@ -396,7 +396,7 @@ static int s5pc100_sclk1_ctrl(struct clk *clk, int enable) | |||
396 | * recommended to keep the following clocks disabled until the driver requests | 396 | * recommended to keep the following clocks disabled until the driver requests |
397 | * for enabling the clock. | 397 | * for enabling the clock. |
398 | */ | 398 | */ |
399 | static struct clk init_clocks_disable[] = { | 399 | static struct clk init_clocks_off[] = { |
400 | { | 400 | { |
401 | .name = "cssys", | 401 | .name = "cssys", |
402 | .id = -1, | 402 | .id = -1, |
@@ -1381,8 +1381,6 @@ static struct clk *clks[] __initdata = { | |||
1381 | 1381 | ||
1382 | void __init s5pc100_register_clocks(void) | 1382 | void __init s5pc100_register_clocks(void) |
1383 | { | 1383 | { |
1384 | struct clk *clkp; | ||
1385 | int ret; | ||
1386 | int ptr; | 1384 | int ptr; |
1387 | 1385 | ||
1388 | s3c24xx_register_clocks(clks, ARRAY_SIZE(clks)); | 1386 | s3c24xx_register_clocks(clks, ARRAY_SIZE(clks)); |
@@ -1393,16 +1391,8 @@ void __init s5pc100_register_clocks(void) | |||
1393 | s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); | 1391 | s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); |
1394 | s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); | 1392 | s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); |
1395 | 1393 | ||
1396 | clkp = init_clocks_disable; | 1394 | s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); |
1397 | for (ptr = 0; ptr < ARRAY_SIZE(init_clocks_disable); ptr++, clkp++) { | 1395 | s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); |
1398 | |||
1399 | ret = s3c24xx_register_clock(clkp); | ||
1400 | if (ret < 0) { | ||
1401 | printk(KERN_ERR "Failed to register clock %s (%d)\n", | ||
1402 | clkp->name, ret); | ||
1403 | } | ||
1404 | (clkp->enable)(clkp, 0); | ||
1405 | } | ||
1406 | 1396 | ||
1407 | s3c_pwmclk_init(); | 1397 | s3c_pwmclk_init(); |
1408 | } | 1398 | } |
diff --git a/arch/arm/mach-s5pc100/include/mach/map.h b/arch/arm/mach-s5pc100/include/mach/map.h index 32e9cab5c86..328467b346a 100644 --- a/arch/arm/mach-s5pc100/include/mach/map.h +++ b/arch/arm/mach-s5pc100/include/mach/map.h | |||
@@ -55,6 +55,8 @@ | |||
55 | #define S5PC100_VA_VIC_OFFSET 0x10000 | 55 | #define S5PC100_VA_VIC_OFFSET 0x10000 |
56 | #define S5PC1XX_VA_VIC(x) (S5PC100_VA_VIC + ((x) * S5PC100_VA_VIC_OFFSET)) | 56 | #define S5PC1XX_VA_VIC(x) (S5PC100_VA_VIC + ((x) * S5PC100_VA_VIC_OFFSET)) |
57 | 57 | ||
58 | #define S5PC100_PA_SROMC (0xE7000000) | ||
59 | #define S5P_PA_SROMC S5PC100_PA_SROMC | ||
58 | 60 | ||
59 | #define S5PC100_PA_ONENAND (0xE7100000) | 61 | #define S5PC100_PA_ONENAND (0xE7100000) |
60 | 62 | ||
diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig index 862f239a0fd..53aabef1e9c 100644 --- a/arch/arm/mach-s5pv210/Kconfig +++ b/arch/arm/mach-s5pv210/Kconfig | |||
@@ -118,6 +118,7 @@ menu "S5PV210 Machines" | |||
118 | config MACH_SMDKV210 | 118 | config MACH_SMDKV210 |
119 | bool "SMDKV210" | 119 | bool "SMDKV210" |
120 | select CPU_S5PV210 | 120 | select CPU_S5PV210 |
121 | select S3C_DEV_FB | ||
121 | select S3C_DEV_HSMMC | 122 | select S3C_DEV_HSMMC |
122 | select S3C_DEV_HSMMC1 | 123 | select S3C_DEV_HSMMC1 |
123 | select S3C_DEV_HSMMC2 | 124 | select S3C_DEV_HSMMC2 |
@@ -130,6 +131,7 @@ config MACH_SMDKV210 | |||
130 | select SAMSUNG_DEV_IDE | 131 | select SAMSUNG_DEV_IDE |
131 | select SAMSUNG_DEV_KEYPAD | 132 | select SAMSUNG_DEV_KEYPAD |
132 | select SAMSUNG_DEV_TS | 133 | select SAMSUNG_DEV_TS |
134 | select S5PV210_SETUP_FB_24BPP | ||
133 | select S5PV210_SETUP_I2C1 | 135 | select S5PV210_SETUP_I2C1 |
134 | select S5PV210_SETUP_I2C2 | 136 | select S5PV210_SETUP_I2C2 |
135 | select S5PV210_SETUP_IDE | 137 | select S5PV210_SETUP_IDE |
diff --git a/arch/arm/mach-s5pv210/clock.c b/arch/arm/mach-s5pv210/clock.c index b774ff1805d..2d599499cef 100644 --- a/arch/arm/mach-s5pv210/clock.c +++ b/arch/arm/mach-s5pv210/clock.c | |||
@@ -309,7 +309,7 @@ static struct clk_ops clk_fout_apll_ops = { | |||
309 | .get_rate = s5pv210_clk_fout_apll_get_rate, | 309 | .get_rate = s5pv210_clk_fout_apll_get_rate, |
310 | }; | 310 | }; |
311 | 311 | ||
312 | static struct clk init_clocks_disable[] = { | 312 | static struct clk init_clocks_off[] = { |
313 | { | 313 | { |
314 | .name = "pdma", | 314 | .name = "pdma", |
315 | .id = 0, | 315 | .id = 0, |
@@ -525,6 +525,12 @@ static struct clk init_clocks[] = { | |||
525 | .parent = &clk_pclk_psys.clk, | 525 | .parent = &clk_pclk_psys.clk, |
526 | .enable = s5pv210_clk_ip3_ctrl, | 526 | .enable = s5pv210_clk_ip3_ctrl, |
527 | .ctrlbit = (1 << 20), | 527 | .ctrlbit = (1 << 20), |
528 | }, { | ||
529 | .name = "sromc", | ||
530 | .id = -1, | ||
531 | .parent = &clk_hclk_psys.clk, | ||
532 | .enable = s5pv210_clk_ip1_ctrl, | ||
533 | .ctrlbit = (1 << 26), | ||
528 | }, | 534 | }, |
529 | }; | 535 | }; |
530 | 536 | ||
@@ -1220,13 +1226,9 @@ static struct clk *clks[] __initdata = { | |||
1220 | 1226 | ||
1221 | void __init s5pv210_register_clocks(void) | 1227 | void __init s5pv210_register_clocks(void) |
1222 | { | 1228 | { |
1223 | struct clk *clkp; | ||
1224 | int ret; | ||
1225 | int ptr; | 1229 | int ptr; |
1226 | 1230 | ||
1227 | ret = s3c24xx_register_clocks(clks, ARRAY_SIZE(clks)); | 1231 | s3c24xx_register_clocks(clks, ARRAY_SIZE(clks)); |
1228 | if (ret > 0) | ||
1229 | printk(KERN_ERR "Failed to register %u clocks\n", ret); | ||
1230 | 1232 | ||
1231 | for (ptr = 0; ptr < ARRAY_SIZE(sysclks); ptr++) | 1233 | for (ptr = 0; ptr < ARRAY_SIZE(sysclks); ptr++) |
1232 | s3c_register_clksrc(sysclks[ptr], 1); | 1234 | s3c_register_clksrc(sysclks[ptr], 1); |
@@ -1234,15 +1236,8 @@ void __init s5pv210_register_clocks(void) | |||
1234 | s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); | 1236 | s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); |
1235 | s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); | 1237 | s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); |
1236 | 1238 | ||
1237 | clkp = init_clocks_disable; | 1239 | s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); |
1238 | for (ptr = 0; ptr < ARRAY_SIZE(init_clocks_disable); ptr++, clkp++) { | 1240 | s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); |
1239 | ret = s3c24xx_register_clock(clkp); | ||
1240 | if (ret < 0) { | ||
1241 | printk(KERN_ERR "Failed to register clock %s (%d)\n", | ||
1242 | clkp->name, ret); | ||
1243 | } | ||
1244 | (clkp->enable)(clkp, 0); | ||
1245 | } | ||
1246 | 1241 | ||
1247 | s3c_pwmclk_init(); | 1242 | s3c_pwmclk_init(); |
1248 | } | 1243 | } |
diff --git a/arch/arm/mach-s5pv210/cpu.c b/arch/arm/mach-s5pv210/cpu.c index 8eb480e201b..61e6c24b90a 100644 --- a/arch/arm/mach-s5pv210/cpu.c +++ b/arch/arm/mach-s5pv210/cpu.c | |||
@@ -81,11 +81,6 @@ static struct map_desc s5pv210_iodesc[] __initdata = { | |||
81 | .length = SZ_512K, | 81 | .length = SZ_512K, |
82 | .type = MT_DEVICE, | 82 | .type = MT_DEVICE, |
83 | }, { | 83 | }, { |
84 | .virtual = (unsigned long)S5P_VA_SROMC, | ||
85 | .pfn = __phys_to_pfn(S5PV210_PA_SROMC), | ||
86 | .length = SZ_4K, | ||
87 | .type = MT_DEVICE, | ||
88 | }, { | ||
89 | .virtual = (unsigned long)S5P_VA_DMC0, | 84 | .virtual = (unsigned long)S5P_VA_DMC0, |
90 | .pfn = __phys_to_pfn(S5PV210_PA_DMC0), | 85 | .pfn = __phys_to_pfn(S5PV210_PA_DMC0), |
91 | .length = SZ_4K, | 86 | .length = SZ_4K, |
diff --git a/arch/arm/mach-s5pv210/include/mach/irqs.h b/arch/arm/mach-s5pv210/include/mach/irqs.h index 119b95fdc3c..26710b35ef8 100644 --- a/arch/arm/mach-s5pv210/include/mach/irqs.h +++ b/arch/arm/mach-s5pv210/include/mach/irqs.h | |||
@@ -65,7 +65,7 @@ | |||
65 | #define IRQ_HSMMC0 S5P_IRQ_VIC1(26) | 65 | #define IRQ_HSMMC0 S5P_IRQ_VIC1(26) |
66 | #define IRQ_HSMMC1 S5P_IRQ_VIC1(27) | 66 | #define IRQ_HSMMC1 S5P_IRQ_VIC1(27) |
67 | #define IRQ_HSMMC2 S5P_IRQ_VIC1(28) | 67 | #define IRQ_HSMMC2 S5P_IRQ_VIC1(28) |
68 | #define IRQ_MIPICSI S5P_IRQ_VIC1(29) | 68 | #define IRQ_MIPI_CSIS S5P_IRQ_VIC1(29) |
69 | #define IRQ_MIPIDSI S5P_IRQ_VIC1(30) | 69 | #define IRQ_MIPIDSI S5P_IRQ_VIC1(30) |
70 | #define IRQ_ONENAND_AUDI S5P_IRQ_VIC1(31) | 70 | #define IRQ_ONENAND_AUDI S5P_IRQ_VIC1(31) |
71 | 71 | ||
@@ -132,5 +132,6 @@ | |||
132 | #define IRQ_LCD_FIFO IRQ_LCD0 | 132 | #define IRQ_LCD_FIFO IRQ_LCD0 |
133 | #define IRQ_LCD_VSYNC IRQ_LCD1 | 133 | #define IRQ_LCD_VSYNC IRQ_LCD1 |
134 | #define IRQ_LCD_SYSTEM IRQ_LCD2 | 134 | #define IRQ_LCD_SYSTEM IRQ_LCD2 |
135 | #define IRQ_MIPI_CSIS0 IRQ_MIPI_CSIS | ||
135 | 136 | ||
136 | #endif /* ASM_ARCH_IRQS_H */ | 137 | #endif /* ASM_ARCH_IRQS_H */ |
diff --git a/arch/arm/mach-s5pv210/include/mach/map.h b/arch/arm/mach-s5pv210/include/mach/map.h index 861d7fe11fc..3611492ad68 100644 --- a/arch/arm/mach-s5pv210/include/mach/map.h +++ b/arch/arm/mach-s5pv210/include/mach/map.h | |||
@@ -16,6 +16,8 @@ | |||
16 | #include <plat/map-base.h> | 16 | #include <plat/map-base.h> |
17 | #include <plat/map-s5p.h> | 17 | #include <plat/map-s5p.h> |
18 | 18 | ||
19 | #define S5PV210_PA_SROM_BANK5 (0xA8000000) | ||
20 | |||
19 | #define S5PC110_PA_ONENAND (0xB0000000) | 21 | #define S5PC110_PA_ONENAND (0xB0000000) |
20 | #define S5P_PA_ONENAND S5PC110_PA_ONENAND | 22 | #define S5P_PA_ONENAND S5PC110_PA_ONENAND |
21 | 23 | ||
@@ -60,6 +62,7 @@ | |||
60 | #define S3C_VA_UARTx(x) (S3C_VA_UART + ((x) * S3C_UART_OFFSET)) | 62 | #define S3C_VA_UARTx(x) (S3C_VA_UART + ((x) * S3C_UART_OFFSET)) |
61 | 63 | ||
62 | #define S5PV210_PA_SROMC (0xE8000000) | 64 | #define S5PV210_PA_SROMC (0xE8000000) |
65 | #define S5P_PA_SROMC S5PV210_PA_SROMC | ||
63 | 66 | ||
64 | #define S5PV210_PA_CFCON (0xE8200000) | 67 | #define S5PV210_PA_CFCON (0xE8200000) |
65 | 68 | ||
@@ -107,6 +110,8 @@ | |||
107 | #define S5PV210_PA_DMC0 (0xF0000000) | 110 | #define S5PV210_PA_DMC0 (0xF0000000) |
108 | #define S5PV210_PA_DMC1 (0xF1400000) | 111 | #define S5PV210_PA_DMC1 (0xF1400000) |
109 | 112 | ||
113 | #define S5PV210_PA_MIPI_CSIS 0xFA600000 | ||
114 | |||
110 | /* compatibiltiy defines. */ | 115 | /* compatibiltiy defines. */ |
111 | #define S3C_PA_UART S5PV210_PA_UART | 116 | #define S3C_PA_UART S5PV210_PA_UART |
112 | #define S3C_PA_HSMMC0 S5PV210_PA_HSMMC(0) | 117 | #define S3C_PA_HSMMC0 S5PV210_PA_HSMMC(0) |
@@ -123,6 +128,7 @@ | |||
123 | #define S5P_PA_FIMC0 S5PV210_PA_FIMC0 | 128 | #define S5P_PA_FIMC0 S5PV210_PA_FIMC0 |
124 | #define S5P_PA_FIMC1 S5PV210_PA_FIMC1 | 129 | #define S5P_PA_FIMC1 S5PV210_PA_FIMC1 |
125 | #define S5P_PA_FIMC2 S5PV210_PA_FIMC2 | 130 | #define S5P_PA_FIMC2 S5PV210_PA_FIMC2 |
131 | #define S5P_PA_MIPI_CSIS0 S5PV210_PA_MIPI_CSIS | ||
126 | 132 | ||
127 | #define SAMSUNG_PA_ADC S5PV210_PA_ADC | 133 | #define SAMSUNG_PA_ADC S5PV210_PA_ADC |
128 | #define SAMSUNG_PA_CFCON S5PV210_PA_CFCON | 134 | #define SAMSUNG_PA_CFCON S5PV210_PA_CFCON |
diff --git a/arch/arm/mach-s5pv210/include/mach/regs-clock.h b/arch/arm/mach-s5pv210/include/mach/regs-clock.h index ebaabe021af..4c45b74def5 100644 --- a/arch/arm/mach-s5pv210/include/mach/regs-clock.h +++ b/arch/arm/mach-s5pv210/include/mach/regs-clock.h | |||
@@ -161,7 +161,7 @@ | |||
161 | #define S5P_MDNIE_SEL S5P_CLKREG(0x7008) | 161 | #define S5P_MDNIE_SEL S5P_CLKREG(0x7008) |
162 | #define S5P_MIPI_PHY_CON0 S5P_CLKREG(0x7200) | 162 | #define S5P_MIPI_PHY_CON0 S5P_CLKREG(0x7200) |
163 | #define S5P_MIPI_PHY_CON1 S5P_CLKREG(0x7204) | 163 | #define S5P_MIPI_PHY_CON1 S5P_CLKREG(0x7204) |
164 | #define S5P_MIPI_CONTROL S5P_CLKREG(0xE814) | 164 | #define S5P_MIPI_DPHY_CONTROL S5P_CLKREG(0xE814) |
165 | 165 | ||
166 | #define S5P_IDLE_CFG_TL_MASK (3 << 30) | 166 | #define S5P_IDLE_CFG_TL_MASK (3 << 30) |
167 | #define S5P_IDLE_CFG_TM_MASK (3 << 28) | 167 | #define S5P_IDLE_CFG_TM_MASK (3 << 28) |
@@ -195,9 +195,6 @@ | |||
195 | #define S5P_OTHERS_RET_UART (1 << 28) | 195 | #define S5P_OTHERS_RET_UART (1 << 28) |
196 | #define S5P_OTHERS_USB_SIG_MASK (1 << 16) | 196 | #define S5P_OTHERS_USB_SIG_MASK (1 << 16) |
197 | 197 | ||
198 | /* MIPI */ | ||
199 | #define S5P_MIPI_DPHY_EN (3) | ||
200 | |||
201 | /* S5P_DAC_CONTROL */ | 198 | /* S5P_DAC_CONTROL */ |
202 | #define S5P_DAC_ENABLE (1) | 199 | #define S5P_DAC_ENABLE (1) |
203 | #define S5P_DAC_DISABLE (0) | 200 | #define S5P_DAC_DISABLE (0) |
diff --git a/arch/arm/mach-s5pv210/mach-smdkc110.c b/arch/arm/mach-s5pv210/mach-smdkc110.c index 5dd1681c069..ce11a02eabf 100644 --- a/arch/arm/mach-s5pv210/mach-smdkc110.c +++ b/arch/arm/mach-s5pv210/mach-smdkc110.c | |||
@@ -81,6 +81,7 @@ static struct s3c_ide_platdata smdkc110_ide_pdata __initdata = { | |||
81 | }; | 81 | }; |
82 | 82 | ||
83 | static struct platform_device *smdkc110_devices[] __initdata = { | 83 | static struct platform_device *smdkc110_devices[] __initdata = { |
84 | &samsung_asoc_dma, | ||
84 | &s5pv210_device_iis0, | 85 | &s5pv210_device_iis0, |
85 | &s5pv210_device_ac97, | 86 | &s5pv210_device_ac97, |
86 | &s5pv210_device_spdif, | 87 | &s5pv210_device_spdif, |
@@ -94,6 +95,7 @@ static struct platform_device *smdkc110_devices[] __initdata = { | |||
94 | 95 | ||
95 | static struct i2c_board_info smdkc110_i2c_devs0[] __initdata = { | 96 | static struct i2c_board_info smdkc110_i2c_devs0[] __initdata = { |
96 | { I2C_BOARD_INFO("24c08", 0x50), }, /* Samsung S524AD0XD1 */ | 97 | { I2C_BOARD_INFO("24c08", 0x50), }, /* Samsung S524AD0XD1 */ |
98 | { I2C_BOARD_INFO("wm8580", 0x1b), }, | ||
97 | }; | 99 | }; |
98 | 100 | ||
99 | static struct i2c_board_info smdkc110_i2c_devs1[] __initdata = { | 101 | static struct i2c_board_info smdkc110_i2c_devs1[] __initdata = { |
diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c b/arch/arm/mach-s5pv210/mach-smdkv210.c index 1fbc45b2a43..bc9fdb52a02 100644 --- a/arch/arm/mach-s5pv210/mach-smdkv210.c +++ b/arch/arm/mach-s5pv210/mach-smdkv210.c | |||
@@ -14,16 +14,25 @@ | |||
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/serial_core.h> | 15 | #include <linux/serial_core.h> |
16 | #include <linux/sysdev.h> | 16 | #include <linux/sysdev.h> |
17 | #include <linux/dm9000.h> | ||
18 | #include <linux/fb.h> | ||
19 | #include <linux/gpio.h> | ||
20 | #include <linux/delay.h> | ||
17 | 21 | ||
18 | #include <asm/mach/arch.h> | 22 | #include <asm/mach/arch.h> |
19 | #include <asm/mach/map.h> | 23 | #include <asm/mach/map.h> |
20 | #include <asm/setup.h> | 24 | #include <asm/setup.h> |
21 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
22 | 26 | ||
27 | #include <video/platform_lcd.h> | ||
28 | |||
23 | #include <mach/map.h> | 29 | #include <mach/map.h> |
24 | #include <mach/regs-clock.h> | 30 | #include <mach/regs-clock.h> |
31 | #include <mach/regs-fb.h> | ||
25 | 32 | ||
26 | #include <plat/regs-serial.h> | 33 | #include <plat/regs-serial.h> |
34 | #include <plat/regs-srom.h> | ||
35 | #include <plat/gpio-cfg.h> | ||
27 | #include <plat/s5pv210.h> | 36 | #include <plat/s5pv210.h> |
28 | #include <plat/devs.h> | 37 | #include <plat/devs.h> |
29 | #include <plat/cpu.h> | 38 | #include <plat/cpu.h> |
@@ -33,6 +42,7 @@ | |||
33 | #include <plat/iic.h> | 42 | #include <plat/iic.h> |
34 | #include <plat/keypad.h> | 43 | #include <plat/keypad.h> |
35 | #include <plat/pm.h> | 44 | #include <plat/pm.h> |
45 | #include <plat/fb.h> | ||
36 | 46 | ||
37 | /* Following are default values for UCON, ULCON and UFCON UART registers */ | 47 | /* Following are default values for UCON, ULCON and UFCON UART registers */ |
38 | #define SMDKV210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | 48 | #define SMDKV210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ |
@@ -102,12 +112,106 @@ static struct samsung_keypad_platdata smdkv210_keypad_data __initdata = { | |||
102 | .cols = 8, | 112 | .cols = 8, |
103 | }; | 113 | }; |
104 | 114 | ||
115 | static struct resource smdkv210_dm9000_resources[] = { | ||
116 | [0] = { | ||
117 | .start = S5PV210_PA_SROM_BANK5, | ||
118 | .end = S5PV210_PA_SROM_BANK5, | ||
119 | .flags = IORESOURCE_MEM, | ||
120 | }, | ||
121 | [1] = { | ||
122 | .start = S5PV210_PA_SROM_BANK5 + 2, | ||
123 | .end = S5PV210_PA_SROM_BANK5 + 2, | ||
124 | .flags = IORESOURCE_MEM, | ||
125 | }, | ||
126 | [2] = { | ||
127 | .start = IRQ_EINT(9), | ||
128 | .end = IRQ_EINT(9), | ||
129 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | ||
130 | }, | ||
131 | }; | ||
132 | |||
133 | static struct dm9000_plat_data smdkv210_dm9000_platdata = { | ||
134 | .flags = DM9000_PLATF_16BITONLY | DM9000_PLATF_NO_EEPROM, | ||
135 | .dev_addr = { 0x00, 0x09, 0xc0, 0xff, 0xec, 0x48 }, | ||
136 | }; | ||
137 | |||
138 | struct platform_device smdkv210_dm9000 = { | ||
139 | .name = "dm9000", | ||
140 | .id = -1, | ||
141 | .num_resources = ARRAY_SIZE(smdkv210_dm9000_resources), | ||
142 | .resource = smdkv210_dm9000_resources, | ||
143 | .dev = { | ||
144 | .platform_data = &smdkv210_dm9000_platdata, | ||
145 | }, | ||
146 | }; | ||
147 | |||
148 | static void smdkv210_lte480wv_set_power(struct plat_lcd_data *pd, | ||
149 | unsigned int power) | ||
150 | { | ||
151 | if (power) { | ||
152 | #if !defined(CONFIG_BACKLIGHT_PWM) | ||
153 | gpio_request(S5PV210_GPD0(3), "GPD0"); | ||
154 | gpio_direction_output(S5PV210_GPD0(3), 1); | ||
155 | gpio_free(S5PV210_GPD0(3)); | ||
156 | #endif | ||
157 | |||
158 | /* fire nRESET on power up */ | ||
159 | gpio_request(S5PV210_GPH0(6), "GPH0"); | ||
160 | |||
161 | gpio_direction_output(S5PV210_GPH0(6), 1); | ||
162 | |||
163 | gpio_set_value(S5PV210_GPH0(6), 0); | ||
164 | mdelay(10); | ||
165 | |||
166 | gpio_set_value(S5PV210_GPH0(6), 1); | ||
167 | mdelay(10); | ||
168 | |||
169 | gpio_free(S5PV210_GPH0(6)); | ||
170 | } else { | ||
171 | #if !defined(CONFIG_BACKLIGHT_PWM) | ||
172 | gpio_request(S5PV210_GPD0(3), "GPD0"); | ||
173 | gpio_direction_output(S5PV210_GPD0(3), 0); | ||
174 | gpio_free(S5PV210_GPD0(3)); | ||
175 | #endif | ||
176 | } | ||
177 | } | ||
178 | |||
179 | static struct plat_lcd_data smdkv210_lcd_lte480wv_data = { | ||
180 | .set_power = smdkv210_lte480wv_set_power, | ||
181 | }; | ||
182 | |||
183 | static struct platform_device smdkv210_lcd_lte480wv = { | ||
184 | .name = "platform-lcd", | ||
185 | .dev.parent = &s3c_device_fb.dev, | ||
186 | .dev.platform_data = &smdkv210_lcd_lte480wv_data, | ||
187 | }; | ||
188 | |||
189 | static struct s3c_fb_pd_win smdkv210_fb_win0 = { | ||
190 | .win_mode = { | ||
191 | .left_margin = 13, | ||
192 | .right_margin = 8, | ||
193 | .upper_margin = 7, | ||
194 | .lower_margin = 5, | ||
195 | .hsync_len = 3, | ||
196 | .vsync_len = 1, | ||
197 | .xres = 800, | ||
198 | .yres = 480, | ||
199 | }, | ||
200 | .max_bpp = 32, | ||
201 | .default_bpp = 24, | ||
202 | }; | ||
203 | |||
204 | static struct s3c_fb_platdata smdkv210_lcd0_pdata __initdata = { | ||
205 | .win[0] = &smdkv210_fb_win0, | ||
206 | .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB, | ||
207 | .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, | ||
208 | .setup_gpio = s5pv210_fb_gpio_setup_24bpp, | ||
209 | }; | ||
210 | |||
105 | static struct platform_device *smdkv210_devices[] __initdata = { | 211 | static struct platform_device *smdkv210_devices[] __initdata = { |
106 | &s5pv210_device_iis0, | ||
107 | &s5pv210_device_ac97, | ||
108 | &s5pv210_device_spdif, | ||
109 | &s3c_device_adc, | 212 | &s3c_device_adc, |
110 | &s3c_device_cfcon, | 213 | &s3c_device_cfcon, |
214 | &s3c_device_fb, | ||
111 | &s3c_device_hsmmc0, | 215 | &s3c_device_hsmmc0, |
112 | &s3c_device_hsmmc1, | 216 | &s3c_device_hsmmc1, |
113 | &s3c_device_hsmmc2, | 217 | &s3c_device_hsmmc2, |
@@ -115,14 +219,38 @@ static struct platform_device *smdkv210_devices[] __initdata = { | |||
115 | &s3c_device_i2c0, | 219 | &s3c_device_i2c0, |
116 | &s3c_device_i2c1, | 220 | &s3c_device_i2c1, |
117 | &s3c_device_i2c2, | 221 | &s3c_device_i2c2, |
118 | &samsung_device_keypad, | ||
119 | &s3c_device_rtc, | 222 | &s3c_device_rtc, |
120 | &s3c_device_ts, | 223 | &s3c_device_ts, |
121 | &s3c_device_wdt, | 224 | &s3c_device_wdt, |
225 | &s5pv210_device_ac97, | ||
226 | &s5pv210_device_iis0, | ||
227 | &s5pv210_device_spdif, | ||
228 | &samsung_asoc_dma, | ||
229 | &samsung_device_keypad, | ||
230 | &smdkv210_dm9000, | ||
231 | &smdkv210_lcd_lte480wv, | ||
122 | }; | 232 | }; |
123 | 233 | ||
234 | static void __init smdkv210_dm9000_init(void) | ||
235 | { | ||
236 | unsigned int tmp; | ||
237 | |||
238 | gpio_request(S5PV210_MP01(5), "nCS5"); | ||
239 | s3c_gpio_cfgpin(S5PV210_MP01(5), S3C_GPIO_SFN(2)); | ||
240 | gpio_free(S5PV210_MP01(5)); | ||
241 | |||
242 | tmp = (5 << S5P_SROM_BCX__TACC__SHIFT); | ||
243 | __raw_writel(tmp, S5P_SROM_BC5); | ||
244 | |||
245 | tmp = __raw_readl(S5P_SROM_BW); | ||
246 | tmp &= (S5P_SROM_BW__CS_MASK << S5P_SROM_BW__NCS5__SHIFT); | ||
247 | tmp |= (1 << S5P_SROM_BW__NCS5__SHIFT); | ||
248 | __raw_writel(tmp, S5P_SROM_BW); | ||
249 | } | ||
250 | |||
124 | static struct i2c_board_info smdkv210_i2c_devs0[] __initdata = { | 251 | static struct i2c_board_info smdkv210_i2c_devs0[] __initdata = { |
125 | { I2C_BOARD_INFO("24c08", 0x50), }, /* Samsung S524AD0XD1 */ | 252 | { I2C_BOARD_INFO("24c08", 0x50), }, /* Samsung S524AD0XD1 */ |
253 | { I2C_BOARD_INFO("wm8580", 0x1b), }, | ||
126 | }; | 254 | }; |
127 | 255 | ||
128 | static struct i2c_board_info smdkv210_i2c_devs1[] __initdata = { | 256 | static struct i2c_board_info smdkv210_i2c_devs1[] __initdata = { |
@@ -150,6 +278,8 @@ static void __init smdkv210_machine_init(void) | |||
150 | { | 278 | { |
151 | s3c_pm_init(); | 279 | s3c_pm_init(); |
152 | 280 | ||
281 | smdkv210_dm9000_init(); | ||
282 | |||
153 | samsung_keypad_set_platdata(&smdkv210_keypad_data); | 283 | samsung_keypad_set_platdata(&smdkv210_keypad_data); |
154 | s3c24xx_ts_set_platdata(&s3c_ts_platform); | 284 | s3c24xx_ts_set_platdata(&s3c_ts_platform); |
155 | 285 | ||
@@ -165,6 +295,8 @@ static void __init smdkv210_machine_init(void) | |||
165 | 295 | ||
166 | s3c_ide_set_platdata(&smdkv210_ide_pdata); | 296 | s3c_ide_set_platdata(&smdkv210_ide_pdata); |
167 | 297 | ||
298 | s3c_fb_set_platdata(&smdkv210_lcd0_pdata); | ||
299 | |||
168 | platform_add_devices(smdkv210_devices, ARRAY_SIZE(smdkv210_devices)); | 300 | platform_add_devices(smdkv210_devices, ARRAY_SIZE(smdkv210_devices)); |
169 | } | 301 | } |
170 | 302 | ||
diff --git a/arch/arm/mach-s5pv310/Kconfig b/arch/arm/mach-s5pv310/Kconfig index d64efe0d4c9..b2a9acc5185 100644 --- a/arch/arm/mach-s5pv310/Kconfig +++ b/arch/arm/mach-s5pv310/Kconfig | |||
@@ -15,6 +15,11 @@ config CPU_S5PV310 | |||
15 | help | 15 | help |
16 | Enable S5PV310 CPU support | 16 | Enable S5PV310 CPU support |
17 | 17 | ||
18 | config S5PV310_DEV_PD | ||
19 | bool | ||
20 | help | ||
21 | Compile in platform device definitions for Power Domain | ||
22 | |||
18 | config S5PV310_SETUP_I2C1 | 23 | config S5PV310_SETUP_I2C1 |
19 | bool | 24 | bool |
20 | help | 25 | help |
@@ -61,6 +66,11 @@ config S5PV310_SETUP_SDHCI_GPIO | |||
61 | help | 66 | help |
62 | Common setup code for SDHCI gpio. | 67 | Common setup code for SDHCI gpio. |
63 | 68 | ||
69 | config S5PV310_DEV_SYSMMU | ||
70 | bool | ||
71 | help | ||
72 | Common setup code for SYSTEM MMU in S5PV310 | ||
73 | |||
64 | # machine support | 74 | # machine support |
65 | 75 | ||
66 | menu "S5PC210 Machines" | 76 | menu "S5PC210 Machines" |
@@ -70,11 +80,15 @@ config MACH_SMDKC210 | |||
70 | select CPU_S5PV310 | 80 | select CPU_S5PV310 |
71 | select S3C_DEV_RTC | 81 | select S3C_DEV_RTC |
72 | select S3C_DEV_WDT | 82 | select S3C_DEV_WDT |
83 | select S3C_DEV_I2C1 | ||
73 | select S3C_DEV_HSMMC | 84 | select S3C_DEV_HSMMC |
74 | select S3C_DEV_HSMMC1 | 85 | select S3C_DEV_HSMMC1 |
75 | select S3C_DEV_HSMMC2 | 86 | select S3C_DEV_HSMMC2 |
76 | select S3C_DEV_HSMMC3 | 87 | select S3C_DEV_HSMMC3 |
88 | select S5PV310_DEV_PD | ||
89 | select S5PV310_SETUP_I2C1 | ||
77 | select S5PV310_SETUP_SDHCI | 90 | select S5PV310_SETUP_SDHCI |
91 | select S5PV310_DEV_SYSMMU | ||
78 | help | 92 | help |
79 | Machine support for Samsung SMDKC210 | 93 | Machine support for Samsung SMDKC210 |
80 | S5PC210(MCP) is one of package option of S5PV310 | 94 | S5PC210(MCP) is one of package option of S5PV310 |
@@ -83,6 +97,10 @@ config MACH_UNIVERSAL_C210 | |||
83 | bool "Mobile UNIVERSAL_C210 Board" | 97 | bool "Mobile UNIVERSAL_C210 Board" |
84 | select CPU_S5PV310 | 98 | select CPU_S5PV310 |
85 | select S5P_DEV_ONENAND | 99 | select S5P_DEV_ONENAND |
100 | select S3C_DEV_HSMMC | ||
101 | select S3C_DEV_HSMMC2 | ||
102 | select S3C_DEV_HSMMC3 | ||
103 | select S5PV310_SETUP_SDHCI | ||
86 | select S3C_DEV_I2C1 | 104 | select S3C_DEV_I2C1 |
87 | select S5PV310_SETUP_I2C1 | 105 | select S5PV310_SETUP_I2C1 |
88 | help | 106 | help |
@@ -98,10 +116,14 @@ config MACH_SMDKV310 | |||
98 | select CPU_S5PV310 | 116 | select CPU_S5PV310 |
99 | select S3C_DEV_RTC | 117 | select S3C_DEV_RTC |
100 | select S3C_DEV_WDT | 118 | select S3C_DEV_WDT |
119 | select S3C_DEV_I2C1 | ||
101 | select S3C_DEV_HSMMC | 120 | select S3C_DEV_HSMMC |
102 | select S3C_DEV_HSMMC1 | 121 | select S3C_DEV_HSMMC1 |
103 | select S3C_DEV_HSMMC2 | 122 | select S3C_DEV_HSMMC2 |
104 | select S3C_DEV_HSMMC3 | 123 | select S3C_DEV_HSMMC3 |
124 | select S5PV310_DEV_PD | ||
125 | select S5PV310_DEV_SYSMMU | ||
126 | select S5PV310_SETUP_I2C1 | ||
105 | select S5PV310_SETUP_SDHCI | 127 | select S5PV310_SETUP_SDHCI |
106 | help | 128 | help |
107 | Machine support for Samsung SMDKV310 | 129 | Machine support for Samsung SMDKV310 |
diff --git a/arch/arm/mach-s5pv310/Makefile b/arch/arm/mach-s5pv310/Makefile index 61e3cb65426..036fb383b83 100644 --- a/arch/arm/mach-s5pv310/Makefile +++ b/arch/arm/mach-s5pv310/Makefile | |||
@@ -14,6 +14,7 @@ obj- := | |||
14 | 14 | ||
15 | obj-$(CONFIG_CPU_S5PV310) += cpu.o init.o clock.o irq-combiner.o | 15 | obj-$(CONFIG_CPU_S5PV310) += cpu.o init.o clock.o irq-combiner.o |
16 | obj-$(CONFIG_CPU_S5PV310) += setup-i2c0.o time.o gpiolib.o irq-eint.o dma.o | 16 | obj-$(CONFIG_CPU_S5PV310) += setup-i2c0.o time.o gpiolib.o irq-eint.o dma.o |
17 | obj-$(CONFIG_CPU_FREQ) += cpufreq.o | ||
17 | 18 | ||
18 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o | 19 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o |
19 | obj-$(CONFIG_LOCAL_TIMERS) += localtimer.o | 20 | obj-$(CONFIG_LOCAL_TIMERS) += localtimer.o |
@@ -27,7 +28,10 @@ obj-$(CONFIG_MACH_UNIVERSAL_C210) += mach-universal_c210.o | |||
27 | 28 | ||
28 | # device support | 29 | # device support |
29 | 30 | ||
30 | obj-y += dev-audio.o | 31 | obj-y += dev-audio.o |
32 | obj-$(CONFIG_S5PV310_DEV_PD) += dev-pd.o | ||
33 | obj-$(CONFIG_S5PV310_DEV_SYSMMU) += dev-sysmmu.o | ||
34 | |||
31 | obj-$(CONFIG_S5PV310_SETUP_I2C1) += setup-i2c1.o | 35 | obj-$(CONFIG_S5PV310_SETUP_I2C1) += setup-i2c1.o |
32 | obj-$(CONFIG_S5PV310_SETUP_I2C2) += setup-i2c2.o | 36 | obj-$(CONFIG_S5PV310_SETUP_I2C2) += setup-i2c2.o |
33 | obj-$(CONFIG_S5PV310_SETUP_I2C3) += setup-i2c3.o | 37 | obj-$(CONFIG_S5PV310_SETUP_I2C3) += setup-i2c3.o |
diff --git a/arch/arm/mach-s5pv310/clock.c b/arch/arm/mach-s5pv310/clock.c index 58c9d33f36f..fc7c2f8d165 100644 --- a/arch/arm/mach-s5pv310/clock.c +++ b/arch/arm/mach-s5pv310/clock.c | |||
@@ -244,7 +244,7 @@ static struct clksrc_clk clk_mout_corebus = { | |||
244 | .id = -1, | 244 | .id = -1, |
245 | }, | 245 | }, |
246 | .sources = &clkset_mout_corebus, | 246 | .sources = &clkset_mout_corebus, |
247 | .reg_src = { .reg = S5P_CLKSRC_CORE, .shift = 4, .size = 1 }, | 247 | .reg_src = { .reg = S5P_CLKSRC_DMC, .shift = 4, .size = 1 }, |
248 | }; | 248 | }; |
249 | 249 | ||
250 | static struct clksrc_clk clk_sclk_dmc = { | 250 | static struct clksrc_clk clk_sclk_dmc = { |
@@ -253,7 +253,7 @@ static struct clksrc_clk clk_sclk_dmc = { | |||
253 | .id = -1, | 253 | .id = -1, |
254 | .parent = &clk_mout_corebus.clk, | 254 | .parent = &clk_mout_corebus.clk, |
255 | }, | 255 | }, |
256 | .reg_div = { .reg = S5P_CLKDIV_CORE0, .shift = 12, .size = 3 }, | 256 | .reg_div = { .reg = S5P_CLKDIV_DMC0, .shift = 12, .size = 3 }, |
257 | }; | 257 | }; |
258 | 258 | ||
259 | static struct clksrc_clk clk_aclk_cored = { | 259 | static struct clksrc_clk clk_aclk_cored = { |
@@ -262,7 +262,7 @@ static struct clksrc_clk clk_aclk_cored = { | |||
262 | .id = -1, | 262 | .id = -1, |
263 | .parent = &clk_sclk_dmc.clk, | 263 | .parent = &clk_sclk_dmc.clk, |
264 | }, | 264 | }, |
265 | .reg_div = { .reg = S5P_CLKDIV_CORE0, .shift = 16, .size = 3 }, | 265 | .reg_div = { .reg = S5P_CLKDIV_DMC0, .shift = 16, .size = 3 }, |
266 | }; | 266 | }; |
267 | 267 | ||
268 | static struct clksrc_clk clk_aclk_corep = { | 268 | static struct clksrc_clk clk_aclk_corep = { |
@@ -271,7 +271,7 @@ static struct clksrc_clk clk_aclk_corep = { | |||
271 | .id = -1, | 271 | .id = -1, |
272 | .parent = &clk_aclk_cored.clk, | 272 | .parent = &clk_aclk_cored.clk, |
273 | }, | 273 | }, |
274 | .reg_div = { .reg = S5P_CLKDIV_CORE0, .shift = 20, .size = 3 }, | 274 | .reg_div = { .reg = S5P_CLKDIV_DMC0, .shift = 20, .size = 3 }, |
275 | }; | 275 | }; |
276 | 276 | ||
277 | static struct clksrc_clk clk_aclk_acp = { | 277 | static struct clksrc_clk clk_aclk_acp = { |
@@ -280,7 +280,7 @@ static struct clksrc_clk clk_aclk_acp = { | |||
280 | .id = -1, | 280 | .id = -1, |
281 | .parent = &clk_mout_corebus.clk, | 281 | .parent = &clk_mout_corebus.clk, |
282 | }, | 282 | }, |
283 | .reg_div = { .reg = S5P_CLKDIV_CORE0, .shift = 0, .size = 3 }, | 283 | .reg_div = { .reg = S5P_CLKDIV_DMC0, .shift = 0, .size = 3 }, |
284 | }; | 284 | }; |
285 | 285 | ||
286 | static struct clksrc_clk clk_pclk_acp = { | 286 | static struct clksrc_clk clk_pclk_acp = { |
@@ -289,7 +289,7 @@ static struct clksrc_clk clk_pclk_acp = { | |||
289 | .id = -1, | 289 | .id = -1, |
290 | .parent = &clk_aclk_acp.clk, | 290 | .parent = &clk_aclk_acp.clk, |
291 | }, | 291 | }, |
292 | .reg_div = { .reg = S5P_CLKDIV_CORE0, .shift = 4, .size = 3 }, | 292 | .reg_div = { .reg = S5P_CLKDIV_DMC0, .shift = 4, .size = 3 }, |
293 | }; | 293 | }; |
294 | 294 | ||
295 | /* Core list of CMU_TOP side */ | 295 | /* Core list of CMU_TOP side */ |
@@ -384,7 +384,7 @@ static struct clksrc_clk clk_sclk_vpll = { | |||
384 | .reg_src = { .reg = S5P_CLKSRC_TOP0, .shift = 8, .size = 1 }, | 384 | .reg_src = { .reg = S5P_CLKSRC_TOP0, .shift = 8, .size = 1 }, |
385 | }; | 385 | }; |
386 | 386 | ||
387 | static struct clk init_clocks_disable[] = { | 387 | static struct clk init_clocks_off[] = { |
388 | { | 388 | { |
389 | .name = "timers", | 389 | .name = "timers", |
390 | .id = -1, | 390 | .id = -1, |
@@ -467,6 +467,16 @@ static struct clk init_clocks_disable[] = { | |||
467 | .enable = s5pv310_clk_ip_fsys_ctrl, | 467 | .enable = s5pv310_clk_ip_fsys_ctrl, |
468 | .ctrlbit = (1 << 10), | 468 | .ctrlbit = (1 << 10), |
469 | }, { | 469 | }, { |
470 | .name = "pdma", | ||
471 | .id = 0, | ||
472 | .enable = s5pv310_clk_ip_fsys_ctrl, | ||
473 | .ctrlbit = (1 << 0), | ||
474 | }, { | ||
475 | .name = "pdma", | ||
476 | .id = 1, | ||
477 | .enable = s5pv310_clk_ip_fsys_ctrl, | ||
478 | .ctrlbit = (1 << 1), | ||
479 | }, { | ||
470 | .name = "adc", | 480 | .name = "adc", |
471 | .id = -1, | 481 | .id = -1, |
472 | .enable = s5pv310_clk_ip_peril_ctrl, | 482 | .enable = s5pv310_clk_ip_peril_ctrl, |
@@ -507,6 +517,26 @@ static struct clk init_clocks_disable[] = { | |||
507 | .enable = s5pv310_clk_ip_peril_ctrl, | 517 | .enable = s5pv310_clk_ip_peril_ctrl, |
508 | .ctrlbit = (1 << 18), | 518 | .ctrlbit = (1 << 18), |
509 | }, { | 519 | }, { |
520 | .name = "iis", | ||
521 | .id = 0, | ||
522 | .enable = s5pv310_clk_ip_peril_ctrl, | ||
523 | .ctrlbit = (1 << 19), | ||
524 | }, { | ||
525 | .name = "iis", | ||
526 | .id = 1, | ||
527 | .enable = s5pv310_clk_ip_peril_ctrl, | ||
528 | .ctrlbit = (1 << 20), | ||
529 | }, { | ||
530 | .name = "iis", | ||
531 | .id = 2, | ||
532 | .enable = s5pv310_clk_ip_peril_ctrl, | ||
533 | .ctrlbit = (1 << 21), | ||
534 | }, { | ||
535 | .name = "ac97", | ||
536 | .id = -1, | ||
537 | .enable = s5pv310_clk_ip_peril_ctrl, | ||
538 | .ctrlbit = (1 << 27), | ||
539 | }, { | ||
510 | .name = "fimg2d", | 540 | .name = "fimg2d", |
511 | .id = -1, | 541 | .id = -1, |
512 | .enable = s5pv310_clk_ip_image_ctrl, | 542 | .enable = s5pv310_clk_ip_image_ctrl, |
@@ -990,6 +1020,17 @@ static struct clksrc_clk *sysclks[] = { | |||
990 | &clk_dout_mmc4, | 1020 | &clk_dout_mmc4, |
991 | }; | 1021 | }; |
992 | 1022 | ||
1023 | static int xtal_rate; | ||
1024 | |||
1025 | static unsigned long s5pv310_fout_apll_get_rate(struct clk *clk) | ||
1026 | { | ||
1027 | return s5p_get_pll45xx(xtal_rate, __raw_readl(S5P_APLL_CON0), pll_4508); | ||
1028 | } | ||
1029 | |||
1030 | static struct clk_ops s5pv310_fout_apll_ops = { | ||
1031 | .get_rate = s5pv310_fout_apll_get_rate, | ||
1032 | }; | ||
1033 | |||
993 | void __init_or_cpufreq s5pv310_setup_clocks(void) | 1034 | void __init_or_cpufreq s5pv310_setup_clocks(void) |
994 | { | 1035 | { |
995 | struct clk *xtal_clk; | 1036 | struct clk *xtal_clk; |
@@ -1013,6 +1054,9 @@ void __init_or_cpufreq s5pv310_setup_clocks(void) | |||
1013 | BUG_ON(IS_ERR(xtal_clk)); | 1054 | BUG_ON(IS_ERR(xtal_clk)); |
1014 | 1055 | ||
1015 | xtal = clk_get_rate(xtal_clk); | 1056 | xtal = clk_get_rate(xtal_clk); |
1057 | |||
1058 | xtal_rate = xtal; | ||
1059 | |||
1016 | clk_put(xtal_clk); | 1060 | clk_put(xtal_clk); |
1017 | 1061 | ||
1018 | printk(KERN_DEBUG "%s: xtal is %ld\n", __func__, xtal); | 1062 | printk(KERN_DEBUG "%s: xtal is %ld\n", __func__, xtal); |
@@ -1026,7 +1070,7 @@ void __init_or_cpufreq s5pv310_setup_clocks(void) | |||
1026 | vpll = s5p_get_pll46xx(vpllsrc, __raw_readl(S5P_VPLL_CON0), | 1070 | vpll = s5p_get_pll46xx(vpllsrc, __raw_readl(S5P_VPLL_CON0), |
1027 | __raw_readl(S5P_VPLL_CON1), pll_4650); | 1071 | __raw_readl(S5P_VPLL_CON1), pll_4650); |
1028 | 1072 | ||
1029 | clk_fout_apll.rate = apll; | 1073 | clk_fout_apll.ops = &s5pv310_fout_apll_ops; |
1030 | clk_fout_mpll.rate = mpll; | 1074 | clk_fout_mpll.rate = mpll; |
1031 | clk_fout_epll.rate = epll; | 1075 | clk_fout_epll.rate = epll; |
1032 | clk_fout_vpll.rate = vpll; | 1076 | clk_fout_vpll.rate = vpll; |
@@ -1061,13 +1105,9 @@ static struct clk *clks[] __initdata = { | |||
1061 | 1105 | ||
1062 | void __init s5pv310_register_clocks(void) | 1106 | void __init s5pv310_register_clocks(void) |
1063 | { | 1107 | { |
1064 | struct clk *clkp; | ||
1065 | int ret; | ||
1066 | int ptr; | 1108 | int ptr; |
1067 | 1109 | ||
1068 | ret = s3c24xx_register_clocks(clks, ARRAY_SIZE(clks)); | 1110 | s3c24xx_register_clocks(clks, ARRAY_SIZE(clks)); |
1069 | if (ret > 0) | ||
1070 | printk(KERN_ERR "Failed to register %u clocks\n", ret); | ||
1071 | 1111 | ||
1072 | for (ptr = 0; ptr < ARRAY_SIZE(sysclks); ptr++) | 1112 | for (ptr = 0; ptr < ARRAY_SIZE(sysclks); ptr++) |
1073 | s3c_register_clksrc(sysclks[ptr], 1); | 1113 | s3c_register_clksrc(sysclks[ptr], 1); |
@@ -1075,15 +1115,8 @@ void __init s5pv310_register_clocks(void) | |||
1075 | s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); | 1115 | s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); |
1076 | s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); | 1116 | s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); |
1077 | 1117 | ||
1078 | clkp = init_clocks_disable; | 1118 | s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); |
1079 | for (ptr = 0; ptr < ARRAY_SIZE(init_clocks_disable); ptr++, clkp++) { | 1119 | s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); |
1080 | ret = s3c24xx_register_clock(clkp); | ||
1081 | if (ret < 0) { | ||
1082 | printk(KERN_ERR "Failed to register clock %s (%d)\n", | ||
1083 | clkp->name, ret); | ||
1084 | } | ||
1085 | (clkp->enable)(clkp, 0); | ||
1086 | } | ||
1087 | 1120 | ||
1088 | s3c_pwmclk_init(); | 1121 | s3c_pwmclk_init(); |
1089 | } | 1122 | } |
diff --git a/arch/arm/mach-s5pv310/cpu.c b/arch/arm/mach-s5pv310/cpu.c index 72ab289e781..0db0fb65bd7 100644 --- a/arch/arm/mach-s5pv310/cpu.c +++ b/arch/arm/mach-s5pv310/cpu.c | |||
@@ -41,6 +41,11 @@ static struct map_desc s5pv310_iodesc[] __initdata = { | |||
41 | .length = SZ_128K, | 41 | .length = SZ_128K, |
42 | .type = MT_DEVICE, | 42 | .type = MT_DEVICE, |
43 | }, { | 43 | }, { |
44 | .virtual = (unsigned long)S5P_VA_PMU, | ||
45 | .pfn = __phys_to_pfn(S5PV310_PA_PMU), | ||
46 | .length = SZ_64K, | ||
47 | .type = MT_DEVICE, | ||
48 | }, { | ||
44 | .virtual = (unsigned long)S5P_VA_COMBINER_BASE, | 49 | .virtual = (unsigned long)S5P_VA_COMBINER_BASE, |
45 | .pfn = __phys_to_pfn(S5PV310_PA_COMBINER), | 50 | .pfn = __phys_to_pfn(S5PV310_PA_COMBINER), |
46 | .length = SZ_4K, | 51 | .length = SZ_4K, |
@@ -71,6 +76,11 @@ static struct map_desc s5pv310_iodesc[] __initdata = { | |||
71 | .length = SZ_256, | 76 | .length = SZ_256, |
72 | .type = MT_DEVICE, | 77 | .type = MT_DEVICE, |
73 | }, { | 78 | }, { |
79 | .virtual = (unsigned long)S5P_VA_DMC0, | ||
80 | .pfn = __phys_to_pfn(S5PV310_PA_DMC0), | ||
81 | .length = SZ_4K, | ||
82 | .type = MT_DEVICE, | ||
83 | }, { | ||
74 | .virtual = (unsigned long)S3C_VA_UART, | 84 | .virtual = (unsigned long)S3C_VA_UART, |
75 | .pfn = __phys_to_pfn(S3C_PA_UART), | 85 | .pfn = __phys_to_pfn(S3C_PA_UART), |
76 | .length = SZ_512K, | 86 | .length = SZ_512K, |
@@ -123,6 +133,15 @@ void __init s5pv310_init_irq(void) | |||
123 | gic_init(0, IRQ_LOCALTIMER, S5P_VA_GIC_DIST, S5P_VA_GIC_CPU); | 133 | gic_init(0, IRQ_LOCALTIMER, S5P_VA_GIC_DIST, S5P_VA_GIC_CPU); |
124 | 134 | ||
125 | for (irq = 0; irq < MAX_COMBINER_NR; irq++) { | 135 | for (irq = 0; irq < MAX_COMBINER_NR; irq++) { |
136 | |||
137 | /* | ||
138 | * From SPI(0) to SPI(39) and SPI(51), SPI(53) are | ||
139 | * connected to the interrupt combiner. These irqs | ||
140 | * should be initialized to support cascade interrupt. | ||
141 | */ | ||
142 | if ((irq >= 40) && !(irq == 51) && !(irq == 53)) | ||
143 | continue; | ||
144 | |||
126 | combiner_init(irq, (void __iomem *)S5P_VA_COMBINER(irq), | 145 | combiner_init(irq, (void __iomem *)S5P_VA_COMBINER(irq), |
127 | COMBINER_IRQ(irq, 0)); | 146 | COMBINER_IRQ(irq, 0)); |
128 | combiner_cascade_irq(irq, IRQ_SPI(irq)); | 147 | combiner_cascade_irq(irq, IRQ_SPI(irq)); |
@@ -164,7 +183,7 @@ static int __init s5pv310_l2x0_cache_init(void) | |||
164 | __raw_writel(L2X0_DYNAMIC_CLK_GATING_EN | L2X0_STNDBY_MODE_EN, | 183 | __raw_writel(L2X0_DYNAMIC_CLK_GATING_EN | L2X0_STNDBY_MODE_EN, |
165 | S5P_VA_L2CC + L2X0_POWER_CTRL); | 184 | S5P_VA_L2CC + L2X0_POWER_CTRL); |
166 | 185 | ||
167 | l2x0_init(S5P_VA_L2CC, 0x7C070001, 0xC200ffff); | 186 | l2x0_init(S5P_VA_L2CC, 0x7C470001, 0xC200ffff); |
168 | 187 | ||
169 | return 0; | 188 | return 0; |
170 | } | 189 | } |
diff --git a/arch/arm/mach-s5pv310/cpufreq.c b/arch/arm/mach-s5pv310/cpufreq.c new file mode 100644 index 00000000000..b04cbc73112 --- /dev/null +++ b/arch/arm/mach-s5pv310/cpufreq.c | |||
@@ -0,0 +1,580 @@ | |||
1 | /* linux/arch/arm/mach-s5pv310/cpufreq.c | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com | ||
5 | * | ||
6 | * S5PV310 - CPU frequency scaling support | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include <linux/types.h> | ||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/err.h> | ||
16 | #include <linux/clk.h> | ||
17 | #include <linux/io.h> | ||
18 | #include <linux/slab.h> | ||
19 | #include <linux/regulator/consumer.h> | ||
20 | #include <linux/cpufreq.h> | ||
21 | |||
22 | #include <mach/map.h> | ||
23 | #include <mach/regs-clock.h> | ||
24 | #include <mach/regs-mem.h> | ||
25 | |||
26 | #include <plat/clock.h> | ||
27 | #include <plat/pm.h> | ||
28 | |||
29 | static struct clk *cpu_clk; | ||
30 | static struct clk *moutcore; | ||
31 | static struct clk *mout_mpll; | ||
32 | static struct clk *mout_apll; | ||
33 | |||
34 | #ifdef CONFIG_REGULATOR | ||
35 | static struct regulator *arm_regulator; | ||
36 | static struct regulator *int_regulator; | ||
37 | #endif | ||
38 | |||
39 | static struct cpufreq_freqs freqs; | ||
40 | static unsigned int memtype; | ||
41 | |||
42 | enum s5pv310_memory_type { | ||
43 | DDR2 = 4, | ||
44 | LPDDR2, | ||
45 | DDR3, | ||
46 | }; | ||
47 | |||
48 | enum cpufreq_level_index { | ||
49 | L0, L1, L2, L3, CPUFREQ_LEVEL_END, | ||
50 | }; | ||
51 | |||
52 | static struct cpufreq_frequency_table s5pv310_freq_table[] = { | ||
53 | {L0, 1000*1000}, | ||
54 | {L1, 800*1000}, | ||
55 | {L2, 400*1000}, | ||
56 | {L3, 100*1000}, | ||
57 | {0, CPUFREQ_TABLE_END}, | ||
58 | }; | ||
59 | |||
60 | static unsigned int clkdiv_cpu0[CPUFREQ_LEVEL_END][7] = { | ||
61 | /* | ||
62 | * Clock divider value for following | ||
63 | * { DIVCORE, DIVCOREM0, DIVCOREM1, DIVPERIPH, | ||
64 | * DIVATB, DIVPCLK_DBG, DIVAPLL } | ||
65 | */ | ||
66 | |||
67 | /* ARM L0: 1000MHz */ | ||
68 | { 0, 3, 7, 3, 3, 0, 1 }, | ||
69 | |||
70 | /* ARM L1: 800MHz */ | ||
71 | { 0, 3, 7, 3, 3, 0, 1 }, | ||
72 | |||
73 | /* ARM L2: 400MHz */ | ||
74 | { 0, 1, 3, 1, 3, 0, 1 }, | ||
75 | |||
76 | /* ARM L3: 100MHz */ | ||
77 | { 0, 0, 1, 0, 3, 1, 1 }, | ||
78 | }; | ||
79 | |||
80 | static unsigned int clkdiv_cpu1[CPUFREQ_LEVEL_END][2] = { | ||
81 | /* | ||
82 | * Clock divider value for following | ||
83 | * { DIVCOPY, DIVHPM } | ||
84 | */ | ||
85 | |||
86 | /* ARM L0: 1000MHz */ | ||
87 | { 3, 0 }, | ||
88 | |||
89 | /* ARM L1: 800MHz */ | ||
90 | { 3, 0 }, | ||
91 | |||
92 | /* ARM L2: 400MHz */ | ||
93 | { 3, 0 }, | ||
94 | |||
95 | /* ARM L3: 100MHz */ | ||
96 | { 3, 0 }, | ||
97 | }; | ||
98 | |||
99 | static unsigned int clkdiv_dmc0[CPUFREQ_LEVEL_END][8] = { | ||
100 | /* | ||
101 | * Clock divider value for following | ||
102 | * { DIVACP, DIVACP_PCLK, DIVDPHY, DIVDMC, DIVDMCD | ||
103 | * DIVDMCP, DIVCOPY2, DIVCORE_TIMERS } | ||
104 | */ | ||
105 | |||
106 | /* DMC L0: 400MHz */ | ||
107 | { 3, 1, 1, 1, 1, 1, 3, 1 }, | ||
108 | |||
109 | /* DMC L1: 400MHz */ | ||
110 | { 3, 1, 1, 1, 1, 1, 3, 1 }, | ||
111 | |||
112 | /* DMC L2: 266.7MHz */ | ||
113 | { 7, 1, 1, 2, 1, 1, 3, 1 }, | ||
114 | |||
115 | /* DMC L3: 200MHz */ | ||
116 | { 7, 1, 1, 3, 1, 1, 3, 1 }, | ||
117 | }; | ||
118 | |||
119 | static unsigned int clkdiv_top[CPUFREQ_LEVEL_END][5] = { | ||
120 | /* | ||
121 | * Clock divider value for following | ||
122 | * { DIVACLK200, DIVACLK100, DIVACLK160, DIVACLK133, DIVONENAND } | ||
123 | */ | ||
124 | |||
125 | /* ACLK200 L0: 200MHz */ | ||
126 | { 3, 7, 4, 5, 1 }, | ||
127 | |||
128 | /* ACLK200 L1: 200MHz */ | ||
129 | { 3, 7, 4, 5, 1 }, | ||
130 | |||
131 | /* ACLK200 L2: 160MHz */ | ||
132 | { 4, 7, 5, 7, 1 }, | ||
133 | |||
134 | /* ACLK200 L3: 133.3MHz */ | ||
135 | { 5, 7, 7, 7, 1 }, | ||
136 | }; | ||
137 | |||
138 | static unsigned int clkdiv_lr_bus[CPUFREQ_LEVEL_END][2] = { | ||
139 | /* | ||
140 | * Clock divider value for following | ||
141 | * { DIVGDL/R, DIVGPL/R } | ||
142 | */ | ||
143 | |||
144 | /* ACLK_GDL/R L0: 200MHz */ | ||
145 | { 3, 1 }, | ||
146 | |||
147 | /* ACLK_GDL/R L1: 200MHz */ | ||
148 | { 3, 1 }, | ||
149 | |||
150 | /* ACLK_GDL/R L2: 160MHz */ | ||
151 | { 4, 1 }, | ||
152 | |||
153 | /* ACLK_GDL/R L3: 133.3MHz */ | ||
154 | { 5, 1 }, | ||
155 | }; | ||
156 | |||
157 | struct cpufreq_voltage_table { | ||
158 | unsigned int index; /* any */ | ||
159 | unsigned int arm_volt; /* uV */ | ||
160 | unsigned int int_volt; | ||
161 | }; | ||
162 | |||
163 | static struct cpufreq_voltage_table s5pv310_volt_table[CPUFREQ_LEVEL_END] = { | ||
164 | { | ||
165 | .index = L0, | ||
166 | .arm_volt = 1200000, | ||
167 | .int_volt = 1100000, | ||
168 | }, { | ||
169 | .index = L1, | ||
170 | .arm_volt = 1100000, | ||
171 | .int_volt = 1100000, | ||
172 | }, { | ||
173 | .index = L2, | ||
174 | .arm_volt = 1000000, | ||
175 | .int_volt = 1000000, | ||
176 | }, { | ||
177 | .index = L3, | ||
178 | .arm_volt = 900000, | ||
179 | .int_volt = 1000000, | ||
180 | }, | ||
181 | }; | ||
182 | |||
183 | static unsigned int s5pv310_apll_pms_table[CPUFREQ_LEVEL_END] = { | ||
184 | /* APLL FOUT L0: 1000MHz */ | ||
185 | ((250 << 16) | (6 << 8) | 1), | ||
186 | |||
187 | /* APLL FOUT L1: 800MHz */ | ||
188 | ((200 << 16) | (6 << 8) | 1), | ||
189 | |||
190 | /* APLL FOUT L2 : 400MHz */ | ||
191 | ((200 << 16) | (6 << 8) | 2), | ||
192 | |||
193 | /* APLL FOUT L3: 100MHz */ | ||
194 | ((200 << 16) | (6 << 8) | 4), | ||
195 | }; | ||
196 | |||
197 | int s5pv310_verify_speed(struct cpufreq_policy *policy) | ||
198 | { | ||
199 | return cpufreq_frequency_table_verify(policy, s5pv310_freq_table); | ||
200 | } | ||
201 | |||
202 | unsigned int s5pv310_getspeed(unsigned int cpu) | ||
203 | { | ||
204 | return clk_get_rate(cpu_clk) / 1000; | ||
205 | } | ||
206 | |||
207 | void s5pv310_set_clkdiv(unsigned int div_index) | ||
208 | { | ||
209 | unsigned int tmp; | ||
210 | |||
211 | /* Change Divider - CPU0 */ | ||
212 | |||
213 | tmp = __raw_readl(S5P_CLKDIV_CPU); | ||
214 | |||
215 | tmp &= ~(S5P_CLKDIV_CPU0_CORE_MASK | S5P_CLKDIV_CPU0_COREM0_MASK | | ||
216 | S5P_CLKDIV_CPU0_COREM1_MASK | S5P_CLKDIV_CPU0_PERIPH_MASK | | ||
217 | S5P_CLKDIV_CPU0_ATB_MASK | S5P_CLKDIV_CPU0_PCLKDBG_MASK | | ||
218 | S5P_CLKDIV_CPU0_APLL_MASK); | ||
219 | |||
220 | tmp |= ((clkdiv_cpu0[div_index][0] << S5P_CLKDIV_CPU0_CORE_SHIFT) | | ||
221 | (clkdiv_cpu0[div_index][1] << S5P_CLKDIV_CPU0_COREM0_SHIFT) | | ||
222 | (clkdiv_cpu0[div_index][2] << S5P_CLKDIV_CPU0_COREM1_SHIFT) | | ||
223 | (clkdiv_cpu0[div_index][3] << S5P_CLKDIV_CPU0_PERIPH_SHIFT) | | ||
224 | (clkdiv_cpu0[div_index][4] << S5P_CLKDIV_CPU0_ATB_SHIFT) | | ||
225 | (clkdiv_cpu0[div_index][5] << S5P_CLKDIV_CPU0_PCLKDBG_SHIFT) | | ||
226 | (clkdiv_cpu0[div_index][6] << S5P_CLKDIV_CPU0_APLL_SHIFT)); | ||
227 | |||
228 | __raw_writel(tmp, S5P_CLKDIV_CPU); | ||
229 | |||
230 | do { | ||
231 | tmp = __raw_readl(S5P_CLKDIV_STATCPU); | ||
232 | } while (tmp & 0x1111111); | ||
233 | |||
234 | /* Change Divider - CPU1 */ | ||
235 | |||
236 | tmp = __raw_readl(S5P_CLKDIV_CPU1); | ||
237 | |||
238 | tmp &= ~((0x7 << 4) | 0x7); | ||
239 | |||
240 | tmp |= ((clkdiv_cpu1[div_index][0] << 4) | | ||
241 | (clkdiv_cpu1[div_index][1] << 0)); | ||
242 | |||
243 | __raw_writel(tmp, S5P_CLKDIV_CPU1); | ||
244 | |||
245 | do { | ||
246 | tmp = __raw_readl(S5P_CLKDIV_STATCPU1); | ||
247 | } while (tmp & 0x11); | ||
248 | |||
249 | /* Change Divider - DMC0 */ | ||
250 | |||
251 | tmp = __raw_readl(S5P_CLKDIV_DMC0); | ||
252 | |||
253 | tmp &= ~(S5P_CLKDIV_DMC0_ACP_MASK | S5P_CLKDIV_DMC0_ACPPCLK_MASK | | ||
254 | S5P_CLKDIV_DMC0_DPHY_MASK | S5P_CLKDIV_DMC0_DMC_MASK | | ||
255 | S5P_CLKDIV_DMC0_DMCD_MASK | S5P_CLKDIV_DMC0_DMCP_MASK | | ||
256 | S5P_CLKDIV_DMC0_COPY2_MASK | S5P_CLKDIV_DMC0_CORETI_MASK); | ||
257 | |||
258 | tmp |= ((clkdiv_dmc0[div_index][0] << S5P_CLKDIV_DMC0_ACP_SHIFT) | | ||
259 | (clkdiv_dmc0[div_index][1] << S5P_CLKDIV_DMC0_ACPPCLK_SHIFT) | | ||
260 | (clkdiv_dmc0[div_index][2] << S5P_CLKDIV_DMC0_DPHY_SHIFT) | | ||
261 | (clkdiv_dmc0[div_index][3] << S5P_CLKDIV_DMC0_DMC_SHIFT) | | ||
262 | (clkdiv_dmc0[div_index][4] << S5P_CLKDIV_DMC0_DMCD_SHIFT) | | ||
263 | (clkdiv_dmc0[div_index][5] << S5P_CLKDIV_DMC0_DMCP_SHIFT) | | ||
264 | (clkdiv_dmc0[div_index][6] << S5P_CLKDIV_DMC0_COPY2_SHIFT) | | ||
265 | (clkdiv_dmc0[div_index][7] << S5P_CLKDIV_DMC0_CORETI_SHIFT)); | ||
266 | |||
267 | __raw_writel(tmp, S5P_CLKDIV_DMC0); | ||
268 | |||
269 | do { | ||
270 | tmp = __raw_readl(S5P_CLKDIV_STAT_DMC0); | ||
271 | } while (tmp & 0x11111111); | ||
272 | |||
273 | /* Change Divider - TOP */ | ||
274 | |||
275 | tmp = __raw_readl(S5P_CLKDIV_TOP); | ||
276 | |||
277 | tmp &= ~(S5P_CLKDIV_TOP_ACLK200_MASK | S5P_CLKDIV_TOP_ACLK100_MASK | | ||
278 | S5P_CLKDIV_TOP_ACLK160_MASK | S5P_CLKDIV_TOP_ACLK133_MASK | | ||
279 | S5P_CLKDIV_TOP_ONENAND_MASK); | ||
280 | |||
281 | tmp |= ((clkdiv_top[div_index][0] << S5P_CLKDIV_TOP_ACLK200_SHIFT) | | ||
282 | (clkdiv_top[div_index][1] << S5P_CLKDIV_TOP_ACLK100_SHIFT) | | ||
283 | (clkdiv_top[div_index][2] << S5P_CLKDIV_TOP_ACLK160_SHIFT) | | ||
284 | (clkdiv_top[div_index][3] << S5P_CLKDIV_TOP_ACLK133_SHIFT) | | ||
285 | (clkdiv_top[div_index][4] << S5P_CLKDIV_TOP_ONENAND_SHIFT)); | ||
286 | |||
287 | __raw_writel(tmp, S5P_CLKDIV_TOP); | ||
288 | |||
289 | do { | ||
290 | tmp = __raw_readl(S5P_CLKDIV_STAT_TOP); | ||
291 | } while (tmp & 0x11111); | ||
292 | |||
293 | /* Change Divider - LEFTBUS */ | ||
294 | |||
295 | tmp = __raw_readl(S5P_CLKDIV_LEFTBUS); | ||
296 | |||
297 | tmp &= ~(S5P_CLKDIV_BUS_GDLR_MASK | S5P_CLKDIV_BUS_GPLR_MASK); | ||
298 | |||
299 | tmp |= ((clkdiv_lr_bus[div_index][0] << S5P_CLKDIV_BUS_GDLR_SHIFT) | | ||
300 | (clkdiv_lr_bus[div_index][1] << S5P_CLKDIV_BUS_GPLR_SHIFT)); | ||
301 | |||
302 | __raw_writel(tmp, S5P_CLKDIV_LEFTBUS); | ||
303 | |||
304 | do { | ||
305 | tmp = __raw_readl(S5P_CLKDIV_STAT_LEFTBUS); | ||
306 | } while (tmp & 0x11); | ||
307 | |||
308 | /* Change Divider - RIGHTBUS */ | ||
309 | |||
310 | tmp = __raw_readl(S5P_CLKDIV_RIGHTBUS); | ||
311 | |||
312 | tmp &= ~(S5P_CLKDIV_BUS_GDLR_MASK | S5P_CLKDIV_BUS_GPLR_MASK); | ||
313 | |||
314 | tmp |= ((clkdiv_lr_bus[div_index][0] << S5P_CLKDIV_BUS_GDLR_SHIFT) | | ||
315 | (clkdiv_lr_bus[div_index][1] << S5P_CLKDIV_BUS_GPLR_SHIFT)); | ||
316 | |||
317 | __raw_writel(tmp, S5P_CLKDIV_RIGHTBUS); | ||
318 | |||
319 | do { | ||
320 | tmp = __raw_readl(S5P_CLKDIV_STAT_RIGHTBUS); | ||
321 | } while (tmp & 0x11); | ||
322 | } | ||
323 | |||
324 | static void s5pv310_set_apll(unsigned int index) | ||
325 | { | ||
326 | unsigned int tmp; | ||
327 | |||
328 | /* 1. MUX_CORE_SEL = MPLL, ARMCLK uses MPLL for lock time */ | ||
329 | clk_set_parent(moutcore, mout_mpll); | ||
330 | |||
331 | do { | ||
332 | tmp = (__raw_readl(S5P_CLKMUX_STATCPU) | ||
333 | >> S5P_CLKSRC_CPU_MUXCORE_SHIFT); | ||
334 | tmp &= 0x7; | ||
335 | } while (tmp != 0x2); | ||
336 | |||
337 | /* 2. Set APLL Lock time */ | ||
338 | __raw_writel(S5P_APLL_LOCKTIME, S5P_APLL_LOCK); | ||
339 | |||
340 | /* 3. Change PLL PMS values */ | ||
341 | tmp = __raw_readl(S5P_APLL_CON0); | ||
342 | tmp &= ~((0x3ff << 16) | (0x3f << 8) | (0x7 << 0)); | ||
343 | tmp |= s5pv310_apll_pms_table[index]; | ||
344 | __raw_writel(tmp, S5P_APLL_CON0); | ||
345 | |||
346 | /* 4. wait_lock_time */ | ||
347 | do { | ||
348 | tmp = __raw_readl(S5P_APLL_CON0); | ||
349 | } while (!(tmp & (0x1 << S5P_APLLCON0_LOCKED_SHIFT))); | ||
350 | |||
351 | /* 5. MUX_CORE_SEL = APLL */ | ||
352 | clk_set_parent(moutcore, mout_apll); | ||
353 | |||
354 | do { | ||
355 | tmp = __raw_readl(S5P_CLKMUX_STATCPU); | ||
356 | tmp &= S5P_CLKMUX_STATCPU_MUXCORE_MASK; | ||
357 | } while (tmp != (0x1 << S5P_CLKSRC_CPU_MUXCORE_SHIFT)); | ||
358 | } | ||
359 | |||
360 | static void s5pv310_set_frequency(unsigned int old_index, unsigned int new_index) | ||
361 | { | ||
362 | unsigned int tmp; | ||
363 | |||
364 | if (old_index > new_index) { | ||
365 | /* The frequency changing to L0 needs to change apll */ | ||
366 | if (freqs.new == s5pv310_freq_table[L0].frequency) { | ||
367 | /* 1. Change the system clock divider values */ | ||
368 | s5pv310_set_clkdiv(new_index); | ||
369 | |||
370 | /* 2. Change the apll m,p,s value */ | ||
371 | s5pv310_set_apll(new_index); | ||
372 | } else { | ||
373 | /* 1. Change the system clock divider values */ | ||
374 | s5pv310_set_clkdiv(new_index); | ||
375 | |||
376 | /* 2. Change just s value in apll m,p,s value */ | ||
377 | tmp = __raw_readl(S5P_APLL_CON0); | ||
378 | tmp &= ~(0x7 << 0); | ||
379 | tmp |= (s5pv310_apll_pms_table[new_index] & 0x7); | ||
380 | __raw_writel(tmp, S5P_APLL_CON0); | ||
381 | } | ||
382 | } | ||
383 | |||
384 | else if (old_index < new_index) { | ||
385 | /* The frequency changing from L0 needs to change apll */ | ||
386 | if (freqs.old == s5pv310_freq_table[L0].frequency) { | ||
387 | /* 1. Change the apll m,p,s value */ | ||
388 | s5pv310_set_apll(new_index); | ||
389 | |||
390 | /* 2. Change the system clock divider values */ | ||
391 | s5pv310_set_clkdiv(new_index); | ||
392 | } else { | ||
393 | /* 1. Change just s value in apll m,p,s value */ | ||
394 | tmp = __raw_readl(S5P_APLL_CON0); | ||
395 | tmp &= ~(0x7 << 0); | ||
396 | tmp |= (s5pv310_apll_pms_table[new_index] & 0x7); | ||
397 | __raw_writel(tmp, S5P_APLL_CON0); | ||
398 | |||
399 | /* 2. Change the system clock divider values */ | ||
400 | s5pv310_set_clkdiv(new_index); | ||
401 | } | ||
402 | } | ||
403 | } | ||
404 | |||
405 | static int s5pv310_target(struct cpufreq_policy *policy, | ||
406 | unsigned int target_freq, | ||
407 | unsigned int relation) | ||
408 | { | ||
409 | unsigned int index, old_index; | ||
410 | unsigned int arm_volt, int_volt; | ||
411 | |||
412 | freqs.old = s5pv310_getspeed(policy->cpu); | ||
413 | |||
414 | if (cpufreq_frequency_table_target(policy, s5pv310_freq_table, | ||
415 | freqs.old, relation, &old_index)) | ||
416 | return -EINVAL; | ||
417 | |||
418 | if (cpufreq_frequency_table_target(policy, s5pv310_freq_table, | ||
419 | target_freq, relation, &index)) | ||
420 | return -EINVAL; | ||
421 | |||
422 | freqs.new = s5pv310_freq_table[index].frequency; | ||
423 | freqs.cpu = policy->cpu; | ||
424 | |||
425 | if (freqs.new == freqs.old) | ||
426 | return 0; | ||
427 | |||
428 | /* get the voltage value */ | ||
429 | arm_volt = s5pv310_volt_table[index].arm_volt; | ||
430 | int_volt = s5pv310_volt_table[index].int_volt; | ||
431 | |||
432 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); | ||
433 | |||
434 | /* control regulator */ | ||
435 | if (freqs.new > freqs.old) { | ||
436 | /* Voltage up */ | ||
437 | #ifdef CONFIG_REGULATOR | ||
438 | regulator_set_voltage(arm_regulator, arm_volt, arm_volt); | ||
439 | regulator_set_voltage(int_regulator, int_volt, int_volt); | ||
440 | #endif | ||
441 | } | ||
442 | |||
443 | /* Clock Configuration Procedure */ | ||
444 | s5pv310_set_frequency(old_index, index); | ||
445 | |||
446 | /* control regulator */ | ||
447 | if (freqs.new < freqs.old) { | ||
448 | /* Voltage down */ | ||
449 | #ifdef CONFIG_REGULATOR | ||
450 | regulator_set_voltage(arm_regulator, arm_volt, arm_volt); | ||
451 | regulator_set_voltage(int_regulator, int_volt, int_volt); | ||
452 | #endif | ||
453 | } | ||
454 | |||
455 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); | ||
456 | |||
457 | return 0; | ||
458 | } | ||
459 | |||
460 | #ifdef CONFIG_PM | ||
461 | static int s5pv310_cpufreq_suspend(struct cpufreq_policy *policy, | ||
462 | pm_message_t pmsg) | ||
463 | { | ||
464 | return 0; | ||
465 | } | ||
466 | |||
467 | static int s5pv310_cpufreq_resume(struct cpufreq_policy *policy) | ||
468 | { | ||
469 | return 0; | ||
470 | } | ||
471 | #endif | ||
472 | |||
473 | static int s5pv310_cpufreq_cpu_init(struct cpufreq_policy *policy) | ||
474 | { | ||
475 | policy->cur = policy->min = policy->max = s5pv310_getspeed(policy->cpu); | ||
476 | |||
477 | cpufreq_frequency_table_get_attr(s5pv310_freq_table, policy->cpu); | ||
478 | |||
479 | /* set the transition latency value */ | ||
480 | policy->cpuinfo.transition_latency = 100000; | ||
481 | |||
482 | /* | ||
483 | * S5PV310 multi-core processors has 2 cores | ||
484 | * that the frequency cannot be set independently. | ||
485 | * Each cpu is bound to the same speed. | ||
486 | * So the affected cpu is all of the cpus. | ||
487 | */ | ||
488 | cpumask_setall(policy->cpus); | ||
489 | |||
490 | return cpufreq_frequency_table_cpuinfo(policy, s5pv310_freq_table); | ||
491 | } | ||
492 | |||
493 | static struct cpufreq_driver s5pv310_driver = { | ||
494 | .flags = CPUFREQ_STICKY, | ||
495 | .verify = s5pv310_verify_speed, | ||
496 | .target = s5pv310_target, | ||
497 | .get = s5pv310_getspeed, | ||
498 | .init = s5pv310_cpufreq_cpu_init, | ||
499 | .name = "s5pv310_cpufreq", | ||
500 | #ifdef CONFIG_PM | ||
501 | .suspend = s5pv310_cpufreq_suspend, | ||
502 | .resume = s5pv310_cpufreq_resume, | ||
503 | #endif | ||
504 | }; | ||
505 | |||
506 | static int __init s5pv310_cpufreq_init(void) | ||
507 | { | ||
508 | cpu_clk = clk_get(NULL, "armclk"); | ||
509 | if (IS_ERR(cpu_clk)) | ||
510 | return PTR_ERR(cpu_clk); | ||
511 | |||
512 | moutcore = clk_get(NULL, "moutcore"); | ||
513 | if (IS_ERR(moutcore)) | ||
514 | goto out; | ||
515 | |||
516 | mout_mpll = clk_get(NULL, "mout_mpll"); | ||
517 | if (IS_ERR(mout_mpll)) | ||
518 | goto out; | ||
519 | |||
520 | mout_apll = clk_get(NULL, "mout_apll"); | ||
521 | if (IS_ERR(mout_apll)) | ||
522 | goto out; | ||
523 | |||
524 | #ifdef CONFIG_REGULATOR | ||
525 | arm_regulator = regulator_get(NULL, "vdd_arm"); | ||
526 | if (IS_ERR(arm_regulator)) { | ||
527 | printk(KERN_ERR "failed to get resource %s\n", "vdd_arm"); | ||
528 | goto out; | ||
529 | } | ||
530 | |||
531 | int_regulator = regulator_get(NULL, "vdd_int"); | ||
532 | if (IS_ERR(int_regulator)) { | ||
533 | printk(KERN_ERR "failed to get resource %s\n", "vdd_int"); | ||
534 | goto out; | ||
535 | } | ||
536 | #endif | ||
537 | |||
538 | /* | ||
539 | * Check DRAM type. | ||
540 | * Because DVFS level is different according to DRAM type. | ||
541 | */ | ||
542 | memtype = __raw_readl(S5P_VA_DMC0 + S5P_DMC0_MEMCON_OFFSET); | ||
543 | memtype = (memtype >> S5P_DMC0_MEMTYPE_SHIFT); | ||
544 | memtype &= S5P_DMC0_MEMTYPE_MASK; | ||
545 | |||
546 | if ((memtype < DDR2) && (memtype > DDR3)) { | ||
547 | printk(KERN_ERR "%s: wrong memtype= 0x%x\n", __func__, memtype); | ||
548 | goto out; | ||
549 | } else { | ||
550 | printk(KERN_DEBUG "%s: memtype= 0x%x\n", __func__, memtype); | ||
551 | } | ||
552 | |||
553 | return cpufreq_register_driver(&s5pv310_driver); | ||
554 | |||
555 | out: | ||
556 | if (!IS_ERR(cpu_clk)) | ||
557 | clk_put(cpu_clk); | ||
558 | |||
559 | if (!IS_ERR(moutcore)) | ||
560 | clk_put(moutcore); | ||
561 | |||
562 | if (!IS_ERR(mout_mpll)) | ||
563 | clk_put(mout_mpll); | ||
564 | |||
565 | if (!IS_ERR(mout_apll)) | ||
566 | clk_put(mout_apll); | ||
567 | |||
568 | #ifdef CONFIG_REGULATOR | ||
569 | if (!IS_ERR(arm_regulator)) | ||
570 | regulator_put(arm_regulator); | ||
571 | |||
572 | if (!IS_ERR(int_regulator)) | ||
573 | regulator_put(int_regulator); | ||
574 | #endif | ||
575 | |||
576 | printk(KERN_ERR "%s: failed initialization\n", __func__); | ||
577 | |||
578 | return -EINVAL; | ||
579 | } | ||
580 | late_initcall(s5pv310_cpufreq_init); | ||
diff --git a/arch/arm/mach-s5pv310/dev-pd.c b/arch/arm/mach-s5pv310/dev-pd.c new file mode 100644 index 00000000000..58a50c2d0b6 --- /dev/null +++ b/arch/arm/mach-s5pv310/dev-pd.c | |||
@@ -0,0 +1,139 @@ | |||
1 | /* linux/arch/arm/mach-s5pv310/dev-pd.c | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com | ||
5 | * | ||
6 | * S5PV310 - Power Domain support | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include <linux/io.h> | ||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/platform_device.h> | ||
16 | #include <linux/delay.h> | ||
17 | |||
18 | #include <mach/regs-pmu.h> | ||
19 | |||
20 | #include <plat/pd.h> | ||
21 | |||
22 | static int s5pv310_pd_enable(struct device *dev) | ||
23 | { | ||
24 | struct samsung_pd_info *pdata = dev->platform_data; | ||
25 | u32 timeout; | ||
26 | |||
27 | __raw_writel(S5P_INT_LOCAL_PWR_EN, pdata->base); | ||
28 | |||
29 | /* Wait max 1ms */ | ||
30 | timeout = 10; | ||
31 | while ((__raw_readl(pdata->base + 0x4) & S5P_INT_LOCAL_PWR_EN) | ||
32 | != S5P_INT_LOCAL_PWR_EN) { | ||
33 | if (timeout == 0) { | ||
34 | printk(KERN_ERR "Power domain %s enable failed.\n", | ||
35 | dev_name(dev)); | ||
36 | return -ETIMEDOUT; | ||
37 | } | ||
38 | timeout--; | ||
39 | udelay(100); | ||
40 | } | ||
41 | |||
42 | return 0; | ||
43 | } | ||
44 | |||
45 | static int s5pv310_pd_disable(struct device *dev) | ||
46 | { | ||
47 | struct samsung_pd_info *pdata = dev->platform_data; | ||
48 | u32 timeout; | ||
49 | |||
50 | __raw_writel(0, pdata->base); | ||
51 | |||
52 | /* Wait max 1ms */ | ||
53 | timeout = 10; | ||
54 | while (__raw_readl(pdata->base + 0x4) & S5P_INT_LOCAL_PWR_EN) { | ||
55 | if (timeout == 0) { | ||
56 | printk(KERN_ERR "Power domain %s disable failed.\n", | ||
57 | dev_name(dev)); | ||
58 | return -ETIMEDOUT; | ||
59 | } | ||
60 | timeout--; | ||
61 | udelay(100); | ||
62 | } | ||
63 | |||
64 | return 0; | ||
65 | } | ||
66 | |||
67 | struct platform_device s5pv310_device_pd[] = { | ||
68 | { | ||
69 | .name = "samsung-pd", | ||
70 | .id = 0, | ||
71 | .dev = { | ||
72 | .platform_data = &(struct samsung_pd_info) { | ||
73 | .enable = s5pv310_pd_enable, | ||
74 | .disable = s5pv310_pd_disable, | ||
75 | .base = S5P_PMU_MFC_CONF, | ||
76 | }, | ||
77 | }, | ||
78 | }, { | ||
79 | .name = "samsung-pd", | ||
80 | .id = 1, | ||
81 | .dev = { | ||
82 | .platform_data = &(struct samsung_pd_info) { | ||
83 | .enable = s5pv310_pd_enable, | ||
84 | .disable = s5pv310_pd_disable, | ||
85 | .base = S5P_PMU_G3D_CONF, | ||
86 | }, | ||
87 | }, | ||
88 | }, { | ||
89 | .name = "samsung-pd", | ||
90 | .id = 2, | ||
91 | .dev = { | ||
92 | .platform_data = &(struct samsung_pd_info) { | ||
93 | .enable = s5pv310_pd_enable, | ||
94 | .disable = s5pv310_pd_disable, | ||
95 | .base = S5P_PMU_LCD0_CONF, | ||
96 | }, | ||
97 | }, | ||
98 | }, { | ||
99 | .name = "samsung-pd", | ||
100 | .id = 3, | ||
101 | .dev = { | ||
102 | .platform_data = &(struct samsung_pd_info) { | ||
103 | .enable = s5pv310_pd_enable, | ||
104 | .disable = s5pv310_pd_disable, | ||
105 | .base = S5P_PMU_LCD1_CONF, | ||
106 | }, | ||
107 | }, | ||
108 | }, { | ||
109 | .name = "samsung-pd", | ||
110 | .id = 4, | ||
111 | .dev = { | ||
112 | .platform_data = &(struct samsung_pd_info) { | ||
113 | .enable = s5pv310_pd_enable, | ||
114 | .disable = s5pv310_pd_disable, | ||
115 | .base = S5P_PMU_TV_CONF, | ||
116 | }, | ||
117 | }, | ||
118 | }, { | ||
119 | .name = "samsung-pd", | ||
120 | .id = 5, | ||
121 | .dev = { | ||
122 | .platform_data = &(struct samsung_pd_info) { | ||
123 | .enable = s5pv310_pd_enable, | ||
124 | .disable = s5pv310_pd_disable, | ||
125 | .base = S5P_PMU_CAM_CONF, | ||
126 | }, | ||
127 | }, | ||
128 | }, { | ||
129 | .name = "samsung-pd", | ||
130 | .id = 6, | ||
131 | .dev = { | ||
132 | .platform_data = &(struct samsung_pd_info) { | ||
133 | .enable = s5pv310_pd_enable, | ||
134 | .disable = s5pv310_pd_disable, | ||
135 | .base = S5P_PMU_GPS_CONF, | ||
136 | }, | ||
137 | }, | ||
138 | }, | ||
139 | }; | ||
diff --git a/arch/arm/mach-s5pv310/dev-sysmmu.c b/arch/arm/mach-s5pv310/dev-sysmmu.c new file mode 100644 index 00000000000..e1bb200ac0f --- /dev/null +++ b/arch/arm/mach-s5pv310/dev-sysmmu.c | |||
@@ -0,0 +1,187 @@ | |||
1 | /* linux/arch/arm/mach-s5pv310/dev-sysmmu.c | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com | ||
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 | #include <linux/platform_device.h> | ||
12 | #include <linux/dma-mapping.h> | ||
13 | |||
14 | #include <mach/map.h> | ||
15 | #include <mach/irqs.h> | ||
16 | |||
17 | static struct resource s5pv310_sysmmu_resource[] = { | ||
18 | [0] = { | ||
19 | .start = S5PV310_PA_SYSMMU_MDMA, | ||
20 | .end = S5PV310_PA_SYSMMU_MDMA + SZ_64K - 1, | ||
21 | .flags = IORESOURCE_MEM, | ||
22 | }, | ||
23 | [1] = { | ||
24 | .start = IRQ_SYSMMU_MDMA0_0, | ||
25 | .end = IRQ_SYSMMU_MDMA0_0, | ||
26 | .flags = IORESOURCE_IRQ, | ||
27 | }, | ||
28 | [2] = { | ||
29 | .start = S5PV310_PA_SYSMMU_SSS, | ||
30 | .end = S5PV310_PA_SYSMMU_SSS + SZ_64K - 1, | ||
31 | .flags = IORESOURCE_MEM, | ||
32 | }, | ||
33 | [3] = { | ||
34 | .start = IRQ_SYSMMU_SSS_0, | ||
35 | .end = IRQ_SYSMMU_SSS_0, | ||
36 | .flags = IORESOURCE_IRQ, | ||
37 | }, | ||
38 | [4] = { | ||
39 | .start = S5PV310_PA_SYSMMU_FIMC0, | ||
40 | .end = S5PV310_PA_SYSMMU_FIMC0 + SZ_64K - 1, | ||
41 | .flags = IORESOURCE_MEM, | ||
42 | }, | ||
43 | [5] = { | ||
44 | .start = IRQ_SYSMMU_FIMC0_0, | ||
45 | .end = IRQ_SYSMMU_FIMC0_0, | ||
46 | .flags = IORESOURCE_IRQ, | ||
47 | }, | ||
48 | [6] = { | ||
49 | .start = S5PV310_PA_SYSMMU_FIMC1, | ||
50 | .end = S5PV310_PA_SYSMMU_FIMC1 + SZ_64K - 1, | ||
51 | .flags = IORESOURCE_MEM, | ||
52 | }, | ||
53 | [7] = { | ||
54 | .start = IRQ_SYSMMU_FIMC1_0, | ||
55 | .end = IRQ_SYSMMU_FIMC1_0, | ||
56 | .flags = IORESOURCE_IRQ, | ||
57 | }, | ||
58 | [8] = { | ||
59 | .start = S5PV310_PA_SYSMMU_FIMC2, | ||
60 | .end = S5PV310_PA_SYSMMU_FIMC2 + SZ_64K - 1, | ||
61 | .flags = IORESOURCE_MEM, | ||
62 | }, | ||
63 | [9] = { | ||
64 | .start = IRQ_SYSMMU_FIMC2_0, | ||
65 | .end = IRQ_SYSMMU_FIMC2_0, | ||
66 | .flags = IORESOURCE_IRQ, | ||
67 | }, | ||
68 | [10] = { | ||
69 | .start = S5PV310_PA_SYSMMU_FIMC3, | ||
70 | .end = S5PV310_PA_SYSMMU_FIMC3 + SZ_64K - 1, | ||
71 | .flags = IORESOURCE_MEM, | ||
72 | }, | ||
73 | [11] = { | ||
74 | .start = IRQ_SYSMMU_FIMC3_0, | ||
75 | .end = IRQ_SYSMMU_FIMC3_0, | ||
76 | .flags = IORESOURCE_IRQ, | ||
77 | }, | ||
78 | [12] = { | ||
79 | .start = S5PV310_PA_SYSMMU_JPEG, | ||
80 | .end = S5PV310_PA_SYSMMU_JPEG + SZ_64K - 1, | ||
81 | .flags = IORESOURCE_MEM, | ||
82 | }, | ||
83 | [13] = { | ||
84 | .start = IRQ_SYSMMU_JPEG_0, | ||
85 | .end = IRQ_SYSMMU_JPEG_0, | ||
86 | .flags = IORESOURCE_IRQ, | ||
87 | }, | ||
88 | [14] = { | ||
89 | .start = S5PV310_PA_SYSMMU_FIMD0, | ||
90 | .end = S5PV310_PA_SYSMMU_FIMD0 + SZ_64K - 1, | ||
91 | .flags = IORESOURCE_MEM, | ||
92 | }, | ||
93 | [15] = { | ||
94 | .start = IRQ_SYSMMU_LCD0_M0_0, | ||
95 | .end = IRQ_SYSMMU_LCD0_M0_0, | ||
96 | .flags = IORESOURCE_IRQ, | ||
97 | }, | ||
98 | [16] = { | ||
99 | .start = S5PV310_PA_SYSMMU_FIMD1, | ||
100 | .end = S5PV310_PA_SYSMMU_FIMD1 + SZ_64K - 1, | ||
101 | .flags = IORESOURCE_MEM, | ||
102 | }, | ||
103 | [17] = { | ||
104 | .start = IRQ_SYSMMU_LCD1_M1_0, | ||
105 | .end = IRQ_SYSMMU_LCD1_M1_0, | ||
106 | .flags = IORESOURCE_IRQ, | ||
107 | }, | ||
108 | [18] = { | ||
109 | .start = S5PV310_PA_SYSMMU_PCIe, | ||
110 | .end = S5PV310_PA_SYSMMU_PCIe + SZ_64K - 1, | ||
111 | .flags = IORESOURCE_MEM, | ||
112 | }, | ||
113 | [19] = { | ||
114 | .start = IRQ_SYSMMU_PCIE_0, | ||
115 | .end = IRQ_SYSMMU_PCIE_0, | ||
116 | .flags = IORESOURCE_IRQ, | ||
117 | }, | ||
118 | [20] = { | ||
119 | .start = S5PV310_PA_SYSMMU_G2D, | ||
120 | .end = S5PV310_PA_SYSMMU_G2D + SZ_64K - 1, | ||
121 | .flags = IORESOURCE_MEM, | ||
122 | }, | ||
123 | [21] = { | ||
124 | .start = IRQ_SYSMMU_2D_0, | ||
125 | .end = IRQ_SYSMMU_2D_0, | ||
126 | .flags = IORESOURCE_IRQ, | ||
127 | }, | ||
128 | [22] = { | ||
129 | .start = S5PV310_PA_SYSMMU_ROTATOR, | ||
130 | .end = S5PV310_PA_SYSMMU_ROTATOR + SZ_64K - 1, | ||
131 | .flags = IORESOURCE_MEM, | ||
132 | }, | ||
133 | [23] = { | ||
134 | .start = IRQ_SYSMMU_ROTATOR_0, | ||
135 | .end = IRQ_SYSMMU_ROTATOR_0, | ||
136 | .flags = IORESOURCE_IRQ, | ||
137 | }, | ||
138 | [24] = { | ||
139 | .start = S5PV310_PA_SYSMMU_MDMA2, | ||
140 | .end = S5PV310_PA_SYSMMU_MDMA2 + SZ_64K - 1, | ||
141 | .flags = IORESOURCE_MEM, | ||
142 | }, | ||
143 | [25] = { | ||
144 | .start = IRQ_SYSMMU_MDMA1_0, | ||
145 | .end = IRQ_SYSMMU_MDMA1_0, | ||
146 | .flags = IORESOURCE_IRQ, | ||
147 | }, | ||
148 | [26] = { | ||
149 | .start = S5PV310_PA_SYSMMU_TV, | ||
150 | .end = S5PV310_PA_SYSMMU_TV + SZ_64K - 1, | ||
151 | .flags = IORESOURCE_MEM, | ||
152 | }, | ||
153 | [27] = { | ||
154 | .start = IRQ_SYSMMU_TV_M0_0, | ||
155 | .end = IRQ_SYSMMU_TV_M0_0, | ||
156 | .flags = IORESOURCE_IRQ, | ||
157 | }, | ||
158 | [28] = { | ||
159 | .start = S5PV310_PA_SYSMMU_MFC_L, | ||
160 | .end = S5PV310_PA_SYSMMU_MFC_L + SZ_64K - 1, | ||
161 | .flags = IORESOURCE_MEM, | ||
162 | }, | ||
163 | [29] = { | ||
164 | .start = IRQ_SYSMMU_MFC_M0_0, | ||
165 | .end = IRQ_SYSMMU_MFC_M0_0, | ||
166 | .flags = IORESOURCE_IRQ, | ||
167 | }, | ||
168 | [30] = { | ||
169 | .start = S5PV310_PA_SYSMMU_MFC_R, | ||
170 | .end = S5PV310_PA_SYSMMU_MFC_R + SZ_64K - 1, | ||
171 | .flags = IORESOURCE_MEM, | ||
172 | }, | ||
173 | [31] = { | ||
174 | .start = IRQ_SYSMMU_MFC_M1_0, | ||
175 | .end = IRQ_SYSMMU_MFC_M1_0, | ||
176 | .flags = IORESOURCE_IRQ, | ||
177 | }, | ||
178 | }; | ||
179 | |||
180 | struct platform_device s5pv310_device_sysmmu = { | ||
181 | .name = "s5p-sysmmu", | ||
182 | .id = 32, | ||
183 | .num_resources = ARRAY_SIZE(s5pv310_sysmmu_resource), | ||
184 | .resource = s5pv310_sysmmu_resource, | ||
185 | }; | ||
186 | |||
187 | EXPORT_SYMBOL(s5pv310_device_sysmmu); | ||
diff --git a/arch/arm/mach-s5pv310/hotplug.c b/arch/arm/mach-s5pv310/hotplug.c index afa5392d9fc..c24235c89ee 100644 --- a/arch/arm/mach-s5pv310/hotplug.c +++ b/arch/arm/mach-s5pv310/hotplug.c | |||
@@ -30,10 +30,10 @@ static inline void cpu_enter_lowpower(void) | |||
30 | * Turn off coherency | 30 | * Turn off coherency |
31 | */ | 31 | */ |
32 | " mrc p15, 0, %0, c1, c0, 1\n" | 32 | " mrc p15, 0, %0, c1, c0, 1\n" |
33 | " bic %0, %0, %2\n" | 33 | " bic %0, %0, #0x20\n" |
34 | " mcr p15, 0, %0, c1, c0, 1\n" | 34 | " mcr p15, 0, %0, c1, c0, 1\n" |
35 | " mrc p15, 0, %0, c1, c0, 0\n" | 35 | " mrc p15, 0, %0, c1, c0, 0\n" |
36 | " bic %0, %0, #0x04\n" | 36 | " bic %0, %0, %2\n" |
37 | " mcr p15, 0, %0, c1, c0, 0\n" | 37 | " mcr p15, 0, %0, c1, c0, 0\n" |
38 | : "=&r" (v) | 38 | : "=&r" (v) |
39 | : "r" (0), "Ir" (CR_C) | 39 | : "r" (0), "Ir" (CR_C) |
diff --git a/arch/arm/mach-s5pv310/include/mach/irqs.h b/arch/arm/mach-s5pv310/include/mach/irqs.h index 3c05c58b539..536b0b59fc8 100644 --- a/arch/arm/mach-s5pv310/include/mach/irqs.h +++ b/arch/arm/mach-s5pv310/include/mach/irqs.h | |||
@@ -25,6 +25,8 @@ | |||
25 | 25 | ||
26 | #define IRQ_SPI(x) S5P_IRQ(x+32) | 26 | #define IRQ_SPI(x) S5P_IRQ(x+32) |
27 | 27 | ||
28 | #define IRQ_MCT1 IRQ_SPI(35) | ||
29 | |||
28 | #define IRQ_EINT0 IRQ_SPI(40) | 30 | #define IRQ_EINT0 IRQ_SPI(40) |
29 | #define IRQ_EINT1 IRQ_SPI(41) | 31 | #define IRQ_EINT1 IRQ_SPI(41) |
30 | #define IRQ_EINT2 IRQ_SPI(42) | 32 | #define IRQ_EINT2 IRQ_SPI(42) |
@@ -36,9 +38,8 @@ | |||
36 | #define IRQ_JPEG IRQ_SPI(48) | 38 | #define IRQ_JPEG IRQ_SPI(48) |
37 | #define IRQ_2D IRQ_SPI(49) | 39 | #define IRQ_2D IRQ_SPI(49) |
38 | #define IRQ_PCIE IRQ_SPI(50) | 40 | #define IRQ_PCIE IRQ_SPI(50) |
39 | #define IRQ_SYSTEM_TIMER IRQ_SPI(51) | 41 | #define IRQ_MCT0 IRQ_SPI(51) |
40 | #define IRQ_MFC IRQ_SPI(52) | 42 | #define IRQ_MFC IRQ_SPI(52) |
41 | #define IRQ_WDT IRQ_SPI(53) | ||
42 | #define IRQ_AUDIO_SS IRQ_SPI(54) | 43 | #define IRQ_AUDIO_SS IRQ_SPI(54) |
43 | #define IRQ_AC97 IRQ_SPI(55) | 44 | #define IRQ_AC97 IRQ_SPI(55) |
44 | #define IRQ_SPDIF IRQ_SPI(56) | 45 | #define IRQ_SPDIF IRQ_SPI(56) |
@@ -54,6 +55,24 @@ | |||
54 | #define COMBINER_GROUP(x) ((x) * MAX_IRQ_IN_COMBINER + IRQ_SPI(64)) | 55 | #define COMBINER_GROUP(x) ((x) * MAX_IRQ_IN_COMBINER + IRQ_SPI(64)) |
55 | #define COMBINER_IRQ(x, y) (COMBINER_GROUP(x) + y) | 56 | #define COMBINER_IRQ(x, y) (COMBINER_GROUP(x) + y) |
56 | 57 | ||
58 | #define IRQ_SYSMMU_MDMA0_0 COMBINER_IRQ(4, 0) | ||
59 | #define IRQ_SYSMMU_SSS_0 COMBINER_IRQ(4, 1) | ||
60 | #define IRQ_SYSMMU_FIMC0_0 COMBINER_IRQ(4, 2) | ||
61 | #define IRQ_SYSMMU_FIMC1_0 COMBINER_IRQ(4, 3) | ||
62 | #define IRQ_SYSMMU_FIMC2_0 COMBINER_IRQ(4, 4) | ||
63 | #define IRQ_SYSMMU_FIMC3_0 COMBINER_IRQ(4, 5) | ||
64 | #define IRQ_SYSMMU_JPEG_0 COMBINER_IRQ(4, 6) | ||
65 | #define IRQ_SYSMMU_2D_0 COMBINER_IRQ(4, 7) | ||
66 | |||
67 | #define IRQ_SYSMMU_ROTATOR_0 COMBINER_IRQ(5, 0) | ||
68 | #define IRQ_SYSMMU_MDMA1_0 COMBINER_IRQ(5, 1) | ||
69 | #define IRQ_SYSMMU_LCD0_M0_0 COMBINER_IRQ(5, 2) | ||
70 | #define IRQ_SYSMMU_LCD1_M1_0 COMBINER_IRQ(5, 3) | ||
71 | #define IRQ_SYSMMU_TV_M0_0 COMBINER_IRQ(5, 4) | ||
72 | #define IRQ_SYSMMU_MFC_M0_0 COMBINER_IRQ(5, 5) | ||
73 | #define IRQ_SYSMMU_MFC_M1_0 COMBINER_IRQ(5, 6) | ||
74 | #define IRQ_SYSMMU_PCIE_0 COMBINER_IRQ(5, 7) | ||
75 | |||
57 | #define IRQ_PDMA0 COMBINER_IRQ(21, 0) | 76 | #define IRQ_PDMA0 COMBINER_IRQ(21, 0) |
58 | #define IRQ_PDMA1 COMBINER_IRQ(21, 1) | 77 | #define IRQ_PDMA1 COMBINER_IRQ(21, 1) |
59 | 78 | ||
@@ -86,8 +105,13 @@ | |||
86 | #define IRQ_HSMMC2 COMBINER_IRQ(29, 2) | 105 | #define IRQ_HSMMC2 COMBINER_IRQ(29, 2) |
87 | #define IRQ_HSMMC3 COMBINER_IRQ(29, 3) | 106 | #define IRQ_HSMMC3 COMBINER_IRQ(29, 3) |
88 | 107 | ||
108 | #define IRQ_MIPI_CSIS0 COMBINER_IRQ(30, 0) | ||
109 | #define IRQ_MIPI_CSIS1 COMBINER_IRQ(30, 1) | ||
110 | |||
89 | #define IRQ_ONENAND_AUDI COMBINER_IRQ(34, 0) | 111 | #define IRQ_ONENAND_AUDI COMBINER_IRQ(34, 0) |
90 | 112 | ||
113 | #define IRQ_MCT_L1 COMBINER_IRQ(35, 3) | ||
114 | |||
91 | #define IRQ_EINT4 COMBINER_IRQ(37, 0) | 115 | #define IRQ_EINT4 COMBINER_IRQ(37, 0) |
92 | #define IRQ_EINT5 COMBINER_IRQ(37, 1) | 116 | #define IRQ_EINT5 COMBINER_IRQ(37, 1) |
93 | #define IRQ_EINT6 COMBINER_IRQ(37, 2) | 117 | #define IRQ_EINT6 COMBINER_IRQ(37, 2) |
@@ -104,7 +128,11 @@ | |||
104 | 128 | ||
105 | #define IRQ_EINT16_31 COMBINER_IRQ(39, 0) | 129 | #define IRQ_EINT16_31 COMBINER_IRQ(39, 0) |
106 | 130 | ||
107 | #define MAX_COMBINER_NR 40 | 131 | #define IRQ_MCT_L0 COMBINER_IRQ(51, 0) |
132 | |||
133 | #define IRQ_WDT COMBINER_IRQ(53, 0) | ||
134 | |||
135 | #define MAX_COMBINER_NR 54 | ||
108 | 136 | ||
109 | #define S5P_IRQ_EINT_BASE COMBINER_IRQ(MAX_COMBINER_NR, 0) | 137 | #define S5P_IRQ_EINT_BASE COMBINER_IRQ(MAX_COMBINER_NR, 0) |
110 | 138 | ||
diff --git a/arch/arm/mach-s5pv310/include/mach/map.h b/arch/arm/mach-s5pv310/include/mach/map.h index 53994467605..3060f78e12a 100644 --- a/arch/arm/mach-s5pv310/include/mach/map.h +++ b/arch/arm/mach-s5pv310/include/mach/map.h | |||
@@ -39,11 +39,15 @@ | |||
39 | #define S5PV310_PA_SYSCON (0x10010000) | 39 | #define S5PV310_PA_SYSCON (0x10010000) |
40 | #define S5P_PA_SYSCON S5PV310_PA_SYSCON | 40 | #define S5P_PA_SYSCON S5PV310_PA_SYSCON |
41 | 41 | ||
42 | #define S5PV310_PA_PMU (0x10020000) | ||
43 | |||
42 | #define S5PV310_PA_CMU (0x10030000) | 44 | #define S5PV310_PA_CMU (0x10030000) |
43 | 45 | ||
44 | #define S5PV310_PA_WATCHDOG (0x10060000) | 46 | #define S5PV310_PA_WATCHDOG (0x10060000) |
45 | #define S5PV310_PA_RTC (0x10070000) | 47 | #define S5PV310_PA_RTC (0x10070000) |
46 | 48 | ||
49 | #define S5PV310_PA_DMC0 (0x10400000) | ||
50 | |||
47 | #define S5PV310_PA_COMBINER (0x10448000) | 51 | #define S5PV310_PA_COMBINER (0x10448000) |
48 | 52 | ||
49 | #define S5PV310_PA_COREPERI (0x10500000) | 53 | #define S5PV310_PA_COREPERI (0x10500000) |
@@ -61,9 +65,13 @@ | |||
61 | #define S5PV310_PA_GPIO2 (0x11000000) | 65 | #define S5PV310_PA_GPIO2 (0x11000000) |
62 | #define S5PV310_PA_GPIO3 (0x03860000) | 66 | #define S5PV310_PA_GPIO3 (0x03860000) |
63 | 67 | ||
68 | #define S5PV310_PA_MIPI_CSIS0 0x11880000 | ||
69 | #define S5PV310_PA_MIPI_CSIS1 0x11890000 | ||
70 | |||
64 | #define S5PV310_PA_HSMMC(x) (0x12510000 + ((x) * 0x10000)) | 71 | #define S5PV310_PA_HSMMC(x) (0x12510000 + ((x) * 0x10000)) |
65 | 72 | ||
66 | #define S5PV310_PA_SROMC (0x12570000) | 73 | #define S5PV310_PA_SROMC (0x12570000) |
74 | #define S5P_PA_SROMC S5PV310_PA_SROMC | ||
67 | 75 | ||
68 | /* S/PDIF */ | 76 | /* S/PDIF */ |
69 | #define S5PV310_PA_SPDIF 0xE1100000 | 77 | #define S5PV310_PA_SPDIF 0xE1100000 |
@@ -100,6 +108,23 @@ | |||
100 | #define S5PV310_PA_SDRAM (0x40000000) | 108 | #define S5PV310_PA_SDRAM (0x40000000) |
101 | #define S5P_PA_SDRAM S5PV310_PA_SDRAM | 109 | #define S5P_PA_SDRAM S5PV310_PA_SDRAM |
102 | 110 | ||
111 | #define S5PV310_PA_SYSMMU_MDMA 0x10A40000 | ||
112 | #define S5PV310_PA_SYSMMU_SSS 0x10A50000 | ||
113 | #define S5PV310_PA_SYSMMU_FIMC0 0x11A20000 | ||
114 | #define S5PV310_PA_SYSMMU_FIMC1 0x11A30000 | ||
115 | #define S5PV310_PA_SYSMMU_FIMC2 0x11A40000 | ||
116 | #define S5PV310_PA_SYSMMU_FIMC3 0x11A50000 | ||
117 | #define S5PV310_PA_SYSMMU_JPEG 0x11A60000 | ||
118 | #define S5PV310_PA_SYSMMU_FIMD0 0x11E20000 | ||
119 | #define S5PV310_PA_SYSMMU_FIMD1 0x12220000 | ||
120 | #define S5PV310_PA_SYSMMU_PCIe 0x12620000 | ||
121 | #define S5PV310_PA_SYSMMU_G2D 0x12A20000 | ||
122 | #define S5PV310_PA_SYSMMU_ROTATOR 0x12A30000 | ||
123 | #define S5PV310_PA_SYSMMU_MDMA2 0x12A40000 | ||
124 | #define S5PV310_PA_SYSMMU_TV 0x12E20000 | ||
125 | #define S5PV310_PA_SYSMMU_MFC_L 0x13620000 | ||
126 | #define S5PV310_PA_SYSMMU_MFC_R 0x13630000 | ||
127 | |||
103 | /* compatibiltiy defines. */ | 128 | /* compatibiltiy defines. */ |
104 | #define S3C_PA_UART S5PV310_PA_UART | 129 | #define S3C_PA_UART S5PV310_PA_UART |
105 | #define S3C_PA_HSMMC0 S5PV310_PA_HSMMC(0) | 130 | #define S3C_PA_HSMMC0 S5PV310_PA_HSMMC(0) |
@@ -116,5 +141,7 @@ | |||
116 | #define S3C_PA_IIC7 S5PV310_PA_IIC(7) | 141 | #define S3C_PA_IIC7 S5PV310_PA_IIC(7) |
117 | #define S3C_PA_RTC S5PV310_PA_RTC | 142 | #define S3C_PA_RTC S5PV310_PA_RTC |
118 | #define S3C_PA_WDT S5PV310_PA_WATCHDOG | 143 | #define S3C_PA_WDT S5PV310_PA_WATCHDOG |
144 | #define S5P_PA_MIPI_CSIS0 S5PV310_PA_MIPI_CSIS0 | ||
145 | #define S5P_PA_MIPI_CSIS1 S5PV310_PA_MIPI_CSIS1 | ||
119 | 146 | ||
120 | #endif /* __ASM_ARCH_MAP_H */ | 147 | #endif /* __ASM_ARCH_MAP_H */ |
diff --git a/arch/arm/mach-s5pv310/include/mach/regs-clock.h b/arch/arm/mach-s5pv310/include/mach/regs-clock.h index f1028cad978..b5c4ada1cff 100644 --- a/arch/arm/mach-s5pv310/include/mach/regs-clock.h +++ b/arch/arm/mach-s5pv310/include/mach/regs-clock.h | |||
@@ -19,6 +19,12 @@ | |||
19 | 19 | ||
20 | #define S5P_INFORM0 S5P_CLKREG(0x800) | 20 | #define S5P_INFORM0 S5P_CLKREG(0x800) |
21 | 21 | ||
22 | #define S5P_CLKDIV_LEFTBUS S5P_CLKREG(0x04500) | ||
23 | #define S5P_CLKDIV_STAT_LEFTBUS S5P_CLKREG(0x04600) | ||
24 | |||
25 | #define S5P_CLKDIV_RIGHTBUS S5P_CLKREG(0x08500) | ||
26 | #define S5P_CLKDIV_STAT_RIGHTBUS S5P_CLKREG(0x08600) | ||
27 | |||
22 | #define S5P_EPLL_CON0 S5P_CLKREG(0x0C110) | 28 | #define S5P_EPLL_CON0 S5P_CLKREG(0x0C110) |
23 | #define S5P_EPLL_CON1 S5P_CLKREG(0x0C114) | 29 | #define S5P_EPLL_CON1 S5P_CLKREG(0x0C114) |
24 | #define S5P_VPLL_CON0 S5P_CLKREG(0x0C120) | 30 | #define S5P_VPLL_CON0 S5P_CLKREG(0x0C120) |
@@ -58,6 +64,8 @@ | |||
58 | #define S5P_CLKSRC_MASK_PERIL0 S5P_CLKREG(0x0C350) | 64 | #define S5P_CLKSRC_MASK_PERIL0 S5P_CLKREG(0x0C350) |
59 | #define S5P_CLKSRC_MASK_PERIL1 S5P_CLKREG(0x0C354) | 65 | #define S5P_CLKSRC_MASK_PERIL1 S5P_CLKREG(0x0C354) |
60 | 66 | ||
67 | #define S5P_CLKDIV_STAT_TOP S5P_CLKREG(0x0C610) | ||
68 | |||
61 | #define S5P_CLKGATE_IP_CAM S5P_CLKREG(0x0C920) | 69 | #define S5P_CLKGATE_IP_CAM S5P_CLKREG(0x0C920) |
62 | #define S5P_CLKGATE_IP_IMAGE S5P_CLKREG(0x0C930) | 70 | #define S5P_CLKGATE_IP_IMAGE S5P_CLKREG(0x0C930) |
63 | #define S5P_CLKGATE_IP_LCD0 S5P_CLKREG(0x0C934) | 71 | #define S5P_CLKGATE_IP_LCD0 S5P_CLKREG(0x0C934) |
@@ -66,8 +74,9 @@ | |||
66 | #define S5P_CLKGATE_IP_PERIL S5P_CLKREG(0x0C950) | 74 | #define S5P_CLKGATE_IP_PERIL S5P_CLKREG(0x0C950) |
67 | #define S5P_CLKGATE_IP_PERIR S5P_CLKREG(0x0C960) | 75 | #define S5P_CLKGATE_IP_PERIR S5P_CLKREG(0x0C960) |
68 | 76 | ||
69 | #define S5P_CLKSRC_CORE S5P_CLKREG(0x10200) | 77 | #define S5P_CLKSRC_DMC S5P_CLKREG(0x10200) |
70 | #define S5P_CLKDIV_CORE0 S5P_CLKREG(0x10500) | 78 | #define S5P_CLKDIV_DMC0 S5P_CLKREG(0x10500) |
79 | #define S5P_CLKDIV_STAT_DMC0 S5P_CLKREG(0x10600) | ||
71 | 80 | ||
72 | #define S5P_APLL_LOCK S5P_CLKREG(0x14000) | 81 | #define S5P_APLL_LOCK S5P_CLKREG(0x14000) |
73 | #define S5P_MPLL_LOCK S5P_CLKREG(0x14004) | 82 | #define S5P_MPLL_LOCK S5P_CLKREG(0x14004) |
@@ -80,10 +89,77 @@ | |||
80 | #define S5P_CLKMUX_STATCPU S5P_CLKREG(0x14400) | 89 | #define S5P_CLKMUX_STATCPU S5P_CLKREG(0x14400) |
81 | 90 | ||
82 | #define S5P_CLKDIV_CPU S5P_CLKREG(0x14500) | 91 | #define S5P_CLKDIV_CPU S5P_CLKREG(0x14500) |
92 | #define S5P_CLKDIV_CPU1 S5P_CLKREG(0x14504) | ||
83 | #define S5P_CLKDIV_STATCPU S5P_CLKREG(0x14600) | 93 | #define S5P_CLKDIV_STATCPU S5P_CLKREG(0x14600) |
94 | #define S5P_CLKDIV_STATCPU1 S5P_CLKREG(0x14604) | ||
84 | 95 | ||
85 | #define S5P_CLKGATE_SCLKCPU S5P_CLKREG(0x14800) | 96 | #define S5P_CLKGATE_SCLKCPU S5P_CLKREG(0x14800) |
86 | 97 | ||
98 | /* APLL_LOCK */ | ||
99 | #define S5P_APLL_LOCKTIME (0x1C20) /* 300us */ | ||
100 | |||
101 | /* APLL_CON0 */ | ||
102 | #define S5P_APLLCON0_ENABLE_SHIFT (31) | ||
103 | #define S5P_APLLCON0_LOCKED_SHIFT (29) | ||
104 | #define S5P_APLL_VAL_1000 ((250 << 16) | (6 << 8) | 1) | ||
105 | #define S5P_APLL_VAL_800 ((200 << 16) | (6 << 8) | 1) | ||
106 | |||
107 | /* CLK_SRC_CPU */ | ||
108 | #define S5P_CLKSRC_CPU_MUXCORE_SHIFT (16) | ||
109 | #define S5P_CLKMUX_STATCPU_MUXCORE_MASK (0x7 << S5P_CLKSRC_CPU_MUXCORE_SHIFT) | ||
110 | |||
111 | /* CLKDIV_CPU0 */ | ||
112 | #define S5P_CLKDIV_CPU0_CORE_SHIFT (0) | ||
113 | #define S5P_CLKDIV_CPU0_CORE_MASK (0x7 << S5P_CLKDIV_CPU0_CORE_SHIFT) | ||
114 | #define S5P_CLKDIV_CPU0_COREM0_SHIFT (4) | ||
115 | #define S5P_CLKDIV_CPU0_COREM0_MASK (0x7 << S5P_CLKDIV_CPU0_COREM0_SHIFT) | ||
116 | #define S5P_CLKDIV_CPU0_COREM1_SHIFT (8) | ||
117 | #define S5P_CLKDIV_CPU0_COREM1_MASK (0x7 << S5P_CLKDIV_CPU0_COREM1_SHIFT) | ||
118 | #define S5P_CLKDIV_CPU0_PERIPH_SHIFT (12) | ||
119 | #define S5P_CLKDIV_CPU0_PERIPH_MASK (0x7 << S5P_CLKDIV_CPU0_PERIPH_SHIFT) | ||
120 | #define S5P_CLKDIV_CPU0_ATB_SHIFT (16) | ||
121 | #define S5P_CLKDIV_CPU0_ATB_MASK (0x7 << S5P_CLKDIV_CPU0_ATB_SHIFT) | ||
122 | #define S5P_CLKDIV_CPU0_PCLKDBG_SHIFT (20) | ||
123 | #define S5P_CLKDIV_CPU0_PCLKDBG_MASK (0x7 << S5P_CLKDIV_CPU0_PCLKDBG_SHIFT) | ||
124 | #define S5P_CLKDIV_CPU0_APLL_SHIFT (24) | ||
125 | #define S5P_CLKDIV_CPU0_APLL_MASK (0x7 << S5P_CLKDIV_CPU0_APLL_SHIFT) | ||
126 | |||
127 | /* CLKDIV_DMC0 */ | ||
128 | #define S5P_CLKDIV_DMC0_ACP_SHIFT (0) | ||
129 | #define S5P_CLKDIV_DMC0_ACP_MASK (0x7 << S5P_CLKDIV_DMC0_ACP_SHIFT) | ||
130 | #define S5P_CLKDIV_DMC0_ACPPCLK_SHIFT (4) | ||
131 | #define S5P_CLKDIV_DMC0_ACPPCLK_MASK (0x7 << S5P_CLKDIV_DMC0_ACPPCLK_SHIFT) | ||
132 | #define S5P_CLKDIV_DMC0_DPHY_SHIFT (8) | ||
133 | #define S5P_CLKDIV_DMC0_DPHY_MASK (0x7 << S5P_CLKDIV_DMC0_DPHY_SHIFT) | ||
134 | #define S5P_CLKDIV_DMC0_DMC_SHIFT (12) | ||
135 | #define S5P_CLKDIV_DMC0_DMC_MASK (0x7 << S5P_CLKDIV_DMC0_DMC_SHIFT) | ||
136 | #define S5P_CLKDIV_DMC0_DMCD_SHIFT (16) | ||
137 | #define S5P_CLKDIV_DMC0_DMCD_MASK (0x7 << S5P_CLKDIV_DMC0_DMCD_SHIFT) | ||
138 | #define S5P_CLKDIV_DMC0_DMCP_SHIFT (20) | ||
139 | #define S5P_CLKDIV_DMC0_DMCP_MASK (0x7 << S5P_CLKDIV_DMC0_DMCP_SHIFT) | ||
140 | #define S5P_CLKDIV_DMC0_COPY2_SHIFT (24) | ||
141 | #define S5P_CLKDIV_DMC0_COPY2_MASK (0x7 << S5P_CLKDIV_DMC0_COPY2_SHIFT) | ||
142 | #define S5P_CLKDIV_DMC0_CORETI_SHIFT (28) | ||
143 | #define S5P_CLKDIV_DMC0_CORETI_MASK (0x7 << S5P_CLKDIV_DMC0_CORETI_SHIFT) | ||
144 | |||
145 | /* CLKDIV_TOP */ | ||
146 | #define S5P_CLKDIV_TOP_ACLK200_SHIFT (0) | ||
147 | #define S5P_CLKDIV_TOP_ACLK200_MASK (0x7 << S5P_CLKDIV_TOP_ACLK200_SHIFT) | ||
148 | #define S5P_CLKDIV_TOP_ACLK100_SHIFT (4) | ||
149 | #define S5P_CLKDIV_TOP_ACLK100_MASK (0xf << S5P_CLKDIV_TOP_ACLK100_SHIFT) | ||
150 | #define S5P_CLKDIV_TOP_ACLK160_SHIFT (8) | ||
151 | #define S5P_CLKDIV_TOP_ACLK160_MASK (0x7 << S5P_CLKDIV_TOP_ACLK160_SHIFT) | ||
152 | #define S5P_CLKDIV_TOP_ACLK133_SHIFT (12) | ||
153 | #define S5P_CLKDIV_TOP_ACLK133_MASK (0x7 << S5P_CLKDIV_TOP_ACLK133_SHIFT) | ||
154 | #define S5P_CLKDIV_TOP_ONENAND_SHIFT (16) | ||
155 | #define S5P_CLKDIV_TOP_ONENAND_MASK (0x7 << S5P_CLKDIV_TOP_ONENAND_SHIFT) | ||
156 | |||
157 | /* CLKDIV_LEFTBUS / CLKDIV_RIGHTBUS*/ | ||
158 | #define S5P_CLKDIV_BUS_GDLR_SHIFT (0) | ||
159 | #define S5P_CLKDIV_BUS_GDLR_MASK (0x7 << S5P_CLKDIV_BUS_GDLR_SHIFT) | ||
160 | #define S5P_CLKDIV_BUS_GPLR_SHIFT (4) | ||
161 | #define S5P_CLKDIV_BUS_GPLR_MASK (0x7 << S5P_CLKDIV_BUS_GPLR_SHIFT) | ||
162 | |||
87 | /* Compatibility defines */ | 163 | /* Compatibility defines */ |
88 | 164 | ||
89 | #define S5P_EPLL_CON S5P_EPLL_CON0 | 165 | #define S5P_EPLL_CON S5P_EPLL_CON0 |
diff --git a/arch/arm/mach-s5pv310/include/mach/regs-mem.h b/arch/arm/mach-s5pv310/include/mach/regs-mem.h new file mode 100644 index 00000000000..834227140ea --- /dev/null +++ b/arch/arm/mach-s5pv310/include/mach/regs-mem.h | |||
@@ -0,0 +1,23 @@ | |||
1 | /* linux/arch/arm/mach-s5pv310/include/mach/regs-mem.h | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com | ||
5 | * | ||
6 | * S5PV310 - SROMC and DMC register definitions | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_REGS_MEM_H | ||
14 | #define __ASM_ARCH_REGS_MEM_H __FILE__ | ||
15 | |||
16 | #include <mach/map.h> | ||
17 | |||
18 | #define S5P_DMC0_MEMCON_OFFSET 0x04 | ||
19 | |||
20 | #define S5P_DMC0_MEMTYPE_SHIFT 8 | ||
21 | #define S5P_DMC0_MEMTYPE_MASK 0xF | ||
22 | |||
23 | #endif /* __ASM_ARCH_REGS_MEM_H */ | ||
diff --git a/arch/arm/mach-s5pv310/include/mach/regs-pmu.h b/arch/arm/mach-s5pv310/include/mach/regs-pmu.h new file mode 100644 index 00000000000..fb333d0f607 --- /dev/null +++ b/arch/arm/mach-s5pv310/include/mach/regs-pmu.h | |||
@@ -0,0 +1,30 @@ | |||
1 | /* linux/arch/arm/mach-s5pv310/include/mach/regs-pmu.h | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com | ||
5 | * | ||
6 | * S5PV310 - Power management unit definition | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_REGS_PMU_H | ||
14 | #define __ASM_ARCH_REGS_PMU_H __FILE__ | ||
15 | |||
16 | #include <mach/map.h> | ||
17 | |||
18 | #define S5P_PMUREG(x) (S5P_VA_PMU + (x)) | ||
19 | |||
20 | #define S5P_PMU_CAM_CONF S5P_PMUREG(0x3C00) | ||
21 | #define S5P_PMU_TV_CONF S5P_PMUREG(0x3C20) | ||
22 | #define S5P_PMU_MFC_CONF S5P_PMUREG(0x3C40) | ||
23 | #define S5P_PMU_G3D_CONF S5P_PMUREG(0x3C60) | ||
24 | #define S5P_PMU_LCD0_CONF S5P_PMUREG(0x3C80) | ||
25 | #define S5P_PMU_LCD1_CONF S5P_PMUREG(0x3CA0) | ||
26 | #define S5P_PMU_GPS_CONF S5P_PMUREG(0x3CE0) | ||
27 | |||
28 | #define S5P_INT_LOCAL_PWR_EN 0x7 | ||
29 | |||
30 | #endif /* __ASM_ARCH_REGS_PMU_H */ | ||
diff --git a/arch/arm/mach-s5pv310/include/mach/regs-srom.h b/arch/arm/mach-s5pv310/include/mach/regs-srom.h deleted file mode 100644 index 1898b3e1055..00000000000 --- a/arch/arm/mach-s5pv310/include/mach/regs-srom.h +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5pv310/include/mach/regs-srom.h | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com | ||
5 | * | ||
6 | * S5PV310 - SROMC register definitions | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_REGS_SROM_H | ||
14 | #define __ASM_ARCH_REGS_SROM_H __FILE__ | ||
15 | |||
16 | #include <mach/map.h> | ||
17 | |||
18 | #define S5PV310_SROMREG(x) (S5P_VA_SROMC + (x)) | ||
19 | |||
20 | #define S5PV310_SROM_BW S5PV310_SROMREG(0x0) | ||
21 | #define S5PV310_SROM_BC0 S5PV310_SROMREG(0x4) | ||
22 | #define S5PV310_SROM_BC1 S5PV310_SROMREG(0x8) | ||
23 | #define S5PV310_SROM_BC2 S5PV310_SROMREG(0xc) | ||
24 | #define S5PV310_SROM_BC3 S5PV310_SROMREG(0x10) | ||
25 | |||
26 | /* one register BW holds 4 x 4-bit packed settings for NCS0 - NCS3 */ | ||
27 | |||
28 | #define S5PV310_SROM_BW__DATAWIDTH__SHIFT 0 | ||
29 | #define S5PV310_SROM_BW__ADDRMODE__SHIFT 1 | ||
30 | #define S5PV310_SROM_BW__WAITENABLE__SHIFT 2 | ||
31 | #define S5PV310_SROM_BW__BYTEENABLE__SHIFT 3 | ||
32 | |||
33 | #define S5PV310_SROM_BW__CS_MASK 0xf | ||
34 | |||
35 | #define S5PV310_SROM_BW__NCS0__SHIFT 0 | ||
36 | #define S5PV310_SROM_BW__NCS1__SHIFT 4 | ||
37 | #define S5PV310_SROM_BW__NCS2__SHIFT 8 | ||
38 | #define S5PV310_SROM_BW__NCS3__SHIFT 12 | ||
39 | |||
40 | /* applies to same to BCS0 - BCS3 */ | ||
41 | |||
42 | #define S5PV310_SROM_BCX__PMC__SHIFT 0 | ||
43 | #define S5PV310_SROM_BCX__TACP__SHIFT 4 | ||
44 | #define S5PV310_SROM_BCX__TCAH__SHIFT 8 | ||
45 | #define S5PV310_SROM_BCX__TCOH__SHIFT 12 | ||
46 | #define S5PV310_SROM_BCX__TACC__SHIFT 16 | ||
47 | #define S5PV310_SROM_BCX__TCOS__SHIFT 24 | ||
48 | #define S5PV310_SROM_BCX__TACS__SHIFT 28 | ||
49 | |||
50 | #endif /* __ASM_ARCH_REGS_SROM_H */ | ||
diff --git a/arch/arm/mach-s5pv310/include/mach/regs-sysmmu.h b/arch/arm/mach-s5pv310/include/mach/regs-sysmmu.h new file mode 100644 index 00000000000..0b28e81a16f --- /dev/null +++ b/arch/arm/mach-s5pv310/include/mach/regs-sysmmu.h | |||
@@ -0,0 +1,24 @@ | |||
1 | /* linux/arch/arm/mach-s5pv310/include/mach/regs-sysmmu.h | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com | ||
5 | * | ||
6 | * S5PV310 - System MMU register | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_REGS_SYSMMU_H | ||
14 | #define __ASM_ARCH_REGS_SYSMMU_H __FILE__ | ||
15 | |||
16 | #define S5P_MMU_CTRL 0x000 | ||
17 | #define S5P_MMU_CFG 0x004 | ||
18 | #define S5P_MMU_STATUS 0x008 | ||
19 | #define S5P_MMU_FLUSH 0x00C | ||
20 | #define S5P_PT_BASE_ADDR 0x014 | ||
21 | #define S5P_INT_STATUS 0x018 | ||
22 | #define S5P_PAGE_FAULT_ADDR 0x024 | ||
23 | |||
24 | #endif /* __ASM_ARCH_REGS_SYSMMU_H */ | ||
diff --git a/arch/arm/mach-s5pv310/include/mach/sysmmu.h b/arch/arm/mach-s5pv310/include/mach/sysmmu.h new file mode 100644 index 00000000000..598fc5c9211 --- /dev/null +++ b/arch/arm/mach-s5pv310/include/mach/sysmmu.h | |||
@@ -0,0 +1,122 @@ | |||
1 | /* linux/arch/arm/mach-s5pv310/include/mach/sysmmu.h | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * Samsung sysmmu driver for S5PV310 | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARM_ARCH_SYSMMU_H | ||
14 | #define __ASM_ARM_ARCH_SYSMMU_H __FILE__ | ||
15 | |||
16 | #define S5PV310_SYSMMU_TOTAL_IPNUM 16 | ||
17 | #define S5P_SYSMMU_TOTAL_IPNUM S5PV310_SYSMMU_TOTAL_IPNUM | ||
18 | |||
19 | enum s5pv310_sysmmu_ips { | ||
20 | SYSMMU_MDMA, | ||
21 | SYSMMU_SSS, | ||
22 | SYSMMU_FIMC0, | ||
23 | SYSMMU_FIMC1, | ||
24 | SYSMMU_FIMC2, | ||
25 | SYSMMU_FIMC3, | ||
26 | SYSMMU_JPEG, | ||
27 | SYSMMU_FIMD0, | ||
28 | SYSMMU_FIMD1, | ||
29 | SYSMMU_PCIe, | ||
30 | SYSMMU_G2D, | ||
31 | SYSMMU_ROTATOR, | ||
32 | SYSMMU_MDMA2, | ||
33 | SYSMMU_TV, | ||
34 | SYSMMU_MFC_L, | ||
35 | SYSMMU_MFC_R, | ||
36 | }; | ||
37 | |||
38 | static char *sysmmu_ips_name[S5PV310_SYSMMU_TOTAL_IPNUM] = { | ||
39 | "SYSMMU_MDMA" , | ||
40 | "SYSMMU_SSS" , | ||
41 | "SYSMMU_FIMC0" , | ||
42 | "SYSMMU_FIMC1" , | ||
43 | "SYSMMU_FIMC2" , | ||
44 | "SYSMMU_FIMC3" , | ||
45 | "SYSMMU_JPEG" , | ||
46 | "SYSMMU_FIMD0" , | ||
47 | "SYSMMU_FIMD1" , | ||
48 | "SYSMMU_PCIe" , | ||
49 | "SYSMMU_G2D" , | ||
50 | "SYSMMU_ROTATOR", | ||
51 | "SYSMMU_MDMA2" , | ||
52 | "SYSMMU_TV" , | ||
53 | "SYSMMU_MFC_L" , | ||
54 | "SYSMMU_MFC_R" , | ||
55 | }; | ||
56 | |||
57 | typedef enum s5pv310_sysmmu_ips sysmmu_ips; | ||
58 | |||
59 | struct sysmmu_tt_info { | ||
60 | unsigned long *pgd; | ||
61 | unsigned long pgd_paddr; | ||
62 | unsigned long *pte; | ||
63 | }; | ||
64 | |||
65 | struct sysmmu_controller { | ||
66 | const char *name; | ||
67 | |||
68 | /* channels registers */ | ||
69 | void __iomem *regs; | ||
70 | |||
71 | /* channel irq */ | ||
72 | unsigned int irq; | ||
73 | |||
74 | sysmmu_ips ips; | ||
75 | |||
76 | /* Translation Table Info. */ | ||
77 | struct sysmmu_tt_info *tt_info; | ||
78 | |||
79 | struct resource *mem; | ||
80 | struct device *dev; | ||
81 | |||
82 | /* SysMMU controller enable - true : enable */ | ||
83 | bool enable; | ||
84 | }; | ||
85 | |||
86 | /** | ||
87 | * s5p_sysmmu_enable() - enable system mmu of ip | ||
88 | * @ips: The ip connected system mmu. | ||
89 | * | ||
90 | * This function enable system mmu to transfer address | ||
91 | * from virtual address to physical address | ||
92 | */ | ||
93 | int s5p_sysmmu_enable(sysmmu_ips ips); | ||
94 | |||
95 | /** | ||
96 | * s5p_sysmmu_disable() - disable sysmmu mmu of ip | ||
97 | * @ips: The ip connected system mmu. | ||
98 | * | ||
99 | * This function disable system mmu to transfer address | ||
100 | * from virtual address to physical address | ||
101 | */ | ||
102 | int s5p_sysmmu_disable(sysmmu_ips ips); | ||
103 | |||
104 | /** | ||
105 | * s5p_sysmmu_set_tablebase_pgd() - set page table base address to refer page table | ||
106 | * @ips: The ip connected system mmu. | ||
107 | * @pgd: The page table base address. | ||
108 | * | ||
109 | * This function set page table base address | ||
110 | * When system mmu transfer address from virtaul address to physical address, | ||
111 | * system mmu refer address information from page table | ||
112 | */ | ||
113 | int s5p_sysmmu_set_tablebase_pgd(sysmmu_ips ips, unsigned long pgd); | ||
114 | |||
115 | /** | ||
116 | * s5p_sysmmu_tlb_invalidate() - flush all TLB entry in system mmu | ||
117 | * @ips: The ip connected system mmu. | ||
118 | * | ||
119 | * This function flush all TLB entry in system mmu | ||
120 | */ | ||
121 | int s5p_sysmmu_tlb_invalidate(sysmmu_ips ips); | ||
122 | #endif /* __ASM_ARM_ARCH_SYSMMU_H */ | ||
diff --git a/arch/arm/mach-s5pv310/irq-combiner.c b/arch/arm/mach-s5pv310/irq-combiner.c index c3f88c3faf6..1ea4a9e83bb 100644 --- a/arch/arm/mach-s5pv310/irq-combiner.c +++ b/arch/arm/mach-s5pv310/irq-combiner.c | |||
@@ -24,29 +24,32 @@ static DEFINE_SPINLOCK(irq_controller_lock); | |||
24 | 24 | ||
25 | struct combiner_chip_data { | 25 | struct combiner_chip_data { |
26 | unsigned int irq_offset; | 26 | unsigned int irq_offset; |
27 | unsigned int irq_mask; | ||
27 | void __iomem *base; | 28 | void __iomem *base; |
28 | }; | 29 | }; |
29 | 30 | ||
30 | static struct combiner_chip_data combiner_data[MAX_COMBINER_NR]; | 31 | static struct combiner_chip_data combiner_data[MAX_COMBINER_NR]; |
31 | 32 | ||
32 | static inline void __iomem *combiner_base(unsigned int irq) | 33 | static inline void __iomem *combiner_base(struct irq_data *data) |
33 | { | 34 | { |
34 | struct combiner_chip_data *combiner_data = get_irq_chip_data(irq); | 35 | struct combiner_chip_data *combiner_data = |
36 | irq_data_get_irq_chip_data(data); | ||
37 | |||
35 | return combiner_data->base; | 38 | return combiner_data->base; |
36 | } | 39 | } |
37 | 40 | ||
38 | static void combiner_mask_irq(unsigned int irq) | 41 | static void combiner_mask_irq(struct irq_data *data) |
39 | { | 42 | { |
40 | u32 mask = 1 << (irq % 32); | 43 | u32 mask = 1 << (data->irq % 32); |
41 | 44 | ||
42 | __raw_writel(mask, combiner_base(irq) + COMBINER_ENABLE_CLEAR); | 45 | __raw_writel(mask, combiner_base(data) + COMBINER_ENABLE_CLEAR); |
43 | } | 46 | } |
44 | 47 | ||
45 | static void combiner_unmask_irq(unsigned int irq) | 48 | static void combiner_unmask_irq(struct irq_data *data) |
46 | { | 49 | { |
47 | u32 mask = 1 << (irq % 32); | 50 | u32 mask = 1 << (data->irq % 32); |
48 | 51 | ||
49 | __raw_writel(mask, combiner_base(irq) + COMBINER_ENABLE_SET); | 52 | __raw_writel(mask, combiner_base(data) + COMBINER_ENABLE_SET); |
50 | } | 53 | } |
51 | 54 | ||
52 | static void combiner_handle_cascade_irq(unsigned int irq, struct irq_desc *desc) | 55 | static void combiner_handle_cascade_irq(unsigned int irq, struct irq_desc *desc) |
@@ -57,11 +60,12 @@ static void combiner_handle_cascade_irq(unsigned int irq, struct irq_desc *desc) | |||
57 | unsigned long status; | 60 | unsigned long status; |
58 | 61 | ||
59 | /* primary controller ack'ing */ | 62 | /* primary controller ack'ing */ |
60 | chip->ack(irq); | 63 | chip->irq_ack(&desc->irq_data); |
61 | 64 | ||
62 | spin_lock(&irq_controller_lock); | 65 | spin_lock(&irq_controller_lock); |
63 | status = __raw_readl(chip_data->base + COMBINER_INT_STATUS); | 66 | status = __raw_readl(chip_data->base + COMBINER_INT_STATUS); |
64 | spin_unlock(&irq_controller_lock); | 67 | spin_unlock(&irq_controller_lock); |
68 | status &= chip_data->irq_mask; | ||
65 | 69 | ||
66 | if (status == 0) | 70 | if (status == 0) |
67 | goto out; | 71 | goto out; |
@@ -76,13 +80,13 @@ static void combiner_handle_cascade_irq(unsigned int irq, struct irq_desc *desc) | |||
76 | 80 | ||
77 | out: | 81 | out: |
78 | /* primary controller unmasking */ | 82 | /* primary controller unmasking */ |
79 | chip->unmask(irq); | 83 | chip->irq_unmask(&desc->irq_data); |
80 | } | 84 | } |
81 | 85 | ||
82 | static struct irq_chip combiner_chip = { | 86 | static struct irq_chip combiner_chip = { |
83 | .name = "COMBINER", | 87 | .name = "COMBINER", |
84 | .mask = combiner_mask_irq, | 88 | .irq_mask = combiner_mask_irq, |
85 | .unmask = combiner_unmask_irq, | 89 | .irq_unmask = combiner_unmask_irq, |
86 | }; | 90 | }; |
87 | 91 | ||
88 | void __init combiner_cascade_irq(unsigned int combiner_nr, unsigned int irq) | 92 | void __init combiner_cascade_irq(unsigned int combiner_nr, unsigned int irq) |
@@ -104,10 +108,12 @@ void __init combiner_init(unsigned int combiner_nr, void __iomem *base, | |||
104 | 108 | ||
105 | combiner_data[combiner_nr].base = base; | 109 | combiner_data[combiner_nr].base = base; |
106 | combiner_data[combiner_nr].irq_offset = irq_start; | 110 | combiner_data[combiner_nr].irq_offset = irq_start; |
111 | combiner_data[combiner_nr].irq_mask = 0xff << ((combiner_nr % 4) << 3); | ||
107 | 112 | ||
108 | /* Disable all interrupts */ | 113 | /* Disable all interrupts */ |
109 | 114 | ||
110 | __raw_writel(0xffffffff, base + COMBINER_ENABLE_CLEAR); | 115 | __raw_writel(combiner_data[combiner_nr].irq_mask, |
116 | base + COMBINER_ENABLE_CLEAR); | ||
111 | 117 | ||
112 | /* Setup the Linux IRQ subsystem */ | 118 | /* Setup the Linux IRQ subsystem */ |
113 | 119 | ||
diff --git a/arch/arm/mach-s5pv310/irq-eint.c b/arch/arm/mach-s5pv310/irq-eint.c index 5877503e92c..477bd9e97f0 100644 --- a/arch/arm/mach-s5pv310/irq-eint.c +++ b/arch/arm/mach-s5pv310/irq-eint.c | |||
@@ -48,42 +48,43 @@ static unsigned int s5pv310_get_irq_nr(unsigned int number) | |||
48 | return ret; | 48 | return ret; |
49 | } | 49 | } |
50 | 50 | ||
51 | static inline void s5pv310_irq_eint_mask(unsigned int irq) | 51 | static inline void s5pv310_irq_eint_mask(struct irq_data *data) |
52 | { | 52 | { |
53 | u32 mask; | 53 | u32 mask; |
54 | 54 | ||
55 | spin_lock(&eint_lock); | 55 | spin_lock(&eint_lock); |
56 | mask = __raw_readl(S5P_EINT_MASK(EINT_REG_NR(irq))); | 56 | mask = __raw_readl(S5P_EINT_MASK(EINT_REG_NR(data->irq))); |
57 | mask |= eint_irq_to_bit(irq); | 57 | mask |= eint_irq_to_bit(data->irq); |
58 | __raw_writel(mask, S5P_EINT_MASK(EINT_REG_NR(irq))); | 58 | __raw_writel(mask, S5P_EINT_MASK(EINT_REG_NR(data->irq))); |
59 | spin_unlock(&eint_lock); | 59 | spin_unlock(&eint_lock); |
60 | } | 60 | } |
61 | 61 | ||
62 | static void s5pv310_irq_eint_unmask(unsigned int irq) | 62 | static void s5pv310_irq_eint_unmask(struct irq_data *data) |
63 | { | 63 | { |
64 | u32 mask; | 64 | u32 mask; |
65 | 65 | ||
66 | spin_lock(&eint_lock); | 66 | spin_lock(&eint_lock); |
67 | mask = __raw_readl(S5P_EINT_MASK(EINT_REG_NR(irq))); | 67 | mask = __raw_readl(S5P_EINT_MASK(EINT_REG_NR(data->irq))); |
68 | mask &= ~(eint_irq_to_bit(irq)); | 68 | mask &= ~(eint_irq_to_bit(data->irq)); |
69 | __raw_writel(mask, S5P_EINT_MASK(EINT_REG_NR(irq))); | 69 | __raw_writel(mask, S5P_EINT_MASK(EINT_REG_NR(data->irq))); |
70 | spin_unlock(&eint_lock); | 70 | spin_unlock(&eint_lock); |
71 | } | 71 | } |
72 | 72 | ||
73 | static inline void s5pv310_irq_eint_ack(unsigned int irq) | 73 | static inline void s5pv310_irq_eint_ack(struct irq_data *data) |
74 | { | 74 | { |
75 | __raw_writel(eint_irq_to_bit(irq), S5P_EINT_PEND(EINT_REG_NR(irq))); | 75 | __raw_writel(eint_irq_to_bit(data->irq), |
76 | S5P_EINT_PEND(EINT_REG_NR(data->irq))); | ||
76 | } | 77 | } |
77 | 78 | ||
78 | static void s5pv310_irq_eint_maskack(unsigned int irq) | 79 | static void s5pv310_irq_eint_maskack(struct irq_data *data) |
79 | { | 80 | { |
80 | s5pv310_irq_eint_mask(irq); | 81 | s5pv310_irq_eint_mask(data); |
81 | s5pv310_irq_eint_ack(irq); | 82 | s5pv310_irq_eint_ack(data); |
82 | } | 83 | } |
83 | 84 | ||
84 | static int s5pv310_irq_eint_set_type(unsigned int irq, unsigned int type) | 85 | static int s5pv310_irq_eint_set_type(struct irq_data *data, unsigned int type) |
85 | { | 86 | { |
86 | int offs = EINT_OFFSET(irq); | 87 | int offs = EINT_OFFSET(data->irq); |
87 | int shift; | 88 | int shift; |
88 | u32 ctrl, mask; | 89 | u32 ctrl, mask; |
89 | u32 newvalue = 0; | 90 | u32 newvalue = 0; |
@@ -118,10 +119,10 @@ static int s5pv310_irq_eint_set_type(unsigned int irq, unsigned int type) | |||
118 | mask = 0x7 << shift; | 119 | mask = 0x7 << shift; |
119 | 120 | ||
120 | spin_lock(&eint_lock); | 121 | spin_lock(&eint_lock); |
121 | ctrl = __raw_readl(S5P_EINT_CON(EINT_REG_NR(irq))); | 122 | ctrl = __raw_readl(S5P_EINT_CON(EINT_REG_NR(data->irq))); |
122 | ctrl &= ~mask; | 123 | ctrl &= ~mask; |
123 | ctrl |= newvalue << shift; | 124 | ctrl |= newvalue << shift; |
124 | __raw_writel(ctrl, S5P_EINT_CON(EINT_REG_NR(irq))); | 125 | __raw_writel(ctrl, S5P_EINT_CON(EINT_REG_NR(data->irq))); |
125 | spin_unlock(&eint_lock); | 126 | spin_unlock(&eint_lock); |
126 | 127 | ||
127 | switch (offs) { | 128 | switch (offs) { |
@@ -146,13 +147,13 @@ static int s5pv310_irq_eint_set_type(unsigned int irq, unsigned int type) | |||
146 | 147 | ||
147 | static struct irq_chip s5pv310_irq_eint = { | 148 | static struct irq_chip s5pv310_irq_eint = { |
148 | .name = "s5pv310-eint", | 149 | .name = "s5pv310-eint", |
149 | .mask = s5pv310_irq_eint_mask, | 150 | .irq_mask = s5pv310_irq_eint_mask, |
150 | .unmask = s5pv310_irq_eint_unmask, | 151 | .irq_unmask = s5pv310_irq_eint_unmask, |
151 | .mask_ack = s5pv310_irq_eint_maskack, | 152 | .irq_mask_ack = s5pv310_irq_eint_maskack, |
152 | .ack = s5pv310_irq_eint_ack, | 153 | .irq_ack = s5pv310_irq_eint_ack, |
153 | .set_type = s5pv310_irq_eint_set_type, | 154 | .irq_set_type = s5pv310_irq_eint_set_type, |
154 | #ifdef CONFIG_PM | 155 | #ifdef CONFIG_PM |
155 | .set_wake = s3c_irqext_wake, | 156 | .irq_set_wake = s3c_irqext_wake, |
156 | #endif | 157 | #endif |
157 | }; | 158 | }; |
158 | 159 | ||
@@ -192,14 +193,14 @@ static void s5pv310_irq_eint0_15(unsigned int irq, struct irq_desc *desc) | |||
192 | u32 *irq_data = get_irq_data(irq); | 193 | u32 *irq_data = get_irq_data(irq); |
193 | struct irq_chip *chip = get_irq_chip(irq); | 194 | struct irq_chip *chip = get_irq_chip(irq); |
194 | 195 | ||
195 | chip->mask(irq); | 196 | chip->irq_mask(&desc->irq_data); |
196 | 197 | ||
197 | if (chip->ack) | 198 | if (chip->irq_ack) |
198 | chip->ack(irq); | 199 | chip->irq_ack(&desc->irq_data); |
199 | 200 | ||
200 | generic_handle_irq(*irq_data); | 201 | generic_handle_irq(*irq_data); |
201 | 202 | ||
202 | chip->unmask(irq); | 203 | chip->irq_unmask(&desc->irq_data); |
203 | } | 204 | } |
204 | 205 | ||
205 | int __init s5pv310_init_irq_eint(void) | 206 | int __init s5pv310_init_irq_eint(void) |
diff --git a/arch/arm/mach-s5pv310/mach-smdkc210.c b/arch/arm/mach-s5pv310/mach-smdkc210.c index 2b8d4fc52d7..d9cab02e23c 100644 --- a/arch/arm/mach-s5pv310/mach-smdkc210.c +++ b/arch/arm/mach-s5pv310/mach-smdkc210.c | |||
@@ -14,18 +14,21 @@ | |||
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <linux/smsc911x.h> | 15 | #include <linux/smsc911x.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/i2c.h> | ||
17 | 18 | ||
18 | #include <asm/mach/arch.h> | 19 | #include <asm/mach/arch.h> |
19 | #include <asm/mach-types.h> | 20 | #include <asm/mach-types.h> |
20 | 21 | ||
21 | #include <plat/regs-serial.h> | 22 | #include <plat/regs-serial.h> |
23 | #include <plat/regs-srom.h> | ||
22 | #include <plat/s5pv310.h> | 24 | #include <plat/s5pv310.h> |
23 | #include <plat/cpu.h> | 25 | #include <plat/cpu.h> |
24 | #include <plat/devs.h> | 26 | #include <plat/devs.h> |
25 | #include <plat/sdhci.h> | 27 | #include <plat/sdhci.h> |
28 | #include <plat/iic.h> | ||
29 | #include <plat/pd.h> | ||
26 | 30 | ||
27 | #include <mach/map.h> | 31 | #include <mach/map.h> |
28 | #include <mach/regs-srom.h> | ||
29 | 32 | ||
30 | /* Following are default values for UCON, ULCON and UFCON UART registers */ | 33 | /* Following are default values for UCON, ULCON and UFCON UART registers */ |
31 | #define SMDKC210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | 34 | #define SMDKC210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ |
@@ -139,13 +142,29 @@ static struct platform_device smdkc210_smsc911x = { | |||
139 | }, | 142 | }, |
140 | }; | 143 | }; |
141 | 144 | ||
145 | static struct i2c_board_info i2c_devs1[] __initdata = { | ||
146 | {I2C_BOARD_INFO("wm8994", 0x1a),}, | ||
147 | }; | ||
148 | |||
142 | static struct platform_device *smdkc210_devices[] __initdata = { | 149 | static struct platform_device *smdkc210_devices[] __initdata = { |
143 | &s3c_device_hsmmc0, | 150 | &s3c_device_hsmmc0, |
144 | &s3c_device_hsmmc1, | 151 | &s3c_device_hsmmc1, |
145 | &s3c_device_hsmmc2, | 152 | &s3c_device_hsmmc2, |
146 | &s3c_device_hsmmc3, | 153 | &s3c_device_hsmmc3, |
154 | &s3c_device_i2c1, | ||
147 | &s3c_device_rtc, | 155 | &s3c_device_rtc, |
148 | &s3c_device_wdt, | 156 | &s3c_device_wdt, |
157 | &s5pv310_device_ac97, | ||
158 | &s5pv310_device_i2s0, | ||
159 | &s5pv310_device_pd[PD_MFC], | ||
160 | &s5pv310_device_pd[PD_G3D], | ||
161 | &s5pv310_device_pd[PD_LCD0], | ||
162 | &s5pv310_device_pd[PD_LCD1], | ||
163 | &s5pv310_device_pd[PD_CAM], | ||
164 | &s5pv310_device_pd[PD_TV], | ||
165 | &s5pv310_device_pd[PD_GPS], | ||
166 | &s5pv310_device_sysmmu, | ||
167 | &samsung_asoc_dma, | ||
149 | &smdkc210_smsc911x, | 168 | &smdkc210_smsc911x, |
150 | }; | 169 | }; |
151 | 170 | ||
@@ -154,23 +173,22 @@ static void __init smdkc210_smsc911x_init(void) | |||
154 | u32 cs1; | 173 | u32 cs1; |
155 | 174 | ||
156 | /* configure nCS1 width to 16 bits */ | 175 | /* configure nCS1 width to 16 bits */ |
157 | cs1 = __raw_readl(S5PV310_SROM_BW) & | 176 | cs1 = __raw_readl(S5P_SROM_BW) & |
158 | ~(S5PV310_SROM_BW__CS_MASK << | 177 | ~(S5P_SROM_BW__CS_MASK << S5P_SROM_BW__NCS1__SHIFT); |
159 | S5PV310_SROM_BW__NCS1__SHIFT); | 178 | cs1 |= ((1 << S5P_SROM_BW__DATAWIDTH__SHIFT) | |
160 | cs1 |= ((1 << S5PV310_SROM_BW__DATAWIDTH__SHIFT) | | 179 | (1 << S5P_SROM_BW__WAITENABLE__SHIFT) | |
161 | (1 << S5PV310_SROM_BW__WAITENABLE__SHIFT) | | 180 | (1 << S5P_SROM_BW__BYTEENABLE__SHIFT)) << |
162 | (1 << S5PV310_SROM_BW__BYTEENABLE__SHIFT)) << | 181 | S5P_SROM_BW__NCS1__SHIFT; |
163 | S5PV310_SROM_BW__NCS1__SHIFT; | 182 | __raw_writel(cs1, S5P_SROM_BW); |
164 | __raw_writel(cs1, S5PV310_SROM_BW); | ||
165 | 183 | ||
166 | /* set timing for nCS1 suitable for ethernet chip */ | 184 | /* set timing for nCS1 suitable for ethernet chip */ |
167 | __raw_writel((0x1 << S5PV310_SROM_BCX__PMC__SHIFT) | | 185 | __raw_writel((0x1 << S5P_SROM_BCX__PMC__SHIFT) | |
168 | (0x9 << S5PV310_SROM_BCX__TACP__SHIFT) | | 186 | (0x9 << S5P_SROM_BCX__TACP__SHIFT) | |
169 | (0xc << S5PV310_SROM_BCX__TCAH__SHIFT) | | 187 | (0xc << S5P_SROM_BCX__TCAH__SHIFT) | |
170 | (0x1 << S5PV310_SROM_BCX__TCOH__SHIFT) | | 188 | (0x1 << S5P_SROM_BCX__TCOH__SHIFT) | |
171 | (0x6 << S5PV310_SROM_BCX__TACC__SHIFT) | | 189 | (0x6 << S5P_SROM_BCX__TACC__SHIFT) | |
172 | (0x1 << S5PV310_SROM_BCX__TCOS__SHIFT) | | 190 | (0x1 << S5P_SROM_BCX__TCOS__SHIFT) | |
173 | (0x1 << S5PV310_SROM_BCX__TACS__SHIFT), S5PV310_SROM_BC1); | 191 | (0x1 << S5P_SROM_BCX__TACS__SHIFT), S5P_SROM_BC1); |
174 | } | 192 | } |
175 | 193 | ||
176 | static void __init smdkc210_map_io(void) | 194 | static void __init smdkc210_map_io(void) |
@@ -182,6 +200,9 @@ static void __init smdkc210_map_io(void) | |||
182 | 200 | ||
183 | static void __init smdkc210_machine_init(void) | 201 | static void __init smdkc210_machine_init(void) |
184 | { | 202 | { |
203 | s3c_i2c1_set_platdata(NULL); | ||
204 | i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1)); | ||
205 | |||
185 | smdkc210_smsc911x_init(); | 206 | smdkc210_smsc911x_init(); |
186 | 207 | ||
187 | s3c_sdhci0_set_platdata(&smdkc210_hsmmc0_pdata); | 208 | s3c_sdhci0_set_platdata(&smdkc210_hsmmc0_pdata); |
diff --git a/arch/arm/mach-s5pv310/mach-smdkv310.c b/arch/arm/mach-s5pv310/mach-smdkv310.c index 35826d66632..b1cddbf3c61 100644 --- a/arch/arm/mach-s5pv310/mach-smdkv310.c +++ b/arch/arm/mach-s5pv310/mach-smdkv310.c | |||
@@ -14,18 +14,21 @@ | |||
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <linux/smsc911x.h> | 15 | #include <linux/smsc911x.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/i2c.h> | ||
17 | 18 | ||
18 | #include <asm/mach/arch.h> | 19 | #include <asm/mach/arch.h> |
19 | #include <asm/mach-types.h> | 20 | #include <asm/mach-types.h> |
20 | 21 | ||
21 | #include <plat/regs-serial.h> | 22 | #include <plat/regs-serial.h> |
23 | #include <plat/regs-srom.h> | ||
22 | #include <plat/s5pv310.h> | 24 | #include <plat/s5pv310.h> |
23 | #include <plat/cpu.h> | 25 | #include <plat/cpu.h> |
24 | #include <plat/devs.h> | 26 | #include <plat/devs.h> |
25 | #include <plat/sdhci.h> | 27 | #include <plat/sdhci.h> |
28 | #include <plat/iic.h> | ||
29 | #include <plat/pd.h> | ||
26 | 30 | ||
27 | #include <mach/map.h> | 31 | #include <mach/map.h> |
28 | #include <mach/regs-srom.h> | ||
29 | 32 | ||
30 | /* Following are default values for UCON, ULCON and UFCON UART registers */ | 33 | /* Following are default values for UCON, ULCON and UFCON UART registers */ |
31 | #define SMDKV310_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | 34 | #define SMDKV310_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ |
@@ -139,13 +142,29 @@ static struct platform_device smdkv310_smsc911x = { | |||
139 | }, | 142 | }, |
140 | }; | 143 | }; |
141 | 144 | ||
145 | static struct i2c_board_info i2c_devs1[] __initdata = { | ||
146 | {I2C_BOARD_INFO("wm8994", 0x1a),}, | ||
147 | }; | ||
148 | |||
142 | static struct platform_device *smdkv310_devices[] __initdata = { | 149 | static struct platform_device *smdkv310_devices[] __initdata = { |
143 | &s3c_device_hsmmc0, | 150 | &s3c_device_hsmmc0, |
144 | &s3c_device_hsmmc1, | 151 | &s3c_device_hsmmc1, |
145 | &s3c_device_hsmmc2, | 152 | &s3c_device_hsmmc2, |
146 | &s3c_device_hsmmc3, | 153 | &s3c_device_hsmmc3, |
154 | &s3c_device_i2c1, | ||
147 | &s3c_device_rtc, | 155 | &s3c_device_rtc, |
148 | &s3c_device_wdt, | 156 | &s3c_device_wdt, |
157 | &s5pv310_device_ac97, | ||
158 | &s5pv310_device_i2s0, | ||
159 | &s5pv310_device_pd[PD_MFC], | ||
160 | &s5pv310_device_pd[PD_G3D], | ||
161 | &s5pv310_device_pd[PD_LCD0], | ||
162 | &s5pv310_device_pd[PD_LCD1], | ||
163 | &s5pv310_device_pd[PD_CAM], | ||
164 | &s5pv310_device_pd[PD_TV], | ||
165 | &s5pv310_device_pd[PD_GPS], | ||
166 | &s5pv310_device_sysmmu, | ||
167 | &samsung_asoc_dma, | ||
149 | &smdkv310_smsc911x, | 168 | &smdkv310_smsc911x, |
150 | }; | 169 | }; |
151 | 170 | ||
@@ -154,23 +173,22 @@ static void __init smdkv310_smsc911x_init(void) | |||
154 | u32 cs1; | 173 | u32 cs1; |
155 | 174 | ||
156 | /* configure nCS1 width to 16 bits */ | 175 | /* configure nCS1 width to 16 bits */ |
157 | cs1 = __raw_readl(S5PV310_SROM_BW) & | 176 | cs1 = __raw_readl(S5P_SROM_BW) & |
158 | ~(S5PV310_SROM_BW__CS_MASK << | 177 | ~(S5P_SROM_BW__CS_MASK << S5P_SROM_BW__NCS1__SHIFT); |
159 | S5PV310_SROM_BW__NCS1__SHIFT); | 178 | cs1 |= ((1 << S5P_SROM_BW__DATAWIDTH__SHIFT) | |
160 | cs1 |= ((1 << S5PV310_SROM_BW__DATAWIDTH__SHIFT) | | 179 | (1 << S5P_SROM_BW__WAITENABLE__SHIFT) | |
161 | (1 << S5PV310_SROM_BW__WAITENABLE__SHIFT) | | 180 | (1 << S5P_SROM_BW__BYTEENABLE__SHIFT)) << |
162 | (1 << S5PV310_SROM_BW__BYTEENABLE__SHIFT)) << | 181 | S5P_SROM_BW__NCS1__SHIFT; |
163 | S5PV310_SROM_BW__NCS1__SHIFT; | 182 | __raw_writel(cs1, S5P_SROM_BW); |
164 | __raw_writel(cs1, S5PV310_SROM_BW); | ||
165 | 183 | ||
166 | /* set timing for nCS1 suitable for ethernet chip */ | 184 | /* set timing for nCS1 suitable for ethernet chip */ |
167 | __raw_writel((0x1 << S5PV310_SROM_BCX__PMC__SHIFT) | | 185 | __raw_writel((0x1 << S5P_SROM_BCX__PMC__SHIFT) | |
168 | (0x9 << S5PV310_SROM_BCX__TACP__SHIFT) | | 186 | (0x9 << S5P_SROM_BCX__TACP__SHIFT) | |
169 | (0xc << S5PV310_SROM_BCX__TCAH__SHIFT) | | 187 | (0xc << S5P_SROM_BCX__TCAH__SHIFT) | |
170 | (0x1 << S5PV310_SROM_BCX__TCOH__SHIFT) | | 188 | (0x1 << S5P_SROM_BCX__TCOH__SHIFT) | |
171 | (0x6 << S5PV310_SROM_BCX__TACC__SHIFT) | | 189 | (0x6 << S5P_SROM_BCX__TACC__SHIFT) | |
172 | (0x1 << S5PV310_SROM_BCX__TCOS__SHIFT) | | 190 | (0x1 << S5P_SROM_BCX__TCOS__SHIFT) | |
173 | (0x1 << S5PV310_SROM_BCX__TACS__SHIFT), S5PV310_SROM_BC1); | 191 | (0x1 << S5P_SROM_BCX__TACS__SHIFT), S5P_SROM_BC1); |
174 | } | 192 | } |
175 | 193 | ||
176 | static void __init smdkv310_map_io(void) | 194 | static void __init smdkv310_map_io(void) |
@@ -182,6 +200,9 @@ static void __init smdkv310_map_io(void) | |||
182 | 200 | ||
183 | static void __init smdkv310_machine_init(void) | 201 | static void __init smdkv310_machine_init(void) |
184 | { | 202 | { |
203 | s3c_i2c1_set_platdata(NULL); | ||
204 | i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1)); | ||
205 | |||
185 | smdkv310_smsc911x_init(); | 206 | smdkv310_smsc911x_init(); |
186 | 207 | ||
187 | s3c_sdhci0_set_platdata(&smdkv310_hsmmc0_pdata); | 208 | s3c_sdhci0_set_platdata(&smdkv310_hsmmc0_pdata); |
diff --git a/arch/arm/mach-s5pv310/mach-universal_c210.c b/arch/arm/mach-s5pv310/mach-universal_c210.c index 16d8fc00caf..36bc3cf825e 100644 --- a/arch/arm/mach-s5pv310/mach-universal_c210.c +++ b/arch/arm/mach-s5pv310/mach-universal_c210.c | |||
@@ -13,6 +13,9 @@ | |||
13 | #include <linux/i2c.h> | 13 | #include <linux/i2c.h> |
14 | #include <linux/gpio_keys.h> | 14 | #include <linux/gpio_keys.h> |
15 | #include <linux/gpio.h> | 15 | #include <linux/gpio.h> |
16 | #include <linux/regulator/machine.h> | ||
17 | #include <linux/regulator/fixed.h> | ||
18 | #include <linux/mmc/host.h> | ||
16 | 19 | ||
17 | #include <asm/mach/arch.h> | 20 | #include <asm/mach/arch.h> |
18 | #include <asm/mach-types.h> | 21 | #include <asm/mach-types.h> |
@@ -21,6 +24,7 @@ | |||
21 | #include <plat/s5pv310.h> | 24 | #include <plat/s5pv310.h> |
22 | #include <plat/cpu.h> | 25 | #include <plat/cpu.h> |
23 | #include <plat/devs.h> | 26 | #include <plat/devs.h> |
27 | #include <plat/sdhci.h> | ||
24 | 28 | ||
25 | #include <mach/map.h> | 29 | #include <mach/map.h> |
26 | 30 | ||
@@ -116,6 +120,73 @@ static struct platform_device universal_gpio_keys = { | |||
116 | }, | 120 | }, |
117 | }; | 121 | }; |
118 | 122 | ||
123 | /* eMMC */ | ||
124 | static struct s3c_sdhci_platdata universal_hsmmc0_data __initdata = { | ||
125 | .max_width = 8, | ||
126 | .host_caps = (MMC_CAP_8_BIT_DATA | MMC_CAP_4_BIT_DATA | | ||
127 | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED | | ||
128 | MMC_CAP_DISABLE), | ||
129 | .cd_type = S3C_SDHCI_CD_PERMANENT, | ||
130 | .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, | ||
131 | }; | ||
132 | |||
133 | static struct regulator_consumer_supply mmc0_supplies[] = { | ||
134 | REGULATOR_SUPPLY("vmmc", "s3c-sdhci.0"), | ||
135 | }; | ||
136 | |||
137 | static struct regulator_init_data mmc0_fixed_voltage_init_data = { | ||
138 | .constraints = { | ||
139 | .name = "VMEM_VDD_2.8V", | ||
140 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
141 | }, | ||
142 | .num_consumer_supplies = ARRAY_SIZE(mmc0_supplies), | ||
143 | .consumer_supplies = mmc0_supplies, | ||
144 | }; | ||
145 | |||
146 | static struct fixed_voltage_config mmc0_fixed_voltage_config = { | ||
147 | .supply_name = "MASSMEMORY_EN", | ||
148 | .microvolts = 2800000, | ||
149 | .gpio = S5PV310_GPE1(3), | ||
150 | .enable_high = true, | ||
151 | .init_data = &mmc0_fixed_voltage_init_data, | ||
152 | }; | ||
153 | |||
154 | static struct platform_device mmc0_fixed_voltage = { | ||
155 | .name = "reg-fixed-voltage", | ||
156 | .id = 0, | ||
157 | .dev = { | ||
158 | .platform_data = &mmc0_fixed_voltage_config, | ||
159 | }, | ||
160 | }; | ||
161 | |||
162 | /* SD */ | ||
163 | static struct s3c_sdhci_platdata universal_hsmmc2_data __initdata = { | ||
164 | .max_width = 4, | ||
165 | .host_caps = MMC_CAP_4_BIT_DATA | | ||
166 | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED | | ||
167 | MMC_CAP_DISABLE, | ||
168 | .ext_cd_gpio = S5PV310_GPX3(4), /* XEINT_28 */ | ||
169 | .ext_cd_gpio_invert = 1, | ||
170 | .cd_type = S3C_SDHCI_CD_GPIO, | ||
171 | .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, | ||
172 | }; | ||
173 | |||
174 | /* WiFi */ | ||
175 | static struct s3c_sdhci_platdata universal_hsmmc3_data __initdata = { | ||
176 | .max_width = 4, | ||
177 | .host_caps = MMC_CAP_4_BIT_DATA | | ||
178 | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED | | ||
179 | MMC_CAP_DISABLE, | ||
180 | .cd_type = S3C_SDHCI_CD_EXTERNAL, | ||
181 | }; | ||
182 | |||
183 | static void __init universal_sdhci_init(void) | ||
184 | { | ||
185 | s3c_sdhci0_set_platdata(&universal_hsmmc0_data); | ||
186 | s3c_sdhci2_set_platdata(&universal_hsmmc2_data); | ||
187 | s3c_sdhci3_set_platdata(&universal_hsmmc3_data); | ||
188 | } | ||
189 | |||
119 | /* I2C0 */ | 190 | /* I2C0 */ |
120 | static struct i2c_board_info i2c0_devs[] __initdata = { | 191 | static struct i2c_board_info i2c0_devs[] __initdata = { |
121 | /* Camera, To be updated */ | 192 | /* Camera, To be updated */ |
@@ -127,6 +198,13 @@ static struct i2c_board_info i2c1_devs[] __initdata = { | |||
127 | }; | 198 | }; |
128 | 199 | ||
129 | static struct platform_device *universal_devices[] __initdata = { | 200 | static struct platform_device *universal_devices[] __initdata = { |
201 | /* Samsung Platform Devices */ | ||
202 | &mmc0_fixed_voltage, | ||
203 | &s3c_device_hsmmc0, | ||
204 | &s3c_device_hsmmc2, | ||
205 | &s3c_device_hsmmc3, | ||
206 | |||
207 | /* Universal Devices */ | ||
130 | &universal_gpio_keys, | 208 | &universal_gpio_keys, |
131 | &s5p_device_onenand, | 209 | &s5p_device_onenand, |
132 | }; | 210 | }; |
@@ -140,6 +218,8 @@ static void __init universal_map_io(void) | |||
140 | 218 | ||
141 | static void __init universal_machine_init(void) | 219 | static void __init universal_machine_init(void) |
142 | { | 220 | { |
221 | universal_sdhci_init(); | ||
222 | |||
143 | i2c_register_board_info(0, i2c0_devs, ARRAY_SIZE(i2c0_devs)); | 223 | i2c_register_board_info(0, i2c0_devs, ARRAY_SIZE(i2c0_devs)); |
144 | i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs)); | 224 | i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs)); |
145 | 225 | ||
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c index 59d14f0fdcf..e21f3470eec 100644 --- a/arch/arm/mach-sa1100/generic.c +++ b/arch/arm/mach-sa1100/generic.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <asm/div64.h> | 21 | #include <asm/div64.h> |
22 | #include <mach/hardware.h> | 22 | #include <mach/hardware.h> |
23 | #include <asm/system.h> | 23 | #include <asm/system.h> |
24 | #include <asm/pgtable.h> | ||
25 | #include <asm/mach/map.h> | 24 | #include <asm/mach/map.h> |
26 | #include <asm/mach/flash.h> | 25 | #include <asm/mach/flash.h> |
27 | #include <asm/irq.h> | 26 | #include <asm/irq.h> |
diff --git a/arch/arm/mach-sa1100/irq.c b/arch/arm/mach-sa1100/irq.c index 3093d46a9c6..3d85dfad9c1 100644 --- a/arch/arm/mach-sa1100/irq.c +++ b/arch/arm/mach-sa1100/irq.c | |||
@@ -37,14 +37,14 @@ static int GPIO_IRQ_mask = (1 << 11) - 1; | |||
37 | #define GPIO_11_27_IRQ(i) ((i) - 21) | 37 | #define GPIO_11_27_IRQ(i) ((i) - 21) |
38 | #define GPIO11_27_MASK(irq) (1 << GPIO_11_27_IRQ(irq)) | 38 | #define GPIO11_27_MASK(irq) (1 << GPIO_11_27_IRQ(irq)) |
39 | 39 | ||
40 | static int sa1100_gpio_type(unsigned int irq, unsigned int type) | 40 | static int sa1100_gpio_type(struct irq_data *d, unsigned int type) |
41 | { | 41 | { |
42 | unsigned int mask; | 42 | unsigned int mask; |
43 | 43 | ||
44 | if (irq <= 10) | 44 | if (d->irq <= 10) |
45 | mask = 1 << irq; | 45 | mask = 1 << d->irq; |
46 | else | 46 | else |
47 | mask = GPIO11_27_MASK(irq); | 47 | mask = GPIO11_27_MASK(d->irq); |
48 | 48 | ||
49 | if (type == IRQ_TYPE_PROBE) { | 49 | if (type == IRQ_TYPE_PROBE) { |
50 | if ((GPIO_IRQ_rising_edge | GPIO_IRQ_falling_edge) & mask) | 50 | if ((GPIO_IRQ_rising_edge | GPIO_IRQ_falling_edge) & mask) |
@@ -70,37 +70,37 @@ static int sa1100_gpio_type(unsigned int irq, unsigned int type) | |||
70 | /* | 70 | /* |
71 | * GPIO IRQs must be acknowledged. This is for IRQs from 0 to 10. | 71 | * GPIO IRQs must be acknowledged. This is for IRQs from 0 to 10. |
72 | */ | 72 | */ |
73 | static void sa1100_low_gpio_ack(unsigned int irq) | 73 | static void sa1100_low_gpio_ack(struct irq_data *d) |
74 | { | 74 | { |
75 | GEDR = (1 << irq); | 75 | GEDR = (1 << d->irq); |
76 | } | 76 | } |
77 | 77 | ||
78 | static void sa1100_low_gpio_mask(unsigned int irq) | 78 | static void sa1100_low_gpio_mask(struct irq_data *d) |
79 | { | 79 | { |
80 | ICMR &= ~(1 << irq); | 80 | ICMR &= ~(1 << d->irq); |
81 | } | 81 | } |
82 | 82 | ||
83 | static void sa1100_low_gpio_unmask(unsigned int irq) | 83 | static void sa1100_low_gpio_unmask(struct irq_data *d) |
84 | { | 84 | { |
85 | ICMR |= 1 << irq; | 85 | ICMR |= 1 << d->irq; |
86 | } | 86 | } |
87 | 87 | ||
88 | static int sa1100_low_gpio_wake(unsigned int irq, unsigned int on) | 88 | static int sa1100_low_gpio_wake(struct irq_data *d, unsigned int on) |
89 | { | 89 | { |
90 | if (on) | 90 | if (on) |
91 | PWER |= 1 << irq; | 91 | PWER |= 1 << d->irq; |
92 | else | 92 | else |
93 | PWER &= ~(1 << irq); | 93 | PWER &= ~(1 << d->irq); |
94 | return 0; | 94 | return 0; |
95 | } | 95 | } |
96 | 96 | ||
97 | static struct irq_chip sa1100_low_gpio_chip = { | 97 | static struct irq_chip sa1100_low_gpio_chip = { |
98 | .name = "GPIO-l", | 98 | .name = "GPIO-l", |
99 | .ack = sa1100_low_gpio_ack, | 99 | .irq_ack = sa1100_low_gpio_ack, |
100 | .mask = sa1100_low_gpio_mask, | 100 | .irq_mask = sa1100_low_gpio_mask, |
101 | .unmask = sa1100_low_gpio_unmask, | 101 | .irq_unmask = sa1100_low_gpio_unmask, |
102 | .set_type = sa1100_gpio_type, | 102 | .irq_set_type = sa1100_gpio_type, |
103 | .set_wake = sa1100_low_gpio_wake, | 103 | .irq_set_wake = sa1100_low_gpio_wake, |
104 | }; | 104 | }; |
105 | 105 | ||
106 | /* | 106 | /* |
@@ -139,16 +139,16 @@ sa1100_high_gpio_handler(unsigned int irq, struct irq_desc *desc) | |||
139 | * In addition, the IRQs are all collected up into one bit in the | 139 | * In addition, the IRQs are all collected up into one bit in the |
140 | * interrupt controller registers. | 140 | * interrupt controller registers. |
141 | */ | 141 | */ |
142 | static void sa1100_high_gpio_ack(unsigned int irq) | 142 | static void sa1100_high_gpio_ack(struct irq_data *d) |
143 | { | 143 | { |
144 | unsigned int mask = GPIO11_27_MASK(irq); | 144 | unsigned int mask = GPIO11_27_MASK(d->irq); |
145 | 145 | ||
146 | GEDR = mask; | 146 | GEDR = mask; |
147 | } | 147 | } |
148 | 148 | ||
149 | static void sa1100_high_gpio_mask(unsigned int irq) | 149 | static void sa1100_high_gpio_mask(struct irq_data *d) |
150 | { | 150 | { |
151 | unsigned int mask = GPIO11_27_MASK(irq); | 151 | unsigned int mask = GPIO11_27_MASK(d->irq); |
152 | 152 | ||
153 | GPIO_IRQ_mask &= ~mask; | 153 | GPIO_IRQ_mask &= ~mask; |
154 | 154 | ||
@@ -156,9 +156,9 @@ static void sa1100_high_gpio_mask(unsigned int irq) | |||
156 | GFER &= ~mask; | 156 | GFER &= ~mask; |
157 | } | 157 | } |
158 | 158 | ||
159 | static void sa1100_high_gpio_unmask(unsigned int irq) | 159 | static void sa1100_high_gpio_unmask(struct irq_data *d) |
160 | { | 160 | { |
161 | unsigned int mask = GPIO11_27_MASK(irq); | 161 | unsigned int mask = GPIO11_27_MASK(d->irq); |
162 | 162 | ||
163 | GPIO_IRQ_mask |= mask; | 163 | GPIO_IRQ_mask |= mask; |
164 | 164 | ||
@@ -166,44 +166,44 @@ static void sa1100_high_gpio_unmask(unsigned int irq) | |||
166 | GFER = GPIO_IRQ_falling_edge & GPIO_IRQ_mask; | 166 | GFER = GPIO_IRQ_falling_edge & GPIO_IRQ_mask; |
167 | } | 167 | } |
168 | 168 | ||
169 | static int sa1100_high_gpio_wake(unsigned int irq, unsigned int on) | 169 | static int sa1100_high_gpio_wake(struct irq_data *d, unsigned int on) |
170 | { | 170 | { |
171 | if (on) | 171 | if (on) |
172 | PWER |= GPIO11_27_MASK(irq); | 172 | PWER |= GPIO11_27_MASK(d->irq); |
173 | else | 173 | else |
174 | PWER &= ~GPIO11_27_MASK(irq); | 174 | PWER &= ~GPIO11_27_MASK(d->irq); |
175 | return 0; | 175 | return 0; |
176 | } | 176 | } |
177 | 177 | ||
178 | static struct irq_chip sa1100_high_gpio_chip = { | 178 | static struct irq_chip sa1100_high_gpio_chip = { |
179 | .name = "GPIO-h", | 179 | .name = "GPIO-h", |
180 | .ack = sa1100_high_gpio_ack, | 180 | .irq_ack = sa1100_high_gpio_ack, |
181 | .mask = sa1100_high_gpio_mask, | 181 | .irq_mask = sa1100_high_gpio_mask, |
182 | .unmask = sa1100_high_gpio_unmask, | 182 | .irq_unmask = sa1100_high_gpio_unmask, |
183 | .set_type = sa1100_gpio_type, | 183 | .irq_set_type = sa1100_gpio_type, |
184 | .set_wake = sa1100_high_gpio_wake, | 184 | .irq_set_wake = sa1100_high_gpio_wake, |
185 | }; | 185 | }; |
186 | 186 | ||
187 | /* | 187 | /* |
188 | * We don't need to ACK IRQs on the SA1100 unless they're GPIOs | 188 | * We don't need to ACK IRQs on the SA1100 unless they're GPIOs |
189 | * this is for internal IRQs i.e. from 11 to 31. | 189 | * this is for internal IRQs i.e. from 11 to 31. |
190 | */ | 190 | */ |
191 | static void sa1100_mask_irq(unsigned int irq) | 191 | static void sa1100_mask_irq(struct irq_data *d) |
192 | { | 192 | { |
193 | ICMR &= ~(1 << irq); | 193 | ICMR &= ~(1 << d->irq); |
194 | } | 194 | } |
195 | 195 | ||
196 | static void sa1100_unmask_irq(unsigned int irq) | 196 | static void sa1100_unmask_irq(struct irq_data *d) |
197 | { | 197 | { |
198 | ICMR |= (1 << irq); | 198 | ICMR |= (1 << d->irq); |
199 | } | 199 | } |
200 | 200 | ||
201 | /* | 201 | /* |
202 | * Apart form GPIOs, only the RTC alarm can be a wakeup event. | 202 | * Apart form GPIOs, only the RTC alarm can be a wakeup event. |
203 | */ | 203 | */ |
204 | static int sa1100_set_wake(unsigned int irq, unsigned int on) | 204 | static int sa1100_set_wake(struct irq_data *d, unsigned int on) |
205 | { | 205 | { |
206 | if (irq == IRQ_RTCAlrm) { | 206 | if (d->irq == IRQ_RTCAlrm) { |
207 | if (on) | 207 | if (on) |
208 | PWER |= PWER_RTC; | 208 | PWER |= PWER_RTC; |
209 | else | 209 | else |
@@ -215,10 +215,10 @@ static int sa1100_set_wake(unsigned int irq, unsigned int on) | |||
215 | 215 | ||
216 | static struct irq_chip sa1100_normal_chip = { | 216 | static struct irq_chip sa1100_normal_chip = { |
217 | .name = "SC", | 217 | .name = "SC", |
218 | .ack = sa1100_mask_irq, | 218 | .irq_ack = sa1100_mask_irq, |
219 | .mask = sa1100_mask_irq, | 219 | .irq_mask = sa1100_mask_irq, |
220 | .unmask = sa1100_unmask_irq, | 220 | .irq_unmask = sa1100_unmask_irq, |
221 | .set_wake = sa1100_set_wake, | 221 | .irq_set_wake = sa1100_set_wake, |
222 | }; | 222 | }; |
223 | 223 | ||
224 | static struct resource irq_resource = { | 224 | static struct resource irq_resource = { |
diff --git a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c index c601a75a333..4aad01f7366 100644 --- a/arch/arm/mach-sa1100/neponset.c +++ b/arch/arm/mach-sa1100/neponset.c | |||
@@ -35,7 +35,7 @@ neponset_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
35 | /* | 35 | /* |
36 | * Acknowledge the parent IRQ. | 36 | * Acknowledge the parent IRQ. |
37 | */ | 37 | */ |
38 | desc->chip->ack(irq); | 38 | desc->irq_data.chip->irq_ack(&desc->irq_data); |
39 | 39 | ||
40 | /* | 40 | /* |
41 | * Read the interrupt reason register. Let's have all | 41 | * Read the interrupt reason register. Let's have all |
@@ -53,7 +53,7 @@ neponset_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
53 | * recheck the register for any pending IRQs. | 53 | * recheck the register for any pending IRQs. |
54 | */ | 54 | */ |
55 | if (irr & (IRR_ETHERNET | IRR_USAR)) { | 55 | if (irr & (IRR_ETHERNET | IRR_USAR)) { |
56 | desc->chip->mask(irq); | 56 | desc->irq_data.chip->irq_mask(&desc->irq_data); |
57 | 57 | ||
58 | /* | 58 | /* |
59 | * Ack the interrupt now to prevent re-entering | 59 | * Ack the interrupt now to prevent re-entering |
@@ -61,7 +61,7 @@ neponset_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
61 | * since we'll check the IRR register prior to | 61 | * since we'll check the IRR register prior to |
62 | * leaving. | 62 | * leaving. |
63 | */ | 63 | */ |
64 | desc->chip->ack(irq); | 64 | desc->irq_data.chip->irq_ack(&desc->irq_data); |
65 | 65 | ||
66 | if (irr & IRR_ETHERNET) { | 66 | if (irr & IRR_ETHERNET) { |
67 | generic_handle_irq(IRQ_NEPONSET_SMC9196); | 67 | generic_handle_irq(IRQ_NEPONSET_SMC9196); |
@@ -71,7 +71,7 @@ neponset_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
71 | generic_handle_irq(IRQ_NEPONSET_USAR); | 71 | generic_handle_irq(IRQ_NEPONSET_USAR); |
72 | } | 72 | } |
73 | 73 | ||
74 | desc->chip->unmask(irq); | 74 | desc->irq_data.chip->irq_unmask(&desc->irq_data); |
75 | } | 75 | } |
76 | 76 | ||
77 | if (irr & IRR_SA1111) { | 77 | if (irr & IRR_SA1111) { |
diff --git a/arch/arm/mach-shark/irq.c b/arch/arm/mach-shark/irq.c index c04eb6a1e2b..831fc66dfa4 100644 --- a/arch/arm/mach-shark/irq.c +++ b/arch/arm/mach-shark/irq.c | |||
@@ -30,35 +30,35 @@ static unsigned char cached_irq_mask[2] = { 0xfb, 0xff }; | |||
30 | * These have to be protected by the irq controller spinlock | 30 | * These have to be protected by the irq controller spinlock |
31 | * before being called. | 31 | * before being called. |
32 | */ | 32 | */ |
33 | static void shark_disable_8259A_irq(unsigned int irq) | 33 | static void shark_disable_8259A_irq(struct irq_data *d) |
34 | { | 34 | { |
35 | unsigned int mask; | 35 | unsigned int mask; |
36 | if (irq<8) { | 36 | if (d->irq<8) { |
37 | mask = 1 << irq; | 37 | mask = 1 << d->irq; |
38 | cached_irq_mask[0] |= mask; | 38 | cached_irq_mask[0] |= mask; |
39 | outb(cached_irq_mask[1],0xA1); | 39 | outb(cached_irq_mask[1],0xA1); |
40 | } else { | 40 | } else { |
41 | mask = 1 << (irq-8); | 41 | mask = 1 << (d->irq-8); |
42 | cached_irq_mask[1] |= mask; | 42 | cached_irq_mask[1] |= mask; |
43 | outb(cached_irq_mask[0],0x21); | 43 | outb(cached_irq_mask[0],0x21); |
44 | } | 44 | } |
45 | } | 45 | } |
46 | 46 | ||
47 | static void shark_enable_8259A_irq(unsigned int irq) | 47 | static void shark_enable_8259A_irq(struct irq_data *d) |
48 | { | 48 | { |
49 | unsigned int mask; | 49 | unsigned int mask; |
50 | if (irq<8) { | 50 | if (d->irq<8) { |
51 | mask = ~(1 << irq); | 51 | mask = ~(1 << d->irq); |
52 | cached_irq_mask[0] &= mask; | 52 | cached_irq_mask[0] &= mask; |
53 | outb(cached_irq_mask[0],0x21); | 53 | outb(cached_irq_mask[0],0x21); |
54 | } else { | 54 | } else { |
55 | mask = ~(1 << (irq-8)); | 55 | mask = ~(1 << (d->irq-8)); |
56 | cached_irq_mask[1] &= mask; | 56 | cached_irq_mask[1] &= mask; |
57 | outb(cached_irq_mask[1],0xA1); | 57 | outb(cached_irq_mask[1],0xA1); |
58 | } | 58 | } |
59 | } | 59 | } |
60 | 60 | ||
61 | static void shark_ack_8259A_irq(unsigned int irq){} | 61 | static void shark_ack_8259A_irq(struct irq_data *d){} |
62 | 62 | ||
63 | static irqreturn_t bogus_int(int irq, void *dev_id) | 63 | static irqreturn_t bogus_int(int irq, void *dev_id) |
64 | { | 64 | { |
@@ -69,10 +69,10 @@ static irqreturn_t bogus_int(int irq, void *dev_id) | |||
69 | static struct irqaction cascade; | 69 | static struct irqaction cascade; |
70 | 70 | ||
71 | static struct irq_chip fb_chip = { | 71 | static struct irq_chip fb_chip = { |
72 | .name = "XT-PIC", | 72 | .name = "XT-PIC", |
73 | .ack = shark_ack_8259A_irq, | 73 | .irq_ack = shark_ack_8259A_irq, |
74 | .mask = shark_disable_8259A_irq, | 74 | .irq_mask = shark_disable_8259A_irq, |
75 | .unmask = shark_enable_8259A_irq, | 75 | .irq_unmask = shark_enable_8259A_irq, |
76 | }; | 76 | }; |
77 | 77 | ||
78 | void __init shark_init_irq(void) | 78 | void __init shark_init_irq(void) |
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index 4d1b4c5c938..0c8f6cf3e94 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig | |||
@@ -60,6 +60,8 @@ endchoice | |||
60 | 60 | ||
61 | config MACH_AG5EVM | 61 | config MACH_AG5EVM |
62 | bool "AG5EVM board" | 62 | bool "AG5EVM board" |
63 | select ARCH_REQUIRE_GPIOLIB | ||
64 | select SH_LCD_MIPI_DSI | ||
63 | depends on ARCH_SH73A0 | 65 | depends on ARCH_SH73A0 |
64 | 66 | ||
65 | config MACH_MACKEREL | 67 | config MACH_MACKEREL |
diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c index c18a740a415..2123b96b563 100644 --- a/arch/arm/mach-shmobile/board-ag5evm.c +++ b/arch/arm/mach-shmobile/board-ag5evm.c | |||
@@ -34,9 +34,10 @@ | |||
34 | #include <linux/input/sh_keysc.h> | 34 | #include <linux/input/sh_keysc.h> |
35 | #include <linux/mmc/host.h> | 35 | #include <linux/mmc/host.h> |
36 | #include <linux/mmc/sh_mmcif.h> | 36 | #include <linux/mmc/sh_mmcif.h> |
37 | 37 | #include <linux/sh_clk.h> | |
38 | #include <video/sh_mobile_lcdc.h> | ||
39 | #include <video/sh_mipi_dsi.h> | ||
38 | #include <sound/sh_fsi.h> | 40 | #include <sound/sh_fsi.h> |
39 | |||
40 | #include <mach/hardware.h> | 41 | #include <mach/hardware.h> |
41 | #include <mach/sh73a0.h> | 42 | #include <mach/sh73a0.h> |
42 | #include <mach/common.h> | 43 | #include <mach/common.h> |
@@ -183,11 +184,165 @@ static struct platform_device mmc_device = { | |||
183 | .resource = sh_mmcif_resources, | 184 | .resource = sh_mmcif_resources, |
184 | }; | 185 | }; |
185 | 186 | ||
187 | /* IrDA */ | ||
188 | static struct resource irda_resources[] = { | ||
189 | [0] = { | ||
190 | .start = 0xE6D00000, | ||
191 | .end = 0xE6D01FD4 - 1, | ||
192 | .flags = IORESOURCE_MEM, | ||
193 | }, | ||
194 | [1] = { | ||
195 | .start = gic_spi(95), | ||
196 | .flags = IORESOURCE_IRQ, | ||
197 | }, | ||
198 | }; | ||
199 | |||
200 | static struct platform_device irda_device = { | ||
201 | .name = "sh_irda", | ||
202 | .id = 0, | ||
203 | .resource = irda_resources, | ||
204 | .num_resources = ARRAY_SIZE(irda_resources), | ||
205 | }; | ||
206 | |||
207 | static unsigned char lcd_backlight_seq[3][2] = { | ||
208 | { 0x04, 0x07 }, | ||
209 | { 0x23, 0x80 }, | ||
210 | { 0x03, 0x01 }, | ||
211 | }; | ||
212 | |||
213 | static void lcd_backlight_on(void) | ||
214 | { | ||
215 | struct i2c_adapter *a; | ||
216 | struct i2c_msg msg; | ||
217 | int k; | ||
218 | |||
219 | a = i2c_get_adapter(1); | ||
220 | for (k = 0; a && k < 3; k++) { | ||
221 | msg.addr = 0x6d; | ||
222 | msg.buf = &lcd_backlight_seq[k][0]; | ||
223 | msg.len = 2; | ||
224 | msg.flags = 0; | ||
225 | if (i2c_transfer(a, &msg, 1) != 1) | ||
226 | break; | ||
227 | } | ||
228 | } | ||
229 | |||
230 | static void lcd_backlight_reset(void) | ||
231 | { | ||
232 | gpio_set_value(GPIO_PORT235, 0); | ||
233 | mdelay(24); | ||
234 | gpio_set_value(GPIO_PORT235, 1); | ||
235 | } | ||
236 | |||
237 | static void lcd_on(void *board_data, struct fb_info *info) | ||
238 | { | ||
239 | lcd_backlight_on(); | ||
240 | } | ||
241 | |||
242 | static void lcd_off(void *board_data) | ||
243 | { | ||
244 | lcd_backlight_reset(); | ||
245 | } | ||
246 | |||
247 | /* LCDC0 */ | ||
248 | static const struct fb_videomode lcdc0_modes[] = { | ||
249 | { | ||
250 | .name = "R63302(QHD)", | ||
251 | .xres = 544, | ||
252 | .yres = 961, | ||
253 | .left_margin = 72, | ||
254 | .right_margin = 600, | ||
255 | .hsync_len = 16, | ||
256 | .upper_margin = 8, | ||
257 | .lower_margin = 8, | ||
258 | .vsync_len = 2, | ||
259 | .sync = FB_SYNC_VERT_HIGH_ACT | FB_SYNC_HOR_HIGH_ACT, | ||
260 | }, | ||
261 | }; | ||
262 | |||
263 | static struct sh_mobile_lcdc_info lcdc0_info = { | ||
264 | .clock_source = LCDC_CLK_PERIPHERAL, | ||
265 | .ch[0] = { | ||
266 | .chan = LCDC_CHAN_MAINLCD, | ||
267 | .interface_type = RGB24, | ||
268 | .clock_divider = 1, | ||
269 | .flags = LCDC_FLAGS_DWPOL, | ||
270 | .lcd_size_cfg.width = 44, | ||
271 | .lcd_size_cfg.height = 79, | ||
272 | .bpp = 16, | ||
273 | .lcd_cfg = lcdc0_modes, | ||
274 | .num_cfg = ARRAY_SIZE(lcdc0_modes), | ||
275 | .board_cfg = { | ||
276 | .display_on = lcd_on, | ||
277 | .display_off = lcd_off, | ||
278 | }, | ||
279 | } | ||
280 | }; | ||
281 | |||
282 | static struct resource lcdc0_resources[] = { | ||
283 | [0] = { | ||
284 | .name = "LCDC0", | ||
285 | .start = 0xfe940000, /* P4-only space */ | ||
286 | .end = 0xfe943fff, | ||
287 | .flags = IORESOURCE_MEM, | ||
288 | }, | ||
289 | [1] = { | ||
290 | .start = intcs_evt2irq(0x580), | ||
291 | .flags = IORESOURCE_IRQ, | ||
292 | }, | ||
293 | }; | ||
294 | |||
295 | static struct platform_device lcdc0_device = { | ||
296 | .name = "sh_mobile_lcdc_fb", | ||
297 | .num_resources = ARRAY_SIZE(lcdc0_resources), | ||
298 | .resource = lcdc0_resources, | ||
299 | .id = 0, | ||
300 | .dev = { | ||
301 | .platform_data = &lcdc0_info, | ||
302 | .coherent_dma_mask = ~0, | ||
303 | }, | ||
304 | }; | ||
305 | |||
306 | /* MIPI-DSI */ | ||
307 | static struct resource mipidsi0_resources[] = { | ||
308 | [0] = { | ||
309 | .start = 0xfeab0000, | ||
310 | .end = 0xfeab3fff, | ||
311 | .flags = IORESOURCE_MEM, | ||
312 | }, | ||
313 | [1] = { | ||
314 | .start = 0xfeab4000, | ||
315 | .end = 0xfeab7fff, | ||
316 | .flags = IORESOURCE_MEM, | ||
317 | }, | ||
318 | }; | ||
319 | |||
320 | static struct sh_mipi_dsi_info mipidsi0_info = { | ||
321 | .data_format = MIPI_RGB888, | ||
322 | .lcd_chan = &lcdc0_info.ch[0], | ||
323 | .vsynw_offset = 20, | ||
324 | .clksrc = 1, | ||
325 | .flags = SH_MIPI_DSI_HSABM, | ||
326 | }; | ||
327 | |||
328 | static struct platform_device mipidsi0_device = { | ||
329 | .name = "sh-mipi-dsi", | ||
330 | .num_resources = ARRAY_SIZE(mipidsi0_resources), | ||
331 | .resource = mipidsi0_resources, | ||
332 | .id = 0, | ||
333 | .dev = { | ||
334 | .platform_data = &mipidsi0_info, | ||
335 | }, | ||
336 | }; | ||
337 | |||
186 | static struct platform_device *ag5evm_devices[] __initdata = { | 338 | static struct platform_device *ag5evm_devices[] __initdata = { |
187 | ð_device, | 339 | ð_device, |
188 | &keysc_device, | 340 | &keysc_device, |
189 | &fsi_device, | 341 | &fsi_device, |
190 | &mmc_device, | 342 | &mmc_device, |
343 | &irda_device, | ||
344 | &lcdc0_device, | ||
345 | &mipidsi0_device, | ||
191 | }; | 346 | }; |
192 | 347 | ||
193 | static struct map_desc ag5evm_io_desc[] __initdata = { | 348 | static struct map_desc ag5evm_io_desc[] __initdata = { |
@@ -224,6 +379,8 @@ void __init ag5evm_init_irq(void) | |||
224 | __raw_writew(__raw_readw(PINTCR0A) | (2<<10), PINTCR0A); | 379 | __raw_writew(__raw_readw(PINTCR0A) | (2<<10), PINTCR0A); |
225 | } | 380 | } |
226 | 381 | ||
382 | #define DSI0PHYCR 0xe615006c | ||
383 | |||
227 | static void __init ag5evm_init(void) | 384 | static void __init ag5evm_init(void) |
228 | { | 385 | { |
229 | sh73a0_pinmux_init(); | 386 | sh73a0_pinmux_init(); |
@@ -287,6 +444,25 @@ static void __init ag5evm_init(void) | |||
287 | gpio_request(GPIO_FN_FSIAISLD, NULL); | 444 | gpio_request(GPIO_FN_FSIAISLD, NULL); |
288 | gpio_request(GPIO_FN_FSIAOSLD, NULL); | 445 | gpio_request(GPIO_FN_FSIAOSLD, NULL); |
289 | 446 | ||
447 | /* IrDA */ | ||
448 | gpio_request(GPIO_FN_PORT241_IRDA_OUT, NULL); | ||
449 | gpio_request(GPIO_FN_PORT242_IRDA_IN, NULL); | ||
450 | gpio_request(GPIO_FN_PORT243_IRDA_FIRSEL, NULL); | ||
451 | |||
452 | /* LCD panel */ | ||
453 | gpio_request(GPIO_PORT217, NULL); /* RESET */ | ||
454 | gpio_direction_output(GPIO_PORT217, 0); | ||
455 | mdelay(1); | ||
456 | gpio_set_value(GPIO_PORT217, 1); | ||
457 | |||
458 | /* LCD backlight controller */ | ||
459 | gpio_request(GPIO_PORT235, NULL); /* RESET */ | ||
460 | gpio_direction_output(GPIO_PORT235, 0); | ||
461 | lcd_backlight_reset(); | ||
462 | |||
463 | /* MIPI-DSI clock setup */ | ||
464 | __raw_writel(0x2a809010, DSI0PHYCR); | ||
465 | |||
290 | #ifdef CONFIG_CACHE_L2X0 | 466 | #ifdef CONFIG_CACHE_L2X0 |
291 | /* Shared attribute override enable, 64K*8way */ | 467 | /* Shared attribute override enable, 64K*8way */ |
292 | l2x0_init(__io(0xf0100000), 0x00460000, 0xc2000fff); | 468 | l2x0_init(__io(0xf0100000), 0x00460000, 0xc2000fff); |
diff --git a/arch/arm/mach-shmobile/board-g3evm.c b/arch/arm/mach-shmobile/board-g3evm.c index 686b304a770..ef4613b993a 100644 --- a/arch/arm/mach-shmobile/board-g3evm.c +++ b/arch/arm/mach-shmobile/board-g3evm.c | |||
@@ -347,7 +347,6 @@ static void __init g3evm_init(void) | |||
347 | gpio_request(GPIO_FN_IRDA_OUT, NULL); | 347 | gpio_request(GPIO_FN_IRDA_OUT, NULL); |
348 | gpio_request(GPIO_FN_IRDA_IN, NULL); | 348 | gpio_request(GPIO_FN_IRDA_IN, NULL); |
349 | gpio_request(GPIO_FN_IRDA_FIRSEL, NULL); | 349 | gpio_request(GPIO_FN_IRDA_FIRSEL, NULL); |
350 | set_irq_type(evt2irq(0x480), IRQ_TYPE_LEVEL_LOW); | ||
351 | 350 | ||
352 | sh7367_add_standard_devices(); | 351 | sh7367_add_standard_devices(); |
353 | 352 | ||
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index 7b15d21f0f6..fb4213a4e15 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c | |||
@@ -169,9 +169,8 @@ | |||
169 | * SW1 | SW33 | 169 | * SW1 | SW33 |
170 | * | bit1 | bit2 | bit3 | bit4 | 170 | * | bit1 | bit2 | bit3 | bit4 |
171 | * -------------+------+------+------+------- | 171 | * -------------+------+------+------+------- |
172 | * MMC0 OFF | OFF | ON | ON | X | 172 | * MMC0 OFF | OFF | X | ON | X (Use MMCIF) |
173 | * MMC1 ON | OFF | ON | X | ON | 173 | * SDHI1 OFF | ON | X | OFF | X (Use MFD_SH_MOBILE_SDHI) |
174 | * SDHI1 OFF | ON | X | OFF | ON | ||
175 | * | 174 | * |
176 | */ | 175 | */ |
177 | 176 | ||
diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c index 9aa8d68d1a9..e9731b5a73e 100644 --- a/arch/arm/mach-shmobile/clock-sh7372.c +++ b/arch/arm/mach-shmobile/clock-sh7372.c | |||
@@ -234,7 +234,9 @@ static int pllc2_set_rate(struct clk *clk, unsigned long rate) | |||
234 | 234 | ||
235 | value = __raw_readl(PLLC2CR) & ~(0x3f << 24); | 235 | value = __raw_readl(PLLC2CR) & ~(0x3f << 24); |
236 | 236 | ||
237 | __raw_writel((value & ~0x80000000) | ((idx + 19) << 24), PLLC2CR); | 237 | __raw_writel(value | ((idx + 19) << 24), PLLC2CR); |
238 | |||
239 | clk->rate = clk->freq_table[idx].frequency; | ||
238 | 240 | ||
239 | return 0; | 241 | return 0; |
240 | } | 242 | } |
diff --git a/arch/arm/mach-shmobile/clock-sh73a0.c b/arch/arm/mach-shmobile/clock-sh73a0.c index 720a71433be..ddd4a1b775f 100644 --- a/arch/arm/mach-shmobile/clock-sh73a0.c +++ b/arch/arm/mach-shmobile/clock-sh73a0.c | |||
@@ -118,8 +118,16 @@ static unsigned long pll_recalc(struct clk *clk) | |||
118 | { | 118 | { |
119 | unsigned long mult = 1; | 119 | unsigned long mult = 1; |
120 | 120 | ||
121 | if (__raw_readl(PLLECR) & (1 << clk->enable_bit)) | 121 | if (__raw_readl(PLLECR) & (1 << clk->enable_bit)) { |
122 | mult = (((__raw_readl(clk->enable_reg) >> 24) & 0x3f) + 1); | 122 | mult = (((__raw_readl(clk->enable_reg) >> 24) & 0x3f) + 1); |
123 | /* handle CFG bit for PLL1 and PLL2 */ | ||
124 | switch (clk->enable_bit) { | ||
125 | case 1: | ||
126 | case 2: | ||
127 | if (__raw_readl(clk->enable_reg) & (1 << 20)) | ||
128 | mult *= 2; | ||
129 | } | ||
130 | } | ||
123 | 131 | ||
124 | return clk->parent->rate * mult; | 132 | return clk->parent->rate * mult; |
125 | } | 133 | } |
@@ -212,7 +220,7 @@ enum { DIV4_I, DIV4_ZG, DIV4_M3, DIV4_B, DIV4_M1, DIV4_M2, | |||
212 | static struct clk div4_clks[DIV4_NR] = { | 220 | static struct clk div4_clks[DIV4_NR] = { |
213 | [DIV4_I] = DIV4(FRQCRA, 20, 0xfff, CLK_ENABLE_ON_INIT), | 221 | [DIV4_I] = DIV4(FRQCRA, 20, 0xfff, CLK_ENABLE_ON_INIT), |
214 | [DIV4_ZG] = DIV4(FRQCRA, 16, 0xbff, CLK_ENABLE_ON_INIT), | 222 | [DIV4_ZG] = DIV4(FRQCRA, 16, 0xbff, CLK_ENABLE_ON_INIT), |
215 | [DIV4_M3] = DIV4(FRQCRA, 8, 0xfff, CLK_ENABLE_ON_INIT), | 223 | [DIV4_M3] = DIV4(FRQCRA, 12, 0xfff, CLK_ENABLE_ON_INIT), |
216 | [DIV4_B] = DIV4(FRQCRA, 8, 0xfff, CLK_ENABLE_ON_INIT), | 224 | [DIV4_B] = DIV4(FRQCRA, 8, 0xfff, CLK_ENABLE_ON_INIT), |
217 | [DIV4_M1] = DIV4(FRQCRA, 4, 0xfff, 0), | 225 | [DIV4_M1] = DIV4(FRQCRA, 4, 0xfff, 0), |
218 | [DIV4_M2] = DIV4(FRQCRA, 0, 0xfff, 0), | 226 | [DIV4_M2] = DIV4(FRQCRA, 0, 0xfff, 0), |
@@ -255,10 +263,10 @@ static struct clk div6_clks[DIV6_NR] = { | |||
255 | }; | 263 | }; |
256 | 264 | ||
257 | enum { MSTP001, | 265 | enum { MSTP001, |
258 | MSTP125, MSTP116, | 266 | MSTP125, MSTP118, MSTP116, MSTP100, |
259 | MSTP219, | 267 | MSTP219, |
260 | MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200, | 268 | MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200, |
261 | MSTP331, MSTP329, MSTP323, MSTP312, | 269 | MSTP331, MSTP329, MSTP325, MSTP323, MSTP312, |
262 | MSTP411, MSTP410, MSTP403, | 270 | MSTP411, MSTP410, MSTP403, |
263 | MSTP_NR }; | 271 | MSTP_NR }; |
264 | 272 | ||
@@ -268,7 +276,9 @@ enum { MSTP001, | |||
268 | static struct clk mstp_clks[MSTP_NR] = { | 276 | static struct clk mstp_clks[MSTP_NR] = { |
269 | [MSTP001] = MSTP(&div4_clks[DIV4_HP], SMSTPCR0, 1, 0), /* IIC2 */ | 277 | [MSTP001] = MSTP(&div4_clks[DIV4_HP], SMSTPCR0, 1, 0), /* IIC2 */ |
270 | [MSTP125] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR1, 25, 0), /* TMU0 */ | 278 | [MSTP125] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR1, 25, 0), /* TMU0 */ |
279 | [MSTP118] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 18, 0), /* DSITX0 */ | ||
271 | [MSTP116] = MSTP(&div4_clks[DIV4_HP], SMSTPCR1, 16, 0), /* IIC0 */ | 280 | [MSTP116] = MSTP(&div4_clks[DIV4_HP], SMSTPCR1, 16, 0), /* IIC0 */ |
281 | [MSTP100] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 0, 0), /* LCDC0 */ | ||
272 | [MSTP219] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 19, 0), /* SCIFA7 */ | 282 | [MSTP219] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 19, 0), /* SCIFA7 */ |
273 | [MSTP207] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 7, 0), /* SCIFA5 */ | 283 | [MSTP207] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 7, 0), /* SCIFA5 */ |
274 | [MSTP206] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 6, 0), /* SCIFB */ | 284 | [MSTP206] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 6, 0), /* SCIFB */ |
@@ -279,6 +289,7 @@ static struct clk mstp_clks[MSTP_NR] = { | |||
279 | [MSTP200] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 0, 0), /* SCIFA4 */ | 289 | [MSTP200] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 0, 0), /* SCIFA4 */ |
280 | [MSTP331] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 31, 0), /* SCIFA6 */ | 290 | [MSTP331] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 31, 0), /* SCIFA6 */ |
281 | [MSTP329] = MSTP(&r_clk, SMSTPCR3, 29, 0), /* CMT10 */ | 291 | [MSTP329] = MSTP(&r_clk, SMSTPCR3, 29, 0), /* CMT10 */ |
292 | [MSTP325] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 25, 0), /* IrDA */ | ||
282 | [MSTP323] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 23, 0), /* IIC1 */ | 293 | [MSTP323] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 23, 0), /* IIC1 */ |
283 | [MSTP312] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 12, 0), /* MMCIF0 */ | 294 | [MSTP312] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 12, 0), /* MMCIF0 */ |
284 | [MSTP411] = MSTP(&div4_clks[DIV4_HP], SMSTPCR4, 11, 0), /* IIC3 */ | 295 | [MSTP411] = MSTP(&div4_clks[DIV4_HP], SMSTPCR4, 11, 0), /* IIC3 */ |
@@ -288,16 +299,25 @@ static struct clk mstp_clks[MSTP_NR] = { | |||
288 | 299 | ||
289 | #define CLKDEV_CON_ID(_id, _clk) { .con_id = _id, .clk = _clk } | 300 | #define CLKDEV_CON_ID(_id, _clk) { .con_id = _id, .clk = _clk } |
290 | #define CLKDEV_DEV_ID(_id, _clk) { .dev_id = _id, .clk = _clk } | 301 | #define CLKDEV_DEV_ID(_id, _clk) { .dev_id = _id, .clk = _clk } |
302 | #define CLKDEV_ICK_ID(_cid, _did, _clk) { .con_id = _cid, .dev_id = _did, .clk = _clk } | ||
291 | 303 | ||
292 | static struct clk_lookup lookups[] = { | 304 | static struct clk_lookup lookups[] = { |
293 | /* main clocks */ | 305 | /* main clocks */ |
294 | CLKDEV_CON_ID("r_clk", &r_clk), | 306 | CLKDEV_CON_ID("r_clk", &r_clk), |
295 | 307 | ||
308 | /* DIV6 clocks */ | ||
309 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSIT]), | ||
310 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSIT]), | ||
311 | CLKDEV_ICK_ID("dsi0p_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSI0P]), | ||
312 | CLKDEV_ICK_ID("dsi1p_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSI1P]), | ||
313 | |||
296 | /* MSTP32 clocks */ | 314 | /* MSTP32 clocks */ |
297 | CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* I2C2 */ | 315 | CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* I2C2 */ |
316 | CLKDEV_DEV_ID("sh_mobile_lcdc_fb.0", &mstp_clks[MSTP100]), /* LCDC0 */ | ||
298 | CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP125]), /* TMU00 */ | 317 | CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP125]), /* TMU00 */ |
299 | CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP125]), /* TMU01 */ | 318 | CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP125]), /* TMU01 */ |
300 | CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[MSTP116]), /* I2C0 */ | 319 | CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[MSTP116]), /* I2C0 */ |
320 | CLKDEV_DEV_ID("sh-mipi-dsi.0", &mstp_clks[MSTP118]), /* DSITX */ | ||
301 | CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP219]), /* SCIFA7 */ | 321 | CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP219]), /* SCIFA7 */ |
302 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP207]), /* SCIFA5 */ | 322 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP207]), /* SCIFA5 */ |
303 | CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP206]), /* SCIFB */ | 323 | CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP206]), /* SCIFB */ |
@@ -308,6 +328,7 @@ static struct clk_lookup lookups[] = { | |||
308 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), /* SCIFA4 */ | 328 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), /* SCIFA4 */ |
309 | CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP331]), /* SCIFA6 */ | 329 | CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP331]), /* SCIFA6 */ |
310 | CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]), /* CMT10 */ | 330 | CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]), /* CMT10 */ |
331 | CLKDEV_DEV_ID("sh_irda.0", &mstp_clks[MSTP325]), /* IrDA */ | ||
311 | CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), /* I2C1 */ | 332 | CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), /* I2C1 */ |
312 | CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP312]), /* MMCIF0 */ | 333 | CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP312]), /* MMCIF0 */ |
313 | CLKDEV_DEV_ID("i2c-sh_mobile.3", &mstp_clks[MSTP411]), /* I2C3 */ | 334 | CLKDEV_DEV_ID("i2c-sh_mobile.3", &mstp_clks[MSTP411]), /* I2C3 */ |
diff --git a/arch/arm/mach-shmobile/intc-sh7372.c b/arch/arm/mach-shmobile/intc-sh7372.c index f78a1ead71a..ca5f9d17b39 100644 --- a/arch/arm/mach-shmobile/intc-sh7372.c +++ b/arch/arm/mach-shmobile/intc-sh7372.c | |||
@@ -365,6 +365,7 @@ static struct intc_desc intca_desc __initdata = { | |||
365 | 365 | ||
366 | enum { | 366 | enum { |
367 | UNUSED_INTCS = 0, | 367 | UNUSED_INTCS = 0, |
368 | ENABLED_INTCS, | ||
368 | 369 | ||
369 | INTCS, | 370 | INTCS, |
370 | 371 | ||
@@ -413,7 +414,7 @@ enum { | |||
413 | CMT4, | 414 | CMT4, |
414 | DSITX1_DSITX1_0, | 415 | DSITX1_DSITX1_0, |
415 | DSITX1_DSITX1_1, | 416 | DSITX1_DSITX1_1, |
416 | /* MFIS2 */ | 417 | MFIS2_INTCS, /* Priority always enabled using ENABLED_INTCS */ |
417 | CPORTS2R, | 418 | CPORTS2R, |
418 | /* CEC */ | 419 | /* CEC */ |
419 | JPU6E, | 420 | JPU6E, |
@@ -477,7 +478,7 @@ static struct intc_vect intcs_vectors[] = { | |||
477 | INTCS_VECT(CMT4, 0x1980), | 478 | INTCS_VECT(CMT4, 0x1980), |
478 | INTCS_VECT(DSITX1_DSITX1_0, 0x19a0), | 479 | INTCS_VECT(DSITX1_DSITX1_0, 0x19a0), |
479 | INTCS_VECT(DSITX1_DSITX1_1, 0x19c0), | 480 | INTCS_VECT(DSITX1_DSITX1_1, 0x19c0), |
480 | /* MFIS2 */ | 481 | INTCS_VECT(MFIS2_INTCS, 0x1a00), |
481 | INTCS_VECT(CPORTS2R, 0x1a20), | 482 | INTCS_VECT(CPORTS2R, 0x1a20), |
482 | /* CEC */ | 483 | /* CEC */ |
483 | INTCS_VECT(JPU6E, 0x1a80), | 484 | INTCS_VECT(JPU6E, 0x1a80), |
@@ -543,7 +544,7 @@ static struct intc_mask_reg intcs_mask_registers[] = { | |||
543 | { 0, TMU1_TUNI2, TMU1_TUNI1, TMU1_TUNI0, | 544 | { 0, TMU1_TUNI2, TMU1_TUNI1, TMU1_TUNI0, |
544 | CMT4, DSITX1_DSITX1_0, DSITX1_DSITX1_1, 0 } }, | 545 | CMT4, DSITX1_DSITX1_0, DSITX1_DSITX1_1, 0 } }, |
545 | { 0xffd5019c, 0xffd501dc, 8, /* IMR7SA3 / IMCR7SA3 */ | 546 | { 0xffd5019c, 0xffd501dc, 8, /* IMR7SA3 / IMCR7SA3 */ |
546 | { 0, CPORTS2R, 0, 0, | 547 | { MFIS2_INTCS, CPORTS2R, 0, 0, |
547 | JPU6E, 0, 0, 0 } }, | 548 | JPU6E, 0, 0, 0 } }, |
548 | { 0xffd20104, 0, 16, /* INTAMASK */ | 549 | { 0xffd20104, 0, 16, /* INTAMASK */ |
549 | { 0, 0, 0, 0, 0, 0, 0, 0, | 550 | { 0, 0, 0, 0, 0, 0, 0, 0, |
@@ -571,7 +572,8 @@ static struct intc_prio_reg intcs_prio_registers[] = { | |||
571 | { 0xffd50030, 0, 16, 4, /* IPRMS3 */ { TMU1, 0, 0, 0 } }, | 572 | { 0xffd50030, 0, 16, 4, /* IPRMS3 */ { TMU1, 0, 0, 0 } }, |
572 | { 0xffd50034, 0, 16, 4, /* IPRNS3 */ { CMT4, DSITX1_DSITX1_0, | 573 | { 0xffd50034, 0, 16, 4, /* IPRNS3 */ { CMT4, DSITX1_DSITX1_0, |
573 | DSITX1_DSITX1_1, 0 } }, | 574 | DSITX1_DSITX1_1, 0 } }, |
574 | { 0xffd50038, 0, 16, 4, /* IPROS3 */ { 0, CPORTS2R, 0, 0 } }, | 575 | { 0xffd50038, 0, 16, 4, /* IPROS3 */ { ENABLED_INTCS, CPORTS2R, |
576 | 0, 0 } }, | ||
575 | { 0xffd5003c, 0, 16, 4, /* IPRPS3 */ { JPU6E, 0, 0, 0 } }, | 577 | { 0xffd5003c, 0, 16, 4, /* IPRPS3 */ { JPU6E, 0, 0, 0 } }, |
576 | }; | 578 | }; |
577 | 579 | ||
@@ -590,6 +592,7 @@ static struct resource intcs_resources[] __initdata = { | |||
590 | 592 | ||
591 | static struct intc_desc intcs_desc __initdata = { | 593 | static struct intc_desc intcs_desc __initdata = { |
592 | .name = "sh7372-intcs", | 594 | .name = "sh7372-intcs", |
595 | .force_enable = ENABLED_INTCS, | ||
593 | .resource = intcs_resources, | 596 | .resource = intcs_resources, |
594 | .num_resources = ARRAY_SIZE(intcs_resources), | 597 | .num_resources = ARRAY_SIZE(intcs_resources), |
595 | .hw = INTC_HW_DESC(intcs_vectors, intcs_groups, intcs_mask_registers, | 598 | .hw = INTC_HW_DESC(intcs_vectors, intcs_groups, intcs_mask_registers, |
diff --git a/arch/arm/mach-shmobile/intc-sh73a0.c b/arch/arm/mach-shmobile/intc-sh73a0.c index 322d8d57cbc..5d0e1503ece 100644 --- a/arch/arm/mach-shmobile/intc-sh73a0.c +++ b/arch/arm/mach-shmobile/intc-sh73a0.c | |||
@@ -252,10 +252,11 @@ static irqreturn_t sh73a0_intcs_demux(int irq, void *dev_id) | |||
252 | 252 | ||
253 | void __init sh73a0_init_irq(void) | 253 | void __init sh73a0_init_irq(void) |
254 | { | 254 | { |
255 | void __iomem *gic_base = __io(0xf0001000); | 255 | void __iomem *gic_dist_base = __io(0xf0001000); |
256 | void __iomem *gic_cpu_base = __io(0xf0000100); | ||
256 | void __iomem *intevtsa = ioremap_nocache(0xffd20100, PAGE_SIZE); | 257 | void __iomem *intevtsa = ioremap_nocache(0xffd20100, PAGE_SIZE); |
257 | 258 | ||
258 | gic_init(0, 29, gic_base, gic_base); | 259 | gic_init(0, 29, gic_dist_base, gic_cpu_base); |
259 | 260 | ||
260 | register_intc_controller(&intcs_desc); | 261 | register_intc_controller(&intcs_desc); |
261 | 262 | ||
diff --git a/arch/arm/mach-stmp378x/stmp378x.c b/arch/arm/mach-stmp378x/stmp378x.c index ddd49a760fd..c2f9fe04c11 100644 --- a/arch/arm/mach-stmp378x/stmp378x.c +++ b/arch/arm/mach-stmp378x/stmp378x.c | |||
@@ -47,7 +47,7 @@ | |||
47 | /* | 47 | /* |
48 | * IRQ handling | 48 | * IRQ handling |
49 | */ | 49 | */ |
50 | static void stmp378x_ack_irq(unsigned int irq) | 50 | static void stmp378x_ack_irq(struct irq_data *d) |
51 | { | 51 | { |
52 | /* Tell ICOLL to release IRQ line */ | 52 | /* Tell ICOLL to release IRQ line */ |
53 | __raw_writel(0, REGS_ICOLL_BASE + HW_ICOLL_VECTOR); | 53 | __raw_writel(0, REGS_ICOLL_BASE + HW_ICOLL_VECTOR); |
@@ -60,24 +60,24 @@ static void stmp378x_ack_irq(unsigned int irq) | |||
60 | (void)__raw_readl(REGS_ICOLL_BASE + HW_ICOLL_STAT); | 60 | (void)__raw_readl(REGS_ICOLL_BASE + HW_ICOLL_STAT); |
61 | } | 61 | } |
62 | 62 | ||
63 | static void stmp378x_mask_irq(unsigned int irq) | 63 | static void stmp378x_mask_irq(struct irq_data *d) |
64 | { | 64 | { |
65 | /* IRQ disable */ | 65 | /* IRQ disable */ |
66 | stmp3xxx_clearl(BM_ICOLL_INTERRUPTn_ENABLE, | 66 | stmp3xxx_clearl(BM_ICOLL_INTERRUPTn_ENABLE, |
67 | REGS_ICOLL_BASE + HW_ICOLL_INTERRUPTn + irq * 0x10); | 67 | REGS_ICOLL_BASE + HW_ICOLL_INTERRUPTn + d->irq * 0x10); |
68 | } | 68 | } |
69 | 69 | ||
70 | static void stmp378x_unmask_irq(unsigned int irq) | 70 | static void stmp378x_unmask_irq(struct irq_data *d) |
71 | { | 71 | { |
72 | /* IRQ enable */ | 72 | /* IRQ enable */ |
73 | stmp3xxx_setl(BM_ICOLL_INTERRUPTn_ENABLE, | 73 | stmp3xxx_setl(BM_ICOLL_INTERRUPTn_ENABLE, |
74 | REGS_ICOLL_BASE + HW_ICOLL_INTERRUPTn + irq * 0x10); | 74 | REGS_ICOLL_BASE + HW_ICOLL_INTERRUPTn + d->irq * 0x10); |
75 | } | 75 | } |
76 | 76 | ||
77 | static struct irq_chip stmp378x_chip = { | 77 | static struct irq_chip stmp378x_chip = { |
78 | .ack = stmp378x_ack_irq, | 78 | .irq_ack = stmp378x_ack_irq, |
79 | .mask = stmp378x_mask_irq, | 79 | .irq_mask = stmp378x_mask_irq, |
80 | .unmask = stmp378x_unmask_irq, | 80 | .irq_unmask = stmp378x_unmask_irq, |
81 | }; | 81 | }; |
82 | 82 | ||
83 | void __init stmp378x_init_irq(void) | 83 | void __init stmp378x_init_irq(void) |
diff --git a/arch/arm/mach-stmp37xx/stmp37xx.c b/arch/arm/mach-stmp37xx/stmp37xx.c index 8c7d6fb191a..a9aed06ff37 100644 --- a/arch/arm/mach-stmp37xx/stmp37xx.c +++ b/arch/arm/mach-stmp37xx/stmp37xx.c | |||
@@ -43,11 +43,11 @@ | |||
43 | /* | 43 | /* |
44 | * IRQ handling | 44 | * IRQ handling |
45 | */ | 45 | */ |
46 | static void stmp37xx_ack_irq(unsigned int irq) | 46 | static void stmp37xx_ack_irq(struct irq_data *d) |
47 | { | 47 | { |
48 | /* Disable IRQ */ | 48 | /* Disable IRQ */ |
49 | stmp3xxx_clearl(0x04 << ((irq % 4) * 8), | 49 | stmp3xxx_clearl(0x04 << ((d->irq % 4) * 8), |
50 | REGS_ICOLL_BASE + HW_ICOLL_PRIORITYn + irq / 4 * 0x10); | 50 | REGS_ICOLL_BASE + HW_ICOLL_PRIORITYn + d->irq / 4 * 0x10); |
51 | 51 | ||
52 | /* ACK current interrupt */ | 52 | /* ACK current interrupt */ |
53 | __raw_writel(1, REGS_ICOLL_BASE + HW_ICOLL_LEVELACK); | 53 | __raw_writel(1, REGS_ICOLL_BASE + HW_ICOLL_LEVELACK); |
@@ -56,24 +56,24 @@ static void stmp37xx_ack_irq(unsigned int irq) | |||
56 | (void)__raw_readl(REGS_ICOLL_BASE + HW_ICOLL_STAT); | 56 | (void)__raw_readl(REGS_ICOLL_BASE + HW_ICOLL_STAT); |
57 | } | 57 | } |
58 | 58 | ||
59 | static void stmp37xx_mask_irq(unsigned int irq) | 59 | static void stmp37xx_mask_irq(struct irq_data *d) |
60 | { | 60 | { |
61 | /* IRQ disable */ | 61 | /* IRQ disable */ |
62 | stmp3xxx_clearl(0x04 << ((irq % 4) * 8), | 62 | stmp3xxx_clearl(0x04 << ((d->irq % 4) * 8), |
63 | REGS_ICOLL_BASE + HW_ICOLL_PRIORITYn + irq / 4 * 0x10); | 63 | REGS_ICOLL_BASE + HW_ICOLL_PRIORITYn + d->irq / 4 * 0x10); |
64 | } | 64 | } |
65 | 65 | ||
66 | static void stmp37xx_unmask_irq(unsigned int irq) | 66 | static void stmp37xx_unmask_irq(struct irq_data *d) |
67 | { | 67 | { |
68 | /* IRQ enable */ | 68 | /* IRQ enable */ |
69 | stmp3xxx_setl(0x04 << ((irq % 4) * 8), | 69 | stmp3xxx_setl(0x04 << ((d->irq % 4) * 8), |
70 | REGS_ICOLL_BASE + HW_ICOLL_PRIORITYn + irq / 4 * 0x10); | 70 | REGS_ICOLL_BASE + HW_ICOLL_PRIORITYn + d->irq / 4 * 0x10); |
71 | } | 71 | } |
72 | 72 | ||
73 | static struct irq_chip stmp37xx_chip = { | 73 | static struct irq_chip stmp37xx_chip = { |
74 | .ack = stmp37xx_ack_irq, | 74 | .irq_ack = stmp37xx_ack_irq, |
75 | .mask = stmp37xx_mask_irq, | 75 | .irq_mask = stmp37xx_mask_irq, |
76 | .unmask = stmp37xx_unmask_irq, | 76 | .irq_unmask = stmp37xx_unmask_irq, |
77 | }; | 77 | }; |
78 | 78 | ||
79 | void __init stmp37xx_init_irq(void) | 79 | void __init stmp37xx_init_irq(void) |
diff --git a/arch/arm/mach-tcc8k/irq.c b/arch/arm/mach-tcc8k/irq.c index 34575c4963f..aa9231f4fc6 100644 --- a/arch/arm/mach-tcc8k/irq.c +++ b/arch/arm/mach-tcc8k/irq.c | |||
@@ -18,65 +18,65 @@ | |||
18 | #include "common.h" | 18 | #include "common.h" |
19 | 19 | ||
20 | /* Disable IRQ */ | 20 | /* Disable IRQ */ |
21 | static void tcc8000_mask_ack_irq0(unsigned int irq) | 21 | static void tcc8000_mask_ack_irq0(struct irq_data *d) |
22 | { | 22 | { |
23 | PIC0_IEN &= ~(1 << irq); | 23 | PIC0_IEN &= ~(1 << d->irq); |
24 | PIC0_CREQ |= (1 << irq); | 24 | PIC0_CREQ |= (1 << d->irq); |
25 | } | 25 | } |
26 | 26 | ||
27 | static void tcc8000_mask_ack_irq1(unsigned int irq) | 27 | static void tcc8000_mask_ack_irq1(struct irq_data *d) |
28 | { | 28 | { |
29 | PIC1_IEN &= ~(1 << (irq - 32)); | 29 | PIC1_IEN &= ~(1 << (d->irq - 32)); |
30 | PIC1_CREQ |= (1 << (irq - 32)); | 30 | PIC1_CREQ |= (1 << (d->irq - 32)); |
31 | } | 31 | } |
32 | 32 | ||
33 | static void tcc8000_mask_irq0(unsigned int irq) | 33 | static void tcc8000_mask_irq0(struct irq_data *d) |
34 | { | 34 | { |
35 | PIC0_IEN &= ~(1 << irq); | 35 | PIC0_IEN &= ~(1 << d->irq); |
36 | } | 36 | } |
37 | 37 | ||
38 | static void tcc8000_mask_irq1(unsigned int irq) | 38 | static void tcc8000_mask_irq1(struct irq_data *d) |
39 | { | 39 | { |
40 | PIC1_IEN &= ~(1 << (irq - 32)); | 40 | PIC1_IEN &= ~(1 << (d->irq - 32)); |
41 | } | 41 | } |
42 | 42 | ||
43 | static void tcc8000_ack_irq0(unsigned int irq) | 43 | static void tcc8000_ack_irq0(struct irq_data *d) |
44 | { | 44 | { |
45 | PIC0_CREQ |= (1 << irq); | 45 | PIC0_CREQ |= (1 << d->irq); |
46 | } | 46 | } |
47 | 47 | ||
48 | static void tcc8000_ack_irq1(unsigned int irq) | 48 | static void tcc8000_ack_irq1(struct irq_data *d) |
49 | { | 49 | { |
50 | PIC1_CREQ |= (1 << (irq - 32)); | 50 | PIC1_CREQ |= (1 << (d->irq - 32)); |
51 | } | 51 | } |
52 | 52 | ||
53 | /* Enable IRQ */ | 53 | /* Enable IRQ */ |
54 | static void tcc8000_unmask_irq0(unsigned int irq) | 54 | static void tcc8000_unmask_irq0(struct irq_data *d) |
55 | { | 55 | { |
56 | PIC0_IEN |= (1 << irq); | 56 | PIC0_IEN |= (1 << d->irq); |
57 | PIC0_INTOEN |= (1 << irq); | 57 | PIC0_INTOEN |= (1 << d->irq); |
58 | } | 58 | } |
59 | 59 | ||
60 | static void tcc8000_unmask_irq1(unsigned int irq) | 60 | static void tcc8000_unmask_irq1(struct irq_data *d) |
61 | { | 61 | { |
62 | PIC1_IEN |= (1 << (irq - 32)); | 62 | PIC1_IEN |= (1 << (d->irq - 32)); |
63 | PIC1_INTOEN |= (1 << (irq - 32)); | 63 | PIC1_INTOEN |= (1 << (d->irq - 32)); |
64 | } | 64 | } |
65 | 65 | ||
66 | static struct irq_chip tcc8000_irq_chip0 = { | 66 | static struct irq_chip tcc8000_irq_chip0 = { |
67 | .name = "tcc_irq0", | 67 | .name = "tcc_irq0", |
68 | .mask = tcc8000_mask_irq0, | 68 | .irq_mask = tcc8000_mask_irq0, |
69 | .ack = tcc8000_ack_irq0, | 69 | .irq_ack = tcc8000_ack_irq0, |
70 | .mask_ack = tcc8000_mask_ack_irq0, | 70 | .irq_mask_ack = tcc8000_mask_ack_irq0, |
71 | .unmask = tcc8000_unmask_irq0, | 71 | .irq_unmask = tcc8000_unmask_irq0, |
72 | }; | 72 | }; |
73 | 73 | ||
74 | static struct irq_chip tcc8000_irq_chip1 = { | 74 | static struct irq_chip tcc8000_irq_chip1 = { |
75 | .name = "tcc_irq1", | 75 | .name = "tcc_irq1", |
76 | .mask = tcc8000_mask_irq1, | 76 | .irq_mask = tcc8000_mask_irq1, |
77 | .ack = tcc8000_ack_irq1, | 77 | .irq_ack = tcc8000_ack_irq1, |
78 | .mask_ack = tcc8000_mask_ack_irq1, | 78 | .irq_mask_ack = tcc8000_mask_ack_irq1, |
79 | .unmask = tcc8000_unmask_irq1, | 79 | .irq_unmask = tcc8000_unmask_irq1, |
80 | }; | 80 | }; |
81 | 81 | ||
82 | void __init tcc8k_init_irq(void) | 82 | void __init tcc8k_init_irq(void) |
diff --git a/arch/arm/mach-tegra/gpio.c b/arch/arm/mach-tegra/gpio.c index 0775265e69f..ad804880151 100644 --- a/arch/arm/mach-tegra/gpio.c +++ b/arch/arm/mach-tegra/gpio.c | |||
@@ -142,31 +142,31 @@ static struct gpio_chip tegra_gpio_chip = { | |||
142 | .ngpio = TEGRA_NR_GPIOS, | 142 | .ngpio = TEGRA_NR_GPIOS, |
143 | }; | 143 | }; |
144 | 144 | ||
145 | static void tegra_gpio_irq_ack(unsigned int irq) | 145 | static void tegra_gpio_irq_ack(struct irq_data *d) |
146 | { | 146 | { |
147 | int gpio = irq - INT_GPIO_BASE; | 147 | int gpio = d->irq - INT_GPIO_BASE; |
148 | 148 | ||
149 | __raw_writel(1 << GPIO_BIT(gpio), GPIO_INT_CLR(gpio)); | 149 | __raw_writel(1 << GPIO_BIT(gpio), GPIO_INT_CLR(gpio)); |
150 | } | 150 | } |
151 | 151 | ||
152 | static void tegra_gpio_irq_mask(unsigned int irq) | 152 | static void tegra_gpio_irq_mask(struct irq_data *d) |
153 | { | 153 | { |
154 | int gpio = irq - INT_GPIO_BASE; | 154 | int gpio = d->irq - INT_GPIO_BASE; |
155 | 155 | ||
156 | tegra_gpio_mask_write(GPIO_MSK_INT_ENB(gpio), gpio, 0); | 156 | tegra_gpio_mask_write(GPIO_MSK_INT_ENB(gpio), gpio, 0); |
157 | } | 157 | } |
158 | 158 | ||
159 | static void tegra_gpio_irq_unmask(unsigned int irq) | 159 | static void tegra_gpio_irq_unmask(struct irq_data *d) |
160 | { | 160 | { |
161 | int gpio = irq - INT_GPIO_BASE; | 161 | int gpio = d->irq - INT_GPIO_BASE; |
162 | 162 | ||
163 | tegra_gpio_mask_write(GPIO_MSK_INT_ENB(gpio), gpio, 1); | 163 | tegra_gpio_mask_write(GPIO_MSK_INT_ENB(gpio), gpio, 1); |
164 | } | 164 | } |
165 | 165 | ||
166 | static int tegra_gpio_irq_set_type(unsigned int irq, unsigned int type) | 166 | static int tegra_gpio_irq_set_type(struct irq_data *d, unsigned int type) |
167 | { | 167 | { |
168 | int gpio = irq - INT_GPIO_BASE; | 168 | int gpio = d->irq - INT_GPIO_BASE; |
169 | struct tegra_gpio_bank *bank = get_irq_chip_data(irq); | 169 | struct tegra_gpio_bank *bank = irq_data_get_irq_chip_data(d); |
170 | int port = GPIO_PORT(gpio); | 170 | int port = GPIO_PORT(gpio); |
171 | int lvl_type; | 171 | int lvl_type; |
172 | int val; | 172 | int val; |
@@ -207,9 +207,9 @@ static int tegra_gpio_irq_set_type(unsigned int irq, unsigned int type) | |||
207 | spin_unlock_irqrestore(&bank->lvl_lock[port], flags); | 207 | spin_unlock_irqrestore(&bank->lvl_lock[port], flags); |
208 | 208 | ||
209 | if (type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH)) | 209 | if (type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH)) |
210 | __set_irq_handler_unlocked(irq, handle_level_irq); | 210 | __set_irq_handler_unlocked(d->irq, handle_level_irq); |
211 | else if (type & (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING)) | 211 | else if (type & (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING)) |
212 | __set_irq_handler_unlocked(irq, handle_edge_irq); | 212 | __set_irq_handler_unlocked(d->irq, handle_edge_irq); |
213 | 213 | ||
214 | return 0; | 214 | return 0; |
215 | } | 215 | } |
@@ -221,7 +221,7 @@ static void tegra_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
221 | int pin; | 221 | int pin; |
222 | int unmasked = 0; | 222 | int unmasked = 0; |
223 | 223 | ||
224 | desc->chip->ack(irq); | 224 | desc->irq_data.chip->irq_ack(&desc->irq_data); |
225 | 225 | ||
226 | bank = get_irq_data(irq); | 226 | bank = get_irq_data(irq); |
227 | 227 | ||
@@ -240,7 +240,7 @@ static void tegra_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
240 | */ | 240 | */ |
241 | if (lvl & (0x100 << pin)) { | 241 | if (lvl & (0x100 << pin)) { |
242 | unmasked = 1; | 242 | unmasked = 1; |
243 | desc->chip->unmask(irq); | 243 | desc->irq_data.chip->irq_unmask(&desc->irq_data); |
244 | } | 244 | } |
245 | 245 | ||
246 | generic_handle_irq(gpio_to_irq(gpio + pin)); | 246 | generic_handle_irq(gpio_to_irq(gpio + pin)); |
@@ -248,7 +248,7 @@ static void tegra_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
248 | } | 248 | } |
249 | 249 | ||
250 | if (!unmasked) | 250 | if (!unmasked) |
251 | desc->chip->unmask(irq); | 251 | desc->irq_data.chip->irq_unmask(&desc->irq_data); |
252 | 252 | ||
253 | } | 253 | } |
254 | 254 | ||
@@ -316,21 +316,21 @@ void tegra_gpio_suspend(void) | |||
316 | local_irq_restore(flags); | 316 | local_irq_restore(flags); |
317 | } | 317 | } |
318 | 318 | ||
319 | static int tegra_gpio_wake_enable(unsigned int irq, unsigned int enable) | 319 | static int tegra_gpio_wake_enable(struct irq_data *d, unsigned int enable) |
320 | { | 320 | { |
321 | struct tegra_gpio_bank *bank = get_irq_chip_data(irq); | 321 | struct tegra_gpio_bank *bank = irq_data_get_irq_chip_data(d); |
322 | return set_irq_wake(bank->irq, enable); | 322 | return set_irq_wake(bank->irq, enable); |
323 | } | 323 | } |
324 | #endif | 324 | #endif |
325 | 325 | ||
326 | static struct irq_chip tegra_gpio_irq_chip = { | 326 | static struct irq_chip tegra_gpio_irq_chip = { |
327 | .name = "GPIO", | 327 | .name = "GPIO", |
328 | .ack = tegra_gpio_irq_ack, | 328 | .irq_ack = tegra_gpio_irq_ack, |
329 | .mask = tegra_gpio_irq_mask, | 329 | .irq_mask = tegra_gpio_irq_mask, |
330 | .unmask = tegra_gpio_irq_unmask, | 330 | .irq_unmask = tegra_gpio_irq_unmask, |
331 | .set_type = tegra_gpio_irq_set_type, | 331 | .irq_set_type = tegra_gpio_irq_set_type, |
332 | #ifdef CONFIG_PM | 332 | #ifdef CONFIG_PM |
333 | .set_wake = tegra_gpio_wake_enable, | 333 | .irq_set_wake = tegra_gpio_wake_enable, |
334 | #endif | 334 | #endif |
335 | }; | 335 | }; |
336 | 336 | ||
diff --git a/arch/arm/mach-tegra/hotplug.c b/arch/arm/mach-tegra/hotplug.c index a5cb1ce76ff..f3294040d35 100644 --- a/arch/arm/mach-tegra/hotplug.c +++ b/arch/arm/mach-tegra/hotplug.c | |||
@@ -26,10 +26,10 @@ static inline void cpu_enter_lowpower(void) | |||
26 | * Turn off coherency | 26 | * Turn off coherency |
27 | */ | 27 | */ |
28 | " mrc p15, 0, %0, c1, c0, 1\n" | 28 | " mrc p15, 0, %0, c1, c0, 1\n" |
29 | " bic %0, %0, %2\n" | 29 | " bic %0, %0, #0x20\n" |
30 | " mcr p15, 0, %0, c1, c0, 1\n" | 30 | " mcr p15, 0, %0, c1, c0, 1\n" |
31 | " mrc p15, 0, %0, c1, c0, 0\n" | 31 | " mrc p15, 0, %0, c1, c0, 0\n" |
32 | " bic %0, %0, #0x04\n" | 32 | " bic %0, %0, %2\n" |
33 | " mcr p15, 0, %0, c1, c0, 0\n" | 33 | " mcr p15, 0, %0, c1, c0, 0\n" |
34 | : "=&r" (v) | 34 | : "=&r" (v) |
35 | : "r" (0), "Ir" (CR_C) | 35 | : "r" (0), "Ir" (CR_C) |
diff --git a/arch/arm/mach-tegra/include/mach/clk.h b/arch/arm/mach-tegra/include/mach/clk.h index d7723955dac..a217f68ba57 100644 --- a/arch/arm/mach-tegra/include/mach/clk.h +++ b/arch/arm/mach-tegra/include/mach/clk.h | |||
@@ -20,6 +20,8 @@ | |||
20 | #ifndef __MACH_CLK_H | 20 | #ifndef __MACH_CLK_H |
21 | #define __MACH_CLK_H | 21 | #define __MACH_CLK_H |
22 | 22 | ||
23 | struct clk; | ||
24 | |||
23 | void tegra_periph_reset_deassert(struct clk *c); | 25 | void tegra_periph_reset_deassert(struct clk *c); |
24 | void tegra_periph_reset_assert(struct clk *c); | 26 | void tegra_periph_reset_assert(struct clk *c); |
25 | 27 | ||
diff --git a/arch/arm/mach-tegra/include/mach/clkdev.h b/arch/arm/mach-tegra/include/mach/clkdev.h index 412f5c63e65..66cd3f4fc89 100644 --- a/arch/arm/mach-tegra/include/mach/clkdev.h +++ b/arch/arm/mach-tegra/include/mach/clkdev.h | |||
@@ -20,6 +20,8 @@ | |||
20 | #ifndef __MACH_CLKDEV_H | 20 | #ifndef __MACH_CLKDEV_H |
21 | #define __MACH_CLKDEV_H | 21 | #define __MACH_CLKDEV_H |
22 | 22 | ||
23 | struct clk; | ||
24 | |||
23 | static inline int __clk_get(struct clk *clk) | 25 | static inline int __clk_get(struct clk *clk) |
24 | { | 26 | { |
25 | return 1; | 27 | return 1; |
diff --git a/arch/arm/mach-tegra/include/mach/kbc.h b/arch/arm/mach-tegra/include/mach/kbc.h new file mode 100644 index 00000000000..66ad2760c62 --- /dev/null +++ b/arch/arm/mach-tegra/include/mach/kbc.h | |||
@@ -0,0 +1,61 @@ | |||
1 | /* | ||
2 | * Platform definitions for tegra-kbc keyboard input driver | ||
3 | * | ||
4 | * Copyright (c) 2010-2011, NVIDIA Corporation. | ||
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, but WITHOUT | ||
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
14 | * more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License along | ||
17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef ASMARM_ARCH_TEGRA_KBC_H | ||
22 | #define ASMARM_ARCH_TEGRA_KBC_H | ||
23 | |||
24 | #include <linux/types.h> | ||
25 | #include <linux/input/matrix_keypad.h> | ||
26 | |||
27 | #ifdef CONFIG_ARCH_TEGRA_2x_SOC | ||
28 | #define KBC_MAX_GPIO 24 | ||
29 | #define KBC_MAX_KPENT 8 | ||
30 | #else | ||
31 | #define KBC_MAX_GPIO 20 | ||
32 | #define KBC_MAX_KPENT 7 | ||
33 | #endif | ||
34 | |||
35 | #define KBC_MAX_ROW 16 | ||
36 | #define KBC_MAX_COL 8 | ||
37 | #define KBC_MAX_KEY (KBC_MAX_ROW * KBC_MAX_COL) | ||
38 | |||
39 | struct tegra_kbc_pin_cfg { | ||
40 | bool is_row; | ||
41 | unsigned char num; | ||
42 | }; | ||
43 | |||
44 | struct tegra_kbc_wake_key { | ||
45 | u8 row:4; | ||
46 | u8 col:4; | ||
47 | }; | ||
48 | |||
49 | struct tegra_kbc_platform_data { | ||
50 | unsigned int debounce_cnt; | ||
51 | unsigned int repeat_cnt; | ||
52 | |||
53 | unsigned int wake_cnt; /* 0:wake on any key >1:wake on wake_cfg */ | ||
54 | const struct tegra_kbc_wake_key *wake_cfg; | ||
55 | |||
56 | struct tegra_kbc_pin_cfg pin_cfg[KBC_MAX_GPIO]; | ||
57 | const struct matrix_keymap_data *keymap_data; | ||
58 | |||
59 | bool wakeup; | ||
60 | }; | ||
61 | #endif | ||
diff --git a/arch/arm/mach-tegra/irq.c b/arch/arm/mach-tegra/irq.c index 5407de01abf..17c74d21077 100644 --- a/arch/arm/mach-tegra/irq.c +++ b/arch/arm/mach-tegra/irq.c | |||
@@ -46,30 +46,30 @@ | |||
46 | #define ICTLR_COP_IER_CLR 0x38 | 46 | #define ICTLR_COP_IER_CLR 0x38 |
47 | #define ICTLR_COP_IEP_CLASS 0x3c | 47 | #define ICTLR_COP_IEP_CLASS 0x3c |
48 | 48 | ||
49 | static void (*gic_mask_irq)(unsigned int irq); | 49 | static void (*tegra_gic_mask_irq)(struct irq_data *d); |
50 | static void (*gic_unmask_irq)(unsigned int irq); | 50 | static void (*tegra_gic_unmask_irq)(struct irq_data *d); |
51 | 51 | ||
52 | #define irq_to_ictlr(irq) (((irq)-32) >> 5) | 52 | #define irq_to_ictlr(irq) (((irq) - 32) >> 5) |
53 | static void __iomem *tegra_ictlr_base = IO_ADDRESS(TEGRA_PRIMARY_ICTLR_BASE); | 53 | static void __iomem *tegra_ictlr_base = IO_ADDRESS(TEGRA_PRIMARY_ICTLR_BASE); |
54 | #define ictlr_to_virt(ictlr) (tegra_ictlr_base + (ictlr)*0x100) | 54 | #define ictlr_to_virt(ictlr) (tegra_ictlr_base + (ictlr) * 0x100) |
55 | 55 | ||
56 | static void tegra_mask(unsigned int irq) | 56 | static void tegra_mask(struct irq_data *d) |
57 | { | 57 | { |
58 | void __iomem *addr = ictlr_to_virt(irq_to_ictlr(irq)); | 58 | void __iomem *addr = ictlr_to_virt(irq_to_ictlr(d->irq)); |
59 | gic_mask_irq(irq); | 59 | tegra_gic_mask_irq(d); |
60 | writel(1<<(irq&31), addr+ICTLR_CPU_IER_CLR); | 60 | writel(1 << (d->irq & 31), addr+ICTLR_CPU_IER_CLR); |
61 | } | 61 | } |
62 | 62 | ||
63 | static void tegra_unmask(unsigned int irq) | 63 | static void tegra_unmask(struct irq_data *d) |
64 | { | 64 | { |
65 | void __iomem *addr = ictlr_to_virt(irq_to_ictlr(irq)); | 65 | void __iomem *addr = ictlr_to_virt(irq_to_ictlr(d->irq)); |
66 | gic_unmask_irq(irq); | 66 | tegra_gic_unmask_irq(d); |
67 | writel(1<<(irq&31), addr+ICTLR_CPU_IER_SET); | 67 | writel(1<<(d->irq&31), addr+ICTLR_CPU_IER_SET); |
68 | } | 68 | } |
69 | 69 | ||
70 | #ifdef CONFIG_PM | 70 | #ifdef CONFIG_PM |
71 | 71 | ||
72 | static int tegra_set_wake(unsigned int irq, unsigned int on) | 72 | static int tegra_set_wake(struct irq_data *d, unsigned int on) |
73 | { | 73 | { |
74 | return 0; | 74 | return 0; |
75 | } | 75 | } |
@@ -77,10 +77,10 @@ static int tegra_set_wake(unsigned int irq, unsigned int on) | |||
77 | 77 | ||
78 | static struct irq_chip tegra_irq = { | 78 | static struct irq_chip tegra_irq = { |
79 | .name = "PPI", | 79 | .name = "PPI", |
80 | .mask = tegra_mask, | 80 | .irq_mask = tegra_mask, |
81 | .unmask = tegra_unmask, | 81 | .irq_unmask = tegra_unmask, |
82 | #ifdef CONFIG_PM | 82 | #ifdef CONFIG_PM |
83 | .set_wake = tegra_set_wake, | 83 | .irq_set_wake = tegra_set_wake, |
84 | #endif | 84 | #endif |
85 | }; | 85 | }; |
86 | 86 | ||
@@ -98,11 +98,11 @@ void __init tegra_init_irq(void) | |||
98 | IO_ADDRESS(TEGRA_ARM_PERIF_BASE + 0x100)); | 98 | IO_ADDRESS(TEGRA_ARM_PERIF_BASE + 0x100)); |
99 | 99 | ||
100 | gic = get_irq_chip(29); | 100 | gic = get_irq_chip(29); |
101 | gic_unmask_irq = gic->unmask; | 101 | tegra_gic_unmask_irq = gic->irq_unmask; |
102 | gic_mask_irq = gic->mask; | 102 | tegra_gic_mask_irq = gic->irq_mask; |
103 | tegra_irq.ack = gic->ack; | 103 | tegra_irq.irq_ack = gic->irq_ack; |
104 | #ifdef CONFIG_SMP | 104 | #ifdef CONFIG_SMP |
105 | tegra_irq.set_affinity = gic->set_affinity; | 105 | tegra_irq.irq_set_affinity = gic->irq_set_affinity; |
106 | #endif | 106 | #endif |
107 | 107 | ||
108 | for (i = INT_PRI_BASE; i < INT_GPIO_BASE; i++) { | 108 | for (i = INT_PRI_BASE; i < INT_GPIO_BASE; i++) { |
diff --git a/arch/arm/mach-versatile/Kconfig b/arch/arm/mach-versatile/Kconfig index 3f7b5e9d83c..9cdec5aa04a 100644 --- a/arch/arm/mach-versatile/Kconfig +++ b/arch/arm/mach-versatile/Kconfig | |||
@@ -2,17 +2,19 @@ menu "Versatile platform type" | |||
2 | depends on ARCH_VERSATILE | 2 | depends on ARCH_VERSATILE |
3 | 3 | ||
4 | config ARCH_VERSATILE_PB | 4 | config ARCH_VERSATILE_PB |
5 | bool "Support Versatile/PB platform" | 5 | bool "Support Versatile Platform Baseboard for ARM926EJ-S" |
6 | select CPU_ARM926T | 6 | select CPU_ARM926T |
7 | select MIGHT_HAVE_PCI | 7 | select MIGHT_HAVE_PCI |
8 | default y | 8 | default y |
9 | help | 9 | help |
10 | Include support for the ARM(R) Versatile/PB platform. | 10 | Include support for the ARM(R) Versatile Platform Baseboard |
11 | for the ARM926EJ-S. | ||
11 | 12 | ||
12 | config MACH_VERSATILE_AB | 13 | config MACH_VERSATILE_AB |
13 | bool "Support Versatile/AB platform" | 14 | bool "Support Versatile Application Baseboard for ARM926EJ-S" |
14 | select CPU_ARM926T | 15 | select CPU_ARM926T |
15 | help | 16 | help |
16 | Include support for the ARM(R) Versatile/AP platform. | 17 | Include support for the ARM(R) Versatile Application Baseboard |
18 | for the ARM926EJ-S. | ||
17 | 19 | ||
18 | endmenu | 20 | endmenu |
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index 13a83e45a33..136c32e7ed8 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
@@ -63,23 +63,25 @@ | |||
63 | #define VA_VIC_BASE __io_address(VERSATILE_VIC_BASE) | 63 | #define VA_VIC_BASE __io_address(VERSATILE_VIC_BASE) |
64 | #define VA_SIC_BASE __io_address(VERSATILE_SIC_BASE) | 64 | #define VA_SIC_BASE __io_address(VERSATILE_SIC_BASE) |
65 | 65 | ||
66 | static void sic_mask_irq(unsigned int irq) | 66 | static void sic_mask_irq(struct irq_data *d) |
67 | { | 67 | { |
68 | irq -= IRQ_SIC_START; | 68 | unsigned int irq = d->irq - IRQ_SIC_START; |
69 | |||
69 | writel(1 << irq, VA_SIC_BASE + SIC_IRQ_ENABLE_CLEAR); | 70 | writel(1 << irq, VA_SIC_BASE + SIC_IRQ_ENABLE_CLEAR); |
70 | } | 71 | } |
71 | 72 | ||
72 | static void sic_unmask_irq(unsigned int irq) | 73 | static void sic_unmask_irq(struct irq_data *d) |
73 | { | 74 | { |
74 | irq -= IRQ_SIC_START; | 75 | unsigned int irq = d->irq - IRQ_SIC_START; |
76 | |||
75 | writel(1 << irq, VA_SIC_BASE + SIC_IRQ_ENABLE_SET); | 77 | writel(1 << irq, VA_SIC_BASE + SIC_IRQ_ENABLE_SET); |
76 | } | 78 | } |
77 | 79 | ||
78 | static struct irq_chip sic_chip = { | 80 | static struct irq_chip sic_chip = { |
79 | .name = "SIC", | 81 | .name = "SIC", |
80 | .ack = sic_mask_irq, | 82 | .irq_ack = sic_mask_irq, |
81 | .mask = sic_mask_irq, | 83 | .irq_mask = sic_mask_irq, |
82 | .unmask = sic_unmask_irq, | 84 | .irq_unmask = sic_unmask_irq, |
83 | }; | 85 | }; |
84 | 86 | ||
85 | static void | 87 | static void |
diff --git a/arch/arm/mach-vexpress/platsmp.c b/arch/arm/mach-vexpress/platsmp.c index b1687b6abe6..634bf1d3a31 100644 --- a/arch/arm/mach-vexpress/platsmp.c +++ b/arch/arm/mach-vexpress/platsmp.c | |||
@@ -39,7 +39,7 @@ volatile int __cpuinitdata pen_release = -1; | |||
39 | * observers, irrespective of whether they're taking part in coherency | 39 | * observers, irrespective of whether they're taking part in coherency |
40 | * or not. This is necessary for the hotplug code to work reliably. | 40 | * or not. This is necessary for the hotplug code to work reliably. |
41 | */ | 41 | */ |
42 | static void write_pen_release(int val) | 42 | static void __cpuinit write_pen_release(int val) |
43 | { | 43 | { |
44 | pen_release = val; | 44 | pen_release = val; |
45 | smp_wmb(); | 45 | smp_wmb(); |
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c index a9ed3428a2f..1edae65a0e7 100644 --- a/arch/arm/mach-vexpress/v2m.c +++ b/arch/arm/mach-vexpress/v2m.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <asm/mach/time.h> | 19 | #include <asm/mach/time.h> |
20 | #include <asm/hardware/arm_timer.h> | 20 | #include <asm/hardware/arm_timer.h> |
21 | #include <asm/hardware/timer-sp.h> | 21 | #include <asm/hardware/timer-sp.h> |
22 | #include <asm/hardware/sp810.h> | ||
22 | 23 | ||
23 | #include <mach/motherboard.h> | 24 | #include <mach/motherboard.h> |
24 | 25 | ||
@@ -50,8 +51,16 @@ void __init v2m_map_io(struct map_desc *tile, size_t num) | |||
50 | 51 | ||
51 | static void __init v2m_timer_init(void) | 52 | static void __init v2m_timer_init(void) |
52 | { | 53 | { |
54 | u32 scctrl; | ||
55 | |||
53 | versatile_sched_clock_init(MMIO_P2V(V2M_SYS_24MHZ), 24000000); | 56 | versatile_sched_clock_init(MMIO_P2V(V2M_SYS_24MHZ), 24000000); |
54 | 57 | ||
58 | /* Select 1MHz TIMCLK as the reference clock for SP804 timers */ | ||
59 | scctrl = readl(MMIO_P2V(V2M_SYSCTL + SCCTRL)); | ||
60 | scctrl |= SCCTRL_TIMEREN0SEL_TIMCLK; | ||
61 | scctrl |= SCCTRL_TIMEREN1SEL_TIMCLK; | ||
62 | writel(scctrl, MMIO_P2V(V2M_SYSCTL + SCCTRL)); | ||
63 | |||
55 | writel(0, MMIO_P2V(V2M_TIMER0) + TIMER_CTRL); | 64 | writel(0, MMIO_P2V(V2M_TIMER0) + TIMER_CTRL); |
56 | writel(0, MMIO_P2V(V2M_TIMER1) + TIMER_CTRL); | 65 | writel(0, MMIO_P2V(V2M_TIMER1) + TIMER_CTRL); |
57 | 66 | ||
diff --git a/arch/arm/mach-w90x900/irq.c b/arch/arm/mach-w90x900/irq.c index 0ce9d8e867e..9c350103dcd 100644 --- a/arch/arm/mach-w90x900/irq.c +++ b/arch/arm/mach-w90x900/irq.c | |||
@@ -92,15 +92,15 @@ static void nuc900_group_enable(struct group_irq *gpirq, int enable) | |||
92 | __raw_writel(regval, REG_AIC_GEN); | 92 | __raw_writel(regval, REG_AIC_GEN); |
93 | } | 93 | } |
94 | 94 | ||
95 | static void nuc900_irq_mask(unsigned int irq) | 95 | static void nuc900_irq_mask(struct irq_data *d) |
96 | { | 96 | { |
97 | struct group_irq *group_irq; | 97 | struct group_irq *group_irq; |
98 | 98 | ||
99 | group_irq = NULL; | 99 | group_irq = NULL; |
100 | 100 | ||
101 | __raw_writel(1 << irq, REG_AIC_MDCR); | 101 | __raw_writel(1 << d->irq, REG_AIC_MDCR); |
102 | 102 | ||
103 | switch (irq) { | 103 | switch (d->irq) { |
104 | case IRQ_GROUP0: | 104 | case IRQ_GROUP0: |
105 | group_irq = &group_nirq0; | 105 | group_irq = &group_nirq0; |
106 | break; | 106 | break; |
@@ -143,20 +143,20 @@ static void nuc900_irq_mask(unsigned int irq) | |||
143 | * to REG_AIC_EOSCR for ACK | 143 | * to REG_AIC_EOSCR for ACK |
144 | */ | 144 | */ |
145 | 145 | ||
146 | static void nuc900_irq_ack(unsigned int irq) | 146 | static void nuc900_irq_ack(struct irq_data *d) |
147 | { | 147 | { |
148 | __raw_writel(0x01, REG_AIC_EOSCR); | 148 | __raw_writel(0x01, REG_AIC_EOSCR); |
149 | } | 149 | } |
150 | 150 | ||
151 | static void nuc900_irq_unmask(unsigned int irq) | 151 | static void nuc900_irq_unmask(struct irq_data *d) |
152 | { | 152 | { |
153 | struct group_irq *group_irq; | 153 | struct group_irq *group_irq; |
154 | 154 | ||
155 | group_irq = NULL; | 155 | group_irq = NULL; |
156 | 156 | ||
157 | __raw_writel(1 << irq, REG_AIC_MECR); | 157 | __raw_writel(1 << d->irq, REG_AIC_MECR); |
158 | 158 | ||
159 | switch (irq) { | 159 | switch (d->irq) { |
160 | case IRQ_GROUP0: | 160 | case IRQ_GROUP0: |
161 | group_irq = &group_nirq0; | 161 | group_irq = &group_nirq0; |
162 | break; | 162 | break; |
@@ -195,9 +195,9 @@ static void nuc900_irq_unmask(unsigned int irq) | |||
195 | } | 195 | } |
196 | 196 | ||
197 | static struct irq_chip nuc900_irq_chip = { | 197 | static struct irq_chip nuc900_irq_chip = { |
198 | .ack = nuc900_irq_ack, | 198 | .irq_ack = nuc900_irq_ack, |
199 | .mask = nuc900_irq_mask, | 199 | .irq_mask = nuc900_irq_mask, |
200 | .unmask = nuc900_irq_unmask, | 200 | .irq_unmask = nuc900_irq_unmask, |
201 | }; | 201 | }; |
202 | 202 | ||
203 | void __init nuc900_init_irq(void) | 203 | void __init nuc900_init_irq(void) |
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index fcc1e628e05..9d30c6f804b 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig | |||
@@ -644,7 +644,7 @@ config ARM_THUMBEE | |||
644 | 644 | ||
645 | config SWP_EMULATE | 645 | config SWP_EMULATE |
646 | bool "Emulate SWP/SWPB instructions" | 646 | bool "Emulate SWP/SWPB instructions" |
647 | depends on CPU_V7 | 647 | depends on CPU_V7 && !CPU_V6 |
648 | select HAVE_PROC_CPU if PROC_FS | 648 | select HAVE_PROC_CPU if PROC_FS |
649 | default y if SMP | 649 | default y if SMP |
650 | help | 650 | help |
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 6b48e0a3d7a..4771dba6144 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c | |||
@@ -577,7 +577,7 @@ EXPORT_SYMBOL(dma_map_sg); | |||
577 | * dma_unmap_sg - unmap a set of SG buffers mapped by dma_map_sg | 577 | * dma_unmap_sg - unmap a set of SG buffers mapped by dma_map_sg |
578 | * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices | 578 | * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices |
579 | * @sg: list of buffers | 579 | * @sg: list of buffers |
580 | * @nents: number of buffers to unmap (returned from dma_map_sg) | 580 | * @nents: number of buffers to unmap (same as was passed to dma_map_sg) |
581 | * @dir: DMA transfer direction (same as was passed to dma_map_sg) | 581 | * @dir: DMA transfer direction (same as was passed to dma_map_sg) |
582 | * | 582 | * |
583 | * Unmap a set of streaming mode DMA translations. Again, CPU access | 583 | * Unmap a set of streaming mode DMA translations. Again, CPU access |
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 5164069ced4..cddd684364d 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -297,6 +297,12 @@ void __init arm_memblock_init(struct meminfo *mi, struct machine_desc *mdesc) | |||
297 | memblock_reserve(__pa(_stext), _end - _stext); | 297 | memblock_reserve(__pa(_stext), _end - _stext); |
298 | #endif | 298 | #endif |
299 | #ifdef CONFIG_BLK_DEV_INITRD | 299 | #ifdef CONFIG_BLK_DEV_INITRD |
300 | if (phys_initrd_size && | ||
301 | memblock_is_region_reserved(phys_initrd_start, phys_initrd_size)) { | ||
302 | pr_err("INITRD: 0x%08lx+0x%08lx overlaps in-use memory region - disabling initrd\n", | ||
303 | phys_initrd_start, phys_initrd_size); | ||
304 | phys_initrd_start = phys_initrd_size = 0; | ||
305 | } | ||
300 | if (phys_initrd_size) { | 306 | if (phys_initrd_size) { |
301 | memblock_reserve(phys_initrd_start, phys_initrd_size); | 307 | memblock_reserve(phys_initrd_start, phys_initrd_size); |
302 | 308 | ||
diff --git a/arch/arm/mm/pgd.c b/arch/arm/mm/pgd.c index 93292a18cf7..709244c66fa 100644 --- a/arch/arm/mm/pgd.c +++ b/arch/arm/mm/pgd.c | |||
@@ -50,7 +50,7 @@ pgd_t *pgd_alloc(struct mm_struct *mm) | |||
50 | if (!new_pmd) | 50 | if (!new_pmd) |
51 | goto no_pmd; | 51 | goto no_pmd; |
52 | 52 | ||
53 | new_pte = pte_alloc_map(mm, new_pmd, 0); | 53 | new_pte = pte_alloc_map(mm, NULL, new_pmd, 0); |
54 | if (!new_pte) | 54 | if (!new_pte) |
55 | goto no_pte; | 55 | goto no_pte; |
56 | 56 | ||
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index b49fab21517..0c1172b56b4 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
@@ -159,7 +159,9 @@ ENTRY(cpu_v7_set_pte_ext) | |||
159 | tstne r1, #L_PTE_PRESENT | 159 | tstne r1, #L_PTE_PRESENT |
160 | moveq r3, #0 | 160 | moveq r3, #0 |
161 | 161 | ||
162 | str r3, [r0, #2048]! | 162 | ARM( str r3, [r0, #2048]! ) |
163 | THUMB( add r0, r0, #2048 ) | ||
164 | THUMB( str r3, [r0] ) | ||
163 | mcr p15, 0, r0, c7, c10, 1 @ flush_pte | 165 | mcr p15, 0, r0, c7, c10, 1 @ flush_pte |
164 | #endif | 166 | #endif |
165 | mov pc, lr | 167 | mov pc, lr |
diff --git a/arch/arm/plat-mxc/3ds_debugboard.c b/arch/arm/plat-mxc/3ds_debugboard.c index 639c54a0799..c856fa39760 100644 --- a/arch/arm/plat-mxc/3ds_debugboard.c +++ b/arch/arm/plat-mxc/3ds_debugboard.c | |||
@@ -60,7 +60,6 @@ | |||
60 | #define EXPIO_INT_BUTTON_B (MXC_BOARD_IRQ_START + 4) | 60 | #define EXPIO_INT_BUTTON_B (MXC_BOARD_IRQ_START + 4) |
61 | 61 | ||
62 | static void __iomem *brd_io; | 62 | static void __iomem *brd_io; |
63 | static void expio_ack_irq(u32 irq); | ||
64 | 63 | ||
65 | static struct resource smsc911x_resources[] = { | 64 | static struct resource smsc911x_resources[] = { |
66 | { | 65 | { |
@@ -93,7 +92,8 @@ static void mxc_expio_irq_handler(u32 irq, struct irq_desc *desc) | |||
93 | u32 int_valid; | 92 | u32 int_valid; |
94 | u32 expio_irq; | 93 | u32 expio_irq; |
95 | 94 | ||
96 | desc->chip->mask(irq); /* irq = gpio irq number */ | 95 | /* irq = gpio irq number */ |
96 | desc->irq_data.chip->irq_mask(&desc->irq_data); | ||
97 | 97 | ||
98 | imr_val = __raw_readw(brd_io + INTR_MASK_REG); | 98 | imr_val = __raw_readw(brd_io + INTR_MASK_REG); |
99 | int_valid = __raw_readw(brd_io + INTR_STATUS_REG) & ~imr_val; | 99 | int_valid = __raw_readw(brd_io + INTR_STATUS_REG) & ~imr_val; |
@@ -110,37 +110,37 @@ static void mxc_expio_irq_handler(u32 irq, struct irq_desc *desc) | |||
110 | d->handle_irq(expio_irq, d); | 110 | d->handle_irq(expio_irq, d); |
111 | } | 111 | } |
112 | 112 | ||
113 | desc->chip->ack(irq); | 113 | desc->irq_data.chip->irq_ack(&desc->irq_data); |
114 | desc->chip->unmask(irq); | 114 | desc->irq_data.chip->irq_unmask(&desc->irq_data); |
115 | } | 115 | } |
116 | 116 | ||
117 | /* | 117 | /* |
118 | * Disable an expio pin's interrupt by setting the bit in the imr. | 118 | * Disable an expio pin's interrupt by setting the bit in the imr. |
119 | * Irq is an expio virtual irq number | 119 | * Irq is an expio virtual irq number |
120 | */ | 120 | */ |
121 | static void expio_mask_irq(u32 irq) | 121 | static void expio_mask_irq(struct irq_data *d) |
122 | { | 122 | { |
123 | u16 reg; | 123 | u16 reg; |
124 | u32 expio = MXC_IRQ_TO_EXPIO(irq); | 124 | u32 expio = MXC_IRQ_TO_EXPIO(d->irq); |
125 | 125 | ||
126 | reg = __raw_readw(brd_io + INTR_MASK_REG); | 126 | reg = __raw_readw(brd_io + INTR_MASK_REG); |
127 | reg |= (1 << expio); | 127 | reg |= (1 << expio); |
128 | __raw_writew(reg, brd_io + INTR_MASK_REG); | 128 | __raw_writew(reg, brd_io + INTR_MASK_REG); |
129 | } | 129 | } |
130 | 130 | ||
131 | static void expio_ack_irq(u32 irq) | 131 | static void expio_ack_irq(struct irq_data *d) |
132 | { | 132 | { |
133 | u32 expio = MXC_IRQ_TO_EXPIO(irq); | 133 | u32 expio = MXC_IRQ_TO_EXPIO(d->irq); |
134 | 134 | ||
135 | __raw_writew(1 << expio, brd_io + INTR_RESET_REG); | 135 | __raw_writew(1 << expio, brd_io + INTR_RESET_REG); |
136 | __raw_writew(0, brd_io + INTR_RESET_REG); | 136 | __raw_writew(0, brd_io + INTR_RESET_REG); |
137 | expio_mask_irq(irq); | 137 | expio_mask_irq(d); |
138 | } | 138 | } |
139 | 139 | ||
140 | static void expio_unmask_irq(u32 irq) | 140 | static void expio_unmask_irq(struct irq_data *d) |
141 | { | 141 | { |
142 | u16 reg; | 142 | u16 reg; |
143 | u32 expio = MXC_IRQ_TO_EXPIO(irq); | 143 | u32 expio = MXC_IRQ_TO_EXPIO(d->irq); |
144 | 144 | ||
145 | reg = __raw_readw(brd_io + INTR_MASK_REG); | 145 | reg = __raw_readw(brd_io + INTR_MASK_REG); |
146 | reg &= ~(1 << expio); | 146 | reg &= ~(1 << expio); |
@@ -148,9 +148,9 @@ static void expio_unmask_irq(u32 irq) | |||
148 | } | 148 | } |
149 | 149 | ||
150 | static struct irq_chip expio_irq_chip = { | 150 | static struct irq_chip expio_irq_chip = { |
151 | .ack = expio_ack_irq, | 151 | .irq_ack = expio_ack_irq, |
152 | .mask = expio_mask_irq, | 152 | .irq_mask = expio_mask_irq, |
153 | .unmask = expio_unmask_irq, | 153 | .irq_unmask = expio_unmask_irq, |
154 | }; | 154 | }; |
155 | 155 | ||
156 | int __init mxc_expio_init(u32 base, u32 p_irq) | 156 | int __init mxc_expio_init(u32 base, u32 p_irq) |
diff --git a/arch/arm/plat-mxc/avic.c b/arch/arm/plat-mxc/avic.c index 9a4e8a22dd0..deb284bc7c4 100644 --- a/arch/arm/plat-mxc/avic.c +++ b/arch/arm/plat-mxc/avic.c | |||
@@ -89,22 +89,22 @@ static int avic_set_irq_fiq(unsigned int irq, unsigned int type) | |||
89 | #endif /* CONFIG_FIQ */ | 89 | #endif /* CONFIG_FIQ */ |
90 | 90 | ||
91 | /* Disable interrupt number "irq" in the AVIC */ | 91 | /* Disable interrupt number "irq" in the AVIC */ |
92 | static void mxc_mask_irq(unsigned int irq) | 92 | static void mxc_mask_irq(struct irq_data *d) |
93 | { | 93 | { |
94 | __raw_writel(irq, avic_base + AVIC_INTDISNUM); | 94 | __raw_writel(d->irq, avic_base + AVIC_INTDISNUM); |
95 | } | 95 | } |
96 | 96 | ||
97 | /* Enable interrupt number "irq" in the AVIC */ | 97 | /* Enable interrupt number "irq" in the AVIC */ |
98 | static void mxc_unmask_irq(unsigned int irq) | 98 | static void mxc_unmask_irq(struct irq_data *d) |
99 | { | 99 | { |
100 | __raw_writel(irq, avic_base + AVIC_INTENNUM); | 100 | __raw_writel(d->irq, avic_base + AVIC_INTENNUM); |
101 | } | 101 | } |
102 | 102 | ||
103 | static struct mxc_irq_chip mxc_avic_chip = { | 103 | static struct mxc_irq_chip mxc_avic_chip = { |
104 | .base = { | 104 | .base = { |
105 | .ack = mxc_mask_irq, | 105 | .irq_ack = mxc_mask_irq, |
106 | .mask = mxc_mask_irq, | 106 | .irq_mask = mxc_mask_irq, |
107 | .unmask = mxc_unmask_irq, | 107 | .irq_unmask = mxc_unmask_irq, |
108 | }, | 108 | }, |
109 | #ifdef CONFIG_MXC_IRQ_PRIOR | 109 | #ifdef CONFIG_MXC_IRQ_PRIOR |
110 | .set_priority = avic_irq_set_priority, | 110 | .set_priority = avic_irq_set_priority, |
diff --git a/arch/arm/plat-mxc/devices/Kconfig b/arch/arm/plat-mxc/devices/Kconfig index 2537166468a..b9ab1d58b5e 100644 --- a/arch/arm/plat-mxc/devices/Kconfig +++ b/arch/arm/plat-mxc/devices/Kconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | config IMX_HAVE_PLATFORM_FEC | 1 | config IMX_HAVE_PLATFORM_FEC |
2 | bool | 2 | bool |
3 | default y if ARCH_MX25 || SOC_IMX27 || SOC_IMX35 || SOC_IMX51 | 3 | default y if ARCH_MX25 || SOC_IMX27 || SOC_IMX35 || SOC_IMX51 || SOC_IMX53 |
4 | 4 | ||
5 | config IMX_HAVE_PLATFORM_FLEXCAN | 5 | config IMX_HAVE_PLATFORM_FLEXCAN |
6 | select HAVE_CAN_FLEXCAN if CAN | 6 | select HAVE_CAN_FLEXCAN if CAN |
diff --git a/arch/arm/plat-mxc/devices/platform-fec.c b/arch/arm/plat-mxc/devices/platform-fec.c index 269ec78aba7..b50c3517d08 100644 --- a/arch/arm/plat-mxc/devices/platform-fec.c +++ b/arch/arm/plat-mxc/devices/platform-fec.c | |||
@@ -36,6 +36,11 @@ const struct imx_fec_data imx51_fec_data __initconst = | |||
36 | imx_fec_data_entry_single(MX51); | 36 | imx_fec_data_entry_single(MX51); |
37 | #endif | 37 | #endif |
38 | 38 | ||
39 | #ifdef CONFIG_SOC_IMX53 | ||
40 | const struct imx_fec_data imx53_fec_data __initconst = | ||
41 | imx_fec_data_entry_single(MX53); | ||
42 | #endif | ||
43 | |||
39 | struct platform_device *__init imx_add_fec( | 44 | struct platform_device *__init imx_add_fec( |
40 | const struct imx_fec_data *data, | 45 | const struct imx_fec_data *data, |
41 | const struct fec_platform_data *pdata) | 46 | const struct fec_platform_data *pdata) |
diff --git a/arch/arm/plat-mxc/devices/platform-imx-i2c.c b/arch/arm/plat-mxc/devices/platform-imx-i2c.c index 72ba880c75a..7ba94e1bbda 100644 --- a/arch/arm/plat-mxc/devices/platform-imx-i2c.c +++ b/arch/arm/plat-mxc/devices/platform-imx-i2c.c | |||
@@ -78,6 +78,15 @@ const struct imx_imx_i2c_data imx51_imx_i2c_data[] __initconst = { | |||
78 | }; | 78 | }; |
79 | #endif /* ifdef CONFIG_SOC_IMX51 */ | 79 | #endif /* ifdef CONFIG_SOC_IMX51 */ |
80 | 80 | ||
81 | #ifdef CONFIG_SOC_IMX53 | ||
82 | const struct imx_imx_i2c_data imx53_imx_i2c_data[] __initconst = { | ||
83 | #define imx53_imx_i2c_data_entry(_id, _hwid) \ | ||
84 | imx_imx_i2c_data_entry(MX53, _id, _hwid, SZ_4K) | ||
85 | imx53_imx_i2c_data_entry(0, 1), | ||
86 | imx53_imx_i2c_data_entry(1, 2), | ||
87 | }; | ||
88 | #endif /* ifdef CONFIG_SOC_IMX51 */ | ||
89 | |||
81 | struct platform_device *__init imx_add_imx_i2c( | 90 | struct platform_device *__init imx_add_imx_i2c( |
82 | const struct imx_imx_i2c_data *data, | 91 | const struct imx_imx_i2c_data *data, |
83 | const struct imxi2c_platform_data *pdata) | 92 | const struct imxi2c_platform_data *pdata) |
diff --git a/arch/arm/plat-mxc/devices/platform-imx-keypad.c b/arch/arm/plat-mxc/devices/platform-imx-keypad.c index 40238f0b864..26366114b02 100644 --- a/arch/arm/plat-mxc/devices/platform-imx-keypad.c +++ b/arch/arm/plat-mxc/devices/platform-imx-keypad.c | |||
@@ -41,6 +41,11 @@ const struct imx_imx_keypad_data imx35_imx_keypad_data __initconst = | |||
41 | imx_imx_keypad_data_entry_single(MX35, SZ_16); | 41 | imx_imx_keypad_data_entry_single(MX35, SZ_16); |
42 | #endif /* ifdef CONFIG_SOC_IMX35 */ | 42 | #endif /* ifdef CONFIG_SOC_IMX35 */ |
43 | 43 | ||
44 | #ifdef CONFIG_SOC_IMX51 | ||
45 | const struct imx_imx_keypad_data imx51_imx_keypad_data __initconst = | ||
46 | imx_imx_keypad_data_entry_single(MX51, SZ_16); | ||
47 | #endif /* ifdef CONFIG_SOC_IMX51 */ | ||
48 | |||
44 | struct platform_device *__init imx_add_imx_keypad( | 49 | struct platform_device *__init imx_add_imx_keypad( |
45 | const struct imx_imx_keypad_data *data, | 50 | const struct imx_imx_keypad_data *data, |
46 | const struct matrix_keymap_data *pdata) | 51 | const struct matrix_keymap_data *pdata) |
diff --git a/arch/arm/plat-mxc/devices/platform-mxc_pwm.c b/arch/arm/plat-mxc/devices/platform-mxc_pwm.c index 3d8ebdba38e..b0c4ae29811 100644 --- a/arch/arm/plat-mxc/devices/platform-mxc_pwm.c +++ b/arch/arm/plat-mxc/devices/platform-mxc_pwm.c | |||
@@ -40,6 +40,15 @@ const struct imx_mxc_pwm_data imx27_mxc_pwm_data __initconst = | |||
40 | imx_mxc_pwm_data_entry_single(MX27, 0, , SZ_4K); | 40 | imx_mxc_pwm_data_entry_single(MX27, 0, , SZ_4K); |
41 | #endif /* ifdef CONFIG_SOC_IMX27 */ | 41 | #endif /* ifdef CONFIG_SOC_IMX27 */ |
42 | 42 | ||
43 | #ifdef CONFIG_SOC_IMX51 | ||
44 | const struct imx_mxc_pwm_data imx51_mxc_pwm_data[] __initconst = { | ||
45 | #define imx51_mxc_pwm_data_entry(_id, _hwid) \ | ||
46 | imx_mxc_pwm_data_entry(MX51, _id, _hwid, SZ_16K) | ||
47 | imx51_mxc_pwm_data_entry(0, 1), | ||
48 | imx51_mxc_pwm_data_entry(1, 2), | ||
49 | }; | ||
50 | #endif /* ifdef CONFIG_SOC_IMX51 */ | ||
51 | |||
43 | struct platform_device *__init imx_add_mxc_pwm( | 52 | struct platform_device *__init imx_add_mxc_pwm( |
44 | const struct imx_mxc_pwm_data *data) | 53 | const struct imx_mxc_pwm_data *data) |
45 | { | 54 | { |
diff --git a/arch/arm/plat-mxc/devices/platform-sdhci-esdhc-imx.c b/arch/arm/plat-mxc/devices/platform-sdhci-esdhc-imx.c index b3525648a01..6b2940b93d9 100644 --- a/arch/arm/plat-mxc/devices/platform-sdhci-esdhc-imx.c +++ b/arch/arm/plat-mxc/devices/platform-sdhci-esdhc-imx.c | |||
@@ -53,6 +53,18 @@ imx51_sdhci_esdhc_imx_data[] __initconst = { | |||
53 | }; | 53 | }; |
54 | #endif /* ifdef CONFIG_SOC_IMX51 */ | 54 | #endif /* ifdef CONFIG_SOC_IMX51 */ |
55 | 55 | ||
56 | #ifdef CONFIG_SOC_IMX53 | ||
57 | const struct imx_sdhci_esdhc_imx_data | ||
58 | imx53_sdhci_esdhc_imx_data[] __initconst = { | ||
59 | #define imx53_sdhci_esdhc_imx_data_entry(_id, _hwid) \ | ||
60 | imx_sdhci_esdhc_imx_data_entry(MX53, _id, _hwid) | ||
61 | imx53_sdhci_esdhc_imx_data_entry(0, 1), | ||
62 | imx53_sdhci_esdhc_imx_data_entry(1, 2), | ||
63 | imx53_sdhci_esdhc_imx_data_entry(2, 3), | ||
64 | imx53_sdhci_esdhc_imx_data_entry(3, 4), | ||
65 | }; | ||
66 | #endif /* ifdef CONFIG_SOC_IMX53 */ | ||
67 | |||
56 | struct platform_device *__init imx_add_sdhci_esdhc_imx( | 68 | struct platform_device *__init imx_add_sdhci_esdhc_imx( |
57 | const struct imx_sdhci_esdhc_imx_data *data, | 69 | const struct imx_sdhci_esdhc_imx_data *data, |
58 | const struct esdhc_platform_data *pdata) | 70 | const struct esdhc_platform_data *pdata) |
diff --git a/arch/arm/plat-mxc/devices/platform-spi_imx.c b/arch/arm/plat-mxc/devices/platform-spi_imx.c index 8ea49adcdfc..013c85f20b5 100644 --- a/arch/arm/plat-mxc/devices/platform-spi_imx.c +++ b/arch/arm/plat-mxc/devices/platform-spi_imx.c | |||
@@ -81,6 +81,18 @@ const struct imx_spi_imx_data imx51_ecspi_data[] __initconst = { | |||
81 | }; | 81 | }; |
82 | #endif /* ifdef CONFIG_SOC_IMX51 */ | 82 | #endif /* ifdef CONFIG_SOC_IMX51 */ |
83 | 83 | ||
84 | #ifdef CONFIG_SOC_IMX53 | ||
85 | const struct imx_spi_imx_data imx53_cspi_data __initconst = | ||
86 | imx_spi_imx_data_entry_single(MX53, CSPI, "imx53-cspi", 0, , SZ_4K); | ||
87 | |||
88 | const struct imx_spi_imx_data imx53_ecspi_data[] __initconst = { | ||
89 | #define imx53_ecspi_data_entry(_id, _hwid) \ | ||
90 | imx_spi_imx_data_entry(MX53, ECSPI, "imx53-ecspi", _id, _hwid, SZ_4K) | ||
91 | imx53_ecspi_data_entry(0, 1), | ||
92 | imx53_ecspi_data_entry(1, 2), | ||
93 | }; | ||
94 | #endif /* ifdef CONFIG_SOC_IMX53 */ | ||
95 | |||
84 | struct platform_device *__init imx_add_spi_imx( | 96 | struct platform_device *__init imx_add_spi_imx( |
85 | const struct imx_spi_imx_data *data, | 97 | const struct imx_spi_imx_data *data, |
86 | const struct spi_imx_master *pdata) | 98 | const struct spi_imx_master *pdata) |
diff --git a/arch/arm/plat-mxc/gpio.c b/arch/arm/plat-mxc/gpio.c index bc2c7bc6f10..d17b3c996b8 100644 --- a/arch/arm/plat-mxc/gpio.c +++ b/arch/arm/plat-mxc/gpio.c | |||
@@ -63,29 +63,29 @@ static void _set_gpio_irqenable(struct mxc_gpio_port *port, u32 index, | |||
63 | __raw_writel(l, port->base + GPIO_IMR); | 63 | __raw_writel(l, port->base + GPIO_IMR); |
64 | } | 64 | } |
65 | 65 | ||
66 | static void gpio_ack_irq(u32 irq) | 66 | static void gpio_ack_irq(struct irq_data *d) |
67 | { | 67 | { |
68 | u32 gpio = irq_to_gpio(irq); | 68 | u32 gpio = irq_to_gpio(d->irq); |
69 | _clear_gpio_irqstatus(&mxc_gpio_ports[gpio / 32], gpio & 0x1f); | 69 | _clear_gpio_irqstatus(&mxc_gpio_ports[gpio / 32], gpio & 0x1f); |
70 | } | 70 | } |
71 | 71 | ||
72 | static void gpio_mask_irq(u32 irq) | 72 | static void gpio_mask_irq(struct irq_data *d) |
73 | { | 73 | { |
74 | u32 gpio = irq_to_gpio(irq); | 74 | u32 gpio = irq_to_gpio(d->irq); |
75 | _set_gpio_irqenable(&mxc_gpio_ports[gpio / 32], gpio & 0x1f, 0); | 75 | _set_gpio_irqenable(&mxc_gpio_ports[gpio / 32], gpio & 0x1f, 0); |
76 | } | 76 | } |
77 | 77 | ||
78 | static void gpio_unmask_irq(u32 irq) | 78 | static void gpio_unmask_irq(struct irq_data *d) |
79 | { | 79 | { |
80 | u32 gpio = irq_to_gpio(irq); | 80 | u32 gpio = irq_to_gpio(d->irq); |
81 | _set_gpio_irqenable(&mxc_gpio_ports[gpio / 32], gpio & 0x1f, 1); | 81 | _set_gpio_irqenable(&mxc_gpio_ports[gpio / 32], gpio & 0x1f, 1); |
82 | } | 82 | } |
83 | 83 | ||
84 | static int mxc_gpio_get(struct gpio_chip *chip, unsigned offset); | 84 | static int mxc_gpio_get(struct gpio_chip *chip, unsigned offset); |
85 | 85 | ||
86 | static int gpio_set_irq_type(u32 irq, u32 type) | 86 | static int gpio_set_irq_type(struct irq_data *d, u32 type) |
87 | { | 87 | { |
88 | u32 gpio = irq_to_gpio(irq); | 88 | u32 gpio = irq_to_gpio(d->irq); |
89 | struct mxc_gpio_port *port = &mxc_gpio_ports[gpio / 32]; | 89 | struct mxc_gpio_port *port = &mxc_gpio_ports[gpio / 32]; |
90 | u32 bit, val; | 90 | u32 bit, val; |
91 | int edge; | 91 | int edge; |
@@ -211,9 +211,9 @@ static void mx2_gpio_irq_handler(u32 irq, struct irq_desc *desc) | |||
211 | * @param enable enable as wake-up if equal to non-zero | 211 | * @param enable enable as wake-up if equal to non-zero |
212 | * @return This function returns 0 on success. | 212 | * @return This function returns 0 on success. |
213 | */ | 213 | */ |
214 | static int gpio_set_wake_irq(u32 irq, u32 enable) | 214 | static int gpio_set_wake_irq(struct irq_data *d, u32 enable) |
215 | { | 215 | { |
216 | u32 gpio = irq_to_gpio(irq); | 216 | u32 gpio = irq_to_gpio(d->irq); |
217 | u32 gpio_idx = gpio & 0x1F; | 217 | u32 gpio_idx = gpio & 0x1F; |
218 | struct mxc_gpio_port *port = &mxc_gpio_ports[gpio / 32]; | 218 | struct mxc_gpio_port *port = &mxc_gpio_ports[gpio / 32]; |
219 | 219 | ||
@@ -233,11 +233,11 @@ static int gpio_set_wake_irq(u32 irq, u32 enable) | |||
233 | } | 233 | } |
234 | 234 | ||
235 | static struct irq_chip gpio_irq_chip = { | 235 | static struct irq_chip gpio_irq_chip = { |
236 | .ack = gpio_ack_irq, | 236 | .irq_ack = gpio_ack_irq, |
237 | .mask = gpio_mask_irq, | 237 | .irq_mask = gpio_mask_irq, |
238 | .unmask = gpio_unmask_irq, | 238 | .irq_unmask = gpio_unmask_irq, |
239 | .set_type = gpio_set_irq_type, | 239 | .irq_set_type = gpio_set_irq_type, |
240 | .set_wake = gpio_set_wake_irq, | 240 | .irq_set_wake = gpio_set_wake_irq, |
241 | }; | 241 | }; |
242 | 242 | ||
243 | static void _set_gpio_direction(struct gpio_chip *chip, unsigned offset, | 243 | static void _set_gpio_direction(struct gpio_chip *chip, unsigned offset, |
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx53.h b/arch/arm/plat-mxc/include/mach/iomux-mx53.h index 5deee019c29..68e11d7ab79 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-mx53.h +++ b/arch/arm/plat-mxc/include/mach/iomux-mx53.h | |||
@@ -34,7 +34,6 @@ typedef enum iomux_config { | |||
34 | IOMUX_CONFIG_ALT6, | 34 | IOMUX_CONFIG_ALT6, |
35 | IOMUX_CONFIG_ALT7, | 35 | IOMUX_CONFIG_ALT7, |
36 | IOMUX_CONFIG_GPIO, /* added to help user use GPIO mode */ | 36 | IOMUX_CONFIG_GPIO, /* added to help user use GPIO mode */ |
37 | IOMUX_CONFIG_SION = 0x1 << 4, /* LOOPBACK:MUX SION bit */ | ||
38 | } iomux_pin_cfg_t; | 37 | } iomux_pin_cfg_t; |
39 | 38 | ||
40 | /* These 2 defines are for pins that may not have a mux register, but could | 39 | /* These 2 defines are for pins that may not have a mux register, but could |
@@ -135,6 +134,9 @@ typedef enum iomux_config { | |||
135 | #define MX53_PAD_EIM_D16__GPIO_3_16 IOMUX_PAD(0x460, 0x118,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL) | 134 | #define MX53_PAD_EIM_D16__GPIO_3_16 IOMUX_PAD(0x460, 0x118,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL) |
136 | #define MX53_PAD_EIM_D17__GPIO_3_17 IOMUX_PAD(0x464, 0x11C,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL) | 135 | #define MX53_PAD_EIM_D17__GPIO_3_17 IOMUX_PAD(0x464, 0x11C,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL) |
137 | #define MX53_PAD_EIM_D18__GPIO_3_18 IOMUX_PAD(0x468, 0x120,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL) | 136 | #define MX53_PAD_EIM_D18__GPIO_3_18 IOMUX_PAD(0x468, 0x120,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL) |
137 | #define MX53_PAD_EIM_D16__CSPI1_SCLK IOMUX_PAD(0x460, 0x118,IOMUX_CONFIG_ALT4, 0x79c, 3, NO_PAD_CTRL) | ||
138 | #define MX53_PAD_EIM_D17__CSPI1_MISO IOMUX_PAD(0x464, 0x11C,IOMUX_CONFIG_ALT4, 0x7a0, 3, NO_PAD_CTRL) | ||
139 | #define MX53_PAD_EIM_D18__CSPI1_MOSI IOMUX_PAD(0x468, 0x120,IOMUX_CONFIG_ALT4, 0x7a4, 3, NO_PAD_CTRL) | ||
138 | #define MX53_PAD_EIM_D19__GPIO_3_19 IOMUX_PAD(0x46C, 0x124,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL) | 140 | #define MX53_PAD_EIM_D19__GPIO_3_19 IOMUX_PAD(0x46C, 0x124,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL) |
139 | #define MX53_PAD_EIM_D20__GPIO_3_20 IOMUX_PAD(0x470, 0x128,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL) | 141 | #define MX53_PAD_EIM_D20__GPIO_3_20 IOMUX_PAD(0x470, 0x128,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL) |
140 | #define MX53_PAD_EIM_D21__GPIO_3_21 IOMUX_PAD(0x474, 0x12C,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL) | 142 | #define MX53_PAD_EIM_D21__GPIO_3_21 IOMUX_PAD(0x474, 0x12C,IOMUX_CONFIG_ALT1, 0x0, 0, NO_PAD_CTRL) |
diff --git a/arch/arm/plat-mxc/include/mach/iomux-v3.h b/arch/arm/plat-mxc/include/mach/iomux-v3.h index 2277b01c855..82620af1922 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-v3.h +++ b/arch/arm/plat-mxc/include/mach/iomux-v3.h | |||
@@ -105,6 +105,7 @@ typedef u64 iomux_v3_cfg_t; | |||
105 | #define PAD_CTL_SRE_FAST (1 << 0) | 105 | #define PAD_CTL_SRE_FAST (1 << 0) |
106 | #define PAD_CTL_SRE_SLOW (0 << 0) | 106 | #define PAD_CTL_SRE_SLOW (0 << 0) |
107 | 107 | ||
108 | #define IOMUX_CONFIG_SION (0x1 << 4) | ||
108 | 109 | ||
109 | #define MX51_NUM_GPIO_PORT 4 | 110 | #define MX51_NUM_GPIO_PORT 4 |
110 | 111 | ||
diff --git a/arch/arm/plat-mxc/include/mach/mx51.h b/arch/arm/plat-mxc/include/mach/mx51.h index 873807f96d7..1eb339e6c85 100644 --- a/arch/arm/plat-mxc/include/mach/mx51.h +++ b/arch/arm/plat-mxc/include/mach/mx51.h | |||
@@ -301,8 +301,8 @@ | |||
301 | #define MX51_MXC_INT_GPIO4_HIGH 57 | 301 | #define MX51_MXC_INT_GPIO4_HIGH 57 |
302 | #define MX51_MXC_INT_WDOG1 58 | 302 | #define MX51_MXC_INT_WDOG1 58 |
303 | #define MX51_MXC_INT_WDOG2 59 | 303 | #define MX51_MXC_INT_WDOG2 59 |
304 | #define MX51_MXC_INT_KPP 60 | 304 | #define MX51_INT_KPP 60 |
305 | #define MX51_MXC_INT_PWM1 61 | 305 | #define MX51_INT_PWM1 61 |
306 | #define MX51_INT_I2C1 62 | 306 | #define MX51_INT_I2C1 62 |
307 | #define MX51_INT_I2C2 63 | 307 | #define MX51_INT_I2C2 63 |
308 | #define MX51_MXC_INT_HS_I2C 64 | 308 | #define MX51_MXC_INT_HS_I2C 64 |
@@ -335,7 +335,7 @@ | |||
335 | #define MX51_MXC_INT_SPDIF 91 | 335 | #define MX51_MXC_INT_SPDIF 91 |
336 | #define MX51_MXC_INT_TVE 92 | 336 | #define MX51_MXC_INT_TVE 92 |
337 | #define MX51_MXC_INT_FIRI 93 | 337 | #define MX51_MXC_INT_FIRI 93 |
338 | #define MX51_MXC_INT_PWM2 94 | 338 | #define MX51_INT_PWM2 94 |
339 | #define MX51_MXC_INT_SLIM_EXP 95 | 339 | #define MX51_MXC_INT_SLIM_EXP 95 |
340 | #define MX51_INT_SSI3 96 | 340 | #define MX51_INT_SSI3 96 |
341 | #define MX51_MXC_INT_EMI_BOOT 97 | 341 | #define MX51_MXC_INT_EMI_BOOT 97 |
diff --git a/arch/arm/plat-mxc/include/mach/mx53.h b/arch/arm/plat-mxc/include/mach/mx53.h index 9577cdbf7fa..d7a8e52181e 100644 --- a/arch/arm/plat-mxc/include/mach/mx53.h +++ b/arch/arm/plat-mxc/include/mach/mx53.h | |||
@@ -53,13 +53,13 @@ | |||
53 | #define MX53_SPBA0_BASE_ADDR 0x50000000 | 53 | #define MX53_SPBA0_BASE_ADDR 0x50000000 |
54 | #define MX53_SPBA0_SIZE SZ_1M | 54 | #define MX53_SPBA0_SIZE SZ_1M |
55 | 55 | ||
56 | #define MX53_MMC_SDHC1_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00004000) | 56 | #define MX53_ESDHC1_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00004000) |
57 | #define MX53_MMC_SDHC2_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00008000) | 57 | #define MX53_ESDHC2_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00008000) |
58 | #define MX53_UART3_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x0000C000) | 58 | #define MX53_UART3_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x0000C000) |
59 | #define MX53_CSPI1_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00010000) | 59 | #define MX53_ECSPI1_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00010000) |
60 | #define MX53_SSI2_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00014000) | 60 | #define MX53_SSI2_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00014000) |
61 | #define MX53_MMC_SDHC3_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00020000) | 61 | #define MX53_ESDHC3_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00020000) |
62 | #define MX53_MMC_SDHC4_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00024000) | 62 | #define MX53_ESDHC4_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00024000) |
63 | #define MX53_SPDIF_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00028000) | 63 | #define MX53_SPDIF_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00028000) |
64 | #define MX53_ASRC_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x0002C000) | 64 | #define MX53_ASRC_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x0002C000) |
65 | #define MX53_ATA_DMA_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00030000) | 65 | #define MX53_ATA_DMA_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00030000) |
@@ -117,12 +117,12 @@ | |||
117 | #define MX53_ARM_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000A0000) | 117 | #define MX53_ARM_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000A0000) |
118 | #define MX53_OWIRE_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000A4000) | 118 | #define MX53_OWIRE_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000A4000) |
119 | #define MX53_FIRI_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000A8000) | 119 | #define MX53_FIRI_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000A8000) |
120 | #define MX53_CSPI2_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000AC000) | 120 | #define MX53_ECSPI2_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000AC000) |
121 | #define MX53_SDMA_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000B0000) | 121 | #define MX53_SDMA_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000B0000) |
122 | #define MX53_SCC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000B4000) | 122 | #define MX53_SCC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000B4000) |
123 | #define MX53_ROMCP_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000B8000) | 123 | #define MX53_ROMCP_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000B8000) |
124 | #define MX53_RTIC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000BC000) | 124 | #define MX53_RTIC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000BC000) |
125 | #define MX53_CSPI3_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000C0000) | 125 | #define MX53_CSPI_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000C0000) |
126 | #define MX53_I2C2_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000C4000) | 126 | #define MX53_I2C2_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000C4000) |
127 | #define MX53_I2C1_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000C8000) | 127 | #define MX53_I2C1_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000C8000) |
128 | #define MX53_SSI1_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000CC000) | 128 | #define MX53_SSI1_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000CC000) |
@@ -136,7 +136,7 @@ | |||
136 | #define MX53_MIPI_HSC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000DC000) | 136 | #define MX53_MIPI_HSC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000DC000) |
137 | #define MX53_MLB_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000E4000) | 137 | #define MX53_MLB_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000E4000) |
138 | #define MX53_SSI3_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000E8000) | 138 | #define MX53_SSI3_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000E8000) |
139 | #define MX53_MXC_FEC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000EC000) | 139 | #define MX53_FEC_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000EC000) |
140 | #define MX53_TVE_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000F0000) | 140 | #define MX53_TVE_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000F0000) |
141 | #define MX53_VPU_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000F4000) | 141 | #define MX53_VPU_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000F4000) |
142 | #define MX53_SAHARA_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000F8000) | 142 | #define MX53_SAHARA_BASE_ADDR (MX53_AIPS2_BASE_ADDR + 0x000F8000) |
@@ -229,10 +229,10 @@ | |||
229 | * Interrupt numbers | 229 | * Interrupt numbers |
230 | */ | 230 | */ |
231 | #define MX53_INT_RESV0 0 | 231 | #define MX53_INT_RESV0 0 |
232 | #define MX53_INT_MMC_SDHC1 1 | 232 | #define MX53_INT_ESDHC1 1 |
233 | #define MX53_INT_MMC_SDHC2 2 | 233 | #define MX53_INT_ESDHC2 2 |
234 | #define MX53_INT_MMC_SDHC3 3 | 234 | #define MX53_INT_ESDHC3 3 |
235 | #define MX53_INT_MMC_SDHC4 4 | 235 | #define MX53_INT_ESDHC4 4 |
236 | #define MX53_INT_RESV5 5 | 236 | #define MX53_INT_RESV5 5 |
237 | #define MX53_INT_SDMA 6 | 237 | #define MX53_INT_SDMA 6 |
238 | #define MX53_INT_IOMUX 7 | 238 | #define MX53_INT_IOMUX 7 |
@@ -264,8 +264,8 @@ | |||
264 | #define MX53_INT_UART3 33 | 264 | #define MX53_INT_UART3 33 |
265 | #define MX53_INT_RESV34 34 | 265 | #define MX53_INT_RESV34 34 |
266 | #define MX53_INT_RESV35 35 | 266 | #define MX53_INT_RESV35 35 |
267 | #define MX53_INT_CSPI1 36 | 267 | #define MX53_INT_ECSPI1 36 |
268 | #define MX53_INT_CSPI2 37 | 268 | #define MX53_INT_ECSPI2 37 |
269 | #define MX53_INT_CSPI 38 | 269 | #define MX53_INT_CSPI 38 |
270 | #define MX53_INT_GPT 39 | 270 | #define MX53_INT_GPT 39 |
271 | #define MX53_INT_EPIT1 40 | 271 | #define MX53_INT_EPIT1 40 |
diff --git a/arch/arm/plat-mxc/include/mach/uncompress.h b/arch/arm/plat-mxc/include/mach/uncompress.h index 3a70ebf0477..ff469c4f1d7 100644 --- a/arch/arm/plat-mxc/include/mach/uncompress.h +++ b/arch/arm/plat-mxc/include/mach/uncompress.h | |||
@@ -95,6 +95,7 @@ static __inline__ void __arch_decomp_setup(unsigned long arch_id) | |||
95 | case MACH_TYPE_MX35_3DS: | 95 | case MACH_TYPE_MX35_3DS: |
96 | case MACH_TYPE_PCM043: | 96 | case MACH_TYPE_PCM043: |
97 | case MACH_TYPE_LILLY1131: | 97 | case MACH_TYPE_LILLY1131: |
98 | case MACH_TYPE_VPR200: | ||
98 | uart_base = MX3X_UART1_BASE_ADDR; | 99 | uart_base = MX3X_UART1_BASE_ADDR; |
99 | break; | 100 | break; |
100 | case MACH_TYPE_MAGX_ZN5: | 101 | case MACH_TYPE_MAGX_ZN5: |
@@ -102,6 +103,7 @@ static __inline__ void __arch_decomp_setup(unsigned long arch_id) | |||
102 | break; | 103 | break; |
103 | case MACH_TYPE_MX51_BABBAGE: | 104 | case MACH_TYPE_MX51_BABBAGE: |
104 | case MACH_TYPE_EUKREA_CPUIMX51SD: | 105 | case MACH_TYPE_EUKREA_CPUIMX51SD: |
106 | case MACH_TYPE_MX51_3DS: | ||
105 | uart_base = MX51_UART1_BASE_ADDR; | 107 | uart_base = MX51_UART1_BASE_ADDR; |
106 | break; | 108 | break; |
107 | case MACH_TYPE_MX50_RDP: | 109 | case MACH_TYPE_MX50_RDP: |
diff --git a/arch/arm/plat-mxc/pwm.c b/arch/arm/plat-mxc/pwm.c index c36f2630ed9..7a61ef8f471 100644 --- a/arch/arm/plat-mxc/pwm.c +++ b/arch/arm/plat-mxc/pwm.c | |||
@@ -57,7 +57,7 @@ int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns) | |||
57 | if (pwm == NULL || period_ns == 0 || duty_ns > period_ns) | 57 | if (pwm == NULL || period_ns == 0 || duty_ns > period_ns) |
58 | return -EINVAL; | 58 | return -EINVAL; |
59 | 59 | ||
60 | if (cpu_is_mx27() || cpu_is_mx3() || cpu_is_mx25()) { | 60 | if (cpu_is_mx27() || cpu_is_mx3() || cpu_is_mx25() || cpu_is_mx51()) { |
61 | unsigned long long c; | 61 | unsigned long long c; |
62 | unsigned long period_cycles, duty_cycles, prescale; | 62 | unsigned long period_cycles, duty_cycles, prescale; |
63 | u32 cr; | 63 | u32 cr; |
diff --git a/arch/arm/plat-mxc/tzic.c b/arch/arm/plat-mxc/tzic.c index e69ed8a8c20..bc3a6be8a27 100644 --- a/arch/arm/plat-mxc/tzic.c +++ b/arch/arm/plat-mxc/tzic.c | |||
@@ -69,50 +69,50 @@ static int tzic_set_irq_fiq(unsigned int irq, unsigned int type) | |||
69 | #endif | 69 | #endif |
70 | 70 | ||
71 | /** | 71 | /** |
72 | * tzic_mask_irq() - Disable interrupt number "irq" in the TZIC | 72 | * tzic_mask_irq() - Disable interrupt source "d" in the TZIC |
73 | * | 73 | * |
74 | * @param irq interrupt source number | 74 | * @param d interrupt source |
75 | */ | 75 | */ |
76 | static void tzic_mask_irq(unsigned int irq) | 76 | static void tzic_mask_irq(struct irq_data *d) |
77 | { | 77 | { |
78 | int index, off; | 78 | int index, off; |
79 | 79 | ||
80 | index = irq >> 5; | 80 | index = d->irq >> 5; |
81 | off = irq & 0x1F; | 81 | off = d->irq & 0x1F; |
82 | __raw_writel(1 << off, tzic_base + TZIC_ENCLEAR0(index)); | 82 | __raw_writel(1 << off, tzic_base + TZIC_ENCLEAR0(index)); |
83 | } | 83 | } |
84 | 84 | ||
85 | /** | 85 | /** |
86 | * tzic_unmask_irq() - Enable interrupt number "irq" in the TZIC | 86 | * tzic_unmask_irq() - Enable interrupt source "d" in the TZIC |
87 | * | 87 | * |
88 | * @param irq interrupt source number | 88 | * @param d interrupt source |
89 | */ | 89 | */ |
90 | static void tzic_unmask_irq(unsigned int irq) | 90 | static void tzic_unmask_irq(struct irq_data *d) |
91 | { | 91 | { |
92 | int index, off; | 92 | int index, off; |
93 | 93 | ||
94 | index = irq >> 5; | 94 | index = d->irq >> 5; |
95 | off = irq & 0x1F; | 95 | off = d->irq & 0x1F; |
96 | __raw_writel(1 << off, tzic_base + TZIC_ENSET0(index)); | 96 | __raw_writel(1 << off, tzic_base + TZIC_ENSET0(index)); |
97 | } | 97 | } |
98 | 98 | ||
99 | static unsigned int wakeup_intr[4]; | 99 | static unsigned int wakeup_intr[4]; |
100 | 100 | ||
101 | /** | 101 | /** |
102 | * tzic_set_wake_irq() - Set interrupt number "irq" in the TZIC as a wake-up source. | 102 | * tzic_set_wake_irq() - Set interrupt source "d" in the TZIC as a wake-up source. |
103 | * | 103 | * |
104 | * @param irq interrupt source number | 104 | * @param d interrupt source |
105 | * @param enable enable as wake-up if equal to non-zero | 105 | * @param enable enable as wake-up if equal to non-zero |
106 | * disble as wake-up if equal to zero | 106 | * disble as wake-up if equal to zero |
107 | * | 107 | * |
108 | * @return This function returns 0 on success. | 108 | * @return This function returns 0 on success. |
109 | */ | 109 | */ |
110 | static int tzic_set_wake_irq(unsigned int irq, unsigned int enable) | 110 | static int tzic_set_wake_irq(struct irq_data *d, unsigned int enable) |
111 | { | 111 | { |
112 | unsigned int index, off; | 112 | unsigned int index, off; |
113 | 113 | ||
114 | index = irq >> 5; | 114 | index = d->irq >> 5; |
115 | off = irq & 0x1F; | 115 | off = d->irq & 0x1F; |
116 | 116 | ||
117 | if (index > 3) | 117 | if (index > 3) |
118 | return -EINVAL; | 118 | return -EINVAL; |
@@ -128,10 +128,10 @@ static int tzic_set_wake_irq(unsigned int irq, unsigned int enable) | |||
128 | static struct mxc_irq_chip mxc_tzic_chip = { | 128 | static struct mxc_irq_chip mxc_tzic_chip = { |
129 | .base = { | 129 | .base = { |
130 | .name = "MXC_TZIC", | 130 | .name = "MXC_TZIC", |
131 | .ack = tzic_mask_irq, | 131 | .irq_ack = tzic_mask_irq, |
132 | .mask = tzic_mask_irq, | 132 | .irq_mask = tzic_mask_irq, |
133 | .unmask = tzic_unmask_irq, | 133 | .irq_unmask = tzic_unmask_irq, |
134 | .set_wake = tzic_set_wake_irq, | 134 | .irq_set_wake = tzic_set_wake_irq, |
135 | }, | 135 | }, |
136 | #ifdef CONFIG_FIQ | 136 | #ifdef CONFIG_FIQ |
137 | .set_irq_fiq = tzic_set_irq_fiq, | 137 | .set_irq_fiq = tzic_set_irq_fiq, |
diff --git a/arch/arm/plat-nomadik/gpio.c b/arch/arm/plat-nomadik/gpio.c index eda4e3a11a3..1e88ecb846d 100644 --- a/arch/arm/plat-nomadik/gpio.c +++ b/arch/arm/plat-nomadik/gpio.c | |||
@@ -356,13 +356,13 @@ static inline int nmk_gpio_get_bitmask(int gpio) | |||
356 | return 1 << (gpio % 32); | 356 | return 1 << (gpio % 32); |
357 | } | 357 | } |
358 | 358 | ||
359 | static void nmk_gpio_irq_ack(unsigned int irq) | 359 | static void nmk_gpio_irq_ack(struct irq_data *d) |
360 | { | 360 | { |
361 | int gpio; | 361 | int gpio; |
362 | struct nmk_gpio_chip *nmk_chip; | 362 | struct nmk_gpio_chip *nmk_chip; |
363 | 363 | ||
364 | gpio = NOMADIK_IRQ_TO_GPIO(irq); | 364 | gpio = NOMADIK_IRQ_TO_GPIO(d->irq); |
365 | nmk_chip = get_irq_chip_data(irq); | 365 | nmk_chip = irq_data_get_irq_chip_data(d); |
366 | if (!nmk_chip) | 366 | if (!nmk_chip) |
367 | return; | 367 | return; |
368 | writel(nmk_gpio_get_bitmask(gpio), nmk_chip->addr + NMK_GPIO_IC); | 368 | writel(nmk_gpio_get_bitmask(gpio), nmk_chip->addr + NMK_GPIO_IC); |
@@ -401,7 +401,7 @@ static void __nmk_gpio_irq_modify(struct nmk_gpio_chip *nmk_chip, | |||
401 | } | 401 | } |
402 | } | 402 | } |
403 | 403 | ||
404 | static int nmk_gpio_irq_modify(unsigned int irq, enum nmk_gpio_irq_type which, | 404 | static int nmk_gpio_irq_modify(struct irq_data *d, enum nmk_gpio_irq_type which, |
405 | bool enable) | 405 | bool enable) |
406 | { | 406 | { |
407 | int gpio; | 407 | int gpio; |
@@ -409,8 +409,8 @@ static int nmk_gpio_irq_modify(unsigned int irq, enum nmk_gpio_irq_type which, | |||
409 | unsigned long flags; | 409 | unsigned long flags; |
410 | u32 bitmask; | 410 | u32 bitmask; |
411 | 411 | ||
412 | gpio = NOMADIK_IRQ_TO_GPIO(irq); | 412 | gpio = NOMADIK_IRQ_TO_GPIO(d->irq); |
413 | nmk_chip = get_irq_chip_data(irq); | 413 | nmk_chip = irq_data_get_irq_chip_data(d); |
414 | bitmask = nmk_gpio_get_bitmask(gpio); | 414 | bitmask = nmk_gpio_get_bitmask(gpio); |
415 | if (!nmk_chip) | 415 | if (!nmk_chip) |
416 | return -EINVAL; | 416 | return -EINVAL; |
@@ -422,24 +422,24 @@ static int nmk_gpio_irq_modify(unsigned int irq, enum nmk_gpio_irq_type which, | |||
422 | return 0; | 422 | return 0; |
423 | } | 423 | } |
424 | 424 | ||
425 | static void nmk_gpio_irq_mask(unsigned int irq) | 425 | static void nmk_gpio_irq_mask(struct irq_data *d) |
426 | { | 426 | { |
427 | nmk_gpio_irq_modify(irq, NORMAL, false); | 427 | nmk_gpio_irq_modify(d, NORMAL, false); |
428 | } | 428 | } |
429 | 429 | ||
430 | static void nmk_gpio_irq_unmask(unsigned int irq) | 430 | static void nmk_gpio_irq_unmask(struct irq_data *d) |
431 | { | 431 | { |
432 | nmk_gpio_irq_modify(irq, NORMAL, true); | 432 | nmk_gpio_irq_modify(d, NORMAL, true); |
433 | } | 433 | } |
434 | 434 | ||
435 | static int nmk_gpio_irq_set_wake(unsigned int irq, unsigned int on) | 435 | static int nmk_gpio_irq_set_wake(struct irq_data *d, unsigned int on) |
436 | { | 436 | { |
437 | struct nmk_gpio_chip *nmk_chip; | 437 | struct nmk_gpio_chip *nmk_chip; |
438 | unsigned long flags; | 438 | unsigned long flags; |
439 | int gpio; | 439 | int gpio; |
440 | 440 | ||
441 | gpio = NOMADIK_IRQ_TO_GPIO(irq); | 441 | gpio = NOMADIK_IRQ_TO_GPIO(d->irq); |
442 | nmk_chip = get_irq_chip_data(irq); | 442 | nmk_chip = irq_data_get_irq_chip_data(d); |
443 | if (!nmk_chip) | 443 | if (!nmk_chip) |
444 | return -EINVAL; | 444 | return -EINVAL; |
445 | 445 | ||
@@ -457,9 +457,9 @@ static int nmk_gpio_irq_set_wake(unsigned int irq, unsigned int on) | |||
457 | return 0; | 457 | return 0; |
458 | } | 458 | } |
459 | 459 | ||
460 | static int nmk_gpio_irq_set_type(unsigned int irq, unsigned int type) | 460 | static int nmk_gpio_irq_set_type(struct irq_data *d, unsigned int type) |
461 | { | 461 | { |
462 | struct irq_desc *desc = irq_to_desc(irq); | 462 | struct irq_desc *desc = irq_to_desc(d->irq); |
463 | bool enabled = !(desc->status & IRQ_DISABLED); | 463 | bool enabled = !(desc->status & IRQ_DISABLED); |
464 | bool wake = desc->wake_depth; | 464 | bool wake = desc->wake_depth; |
465 | int gpio; | 465 | int gpio; |
@@ -467,8 +467,8 @@ static int nmk_gpio_irq_set_type(unsigned int irq, unsigned int type) | |||
467 | unsigned long flags; | 467 | unsigned long flags; |
468 | u32 bitmask; | 468 | u32 bitmask; |
469 | 469 | ||
470 | gpio = NOMADIK_IRQ_TO_GPIO(irq); | 470 | gpio = NOMADIK_IRQ_TO_GPIO(d->irq); |
471 | nmk_chip = get_irq_chip_data(irq); | 471 | nmk_chip = irq_data_get_irq_chip_data(d); |
472 | bitmask = nmk_gpio_get_bitmask(gpio); | 472 | bitmask = nmk_gpio_get_bitmask(gpio); |
473 | if (!nmk_chip) | 473 | if (!nmk_chip) |
474 | return -EINVAL; | 474 | return -EINVAL; |
@@ -507,11 +507,11 @@ static int nmk_gpio_irq_set_type(unsigned int irq, unsigned int type) | |||
507 | 507 | ||
508 | static struct irq_chip nmk_gpio_irq_chip = { | 508 | static struct irq_chip nmk_gpio_irq_chip = { |
509 | .name = "Nomadik-GPIO", | 509 | .name = "Nomadik-GPIO", |
510 | .ack = nmk_gpio_irq_ack, | 510 | .irq_ack = nmk_gpio_irq_ack, |
511 | .mask = nmk_gpio_irq_mask, | 511 | .irq_mask = nmk_gpio_irq_mask, |
512 | .unmask = nmk_gpio_irq_unmask, | 512 | .irq_unmask = nmk_gpio_irq_unmask, |
513 | .set_type = nmk_gpio_irq_set_type, | 513 | .irq_set_type = nmk_gpio_irq_set_type, |
514 | .set_wake = nmk_gpio_irq_set_wake, | 514 | .irq_set_wake = nmk_gpio_irq_set_wake, |
515 | }; | 515 | }; |
516 | 516 | ||
517 | static void nmk_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | 517 | static void nmk_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) |
@@ -522,12 +522,12 @@ static void nmk_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
522 | u32 pending; | 522 | u32 pending; |
523 | unsigned int first_irq; | 523 | unsigned int first_irq; |
524 | 524 | ||
525 | if (host_chip->mask_ack) | 525 | if (host_chip->irq_mask_ack) |
526 | host_chip->mask_ack(irq); | 526 | host_chip->irq_mask_ack(&desc->irq_data); |
527 | else { | 527 | else { |
528 | host_chip->mask(irq); | 528 | host_chip->irq_mask(&desc->irq_data); |
529 | if (host_chip->ack) | 529 | if (host_chip->irq_ack) |
530 | host_chip->ack(irq); | 530 | host_chip->irq_ack(&desc->irq_data); |
531 | } | 531 | } |
532 | 532 | ||
533 | nmk_chip = get_irq_data(irq); | 533 | nmk_chip = get_irq_data(irq); |
@@ -537,7 +537,7 @@ static void nmk_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
537 | generic_handle_irq(gpio_irq); | 537 | generic_handle_irq(gpio_irq); |
538 | } | 538 | } |
539 | 539 | ||
540 | host_chip->unmask(irq); | 540 | host_chip->irq_unmask(&desc->irq_data); |
541 | } | 541 | } |
542 | 542 | ||
543 | static int nmk_gpio_init_irq(struct nmk_gpio_chip *nmk_chip) | 543 | static int nmk_gpio_init_irq(struct nmk_gpio_chip *nmk_chip) |
diff --git a/arch/arm/plat-nomadik/include/plat/ste_dma40.h b/arch/arm/plat-nomadik/include/plat/ste_dma40.h index 74b62f10d07..4d6dd4c39b7 100644 --- a/arch/arm/plat-nomadik/include/plat/ste_dma40.h +++ b/arch/arm/plat-nomadik/include/plat/ste_dma40.h | |||
@@ -13,6 +13,14 @@ | |||
13 | #include <linux/workqueue.h> | 13 | #include <linux/workqueue.h> |
14 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
15 | 15 | ||
16 | /* | ||
17 | * Maxium size for a single dma descriptor | ||
18 | * Size is limited to 16 bits. | ||
19 | * Size is in the units of addr-widths (1,2,4,8 bytes) | ||
20 | * Larger transfers will be split up to multiple linked desc | ||
21 | */ | ||
22 | #define STEDMA40_MAX_SEG_SIZE 0xFFFF | ||
23 | |||
16 | /* dev types for memcpy */ | 24 | /* dev types for memcpy */ |
17 | #define STEDMA40_DEV_DST_MEMORY (-1) | 25 | #define STEDMA40_DEV_DST_MEMORY (-1) |
18 | #define STEDMA40_DEV_SRC_MEMORY (-1) | 26 | #define STEDMA40_DEV_SRC_MEMORY (-1) |
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig index 18fe3cb195d..b6333ae3f92 100644 --- a/arch/arm/plat-omap/Kconfig +++ b/arch/arm/plat-omap/Kconfig | |||
@@ -144,12 +144,9 @@ config OMAP_IOMMU_DEBUG | |||
144 | config OMAP_IOMMU_IVA2 | 144 | config OMAP_IOMMU_IVA2 |
145 | bool | 145 | bool |
146 | 146 | ||
147 | choice | ||
148 | prompt "System timer" | ||
149 | default OMAP_32K_TIMER if !ARCH_OMAP15XX | ||
150 | |||
151 | config OMAP_MPU_TIMER | 147 | config OMAP_MPU_TIMER |
152 | bool "Use mpu timer" | 148 | bool "Use mpu timer" |
149 | depends on ARCH_OMAP1 | ||
153 | help | 150 | help |
154 | Select this option if you want to use the OMAP mpu timer. This | 151 | Select this option if you want to use the OMAP mpu timer. This |
155 | timer provides more intra-tick resolution than the 32KHz timer, | 152 | timer provides more intra-tick resolution than the 32KHz timer, |
@@ -158,6 +155,7 @@ config OMAP_MPU_TIMER | |||
158 | config OMAP_32K_TIMER | 155 | config OMAP_32K_TIMER |
159 | bool "Use 32KHz timer" | 156 | bool "Use 32KHz timer" |
160 | depends on ARCH_OMAP16XX || ARCH_OMAP2PLUS | 157 | depends on ARCH_OMAP16XX || ARCH_OMAP2PLUS |
158 | default y if (ARCH_OMAP16XX || ARCH_OMAP2PLUS) | ||
161 | help | 159 | help |
162 | Select this option if you want to enable the OMAP 32KHz timer. | 160 | Select this option if you want to enable the OMAP 32KHz timer. |
163 | This timer saves power compared to the OMAP_MPU_TIMER, and has | 161 | This timer saves power compared to the OMAP_MPU_TIMER, and has |
@@ -165,8 +163,6 @@ config OMAP_32K_TIMER | |||
165 | intra-tick resolution than OMAP_MPU_TIMER. The 32KHz timer is | 163 | intra-tick resolution than OMAP_MPU_TIMER. The 32KHz timer is |
166 | currently only available for OMAP16XX, 24XX, 34XX and OMAP4. | 164 | currently only available for OMAP16XX, 24XX, 34XX and OMAP4. |
167 | 165 | ||
168 | endchoice | ||
169 | |||
170 | config OMAP3_L2_AUX_SECURE_SAVE_RESTORE | 166 | config OMAP3_L2_AUX_SECURE_SAVE_RESTORE |
171 | bool "OMAP3 HS/EMU save and restore for L2 AUX control register" | 167 | bool "OMAP3 HS/EMU save and restore for L2 AUX control register" |
172 | depends on ARCH_OMAP3 && PM | 168 | depends on ARCH_OMAP3 && PM |
diff --git a/arch/arm/plat-omap/counter_32k.c b/arch/arm/plat-omap/counter_32k.c index ea4644021fb..862dda95d61 100644 --- a/arch/arm/plat-omap/counter_32k.c +++ b/arch/arm/plat-omap/counter_32k.c | |||
@@ -36,8 +36,6 @@ | |||
36 | 36 | ||
37 | #define OMAP16XX_TIMER_32K_SYNCHRONIZED 0xfffbc410 | 37 | #define OMAP16XX_TIMER_32K_SYNCHRONIZED 0xfffbc410 |
38 | 38 | ||
39 | #if !(defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP15XX)) | ||
40 | |||
41 | #include <linux/clocksource.h> | 39 | #include <linux/clocksource.h> |
42 | 40 | ||
43 | /* | 41 | /* |
@@ -122,12 +120,24 @@ static DEFINE_CLOCK_DATA(cd); | |||
122 | #define SC_MULT 4000000000u | 120 | #define SC_MULT 4000000000u |
123 | #define SC_SHIFT 17 | 121 | #define SC_SHIFT 17 |
124 | 122 | ||
125 | unsigned long long notrace sched_clock(void) | 123 | static inline unsigned long long notrace _omap_32k_sched_clock(void) |
126 | { | 124 | { |
127 | u32 cyc = clocksource_32k.read(&clocksource_32k); | 125 | u32 cyc = clocksource_32k.read(&clocksource_32k); |
128 | return cyc_to_fixed_sched_clock(&cd, cyc, (u32)~0, SC_MULT, SC_SHIFT); | 126 | return cyc_to_fixed_sched_clock(&cd, cyc, (u32)~0, SC_MULT, SC_SHIFT); |
129 | } | 127 | } |
130 | 128 | ||
129 | #ifndef CONFIG_OMAP_MPU_TIMER | ||
130 | unsigned long long notrace sched_clock(void) | ||
131 | { | ||
132 | return _omap_32k_sched_clock(); | ||
133 | } | ||
134 | #else | ||
135 | unsigned long long notrace omap_32k_sched_clock(void) | ||
136 | { | ||
137 | return _omap_32k_sched_clock(); | ||
138 | } | ||
139 | #endif | ||
140 | |||
131 | static void notrace omap_update_sched_clock(void) | 141 | static void notrace omap_update_sched_clock(void) |
132 | { | 142 | { |
133 | u32 cyc = clocksource_32k.read(&clocksource_32k); | 143 | u32 cyc = clocksource_32k.read(&clocksource_32k); |
@@ -160,7 +170,7 @@ void read_persistent_clock(struct timespec *ts) | |||
160 | *ts = *tsp; | 170 | *ts = *tsp; |
161 | } | 171 | } |
162 | 172 | ||
163 | static int __init omap_init_clocksource_32k(void) | 173 | int __init omap_init_clocksource_32k(void) |
164 | { | 174 | { |
165 | static char err[] __initdata = KERN_ERR | 175 | static char err[] __initdata = KERN_ERR |
166 | "%s: can't register clocksource!\n"; | 176 | "%s: can't register clocksource!\n"; |
@@ -195,7 +205,3 @@ static int __init omap_init_clocksource_32k(void) | |||
195 | } | 205 | } |
196 | return 0; | 206 | return 0; |
197 | } | 207 | } |
198 | arch_initcall(omap_init_clocksource_32k); | ||
199 | |||
200 | #endif /* !(defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP15XX)) */ | ||
201 | |||
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index c4b2b478b1a..85363084cc1 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c | |||
@@ -53,7 +53,7 @@ enum { DMA_CHAIN_STARTED, DMA_CHAIN_NOTSTARTED }; | |||
53 | #endif | 53 | #endif |
54 | 54 | ||
55 | #define OMAP_DMA_ACTIVE 0x01 | 55 | #define OMAP_DMA_ACTIVE 0x01 |
56 | #define OMAP2_DMA_CSR_CLEAR_MASK 0xffe | 56 | #define OMAP2_DMA_CSR_CLEAR_MASK 0xffffffff |
57 | 57 | ||
58 | #define OMAP_FUNC_MUX_ARM_BASE (0xfffe1000 + 0xec) | 58 | #define OMAP_FUNC_MUX_ARM_BASE (0xfffe1000 + 0xec) |
59 | 59 | ||
@@ -1873,7 +1873,7 @@ static int omap2_dma_handle_ch(int ch) | |||
1873 | printk(KERN_INFO "DMA misaligned error with device %d\n", | 1873 | printk(KERN_INFO "DMA misaligned error with device %d\n", |
1874 | dma_chan[ch].dev_id); | 1874 | dma_chan[ch].dev_id); |
1875 | 1875 | ||
1876 | p->dma_write(OMAP2_DMA_CSR_CLEAR_MASK, CSR, ch); | 1876 | p->dma_write(status, CSR, ch); |
1877 | p->dma_write(1 << ch, IRQSTATUS_L0, ch); | 1877 | p->dma_write(1 << ch, IRQSTATUS_L0, ch); |
1878 | /* read back the register to flush the write */ | 1878 | /* read back the register to flush the write */ |
1879 | p->dma_read(IRQSTATUS_L0, ch); | 1879 | p->dma_read(IRQSTATUS_L0, ch); |
@@ -1893,10 +1893,9 @@ static int omap2_dma_handle_ch(int ch) | |||
1893 | OMAP_DMA_CHAIN_INCQHEAD(chain_id); | 1893 | OMAP_DMA_CHAIN_INCQHEAD(chain_id); |
1894 | 1894 | ||
1895 | status = p->dma_read(CSR, ch); | 1895 | status = p->dma_read(CSR, ch); |
1896 | p->dma_write(status, CSR, ch); | ||
1896 | } | 1897 | } |
1897 | 1898 | ||
1898 | p->dma_write(status, CSR, ch); | ||
1899 | |||
1900 | if (likely(dma_chan[ch].callback != NULL)) | 1899 | if (likely(dma_chan[ch].callback != NULL)) |
1901 | dma_chan[ch].callback(ch, status, dma_chan[ch].data); | 1900 | dma_chan[ch].callback(ch, status, dma_chan[ch].data); |
1902 | 1901 | ||
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index 1f98e0b9484..971d1863694 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c | |||
@@ -718,7 +718,7 @@ static int _set_gpio_triggering(struct gpio_bank *bank, int gpio, int trigger) | |||
718 | case METHOD_GPIO_24XX: | 718 | case METHOD_GPIO_24XX: |
719 | case METHOD_GPIO_44XX: | 719 | case METHOD_GPIO_44XX: |
720 | set_24xx_gpio_triggering(bank, gpio, trigger); | 720 | set_24xx_gpio_triggering(bank, gpio, trigger); |
721 | break; | 721 | return 0; |
722 | #endif | 722 | #endif |
723 | default: | 723 | default: |
724 | goto bad; | 724 | goto bad; |
@@ -729,17 +729,17 @@ bad: | |||
729 | return -EINVAL; | 729 | return -EINVAL; |
730 | } | 730 | } |
731 | 731 | ||
732 | static int gpio_irq_type(unsigned irq, unsigned type) | 732 | static int gpio_irq_type(struct irq_data *d, unsigned type) |
733 | { | 733 | { |
734 | struct gpio_bank *bank; | 734 | struct gpio_bank *bank; |
735 | unsigned gpio; | 735 | unsigned gpio; |
736 | int retval; | 736 | int retval; |
737 | unsigned long flags; | 737 | unsigned long flags; |
738 | 738 | ||
739 | if (!cpu_class_is_omap2() && irq > IH_MPUIO_BASE) | 739 | if (!cpu_class_is_omap2() && d->irq > IH_MPUIO_BASE) |
740 | gpio = OMAP_MPUIO(irq - IH_MPUIO_BASE); | 740 | gpio = OMAP_MPUIO(d->irq - IH_MPUIO_BASE); |
741 | else | 741 | else |
742 | gpio = irq - IH_GPIO_BASE; | 742 | gpio = d->irq - IH_GPIO_BASE; |
743 | 743 | ||
744 | if (check_gpio(gpio) < 0) | 744 | if (check_gpio(gpio) < 0) |
745 | return -EINVAL; | 745 | return -EINVAL; |
@@ -752,19 +752,21 @@ static int gpio_irq_type(unsigned irq, unsigned type) | |||
752 | && (type & (IRQ_TYPE_LEVEL_LOW|IRQ_TYPE_LEVEL_HIGH))) | 752 | && (type & (IRQ_TYPE_LEVEL_LOW|IRQ_TYPE_LEVEL_HIGH))) |
753 | return -EINVAL; | 753 | return -EINVAL; |
754 | 754 | ||
755 | bank = get_irq_chip_data(irq); | 755 | bank = irq_data_get_irq_chip_data(d); |
756 | spin_lock_irqsave(&bank->lock, flags); | 756 | spin_lock_irqsave(&bank->lock, flags); |
757 | retval = _set_gpio_triggering(bank, get_gpio_index(gpio), type); | 757 | retval = _set_gpio_triggering(bank, get_gpio_index(gpio), type); |
758 | if (retval == 0) { | 758 | if (retval == 0) { |
759 | irq_desc[irq].status &= ~IRQ_TYPE_SENSE_MASK; | 759 | struct irq_desc *desc = irq_to_desc(d->irq); |
760 | irq_desc[irq].status |= type; | 760 | |
761 | desc->status &= ~IRQ_TYPE_SENSE_MASK; | ||
762 | desc->status |= type; | ||
761 | } | 763 | } |
762 | spin_unlock_irqrestore(&bank->lock, flags); | 764 | spin_unlock_irqrestore(&bank->lock, flags); |
763 | 765 | ||
764 | if (type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH)) | 766 | if (type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH)) |
765 | __set_irq_handler_unlocked(irq, handle_level_irq); | 767 | __set_irq_handler_unlocked(d->irq, handle_level_irq); |
766 | else if (type & (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING)) | 768 | else if (type & (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING)) |
767 | __set_irq_handler_unlocked(irq, handle_edge_irq); | 769 | __set_irq_handler_unlocked(d->irq, handle_edge_irq); |
768 | 770 | ||
769 | return retval; | 771 | return retval; |
770 | } | 772 | } |
@@ -1021,15 +1023,15 @@ static void _reset_gpio(struct gpio_bank *bank, int gpio) | |||
1021 | } | 1023 | } |
1022 | 1024 | ||
1023 | /* Use disable_irq_wake() and enable_irq_wake() functions from drivers */ | 1025 | /* Use disable_irq_wake() and enable_irq_wake() functions from drivers */ |
1024 | static int gpio_wake_enable(unsigned int irq, unsigned int enable) | 1026 | static int gpio_wake_enable(struct irq_data *d, unsigned int enable) |
1025 | { | 1027 | { |
1026 | unsigned int gpio = irq - IH_GPIO_BASE; | 1028 | unsigned int gpio = d->irq - IH_GPIO_BASE; |
1027 | struct gpio_bank *bank; | 1029 | struct gpio_bank *bank; |
1028 | int retval; | 1030 | int retval; |
1029 | 1031 | ||
1030 | if (check_gpio(gpio) < 0) | 1032 | if (check_gpio(gpio) < 0) |
1031 | return -ENODEV; | 1033 | return -ENODEV; |
1032 | bank = get_irq_chip_data(irq); | 1034 | bank = irq_data_get_irq_chip_data(d); |
1033 | retval = _set_gpio_wakeup(bank, get_gpio_index(gpio), enable); | 1035 | retval = _set_gpio_wakeup(bank, get_gpio_index(gpio), enable); |
1034 | 1036 | ||
1035 | return retval; | 1037 | return retval; |
@@ -1142,7 +1144,7 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
1142 | u32 retrigger = 0; | 1144 | u32 retrigger = 0; |
1143 | int unmasked = 0; | 1145 | int unmasked = 0; |
1144 | 1146 | ||
1145 | desc->chip->ack(irq); | 1147 | desc->irq_data.chip->irq_ack(&desc->irq_data); |
1146 | 1148 | ||
1147 | bank = get_irq_data(irq); | 1149 | bank = get_irq_data(irq); |
1148 | #ifdef CONFIG_ARCH_OMAP1 | 1150 | #ifdef CONFIG_ARCH_OMAP1 |
@@ -1199,7 +1201,7 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
1199 | configured, we could unmask GPIO bank interrupt immediately */ | 1201 | configured, we could unmask GPIO bank interrupt immediately */ |
1200 | if (!level_mask && !unmasked) { | 1202 | if (!level_mask && !unmasked) { |
1201 | unmasked = 1; | 1203 | unmasked = 1; |
1202 | desc->chip->unmask(irq); | 1204 | desc->irq_data.chip->irq_unmask(&desc->irq_data); |
1203 | } | 1205 | } |
1204 | 1206 | ||
1205 | isr |= retrigger; | 1207 | isr |= retrigger; |
@@ -1235,41 +1237,40 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
1235 | interrupt */ | 1237 | interrupt */ |
1236 | exit: | 1238 | exit: |
1237 | if (!unmasked) | 1239 | if (!unmasked) |
1238 | desc->chip->unmask(irq); | 1240 | desc->irq_data.chip->irq_unmask(&desc->irq_data); |
1239 | |||
1240 | } | 1241 | } |
1241 | 1242 | ||
1242 | static void gpio_irq_shutdown(unsigned int irq) | 1243 | static void gpio_irq_shutdown(struct irq_data *d) |
1243 | { | 1244 | { |
1244 | unsigned int gpio = irq - IH_GPIO_BASE; | 1245 | unsigned int gpio = d->irq - IH_GPIO_BASE; |
1245 | struct gpio_bank *bank = get_irq_chip_data(irq); | 1246 | struct gpio_bank *bank = irq_data_get_irq_chip_data(d); |
1246 | 1247 | ||
1247 | _reset_gpio(bank, gpio); | 1248 | _reset_gpio(bank, gpio); |
1248 | } | 1249 | } |
1249 | 1250 | ||
1250 | static void gpio_ack_irq(unsigned int irq) | 1251 | static void gpio_ack_irq(struct irq_data *d) |
1251 | { | 1252 | { |
1252 | unsigned int gpio = irq - IH_GPIO_BASE; | 1253 | unsigned int gpio = d->irq - IH_GPIO_BASE; |
1253 | struct gpio_bank *bank = get_irq_chip_data(irq); | 1254 | struct gpio_bank *bank = irq_data_get_irq_chip_data(d); |
1254 | 1255 | ||
1255 | _clear_gpio_irqstatus(bank, gpio); | 1256 | _clear_gpio_irqstatus(bank, gpio); |
1256 | } | 1257 | } |
1257 | 1258 | ||
1258 | static void gpio_mask_irq(unsigned int irq) | 1259 | static void gpio_mask_irq(struct irq_data *d) |
1259 | { | 1260 | { |
1260 | unsigned int gpio = irq - IH_GPIO_BASE; | 1261 | unsigned int gpio = d->irq - IH_GPIO_BASE; |
1261 | struct gpio_bank *bank = get_irq_chip_data(irq); | 1262 | struct gpio_bank *bank = irq_data_get_irq_chip_data(d); |
1262 | 1263 | ||
1263 | _set_gpio_irqenable(bank, gpio, 0); | 1264 | _set_gpio_irqenable(bank, gpio, 0); |
1264 | _set_gpio_triggering(bank, get_gpio_index(gpio), IRQ_TYPE_NONE); | 1265 | _set_gpio_triggering(bank, get_gpio_index(gpio), IRQ_TYPE_NONE); |
1265 | } | 1266 | } |
1266 | 1267 | ||
1267 | static void gpio_unmask_irq(unsigned int irq) | 1268 | static void gpio_unmask_irq(struct irq_data *d) |
1268 | { | 1269 | { |
1269 | unsigned int gpio = irq - IH_GPIO_BASE; | 1270 | unsigned int gpio = d->irq - IH_GPIO_BASE; |
1270 | struct gpio_bank *bank = get_irq_chip_data(irq); | 1271 | struct gpio_bank *bank = irq_data_get_irq_chip_data(d); |
1271 | unsigned int irq_mask = 1 << get_gpio_index(gpio); | 1272 | unsigned int irq_mask = 1 << get_gpio_index(gpio); |
1272 | struct irq_desc *desc = irq_to_desc(irq); | 1273 | struct irq_desc *desc = irq_to_desc(d->irq); |
1273 | u32 trigger = desc->status & IRQ_TYPE_SENSE_MASK; | 1274 | u32 trigger = desc->status & IRQ_TYPE_SENSE_MASK; |
1274 | 1275 | ||
1275 | if (trigger) | 1276 | if (trigger) |
@@ -1287,12 +1288,12 @@ static void gpio_unmask_irq(unsigned int irq) | |||
1287 | 1288 | ||
1288 | static struct irq_chip gpio_irq_chip = { | 1289 | static struct irq_chip gpio_irq_chip = { |
1289 | .name = "GPIO", | 1290 | .name = "GPIO", |
1290 | .shutdown = gpio_irq_shutdown, | 1291 | .irq_shutdown = gpio_irq_shutdown, |
1291 | .ack = gpio_ack_irq, | 1292 | .irq_ack = gpio_ack_irq, |
1292 | .mask = gpio_mask_irq, | 1293 | .irq_mask = gpio_mask_irq, |
1293 | .unmask = gpio_unmask_irq, | 1294 | .irq_unmask = gpio_unmask_irq, |
1294 | .set_type = gpio_irq_type, | 1295 | .irq_set_type = gpio_irq_type, |
1295 | .set_wake = gpio_wake_enable, | 1296 | .irq_set_wake = gpio_wake_enable, |
1296 | }; | 1297 | }; |
1297 | 1298 | ||
1298 | /*---------------------------------------------------------------------*/ | 1299 | /*---------------------------------------------------------------------*/ |
@@ -1301,36 +1302,36 @@ static struct irq_chip gpio_irq_chip = { | |||
1301 | 1302 | ||
1302 | /* MPUIO uses the always-on 32k clock */ | 1303 | /* MPUIO uses the always-on 32k clock */ |
1303 | 1304 | ||
1304 | static void mpuio_ack_irq(unsigned int irq) | 1305 | static void mpuio_ack_irq(struct irq_data *d) |
1305 | { | 1306 | { |
1306 | /* The ISR is reset automatically, so do nothing here. */ | 1307 | /* The ISR is reset automatically, so do nothing here. */ |
1307 | } | 1308 | } |
1308 | 1309 | ||
1309 | static void mpuio_mask_irq(unsigned int irq) | 1310 | static void mpuio_mask_irq(struct irq_data *d) |
1310 | { | 1311 | { |
1311 | unsigned int gpio = OMAP_MPUIO(irq - IH_MPUIO_BASE); | 1312 | unsigned int gpio = OMAP_MPUIO(d->irq - IH_MPUIO_BASE); |
1312 | struct gpio_bank *bank = get_irq_chip_data(irq); | 1313 | struct gpio_bank *bank = irq_data_get_irq_chip_data(d); |
1313 | 1314 | ||
1314 | _set_gpio_irqenable(bank, gpio, 0); | 1315 | _set_gpio_irqenable(bank, gpio, 0); |
1315 | } | 1316 | } |
1316 | 1317 | ||
1317 | static void mpuio_unmask_irq(unsigned int irq) | 1318 | static void mpuio_unmask_irq(struct irq_data *d) |
1318 | { | 1319 | { |
1319 | unsigned int gpio = OMAP_MPUIO(irq - IH_MPUIO_BASE); | 1320 | unsigned int gpio = OMAP_MPUIO(d->irq - IH_MPUIO_BASE); |
1320 | struct gpio_bank *bank = get_irq_chip_data(irq); | 1321 | struct gpio_bank *bank = irq_data_get_irq_chip_data(d); |
1321 | 1322 | ||
1322 | _set_gpio_irqenable(bank, gpio, 1); | 1323 | _set_gpio_irqenable(bank, gpio, 1); |
1323 | } | 1324 | } |
1324 | 1325 | ||
1325 | static struct irq_chip mpuio_irq_chip = { | 1326 | static struct irq_chip mpuio_irq_chip = { |
1326 | .name = "MPUIO", | 1327 | .name = "MPUIO", |
1327 | .ack = mpuio_ack_irq, | 1328 | .irq_ack = mpuio_ack_irq, |
1328 | .mask = mpuio_mask_irq, | 1329 | .irq_mask = mpuio_mask_irq, |
1329 | .unmask = mpuio_unmask_irq, | 1330 | .irq_unmask = mpuio_unmask_irq, |
1330 | .set_type = gpio_irq_type, | 1331 | .irq_set_type = gpio_irq_type, |
1331 | #ifdef CONFIG_ARCH_OMAP16XX | 1332 | #ifdef CONFIG_ARCH_OMAP16XX |
1332 | /* REVISIT: assuming only 16xx supports MPUIO wake events */ | 1333 | /* REVISIT: assuming only 16xx supports MPUIO wake events */ |
1333 | .set_wake = gpio_wake_enable, | 1334 | .irq_set_wake = gpio_wake_enable, |
1334 | #endif | 1335 | #endif |
1335 | }; | 1336 | }; |
1336 | 1337 | ||
@@ -1671,7 +1672,9 @@ static void __init omap_gpio_chip_init(struct gpio_bank *bank) | |||
1671 | 1672 | ||
1672 | for (j = bank->virtual_irq_start; | 1673 | for (j = bank->virtual_irq_start; |
1673 | j < bank->virtual_irq_start + bank_width; j++) { | 1674 | j < bank->virtual_irq_start + bank_width; j++) { |
1674 | lockdep_set_class(&irq_desc[j].lock, &gpio_lock_class); | 1675 | struct irq_desc *d = irq_to_desc(j); |
1676 | |||
1677 | lockdep_set_class(&d->lock, &gpio_lock_class); | ||
1675 | set_irq_chip_data(j, bank); | 1678 | set_irq_chip_data(j, bank); |
1676 | if (bank_is_mpuio(bank)) | 1679 | if (bank_is_mpuio(bank)) |
1677 | set_irq_chip(j, &mpuio_irq_chip); | 1680 | set_irq_chip(j, &mpuio_irq_chip); |
diff --git a/arch/arm/plat-omap/include/plat/common.h b/arch/arm/plat-omap/include/plat/common.h index 6b8088ec74a..29b2afb4288 100644 --- a/arch/arm/plat-omap/include/plat/common.h +++ b/arch/arm/plat-omap/include/plat/common.h | |||
@@ -35,6 +35,9 @@ struct sys_timer; | |||
35 | 35 | ||
36 | extern void omap_map_common_io(void); | 36 | extern void omap_map_common_io(void); |
37 | extern struct sys_timer omap_timer; | 37 | extern struct sys_timer omap_timer; |
38 | extern bool omap_32k_timer_init(void); | ||
39 | extern int __init omap_init_clocksource_32k(void); | ||
40 | extern unsigned long long notrace omap_32k_sched_clock(void); | ||
38 | 41 | ||
39 | extern void omap_reserve(void); | 42 | extern void omap_reserve(void); |
40 | 43 | ||
diff --git a/arch/arm/plat-omap/include/plat/onenand.h b/arch/arm/plat-omap/include/plat/onenand.h index 72f433d7d82..affe87e9ece 100644 --- a/arch/arm/plat-omap/include/plat/onenand.h +++ b/arch/arm/plat-omap/include/plat/onenand.h | |||
@@ -23,6 +23,7 @@ struct omap_onenand_platform_data { | |||
23 | int (*onenand_setup)(void __iomem *, int freq); | 23 | int (*onenand_setup)(void __iomem *, int freq); |
24 | int dma_channel; | 24 | int dma_channel; |
25 | u8 flags; | 25 | u8 flags; |
26 | u8 regulator_can_sleep; | ||
26 | }; | 27 | }; |
27 | 28 | ||
28 | #define ONENAND_MAX_PARTITIONS 8 | 29 | #define ONENAND_MAX_PARTITIONS 8 |
diff --git a/arch/arm/plat-omap/include/plat/voltage.h b/arch/arm/plat-omap/include/plat/voltage.h index 0ff123399f3..5bd204e55c3 100644 --- a/arch/arm/plat-omap/include/plat/voltage.h +++ b/arch/arm/plat-omap/include/plat/voltage.h | |||
@@ -14,6 +14,8 @@ | |||
14 | #ifndef __ARCH_ARM_MACH_OMAP2_VOLTAGE_H | 14 | #ifndef __ARCH_ARM_MACH_OMAP2_VOLTAGE_H |
15 | #define __ARCH_ARM_MACH_OMAP2_VOLTAGE_H | 15 | #define __ARCH_ARM_MACH_OMAP2_VOLTAGE_H |
16 | 16 | ||
17 | #include <linux/err.h> | ||
18 | |||
17 | #define VOLTSCALE_VPFORCEUPDATE 1 | 19 | #define VOLTSCALE_VPFORCEUPDATE 1 |
18 | #define VOLTSCALE_VCBYPASS 2 | 20 | #define VOLTSCALE_VCBYPASS 2 |
19 | 21 | ||
@@ -65,9 +67,6 @@ struct voltagedomain { | |||
65 | char *name; | 67 | char *name; |
66 | }; | 68 | }; |
67 | 69 | ||
68 | /* API to get the voltagedomain pointer */ | ||
69 | struct voltagedomain *omap_voltage_domain_lookup(char *name); | ||
70 | |||
71 | /** | 70 | /** |
72 | * struct omap_volt_data - Omap voltage specific data. | 71 | * struct omap_volt_data - Omap voltage specific data. |
73 | * @voltage_nominal: The possible voltage value in uV | 72 | * @voltage_nominal: The possible voltage value in uV |
@@ -131,16 +130,26 @@ int omap_voltage_register_pmic(struct voltagedomain *voltdm, | |||
131 | struct omap_volt_pmic_info *pmic_info); | 130 | struct omap_volt_pmic_info *pmic_info); |
132 | void omap_change_voltscale_method(struct voltagedomain *voltdm, | 131 | void omap_change_voltscale_method(struct voltagedomain *voltdm, |
133 | int voltscale_method); | 132 | int voltscale_method); |
133 | /* API to get the voltagedomain pointer */ | ||
134 | struct voltagedomain *omap_voltage_domain_lookup(char *name); | ||
135 | |||
134 | int omap_voltage_late_init(void); | 136 | int omap_voltage_late_init(void); |
135 | #else | 137 | #else |
136 | static inline int omap_voltage_register_pmic(struct voltagedomain *voltdm, | 138 | static inline int omap_voltage_register_pmic(struct voltagedomain *voltdm, |
137 | struct omap_volt_pmic_info *pmic_info) {} | 139 | struct omap_volt_pmic_info *pmic_info) |
140 | { | ||
141 | return -EINVAL; | ||
142 | } | ||
138 | static inline void omap_change_voltscale_method(struct voltagedomain *voltdm, | 143 | static inline void omap_change_voltscale_method(struct voltagedomain *voltdm, |
139 | int voltscale_method) {} | 144 | int voltscale_method) {} |
140 | static inline int omap_voltage_late_init(void) | 145 | static inline int omap_voltage_late_init(void) |
141 | { | 146 | { |
142 | return -EINVAL; | 147 | return -EINVAL; |
143 | } | 148 | } |
149 | static inline struct voltagedomain *omap_voltage_domain_lookup(char *name) | ||
150 | { | ||
151 | return ERR_PTR(-EINVAL); | ||
152 | } | ||
144 | #endif | 153 | #endif |
145 | 154 | ||
146 | #endif | 155 | #endif |
diff --git a/arch/arm/plat-orion/gpio.c b/arch/arm/plat-orion/gpio.c index e814803d474..5f352231481 100644 --- a/arch/arm/plat-orion/gpio.c +++ b/arch/arm/plat-orion/gpio.c | |||
@@ -232,20 +232,19 @@ EXPORT_SYMBOL(orion_gpio_set_blink); | |||
232 | * polarity LEVEL mask | 232 | * polarity LEVEL mask |
233 | * | 233 | * |
234 | ****************************************************************************/ | 234 | ****************************************************************************/ |
235 | 235 | static void gpio_irq_ack(struct irq_data *d) | |
236 | static void gpio_irq_ack(u32 irq) | ||
237 | { | 236 | { |
238 | int type = irq_desc[irq].status & IRQ_TYPE_SENSE_MASK; | 237 | int type = irq_desc[d->irq].status & IRQ_TYPE_SENSE_MASK; |
239 | if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING)) { | 238 | if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING)) { |
240 | int pin = irq_to_gpio(irq); | 239 | int pin = irq_to_gpio(d->irq); |
241 | writel(~(1 << (pin & 31)), GPIO_EDGE_CAUSE(pin)); | 240 | writel(~(1 << (pin & 31)), GPIO_EDGE_CAUSE(pin)); |
242 | } | 241 | } |
243 | } | 242 | } |
244 | 243 | ||
245 | static void gpio_irq_mask(u32 irq) | 244 | static void gpio_irq_mask(struct irq_data *d) |
246 | { | 245 | { |
247 | int pin = irq_to_gpio(irq); | 246 | int pin = irq_to_gpio(d->irq); |
248 | int type = irq_desc[irq].status & IRQ_TYPE_SENSE_MASK; | 247 | int type = irq_desc[d->irq].status & IRQ_TYPE_SENSE_MASK; |
249 | u32 reg = (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING)) ? | 248 | u32 reg = (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING)) ? |
250 | GPIO_EDGE_MASK(pin) : GPIO_LEVEL_MASK(pin); | 249 | GPIO_EDGE_MASK(pin) : GPIO_LEVEL_MASK(pin); |
251 | u32 u = readl(reg); | 250 | u32 u = readl(reg); |
@@ -253,10 +252,10 @@ static void gpio_irq_mask(u32 irq) | |||
253 | writel(u, reg); | 252 | writel(u, reg); |
254 | } | 253 | } |
255 | 254 | ||
256 | static void gpio_irq_unmask(u32 irq) | 255 | static void gpio_irq_unmask(struct irq_data *d) |
257 | { | 256 | { |
258 | int pin = irq_to_gpio(irq); | 257 | int pin = irq_to_gpio(d->irq); |
259 | int type = irq_desc[irq].status & IRQ_TYPE_SENSE_MASK; | 258 | int type = irq_desc[d->irq].status & IRQ_TYPE_SENSE_MASK; |
260 | u32 reg = (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING)) ? | 259 | u32 reg = (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING)) ? |
261 | GPIO_EDGE_MASK(pin) : GPIO_LEVEL_MASK(pin); | 260 | GPIO_EDGE_MASK(pin) : GPIO_LEVEL_MASK(pin); |
262 | u32 u = readl(reg); | 261 | u32 u = readl(reg); |
@@ -264,20 +263,20 @@ static void gpio_irq_unmask(u32 irq) | |||
264 | writel(u, reg); | 263 | writel(u, reg); |
265 | } | 264 | } |
266 | 265 | ||
267 | static int gpio_irq_set_type(u32 irq, u32 type) | 266 | static int gpio_irq_set_type(struct irq_data *d, u32 type) |
268 | { | 267 | { |
269 | int pin = irq_to_gpio(irq); | 268 | int pin = irq_to_gpio(d->irq); |
270 | struct irq_desc *desc; | 269 | struct irq_desc *desc; |
271 | u32 u; | 270 | u32 u; |
272 | 271 | ||
273 | u = readl(GPIO_IO_CONF(pin)) & (1 << (pin & 31)); | 272 | u = readl(GPIO_IO_CONF(pin)) & (1 << (pin & 31)); |
274 | if (!u) { | 273 | if (!u) { |
275 | printk(KERN_ERR "orion gpio_irq_set_type failed " | 274 | printk(KERN_ERR "orion gpio_irq_set_type failed " |
276 | "(irq %d, pin %d).\n", irq, pin); | 275 | "(irq %d, pin %d).\n", d->irq, pin); |
277 | return -EINVAL; | 276 | return -EINVAL; |
278 | } | 277 | } |
279 | 278 | ||
280 | desc = irq_desc + irq; | 279 | desc = irq_desc + d->irq; |
281 | 280 | ||
282 | /* | 281 | /* |
283 | * Set edge/level type. | 282 | * Set edge/level type. |
@@ -287,7 +286,7 @@ static int gpio_irq_set_type(u32 irq, u32 type) | |||
287 | } else if (type & (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) { | 286 | } else if (type & (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) { |
288 | desc->handle_irq = handle_level_irq; | 287 | desc->handle_irq = handle_level_irq; |
289 | } else { | 288 | } else { |
290 | printk(KERN_ERR "failed to set irq=%d (type=%d)\n", irq, type); | 289 | printk(KERN_ERR "failed to set irq=%d (type=%d)\n", d->irq, type); |
291 | return -EINVAL; | 290 | return -EINVAL; |
292 | } | 291 | } |
293 | 292 | ||
@@ -325,10 +324,10 @@ static int gpio_irq_set_type(u32 irq, u32 type) | |||
325 | 324 | ||
326 | struct irq_chip orion_gpio_irq_chip = { | 325 | struct irq_chip orion_gpio_irq_chip = { |
327 | .name = "orion_gpio_irq", | 326 | .name = "orion_gpio_irq", |
328 | .ack = gpio_irq_ack, | 327 | .irq_ack = gpio_irq_ack, |
329 | .mask = gpio_irq_mask, | 328 | .irq_mask = gpio_irq_mask, |
330 | .unmask = gpio_irq_unmask, | 329 | .irq_unmask = gpio_irq_unmask, |
331 | .set_type = gpio_irq_set_type, | 330 | .irq_set_type = gpio_irq_set_type, |
332 | }; | 331 | }; |
333 | 332 | ||
334 | void orion_gpio_irq_handler(int pinoff) | 333 | void orion_gpio_irq_handler(int pinoff) |
diff --git a/arch/arm/plat-orion/irq.c b/arch/arm/plat-orion/irq.c index 3f9d34fc738..7d0c7eb59f0 100644 --- a/arch/arm/plat-orion/irq.c +++ b/arch/arm/plat-orion/irq.c | |||
@@ -14,31 +14,31 @@ | |||
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
15 | #include <plat/irq.h> | 15 | #include <plat/irq.h> |
16 | 16 | ||
17 | static void orion_irq_mask(u32 irq) | 17 | static void orion_irq_mask(struct irq_data *d) |
18 | { | 18 | { |
19 | void __iomem *maskaddr = get_irq_chip_data(irq); | 19 | void __iomem *maskaddr = irq_data_get_irq_chip_data(d); |
20 | u32 mask; | 20 | u32 mask; |
21 | 21 | ||
22 | mask = readl(maskaddr); | 22 | mask = readl(maskaddr); |
23 | mask &= ~(1 << (irq & 31)); | 23 | mask &= ~(1 << (d->irq & 31)); |
24 | writel(mask, maskaddr); | 24 | writel(mask, maskaddr); |
25 | } | 25 | } |
26 | 26 | ||
27 | static void orion_irq_unmask(u32 irq) | 27 | static void orion_irq_unmask(struct irq_data *d) |
28 | { | 28 | { |
29 | void __iomem *maskaddr = get_irq_chip_data(irq); | 29 | void __iomem *maskaddr = irq_data_get_irq_chip_data(d); |
30 | u32 mask; | 30 | u32 mask; |
31 | 31 | ||
32 | mask = readl(maskaddr); | 32 | mask = readl(maskaddr); |
33 | mask |= 1 << (irq & 31); | 33 | mask |= 1 << (d->irq & 31); |
34 | writel(mask, maskaddr); | 34 | writel(mask, maskaddr); |
35 | } | 35 | } |
36 | 36 | ||
37 | static struct irq_chip orion_irq_chip = { | 37 | static struct irq_chip orion_irq_chip = { |
38 | .name = "orion_irq", | 38 | .name = "orion_irq", |
39 | .mask = orion_irq_mask, | 39 | .irq_mask = orion_irq_mask, |
40 | .mask_ack = orion_irq_mask, | 40 | .irq_mask_ack = orion_irq_mask, |
41 | .unmask = orion_irq_unmask, | 41 | .irq_unmask = orion_irq_unmask, |
42 | }; | 42 | }; |
43 | 43 | ||
44 | void __init orion_irq_init(unsigned int irq_start, void __iomem *maskaddr) | 44 | void __init orion_irq_init(unsigned int irq_start, void __iomem *maskaddr) |
diff --git a/arch/arm/plat-pxa/gpio.c b/arch/arm/plat-pxa/gpio.c index 98548c6903a..e7de6ae2a1e 100644 --- a/arch/arm/plat-pxa/gpio.c +++ b/arch/arm/plat-pxa/gpio.c | |||
@@ -155,10 +155,10 @@ static inline void update_edge_detect(struct pxa_gpio_chip *c) | |||
155 | __raw_writel(gfer, c->regbase + GFER_OFFSET); | 155 | __raw_writel(gfer, c->regbase + GFER_OFFSET); |
156 | } | 156 | } |
157 | 157 | ||
158 | static int pxa_gpio_irq_type(unsigned int irq, unsigned int type) | 158 | static int pxa_gpio_irq_type(struct irq_data *d, unsigned int type) |
159 | { | 159 | { |
160 | struct pxa_gpio_chip *c; | 160 | struct pxa_gpio_chip *c; |
161 | int gpio = irq_to_gpio(irq); | 161 | int gpio = irq_to_gpio(d->irq); |
162 | unsigned long gpdr, mask = GPIO_bit(gpio); | 162 | unsigned long gpdr, mask = GPIO_bit(gpio); |
163 | 163 | ||
164 | c = gpio_to_chip(gpio); | 164 | c = gpio_to_chip(gpio); |
@@ -195,7 +195,7 @@ static int pxa_gpio_irq_type(unsigned int irq, unsigned int type) | |||
195 | 195 | ||
196 | update_edge_detect(c); | 196 | update_edge_detect(c); |
197 | 197 | ||
198 | pr_debug("%s: IRQ%d (GPIO%d) - edge%s%s\n", __func__, irq, gpio, | 198 | pr_debug("%s: IRQ%d (GPIO%d) - edge%s%s\n", __func__, d->irq, gpio, |
199 | ((type & IRQ_TYPE_EDGE_RISING) ? " rising" : ""), | 199 | ((type & IRQ_TYPE_EDGE_RISING) ? " rising" : ""), |
200 | ((type & IRQ_TYPE_EDGE_FALLING) ? " falling" : "")); | 200 | ((type & IRQ_TYPE_EDGE_FALLING) ? " falling" : "")); |
201 | return 0; | 201 | return 0; |
@@ -227,17 +227,17 @@ static void pxa_gpio_demux_handler(unsigned int irq, struct irq_desc *desc) | |||
227 | } while (loop); | 227 | } while (loop); |
228 | } | 228 | } |
229 | 229 | ||
230 | static void pxa_ack_muxed_gpio(unsigned int irq) | 230 | static void pxa_ack_muxed_gpio(struct irq_data *d) |
231 | { | 231 | { |
232 | int gpio = irq_to_gpio(irq); | 232 | int gpio = irq_to_gpio(d->irq); |
233 | struct pxa_gpio_chip *c = gpio_to_chip(gpio); | 233 | struct pxa_gpio_chip *c = gpio_to_chip(gpio); |
234 | 234 | ||
235 | __raw_writel(GPIO_bit(gpio), c->regbase + GEDR_OFFSET); | 235 | __raw_writel(GPIO_bit(gpio), c->regbase + GEDR_OFFSET); |
236 | } | 236 | } |
237 | 237 | ||
238 | static void pxa_mask_muxed_gpio(unsigned int irq) | 238 | static void pxa_mask_muxed_gpio(struct irq_data *d) |
239 | { | 239 | { |
240 | int gpio = irq_to_gpio(irq); | 240 | int gpio = irq_to_gpio(d->irq); |
241 | struct pxa_gpio_chip *c = gpio_to_chip(gpio); | 241 | struct pxa_gpio_chip *c = gpio_to_chip(gpio); |
242 | uint32_t grer, gfer; | 242 | uint32_t grer, gfer; |
243 | 243 | ||
@@ -249,9 +249,9 @@ static void pxa_mask_muxed_gpio(unsigned int irq) | |||
249 | __raw_writel(gfer, c->regbase + GFER_OFFSET); | 249 | __raw_writel(gfer, c->regbase + GFER_OFFSET); |
250 | } | 250 | } |
251 | 251 | ||
252 | static void pxa_unmask_muxed_gpio(unsigned int irq) | 252 | static void pxa_unmask_muxed_gpio(struct irq_data *d) |
253 | { | 253 | { |
254 | int gpio = irq_to_gpio(irq); | 254 | int gpio = irq_to_gpio(d->irq); |
255 | struct pxa_gpio_chip *c = gpio_to_chip(gpio); | 255 | struct pxa_gpio_chip *c = gpio_to_chip(gpio); |
256 | 256 | ||
257 | c->irq_mask |= GPIO_bit(gpio); | 257 | c->irq_mask |= GPIO_bit(gpio); |
@@ -260,10 +260,10 @@ static void pxa_unmask_muxed_gpio(unsigned int irq) | |||
260 | 260 | ||
261 | static struct irq_chip pxa_muxed_gpio_chip = { | 261 | static struct irq_chip pxa_muxed_gpio_chip = { |
262 | .name = "GPIO", | 262 | .name = "GPIO", |
263 | .ack = pxa_ack_muxed_gpio, | 263 | .irq_ack = pxa_ack_muxed_gpio, |
264 | .mask = pxa_mask_muxed_gpio, | 264 | .irq_mask = pxa_mask_muxed_gpio, |
265 | .unmask = pxa_unmask_muxed_gpio, | 265 | .irq_unmask = pxa_unmask_muxed_gpio, |
266 | .set_type = pxa_gpio_irq_type, | 266 | .irq_set_type = pxa_gpio_irq_type, |
267 | }; | 267 | }; |
268 | 268 | ||
269 | void __init pxa_init_gpio(int mux_irq, int start, int end, set_wake_t fn) | 269 | void __init pxa_init_gpio(int mux_irq, int start, int end, set_wake_t fn) |
@@ -291,7 +291,7 @@ void __init pxa_init_gpio(int mux_irq, int start, int end, set_wake_t fn) | |||
291 | 291 | ||
292 | /* Install handler for GPIO>=2 edge detect interrupts */ | 292 | /* Install handler for GPIO>=2 edge detect interrupts */ |
293 | set_irq_chained_handler(mux_irq, pxa_gpio_demux_handler); | 293 | set_irq_chained_handler(mux_irq, pxa_gpio_demux_handler); |
294 | pxa_muxed_gpio_chip.set_wake = fn; | 294 | pxa_muxed_gpio_chip.irq_set_wake = fn; |
295 | } | 295 | } |
296 | 296 | ||
297 | #ifdef CONFIG_PM | 297 | #ifdef CONFIG_PM |
diff --git a/arch/arm/plat-pxa/include/plat/gpio.h b/arch/arm/plat-pxa/include/plat/gpio.h index 44248cb926a..1ddd2b97a72 100644 --- a/arch/arm/plat-pxa/include/plat/gpio.h +++ b/arch/arm/plat-pxa/include/plat/gpio.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __PLAT_GPIO_H | 1 | #ifndef __PLAT_GPIO_H |
2 | #define __PLAT_GPIO_H | 2 | #define __PLAT_GPIO_H |
3 | 3 | ||
4 | struct irq_data; | ||
5 | |||
4 | /* | 6 | /* |
5 | * We handle the GPIOs by banks, each bank covers up to 32 GPIOs with | 7 | * We handle the GPIOs by banks, each bank covers up to 32 GPIOs with |
6 | * one set of registers. The register offsets are organized below: | 8 | * one set of registers. The register offsets are organized below: |
@@ -56,7 +58,7 @@ static inline void gpio_set_value(unsigned gpio, int value) | |||
56 | */ | 58 | */ |
57 | extern int pxa_last_gpio; | 59 | extern int pxa_last_gpio; |
58 | 60 | ||
59 | typedef int (*set_wake_t)(unsigned int irq, unsigned int on); | 61 | typedef int (*set_wake_t)(struct irq_data *d, unsigned int on); |
60 | 62 | ||
61 | extern void pxa_init_gpio(int mux_irq, int start, int end, set_wake_t fn); | 63 | extern void pxa_init_gpio(int mux_irq, int start, int end, set_wake_t fn); |
62 | #endif /* __PLAT_GPIO_H */ | 64 | #endif /* __PLAT_GPIO_H */ |
diff --git a/arch/arm/plat-s3c24xx/devs.c b/arch/arm/plat-s3c24xx/devs.c index 8a42bc48dbf..268f3ed0a10 100644 --- a/arch/arm/plat-s3c24xx/devs.c +++ b/arch/arm/plat-s3c24xx/devs.c | |||
@@ -194,7 +194,6 @@ void __init s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *hard_s3c2410ts_ | |||
194 | memcpy(&s3c2410ts_info, hard_s3c2410ts_info, sizeof(struct s3c2410_ts_mach_info)); | 194 | memcpy(&s3c2410ts_info, hard_s3c2410ts_info, sizeof(struct s3c2410_ts_mach_info)); |
195 | s3c_device_ts.dev.platform_data = &s3c2410ts_info; | 195 | s3c_device_ts.dev.platform_data = &s3c2410ts_info; |
196 | } | 196 | } |
197 | EXPORT_SYMBOL(s3c24xx_ts_set_platdata); | ||
198 | 197 | ||
199 | /* USB Device (Gadget)*/ | 198 | /* USB Device (Gadget)*/ |
200 | 199 | ||
diff --git a/arch/arm/plat-s3c24xx/include/plat/irq.h b/arch/arm/plat-s3c24xx/include/plat/irq.h index 69e1be8bec3..ec087d6054b 100644 --- a/arch/arm/plat-s3c24xx/include/plat/irq.h +++ b/arch/arm/plat-s3c24xx/include/plat/irq.h | |||
@@ -107,9 +107,9 @@ s3c_irqsub_ack(unsigned int irqno, unsigned int parentmask, unsigned int group) | |||
107 | /* exported for use in arch/arm/mach-s3c2410 */ | 107 | /* exported for use in arch/arm/mach-s3c2410 */ |
108 | 108 | ||
109 | #ifdef CONFIG_PM | 109 | #ifdef CONFIG_PM |
110 | extern int s3c_irq_wake(unsigned int irqno, unsigned int state); | 110 | extern int s3c_irq_wake(struct irq_data *data, unsigned int state); |
111 | #else | 111 | #else |
112 | #define s3c_irq_wake NULL | 112 | #define s3c_irq_wake NULL |
113 | #endif | 113 | #endif |
114 | 114 | ||
115 | extern int s3c_irqext_type(unsigned int irq, unsigned int type); | 115 | extern int s3c_irqext_type(struct irq_data *d, unsigned int type); |
diff --git a/arch/arm/plat-s3c24xx/irq-pm.c b/arch/arm/plat-s3c24xx/irq-pm.c index ea8dea3339a..c3624d89863 100644 --- a/arch/arm/plat-s3c24xx/irq-pm.c +++ b/arch/arm/plat-s3c24xx/irq-pm.c | |||
@@ -15,11 +15,14 @@ | |||
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
17 | #include <linux/sysdev.h> | 17 | #include <linux/sysdev.h> |
18 | #include <linux/irq.h> | ||
18 | 19 | ||
19 | #include <plat/cpu.h> | 20 | #include <plat/cpu.h> |
20 | #include <plat/pm.h> | 21 | #include <plat/pm.h> |
21 | #include <plat/irq.h> | 22 | #include <plat/irq.h> |
22 | 23 | ||
24 | #include <asm/irq.h> | ||
25 | |||
23 | /* state for IRQs over sleep */ | 26 | /* state for IRQs over sleep */ |
24 | 27 | ||
25 | /* default is to allow for EINT0..EINT15, and IRQ_RTC as wakeup sources | 28 | /* default is to allow for EINT0..EINT15, and IRQ_RTC as wakeup sources |
@@ -30,15 +33,15 @@ | |||
30 | unsigned long s3c_irqwake_intallow = 1L << (IRQ_RTC - IRQ_EINT0) | 0xfL; | 33 | unsigned long s3c_irqwake_intallow = 1L << (IRQ_RTC - IRQ_EINT0) | 0xfL; |
31 | unsigned long s3c_irqwake_eintallow = 0x0000fff0L; | 34 | unsigned long s3c_irqwake_eintallow = 0x0000fff0L; |
32 | 35 | ||
33 | int s3c_irq_wake(unsigned int irqno, unsigned int state) | 36 | int s3c_irq_wake(struct irq_data *data, unsigned int state) |
34 | { | 37 | { |
35 | unsigned long irqbit = 1 << (irqno - IRQ_EINT0); | 38 | unsigned long irqbit = 1 << (data->irq - IRQ_EINT0); |
36 | 39 | ||
37 | if (!(s3c_irqwake_intallow & irqbit)) | 40 | if (!(s3c_irqwake_intallow & irqbit)) |
38 | return -ENOENT; | 41 | return -ENOENT; |
39 | 42 | ||
40 | printk(KERN_INFO "wake %s for irq %d\n", | 43 | printk(KERN_INFO "wake %s for irq %d\n", |
41 | state ? "enabled" : "disabled", irqno); | 44 | state ? "enabled" : "disabled", data->irq); |
42 | 45 | ||
43 | if (!state) | 46 | if (!state) |
44 | s3c_irqwake_intmask |= irqbit; | 47 | s3c_irqwake_intmask |= irqbit; |
diff --git a/arch/arm/plat-s3c24xx/irq.c b/arch/arm/plat-s3c24xx/irq.c index ad0d44ef1f9..4434cb56bd9 100644 --- a/arch/arm/plat-s3c24xx/irq.c +++ b/arch/arm/plat-s3c24xx/irq.c | |||
@@ -34,30 +34,29 @@ | |||
34 | #include <plat/irq.h> | 34 | #include <plat/irq.h> |
35 | 35 | ||
36 | static void | 36 | static void |
37 | s3c_irq_mask(unsigned int irqno) | 37 | s3c_irq_mask(struct irq_data *data) |
38 | { | 38 | { |
39 | unsigned int irqno = data->irq - IRQ_EINT0; | ||
39 | unsigned long mask; | 40 | unsigned long mask; |
40 | 41 | ||
41 | irqno -= IRQ_EINT0; | ||
42 | |||
43 | mask = __raw_readl(S3C2410_INTMSK); | 42 | mask = __raw_readl(S3C2410_INTMSK); |
44 | mask |= 1UL << irqno; | 43 | mask |= 1UL << irqno; |
45 | __raw_writel(mask, S3C2410_INTMSK); | 44 | __raw_writel(mask, S3C2410_INTMSK); |
46 | } | 45 | } |
47 | 46 | ||
48 | static inline void | 47 | static inline void |
49 | s3c_irq_ack(unsigned int irqno) | 48 | s3c_irq_ack(struct irq_data *data) |
50 | { | 49 | { |
51 | unsigned long bitval = 1UL << (irqno - IRQ_EINT0); | 50 | unsigned long bitval = 1UL << (data->irq - IRQ_EINT0); |
52 | 51 | ||
53 | __raw_writel(bitval, S3C2410_SRCPND); | 52 | __raw_writel(bitval, S3C2410_SRCPND); |
54 | __raw_writel(bitval, S3C2410_INTPND); | 53 | __raw_writel(bitval, S3C2410_INTPND); |
55 | } | 54 | } |
56 | 55 | ||
57 | static inline void | 56 | static inline void |
58 | s3c_irq_maskack(unsigned int irqno) | 57 | s3c_irq_maskack(struct irq_data *data) |
59 | { | 58 | { |
60 | unsigned long bitval = 1UL << (irqno - IRQ_EINT0); | 59 | unsigned long bitval = 1UL << (data->irq - IRQ_EINT0); |
61 | unsigned long mask; | 60 | unsigned long mask; |
62 | 61 | ||
63 | mask = __raw_readl(S3C2410_INTMSK); | 62 | mask = __raw_readl(S3C2410_INTMSK); |
@@ -69,8 +68,9 @@ s3c_irq_maskack(unsigned int irqno) | |||
69 | 68 | ||
70 | 69 | ||
71 | static void | 70 | static void |
72 | s3c_irq_unmask(unsigned int irqno) | 71 | s3c_irq_unmask(struct irq_data *data) |
73 | { | 72 | { |
73 | unsigned int irqno = data->irq; | ||
74 | unsigned long mask; | 74 | unsigned long mask; |
75 | 75 | ||
76 | if (irqno != IRQ_TIMER4 && irqno != IRQ_EINT8t23) | 76 | if (irqno != IRQ_TIMER4 && irqno != IRQ_EINT8t23) |
@@ -85,40 +85,39 @@ s3c_irq_unmask(unsigned int irqno) | |||
85 | 85 | ||
86 | struct irq_chip s3c_irq_level_chip = { | 86 | struct irq_chip s3c_irq_level_chip = { |
87 | .name = "s3c-level", | 87 | .name = "s3c-level", |
88 | .ack = s3c_irq_maskack, | 88 | .irq_ack = s3c_irq_maskack, |
89 | .mask = s3c_irq_mask, | 89 | .irq_mask = s3c_irq_mask, |
90 | .unmask = s3c_irq_unmask, | 90 | .irq_unmask = s3c_irq_unmask, |
91 | .set_wake = s3c_irq_wake | 91 | .irq_set_wake = s3c_irq_wake |
92 | }; | 92 | }; |
93 | 93 | ||
94 | struct irq_chip s3c_irq_chip = { | 94 | struct irq_chip s3c_irq_chip = { |
95 | .name = "s3c", | 95 | .name = "s3c", |
96 | .ack = s3c_irq_ack, | 96 | .irq_ack = s3c_irq_ack, |
97 | .mask = s3c_irq_mask, | 97 | .irq_mask = s3c_irq_mask, |
98 | .unmask = s3c_irq_unmask, | 98 | .irq_unmask = s3c_irq_unmask, |
99 | .set_wake = s3c_irq_wake | 99 | .irq_set_wake = s3c_irq_wake |
100 | }; | 100 | }; |
101 | 101 | ||
102 | static void | 102 | static void |
103 | s3c_irqext_mask(unsigned int irqno) | 103 | s3c_irqext_mask(struct irq_data *data) |
104 | { | 104 | { |
105 | unsigned int irqno = data->irq - EXTINT_OFF; | ||
105 | unsigned long mask; | 106 | unsigned long mask; |
106 | 107 | ||
107 | irqno -= EXTINT_OFF; | ||
108 | |||
109 | mask = __raw_readl(S3C24XX_EINTMASK); | 108 | mask = __raw_readl(S3C24XX_EINTMASK); |
110 | mask |= ( 1UL << irqno); | 109 | mask |= ( 1UL << irqno); |
111 | __raw_writel(mask, S3C24XX_EINTMASK); | 110 | __raw_writel(mask, S3C24XX_EINTMASK); |
112 | } | 111 | } |
113 | 112 | ||
114 | static void | 113 | static void |
115 | s3c_irqext_ack(unsigned int irqno) | 114 | s3c_irqext_ack(struct irq_data *data) |
116 | { | 115 | { |
117 | unsigned long req; | 116 | unsigned long req; |
118 | unsigned long bit; | 117 | unsigned long bit; |
119 | unsigned long mask; | 118 | unsigned long mask; |
120 | 119 | ||
121 | bit = 1UL << (irqno - EXTINT_OFF); | 120 | bit = 1UL << (data->irq - EXTINT_OFF); |
122 | 121 | ||
123 | mask = __raw_readl(S3C24XX_EINTMASK); | 122 | mask = __raw_readl(S3C24XX_EINTMASK); |
124 | 123 | ||
@@ -129,64 +128,57 @@ s3c_irqext_ack(unsigned int irqno) | |||
129 | 128 | ||
130 | /* not sure if we should be acking the parent irq... */ | 129 | /* not sure if we should be acking the parent irq... */ |
131 | 130 | ||
132 | if (irqno <= IRQ_EINT7 ) { | 131 | if (data->irq <= IRQ_EINT7) { |
133 | if ((req & 0xf0) == 0) | 132 | if ((req & 0xf0) == 0) |
134 | s3c_irq_ack(IRQ_EINT4t7); | 133 | s3c_irq_ack(irq_get_irq_data(IRQ_EINT4t7)); |
135 | } else { | 134 | } else { |
136 | if ((req >> 8) == 0) | 135 | if ((req >> 8) == 0) |
137 | s3c_irq_ack(IRQ_EINT8t23); | 136 | s3c_irq_ack(irq_get_irq_data(IRQ_EINT8t23)); |
138 | } | 137 | } |
139 | } | 138 | } |
140 | 139 | ||
141 | static void | 140 | static void |
142 | s3c_irqext_unmask(unsigned int irqno) | 141 | s3c_irqext_unmask(struct irq_data *data) |
143 | { | 142 | { |
143 | unsigned int irqno = data->irq - EXTINT_OFF; | ||
144 | unsigned long mask; | 144 | unsigned long mask; |
145 | 145 | ||
146 | irqno -= EXTINT_OFF; | ||
147 | |||
148 | mask = __raw_readl(S3C24XX_EINTMASK); | 146 | mask = __raw_readl(S3C24XX_EINTMASK); |
149 | mask &= ~( 1UL << irqno); | 147 | mask &= ~(1UL << irqno); |
150 | __raw_writel(mask, S3C24XX_EINTMASK); | 148 | __raw_writel(mask, S3C24XX_EINTMASK); |
151 | } | 149 | } |
152 | 150 | ||
153 | int | 151 | int |
154 | s3c_irqext_type(unsigned int irq, unsigned int type) | 152 | s3c_irqext_type(struct irq_data *data, unsigned int type) |
155 | { | 153 | { |
156 | void __iomem *extint_reg; | 154 | void __iomem *extint_reg; |
157 | void __iomem *gpcon_reg; | 155 | void __iomem *gpcon_reg; |
158 | unsigned long gpcon_offset, extint_offset; | 156 | unsigned long gpcon_offset, extint_offset; |
159 | unsigned long newvalue = 0, value; | 157 | unsigned long newvalue = 0, value; |
160 | 158 | ||
161 | if ((irq >= IRQ_EINT0) && (irq <= IRQ_EINT3)) | 159 | if ((data->irq >= IRQ_EINT0) && (data->irq <= IRQ_EINT3)) { |
162 | { | ||
163 | gpcon_reg = S3C2410_GPFCON; | 160 | gpcon_reg = S3C2410_GPFCON; |
164 | extint_reg = S3C24XX_EXTINT0; | 161 | extint_reg = S3C24XX_EXTINT0; |
165 | gpcon_offset = (irq - IRQ_EINT0) * 2; | 162 | gpcon_offset = (data->irq - IRQ_EINT0) * 2; |
166 | extint_offset = (irq - IRQ_EINT0) * 4; | 163 | extint_offset = (data->irq - IRQ_EINT0) * 4; |
167 | } | 164 | } else if ((data->irq >= IRQ_EINT4) && (data->irq <= IRQ_EINT7)) { |
168 | else if ((irq >= IRQ_EINT4) && (irq <= IRQ_EINT7)) | ||
169 | { | ||
170 | gpcon_reg = S3C2410_GPFCON; | 165 | gpcon_reg = S3C2410_GPFCON; |
171 | extint_reg = S3C24XX_EXTINT0; | 166 | extint_reg = S3C24XX_EXTINT0; |
172 | gpcon_offset = (irq - (EXTINT_OFF)) * 2; | 167 | gpcon_offset = (data->irq - (EXTINT_OFF)) * 2; |
173 | extint_offset = (irq - (EXTINT_OFF)) * 4; | 168 | extint_offset = (data->irq - (EXTINT_OFF)) * 4; |
174 | } | 169 | } else if ((data->irq >= IRQ_EINT8) && (data->irq <= IRQ_EINT15)) { |
175 | else if ((irq >= IRQ_EINT8) && (irq <= IRQ_EINT15)) | ||
176 | { | ||
177 | gpcon_reg = S3C2410_GPGCON; | 170 | gpcon_reg = S3C2410_GPGCON; |
178 | extint_reg = S3C24XX_EXTINT1; | 171 | extint_reg = S3C24XX_EXTINT1; |
179 | gpcon_offset = (irq - IRQ_EINT8) * 2; | 172 | gpcon_offset = (data->irq - IRQ_EINT8) * 2; |
180 | extint_offset = (irq - IRQ_EINT8) * 4; | 173 | extint_offset = (data->irq - IRQ_EINT8) * 4; |
181 | } | 174 | } else if ((data->irq >= IRQ_EINT16) && (data->irq <= IRQ_EINT23)) { |
182 | else if ((irq >= IRQ_EINT16) && (irq <= IRQ_EINT23)) | ||
183 | { | ||
184 | gpcon_reg = S3C2410_GPGCON; | 175 | gpcon_reg = S3C2410_GPGCON; |
185 | extint_reg = S3C24XX_EXTINT2; | 176 | extint_reg = S3C24XX_EXTINT2; |
186 | gpcon_offset = (irq - IRQ_EINT8) * 2; | 177 | gpcon_offset = (data->irq - IRQ_EINT8) * 2; |
187 | extint_offset = (irq - IRQ_EINT16) * 4; | 178 | extint_offset = (data->irq - IRQ_EINT16) * 4; |
188 | } else | 179 | } else { |
189 | return -1; | 180 | return -1; |
181 | } | ||
190 | 182 | ||
191 | /* Set the GPIO to external interrupt mode */ | 183 | /* Set the GPIO to external interrupt mode */ |
192 | value = __raw_readl(gpcon_reg); | 184 | value = __raw_readl(gpcon_reg); |
@@ -234,20 +226,20 @@ s3c_irqext_type(unsigned int irq, unsigned int type) | |||
234 | 226 | ||
235 | static struct irq_chip s3c_irqext_chip = { | 227 | static struct irq_chip s3c_irqext_chip = { |
236 | .name = "s3c-ext", | 228 | .name = "s3c-ext", |
237 | .mask = s3c_irqext_mask, | 229 | .irq_mask = s3c_irqext_mask, |
238 | .unmask = s3c_irqext_unmask, | 230 | .irq_unmask = s3c_irqext_unmask, |
239 | .ack = s3c_irqext_ack, | 231 | .irq_ack = s3c_irqext_ack, |
240 | .set_type = s3c_irqext_type, | 232 | .irq_set_type = s3c_irqext_type, |
241 | .set_wake = s3c_irqext_wake | 233 | .irq_set_wake = s3c_irqext_wake |
242 | }; | 234 | }; |
243 | 235 | ||
244 | static struct irq_chip s3c_irq_eint0t4 = { | 236 | static struct irq_chip s3c_irq_eint0t4 = { |
245 | .name = "s3c-ext0", | 237 | .name = "s3c-ext0", |
246 | .ack = s3c_irq_ack, | 238 | .irq_ack = s3c_irq_ack, |
247 | .mask = s3c_irq_mask, | 239 | .irq_mask = s3c_irq_mask, |
248 | .unmask = s3c_irq_unmask, | 240 | .irq_unmask = s3c_irq_unmask, |
249 | .set_wake = s3c_irq_wake, | 241 | .irq_set_wake = s3c_irq_wake, |
250 | .set_type = s3c_irqext_type, | 242 | .irq_set_type = s3c_irqext_type, |
251 | }; | 243 | }; |
252 | 244 | ||
253 | /* mask values for the parent registers for each of the interrupt types */ | 245 | /* mask values for the parent registers for each of the interrupt types */ |
@@ -261,109 +253,109 @@ static struct irq_chip s3c_irq_eint0t4 = { | |||
261 | /* UART0 */ | 253 | /* UART0 */ |
262 | 254 | ||
263 | static void | 255 | static void |
264 | s3c_irq_uart0_mask(unsigned int irqno) | 256 | s3c_irq_uart0_mask(struct irq_data *data) |
265 | { | 257 | { |
266 | s3c_irqsub_mask(irqno, INTMSK_UART0, 7); | 258 | s3c_irqsub_mask(data->irq, INTMSK_UART0, 7); |
267 | } | 259 | } |
268 | 260 | ||
269 | static void | 261 | static void |
270 | s3c_irq_uart0_unmask(unsigned int irqno) | 262 | s3c_irq_uart0_unmask(struct irq_data *data) |
271 | { | 263 | { |
272 | s3c_irqsub_unmask(irqno, INTMSK_UART0); | 264 | s3c_irqsub_unmask(data->irq, INTMSK_UART0); |
273 | } | 265 | } |
274 | 266 | ||
275 | static void | 267 | static void |
276 | s3c_irq_uart0_ack(unsigned int irqno) | 268 | s3c_irq_uart0_ack(struct irq_data *data) |
277 | { | 269 | { |
278 | s3c_irqsub_maskack(irqno, INTMSK_UART0, 7); | 270 | s3c_irqsub_maskack(data->irq, INTMSK_UART0, 7); |
279 | } | 271 | } |
280 | 272 | ||
281 | static struct irq_chip s3c_irq_uart0 = { | 273 | static struct irq_chip s3c_irq_uart0 = { |
282 | .name = "s3c-uart0", | 274 | .name = "s3c-uart0", |
283 | .mask = s3c_irq_uart0_mask, | 275 | .irq_mask = s3c_irq_uart0_mask, |
284 | .unmask = s3c_irq_uart0_unmask, | 276 | .irq_unmask = s3c_irq_uart0_unmask, |
285 | .ack = s3c_irq_uart0_ack, | 277 | .irq_ack = s3c_irq_uart0_ack, |
286 | }; | 278 | }; |
287 | 279 | ||
288 | /* UART1 */ | 280 | /* UART1 */ |
289 | 281 | ||
290 | static void | 282 | static void |
291 | s3c_irq_uart1_mask(unsigned int irqno) | 283 | s3c_irq_uart1_mask(struct irq_data *data) |
292 | { | 284 | { |
293 | s3c_irqsub_mask(irqno, INTMSK_UART1, 7 << 3); | 285 | s3c_irqsub_mask(data->irq, INTMSK_UART1, 7 << 3); |
294 | } | 286 | } |
295 | 287 | ||
296 | static void | 288 | static void |
297 | s3c_irq_uart1_unmask(unsigned int irqno) | 289 | s3c_irq_uart1_unmask(struct irq_data *data) |
298 | { | 290 | { |
299 | s3c_irqsub_unmask(irqno, INTMSK_UART1); | 291 | s3c_irqsub_unmask(data->irq, INTMSK_UART1); |
300 | } | 292 | } |
301 | 293 | ||
302 | static void | 294 | static void |
303 | s3c_irq_uart1_ack(unsigned int irqno) | 295 | s3c_irq_uart1_ack(struct irq_data *data) |
304 | { | 296 | { |
305 | s3c_irqsub_maskack(irqno, INTMSK_UART1, 7 << 3); | 297 | s3c_irqsub_maskack(data->irq, INTMSK_UART1, 7 << 3); |
306 | } | 298 | } |
307 | 299 | ||
308 | static struct irq_chip s3c_irq_uart1 = { | 300 | static struct irq_chip s3c_irq_uart1 = { |
309 | .name = "s3c-uart1", | 301 | .name = "s3c-uart1", |
310 | .mask = s3c_irq_uart1_mask, | 302 | .irq_mask = s3c_irq_uart1_mask, |
311 | .unmask = s3c_irq_uart1_unmask, | 303 | .irq_unmask = s3c_irq_uart1_unmask, |
312 | .ack = s3c_irq_uart1_ack, | 304 | .irq_ack = s3c_irq_uart1_ack, |
313 | }; | 305 | }; |
314 | 306 | ||
315 | /* UART2 */ | 307 | /* UART2 */ |
316 | 308 | ||
317 | static void | 309 | static void |
318 | s3c_irq_uart2_mask(unsigned int irqno) | 310 | s3c_irq_uart2_mask(struct irq_data *data) |
319 | { | 311 | { |
320 | s3c_irqsub_mask(irqno, INTMSK_UART2, 7 << 6); | 312 | s3c_irqsub_mask(data->irq, INTMSK_UART2, 7 << 6); |
321 | } | 313 | } |
322 | 314 | ||
323 | static void | 315 | static void |
324 | s3c_irq_uart2_unmask(unsigned int irqno) | 316 | s3c_irq_uart2_unmask(struct irq_data *data) |
325 | { | 317 | { |
326 | s3c_irqsub_unmask(irqno, INTMSK_UART2); | 318 | s3c_irqsub_unmask(data->irq, INTMSK_UART2); |
327 | } | 319 | } |
328 | 320 | ||
329 | static void | 321 | static void |
330 | s3c_irq_uart2_ack(unsigned int irqno) | 322 | s3c_irq_uart2_ack(struct irq_data *data) |
331 | { | 323 | { |
332 | s3c_irqsub_maskack(irqno, INTMSK_UART2, 7 << 6); | 324 | s3c_irqsub_maskack(data->irq, INTMSK_UART2, 7 << 6); |
333 | } | 325 | } |
334 | 326 | ||
335 | static struct irq_chip s3c_irq_uart2 = { | 327 | static struct irq_chip s3c_irq_uart2 = { |
336 | .name = "s3c-uart2", | 328 | .name = "s3c-uart2", |
337 | .mask = s3c_irq_uart2_mask, | 329 | .irq_mask = s3c_irq_uart2_mask, |
338 | .unmask = s3c_irq_uart2_unmask, | 330 | .irq_unmask = s3c_irq_uart2_unmask, |
339 | .ack = s3c_irq_uart2_ack, | 331 | .irq_ack = s3c_irq_uart2_ack, |
340 | }; | 332 | }; |
341 | 333 | ||
342 | /* ADC and Touchscreen */ | 334 | /* ADC and Touchscreen */ |
343 | 335 | ||
344 | static void | 336 | static void |
345 | s3c_irq_adc_mask(unsigned int irqno) | 337 | s3c_irq_adc_mask(struct irq_data *d) |
346 | { | 338 | { |
347 | s3c_irqsub_mask(irqno, INTMSK_ADCPARENT, 3 << 9); | 339 | s3c_irqsub_mask(d->irq, INTMSK_ADCPARENT, 3 << 9); |
348 | } | 340 | } |
349 | 341 | ||
350 | static void | 342 | static void |
351 | s3c_irq_adc_unmask(unsigned int irqno) | 343 | s3c_irq_adc_unmask(struct irq_data *d) |
352 | { | 344 | { |
353 | s3c_irqsub_unmask(irqno, INTMSK_ADCPARENT); | 345 | s3c_irqsub_unmask(d->irq, INTMSK_ADCPARENT); |
354 | } | 346 | } |
355 | 347 | ||
356 | static void | 348 | static void |
357 | s3c_irq_adc_ack(unsigned int irqno) | 349 | s3c_irq_adc_ack(struct irq_data *d) |
358 | { | 350 | { |
359 | s3c_irqsub_ack(irqno, INTMSK_ADCPARENT, 3 << 9); | 351 | s3c_irqsub_ack(d->irq, INTMSK_ADCPARENT, 3 << 9); |
360 | } | 352 | } |
361 | 353 | ||
362 | static struct irq_chip s3c_irq_adc = { | 354 | static struct irq_chip s3c_irq_adc = { |
363 | .name = "s3c-adc", | 355 | .name = "s3c-adc", |
364 | .mask = s3c_irq_adc_mask, | 356 | .irq_mask = s3c_irq_adc_mask, |
365 | .unmask = s3c_irq_adc_unmask, | 357 | .irq_unmask = s3c_irq_adc_unmask, |
366 | .ack = s3c_irq_adc_ack, | 358 | .irq_ack = s3c_irq_adc_ack, |
367 | }; | 359 | }; |
368 | 360 | ||
369 | /* irq demux for adc */ | 361 | /* irq demux for adc */ |
diff --git a/arch/arm/plat-s3c24xx/s3c2443-clock.c b/arch/arm/plat-s3c24xx/s3c2443-clock.c index 461f070eb62..82f2d4a3929 100644 --- a/arch/arm/plat-s3c24xx/s3c2443-clock.c +++ b/arch/arm/plat-s3c24xx/s3c2443-clock.c | |||
@@ -271,7 +271,7 @@ static struct clk init_clocks[] = { | |||
271 | .ctrlbit = S3C2443_HCLKCON_DMA5, | 271 | .ctrlbit = S3C2443_HCLKCON_DMA5, |
272 | }, { | 272 | }, { |
273 | .name = "hsmmc", | 273 | .name = "hsmmc", |
274 | .id = 0, | 274 | .id = 1, |
275 | .parent = &clk_h, | 275 | .parent = &clk_h, |
276 | .enable = s3c2443_clkcon_enable_h, | 276 | .enable = s3c2443_clkcon_enable_h, |
277 | .ctrlbit = S3C2443_HCLKCON_HSMMC, | 277 | .ctrlbit = S3C2443_HCLKCON_HSMMC, |
diff --git a/arch/arm/plat-s5p/Kconfig b/arch/arm/plat-s5p/Kconfig index 65dbfa8e0a8..557f8c507f6 100644 --- a/arch/arm/plat-s5p/Kconfig +++ b/arch/arm/plat-s5p/Kconfig | |||
@@ -37,6 +37,14 @@ config S5P_GPIO_INT | |||
37 | help | 37 | help |
38 | Common code for the GPIO interrupts (other than external interrupts.) | 38 | Common code for the GPIO interrupts (other than external interrupts.) |
39 | 39 | ||
40 | comment "System MMU" | ||
41 | |||
42 | config S5P_SYSTEM_MMU | ||
43 | bool "S5P SYSTEM MMU" | ||
44 | depends on ARCH_S5PV310 | ||
45 | help | ||
46 | Say Y here if you want to enable System MMU | ||
47 | |||
40 | config S5P_DEV_FIMC0 | 48 | config S5P_DEV_FIMC0 |
41 | bool | 49 | bool |
42 | help | 50 | help |
@@ -56,3 +64,13 @@ config S5P_DEV_ONENAND | |||
56 | bool | 64 | bool |
57 | help | 65 | help |
58 | Compile in platform device definition for OneNAND controller | 66 | Compile in platform device definition for OneNAND controller |
67 | |||
68 | config S5P_DEV_CSIS0 | ||
69 | bool | ||
70 | help | ||
71 | Compile in platform device definitions for MIPI-CSIS channel 0 | ||
72 | |||
73 | config S5P_DEV_CSIS1 | ||
74 | bool | ||
75 | help | ||
76 | Compile in platform device definitions for MIPI-CSIS channel 1 | ||
diff --git a/arch/arm/plat-s5p/Makefile b/arch/arm/plat-s5p/Makefile index de65238a7ae..4bd5cf90897 100644 --- a/arch/arm/plat-s5p/Makefile +++ b/arch/arm/plat-s5p/Makefile | |||
@@ -19,6 +19,7 @@ obj-y += clock.o | |||
19 | obj-y += irq.o | 19 | obj-y += irq.o |
20 | obj-$(CONFIG_S5P_EXT_INT) += irq-eint.o | 20 | obj-$(CONFIG_S5P_EXT_INT) += irq-eint.o |
21 | obj-$(CONFIG_S5P_GPIO_INT) += irq-gpioint.o | 21 | obj-$(CONFIG_S5P_GPIO_INT) += irq-gpioint.o |
22 | obj-$(CONFIG_S5P_SYSTEM_MMU) += sysmmu.o | ||
22 | obj-$(CONFIG_PM) += pm.o | 23 | obj-$(CONFIG_PM) += pm.o |
23 | obj-$(CONFIG_PM) += irq-pm.o | 24 | obj-$(CONFIG_PM) += irq-pm.o |
24 | 25 | ||
@@ -28,3 +29,5 @@ obj-$(CONFIG_S5P_DEV_FIMC0) += dev-fimc0.o | |||
28 | obj-$(CONFIG_S5P_DEV_FIMC1) += dev-fimc1.o | 29 | obj-$(CONFIG_S5P_DEV_FIMC1) += dev-fimc1.o |
29 | obj-$(CONFIG_S5P_DEV_FIMC2) += dev-fimc2.o | 30 | obj-$(CONFIG_S5P_DEV_FIMC2) += dev-fimc2.o |
30 | obj-$(CONFIG_S5P_DEV_ONENAND) += dev-onenand.o | 31 | obj-$(CONFIG_S5P_DEV_ONENAND) += dev-onenand.o |
32 | obj-$(CONFIG_S5P_DEV_CSIS0) += dev-csis0.o | ||
33 | obj-$(CONFIG_S5P_DEV_CSIS1) += dev-csis1.o | ||
diff --git a/arch/arm/plat-s5p/cpu.c b/arch/arm/plat-s5p/cpu.c index 74f7f5a5446..047d31c1bbd 100644 --- a/arch/arm/plat-s5p/cpu.c +++ b/arch/arm/plat-s5p/cpu.c | |||
@@ -108,6 +108,11 @@ static struct map_desc s5p_iodesc[] __initdata = { | |||
108 | .pfn = __phys_to_pfn(S3C_PA_WDT), | 108 | .pfn = __phys_to_pfn(S3C_PA_WDT), |
109 | .length = SZ_4K, | 109 | .length = SZ_4K, |
110 | .type = MT_DEVICE, | 110 | .type = MT_DEVICE, |
111 | }, { | ||
112 | .virtual = (unsigned long)S5P_VA_SROMC, | ||
113 | .pfn = __phys_to_pfn(S5P_PA_SROMC), | ||
114 | .length = SZ_4K, | ||
115 | .type = MT_DEVICE, | ||
111 | }, | 116 | }, |
112 | }; | 117 | }; |
113 | 118 | ||
diff --git a/arch/arm/plat-s5p/dev-csis0.c b/arch/arm/plat-s5p/dev-csis0.c new file mode 100644 index 00000000000..dfab1c85f54 --- /dev/null +++ b/arch/arm/plat-s5p/dev-csis0.c | |||
@@ -0,0 +1,34 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Samsung Electronics | ||
3 | * | ||
4 | * S5P series device definition for MIPI-CSIS channel 0 | ||
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 | #include <linux/kernel.h> | ||
12 | #include <linux/interrupt.h> | ||
13 | #include <linux/platform_device.h> | ||
14 | #include <mach/map.h> | ||
15 | |||
16 | static struct resource s5p_mipi_csis0_resource[] = { | ||
17 | [0] = { | ||
18 | .start = S5P_PA_MIPI_CSIS0, | ||
19 | .end = S5P_PA_MIPI_CSIS0 + SZ_4K - 1, | ||
20 | .flags = IORESOURCE_MEM, | ||
21 | }, | ||
22 | [1] = { | ||
23 | .start = IRQ_MIPI_CSIS0, | ||
24 | .end = IRQ_MIPI_CSIS0, | ||
25 | .flags = IORESOURCE_IRQ, | ||
26 | } | ||
27 | }; | ||
28 | |||
29 | struct platform_device s5p_device_mipi_csis0 = { | ||
30 | .name = "s5p-mipi-csis", | ||
31 | .id = 0, | ||
32 | .num_resources = ARRAY_SIZE(s5p_mipi_csis0_resource), | ||
33 | .resource = s5p_mipi_csis0_resource, | ||
34 | }; | ||
diff --git a/arch/arm/plat-s5p/dev-csis1.c b/arch/arm/plat-s5p/dev-csis1.c new file mode 100644 index 00000000000..e3053f27fbb --- /dev/null +++ b/arch/arm/plat-s5p/dev-csis1.c | |||
@@ -0,0 +1,34 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Samsung Electronics | ||
3 | * | ||
4 | * S5P series device definition for MIPI-CSIS channel 1 | ||
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 | #include <linux/kernel.h> | ||
12 | #include <linux/interrupt.h> | ||
13 | #include <linux/platform_device.h> | ||
14 | #include <mach/map.h> | ||
15 | |||
16 | static struct resource s5p_mipi_csis1_resource[] = { | ||
17 | [0] = { | ||
18 | .start = S5P_PA_MIPI_CSIS1, | ||
19 | .end = S5P_PA_MIPI_CSIS1 + SZ_4K - 1, | ||
20 | .flags = IORESOURCE_MEM, | ||
21 | }, | ||
22 | [1] = { | ||
23 | .start = IRQ_MIPI_CSIS1, | ||
24 | .end = IRQ_MIPI_CSIS1, | ||
25 | .flags = IORESOURCE_IRQ, | ||
26 | }, | ||
27 | }; | ||
28 | |||
29 | struct platform_device s5p_device_mipi_csis1 = { | ||
30 | .name = "s5p-mipi-csis", | ||
31 | .id = 1, | ||
32 | .num_resources = ARRAY_SIZE(s5p_mipi_csis1_resource), | ||
33 | .resource = s5p_mipi_csis1_resource, | ||
34 | }; | ||
diff --git a/arch/arm/plat-s5p/include/plat/csis.h b/arch/arm/plat-s5p/include/plat/csis.h new file mode 100644 index 00000000000..51e308c7981 --- /dev/null +++ b/arch/arm/plat-s5p/include/plat/csis.h | |||
@@ -0,0 +1,28 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Samsung Electronics | ||
3 | * | ||
4 | * S5P series MIPI CSI slave device support | ||
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 PLAT_S5P_CSIS_H_ | ||
12 | #define PLAT_S5P_CSIS_H_ __FILE__ | ||
13 | |||
14 | /** | ||
15 | * struct s5p_platform_mipi_csis - platform data for MIPI-CSIS | ||
16 | * @clk_rate: bus clock frequency | ||
17 | * @lanes: number of data lanes used | ||
18 | * @alignment: data alignment in bits | ||
19 | * @hs_settle: HS-RX settle time | ||
20 | */ | ||
21 | struct s5p_platform_mipi_csis { | ||
22 | unsigned long clk_rate; | ||
23 | u8 lanes; | ||
24 | u8 alignment; | ||
25 | u8 hs_settle; | ||
26 | }; | ||
27 | |||
28 | #endif /* PLAT_S5P_CSIS_H_ */ | ||
diff --git a/arch/arm/plat-s5p/include/plat/map-s5p.h b/arch/arm/plat-s5p/include/plat/map-s5p.h index fef353d4451..d973d39666a 100644 --- a/arch/arm/plat-s5p/include/plat/map-s5p.h +++ b/arch/arm/plat-s5p/include/plat/map-s5p.h | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #define S5P_VA_CHIPID S3C_ADDR(0x02000000) | 16 | #define S5P_VA_CHIPID S3C_ADDR(0x02000000) |
17 | #define S5P_VA_CMU S3C_ADDR(0x02100000) | 17 | #define S5P_VA_CMU S3C_ADDR(0x02100000) |
18 | #define S5P_VA_PMU S3C_ADDR(0x02180000) | ||
18 | #define S5P_VA_GPIO S3C_ADDR(0x02200000) | 19 | #define S5P_VA_GPIO S3C_ADDR(0x02200000) |
19 | #define S5P_VA_GPIO1 S5P_VA_GPIO | 20 | #define S5P_VA_GPIO1 S5P_VA_GPIO |
20 | #define S5P_VA_GPIO2 S3C_ADDR(0x02240000) | 21 | #define S5P_VA_GPIO2 S3C_ADDR(0x02240000) |
diff --git a/arch/arm/plat-s5p/include/plat/regs-srom.h b/arch/arm/plat-s5p/include/plat/regs-srom.h new file mode 100644 index 00000000000..f121ab5e76c --- /dev/null +++ b/arch/arm/plat-s5p/include/plat/regs-srom.h | |||
@@ -0,0 +1,54 @@ | |||
1 | /* linux/arch/arm/plat-s5p/include/plat/regs-srom.h | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com | ||
5 | * | ||
6 | * S5P SROMC register definitions | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_PLAT_S5P_REGS_SROM_H | ||
14 | #define __ASM_PLAT_S5P_REGS_SROM_H __FILE__ | ||
15 | |||
16 | #include <mach/map.h> | ||
17 | |||
18 | #define S5P_SROMREG(x) (S5P_VA_SROMC + (x)) | ||
19 | |||
20 | #define S5P_SROM_BW S5P_SROMREG(0x0) | ||
21 | #define S5P_SROM_BC0 S5P_SROMREG(0x4) | ||
22 | #define S5P_SROM_BC1 S5P_SROMREG(0x8) | ||
23 | #define S5P_SROM_BC2 S5P_SROMREG(0xc) | ||
24 | #define S5P_SROM_BC3 S5P_SROMREG(0x10) | ||
25 | #define S5P_SROM_BC4 S5P_SROMREG(0x14) | ||
26 | #define S5P_SROM_BC5 S5P_SROMREG(0x18) | ||
27 | |||
28 | /* one register BW holds 4 x 4-bit packed settings for NCS0 - NCS3 */ | ||
29 | |||
30 | #define S5P_SROM_BW__DATAWIDTH__SHIFT 0 | ||
31 | #define S5P_SROM_BW__ADDRMODE__SHIFT 1 | ||
32 | #define S5P_SROM_BW__WAITENABLE__SHIFT 2 | ||
33 | #define S5P_SROM_BW__BYTEENABLE__SHIFT 3 | ||
34 | |||
35 | #define S5P_SROM_BW__CS_MASK 0xf | ||
36 | |||
37 | #define S5P_SROM_BW__NCS0__SHIFT 0 | ||
38 | #define S5P_SROM_BW__NCS1__SHIFT 4 | ||
39 | #define S5P_SROM_BW__NCS2__SHIFT 8 | ||
40 | #define S5P_SROM_BW__NCS3__SHIFT 12 | ||
41 | #define S5P_SROM_BW__NCS4__SHIFT 16 | ||
42 | #define S5P_SROM_BW__NCS5__SHIFT 20 | ||
43 | |||
44 | /* applies to same to BCS0 - BCS3 */ | ||
45 | |||
46 | #define S5P_SROM_BCX__PMC__SHIFT 0 | ||
47 | #define S5P_SROM_BCX__TACP__SHIFT 4 | ||
48 | #define S5P_SROM_BCX__TCAH__SHIFT 8 | ||
49 | #define S5P_SROM_BCX__TCOH__SHIFT 12 | ||
50 | #define S5P_SROM_BCX__TACC__SHIFT 16 | ||
51 | #define S5P_SROM_BCX__TCOS__SHIFT 24 | ||
52 | #define S5P_SROM_BCX__TACS__SHIFT 28 | ||
53 | |||
54 | #endif /* __ASM_PLAT_S5P_REGS_SROM_H */ | ||
diff --git a/arch/arm/plat-s5p/irq-eint.c b/arch/arm/plat-s5p/irq-eint.c index 752f1a645f9..225aa25405d 100644 --- a/arch/arm/plat-s5p/irq-eint.c +++ b/arch/arm/plat-s5p/irq-eint.c | |||
@@ -28,39 +28,40 @@ | |||
28 | #include <plat/gpio-cfg.h> | 28 | #include <plat/gpio-cfg.h> |
29 | #include <mach/regs-gpio.h> | 29 | #include <mach/regs-gpio.h> |
30 | 30 | ||
31 | static inline void s5p_irq_eint_mask(unsigned int irq) | 31 | static inline void s5p_irq_eint_mask(struct irq_data *data) |
32 | { | 32 | { |
33 | u32 mask; | 33 | u32 mask; |
34 | 34 | ||
35 | mask = __raw_readl(S5P_EINT_MASK(EINT_REG_NR(irq))); | 35 | mask = __raw_readl(S5P_EINT_MASK(EINT_REG_NR(data->irq))); |
36 | mask |= eint_irq_to_bit(irq); | 36 | mask |= eint_irq_to_bit(data->irq); |
37 | __raw_writel(mask, S5P_EINT_MASK(EINT_REG_NR(irq))); | 37 | __raw_writel(mask, S5P_EINT_MASK(EINT_REG_NR(data->irq))); |
38 | } | 38 | } |
39 | 39 | ||
40 | static void s5p_irq_eint_unmask(unsigned int irq) | 40 | static void s5p_irq_eint_unmask(struct irq_data *data) |
41 | { | 41 | { |
42 | u32 mask; | 42 | u32 mask; |
43 | 43 | ||
44 | mask = __raw_readl(S5P_EINT_MASK(EINT_REG_NR(irq))); | 44 | mask = __raw_readl(S5P_EINT_MASK(EINT_REG_NR(data->irq))); |
45 | mask &= ~(eint_irq_to_bit(irq)); | 45 | mask &= ~(eint_irq_to_bit(data->irq)); |
46 | __raw_writel(mask, S5P_EINT_MASK(EINT_REG_NR(irq))); | 46 | __raw_writel(mask, S5P_EINT_MASK(EINT_REG_NR(data->irq))); |
47 | } | 47 | } |
48 | 48 | ||
49 | static inline void s5p_irq_eint_ack(unsigned int irq) | 49 | static inline void s5p_irq_eint_ack(struct irq_data *data) |
50 | { | 50 | { |
51 | __raw_writel(eint_irq_to_bit(irq), S5P_EINT_PEND(EINT_REG_NR(irq))); | 51 | __raw_writel(eint_irq_to_bit(data->irq), |
52 | S5P_EINT_PEND(EINT_REG_NR(data->irq))); | ||
52 | } | 53 | } |
53 | 54 | ||
54 | static void s5p_irq_eint_maskack(unsigned int irq) | 55 | static void s5p_irq_eint_maskack(struct irq_data *data) |
55 | { | 56 | { |
56 | /* compiler should in-line these */ | 57 | /* compiler should in-line these */ |
57 | s5p_irq_eint_mask(irq); | 58 | s5p_irq_eint_mask(data); |
58 | s5p_irq_eint_ack(irq); | 59 | s5p_irq_eint_ack(data); |
59 | } | 60 | } |
60 | 61 | ||
61 | static int s5p_irq_eint_set_type(unsigned int irq, unsigned int type) | 62 | static int s5p_irq_eint_set_type(struct irq_data *data, unsigned int type) |
62 | { | 63 | { |
63 | int offs = EINT_OFFSET(irq); | 64 | int offs = EINT_OFFSET(data->irq); |
64 | int shift; | 65 | int shift; |
65 | u32 ctrl, mask; | 66 | u32 ctrl, mask; |
66 | u32 newvalue = 0; | 67 | u32 newvalue = 0; |
@@ -94,10 +95,10 @@ static int s5p_irq_eint_set_type(unsigned int irq, unsigned int type) | |||
94 | shift = (offs & 0x7) * 4; | 95 | shift = (offs & 0x7) * 4; |
95 | mask = 0x7 << shift; | 96 | mask = 0x7 << shift; |
96 | 97 | ||
97 | ctrl = __raw_readl(S5P_EINT_CON(EINT_REG_NR(irq))); | 98 | ctrl = __raw_readl(S5P_EINT_CON(EINT_REG_NR(data->irq))); |
98 | ctrl &= ~mask; | 99 | ctrl &= ~mask; |
99 | ctrl |= newvalue << shift; | 100 | ctrl |= newvalue << shift; |
100 | __raw_writel(ctrl, S5P_EINT_CON(EINT_REG_NR(irq))); | 101 | __raw_writel(ctrl, S5P_EINT_CON(EINT_REG_NR(data->irq))); |
101 | 102 | ||
102 | if ((0 <= offs) && (offs < 8)) | 103 | if ((0 <= offs) && (offs < 8)) |
103 | s3c_gpio_cfgpin(EINT_GPIO_0(offs & 0x7), EINT_MODE); | 104 | s3c_gpio_cfgpin(EINT_GPIO_0(offs & 0x7), EINT_MODE); |
@@ -119,13 +120,13 @@ static int s5p_irq_eint_set_type(unsigned int irq, unsigned int type) | |||
119 | 120 | ||
120 | static struct irq_chip s5p_irq_eint = { | 121 | static struct irq_chip s5p_irq_eint = { |
121 | .name = "s5p-eint", | 122 | .name = "s5p-eint", |
122 | .mask = s5p_irq_eint_mask, | 123 | .irq_mask = s5p_irq_eint_mask, |
123 | .unmask = s5p_irq_eint_unmask, | 124 | .irq_unmask = s5p_irq_eint_unmask, |
124 | .mask_ack = s5p_irq_eint_maskack, | 125 | .irq_mask_ack = s5p_irq_eint_maskack, |
125 | .ack = s5p_irq_eint_ack, | 126 | .irq_ack = s5p_irq_eint_ack, |
126 | .set_type = s5p_irq_eint_set_type, | 127 | .irq_set_type = s5p_irq_eint_set_type, |
127 | #ifdef CONFIG_PM | 128 | #ifdef CONFIG_PM |
128 | .set_wake = s3c_irqext_wake, | 129 | .irq_set_wake = s3c_irqext_wake, |
129 | #endif | 130 | #endif |
130 | }; | 131 | }; |
131 | 132 | ||
@@ -159,42 +160,43 @@ static void s5p_irq_demux_eint16_31(unsigned int irq, struct irq_desc *desc) | |||
159 | s5p_irq_demux_eint(IRQ_EINT(24)); | 160 | s5p_irq_demux_eint(IRQ_EINT(24)); |
160 | } | 161 | } |
161 | 162 | ||
162 | static inline void s5p_irq_vic_eint_mask(unsigned int irq) | 163 | static inline void s5p_irq_vic_eint_mask(struct irq_data *data) |
163 | { | 164 | { |
164 | void __iomem *base = get_irq_chip_data(irq); | 165 | void __iomem *base = irq_data_get_irq_chip_data(data); |
165 | 166 | ||
166 | s5p_irq_eint_mask(irq); | 167 | s5p_irq_eint_mask(data); |
167 | writel(1 << EINT_OFFSET(irq), base + VIC_INT_ENABLE_CLEAR); | 168 | writel(1 << EINT_OFFSET(data->irq), base + VIC_INT_ENABLE_CLEAR); |
168 | } | 169 | } |
169 | 170 | ||
170 | static void s5p_irq_vic_eint_unmask(unsigned int irq) | 171 | static void s5p_irq_vic_eint_unmask(struct irq_data *data) |
171 | { | 172 | { |
172 | void __iomem *base = get_irq_chip_data(irq); | 173 | void __iomem *base = irq_data_get_irq_chip_data(data); |
173 | 174 | ||
174 | s5p_irq_eint_unmask(irq); | 175 | s5p_irq_eint_unmask(data); |
175 | writel(1 << EINT_OFFSET(irq), base + VIC_INT_ENABLE); | 176 | writel(1 << EINT_OFFSET(data->irq), base + VIC_INT_ENABLE); |
176 | } | 177 | } |
177 | 178 | ||
178 | static inline void s5p_irq_vic_eint_ack(unsigned int irq) | 179 | static inline void s5p_irq_vic_eint_ack(struct irq_data *data) |
179 | { | 180 | { |
180 | __raw_writel(eint_irq_to_bit(irq), S5P_EINT_PEND(EINT_REG_NR(irq))); | 181 | __raw_writel(eint_irq_to_bit(data->irq), |
182 | S5P_EINT_PEND(EINT_REG_NR(data->irq))); | ||
181 | } | 183 | } |
182 | 184 | ||
183 | static void s5p_irq_vic_eint_maskack(unsigned int irq) | 185 | static void s5p_irq_vic_eint_maskack(struct irq_data *data) |
184 | { | 186 | { |
185 | s5p_irq_vic_eint_mask(irq); | 187 | s5p_irq_vic_eint_mask(data); |
186 | s5p_irq_vic_eint_ack(irq); | 188 | s5p_irq_vic_eint_ack(data); |
187 | } | 189 | } |
188 | 190 | ||
189 | static struct irq_chip s5p_irq_vic_eint = { | 191 | static struct irq_chip s5p_irq_vic_eint = { |
190 | .name = "s5p_vic_eint", | 192 | .name = "s5p_vic_eint", |
191 | .mask = s5p_irq_vic_eint_mask, | 193 | .irq_mask = s5p_irq_vic_eint_mask, |
192 | .unmask = s5p_irq_vic_eint_unmask, | 194 | .irq_unmask = s5p_irq_vic_eint_unmask, |
193 | .mask_ack = s5p_irq_vic_eint_maskack, | 195 | .irq_mask_ack = s5p_irq_vic_eint_maskack, |
194 | .ack = s5p_irq_vic_eint_ack, | 196 | .irq_ack = s5p_irq_vic_eint_ack, |
195 | .set_type = s5p_irq_eint_set_type, | 197 | .irq_set_type = s5p_irq_eint_set_type, |
196 | #ifdef CONFIG_PM | 198 | #ifdef CONFIG_PM |
197 | .set_wake = s3c_irqext_wake, | 199 | .irq_set_wake = s3c_irqext_wake, |
198 | #endif | 200 | #endif |
199 | }; | 201 | }; |
200 | 202 | ||
diff --git a/arch/arm/plat-s5p/irq-gpioint.c b/arch/arm/plat-s5p/irq-gpioint.c index 0e5dc8cbf5e..3b6bf89d173 100644 --- a/arch/arm/plat-s5p/irq-gpioint.c +++ b/arch/arm/plat-s5p/irq-gpioint.c | |||
@@ -30,9 +30,9 @@ | |||
30 | 30 | ||
31 | static struct s3c_gpio_chip *irq_chips[S5P_GPIOINT_GROUP_MAXNR]; | 31 | static struct s3c_gpio_chip *irq_chips[S5P_GPIOINT_GROUP_MAXNR]; |
32 | 32 | ||
33 | static int s5p_gpioint_get_group(unsigned int irq) | 33 | static int s5p_gpioint_get_group(struct irq_data *data) |
34 | { | 34 | { |
35 | struct gpio_chip *chip = get_irq_data(irq); | 35 | struct gpio_chip *chip = irq_data_get_irq_data(data); |
36 | struct s3c_gpio_chip *s3c_chip = container_of(chip, | 36 | struct s3c_gpio_chip *s3c_chip = container_of(chip, |
37 | struct s3c_gpio_chip, chip); | 37 | struct s3c_gpio_chip, chip); |
38 | int group; | 38 | int group; |
@@ -44,22 +44,22 @@ static int s5p_gpioint_get_group(unsigned int irq) | |||
44 | return group; | 44 | return group; |
45 | } | 45 | } |
46 | 46 | ||
47 | static int s5p_gpioint_get_offset(unsigned int irq) | 47 | static int s5p_gpioint_get_offset(struct irq_data *data) |
48 | { | 48 | { |
49 | struct gpio_chip *chip = get_irq_data(irq); | 49 | struct gpio_chip *chip = irq_data_get_irq_data(data); |
50 | struct s3c_gpio_chip *s3c_chip = container_of(chip, | 50 | struct s3c_gpio_chip *s3c_chip = container_of(chip, |
51 | struct s3c_gpio_chip, chip); | 51 | struct s3c_gpio_chip, chip); |
52 | 52 | ||
53 | return irq - s3c_chip->irq_base; | 53 | return data->irq - s3c_chip->irq_base; |
54 | } | 54 | } |
55 | 55 | ||
56 | static void s5p_gpioint_ack(unsigned int irq) | 56 | static void s5p_gpioint_ack(struct irq_data *data) |
57 | { | 57 | { |
58 | int group, offset, pend_offset; | 58 | int group, offset, pend_offset; |
59 | unsigned int value; | 59 | unsigned int value; |
60 | 60 | ||
61 | group = s5p_gpioint_get_group(irq); | 61 | group = s5p_gpioint_get_group(data); |
62 | offset = s5p_gpioint_get_offset(irq); | 62 | offset = s5p_gpioint_get_offset(data); |
63 | pend_offset = group << 2; | 63 | pend_offset = group << 2; |
64 | 64 | ||
65 | value = __raw_readl(S5P_GPIOREG(GPIOINT_PEND_OFFSET) + pend_offset); | 65 | value = __raw_readl(S5P_GPIOREG(GPIOINT_PEND_OFFSET) + pend_offset); |
@@ -67,13 +67,13 @@ static void s5p_gpioint_ack(unsigned int irq) | |||
67 | __raw_writel(value, S5P_GPIOREG(GPIOINT_PEND_OFFSET) + pend_offset); | 67 | __raw_writel(value, S5P_GPIOREG(GPIOINT_PEND_OFFSET) + pend_offset); |
68 | } | 68 | } |
69 | 69 | ||
70 | static void s5p_gpioint_mask(unsigned int irq) | 70 | static void s5p_gpioint_mask(struct irq_data *data) |
71 | { | 71 | { |
72 | int group, offset, mask_offset; | 72 | int group, offset, mask_offset; |
73 | unsigned int value; | 73 | unsigned int value; |
74 | 74 | ||
75 | group = s5p_gpioint_get_group(irq); | 75 | group = s5p_gpioint_get_group(data); |
76 | offset = s5p_gpioint_get_offset(irq); | 76 | offset = s5p_gpioint_get_offset(data); |
77 | mask_offset = group << 2; | 77 | mask_offset = group << 2; |
78 | 78 | ||
79 | value = __raw_readl(S5P_GPIOREG(GPIOINT_MASK_OFFSET) + mask_offset); | 79 | value = __raw_readl(S5P_GPIOREG(GPIOINT_MASK_OFFSET) + mask_offset); |
@@ -81,13 +81,13 @@ static void s5p_gpioint_mask(unsigned int irq) | |||
81 | __raw_writel(value, S5P_GPIOREG(GPIOINT_MASK_OFFSET) + mask_offset); | 81 | __raw_writel(value, S5P_GPIOREG(GPIOINT_MASK_OFFSET) + mask_offset); |
82 | } | 82 | } |
83 | 83 | ||
84 | static void s5p_gpioint_unmask(unsigned int irq) | 84 | static void s5p_gpioint_unmask(struct irq_data *data) |
85 | { | 85 | { |
86 | int group, offset, mask_offset; | 86 | int group, offset, mask_offset; |
87 | unsigned int value; | 87 | unsigned int value; |
88 | 88 | ||
89 | group = s5p_gpioint_get_group(irq); | 89 | group = s5p_gpioint_get_group(data); |
90 | offset = s5p_gpioint_get_offset(irq); | 90 | offset = s5p_gpioint_get_offset(data); |
91 | mask_offset = group << 2; | 91 | mask_offset = group << 2; |
92 | 92 | ||
93 | value = __raw_readl(S5P_GPIOREG(GPIOINT_MASK_OFFSET) + mask_offset); | 93 | value = __raw_readl(S5P_GPIOREG(GPIOINT_MASK_OFFSET) + mask_offset); |
@@ -95,19 +95,19 @@ static void s5p_gpioint_unmask(unsigned int irq) | |||
95 | __raw_writel(value, S5P_GPIOREG(GPIOINT_MASK_OFFSET) + mask_offset); | 95 | __raw_writel(value, S5P_GPIOREG(GPIOINT_MASK_OFFSET) + mask_offset); |
96 | } | 96 | } |
97 | 97 | ||
98 | static void s5p_gpioint_mask_ack(unsigned int irq) | 98 | static void s5p_gpioint_mask_ack(struct irq_data *data) |
99 | { | 99 | { |
100 | s5p_gpioint_mask(irq); | 100 | s5p_gpioint_mask(data); |
101 | s5p_gpioint_ack(irq); | 101 | s5p_gpioint_ack(data); |
102 | } | 102 | } |
103 | 103 | ||
104 | static int s5p_gpioint_set_type(unsigned int irq, unsigned int type) | 104 | static int s5p_gpioint_set_type(struct irq_data *data, unsigned int type) |
105 | { | 105 | { |
106 | int group, offset, con_offset; | 106 | int group, offset, con_offset; |
107 | unsigned int value; | 107 | unsigned int value; |
108 | 108 | ||
109 | group = s5p_gpioint_get_group(irq); | 109 | group = s5p_gpioint_get_group(data); |
110 | offset = s5p_gpioint_get_offset(irq); | 110 | offset = s5p_gpioint_get_offset(data); |
111 | con_offset = group << 2; | 111 | con_offset = group << 2; |
112 | 112 | ||
113 | switch (type) { | 113 | switch (type) { |
@@ -142,11 +142,11 @@ static int s5p_gpioint_set_type(unsigned int irq, unsigned int type) | |||
142 | 142 | ||
143 | struct irq_chip s5p_gpioint = { | 143 | struct irq_chip s5p_gpioint = { |
144 | .name = "s5p_gpioint", | 144 | .name = "s5p_gpioint", |
145 | .ack = s5p_gpioint_ack, | 145 | .irq_ack = s5p_gpioint_ack, |
146 | .mask = s5p_gpioint_mask, | 146 | .irq_mask = s5p_gpioint_mask, |
147 | .mask_ack = s5p_gpioint_mask_ack, | 147 | .irq_mask_ack = s5p_gpioint_mask_ack, |
148 | .unmask = s5p_gpioint_unmask, | 148 | .irq_unmask = s5p_gpioint_unmask, |
149 | .set_type = s5p_gpioint_set_type, | 149 | .irq_set_type = s5p_gpioint_set_type, |
150 | }; | 150 | }; |
151 | 151 | ||
152 | static void s5p_gpioint_handler(unsigned int irq, struct irq_desc *desc) | 152 | static void s5p_gpioint_handler(unsigned int irq, struct irq_desc *desc) |
diff --git a/arch/arm/plat-s5p/irq-pm.c b/arch/arm/plat-s5p/irq-pm.c index dc33b9ecda4..5259ad458bc 100644 --- a/arch/arm/plat-s5p/irq-pm.c +++ b/arch/arm/plat-s5p/irq-pm.c | |||
@@ -37,14 +37,14 @@ | |||
37 | unsigned long s3c_irqwake_intallow = 0x00000006L; | 37 | unsigned long s3c_irqwake_intallow = 0x00000006L; |
38 | unsigned long s3c_irqwake_eintallow = 0xffffffffL; | 38 | unsigned long s3c_irqwake_eintallow = 0xffffffffL; |
39 | 39 | ||
40 | int s3c_irq_wake(unsigned int irqno, unsigned int state) | 40 | int s3c_irq_wake(struct irq_data *data, unsigned int state) |
41 | { | 41 | { |
42 | unsigned long irqbit; | 42 | unsigned long irqbit; |
43 | 43 | ||
44 | switch (irqno) { | 44 | switch (data->irq) { |
45 | case IRQ_RTC_TIC: | 45 | case IRQ_RTC_TIC: |
46 | case IRQ_RTC_ALARM: | 46 | case IRQ_RTC_ALARM: |
47 | irqbit = 1 << (irqno + 1 - IRQ_RTC_ALARM); | 47 | irqbit = 1 << (data->irq + 1 - IRQ_RTC_ALARM); |
48 | if (!state) | 48 | if (!state) |
49 | s3c_irqwake_intmask |= irqbit; | 49 | s3c_irqwake_intmask |= irqbit; |
50 | else | 50 | else |
diff --git a/arch/arm/plat-s5p/sysmmu.c b/arch/arm/plat-s5p/sysmmu.c new file mode 100644 index 00000000000..ffe8a48bc3c --- /dev/null +++ b/arch/arm/plat-s5p/sysmmu.c | |||
@@ -0,0 +1,326 @@ | |||
1 | /* linux/arch/arm/plat-s5p/sysmmu.c | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com | ||
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 | #include <linux/io.h> | ||
12 | #include <linux/interrupt.h> | ||
13 | #include <linux/platform_device.h> | ||
14 | |||
15 | #include <mach/map.h> | ||
16 | #include <mach/regs-sysmmu.h> | ||
17 | #include <mach/sysmmu.h> | ||
18 | |||
19 | struct sysmmu_controller s5p_sysmmu_cntlrs[S5P_SYSMMU_TOTAL_IPNUM]; | ||
20 | |||
21 | void s5p_sysmmu_register(struct sysmmu_controller *sysmmuconp) | ||
22 | { | ||
23 | unsigned int reg_mmu_ctrl; | ||
24 | unsigned int reg_mmu_status; | ||
25 | unsigned int reg_pt_base_addr; | ||
26 | unsigned int reg_int_status; | ||
27 | unsigned int reg_page_ft_addr; | ||
28 | |||
29 | reg_int_status = __raw_readl(sysmmuconp->regs + S5P_INT_STATUS); | ||
30 | reg_mmu_ctrl = __raw_readl(sysmmuconp->regs + S5P_MMU_CTRL); | ||
31 | reg_mmu_status = __raw_readl(sysmmuconp->regs + S5P_MMU_STATUS); | ||
32 | reg_pt_base_addr = __raw_readl(sysmmuconp->regs + S5P_PT_BASE_ADDR); | ||
33 | reg_page_ft_addr = __raw_readl(sysmmuconp->regs + S5P_PAGE_FAULT_ADDR); | ||
34 | |||
35 | printk(KERN_INFO "%s: ips:%s\n", __func__, sysmmuconp->name); | ||
36 | printk(KERN_INFO "%s: MMU_CTRL:0x%X, ", __func__, reg_mmu_ctrl); | ||
37 | printk(KERN_INFO "MMU_STATUS:0x%X, PT_BASE_ADDR:0x%X\n", reg_mmu_status, reg_pt_base_addr); | ||
38 | printk(KERN_INFO "%s: INT_STATUS:0x%X, PAGE_FAULT_ADDR:0x%X\n", __func__, reg_int_status, reg_page_ft_addr); | ||
39 | |||
40 | switch (reg_int_status & 0xFF) { | ||
41 | case 0x1: | ||
42 | printk(KERN_INFO "%s: Page fault\n", __func__); | ||
43 | printk(KERN_INFO "%s: Virtual address causing last page fault or bus error : 0x%x\n", __func__ , reg_page_ft_addr); | ||
44 | break; | ||
45 | case 0x2: | ||
46 | printk(KERN_INFO "%s: AR multi-hit fault\n", __func__); | ||
47 | break; | ||
48 | case 0x4: | ||
49 | printk(KERN_INFO "%s: AW multi-hit fault\n", __func__); | ||
50 | break; | ||
51 | case 0x8: | ||
52 | printk(KERN_INFO "%s: Bus error\n", __func__); | ||
53 | break; | ||
54 | case 0x10: | ||
55 | printk(KERN_INFO "%s: AR Security protection fault\n", __func__); | ||
56 | break; | ||
57 | case 0x20: | ||
58 | printk(KERN_INFO "%s: AR Access protection fault\n", __func__); | ||
59 | break; | ||
60 | case 0x40: | ||
61 | printk(KERN_INFO "%s: AW Security protection fault\n", __func__); | ||
62 | break; | ||
63 | case 0x80: | ||
64 | printk(KERN_INFO "%s: AW Access protection fault\n", __func__); | ||
65 | break; | ||
66 | } | ||
67 | } | ||
68 | |||
69 | static irqreturn_t s5p_sysmmu_irq(int irq, void *dev_id) | ||
70 | { | ||
71 | unsigned int i; | ||
72 | unsigned int reg_int_status; | ||
73 | struct sysmmu_controller *sysmmuconp; | ||
74 | |||
75 | for (i = 0; i < S5P_SYSMMU_TOTAL_IPNUM; i++) { | ||
76 | sysmmuconp = &s5p_sysmmu_cntlrs[i]; | ||
77 | |||
78 | if (sysmmuconp->enable == true) { | ||
79 | reg_int_status = __raw_readl(sysmmuconp->regs + S5P_INT_STATUS); | ||
80 | |||
81 | if (reg_int_status & 0xFF) | ||
82 | s5p_sysmmu_register(sysmmuconp); | ||
83 | } | ||
84 | } | ||
85 | return IRQ_HANDLED; | ||
86 | } | ||
87 | |||
88 | int s5p_sysmmu_set_tablebase_pgd(sysmmu_ips ips, unsigned long pgd) | ||
89 | { | ||
90 | struct sysmmu_controller *sysmmuconp = NULL; | ||
91 | |||
92 | sysmmuconp = &s5p_sysmmu_cntlrs[ips]; | ||
93 | |||
94 | if (sysmmuconp == NULL) { | ||
95 | printk(KERN_ERR "failed to get ip's sysmmu info\n"); | ||
96 | return 1; | ||
97 | } | ||
98 | |||
99 | /* Set sysmmu page table base address */ | ||
100 | __raw_writel(pgd, sysmmuconp->regs + S5P_PT_BASE_ADDR); | ||
101 | |||
102 | if (s5p_sysmmu_tlb_invalidate(ips) != 0) | ||
103 | printk(KERN_ERR "failed s5p_sysmmu_tlb_invalidate\n"); | ||
104 | |||
105 | return 0; | ||
106 | } | ||
107 | |||
108 | static int s5p_sysmmu_set_tablebase(sysmmu_ips ips) | ||
109 | { | ||
110 | unsigned int pg; | ||
111 | struct sysmmu_controller *sysmmuconp; | ||
112 | |||
113 | sysmmuconp = &s5p_sysmmu_cntlrs[ips]; | ||
114 | |||
115 | if (sysmmuconp == NULL) { | ||
116 | printk(KERN_ERR "failed to get ip's sysmmu info\n"); | ||
117 | return 1; | ||
118 | } | ||
119 | |||
120 | __asm__("mrc p15, 0, %0, c2, c0, 0" \ | ||
121 | : "=r" (pg) : : "cc"); \ | ||
122 | pg &= ~0x3fff; | ||
123 | |||
124 | printk(KERN_INFO "%s: CP15 TTBR0 : 0x%x\n", __func__, pg); | ||
125 | |||
126 | /* Set sysmmu page table base address */ | ||
127 | __raw_writel(pg, sysmmuconp->regs + S5P_PT_BASE_ADDR); | ||
128 | |||
129 | return 0; | ||
130 | } | ||
131 | |||
132 | int s5p_sysmmu_enable(sysmmu_ips ips) | ||
133 | { | ||
134 | unsigned int reg; | ||
135 | |||
136 | struct sysmmu_controller *sysmmuconp; | ||
137 | |||
138 | sysmmuconp = &s5p_sysmmu_cntlrs[ips]; | ||
139 | |||
140 | if (sysmmuconp == NULL) { | ||
141 | printk(KERN_ERR "failed to get ip's sysmmu info\n"); | ||
142 | return 1; | ||
143 | } | ||
144 | |||
145 | s5p_sysmmu_set_tablebase(ips); | ||
146 | |||
147 | /* replacement policy : LRU */ | ||
148 | reg = __raw_readl(sysmmuconp->regs + S5P_MMU_CFG); | ||
149 | reg |= 0x1; | ||
150 | __raw_writel(reg, sysmmuconp->regs + S5P_MMU_CFG); | ||
151 | |||
152 | /* Enable interrupt, Enable MMU */ | ||
153 | reg = __raw_readl(sysmmuconp->regs + S5P_MMU_CTRL); | ||
154 | reg |= (0x1 << 2) | (0x1 << 0); | ||
155 | |||
156 | __raw_writel(reg, sysmmuconp->regs + S5P_MMU_CTRL); | ||
157 | |||
158 | sysmmuconp->enable = true; | ||
159 | |||
160 | return 0; | ||
161 | } | ||
162 | |||
163 | int s5p_sysmmu_disable(sysmmu_ips ips) | ||
164 | { | ||
165 | unsigned int reg; | ||
166 | |||
167 | struct sysmmu_controller *sysmmuconp = NULL; | ||
168 | |||
169 | if (ips > S5P_SYSMMU_TOTAL_IPNUM) | ||
170 | printk(KERN_ERR "failed to get ips parameter\n"); | ||
171 | |||
172 | sysmmuconp = &s5p_sysmmu_cntlrs[ips]; | ||
173 | |||
174 | if (sysmmuconp == NULL) { | ||
175 | printk(KERN_ERR "failed to get ip's sysmmu info\n"); | ||
176 | return 1; | ||
177 | } | ||
178 | |||
179 | reg = __raw_readl(sysmmuconp->regs + S5P_MMU_CFG); | ||
180 | |||
181 | /* replacement policy : LRU */ | ||
182 | reg |= 0x1; | ||
183 | __raw_writel(reg, sysmmuconp->regs + S5P_MMU_CFG); | ||
184 | |||
185 | reg = __raw_readl(sysmmuconp->regs + S5P_MMU_CTRL); | ||
186 | |||
187 | /* Disable MMU */ | ||
188 | reg &= ~0x1; | ||
189 | __raw_writel(reg, sysmmuconp->regs + S5P_MMU_CTRL); | ||
190 | |||
191 | sysmmuconp->enable = false; | ||
192 | |||
193 | return 0; | ||
194 | } | ||
195 | |||
196 | int s5p_sysmmu_tlb_invalidate(sysmmu_ips ips) | ||
197 | { | ||
198 | unsigned int reg; | ||
199 | struct sysmmu_controller *sysmmuconp = NULL; | ||
200 | |||
201 | sysmmuconp = &s5p_sysmmu_cntlrs[ips]; | ||
202 | |||
203 | if (sysmmuconp == NULL) { | ||
204 | printk(KERN_ERR "failed to get ip's sysmmu info\n"); | ||
205 | return 1; | ||
206 | } | ||
207 | |||
208 | /* set Block MMU for flush TLB */ | ||
209 | reg = __raw_readl(sysmmuconp->regs + S5P_MMU_CTRL); | ||
210 | reg |= 0x1 << 1; | ||
211 | __raw_writel(reg, sysmmuconp->regs + S5P_MMU_CTRL); | ||
212 | |||
213 | /* flush all TLB entry */ | ||
214 | __raw_writel(0x1, sysmmuconp->regs + S5P_MMU_FLUSH); | ||
215 | |||
216 | /* set Un-block MMU after flush TLB */ | ||
217 | reg = __raw_readl(sysmmuconp->regs + S5P_MMU_CTRL); | ||
218 | reg &= ~(0x1 << 1); | ||
219 | __raw_writel(reg, sysmmuconp->regs + S5P_MMU_CTRL); | ||
220 | |||
221 | return 0; | ||
222 | } | ||
223 | |||
224 | static int s5p_sysmmu_probe(struct platform_device *pdev) | ||
225 | { | ||
226 | int i; | ||
227 | int ret; | ||
228 | struct resource *res; | ||
229 | struct sysmmu_controller *sysmmuconp; | ||
230 | sysmmu_ips ips; | ||
231 | |||
232 | for (i = 0; i < S5P_SYSMMU_TOTAL_IPNUM; i++) { | ||
233 | sysmmuconp = &s5p_sysmmu_cntlrs[i]; | ||
234 | if (sysmmuconp == NULL) { | ||
235 | printk(KERN_ERR "failed to get ip's sysmmu info\n"); | ||
236 | ret = -ENOENT; | ||
237 | goto err_res; | ||
238 | } | ||
239 | |||
240 | sysmmuconp->name = sysmmu_ips_name[i]; | ||
241 | |||
242 | res = platform_get_resource(pdev, IORESOURCE_MEM, i); | ||
243 | if (!res) { | ||
244 | printk(KERN_ERR "failed to get sysmmu resource\n"); | ||
245 | ret = -ENODEV; | ||
246 | goto err_res; | ||
247 | } | ||
248 | |||
249 | sysmmuconp->mem = request_mem_region(res->start, | ||
250 | ((res->end) - (res->start)) + 1, pdev->name); | ||
251 | if (!sysmmuconp->mem) { | ||
252 | pr_err("failed to request sysmmu memory region\n"); | ||
253 | ret = -EBUSY; | ||
254 | goto err_res; | ||
255 | } | ||
256 | |||
257 | sysmmuconp->regs = ioremap(res->start, res->end - res->start + 1); | ||
258 | if (!sysmmuconp->regs) { | ||
259 | pr_err("failed to sysmmu ioremap\n"); | ||
260 | ret = -ENXIO; | ||
261 | goto err_reg; | ||
262 | } | ||
263 | |||
264 | sysmmuconp->irq = platform_get_irq(pdev, i); | ||
265 | if (sysmmuconp->irq <= 0) { | ||
266 | pr_err("failed to get sysmmu irq resource\n"); | ||
267 | ret = -ENOENT; | ||
268 | goto err_map; | ||
269 | } | ||
270 | |||
271 | ret = request_irq(sysmmuconp->irq, s5p_sysmmu_irq, IRQF_DISABLED, pdev->name, sysmmuconp); | ||
272 | if (ret) { | ||
273 | pr_err("failed to request irq\n"); | ||
274 | ret = -ENOENT; | ||
275 | goto err_map; | ||
276 | } | ||
277 | |||
278 | ips = (sysmmu_ips)i; | ||
279 | |||
280 | sysmmuconp->ips = ips; | ||
281 | } | ||
282 | |||
283 | return 0; | ||
284 | |||
285 | err_reg: | ||
286 | release_mem_region((resource_size_t)sysmmuconp->mem, (resource_size_t)((res->end) - (res->start) + 1)); | ||
287 | err_map: | ||
288 | iounmap(sysmmuconp->regs); | ||
289 | err_res: | ||
290 | return ret; | ||
291 | } | ||
292 | |||
293 | static int s5p_sysmmu_remove(struct platform_device *pdev) | ||
294 | { | ||
295 | return 0; | ||
296 | } | ||
297 | int s5p_sysmmu_runtime_suspend(struct device *dev) | ||
298 | { | ||
299 | return 0; | ||
300 | } | ||
301 | |||
302 | int s5p_sysmmu_runtime_resume(struct device *dev) | ||
303 | { | ||
304 | return 0; | ||
305 | } | ||
306 | |||
307 | const struct dev_pm_ops s5p_sysmmu_pm_ops = { | ||
308 | .runtime_suspend = s5p_sysmmu_runtime_suspend, | ||
309 | .runtime_resume = s5p_sysmmu_runtime_resume, | ||
310 | }; | ||
311 | |||
312 | static struct platform_driver s5p_sysmmu_driver = { | ||
313 | .probe = s5p_sysmmu_probe, | ||
314 | .remove = s5p_sysmmu_remove, | ||
315 | .driver = { | ||
316 | .owner = THIS_MODULE, | ||
317 | .name = "s5p-sysmmu", | ||
318 | .pm = &s5p_sysmmu_pm_ops, | ||
319 | } | ||
320 | }; | ||
321 | |||
322 | static int __init s5p_sysmmu_init(void) | ||
323 | { | ||
324 | return platform_driver_register(&s5p_sysmmu_driver); | ||
325 | } | ||
326 | arch_initcall(s5p_sysmmu_init); | ||
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig index dcd6eff4ee5..32be05cf82a 100644 --- a/arch/arm/plat-samsung/Kconfig +++ b/arch/arm/plat-samsung/Kconfig | |||
@@ -95,6 +95,12 @@ config S3C_GPIO_PULL_UPDOWN | |||
95 | help | 95 | help |
96 | Internal configuration to enable the correct GPIO pull helper | 96 | Internal configuration to enable the correct GPIO pull helper |
97 | 97 | ||
98 | config S3C_GPIO_PULL_S3C2443 | ||
99 | bool | ||
100 | select S3C_GPIO_PULL_UPDOWN | ||
101 | help | ||
102 | Internal configuration to enable the correct GPIO pull helper for S3C2443-style GPIO | ||
103 | |||
98 | config S3C_GPIO_PULL_DOWN | 104 | config S3C_GPIO_PULL_DOWN |
99 | bool | 105 | bool |
100 | help | 106 | help |
@@ -333,4 +339,12 @@ config SAMSUNG_WAKEMASK | |||
333 | and above. This code allows a set of interrupt to wakeup-mask | 339 | and above. This code allows a set of interrupt to wakeup-mask |
334 | mappings. See <plat/wakeup-mask.h> | 340 | mappings. See <plat/wakeup-mask.h> |
335 | 341 | ||
342 | comment "Power Domain" | ||
343 | |||
344 | config SAMSUNG_PD | ||
345 | bool "Samsung Power Domain" | ||
346 | depends on PM_RUNTIME | ||
347 | help | ||
348 | Say Y here if you want to control Power Domain by Runtime PM. | ||
349 | |||
336 | endif | 350 | endif |
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile index 19d8a16c306..29932f88a8d 100644 --- a/arch/arm/plat-samsung/Makefile +++ b/arch/arm/plat-samsung/Makefile | |||
@@ -74,6 +74,10 @@ obj-$(CONFIG_SAMSUNG_PM_CHECK) += pm-check.o | |||
74 | 74 | ||
75 | obj-$(CONFIG_SAMSUNG_WAKEMASK) += wakeup-mask.o | 75 | obj-$(CONFIG_SAMSUNG_WAKEMASK) += wakeup-mask.o |
76 | 76 | ||
77 | # PD support | ||
78 | |||
79 | obj-$(CONFIG_SAMSUNG_PD) += pd.o | ||
80 | |||
77 | # PWM support | 81 | # PWM support |
78 | 82 | ||
79 | obj-$(CONFIG_HAVE_PWM) += pwm.o | 83 | obj-$(CONFIG_HAVE_PWM) += pwm.o |
diff --git a/arch/arm/plat-samsung/clock.c b/arch/arm/plat-samsung/clock.c index e8d20b0bc50..772892826ff 100644 --- a/arch/arm/plat-samsung/clock.c +++ b/arch/arm/plat-samsung/clock.c | |||
@@ -39,6 +39,9 @@ | |||
39 | #include <linux/clk.h> | 39 | #include <linux/clk.h> |
40 | #include <linux/spinlock.h> | 40 | #include <linux/spinlock.h> |
41 | #include <linux/io.h> | 41 | #include <linux/io.h> |
42 | #if defined(CONFIG_DEBUG_FS) | ||
43 | #include <linux/debugfs.h> | ||
44 | #endif | ||
42 | 45 | ||
43 | #include <mach/hardware.h> | 46 | #include <mach/hardware.h> |
44 | #include <asm/irq.h> | 47 | #include <asm/irq.h> |
@@ -447,3 +450,92 @@ int __init s3c24xx_register_baseclocks(unsigned long xtal) | |||
447 | return 0; | 450 | return 0; |
448 | } | 451 | } |
449 | 452 | ||
453 | #if defined(CONFIG_PM_DEBUG) && defined(CONFIG_DEBUG_FS) | ||
454 | /* debugfs support to trace clock tree hierarchy and attributes */ | ||
455 | |||
456 | static struct dentry *clk_debugfs_root; | ||
457 | |||
458 | static int clk_debugfs_register_one(struct clk *c) | ||
459 | { | ||
460 | int err; | ||
461 | struct dentry *d, *child, *child_tmp; | ||
462 | struct clk *pa = c->parent; | ||
463 | char s[255]; | ||
464 | char *p = s; | ||
465 | |||
466 | p += sprintf(p, "%s", c->name); | ||
467 | |||
468 | if (c->id >= 0) | ||
469 | sprintf(p, ":%d", c->id); | ||
470 | |||
471 | d = debugfs_create_dir(s, pa ? pa->dent : clk_debugfs_root); | ||
472 | if (!d) | ||
473 | return -ENOMEM; | ||
474 | |||
475 | c->dent = d; | ||
476 | |||
477 | d = debugfs_create_u8("usecount", S_IRUGO, c->dent, (u8 *)&c->usage); | ||
478 | if (!d) { | ||
479 | err = -ENOMEM; | ||
480 | goto err_out; | ||
481 | } | ||
482 | |||
483 | d = debugfs_create_u32("rate", S_IRUGO, c->dent, (u32 *)&c->rate); | ||
484 | if (!d) { | ||
485 | err = -ENOMEM; | ||
486 | goto err_out; | ||
487 | } | ||
488 | return 0; | ||
489 | |||
490 | err_out: | ||
491 | d = c->dent; | ||
492 | list_for_each_entry_safe(child, child_tmp, &d->d_subdirs, d_u.d_child) | ||
493 | debugfs_remove(child); | ||
494 | debugfs_remove(c->dent); | ||
495 | return err; | ||
496 | } | ||
497 | |||
498 | static int clk_debugfs_register(struct clk *c) | ||
499 | { | ||
500 | int err; | ||
501 | struct clk *pa = c->parent; | ||
502 | |||
503 | if (pa && !pa->dent) { | ||
504 | err = clk_debugfs_register(pa); | ||
505 | if (err) | ||
506 | return err; | ||
507 | } | ||
508 | |||
509 | if (!c->dent) { | ||
510 | err = clk_debugfs_register_one(c); | ||
511 | if (err) | ||
512 | return err; | ||
513 | } | ||
514 | return 0; | ||
515 | } | ||
516 | |||
517 | static int __init clk_debugfs_init(void) | ||
518 | { | ||
519 | struct clk *c; | ||
520 | struct dentry *d; | ||
521 | int err; | ||
522 | |||
523 | d = debugfs_create_dir("clock", NULL); | ||
524 | if (!d) | ||
525 | return -ENOMEM; | ||
526 | clk_debugfs_root = d; | ||
527 | |||
528 | list_for_each_entry(c, &clocks, list) { | ||
529 | err = clk_debugfs_register(c); | ||
530 | if (err) | ||
531 | goto err_out; | ||
532 | } | ||
533 | return 0; | ||
534 | |||
535 | err_out: | ||
536 | debugfs_remove_recursive(clk_debugfs_root); | ||
537 | return err; | ||
538 | } | ||
539 | late_initcall(clk_debugfs_init); | ||
540 | |||
541 | #endif /* defined(CONFIG_PM_DEBUG) && defined(CONFIG_DEBUG_FS) */ | ||
diff --git a/arch/arm/plat-samsung/dev-nand.c b/arch/arm/plat-samsung/dev-nand.c index 3a7b8891ba4..6927ae8fd11 100644 --- a/arch/arm/plat-samsung/dev-nand.c +++ b/arch/arm/plat-samsung/dev-nand.c | |||
@@ -126,5 +126,3 @@ void __init s3c_nand_set_platdata(struct s3c2410_platform_nand *nand) | |||
126 | 126 | ||
127 | s3c_device_nand.dev.platform_data = npd; | 127 | s3c_device_nand.dev.platform_data = npd; |
128 | } | 128 | } |
129 | |||
130 | EXPORT_SYMBOL_GPL(s3c_nand_set_platdata); | ||
diff --git a/arch/arm/plat-samsung/gpio-config.c b/arch/arm/plat-samsung/gpio-config.c index 0aa32f242ee..1c0b0401594 100644 --- a/arch/arm/plat-samsung/gpio-config.c +++ b/arch/arm/plat-samsung/gpio-config.c | |||
@@ -278,6 +278,48 @@ s3c_gpio_pull_t s3c_gpio_getpull_updown(struct s3c_gpio_chip *chip, | |||
278 | pup &= 0x3; | 278 | pup &= 0x3; |
279 | return (__force s3c_gpio_pull_t)pup; | 279 | return (__force s3c_gpio_pull_t)pup; |
280 | } | 280 | } |
281 | |||
282 | #ifdef CONFIG_S3C_GPIO_PULL_S3C2443 | ||
283 | int s3c_gpio_setpull_s3c2443(struct s3c_gpio_chip *chip, | ||
284 | unsigned int off, s3c_gpio_pull_t pull) | ||
285 | { | ||
286 | switch (pull) { | ||
287 | case S3C_GPIO_PULL_NONE: | ||
288 | pull = 0x01; | ||
289 | break; | ||
290 | case S3C_GPIO_PULL_UP: | ||
291 | pull = 0x00; | ||
292 | break; | ||
293 | case S3C_GPIO_PULL_DOWN: | ||
294 | pull = 0x02; | ||
295 | break; | ||
296 | } | ||
297 | return s3c_gpio_setpull_updown(chip, off, pull); | ||
298 | } | ||
299 | |||
300 | s3c_gpio_pull_t s3c_gpio_getpull_s3c2443(struct s3c_gpio_chip *chip, | ||
301 | unsigned int off) | ||
302 | { | ||
303 | s3c_gpio_pull_t pull; | ||
304 | |||
305 | pull = s3c_gpio_getpull_updown(chip, off); | ||
306 | |||
307 | switch (pull) { | ||
308 | case 0x00: | ||
309 | pull = S3C_GPIO_PULL_UP; | ||
310 | break; | ||
311 | case 0x01: | ||
312 | case 0x03: | ||
313 | pull = S3C_GPIO_PULL_NONE; | ||
314 | break; | ||
315 | case 0x02: | ||
316 | pull = S3C_GPIO_PULL_DOWN; | ||
317 | break; | ||
318 | } | ||
319 | |||
320 | return pull; | ||
321 | } | ||
322 | #endif | ||
281 | #endif | 323 | #endif |
282 | 324 | ||
283 | #if defined(CONFIG_S3C_GPIO_PULL_UP) || defined(CONFIG_S3C_GPIO_PULL_DOWN) | 325 | #if defined(CONFIG_S3C_GPIO_PULL_UP) || defined(CONFIG_S3C_GPIO_PULL_DOWN) |
diff --git a/arch/arm/plat-samsung/gpiolib.c b/arch/arm/plat-samsung/gpiolib.c index c354089254f..ea37c046178 100644 --- a/arch/arm/plat-samsung/gpiolib.c +++ b/arch/arm/plat-samsung/gpiolib.c | |||
@@ -197,3 +197,10 @@ void __init samsung_gpiolib_add_4bit2_chips(struct s3c_gpio_chip *chip, | |||
197 | s3c_gpiolib_add(chip); | 197 | s3c_gpiolib_add(chip); |
198 | } | 198 | } |
199 | } | 199 | } |
200 | |||
201 | void __init samsung_gpiolib_add_2bit_chips(struct s3c_gpio_chip *chip, | ||
202 | int nr_chips) | ||
203 | { | ||
204 | for (; nr_chips > 0; nr_chips--, chip++) | ||
205 | s3c_gpiolib_add(chip); | ||
206 | } | ||
diff --git a/arch/arm/plat-samsung/include/plat/clock.h b/arch/arm/plat-samsung/include/plat/clock.h index 0fbcd0effd8..9a82b887491 100644 --- a/arch/arm/plat-samsung/include/plat/clock.h +++ b/arch/arm/plat-samsung/include/plat/clock.h | |||
@@ -47,6 +47,9 @@ struct clk { | |||
47 | 47 | ||
48 | struct clk_ops *ops; | 48 | struct clk_ops *ops; |
49 | int (*enable)(struct clk *, int enable); | 49 | int (*enable)(struct clk *, int enable); |
50 | #if defined(CONFIG_PM_DEBUG) && defined(CONFIG_DEBUG_FS) | ||
51 | struct dentry *dent; /* For visible tree hierarchy */ | ||
52 | #endif | ||
50 | }; | 53 | }; |
51 | 54 | ||
52 | /* other clocks which may be registered by board support */ | 55 | /* other clocks which may be registered by board support */ |
diff --git a/arch/arm/plat-samsung/include/plat/devs.h b/arch/arm/plat-samsung/include/plat/devs.h index e9e3b6e3ec7..b4d208b4295 100644 --- a/arch/arm/plat-samsung/include/plat/devs.h +++ b/arch/arm/plat-samsung/include/plat/devs.h | |||
@@ -104,6 +104,7 @@ extern struct platform_device s5pv310_device_i2s0; | |||
104 | extern struct platform_device s5pv310_device_i2s1; | 104 | extern struct platform_device s5pv310_device_i2s1; |
105 | extern struct platform_device s5pv310_device_i2s2; | 105 | extern struct platform_device s5pv310_device_i2s2; |
106 | extern struct platform_device s5pv310_device_spdif; | 106 | extern struct platform_device s5pv310_device_spdif; |
107 | extern struct platform_device s5pv310_device_pd[]; | ||
107 | 108 | ||
108 | extern struct platform_device s5p6442_device_pcm0; | 109 | extern struct platform_device s5p6442_device_pcm0; |
109 | extern struct platform_device s5p6442_device_pcm1; | 110 | extern struct platform_device s5p6442_device_pcm1; |
@@ -115,6 +116,8 @@ extern struct platform_device s5p6440_device_pcm; | |||
115 | extern struct platform_device s5p6440_device_iis; | 116 | extern struct platform_device s5p6440_device_iis; |
116 | 117 | ||
117 | extern struct platform_device s5p6450_device_iis0; | 118 | extern struct platform_device s5p6450_device_iis0; |
119 | extern struct platform_device s5p6450_device_iis1; | ||
120 | extern struct platform_device s5p6450_device_iis2; | ||
118 | extern struct platform_device s5p6450_device_pcm0; | 121 | extern struct platform_device s5p6450_device_pcm0; |
119 | 122 | ||
120 | extern struct platform_device s5pc100_device_ac97; | 123 | extern struct platform_device s5pc100_device_ac97; |
@@ -131,6 +134,11 @@ extern struct platform_device s5p_device_fimc0; | |||
131 | extern struct platform_device s5p_device_fimc1; | 134 | extern struct platform_device s5p_device_fimc1; |
132 | extern struct platform_device s5p_device_fimc2; | 135 | extern struct platform_device s5p_device_fimc2; |
133 | 136 | ||
137 | extern struct platform_device s5p_device_mipi_csis0; | ||
138 | extern struct platform_device s5p_device_mipi_csis1; | ||
139 | |||
140 | extern struct platform_device s5pv310_device_sysmmu; | ||
141 | |||
134 | /* s3c2440 specific devices */ | 142 | /* s3c2440 specific devices */ |
135 | 143 | ||
136 | #ifdef CONFIG_CPU_S3C2440 | 144 | #ifdef CONFIG_CPU_S3C2440 |
diff --git a/arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h b/arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h index 0d2c5703f1e..5603db0b79b 100644 --- a/arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h +++ b/arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h | |||
@@ -244,7 +244,7 @@ extern int s3c_gpio_setpull_s3c2443(struct s3c_gpio_chip *chip, | |||
244 | * This helper function reads the state of the pull-{up,down} resistor for the | 244 | * This helper function reads the state of the pull-{up,down} resistor for the |
245 | * given GPIO in the same case as s3c_gpio_setpull_upown. | 245 | * given GPIO in the same case as s3c_gpio_setpull_upown. |
246 | */ | 246 | */ |
247 | extern s3c_gpio_pull_t s3c_gpio_getpull_s3c24xx(struct s3c_gpio_chip *chip, | 247 | extern s3c_gpio_pull_t s3c_gpio_getpull_s3c2443(struct s3c_gpio_chip *chip, |
248 | unsigned int off); | 248 | unsigned int off); |
249 | 249 | ||
250 | #endif /* __PLAT_GPIO_CFG_HELPERS_H */ | 250 | #endif /* __PLAT_GPIO_CFG_HELPERS_H */ |
diff --git a/arch/arm/plat-samsung/include/plat/gpio-core.h b/arch/arm/plat-samsung/include/plat/gpio-core.h index 13a22b8861e..dac35d0a711 100644 --- a/arch/arm/plat-samsung/include/plat/gpio-core.h +++ b/arch/arm/plat-samsung/include/plat/gpio-core.h | |||
@@ -118,6 +118,8 @@ extern void samsung_gpiolib_add_4bit_chips(struct s3c_gpio_chip *chip, | |||
118 | int nr_chips); | 118 | int nr_chips); |
119 | extern void samsung_gpiolib_add_4bit2_chips(struct s3c_gpio_chip *chip, | 119 | extern void samsung_gpiolib_add_4bit2_chips(struct s3c_gpio_chip *chip, |
120 | int nr_chips); | 120 | int nr_chips); |
121 | extern void samsung_gpiolib_add_2bit_chips(struct s3c_gpio_chip *chip, | ||
122 | int nr_chips); | ||
121 | 123 | ||
122 | extern void samsung_gpiolib_add_4bit(struct s3c_gpio_chip *chip); | 124 | extern void samsung_gpiolib_add_4bit(struct s3c_gpio_chip *chip); |
123 | extern void samsung_gpiolib_add_4bit2(struct s3c_gpio_chip *chip); | 125 | extern void samsung_gpiolib_add_4bit2(struct s3c_gpio_chip *chip); |
diff --git a/arch/arm/plat-samsung/include/plat/pd.h b/arch/arm/plat-samsung/include/plat/pd.h new file mode 100644 index 00000000000..5f0ad85783d --- /dev/null +++ b/arch/arm/plat-samsung/include/plat/pd.h | |||
@@ -0,0 +1,30 @@ | |||
1 | /* linux/arch/arm/plat-samsung/include/plat/pd.h | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com | ||
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_PLAT_SAMSUNG_PD_H | ||
12 | #define __ASM_PLAT_SAMSUNG_PD_H __FILE__ | ||
13 | |||
14 | struct samsung_pd_info { | ||
15 | int (*enable)(struct device *dev); | ||
16 | int (*disable)(struct device *dev); | ||
17 | void __iomem *base; | ||
18 | }; | ||
19 | |||
20 | enum s5pv310_pd_block { | ||
21 | PD_MFC, | ||
22 | PD_G3D, | ||
23 | PD_LCD0, | ||
24 | PD_LCD1, | ||
25 | PD_TV, | ||
26 | PD_CAM, | ||
27 | PD_GPS | ||
28 | }; | ||
29 | |||
30 | #endif /* __ASM_PLAT_SAMSUNG_PD_H */ | ||
diff --git a/arch/arm/plat-samsung/include/plat/pm.h b/arch/arm/plat-samsung/include/plat/pm.h index 245836d9193..30518cc9a67 100644 --- a/arch/arm/plat-samsung/include/plat/pm.h +++ b/arch/arm/plat-samsung/include/plat/pm.h | |||
@@ -15,6 +15,10 @@ | |||
15 | * management | 15 | * management |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/irq.h> | ||
19 | |||
20 | struct sys_device; | ||
21 | |||
18 | #ifdef CONFIG_PM | 22 | #ifdef CONFIG_PM |
19 | 23 | ||
20 | extern __init int s3c_pm_init(void); | 24 | extern __init int s3c_pm_init(void); |
@@ -100,7 +104,7 @@ extern void s3c_pm_do_restore(struct sleep_save *ptr, int count); | |||
100 | extern void s3c_pm_do_restore_core(struct sleep_save *ptr, int count); | 104 | extern void s3c_pm_do_restore_core(struct sleep_save *ptr, int count); |
101 | 105 | ||
102 | #ifdef CONFIG_PM | 106 | #ifdef CONFIG_PM |
103 | extern int s3c_irqext_wake(unsigned int irqno, unsigned int state); | 107 | extern int s3c_irqext_wake(struct irq_data *data, unsigned int state); |
104 | extern int s3c24xx_irq_suspend(struct sys_device *dev, pm_message_t state); | 108 | extern int s3c24xx_irq_suspend(struct sys_device *dev, pm_message_t state); |
105 | extern int s3c24xx_irq_resume(struct sys_device *dev); | 109 | extern int s3c24xx_irq_resume(struct sys_device *dev); |
106 | #else | 110 | #else |
diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h b/arch/arm/plat-samsung/include/plat/sdhci.h index 85853f8c4c5..5a41a0b69ee 100644 --- a/arch/arm/plat-samsung/include/plat/sdhci.h +++ b/arch/arm/plat-samsung/include/plat/sdhci.h | |||
@@ -107,6 +107,8 @@ extern struct s3c_sdhci_platdata s3c_hsmmc3_def_platdata; | |||
107 | 107 | ||
108 | /* Helper function availablity */ | 108 | /* Helper function availablity */ |
109 | 109 | ||
110 | extern void s3c2416_setup_sdhci0_cfg_gpio(struct platform_device *, int w); | ||
111 | extern void s3c2416_setup_sdhci1_cfg_gpio(struct platform_device *, int w); | ||
110 | extern void s3c64xx_setup_sdhci0_cfg_gpio(struct platform_device *, int w); | 112 | extern void s3c64xx_setup_sdhci0_cfg_gpio(struct platform_device *, int w); |
111 | extern void s3c64xx_setup_sdhci1_cfg_gpio(struct platform_device *, int w); | 113 | extern void s3c64xx_setup_sdhci1_cfg_gpio(struct platform_device *, int w); |
112 | extern void s5pc100_setup_sdhci0_cfg_gpio(struct platform_device *, int w); | 114 | extern void s5pc100_setup_sdhci0_cfg_gpio(struct platform_device *, int w); |
@@ -122,6 +124,39 @@ extern void s5pv310_setup_sdhci1_cfg_gpio(struct platform_device *, int w); | |||
122 | extern void s5pv310_setup_sdhci2_cfg_gpio(struct platform_device *, int w); | 124 | extern void s5pv310_setup_sdhci2_cfg_gpio(struct platform_device *, int w); |
123 | extern void s5pv310_setup_sdhci3_cfg_gpio(struct platform_device *, int w); | 125 | extern void s5pv310_setup_sdhci3_cfg_gpio(struct platform_device *, int w); |
124 | 126 | ||
127 | /* S3C2416 SDHCI setup */ | ||
128 | |||
129 | #ifdef CONFIG_S3C2416_SETUP_SDHCI | ||
130 | extern char *s3c2416_hsmmc_clksrcs[4]; | ||
131 | |||
132 | extern void s3c2416_setup_sdhci_cfg_card(struct platform_device *dev, | ||
133 | void __iomem *r, | ||
134 | struct mmc_ios *ios, | ||
135 | struct mmc_card *card); | ||
136 | |||
137 | static inline void s3c2416_default_sdhci0(void) | ||
138 | { | ||
139 | #ifdef CONFIG_S3C_DEV_HSMMC | ||
140 | s3c_hsmmc0_def_platdata.clocks = s3c2416_hsmmc_clksrcs; | ||
141 | s3c_hsmmc0_def_platdata.cfg_gpio = s3c2416_setup_sdhci0_cfg_gpio; | ||
142 | s3c_hsmmc0_def_platdata.cfg_card = s3c2416_setup_sdhci_cfg_card; | ||
143 | #endif /* CONFIG_S3C_DEV_HSMMC */ | ||
144 | } | ||
145 | |||
146 | static inline void s3c2416_default_sdhci1(void) | ||
147 | { | ||
148 | #ifdef CONFIG_S3C_DEV_HSMMC1 | ||
149 | s3c_hsmmc1_def_platdata.clocks = s3c2416_hsmmc_clksrcs; | ||
150 | s3c_hsmmc1_def_platdata.cfg_gpio = s3c2416_setup_sdhci1_cfg_gpio; | ||
151 | s3c_hsmmc1_def_platdata.cfg_card = s3c2416_setup_sdhci_cfg_card; | ||
152 | #endif /* CONFIG_S3C_DEV_HSMMC1 */ | ||
153 | } | ||
154 | |||
155 | #else | ||
156 | static inline void s3c2416_default_sdhci0(void) { } | ||
157 | static inline void s3c2416_default_sdhci1(void) { } | ||
158 | |||
159 | #endif /* CONFIG_S3C2416_SETUP_SDHCI */ | ||
125 | /* S3C64XX SDHCI setup */ | 160 | /* S3C64XX SDHCI setup */ |
126 | 161 | ||
127 | #ifdef CONFIG_S3C64XX_SETUP_SDHCI | 162 | #ifdef CONFIG_S3C64XX_SETUP_SDHCI |
diff --git a/arch/arm/plat-samsung/irq-uart.c b/arch/arm/plat-samsung/irq-uart.c index 4f8c102674a..4e770355ccb 100644 --- a/arch/arm/plat-samsung/irq-uart.c +++ b/arch/arm/plat-samsung/irq-uart.c | |||
@@ -28,9 +28,9 @@ | |||
28 | * are consecutive when looking up the interrupt in the demux routines. | 28 | * are consecutive when looking up the interrupt in the demux routines. |
29 | */ | 29 | */ |
30 | 30 | ||
31 | static inline void __iomem *s3c_irq_uart_base(unsigned int irq) | 31 | static inline void __iomem *s3c_irq_uart_base(struct irq_data *data) |
32 | { | 32 | { |
33 | struct s3c_uart_irq *uirq = get_irq_chip_data(irq); | 33 | struct s3c_uart_irq *uirq = irq_data_get_irq_chip_data(data); |
34 | return uirq->regs; | 34 | return uirq->regs; |
35 | } | 35 | } |
36 | 36 | ||
@@ -39,10 +39,10 @@ static inline unsigned int s3c_irq_uart_bit(unsigned int irq) | |||
39 | return irq & 3; | 39 | return irq & 3; |
40 | } | 40 | } |
41 | 41 | ||
42 | static void s3c_irq_uart_mask(unsigned int irq) | 42 | static void s3c_irq_uart_mask(struct irq_data *data) |
43 | { | 43 | { |
44 | void __iomem *regs = s3c_irq_uart_base(irq); | 44 | void __iomem *regs = s3c_irq_uart_base(data); |
45 | unsigned int bit = s3c_irq_uart_bit(irq); | 45 | unsigned int bit = s3c_irq_uart_bit(data->irq); |
46 | u32 reg; | 46 | u32 reg; |
47 | 47 | ||
48 | reg = __raw_readl(regs + S3C64XX_UINTM); | 48 | reg = __raw_readl(regs + S3C64XX_UINTM); |
@@ -50,10 +50,10 @@ static void s3c_irq_uart_mask(unsigned int irq) | |||
50 | __raw_writel(reg, regs + S3C64XX_UINTM); | 50 | __raw_writel(reg, regs + S3C64XX_UINTM); |
51 | } | 51 | } |
52 | 52 | ||
53 | static void s3c_irq_uart_maskack(unsigned int irq) | 53 | static void s3c_irq_uart_maskack(struct irq_data *data) |
54 | { | 54 | { |
55 | void __iomem *regs = s3c_irq_uart_base(irq); | 55 | void __iomem *regs = s3c_irq_uart_base(data); |
56 | unsigned int bit = s3c_irq_uart_bit(irq); | 56 | unsigned int bit = s3c_irq_uart_bit(data->irq); |
57 | u32 reg; | 57 | u32 reg; |
58 | 58 | ||
59 | reg = __raw_readl(regs + S3C64XX_UINTM); | 59 | reg = __raw_readl(regs + S3C64XX_UINTM); |
@@ -62,10 +62,10 @@ static void s3c_irq_uart_maskack(unsigned int irq) | |||
62 | __raw_writel(1 << bit, regs + S3C64XX_UINTP); | 62 | __raw_writel(1 << bit, regs + S3C64XX_UINTP); |
63 | } | 63 | } |
64 | 64 | ||
65 | static void s3c_irq_uart_unmask(unsigned int irq) | 65 | static void s3c_irq_uart_unmask(struct irq_data *data) |
66 | { | 66 | { |
67 | void __iomem *regs = s3c_irq_uart_base(irq); | 67 | void __iomem *regs = s3c_irq_uart_base(data); |
68 | unsigned int bit = s3c_irq_uart_bit(irq); | 68 | unsigned int bit = s3c_irq_uart_bit(data->irq); |
69 | u32 reg; | 69 | u32 reg; |
70 | 70 | ||
71 | reg = __raw_readl(regs + S3C64XX_UINTM); | 71 | reg = __raw_readl(regs + S3C64XX_UINTM); |
@@ -73,17 +73,17 @@ static void s3c_irq_uart_unmask(unsigned int irq) | |||
73 | __raw_writel(reg, regs + S3C64XX_UINTM); | 73 | __raw_writel(reg, regs + S3C64XX_UINTM); |
74 | } | 74 | } |
75 | 75 | ||
76 | static void s3c_irq_uart_ack(unsigned int irq) | 76 | static void s3c_irq_uart_ack(struct irq_data *data) |
77 | { | 77 | { |
78 | void __iomem *regs = s3c_irq_uart_base(irq); | 78 | void __iomem *regs = s3c_irq_uart_base(data); |
79 | unsigned int bit = s3c_irq_uart_bit(irq); | 79 | unsigned int bit = s3c_irq_uart_bit(data->irq); |
80 | 80 | ||
81 | __raw_writel(1 << bit, regs + S3C64XX_UINTP); | 81 | __raw_writel(1 << bit, regs + S3C64XX_UINTP); |
82 | } | 82 | } |
83 | 83 | ||
84 | static void s3c_irq_demux_uart(unsigned int irq, struct irq_desc *desc) | 84 | static void s3c_irq_demux_uart(unsigned int irq, struct irq_desc *desc) |
85 | { | 85 | { |
86 | struct s3c_uart_irq *uirq = desc->handler_data; | 86 | struct s3c_uart_irq *uirq = desc->irq_data.handler_data; |
87 | u32 pend = __raw_readl(uirq->regs + S3C64XX_UINTP); | 87 | u32 pend = __raw_readl(uirq->regs + S3C64XX_UINTP); |
88 | int base = uirq->base_irq; | 88 | int base = uirq->base_irq; |
89 | 89 | ||
@@ -99,10 +99,10 @@ static void s3c_irq_demux_uart(unsigned int irq, struct irq_desc *desc) | |||
99 | 99 | ||
100 | static struct irq_chip s3c_irq_uart = { | 100 | static struct irq_chip s3c_irq_uart = { |
101 | .name = "s3c-uart", | 101 | .name = "s3c-uart", |
102 | .mask = s3c_irq_uart_mask, | 102 | .irq_mask = s3c_irq_uart_mask, |
103 | .unmask = s3c_irq_uart_unmask, | 103 | .irq_unmask = s3c_irq_uart_unmask, |
104 | .mask_ack = s3c_irq_uart_maskack, | 104 | .irq_mask_ack = s3c_irq_uart_maskack, |
105 | .ack = s3c_irq_uart_ack, | 105 | .irq_ack = s3c_irq_uart_ack, |
106 | }; | 106 | }; |
107 | 107 | ||
108 | static void __init s3c_init_uart_irq(struct s3c_uart_irq *uirq) | 108 | static void __init s3c_init_uart_irq(struct s3c_uart_irq *uirq) |
@@ -124,7 +124,7 @@ static void __init s3c_init_uart_irq(struct s3c_uart_irq *uirq) | |||
124 | set_irq_flags(irq, IRQF_VALID); | 124 | set_irq_flags(irq, IRQF_VALID); |
125 | } | 125 | } |
126 | 126 | ||
127 | desc->handler_data = uirq; | 127 | desc->irq_data.handler_data = uirq; |
128 | set_irq_chained_handler(uirq->parent_irq, s3c_irq_demux_uart); | 128 | set_irq_chained_handler(uirq->parent_irq, s3c_irq_demux_uart); |
129 | } | 129 | } |
130 | 130 | ||
diff --git a/arch/arm/plat-samsung/irq-vic-timer.c b/arch/arm/plat-samsung/irq-vic-timer.c index 0270519fcab..dd8692ae5c4 100644 --- a/arch/arm/plat-samsung/irq-vic-timer.c +++ b/arch/arm/plat-samsung/irq-vic-timer.c | |||
@@ -24,43 +24,46 @@ | |||
24 | 24 | ||
25 | static void s3c_irq_demux_vic_timer(unsigned int irq, struct irq_desc *desc) | 25 | static void s3c_irq_demux_vic_timer(unsigned int irq, struct irq_desc *desc) |
26 | { | 26 | { |
27 | generic_handle_irq((int)desc->handler_data); | 27 | generic_handle_irq((int)desc->irq_data.handler_data); |
28 | } | 28 | } |
29 | 29 | ||
30 | /* We assume the IRQ_TIMER0..IRQ_TIMER4 range is continuous. */ | 30 | /* We assume the IRQ_TIMER0..IRQ_TIMER4 range is continuous. */ |
31 | 31 | ||
32 | static void s3c_irq_timer_mask(unsigned int irq) | 32 | static void s3c_irq_timer_mask(struct irq_data *data) |
33 | { | 33 | { |
34 | u32 reg = __raw_readl(S3C64XX_TINT_CSTAT); | 34 | u32 reg = __raw_readl(S3C64XX_TINT_CSTAT); |
35 | u32 mask = (u32)data->chip_data; | ||
35 | 36 | ||
36 | reg &= 0x1f; /* mask out pending interrupts */ | 37 | reg &= 0x1f; /* mask out pending interrupts */ |
37 | reg &= ~(1 << (irq - IRQ_TIMER0)); | 38 | reg &= ~mask; |
38 | __raw_writel(reg, S3C64XX_TINT_CSTAT); | 39 | __raw_writel(reg, S3C64XX_TINT_CSTAT); |
39 | } | 40 | } |
40 | 41 | ||
41 | static void s3c_irq_timer_unmask(unsigned int irq) | 42 | static void s3c_irq_timer_unmask(struct irq_data *data) |
42 | { | 43 | { |
43 | u32 reg = __raw_readl(S3C64XX_TINT_CSTAT); | 44 | u32 reg = __raw_readl(S3C64XX_TINT_CSTAT); |
45 | u32 mask = (u32)data->chip_data; | ||
44 | 46 | ||
45 | reg &= 0x1f; /* mask out pending interrupts */ | 47 | reg &= 0x1f; /* mask out pending interrupts */ |
46 | reg |= 1 << (irq - IRQ_TIMER0); | 48 | reg |= mask; |
47 | __raw_writel(reg, S3C64XX_TINT_CSTAT); | 49 | __raw_writel(reg, S3C64XX_TINT_CSTAT); |
48 | } | 50 | } |
49 | 51 | ||
50 | static void s3c_irq_timer_ack(unsigned int irq) | 52 | static void s3c_irq_timer_ack(struct irq_data *data) |
51 | { | 53 | { |
52 | u32 reg = __raw_readl(S3C64XX_TINT_CSTAT); | 54 | u32 reg = __raw_readl(S3C64XX_TINT_CSTAT); |
55 | u32 mask = (u32)data->chip_data; | ||
53 | 56 | ||
54 | reg &= 0x1f; | 57 | reg &= 0x1f; |
55 | reg |= (1 << 5) << (irq - IRQ_TIMER0); | 58 | reg |= mask << 5; |
56 | __raw_writel(reg, S3C64XX_TINT_CSTAT); | 59 | __raw_writel(reg, S3C64XX_TINT_CSTAT); |
57 | } | 60 | } |
58 | 61 | ||
59 | static struct irq_chip s3c_irq_timer = { | 62 | static struct irq_chip s3c_irq_timer = { |
60 | .name = "s3c-timer", | 63 | .name = "s3c-timer", |
61 | .mask = s3c_irq_timer_mask, | 64 | .irq_mask = s3c_irq_timer_mask, |
62 | .unmask = s3c_irq_timer_unmask, | 65 | .irq_unmask = s3c_irq_timer_unmask, |
63 | .ack = s3c_irq_timer_ack, | 66 | .irq_ack = s3c_irq_timer_ack, |
64 | }; | 67 | }; |
65 | 68 | ||
66 | /** | 69 | /** |
@@ -79,8 +82,9 @@ void __init s3c_init_vic_timer_irq(unsigned int parent_irq, | |||
79 | set_irq_chained_handler(parent_irq, s3c_irq_demux_vic_timer); | 82 | set_irq_chained_handler(parent_irq, s3c_irq_demux_vic_timer); |
80 | 83 | ||
81 | set_irq_chip(timer_irq, &s3c_irq_timer); | 84 | set_irq_chip(timer_irq, &s3c_irq_timer); |
85 | set_irq_chip_data(timer_irq, (void *)(1 << (timer_irq - IRQ_TIMER0))); | ||
82 | set_irq_handler(timer_irq, handle_level_irq); | 86 | set_irq_handler(timer_irq, handle_level_irq); |
83 | set_irq_flags(timer_irq, IRQF_VALID); | 87 | set_irq_flags(timer_irq, IRQF_VALID); |
84 | 88 | ||
85 | desc->handler_data = (void *)timer_irq; | 89 | desc->irq_data.handler_data = (void *)timer_irq; |
86 | } | 90 | } |
diff --git a/arch/arm/plat-samsung/pd.c b/arch/arm/plat-samsung/pd.c new file mode 100644 index 00000000000..efe1d564473 --- /dev/null +++ b/arch/arm/plat-samsung/pd.c | |||
@@ -0,0 +1,95 @@ | |||
1 | /* linux/arch/arm/plat-samsung/pd.c | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com | ||
5 | * | ||
6 | * Samsung Power domain support | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include <linux/init.h> | ||
14 | #include <linux/module.h> | ||
15 | #include <linux/platform_device.h> | ||
16 | #include <linux/err.h> | ||
17 | #include <linux/pm_runtime.h> | ||
18 | |||
19 | #include <plat/pd.h> | ||
20 | |||
21 | static int samsung_pd_probe(struct platform_device *pdev) | ||
22 | { | ||
23 | struct samsung_pd_info *pdata = pdev->dev.platform_data; | ||
24 | struct device *dev = &pdev->dev; | ||
25 | |||
26 | if (!pdata) { | ||
27 | dev_err(dev, "no device data specified\n"); | ||
28 | return -ENOENT; | ||
29 | } | ||
30 | |||
31 | pm_runtime_set_active(dev); | ||
32 | pm_runtime_enable(dev); | ||
33 | |||
34 | dev_info(dev, "power domain registered\n"); | ||
35 | return 0; | ||
36 | } | ||
37 | |||
38 | static int __devexit samsung_pd_remove(struct platform_device *pdev) | ||
39 | { | ||
40 | struct device *dev = &pdev->dev; | ||
41 | |||
42 | pm_runtime_disable(dev); | ||
43 | return 0; | ||
44 | } | ||
45 | |||
46 | static int samsung_pd_runtime_suspend(struct device *dev) | ||
47 | { | ||
48 | struct samsung_pd_info *pdata = dev->platform_data; | ||
49 | int ret = 0; | ||
50 | |||
51 | if (pdata->disable) | ||
52 | ret = pdata->disable(dev); | ||
53 | |||
54 | dev_dbg(dev, "suspended\n"); | ||
55 | return ret; | ||
56 | } | ||
57 | |||
58 | static int samsung_pd_runtime_resume(struct device *dev) | ||
59 | { | ||
60 | struct samsung_pd_info *pdata = dev->platform_data; | ||
61 | int ret = 0; | ||
62 | |||
63 | if (pdata->enable) | ||
64 | ret = pdata->enable(dev); | ||
65 | |||
66 | dev_dbg(dev, "resumed\n"); | ||
67 | return ret; | ||
68 | } | ||
69 | |||
70 | static const struct dev_pm_ops samsung_pd_pm_ops = { | ||
71 | .runtime_suspend = samsung_pd_runtime_suspend, | ||
72 | .runtime_resume = samsung_pd_runtime_resume, | ||
73 | }; | ||
74 | |||
75 | static struct platform_driver samsung_pd_driver = { | ||
76 | .driver = { | ||
77 | .name = "samsung-pd", | ||
78 | .owner = THIS_MODULE, | ||
79 | .pm = &samsung_pd_pm_ops, | ||
80 | }, | ||
81 | .probe = samsung_pd_probe, | ||
82 | .remove = __devexit_p(samsung_pd_remove), | ||
83 | }; | ||
84 | |||
85 | static int __init samsung_pd_init(void) | ||
86 | { | ||
87 | int ret; | ||
88 | |||
89 | ret = platform_driver_register(&samsung_pd_driver); | ||
90 | if (ret) | ||
91 | printk(KERN_ERR "%s: failed to add PD driver\n", __func__); | ||
92 | |||
93 | return ret; | ||
94 | } | ||
95 | arch_initcall(samsung_pd_init); | ||
diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/plat-samsung/pm.c index 5bf3f2f09e7..02d531fb3f8 100644 --- a/arch/arm/plat-samsung/pm.c +++ b/arch/arm/plat-samsung/pm.c | |||
@@ -136,15 +136,15 @@ static void s3c_pm_restore_uarts(void) { } | |||
136 | unsigned long s3c_irqwake_intmask = 0xffffffffL; | 136 | unsigned long s3c_irqwake_intmask = 0xffffffffL; |
137 | unsigned long s3c_irqwake_eintmask = 0xffffffffL; | 137 | unsigned long s3c_irqwake_eintmask = 0xffffffffL; |
138 | 138 | ||
139 | int s3c_irqext_wake(unsigned int irqno, unsigned int state) | 139 | int s3c_irqext_wake(struct irq_data *data, unsigned int state) |
140 | { | 140 | { |
141 | unsigned long bit = 1L << IRQ_EINT_BIT(irqno); | 141 | unsigned long bit = 1L << IRQ_EINT_BIT(data->irq); |
142 | 142 | ||
143 | if (!(s3c_irqwake_eintallow & bit)) | 143 | if (!(s3c_irqwake_eintallow & bit)) |
144 | return -ENOENT; | 144 | return -ENOENT; |
145 | 145 | ||
146 | printk(KERN_INFO "wake %s for irq %d\n", | 146 | printk(KERN_INFO "wake %s for irq %d\n", |
147 | state ? "enabled" : "disabled", irqno); | 147 | state ? "enabled" : "disabled", data->irq); |
148 | 148 | ||
149 | if (!state) | 149 | if (!state) |
150 | s3c_irqwake_eintmask |= bit; | 150 | s3c_irqwake_eintmask |= bit; |
diff --git a/arch/arm/plat-spear/shirq.c b/arch/arm/plat-spear/shirq.c index 2172d6946ae..78189035e7f 100644 --- a/arch/arm/plat-spear/shirq.c +++ b/arch/arm/plat-spear/shirq.c | |||
@@ -20,10 +20,10 @@ | |||
20 | struct spear_shirq *shirq; | 20 | struct spear_shirq *shirq; |
21 | static DEFINE_SPINLOCK(lock); | 21 | static DEFINE_SPINLOCK(lock); |
22 | 22 | ||
23 | static void shirq_irq_mask(unsigned irq) | 23 | static void shirq_irq_mask(struct irq_data *d) |
24 | { | 24 | { |
25 | struct spear_shirq *shirq = get_irq_chip_data(irq); | 25 | struct spear_shirq *shirq = irq_data_get_irq_chip_data(d); |
26 | u32 val, id = irq - shirq->dev_config[0].virq; | 26 | u32 val, id = d->irq - shirq->dev_config[0].virq; |
27 | unsigned long flags; | 27 | unsigned long flags; |
28 | 28 | ||
29 | if ((shirq->regs.enb_reg == -1) || shirq->dev_config[id].enb_mask == -1) | 29 | if ((shirq->regs.enb_reg == -1) || shirq->dev_config[id].enb_mask == -1) |
@@ -39,10 +39,10 @@ static void shirq_irq_mask(unsigned irq) | |||
39 | spin_unlock_irqrestore(&lock, flags); | 39 | spin_unlock_irqrestore(&lock, flags); |
40 | } | 40 | } |
41 | 41 | ||
42 | static void shirq_irq_unmask(unsigned irq) | 42 | static void shirq_irq_unmask(struct irq_data *d) |
43 | { | 43 | { |
44 | struct spear_shirq *shirq = get_irq_chip_data(irq); | 44 | struct spear_shirq *shirq = irq_data_get_irq_chip_data(d); |
45 | u32 val, id = irq - shirq->dev_config[0].virq; | 45 | u32 val, id = d->irq - shirq->dev_config[0].virq; |
46 | unsigned long flags; | 46 | unsigned long flags; |
47 | 47 | ||
48 | if ((shirq->regs.enb_reg == -1) || shirq->dev_config[id].enb_mask == -1) | 48 | if ((shirq->regs.enb_reg == -1) || shirq->dev_config[id].enb_mask == -1) |
@@ -60,9 +60,9 @@ static void shirq_irq_unmask(unsigned irq) | |||
60 | 60 | ||
61 | static struct irq_chip shirq_chip = { | 61 | static struct irq_chip shirq_chip = { |
62 | .name = "spear_shirq", | 62 | .name = "spear_shirq", |
63 | .ack = shirq_irq_mask, | 63 | .irq_ack = shirq_irq_mask, |
64 | .mask = shirq_irq_mask, | 64 | .irq_mask = shirq_irq_mask, |
65 | .unmask = shirq_irq_unmask, | 65 | .irq_unmask = shirq_irq_unmask, |
66 | }; | 66 | }; |
67 | 67 | ||
68 | static void shirq_handler(unsigned irq, struct irq_desc *desc) | 68 | static void shirq_handler(unsigned irq, struct irq_desc *desc) |
@@ -70,7 +70,7 @@ static void shirq_handler(unsigned irq, struct irq_desc *desc) | |||
70 | u32 i, val, mask; | 70 | u32 i, val, mask; |
71 | struct spear_shirq *shirq = get_irq_data(irq); | 71 | struct spear_shirq *shirq = get_irq_data(irq); |
72 | 72 | ||
73 | desc->chip->ack(irq); | 73 | desc->irq_data.chip->irq_ack(&desc->irq_data); |
74 | while ((val = readl(shirq->regs.base + shirq->regs.status_reg) & | 74 | while ((val = readl(shirq->regs.base + shirq->regs.status_reg) & |
75 | shirq->regs.status_reg_mask)) { | 75 | shirq->regs.status_reg_mask)) { |
76 | for (i = 0; (i < shirq->dev_count) && val; i++) { | 76 | for (i = 0; (i < shirq->dev_count) && val; i++) { |
@@ -92,7 +92,7 @@ static void shirq_handler(unsigned irq, struct irq_desc *desc) | |||
92 | writel(mask, shirq->regs.base + shirq->regs.clear_reg); | 92 | writel(mask, shirq->regs.base + shirq->regs.clear_reg); |
93 | } | 93 | } |
94 | } | 94 | } |
95 | desc->chip->unmask(irq); | 95 | desc->irq_data.chip->irq_unmask(&desc->irq_data); |
96 | } | 96 | } |
97 | 97 | ||
98 | int spear_shirq_register(struct spear_shirq *shirq) | 98 | int spear_shirq_register(struct spear_shirq *shirq) |
diff --git a/arch/arm/plat-stmp3xxx/irq.c b/arch/arm/plat-stmp3xxx/irq.c index 20de4e0401e..aaa168683d4 100644 --- a/arch/arm/plat-stmp3xxx/irq.c +++ b/arch/arm/plat-stmp3xxx/irq.c | |||
@@ -34,7 +34,7 @@ void __init stmp3xxx_init_irq(struct irq_chip *chip) | |||
34 | 34 | ||
35 | /* Disable all interrupts initially */ | 35 | /* Disable all interrupts initially */ |
36 | for (i = 0; i < NR_REAL_IRQS; i++) { | 36 | for (i = 0; i < NR_REAL_IRQS; i++) { |
37 | chip->mask(i); | 37 | chip->irq_mask(irq_get_irq_data(i)); |
38 | set_irq_chip(i, chip); | 38 | set_irq_chip(i, chip); |
39 | set_irq_handler(i, handle_level_irq); | 39 | set_irq_handler(i, handle_level_irq); |
40 | set_irq_flags(i, IRQF_VALID | IRQF_PROBE); | 40 | set_irq_flags(i, IRQF_VALID | IRQF_PROBE); |
diff --git a/arch/arm/plat-stmp3xxx/pinmux.c b/arch/arm/plat-stmp3xxx/pinmux.c index 6d6b1a468ed..66d5bac3ace 100644 --- a/arch/arm/plat-stmp3xxx/pinmux.c +++ b/arch/arm/plat-stmp3xxx/pinmux.c | |||
@@ -351,27 +351,27 @@ void stmp3xxx_release_pin_group(struct pin_group *pin_group, const char *label) | |||
351 | } | 351 | } |
352 | EXPORT_SYMBOL(stmp3xxx_release_pin_group); | 352 | EXPORT_SYMBOL(stmp3xxx_release_pin_group); |
353 | 353 | ||
354 | static int stmp3xxx_irq_to_gpio(int irq, | 354 | static int stmp3xxx_irq_data_to_gpio(struct irq_data *d, |
355 | struct stmp3xxx_pinmux_bank **bank, unsigned *gpio) | 355 | struct stmp3xxx_pinmux_bank **bank, unsigned *gpio) |
356 | { | 356 | { |
357 | struct stmp3xxx_pinmux_bank *pm; | 357 | struct stmp3xxx_pinmux_bank *pm; |
358 | 358 | ||
359 | for (pm = pinmux_banks; pm < pinmux_banks + NR_BANKS; pm++) | 359 | for (pm = pinmux_banks; pm < pinmux_banks + NR_BANKS; pm++) |
360 | if (pm->virq <= irq && irq < pm->virq + 32) { | 360 | if (pm->virq <= d->irq && d->irq < pm->virq + 32) { |
361 | *bank = pm; | 361 | *bank = pm; |
362 | *gpio = irq - pm->virq; | 362 | *gpio = d->irq - pm->virq; |
363 | return 0; | 363 | return 0; |
364 | } | 364 | } |
365 | return -ENOENT; | 365 | return -ENOENT; |
366 | } | 366 | } |
367 | 367 | ||
368 | static int stmp3xxx_set_irqtype(unsigned irq, unsigned type) | 368 | static int stmp3xxx_set_irqtype(struct irq_data *d, unsigned type) |
369 | { | 369 | { |
370 | struct stmp3xxx_pinmux_bank *pm; | 370 | struct stmp3xxx_pinmux_bank *pm; |
371 | unsigned gpio; | 371 | unsigned gpio; |
372 | int l, p; | 372 | int l, p; |
373 | 373 | ||
374 | stmp3xxx_irq_to_gpio(irq, &pm, &gpio); | 374 | stmp3xxx_irq_data_to_gpio(d, &pm, &gpio); |
375 | switch (type) { | 375 | switch (type) { |
376 | case IRQ_TYPE_EDGE_RISING: | 376 | case IRQ_TYPE_EDGE_RISING: |
377 | l = 0; p = 1; break; | 377 | l = 0; p = 1; break; |
@@ -398,33 +398,33 @@ static int stmp3xxx_set_irqtype(unsigned irq, unsigned type) | |||
398 | return 0; | 398 | return 0; |
399 | } | 399 | } |
400 | 400 | ||
401 | static void stmp3xxx_pin_ack_irq(unsigned irq) | 401 | static void stmp3xxx_pin_ack_irq(struct irq_data *d) |
402 | { | 402 | { |
403 | u32 stat; | 403 | u32 stat; |
404 | struct stmp3xxx_pinmux_bank *pm; | 404 | struct stmp3xxx_pinmux_bank *pm; |
405 | unsigned gpio; | 405 | unsigned gpio; |
406 | 406 | ||
407 | stmp3xxx_irq_to_gpio(irq, &pm, &gpio); | 407 | stmp3xxx_irq_data_to_gpio(d, &pm, &gpio); |
408 | stat = __raw_readl(pm->irqstat) & (1 << gpio); | 408 | stat = __raw_readl(pm->irqstat) & (1 << gpio); |
409 | stmp3xxx_clearl(stat, pm->irqstat); | 409 | stmp3xxx_clearl(stat, pm->irqstat); |
410 | } | 410 | } |
411 | 411 | ||
412 | static void stmp3xxx_pin_mask_irq(unsigned irq) | 412 | static void stmp3xxx_pin_mask_irq(struct irq_data *d) |
413 | { | 413 | { |
414 | struct stmp3xxx_pinmux_bank *pm; | 414 | struct stmp3xxx_pinmux_bank *pm; |
415 | unsigned gpio; | 415 | unsigned gpio; |
416 | 416 | ||
417 | stmp3xxx_irq_to_gpio(irq, &pm, &gpio); | 417 | stmp3xxx_irq_data_to_gpio(d, &pm, &gpio); |
418 | stmp3xxx_clearl(1 << gpio, pm->irqen); | 418 | stmp3xxx_clearl(1 << gpio, pm->irqen); |
419 | stmp3xxx_clearl(1 << gpio, pm->pin2irq); | 419 | stmp3xxx_clearl(1 << gpio, pm->pin2irq); |
420 | } | 420 | } |
421 | 421 | ||
422 | static void stmp3xxx_pin_unmask_irq(unsigned irq) | 422 | static void stmp3xxx_pin_unmask_irq(struct irq_data *d) |
423 | { | 423 | { |
424 | struct stmp3xxx_pinmux_bank *pm; | 424 | struct stmp3xxx_pinmux_bank *pm; |
425 | unsigned gpio; | 425 | unsigned gpio; |
426 | 426 | ||
427 | stmp3xxx_irq_to_gpio(irq, &pm, &gpio); | 427 | stmp3xxx_irq_data_to_gpio(d, &pm, &gpio); |
428 | stmp3xxx_setl(1 << gpio, pm->irqen); | 428 | stmp3xxx_setl(1 << gpio, pm->irqen); |
429 | stmp3xxx_setl(1 << gpio, pm->pin2irq); | 429 | stmp3xxx_setl(1 << gpio, pm->pin2irq); |
430 | } | 430 | } |
@@ -503,10 +503,10 @@ static void stmp3xxx_gpio_irq(u32 irq, struct irq_desc *desc) | |||
503 | } | 503 | } |
504 | 504 | ||
505 | static struct irq_chip gpio_irq_chip = { | 505 | static struct irq_chip gpio_irq_chip = { |
506 | .ack = stmp3xxx_pin_ack_irq, | 506 | .irq_ack = stmp3xxx_pin_ack_irq, |
507 | .mask = stmp3xxx_pin_mask_irq, | 507 | .irq_mask = stmp3xxx_pin_mask_irq, |
508 | .unmask = stmp3xxx_pin_unmask_irq, | 508 | .irq_unmask = stmp3xxx_pin_unmask_irq, |
509 | .set_type = stmp3xxx_set_irqtype, | 509 | .irq_set_type = stmp3xxx_set_irqtype, |
510 | }; | 510 | }; |
511 | 511 | ||
512 | int __init stmp3xxx_pinmux_init(int virtual_irq_start) | 512 | int __init stmp3xxx_pinmux_init(int virtual_irq_start) |
@@ -533,7 +533,7 @@ int __init stmp3xxx_pinmux_init(int virtual_irq_start) | |||
533 | pm->virq = virtual_irq_start + b * 32; | 533 | pm->virq = virtual_irq_start + b * 32; |
534 | 534 | ||
535 | for (virq = pm->virq; virq < pm->virq; virq++) { | 535 | for (virq = pm->virq; virq < pm->virq; virq++) { |
536 | gpio_irq_chip.mask(virq); | 536 | gpio_irq_chip.irq_mask(irq_get_irq_data(virq)); |
537 | set_irq_chip(virq, &gpio_irq_chip); | 537 | set_irq_chip(virq, &gpio_irq_chip); |
538 | set_irq_handler(virq, handle_level_irq); | 538 | set_irq_handler(virq, handle_level_irq); |
539 | set_irq_flags(virq, IRQF_VALID); | 539 | set_irq_flags(virq, IRQF_VALID); |
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types index 2fea897ebeb..9d6feaabbe7 100644 --- a/arch/arm/tools/mach-types +++ b/arch/arm/tools/mach-types | |||
@@ -12,7 +12,7 @@ | |||
12 | # | 12 | # |
13 | # http://www.arm.linux.org.uk/developer/machines/?action=new | 13 | # http://www.arm.linux.org.uk/developer/machines/?action=new |
14 | # | 14 | # |
15 | # Last update: Sun Dec 12 23:24:27 2010 | 15 | # Last update: Mon Feb 7 08:59:27 2011 |
16 | # | 16 | # |
17 | # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number | 17 | # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number |
18 | # | 18 | # |
@@ -2240,7 +2240,7 @@ arm_ultimator2 MACH_ARM_ULTIMATOR2 ARM_ULTIMATOR2 2250 | |||
2240 | vs_v210 MACH_VS_V210 VS_V210 2252 | 2240 | vs_v210 MACH_VS_V210 VS_V210 2252 |
2241 | vs_v212 MACH_VS_V212 VS_V212 2253 | 2241 | vs_v212 MACH_VS_V212 VS_V212 2253 |
2242 | hmt MACH_HMT HMT 2254 | 2242 | hmt MACH_HMT HMT 2254 |
2243 | suen3 MACH_SUEN3 SUEN3 2255 | 2243 | km_kirkwood MACH_KM_KIRKWOOD KM_KIRKWOOD 2255 |
2244 | vesper MACH_VESPER VESPER 2256 | 2244 | vesper MACH_VESPER VESPER 2256 |
2245 | str9 MACH_STR9 STR9 2257 | 2245 | str9 MACH_STR9 STR9 2257 |
2246 | omap3_wl_ff MACH_OMAP3_WL_FF OMAP3_WL_FF 2258 | 2246 | omap3_wl_ff MACH_OMAP3_WL_FF OMAP3_WL_FF 2258 |
@@ -2987,7 +2987,7 @@ pxwnas_500_1000 MACH_PXWNAS_500_1000 PXWNAS_500_1000 3001 | |||
2987 | ea20 MACH_EA20 EA20 3002 | 2987 | ea20 MACH_EA20 EA20 3002 |
2988 | awm2 MACH_AWM2 AWM2 3003 | 2988 | awm2 MACH_AWM2 AWM2 3003 |
2989 | ti8148evm MACH_TI8148EVM TI8148EVM 3004 | 2989 | ti8148evm MACH_TI8148EVM TI8148EVM 3004 |
2990 | tegra_seaboard MACH_TEGRA_SEABOARD TEGRA_SEABOARD 3005 | 2990 | seaboard MACH_SEABOARD SEABOARD 3005 |
2991 | linkstation_chlv2 MACH_LINKSTATION_CHLV2 LINKSTATION_CHLV2 3006 | 2991 | linkstation_chlv2 MACH_LINKSTATION_CHLV2 LINKSTATION_CHLV2 3006 |
2992 | tera_pro2_rack MACH_TERA_PRO2_RACK TERA_PRO2_RACK 3007 | 2992 | tera_pro2_rack MACH_TERA_PRO2_RACK TERA_PRO2_RACK 3007 |
2993 | rubys MACH_RUBYS RUBYS 3008 | 2993 | rubys MACH_RUBYS RUBYS 3008 |
@@ -3190,7 +3190,7 @@ synergy MACH_SYNERGY SYNERGY 3205 | |||
3190 | ics_if_voip MACH_ICS_IF_VOIP ICS_IF_VOIP 3206 | 3190 | ics_if_voip MACH_ICS_IF_VOIP ICS_IF_VOIP 3206 |
3191 | wlf_cragg_6410 MACH_WLF_CRAGG_6410 WLF_CRAGG_6410 3207 | 3191 | wlf_cragg_6410 MACH_WLF_CRAGG_6410 WLF_CRAGG_6410 3207 |
3192 | punica MACH_PUNICA PUNICA 3208 | 3192 | punica MACH_PUNICA PUNICA 3208 |
3193 | sbc_nt250 MACH_SBC_NT250 SBC_NT250 3209 | 3193 | trimslice MACH_TRIMSLICE TRIMSLICE 3209 |
3194 | mx27_wmultra MACH_MX27_WMULTRA MX27_WMULTRA 3210 | 3194 | mx27_wmultra MACH_MX27_WMULTRA MX27_WMULTRA 3210 |
3195 | mackerel MACH_MACKEREL MACKEREL 3211 | 3195 | mackerel MACH_MACKEREL MACKEREL 3211 |
3196 | fa9x27 MACH_FA9X27 FA9X27 3213 | 3196 | fa9x27 MACH_FA9X27 FA9X27 3213 |
@@ -3219,3 +3219,100 @@ pivicc MACH_PIVICC PIVICC 3235 | |||
3219 | pcm048 MACH_PCM048 PCM048 3236 | 3219 | pcm048 MACH_PCM048 PCM048 3236 |
3220 | dds MACH_DDS DDS 3237 | 3220 | dds MACH_DDS DDS 3237 |
3221 | chalten_xa1 MACH_CHALTEN_XA1 CHALTEN_XA1 3238 | 3221 | chalten_xa1 MACH_CHALTEN_XA1 CHALTEN_XA1 3238 |
3222 | ts48xx MACH_TS48XX TS48XX 3239 | ||
3223 | tonga2_tfttimer MACH_TONGA2_TFTTIMER TONGA2_TFTTIMER 3240 | ||
3224 | whistler MACH_WHISTLER WHISTLER 3241 | ||
3225 | asl_phoenix MACH_ASL_PHOENIX ASL_PHOENIX 3242 | ||
3226 | at91sam9263otlite MACH_AT91SAM9263OTLITE AT91SAM9263OTLITE 3243 | ||
3227 | ddplug MACH_DDPLUG DDPLUG 3244 | ||
3228 | d2plug MACH_D2PLUG D2PLUG 3245 | ||
3229 | kzm9d MACH_KZM9D KZM9D 3246 | ||
3230 | verdi_lte MACH_VERDI_LTE VERDI_LTE 3247 | ||
3231 | nanozoom MACH_NANOZOOM NANOZOOM 3248 | ||
3232 | dm3730_som_lv MACH_DM3730_SOM_LV DM3730_SOM_LV 3249 | ||
3233 | dm3730_torpedo MACH_DM3730_TORPEDO DM3730_TORPEDO 3250 | ||
3234 | anchovy MACH_ANCHOVY ANCHOVY 3251 | ||
3235 | re2rev20 MACH_RE2REV20 RE2REV20 3253 | ||
3236 | re2rev21 MACH_RE2REV21 RE2REV21 3254 | ||
3237 | cns21xx MACH_CNS21XX CNS21XX 3255 | ||
3238 | rider MACH_RIDER RIDER 3257 | ||
3239 | nsk330 MACH_NSK330 NSK330 3258 | ||
3240 | cns2133evb MACH_CNS2133EVB CNS2133EVB 3259 | ||
3241 | z3_816x_mod MACH_Z3_816X_MOD Z3_816X_MOD 3260 | ||
3242 | z3_814x_mod MACH_Z3_814X_MOD Z3_814X_MOD 3261 | ||
3243 | beect MACH_BEECT BEECT 3262 | ||
3244 | dma_thunderbug MACH_DMA_THUNDERBUG DMA_THUNDERBUG 3263 | ||
3245 | omn_at91sam9g20 MACH_OMN_AT91SAM9G20 OMN_AT91SAM9G20 3264 | ||
3246 | mx25_e2s_uc MACH_MX25_E2S_UC MX25_E2S_UC 3265 | ||
3247 | mione MACH_MIONE MIONE 3266 | ||
3248 | top9000_tcu MACH_TOP9000_TCU TOP9000_TCU 3267 | ||
3249 | top9000_bsl MACH_TOP9000_BSL TOP9000_BSL 3268 | ||
3250 | kingdom MACH_KINGDOM KINGDOM 3269 | ||
3251 | armadillo460 MACH_ARMADILLO460 ARMADILLO460 3270 | ||
3252 | lq2 MACH_LQ2 LQ2 3271 | ||
3253 | sweda_tms2 MACH_SWEDA_TMS2 SWEDA_TMS2 3272 | ||
3254 | mx53_loco MACH_MX53_LOCO MX53_LOCO 3273 | ||
3255 | acer_a8 MACH_ACER_A8 ACER_A8 3275 | ||
3256 | acer_gauguin MACH_ACER_GAUGUIN ACER_GAUGUIN 3276 | ||
3257 | guppy MACH_GUPPY GUPPY 3277 | ||
3258 | mx61_ard MACH_MX61_ARD MX61_ARD 3278 | ||
3259 | tx53 MACH_TX53 TX53 3279 | ||
3260 | omapl138_case_a3 MACH_OMAPL138_CASE_A3 OMAPL138_CASE_A3 3280 | ||
3261 | uemd MACH_UEMD UEMD 3281 | ||
3262 | ccwmx51mut MACH_CCWMX51MUT CCWMX51MUT 3282 | ||
3263 | rockhopper MACH_ROCKHOPPER ROCKHOPPER 3283 | ||
3264 | nookcolor MACH_NOOKCOLOR NOOKCOLOR 3284 | ||
3265 | hkdkc100 MACH_HKDKC100 HKDKC100 3285 | ||
3266 | ts42xx MACH_TS42XX TS42XX 3286 | ||
3267 | aebl MACH_AEBL AEBL 3287 | ||
3268 | wario MACH_WARIO WARIO 3288 | ||
3269 | gfs_spm MACH_GFS_SPM GFS_SPM 3289 | ||
3270 | cm_t3730 MACH_CM_T3730 CM_T3730 3290 | ||
3271 | isc3 MACH_ISC3 ISC3 3291 | ||
3272 | rascal MACH_RASCAL RASCAL 3292 | ||
3273 | hrefv60 MACH_HREFV60 HREFV60 3293 | ||
3274 | tpt_2_0 MACH_TPT_2_0 TPT_2_0 3294 | ||
3275 | pyramid_td MACH_PYRAMID_TD PYRAMID_TD 3295 | ||
3276 | splendor MACH_SPLENDOR SPLENDOR 3296 | ||
3277 | guf_planet MACH_GUF_PLANET GUF_PLANET 3297 | ||
3278 | msm8x60_qt MACH_MSM8X60_QT MSM8X60_QT 3298 | ||
3279 | htc_hd_mini MACH_HTC_HD_MINI HTC_HD_MINI 3299 | ||
3280 | athene MACH_ATHENE ATHENE 3300 | ||
3281 | deep_r_ek_1 MACH_DEEP_R_EK_1 DEEP_R_EK_1 3301 | ||
3282 | vivow_ct MACH_VIVOW_CT VIVOW_CT 3302 | ||
3283 | nery_1000 MACH_NERY_1000 NERY_1000 3303 | ||
3284 | rfl109145_ssrv MACH_RFL109145_SSRV RFL109145_SSRV 3304 | ||
3285 | nmh MACH_NMH NMH 3305 | ||
3286 | wn802t MACH_WN802T WN802T 3306 | ||
3287 | dragonet MACH_DRAGONET DRAGONET 3307 | ||
3288 | geneva_b MACH_GENEVA_B GENEVA_B 3308 | ||
3289 | at91sam9263desk16l MACH_AT91SAM9263DESK16L AT91SAM9263DESK16L 3309 | ||
3290 | bcmhana_sv MACH_BCMHANA_SV BCMHANA_SV 3310 | ||
3291 | bcmhana_tablet MACH_BCMHANA_TABLET BCMHANA_TABLET 3311 | ||
3292 | koi MACH_KOI KOI 3312 | ||
3293 | ts4800 MACH_TS4800 TS4800 3313 | ||
3294 | tqma9263 MACH_TQMA9263 TQMA9263 3314 | ||
3295 | holiday MACH_HOLIDAY HOLIDAY 3315 | ||
3296 | dma_6410 MACH_DMA6410 DMA6410 3316 | ||
3297 | pcats_overlay MACH_PCATS_OVERLAY PCATS_OVERLAY 3317 | ||
3298 | hwgw6410 MACH_HWGW6410 HWGW6410 3318 | ||
3299 | shenzhou MACH_SHENZHOU SHENZHOU 3319 | ||
3300 | cwme9210 MACH_CWME9210 CWME9210 3320 | ||
3301 | cwme9210js MACH_CWME9210JS CWME9210JS 3321 | ||
3302 | pgs_v1 MACH_PGS_SITARA PGS_SITARA 3322 | ||
3303 | colibri_tegra2 MACH_COLIBRI_TEGRA2 COLIBRI_TEGRA2 3323 | ||
3304 | w21 MACH_W21 W21 3324 | ||
3305 | polysat1 MACH_POLYSAT1 POLYSAT1 3325 | ||
3306 | dataway MACH_DATAWAY DATAWAY 3326 | ||
3307 | cobral138 MACH_COBRAL138 COBRAL138 3327 | ||
3308 | roverpcs8 MACH_ROVERPCS8 ROVERPCS8 3328 | ||
3309 | marvelc MACH_MARVELC MARVELC 3329 | ||
3310 | navefihid MACH_NAVEFIHID NAVEFIHID 3330 | ||
3311 | dm365_cv100 MACH_DM365_CV100 DM365_CV100 3331 | ||
3312 | able MACH_ABLE ABLE 3332 | ||
3313 | legacy MACH_LEGACY LEGACY 3333 | ||
3314 | icong MACH_ICONG ICONG 3334 | ||
3315 | rover_g8 MACH_ROVER_G8 ROVER_G8 3335 | ||
3316 | t5388p MACH_T5388P T5388P 3336 | ||
3317 | dingo MACH_DINGO DINGO 3337 | ||
3318 | goflexhome MACH_GOFLEXHOME GOFLEXHOME 3338 | ||
diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig index 313b13073c5..cd2062fe0f6 100644 --- a/arch/avr32/Kconfig +++ b/arch/avr32/Kconfig | |||
@@ -1,8 +1,8 @@ | |||
1 | config AVR32 | 1 | config AVR32 |
2 | def_bool y | 2 | def_bool y |
3 | # With EMBEDDED=n, we get lots of stuff automatically selected | 3 | # With EXPERT=n, we get lots of stuff automatically selected |
4 | # that we usually don't need on AVR32. | 4 | # that we usually don't need on AVR32. |
5 | select EMBEDDED | 5 | select EXPERT |
6 | select HAVE_CLK | 6 | select HAVE_CLK |
7 | select HAVE_OPROFILE | 7 | select HAVE_OPROFILE |
8 | select HAVE_KPROBES | 8 | select HAVE_KPROBES |
diff --git a/arch/avr32/boards/atngw100/setup.c b/arch/avr32/boards/atngw100/setup.c index 8c6a2440e34..659d119ce71 100644 --- a/arch/avr32/boards/atngw100/setup.c +++ b/arch/avr32/boards/atngw100/setup.c | |||
@@ -188,7 +188,7 @@ static void __init set_hw_addr(struct platform_device *pdev) | |||
188 | */ | 188 | */ |
189 | regs = (void __iomem __force *)res->start; | 189 | regs = (void __iomem __force *)res->start; |
190 | pclk = clk_get(&pdev->dev, "pclk"); | 190 | pclk = clk_get(&pdev->dev, "pclk"); |
191 | if (!pclk) | 191 | if (IS_ERR(pclk)) |
192 | return; | 192 | return; |
193 | 193 | ||
194 | clk_enable(pclk); | 194 | clk_enable(pclk); |
diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c index 2adc261c9e3..6ce30fb2ec9 100644 --- a/arch/avr32/boards/atstk1000/atstk1002.c +++ b/arch/avr32/boards/atstk1000/atstk1002.c | |||
@@ -203,7 +203,7 @@ static void __init set_hw_addr(struct platform_device *pdev) | |||
203 | */ | 203 | */ |
204 | regs = (void __iomem __force *)res->start; | 204 | regs = (void __iomem __force *)res->start; |
205 | pclk = clk_get(&pdev->dev, "pclk"); | 205 | pclk = clk_get(&pdev->dev, "pclk"); |
206 | if (!pclk) | 206 | if (IS_ERR(pclk)) |
207 | return; | 207 | return; |
208 | 208 | ||
209 | clk_enable(pclk); | 209 | clk_enable(pclk); |
diff --git a/arch/avr32/boards/favr-32/setup.c b/arch/avr32/boards/favr-32/setup.c index 75f19f47fb2..86fab77a5a0 100644 --- a/arch/avr32/boards/favr-32/setup.c +++ b/arch/avr32/boards/favr-32/setup.c | |||
@@ -206,7 +206,7 @@ static void __init set_hw_addr(struct platform_device *pdev) | |||
206 | */ | 206 | */ |
207 | regs = (void __iomem __force *)res->start; | 207 | regs = (void __iomem __force *)res->start; |
208 | pclk = clk_get(&pdev->dev, "pclk"); | 208 | pclk = clk_get(&pdev->dev, "pclk"); |
209 | if (!pclk) | 209 | if (IS_ERR(pclk)) |
210 | return; | 210 | return; |
211 | 211 | ||
212 | clk_enable(pclk); | 212 | clk_enable(pclk); |
diff --git a/arch/avr32/boards/hammerhead/setup.c b/arch/avr32/boards/hammerhead/setup.c index dd009875a40..da14fbdd4e8 100644 --- a/arch/avr32/boards/hammerhead/setup.c +++ b/arch/avr32/boards/hammerhead/setup.c | |||
@@ -150,7 +150,7 @@ static void __init set_hw_addr(struct platform_device *pdev) | |||
150 | regs = (void __iomem __force *)res->start; | 150 | regs = (void __iomem __force *)res->start; |
151 | pclk = clk_get(&pdev->dev, "pclk"); | 151 | pclk = clk_get(&pdev->dev, "pclk"); |
152 | 152 | ||
153 | if (!pclk) | 153 | if (IS_ERR(pclk)) |
154 | return; | 154 | return; |
155 | 155 | ||
156 | clk_enable(pclk); | 156 | clk_enable(pclk); |
diff --git a/arch/avr32/boards/merisc/setup.c b/arch/avr32/boards/merisc/setup.c index 623b077594f..e61bc948f95 100644 --- a/arch/avr32/boards/merisc/setup.c +++ b/arch/avr32/boards/merisc/setup.c | |||
@@ -134,7 +134,7 @@ static void __init set_hw_addr(struct platform_device *pdev) | |||
134 | 134 | ||
135 | regs = (void __iomem __force *)res->start; | 135 | regs = (void __iomem __force *)res->start; |
136 | pclk = clk_get(&pdev->dev, "pclk"); | 136 | pclk = clk_get(&pdev->dev, "pclk"); |
137 | if (!pclk) | 137 | if (IS_ERR(pclk)) |
138 | return; | 138 | return; |
139 | 139 | ||
140 | clk_enable(pclk); | 140 | clk_enable(pclk); |
diff --git a/arch/avr32/boards/mimc200/setup.c b/arch/avr32/boards/mimc200/setup.c index 523d8e183be..c4da5cba2db 100644 --- a/arch/avr32/boards/mimc200/setup.c +++ b/arch/avr32/boards/mimc200/setup.c | |||
@@ -162,7 +162,7 @@ static void __init set_hw_addr(struct platform_device *pdev) | |||
162 | */ | 162 | */ |
163 | regs = (void __iomem __force *)res->start; | 163 | regs = (void __iomem __force *)res->start; |
164 | pclk = clk_get(&pdev->dev, "pclk"); | 164 | pclk = clk_get(&pdev->dev, "pclk"); |
165 | if (!pclk) | 165 | if (IS_ERR(pclk)) |
166 | return; | 166 | return; |
167 | 167 | ||
168 | clk_enable(pclk); | 168 | clk_enable(pclk); |
diff --git a/arch/avr32/configs/atngw100_defconfig b/arch/avr32/configs/atngw100_defconfig index 9854013d272..6f9ca56de1f 100644 --- a/arch/avr32/configs/atngw100_defconfig +++ b/arch/avr32/configs/atngw100_defconfig | |||
@@ -2,20 +2,17 @@ CONFIG_EXPERIMENTAL=y | |||
2 | # CONFIG_LOCALVERSION_AUTO is not set | 2 | # CONFIG_LOCALVERSION_AUTO is not set |
3 | CONFIG_SYSVIPC=y | 3 | CONFIG_SYSVIPC=y |
4 | CONFIG_POSIX_MQUEUE=y | 4 | CONFIG_POSIX_MQUEUE=y |
5 | CONFIG_BSD_PROCESS_ACCT=y | ||
6 | CONFIG_BSD_PROCESS_ACCT_V3=y | ||
7 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
8 | CONFIG_SYSFS_DEPRECATED_V2=y | 6 | CONFIG_RELAY=y |
9 | CONFIG_BLK_DEV_INITRD=y | 7 | CONFIG_BLK_DEV_INITRD=y |
10 | # CONFIG_SYSCTL_SYSCALL is not set | 8 | # CONFIG_SYSCTL_SYSCALL is not set |
11 | # CONFIG_BASE_FULL is not set | 9 | # CONFIG_BASE_FULL is not set |
12 | # CONFIG_COMPAT_BRK is not set | 10 | # CONFIG_COMPAT_BRK is not set |
13 | CONFIG_PROFILING=y | 11 | CONFIG_PROFILING=y |
14 | CONFIG_OPROFILE=m | 12 | CONFIG_OPROFILE=m |
15 | CONFIG_KPROBES=y | 13 | # CONFIG_KPROBES is not set |
16 | CONFIG_MODULES=y | 14 | CONFIG_MODULES=y |
17 | CONFIG_MODULE_UNLOAD=y | 15 | CONFIG_MODULE_UNLOAD=y |
18 | CONFIG_MODULE_FORCE_UNLOAD=y | ||
19 | # CONFIG_BLK_DEV_BSG is not set | 16 | # CONFIG_BLK_DEV_BSG is not set |
20 | # CONFIG_IOSCHED_DEADLINE is not set | 17 | # CONFIG_IOSCHED_DEADLINE is not set |
21 | CONFIG_NO_HZ=y | 18 | CONFIG_NO_HZ=y |
@@ -29,6 +26,7 @@ CONFIG_CPU_FREQ=y | |||
29 | CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y | 26 | CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y |
30 | CONFIG_CPU_FREQ_GOV_USERSPACE=y | 27 | CONFIG_CPU_FREQ_GOV_USERSPACE=y |
31 | CONFIG_CPU_FREQ_AT32AP=y | 28 | CONFIG_CPU_FREQ_AT32AP=y |
29 | CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y | ||
32 | CONFIG_NET=y | 30 | CONFIG_NET=y |
33 | CONFIG_PACKET=y | 31 | CONFIG_PACKET=y |
34 | CONFIG_UNIX=y | 32 | CONFIG_UNIX=y |
@@ -72,8 +70,8 @@ CONFIG_MTD_UBI=y | |||
72 | CONFIG_BLK_DEV_LOOP=m | 70 | CONFIG_BLK_DEV_LOOP=m |
73 | CONFIG_BLK_DEV_NBD=m | 71 | CONFIG_BLK_DEV_NBD=m |
74 | CONFIG_BLK_DEV_RAM=m | 72 | CONFIG_BLK_DEV_RAM=m |
73 | CONFIG_MISC_DEVICES=y | ||
75 | CONFIG_ATMEL_TCLIB=y | 74 | CONFIG_ATMEL_TCLIB=y |
76 | CONFIG_EEPROM_AT24=m | ||
77 | CONFIG_NETDEVICES=y | 75 | CONFIG_NETDEVICES=y |
78 | CONFIG_TUN=m | 76 | CONFIG_TUN=m |
79 | CONFIG_NET_ETHERNET=y | 77 | CONFIG_NET_ETHERNET=y |
@@ -106,6 +104,7 @@ CONFIG_GPIO_SYSFS=y | |||
106 | CONFIG_WATCHDOG=y | 104 | CONFIG_WATCHDOG=y |
107 | CONFIG_AT32AP700X_WDT=y | 105 | CONFIG_AT32AP700X_WDT=y |
108 | CONFIG_USB_GADGET=y | 106 | CONFIG_USB_GADGET=y |
107 | CONFIG_USB_GADGET_VBUS_DRAW=350 | ||
109 | CONFIG_USB_ZERO=m | 108 | CONFIG_USB_ZERO=m |
110 | CONFIG_USB_ETH=m | 109 | CONFIG_USB_ETH=m |
111 | CONFIG_USB_GADGETFS=m | 110 | CONFIG_USB_GADGETFS=m |
@@ -115,14 +114,12 @@ CONFIG_USB_CDC_COMPOSITE=m | |||
115 | CONFIG_MMC=y | 114 | CONFIG_MMC=y |
116 | CONFIG_MMC_TEST=m | 115 | CONFIG_MMC_TEST=m |
117 | CONFIG_MMC_ATMELMCI=y | 116 | CONFIG_MMC_ATMELMCI=y |
118 | CONFIG_MMC_SPI=m | ||
119 | CONFIG_NEW_LEDS=y | 117 | CONFIG_NEW_LEDS=y |
120 | CONFIG_LEDS_CLASS=y | 118 | CONFIG_LEDS_CLASS=y |
121 | CONFIG_LEDS_GPIO=y | 119 | CONFIG_LEDS_GPIO=y |
122 | CONFIG_LEDS_TRIGGERS=y | 120 | CONFIG_LEDS_TRIGGERS=y |
123 | CONFIG_LEDS_TRIGGER_TIMER=y | 121 | CONFIG_LEDS_TRIGGER_TIMER=y |
124 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y | 122 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y |
125 | CONFIG_LEDS_TRIGGER_DEFAULT_ON=y | ||
126 | CONFIG_RTC_CLASS=y | 123 | CONFIG_RTC_CLASS=y |
127 | CONFIG_RTC_DRV_AT32AP700X=y | 124 | CONFIG_RTC_DRV_AT32AP700X=y |
128 | CONFIG_DMADEVICES=y | 125 | CONFIG_DMADEVICES=y |
@@ -130,21 +127,23 @@ CONFIG_EXT2_FS=y | |||
130 | CONFIG_EXT3_FS=y | 127 | CONFIG_EXT3_FS=y |
131 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set | 128 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set |
132 | # CONFIG_EXT3_FS_XATTR is not set | 129 | # CONFIG_EXT3_FS_XATTR is not set |
130 | CONFIG_EXT4_FS=y | ||
131 | # CONFIG_EXT4_FS_XATTR is not set | ||
133 | # CONFIG_DNOTIFY is not set | 132 | # CONFIG_DNOTIFY is not set |
134 | CONFIG_FUSE_FS=m | 133 | CONFIG_FUSE_FS=m |
135 | CONFIG_MSDOS_FS=m | 134 | CONFIG_MSDOS_FS=m |
136 | CONFIG_VFAT_FS=m | 135 | CONFIG_VFAT_FS=m |
137 | CONFIG_FAT_DEFAULT_CODEPAGE=850 | 136 | CONFIG_FAT_DEFAULT_CODEPAGE=850 |
137 | CONFIG_PROC_KCORE=y | ||
138 | CONFIG_TMPFS=y | 138 | CONFIG_TMPFS=y |
139 | CONFIG_CONFIGFS_FS=m | 139 | CONFIG_CONFIGFS_FS=y |
140 | CONFIG_JFFS2_FS=y | 140 | CONFIG_JFFS2_FS=y |
141 | CONFIG_UFS_FS=y | 141 | CONFIG_UBIFS_FS=y |
142 | CONFIG_NFS_FS=y | 142 | CONFIG_NFS_FS=y |
143 | CONFIG_NFS_V3=y | 143 | CONFIG_NFS_V3=y |
144 | CONFIG_ROOT_NFS=y | 144 | CONFIG_ROOT_NFS=y |
145 | CONFIG_NFSD=m | 145 | CONFIG_NFSD=m |
146 | CONFIG_NFSD_V3=y | 146 | CONFIG_NFSD_V3=y |
147 | CONFIG_SMB_FS=m | ||
148 | CONFIG_CIFS=m | 147 | CONFIG_CIFS=m |
149 | CONFIG_NLS_CODEPAGE_437=m | 148 | CONFIG_NLS_CODEPAGE_437=m |
150 | CONFIG_NLS_CODEPAGE_850=m | 149 | CONFIG_NLS_CODEPAGE_850=m |
@@ -155,5 +154,3 @@ CONFIG_DEBUG_FS=y | |||
155 | CONFIG_DEBUG_KERNEL=y | 154 | CONFIG_DEBUG_KERNEL=y |
156 | CONFIG_DETECT_HUNG_TASK=y | 155 | CONFIG_DETECT_HUNG_TASK=y |
157 | CONFIG_FRAME_POINTER=y | 156 | CONFIG_FRAME_POINTER=y |
158 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
159 | CONFIG_CRYPTO_PCBC=m | ||
diff --git a/arch/avr32/configs/atngw100_evklcd100_defconfig b/arch/avr32/configs/atngw100_evklcd100_defconfig index 7ceda354597..7eece0af34c 100644 --- a/arch/avr32/configs/atngw100_evklcd100_defconfig +++ b/arch/avr32/configs/atngw100_evklcd100_defconfig | |||
@@ -2,20 +2,17 @@ CONFIG_EXPERIMENTAL=y | |||
2 | # CONFIG_LOCALVERSION_AUTO is not set | 2 | # CONFIG_LOCALVERSION_AUTO is not set |
3 | CONFIG_SYSVIPC=y | 3 | CONFIG_SYSVIPC=y |
4 | CONFIG_POSIX_MQUEUE=y | 4 | CONFIG_POSIX_MQUEUE=y |
5 | CONFIG_BSD_PROCESS_ACCT=y | ||
6 | CONFIG_BSD_PROCESS_ACCT_V3=y | ||
7 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
8 | CONFIG_SYSFS_DEPRECATED_V2=y | 6 | CONFIG_RELAY=y |
9 | CONFIG_BLK_DEV_INITRD=y | 7 | CONFIG_BLK_DEV_INITRD=y |
10 | # CONFIG_SYSCTL_SYSCALL is not set | 8 | # CONFIG_SYSCTL_SYSCALL is not set |
11 | # CONFIG_BASE_FULL is not set | 9 | # CONFIG_BASE_FULL is not set |
12 | # CONFIG_COMPAT_BRK is not set | 10 | # CONFIG_COMPAT_BRK is not set |
13 | CONFIG_PROFILING=y | 11 | CONFIG_PROFILING=y |
14 | CONFIG_OPROFILE=m | 12 | CONFIG_OPROFILE=m |
15 | CONFIG_KPROBES=y | 13 | # CONFIG_KPROBES is not set |
16 | CONFIG_MODULES=y | 14 | CONFIG_MODULES=y |
17 | CONFIG_MODULE_UNLOAD=y | 15 | CONFIG_MODULE_UNLOAD=y |
18 | CONFIG_MODULE_FORCE_UNLOAD=y | ||
19 | # CONFIG_BLK_DEV_BSG is not set | 16 | # CONFIG_BLK_DEV_BSG is not set |
20 | # CONFIG_IOSCHED_DEADLINE is not set | 17 | # CONFIG_IOSCHED_DEADLINE is not set |
21 | CONFIG_NO_HZ=y | 18 | CONFIG_NO_HZ=y |
@@ -31,6 +28,7 @@ CONFIG_CPU_FREQ=y | |||
31 | CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y | 28 | CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y |
32 | CONFIG_CPU_FREQ_GOV_USERSPACE=y | 29 | CONFIG_CPU_FREQ_GOV_USERSPACE=y |
33 | CONFIG_CPU_FREQ_AT32AP=y | 30 | CONFIG_CPU_FREQ_AT32AP=y |
31 | CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y | ||
34 | CONFIG_NET=y | 32 | CONFIG_NET=y |
35 | CONFIG_PACKET=y | 33 | CONFIG_PACKET=y |
36 | CONFIG_UNIX=y | 34 | CONFIG_UNIX=y |
@@ -74,8 +72,10 @@ CONFIG_MTD_UBI=y | |||
74 | CONFIG_BLK_DEV_LOOP=m | 72 | CONFIG_BLK_DEV_LOOP=m |
75 | CONFIG_BLK_DEV_NBD=m | 73 | CONFIG_BLK_DEV_NBD=m |
76 | CONFIG_BLK_DEV_RAM=m | 74 | CONFIG_BLK_DEV_RAM=m |
75 | CONFIG_MISC_DEVICES=y | ||
77 | CONFIG_ATMEL_TCLIB=y | 76 | CONFIG_ATMEL_TCLIB=y |
78 | CONFIG_NETDEVICES=y | 77 | CONFIG_NETDEVICES=y |
78 | CONFIG_TUN=m | ||
79 | CONFIG_NET_ETHERNET=y | 79 | CONFIG_NET_ETHERNET=y |
80 | CONFIG_MACB=y | 80 | CONFIG_MACB=y |
81 | # CONFIG_NETDEV_1000 is not set | 81 | # CONFIG_NETDEV_1000 is not set |
@@ -104,6 +104,7 @@ CONFIG_I2C_GPIO=m | |||
104 | CONFIG_SPI=y | 104 | CONFIG_SPI=y |
105 | CONFIG_SPI_ATMEL=y | 105 | CONFIG_SPI_ATMEL=y |
106 | CONFIG_SPI_SPIDEV=m | 106 | CONFIG_SPI_SPIDEV=m |
107 | CONFIG_GPIO_SYSFS=y | ||
107 | # CONFIG_HWMON is not set | 108 | # CONFIG_HWMON is not set |
108 | CONFIG_WATCHDOG=y | 109 | CONFIG_WATCHDOG=y |
109 | CONFIG_AT32AP700X_WDT=y | 110 | CONFIG_AT32AP700X_WDT=y |
@@ -127,6 +128,7 @@ CONFIG_USB_FILE_STORAGE=m | |||
127 | CONFIG_USB_G_SERIAL=m | 128 | CONFIG_USB_G_SERIAL=m |
128 | CONFIG_USB_CDC_COMPOSITE=m | 129 | CONFIG_USB_CDC_COMPOSITE=m |
129 | CONFIG_MMC=y | 130 | CONFIG_MMC=y |
131 | CONFIG_MMC_TEST=m | ||
130 | CONFIG_MMC_ATMELMCI=y | 132 | CONFIG_MMC_ATMELMCI=y |
131 | CONFIG_NEW_LEDS=y | 133 | CONFIG_NEW_LEDS=y |
132 | CONFIG_LEDS_CLASS=y | 134 | CONFIG_LEDS_CLASS=y |
@@ -141,11 +143,14 @@ CONFIG_EXT2_FS=y | |||
141 | CONFIG_EXT3_FS=y | 143 | CONFIG_EXT3_FS=y |
142 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set | 144 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set |
143 | # CONFIG_EXT3_FS_XATTR is not set | 145 | # CONFIG_EXT3_FS_XATTR is not set |
146 | CONFIG_EXT4_FS=y | ||
147 | # CONFIG_EXT4_FS_XATTR is not set | ||
144 | # CONFIG_DNOTIFY is not set | 148 | # CONFIG_DNOTIFY is not set |
145 | CONFIG_FUSE_FS=m | 149 | CONFIG_FUSE_FS=m |
146 | CONFIG_MSDOS_FS=m | 150 | CONFIG_MSDOS_FS=m |
147 | CONFIG_VFAT_FS=m | 151 | CONFIG_VFAT_FS=m |
148 | CONFIG_FAT_DEFAULT_CODEPAGE=850 | 152 | CONFIG_FAT_DEFAULT_CODEPAGE=850 |
153 | CONFIG_PROC_KCORE=y | ||
149 | CONFIG_TMPFS=y | 154 | CONFIG_TMPFS=y |
150 | CONFIG_CONFIGFS_FS=y | 155 | CONFIG_CONFIGFS_FS=y |
151 | CONFIG_JFFS2_FS=y | 156 | CONFIG_JFFS2_FS=y |
@@ -155,7 +160,6 @@ CONFIG_NFS_V3=y | |||
155 | CONFIG_ROOT_NFS=y | 160 | CONFIG_ROOT_NFS=y |
156 | CONFIG_NFSD=m | 161 | CONFIG_NFSD=m |
157 | CONFIG_NFSD_V3=y | 162 | CONFIG_NFSD_V3=y |
158 | CONFIG_SMB_FS=m | ||
159 | CONFIG_CIFS=m | 163 | CONFIG_CIFS=m |
160 | CONFIG_NLS_CODEPAGE_437=m | 164 | CONFIG_NLS_CODEPAGE_437=m |
161 | CONFIG_NLS_CODEPAGE_850=m | 165 | CONFIG_NLS_CODEPAGE_850=m |
@@ -166,4 +170,3 @@ CONFIG_DEBUG_FS=y | |||
166 | CONFIG_DEBUG_KERNEL=y | 170 | CONFIG_DEBUG_KERNEL=y |
167 | CONFIG_DETECT_HUNG_TASK=y | 171 | CONFIG_DETECT_HUNG_TASK=y |
168 | CONFIG_FRAME_POINTER=y | 172 | CONFIG_FRAME_POINTER=y |
169 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
diff --git a/arch/avr32/configs/atngw100_evklcd101_defconfig b/arch/avr32/configs/atngw100_evklcd101_defconfig index 7bc5b2ce68d..387eb9d6e42 100644 --- a/arch/avr32/configs/atngw100_evklcd101_defconfig +++ b/arch/avr32/configs/atngw100_evklcd101_defconfig | |||
@@ -2,20 +2,17 @@ CONFIG_EXPERIMENTAL=y | |||
2 | # CONFIG_LOCALVERSION_AUTO is not set | 2 | # CONFIG_LOCALVERSION_AUTO is not set |
3 | CONFIG_SYSVIPC=y | 3 | CONFIG_SYSVIPC=y |
4 | CONFIG_POSIX_MQUEUE=y | 4 | CONFIG_POSIX_MQUEUE=y |
5 | CONFIG_BSD_PROCESS_ACCT=y | ||
6 | CONFIG_BSD_PROCESS_ACCT_V3=y | ||
7 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
8 | CONFIG_SYSFS_DEPRECATED_V2=y | 6 | CONFIG_RELAY=y |
9 | CONFIG_BLK_DEV_INITRD=y | 7 | CONFIG_BLK_DEV_INITRD=y |
10 | # CONFIG_SYSCTL_SYSCALL is not set | 8 | # CONFIG_SYSCTL_SYSCALL is not set |
11 | # CONFIG_BASE_FULL is not set | 9 | # CONFIG_BASE_FULL is not set |
12 | # CONFIG_COMPAT_BRK is not set | 10 | # CONFIG_COMPAT_BRK is not set |
13 | CONFIG_PROFILING=y | 11 | CONFIG_PROFILING=y |
14 | CONFIG_OPROFILE=m | 12 | CONFIG_OPROFILE=m |
15 | CONFIG_KPROBES=y | 13 | # CONFIG_KPROBES is not set |
16 | CONFIG_MODULES=y | 14 | CONFIG_MODULES=y |
17 | CONFIG_MODULE_UNLOAD=y | 15 | CONFIG_MODULE_UNLOAD=y |
18 | CONFIG_MODULE_FORCE_UNLOAD=y | ||
19 | # CONFIG_BLK_DEV_BSG is not set | 16 | # CONFIG_BLK_DEV_BSG is not set |
20 | # CONFIG_IOSCHED_DEADLINE is not set | 17 | # CONFIG_IOSCHED_DEADLINE is not set |
21 | CONFIG_NO_HZ=y | 18 | CONFIG_NO_HZ=y |
@@ -30,6 +27,7 @@ CONFIG_CPU_FREQ=y | |||
30 | CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y | 27 | CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y |
31 | CONFIG_CPU_FREQ_GOV_USERSPACE=y | 28 | CONFIG_CPU_FREQ_GOV_USERSPACE=y |
32 | CONFIG_CPU_FREQ_AT32AP=y | 29 | CONFIG_CPU_FREQ_AT32AP=y |
30 | CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y | ||
33 | CONFIG_NET=y | 31 | CONFIG_NET=y |
34 | CONFIG_PACKET=y | 32 | CONFIG_PACKET=y |
35 | CONFIG_UNIX=y | 33 | CONFIG_UNIX=y |
@@ -73,8 +71,10 @@ CONFIG_MTD_UBI=y | |||
73 | CONFIG_BLK_DEV_LOOP=m | 71 | CONFIG_BLK_DEV_LOOP=m |
74 | CONFIG_BLK_DEV_NBD=m | 72 | CONFIG_BLK_DEV_NBD=m |
75 | CONFIG_BLK_DEV_RAM=m | 73 | CONFIG_BLK_DEV_RAM=m |
74 | CONFIG_MISC_DEVICES=y | ||
76 | CONFIG_ATMEL_TCLIB=y | 75 | CONFIG_ATMEL_TCLIB=y |
77 | CONFIG_NETDEVICES=y | 76 | CONFIG_NETDEVICES=y |
77 | CONFIG_TUN=m | ||
78 | CONFIG_NET_ETHERNET=y | 78 | CONFIG_NET_ETHERNET=y |
79 | CONFIG_MACB=y | 79 | CONFIG_MACB=y |
80 | # CONFIG_NETDEV_1000 is not set | 80 | # CONFIG_NETDEV_1000 is not set |
@@ -103,6 +103,7 @@ CONFIG_I2C_GPIO=m | |||
103 | CONFIG_SPI=y | 103 | CONFIG_SPI=y |
104 | CONFIG_SPI_ATMEL=y | 104 | CONFIG_SPI_ATMEL=y |
105 | CONFIG_SPI_SPIDEV=m | 105 | CONFIG_SPI_SPIDEV=m |
106 | CONFIG_GPIO_SYSFS=y | ||
106 | # CONFIG_HWMON is not set | 107 | # CONFIG_HWMON is not set |
107 | CONFIG_WATCHDOG=y | 108 | CONFIG_WATCHDOG=y |
108 | CONFIG_AT32AP700X_WDT=y | 109 | CONFIG_AT32AP700X_WDT=y |
@@ -126,6 +127,7 @@ CONFIG_USB_FILE_STORAGE=m | |||
126 | CONFIG_USB_G_SERIAL=m | 127 | CONFIG_USB_G_SERIAL=m |
127 | CONFIG_USB_CDC_COMPOSITE=m | 128 | CONFIG_USB_CDC_COMPOSITE=m |
128 | CONFIG_MMC=y | 129 | CONFIG_MMC=y |
130 | CONFIG_MMC_TEST=m | ||
129 | CONFIG_MMC_ATMELMCI=y | 131 | CONFIG_MMC_ATMELMCI=y |
130 | CONFIG_NEW_LEDS=y | 132 | CONFIG_NEW_LEDS=y |
131 | CONFIG_LEDS_CLASS=y | 133 | CONFIG_LEDS_CLASS=y |
@@ -140,11 +142,14 @@ CONFIG_EXT2_FS=y | |||
140 | CONFIG_EXT3_FS=y | 142 | CONFIG_EXT3_FS=y |
141 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set | 143 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set |
142 | # CONFIG_EXT3_FS_XATTR is not set | 144 | # CONFIG_EXT3_FS_XATTR is not set |
145 | CONFIG_EXT4_FS=y | ||
146 | # CONFIG_EXT4_FS_XATTR is not set | ||
143 | # CONFIG_DNOTIFY is not set | 147 | # CONFIG_DNOTIFY is not set |
144 | CONFIG_FUSE_FS=m | 148 | CONFIG_FUSE_FS=m |
145 | CONFIG_MSDOS_FS=m | 149 | CONFIG_MSDOS_FS=m |
146 | CONFIG_VFAT_FS=m | 150 | CONFIG_VFAT_FS=m |
147 | CONFIG_FAT_DEFAULT_CODEPAGE=850 | 151 | CONFIG_FAT_DEFAULT_CODEPAGE=850 |
152 | CONFIG_PROC_KCORE=y | ||
148 | CONFIG_TMPFS=y | 153 | CONFIG_TMPFS=y |
149 | CONFIG_CONFIGFS_FS=y | 154 | CONFIG_CONFIGFS_FS=y |
150 | CONFIG_JFFS2_FS=y | 155 | CONFIG_JFFS2_FS=y |
@@ -154,7 +159,6 @@ CONFIG_NFS_V3=y | |||
154 | CONFIG_ROOT_NFS=y | 159 | CONFIG_ROOT_NFS=y |
155 | CONFIG_NFSD=m | 160 | CONFIG_NFSD=m |
156 | CONFIG_NFSD_V3=y | 161 | CONFIG_NFSD_V3=y |
157 | CONFIG_SMB_FS=m | ||
158 | CONFIG_CIFS=m | 162 | CONFIG_CIFS=m |
159 | CONFIG_NLS_CODEPAGE_437=m | 163 | CONFIG_NLS_CODEPAGE_437=m |
160 | CONFIG_NLS_CODEPAGE_850=m | 164 | CONFIG_NLS_CODEPAGE_850=m |
@@ -165,4 +169,3 @@ CONFIG_DEBUG_FS=y | |||
165 | CONFIG_DEBUG_KERNEL=y | 169 | CONFIG_DEBUG_KERNEL=y |
166 | CONFIG_DETECT_HUNG_TASK=y | 170 | CONFIG_DETECT_HUNG_TASK=y |
167 | CONFIG_FRAME_POINTER=y | 171 | CONFIG_FRAME_POINTER=y |
168 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
diff --git a/arch/avr32/configs/atngw100mkii_defconfig b/arch/avr32/configs/atngw100mkii_defconfig index 4bd36821d4a..f0fe237133a 100644 --- a/arch/avr32/configs/atngw100mkii_defconfig +++ b/arch/avr32/configs/atngw100mkii_defconfig | |||
@@ -2,20 +2,17 @@ CONFIG_EXPERIMENTAL=y | |||
2 | # CONFIG_LOCALVERSION_AUTO is not set | 2 | # CONFIG_LOCALVERSION_AUTO is not set |
3 | CONFIG_SYSVIPC=y | 3 | CONFIG_SYSVIPC=y |
4 | CONFIG_POSIX_MQUEUE=y | 4 | CONFIG_POSIX_MQUEUE=y |
5 | CONFIG_BSD_PROCESS_ACCT=y | ||
6 | CONFIG_BSD_PROCESS_ACCT_V3=y | ||
7 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
8 | CONFIG_SYSFS_DEPRECATED_V2=y | 6 | CONFIG_RELAY=y |
9 | CONFIG_BLK_DEV_INITRD=y | 7 | CONFIG_BLK_DEV_INITRD=y |
10 | # CONFIG_SYSCTL_SYSCALL is not set | 8 | # CONFIG_SYSCTL_SYSCALL is not set |
11 | # CONFIG_BASE_FULL is not set | 9 | # CONFIG_BASE_FULL is not set |
12 | # CONFIG_COMPAT_BRK is not set | 10 | # CONFIG_COMPAT_BRK is not set |
13 | CONFIG_PROFILING=y | 11 | CONFIG_PROFILING=y |
14 | CONFIG_OPROFILE=m | 12 | CONFIG_OPROFILE=m |
15 | CONFIG_KPROBES=y | 13 | # CONFIG_KPROBES is not set |
16 | CONFIG_MODULES=y | 14 | CONFIG_MODULES=y |
17 | CONFIG_MODULE_UNLOAD=y | 15 | CONFIG_MODULE_UNLOAD=y |
18 | CONFIG_MODULE_FORCE_UNLOAD=y | ||
19 | # CONFIG_BLK_DEV_BSG is not set | 16 | # CONFIG_BLK_DEV_BSG is not set |
20 | # CONFIG_IOSCHED_DEADLINE is not set | 17 | # CONFIG_IOSCHED_DEADLINE is not set |
21 | CONFIG_NO_HZ=y | 18 | CONFIG_NO_HZ=y |
@@ -29,6 +26,7 @@ CONFIG_CPU_FREQ=y | |||
29 | CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y | 26 | CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y |
30 | CONFIG_CPU_FREQ_GOV_USERSPACE=y | 27 | CONFIG_CPU_FREQ_GOV_USERSPACE=y |
31 | CONFIG_CPU_FREQ_AT32AP=y | 28 | CONFIG_CPU_FREQ_AT32AP=y |
29 | CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y | ||
32 | CONFIG_NET=y | 30 | CONFIG_NET=y |
33 | CONFIG_PACKET=y | 31 | CONFIG_PACKET=y |
34 | CONFIG_UNIX=y | 32 | CONFIG_UNIX=y |
@@ -74,6 +72,7 @@ CONFIG_MTD_UBI=y | |||
74 | CONFIG_BLK_DEV_LOOP=m | 72 | CONFIG_BLK_DEV_LOOP=m |
75 | CONFIG_BLK_DEV_NBD=m | 73 | CONFIG_BLK_DEV_NBD=m |
76 | CONFIG_BLK_DEV_RAM=m | 74 | CONFIG_BLK_DEV_RAM=m |
75 | CONFIG_MISC_DEVICES=y | ||
77 | CONFIG_ATMEL_TCLIB=y | 76 | CONFIG_ATMEL_TCLIB=y |
78 | CONFIG_NETDEVICES=y | 77 | CONFIG_NETDEVICES=y |
79 | CONFIG_TUN=m | 78 | CONFIG_TUN=m |
@@ -107,6 +106,7 @@ CONFIG_GPIO_SYSFS=y | |||
107 | CONFIG_WATCHDOG=y | 106 | CONFIG_WATCHDOG=y |
108 | CONFIG_AT32AP700X_WDT=y | 107 | CONFIG_AT32AP700X_WDT=y |
109 | CONFIG_USB_GADGET=y | 108 | CONFIG_USB_GADGET=y |
109 | CONFIG_USB_GADGET_VBUS_DRAW=350 | ||
110 | CONFIG_USB_ZERO=m | 110 | CONFIG_USB_ZERO=m |
111 | CONFIG_USB_ETH=m | 111 | CONFIG_USB_ETH=m |
112 | CONFIG_USB_GADGETFS=m | 112 | CONFIG_USB_GADGETFS=m |
@@ -116,14 +116,12 @@ CONFIG_USB_CDC_COMPOSITE=m | |||
116 | CONFIG_MMC=y | 116 | CONFIG_MMC=y |
117 | CONFIG_MMC_TEST=m | 117 | CONFIG_MMC_TEST=m |
118 | CONFIG_MMC_ATMELMCI=y | 118 | CONFIG_MMC_ATMELMCI=y |
119 | CONFIG_MMC_SPI=m | ||
120 | CONFIG_NEW_LEDS=y | 119 | CONFIG_NEW_LEDS=y |
121 | CONFIG_LEDS_CLASS=y | 120 | CONFIG_LEDS_CLASS=y |
122 | CONFIG_LEDS_GPIO=y | 121 | CONFIG_LEDS_GPIO=y |
123 | CONFIG_LEDS_TRIGGERS=y | 122 | CONFIG_LEDS_TRIGGERS=y |
124 | CONFIG_LEDS_TRIGGER_TIMER=y | 123 | CONFIG_LEDS_TRIGGER_TIMER=y |
125 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y | 124 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y |
126 | CONFIG_LEDS_TRIGGER_DEFAULT_ON=y | ||
127 | CONFIG_RTC_CLASS=y | 125 | CONFIG_RTC_CLASS=y |
128 | CONFIG_RTC_DRV_AT32AP700X=y | 126 | CONFIG_RTC_DRV_AT32AP700X=y |
129 | CONFIG_DMADEVICES=y | 127 | CONFIG_DMADEVICES=y |
@@ -131,21 +129,23 @@ CONFIG_EXT2_FS=y | |||
131 | CONFIG_EXT3_FS=y | 129 | CONFIG_EXT3_FS=y |
132 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set | 130 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set |
133 | # CONFIG_EXT3_FS_XATTR is not set | 131 | # CONFIG_EXT3_FS_XATTR is not set |
132 | CONFIG_EXT4_FS=y | ||
133 | # CONFIG_EXT4_FS_XATTR is not set | ||
134 | # CONFIG_DNOTIFY is not set | 134 | # CONFIG_DNOTIFY is not set |
135 | CONFIG_FUSE_FS=m | 135 | CONFIG_FUSE_FS=m |
136 | CONFIG_MSDOS_FS=m | 136 | CONFIG_MSDOS_FS=m |
137 | CONFIG_VFAT_FS=m | 137 | CONFIG_VFAT_FS=m |
138 | CONFIG_FAT_DEFAULT_CODEPAGE=850 | 138 | CONFIG_FAT_DEFAULT_CODEPAGE=850 |
139 | CONFIG_PROC_KCORE=y | ||
139 | CONFIG_TMPFS=y | 140 | CONFIG_TMPFS=y |
140 | CONFIG_CONFIGFS_FS=m | 141 | CONFIG_CONFIGFS_FS=y |
141 | CONFIG_JFFS2_FS=y | 142 | CONFIG_JFFS2_FS=y |
142 | CONFIG_UFS_FS=y | 143 | CONFIG_UBIFS_FS=y |
143 | CONFIG_NFS_FS=y | 144 | CONFIG_NFS_FS=y |
144 | CONFIG_NFS_V3=y | 145 | CONFIG_NFS_V3=y |
145 | CONFIG_ROOT_NFS=y | 146 | CONFIG_ROOT_NFS=y |
146 | CONFIG_NFSD=m | 147 | CONFIG_NFSD=m |
147 | CONFIG_NFSD_V3=y | 148 | CONFIG_NFSD_V3=y |
148 | CONFIG_SMB_FS=m | ||
149 | CONFIG_CIFS=m | 149 | CONFIG_CIFS=m |
150 | CONFIG_NLS_CODEPAGE_437=m | 150 | CONFIG_NLS_CODEPAGE_437=m |
151 | CONFIG_NLS_CODEPAGE_850=m | 151 | CONFIG_NLS_CODEPAGE_850=m |
@@ -156,5 +156,3 @@ CONFIG_DEBUG_FS=y | |||
156 | CONFIG_DEBUG_KERNEL=y | 156 | CONFIG_DEBUG_KERNEL=y |
157 | CONFIG_DETECT_HUNG_TASK=y | 157 | CONFIG_DETECT_HUNG_TASK=y |
158 | CONFIG_FRAME_POINTER=y | 158 | CONFIG_FRAME_POINTER=y |
159 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
160 | CONFIG_CRYPTO_PCBC=m | ||
diff --git a/arch/avr32/configs/atngw100mkii_evklcd100_defconfig b/arch/avr32/configs/atngw100mkii_evklcd100_defconfig index f8437ef3237..e4a7c1dc838 100644 --- a/arch/avr32/configs/atngw100mkii_evklcd100_defconfig +++ b/arch/avr32/configs/atngw100mkii_evklcd100_defconfig | |||
@@ -2,20 +2,17 @@ CONFIG_EXPERIMENTAL=y | |||
2 | # CONFIG_LOCALVERSION_AUTO is not set | 2 | # CONFIG_LOCALVERSION_AUTO is not set |
3 | CONFIG_SYSVIPC=y | 3 | CONFIG_SYSVIPC=y |
4 | CONFIG_POSIX_MQUEUE=y | 4 | CONFIG_POSIX_MQUEUE=y |
5 | CONFIG_BSD_PROCESS_ACCT=y | ||
6 | CONFIG_BSD_PROCESS_ACCT_V3=y | ||
7 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
8 | CONFIG_SYSFS_DEPRECATED_V2=y | 6 | CONFIG_RELAY=y |
9 | CONFIG_BLK_DEV_INITRD=y | 7 | CONFIG_BLK_DEV_INITRD=y |
10 | # CONFIG_SYSCTL_SYSCALL is not set | 8 | # CONFIG_SYSCTL_SYSCALL is not set |
11 | # CONFIG_BASE_FULL is not set | 9 | # CONFIG_BASE_FULL is not set |
12 | # CONFIG_COMPAT_BRK is not set | 10 | # CONFIG_COMPAT_BRK is not set |
13 | CONFIG_PROFILING=y | 11 | CONFIG_PROFILING=y |
14 | CONFIG_OPROFILE=m | 12 | CONFIG_OPROFILE=m |
15 | CONFIG_KPROBES=y | 13 | # CONFIG_KPROBES is not set |
16 | CONFIG_MODULES=y | 14 | CONFIG_MODULES=y |
17 | CONFIG_MODULE_UNLOAD=y | 15 | CONFIG_MODULE_UNLOAD=y |
18 | CONFIG_MODULE_FORCE_UNLOAD=y | ||
19 | # CONFIG_BLK_DEV_BSG is not set | 16 | # CONFIG_BLK_DEV_BSG is not set |
20 | # CONFIG_IOSCHED_DEADLINE is not set | 17 | # CONFIG_IOSCHED_DEADLINE is not set |
21 | CONFIG_NO_HZ=y | 18 | CONFIG_NO_HZ=y |
@@ -32,6 +29,7 @@ CONFIG_CPU_FREQ=y | |||
32 | CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y | 29 | CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y |
33 | CONFIG_CPU_FREQ_GOV_USERSPACE=y | 30 | CONFIG_CPU_FREQ_GOV_USERSPACE=y |
34 | CONFIG_CPU_FREQ_AT32AP=y | 31 | CONFIG_CPU_FREQ_AT32AP=y |
32 | CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y | ||
35 | CONFIG_NET=y | 33 | CONFIG_NET=y |
36 | CONFIG_PACKET=y | 34 | CONFIG_PACKET=y |
37 | CONFIG_UNIX=y | 35 | CONFIG_UNIX=y |
@@ -77,8 +75,10 @@ CONFIG_MTD_UBI=y | |||
77 | CONFIG_BLK_DEV_LOOP=m | 75 | CONFIG_BLK_DEV_LOOP=m |
78 | CONFIG_BLK_DEV_NBD=m | 76 | CONFIG_BLK_DEV_NBD=m |
79 | CONFIG_BLK_DEV_RAM=m | 77 | CONFIG_BLK_DEV_RAM=m |
78 | CONFIG_MISC_DEVICES=y | ||
80 | CONFIG_ATMEL_TCLIB=y | 79 | CONFIG_ATMEL_TCLIB=y |
81 | CONFIG_NETDEVICES=y | 80 | CONFIG_NETDEVICES=y |
81 | CONFIG_TUN=m | ||
82 | CONFIG_NET_ETHERNET=y | 82 | CONFIG_NET_ETHERNET=y |
83 | CONFIG_MACB=y | 83 | CONFIG_MACB=y |
84 | # CONFIG_NETDEV_1000 is not set | 84 | # CONFIG_NETDEV_1000 is not set |
@@ -107,6 +107,7 @@ CONFIG_I2C_GPIO=m | |||
107 | CONFIG_SPI=y | 107 | CONFIG_SPI=y |
108 | CONFIG_SPI_ATMEL=y | 108 | CONFIG_SPI_ATMEL=y |
109 | CONFIG_SPI_SPIDEV=m | 109 | CONFIG_SPI_SPIDEV=m |
110 | CONFIG_GPIO_SYSFS=y | ||
110 | # CONFIG_HWMON is not set | 111 | # CONFIG_HWMON is not set |
111 | CONFIG_WATCHDOG=y | 112 | CONFIG_WATCHDOG=y |
112 | CONFIG_AT32AP700X_WDT=y | 113 | CONFIG_AT32AP700X_WDT=y |
@@ -130,6 +131,7 @@ CONFIG_USB_FILE_STORAGE=m | |||
130 | CONFIG_USB_G_SERIAL=m | 131 | CONFIG_USB_G_SERIAL=m |
131 | CONFIG_USB_CDC_COMPOSITE=m | 132 | CONFIG_USB_CDC_COMPOSITE=m |
132 | CONFIG_MMC=y | 133 | CONFIG_MMC=y |
134 | CONFIG_MMC_TEST=m | ||
133 | CONFIG_MMC_ATMELMCI=y | 135 | CONFIG_MMC_ATMELMCI=y |
134 | CONFIG_NEW_LEDS=y | 136 | CONFIG_NEW_LEDS=y |
135 | CONFIG_LEDS_CLASS=y | 137 | CONFIG_LEDS_CLASS=y |
@@ -144,11 +146,14 @@ CONFIG_EXT2_FS=y | |||
144 | CONFIG_EXT3_FS=y | 146 | CONFIG_EXT3_FS=y |
145 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set | 147 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set |
146 | # CONFIG_EXT3_FS_XATTR is not set | 148 | # CONFIG_EXT3_FS_XATTR is not set |
149 | CONFIG_EXT4_FS=y | ||
150 | # CONFIG_EXT4_FS_XATTR is not set | ||
147 | # CONFIG_DNOTIFY is not set | 151 | # CONFIG_DNOTIFY is not set |
148 | CONFIG_FUSE_FS=m | 152 | CONFIG_FUSE_FS=m |
149 | CONFIG_MSDOS_FS=m | 153 | CONFIG_MSDOS_FS=m |
150 | CONFIG_VFAT_FS=m | 154 | CONFIG_VFAT_FS=m |
151 | CONFIG_FAT_DEFAULT_CODEPAGE=850 | 155 | CONFIG_FAT_DEFAULT_CODEPAGE=850 |
156 | CONFIG_PROC_KCORE=y | ||
152 | CONFIG_TMPFS=y | 157 | CONFIG_TMPFS=y |
153 | CONFIG_CONFIGFS_FS=y | 158 | CONFIG_CONFIGFS_FS=y |
154 | CONFIG_JFFS2_FS=y | 159 | CONFIG_JFFS2_FS=y |
@@ -158,7 +163,6 @@ CONFIG_NFS_V3=y | |||
158 | CONFIG_ROOT_NFS=y | 163 | CONFIG_ROOT_NFS=y |
159 | CONFIG_NFSD=m | 164 | CONFIG_NFSD=m |
160 | CONFIG_NFSD_V3=y | 165 | CONFIG_NFSD_V3=y |
161 | CONFIG_SMB_FS=m | ||
162 | CONFIG_CIFS=m | 166 | CONFIG_CIFS=m |
163 | CONFIG_NLS_CODEPAGE_437=m | 167 | CONFIG_NLS_CODEPAGE_437=m |
164 | CONFIG_NLS_CODEPAGE_850=m | 168 | CONFIG_NLS_CODEPAGE_850=m |
@@ -169,4 +173,3 @@ CONFIG_DEBUG_FS=y | |||
169 | CONFIG_DEBUG_KERNEL=y | 173 | CONFIG_DEBUG_KERNEL=y |
170 | CONFIG_DETECT_HUNG_TASK=y | 174 | CONFIG_DETECT_HUNG_TASK=y |
171 | CONFIG_FRAME_POINTER=y | 175 | CONFIG_FRAME_POINTER=y |
172 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
diff --git a/arch/avr32/configs/atngw100mkii_evklcd101_defconfig b/arch/avr32/configs/atngw100mkii_evklcd101_defconfig index 7f58f996d94..6f37f70c2c3 100644 --- a/arch/avr32/configs/atngw100mkii_evklcd101_defconfig +++ b/arch/avr32/configs/atngw100mkii_evklcd101_defconfig | |||
@@ -2,20 +2,17 @@ CONFIG_EXPERIMENTAL=y | |||
2 | # CONFIG_LOCALVERSION_AUTO is not set | 2 | # CONFIG_LOCALVERSION_AUTO is not set |
3 | CONFIG_SYSVIPC=y | 3 | CONFIG_SYSVIPC=y |
4 | CONFIG_POSIX_MQUEUE=y | 4 | CONFIG_POSIX_MQUEUE=y |
5 | CONFIG_BSD_PROCESS_ACCT=y | ||
6 | CONFIG_BSD_PROCESS_ACCT_V3=y | ||
7 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
8 | CONFIG_SYSFS_DEPRECATED_V2=y | 6 | CONFIG_RELAY=y |
9 | CONFIG_BLK_DEV_INITRD=y | 7 | CONFIG_BLK_DEV_INITRD=y |
10 | # CONFIG_SYSCTL_SYSCALL is not set | 8 | # CONFIG_SYSCTL_SYSCALL is not set |
11 | # CONFIG_BASE_FULL is not set | 9 | # CONFIG_BASE_FULL is not set |
12 | # CONFIG_COMPAT_BRK is not set | 10 | # CONFIG_COMPAT_BRK is not set |
13 | CONFIG_PROFILING=y | 11 | CONFIG_PROFILING=y |
14 | CONFIG_OPROFILE=m | 12 | CONFIG_OPROFILE=m |
15 | CONFIG_KPROBES=y | 13 | # CONFIG_KPROBES is not set |
16 | CONFIG_MODULES=y | 14 | CONFIG_MODULES=y |
17 | CONFIG_MODULE_UNLOAD=y | 15 | CONFIG_MODULE_UNLOAD=y |
18 | CONFIG_MODULE_FORCE_UNLOAD=y | ||
19 | # CONFIG_BLK_DEV_BSG is not set | 16 | # CONFIG_BLK_DEV_BSG is not set |
20 | # CONFIG_IOSCHED_DEADLINE is not set | 17 | # CONFIG_IOSCHED_DEADLINE is not set |
21 | CONFIG_NO_HZ=y | 18 | CONFIG_NO_HZ=y |
@@ -31,6 +28,7 @@ CONFIG_CPU_FREQ=y | |||
31 | CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y | 28 | CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y |
32 | CONFIG_CPU_FREQ_GOV_USERSPACE=y | 29 | CONFIG_CPU_FREQ_GOV_USERSPACE=y |
33 | CONFIG_CPU_FREQ_AT32AP=y | 30 | CONFIG_CPU_FREQ_AT32AP=y |
31 | CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y | ||
34 | CONFIG_NET=y | 32 | CONFIG_NET=y |
35 | CONFIG_PACKET=y | 33 | CONFIG_PACKET=y |
36 | CONFIG_UNIX=y | 34 | CONFIG_UNIX=y |
@@ -76,8 +74,10 @@ CONFIG_MTD_UBI=y | |||
76 | CONFIG_BLK_DEV_LOOP=m | 74 | CONFIG_BLK_DEV_LOOP=m |
77 | CONFIG_BLK_DEV_NBD=m | 75 | CONFIG_BLK_DEV_NBD=m |
78 | CONFIG_BLK_DEV_RAM=m | 76 | CONFIG_BLK_DEV_RAM=m |
77 | CONFIG_MISC_DEVICES=y | ||
79 | CONFIG_ATMEL_TCLIB=y | 78 | CONFIG_ATMEL_TCLIB=y |
80 | CONFIG_NETDEVICES=y | 79 | CONFIG_NETDEVICES=y |
80 | CONFIG_TUN=m | ||
81 | CONFIG_NET_ETHERNET=y | 81 | CONFIG_NET_ETHERNET=y |
82 | CONFIG_MACB=y | 82 | CONFIG_MACB=y |
83 | # CONFIG_NETDEV_1000 is not set | 83 | # CONFIG_NETDEV_1000 is not set |
@@ -106,6 +106,7 @@ CONFIG_I2C_GPIO=m | |||
106 | CONFIG_SPI=y | 106 | CONFIG_SPI=y |
107 | CONFIG_SPI_ATMEL=y | 107 | CONFIG_SPI_ATMEL=y |
108 | CONFIG_SPI_SPIDEV=m | 108 | CONFIG_SPI_SPIDEV=m |
109 | CONFIG_GPIO_SYSFS=y | ||
109 | # CONFIG_HWMON is not set | 110 | # CONFIG_HWMON is not set |
110 | CONFIG_WATCHDOG=y | 111 | CONFIG_WATCHDOG=y |
111 | CONFIG_AT32AP700X_WDT=y | 112 | CONFIG_AT32AP700X_WDT=y |
@@ -129,6 +130,7 @@ CONFIG_USB_FILE_STORAGE=m | |||
129 | CONFIG_USB_G_SERIAL=m | 130 | CONFIG_USB_G_SERIAL=m |
130 | CONFIG_USB_CDC_COMPOSITE=m | 131 | CONFIG_USB_CDC_COMPOSITE=m |
131 | CONFIG_MMC=y | 132 | CONFIG_MMC=y |
133 | CONFIG_MMC_TEST=m | ||
132 | CONFIG_MMC_ATMELMCI=y | 134 | CONFIG_MMC_ATMELMCI=y |
133 | CONFIG_NEW_LEDS=y | 135 | CONFIG_NEW_LEDS=y |
134 | CONFIG_LEDS_CLASS=y | 136 | CONFIG_LEDS_CLASS=y |
@@ -143,11 +145,14 @@ CONFIG_EXT2_FS=y | |||
143 | CONFIG_EXT3_FS=y | 145 | CONFIG_EXT3_FS=y |
144 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set | 146 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set |
145 | # CONFIG_EXT3_FS_XATTR is not set | 147 | # CONFIG_EXT3_FS_XATTR is not set |
148 | CONFIG_EXT4_FS=y | ||
149 | # CONFIG_EXT4_FS_XATTR is not set | ||
146 | # CONFIG_DNOTIFY is not set | 150 | # CONFIG_DNOTIFY is not set |
147 | CONFIG_FUSE_FS=m | 151 | CONFIG_FUSE_FS=m |
148 | CONFIG_MSDOS_FS=m | 152 | CONFIG_MSDOS_FS=m |
149 | CONFIG_VFAT_FS=m | 153 | CONFIG_VFAT_FS=m |
150 | CONFIG_FAT_DEFAULT_CODEPAGE=850 | 154 | CONFIG_FAT_DEFAULT_CODEPAGE=850 |
155 | CONFIG_PROC_KCORE=y | ||
151 | CONFIG_TMPFS=y | 156 | CONFIG_TMPFS=y |
152 | CONFIG_CONFIGFS_FS=y | 157 | CONFIG_CONFIGFS_FS=y |
153 | CONFIG_JFFS2_FS=y | 158 | CONFIG_JFFS2_FS=y |
@@ -157,7 +162,6 @@ CONFIG_NFS_V3=y | |||
157 | CONFIG_ROOT_NFS=y | 162 | CONFIG_ROOT_NFS=y |
158 | CONFIG_NFSD=m | 163 | CONFIG_NFSD=m |
159 | CONFIG_NFSD_V3=y | 164 | CONFIG_NFSD_V3=y |
160 | CONFIG_SMB_FS=m | ||
161 | CONFIG_CIFS=m | 165 | CONFIG_CIFS=m |
162 | CONFIG_NLS_CODEPAGE_437=m | 166 | CONFIG_NLS_CODEPAGE_437=m |
163 | CONFIG_NLS_CODEPAGE_850=m | 167 | CONFIG_NLS_CODEPAGE_850=m |
@@ -168,4 +172,3 @@ CONFIG_DEBUG_FS=y | |||
168 | CONFIG_DEBUG_KERNEL=y | 172 | CONFIG_DEBUG_KERNEL=y |
169 | CONFIG_DETECT_HUNG_TASK=y | 173 | CONFIG_DETECT_HUNG_TASK=y |
170 | CONFIG_FRAME_POINTER=y | 174 | CONFIG_FRAME_POINTER=y |
171 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
diff --git a/arch/avr32/configs/atstk1002_defconfig b/arch/avr32/configs/atstk1002_defconfig index aec4c43a75d..4fb01f5ab42 100644 --- a/arch/avr32/configs/atstk1002_defconfig +++ b/arch/avr32/configs/atstk1002_defconfig | |||
@@ -3,7 +3,6 @@ CONFIG_EXPERIMENTAL=y | |||
3 | CONFIG_SYSVIPC=y | 3 | CONFIG_SYSVIPC=y |
4 | CONFIG_POSIX_MQUEUE=y | 4 | CONFIG_POSIX_MQUEUE=y |
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
7 | CONFIG_RELAY=y | 6 | CONFIG_RELAY=y |
8 | CONFIG_BLK_DEV_INITRD=y | 7 | CONFIG_BLK_DEV_INITRD=y |
9 | # CONFIG_SYSCTL_SYSCALL is not set | 8 | # CONFIG_SYSCTL_SYSCALL is not set |
@@ -11,7 +10,7 @@ CONFIG_BLK_DEV_INITRD=y | |||
11 | # CONFIG_COMPAT_BRK is not set | 10 | # CONFIG_COMPAT_BRK is not set |
12 | CONFIG_PROFILING=y | 11 | CONFIG_PROFILING=y |
13 | CONFIG_OPROFILE=m | 12 | CONFIG_OPROFILE=m |
14 | CONFIG_KPROBES=y | 13 | # CONFIG_KPROBES is not set |
15 | CONFIG_MODULES=y | 14 | CONFIG_MODULES=y |
16 | CONFIG_MODULE_UNLOAD=y | 15 | CONFIG_MODULE_UNLOAD=y |
17 | # CONFIG_BLK_DEV_BSG is not set | 16 | # CONFIG_BLK_DEV_BSG is not set |
@@ -26,6 +25,7 @@ CONFIG_CPU_FREQ=y | |||
26 | CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y | 25 | CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y |
27 | CONFIG_CPU_FREQ_GOV_USERSPACE=y | 26 | CONFIG_CPU_FREQ_GOV_USERSPACE=y |
28 | CONFIG_CPU_FREQ_AT32AP=y | 27 | CONFIG_CPU_FREQ_AT32AP=y |
28 | CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y | ||
29 | CONFIG_NET=y | 29 | CONFIG_NET=y |
30 | CONFIG_PACKET=y | 30 | CONFIG_PACKET=y |
31 | CONFIG_UNIX=y | 31 | CONFIG_UNIX=y |
@@ -35,6 +35,7 @@ CONFIG_INET=y | |||
35 | CONFIG_IP_PNP=y | 35 | CONFIG_IP_PNP=y |
36 | CONFIG_IP_PNP_DHCP=y | 36 | CONFIG_IP_PNP_DHCP=y |
37 | CONFIG_NET_IPIP=m | 37 | CONFIG_NET_IPIP=m |
38 | CONFIG_NET_IPGRE_DEMUX=m | ||
38 | CONFIG_NET_IPGRE=m | 39 | CONFIG_NET_IPGRE=m |
39 | CONFIG_INET_AH=m | 40 | CONFIG_INET_AH=m |
40 | CONFIG_INET_ESP=m | 41 | CONFIG_INET_ESP=m |
@@ -58,16 +59,14 @@ CONFIG_MTD_BLOCK=y | |||
58 | CONFIG_MTD_CFI=y | 59 | CONFIG_MTD_CFI=y |
59 | CONFIG_MTD_CFI_AMDSTD=y | 60 | CONFIG_MTD_CFI_AMDSTD=y |
60 | CONFIG_MTD_PHYSMAP=y | 61 | CONFIG_MTD_PHYSMAP=y |
61 | CONFIG_MTD_DATAFLASH=m | ||
62 | CONFIG_MTD_M25P80=m | ||
63 | CONFIG_MTD_UBI=y | 62 | CONFIG_MTD_UBI=y |
64 | CONFIG_BLK_DEV_LOOP=m | 63 | CONFIG_BLK_DEV_LOOP=m |
65 | CONFIG_BLK_DEV_NBD=m | 64 | CONFIG_BLK_DEV_NBD=m |
66 | CONFIG_BLK_DEV_RAM=m | 65 | CONFIG_BLK_DEV_RAM=m |
66 | CONFIG_MISC_DEVICES=y | ||
67 | CONFIG_ATMEL_PWM=m | 67 | CONFIG_ATMEL_PWM=m |
68 | CONFIG_ATMEL_TCLIB=y | 68 | CONFIG_ATMEL_TCLIB=y |
69 | CONFIG_ATMEL_SSC=m | 69 | CONFIG_ATMEL_SSC=m |
70 | CONFIG_EEPROM_AT24=m | ||
71 | # CONFIG_SCSI_PROC_FS is not set | 70 | # CONFIG_SCSI_PROC_FS is not set |
72 | CONFIG_BLK_DEV_SD=m | 71 | CONFIG_BLK_DEV_SD=m |
73 | CONFIG_BLK_DEV_SR=m | 72 | CONFIG_BLK_DEV_SR=m |
@@ -120,7 +119,6 @@ CONFIG_SND_MIXER_OSS=m | |||
120 | CONFIG_SND_PCM_OSS=m | 119 | CONFIG_SND_PCM_OSS=m |
121 | # CONFIG_SND_SUPPORT_OLD_API is not set | 120 | # CONFIG_SND_SUPPORT_OLD_API is not set |
122 | # CONFIG_SND_VERBOSE_PROCFS is not set | 121 | # CONFIG_SND_VERBOSE_PROCFS is not set |
123 | # CONFIG_SND_DRIVERS is not set | ||
124 | CONFIG_SND_AT73C213=m | 122 | CONFIG_SND_AT73C213=m |
125 | # CONFIG_HID_SUPPORT is not set | 123 | # CONFIG_HID_SUPPORT is not set |
126 | CONFIG_USB_GADGET=y | 124 | CONFIG_USB_GADGET=y |
@@ -131,16 +129,15 @@ CONFIG_USB_FILE_STORAGE=m | |||
131 | CONFIG_USB_G_SERIAL=m | 129 | CONFIG_USB_G_SERIAL=m |
132 | CONFIG_USB_CDC_COMPOSITE=m | 130 | CONFIG_USB_CDC_COMPOSITE=m |
133 | CONFIG_MMC=y | 131 | CONFIG_MMC=y |
132 | CONFIG_MMC_TEST=m | ||
134 | CONFIG_MMC_ATMELMCI=y | 133 | CONFIG_MMC_ATMELMCI=y |
135 | CONFIG_MMC_SPI=m | ||
136 | CONFIG_NEW_LEDS=y | 134 | CONFIG_NEW_LEDS=y |
137 | CONFIG_LEDS_CLASS=m | 135 | CONFIG_LEDS_CLASS=y |
138 | CONFIG_LEDS_ATMEL_PWM=m | 136 | CONFIG_LEDS_ATMEL_PWM=m |
139 | CONFIG_LEDS_GPIO=m | 137 | CONFIG_LEDS_GPIO=m |
140 | CONFIG_LEDS_TRIGGERS=y | 138 | CONFIG_LEDS_TRIGGERS=y |
141 | CONFIG_LEDS_TRIGGER_TIMER=m | 139 | CONFIG_LEDS_TRIGGER_TIMER=m |
142 | CONFIG_LEDS_TRIGGER_HEARTBEAT=m | 140 | CONFIG_LEDS_TRIGGER_HEARTBEAT=m |
143 | CONFIG_LEDS_TRIGGER_DEFAULT_ON=m | ||
144 | CONFIG_RTC_CLASS=y | 141 | CONFIG_RTC_CLASS=y |
145 | CONFIG_RTC_DRV_AT32AP700X=y | 142 | CONFIG_RTC_DRV_AT32AP700X=y |
146 | CONFIG_DMADEVICES=y | 143 | CONFIG_DMADEVICES=y |
@@ -149,20 +146,23 @@ CONFIG_EXT3_FS=y | |||
149 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set | 146 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set |
150 | # CONFIG_EXT3_FS_XATTR is not set | 147 | # CONFIG_EXT3_FS_XATTR is not set |
151 | CONFIG_EXT4_FS=y | 148 | CONFIG_EXT4_FS=y |
149 | # CONFIG_EXT4_FS_XATTR is not set | ||
152 | # CONFIG_DNOTIFY is not set | 150 | # CONFIG_DNOTIFY is not set |
153 | CONFIG_FUSE_FS=m | 151 | CONFIG_FUSE_FS=m |
154 | CONFIG_MSDOS_FS=m | 152 | CONFIG_MSDOS_FS=m |
155 | CONFIG_VFAT_FS=m | 153 | CONFIG_VFAT_FS=m |
154 | CONFIG_FAT_DEFAULT_CODEPAGE=850 | ||
156 | CONFIG_PROC_KCORE=y | 155 | CONFIG_PROC_KCORE=y |
157 | CONFIG_TMPFS=y | 156 | CONFIG_TMPFS=y |
157 | CONFIG_CONFIGFS_FS=y | ||
158 | CONFIG_JFFS2_FS=y | 158 | CONFIG_JFFS2_FS=y |
159 | # CONFIG_JFFS2_FS_WRITEBUFFER is not set | ||
160 | CONFIG_UBIFS_FS=y | 159 | CONFIG_UBIFS_FS=y |
161 | CONFIG_MINIX_FS=m | ||
162 | CONFIG_NFS_FS=y | 160 | CONFIG_NFS_FS=y |
163 | CONFIG_NFS_V3=y | 161 | CONFIG_NFS_V3=y |
164 | CONFIG_ROOT_NFS=y | 162 | CONFIG_ROOT_NFS=y |
163 | CONFIG_CIFS=m | ||
165 | CONFIG_NLS_CODEPAGE_437=m | 164 | CONFIG_NLS_CODEPAGE_437=m |
165 | CONFIG_NLS_CODEPAGE_850=m | ||
166 | CONFIG_NLS_ISO8859_1=m | 166 | CONFIG_NLS_ISO8859_1=m |
167 | CONFIG_NLS_UTF8=m | 167 | CONFIG_NLS_UTF8=m |
168 | CONFIG_MAGIC_SYSRQ=y | 168 | CONFIG_MAGIC_SYSRQ=y |
@@ -170,6 +170,3 @@ CONFIG_DEBUG_FS=y | |||
170 | CONFIG_DEBUG_KERNEL=y | 170 | CONFIG_DEBUG_KERNEL=y |
171 | CONFIG_DETECT_HUNG_TASK=y | 171 | CONFIG_DETECT_HUNG_TASK=y |
172 | CONFIG_FRAME_POINTER=y | 172 | CONFIG_FRAME_POINTER=y |
173 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
174 | # CONFIG_CRYPTO_HW is not set | ||
175 | CONFIG_CRC_T10DIF=m | ||
diff --git a/arch/avr32/configs/atstk1003_defconfig b/arch/avr32/configs/atstk1003_defconfig index 50ba3db682c..9faaf9b900f 100644 --- a/arch/avr32/configs/atstk1003_defconfig +++ b/arch/avr32/configs/atstk1003_defconfig | |||
@@ -2,22 +2,15 @@ CONFIG_EXPERIMENTAL=y | |||
2 | # CONFIG_LOCALVERSION_AUTO is not set | 2 | # CONFIG_LOCALVERSION_AUTO is not set |
3 | CONFIG_SYSVIPC=y | 3 | CONFIG_SYSVIPC=y |
4 | CONFIG_POSIX_MQUEUE=y | 4 | CONFIG_POSIX_MQUEUE=y |
5 | CONFIG_BSD_PROCESS_ACCT=y | ||
6 | CONFIG_BSD_PROCESS_ACCT_V3=y | ||
7 | CONFIG_TASKSTATS=y | ||
8 | CONFIG_TASK_DELAY_ACCT=y | ||
9 | CONFIG_AUDIT=y | ||
10 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
11 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
12 | CONFIG_RELAY=y | 6 | CONFIG_RELAY=y |
13 | CONFIG_BLK_DEV_INITRD=y | 7 | CONFIG_BLK_DEV_INITRD=y |
14 | # CONFIG_SYSCTL_SYSCALL is not set | 8 | # CONFIG_SYSCTL_SYSCALL is not set |
15 | # CONFIG_BASE_FULL is not set | 9 | # CONFIG_BASE_FULL is not set |
16 | # CONFIG_SLUB_DEBUG is not set | ||
17 | # CONFIG_COMPAT_BRK is not set | 10 | # CONFIG_COMPAT_BRK is not set |
18 | CONFIG_PROFILING=y | 11 | CONFIG_PROFILING=y |
19 | CONFIG_OPROFILE=m | 12 | CONFIG_OPROFILE=m |
20 | CONFIG_KPROBES=y | 13 | # CONFIG_KPROBES is not set |
21 | CONFIG_MODULES=y | 14 | CONFIG_MODULES=y |
22 | CONFIG_MODULE_UNLOAD=y | 15 | CONFIG_MODULE_UNLOAD=y |
23 | # CONFIG_BLK_DEV_BSG is not set | 16 | # CONFIG_BLK_DEV_BSG is not set |
@@ -33,6 +26,7 @@ CONFIG_CPU_FREQ=y | |||
33 | CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y | 26 | CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y |
34 | CONFIG_CPU_FREQ_GOV_USERSPACE=y | 27 | CONFIG_CPU_FREQ_GOV_USERSPACE=y |
35 | CONFIG_CPU_FREQ_AT32AP=y | 28 | CONFIG_CPU_FREQ_AT32AP=y |
29 | CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y | ||
36 | CONFIG_NET=y | 30 | CONFIG_NET=y |
37 | CONFIG_PACKET=y | 31 | CONFIG_PACKET=y |
38 | CONFIG_UNIX=y | 32 | CONFIG_UNIX=y |
@@ -54,18 +48,18 @@ CONFIG_MTD_BLOCK=y | |||
54 | CONFIG_MTD_CFI=y | 48 | CONFIG_MTD_CFI=y |
55 | CONFIG_MTD_CFI_AMDSTD=y | 49 | CONFIG_MTD_CFI_AMDSTD=y |
56 | CONFIG_MTD_PHYSMAP=y | 50 | CONFIG_MTD_PHYSMAP=y |
57 | CONFIG_MTD_DATAFLASH=m | 51 | CONFIG_MTD_UBI=y |
58 | CONFIG_MTD_M25P80=m | ||
59 | CONFIG_BLK_DEV_LOOP=m | 52 | CONFIG_BLK_DEV_LOOP=m |
60 | CONFIG_BLK_DEV_NBD=m | 53 | CONFIG_BLK_DEV_NBD=m |
61 | CONFIG_BLK_DEV_RAM=m | 54 | CONFIG_BLK_DEV_RAM=m |
55 | CONFIG_MISC_DEVICES=y | ||
62 | CONFIG_ATMEL_PWM=m | 56 | CONFIG_ATMEL_PWM=m |
63 | CONFIG_ATMEL_TCLIB=y | 57 | CONFIG_ATMEL_TCLIB=y |
64 | CONFIG_ATMEL_SSC=m | 58 | CONFIG_ATMEL_SSC=m |
65 | CONFIG_EEPROM_AT24=m | ||
66 | # CONFIG_SCSI_PROC_FS is not set | 59 | # CONFIG_SCSI_PROC_FS is not set |
67 | CONFIG_BLK_DEV_SD=m | 60 | CONFIG_BLK_DEV_SD=m |
68 | CONFIG_BLK_DEV_SR=m | 61 | CONFIG_BLK_DEV_SR=m |
62 | # CONFIG_SCSI_LOWLEVEL is not set | ||
69 | CONFIG_ATA=m | 63 | CONFIG_ATA=m |
70 | # CONFIG_SATA_PMP is not set | 64 | # CONFIG_SATA_PMP is not set |
71 | CONFIG_PATA_AT32=m | 65 | CONFIG_PATA_AT32=m |
@@ -77,6 +71,7 @@ CONFIG_PPP_ASYNC=m | |||
77 | CONFIG_PPP_DEFLATE=m | 71 | CONFIG_PPP_DEFLATE=m |
78 | CONFIG_PPP_BSDCOMP=m | 72 | CONFIG_PPP_BSDCOMP=m |
79 | CONFIG_INPUT=m | 73 | CONFIG_INPUT=m |
74 | CONFIG_INPUT_EVDEV=m | ||
80 | # CONFIG_KEYBOARD_ATKBD is not set | 75 | # CONFIG_KEYBOARD_ATKBD is not set |
81 | CONFIG_KEYBOARD_GPIO=m | 76 | CONFIG_KEYBOARD_GPIO=m |
82 | # CONFIG_MOUSE_PS2 is not set | 77 | # CONFIG_MOUSE_PS2 is not set |
@@ -106,7 +101,6 @@ CONFIG_SND_PCM_OSS=m | |||
106 | CONFIG_SND_AT73C213=m | 101 | CONFIG_SND_AT73C213=m |
107 | # CONFIG_HID_SUPPORT is not set | 102 | # CONFIG_HID_SUPPORT is not set |
108 | CONFIG_USB_GADGET=y | 103 | CONFIG_USB_GADGET=y |
109 | CONFIG_USB_GADGET_DEBUG_FS=y | ||
110 | CONFIG_USB_ZERO=m | 104 | CONFIG_USB_ZERO=m |
111 | CONFIG_USB_ETH=m | 105 | CONFIG_USB_ETH=m |
112 | CONFIG_USB_GADGETFS=m | 106 | CONFIG_USB_GADGETFS=m |
@@ -116,36 +110,39 @@ CONFIG_USB_CDC_COMPOSITE=m | |||
116 | CONFIG_MMC=y | 110 | CONFIG_MMC=y |
117 | CONFIG_MMC_TEST=m | 111 | CONFIG_MMC_TEST=m |
118 | CONFIG_MMC_ATMELMCI=y | 112 | CONFIG_MMC_ATMELMCI=y |
119 | CONFIG_MMC_SPI=m | ||
120 | CONFIG_NEW_LEDS=y | 113 | CONFIG_NEW_LEDS=y |
121 | CONFIG_LEDS_CLASS=y | 114 | CONFIG_LEDS_CLASS=y |
122 | CONFIG_LEDS_ATMEL_PWM=m | 115 | CONFIG_LEDS_ATMEL_PWM=m |
123 | CONFIG_LEDS_GPIO=y | 116 | CONFIG_LEDS_GPIO=m |
124 | CONFIG_LEDS_TRIGGERS=y | 117 | CONFIG_LEDS_TRIGGERS=y |
125 | CONFIG_LEDS_TRIGGER_TIMER=y | 118 | CONFIG_LEDS_TRIGGER_TIMER=m |
126 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y | 119 | CONFIG_LEDS_TRIGGER_HEARTBEAT=m |
127 | CONFIG_LEDS_TRIGGER_DEFAULT_ON=y | ||
128 | CONFIG_RTC_CLASS=y | 120 | CONFIG_RTC_CLASS=y |
129 | CONFIG_RTC_DRV_AT32AP700X=y | 121 | CONFIG_RTC_DRV_AT32AP700X=y |
130 | CONFIG_DMADEVICES=y | 122 | CONFIG_DMADEVICES=y |
131 | CONFIG_DW_DMAC=y | 123 | CONFIG_EXT2_FS=y |
132 | CONFIG_EXT2_FS=m | 124 | CONFIG_EXT3_FS=y |
133 | CONFIG_EXT3_FS=m | 125 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set |
134 | # CONFIG_EXT3_FS_XATTR is not set | 126 | # CONFIG_EXT3_FS_XATTR is not set |
127 | CONFIG_EXT4_FS=y | ||
128 | # CONFIG_EXT4_FS_XATTR is not set | ||
135 | # CONFIG_DNOTIFY is not set | 129 | # CONFIG_DNOTIFY is not set |
136 | CONFIG_FUSE_FS=m | 130 | CONFIG_FUSE_FS=m |
137 | CONFIG_MSDOS_FS=m | 131 | CONFIG_MSDOS_FS=m |
138 | CONFIG_VFAT_FS=m | 132 | CONFIG_VFAT_FS=m |
133 | CONFIG_FAT_DEFAULT_CODEPAGE=850 | ||
139 | CONFIG_PROC_KCORE=y | 134 | CONFIG_PROC_KCORE=y |
140 | CONFIG_TMPFS=y | 135 | CONFIG_TMPFS=y |
141 | CONFIG_CONFIGFS_FS=m | 136 | CONFIG_CONFIGFS_FS=y |
142 | CONFIG_JFFS2_FS=y | 137 | CONFIG_JFFS2_FS=y |
138 | CONFIG_UBIFS_FS=y | ||
143 | # CONFIG_NETWORK_FILESYSTEMS is not set | 139 | # CONFIG_NETWORK_FILESYSTEMS is not set |
144 | CONFIG_NLS_CODEPAGE_437=m | 140 | CONFIG_NLS_CODEPAGE_437=m |
141 | CONFIG_NLS_CODEPAGE_850=m | ||
145 | CONFIG_NLS_ISO8859_1=m | 142 | CONFIG_NLS_ISO8859_1=m |
146 | CONFIG_NLS_UTF8=m | 143 | CONFIG_NLS_UTF8=m |
147 | CONFIG_MAGIC_SYSRQ=y | 144 | CONFIG_MAGIC_SYSRQ=y |
148 | CONFIG_DEBUG_FS=y | 145 | CONFIG_DEBUG_FS=y |
149 | CONFIG_DEBUG_KERNEL=y | 146 | CONFIG_DEBUG_KERNEL=y |
147 | CONFIG_DETECT_HUNG_TASK=y | ||
150 | CONFIG_FRAME_POINTER=y | 148 | CONFIG_FRAME_POINTER=y |
151 | CONFIG_CRC_T10DIF=m | ||
diff --git a/arch/avr32/configs/atstk1004_defconfig b/arch/avr32/configs/atstk1004_defconfig index 329e10ba3b5..3d2a5d85f97 100644 --- a/arch/avr32/configs/atstk1004_defconfig +++ b/arch/avr32/configs/atstk1004_defconfig | |||
@@ -1,19 +1,32 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | 1 | CONFIG_EXPERIMENTAL=y |
2 | # CONFIG_LOCALVERSION_AUTO is not set | 2 | # CONFIG_LOCALVERSION_AUTO is not set |
3 | CONFIG_SYSVIPC=y | ||
4 | CONFIG_POSIX_MQUEUE=y | ||
3 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
4 | CONFIG_SYSFS_DEPRECATED_V2=y | 6 | CONFIG_RELAY=y |
7 | CONFIG_BLK_DEV_INITRD=y | ||
5 | # CONFIG_SYSCTL_SYSCALL is not set | 8 | # CONFIG_SYSCTL_SYSCALL is not set |
6 | # CONFIG_BASE_FULL is not set | 9 | # CONFIG_BASE_FULL is not set |
7 | # CONFIG_FUTEX is not set | ||
8 | # CONFIG_EPOLL is not set | ||
9 | # CONFIG_SIGNALFD is not set | ||
10 | # CONFIG_TIMERFD is not set | ||
11 | # CONFIG_EVENTFD is not set | ||
12 | # CONFIG_COMPAT_BRK is not set | 10 | # CONFIG_COMPAT_BRK is not set |
13 | CONFIG_SLOB=y | 11 | CONFIG_PROFILING=y |
14 | # CONFIG_BLOCK is not set | 12 | CONFIG_OPROFILE=m |
13 | # CONFIG_KPROBES is not set | ||
14 | CONFIG_MODULES=y | ||
15 | CONFIG_MODULE_UNLOAD=y | ||
16 | # CONFIG_BLK_DEV_BSG is not set | ||
17 | # CONFIG_IOSCHED_DEADLINE is not set | ||
18 | CONFIG_NO_HZ=y | ||
19 | CONFIG_HIGH_RES_TIMERS=y | ||
15 | CONFIG_BOARD_ATSTK1004=y | 20 | CONFIG_BOARD_ATSTK1004=y |
16 | # CONFIG_OWNERSHIP_TRACE is not set | 21 | # CONFIG_OWNERSHIP_TRACE is not set |
22 | CONFIG_NMI_DEBUGGING=y | ||
23 | CONFIG_PM=y | ||
24 | CONFIG_CPU_FREQ=y | ||
25 | # CONFIG_CPU_FREQ_STAT is not set | ||
26 | CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y | ||
27 | CONFIG_CPU_FREQ_GOV_USERSPACE=y | ||
28 | CONFIG_CPU_FREQ_AT32AP=y | ||
29 | CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y | ||
17 | CONFIG_NET=y | 30 | CONFIG_NET=y |
18 | CONFIG_PACKET=y | 31 | CONFIG_PACKET=y |
19 | CONFIG_UNIX=y | 32 | CONFIG_UNIX=y |
@@ -31,40 +44,104 @@ CONFIG_MTD=y | |||
31 | CONFIG_MTD_PARTITIONS=y | 44 | CONFIG_MTD_PARTITIONS=y |
32 | CONFIG_MTD_CMDLINE_PARTS=y | 45 | CONFIG_MTD_CMDLINE_PARTS=y |
33 | CONFIG_MTD_CHAR=y | 46 | CONFIG_MTD_CHAR=y |
47 | CONFIG_MTD_BLOCK=y | ||
34 | CONFIG_MTD_CFI=y | 48 | CONFIG_MTD_CFI=y |
35 | CONFIG_MTD_CFI_AMDSTD=y | 49 | CONFIG_MTD_CFI_AMDSTD=y |
36 | CONFIG_MTD_PHYSMAP=y | 50 | CONFIG_MTD_PHYSMAP=y |
37 | # CONFIG_MISC_DEVICES is not set | 51 | CONFIG_MTD_UBI=y |
38 | # CONFIG_INPUT is not set | 52 | CONFIG_BLK_DEV_LOOP=m |
53 | CONFIG_BLK_DEV_NBD=m | ||
54 | CONFIG_BLK_DEV_RAM=m | ||
55 | CONFIG_MISC_DEVICES=y | ||
56 | CONFIG_ATMEL_PWM=m | ||
57 | CONFIG_ATMEL_TCLIB=y | ||
58 | CONFIG_ATMEL_SSC=m | ||
59 | # CONFIG_SCSI_PROC_FS is not set | ||
60 | CONFIG_BLK_DEV_SD=m | ||
61 | CONFIG_BLK_DEV_SR=m | ||
62 | # CONFIG_SCSI_LOWLEVEL is not set | ||
63 | CONFIG_ATA=m | ||
64 | # CONFIG_SATA_PMP is not set | ||
65 | CONFIG_PATA_AT32=m | ||
66 | CONFIG_NETDEVICES=y | ||
67 | # CONFIG_NETDEV_1000 is not set | ||
68 | # CONFIG_NETDEV_10000 is not set | ||
69 | CONFIG_PPP=m | ||
70 | CONFIG_PPP_ASYNC=m | ||
71 | CONFIG_PPP_DEFLATE=m | ||
72 | CONFIG_PPP_BSDCOMP=m | ||
73 | CONFIG_INPUT=m | ||
74 | CONFIG_INPUT_EVDEV=m | ||
75 | # CONFIG_KEYBOARD_ATKBD is not set | ||
76 | CONFIG_KEYBOARD_GPIO=m | ||
77 | # CONFIG_MOUSE_PS2 is not set | ||
78 | CONFIG_MOUSE_GPIO=m | ||
39 | # CONFIG_SERIO is not set | 79 | # CONFIG_SERIO is not set |
40 | # CONFIG_VT is not set | 80 | # CONFIG_VT is not set |
41 | # CONFIG_DEVKMEM is not set | 81 | # CONFIG_DEVKMEM is not set |
42 | CONFIG_SERIAL_ATMEL=y | 82 | CONFIG_SERIAL_ATMEL=y |
43 | CONFIG_SERIAL_ATMEL_CONSOLE=y | 83 | CONFIG_SERIAL_ATMEL_CONSOLE=y |
44 | # CONFIG_SERIAL_ATMEL_PDC is not set | ||
45 | # CONFIG_LEGACY_PTYS is not set | 84 | # CONFIG_LEGACY_PTYS is not set |
46 | # CONFIG_HW_RANDOM is not set | 85 | # CONFIG_HW_RANDOM is not set |
86 | CONFIG_I2C=m | ||
87 | CONFIG_I2C_CHARDEV=m | ||
88 | CONFIG_I2C_GPIO=m | ||
47 | CONFIG_SPI=y | 89 | CONFIG_SPI=y |
48 | CONFIG_SPI_ATMEL=y | 90 | CONFIG_SPI_ATMEL=y |
91 | CONFIG_SPI_SPIDEV=m | ||
92 | CONFIG_GPIO_SYSFS=y | ||
49 | # CONFIG_HWMON is not set | 93 | # CONFIG_HWMON is not set |
50 | CONFIG_WATCHDOG=y | 94 | CONFIG_WATCHDOG=y |
51 | CONFIG_AT32AP700X_WDT=y | 95 | CONFIG_AT32AP700X_WDT=y |
52 | CONFIG_FB=y | 96 | CONFIG_FB=y |
53 | CONFIG_FB_ATMEL=y | 97 | CONFIG_FB_ATMEL=y |
54 | CONFIG_BACKLIGHT_LCD_SUPPORT=y | 98 | CONFIG_BACKLIGHT_LCD_SUPPORT=y |
99 | CONFIG_LCD_CLASS_DEVICE=y | ||
55 | CONFIG_LCD_LTV350QV=y | 100 | CONFIG_LCD_LTV350QV=y |
56 | # CONFIG_BACKLIGHT_CLASS_DEVICE is not set | 101 | # CONFIG_BACKLIGHT_CLASS_DEVICE is not set |
57 | CONFIG_USB_GADGET=y | 102 | CONFIG_USB_GADGET=y |
58 | CONFIG_USB_ETH=y | 103 | CONFIG_USB_ZERO=m |
59 | # CONFIG_USB_ETH_RNDIS is not set | 104 | CONFIG_USB_ETH=m |
105 | CONFIG_USB_GADGETFS=m | ||
106 | CONFIG_USB_FILE_STORAGE=m | ||
107 | CONFIG_USB_G_SERIAL=m | ||
108 | CONFIG_USB_CDC_COMPOSITE=m | ||
109 | CONFIG_MMC=y | ||
110 | CONFIG_MMC_TEST=m | ||
111 | CONFIG_MMC_ATMELMCI=y | ||
112 | CONFIG_NEW_LEDS=y | ||
113 | CONFIG_LEDS_CLASS=y | ||
114 | CONFIG_LEDS_ATMEL_PWM=m | ||
115 | CONFIG_LEDS_GPIO=m | ||
116 | CONFIG_LEDS_TRIGGERS=y | ||
117 | CONFIG_LEDS_TRIGGER_TIMER=m | ||
118 | CONFIG_LEDS_TRIGGER_HEARTBEAT=m | ||
60 | CONFIG_RTC_CLASS=y | 119 | CONFIG_RTC_CLASS=y |
61 | # CONFIG_RTC_INTF_PROC is not set | ||
62 | CONFIG_RTC_DRV_AT32AP700X=y | 120 | CONFIG_RTC_DRV_AT32AP700X=y |
121 | CONFIG_DMADEVICES=y | ||
122 | CONFIG_EXT2_FS=y | ||
123 | CONFIG_EXT3_FS=y | ||
124 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set | ||
125 | # CONFIG_EXT3_FS_XATTR is not set | ||
126 | CONFIG_EXT4_FS=y | ||
127 | # CONFIG_EXT4_FS_XATTR is not set | ||
63 | # CONFIG_DNOTIFY is not set | 128 | # CONFIG_DNOTIFY is not set |
129 | CONFIG_FUSE_FS=m | ||
130 | CONFIG_MSDOS_FS=m | ||
131 | CONFIG_VFAT_FS=m | ||
132 | CONFIG_FAT_DEFAULT_CODEPAGE=850 | ||
64 | CONFIG_PROC_KCORE=y | 133 | CONFIG_PROC_KCORE=y |
65 | # CONFIG_PROC_PAGE_MONITOR is not set | ||
66 | CONFIG_TMPFS=y | 134 | CONFIG_TMPFS=y |
135 | CONFIG_CONFIGFS_FS=y | ||
67 | CONFIG_JFFS2_FS=y | 136 | CONFIG_JFFS2_FS=y |
68 | # CONFIG_JFFS2_FS_WRITEBUFFER is not set | 137 | CONFIG_UBIFS_FS=y |
69 | # CONFIG_NETWORK_FILESYSTEMS is not set | 138 | # CONFIG_NETWORK_FILESYSTEMS is not set |
139 | CONFIG_NLS_CODEPAGE_437=m | ||
140 | CONFIG_NLS_CODEPAGE_850=m | ||
141 | CONFIG_NLS_ISO8859_1=m | ||
142 | CONFIG_NLS_UTF8=m | ||
70 | CONFIG_MAGIC_SYSRQ=y | 143 | CONFIG_MAGIC_SYSRQ=y |
144 | CONFIG_DEBUG_FS=y | ||
145 | CONFIG_DEBUG_KERNEL=y | ||
146 | CONFIG_DETECT_HUNG_TASK=y | ||
147 | CONFIG_FRAME_POINTER=y | ||
diff --git a/arch/avr32/configs/atstk1006_defconfig b/arch/avr32/configs/atstk1006_defconfig index dbcc1b51e50..1ed8f22d4fe 100644 --- a/arch/avr32/configs/atstk1006_defconfig +++ b/arch/avr32/configs/atstk1006_defconfig | |||
@@ -3,7 +3,6 @@ CONFIG_EXPERIMENTAL=y | |||
3 | CONFIG_SYSVIPC=y | 3 | CONFIG_SYSVIPC=y |
4 | CONFIG_POSIX_MQUEUE=y | 4 | CONFIG_POSIX_MQUEUE=y |
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
7 | CONFIG_RELAY=y | 6 | CONFIG_RELAY=y |
8 | CONFIG_BLK_DEV_INITRD=y | 7 | CONFIG_BLK_DEV_INITRD=y |
9 | # CONFIG_SYSCTL_SYSCALL is not set | 8 | # CONFIG_SYSCTL_SYSCALL is not set |
@@ -11,7 +10,7 @@ CONFIG_BLK_DEV_INITRD=y | |||
11 | # CONFIG_COMPAT_BRK is not set | 10 | # CONFIG_COMPAT_BRK is not set |
12 | CONFIG_PROFILING=y | 11 | CONFIG_PROFILING=y |
13 | CONFIG_OPROFILE=m | 12 | CONFIG_OPROFILE=m |
14 | CONFIG_KPROBES=y | 13 | # CONFIG_KPROBES is not set |
15 | CONFIG_MODULES=y | 14 | CONFIG_MODULES=y |
16 | CONFIG_MODULE_UNLOAD=y | 15 | CONFIG_MODULE_UNLOAD=y |
17 | # CONFIG_BLK_DEV_BSG is not set | 16 | # CONFIG_BLK_DEV_BSG is not set |
@@ -37,6 +36,7 @@ CONFIG_INET=y | |||
37 | CONFIG_IP_PNP=y | 36 | CONFIG_IP_PNP=y |
38 | CONFIG_IP_PNP_DHCP=y | 37 | CONFIG_IP_PNP_DHCP=y |
39 | CONFIG_NET_IPIP=m | 38 | CONFIG_NET_IPIP=m |
39 | CONFIG_NET_IPGRE_DEMUX=m | ||
40 | CONFIG_NET_IPGRE=m | 40 | CONFIG_NET_IPGRE=m |
41 | CONFIG_INET_AH=m | 41 | CONFIG_INET_AH=m |
42 | CONFIG_INET_ESP=m | 42 | CONFIG_INET_ESP=m |
@@ -60,15 +60,13 @@ CONFIG_MTD_BLOCK=y | |||
60 | CONFIG_MTD_CFI=y | 60 | CONFIG_MTD_CFI=y |
61 | CONFIG_MTD_CFI_AMDSTD=y | 61 | CONFIG_MTD_CFI_AMDSTD=y |
62 | CONFIG_MTD_PHYSMAP=y | 62 | CONFIG_MTD_PHYSMAP=y |
63 | CONFIG_MTD_DATAFLASH=m | ||
64 | CONFIG_MTD_DATAFLASH_OTP=y | ||
65 | CONFIG_MTD_M25P80=m | ||
66 | CONFIG_MTD_NAND=y | 63 | CONFIG_MTD_NAND=y |
67 | CONFIG_MTD_NAND_ATMEL=y | 64 | CONFIG_MTD_NAND_ATMEL=y |
68 | CONFIG_MTD_UBI=y | 65 | CONFIG_MTD_UBI=y |
69 | CONFIG_BLK_DEV_LOOP=m | 66 | CONFIG_BLK_DEV_LOOP=m |
70 | CONFIG_BLK_DEV_NBD=m | 67 | CONFIG_BLK_DEV_NBD=m |
71 | CONFIG_BLK_DEV_RAM=m | 68 | CONFIG_BLK_DEV_RAM=m |
69 | CONFIG_MISC_DEVICES=y | ||
72 | CONFIG_ATMEL_PWM=m | 70 | CONFIG_ATMEL_PWM=m |
73 | CONFIG_ATMEL_TCLIB=y | 71 | CONFIG_ATMEL_TCLIB=y |
74 | CONFIG_ATMEL_SSC=m | 72 | CONFIG_ATMEL_SSC=m |
@@ -132,17 +130,17 @@ CONFIG_USB_ETH=m | |||
132 | CONFIG_USB_GADGETFS=m | 130 | CONFIG_USB_GADGETFS=m |
133 | CONFIG_USB_FILE_STORAGE=m | 131 | CONFIG_USB_FILE_STORAGE=m |
134 | CONFIG_USB_G_SERIAL=m | 132 | CONFIG_USB_G_SERIAL=m |
133 | CONFIG_USB_CDC_COMPOSITE=m | ||
135 | CONFIG_MMC=y | 134 | CONFIG_MMC=y |
135 | CONFIG_MMC_TEST=m | ||
136 | CONFIG_MMC_ATMELMCI=y | 136 | CONFIG_MMC_ATMELMCI=y |
137 | CONFIG_MMC_SPI=m | ||
138 | CONFIG_NEW_LEDS=y | 137 | CONFIG_NEW_LEDS=y |
139 | CONFIG_LEDS_CLASS=m | 138 | CONFIG_LEDS_CLASS=y |
140 | CONFIG_LEDS_ATMEL_PWM=m | 139 | CONFIG_LEDS_ATMEL_PWM=m |
141 | CONFIG_LEDS_GPIO=m | 140 | CONFIG_LEDS_GPIO=m |
142 | CONFIG_LEDS_TRIGGERS=y | 141 | CONFIG_LEDS_TRIGGERS=y |
143 | CONFIG_LEDS_TRIGGER_TIMER=m | 142 | CONFIG_LEDS_TRIGGER_TIMER=m |
144 | CONFIG_LEDS_TRIGGER_HEARTBEAT=m | 143 | CONFIG_LEDS_TRIGGER_HEARTBEAT=m |
145 | CONFIG_LEDS_TRIGGER_DEFAULT_ON=m | ||
146 | CONFIG_RTC_CLASS=y | 144 | CONFIG_RTC_CLASS=y |
147 | CONFIG_RTC_DRV_AT32AP700X=y | 145 | CONFIG_RTC_DRV_AT32AP700X=y |
148 | CONFIG_DMADEVICES=y | 146 | CONFIG_DMADEVICES=y |
@@ -156,15 +154,18 @@ CONFIG_EXT4_FS=y | |||
156 | CONFIG_FUSE_FS=m | 154 | CONFIG_FUSE_FS=m |
157 | CONFIG_MSDOS_FS=m | 155 | CONFIG_MSDOS_FS=m |
158 | CONFIG_VFAT_FS=m | 156 | CONFIG_VFAT_FS=m |
157 | CONFIG_FAT_DEFAULT_CODEPAGE=850 | ||
159 | CONFIG_PROC_KCORE=y | 158 | CONFIG_PROC_KCORE=y |
160 | CONFIG_TMPFS=y | 159 | CONFIG_TMPFS=y |
160 | CONFIG_CONFIGFS_FS=y | ||
161 | CONFIG_JFFS2_FS=y | 161 | CONFIG_JFFS2_FS=y |
162 | CONFIG_UBIFS_FS=y | 162 | CONFIG_UBIFS_FS=y |
163 | CONFIG_MINIX_FS=m | ||
164 | CONFIG_NFS_FS=y | 163 | CONFIG_NFS_FS=y |
165 | CONFIG_NFS_V3=y | 164 | CONFIG_NFS_V3=y |
166 | CONFIG_ROOT_NFS=y | 165 | CONFIG_ROOT_NFS=y |
166 | CONFIG_CIFS=m | ||
167 | CONFIG_NLS_CODEPAGE_437=m | 167 | CONFIG_NLS_CODEPAGE_437=m |
168 | CONFIG_NLS_CODEPAGE_850=m | ||
168 | CONFIG_NLS_ISO8859_1=m | 169 | CONFIG_NLS_ISO8859_1=m |
169 | CONFIG_NLS_UTF8=m | 170 | CONFIG_NLS_UTF8=m |
170 | CONFIG_MAGIC_SYSRQ=y | 171 | CONFIG_MAGIC_SYSRQ=y |
@@ -172,7 +173,3 @@ CONFIG_DEBUG_FS=y | |||
172 | CONFIG_DEBUG_KERNEL=y | 173 | CONFIG_DEBUG_KERNEL=y |
173 | CONFIG_DETECT_HUNG_TASK=y | 174 | CONFIG_DETECT_HUNG_TASK=y |
174 | CONFIG_FRAME_POINTER=y | 175 | CONFIG_FRAME_POINTER=y |
175 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
176 | CONFIG_CRYPTO_FIPS=y | ||
177 | # CONFIG_CRYPTO_HW is not set | ||
178 | CONFIG_CRC_T10DIF=m | ||
diff --git a/arch/avr32/configs/favr-32_defconfig b/arch/avr32/configs/favr-32_defconfig index 0c813b661a0..aeadc955db3 100644 --- a/arch/avr32/configs/favr-32_defconfig +++ b/arch/avr32/configs/favr-32_defconfig | |||
@@ -11,7 +11,7 @@ CONFIG_BLK_DEV_INITRD=y | |||
11 | # CONFIG_COMPAT_BRK is not set | 11 | # CONFIG_COMPAT_BRK is not set |
12 | CONFIG_PROFILING=y | 12 | CONFIG_PROFILING=y |
13 | CONFIG_OPROFILE=m | 13 | CONFIG_OPROFILE=m |
14 | CONFIG_KPROBES=y | 14 | # CONFIG_KPROBES is not set |
15 | CONFIG_MODULES=y | 15 | CONFIG_MODULES=y |
16 | CONFIG_MODULE_UNLOAD=y | 16 | CONFIG_MODULE_UNLOAD=y |
17 | # CONFIG_BLK_DEV_BSG is not set | 17 | # CONFIG_BLK_DEV_BSG is not set |
diff --git a/arch/avr32/configs/hammerhead_defconfig b/arch/avr32/configs/hammerhead_defconfig index dcc01f0eb29..1692beeb7ed 100644 --- a/arch/avr32/configs/hammerhead_defconfig +++ b/arch/avr32/configs/hammerhead_defconfig | |||
@@ -12,7 +12,7 @@ CONFIG_BLK_DEV_INITRD=y | |||
12 | # CONFIG_COMPAT_BRK is not set | 12 | # CONFIG_COMPAT_BRK is not set |
13 | CONFIG_PROFILING=y | 13 | CONFIG_PROFILING=y |
14 | CONFIG_OPROFILE=m | 14 | CONFIG_OPROFILE=m |
15 | CONFIG_KPROBES=y | 15 | # CONFIG_KPROBES is not set |
16 | CONFIG_MODULES=y | 16 | CONFIG_MODULES=y |
17 | CONFIG_MODULE_UNLOAD=y | 17 | CONFIG_MODULE_UNLOAD=y |
18 | CONFIG_MODULE_FORCE_UNLOAD=y | 18 | CONFIG_MODULE_FORCE_UNLOAD=y |
diff --git a/arch/avr32/include/asm/pgalloc.h b/arch/avr32/include/asm/pgalloc.h index 92ecd8446ef..bc7e8ae479e 100644 --- a/arch/avr32/include/asm/pgalloc.h +++ b/arch/avr32/include/asm/pgalloc.h | |||
@@ -8,6 +8,7 @@ | |||
8 | #ifndef __ASM_AVR32_PGALLOC_H | 8 | #ifndef __ASM_AVR32_PGALLOC_H |
9 | #define __ASM_AVR32_PGALLOC_H | 9 | #define __ASM_AVR32_PGALLOC_H |
10 | 10 | ||
11 | #include <linux/mm.h> | ||
11 | #include <linux/quicklist.h> | 12 | #include <linux/quicklist.h> |
12 | #include <asm/page.h> | 13 | #include <asm/page.h> |
13 | #include <asm/pgtable.h> | 14 | #include <asm/pgtable.h> |
diff --git a/arch/avr32/include/asm/syscalls.h b/arch/avr32/include/asm/syscalls.h index ab608b70b24..244f2acab54 100644 --- a/arch/avr32/include/asm/syscalls.h +++ b/arch/avr32/include/asm/syscalls.h | |||
@@ -15,20 +15,6 @@ | |||
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
16 | #include <linux/signal.h> | 16 | #include <linux/signal.h> |
17 | 17 | ||
18 | /* kernel/process.c */ | ||
19 | asmlinkage int sys_fork(struct pt_regs *); | ||
20 | asmlinkage int sys_clone(unsigned long, unsigned long, | ||
21 | unsigned long, unsigned long, | ||
22 | struct pt_regs *); | ||
23 | asmlinkage int sys_vfork(struct pt_regs *); | ||
24 | asmlinkage int sys_execve(const char __user *, char __user *__user *, | ||
25 | char __user *__user *, struct pt_regs *); | ||
26 | |||
27 | /* kernel/signal.c */ | ||
28 | asmlinkage int sys_sigaltstack(const stack_t __user *, stack_t __user *, | ||
29 | struct pt_regs *); | ||
30 | asmlinkage int sys_rt_sigreturn(struct pt_regs *); | ||
31 | |||
32 | /* mm/cache.c */ | 18 | /* mm/cache.c */ |
33 | asmlinkage int sys_cacheflush(int, void __user *, size_t); | 19 | asmlinkage int sys_cacheflush(int, void __user *, size_t); |
34 | 20 | ||
diff --git a/arch/avr32/kernel/process.c b/arch/avr32/kernel/process.c index 9c46aaad11c..ef5a2a08fcc 100644 --- a/arch/avr32/kernel/process.c +++ b/arch/avr32/kernel/process.c | |||
@@ -367,14 +367,13 @@ asmlinkage int sys_fork(struct pt_regs *regs) | |||
367 | } | 367 | } |
368 | 368 | ||
369 | asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, | 369 | asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, |
370 | unsigned long parent_tidptr, | 370 | void __user *parent_tidptr, void __user *child_tidptr, |
371 | unsigned long child_tidptr, struct pt_regs *regs) | 371 | struct pt_regs *regs) |
372 | { | 372 | { |
373 | if (!newsp) | 373 | if (!newsp) |
374 | newsp = regs->sp; | 374 | newsp = regs->sp; |
375 | return do_fork(clone_flags, newsp, regs, 0, | 375 | return do_fork(clone_flags, newsp, regs, 0, parent_tidptr, |
376 | (int __user *)parent_tidptr, | 376 | child_tidptr); |
377 | (int __user *)child_tidptr); | ||
378 | } | 377 | } |
379 | 378 | ||
380 | asmlinkage int sys_vfork(struct pt_regs *regs) | 379 | asmlinkage int sys_vfork(struct pt_regs *regs) |
diff --git a/arch/avr32/kernel/time.c b/arch/avr32/kernel/time.c index 668ed2817e5..05ad29112ff 100644 --- a/arch/avr32/kernel/time.c +++ b/arch/avr32/kernel/time.c | |||
@@ -35,7 +35,6 @@ static struct clocksource counter = { | |||
35 | .rating = 50, | 35 | .rating = 50, |
36 | .read = read_cycle_count, | 36 | .read = read_cycle_count, |
37 | .mask = CLOCKSOURCE_MASK(32), | 37 | .mask = CLOCKSOURCE_MASK(32), |
38 | .shift = 16, | ||
39 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 38 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
40 | }; | 39 | }; |
41 | 40 | ||
@@ -123,9 +122,7 @@ void __init time_init(void) | |||
123 | 122 | ||
124 | /* figure rate for counter */ | 123 | /* figure rate for counter */ |
125 | counter_hz = clk_get_rate(boot_cpu_data.clk); | 124 | counter_hz = clk_get_rate(boot_cpu_data.clk); |
126 | counter.mult = clocksource_hz2mult(counter_hz, counter.shift); | 125 | ret = clocksource_register_hz(&counter, counter_hz); |
127 | |||
128 | ret = clocksource_register(&counter); | ||
129 | if (ret) | 126 | if (ret) |
130 | pr_debug("timer: could not register clocksource: %d\n", ret); | 127 | pr_debug("timer: could not register clocksource: %d\n", ret); |
131 | 128 | ||
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index 0a221d48152..c09577ddc3c 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig | |||
@@ -30,6 +30,9 @@ config BLACKFIN | |||
30 | select HAVE_KERNEL_LZO if RAMKERNEL | 30 | select HAVE_KERNEL_LZO if RAMKERNEL |
31 | select HAVE_OPROFILE | 31 | select HAVE_OPROFILE |
32 | select ARCH_WANT_OPTIONAL_GPIOLIB | 32 | select ARCH_WANT_OPTIONAL_GPIOLIB |
33 | select HAVE_GENERIC_HARDIRQS | ||
34 | select GENERIC_IRQ_PROBE | ||
35 | select IRQ_PER_CPU if SMP | ||
33 | 36 | ||
34 | config GENERIC_CSUM | 37 | config GENERIC_CSUM |
35 | def_bool y | 38 | def_bool y |
@@ -44,15 +47,6 @@ config ZONE_DMA | |||
44 | config GENERIC_FIND_NEXT_BIT | 47 | config GENERIC_FIND_NEXT_BIT |
45 | def_bool y | 48 | def_bool y |
46 | 49 | ||
47 | config GENERIC_HARDIRQS | ||
48 | def_bool y | ||
49 | |||
50 | config GENERIC_IRQ_PROBE | ||
51 | def_bool y | ||
52 | |||
53 | config GENERIC_HARDIRQS_NO__DO_IRQ | ||
54 | def_bool y | ||
55 | |||
56 | config GENERIC_GPIO | 50 | config GENERIC_GPIO |
57 | def_bool y | 51 | def_bool y |
58 | 52 | ||
@@ -254,11 +248,6 @@ config HOTPLUG_CPU | |||
254 | depends on SMP && HOTPLUG | 248 | depends on SMP && HOTPLUG |
255 | default y | 249 | default y |
256 | 250 | ||
257 | config IRQ_PER_CPU | ||
258 | bool | ||
259 | depends on SMP | ||
260 | default y | ||
261 | |||
262 | config HAVE_LEGACY_PER_CPU_AREA | 251 | config HAVE_LEGACY_PER_CPU_AREA |
263 | def_bool y | 252 | def_bool y |
264 | depends on SMP | 253 | depends on SMP |
diff --git a/arch/blackfin/configs/BF518F-EZBRD_defconfig b/arch/blackfin/configs/BF518F-EZBRD_defconfig index c0b988ee30d..db8d38a12a9 100644 --- a/arch/blackfin/configs/BF518F-EZBRD_defconfig +++ b/arch/blackfin/configs/BF518F-EZBRD_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_IKCONFIG_PROC=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | # CONFIG_SYSCTL_SYSCALL is not set | 9 | # CONFIG_SYSCTL_SYSCALL is not set |
10 | # CONFIG_ELF_CORE is not set | 10 | # CONFIG_ELF_CORE is not set |
11 | # CONFIG_FUTEX is not set | 11 | # CONFIG_FUTEX is not set |
diff --git a/arch/blackfin/configs/BF526-EZBRD_defconfig b/arch/blackfin/configs/BF526-EZBRD_defconfig index 864af5b6887..3e50d7857c2 100644 --- a/arch/blackfin/configs/BF526-EZBRD_defconfig +++ b/arch/blackfin/configs/BF526-EZBRD_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_IKCONFIG_PROC=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | # CONFIG_SYSCTL_SYSCALL is not set | 9 | # CONFIG_SYSCTL_SYSCALL is not set |
10 | # CONFIG_ELF_CORE is not set | 10 | # CONFIG_ELF_CORE is not set |
11 | # CONFIG_FUTEX is not set | 11 | # CONFIG_FUTEX is not set |
diff --git a/arch/blackfin/configs/BF527-AD7160-EVAL_defconfig b/arch/blackfin/configs/BF527-AD7160-EVAL_defconfig index 7b6a3370dbe..362f59dd522 100644 --- a/arch/blackfin/configs/BF527-AD7160-EVAL_defconfig +++ b/arch/blackfin/configs/BF527-AD7160-EVAL_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_IKCONFIG_PROC=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | # CONFIG_ELF_CORE is not set | 9 | # CONFIG_ELF_CORE is not set |
10 | # CONFIG_AIO is not set | 10 | # CONFIG_AIO is not set |
11 | CONFIG_SLAB=y | 11 | CONFIG_SLAB=y |
diff --git a/arch/blackfin/configs/BF527-EZKIT-V2_defconfig b/arch/blackfin/configs/BF527-EZKIT-V2_defconfig index 4faa6b46a35..023ff0df269 100644 --- a/arch/blackfin/configs/BF527-EZKIT-V2_defconfig +++ b/arch/blackfin/configs/BF527-EZKIT-V2_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_IKCONFIG_PROC=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | # CONFIG_SYSCTL_SYSCALL is not set | 9 | # CONFIG_SYSCTL_SYSCALL is not set |
10 | # CONFIG_ELF_CORE is not set | 10 | # CONFIG_ELF_CORE is not set |
11 | # CONFIG_FUTEX is not set | 11 | # CONFIG_FUTEX is not set |
diff --git a/arch/blackfin/configs/BF527-EZKIT_defconfig b/arch/blackfin/configs/BF527-EZKIT_defconfig index 9d893eb6824..4e5a121b3c5 100644 --- a/arch/blackfin/configs/BF527-EZKIT_defconfig +++ b/arch/blackfin/configs/BF527-EZKIT_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_IKCONFIG_PROC=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | # CONFIG_SYSCTL_SYSCALL is not set | 9 | # CONFIG_SYSCTL_SYSCALL is not set |
10 | # CONFIG_ELF_CORE is not set | 10 | # CONFIG_ELF_CORE is not set |
11 | # CONFIG_FUTEX is not set | 11 | # CONFIG_FUTEX is not set |
diff --git a/arch/blackfin/configs/BF527-TLL6527M_defconfig b/arch/blackfin/configs/BF527-TLL6527M_defconfig index 97a2767c80f..cd0636bb24a 100644 --- a/arch/blackfin/configs/BF527-TLL6527M_defconfig +++ b/arch/blackfin/configs/BF527-TLL6527M_defconfig | |||
@@ -6,7 +6,7 @@ CONFIG_IKCONFIG_PROC=y | |||
6 | CONFIG_LOG_BUF_SHIFT=14 | 6 | CONFIG_LOG_BUF_SHIFT=14 |
7 | CONFIG_BLK_DEV_INITRD=y | 7 | CONFIG_BLK_DEV_INITRD=y |
8 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 8 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
9 | CONFIG_EMBEDDED=y | 9 | CONFIG_EXPERT=y |
10 | # CONFIG_SYSCTL_SYSCALL is not set | 10 | # CONFIG_SYSCTL_SYSCALL is not set |
11 | # CONFIG_ELF_CORE is not set | 11 | # CONFIG_ELF_CORE is not set |
12 | # CONFIG_FUTEX is not set | 12 | # CONFIG_FUTEX is not set |
diff --git a/arch/blackfin/configs/BF533-EZKIT_defconfig b/arch/blackfin/configs/BF533-EZKIT_defconfig index f84774360c5..9f8fc84e4ac 100644 --- a/arch/blackfin/configs/BF533-EZKIT_defconfig +++ b/arch/blackfin/configs/BF533-EZKIT_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_IKCONFIG_PROC=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | # CONFIG_SYSCTL_SYSCALL is not set | 9 | # CONFIG_SYSCTL_SYSCALL is not set |
10 | # CONFIG_ELF_CORE is not set | 10 | # CONFIG_ELF_CORE is not set |
11 | # CONFIG_FUTEX is not set | 11 | # CONFIG_FUTEX is not set |
diff --git a/arch/blackfin/configs/BF533-STAMP_defconfig b/arch/blackfin/configs/BF533-STAMP_defconfig index 0e7262c04cc..ccc432b722a 100644 --- a/arch/blackfin/configs/BF533-STAMP_defconfig +++ b/arch/blackfin/configs/BF533-STAMP_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_IKCONFIG_PROC=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | # CONFIG_SYSCTL_SYSCALL is not set | 9 | # CONFIG_SYSCTL_SYSCALL is not set |
10 | # CONFIG_ELF_CORE is not set | 10 | # CONFIG_ELF_CORE is not set |
11 | # CONFIG_FUTEX is not set | 11 | # CONFIG_FUTEX is not set |
diff --git a/arch/blackfin/configs/BF537-STAMP_defconfig b/arch/blackfin/configs/BF537-STAMP_defconfig index 4d14a002e7b..566695472a8 100644 --- a/arch/blackfin/configs/BF537-STAMP_defconfig +++ b/arch/blackfin/configs/BF537-STAMP_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_IKCONFIG_PROC=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | # CONFIG_SYSCTL_SYSCALL is not set | 9 | # CONFIG_SYSCTL_SYSCALL is not set |
10 | # CONFIG_ELF_CORE is not set | 10 | # CONFIG_ELF_CORE is not set |
11 | # CONFIG_FUTEX is not set | 11 | # CONFIG_FUTEX is not set |
diff --git a/arch/blackfin/configs/BF538-EZKIT_defconfig b/arch/blackfin/configs/BF538-EZKIT_defconfig index fbee9d776f5..ac22124ccb6 100644 --- a/arch/blackfin/configs/BF538-EZKIT_defconfig +++ b/arch/blackfin/configs/BF538-EZKIT_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_IKCONFIG_PROC=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | # CONFIG_SYSCTL_SYSCALL is not set | 9 | # CONFIG_SYSCTL_SYSCALL is not set |
10 | # CONFIG_ELF_CORE is not set | 10 | # CONFIG_ELF_CORE is not set |
11 | # CONFIG_FUTEX is not set | 11 | # CONFIG_FUTEX is not set |
diff --git a/arch/blackfin/configs/BF548-EZKIT_defconfig b/arch/blackfin/configs/BF548-EZKIT_defconfig index 05dd11db2f7..944404b6ff0 100644 --- a/arch/blackfin/configs/BF548-EZKIT_defconfig +++ b/arch/blackfin/configs/BF548-EZKIT_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_IKCONFIG_PROC=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | # CONFIG_SYSCTL_SYSCALL is not set | 9 | # CONFIG_SYSCTL_SYSCALL is not set |
10 | # CONFIG_ELF_CORE is not set | 10 | # CONFIG_ELF_CORE is not set |
11 | # CONFIG_FUTEX is not set | 11 | # CONFIG_FUTEX is not set |
diff --git a/arch/blackfin/configs/BF561-ACVILON_defconfig b/arch/blackfin/configs/BF561-ACVILON_defconfig index bcb14d1c566..b7c8451f26a 100644 --- a/arch/blackfin/configs/BF561-ACVILON_defconfig +++ b/arch/blackfin/configs/BF561-ACVILON_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_IKCONFIG_PROC=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_SYSFS_DEPRECATED_V2=y | 6 | CONFIG_SYSFS_DEPRECATED_V2=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | # CONFIG_SYSCTL_SYSCALL is not set | 9 | # CONFIG_SYSCTL_SYSCALL is not set |
10 | # CONFIG_ELF_CORE is not set | 10 | # CONFIG_ELF_CORE is not set |
11 | # CONFIG_FUTEX is not set | 11 | # CONFIG_FUTEX is not set |
diff --git a/arch/blackfin/configs/BF561-EZKIT-SMP_defconfig b/arch/blackfin/configs/BF561-EZKIT-SMP_defconfig index 4cf451024fd..7e67ba31e99 100644 --- a/arch/blackfin/configs/BF561-EZKIT-SMP_defconfig +++ b/arch/blackfin/configs/BF561-EZKIT-SMP_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_IKCONFIG_PROC=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | # CONFIG_SYSCTL_SYSCALL is not set | 9 | # CONFIG_SYSCTL_SYSCALL is not set |
10 | # CONFIG_ELF_CORE is not set | 10 | # CONFIG_ELF_CORE is not set |
11 | # CONFIG_FUTEX is not set | 11 | # CONFIG_FUTEX is not set |
diff --git a/arch/blackfin/configs/BF561-EZKIT_defconfig b/arch/blackfin/configs/BF561-EZKIT_defconfig index 843aaa54a9e..141e5933e1a 100644 --- a/arch/blackfin/configs/BF561-EZKIT_defconfig +++ b/arch/blackfin/configs/BF561-EZKIT_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_IKCONFIG_PROC=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | # CONFIG_SYSCTL_SYSCALL is not set | 9 | # CONFIG_SYSCTL_SYSCALL is not set |
10 | # CONFIG_ELF_CORE is not set | 10 | # CONFIG_ELF_CORE is not set |
11 | # CONFIG_FUTEX is not set | 11 | # CONFIG_FUTEX is not set |
diff --git a/arch/blackfin/configs/BlackStamp_defconfig b/arch/blackfin/configs/BlackStamp_defconfig index dae7adf3b2a..97ebe09a737 100644 --- a/arch/blackfin/configs/BlackStamp_defconfig +++ b/arch/blackfin/configs/BlackStamp_defconfig | |||
@@ -6,7 +6,7 @@ CONFIG_LOG_BUF_SHIFT=14 | |||
6 | CONFIG_SYSFS_DEPRECATED_V2=y | 6 | CONFIG_SYSFS_DEPRECATED_V2=y |
7 | CONFIG_BLK_DEV_INITRD=y | 7 | CONFIG_BLK_DEV_INITRD=y |
8 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 8 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
9 | CONFIG_EMBEDDED=y | 9 | CONFIG_EXPERT=y |
10 | # CONFIG_SYSCTL_SYSCALL is not set | 10 | # CONFIG_SYSCTL_SYSCALL is not set |
11 | # CONFIG_ELF_CORE is not set | 11 | # CONFIG_ELF_CORE is not set |
12 | # CONFIG_FUTEX is not set | 12 | # CONFIG_FUTEX is not set |
diff --git a/arch/blackfin/configs/CM-BF527_defconfig b/arch/blackfin/configs/CM-BF527_defconfig index f3414244bfe..c2457543e58 100644 --- a/arch/blackfin/configs/CM-BF527_defconfig +++ b/arch/blackfin/configs/CM-BF527_defconfig | |||
@@ -8,7 +8,7 @@ CONFIG_BLK_DEV_INITRD=y | |||
8 | # CONFIG_RD_GZIP is not set | 8 | # CONFIG_RD_GZIP is not set |
9 | CONFIG_RD_LZMA=y | 9 | CONFIG_RD_LZMA=y |
10 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 10 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
11 | CONFIG_EMBEDDED=y | 11 | CONFIG_EXPERT=y |
12 | # CONFIG_SYSCTL_SYSCALL is not set | 12 | # CONFIG_SYSCTL_SYSCALL is not set |
13 | # CONFIG_ELF_CORE is not set | 13 | # CONFIG_ELF_CORE is not set |
14 | # CONFIG_FUTEX is not set | 14 | # CONFIG_FUTEX is not set |
diff --git a/arch/blackfin/configs/CM-BF533_defconfig b/arch/blackfin/configs/CM-BF533_defconfig index 8c7e08f173d..baf1c1573e5 100644 --- a/arch/blackfin/configs/CM-BF533_defconfig +++ b/arch/blackfin/configs/CM-BF533_defconfig | |||
@@ -7,7 +7,7 @@ CONFIG_LOG_BUF_SHIFT=14 | |||
7 | CONFIG_BLK_DEV_INITRD=y | 7 | CONFIG_BLK_DEV_INITRD=y |
8 | # CONFIG_RD_GZIP is not set | 8 | # CONFIG_RD_GZIP is not set |
9 | CONFIG_RD_LZMA=y | 9 | CONFIG_RD_LZMA=y |
10 | CONFIG_EMBEDDED=y | 10 | CONFIG_EXPERT=y |
11 | # CONFIG_UID16 is not set | 11 | # CONFIG_UID16 is not set |
12 | # CONFIG_SYSCTL_SYSCALL is not set | 12 | # CONFIG_SYSCTL_SYSCALL is not set |
13 | # CONFIG_ELF_CORE is not set | 13 | # CONFIG_ELF_CORE is not set |
diff --git a/arch/blackfin/configs/CM-BF537E_defconfig b/arch/blackfin/configs/CM-BF537E_defconfig index bd3cb766d07..707cbf8a259 100644 --- a/arch/blackfin/configs/CM-BF537E_defconfig +++ b/arch/blackfin/configs/CM-BF537E_defconfig | |||
@@ -8,7 +8,7 @@ CONFIG_BLK_DEV_INITRD=y | |||
8 | # CONFIG_RD_GZIP is not set | 8 | # CONFIG_RD_GZIP is not set |
9 | CONFIG_RD_LZMA=y | 9 | CONFIG_RD_LZMA=y |
10 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 10 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
11 | CONFIG_EMBEDDED=y | 11 | CONFIG_EXPERT=y |
12 | # CONFIG_UID16 is not set | 12 | # CONFIG_UID16 is not set |
13 | # CONFIG_SYSCTL_SYSCALL is not set | 13 | # CONFIG_SYSCTL_SYSCALL is not set |
14 | # CONFIG_ELF_CORE is not set | 14 | # CONFIG_ELF_CORE is not set |
diff --git a/arch/blackfin/configs/CM-BF537U_defconfig b/arch/blackfin/configs/CM-BF537U_defconfig index 82224f37c04..4596935eada 100644 --- a/arch/blackfin/configs/CM-BF537U_defconfig +++ b/arch/blackfin/configs/CM-BF537U_defconfig | |||
@@ -8,7 +8,7 @@ CONFIG_BLK_DEV_INITRD=y | |||
8 | # CONFIG_RD_GZIP is not set | 8 | # CONFIG_RD_GZIP is not set |
9 | CONFIG_RD_LZMA=y | 9 | CONFIG_RD_LZMA=y |
10 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 10 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
11 | CONFIG_EMBEDDED=y | 11 | CONFIG_EXPERT=y |
12 | # CONFIG_UID16 is not set | 12 | # CONFIG_UID16 is not set |
13 | # CONFIG_SYSCTL_SYSCALL is not set | 13 | # CONFIG_SYSCTL_SYSCALL is not set |
14 | # CONFIG_ELF_CORE is not set | 14 | # CONFIG_ELF_CORE is not set |
diff --git a/arch/blackfin/configs/CM-BF548_defconfig b/arch/blackfin/configs/CM-BF548_defconfig index 433598c6e77..df267588efe 100644 --- a/arch/blackfin/configs/CM-BF548_defconfig +++ b/arch/blackfin/configs/CM-BF548_defconfig | |||
@@ -8,7 +8,7 @@ CONFIG_BLK_DEV_INITRD=y | |||
8 | # CONFIG_RD_GZIP is not set | 8 | # CONFIG_RD_GZIP is not set |
9 | CONFIG_RD_LZMA=y | 9 | CONFIG_RD_LZMA=y |
10 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 10 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
11 | CONFIG_EMBEDDED=y | 11 | CONFIG_EXPERT=y |
12 | # CONFIG_UID16 is not set | 12 | # CONFIG_UID16 is not set |
13 | # CONFIG_SYSCTL_SYSCALL is not set | 13 | # CONFIG_SYSCTL_SYSCALL is not set |
14 | # CONFIG_ELF_CORE is not set | 14 | # CONFIG_ELF_CORE is not set |
diff --git a/arch/blackfin/configs/CM-BF561_defconfig b/arch/blackfin/configs/CM-BF561_defconfig index ded7d845cb3..6c7b21585a4 100644 --- a/arch/blackfin/configs/CM-BF561_defconfig +++ b/arch/blackfin/configs/CM-BF561_defconfig | |||
@@ -8,7 +8,7 @@ CONFIG_BLK_DEV_INITRD=y | |||
8 | # CONFIG_RD_GZIP is not set | 8 | # CONFIG_RD_GZIP is not set |
9 | CONFIG_RD_LZMA=y | 9 | CONFIG_RD_LZMA=y |
10 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 10 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
11 | CONFIG_EMBEDDED=y | 11 | CONFIG_EXPERT=y |
12 | # CONFIG_UID16 is not set | 12 | # CONFIG_UID16 is not set |
13 | # CONFIG_SYSCTL_SYSCALL is not set | 13 | # CONFIG_SYSCTL_SYSCALL is not set |
14 | # CONFIG_ELF_CORE is not set | 14 | # CONFIG_ELF_CORE is not set |
diff --git a/arch/blackfin/configs/DNP5370_defconfig b/arch/blackfin/configs/DNP5370_defconfig index 0ebc7d9aa42..f50313657f3 100644 --- a/arch/blackfin/configs/DNP5370_defconfig +++ b/arch/blackfin/configs/DNP5370_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_IKCONFIG=y | |||
5 | CONFIG_IKCONFIG_PROC=y | 5 | CONFIG_IKCONFIG_PROC=y |
6 | CONFIG_LOG_BUF_SHIFT=14 | 6 | CONFIG_LOG_BUF_SHIFT=14 |
7 | CONFIG_BLK_DEV_INITRD=y | 7 | CONFIG_BLK_DEV_INITRD=y |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | CONFIG_SLOB=y | 9 | CONFIG_SLOB=y |
10 | # CONFIG_BLK_DEV_BSG is not set | 10 | # CONFIG_BLK_DEV_BSG is not set |
11 | # CONFIG_IOSCHED_CFQ is not set | 11 | # CONFIG_IOSCHED_CFQ is not set |
diff --git a/arch/blackfin/configs/H8606_defconfig b/arch/blackfin/configs/H8606_defconfig index 700fb701c12..7450127b645 100644 --- a/arch/blackfin/configs/H8606_defconfig +++ b/arch/blackfin/configs/H8606_defconfig | |||
@@ -2,7 +2,7 @@ CONFIG_EXPERIMENTAL=y | |||
2 | CONFIG_SYSVIPC=y | 2 | CONFIG_SYSVIPC=y |
3 | CONFIG_LOG_BUF_SHIFT=14 | 3 | CONFIG_LOG_BUF_SHIFT=14 |
4 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 4 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
5 | CONFIG_EMBEDDED=y | 5 | CONFIG_EXPERT=y |
6 | # CONFIG_SYSCTL_SYSCALL is not set | 6 | # CONFIG_SYSCTL_SYSCALL is not set |
7 | # CONFIG_ELF_CORE is not set | 7 | # CONFIG_ELF_CORE is not set |
8 | # CONFIG_FUTEX is not set | 8 | # CONFIG_FUTEX is not set |
diff --git a/arch/blackfin/configs/IP0X_defconfig b/arch/blackfin/configs/IP0X_defconfig index b40156d217e..5e797cf7204 100644 --- a/arch/blackfin/configs/IP0X_defconfig +++ b/arch/blackfin/configs/IP0X_defconfig | |||
@@ -3,7 +3,7 @@ CONFIG_SYSVIPC=y | |||
3 | CONFIG_LOG_BUF_SHIFT=14 | 3 | CONFIG_LOG_BUF_SHIFT=14 |
4 | CONFIG_BLK_DEV_INITRD=y | 4 | CONFIG_BLK_DEV_INITRD=y |
5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
6 | CONFIG_EMBEDDED=y | 6 | CONFIG_EXPERT=y |
7 | # CONFIG_SYSCTL_SYSCALL is not set | 7 | # CONFIG_SYSCTL_SYSCALL is not set |
8 | # CONFIG_HOTPLUG is not set | 8 | # CONFIG_HOTPLUG is not set |
9 | # CONFIG_ELF_CORE is not set | 9 | # CONFIG_ELF_CORE is not set |
diff --git a/arch/blackfin/configs/PNAV-10_defconfig b/arch/blackfin/configs/PNAV-10_defconfig index be866d95ed7..a566a2fe6b9 100644 --- a/arch/blackfin/configs/PNAV-10_defconfig +++ b/arch/blackfin/configs/PNAV-10_defconfig | |||
@@ -2,7 +2,7 @@ CONFIG_EXPERIMENTAL=y | |||
2 | CONFIG_SYSVIPC=y | 2 | CONFIG_SYSVIPC=y |
3 | CONFIG_LOG_BUF_SHIFT=14 | 3 | CONFIG_LOG_BUF_SHIFT=14 |
4 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 4 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
5 | CONFIG_EMBEDDED=y | 5 | CONFIG_EXPERT=y |
6 | # CONFIG_SYSCTL_SYSCALL is not set | 6 | # CONFIG_SYSCTL_SYSCALL is not set |
7 | # CONFIG_ELF_CORE is not set | 7 | # CONFIG_ELF_CORE is not set |
8 | # CONFIG_FUTEX is not set | 8 | # CONFIG_FUTEX is not set |
diff --git a/arch/blackfin/configs/SRV1_defconfig b/arch/blackfin/configs/SRV1_defconfig index b64bdf759b8..853809510ee 100644 --- a/arch/blackfin/configs/SRV1_defconfig +++ b/arch/blackfin/configs/SRV1_defconfig | |||
@@ -3,7 +3,7 @@ CONFIG_SYSVIPC=y | |||
3 | CONFIG_LOG_BUF_SHIFT=14 | 3 | CONFIG_LOG_BUF_SHIFT=14 |
4 | CONFIG_BLK_DEV_INITRD=y | 4 | CONFIG_BLK_DEV_INITRD=y |
5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
6 | CONFIG_EMBEDDED=y | 6 | CONFIG_EXPERT=y |
7 | # CONFIG_SYSCTL_SYSCALL is not set | 7 | # CONFIG_SYSCTL_SYSCALL is not set |
8 | CONFIG_KALLSYMS_ALL=y | 8 | CONFIG_KALLSYMS_ALL=y |
9 | # CONFIG_ELF_CORE is not set | 9 | # CONFIG_ELF_CORE is not set |
diff --git a/arch/blackfin/configs/TCM-BF518_defconfig b/arch/blackfin/configs/TCM-BF518_defconfig index 1bccd9a5098..d496ae9a39b 100644 --- a/arch/blackfin/configs/TCM-BF518_defconfig +++ b/arch/blackfin/configs/TCM-BF518_defconfig | |||
@@ -7,7 +7,7 @@ CONFIG_LOG_BUF_SHIFT=14 | |||
7 | CONFIG_BLK_DEV_INITRD=y | 7 | CONFIG_BLK_DEV_INITRD=y |
8 | # CONFIG_RD_GZIP is not set | 8 | # CONFIG_RD_GZIP is not set |
9 | CONFIG_RD_LZMA=y | 9 | CONFIG_RD_LZMA=y |
10 | CONFIG_EMBEDDED=y | 10 | CONFIG_EXPERT=y |
11 | # CONFIG_SYSCTL_SYSCALL is not set | 11 | # CONFIG_SYSCTL_SYSCALL is not set |
12 | # CONFIG_ELF_CORE is not set | 12 | # CONFIG_ELF_CORE is not set |
13 | # CONFIG_FUTEX is not set | 13 | # CONFIG_FUTEX is not set |
diff --git a/arch/blackfin/configs/TCM-BF537_defconfig b/arch/blackfin/configs/TCM-BF537_defconfig index 00ce899e9e5..65f642167a5 100644 --- a/arch/blackfin/configs/TCM-BF537_defconfig +++ b/arch/blackfin/configs/TCM-BF537_defconfig | |||
@@ -8,7 +8,7 @@ CONFIG_BLK_DEV_INITRD=y | |||
8 | # CONFIG_RD_GZIP is not set | 8 | # CONFIG_RD_GZIP is not set |
9 | CONFIG_RD_LZMA=y | 9 | CONFIG_RD_LZMA=y |
10 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 10 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
11 | CONFIG_EMBEDDED=y | 11 | CONFIG_EXPERT=y |
12 | # CONFIG_UID16 is not set | 12 | # CONFIG_UID16 is not set |
13 | # CONFIG_SYSCTL_SYSCALL is not set | 13 | # CONFIG_SYSCTL_SYSCALL is not set |
14 | # CONFIG_ELF_CORE is not set | 14 | # CONFIG_ELF_CORE is not set |
diff --git a/arch/blackfin/include/asm/bfin_serial.h b/arch/blackfin/include/asm/bfin_serial.h index 1ff9f1468c0..7dbc664eab1 100644 --- a/arch/blackfin/include/asm/bfin_serial.h +++ b/arch/blackfin/include/asm/bfin_serial.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #define __BFIN_ASM_SERIAL_H__ | 10 | #define __BFIN_ASM_SERIAL_H__ |
11 | 11 | ||
12 | #include <linux/serial_core.h> | 12 | #include <linux/serial_core.h> |
13 | #include <linux/spinlock.h> | ||
13 | #include <mach/anomaly.h> | 14 | #include <mach/anomaly.h> |
14 | #include <mach/bfin_serial.h> | 15 | #include <mach/bfin_serial.h> |
15 | 16 | ||
@@ -41,6 +42,7 @@ struct bfin_serial_port { | |||
41 | struct circ_buf rx_dma_buf; | 42 | struct circ_buf rx_dma_buf; |
42 | struct timer_list rx_dma_timer; | 43 | struct timer_list rx_dma_timer; |
43 | int rx_dma_nrows; | 44 | int rx_dma_nrows; |
45 | spinlock_t rx_lock; | ||
44 | unsigned int tx_dma_channel; | 46 | unsigned int tx_dma_channel; |
45 | unsigned int rx_dma_channel; | 47 | unsigned int rx_dma_channel; |
46 | struct work_struct tx_dma_workqueue; | 48 | struct work_struct tx_dma_workqueue; |
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig index 613e62831c5..0a7a4c11d8b 100644 --- a/arch/cris/Kconfig +++ b/arch/cris/Kconfig | |||
@@ -54,6 +54,8 @@ config CRIS | |||
54 | bool | 54 | bool |
55 | default y | 55 | default y |
56 | select HAVE_IDE | 56 | select HAVE_IDE |
57 | select HAVE_GENERIC_HARDIRQS | ||
58 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
57 | 59 | ||
58 | config HZ | 60 | config HZ |
59 | int | 61 | int |
@@ -67,10 +69,6 @@ menu "General setup" | |||
67 | 69 | ||
68 | source "fs/Kconfig.binfmt" | 70 | source "fs/Kconfig.binfmt" |
69 | 71 | ||
70 | config GENERIC_HARDIRQS | ||
71 | bool | ||
72 | default y | ||
73 | |||
74 | config ETRAX_CMDLINE | 72 | config ETRAX_CMDLINE |
75 | string "Kernel command line" | 73 | string "Kernel command line" |
76 | default "root=/dev/mtdblock3" | 74 | default "root=/dev/mtdblock3" |
diff --git a/arch/cris/arch-v10/kernel/irq.c b/arch/cris/arch-v10/kernel/irq.c index a0c0df8be9c..7328a7cf744 100644 --- a/arch/cris/arch-v10/kernel/irq.c +++ b/arch/cris/arch-v10/kernel/irq.c | |||
@@ -104,43 +104,21 @@ static void (*interrupt[NR_IRQS])(void) = { | |||
104 | IRQ31_interrupt | 104 | IRQ31_interrupt |
105 | }; | 105 | }; |
106 | 106 | ||
107 | static void enable_crisv10_irq(unsigned int irq); | 107 | static void enable_crisv10_irq(struct irq_data *data) |
108 | |||
109 | static unsigned int startup_crisv10_irq(unsigned int irq) | ||
110 | { | ||
111 | enable_crisv10_irq(irq); | ||
112 | return 0; | ||
113 | } | ||
114 | |||
115 | #define shutdown_crisv10_irq disable_crisv10_irq | ||
116 | |||
117 | static void enable_crisv10_irq(unsigned int irq) | ||
118 | { | ||
119 | crisv10_unmask_irq(irq); | ||
120 | } | ||
121 | |||
122 | static void disable_crisv10_irq(unsigned int irq) | ||
123 | { | ||
124 | crisv10_mask_irq(irq); | ||
125 | } | ||
126 | |||
127 | static void ack_crisv10_irq(unsigned int irq) | ||
128 | { | 108 | { |
109 | crisv10_unmask_irq(data->irq); | ||
129 | } | 110 | } |
130 | 111 | ||
131 | static void end_crisv10_irq(unsigned int irq) | 112 | static void disable_crisv10_irq(struct irq_data *data) |
132 | { | 113 | { |
114 | crisv10_mask_irq(data->irq); | ||
133 | } | 115 | } |
134 | 116 | ||
135 | static struct irq_chip crisv10_irq_type = { | 117 | static struct irq_chip crisv10_irq_type = { |
136 | .name = "CRISv10", | 118 | .name = "CRISv10", |
137 | .startup = startup_crisv10_irq, | 119 | .irq_shutdown = disable_crisv10_irq, |
138 | .shutdown = shutdown_crisv10_irq, | 120 | .irq_enable = enable_crisv10_irq, |
139 | .enable = enable_crisv10_irq, | 121 | .irq_disable = disable_crisv10_irq, |
140 | .disable = disable_crisv10_irq, | ||
141 | .ack = ack_crisv10_irq, | ||
142 | .end = end_crisv10_irq, | ||
143 | .set_affinity = NULL | ||
144 | }; | 122 | }; |
145 | 123 | ||
146 | void weird_irq(void); | 124 | void weird_irq(void); |
@@ -221,7 +199,8 @@ init_IRQ(void) | |||
221 | 199 | ||
222 | /* Initialize IRQ handler descriptors. */ | 200 | /* Initialize IRQ handler descriptors. */ |
223 | for(i = 2; i < NR_IRQS; i++) { | 201 | for(i = 2; i < NR_IRQS; i++) { |
224 | irq_desc[i].chip = &crisv10_irq_type; | 202 | set_irq_desc_and_handler(i, &crisv10_irq_type, |
203 | handle_simple_irq); | ||
225 | set_int_vector(i, interrupt[i]); | 204 | set_int_vector(i, interrupt[i]); |
226 | } | 205 | } |
227 | 206 | ||
diff --git a/arch/cris/arch-v32/kernel/irq.c b/arch/cris/arch-v32/kernel/irq.c index 2ed48ae3d31..0ad9db5126c 100644 --- a/arch/cris/arch-v32/kernel/irq.c +++ b/arch/cris/arch-v32/kernel/irq.c | |||
@@ -291,54 +291,33 @@ void crisv32_unmask_irq(int irq) | |||
291 | } | 291 | } |
292 | 292 | ||
293 | 293 | ||
294 | static unsigned int startup_crisv32_irq(unsigned int irq) | 294 | static void enable_crisv32_irq(struct irq_data *data) |
295 | { | 295 | { |
296 | crisv32_unmask_irq(irq); | 296 | crisv32_unmask_irq(data->irq); |
297 | return 0; | ||
298 | } | ||
299 | |||
300 | static void shutdown_crisv32_irq(unsigned int irq) | ||
301 | { | ||
302 | crisv32_mask_irq(irq); | ||
303 | } | 297 | } |
304 | 298 | ||
305 | static void enable_crisv32_irq(unsigned int irq) | 299 | static void disable_crisv32_irq(struct irq_data *data) |
306 | { | 300 | { |
307 | crisv32_unmask_irq(irq); | 301 | crisv32_mask_irq(data->irq); |
308 | } | 302 | } |
309 | 303 | ||
310 | static void disable_crisv32_irq(unsigned int irq) | 304 | static int set_affinity_crisv32_irq(struct irq_data *data, |
311 | { | 305 | const struct cpumask *dest, bool force) |
312 | crisv32_mask_irq(irq); | ||
313 | } | ||
314 | |||
315 | static void ack_crisv32_irq(unsigned int irq) | ||
316 | { | ||
317 | } | ||
318 | |||
319 | static void end_crisv32_irq(unsigned int irq) | ||
320 | { | ||
321 | } | ||
322 | |||
323 | int set_affinity_crisv32_irq(unsigned int irq, const struct cpumask *dest) | ||
324 | { | 306 | { |
325 | unsigned long flags; | 307 | unsigned long flags; |
308 | |||
326 | spin_lock_irqsave(&irq_lock, flags); | 309 | spin_lock_irqsave(&irq_lock, flags); |
327 | irq_allocations[irq - FIRST_IRQ].mask = *dest; | 310 | irq_allocations[data->irq - FIRST_IRQ].mask = *dest; |
328 | spin_unlock_irqrestore(&irq_lock, flags); | 311 | spin_unlock_irqrestore(&irq_lock, flags); |
329 | |||
330 | return 0; | 312 | return 0; |
331 | } | 313 | } |
332 | 314 | ||
333 | static struct irq_chip crisv32_irq_type = { | 315 | static struct irq_chip crisv32_irq_type = { |
334 | .name = "CRISv32", | 316 | .name = "CRISv32", |
335 | .startup = startup_crisv32_irq, | 317 | .irq_shutdown = disable_crisv32_irq, |
336 | .shutdown = shutdown_crisv32_irq, | 318 | .irq_enable = enable_crisv32_irq, |
337 | .enable = enable_crisv32_irq, | 319 | .irq_disable = disable_crisv32_irq, |
338 | .disable = disable_crisv32_irq, | 320 | .irq_set_affinity = set_affinity_crisv32_irq, |
339 | .ack = ack_crisv32_irq, | ||
340 | .end = end_crisv32_irq, | ||
341 | .set_affinity = set_affinity_crisv32_irq | ||
342 | }; | 321 | }; |
343 | 322 | ||
344 | void | 323 | void |
@@ -472,7 +451,8 @@ init_IRQ(void) | |||
472 | 451 | ||
473 | /* Point all IRQ's to bad handlers. */ | 452 | /* Point all IRQ's to bad handlers. */ |
474 | for (i = FIRST_IRQ, j = 0; j < NR_IRQS; i++, j++) { | 453 | for (i = FIRST_IRQ, j = 0; j < NR_IRQS; i++, j++) { |
475 | irq_desc[j].chip = &crisv32_irq_type; | 454 | set_irq_chip_and_handler(j, &crisv32_irq_type, |
455 | handle_simple_irq); | ||
476 | set_exception_vector(i, interrupt[j]); | 456 | set_exception_vector(i, interrupt[j]); |
477 | } | 457 | } |
478 | 458 | ||
diff --git a/arch/cris/configs/artpec_3_defconfig b/arch/cris/configs/artpec_3_defconfig index 590f72c9455..71854d41c5a 100644 --- a/arch/cris/configs/artpec_3_defconfig +++ b/arch/cris/configs/artpec_3_defconfig | |||
@@ -2,7 +2,7 @@ CONFIG_EXPERIMENTAL=y | |||
2 | # CONFIG_SWAP is not set | 2 | # CONFIG_SWAP is not set |
3 | CONFIG_LOG_BUF_SHIFT=14 | 3 | CONFIG_LOG_BUF_SHIFT=14 |
4 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 4 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
5 | CONFIG_EMBEDDED=y | 5 | CONFIG_EXPERT=y |
6 | # CONFIG_KALLSYMS is not set | 6 | # CONFIG_KALLSYMS is not set |
7 | # CONFIG_HOTPLUG is not set | 7 | # CONFIG_HOTPLUG is not set |
8 | # CONFIG_BLK_DEV_BSG is not set | 8 | # CONFIG_BLK_DEV_BSG is not set |
diff --git a/arch/cris/configs/etrax-100lx_v2_defconfig b/arch/cris/configs/etrax-100lx_v2_defconfig index 1b2853e3980..a85aabf92be 100644 --- a/arch/cris/configs/etrax-100lx_v2_defconfig +++ b/arch/cris/configs/etrax-100lx_v2_defconfig | |||
@@ -2,7 +2,7 @@ CONFIG_EXPERIMENTAL=y | |||
2 | # CONFIG_SWAP is not set | 2 | # CONFIG_SWAP is not set |
3 | CONFIG_LOG_BUF_SHIFT=14 | 3 | CONFIG_LOG_BUF_SHIFT=14 |
4 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 4 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
5 | CONFIG_EMBEDDED=y | 5 | CONFIG_EXPERT=y |
6 | # CONFIG_KALLSYMS is not set | 6 | # CONFIG_KALLSYMS is not set |
7 | # CONFIG_HOTPLUG is not set | 7 | # CONFIG_HOTPLUG is not set |
8 | # CONFIG_BLK_DEV_BSG is not set | 8 | # CONFIG_BLK_DEV_BSG is not set |
diff --git a/arch/cris/configs/etraxfs_defconfig b/arch/cris/configs/etraxfs_defconfig index f73d38cc9c6..87c7227fecb 100644 --- a/arch/cris/configs/etraxfs_defconfig +++ b/arch/cris/configs/etraxfs_defconfig | |||
@@ -2,7 +2,7 @@ CONFIG_EXPERIMENTAL=y | |||
2 | # CONFIG_SWAP is not set | 2 | # CONFIG_SWAP is not set |
3 | CONFIG_LOG_BUF_SHIFT=14 | 3 | CONFIG_LOG_BUF_SHIFT=14 |
4 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 4 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
5 | CONFIG_EMBEDDED=y | 5 | CONFIG_EXPERT=y |
6 | # CONFIG_KALLSYMS is not set | 6 | # CONFIG_KALLSYMS is not set |
7 | # CONFIG_HOTPLUG is not set | 7 | # CONFIG_HOTPLUG is not set |
8 | # CONFIG_BLK_DEV_BSG is not set | 8 | # CONFIG_BLK_DEV_BSG is not set |
diff --git a/arch/cris/kernel/irq.c b/arch/cris/kernel/irq.c index 469f7f9d62e..c346952f06d 100644 --- a/arch/cris/kernel/irq.c +++ b/arch/cris/kernel/irq.c | |||
@@ -62,7 +62,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
62 | for_each_online_cpu(j) | 62 | for_each_online_cpu(j) |
63 | seq_printf(p, "%10u ", kstat_irqs_cpu(i, j)); | 63 | seq_printf(p, "%10u ", kstat_irqs_cpu(i, j)); |
64 | #endif | 64 | #endif |
65 | seq_printf(p, " %14s", irq_desc[i].chip->name); | 65 | seq_printf(p, " %14s", irq_desc[i].irq_data.chip->name); |
66 | seq_printf(p, " %s", action->name); | 66 | seq_printf(p, " %s", action->name); |
67 | 67 | ||
68 | for (action=action->next; action; action = action->next) | 68 | for (action=action->next; action; action = action->next) |
@@ -93,8 +93,8 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs) | |||
93 | printk("do_IRQ: stack overflow: %lX\n", sp); | 93 | printk("do_IRQ: stack overflow: %lX\n", sp); |
94 | show_stack(NULL, (unsigned long *)sp); | 94 | show_stack(NULL, (unsigned long *)sp); |
95 | } | 95 | } |
96 | __do_IRQ(irq); | 96 | generic_handle_irq(irq); |
97 | irq_exit(); | 97 | irq_exit(); |
98 | set_irq_regs(old_regs); | 98 | set_irq_regs(old_regs); |
99 | } | 99 | } |
100 | 100 | ||
diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig index f6bcb039cd6..747499a1b31 100644 --- a/arch/frv/Kconfig +++ b/arch/frv/Kconfig | |||
@@ -5,6 +5,7 @@ config FRV | |||
5 | select HAVE_ARCH_TRACEHOOK | 5 | select HAVE_ARCH_TRACEHOOK |
6 | select HAVE_IRQ_WORK | 6 | select HAVE_IRQ_WORK |
7 | select HAVE_PERF_EVENTS | 7 | select HAVE_PERF_EVENTS |
8 | select HAVE_GENERIC_HARDIRQS | ||
8 | 9 | ||
9 | config ZONE_DMA | 10 | config ZONE_DMA |
10 | bool | 11 | bool |
@@ -29,14 +30,6 @@ config GENERIC_CALIBRATE_DELAY | |||
29 | bool | 30 | bool |
30 | default n | 31 | default n |
31 | 32 | ||
32 | config GENERIC_HARDIRQS | ||
33 | bool | ||
34 | default y | ||
35 | |||
36 | config GENERIC_HARDIRQS_NO__DO_IRQ | ||
37 | bool | ||
38 | default y | ||
39 | |||
40 | config TIME_LOW_RES | 33 | config TIME_LOW_RES |
41 | bool | 34 | bool |
42 | default y | 35 | default y |
diff --git a/arch/frv/defconfig b/arch/frv/defconfig index b8ebe9e8a49..b1b792610fd 100644 --- a/arch/frv/defconfig +++ b/arch/frv/defconfig | |||
@@ -3,7 +3,7 @@ CONFIG_SYSVIPC=y | |||
3 | CONFIG_POSIX_MQUEUE=y | 3 | CONFIG_POSIX_MQUEUE=y |
4 | CONFIG_LOG_BUF_SHIFT=14 | 4 | CONFIG_LOG_BUF_SHIFT=14 |
5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
6 | CONFIG_EMBEDDED=y | 6 | CONFIG_EXPERT=y |
7 | # CONFIG_HOTPLUG is not set | 7 | # CONFIG_HOTPLUG is not set |
8 | CONFIG_MMU=y | 8 | CONFIG_MMU=y |
9 | CONFIG_FRV_OUTOFLINE_ATOMIC_OPS=y | 9 | CONFIG_FRV_OUTOFLINE_ATOMIC_OPS=y |
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig index 65f897d8c1e..6df692d1475 100644 --- a/arch/h8300/Kconfig +++ b/arch/h8300/Kconfig | |||
@@ -2,6 +2,8 @@ config H8300 | |||
2 | bool | 2 | bool |
3 | default y | 3 | default y |
4 | select HAVE_IDE | 4 | select HAVE_IDE |
5 | select HAVE_GENERIC_HARDIRQS | ||
6 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
5 | 7 | ||
6 | config SYMBOL_PREFIX | 8 | config SYMBOL_PREFIX |
7 | string | 9 | string |
@@ -47,10 +49,6 @@ config GENERIC_HWEIGHT | |||
47 | bool | 49 | bool |
48 | default y | 50 | default y |
49 | 51 | ||
50 | config GENERIC_HARDIRQS | ||
51 | bool | ||
52 | default y | ||
53 | |||
54 | config GENERIC_CALIBRATE_DELAY | 52 | config GENERIC_CALIBRATE_DELAY |
55 | bool | 53 | bool |
56 | default y | 54 | default y |
diff --git a/arch/h8300/defconfig b/arch/h8300/defconfig index 342f77765f0..042425a0264 100644 --- a/arch/h8300/defconfig +++ b/arch/h8300/defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | 1 | CONFIG_EXPERIMENTAL=y |
2 | # CONFIG_LOCALVERSION_AUTO is not set | 2 | # CONFIG_LOCALVERSION_AUTO is not set |
3 | CONFIG_LOG_BUF_SHIFT=14 | 3 | CONFIG_LOG_BUF_SHIFT=14 |
4 | CONFIG_EMBEDDED=y | 4 | CONFIG_EXPERT=y |
5 | # CONFIG_UID16 is not set | 5 | # CONFIG_UID16 is not set |
6 | # CONFIG_SYSCTL_SYSCALL is not set | 6 | # CONFIG_SYSCTL_SYSCALL is not set |
7 | # CONFIG_KALLSYMS is not set | 7 | # CONFIG_KALLSYMS is not set |
diff --git a/arch/h8300/kernel/irq.c b/arch/h8300/kernel/irq.c index c25dc2c2b1d..7643d39925d 100644 --- a/arch/h8300/kernel/irq.c +++ b/arch/h8300/kernel/irq.c | |||
@@ -38,34 +38,30 @@ static inline int is_ext_irq(unsigned int irq) | |||
38 | return (irq >= EXT_IRQ0 && irq <= (EXT_IRQ0 + EXT_IRQS)); | 38 | return (irq >= EXT_IRQ0 && irq <= (EXT_IRQ0 + EXT_IRQS)); |
39 | } | 39 | } |
40 | 40 | ||
41 | static void h8300_enable_irq(unsigned int irq) | 41 | static void h8300_enable_irq(struct irq_data *data) |
42 | { | 42 | { |
43 | if (is_ext_irq(irq)) | 43 | if (is_ext_irq(data->irq)) |
44 | IER_REGS |= 1 << (irq - EXT_IRQ0); | 44 | IER_REGS |= 1 << (data->irq - EXT_IRQ0); |
45 | } | 45 | } |
46 | 46 | ||
47 | static void h8300_disable_irq(unsigned int irq) | 47 | static void h8300_disable_irq(struct irq_data *data) |
48 | { | 48 | { |
49 | if (is_ext_irq(irq)) | 49 | if (is_ext_irq(data->irq)) |
50 | IER_REGS &= ~(1 << (irq - EXT_IRQ0)); | 50 | IER_REGS &= ~(1 << (data->irq - EXT_IRQ0)); |
51 | } | 51 | } |
52 | 52 | ||
53 | static void h8300_end_irq(unsigned int irq) | 53 | static unsigned int h8300_startup_irq(struct irq_data *data) |
54 | { | 54 | { |
55 | } | 55 | if (is_ext_irq(data->irq)) |
56 | 56 | return h8300_enable_irq_pin(data->irq); | |
57 | static unsigned int h8300_startup_irq(unsigned int irq) | ||
58 | { | ||
59 | if (is_ext_irq(irq)) | ||
60 | return h8300_enable_irq_pin(irq); | ||
61 | else | 57 | else |
62 | return 0; | 58 | return 0; |
63 | } | 59 | } |
64 | 60 | ||
65 | static void h8300_shutdown_irq(unsigned int irq) | 61 | static void h8300_shutdown_irq(struct irq_data *data) |
66 | { | 62 | { |
67 | if (is_ext_irq(irq)) | 63 | if (is_ext_irq(data->irq)) |
68 | h8300_disable_irq_pin(irq); | 64 | h8300_disable_irq_pin(data->irq); |
69 | } | 65 | } |
70 | 66 | ||
71 | /* | 67 | /* |
@@ -73,12 +69,10 @@ static void h8300_shutdown_irq(unsigned int irq) | |||
73 | */ | 69 | */ |
74 | struct irq_chip h8300irq_chip = { | 70 | struct irq_chip h8300irq_chip = { |
75 | .name = "H8300-INTC", | 71 | .name = "H8300-INTC", |
76 | .startup = h8300_startup_irq, | 72 | .irq_startup = h8300_startup_irq, |
77 | .shutdown = h8300_shutdown_irq, | 73 | .irq_shutdown = h8300_shutdown_irq, |
78 | .enable = h8300_enable_irq, | 74 | .irq_enable = h8300_enable_irq, |
79 | .disable = h8300_disable_irq, | 75 | .irq_disable = h8300_disable_irq, |
80 | .ack = NULL, | ||
81 | .end = h8300_end_irq, | ||
82 | }; | 76 | }; |
83 | 77 | ||
84 | #if defined(CONFIG_RAMKERNEL) | 78 | #if defined(CONFIG_RAMKERNEL) |
@@ -160,18 +154,14 @@ void __init init_IRQ(void) | |||
160 | 154 | ||
161 | setup_vector(); | 155 | setup_vector(); |
162 | 156 | ||
163 | for (c = 0; c < NR_IRQS; c++) { | 157 | for (c = 0; c < NR_IRQS; c++) |
164 | irq_desc[c].status = IRQ_DISABLED; | 158 | set_irq_chip_and_handler(c, &h8300irq_chip, handle_simple_irq); |
165 | irq_desc[c].action = NULL; | ||
166 | irq_desc[c].depth = 1; | ||
167 | irq_desc[c].chip = &h8300irq_chip; | ||
168 | } | ||
169 | } | 159 | } |
170 | 160 | ||
171 | asmlinkage void do_IRQ(int irq) | 161 | asmlinkage void do_IRQ(int irq) |
172 | { | 162 | { |
173 | irq_enter(); | 163 | irq_enter(); |
174 | __do_IRQ(irq); | 164 | generic_handle_irq(irq); |
175 | irq_exit(); | 165 | irq_exit(); |
176 | } | 166 | } |
177 | 167 | ||
@@ -192,7 +182,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
192 | goto unlock; | 182 | goto unlock; |
193 | seq_printf(p, "%3d: ",i); | 183 | seq_printf(p, "%3d: ",i); |
194 | seq_printf(p, "%10u ", kstat_irqs(i)); | 184 | seq_printf(p, "%10u ", kstat_irqs(i)); |
195 | seq_printf(p, " %14s", irq_desc[i].chip->name); | 185 | seq_printf(p, " %14s", irq_desc[i].irq_data.chip->name); |
196 | seq_printf(p, "-%-8s", irq_desc[i].name); | 186 | seq_printf(p, "-%-8s", irq_desc[i].name); |
197 | seq_printf(p, " %s", action->name); | 187 | seq_printf(p, " %s", action->name); |
198 | 188 | ||
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index e0f5b6d7f84..fcf3b437a2d 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
@@ -22,6 +22,10 @@ config IA64 | |||
22 | select HAVE_KVM | 22 | select HAVE_KVM |
23 | select HAVE_ARCH_TRACEHOOK | 23 | select HAVE_ARCH_TRACEHOOK |
24 | select HAVE_DMA_API_DEBUG | 24 | select HAVE_DMA_API_DEBUG |
25 | select HAVE_GENERIC_HARDIRQS | ||
26 | select GENERIC_IRQ_PROBE | ||
27 | select GENERIC_PENDING_IRQ if SMP | ||
28 | select IRQ_PER_CPU | ||
25 | default y | 29 | default y |
26 | help | 30 | help |
27 | The Itanium Processor Family is Intel's 64-bit successor to | 31 | The Itanium Processor Family is Intel's 64-bit successor to |
@@ -678,28 +682,6 @@ source "arch/ia64/kvm/Kconfig" | |||
678 | 682 | ||
679 | source "lib/Kconfig" | 683 | source "lib/Kconfig" |
680 | 684 | ||
681 | # | ||
682 | # Use the generic interrupt handling code in kernel/irq/: | ||
683 | # | ||
684 | config GENERIC_HARDIRQS | ||
685 | def_bool y | ||
686 | |||
687 | config GENERIC_HARDIRQS_NO__DO_IRQ | ||
688 | def_bool y | ||
689 | |||
690 | config GENERIC_IRQ_PROBE | ||
691 | bool | ||
692 | default y | ||
693 | |||
694 | config GENERIC_PENDING_IRQ | ||
695 | bool | ||
696 | depends on GENERIC_HARDIRQS && SMP | ||
697 | default y | ||
698 | |||
699 | config IRQ_PER_CPU | ||
700 | bool | ||
701 | default y | ||
702 | |||
703 | config IOMMU_HELPER | 685 | config IOMMU_HELPER |
704 | def_bool (IA64_HP_ZX1 || IA64_HP_ZX1_SWIOTLB || IA64_GENERIC || SWIOTLB) | 686 | def_bool (IA64_HP_ZX1 || IA64_HP_ZX1_SWIOTLB || IA64_GENERIC || SWIOTLB) |
705 | 687 | ||
diff --git a/arch/ia64/include/asm/io.h b/arch/ia64/include/asm/io.h index cc8335eb311..e5a6c3530c6 100644 --- a/arch/ia64/include/asm/io.h +++ b/arch/ia64/include/asm/io.h | |||
@@ -426,6 +426,11 @@ extern void __iomem * ioremap_nocache (unsigned long offset, unsigned long size) | |||
426 | extern void iounmap (volatile void __iomem *addr); | 426 | extern void iounmap (volatile void __iomem *addr); |
427 | extern void __iomem * early_ioremap (unsigned long phys_addr, unsigned long size); | 427 | extern void __iomem * early_ioremap (unsigned long phys_addr, unsigned long size); |
428 | extern void early_iounmap (volatile void __iomem *addr, unsigned long size); | 428 | extern void early_iounmap (volatile void __iomem *addr, unsigned long size); |
429 | static inline void __iomem * ioremap_cache (unsigned long phys_addr, unsigned long size) | ||
430 | { | ||
431 | return ioremap(phys_addr, size); | ||
432 | } | ||
433 | |||
429 | 434 | ||
430 | /* | 435 | /* |
431 | * String version of IO memory access ops: | 436 | * String version of IO memory access ops: |
diff --git a/arch/ia64/include/asm/page.h b/arch/ia64/include/asm/page.h index 41b6d31110f..961a16f43e6 100644 --- a/arch/ia64/include/asm/page.h +++ b/arch/ia64/include/asm/page.h | |||
@@ -189,6 +189,7 @@ get_order (unsigned long size) | |||
189 | # define pgprot_val(x) ((x).pgprot) | 189 | # define pgprot_val(x) ((x).pgprot) |
190 | 190 | ||
191 | # define __pte(x) ((pte_t) { (x) } ) | 191 | # define __pte(x) ((pte_t) { (x) } ) |
192 | # define __pmd(x) ((pmd_t) { (x) } ) | ||
192 | # define __pgprot(x) ((pgprot_t) { (x) } ) | 193 | # define __pgprot(x) ((pgprot_t) { (x) } ) |
193 | 194 | ||
194 | #else /* !STRICT_MM_TYPECHECKS */ | 195 | #else /* !STRICT_MM_TYPECHECKS */ |
diff --git a/arch/ia64/include/asm/processor.h b/arch/ia64/include/asm/processor.h index 348e44d08ce..03afe797074 100644 --- a/arch/ia64/include/asm/processor.h +++ b/arch/ia64/include/asm/processor.h | |||
@@ -717,8 +717,9 @@ prefetchw (const void *x) | |||
717 | #define spin_lock_prefetch(x) prefetchw(x) | 717 | #define spin_lock_prefetch(x) prefetchw(x) |
718 | 718 | ||
719 | extern unsigned long boot_option_idle_override; | 719 | extern unsigned long boot_option_idle_override; |
720 | extern unsigned long idle_halt; | 720 | |
721 | extern unsigned long idle_nomwait; | 721 | enum idle_boot_override {IDLE_NO_OVERRIDE=0, IDLE_HALT, IDLE_FORCE_MWAIT, |
722 | IDLE_NOMWAIT, IDLE_POLL}; | ||
722 | 723 | ||
723 | #endif /* !__ASSEMBLY__ */ | 724 | #endif /* !__ASSEMBLY__ */ |
724 | 725 | ||
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index ac76da099a6..89accc626b8 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -618,7 +618,7 @@ pfm_get_unmapped_area(struct file *file, unsigned long addr, unsigned long len, | |||
618 | } | 618 | } |
619 | 619 | ||
620 | /* forward declaration */ | 620 | /* forward declaration */ |
621 | static static const struct dentry_operations pfmfs_dentry_operations; | 621 | static const struct dentry_operations pfmfs_dentry_operations; |
622 | 622 | ||
623 | static struct dentry * | 623 | static struct dentry * |
624 | pfmfs_mount(struct file_system_type *fs_type, int flags, const char *dev_name, void *data) | 624 | pfmfs_mount(struct file_system_type *fs_type, int flags, const char *dev_name, void *data) |
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c index 16f1c7b04c6..6d33c5cc94f 100644 --- a/arch/ia64/kernel/process.c +++ b/arch/ia64/kernel/process.c | |||
@@ -53,12 +53,8 @@ | |||
53 | 53 | ||
54 | void (*ia64_mark_idle)(int); | 54 | void (*ia64_mark_idle)(int); |
55 | 55 | ||
56 | unsigned long boot_option_idle_override = 0; | 56 | unsigned long boot_option_idle_override = IDLE_NO_OVERRIDE; |
57 | EXPORT_SYMBOL(boot_option_idle_override); | 57 | EXPORT_SYMBOL(boot_option_idle_override); |
58 | unsigned long idle_halt; | ||
59 | EXPORT_SYMBOL(idle_halt); | ||
60 | unsigned long idle_nomwait; | ||
61 | EXPORT_SYMBOL(idle_nomwait); | ||
62 | void (*pm_idle) (void); | 58 | void (*pm_idle) (void); |
63 | EXPORT_SYMBOL(pm_idle); | 59 | EXPORT_SYMBOL(pm_idle); |
64 | void (*pm_power_off) (void); | 60 | void (*pm_power_off) (void); |
diff --git a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c index 1841ee7e65f..5ca674b7473 100644 --- a/arch/ia64/mm/hugetlbpage.c +++ b/arch/ia64/mm/hugetlbpage.c | |||
@@ -38,7 +38,7 @@ huge_pte_alloc(struct mm_struct *mm, unsigned long addr, unsigned long sz) | |||
38 | if (pud) { | 38 | if (pud) { |
39 | pmd = pmd_alloc(mm, pud, taddr); | 39 | pmd = pmd_alloc(mm, pud, taddr); |
40 | if (pmd) | 40 | if (pmd) |
41 | pte = pte_alloc_map(mm, pmd, taddr); | 41 | pte = pte_alloc_map(mm, NULL, pmd, taddr); |
42 | } | 42 | } |
43 | return pte; | 43 | return pte; |
44 | } | 44 | } |
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig index 5c291d65196..ef4c1e442be 100644 --- a/arch/m32r/Kconfig +++ b/arch/m32r/Kconfig | |||
@@ -7,6 +7,9 @@ config M32R | |||
7 | select HAVE_KERNEL_GZIP | 7 | select HAVE_KERNEL_GZIP |
8 | select HAVE_KERNEL_BZIP2 | 8 | select HAVE_KERNEL_BZIP2 |
9 | select HAVE_KERNEL_LZMA | 9 | select HAVE_KERNEL_LZMA |
10 | select HAVE_GENERIC_HARDIRQS | ||
11 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
12 | select GENERIC_IRQ_PROBE | ||
10 | 13 | ||
11 | config SBUS | 14 | config SBUS |
12 | bool | 15 | bool |
@@ -19,14 +22,6 @@ config ZONE_DMA | |||
19 | bool | 22 | bool |
20 | default y | 23 | default y |
21 | 24 | ||
22 | config GENERIC_HARDIRQS | ||
23 | bool | ||
24 | default y | ||
25 | |||
26 | config GENERIC_IRQ_PROBE | ||
27 | bool | ||
28 | default y | ||
29 | |||
30 | config NO_IOPORT | 25 | config NO_IOPORT |
31 | def_bool y | 26 | def_bool y |
32 | 27 | ||
diff --git a/arch/m32r/configs/m32700ut.smp_defconfig b/arch/m32r/configs/m32700ut.smp_defconfig index 816c3ecaa2a..a3d727ed6a1 100644 --- a/arch/m32r/configs/m32700ut.smp_defconfig +++ b/arch/m32r/configs/m32700ut.smp_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_IKCONFIG=y | |||
5 | CONFIG_IKCONFIG_PROC=y | 5 | CONFIG_IKCONFIG_PROC=y |
6 | CONFIG_LOG_BUF_SHIFT=15 | 6 | CONFIG_LOG_BUF_SHIFT=15 |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | # CONFIG_KALLSYMS is not set | 9 | # CONFIG_KALLSYMS is not set |
10 | # CONFIG_FUTEX is not set | 10 | # CONFIG_FUTEX is not set |
11 | # CONFIG_EPOLL is not set | 11 | # CONFIG_EPOLL is not set |
diff --git a/arch/m32r/configs/m32700ut.up_defconfig b/arch/m32r/configs/m32700ut.up_defconfig index 84785686640..b8334163099 100644 --- a/arch/m32r/configs/m32700ut.up_defconfig +++ b/arch/m32r/configs/m32700ut.up_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_IKCONFIG=y | |||
5 | CONFIG_IKCONFIG_PROC=y | 5 | CONFIG_IKCONFIG_PROC=y |
6 | CONFIG_LOG_BUF_SHIFT=14 | 6 | CONFIG_LOG_BUF_SHIFT=14 |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | # CONFIG_KALLSYMS is not set | 9 | # CONFIG_KALLSYMS is not set |
10 | # CONFIG_FUTEX is not set | 10 | # CONFIG_FUTEX is not set |
11 | # CONFIG_EPOLL is not set | 11 | # CONFIG_EPOLL is not set |
diff --git a/arch/m32r/configs/mappi.nommu_defconfig b/arch/m32r/configs/mappi.nommu_defconfig index 354a964d084..7c90ce2fc42 100644 --- a/arch/m32r/configs/mappi.nommu_defconfig +++ b/arch/m32r/configs/mappi.nommu_defconfig | |||
@@ -3,7 +3,7 @@ CONFIG_BSD_PROCESS_ACCT=y | |||
3 | CONFIG_IKCONFIG=y | 3 | CONFIG_IKCONFIG=y |
4 | CONFIG_LOG_BUF_SHIFT=14 | 4 | CONFIG_LOG_BUF_SHIFT=14 |
5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
6 | CONFIG_EMBEDDED=y | 6 | CONFIG_EXPERT=y |
7 | # CONFIG_KALLSYMS is not set | 7 | # CONFIG_KALLSYMS is not set |
8 | # CONFIG_FUTEX is not set | 8 | # CONFIG_FUTEX is not set |
9 | # CONFIG_EPOLL is not set | 9 | # CONFIG_EPOLL is not set |
diff --git a/arch/m32r/configs/mappi.smp_defconfig b/arch/m32r/configs/mappi.smp_defconfig index 9022307bd07..367d07cebcd 100644 --- a/arch/m32r/configs/mappi.smp_defconfig +++ b/arch/m32r/configs/mappi.smp_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_IKCONFIG_PROC=y | |||
5 | CONFIG_LOG_BUF_SHIFT=15 | 5 | CONFIG_LOG_BUF_SHIFT=15 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | # CONFIG_KALLSYMS is not set | 9 | # CONFIG_KALLSYMS is not set |
10 | # CONFIG_FUTEX is not set | 10 | # CONFIG_FUTEX is not set |
11 | # CONFIG_EPOLL is not set | 11 | # CONFIG_EPOLL is not set |
diff --git a/arch/m32r/configs/mappi.up_defconfig b/arch/m32r/configs/mappi.up_defconfig index 3726068721a..cb11384386c 100644 --- a/arch/m32r/configs/mappi.up_defconfig +++ b/arch/m32r/configs/mappi.up_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_IKCONFIG_PROC=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | # CONFIG_KALLSYMS is not set | 9 | # CONFIG_KALLSYMS is not set |
10 | # CONFIG_FUTEX is not set | 10 | # CONFIG_FUTEX is not set |
11 | # CONFIG_EPOLL is not set | 11 | # CONFIG_EPOLL is not set |
diff --git a/arch/m32r/configs/mappi2.opsp_defconfig b/arch/m32r/configs/mappi2.opsp_defconfig index 6136fad048e..3bff779259b 100644 --- a/arch/m32r/configs/mappi2.opsp_defconfig +++ b/arch/m32r/configs/mappi2.opsp_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_BSD_PROCESS_ACCT=y | |||
4 | CONFIG_IKCONFIG=y | 4 | CONFIG_IKCONFIG=y |
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | # CONFIG_KALLSYMS is not set | 8 | # CONFIG_KALLSYMS is not set |
9 | # CONFIG_FUTEX is not set | 9 | # CONFIG_FUTEX is not set |
10 | # CONFIG_EPOLL is not set | 10 | # CONFIG_EPOLL is not set |
diff --git a/arch/m32r/configs/mappi2.vdec2_defconfig b/arch/m32r/configs/mappi2.vdec2_defconfig index dce1fc7d67e..75246c9c1af 100644 --- a/arch/m32r/configs/mappi2.vdec2_defconfig +++ b/arch/m32r/configs/mappi2.vdec2_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_BSD_PROCESS_ACCT=y | |||
4 | CONFIG_IKCONFIG=y | 4 | CONFIG_IKCONFIG=y |
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | # CONFIG_KALLSYMS is not set | 8 | # CONFIG_KALLSYMS is not set |
9 | # CONFIG_FUTEX is not set | 9 | # CONFIG_FUTEX is not set |
10 | # CONFIG_EPOLL is not set | 10 | # CONFIG_EPOLL is not set |
diff --git a/arch/m32r/configs/mappi3.smp_defconfig b/arch/m32r/configs/mappi3.smp_defconfig index b204e2ecd0f..27cefd41ac1 100644 --- a/arch/m32r/configs/mappi3.smp_defconfig +++ b/arch/m32r/configs/mappi3.smp_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_IKCONFIG_PROC=y | |||
5 | CONFIG_LOG_BUF_SHIFT=15 | 5 | CONFIG_LOG_BUF_SHIFT=15 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | # CONFIG_KALLSYMS is not set | 9 | # CONFIG_KALLSYMS is not set |
10 | # CONFIG_FUTEX is not set | 10 | # CONFIG_FUTEX is not set |
11 | # CONFIG_EPOLL is not set | 11 | # CONFIG_EPOLL is not set |
diff --git a/arch/m32r/configs/oaks32r_defconfig b/arch/m32r/configs/oaks32r_defconfig index 5aa4ea9ebb1..5087a510ca4 100644 --- a/arch/m32r/configs/oaks32r_defconfig +++ b/arch/m32r/configs/oaks32r_defconfig | |||
@@ -2,7 +2,7 @@ CONFIG_EXPERIMENTAL=y | |||
2 | CONFIG_BSD_PROCESS_ACCT=y | 2 | CONFIG_BSD_PROCESS_ACCT=y |
3 | CONFIG_LOG_BUF_SHIFT=14 | 3 | CONFIG_LOG_BUF_SHIFT=14 |
4 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 4 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
5 | CONFIG_EMBEDDED=y | 5 | CONFIG_EXPERT=y |
6 | # CONFIG_KALLSYMS is not set | 6 | # CONFIG_KALLSYMS is not set |
7 | # CONFIG_FUTEX is not set | 7 | # CONFIG_FUTEX is not set |
8 | # CONFIG_EPOLL is not set | 8 | # CONFIG_EPOLL is not set |
diff --git a/arch/m32r/configs/opsput_defconfig b/arch/m32r/configs/opsput_defconfig index 8494c6a276e..50c6f525db2 100644 --- a/arch/m32r/configs/opsput_defconfig +++ b/arch/m32r/configs/opsput_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_BSD_PROCESS_ACCT=y | |||
4 | CONFIG_IKCONFIG=y | 4 | CONFIG_IKCONFIG=y |
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | # CONFIG_KALLSYMS is not set | 8 | # CONFIG_KALLSYMS is not set |
9 | # CONFIG_FUTEX is not set | 9 | # CONFIG_FUTEX is not set |
10 | # CONFIG_EPOLL is not set | 10 | # CONFIG_EPOLL is not set |
diff --git a/arch/m32r/configs/usrv_defconfig b/arch/m32r/configs/usrv_defconfig index 1df293bc2ab..a3cfaaedab6 100644 --- a/arch/m32r/configs/usrv_defconfig +++ b/arch/m32r/configs/usrv_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_BSD_PROCESS_ACCT=y | |||
5 | CONFIG_LOG_BUF_SHIFT=15 | 5 | CONFIG_LOG_BUF_SHIFT=15 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | CONFIG_KALLSYMS_EXTRA_PASS=y | 9 | CONFIG_KALLSYMS_EXTRA_PASS=y |
10 | CONFIG_SLAB=y | 10 | CONFIG_SLAB=y |
11 | CONFIG_MODULES=y | 11 | CONFIG_MODULES=y |
diff --git a/arch/m32r/kernel/irq.c b/arch/m32r/kernel/irq.c index 7db26f1f082..76eaf3883fb 100644 --- a/arch/m32r/kernel/irq.c +++ b/arch/m32r/kernel/irq.c | |||
@@ -40,8 +40,10 @@ int show_interrupts(struct seq_file *p, void *v) | |||
40 | } | 40 | } |
41 | 41 | ||
42 | if (i < NR_IRQS) { | 42 | if (i < NR_IRQS) { |
43 | raw_spin_lock_irqsave(&irq_desc[i].lock, flags); | 43 | struct irq_desc *desc = irq_to_desc(i); |
44 | action = irq_desc[i].action; | 44 | |
45 | raw_spin_lock_irqsave(&desc->lock, flags); | ||
46 | action = desc->action; | ||
45 | if (!action) | 47 | if (!action) |
46 | goto skip; | 48 | goto skip; |
47 | seq_printf(p, "%3d: ",i); | 49 | seq_printf(p, "%3d: ",i); |
@@ -51,7 +53,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
51 | for_each_online_cpu(j) | 53 | for_each_online_cpu(j) |
52 | seq_printf(p, "%10u ", kstat_irqs_cpu(i, j)); | 54 | seq_printf(p, "%10u ", kstat_irqs_cpu(i, j)); |
53 | #endif | 55 | #endif |
54 | seq_printf(p, " %14s", irq_desc[i].chip->name); | 56 | seq_printf(p, " %14s", desc->irq_data.chip->name); |
55 | seq_printf(p, " %s", action->name); | 57 | seq_printf(p, " %s", action->name); |
56 | 58 | ||
57 | for (action=action->next; action; action = action->next) | 59 | for (action=action->next; action; action = action->next) |
@@ -59,7 +61,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
59 | 61 | ||
60 | seq_putc(p, '\n'); | 62 | seq_putc(p, '\n'); |
61 | skip: | 63 | skip: |
62 | raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags); | 64 | raw_spin_unlock_irqrestore(&desc->lock, flags); |
63 | } | 65 | } |
64 | return 0; | 66 | return 0; |
65 | } | 67 | } |
@@ -78,7 +80,7 @@ asmlinkage unsigned int do_IRQ(int irq, struct pt_regs *regs) | |||
78 | #ifdef CONFIG_DEBUG_STACKOVERFLOW | 80 | #ifdef CONFIG_DEBUG_STACKOVERFLOW |
79 | /* FIXME M32R */ | 81 | /* FIXME M32R */ |
80 | #endif | 82 | #endif |
81 | __do_IRQ(irq); | 83 | generic_handle_irq(irq); |
82 | irq_exit(); | 84 | irq_exit(); |
83 | set_irq_regs(old_regs); | 85 | set_irq_regs(old_regs); |
84 | 86 | ||
diff --git a/arch/m32r/platforms/m32104ut/setup.c b/arch/m32r/platforms/m32104ut/setup.c index 402a59d7219..4a693d02c1e 100644 --- a/arch/m32r/platforms/m32104ut/setup.c +++ b/arch/m32r/platforms/m32104ut/setup.c | |||
@@ -39,39 +39,30 @@ static void enable_m32104ut_irq(unsigned int irq) | |||
39 | outl(data, port); | 39 | outl(data, port); |
40 | } | 40 | } |
41 | 41 | ||
42 | static void mask_and_ack_m32104ut(unsigned int irq) | 42 | static void mask_m32104ut_irq(struct irq_data *data) |
43 | { | 43 | { |
44 | disable_m32104ut_irq(irq); | 44 | disable_m32104ut_irq(data->irq); |
45 | } | 45 | } |
46 | 46 | ||
47 | static void end_m32104ut_irq(unsigned int irq) | 47 | static void unmask_m32104ut_irq(struct irq_data *data) |
48 | { | 48 | { |
49 | enable_m32104ut_irq(irq); | 49 | enable_m32104ut_irq(data->irq); |
50 | } | 50 | } |
51 | 51 | ||
52 | static unsigned int startup_m32104ut_irq(unsigned int irq) | 52 | static void shutdown_m32104ut_irq(struct irq_data *data) |
53 | { | 53 | { |
54 | enable_m32104ut_irq(irq); | 54 | unsigned int irq = data->irq; |
55 | return (0); | 55 | unsigned long port = irq2port(irq); |
56 | } | ||
57 | |||
58 | static void shutdown_m32104ut_irq(unsigned int irq) | ||
59 | { | ||
60 | unsigned long port; | ||
61 | 56 | ||
62 | port = irq2port(irq); | ||
63 | outl(M32R_ICUCR_ILEVEL7, port); | 57 | outl(M32R_ICUCR_ILEVEL7, port); |
64 | } | 58 | } |
65 | 59 | ||
66 | static struct irq_chip m32104ut_irq_type = | 60 | static struct irq_chip m32104ut_irq_type = |
67 | { | 61 | { |
68 | .name = "M32104UT-IRQ", | 62 | .name = "M32104UT-IRQ", |
69 | .startup = startup_m32104ut_irq, | 63 | .irq_shutdown = shutdown_m32104ut_irq, |
70 | .shutdown = shutdown_m32104ut_irq, | 64 | .irq_unmask = unmask_m32104ut_irq, |
71 | .enable = enable_m32104ut_irq, | 65 | .irq_mask = mask_m32104ut_irq, |
72 | .disable = disable_m32104ut_irq, | ||
73 | .ack = mask_and_ack_m32104ut, | ||
74 | .end = end_m32104ut_irq | ||
75 | }; | 66 | }; |
76 | 67 | ||
77 | void __init init_IRQ(void) | 68 | void __init init_IRQ(void) |
@@ -85,36 +76,29 @@ void __init init_IRQ(void) | |||
85 | 76 | ||
86 | #if defined(CONFIG_SMC91X) | 77 | #if defined(CONFIG_SMC91X) |
87 | /* INT#0: LAN controller on M32104UT-LAN (SMC91C111)*/ | 78 | /* INT#0: LAN controller on M32104UT-LAN (SMC91C111)*/ |
88 | irq_desc[M32R_IRQ_INT0].status = IRQ_DISABLED; | 79 | set_irq_chip_and_handler(M32R_IRQ_INT0, &m32104ut_irq_type, |
89 | irq_desc[M32R_IRQ_INT0].chip = &m32104ut_irq_type; | 80 | handle_level_irq); |
90 | irq_desc[M32R_IRQ_INT0].action = 0; | 81 | /* "H" level sense */ |
91 | irq_desc[M32R_IRQ_INT0].depth = 1; | 82 | cu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD11; |
92 | icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD11; /* "H" level sense */ | ||
93 | disable_m32104ut_irq(M32R_IRQ_INT0); | 83 | disable_m32104ut_irq(M32R_IRQ_INT0); |
94 | #endif /* CONFIG_SMC91X */ | 84 | #endif /* CONFIG_SMC91X */ |
95 | 85 | ||
96 | /* MFT2 : system timer */ | 86 | /* MFT2 : system timer */ |
97 | irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; | 87 | set_irq_chip_and_handler(M32R_IRQ_MFT2, &m32104ut_irq_type, |
98 | irq_desc[M32R_IRQ_MFT2].chip = &m32104ut_irq_type; | 88 | handle_level_irq); |
99 | irq_desc[M32R_IRQ_MFT2].action = 0; | ||
100 | irq_desc[M32R_IRQ_MFT2].depth = 1; | ||
101 | icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; | 89 | icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; |
102 | disable_m32104ut_irq(M32R_IRQ_MFT2); | 90 | disable_m32104ut_irq(M32R_IRQ_MFT2); |
103 | 91 | ||
104 | #ifdef CONFIG_SERIAL_M32R_SIO | 92 | #ifdef CONFIG_SERIAL_M32R_SIO |
105 | /* SIO0_R : uart receive data */ | 93 | /* SIO0_R : uart receive data */ |
106 | irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; | 94 | set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &m32104ut_irq_type, |
107 | irq_desc[M32R_IRQ_SIO0_R].chip = &m32104ut_irq_type; | 95 | handle_level_irq); |
108 | irq_desc[M32R_IRQ_SIO0_R].action = 0; | ||
109 | irq_desc[M32R_IRQ_SIO0_R].depth = 1; | ||
110 | icu_data[M32R_IRQ_SIO0_R].icucr = M32R_ICUCR_IEN; | 96 | icu_data[M32R_IRQ_SIO0_R].icucr = M32R_ICUCR_IEN; |
111 | disable_m32104ut_irq(M32R_IRQ_SIO0_R); | 97 | disable_m32104ut_irq(M32R_IRQ_SIO0_R); |
112 | 98 | ||
113 | /* SIO0_S : uart send data */ | 99 | /* SIO0_S : uart send data */ |
114 | irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; | 100 | set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &m32104ut_irq_type, |
115 | irq_desc[M32R_IRQ_SIO0_S].chip = &m32104ut_irq_type; | 101 | handle_level_irq); |
116 | irq_desc[M32R_IRQ_SIO0_S].action = 0; | ||
117 | irq_desc[M32R_IRQ_SIO0_S].depth = 1; | ||
118 | icu_data[M32R_IRQ_SIO0_S].icucr = M32R_ICUCR_IEN; | 102 | icu_data[M32R_IRQ_SIO0_S].icucr = M32R_ICUCR_IEN; |
119 | disable_m32104ut_irq(M32R_IRQ_SIO0_S); | 103 | disable_m32104ut_irq(M32R_IRQ_SIO0_S); |
120 | #endif /* CONFIG_SERIAL_M32R_SIO */ | 104 | #endif /* CONFIG_SERIAL_M32R_SIO */ |
diff --git a/arch/m32r/platforms/m32700ut/setup.c b/arch/m32r/platforms/m32700ut/setup.c index 80b1a026795..2074bcc841e 100644 --- a/arch/m32r/platforms/m32700ut/setup.c +++ b/arch/m32r/platforms/m32700ut/setup.c | |||
@@ -45,39 +45,30 @@ static void enable_m32700ut_irq(unsigned int irq) | |||
45 | outl(data, port); | 45 | outl(data, port); |
46 | } | 46 | } |
47 | 47 | ||
48 | static void mask_and_ack_m32700ut(unsigned int irq) | 48 | static void mask_m32700ut(struct irq_data *data) |
49 | { | 49 | { |
50 | disable_m32700ut_irq(irq); | 50 | disable_m32700ut_irq(data->irq); |
51 | } | 51 | } |
52 | 52 | ||
53 | static void end_m32700ut_irq(unsigned int irq) | 53 | static void unmask_m32700ut(struct irq_data *data) |
54 | { | 54 | { |
55 | enable_m32700ut_irq(irq); | 55 | enable_m32700ut_irq(data->irq); |
56 | } | 56 | } |
57 | 57 | ||
58 | static unsigned int startup_m32700ut_irq(unsigned int irq) | 58 | static void shutdown_m32700ut(struct irq_data *data) |
59 | { | ||
60 | enable_m32700ut_irq(irq); | ||
61 | return (0); | ||
62 | } | ||
63 | |||
64 | static void shutdown_m32700ut_irq(unsigned int irq) | ||
65 | { | 59 | { |
66 | unsigned long port; | 60 | unsigned long port; |
67 | 61 | ||
68 | port = irq2port(irq); | 62 | port = irq2port(data->irq); |
69 | outl(M32R_ICUCR_ILEVEL7, port); | 63 | outl(M32R_ICUCR_ILEVEL7, port); |
70 | } | 64 | } |
71 | 65 | ||
72 | static struct irq_chip m32700ut_irq_type = | 66 | static struct irq_chip m32700ut_irq_type = |
73 | { | 67 | { |
74 | .name = "M32700UT-IRQ", | 68 | .name = "M32700UT-IRQ", |
75 | .startup = startup_m32700ut_irq, | 69 | .irq_shutdown = shutdown_m32700ut, |
76 | .shutdown = shutdown_m32700ut_irq, | 70 | .irq_mask = mask_m32700ut, |
77 | .enable = enable_m32700ut_irq, | 71 | .irq_unmask = unmask_m32700ut |
78 | .disable = disable_m32700ut_irq, | ||
79 | .ack = mask_and_ack_m32700ut, | ||
80 | .end = end_m32700ut_irq | ||
81 | }; | 72 | }; |
82 | 73 | ||
83 | /* | 74 | /* |
@@ -99,7 +90,6 @@ static void disable_m32700ut_pld_irq(unsigned int irq) | |||
99 | unsigned int pldirq; | 90 | unsigned int pldirq; |
100 | 91 | ||
101 | pldirq = irq2pldirq(irq); | 92 | pldirq = irq2pldirq(irq); |
102 | // disable_m32700ut_irq(M32R_IRQ_INT1); | ||
103 | port = pldirq2port(pldirq); | 93 | port = pldirq2port(pldirq); |
104 | data = pld_icu_data[pldirq].icucr|PLD_ICUCR_ILEVEL7; | 94 | data = pld_icu_data[pldirq].icucr|PLD_ICUCR_ILEVEL7; |
105 | outw(data, port); | 95 | outw(data, port); |
@@ -111,50 +101,38 @@ static void enable_m32700ut_pld_irq(unsigned int irq) | |||
111 | unsigned int pldirq; | 101 | unsigned int pldirq; |
112 | 102 | ||
113 | pldirq = irq2pldirq(irq); | 103 | pldirq = irq2pldirq(irq); |
114 | // enable_m32700ut_irq(M32R_IRQ_INT1); | ||
115 | port = pldirq2port(pldirq); | 104 | port = pldirq2port(pldirq); |
116 | data = pld_icu_data[pldirq].icucr|PLD_ICUCR_IEN|PLD_ICUCR_ILEVEL6; | 105 | data = pld_icu_data[pldirq].icucr|PLD_ICUCR_IEN|PLD_ICUCR_ILEVEL6; |
117 | outw(data, port); | 106 | outw(data, port); |
118 | } | 107 | } |
119 | 108 | ||
120 | static void mask_and_ack_m32700ut_pld(unsigned int irq) | 109 | static void mask_m32700ut_pld(struct irq_data *data) |
121 | { | ||
122 | disable_m32700ut_pld_irq(irq); | ||
123 | // mask_and_ack_m32700ut(M32R_IRQ_INT1); | ||
124 | } | ||
125 | |||
126 | static void end_m32700ut_pld_irq(unsigned int irq) | ||
127 | { | 110 | { |
128 | enable_m32700ut_pld_irq(irq); | 111 | disable_m32700ut_pld_irq(data->irq); |
129 | end_m32700ut_irq(M32R_IRQ_INT1); | ||
130 | } | 112 | } |
131 | 113 | ||
132 | static unsigned int startup_m32700ut_pld_irq(unsigned int irq) | 114 | static void unmask_m32700ut_pld(struct irq_data *data) |
133 | { | 115 | { |
134 | enable_m32700ut_pld_irq(irq); | 116 | enable_m32700ut_pld_irq(data->irq); |
135 | return (0); | 117 | enable_m32700ut_irq(M32R_IRQ_INT1); |
136 | } | 118 | } |
137 | 119 | ||
138 | static void shutdown_m32700ut_pld_irq(unsigned int irq) | 120 | static void shutdown_m32700ut_pld_irq(struct irq_data *data) |
139 | { | 121 | { |
140 | unsigned long port; | 122 | unsigned long port; |
141 | unsigned int pldirq; | 123 | unsigned int pldirq; |
142 | 124 | ||
143 | pldirq = irq2pldirq(irq); | 125 | pldirq = irq2pldirq(data->irq); |
144 | // shutdown_m32700ut_irq(M32R_IRQ_INT1); | ||
145 | port = pldirq2port(pldirq); | 126 | port = pldirq2port(pldirq); |
146 | outw(PLD_ICUCR_ILEVEL7, port); | 127 | outw(PLD_ICUCR_ILEVEL7, port); |
147 | } | 128 | } |
148 | 129 | ||
149 | static struct irq_chip m32700ut_pld_irq_type = | 130 | static struct irq_chip m32700ut_pld_irq_type = |
150 | { | 131 | { |
151 | .name = "M32700UT-PLD-IRQ", | 132 | .name = "M32700UT-PLD-IRQ", |
152 | .startup = startup_m32700ut_pld_irq, | 133 | .irq_shutdown = shutdown_m32700ut_pld_irq, |
153 | .shutdown = shutdown_m32700ut_pld_irq, | 134 | .irq_mask = mask_m32700ut_pld, |
154 | .enable = enable_m32700ut_pld_irq, | 135 | .irq_unmask = unmask_m32700ut_pld, |
155 | .disable = disable_m32700ut_pld_irq, | ||
156 | .ack = mask_and_ack_m32700ut_pld, | ||
157 | .end = end_m32700ut_pld_irq | ||
158 | }; | 136 | }; |
159 | 137 | ||
160 | /* | 138 | /* |
@@ -188,42 +166,33 @@ static void enable_m32700ut_lanpld_irq(unsigned int irq) | |||
188 | outw(data, port); | 166 | outw(data, port); |
189 | } | 167 | } |
190 | 168 | ||
191 | static void mask_and_ack_m32700ut_lanpld(unsigned int irq) | 169 | static void mask_m32700ut_lanpld(struct irq_data *data) |
192 | { | 170 | { |
193 | disable_m32700ut_lanpld_irq(irq); | 171 | disable_m32700ut_lanpld_irq(data->irq); |
194 | } | 172 | } |
195 | 173 | ||
196 | static void end_m32700ut_lanpld_irq(unsigned int irq) | 174 | static void unmask_m32700ut_lanpld(struct irq_data *data) |
197 | { | 175 | { |
198 | enable_m32700ut_lanpld_irq(irq); | 176 | enable_m32700ut_lanpld_irq(data->irq); |
199 | end_m32700ut_irq(M32R_IRQ_INT0); | 177 | enable_m32700ut_irq(M32R_IRQ_INT0); |
200 | } | ||
201 | |||
202 | static unsigned int startup_m32700ut_lanpld_irq(unsigned int irq) | ||
203 | { | ||
204 | enable_m32700ut_lanpld_irq(irq); | ||
205 | return (0); | ||
206 | } | 178 | } |
207 | 179 | ||
208 | static void shutdown_m32700ut_lanpld_irq(unsigned int irq) | 180 | static void shutdown_m32700ut_lanpld(struct irq_data *data) |
209 | { | 181 | { |
210 | unsigned long port; | 182 | unsigned long port; |
211 | unsigned int pldirq; | 183 | unsigned int pldirq; |
212 | 184 | ||
213 | pldirq = irq2lanpldirq(irq); | 185 | pldirq = irq2lanpldirq(data->irq); |
214 | port = lanpldirq2port(pldirq); | 186 | port = lanpldirq2port(pldirq); |
215 | outw(PLD_ICUCR_ILEVEL7, port); | 187 | outw(PLD_ICUCR_ILEVEL7, port); |
216 | } | 188 | } |
217 | 189 | ||
218 | static struct irq_chip m32700ut_lanpld_irq_type = | 190 | static struct irq_chip m32700ut_lanpld_irq_type = |
219 | { | 191 | { |
220 | .name = "M32700UT-PLD-LAN-IRQ", | 192 | .name = "M32700UT-PLD-LAN-IRQ", |
221 | .startup = startup_m32700ut_lanpld_irq, | 193 | .irq_shutdown = shutdown_m32700ut_lanpld, |
222 | .shutdown = shutdown_m32700ut_lanpld_irq, | 194 | .irq_mask = mask_m32700ut_lanpld, |
223 | .enable = enable_m32700ut_lanpld_irq, | 195 | .irq_unmask = unmask_m32700ut_lanpld, |
224 | .disable = disable_m32700ut_lanpld_irq, | ||
225 | .ack = mask_and_ack_m32700ut_lanpld, | ||
226 | .end = end_m32700ut_lanpld_irq | ||
227 | }; | 196 | }; |
228 | 197 | ||
229 | /* | 198 | /* |
@@ -257,143 +226,110 @@ static void enable_m32700ut_lcdpld_irq(unsigned int irq) | |||
257 | outw(data, port); | 226 | outw(data, port); |
258 | } | 227 | } |
259 | 228 | ||
260 | static void mask_and_ack_m32700ut_lcdpld(unsigned int irq) | 229 | static void mask_m32700ut_lcdpld(struct irq_data *data) |
261 | { | 230 | { |
262 | disable_m32700ut_lcdpld_irq(irq); | 231 | disable_m32700ut_lcdpld_irq(data->irq); |
263 | } | 232 | } |
264 | 233 | ||
265 | static void end_m32700ut_lcdpld_irq(unsigned int irq) | 234 | static void unmask_m32700ut_lcdpld(struct irq_data *data) |
266 | { | 235 | { |
267 | enable_m32700ut_lcdpld_irq(irq); | 236 | enable_m32700ut_lcdpld_irq(data->irq); |
268 | end_m32700ut_irq(M32R_IRQ_INT2); | 237 | enable_m32700ut_irq(M32R_IRQ_INT2); |
269 | } | ||
270 | |||
271 | static unsigned int startup_m32700ut_lcdpld_irq(unsigned int irq) | ||
272 | { | ||
273 | enable_m32700ut_lcdpld_irq(irq); | ||
274 | return (0); | ||
275 | } | 238 | } |
276 | 239 | ||
277 | static void shutdown_m32700ut_lcdpld_irq(unsigned int irq) | 240 | static void shutdown_m32700ut_lcdpld(struct irq_data *data) |
278 | { | 241 | { |
279 | unsigned long port; | 242 | unsigned long port; |
280 | unsigned int pldirq; | 243 | unsigned int pldirq; |
281 | 244 | ||
282 | pldirq = irq2lcdpldirq(irq); | 245 | pldirq = irq2lcdpldirq(data->irq); |
283 | port = lcdpldirq2port(pldirq); | 246 | port = lcdpldirq2port(pldirq); |
284 | outw(PLD_ICUCR_ILEVEL7, port); | 247 | outw(PLD_ICUCR_ILEVEL7, port); |
285 | } | 248 | } |
286 | 249 | ||
287 | static struct irq_chip m32700ut_lcdpld_irq_type = | 250 | static struct irq_chip m32700ut_lcdpld_irq_type = |
288 | { | 251 | { |
289 | .name = "M32700UT-PLD-LCD-IRQ", | 252 | .name = "M32700UT-PLD-LCD-IRQ", |
290 | .startup = startup_m32700ut_lcdpld_irq, | 253 | .irq_shutdown = shutdown_m32700ut_lcdpld, |
291 | .shutdown = shutdown_m32700ut_lcdpld_irq, | 254 | .irq_mask = mask_m32700ut_lcdpld, |
292 | .enable = enable_m32700ut_lcdpld_irq, | 255 | .irq_unmask = unmask_m32700ut_lcdpld, |
293 | .disable = disable_m32700ut_lcdpld_irq, | ||
294 | .ack = mask_and_ack_m32700ut_lcdpld, | ||
295 | .end = end_m32700ut_lcdpld_irq | ||
296 | }; | 256 | }; |
297 | 257 | ||
298 | void __init init_IRQ(void) | 258 | void __init init_IRQ(void) |
299 | { | 259 | { |
300 | #if defined(CONFIG_SMC91X) | 260 | #if defined(CONFIG_SMC91X) |
301 | /* INT#0: LAN controller on M32700UT-LAN (SMC91C111)*/ | 261 | /* INT#0: LAN controller on M32700UT-LAN (SMC91C111)*/ |
302 | irq_desc[M32700UT_LAN_IRQ_LAN].status = IRQ_DISABLED; | 262 | set_irq_chip_and_handler(M32700UT_LAN_IRQ_LAN, |
303 | irq_desc[M32700UT_LAN_IRQ_LAN].chip = &m32700ut_lanpld_irq_type; | 263 | &m32700ut_lanpld_irq_type, handle_level_irq); |
304 | irq_desc[M32700UT_LAN_IRQ_LAN].action = 0; | ||
305 | irq_desc[M32700UT_LAN_IRQ_LAN].depth = 1; /* disable nested irq */ | ||
306 | lanpld_icu_data[irq2lanpldirq(M32700UT_LAN_IRQ_LAN)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* "H" edge sense */ | 264 | lanpld_icu_data[irq2lanpldirq(M32700UT_LAN_IRQ_LAN)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* "H" edge sense */ |
307 | disable_m32700ut_lanpld_irq(M32700UT_LAN_IRQ_LAN); | 265 | disable_m32700ut_lanpld_irq(M32700UT_LAN_IRQ_LAN); |
308 | #endif /* CONFIG_SMC91X */ | 266 | #endif /* CONFIG_SMC91X */ |
309 | 267 | ||
310 | /* MFT2 : system timer */ | 268 | /* MFT2 : system timer */ |
311 | irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; | 269 | set_irq_chip_and_handler(M32R_IRQ_MFT2, &m32700ut_irq_type, |
312 | irq_desc[M32R_IRQ_MFT2].chip = &m32700ut_irq_type; | 270 | handle_level_irq); |
313 | irq_desc[M32R_IRQ_MFT2].action = 0; | ||
314 | irq_desc[M32R_IRQ_MFT2].depth = 1; | ||
315 | icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; | 271 | icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; |
316 | disable_m32700ut_irq(M32R_IRQ_MFT2); | 272 | disable_m32700ut_irq(M32R_IRQ_MFT2); |
317 | 273 | ||
318 | /* SIO0 : receive */ | 274 | /* SIO0 : receive */ |
319 | irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; | 275 | set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &m32700ut_irq_type, |
320 | irq_desc[M32R_IRQ_SIO0_R].chip = &m32700ut_irq_type; | 276 | handle_level_irq); |
321 | irq_desc[M32R_IRQ_SIO0_R].action = 0; | ||
322 | irq_desc[M32R_IRQ_SIO0_R].depth = 1; | ||
323 | icu_data[M32R_IRQ_SIO0_R].icucr = 0; | 277 | icu_data[M32R_IRQ_SIO0_R].icucr = 0; |
324 | disable_m32700ut_irq(M32R_IRQ_SIO0_R); | 278 | disable_m32700ut_irq(M32R_IRQ_SIO0_R); |
325 | 279 | ||
326 | /* SIO0 : send */ | 280 | /* SIO0 : send */ |
327 | irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; | 281 | set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &m32700ut_irq_type, |
328 | irq_desc[M32R_IRQ_SIO0_S].chip = &m32700ut_irq_type; | 282 | handle_level_irq); |
329 | irq_desc[M32R_IRQ_SIO0_S].action = 0; | ||
330 | irq_desc[M32R_IRQ_SIO0_S].depth = 1; | ||
331 | icu_data[M32R_IRQ_SIO0_S].icucr = 0; | 283 | icu_data[M32R_IRQ_SIO0_S].icucr = 0; |
332 | disable_m32700ut_irq(M32R_IRQ_SIO0_S); | 284 | disable_m32700ut_irq(M32R_IRQ_SIO0_S); |
333 | 285 | ||
334 | /* SIO1 : receive */ | 286 | /* SIO1 : receive */ |
335 | irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED; | 287 | set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &m32700ut_irq_type, |
336 | irq_desc[M32R_IRQ_SIO1_R].chip = &m32700ut_irq_type; | 288 | handle_level_irq); |
337 | irq_desc[M32R_IRQ_SIO1_R].action = 0; | ||
338 | irq_desc[M32R_IRQ_SIO1_R].depth = 1; | ||
339 | icu_data[M32R_IRQ_SIO1_R].icucr = 0; | 289 | icu_data[M32R_IRQ_SIO1_R].icucr = 0; |
340 | disable_m32700ut_irq(M32R_IRQ_SIO1_R); | 290 | disable_m32700ut_irq(M32R_IRQ_SIO1_R); |
341 | 291 | ||
342 | /* SIO1 : send */ | 292 | /* SIO1 : send */ |
343 | irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED; | 293 | set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &m32700ut_irq_type, |
344 | irq_desc[M32R_IRQ_SIO1_S].chip = &m32700ut_irq_type; | 294 | handle_level_irq); |
345 | irq_desc[M32R_IRQ_SIO1_S].action = 0; | ||
346 | irq_desc[M32R_IRQ_SIO1_S].depth = 1; | ||
347 | icu_data[M32R_IRQ_SIO1_S].icucr = 0; | 295 | icu_data[M32R_IRQ_SIO1_S].icucr = 0; |
348 | disable_m32700ut_irq(M32R_IRQ_SIO1_S); | 296 | disable_m32700ut_irq(M32R_IRQ_SIO1_S); |
349 | 297 | ||
350 | /* DMA1 : */ | 298 | /* DMA1 : */ |
351 | irq_desc[M32R_IRQ_DMA1].status = IRQ_DISABLED; | 299 | set_irq_chip_and_handler(M32R_IRQ_DMA1, &m32700ut_irq_type, |
352 | irq_desc[M32R_IRQ_DMA1].chip = &m32700ut_irq_type; | 300 | handle_level_irq); |
353 | irq_desc[M32R_IRQ_DMA1].action = 0; | ||
354 | irq_desc[M32R_IRQ_DMA1].depth = 1; | ||
355 | icu_data[M32R_IRQ_DMA1].icucr = 0; | 301 | icu_data[M32R_IRQ_DMA1].icucr = 0; |
356 | disable_m32700ut_irq(M32R_IRQ_DMA1); | 302 | disable_m32700ut_irq(M32R_IRQ_DMA1); |
357 | 303 | ||
358 | #ifdef CONFIG_SERIAL_M32R_PLDSIO | 304 | #ifdef CONFIG_SERIAL_M32R_PLDSIO |
359 | /* INT#1: SIO0 Receive on PLD */ | 305 | /* INT#1: SIO0 Receive on PLD */ |
360 | irq_desc[PLD_IRQ_SIO0_RCV].status = IRQ_DISABLED; | 306 | set_irq_chip_and_handler(PLD_IRQ_SIO0_RCV, &m32700ut_pld_irq_type, |
361 | irq_desc[PLD_IRQ_SIO0_RCV].chip = &m32700ut_pld_irq_type; | 307 | handle_level_irq); |
362 | irq_desc[PLD_IRQ_SIO0_RCV].action = 0; | ||
363 | irq_desc[PLD_IRQ_SIO0_RCV].depth = 1; /* disable nested irq */ | ||
364 | pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_RCV)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; | 308 | pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_RCV)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; |
365 | disable_m32700ut_pld_irq(PLD_IRQ_SIO0_RCV); | 309 | disable_m32700ut_pld_irq(PLD_IRQ_SIO0_RCV); |
366 | 310 | ||
367 | /* INT#1: SIO0 Send on PLD */ | 311 | /* INT#1: SIO0 Send on PLD */ |
368 | irq_desc[PLD_IRQ_SIO0_SND].status = IRQ_DISABLED; | 312 | set_irq_chip_and_handler(PLD_IRQ_SIO0_SND, &m32700ut_pld_irq_type, |
369 | irq_desc[PLD_IRQ_SIO0_SND].chip = &m32700ut_pld_irq_type; | 313 | handle_level_irq); |
370 | irq_desc[PLD_IRQ_SIO0_SND].action = 0; | ||
371 | irq_desc[PLD_IRQ_SIO0_SND].depth = 1; /* disable nested irq */ | ||
372 | pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_SND)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; | 314 | pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_SND)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; |
373 | disable_m32700ut_pld_irq(PLD_IRQ_SIO0_SND); | 315 | disable_m32700ut_pld_irq(PLD_IRQ_SIO0_SND); |
374 | #endif /* CONFIG_SERIAL_M32R_PLDSIO */ | 316 | #endif /* CONFIG_SERIAL_M32R_PLDSIO */ |
375 | 317 | ||
376 | /* INT#1: CFC IREQ on PLD */ | 318 | /* INT#1: CFC IREQ on PLD */ |
377 | irq_desc[PLD_IRQ_CFIREQ].status = IRQ_DISABLED; | 319 | set_irq_chip_and_handler(PLD_IRQ_CFIREQ, &m32700ut_pld_irq_type, |
378 | irq_desc[PLD_IRQ_CFIREQ].chip = &m32700ut_pld_irq_type; | 320 | handle_level_irq); |
379 | irq_desc[PLD_IRQ_CFIREQ].action = 0; | ||
380 | irq_desc[PLD_IRQ_CFIREQ].depth = 1; /* disable nested irq */ | ||
381 | pld_icu_data[irq2pldirq(PLD_IRQ_CFIREQ)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* 'L' level sense */ | 321 | pld_icu_data[irq2pldirq(PLD_IRQ_CFIREQ)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* 'L' level sense */ |
382 | disable_m32700ut_pld_irq(PLD_IRQ_CFIREQ); | 322 | disable_m32700ut_pld_irq(PLD_IRQ_CFIREQ); |
383 | 323 | ||
384 | /* INT#1: CFC Insert on PLD */ | 324 | /* INT#1: CFC Insert on PLD */ |
385 | irq_desc[PLD_IRQ_CFC_INSERT].status = IRQ_DISABLED; | 325 | set_irq_chip_and_handler(PLD_IRQ_CFC_INSERT, &m32700ut_pld_irq_type, |
386 | irq_desc[PLD_IRQ_CFC_INSERT].chip = &m32700ut_pld_irq_type; | 326 | handle_level_irq); |
387 | irq_desc[PLD_IRQ_CFC_INSERT].action = 0; | ||
388 | irq_desc[PLD_IRQ_CFC_INSERT].depth = 1; /* disable nested irq */ | ||
389 | pld_icu_data[irq2pldirq(PLD_IRQ_CFC_INSERT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD00; /* 'L' edge sense */ | 327 | pld_icu_data[irq2pldirq(PLD_IRQ_CFC_INSERT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD00; /* 'L' edge sense */ |
390 | disable_m32700ut_pld_irq(PLD_IRQ_CFC_INSERT); | 328 | disable_m32700ut_pld_irq(PLD_IRQ_CFC_INSERT); |
391 | 329 | ||
392 | /* INT#1: CFC Eject on PLD */ | 330 | /* INT#1: CFC Eject on PLD */ |
393 | irq_desc[PLD_IRQ_CFC_EJECT].status = IRQ_DISABLED; | 331 | set_irq_chip_and_handler(PLD_IRQ_CFC_EJECT, &m32700ut_pld_irq_type, |
394 | irq_desc[PLD_IRQ_CFC_EJECT].chip = &m32700ut_pld_irq_type; | 332 | handle_level_irq); |
395 | irq_desc[PLD_IRQ_CFC_EJECT].action = 0; | ||
396 | irq_desc[PLD_IRQ_CFC_EJECT].depth = 1; /* disable nested irq */ | ||
397 | pld_icu_data[irq2pldirq(PLD_IRQ_CFC_EJECT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* 'H' edge sense */ | 333 | pld_icu_data[irq2pldirq(PLD_IRQ_CFC_EJECT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* 'H' edge sense */ |
398 | disable_m32700ut_pld_irq(PLD_IRQ_CFC_EJECT); | 334 | disable_m32700ut_pld_irq(PLD_IRQ_CFC_EJECT); |
399 | 335 | ||
@@ -413,13 +349,11 @@ void __init init_IRQ(void) | |||
413 | 349 | ||
414 | #if defined(CONFIG_USB) | 350 | #if defined(CONFIG_USB) |
415 | outw(USBCR_OTGS, USBCR); /* USBCR: non-OTG */ | 351 | outw(USBCR_OTGS, USBCR); /* USBCR: non-OTG */ |
352 | set_irq_chip_and_handler(M32700UT_LCD_IRQ_USB_INT1, | ||
353 | &m32700ut_lcdpld_irq_type, handle_level_irq); | ||
416 | 354 | ||
417 | irq_desc[M32700UT_LCD_IRQ_USB_INT1].status = IRQ_DISABLED; | 355 | lcdpld_icu_data[irq2lcdpldirq(M32700UT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* "L" level sense */ |
418 | irq_desc[M32700UT_LCD_IRQ_USB_INT1].chip = &m32700ut_lcdpld_irq_type; | 356 | disable_m32700ut_lcdpld_irq(M32700UT_LCD_IRQ_USB_INT1); |
419 | irq_desc[M32700UT_LCD_IRQ_USB_INT1].action = 0; | ||
420 | irq_desc[M32700UT_LCD_IRQ_USB_INT1].depth = 1; | ||
421 | lcdpld_icu_data[irq2lcdpldirq(M32700UT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* "L" level sense */ | ||
422 | disable_m32700ut_lcdpld_irq(M32700UT_LCD_IRQ_USB_INT1); | ||
423 | #endif | 357 | #endif |
424 | /* | 358 | /* |
425 | * INT2# is used for BAT, USB, AUDIO | 359 | * INT2# is used for BAT, USB, AUDIO |
@@ -432,10 +366,8 @@ void __init init_IRQ(void) | |||
432 | /* | 366 | /* |
433 | * INT3# is used for AR | 367 | * INT3# is used for AR |
434 | */ | 368 | */ |
435 | irq_desc[M32R_IRQ_INT3].status = IRQ_DISABLED; | 369 | set_irq_chip_and_handler(M32R_IRQ_INT3, &m32700ut_irq_type, |
436 | irq_desc[M32R_IRQ_INT3].chip = &m32700ut_irq_type; | 370 | handle_level_irq); |
437 | irq_desc[M32R_IRQ_INT3].action = 0; | ||
438 | irq_desc[M32R_IRQ_INT3].depth = 1; | ||
439 | icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; | 371 | icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; |
440 | disable_m32700ut_irq(M32R_IRQ_INT3); | 372 | disable_m32700ut_irq(M32R_IRQ_INT3); |
441 | #endif /* CONFIG_VIDEO_M32R_AR */ | 373 | #endif /* CONFIG_VIDEO_M32R_AR */ |
diff --git a/arch/m32r/platforms/mappi/setup.c b/arch/m32r/platforms/mappi/setup.c index ea00c84d6b1..cdd8c457402 100644 --- a/arch/m32r/platforms/mappi/setup.c +++ b/arch/m32r/platforms/mappi/setup.c | |||
@@ -38,40 +38,30 @@ static void enable_mappi_irq(unsigned int irq) | |||
38 | outl(data, port); | 38 | outl(data, port); |
39 | } | 39 | } |
40 | 40 | ||
41 | static void mask_and_ack_mappi(unsigned int irq) | 41 | static void mask_mappi(struct irq_data *data) |
42 | { | 42 | { |
43 | disable_mappi_irq(irq); | 43 | disable_mappi_irq(data->irq); |
44 | } | 44 | } |
45 | 45 | ||
46 | static void end_mappi_irq(unsigned int irq) | 46 | static void unmask_mappi(struct irq_data *data) |
47 | { | 47 | { |
48 | if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) | 48 | enable_mappi_irq(data->irq); |
49 | enable_mappi_irq(irq); | ||
50 | } | 49 | } |
51 | 50 | ||
52 | static unsigned int startup_mappi_irq(unsigned int irq) | 51 | static void shutdown_mappi(struct irq_data *data) |
53 | { | ||
54 | enable_mappi_irq(irq); | ||
55 | return (0); | ||
56 | } | ||
57 | |||
58 | static void shutdown_mappi_irq(unsigned int irq) | ||
59 | { | 52 | { |
60 | unsigned long port; | 53 | unsigned long port; |
61 | 54 | ||
62 | port = irq2port(irq); | 55 | port = irq2port(data->irq); |
63 | outl(M32R_ICUCR_ILEVEL7, port); | 56 | outl(M32R_ICUCR_ILEVEL7, port); |
64 | } | 57 | } |
65 | 58 | ||
66 | static struct irq_chip mappi_irq_type = | 59 | static struct irq_chip mappi_irq_type = |
67 | { | 60 | { |
68 | .name = "MAPPI-IRQ", | 61 | .name = "MAPPI-IRQ", |
69 | .startup = startup_mappi_irq, | 62 | .irq_shutdown = shutdown_mappi, |
70 | .shutdown = shutdown_mappi_irq, | 63 | .irq_mask = mask_mappi, |
71 | .enable = enable_mappi_irq, | 64 | .irq_unmask = unmask_mappi, |
72 | .disable = disable_mappi_irq, | ||
73 | .ack = mask_and_ack_mappi, | ||
74 | .end = end_mappi_irq | ||
75 | }; | 65 | }; |
76 | 66 | ||
77 | void __init init_IRQ(void) | 67 | void __init init_IRQ(void) |
@@ -85,70 +75,54 @@ void __init init_IRQ(void) | |||
85 | 75 | ||
86 | #ifdef CONFIG_NE2000 | 76 | #ifdef CONFIG_NE2000 |
87 | /* INT0 : LAN controller (RTL8019AS) */ | 77 | /* INT0 : LAN controller (RTL8019AS) */ |
88 | irq_desc[M32R_IRQ_INT0].status = IRQ_DISABLED; | 78 | set_irq_chip_and_handler(M32R_IRQ_INT0, &mappi_irq_type, |
89 | irq_desc[M32R_IRQ_INT0].chip = &mappi_irq_type; | 79 | handle_level_irq); |
90 | irq_desc[M32R_IRQ_INT0].action = NULL; | ||
91 | irq_desc[M32R_IRQ_INT0].depth = 1; | ||
92 | icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD11; | 80 | icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD11; |
93 | disable_mappi_irq(M32R_IRQ_INT0); | 81 | disable_mappi_irq(M32R_IRQ_INT0); |
94 | #endif /* CONFIG_M32R_NE2000 */ | 82 | #endif /* CONFIG_M32R_NE2000 */ |
95 | 83 | ||
96 | /* MFT2 : system timer */ | 84 | /* MFT2 : system timer */ |
97 | irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; | 85 | set_irq_chip_and_handler(M32R_IRQ_MFT2, &mappi_irq_type, |
98 | irq_desc[M32R_IRQ_MFT2].chip = &mappi_irq_type; | 86 | handle_level_irq); |
99 | irq_desc[M32R_IRQ_MFT2].action = NULL; | ||
100 | irq_desc[M32R_IRQ_MFT2].depth = 1; | ||
101 | icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; | 87 | icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; |
102 | disable_mappi_irq(M32R_IRQ_MFT2); | 88 | disable_mappi_irq(M32R_IRQ_MFT2); |
103 | 89 | ||
104 | #ifdef CONFIG_SERIAL_M32R_SIO | 90 | #ifdef CONFIG_SERIAL_M32R_SIO |
105 | /* SIO0_R : uart receive data */ | 91 | /* SIO0_R : uart receive data */ |
106 | irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; | 92 | set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &mappi_irq_type, |
107 | irq_desc[M32R_IRQ_SIO0_R].chip = &mappi_irq_type; | 93 | handle_level_irq); |
108 | irq_desc[M32R_IRQ_SIO0_R].action = NULL; | ||
109 | irq_desc[M32R_IRQ_SIO0_R].depth = 1; | ||
110 | icu_data[M32R_IRQ_SIO0_R].icucr = 0; | 94 | icu_data[M32R_IRQ_SIO0_R].icucr = 0; |
111 | disable_mappi_irq(M32R_IRQ_SIO0_R); | 95 | disable_mappi_irq(M32R_IRQ_SIO0_R); |
112 | 96 | ||
113 | /* SIO0_S : uart send data */ | 97 | /* SIO0_S : uart send data */ |
114 | irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; | 98 | set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &mappi_irq_type, |
115 | irq_desc[M32R_IRQ_SIO0_S].chip = &mappi_irq_type; | 99 | handle_level_irq); |
116 | irq_desc[M32R_IRQ_SIO0_S].action = NULL; | ||
117 | irq_desc[M32R_IRQ_SIO0_S].depth = 1; | ||
118 | icu_data[M32R_IRQ_SIO0_S].icucr = 0; | 100 | icu_data[M32R_IRQ_SIO0_S].icucr = 0; |
119 | disable_mappi_irq(M32R_IRQ_SIO0_S); | 101 | disable_mappi_irq(M32R_IRQ_SIO0_S); |
120 | 102 | ||
121 | /* SIO1_R : uart receive data */ | 103 | /* SIO1_R : uart receive data */ |
122 | irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED; | 104 | set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &mappi_irq_type, |
123 | irq_desc[M32R_IRQ_SIO1_R].chip = &mappi_irq_type; | 105 | handle_level_irq); |
124 | irq_desc[M32R_IRQ_SIO1_R].action = NULL; | ||
125 | irq_desc[M32R_IRQ_SIO1_R].depth = 1; | ||
126 | icu_data[M32R_IRQ_SIO1_R].icucr = 0; | 106 | icu_data[M32R_IRQ_SIO1_R].icucr = 0; |
127 | disable_mappi_irq(M32R_IRQ_SIO1_R); | 107 | disable_mappi_irq(M32R_IRQ_SIO1_R); |
128 | 108 | ||
129 | /* SIO1_S : uart send data */ | 109 | /* SIO1_S : uart send data */ |
130 | irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED; | 110 | set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &mappi_irq_type, |
131 | irq_desc[M32R_IRQ_SIO1_S].chip = &mappi_irq_type; | 111 | handle_level_irq); |
132 | irq_desc[M32R_IRQ_SIO1_S].action = NULL; | ||
133 | irq_desc[M32R_IRQ_SIO1_S].depth = 1; | ||
134 | icu_data[M32R_IRQ_SIO1_S].icucr = 0; | 112 | icu_data[M32R_IRQ_SIO1_S].icucr = 0; |
135 | disable_mappi_irq(M32R_IRQ_SIO1_S); | 113 | disable_mappi_irq(M32R_IRQ_SIO1_S); |
136 | #endif /* CONFIG_SERIAL_M32R_SIO */ | 114 | #endif /* CONFIG_SERIAL_M32R_SIO */ |
137 | 115 | ||
138 | #if defined(CONFIG_M32R_PCC) | 116 | #if defined(CONFIG_M32R_PCC) |
139 | /* INT1 : pccard0 interrupt */ | 117 | /* INT1 : pccard0 interrupt */ |
140 | irq_desc[M32R_IRQ_INT1].status = IRQ_DISABLED; | 118 | set_irq_chip_and_handler(M32R_IRQ_INT1, &mappi_irq_type, |
141 | irq_desc[M32R_IRQ_INT1].chip = &mappi_irq_type; | 119 | handle_level_irq); |
142 | irq_desc[M32R_IRQ_INT1].action = NULL; | ||
143 | irq_desc[M32R_IRQ_INT1].depth = 1; | ||
144 | icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD00; | 120 | icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD00; |
145 | disable_mappi_irq(M32R_IRQ_INT1); | 121 | disable_mappi_irq(M32R_IRQ_INT1); |
146 | 122 | ||
147 | /* INT2 : pccard1 interrupt */ | 123 | /* INT2 : pccard1 interrupt */ |
148 | irq_desc[M32R_IRQ_INT2].status = IRQ_DISABLED; | 124 | set_irq_chip_and_handler(M32R_IRQ_INT2, &mappi_irq_type, |
149 | irq_desc[M32R_IRQ_INT2].chip = &mappi_irq_type; | 125 | handle_level_irq); |
150 | irq_desc[M32R_IRQ_INT2].action = NULL; | ||
151 | irq_desc[M32R_IRQ_INT2].depth = 1; | ||
152 | icu_data[M32R_IRQ_INT2].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD00; | 126 | icu_data[M32R_IRQ_INT2].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD00; |
153 | disable_mappi_irq(M32R_IRQ_INT2); | 127 | disable_mappi_irq(M32R_IRQ_INT2); |
154 | #endif /* CONFIG_M32RPCC */ | 128 | #endif /* CONFIG_M32RPCC */ |
diff --git a/arch/m32r/platforms/mappi2/setup.c b/arch/m32r/platforms/mappi2/setup.c index c049376d027..9117c30ea36 100644 --- a/arch/m32r/platforms/mappi2/setup.c +++ b/arch/m32r/platforms/mappi2/setup.c | |||
@@ -46,126 +46,97 @@ static void enable_mappi2_irq(unsigned int irq) | |||
46 | outl(data, port); | 46 | outl(data, port); |
47 | } | 47 | } |
48 | 48 | ||
49 | static void mask_and_ack_mappi2(unsigned int irq) | 49 | static void mask_mappi2(struct irq_data *data) |
50 | { | 50 | { |
51 | disable_mappi2_irq(irq); | 51 | disable_mappi2_irq(data->irq); |
52 | } | 52 | } |
53 | 53 | ||
54 | static void end_mappi2_irq(unsigned int irq) | 54 | static void unmask_mappi2(struct irq_data *data) |
55 | { | 55 | { |
56 | enable_mappi2_irq(irq); | 56 | enable_mappi2_irq(data->irq); |
57 | } | 57 | } |
58 | 58 | ||
59 | static unsigned int startup_mappi2_irq(unsigned int irq) | 59 | static void shutdown_mappi2(struct irq_data *data) |
60 | { | ||
61 | enable_mappi2_irq(irq); | ||
62 | return (0); | ||
63 | } | ||
64 | |||
65 | static void shutdown_mappi2_irq(unsigned int irq) | ||
66 | { | 60 | { |
67 | unsigned long port; | 61 | unsigned long port; |
68 | 62 | ||
69 | port = irq2port(irq); | 63 | port = irq2port(data->irq); |
70 | outl(M32R_ICUCR_ILEVEL7, port); | 64 | outl(M32R_ICUCR_ILEVEL7, port); |
71 | } | 65 | } |
72 | 66 | ||
73 | static struct irq_chip mappi2_irq_type = | 67 | static struct irq_chip mappi2_irq_type = |
74 | { | 68 | { |
75 | .name = "MAPPI2-IRQ", | 69 | .name = "MAPPI2-IRQ", |
76 | .startup = startup_mappi2_irq, | 70 | .irq_shutdown = shutdown_mappi2, |
77 | .shutdown = shutdown_mappi2_irq, | 71 | .irq_mask = mask_mappi2, |
78 | .enable = enable_mappi2_irq, | 72 | .irq_unmask = unmask_mappi2, |
79 | .disable = disable_mappi2_irq, | ||
80 | .ack = mask_and_ack_mappi2, | ||
81 | .end = end_mappi2_irq | ||
82 | }; | 73 | }; |
83 | 74 | ||
84 | void __init init_IRQ(void) | 75 | void __init init_IRQ(void) |
85 | { | 76 | { |
86 | #if defined(CONFIG_SMC91X) | 77 | #if defined(CONFIG_SMC91X) |
87 | /* INT0 : LAN controller (SMC91111) */ | 78 | /* INT0 : LAN controller (SMC91111) */ |
88 | irq_desc[M32R_IRQ_INT0].status = IRQ_DISABLED; | 79 | set_irq_chip_and_handler(M32R_IRQ_INT0, &mappi2_irq_type, |
89 | irq_desc[M32R_IRQ_INT0].chip = &mappi2_irq_type; | 80 | handle_level_irq); |
90 | irq_desc[M32R_IRQ_INT0].action = 0; | ||
91 | irq_desc[M32R_IRQ_INT0].depth = 1; | ||
92 | icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; | 81 | icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; |
93 | disable_mappi2_irq(M32R_IRQ_INT0); | 82 | disable_mappi2_irq(M32R_IRQ_INT0); |
94 | #endif /* CONFIG_SMC91X */ | 83 | #endif /* CONFIG_SMC91X */ |
95 | 84 | ||
96 | /* MFT2 : system timer */ | 85 | /* MFT2 : system timer */ |
97 | irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; | 86 | set_irq_chip_and_handler(M32R_IRQ_MFT2, &mappi2_irq_type, |
98 | irq_desc[M32R_IRQ_MFT2].chip = &mappi2_irq_type; | 87 | handle_level_irq); |
99 | irq_desc[M32R_IRQ_MFT2].action = 0; | ||
100 | irq_desc[M32R_IRQ_MFT2].depth = 1; | ||
101 | icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; | 88 | icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; |
102 | disable_mappi2_irq(M32R_IRQ_MFT2); | 89 | disable_mappi2_irq(M32R_IRQ_MFT2); |
103 | 90 | ||
104 | #ifdef CONFIG_SERIAL_M32R_SIO | 91 | #ifdef CONFIG_SERIAL_M32R_SIO |
105 | /* SIO0_R : uart receive data */ | 92 | /* SIO0_R : uart receive data */ |
106 | irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; | 93 | set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &mappi2_irq_type, |
107 | irq_desc[M32R_IRQ_SIO0_R].chip = &mappi2_irq_type; | 94 | handle_level_irq); |
108 | irq_desc[M32R_IRQ_SIO0_R].action = 0; | ||
109 | irq_desc[M32R_IRQ_SIO0_R].depth = 1; | ||
110 | icu_data[M32R_IRQ_SIO0_R].icucr = 0; | 95 | icu_data[M32R_IRQ_SIO0_R].icucr = 0; |
111 | disable_mappi2_irq(M32R_IRQ_SIO0_R); | 96 | disable_mappi2_irq(M32R_IRQ_SIO0_R); |
112 | 97 | ||
113 | /* SIO0_S : uart send data */ | 98 | /* SIO0_S : uart send data */ |
114 | irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; | 99 | set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &mappi2_irq_type, |
115 | irq_desc[M32R_IRQ_SIO0_S].chip = &mappi2_irq_type; | 100 | handle_level_irq); |
116 | irq_desc[M32R_IRQ_SIO0_S].action = 0; | ||
117 | irq_desc[M32R_IRQ_SIO0_S].depth = 1; | ||
118 | icu_data[M32R_IRQ_SIO0_S].icucr = 0; | 101 | icu_data[M32R_IRQ_SIO0_S].icucr = 0; |
119 | disable_mappi2_irq(M32R_IRQ_SIO0_S); | 102 | disable_mappi2_irq(M32R_IRQ_SIO0_S); |
120 | /* SIO1_R : uart receive data */ | 103 | /* SIO1_R : uart receive data */ |
121 | irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED; | 104 | set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &mappi2_irq_type, |
122 | irq_desc[M32R_IRQ_SIO1_R].chip = &mappi2_irq_type; | 105 | handle_level_irq); |
123 | irq_desc[M32R_IRQ_SIO1_R].action = 0; | ||
124 | irq_desc[M32R_IRQ_SIO1_R].depth = 1; | ||
125 | icu_data[M32R_IRQ_SIO1_R].icucr = 0; | 106 | icu_data[M32R_IRQ_SIO1_R].icucr = 0; |
126 | disable_mappi2_irq(M32R_IRQ_SIO1_R); | 107 | disable_mappi2_irq(M32R_IRQ_SIO1_R); |
127 | 108 | ||
128 | /* SIO1_S : uart send data */ | 109 | /* SIO1_S : uart send data */ |
129 | irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED; | 110 | set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &mappi2_irq_type, |
130 | irq_desc[M32R_IRQ_SIO1_S].chip = &mappi2_irq_type; | 111 | handle_level_irq); |
131 | irq_desc[M32R_IRQ_SIO1_S].action = 0; | ||
132 | irq_desc[M32R_IRQ_SIO1_S].depth = 1; | ||
133 | icu_data[M32R_IRQ_SIO1_S].icucr = 0; | 112 | icu_data[M32R_IRQ_SIO1_S].icucr = 0; |
134 | disable_mappi2_irq(M32R_IRQ_SIO1_S); | 113 | disable_mappi2_irq(M32R_IRQ_SIO1_S); |
135 | #endif /* CONFIG_M32R_USE_DBG_CONSOLE */ | 114 | #endif /* CONFIG_M32R_USE_DBG_CONSOLE */ |
136 | 115 | ||
137 | #if defined(CONFIG_USB) | 116 | #if defined(CONFIG_USB) |
138 | /* INT1 : USB Host controller interrupt */ | 117 | /* INT1 : USB Host controller interrupt */ |
139 | irq_desc[M32R_IRQ_INT1].status = IRQ_DISABLED; | 118 | set_irq_chip_and_handler(M32R_IRQ_INT1, &mappi2_irq_type, |
140 | irq_desc[M32R_IRQ_INT1].chip = &mappi2_irq_type; | 119 | handle_level_irq); |
141 | irq_desc[M32R_IRQ_INT1].action = 0; | ||
142 | irq_desc[M32R_IRQ_INT1].depth = 1; | ||
143 | icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_ISMOD01; | 120 | icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_ISMOD01; |
144 | disable_mappi2_irq(M32R_IRQ_INT1); | 121 | disable_mappi2_irq(M32R_IRQ_INT1); |
145 | #endif /* CONFIG_USB */ | 122 | #endif /* CONFIG_USB */ |
146 | 123 | ||
147 | /* ICUCR40: CFC IREQ */ | 124 | /* ICUCR40: CFC IREQ */ |
148 | irq_desc[PLD_IRQ_CFIREQ].status = IRQ_DISABLED; | 125 | set_irq_chip_and_handler(PLD_IRQ_CFIREQ, &mappi2_irq_type, |
149 | irq_desc[PLD_IRQ_CFIREQ].chip = &mappi2_irq_type; | 126 | handle_level_irq); |
150 | irq_desc[PLD_IRQ_CFIREQ].action = 0; | ||
151 | irq_desc[PLD_IRQ_CFIREQ].depth = 1; /* disable nested irq */ | ||
152 | icu_data[PLD_IRQ_CFIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD01; | 127 | icu_data[PLD_IRQ_CFIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD01; |
153 | disable_mappi2_irq(PLD_IRQ_CFIREQ); | 128 | disable_mappi2_irq(PLD_IRQ_CFIREQ); |
154 | 129 | ||
155 | #if defined(CONFIG_M32R_CFC) | 130 | #if defined(CONFIG_M32R_CFC) |
156 | /* ICUCR41: CFC Insert */ | 131 | /* ICUCR41: CFC Insert */ |
157 | irq_desc[PLD_IRQ_CFC_INSERT].status = IRQ_DISABLED; | 132 | set_irq_chip_and_handler(PLD_IRQ_CFC_INSERT, &mappi2_irq_type, |
158 | irq_desc[PLD_IRQ_CFC_INSERT].chip = &mappi2_irq_type; | 133 | handle_level_irq); |
159 | irq_desc[PLD_IRQ_CFC_INSERT].action = 0; | ||
160 | irq_desc[PLD_IRQ_CFC_INSERT].depth = 1; /* disable nested irq */ | ||
161 | icu_data[PLD_IRQ_CFC_INSERT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD00; | 134 | icu_data[PLD_IRQ_CFC_INSERT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD00; |
162 | disable_mappi2_irq(PLD_IRQ_CFC_INSERT); | 135 | disable_mappi2_irq(PLD_IRQ_CFC_INSERT); |
163 | 136 | ||
164 | /* ICUCR42: CFC Eject */ | 137 | /* ICUCR42: CFC Eject */ |
165 | irq_desc[PLD_IRQ_CFC_EJECT].status = IRQ_DISABLED; | 138 | set_irq_chip_and_handler(PLD_IRQ_CFC_EJECT, &mappi2_irq_type, |
166 | irq_desc[PLD_IRQ_CFC_EJECT].chip = &mappi2_irq_type; | 139 | handle_level_irq); |
167 | irq_desc[PLD_IRQ_CFC_EJECT].action = 0; | ||
168 | irq_desc[PLD_IRQ_CFC_EJECT].depth = 1; /* disable nested irq */ | ||
169 | icu_data[PLD_IRQ_CFC_EJECT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; | 140 | icu_data[PLD_IRQ_CFC_EJECT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; |
170 | disable_mappi2_irq(PLD_IRQ_CFC_EJECT); | 141 | disable_mappi2_irq(PLD_IRQ_CFC_EJECT); |
171 | #endif /* CONFIG_MAPPI2_CFC */ | 142 | #endif /* CONFIG_MAPPI2_CFC */ |
diff --git a/arch/m32r/platforms/mappi3/setup.c b/arch/m32r/platforms/mappi3/setup.c index 882de25c6e8..b44f5ded2bb 100644 --- a/arch/m32r/platforms/mappi3/setup.c +++ b/arch/m32r/platforms/mappi3/setup.c | |||
@@ -46,128 +46,98 @@ static void enable_mappi3_irq(unsigned int irq) | |||
46 | outl(data, port); | 46 | outl(data, port); |
47 | } | 47 | } |
48 | 48 | ||
49 | static void mask_and_ack_mappi3(unsigned int irq) | 49 | static void mask_mappi3(struct irq_data *data) |
50 | { | 50 | { |
51 | disable_mappi3_irq(irq); | 51 | disable_mappi3_irq(data->irq); |
52 | } | 52 | } |
53 | 53 | ||
54 | static void end_mappi3_irq(unsigned int irq) | 54 | static void unmask_mappi3(struct irq_data *data) |
55 | { | 55 | { |
56 | enable_mappi3_irq(irq); | 56 | enable_mappi3_irq(data->irq); |
57 | } | 57 | } |
58 | 58 | ||
59 | static unsigned int startup_mappi3_irq(unsigned int irq) | 59 | static void shutdown_mappi3(struct irq_data *data) |
60 | { | ||
61 | enable_mappi3_irq(irq); | ||
62 | return (0); | ||
63 | } | ||
64 | |||
65 | static void shutdown_mappi3_irq(unsigned int irq) | ||
66 | { | 60 | { |
67 | unsigned long port; | 61 | unsigned long port; |
68 | 62 | ||
69 | port = irq2port(irq); | 63 | port = irq2port(data->irq); |
70 | outl(M32R_ICUCR_ILEVEL7, port); | 64 | outl(M32R_ICUCR_ILEVEL7, port); |
71 | } | 65 | } |
72 | 66 | ||
73 | static struct irq_chip mappi3_irq_type = | 67 | static struct irq_chip mappi3_irq_type = { |
74 | { | 68 | .name = "MAPPI3-IRQ", |
75 | .name = "MAPPI3-IRQ", | 69 | .irq_shutdown = shutdown_mappi3, |
76 | .startup = startup_mappi3_irq, | 70 | .irq_mask = mask_mappi3, |
77 | .shutdown = shutdown_mappi3_irq, | 71 | .irq_unmask = unmask_mappi3, |
78 | .enable = enable_mappi3_irq, | ||
79 | .disable = disable_mappi3_irq, | ||
80 | .ack = mask_and_ack_mappi3, | ||
81 | .end = end_mappi3_irq | ||
82 | }; | 72 | }; |
83 | 73 | ||
84 | void __init init_IRQ(void) | 74 | void __init init_IRQ(void) |
85 | { | 75 | { |
86 | #if defined(CONFIG_SMC91X) | 76 | #if defined(CONFIG_SMC91X) |
87 | /* INT0 : LAN controller (SMC91111) */ | 77 | /* INT0 : LAN controller (SMC91111) */ |
88 | irq_desc[M32R_IRQ_INT0].status = IRQ_DISABLED; | 78 | set_irq_chip_and_handler(M32R_IRQ_INT0, &mappi3_irq_type, |
89 | irq_desc[M32R_IRQ_INT0].chip = &mappi3_irq_type; | 79 | handle_level_irq); |
90 | irq_desc[M32R_IRQ_INT0].action = 0; | ||
91 | irq_desc[M32R_IRQ_INT0].depth = 1; | ||
92 | icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; | 80 | icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; |
93 | disable_mappi3_irq(M32R_IRQ_INT0); | 81 | disable_mappi3_irq(M32R_IRQ_INT0); |
94 | #endif /* CONFIG_SMC91X */ | 82 | #endif /* CONFIG_SMC91X */ |
95 | 83 | ||
96 | /* MFT2 : system timer */ | 84 | /* MFT2 : system timer */ |
97 | irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; | 85 | set_irq_chip_and_handler(M32R_IRQ_MFT2, &mappi3_irq_type, |
98 | irq_desc[M32R_IRQ_MFT2].chip = &mappi3_irq_type; | 86 | handle_level_irq); |
99 | irq_desc[M32R_IRQ_MFT2].action = 0; | ||
100 | irq_desc[M32R_IRQ_MFT2].depth = 1; | ||
101 | icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; | 87 | icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; |
102 | disable_mappi3_irq(M32R_IRQ_MFT2); | 88 | disable_mappi3_irq(M32R_IRQ_MFT2); |
103 | 89 | ||
104 | #ifdef CONFIG_SERIAL_M32R_SIO | 90 | #ifdef CONFIG_SERIAL_M32R_SIO |
105 | /* SIO0_R : uart receive data */ | 91 | /* SIO0_R : uart receive data */ |
106 | irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; | 92 | set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &mappi3_irq_type, |
107 | irq_desc[M32R_IRQ_SIO0_R].chip = &mappi3_irq_type; | 93 | handle_level_irq); |
108 | irq_desc[M32R_IRQ_SIO0_R].action = 0; | ||
109 | irq_desc[M32R_IRQ_SIO0_R].depth = 1; | ||
110 | icu_data[M32R_IRQ_SIO0_R].icucr = 0; | 94 | icu_data[M32R_IRQ_SIO0_R].icucr = 0; |
111 | disable_mappi3_irq(M32R_IRQ_SIO0_R); | 95 | disable_mappi3_irq(M32R_IRQ_SIO0_R); |
112 | 96 | ||
113 | /* SIO0_S : uart send data */ | 97 | /* SIO0_S : uart send data */ |
114 | irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; | 98 | set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &mappi3_irq_type, |
115 | irq_desc[M32R_IRQ_SIO0_S].chip = &mappi3_irq_type; | 99 | handle_level_irq); |
116 | irq_desc[M32R_IRQ_SIO0_S].action = 0; | ||
117 | irq_desc[M32R_IRQ_SIO0_S].depth = 1; | ||
118 | icu_data[M32R_IRQ_SIO0_S].icucr = 0; | 100 | icu_data[M32R_IRQ_SIO0_S].icucr = 0; |
119 | disable_mappi3_irq(M32R_IRQ_SIO0_S); | 101 | disable_mappi3_irq(M32R_IRQ_SIO0_S); |
120 | /* SIO1_R : uart receive data */ | 102 | /* SIO1_R : uart receive data */ |
121 | irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED; | 103 | set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &mappi3_irq_type, |
122 | irq_desc[M32R_IRQ_SIO1_R].chip = &mappi3_irq_type; | 104 | handle_level_irq); |
123 | irq_desc[M32R_IRQ_SIO1_R].action = 0; | ||
124 | irq_desc[M32R_IRQ_SIO1_R].depth = 1; | ||
125 | icu_data[M32R_IRQ_SIO1_R].icucr = 0; | 105 | icu_data[M32R_IRQ_SIO1_R].icucr = 0; |
126 | disable_mappi3_irq(M32R_IRQ_SIO1_R); | 106 | disable_mappi3_irq(M32R_IRQ_SIO1_R); |
127 | 107 | ||
128 | /* SIO1_S : uart send data */ | 108 | /* SIO1_S : uart send data */ |
129 | irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED; | 109 | set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &mappi3_irq_type, |
130 | irq_desc[M32R_IRQ_SIO1_S].chip = &mappi3_irq_type; | 110 | handle_level_irq); |
131 | irq_desc[M32R_IRQ_SIO1_S].action = 0; | ||
132 | irq_desc[M32R_IRQ_SIO1_S].depth = 1; | ||
133 | icu_data[M32R_IRQ_SIO1_S].icucr = 0; | 111 | icu_data[M32R_IRQ_SIO1_S].icucr = 0; |
134 | disable_mappi3_irq(M32R_IRQ_SIO1_S); | 112 | disable_mappi3_irq(M32R_IRQ_SIO1_S); |
135 | #endif /* CONFIG_M32R_USE_DBG_CONSOLE */ | 113 | #endif /* CONFIG_M32R_USE_DBG_CONSOLE */ |
136 | 114 | ||
137 | #if defined(CONFIG_USB) | 115 | #if defined(CONFIG_USB) |
138 | /* INT1 : USB Host controller interrupt */ | 116 | /* INT1 : USB Host controller interrupt */ |
139 | irq_desc[M32R_IRQ_INT1].status = IRQ_DISABLED; | 117 | set_irq_chip_and_handler(M32R_IRQ_INT1, &mappi3_irq_type, |
140 | irq_desc[M32R_IRQ_INT1].chip = &mappi3_irq_type; | 118 | handle_level_irq); |
141 | irq_desc[M32R_IRQ_INT1].action = 0; | ||
142 | irq_desc[M32R_IRQ_INT1].depth = 1; | ||
143 | icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_ISMOD01; | 119 | icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_ISMOD01; |
144 | disable_mappi3_irq(M32R_IRQ_INT1); | 120 | disable_mappi3_irq(M32R_IRQ_INT1); |
145 | #endif /* CONFIG_USB */ | 121 | #endif /* CONFIG_USB */ |
146 | 122 | ||
147 | /* CFC IREQ */ | 123 | /* CFC IREQ */ |
148 | irq_desc[PLD_IRQ_CFIREQ].status = IRQ_DISABLED; | 124 | set_irq_chip_and_handler(PLD_IRQ_CFIREQ, &mappi3_irq_type, |
149 | irq_desc[PLD_IRQ_CFIREQ].chip = &mappi3_irq_type; | 125 | handle_level_irq); |
150 | irq_desc[PLD_IRQ_CFIREQ].action = 0; | ||
151 | irq_desc[PLD_IRQ_CFIREQ].depth = 1; /* disable nested irq */ | ||
152 | icu_data[PLD_IRQ_CFIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD01; | 126 | icu_data[PLD_IRQ_CFIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD01; |
153 | disable_mappi3_irq(PLD_IRQ_CFIREQ); | 127 | disable_mappi3_irq(PLD_IRQ_CFIREQ); |
154 | 128 | ||
155 | #if defined(CONFIG_M32R_CFC) | 129 | #if defined(CONFIG_M32R_CFC) |
156 | /* ICUCR41: CFC Insert & eject */ | 130 | /* ICUCR41: CFC Insert & eject */ |
157 | irq_desc[PLD_IRQ_CFC_INSERT].status = IRQ_DISABLED; | 131 | set_irq_chip_and_handler(PLD_IRQ_CFC_INSERT, &mappi3_irq_type, |
158 | irq_desc[PLD_IRQ_CFC_INSERT].chip = &mappi3_irq_type; | 132 | handle_level_irq); |
159 | irq_desc[PLD_IRQ_CFC_INSERT].action = 0; | ||
160 | irq_desc[PLD_IRQ_CFC_INSERT].depth = 1; /* disable nested irq */ | ||
161 | icu_data[PLD_IRQ_CFC_INSERT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD00; | 133 | icu_data[PLD_IRQ_CFC_INSERT].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD00; |
162 | disable_mappi3_irq(PLD_IRQ_CFC_INSERT); | 134 | disable_mappi3_irq(PLD_IRQ_CFC_INSERT); |
163 | 135 | ||
164 | #endif /* CONFIG_M32R_CFC */ | 136 | #endif /* CONFIG_M32R_CFC */ |
165 | 137 | ||
166 | /* IDE IREQ */ | 138 | /* IDE IREQ */ |
167 | irq_desc[PLD_IRQ_IDEIREQ].status = IRQ_DISABLED; | 139 | set_irq_chip_and_handler(PLD_IRQ_IDEIREQ, &mappi3_irq_type, |
168 | irq_desc[PLD_IRQ_IDEIREQ].chip = &mappi3_irq_type; | 140 | handle_level_irq); |
169 | irq_desc[PLD_IRQ_IDEIREQ].action = 0; | ||
170 | irq_desc[PLD_IRQ_IDEIREQ].depth = 1; /* disable nested irq */ | ||
171 | icu_data[PLD_IRQ_IDEIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; | 141 | icu_data[PLD_IRQ_IDEIREQ].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; |
172 | disable_mappi3_irq(PLD_IRQ_IDEIREQ); | 142 | disable_mappi3_irq(PLD_IRQ_IDEIREQ); |
173 | 143 | ||
diff --git a/arch/m32r/platforms/oaks32r/setup.c b/arch/m32r/platforms/oaks32r/setup.c index d11d93bf74f..19a02db7b81 100644 --- a/arch/m32r/platforms/oaks32r/setup.c +++ b/arch/m32r/platforms/oaks32r/setup.c | |||
@@ -37,39 +37,30 @@ static void enable_oaks32r_irq(unsigned int irq) | |||
37 | outl(data, port); | 37 | outl(data, port); |
38 | } | 38 | } |
39 | 39 | ||
40 | static void mask_and_ack_mappi(unsigned int irq) | 40 | static void mask_oaks32r(struct irq_data *data) |
41 | { | 41 | { |
42 | disable_oaks32r_irq(irq); | 42 | disable_oaks32r_irq(data->irq); |
43 | } | 43 | } |
44 | 44 | ||
45 | static void end_oaks32r_irq(unsigned int irq) | 45 | static void unmask_oaks32r(struct irq_data *data) |
46 | { | 46 | { |
47 | enable_oaks32r_irq(irq); | 47 | enable_oaks32r_irq(data->irq); |
48 | } | 48 | } |
49 | 49 | ||
50 | static unsigned int startup_oaks32r_irq(unsigned int irq) | 50 | static void shutdown_oaks32r(struct irq_data *data) |
51 | { | ||
52 | enable_oaks32r_irq(irq); | ||
53 | return (0); | ||
54 | } | ||
55 | |||
56 | static void shutdown_oaks32r_irq(unsigned int irq) | ||
57 | { | 51 | { |
58 | unsigned long port; | 52 | unsigned long port; |
59 | 53 | ||
60 | port = irq2port(irq); | 54 | port = irq2port(data->irq); |
61 | outl(M32R_ICUCR_ILEVEL7, port); | 55 | outl(M32R_ICUCR_ILEVEL7, port); |
62 | } | 56 | } |
63 | 57 | ||
64 | static struct irq_chip oaks32r_irq_type = | 58 | static struct irq_chip oaks32r_irq_type = |
65 | { | 59 | { |
66 | .name = "OAKS32R-IRQ", | 60 | .name = "OAKS32R-IRQ", |
67 | .startup = startup_oaks32r_irq, | 61 | .irq_shutdown = shutdown_oaks32r, |
68 | .shutdown = shutdown_oaks32r_irq, | 62 | .irq_mask = mask_oaks32r, |
69 | .enable = enable_oaks32r_irq, | 63 | .irq_unmask = unmask_oaks32r, |
70 | .disable = disable_oaks32r_irq, | ||
71 | .ack = mask_and_ack_mappi, | ||
72 | .end = end_oaks32r_irq | ||
73 | }; | 64 | }; |
74 | 65 | ||
75 | void __init init_IRQ(void) | 66 | void __init init_IRQ(void) |
@@ -83,52 +74,40 @@ void __init init_IRQ(void) | |||
83 | 74 | ||
84 | #ifdef CONFIG_NE2000 | 75 | #ifdef CONFIG_NE2000 |
85 | /* INT3 : LAN controller (RTL8019AS) */ | 76 | /* INT3 : LAN controller (RTL8019AS) */ |
86 | irq_desc[M32R_IRQ_INT3].status = IRQ_DISABLED; | 77 | set_irq_chip_and_handler(M32R_IRQ_INT3, &oaks32r_irq_type, |
87 | irq_desc[M32R_IRQ_INT3].chip = &oaks32r_irq_type; | 78 | handle_level_irq); |
88 | irq_desc[M32R_IRQ_INT3].action = 0; | ||
89 | irq_desc[M32R_IRQ_INT3].depth = 1; | ||
90 | icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; | 79 | icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; |
91 | disable_oaks32r_irq(M32R_IRQ_INT3); | 80 | disable_oaks32r_irq(M32R_IRQ_INT3); |
92 | #endif /* CONFIG_M32R_NE2000 */ | 81 | #endif /* CONFIG_M32R_NE2000 */ |
93 | 82 | ||
94 | /* MFT2 : system timer */ | 83 | /* MFT2 : system timer */ |
95 | irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; | 84 | set_irq_chip_and_handler(M32R_IRQ_MFT2, &oaks32r_irq_type, |
96 | irq_desc[M32R_IRQ_MFT2].chip = &oaks32r_irq_type; | 85 | handle_level_irq); |
97 | irq_desc[M32R_IRQ_MFT2].action = 0; | ||
98 | irq_desc[M32R_IRQ_MFT2].depth = 1; | ||
99 | icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; | 86 | icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; |
100 | disable_oaks32r_irq(M32R_IRQ_MFT2); | 87 | disable_oaks32r_irq(M32R_IRQ_MFT2); |
101 | 88 | ||
102 | #ifdef CONFIG_SERIAL_M32R_SIO | 89 | #ifdef CONFIG_SERIAL_M32R_SIO |
103 | /* SIO0_R : uart receive data */ | 90 | /* SIO0_R : uart receive data */ |
104 | irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; | 91 | set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &oaks32r_irq_type, |
105 | irq_desc[M32R_IRQ_SIO0_R].chip = &oaks32r_irq_type; | 92 | handle_level_irq); |
106 | irq_desc[M32R_IRQ_SIO0_R].action = 0; | ||
107 | irq_desc[M32R_IRQ_SIO0_R].depth = 1; | ||
108 | icu_data[M32R_IRQ_SIO0_R].icucr = 0; | 93 | icu_data[M32R_IRQ_SIO0_R].icucr = 0; |
109 | disable_oaks32r_irq(M32R_IRQ_SIO0_R); | 94 | disable_oaks32r_irq(M32R_IRQ_SIO0_R); |
110 | 95 | ||
111 | /* SIO0_S : uart send data */ | 96 | /* SIO0_S : uart send data */ |
112 | irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; | 97 | set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &oaks32r_irq_type, |
113 | irq_desc[M32R_IRQ_SIO0_S].chip = &oaks32r_irq_type; | 98 | handle_level_irq); |
114 | irq_desc[M32R_IRQ_SIO0_S].action = 0; | ||
115 | irq_desc[M32R_IRQ_SIO0_S].depth = 1; | ||
116 | icu_data[M32R_IRQ_SIO0_S].icucr = 0; | 99 | icu_data[M32R_IRQ_SIO0_S].icucr = 0; |
117 | disable_oaks32r_irq(M32R_IRQ_SIO0_S); | 100 | disable_oaks32r_irq(M32R_IRQ_SIO0_S); |
118 | 101 | ||
119 | /* SIO1_R : uart receive data */ | 102 | /* SIO1_R : uart receive data */ |
120 | irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED; | 103 | set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &oaks32r_irq_type, |
121 | irq_desc[M32R_IRQ_SIO1_R].chip = &oaks32r_irq_type; | 104 | handle_level_irq); |
122 | irq_desc[M32R_IRQ_SIO1_R].action = 0; | ||
123 | irq_desc[M32R_IRQ_SIO1_R].depth = 1; | ||
124 | icu_data[M32R_IRQ_SIO1_R].icucr = 0; | 105 | icu_data[M32R_IRQ_SIO1_R].icucr = 0; |
125 | disable_oaks32r_irq(M32R_IRQ_SIO1_R); | 106 | disable_oaks32r_irq(M32R_IRQ_SIO1_R); |
126 | 107 | ||
127 | /* SIO1_S : uart send data */ | 108 | /* SIO1_S : uart send data */ |
128 | irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED; | 109 | set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &oaks32r_irq_type, |
129 | irq_desc[M32R_IRQ_SIO1_S].chip = &oaks32r_irq_type; | 110 | handle_level_irq); |
130 | irq_desc[M32R_IRQ_SIO1_S].action = 0; | ||
131 | irq_desc[M32R_IRQ_SIO1_S].depth = 1; | ||
132 | icu_data[M32R_IRQ_SIO1_S].icucr = 0; | 111 | icu_data[M32R_IRQ_SIO1_S].icucr = 0; |
133 | disable_oaks32r_irq(M32R_IRQ_SIO1_S); | 112 | disable_oaks32r_irq(M32R_IRQ_SIO1_S); |
134 | #endif /* CONFIG_SERIAL_M32R_SIO */ | 113 | #endif /* CONFIG_SERIAL_M32R_SIO */ |
diff --git a/arch/m32r/platforms/opsput/setup.c b/arch/m32r/platforms/opsput/setup.c index 5f3402a2fba..12731547e8b 100644 --- a/arch/m32r/platforms/opsput/setup.c +++ b/arch/m32r/platforms/opsput/setup.c | |||
@@ -46,39 +46,30 @@ static void enable_opsput_irq(unsigned int irq) | |||
46 | outl(data, port); | 46 | outl(data, port); |
47 | } | 47 | } |
48 | 48 | ||
49 | static void mask_and_ack_opsput(unsigned int irq) | 49 | static void mask_opsput(struct irq_data *data) |
50 | { | 50 | { |
51 | disable_opsput_irq(irq); | 51 | disable_opsput_irq(data->irq); |
52 | } | 52 | } |
53 | 53 | ||
54 | static void end_opsput_irq(unsigned int irq) | 54 | static void unmask_opsput(struct irq_data *data) |
55 | { | 55 | { |
56 | enable_opsput_irq(irq); | 56 | enable_opsput_irq(data->irq); |
57 | } | 57 | } |
58 | 58 | ||
59 | static unsigned int startup_opsput_irq(unsigned int irq) | 59 | static void shutdown_opsput(struct irq_data *data) |
60 | { | ||
61 | enable_opsput_irq(irq); | ||
62 | return (0); | ||
63 | } | ||
64 | |||
65 | static void shutdown_opsput_irq(unsigned int irq) | ||
66 | { | 60 | { |
67 | unsigned long port; | 61 | unsigned long port; |
68 | 62 | ||
69 | port = irq2port(irq); | 63 | port = irq2port(data->irq); |
70 | outl(M32R_ICUCR_ILEVEL7, port); | 64 | outl(M32R_ICUCR_ILEVEL7, port); |
71 | } | 65 | } |
72 | 66 | ||
73 | static struct irq_chip opsput_irq_type = | 67 | static struct irq_chip opsput_irq_type = |
74 | { | 68 | { |
75 | .name = "OPSPUT-IRQ", | 69 | .name = "OPSPUT-IRQ", |
76 | .startup = startup_opsput_irq, | 70 | .irq_shutdown = shutdown_opsput, |
77 | .shutdown = shutdown_opsput_irq, | 71 | .irq_mask = mask_opsput, |
78 | .enable = enable_opsput_irq, | 72 | .irq_unmask = unmask_opsput, |
79 | .disable = disable_opsput_irq, | ||
80 | .ack = mask_and_ack_opsput, | ||
81 | .end = end_opsput_irq | ||
82 | }; | 73 | }; |
83 | 74 | ||
84 | /* | 75 | /* |
@@ -100,7 +91,6 @@ static void disable_opsput_pld_irq(unsigned int irq) | |||
100 | unsigned int pldirq; | 91 | unsigned int pldirq; |
101 | 92 | ||
102 | pldirq = irq2pldirq(irq); | 93 | pldirq = irq2pldirq(irq); |
103 | // disable_opsput_irq(M32R_IRQ_INT1); | ||
104 | port = pldirq2port(pldirq); | 94 | port = pldirq2port(pldirq); |
105 | data = pld_icu_data[pldirq].icucr|PLD_ICUCR_ILEVEL7; | 95 | data = pld_icu_data[pldirq].icucr|PLD_ICUCR_ILEVEL7; |
106 | outw(data, port); | 96 | outw(data, port); |
@@ -112,50 +102,38 @@ static void enable_opsput_pld_irq(unsigned int irq) | |||
112 | unsigned int pldirq; | 102 | unsigned int pldirq; |
113 | 103 | ||
114 | pldirq = irq2pldirq(irq); | 104 | pldirq = irq2pldirq(irq); |
115 | // enable_opsput_irq(M32R_IRQ_INT1); | ||
116 | port = pldirq2port(pldirq); | 105 | port = pldirq2port(pldirq); |
117 | data = pld_icu_data[pldirq].icucr|PLD_ICUCR_IEN|PLD_ICUCR_ILEVEL6; | 106 | data = pld_icu_data[pldirq].icucr|PLD_ICUCR_IEN|PLD_ICUCR_ILEVEL6; |
118 | outw(data, port); | 107 | outw(data, port); |
119 | } | 108 | } |
120 | 109 | ||
121 | static void mask_and_ack_opsput_pld(unsigned int irq) | 110 | static void mask_opsput_pld(struct irq_data *data) |
122 | { | ||
123 | disable_opsput_pld_irq(irq); | ||
124 | // mask_and_ack_opsput(M32R_IRQ_INT1); | ||
125 | } | ||
126 | |||
127 | static void end_opsput_pld_irq(unsigned int irq) | ||
128 | { | 111 | { |
129 | enable_opsput_pld_irq(irq); | 112 | disable_opsput_pld_irq(data->irq); |
130 | end_opsput_irq(M32R_IRQ_INT1); | ||
131 | } | 113 | } |
132 | 114 | ||
133 | static unsigned int startup_opsput_pld_irq(unsigned int irq) | 115 | static void unmask_opsput_pld(struct irq_data *data) |
134 | { | 116 | { |
135 | enable_opsput_pld_irq(irq); | 117 | enable_opsput_pld_irq(data->irq); |
136 | return (0); | 118 | enable_opsput_irq(M32R_IRQ_INT1); |
137 | } | 119 | } |
138 | 120 | ||
139 | static void shutdown_opsput_pld_irq(unsigned int irq) | 121 | static void shutdown_opsput_pld(struct irq_data *data) |
140 | { | 122 | { |
141 | unsigned long port; | 123 | unsigned long port; |
142 | unsigned int pldirq; | 124 | unsigned int pldirq; |
143 | 125 | ||
144 | pldirq = irq2pldirq(irq); | 126 | pldirq = irq2pldirq(data->irq); |
145 | // shutdown_opsput_irq(M32R_IRQ_INT1); | ||
146 | port = pldirq2port(pldirq); | 127 | port = pldirq2port(pldirq); |
147 | outw(PLD_ICUCR_ILEVEL7, port); | 128 | outw(PLD_ICUCR_ILEVEL7, port); |
148 | } | 129 | } |
149 | 130 | ||
150 | static struct irq_chip opsput_pld_irq_type = | 131 | static struct irq_chip opsput_pld_irq_type = |
151 | { | 132 | { |
152 | .name = "OPSPUT-PLD-IRQ", | 133 | .name = "OPSPUT-PLD-IRQ", |
153 | .startup = startup_opsput_pld_irq, | 134 | .irq_shutdown = shutdown_opsput_pld, |
154 | .shutdown = shutdown_opsput_pld_irq, | 135 | .irq_mask = mask_opsput_pld, |
155 | .enable = enable_opsput_pld_irq, | 136 | .irq_unmask = unmask_opsput_pld, |
156 | .disable = disable_opsput_pld_irq, | ||
157 | .ack = mask_and_ack_opsput_pld, | ||
158 | .end = end_opsput_pld_irq | ||
159 | }; | 137 | }; |
160 | 138 | ||
161 | /* | 139 | /* |
@@ -189,42 +167,33 @@ static void enable_opsput_lanpld_irq(unsigned int irq) | |||
189 | outw(data, port); | 167 | outw(data, port); |
190 | } | 168 | } |
191 | 169 | ||
192 | static void mask_and_ack_opsput_lanpld(unsigned int irq) | 170 | static void mask_opsput_lanpld(struct irq_data *data) |
193 | { | ||
194 | disable_opsput_lanpld_irq(irq); | ||
195 | } | ||
196 | |||
197 | static void end_opsput_lanpld_irq(unsigned int irq) | ||
198 | { | 171 | { |
199 | enable_opsput_lanpld_irq(irq); | 172 | disable_opsput_lanpld_irq(data->irq); |
200 | end_opsput_irq(M32R_IRQ_INT0); | ||
201 | } | 173 | } |
202 | 174 | ||
203 | static unsigned int startup_opsput_lanpld_irq(unsigned int irq) | 175 | static void unmask_opsput_lanpld(struct irq_data *data) |
204 | { | 176 | { |
205 | enable_opsput_lanpld_irq(irq); | 177 | enable_opsput_lanpld_irq(data->irq); |
206 | return (0); | 178 | enable_opsput_irq(M32R_IRQ_INT0); |
207 | } | 179 | } |
208 | 180 | ||
209 | static void shutdown_opsput_lanpld_irq(unsigned int irq) | 181 | static void shutdown_opsput_lanpld(struct irq_data *data) |
210 | { | 182 | { |
211 | unsigned long port; | 183 | unsigned long port; |
212 | unsigned int pldirq; | 184 | unsigned int pldirq; |
213 | 185 | ||
214 | pldirq = irq2lanpldirq(irq); | 186 | pldirq = irq2lanpldirq(data->irq); |
215 | port = lanpldirq2port(pldirq); | 187 | port = lanpldirq2port(pldirq); |
216 | outw(PLD_ICUCR_ILEVEL7, port); | 188 | outw(PLD_ICUCR_ILEVEL7, port); |
217 | } | 189 | } |
218 | 190 | ||
219 | static struct irq_chip opsput_lanpld_irq_type = | 191 | static struct irq_chip opsput_lanpld_irq_type = |
220 | { | 192 | { |
221 | .name = "OPSPUT-PLD-LAN-IRQ", | 193 | .name = "OPSPUT-PLD-LAN-IRQ", |
222 | .startup = startup_opsput_lanpld_irq, | 194 | .irq_shutdown = shutdown_opsput_lanpld, |
223 | .shutdown = shutdown_opsput_lanpld_irq, | 195 | .irq_mask = mask_opsput_lanpld, |
224 | .enable = enable_opsput_lanpld_irq, | 196 | .irq_unmask = unmask_opsput_lanpld, |
225 | .disable = disable_opsput_lanpld_irq, | ||
226 | .ack = mask_and_ack_opsput_lanpld, | ||
227 | .end = end_opsput_lanpld_irq | ||
228 | }; | 197 | }; |
229 | 198 | ||
230 | /* | 199 | /* |
@@ -258,143 +227,109 @@ static void enable_opsput_lcdpld_irq(unsigned int irq) | |||
258 | outw(data, port); | 227 | outw(data, port); |
259 | } | 228 | } |
260 | 229 | ||
261 | static void mask_and_ack_opsput_lcdpld(unsigned int irq) | 230 | static void mask_opsput_lcdpld(struct irq_data *data) |
262 | { | ||
263 | disable_opsput_lcdpld_irq(irq); | ||
264 | } | ||
265 | |||
266 | static void end_opsput_lcdpld_irq(unsigned int irq) | ||
267 | { | 231 | { |
268 | enable_opsput_lcdpld_irq(irq); | 232 | disable_opsput_lcdpld_irq(data->irq); |
269 | end_opsput_irq(M32R_IRQ_INT2); | ||
270 | } | 233 | } |
271 | 234 | ||
272 | static unsigned int startup_opsput_lcdpld_irq(unsigned int irq) | 235 | static void unmask_opsput_lcdpld(struct irq_data *data) |
273 | { | 236 | { |
274 | enable_opsput_lcdpld_irq(irq); | 237 | enable_opsput_lcdpld_irq(data->irq); |
275 | return (0); | 238 | enable_opsput_irq(M32R_IRQ_INT2); |
276 | } | 239 | } |
277 | 240 | ||
278 | static void shutdown_opsput_lcdpld_irq(unsigned int irq) | 241 | static void shutdown_opsput_lcdpld(struct irq_data *data) |
279 | { | 242 | { |
280 | unsigned long port; | 243 | unsigned long port; |
281 | unsigned int pldirq; | 244 | unsigned int pldirq; |
282 | 245 | ||
283 | pldirq = irq2lcdpldirq(irq); | 246 | pldirq = irq2lcdpldirq(data->irq); |
284 | port = lcdpldirq2port(pldirq); | 247 | port = lcdpldirq2port(pldirq); |
285 | outw(PLD_ICUCR_ILEVEL7, port); | 248 | outw(PLD_ICUCR_ILEVEL7, port); |
286 | } | 249 | } |
287 | 250 | ||
288 | static struct irq_chip opsput_lcdpld_irq_type = | 251 | static struct irq_chip opsput_lcdpld_irq_type = { |
289 | { | 252 | .name = "OPSPUT-PLD-LCD-IRQ", |
290 | "OPSPUT-PLD-LCD-IRQ", | 253 | .irq_shutdown = shutdown_opsput_lcdpld, |
291 | startup_opsput_lcdpld_irq, | 254 | .irq_mask = mask_opsput_lcdpld, |
292 | shutdown_opsput_lcdpld_irq, | 255 | .irq_unmask = unmask_opsput_lcdpld, |
293 | enable_opsput_lcdpld_irq, | ||
294 | disable_opsput_lcdpld_irq, | ||
295 | mask_and_ack_opsput_lcdpld, | ||
296 | end_opsput_lcdpld_irq | ||
297 | }; | 256 | }; |
298 | 257 | ||
299 | void __init init_IRQ(void) | 258 | void __init init_IRQ(void) |
300 | { | 259 | { |
301 | #if defined(CONFIG_SMC91X) | 260 | #if defined(CONFIG_SMC91X) |
302 | /* INT#0: LAN controller on OPSPUT-LAN (SMC91C111)*/ | 261 | /* INT#0: LAN controller on OPSPUT-LAN (SMC91C111)*/ |
303 | irq_desc[OPSPUT_LAN_IRQ_LAN].status = IRQ_DISABLED; | 262 | set_irq_chip_and_handler(OPSPUT_LAN_IRQ_LAN, &opsput_lanpld_irq_type, |
304 | irq_desc[OPSPUT_LAN_IRQ_LAN].chip = &opsput_lanpld_irq_type; | 263 | handle_level_irq); |
305 | irq_desc[OPSPUT_LAN_IRQ_LAN].action = 0; | ||
306 | irq_desc[OPSPUT_LAN_IRQ_LAN].depth = 1; /* disable nested irq */ | ||
307 | lanpld_icu_data[irq2lanpldirq(OPSPUT_LAN_IRQ_LAN)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* "H" edge sense */ | 264 | lanpld_icu_data[irq2lanpldirq(OPSPUT_LAN_IRQ_LAN)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* "H" edge sense */ |
308 | disable_opsput_lanpld_irq(OPSPUT_LAN_IRQ_LAN); | 265 | disable_opsput_lanpld_irq(OPSPUT_LAN_IRQ_LAN); |
309 | #endif /* CONFIG_SMC91X */ | 266 | #endif /* CONFIG_SMC91X */ |
310 | 267 | ||
311 | /* MFT2 : system timer */ | 268 | /* MFT2 : system timer */ |
312 | irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; | 269 | set_irq_chip_and_handler(M32R_IRQ_MFT2, &opsput_irq_type, |
313 | irq_desc[M32R_IRQ_MFT2].chip = &opsput_irq_type; | 270 | handle_level_irq); |
314 | irq_desc[M32R_IRQ_MFT2].action = 0; | ||
315 | irq_desc[M32R_IRQ_MFT2].depth = 1; | ||
316 | icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; | 271 | icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; |
317 | disable_opsput_irq(M32R_IRQ_MFT2); | 272 | disable_opsput_irq(M32R_IRQ_MFT2); |
318 | 273 | ||
319 | /* SIO0 : receive */ | 274 | /* SIO0 : receive */ |
320 | irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; | 275 | set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &opsput_irq_type, |
321 | irq_desc[M32R_IRQ_SIO0_R].chip = &opsput_irq_type; | 276 | handle_level_irq); |
322 | irq_desc[M32R_IRQ_SIO0_R].action = 0; | ||
323 | irq_desc[M32R_IRQ_SIO0_R].depth = 1; | ||
324 | icu_data[M32R_IRQ_SIO0_R].icucr = 0; | 277 | icu_data[M32R_IRQ_SIO0_R].icucr = 0; |
325 | disable_opsput_irq(M32R_IRQ_SIO0_R); | 278 | disable_opsput_irq(M32R_IRQ_SIO0_R); |
326 | 279 | ||
327 | /* SIO0 : send */ | 280 | /* SIO0 : send */ |
328 | irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; | 281 | set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &opsput_irq_type, |
329 | irq_desc[M32R_IRQ_SIO0_S].chip = &opsput_irq_type; | 282 | handle_level_irq); |
330 | irq_desc[M32R_IRQ_SIO0_S].action = 0; | ||
331 | irq_desc[M32R_IRQ_SIO0_S].depth = 1; | ||
332 | icu_data[M32R_IRQ_SIO0_S].icucr = 0; | 283 | icu_data[M32R_IRQ_SIO0_S].icucr = 0; |
333 | disable_opsput_irq(M32R_IRQ_SIO0_S); | 284 | disable_opsput_irq(M32R_IRQ_SIO0_S); |
334 | 285 | ||
335 | /* SIO1 : receive */ | 286 | /* SIO1 : receive */ |
336 | irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED; | 287 | set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &opsput_irq_type, |
337 | irq_desc[M32R_IRQ_SIO1_R].chip = &opsput_irq_type; | 288 | handle_level_irq); |
338 | irq_desc[M32R_IRQ_SIO1_R].action = 0; | ||
339 | irq_desc[M32R_IRQ_SIO1_R].depth = 1; | ||
340 | icu_data[M32R_IRQ_SIO1_R].icucr = 0; | 289 | icu_data[M32R_IRQ_SIO1_R].icucr = 0; |
341 | disable_opsput_irq(M32R_IRQ_SIO1_R); | 290 | disable_opsput_irq(M32R_IRQ_SIO1_R); |
342 | 291 | ||
343 | /* SIO1 : send */ | 292 | /* SIO1 : send */ |
344 | irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED; | 293 | set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &opsput_irq_type, |
345 | irq_desc[M32R_IRQ_SIO1_S].chip = &opsput_irq_type; | 294 | handle_level_irq); |
346 | irq_desc[M32R_IRQ_SIO1_S].action = 0; | ||
347 | irq_desc[M32R_IRQ_SIO1_S].depth = 1; | ||
348 | icu_data[M32R_IRQ_SIO1_S].icucr = 0; | 295 | icu_data[M32R_IRQ_SIO1_S].icucr = 0; |
349 | disable_opsput_irq(M32R_IRQ_SIO1_S); | 296 | disable_opsput_irq(M32R_IRQ_SIO1_S); |
350 | 297 | ||
351 | /* DMA1 : */ | 298 | /* DMA1 : */ |
352 | irq_desc[M32R_IRQ_DMA1].status = IRQ_DISABLED; | 299 | set_irq_chip_and_handler(M32R_IRQ_DMA1, &opsput_irq_type, |
353 | irq_desc[M32R_IRQ_DMA1].chip = &opsput_irq_type; | 300 | handle_level_irq); |
354 | irq_desc[M32R_IRQ_DMA1].action = 0; | ||
355 | irq_desc[M32R_IRQ_DMA1].depth = 1; | ||
356 | icu_data[M32R_IRQ_DMA1].icucr = 0; | 301 | icu_data[M32R_IRQ_DMA1].icucr = 0; |
357 | disable_opsput_irq(M32R_IRQ_DMA1); | 302 | disable_opsput_irq(M32R_IRQ_DMA1); |
358 | 303 | ||
359 | #ifdef CONFIG_SERIAL_M32R_PLDSIO | 304 | #ifdef CONFIG_SERIAL_M32R_PLDSIO |
360 | /* INT#1: SIO0 Receive on PLD */ | 305 | /* INT#1: SIO0 Receive on PLD */ |
361 | irq_desc[PLD_IRQ_SIO0_RCV].status = IRQ_DISABLED; | 306 | set_irq_chip_and_handler(PLD_IRQ_SIO0_RCV, &opsput_pld_irq_type, |
362 | irq_desc[PLD_IRQ_SIO0_RCV].chip = &opsput_pld_irq_type; | 307 | handle_level_irq); |
363 | irq_desc[PLD_IRQ_SIO0_RCV].action = 0; | ||
364 | irq_desc[PLD_IRQ_SIO0_RCV].depth = 1; /* disable nested irq */ | ||
365 | pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_RCV)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; | 308 | pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_RCV)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; |
366 | disable_opsput_pld_irq(PLD_IRQ_SIO0_RCV); | 309 | disable_opsput_pld_irq(PLD_IRQ_SIO0_RCV); |
367 | 310 | ||
368 | /* INT#1: SIO0 Send on PLD */ | 311 | /* INT#1: SIO0 Send on PLD */ |
369 | irq_desc[PLD_IRQ_SIO0_SND].status = IRQ_DISABLED; | 312 | set_irq_chip_and_handler(PLD_IRQ_SIO0_SND, &opsput_pld_irq_type, |
370 | irq_desc[PLD_IRQ_SIO0_SND].chip = &opsput_pld_irq_type; | 313 | handle_level_irq); |
371 | irq_desc[PLD_IRQ_SIO0_SND].action = 0; | ||
372 | irq_desc[PLD_IRQ_SIO0_SND].depth = 1; /* disable nested irq */ | ||
373 | pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_SND)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; | 314 | pld_icu_data[irq2pldirq(PLD_IRQ_SIO0_SND)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD03; |
374 | disable_opsput_pld_irq(PLD_IRQ_SIO0_SND); | 315 | disable_opsput_pld_irq(PLD_IRQ_SIO0_SND); |
375 | #endif /* CONFIG_SERIAL_M32R_PLDSIO */ | 316 | #endif /* CONFIG_SERIAL_M32R_PLDSIO */ |
376 | 317 | ||
377 | /* INT#1: CFC IREQ on PLD */ | 318 | /* INT#1: CFC IREQ on PLD */ |
378 | irq_desc[PLD_IRQ_CFIREQ].status = IRQ_DISABLED; | 319 | set_irq_chip_and_handler(PLD_IRQ_CFIREQ, &opsput_pld_irq_type, |
379 | irq_desc[PLD_IRQ_CFIREQ].chip = &opsput_pld_irq_type; | 320 | handle_level_irq); |
380 | irq_desc[PLD_IRQ_CFIREQ].action = 0; | ||
381 | irq_desc[PLD_IRQ_CFIREQ].depth = 1; /* disable nested irq */ | ||
382 | pld_icu_data[irq2pldirq(PLD_IRQ_CFIREQ)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* 'L' level sense */ | 321 | pld_icu_data[irq2pldirq(PLD_IRQ_CFIREQ)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* 'L' level sense */ |
383 | disable_opsput_pld_irq(PLD_IRQ_CFIREQ); | 322 | disable_opsput_pld_irq(PLD_IRQ_CFIREQ); |
384 | 323 | ||
385 | /* INT#1: CFC Insert on PLD */ | 324 | /* INT#1: CFC Insert on PLD */ |
386 | irq_desc[PLD_IRQ_CFC_INSERT].status = IRQ_DISABLED; | 325 | set_irq_chip_and_handler(PLD_IRQ_CFC_INSERT, &opsput_pld_irq_type, |
387 | irq_desc[PLD_IRQ_CFC_INSERT].chip = &opsput_pld_irq_type; | 326 | handle_level_irq); |
388 | irq_desc[PLD_IRQ_CFC_INSERT].action = 0; | ||
389 | irq_desc[PLD_IRQ_CFC_INSERT].depth = 1; /* disable nested irq */ | ||
390 | pld_icu_data[irq2pldirq(PLD_IRQ_CFC_INSERT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD00; /* 'L' edge sense */ | 327 | pld_icu_data[irq2pldirq(PLD_IRQ_CFC_INSERT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD00; /* 'L' edge sense */ |
391 | disable_opsput_pld_irq(PLD_IRQ_CFC_INSERT); | 328 | disable_opsput_pld_irq(PLD_IRQ_CFC_INSERT); |
392 | 329 | ||
393 | /* INT#1: CFC Eject on PLD */ | 330 | /* INT#1: CFC Eject on PLD */ |
394 | irq_desc[PLD_IRQ_CFC_EJECT].status = IRQ_DISABLED; | 331 | set_irq_chip_and_handler(PLD_IRQ_CFC_EJECT, &opsput_pld_irq_type, |
395 | irq_desc[PLD_IRQ_CFC_EJECT].chip = &opsput_pld_irq_type; | 332 | handle_level_irq); |
396 | irq_desc[PLD_IRQ_CFC_EJECT].action = 0; | ||
397 | irq_desc[PLD_IRQ_CFC_EJECT].depth = 1; /* disable nested irq */ | ||
398 | pld_icu_data[irq2pldirq(PLD_IRQ_CFC_EJECT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* 'H' edge sense */ | 333 | pld_icu_data[irq2pldirq(PLD_IRQ_CFC_EJECT)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD02; /* 'H' edge sense */ |
399 | disable_opsput_pld_irq(PLD_IRQ_CFC_EJECT); | 334 | disable_opsput_pld_irq(PLD_IRQ_CFC_EJECT); |
400 | 335 | ||
@@ -413,14 +348,11 @@ void __init init_IRQ(void) | |||
413 | enable_opsput_irq(M32R_IRQ_INT1); | 348 | enable_opsput_irq(M32R_IRQ_INT1); |
414 | 349 | ||
415 | #if defined(CONFIG_USB) | 350 | #if defined(CONFIG_USB) |
416 | outw(USBCR_OTGS, USBCR); /* USBCR: non-OTG */ | 351 | outw(USBCR_OTGS, USBCR); /* USBCR: non-OTG */ |
417 | 352 | set_irq_chip_and_handler(OPSPUT_LCD_IRQ_USB_INT1, | |
418 | irq_desc[OPSPUT_LCD_IRQ_USB_INT1].status = IRQ_DISABLED; | 353 | &opsput_lcdpld_irq_type, handle_level_irq); |
419 | irq_desc[OPSPUT_LCD_IRQ_USB_INT1].chip = &opsput_lcdpld_irq_type; | 354 | lcdpld_icu_data[irq2lcdpldirq(OPSPUT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* "L" level sense */ |
420 | irq_desc[OPSPUT_LCD_IRQ_USB_INT1].action = 0; | 355 | disable_opsput_lcdpld_irq(OPSPUT_LCD_IRQ_USB_INT1); |
421 | irq_desc[OPSPUT_LCD_IRQ_USB_INT1].depth = 1; | ||
422 | lcdpld_icu_data[irq2lcdpldirq(OPSPUT_LCD_IRQ_USB_INT1)].icucr = PLD_ICUCR_IEN|PLD_ICUCR_ISMOD01; /* "L" level sense */ | ||
423 | disable_opsput_lcdpld_irq(OPSPUT_LCD_IRQ_USB_INT1); | ||
424 | #endif | 356 | #endif |
425 | /* | 357 | /* |
426 | * INT2# is used for BAT, USB, AUDIO | 358 | * INT2# is used for BAT, USB, AUDIO |
@@ -433,10 +365,8 @@ void __init init_IRQ(void) | |||
433 | /* | 365 | /* |
434 | * INT3# is used for AR | 366 | * INT3# is used for AR |
435 | */ | 367 | */ |
436 | irq_desc[M32R_IRQ_INT3].status = IRQ_DISABLED; | 368 | set_irq_chip_and_handler(M32R_IRQ_INT3, &opsput_irq_type, |
437 | irq_desc[M32R_IRQ_INT3].chip = &opsput_irq_type; | 369 | handle_level_irq); |
438 | irq_desc[M32R_IRQ_INT3].action = 0; | ||
439 | irq_desc[M32R_IRQ_INT3].depth = 1; | ||
440 | icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; | 370 | icu_data[M32R_IRQ_INT3].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; |
441 | disable_opsput_irq(M32R_IRQ_INT3); | 371 | disable_opsput_irq(M32R_IRQ_INT3); |
442 | #endif /* CONFIG_VIDEO_M32R_AR */ | 372 | #endif /* CONFIG_VIDEO_M32R_AR */ |
diff --git a/arch/m32r/platforms/usrv/setup.c b/arch/m32r/platforms/usrv/setup.c index 1beac7a51ed..f3cff26d6e7 100644 --- a/arch/m32r/platforms/usrv/setup.c +++ b/arch/m32r/platforms/usrv/setup.c | |||
@@ -37,39 +37,30 @@ static void enable_mappi_irq(unsigned int irq) | |||
37 | outl(data, port); | 37 | outl(data, port); |
38 | } | 38 | } |
39 | 39 | ||
40 | static void mask_and_ack_mappi(unsigned int irq) | 40 | static void mask_mappi(struct irq_data *data) |
41 | { | 41 | { |
42 | disable_mappi_irq(irq); | 42 | disable_mappi_irq(data->irq); |
43 | } | 43 | } |
44 | 44 | ||
45 | static void end_mappi_irq(unsigned int irq) | 45 | static void unmask_mappi(struct irq_data *data) |
46 | { | 46 | { |
47 | enable_mappi_irq(irq); | 47 | enable_mappi_irq(data->irq); |
48 | } | 48 | } |
49 | 49 | ||
50 | static unsigned int startup_mappi_irq(unsigned int irq) | 50 | static void shutdown_mappi(struct irq_data *data) |
51 | { | ||
52 | enable_mappi_irq(irq); | ||
53 | return 0; | ||
54 | } | ||
55 | |||
56 | static void shutdown_mappi_irq(unsigned int irq) | ||
57 | { | 51 | { |
58 | unsigned long port; | 52 | unsigned long port; |
59 | 53 | ||
60 | port = irq2port(irq); | 54 | port = irq2port(data->irq); |
61 | outl(M32R_ICUCR_ILEVEL7, port); | 55 | outl(M32R_ICUCR_ILEVEL7, port); |
62 | } | 56 | } |
63 | 57 | ||
64 | static struct irq_chip mappi_irq_type = | 58 | static struct irq_chip mappi_irq_type = |
65 | { | 59 | { |
66 | .name = "M32700-IRQ", | 60 | .name = "M32700-IRQ", |
67 | .startup = startup_mappi_irq, | 61 | .irq_shutdown = shutdown_mappi, |
68 | .shutdown = shutdown_mappi_irq, | 62 | .irq_mask = mask_mappi, |
69 | .enable = enable_mappi_irq, | 63 | .irq_unmask = unmask_mappi, |
70 | .disable = disable_mappi_irq, | ||
71 | .ack = mask_and_ack_mappi, | ||
72 | .end = end_mappi_irq | ||
73 | }; | 64 | }; |
74 | 65 | ||
75 | /* | 66 | /* |
@@ -107,42 +98,33 @@ static void enable_m32700ut_pld_irq(unsigned int irq) | |||
107 | outw(data, port); | 98 | outw(data, port); |
108 | } | 99 | } |
109 | 100 | ||
110 | static void mask_and_ack_m32700ut_pld(unsigned int irq) | 101 | static void mask_m32700ut_pld(struct irq_data *data) |
111 | { | 102 | { |
112 | disable_m32700ut_pld_irq(irq); | 103 | disable_m32700ut_pld_irq(data->irq); |
113 | } | 104 | } |
114 | 105 | ||
115 | static void end_m32700ut_pld_irq(unsigned int irq) | 106 | static void unmask_m32700ut_pld(struct irq_data *data) |
116 | { | 107 | { |
117 | enable_m32700ut_pld_irq(irq); | 108 | enable_m32700ut_pld_irq(data->irq); |
118 | end_mappi_irq(M32R_IRQ_INT1); | 109 | enable_mappi_irq(M32R_IRQ_INT1); |
119 | } | ||
120 | |||
121 | static unsigned int startup_m32700ut_pld_irq(unsigned int irq) | ||
122 | { | ||
123 | enable_m32700ut_pld_irq(irq); | ||
124 | return 0; | ||
125 | } | 110 | } |
126 | 111 | ||
127 | static void shutdown_m32700ut_pld_irq(unsigned int irq) | 112 | static void shutdown_m32700ut_pld(struct irq_data *data) |
128 | { | 113 | { |
129 | unsigned long port; | 114 | unsigned long port; |
130 | unsigned int pldirq; | 115 | unsigned int pldirq; |
131 | 116 | ||
132 | pldirq = irq2pldirq(irq); | 117 | pldirq = irq2pldirq(data->irq); |
133 | port = pldirq2port(pldirq); | 118 | port = pldirq2port(pldirq); |
134 | outw(PLD_ICUCR_ILEVEL7, port); | 119 | outw(PLD_ICUCR_ILEVEL7, port); |
135 | } | 120 | } |
136 | 121 | ||
137 | static struct irq_chip m32700ut_pld_irq_type = | 122 | static struct irq_chip m32700ut_pld_irq_type = |
138 | { | 123 | { |
139 | .name = "USRV-PLD-IRQ", | 124 | .name = "USRV-PLD-IRQ", |
140 | .startup = startup_m32700ut_pld_irq, | 125 | .irq_shutdown = shutdown_m32700ut_pld, |
141 | .shutdown = shutdown_m32700ut_pld_irq, | 126 | .irq_mask = mask_m32700ut_pld, |
142 | .enable = enable_m32700ut_pld_irq, | 127 | .irq_unmask = unmask_m32700ut_pld, |
143 | .disable = disable_m32700ut_pld_irq, | ||
144 | .ack = mask_and_ack_m32700ut_pld, | ||
145 | .end = end_m32700ut_pld_irq | ||
146 | }; | 128 | }; |
147 | 129 | ||
148 | void __init init_IRQ(void) | 130 | void __init init_IRQ(void) |
@@ -156,53 +138,42 @@ void __init init_IRQ(void) | |||
156 | once++; | 138 | once++; |
157 | 139 | ||
158 | /* MFT2 : system timer */ | 140 | /* MFT2 : system timer */ |
159 | irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; | 141 | set_irq_chip_and_handler(M32R_IRQ_MFT2, &mappi_irq_type, |
160 | irq_desc[M32R_IRQ_MFT2].chip = &mappi_irq_type; | 142 | handle_level_irq); |
161 | irq_desc[M32R_IRQ_MFT2].action = 0; | ||
162 | irq_desc[M32R_IRQ_MFT2].depth = 1; | ||
163 | icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; | 143 | icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; |
164 | disable_mappi_irq(M32R_IRQ_MFT2); | 144 | disable_mappi_irq(M32R_IRQ_MFT2); |
165 | 145 | ||
166 | #if defined(CONFIG_SERIAL_M32R_SIO) | 146 | #if defined(CONFIG_SERIAL_M32R_SIO) |
167 | /* SIO0_R : uart receive data */ | 147 | /* SIO0_R : uart receive data */ |
168 | irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; | 148 | set_irq_chip_and_handler(M32R_IRQ_SIO0_R, &mappi_irq_type, |
169 | irq_desc[M32R_IRQ_SIO0_R].chip = &mappi_irq_type; | 149 | handle_level_irq); |
170 | irq_desc[M32R_IRQ_SIO0_R].action = 0; | ||
171 | irq_desc[M32R_IRQ_SIO0_R].depth = 1; | ||
172 | icu_data[M32R_IRQ_SIO0_R].icucr = 0; | 150 | icu_data[M32R_IRQ_SIO0_R].icucr = 0; |
173 | disable_mappi_irq(M32R_IRQ_SIO0_R); | 151 | disable_mappi_irq(M32R_IRQ_SIO0_R); |
174 | 152 | ||
175 | /* SIO0_S : uart send data */ | 153 | /* SIO0_S : uart send data */ |
176 | irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; | 154 | set_irq_chip_and_handler(M32R_IRQ_SIO0_S, &mappi_irq_type, |
177 | irq_desc[M32R_IRQ_SIO0_S].chip = &mappi_irq_type; | 155 | handle_level_irq); |
178 | irq_desc[M32R_IRQ_SIO0_S].action = 0; | ||
179 | irq_desc[M32R_IRQ_SIO0_S].depth = 1; | ||
180 | icu_data[M32R_IRQ_SIO0_S].icucr = 0; | 156 | icu_data[M32R_IRQ_SIO0_S].icucr = 0; |
181 | disable_mappi_irq(M32R_IRQ_SIO0_S); | 157 | disable_mappi_irq(M32R_IRQ_SIO0_S); |
182 | 158 | ||
183 | /* SIO1_R : uart receive data */ | 159 | /* SIO1_R : uart receive data */ |
184 | irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED; | 160 | set_irq_chip_and_handler(M32R_IRQ_SIO1_R, &mappi_irq_type, |
185 | irq_desc[M32R_IRQ_SIO1_R].chip = &mappi_irq_type; | 161 | handle_level_irq); |
186 | irq_desc[M32R_IRQ_SIO1_R].action = 0; | ||
187 | irq_desc[M32R_IRQ_SIO1_R].depth = 1; | ||
188 | icu_data[M32R_IRQ_SIO1_R].icucr = 0; | 162 | icu_data[M32R_IRQ_SIO1_R].icucr = 0; |
189 | disable_mappi_irq(M32R_IRQ_SIO1_R); | 163 | disable_mappi_irq(M32R_IRQ_SIO1_R); |
190 | 164 | ||
191 | /* SIO1_S : uart send data */ | 165 | /* SIO1_S : uart send data */ |
192 | irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED; | 166 | set_irq_chip_and_handler(M32R_IRQ_SIO1_S, &mappi_irq_type, |
193 | irq_desc[M32R_IRQ_SIO1_S].chip = &mappi_irq_type; | 167 | handle_level_irq); |
194 | irq_desc[M32R_IRQ_SIO1_S].action = 0; | ||
195 | irq_desc[M32R_IRQ_SIO1_S].depth = 1; | ||
196 | icu_data[M32R_IRQ_SIO1_S].icucr = 0; | 168 | icu_data[M32R_IRQ_SIO1_S].icucr = 0; |
197 | disable_mappi_irq(M32R_IRQ_SIO1_S); | 169 | disable_mappi_irq(M32R_IRQ_SIO1_S); |
198 | #endif /* CONFIG_SERIAL_M32R_SIO */ | 170 | #endif /* CONFIG_SERIAL_M32R_SIO */ |
199 | 171 | ||
200 | /* INT#67-#71: CFC#0 IREQ on PLD */ | 172 | /* INT#67-#71: CFC#0 IREQ on PLD */ |
201 | for (i = 0 ; i < CONFIG_M32R_CFC_NUM ; i++ ) { | 173 | for (i = 0 ; i < CONFIG_M32R_CFC_NUM ; i++ ) { |
202 | irq_desc[PLD_IRQ_CF0 + i].status = IRQ_DISABLED; | 174 | set_irq_chip_and_handler(PLD_IRQ_CF0 + i, |
203 | irq_desc[PLD_IRQ_CF0 + i].chip = &m32700ut_pld_irq_type; | 175 | &m32700ut_pld_irq_type, |
204 | irq_desc[PLD_IRQ_CF0 + i].action = 0; | 176 | handle_level_irq); |
205 | irq_desc[PLD_IRQ_CF0 + i].depth = 1; /* disable nested irq */ | ||
206 | pld_icu_data[irq2pldirq(PLD_IRQ_CF0 + i)].icucr | 177 | pld_icu_data[irq2pldirq(PLD_IRQ_CF0 + i)].icucr |
207 | = PLD_ICUCR_ISMOD01; /* 'L' level sense */ | 178 | = PLD_ICUCR_ISMOD01; /* 'L' level sense */ |
208 | disable_m32700ut_pld_irq(PLD_IRQ_CF0 + i); | 179 | disable_m32700ut_pld_irq(PLD_IRQ_CF0 + i); |
@@ -210,19 +181,15 @@ void __init init_IRQ(void) | |||
210 | 181 | ||
211 | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) | 182 | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) |
212 | /* INT#76: 16552D#0 IREQ on PLD */ | 183 | /* INT#76: 16552D#0 IREQ on PLD */ |
213 | irq_desc[PLD_IRQ_UART0].status = IRQ_DISABLED; | 184 | set_irq_chip_and_handler(PLD_IRQ_UART0, &m32700ut_pld_irq_type, |
214 | irq_desc[PLD_IRQ_UART0].chip = &m32700ut_pld_irq_type; | 185 | handle_level_irq); |
215 | irq_desc[PLD_IRQ_UART0].action = 0; | ||
216 | irq_desc[PLD_IRQ_UART0].depth = 1; /* disable nested irq */ | ||
217 | pld_icu_data[irq2pldirq(PLD_IRQ_UART0)].icucr | 186 | pld_icu_data[irq2pldirq(PLD_IRQ_UART0)].icucr |
218 | = PLD_ICUCR_ISMOD03; /* 'H' level sense */ | 187 | = PLD_ICUCR_ISMOD03; /* 'H' level sense */ |
219 | disable_m32700ut_pld_irq(PLD_IRQ_UART0); | 188 | disable_m32700ut_pld_irq(PLD_IRQ_UART0); |
220 | 189 | ||
221 | /* INT#77: 16552D#1 IREQ on PLD */ | 190 | /* INT#77: 16552D#1 IREQ on PLD */ |
222 | irq_desc[PLD_IRQ_UART1].status = IRQ_DISABLED; | 191 | set_irq_chip_and_handler(PLD_IRQ_UART1, &m32700ut_pld_irq_type, |
223 | irq_desc[PLD_IRQ_UART1].chip = &m32700ut_pld_irq_type; | 192 | handle_level_irq); |
224 | irq_desc[PLD_IRQ_UART1].action = 0; | ||
225 | irq_desc[PLD_IRQ_UART1].depth = 1; /* disable nested irq */ | ||
226 | pld_icu_data[irq2pldirq(PLD_IRQ_UART1)].icucr | 193 | pld_icu_data[irq2pldirq(PLD_IRQ_UART1)].icucr |
227 | = PLD_ICUCR_ISMOD03; /* 'H' level sense */ | 194 | = PLD_ICUCR_ISMOD03; /* 'H' level sense */ |
228 | disable_m32700ut_pld_irq(PLD_IRQ_UART1); | 195 | disable_m32700ut_pld_irq(PLD_IRQ_UART1); |
@@ -230,10 +197,8 @@ void __init init_IRQ(void) | |||
230 | 197 | ||
231 | #if defined(CONFIG_IDC_AK4524) || defined(CONFIG_IDC_AK4524_MODULE) | 198 | #if defined(CONFIG_IDC_AK4524) || defined(CONFIG_IDC_AK4524_MODULE) |
232 | /* INT#80: AK4524 IREQ on PLD */ | 199 | /* INT#80: AK4524 IREQ on PLD */ |
233 | irq_desc[PLD_IRQ_SNDINT].status = IRQ_DISABLED; | 200 | set_irq_chip_and_handler(PLD_IRQ_SNDINT, &m32700ut_pld_irq_type, |
234 | irq_desc[PLD_IRQ_SNDINT].chip = &m32700ut_pld_irq_type; | 201 | handle_level_irq); |
235 | irq_desc[PLD_IRQ_SNDINT].action = 0; | ||
236 | irq_desc[PLD_IRQ_SNDINT].depth = 1; /* disable nested irq */ | ||
237 | pld_icu_data[irq2pldirq(PLD_IRQ_SNDINT)].icucr | 202 | pld_icu_data[irq2pldirq(PLD_IRQ_SNDINT)].icucr |
238 | = PLD_ICUCR_ISMOD01; /* 'L' level sense */ | 203 | = PLD_ICUCR_ISMOD01; /* 'L' level sense */ |
239 | disable_m32700ut_pld_irq(PLD_IRQ_SNDINT); | 204 | disable_m32700ut_pld_irq(PLD_IRQ_SNDINT); |
diff --git a/arch/m68k/amiga/config.c b/arch/m68k/amiga/config.c index b1577f741fa..82a4bb51d5d 100644 --- a/arch/m68k/amiga/config.c +++ b/arch/m68k/amiga/config.c | |||
@@ -610,17 +610,17 @@ static void amiga_mem_console_write(struct console *co, const char *s, | |||
610 | 610 | ||
611 | static int __init amiga_savekmsg_setup(char *arg) | 611 | static int __init amiga_savekmsg_setup(char *arg) |
612 | { | 612 | { |
613 | static struct resource debug_res = { .name = "Debug" }; | ||
614 | |||
615 | if (!MACH_IS_AMIGA || strcmp(arg, "mem")) | 613 | if (!MACH_IS_AMIGA || strcmp(arg, "mem")) |
616 | goto done; | 614 | return 0; |
617 | 615 | ||
618 | if (!AMIGAHW_PRESENT(CHIP_RAM)) { | 616 | if (amiga_chip_size < SAVEKMSG_MAXMEM) { |
619 | printk("Warning: no chipram present for debugging\n"); | 617 | pr_err("Not enough chipram for debugging\n"); |
620 | goto done; | 618 | return -ENOMEM; |
621 | } | 619 | } |
622 | 620 | ||
623 | savekmsg = amiga_chip_alloc_res(SAVEKMSG_MAXMEM, &debug_res); | 621 | /* Just steal the block, the chipram allocator isn't functional yet */ |
622 | amiga_chip_size -= SAVEKMSG_MAXMEM; | ||
623 | savekmsg = (void *)ZTWO_VADDR(CHIP_PHYSADDR + amiga_chip_size); | ||
624 | savekmsg->magic1 = SAVEKMSG_MAGIC1; | 624 | savekmsg->magic1 = SAVEKMSG_MAGIC1; |
625 | savekmsg->magic2 = SAVEKMSG_MAGIC2; | 625 | savekmsg->magic2 = SAVEKMSG_MAGIC2; |
626 | savekmsg->magicptr = ZTWO_PADDR(savekmsg); | 626 | savekmsg->magicptr = ZTWO_PADDR(savekmsg); |
@@ -628,8 +628,6 @@ static int __init amiga_savekmsg_setup(char *arg) | |||
628 | 628 | ||
629 | amiga_console_driver.write = amiga_mem_console_write; | 629 | amiga_console_driver.write = amiga_mem_console_write; |
630 | register_console(&amiga_console_driver); | 630 | register_console(&amiga_console_driver); |
631 | |||
632 | done: | ||
633 | return 0; | 631 | return 0; |
634 | } | 632 | } |
635 | 633 | ||
diff --git a/arch/m68k/atari/ataints.c b/arch/m68k/atari/ataints.c index 39478dd08e6..26a804e67bc 100644 --- a/arch/m68k/atari/ataints.c +++ b/arch/m68k/atari/ataints.c | |||
@@ -388,9 +388,9 @@ void __init atari_init_IRQ(void) | |||
388 | } | 388 | } |
389 | 389 | ||
390 | if (ATARIHW_PRESENT(SCC) && !atari_SCC_reset_done) { | 390 | if (ATARIHW_PRESENT(SCC) && !atari_SCC_reset_done) { |
391 | scc.cha_a_ctrl = 9; | 391 | atari_scc.cha_a_ctrl = 9; |
392 | MFPDELAY(); | 392 | MFPDELAY(); |
393 | scc.cha_a_ctrl = (char) 0xc0; /* hardware reset */ | 393 | atari_scc.cha_a_ctrl = (char) 0xc0; /* hardware reset */ |
394 | } | 394 | } |
395 | 395 | ||
396 | if (ATARIHW_PRESENT(SCU)) { | 396 | if (ATARIHW_PRESENT(SCU)) { |
diff --git a/arch/m68k/atari/config.c b/arch/m68k/atari/config.c index ae2d96e5d61..4203d101363 100644 --- a/arch/m68k/atari/config.c +++ b/arch/m68k/atari/config.c | |||
@@ -315,7 +315,7 @@ void __init config_atari(void) | |||
315 | ATARIHW_SET(SCC_DMA); | 315 | ATARIHW_SET(SCC_DMA); |
316 | printk("SCC_DMA "); | 316 | printk("SCC_DMA "); |
317 | } | 317 | } |
318 | if (scc_test(&scc.cha_a_ctrl)) { | 318 | if (scc_test(&atari_scc.cha_a_ctrl)) { |
319 | ATARIHW_SET(SCC); | 319 | ATARIHW_SET(SCC); |
320 | printk("SCC "); | 320 | printk("SCC "); |
321 | } | 321 | } |
diff --git a/arch/m68k/atari/debug.c b/arch/m68k/atari/debug.c index 28efdc33c1a..5a484247e49 100644 --- a/arch/m68k/atari/debug.c +++ b/arch/m68k/atari/debug.c | |||
@@ -53,9 +53,9 @@ static inline void ata_scc_out(char c) | |||
53 | { | 53 | { |
54 | do { | 54 | do { |
55 | MFPDELAY(); | 55 | MFPDELAY(); |
56 | } while (!(scc.cha_b_ctrl & 0x04)); /* wait for tx buf empty */ | 56 | } while (!(atari_scc.cha_b_ctrl & 0x04)); /* wait for tx buf empty */ |
57 | MFPDELAY(); | 57 | MFPDELAY(); |
58 | scc.cha_b_data = c; | 58 | atari_scc.cha_b_data = c; |
59 | } | 59 | } |
60 | 60 | ||
61 | static void atari_scc_console_write(struct console *co, const char *str, | 61 | static void atari_scc_console_write(struct console *co, const char *str, |
@@ -140,9 +140,9 @@ int atari_scc_console_wait_key(struct console *co) | |||
140 | { | 140 | { |
141 | do { | 141 | do { |
142 | MFPDELAY(); | 142 | MFPDELAY(); |
143 | } while (!(scc.cha_b_ctrl & 0x01)); /* wait for rx buf filled */ | 143 | } while (!(atari_scc.cha_b_ctrl & 0x01)); /* wait for rx buf filled */ |
144 | MFPDELAY(); | 144 | MFPDELAY(); |
145 | return scc.cha_b_data; | 145 | return atari_scc.cha_b_data; |
146 | } | 146 | } |
147 | 147 | ||
148 | int atari_midi_console_wait_key(struct console *co) | 148 | int atari_midi_console_wait_key(struct console *co) |
@@ -185,9 +185,9 @@ static void __init atari_init_mfp_port(int cflag) | |||
185 | 185 | ||
186 | #define SCC_WRITE(reg, val) \ | 186 | #define SCC_WRITE(reg, val) \ |
187 | do { \ | 187 | do { \ |
188 | scc.cha_b_ctrl = (reg); \ | 188 | atari_scc.cha_b_ctrl = (reg); \ |
189 | MFPDELAY(); \ | 189 | MFPDELAY(); \ |
190 | scc.cha_b_ctrl = (val); \ | 190 | atari_scc.cha_b_ctrl = (val); \ |
191 | MFPDELAY(); \ | 191 | MFPDELAY(); \ |
192 | } while (0) | 192 | } while (0) |
193 | 193 | ||
@@ -240,7 +240,7 @@ static void __init atari_init_scc_port(int cflag) | |||
240 | reg3 = (cflag & CSIZE) == CS8 ? 0xc0 : 0x40; | 240 | reg3 = (cflag & CSIZE) == CS8 ? 0xc0 : 0x40; |
241 | reg5 = (cflag & CSIZE) == CS8 ? 0x60 : 0x20 | 0x82 /* assert DTR/RTS */; | 241 | reg5 = (cflag & CSIZE) == CS8 ? 0x60 : 0x20 | 0x82 /* assert DTR/RTS */; |
242 | 242 | ||
243 | (void)scc.cha_b_ctrl; /* reset reg pointer */ | 243 | (void)atari_scc.cha_b_ctrl; /* reset reg pointer */ |
244 | SCC_WRITE(9, 0xc0); /* reset */ | 244 | SCC_WRITE(9, 0xc0); /* reset */ |
245 | LONG_DELAY(); /* extra delay after WR9 access */ | 245 | LONG_DELAY(); /* extra delay after WR9 access */ |
246 | SCC_WRITE(4, (cflag & PARENB) ? ((cflag & PARODD) ? 0x01 : 0x03) | 246 | SCC_WRITE(4, (cflag & PARENB) ? ((cflag & PARODD) ? 0x01 : 0x03) |
diff --git a/arch/m68k/include/asm/atarihw.h b/arch/m68k/include/asm/atarihw.h index a714e1aa072..f51f709bbf3 100644 --- a/arch/m68k/include/asm/atarihw.h +++ b/arch/m68k/include/asm/atarihw.h | |||
@@ -449,7 +449,7 @@ struct SCC | |||
449 | u_char char_dummy3; | 449 | u_char char_dummy3; |
450 | u_char cha_b_data; | 450 | u_char cha_b_data; |
451 | }; | 451 | }; |
452 | # define scc ((*(volatile struct SCC*)SCC_BAS)) | 452 | # define atari_scc ((*(volatile struct SCC*)SCC_BAS)) |
453 | 453 | ||
454 | /* The ESCC (Z85230) in an Atari ST. The channels are reversed! */ | 454 | /* The ESCC (Z85230) in an Atari ST. The channels are reversed! */ |
455 | # define st_escc ((*(volatile struct SCC*)0xfffffa31)) | 455 | # define st_escc ((*(volatile struct SCC*)0xfffffa31)) |
diff --git a/arch/m68k/include/asm/cacheflush_no.h b/arch/m68k/include/asm/cacheflush_no.h index 7085bd51668..cb88aa96c4f 100644 --- a/arch/m68k/include/asm/cacheflush_no.h +++ b/arch/m68k/include/asm/cacheflush_no.h | |||
@@ -2,21 +2,22 @@ | |||
2 | #define _M68KNOMMU_CACHEFLUSH_H | 2 | #define _M68KNOMMU_CACHEFLUSH_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * (C) Copyright 2000-2004, Greg Ungerer <gerg@snapgear.com> | 5 | * (C) Copyright 2000-2010, Greg Ungerer <gerg@snapgear.com> |
6 | */ | 6 | */ |
7 | #include <linux/mm.h> | 7 | #include <linux/mm.h> |
8 | #include <asm/mcfsim.h> | ||
8 | 9 | ||
9 | #define flush_cache_all() __flush_cache_all() | 10 | #define flush_cache_all() __flush_cache_all() |
10 | #define flush_cache_mm(mm) do { } while (0) | 11 | #define flush_cache_mm(mm) do { } while (0) |
11 | #define flush_cache_dup_mm(mm) do { } while (0) | 12 | #define flush_cache_dup_mm(mm) do { } while (0) |
12 | #define flush_cache_range(vma, start, end) __flush_cache_all() | 13 | #define flush_cache_range(vma, start, end) do { } while (0) |
13 | #define flush_cache_page(vma, vmaddr) do { } while (0) | 14 | #define flush_cache_page(vma, vmaddr) do { } while (0) |
14 | #define flush_dcache_range(start,len) __flush_cache_all() | 15 | #define flush_dcache_range(start, len) __flush_dcache_all() |
15 | #define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 0 | 16 | #define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 0 |
16 | #define flush_dcache_page(page) do { } while (0) | 17 | #define flush_dcache_page(page) do { } while (0) |
17 | #define flush_dcache_mmap_lock(mapping) do { } while (0) | 18 | #define flush_dcache_mmap_lock(mapping) do { } while (0) |
18 | #define flush_dcache_mmap_unlock(mapping) do { } while (0) | 19 | #define flush_dcache_mmap_unlock(mapping) do { } while (0) |
19 | #define flush_icache_range(start,len) __flush_cache_all() | 20 | #define flush_icache_range(start, len) __flush_icache_all() |
20 | #define flush_icache_page(vma,pg) do { } while (0) | 21 | #define flush_icache_page(vma,pg) do { } while (0) |
21 | #define flush_icache_user_range(vma,pg,adr,len) do { } while (0) | 22 | #define flush_icache_user_range(vma,pg,adr,len) do { } while (0) |
22 | #define flush_cache_vmap(start, end) do { } while (0) | 23 | #define flush_cache_vmap(start, end) do { } while (0) |
@@ -27,66 +28,52 @@ | |||
27 | #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ | 28 | #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ |
28 | memcpy(dst, src, len) | 29 | memcpy(dst, src, len) |
29 | 30 | ||
31 | void mcf_cache_push(void); | ||
32 | |||
30 | static inline void __flush_cache_all(void) | 33 | static inline void __flush_cache_all(void) |
31 | { | 34 | { |
32 | #if defined(CONFIG_M5407) || defined(CONFIG_M548x) | 35 | #ifdef CACHE_PUSH |
33 | /* | 36 | mcf_cache_push(); |
34 | * Use cpushl to push and invalidate all cache lines. | 37 | #endif |
35 | * Gas doesn't seem to know how to generate the ColdFire | 38 | #ifdef CACHE_INVALIDATE |
36 | * cpushl instruction... Oh well, bit stuff it for now. | ||
37 | */ | ||
38 | __asm__ __volatile__ ( | ||
39 | "nop\n\t" | ||
40 | "clrl %%d0\n\t" | ||
41 | "1:\n\t" | ||
42 | "movel %%d0,%%a0\n\t" | ||
43 | "2:\n\t" | ||
44 | ".word 0xf468\n\t" | ||
45 | "addl #0x10,%%a0\n\t" | ||
46 | "cmpl #0x00000800,%%a0\n\t" | ||
47 | "blt 2b\n\t" | ||
48 | "addql #1,%%d0\n\t" | ||
49 | "cmpil #4,%%d0\n\t" | ||
50 | "bne 1b\n\t" | ||
51 | "movel #0xb6088500,%%d0\n\t" | ||
52 | "movec %%d0,%%CACR\n\t" | ||
53 | : : : "d0", "a0" ); | ||
54 | #endif /* CONFIG_M5407 */ | ||
55 | #if defined(CONFIG_M523x) || defined(CONFIG_M527x) | ||
56 | __asm__ __volatile__ ( | ||
57 | "movel #0x81400100, %%d0\n\t" | ||
58 | "movec %%d0, %%CACR\n\t" | ||
59 | "nop\n\t" | ||
60 | : : : "d0" ); | ||
61 | #endif /* CONFIG_M523x || CONFIG_M527x */ | ||
62 | #if defined(CONFIG_M528x) | ||
63 | __asm__ __volatile__ ( | ||
64 | "movel #0x81000200, %%d0\n\t" | ||
65 | "movec %%d0, %%CACR\n\t" | ||
66 | "nop\n\t" | ||
67 | : : : "d0" ); | ||
68 | #endif /* CONFIG_M528x */ | ||
69 | #if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || defined(CONFIG_M5272) | ||
70 | __asm__ __volatile__ ( | 39 | __asm__ __volatile__ ( |
71 | "movel #0x81000100, %%d0\n\t" | 40 | "movel %0, %%d0\n\t" |
72 | "movec %%d0, %%CACR\n\t" | 41 | "movec %%d0, %%CACR\n\t" |
73 | "nop\n\t" | 42 | "nop\n\t" |
74 | : : : "d0" ); | 43 | : : "i" (CACHE_INVALIDATE) : "d0" ); |
75 | #endif /* CONFIG_M5206 || CONFIG_M5206e || CONFIG_M5272 */ | 44 | #endif |
76 | #ifdef CONFIG_M5249 | 45 | } |
46 | |||
47 | /* | ||
48 | * Some ColdFire parts implement separate instruction and data caches, | ||
49 | * on those we should just flush the appropriate cache. If we don't need | ||
50 | * to do any specific flushing then this will be optimized away. | ||
51 | */ | ||
52 | static inline void __flush_icache_all(void) | ||
53 | { | ||
54 | #ifdef CACHE_INVALIDATEI | ||
77 | __asm__ __volatile__ ( | 55 | __asm__ __volatile__ ( |
78 | "movel #0xa1000200, %%d0\n\t" | 56 | "movel %0, %%d0\n\t" |
79 | "movec %%d0, %%CACR\n\t" | 57 | "movec %%d0, %%CACR\n\t" |
80 | "nop\n\t" | 58 | "nop\n\t" |
81 | : : : "d0" ); | 59 | : : "i" (CACHE_INVALIDATEI) : "d0" ); |
82 | #endif /* CONFIG_M5249 */ | 60 | #endif |
83 | #ifdef CONFIG_M532x | 61 | } |
62 | |||
63 | static inline void __flush_dcache_all(void) | ||
64 | { | ||
65 | #ifdef CACHE_PUSH | ||
66 | mcf_cache_push(); | ||
67 | #endif | ||
68 | #ifdef CACHE_INVALIDATED | ||
84 | __asm__ __volatile__ ( | 69 | __asm__ __volatile__ ( |
85 | "movel #0x81000200, %%d0\n\t" | 70 | "movel %0, %%d0\n\t" |
86 | "movec %%d0, %%CACR\n\t" | 71 | "movec %%d0, %%CACR\n\t" |
87 | "nop\n\t" | 72 | "nop\n\t" |
88 | : : : "d0" ); | 73 | : : "i" (CACHE_INVALIDATED) : "d0" ); |
89 | #endif /* CONFIG_M532x */ | 74 | #else |
75 | /* Flush the wrtite buffer */ | ||
76 | __asm__ __volatile__ ( "nop" ); | ||
77 | #endif | ||
90 | } | 78 | } |
91 | |||
92 | #endif /* _M68KNOMMU_CACHEFLUSH_H */ | 79 | #endif /* _M68KNOMMU_CACHEFLUSH_H */ |
diff --git a/arch/m68k/include/asm/coldfire.h b/arch/m68k/include/asm/coldfire.h index 3b0a34d0fe3..213028cbe11 100644 --- a/arch/m68k/include/asm/coldfire.h +++ b/arch/m68k/include/asm/coldfire.h | |||
@@ -32,7 +32,7 @@ | |||
32 | */ | 32 | */ |
33 | #define MCF_MBAR 0x10000000 | 33 | #define MCF_MBAR 0x10000000 |
34 | #define MCF_MBAR2 0x80000000 | 34 | #define MCF_MBAR2 0x80000000 |
35 | #if defined(CONFIG_M548x) | 35 | #if defined(CONFIG_M54xx) |
36 | #define MCF_IPSBAR MCF_MBAR | 36 | #define MCF_IPSBAR MCF_MBAR |
37 | #elif defined(CONFIG_M520x) | 37 | #elif defined(CONFIG_M520x) |
38 | #define MCF_IPSBAR 0xFC000000 | 38 | #define MCF_IPSBAR 0xFC000000 |
diff --git a/arch/m68k/include/asm/entry_no.h b/arch/m68k/include/asm/entry_no.h index 26be277394f..627d69bacc5 100644 --- a/arch/m68k/include/asm/entry_no.h +++ b/arch/m68k/include/asm/entry_no.h | |||
@@ -42,12 +42,16 @@ | |||
42 | */ | 42 | */ |
43 | 43 | ||
44 | #ifdef CONFIG_COLDFIRE | 44 | #ifdef CONFIG_COLDFIRE |
45 | #ifdef CONFIG_COLDFIRE_SW_A7 | ||
45 | /* | 46 | /* |
46 | * This is made a little more tricky on the ColdFire. There is no | 47 | * This is made a little more tricky on older ColdFires. There is no |
47 | * separate kernel and user stack pointers. Need to artificially | 48 | * separate supervisor and user stack pointers. Need to artificially |
48 | * construct a usp in software... When doing this we need to disable | 49 | * construct a usp in software... When doing this we need to disable |
49 | * interrupts, otherwise bad things could happen. | 50 | * interrupts, otherwise bad things will happen. |
50 | */ | 51 | */ |
52 | .globl sw_usp | ||
53 | .globl sw_ksp | ||
54 | |||
51 | .macro SAVE_ALL | 55 | .macro SAVE_ALL |
52 | move #0x2700,%sr /* disable intrs */ | 56 | move #0x2700,%sr /* disable intrs */ |
53 | btst #5,%sp@(2) /* from user? */ | 57 | btst #5,%sp@(2) /* from user? */ |
@@ -74,9 +78,7 @@ | |||
74 | 7: | 78 | 7: |
75 | .endm | 79 | .endm |
76 | 80 | ||
77 | .macro RESTORE_ALL | 81 | .macro RESTORE_USER |
78 | btst #5,%sp@(PT_SR) /* going user? */ | ||
79 | bnes 8f /* no, skip */ | ||
80 | move #0x2700,%sr /* disable intrs */ | 82 | move #0x2700,%sr /* disable intrs */ |
81 | movel sw_usp,%a0 /* get usp */ | 83 | movel sw_usp,%a0 /* get usp */ |
82 | movel %sp@(PT_OFF_PC),%a0@- /* copy exception program counter */ | 84 | movel %sp@(PT_OFF_PC),%a0@- /* copy exception program counter */ |
@@ -91,19 +93,22 @@ | |||
91 | subql #8,sw_usp /* set exception */ | 93 | subql #8,sw_usp /* set exception */ |
92 | movel sw_usp,%sp /* restore usp */ | 94 | movel sw_usp,%sp /* restore usp */ |
93 | rte | 95 | rte |
94 | 8: | ||
95 | moveml %sp@,%d1-%d5/%a0-%a2 | ||
96 | lea %sp@(32),%sp /* space for 8 regs */ | ||
97 | movel %sp@+,%d0 | ||
98 | addql #4,%sp /* orig d0 */ | ||
99 | addl %sp@+,%sp /* stkadj */ | ||
100 | rte | ||
101 | .endm | 96 | .endm |
102 | 97 | ||
98 | .macro RDUSP | ||
99 | movel sw_usp,%a2 | ||
100 | .endm | ||
101 | |||
102 | .macro WRUSP | ||
103 | movel %a0,sw_usp | ||
104 | .endm | ||
105 | |||
106 | #else /* !CONFIG_COLDFIRE_SW_A7 */ | ||
103 | /* | 107 | /* |
104 | * Quick exception save, use current stack only. | 108 | * Modern ColdFire parts have separate supervisor and user stack |
109 | * pointers. Simple load and restore macros for this case. | ||
105 | */ | 110 | */ |
106 | .macro SAVE_LOCAL | 111 | .macro SAVE_ALL |
107 | move #0x2700,%sr /* disable intrs */ | 112 | move #0x2700,%sr /* disable intrs */ |
108 | clrl %sp@- /* stkadj */ | 113 | clrl %sp@- /* stkadj */ |
109 | movel %d0,%sp@- /* orig d0 */ | 114 | movel %d0,%sp@- /* orig d0 */ |
@@ -112,7 +117,7 @@ | |||
112 | moveml %d1-%d5/%a0-%a2,%sp@ | 117 | moveml %d1-%d5/%a0-%a2,%sp@ |
113 | .endm | 118 | .endm |
114 | 119 | ||
115 | .macro RESTORE_LOCAL | 120 | .macro RESTORE_USER |
116 | moveml %sp@,%d1-%d5/%a0-%a2 | 121 | moveml %sp@,%d1-%d5/%a0-%a2 |
117 | lea %sp@(32),%sp /* space for 8 regs */ | 122 | lea %sp@(32),%sp /* space for 8 regs */ |
118 | movel %sp@+,%d0 | 123 | movel %sp@+,%d0 |
@@ -121,6 +126,18 @@ | |||
121 | rte | 126 | rte |
122 | .endm | 127 | .endm |
123 | 128 | ||
129 | .macro RDUSP | ||
130 | /*move %usp,%a2*/ | ||
131 | .word 0x4e6a | ||
132 | .endm | ||
133 | |||
134 | .macro WRUSP | ||
135 | /*move %a0,%usp*/ | ||
136 | .word 0x4e60 | ||
137 | .endm | ||
138 | |||
139 | #endif /* !CONFIG_COLDFIRE_SW_A7 */ | ||
140 | |||
124 | .macro SAVE_SWITCH_STACK | 141 | .macro SAVE_SWITCH_STACK |
125 | lea %sp@(-24),%sp /* 6 regs */ | 142 | lea %sp@(-24),%sp /* 6 regs */ |
126 | moveml %a3-%a6/%d6-%d7,%sp@ | 143 | moveml %a3-%a6/%d6-%d7,%sp@ |
@@ -131,14 +148,6 @@ | |||
131 | lea %sp@(24),%sp /* 6 regs */ | 148 | lea %sp@(24),%sp /* 6 regs */ |
132 | .endm | 149 | .endm |
133 | 150 | ||
134 | /* | ||
135 | * Software copy of the user and kernel stack pointers... Ugh... | ||
136 | * Need these to get around ColdFire not having separate kernel | ||
137 | * and user stack pointers. | ||
138 | */ | ||
139 | .globl sw_usp | ||
140 | .globl sw_ksp | ||
141 | |||
142 | #else /* !CONFIG_COLDFIRE */ | 151 | #else /* !CONFIG_COLDFIRE */ |
143 | 152 | ||
144 | /* | 153 | /* |
@@ -167,6 +176,6 @@ | |||
167 | moveml %sp@+,%a3-%a6/%d6-%d7 | 176 | moveml %sp@+,%a3-%a6/%d6-%d7 |
168 | .endm | 177 | .endm |
169 | 178 | ||
170 | #endif /* !CONFIG_COLDFIRE */ | 179 | #endif /* !COLDFIRE_SW_A7 */ |
171 | #endif /* __ASSEMBLY__ */ | 180 | #endif /* __ASSEMBLY__ */ |
172 | #endif /* __M68KNOMMU_ENTRY_H */ | 181 | #endif /* __M68KNOMMU_ENTRY_H */ |
diff --git a/arch/m68k/include/asm/gpio.h b/arch/m68k/include/asm/gpio.h index 1b57adbafad..c64c7b74cf8 100644 --- a/arch/m68k/include/asm/gpio.h +++ b/arch/m68k/include/asm/gpio.h | |||
@@ -37,7 +37,7 @@ | |||
37 | #if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || \ | 37 | #if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || \ |
38 | defined(CONFIG_M520x) || defined(CONFIG_M523x) || \ | 38 | defined(CONFIG_M520x) || defined(CONFIG_M523x) || \ |
39 | defined(CONFIG_M527x) || defined(CONFIG_M528x) || \ | 39 | defined(CONFIG_M527x) || defined(CONFIG_M528x) || \ |
40 | defined(CONFIG_M532x) || defined(CONFIG_M548x) | 40 | defined(CONFIG_M532x) || defined(CONFIG_M54xx) |
41 | 41 | ||
42 | /* These parts have GPIO organized by 8 bit ports */ | 42 | /* These parts have GPIO organized by 8 bit ports */ |
43 | 43 | ||
diff --git a/arch/m68k/include/asm/io_no.h b/arch/m68k/include/asm/io_no.h index 6e2413e518c..cf20f3097af 100644 --- a/arch/m68k/include/asm/io_no.h +++ b/arch/m68k/include/asm/io_no.h | |||
@@ -145,7 +145,6 @@ static inline void io_insl(unsigned int addr, void *buf, int len) | |||
145 | #define IOMAP_WRITETHROUGH 3 | 145 | #define IOMAP_WRITETHROUGH 3 |
146 | 146 | ||
147 | extern void *__ioremap(unsigned long physaddr, unsigned long size, int cacheflag); | 147 | extern void *__ioremap(unsigned long physaddr, unsigned long size, int cacheflag); |
148 | extern void __iounmap(void *addr, unsigned long size); | ||
149 | 148 | ||
150 | static inline void *ioremap(unsigned long physaddr, unsigned long size) | 149 | static inline void *ioremap(unsigned long physaddr, unsigned long size) |
151 | { | 150 | { |
diff --git a/arch/m68k/include/asm/m5206sim.h b/arch/m68k/include/asm/m5206sim.h index 9c384e294af..561b03b5ddf 100644 --- a/arch/m68k/include/asm/m5206sim.h +++ b/arch/m68k/include/asm/m5206sim.h | |||
@@ -12,6 +12,10 @@ | |||
12 | #define m5206sim_h | 12 | #define m5206sim_h |
13 | /****************************************************************************/ | 13 | /****************************************************************************/ |
14 | 14 | ||
15 | #define CPU_NAME "COLDFIRE(m5206)" | ||
16 | #define CPU_INSTR_PER_JIFFY 3 | ||
17 | |||
18 | #include <asm/m52xxacr.h> | ||
15 | 19 | ||
16 | /* | 20 | /* |
17 | * Define the 5206 SIM register set addresses. | 21 | * Define the 5206 SIM register set addresses. |
@@ -88,6 +92,14 @@ | |||
88 | #define MCFSIM_PADDR (MCF_MBAR + 0x1c5) /* Parallel Direction (r/w) */ | 92 | #define MCFSIM_PADDR (MCF_MBAR + 0x1c5) /* Parallel Direction (r/w) */ |
89 | #define MCFSIM_PADAT (MCF_MBAR + 0x1c9) /* Parallel Port Value (r/w) */ | 93 | #define MCFSIM_PADAT (MCF_MBAR + 0x1c9) /* Parallel Port Value (r/w) */ |
90 | 94 | ||
95 | #if defined(CONFIG_NETtel) | ||
96 | #define MCFUART_BASE1 0x180 /* Base address of UART1 */ | ||
97 | #define MCFUART_BASE2 0x140 /* Base address of UART2 */ | ||
98 | #else | ||
99 | #define MCFUART_BASE1 0x140 /* Base address of UART1 */ | ||
100 | #define MCFUART_BASE2 0x180 /* Base address of UART2 */ | ||
101 | #endif | ||
102 | |||
91 | /* | 103 | /* |
92 | * Define system peripheral IRQ usage. | 104 | * Define system peripheral IRQ usage. |
93 | */ | 105 | */ |
@@ -95,7 +107,7 @@ | |||
95 | #define MCF_IRQ_PROFILER 31 /* Timer1, Level 7 */ | 107 | #define MCF_IRQ_PROFILER 31 /* Timer1, Level 7 */ |
96 | 108 | ||
97 | /* | 109 | /* |
98 | * Generic GPIO | 110 | * Generic GPIO |
99 | */ | 111 | */ |
100 | #define MCFGPIO_PIN_MAX 8 | 112 | #define MCFGPIO_PIN_MAX 8 |
101 | #define MCFGPIO_IRQ_VECBASE -1 | 113 | #define MCFGPIO_IRQ_VECBASE -1 |
diff --git a/arch/m68k/include/asm/m520xsim.h b/arch/m68k/include/asm/m520xsim.h index db824a4b136..88ed8239fe4 100644 --- a/arch/m68k/include/asm/m520xsim.h +++ b/arch/m68k/include/asm/m520xsim.h | |||
@@ -11,6 +11,11 @@ | |||
11 | #define m520xsim_h | 11 | #define m520xsim_h |
12 | /****************************************************************************/ | 12 | /****************************************************************************/ |
13 | 13 | ||
14 | #define CPU_NAME "COLDFIRE(m520x)" | ||
15 | #define CPU_INSTR_PER_JIFFY 3 | ||
16 | |||
17 | #include <asm/m52xxacr.h> | ||
18 | |||
14 | /* | 19 | /* |
15 | * Define the 520x SIM register set addresses. | 20 | * Define the 520x SIM register set addresses. |
16 | */ | 21 | */ |
@@ -54,6 +59,9 @@ | |||
54 | #define MCFSIM_SDCS0 0x000a8110 /* SDRAM Chip Select 0 Configuration */ | 59 | #define MCFSIM_SDCS0 0x000a8110 /* SDRAM Chip Select 0 Configuration */ |
55 | #define MCFSIM_SDCS1 0x000a8114 /* SDRAM Chip Select 1 Configuration */ | 60 | #define MCFSIM_SDCS1 0x000a8114 /* SDRAM Chip Select 1 Configuration */ |
56 | 61 | ||
62 | /* | ||
63 | * EPORT and GPIO registers. | ||
64 | */ | ||
57 | #define MCFEPORT_EPDDR 0xFC088002 | 65 | #define MCFEPORT_EPDDR 0xFC088002 |
58 | #define MCFEPORT_EPDR 0xFC088004 | 66 | #define MCFEPORT_EPDR 0xFC088004 |
59 | #define MCFEPORT_EPPDR 0xFC088005 | 67 | #define MCFEPORT_EPPDR 0xFC088005 |
@@ -97,6 +105,7 @@ | |||
97 | #define MCFGPIO_PCLRR_UART 0xFC0A402A | 105 | #define MCFGPIO_PCLRR_UART 0xFC0A402A |
98 | #define MCFGPIO_PCLRR_FECH 0xFC0A402B | 106 | #define MCFGPIO_PCLRR_FECH 0xFC0A402B |
99 | #define MCFGPIO_PCLRR_FECL 0xFC0A402C | 107 | #define MCFGPIO_PCLRR_FECL 0xFC0A402C |
108 | |||
100 | /* | 109 | /* |
101 | * Generic GPIO support | 110 | * Generic GPIO support |
102 | */ | 111 | */ |
@@ -109,7 +118,6 @@ | |||
109 | #define MCFGPIO_PIN_MAX 80 | 118 | #define MCFGPIO_PIN_MAX 80 |
110 | #define MCFGPIO_IRQ_MAX 8 | 119 | #define MCFGPIO_IRQ_MAX 8 |
111 | #define MCFGPIO_IRQ_VECBASE MCFINT_VECBASE | 120 | #define MCFGPIO_IRQ_VECBASE MCFINT_VECBASE |
112 | /****************************************************************************/ | ||
113 | 121 | ||
114 | #define MCF_GPIO_PAR_UART (0xA4036) | 122 | #define MCF_GPIO_PAR_UART (0xA4036) |
115 | #define MCF_GPIO_PAR_FECI2C (0xA4033) | 123 | #define MCF_GPIO_PAR_FECI2C (0xA4033) |
@@ -126,6 +134,13 @@ | |||
126 | #define MCF_GPIO_PAR_FECI2C_PAR_SCL_UTXD2 (0x04) | 134 | #define MCF_GPIO_PAR_FECI2C_PAR_SCL_UTXD2 (0x04) |
127 | 135 | ||
128 | /* | 136 | /* |
137 | * UART module. | ||
138 | */ | ||
139 | #define MCFUART_BASE1 0x60000 /* Base address of UART1 */ | ||
140 | #define MCFUART_BASE2 0x64000 /* Base address of UART2 */ | ||
141 | #define MCFUART_BASE3 0x68000 /* Base address of UART2 */ | ||
142 | |||
143 | /* | ||
129 | * Reset Controll Unit. | 144 | * Reset Controll Unit. |
130 | */ | 145 | */ |
131 | #define MCF_RCR 0xFC0A0000 | 146 | #define MCF_RCR 0xFC0A0000 |
diff --git a/arch/m68k/include/asm/m523xsim.h b/arch/m68k/include/asm/m523xsim.h index e8d06b24a48..4ad7a00257a 100644 --- a/arch/m68k/include/asm/m523xsim.h +++ b/arch/m68k/include/asm/m523xsim.h | |||
@@ -11,6 +11,10 @@ | |||
11 | #define m523xsim_h | 11 | #define m523xsim_h |
12 | /****************************************************************************/ | 12 | /****************************************************************************/ |
13 | 13 | ||
14 | #define CPU_NAME "COLDFIRE(m523x)" | ||
15 | #define CPU_INSTR_PER_JIFFY 3 | ||
16 | |||
17 | #include <asm/m52xxacr.h> | ||
14 | 18 | ||
15 | /* | 19 | /* |
16 | * Define the 523x SIM register set addresses. | 20 | * Define the 523x SIM register set addresses. |
@@ -50,6 +54,13 @@ | |||
50 | #define MCF_RCR_SWRESET 0x80 /* Software reset bit */ | 54 | #define MCF_RCR_SWRESET 0x80 /* Software reset bit */ |
51 | #define MCF_RCR_FRCSTOUT 0x40 /* Force external reset */ | 55 | #define MCF_RCR_FRCSTOUT 0x40 /* Force external reset */ |
52 | 56 | ||
57 | /* | ||
58 | * UART module. | ||
59 | */ | ||
60 | #define MCFUART_BASE1 0x200 /* Base address of UART1 */ | ||
61 | #define MCFUART_BASE2 0x240 /* Base address of UART2 */ | ||
62 | #define MCFUART_BASE3 0x280 /* Base address of UART3 */ | ||
63 | |||
53 | #define MCFGPIO_PODR_ADDR (MCF_IPSBAR + 0x100000) | 64 | #define MCFGPIO_PODR_ADDR (MCF_IPSBAR + 0x100000) |
54 | #define MCFGPIO_PODR_DATAH (MCF_IPSBAR + 0x100001) | 65 | #define MCFGPIO_PODR_DATAH (MCF_IPSBAR + 0x100001) |
55 | #define MCFGPIO_PODR_DATAL (MCF_IPSBAR + 0x100002) | 66 | #define MCFGPIO_PODR_DATAL (MCF_IPSBAR + 0x100002) |
diff --git a/arch/m68k/include/asm/m5249sim.h b/arch/m68k/include/asm/m5249sim.h index 79b7b402f3c..4908b118f2f 100644 --- a/arch/m68k/include/asm/m5249sim.h +++ b/arch/m68k/include/asm/m5249sim.h | |||
@@ -11,6 +11,11 @@ | |||
11 | #define m5249sim_h | 11 | #define m5249sim_h |
12 | /****************************************************************************/ | 12 | /****************************************************************************/ |
13 | 13 | ||
14 | #define CPU_NAME "COLDFIRE(m5249)" | ||
15 | #define CPU_INSTR_PER_JIFFY 3 | ||
16 | |||
17 | #include <asm/m52xxacr.h> | ||
18 | |||
14 | /* | 19 | /* |
15 | * Define the 5249 SIM register set addresses. | 20 | * Define the 5249 SIM register set addresses. |
16 | */ | 21 | */ |
@@ -56,6 +61,11 @@ | |||
56 | #define MCFSIM_DACR1 0x110 /* DRAM 1 Addr and Ctrl (r/w) */ | 61 | #define MCFSIM_DACR1 0x110 /* DRAM 1 Addr and Ctrl (r/w) */ |
57 | #define MCFSIM_DMR1 0x114 /* DRAM 1 Mask reg (r/w) */ | 62 | #define MCFSIM_DMR1 0x114 /* DRAM 1 Mask reg (r/w) */ |
58 | 63 | ||
64 | /* | ||
65 | * UART module. | ||
66 | */ | ||
67 | #define MCFUART_BASE1 0x1c0 /* Base address of UART1 */ | ||
68 | #define MCFUART_BASE2 0x200 /* Base address of UART2 */ | ||
59 | 69 | ||
60 | /* | 70 | /* |
61 | * Some symbol defines for the above... | 71 | * Some symbol defines for the above... |
diff --git a/arch/m68k/include/asm/m5272sim.h b/arch/m68k/include/asm/m5272sim.h index df3332c2317..b7cc50abc83 100644 --- a/arch/m68k/include/asm/m5272sim.h +++ b/arch/m68k/include/asm/m5272sim.h | |||
@@ -12,6 +12,11 @@ | |||
12 | #define m5272sim_h | 12 | #define m5272sim_h |
13 | /****************************************************************************/ | 13 | /****************************************************************************/ |
14 | 14 | ||
15 | #define CPU_NAME "COLDFIRE(m5272)" | ||
16 | #define CPU_INSTR_PER_JIFFY 3 | ||
17 | |||
18 | #include <asm/m52xxacr.h> | ||
19 | |||
15 | /* | 20 | /* |
16 | * Define the 5272 SIM register set addresses. | 21 | * Define the 5272 SIM register set addresses. |
17 | */ | 22 | */ |
@@ -62,6 +67,9 @@ | |||
62 | #define MCFSIM_DCMR1 0x5c /* DRAM 1 Mask reg (r/w) */ | 67 | #define MCFSIM_DCMR1 0x5c /* DRAM 1 Mask reg (r/w) */ |
63 | #define MCFSIM_DCCR1 0x63 /* DRAM 1 Control reg (r/w) */ | 68 | #define MCFSIM_DCCR1 0x63 /* DRAM 1 Control reg (r/w) */ |
64 | 69 | ||
70 | #define MCFUART_BASE1 0x100 /* Base address of UART1 */ | ||
71 | #define MCFUART_BASE2 0x140 /* Base address of UART2 */ | ||
72 | |||
65 | #define MCFSIM_PACNT (MCF_MBAR + 0x80) /* Port A Control (r/w) */ | 73 | #define MCFSIM_PACNT (MCF_MBAR + 0x80) /* Port A Control (r/w) */ |
66 | #define MCFSIM_PADDR (MCF_MBAR + 0x84) /* Port A Direction (r/w) */ | 74 | #define MCFSIM_PADDR (MCF_MBAR + 0x84) /* Port A Direction (r/w) */ |
67 | #define MCFSIM_PADAT (MCF_MBAR + 0x86) /* Port A Data (r/w) */ | 75 | #define MCFSIM_PADAT (MCF_MBAR + 0x86) /* Port A Data (r/w) */ |
diff --git a/arch/m68k/include/asm/m527xsim.h b/arch/m68k/include/asm/m527xsim.h index 1feb46f108c..e8042e8bc00 100644 --- a/arch/m68k/include/asm/m527xsim.h +++ b/arch/m68k/include/asm/m527xsim.h | |||
@@ -11,6 +11,10 @@ | |||
11 | #define m527xsim_h | 11 | #define m527xsim_h |
12 | /****************************************************************************/ | 12 | /****************************************************************************/ |
13 | 13 | ||
14 | #define CPU_NAME "COLDFIRE(m527x)" | ||
15 | #define CPU_INSTR_PER_JIFFY 3 | ||
16 | |||
17 | #include <asm/m52xxacr.h> | ||
14 | 18 | ||
15 | /* | 19 | /* |
16 | * Define the 5270/5271 SIM register set addresses. | 20 | * Define the 5270/5271 SIM register set addresses. |
@@ -55,6 +59,12 @@ | |||
55 | #define MCFSIM_DMR1 0x5c /* SDRAM address mask 1 */ | 59 | #define MCFSIM_DMR1 0x5c /* SDRAM address mask 1 */ |
56 | #endif | 60 | #endif |
57 | 61 | ||
62 | /* | ||
63 | * UART module. | ||
64 | */ | ||
65 | #define MCFUART_BASE1 0x200 /* Base address of UART1 */ | ||
66 | #define MCFUART_BASE2 0x240 /* Base address of UART2 */ | ||
67 | #define MCFUART_BASE3 0x280 /* Base address of UART3 */ | ||
58 | 68 | ||
59 | #ifdef CONFIG_M5271 | 69 | #ifdef CONFIG_M5271 |
60 | #define MCFGPIO_PODR_ADDR (MCF_IPSBAR + 0x100000) | 70 | #define MCFGPIO_PODR_ADDR (MCF_IPSBAR + 0x100000) |
diff --git a/arch/m68k/include/asm/m528xsim.h b/arch/m68k/include/asm/m528xsim.h index 891cbedad97..a6d2f4d9aaa 100644 --- a/arch/m68k/include/asm/m528xsim.h +++ b/arch/m68k/include/asm/m528xsim.h | |||
@@ -11,6 +11,10 @@ | |||
11 | #define m528xsim_h | 11 | #define m528xsim_h |
12 | /****************************************************************************/ | 12 | /****************************************************************************/ |
13 | 13 | ||
14 | #define CPU_NAME "COLDFIRE(m528x)" | ||
15 | #define CPU_INSTR_PER_JIFFY 3 | ||
16 | |||
17 | #include <asm/m52xxacr.h> | ||
14 | 18 | ||
15 | /* | 19 | /* |
16 | * Define the 5280/5282 SIM register set addresses. | 20 | * Define the 5280/5282 SIM register set addresses. |
@@ -42,6 +46,13 @@ | |||
42 | #define MCFSIM_DMR1 0x54 /* SDRAM address mask 1 */ | 46 | #define MCFSIM_DMR1 0x54 /* SDRAM address mask 1 */ |
43 | 47 | ||
44 | /* | 48 | /* |
49 | * UART module. | ||
50 | */ | ||
51 | #define MCFUART_BASE1 0x200 /* Base address of UART1 */ | ||
52 | #define MCFUART_BASE2 0x240 /* Base address of UART2 */ | ||
53 | #define MCFUART_BASE3 0x280 /* Base address of UART3 */ | ||
54 | |||
55 | /* | ||
45 | * GPIO registers | 56 | * GPIO registers |
46 | */ | 57 | */ |
47 | #define MCFGPIO_PORTA (MCF_IPSBAR + 0x00100000) | 58 | #define MCFGPIO_PORTA (MCF_IPSBAR + 0x00100000) |
diff --git a/arch/m68k/include/asm/m52xxacr.h b/arch/m68k/include/asm/m52xxacr.h new file mode 100644 index 00000000000..abc391a9ae8 --- /dev/null +++ b/arch/m68k/include/asm/m52xxacr.h | |||
@@ -0,0 +1,94 @@ | |||
1 | /****************************************************************************/ | ||
2 | |||
3 | /* | ||
4 | * m52xxacr.h -- ColdFire version 2 core cache support | ||
5 | * | ||
6 | * (C) Copyright 2010, Greg Ungerer <gerg@snapgear.com> | ||
7 | */ | ||
8 | |||
9 | /****************************************************************************/ | ||
10 | #ifndef m52xxacr_h | ||
11 | #define m52xxacr_h | ||
12 | /****************************************************************************/ | ||
13 | |||
14 | /* | ||
15 | * All varients of the ColdFire using version 2 cores have a similar | ||
16 | * cache setup. Although not absolutely identical the cache register | ||
17 | * definitions are compatible for all of them. Mostly they support a | ||
18 | * configurable cache memory that can be instruction only, data only, | ||
19 | * or split instruction and data. The exception is the very old version 2 | ||
20 | * core based parts, like the 5206(e), 5249 and 5272, which are instruction | ||
21 | * cache only. Cache size varies from 2k up to 16k. | ||
22 | */ | ||
23 | |||
24 | /* | ||
25 | * Define the Cache Control register flags. | ||
26 | */ | ||
27 | #define CACR_CENB 0x80000000 /* Enable cache */ | ||
28 | #define CACR_CDPI 0x10000000 /* Disable invalidation by CPUSHL */ | ||
29 | #define CACR_CFRZ 0x08000000 /* Cache freeze mode */ | ||
30 | #define CACR_CINV 0x01000000 /* Invalidate cache */ | ||
31 | #define CACR_DISI 0x00800000 /* Disable instruction cache */ | ||
32 | #define CACR_DISD 0x00400000 /* Disable data cache */ | ||
33 | #define CACR_INVI 0x00200000 /* Invalidate instruction cache */ | ||
34 | #define CACR_INVD 0x00100000 /* Invalidate data cache */ | ||
35 | #define CACR_CEIB 0x00000400 /* Non-cachable instruction burst */ | ||
36 | #define CACR_DCM 0x00000200 /* Default cache mode */ | ||
37 | #define CACR_DBWE 0x00000100 /* Buffered write enable */ | ||
38 | #define CACR_DWP 0x00000020 /* Write protection */ | ||
39 | #define CACR_EUSP 0x00000010 /* Enable separate user a7 */ | ||
40 | |||
41 | /* | ||
42 | * Define the Access Control register flags. | ||
43 | */ | ||
44 | #define ACR_BASE_POS 24 /* Address Base (upper 8 bits) */ | ||
45 | #define ACR_MASK_POS 16 /* Address Mask (next 8 bits) */ | ||
46 | #define ACR_ENABLE 0x00008000 /* Enable this ACR */ | ||
47 | #define ACR_USER 0x00000000 /* Allow only user accesses */ | ||
48 | #define ACR_SUPER 0x00002000 /* Allow supervisor access only */ | ||
49 | #define ACR_ANY 0x00004000 /* Allow any access type */ | ||
50 | #define ACR_CENB 0x00000000 /* Caching of region enabled */ | ||
51 | #define ACR_CDIS 0x00000040 /* Caching of region disabled */ | ||
52 | #define ACR_BWE 0x00000020 /* Write buffer enabled */ | ||
53 | #define ACR_WPROTECT 0x00000004 /* Write protect region */ | ||
54 | |||
55 | /* | ||
56 | * Set the cache controller settings we will use. On the cores that support | ||
57 | * a split cache configuration we allow all the combinations at Kconfig | ||
58 | * time. For those cores that only have an instruction cache we just set | ||
59 | * that as on. | ||
60 | */ | ||
61 | #if defined(CONFIG_CACHE_I) | ||
62 | #define CACHE_TYPE (CACR_DISD + CACR_EUSP) | ||
63 | #define CACHE_INVTYPEI 0 | ||
64 | #elif defined(CONFIG_CACHE_D) | ||
65 | #define CACHE_TYPE (CACR_DISI + CACR_EUSP) | ||
66 | #define CACHE_INVTYPED 0 | ||
67 | #elif defined(CONFIG_CACHE_BOTH) | ||
68 | #define CACHE_TYPE CACR_EUSP | ||
69 | #define CACHE_INVTYPEI CACR_INVI | ||
70 | #define CACHE_INVTYPED CACR_INVD | ||
71 | #else | ||
72 | /* This is the instruction cache only devices (no split cache, no eusp) */ | ||
73 | #define CACHE_TYPE 0 | ||
74 | #define CACHE_INVTYPEI 0 | ||
75 | #endif | ||
76 | |||
77 | #define CACHE_INIT (CACR_CINV + CACHE_TYPE) | ||
78 | #define CACHE_MODE (CACR_CENB + CACHE_TYPE + CACR_DCM) | ||
79 | |||
80 | #define CACHE_INVALIDATE (CACHE_MODE + CACR_CINV) | ||
81 | #if defined(CACHE_INVTYPEI) | ||
82 | #define CACHE_INVALIDATEI (CACHE_MODE + CACR_CINV + CACHE_INVTYPEI) | ||
83 | #endif | ||
84 | #if defined(CACHE_INVTYPED) | ||
85 | #define CACHE_INVALIDATED (CACHE_MODE + CACR_CINV + CACHE_INVTYPED) | ||
86 | #endif | ||
87 | |||
88 | #define ACR0_MODE ((CONFIG_RAMBASE & 0xff000000) + \ | ||
89 | (0x000f0000) + \ | ||
90 | (ACR_ENABLE + ACR_ANY + ACR_CENB + ACR_BWE)) | ||
91 | #define ACR1_MODE 0 | ||
92 | |||
93 | /****************************************************************************/ | ||
94 | #endif /* m52xxsim_h */ | ||
diff --git a/arch/m68k/include/asm/m5307sim.h b/arch/m68k/include/asm/m5307sim.h index c6830e5b54c..0bf57397e7a 100644 --- a/arch/m68k/include/asm/m5307sim.h +++ b/arch/m68k/include/asm/m5307sim.h | |||
@@ -14,6 +14,11 @@ | |||
14 | #define m5307sim_h | 14 | #define m5307sim_h |
15 | /****************************************************************************/ | 15 | /****************************************************************************/ |
16 | 16 | ||
17 | #define CPU_NAME "COLDFIRE(m5307)" | ||
18 | #define CPU_INSTR_PER_JIFFY 3 | ||
19 | |||
20 | #include <asm/m53xxacr.h> | ||
21 | |||
17 | /* | 22 | /* |
18 | * Define the 5307 SIM register set addresses. | 23 | * Define the 5307 SIM register set addresses. |
19 | */ | 24 | */ |
@@ -94,6 +99,17 @@ | |||
94 | #define MCFSIM_PADAT (MCF_MBAR + 0x248) | 99 | #define MCFSIM_PADAT (MCF_MBAR + 0x248) |
95 | 100 | ||
96 | /* | 101 | /* |
102 | * UART module. | ||
103 | */ | ||
104 | #if defined(CONFIG_NETtel) || defined(CONFIG_SECUREEDGEMP3) | ||
105 | #define MCFUART_BASE1 0x200 /* Base address of UART1 */ | ||
106 | #define MCFUART_BASE2 0x1c0 /* Base address of UART2 */ | ||
107 | #else | ||
108 | #define MCFUART_BASE1 0x1c0 /* Base address of UART1 */ | ||
109 | #define MCFUART_BASE2 0x200 /* Base address of UART2 */ | ||
110 | #endif | ||
111 | |||
112 | /* | ||
97 | * Generic GPIO support | 113 | * Generic GPIO support |
98 | */ | 114 | */ |
99 | #define MCFGPIO_PIN_MAX 16 | 115 | #define MCFGPIO_PIN_MAX 16 |
@@ -146,32 +162,5 @@ | |||
146 | #define MCF_IRQ_TIMER 30 /* Timer0, Level 6 */ | 162 | #define MCF_IRQ_TIMER 30 /* Timer0, Level 6 */ |
147 | #define MCF_IRQ_PROFILER 31 /* Timer1, Level 7 */ | 163 | #define MCF_IRQ_PROFILER 31 /* Timer1, Level 7 */ |
148 | 164 | ||
149 | /* | ||
150 | * Define the Cache register flags. | ||
151 | */ | ||
152 | #define CACR_EC (1<<31) | ||
153 | #define CACR_ESB (1<<29) | ||
154 | #define CACR_DPI (1<<28) | ||
155 | #define CACR_HLCK (1<<27) | ||
156 | #define CACR_CINVA (1<<24) | ||
157 | #define CACR_DNFB (1<<10) | ||
158 | #define CACR_DCM_WTHRU (0<<8) | ||
159 | #define CACR_DCM_WBACK (1<<8) | ||
160 | #define CACR_DCM_OFF_PRE (2<<8) | ||
161 | #define CACR_DCM_OFF_IMP (3<<8) | ||
162 | #define CACR_DW (1<<5) | ||
163 | |||
164 | #define ACR_BASE_POS 24 | ||
165 | #define ACR_MASK_POS 16 | ||
166 | #define ACR_ENABLE (1<<15) | ||
167 | #define ACR_USER (0<<13) | ||
168 | #define ACR_SUPER (1<<13) | ||
169 | #define ACR_ANY (2<<13) | ||
170 | #define ACR_CM_WTHRU (0<<5) | ||
171 | #define ACR_CM_WBACK (1<<5) | ||
172 | #define ACR_CM_OFF_PRE (2<<5) | ||
173 | #define ACR_CM_OFF_IMP (3<<5) | ||
174 | #define ACR_WPROTECT (1<<2) | ||
175 | |||
176 | /****************************************************************************/ | 165 | /****************************************************************************/ |
177 | #endif /* m5307sim_h */ | 166 | #endif /* m5307sim_h */ |
diff --git a/arch/m68k/include/asm/m532xsim.h b/arch/m68k/include/asm/m532xsim.h index c4bf1c81e3c..e6470f8ca32 100644 --- a/arch/m68k/include/asm/m532xsim.h +++ b/arch/m68k/include/asm/m532xsim.h | |||
@@ -9,6 +9,11 @@ | |||
9 | #define m532xsim_h | 9 | #define m532xsim_h |
10 | /****************************************************************************/ | 10 | /****************************************************************************/ |
11 | 11 | ||
12 | #define CPU_NAME "COLDFIRE(m532x)" | ||
13 | #define CPU_INSTR_PER_JIFFY 3 | ||
14 | |||
15 | #include <asm/m53xxacr.h> | ||
16 | |||
12 | #define MCF_REG32(x) (*(volatile unsigned long *)(x)) | 17 | #define MCF_REG32(x) (*(volatile unsigned long *)(x)) |
13 | #define MCF_REG16(x) (*(volatile unsigned short *)(x)) | 18 | #define MCF_REG16(x) (*(volatile unsigned short *)(x)) |
14 | #define MCF_REG08(x) (*(volatile unsigned char *)(x)) | 19 | #define MCF_REG08(x) (*(volatile unsigned char *)(x)) |
@@ -74,31 +79,11 @@ | |||
74 | #define MCF_IRQ_PROFILER (64 + 33) /* Timer1 */ | 79 | #define MCF_IRQ_PROFILER (64 + 33) /* Timer1 */ |
75 | 80 | ||
76 | /* | 81 | /* |
77 | * Define the Cache register flags. | 82 | * UART module. |
78 | */ | 83 | */ |
79 | #define CACR_EC (1<<31) | 84 | #define MCFUART_BASE1 0xFC060000 /* Base address of UART1 */ |
80 | #define CACR_ESB (1<<29) | 85 | #define MCFUART_BASE2 0xFC064000 /* Base address of UART2 */ |
81 | #define CACR_DPI (1<<28) | 86 | #define MCFUART_BASE3 0xFC068000 /* Base address of UART3 */ |
82 | #define CACR_HLCK (1<<27) | ||
83 | #define CACR_CINVA (1<<24) | ||
84 | #define CACR_DNFB (1<<10) | ||
85 | #define CACR_DCM_WTHRU (0<<8) | ||
86 | #define CACR_DCM_WBACK (1<<8) | ||
87 | #define CACR_DCM_OFF_PRE (2<<8) | ||
88 | #define CACR_DCM_OFF_IMP (3<<8) | ||
89 | #define CACR_DW (1<<5) | ||
90 | |||
91 | #define ACR_BASE_POS 24 | ||
92 | #define ACR_MASK_POS 16 | ||
93 | #define ACR_ENABLE (1<<15) | ||
94 | #define ACR_USER (0<<13) | ||
95 | #define ACR_SUPER (1<<13) | ||
96 | #define ACR_ANY (2<<13) | ||
97 | #define ACR_CM_WTHRU (0<<5) | ||
98 | #define ACR_CM_WBACK (1<<5) | ||
99 | #define ACR_CM_OFF_PRE (2<<5) | ||
100 | #define ACR_CM_OFF_IMP (3<<5) | ||
101 | #define ACR_WPROTECT (1<<2) | ||
102 | 87 | ||
103 | /********************************************************************* | 88 | /********************************************************************* |
104 | * | 89 | * |
diff --git a/arch/m68k/include/asm/m53xxacr.h b/arch/m68k/include/asm/m53xxacr.h new file mode 100644 index 00000000000..cd952b0a8bd --- /dev/null +++ b/arch/m68k/include/asm/m53xxacr.h | |||
@@ -0,0 +1,101 @@ | |||
1 | /****************************************************************************/ | ||
2 | |||
3 | /* | ||
4 | * m53xxacr.h -- ColdFire version 3 core cache support | ||
5 | * | ||
6 | * (C) Copyright 2010, Greg Ungerer <gerg@snapgear.com> | ||
7 | */ | ||
8 | |||
9 | /****************************************************************************/ | ||
10 | #ifndef m53xxacr_h | ||
11 | #define m53xxacr_h | ||
12 | /****************************************************************************/ | ||
13 | |||
14 | /* | ||
15 | * All varients of the ColdFire using version 3 cores have a similar | ||
16 | * cache setup. They have a unified instruction and data cache, with | ||
17 | * configurable write-through or copy-back operation. | ||
18 | */ | ||
19 | |||
20 | /* | ||
21 | * Define the Cache Control register flags. | ||
22 | */ | ||
23 | #define CACR_EC 0x80000000 /* Enable cache */ | ||
24 | #define CACR_ESB 0x20000000 /* Enable store buffer */ | ||
25 | #define CACR_DPI 0x10000000 /* Disable invalidation by CPUSHL */ | ||
26 | #define CACR_HLCK 0x08000000 /* Half cache lock mode */ | ||
27 | #define CACR_CINVA 0x01000000 /* Invalidate cache */ | ||
28 | #define CACR_DNFB 0x00000400 /* Inhibited fill buffer */ | ||
29 | #define CACR_DCM_WT 0x00000000 /* Cacheable write-through */ | ||
30 | #define CACR_DCM_CB 0x00000100 /* Cacheable copy-back */ | ||
31 | #define CACR_DCM_PRE 0x00000200 /* Cache inhibited, precise */ | ||
32 | #define CACR_DCM_IMPRE 0x00000300 /* Cache inhibited, imprecise */ | ||
33 | #define CACR_WPROTECT 0x00000020 /* Write protect*/ | ||
34 | #define CACR_EUSP 0x00000010 /* Eanble separate user a7 */ | ||
35 | |||
36 | /* | ||
37 | * Define the Access Control register flags. | ||
38 | */ | ||
39 | #define ACR_BASE_POS 24 /* Address Base (upper 8 bits) */ | ||
40 | #define ACR_MASK_POS 16 /* Address Mask (next 8 bits) */ | ||
41 | #define ACR_ENABLE 0x00008000 /* Enable this ACR */ | ||
42 | #define ACR_USER 0x00000000 /* Allow only user accesses */ | ||
43 | #define ACR_SUPER 0x00002000 /* Allow supervisor access only */ | ||
44 | #define ACR_ANY 0x00004000 /* Allow any access type */ | ||
45 | #define ACR_CM_WT 0x00000000 /* Cacheable, write-through */ | ||
46 | #define ACR_CM_CB 0x00000020 /* Cacheable, copy-back */ | ||
47 | #define ACR_CM_PRE 0x00000040 /* Cache inhibited, precise */ | ||
48 | #define ACR_CM_IMPRE 0x00000060 /* Cache inhibited, imprecise */ | ||
49 | #define ACR_WPROTECT 0x00000004 /* Write protect region */ | ||
50 | |||
51 | /* | ||
52 | * Define the cache type and arrangement (needed for pushes). | ||
53 | */ | ||
54 | #if defined(CONFIG_M5307) | ||
55 | #define CACHE_SIZE 0x2000 /* 8k of unified cache */ | ||
56 | #define ICACHE_SIZE CACHE_SIZE | ||
57 | #define DCACHE_SIZE CACHE_SIZE | ||
58 | #elif defined(CONFIG_M532x) | ||
59 | #define CACHE_SIZE 0x4000 /* 32k of unified cache */ | ||
60 | #define ICACHE_SIZE CACHE_SIZE | ||
61 | #define DCACHE_SIZE CACHE_SIZE | ||
62 | #endif | ||
63 | |||
64 | #define CACHE_LINE_SIZE 16 /* 16 byte line size */ | ||
65 | #define CACHE_WAYS 4 /* 4 ways - set associative */ | ||
66 | |||
67 | /* | ||
68 | * Set the cache controller settings we will use. This default in the | ||
69 | * CACR is cache inhibited, we use the ACR register to set cacheing | ||
70 | * enabled on the regions we want (eg RAM). | ||
71 | */ | ||
72 | #if defined(CONFIG_CACHE_COPYBACK) | ||
73 | #define CACHE_TYPE ACR_CM_CB | ||
74 | #define CACHE_PUSH | ||
75 | #else | ||
76 | #define CACHE_TYPE ACR_CM_WT | ||
77 | #endif | ||
78 | |||
79 | #ifdef CONFIG_COLDFIRE_SW_A7 | ||
80 | #define CACHE_MODE (CACR_EC + CACR_ESB + CACR_DCM_PRE) | ||
81 | #else | ||
82 | #define CACHE_MODE (CACR_EC + CACR_ESB + CACR_DCM_PRE + CACR_EUSP) | ||
83 | #endif | ||
84 | |||
85 | /* | ||
86 | * Unified cache means we will never need to flush for coherency of | ||
87 | * instruction fetch. We will need to flush to maintain memory/DMA | ||
88 | * coherency though in all cases. And for copyback caches we will need | ||
89 | * to push cached data as well. | ||
90 | */ | ||
91 | #define CACHE_INIT CACR_CINVA | ||
92 | #define CACHE_INVALIDATE CACR_CINVA | ||
93 | #define CACHE_INVALIDATED CACR_CINVA | ||
94 | |||
95 | #define ACR0_MODE ((CONFIG_RAMBASE & 0xff000000) + \ | ||
96 | (0x000f0000) + \ | ||
97 | (ACR_ENABLE + ACR_ANY + CACHE_TYPE)) | ||
98 | #define ACR1_MODE 0 | ||
99 | |||
100 | /****************************************************************************/ | ||
101 | #endif /* m53xxsim_h */ | ||
diff --git a/arch/m68k/include/asm/m5407sim.h b/arch/m68k/include/asm/m5407sim.h index c399abbf953..75f5c28a551 100644 --- a/arch/m68k/include/asm/m5407sim.h +++ b/arch/m68k/include/asm/m5407sim.h | |||
@@ -14,6 +14,11 @@ | |||
14 | #define m5407sim_h | 14 | #define m5407sim_h |
15 | /****************************************************************************/ | 15 | /****************************************************************************/ |
16 | 16 | ||
17 | #define CPU_NAME "COLDFIRE(m5407)" | ||
18 | #define CPU_INSTR_PER_JIFFY 3 | ||
19 | |||
20 | #include <asm/m54xxacr.h> | ||
21 | |||
17 | /* | 22 | /* |
18 | * Define the 5407 SIM register set addresses. | 23 | * Define the 5407 SIM register set addresses. |
19 | */ | 24 | */ |
@@ -73,6 +78,9 @@ | |||
73 | #define MCFSIM_DACR1 0x110 /* DRAM 1 Addr and Ctrl (r/w) */ | 78 | #define MCFSIM_DACR1 0x110 /* DRAM 1 Addr and Ctrl (r/w) */ |
74 | #define MCFSIM_DMR1 0x114 /* DRAM 1 Mask reg (r/w) */ | 79 | #define MCFSIM_DMR1 0x114 /* DRAM 1 Mask reg (r/w) */ |
75 | 80 | ||
81 | #define MCFUART_BASE1 0x1c0 /* Base address of UART1 */ | ||
82 | #define MCFUART_BASE2 0x200 /* Base address of UART2 */ | ||
83 | |||
76 | #define MCFSIM_PADDR (MCF_MBAR + 0x244) | 84 | #define MCFSIM_PADDR (MCF_MBAR + 0x244) |
77 | #define MCFSIM_PADAT (MCF_MBAR + 0x248) | 85 | #define MCFSIM_PADAT (MCF_MBAR + 0x248) |
78 | 86 | ||
@@ -117,39 +125,5 @@ | |||
117 | #define MCF_IRQ_TIMER 30 /* Timer0, Level 6 */ | 125 | #define MCF_IRQ_TIMER 30 /* Timer0, Level 6 */ |
118 | #define MCF_IRQ_PROFILER 31 /* Timer1, Level 7 */ | 126 | #define MCF_IRQ_PROFILER 31 /* Timer1, Level 7 */ |
119 | 127 | ||
120 | /* | ||
121 | * Define the Cache register flags. | ||
122 | */ | ||
123 | #define CACR_DEC 0x80000000 /* Enable data cache */ | ||
124 | #define CACR_DWP 0x40000000 /* Data write protection */ | ||
125 | #define CACR_DESB 0x20000000 /* Enable data store buffer */ | ||
126 | #define CACR_DDPI 0x10000000 /* Disable CPUSHL */ | ||
127 | #define CACR_DHCLK 0x08000000 /* Half data cache lock mode */ | ||
128 | #define CACR_DDCM_WT 0x00000000 /* Write through cache*/ | ||
129 | #define CACR_DDCM_CP 0x02000000 /* Copyback cache */ | ||
130 | #define CACR_DDCM_P 0x04000000 /* No cache, precise */ | ||
131 | #define CACR_DDCM_IMP 0x06000000 /* No cache, imprecise */ | ||
132 | #define CACR_DCINVA 0x01000000 /* Invalidate data cache */ | ||
133 | #define CACR_BEC 0x00080000 /* Enable branch cache */ | ||
134 | #define CACR_BCINVA 0x00040000 /* Invalidate branch cache */ | ||
135 | #define CACR_IEC 0x00008000 /* Enable instruction cache */ | ||
136 | #define CACR_DNFB 0x00002000 /* Inhibited fill buffer */ | ||
137 | #define CACR_IDPI 0x00001000 /* Disable CPUSHL */ | ||
138 | #define CACR_IHLCK 0x00000800 /* Intruction cache half lock */ | ||
139 | #define CACR_IDCM 0x00000400 /* Intruction cache inhibit */ | ||
140 | #define CACR_ICINVA 0x00000100 /* Invalidate instr cache */ | ||
141 | |||
142 | #define ACR_BASE_POS 24 /* Address Base */ | ||
143 | #define ACR_MASK_POS 16 /* Address Mask */ | ||
144 | #define ACR_ENABLE 0x00008000 /* Enable address */ | ||
145 | #define ACR_USER 0x00000000 /* User mode access only */ | ||
146 | #define ACR_SUPER 0x00002000 /* Supervisor mode only */ | ||
147 | #define ACR_ANY 0x00004000 /* Match any access mode */ | ||
148 | #define ACR_CM_WT 0x00000000 /* Write through mode */ | ||
149 | #define ACR_CM_CP 0x00000020 /* Copyback mode */ | ||
150 | #define ACR_CM_OFF_PRE 0x00000040 /* No cache, precise */ | ||
151 | #define ACR_CM_OFF_IMP 0x00000060 /* No cache, imprecise */ | ||
152 | #define ACR_WPROTECT 0x00000004 /* Write protect */ | ||
153 | |||
154 | /****************************************************************************/ | 128 | /****************************************************************************/ |
155 | #endif /* m5407sim_h */ | 129 | #endif /* m5407sim_h */ |
diff --git a/arch/m68k/include/asm/m54xxacr.h b/arch/m68k/include/asm/m54xxacr.h new file mode 100644 index 00000000000..16a1835f9b2 --- /dev/null +++ b/arch/m68k/include/asm/m54xxacr.h | |||
@@ -0,0 +1,97 @@ | |||
1 | /* | ||
2 | * Bit definitions for the MCF54xx ACR and CACR registers. | ||
3 | */ | ||
4 | |||
5 | #ifndef m54xxacr_h | ||
6 | #define m54xxacr_h | ||
7 | |||
8 | /* | ||
9 | * Define the Cache register flags. | ||
10 | */ | ||
11 | #define CACR_DEC 0x80000000 /* Enable data cache */ | ||
12 | #define CACR_DWP 0x40000000 /* Data write protection */ | ||
13 | #define CACR_DESB 0x20000000 /* Enable data store buffer */ | ||
14 | #define CACR_DDPI 0x10000000 /* Disable invalidation by CPUSHL */ | ||
15 | #define CACR_DHCLK 0x08000000 /* Half data cache lock mode */ | ||
16 | #define CACR_DDCM_WT 0x00000000 /* Write through cache*/ | ||
17 | #define CACR_DDCM_CP 0x02000000 /* Copyback cache */ | ||
18 | #define CACR_DDCM_P 0x04000000 /* No cache, precise */ | ||
19 | #define CACR_DDCM_IMP 0x06000000 /* No cache, imprecise */ | ||
20 | #define CACR_DCINVA 0x01000000 /* Invalidate data cache */ | ||
21 | #define CACR_BEC 0x00080000 /* Enable branch cache */ | ||
22 | #define CACR_BCINVA 0x00040000 /* Invalidate branch cache */ | ||
23 | #define CACR_IEC 0x00008000 /* Enable instruction cache */ | ||
24 | #define CACR_DNFB 0x00002000 /* Inhibited fill buffer */ | ||
25 | #define CACR_IDPI 0x00001000 /* Disable CPUSHL */ | ||
26 | #define CACR_IHLCK 0x00000800 /* Intruction cache half lock */ | ||
27 | #define CACR_IDCM 0x00000400 /* Intruction cache inhibit */ | ||
28 | #define CACR_ICINVA 0x00000100 /* Invalidate instr cache */ | ||
29 | #define CACR_EUSP 0x00000020 /* Enable separate user a7 */ | ||
30 | |||
31 | #define ACR_BASE_POS 24 /* Address Base */ | ||
32 | #define ACR_MASK_POS 16 /* Address Mask */ | ||
33 | #define ACR_ENABLE 0x00008000 /* Enable address */ | ||
34 | #define ACR_USER 0x00000000 /* User mode access only */ | ||
35 | #define ACR_SUPER 0x00002000 /* Supervisor mode only */ | ||
36 | #define ACR_ANY 0x00004000 /* Match any access mode */ | ||
37 | #define ACR_CM_WT 0x00000000 /* Write through mode */ | ||
38 | #define ACR_CM_CP 0x00000020 /* Copyback mode */ | ||
39 | #define ACR_CM_OFF_PRE 0x00000040 /* No cache, precise */ | ||
40 | #define ACR_CM_OFF_IMP 0x00000060 /* No cache, imprecise */ | ||
41 | #define ACR_CM 0x00000060 /* Cache mode mask */ | ||
42 | #define ACR_WPROTECT 0x00000004 /* Write protect */ | ||
43 | |||
44 | #if defined(CONFIG_M5407) | ||
45 | |||
46 | #define ICACHE_SIZE 0x4000 /* instruction - 16k */ | ||
47 | #define DCACHE_SIZE 0x2000 /* data - 8k */ | ||
48 | |||
49 | #elif defined(CONFIG_M54xx) | ||
50 | |||
51 | #define ICACHE_SIZE 0x8000 /* instruction - 32k */ | ||
52 | #define DCACHE_SIZE 0x8000 /* data - 32k */ | ||
53 | |||
54 | #endif | ||
55 | |||
56 | #define CACHE_LINE_SIZE 0x0010 /* 16 bytes */ | ||
57 | #define CACHE_WAYS 4 /* 4 ways */ | ||
58 | |||
59 | /* | ||
60 | * Version 4 cores have a true harvard style separate instruction | ||
61 | * and data cache. Enable data and instruction caches, also enable write | ||
62 | * buffers and branch accelerator. | ||
63 | */ | ||
64 | /* attention : enabling CACR_DESB requires a "nop" to flush the store buffer */ | ||
65 | /* use '+' instead of '|' for assembler's sake */ | ||
66 | |||
67 | /* Enable data cache */ | ||
68 | /* Enable data store buffer */ | ||
69 | /* outside ACRs : No cache, precise */ | ||
70 | /* Enable instruction+branch caches */ | ||
71 | #if defined(CONFIG_M5407) | ||
72 | #define CACHE_MODE (CACR_DEC+CACR_DESB+CACR_DDCM_P+CACR_BEC+CACR_IEC) | ||
73 | #else | ||
74 | #define CACHE_MODE (CACR_DEC+CACR_DESB+CACR_DDCM_P+CACR_BEC+CACR_IEC+CACR_EUSP) | ||
75 | #endif | ||
76 | #if defined(CONFIG_CACHE_COPYBACK) | ||
77 | #define DATA_CACHE_MODE (ACR_ENABLE+ACR_ANY+ACR_CM_CP) | ||
78 | #else | ||
79 | #define DATA_CACHE_MODE (ACR_ENABLE+ACR_ANY+ACR_CM_WT) | ||
80 | #endif | ||
81 | #define INSN_CACHE_MODE (ACR_ENABLE+ACR_ANY) | ||
82 | |||
83 | #define CACHE_INIT (CACR_DCINVA+CACR_BCINVA+CACR_ICINVA) | ||
84 | #define CACHE_INVALIDATE (CACHE_MODE+CACR_DCINVA+CACR_BCINVA+CACR_ICINVA) | ||
85 | #define CACHE_INVALIDATEI (CACHE_MODE+CACR_BCINVA+CACR_ICINVA) | ||
86 | #define CACHE_INVALIDATED (CACHE_MODE+CACR_DCINVA) | ||
87 | #define ACR0_MODE (0x000f0000+DATA_CACHE_MODE) | ||
88 | #define ACR1_MODE 0 | ||
89 | #define ACR2_MODE (0x000f0000+INSN_CACHE_MODE) | ||
90 | #define ACR3_MODE 0 | ||
91 | |||
92 | #if ((DATA_CACHE_MODE & ACR_CM) == ACR_CM_CP) | ||
93 | /* Copyback cache mode must push dirty cache lines first */ | ||
94 | #define CACHE_PUSH | ||
95 | #endif | ||
96 | |||
97 | #endif /* m54xxacr_h */ | ||
diff --git a/arch/m68k/include/asm/m548xgpt.h b/arch/m68k/include/asm/m54xxgpt.h index 33b2eef90f0..df75dd87ae7 100644 --- a/arch/m68k/include/asm/m548xgpt.h +++ b/arch/m68k/include/asm/m54xxgpt.h | |||
@@ -1,13 +1,13 @@ | |||
1 | /* | 1 | /* |
2 | * File: m548xgpt.h | 2 | * File: m54xxgpt.h |
3 | * Purpose: Register and bit definitions for the MCF548X | 3 | * Purpose: Register and bit definitions for the MCF54XX |
4 | * | 4 | * |
5 | * Notes: | 5 | * Notes: |
6 | * | 6 | * |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #ifndef m548xgpt_h | 9 | #ifndef m54xxgpt_h |
10 | #define m548xgpt_h | 10 | #define m54xxgpt_h |
11 | 11 | ||
12 | /********************************************************************* | 12 | /********************************************************************* |
13 | * | 13 | * |
@@ -87,4 +87,4 @@ | |||
87 | 87 | ||
88 | /********************************************************************/ | 88 | /********************************************************************/ |
89 | 89 | ||
90 | #endif /* m548xgpt_h */ | 90 | #endif /* m54xxgpt_h */ |
diff --git a/arch/m68k/include/asm/m548xsim.h b/arch/m68k/include/asm/m54xxsim.h index 149135ef30d..462ae532844 100644 --- a/arch/m68k/include/asm/m548xsim.h +++ b/arch/m68k/include/asm/m54xxsim.h | |||
@@ -1,11 +1,16 @@ | |||
1 | /* | 1 | /* |
2 | * m548xsim.h -- ColdFire 547x/548x System Integration Unit support. | 2 | * m54xxsim.h -- ColdFire 547x/548x System Integration Unit support. |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #ifndef m548xsim_h | 5 | #ifndef m54xxsim_h |
6 | #define m548xsim_h | 6 | #define m54xxsim_h |
7 | 7 | ||
8 | #define MCFINT_VECBASE 64 | 8 | #define CPU_NAME "COLDFIRE(m54xx)" |
9 | #define CPU_INSTR_PER_JIFFY 2 | ||
10 | |||
11 | #include <asm/m54xxacr.h> | ||
12 | |||
13 | #define MCFINT_VECBASE 64 | ||
9 | 14 | ||
10 | /* | 15 | /* |
11 | * Interrupt Controller Registers | 16 | * Interrupt Controller Registers |
@@ -22,6 +27,14 @@ | |||
22 | #define MCFINTC_ICR0 0x40 /* Base ICR register */ | 27 | #define MCFINTC_ICR0 0x40 /* Base ICR register */ |
23 | 28 | ||
24 | /* | 29 | /* |
30 | * UART module. | ||
31 | */ | ||
32 | #define MCFUART_BASE1 0x8600 /* Base address of UART1 */ | ||
33 | #define MCFUART_BASE2 0x8700 /* Base address of UART2 */ | ||
34 | #define MCFUART_BASE3 0x8800 /* Base address of UART3 */ | ||
35 | #define MCFUART_BASE4 0x8900 /* Base address of UART4 */ | ||
36 | |||
37 | /* | ||
25 | * Define system peripheral IRQ usage. | 38 | * Define system peripheral IRQ usage. |
26 | */ | 39 | */ |
27 | #define MCF_IRQ_TIMER (64 + 54) /* Slice Timer 0 */ | 40 | #define MCF_IRQ_TIMER (64 + 54) /* Slice Timer 0 */ |
@@ -52,4 +65,4 @@ | |||
52 | #define MCF_PAR_PSC_RTS_RTS (0x30) | 65 | #define MCF_PAR_PSC_RTS_RTS (0x30) |
53 | #define MCF_PAR_PSC_CANRX (0x40) | 66 | #define MCF_PAR_PSC_CANRX (0x40) |
54 | 67 | ||
55 | #endif /* m548xsim_h */ | 68 | #endif /* m54xxsim_h */ |
diff --git a/arch/m68k/include/asm/mcfcache.h b/arch/m68k/include/asm/mcfcache.h deleted file mode 100644 index f49dfc09f70..00000000000 --- a/arch/m68k/include/asm/mcfcache.h +++ /dev/null | |||
@@ -1,150 +0,0 @@ | |||
1 | /****************************************************************************/ | ||
2 | |||
3 | /* | ||
4 | * mcfcache.h -- ColdFire CPU cache support code | ||
5 | * | ||
6 | * (C) Copyright 2004, Greg Ungerer <gerg@snapgear.com> | ||
7 | */ | ||
8 | |||
9 | /****************************************************************************/ | ||
10 | #ifndef __M68KNOMMU_MCFCACHE_H | ||
11 | #define __M68KNOMMU_MCFCACHE_H | ||
12 | /****************************************************************************/ | ||
13 | |||
14 | |||
15 | /* | ||
16 | * The different ColdFire families have different cache arrangments. | ||
17 | * Everything from a small instruction only cache, to configurable | ||
18 | * data and/or instruction cache, to unified instruction/data, to | ||
19 | * harvard style separate instruction and data caches. | ||
20 | */ | ||
21 | |||
22 | #if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || defined(CONFIG_M5272) | ||
23 | /* | ||
24 | * Simple version 2 core cache. These have instruction cache only, | ||
25 | * we just need to invalidate it and enable it. | ||
26 | */ | ||
27 | .macro CACHE_ENABLE | ||
28 | movel #0x01000000,%d0 /* invalidate cache cmd */ | ||
29 | movec %d0,%CACR /* do invalidate cache */ | ||
30 | movel #0x80000100,%d0 /* setup cache mask */ | ||
31 | movec %d0,%CACR /* enable cache */ | ||
32 | .endm | ||
33 | #endif /* CONFIG_M5206 || CONFIG_M5206e || CONFIG_M5272 */ | ||
34 | |||
35 | #if defined(CONFIG_M523x) || defined(CONFIG_M527x) | ||
36 | /* | ||
37 | * New version 2 cores have a configurable split cache arrangement. | ||
38 | * For now I am just enabling instruction cache - but ultimately I | ||
39 | * think a split instruction/data cache would be better. | ||
40 | */ | ||
41 | .macro CACHE_ENABLE | ||
42 | movel #0x01400000,%d0 | ||
43 | movec %d0,%CACR /* invalidate cache */ | ||
44 | nop | ||
45 | movel #0x0000c000,%d0 /* set SDRAM cached only */ | ||
46 | movec %d0,%ACR0 | ||
47 | movel #0x00000000,%d0 /* no other regions cached */ | ||
48 | movec %d0,%ACR1 | ||
49 | movel #0x80400100,%d0 /* configure cache */ | ||
50 | movec %d0,%CACR /* enable cache */ | ||
51 | nop | ||
52 | .endm | ||
53 | #endif /* CONFIG_M523x || CONFIG_M527x */ | ||
54 | |||
55 | #if defined(CONFIG_M528x) | ||
56 | .macro CACHE_ENABLE | ||
57 | nop | ||
58 | movel #0x01000000, %d0 | ||
59 | movec %d0, %CACR /* Invalidate cache */ | ||
60 | nop | ||
61 | movel #0x0000c020, %d0 /* Set SDRAM cached only */ | ||
62 | movec %d0, %ACR0 | ||
63 | movel #0x00000000, %d0 /* No other regions cached */ | ||
64 | movec %d0, %ACR1 | ||
65 | movel #0x80000200, %d0 /* Setup cache mask */ | ||
66 | movec %d0, %CACR /* Enable cache */ | ||
67 | nop | ||
68 | .endm | ||
69 | #endif /* CONFIG_M528x */ | ||
70 | |||
71 | #if defined(CONFIG_M5249) || defined(CONFIG_M5307) | ||
72 | /* | ||
73 | * The version 3 core cache. Oddly enough the version 2 core 5249 | ||
74 | * has the same SDRAM and cache setup as the version 3 cores. | ||
75 | * This is a single unified instruction/data cache. | ||
76 | */ | ||
77 | .macro CACHE_ENABLE | ||
78 | movel #0x01000000,%d0 /* invalidate whole cache */ | ||
79 | movec %d0,%CACR | ||
80 | nop | ||
81 | #if defined(DEBUGGER_COMPATIBLE_CACHE) || defined(CONFIG_SECUREEDGEMP3) | ||
82 | movel #0x0000c000,%d0 /* set SDRAM cached (write-thru) */ | ||
83 | #else | ||
84 | movel #0x0000c020,%d0 /* set SDRAM cached (copyback) */ | ||
85 | #endif | ||
86 | movec %d0,%ACR0 | ||
87 | movel #0x00000000,%d0 /* no other regions cached */ | ||
88 | movec %d0,%ACR1 | ||
89 | movel #0xa0000200,%d0 /* enable cache */ | ||
90 | movec %d0,%CACR | ||
91 | nop | ||
92 | .endm | ||
93 | #endif /* CONFIG_M5249 || CONFIG_M5307 */ | ||
94 | |||
95 | #if defined(CONFIG_M532x) | ||
96 | .macro CACHE_ENABLE | ||
97 | movel #0x01000000,%d0 /* invalidate cache cmd */ | ||
98 | movec %d0,%CACR /* do invalidate cache */ | ||
99 | nop | ||
100 | movel #0x4001C000,%d0 /* set SDRAM cached (write-thru) */ | ||
101 | movec %d0,%ACR0 | ||
102 | movel #0x00000000,%d0 /* no other regions cached */ | ||
103 | movec %d0,%ACR1 | ||
104 | movel #0x80000200,%d0 /* setup cache mask */ | ||
105 | movec %d0,%CACR /* enable cache */ | ||
106 | nop | ||
107 | .endm | ||
108 | #endif /* CONFIG_M532x */ | ||
109 | |||
110 | #if defined(CONFIG_M5407) || defined(CONFIG_M548x) | ||
111 | /* | ||
112 | * Version 4 cores have a true harvard style separate instruction | ||
113 | * and data cache. Invalidate and enable cache, also enable write | ||
114 | * buffers and branch accelerator. | ||
115 | */ | ||
116 | .macro CACHE_ENABLE | ||
117 | movel #0x01040100,%d0 /* invalidate whole cache */ | ||
118 | movec %d0,%CACR | ||
119 | nop | ||
120 | movel #0x000fc000,%d0 /* set SDRAM cached only */ | ||
121 | movec %d0, %ACR0 | ||
122 | movel #0x00000000,%d0 /* no other regions cached */ | ||
123 | movec %d0, %ACR1 | ||
124 | movel #0x000fc000,%d0 /* set SDRAM cached only */ | ||
125 | movec %d0, %ACR2 | ||
126 | movel #0x00000000,%d0 /* no other regions cached */ | ||
127 | movec %d0, %ACR3 | ||
128 | movel #0xb6088400,%d0 /* enable caches */ | ||
129 | movec %d0,%CACR | ||
130 | nop | ||
131 | .endm | ||
132 | #endif /* CONFIG_M5407 */ | ||
133 | |||
134 | #if defined(CONFIG_M520x) | ||
135 | .macro CACHE_ENABLE | ||
136 | move.l #0x01000000,%d0 /* invalidate whole cache */ | ||
137 | movec %d0,%CACR | ||
138 | nop | ||
139 | move.l #0x0000c000,%d0 /* set SDRAM cached (write-thru) */ | ||
140 | movec %d0,%ACR0 | ||
141 | move.l #0x00000000,%d0 /* no other regions cached */ | ||
142 | movec %d0,%ACR1 | ||
143 | move.l #0x80400000,%d0 /* enable 8K instruction cache */ | ||
144 | movec %d0,%CACR | ||
145 | nop | ||
146 | .endm | ||
147 | #endif /* CONFIG_M520x */ | ||
148 | |||
149 | /****************************************************************************/ | ||
150 | #endif /* __M68KNOMMU_MCFCACHE_H */ | ||
diff --git a/arch/m68k/include/asm/mcfsim.h b/arch/m68k/include/asm/mcfsim.h index 6901fd68165..ebd0304054a 100644 --- a/arch/m68k/include/asm/mcfsim.h +++ b/arch/m68k/include/asm/mcfsim.h | |||
@@ -41,8 +41,8 @@ | |||
41 | #elif defined(CONFIG_M5407) | 41 | #elif defined(CONFIG_M5407) |
42 | #include <asm/m5407sim.h> | 42 | #include <asm/m5407sim.h> |
43 | #include <asm/mcfintc.h> | 43 | #include <asm/mcfintc.h> |
44 | #elif defined(CONFIG_M548x) | 44 | #elif defined(CONFIG_M54xx) |
45 | #include <asm/m548xsim.h> | 45 | #include <asm/m54xxsim.h> |
46 | #endif | 46 | #endif |
47 | 47 | ||
48 | /****************************************************************************/ | 48 | /****************************************************************************/ |
diff --git a/arch/m68k/include/asm/mcfuart.h b/arch/m68k/include/asm/mcfuart.h index db72e2b889c..2abedff0a69 100644 --- a/arch/m68k/include/asm/mcfuart.h +++ b/arch/m68k/include/asm/mcfuart.h | |||
@@ -12,49 +12,6 @@ | |||
12 | #define mcfuart_h | 12 | #define mcfuart_h |
13 | /****************************************************************************/ | 13 | /****************************************************************************/ |
14 | 14 | ||
15 | /* | ||
16 | * Define the base address of the UARTS within the MBAR address | ||
17 | * space. | ||
18 | */ | ||
19 | #if defined(CONFIG_M5272) | ||
20 | #define MCFUART_BASE1 0x100 /* Base address of UART1 */ | ||
21 | #define MCFUART_BASE2 0x140 /* Base address of UART2 */ | ||
22 | #elif defined(CONFIG_M5206) || defined(CONFIG_M5206e) | ||
23 | #if defined(CONFIG_NETtel) | ||
24 | #define MCFUART_BASE1 0x180 /* Base address of UART1 */ | ||
25 | #define MCFUART_BASE2 0x140 /* Base address of UART2 */ | ||
26 | #else | ||
27 | #define MCFUART_BASE1 0x140 /* Base address of UART1 */ | ||
28 | #define MCFUART_BASE2 0x180 /* Base address of UART2 */ | ||
29 | #endif | ||
30 | #elif defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x) | ||
31 | #define MCFUART_BASE1 0x200 /* Base address of UART1 */ | ||
32 | #define MCFUART_BASE2 0x240 /* Base address of UART2 */ | ||
33 | #define MCFUART_BASE3 0x280 /* Base address of UART3 */ | ||
34 | #elif defined(CONFIG_M5249) || defined(CONFIG_M5307) || defined(CONFIG_M5407) | ||
35 | #if defined(CONFIG_NETtel) || defined(CONFIG_SECUREEDGEMP3) | ||
36 | #define MCFUART_BASE1 0x200 /* Base address of UART1 */ | ||
37 | #define MCFUART_BASE2 0x1c0 /* Base address of UART2 */ | ||
38 | #else | ||
39 | #define MCFUART_BASE1 0x1c0 /* Base address of UART1 */ | ||
40 | #define MCFUART_BASE2 0x200 /* Base address of UART2 */ | ||
41 | #endif | ||
42 | #elif defined(CONFIG_M520x) | ||
43 | #define MCFUART_BASE1 0x60000 /* Base address of UART1 */ | ||
44 | #define MCFUART_BASE2 0x64000 /* Base address of UART2 */ | ||
45 | #define MCFUART_BASE3 0x68000 /* Base address of UART2 */ | ||
46 | #elif defined(CONFIG_M532x) | ||
47 | #define MCFUART_BASE1 0xfc060000 /* Base address of UART1 */ | ||
48 | #define MCFUART_BASE2 0xfc064000 /* Base address of UART2 */ | ||
49 | #define MCFUART_BASE3 0xfc068000 /* Base address of UART3 */ | ||
50 | #elif defined(CONFIG_M548x) | ||
51 | #define MCFUART_BASE1 0x8600 /* on M548x */ | ||
52 | #define MCFUART_BASE2 0x8700 /* on M548x */ | ||
53 | #define MCFUART_BASE3 0x8800 /* on M548x */ | ||
54 | #define MCFUART_BASE4 0x8900 /* on M548x */ | ||
55 | #endif | ||
56 | |||
57 | |||
58 | #include <linux/serial_core.h> | 15 | #include <linux/serial_core.h> |
59 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
60 | 17 | ||
@@ -217,7 +174,7 @@ struct mcf_platform_uart { | |||
217 | #define MCFUART_URF_RXS 0xc0 /* Receiver status */ | 174 | #define MCFUART_URF_RXS 0xc0 /* Receiver status */ |
218 | #endif | 175 | #endif |
219 | 176 | ||
220 | #if defined(CONFIG_M548x) | 177 | #if defined(CONFIG_M54xx) |
221 | #define MCFUART_TXFIFOSIZE 512 | 178 | #define MCFUART_TXFIFOSIZE 512 |
222 | #elif defined(CONFIG_M5272) | 179 | #elif defined(CONFIG_M5272) |
223 | #define MCFUART_TXFIFOSIZE 25 | 180 | #define MCFUART_TXFIFOSIZE 25 |
diff --git a/arch/m68k/include/asm/processor.h b/arch/m68k/include/asm/processor.h index 7a6a7590cc0..278c69bad57 100644 --- a/arch/m68k/include/asm/processor.h +++ b/arch/m68k/include/asm/processor.h | |||
@@ -20,23 +20,26 @@ | |||
20 | 20 | ||
21 | static inline unsigned long rdusp(void) | 21 | static inline unsigned long rdusp(void) |
22 | { | 22 | { |
23 | #ifdef CONFIG_COLDFIRE | 23 | #ifdef CONFIG_COLDFIRE_SW_A7 |
24 | extern unsigned int sw_usp; | 24 | extern unsigned int sw_usp; |
25 | return sw_usp; | 25 | return sw_usp; |
26 | #else | 26 | #else |
27 | unsigned long usp; | 27 | register unsigned long usp __asm__("a0"); |
28 | __asm__ __volatile__("move %/usp,%0" : "=a" (usp)); | 28 | /* move %usp,%a0 */ |
29 | __asm__ __volatile__(".word 0x4e68" : "=a" (usp)); | ||
29 | return usp; | 30 | return usp; |
30 | #endif | 31 | #endif |
31 | } | 32 | } |
32 | 33 | ||
33 | static inline void wrusp(unsigned long usp) | 34 | static inline void wrusp(unsigned long usp) |
34 | { | 35 | { |
35 | #ifdef CONFIG_COLDFIRE | 36 | #ifdef CONFIG_COLDFIRE_SW_A7 |
36 | extern unsigned int sw_usp; | 37 | extern unsigned int sw_usp; |
37 | sw_usp = usp; | 38 | sw_usp = usp; |
38 | #else | 39 | #else |
39 | __asm__ __volatile__("move %0,%/usp" : : "a" (usp)); | 40 | register unsigned long a0 __asm__("a0") = usp; |
41 | /* move %a0,%usp */ | ||
42 | __asm__ __volatile__(".word 0x4e60" : : "a" (a0) ); | ||
40 | #endif | 43 | #endif |
41 | } | 44 | } |
42 | 45 | ||
diff --git a/arch/m68k/include/asm/string.h b/arch/m68k/include/asm/string.h index 2936dda938d..65b13128283 100644 --- a/arch/m68k/include/asm/string.h +++ b/arch/m68k/include/asm/string.h | |||
@@ -81,18 +81,6 @@ static inline char *strncpy(char *dest, const char *src, size_t n) | |||
81 | strcpy(__d + strlen(__d), (s)); \ | 81 | strcpy(__d + strlen(__d), (s)); \ |
82 | }) | 82 | }) |
83 | 83 | ||
84 | #define __HAVE_ARCH_STRCHR | ||
85 | static inline char *strchr(const char *s, int c) | ||
86 | { | ||
87 | char sc, ch = c; | ||
88 | |||
89 | for (; (sc = *s++) != ch; ) { | ||
90 | if (!sc) | ||
91 | return NULL; | ||
92 | } | ||
93 | return (char *)s - 1; | ||
94 | } | ||
95 | |||
96 | #ifndef CONFIG_COLDFIRE | 84 | #ifndef CONFIG_COLDFIRE |
97 | #define __HAVE_ARCH_STRCMP | 85 | #define __HAVE_ARCH_STRCMP |
98 | static inline int strcmp(const char *cs, const char *ct) | 86 | static inline int strcmp(const char *cs, const char *ct) |
diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig index fa9f746cf4a..8b9dacaa0f6 100644 --- a/arch/m68knommu/Kconfig +++ b/arch/m68knommu/Kconfig | |||
@@ -2,6 +2,7 @@ config M68K | |||
2 | bool | 2 | bool |
3 | default y | 3 | default y |
4 | select HAVE_IDE | 4 | select HAVE_IDE |
5 | select HAVE_GENERIC_HARDIRQS | ||
5 | 6 | ||
6 | config MMU | 7 | config MMU |
7 | bool | 8 | bool |
@@ -48,14 +49,6 @@ config GENERIC_HWEIGHT | |||
48 | bool | 49 | bool |
49 | default y | 50 | default y |
50 | 51 | ||
51 | config GENERIC_HARDIRQS | ||
52 | bool | ||
53 | default y | ||
54 | |||
55 | config GENERIC_HARDIRQS_NO__DO_IRQ | ||
56 | bool | ||
57 | default y | ||
58 | |||
59 | config GENERIC_CALIBRATE_DELAY | 52 | config GENERIC_CALIBRATE_DELAY |
60 | bool | 53 | bool |
61 | default y | 54 | default y |
@@ -75,6 +68,16 @@ config GENERIC_CLOCKEVENTS | |||
75 | config NO_IOPORT | 68 | config NO_IOPORT |
76 | def_bool y | 69 | def_bool y |
77 | 70 | ||
71 | config COLDFIRE_SW_A7 | ||
72 | bool | ||
73 | default n | ||
74 | |||
75 | config HAVE_CACHE_SPLIT | ||
76 | bool | ||
77 | |||
78 | config HAVE_CACHE_CB | ||
79 | bool | ||
80 | |||
78 | source "init/Kconfig" | 81 | source "init/Kconfig" |
79 | 82 | ||
80 | source "kernel/Kconfig.freezer" | 83 | source "kernel/Kconfig.freezer" |
@@ -107,69 +110,90 @@ config M68360 | |||
107 | 110 | ||
108 | config M5206 | 111 | config M5206 |
109 | bool "MCF5206" | 112 | bool "MCF5206" |
113 | select COLDFIRE_SW_A7 | ||
110 | help | 114 | help |
111 | Motorola ColdFire 5206 processor support. | 115 | Motorola ColdFire 5206 processor support. |
112 | 116 | ||
113 | config M5206e | 117 | config M5206e |
114 | bool "MCF5206e" | 118 | bool "MCF5206e" |
119 | select COLDFIRE_SW_A7 | ||
115 | help | 120 | help |
116 | Motorola ColdFire 5206e processor support. | 121 | Motorola ColdFire 5206e processor support. |
117 | 122 | ||
118 | config M520x | 123 | config M520x |
119 | bool "MCF520x" | 124 | bool "MCF520x" |
120 | select GENERIC_CLOCKEVENTS | 125 | select GENERIC_CLOCKEVENTS |
126 | select HAVE_CACHE_SPLIT | ||
121 | help | 127 | help |
122 | Freescale Coldfire 5207/5208 processor support. | 128 | Freescale Coldfire 5207/5208 processor support. |
123 | 129 | ||
124 | config M523x | 130 | config M523x |
125 | bool "MCF523x" | 131 | bool "MCF523x" |
126 | select GENERIC_CLOCKEVENTS | 132 | select GENERIC_CLOCKEVENTS |
133 | select HAVE_CACHE_SPLIT | ||
127 | help | 134 | help |
128 | Freescale Coldfire 5230/1/2/4/5 processor support | 135 | Freescale Coldfire 5230/1/2/4/5 processor support |
129 | 136 | ||
130 | config M5249 | 137 | config M5249 |
131 | bool "MCF5249" | 138 | bool "MCF5249" |
139 | select COLDFIRE_SW_A7 | ||
132 | help | 140 | help |
133 | Motorola ColdFire 5249 processor support. | 141 | Motorola ColdFire 5249 processor support. |
134 | 142 | ||
135 | config M5271 | 143 | config M5271 |
136 | bool "MCF5271" | 144 | bool "MCF5271" |
145 | select HAVE_CACHE_SPLIT | ||
137 | help | 146 | help |
138 | Freescale (Motorola) ColdFire 5270/5271 processor support. | 147 | Freescale (Motorola) ColdFire 5270/5271 processor support. |
139 | 148 | ||
140 | config M5272 | 149 | config M5272 |
141 | bool "MCF5272" | 150 | bool "MCF5272" |
151 | select COLDFIRE_SW_A7 | ||
142 | help | 152 | help |
143 | Motorola ColdFire 5272 processor support. | 153 | Motorola ColdFire 5272 processor support. |
144 | 154 | ||
145 | config M5275 | 155 | config M5275 |
146 | bool "MCF5275" | 156 | bool "MCF5275" |
157 | select HAVE_CACHE_SPLIT | ||
147 | help | 158 | help |
148 | Freescale (Motorola) ColdFire 5274/5275 processor support. | 159 | Freescale (Motorola) ColdFire 5274/5275 processor support. |
149 | 160 | ||
150 | config M528x | 161 | config M528x |
151 | bool "MCF528x" | 162 | bool "MCF528x" |
152 | select GENERIC_CLOCKEVENTS | 163 | select GENERIC_CLOCKEVENTS |
164 | select HAVE_CACHE_SPLIT | ||
153 | help | 165 | help |
154 | Motorola ColdFire 5280/5282 processor support. | 166 | Motorola ColdFire 5280/5282 processor support. |
155 | 167 | ||
156 | config M5307 | 168 | config M5307 |
157 | bool "MCF5307" | 169 | bool "MCF5307" |
170 | select COLDFIRE_SW_A7 | ||
171 | select HAVE_CACHE_CB | ||
158 | help | 172 | help |
159 | Motorola ColdFire 5307 processor support. | 173 | Motorola ColdFire 5307 processor support. |
160 | 174 | ||
161 | config M532x | 175 | config M532x |
162 | bool "MCF532x" | 176 | bool "MCF532x" |
177 | select HAVE_CACHE_CB | ||
163 | help | 178 | help |
164 | Freescale (Motorola) ColdFire 532x processor support. | 179 | Freescale (Motorola) ColdFire 532x processor support. |
165 | 180 | ||
166 | config M5407 | 181 | config M5407 |
167 | bool "MCF5407" | 182 | bool "MCF5407" |
183 | select COLDFIRE_SW_A7 | ||
184 | select HAVE_CACHE_CB | ||
168 | help | 185 | help |
169 | Motorola ColdFire 5407 processor support. | 186 | Motorola ColdFire 5407 processor support. |
170 | 187 | ||
188 | config M547x | ||
189 | bool "MCF547x" | ||
190 | select HAVE_CACHE_CB | ||
191 | help | ||
192 | Freescale ColdFire 5470/5471/5472/5473/5474/5475 processor support. | ||
193 | |||
171 | config M548x | 194 | config M548x |
172 | bool "MCF548x" | 195 | bool "MCF548x" |
196 | select HAVE_CACHE_CB | ||
173 | help | 197 | help |
174 | Freescale ColdFire 5480/5481/5482/5483/5484/5485 processor support. | 198 | Freescale ColdFire 5480/5481/5482/5483/5484/5485 processor support. |
175 | 199 | ||
@@ -181,9 +205,14 @@ config M527x | |||
181 | select GENERIC_CLOCKEVENTS | 205 | select GENERIC_CLOCKEVENTS |
182 | default y | 206 | default y |
183 | 207 | ||
208 | config M54xx | ||
209 | bool | ||
210 | depends on (M548x || M547x) | ||
211 | default y | ||
212 | |||
184 | config COLDFIRE | 213 | config COLDFIRE |
185 | bool | 214 | bool |
186 | depends on (M5206 || M5206e || M520x || M523x || M5249 || M527x || M5272 || M528x || M5307 || M532x || M5407 || M548x) | 215 | depends on (M5206 || M5206e || M520x || M523x || M5249 || M527x || M5272 || M528x || M5307 || M532x || M5407 || M54xx) |
187 | select GENERIC_GPIO | 216 | select GENERIC_GPIO |
188 | select ARCH_REQUIRE_GPIOLIB | 217 | select ARCH_REQUIRE_GPIOLIB |
189 | default y | 218 | default y |
@@ -230,6 +259,46 @@ config OLDMASK | |||
230 | Build support for the older revision ColdFire 5307 silicon. | 259 | Build support for the older revision ColdFire 5307 silicon. |
231 | Specifically this is the 1H55J mask revision. | 260 | Specifically this is the 1H55J mask revision. |
232 | 261 | ||
262 | if HAVE_CACHE_SPLIT | ||
263 | choice | ||
264 | prompt "Split Cache Configuration" | ||
265 | default CACHE_I | ||
266 | |||
267 | config CACHE_I | ||
268 | bool "Instruction" | ||
269 | help | ||
270 | Use all of the ColdFire CPU cache memory as an instruction cache. | ||
271 | |||
272 | config CACHE_D | ||
273 | bool "Data" | ||
274 | help | ||
275 | Use all of the ColdFire CPU cache memory as a data cache. | ||
276 | |||
277 | config CACHE_BOTH | ||
278 | bool "Both" | ||
279 | help | ||
280 | Split the ColdFire CPU cache, and use half as an instruction cache | ||
281 | and half as a data cache. | ||
282 | endchoice | ||
283 | endif | ||
284 | |||
285 | if HAVE_CACHE_CB | ||
286 | choice | ||
287 | prompt "Data cache mode" | ||
288 | default CACHE_WRITETHRU | ||
289 | |||
290 | config CACHE_WRITETHRU | ||
291 | bool "Write-through" | ||
292 | help | ||
293 | The ColdFire CPU cache is set into Write-through mode. | ||
294 | |||
295 | config CACHE_COPYBACK | ||
296 | bool "Copy-back" | ||
297 | help | ||
298 | The ColdFire CPU cache is set into Copy-back mode. | ||
299 | endchoice | ||
300 | endif | ||
301 | |||
233 | comment "Platform" | 302 | comment "Platform" |
234 | 303 | ||
235 | config PILOT3 | 304 | config PILOT3 |
@@ -245,16 +314,16 @@ config XCOPILOT_BUGS | |||
245 | Support the bugs of Xcopilot. | 314 | Support the bugs of Xcopilot. |
246 | 315 | ||
247 | config UC5272 | 316 | config UC5272 |
248 | bool 'Arcturus Networks uC5272 dimm board support' | 317 | bool 'Arcturus Networks uC5272 dimm board support' |
249 | depends on M5272 | 318 | depends on M5272 |
250 | help | 319 | help |
251 | Support for the Arcturus Networks uC5272 dimm board. | 320 | Support for the Arcturus Networks uC5272 dimm board. |
252 | 321 | ||
253 | config UC5282 | 322 | config UC5282 |
254 | bool "Arcturus Networks uC5282 board support" | 323 | bool "Arcturus Networks uC5282 board support" |
255 | depends on M528x | 324 | depends on M528x |
256 | help | 325 | help |
257 | Support for the Arcturus Networks uC5282 dimm board. | 326 | Support for the Arcturus Networks uC5282 dimm board. |
258 | 327 | ||
259 | config UCSIMM | 328 | config UCSIMM |
260 | bool "uCsimm module support" | 329 | bool "uCsimm module support" |
@@ -279,7 +348,7 @@ config DIRECT_IO_ACCESS | |||
279 | depends on (UCSIMM || UCDIMM || DRAGEN2) | 348 | depends on (UCSIMM || UCDIMM || DRAGEN2) |
280 | help | 349 | help |
281 | Disable the CPU internal registers protection in user mode, | 350 | Disable the CPU internal registers protection in user mode, |
282 | to allow a user application to read/write them. | 351 | to allow a user application to read/write them. |
283 | 352 | ||
284 | config INIT_LCD | 353 | config INIT_LCD |
285 | bool "Initialize LCD" | 354 | bool "Initialize LCD" |
@@ -517,7 +586,7 @@ config EMAC_INC | |||
517 | depends on (SOM5282EM) | 586 | depends on (SOM5282EM) |
518 | 587 | ||
519 | config SNEHA | 588 | config SNEHA |
520 | bool | 589 | bool |
521 | default y | 590 | default y |
522 | depends on CPU16B | 591 | depends on CPU16B |
523 | 592 | ||
diff --git a/arch/m68knommu/Makefile b/arch/m68knommu/Makefile index 026ef16fa68..589613fed31 100644 --- a/arch/m68knommu/Makefile +++ b/arch/m68knommu/Makefile | |||
@@ -25,7 +25,7 @@ platform-$(CONFIG_M528x) := 528x | |||
25 | platform-$(CONFIG_M5307) := 5307 | 25 | platform-$(CONFIG_M5307) := 5307 |
26 | platform-$(CONFIG_M532x) := 532x | 26 | platform-$(CONFIG_M532x) := 532x |
27 | platform-$(CONFIG_M5407) := 5407 | 27 | platform-$(CONFIG_M5407) := 5407 |
28 | platform-$(CONFIG_M548x) := 548x | 28 | platform-$(CONFIG_M54xx) := 54xx |
29 | PLATFORM := $(platform-y) | 29 | PLATFORM := $(platform-y) |
30 | 30 | ||
31 | board-$(CONFIG_PILOT) := pilot | 31 | board-$(CONFIG_PILOT) := pilot |
@@ -74,7 +74,7 @@ cpuclass-$(CONFIG_M528x) := coldfire | |||
74 | cpuclass-$(CONFIG_M5307) := coldfire | 74 | cpuclass-$(CONFIG_M5307) := coldfire |
75 | cpuclass-$(CONFIG_M532x) := coldfire | 75 | cpuclass-$(CONFIG_M532x) := coldfire |
76 | cpuclass-$(CONFIG_M5407) := coldfire | 76 | cpuclass-$(CONFIG_M5407) := coldfire |
77 | cpuclass-$(CONFIG_M548x) := coldfire | 77 | cpuclass-$(CONFIG_M54xx) := coldfire |
78 | cpuclass-$(CONFIG_M68328) := 68328 | 78 | cpuclass-$(CONFIG_M68328) := 68328 |
79 | cpuclass-$(CONFIG_M68EZ328) := 68328 | 79 | cpuclass-$(CONFIG_M68EZ328) := 68328 |
80 | cpuclass-$(CONFIG_M68VZ328) := 68328 | 80 | cpuclass-$(CONFIG_M68VZ328) := 68328 |
@@ -91,18 +91,18 @@ export PLATFORM BOARD MODEL CPUCLASS | |||
91 | # Some CFLAG additions based on specific CPU type. | 91 | # Some CFLAG additions based on specific CPU type. |
92 | # | 92 | # |
93 | cflags-$(CONFIG_M5206) := $(call cc-option,-mcpu=5206,-m5200) | 93 | cflags-$(CONFIG_M5206) := $(call cc-option,-mcpu=5206,-m5200) |
94 | cflags-$(CONFIG_M5206e) := $(call cc-option,-m5206e,-m5200) | 94 | cflags-$(CONFIG_M5206e) := $(call cc-option,-mcpu=5206e,-m5200) |
95 | cflags-$(CONFIG_M520x) := $(call cc-option,-mcpu=5208,-m5200) | 95 | cflags-$(CONFIG_M520x) := $(call cc-option,-mcpu=5208,-m5200) |
96 | cflags-$(CONFIG_M523x) := $(call cc-option,-mcpu=523x,-m5307) | 96 | cflags-$(CONFIG_M523x) := $(call cc-option,-mcpu=523x,-m5307) |
97 | cflags-$(CONFIG_M5249) := $(call cc-option,-mcpu=5249,-m5200) | 97 | cflags-$(CONFIG_M5249) := $(call cc-option,-mcpu=5249,-m5200) |
98 | cflags-$(CONFIG_M5271) := $(call cc-option,-mcpu=5271,-m5307) | 98 | cflags-$(CONFIG_M5271) := $(call cc-option,-mcpu=5271,-m5307) |
99 | cflags-$(CONFIG_M5272) := $(call cc-option,-mcpu=5272,-m5307) | 99 | cflags-$(CONFIG_M5272) := $(call cc-option,-mcpu=5272,-m5307) |
100 | cflags-$(CONFIG_M5275) := $(call cc-option,-mcpu=5275,-m5307) | 100 | cflags-$(CONFIG_M5275) := $(call cc-option,-mcpu=5275,-m5307) |
101 | cflags-$(CONFIG_M528x) := $(call cc-option,-m528x,-m5307) | 101 | cflags-$(CONFIG_M528x) := $(call cc-option,-mcpu=528x,-m5307) |
102 | cflags-$(CONFIG_M5307) := $(call cc-option,-m5307,-m5200) | 102 | cflags-$(CONFIG_M5307) := $(call cc-option,-mcpu=5307,-m5200) |
103 | cflags-$(CONFIG_M532x) := $(call cc-option,-mcpu=532x,-m5307) | 103 | cflags-$(CONFIG_M532x) := $(call cc-option,-mcpu=532x,-m5307) |
104 | cflags-$(CONFIG_M5407) := $(call cc-option,-m5407,-m5200) | 104 | cflags-$(CONFIG_M5407) := $(call cc-option,-mcpu=5407,-m5200) |
105 | cflags-$(CONFIG_M548x) := $(call cc-option,-m5407,-m5200) | 105 | cflags-$(CONFIG_M54xx) := $(call cc-option,-mcpu=5475,-m5200) |
106 | cflags-$(CONFIG_M68328) := -m68000 | 106 | cflags-$(CONFIG_M68328) := -m68000 |
107 | cflags-$(CONFIG_M68EZ328) := -m68000 | 107 | cflags-$(CONFIG_M68EZ328) := -m68000 |
108 | cflags-$(CONFIG_M68VZ328) := -m68000 | 108 | cflags-$(CONFIG_M68VZ328) := -m68000 |
diff --git a/arch/m68knommu/configs/m5208evb_defconfig b/arch/m68knommu/configs/m5208evb_defconfig index 6ac2981a2cd..2f5655c577a 100644 --- a/arch/m68knommu/configs/m5208evb_defconfig +++ b/arch/m68knommu/configs/m5208evb_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | 1 | CONFIG_EXPERIMENTAL=y |
2 | CONFIG_LOG_BUF_SHIFT=14 | 2 | CONFIG_LOG_BUF_SHIFT=14 |
3 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 3 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
4 | CONFIG_EMBEDDED=y | 4 | CONFIG_EXPERT=y |
5 | # CONFIG_KALLSYMS is not set | 5 | # CONFIG_KALLSYMS is not set |
6 | # CONFIG_HOTPLUG is not set | 6 | # CONFIG_HOTPLUG is not set |
7 | # CONFIG_FUTEX is not set | 7 | # CONFIG_FUTEX is not set |
diff --git a/arch/m68knommu/configs/m5249evb_defconfig b/arch/m68knommu/configs/m5249evb_defconfig index 14934ff8d5c..16df72bfbd4 100644 --- a/arch/m68knommu/configs/m5249evb_defconfig +++ b/arch/m68knommu/configs/m5249evb_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | 1 | CONFIG_EXPERIMENTAL=y |
2 | CONFIG_LOG_BUF_SHIFT=14 | 2 | CONFIG_LOG_BUF_SHIFT=14 |
3 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 3 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
4 | CONFIG_EMBEDDED=y | 4 | CONFIG_EXPERT=y |
5 | # CONFIG_KALLSYMS is not set | 5 | # CONFIG_KALLSYMS is not set |
6 | # CONFIG_HOTPLUG is not set | 6 | # CONFIG_HOTPLUG is not set |
7 | # CONFIG_FUTEX is not set | 7 | # CONFIG_FUTEX is not set |
diff --git a/arch/m68knommu/configs/m5272c3_defconfig b/arch/m68knommu/configs/m5272c3_defconfig index 5985a3b593d..4e6ea50c7f3 100644 --- a/arch/m68knommu/configs/m5272c3_defconfig +++ b/arch/m68knommu/configs/m5272c3_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | 1 | CONFIG_EXPERIMENTAL=y |
2 | CONFIG_LOG_BUF_SHIFT=14 | 2 | CONFIG_LOG_BUF_SHIFT=14 |
3 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 3 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
4 | CONFIG_EMBEDDED=y | 4 | CONFIG_EXPERT=y |
5 | # CONFIG_KALLSYMS is not set | 5 | # CONFIG_KALLSYMS is not set |
6 | # CONFIG_HOTPLUG is not set | 6 | # CONFIG_HOTPLUG is not set |
7 | # CONFIG_FUTEX is not set | 7 | # CONFIG_FUTEX is not set |
diff --git a/arch/m68knommu/configs/m5275evb_defconfig b/arch/m68knommu/configs/m5275evb_defconfig index 5a7857efb45..f3dd74115a3 100644 --- a/arch/m68knommu/configs/m5275evb_defconfig +++ b/arch/m68knommu/configs/m5275evb_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | 1 | CONFIG_EXPERIMENTAL=y |
2 | CONFIG_LOG_BUF_SHIFT=14 | 2 | CONFIG_LOG_BUF_SHIFT=14 |
3 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 3 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
4 | CONFIG_EMBEDDED=y | 4 | CONFIG_EXPERT=y |
5 | # CONFIG_KALLSYMS is not set | 5 | # CONFIG_KALLSYMS is not set |
6 | # CONFIG_HOTPLUG is not set | 6 | # CONFIG_HOTPLUG is not set |
7 | # CONFIG_FUTEX is not set | 7 | # CONFIG_FUTEX is not set |
diff --git a/arch/m68knommu/configs/m5307c3_defconfig b/arch/m68knommu/configs/m5307c3_defconfig index e8102018c8d..bce0a20c373 100644 --- a/arch/m68knommu/configs/m5307c3_defconfig +++ b/arch/m68knommu/configs/m5307c3_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | 1 | CONFIG_EXPERIMENTAL=y |
2 | CONFIG_LOG_BUF_SHIFT=14 | 2 | CONFIG_LOG_BUF_SHIFT=14 |
3 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 3 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
4 | CONFIG_EMBEDDED=y | 4 | CONFIG_EXPERT=y |
5 | # CONFIG_KALLSYMS is not set | 5 | # CONFIG_KALLSYMS is not set |
6 | # CONFIG_HOTPLUG is not set | 6 | # CONFIG_HOTPLUG is not set |
7 | # CONFIG_FUTEX is not set | 7 | # CONFIG_FUTEX is not set |
diff --git a/arch/m68knommu/configs/m5407c3_defconfig b/arch/m68knommu/configs/m5407c3_defconfig index 5c124a7ba2a..618cc32691f 100644 --- a/arch/m68knommu/configs/m5407c3_defconfig +++ b/arch/m68knommu/configs/m5407c3_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | 1 | CONFIG_EXPERIMENTAL=y |
2 | CONFIG_LOG_BUF_SHIFT=14 | 2 | CONFIG_LOG_BUF_SHIFT=14 |
3 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 3 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
4 | CONFIG_EMBEDDED=y | 4 | CONFIG_EXPERT=y |
5 | # CONFIG_KALLSYMS is not set | 5 | # CONFIG_KALLSYMS is not set |
6 | # CONFIG_HOTPLUG is not set | 6 | # CONFIG_HOTPLUG is not set |
7 | # CONFIG_FUTEX is not set | 7 | # CONFIG_FUTEX is not set |
diff --git a/arch/m68knommu/defconfig b/arch/m68knommu/defconfig index 6ac2981a2cd..2f5655c577a 100644 --- a/arch/m68knommu/defconfig +++ b/arch/m68knommu/defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | 1 | CONFIG_EXPERIMENTAL=y |
2 | CONFIG_LOG_BUF_SHIFT=14 | 2 | CONFIG_LOG_BUF_SHIFT=14 |
3 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 3 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
4 | CONFIG_EMBEDDED=y | 4 | CONFIG_EXPERT=y |
5 | # CONFIG_KALLSYMS is not set | 5 | # CONFIG_KALLSYMS is not set |
6 | # CONFIG_HOTPLUG is not set | 6 | # CONFIG_HOTPLUG is not set |
7 | # CONFIG_FUTEX is not set | 7 | # CONFIG_FUTEX is not set |
diff --git a/arch/m68knommu/kernel/setup.c b/arch/m68knommu/kernel/setup.c index c684adf5dc4..16b2de7f510 100644 --- a/arch/m68knommu/kernel/setup.c +++ b/arch/m68knommu/kernel/setup.c | |||
@@ -55,55 +55,29 @@ void (*mach_halt)(void); | |||
55 | void (*mach_power_off)(void); | 55 | void (*mach_power_off)(void); |
56 | 56 | ||
57 | #ifdef CONFIG_M68328 | 57 | #ifdef CONFIG_M68328 |
58 | #define CPU "MC68328" | 58 | #define CPU_NAME "MC68328" |
59 | #endif | 59 | #endif |
60 | #ifdef CONFIG_M68EZ328 | 60 | #ifdef CONFIG_M68EZ328 |
61 | #define CPU "MC68EZ328" | 61 | #define CPU_NAME "MC68EZ328" |
62 | #endif | 62 | #endif |
63 | #ifdef CONFIG_M68VZ328 | 63 | #ifdef CONFIG_M68VZ328 |
64 | #define CPU "MC68VZ328" | 64 | #define CPU_NAME "MC68VZ328" |
65 | #endif | 65 | #endif |
66 | #ifdef CONFIG_M68360 | 66 | #ifdef CONFIG_M68360 |
67 | #define CPU "MC68360" | 67 | #define CPU_NAME "MC68360" |
68 | #endif | 68 | #endif |
69 | #if defined(CONFIG_M5206) | 69 | #ifndef CPU_NAME |
70 | #define CPU "COLDFIRE(m5206)" | 70 | #define CPU_NAME "UNKNOWN" |
71 | #endif | 71 | #endif |
72 | #if defined(CONFIG_M5206e) | 72 | |
73 | #define CPU "COLDFIRE(m5206e)" | 73 | /* |
74 | #endif | 74 | * Different cores have different instruction execution timings. |
75 | #if defined(CONFIG_M520x) | 75 | * The old/traditional 68000 cores are basically all the same, at 16. |
76 | #define CPU "COLDFIRE(m520x)" | 76 | * The ColdFire cores vary a little, their values are defined in their |
77 | #endif | 77 | * headers. We default to the standard 68000 value here. |
78 | #if defined(CONFIG_M523x) | 78 | */ |
79 | #define CPU "COLDFIRE(m523x)" | 79 | #ifndef CPU_INSTR_PER_JIFFY |
80 | #endif | 80 | #define CPU_INSTR_PER_JIFFY 16 |
81 | #if defined(CONFIG_M5249) | ||
82 | #define CPU "COLDFIRE(m5249)" | ||
83 | #endif | ||
84 | #if defined(CONFIG_M5271) | ||
85 | #define CPU "COLDFIRE(m5270/5271)" | ||
86 | #endif | ||
87 | #if defined(CONFIG_M5272) | ||
88 | #define CPU "COLDFIRE(m5272)" | ||
89 | #endif | ||
90 | #if defined(CONFIG_M5275) | ||
91 | #define CPU "COLDFIRE(m5274/5275)" | ||
92 | #endif | ||
93 | #if defined(CONFIG_M528x) | ||
94 | #define CPU "COLDFIRE(m5280/5282)" | ||
95 | #endif | ||
96 | #if defined(CONFIG_M5307) | ||
97 | #define CPU "COLDFIRE(m5307)" | ||
98 | #endif | ||
99 | #if defined(CONFIG_M532x) | ||
100 | #define CPU "COLDFIRE(m532x)" | ||
101 | #endif | ||
102 | #if defined(CONFIG_M5407) | ||
103 | #define CPU "COLDFIRE(m5407)" | ||
104 | #endif | ||
105 | #ifndef CPU | ||
106 | #define CPU "UNKNOWN" | ||
107 | #endif | 81 | #endif |
108 | 82 | ||
109 | extern int _stext, _etext, _sdata, _edata, _sbss, _ebss, _end; | 83 | extern int _stext, _etext, _sdata, _edata, _sbss, _ebss, _end; |
@@ -208,7 +182,7 @@ void __init setup_arch(char **cmdline_p) | |||
208 | command_line[sizeof(command_line) - 1] = 0; | 182 | command_line[sizeof(command_line) - 1] = 0; |
209 | #endif /* CONFIG_UBOOT */ | 183 | #endif /* CONFIG_UBOOT */ |
210 | 184 | ||
211 | printk(KERN_INFO "\x0F\r\n\nuClinux/" CPU "\n"); | 185 | printk(KERN_INFO "\x0F\r\n\nuClinux/" CPU_NAME "\n"); |
212 | 186 | ||
213 | #ifdef CONFIG_UCDIMM | 187 | #ifdef CONFIG_UCDIMM |
214 | printk(KERN_INFO "uCdimm by Lineo, Inc. <www.lineo.com>\n"); | 188 | printk(KERN_INFO "uCdimm by Lineo, Inc. <www.lineo.com>\n"); |
@@ -257,11 +231,6 @@ void __init setup_arch(char **cmdline_p) | |||
257 | memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE); | 231 | memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE); |
258 | boot_command_line[COMMAND_LINE_SIZE-1] = 0; | 232 | boot_command_line[COMMAND_LINE_SIZE-1] = 0; |
259 | 233 | ||
260 | #ifdef DEBUG | ||
261 | if (strlen(*cmdline_p)) | ||
262 | printk(KERN_DEBUG "Command line: '%s'\n", *cmdline_p); | ||
263 | #endif | ||
264 | |||
265 | #if defined(CONFIG_FRAMEBUFFER_CONSOLE) && defined(CONFIG_DUMMY_CONSOLE) | 234 | #if defined(CONFIG_FRAMEBUFFER_CONSOLE) && defined(CONFIG_DUMMY_CONSOLE) |
266 | conswitchp = &dummy_con; | 235 | conswitchp = &dummy_con; |
267 | #endif | 236 | #endif |
@@ -303,15 +272,10 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
303 | char *cpu, *mmu, *fpu; | 272 | char *cpu, *mmu, *fpu; |
304 | u_long clockfreq; | 273 | u_long clockfreq; |
305 | 274 | ||
306 | cpu = CPU; | 275 | cpu = CPU_NAME; |
307 | mmu = "none"; | 276 | mmu = "none"; |
308 | fpu = "none"; | 277 | fpu = "none"; |
309 | 278 | clockfreq = (loops_per_jiffy * HZ) * CPU_INSTR_PER_JIFFY; | |
310 | #ifdef CONFIG_COLDFIRE | ||
311 | clockfreq = (loops_per_jiffy * HZ) * 3; | ||
312 | #else | ||
313 | clockfreq = (loops_per_jiffy * HZ) * 16; | ||
314 | #endif | ||
315 | 279 | ||
316 | seq_printf(m, "CPU:\t\t%s\n" | 280 | seq_printf(m, "CPU:\t\t%s\n" |
317 | "MMU:\t\t%s\n" | 281 | "MMU:\t\t%s\n" |
diff --git a/arch/m68knommu/mm/Makefile b/arch/m68knommu/mm/Makefile index fc91f254f51..b54ab6b4b52 100644 --- a/arch/m68knommu/mm/Makefile +++ b/arch/m68knommu/mm/Makefile | |||
@@ -2,4 +2,4 @@ | |||
2 | # Makefile for the linux m68knommu specific parts of the memory manager. | 2 | # Makefile for the linux m68knommu specific parts of the memory manager. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y += init.o fault.o memory.o kmap.o | 5 | obj-y += init.o kmap.o |
diff --git a/arch/m68knommu/mm/fault.c b/arch/m68knommu/mm/fault.c deleted file mode 100644 index bc05cf74d9c..00000000000 --- a/arch/m68knommu/mm/fault.c +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/m68knommu/mm/fault.c | ||
3 | * | ||
4 | * Copyright (C) 1998 D. Jeff Dionne <jeff@lineo.ca>, | ||
5 | * Copyright (C) 2000 Lineo, Inc. (www.lineo.com) | ||
6 | * | ||
7 | * Based on: | ||
8 | * | ||
9 | * linux/arch/m68k/mm/fault.c | ||
10 | * | ||
11 | * Copyright (C) 1995 Hamish Macdonald | ||
12 | */ | ||
13 | |||
14 | #include <linux/mman.h> | ||
15 | #include <linux/mm.h> | ||
16 | #include <linux/kernel.h> | ||
17 | #include <linux/ptrace.h> | ||
18 | |||
19 | #include <asm/system.h> | ||
20 | #include <asm/pgtable.h> | ||
21 | |||
22 | extern void die_if_kernel(char *, struct pt_regs *, long); | ||
23 | |||
24 | /* | ||
25 | * This routine handles page faults. It determines the problem, and | ||
26 | * then passes it off to one of the appropriate routines. | ||
27 | * | ||
28 | * error_code: | ||
29 | * bit 0 == 0 means no page found, 1 means protection fault | ||
30 | * bit 1 == 0 means read, 1 means write | ||
31 | * | ||
32 | * If this routine detects a bad access, it returns 1, otherwise it | ||
33 | * returns 0. | ||
34 | */ | ||
35 | asmlinkage int do_page_fault(struct pt_regs *regs, unsigned long address, | ||
36 | unsigned long error_code) | ||
37 | { | ||
38 | #ifdef DEBUG | ||
39 | printk(KERN_DEBUG "regs->sr=%#x, regs->pc=%#lx, address=%#lx, %ld\n", | ||
40 | regs->sr, regs->pc, address, error_code); | ||
41 | #endif | ||
42 | |||
43 | /* | ||
44 | * Oops. The kernel tried to access some bad page. We'll have to | ||
45 | * terminate things with extreme prejudice. | ||
46 | */ | ||
47 | if ((unsigned long) address < PAGE_SIZE) | ||
48 | printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference"); | ||
49 | else | ||
50 | printk(KERN_ALERT "Unable to handle kernel access"); | ||
51 | printk(KERN_ALERT " at virtual address %08lx\n", address); | ||
52 | die_if_kernel("Oops", regs, error_code); | ||
53 | do_exit(SIGKILL); | ||
54 | |||
55 | return 1; | ||
56 | } | ||
57 | |||
diff --git a/arch/m68knommu/mm/kmap.c b/arch/m68knommu/mm/kmap.c index 902c1dfda9e..ece8d5ad4e6 100644 --- a/arch/m68knommu/mm/kmap.c +++ b/arch/m68knommu/mm/kmap.c | |||
@@ -36,15 +36,6 @@ void iounmap(void *addr) | |||
36 | } | 36 | } |
37 | 37 | ||
38 | /* | 38 | /* |
39 | * __iounmap unmaps nearly everything, so be careful | ||
40 | * it doesn't free currently pointer/page tables anymore but it | ||
41 | * wans't used anyway and might be added later. | ||
42 | */ | ||
43 | void __iounmap(void *addr, unsigned long size) | ||
44 | { | ||
45 | } | ||
46 | |||
47 | /* | ||
48 | * Set new cache mode for some kernel address space. | 39 | * Set new cache mode for some kernel address space. |
49 | * The caller must push data for that range itself, if such data may already | 40 | * The caller must push data for that range itself, if such data may already |
50 | * be in the cache. | 41 | * be in the cache. |
diff --git a/arch/m68knommu/mm/memory.c b/arch/m68knommu/mm/memory.c deleted file mode 100644 index 8f7949e786d..00000000000 --- a/arch/m68knommu/mm/memory.c +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/m68knommu/mm/memory.c | ||
3 | * | ||
4 | * Copyright (C) 1998 Kenneth Albanowski <kjahds@kjahds.com>, | ||
5 | * Copyright (C) 1999-2002, Greg Ungerer (gerg@snapgear.com) | ||
6 | * | ||
7 | * Based on: | ||
8 | * | ||
9 | * linux/arch/m68k/mm/memory.c | ||
10 | * | ||
11 | * Copyright (C) 1995 Hamish Macdonald | ||
12 | */ | ||
13 | |||
14 | #include <linux/mm.h> | ||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/string.h> | ||
17 | #include <linux/types.h> | ||
18 | |||
19 | #include <asm/segment.h> | ||
20 | #include <asm/page.h> | ||
21 | #include <asm/pgtable.h> | ||
22 | #include <asm/system.h> | ||
23 | |||
24 | /* | ||
25 | * Map some physical address range into the kernel address space. | ||
26 | */ | ||
27 | |||
28 | unsigned long kernel_map(unsigned long paddr, unsigned long size, | ||
29 | int nocacheflag, unsigned long *memavailp ) | ||
30 | { | ||
31 | return paddr; | ||
32 | } | ||
33 | |||
diff --git a/arch/m68knommu/platform/548x/Makefile b/arch/m68knommu/platform/54xx/Makefile index e6035e7a2d3..e6035e7a2d3 100644 --- a/arch/m68knommu/platform/548x/Makefile +++ b/arch/m68knommu/platform/54xx/Makefile | |||
diff --git a/arch/m68knommu/platform/548x/config.c b/arch/m68knommu/platform/54xx/config.c index 9888846bd1c..78130984db9 100644 --- a/arch/m68knommu/platform/548x/config.c +++ b/arch/m68knommu/platform/54xx/config.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /***************************************************************************/ | 1 | /***************************************************************************/ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * linux/arch/m68knommu/platform/548x/config.c | 4 | * linux/arch/m68knommu/platform/54xx/config.c |
5 | * | 5 | * |
6 | * Copyright (C) 2010, Philippe De Muyter <phdm@macqel.be> | 6 | * Copyright (C) 2010, Philippe De Muyter <phdm@macqel.be> |
7 | */ | 7 | */ |
@@ -15,13 +15,13 @@ | |||
15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
16 | #include <asm/machdep.h> | 16 | #include <asm/machdep.h> |
17 | #include <asm/coldfire.h> | 17 | #include <asm/coldfire.h> |
18 | #include <asm/m548xsim.h> | 18 | #include <asm/m54xxsim.h> |
19 | #include <asm/mcfuart.h> | 19 | #include <asm/mcfuart.h> |
20 | #include <asm/m548xgpt.h> | 20 | #include <asm/m54xxgpt.h> |
21 | 21 | ||
22 | /***************************************************************************/ | 22 | /***************************************************************************/ |
23 | 23 | ||
24 | static struct mcf_platform_uart m548x_uart_platform[] = { | 24 | static struct mcf_platform_uart m54xx_uart_platform[] = { |
25 | { | 25 | { |
26 | .mapbase = MCF_MBAR + MCFUART_BASE1, | 26 | .mapbase = MCF_MBAR + MCFUART_BASE1, |
27 | .irq = 64 + 35, | 27 | .irq = 64 + 35, |
@@ -40,20 +40,20 @@ static struct mcf_platform_uart m548x_uart_platform[] = { | |||
40 | }, | 40 | }, |
41 | }; | 41 | }; |
42 | 42 | ||
43 | static struct platform_device m548x_uart = { | 43 | static struct platform_device m54xx_uart = { |
44 | .name = "mcfuart", | 44 | .name = "mcfuart", |
45 | .id = 0, | 45 | .id = 0, |
46 | .dev.platform_data = m548x_uart_platform, | 46 | .dev.platform_data = m54xx_uart_platform, |
47 | }; | 47 | }; |
48 | 48 | ||
49 | static struct platform_device *m548x_devices[] __initdata = { | 49 | static struct platform_device *m54xx_devices[] __initdata = { |
50 | &m548x_uart, | 50 | &m54xx_uart, |
51 | }; | 51 | }; |
52 | 52 | ||
53 | 53 | ||
54 | /***************************************************************************/ | 54 | /***************************************************************************/ |
55 | 55 | ||
56 | static void __init m548x_uart_init_line(int line, int irq) | 56 | static void __init m54xx_uart_init_line(int line, int irq) |
57 | { | 57 | { |
58 | int rts_cts; | 58 | int rts_cts; |
59 | 59 | ||
@@ -72,18 +72,18 @@ static void __init m548x_uart_init_line(int line, int irq) | |||
72 | MCF_MBAR + MCF_PAR_PSC(line)); | 72 | MCF_MBAR + MCF_PAR_PSC(line)); |
73 | } | 73 | } |
74 | 74 | ||
75 | static void __init m548x_uarts_init(void) | 75 | static void __init m54xx_uarts_init(void) |
76 | { | 76 | { |
77 | const int nrlines = ARRAY_SIZE(m548x_uart_platform); | 77 | const int nrlines = ARRAY_SIZE(m54xx_uart_platform); |
78 | int line; | 78 | int line; |
79 | 79 | ||
80 | for (line = 0; (line < nrlines); line++) | 80 | for (line = 0; (line < nrlines); line++) |
81 | m548x_uart_init_line(line, m548x_uart_platform[line].irq); | 81 | m54xx_uart_init_line(line, m54xx_uart_platform[line].irq); |
82 | } | 82 | } |
83 | 83 | ||
84 | /***************************************************************************/ | 84 | /***************************************************************************/ |
85 | 85 | ||
86 | static void mcf548x_reset(void) | 86 | static void mcf54xx_reset(void) |
87 | { | 87 | { |
88 | /* disable interrupts and enable the watchdog */ | 88 | /* disable interrupts and enable the watchdog */ |
89 | asm("movew #0x2700, %sr\n"); | 89 | asm("movew #0x2700, %sr\n"); |
@@ -97,8 +97,8 @@ static void mcf548x_reset(void) | |||
97 | 97 | ||
98 | void __init config_BSP(char *commandp, int size) | 98 | void __init config_BSP(char *commandp, int size) |
99 | { | 99 | { |
100 | mach_reset = mcf548x_reset; | 100 | mach_reset = mcf54xx_reset; |
101 | m548x_uarts_init(); | 101 | m54xx_uarts_init(); |
102 | } | 102 | } |
103 | 103 | ||
104 | /***************************************************************************/ | 104 | /***************************************************************************/ |
@@ -106,7 +106,7 @@ void __init config_BSP(char *commandp, int size) | |||
106 | static int __init init_BSP(void) | 106 | static int __init init_BSP(void) |
107 | { | 107 | { |
108 | 108 | ||
109 | platform_add_devices(m548x_devices, ARRAY_SIZE(m548x_devices)); | 109 | platform_add_devices(m54xx_devices, ARRAY_SIZE(m54xx_devices)); |
110 | return 0; | 110 | return 0; |
111 | } | 111 | } |
112 | 112 | ||
diff --git a/arch/m68knommu/platform/68328/ints.c b/arch/m68knommu/platform/68328/ints.c index 865852806a1..2a3af193ccd 100644 --- a/arch/m68knommu/platform/68328/ints.c +++ b/arch/m68knommu/platform/68328/ints.c | |||
@@ -179,8 +179,8 @@ void __init init_IRQ(void) | |||
179 | IMR = ~0; | 179 | IMR = ~0; |
180 | 180 | ||
181 | for (i = 0; (i < NR_IRQS); i++) { | 181 | for (i = 0; (i < NR_IRQS); i++) { |
182 | set_irq_chip(irq, &intc_irq_chip); | 182 | set_irq_chip(i, &intc_irq_chip); |
183 | set_irq_handler(irq, handle_level_irq); | 183 | set_irq_handler(i, handle_level_irq); |
184 | } | 184 | } |
185 | } | 185 | } |
186 | 186 | ||
diff --git a/arch/m68knommu/platform/coldfire/Makefile b/arch/m68knommu/platform/coldfire/Makefile index 45f501fa452..a8967baabd7 100644 --- a/arch/m68knommu/platform/coldfire/Makefile +++ b/arch/m68knommu/platform/coldfire/Makefile | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1 | 15 | asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1 |
16 | 16 | ||
17 | obj-$(CONFIG_COLDFIRE) += clk.o dma.o entry.o vectors.o | 17 | obj-$(CONFIG_COLDFIRE) += cache.o clk.o dma.o entry.o vectors.o |
18 | obj-$(CONFIG_M5206) += timers.o intc.o | 18 | obj-$(CONFIG_M5206) += timers.o intc.o |
19 | obj-$(CONFIG_M5206e) += timers.o intc.o | 19 | obj-$(CONFIG_M5206e) += timers.o intc.o |
20 | obj-$(CONFIG_M520x) += pit.o intc-simr.o | 20 | obj-$(CONFIG_M520x) += pit.o intc-simr.o |
@@ -26,7 +26,7 @@ obj-$(CONFIG_M528x) += pit.o intc-2.o | |||
26 | obj-$(CONFIG_M5307) += timers.o intc.o | 26 | obj-$(CONFIG_M5307) += timers.o intc.o |
27 | obj-$(CONFIG_M532x) += timers.o intc-simr.o | 27 | obj-$(CONFIG_M532x) += timers.o intc-simr.o |
28 | obj-$(CONFIG_M5407) += timers.o intc.o | 28 | obj-$(CONFIG_M5407) += timers.o intc.o |
29 | obj-$(CONFIG_M548x) += sltimers.o intc-2.o | 29 | obj-$(CONFIG_M54xx) += sltimers.o intc-2.o |
30 | 30 | ||
31 | obj-y += pinmux.o gpio.o | 31 | obj-y += pinmux.o gpio.o |
32 | extra-y := head.o | 32 | extra-y := head.o |
diff --git a/arch/m68knommu/platform/coldfire/cache.c b/arch/m68knommu/platform/coldfire/cache.c new file mode 100644 index 00000000000..235d3c4f4f0 --- /dev/null +++ b/arch/m68knommu/platform/coldfire/cache.c | |||
@@ -0,0 +1,48 @@ | |||
1 | /***************************************************************************/ | ||
2 | |||
3 | /* | ||
4 | * cache.c -- general ColdFire Cache maintainence code | ||
5 | * | ||
6 | * Copyright (C) 2010, Greg Ungerer (gerg@snapgear.com) | ||
7 | */ | ||
8 | |||
9 | /***************************************************************************/ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <asm/coldfire.h> | ||
13 | #include <asm/mcfsim.h> | ||
14 | |||
15 | /***************************************************************************/ | ||
16 | #ifdef CACHE_PUSH | ||
17 | /***************************************************************************/ | ||
18 | |||
19 | /* | ||
20 | * Use cpushl to push all dirty cache lines back to memory. | ||
21 | * Older versions of GAS don't seem to know how to generate the | ||
22 | * ColdFire cpushl instruction... Oh well, bit stuff it for now. | ||
23 | */ | ||
24 | |||
25 | void mcf_cache_push(void) | ||
26 | { | ||
27 | __asm__ __volatile__ ( | ||
28 | "clrl %%d0\n\t" | ||
29 | "1:\n\t" | ||
30 | "movel %%d0,%%a0\n\t" | ||
31 | "2:\n\t" | ||
32 | ".word 0xf468\n\t" | ||
33 | "addl %0,%%a0\n\t" | ||
34 | "cmpl %1,%%a0\n\t" | ||
35 | "blt 2b\n\t" | ||
36 | "addql #1,%%d0\n\t" | ||
37 | "cmpil %2,%%d0\n\t" | ||
38 | "bne 1b\n\t" | ||
39 | : /* No output */ | ||
40 | : "i" (CACHE_LINE_SIZE), | ||
41 | "i" (DCACHE_SIZE / CACHE_WAYS), | ||
42 | "i" (CACHE_WAYS) | ||
43 | : "d0", "a0" ); | ||
44 | } | ||
45 | |||
46 | /***************************************************************************/ | ||
47 | #endif /* CACHE_PUSH */ | ||
48 | /***************************************************************************/ | ||
diff --git a/arch/m68knommu/platform/coldfire/entry.S b/arch/m68knommu/platform/coldfire/entry.S index e1debc8285e..4ddfc3da70d 100644 --- a/arch/m68knommu/platform/coldfire/entry.S +++ b/arch/m68knommu/platform/coldfire/entry.S | |||
@@ -36,13 +36,16 @@ | |||
36 | #include <asm/asm-offsets.h> | 36 | #include <asm/asm-offsets.h> |
37 | #include <asm/entry.h> | 37 | #include <asm/entry.h> |
38 | 38 | ||
39 | #ifdef CONFIG_COLDFIRE_SW_A7 | ||
40 | /* | ||
41 | * Define software copies of the supervisor and user stack pointers. | ||
42 | */ | ||
39 | .bss | 43 | .bss |
40 | |||
41 | sw_ksp: | 44 | sw_ksp: |
42 | .long 0 | 45 | .long 0 |
43 | |||
44 | sw_usp: | 46 | sw_usp: |
45 | .long 0 | 47 | .long 0 |
48 | #endif /* CONFIG_COLDFIRE_SW_A7 */ | ||
46 | 49 | ||
47 | .text | 50 | .text |
48 | 51 | ||
@@ -51,7 +54,6 @@ sw_usp: | |||
51 | .globl ret_from_exception | 54 | .globl ret_from_exception |
52 | .globl ret_from_signal | 55 | .globl ret_from_signal |
53 | .globl sys_call_table | 56 | .globl sys_call_table |
54 | .globl ret_from_interrupt | ||
55 | .globl inthandler | 57 | .globl inthandler |
56 | .globl fasthandler | 58 | .globl fasthandler |
57 | 59 | ||
@@ -140,20 +142,7 @@ Luser_return: | |||
140 | jne Lwork_to_do /* still work to do */ | 142 | jne Lwork_to_do /* still work to do */ |
141 | 143 | ||
142 | Lreturn: | 144 | Lreturn: |
143 | move #0x2700,%sr /* disable intrs */ | 145 | RESTORE_USER |
144 | movel sw_usp,%a0 /* get usp */ | ||
145 | movel %sp@(PT_OFF_PC),%a0@- /* copy exception program counter */ | ||
146 | movel %sp@(PT_OFF_FORMATVEC),%a0@- /* copy exception format/vector/sr */ | ||
147 | moveml %sp@,%d1-%d5/%a0-%a2 | ||
148 | lea %sp@(32),%sp /* space for 8 regs */ | ||
149 | movel %sp@+,%d0 | ||
150 | addql #4,%sp /* orig d0 */ | ||
151 | addl %sp@+,%sp /* stk adj */ | ||
152 | addql #8,%sp /* remove exception */ | ||
153 | movel %sp,sw_ksp /* save ksp */ | ||
154 | subql #8,sw_usp /* set exception */ | ||
155 | movel sw_usp,%sp /* restore usp */ | ||
156 | rte | ||
157 | 146 | ||
158 | Lwork_to_do: | 147 | Lwork_to_do: |
159 | movel %a0@(TI_FLAGS),%d1 /* get thread_info->flags */ | 148 | movel %a0@(TI_FLAGS),%d1 /* get thread_info->flags */ |
@@ -191,31 +180,7 @@ ENTRY(inthandler) | |||
191 | jbsr do_IRQ /* call high level irq handler */ | 180 | jbsr do_IRQ /* call high level irq handler */ |
192 | lea %sp@(8),%sp /* pop args off stack */ | 181 | lea %sp@(8),%sp /* pop args off stack */ |
193 | 182 | ||
194 | bra ret_from_interrupt /* this was fallthrough */ | 183 | bra ret_from_exception |
195 | |||
196 | /* | ||
197 | * This is the fast interrupt handler (for certain hardware interrupt | ||
198 | * sources). Unlike the normal interrupt handler it just uses the | ||
199 | * current stack (doesn't care if it is user or kernel). It also | ||
200 | * doesn't bother doing the bottom half handlers. | ||
201 | */ | ||
202 | ENTRY(fasthandler) | ||
203 | SAVE_LOCAL | ||
204 | |||
205 | movew %sp@(PT_OFF_FORMATVEC),%d0 | ||
206 | andl #0x03fc,%d0 /* mask out vector only */ | ||
207 | |||
208 | movel %sp,%sp@- /* push regs arg */ | ||
209 | lsrl #2,%d0 /* calculate real vector # */ | ||
210 | movel %d0,%sp@- /* push vector number */ | ||
211 | jbsr do_IRQ /* call high level irq handler */ | ||
212 | lea %sp@(8),%sp /* pop args off stack */ | ||
213 | |||
214 | RESTORE_LOCAL | ||
215 | |||
216 | ENTRY(ret_from_interrupt) | ||
217 | /* the fasthandler is confusing me, haven't seen any user */ | ||
218 | jmp ret_from_exception | ||
219 | 184 | ||
220 | /* | 185 | /* |
221 | * Beware - when entering resume, prev (the current task) is | 186 | * Beware - when entering resume, prev (the current task) is |
@@ -226,9 +191,8 @@ ENTRY(ret_from_interrupt) | |||
226 | */ | 191 | */ |
227 | ENTRY(resume) | 192 | ENTRY(resume) |
228 | movel %a0, %d1 /* get prev thread in d1 */ | 193 | movel %a0, %d1 /* get prev thread in d1 */ |
229 | 194 | RDUSP | |
230 | movel sw_usp,%d0 /* save usp */ | 195 | movel %a2,%a0@(TASK_THREAD+THREAD_USP) |
231 | movel %d0,%a0@(TASK_THREAD+THREAD_USP) | ||
232 | 196 | ||
233 | SAVE_SWITCH_STACK | 197 | SAVE_SWITCH_STACK |
234 | movel %sp,%a0@(TASK_THREAD+THREAD_KSP) /* save kernel stack pointer */ | 198 | movel %sp,%a0@(TASK_THREAD+THREAD_KSP) /* save kernel stack pointer */ |
@@ -236,5 +200,5 @@ ENTRY(resume) | |||
236 | RESTORE_SWITCH_STACK | 200 | RESTORE_SWITCH_STACK |
237 | 201 | ||
238 | movel %a1@(TASK_THREAD+THREAD_USP),%a0 /* restore thread user stack */ | 202 | movel %a1@(TASK_THREAD+THREAD_USP),%a0 /* restore thread user stack */ |
239 | movel %a0, sw_usp | 203 | WRUSP |
240 | rts | 204 | rts |
diff --git a/arch/m68knommu/platform/coldfire/head.S b/arch/m68knommu/platform/coldfire/head.S index 0b2d7c7adf7..d5977909ae5 100644 --- a/arch/m68knommu/platform/coldfire/head.S +++ b/arch/m68knommu/platform/coldfire/head.S | |||
@@ -3,7 +3,7 @@ | |||
3 | /* | 3 | /* |
4 | * head.S -- common startup code for ColdFire CPUs. | 4 | * head.S -- common startup code for ColdFire CPUs. |
5 | * | 5 | * |
6 | * (C) Copyright 1999-2006, Greg Ungerer <gerg@snapgear.com>. | 6 | * (C) Copyright 1999-2010, Greg Ungerer <gerg@snapgear.com>. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | /*****************************************************************************/ | 9 | /*****************************************************************************/ |
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <asm/asm-offsets.h> | 14 | #include <asm/asm-offsets.h> |
15 | #include <asm/coldfire.h> | 15 | #include <asm/coldfire.h> |
16 | #include <asm/mcfcache.h> | ||
17 | #include <asm/mcfsim.h> | 16 | #include <asm/mcfsim.h> |
18 | #include <asm/thread_info.h> | 17 | #include <asm/thread_info.h> |
19 | 18 | ||
@@ -173,10 +172,27 @@ _start: | |||
173 | 172 | ||
174 | /* | 173 | /* |
175 | * Now that we know what the memory is, lets enable cache | 174 | * Now that we know what the memory is, lets enable cache |
176 | * and get things moving. This is Coldfire CPU specific. | 175 | * and get things moving. This is Coldfire CPU specific. Not |
176 | * all version cores have identical cache register setup. But | ||
177 | * it is very similar. Define the exact settings in the headers | ||
178 | * then the code here is the same for all. | ||
177 | */ | 179 | */ |
178 | CACHE_ENABLE /* enable CPU cache */ | 180 | movel #CACHE_INIT,%d0 /* invalidate whole cache */ |
179 | 181 | movec %d0,%CACR | |
182 | nop | ||
183 | movel #ACR0_MODE,%d0 /* set RAM region for caching */ | ||
184 | movec %d0,%ACR0 | ||
185 | movel #ACR1_MODE,%d0 /* anything else to cache? */ | ||
186 | movec %d0,%ACR1 | ||
187 | #ifdef ACR2_MODE | ||
188 | movel #ACR2_MODE,%d0 | ||
189 | movec %d0,%ACR2 | ||
190 | movel #ACR3_MODE,%d0 | ||
191 | movec %d0,%ACR3 | ||
192 | #endif | ||
193 | movel #CACHE_MODE,%d0 /* enable cache */ | ||
194 | movec %d0,%CACR | ||
195 | nop | ||
180 | 196 | ||
181 | #ifdef CONFIG_ROMFS_FS | 197 | #ifdef CONFIG_ROMFS_FS |
182 | /* | 198 | /* |
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig index 5f5018a71a3..31680032053 100644 --- a/arch/microblaze/Kconfig +++ b/arch/microblaze/Kconfig | |||
@@ -15,6 +15,8 @@ config MICROBLAZE | |||
15 | select TRACING_SUPPORT | 15 | select TRACING_SUPPORT |
16 | select OF | 16 | select OF |
17 | select OF_EARLY_FLATTREE | 17 | select OF_EARLY_FLATTREE |
18 | select HAVE_GENERIC_HARDIRQS | ||
19 | select GENERIC_IRQ_PROBE | ||
18 | 20 | ||
19 | config SWAP | 21 | config SWAP |
20 | def_bool n | 22 | def_bool n |
@@ -37,12 +39,6 @@ config GENERIC_FIND_NEXT_BIT | |||
37 | config GENERIC_HWEIGHT | 39 | config GENERIC_HWEIGHT |
38 | def_bool y | 40 | def_bool y |
39 | 41 | ||
40 | config GENERIC_HARDIRQS | ||
41 | def_bool y | ||
42 | |||
43 | config GENERIC_IRQ_PROBE | ||
44 | def_bool y | ||
45 | |||
46 | config GENERIC_CALIBRATE_DELAY | 42 | config GENERIC_CALIBRATE_DELAY |
47 | def_bool y | 43 | def_bool y |
48 | 44 | ||
@@ -52,9 +48,6 @@ config GENERIC_TIME_VSYSCALL | |||
52 | config GENERIC_CLOCKEVENTS | 48 | config GENERIC_CLOCKEVENTS |
53 | def_bool y | 49 | def_bool y |
54 | 50 | ||
55 | config GENERIC_HARDIRQS_NO__DO_IRQ | ||
56 | def_bool y | ||
57 | |||
58 | config GENERIC_GPIO | 51 | config GENERIC_GPIO |
59 | def_bool y | 52 | def_bool y |
60 | 53 | ||
diff --git a/arch/microblaze/configs/mmu_defconfig b/arch/microblaze/configs/mmu_defconfig index ab8fbe7ad90..b3f5eecff2a 100644 --- a/arch/microblaze/configs/mmu_defconfig +++ b/arch/microblaze/configs/mmu_defconfig | |||
@@ -7,7 +7,7 @@ CONFIG_BLK_DEV_INITRD=y | |||
7 | CONFIG_INITRAMFS_SOURCE="rootfs.cpio" | 7 | CONFIG_INITRAMFS_SOURCE="rootfs.cpio" |
8 | CONFIG_INITRAMFS_COMPRESSION_GZIP=y | 8 | CONFIG_INITRAMFS_COMPRESSION_GZIP=y |
9 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 9 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
10 | CONFIG_EMBEDDED=y | 10 | CONFIG_EXPERT=y |
11 | CONFIG_KALLSYMS_ALL=y | 11 | CONFIG_KALLSYMS_ALL=y |
12 | CONFIG_KALLSYMS_EXTRA_PASS=y | 12 | CONFIG_KALLSYMS_EXTRA_PASS=y |
13 | # CONFIG_HOTPLUG is not set | 13 | # CONFIG_HOTPLUG is not set |
diff --git a/arch/microblaze/configs/nommu_defconfig b/arch/microblaze/configs/nommu_defconfig index ebc143c5368..0249e4b7e1d 100644 --- a/arch/microblaze/configs/nommu_defconfig +++ b/arch/microblaze/configs/nommu_defconfig | |||
@@ -6,7 +6,7 @@ CONFIG_BSD_PROCESS_ACCT_V3=y | |||
6 | CONFIG_IKCONFIG=y | 6 | CONFIG_IKCONFIG=y |
7 | CONFIG_IKCONFIG_PROC=y | 7 | CONFIG_IKCONFIG_PROC=y |
8 | CONFIG_SYSFS_DEPRECATED_V2=y | 8 | CONFIG_SYSFS_DEPRECATED_V2=y |
9 | CONFIG_EMBEDDED=y | 9 | CONFIG_EXPERT=y |
10 | CONFIG_KALLSYMS_ALL=y | 10 | CONFIG_KALLSYMS_ALL=y |
11 | CONFIG_KALLSYMS_EXTRA_PASS=y | 11 | CONFIG_KALLSYMS_EXTRA_PASS=y |
12 | # CONFIG_HOTPLUG is not set | 12 | # CONFIG_HOTPLUG is not set |
diff --git a/arch/microblaze/include/asm/irqflags.h b/arch/microblaze/include/asm/irqflags.h index 5fd31905775..c4532f032b3 100644 --- a/arch/microblaze/include/asm/irqflags.h +++ b/arch/microblaze/include/asm/irqflags.h | |||
@@ -12,7 +12,7 @@ | |||
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | #include <asm/registers.h> | 13 | #include <asm/registers.h> |
14 | 14 | ||
15 | #ifdef CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR | 15 | #if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR |
16 | 16 | ||
17 | static inline unsigned long arch_local_irq_save(void) | 17 | static inline unsigned long arch_local_irq_save(void) |
18 | { | 18 | { |
diff --git a/arch/microblaze/include/asm/pgtable.h b/arch/microblaze/include/asm/pgtable.h index cae268c22ba..885574a73f0 100644 --- a/arch/microblaze/include/asm/pgtable.h +++ b/arch/microblaze/include/asm/pgtable.h | |||
@@ -411,20 +411,19 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
411 | static inline unsigned long pte_update(pte_t *p, unsigned long clr, | 411 | static inline unsigned long pte_update(pte_t *p, unsigned long clr, |
412 | unsigned long set) | 412 | unsigned long set) |
413 | { | 413 | { |
414 | unsigned long old, tmp, msr; | 414 | unsigned long flags, old, tmp; |
415 | 415 | ||
416 | __asm__ __volatile__("\ | 416 | raw_local_irq_save(flags); |
417 | msrclr %2, 0x2\n\ | 417 | |
418 | nop\n\ | 418 | __asm__ __volatile__( "lw %0, %2, r0 \n" |
419 | lw %0, %4, r0\n\ | 419 | "andn %1, %0, %3 \n" |
420 | andn %1, %0, %5\n\ | 420 | "or %1, %1, %4 \n" |
421 | or %1, %1, %6\n\ | 421 | "sw %1, %2, r0 \n" |
422 | sw %1, %4, r0\n\ | 422 | : "=&r" (old), "=&r" (tmp) |
423 | mts rmsr, %2\n\ | 423 | : "r" ((unsigned long)(p + 1) - 4), "r" (clr), "r" (set) |
424 | nop" | 424 | : "cc"); |
425 | : "=&r" (old), "=&r" (tmp), "=&r" (msr), "=m" (*p) | 425 | |
426 | : "r" ((unsigned long)(p + 1) - 4), "r" (clr), "r" (set), "m" (*p) | 426 | raw_local_irq_restore(flags); |
427 | : "cc"); | ||
428 | 427 | ||
429 | return old; | 428 | return old; |
430 | } | 429 | } |
@@ -444,8 +443,9 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, | |||
444 | *ptep = pte; | 443 | *ptep = pte; |
445 | } | 444 | } |
446 | 445 | ||
447 | static inline int ptep_test_and_clear_young(struct mm_struct *mm, | 446 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG |
448 | unsigned long addr, pte_t *ptep) | 447 | static inline int ptep_test_and_clear_young(struct vm_area_struct *vma, |
448 | unsigned long address, pte_t *ptep) | ||
449 | { | 449 | { |
450 | return (pte_update(ptep, _PAGE_ACCESSED, 0) & _PAGE_ACCESSED) != 0; | 450 | return (pte_update(ptep, _PAGE_ACCESSED, 0) & _PAGE_ACCESSED) != 0; |
451 | } | 451 | } |
@@ -457,6 +457,7 @@ static inline int ptep_test_and_clear_dirty(struct mm_struct *mm, | |||
457 | (_PAGE_DIRTY | _PAGE_HWWRITE), 0) & _PAGE_DIRTY) != 0; | 457 | (_PAGE_DIRTY | _PAGE_HWWRITE), 0) & _PAGE_DIRTY) != 0; |
458 | } | 458 | } |
459 | 459 | ||
460 | #define __HAVE_ARCH_PTEP_GET_AND_CLEAR | ||
460 | static inline pte_t ptep_get_and_clear(struct mm_struct *mm, | 461 | static inline pte_t ptep_get_and_clear(struct mm_struct *mm, |
461 | unsigned long addr, pte_t *ptep) | 462 | unsigned long addr, pte_t *ptep) |
462 | { | 463 | { |
diff --git a/arch/microblaze/include/asm/tlb.h b/arch/microblaze/include/asm/tlb.h index e8abd4a0349..8aa97817cc8 100644 --- a/arch/microblaze/include/asm/tlb.h +++ b/arch/microblaze/include/asm/tlb.h | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #define tlb_flush(tlb) flush_tlb_mm((tlb)->mm) | 14 | #define tlb_flush(tlb) flush_tlb_mm((tlb)->mm) |
15 | 15 | ||
16 | #include <linux/pagemap.h> | ||
16 | #include <asm-generic/tlb.h> | 17 | #include <asm-generic/tlb.h> |
17 | 18 | ||
18 | #ifdef CONFIG_MMU | 19 | #ifdef CONFIG_MMU |
diff --git a/arch/microblaze/kernel/cpu/pvr.c b/arch/microblaze/kernel/cpu/pvr.c index e01afa68273..488c1ed24e3 100644 --- a/arch/microblaze/kernel/cpu/pvr.c +++ b/arch/microblaze/kernel/cpu/pvr.c | |||
@@ -27,7 +27,7 @@ | |||
27 | register unsigned tmp __asm__("r3"); \ | 27 | register unsigned tmp __asm__("r3"); \ |
28 | tmp = 0x0; /* Prevent warning about unused */ \ | 28 | tmp = 0x0; /* Prevent warning about unused */ \ |
29 | __asm__ __volatile__ ( \ | 29 | __asm__ __volatile__ ( \ |
30 | "mfs %0, rpvr" #pvrid ";" \ | 30 | "mfs %0, rpvr" #pvrid ";" \ |
31 | : "=r" (tmp) : : "memory"); \ | 31 | : "=r" (tmp) : : "memory"); \ |
32 | val = tmp; \ | 32 | val = tmp; \ |
33 | } | 33 | } |
@@ -54,7 +54,7 @@ int cpu_has_pvr(void) | |||
54 | if (!(flags & PVR_MSR_BIT)) | 54 | if (!(flags & PVR_MSR_BIT)) |
55 | return 0; | 55 | return 0; |
56 | 56 | ||
57 | get_single_pvr(0x00, pvr0); | 57 | get_single_pvr(0, pvr0); |
58 | pr_debug("%s: pvr0 is 0x%08x\n", __func__, pvr0); | 58 | pr_debug("%s: pvr0 is 0x%08x\n", __func__, pvr0); |
59 | 59 | ||
60 | if (pvr0 & PVR0_PVR_FULL_MASK) | 60 | if (pvr0 & PVR0_PVR_FULL_MASK) |
diff --git a/arch/microblaze/kernel/head.S b/arch/microblaze/kernel/head.S index 42434008209..778a5ce2e4f 100644 --- a/arch/microblaze/kernel/head.S +++ b/arch/microblaze/kernel/head.S | |||
@@ -62,23 +62,32 @@ real_start: | |||
62 | andi r1, r1, ~2 | 62 | andi r1, r1, ~2 |
63 | mts rmsr, r1 | 63 | mts rmsr, r1 |
64 | /* | 64 | /* |
65 | * Here is checking mechanism which check if Microblaze has msr instructions | 65 | * According to Xilinx, msrclr instruction behaves like 'mfs rX,rpc' |
66 | * We load msr and compare it with previous r1 value - if is the same, | 66 | * if the msrclr instruction is not enabled. We use this to detect |
67 | * msr instructions works if not - cpu don't have them. | 67 | * if the opcode is available, by issuing msrclr and then testing the result. |
68 | * r8 == 0 - msr instructions are implemented | ||
69 | * r8 != 0 - msr instructions are not implemented | ||
68 | */ | 70 | */ |
69 | /* r8=0 - I have msr instr, 1 - I don't have them */ | 71 | msrclr r8, 0 /* clear nothing - just read msr for test */ |
70 | rsubi r0, r0, 1 /* set the carry bit */ | 72 | cmpu r8, r8, r1 /* r1 must contain msr reg content */ |
71 | msrclr r0, 0x4 /* try to clear it */ | ||
72 | /* read the carry bit, r8 will be '0' if msrclr exists */ | ||
73 | addik r8, r0, 0 | ||
74 | 73 | ||
75 | /* r7 may point to an FDT, or there may be one linked in. | 74 | /* r7 may point to an FDT, or there may be one linked in. |
76 | if it's in r7, we've got to save it away ASAP. | 75 | if it's in r7, we've got to save it away ASAP. |
77 | We ensure r7 points to a valid FDT, just in case the bootloader | 76 | We ensure r7 points to a valid FDT, just in case the bootloader |
78 | is broken or non-existent */ | 77 | is broken or non-existent */ |
79 | beqi r7, no_fdt_arg /* NULL pointer? don't copy */ | 78 | beqi r7, no_fdt_arg /* NULL pointer? don't copy */ |
80 | lw r11, r0, r7 /* Does r7 point to a */ | 79 | /* Does r7 point to a valid FDT? Load HEADER magic number */ |
81 | rsubi r11, r11, OF_DT_HEADER /* valid FDT? */ | 80 | /* Run time Big/Little endian platform */ |
81 | /* Save 1 as word and load byte - 0 - BIG, 1 - LITTLE */ | ||
82 | addik r11, r0, 0x1 /* BIG/LITTLE checking value */ | ||
83 | /* __bss_start will be zeroed later - it is just temp location */ | ||
84 | swi r11, r0, TOPHYS(__bss_start) | ||
85 | lbui r11, r0, TOPHYS(__bss_start) | ||
86 | beqid r11, big_endian /* DO NOT break delay stop dependency */ | ||
87 | lw r11, r0, r7 /* Big endian load in delay slot */ | ||
88 | lwr r11, r0, r7 /* Little endian load */ | ||
89 | big_endian: | ||
90 | rsubi r11, r11, OF_DT_HEADER /* Check FDT header */ | ||
82 | beqi r11, _prepare_copy_fdt | 91 | beqi r11, _prepare_copy_fdt |
83 | or r7, r0, r0 /* clear R7 when not valid DTB */ | 92 | or r7, r0, r0 /* clear R7 when not valid DTB */ |
84 | bnei r11, no_fdt_arg /* No - get out of here */ | 93 | bnei r11, no_fdt_arg /* No - get out of here */ |
diff --git a/arch/microblaze/kernel/hw_exception_handler.S b/arch/microblaze/kernel/hw_exception_handler.S index 25f6e07d8de..782680de312 100644 --- a/arch/microblaze/kernel/hw_exception_handler.S +++ b/arch/microblaze/kernel/hw_exception_handler.S | |||
@@ -147,10 +147,6 @@ | |||
147 | #if CONFIG_XILINX_MICROBLAZE0_USE_BARREL > 0 | 147 | #if CONFIG_XILINX_MICROBLAZE0_USE_BARREL > 0 |
148 | #define BSRLI(rD, rA, imm) \ | 148 | #define BSRLI(rD, rA, imm) \ |
149 | bsrli rD, rA, imm | 149 | bsrli rD, rA, imm |
150 | #elif CONFIG_XILINX_MICROBLAZE0_USE_DIV > 0 | ||
151 | #define BSRLI(rD, rA, imm) \ | ||
152 | ori rD, r0, (1 << imm); \ | ||
153 | idivu rD, rD, rA | ||
154 | #else | 150 | #else |
155 | #define BSRLI(rD, rA, imm) BSRLI ## imm (rD, rA) | 151 | #define BSRLI(rD, rA, imm) BSRLI ## imm (rD, rA) |
156 | /* Only the used shift constants defined here - add more if needed */ | 152 | /* Only the used shift constants defined here - add more if needed */ |
diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c index c881393f07f..bceaa5543e3 100644 --- a/arch/microblaze/kernel/prom.c +++ b/arch/microblaze/kernel/prom.c | |||
@@ -47,9 +47,9 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size) | |||
47 | memblock_add(base, size); | 47 | memblock_add(base, size); |
48 | } | 48 | } |
49 | 49 | ||
50 | u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align) | 50 | void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align) |
51 | { | 51 | { |
52 | return memblock_alloc(size, align); | 52 | return __va(memblock_alloc(size, align)); |
53 | } | 53 | } |
54 | 54 | ||
55 | #ifdef CONFIG_EARLY_PRINTK | 55 | #ifdef CONFIG_EARLY_PRINTK |
diff --git a/arch/microblaze/kernel/setup.c b/arch/microblaze/kernel/setup.c index bb1558e4b28..9312fbb37ef 100644 --- a/arch/microblaze/kernel/setup.c +++ b/arch/microblaze/kernel/setup.c | |||
@@ -161,11 +161,11 @@ void __init machine_early_init(const char *cmdline, unsigned int ram, | |||
161 | #if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR | 161 | #if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR |
162 | if (msr) | 162 | if (msr) |
163 | eprintk("!!!Your kernel has setup MSR instruction but " | 163 | eprintk("!!!Your kernel has setup MSR instruction but " |
164 | "CPU don't have it %d\n", msr); | 164 | "CPU don't have it %x\n", msr); |
165 | #else | 165 | #else |
166 | if (!msr) | 166 | if (!msr) |
167 | eprintk("!!!Your kernel not setup MSR instruction but " | 167 | eprintk("!!!Your kernel not setup MSR instruction but " |
168 | "CPU have it %d\n", msr); | 168 | "CPU have it %x\n", msr); |
169 | #endif | 169 | #endif |
170 | 170 | ||
171 | for (src = __ivt_start; src < __ivt_end; src++, dst++) | 171 | for (src = __ivt_start; src < __ivt_end; src++, dst++) |
diff --git a/arch/microblaze/lib/fastcopy.S b/arch/microblaze/lib/fastcopy.S index fdc48bb065d..62021d7e249 100644 --- a/arch/microblaze/lib/fastcopy.S +++ b/arch/microblaze/lib/fastcopy.S | |||
@@ -29,6 +29,10 @@ | |||
29 | * between mem locations with size of xfer spec'd in bytes | 29 | * between mem locations with size of xfer spec'd in bytes |
30 | */ | 30 | */ |
31 | 31 | ||
32 | #ifdef __MICROBLAZEEL__ | ||
33 | #error Microblaze LE not support ASM optimized lib func. Disable OPT_LIB_ASM. | ||
34 | #endif | ||
35 | |||
32 | #include <linux/linkage.h> | 36 | #include <linux/linkage.h> |
33 | .text | 37 | .text |
34 | .globl memcpy | 38 | .globl memcpy |
diff --git a/arch/mips/Kbuild.platforms b/arch/mips/Kbuild.platforms index 78439b8a83c..7ff9b549204 100644 --- a/arch/mips/Kbuild.platforms +++ b/arch/mips/Kbuild.platforms | |||
@@ -2,6 +2,7 @@ | |||
2 | 2 | ||
3 | platforms += alchemy | 3 | platforms += alchemy |
4 | platforms += ar7 | 4 | platforms += ar7 |
5 | platforms += ath79 | ||
5 | platforms += bcm47xx | 6 | platforms += bcm47xx |
6 | platforms += bcm63xx | 7 | platforms += bcm63xx |
7 | platforms += cavium-octeon | 8 | platforms += cavium-octeon |
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index f489ec30e07..f5ecc0566bc 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -21,6 +21,7 @@ config MIPS | |||
21 | select HAVE_DMA_API_DEBUG | 21 | select HAVE_DMA_API_DEBUG |
22 | select HAVE_GENERIC_HARDIRQS | 22 | select HAVE_GENERIC_HARDIRQS |
23 | select GENERIC_IRQ_PROBE | 23 | select GENERIC_IRQ_PROBE |
24 | select HAVE_ARCH_JUMP_LABEL | ||
24 | 25 | ||
25 | menu "Machine selection" | 26 | menu "Machine selection" |
26 | 27 | ||
@@ -65,6 +66,22 @@ config AR7 | |||
65 | Support for the Texas Instruments AR7 System-on-a-Chip | 66 | Support for the Texas Instruments AR7 System-on-a-Chip |
66 | family: TNETD7100, 7200 and 7300. | 67 | family: TNETD7100, 7200 and 7300. |
67 | 68 | ||
69 | config ATH79 | ||
70 | bool "Atheros AR71XX/AR724X/AR913X based boards" | ||
71 | select ARCH_REQUIRE_GPIOLIB | ||
72 | select BOOT_RAW | ||
73 | select CEVT_R4K | ||
74 | select CSRC_R4K | ||
75 | select DMA_NONCOHERENT | ||
76 | select IRQ_CPU | ||
77 | select MIPS_MACHINE | ||
78 | select SYS_HAS_CPU_MIPS32_R2 | ||
79 | select SYS_HAS_EARLY_PRINTK | ||
80 | select SYS_SUPPORTS_32BIT_KERNEL | ||
81 | select SYS_SUPPORTS_BIG_ENDIAN | ||
82 | help | ||
83 | Support for the Atheros AR71XX/AR724X/AR913X SoCs. | ||
84 | |||
68 | config BCM47XX | 85 | config BCM47XX |
69 | bool "Broadcom BCM47XX based boards" | 86 | bool "Broadcom BCM47XX based boards" |
70 | select CEVT_R4K | 87 | select CEVT_R4K |
@@ -717,6 +734,7 @@ config CAVIUM_OCTEON_REFERENCE_BOARD | |||
717 | endchoice | 734 | endchoice |
718 | 735 | ||
719 | source "arch/mips/alchemy/Kconfig" | 736 | source "arch/mips/alchemy/Kconfig" |
737 | source "arch/mips/ath79/Kconfig" | ||
720 | source "arch/mips/bcm63xx/Kconfig" | 738 | source "arch/mips/bcm63xx/Kconfig" |
721 | source "arch/mips/jazz/Kconfig" | 739 | source "arch/mips/jazz/Kconfig" |
722 | source "arch/mips/jz4740/Kconfig" | 740 | source "arch/mips/jz4740/Kconfig" |
@@ -775,9 +793,6 @@ config SCHED_OMIT_FRAME_POINTER | |||
775 | bool | 793 | bool |
776 | default y | 794 | default y |
777 | 795 | ||
778 | config GENERIC_HARDIRQS_NO__DO_IRQ | ||
779 | def_bool y | ||
780 | |||
781 | # | 796 | # |
782 | # Select some configuration options automatically based on user selections. | 797 | # Select some configuration options automatically based on user selections. |
783 | # | 798 | # |
@@ -883,6 +898,9 @@ config MIPS_DISABLE_OBSOLETE_IDE | |||
883 | config SYNC_R4K | 898 | config SYNC_R4K |
884 | bool | 899 | bool |
885 | 900 | ||
901 | config MIPS_MACHINE | ||
902 | def_bool n | ||
903 | |||
886 | config NO_IOPORT | 904 | config NO_IOPORT |
887 | def_bool n | 905 | def_bool n |
888 | 906 | ||
@@ -2400,4 +2418,20 @@ source "security/Kconfig" | |||
2400 | 2418 | ||
2401 | source "crypto/Kconfig" | 2419 | source "crypto/Kconfig" |
2402 | 2420 | ||
2421 | menuconfig VIRTUALIZATION | ||
2422 | bool "Virtualization" | ||
2423 | default n | ||
2424 | ---help--- | ||
2425 | Say Y here to get to see options for using your Linux host to run other | ||
2426 | operating systems inside virtual machines (guests). | ||
2427 | This option alone does not add any kernel code. | ||
2428 | |||
2429 | If you say N, all options in this submenu will be skipped and disabled. | ||
2430 | |||
2431 | if VIRTUALIZATION | ||
2432 | |||
2433 | source drivers/virtio/Kconfig | ||
2434 | |||
2435 | endif # VIRTUALIZATION | ||
2436 | |||
2403 | source "lib/Kconfig" | 2437 | source "lib/Kconfig" |
diff --git a/arch/mips/Kconfig.debug b/arch/mips/Kconfig.debug index f437cd1fafb..5358f90b4dd 100644 --- a/arch/mips/Kconfig.debug +++ b/arch/mips/Kconfig.debug | |||
@@ -7,7 +7,7 @@ config TRACE_IRQFLAGS_SUPPORT | |||
7 | source "lib/Kconfig.debug" | 7 | source "lib/Kconfig.debug" |
8 | 8 | ||
9 | config EARLY_PRINTK | 9 | config EARLY_PRINTK |
10 | bool "Early printk" if EMBEDDED | 10 | bool "Early printk" if EXPERT |
11 | depends on SYS_HAS_EARLY_PRINTK | 11 | depends on SYS_HAS_EARLY_PRINTK |
12 | default y | 12 | default y |
13 | help | 13 | help |
diff --git a/arch/mips/ath79/Kconfig b/arch/mips/ath79/Kconfig new file mode 100644 index 00000000000..b05828260f7 --- /dev/null +++ b/arch/mips/ath79/Kconfig | |||
@@ -0,0 +1,50 @@ | |||
1 | if ATH79 | ||
2 | |||
3 | menu "Atheros AR71XX/AR724X/AR913X machine selection" | ||
4 | |||
5 | config ATH79_MACH_AP81 | ||
6 | bool "Atheros AP81 reference board" | ||
7 | select SOC_AR913X | ||
8 | select ATH79_DEV_AR913X_WMAC | ||
9 | select ATH79_DEV_GPIO_BUTTONS | ||
10 | select ATH79_DEV_LEDS_GPIO | ||
11 | select ATH79_DEV_SPI | ||
12 | help | ||
13 | Say 'Y' here if you want your kernel to support the | ||
14 | Atheros AP81 reference board. | ||
15 | |||
16 | config ATH79_MACH_PB44 | ||
17 | bool "Atheros PB44 reference board" | ||
18 | select SOC_AR71XX | ||
19 | select ATH79_DEV_GPIO_BUTTONS | ||
20 | select ATH79_DEV_LEDS_GPIO | ||
21 | select ATH79_DEV_SPI | ||
22 | help | ||
23 | Say 'Y' here if you want your kernel to support the | ||
24 | Atheros PB44 reference board. | ||
25 | |||
26 | endmenu | ||
27 | |||
28 | config SOC_AR71XX | ||
29 | def_bool n | ||
30 | |||
31 | config SOC_AR724X | ||
32 | def_bool n | ||
33 | |||
34 | config SOC_AR913X | ||
35 | def_bool n | ||
36 | |||
37 | config ATH79_DEV_AR913X_WMAC | ||
38 | depends on SOC_AR913X | ||
39 | def_bool n | ||
40 | |||
41 | config ATH79_DEV_GPIO_BUTTONS | ||
42 | def_bool n | ||
43 | |||
44 | config ATH79_DEV_LEDS_GPIO | ||
45 | def_bool n | ||
46 | |||
47 | config ATH79_DEV_SPI | ||
48 | def_bool n | ||
49 | |||
50 | endif | ||
diff --git a/arch/mips/ath79/Makefile b/arch/mips/ath79/Makefile new file mode 100644 index 00000000000..c33d4653007 --- /dev/null +++ b/arch/mips/ath79/Makefile | |||
@@ -0,0 +1,28 @@ | |||
1 | # | ||
2 | # Makefile for the Atheros AR71XX/AR724X/AR913X specific parts of the kernel | ||
3 | # | ||
4 | # Copyright (C) 2008-2011 Gabor Juhos <juhosg@openwrt.org> | ||
5 | # Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> | ||
6 | # | ||
7 | # This program is free software; you can redistribute it and/or modify it | ||
8 | # under the terms of the GNU General Public License version 2 as published | ||
9 | # by the Free Software Foundation. | ||
10 | |||
11 | obj-y := prom.o setup.o irq.o common.o clock.o gpio.o | ||
12 | |||
13 | obj-$(CONFIG_EARLY_PRINTK) += early_printk.o | ||
14 | |||
15 | # | ||
16 | # Devices | ||
17 | # | ||
18 | obj-y += dev-common.o | ||
19 | obj-$(CONFIG_ATH79_DEV_AR913X_WMAC) += dev-ar913x-wmac.o | ||
20 | obj-$(CONFIG_ATH79_DEV_GPIO_BUTTONS) += dev-gpio-buttons.o | ||
21 | obj-$(CONFIG_ATH79_DEV_LEDS_GPIO) += dev-leds-gpio.o | ||
22 | obj-$(CONFIG_ATH79_DEV_SPI) += dev-spi.o | ||
23 | |||
24 | # | ||
25 | # Machines | ||
26 | # | ||
27 | obj-$(CONFIG_ATH79_MACH_AP81) += mach-ap81.o | ||
28 | obj-$(CONFIG_ATH79_MACH_PB44) += mach-pb44.o | ||
diff --git a/arch/mips/ath79/Platform b/arch/mips/ath79/Platform new file mode 100644 index 00000000000..2bd663647d2 --- /dev/null +++ b/arch/mips/ath79/Platform | |||
@@ -0,0 +1,7 @@ | |||
1 | # | ||
2 | # Atheros AR71xx/AR724x/AR913x | ||
3 | # | ||
4 | |||
5 | platform-$(CONFIG_ATH79) += ath79/ | ||
6 | cflags-$(CONFIG_ATH79) += -I$(srctree)/arch/mips/include/asm/mach-ath79 | ||
7 | load-$(CONFIG_ATH79) = 0xffffffff80060000 | ||
diff --git a/arch/mips/ath79/clock.c b/arch/mips/ath79/clock.c new file mode 100644 index 00000000000..680bde99a26 --- /dev/null +++ b/arch/mips/ath79/clock.c | |||
@@ -0,0 +1,183 @@ | |||
1 | /* | ||
2 | * Atheros AR71XX/AR724X/AR913X common routines | ||
3 | * | ||
4 | * Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License version 2 as published | ||
8 | * by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/module.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/err.h> | ||
15 | #include <linux/clk.h> | ||
16 | |||
17 | #include <asm/mach-ath79/ath79.h> | ||
18 | #include <asm/mach-ath79/ar71xx_regs.h> | ||
19 | #include "common.h" | ||
20 | |||
21 | #define AR71XX_BASE_FREQ 40000000 | ||
22 | #define AR724X_BASE_FREQ 5000000 | ||
23 | #define AR913X_BASE_FREQ 5000000 | ||
24 | |||
25 | struct clk { | ||
26 | unsigned long rate; | ||
27 | }; | ||
28 | |||
29 | static struct clk ath79_ref_clk; | ||
30 | static struct clk ath79_cpu_clk; | ||
31 | static struct clk ath79_ddr_clk; | ||
32 | static struct clk ath79_ahb_clk; | ||
33 | static struct clk ath79_wdt_clk; | ||
34 | static struct clk ath79_uart_clk; | ||
35 | |||
36 | static void __init ar71xx_clocks_init(void) | ||
37 | { | ||
38 | u32 pll; | ||
39 | u32 freq; | ||
40 | u32 div; | ||
41 | |||
42 | ath79_ref_clk.rate = AR71XX_BASE_FREQ; | ||
43 | |||
44 | pll = ath79_pll_rr(AR71XX_PLL_REG_CPU_CONFIG); | ||
45 | |||
46 | div = ((pll >> AR71XX_PLL_DIV_SHIFT) & AR71XX_PLL_DIV_MASK) + 1; | ||
47 | freq = div * ath79_ref_clk.rate; | ||
48 | |||
49 | div = ((pll >> AR71XX_CPU_DIV_SHIFT) & AR71XX_CPU_DIV_MASK) + 1; | ||
50 | ath79_cpu_clk.rate = freq / div; | ||
51 | |||
52 | div = ((pll >> AR71XX_DDR_DIV_SHIFT) & AR71XX_DDR_DIV_MASK) + 1; | ||
53 | ath79_ddr_clk.rate = freq / div; | ||
54 | |||
55 | div = (((pll >> AR71XX_AHB_DIV_SHIFT) & AR71XX_AHB_DIV_MASK) + 1) * 2; | ||
56 | ath79_ahb_clk.rate = ath79_cpu_clk.rate / div; | ||
57 | |||
58 | ath79_wdt_clk.rate = ath79_ahb_clk.rate; | ||
59 | ath79_uart_clk.rate = ath79_ahb_clk.rate; | ||
60 | } | ||
61 | |||
62 | static void __init ar724x_clocks_init(void) | ||
63 | { | ||
64 | u32 pll; | ||
65 | u32 freq; | ||
66 | u32 div; | ||
67 | |||
68 | ath79_ref_clk.rate = AR724X_BASE_FREQ; | ||
69 | pll = ath79_pll_rr(AR724X_PLL_REG_CPU_CONFIG); | ||
70 | |||
71 | div = ((pll >> AR724X_PLL_DIV_SHIFT) & AR724X_PLL_DIV_MASK); | ||
72 | freq = div * ath79_ref_clk.rate; | ||
73 | |||
74 | div = ((pll >> AR724X_PLL_REF_DIV_SHIFT) & AR724X_PLL_REF_DIV_MASK); | ||
75 | freq *= div; | ||
76 | |||
77 | ath79_cpu_clk.rate = freq; | ||
78 | |||
79 | div = ((pll >> AR724X_DDR_DIV_SHIFT) & AR724X_DDR_DIV_MASK) + 1; | ||
80 | ath79_ddr_clk.rate = freq / div; | ||
81 | |||
82 | div = (((pll >> AR724X_AHB_DIV_SHIFT) & AR724X_AHB_DIV_MASK) + 1) * 2; | ||
83 | ath79_ahb_clk.rate = ath79_cpu_clk.rate / div; | ||
84 | |||
85 | ath79_wdt_clk.rate = ath79_ahb_clk.rate; | ||
86 | ath79_uart_clk.rate = ath79_ahb_clk.rate; | ||
87 | } | ||
88 | |||
89 | static void __init ar913x_clocks_init(void) | ||
90 | { | ||
91 | u32 pll; | ||
92 | u32 freq; | ||
93 | u32 div; | ||
94 | |||
95 | ath79_ref_clk.rate = AR913X_BASE_FREQ; | ||
96 | pll = ath79_pll_rr(AR913X_PLL_REG_CPU_CONFIG); | ||
97 | |||
98 | div = ((pll >> AR913X_PLL_DIV_SHIFT) & AR913X_PLL_DIV_MASK); | ||
99 | freq = div * ath79_ref_clk.rate; | ||
100 | |||
101 | ath79_cpu_clk.rate = freq; | ||
102 | |||
103 | div = ((pll >> AR913X_DDR_DIV_SHIFT) & AR913X_DDR_DIV_MASK) + 1; | ||
104 | ath79_ddr_clk.rate = freq / div; | ||
105 | |||
106 | div = (((pll >> AR913X_AHB_DIV_SHIFT) & AR913X_AHB_DIV_MASK) + 1) * 2; | ||
107 | ath79_ahb_clk.rate = ath79_cpu_clk.rate / div; | ||
108 | |||
109 | ath79_wdt_clk.rate = ath79_ahb_clk.rate; | ||
110 | ath79_uart_clk.rate = ath79_ahb_clk.rate; | ||
111 | } | ||
112 | |||
113 | void __init ath79_clocks_init(void) | ||
114 | { | ||
115 | if (soc_is_ar71xx()) | ||
116 | ar71xx_clocks_init(); | ||
117 | else if (soc_is_ar724x()) | ||
118 | ar724x_clocks_init(); | ||
119 | else if (soc_is_ar913x()) | ||
120 | ar913x_clocks_init(); | ||
121 | else | ||
122 | BUG(); | ||
123 | |||
124 | pr_info("Clocks: CPU:%lu.%03luMHz, DDR:%lu.%03luMHz, AHB:%lu.%03luMHz, " | ||
125 | "Ref:%lu.%03luMHz", | ||
126 | ath79_cpu_clk.rate / 1000000, | ||
127 | (ath79_cpu_clk.rate / 1000) % 1000, | ||
128 | ath79_ddr_clk.rate / 1000000, | ||
129 | (ath79_ddr_clk.rate / 1000) % 1000, | ||
130 | ath79_ahb_clk.rate / 1000000, | ||
131 | (ath79_ahb_clk.rate / 1000) % 1000, | ||
132 | ath79_ref_clk.rate / 1000000, | ||
133 | (ath79_ref_clk.rate / 1000) % 1000); | ||
134 | } | ||
135 | |||
136 | /* | ||
137 | * Linux clock API | ||
138 | */ | ||
139 | struct clk *clk_get(struct device *dev, const char *id) | ||
140 | { | ||
141 | if (!strcmp(id, "ref")) | ||
142 | return &ath79_ref_clk; | ||
143 | |||
144 | if (!strcmp(id, "cpu")) | ||
145 | return &ath79_cpu_clk; | ||
146 | |||
147 | if (!strcmp(id, "ddr")) | ||
148 | return &ath79_ddr_clk; | ||
149 | |||
150 | if (!strcmp(id, "ahb")) | ||
151 | return &ath79_ahb_clk; | ||
152 | |||
153 | if (!strcmp(id, "wdt")) | ||
154 | return &ath79_wdt_clk; | ||
155 | |||
156 | if (!strcmp(id, "uart")) | ||
157 | return &ath79_uart_clk; | ||
158 | |||
159 | return ERR_PTR(-ENOENT); | ||
160 | } | ||
161 | EXPORT_SYMBOL(clk_get); | ||
162 | |||
163 | int clk_enable(struct clk *clk) | ||
164 | { | ||
165 | return 0; | ||
166 | } | ||
167 | EXPORT_SYMBOL(clk_enable); | ||
168 | |||
169 | void clk_disable(struct clk *clk) | ||
170 | { | ||
171 | } | ||
172 | EXPORT_SYMBOL(clk_disable); | ||
173 | |||
174 | unsigned long clk_get_rate(struct clk *clk) | ||
175 | { | ||
176 | return clk->rate; | ||
177 | } | ||
178 | EXPORT_SYMBOL(clk_get_rate); | ||
179 | |||
180 | void clk_put(struct clk *clk) | ||
181 | { | ||
182 | } | ||
183 | EXPORT_SYMBOL(clk_put); | ||
diff --git a/arch/mips/ath79/common.c b/arch/mips/ath79/common.c new file mode 100644 index 00000000000..58f60e722a0 --- /dev/null +++ b/arch/mips/ath79/common.c | |||
@@ -0,0 +1,97 @@ | |||
1 | /* | ||
2 | * Atheros AR71XX/AR724X/AR913X common routines | ||
3 | * | ||
4 | * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org> | ||
5 | * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published | ||
9 | * by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/module.h> | ||
14 | #include <linux/types.h> | ||
15 | #include <linux/spinlock.h> | ||
16 | |||
17 | #include <asm/mach-ath79/ath79.h> | ||
18 | #include <asm/mach-ath79/ar71xx_regs.h> | ||
19 | #include "common.h" | ||
20 | |||
21 | static DEFINE_SPINLOCK(ath79_device_reset_lock); | ||
22 | |||
23 | u32 ath79_cpu_freq; | ||
24 | EXPORT_SYMBOL_GPL(ath79_cpu_freq); | ||
25 | |||
26 | u32 ath79_ahb_freq; | ||
27 | EXPORT_SYMBOL_GPL(ath79_ahb_freq); | ||
28 | |||
29 | u32 ath79_ddr_freq; | ||
30 | EXPORT_SYMBOL_GPL(ath79_ddr_freq); | ||
31 | |||
32 | enum ath79_soc_type ath79_soc; | ||
33 | |||
34 | void __iomem *ath79_pll_base; | ||
35 | void __iomem *ath79_reset_base; | ||
36 | EXPORT_SYMBOL_GPL(ath79_reset_base); | ||
37 | void __iomem *ath79_ddr_base; | ||
38 | |||
39 | void ath79_ddr_wb_flush(u32 reg) | ||
40 | { | ||
41 | void __iomem *flush_reg = ath79_ddr_base + reg; | ||
42 | |||
43 | /* Flush the DDR write buffer. */ | ||
44 | __raw_writel(0x1, flush_reg); | ||
45 | while (__raw_readl(flush_reg) & 0x1) | ||
46 | ; | ||
47 | |||
48 | /* It must be run twice. */ | ||
49 | __raw_writel(0x1, flush_reg); | ||
50 | while (__raw_readl(flush_reg) & 0x1) | ||
51 | ; | ||
52 | } | ||
53 | EXPORT_SYMBOL_GPL(ath79_ddr_wb_flush); | ||
54 | |||
55 | void ath79_device_reset_set(u32 mask) | ||
56 | { | ||
57 | unsigned long flags; | ||
58 | u32 reg; | ||
59 | u32 t; | ||
60 | |||
61 | if (soc_is_ar71xx()) | ||
62 | reg = AR71XX_RESET_REG_RESET_MODULE; | ||
63 | else if (soc_is_ar724x()) | ||
64 | reg = AR724X_RESET_REG_RESET_MODULE; | ||
65 | else if (soc_is_ar913x()) | ||
66 | reg = AR913X_RESET_REG_RESET_MODULE; | ||
67 | else | ||
68 | BUG(); | ||
69 | |||
70 | spin_lock_irqsave(&ath79_device_reset_lock, flags); | ||
71 | t = ath79_reset_rr(reg); | ||
72 | ath79_reset_wr(reg, t | mask); | ||
73 | spin_unlock_irqrestore(&ath79_device_reset_lock, flags); | ||
74 | } | ||
75 | EXPORT_SYMBOL_GPL(ath79_device_reset_set); | ||
76 | |||
77 | void ath79_device_reset_clear(u32 mask) | ||
78 | { | ||
79 | unsigned long flags; | ||
80 | u32 reg; | ||
81 | u32 t; | ||
82 | |||
83 | if (soc_is_ar71xx()) | ||
84 | reg = AR71XX_RESET_REG_RESET_MODULE; | ||
85 | else if (soc_is_ar724x()) | ||
86 | reg = AR724X_RESET_REG_RESET_MODULE; | ||
87 | else if (soc_is_ar913x()) | ||
88 | reg = AR913X_RESET_REG_RESET_MODULE; | ||
89 | else | ||
90 | BUG(); | ||
91 | |||
92 | spin_lock_irqsave(&ath79_device_reset_lock, flags); | ||
93 | t = ath79_reset_rr(reg); | ||
94 | ath79_reset_wr(reg, t & ~mask); | ||
95 | spin_unlock_irqrestore(&ath79_device_reset_lock, flags); | ||
96 | } | ||
97 | EXPORT_SYMBOL_GPL(ath79_device_reset_clear); | ||
diff --git a/arch/mips/ath79/common.h b/arch/mips/ath79/common.h new file mode 100644 index 00000000000..561906c2345 --- /dev/null +++ b/arch/mips/ath79/common.h | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * Atheros AR71XX/AR724X/AR913X common definitions | ||
3 | * | ||
4 | * Copyright (C) 2008-2011 Gabor Juhos <juhosg@openwrt.org> | ||
5 | * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> | ||
6 | * | ||
7 | * Parts of this file are based on Atheros' 2.6.15 BSP | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License version 2 as published | ||
11 | * by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #ifndef __ATH79_COMMON_H | ||
15 | #define __ATH79_COMMON_H | ||
16 | |||
17 | #include <linux/types.h> | ||
18 | #include <linux/init.h> | ||
19 | |||
20 | #define ATH79_MEM_SIZE_MIN (2 * 1024 * 1024) | ||
21 | #define ATH79_MEM_SIZE_MAX (128 * 1024 * 1024) | ||
22 | |||
23 | void ath79_clocks_init(void); | ||
24 | void ath79_ddr_wb_flush(unsigned int reg); | ||
25 | |||
26 | void ath79_gpio_function_enable(u32 mask); | ||
27 | void ath79_gpio_function_disable(u32 mask); | ||
28 | void ath79_gpio_function_setup(u32 set, u32 clear); | ||
29 | void ath79_gpio_init(void); | ||
30 | |||
31 | #endif /* __ATH79_COMMON_H */ | ||
diff --git a/arch/mips/ath79/dev-ar913x-wmac.c b/arch/mips/ath79/dev-ar913x-wmac.c new file mode 100644 index 00000000000..48f425a5ba2 --- /dev/null +++ b/arch/mips/ath79/dev-ar913x-wmac.c | |||
@@ -0,0 +1,60 @@ | |||
1 | /* | ||
2 | * Atheros AR913X SoC built-in WMAC device support | ||
3 | * | ||
4 | * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org> | ||
5 | * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published | ||
9 | * by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #include <linux/init.h> | ||
13 | #include <linux/delay.h> | ||
14 | #include <linux/irq.h> | ||
15 | #include <linux/platform_device.h> | ||
16 | #include <linux/ath9k_platform.h> | ||
17 | |||
18 | #include <asm/mach-ath79/ath79.h> | ||
19 | #include <asm/mach-ath79/ar71xx_regs.h> | ||
20 | #include "dev-ar913x-wmac.h" | ||
21 | |||
22 | static struct ath9k_platform_data ar913x_wmac_data; | ||
23 | |||
24 | static struct resource ar913x_wmac_resources[] = { | ||
25 | { | ||
26 | .start = AR913X_WMAC_BASE, | ||
27 | .end = AR913X_WMAC_BASE + AR913X_WMAC_SIZE - 1, | ||
28 | .flags = IORESOURCE_MEM, | ||
29 | }, { | ||
30 | .start = ATH79_CPU_IRQ_IP2, | ||
31 | .end = ATH79_CPU_IRQ_IP2, | ||
32 | .flags = IORESOURCE_IRQ, | ||
33 | }, | ||
34 | }; | ||
35 | |||
36 | static struct platform_device ar913x_wmac_device = { | ||
37 | .name = "ath9k", | ||
38 | .id = -1, | ||
39 | .resource = ar913x_wmac_resources, | ||
40 | .num_resources = ARRAY_SIZE(ar913x_wmac_resources), | ||
41 | .dev = { | ||
42 | .platform_data = &ar913x_wmac_data, | ||
43 | }, | ||
44 | }; | ||
45 | |||
46 | void __init ath79_register_ar913x_wmac(u8 *cal_data) | ||
47 | { | ||
48 | if (cal_data) | ||
49 | memcpy(ar913x_wmac_data.eeprom_data, cal_data, | ||
50 | sizeof(ar913x_wmac_data.eeprom_data)); | ||
51 | |||
52 | /* reset the WMAC */ | ||
53 | ath79_device_reset_set(AR913X_RESET_AMBA2WMAC); | ||
54 | mdelay(10); | ||
55 | |||
56 | ath79_device_reset_clear(AR913X_RESET_AMBA2WMAC); | ||
57 | mdelay(10); | ||
58 | |||
59 | platform_device_register(&ar913x_wmac_device); | ||
60 | } | ||
diff --git a/arch/mips/ath79/dev-ar913x-wmac.h b/arch/mips/ath79/dev-ar913x-wmac.h new file mode 100644 index 00000000000..579d562bbda --- /dev/null +++ b/arch/mips/ath79/dev-ar913x-wmac.h | |||
@@ -0,0 +1,17 @@ | |||
1 | /* | ||
2 | * Atheros AR913X SoC built-in WMAC device support | ||
3 | * | ||
4 | * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org> | ||
5 | * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published | ||
9 | * by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #ifndef _ATH79_DEV_AR913X_WMAC_H | ||
13 | #define _ATH79_DEV_AR913X_WMAC_H | ||
14 | |||
15 | void ath79_register_ar913x_wmac(u8 *cal_data); | ||
16 | |||
17 | #endif /* _ATH79_DEV_AR913X_WMAC_H */ | ||
diff --git a/arch/mips/ath79/dev-common.c b/arch/mips/ath79/dev-common.c new file mode 100644 index 00000000000..3b82e325beb --- /dev/null +++ b/arch/mips/ath79/dev-common.c | |||
@@ -0,0 +1,77 @@ | |||
1 | /* | ||
2 | * Atheros AR71XX/AR724X/AR913X common devices | ||
3 | * | ||
4 | * Copyright (C) 2008-2011 Gabor Juhos <juhosg@openwrt.org> | ||
5 | * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> | ||
6 | * | ||
7 | * Parts of this file are based on Atheros' 2.6.15 BSP | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License version 2 as published | ||
11 | * by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/platform_device.h> | ||
17 | #include <linux/serial_8250.h> | ||
18 | #include <linux/clk.h> | ||
19 | #include <linux/err.h> | ||
20 | |||
21 | #include <asm/mach-ath79/ath79.h> | ||
22 | #include <asm/mach-ath79/ar71xx_regs.h> | ||
23 | #include "common.h" | ||
24 | #include "dev-common.h" | ||
25 | |||
26 | static struct resource ath79_uart_resources[] = { | ||
27 | { | ||
28 | .start = AR71XX_UART_BASE, | ||
29 | .end = AR71XX_UART_BASE + AR71XX_UART_SIZE - 1, | ||
30 | .flags = IORESOURCE_MEM, | ||
31 | }, | ||
32 | }; | ||
33 | |||
34 | #define AR71XX_UART_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP) | ||
35 | static struct plat_serial8250_port ath79_uart_data[] = { | ||
36 | { | ||
37 | .mapbase = AR71XX_UART_BASE, | ||
38 | .irq = ATH79_MISC_IRQ_UART, | ||
39 | .flags = AR71XX_UART_FLAGS, | ||
40 | .iotype = UPIO_MEM32, | ||
41 | .regshift = 2, | ||
42 | }, { | ||
43 | /* terminating entry */ | ||
44 | } | ||
45 | }; | ||
46 | |||
47 | static struct platform_device ath79_uart_device = { | ||
48 | .name = "serial8250", | ||
49 | .id = PLAT8250_DEV_PLATFORM, | ||
50 | .resource = ath79_uart_resources, | ||
51 | .num_resources = ARRAY_SIZE(ath79_uart_resources), | ||
52 | .dev = { | ||
53 | .platform_data = ath79_uart_data | ||
54 | }, | ||
55 | }; | ||
56 | |||
57 | void __init ath79_register_uart(void) | ||
58 | { | ||
59 | struct clk *clk; | ||
60 | |||
61 | clk = clk_get(NULL, "uart"); | ||
62 | if (IS_ERR(clk)) | ||
63 | panic("unable to get UART clock, err=%ld", PTR_ERR(clk)); | ||
64 | |||
65 | ath79_uart_data[0].uartclk = clk_get_rate(clk); | ||
66 | platform_device_register(&ath79_uart_device); | ||
67 | } | ||
68 | |||
69 | static struct platform_device ath79_wdt_device = { | ||
70 | .name = "ath79-wdt", | ||
71 | .id = -1, | ||
72 | }; | ||
73 | |||
74 | void __init ath79_register_wdt(void) | ||
75 | { | ||
76 | platform_device_register(&ath79_wdt_device); | ||
77 | } | ||
diff --git a/arch/mips/ath79/dev-common.h b/arch/mips/ath79/dev-common.h new file mode 100644 index 00000000000..0f514e1affc --- /dev/null +++ b/arch/mips/ath79/dev-common.h | |||
@@ -0,0 +1,18 @@ | |||
1 | /* | ||
2 | * Atheros AR71XX/AR724X/AR913X common devices | ||
3 | * | ||
4 | * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org> | ||
5 | * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published | ||
9 | * by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #ifndef _ATH79_DEV_COMMON_H | ||
13 | #define _ATH79_DEV_COMMON_H | ||
14 | |||
15 | void ath79_register_uart(void); | ||
16 | void ath79_register_wdt(void); | ||
17 | |||
18 | #endif /* _ATH79_DEV_COMMON_H */ | ||
diff --git a/arch/mips/ath79/dev-gpio-buttons.c b/arch/mips/ath79/dev-gpio-buttons.c new file mode 100644 index 00000000000..4b0168a11c0 --- /dev/null +++ b/arch/mips/ath79/dev-gpio-buttons.c | |||
@@ -0,0 +1,58 @@ | |||
1 | /* | ||
2 | * Atheros AR71XX/AR724X/AR913X GPIO button support | ||
3 | * | ||
4 | * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org> | ||
5 | * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published | ||
9 | * by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #include "linux/init.h" | ||
13 | #include "linux/slab.h" | ||
14 | #include <linux/platform_device.h> | ||
15 | |||
16 | #include "dev-gpio-buttons.h" | ||
17 | |||
18 | void __init ath79_register_gpio_keys_polled(int id, | ||
19 | unsigned poll_interval, | ||
20 | unsigned nbuttons, | ||
21 | struct gpio_keys_button *buttons) | ||
22 | { | ||
23 | struct platform_device *pdev; | ||
24 | struct gpio_keys_platform_data pdata; | ||
25 | struct gpio_keys_button *p; | ||
26 | int err; | ||
27 | |||
28 | p = kmalloc(nbuttons * sizeof(*p), GFP_KERNEL); | ||
29 | if (!p) | ||
30 | return; | ||
31 | |||
32 | memcpy(p, buttons, nbuttons * sizeof(*p)); | ||
33 | |||
34 | pdev = platform_device_alloc("gpio-keys-polled", id); | ||
35 | if (!pdev) | ||
36 | goto err_free_buttons; | ||
37 | |||
38 | memset(&pdata, 0, sizeof(pdata)); | ||
39 | pdata.poll_interval = poll_interval; | ||
40 | pdata.nbuttons = nbuttons; | ||
41 | pdata.buttons = p; | ||
42 | |||
43 | err = platform_device_add_data(pdev, &pdata, sizeof(pdata)); | ||
44 | if (err) | ||
45 | goto err_put_pdev; | ||
46 | |||
47 | err = platform_device_add(pdev); | ||
48 | if (err) | ||
49 | goto err_put_pdev; | ||
50 | |||
51 | return; | ||
52 | |||
53 | err_put_pdev: | ||
54 | platform_device_put(pdev); | ||
55 | |||
56 | err_free_buttons: | ||
57 | kfree(p); | ||
58 | } | ||
diff --git a/arch/mips/ath79/dev-gpio-buttons.h b/arch/mips/ath79/dev-gpio-buttons.h new file mode 100644 index 00000000000..481847ac1cb --- /dev/null +++ b/arch/mips/ath79/dev-gpio-buttons.h | |||
@@ -0,0 +1,23 @@ | |||
1 | /* | ||
2 | * Atheros AR71XX/AR724X/AR913X GPIO button support | ||
3 | * | ||
4 | * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org> | ||
5 | * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published | ||
9 | * by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #ifndef _ATH79_DEV_GPIO_BUTTONS_H | ||
13 | #define _ATH79_DEV_GPIO_BUTTONS_H | ||
14 | |||
15 | #include <linux/input.h> | ||
16 | #include <linux/gpio_keys.h> | ||
17 | |||
18 | void ath79_register_gpio_keys_polled(int id, | ||
19 | unsigned poll_interval, | ||
20 | unsigned nbuttons, | ||
21 | struct gpio_keys_button *buttons); | ||
22 | |||
23 | #endif /* _ATH79_DEV_GPIO_BUTTONS_H */ | ||
diff --git a/arch/mips/ath79/dev-leds-gpio.c b/arch/mips/ath79/dev-leds-gpio.c new file mode 100644 index 00000000000..cdade68dcd1 --- /dev/null +++ b/arch/mips/ath79/dev-leds-gpio.c | |||
@@ -0,0 +1,56 @@ | |||
1 | /* | ||
2 | * Atheros AR71XX/AR724X/AR913X common GPIO LEDs support | ||
3 | * | ||
4 | * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org> | ||
5 | * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published | ||
9 | * by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #include <linux/init.h> | ||
13 | #include <linux/slab.h> | ||
14 | #include <linux/platform_device.h> | ||
15 | |||
16 | #include "dev-leds-gpio.h" | ||
17 | |||
18 | void __init ath79_register_leds_gpio(int id, | ||
19 | unsigned num_leds, | ||
20 | struct gpio_led *leds) | ||
21 | { | ||
22 | struct platform_device *pdev; | ||
23 | struct gpio_led_platform_data pdata; | ||
24 | struct gpio_led *p; | ||
25 | int err; | ||
26 | |||
27 | p = kmalloc(num_leds * sizeof(*p), GFP_KERNEL); | ||
28 | if (!p) | ||
29 | return; | ||
30 | |||
31 | memcpy(p, leds, num_leds * sizeof(*p)); | ||
32 | |||
33 | pdev = platform_device_alloc("leds-gpio", id); | ||
34 | if (!pdev) | ||
35 | goto err_free_leds; | ||
36 | |||
37 | memset(&pdata, 0, sizeof(pdata)); | ||
38 | pdata.num_leds = num_leds; | ||
39 | pdata.leds = p; | ||
40 | |||
41 | err = platform_device_add_data(pdev, &pdata, sizeof(pdata)); | ||
42 | if (err) | ||
43 | goto err_put_pdev; | ||
44 | |||
45 | err = platform_device_add(pdev); | ||
46 | if (err) | ||
47 | goto err_put_pdev; | ||
48 | |||
49 | return; | ||
50 | |||
51 | err_put_pdev: | ||
52 | platform_device_put(pdev); | ||
53 | |||
54 | err_free_leds: | ||
55 | kfree(p); | ||
56 | } | ||
diff --git a/arch/mips/ath79/dev-leds-gpio.h b/arch/mips/ath79/dev-leds-gpio.h new file mode 100644 index 00000000000..6e5d8851ebc --- /dev/null +++ b/arch/mips/ath79/dev-leds-gpio.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | * Atheros AR71XX/AR724X/AR913X common GPIO LEDs support | ||
3 | * | ||
4 | * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org> | ||
5 | * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published | ||
9 | * by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #ifndef _ATH79_DEV_LEDS_GPIO_H | ||
13 | #define _ATH79_DEV_LEDS_GPIO_H | ||
14 | |||
15 | #include <linux/leds.h> | ||
16 | |||
17 | void ath79_register_leds_gpio(int id, | ||
18 | unsigned num_leds, | ||
19 | struct gpio_led *leds); | ||
20 | |||
21 | #endif /* _ATH79_DEV_LEDS_GPIO_H */ | ||
diff --git a/arch/mips/ath79/dev-spi.c b/arch/mips/ath79/dev-spi.c new file mode 100644 index 00000000000..aa30163efbf --- /dev/null +++ b/arch/mips/ath79/dev-spi.c | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | * Atheros AR71XX/AR724X/AR913X SPI controller device | ||
3 | * | ||
4 | * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org> | ||
5 | * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published | ||
9 | * by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #include <linux/platform_device.h> | ||
13 | #include <asm/mach-ath79/ar71xx_regs.h> | ||
14 | #include "dev-spi.h" | ||
15 | |||
16 | static struct resource ath79_spi_resources[] = { | ||
17 | { | ||
18 | .start = AR71XX_SPI_BASE, | ||
19 | .end = AR71XX_SPI_BASE + AR71XX_SPI_SIZE - 1, | ||
20 | .flags = IORESOURCE_MEM, | ||
21 | }, | ||
22 | }; | ||
23 | |||
24 | static struct platform_device ath79_spi_device = { | ||
25 | .name = "ath79-spi", | ||
26 | .id = -1, | ||
27 | .resource = ath79_spi_resources, | ||
28 | .num_resources = ARRAY_SIZE(ath79_spi_resources), | ||
29 | }; | ||
30 | |||
31 | void __init ath79_register_spi(struct ath79_spi_platform_data *pdata, | ||
32 | struct spi_board_info const *info, | ||
33 | unsigned n) | ||
34 | { | ||
35 | spi_register_board_info(info, n); | ||
36 | ath79_spi_device.dev.platform_data = pdata; | ||
37 | platform_device_register(&ath79_spi_device); | ||
38 | } | ||
diff --git a/arch/mips/ath79/dev-spi.h b/arch/mips/ath79/dev-spi.h new file mode 100644 index 00000000000..d732565ca73 --- /dev/null +++ b/arch/mips/ath79/dev-spi.h | |||
@@ -0,0 +1,22 @@ | |||
1 | /* | ||
2 | * Atheros AR71XX/AR724X/AR913X SPI controller device | ||
3 | * | ||
4 | * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org> | ||
5 | * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published | ||
9 | * by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #ifndef _ATH79_DEV_SPI_H | ||
13 | #define _ATH79_DEV_SPI_H | ||
14 | |||
15 | #include <linux/spi/spi.h> | ||
16 | #include <asm/mach-ath79/ath79_spi_platform.h> | ||
17 | |||
18 | void ath79_register_spi(struct ath79_spi_platform_data *pdata, | ||
19 | struct spi_board_info const *info, | ||
20 | unsigned n); | ||
21 | |||
22 | #endif /* _ATH79_DEV_SPI_H */ | ||
diff --git a/arch/mips/ath79/early_printk.c b/arch/mips/ath79/early_printk.c new file mode 100644 index 00000000000..7499b0e9df2 --- /dev/null +++ b/arch/mips/ath79/early_printk.c | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * Atheros AR71XX/AR724X/AR913X SoC early printk support | ||
3 | * | ||
4 | * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org> | ||
5 | * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published | ||
9 | * by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #include <linux/io.h> | ||
13 | #include <linux/serial_reg.h> | ||
14 | #include <asm/addrspace.h> | ||
15 | |||
16 | #include <asm/mach-ath79/ar71xx_regs.h> | ||
17 | |||
18 | static inline void prom_wait_thre(void __iomem *base) | ||
19 | { | ||
20 | u32 lsr; | ||
21 | |||
22 | do { | ||
23 | lsr = __raw_readl(base + UART_LSR * 4); | ||
24 | if (lsr & UART_LSR_THRE) | ||
25 | break; | ||
26 | } while (1); | ||
27 | } | ||
28 | |||
29 | void prom_putchar(unsigned char ch) | ||
30 | { | ||
31 | void __iomem *base = (void __iomem *)(KSEG1ADDR(AR71XX_UART_BASE)); | ||
32 | |||
33 | prom_wait_thre(base); | ||
34 | __raw_writel(ch, base + UART_TX * 4); | ||
35 | prom_wait_thre(base); | ||
36 | } | ||
diff --git a/arch/mips/ath79/gpio.c b/arch/mips/ath79/gpio.c new file mode 100644 index 00000000000..a0c426b8212 --- /dev/null +++ b/arch/mips/ath79/gpio.c | |||
@@ -0,0 +1,197 @@ | |||
1 | /* | ||
2 | * Atheros AR71XX/AR724X/AR913X GPIO API support | ||
3 | * | ||
4 | * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org> | ||
5 | * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published | ||
9 | * by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/module.h> | ||
15 | #include <linux/types.h> | ||
16 | #include <linux/spinlock.h> | ||
17 | #include <linux/io.h> | ||
18 | #include <linux/ioport.h> | ||
19 | #include <linux/gpio.h> | ||
20 | |||
21 | #include <asm/mach-ath79/ar71xx_regs.h> | ||
22 | #include <asm/mach-ath79/ath79.h> | ||
23 | #include "common.h" | ||
24 | |||
25 | static void __iomem *ath79_gpio_base; | ||
26 | static unsigned long ath79_gpio_count; | ||
27 | static DEFINE_SPINLOCK(ath79_gpio_lock); | ||
28 | |||
29 | static void __ath79_gpio_set_value(unsigned gpio, int value) | ||
30 | { | ||
31 | void __iomem *base = ath79_gpio_base; | ||
32 | |||
33 | if (value) | ||
34 | __raw_writel(1 << gpio, base + AR71XX_GPIO_REG_SET); | ||
35 | else | ||
36 | __raw_writel(1 << gpio, base + AR71XX_GPIO_REG_CLEAR); | ||
37 | } | ||
38 | |||
39 | static int __ath79_gpio_get_value(unsigned gpio) | ||
40 | { | ||
41 | return (__raw_readl(ath79_gpio_base + AR71XX_GPIO_REG_IN) >> gpio) & 1; | ||
42 | } | ||
43 | |||
44 | static int ath79_gpio_get_value(struct gpio_chip *chip, unsigned offset) | ||
45 | { | ||
46 | return __ath79_gpio_get_value(offset); | ||
47 | } | ||
48 | |||
49 | static void ath79_gpio_set_value(struct gpio_chip *chip, | ||
50 | unsigned offset, int value) | ||
51 | { | ||
52 | __ath79_gpio_set_value(offset, value); | ||
53 | } | ||
54 | |||
55 | static int ath79_gpio_direction_input(struct gpio_chip *chip, | ||
56 | unsigned offset) | ||
57 | { | ||
58 | void __iomem *base = ath79_gpio_base; | ||
59 | unsigned long flags; | ||
60 | |||
61 | spin_lock_irqsave(&ath79_gpio_lock, flags); | ||
62 | |||
63 | __raw_writel(__raw_readl(base + AR71XX_GPIO_REG_OE) & ~(1 << offset), | ||
64 | base + AR71XX_GPIO_REG_OE); | ||
65 | |||
66 | spin_unlock_irqrestore(&ath79_gpio_lock, flags); | ||
67 | |||
68 | return 0; | ||
69 | } | ||
70 | |||
71 | static int ath79_gpio_direction_output(struct gpio_chip *chip, | ||
72 | unsigned offset, int value) | ||
73 | { | ||
74 | void __iomem *base = ath79_gpio_base; | ||
75 | unsigned long flags; | ||
76 | |||
77 | spin_lock_irqsave(&ath79_gpio_lock, flags); | ||
78 | |||
79 | if (value) | ||
80 | __raw_writel(1 << offset, base + AR71XX_GPIO_REG_SET); | ||
81 | else | ||
82 | __raw_writel(1 << offset, base + AR71XX_GPIO_REG_CLEAR); | ||
83 | |||
84 | __raw_writel(__raw_readl(base + AR71XX_GPIO_REG_OE) | (1 << offset), | ||
85 | base + AR71XX_GPIO_REG_OE); | ||
86 | |||
87 | spin_unlock_irqrestore(&ath79_gpio_lock, flags); | ||
88 | |||
89 | return 0; | ||
90 | } | ||
91 | |||
92 | static struct gpio_chip ath79_gpio_chip = { | ||
93 | .label = "ath79", | ||
94 | .get = ath79_gpio_get_value, | ||
95 | .set = ath79_gpio_set_value, | ||
96 | .direction_input = ath79_gpio_direction_input, | ||
97 | .direction_output = ath79_gpio_direction_output, | ||
98 | .base = 0, | ||
99 | }; | ||
100 | |||
101 | void ath79_gpio_function_enable(u32 mask) | ||
102 | { | ||
103 | void __iomem *base = ath79_gpio_base; | ||
104 | unsigned long flags; | ||
105 | |||
106 | spin_lock_irqsave(&ath79_gpio_lock, flags); | ||
107 | |||
108 | __raw_writel(__raw_readl(base + AR71XX_GPIO_REG_FUNC) | mask, | ||
109 | base + AR71XX_GPIO_REG_FUNC); | ||
110 | /* flush write */ | ||
111 | __raw_readl(base + AR71XX_GPIO_REG_FUNC); | ||
112 | |||
113 | spin_unlock_irqrestore(&ath79_gpio_lock, flags); | ||
114 | } | ||
115 | |||
116 | void ath79_gpio_function_disable(u32 mask) | ||
117 | { | ||
118 | void __iomem *base = ath79_gpio_base; | ||
119 | unsigned long flags; | ||
120 | |||
121 | spin_lock_irqsave(&ath79_gpio_lock, flags); | ||
122 | |||
123 | __raw_writel(__raw_readl(base + AR71XX_GPIO_REG_FUNC) & ~mask, | ||
124 | base + AR71XX_GPIO_REG_FUNC); | ||
125 | /* flush write */ | ||
126 | __raw_readl(base + AR71XX_GPIO_REG_FUNC); | ||
127 | |||
128 | spin_unlock_irqrestore(&ath79_gpio_lock, flags); | ||
129 | } | ||
130 | |||
131 | void ath79_gpio_function_setup(u32 set, u32 clear) | ||
132 | { | ||
133 | void __iomem *base = ath79_gpio_base; | ||
134 | unsigned long flags; | ||
135 | |||
136 | spin_lock_irqsave(&ath79_gpio_lock, flags); | ||
137 | |||
138 | __raw_writel((__raw_readl(base + AR71XX_GPIO_REG_FUNC) & ~clear) | set, | ||
139 | base + AR71XX_GPIO_REG_FUNC); | ||
140 | /* flush write */ | ||
141 | __raw_readl(base + AR71XX_GPIO_REG_FUNC); | ||
142 | |||
143 | spin_unlock_irqrestore(&ath79_gpio_lock, flags); | ||
144 | } | ||
145 | |||
146 | void __init ath79_gpio_init(void) | ||
147 | { | ||
148 | int err; | ||
149 | |||
150 | if (soc_is_ar71xx()) | ||
151 | ath79_gpio_count = AR71XX_GPIO_COUNT; | ||
152 | else if (soc_is_ar724x()) | ||
153 | ath79_gpio_count = AR724X_GPIO_COUNT; | ||
154 | else if (soc_is_ar913x()) | ||
155 | ath79_gpio_count = AR913X_GPIO_COUNT; | ||
156 | else | ||
157 | BUG(); | ||
158 | |||
159 | ath79_gpio_base = ioremap_nocache(AR71XX_GPIO_BASE, AR71XX_GPIO_SIZE); | ||
160 | ath79_gpio_chip.ngpio = ath79_gpio_count; | ||
161 | |||
162 | err = gpiochip_add(&ath79_gpio_chip); | ||
163 | if (err) | ||
164 | panic("cannot add AR71xx GPIO chip, error=%d", err); | ||
165 | } | ||
166 | |||
167 | int gpio_get_value(unsigned gpio) | ||
168 | { | ||
169 | if (gpio < ath79_gpio_count) | ||
170 | return __ath79_gpio_get_value(gpio); | ||
171 | |||
172 | return __gpio_get_value(gpio); | ||
173 | } | ||
174 | EXPORT_SYMBOL(gpio_get_value); | ||
175 | |||
176 | void gpio_set_value(unsigned gpio, int value) | ||
177 | { | ||
178 | if (gpio < ath79_gpio_count) | ||
179 | __ath79_gpio_set_value(gpio, value); | ||
180 | else | ||
181 | __gpio_set_value(gpio, value); | ||
182 | } | ||
183 | EXPORT_SYMBOL(gpio_set_value); | ||
184 | |||
185 | int gpio_to_irq(unsigned gpio) | ||
186 | { | ||
187 | /* FIXME */ | ||
188 | return -EINVAL; | ||
189 | } | ||
190 | EXPORT_SYMBOL(gpio_to_irq); | ||
191 | |||
192 | int irq_to_gpio(unsigned irq) | ||
193 | { | ||
194 | /* FIXME */ | ||
195 | return -EINVAL; | ||
196 | } | ||
197 | EXPORT_SYMBOL(irq_to_gpio); | ||
diff --git a/arch/mips/ath79/irq.c b/arch/mips/ath79/irq.c new file mode 100644 index 00000000000..1bf7f719ba5 --- /dev/null +++ b/arch/mips/ath79/irq.c | |||
@@ -0,0 +1,187 @@ | |||
1 | /* | ||
2 | * Atheros AR71xx/AR724x/AR913x specific interrupt handling | ||
3 | * | ||
4 | * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org> | ||
5 | * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> | ||
6 | * | ||
7 | * Parts of this file are based on Atheros' 2.6.15 BSP | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License version 2 as published | ||
11 | * by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/interrupt.h> | ||
17 | #include <linux/irq.h> | ||
18 | |||
19 | #include <asm/irq_cpu.h> | ||
20 | #include <asm/mipsregs.h> | ||
21 | |||
22 | #include <asm/mach-ath79/ath79.h> | ||
23 | #include <asm/mach-ath79/ar71xx_regs.h> | ||
24 | #include "common.h" | ||
25 | |||
26 | static unsigned int ath79_ip2_flush_reg; | ||
27 | static unsigned int ath79_ip3_flush_reg; | ||
28 | |||
29 | static void ath79_misc_irq_handler(unsigned int irq, struct irq_desc *desc) | ||
30 | { | ||
31 | void __iomem *base = ath79_reset_base; | ||
32 | u32 pending; | ||
33 | |||
34 | pending = __raw_readl(base + AR71XX_RESET_REG_MISC_INT_STATUS) & | ||
35 | __raw_readl(base + AR71XX_RESET_REG_MISC_INT_ENABLE); | ||
36 | |||
37 | if (pending & MISC_INT_UART) | ||
38 | generic_handle_irq(ATH79_MISC_IRQ_UART); | ||
39 | |||
40 | else if (pending & MISC_INT_DMA) | ||
41 | generic_handle_irq(ATH79_MISC_IRQ_DMA); | ||
42 | |||
43 | else if (pending & MISC_INT_PERFC) | ||
44 | generic_handle_irq(ATH79_MISC_IRQ_PERFC); | ||
45 | |||
46 | else if (pending & MISC_INT_TIMER) | ||
47 | generic_handle_irq(ATH79_MISC_IRQ_TIMER); | ||
48 | |||
49 | else if (pending & MISC_INT_OHCI) | ||
50 | generic_handle_irq(ATH79_MISC_IRQ_OHCI); | ||
51 | |||
52 | else if (pending & MISC_INT_ERROR) | ||
53 | generic_handle_irq(ATH79_MISC_IRQ_ERROR); | ||
54 | |||
55 | else if (pending & MISC_INT_GPIO) | ||
56 | generic_handle_irq(ATH79_MISC_IRQ_GPIO); | ||
57 | |||
58 | else if (pending & MISC_INT_WDOG) | ||
59 | generic_handle_irq(ATH79_MISC_IRQ_WDOG); | ||
60 | |||
61 | else | ||
62 | spurious_interrupt(); | ||
63 | } | ||
64 | |||
65 | static void ar71xx_misc_irq_unmask(unsigned int irq) | ||
66 | { | ||
67 | void __iomem *base = ath79_reset_base; | ||
68 | u32 t; | ||
69 | |||
70 | irq -= ATH79_MISC_IRQ_BASE; | ||
71 | |||
72 | t = __raw_readl(base + AR71XX_RESET_REG_MISC_INT_ENABLE); | ||
73 | __raw_writel(t | (1 << irq), base + AR71XX_RESET_REG_MISC_INT_ENABLE); | ||
74 | |||
75 | /* flush write */ | ||
76 | __raw_readl(base + AR71XX_RESET_REG_MISC_INT_ENABLE); | ||
77 | } | ||
78 | |||
79 | static void ar71xx_misc_irq_mask(unsigned int irq) | ||
80 | { | ||
81 | void __iomem *base = ath79_reset_base; | ||
82 | u32 t; | ||
83 | |||
84 | irq -= ATH79_MISC_IRQ_BASE; | ||
85 | |||
86 | t = __raw_readl(base + AR71XX_RESET_REG_MISC_INT_ENABLE); | ||
87 | __raw_writel(t & ~(1 << irq), base + AR71XX_RESET_REG_MISC_INT_ENABLE); | ||
88 | |||
89 | /* flush write */ | ||
90 | __raw_readl(base + AR71XX_RESET_REG_MISC_INT_ENABLE); | ||
91 | } | ||
92 | |||
93 | static void ar724x_misc_irq_ack(unsigned int irq) | ||
94 | { | ||
95 | void __iomem *base = ath79_reset_base; | ||
96 | u32 t; | ||
97 | |||
98 | irq -= ATH79_MISC_IRQ_BASE; | ||
99 | |||
100 | t = __raw_readl(base + AR71XX_RESET_REG_MISC_INT_STATUS); | ||
101 | __raw_writel(t & ~(1 << irq), base + AR71XX_RESET_REG_MISC_INT_STATUS); | ||
102 | |||
103 | /* flush write */ | ||
104 | __raw_readl(base + AR71XX_RESET_REG_MISC_INT_STATUS); | ||
105 | } | ||
106 | |||
107 | static struct irq_chip ath79_misc_irq_chip = { | ||
108 | .name = "MISC", | ||
109 | .unmask = ar71xx_misc_irq_unmask, | ||
110 | .mask = ar71xx_misc_irq_mask, | ||
111 | }; | ||
112 | |||
113 | static void __init ath79_misc_irq_init(void) | ||
114 | { | ||
115 | void __iomem *base = ath79_reset_base; | ||
116 | int i; | ||
117 | |||
118 | __raw_writel(0, base + AR71XX_RESET_REG_MISC_INT_ENABLE); | ||
119 | __raw_writel(0, base + AR71XX_RESET_REG_MISC_INT_STATUS); | ||
120 | |||
121 | if (soc_is_ar71xx() || soc_is_ar913x()) | ||
122 | ath79_misc_irq_chip.mask_ack = ar71xx_misc_irq_mask; | ||
123 | else if (soc_is_ar724x()) | ||
124 | ath79_misc_irq_chip.ack = ar724x_misc_irq_ack; | ||
125 | else | ||
126 | BUG(); | ||
127 | |||
128 | for (i = ATH79_MISC_IRQ_BASE; | ||
129 | i < ATH79_MISC_IRQ_BASE + ATH79_MISC_IRQ_COUNT; i++) { | ||
130 | irq_desc[i].status = IRQ_DISABLED; | ||
131 | set_irq_chip_and_handler(i, &ath79_misc_irq_chip, | ||
132 | handle_level_irq); | ||
133 | } | ||
134 | |||
135 | set_irq_chained_handler(ATH79_CPU_IRQ_MISC, ath79_misc_irq_handler); | ||
136 | } | ||
137 | |||
138 | asmlinkage void plat_irq_dispatch(void) | ||
139 | { | ||
140 | unsigned long pending; | ||
141 | |||
142 | pending = read_c0_status() & read_c0_cause() & ST0_IM; | ||
143 | |||
144 | if (pending & STATUSF_IP7) | ||
145 | do_IRQ(ATH79_CPU_IRQ_TIMER); | ||
146 | |||
147 | else if (pending & STATUSF_IP2) { | ||
148 | ath79_ddr_wb_flush(ath79_ip2_flush_reg); | ||
149 | do_IRQ(ATH79_CPU_IRQ_IP2); | ||
150 | } | ||
151 | |||
152 | else if (pending & STATUSF_IP4) | ||
153 | do_IRQ(ATH79_CPU_IRQ_GE0); | ||
154 | |||
155 | else if (pending & STATUSF_IP5) | ||
156 | do_IRQ(ATH79_CPU_IRQ_GE1); | ||
157 | |||
158 | else if (pending & STATUSF_IP3) { | ||
159 | ath79_ddr_wb_flush(ath79_ip3_flush_reg); | ||
160 | do_IRQ(ATH79_CPU_IRQ_USB); | ||
161 | } | ||
162 | |||
163 | else if (pending & STATUSF_IP6) | ||
164 | do_IRQ(ATH79_CPU_IRQ_MISC); | ||
165 | |||
166 | else | ||
167 | spurious_interrupt(); | ||
168 | } | ||
169 | |||
170 | void __init arch_init_irq(void) | ||
171 | { | ||
172 | if (soc_is_ar71xx()) { | ||
173 | ath79_ip2_flush_reg = AR71XX_DDR_REG_FLUSH_PCI; | ||
174 | ath79_ip3_flush_reg = AR71XX_DDR_REG_FLUSH_USB; | ||
175 | } else if (soc_is_ar724x()) { | ||
176 | ath79_ip2_flush_reg = AR724X_DDR_REG_FLUSH_PCIE; | ||
177 | ath79_ip3_flush_reg = AR724X_DDR_REG_FLUSH_USB; | ||
178 | } else if (soc_is_ar913x()) { | ||
179 | ath79_ip2_flush_reg = AR913X_DDR_REG_FLUSH_WMAC; | ||
180 | ath79_ip3_flush_reg = AR913X_DDR_REG_FLUSH_USB; | ||
181 | } else | ||
182 | BUG(); | ||
183 | |||
184 | cp0_perfcount_irq = ATH79_MISC_IRQ_PERFC; | ||
185 | mips_cpu_irq_init(); | ||
186 | ath79_misc_irq_init(); | ||
187 | } | ||
diff --git a/arch/mips/ath79/mach-ap81.c b/arch/mips/ath79/mach-ap81.c new file mode 100644 index 00000000000..eee4c121deb --- /dev/null +++ b/arch/mips/ath79/mach-ap81.c | |||
@@ -0,0 +1,98 @@ | |||
1 | /* | ||
2 | * Atheros AP81 board support | ||
3 | * | ||
4 | * Copyright (C) 2009-2010 Gabor Juhos <juhosg@openwrt.org> | ||
5 | * Copyright (C) 2009 Imre Kaloz <kaloz@openwrt.org> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published | ||
9 | * by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #include "machtypes.h" | ||
13 | #include "dev-ar913x-wmac.h" | ||
14 | #include "dev-gpio-buttons.h" | ||
15 | #include "dev-leds-gpio.h" | ||
16 | #include "dev-spi.h" | ||
17 | |||
18 | #define AP81_GPIO_LED_STATUS 1 | ||
19 | #define AP81_GPIO_LED_AOSS 3 | ||
20 | #define AP81_GPIO_LED_WLAN 6 | ||
21 | #define AP81_GPIO_LED_POWER 14 | ||
22 | |||
23 | #define AP81_GPIO_BTN_SW4 12 | ||
24 | #define AP81_GPIO_BTN_SW1 21 | ||
25 | |||
26 | #define AP81_KEYS_POLL_INTERVAL 20 /* msecs */ | ||
27 | #define AP81_KEYS_DEBOUNCE_INTERVAL (3 * AP81_KEYS_POLL_INTERVAL) | ||
28 | |||
29 | #define AP81_CAL_DATA_ADDR 0x1fff1000 | ||
30 | |||
31 | static struct gpio_led ap81_leds_gpio[] __initdata = { | ||
32 | { | ||
33 | .name = "ap81:green:status", | ||
34 | .gpio = AP81_GPIO_LED_STATUS, | ||
35 | .active_low = 1, | ||
36 | }, { | ||
37 | .name = "ap81:amber:aoss", | ||
38 | .gpio = AP81_GPIO_LED_AOSS, | ||
39 | .active_low = 1, | ||
40 | }, { | ||
41 | .name = "ap81:green:wlan", | ||
42 | .gpio = AP81_GPIO_LED_WLAN, | ||
43 | .active_low = 1, | ||
44 | }, { | ||
45 | .name = "ap81:green:power", | ||
46 | .gpio = AP81_GPIO_LED_POWER, | ||
47 | .active_low = 1, | ||
48 | } | ||
49 | }; | ||
50 | |||
51 | static struct gpio_keys_button ap81_gpio_keys[] __initdata = { | ||
52 | { | ||
53 | .desc = "sw1", | ||
54 | .type = EV_KEY, | ||
55 | .code = BTN_0, | ||
56 | .debounce_interval = AP81_KEYS_DEBOUNCE_INTERVAL, | ||
57 | .gpio = AP81_GPIO_BTN_SW1, | ||
58 | .active_low = 1, | ||
59 | } , { | ||
60 | .desc = "sw4", | ||
61 | .type = EV_KEY, | ||
62 | .code = BTN_1, | ||
63 | .debounce_interval = AP81_KEYS_DEBOUNCE_INTERVAL, | ||
64 | .gpio = AP81_GPIO_BTN_SW4, | ||
65 | .active_low = 1, | ||
66 | } | ||
67 | }; | ||
68 | |||
69 | static struct spi_board_info ap81_spi_info[] = { | ||
70 | { | ||
71 | .bus_num = 0, | ||
72 | .chip_select = 0, | ||
73 | .max_speed_hz = 25000000, | ||
74 | .modalias = "m25p64", | ||
75 | } | ||
76 | }; | ||
77 | |||
78 | static struct ath79_spi_platform_data ap81_spi_data = { | ||
79 | .bus_num = 0, | ||
80 | .num_chipselect = 1, | ||
81 | }; | ||
82 | |||
83 | static void __init ap81_setup(void) | ||
84 | { | ||
85 | u8 *cal_data = (u8 *) KSEG1ADDR(AP81_CAL_DATA_ADDR); | ||
86 | |||
87 | ath79_register_leds_gpio(-1, ARRAY_SIZE(ap81_leds_gpio), | ||
88 | ap81_leds_gpio); | ||
89 | ath79_register_gpio_keys_polled(-1, AP81_KEYS_POLL_INTERVAL, | ||
90 | ARRAY_SIZE(ap81_gpio_keys), | ||
91 | ap81_gpio_keys); | ||
92 | ath79_register_spi(&ap81_spi_data, ap81_spi_info, | ||
93 | ARRAY_SIZE(ap81_spi_info)); | ||
94 | ath79_register_ar913x_wmac(cal_data); | ||
95 | } | ||
96 | |||
97 | MIPS_MACHINE(ATH79_MACH_AP81, "AP81", "Atheros AP81 reference board", | ||
98 | ap81_setup); | ||
diff --git a/arch/mips/ath79/mach-pb44.c b/arch/mips/ath79/mach-pb44.c new file mode 100644 index 00000000000..ec7b7a135d5 --- /dev/null +++ b/arch/mips/ath79/mach-pb44.c | |||
@@ -0,0 +1,118 @@ | |||
1 | /* | ||
2 | * Atheros PB44 reference board support | ||
3 | * | ||
4 | * Copyright (C) 2009-2010 Gabor Juhos <juhosg@openwrt.org> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License version 2 as published | ||
8 | * by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #include <linux/init.h> | ||
12 | #include <linux/platform_device.h> | ||
13 | #include <linux/i2c.h> | ||
14 | #include <linux/i2c-gpio.h> | ||
15 | #include <linux/i2c/pcf857x.h> | ||
16 | |||
17 | #include "machtypes.h" | ||
18 | #include "dev-gpio-buttons.h" | ||
19 | #include "dev-leds-gpio.h" | ||
20 | #include "dev-spi.h" | ||
21 | |||
22 | #define PB44_GPIO_I2C_SCL 0 | ||
23 | #define PB44_GPIO_I2C_SDA 1 | ||
24 | |||
25 | #define PB44_GPIO_EXP_BASE 16 | ||
26 | #define PB44_GPIO_SW_RESET (PB44_GPIO_EXP_BASE + 6) | ||
27 | #define PB44_GPIO_SW_JUMP (PB44_GPIO_EXP_BASE + 8) | ||
28 | #define PB44_GPIO_LED_JUMP1 (PB44_GPIO_EXP_BASE + 9) | ||
29 | #define PB44_GPIO_LED_JUMP2 (PB44_GPIO_EXP_BASE + 10) | ||
30 | |||
31 | #define PB44_KEYS_POLL_INTERVAL 20 /* msecs */ | ||
32 | #define PB44_KEYS_DEBOUNCE_INTERVAL (3 * PB44_KEYS_POLL_INTERVAL) | ||
33 | |||
34 | static struct i2c_gpio_platform_data pb44_i2c_gpio_data = { | ||
35 | .sda_pin = PB44_GPIO_I2C_SDA, | ||
36 | .scl_pin = PB44_GPIO_I2C_SCL, | ||
37 | }; | ||
38 | |||
39 | static struct platform_device pb44_i2c_gpio_device = { | ||
40 | .name = "i2c-gpio", | ||
41 | .id = 0, | ||
42 | .dev = { | ||
43 | .platform_data = &pb44_i2c_gpio_data, | ||
44 | } | ||
45 | }; | ||
46 | |||
47 | static struct pcf857x_platform_data pb44_pcf857x_data = { | ||
48 | .gpio_base = PB44_GPIO_EXP_BASE, | ||
49 | }; | ||
50 | |||
51 | static struct i2c_board_info pb44_i2c_board_info[] __initdata = { | ||
52 | { | ||
53 | I2C_BOARD_INFO("pcf8575", 0x20), | ||
54 | .platform_data = &pb44_pcf857x_data, | ||
55 | }, | ||
56 | }; | ||
57 | |||
58 | static struct gpio_led pb44_leds_gpio[] __initdata = { | ||
59 | { | ||
60 | .name = "pb44:amber:jump1", | ||
61 | .gpio = PB44_GPIO_LED_JUMP1, | ||
62 | .active_low = 1, | ||
63 | }, { | ||
64 | .name = "pb44:green:jump2", | ||
65 | .gpio = PB44_GPIO_LED_JUMP2, | ||
66 | .active_low = 1, | ||
67 | }, | ||
68 | }; | ||
69 | |||
70 | static struct gpio_keys_button pb44_gpio_keys[] __initdata = { | ||
71 | { | ||
72 | .desc = "soft_reset", | ||
73 | .type = EV_KEY, | ||
74 | .code = KEY_RESTART, | ||
75 | .debounce_interval = PB44_KEYS_DEBOUNCE_INTERVAL, | ||
76 | .gpio = PB44_GPIO_SW_RESET, | ||
77 | .active_low = 1, | ||
78 | } , { | ||
79 | .desc = "jumpstart", | ||
80 | .type = EV_KEY, | ||
81 | .code = KEY_WPS_BUTTON, | ||
82 | .debounce_interval = PB44_KEYS_DEBOUNCE_INTERVAL, | ||
83 | .gpio = PB44_GPIO_SW_JUMP, | ||
84 | .active_low = 1, | ||
85 | } | ||
86 | }; | ||
87 | |||
88 | static struct spi_board_info pb44_spi_info[] = { | ||
89 | { | ||
90 | .bus_num = 0, | ||
91 | .chip_select = 0, | ||
92 | .max_speed_hz = 25000000, | ||
93 | .modalias = "m25p64", | ||
94 | }, | ||
95 | }; | ||
96 | |||
97 | static struct ath79_spi_platform_data pb44_spi_data = { | ||
98 | .bus_num = 0, | ||
99 | .num_chipselect = 1, | ||
100 | }; | ||
101 | |||
102 | static void __init pb44_init(void) | ||
103 | { | ||
104 | i2c_register_board_info(0, pb44_i2c_board_info, | ||
105 | ARRAY_SIZE(pb44_i2c_board_info)); | ||
106 | platform_device_register(&pb44_i2c_gpio_device); | ||
107 | |||
108 | ath79_register_leds_gpio(-1, ARRAY_SIZE(pb44_leds_gpio), | ||
109 | pb44_leds_gpio); | ||
110 | ath79_register_gpio_keys_polled(-1, PB44_KEYS_POLL_INTERVAL, | ||
111 | ARRAY_SIZE(pb44_gpio_keys), | ||
112 | pb44_gpio_keys); | ||
113 | ath79_register_spi(&pb44_spi_data, pb44_spi_info, | ||
114 | ARRAY_SIZE(pb44_spi_info)); | ||
115 | } | ||
116 | |||
117 | MIPS_MACHINE(ATH79_MACH_PB44, "PB44", "Atheros PB44 reference board", | ||
118 | pb44_init); | ||
diff --git a/arch/mips/ath79/machtypes.h b/arch/mips/ath79/machtypes.h new file mode 100644 index 00000000000..3940fe470b2 --- /dev/null +++ b/arch/mips/ath79/machtypes.h | |||
@@ -0,0 +1,23 @@ | |||
1 | /* | ||
2 | * Atheros AR71XX/AR724X/AR913X machine type definitions | ||
3 | * | ||
4 | * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org> | ||
5 | * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published | ||
9 | * by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #ifndef _ATH79_MACHTYPE_H | ||
13 | #define _ATH79_MACHTYPE_H | ||
14 | |||
15 | #include <asm/mips_machine.h> | ||
16 | |||
17 | enum ath79_mach_type { | ||
18 | ATH79_MACH_GENERIC = 0, | ||
19 | ATH79_MACH_AP81, /* Atheros AP81 reference board */ | ||
20 | ATH79_MACH_PB44, /* Atheros PB44 reference board */ | ||
21 | }; | ||
22 | |||
23 | #endif /* _ATH79_MACHTYPE_H */ | ||
diff --git a/arch/mips/ath79/prom.c b/arch/mips/ath79/prom.c new file mode 100644 index 00000000000..e9cbd7c2918 --- /dev/null +++ b/arch/mips/ath79/prom.c | |||
@@ -0,0 +1,57 @@ | |||
1 | /* | ||
2 | * Atheros AR71XX/AR724X/AR913X specific prom routines | ||
3 | * | ||
4 | * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org> | ||
5 | * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published | ||
9 | * by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/io.h> | ||
15 | #include <linux/string.h> | ||
16 | |||
17 | #include <asm/bootinfo.h> | ||
18 | #include <asm/addrspace.h> | ||
19 | |||
20 | #include "common.h" | ||
21 | |||
22 | static inline int is_valid_ram_addr(void *addr) | ||
23 | { | ||
24 | if (((u32) addr > KSEG0) && | ||
25 | ((u32) addr < (KSEG0 + ATH79_MEM_SIZE_MAX))) | ||
26 | return 1; | ||
27 | |||
28 | if (((u32) addr > KSEG1) && | ||
29 | ((u32) addr < (KSEG1 + ATH79_MEM_SIZE_MAX))) | ||
30 | return 1; | ||
31 | |||
32 | return 0; | ||
33 | } | ||
34 | |||
35 | static __init void ath79_prom_init_cmdline(int argc, char **argv) | ||
36 | { | ||
37 | int i; | ||
38 | |||
39 | if (!is_valid_ram_addr(argv)) | ||
40 | return; | ||
41 | |||
42 | for (i = 0; i < argc; i++) | ||
43 | if (is_valid_ram_addr(argv[i])) { | ||
44 | strlcat(arcs_cmdline, " ", sizeof(arcs_cmdline)); | ||
45 | strlcat(arcs_cmdline, argv[i], sizeof(arcs_cmdline)); | ||
46 | } | ||
47 | } | ||
48 | |||
49 | void __init prom_init(void) | ||
50 | { | ||
51 | ath79_prom_init_cmdline(fw_arg0, (char **)fw_arg1); | ||
52 | } | ||
53 | |||
54 | void __init prom_free_prom_memory(void) | ||
55 | { | ||
56 | /* We do not have to prom memory to free */ | ||
57 | } | ||
diff --git a/arch/mips/ath79/setup.c b/arch/mips/ath79/setup.c new file mode 100644 index 00000000000..159b42f106b --- /dev/null +++ b/arch/mips/ath79/setup.c | |||
@@ -0,0 +1,206 @@ | |||
1 | /* | ||
2 | * Atheros AR71XX/AR724X/AR913X specific setup | ||
3 | * | ||
4 | * Copyright (C) 2008-2011 Gabor Juhos <juhosg@openwrt.org> | ||
5 | * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> | ||
6 | * | ||
7 | * Parts of this file are based on Atheros' 2.6.15 BSP | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License version 2 as published | ||
11 | * by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/bootmem.h> | ||
17 | #include <linux/err.h> | ||
18 | #include <linux/clk.h> | ||
19 | |||
20 | #include <asm/bootinfo.h> | ||
21 | #include <asm/time.h> /* for mips_hpt_frequency */ | ||
22 | #include <asm/reboot.h> /* for _machine_{restart,halt} */ | ||
23 | #include <asm/mips_machine.h> | ||
24 | |||
25 | #include <asm/mach-ath79/ath79.h> | ||
26 | #include <asm/mach-ath79/ar71xx_regs.h> | ||
27 | #include "common.h" | ||
28 | #include "dev-common.h" | ||
29 | #include "machtypes.h" | ||
30 | |||
31 | #define ATH79_SYS_TYPE_LEN 64 | ||
32 | |||
33 | #define AR71XX_BASE_FREQ 40000000 | ||
34 | #define AR724X_BASE_FREQ 5000000 | ||
35 | #define AR913X_BASE_FREQ 5000000 | ||
36 | |||
37 | static char ath79_sys_type[ATH79_SYS_TYPE_LEN]; | ||
38 | |||
39 | static void ath79_restart(char *command) | ||
40 | { | ||
41 | ath79_device_reset_set(AR71XX_RESET_FULL_CHIP); | ||
42 | for (;;) | ||
43 | if (cpu_wait) | ||
44 | cpu_wait(); | ||
45 | } | ||
46 | |||
47 | static void ath79_halt(void) | ||
48 | { | ||
49 | while (1) | ||
50 | cpu_wait(); | ||
51 | } | ||
52 | |||
53 | static void __init ath79_detect_mem_size(void) | ||
54 | { | ||
55 | unsigned long size; | ||
56 | |||
57 | for (size = ATH79_MEM_SIZE_MIN; size < ATH79_MEM_SIZE_MAX; | ||
58 | size <<= 1) { | ||
59 | if (!memcmp(ath79_detect_mem_size, | ||
60 | ath79_detect_mem_size + size, 1024)) | ||
61 | break; | ||
62 | } | ||
63 | |||
64 | add_memory_region(0, size, BOOT_MEM_RAM); | ||
65 | } | ||
66 | |||
67 | static void __init ath79_detect_sys_type(void) | ||
68 | { | ||
69 | char *chip = "????"; | ||
70 | u32 id; | ||
71 | u32 major; | ||
72 | u32 minor; | ||
73 | u32 rev = 0; | ||
74 | |||
75 | id = ath79_reset_rr(AR71XX_RESET_REG_REV_ID); | ||
76 | major = id & REV_ID_MAJOR_MASK; | ||
77 | |||
78 | switch (major) { | ||
79 | case REV_ID_MAJOR_AR71XX: | ||
80 | minor = id & AR71XX_REV_ID_MINOR_MASK; | ||
81 | rev = id >> AR71XX_REV_ID_REVISION_SHIFT; | ||
82 | rev &= AR71XX_REV_ID_REVISION_MASK; | ||
83 | switch (minor) { | ||
84 | case AR71XX_REV_ID_MINOR_AR7130: | ||
85 | ath79_soc = ATH79_SOC_AR7130; | ||
86 | chip = "7130"; | ||
87 | break; | ||
88 | |||
89 | case AR71XX_REV_ID_MINOR_AR7141: | ||
90 | ath79_soc = ATH79_SOC_AR7141; | ||
91 | chip = "7141"; | ||
92 | break; | ||
93 | |||
94 | case AR71XX_REV_ID_MINOR_AR7161: | ||
95 | ath79_soc = ATH79_SOC_AR7161; | ||
96 | chip = "7161"; | ||
97 | break; | ||
98 | } | ||
99 | break; | ||
100 | |||
101 | case REV_ID_MAJOR_AR7240: | ||
102 | ath79_soc = ATH79_SOC_AR7240; | ||
103 | chip = "7240"; | ||
104 | rev = (id & AR724X_REV_ID_REVISION_MASK); | ||
105 | break; | ||
106 | |||
107 | case REV_ID_MAJOR_AR7241: | ||
108 | ath79_soc = ATH79_SOC_AR7241; | ||
109 | chip = "7241"; | ||
110 | rev = (id & AR724X_REV_ID_REVISION_MASK); | ||
111 | break; | ||
112 | |||
113 | case REV_ID_MAJOR_AR7242: | ||
114 | ath79_soc = ATH79_SOC_AR7242; | ||
115 | chip = "7242"; | ||
116 | rev = (id & AR724X_REV_ID_REVISION_MASK); | ||
117 | break; | ||
118 | |||
119 | case REV_ID_MAJOR_AR913X: | ||
120 | minor = id & AR913X_REV_ID_MINOR_MASK; | ||
121 | rev = id >> AR913X_REV_ID_REVISION_SHIFT; | ||
122 | rev &= AR913X_REV_ID_REVISION_MASK; | ||
123 | switch (minor) { | ||
124 | case AR913X_REV_ID_MINOR_AR9130: | ||
125 | ath79_soc = ATH79_SOC_AR9130; | ||
126 | chip = "9130"; | ||
127 | break; | ||
128 | |||
129 | case AR913X_REV_ID_MINOR_AR9132: | ||
130 | ath79_soc = ATH79_SOC_AR9132; | ||
131 | chip = "9132"; | ||
132 | break; | ||
133 | } | ||
134 | break; | ||
135 | |||
136 | default: | ||
137 | panic("ath79: unknown SoC, id:0x%08x\n", id); | ||
138 | } | ||
139 | |||
140 | sprintf(ath79_sys_type, "Atheros AR%s rev %u", chip, rev); | ||
141 | pr_info("SoC: %s\n", ath79_sys_type); | ||
142 | } | ||
143 | |||
144 | const char *get_system_type(void) | ||
145 | { | ||
146 | return ath79_sys_type; | ||
147 | } | ||
148 | |||
149 | unsigned int __cpuinit get_c0_compare_int(void) | ||
150 | { | ||
151 | return CP0_LEGACY_COMPARE_IRQ; | ||
152 | } | ||
153 | |||
154 | void __init plat_mem_setup(void) | ||
155 | { | ||
156 | set_io_port_base(KSEG1); | ||
157 | |||
158 | ath79_reset_base = ioremap_nocache(AR71XX_RESET_BASE, | ||
159 | AR71XX_RESET_SIZE); | ||
160 | ath79_pll_base = ioremap_nocache(AR71XX_PLL_BASE, | ||
161 | AR71XX_PLL_SIZE); | ||
162 | ath79_ddr_base = ioremap_nocache(AR71XX_DDR_CTRL_BASE, | ||
163 | AR71XX_DDR_CTRL_SIZE); | ||
164 | |||
165 | ath79_detect_sys_type(); | ||
166 | ath79_detect_mem_size(); | ||
167 | ath79_clocks_init(); | ||
168 | |||
169 | _machine_restart = ath79_restart; | ||
170 | _machine_halt = ath79_halt; | ||
171 | pm_power_off = ath79_halt; | ||
172 | } | ||
173 | |||
174 | void __init plat_time_init(void) | ||
175 | { | ||
176 | struct clk *clk; | ||
177 | |||
178 | clk = clk_get(NULL, "cpu"); | ||
179 | if (IS_ERR(clk)) | ||
180 | panic("unable to get CPU clock, err=%ld", PTR_ERR(clk)); | ||
181 | |||
182 | mips_hpt_frequency = clk_get_rate(clk) / 2; | ||
183 | } | ||
184 | |||
185 | static int __init ath79_setup(void) | ||
186 | { | ||
187 | ath79_gpio_init(); | ||
188 | ath79_register_uart(); | ||
189 | ath79_register_wdt(); | ||
190 | |||
191 | mips_machine_setup(); | ||
192 | |||
193 | return 0; | ||
194 | } | ||
195 | |||
196 | arch_initcall(ath79_setup); | ||
197 | |||
198 | static void __init ath79_generic_init(void) | ||
199 | { | ||
200 | /* Nothing to do */ | ||
201 | } | ||
202 | |||
203 | MIPS_MACHINE(ATH79_MACH_GENERIC, | ||
204 | "Generic", | ||
205 | "Generic AR71XX/AR724X/AR913X based board", | ||
206 | ath79_generic_init); | ||
diff --git a/arch/mips/configs/ar7_defconfig b/arch/mips/configs/ar7_defconfig index c78c7e7e41d..6cd5a519ce5 100644 --- a/arch/mips/configs/ar7_defconfig +++ b/arch/mips/configs/ar7_defconfig | |||
@@ -14,7 +14,7 @@ CONFIG_SYSFS_DEPRECATED_V2=y | |||
14 | CONFIG_RELAY=y | 14 | CONFIG_RELAY=y |
15 | CONFIG_BLK_DEV_INITRD=y | 15 | CONFIG_BLK_DEV_INITRD=y |
16 | CONFIG_RD_LZMA=y | 16 | CONFIG_RD_LZMA=y |
17 | CONFIG_EMBEDDED=y | 17 | CONFIG_EXPERT=y |
18 | # CONFIG_KALLSYMS is not set | 18 | # CONFIG_KALLSYMS is not set |
19 | # CONFIG_ELF_CORE is not set | 19 | # CONFIG_ELF_CORE is not set |
20 | # CONFIG_PCSPKR_PLATFORM is not set | 20 | # CONFIG_PCSPKR_PLATFORM is not set |
diff --git a/arch/mips/configs/bcm47xx_defconfig b/arch/mips/configs/bcm47xx_defconfig index 927d58b2cd0..22fdf2f0cc2 100644 --- a/arch/mips/configs/bcm47xx_defconfig +++ b/arch/mips/configs/bcm47xx_defconfig | |||
@@ -21,7 +21,7 @@ CONFIG_CGROUP_CPUACCT=y | |||
21 | CONFIG_RELAY=y | 21 | CONFIG_RELAY=y |
22 | CONFIG_BLK_DEV_INITRD=y | 22 | CONFIG_BLK_DEV_INITRD=y |
23 | CONFIG_RD_LZMA=y | 23 | CONFIG_RD_LZMA=y |
24 | CONFIG_EMBEDDED=y | 24 | CONFIG_EXPERT=y |
25 | CONFIG_SLAB=y | 25 | CONFIG_SLAB=y |
26 | CONFIG_MODULES=y | 26 | CONFIG_MODULES=y |
27 | CONFIG_MODULE_UNLOAD=y | 27 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/mips/configs/bcm63xx_defconfig b/arch/mips/configs/bcm63xx_defconfig index b806a4e3289..919005139f5 100644 --- a/arch/mips/configs/bcm63xx_defconfig +++ b/arch/mips/configs/bcm63xx_defconfig | |||
@@ -10,7 +10,7 @@ CONFIG_EXPERIMENTAL=y | |||
10 | # CONFIG_SWAP is not set | 10 | # CONFIG_SWAP is not set |
11 | CONFIG_TINY_RCU=y | 11 | CONFIG_TINY_RCU=y |
12 | CONFIG_SYSFS_DEPRECATED_V2=y | 12 | CONFIG_SYSFS_DEPRECATED_V2=y |
13 | CONFIG_EMBEDDED=y | 13 | CONFIG_EXPERT=y |
14 | # CONFIG_PCSPKR_PLATFORM is not set | 14 | # CONFIG_PCSPKR_PLATFORM is not set |
15 | # CONFIG_FUTEX is not set | 15 | # CONFIG_FUTEX is not set |
16 | # CONFIG_EPOLL is not set | 16 | # CONFIG_EPOLL is not set |
diff --git a/arch/mips/configs/bigsur_defconfig b/arch/mips/configs/bigsur_defconfig index 9749bc8758d..1cdff6b6327 100644 --- a/arch/mips/configs/bigsur_defconfig +++ b/arch/mips/configs/bigsur_defconfig | |||
@@ -26,7 +26,7 @@ CONFIG_PID_NS=y | |||
26 | CONFIG_NET_NS=y | 26 | CONFIG_NET_NS=y |
27 | CONFIG_BLK_DEV_INITRD=y | 27 | CONFIG_BLK_DEV_INITRD=y |
28 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 28 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
29 | CONFIG_EMBEDDED=y | 29 | CONFIG_EXPERT=y |
30 | # CONFIG_SYSCTL_SYSCALL is not set | 30 | # CONFIG_SYSCTL_SYSCALL is not set |
31 | # CONFIG_PCSPKR_PLATFORM is not set | 31 | # CONFIG_PCSPKR_PLATFORM is not set |
32 | CONFIG_SLAB=y | 32 | CONFIG_SLAB=y |
diff --git a/arch/mips/configs/capcella_defconfig b/arch/mips/configs/capcella_defconfig index 502a8e9c084..5135dc0b950 100644 --- a/arch/mips/configs/capcella_defconfig +++ b/arch/mips/configs/capcella_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_EXPERIMENTAL=y | |||
4 | CONFIG_SYSVIPC=y | 4 | CONFIG_SYSVIPC=y |
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | CONFIG_SLAB=y | 8 | CONFIG_SLAB=y |
9 | CONFIG_MODULES=y | 9 | CONFIG_MODULES=y |
10 | CONFIG_MODULE_UNLOAD=y | 10 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/mips/configs/cavium-octeon_defconfig b/arch/mips/configs/cavium-octeon_defconfig index 3567b6f07b3..75165dfa60c 100644 --- a/arch/mips/configs/cavium-octeon_defconfig +++ b/arch/mips/configs/cavium-octeon_defconfig | |||
@@ -15,7 +15,7 @@ CONFIG_SYSFS_DEPRECATED_V2=y | |||
15 | CONFIG_RELAY=y | 15 | CONFIG_RELAY=y |
16 | CONFIG_BLK_DEV_INITRD=y | 16 | CONFIG_BLK_DEV_INITRD=y |
17 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 17 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
18 | CONFIG_EMBEDDED=y | 18 | CONFIG_EXPERT=y |
19 | # CONFIG_PCSPKR_PLATFORM is not set | 19 | # CONFIG_PCSPKR_PLATFORM is not set |
20 | CONFIG_SLAB=y | 20 | CONFIG_SLAB=y |
21 | CONFIG_MODULES=y | 21 | CONFIG_MODULES=y |
diff --git a/arch/mips/configs/cobalt_defconfig b/arch/mips/configs/cobalt_defconfig index 6c4f7e9d338..5419adb219a 100644 --- a/arch/mips/configs/cobalt_defconfig +++ b/arch/mips/configs/cobalt_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_SYSVIPC=y | |||
4 | CONFIG_LOG_BUF_SHIFT=14 | 4 | CONFIG_LOG_BUF_SHIFT=14 |
5 | CONFIG_RELAY=y | 5 | CONFIG_RELAY=y |
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | CONFIG_MODULES=y | 8 | CONFIG_MODULES=y |
9 | CONFIG_MODULE_UNLOAD=y | 9 | CONFIG_MODULE_UNLOAD=y |
10 | # CONFIG_BLK_DEV_BSG is not set | 10 | # CONFIG_BLK_DEV_BSG is not set |
diff --git a/arch/mips/configs/db1000_defconfig b/arch/mips/configs/db1000_defconfig index dda158b2c8d..4044c9e0fb7 100644 --- a/arch/mips/configs/db1000_defconfig +++ b/arch/mips/configs/db1000_defconfig | |||
@@ -11,7 +11,7 @@ CONFIG_POSIX_MQUEUE=y | |||
11 | CONFIG_TINY_RCU=y | 11 | CONFIG_TINY_RCU=y |
12 | CONFIG_LOG_BUF_SHIFT=14 | 12 | CONFIG_LOG_BUF_SHIFT=14 |
13 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 13 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
14 | CONFIG_EMBEDDED=y | 14 | CONFIG_EXPERT=y |
15 | # CONFIG_KALLSYMS is not set | 15 | # CONFIG_KALLSYMS is not set |
16 | # CONFIG_PCSPKR_PLATFORM is not set | 16 | # CONFIG_PCSPKR_PLATFORM is not set |
17 | # CONFIG_VM_EVENT_COUNTERS is not set | 17 | # CONFIG_VM_EVENT_COUNTERS is not set |
diff --git a/arch/mips/configs/db1100_defconfig b/arch/mips/configs/db1100_defconfig index 7e4fc76df53..c6b49938ee8 100644 --- a/arch/mips/configs/db1100_defconfig +++ b/arch/mips/configs/db1100_defconfig | |||
@@ -11,7 +11,7 @@ CONFIG_SYSVIPC=y | |||
11 | CONFIG_POSIX_MQUEUE=y | 11 | CONFIG_POSIX_MQUEUE=y |
12 | CONFIG_TINY_RCU=y | 12 | CONFIG_TINY_RCU=y |
13 | CONFIG_LOG_BUF_SHIFT=14 | 13 | CONFIG_LOG_BUF_SHIFT=14 |
14 | CONFIG_EMBEDDED=y | 14 | CONFIG_EXPERT=y |
15 | # CONFIG_SYSCTL_SYSCALL is not set | 15 | # CONFIG_SYSCTL_SYSCALL is not set |
16 | # CONFIG_KALLSYMS is not set | 16 | # CONFIG_KALLSYMS is not set |
17 | # CONFIG_PCSPKR_PLATFORM is not set | 17 | # CONFIG_PCSPKR_PLATFORM is not set |
diff --git a/arch/mips/configs/db1200_defconfig b/arch/mips/configs/db1200_defconfig index 6fe205fa7b6..1f69249b839 100644 --- a/arch/mips/configs/db1200_defconfig +++ b/arch/mips/configs/db1200_defconfig | |||
@@ -12,7 +12,7 @@ CONFIG_SYSVIPC=y | |||
12 | CONFIG_POSIX_MQUEUE=y | 12 | CONFIG_POSIX_MQUEUE=y |
13 | CONFIG_TINY_RCU=y | 13 | CONFIG_TINY_RCU=y |
14 | CONFIG_LOG_BUF_SHIFT=14 | 14 | CONFIG_LOG_BUF_SHIFT=14 |
15 | CONFIG_EMBEDDED=y | 15 | CONFIG_EXPERT=y |
16 | # CONFIG_SYSCTL_SYSCALL is not set | 16 | # CONFIG_SYSCTL_SYSCALL is not set |
17 | # CONFIG_KALLSYMS is not set | 17 | # CONFIG_KALLSYMS is not set |
18 | # CONFIG_PCSPKR_PLATFORM is not set | 18 | # CONFIG_PCSPKR_PLATFORM is not set |
diff --git a/arch/mips/configs/db1500_defconfig b/arch/mips/configs/db1500_defconfig index a741c55448d..b6e21c7cb6b 100644 --- a/arch/mips/configs/db1500_defconfig +++ b/arch/mips/configs/db1500_defconfig | |||
@@ -10,7 +10,7 @@ CONFIG_LOCALVERSION="-db1500" | |||
10 | CONFIG_KERNEL_LZMA=y | 10 | CONFIG_KERNEL_LZMA=y |
11 | CONFIG_SYSVIPC=y | 11 | CONFIG_SYSVIPC=y |
12 | CONFIG_LOG_BUF_SHIFT=14 | 12 | CONFIG_LOG_BUF_SHIFT=14 |
13 | CONFIG_EMBEDDED=y | 13 | CONFIG_EXPERT=y |
14 | # CONFIG_KALLSYMS is not set | 14 | # CONFIG_KALLSYMS is not set |
15 | # CONFIG_PCSPKR_PLATFORM is not set | 15 | # CONFIG_PCSPKR_PLATFORM is not set |
16 | # CONFIG_VM_EVENT_COUNTERS is not set | 16 | # CONFIG_VM_EVENT_COUNTERS is not set |
diff --git a/arch/mips/configs/db1550_defconfig b/arch/mips/configs/db1550_defconfig index cd32dd8c800..798a553c9e8 100644 --- a/arch/mips/configs/db1550_defconfig +++ b/arch/mips/configs/db1550_defconfig | |||
@@ -11,7 +11,7 @@ CONFIG_SYSVIPC=y | |||
11 | CONFIG_POSIX_MQUEUE=y | 11 | CONFIG_POSIX_MQUEUE=y |
12 | CONFIG_TINY_RCU=y | 12 | CONFIG_TINY_RCU=y |
13 | CONFIG_LOG_BUF_SHIFT=14 | 13 | CONFIG_LOG_BUF_SHIFT=14 |
14 | CONFIG_EMBEDDED=y | 14 | CONFIG_EXPERT=y |
15 | # CONFIG_SYSCTL_SYSCALL is not set | 15 | # CONFIG_SYSCTL_SYSCALL is not set |
16 | # CONFIG_KALLSYMS is not set | 16 | # CONFIG_KALLSYMS is not set |
17 | # CONFIG_PCSPKR_PLATFORM is not set | 17 | # CONFIG_PCSPKR_PLATFORM is not set |
diff --git a/arch/mips/configs/decstation_defconfig b/arch/mips/configs/decstation_defconfig index b15bfd1e69c..87d0340837a 100644 --- a/arch/mips/configs/decstation_defconfig +++ b/arch/mips/configs/decstation_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_EXPERIMENTAL=y | |||
4 | CONFIG_SYSVIPC=y | 4 | CONFIG_SYSVIPC=y |
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | # CONFIG_SYSCTL_SYSCALL is not set | 8 | # CONFIG_SYSCTL_SYSCALL is not set |
9 | # CONFIG_HOTPLUG is not set | 9 | # CONFIG_HOTPLUG is not set |
10 | CONFIG_SLAB=y | 10 | CONFIG_SLAB=y |
diff --git a/arch/mips/configs/e55_defconfig b/arch/mips/configs/e55_defconfig index 0b60c06a943..0126e66d60c 100644 --- a/arch/mips/configs/e55_defconfig +++ b/arch/mips/configs/e55_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_EXPERIMENTAL=y | |||
4 | CONFIG_SYSVIPC=y | 4 | CONFIG_SYSVIPC=y |
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | # CONFIG_HOTPLUG is not set | 8 | # CONFIG_HOTPLUG is not set |
9 | CONFIG_SLAB=y | 9 | CONFIG_SLAB=y |
10 | CONFIG_MODULES=y | 10 | CONFIG_MODULES=y |
diff --git a/arch/mips/configs/fuloong2e_defconfig b/arch/mips/configs/fuloong2e_defconfig index 63944a14b81..e5b73de08fc 100644 --- a/arch/mips/configs/fuloong2e_defconfig +++ b/arch/mips/configs/fuloong2e_defconfig | |||
@@ -17,7 +17,7 @@ CONFIG_NAMESPACES=y | |||
17 | CONFIG_USER_NS=y | 17 | CONFIG_USER_NS=y |
18 | CONFIG_PID_NS=y | 18 | CONFIG_PID_NS=y |
19 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 19 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
20 | CONFIG_EMBEDDED=y | 20 | CONFIG_EXPERT=y |
21 | # CONFIG_PCSPKR_PLATFORM is not set | 21 | # CONFIG_PCSPKR_PLATFORM is not set |
22 | # CONFIG_COMPAT_BRK is not set | 22 | # CONFIG_COMPAT_BRK is not set |
23 | CONFIG_SLAB=y | 23 | CONFIG_SLAB=y |
diff --git a/arch/mips/configs/gpr_defconfig b/arch/mips/configs/gpr_defconfig index 53edc134f27..48a40aefaf5 100644 --- a/arch/mips/configs/gpr_defconfig +++ b/arch/mips/configs/gpr_defconfig | |||
@@ -11,7 +11,7 @@ CONFIG_BSD_PROCESS_ACCT_V3=y | |||
11 | CONFIG_RELAY=y | 11 | CONFIG_RELAY=y |
12 | CONFIG_BLK_DEV_INITRD=y | 12 | CONFIG_BLK_DEV_INITRD=y |
13 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 13 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
14 | CONFIG_EMBEDDED=y | 14 | CONFIG_EXPERT=y |
15 | CONFIG_SLAB=y | 15 | CONFIG_SLAB=y |
16 | CONFIG_PROFILING=y | 16 | CONFIG_PROFILING=y |
17 | CONFIG_MODULES=y | 17 | CONFIG_MODULES=y |
diff --git a/arch/mips/configs/ip22_defconfig b/arch/mips/configs/ip22_defconfig index 36de199f4c2..d1606569b00 100644 --- a/arch/mips/configs/ip22_defconfig +++ b/arch/mips/configs/ip22_defconfig | |||
@@ -17,7 +17,7 @@ CONFIG_IPC_NS=y | |||
17 | CONFIG_USER_NS=y | 17 | CONFIG_USER_NS=y |
18 | CONFIG_PID_NS=y | 18 | CONFIG_PID_NS=y |
19 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 19 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
20 | CONFIG_EMBEDDED=y | 20 | CONFIG_EXPERT=y |
21 | # CONFIG_HOTPLUG is not set | 21 | # CONFIG_HOTPLUG is not set |
22 | # CONFIG_PCSPKR_PLATFORM is not set | 22 | # CONFIG_PCSPKR_PLATFORM is not set |
23 | # CONFIG_COMPAT_BRK is not set | 23 | # CONFIG_COMPAT_BRK is not set |
diff --git a/arch/mips/configs/ip27_defconfig b/arch/mips/configs/ip27_defconfig index 4b16c48b0c3..0e36abcd39c 100644 --- a/arch/mips/configs/ip27_defconfig +++ b/arch/mips/configs/ip27_defconfig | |||
@@ -15,7 +15,7 @@ CONFIG_CGROUPS=y | |||
15 | CONFIG_CPUSETS=y | 15 | CONFIG_CPUSETS=y |
16 | CONFIG_RELAY=y | 16 | CONFIG_RELAY=y |
17 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 17 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
18 | CONFIG_EMBEDDED=y | 18 | CONFIG_EXPERT=y |
19 | # CONFIG_PCSPKR_PLATFORM is not set | 19 | # CONFIG_PCSPKR_PLATFORM is not set |
20 | CONFIG_SLAB=y | 20 | CONFIG_SLAB=y |
21 | CONFIG_MODULES=y | 21 | CONFIG_MODULES=y |
diff --git a/arch/mips/configs/ip28_defconfig b/arch/mips/configs/ip28_defconfig index 98f2c7736e8..4dbf6269b3f 100644 --- a/arch/mips/configs/ip28_defconfig +++ b/arch/mips/configs/ip28_defconfig | |||
@@ -8,7 +8,7 @@ CONFIG_IKCONFIG_PROC=y | |||
8 | CONFIG_LOG_BUF_SHIFT=14 | 8 | CONFIG_LOG_BUF_SHIFT=14 |
9 | CONFIG_RELAY=y | 9 | CONFIG_RELAY=y |
10 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 10 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
11 | CONFIG_EMBEDDED=y | 11 | CONFIG_EXPERT=y |
12 | # CONFIG_HOTPLUG is not set | 12 | # CONFIG_HOTPLUG is not set |
13 | CONFIG_SLAB=y | 13 | CONFIG_SLAB=y |
14 | CONFIG_MODULES=y | 14 | CONFIG_MODULES=y |
diff --git a/arch/mips/configs/ip32_defconfig b/arch/mips/configs/ip32_defconfig index 5bea99b26fa..7bbd52194fc 100644 --- a/arch/mips/configs/ip32_defconfig +++ b/arch/mips/configs/ip32_defconfig | |||
@@ -10,7 +10,7 @@ CONFIG_IKCONFIG_PROC=y | |||
10 | CONFIG_LOG_BUF_SHIFT=14 | 10 | CONFIG_LOG_BUF_SHIFT=14 |
11 | CONFIG_SYSFS_DEPRECATED_V2=y | 11 | CONFIG_SYSFS_DEPRECATED_V2=y |
12 | CONFIG_RELAY=y | 12 | CONFIG_RELAY=y |
13 | CONFIG_EMBEDDED=y | 13 | CONFIG_EXPERT=y |
14 | CONFIG_SLAB=y | 14 | CONFIG_SLAB=y |
15 | CONFIG_PROFILING=y | 15 | CONFIG_PROFILING=y |
16 | CONFIG_OPROFILE=m | 16 | CONFIG_OPROFILE=m |
diff --git a/arch/mips/configs/jazz_defconfig b/arch/mips/configs/jazz_defconfig index 6ae46bcdb20..92a60aecad5 100644 --- a/arch/mips/configs/jazz_defconfig +++ b/arch/mips/configs/jazz_defconfig | |||
@@ -10,7 +10,7 @@ CONFIG_IKCONFIG_PROC=y | |||
10 | CONFIG_LOG_BUF_SHIFT=14 | 10 | CONFIG_LOG_BUF_SHIFT=14 |
11 | CONFIG_RELAY=y | 11 | CONFIG_RELAY=y |
12 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 12 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
13 | CONFIG_EMBEDDED=y | 13 | CONFIG_EXPERT=y |
14 | # CONFIG_SYSCTL_SYSCALL is not set | 14 | # CONFIG_SYSCTL_SYSCALL is not set |
15 | CONFIG_SLAB=y | 15 | CONFIG_SLAB=y |
16 | CONFIG_MODULES=y | 16 | CONFIG_MODULES=y |
diff --git a/arch/mips/configs/jmr3927_defconfig b/arch/mips/configs/jmr3927_defconfig index bf24e9309b9..db5705e18b3 100644 --- a/arch/mips/configs/jmr3927_defconfig +++ b/arch/mips/configs/jmr3927_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_TOSHIBA_JMR3927=y | |||
4 | CONFIG_SYSVIPC=y | 4 | CONFIG_SYSVIPC=y |
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_SYSFS_DEPRECATED_V2=y | 6 | CONFIG_SYSFS_DEPRECATED_V2=y |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | # CONFIG_HOTPLUG is not set | 8 | # CONFIG_HOTPLUG is not set |
9 | # CONFIG_PCSPKR_PLATFORM is not set | 9 | # CONFIG_PCSPKR_PLATFORM is not set |
10 | CONFIG_SLAB=y | 10 | CONFIG_SLAB=y |
diff --git a/arch/mips/configs/lasat_defconfig b/arch/mips/configs/lasat_defconfig index 6447261c61d..d9f3db29ab9 100644 --- a/arch/mips/configs/lasat_defconfig +++ b/arch/mips/configs/lasat_defconfig | |||
@@ -8,7 +8,7 @@ CONFIG_HZ_1000=y | |||
8 | CONFIG_EXPERIMENTAL=y | 8 | CONFIG_EXPERIMENTAL=y |
9 | CONFIG_SYSVIPC=y | 9 | CONFIG_SYSVIPC=y |
10 | CONFIG_LOG_BUF_SHIFT=14 | 10 | CONFIG_LOG_BUF_SHIFT=14 |
11 | CONFIG_EMBEDDED=y | 11 | CONFIG_EXPERT=y |
12 | # CONFIG_SYSCTL_SYSCALL is not set | 12 | # CONFIG_SYSCTL_SYSCALL is not set |
13 | # CONFIG_KALLSYMS is not set | 13 | # CONFIG_KALLSYMS is not set |
14 | # CONFIG_HOTPLUG is not set | 14 | # CONFIG_HOTPLUG is not set |
diff --git a/arch/mips/configs/lemote2f_defconfig b/arch/mips/configs/lemote2f_defconfig index f7033f3a582..167c1d07b80 100644 --- a/arch/mips/configs/lemote2f_defconfig +++ b/arch/mips/configs/lemote2f_defconfig | |||
@@ -21,7 +21,7 @@ CONFIG_BLK_DEV_INITRD=y | |||
21 | CONFIG_RD_BZIP2=y | 21 | CONFIG_RD_BZIP2=y |
22 | CONFIG_RD_LZMA=y | 22 | CONFIG_RD_LZMA=y |
23 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 23 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
24 | CONFIG_EMBEDDED=y | 24 | CONFIG_EXPERT=y |
25 | CONFIG_PROFILING=y | 25 | CONFIG_PROFILING=y |
26 | CONFIG_OPROFILE=m | 26 | CONFIG_OPROFILE=m |
27 | CONFIG_MODULES=y | 27 | CONFIG_MODULES=y |
diff --git a/arch/mips/configs/malta_defconfig b/arch/mips/configs/malta_defconfig index b455d0f3648..7270f3183bd 100644 --- a/arch/mips/configs/malta_defconfig +++ b/arch/mips/configs/malta_defconfig | |||
@@ -15,7 +15,7 @@ CONFIG_UTS_NS=y | |||
15 | CONFIG_IPC_NS=y | 15 | CONFIG_IPC_NS=y |
16 | CONFIG_PID_NS=y | 16 | CONFIG_PID_NS=y |
17 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 17 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
18 | CONFIG_EMBEDDED=y | 18 | CONFIG_EXPERT=y |
19 | # CONFIG_SYSCTL_SYSCALL is not set | 19 | # CONFIG_SYSCTL_SYSCALL is not set |
20 | # CONFIG_COMPAT_BRK is not set | 20 | # CONFIG_COMPAT_BRK is not set |
21 | CONFIG_SLAB=y | 21 | CONFIG_SLAB=y |
@@ -369,7 +369,10 @@ CONFIG_VT_HW_CONSOLE_BINDING=y | |||
369 | CONFIG_SERIAL_8250=y | 369 | CONFIG_SERIAL_8250=y |
370 | CONFIG_SERIAL_8250_CONSOLE=y | 370 | CONFIG_SERIAL_8250_CONSOLE=y |
371 | # CONFIG_HWMON is not set | 371 | # CONFIG_HWMON is not set |
372 | CONFIG_FB=y | ||
373 | CONFIG_FB_CIRRUS=y | ||
372 | # CONFIG_VGA_CONSOLE is not set | 374 | # CONFIG_VGA_CONSOLE is not set |
375 | CONFIG_FRAMEBUFFER_CONSOLE=y | ||
373 | CONFIG_HID=m | 376 | CONFIG_HID=m |
374 | CONFIG_LEDS_CLASS=m | 377 | CONFIG_LEDS_CLASS=m |
375 | CONFIG_LEDS_TRIGGER_TIMER=m | 378 | CONFIG_LEDS_TRIGGER_TIMER=m |
diff --git a/arch/mips/configs/markeins_defconfig b/arch/mips/configs/markeins_defconfig index 86bf001babe..9c9a123016c 100644 --- a/arch/mips/configs/markeins_defconfig +++ b/arch/mips/configs/markeins_defconfig | |||
@@ -9,7 +9,7 @@ CONFIG_IKCONFIG=y | |||
9 | CONFIG_IKCONFIG_PROC=y | 9 | CONFIG_IKCONFIG_PROC=y |
10 | CONFIG_LOG_BUF_SHIFT=14 | 10 | CONFIG_LOG_BUF_SHIFT=14 |
11 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 11 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
12 | CONFIG_EMBEDDED=y | 12 | CONFIG_EXPERT=y |
13 | CONFIG_SLAB=y | 13 | CONFIG_SLAB=y |
14 | CONFIG_MODULES=y | 14 | CONFIG_MODULES=y |
15 | CONFIG_MODULE_UNLOAD=y | 15 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/mips/configs/mipssim_defconfig b/arch/mips/configs/mipssim_defconfig index 4925f507dc2..b5ad7387bbb 100644 --- a/arch/mips/configs/mipssim_defconfig +++ b/arch/mips/configs/mipssim_defconfig | |||
@@ -7,7 +7,7 @@ CONFIG_EXPERIMENTAL=y | |||
7 | CONFIG_SYSVIPC=y | 7 | CONFIG_SYSVIPC=y |
8 | CONFIG_LOG_BUF_SHIFT=14 | 8 | CONFIG_LOG_BUF_SHIFT=14 |
9 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 9 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
10 | CONFIG_EMBEDDED=y | 10 | CONFIG_EXPERT=y |
11 | CONFIG_SLAB=y | 11 | CONFIG_SLAB=y |
12 | CONFIG_MODULES=y | 12 | CONFIG_MODULES=y |
13 | CONFIG_MODULE_UNLOAD=y | 13 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/mips/configs/mpc30x_defconfig b/arch/mips/configs/mpc30x_defconfig index efb779f8f6f..c16de981292 100644 --- a/arch/mips/configs/mpc30x_defconfig +++ b/arch/mips/configs/mpc30x_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_SYSVIPC=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_RELAY=y | 6 | CONFIG_RELAY=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | CONFIG_SLAB=y | 9 | CONFIG_SLAB=y |
10 | CONFIG_MODULES=y | 10 | CONFIG_MODULES=y |
11 | CONFIG_MODULE_UNLOAD=y | 11 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/mips/configs/msp71xx_defconfig b/arch/mips/configs/msp71xx_defconfig index ab051458452..d1142e9cd9a 100644 --- a/arch/mips/configs/msp71xx_defconfig +++ b/arch/mips/configs/msp71xx_defconfig | |||
@@ -8,7 +8,7 @@ CONFIG_LOCALVERSION="-pmc" | |||
8 | CONFIG_SYSVIPC=y | 8 | CONFIG_SYSVIPC=y |
9 | CONFIG_LOG_BUF_SHIFT=14 | 9 | CONFIG_LOG_BUF_SHIFT=14 |
10 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 10 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
11 | CONFIG_EMBEDDED=y | 11 | CONFIG_EXPERT=y |
12 | # CONFIG_SHMEM is not set | 12 | # CONFIG_SHMEM is not set |
13 | CONFIG_SLAB=y | 13 | CONFIG_SLAB=y |
14 | CONFIG_MODULES=y | 14 | CONFIG_MODULES=y |
diff --git a/arch/mips/configs/mtx1_defconfig b/arch/mips/configs/mtx1_defconfig index 814699754e0..a97a42c6b2c 100644 --- a/arch/mips/configs/mtx1_defconfig +++ b/arch/mips/configs/mtx1_defconfig | |||
@@ -11,7 +11,7 @@ CONFIG_AUDIT=y | |||
11 | CONFIG_RELAY=y | 11 | CONFIG_RELAY=y |
12 | CONFIG_BLK_DEV_INITRD=y | 12 | CONFIG_BLK_DEV_INITRD=y |
13 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 13 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
14 | CONFIG_EMBEDDED=y | 14 | CONFIG_EXPERT=y |
15 | CONFIG_SLAB=y | 15 | CONFIG_SLAB=y |
16 | CONFIG_PROFILING=y | 16 | CONFIG_PROFILING=y |
17 | CONFIG_OPROFILE=m | 17 | CONFIG_OPROFILE=m |
diff --git a/arch/mips/configs/pb1100_defconfig b/arch/mips/configs/pb1100_defconfig index 1597aa1842f..75eb1b1f316 100644 --- a/arch/mips/configs/pb1100_defconfig +++ b/arch/mips/configs/pb1100_defconfig | |||
@@ -11,7 +11,7 @@ CONFIG_SYSVIPC=y | |||
11 | CONFIG_POSIX_MQUEUE=y | 11 | CONFIG_POSIX_MQUEUE=y |
12 | CONFIG_TINY_RCU=y | 12 | CONFIG_TINY_RCU=y |
13 | CONFIG_LOG_BUF_SHIFT=14 | 13 | CONFIG_LOG_BUF_SHIFT=14 |
14 | CONFIG_EMBEDDED=y | 14 | CONFIG_EXPERT=y |
15 | # CONFIG_SYSCTL_SYSCALL is not set | 15 | # CONFIG_SYSCTL_SYSCALL is not set |
16 | # CONFIG_KALLSYMS is not set | 16 | # CONFIG_KALLSYMS is not set |
17 | # CONFIG_PCSPKR_PLATFORM is not set | 17 | # CONFIG_PCSPKR_PLATFORM is not set |
diff --git a/arch/mips/configs/pb1200_defconfig b/arch/mips/configs/pb1200_defconfig index 96f0d43cf08..dcbe2704e5e 100644 --- a/arch/mips/configs/pb1200_defconfig +++ b/arch/mips/configs/pb1200_defconfig | |||
@@ -12,7 +12,7 @@ CONFIG_SYSVIPC=y | |||
12 | CONFIG_POSIX_MQUEUE=y | 12 | CONFIG_POSIX_MQUEUE=y |
13 | CONFIG_TINY_RCU=y | 13 | CONFIG_TINY_RCU=y |
14 | CONFIG_LOG_BUF_SHIFT=14 | 14 | CONFIG_LOG_BUF_SHIFT=14 |
15 | CONFIG_EMBEDDED=y | 15 | CONFIG_EXPERT=y |
16 | # CONFIG_SYSCTL_SYSCALL is not set | 16 | # CONFIG_SYSCTL_SYSCALL is not set |
17 | # CONFIG_KALLSYMS is not set | 17 | # CONFIG_KALLSYMS is not set |
18 | # CONFIG_PCSPKR_PLATFORM is not set | 18 | # CONFIG_PCSPKR_PLATFORM is not set |
diff --git a/arch/mips/configs/pb1500_defconfig b/arch/mips/configs/pb1500_defconfig index b4bfd482345..fa00487146f 100644 --- a/arch/mips/configs/pb1500_defconfig +++ b/arch/mips/configs/pb1500_defconfig | |||
@@ -11,7 +11,7 @@ CONFIG_SYSVIPC=y | |||
11 | CONFIG_POSIX_MQUEUE=y | 11 | CONFIG_POSIX_MQUEUE=y |
12 | CONFIG_TINY_RCU=y | 12 | CONFIG_TINY_RCU=y |
13 | CONFIG_LOG_BUF_SHIFT=14 | 13 | CONFIG_LOG_BUF_SHIFT=14 |
14 | CONFIG_EMBEDDED=y | 14 | CONFIG_EXPERT=y |
15 | # CONFIG_SYSCTL_SYSCALL is not set | 15 | # CONFIG_SYSCTL_SYSCALL is not set |
16 | # CONFIG_KALLSYMS is not set | 16 | # CONFIG_KALLSYMS is not set |
17 | # CONFIG_PCSPKR_PLATFORM is not set | 17 | # CONFIG_PCSPKR_PLATFORM is not set |
diff --git a/arch/mips/configs/pb1550_defconfig b/arch/mips/configs/pb1550_defconfig index 5a660024d22..e83d6497e8b 100644 --- a/arch/mips/configs/pb1550_defconfig +++ b/arch/mips/configs/pb1550_defconfig | |||
@@ -11,7 +11,7 @@ CONFIG_SYSVIPC=y | |||
11 | CONFIG_POSIX_MQUEUE=y | 11 | CONFIG_POSIX_MQUEUE=y |
12 | CONFIG_TINY_RCU=y | 12 | CONFIG_TINY_RCU=y |
13 | CONFIG_LOG_BUF_SHIFT=14 | 13 | CONFIG_LOG_BUF_SHIFT=14 |
14 | CONFIG_EMBEDDED=y | 14 | CONFIG_EXPERT=y |
15 | # CONFIG_SYSCTL_SYSCALL is not set | 15 | # CONFIG_SYSCTL_SYSCALL is not set |
16 | # CONFIG_KALLSYMS is not set | 16 | # CONFIG_KALLSYMS is not set |
17 | # CONFIG_PCSPKR_PLATFORM is not set | 17 | # CONFIG_PCSPKR_PLATFORM is not set |
diff --git a/arch/mips/configs/pnx8335-stb225_defconfig b/arch/mips/configs/pnx8335-stb225_defconfig index 39926a1a96b..f2925769dfa 100644 --- a/arch/mips/configs/pnx8335-stb225_defconfig +++ b/arch/mips/configs/pnx8335-stb225_defconfig | |||
@@ -11,7 +11,7 @@ CONFIG_EXPERIMENTAL=y | |||
11 | CONFIG_SYSVIPC=y | 11 | CONFIG_SYSVIPC=y |
12 | CONFIG_LOG_BUF_SHIFT=14 | 12 | CONFIG_LOG_BUF_SHIFT=14 |
13 | CONFIG_SYSFS_DEPRECATED_V2=y | 13 | CONFIG_SYSFS_DEPRECATED_V2=y |
14 | CONFIG_EMBEDDED=y | 14 | CONFIG_EXPERT=y |
15 | CONFIG_SLAB=y | 15 | CONFIG_SLAB=y |
16 | CONFIG_MODULES=y | 16 | CONFIG_MODULES=y |
17 | CONFIG_MODULE_UNLOAD=y | 17 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/mips/configs/pnx8550-jbs_defconfig b/arch/mips/configs/pnx8550-jbs_defconfig index 3376bc8616c..1d1f2067f3e 100644 --- a/arch/mips/configs/pnx8550-jbs_defconfig +++ b/arch/mips/configs/pnx8550-jbs_defconfig | |||
@@ -6,7 +6,7 @@ CONFIG_IKCONFIG_PROC=y | |||
6 | CONFIG_LOG_BUF_SHIFT=14 | 6 | CONFIG_LOG_BUF_SHIFT=14 |
7 | CONFIG_BLK_DEV_INITRD=y | 7 | CONFIG_BLK_DEV_INITRD=y |
8 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 8 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
9 | CONFIG_EMBEDDED=y | 9 | CONFIG_EXPERT=y |
10 | # CONFIG_SYSCTL_SYSCALL is not set | 10 | # CONFIG_SYSCTL_SYSCALL is not set |
11 | CONFIG_SLAB=y | 11 | CONFIG_SLAB=y |
12 | CONFIG_MODULES=y | 12 | CONFIG_MODULES=y |
diff --git a/arch/mips/configs/pnx8550-stb810_defconfig b/arch/mips/configs/pnx8550-stb810_defconfig index 6514f1bf0af..15c66a571f9 100644 --- a/arch/mips/configs/pnx8550-stb810_defconfig +++ b/arch/mips/configs/pnx8550-stb810_defconfig | |||
@@ -6,7 +6,7 @@ CONFIG_IKCONFIG_PROC=y | |||
6 | CONFIG_LOG_BUF_SHIFT=14 | 6 | CONFIG_LOG_BUF_SHIFT=14 |
7 | CONFIG_BLK_DEV_INITRD=y | 7 | CONFIG_BLK_DEV_INITRD=y |
8 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 8 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
9 | CONFIG_EMBEDDED=y | 9 | CONFIG_EXPERT=y |
10 | # CONFIG_SYSCTL_SYSCALL is not set | 10 | # CONFIG_SYSCTL_SYSCALL is not set |
11 | # CONFIG_HOTPLUG is not set | 11 | # CONFIG_HOTPLUG is not set |
12 | CONFIG_SLAB=y | 12 | CONFIG_SLAB=y |
diff --git a/arch/mips/configs/powertv_defconfig b/arch/mips/configs/powertv_defconfig index f1f58e91dd8..3b0b6e8c853 100644 --- a/arch/mips/configs/powertv_defconfig +++ b/arch/mips/configs/powertv_defconfig | |||
@@ -14,7 +14,7 @@ CONFIG_RELAY=y | |||
14 | CONFIG_BLK_DEV_INITRD=y | 14 | CONFIG_BLK_DEV_INITRD=y |
15 | # CONFIG_RD_GZIP is not set | 15 | # CONFIG_RD_GZIP is not set |
16 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 16 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
17 | CONFIG_EMBEDDED=y | 17 | CONFIG_EXPERT=y |
18 | # CONFIG_SYSCTL_SYSCALL is not set | 18 | # CONFIG_SYSCTL_SYSCALL is not set |
19 | CONFIG_KALLSYMS_ALL=y | 19 | CONFIG_KALLSYMS_ALL=y |
20 | # CONFIG_PCSPKR_PLATFORM is not set | 20 | # CONFIG_PCSPKR_PLATFORM is not set |
diff --git a/arch/mips/configs/rb532_defconfig b/arch/mips/configs/rb532_defconfig index d6457bc38c7..55902d9cd0f 100644 --- a/arch/mips/configs/rb532_defconfig +++ b/arch/mips/configs/rb532_defconfig | |||
@@ -13,7 +13,7 @@ CONFIG_IKCONFIG_PROC=y | |||
13 | CONFIG_LOG_BUF_SHIFT=14 | 13 | CONFIG_LOG_BUF_SHIFT=14 |
14 | CONFIG_SYSFS_DEPRECATED_V2=y | 14 | CONFIG_SYSFS_DEPRECATED_V2=y |
15 | CONFIG_BLK_DEV_INITRD=y | 15 | CONFIG_BLK_DEV_INITRD=y |
16 | CONFIG_EMBEDDED=y | 16 | CONFIG_EXPERT=y |
17 | # CONFIG_KALLSYMS is not set | 17 | # CONFIG_KALLSYMS is not set |
18 | # CONFIG_ELF_CORE is not set | 18 | # CONFIG_ELF_CORE is not set |
19 | # CONFIG_VM_EVENT_COUNTERS is not set | 19 | # CONFIG_VM_EVENT_COUNTERS is not set |
diff --git a/arch/mips/configs/rbtx49xx_defconfig b/arch/mips/configs/rbtx49xx_defconfig index 29acfab3151..9cba856277f 100644 --- a/arch/mips/configs/rbtx49xx_defconfig +++ b/arch/mips/configs/rbtx49xx_defconfig | |||
@@ -12,7 +12,7 @@ CONFIG_IKCONFIG_PROC=y | |||
12 | CONFIG_LOG_BUF_SHIFT=14 | 12 | CONFIG_LOG_BUF_SHIFT=14 |
13 | CONFIG_SYSFS_DEPRECATED_V2=y | 13 | CONFIG_SYSFS_DEPRECATED_V2=y |
14 | CONFIG_BLK_DEV_INITRD=y | 14 | CONFIG_BLK_DEV_INITRD=y |
15 | CONFIG_EMBEDDED=y | 15 | CONFIG_EXPERT=y |
16 | # CONFIG_HOTPLUG is not set | 16 | # CONFIG_HOTPLUG is not set |
17 | # CONFIG_PCSPKR_PLATFORM is not set | 17 | # CONFIG_PCSPKR_PLATFORM is not set |
18 | # CONFIG_EPOLL is not set | 18 | # CONFIG_EPOLL is not set |
diff --git a/arch/mips/configs/rm200_defconfig b/arch/mips/configs/rm200_defconfig index 2b3e47653f6..2c0230e76d2 100644 --- a/arch/mips/configs/rm200_defconfig +++ b/arch/mips/configs/rm200_defconfig | |||
@@ -12,7 +12,7 @@ CONFIG_IKCONFIG_PROC=y | |||
12 | CONFIG_LOG_BUF_SHIFT=14 | 12 | CONFIG_LOG_BUF_SHIFT=14 |
13 | CONFIG_RELAY=y | 13 | CONFIG_RELAY=y |
14 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 14 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
15 | CONFIG_EMBEDDED=y | 15 | CONFIG_EXPERT=y |
16 | CONFIG_SLAB=y | 16 | CONFIG_SLAB=y |
17 | CONFIG_MODULES=y | 17 | CONFIG_MODULES=y |
18 | CONFIG_MODULE_UNLOAD=y | 18 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/mips/configs/sb1250-swarm_defconfig b/arch/mips/configs/sb1250-swarm_defconfig index 64840d71775..5b0463ef938 100644 --- a/arch/mips/configs/sb1250-swarm_defconfig +++ b/arch/mips/configs/sb1250-swarm_defconfig | |||
@@ -15,7 +15,7 @@ CONFIG_RELAY=y | |||
15 | CONFIG_NAMESPACES=y | 15 | CONFIG_NAMESPACES=y |
16 | CONFIG_BLK_DEV_INITRD=y | 16 | CONFIG_BLK_DEV_INITRD=y |
17 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 17 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
18 | CONFIG_EMBEDDED=y | 18 | CONFIG_EXPERT=y |
19 | # CONFIG_COMPAT_BRK is not set | 19 | # CONFIG_COMPAT_BRK is not set |
20 | CONFIG_SLAB=y | 20 | CONFIG_SLAB=y |
21 | CONFIG_MODULES=y | 21 | CONFIG_MODULES=y |
diff --git a/arch/mips/configs/tb0219_defconfig b/arch/mips/configs/tb0219_defconfig index d9be37fc9cb..30036b4cbeb 100644 --- a/arch/mips/configs/tb0219_defconfig +++ b/arch/mips/configs/tb0219_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_SYSVIPC=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_SYSFS_DEPRECATED_V2=y | 6 | CONFIG_SYSFS_DEPRECATED_V2=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | # CONFIG_PCSPKR_PLATFORM is not set | 9 | # CONFIG_PCSPKR_PLATFORM is not set |
10 | CONFIG_SLAB=y | 10 | CONFIG_SLAB=y |
11 | CONFIG_MODULES=y | 11 | CONFIG_MODULES=y |
diff --git a/arch/mips/configs/tb0226_defconfig b/arch/mips/configs/tb0226_defconfig index 3d25dd08907..81bfa1d4d8e 100644 --- a/arch/mips/configs/tb0226_defconfig +++ b/arch/mips/configs/tb0226_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_SYSVIPC=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_SYSFS_DEPRECATED_V2=y | 6 | CONFIG_SYSFS_DEPRECATED_V2=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | # CONFIG_PCSPKR_PLATFORM is not set | 9 | # CONFIG_PCSPKR_PLATFORM is not set |
10 | CONFIG_SLAB=y | 10 | CONFIG_SLAB=y |
11 | CONFIG_MODULES=y | 11 | CONFIG_MODULES=y |
diff --git a/arch/mips/configs/tb0287_defconfig b/arch/mips/configs/tb0287_defconfig index be697c9b23c..c415c4f0e5c 100644 --- a/arch/mips/configs/tb0287_defconfig +++ b/arch/mips/configs/tb0287_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_SYSVIPC=y | |||
4 | CONFIG_LOG_BUF_SHIFT=14 | 4 | CONFIG_LOG_BUF_SHIFT=14 |
5 | CONFIG_SYSFS_DEPRECATED_V2=y | 5 | CONFIG_SYSFS_DEPRECATED_V2=y |
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | # CONFIG_SYSCTL_SYSCALL is not set | 8 | # CONFIG_SYSCTL_SYSCALL is not set |
9 | # CONFIG_PCSPKR_PLATFORM is not set | 9 | # CONFIG_PCSPKR_PLATFORM is not set |
10 | CONFIG_SLAB=y | 10 | CONFIG_SLAB=y |
diff --git a/arch/mips/configs/workpad_defconfig b/arch/mips/configs/workpad_defconfig index 7ec9287254d..ee4b2be43c4 100644 --- a/arch/mips/configs/workpad_defconfig +++ b/arch/mips/configs/workpad_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_EXPERIMENTAL=y | |||
4 | CONFIG_SYSVIPC=y | 4 | CONFIG_SYSVIPC=y |
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | CONFIG_SLAB=y | 8 | CONFIG_SLAB=y |
9 | CONFIG_MODULES=y | 9 | CONFIG_MODULES=y |
10 | CONFIG_MODULE_UNLOAD=y | 10 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/mips/configs/wrppmc_defconfig b/arch/mips/configs/wrppmc_defconfig index a231b73b1a4..44a451be359 100644 --- a/arch/mips/configs/wrppmc_defconfig +++ b/arch/mips/configs/wrppmc_defconfig | |||
@@ -7,7 +7,7 @@ CONFIG_BSD_PROCESS_ACCT=y | |||
7 | CONFIG_LOG_BUF_SHIFT=14 | 7 | CONFIG_LOG_BUF_SHIFT=14 |
8 | CONFIG_BLK_DEV_INITRD=y | 8 | CONFIG_BLK_DEV_INITRD=y |
9 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 9 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
10 | CONFIG_EMBEDDED=y | 10 | CONFIG_EXPERT=y |
11 | CONFIG_KALLSYMS_EXTRA_PASS=y | 11 | CONFIG_KALLSYMS_EXTRA_PASS=y |
12 | # CONFIG_EPOLL is not set | 12 | # CONFIG_EPOLL is not set |
13 | CONFIG_SLAB=y | 13 | CONFIG_SLAB=y |
diff --git a/arch/mips/configs/yosemite_defconfig b/arch/mips/configs/yosemite_defconfig index ab3a3dcec04..f72d305a3f0 100644 --- a/arch/mips/configs/yosemite_defconfig +++ b/arch/mips/configs/yosemite_defconfig | |||
@@ -8,7 +8,7 @@ CONFIG_IKCONFIG=y | |||
8 | CONFIG_IKCONFIG_PROC=y | 8 | CONFIG_IKCONFIG_PROC=y |
9 | CONFIG_LOG_BUF_SHIFT=14 | 9 | CONFIG_LOG_BUF_SHIFT=14 |
10 | CONFIG_RELAY=y | 10 | CONFIG_RELAY=y |
11 | CONFIG_EMBEDDED=y | 11 | CONFIG_EXPERT=y |
12 | CONFIG_SLAB=y | 12 | CONFIG_SLAB=y |
13 | CONFIG_MODULES=y | 13 | CONFIG_MODULES=y |
14 | CONFIG_MODULE_UNLOAD=y | 14 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/mips/include/asm/cache.h b/arch/mips/include/asm/cache.h index 37f175c42bb..650ac9ba734 100644 --- a/arch/mips/include/asm/cache.h +++ b/arch/mips/include/asm/cache.h | |||
@@ -17,4 +17,6 @@ | |||
17 | #define SMP_CACHE_SHIFT L1_CACHE_SHIFT | 17 | #define SMP_CACHE_SHIFT L1_CACHE_SHIFT |
18 | #define SMP_CACHE_BYTES L1_CACHE_BYTES | 18 | #define SMP_CACHE_BYTES L1_CACHE_BYTES |
19 | 19 | ||
20 | #define __read_mostly __attribute__((__section__(".data.read_mostly"))) | ||
21 | |||
20 | #endif /* _ASM_CACHE_H */ | 22 | #endif /* _ASM_CACHE_H */ |
diff --git a/arch/mips/include/asm/cpu-info.h b/arch/mips/include/asm/cpu-info.h index b39def3f6e0..c454550eb0c 100644 --- a/arch/mips/include/asm/cpu-info.h +++ b/arch/mips/include/asm/cpu-info.h | |||
@@ -78,6 +78,7 @@ struct cpuinfo_mips { | |||
78 | unsigned int watch_reg_use_cnt; /* Usable by ptrace */ | 78 | unsigned int watch_reg_use_cnt; /* Usable by ptrace */ |
79 | #define NUM_WATCH_REGS 4 | 79 | #define NUM_WATCH_REGS 4 |
80 | u16 watch_reg_masks[NUM_WATCH_REGS]; | 80 | u16 watch_reg_masks[NUM_WATCH_REGS]; |
81 | unsigned int kscratch_mask; /* Usable KScratch mask. */ | ||
81 | } __attribute__((aligned(SMP_CACHE_BYTES))); | 82 | } __attribute__((aligned(SMP_CACHE_BYTES))); |
82 | 83 | ||
83 | extern struct cpuinfo_mips cpu_data[]; | 84 | extern struct cpuinfo_mips cpu_data[]; |
diff --git a/arch/mips/include/asm/inst.h b/arch/mips/include/asm/inst.h index 444ff71aa0e..7ebfc392e58 100644 --- a/arch/mips/include/asm/inst.h +++ b/arch/mips/include/asm/inst.h | |||
@@ -72,6 +72,7 @@ enum spec2_op { | |||
72 | enum spec3_op { | 72 | enum spec3_op { |
73 | ext_op, dextm_op, dextu_op, dext_op, | 73 | ext_op, dextm_op, dextu_op, dext_op, |
74 | ins_op, dinsm_op, dinsu_op, dins_op, | 74 | ins_op, dinsm_op, dinsu_op, dins_op, |
75 | lx_op = 0x0a, | ||
75 | bshfl_op = 0x20, | 76 | bshfl_op = 0x20, |
76 | dbshfl_op = 0x24, | 77 | dbshfl_op = 0x24, |
77 | rdhwr_op = 0x3b | 78 | rdhwr_op = 0x3b |
@@ -179,6 +180,19 @@ enum mad_func { | |||
179 | }; | 180 | }; |
180 | 181 | ||
181 | /* | 182 | /* |
183 | * func field for special3 lx opcodes (Cavium Octeon). | ||
184 | */ | ||
185 | enum lx_func { | ||
186 | lwx_op = 0x00, | ||
187 | lhx_op = 0x04, | ||
188 | lbux_op = 0x06, | ||
189 | ldx_op = 0x08, | ||
190 | lwux_op = 0x10, | ||
191 | lhux_op = 0x14, | ||
192 | lbx_op = 0x16, | ||
193 | }; | ||
194 | |||
195 | /* | ||
182 | * Damn ... bitfields depend from byteorder :-( | 196 | * Damn ... bitfields depend from byteorder :-( |
183 | */ | 197 | */ |
184 | #ifdef __MIPSEB__ | 198 | #ifdef __MIPSEB__ |
diff --git a/arch/mips/include/asm/jump_label.h b/arch/mips/include/asm/jump_label.h new file mode 100644 index 00000000000..7622ccf7507 --- /dev/null +++ b/arch/mips/include/asm/jump_label.h | |||
@@ -0,0 +1,48 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (c) 2010 Cavium Networks, Inc. | ||
7 | */ | ||
8 | #ifndef _ASM_MIPS_JUMP_LABEL_H | ||
9 | #define _ASM_MIPS_JUMP_LABEL_H | ||
10 | |||
11 | #include <linux/types.h> | ||
12 | |||
13 | #ifdef __KERNEL__ | ||
14 | |||
15 | #define JUMP_LABEL_NOP_SIZE 4 | ||
16 | |||
17 | #ifdef CONFIG_64BIT | ||
18 | #define WORD_INSN ".dword" | ||
19 | #else | ||
20 | #define WORD_INSN ".word" | ||
21 | #endif | ||
22 | |||
23 | #define JUMP_LABEL(key, label) \ | ||
24 | do { \ | ||
25 | asm goto("1:\tnop\n\t" \ | ||
26 | "nop\n\t" \ | ||
27 | ".pushsection __jump_table, \"a\"\n\t" \ | ||
28 | WORD_INSN " 1b, %l[" #label "], %0\n\t" \ | ||
29 | ".popsection\n\t" \ | ||
30 | : : "i" (key) : : label); \ | ||
31 | } while (0) | ||
32 | |||
33 | |||
34 | #endif /* __KERNEL__ */ | ||
35 | |||
36 | #ifdef CONFIG_64BIT | ||
37 | typedef u64 jump_label_t; | ||
38 | #else | ||
39 | typedef u32 jump_label_t; | ||
40 | #endif | ||
41 | |||
42 | struct jump_entry { | ||
43 | jump_label_t code; | ||
44 | jump_label_t target; | ||
45 | jump_label_t key; | ||
46 | }; | ||
47 | |||
48 | #endif /* _ASM_MIPS_JUMP_LABEL_H */ | ||
diff --git a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h new file mode 100644 index 00000000000..cda1c8070b2 --- /dev/null +++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h | |||
@@ -0,0 +1,233 @@ | |||
1 | /* | ||
2 | * Atheros AR71XX/AR724X/AR913X SoC register definitions | ||
3 | * | ||
4 | * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org> | ||
5 | * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> | ||
6 | * | ||
7 | * Parts of this file are based on Atheros' 2.6.15 BSP | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License version 2 as published | ||
11 | * by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_MACH_AR71XX_REGS_H | ||
15 | #define __ASM_MACH_AR71XX_REGS_H | ||
16 | |||
17 | #include <linux/types.h> | ||
18 | #include <linux/init.h> | ||
19 | #include <linux/io.h> | ||
20 | #include <linux/bitops.h> | ||
21 | |||
22 | #define AR71XX_APB_BASE 0x18000000 | ||
23 | #define AR71XX_SPI_BASE 0x1f000000 | ||
24 | #define AR71XX_SPI_SIZE 0x01000000 | ||
25 | |||
26 | #define AR71XX_DDR_CTRL_BASE (AR71XX_APB_BASE + 0x00000000) | ||
27 | #define AR71XX_DDR_CTRL_SIZE 0x100 | ||
28 | #define AR71XX_UART_BASE (AR71XX_APB_BASE + 0x00020000) | ||
29 | #define AR71XX_UART_SIZE 0x100 | ||
30 | #define AR71XX_GPIO_BASE (AR71XX_APB_BASE + 0x00040000) | ||
31 | #define AR71XX_GPIO_SIZE 0x100 | ||
32 | #define AR71XX_PLL_BASE (AR71XX_APB_BASE + 0x00050000) | ||
33 | #define AR71XX_PLL_SIZE 0x100 | ||
34 | #define AR71XX_RESET_BASE (AR71XX_APB_BASE + 0x00060000) | ||
35 | #define AR71XX_RESET_SIZE 0x100 | ||
36 | |||
37 | #define AR913X_WMAC_BASE (AR71XX_APB_BASE + 0x000C0000) | ||
38 | #define AR913X_WMAC_SIZE 0x30000 | ||
39 | |||
40 | /* | ||
41 | * DDR_CTRL block | ||
42 | */ | ||
43 | #define AR71XX_DDR_REG_PCI_WIN0 0x7c | ||
44 | #define AR71XX_DDR_REG_PCI_WIN1 0x80 | ||
45 | #define AR71XX_DDR_REG_PCI_WIN2 0x84 | ||
46 | #define AR71XX_DDR_REG_PCI_WIN3 0x88 | ||
47 | #define AR71XX_DDR_REG_PCI_WIN4 0x8c | ||
48 | #define AR71XX_DDR_REG_PCI_WIN5 0x90 | ||
49 | #define AR71XX_DDR_REG_PCI_WIN6 0x94 | ||
50 | #define AR71XX_DDR_REG_PCI_WIN7 0x98 | ||
51 | #define AR71XX_DDR_REG_FLUSH_GE0 0x9c | ||
52 | #define AR71XX_DDR_REG_FLUSH_GE1 0xa0 | ||
53 | #define AR71XX_DDR_REG_FLUSH_USB 0xa4 | ||
54 | #define AR71XX_DDR_REG_FLUSH_PCI 0xa8 | ||
55 | |||
56 | #define AR724X_DDR_REG_FLUSH_GE0 0x7c | ||
57 | #define AR724X_DDR_REG_FLUSH_GE1 0x80 | ||
58 | #define AR724X_DDR_REG_FLUSH_USB 0x84 | ||
59 | #define AR724X_DDR_REG_FLUSH_PCIE 0x88 | ||
60 | |||
61 | #define AR913X_DDR_REG_FLUSH_GE0 0x7c | ||
62 | #define AR913X_DDR_REG_FLUSH_GE1 0x80 | ||
63 | #define AR913X_DDR_REG_FLUSH_USB 0x84 | ||
64 | #define AR913X_DDR_REG_FLUSH_WMAC 0x88 | ||
65 | |||
66 | /* | ||
67 | * PLL block | ||
68 | */ | ||
69 | #define AR71XX_PLL_REG_CPU_CONFIG 0x00 | ||
70 | #define AR71XX_PLL_REG_SEC_CONFIG 0x04 | ||
71 | #define AR71XX_PLL_REG_ETH0_INT_CLOCK 0x10 | ||
72 | #define AR71XX_PLL_REG_ETH1_INT_CLOCK 0x14 | ||
73 | |||
74 | #define AR71XX_PLL_DIV_SHIFT 3 | ||
75 | #define AR71XX_PLL_DIV_MASK 0x1f | ||
76 | #define AR71XX_CPU_DIV_SHIFT 16 | ||
77 | #define AR71XX_CPU_DIV_MASK 0x3 | ||
78 | #define AR71XX_DDR_DIV_SHIFT 18 | ||
79 | #define AR71XX_DDR_DIV_MASK 0x3 | ||
80 | #define AR71XX_AHB_DIV_SHIFT 20 | ||
81 | #define AR71XX_AHB_DIV_MASK 0x7 | ||
82 | |||
83 | #define AR724X_PLL_REG_CPU_CONFIG 0x00 | ||
84 | #define AR724X_PLL_REG_PCIE_CONFIG 0x18 | ||
85 | |||
86 | #define AR724X_PLL_DIV_SHIFT 0 | ||
87 | #define AR724X_PLL_DIV_MASK 0x3ff | ||
88 | #define AR724X_PLL_REF_DIV_SHIFT 10 | ||
89 | #define AR724X_PLL_REF_DIV_MASK 0xf | ||
90 | #define AR724X_AHB_DIV_SHIFT 19 | ||
91 | #define AR724X_AHB_DIV_MASK 0x1 | ||
92 | #define AR724X_DDR_DIV_SHIFT 22 | ||
93 | #define AR724X_DDR_DIV_MASK 0x3 | ||
94 | |||
95 | #define AR913X_PLL_REG_CPU_CONFIG 0x00 | ||
96 | #define AR913X_PLL_REG_ETH_CONFIG 0x04 | ||
97 | #define AR913X_PLL_REG_ETH0_INT_CLOCK 0x14 | ||
98 | #define AR913X_PLL_REG_ETH1_INT_CLOCK 0x18 | ||
99 | |||
100 | #define AR913X_PLL_DIV_SHIFT 0 | ||
101 | #define AR913X_PLL_DIV_MASK 0x3ff | ||
102 | #define AR913X_DDR_DIV_SHIFT 22 | ||
103 | #define AR913X_DDR_DIV_MASK 0x3 | ||
104 | #define AR913X_AHB_DIV_SHIFT 19 | ||
105 | #define AR913X_AHB_DIV_MASK 0x1 | ||
106 | |||
107 | /* | ||
108 | * RESET block | ||
109 | */ | ||
110 | #define AR71XX_RESET_REG_TIMER 0x00 | ||
111 | #define AR71XX_RESET_REG_TIMER_RELOAD 0x04 | ||
112 | #define AR71XX_RESET_REG_WDOG_CTRL 0x08 | ||
113 | #define AR71XX_RESET_REG_WDOG 0x0c | ||
114 | #define AR71XX_RESET_REG_MISC_INT_STATUS 0x10 | ||
115 | #define AR71XX_RESET_REG_MISC_INT_ENABLE 0x14 | ||
116 | #define AR71XX_RESET_REG_PCI_INT_STATUS 0x18 | ||
117 | #define AR71XX_RESET_REG_PCI_INT_ENABLE 0x1c | ||
118 | #define AR71XX_RESET_REG_GLOBAL_INT_STATUS 0x20 | ||
119 | #define AR71XX_RESET_REG_RESET_MODULE 0x24 | ||
120 | #define AR71XX_RESET_REG_PERFC_CTRL 0x2c | ||
121 | #define AR71XX_RESET_REG_PERFC0 0x30 | ||
122 | #define AR71XX_RESET_REG_PERFC1 0x34 | ||
123 | #define AR71XX_RESET_REG_REV_ID 0x90 | ||
124 | |||
125 | #define AR913X_RESET_REG_GLOBAL_INT_STATUS 0x18 | ||
126 | #define AR913X_RESET_REG_RESET_MODULE 0x1c | ||
127 | #define AR913X_RESET_REG_PERF_CTRL 0x20 | ||
128 | #define AR913X_RESET_REG_PERFC0 0x24 | ||
129 | #define AR913X_RESET_REG_PERFC1 0x28 | ||
130 | |||
131 | #define AR724X_RESET_REG_RESET_MODULE 0x1c | ||
132 | |||
133 | #define MISC_INT_DMA BIT(7) | ||
134 | #define MISC_INT_OHCI BIT(6) | ||
135 | #define MISC_INT_PERFC BIT(5) | ||
136 | #define MISC_INT_WDOG BIT(4) | ||
137 | #define MISC_INT_UART BIT(3) | ||
138 | #define MISC_INT_GPIO BIT(2) | ||
139 | #define MISC_INT_ERROR BIT(1) | ||
140 | #define MISC_INT_TIMER BIT(0) | ||
141 | |||
142 | #define AR71XX_RESET_EXTERNAL BIT(28) | ||
143 | #define AR71XX_RESET_FULL_CHIP BIT(24) | ||
144 | #define AR71XX_RESET_CPU_NMI BIT(21) | ||
145 | #define AR71XX_RESET_CPU_COLD BIT(20) | ||
146 | #define AR71XX_RESET_DMA BIT(19) | ||
147 | #define AR71XX_RESET_SLIC BIT(18) | ||
148 | #define AR71XX_RESET_STEREO BIT(17) | ||
149 | #define AR71XX_RESET_DDR BIT(16) | ||
150 | #define AR71XX_RESET_GE1_MAC BIT(13) | ||
151 | #define AR71XX_RESET_GE1_PHY BIT(12) | ||
152 | #define AR71XX_RESET_USBSUS_OVERRIDE BIT(10) | ||
153 | #define AR71XX_RESET_GE0_MAC BIT(9) | ||
154 | #define AR71XX_RESET_GE0_PHY BIT(8) | ||
155 | #define AR71XX_RESET_USB_OHCI_DLL BIT(6) | ||
156 | #define AR71XX_RESET_USB_HOST BIT(5) | ||
157 | #define AR71XX_RESET_USB_PHY BIT(4) | ||
158 | #define AR71XX_RESET_PCI_BUS BIT(1) | ||
159 | #define AR71XX_RESET_PCI_CORE BIT(0) | ||
160 | |||
161 | #define AR724X_RESET_GE1_MDIO BIT(23) | ||
162 | #define AR724X_RESET_GE0_MDIO BIT(22) | ||
163 | #define AR724X_RESET_PCIE_PHY_SERIAL BIT(10) | ||
164 | #define AR724X_RESET_PCIE_PHY BIT(7) | ||
165 | #define AR724X_RESET_PCIE BIT(6) | ||
166 | #define AR724X_RESET_OHCI_DLL BIT(3) | ||
167 | |||
168 | #define AR913X_RESET_AMBA2WMAC BIT(22) | ||
169 | |||
170 | #define REV_ID_MAJOR_MASK 0xfff0 | ||
171 | #define REV_ID_MAJOR_AR71XX 0x00a0 | ||
172 | #define REV_ID_MAJOR_AR913X 0x00b0 | ||
173 | #define REV_ID_MAJOR_AR7240 0x00c0 | ||
174 | #define REV_ID_MAJOR_AR7241 0x0100 | ||
175 | #define REV_ID_MAJOR_AR7242 0x1100 | ||
176 | |||
177 | #define AR71XX_REV_ID_MINOR_MASK 0x3 | ||
178 | #define AR71XX_REV_ID_MINOR_AR7130 0x0 | ||
179 | #define AR71XX_REV_ID_MINOR_AR7141 0x1 | ||
180 | #define AR71XX_REV_ID_MINOR_AR7161 0x2 | ||
181 | #define AR71XX_REV_ID_REVISION_MASK 0x3 | ||
182 | #define AR71XX_REV_ID_REVISION_SHIFT 2 | ||
183 | |||
184 | #define AR913X_REV_ID_MINOR_MASK 0x3 | ||
185 | #define AR913X_REV_ID_MINOR_AR9130 0x0 | ||
186 | #define AR913X_REV_ID_MINOR_AR9132 0x1 | ||
187 | #define AR913X_REV_ID_REVISION_MASK 0x3 | ||
188 | #define AR913X_REV_ID_REVISION_SHIFT 2 | ||
189 | |||
190 | #define AR724X_REV_ID_REVISION_MASK 0x3 | ||
191 | |||
192 | /* | ||
193 | * SPI block | ||
194 | */ | ||
195 | #define AR71XX_SPI_REG_FS 0x00 /* Function Select */ | ||
196 | #define AR71XX_SPI_REG_CTRL 0x04 /* SPI Control */ | ||
197 | #define AR71XX_SPI_REG_IOC 0x08 /* SPI I/O Control */ | ||
198 | #define AR71XX_SPI_REG_RDS 0x0c /* Read Data Shift */ | ||
199 | |||
200 | #define AR71XX_SPI_FS_GPIO BIT(0) /* Enable GPIO mode */ | ||
201 | |||
202 | #define AR71XX_SPI_CTRL_RD BIT(6) /* Remap Disable */ | ||
203 | #define AR71XX_SPI_CTRL_DIV_MASK 0x3f | ||
204 | |||
205 | #define AR71XX_SPI_IOC_DO BIT(0) /* Data Out pin */ | ||
206 | #define AR71XX_SPI_IOC_CLK BIT(8) /* CLK pin */ | ||
207 | #define AR71XX_SPI_IOC_CS(n) BIT(16 + (n)) | ||
208 | #define AR71XX_SPI_IOC_CS0 AR71XX_SPI_IOC_CS(0) | ||
209 | #define AR71XX_SPI_IOC_CS1 AR71XX_SPI_IOC_CS(1) | ||
210 | #define AR71XX_SPI_IOC_CS2 AR71XX_SPI_IOC_CS(2) | ||
211 | #define AR71XX_SPI_IOC_CS_ALL (AR71XX_SPI_IOC_CS0 | AR71XX_SPI_IOC_CS1 | \ | ||
212 | AR71XX_SPI_IOC_CS2) | ||
213 | |||
214 | /* | ||
215 | * GPIO block | ||
216 | */ | ||
217 | #define AR71XX_GPIO_REG_OE 0x00 | ||
218 | #define AR71XX_GPIO_REG_IN 0x04 | ||
219 | #define AR71XX_GPIO_REG_OUT 0x08 | ||
220 | #define AR71XX_GPIO_REG_SET 0x0c | ||
221 | #define AR71XX_GPIO_REG_CLEAR 0x10 | ||
222 | #define AR71XX_GPIO_REG_INT_MODE 0x14 | ||
223 | #define AR71XX_GPIO_REG_INT_TYPE 0x18 | ||
224 | #define AR71XX_GPIO_REG_INT_POLARITY 0x1c | ||
225 | #define AR71XX_GPIO_REG_INT_PENDING 0x20 | ||
226 | #define AR71XX_GPIO_REG_INT_ENABLE 0x24 | ||
227 | #define AR71XX_GPIO_REG_FUNC 0x28 | ||
228 | |||
229 | #define AR71XX_GPIO_COUNT 16 | ||
230 | #define AR724X_GPIO_COUNT 18 | ||
231 | #define AR913X_GPIO_COUNT 22 | ||
232 | |||
233 | #endif /* __ASM_MACH_AR71XX_REGS_H */ | ||
diff --git a/arch/mips/include/asm/mach-ath79/ath79.h b/arch/mips/include/asm/mach-ath79/ath79.h new file mode 100644 index 00000000000..6a9f168506f --- /dev/null +++ b/arch/mips/include/asm/mach-ath79/ath79.h | |||
@@ -0,0 +1,96 @@ | |||
1 | /* | ||
2 | * Atheros AR71XX/AR724X/AR913X common definitions | ||
3 | * | ||
4 | * Copyright (C) 2008-2011 Gabor Juhos <juhosg@openwrt.org> | ||
5 | * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> | ||
6 | * | ||
7 | * Parts of this file are based on Atheros' 2.6.15 BSP | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License version 2 as published | ||
11 | * by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_MACH_ATH79_H | ||
15 | #define __ASM_MACH_ATH79_H | ||
16 | |||
17 | #include <linux/types.h> | ||
18 | #include <linux/io.h> | ||
19 | |||
20 | enum ath79_soc_type { | ||
21 | ATH79_SOC_UNKNOWN, | ||
22 | ATH79_SOC_AR7130, | ||
23 | ATH79_SOC_AR7141, | ||
24 | ATH79_SOC_AR7161, | ||
25 | ATH79_SOC_AR7240, | ||
26 | ATH79_SOC_AR7241, | ||
27 | ATH79_SOC_AR7242, | ||
28 | ATH79_SOC_AR9130, | ||
29 | ATH79_SOC_AR9132 | ||
30 | }; | ||
31 | |||
32 | extern enum ath79_soc_type ath79_soc; | ||
33 | |||
34 | static inline int soc_is_ar71xx(void) | ||
35 | { | ||
36 | return (ath79_soc == ATH79_SOC_AR7130 || | ||
37 | ath79_soc == ATH79_SOC_AR7141 || | ||
38 | ath79_soc == ATH79_SOC_AR7161); | ||
39 | } | ||
40 | |||
41 | static inline int soc_is_ar724x(void) | ||
42 | { | ||
43 | return (ath79_soc == ATH79_SOC_AR7240 || | ||
44 | ath79_soc == ATH79_SOC_AR7241 || | ||
45 | ath79_soc == ATH79_SOC_AR7242); | ||
46 | } | ||
47 | |||
48 | static inline int soc_is_ar7240(void) | ||
49 | { | ||
50 | return (ath79_soc == ATH79_SOC_AR7240); | ||
51 | } | ||
52 | |||
53 | static inline int soc_is_ar7241(void) | ||
54 | { | ||
55 | return (ath79_soc == ATH79_SOC_AR7241); | ||
56 | } | ||
57 | |||
58 | static inline int soc_is_ar7242(void) | ||
59 | { | ||
60 | return (ath79_soc == ATH79_SOC_AR7242); | ||
61 | } | ||
62 | |||
63 | static inline int soc_is_ar913x(void) | ||
64 | { | ||
65 | return (ath79_soc == ATH79_SOC_AR9130 || | ||
66 | ath79_soc == ATH79_SOC_AR9132); | ||
67 | } | ||
68 | |||
69 | extern void __iomem *ath79_ddr_base; | ||
70 | extern void __iomem *ath79_pll_base; | ||
71 | extern void __iomem *ath79_reset_base; | ||
72 | |||
73 | static inline void ath79_pll_wr(unsigned reg, u32 val) | ||
74 | { | ||
75 | __raw_writel(val, ath79_pll_base + reg); | ||
76 | } | ||
77 | |||
78 | static inline u32 ath79_pll_rr(unsigned reg) | ||
79 | { | ||
80 | return __raw_readl(ath79_pll_base + reg); | ||
81 | } | ||
82 | |||
83 | static inline void ath79_reset_wr(unsigned reg, u32 val) | ||
84 | { | ||
85 | __raw_writel(val, ath79_reset_base + reg); | ||
86 | } | ||
87 | |||
88 | static inline u32 ath79_reset_rr(unsigned reg) | ||
89 | { | ||
90 | return __raw_readl(ath79_reset_base + reg); | ||
91 | } | ||
92 | |||
93 | void ath79_device_reset_set(u32 mask); | ||
94 | void ath79_device_reset_clear(u32 mask); | ||
95 | |||
96 | #endif /* __ASM_MACH_ATH79_H */ | ||
diff --git a/arch/mips/include/asm/mach-ath79/ath79_spi_platform.h b/arch/mips/include/asm/mach-ath79/ath79_spi_platform.h new file mode 100644 index 00000000000..aa2283e602f --- /dev/null +++ b/arch/mips/include/asm/mach-ath79/ath79_spi_platform.h | |||
@@ -0,0 +1,23 @@ | |||
1 | /* | ||
2 | * Platform data definition for Atheros AR71XX/AR724X/AR913X SPI controller | ||
3 | * | ||
4 | * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License version 2 as published | ||
8 | * by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #ifndef _ATH79_SPI_PLATFORM_H | ||
12 | #define _ATH79_SPI_PLATFORM_H | ||
13 | |||
14 | struct ath79_spi_platform_data { | ||
15 | unsigned bus_num; | ||
16 | unsigned num_chipselect; | ||
17 | }; | ||
18 | |||
19 | struct ath79_spi_controller_data { | ||
20 | unsigned gpio; | ||
21 | }; | ||
22 | |||
23 | #endif /* _ATH79_SPI_PLATFORM_H */ | ||
diff --git a/arch/mips/include/asm/mach-ath79/cpu-feature-overrides.h b/arch/mips/include/asm/mach-ath79/cpu-feature-overrides.h new file mode 100644 index 00000000000..4476fa03bf3 --- /dev/null +++ b/arch/mips/include/asm/mach-ath79/cpu-feature-overrides.h | |||
@@ -0,0 +1,56 @@ | |||
1 | /* | ||
2 | * Atheros AR71XX/AR724X/AR913X specific CPU feature overrides | ||
3 | * | ||
4 | * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org> | ||
5 | * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> | ||
6 | * | ||
7 | * This file was derived from: include/asm-mips/cpu-features.h | ||
8 | * Copyright (C) 2003, 2004 Ralf Baechle | ||
9 | * Copyright (C) 2004 Maciej W. Rozycki | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify it | ||
12 | * under the terms of the GNU General Public License version 2 as published | ||
13 | * by the Free Software Foundation. | ||
14 | * | ||
15 | */ | ||
16 | #ifndef __ASM_MACH_ATH79_CPU_FEATURE_OVERRIDES_H | ||
17 | #define __ASM_MACH_ATH79_CPU_FEATURE_OVERRIDES_H | ||
18 | |||
19 | #define cpu_has_tlb 1 | ||
20 | #define cpu_has_4kex 1 | ||
21 | #define cpu_has_3k_cache 0 | ||
22 | #define cpu_has_4k_cache 1 | ||
23 | #define cpu_has_tx39_cache 0 | ||
24 | #define cpu_has_sb1_cache 0 | ||
25 | #define cpu_has_fpu 0 | ||
26 | #define cpu_has_32fpr 0 | ||
27 | #define cpu_has_counter 1 | ||
28 | #define cpu_has_watch 1 | ||
29 | #define cpu_has_divec 1 | ||
30 | |||
31 | #define cpu_has_prefetch 1 | ||
32 | #define cpu_has_ejtag 1 | ||
33 | #define cpu_has_llsc 1 | ||
34 | |||
35 | #define cpu_has_mips16 1 | ||
36 | #define cpu_has_mdmx 0 | ||
37 | #define cpu_has_mips3d 0 | ||
38 | #define cpu_has_smartmips 0 | ||
39 | |||
40 | #define cpu_has_mips32r1 1 | ||
41 | #define cpu_has_mips32r2 1 | ||
42 | #define cpu_has_mips64r1 0 | ||
43 | #define cpu_has_mips64r2 0 | ||
44 | |||
45 | #define cpu_has_dsp 0 | ||
46 | #define cpu_has_mipsmt 0 | ||
47 | |||
48 | #define cpu_has_64bits 0 | ||
49 | #define cpu_has_64bit_zero_reg 0 | ||
50 | #define cpu_has_64bit_gp_regs 0 | ||
51 | #define cpu_has_64bit_addresses 0 | ||
52 | |||
53 | #define cpu_dcache_line_size() 32 | ||
54 | #define cpu_icache_line_size() 32 | ||
55 | |||
56 | #endif /* __ASM_MACH_ATH79_CPU_FEATURE_OVERRIDES_H */ | ||
diff --git a/arch/mips/include/asm/mach-ath79/gpio.h b/arch/mips/include/asm/mach-ath79/gpio.h new file mode 100644 index 00000000000..60dcb62785b --- /dev/null +++ b/arch/mips/include/asm/mach-ath79/gpio.h | |||
@@ -0,0 +1,26 @@ | |||
1 | /* | ||
2 | * Atheros AR71XX/AR724X/AR913X GPIO API definitions | ||
3 | * | ||
4 | * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org> | ||
5 | * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published | ||
9 | * by the Free Software Foundation. | ||
10 | * | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_MACH_ATH79_GPIO_H | ||
14 | #define __ASM_MACH_ATH79_GPIO_H | ||
15 | |||
16 | #define ARCH_NR_GPIOS 64 | ||
17 | #include <asm-generic/gpio.h> | ||
18 | |||
19 | int gpio_to_irq(unsigned gpio); | ||
20 | int irq_to_gpio(unsigned irq); | ||
21 | int gpio_get_value(unsigned gpio); | ||
22 | void gpio_set_value(unsigned gpio, int value); | ||
23 | |||
24 | #define gpio_cansleep __gpio_cansleep | ||
25 | |||
26 | #endif /* __ASM_MACH_ATH79_GPIO_H */ | ||
diff --git a/arch/mips/include/asm/mach-ath79/irq.h b/arch/mips/include/asm/mach-ath79/irq.h new file mode 100644 index 00000000000..189bc6eb9c1 --- /dev/null +++ b/arch/mips/include/asm/mach-ath79/irq.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org> | ||
3 | * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it | ||
6 | * under the terms of the GNU General Public License version 2 as published | ||
7 | * by the Free Software Foundation. | ||
8 | */ | ||
9 | #ifndef __ASM_MACH_ATH79_IRQ_H | ||
10 | #define __ASM_MACH_ATH79_IRQ_H | ||
11 | |||
12 | #define MIPS_CPU_IRQ_BASE 0 | ||
13 | #define NR_IRQS 16 | ||
14 | |||
15 | #define ATH79_MISC_IRQ_BASE 8 | ||
16 | #define ATH79_MISC_IRQ_COUNT 8 | ||
17 | |||
18 | #define ATH79_CPU_IRQ_IP2 (MIPS_CPU_IRQ_BASE + 2) | ||
19 | #define ATH79_CPU_IRQ_USB (MIPS_CPU_IRQ_BASE + 3) | ||
20 | #define ATH79_CPU_IRQ_GE0 (MIPS_CPU_IRQ_BASE + 4) | ||
21 | #define ATH79_CPU_IRQ_GE1 (MIPS_CPU_IRQ_BASE + 5) | ||
22 | #define ATH79_CPU_IRQ_MISC (MIPS_CPU_IRQ_BASE + 6) | ||
23 | #define ATH79_CPU_IRQ_TIMER (MIPS_CPU_IRQ_BASE + 7) | ||
24 | |||
25 | #define ATH79_MISC_IRQ_TIMER (ATH79_MISC_IRQ_BASE + 0) | ||
26 | #define ATH79_MISC_IRQ_ERROR (ATH79_MISC_IRQ_BASE + 1) | ||
27 | #define ATH79_MISC_IRQ_GPIO (ATH79_MISC_IRQ_BASE + 2) | ||
28 | #define ATH79_MISC_IRQ_UART (ATH79_MISC_IRQ_BASE + 3) | ||
29 | #define ATH79_MISC_IRQ_WDOG (ATH79_MISC_IRQ_BASE + 4) | ||
30 | #define ATH79_MISC_IRQ_PERFC (ATH79_MISC_IRQ_BASE + 5) | ||
31 | #define ATH79_MISC_IRQ_OHCI (ATH79_MISC_IRQ_BASE + 6) | ||
32 | #define ATH79_MISC_IRQ_DMA (ATH79_MISC_IRQ_BASE + 7) | ||
33 | |||
34 | #include_next <irq.h> | ||
35 | |||
36 | #endif /* __ASM_MACH_ATH79_IRQ_H */ | ||
diff --git a/arch/mips/include/asm/mach-ath79/kernel-entry-init.h b/arch/mips/include/asm/mach-ath79/kernel-entry-init.h new file mode 100644 index 00000000000..d8d046bccc8 --- /dev/null +++ b/arch/mips/include/asm/mach-ath79/kernel-entry-init.h | |||
@@ -0,0 +1,32 @@ | |||
1 | /* | ||
2 | * Atheros AR71XX/AR724X/AR913X specific kernel entry setup | ||
3 | * | ||
4 | * Copyright (C) 2009 Gabor Juhos <juhosg@openwrt.org> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License version 2 as published | ||
8 | * by the Free Software Foundation. | ||
9 | * | ||
10 | */ | ||
11 | #ifndef __ASM_MACH_ATH79_KERNEL_ENTRY_H | ||
12 | #define __ASM_MACH_ATH79_KERNEL_ENTRY_H | ||
13 | |||
14 | /* | ||
15 | * Some bootloaders set the 'Kseg0 coherency algorithm' to | ||
16 | * 'Cacheable, noncoherent, write-through, no write allocate' | ||
17 | * and this cause performance issues. Let's go and change it to | ||
18 | * 'Cacheable, noncoherent, write-back, write allocate' | ||
19 | */ | ||
20 | .macro kernel_entry_setup | ||
21 | mfc0 t0, CP0_CONFIG | ||
22 | li t1, ~CONF_CM_CMASK | ||
23 | and t0, t1 | ||
24 | ori t0, CONF_CM_CACHABLE_NONCOHERENT | ||
25 | mtc0 t0, CP0_CONFIG | ||
26 | nop | ||
27 | .endm | ||
28 | |||
29 | .macro smp_slave_setup | ||
30 | .endm | ||
31 | |||
32 | #endif /* __ASM_MACH_ATH79_KERNEL_ENTRY_H */ | ||
diff --git a/arch/mips/include/asm/mach-ath79/war.h b/arch/mips/include/asm/mach-ath79/war.h new file mode 100644 index 00000000000..323d9f1d8c4 --- /dev/null +++ b/arch/mips/include/asm/mach-ath79/war.h | |||
@@ -0,0 +1,25 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2002, 2004, 2007 by Ralf Baechle <ralf@linux-mips.org> | ||
7 | */ | ||
8 | #ifndef __ASM_MACH_ATH79_WAR_H | ||
9 | #define __ASM_MACH_ATH79_WAR_H | ||
10 | |||
11 | #define R4600_V1_INDEX_ICACHEOP_WAR 0 | ||
12 | #define R4600_V1_HIT_CACHEOP_WAR 0 | ||
13 | #define R4600_V2_HIT_CACHEOP_WAR 0 | ||
14 | #define R5432_CP0_INTERRUPT_WAR 0 | ||
15 | #define BCM1250_M3_WAR 0 | ||
16 | #define SIBYTE_1956_WAR 0 | ||
17 | #define MIPS4K_ICACHE_REFILL_WAR 0 | ||
18 | #define MIPS_CACHE_SYNC_WAR 0 | ||
19 | #define TX49XX_ICACHE_INDEX_INV_WAR 0 | ||
20 | #define RM9000_CDEX_SMP_WAR 0 | ||
21 | #define ICACHE_REFILLS_WORKAROUND_WAR 0 | ||
22 | #define R10000_LLSC_WAR 0 | ||
23 | #define MIPS34K_MISSED_ITLB_WAR 0 | ||
24 | |||
25 | #endif /* __ASM_MACH_ATH79_WAR_H */ | ||
diff --git a/arch/mips/include/asm/mips_machine.h b/arch/mips/include/asm/mips_machine.h new file mode 100644 index 00000000000..363bb352c7f --- /dev/null +++ b/arch/mips/include/asm/mips_machine.h | |||
@@ -0,0 +1,54 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms of the GNU General Public License version 2 as published | ||
6 | * by the Free Software Foundation. | ||
7 | * | ||
8 | */ | ||
9 | |||
10 | #ifndef __ASM_MIPS_MACHINE_H | ||
11 | #define __ASM_MIPS_MACHINE_H | ||
12 | |||
13 | #include <linux/init.h> | ||
14 | #include <linux/stddef.h> | ||
15 | |||
16 | #include <asm/bootinfo.h> | ||
17 | |||
18 | struct mips_machine { | ||
19 | unsigned long mach_type; | ||
20 | const char *mach_id; | ||
21 | const char *mach_name; | ||
22 | void (*mach_setup)(void); | ||
23 | }; | ||
24 | |||
25 | #define MIPS_MACHINE(_type, _id, _name, _setup) \ | ||
26 | static const char machine_name_##_type[] __initconst \ | ||
27 | __aligned(1) = _name; \ | ||
28 | static const char machine_id_##_type[] __initconst \ | ||
29 | __aligned(1) = _id; \ | ||
30 | static struct mips_machine machine_##_type \ | ||
31 | __used __section(.mips.machines.init) = \ | ||
32 | { \ | ||
33 | .mach_type = _type, \ | ||
34 | .mach_id = machine_id_##_type, \ | ||
35 | .mach_name = machine_name_##_type, \ | ||
36 | .mach_setup = _setup, \ | ||
37 | }; | ||
38 | |||
39 | extern long __mips_machines_start; | ||
40 | extern long __mips_machines_end; | ||
41 | |||
42 | #ifdef CONFIG_MIPS_MACHINE | ||
43 | int mips_machtype_setup(char *id) __init; | ||
44 | void mips_machine_setup(void) __init; | ||
45 | void mips_set_machine_name(const char *name) __init; | ||
46 | char *mips_get_machine_name(void); | ||
47 | #else | ||
48 | static inline int mips_machtype_setup(char *id) { return 1; } | ||
49 | static inline void mips_machine_setup(void) { } | ||
50 | static inline void mips_set_machine_name(const char *name) { } | ||
51 | static inline char *mips_get_machine_name(void) { return NULL; } | ||
52 | #endif /* CONFIG_MIPS_MACHINE */ | ||
53 | |||
54 | #endif /* __ASM_MIPS_MACHINE_H */ | ||
diff --git a/arch/mips/include/asm/mman.h b/arch/mips/include/asm/mman.h index c892bfb3e2c..785b4ea4ec3 100644 --- a/arch/mips/include/asm/mman.h +++ b/arch/mips/include/asm/mman.h | |||
@@ -77,6 +77,9 @@ | |||
77 | #define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages */ | 77 | #define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages */ |
78 | #define MADV_HWPOISON 100 /* poison a page for testing */ | 78 | #define MADV_HWPOISON 100 /* poison a page for testing */ |
79 | 79 | ||
80 | #define MADV_HUGEPAGE 14 /* Worth backing with hugepages */ | ||
81 | #define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages */ | ||
82 | |||
80 | /* compatibility flags */ | 83 | /* compatibility flags */ |
81 | #define MAP_FILE 0 | 84 | #define MAP_FILE 0 |
82 | 85 | ||
diff --git a/arch/mips/include/asm/mmu_context.h b/arch/mips/include/asm/mmu_context.h index d9592733a7b..73c0d45798d 100644 --- a/arch/mips/include/asm/mmu_context.h +++ b/arch/mips/include/asm/mmu_context.h | |||
@@ -29,13 +29,7 @@ | |||
29 | #define TLBMISS_HANDLER_SETUP_PGD(pgd) \ | 29 | #define TLBMISS_HANDLER_SETUP_PGD(pgd) \ |
30 | tlbmiss_handler_setup_pgd((unsigned long)(pgd)) | 30 | tlbmiss_handler_setup_pgd((unsigned long)(pgd)) |
31 | 31 | ||
32 | static inline void tlbmiss_handler_setup_pgd(unsigned long pgd) | 32 | extern void tlbmiss_handler_setup_pgd(unsigned long pgd); |
33 | { | ||
34 | /* Check for swapper_pg_dir and convert to physical address. */ | ||
35 | if ((pgd & CKSEG3) == CKSEG0) | ||
36 | pgd = CPHYSADDR(pgd); | ||
37 | write_c0_context(pgd << 11); | ||
38 | } | ||
39 | 33 | ||
40 | #define TLBMISS_HANDLER_SETUP() \ | 34 | #define TLBMISS_HANDLER_SETUP() \ |
41 | do { \ | 35 | do { \ |
diff --git a/arch/mips/include/asm/uasm.h b/arch/mips/include/asm/uasm.h index 892062d6d74..dcbd4bb417e 100644 --- a/arch/mips/include/asm/uasm.h +++ b/arch/mips/include/asm/uasm.h | |||
@@ -115,7 +115,12 @@ Ip_0(_tlbwr); | |||
115 | Ip_u3u1u2(_xor); | 115 | Ip_u3u1u2(_xor); |
116 | Ip_u2u1u3(_xori); | 116 | Ip_u2u1u3(_xori); |
117 | Ip_u2u1msbu3(_dins); | 117 | Ip_u2u1msbu3(_dins); |
118 | Ip_u2u1msbu3(_dinsm); | ||
118 | Ip_u1(_syscall); | 119 | Ip_u1(_syscall); |
120 | Ip_u1u2s3(_bbit0); | ||
121 | Ip_u1u2s3(_bbit1); | ||
122 | Ip_u3u1u2(_lwx); | ||
123 | Ip_u3u1u2(_ldx); | ||
119 | 124 | ||
120 | /* Handle labels. */ | 125 | /* Handle labels. */ |
121 | struct uasm_label { | 126 | struct uasm_label { |
@@ -153,6 +158,7 @@ static inline void __uasminit uasm_l##lb(struct uasm_label **lab, u32 *addr) \ | |||
153 | # define UASM_i_SUBU(buf, rs, rt, rd) uasm_i_dsubu(buf, rs, rt, rd) | 158 | # define UASM_i_SUBU(buf, rs, rt, rd) uasm_i_dsubu(buf, rs, rt, rd) |
154 | # define UASM_i_LL(buf, rs, rt, off) uasm_i_lld(buf, rs, rt, off) | 159 | # define UASM_i_LL(buf, rs, rt, off) uasm_i_lld(buf, rs, rt, off) |
155 | # define UASM_i_SC(buf, rs, rt, off) uasm_i_scd(buf, rs, rt, off) | 160 | # define UASM_i_SC(buf, rs, rt, off) uasm_i_scd(buf, rs, rt, off) |
161 | # define UASM_i_LWX(buf, rs, rt, rd) uasm_i_ldx(buf, rs, rt, rd) | ||
156 | #else | 162 | #else |
157 | # define UASM_i_LW(buf, rs, rt, off) uasm_i_lw(buf, rs, rt, off) | 163 | # define UASM_i_LW(buf, rs, rt, off) uasm_i_lw(buf, rs, rt, off) |
158 | # define UASM_i_SW(buf, rs, rt, off) uasm_i_sw(buf, rs, rt, off) | 164 | # define UASM_i_SW(buf, rs, rt, off) uasm_i_sw(buf, rs, rt, off) |
@@ -167,6 +173,7 @@ static inline void __uasminit uasm_l##lb(struct uasm_label **lab, u32 *addr) \ | |||
167 | # define UASM_i_SUBU(buf, rs, rt, rd) uasm_i_subu(buf, rs, rt, rd) | 173 | # define UASM_i_SUBU(buf, rs, rt, rd) uasm_i_subu(buf, rs, rt, rd) |
168 | # define UASM_i_LL(buf, rs, rt, off) uasm_i_ll(buf, rs, rt, off) | 174 | # define UASM_i_LL(buf, rs, rt, off) uasm_i_ll(buf, rs, rt, off) |
169 | # define UASM_i_SC(buf, rs, rt, off) uasm_i_sc(buf, rs, rt, off) | 175 | # define UASM_i_SC(buf, rs, rt, off) uasm_i_sc(buf, rs, rt, off) |
176 | # define UASM_i_LWX(buf, rs, rt, rd) uasm_i_lwx(buf, rs, rt, rd) | ||
170 | #endif | 177 | #endif |
171 | 178 | ||
172 | #define uasm_i_b(buf, off) uasm_i_beq(buf, 0, 0, off) | 179 | #define uasm_i_b(buf, off) uasm_i_beq(buf, 0, 0, off) |
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile index 22b2e0e3861..cedee2bcbd1 100644 --- a/arch/mips/kernel/Makefile +++ b/arch/mips/kernel/Makefile | |||
@@ -95,6 +95,7 @@ obj-$(CONFIG_GPIO_TXX9) += gpio_txx9.o | |||
95 | obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o | 95 | obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o |
96 | obj-$(CONFIG_EARLY_PRINTK) += early_printk.o | 96 | obj-$(CONFIG_EARLY_PRINTK) += early_printk.o |
97 | obj-$(CONFIG_SPINLOCK_TEST) += spinlock_test.o | 97 | obj-$(CONFIG_SPINLOCK_TEST) += spinlock_test.o |
98 | obj-$(CONFIG_MIPS_MACHINE) += mips_machine.o | ||
98 | 99 | ||
99 | obj-$(CONFIG_OF) += prom.o | 100 | obj-$(CONFIG_OF) += prom.o |
100 | 101 | ||
@@ -106,4 +107,6 @@ obj-$(CONFIG_MIPS_CPUFREQ) += cpufreq/ | |||
106 | 107 | ||
107 | obj-$(CONFIG_HW_PERF_EVENTS) += perf_event.o | 108 | obj-$(CONFIG_HW_PERF_EVENTS) += perf_event.o |
108 | 109 | ||
110 | obj-$(CONFIG_JUMP_LABEL) += jump_label.o | ||
111 | |||
109 | CPPFLAGS_vmlinux.lds := $(KBUILD_CFLAGS) | 112 | CPPFLAGS_vmlinux.lds := $(KBUILD_CFLAGS) |
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index 68dae7b6b5d..f65d4c8c65a 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c | |||
@@ -739,6 +739,8 @@ static inline unsigned int decode_config4(struct cpuinfo_mips *c) | |||
739 | && cpu_has_tlb) | 739 | && cpu_has_tlb) |
740 | c->tlbsize += (config4 & MIPS_CONF4_MMUSIZEEXT) * 0x40; | 740 | c->tlbsize += (config4 & MIPS_CONF4_MMUSIZEEXT) * 0x40; |
741 | 741 | ||
742 | c->kscratch_mask = (config4 >> 16) & 0xff; | ||
743 | |||
742 | return config4 & MIPS_CONF_M; | 744 | return config4 & MIPS_CONF_M; |
743 | } | 745 | } |
744 | 746 | ||
diff --git a/arch/mips/kernel/jump_label.c b/arch/mips/kernel/jump_label.c new file mode 100644 index 00000000000..6001610cfe5 --- /dev/null +++ b/arch/mips/kernel/jump_label.c | |||
@@ -0,0 +1,54 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (c) 2010 Cavium Networks, Inc. | ||
7 | */ | ||
8 | |||
9 | #include <linux/jump_label.h> | ||
10 | #include <linux/kernel.h> | ||
11 | #include <linux/memory.h> | ||
12 | #include <linux/mutex.h> | ||
13 | #include <linux/types.h> | ||
14 | #include <linux/cpu.h> | ||
15 | |||
16 | #include <asm/cacheflush.h> | ||
17 | #include <asm/inst.h> | ||
18 | |||
19 | #ifdef HAVE_JUMP_LABEL | ||
20 | |||
21 | #define J_RANGE_MASK ((1ul << 28) - 1) | ||
22 | |||
23 | void arch_jump_label_transform(struct jump_entry *e, | ||
24 | enum jump_label_type type) | ||
25 | { | ||
26 | union mips_instruction insn; | ||
27 | union mips_instruction *insn_p = | ||
28 | (union mips_instruction *)(unsigned long)e->code; | ||
29 | |||
30 | /* Jump only works within a 256MB aligned region. */ | ||
31 | BUG_ON((e->target & ~J_RANGE_MASK) != (e->code & ~J_RANGE_MASK)); | ||
32 | |||
33 | /* Target must have 4 byte alignment. */ | ||
34 | BUG_ON((e->target & 3) != 0); | ||
35 | |||
36 | if (type == JUMP_LABEL_ENABLE) { | ||
37 | insn.j_format.opcode = j_op; | ||
38 | insn.j_format.target = (e->target & J_RANGE_MASK) >> 2; | ||
39 | } else { | ||
40 | insn.word = 0; /* nop */ | ||
41 | } | ||
42 | |||
43 | get_online_cpus(); | ||
44 | mutex_lock(&text_mutex); | ||
45 | *insn_p = insn; | ||
46 | |||
47 | flush_icache_range((unsigned long)insn_p, | ||
48 | (unsigned long)insn_p + sizeof(*insn_p)); | ||
49 | |||
50 | mutex_unlock(&text_mutex); | ||
51 | put_online_cpus(); | ||
52 | } | ||
53 | |||
54 | #endif /* HAVE_JUMP_LABEL */ | ||
diff --git a/arch/mips/kernel/mips_machine.c b/arch/mips/kernel/mips_machine.c new file mode 100644 index 00000000000..411a058d2c5 --- /dev/null +++ b/arch/mips/kernel/mips_machine.c | |||
@@ -0,0 +1,86 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms of the GNU General Public License version 2 as published | ||
6 | * by the Free Software Foundation. | ||
7 | * | ||
8 | */ | ||
9 | #include <linux/mm.h> | ||
10 | #include <linux/string.h> | ||
11 | #include <linux/slab.h> | ||
12 | |||
13 | #include <asm/mips_machine.h> | ||
14 | |||
15 | static struct mips_machine *mips_machine __initdata; | ||
16 | static char *mips_machine_name = "Unknown"; | ||
17 | |||
18 | #define for_each_machine(mach) \ | ||
19 | for ((mach) = (struct mips_machine *)&__mips_machines_start; \ | ||
20 | (mach) && \ | ||
21 | (unsigned long)(mach) < (unsigned long)&__mips_machines_end; \ | ||
22 | (mach)++) | ||
23 | |||
24 | __init void mips_set_machine_name(const char *name) | ||
25 | { | ||
26 | char *p; | ||
27 | |||
28 | if (name == NULL) | ||
29 | return; | ||
30 | |||
31 | p = kstrdup(name, GFP_KERNEL); | ||
32 | if (!p) | ||
33 | pr_err("MIPS: no memory for machine_name\n"); | ||
34 | |||
35 | mips_machine_name = p; | ||
36 | } | ||
37 | |||
38 | char *mips_get_machine_name(void) | ||
39 | { | ||
40 | return mips_machine_name; | ||
41 | } | ||
42 | |||
43 | __init int mips_machtype_setup(char *id) | ||
44 | { | ||
45 | struct mips_machine *mach; | ||
46 | |||
47 | for_each_machine(mach) { | ||
48 | if (mach->mach_id == NULL) | ||
49 | continue; | ||
50 | |||
51 | if (strcmp(mach->mach_id, id) == 0) { | ||
52 | mips_machtype = mach->mach_type; | ||
53 | return 0; | ||
54 | } | ||
55 | } | ||
56 | |||
57 | pr_err("MIPS: no machine found for id '%s', supported machines:\n", id); | ||
58 | pr_err("%-24s %s\n", "id", "name"); | ||
59 | for_each_machine(mach) | ||
60 | pr_err("%-24s %s\n", mach->mach_id, mach->mach_name); | ||
61 | |||
62 | return 1; | ||
63 | } | ||
64 | |||
65 | __setup("machtype=", mips_machtype_setup); | ||
66 | |||
67 | __init void mips_machine_setup(void) | ||
68 | { | ||
69 | struct mips_machine *mach; | ||
70 | |||
71 | for_each_machine(mach) { | ||
72 | if (mips_machtype == mach->mach_type) { | ||
73 | mips_machine = mach; | ||
74 | break; | ||
75 | } | ||
76 | } | ||
77 | |||
78 | if (!mips_machine) | ||
79 | return; | ||
80 | |||
81 | mips_set_machine_name(mips_machine->mach_name); | ||
82 | pr_info("MIPS: machine is %s\n", mips_machine_name); | ||
83 | |||
84 | if (mips_machine->mach_setup) | ||
85 | mips_machine->mach_setup(); | ||
86 | } | ||
diff --git a/arch/mips/kernel/module.c b/arch/mips/kernel/module.c index 6f51dda87fc..dd940b70196 100644 --- a/arch/mips/kernel/module.c +++ b/arch/mips/kernel/module.c | |||
@@ -30,6 +30,8 @@ | |||
30 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/spinlock.h> | 32 | #include <linux/spinlock.h> |
33 | #include <linux/jump_label.h> | ||
34 | |||
33 | #include <asm/pgtable.h> /* MODULE_START */ | 35 | #include <asm/pgtable.h> /* MODULE_START */ |
34 | 36 | ||
35 | struct mips_hi16 { | 37 | struct mips_hi16 { |
@@ -46,17 +48,9 @@ static DEFINE_SPINLOCK(dbe_lock); | |||
46 | void *module_alloc(unsigned long size) | 48 | void *module_alloc(unsigned long size) |
47 | { | 49 | { |
48 | #ifdef MODULE_START | 50 | #ifdef MODULE_START |
49 | struct vm_struct *area; | 51 | return __vmalloc_node_range(size, 1, MODULE_START, MODULE_END, |
50 | 52 | GFP_KERNEL, PAGE_KERNEL, -1, | |
51 | size = PAGE_ALIGN(size); | 53 | __builtin_return_address(0)); |
52 | if (!size) | ||
53 | return NULL; | ||
54 | |||
55 | area = __get_vm_area(size, VM_ALLOC, MODULE_START, MODULE_END); | ||
56 | if (!area) | ||
57 | return NULL; | ||
58 | |||
59 | return __vmalloc_area(area, GFP_KERNEL, PAGE_KERNEL); | ||
60 | #else | 54 | #else |
61 | if (size == 0) | 55 | if (size == 0) |
62 | return NULL; | 56 | return NULL; |
@@ -390,6 +384,9 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
390 | const Elf_Shdr *s; | 384 | const Elf_Shdr *s; |
391 | char *secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; | 385 | char *secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; |
392 | 386 | ||
387 | /* Make jump label nops. */ | ||
388 | jump_label_apply_nops(me); | ||
389 | |||
393 | INIT_LIST_HEAD(&me->arch.dbe_list); | 390 | INIT_LIST_HEAD(&me->arch.dbe_list); |
394 | for (s = sechdrs; s < sechdrs + hdr->e_shnum; s++) { | 391 | for (s = sechdrs; s < sechdrs + hdr->e_shnum; s++) { |
395 | if (strcmp("__dbe_table", secstrings + s->sh_name) != 0) | 392 | if (strcmp("__dbe_table", secstrings + s->sh_name) != 0) |
diff --git a/arch/mips/kernel/proc.c b/arch/mips/kernel/proc.c index 26109c4d517..e309665b6c8 100644 --- a/arch/mips/kernel/proc.c +++ b/arch/mips/kernel/proc.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <asm/cpu-features.h> | 12 | #include <asm/cpu-features.h> |
13 | #include <asm/mipsregs.h> | 13 | #include <asm/mipsregs.h> |
14 | #include <asm/processor.h> | 14 | #include <asm/processor.h> |
15 | #include <asm/mips_machine.h> | ||
15 | 16 | ||
16 | unsigned int vced_count, vcei_count; | 17 | unsigned int vced_count, vcei_count; |
17 | 18 | ||
@@ -31,8 +32,12 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
31 | /* | 32 | /* |
32 | * For the first processor also print the system type | 33 | * For the first processor also print the system type |
33 | */ | 34 | */ |
34 | if (n == 0) | 35 | if (n == 0) { |
35 | seq_printf(m, "system type\t\t: %s\n", get_system_type()); | 36 | seq_printf(m, "system type\t\t: %s\n", get_system_type()); |
37 | if (mips_get_machine_name()) | ||
38 | seq_printf(m, "machine\t\t\t: %s\n", | ||
39 | mips_get_machine_name()); | ||
40 | } | ||
36 | 41 | ||
37 | seq_printf(m, "processor\t\t: %ld\n", n); | 42 | seq_printf(m, "processor\t\t: %ld\n", n); |
38 | sprintf(fmt, "cpu model\t\t: %%s V%%d.%%d%s\n", | 43 | sprintf(fmt, "cpu model\t\t: %%s V%%d.%%d%s\n", |
@@ -69,6 +74,8 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
69 | ); | 74 | ); |
70 | seq_printf(m, "shadow register sets\t: %d\n", | 75 | seq_printf(m, "shadow register sets\t: %d\n", |
71 | cpu_data[n].srsets); | 76 | cpu_data[n].srsets); |
77 | seq_printf(m, "kscratch registers\t: %d\n", | ||
78 | hweight8(cpu_data[n].kscratch_mask)); | ||
72 | seq_printf(m, "core\t\t\t: %d\n", cpu_data[n].core); | 79 | seq_printf(m, "core\t\t\t: %d\n", cpu_data[n].core); |
73 | 80 | ||
74 | sprintf(fmt, "VCE%%c exceptions\t\t: %s\n", | 81 | sprintf(fmt, "VCE%%c exceptions\t\t: %s\n", |
diff --git a/arch/mips/kernel/prom.c b/arch/mips/kernel/prom.c index 9dbe5836895..a19811e98a4 100644 --- a/arch/mips/kernel/prom.c +++ b/arch/mips/kernel/prom.c | |||
@@ -45,11 +45,9 @@ void __init free_mem_mach(unsigned long addr, unsigned long size) | |||
45 | return free_bootmem(addr, size); | 45 | return free_bootmem(addr, size); |
46 | } | 46 | } |
47 | 47 | ||
48 | u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align) | 48 | void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align) |
49 | { | 49 | { |
50 | return virt_to_phys( | 50 | return __alloc_bootmem(size, align, __pa(MAX_DMA_ADDRESS)); |
51 | __alloc_bootmem(size, align, __pa(MAX_DMA_ADDRESS)) | ||
52 | ); | ||
53 | } | 51 | } |
54 | 52 | ||
55 | #ifdef CONFIG_BLK_DEV_INITRD | 53 | #ifdef CONFIG_BLK_DEV_INITRD |
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index acd3f2c49c0..8ad1d5679f1 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c | |||
@@ -70,7 +70,7 @@ static char __initdata builtin_cmdline[COMMAND_LINE_SIZE] = CONFIG_CMDLINE; | |||
70 | * mips_io_port_base is the begin of the address space to which x86 style | 70 | * mips_io_port_base is the begin of the address space to which x86 style |
71 | * I/O ports are mapped. | 71 | * I/O ports are mapped. |
72 | */ | 72 | */ |
73 | const unsigned long mips_io_port_base __read_mostly = -1; | 73 | const unsigned long mips_io_port_base = -1; |
74 | EXPORT_SYMBOL(mips_io_port_base); | 74 | EXPORT_SYMBOL(mips_io_port_base); |
75 | 75 | ||
76 | static struct resource code_resource = { .name = "Kernel code", }; | 76 | static struct resource code_resource = { .name = "Kernel code", }; |
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index e9710430254..71350f7f2d8 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
@@ -1592,7 +1592,6 @@ void __cpuinit per_cpu_trap_init(void) | |||
1592 | #endif /* CONFIG_MIPS_MT_SMTC */ | 1592 | #endif /* CONFIG_MIPS_MT_SMTC */ |
1593 | 1593 | ||
1594 | cpu_data[cpu].asid_cache = ASID_FIRST_VERSION; | 1594 | cpu_data[cpu].asid_cache = ASID_FIRST_VERSION; |
1595 | TLBMISS_HANDLER_SETUP(); | ||
1596 | 1595 | ||
1597 | atomic_inc(&init_mm.mm_count); | 1596 | atomic_inc(&init_mm.mm_count); |
1598 | current->active_mm = &init_mm; | 1597 | current->active_mm = &init_mm; |
@@ -1614,6 +1613,7 @@ void __cpuinit per_cpu_trap_init(void) | |||
1614 | write_c0_wired(0); | 1613 | write_c0_wired(0); |
1615 | } | 1614 | } |
1616 | #endif /* CONFIG_MIPS_MT_SMTC */ | 1615 | #endif /* CONFIG_MIPS_MT_SMTC */ |
1616 | TLBMISS_HANDLER_SETUP(); | ||
1617 | } | 1617 | } |
1618 | 1618 | ||
1619 | /* Install CPU exception handler */ | 1619 | /* Install CPU exception handler */ |
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S index f25df73db92..570607b376b 100644 --- a/arch/mips/kernel/vmlinux.lds.S +++ b/arch/mips/kernel/vmlinux.lds.S | |||
@@ -98,6 +98,13 @@ SECTIONS | |||
98 | INIT_TEXT_SECTION(PAGE_SIZE) | 98 | INIT_TEXT_SECTION(PAGE_SIZE) |
99 | INIT_DATA_SECTION(16) | 99 | INIT_DATA_SECTION(16) |
100 | 100 | ||
101 | . = ALIGN(4); | ||
102 | .mips.machines.init : AT(ADDR(.mips.machines.init) - LOAD_OFFSET) { | ||
103 | __mips_machines_start = .; | ||
104 | *(.mips.machines.init) | ||
105 | __mips_machines_end = .; | ||
106 | } | ||
107 | |||
101 | /* .exit.text is discarded at runtime, not link time, to deal with | 108 | /* .exit.text is discarded at runtime, not link time, to deal with |
102 | * references from .rodata | 109 | * references from .rodata |
103 | */ | 110 | */ |
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c index 93816f3bca6..083d3412d0b 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c | |||
@@ -26,8 +26,10 @@ | |||
26 | #include <linux/smp.h> | 26 | #include <linux/smp.h> |
27 | #include <linux/string.h> | 27 | #include <linux/string.h> |
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/cache.h> | ||
29 | 30 | ||
30 | #include <asm/mmu_context.h> | 31 | #include <asm/cacheflush.h> |
32 | #include <asm/pgtable.h> | ||
31 | #include <asm/war.h> | 33 | #include <asm/war.h> |
32 | #include <asm/uasm.h> | 34 | #include <asm/uasm.h> |
33 | 35 | ||
@@ -63,6 +65,52 @@ static inline int __maybe_unused r10000_llsc_war(void) | |||
63 | return R10000_LLSC_WAR; | 65 | return R10000_LLSC_WAR; |
64 | } | 66 | } |
65 | 67 | ||
68 | static int use_bbit_insns(void) | ||
69 | { | ||
70 | switch (current_cpu_type()) { | ||
71 | case CPU_CAVIUM_OCTEON: | ||
72 | case CPU_CAVIUM_OCTEON_PLUS: | ||
73 | case CPU_CAVIUM_OCTEON2: | ||
74 | return 1; | ||
75 | default: | ||
76 | return 0; | ||
77 | } | ||
78 | } | ||
79 | |||
80 | static int use_lwx_insns(void) | ||
81 | { | ||
82 | switch (current_cpu_type()) { | ||
83 | case CPU_CAVIUM_OCTEON2: | ||
84 | return 1; | ||
85 | default: | ||
86 | return 0; | ||
87 | } | ||
88 | } | ||
89 | #if defined(CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE) && \ | ||
90 | CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE > 0 | ||
91 | static bool scratchpad_available(void) | ||
92 | { | ||
93 | return true; | ||
94 | } | ||
95 | static int scratchpad_offset(int i) | ||
96 | { | ||
97 | /* | ||
98 | * CVMSEG starts at address -32768 and extends for | ||
99 | * CAVIUM_OCTEON_CVMSEG_SIZE 128 byte cache lines. | ||
100 | */ | ||
101 | i += 1; /* Kernel use starts at the top and works down. */ | ||
102 | return CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE * 128 - (8 * i) - 32768; | ||
103 | } | ||
104 | #else | ||
105 | static bool scratchpad_available(void) | ||
106 | { | ||
107 | return false; | ||
108 | } | ||
109 | static int scratchpad_offset(int i) | ||
110 | { | ||
111 | BUG(); | ||
112 | } | ||
113 | #endif | ||
66 | /* | 114 | /* |
67 | * Found by experiment: At least some revisions of the 4kc throw under | 115 | * Found by experiment: At least some revisions of the 4kc throw under |
68 | * some circumstances a machine check exception, triggered by invalid | 116 | * some circumstances a machine check exception, triggered by invalid |
@@ -173,11 +221,41 @@ static struct uasm_reloc relocs[128] __cpuinitdata; | |||
173 | static int check_for_high_segbits __cpuinitdata; | 221 | static int check_for_high_segbits __cpuinitdata; |
174 | #endif | 222 | #endif |
175 | 223 | ||
224 | static int check_for_high_segbits __cpuinitdata; | ||
225 | |||
226 | static unsigned int kscratch_used_mask __cpuinitdata; | ||
227 | |||
228 | static int __cpuinit allocate_kscratch(void) | ||
229 | { | ||
230 | int r; | ||
231 | unsigned int a = cpu_data[0].kscratch_mask & ~kscratch_used_mask; | ||
232 | |||
233 | r = ffs(a); | ||
234 | |||
235 | if (r == 0) | ||
236 | return -1; | ||
237 | |||
238 | r--; /* make it zero based */ | ||
239 | |||
240 | kscratch_used_mask |= (1 << r); | ||
241 | |||
242 | return r; | ||
243 | } | ||
244 | |||
245 | static int scratch_reg __cpuinitdata; | ||
246 | static int pgd_reg __cpuinitdata; | ||
247 | enum vmalloc64_mode {not_refill, refill_scratch, refill_noscratch}; | ||
248 | |||
176 | #ifndef CONFIG_MIPS_PGD_C0_CONTEXT | 249 | #ifndef CONFIG_MIPS_PGD_C0_CONTEXT |
250 | |||
177 | /* | 251 | /* |
178 | * CONFIG_MIPS_PGD_C0_CONTEXT implies 64 bit and lack of pgd_current, | 252 | * CONFIG_MIPS_PGD_C0_CONTEXT implies 64 bit and lack of pgd_current, |
179 | * we cannot do r3000 under these circumstances. | 253 | * we cannot do r3000 under these circumstances. |
254 | * | ||
255 | * Declare pgd_current here instead of including mmu_context.h to avoid type | ||
256 | * conflicts for tlbmiss_handler_setup_pgd | ||
180 | */ | 257 | */ |
258 | extern unsigned long pgd_current[]; | ||
181 | 259 | ||
182 | /* | 260 | /* |
183 | * The R3000 TLB handler is simple. | 261 | * The R3000 TLB handler is simple. |
@@ -440,21 +518,43 @@ static __cpuinit __maybe_unused void build_convert_pte_to_entrylo(u32 **p, | |||
440 | static __cpuinit void build_restore_pagemask(u32 **p, | 518 | static __cpuinit void build_restore_pagemask(u32 **p, |
441 | struct uasm_reloc **r, | 519 | struct uasm_reloc **r, |
442 | unsigned int tmp, | 520 | unsigned int tmp, |
443 | enum label_id lid) | 521 | enum label_id lid, |
522 | int restore_scratch) | ||
444 | { | 523 | { |
445 | /* Reset default page size */ | 524 | if (restore_scratch) { |
446 | if (PM_DEFAULT_MASK >> 16) { | 525 | /* Reset default page size */ |
447 | uasm_i_lui(p, tmp, PM_DEFAULT_MASK >> 16); | 526 | if (PM_DEFAULT_MASK >> 16) { |
448 | uasm_i_ori(p, tmp, tmp, PM_DEFAULT_MASK & 0xffff); | 527 | uasm_i_lui(p, tmp, PM_DEFAULT_MASK >> 16); |
449 | uasm_il_b(p, r, lid); | 528 | uasm_i_ori(p, tmp, tmp, PM_DEFAULT_MASK & 0xffff); |
450 | uasm_i_mtc0(p, tmp, C0_PAGEMASK); | 529 | uasm_i_mtc0(p, tmp, C0_PAGEMASK); |
451 | } else if (PM_DEFAULT_MASK) { | 530 | uasm_il_b(p, r, lid); |
452 | uasm_i_ori(p, tmp, 0, PM_DEFAULT_MASK); | 531 | } else if (PM_DEFAULT_MASK) { |
453 | uasm_il_b(p, r, lid); | 532 | uasm_i_ori(p, tmp, 0, PM_DEFAULT_MASK); |
454 | uasm_i_mtc0(p, tmp, C0_PAGEMASK); | 533 | uasm_i_mtc0(p, tmp, C0_PAGEMASK); |
534 | uasm_il_b(p, r, lid); | ||
535 | } else { | ||
536 | uasm_i_mtc0(p, 0, C0_PAGEMASK); | ||
537 | uasm_il_b(p, r, lid); | ||
538 | } | ||
539 | if (scratch_reg > 0) | ||
540 | UASM_i_MFC0(p, 1, 31, scratch_reg); | ||
541 | else | ||
542 | UASM_i_LW(p, 1, scratchpad_offset(0), 0); | ||
455 | } else { | 543 | } else { |
456 | uasm_il_b(p, r, lid); | 544 | /* Reset default page size */ |
457 | uasm_i_mtc0(p, 0, C0_PAGEMASK); | 545 | if (PM_DEFAULT_MASK >> 16) { |
546 | uasm_i_lui(p, tmp, PM_DEFAULT_MASK >> 16); | ||
547 | uasm_i_ori(p, tmp, tmp, PM_DEFAULT_MASK & 0xffff); | ||
548 | uasm_il_b(p, r, lid); | ||
549 | uasm_i_mtc0(p, tmp, C0_PAGEMASK); | ||
550 | } else if (PM_DEFAULT_MASK) { | ||
551 | uasm_i_ori(p, tmp, 0, PM_DEFAULT_MASK); | ||
552 | uasm_il_b(p, r, lid); | ||
553 | uasm_i_mtc0(p, tmp, C0_PAGEMASK); | ||
554 | } else { | ||
555 | uasm_il_b(p, r, lid); | ||
556 | uasm_i_mtc0(p, 0, C0_PAGEMASK); | ||
557 | } | ||
458 | } | 558 | } |
459 | } | 559 | } |
460 | 560 | ||
@@ -462,7 +562,8 @@ static __cpuinit void build_huge_tlb_write_entry(u32 **p, | |||
462 | struct uasm_label **l, | 562 | struct uasm_label **l, |
463 | struct uasm_reloc **r, | 563 | struct uasm_reloc **r, |
464 | unsigned int tmp, | 564 | unsigned int tmp, |
465 | enum tlb_write_entry wmode) | 565 | enum tlb_write_entry wmode, |
566 | int restore_scratch) | ||
466 | { | 567 | { |
467 | /* Set huge page tlb entry size */ | 568 | /* Set huge page tlb entry size */ |
468 | uasm_i_lui(p, tmp, PM_HUGE_MASK >> 16); | 569 | uasm_i_lui(p, tmp, PM_HUGE_MASK >> 16); |
@@ -471,7 +572,7 @@ static __cpuinit void build_huge_tlb_write_entry(u32 **p, | |||
471 | 572 | ||
472 | build_tlb_write_entry(p, l, r, wmode); | 573 | build_tlb_write_entry(p, l, r, wmode); |
473 | 574 | ||
474 | build_restore_pagemask(p, r, tmp, label_leave); | 575 | build_restore_pagemask(p, r, tmp, label_leave, restore_scratch); |
475 | } | 576 | } |
476 | 577 | ||
477 | /* | 578 | /* |
@@ -482,8 +583,12 @@ build_is_huge_pte(u32 **p, struct uasm_reloc **r, unsigned int tmp, | |||
482 | unsigned int pmd, int lid) | 583 | unsigned int pmd, int lid) |
483 | { | 584 | { |
484 | UASM_i_LW(p, tmp, 0, pmd); | 585 | UASM_i_LW(p, tmp, 0, pmd); |
485 | uasm_i_andi(p, tmp, tmp, _PAGE_HUGE); | 586 | if (use_bbit_insns()) { |
486 | uasm_il_bnez(p, r, tmp, lid); | 587 | uasm_il_bbit1(p, r, tmp, ilog2(_PAGE_HUGE), lid); |
588 | } else { | ||
589 | uasm_i_andi(p, tmp, tmp, _PAGE_HUGE); | ||
590 | uasm_il_bnez(p, r, tmp, lid); | ||
591 | } | ||
487 | } | 592 | } |
488 | 593 | ||
489 | static __cpuinit void build_huge_update_entries(u32 **p, | 594 | static __cpuinit void build_huge_update_entries(u32 **p, |
@@ -532,7 +637,7 @@ static __cpuinit void build_huge_handler_tail(u32 **p, | |||
532 | UASM_i_SW(p, pte, 0, ptr); | 637 | UASM_i_SW(p, pte, 0, ptr); |
533 | #endif | 638 | #endif |
534 | build_huge_update_entries(p, pte, ptr); | 639 | build_huge_update_entries(p, pte, ptr); |
535 | build_huge_tlb_write_entry(p, l, r, pte, tlb_indexed); | 640 | build_huge_tlb_write_entry(p, l, r, pte, tlb_indexed, 0); |
536 | } | 641 | } |
537 | #endif /* CONFIG_HUGETLB_PAGE */ | 642 | #endif /* CONFIG_HUGETLB_PAGE */ |
538 | 643 | ||
@@ -573,13 +678,22 @@ build_get_pmde64(u32 **p, struct uasm_label **l, struct uasm_reloc **r, | |||
573 | /* No uasm_i_nop needed here, since the next insn doesn't touch TMP. */ | 678 | /* No uasm_i_nop needed here, since the next insn doesn't touch TMP. */ |
574 | 679 | ||
575 | #ifdef CONFIG_MIPS_PGD_C0_CONTEXT | 680 | #ifdef CONFIG_MIPS_PGD_C0_CONTEXT |
576 | /* | 681 | if (pgd_reg != -1) { |
577 | * &pgd << 11 stored in CONTEXT [23..63]. | 682 | /* pgd is in pgd_reg */ |
578 | */ | 683 | UASM_i_MFC0(p, ptr, 31, pgd_reg); |
579 | UASM_i_MFC0(p, ptr, C0_CONTEXT); | 684 | } else { |
580 | uasm_i_dins(p, ptr, 0, 0, 23); /* Clear lower 23 bits of context. */ | 685 | /* |
581 | uasm_i_ori(p, ptr, ptr, 0x540); /* 1 0 1 0 1 << 6 xkphys cached */ | 686 | * &pgd << 11 stored in CONTEXT [23..63]. |
582 | uasm_i_drotr(p, ptr, ptr, 11); | 687 | */ |
688 | UASM_i_MFC0(p, ptr, C0_CONTEXT); | ||
689 | |||
690 | /* Clear lower 23 bits of context. */ | ||
691 | uasm_i_dins(p, ptr, 0, 0, 23); | ||
692 | |||
693 | /* 1 0 1 0 1 << 6 xkphys cached */ | ||
694 | uasm_i_ori(p, ptr, ptr, 0x540); | ||
695 | uasm_i_drotr(p, ptr, ptr, 11); | ||
696 | } | ||
583 | #elif defined(CONFIG_SMP) | 697 | #elif defined(CONFIG_SMP) |
584 | # ifdef CONFIG_MIPS_MT_SMTC | 698 | # ifdef CONFIG_MIPS_MT_SMTC |
585 | /* | 699 | /* |
@@ -620,7 +734,6 @@ build_get_pmde64(u32 **p, struct uasm_label **l, struct uasm_reloc **r, | |||
620 | #endif | 734 | #endif |
621 | } | 735 | } |
622 | 736 | ||
623 | enum vmalloc64_mode {not_refill, refill}; | ||
624 | /* | 737 | /* |
625 | * BVADDR is the faulting address, PTR is scratch. | 738 | * BVADDR is the faulting address, PTR is scratch. |
626 | * PTR will hold the pgd for vmalloc. | 739 | * PTR will hold the pgd for vmalloc. |
@@ -638,7 +751,7 @@ build_get_pgd_vmalloc64(u32 **p, struct uasm_label **l, struct uasm_reloc **r, | |||
638 | 751 | ||
639 | uasm_l_vmalloc(l, *p); | 752 | uasm_l_vmalloc(l, *p); |
640 | 753 | ||
641 | if (mode == refill && check_for_high_segbits) { | 754 | if (mode != not_refill && check_for_high_segbits) { |
642 | if (single_insn_swpd) { | 755 | if (single_insn_swpd) { |
643 | uasm_il_bltz(p, r, bvaddr, label_vmalloc_done); | 756 | uasm_il_bltz(p, r, bvaddr, label_vmalloc_done); |
644 | uasm_i_lui(p, ptr, uasm_rel_hi(swpd)); | 757 | uasm_i_lui(p, ptr, uasm_rel_hi(swpd)); |
@@ -661,7 +774,7 @@ build_get_pgd_vmalloc64(u32 **p, struct uasm_label **l, struct uasm_reloc **r, | |||
661 | uasm_i_daddiu(p, ptr, ptr, uasm_rel_lo(swpd)); | 774 | uasm_i_daddiu(p, ptr, ptr, uasm_rel_lo(swpd)); |
662 | } | 775 | } |
663 | } | 776 | } |
664 | if (mode == refill && check_for_high_segbits) { | 777 | if (mode != not_refill && check_for_high_segbits) { |
665 | uasm_l_large_segbits_fault(l, *p); | 778 | uasm_l_large_segbits_fault(l, *p); |
666 | /* | 779 | /* |
667 | * We get here if we are an xsseg address, or if we are | 780 | * We get here if we are an xsseg address, or if we are |
@@ -677,7 +790,15 @@ build_get_pgd_vmalloc64(u32 **p, struct uasm_label **l, struct uasm_reloc **r, | |||
677 | */ | 790 | */ |
678 | UASM_i_LA(p, ptr, (unsigned long)tlb_do_page_fault_0); | 791 | UASM_i_LA(p, ptr, (unsigned long)tlb_do_page_fault_0); |
679 | uasm_i_jr(p, ptr); | 792 | uasm_i_jr(p, ptr); |
680 | uasm_i_nop(p); | 793 | |
794 | if (mode == refill_scratch) { | ||
795 | if (scratch_reg > 0) | ||
796 | UASM_i_MFC0(p, 1, 31, scratch_reg); | ||
797 | else | ||
798 | UASM_i_LW(p, 1, scratchpad_offset(0), 0); | ||
799 | } else { | ||
800 | uasm_i_nop(p); | ||
801 | } | ||
681 | } | 802 | } |
682 | } | 803 | } |
683 | 804 | ||
@@ -834,6 +955,185 @@ static void __cpuinit build_update_entries(u32 **p, unsigned int tmp, | |||
834 | #endif | 955 | #endif |
835 | } | 956 | } |
836 | 957 | ||
958 | struct mips_huge_tlb_info { | ||
959 | int huge_pte; | ||
960 | int restore_scratch; | ||
961 | }; | ||
962 | |||
963 | static struct mips_huge_tlb_info __cpuinit | ||
964 | build_fast_tlb_refill_handler (u32 **p, struct uasm_label **l, | ||
965 | struct uasm_reloc **r, unsigned int tmp, | ||
966 | unsigned int ptr, int c0_scratch) | ||
967 | { | ||
968 | struct mips_huge_tlb_info rv; | ||
969 | unsigned int even, odd; | ||
970 | int vmalloc_branch_delay_filled = 0; | ||
971 | const int scratch = 1; /* Our extra working register */ | ||
972 | |||
973 | rv.huge_pte = scratch; | ||
974 | rv.restore_scratch = 0; | ||
975 | |||
976 | if (check_for_high_segbits) { | ||
977 | UASM_i_MFC0(p, tmp, C0_BADVADDR); | ||
978 | |||
979 | if (pgd_reg != -1) | ||
980 | UASM_i_MFC0(p, ptr, 31, pgd_reg); | ||
981 | else | ||
982 | UASM_i_MFC0(p, ptr, C0_CONTEXT); | ||
983 | |||
984 | if (c0_scratch >= 0) | ||
985 | UASM_i_MTC0(p, scratch, 31, c0_scratch); | ||
986 | else | ||
987 | UASM_i_SW(p, scratch, scratchpad_offset(0), 0); | ||
988 | |||
989 | uasm_i_dsrl_safe(p, scratch, tmp, | ||
990 | PGDIR_SHIFT + PGD_ORDER + PAGE_SHIFT - 3); | ||
991 | uasm_il_bnez(p, r, scratch, label_vmalloc); | ||
992 | |||
993 | if (pgd_reg == -1) { | ||
994 | vmalloc_branch_delay_filled = 1; | ||
995 | /* Clear lower 23 bits of context. */ | ||
996 | uasm_i_dins(p, ptr, 0, 0, 23); | ||
997 | } | ||
998 | } else { | ||
999 | if (pgd_reg != -1) | ||
1000 | UASM_i_MFC0(p, ptr, 31, pgd_reg); | ||
1001 | else | ||
1002 | UASM_i_MFC0(p, ptr, C0_CONTEXT); | ||
1003 | |||
1004 | UASM_i_MFC0(p, tmp, C0_BADVADDR); | ||
1005 | |||
1006 | if (c0_scratch >= 0) | ||
1007 | UASM_i_MTC0(p, scratch, 31, c0_scratch); | ||
1008 | else | ||
1009 | UASM_i_SW(p, scratch, scratchpad_offset(0), 0); | ||
1010 | |||
1011 | if (pgd_reg == -1) | ||
1012 | /* Clear lower 23 bits of context. */ | ||
1013 | uasm_i_dins(p, ptr, 0, 0, 23); | ||
1014 | |||
1015 | uasm_il_bltz(p, r, tmp, label_vmalloc); | ||
1016 | } | ||
1017 | |||
1018 | if (pgd_reg == -1) { | ||
1019 | vmalloc_branch_delay_filled = 1; | ||
1020 | /* 1 0 1 0 1 << 6 xkphys cached */ | ||
1021 | uasm_i_ori(p, ptr, ptr, 0x540); | ||
1022 | uasm_i_drotr(p, ptr, ptr, 11); | ||
1023 | } | ||
1024 | |||
1025 | #ifdef __PAGETABLE_PMD_FOLDED | ||
1026 | #define LOC_PTEP scratch | ||
1027 | #else | ||
1028 | #define LOC_PTEP ptr | ||
1029 | #endif | ||
1030 | |||
1031 | if (!vmalloc_branch_delay_filled) | ||
1032 | /* get pgd offset in bytes */ | ||
1033 | uasm_i_dsrl_safe(p, scratch, tmp, PGDIR_SHIFT - 3); | ||
1034 | |||
1035 | uasm_l_vmalloc_done(l, *p); | ||
1036 | |||
1037 | /* | ||
1038 | * tmp ptr | ||
1039 | * fall-through case = badvaddr *pgd_current | ||
1040 | * vmalloc case = badvaddr swapper_pg_dir | ||
1041 | */ | ||
1042 | |||
1043 | if (vmalloc_branch_delay_filled) | ||
1044 | /* get pgd offset in bytes */ | ||
1045 | uasm_i_dsrl_safe(p, scratch, tmp, PGDIR_SHIFT - 3); | ||
1046 | |||
1047 | #ifdef __PAGETABLE_PMD_FOLDED | ||
1048 | GET_CONTEXT(p, tmp); /* get context reg */ | ||
1049 | #endif | ||
1050 | uasm_i_andi(p, scratch, scratch, (PTRS_PER_PGD - 1) << 3); | ||
1051 | |||
1052 | if (use_lwx_insns()) { | ||
1053 | UASM_i_LWX(p, LOC_PTEP, scratch, ptr); | ||
1054 | } else { | ||
1055 | uasm_i_daddu(p, ptr, ptr, scratch); /* add in pgd offset */ | ||
1056 | uasm_i_ld(p, LOC_PTEP, 0, ptr); /* get pmd pointer */ | ||
1057 | } | ||
1058 | |||
1059 | #ifndef __PAGETABLE_PMD_FOLDED | ||
1060 | /* get pmd offset in bytes */ | ||
1061 | uasm_i_dsrl_safe(p, scratch, tmp, PMD_SHIFT - 3); | ||
1062 | uasm_i_andi(p, scratch, scratch, (PTRS_PER_PMD - 1) << 3); | ||
1063 | GET_CONTEXT(p, tmp); /* get context reg */ | ||
1064 | |||
1065 | if (use_lwx_insns()) { | ||
1066 | UASM_i_LWX(p, scratch, scratch, ptr); | ||
1067 | } else { | ||
1068 | uasm_i_daddu(p, ptr, ptr, scratch); /* add in pmd offset */ | ||
1069 | UASM_i_LW(p, scratch, 0, ptr); | ||
1070 | } | ||
1071 | #endif | ||
1072 | /* Adjust the context during the load latency. */ | ||
1073 | build_adjust_context(p, tmp); | ||
1074 | |||
1075 | #ifdef CONFIG_HUGETLB_PAGE | ||
1076 | uasm_il_bbit1(p, r, scratch, ilog2(_PAGE_HUGE), label_tlb_huge_update); | ||
1077 | /* | ||
1078 | * The in the LWX case we don't want to do the load in the | ||
1079 | * delay slot. It cannot issue in the same cycle and may be | ||
1080 | * speculative and unneeded. | ||
1081 | */ | ||
1082 | if (use_lwx_insns()) | ||
1083 | uasm_i_nop(p); | ||
1084 | #endif /* CONFIG_HUGETLB_PAGE */ | ||
1085 | |||
1086 | |||
1087 | /* build_update_entries */ | ||
1088 | if (use_lwx_insns()) { | ||
1089 | even = ptr; | ||
1090 | odd = tmp; | ||
1091 | UASM_i_LWX(p, even, scratch, tmp); | ||
1092 | UASM_i_ADDIU(p, tmp, tmp, sizeof(pte_t)); | ||
1093 | UASM_i_LWX(p, odd, scratch, tmp); | ||
1094 | } else { | ||
1095 | UASM_i_ADDU(p, ptr, scratch, tmp); /* add in offset */ | ||
1096 | even = tmp; | ||
1097 | odd = ptr; | ||
1098 | UASM_i_LW(p, even, 0, ptr); /* get even pte */ | ||
1099 | UASM_i_LW(p, odd, sizeof(pte_t), ptr); /* get odd pte */ | ||
1100 | } | ||
1101 | if (kernel_uses_smartmips_rixi) { | ||
1102 | uasm_i_dsrl_safe(p, even, even, ilog2(_PAGE_NO_EXEC)); | ||
1103 | uasm_i_dsrl_safe(p, odd, odd, ilog2(_PAGE_NO_EXEC)); | ||
1104 | uasm_i_drotr(p, even, even, | ||
1105 | ilog2(_PAGE_GLOBAL) - ilog2(_PAGE_NO_EXEC)); | ||
1106 | UASM_i_MTC0(p, even, C0_ENTRYLO0); /* load it */ | ||
1107 | uasm_i_drotr(p, odd, odd, | ||
1108 | ilog2(_PAGE_GLOBAL) - ilog2(_PAGE_NO_EXEC)); | ||
1109 | } else { | ||
1110 | uasm_i_dsrl_safe(p, even, even, ilog2(_PAGE_GLOBAL)); | ||
1111 | UASM_i_MTC0(p, even, C0_ENTRYLO0); /* load it */ | ||
1112 | uasm_i_dsrl_safe(p, odd, odd, ilog2(_PAGE_GLOBAL)); | ||
1113 | } | ||
1114 | UASM_i_MTC0(p, odd, C0_ENTRYLO1); /* load it */ | ||
1115 | |||
1116 | if (c0_scratch >= 0) { | ||
1117 | UASM_i_MFC0(p, scratch, 31, c0_scratch); | ||
1118 | build_tlb_write_entry(p, l, r, tlb_random); | ||
1119 | uasm_l_leave(l, *p); | ||
1120 | rv.restore_scratch = 1; | ||
1121 | } else if (PAGE_SHIFT == 14 || PAGE_SHIFT == 13) { | ||
1122 | build_tlb_write_entry(p, l, r, tlb_random); | ||
1123 | uasm_l_leave(l, *p); | ||
1124 | UASM_i_LW(p, scratch, scratchpad_offset(0), 0); | ||
1125 | } else { | ||
1126 | UASM_i_LW(p, scratch, scratchpad_offset(0), 0); | ||
1127 | build_tlb_write_entry(p, l, r, tlb_random); | ||
1128 | uasm_l_leave(l, *p); | ||
1129 | rv.restore_scratch = 1; | ||
1130 | } | ||
1131 | |||
1132 | uasm_i_eret(p); /* return from trap */ | ||
1133 | |||
1134 | return rv; | ||
1135 | } | ||
1136 | |||
837 | /* | 1137 | /* |
838 | * For a 64-bit kernel, we are using the 64-bit XTLB refill exception | 1138 | * For a 64-bit kernel, we are using the 64-bit XTLB refill exception |
839 | * because EXL == 0. If we wrap, we can also use the 32 instruction | 1139 | * because EXL == 0. If we wrap, we can also use the 32 instruction |
@@ -849,54 +1149,67 @@ static void __cpuinit build_r4000_tlb_refill_handler(void) | |||
849 | struct uasm_reloc *r = relocs; | 1149 | struct uasm_reloc *r = relocs; |
850 | u32 *f; | 1150 | u32 *f; |
851 | unsigned int final_len; | 1151 | unsigned int final_len; |
1152 | struct mips_huge_tlb_info htlb_info; | ||
1153 | enum vmalloc64_mode vmalloc_mode; | ||
852 | 1154 | ||
853 | memset(tlb_handler, 0, sizeof(tlb_handler)); | 1155 | memset(tlb_handler, 0, sizeof(tlb_handler)); |
854 | memset(labels, 0, sizeof(labels)); | 1156 | memset(labels, 0, sizeof(labels)); |
855 | memset(relocs, 0, sizeof(relocs)); | 1157 | memset(relocs, 0, sizeof(relocs)); |
856 | memset(final_handler, 0, sizeof(final_handler)); | 1158 | memset(final_handler, 0, sizeof(final_handler)); |
857 | 1159 | ||
858 | /* | 1160 | if (scratch_reg == 0) |
859 | * create the plain linear handler | 1161 | scratch_reg = allocate_kscratch(); |
860 | */ | ||
861 | if (bcm1250_m3_war()) { | ||
862 | unsigned int segbits = 44; | ||
863 | 1162 | ||
864 | uasm_i_dmfc0(&p, K0, C0_BADVADDR); | 1163 | if ((scratch_reg > 0 || scratchpad_available()) && use_bbit_insns()) { |
865 | uasm_i_dmfc0(&p, K1, C0_ENTRYHI); | 1164 | htlb_info = build_fast_tlb_refill_handler(&p, &l, &r, K0, K1, |
866 | uasm_i_xor(&p, K0, K0, K1); | 1165 | scratch_reg); |
867 | uasm_i_dsrl_safe(&p, K1, K0, 62); | 1166 | vmalloc_mode = refill_scratch; |
868 | uasm_i_dsrl_safe(&p, K0, K0, 12 + 1); | 1167 | } else { |
869 | uasm_i_dsll_safe(&p, K0, K0, 64 + 12 + 1 - segbits); | 1168 | htlb_info.huge_pte = K0; |
870 | uasm_i_or(&p, K0, K0, K1); | 1169 | htlb_info.restore_scratch = 0; |
871 | uasm_il_bnez(&p, &r, K0, label_leave); | 1170 | vmalloc_mode = refill_noscratch; |
872 | /* No need for uasm_i_nop */ | 1171 | /* |
873 | } | 1172 | * create the plain linear handler |
1173 | */ | ||
1174 | if (bcm1250_m3_war()) { | ||
1175 | unsigned int segbits = 44; | ||
1176 | |||
1177 | uasm_i_dmfc0(&p, K0, C0_BADVADDR); | ||
1178 | uasm_i_dmfc0(&p, K1, C0_ENTRYHI); | ||
1179 | uasm_i_xor(&p, K0, K0, K1); | ||
1180 | uasm_i_dsrl_safe(&p, K1, K0, 62); | ||
1181 | uasm_i_dsrl_safe(&p, K0, K0, 12 + 1); | ||
1182 | uasm_i_dsll_safe(&p, K0, K0, 64 + 12 + 1 - segbits); | ||
1183 | uasm_i_or(&p, K0, K0, K1); | ||
1184 | uasm_il_bnez(&p, &r, K0, label_leave); | ||
1185 | /* No need for uasm_i_nop */ | ||
1186 | } | ||
874 | 1187 | ||
875 | #ifdef CONFIG_64BIT | 1188 | #ifdef CONFIG_64BIT |
876 | build_get_pmde64(&p, &l, &r, K0, K1); /* get pmd in K1 */ | 1189 | build_get_pmde64(&p, &l, &r, K0, K1); /* get pmd in K1 */ |
877 | #else | 1190 | #else |
878 | build_get_pgde32(&p, K0, K1); /* get pgd in K1 */ | 1191 | build_get_pgde32(&p, K0, K1); /* get pgd in K1 */ |
879 | #endif | 1192 | #endif |
880 | 1193 | ||
881 | #ifdef CONFIG_HUGETLB_PAGE | 1194 | #ifdef CONFIG_HUGETLB_PAGE |
882 | build_is_huge_pte(&p, &r, K0, K1, label_tlb_huge_update); | 1195 | build_is_huge_pte(&p, &r, K0, K1, label_tlb_huge_update); |
883 | #endif | 1196 | #endif |
884 | 1197 | ||
885 | build_get_ptep(&p, K0, K1); | 1198 | build_get_ptep(&p, K0, K1); |
886 | build_update_entries(&p, K0, K1); | 1199 | build_update_entries(&p, K0, K1); |
887 | build_tlb_write_entry(&p, &l, &r, tlb_random); | 1200 | build_tlb_write_entry(&p, &l, &r, tlb_random); |
888 | uasm_l_leave(&l, p); | 1201 | uasm_l_leave(&l, p); |
889 | uasm_i_eret(&p); /* return from trap */ | 1202 | uasm_i_eret(&p); /* return from trap */ |
890 | 1203 | } | |
891 | #ifdef CONFIG_HUGETLB_PAGE | 1204 | #ifdef CONFIG_HUGETLB_PAGE |
892 | uasm_l_tlb_huge_update(&l, p); | 1205 | uasm_l_tlb_huge_update(&l, p); |
893 | UASM_i_LW(&p, K0, 0, K1); | 1206 | build_huge_update_entries(&p, htlb_info.huge_pte, K1); |
894 | build_huge_update_entries(&p, K0, K1); | 1207 | build_huge_tlb_write_entry(&p, &l, &r, K0, tlb_random, |
895 | build_huge_tlb_write_entry(&p, &l, &r, K0, tlb_random); | 1208 | htlb_info.restore_scratch); |
896 | #endif | 1209 | #endif |
897 | 1210 | ||
898 | #ifdef CONFIG_64BIT | 1211 | #ifdef CONFIG_64BIT |
899 | build_get_pgd_vmalloc64(&p, &l, &r, K0, K1, refill); | 1212 | build_get_pgd_vmalloc64(&p, &l, &r, K0, K1, vmalloc_mode); |
900 | #endif | 1213 | #endif |
901 | 1214 | ||
902 | /* | 1215 | /* |
@@ -1014,6 +1327,55 @@ static void __cpuinit build_r4000_tlb_refill_handler(void) | |||
1014 | u32 handle_tlbl[FASTPATH_SIZE] __cacheline_aligned; | 1327 | u32 handle_tlbl[FASTPATH_SIZE] __cacheline_aligned; |
1015 | u32 handle_tlbs[FASTPATH_SIZE] __cacheline_aligned; | 1328 | u32 handle_tlbs[FASTPATH_SIZE] __cacheline_aligned; |
1016 | u32 handle_tlbm[FASTPATH_SIZE] __cacheline_aligned; | 1329 | u32 handle_tlbm[FASTPATH_SIZE] __cacheline_aligned; |
1330 | #ifdef CONFIG_MIPS_PGD_C0_CONTEXT | ||
1331 | u32 tlbmiss_handler_setup_pgd[16] __cacheline_aligned; | ||
1332 | |||
1333 | static void __cpuinit build_r4000_setup_pgd(void) | ||
1334 | { | ||
1335 | const int a0 = 4; | ||
1336 | const int a1 = 5; | ||
1337 | u32 *p = tlbmiss_handler_setup_pgd; | ||
1338 | struct uasm_label *l = labels; | ||
1339 | struct uasm_reloc *r = relocs; | ||
1340 | |||
1341 | memset(tlbmiss_handler_setup_pgd, 0, sizeof(tlbmiss_handler_setup_pgd)); | ||
1342 | memset(labels, 0, sizeof(labels)); | ||
1343 | memset(relocs, 0, sizeof(relocs)); | ||
1344 | |||
1345 | pgd_reg = allocate_kscratch(); | ||
1346 | |||
1347 | if (pgd_reg == -1) { | ||
1348 | /* PGD << 11 in c0_Context */ | ||
1349 | /* | ||
1350 | * If it is a ckseg0 address, convert to a physical | ||
1351 | * address. Shifting right by 29 and adding 4 will | ||
1352 | * result in zero for these addresses. | ||
1353 | * | ||
1354 | */ | ||
1355 | UASM_i_SRA(&p, a1, a0, 29); | ||
1356 | UASM_i_ADDIU(&p, a1, a1, 4); | ||
1357 | uasm_il_bnez(&p, &r, a1, label_tlbl_goaround1); | ||
1358 | uasm_i_nop(&p); | ||
1359 | uasm_i_dinsm(&p, a0, 0, 29, 64 - 29); | ||
1360 | uasm_l_tlbl_goaround1(&l, p); | ||
1361 | UASM_i_SLL(&p, a0, a0, 11); | ||
1362 | uasm_i_jr(&p, 31); | ||
1363 | UASM_i_MTC0(&p, a0, C0_CONTEXT); | ||
1364 | } else { | ||
1365 | /* PGD in c0_KScratch */ | ||
1366 | uasm_i_jr(&p, 31); | ||
1367 | UASM_i_MTC0(&p, a0, 31, pgd_reg); | ||
1368 | } | ||
1369 | if (p - tlbmiss_handler_setup_pgd > ARRAY_SIZE(tlbmiss_handler_setup_pgd)) | ||
1370 | panic("tlbmiss_handler_setup_pgd space exceeded"); | ||
1371 | uasm_resolve_relocs(relocs, labels); | ||
1372 | pr_debug("Wrote tlbmiss_handler_setup_pgd (%u instructions).\n", | ||
1373 | (unsigned int)(p - tlbmiss_handler_setup_pgd)); | ||
1374 | |||
1375 | dump_handler(tlbmiss_handler_setup_pgd, | ||
1376 | ARRAY_SIZE(tlbmiss_handler_setup_pgd)); | ||
1377 | } | ||
1378 | #endif | ||
1017 | 1379 | ||
1018 | static void __cpuinit | 1380 | static void __cpuinit |
1019 | iPTE_LW(u32 **p, unsigned int pte, unsigned int ptr) | 1381 | iPTE_LW(u32 **p, unsigned int pte, unsigned int ptr) |
@@ -1100,14 +1462,20 @@ build_pte_present(u32 **p, struct uasm_reloc **r, | |||
1100 | unsigned int pte, unsigned int ptr, enum label_id lid) | 1462 | unsigned int pte, unsigned int ptr, enum label_id lid) |
1101 | { | 1463 | { |
1102 | if (kernel_uses_smartmips_rixi) { | 1464 | if (kernel_uses_smartmips_rixi) { |
1103 | uasm_i_andi(p, pte, pte, _PAGE_PRESENT); | 1465 | if (use_bbit_insns()) { |
1104 | uasm_il_beqz(p, r, pte, lid); | 1466 | uasm_il_bbit0(p, r, pte, ilog2(_PAGE_PRESENT), lid); |
1467 | uasm_i_nop(p); | ||
1468 | } else { | ||
1469 | uasm_i_andi(p, pte, pte, _PAGE_PRESENT); | ||
1470 | uasm_il_beqz(p, r, pte, lid); | ||
1471 | iPTE_LW(p, pte, ptr); | ||
1472 | } | ||
1105 | } else { | 1473 | } else { |
1106 | uasm_i_andi(p, pte, pte, _PAGE_PRESENT | _PAGE_READ); | 1474 | uasm_i_andi(p, pte, pte, _PAGE_PRESENT | _PAGE_READ); |
1107 | uasm_i_xori(p, pte, pte, _PAGE_PRESENT | _PAGE_READ); | 1475 | uasm_i_xori(p, pte, pte, _PAGE_PRESENT | _PAGE_READ); |
1108 | uasm_il_bnez(p, r, pte, lid); | 1476 | uasm_il_bnez(p, r, pte, lid); |
1477 | iPTE_LW(p, pte, ptr); | ||
1109 | } | 1478 | } |
1110 | iPTE_LW(p, pte, ptr); | ||
1111 | } | 1479 | } |
1112 | 1480 | ||
1113 | /* Make PTE valid, store result in PTR. */ | 1481 | /* Make PTE valid, store result in PTR. */ |
@@ -1128,10 +1496,17 @@ static void __cpuinit | |||
1128 | build_pte_writable(u32 **p, struct uasm_reloc **r, | 1496 | build_pte_writable(u32 **p, struct uasm_reloc **r, |
1129 | unsigned int pte, unsigned int ptr, enum label_id lid) | 1497 | unsigned int pte, unsigned int ptr, enum label_id lid) |
1130 | { | 1498 | { |
1131 | uasm_i_andi(p, pte, pte, _PAGE_PRESENT | _PAGE_WRITE); | 1499 | if (use_bbit_insns()) { |
1132 | uasm_i_xori(p, pte, pte, _PAGE_PRESENT | _PAGE_WRITE); | 1500 | uasm_il_bbit0(p, r, pte, ilog2(_PAGE_PRESENT), lid); |
1133 | uasm_il_bnez(p, r, pte, lid); | 1501 | uasm_i_nop(p); |
1134 | iPTE_LW(p, pte, ptr); | 1502 | uasm_il_bbit0(p, r, pte, ilog2(_PAGE_WRITE), lid); |
1503 | uasm_i_nop(p); | ||
1504 | } else { | ||
1505 | uasm_i_andi(p, pte, pte, _PAGE_PRESENT | _PAGE_WRITE); | ||
1506 | uasm_i_xori(p, pte, pte, _PAGE_PRESENT | _PAGE_WRITE); | ||
1507 | uasm_il_bnez(p, r, pte, lid); | ||
1508 | iPTE_LW(p, pte, ptr); | ||
1509 | } | ||
1135 | } | 1510 | } |
1136 | 1511 | ||
1137 | /* Make PTE writable, update software status bits as well, then store | 1512 | /* Make PTE writable, update software status bits as well, then store |
@@ -1155,12 +1530,19 @@ static void __cpuinit | |||
1155 | build_pte_modifiable(u32 **p, struct uasm_reloc **r, | 1530 | build_pte_modifiable(u32 **p, struct uasm_reloc **r, |
1156 | unsigned int pte, unsigned int ptr, enum label_id lid) | 1531 | unsigned int pte, unsigned int ptr, enum label_id lid) |
1157 | { | 1532 | { |
1158 | uasm_i_andi(p, pte, pte, _PAGE_WRITE); | 1533 | if (use_bbit_insns()) { |
1159 | uasm_il_beqz(p, r, pte, lid); | 1534 | uasm_il_bbit0(p, r, pte, ilog2(_PAGE_WRITE), lid); |
1160 | iPTE_LW(p, pte, ptr); | 1535 | uasm_i_nop(p); |
1536 | } else { | ||
1537 | uasm_i_andi(p, pte, pte, _PAGE_WRITE); | ||
1538 | uasm_il_beqz(p, r, pte, lid); | ||
1539 | iPTE_LW(p, pte, ptr); | ||
1540 | } | ||
1161 | } | 1541 | } |
1162 | 1542 | ||
1163 | #ifndef CONFIG_MIPS_PGD_C0_CONTEXT | 1543 | #ifndef CONFIG_MIPS_PGD_C0_CONTEXT |
1544 | |||
1545 | |||
1164 | /* | 1546 | /* |
1165 | * R3000 style TLB load/store/modify handlers. | 1547 | * R3000 style TLB load/store/modify handlers. |
1166 | */ | 1548 | */ |
@@ -1402,14 +1784,23 @@ static void __cpuinit build_r4000_tlb_load_handler(void) | |||
1402 | * If the page is not _PAGE_VALID, RI or XI could not | 1784 | * If the page is not _PAGE_VALID, RI or XI could not |
1403 | * have triggered it. Skip the expensive test.. | 1785 | * have triggered it. Skip the expensive test.. |
1404 | */ | 1786 | */ |
1405 | uasm_i_andi(&p, K0, K0, _PAGE_VALID); | 1787 | if (use_bbit_insns()) { |
1406 | uasm_il_beqz(&p, &r, K0, label_tlbl_goaround1); | 1788 | uasm_il_bbit0(&p, &r, K0, ilog2(_PAGE_VALID), |
1789 | label_tlbl_goaround1); | ||
1790 | } else { | ||
1791 | uasm_i_andi(&p, K0, K0, _PAGE_VALID); | ||
1792 | uasm_il_beqz(&p, &r, K0, label_tlbl_goaround1); | ||
1793 | } | ||
1407 | uasm_i_nop(&p); | 1794 | uasm_i_nop(&p); |
1408 | 1795 | ||
1409 | uasm_i_tlbr(&p); | 1796 | uasm_i_tlbr(&p); |
1410 | /* Examine entrylo 0 or 1 based on ptr. */ | 1797 | /* Examine entrylo 0 or 1 based on ptr. */ |
1411 | uasm_i_andi(&p, K0, K1, sizeof(pte_t)); | 1798 | if (use_bbit_insns()) { |
1412 | uasm_i_beqz(&p, K0, 8); | 1799 | uasm_i_bbit0(&p, K1, ilog2(sizeof(pte_t)), 8); |
1800 | } else { | ||
1801 | uasm_i_andi(&p, K0, K1, sizeof(pte_t)); | ||
1802 | uasm_i_beqz(&p, K0, 8); | ||
1803 | } | ||
1413 | 1804 | ||
1414 | UASM_i_MFC0(&p, K0, C0_ENTRYLO0); /* load it in the delay slot*/ | 1805 | UASM_i_MFC0(&p, K0, C0_ENTRYLO0); /* load it in the delay slot*/ |
1415 | UASM_i_MFC0(&p, K0, C0_ENTRYLO1); /* load it if ptr is odd */ | 1806 | UASM_i_MFC0(&p, K0, C0_ENTRYLO1); /* load it if ptr is odd */ |
@@ -1417,12 +1808,18 @@ static void __cpuinit build_r4000_tlb_load_handler(void) | |||
1417 | * If the entryLo (now in K0) is valid (bit 1), RI or | 1808 | * If the entryLo (now in K0) is valid (bit 1), RI or |
1418 | * XI must have triggered it. | 1809 | * XI must have triggered it. |
1419 | */ | 1810 | */ |
1420 | uasm_i_andi(&p, K0, K0, 2); | 1811 | if (use_bbit_insns()) { |
1421 | uasm_il_bnez(&p, &r, K0, label_nopage_tlbl); | 1812 | uasm_il_bbit1(&p, &r, K0, 1, label_nopage_tlbl); |
1422 | 1813 | /* Reload the PTE value */ | |
1423 | uasm_l_tlbl_goaround1(&l, p); | 1814 | iPTE_LW(&p, K0, K1); |
1424 | /* Reload the PTE value */ | 1815 | uasm_l_tlbl_goaround1(&l, p); |
1425 | iPTE_LW(&p, K0, K1); | 1816 | } else { |
1817 | uasm_i_andi(&p, K0, K0, 2); | ||
1818 | uasm_il_bnez(&p, &r, K0, label_nopage_tlbl); | ||
1819 | uasm_l_tlbl_goaround1(&l, p); | ||
1820 | /* Reload the PTE value */ | ||
1821 | iPTE_LW(&p, K0, K1); | ||
1822 | } | ||
1426 | } | 1823 | } |
1427 | build_make_valid(&p, &r, K0, K1); | 1824 | build_make_valid(&p, &r, K0, K1); |
1428 | build_r4000_tlbchange_handler_tail(&p, &l, &r, K0, K1); | 1825 | build_r4000_tlbchange_handler_tail(&p, &l, &r, K0, K1); |
@@ -1442,23 +1839,35 @@ static void __cpuinit build_r4000_tlb_load_handler(void) | |||
1442 | * If the page is not _PAGE_VALID, RI or XI could not | 1839 | * If the page is not _PAGE_VALID, RI or XI could not |
1443 | * have triggered it. Skip the expensive test.. | 1840 | * have triggered it. Skip the expensive test.. |
1444 | */ | 1841 | */ |
1445 | uasm_i_andi(&p, K0, K0, _PAGE_VALID); | 1842 | if (use_bbit_insns()) { |
1446 | uasm_il_beqz(&p, &r, K0, label_tlbl_goaround2); | 1843 | uasm_il_bbit0(&p, &r, K0, ilog2(_PAGE_VALID), |
1844 | label_tlbl_goaround2); | ||
1845 | } else { | ||
1846 | uasm_i_andi(&p, K0, K0, _PAGE_VALID); | ||
1847 | uasm_il_beqz(&p, &r, K0, label_tlbl_goaround2); | ||
1848 | } | ||
1447 | uasm_i_nop(&p); | 1849 | uasm_i_nop(&p); |
1448 | 1850 | ||
1449 | uasm_i_tlbr(&p); | 1851 | uasm_i_tlbr(&p); |
1450 | /* Examine entrylo 0 or 1 based on ptr. */ | 1852 | /* Examine entrylo 0 or 1 based on ptr. */ |
1451 | uasm_i_andi(&p, K0, K1, sizeof(pte_t)); | 1853 | if (use_bbit_insns()) { |
1452 | uasm_i_beqz(&p, K0, 8); | 1854 | uasm_i_bbit0(&p, K1, ilog2(sizeof(pte_t)), 8); |
1453 | 1855 | } else { | |
1856 | uasm_i_andi(&p, K0, K1, sizeof(pte_t)); | ||
1857 | uasm_i_beqz(&p, K0, 8); | ||
1858 | } | ||
1454 | UASM_i_MFC0(&p, K0, C0_ENTRYLO0); /* load it in the delay slot*/ | 1859 | UASM_i_MFC0(&p, K0, C0_ENTRYLO0); /* load it in the delay slot*/ |
1455 | UASM_i_MFC0(&p, K0, C0_ENTRYLO1); /* load it if ptr is odd */ | 1860 | UASM_i_MFC0(&p, K0, C0_ENTRYLO1); /* load it if ptr is odd */ |
1456 | /* | 1861 | /* |
1457 | * If the entryLo (now in K0) is valid (bit 1), RI or | 1862 | * If the entryLo (now in K0) is valid (bit 1), RI or |
1458 | * XI must have triggered it. | 1863 | * XI must have triggered it. |
1459 | */ | 1864 | */ |
1460 | uasm_i_andi(&p, K0, K0, 2); | 1865 | if (use_bbit_insns()) { |
1461 | uasm_il_beqz(&p, &r, K0, label_tlbl_goaround2); | 1866 | uasm_il_bbit0(&p, &r, K0, 1, label_tlbl_goaround2); |
1867 | } else { | ||
1868 | uasm_i_andi(&p, K0, K0, 2); | ||
1869 | uasm_il_beqz(&p, &r, K0, label_tlbl_goaround2); | ||
1870 | } | ||
1462 | /* Reload the PTE value */ | 1871 | /* Reload the PTE value */ |
1463 | iPTE_LW(&p, K0, K1); | 1872 | iPTE_LW(&p, K0, K1); |
1464 | 1873 | ||
@@ -1466,7 +1875,7 @@ static void __cpuinit build_r4000_tlb_load_handler(void) | |||
1466 | * We clobbered C0_PAGEMASK, restore it. On the other branch | 1875 | * We clobbered C0_PAGEMASK, restore it. On the other branch |
1467 | * it is restored in build_huge_tlb_write_entry. | 1876 | * it is restored in build_huge_tlb_write_entry. |
1468 | */ | 1877 | */ |
1469 | build_restore_pagemask(&p, &r, K0, label_nopage_tlbl); | 1878 | build_restore_pagemask(&p, &r, K0, label_nopage_tlbl, 0); |
1470 | 1879 | ||
1471 | uasm_l_tlbl_goaround2(&l, p); | 1880 | uasm_l_tlbl_goaround2(&l, p); |
1472 | } | 1881 | } |
@@ -1623,13 +2032,16 @@ void __cpuinit build_tlb_refill_handler(void) | |||
1623 | break; | 2032 | break; |
1624 | 2033 | ||
1625 | default: | 2034 | default: |
1626 | build_r4000_tlb_refill_handler(); | ||
1627 | if (!run_once) { | 2035 | if (!run_once) { |
2036 | #ifdef CONFIG_MIPS_PGD_C0_CONTEXT | ||
2037 | build_r4000_setup_pgd(); | ||
2038 | #endif | ||
1628 | build_r4000_tlb_load_handler(); | 2039 | build_r4000_tlb_load_handler(); |
1629 | build_r4000_tlb_store_handler(); | 2040 | build_r4000_tlb_store_handler(); |
1630 | build_r4000_tlb_modify_handler(); | 2041 | build_r4000_tlb_modify_handler(); |
1631 | run_once++; | 2042 | run_once++; |
1632 | } | 2043 | } |
2044 | build_r4000_tlb_refill_handler(); | ||
1633 | } | 2045 | } |
1634 | } | 2046 | } |
1635 | 2047 | ||
@@ -1641,4 +2053,8 @@ void __cpuinit flush_tlb_handlers(void) | |||
1641 | (unsigned long)handle_tlbs + sizeof(handle_tlbs)); | 2053 | (unsigned long)handle_tlbs + sizeof(handle_tlbs)); |
1642 | local_flush_icache_range((unsigned long)handle_tlbm, | 2054 | local_flush_icache_range((unsigned long)handle_tlbm, |
1643 | (unsigned long)handle_tlbm + sizeof(handle_tlbm)); | 2055 | (unsigned long)handle_tlbm + sizeof(handle_tlbm)); |
2056 | #ifdef CONFIG_MIPS_PGD_C0_CONTEXT | ||
2057 | local_flush_icache_range((unsigned long)tlbmiss_handler_setup_pgd, | ||
2058 | (unsigned long)tlbmiss_handler_setup_pgd + sizeof(handle_tlbm)); | ||
2059 | #endif | ||
1644 | } | 2060 | } |
diff --git a/arch/mips/mm/uasm.c b/arch/mips/mm/uasm.c index 23afdebc8e5..5fa185151fc 100644 --- a/arch/mips/mm/uasm.c +++ b/arch/mips/mm/uasm.c | |||
@@ -68,7 +68,8 @@ enum opcode { | |||
68 | insn_pref, insn_rfe, insn_sc, insn_scd, insn_sd, insn_sll, | 68 | insn_pref, insn_rfe, insn_sc, insn_scd, insn_sd, insn_sll, |
69 | insn_sra, insn_srl, insn_rotr, insn_subu, insn_sw, insn_tlbp, | 69 | insn_sra, insn_srl, insn_rotr, insn_subu, insn_sw, insn_tlbp, |
70 | insn_tlbr, insn_tlbwi, insn_tlbwr, insn_xor, insn_xori, | 70 | insn_tlbr, insn_tlbwi, insn_tlbwr, insn_xor, insn_xori, |
71 | insn_dins, insn_syscall, insn_bbit0, insn_bbit1 | 71 | insn_dins, insn_dinsm, insn_syscall, insn_bbit0, insn_bbit1, |
72 | insn_lwx, insn_ldx | ||
72 | }; | 73 | }; |
73 | 74 | ||
74 | struct insn { | 75 | struct insn { |
@@ -142,9 +143,12 @@ static struct insn insn_table[] __uasminitdata = { | |||
142 | { insn_xor, M(spec_op, 0, 0, 0, 0, xor_op), RS | RT | RD }, | 143 | { insn_xor, M(spec_op, 0, 0, 0, 0, xor_op), RS | RT | RD }, |
143 | { insn_xori, M(xori_op, 0, 0, 0, 0, 0), RS | RT | UIMM }, | 144 | { insn_xori, M(xori_op, 0, 0, 0, 0, 0), RS | RT | UIMM }, |
144 | { insn_dins, M(spec3_op, 0, 0, 0, 0, dins_op), RS | RT | RD | RE }, | 145 | { insn_dins, M(spec3_op, 0, 0, 0, 0, dins_op), RS | RT | RD | RE }, |
146 | { insn_dinsm, M(spec3_op, 0, 0, 0, 0, dinsm_op), RS | RT | RD | RE }, | ||
145 | { insn_syscall, M(spec_op, 0, 0, 0, 0, syscall_op), SCIMM}, | 147 | { insn_syscall, M(spec_op, 0, 0, 0, 0, syscall_op), SCIMM}, |
146 | { insn_bbit0, M(lwc2_op, 0, 0, 0, 0, 0), RS | RT | BIMM }, | 148 | { insn_bbit0, M(lwc2_op, 0, 0, 0, 0, 0), RS | RT | BIMM }, |
147 | { insn_bbit1, M(swc2_op, 0, 0, 0, 0, 0), RS | RT | BIMM }, | 149 | { insn_bbit1, M(swc2_op, 0, 0, 0, 0, 0), RS | RT | BIMM }, |
150 | { insn_lwx, M(spec3_op, 0, 0, 0, lwx_op, lx_op), RS | RT | RD }, | ||
151 | { insn_ldx, M(spec3_op, 0, 0, 0, ldx_op, lx_op), RS | RT | RD }, | ||
148 | { insn_invalid, 0, 0 } | 152 | { insn_invalid, 0, 0 } |
149 | }; | 153 | }; |
150 | 154 | ||
@@ -152,91 +156,83 @@ static struct insn insn_table[] __uasminitdata = { | |||
152 | 156 | ||
153 | static inline __uasminit u32 build_rs(u32 arg) | 157 | static inline __uasminit u32 build_rs(u32 arg) |
154 | { | 158 | { |
155 | if (arg & ~RS_MASK) | 159 | WARN(arg & ~RS_MASK, KERN_WARNING "Micro-assembler field overflow\n"); |
156 | printk(KERN_WARNING "Micro-assembler field overflow\n"); | ||
157 | 160 | ||
158 | return (arg & RS_MASK) << RS_SH; | 161 | return (arg & RS_MASK) << RS_SH; |
159 | } | 162 | } |
160 | 163 | ||
161 | static inline __uasminit u32 build_rt(u32 arg) | 164 | static inline __uasminit u32 build_rt(u32 arg) |
162 | { | 165 | { |
163 | if (arg & ~RT_MASK) | 166 | WARN(arg & ~RT_MASK, KERN_WARNING "Micro-assembler field overflow\n"); |
164 | printk(KERN_WARNING "Micro-assembler field overflow\n"); | ||
165 | 167 | ||
166 | return (arg & RT_MASK) << RT_SH; | 168 | return (arg & RT_MASK) << RT_SH; |
167 | } | 169 | } |
168 | 170 | ||
169 | static inline __uasminit u32 build_rd(u32 arg) | 171 | static inline __uasminit u32 build_rd(u32 arg) |
170 | { | 172 | { |
171 | if (arg & ~RD_MASK) | 173 | WARN(arg & ~RD_MASK, KERN_WARNING "Micro-assembler field overflow\n"); |
172 | printk(KERN_WARNING "Micro-assembler field overflow\n"); | ||
173 | 174 | ||
174 | return (arg & RD_MASK) << RD_SH; | 175 | return (arg & RD_MASK) << RD_SH; |
175 | } | 176 | } |
176 | 177 | ||
177 | static inline __uasminit u32 build_re(u32 arg) | 178 | static inline __uasminit u32 build_re(u32 arg) |
178 | { | 179 | { |
179 | if (arg & ~RE_MASK) | 180 | WARN(arg & ~RE_MASK, KERN_WARNING "Micro-assembler field overflow\n"); |
180 | printk(KERN_WARNING "Micro-assembler field overflow\n"); | ||
181 | 181 | ||
182 | return (arg & RE_MASK) << RE_SH; | 182 | return (arg & RE_MASK) << RE_SH; |
183 | } | 183 | } |
184 | 184 | ||
185 | static inline __uasminit u32 build_simm(s32 arg) | 185 | static inline __uasminit u32 build_simm(s32 arg) |
186 | { | 186 | { |
187 | if (arg > 0x7fff || arg < -0x8000) | 187 | WARN(arg > 0x7fff || arg < -0x8000, |
188 | printk(KERN_WARNING "Micro-assembler field overflow\n"); | 188 | KERN_WARNING "Micro-assembler field overflow\n"); |
189 | 189 | ||
190 | return arg & 0xffff; | 190 | return arg & 0xffff; |
191 | } | 191 | } |
192 | 192 | ||
193 | static inline __uasminit u32 build_uimm(u32 arg) | 193 | static inline __uasminit u32 build_uimm(u32 arg) |
194 | { | 194 | { |
195 | if (arg & ~IMM_MASK) | 195 | WARN(arg & ~IMM_MASK, KERN_WARNING "Micro-assembler field overflow\n"); |
196 | printk(KERN_WARNING "Micro-assembler field overflow\n"); | ||
197 | 196 | ||
198 | return arg & IMM_MASK; | 197 | return arg & IMM_MASK; |
199 | } | 198 | } |
200 | 199 | ||
201 | static inline __uasminit u32 build_bimm(s32 arg) | 200 | static inline __uasminit u32 build_bimm(s32 arg) |
202 | { | 201 | { |
203 | if (arg > 0x1ffff || arg < -0x20000) | 202 | WARN(arg > 0x1ffff || arg < -0x20000, |
204 | printk(KERN_WARNING "Micro-assembler field overflow\n"); | 203 | KERN_WARNING "Micro-assembler field overflow\n"); |
205 | 204 | ||
206 | if (arg & 0x3) | 205 | WARN(arg & 0x3, KERN_WARNING "Invalid micro-assembler branch target\n"); |
207 | printk(KERN_WARNING "Invalid micro-assembler branch target\n"); | ||
208 | 206 | ||
209 | return ((arg < 0) ? (1 << 15) : 0) | ((arg >> 2) & 0x7fff); | 207 | return ((arg < 0) ? (1 << 15) : 0) | ((arg >> 2) & 0x7fff); |
210 | } | 208 | } |
211 | 209 | ||
212 | static inline __uasminit u32 build_jimm(u32 arg) | 210 | static inline __uasminit u32 build_jimm(u32 arg) |
213 | { | 211 | { |
214 | if (arg & ~((JIMM_MASK) << 2)) | 212 | WARN(arg & ~(JIMM_MASK << 2), |
215 | printk(KERN_WARNING "Micro-assembler field overflow\n"); | 213 | KERN_WARNING "Micro-assembler field overflow\n"); |
216 | 214 | ||
217 | return (arg >> 2) & JIMM_MASK; | 215 | return (arg >> 2) & JIMM_MASK; |
218 | } | 216 | } |
219 | 217 | ||
220 | static inline __uasminit u32 build_scimm(u32 arg) | 218 | static inline __uasminit u32 build_scimm(u32 arg) |
221 | { | 219 | { |
222 | if (arg & ~SCIMM_MASK) | 220 | WARN(arg & ~SCIMM_MASK, |
223 | printk(KERN_WARNING "Micro-assembler field overflow\n"); | 221 | KERN_WARNING "Micro-assembler field overflow\n"); |
224 | 222 | ||
225 | return (arg & SCIMM_MASK) << SCIMM_SH; | 223 | return (arg & SCIMM_MASK) << SCIMM_SH; |
226 | } | 224 | } |
227 | 225 | ||
228 | static inline __uasminit u32 build_func(u32 arg) | 226 | static inline __uasminit u32 build_func(u32 arg) |
229 | { | 227 | { |
230 | if (arg & ~FUNC_MASK) | 228 | WARN(arg & ~FUNC_MASK, KERN_WARNING "Micro-assembler field overflow\n"); |
231 | printk(KERN_WARNING "Micro-assembler field overflow\n"); | ||
232 | 229 | ||
233 | return arg & FUNC_MASK; | 230 | return arg & FUNC_MASK; |
234 | } | 231 | } |
235 | 232 | ||
236 | static inline __uasminit u32 build_set(u32 arg) | 233 | static inline __uasminit u32 build_set(u32 arg) |
237 | { | 234 | { |
238 | if (arg & ~SET_MASK) | 235 | WARN(arg & ~SET_MASK, KERN_WARNING "Micro-assembler field overflow\n"); |
239 | printk(KERN_WARNING "Micro-assembler field overflow\n"); | ||
240 | 236 | ||
241 | return arg & SET_MASK; | 237 | return arg & SET_MASK; |
242 | } | 238 | } |
@@ -340,6 +336,13 @@ Ip_u2u1msbu3(op) \ | |||
340 | } \ | 336 | } \ |
341 | UASM_EXPORT_SYMBOL(uasm_i##op); | 337 | UASM_EXPORT_SYMBOL(uasm_i##op); |
342 | 338 | ||
339 | #define I_u2u1msb32u3(op) \ | ||
340 | Ip_u2u1msbu3(op) \ | ||
341 | { \ | ||
342 | build_insn(buf, insn##op, b, a, c+d-33, c); \ | ||
343 | } \ | ||
344 | UASM_EXPORT_SYMBOL(uasm_i##op); | ||
345 | |||
343 | #define I_u1u2(op) \ | 346 | #define I_u1u2(op) \ |
344 | Ip_u1u2(op) \ | 347 | Ip_u1u2(op) \ |
345 | { \ | 348 | { \ |
@@ -422,9 +425,12 @@ I_0(_tlbwr) | |||
422 | I_u3u1u2(_xor) | 425 | I_u3u1u2(_xor) |
423 | I_u2u1u3(_xori) | 426 | I_u2u1u3(_xori) |
424 | I_u2u1msbu3(_dins); | 427 | I_u2u1msbu3(_dins); |
428 | I_u2u1msb32u3(_dinsm); | ||
425 | I_u1(_syscall); | 429 | I_u1(_syscall); |
426 | I_u1u2s3(_bbit0); | 430 | I_u1u2s3(_bbit0); |
427 | I_u1u2s3(_bbit1); | 431 | I_u1u2s3(_bbit1); |
432 | I_u3u1u2(_lwx) | ||
433 | I_u3u1u2(_ldx) | ||
428 | 434 | ||
429 | #ifdef CONFIG_CPU_CAVIUM_OCTEON | 435 | #ifdef CONFIG_CPU_CAVIUM_OCTEON |
430 | #include <asm/octeon/octeon.h> | 436 | #include <asm/octeon/octeon.h> |
diff --git a/arch/mips/sibyte/common/sb_tbprof.c b/arch/mips/sibyte/common/sb_tbprof.c index 87ccdb4b5ac..48853ab5bcf 100644 --- a/arch/mips/sibyte/common/sb_tbprof.c +++ b/arch/mips/sibyte/common/sb_tbprof.c | |||
@@ -410,14 +410,13 @@ static int sbprof_tb_open(struct inode *inode, struct file *filp) | |||
410 | return -EBUSY; | 410 | return -EBUSY; |
411 | 411 | ||
412 | memset(&sbp, 0, sizeof(struct sbprof_tb)); | 412 | memset(&sbp, 0, sizeof(struct sbprof_tb)); |
413 | sbp.sbprof_tbbuf = vmalloc(MAX_TBSAMPLE_BYTES); | 413 | sbp.sbprof_tbbuf = vzalloc(MAX_TBSAMPLE_BYTES); |
414 | if (!sbp.sbprof_tbbuf) { | 414 | if (!sbp.sbprof_tbbuf) { |
415 | sbp.open = SB_CLOSED; | 415 | sbp.open = SB_CLOSED; |
416 | wmb(); | 416 | wmb(); |
417 | return -ENOMEM; | 417 | return -ENOMEM; |
418 | } | 418 | } |
419 | 419 | ||
420 | memset(sbp.sbprof_tbbuf, 0, MAX_TBSAMPLE_BYTES); | ||
421 | init_waitqueue_head(&sbp.tb_sync); | 420 | init_waitqueue_head(&sbp.tb_sync); |
422 | init_waitqueue_head(&sbp.tb_read); | 421 | init_waitqueue_head(&sbp.tb_read); |
423 | mutex_init(&sbp.lock); | 422 | mutex_init(&sbp.lock); |
diff --git a/arch/mips/txx9/generic/pci.c b/arch/mips/txx9/generic/pci.c index 96e69a00ffc..85a87de17eb 100644 --- a/arch/mips/txx9/generic/pci.c +++ b/arch/mips/txx9/generic/pci.c | |||
@@ -213,11 +213,8 @@ txx9_alloc_pci_controller(struct pci_controller *pcic, | |||
213 | 213 | ||
214 | pcic->mem_offset = 0; /* busaddr == physaddr */ | 214 | pcic->mem_offset = 0; /* busaddr == physaddr */ |
215 | 215 | ||
216 | printk(KERN_INFO "PCI: IO 0x%08llx-0x%08llx MEM 0x%08llx-0x%08llx\n", | 216 | printk(KERN_INFO "PCI: IO %pR MEM %pR\n", |
217 | (unsigned long long)pcic->mem_resource[1].start, | 217 | &pcic->mem_resource[1], &pcic->mem_resource[0]); |
218 | (unsigned long long)pcic->mem_resource[1].end, | ||
219 | (unsigned long long)pcic->mem_resource[0].start, | ||
220 | (unsigned long long)pcic->mem_resource[0].end); | ||
221 | 218 | ||
222 | /* register_pci_controller() will request MEM resource */ | 219 | /* register_pci_controller() will request MEM resource */ |
223 | release_resource(&pcic->mem_resource[0]); | 220 | release_resource(&pcic->mem_resource[0]); |
diff --git a/arch/mn10300/Kconfig b/arch/mn10300/Kconfig index 8ed41cf2b08..243bfa23fd5 100644 --- a/arch/mn10300/Kconfig +++ b/arch/mn10300/Kconfig | |||
@@ -1,6 +1,7 @@ | |||
1 | config MN10300 | 1 | config MN10300 |
2 | def_bool y | 2 | def_bool y |
3 | select HAVE_OPROFILE | 3 | select HAVE_OPROFILE |
4 | select GENERIC_HARDIRQS | ||
4 | 5 | ||
5 | config AM33_2 | 6 | config AM33_2 |
6 | def_bool n | 7 | def_bool n |
@@ -34,9 +35,6 @@ config RWSEM_GENERIC_SPINLOCK | |||
34 | config RWSEM_XCHGADD_ALGORITHM | 35 | config RWSEM_XCHGADD_ALGORITHM |
35 | bool | 36 | bool |
36 | 37 | ||
37 | config GENERIC_HARDIRQS_NO__DO_IRQ | ||
38 | def_bool y | ||
39 | |||
40 | config GENERIC_CALIBRATE_DELAY | 38 | config GENERIC_CALIBRATE_DELAY |
41 | def_bool y | 39 | def_bool y |
42 | 40 | ||
@@ -79,10 +77,6 @@ config QUICKLIST | |||
79 | config ARCH_HAS_ILOG2_U32 | 77 | config ARCH_HAS_ILOG2_U32 |
80 | def_bool y | 78 | def_bool y |
81 | 79 | ||
82 | # Use the generic interrupt handling code in kernel/irq/ | ||
83 | config GENERIC_HARDIRQS | ||
84 | def_bool y | ||
85 | |||
86 | config HOTPLUG_CPU | 80 | config HOTPLUG_CPU |
87 | def_bool n | 81 | def_bool n |
88 | 82 | ||
diff --git a/arch/mn10300/configs/asb2303_defconfig b/arch/mn10300/configs/asb2303_defconfig index 3f749b69ca7..1fd41ec1dfb 100644 --- a/arch/mn10300/configs/asb2303_defconfig +++ b/arch/mn10300/configs/asb2303_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_BSD_PROCESS_ACCT=y | |||
4 | CONFIG_TINY_RCU=y | 4 | CONFIG_TINY_RCU=y |
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | # CONFIG_KALLSYMS is not set | 8 | # CONFIG_KALLSYMS is not set |
9 | # CONFIG_HOTPLUG is not set | 9 | # CONFIG_HOTPLUG is not set |
10 | # CONFIG_VM_EVENT_COUNTERS is not set | 10 | # CONFIG_VM_EVENT_COUNTERS is not set |
diff --git a/arch/mn10300/configs/asb2364_defconfig b/arch/mn10300/configs/asb2364_defconfig index 83ce2f27b12..31d76261a3d 100644 --- a/arch/mn10300/configs/asb2364_defconfig +++ b/arch/mn10300/configs/asb2364_defconfig | |||
@@ -15,7 +15,7 @@ CONFIG_CGROUP_CPUACCT=y | |||
15 | CONFIG_RESOURCE_COUNTERS=y | 15 | CONFIG_RESOURCE_COUNTERS=y |
16 | CONFIG_RELAY=y | 16 | CONFIG_RELAY=y |
17 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 17 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
18 | CONFIG_EMBEDDED=y | 18 | CONFIG_EXPERT=y |
19 | # CONFIG_KALLSYMS is not set | 19 | # CONFIG_KALLSYMS is not set |
20 | # CONFIG_VM_EVENT_COUNTERS is not set | 20 | # CONFIG_VM_EVENT_COUNTERS is not set |
21 | CONFIG_SLAB=y | 21 | CONFIG_SLAB=y |
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index 0888675c98d..fed2946f733 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig | |||
@@ -12,7 +12,10 @@ config PARISC | |||
12 | select HAVE_IRQ_WORK | 12 | select HAVE_IRQ_WORK |
13 | select HAVE_PERF_EVENTS | 13 | select HAVE_PERF_EVENTS |
14 | select GENERIC_ATOMIC64 if !64BIT | 14 | select GENERIC_ATOMIC64 if !64BIT |
15 | select GENERIC_HARDIRQS_NO__DO_IRQ | 15 | select HAVE_GENERIC_HARDIRQS |
16 | select GENERIC_IRQ_PROBE | ||
17 | select IRQ_PER_CPU | ||
18 | |||
16 | help | 19 | help |
17 | The PA-RISC microprocessor is designed by Hewlett-Packard and used | 20 | The PA-RISC microprocessor is designed by Hewlett-Packard and used |
18 | in many of their workstations & servers (HP9000 700 and 800 series, | 21 | in many of their workstations & servers (HP9000 700 and 800 series, |
@@ -66,22 +69,9 @@ config TIME_LOW_RES | |||
66 | depends on SMP | 69 | depends on SMP |
67 | default y | 70 | default y |
68 | 71 | ||
69 | config GENERIC_HARDIRQS | ||
70 | def_bool y | ||
71 | |||
72 | config GENERIC_IRQ_PROBE | ||
73 | def_bool y | ||
74 | |||
75 | config HAVE_LATENCYTOP_SUPPORT | 72 | config HAVE_LATENCYTOP_SUPPORT |
76 | def_bool y | 73 | def_bool y |
77 | 74 | ||
78 | config IRQ_PER_CPU | ||
79 | bool | ||
80 | default y | ||
81 | |||
82 | config GENERIC_HARDIRQS_NO__DO_IRQ | ||
83 | def_bool y | ||
84 | |||
85 | # unless you want to implement ACPI on PA-RISC ... ;-) | 75 | # unless you want to implement ACPI on PA-RISC ... ;-) |
86 | config PM | 76 | config PM |
87 | bool | 77 | bool |
diff --git a/arch/parisc/configs/a500_defconfig b/arch/parisc/configs/a500_defconfig index f9305f30603..b647b182dac 100644 --- a/arch/parisc/configs/a500_defconfig +++ b/arch/parisc/configs/a500_defconfig | |||
@@ -8,7 +8,7 @@ CONFIG_LOG_BUF_SHIFT=16 | |||
8 | CONFIG_SYSFS_DEPRECATED_V2=y | 8 | CONFIG_SYSFS_DEPRECATED_V2=y |
9 | CONFIG_BLK_DEV_INITRD=y | 9 | CONFIG_BLK_DEV_INITRD=y |
10 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 10 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
11 | CONFIG_EMBEDDED=y | 11 | CONFIG_EXPERT=y |
12 | CONFIG_KALLSYMS_ALL=y | 12 | CONFIG_KALLSYMS_ALL=y |
13 | CONFIG_SLAB=y | 13 | CONFIG_SLAB=y |
14 | CONFIG_PROFILING=y | 14 | CONFIG_PROFILING=y |
diff --git a/arch/parisc/configs/c3000_defconfig b/arch/parisc/configs/c3000_defconfig index 628d3e02253..311ca367b62 100644 --- a/arch/parisc/configs/c3000_defconfig +++ b/arch/parisc/configs/c3000_defconfig | |||
@@ -6,7 +6,7 @@ CONFIG_IKCONFIG_PROC=y | |||
6 | CONFIG_LOG_BUF_SHIFT=16 | 6 | CONFIG_LOG_BUF_SHIFT=16 |
7 | CONFIG_SYSFS_DEPRECATED_V2=y | 7 | CONFIG_SYSFS_DEPRECATED_V2=y |
8 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 8 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
9 | CONFIG_EMBEDDED=y | 9 | CONFIG_EXPERT=y |
10 | CONFIG_KALLSYMS_ALL=y | 10 | CONFIG_KALLSYMS_ALL=y |
11 | CONFIG_SLAB=y | 11 | CONFIG_SLAB=y |
12 | CONFIG_PROFILING=y | 12 | CONFIG_PROFILING=y |
diff --git a/arch/parisc/include/asm/mman.h b/arch/parisc/include/asm/mman.h index 9749c8afe83..f5b7bf5fba6 100644 --- a/arch/parisc/include/asm/mman.h +++ b/arch/parisc/include/asm/mman.h | |||
@@ -59,6 +59,9 @@ | |||
59 | #define MADV_MERGEABLE 65 /* KSM may merge identical pages */ | 59 | #define MADV_MERGEABLE 65 /* KSM may merge identical pages */ |
60 | #define MADV_UNMERGEABLE 66 /* KSM may not merge identical pages */ | 60 | #define MADV_UNMERGEABLE 66 /* KSM may not merge identical pages */ |
61 | 61 | ||
62 | #define MADV_HUGEPAGE 67 /* Worth backing with hugepages */ | ||
63 | #define MADV_NOHUGEPAGE 68 /* Not worth backing with hugepages */ | ||
64 | |||
62 | /* compatibility flags */ | 65 | /* compatibility flags */ |
63 | #define MAP_FILE 0 | 66 | #define MAP_FILE 0 |
64 | #define MAP_VARIABLE 0 | 67 | #define MAP_VARIABLE 0 |
diff --git a/arch/parisc/include/asm/pgtable.h b/arch/parisc/include/asm/pgtable.h index 865f37a8a88..6f1f65d3c0e 100644 --- a/arch/parisc/include/asm/pgtable.h +++ b/arch/parisc/include/asm/pgtable.h | |||
@@ -10,11 +10,13 @@ | |||
10 | * we simulate an x86-style page table for the linux mm code | 10 | * we simulate an x86-style page table for the linux mm code |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/mm.h> /* for vm_area_struct */ | ||
14 | #include <linux/bitops.h> | 13 | #include <linux/bitops.h> |
14 | #include <linux/spinlock.h> | ||
15 | #include <asm/processor.h> | 15 | #include <asm/processor.h> |
16 | #include <asm/cache.h> | 16 | #include <asm/cache.h> |
17 | 17 | ||
18 | struct vm_area_struct; | ||
19 | |||
18 | /* | 20 | /* |
19 | * kern_addr_valid(ADDR) tests if ADDR is pointing to valid kernel | 21 | * kern_addr_valid(ADDR) tests if ADDR is pointing to valid kernel |
20 | * memory. For the return value to be meaningful, ADDR must be >= | 22 | * memory. For the return value to be meaningful, ADDR must be >= |
diff --git a/arch/parisc/kernel/firmware.c b/arch/parisc/kernel/firmware.c index df971fa0c32..4896ed09058 100644 --- a/arch/parisc/kernel/firmware.c +++ b/arch/parisc/kernel/firmware.c | |||
@@ -1126,15 +1126,13 @@ int pdc_iodc_print(const unsigned char *str, unsigned count) | |||
1126 | unsigned int i; | 1126 | unsigned int i; |
1127 | unsigned long flags; | 1127 | unsigned long flags; |
1128 | 1128 | ||
1129 | for (i = 0; i < count && i < 79;) { | 1129 | for (i = 0; i < count;) { |
1130 | switch(str[i]) { | 1130 | switch(str[i]) { |
1131 | case '\n': | 1131 | case '\n': |
1132 | iodc_dbuf[i+0] = '\r'; | 1132 | iodc_dbuf[i+0] = '\r'; |
1133 | iodc_dbuf[i+1] = '\n'; | 1133 | iodc_dbuf[i+1] = '\n'; |
1134 | i += 2; | 1134 | i += 2; |
1135 | goto print; | 1135 | goto print; |
1136 | case '\b': /* BS */ | ||
1137 | i--; /* overwrite last */ | ||
1138 | default: | 1136 | default: |
1139 | iodc_dbuf[i] = str[i]; | 1137 | iodc_dbuf[i] = str[i]; |
1140 | i++; | 1138 | i++; |
@@ -1142,15 +1140,6 @@ int pdc_iodc_print(const unsigned char *str, unsigned count) | |||
1142 | } | 1140 | } |
1143 | } | 1141 | } |
1144 | 1142 | ||
1145 | /* if we're at the end of line, and not already inserting a newline, | ||
1146 | * insert one anyway. iodc console doesn't claim to support >79 char | ||
1147 | * lines. don't account for this in the return value. | ||
1148 | */ | ||
1149 | if (i == 79 && iodc_dbuf[i-1] != '\n') { | ||
1150 | iodc_dbuf[i+0] = '\r'; | ||
1151 | iodc_dbuf[i+1] = '\n'; | ||
1152 | } | ||
1153 | |||
1154 | print: | 1143 | print: |
1155 | spin_lock_irqsave(&pdc_lock, flags); | 1144 | spin_lock_irqsave(&pdc_lock, flags); |
1156 | real32_call(PAGE0->mem_cons.iodc_io, | 1145 | real32_call(PAGE0->mem_cons.iodc_io, |
diff --git a/arch/parisc/kernel/pdc_cons.c b/arch/parisc/kernel/pdc_cons.c index 11bdd68e576..fc770be465f 100644 --- a/arch/parisc/kernel/pdc_cons.c +++ b/arch/parisc/kernel/pdc_cons.c | |||
@@ -169,11 +169,11 @@ static int __init pdc_console_tty_driver_init(void) | |||
169 | 169 | ||
170 | struct console *tmp; | 170 | struct console *tmp; |
171 | 171 | ||
172 | acquire_console_sem(); | 172 | console_lock(); |
173 | for_each_console(tmp) | 173 | for_each_console(tmp) |
174 | if (tmp == &pdc_cons) | 174 | if (tmp == &pdc_cons) |
175 | break; | 175 | break; |
176 | release_console_sem(); | 176 | console_unlock(); |
177 | 177 | ||
178 | if (!tmp) { | 178 | if (!tmp) { |
179 | printk(KERN_INFO "PDC console driver not registered anymore, not creating %s\n", pdc_cons.name); | 179 | printk(KERN_INFO "PDC console driver not registered anymore, not creating %s\n", pdc_cons.name); |
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 959f38ccb9a..7d69e9bf5e6 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -36,24 +36,12 @@ config GENERIC_TIME_VSYSCALL | |||
36 | config GENERIC_CLOCKEVENTS | 36 | config GENERIC_CLOCKEVENTS |
37 | def_bool y | 37 | def_bool y |
38 | 38 | ||
39 | config GENERIC_HARDIRQS | ||
40 | bool | ||
41 | default y | ||
42 | |||
43 | config GENERIC_HARDIRQS_NO__DO_IRQ | ||
44 | bool | ||
45 | default y | ||
46 | |||
47 | config HAVE_SETUP_PER_CPU_AREA | 39 | config HAVE_SETUP_PER_CPU_AREA |
48 | def_bool PPC64 | 40 | def_bool PPC64 |
49 | 41 | ||
50 | config NEED_PER_CPU_EMBED_FIRST_CHUNK | 42 | config NEED_PER_CPU_EMBED_FIRST_CHUNK |
51 | def_bool PPC64 | 43 | def_bool PPC64 |
52 | 44 | ||
53 | config IRQ_PER_CPU | ||
54 | bool | ||
55 | default y | ||
56 | |||
57 | config NR_IRQS | 45 | config NR_IRQS |
58 | int "Number of virtual interrupt numbers" | 46 | int "Number of virtual interrupt numbers" |
59 | range 32 32768 | 47 | range 32 32768 |
@@ -143,6 +131,9 @@ config PPC | |||
143 | select HAVE_PERF_EVENTS | 131 | select HAVE_PERF_EVENTS |
144 | select HAVE_REGS_AND_STACK_ACCESS_API | 132 | select HAVE_REGS_AND_STACK_ACCESS_API |
145 | select HAVE_HW_BREAKPOINT if PERF_EVENTS && PPC_BOOK3S_64 | 133 | select HAVE_HW_BREAKPOINT if PERF_EVENTS && PPC_BOOK3S_64 |
134 | select HAVE_GENERIC_HARDIRQS | ||
135 | select HAVE_SPARSE_IRQ | ||
136 | select IRQ_PER_CPU | ||
146 | 137 | ||
147 | config EARLY_PRINTK | 138 | config EARLY_PRINTK |
148 | bool | 139 | bool |
@@ -392,19 +383,6 @@ config IRQ_ALL_CPUS | |||
392 | CPU. Generally saying Y is safe, although some problems have been | 383 | CPU. Generally saying Y is safe, although some problems have been |
393 | reported with SMP Power Macintoshes with this option enabled. | 384 | reported with SMP Power Macintoshes with this option enabled. |
394 | 385 | ||
395 | config SPARSE_IRQ | ||
396 | bool "Support sparse irq numbering" | ||
397 | default n | ||
398 | help | ||
399 | This enables support for sparse irqs. This is useful for distro | ||
400 | kernels that want to define a high CONFIG_NR_CPUS value but still | ||
401 | want to have low kernel memory footprint on smaller machines. | ||
402 | |||
403 | ( Sparse IRQs can also be beneficial on NUMA boxes, as they spread | ||
404 | out the irq_desc[] array in a more NUMA-friendly way. ) | ||
405 | |||
406 | If you don't know what to do here, say N. | ||
407 | |||
408 | config NUMA | 386 | config NUMA |
409 | bool "NUMA support" | 387 | bool "NUMA support" |
410 | depends on PPC64 | 388 | depends on PPC64 |
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 96deec63bcf..89178164af5 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile | |||
@@ -368,7 +368,7 @@ INSTALL := install | |||
368 | extra-installed := $(patsubst $(obj)/%, $(DESTDIR)$(WRAPPER_OBJDIR)/%, $(extra-y)) | 368 | extra-installed := $(patsubst $(obj)/%, $(DESTDIR)$(WRAPPER_OBJDIR)/%, $(extra-y)) |
369 | hostprogs-installed := $(patsubst %, $(DESTDIR)$(WRAPPER_BINDIR)/%, $(hostprogs-y)) | 369 | hostprogs-installed := $(patsubst %, $(DESTDIR)$(WRAPPER_BINDIR)/%, $(hostprogs-y)) |
370 | wrapper-installed := $(DESTDIR)$(WRAPPER_BINDIR)/wrapper | 370 | wrapper-installed := $(DESTDIR)$(WRAPPER_BINDIR)/wrapper |
371 | dts-installed := $(patsubst $(obj)/dts/%, $(DESTDIR)$(WRAPPER_DTSDIR)/%, $(wildcard $(obj)/dts/*.dts)) | 371 | dts-installed := $(patsubst $(dtstree)/%, $(DESTDIR)$(WRAPPER_DTSDIR)/%, $(wildcard $(dtstree)/*.dts)) |
372 | 372 | ||
373 | all-installed := $(extra-installed) $(hostprogs-installed) $(wrapper-installed) $(dts-installed) | 373 | all-installed := $(extra-installed) $(hostprogs-installed) $(wrapper-installed) $(dts-installed) |
374 | 374 | ||
diff --git a/arch/powerpc/boot/dts/mpc8308rdb.dts b/arch/powerpc/boot/dts/mpc8308rdb.dts index d3db02f98dd..a0bd1881081 100644 --- a/arch/powerpc/boot/dts/mpc8308rdb.dts +++ b/arch/powerpc/boot/dts/mpc8308rdb.dts | |||
@@ -109,7 +109,7 @@ | |||
109 | #address-cells = <1>; | 109 | #address-cells = <1>; |
110 | #size-cells = <1>; | 110 | #size-cells = <1>; |
111 | device_type = "soc"; | 111 | device_type = "soc"; |
112 | compatible = "fsl,mpc8315-immr", "simple-bus"; | 112 | compatible = "fsl,mpc8308-immr", "simple-bus"; |
113 | ranges = <0 0xe0000000 0x00100000>; | 113 | ranges = <0 0xe0000000 0x00100000>; |
114 | reg = <0xe0000000 0x00000200>; | 114 | reg = <0xe0000000 0x00000200>; |
115 | bus-frequency = <0>; | 115 | bus-frequency = <0>; |
diff --git a/arch/powerpc/boot/dts/p1022ds.dts b/arch/powerpc/boot/dts/p1022ds.dts index 2bbecbb4cbf..69422eb24d9 100644 --- a/arch/powerpc/boot/dts/p1022ds.dts +++ b/arch/powerpc/boot/dts/p1022ds.dts | |||
@@ -291,13 +291,13 @@ | |||
291 | ranges = <0x0 0xc100 0x200>; | 291 | ranges = <0x0 0xc100 0x200>; |
292 | cell-index = <1>; | 292 | cell-index = <1>; |
293 | dma00: dma-channel@0 { | 293 | dma00: dma-channel@0 { |
294 | compatible = "fsl,eloplus-dma-channel"; | 294 | compatible = "fsl,ssi-dma-channel"; |
295 | reg = <0x0 0x80>; | 295 | reg = <0x0 0x80>; |
296 | cell-index = <0>; | 296 | cell-index = <0>; |
297 | interrupts = <76 2>; | 297 | interrupts = <76 2>; |
298 | }; | 298 | }; |
299 | dma01: dma-channel@80 { | 299 | dma01: dma-channel@80 { |
300 | compatible = "fsl,eloplus-dma-channel"; | 300 | compatible = "fsl,ssi-dma-channel"; |
301 | reg = <0x80 0x80>; | 301 | reg = <0x80 0x80>; |
302 | cell-index = <1>; | 302 | cell-index = <1>; |
303 | interrupts = <77 2>; | 303 | interrupts = <77 2>; |
diff --git a/arch/powerpc/configs/40x/acadia_defconfig b/arch/powerpc/configs/40x/acadia_defconfig index 97fedceaa30..4182c772340 100644 --- a/arch/powerpc/configs/40x/acadia_defconfig +++ b/arch/powerpc/configs/40x/acadia_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_POSIX_MQUEUE=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | CONFIG_KALLSYMS_ALL=y | 9 | CONFIG_KALLSYMS_ALL=y |
10 | CONFIG_KALLSYMS_EXTRA_PASS=y | 10 | CONFIG_KALLSYMS_EXTRA_PASS=y |
11 | CONFIG_MODULES=y | 11 | CONFIG_MODULES=y |
diff --git a/arch/powerpc/configs/40x/ep405_defconfig b/arch/powerpc/configs/40x/ep405_defconfig index 33b3c24f4ed..2dbb293163f 100644 --- a/arch/powerpc/configs/40x/ep405_defconfig +++ b/arch/powerpc/configs/40x/ep405_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_POSIX_MQUEUE=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | CONFIG_KALLSYMS_ALL=y | 9 | CONFIG_KALLSYMS_ALL=y |
10 | CONFIG_KALLSYMS_EXTRA_PASS=y | 10 | CONFIG_KALLSYMS_EXTRA_PASS=y |
11 | CONFIG_MODULES=y | 11 | CONFIG_MODULES=y |
diff --git a/arch/powerpc/configs/40x/hcu4_defconfig b/arch/powerpc/configs/40x/hcu4_defconfig index 4613079a0ab..ebeb4accad6 100644 --- a/arch/powerpc/configs/40x/hcu4_defconfig +++ b/arch/powerpc/configs/40x/hcu4_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_POSIX_MQUEUE=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | CONFIG_KALLSYMS_ALL=y | 9 | CONFIG_KALLSYMS_ALL=y |
10 | CONFIG_KALLSYMS_EXTRA_PASS=y | 10 | CONFIG_KALLSYMS_EXTRA_PASS=y |
11 | CONFIG_MODULES=y | 11 | CONFIG_MODULES=y |
diff --git a/arch/powerpc/configs/40x/kilauea_defconfig b/arch/powerpc/configs/40x/kilauea_defconfig index 34b8c1a1e75..532ea9d93a1 100644 --- a/arch/powerpc/configs/40x/kilauea_defconfig +++ b/arch/powerpc/configs/40x/kilauea_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_POSIX_MQUEUE=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | CONFIG_KALLSYMS_ALL=y | 9 | CONFIG_KALLSYMS_ALL=y |
10 | CONFIG_KALLSYMS_EXTRA_PASS=y | 10 | CONFIG_KALLSYMS_EXTRA_PASS=y |
11 | CONFIG_MODULES=y | 11 | CONFIG_MODULES=y |
diff --git a/arch/powerpc/configs/40x/makalu_defconfig b/arch/powerpc/configs/40x/makalu_defconfig index 651be09136f..3c142ac1b34 100644 --- a/arch/powerpc/configs/40x/makalu_defconfig +++ b/arch/powerpc/configs/40x/makalu_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_POSIX_MQUEUE=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | CONFIG_KALLSYMS_ALL=y | 9 | CONFIG_KALLSYMS_ALL=y |
10 | CONFIG_KALLSYMS_EXTRA_PASS=y | 10 | CONFIG_KALLSYMS_EXTRA_PASS=y |
11 | CONFIG_MODULES=y | 11 | CONFIG_MODULES=y |
diff --git a/arch/powerpc/configs/40x/walnut_defconfig b/arch/powerpc/configs/40x/walnut_defconfig index ded455e1833..ff57d4828ff 100644 --- a/arch/powerpc/configs/40x/walnut_defconfig +++ b/arch/powerpc/configs/40x/walnut_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_POSIX_MQUEUE=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | CONFIG_KALLSYMS_ALL=y | 9 | CONFIG_KALLSYMS_ALL=y |
10 | CONFIG_KALLSYMS_EXTRA_PASS=y | 10 | CONFIG_KALLSYMS_EXTRA_PASS=y |
11 | CONFIG_MODULES=y | 11 | CONFIG_MODULES=y |
diff --git a/arch/powerpc/configs/44x/arches_defconfig b/arch/powerpc/configs/44x/arches_defconfig index 63746a041d6..3ed16d5c909 100644 --- a/arch/powerpc/configs/44x/arches_defconfig +++ b/arch/powerpc/configs/44x/arches_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_POSIX_MQUEUE=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | CONFIG_MODULES=y | 9 | CONFIG_MODULES=y |
10 | CONFIG_MODULE_UNLOAD=y | 10 | CONFIG_MODULE_UNLOAD=y |
11 | # CONFIG_BLK_DEV_BSG is not set | 11 | # CONFIG_BLK_DEV_BSG is not set |
diff --git a/arch/powerpc/configs/44x/bamboo_defconfig b/arch/powerpc/configs/44x/bamboo_defconfig index f5f2a4e3e21..b1b7d2c5c05 100644 --- a/arch/powerpc/configs/44x/bamboo_defconfig +++ b/arch/powerpc/configs/44x/bamboo_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_POSIX_MQUEUE=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | CONFIG_MODULES=y | 9 | CONFIG_MODULES=y |
10 | CONFIG_MODULE_UNLOAD=y | 10 | CONFIG_MODULE_UNLOAD=y |
11 | # CONFIG_BLK_DEV_BSG is not set | 11 | # CONFIG_BLK_DEV_BSG is not set |
diff --git a/arch/powerpc/configs/44x/bluestone_defconfig b/arch/powerpc/configs/44x/bluestone_defconfig index ac65b48b8cc..30a0a8e08fd 100644 --- a/arch/powerpc/configs/44x/bluestone_defconfig +++ b/arch/powerpc/configs/44x/bluestone_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_SYSVIPC=y | |||
4 | CONFIG_POSIX_MQUEUE=y | 4 | CONFIG_POSIX_MQUEUE=y |
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | # CONFIG_VM_EVENT_COUNTERS is not set | 8 | # CONFIG_VM_EVENT_COUNTERS is not set |
9 | # CONFIG_PCI_QUIRKS is not set | 9 | # CONFIG_PCI_QUIRKS is not set |
10 | # CONFIG_COMPAT_BRK is not set | 10 | # CONFIG_COMPAT_BRK is not set |
diff --git a/arch/powerpc/configs/44x/canyonlands_defconfig b/arch/powerpc/configs/44x/canyonlands_defconfig index 17e4dd98eed..a46942aac69 100644 --- a/arch/powerpc/configs/44x/canyonlands_defconfig +++ b/arch/powerpc/configs/44x/canyonlands_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_POSIX_MQUEUE=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | CONFIG_MODULES=y | 9 | CONFIG_MODULES=y |
10 | CONFIG_MODULE_UNLOAD=y | 10 | CONFIG_MODULE_UNLOAD=y |
11 | # CONFIG_BLK_DEV_BSG is not set | 11 | # CONFIG_BLK_DEV_BSG is not set |
diff --git a/arch/powerpc/configs/44x/ebony_defconfig b/arch/powerpc/configs/44x/ebony_defconfig index fedd03fdf5d..07d77e51f1b 100644 --- a/arch/powerpc/configs/44x/ebony_defconfig +++ b/arch/powerpc/configs/44x/ebony_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_POSIX_MQUEUE=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | CONFIG_KALLSYMS_ALL=y | 9 | CONFIG_KALLSYMS_ALL=y |
10 | CONFIG_KALLSYMS_EXTRA_PASS=y | 10 | CONFIG_KALLSYMS_EXTRA_PASS=y |
11 | CONFIG_MODULES=y | 11 | CONFIG_MODULES=y |
diff --git a/arch/powerpc/configs/44x/eiger_defconfig b/arch/powerpc/configs/44x/eiger_defconfig index ebff7011282..2ce7e9aff09 100644 --- a/arch/powerpc/configs/44x/eiger_defconfig +++ b/arch/powerpc/configs/44x/eiger_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_POSIX_MQUEUE=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | CONFIG_MODULES=y | 9 | CONFIG_MODULES=y |
10 | CONFIG_MODULE_UNLOAD=y | 10 | CONFIG_MODULE_UNLOAD=y |
11 | # CONFIG_BLK_DEV_BSG is not set | 11 | # CONFIG_BLK_DEV_BSG is not set |
diff --git a/arch/powerpc/configs/44x/icon_defconfig b/arch/powerpc/configs/44x/icon_defconfig index 865e93fb41f..18730ff9de7 100644 --- a/arch/powerpc/configs/44x/icon_defconfig +++ b/arch/powerpc/configs/44x/icon_defconfig | |||
@@ -6,7 +6,7 @@ CONFIG_LOG_BUF_SHIFT=14 | |||
6 | CONFIG_SYSFS_DEPRECATED_V2=y | 6 | CONFIG_SYSFS_DEPRECATED_V2=y |
7 | CONFIG_BLK_DEV_INITRD=y | 7 | CONFIG_BLK_DEV_INITRD=y |
8 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 8 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
9 | CONFIG_EMBEDDED=y | 9 | CONFIG_EXPERT=y |
10 | CONFIG_MODULES=y | 10 | CONFIG_MODULES=y |
11 | CONFIG_MODULE_UNLOAD=y | 11 | CONFIG_MODULE_UNLOAD=y |
12 | # CONFIG_BLK_DEV_BSG is not set | 12 | # CONFIG_BLK_DEV_BSG is not set |
diff --git a/arch/powerpc/configs/44x/iss476-smp_defconfig b/arch/powerpc/configs/44x/iss476-smp_defconfig index 8ece4c77441..92f863ac844 100644 --- a/arch/powerpc/configs/44x/iss476-smp_defconfig +++ b/arch/powerpc/configs/44x/iss476-smp_defconfig | |||
@@ -7,7 +7,7 @@ CONFIG_LOG_BUF_SHIFT=14 | |||
7 | CONFIG_SYSFS_DEPRECATED_V2=y | 7 | CONFIG_SYSFS_DEPRECATED_V2=y |
8 | CONFIG_BLK_DEV_INITRD=y | 8 | CONFIG_BLK_DEV_INITRD=y |
9 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 9 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
10 | CONFIG_EMBEDDED=y | 10 | CONFIG_EXPERT=y |
11 | CONFIG_KALLSYMS_ALL=y | 11 | CONFIG_KALLSYMS_ALL=y |
12 | CONFIG_KALLSYMS_EXTRA_PASS=y | 12 | CONFIG_KALLSYMS_EXTRA_PASS=y |
13 | CONFIG_PROFILING=y | 13 | CONFIG_PROFILING=y |
diff --git a/arch/powerpc/configs/44x/katmai_defconfig b/arch/powerpc/configs/44x/katmai_defconfig index 4ca9b4873c5..34c09144a69 100644 --- a/arch/powerpc/configs/44x/katmai_defconfig +++ b/arch/powerpc/configs/44x/katmai_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_POSIX_MQUEUE=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | CONFIG_MODULES=y | 9 | CONFIG_MODULES=y |
10 | CONFIG_MODULE_UNLOAD=y | 10 | CONFIG_MODULE_UNLOAD=y |
11 | # CONFIG_BLK_DEV_BSG is not set | 11 | # CONFIG_BLK_DEV_BSG is not set |
diff --git a/arch/powerpc/configs/44x/rainier_defconfig b/arch/powerpc/configs/44x/rainier_defconfig index e3b65d24207..21c33faf61a 100644 --- a/arch/powerpc/configs/44x/rainier_defconfig +++ b/arch/powerpc/configs/44x/rainier_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_POSIX_MQUEUE=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | CONFIG_MODULES=y | 9 | CONFIG_MODULES=y |
10 | CONFIG_MODULE_UNLOAD=y | 10 | CONFIG_MODULE_UNLOAD=y |
11 | # CONFIG_BLK_DEV_BSG is not set | 11 | # CONFIG_BLK_DEV_BSG is not set |
diff --git a/arch/powerpc/configs/44x/redwood_defconfig b/arch/powerpc/configs/44x/redwood_defconfig index 64cd0f3421a..01cc2b1a7f9 100644 --- a/arch/powerpc/configs/44x/redwood_defconfig +++ b/arch/powerpc/configs/44x/redwood_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_POSIX_MQUEUE=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | CONFIG_MODULES=y | 9 | CONFIG_MODULES=y |
10 | CONFIG_MODULE_UNLOAD=y | 10 | CONFIG_MODULE_UNLOAD=y |
11 | # CONFIG_BLK_DEV_BSG is not set | 11 | # CONFIG_BLK_DEV_BSG is not set |
diff --git a/arch/powerpc/configs/44x/sam440ep_defconfig b/arch/powerpc/configs/44x/sam440ep_defconfig index 01d03367917..dfcffede16a 100644 --- a/arch/powerpc/configs/44x/sam440ep_defconfig +++ b/arch/powerpc/configs/44x/sam440ep_defconfig | |||
@@ -6,7 +6,7 @@ CONFIG_IKCONFIG=y | |||
6 | CONFIG_LOG_BUF_SHIFT=14 | 6 | CONFIG_LOG_BUF_SHIFT=14 |
7 | CONFIG_BLK_DEV_INITRD=y | 7 | CONFIG_BLK_DEV_INITRD=y |
8 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 8 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
9 | CONFIG_EMBEDDED=y | 9 | CONFIG_EXPERT=y |
10 | CONFIG_MODULES=y | 10 | CONFIG_MODULES=y |
11 | CONFIG_MODULE_UNLOAD=y | 11 | CONFIG_MODULE_UNLOAD=y |
12 | # CONFIG_BLK_DEV_BSG is not set | 12 | # CONFIG_BLK_DEV_BSG is not set |
diff --git a/arch/powerpc/configs/44x/sequoia_defconfig b/arch/powerpc/configs/44x/sequoia_defconfig index 89b2f962613..47e399f2892 100644 --- a/arch/powerpc/configs/44x/sequoia_defconfig +++ b/arch/powerpc/configs/44x/sequoia_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_POSIX_MQUEUE=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | CONFIG_MODULES=y | 9 | CONFIG_MODULES=y |
10 | CONFIG_MODULE_UNLOAD=y | 10 | CONFIG_MODULE_UNLOAD=y |
11 | # CONFIG_BLK_DEV_BSG is not set | 11 | # CONFIG_BLK_DEV_BSG is not set |
diff --git a/arch/powerpc/configs/44x/taishan_defconfig b/arch/powerpc/configs/44x/taishan_defconfig index e3386cf6f5b..a6a002ed568 100644 --- a/arch/powerpc/configs/44x/taishan_defconfig +++ b/arch/powerpc/configs/44x/taishan_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_POSIX_MQUEUE=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | CONFIG_MODULES=y | 9 | CONFIG_MODULES=y |
10 | CONFIG_MODULE_UNLOAD=y | 10 | CONFIG_MODULE_UNLOAD=y |
11 | # CONFIG_BLK_DEV_BSG is not set | 11 | # CONFIG_BLK_DEV_BSG is not set |
diff --git a/arch/powerpc/configs/44x/warp_defconfig b/arch/powerpc/configs/44x/warp_defconfig index 9c13b9dffaf..6cf9d661480 100644 --- a/arch/powerpc/configs/44x/warp_defconfig +++ b/arch/powerpc/configs/44x/warp_defconfig | |||
@@ -8,7 +8,7 @@ CONFIG_IKCONFIG_PROC=y | |||
8 | CONFIG_LOG_BUF_SHIFT=14 | 8 | CONFIG_LOG_BUF_SHIFT=14 |
9 | CONFIG_BLK_DEV_INITRD=y | 9 | CONFIG_BLK_DEV_INITRD=y |
10 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 10 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
11 | CONFIG_EMBEDDED=y | 11 | CONFIG_EXPERT=y |
12 | CONFIG_MODULES=y | 12 | CONFIG_MODULES=y |
13 | CONFIG_MODULE_UNLOAD=y | 13 | CONFIG_MODULE_UNLOAD=y |
14 | # CONFIG_BLK_DEV_BSG is not set | 14 | # CONFIG_BLK_DEV_BSG is not set |
diff --git a/arch/powerpc/configs/52xx/cm5200_defconfig b/arch/powerpc/configs/52xx/cm5200_defconfig index f234c4d0b15..69b57daf402 100644 --- a/arch/powerpc/configs/52xx/cm5200_defconfig +++ b/arch/powerpc/configs/52xx/cm5200_defconfig | |||
@@ -3,7 +3,7 @@ CONFIG_SYSVIPC=y | |||
3 | CONFIG_LOG_BUF_SHIFT=14 | 3 | CONFIG_LOG_BUF_SHIFT=14 |
4 | CONFIG_BLK_DEV_INITRD=y | 4 | CONFIG_BLK_DEV_INITRD=y |
5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
6 | CONFIG_EMBEDDED=y | 6 | CONFIG_EXPERT=y |
7 | # CONFIG_SYSCTL_SYSCALL is not set | 7 | # CONFIG_SYSCTL_SYSCALL is not set |
8 | # CONFIG_KALLSYMS is not set | 8 | # CONFIG_KALLSYMS is not set |
9 | # CONFIG_EPOLL is not set | 9 | # CONFIG_EPOLL is not set |
diff --git a/arch/powerpc/configs/52xx/lite5200b_defconfig b/arch/powerpc/configs/52xx/lite5200b_defconfig index a4a795c8074..f3638ae0a62 100644 --- a/arch/powerpc/configs/52xx/lite5200b_defconfig +++ b/arch/powerpc/configs/52xx/lite5200b_defconfig | |||
@@ -3,7 +3,7 @@ CONFIG_SYSVIPC=y | |||
3 | CONFIG_LOG_BUF_SHIFT=14 | 3 | CONFIG_LOG_BUF_SHIFT=14 |
4 | CONFIG_BLK_DEV_INITRD=y | 4 | CONFIG_BLK_DEV_INITRD=y |
5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
6 | CONFIG_EMBEDDED=y | 6 | CONFIG_EXPERT=y |
7 | # CONFIG_SYSCTL_SYSCALL is not set | 7 | # CONFIG_SYSCTL_SYSCALL is not set |
8 | # CONFIG_KALLSYMS is not set | 8 | # CONFIG_KALLSYMS is not set |
9 | # CONFIG_EPOLL is not set | 9 | # CONFIG_EPOLL is not set |
diff --git a/arch/powerpc/configs/52xx/motionpro_defconfig b/arch/powerpc/configs/52xx/motionpro_defconfig index 20d53a1aa7e..6828eda02bd 100644 --- a/arch/powerpc/configs/52xx/motionpro_defconfig +++ b/arch/powerpc/configs/52xx/motionpro_defconfig | |||
@@ -3,7 +3,7 @@ CONFIG_SYSVIPC=y | |||
3 | CONFIG_LOG_BUF_SHIFT=14 | 3 | CONFIG_LOG_BUF_SHIFT=14 |
4 | CONFIG_BLK_DEV_INITRD=y | 4 | CONFIG_BLK_DEV_INITRD=y |
5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
6 | CONFIG_EMBEDDED=y | 6 | CONFIG_EXPERT=y |
7 | # CONFIG_SYSCTL_SYSCALL is not set | 7 | # CONFIG_SYSCTL_SYSCALL is not set |
8 | # CONFIG_KALLSYMS is not set | 8 | # CONFIG_KALLSYMS is not set |
9 | # CONFIG_EPOLL is not set | 9 | # CONFIG_EPOLL is not set |
diff --git a/arch/powerpc/configs/52xx/pcm030_defconfig b/arch/powerpc/configs/52xx/pcm030_defconfig index 6bd58338bf1..7f7e4a87860 100644 --- a/arch/powerpc/configs/52xx/pcm030_defconfig +++ b/arch/powerpc/configs/52xx/pcm030_defconfig | |||
@@ -8,7 +8,7 @@ CONFIG_IKCONFIG=y | |||
8 | CONFIG_IKCONFIG_PROC=y | 8 | CONFIG_IKCONFIG_PROC=y |
9 | CONFIG_LOG_BUF_SHIFT=14 | 9 | CONFIG_LOG_BUF_SHIFT=14 |
10 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 10 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
11 | CONFIG_EMBEDDED=y | 11 | CONFIG_EXPERT=y |
12 | # CONFIG_SYSCTL_SYSCALL is not set | 12 | # CONFIG_SYSCTL_SYSCALL is not set |
13 | # CONFIG_VM_EVENT_COUNTERS is not set | 13 | # CONFIG_VM_EVENT_COUNTERS is not set |
14 | CONFIG_SLAB=y | 14 | CONFIG_SLAB=y |
diff --git a/arch/powerpc/configs/52xx/tqm5200_defconfig b/arch/powerpc/configs/52xx/tqm5200_defconfig index 3a1f70292d9..959cd2cfc27 100644 --- a/arch/powerpc/configs/52xx/tqm5200_defconfig +++ b/arch/powerpc/configs/52xx/tqm5200_defconfig | |||
@@ -3,7 +3,7 @@ CONFIG_SYSVIPC=y | |||
3 | CONFIG_LOG_BUF_SHIFT=14 | 3 | CONFIG_LOG_BUF_SHIFT=14 |
4 | CONFIG_BLK_DEV_INITRD=y | 4 | CONFIG_BLK_DEV_INITRD=y |
5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
6 | CONFIG_EMBEDDED=y | 6 | CONFIG_EXPERT=y |
7 | # CONFIG_SYSCTL_SYSCALL is not set | 7 | # CONFIG_SYSCTL_SYSCALL is not set |
8 | # CONFIG_KALLSYMS is not set | 8 | # CONFIG_KALLSYMS is not set |
9 | # CONFIG_EPOLL is not set | 9 | # CONFIG_EPOLL is not set |
diff --git a/arch/powerpc/configs/83xx/asp8347_defconfig b/arch/powerpc/configs/83xx/asp8347_defconfig index eed42d8919e..d2762d9dcb8 100644 --- a/arch/powerpc/configs/83xx/asp8347_defconfig +++ b/arch/powerpc/configs/83xx/asp8347_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_SYSVIPC=y | |||
4 | CONFIG_LOG_BUF_SHIFT=14 | 4 | CONFIG_LOG_BUF_SHIFT=14 |
5 | CONFIG_BLK_DEV_INITRD=y | 5 | CONFIG_BLK_DEV_INITRD=y |
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | # CONFIG_KALLSYMS is not set | 8 | # CONFIG_KALLSYMS is not set |
9 | CONFIG_MODULES=y | 9 | CONFIG_MODULES=y |
10 | CONFIG_MODULE_UNLOAD=y | 10 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/powerpc/configs/83xx/kmeter1_defconfig b/arch/powerpc/configs/83xx/kmeter1_defconfig index e43ecb27dfd..7a7b731c573 100644 --- a/arch/powerpc/configs/83xx/kmeter1_defconfig +++ b/arch/powerpc/configs/83xx/kmeter1_defconfig | |||
@@ -3,7 +3,7 @@ CONFIG_EXPERIMENTAL=y | |||
3 | CONFIG_SYSVIPC=y | 3 | CONFIG_SYSVIPC=y |
4 | CONFIG_POSIX_MQUEUE=y | 4 | CONFIG_POSIX_MQUEUE=y |
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_EMBEDDED=y | 6 | CONFIG_EXPERT=y |
7 | # CONFIG_HOTPLUG is not set | 7 | # CONFIG_HOTPLUG is not set |
8 | CONFIG_SLAB=y | 8 | CONFIG_SLAB=y |
9 | CONFIG_MODULES=y | 9 | CONFIG_MODULES=y |
diff --git a/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig b/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig index c2e6ab51d33..c683bce4c26 100644 --- a/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig +++ b/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig | |||
@@ -3,7 +3,7 @@ CONFIG_SYSVIPC=y | |||
3 | CONFIG_LOG_BUF_SHIFT=14 | 3 | CONFIG_LOG_BUF_SHIFT=14 |
4 | CONFIG_BLK_DEV_INITRD=y | 4 | CONFIG_BLK_DEV_INITRD=y |
5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
6 | CONFIG_EMBEDDED=y | 6 | CONFIG_EXPERT=y |
7 | # CONFIG_KALLSYMS is not set | 7 | # CONFIG_KALLSYMS is not set |
8 | CONFIG_MODULES=y | 8 | CONFIG_MODULES=y |
9 | CONFIG_MODULE_UNLOAD=y | 9 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/powerpc/configs/83xx/mpc8315_rdb_defconfig b/arch/powerpc/configs/83xx/mpc8315_rdb_defconfig index 1d3b2006591..a721cd3d793 100644 --- a/arch/powerpc/configs/83xx/mpc8315_rdb_defconfig +++ b/arch/powerpc/configs/83xx/mpc8315_rdb_defconfig | |||
@@ -3,7 +3,7 @@ CONFIG_SYSVIPC=y | |||
3 | CONFIG_LOG_BUF_SHIFT=14 | 3 | CONFIG_LOG_BUF_SHIFT=14 |
4 | CONFIG_BLK_DEV_INITRD=y | 4 | CONFIG_BLK_DEV_INITRD=y |
5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
6 | CONFIG_EMBEDDED=y | 6 | CONFIG_EXPERT=y |
7 | # CONFIG_KALLSYMS is not set | 7 | # CONFIG_KALLSYMS is not set |
8 | CONFIG_MODULES=y | 8 | CONFIG_MODULES=y |
9 | CONFIG_MODULE_UNLOAD=y | 9 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/powerpc/configs/83xx/mpc832x_mds_defconfig b/arch/powerpc/configs/83xx/mpc832x_mds_defconfig index 91fe73bd5ad..a5699a1f7d0 100644 --- a/arch/powerpc/configs/83xx/mpc832x_mds_defconfig +++ b/arch/powerpc/configs/83xx/mpc832x_mds_defconfig | |||
@@ -3,7 +3,7 @@ CONFIG_SYSVIPC=y | |||
3 | CONFIG_LOG_BUF_SHIFT=14 | 3 | CONFIG_LOG_BUF_SHIFT=14 |
4 | CONFIG_BLK_DEV_INITRD=y | 4 | CONFIG_BLK_DEV_INITRD=y |
5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
6 | CONFIG_EMBEDDED=y | 6 | CONFIG_EXPERT=y |
7 | # CONFIG_KALLSYMS is not set | 7 | # CONFIG_KALLSYMS is not set |
8 | CONFIG_MODULES=y | 8 | CONFIG_MODULES=y |
9 | CONFIG_MODULE_UNLOAD=y | 9 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/powerpc/configs/83xx/mpc832x_rdb_defconfig b/arch/powerpc/configs/83xx/mpc832x_rdb_defconfig index 6d300f20560..b4da1a7e644 100644 --- a/arch/powerpc/configs/83xx/mpc832x_rdb_defconfig +++ b/arch/powerpc/configs/83xx/mpc832x_rdb_defconfig | |||
@@ -3,7 +3,7 @@ CONFIG_SYSVIPC=y | |||
3 | CONFIG_LOG_BUF_SHIFT=14 | 3 | CONFIG_LOG_BUF_SHIFT=14 |
4 | CONFIG_BLK_DEV_INITRD=y | 4 | CONFIG_BLK_DEV_INITRD=y |
5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
6 | CONFIG_EMBEDDED=y | 6 | CONFIG_EXPERT=y |
7 | # CONFIG_KALLSYMS is not set | 7 | # CONFIG_KALLSYMS is not set |
8 | CONFIG_MODULES=y | 8 | CONFIG_MODULES=y |
9 | CONFIG_MODULE_UNLOAD=y | 9 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/powerpc/configs/83xx/mpc834x_itx_defconfig b/arch/powerpc/configs/83xx/mpc834x_itx_defconfig index b236a67e01f..291f8221d5a 100644 --- a/arch/powerpc/configs/83xx/mpc834x_itx_defconfig +++ b/arch/powerpc/configs/83xx/mpc834x_itx_defconfig | |||
@@ -3,7 +3,7 @@ CONFIG_SYSVIPC=y | |||
3 | CONFIG_LOG_BUF_SHIFT=14 | 3 | CONFIG_LOG_BUF_SHIFT=14 |
4 | CONFIG_BLK_DEV_INITRD=y | 4 | CONFIG_BLK_DEV_INITRD=y |
5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
6 | CONFIG_EMBEDDED=y | 6 | CONFIG_EXPERT=y |
7 | # CONFIG_KALLSYMS is not set | 7 | # CONFIG_KALLSYMS is not set |
8 | CONFIG_MODULES=y | 8 | CONFIG_MODULES=y |
9 | CONFIG_MODULE_UNLOAD=y | 9 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig b/arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig index 001dead3cde..f8b228aaa03 100644 --- a/arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig +++ b/arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig | |||
@@ -3,7 +3,7 @@ CONFIG_SYSVIPC=y | |||
3 | CONFIG_LOG_BUF_SHIFT=14 | 3 | CONFIG_LOG_BUF_SHIFT=14 |
4 | CONFIG_BLK_DEV_INITRD=y | 4 | CONFIG_BLK_DEV_INITRD=y |
5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
6 | CONFIG_EMBEDDED=y | 6 | CONFIG_EXPERT=y |
7 | # CONFIG_KALLSYMS is not set | 7 | # CONFIG_KALLSYMS is not set |
8 | CONFIG_MODULES=y | 8 | CONFIG_MODULES=y |
9 | CONFIG_MODULE_UNLOAD=y | 9 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/powerpc/configs/83xx/mpc834x_mds_defconfig b/arch/powerpc/configs/83xx/mpc834x_mds_defconfig index 9dccefca00c..99660c06219 100644 --- a/arch/powerpc/configs/83xx/mpc834x_mds_defconfig +++ b/arch/powerpc/configs/83xx/mpc834x_mds_defconfig | |||
@@ -3,7 +3,7 @@ CONFIG_SYSVIPC=y | |||
3 | CONFIG_LOG_BUF_SHIFT=14 | 3 | CONFIG_LOG_BUF_SHIFT=14 |
4 | CONFIG_BLK_DEV_INITRD=y | 4 | CONFIG_BLK_DEV_INITRD=y |
5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
6 | CONFIG_EMBEDDED=y | 6 | CONFIG_EXPERT=y |
7 | # CONFIG_KALLSYMS is not set | 7 | # CONFIG_KALLSYMS is not set |
8 | CONFIG_MODULES=y | 8 | CONFIG_MODULES=y |
9 | CONFIG_MODULE_UNLOAD=y | 9 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/powerpc/configs/83xx/mpc836x_mds_defconfig b/arch/powerpc/configs/83xx/mpc836x_mds_defconfig index d4b165d7d29..10b5c4cd0e7 100644 --- a/arch/powerpc/configs/83xx/mpc836x_mds_defconfig +++ b/arch/powerpc/configs/83xx/mpc836x_mds_defconfig | |||
@@ -3,7 +3,7 @@ CONFIG_SYSVIPC=y | |||
3 | CONFIG_LOG_BUF_SHIFT=14 | 3 | CONFIG_LOG_BUF_SHIFT=14 |
4 | CONFIG_BLK_DEV_INITRD=y | 4 | CONFIG_BLK_DEV_INITRD=y |
5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
6 | CONFIG_EMBEDDED=y | 6 | CONFIG_EXPERT=y |
7 | # CONFIG_KALLSYMS is not set | 7 | # CONFIG_KALLSYMS is not set |
8 | CONFIG_MODULES=y | 8 | CONFIG_MODULES=y |
9 | CONFIG_MODULE_UNLOAD=y | 9 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/powerpc/configs/83xx/mpc836x_rdk_defconfig b/arch/powerpc/configs/83xx/mpc836x_rdk_defconfig index 89ba67274bd..45925d701d2 100644 --- a/arch/powerpc/configs/83xx/mpc836x_rdk_defconfig +++ b/arch/powerpc/configs/83xx/mpc836x_rdk_defconfig | |||
@@ -3,7 +3,7 @@ CONFIG_SYSVIPC=y | |||
3 | CONFIG_LOG_BUF_SHIFT=14 | 3 | CONFIG_LOG_BUF_SHIFT=14 |
4 | CONFIG_BLK_DEV_INITRD=y | 4 | CONFIG_BLK_DEV_INITRD=y |
5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
6 | CONFIG_EMBEDDED=y | 6 | CONFIG_EXPERT=y |
7 | # CONFIG_KALLSYMS is not set | 7 | # CONFIG_KALLSYMS is not set |
8 | CONFIG_MODULES=y | 8 | CONFIG_MODULES=y |
9 | CONFIG_MODULE_UNLOAD=y | 9 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/powerpc/configs/83xx/mpc837x_mds_defconfig b/arch/powerpc/configs/83xx/mpc837x_mds_defconfig index 2ea6b405046..f367985be6f 100644 --- a/arch/powerpc/configs/83xx/mpc837x_mds_defconfig +++ b/arch/powerpc/configs/83xx/mpc837x_mds_defconfig | |||
@@ -3,7 +3,7 @@ CONFIG_SYSVIPC=y | |||
3 | CONFIG_LOG_BUF_SHIFT=14 | 3 | CONFIG_LOG_BUF_SHIFT=14 |
4 | CONFIG_BLK_DEV_INITRD=y | 4 | CONFIG_BLK_DEV_INITRD=y |
5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
6 | CONFIG_EMBEDDED=y | 6 | CONFIG_EXPERT=y |
7 | CONFIG_SLAB=y | 7 | CONFIG_SLAB=y |
8 | CONFIG_MODULES=y | 8 | CONFIG_MODULES=y |
9 | CONFIG_MODULE_UNLOAD=y | 9 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/powerpc/configs/83xx/mpc837x_rdb_defconfig b/arch/powerpc/configs/83xx/mpc837x_rdb_defconfig index bffe3c77503..414eda38159 100644 --- a/arch/powerpc/configs/83xx/mpc837x_rdb_defconfig +++ b/arch/powerpc/configs/83xx/mpc837x_rdb_defconfig | |||
@@ -3,7 +3,7 @@ CONFIG_SYSVIPC=y | |||
3 | CONFIG_LOG_BUF_SHIFT=14 | 3 | CONFIG_LOG_BUF_SHIFT=14 |
4 | CONFIG_BLK_DEV_INITRD=y | 4 | CONFIG_BLK_DEV_INITRD=y |
5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
6 | CONFIG_EMBEDDED=y | 6 | CONFIG_EXPERT=y |
7 | CONFIG_SLAB=y | 7 | CONFIG_SLAB=y |
8 | CONFIG_MODULES=y | 8 | CONFIG_MODULES=y |
9 | CONFIG_MODULE_UNLOAD=y | 9 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/powerpc/configs/83xx/sbc834x_defconfig b/arch/powerpc/configs/83xx/sbc834x_defconfig index fa5c9eefc9a..6d6463fe06f 100644 --- a/arch/powerpc/configs/83xx/sbc834x_defconfig +++ b/arch/powerpc/configs/83xx/sbc834x_defconfig | |||
@@ -3,7 +3,7 @@ CONFIG_SYSVIPC=y | |||
3 | CONFIG_LOG_BUF_SHIFT=14 | 3 | CONFIG_LOG_BUF_SHIFT=14 |
4 | CONFIG_BLK_DEV_INITRD=y | 4 | CONFIG_BLK_DEV_INITRD=y |
5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
6 | CONFIG_EMBEDDED=y | 6 | CONFIG_EXPERT=y |
7 | # CONFIG_KALLSYMS is not set | 7 | # CONFIG_KALLSYMS is not set |
8 | CONFIG_SLAB=y | 8 | CONFIG_SLAB=y |
9 | CONFIG_MODULES=y | 9 | CONFIG_MODULES=y |
diff --git a/arch/powerpc/configs/85xx/ksi8560_defconfig b/arch/powerpc/configs/85xx/ksi8560_defconfig index 385b1af37d7..8f7c1061891 100644 --- a/arch/powerpc/configs/85xx/ksi8560_defconfig +++ b/arch/powerpc/configs/85xx/ksi8560_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_SYSVIPC=y | |||
4 | CONFIG_LOG_BUF_SHIFT=14 | 4 | CONFIG_LOG_BUF_SHIFT=14 |
5 | CONFIG_BLK_DEV_INITRD=y | 5 | CONFIG_BLK_DEV_INITRD=y |
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | # CONFIG_BLK_DEV_BSG is not set | 8 | # CONFIG_BLK_DEV_BSG is not set |
9 | CONFIG_KSI8560=y | 9 | CONFIG_KSI8560=y |
10 | CONFIG_CPM2=y | 10 | CONFIG_CPM2=y |
diff --git a/arch/powerpc/configs/85xx/mpc8540_ads_defconfig b/arch/powerpc/configs/85xx/mpc8540_ads_defconfig index 222b704c1f4..55e0725500d 100644 --- a/arch/powerpc/configs/85xx/mpc8540_ads_defconfig +++ b/arch/powerpc/configs/85xx/mpc8540_ads_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_SYSVIPC=y | |||
4 | CONFIG_LOG_BUF_SHIFT=14 | 4 | CONFIG_LOG_BUF_SHIFT=14 |
5 | CONFIG_BLK_DEV_INITRD=y | 5 | CONFIG_BLK_DEV_INITRD=y |
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | # CONFIG_BLK_DEV_BSG is not set | 8 | # CONFIG_BLK_DEV_BSG is not set |
9 | CONFIG_MPC8540_ADS=y | 9 | CONFIG_MPC8540_ADS=y |
10 | CONFIG_NO_HZ=y | 10 | CONFIG_NO_HZ=y |
diff --git a/arch/powerpc/configs/85xx/mpc8560_ads_defconfig b/arch/powerpc/configs/85xx/mpc8560_ads_defconfig index 619702de947..d724095530a 100644 --- a/arch/powerpc/configs/85xx/mpc8560_ads_defconfig +++ b/arch/powerpc/configs/85xx/mpc8560_ads_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_SYSVIPC=y | |||
4 | CONFIG_LOG_BUF_SHIFT=14 | 4 | CONFIG_LOG_BUF_SHIFT=14 |
5 | CONFIG_BLK_DEV_INITRD=y | 5 | CONFIG_BLK_DEV_INITRD=y |
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | # CONFIG_BLK_DEV_BSG is not set | 8 | # CONFIG_BLK_DEV_BSG is not set |
9 | CONFIG_MPC8560_ADS=y | 9 | CONFIG_MPC8560_ADS=y |
10 | CONFIG_BINFMT_MISC=y | 10 | CONFIG_BINFMT_MISC=y |
diff --git a/arch/powerpc/configs/85xx/mpc85xx_cds_defconfig b/arch/powerpc/configs/85xx/mpc85xx_cds_defconfig index 6bf56e83f95..4b44beaa21a 100644 --- a/arch/powerpc/configs/85xx/mpc85xx_cds_defconfig +++ b/arch/powerpc/configs/85xx/mpc85xx_cds_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_SYSVIPC=y | |||
4 | CONFIG_LOG_BUF_SHIFT=14 | 4 | CONFIG_LOG_BUF_SHIFT=14 |
5 | CONFIG_BLK_DEV_INITRD=y | 5 | CONFIG_BLK_DEV_INITRD=y |
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | # CONFIG_BLK_DEV_BSG is not set | 8 | # CONFIG_BLK_DEV_BSG is not set |
9 | CONFIG_MPC85xx_CDS=y | 9 | CONFIG_MPC85xx_CDS=y |
10 | CONFIG_NO_HZ=y | 10 | CONFIG_NO_HZ=y |
diff --git a/arch/powerpc/configs/85xx/sbc8548_defconfig b/arch/powerpc/configs/85xx/sbc8548_defconfig index a9a17d05576..5b2b651dfb9 100644 --- a/arch/powerpc/configs/85xx/sbc8548_defconfig +++ b/arch/powerpc/configs/85xx/sbc8548_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_SYSVIPC=y | |||
4 | CONFIG_LOG_BUF_SHIFT=14 | 4 | CONFIG_LOG_BUF_SHIFT=14 |
5 | CONFIG_BLK_DEV_INITRD=y | 5 | CONFIG_BLK_DEV_INITRD=y |
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | CONFIG_SLAB=y | 8 | CONFIG_SLAB=y |
9 | # CONFIG_BLK_DEV_BSG is not set | 9 | # CONFIG_BLK_DEV_BSG is not set |
10 | CONFIG_SBC8548=y | 10 | CONFIG_SBC8548=y |
diff --git a/arch/powerpc/configs/85xx/sbc8560_defconfig b/arch/powerpc/configs/85xx/sbc8560_defconfig index 820e32d8c42..f7fdb0318e4 100644 --- a/arch/powerpc/configs/85xx/sbc8560_defconfig +++ b/arch/powerpc/configs/85xx/sbc8560_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_SYSVIPC=y | |||
4 | CONFIG_LOG_BUF_SHIFT=14 | 4 | CONFIG_LOG_BUF_SHIFT=14 |
5 | CONFIG_BLK_DEV_INITRD=y | 5 | CONFIG_BLK_DEV_INITRD=y |
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | CONFIG_SLAB=y | 8 | CONFIG_SLAB=y |
9 | # CONFIG_BLK_DEV_BSG is not set | 9 | # CONFIG_BLK_DEV_BSG is not set |
10 | CONFIG_SBC8560=y | 10 | CONFIG_SBC8560=y |
diff --git a/arch/powerpc/configs/85xx/socrates_defconfig b/arch/powerpc/configs/85xx/socrates_defconfig index b6db3f47af9..77506b5d5a4 100644 --- a/arch/powerpc/configs/85xx/socrates_defconfig +++ b/arch/powerpc/configs/85xx/socrates_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_SYSVIPC=y | |||
4 | CONFIG_LOG_BUF_SHIFT=16 | 4 | CONFIG_LOG_BUF_SHIFT=16 |
5 | CONFIG_BLK_DEV_INITRD=y | 5 | CONFIG_BLK_DEV_INITRD=y |
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | # CONFIG_KALLSYMS is not set | 8 | # CONFIG_KALLSYMS is not set |
9 | # CONFIG_HOTPLUG is not set | 9 | # CONFIG_HOTPLUG is not set |
10 | # CONFIG_EPOLL is not set | 10 | # CONFIG_EPOLL is not set |
diff --git a/arch/powerpc/configs/85xx/stx_gp3_defconfig b/arch/powerpc/configs/85xx/stx_gp3_defconfig index 333a41bd2a6..5d4db154bf5 100644 --- a/arch/powerpc/configs/85xx/stx_gp3_defconfig +++ b/arch/powerpc/configs/85xx/stx_gp3_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_SYSVIPC=y | |||
4 | CONFIG_LOG_BUF_SHIFT=14 | 4 | CONFIG_LOG_BUF_SHIFT=14 |
5 | CONFIG_BLK_DEV_INITRD=y | 5 | CONFIG_BLK_DEV_INITRD=y |
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | CONFIG_MODULES=y | 8 | CONFIG_MODULES=y |
9 | CONFIG_MODVERSIONS=y | 9 | CONFIG_MODVERSIONS=y |
10 | # CONFIG_BLK_DEV_BSG is not set | 10 | # CONFIG_BLK_DEV_BSG is not set |
diff --git a/arch/powerpc/configs/85xx/tqm8540_defconfig b/arch/powerpc/configs/85xx/tqm8540_defconfig index 33db352f847..ddcb9f37fa1 100644 --- a/arch/powerpc/configs/85xx/tqm8540_defconfig +++ b/arch/powerpc/configs/85xx/tqm8540_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_SYSVIPC=y | |||
4 | CONFIG_LOG_BUF_SHIFT=14 | 4 | CONFIG_LOG_BUF_SHIFT=14 |
5 | CONFIG_BLK_DEV_INITRD=y | 5 | CONFIG_BLK_DEV_INITRD=y |
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | # CONFIG_KALLSYMS is not set | 8 | # CONFIG_KALLSYMS is not set |
9 | # CONFIG_HOTPLUG is not set | 9 | # CONFIG_HOTPLUG is not set |
10 | # CONFIG_EPOLL is not set | 10 | # CONFIG_EPOLL is not set |
diff --git a/arch/powerpc/configs/85xx/tqm8541_defconfig b/arch/powerpc/configs/85xx/tqm8541_defconfig index f0c20dfbd4d..981abd6d4b5 100644 --- a/arch/powerpc/configs/85xx/tqm8541_defconfig +++ b/arch/powerpc/configs/85xx/tqm8541_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_SYSVIPC=y | |||
4 | CONFIG_LOG_BUF_SHIFT=14 | 4 | CONFIG_LOG_BUF_SHIFT=14 |
5 | CONFIG_BLK_DEV_INITRD=y | 5 | CONFIG_BLK_DEV_INITRD=y |
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | # CONFIG_KALLSYMS is not set | 8 | # CONFIG_KALLSYMS is not set |
9 | # CONFIG_HOTPLUG is not set | 9 | # CONFIG_HOTPLUG is not set |
10 | # CONFIG_EPOLL is not set | 10 | # CONFIG_EPOLL is not set |
diff --git a/arch/powerpc/configs/85xx/tqm8548_defconfig b/arch/powerpc/configs/85xx/tqm8548_defconfig index a883450dcdf..37b3d7227cd 100644 --- a/arch/powerpc/configs/85xx/tqm8548_defconfig +++ b/arch/powerpc/configs/85xx/tqm8548_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_SYSVIPC=y | |||
4 | CONFIG_LOG_BUF_SHIFT=14 | 4 | CONFIG_LOG_BUF_SHIFT=14 |
5 | CONFIG_BLK_DEV_INITRD=y | 5 | CONFIG_BLK_DEV_INITRD=y |
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | CONFIG_MODULES=y | 8 | CONFIG_MODULES=y |
9 | CONFIG_MODULE_UNLOAD=y | 9 | CONFIG_MODULE_UNLOAD=y |
10 | # CONFIG_BLK_DEV_BSG is not set | 10 | # CONFIG_BLK_DEV_BSG is not set |
diff --git a/arch/powerpc/configs/85xx/tqm8555_defconfig b/arch/powerpc/configs/85xx/tqm8555_defconfig index ff95f90dc17..3593b320c97 100644 --- a/arch/powerpc/configs/85xx/tqm8555_defconfig +++ b/arch/powerpc/configs/85xx/tqm8555_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_SYSVIPC=y | |||
4 | CONFIG_LOG_BUF_SHIFT=14 | 4 | CONFIG_LOG_BUF_SHIFT=14 |
5 | CONFIG_BLK_DEV_INITRD=y | 5 | CONFIG_BLK_DEV_INITRD=y |
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | # CONFIG_KALLSYMS is not set | 8 | # CONFIG_KALLSYMS is not set |
9 | # CONFIG_HOTPLUG is not set | 9 | # CONFIG_HOTPLUG is not set |
10 | # CONFIG_EPOLL is not set | 10 | # CONFIG_EPOLL is not set |
diff --git a/arch/powerpc/configs/85xx/tqm8560_defconfig b/arch/powerpc/configs/85xx/tqm8560_defconfig index 8d6c90ea478..de413acc34d 100644 --- a/arch/powerpc/configs/85xx/tqm8560_defconfig +++ b/arch/powerpc/configs/85xx/tqm8560_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_SYSVIPC=y | |||
4 | CONFIG_LOG_BUF_SHIFT=14 | 4 | CONFIG_LOG_BUF_SHIFT=14 |
5 | CONFIG_BLK_DEV_INITRD=y | 5 | CONFIG_BLK_DEV_INITRD=y |
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | # CONFIG_KALLSYMS is not set | 8 | # CONFIG_KALLSYMS is not set |
9 | # CONFIG_HOTPLUG is not set | 9 | # CONFIG_HOTPLUG is not set |
10 | # CONFIG_EPOLL is not set | 10 | # CONFIG_EPOLL is not set |
diff --git a/arch/powerpc/configs/85xx/xes_mpc85xx_defconfig b/arch/powerpc/configs/85xx/xes_mpc85xx_defconfig index f53efe4a0e0..5ea3124518f 100644 --- a/arch/powerpc/configs/85xx/xes_mpc85xx_defconfig +++ b/arch/powerpc/configs/85xx/xes_mpc85xx_defconfig | |||
@@ -11,7 +11,7 @@ CONFIG_IKCONFIG_PROC=y | |||
11 | CONFIG_LOG_BUF_SHIFT=14 | 11 | CONFIG_LOG_BUF_SHIFT=14 |
12 | CONFIG_BLK_DEV_INITRD=y | 12 | CONFIG_BLK_DEV_INITRD=y |
13 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 13 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
14 | CONFIG_EMBEDDED=y | 14 | CONFIG_EXPERT=y |
15 | CONFIG_KALLSYMS_ALL=y | 15 | CONFIG_KALLSYMS_ALL=y |
16 | CONFIG_KALLSYMS_EXTRA_PASS=y | 16 | CONFIG_KALLSYMS_EXTRA_PASS=y |
17 | CONFIG_MODULES=y | 17 | CONFIG_MODULES=y |
diff --git a/arch/powerpc/configs/86xx/gef_ppc9a_defconfig b/arch/powerpc/configs/86xx/gef_ppc9a_defconfig index 432ebc28d25..4b2441244ea 100644 --- a/arch/powerpc/configs/86xx/gef_ppc9a_defconfig +++ b/arch/powerpc/configs/86xx/gef_ppc9a_defconfig | |||
@@ -11,7 +11,7 @@ CONFIG_LOG_BUF_SHIFT=14 | |||
11 | CONFIG_RELAY=y | 11 | CONFIG_RELAY=y |
12 | CONFIG_BLK_DEV_INITRD=y | 12 | CONFIG_BLK_DEV_INITRD=y |
13 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 13 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
14 | CONFIG_EMBEDDED=y | 14 | CONFIG_EXPERT=y |
15 | CONFIG_SLAB=y | 15 | CONFIG_SLAB=y |
16 | CONFIG_MODULES=y | 16 | CONFIG_MODULES=y |
17 | CONFIG_MODULE_UNLOAD=y | 17 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/powerpc/configs/86xx/gef_sbc310_defconfig b/arch/powerpc/configs/86xx/gef_sbc310_defconfig index ce5e919d9b5..a360ba44b92 100644 --- a/arch/powerpc/configs/86xx/gef_sbc310_defconfig +++ b/arch/powerpc/configs/86xx/gef_sbc310_defconfig | |||
@@ -11,7 +11,7 @@ CONFIG_LOG_BUF_SHIFT=14 | |||
11 | CONFIG_RELAY=y | 11 | CONFIG_RELAY=y |
12 | CONFIG_BLK_DEV_INITRD=y | 12 | CONFIG_BLK_DEV_INITRD=y |
13 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 13 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
14 | CONFIG_EMBEDDED=y | 14 | CONFIG_EXPERT=y |
15 | CONFIG_SLAB=y | 15 | CONFIG_SLAB=y |
16 | CONFIG_MODULES=y | 16 | CONFIG_MODULES=y |
17 | CONFIG_MODULE_UNLOAD=y | 17 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/powerpc/configs/86xx/gef_sbc610_defconfig b/arch/powerpc/configs/86xx/gef_sbc610_defconfig index 589e71e6dc1..be2829dd129 100644 --- a/arch/powerpc/configs/86xx/gef_sbc610_defconfig +++ b/arch/powerpc/configs/86xx/gef_sbc610_defconfig | |||
@@ -11,7 +11,7 @@ CONFIG_LOG_BUF_SHIFT=14 | |||
11 | CONFIG_RELAY=y | 11 | CONFIG_RELAY=y |
12 | CONFIG_BLK_DEV_INITRD=y | 12 | CONFIG_BLK_DEV_INITRD=y |
13 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 13 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
14 | CONFIG_EMBEDDED=y | 14 | CONFIG_EXPERT=y |
15 | CONFIG_SLAB=y | 15 | CONFIG_SLAB=y |
16 | CONFIG_MODULES=y | 16 | CONFIG_MODULES=y |
17 | CONFIG_MODULE_UNLOAD=y | 17 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/powerpc/configs/86xx/mpc8610_hpcd_defconfig b/arch/powerpc/configs/86xx/mpc8610_hpcd_defconfig index 321fb47096d..036bfb2d18c 100644 --- a/arch/powerpc/configs/86xx/mpc8610_hpcd_defconfig +++ b/arch/powerpc/configs/86xx/mpc8610_hpcd_defconfig | |||
@@ -6,7 +6,7 @@ CONFIG_IKCONFIG_PROC=y | |||
6 | CONFIG_LOG_BUF_SHIFT=14 | 6 | CONFIG_LOG_BUF_SHIFT=14 |
7 | CONFIG_BLK_DEV_INITRD=y | 7 | CONFIG_BLK_DEV_INITRD=y |
8 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 8 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
9 | CONFIG_EMBEDDED=y | 9 | CONFIG_EXPERT=y |
10 | CONFIG_KALLSYMS_EXTRA_PASS=y | 10 | CONFIG_KALLSYMS_EXTRA_PASS=y |
11 | # CONFIG_ELF_CORE is not set | 11 | # CONFIG_ELF_CORE is not set |
12 | CONFIG_MODULES=y | 12 | CONFIG_MODULES=y |
diff --git a/arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig b/arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig index b5e46399374..0c9c7ed7ec7 100644 --- a/arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig +++ b/arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig | |||
@@ -10,7 +10,7 @@ CONFIG_IKCONFIG_PROC=y | |||
10 | CONFIG_LOG_BUF_SHIFT=14 | 10 | CONFIG_LOG_BUF_SHIFT=14 |
11 | CONFIG_BLK_DEV_INITRD=y | 11 | CONFIG_BLK_DEV_INITRD=y |
12 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 12 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
13 | CONFIG_EMBEDDED=y | 13 | CONFIG_EXPERT=y |
14 | CONFIG_KALLSYMS_ALL=y | 14 | CONFIG_KALLSYMS_ALL=y |
15 | CONFIG_KALLSYMS_EXTRA_PASS=y | 15 | CONFIG_KALLSYMS_EXTRA_PASS=y |
16 | CONFIG_MODULES=y | 16 | CONFIG_MODULES=y |
diff --git a/arch/powerpc/configs/86xx/sbc8641d_defconfig b/arch/powerpc/configs/86xx/sbc8641d_defconfig index 71145c3a64d..0a92ca04564 100644 --- a/arch/powerpc/configs/86xx/sbc8641d_defconfig +++ b/arch/powerpc/configs/86xx/sbc8641d_defconfig | |||
@@ -11,7 +11,7 @@ CONFIG_LOG_BUF_SHIFT=14 | |||
11 | CONFIG_RELAY=y | 11 | CONFIG_RELAY=y |
12 | CONFIG_BLK_DEV_INITRD=y | 12 | CONFIG_BLK_DEV_INITRD=y |
13 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 13 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
14 | CONFIG_EMBEDDED=y | 14 | CONFIG_EXPERT=y |
15 | CONFIG_SLAB=y | 15 | CONFIG_SLAB=y |
16 | CONFIG_MODULES=y | 16 | CONFIG_MODULES=y |
17 | CONFIG_MODULE_UNLOAD=y | 17 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/powerpc/configs/adder875_defconfig b/arch/powerpc/configs/adder875_defconfig index ca84c7fc24d..69128740c14 100644 --- a/arch/powerpc/configs/adder875_defconfig +++ b/arch/powerpc/configs/adder875_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_EXPERIMENTAL=y | |||
4 | CONFIG_SYSVIPC=y | 4 | CONFIG_SYSVIPC=y |
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | # CONFIG_SYSCTL_SYSCALL is not set | 8 | # CONFIG_SYSCTL_SYSCALL is not set |
9 | # CONFIG_ELF_CORE is not set | 9 | # CONFIG_ELF_CORE is not set |
10 | # CONFIG_BASE_FULL is not set | 10 | # CONFIG_BASE_FULL is not set |
diff --git a/arch/powerpc/configs/e55xx_smp_defconfig b/arch/powerpc/configs/e55xx_smp_defconfig index 94d120ef99c..06f95492afc 100644 --- a/arch/powerpc/configs/e55xx_smp_defconfig +++ b/arch/powerpc/configs/e55xx_smp_defconfig | |||
@@ -12,7 +12,7 @@ CONFIG_LOG_BUF_SHIFT=14 | |||
12 | CONFIG_SYSFS_DEPRECATED_V2=y | 12 | CONFIG_SYSFS_DEPRECATED_V2=y |
13 | CONFIG_BLK_DEV_INITRD=y | 13 | CONFIG_BLK_DEV_INITRD=y |
14 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 14 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
15 | CONFIG_EMBEDDED=y | 15 | CONFIG_EXPERT=y |
16 | CONFIG_KALLSYMS_ALL=y | 16 | CONFIG_KALLSYMS_ALL=y |
17 | CONFIG_KALLSYMS_EXTRA_PASS=y | 17 | CONFIG_KALLSYMS_EXTRA_PASS=y |
18 | CONFIG_MODULES=y | 18 | CONFIG_MODULES=y |
diff --git a/arch/powerpc/configs/ep8248e_defconfig b/arch/powerpc/configs/ep8248e_defconfig index 2677b08199e..fceffb3cffb 100644 --- a/arch/powerpc/configs/ep8248e_defconfig +++ b/arch/powerpc/configs/ep8248e_defconfig | |||
@@ -2,7 +2,7 @@ CONFIG_SYSVIPC=y | |||
2 | CONFIG_IKCONFIG=y | 2 | CONFIG_IKCONFIG=y |
3 | CONFIG_IKCONFIG_PROC=y | 3 | CONFIG_IKCONFIG_PROC=y |
4 | CONFIG_LOG_BUF_SHIFT=14 | 4 | CONFIG_LOG_BUF_SHIFT=14 |
5 | CONFIG_EMBEDDED=y | 5 | CONFIG_EXPERT=y |
6 | CONFIG_KALLSYMS_ALL=y | 6 | CONFIG_KALLSYMS_ALL=y |
7 | CONFIG_SLAB=y | 7 | CONFIG_SLAB=y |
8 | # CONFIG_IOSCHED_CFQ is not set | 8 | # CONFIG_IOSCHED_CFQ is not set |
diff --git a/arch/powerpc/configs/ep88xc_defconfig b/arch/powerpc/configs/ep88xc_defconfig index f9a3112e544..219fd470ed2 100644 --- a/arch/powerpc/configs/ep88xc_defconfig +++ b/arch/powerpc/configs/ep88xc_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_EXPERIMENTAL=y | |||
4 | CONFIG_SYSVIPC=y | 4 | CONFIG_SYSVIPC=y |
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | # CONFIG_SYSCTL_SYSCALL is not set | 8 | # CONFIG_SYSCTL_SYSCALL is not set |
9 | # CONFIG_ELF_CORE is not set | 9 | # CONFIG_ELF_CORE is not set |
10 | # CONFIG_BASE_FULL is not set | 10 | # CONFIG_BASE_FULL is not set |
diff --git a/arch/powerpc/configs/gamecube_defconfig b/arch/powerpc/configs/gamecube_defconfig index fcf0a398cd6..e74d3a48370 100644 --- a/arch/powerpc/configs/gamecube_defconfig +++ b/arch/powerpc/configs/gamecube_defconfig | |||
@@ -6,7 +6,7 @@ CONFIG_IKCONFIG_PROC=y | |||
6 | CONFIG_LOG_BUF_SHIFT=14 | 6 | CONFIG_LOG_BUF_SHIFT=14 |
7 | CONFIG_BLK_DEV_INITRD=y | 7 | CONFIG_BLK_DEV_INITRD=y |
8 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 8 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
9 | CONFIG_EMBEDDED=y | 9 | CONFIG_EXPERT=y |
10 | # CONFIG_ELF_CORE is not set | 10 | # CONFIG_ELF_CORE is not set |
11 | CONFIG_PERF_COUNTERS=y | 11 | CONFIG_PERF_COUNTERS=y |
12 | # CONFIG_VM_EVENT_COUNTERS is not set | 12 | # CONFIG_VM_EVENT_COUNTERS is not set |
diff --git a/arch/powerpc/configs/holly_defconfig b/arch/powerpc/configs/holly_defconfig index b9b63a60952..94ebfee188d 100644 --- a/arch/powerpc/configs/holly_defconfig +++ b/arch/powerpc/configs/holly_defconfig | |||
@@ -3,7 +3,7 @@ CONFIG_SYSVIPC=y | |||
3 | CONFIG_LOG_BUF_SHIFT=14 | 3 | CONFIG_LOG_BUF_SHIFT=14 |
4 | CONFIG_BLK_DEV_INITRD=y | 4 | CONFIG_BLK_DEV_INITRD=y |
5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
6 | CONFIG_EMBEDDED=y | 6 | CONFIG_EXPERT=y |
7 | CONFIG_MODULES=y | 7 | CONFIG_MODULES=y |
8 | # CONFIG_BLK_DEV_BSG is not set | 8 | # CONFIG_BLK_DEV_BSG is not set |
9 | # CONFIG_PPC_CHRP is not set | 9 | # CONFIG_PPC_CHRP is not set |
diff --git a/arch/powerpc/configs/mgcoge_defconfig b/arch/powerpc/configs/mgcoge_defconfig index c4ed255af18..39518e91822 100644 --- a/arch/powerpc/configs/mgcoge_defconfig +++ b/arch/powerpc/configs/mgcoge_defconfig | |||
@@ -3,7 +3,7 @@ CONFIG_IKCONFIG=y | |||
3 | CONFIG_IKCONFIG_PROC=y | 3 | CONFIG_IKCONFIG_PROC=y |
4 | CONFIG_LOG_BUF_SHIFT=14 | 4 | CONFIG_LOG_BUF_SHIFT=14 |
5 | CONFIG_BLK_DEV_INITRD=y | 5 | CONFIG_BLK_DEV_INITRD=y |
6 | CONFIG_EMBEDDED=y | 6 | CONFIG_EXPERT=y |
7 | CONFIG_KALLSYMS_ALL=y | 7 | CONFIG_KALLSYMS_ALL=y |
8 | CONFIG_SLAB=y | 8 | CONFIG_SLAB=y |
9 | # CONFIG_IOSCHED_CFQ is not set | 9 | # CONFIG_IOSCHED_CFQ is not set |
diff --git a/arch/powerpc/configs/mgsuvd_defconfig b/arch/powerpc/configs/mgsuvd_defconfig index f276c7cf555..2a490626015 100644 --- a/arch/powerpc/configs/mgsuvd_defconfig +++ b/arch/powerpc/configs/mgsuvd_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_EXPERIMENTAL=y | |||
4 | CONFIG_SYSVIPC=y | 4 | CONFIG_SYSVIPC=y |
5 | CONFIG_BLK_DEV_INITRD=y | 5 | CONFIG_BLK_DEV_INITRD=y |
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | # CONFIG_SYSCTL_SYSCALL is not set | 8 | # CONFIG_SYSCTL_SYSCALL is not set |
9 | # CONFIG_HOTPLUG is not set | 9 | # CONFIG_HOTPLUG is not set |
10 | # CONFIG_BUG is not set | 10 | # CONFIG_BUG is not set |
diff --git a/arch/powerpc/configs/mpc7448_hpc2_defconfig b/arch/powerpc/configs/mpc7448_hpc2_defconfig index 3b9470883de..75f0bbf0f6e 100644 --- a/arch/powerpc/configs/mpc7448_hpc2_defconfig +++ b/arch/powerpc/configs/mpc7448_hpc2_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_SYSVIPC=y | |||
4 | CONFIG_LOG_BUF_SHIFT=14 | 4 | CONFIG_LOG_BUF_SHIFT=14 |
5 | CONFIG_BLK_DEV_INITRD=y | 5 | CONFIG_BLK_DEV_INITRD=y |
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | # CONFIG_BLK_DEV_BSG is not set | 8 | # CONFIG_BLK_DEV_BSG is not set |
9 | # CONFIG_PPC_CHRP is not set | 9 | # CONFIG_PPC_CHRP is not set |
10 | # CONFIG_PPC_PMAC is not set | 10 | # CONFIG_PPC_PMAC is not set |
diff --git a/arch/powerpc/configs/mpc8272_ads_defconfig b/arch/powerpc/configs/mpc8272_ads_defconfig index c7d68ff1a73..6a22400f73c 100644 --- a/arch/powerpc/configs/mpc8272_ads_defconfig +++ b/arch/powerpc/configs/mpc8272_ads_defconfig | |||
@@ -2,7 +2,7 @@ CONFIG_SYSVIPC=y | |||
2 | CONFIG_IKCONFIG=y | 2 | CONFIG_IKCONFIG=y |
3 | CONFIG_IKCONFIG_PROC=y | 3 | CONFIG_IKCONFIG_PROC=y |
4 | CONFIG_LOG_BUF_SHIFT=14 | 4 | CONFIG_LOG_BUF_SHIFT=14 |
5 | CONFIG_EMBEDDED=y | 5 | CONFIG_EXPERT=y |
6 | CONFIG_KALLSYMS_ALL=y | 6 | CONFIG_KALLSYMS_ALL=y |
7 | # CONFIG_PPC_CHRP is not set | 7 | # CONFIG_PPC_CHRP is not set |
8 | # CONFIG_PPC_PMAC is not set | 8 | # CONFIG_PPC_PMAC is not set |
diff --git a/arch/powerpc/configs/mpc83xx_defconfig b/arch/powerpc/configs/mpc83xx_defconfig index 5b1b10fd974..5aac9a8bc53 100644 --- a/arch/powerpc/configs/mpc83xx_defconfig +++ b/arch/powerpc/configs/mpc83xx_defconfig | |||
@@ -3,7 +3,7 @@ CONFIG_SYSVIPC=y | |||
3 | CONFIG_LOG_BUF_SHIFT=14 | 3 | CONFIG_LOG_BUF_SHIFT=14 |
4 | CONFIG_BLK_DEV_INITRD=y | 4 | CONFIG_BLK_DEV_INITRD=y |
5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 5 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
6 | CONFIG_EMBEDDED=y | 6 | CONFIG_EXPERT=y |
7 | CONFIG_SLAB=y | 7 | CONFIG_SLAB=y |
8 | CONFIG_MODULES=y | 8 | CONFIG_MODULES=y |
9 | CONFIG_MODULE_UNLOAD=y | 9 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/powerpc/configs/mpc85xx_defconfig b/arch/powerpc/configs/mpc85xx_defconfig index 3aeb5949cfe..99a19d1e9bf 100644 --- a/arch/powerpc/configs/mpc85xx_defconfig +++ b/arch/powerpc/configs/mpc85xx_defconfig | |||
@@ -10,7 +10,7 @@ CONFIG_IKCONFIG_PROC=y | |||
10 | CONFIG_LOG_BUF_SHIFT=14 | 10 | CONFIG_LOG_BUF_SHIFT=14 |
11 | CONFIG_BLK_DEV_INITRD=y | 11 | CONFIG_BLK_DEV_INITRD=y |
12 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 12 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
13 | CONFIG_EMBEDDED=y | 13 | CONFIG_EXPERT=y |
14 | CONFIG_KALLSYMS_ALL=y | 14 | CONFIG_KALLSYMS_ALL=y |
15 | CONFIG_KALLSYMS_EXTRA_PASS=y | 15 | CONFIG_KALLSYMS_EXTRA_PASS=y |
16 | CONFIG_MODULES=y | 16 | CONFIG_MODULES=y |
diff --git a/arch/powerpc/configs/mpc85xx_smp_defconfig b/arch/powerpc/configs/mpc85xx_smp_defconfig index d62c8016f4b..c636f23f8c9 100644 --- a/arch/powerpc/configs/mpc85xx_smp_defconfig +++ b/arch/powerpc/configs/mpc85xx_smp_defconfig | |||
@@ -12,7 +12,7 @@ CONFIG_IKCONFIG_PROC=y | |||
12 | CONFIG_LOG_BUF_SHIFT=14 | 12 | CONFIG_LOG_BUF_SHIFT=14 |
13 | CONFIG_BLK_DEV_INITRD=y | 13 | CONFIG_BLK_DEV_INITRD=y |
14 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 14 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
15 | CONFIG_EMBEDDED=y | 15 | CONFIG_EXPERT=y |
16 | CONFIG_KALLSYMS_ALL=y | 16 | CONFIG_KALLSYMS_ALL=y |
17 | CONFIG_KALLSYMS_EXTRA_PASS=y | 17 | CONFIG_KALLSYMS_EXTRA_PASS=y |
18 | CONFIG_MODULES=y | 18 | CONFIG_MODULES=y |
diff --git a/arch/powerpc/configs/mpc866_ads_defconfig b/arch/powerpc/configs/mpc866_ads_defconfig index 668215cae89..5c258823e69 100644 --- a/arch/powerpc/configs/mpc866_ads_defconfig +++ b/arch/powerpc/configs/mpc866_ads_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_EXPERIMENTAL=y | |||
4 | CONFIG_SYSVIPC=y | 4 | CONFIG_SYSVIPC=y |
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | # CONFIG_SYSCTL_SYSCALL is not set | 8 | # CONFIG_SYSCTL_SYSCALL is not set |
9 | # CONFIG_HOTPLUG is not set | 9 | # CONFIG_HOTPLUG is not set |
10 | # CONFIG_BUG is not set | 10 | # CONFIG_BUG is not set |
diff --git a/arch/powerpc/configs/mpc86xx_defconfig b/arch/powerpc/configs/mpc86xx_defconfig index 63b90d47788..55b54318fef 100644 --- a/arch/powerpc/configs/mpc86xx_defconfig +++ b/arch/powerpc/configs/mpc86xx_defconfig | |||
@@ -10,7 +10,7 @@ CONFIG_IKCONFIG_PROC=y | |||
10 | CONFIG_LOG_BUF_SHIFT=14 | 10 | CONFIG_LOG_BUF_SHIFT=14 |
11 | CONFIG_BLK_DEV_INITRD=y | 11 | CONFIG_BLK_DEV_INITRD=y |
12 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 12 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
13 | CONFIG_EMBEDDED=y | 13 | CONFIG_EXPERT=y |
14 | CONFIG_KALLSYMS_ALL=y | 14 | CONFIG_KALLSYMS_ALL=y |
15 | CONFIG_KALLSYMS_EXTRA_PASS=y | 15 | CONFIG_KALLSYMS_EXTRA_PASS=y |
16 | CONFIG_MODULES=y | 16 | CONFIG_MODULES=y |
diff --git a/arch/powerpc/configs/mpc885_ads_defconfig b/arch/powerpc/configs/mpc885_ads_defconfig index f9b83481b00..9e146cdf63d 100644 --- a/arch/powerpc/configs/mpc885_ads_defconfig +++ b/arch/powerpc/configs/mpc885_ads_defconfig | |||
@@ -4,7 +4,7 @@ CONFIG_EXPERIMENTAL=y | |||
4 | CONFIG_SYSVIPC=y | 4 | CONFIG_SYSVIPC=y |
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 6 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
7 | CONFIG_EMBEDDED=y | 7 | CONFIG_EXPERT=y |
8 | # CONFIG_SYSCTL_SYSCALL is not set | 8 | # CONFIG_SYSCTL_SYSCALL is not set |
9 | # CONFIG_ELF_CORE is not set | 9 | # CONFIG_ELF_CORE is not set |
10 | # CONFIG_BASE_FULL is not set | 10 | # CONFIG_BASE_FULL is not set |
diff --git a/arch/powerpc/configs/ppc40x_defconfig b/arch/powerpc/configs/ppc40x_defconfig index 93d7425ce6c..bfd634b5ada 100644 --- a/arch/powerpc/configs/ppc40x_defconfig +++ b/arch/powerpc/configs/ppc40x_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_POSIX_MQUEUE=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | CONFIG_KALLSYMS_ALL=y | 9 | CONFIG_KALLSYMS_ALL=y |
10 | CONFIG_KALLSYMS_EXTRA_PASS=y | 10 | CONFIG_KALLSYMS_EXTRA_PASS=y |
11 | CONFIG_MODULES=y | 11 | CONFIG_MODULES=y |
diff --git a/arch/powerpc/configs/ppc44x_defconfig b/arch/powerpc/configs/ppc44x_defconfig index 2fa05f7be4c..47133202a62 100644 --- a/arch/powerpc/configs/ppc44x_defconfig +++ b/arch/powerpc/configs/ppc44x_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_POSIX_MQUEUE=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | CONFIG_KALLSYMS_ALL=y | 9 | CONFIG_KALLSYMS_ALL=y |
10 | CONFIG_KALLSYMS_EXTRA_PASS=y | 10 | CONFIG_KALLSYMS_EXTRA_PASS=y |
11 | CONFIG_MODULES=y | 11 | CONFIG_MODULES=y |
diff --git a/arch/powerpc/configs/pq2fads_defconfig b/arch/powerpc/configs/pq2fads_defconfig index a4353bef31c..baad8db21b6 100644 --- a/arch/powerpc/configs/pq2fads_defconfig +++ b/arch/powerpc/configs/pq2fads_defconfig | |||
@@ -3,7 +3,7 @@ CONFIG_IKCONFIG=y | |||
3 | CONFIG_IKCONFIG_PROC=y | 3 | CONFIG_IKCONFIG_PROC=y |
4 | CONFIG_LOG_BUF_SHIFT=14 | 4 | CONFIG_LOG_BUF_SHIFT=14 |
5 | CONFIG_BLK_DEV_INITRD=y | 5 | CONFIG_BLK_DEV_INITRD=y |
6 | CONFIG_EMBEDDED=y | 6 | CONFIG_EXPERT=y |
7 | CONFIG_KALLSYMS_ALL=y | 7 | CONFIG_KALLSYMS_ALL=y |
8 | # CONFIG_PPC_CHRP is not set | 8 | # CONFIG_PPC_CHRP is not set |
9 | # CONFIG_PPC_PMAC is not set | 9 | # CONFIG_PPC_PMAC is not set |
diff --git a/arch/powerpc/configs/ps3_defconfig b/arch/powerpc/configs/ps3_defconfig index 49cffe00365..caba919f65d 100644 --- a/arch/powerpc/configs/ps3_defconfig +++ b/arch/powerpc/configs/ps3_defconfig | |||
@@ -8,7 +8,7 @@ CONFIG_SYSVIPC=y | |||
8 | CONFIG_POSIX_MQUEUE=y | 8 | CONFIG_POSIX_MQUEUE=y |
9 | CONFIG_NAMESPACES=y | 9 | CONFIG_NAMESPACES=y |
10 | CONFIG_BLK_DEV_INITRD=y | 10 | CONFIG_BLK_DEV_INITRD=y |
11 | CONFIG_EMBEDDED=y | 11 | CONFIG_EXPERT=y |
12 | CONFIG_KALLSYMS_EXTRA_PASS=y | 12 | CONFIG_KALLSYMS_EXTRA_PASS=y |
13 | # CONFIG_PERF_EVENTS is not set | 13 | # CONFIG_PERF_EVENTS is not set |
14 | # CONFIG_COMPAT_BRK is not set | 14 | # CONFIG_COMPAT_BRK is not set |
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig index f87f0e15cfa..9c3f22c6cde 100644 --- a/arch/powerpc/configs/pseries_defconfig +++ b/arch/powerpc/configs/pseries_defconfig | |||
@@ -2,7 +2,7 @@ CONFIG_PPC64=y | |||
2 | CONFIG_ALTIVEC=y | 2 | CONFIG_ALTIVEC=y |
3 | CONFIG_VSX=y | 3 | CONFIG_VSX=y |
4 | CONFIG_SMP=y | 4 | CONFIG_SMP=y |
5 | CONFIG_NR_CPUS=128 | 5 | CONFIG_NR_CPUS=1024 |
6 | CONFIG_EXPERIMENTAL=y | 6 | CONFIG_EXPERIMENTAL=y |
7 | CONFIG_SYSVIPC=y | 7 | CONFIG_SYSVIPC=y |
8 | CONFIG_POSIX_MQUEUE=y | 8 | CONFIG_POSIX_MQUEUE=y |
@@ -45,6 +45,8 @@ CONFIG_KEXEC=y | |||
45 | CONFIG_IRQ_ALL_CPUS=y | 45 | CONFIG_IRQ_ALL_CPUS=y |
46 | CONFIG_MEMORY_HOTPLUG=y | 46 | CONFIG_MEMORY_HOTPLUG=y |
47 | CONFIG_MEMORY_HOTREMOVE=y | 47 | CONFIG_MEMORY_HOTREMOVE=y |
48 | CONFIG_PPC_64K_PAGES=y | ||
49 | CONFIG_PPC_SUBPAGE_PROT=y | ||
48 | CONFIG_SCHED_SMT=y | 50 | CONFIG_SCHED_SMT=y |
49 | CONFIG_HOTPLUG_PCI=m | 51 | CONFIG_HOTPLUG_PCI=m |
50 | CONFIG_HOTPLUG_PCI_RPA=m | 52 | CONFIG_HOTPLUG_PCI_RPA=m |
@@ -184,6 +186,7 @@ CONFIG_ACENIC_OMIT_TIGON_I=y | |||
184 | CONFIG_E1000=y | 186 | CONFIG_E1000=y |
185 | CONFIG_E1000E=y | 187 | CONFIG_E1000E=y |
186 | CONFIG_TIGON3=y | 188 | CONFIG_TIGON3=y |
189 | CONFIG_BNX2=m | ||
187 | CONFIG_CHELSIO_T1=m | 190 | CONFIG_CHELSIO_T1=m |
188 | CONFIG_CHELSIO_T3=m | 191 | CONFIG_CHELSIO_T3=m |
189 | CONFIG_EHEA=y | 192 | CONFIG_EHEA=y |
@@ -311,9 +314,7 @@ CONFIG_DEBUG_KERNEL=y | |||
311 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | 314 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set |
312 | CONFIG_LATENCYTOP=y | 315 | CONFIG_LATENCYTOP=y |
313 | CONFIG_SYSCTL_SYSCALL_CHECK=y | 316 | CONFIG_SYSCTL_SYSCALL_CHECK=y |
314 | CONFIG_IRQSOFF_TRACER=y | ||
315 | CONFIG_SCHED_TRACER=y | 317 | CONFIG_SCHED_TRACER=y |
316 | CONFIG_STACK_TRACER=y | ||
317 | CONFIG_BLK_DEV_IO_TRACE=y | 318 | CONFIG_BLK_DEV_IO_TRACE=y |
318 | CONFIG_DEBUG_STACKOVERFLOW=y | 319 | CONFIG_DEBUG_STACKOVERFLOW=y |
319 | CONFIG_DEBUG_STACK_USAGE=y | 320 | CONFIG_DEBUG_STACK_USAGE=y |
diff --git a/arch/powerpc/configs/storcenter_defconfig b/arch/powerpc/configs/storcenter_defconfig index 4f0c10a62b9..ebb2a66c99d 100644 --- a/arch/powerpc/configs/storcenter_defconfig +++ b/arch/powerpc/configs/storcenter_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | 1 | CONFIG_EXPERIMENTAL=y |
2 | CONFIG_SYSVIPC=y | 2 | CONFIG_SYSVIPC=y |
3 | CONFIG_LOG_BUF_SHIFT=14 | 3 | CONFIG_LOG_BUF_SHIFT=14 |
4 | CONFIG_EMBEDDED=y | 4 | CONFIG_EXPERT=y |
5 | # CONFIG_KALLSYMS is not set | 5 | # CONFIG_KALLSYMS is not set |
6 | CONFIG_MODULES=y | 6 | CONFIG_MODULES=y |
7 | CONFIG_MODULE_UNLOAD=y | 7 | CONFIG_MODULE_UNLOAD=y |
diff --git a/arch/powerpc/configs/tqm8xx_defconfig b/arch/powerpc/configs/tqm8xx_defconfig index d0a5b676388..8616fde0896 100644 --- a/arch/powerpc/configs/tqm8xx_defconfig +++ b/arch/powerpc/configs/tqm8xx_defconfig | |||
@@ -5,7 +5,7 @@ CONFIG_SYSVIPC=y | |||
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_SYSFS_DEPRECATED_V2=y | 6 | CONFIG_SYSFS_DEPRECATED_V2=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
8 | CONFIG_EMBEDDED=y | 8 | CONFIG_EXPERT=y |
9 | # CONFIG_SYSCTL_SYSCALL is not set | 9 | # CONFIG_SYSCTL_SYSCALL is not set |
10 | # CONFIG_ELF_CORE is not set | 10 | # CONFIG_ELF_CORE is not set |
11 | # CONFIG_BASE_FULL is not set | 11 | # CONFIG_BASE_FULL is not set |
diff --git a/arch/powerpc/configs/wii_defconfig b/arch/powerpc/configs/wii_defconfig index bb8ba75b7c6..175295fbf4f 100644 --- a/arch/powerpc/configs/wii_defconfig +++ b/arch/powerpc/configs/wii_defconfig | |||
@@ -7,7 +7,7 @@ CONFIG_IKCONFIG_PROC=y | |||
7 | CONFIG_LOG_BUF_SHIFT=14 | 7 | CONFIG_LOG_BUF_SHIFT=14 |
8 | CONFIG_BLK_DEV_INITRD=y | 8 | CONFIG_BLK_DEV_INITRD=y |
9 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 9 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
10 | CONFIG_EMBEDDED=y | 10 | CONFIG_EXPERT=y |
11 | # CONFIG_ELF_CORE is not set | 11 | # CONFIG_ELF_CORE is not set |
12 | CONFIG_PERF_COUNTERS=y | 12 | CONFIG_PERF_COUNTERS=y |
13 | # CONFIG_VM_EVENT_COUNTERS is not set | 13 | # CONFIG_VM_EVENT_COUNTERS is not set |
diff --git a/arch/powerpc/include/asm/feature-fixups.h b/arch/powerpc/include/asm/feature-fixups.h index 96a7d067fbb..921a8470e18 100644 --- a/arch/powerpc/include/asm/feature-fixups.h +++ b/arch/powerpc/include/asm/feature-fixups.h | |||
@@ -37,18 +37,21 @@ label##2: \ | |||
37 | .align 2; \ | 37 | .align 2; \ |
38 | label##3: | 38 | label##3: |
39 | 39 | ||
40 | #define MAKE_FTR_SECTION_ENTRY(msk, val, label, sect) \ | 40 | #define MAKE_FTR_SECTION_ENTRY(msk, val, label, sect) \ |
41 | label##4: \ | 41 | label##4: \ |
42 | .popsection; \ | 42 | .popsection; \ |
43 | .pushsection sect,"a"; \ | 43 | .pushsection sect,"a"; \ |
44 | .align 3; \ | 44 | .align 3; \ |
45 | label##5: \ | 45 | label##5: \ |
46 | FTR_ENTRY_LONG msk; \ | 46 | FTR_ENTRY_LONG msk; \ |
47 | FTR_ENTRY_LONG val; \ | 47 | FTR_ENTRY_LONG val; \ |
48 | FTR_ENTRY_OFFSET label##1b-label##5b; \ | 48 | FTR_ENTRY_OFFSET label##1b-label##5b; \ |
49 | FTR_ENTRY_OFFSET label##2b-label##5b; \ | 49 | FTR_ENTRY_OFFSET label##2b-label##5b; \ |
50 | FTR_ENTRY_OFFSET label##3b-label##5b; \ | 50 | FTR_ENTRY_OFFSET label##3b-label##5b; \ |
51 | FTR_ENTRY_OFFSET label##4b-label##5b; \ | 51 | FTR_ENTRY_OFFSET label##4b-label##5b; \ |
52 | .ifgt (label##4b-label##3b)-(label##2b-label##1b); \ | ||
53 | .error "Feature section else case larger than body"; \ | ||
54 | .endif; \ | ||
52 | .popsection; | 55 | .popsection; |
53 | 56 | ||
54 | 57 | ||
diff --git a/arch/powerpc/include/asm/immap_qe.h b/arch/powerpc/include/asm/immap_qe.h index 4e10f508570..0edb6842b13 100644 --- a/arch/powerpc/include/asm/immap_qe.h +++ b/arch/powerpc/include/asm/immap_qe.h | |||
@@ -467,13 +467,22 @@ struct qe_immap { | |||
467 | extern struct qe_immap __iomem *qe_immr; | 467 | extern struct qe_immap __iomem *qe_immr; |
468 | extern phys_addr_t get_qe_base(void); | 468 | extern phys_addr_t get_qe_base(void); |
469 | 469 | ||
470 | static inline unsigned long immrbar_virt_to_phys(void *address) | 470 | /* |
471 | * Returns the offset within the QE address space of the given pointer. | ||
472 | * | ||
473 | * Note that the QE does not support 36-bit physical addresses, so if | ||
474 | * get_qe_base() returns a number above 4GB, the caller will probably fail. | ||
475 | */ | ||
476 | static inline phys_addr_t immrbar_virt_to_phys(void *address) | ||
471 | { | 477 | { |
472 | if ( ((u32)address >= (u32)qe_immr) && | 478 | void *q = (void *)qe_immr; |
473 | ((u32)address < ((u32)qe_immr + QE_IMMAP_SIZE)) ) | 479 | |
474 | return (unsigned long)(address - (u32)qe_immr + | 480 | /* Is it a MURAM address? */ |
475 | (u32)get_qe_base()); | 481 | if ((address >= q) && (address < (q + QE_IMMAP_SIZE))) |
476 | return (unsigned long)virt_to_phys(address); | 482 | return get_qe_base() + (address - q); |
483 | |||
484 | /* It's an address returned by kmalloc */ | ||
485 | return virt_to_phys(address); | ||
477 | } | 486 | } |
478 | 487 | ||
479 | #endif /* __KERNEL__ */ | 488 | #endif /* __KERNEL__ */ |
diff --git a/arch/powerpc/include/asm/irqflags.h b/arch/powerpc/include/asm/irqflags.h index b85d8ddbb66..b0b06d85788 100644 --- a/arch/powerpc/include/asm/irqflags.h +++ b/arch/powerpc/include/asm/irqflags.h | |||
@@ -12,24 +12,44 @@ | |||
12 | 12 | ||
13 | #else | 13 | #else |
14 | #ifdef CONFIG_TRACE_IRQFLAGS | 14 | #ifdef CONFIG_TRACE_IRQFLAGS |
15 | #ifdef CONFIG_IRQSOFF_TRACER | ||
16 | /* | ||
17 | * Since the ftrace irqsoff latency trace checks CALLER_ADDR1, | ||
18 | * which is the stack frame here, we need to force a stack frame | ||
19 | * in case we came from user space. | ||
20 | */ | ||
21 | #define TRACE_WITH_FRAME_BUFFER(func) \ | ||
22 | mflr r0; \ | ||
23 | stdu r1, -32(r1); \ | ||
24 | std r0, 16(r1); \ | ||
25 | stdu r1, -32(r1); \ | ||
26 | bl func; \ | ||
27 | ld r1, 0(r1); \ | ||
28 | ld r1, 0(r1); | ||
29 | #else | ||
30 | #define TRACE_WITH_FRAME_BUFFER(func) \ | ||
31 | bl func; | ||
32 | #endif | ||
33 | |||
15 | /* | 34 | /* |
16 | * Most of the CPU's IRQ-state tracing is done from assembly code; we | 35 | * Most of the CPU's IRQ-state tracing is done from assembly code; we |
17 | * have to call a C function so call a wrapper that saves all the | 36 | * have to call a C function so call a wrapper that saves all the |
18 | * C-clobbered registers. | 37 | * C-clobbered registers. |
19 | */ | 38 | */ |
20 | #define TRACE_ENABLE_INTS bl .trace_hardirqs_on | 39 | #define TRACE_ENABLE_INTS TRACE_WITH_FRAME_BUFFER(.trace_hardirqs_on) |
21 | #define TRACE_DISABLE_INTS bl .trace_hardirqs_off | 40 | #define TRACE_DISABLE_INTS TRACE_WITH_FRAME_BUFFER(.trace_hardirqs_off) |
22 | #define TRACE_AND_RESTORE_IRQ_PARTIAL(en,skip) \ | 41 | |
23 | cmpdi en,0; \ | 42 | #define TRACE_AND_RESTORE_IRQ_PARTIAL(en,skip) \ |
24 | bne 95f; \ | 43 | cmpdi en,0; \ |
25 | stb en,PACASOFTIRQEN(r13); \ | 44 | bne 95f; \ |
26 | bl .trace_hardirqs_off; \ | 45 | stb en,PACASOFTIRQEN(r13); \ |
27 | b skip; \ | 46 | TRACE_WITH_FRAME_BUFFER(.trace_hardirqs_off) \ |
28 | 95: bl .trace_hardirqs_on; \ | 47 | b skip; \ |
48 | 95: TRACE_WITH_FRAME_BUFFER(.trace_hardirqs_on) \ | ||
29 | li en,1; | 49 | li en,1; |
30 | #define TRACE_AND_RESTORE_IRQ(en) \ | 50 | #define TRACE_AND_RESTORE_IRQ(en) \ |
31 | TRACE_AND_RESTORE_IRQ_PARTIAL(en,96f); \ | 51 | TRACE_AND_RESTORE_IRQ_PARTIAL(en,96f); \ |
32 | stb en,PACASOFTIRQEN(r13); \ | 52 | stb en,PACASOFTIRQEN(r13); \ |
33 | 96: | 53 | 96: |
34 | #else | 54 | #else |
35 | #define TRACE_ENABLE_INTS | 55 | #define TRACE_ENABLE_INTS |
diff --git a/arch/powerpc/include/asm/machdep.h b/arch/powerpc/include/asm/machdep.h index 8433d36619a..991d5998d6b 100644 --- a/arch/powerpc/include/asm/machdep.h +++ b/arch/powerpc/include/asm/machdep.h | |||
@@ -116,9 +116,6 @@ struct machdep_calls { | |||
116 | * If for some reason there is no irq, but the interrupt | 116 | * If for some reason there is no irq, but the interrupt |
117 | * shouldn't be counted as spurious, return NO_IRQ_IGNORE. */ | 117 | * shouldn't be counted as spurious, return NO_IRQ_IGNORE. */ |
118 | unsigned int (*get_irq)(void); | 118 | unsigned int (*get_irq)(void); |
119 | #ifdef CONFIG_KEXEC | ||
120 | void (*kexec_cpu_down)(int crash_shutdown, int secondary); | ||
121 | #endif | ||
122 | 119 | ||
123 | /* PCI stuff */ | 120 | /* PCI stuff */ |
124 | /* Called after scanning the bus, before allocating resources */ | 121 | /* Called after scanning the bus, before allocating resources */ |
@@ -235,11 +232,7 @@ struct machdep_calls { | |||
235 | void (*machine_shutdown)(void); | 232 | void (*machine_shutdown)(void); |
236 | 233 | ||
237 | #ifdef CONFIG_KEXEC | 234 | #ifdef CONFIG_KEXEC |
238 | /* Called to do the minimal shutdown needed to run a kexec'd kernel | 235 | void (*kexec_cpu_down)(int crash_shutdown, int secondary); |
239 | * to run successfully. | ||
240 | * XXX Should we move this one out of kexec scope? | ||
241 | */ | ||
242 | void (*machine_crash_shutdown)(struct pt_regs *regs); | ||
243 | 236 | ||
244 | /* Called to do what every setup is needed on image and the | 237 | /* Called to do what every setup is needed on image and the |
245 | * reboot code buffer. Returns 0 on success. | 238 | * reboot code buffer. Returns 0 on success. |
@@ -247,15 +240,6 @@ struct machdep_calls { | |||
247 | * claims to support kexec. | 240 | * claims to support kexec. |
248 | */ | 241 | */ |
249 | int (*machine_kexec_prepare)(struct kimage *image); | 242 | int (*machine_kexec_prepare)(struct kimage *image); |
250 | |||
251 | /* Called to handle any machine specific cleanup on image */ | ||
252 | void (*machine_kexec_cleanup)(struct kimage *image); | ||
253 | |||
254 | /* Called to perform the _real_ kexec. | ||
255 | * Do NOT allocate memory or fail here. We are past the point of | ||
256 | * no return. | ||
257 | */ | ||
258 | void (*machine_kexec)(struct kimage *image); | ||
259 | #endif /* CONFIG_KEXEC */ | 243 | #endif /* CONFIG_KEXEC */ |
260 | 244 | ||
261 | #ifdef CONFIG_SUSPEND | 245 | #ifdef CONFIG_SUSPEND |
diff --git a/arch/powerpc/include/asm/mmu-book3e.h b/arch/powerpc/include/asm/mmu-book3e.h index 8eaed81ea64..17194fcd404 100644 --- a/arch/powerpc/include/asm/mmu-book3e.h +++ b/arch/powerpc/include/asm/mmu-book3e.h | |||
@@ -40,8 +40,8 @@ | |||
40 | 40 | ||
41 | /* MAS registers bit definitions */ | 41 | /* MAS registers bit definitions */ |
42 | 42 | ||
43 | #define MAS0_TLBSEL(x) ((x << 28) & 0x30000000) | 43 | #define MAS0_TLBSEL(x) (((x) << 28) & 0x30000000) |
44 | #define MAS0_ESEL(x) ((x << 16) & 0x0FFF0000) | 44 | #define MAS0_ESEL(x) (((x) << 16) & 0x0FFF0000) |
45 | #define MAS0_NV(x) ((x) & 0x00000FFF) | 45 | #define MAS0_NV(x) ((x) & 0x00000FFF) |
46 | #define MAS0_HES 0x00004000 | 46 | #define MAS0_HES 0x00004000 |
47 | #define MAS0_WQ_ALLWAYS 0x00000000 | 47 | #define MAS0_WQ_ALLWAYS 0x00000000 |
@@ -50,12 +50,12 @@ | |||
50 | 50 | ||
51 | #define MAS1_VALID 0x80000000 | 51 | #define MAS1_VALID 0x80000000 |
52 | #define MAS1_IPROT 0x40000000 | 52 | #define MAS1_IPROT 0x40000000 |
53 | #define MAS1_TID(x) ((x << 16) & 0x3FFF0000) | 53 | #define MAS1_TID(x) (((x) << 16) & 0x3FFF0000) |
54 | #define MAS1_IND 0x00002000 | 54 | #define MAS1_IND 0x00002000 |
55 | #define MAS1_TS 0x00001000 | 55 | #define MAS1_TS 0x00001000 |
56 | #define MAS1_TSIZE_MASK 0x00000f80 | 56 | #define MAS1_TSIZE_MASK 0x00000f80 |
57 | #define MAS1_TSIZE_SHIFT 7 | 57 | #define MAS1_TSIZE_SHIFT 7 |
58 | #define MAS1_TSIZE(x) ((x << MAS1_TSIZE_SHIFT) & MAS1_TSIZE_MASK) | 58 | #define MAS1_TSIZE(x) (((x) << MAS1_TSIZE_SHIFT) & MAS1_TSIZE_MASK) |
59 | 59 | ||
60 | #define MAS2_EPN 0xFFFFF000 | 60 | #define MAS2_EPN 0xFFFFF000 |
61 | #define MAS2_X0 0x00000040 | 61 | #define MAS2_X0 0x00000040 |
diff --git a/arch/powerpc/include/asm/page.h b/arch/powerpc/include/asm/page.h index 53b64be40eb..da4b2000854 100644 --- a/arch/powerpc/include/asm/page.h +++ b/arch/powerpc/include/asm/page.h | |||
@@ -101,7 +101,7 @@ extern phys_addr_t kernstart_addr; | |||
101 | 101 | ||
102 | #ifdef CONFIG_FLATMEM | 102 | #ifdef CONFIG_FLATMEM |
103 | #define ARCH_PFN_OFFSET (MEMORY_START >> PAGE_SHIFT) | 103 | #define ARCH_PFN_OFFSET (MEMORY_START >> PAGE_SHIFT) |
104 | #define pfn_valid(pfn) ((pfn) >= ARCH_PFN_OFFSET && (pfn) < (ARCH_PFN_OFFSET + max_mapnr)) | 104 | #define pfn_valid(pfn) ((pfn) >= ARCH_PFN_OFFSET && (pfn) < max_mapnr) |
105 | #endif | 105 | #endif |
106 | 106 | ||
107 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) | 107 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) |
diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index ff0005eec7d..125fc1ad665 100644 --- a/arch/powerpc/include/asm/reg.h +++ b/arch/powerpc/include/asm/reg.h | |||
@@ -283,6 +283,7 @@ | |||
283 | #define HID0_NOPTI (1<<0) /* No-op dcbt and dcbst instr. */ | 283 | #define HID0_NOPTI (1<<0) /* No-op dcbt and dcbst instr. */ |
284 | 284 | ||
285 | #define SPRN_HID1 0x3F1 /* Hardware Implementation Register 1 */ | 285 | #define SPRN_HID1 0x3F1 /* Hardware Implementation Register 1 */ |
286 | #ifdef CONFIG_6xx | ||
286 | #define HID1_EMCP (1<<31) /* 7450 Machine Check Pin Enable */ | 287 | #define HID1_EMCP (1<<31) /* 7450 Machine Check Pin Enable */ |
287 | #define HID1_DFS (1<<22) /* 7447A Dynamic Frequency Scaling */ | 288 | #define HID1_DFS (1<<22) /* 7447A Dynamic Frequency Scaling */ |
288 | #define HID1_PC0 (1<<16) /* 7450 PLL_CFG[0] */ | 289 | #define HID1_PC0 (1<<16) /* 7450 PLL_CFG[0] */ |
@@ -292,6 +293,7 @@ | |||
292 | #define HID1_SYNCBE (1<<11) /* 7450 ABE for sync, eieio */ | 293 | #define HID1_SYNCBE (1<<11) /* 7450 ABE for sync, eieio */ |
293 | #define HID1_ABE (1<<10) /* 7450 Address Broadcast Enable */ | 294 | #define HID1_ABE (1<<10) /* 7450 Address Broadcast Enable */ |
294 | #define HID1_PS (1<<16) /* 750FX PLL selection */ | 295 | #define HID1_PS (1<<16) /* 750FX PLL selection */ |
296 | #endif | ||
295 | #define SPRN_HID2 0x3F8 /* Hardware Implementation Register 2 */ | 297 | #define SPRN_HID2 0x3F8 /* Hardware Implementation Register 2 */ |
296 | #define SPRN_HID2_GEKKO 0x398 /* Gekko HID2 Register */ | 298 | #define SPRN_HID2_GEKKO 0x398 /* Gekko HID2 Register */ |
297 | #define SPRN_IABR 0x3F2 /* Instruction Address Breakpoint Register */ | 299 | #define SPRN_IABR 0x3F2 /* Instruction Address Breakpoint Register */ |
diff --git a/arch/powerpc/include/asm/reg_booke.h b/arch/powerpc/include/asm/reg_booke.h index 667a498eaee..e68c69bf741 100644 --- a/arch/powerpc/include/asm/reg_booke.h +++ b/arch/powerpc/include/asm/reg_booke.h | |||
@@ -246,6 +246,20 @@ | |||
246 | store or cache line push */ | 246 | store or cache line push */ |
247 | #endif | 247 | #endif |
248 | 248 | ||
249 | /* Bit definitions for the HID1 */ | ||
250 | #ifdef CONFIG_E500 | ||
251 | /* e500v1/v2 */ | ||
252 | #define HID1_PLL_CFG_MASK 0xfc000000 /* PLL_CFG input pins */ | ||
253 | #define HID1_RFXE 0x00020000 /* Read fault exception enable */ | ||
254 | #define HID1_R1DPE 0x00008000 /* R1 data bus parity enable */ | ||
255 | #define HID1_R2DPE 0x00004000 /* R2 data bus parity enable */ | ||
256 | #define HID1_ASTME 0x00002000 /* Address bus streaming mode enable */ | ||
257 | #define HID1_ABE 0x00001000 /* Address broadcast enable */ | ||
258 | #define HID1_MPXTT 0x00000400 /* MPX re-map transfer type */ | ||
259 | #define HID1_ATS 0x00000080 /* Atomic status */ | ||
260 | #define HID1_MID_MASK 0x0000000f /* MID input pins */ | ||
261 | #endif | ||
262 | |||
249 | /* Bit definitions for the DBSR. */ | 263 | /* Bit definitions for the DBSR. */ |
250 | /* | 264 | /* |
251 | * DBSR bits which have conflicting definitions on true Book E versus IBM 40x. | 265 | * DBSR bits which have conflicting definitions on true Book E versus IBM 40x. |
diff --git a/arch/powerpc/include/asm/spu.h b/arch/powerpc/include/asm/spu.h index 0ab8d869e3d..0c8b35d7523 100644 --- a/arch/powerpc/include/asm/spu.h +++ b/arch/powerpc/include/asm/spu.h | |||
@@ -203,14 +203,6 @@ void spu_irq_setaffinity(struct spu *spu, int cpu); | |||
203 | void spu_setup_kernel_slbs(struct spu *spu, struct spu_lscsa *lscsa, | 203 | void spu_setup_kernel_slbs(struct spu *spu, struct spu_lscsa *lscsa, |
204 | void *code, int code_size); | 204 | void *code, int code_size); |
205 | 205 | ||
206 | #ifdef CONFIG_KEXEC | ||
207 | void crash_register_spus(struct list_head *list); | ||
208 | #else | ||
209 | static inline void crash_register_spus(struct list_head *list) | ||
210 | { | ||
211 | } | ||
212 | #endif | ||
213 | |||
214 | extern void spu_invalidate_slbs(struct spu *spu); | 206 | extern void spu_invalidate_slbs(struct spu *spu); |
215 | extern void spu_associate_mm(struct spu *spu, struct mm_struct *mm); | 207 | extern void spu_associate_mm(struct spu *spu, struct mm_struct *mm); |
216 | int spu_64k_pages_available(void); | 208 | int spu_64k_pages_available(void); |
diff --git a/arch/powerpc/kernel/cpu_setup_6xx.S b/arch/powerpc/kernel/cpu_setup_6xx.S index 55cba4a8a95..f8cd9fba4d3 100644 --- a/arch/powerpc/kernel/cpu_setup_6xx.S +++ b/arch/powerpc/kernel/cpu_setup_6xx.S | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <asm/mmu.h> | 18 | #include <asm/mmu.h> |
19 | 19 | ||
20 | _GLOBAL(__setup_cpu_603) | 20 | _GLOBAL(__setup_cpu_603) |
21 | mflr r4 | 21 | mflr r5 |
22 | BEGIN_MMU_FTR_SECTION | 22 | BEGIN_MMU_FTR_SECTION |
23 | li r10,0 | 23 | li r10,0 |
24 | mtspr SPRN_SPRG_603_LRU,r10 /* init SW LRU tracking */ | 24 | mtspr SPRN_SPRG_603_LRU,r10 /* init SW LRU tracking */ |
@@ -27,60 +27,60 @@ BEGIN_FTR_SECTION | |||
27 | bl __init_fpu_registers | 27 | bl __init_fpu_registers |
28 | END_FTR_SECTION_IFCLR(CPU_FTR_FPU_UNAVAILABLE) | 28 | END_FTR_SECTION_IFCLR(CPU_FTR_FPU_UNAVAILABLE) |
29 | bl setup_common_caches | 29 | bl setup_common_caches |
30 | mtlr r4 | 30 | mtlr r5 |
31 | blr | 31 | blr |
32 | _GLOBAL(__setup_cpu_604) | 32 | _GLOBAL(__setup_cpu_604) |
33 | mflr r4 | 33 | mflr r5 |
34 | bl setup_common_caches | 34 | bl setup_common_caches |
35 | bl setup_604_hid0 | 35 | bl setup_604_hid0 |
36 | mtlr r4 | 36 | mtlr r5 |
37 | blr | 37 | blr |
38 | _GLOBAL(__setup_cpu_750) | 38 | _GLOBAL(__setup_cpu_750) |
39 | mflr r4 | 39 | mflr r5 |
40 | bl __init_fpu_registers | 40 | bl __init_fpu_registers |
41 | bl setup_common_caches | 41 | bl setup_common_caches |
42 | bl setup_750_7400_hid0 | 42 | bl setup_750_7400_hid0 |
43 | mtlr r4 | 43 | mtlr r5 |
44 | blr | 44 | blr |
45 | _GLOBAL(__setup_cpu_750cx) | 45 | _GLOBAL(__setup_cpu_750cx) |
46 | mflr r4 | 46 | mflr r5 |
47 | bl __init_fpu_registers | 47 | bl __init_fpu_registers |
48 | bl setup_common_caches | 48 | bl setup_common_caches |
49 | bl setup_750_7400_hid0 | 49 | bl setup_750_7400_hid0 |
50 | bl setup_750cx | 50 | bl setup_750cx |
51 | mtlr r4 | 51 | mtlr r5 |
52 | blr | 52 | blr |
53 | _GLOBAL(__setup_cpu_750fx) | 53 | _GLOBAL(__setup_cpu_750fx) |
54 | mflr r4 | 54 | mflr r5 |
55 | bl __init_fpu_registers | 55 | bl __init_fpu_registers |
56 | bl setup_common_caches | 56 | bl setup_common_caches |
57 | bl setup_750_7400_hid0 | 57 | bl setup_750_7400_hid0 |
58 | bl setup_750fx | 58 | bl setup_750fx |
59 | mtlr r4 | 59 | mtlr r5 |
60 | blr | 60 | blr |
61 | _GLOBAL(__setup_cpu_7400) | 61 | _GLOBAL(__setup_cpu_7400) |
62 | mflr r4 | 62 | mflr r5 |
63 | bl __init_fpu_registers | 63 | bl __init_fpu_registers |
64 | bl setup_7400_workarounds | 64 | bl setup_7400_workarounds |
65 | bl setup_common_caches | 65 | bl setup_common_caches |
66 | bl setup_750_7400_hid0 | 66 | bl setup_750_7400_hid0 |
67 | mtlr r4 | 67 | mtlr r5 |
68 | blr | 68 | blr |
69 | _GLOBAL(__setup_cpu_7410) | 69 | _GLOBAL(__setup_cpu_7410) |
70 | mflr r4 | 70 | mflr r5 |
71 | bl __init_fpu_registers | 71 | bl __init_fpu_registers |
72 | bl setup_7410_workarounds | 72 | bl setup_7410_workarounds |
73 | bl setup_common_caches | 73 | bl setup_common_caches |
74 | bl setup_750_7400_hid0 | 74 | bl setup_750_7400_hid0 |
75 | li r3,0 | 75 | li r3,0 |
76 | mtspr SPRN_L2CR2,r3 | 76 | mtspr SPRN_L2CR2,r3 |
77 | mtlr r4 | 77 | mtlr r5 |
78 | blr | 78 | blr |
79 | _GLOBAL(__setup_cpu_745x) | 79 | _GLOBAL(__setup_cpu_745x) |
80 | mflr r4 | 80 | mflr r5 |
81 | bl setup_common_caches | 81 | bl setup_common_caches |
82 | bl setup_745x_specifics | 82 | bl setup_745x_specifics |
83 | mtlr r4 | 83 | mtlr r5 |
84 | blr | 84 | blr |
85 | 85 | ||
86 | /* Enable caches for 603's, 604, 750 & 7400 */ | 86 | /* Enable caches for 603's, 604, 750 & 7400 */ |
@@ -194,10 +194,10 @@ setup_750cx: | |||
194 | cror 4*cr0+eq,4*cr0+eq,4*cr1+eq | 194 | cror 4*cr0+eq,4*cr0+eq,4*cr1+eq |
195 | cror 4*cr0+eq,4*cr0+eq,4*cr2+eq | 195 | cror 4*cr0+eq,4*cr0+eq,4*cr2+eq |
196 | bnelr | 196 | bnelr |
197 | lwz r6,CPU_SPEC_FEATURES(r5) | 197 | lwz r6,CPU_SPEC_FEATURES(r4) |
198 | li r7,CPU_FTR_CAN_NAP | 198 | li r7,CPU_FTR_CAN_NAP |
199 | andc r6,r6,r7 | 199 | andc r6,r6,r7 |
200 | stw r6,CPU_SPEC_FEATURES(r5) | 200 | stw r6,CPU_SPEC_FEATURES(r4) |
201 | blr | 201 | blr |
202 | 202 | ||
203 | /* 750fx specific | 203 | /* 750fx specific |
@@ -225,12 +225,12 @@ BEGIN_FTR_SECTION | |||
225 | andis. r11,r11,L3CR_L3E@h | 225 | andis. r11,r11,L3CR_L3E@h |
226 | beq 1f | 226 | beq 1f |
227 | END_FTR_SECTION_IFSET(CPU_FTR_L3CR) | 227 | END_FTR_SECTION_IFSET(CPU_FTR_L3CR) |
228 | lwz r6,CPU_SPEC_FEATURES(r5) | 228 | lwz r6,CPU_SPEC_FEATURES(r4) |
229 | andi. r0,r6,CPU_FTR_L3_DISABLE_NAP | 229 | andi. r0,r6,CPU_FTR_L3_DISABLE_NAP |
230 | beq 1f | 230 | beq 1f |
231 | li r7,CPU_FTR_CAN_NAP | 231 | li r7,CPU_FTR_CAN_NAP |
232 | andc r6,r6,r7 | 232 | andc r6,r6,r7 |
233 | stw r6,CPU_SPEC_FEATURES(r5) | 233 | stw r6,CPU_SPEC_FEATURES(r4) |
234 | 1: | 234 | 1: |
235 | mfspr r11,SPRN_HID0 | 235 | mfspr r11,SPRN_HID0 |
236 | 236 | ||
diff --git a/arch/powerpc/kernel/cpu_setup_fsl_booke.S b/arch/powerpc/kernel/cpu_setup_fsl_booke.S index 894e64fa481..5c518ad3445 100644 --- a/arch/powerpc/kernel/cpu_setup_fsl_booke.S +++ b/arch/powerpc/kernel/cpu_setup_fsl_booke.S | |||
@@ -64,6 +64,12 @@ _GLOBAL(__setup_cpu_e500v2) | |||
64 | bl __e500_icache_setup | 64 | bl __e500_icache_setup |
65 | bl __e500_dcache_setup | 65 | bl __e500_dcache_setup |
66 | bl __setup_e500_ivors | 66 | bl __setup_e500_ivors |
67 | #ifdef CONFIG_RAPIDIO | ||
68 | /* Ensure that RFXE is set */ | ||
69 | mfspr r3,SPRN_HID1 | ||
70 | oris r3,r3,HID1_RFXE@h | ||
71 | mtspr SPRN_HID1,r3 | ||
72 | #endif | ||
67 | mtlr r4 | 73 | mtlr r4 |
68 | blr | 74 | blr |
69 | _GLOBAL(__setup_cpu_e500mc) | 75 | _GLOBAL(__setup_cpu_e500mc) |
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index be5ab18b03b..e8e915ce3d8 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c | |||
@@ -116,7 +116,6 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
116 | .pmc_type = PPC_PMC_IBM, | 116 | .pmc_type = PPC_PMC_IBM, |
117 | .oprofile_cpu_type = "ppc64/power3", | 117 | .oprofile_cpu_type = "ppc64/power3", |
118 | .oprofile_type = PPC_OPROFILE_RS64, | 118 | .oprofile_type = PPC_OPROFILE_RS64, |
119 | .machine_check = machine_check_generic, | ||
120 | .platform = "power3", | 119 | .platform = "power3", |
121 | }, | 120 | }, |
122 | { /* Power3+ */ | 121 | { /* Power3+ */ |
@@ -132,7 +131,6 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
132 | .pmc_type = PPC_PMC_IBM, | 131 | .pmc_type = PPC_PMC_IBM, |
133 | .oprofile_cpu_type = "ppc64/power3", | 132 | .oprofile_cpu_type = "ppc64/power3", |
134 | .oprofile_type = PPC_OPROFILE_RS64, | 133 | .oprofile_type = PPC_OPROFILE_RS64, |
135 | .machine_check = machine_check_generic, | ||
136 | .platform = "power3", | 134 | .platform = "power3", |
137 | }, | 135 | }, |
138 | { /* Northstar */ | 136 | { /* Northstar */ |
@@ -148,7 +146,6 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
148 | .pmc_type = PPC_PMC_IBM, | 146 | .pmc_type = PPC_PMC_IBM, |
149 | .oprofile_cpu_type = "ppc64/rs64", | 147 | .oprofile_cpu_type = "ppc64/rs64", |
150 | .oprofile_type = PPC_OPROFILE_RS64, | 148 | .oprofile_type = PPC_OPROFILE_RS64, |
151 | .machine_check = machine_check_generic, | ||
152 | .platform = "rs64", | 149 | .platform = "rs64", |
153 | }, | 150 | }, |
154 | { /* Pulsar */ | 151 | { /* Pulsar */ |
@@ -164,7 +161,6 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
164 | .pmc_type = PPC_PMC_IBM, | 161 | .pmc_type = PPC_PMC_IBM, |
165 | .oprofile_cpu_type = "ppc64/rs64", | 162 | .oprofile_cpu_type = "ppc64/rs64", |
166 | .oprofile_type = PPC_OPROFILE_RS64, | 163 | .oprofile_type = PPC_OPROFILE_RS64, |
167 | .machine_check = machine_check_generic, | ||
168 | .platform = "rs64", | 164 | .platform = "rs64", |
169 | }, | 165 | }, |
170 | { /* I-star */ | 166 | { /* I-star */ |
@@ -180,7 +176,6 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
180 | .pmc_type = PPC_PMC_IBM, | 176 | .pmc_type = PPC_PMC_IBM, |
181 | .oprofile_cpu_type = "ppc64/rs64", | 177 | .oprofile_cpu_type = "ppc64/rs64", |
182 | .oprofile_type = PPC_OPROFILE_RS64, | 178 | .oprofile_type = PPC_OPROFILE_RS64, |
183 | .machine_check = machine_check_generic, | ||
184 | .platform = "rs64", | 179 | .platform = "rs64", |
185 | }, | 180 | }, |
186 | { /* S-star */ | 181 | { /* S-star */ |
@@ -196,7 +191,6 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
196 | .pmc_type = PPC_PMC_IBM, | 191 | .pmc_type = PPC_PMC_IBM, |
197 | .oprofile_cpu_type = "ppc64/rs64", | 192 | .oprofile_cpu_type = "ppc64/rs64", |
198 | .oprofile_type = PPC_OPROFILE_RS64, | 193 | .oprofile_type = PPC_OPROFILE_RS64, |
199 | .machine_check = machine_check_generic, | ||
200 | .platform = "rs64", | 194 | .platform = "rs64", |
201 | }, | 195 | }, |
202 | { /* Power4 */ | 196 | { /* Power4 */ |
@@ -212,7 +206,6 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
212 | .pmc_type = PPC_PMC_IBM, | 206 | .pmc_type = PPC_PMC_IBM, |
213 | .oprofile_cpu_type = "ppc64/power4", | 207 | .oprofile_cpu_type = "ppc64/power4", |
214 | .oprofile_type = PPC_OPROFILE_POWER4, | 208 | .oprofile_type = PPC_OPROFILE_POWER4, |
215 | .machine_check = machine_check_generic, | ||
216 | .platform = "power4", | 209 | .platform = "power4", |
217 | }, | 210 | }, |
218 | { /* Power4+ */ | 211 | { /* Power4+ */ |
@@ -228,7 +221,6 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
228 | .pmc_type = PPC_PMC_IBM, | 221 | .pmc_type = PPC_PMC_IBM, |
229 | .oprofile_cpu_type = "ppc64/power4", | 222 | .oprofile_cpu_type = "ppc64/power4", |
230 | .oprofile_type = PPC_OPROFILE_POWER4, | 223 | .oprofile_type = PPC_OPROFILE_POWER4, |
231 | .machine_check = machine_check_generic, | ||
232 | .platform = "power4", | 224 | .platform = "power4", |
233 | }, | 225 | }, |
234 | { /* PPC970 */ | 226 | { /* PPC970 */ |
@@ -247,7 +239,6 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
247 | .cpu_restore = __restore_cpu_ppc970, | 239 | .cpu_restore = __restore_cpu_ppc970, |
248 | .oprofile_cpu_type = "ppc64/970", | 240 | .oprofile_cpu_type = "ppc64/970", |
249 | .oprofile_type = PPC_OPROFILE_POWER4, | 241 | .oprofile_type = PPC_OPROFILE_POWER4, |
250 | .machine_check = machine_check_generic, | ||
251 | .platform = "ppc970", | 242 | .platform = "ppc970", |
252 | }, | 243 | }, |
253 | { /* PPC970FX */ | 244 | { /* PPC970FX */ |
@@ -266,7 +257,6 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
266 | .cpu_restore = __restore_cpu_ppc970, | 257 | .cpu_restore = __restore_cpu_ppc970, |
267 | .oprofile_cpu_type = "ppc64/970", | 258 | .oprofile_cpu_type = "ppc64/970", |
268 | .oprofile_type = PPC_OPROFILE_POWER4, | 259 | .oprofile_type = PPC_OPROFILE_POWER4, |
269 | .machine_check = machine_check_generic, | ||
270 | .platform = "ppc970", | 260 | .platform = "ppc970", |
271 | }, | 261 | }, |
272 | { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */ | 262 | { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */ |
@@ -285,7 +275,6 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
285 | .cpu_restore = __restore_cpu_ppc970, | 275 | .cpu_restore = __restore_cpu_ppc970, |
286 | .oprofile_cpu_type = "ppc64/970MP", | 276 | .oprofile_cpu_type = "ppc64/970MP", |
287 | .oprofile_type = PPC_OPROFILE_POWER4, | 277 | .oprofile_type = PPC_OPROFILE_POWER4, |
288 | .machine_check = machine_check_generic, | ||
289 | .platform = "ppc970", | 278 | .platform = "ppc970", |
290 | }, | 279 | }, |
291 | { /* PPC970MP */ | 280 | { /* PPC970MP */ |
@@ -304,7 +293,6 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
304 | .cpu_restore = __restore_cpu_ppc970, | 293 | .cpu_restore = __restore_cpu_ppc970, |
305 | .oprofile_cpu_type = "ppc64/970MP", | 294 | .oprofile_cpu_type = "ppc64/970MP", |
306 | .oprofile_type = PPC_OPROFILE_POWER4, | 295 | .oprofile_type = PPC_OPROFILE_POWER4, |
307 | .machine_check = machine_check_generic, | ||
308 | .platform = "ppc970", | 296 | .platform = "ppc970", |
309 | }, | 297 | }, |
310 | { /* PPC970GX */ | 298 | { /* PPC970GX */ |
@@ -322,7 +310,6 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
322 | .cpu_setup = __setup_cpu_ppc970, | 310 | .cpu_setup = __setup_cpu_ppc970, |
323 | .oprofile_cpu_type = "ppc64/970", | 311 | .oprofile_cpu_type = "ppc64/970", |
324 | .oprofile_type = PPC_OPROFILE_POWER4, | 312 | .oprofile_type = PPC_OPROFILE_POWER4, |
325 | .machine_check = machine_check_generic, | ||
326 | .platform = "ppc970", | 313 | .platform = "ppc970", |
327 | }, | 314 | }, |
328 | { /* Power5 GR */ | 315 | { /* Power5 GR */ |
@@ -343,7 +330,6 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
343 | */ | 330 | */ |
344 | .oprofile_mmcra_sihv = MMCRA_SIHV, | 331 | .oprofile_mmcra_sihv = MMCRA_SIHV, |
345 | .oprofile_mmcra_sipr = MMCRA_SIPR, | 332 | .oprofile_mmcra_sipr = MMCRA_SIPR, |
346 | .machine_check = machine_check_generic, | ||
347 | .platform = "power5", | 333 | .platform = "power5", |
348 | }, | 334 | }, |
349 | { /* Power5++ */ | 335 | { /* Power5++ */ |
@@ -360,7 +346,6 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
360 | .oprofile_type = PPC_OPROFILE_POWER4, | 346 | .oprofile_type = PPC_OPROFILE_POWER4, |
361 | .oprofile_mmcra_sihv = MMCRA_SIHV, | 347 | .oprofile_mmcra_sihv = MMCRA_SIHV, |
362 | .oprofile_mmcra_sipr = MMCRA_SIPR, | 348 | .oprofile_mmcra_sipr = MMCRA_SIPR, |
363 | .machine_check = machine_check_generic, | ||
364 | .platform = "power5+", | 349 | .platform = "power5+", |
365 | }, | 350 | }, |
366 | { /* Power5 GS */ | 351 | { /* Power5 GS */ |
@@ -378,7 +363,6 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
378 | .oprofile_type = PPC_OPROFILE_POWER4, | 363 | .oprofile_type = PPC_OPROFILE_POWER4, |
379 | .oprofile_mmcra_sihv = MMCRA_SIHV, | 364 | .oprofile_mmcra_sihv = MMCRA_SIHV, |
380 | .oprofile_mmcra_sipr = MMCRA_SIPR, | 365 | .oprofile_mmcra_sipr = MMCRA_SIPR, |
381 | .machine_check = machine_check_generic, | ||
382 | .platform = "power5+", | 366 | .platform = "power5+", |
383 | }, | 367 | }, |
384 | { /* POWER6 in P5+ mode; 2.04-compliant processor */ | 368 | { /* POWER6 in P5+ mode; 2.04-compliant processor */ |
@@ -390,7 +374,6 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
390 | .mmu_features = MMU_FTR_HPTE_TABLE, | 374 | .mmu_features = MMU_FTR_HPTE_TABLE, |
391 | .icache_bsize = 128, | 375 | .icache_bsize = 128, |
392 | .dcache_bsize = 128, | 376 | .dcache_bsize = 128, |
393 | .machine_check = machine_check_generic, | ||
394 | .oprofile_cpu_type = "ppc64/ibm-compat-v1", | 377 | .oprofile_cpu_type = "ppc64/ibm-compat-v1", |
395 | .oprofile_type = PPC_OPROFILE_POWER4, | 378 | .oprofile_type = PPC_OPROFILE_POWER4, |
396 | .platform = "power5+", | 379 | .platform = "power5+", |
@@ -413,7 +396,6 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
413 | .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR, | 396 | .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR, |
414 | .oprofile_mmcra_clear = POWER6_MMCRA_THRM | | 397 | .oprofile_mmcra_clear = POWER6_MMCRA_THRM | |
415 | POWER6_MMCRA_OTHER, | 398 | POWER6_MMCRA_OTHER, |
416 | .machine_check = machine_check_generic, | ||
417 | .platform = "power6x", | 399 | .platform = "power6x", |
418 | }, | 400 | }, |
419 | { /* 2.05-compliant processor, i.e. Power6 "architected" mode */ | 401 | { /* 2.05-compliant processor, i.e. Power6 "architected" mode */ |
@@ -425,7 +407,6 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
425 | .mmu_features = MMU_FTR_HPTE_TABLE, | 407 | .mmu_features = MMU_FTR_HPTE_TABLE, |
426 | .icache_bsize = 128, | 408 | .icache_bsize = 128, |
427 | .dcache_bsize = 128, | 409 | .dcache_bsize = 128, |
428 | .machine_check = machine_check_generic, | ||
429 | .oprofile_cpu_type = "ppc64/ibm-compat-v1", | 410 | .oprofile_cpu_type = "ppc64/ibm-compat-v1", |
430 | .oprofile_type = PPC_OPROFILE_POWER4, | 411 | .oprofile_type = PPC_OPROFILE_POWER4, |
431 | .platform = "power6", | 412 | .platform = "power6", |
@@ -440,7 +421,6 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
440 | MMU_FTR_TLBIE_206, | 421 | MMU_FTR_TLBIE_206, |
441 | .icache_bsize = 128, | 422 | .icache_bsize = 128, |
442 | .dcache_bsize = 128, | 423 | .dcache_bsize = 128, |
443 | .machine_check = machine_check_generic, | ||
444 | .oprofile_type = PPC_OPROFILE_POWER4, | 424 | .oprofile_type = PPC_OPROFILE_POWER4, |
445 | .oprofile_cpu_type = "ppc64/ibm-compat-v1", | 425 | .oprofile_cpu_type = "ppc64/ibm-compat-v1", |
446 | .platform = "power7", | 426 | .platform = "power7", |
@@ -492,7 +472,6 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
492 | .pmc_type = PPC_PMC_IBM, | 472 | .pmc_type = PPC_PMC_IBM, |
493 | .oprofile_cpu_type = "ppc64/cell-be", | 473 | .oprofile_cpu_type = "ppc64/cell-be", |
494 | .oprofile_type = PPC_OPROFILE_CELL, | 474 | .oprofile_type = PPC_OPROFILE_CELL, |
495 | .machine_check = machine_check_generic, | ||
496 | .platform = "ppc-cell-be", | 475 | .platform = "ppc-cell-be", |
497 | }, | 476 | }, |
498 | { /* PA Semi PA6T */ | 477 | { /* PA Semi PA6T */ |
@@ -510,7 +489,6 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
510 | .cpu_restore = __restore_cpu_pa6t, | 489 | .cpu_restore = __restore_cpu_pa6t, |
511 | .oprofile_cpu_type = "ppc64/pa6t", | 490 | .oprofile_cpu_type = "ppc64/pa6t", |
512 | .oprofile_type = PPC_OPROFILE_PA6T, | 491 | .oprofile_type = PPC_OPROFILE_PA6T, |
513 | .machine_check = machine_check_generic, | ||
514 | .platform = "pa6t", | 492 | .platform = "pa6t", |
515 | }, | 493 | }, |
516 | { /* default match */ | 494 | { /* default match */ |
@@ -524,7 +502,6 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
524 | .dcache_bsize = 128, | 502 | .dcache_bsize = 128, |
525 | .num_pmcs = 6, | 503 | .num_pmcs = 6, |
526 | .pmc_type = PPC_PMC_IBM, | 504 | .pmc_type = PPC_PMC_IBM, |
527 | .machine_check = machine_check_generic, | ||
528 | .platform = "power4", | 505 | .platform = "power4", |
529 | } | 506 | } |
530 | #endif /* CONFIG_PPC_BOOK3S_64 */ | 507 | #endif /* CONFIG_PPC_BOOK3S_64 */ |
@@ -2099,8 +2076,8 @@ static void __init setup_cpu_spec(unsigned long offset, struct cpu_spec *s) | |||
2099 | * pointer on ppc64 and booke as we are running at 0 in real mode | 2076 | * pointer on ppc64 and booke as we are running at 0 in real mode |
2100 | * on ppc64 and reloc_offset is always 0 on booke. | 2077 | * on ppc64 and reloc_offset is always 0 on booke. |
2101 | */ | 2078 | */ |
2102 | if (s->cpu_setup) { | 2079 | if (t->cpu_setup) { |
2103 | s->cpu_setup(offset, s); | 2080 | t->cpu_setup(offset, t); |
2104 | } | 2081 | } |
2105 | #endif /* CONFIG_PPC64 || CONFIG_BOOKE */ | 2082 | #endif /* CONFIG_PPC64 || CONFIG_BOOKE */ |
2106 | } | 2083 | } |
diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c index 832c8c4db25..3d569e2aff1 100644 --- a/arch/powerpc/kernel/crash.c +++ b/arch/powerpc/kernel/crash.c | |||
@@ -48,7 +48,7 @@ int crashing_cpu = -1; | |||
48 | static cpumask_t cpus_in_crash = CPU_MASK_NONE; | 48 | static cpumask_t cpus_in_crash = CPU_MASK_NONE; |
49 | cpumask_t cpus_in_sr = CPU_MASK_NONE; | 49 | cpumask_t cpus_in_sr = CPU_MASK_NONE; |
50 | 50 | ||
51 | #define CRASH_HANDLER_MAX 2 | 51 | #define CRASH_HANDLER_MAX 3 |
52 | /* NULL terminated list of shutdown handles */ | 52 | /* NULL terminated list of shutdown handles */ |
53 | static crash_shutdown_t crash_shutdown_handles[CRASH_HANDLER_MAX+1]; | 53 | static crash_shutdown_t crash_shutdown_handles[CRASH_HANDLER_MAX+1]; |
54 | static DEFINE_SPINLOCK(crash_handlers_lock); | 54 | static DEFINE_SPINLOCK(crash_handlers_lock); |
@@ -125,7 +125,7 @@ static void crash_kexec_prepare_cpus(int cpu) | |||
125 | smp_wmb(); | 125 | smp_wmb(); |
126 | 126 | ||
127 | /* | 127 | /* |
128 | * FIXME: Until we will have the way to stop other CPUSs reliabally, | 128 | * FIXME: Until we will have the way to stop other CPUs reliably, |
129 | * the crash CPU will send an IPI and wait for other CPUs to | 129 | * the crash CPU will send an IPI and wait for other CPUs to |
130 | * respond. | 130 | * respond. |
131 | * Delay of at least 10 seconds. | 131 | * Delay of at least 10 seconds. |
@@ -254,72 +254,6 @@ void crash_kexec_secondary(struct pt_regs *regs) | |||
254 | cpus_in_sr = CPU_MASK_NONE; | 254 | cpus_in_sr = CPU_MASK_NONE; |
255 | } | 255 | } |
256 | #endif | 256 | #endif |
257 | #ifdef CONFIG_SPU_BASE | ||
258 | |||
259 | #include <asm/spu.h> | ||
260 | #include <asm/spu_priv1.h> | ||
261 | |||
262 | struct crash_spu_info { | ||
263 | struct spu *spu; | ||
264 | u32 saved_spu_runcntl_RW; | ||
265 | u32 saved_spu_status_R; | ||
266 | u32 saved_spu_npc_RW; | ||
267 | u64 saved_mfc_sr1_RW; | ||
268 | u64 saved_mfc_dar; | ||
269 | u64 saved_mfc_dsisr; | ||
270 | }; | ||
271 | |||
272 | #define CRASH_NUM_SPUS 16 /* Enough for current hardware */ | ||
273 | static struct crash_spu_info crash_spu_info[CRASH_NUM_SPUS]; | ||
274 | |||
275 | static void crash_kexec_stop_spus(void) | ||
276 | { | ||
277 | struct spu *spu; | ||
278 | int i; | ||
279 | u64 tmp; | ||
280 | |||
281 | for (i = 0; i < CRASH_NUM_SPUS; i++) { | ||
282 | if (!crash_spu_info[i].spu) | ||
283 | continue; | ||
284 | |||
285 | spu = crash_spu_info[i].spu; | ||
286 | |||
287 | crash_spu_info[i].saved_spu_runcntl_RW = | ||
288 | in_be32(&spu->problem->spu_runcntl_RW); | ||
289 | crash_spu_info[i].saved_spu_status_R = | ||
290 | in_be32(&spu->problem->spu_status_R); | ||
291 | crash_spu_info[i].saved_spu_npc_RW = | ||
292 | in_be32(&spu->problem->spu_npc_RW); | ||
293 | |||
294 | crash_spu_info[i].saved_mfc_dar = spu_mfc_dar_get(spu); | ||
295 | crash_spu_info[i].saved_mfc_dsisr = spu_mfc_dsisr_get(spu); | ||
296 | tmp = spu_mfc_sr1_get(spu); | ||
297 | crash_spu_info[i].saved_mfc_sr1_RW = tmp; | ||
298 | |||
299 | tmp &= ~MFC_STATE1_MASTER_RUN_CONTROL_MASK; | ||
300 | spu_mfc_sr1_set(spu, tmp); | ||
301 | |||
302 | __delay(200); | ||
303 | } | ||
304 | } | ||
305 | |||
306 | void crash_register_spus(struct list_head *list) | ||
307 | { | ||
308 | struct spu *spu; | ||
309 | |||
310 | list_for_each_entry(spu, list, full_list) { | ||
311 | if (WARN_ON(spu->number >= CRASH_NUM_SPUS)) | ||
312 | continue; | ||
313 | |||
314 | crash_spu_info[spu->number].spu = spu; | ||
315 | } | ||
316 | } | ||
317 | |||
318 | #else | ||
319 | static inline void crash_kexec_stop_spus(void) | ||
320 | { | ||
321 | } | ||
322 | #endif /* CONFIG_SPU_BASE */ | ||
323 | 257 | ||
324 | /* | 258 | /* |
325 | * Register a function to be called on shutdown. Only use this if you | 259 | * Register a function to be called on shutdown. Only use this if you |
@@ -439,8 +373,6 @@ void default_machine_crash_shutdown(struct pt_regs *regs) | |||
439 | crash_shutdown_cpu = -1; | 373 | crash_shutdown_cpu = -1; |
440 | __debugger_fault_handler = old_handler; | 374 | __debugger_fault_handler = old_handler; |
441 | 375 | ||
442 | crash_kexec_stop_spus(); | ||
443 | |||
444 | if (ppc_md.kexec_cpu_down) | 376 | if (ppc_md.kexec_cpu_down) |
445 | ppc_md.kexec_cpu_down(1, 0); | 377 | ppc_md.kexec_cpu_down(1, 0); |
446 | } | 378 | } |
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S index c22dc1ec1c9..56212bc0ab0 100644 --- a/arch/powerpc/kernel/entry_32.S +++ b/arch/powerpc/kernel/entry_32.S | |||
@@ -880,7 +880,18 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_TYPE_47x) | |||
880 | */ | 880 | */ |
881 | andi. r10,r9,MSR_EE | 881 | andi. r10,r9,MSR_EE |
882 | beq 1f | 882 | beq 1f |
883 | /* | ||
884 | * Since the ftrace irqsoff latency trace checks CALLER_ADDR1, | ||
885 | * which is the stack frame here, we need to force a stack frame | ||
886 | * in case we came from user space. | ||
887 | */ | ||
888 | stwu r1,-32(r1) | ||
889 | mflr r0 | ||
890 | stw r0,4(r1) | ||
891 | stwu r1,-32(r1) | ||
883 | bl trace_hardirqs_on | 892 | bl trace_hardirqs_on |
893 | lwz r1,0(r1) | ||
894 | lwz r1,0(r1) | ||
884 | lwz r9,_MSR(r1) | 895 | lwz r9,_MSR(r1) |
885 | 1: | 896 | 1: |
886 | #endif /* CONFIG_TRACE_IRQFLAGS */ | 897 | #endif /* CONFIG_TRACE_IRQFLAGS */ |
diff --git a/arch/powerpc/kernel/machine_kexec.c b/arch/powerpc/kernel/machine_kexec.c index df7e20c191c..49a170af814 100644 --- a/arch/powerpc/kernel/machine_kexec.c +++ b/arch/powerpc/kernel/machine_kexec.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/memblock.h> | 15 | #include <linux/memblock.h> |
16 | #include <linux/of.h> | 16 | #include <linux/of.h> |
17 | #include <linux/irq.h> | 17 | #include <linux/irq.h> |
18 | #include <linux/ftrace.h> | ||
18 | 19 | ||
19 | #include <asm/machdep.h> | 20 | #include <asm/machdep.h> |
20 | #include <asm/prom.h> | 21 | #include <asm/prom.h> |
@@ -44,10 +45,7 @@ void machine_kexec_mask_interrupts(void) { | |||
44 | 45 | ||
45 | void machine_crash_shutdown(struct pt_regs *regs) | 46 | void machine_crash_shutdown(struct pt_regs *regs) |
46 | { | 47 | { |
47 | if (ppc_md.machine_crash_shutdown) | 48 | default_machine_crash_shutdown(regs); |
48 | ppc_md.machine_crash_shutdown(regs); | ||
49 | else | ||
50 | default_machine_crash_shutdown(regs); | ||
51 | } | 49 | } |
52 | 50 | ||
53 | /* | 51 | /* |
@@ -65,8 +63,6 @@ int machine_kexec_prepare(struct kimage *image) | |||
65 | 63 | ||
66 | void machine_kexec_cleanup(struct kimage *image) | 64 | void machine_kexec_cleanup(struct kimage *image) |
67 | { | 65 | { |
68 | if (ppc_md.machine_kexec_cleanup) | ||
69 | ppc_md.machine_kexec_cleanup(image); | ||
70 | } | 66 | } |
71 | 67 | ||
72 | void arch_crash_save_vmcoreinfo(void) | 68 | void arch_crash_save_vmcoreinfo(void) |
@@ -87,10 +83,13 @@ void arch_crash_save_vmcoreinfo(void) | |||
87 | */ | 83 | */ |
88 | void machine_kexec(struct kimage *image) | 84 | void machine_kexec(struct kimage *image) |
89 | { | 85 | { |
90 | if (ppc_md.machine_kexec) | 86 | int save_ftrace_enabled; |
91 | ppc_md.machine_kexec(image); | 87 | |
92 | else | 88 | save_ftrace_enabled = __ftrace_enabled_save(); |
93 | default_machine_kexec(image); | 89 | |
90 | default_machine_kexec(image); | ||
91 | |||
92 | __ftrace_enabled_restore(save_ftrace_enabled); | ||
94 | 93 | ||
95 | /* Fall back to normal restart if we're still alive. */ | 94 | /* Fall back to normal restart if we're still alive. */ |
96 | machine_restart(NULL); | 95 | machine_restart(NULL); |
diff --git a/arch/powerpc/kernel/perf_event.c b/arch/powerpc/kernel/perf_event.c index 56748070578..ab6f6beadb5 100644 --- a/arch/powerpc/kernel/perf_event.c +++ b/arch/powerpc/kernel/perf_event.c | |||
@@ -1212,6 +1212,7 @@ static void record_and_restart(struct perf_event *event, unsigned long val, | |||
1212 | if (left <= 0) | 1212 | if (left <= 0) |
1213 | left = period; | 1213 | left = period; |
1214 | record = 1; | 1214 | record = 1; |
1215 | event->hw.last_period = event->hw.sample_period; | ||
1215 | } | 1216 | } |
1216 | if (left < 0x80000000LL) | 1217 | if (left < 0x80000000LL) |
1217 | val = 0x80000000LL - left; | 1218 | val = 0x80000000LL - left; |
diff --git a/arch/powerpc/kernel/perf_event_fsl_emb.c b/arch/powerpc/kernel/perf_event_fsl_emb.c index 4dcf5f831e9..b0dc8f7069c 100644 --- a/arch/powerpc/kernel/perf_event_fsl_emb.c +++ b/arch/powerpc/kernel/perf_event_fsl_emb.c | |||
@@ -596,6 +596,7 @@ static void record_and_restart(struct perf_event *event, unsigned long val, | |||
596 | if (left <= 0) | 596 | if (left <= 0) |
597 | left = period; | 597 | left = period; |
598 | record = 1; | 598 | record = 1; |
599 | event->hw.last_period = event->hw.sample_period; | ||
599 | } | 600 | } |
600 | if (left < 0x80000000LL) | 601 | if (left < 0x80000000LL) |
601 | val = 0x80000000LL - left; | 602 | val = 0x80000000LL - left; |
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 84906d3fc86..7a1d5cb7693 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -631,7 +631,7 @@ void show_regs(struct pt_regs * regs) | |||
631 | #ifdef CONFIG_PPC_ADV_DEBUG_REGS | 631 | #ifdef CONFIG_PPC_ADV_DEBUG_REGS |
632 | printk("DEAR: "REG", ESR: "REG"\n", regs->dar, regs->dsisr); | 632 | printk("DEAR: "REG", ESR: "REG"\n", regs->dar, regs->dsisr); |
633 | #else | 633 | #else |
634 | printk("DAR: "REG", DSISR: "REG"\n", regs->dar, regs->dsisr); | 634 | printk("DAR: "REG", DSISR: %08lx\n", regs->dar, regs->dsisr); |
635 | #endif | 635 | #endif |
636 | printk("TASK = %p[%d] '%s' THREAD: %p", | 636 | printk("TASK = %p[%d] '%s' THREAD: %p", |
637 | current, task_pid_nr(current), current->comm, task_thread_info(current)); | 637 | current, task_pid_nr(current), current->comm, task_thread_info(current)); |
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 9e3132db718..7185f0da7dc 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -519,9 +519,9 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size) | |||
519 | memblock_add(base, size); | 519 | memblock_add(base, size); |
520 | } | 520 | } |
521 | 521 | ||
522 | u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align) | 522 | void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align) |
523 | { | 523 | { |
524 | return memblock_alloc(size, align); | 524 | return __va(memblock_alloc(size, align)); |
525 | } | 525 | } |
526 | 526 | ||
527 | #ifdef CONFIG_BLK_DEV_INITRD | 527 | #ifdef CONFIG_BLK_DEV_INITRD |
diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c index 2b442e6c21e..bf5f5ce3a7b 100644 --- a/arch/powerpc/kernel/rtas_flash.c +++ b/arch/powerpc/kernel/rtas_flash.c | |||
@@ -256,31 +256,16 @@ static ssize_t rtas_flash_read(struct file *file, char __user *buf, | |||
256 | struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); | 256 | struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode); |
257 | struct rtas_update_flash_t *uf; | 257 | struct rtas_update_flash_t *uf; |
258 | char msg[RTAS_MSG_MAXLEN]; | 258 | char msg[RTAS_MSG_MAXLEN]; |
259 | int msglen; | ||
260 | 259 | ||
261 | uf = (struct rtas_update_flash_t *) dp->data; | 260 | uf = dp->data; |
262 | 261 | ||
263 | if (!strcmp(dp->name, FIRMWARE_FLASH_NAME)) { | 262 | if (!strcmp(dp->name, FIRMWARE_FLASH_NAME)) { |
264 | get_flash_status_msg(uf->status, msg); | 263 | get_flash_status_msg(uf->status, msg); |
265 | } else { /* FIRMWARE_UPDATE_NAME */ | 264 | } else { /* FIRMWARE_UPDATE_NAME */ |
266 | sprintf(msg, "%d\n", uf->status); | 265 | sprintf(msg, "%d\n", uf->status); |
267 | } | 266 | } |
268 | msglen = strlen(msg); | ||
269 | if (msglen > count) | ||
270 | msglen = count; | ||
271 | |||
272 | if (ppos && *ppos != 0) | ||
273 | return 0; /* be cheap */ | ||
274 | |||
275 | if (!access_ok(VERIFY_WRITE, buf, msglen)) | ||
276 | return -EINVAL; | ||
277 | 267 | ||
278 | if (copy_to_user(buf, msg, msglen)) | 268 | return simple_read_from_buffer(buf, count, ppos, msg, strlen(msg)); |
279 | return -EFAULT; | ||
280 | |||
281 | if (ppos) | ||
282 | *ppos = msglen; | ||
283 | return msglen; | ||
284 | } | 269 | } |
285 | 270 | ||
286 | /* constructor for flash_block_cache */ | 271 | /* constructor for flash_block_cache */ |
@@ -394,26 +379,13 @@ static ssize_t manage_flash_read(struct file *file, char __user *buf, | |||
394 | char msg[RTAS_MSG_MAXLEN]; | 379 | char msg[RTAS_MSG_MAXLEN]; |
395 | int msglen; | 380 | int msglen; |
396 | 381 | ||
397 | args_buf = (struct rtas_manage_flash_t *) dp->data; | 382 | args_buf = dp->data; |
398 | if (args_buf == NULL) | 383 | if (args_buf == NULL) |
399 | return 0; | 384 | return 0; |
400 | 385 | ||
401 | msglen = sprintf(msg, "%d\n", args_buf->status); | 386 | msglen = sprintf(msg, "%d\n", args_buf->status); |
402 | if (msglen > count) | ||
403 | msglen = count; | ||
404 | 387 | ||
405 | if (ppos && *ppos != 0) | 388 | return simple_read_from_buffer(buf, count, ppos, msg, msglen); |
406 | return 0; /* be cheap */ | ||
407 | |||
408 | if (!access_ok(VERIFY_WRITE, buf, msglen)) | ||
409 | return -EINVAL; | ||
410 | |||
411 | if (copy_to_user(buf, msg, msglen)) | ||
412 | return -EFAULT; | ||
413 | |||
414 | if (ppos) | ||
415 | *ppos = msglen; | ||
416 | return msglen; | ||
417 | } | 389 | } |
418 | 390 | ||
419 | static ssize_t manage_flash_write(struct file *file, const char __user *buf, | 391 | static ssize_t manage_flash_write(struct file *file, const char __user *buf, |
@@ -495,24 +467,11 @@ static ssize_t validate_flash_read(struct file *file, char __user *buf, | |||
495 | char msg[RTAS_MSG_MAXLEN]; | 467 | char msg[RTAS_MSG_MAXLEN]; |
496 | int msglen; | 468 | int msglen; |
497 | 469 | ||
498 | args_buf = (struct rtas_validate_flash_t *) dp->data; | 470 | args_buf = dp->data; |
499 | 471 | ||
500 | if (ppos && *ppos != 0) | ||
501 | return 0; /* be cheap */ | ||
502 | |||
503 | msglen = get_validate_flash_msg(args_buf, msg); | 472 | msglen = get_validate_flash_msg(args_buf, msg); |
504 | if (msglen > count) | ||
505 | msglen = count; | ||
506 | |||
507 | if (!access_ok(VERIFY_WRITE, buf, msglen)) | ||
508 | return -EINVAL; | ||
509 | |||
510 | if (copy_to_user(buf, msg, msglen)) | ||
511 | return -EFAULT; | ||
512 | 473 | ||
513 | if (ppos) | 474 | return simple_read_from_buffer(buf, count, ppos, msg, msglen); |
514 | *ppos = msglen; | ||
515 | return msglen; | ||
516 | } | 475 | } |
517 | 476 | ||
518 | static ssize_t validate_flash_write(struct file *file, const char __user *buf, | 477 | static ssize_t validate_flash_write(struct file *file, const char __user *buf, |
diff --git a/arch/powerpc/kernel/rtasd.c b/arch/powerpc/kernel/rtasd.c index 0438f819fe6..049dbecb5db 100644 --- a/arch/powerpc/kernel/rtasd.c +++ b/arch/powerpc/kernel/rtasd.c | |||
@@ -160,7 +160,7 @@ static int log_rtas_len(char * buf) | |||
160 | /* rtas fixed header */ | 160 | /* rtas fixed header */ |
161 | len = 8; | 161 | len = 8; |
162 | err = (struct rtas_error_log *)buf; | 162 | err = (struct rtas_error_log *)buf; |
163 | if (err->extended_log_length) { | 163 | if (err->extended && err->extended_log_length) { |
164 | 164 | ||
165 | /* extended header */ | 165 | /* extended header */ |
166 | len += err->extended_log_length; | 166 | len += err->extended_log_length; |
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 09e4dea4a85..09d31dbf43f 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -265,11 +265,26 @@ void accumulate_stolen_time(void) | |||
265 | { | 265 | { |
266 | u64 sst, ust; | 266 | u64 sst, ust; |
267 | 267 | ||
268 | sst = scan_dispatch_log(get_paca()->starttime_user); | 268 | u8 save_soft_enabled = local_paca->soft_enabled; |
269 | ust = scan_dispatch_log(get_paca()->starttime); | 269 | u8 save_hard_enabled = local_paca->hard_enabled; |
270 | get_paca()->system_time -= sst; | 270 | |
271 | get_paca()->user_time -= ust; | 271 | /* We are called early in the exception entry, before |
272 | get_paca()->stolen_time += ust + sst; | 272 | * soft/hard_enabled are sync'ed to the expected state |
273 | * for the exception. We are hard disabled but the PACA | ||
274 | * needs to reflect that so various debug stuff doesn't | ||
275 | * complain | ||
276 | */ | ||
277 | local_paca->soft_enabled = 0; | ||
278 | local_paca->hard_enabled = 0; | ||
279 | |||
280 | sst = scan_dispatch_log(local_paca->starttime_user); | ||
281 | ust = scan_dispatch_log(local_paca->starttime); | ||
282 | local_paca->system_time -= sst; | ||
283 | local_paca->user_time -= ust; | ||
284 | local_paca->stolen_time += ust + sst; | ||
285 | |||
286 | local_paca->soft_enabled = save_soft_enabled; | ||
287 | local_paca->hard_enabled = save_hard_enabled; | ||
273 | } | 288 | } |
274 | 289 | ||
275 | static inline u64 calculate_stolen_time(u64 stop_tb) | 290 | static inline u64 calculate_stolen_time(u64 stop_tb) |
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 1b2cdc8eec9..bd74fac169b 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c | |||
@@ -626,12 +626,6 @@ void machine_check_exception(struct pt_regs *regs) | |||
626 | if (recover > 0) | 626 | if (recover > 0) |
627 | return; | 627 | return; |
628 | 628 | ||
629 | if (user_mode(regs)) { | ||
630 | regs->msr |= MSR_RI; | ||
631 | _exception(SIGBUS, regs, BUS_ADRERR, regs->nip); | ||
632 | return; | ||
633 | } | ||
634 | |||
635 | #if defined(CONFIG_8xx) && defined(CONFIG_PCI) | 629 | #if defined(CONFIG_8xx) && defined(CONFIG_PCI) |
636 | /* the qspan pci read routines can cause machine checks -- Cort | 630 | /* the qspan pci read routines can cause machine checks -- Cort |
637 | * | 631 | * |
@@ -643,16 +637,12 @@ void machine_check_exception(struct pt_regs *regs) | |||
643 | return; | 637 | return; |
644 | #endif | 638 | #endif |
645 | 639 | ||
646 | if (debugger_fault_handler(regs)) { | 640 | if (debugger_fault_handler(regs)) |
647 | regs->msr |= MSR_RI; | ||
648 | return; | 641 | return; |
649 | } | ||
650 | 642 | ||
651 | if (check_io_access(regs)) | 643 | if (check_io_access(regs)) |
652 | return; | 644 | return; |
653 | 645 | ||
654 | if (debugger_fault_handler(regs)) | ||
655 | return; | ||
656 | die("Machine check", regs, SIGBUS); | 646 | die("Machine check", regs, SIGBUS); |
657 | 647 | ||
658 | /* Must die if the interrupt is not recoverable */ | 648 | /* Must die if the interrupt is not recoverable */ |
diff --git a/arch/powerpc/lib/feature-fixups-test.S b/arch/powerpc/lib/feature-fixups-test.S index cb737484c5a..f4613118132 100644 --- a/arch/powerpc/lib/feature-fixups-test.S +++ b/arch/powerpc/lib/feature-fixups-test.S | |||
@@ -172,6 +172,25 @@ globl(ftr_fixup_test6_expected) | |||
172 | 3: or 3,3,3 | 172 | 3: or 3,3,3 |
173 | 173 | ||
174 | 174 | ||
175 | #if 0 | ||
176 | /* Test that if we have a larger else case the assembler spots it and | ||
177 | * reports an error. #if 0'ed so as not to break the build normally. | ||
178 | */ | ||
179 | ftr_fixup_test7: | ||
180 | or 1,1,1 | ||
181 | BEGIN_FTR_SECTION | ||
182 | or 2,2,2 | ||
183 | or 2,2,2 | ||
184 | or 2,2,2 | ||
185 | FTR_SECTION_ELSE | ||
186 | or 3,3,3 | ||
187 | or 3,3,3 | ||
188 | or 3,3,3 | ||
189 | or 3,3,3 | ||
190 | ALT_FTR_SECTION_END(0, 1) | ||
191 | or 1,1,1 | ||
192 | #endif | ||
193 | |||
175 | #define MAKE_MACRO_TEST(TYPE) \ | 194 | #define MAKE_MACRO_TEST(TYPE) \ |
176 | globl(ftr_fixup_test_ ##TYPE##_macros) \ | 195 | globl(ftr_fixup_test_ ##TYPE##_macros) \ |
177 | or 1,1,1; \ | 196 | or 1,1,1; \ |
diff --git a/arch/powerpc/mm/gup.c b/arch/powerpc/mm/gup.c index d7efdbf640c..fec13200868 100644 --- a/arch/powerpc/mm/gup.c +++ b/arch/powerpc/mm/gup.c | |||
@@ -16,6 +16,16 @@ | |||
16 | 16 | ||
17 | #ifdef __HAVE_ARCH_PTE_SPECIAL | 17 | #ifdef __HAVE_ARCH_PTE_SPECIAL |
18 | 18 | ||
19 | static inline void get_huge_page_tail(struct page *page) | ||
20 | { | ||
21 | /* | ||
22 | * __split_huge_page_refcount() cannot run | ||
23 | * from under us. | ||
24 | */ | ||
25 | VM_BUG_ON(atomic_read(&page->_count) < 0); | ||
26 | atomic_inc(&page->_count); | ||
27 | } | ||
28 | |||
19 | /* | 29 | /* |
20 | * The performance critical leaf functions are made noinline otherwise gcc | 30 | * The performance critical leaf functions are made noinline otherwise gcc |
21 | * inlines everything into a single function which results in too much | 31 | * inlines everything into a single function which results in too much |
@@ -47,6 +57,8 @@ static noinline int gup_pte_range(pmd_t pmd, unsigned long addr, | |||
47 | put_page(page); | 57 | put_page(page); |
48 | return 0; | 58 | return 0; |
49 | } | 59 | } |
60 | if (PageTail(page)) | ||
61 | get_huge_page_tail(page); | ||
50 | pages[*nr] = page; | 62 | pages[*nr] = page; |
51 | (*nr)++; | 63 | (*nr)++; |
52 | 64 | ||
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index bf5cb91f07d..fd481232957 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c | |||
@@ -186,7 +186,7 @@ static void unmap_cpu_from_node(unsigned long cpu) | |||
186 | dbg("removing cpu %lu from node %d\n", cpu, node); | 186 | dbg("removing cpu %lu from node %d\n", cpu, node); |
187 | 187 | ||
188 | if (cpumask_test_cpu(cpu, node_to_cpumask_map[node])) { | 188 | if (cpumask_test_cpu(cpu, node_to_cpumask_map[node])) { |
189 | cpumask_set_cpu(cpu, node_to_cpumask_map[node]); | 189 | cpumask_clear_cpu(cpu, node_to_cpumask_map[node]); |
190 | } else { | 190 | } else { |
191 | printk(KERN_ERR "WARNING: cpu %lu not found in node %d\n", | 191 | printk(KERN_ERR "WARNING: cpu %lu not found in node %d\n", |
192 | cpu, node); | 192 | cpu, node); |
@@ -1289,10 +1289,9 @@ u64 memory_hotplug_max(void) | |||
1289 | } | 1289 | } |
1290 | #endif /* CONFIG_MEMORY_HOTPLUG */ | 1290 | #endif /* CONFIG_MEMORY_HOTPLUG */ |
1291 | 1291 | ||
1292 | /* Vrtual Processor Home Node (VPHN) support */ | 1292 | /* Virtual Processor Home Node (VPHN) support */ |
1293 | #ifdef CONFIG_PPC_SPLPAR | 1293 | #ifdef CONFIG_PPC_SPLPAR |
1294 | #define VPHN_NR_CHANGE_CTRS (8) | 1294 | static u8 vphn_cpu_change_counts[NR_CPUS][MAX_DISTANCE_REF_POINTS]; |
1295 | static u8 vphn_cpu_change_counts[NR_CPUS][VPHN_NR_CHANGE_CTRS]; | ||
1296 | static cpumask_t cpu_associativity_changes_mask; | 1295 | static cpumask_t cpu_associativity_changes_mask; |
1297 | static int vphn_enabled; | 1296 | static int vphn_enabled; |
1298 | static void set_topology_timer(void); | 1297 | static void set_topology_timer(void); |
@@ -1303,16 +1302,18 @@ static void set_topology_timer(void); | |||
1303 | */ | 1302 | */ |
1304 | static void setup_cpu_associativity_change_counters(void) | 1303 | static void setup_cpu_associativity_change_counters(void) |
1305 | { | 1304 | { |
1306 | int cpu = 0; | 1305 | int cpu; |
1306 | |||
1307 | /* The VPHN feature supports a maximum of 8 reference points */ | ||
1308 | BUILD_BUG_ON(MAX_DISTANCE_REF_POINTS > 8); | ||
1307 | 1309 | ||
1308 | for_each_possible_cpu(cpu) { | 1310 | for_each_possible_cpu(cpu) { |
1309 | int i = 0; | 1311 | int i; |
1310 | u8 *counts = vphn_cpu_change_counts[cpu]; | 1312 | u8 *counts = vphn_cpu_change_counts[cpu]; |
1311 | volatile u8 *hypervisor_counts = lppaca[cpu].vphn_assoc_counts; | 1313 | volatile u8 *hypervisor_counts = lppaca[cpu].vphn_assoc_counts; |
1312 | 1314 | ||
1313 | for (i = 0; i < VPHN_NR_CHANGE_CTRS; i++) { | 1315 | for (i = 0; i < distance_ref_points_depth; i++) |
1314 | counts[i] = hypervisor_counts[i]; | 1316 | counts[i] = hypervisor_counts[i]; |
1315 | } | ||
1316 | } | 1317 | } |
1317 | } | 1318 | } |
1318 | 1319 | ||
@@ -1329,7 +1330,7 @@ static void setup_cpu_associativity_change_counters(void) | |||
1329 | */ | 1330 | */ |
1330 | static int update_cpu_associativity_changes_mask(void) | 1331 | static int update_cpu_associativity_changes_mask(void) |
1331 | { | 1332 | { |
1332 | int cpu = 0, nr_cpus = 0; | 1333 | int cpu, nr_cpus = 0; |
1333 | cpumask_t *changes = &cpu_associativity_changes_mask; | 1334 | cpumask_t *changes = &cpu_associativity_changes_mask; |
1334 | 1335 | ||
1335 | cpumask_clear(changes); | 1336 | cpumask_clear(changes); |
@@ -1339,8 +1340,8 @@ static int update_cpu_associativity_changes_mask(void) | |||
1339 | u8 *counts = vphn_cpu_change_counts[cpu]; | 1340 | u8 *counts = vphn_cpu_change_counts[cpu]; |
1340 | volatile u8 *hypervisor_counts = lppaca[cpu].vphn_assoc_counts; | 1341 | volatile u8 *hypervisor_counts = lppaca[cpu].vphn_assoc_counts; |
1341 | 1342 | ||
1342 | for (i = 0; i < VPHN_NR_CHANGE_CTRS; i++) { | 1343 | for (i = 0; i < distance_ref_points_depth; i++) { |
1343 | if (hypervisor_counts[i] > counts[i]) { | 1344 | if (hypervisor_counts[i] != counts[i]) { |
1344 | counts[i] = hypervisor_counts[i]; | 1345 | counts[i] = hypervisor_counts[i]; |
1345 | changed = 1; | 1346 | changed = 1; |
1346 | } | 1347 | } |
@@ -1354,8 +1355,11 @@ static int update_cpu_associativity_changes_mask(void) | |||
1354 | return nr_cpus; | 1355 | return nr_cpus; |
1355 | } | 1356 | } |
1356 | 1357 | ||
1357 | /* 6 64-bit registers unpacked into 12 32-bit associativity values */ | 1358 | /* |
1358 | #define VPHN_ASSOC_BUFSIZE (6*sizeof(u64)/sizeof(u32)) | 1359 | * 6 64-bit registers unpacked into 12 32-bit associativity values. To form |
1360 | * the complete property we have to add the length in the first cell. | ||
1361 | */ | ||
1362 | #define VPHN_ASSOC_BUFSIZE (6*sizeof(u64)/sizeof(u32) + 1) | ||
1359 | 1363 | ||
1360 | /* | 1364 | /* |
1361 | * Convert the associativity domain numbers returned from the hypervisor | 1365 | * Convert the associativity domain numbers returned from the hypervisor |
@@ -1363,15 +1367,14 @@ static int update_cpu_associativity_changes_mask(void) | |||
1363 | */ | 1367 | */ |
1364 | static int vphn_unpack_associativity(const long *packed, unsigned int *unpacked) | 1368 | static int vphn_unpack_associativity(const long *packed, unsigned int *unpacked) |
1365 | { | 1369 | { |
1366 | int i = 0; | 1370 | int i, nr_assoc_doms = 0; |
1367 | int nr_assoc_doms = 0; | ||
1368 | const u16 *field = (const u16*) packed; | 1371 | const u16 *field = (const u16*) packed; |
1369 | 1372 | ||
1370 | #define VPHN_FIELD_UNUSED (0xffff) | 1373 | #define VPHN_FIELD_UNUSED (0xffff) |
1371 | #define VPHN_FIELD_MSB (0x8000) | 1374 | #define VPHN_FIELD_MSB (0x8000) |
1372 | #define VPHN_FIELD_MASK (~VPHN_FIELD_MSB) | 1375 | #define VPHN_FIELD_MASK (~VPHN_FIELD_MSB) |
1373 | 1376 | ||
1374 | for (i = 0; i < VPHN_ASSOC_BUFSIZE; i++) { | 1377 | for (i = 1; i < VPHN_ASSOC_BUFSIZE; i++) { |
1375 | if (*field == VPHN_FIELD_UNUSED) { | 1378 | if (*field == VPHN_FIELD_UNUSED) { |
1376 | /* All significant fields processed, and remaining | 1379 | /* All significant fields processed, and remaining |
1377 | * fields contain the reserved value of all 1's. | 1380 | * fields contain the reserved value of all 1's. |
@@ -1379,14 +1382,12 @@ static int vphn_unpack_associativity(const long *packed, unsigned int *unpacked) | |||
1379 | */ | 1382 | */ |
1380 | unpacked[i] = *((u32*)field); | 1383 | unpacked[i] = *((u32*)field); |
1381 | field += 2; | 1384 | field += 2; |
1382 | } | 1385 | } else if (*field & VPHN_FIELD_MSB) { |
1383 | else if (*field & VPHN_FIELD_MSB) { | ||
1384 | /* Data is in the lower 15 bits of this field */ | 1386 | /* Data is in the lower 15 bits of this field */ |
1385 | unpacked[i] = *field & VPHN_FIELD_MASK; | 1387 | unpacked[i] = *field & VPHN_FIELD_MASK; |
1386 | field++; | 1388 | field++; |
1387 | nr_assoc_doms++; | 1389 | nr_assoc_doms++; |
1388 | } | 1390 | } else { |
1389 | else { | ||
1390 | /* Data is in the lower 15 bits of this field | 1391 | /* Data is in the lower 15 bits of this field |
1391 | * concatenated with the next 16 bit field | 1392 | * concatenated with the next 16 bit field |
1392 | */ | 1393 | */ |
@@ -1396,6 +1397,9 @@ static int vphn_unpack_associativity(const long *packed, unsigned int *unpacked) | |||
1396 | } | 1397 | } |
1397 | } | 1398 | } |
1398 | 1399 | ||
1400 | /* The first cell contains the length of the property */ | ||
1401 | unpacked[0] = nr_assoc_doms; | ||
1402 | |||
1399 | return nr_assoc_doms; | 1403 | return nr_assoc_doms; |
1400 | } | 1404 | } |
1401 | 1405 | ||
@@ -1405,7 +1409,7 @@ static int vphn_unpack_associativity(const long *packed, unsigned int *unpacked) | |||
1405 | */ | 1409 | */ |
1406 | static long hcall_vphn(unsigned long cpu, unsigned int *associativity) | 1410 | static long hcall_vphn(unsigned long cpu, unsigned int *associativity) |
1407 | { | 1411 | { |
1408 | long rc = 0; | 1412 | long rc; |
1409 | long retbuf[PLPAR_HCALL9_BUFSIZE] = {0}; | 1413 | long retbuf[PLPAR_HCALL9_BUFSIZE] = {0}; |
1410 | u64 flags = 1; | 1414 | u64 flags = 1; |
1411 | int hwcpu = get_hard_smp_processor_id(cpu); | 1415 | int hwcpu = get_hard_smp_processor_id(cpu); |
@@ -1419,7 +1423,7 @@ static long hcall_vphn(unsigned long cpu, unsigned int *associativity) | |||
1419 | static long vphn_get_associativity(unsigned long cpu, | 1423 | static long vphn_get_associativity(unsigned long cpu, |
1420 | unsigned int *associativity) | 1424 | unsigned int *associativity) |
1421 | { | 1425 | { |
1422 | long rc = 0; | 1426 | long rc; |
1423 | 1427 | ||
1424 | rc = hcall_vphn(cpu, associativity); | 1428 | rc = hcall_vphn(cpu, associativity); |
1425 | 1429 | ||
@@ -1445,9 +1449,9 @@ static long vphn_get_associativity(unsigned long cpu, | |||
1445 | */ | 1449 | */ |
1446 | int arch_update_cpu_topology(void) | 1450 | int arch_update_cpu_topology(void) |
1447 | { | 1451 | { |
1448 | int cpu = 0, nid = 0, old_nid = 0; | 1452 | int cpu, nid, old_nid; |
1449 | unsigned int associativity[VPHN_ASSOC_BUFSIZE] = {0}; | 1453 | unsigned int associativity[VPHN_ASSOC_BUFSIZE] = {0}; |
1450 | struct sys_device *sysdev = NULL; | 1454 | struct sys_device *sysdev; |
1451 | 1455 | ||
1452 | for_each_cpu_mask(cpu, cpu_associativity_changes_mask) { | 1456 | for_each_cpu_mask(cpu, cpu_associativity_changes_mask) { |
1453 | vphn_get_associativity(cpu, associativity); | 1457 | vphn_get_associativity(cpu, associativity); |
@@ -1512,7 +1516,8 @@ int start_topology_update(void) | |||
1512 | { | 1516 | { |
1513 | int rc = 0; | 1517 | int rc = 0; |
1514 | 1518 | ||
1515 | if (firmware_has_feature(FW_FEATURE_VPHN)) { | 1519 | if (firmware_has_feature(FW_FEATURE_VPHN) && |
1520 | get_lppaca()->shared_proc) { | ||
1516 | vphn_enabled = 1; | 1521 | vphn_enabled = 1; |
1517 | setup_cpu_associativity_change_counters(); | 1522 | setup_cpu_associativity_change_counters(); |
1518 | init_timer_deferrable(&topology_timer); | 1523 | init_timer_deferrable(&topology_timer); |
diff --git a/arch/powerpc/platforms/83xx/mpc830x_rdb.c b/arch/powerpc/platforms/83xx/mpc830x_rdb.c index 661d354e4ff..d0c4e15b779 100644 --- a/arch/powerpc/platforms/83xx/mpc830x_rdb.c +++ b/arch/powerpc/platforms/83xx/mpc830x_rdb.c | |||
@@ -57,12 +57,12 @@ static void __init mpc830x_rdb_init_IRQ(void) | |||
57 | ipic_set_default_priority(); | 57 | ipic_set_default_priority(); |
58 | } | 58 | } |
59 | 59 | ||
60 | struct const char *board[] __initdata = { | 60 | static const char *board[] __initdata = { |
61 | "MPC8308RDB", | 61 | "MPC8308RDB", |
62 | "fsl,mpc8308rdb", | 62 | "fsl,mpc8308rdb", |
63 | "denx,mpc8308_p1m", | 63 | "denx,mpc8308_p1m", |
64 | NULL | 64 | NULL |
65 | } | 65 | }; |
66 | 66 | ||
67 | /* | 67 | /* |
68 | * Called very early, MMU is off, device-tree isn't unflattened | 68 | * Called very early, MMU is off, device-tree isn't unflattened |
diff --git a/arch/powerpc/platforms/83xx/mpc831x_rdb.c b/arch/powerpc/platforms/83xx/mpc831x_rdb.c index b54cd736a89..f859ead49a8 100644 --- a/arch/powerpc/platforms/83xx/mpc831x_rdb.c +++ b/arch/powerpc/platforms/83xx/mpc831x_rdb.c | |||
@@ -60,11 +60,11 @@ static void __init mpc831x_rdb_init_IRQ(void) | |||
60 | ipic_set_default_priority(); | 60 | ipic_set_default_priority(); |
61 | } | 61 | } |
62 | 62 | ||
63 | struct const char *board[] __initdata = { | 63 | static const char *board[] __initdata = { |
64 | "MPC8313ERDB", | 64 | "MPC8313ERDB", |
65 | "fsl,mpc8315erdb", | 65 | "fsl,mpc8315erdb", |
66 | NULL | 66 | NULL |
67 | } | 67 | }; |
68 | 68 | ||
69 | /* | 69 | /* |
70 | * Called very early, MMU is off, device-tree isn't unflattened | 70 | * Called very early, MMU is off, device-tree isn't unflattened |
diff --git a/arch/powerpc/platforms/83xx/mpc83xx.h b/arch/powerpc/platforms/83xx/mpc83xx.h index 0fea8811d45..82a434510d8 100644 --- a/arch/powerpc/platforms/83xx/mpc83xx.h +++ b/arch/powerpc/platforms/83xx/mpc83xx.h | |||
@@ -35,6 +35,8 @@ | |||
35 | 35 | ||
36 | /* system i/o configuration register high */ | 36 | /* system i/o configuration register high */ |
37 | #define MPC83XX_SICRH_OFFS 0x118 | 37 | #define MPC83XX_SICRH_OFFS 0x118 |
38 | #define MPC8308_SICRH_USB_MASK 0x000c0000 | ||
39 | #define MPC8308_SICRH_USB_ULPI 0x00040000 | ||
38 | #define MPC834X_SICRH_USB_UTMI 0x00020000 | 40 | #define MPC834X_SICRH_USB_UTMI 0x00020000 |
39 | #define MPC831X_SICRH_USB_MASK 0x000000e0 | 41 | #define MPC831X_SICRH_USB_MASK 0x000000e0 |
40 | #define MPC831X_SICRH_USB_ULPI 0x000000a0 | 42 | #define MPC831X_SICRH_USB_ULPI 0x000000a0 |
diff --git a/arch/powerpc/platforms/83xx/usb.c b/arch/powerpc/platforms/83xx/usb.c index 3ba4bb7d41b..2c64164722d 100644 --- a/arch/powerpc/platforms/83xx/usb.c +++ b/arch/powerpc/platforms/83xx/usb.c | |||
@@ -127,7 +127,8 @@ int mpc831x_usb_cfg(void) | |||
127 | 127 | ||
128 | /* Configure clock */ | 128 | /* Configure clock */ |
129 | immr_node = of_get_parent(np); | 129 | immr_node = of_get_parent(np); |
130 | if (immr_node && of_device_is_compatible(immr_node, "fsl,mpc8315-immr")) | 130 | if (immr_node && (of_device_is_compatible(immr_node, "fsl,mpc8315-immr") || |
131 | of_device_is_compatible(immr_node, "fsl,mpc8308-immr"))) | ||
131 | clrsetbits_be32(immap + MPC83XX_SCCR_OFFS, | 132 | clrsetbits_be32(immap + MPC83XX_SCCR_OFFS, |
132 | MPC8315_SCCR_USB_MASK, | 133 | MPC8315_SCCR_USB_MASK, |
133 | MPC8315_SCCR_USB_DRCM_01); | 134 | MPC8315_SCCR_USB_DRCM_01); |
@@ -138,7 +139,11 @@ int mpc831x_usb_cfg(void) | |||
138 | 139 | ||
139 | /* Configure pin mux for ULPI. There is no pin mux for UTMI */ | 140 | /* Configure pin mux for ULPI. There is no pin mux for UTMI */ |
140 | if (prop && !strcmp(prop, "ulpi")) { | 141 | if (prop && !strcmp(prop, "ulpi")) { |
141 | if (of_device_is_compatible(immr_node, "fsl,mpc8315-immr")) { | 142 | if (of_device_is_compatible(immr_node, "fsl,mpc8308-immr")) { |
143 | clrsetbits_be32(immap + MPC83XX_SICRH_OFFS, | ||
144 | MPC8308_SICRH_USB_MASK, | ||
145 | MPC8308_SICRH_USB_ULPI); | ||
146 | } else if (of_device_is_compatible(immr_node, "fsl,mpc8315-immr")) { | ||
142 | clrsetbits_be32(immap + MPC83XX_SICRL_OFFS, | 147 | clrsetbits_be32(immap + MPC83XX_SICRL_OFFS, |
143 | MPC8315_SICRL_USB_MASK, | 148 | MPC8315_SICRL_USB_MASK, |
144 | MPC8315_SICRL_USB_ULPI); | 149 | MPC8315_SICRL_USB_ULPI); |
@@ -173,6 +178,9 @@ int mpc831x_usb_cfg(void) | |||
173 | !strcmp(prop, "utmi"))) { | 178 | !strcmp(prop, "utmi"))) { |
174 | u32 refsel; | 179 | u32 refsel; |
175 | 180 | ||
181 | if (of_device_is_compatible(immr_node, "fsl,mpc8308-immr")) | ||
182 | goto out; | ||
183 | |||
176 | if (of_device_is_compatible(immr_node, "fsl,mpc8315-immr")) | 184 | if (of_device_is_compatible(immr_node, "fsl,mpc8315-immr")) |
177 | refsel = CONTROL_REFSEL_24MHZ; | 185 | refsel = CONTROL_REFSEL_24MHZ; |
178 | else | 186 | else |
@@ -186,9 +194,11 @@ int mpc831x_usb_cfg(void) | |||
186 | temp = CONTROL_PHY_CLK_SEL_ULPI; | 194 | temp = CONTROL_PHY_CLK_SEL_ULPI; |
187 | #ifdef CONFIG_USB_OTG | 195 | #ifdef CONFIG_USB_OTG |
188 | /* Set OTG_PORT */ | 196 | /* Set OTG_PORT */ |
189 | dr_mode = of_get_property(np, "dr_mode", NULL); | 197 | if (!of_device_is_compatible(immr_node, "fsl,mpc8308-immr")) { |
190 | if (dr_mode && !strcmp(dr_mode, "otg")) | 198 | dr_mode = of_get_property(np, "dr_mode", NULL); |
191 | temp |= CONTROL_OTG_PORT; | 199 | if (dr_mode && !strcmp(dr_mode, "otg")) |
200 | temp |= CONTROL_OTG_PORT; | ||
201 | } | ||
192 | #endif /* CONFIG_USB_OTG */ | 202 | #endif /* CONFIG_USB_OTG */ |
193 | out_be32(usb_regs + FSL_USB2_CONTROL_OFFS, temp); | 203 | out_be32(usb_regs + FSL_USB2_CONTROL_OFFS, temp); |
194 | } else { | 204 | } else { |
@@ -196,6 +206,7 @@ int mpc831x_usb_cfg(void) | |||
196 | ret = -EINVAL; | 206 | ret = -EINVAL; |
197 | } | 207 | } |
198 | 208 | ||
209 | out: | ||
199 | iounmap(usb_regs); | 210 | iounmap(usb_regs); |
200 | of_node_put(np); | 211 | of_node_put(np); |
201 | return ret; | 212 | return ret; |
diff --git a/arch/powerpc/platforms/cell/cpufreq_spudemand.c b/arch/powerpc/platforms/cell/cpufreq_spudemand.c index 968c1c0b4d5..d809836bcf5 100644 --- a/arch/powerpc/platforms/cell/cpufreq_spudemand.c +++ b/arch/powerpc/platforms/cell/cpufreq_spudemand.c | |||
@@ -39,8 +39,6 @@ struct spu_gov_info_struct { | |||
39 | }; | 39 | }; |
40 | static DEFINE_PER_CPU(struct spu_gov_info_struct, spu_gov_info); | 40 | static DEFINE_PER_CPU(struct spu_gov_info_struct, spu_gov_info); |
41 | 41 | ||
42 | static struct workqueue_struct *kspugov_wq; | ||
43 | |||
44 | static int calc_freq(struct spu_gov_info_struct *info) | 42 | static int calc_freq(struct spu_gov_info_struct *info) |
45 | { | 43 | { |
46 | int cpu; | 44 | int cpu; |
@@ -71,14 +69,14 @@ static void spu_gov_work(struct work_struct *work) | |||
71 | __cpufreq_driver_target(info->policy, target_freq, CPUFREQ_RELATION_H); | 69 | __cpufreq_driver_target(info->policy, target_freq, CPUFREQ_RELATION_H); |
72 | 70 | ||
73 | delay = usecs_to_jiffies(info->poll_int); | 71 | delay = usecs_to_jiffies(info->poll_int); |
74 | queue_delayed_work_on(info->policy->cpu, kspugov_wq, &info->work, delay); | 72 | schedule_delayed_work_on(info->policy->cpu, &info->work, delay); |
75 | } | 73 | } |
76 | 74 | ||
77 | static void spu_gov_init_work(struct spu_gov_info_struct *info) | 75 | static void spu_gov_init_work(struct spu_gov_info_struct *info) |
78 | { | 76 | { |
79 | int delay = usecs_to_jiffies(info->poll_int); | 77 | int delay = usecs_to_jiffies(info->poll_int); |
80 | INIT_DELAYED_WORK_DEFERRABLE(&info->work, spu_gov_work); | 78 | INIT_DELAYED_WORK_DEFERRABLE(&info->work, spu_gov_work); |
81 | queue_delayed_work_on(info->policy->cpu, kspugov_wq, &info->work, delay); | 79 | schedule_delayed_work_on(info->policy->cpu, &info->work, delay); |
82 | } | 80 | } |
83 | 81 | ||
84 | static void spu_gov_cancel_work(struct spu_gov_info_struct *info) | 82 | static void spu_gov_cancel_work(struct spu_gov_info_struct *info) |
@@ -152,27 +150,15 @@ static int __init spu_gov_init(void) | |||
152 | { | 150 | { |
153 | int ret; | 151 | int ret; |
154 | 152 | ||
155 | kspugov_wq = create_workqueue("kspugov"); | ||
156 | if (!kspugov_wq) { | ||
157 | printk(KERN_ERR "creation of kspugov failed\n"); | ||
158 | ret = -EFAULT; | ||
159 | goto out; | ||
160 | } | ||
161 | |||
162 | ret = cpufreq_register_governor(&spu_governor); | 153 | ret = cpufreq_register_governor(&spu_governor); |
163 | if (ret) { | 154 | if (ret) |
164 | printk(KERN_ERR "registration of governor failed\n"); | 155 | printk(KERN_ERR "registration of governor failed\n"); |
165 | destroy_workqueue(kspugov_wq); | ||
166 | goto out; | ||
167 | } | ||
168 | out: | ||
169 | return ret; | 156 | return ret; |
170 | } | 157 | } |
171 | 158 | ||
172 | static void __exit spu_gov_exit(void) | 159 | static void __exit spu_gov_exit(void) |
173 | { | 160 | { |
174 | cpufreq_unregister_governor(&spu_governor); | 161 | cpufreq_unregister_governor(&spu_governor); |
175 | destroy_workqueue(kspugov_wq); | ||
176 | } | 162 | } |
177 | 163 | ||
178 | 164 | ||
diff --git a/arch/powerpc/platforms/cell/qpace_setup.c b/arch/powerpc/platforms/cell/qpace_setup.c index 1b574904275..d31c594cfdf 100644 --- a/arch/powerpc/platforms/cell/qpace_setup.c +++ b/arch/powerpc/platforms/cell/qpace_setup.c | |||
@@ -145,9 +145,4 @@ define_machine(qpace) { | |||
145 | .calibrate_decr = generic_calibrate_decr, | 145 | .calibrate_decr = generic_calibrate_decr, |
146 | .progress = qpace_progress, | 146 | .progress = qpace_progress, |
147 | .init_IRQ = iic_init_IRQ, | 147 | .init_IRQ = iic_init_IRQ, |
148 | #ifdef CONFIG_KEXEC | ||
149 | .machine_kexec = default_machine_kexec, | ||
150 | .machine_kexec_prepare = default_machine_kexec_prepare, | ||
151 | .machine_crash_shutdown = default_machine_crash_shutdown, | ||
152 | #endif | ||
153 | }; | 148 | }; |
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c index 8547e86bfb4..acfaccea5f4 100644 --- a/arch/powerpc/platforms/cell/spu_base.c +++ b/arch/powerpc/platforms/cell/spu_base.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <asm/spu_csa.h> | 37 | #include <asm/spu_csa.h> |
38 | #include <asm/xmon.h> | 38 | #include <asm/xmon.h> |
39 | #include <asm/prom.h> | 39 | #include <asm/prom.h> |
40 | #include <asm/kexec.h> | ||
40 | 41 | ||
41 | const struct spu_management_ops *spu_management_ops; | 42 | const struct spu_management_ops *spu_management_ops; |
42 | EXPORT_SYMBOL_GPL(spu_management_ops); | 43 | EXPORT_SYMBOL_GPL(spu_management_ops); |
@@ -727,6 +728,75 @@ static ssize_t spu_stat_show(struct sys_device *sysdev, | |||
727 | 728 | ||
728 | static SYSDEV_ATTR(stat, 0644, spu_stat_show, NULL); | 729 | static SYSDEV_ATTR(stat, 0644, spu_stat_show, NULL); |
729 | 730 | ||
731 | #ifdef CONFIG_KEXEC | ||
732 | |||
733 | struct crash_spu_info { | ||
734 | struct spu *spu; | ||
735 | u32 saved_spu_runcntl_RW; | ||
736 | u32 saved_spu_status_R; | ||
737 | u32 saved_spu_npc_RW; | ||
738 | u64 saved_mfc_sr1_RW; | ||
739 | u64 saved_mfc_dar; | ||
740 | u64 saved_mfc_dsisr; | ||
741 | }; | ||
742 | |||
743 | #define CRASH_NUM_SPUS 16 /* Enough for current hardware */ | ||
744 | static struct crash_spu_info crash_spu_info[CRASH_NUM_SPUS]; | ||
745 | |||
746 | static void crash_kexec_stop_spus(void) | ||
747 | { | ||
748 | struct spu *spu; | ||
749 | int i; | ||
750 | u64 tmp; | ||
751 | |||
752 | for (i = 0; i < CRASH_NUM_SPUS; i++) { | ||
753 | if (!crash_spu_info[i].spu) | ||
754 | continue; | ||
755 | |||
756 | spu = crash_spu_info[i].spu; | ||
757 | |||
758 | crash_spu_info[i].saved_spu_runcntl_RW = | ||
759 | in_be32(&spu->problem->spu_runcntl_RW); | ||
760 | crash_spu_info[i].saved_spu_status_R = | ||
761 | in_be32(&spu->problem->spu_status_R); | ||
762 | crash_spu_info[i].saved_spu_npc_RW = | ||
763 | in_be32(&spu->problem->spu_npc_RW); | ||
764 | |||
765 | crash_spu_info[i].saved_mfc_dar = spu_mfc_dar_get(spu); | ||
766 | crash_spu_info[i].saved_mfc_dsisr = spu_mfc_dsisr_get(spu); | ||
767 | tmp = spu_mfc_sr1_get(spu); | ||
768 | crash_spu_info[i].saved_mfc_sr1_RW = tmp; | ||
769 | |||
770 | tmp &= ~MFC_STATE1_MASTER_RUN_CONTROL_MASK; | ||
771 | spu_mfc_sr1_set(spu, tmp); | ||
772 | |||
773 | __delay(200); | ||
774 | } | ||
775 | } | ||
776 | |||
777 | static void crash_register_spus(struct list_head *list) | ||
778 | { | ||
779 | struct spu *spu; | ||
780 | int ret; | ||
781 | |||
782 | list_for_each_entry(spu, list, full_list) { | ||
783 | if (WARN_ON(spu->number >= CRASH_NUM_SPUS)) | ||
784 | continue; | ||
785 | |||
786 | crash_spu_info[spu->number].spu = spu; | ||
787 | } | ||
788 | |||
789 | ret = crash_shutdown_register(&crash_kexec_stop_spus); | ||
790 | if (ret) | ||
791 | printk(KERN_ERR "Could not register SPU crash handler"); | ||
792 | } | ||
793 | |||
794 | #else | ||
795 | static inline void crash_register_spus(struct list_head *list) | ||
796 | { | ||
797 | } | ||
798 | #endif | ||
799 | |||
730 | static int __init init_spu_base(void) | 800 | static int __init init_spu_base(void) |
731 | { | 801 | { |
732 | int i, ret = 0; | 802 | int i, ret = 0; |
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c index 02f7b113a31..3c7c3f82d84 100644 --- a/arch/powerpc/platforms/cell/spufs/file.c +++ b/arch/powerpc/platforms/cell/spufs/file.c | |||
@@ -219,24 +219,17 @@ spufs_mem_write(struct file *file, const char __user *buffer, | |||
219 | loff_t pos = *ppos; | 219 | loff_t pos = *ppos; |
220 | int ret; | 220 | int ret; |
221 | 221 | ||
222 | if (pos < 0) | ||
223 | return -EINVAL; | ||
224 | if (pos > LS_SIZE) | 222 | if (pos > LS_SIZE) |
225 | return -EFBIG; | 223 | return -EFBIG; |
226 | if (size > LS_SIZE - pos) | ||
227 | size = LS_SIZE - pos; | ||
228 | 224 | ||
229 | ret = spu_acquire(ctx); | 225 | ret = spu_acquire(ctx); |
230 | if (ret) | 226 | if (ret) |
231 | return ret; | 227 | return ret; |
232 | 228 | ||
233 | local_store = ctx->ops->get_ls(ctx); | 229 | local_store = ctx->ops->get_ls(ctx); |
234 | ret = copy_from_user(local_store + pos, buffer, size); | 230 | size = simple_write_to_buffer(local_store, LS_SIZE, ppos, buffer, size); |
235 | spu_release(ctx); | 231 | spu_release(ctx); |
236 | 232 | ||
237 | if (ret) | ||
238 | return -EFAULT; | ||
239 | *ppos = pos + size; | ||
240 | return size; | 233 | return size; |
241 | } | 234 | } |
242 | 235 | ||
@@ -574,18 +567,15 @@ spufs_regs_write(struct file *file, const char __user *buffer, | |||
574 | if (*pos >= sizeof(lscsa->gprs)) | 567 | if (*pos >= sizeof(lscsa->gprs)) |
575 | return -EFBIG; | 568 | return -EFBIG; |
576 | 569 | ||
577 | size = min_t(ssize_t, sizeof(lscsa->gprs) - *pos, size); | ||
578 | *pos += size; | ||
579 | |||
580 | ret = spu_acquire_saved(ctx); | 570 | ret = spu_acquire_saved(ctx); |
581 | if (ret) | 571 | if (ret) |
582 | return ret; | 572 | return ret; |
583 | 573 | ||
584 | ret = copy_from_user((char *)lscsa->gprs + *pos - size, | 574 | size = simple_write_to_buffer(lscsa->gprs, sizeof(lscsa->gprs), pos, |
585 | buffer, size) ? -EFAULT : size; | 575 | buffer, size); |
586 | 576 | ||
587 | spu_release_saved(ctx); | 577 | spu_release_saved(ctx); |
588 | return ret; | 578 | return size; |
589 | } | 579 | } |
590 | 580 | ||
591 | static const struct file_operations spufs_regs_fops = { | 581 | static const struct file_operations spufs_regs_fops = { |
@@ -630,18 +620,15 @@ spufs_fpcr_write(struct file *file, const char __user * buffer, | |||
630 | if (*pos >= sizeof(lscsa->fpcr)) | 620 | if (*pos >= sizeof(lscsa->fpcr)) |
631 | return -EFBIG; | 621 | return -EFBIG; |
632 | 622 | ||
633 | size = min_t(ssize_t, sizeof(lscsa->fpcr) - *pos, size); | ||
634 | |||
635 | ret = spu_acquire_saved(ctx); | 623 | ret = spu_acquire_saved(ctx); |
636 | if (ret) | 624 | if (ret) |
637 | return ret; | 625 | return ret; |
638 | 626 | ||
639 | *pos += size; | 627 | size = simple_write_to_buffer(&lscsa->fpcr, sizeof(lscsa->fpcr), pos, |
640 | ret = copy_from_user((char *)&lscsa->fpcr + *pos - size, | 628 | buffer, size); |
641 | buffer, size) ? -EFAULT : size; | ||
642 | 629 | ||
643 | spu_release_saved(ctx); | 630 | spu_release_saved(ctx); |
644 | return ret; | 631 | return size; |
645 | } | 632 | } |
646 | 633 | ||
647 | static const struct file_operations spufs_fpcr_fops = { | 634 | static const struct file_operations spufs_fpcr_fops = { |
diff --git a/arch/powerpc/platforms/embedded6xx/gamecube.c b/arch/powerpc/platforms/embedded6xx/gamecube.c index 1106fd99627..a138e14bad2 100644 --- a/arch/powerpc/platforms/embedded6xx/gamecube.c +++ b/arch/powerpc/platforms/embedded6xx/gamecube.c | |||
@@ -75,14 +75,6 @@ static void gamecube_shutdown(void) | |||
75 | flipper_quiesce(); | 75 | flipper_quiesce(); |
76 | } | 76 | } |
77 | 77 | ||
78 | #ifdef CONFIG_KEXEC | ||
79 | static int gamecube_kexec_prepare(struct kimage *image) | ||
80 | { | ||
81 | return 0; | ||
82 | } | ||
83 | #endif /* CONFIG_KEXEC */ | ||
84 | |||
85 | |||
86 | define_machine(gamecube) { | 78 | define_machine(gamecube) { |
87 | .name = "gamecube", | 79 | .name = "gamecube", |
88 | .probe = gamecube_probe, | 80 | .probe = gamecube_probe, |
@@ -95,9 +87,6 @@ define_machine(gamecube) { | |||
95 | .calibrate_decr = generic_calibrate_decr, | 87 | .calibrate_decr = generic_calibrate_decr, |
96 | .progress = udbg_progress, | 88 | .progress = udbg_progress, |
97 | .machine_shutdown = gamecube_shutdown, | 89 | .machine_shutdown = gamecube_shutdown, |
98 | #ifdef CONFIG_KEXEC | ||
99 | .machine_kexec_prepare = gamecube_kexec_prepare, | ||
100 | #endif | ||
101 | }; | 90 | }; |
102 | 91 | ||
103 | 92 | ||
diff --git a/arch/powerpc/platforms/embedded6xx/wii.c b/arch/powerpc/platforms/embedded6xx/wii.c index 649473a729b..1b5dc1a2e14 100644 --- a/arch/powerpc/platforms/embedded6xx/wii.c +++ b/arch/powerpc/platforms/embedded6xx/wii.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/irq.h> | 19 | #include <linux/irq.h> |
20 | #include <linux/seq_file.h> | 20 | #include <linux/seq_file.h> |
21 | #include <linux/kexec.h> | ||
22 | #include <linux/of_platform.h> | 21 | #include <linux/of_platform.h> |
23 | #include <linux/memblock.h> | 22 | #include <linux/memblock.h> |
24 | #include <mm/mmu_decl.h> | 23 | #include <mm/mmu_decl.h> |
@@ -226,13 +225,6 @@ static void wii_shutdown(void) | |||
226 | flipper_quiesce(); | 225 | flipper_quiesce(); |
227 | } | 226 | } |
228 | 227 | ||
229 | #ifdef CONFIG_KEXEC | ||
230 | static int wii_machine_kexec_prepare(struct kimage *image) | ||
231 | { | ||
232 | return 0; | ||
233 | } | ||
234 | #endif /* CONFIG_KEXEC */ | ||
235 | |||
236 | define_machine(wii) { | 228 | define_machine(wii) { |
237 | .name = "wii", | 229 | .name = "wii", |
238 | .probe = wii_probe, | 230 | .probe = wii_probe, |
@@ -246,9 +238,6 @@ define_machine(wii) { | |||
246 | .calibrate_decr = generic_calibrate_decr, | 238 | .calibrate_decr = generic_calibrate_decr, |
247 | .progress = udbg_progress, | 239 | .progress = udbg_progress, |
248 | .machine_shutdown = wii_shutdown, | 240 | .machine_shutdown = wii_shutdown, |
249 | #ifdef CONFIG_KEXEC | ||
250 | .machine_kexec_prepare = wii_machine_kexec_prepare, | ||
251 | #endif | ||
252 | }; | 241 | }; |
253 | 242 | ||
254 | static struct of_device_id wii_of_bus[] = { | 243 | static struct of_device_id wii_of_bus[] = { |
diff --git a/arch/powerpc/platforms/iseries/Kconfig b/arch/powerpc/platforms/iseries/Kconfig index 47a20cfb448..e5bc9f75d47 100644 --- a/arch/powerpc/platforms/iseries/Kconfig +++ b/arch/powerpc/platforms/iseries/Kconfig | |||
@@ -2,7 +2,7 @@ config PPC_ISERIES | |||
2 | bool "IBM Legacy iSeries" | 2 | bool "IBM Legacy iSeries" |
3 | depends on PPC64 && PPC_BOOK3S | 3 | depends on PPC64 && PPC_BOOK3S |
4 | select PPC_INDIRECT_IO | 4 | select PPC_INDIRECT_IO |
5 | select PPC_PCI_CHOICE if EMBEDDED | 5 | select PPC_PCI_CHOICE if EXPERT |
6 | 6 | ||
7 | menu "iSeries device drivers" | 7 | menu "iSeries device drivers" |
8 | depends on PPC_ISERIES | 8 | depends on PPC_ISERIES |
diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig index 5d1b743dbe7..5b3da4b4ea7 100644 --- a/arch/powerpc/platforms/pseries/Kconfig +++ b/arch/powerpc/platforms/pseries/Kconfig | |||
@@ -10,7 +10,7 @@ config PPC_PSERIES | |||
10 | select RTAS_ERROR_LOGGING | 10 | select RTAS_ERROR_LOGGING |
11 | select PPC_UDBG_16550 | 11 | select PPC_UDBG_16550 |
12 | select PPC_NATIVE | 12 | select PPC_NATIVE |
13 | select PPC_PCI_CHOICE if EMBEDDED | 13 | select PPC_PCI_CHOICE if EXPERT |
14 | default y | 14 | default y |
15 | 15 | ||
16 | config PPC_SPLPAR | 16 | config PPC_SPLPAR |
@@ -24,9 +24,9 @@ config PPC_SPLPAR | |||
24 | two or more partitions. | 24 | two or more partitions. |
25 | 25 | ||
26 | config EEH | 26 | config EEH |
27 | bool "PCI Extended Error Handling (EEH)" if EMBEDDED | 27 | bool "PCI Extended Error Handling (EEH)" if EXPERT |
28 | depends on PPC_PSERIES && PCI | 28 | depends on PPC_PSERIES && PCI |
29 | default y if !EMBEDDED | 29 | default y if !EXPERT |
30 | 30 | ||
31 | config PSERIES_MSI | 31 | config PSERIES_MSI |
32 | bool | 32 | bool |
diff --git a/arch/powerpc/platforms/pseries/kexec.c b/arch/powerpc/platforms/pseries/kexec.c index 53cbd53d874..77d38a5e2ff 100644 --- a/arch/powerpc/platforms/pseries/kexec.c +++ b/arch/powerpc/platforms/pseries/kexec.c | |||
@@ -61,13 +61,3 @@ void __init setup_kexec_cpu_down_xics(void) | |||
61 | { | 61 | { |
62 | ppc_md.kexec_cpu_down = pseries_kexec_cpu_down_xics; | 62 | ppc_md.kexec_cpu_down = pseries_kexec_cpu_down_xics; |
63 | } | 63 | } |
64 | |||
65 | static int __init pseries_kexec_setup(void) | ||
66 | { | ||
67 | ppc_md.machine_kexec = default_machine_kexec; | ||
68 | ppc_md.machine_kexec_prepare = default_machine_kexec_prepare; | ||
69 | ppc_md.machine_crash_shutdown = default_machine_crash_shutdown; | ||
70 | |||
71 | return 0; | ||
72 | } | ||
73 | machine_device_initcall(pseries, pseries_kexec_setup); | ||
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c index 5d3ea9f60dd..ca5d5898d32 100644 --- a/arch/powerpc/platforms/pseries/lpar.c +++ b/arch/powerpc/platforms/pseries/lpar.c | |||
@@ -713,6 +713,13 @@ EXPORT_SYMBOL(arch_free_page); | |||
713 | /* NB: reg/unreg are called while guarded with the tracepoints_mutex */ | 713 | /* NB: reg/unreg are called while guarded with the tracepoints_mutex */ |
714 | extern long hcall_tracepoint_refcount; | 714 | extern long hcall_tracepoint_refcount; |
715 | 715 | ||
716 | /* | ||
717 | * Since the tracing code might execute hcalls we need to guard against | ||
718 | * recursion. One example of this are spinlocks calling H_YIELD on | ||
719 | * shared processor partitions. | ||
720 | */ | ||
721 | static DEFINE_PER_CPU(unsigned int, hcall_trace_depth); | ||
722 | |||
716 | void hcall_tracepoint_regfunc(void) | 723 | void hcall_tracepoint_regfunc(void) |
717 | { | 724 | { |
718 | hcall_tracepoint_refcount++; | 725 | hcall_tracepoint_refcount++; |
@@ -725,12 +732,42 @@ void hcall_tracepoint_unregfunc(void) | |||
725 | 732 | ||
726 | void __trace_hcall_entry(unsigned long opcode, unsigned long *args) | 733 | void __trace_hcall_entry(unsigned long opcode, unsigned long *args) |
727 | { | 734 | { |
735 | unsigned long flags; | ||
736 | unsigned int *depth; | ||
737 | |||
738 | local_irq_save(flags); | ||
739 | |||
740 | depth = &__get_cpu_var(hcall_trace_depth); | ||
741 | |||
742 | if (*depth) | ||
743 | goto out; | ||
744 | |||
745 | (*depth)++; | ||
728 | trace_hcall_entry(opcode, args); | 746 | trace_hcall_entry(opcode, args); |
747 | (*depth)--; | ||
748 | |||
749 | out: | ||
750 | local_irq_restore(flags); | ||
729 | } | 751 | } |
730 | 752 | ||
731 | void __trace_hcall_exit(long opcode, unsigned long retval, | 753 | void __trace_hcall_exit(long opcode, unsigned long retval, |
732 | unsigned long *retbuf) | 754 | unsigned long *retbuf) |
733 | { | 755 | { |
756 | unsigned long flags; | ||
757 | unsigned int *depth; | ||
758 | |||
759 | local_irq_save(flags); | ||
760 | |||
761 | depth = &__get_cpu_var(hcall_trace_depth); | ||
762 | |||
763 | if (*depth) | ||
764 | goto out; | ||
765 | |||
766 | (*depth)++; | ||
734 | trace_hcall_exit(opcode, retval, retbuf); | 767 | trace_hcall_exit(opcode, retval, retbuf); |
768 | (*depth)--; | ||
769 | |||
770 | out: | ||
771 | local_irq_restore(flags); | ||
735 | } | 772 | } |
736 | #endif | 773 | #endif |
diff --git a/arch/powerpc/platforms/pseries/ras.c b/arch/powerpc/platforms/pseries/ras.c index a4fc6da87c2..c55d7ad9c64 100644 --- a/arch/powerpc/platforms/pseries/ras.c +++ b/arch/powerpc/platforms/pseries/ras.c | |||
@@ -54,7 +54,8 @@ | |||
54 | static unsigned char ras_log_buf[RTAS_ERROR_LOG_MAX]; | 54 | static unsigned char ras_log_buf[RTAS_ERROR_LOG_MAX]; |
55 | static DEFINE_SPINLOCK(ras_log_buf_lock); | 55 | static DEFINE_SPINLOCK(ras_log_buf_lock); |
56 | 56 | ||
57 | static char mce_data_buf[RTAS_ERROR_LOG_MAX]; | 57 | static char global_mce_data_buf[RTAS_ERROR_LOG_MAX]; |
58 | static DEFINE_PER_CPU(__u64, mce_data_buf); | ||
58 | 59 | ||
59 | static int ras_get_sensor_state_token; | 60 | static int ras_get_sensor_state_token; |
60 | static int ras_check_exception_token; | 61 | static int ras_check_exception_token; |
@@ -196,12 +197,24 @@ static irqreturn_t ras_error_interrupt(int irq, void *dev_id) | |||
196 | return IRQ_HANDLED; | 197 | return IRQ_HANDLED; |
197 | } | 198 | } |
198 | 199 | ||
199 | /* Get the error information for errors coming through the | 200 | /* |
201 | * Some versions of FWNMI place the buffer inside the 4kB page starting at | ||
202 | * 0x7000. Other versions place it inside the rtas buffer. We check both. | ||
203 | */ | ||
204 | #define VALID_FWNMI_BUFFER(A) \ | ||
205 | ((((A) >= 0x7000) && ((A) < 0x7ff0)) || \ | ||
206 | (((A) >= rtas.base) && ((A) < (rtas.base + rtas.size - 16)))) | ||
207 | |||
208 | /* | ||
209 | * Get the error information for errors coming through the | ||
200 | * FWNMI vectors. The pt_regs' r3 will be updated to reflect | 210 | * FWNMI vectors. The pt_regs' r3 will be updated to reflect |
201 | * the actual r3 if possible, and a ptr to the error log entry | 211 | * the actual r3 if possible, and a ptr to the error log entry |
202 | * will be returned if found. | 212 | * will be returned if found. |
203 | * | 213 | * |
204 | * The mce_data_buf does not have any locks or protection around it, | 214 | * If the RTAS error is not of the extended type, then we put it in a per |
215 | * cpu 64bit buffer. If it is the extended type we use global_mce_data_buf. | ||
216 | * | ||
217 | * The global_mce_data_buf does not have any locks or protection around it, | ||
205 | * if a second machine check comes in, or a system reset is done | 218 | * if a second machine check comes in, or a system reset is done |
206 | * before we have logged the error, then we will get corruption in the | 219 | * before we have logged the error, then we will get corruption in the |
207 | * error log. This is preferable over holding off on calling | 220 | * error log. This is preferable over holding off on calling |
@@ -210,20 +223,31 @@ static irqreturn_t ras_error_interrupt(int irq, void *dev_id) | |||
210 | */ | 223 | */ |
211 | static struct rtas_error_log *fwnmi_get_errinfo(struct pt_regs *regs) | 224 | static struct rtas_error_log *fwnmi_get_errinfo(struct pt_regs *regs) |
212 | { | 225 | { |
213 | unsigned long errdata = regs->gpr[3]; | ||
214 | struct rtas_error_log *errhdr = NULL; | ||
215 | unsigned long *savep; | 226 | unsigned long *savep; |
227 | struct rtas_error_log *h, *errhdr = NULL; | ||
228 | |||
229 | if (!VALID_FWNMI_BUFFER(regs->gpr[3])) { | ||
230 | printk(KERN_ERR "FWNMI: corrupt r3\n"); | ||
231 | return NULL; | ||
232 | } | ||
216 | 233 | ||
217 | if ((errdata >= 0x7000 && errdata < 0x7fff0) || | 234 | savep = __va(regs->gpr[3]); |
218 | (errdata >= rtas.base && errdata < rtas.base + rtas.size - 16)) { | 235 | regs->gpr[3] = savep[0]; /* restore original r3 */ |
219 | savep = __va(errdata); | 236 | |
220 | regs->gpr[3] = savep[0]; /* restore original r3 */ | 237 | /* If it isn't an extended log we can use the per cpu 64bit buffer */ |
221 | memset(mce_data_buf, 0, RTAS_ERROR_LOG_MAX); | 238 | h = (struct rtas_error_log *)&savep[1]; |
222 | memcpy(mce_data_buf, (char *)(savep + 1), RTAS_ERROR_LOG_MAX); | 239 | if (!h->extended) { |
223 | errhdr = (struct rtas_error_log *)mce_data_buf; | 240 | memcpy(&__get_cpu_var(mce_data_buf), h, sizeof(__u64)); |
241 | errhdr = (struct rtas_error_log *)&__get_cpu_var(mce_data_buf); | ||
224 | } else { | 242 | } else { |
225 | printk("FWNMI: corrupt r3\n"); | 243 | int len; |
244 | |||
245 | len = max_t(int, 8+h->extended_log_length, RTAS_ERROR_LOG_MAX); | ||
246 | memset(global_mce_data_buf, 0, RTAS_ERROR_LOG_MAX); | ||
247 | memcpy(global_mce_data_buf, h, len); | ||
248 | errhdr = (struct rtas_error_log *)global_mce_data_buf; | ||
226 | } | 249 | } |
250 | |||
227 | return errhdr; | 251 | return errhdr; |
228 | } | 252 | } |
229 | 253 | ||
@@ -235,7 +259,7 @@ static void fwnmi_release_errinfo(void) | |||
235 | { | 259 | { |
236 | int ret = rtas_call(rtas_token("ibm,nmi-interlock"), 0, 1, NULL); | 260 | int ret = rtas_call(rtas_token("ibm,nmi-interlock"), 0, 1, NULL); |
237 | if (ret != 0) | 261 | if (ret != 0) |
238 | printk("FWNMI: nmi-interlock failed: %d\n", ret); | 262 | printk(KERN_ERR "FWNMI: nmi-interlock failed: %d\n", ret); |
239 | } | 263 | } |
240 | 264 | ||
241 | int pSeries_system_reset_exception(struct pt_regs *regs) | 265 | int pSeries_system_reset_exception(struct pt_regs *regs) |
@@ -259,31 +283,43 @@ int pSeries_system_reset_exception(struct pt_regs *regs) | |||
259 | * Return 1 if corrected (or delivered a signal). | 283 | * Return 1 if corrected (or delivered a signal). |
260 | * Return 0 if there is nothing we can do. | 284 | * Return 0 if there is nothing we can do. |
261 | */ | 285 | */ |
262 | static int recover_mce(struct pt_regs *regs, struct rtas_error_log * err) | 286 | static int recover_mce(struct pt_regs *regs, struct rtas_error_log *err) |
263 | { | 287 | { |
264 | int nonfatal = 0; | 288 | int recovered = 0; |
265 | 289 | ||
266 | if (err->disposition == RTAS_DISP_FULLY_RECOVERED) { | 290 | if (!(regs->msr & MSR_RI)) { |
291 | /* If MSR_RI isn't set, we cannot recover */ | ||
292 | recovered = 0; | ||
293 | |||
294 | } else if (err->disposition == RTAS_DISP_FULLY_RECOVERED) { | ||
267 | /* Platform corrected itself */ | 295 | /* Platform corrected itself */ |
268 | nonfatal = 1; | 296 | recovered = 1; |
269 | } else if ((regs->msr & MSR_RI) && | 297 | |
270 | user_mode(regs) && | 298 | } else if (err->disposition == RTAS_DISP_LIMITED_RECOVERY) { |
271 | err->severity == RTAS_SEVERITY_ERROR_SYNC && | 299 | /* Platform corrected itself but could be degraded */ |
272 | err->disposition == RTAS_DISP_NOT_RECOVERED && | 300 | printk(KERN_ERR "MCE: limited recovery, system may " |
273 | err->target == RTAS_TARGET_MEMORY && | 301 | "be degraded\n"); |
274 | err->type == RTAS_TYPE_ECC_UNCORR && | 302 | recovered = 1; |
275 | !(current->pid == 0 || is_global_init(current))) { | 303 | |
276 | /* Kill off a user process with an ECC error */ | 304 | } else if (user_mode(regs) && !is_global_init(current) && |
277 | printk(KERN_ERR "MCE: uncorrectable ecc error for pid %d\n", | 305 | err->severity == RTAS_SEVERITY_ERROR_SYNC) { |
278 | current->pid); | 306 | |
279 | /* XXX something better for ECC error? */ | 307 | /* |
280 | _exception(SIGBUS, regs, BUS_ADRERR, regs->nip); | 308 | * If we received a synchronous error when in userspace |
281 | nonfatal = 1; | 309 | * kill the task. Firmware may report details of the fail |
310 | * asynchronously, so we can't rely on the target and type | ||
311 | * fields being valid here. | ||
312 | */ | ||
313 | printk(KERN_ERR "MCE: uncorrectable error, killing task " | ||
314 | "%s:%d\n", current->comm, current->pid); | ||
315 | |||
316 | _exception(SIGBUS, regs, BUS_MCEERR_AR, regs->nip); | ||
317 | recovered = 1; | ||
282 | } | 318 | } |
283 | 319 | ||
284 | log_error((char *)err, ERR_TYPE_RTAS_LOG, !nonfatal); | 320 | log_error((char *)err, ERR_TYPE_RTAS_LOG, 0); |
285 | 321 | ||
286 | return nonfatal; | 322 | return recovered; |
287 | } | 323 | } |
288 | 324 | ||
289 | /* | 325 | /* |
diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c index 9f99bef2ade..8c6cab01327 100644 --- a/arch/powerpc/sysdev/fsl_rio.c +++ b/arch/powerpc/sysdev/fsl_rio.c | |||
@@ -1555,8 +1555,6 @@ int fsl_rio_setup(struct platform_device *dev) | |||
1555 | saved_mcheck_exception = ppc_md.machine_check_exception; | 1555 | saved_mcheck_exception = ppc_md.machine_check_exception; |
1556 | ppc_md.machine_check_exception = fsl_rio_mcheck_exception; | 1556 | ppc_md.machine_check_exception = fsl_rio_mcheck_exception; |
1557 | #endif | 1557 | #endif |
1558 | /* Ensure that RFXE is set */ | ||
1559 | mtspr(SPRN_HID1, (mfspr(SPRN_HID1) | 0x20000)); | ||
1560 | 1558 | ||
1561 | return 0; | 1559 | return 0; |
1562 | err: | 1560 | err: |
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index 7c1342618a3..b0c8469e5dd 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c | |||
@@ -674,7 +674,8 @@ void mpic_unmask_irq(unsigned int irq) | |||
674 | /* make sure mask gets to controller before we return to user */ | 674 | /* make sure mask gets to controller before we return to user */ |
675 | do { | 675 | do { |
676 | if (!loops--) { | 676 | if (!loops--) { |
677 | printk(KERN_ERR "mpic_enable_irq timeout\n"); | 677 | printk(KERN_ERR "%s: timeout on hwirq %u\n", |
678 | __func__, src); | ||
678 | break; | 679 | break; |
679 | } | 680 | } |
680 | } while(mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) & MPIC_VECPRI_MASK); | 681 | } while(mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) & MPIC_VECPRI_MASK); |
@@ -695,7 +696,8 @@ void mpic_mask_irq(unsigned int irq) | |||
695 | /* make sure mask gets to controller before we return to user */ | 696 | /* make sure mask gets to controller before we return to user */ |
696 | do { | 697 | do { |
697 | if (!loops--) { | 698 | if (!loops--) { |
698 | printk(KERN_ERR "mpic_enable_irq timeout\n"); | 699 | printk(KERN_ERR "%s: timeout on hwirq %u\n", |
700 | __func__, src); | ||
699 | break; | 701 | break; |
700 | } | 702 | } |
701 | } while(!(mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) & MPIC_VECPRI_MASK)); | 703 | } while(!(mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) & MPIC_VECPRI_MASK)); |
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index ff19efdf6fe..636bcb81d06 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -406,7 +406,7 @@ config QDIO | |||
406 | If unsure, say Y. | 406 | If unsure, say Y. |
407 | 407 | ||
408 | config CHSC_SCH | 408 | config CHSC_SCH |
409 | def_tristate y | 409 | def_tristate m |
410 | prompt "Support for CHSC subchannels" | 410 | prompt "Support for CHSC subchannels" |
411 | help | 411 | help |
412 | This driver allows usage of CHSC subchannels. A CHSC subchannel | 412 | This driver allows usage of CHSC subchannels. A CHSC subchannel |
diff --git a/arch/s390/defconfig b/arch/s390/defconfig index d79697157ac..29c82c640a8 100644 --- a/arch/s390/defconfig +++ b/arch/s390/defconfig | |||
@@ -5,10 +5,21 @@ CONFIG_AUDIT=y | |||
5 | CONFIG_RCU_TRACE=y | 5 | CONFIG_RCU_TRACE=y |
6 | CONFIG_IKCONFIG=y | 6 | CONFIG_IKCONFIG=y |
7 | CONFIG_IKCONFIG_PROC=y | 7 | CONFIG_IKCONFIG_PROC=y |
8 | CONFIG_CGROUPS=y | ||
9 | CONFIG_CPUSETS=y | ||
10 | CONFIG_CGROUP_CPUACCT=y | ||
11 | CONFIG_RESOURCE_COUNTERS=y | ||
12 | CONFIG_CGROUP_MEM_RES_CTLR=y | ||
13 | CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y | ||
14 | CONFIG_CGROUP_SCHED=y | ||
15 | CONFIG_RT_GROUP_SCHED=y | ||
16 | CONFIG_BLK_CGROUP=y | ||
8 | CONFIG_BLK_DEV_INITRD=y | 17 | CONFIG_BLK_DEV_INITRD=y |
9 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 18 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
10 | CONFIG_PERF_EVENTS=y | 19 | # CONFIG_COMPAT_BRK is not set |
11 | CONFIG_SLAB=y | 20 | CONFIG_SLAB=y |
21 | CONFIG_PROFILING=y | ||
22 | CONFIG_OPROFILE=y | ||
12 | CONFIG_KPROBES=y | 23 | CONFIG_KPROBES=y |
13 | CONFIG_MODULES=y | 24 | CONFIG_MODULES=y |
14 | CONFIG_MODULE_UNLOAD=y | 25 | CONFIG_MODULE_UNLOAD=y |
@@ -19,7 +30,9 @@ CONFIG_HIGH_RES_TIMERS=y | |||
19 | CONFIG_PREEMPT=y | 30 | CONFIG_PREEMPT=y |
20 | CONFIG_MEMORY_HOTPLUG=y | 31 | CONFIG_MEMORY_HOTPLUG=y |
21 | CONFIG_MEMORY_HOTREMOVE=y | 32 | CONFIG_MEMORY_HOTREMOVE=y |
33 | CONFIG_KSM=y | ||
22 | CONFIG_BINFMT_MISC=m | 34 | CONFIG_BINFMT_MISC=m |
35 | CONFIG_CMM=m | ||
23 | CONFIG_HZ_100=y | 36 | CONFIG_HZ_100=y |
24 | CONFIG_KEXEC=y | 37 | CONFIG_KEXEC=y |
25 | CONFIG_PM=y | 38 | CONFIG_PM=y |
@@ -105,6 +118,7 @@ CONFIG_DEBUG_LIST=y | |||
105 | CONFIG_DEBUG_NOTIFIERS=y | 118 | CONFIG_DEBUG_NOTIFIERS=y |
106 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | 119 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set |
107 | CONFIG_KPROBES_SANITY_TEST=y | 120 | CONFIG_KPROBES_SANITY_TEST=y |
121 | CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y | ||
108 | CONFIG_CPU_NOTIFIER_ERROR_INJECT=m | 122 | CONFIG_CPU_NOTIFIER_ERROR_INJECT=m |
109 | CONFIG_LATENCYTOP=y | 123 | CONFIG_LATENCYTOP=y |
110 | CONFIG_SYSCTL_SYSCALL_CHECK=y | 124 | CONFIG_SYSCTL_SYSCALL_CHECK=y |
diff --git a/arch/s390/include/asm/cacheflush.h b/arch/s390/include/asm/cacheflush.h index 405cc97c624..7e1f7762062 100644 --- a/arch/s390/include/asm/cacheflush.h +++ b/arch/s390/include/asm/cacheflush.h | |||
@@ -1,29 +1,8 @@ | |||
1 | #ifndef _S390_CACHEFLUSH_H | 1 | #ifndef _S390_CACHEFLUSH_H |
2 | #define _S390_CACHEFLUSH_H | 2 | #define _S390_CACHEFLUSH_H |
3 | 3 | ||
4 | /* Keep includes the same across arches. */ | ||
5 | #include <linux/mm.h> | ||
6 | |||
7 | /* Caches aren't brain-dead on the s390. */ | 4 | /* Caches aren't brain-dead on the s390. */ |
8 | #define flush_cache_all() do { } while (0) | 5 | #include <asm-generic/cacheflush.h> |
9 | #define flush_cache_mm(mm) do { } while (0) | ||
10 | #define flush_cache_dup_mm(mm) do { } while (0) | ||
11 | #define flush_cache_range(vma, start, end) do { } while (0) | ||
12 | #define flush_cache_page(vma, vmaddr, pfn) do { } while (0) | ||
13 | #define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 0 | ||
14 | #define flush_dcache_page(page) do { } while (0) | ||
15 | #define flush_dcache_mmap_lock(mapping) do { } while (0) | ||
16 | #define flush_dcache_mmap_unlock(mapping) do { } while (0) | ||
17 | #define flush_icache_range(start, end) do { } while (0) | ||
18 | #define flush_icache_page(vma,pg) do { } while (0) | ||
19 | #define flush_icache_user_range(vma,pg,adr,len) do { } while (0) | ||
20 | #define flush_cache_vmap(start, end) do { } while (0) | ||
21 | #define flush_cache_vunmap(start, end) do { } while (0) | ||
22 | |||
23 | #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ | ||
24 | memcpy(dst, src, len) | ||
25 | #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ | ||
26 | memcpy(dst, src, len) | ||
27 | 6 | ||
28 | #ifdef CONFIG_DEBUG_PAGEALLOC | 7 | #ifdef CONFIG_DEBUG_PAGEALLOC |
29 | void kernel_map_pages(struct page *page, int numpages, int enable); | 8 | void kernel_map_pages(struct page *page, int numpages, int enable); |
diff --git a/arch/s390/include/asm/compat.h b/arch/s390/include/asm/compat.h index a875c2f542e..da359ca6fe5 100644 --- a/arch/s390/include/asm/compat.h +++ b/arch/s390/include/asm/compat.h | |||
@@ -169,7 +169,7 @@ static inline compat_uptr_t ptr_to_compat(void __user *uptr) | |||
169 | 169 | ||
170 | static inline int is_compat_task(void) | 170 | static inline int is_compat_task(void) |
171 | { | 171 | { |
172 | return test_thread_flag(TIF_31BIT); | 172 | return is_32bit_task(); |
173 | } | 173 | } |
174 | 174 | ||
175 | #else | 175 | #else |
diff --git a/arch/s390/include/asm/elf.h b/arch/s390/include/asm/elf.h index 354d42616c7..10c029cfcc7 100644 --- a/arch/s390/include/asm/elf.h +++ b/arch/s390/include/asm/elf.h | |||
@@ -161,7 +161,9 @@ extern unsigned int vdso_enabled; | |||
161 | use of this is to invoke "./ld.so someprog" to test out a new version of | 161 | use of this is to invoke "./ld.so someprog" to test out a new version of |
162 | the loader. We need to make sure that it is out of the way of the program | 162 | the loader. We need to make sure that it is out of the way of the program |
163 | that it will "exec", and that there is sufficient room for the brk. */ | 163 | that it will "exec", and that there is sufficient room for the brk. */ |
164 | #define ELF_ET_DYN_BASE (STACK_TOP / 3 * 2) | 164 | |
165 | extern unsigned long randomize_et_dyn(unsigned long base); | ||
166 | #define ELF_ET_DYN_BASE (randomize_et_dyn(STACK_TOP / 3 * 2)) | ||
165 | 167 | ||
166 | /* This yields a mask that user programs can use to figure out what | 168 | /* This yields a mask that user programs can use to figure out what |
167 | instruction set this CPU supports. */ | 169 | instruction set this CPU supports. */ |
@@ -206,6 +208,8 @@ do { \ | |||
206 | current->mm->context.noexec == 0; \ | 208 | current->mm->context.noexec == 0; \ |
207 | }) | 209 | }) |
208 | 210 | ||
211 | #define STACK_RND_MASK 0x7ffUL | ||
212 | |||
209 | #define ARCH_DLINFO \ | 213 | #define ARCH_DLINFO \ |
210 | do { \ | 214 | do { \ |
211 | if (vdso_enabled) \ | 215 | if (vdso_enabled) \ |
@@ -218,4 +222,7 @@ struct linux_binprm; | |||
218 | #define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1 | 222 | #define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1 |
219 | int arch_setup_additional_pages(struct linux_binprm *, int); | 223 | int arch_setup_additional_pages(struct linux_binprm *, int); |
220 | 224 | ||
225 | extern unsigned long arch_randomize_brk(struct mm_struct *mm); | ||
226 | #define arch_randomize_brk arch_randomize_brk | ||
227 | |||
221 | #endif | 228 | #endif |
diff --git a/arch/s390/include/asm/system.h b/arch/s390/include/asm/system.h index 6710b0eac16..8f8d759f6a7 100644 --- a/arch/s390/include/asm/system.h +++ b/arch/s390/include/asm/system.h | |||
@@ -449,7 +449,7 @@ extern void (*_machine_restart)(char *command); | |||
449 | extern void (*_machine_halt)(void); | 449 | extern void (*_machine_halt)(void); |
450 | extern void (*_machine_power_off)(void); | 450 | extern void (*_machine_power_off)(void); |
451 | 451 | ||
452 | #define arch_align_stack(x) (x) | 452 | extern unsigned long arch_align_stack(unsigned long sp); |
453 | 453 | ||
454 | static inline int tprot(unsigned long addr) | 454 | static inline int tprot(unsigned long addr) |
455 | { | 455 | { |
diff --git a/arch/s390/include/asm/thread_info.h b/arch/s390/include/asm/thread_info.h index ebc77091466..ad1382f7932 100644 --- a/arch/s390/include/asm/thread_info.h +++ b/arch/s390/include/asm/thread_info.h | |||
@@ -118,6 +118,12 @@ static inline struct thread_info *current_thread_info(void) | |||
118 | #define _TIF_SINGLE_STEP (1<<TIF_FREEZE) | 118 | #define _TIF_SINGLE_STEP (1<<TIF_FREEZE) |
119 | #define _TIF_FREEZE (1<<TIF_FREEZE) | 119 | #define _TIF_FREEZE (1<<TIF_FREEZE) |
120 | 120 | ||
121 | #ifdef CONFIG_64BIT | ||
122 | #define is_32bit_task() (test_thread_flag(TIF_31BIT)) | ||
123 | #else | ||
124 | #define is_32bit_task() (1) | ||
125 | #endif | ||
126 | |||
121 | #endif /* __KERNEL__ */ | 127 | #endif /* __KERNEL__ */ |
122 | 128 | ||
123 | #define PREEMPT_ACTIVE 0x4000000 | 129 | #define PREEMPT_ACTIVE 0x4000000 |
diff --git a/arch/s390/include/asm/tlb.h b/arch/s390/include/asm/tlb.h index f1f644f2240..9074a54c4d1 100644 --- a/arch/s390/include/asm/tlb.h +++ b/arch/s390/include/asm/tlb.h | |||
@@ -22,6 +22,7 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/mm.h> | 24 | #include <linux/mm.h> |
25 | #include <linux/pagemap.h> | ||
25 | #include <linux/swap.h> | 26 | #include <linux/swap.h> |
26 | #include <asm/processor.h> | 27 | #include <asm/processor.h> |
27 | #include <asm/pgalloc.h> | 28 | #include <asm/pgalloc.h> |
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index 6ba42222b54..a895e69379f 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c | |||
@@ -30,9 +30,11 @@ | |||
30 | #include <linux/tick.h> | 30 | #include <linux/tick.h> |
31 | #include <linux/elfcore.h> | 31 | #include <linux/elfcore.h> |
32 | #include <linux/kernel_stat.h> | 32 | #include <linux/kernel_stat.h> |
33 | #include <linux/personality.h> | ||
33 | #include <linux/syscalls.h> | 34 | #include <linux/syscalls.h> |
34 | #include <linux/compat.h> | 35 | #include <linux/compat.h> |
35 | #include <linux/kprobes.h> | 36 | #include <linux/kprobes.h> |
37 | #include <linux/random.h> | ||
36 | #include <asm/compat.h> | 38 | #include <asm/compat.h> |
37 | #include <asm/uaccess.h> | 39 | #include <asm/uaccess.h> |
38 | #include <asm/pgtable.h> | 40 | #include <asm/pgtable.h> |
@@ -332,3 +334,39 @@ unsigned long get_wchan(struct task_struct *p) | |||
332 | } | 334 | } |
333 | return 0; | 335 | return 0; |
334 | } | 336 | } |
337 | |||
338 | unsigned long arch_align_stack(unsigned long sp) | ||
339 | { | ||
340 | if (!(current->personality & ADDR_NO_RANDOMIZE) && randomize_va_space) | ||
341 | sp -= get_random_int() & ~PAGE_MASK; | ||
342 | return sp & ~0xf; | ||
343 | } | ||
344 | |||
345 | static inline unsigned long brk_rnd(void) | ||
346 | { | ||
347 | /* 8MB for 32bit, 1GB for 64bit */ | ||
348 | if (is_32bit_task()) | ||
349 | return (get_random_int() & 0x7ffUL) << PAGE_SHIFT; | ||
350 | else | ||
351 | return (get_random_int() & 0x3ffffUL) << PAGE_SHIFT; | ||
352 | } | ||
353 | |||
354 | unsigned long arch_randomize_brk(struct mm_struct *mm) | ||
355 | { | ||
356 | unsigned long ret = PAGE_ALIGN(mm->brk + brk_rnd()); | ||
357 | |||
358 | if (ret < mm->brk) | ||
359 | return mm->brk; | ||
360 | return ret; | ||
361 | } | ||
362 | |||
363 | unsigned long randomize_et_dyn(unsigned long base) | ||
364 | { | ||
365 | unsigned long ret = PAGE_ALIGN(base + brk_rnd()); | ||
366 | |||
367 | if (!(current->flags & PF_RANDOMIZE)) | ||
368 | return base; | ||
369 | if (ret < base) | ||
370 | return base; | ||
371 | return ret; | ||
372 | } | ||
diff --git a/arch/s390/kernel/vdso.c b/arch/s390/kernel/vdso.c index e3150dd2fe7..f438d74dedb 100644 --- a/arch/s390/kernel/vdso.c +++ b/arch/s390/kernel/vdso.c | |||
@@ -203,7 +203,6 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) | |||
203 | if (!uses_interp) | 203 | if (!uses_interp) |
204 | return 0; | 204 | return 0; |
205 | 205 | ||
206 | vdso_base = mm->mmap_base; | ||
207 | #ifdef CONFIG_64BIT | 206 | #ifdef CONFIG_64BIT |
208 | vdso_pagelist = vdso64_pagelist; | 207 | vdso_pagelist = vdso64_pagelist; |
209 | vdso_pages = vdso64_pages; | 208 | vdso_pages = vdso64_pages; |
@@ -233,8 +232,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) | |||
233 | * fail and end up putting it elsewhere. | 232 | * fail and end up putting it elsewhere. |
234 | */ | 233 | */ |
235 | down_write(&mm->mmap_sem); | 234 | down_write(&mm->mmap_sem); |
236 | vdso_base = get_unmapped_area(NULL, vdso_base, | 235 | vdso_base = get_unmapped_area(NULL, 0, vdso_pages << PAGE_SHIFT, 0, 0); |
237 | vdso_pages << PAGE_SHIFT, 0, 0); | ||
238 | if (IS_ERR_VALUE(vdso_base)) { | 236 | if (IS_ERR_VALUE(vdso_base)) { |
239 | rc = vdso_base; | 237 | rc = vdso_base; |
240 | goto out_up; | 238 | goto out_up; |
diff --git a/arch/s390/lib/uaccess_std.c b/arch/s390/lib/uaccess_std.c index 07deaeee14c..a6c4f7ed24a 100644 --- a/arch/s390/lib/uaccess_std.c +++ b/arch/s390/lib/uaccess_std.c | |||
@@ -125,9 +125,9 @@ static size_t copy_in_user_std(size_t size, void __user *to, | |||
125 | unsigned long tmp1; | 125 | unsigned long tmp1; |
126 | 126 | ||
127 | asm volatile( | 127 | asm volatile( |
128 | " sacf 256\n" | ||
128 | " "AHI" %0,-1\n" | 129 | " "AHI" %0,-1\n" |
129 | " jo 5f\n" | 130 | " jo 5f\n" |
130 | " sacf 256\n" | ||
131 | " bras %3,3f\n" | 131 | " bras %3,3f\n" |
132 | "0:"AHI" %0,257\n" | 132 | "0:"AHI" %0,257\n" |
133 | "1: mvc 0(1,%1),0(%2)\n" | 133 | "1: mvc 0(1,%1),0(%2)\n" |
@@ -142,9 +142,8 @@ static size_t copy_in_user_std(size_t size, void __user *to, | |||
142 | "3:"AHI" %0,-256\n" | 142 | "3:"AHI" %0,-256\n" |
143 | " jnm 2b\n" | 143 | " jnm 2b\n" |
144 | "4: ex %0,1b-0b(%3)\n" | 144 | "4: ex %0,1b-0b(%3)\n" |
145 | " sacf 0\n" | ||
146 | "5: "SLR" %0,%0\n" | 145 | "5: "SLR" %0,%0\n" |
147 | "6:\n" | 146 | "6: sacf 0\n" |
148 | EX_TABLE(1b,6b) EX_TABLE(2b,0b) EX_TABLE(4b,0b) | 147 | EX_TABLE(1b,6b) EX_TABLE(2b,0b) EX_TABLE(4b,0b) |
149 | : "+a" (size), "+a" (to), "+a" (from), "=a" (tmp1) | 148 | : "+a" (size), "+a" (to), "+a" (from), "=a" (tmp1) |
150 | : : "cc", "memory"); | 149 | : : "cc", "memory"); |
@@ -156,9 +155,9 @@ static size_t clear_user_std(size_t size, void __user *to) | |||
156 | unsigned long tmp1, tmp2; | 155 | unsigned long tmp1, tmp2; |
157 | 156 | ||
158 | asm volatile( | 157 | asm volatile( |
158 | " sacf 256\n" | ||
159 | " "AHI" %0,-1\n" | 159 | " "AHI" %0,-1\n" |
160 | " jo 5f\n" | 160 | " jo 5f\n" |
161 | " sacf 256\n" | ||
162 | " bras %3,3f\n" | 161 | " bras %3,3f\n" |
163 | " xc 0(1,%1),0(%1)\n" | 162 | " xc 0(1,%1),0(%1)\n" |
164 | "0:"AHI" %0,257\n" | 163 | "0:"AHI" %0,257\n" |
@@ -178,9 +177,8 @@ static size_t clear_user_std(size_t size, void __user *to) | |||
178 | "3:"AHI" %0,-256\n" | 177 | "3:"AHI" %0,-256\n" |
179 | " jnm 2b\n" | 178 | " jnm 2b\n" |
180 | "4: ex %0,0(%3)\n" | 179 | "4: ex %0,0(%3)\n" |
181 | " sacf 0\n" | ||
182 | "5: "SLR" %0,%0\n" | 180 | "5: "SLR" %0,%0\n" |
183 | "6:\n" | 181 | "6: sacf 0\n" |
184 | EX_TABLE(1b,6b) EX_TABLE(2b,0b) EX_TABLE(4b,0b) | 182 | EX_TABLE(1b,6b) EX_TABLE(2b,0b) EX_TABLE(4b,0b) |
185 | : "+a" (size), "+a" (to), "=a" (tmp1), "=a" (tmp2) | 183 | : "+a" (size), "+a" (to), "=a" (tmp1), "=a" (tmp2) |
186 | : : "cc", "memory"); | 184 | : : "cc", "memory"); |
diff --git a/arch/s390/mm/mmap.c b/arch/s390/mm/mmap.c index 869efbaed3e..c9a9f7f1818 100644 --- a/arch/s390/mm/mmap.c +++ b/arch/s390/mm/mmap.c | |||
@@ -27,17 +27,44 @@ | |||
27 | #include <linux/personality.h> | 27 | #include <linux/personality.h> |
28 | #include <linux/mm.h> | 28 | #include <linux/mm.h> |
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/random.h> | ||
30 | #include <asm/pgalloc.h> | 31 | #include <asm/pgalloc.h> |
31 | #include <asm/compat.h> | 32 | #include <asm/compat.h> |
32 | 33 | ||
34 | static unsigned long stack_maxrandom_size(void) | ||
35 | { | ||
36 | if (!(current->flags & PF_RANDOMIZE)) | ||
37 | return 0; | ||
38 | if (current->personality & ADDR_NO_RANDOMIZE) | ||
39 | return 0; | ||
40 | return STACK_RND_MASK << PAGE_SHIFT; | ||
41 | } | ||
42 | |||
33 | /* | 43 | /* |
34 | * Top of mmap area (just below the process stack). | 44 | * Top of mmap area (just below the process stack). |
35 | * | 45 | * |
36 | * Leave an at least ~128 MB hole. | 46 | * Leave at least a ~32 MB hole. |
37 | */ | 47 | */ |
38 | #define MIN_GAP (128*1024*1024) | 48 | #define MIN_GAP (32*1024*1024) |
39 | #define MAX_GAP (STACK_TOP/6*5) | 49 | #define MAX_GAP (STACK_TOP/6*5) |
40 | 50 | ||
51 | static inline int mmap_is_legacy(void) | ||
52 | { | ||
53 | if (current->personality & ADDR_COMPAT_LAYOUT) | ||
54 | return 1; | ||
55 | if (rlimit(RLIMIT_STACK) == RLIM_INFINITY) | ||
56 | return 1; | ||
57 | return sysctl_legacy_va_layout; | ||
58 | } | ||
59 | |||
60 | static unsigned long mmap_rnd(void) | ||
61 | { | ||
62 | if (!(current->flags & PF_RANDOMIZE)) | ||
63 | return 0; | ||
64 | /* 8MB randomization for mmap_base */ | ||
65 | return (get_random_int() & 0x7ffUL) << PAGE_SHIFT; | ||
66 | } | ||
67 | |||
41 | static inline unsigned long mmap_base(void) | 68 | static inline unsigned long mmap_base(void) |
42 | { | 69 | { |
43 | unsigned long gap = rlimit(RLIMIT_STACK); | 70 | unsigned long gap = rlimit(RLIMIT_STACK); |
@@ -46,22 +73,8 @@ static inline unsigned long mmap_base(void) | |||
46 | gap = MIN_GAP; | 73 | gap = MIN_GAP; |
47 | else if (gap > MAX_GAP) | 74 | else if (gap > MAX_GAP) |
48 | gap = MAX_GAP; | 75 | gap = MAX_GAP; |
49 | 76 | gap &= PAGE_MASK; | |
50 | return STACK_TOP - (gap & PAGE_MASK); | 77 | return STACK_TOP - stack_maxrandom_size() - mmap_rnd() - gap; |
51 | } | ||
52 | |||
53 | static inline int mmap_is_legacy(void) | ||
54 | { | ||
55 | #ifdef CONFIG_64BIT | ||
56 | /* | ||
57 | * Force standard allocation for 64 bit programs. | ||
58 | */ | ||
59 | if (!is_compat_task()) | ||
60 | return 1; | ||
61 | #endif | ||
62 | return sysctl_legacy_va_layout || | ||
63 | (current->personality & ADDR_COMPAT_LAYOUT) || | ||
64 | rlimit(RLIMIT_STACK) == RLIM_INFINITY; | ||
65 | } | 78 | } |
66 | 79 | ||
67 | #ifndef CONFIG_64BIT | 80 | #ifndef CONFIG_64BIT |
diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c index 0c719c61972..e1850c28cd6 100644 --- a/arch/s390/mm/pgtable.c +++ b/arch/s390/mm/pgtable.c | |||
@@ -336,7 +336,8 @@ void page_table_free(struct mm_struct *mm, unsigned long *table) | |||
336 | page->flags ^= bits; | 336 | page->flags ^= bits; |
337 | if (page->flags & FRAG_MASK) { | 337 | if (page->flags & FRAG_MASK) { |
338 | /* Page now has some free pgtable fragments. */ | 338 | /* Page now has some free pgtable fragments. */ |
339 | list_move(&page->lru, &mm->context.pgtable_list); | 339 | if (!list_empty(&page->lru)) |
340 | list_move(&page->lru, &mm->context.pgtable_list); | ||
340 | page = NULL; | 341 | page = NULL; |
341 | } else | 342 | } else |
342 | /* All fragments of the 4K page have been freed. */ | 343 | /* All fragments of the 4K page have been freed. */ |
diff --git a/arch/score/Kconfig b/arch/score/Kconfig index 4293fdcb539..27b2295f41f 100644 --- a/arch/score/Kconfig +++ b/arch/score/Kconfig | |||
@@ -1,5 +1,9 @@ | |||
1 | menu "Machine selection" | 1 | menu "Machine selection" |
2 | 2 | ||
3 | config SCORE | ||
4 | def_bool y | ||
5 | select HAVE_GENERIC_HARDIRQS | ||
6 | |||
3 | choice | 7 | choice |
4 | prompt "System type" | 8 | prompt "System type" |
5 | default MACH_SPCT6600 | 9 | default MACH_SPCT6600 |
@@ -53,9 +57,6 @@ config GENERIC_CLOCKEVENTS | |||
53 | config SCHED_NO_NO_OMIT_FRAME_POINTER | 57 | config SCHED_NO_NO_OMIT_FRAME_POINTER |
54 | def_bool y | 58 | def_bool y |
55 | 59 | ||
56 | config GENERIC_HARDIRQS_NO__DO_IRQ | ||
57 | def_bool y | ||
58 | |||
59 | config GENERIC_SYSCALL_TABLE | 60 | config GENERIC_SYSCALL_TABLE |
60 | def_bool y | 61 | def_bool y |
61 | 62 | ||
@@ -68,9 +69,6 @@ menu "Kernel type" | |||
68 | config 32BIT | 69 | config 32BIT |
69 | def_bool y | 70 | def_bool y |
70 | 71 | ||
71 | config GENERIC_HARDIRQS | ||
72 | def_bool y | ||
73 | |||
74 | config ARCH_FLATMEM_ENABLE | 72 | config ARCH_FLATMEM_ENABLE |
75 | def_bool y | 73 | def_bool y |
76 | 74 | ||
diff --git a/arch/score/configs/spct6600_defconfig b/arch/score/configs/spct6600_defconfig index 9883c50e463..df1edbf507a 100644 --- a/arch/score/configs/spct6600_defconfig +++ b/arch/score/configs/spct6600_defconfig | |||
@@ -9,7 +9,7 @@ CONFIG_LOG_BUF_SHIFT=12 | |||
9 | CONFIG_SYSFS_DEPRECATED_V2=y | 9 | CONFIG_SYSFS_DEPRECATED_V2=y |
10 | CONFIG_BLK_DEV_INITRD=y | 10 | CONFIG_BLK_DEV_INITRD=y |
11 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 11 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
12 | CONFIG_EMBEDDED=y | 12 | CONFIG_EXPERT=y |
13 | # CONFIG_KALLSYMS is not set | 13 | # CONFIG_KALLSYMS is not set |
14 | # CONFIG_HOTPLUG is not set | 14 | # CONFIG_HOTPLUG is not set |
15 | CONFIG_SLAB=y | 15 | CONFIG_SLAB=y |
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index fff252209f6..8a9011dced1 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | config SUPERH | 1 | config SUPERH |
2 | def_bool y | 2 | def_bool y |
3 | select EMBEDDED | 3 | select EXPERT |
4 | select CLKDEV_LOOKUP | 4 | select CLKDEV_LOOKUP |
5 | select HAVE_IDE if HAS_IOPORT | 5 | select HAVE_IDE if HAS_IOPORT |
6 | select HAVE_MEMBLOCK | 6 | select HAVE_MEMBLOCK |
@@ -15,6 +15,7 @@ config SUPERH | |||
15 | select HAVE_KERNEL_GZIP | 15 | select HAVE_KERNEL_GZIP |
16 | select HAVE_KERNEL_BZIP2 | 16 | select HAVE_KERNEL_BZIP2 |
17 | select HAVE_KERNEL_LZMA | 17 | select HAVE_KERNEL_LZMA |
18 | select HAVE_KERNEL_XZ | ||
18 | select HAVE_KERNEL_LZO | 19 | select HAVE_KERNEL_LZO |
19 | select HAVE_SYSCALL_TRACEPOINTS | 20 | select HAVE_SYSCALL_TRACEPOINTS |
20 | select HAVE_REGS_AND_STACK_ACCESS_API | 21 | select HAVE_REGS_AND_STACK_ACCESS_API |
diff --git a/arch/sh/Makefile b/arch/sh/Makefile index 9c8c6e1a2a1..e3d8170ad00 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile | |||
@@ -200,7 +200,7 @@ endif | |||
200 | libs-$(CONFIG_SUPERH32) := arch/sh/lib/ $(libs-y) | 200 | libs-$(CONFIG_SUPERH32) := arch/sh/lib/ $(libs-y) |
201 | libs-$(CONFIG_SUPERH64) := arch/sh/lib64/ $(libs-y) | 201 | libs-$(CONFIG_SUPERH64) := arch/sh/lib64/ $(libs-y) |
202 | 202 | ||
203 | BOOT_TARGETS = uImage uImage.bz2 uImage.gz uImage.lzma uImage.lzo \ | 203 | BOOT_TARGETS = uImage uImage.bz2 uImage.gz uImage.lzma uImage.xz uImage.lzo \ |
204 | uImage.srec uImage.bin zImage vmlinux.bin vmlinux.srec \ | 204 | uImage.srec uImage.bin zImage vmlinux.bin vmlinux.srec \ |
205 | romImage | 205 | romImage |
206 | PHONY += $(BOOT_TARGETS) | 206 | PHONY += $(BOOT_TARGETS) |
@@ -230,5 +230,6 @@ define archhelp | |||
230 | @echo '* uImage.gz - Kernel-only image for U-Boot (gzip)' | 230 | @echo '* uImage.gz - Kernel-only image for U-Boot (gzip)' |
231 | @echo ' uImage.bz2 - Kernel-only image for U-Boot (bzip2)' | 231 | @echo ' uImage.bz2 - Kernel-only image for U-Boot (bzip2)' |
232 | @echo ' uImage.lzma - Kernel-only image for U-Boot (lzma)' | 232 | @echo ' uImage.lzma - Kernel-only image for U-Boot (lzma)' |
233 | @echo ' uImage.xz - Kernel-only image for U-Boot (xz)' | ||
233 | @echo ' uImage.lzo - Kernel-only image for U-Boot (lzo)' | 234 | @echo ' uImage.lzo - Kernel-only image for U-Boot (lzo)' |
234 | endef | 235 | endef |
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c index 33b662999fc..701667acfd8 100644 --- a/arch/sh/boards/mach-ecovec24/setup.c +++ b/arch/sh/boards/mach-ecovec24/setup.c | |||
@@ -1294,6 +1294,7 @@ static int __init arch_setup(void) | |||
1294 | i2c_register_board_info(1, i2c1_devices, | 1294 | i2c_register_board_info(1, i2c1_devices, |
1295 | ARRAY_SIZE(i2c1_devices)); | 1295 | ARRAY_SIZE(i2c1_devices)); |
1296 | 1296 | ||
1297 | #if defined(CONFIG_VIDEO_SH_VOU) || defined(CONFIG_VIDEO_SH_VOU_MODULE) | ||
1297 | /* VOU */ | 1298 | /* VOU */ |
1298 | gpio_request(GPIO_FN_DV_D15, NULL); | 1299 | gpio_request(GPIO_FN_DV_D15, NULL); |
1299 | gpio_request(GPIO_FN_DV_D14, NULL); | 1300 | gpio_request(GPIO_FN_DV_D14, NULL); |
@@ -1325,6 +1326,7 @@ static int __init arch_setup(void) | |||
1325 | 1326 | ||
1326 | /* Remove reset */ | 1327 | /* Remove reset */ |
1327 | gpio_set_value(GPIO_PTG4, 1); | 1328 | gpio_set_value(GPIO_PTG4, 1); |
1329 | #endif | ||
1328 | 1330 | ||
1329 | return platform_add_devices(ecovec_devices, | 1331 | return platform_add_devices(ecovec_devices, |
1330 | ARRAY_SIZE(ecovec_devices)); | 1332 | ARRAY_SIZE(ecovec_devices)); |
diff --git a/arch/sh/boot/Makefile b/arch/sh/boot/Makefile index 1ce63624c9b..ba515d80024 100644 --- a/arch/sh/boot/Makefile +++ b/arch/sh/boot/Makefile | |||
@@ -24,12 +24,13 @@ suffix-y := bin | |||
24 | suffix-$(CONFIG_KERNEL_GZIP) := gz | 24 | suffix-$(CONFIG_KERNEL_GZIP) := gz |
25 | suffix-$(CONFIG_KERNEL_BZIP2) := bz2 | 25 | suffix-$(CONFIG_KERNEL_BZIP2) := bz2 |
26 | suffix-$(CONFIG_KERNEL_LZMA) := lzma | 26 | suffix-$(CONFIG_KERNEL_LZMA) := lzma |
27 | suffix-$(CONFIG_KERNEL_XZ) := xz | ||
27 | suffix-$(CONFIG_KERNEL_LZO) := lzo | 28 | suffix-$(CONFIG_KERNEL_LZO) := lzo |
28 | 29 | ||
29 | targets := zImage vmlinux.srec romImage uImage uImage.srec uImage.gz \ | 30 | targets := zImage vmlinux.srec romImage uImage uImage.srec uImage.gz \ |
30 | uImage.bz2 uImage.lzma uImage.lzo uImage.bin | 31 | uImage.bz2 uImage.lzma uImage.xz uImage.lzo uImage.bin |
31 | extra-y += vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma \ | 32 | extra-y += vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma \ |
32 | vmlinux.bin.lzo | 33 | vmlinux.bin.xz vmlinux.bin.lzo |
33 | subdir- := compressed romimage | 34 | subdir- := compressed romimage |
34 | 35 | ||
35 | $(obj)/zImage: $(obj)/compressed/vmlinux FORCE | 36 | $(obj)/zImage: $(obj)/compressed/vmlinux FORCE |
@@ -76,6 +77,9 @@ $(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE | |||
76 | $(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE | 77 | $(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE |
77 | $(call if_changed,lzma) | 78 | $(call if_changed,lzma) |
78 | 79 | ||
80 | $(obj)/vmlinux.bin.xz: $(obj)/vmlinux.bin FORCE | ||
81 | $(call if_changed,xzkern) | ||
82 | |||
79 | $(obj)/vmlinux.bin.lzo: $(obj)/vmlinux.bin FORCE | 83 | $(obj)/vmlinux.bin.lzo: $(obj)/vmlinux.bin FORCE |
80 | $(call if_changed,lzo) | 84 | $(call if_changed,lzo) |
81 | 85 | ||
@@ -88,6 +92,9 @@ $(obj)/uImage.gz: $(obj)/vmlinux.bin.gz | |||
88 | $(obj)/uImage.lzma: $(obj)/vmlinux.bin.lzma | 92 | $(obj)/uImage.lzma: $(obj)/vmlinux.bin.lzma |
89 | $(call if_changed,uimage,lzma) | 93 | $(call if_changed,uimage,lzma) |
90 | 94 | ||
95 | $(obj)/uImage.xz: $(obj)/vmlinux.bin.xz | ||
96 | $(call if_changed,uimage,xz) | ||
97 | |||
91 | $(obj)/uImage.lzo: $(obj)/vmlinux.bin.lzo | 98 | $(obj)/uImage.lzo: $(obj)/vmlinux.bin.lzo |
92 | $(call if_changed,uimage,lzo) | 99 | $(call if_changed,uimage,lzo) |
93 | 100 | ||
diff --git a/arch/sh/boot/compressed/Makefile b/arch/sh/boot/compressed/Makefile index cfa5a087a88..e0b0293bae6 100644 --- a/arch/sh/boot/compressed/Makefile +++ b/arch/sh/boot/compressed/Makefile | |||
@@ -6,7 +6,7 @@ | |||
6 | 6 | ||
7 | targets := vmlinux vmlinux.bin vmlinux.bin.gz \ | 7 | targets := vmlinux vmlinux.bin vmlinux.bin.gz \ |
8 | vmlinux.bin.bz2 vmlinux.bin.lzma \ | 8 | vmlinux.bin.bz2 vmlinux.bin.lzma \ |
9 | vmlinux.bin.lzo \ | 9 | vmlinux.bin.xz vmlinux.bin.lzo \ |
10 | head_$(BITS).o misc.o piggy.o | 10 | head_$(BITS).o misc.o piggy.o |
11 | 11 | ||
12 | OBJECTS = $(obj)/head_$(BITS).o $(obj)/misc.o $(obj)/cache.o | 12 | OBJECTS = $(obj)/head_$(BITS).o $(obj)/misc.o $(obj)/cache.o |
@@ -50,6 +50,8 @@ $(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y) FORCE | |||
50 | $(call if_changed,bzip2) | 50 | $(call if_changed,bzip2) |
51 | $(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE | 51 | $(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE |
52 | $(call if_changed,lzma) | 52 | $(call if_changed,lzma) |
53 | $(obj)/vmlinux.bin.xz: $(vmlinux.bin.all-y) FORCE | ||
54 | $(call if_changed,xzkern) | ||
53 | $(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y) FORCE | 55 | $(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y) FORCE |
54 | $(call if_changed,lzo) | 56 | $(call if_changed,lzo) |
55 | 57 | ||
diff --git a/arch/sh/boot/compressed/misc.c b/arch/sh/boot/compressed/misc.c index 27140a6b365..95470a472d2 100644 --- a/arch/sh/boot/compressed/misc.c +++ b/arch/sh/boot/compressed/misc.c | |||
@@ -61,6 +61,10 @@ static unsigned long free_mem_end_ptr; | |||
61 | #include "../../../../lib/decompress_unlzma.c" | 61 | #include "../../../../lib/decompress_unlzma.c" |
62 | #endif | 62 | #endif |
63 | 63 | ||
64 | #ifdef CONFIG_KERNEL_XZ | ||
65 | #include "../../../../lib/decompress_unxz.c" | ||
66 | #endif | ||
67 | |||
64 | #ifdef CONFIG_KERNEL_LZO | 68 | #ifdef CONFIG_KERNEL_LZO |
65 | #include "../../../../lib/decompress_unlzo.c" | 69 | #include "../../../../lib/decompress_unlzo.c" |
66 | #endif | 70 | #endif |
diff --git a/arch/sh/include/asm/pgtable.h b/arch/sh/include/asm/pgtable.h index 083ea068e81..db85916b9e9 100644 --- a/arch/sh/include/asm/pgtable.h +++ b/arch/sh/include/asm/pgtable.h | |||
@@ -134,6 +134,7 @@ typedef pte_t *pte_addr_t; | |||
134 | extern void pgtable_cache_init(void); | 134 | extern void pgtable_cache_init(void); |
135 | 135 | ||
136 | struct vm_area_struct; | 136 | struct vm_area_struct; |
137 | struct mm_struct; | ||
137 | 138 | ||
138 | extern void __update_cache(struct vm_area_struct *vma, | 139 | extern void __update_cache(struct vm_area_struct *vma, |
139 | unsigned long address, pte_t pte); | 140 | unsigned long address, pte_t pte); |
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7750.c b/arch/sh/kernel/cpu/sh4/setup-sh7750.c index c2b0aaaedca..672944f5b19 100644 --- a/arch/sh/kernel/cpu/sh4/setup-sh7750.c +++ b/arch/sh/kernel/cpu/sh4/setup-sh7750.c | |||
@@ -230,10 +230,10 @@ static struct platform_device *sh7750_devices[] __initdata = { | |||
230 | static int __init sh7750_devices_setup(void) | 230 | static int __init sh7750_devices_setup(void) |
231 | { | 231 | { |
232 | if (mach_is_rts7751r2d()) { | 232 | if (mach_is_rts7751r2d()) { |
233 | platform_register_device(&scif_device); | 233 | platform_device_register(&scif_device); |
234 | } else { | 234 | } else { |
235 | platform_register_device(&sci_device); | 235 | platform_device_register(&sci_device); |
236 | platform_register_device(&scif_device); | 236 | platform_device_register(&scif_device); |
237 | } | 237 | } |
238 | 238 | ||
239 | return platform_add_devices(sh7750_devices, | 239 | return platform_add_devices(sh7750_devices, |
diff --git a/arch/sh/kernel/cpu/shmobile/cpuidle.c b/arch/sh/kernel/cpu/shmobile/cpuidle.c index 83972aa319c..c19e2a940e3 100644 --- a/arch/sh/kernel/cpu/shmobile/cpuidle.c +++ b/arch/sh/kernel/cpu/shmobile/cpuidle.c | |||
@@ -81,7 +81,6 @@ void sh_mobile_setup_cpuidle(void) | |||
81 | state->target_residency = 1 * 2; | 81 | state->target_residency = 1 * 2; |
82 | state->power_usage = 3; | 82 | state->power_usage = 3; |
83 | state->flags = 0; | 83 | state->flags = 0; |
84 | state->flags |= CPUIDLE_FLAG_SHALLOW; | ||
85 | state->flags |= CPUIDLE_FLAG_TIME_VALID; | 84 | state->flags |= CPUIDLE_FLAG_TIME_VALID; |
86 | state->enter = cpuidle_sleep_enter; | 85 | state->enter = cpuidle_sleep_enter; |
87 | 86 | ||
diff --git a/arch/sh/kernel/topology.c b/arch/sh/kernel/topology.c index 948fdb65693..38e862852dd 100644 --- a/arch/sh/kernel/topology.c +++ b/arch/sh/kernel/topology.c | |||
@@ -17,6 +17,7 @@ | |||
17 | static DEFINE_PER_CPU(struct cpu, cpu_devices); | 17 | static DEFINE_PER_CPU(struct cpu, cpu_devices); |
18 | 18 | ||
19 | cpumask_t cpu_core_map[NR_CPUS]; | 19 | cpumask_t cpu_core_map[NR_CPUS]; |
20 | EXPORT_SYMBOL(cpu_core_map); | ||
20 | 21 | ||
21 | static cpumask_t cpu_coregroup_map(unsigned int cpu) | 22 | static cpumask_t cpu_coregroup_map(unsigned int cpu) |
22 | { | 23 | { |
diff --git a/arch/sh/mm/hugetlbpage.c b/arch/sh/mm/hugetlbpage.c index 9163db3e8d1..d7762349ea4 100644 --- a/arch/sh/mm/hugetlbpage.c +++ b/arch/sh/mm/hugetlbpage.c | |||
@@ -35,7 +35,7 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, | |||
35 | if (pud) { | 35 | if (pud) { |
36 | pmd = pmd_alloc(mm, pud, addr); | 36 | pmd = pmd_alloc(mm, pud, addr); |
37 | if (pmd) | 37 | if (pmd) |
38 | pte = pte_alloc_map(mm, pmd, addr); | 38 | pte = pte_alloc_map(mm, NULL, pmd, addr); |
39 | } | 39 | } |
40 | } | 40 | } |
41 | 41 | ||
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index 45d9c87d083..95695e97703 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig | |||
@@ -50,6 +50,7 @@ config SPARC64 | |||
50 | select RTC_DRV_STARFIRE | 50 | select RTC_DRV_STARFIRE |
51 | select HAVE_PERF_EVENTS | 51 | select HAVE_PERF_EVENTS |
52 | select PERF_USE_VMALLOC | 52 | select PERF_USE_VMALLOC |
53 | select HAVE_GENERIC_HARDIRQS | ||
53 | 54 | ||
54 | config ARCH_DEFCONFIG | 55 | config ARCH_DEFCONFIG |
55 | string | 56 | string |
@@ -107,10 +108,6 @@ config NEED_PER_CPU_EMBED_FIRST_CHUNK | |||
107 | config NEED_PER_CPU_PAGE_FIRST_CHUNK | 108 | config NEED_PER_CPU_PAGE_FIRST_CHUNK |
108 | def_bool y if SPARC64 | 109 | def_bool y if SPARC64 |
109 | 110 | ||
110 | config GENERIC_HARDIRQS_NO__DO_IRQ | ||
111 | bool | ||
112 | def_bool y if SPARC64 | ||
113 | |||
114 | config MMU | 111 | config MMU |
115 | bool | 112 | bool |
116 | default y | 113 | default y |
@@ -276,10 +273,6 @@ config HOTPLUG_CPU | |||
276 | can be controlled through /sys/devices/system/cpu/cpu#. | 273 | can be controlled through /sys/devices/system/cpu/cpu#. |
277 | Say N if you want to disable CPU hotplug. | 274 | Say N if you want to disable CPU hotplug. |
278 | 275 | ||
279 | config GENERIC_HARDIRQS | ||
280 | bool | ||
281 | default y if SPARC64 | ||
282 | |||
283 | source "kernel/time/Kconfig" | 276 | source "kernel/time/Kconfig" |
284 | 277 | ||
285 | if SPARC64 | 278 | if SPARC64 |
diff --git a/arch/sparc/kernel/module.c b/arch/sparc/kernel/module.c index ee3c7dde8d9..8d348c474a2 100644 --- a/arch/sparc/kernel/module.c +++ b/arch/sparc/kernel/module.c | |||
@@ -23,17 +23,11 @@ | |||
23 | 23 | ||
24 | static void *module_map(unsigned long size) | 24 | static void *module_map(unsigned long size) |
25 | { | 25 | { |
26 | struct vm_struct *area; | 26 | if (PAGE_ALIGN(size) > MODULES_LEN) |
27 | |||
28 | size = PAGE_ALIGN(size); | ||
29 | if (!size || size > MODULES_LEN) | ||
30 | return NULL; | ||
31 | |||
32 | area = __get_vm_area(size, VM_ALLOC, MODULES_VADDR, MODULES_END); | ||
33 | if (!area) | ||
34 | return NULL; | 27 | return NULL; |
35 | 28 | return __vmalloc_node_range(size, 1, MODULES_VADDR, MODULES_END, | |
36 | return __vmalloc_area(area, GFP_KERNEL, PAGE_KERNEL); | 29 | GFP_KERNEL, PAGE_KERNEL, -1, |
30 | __builtin_return_address(0)); | ||
37 | } | 31 | } |
38 | 32 | ||
39 | static char *dot2underscore(char *name) | 33 | static char *dot2underscore(char *name) |
diff --git a/arch/sparc/mm/generic_32.c b/arch/sparc/mm/generic_32.c index 5edcac184ea..e6067b75f11 100644 --- a/arch/sparc/mm/generic_32.c +++ b/arch/sparc/mm/generic_32.c | |||
@@ -50,7 +50,7 @@ static inline int io_remap_pmd_range(struct mm_struct *mm, pmd_t * pmd, unsigned | |||
50 | end = PGDIR_SIZE; | 50 | end = PGDIR_SIZE; |
51 | offset -= address; | 51 | offset -= address; |
52 | do { | 52 | do { |
53 | pte_t * pte = pte_alloc_map(mm, pmd, address); | 53 | pte_t *pte = pte_alloc_map(mm, NULL, pmd, address); |
54 | if (!pte) | 54 | if (!pte) |
55 | return -ENOMEM; | 55 | return -ENOMEM; |
56 | io_remap_pte_range(mm, pte, address, end - address, address + offset, prot, space); | 56 | io_remap_pte_range(mm, pte, address, end - address, address + offset, prot, space); |
diff --git a/arch/sparc/mm/generic_64.c b/arch/sparc/mm/generic_64.c index 04f2bf4cd57..3cb00dfd4bd 100644 --- a/arch/sparc/mm/generic_64.c +++ b/arch/sparc/mm/generic_64.c | |||
@@ -92,7 +92,7 @@ static inline int io_remap_pmd_range(struct mm_struct *mm, pmd_t * pmd, unsigned | |||
92 | end = PGDIR_SIZE; | 92 | end = PGDIR_SIZE; |
93 | offset -= address; | 93 | offset -= address; |
94 | do { | 94 | do { |
95 | pte_t * pte = pte_alloc_map(mm, pmd, address); | 95 | pte_t *pte = pte_alloc_map(mm, NULL, pmd, address); |
96 | if (!pte) | 96 | if (!pte) |
97 | return -ENOMEM; | 97 | return -ENOMEM; |
98 | io_remap_pte_range(mm, pte, address, end - address, address + offset, prot, space); | 98 | io_remap_pte_range(mm, pte, address, end - address, address + offset, prot, space); |
diff --git a/arch/sparc/mm/hugetlbpage.c b/arch/sparc/mm/hugetlbpage.c index 5fdddf134ca..f4e97646ce2 100644 --- a/arch/sparc/mm/hugetlbpage.c +++ b/arch/sparc/mm/hugetlbpage.c | |||
@@ -214,7 +214,7 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, | |||
214 | if (pud) { | 214 | if (pud) { |
215 | pmd = pmd_alloc(mm, pud, addr); | 215 | pmd = pmd_alloc(mm, pud, addr); |
216 | if (pmd) | 216 | if (pmd) |
217 | pte = pte_alloc_map(mm, pmd, addr); | 217 | pte = pte_alloc_map(mm, NULL, pmd, addr); |
218 | } | 218 | } |
219 | return pte; | 219 | return pte; |
220 | } | 220 | } |
diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig index e11b5fcb70e..08948e4e150 100644 --- a/arch/tile/Kconfig +++ b/arch/tile/Kconfig | |||
@@ -1,24 +1,33 @@ | |||
1 | # For a description of the syntax of this configuration file, | 1 | # For a description of the syntax of this configuration file, |
2 | # see Documentation/kbuild/config-language.txt. | 2 | # see Documentation/kbuild/config-language.txt. |
3 | 3 | ||
4 | config MMU | 4 | config TILE |
5 | def_bool y | ||
6 | |||
7 | config GENERIC_CSUM | ||
8 | def_bool y | ||
9 | |||
10 | config GENERIC_HARDIRQS | ||
11 | def_bool y | 5 | def_bool y |
6 | select HAVE_KVM if !TILEGX | ||
7 | select GENERIC_FIND_FIRST_BIT | ||
8 | select GENERIC_FIND_NEXT_BIT | ||
9 | select USE_GENERIC_SMP_HELPERS | ||
10 | select CC_OPTIMIZE_FOR_SIZE | ||
11 | select HAVE_GENERIC_HARDIRQS | ||
12 | select GENERIC_IRQ_PROBE | ||
13 | select GENERIC_PENDING_IRQ if SMP | ||
12 | 14 | ||
13 | config GENERIC_HARDIRQS_NO__DO_IRQ | 15 | # FIXME: investigate whether we need/want these options. |
14 | def_bool y | 16 | # select HAVE_IOREMAP_PROT |
17 | # select HAVE_OPTPROBES | ||
18 | # select HAVE_REGS_AND_STACK_ACCESS_API | ||
19 | # select HAVE_HW_BREAKPOINT | ||
20 | # select PERF_EVENTS | ||
21 | # select HAVE_USER_RETURN_NOTIFIER | ||
22 | # config NO_BOOTMEM | ||
23 | # config ARCH_SUPPORTS_DEBUG_PAGEALLOC | ||
24 | # config HUGETLB_PAGE_SIZE_VARIABLE | ||
15 | 25 | ||
16 | config GENERIC_IRQ_PROBE | 26 | config MMU |
17 | def_bool y | 27 | def_bool y |
18 | 28 | ||
19 | config GENERIC_PENDING_IRQ | 29 | config GENERIC_CSUM |
20 | def_bool y | 30 | def_bool y |
21 | depends on GENERIC_HARDIRQS && SMP | ||
22 | 31 | ||
23 | config SEMAPHORE_SLEEPERS | 32 | config SEMAPHORE_SLEEPERS |
24 | def_bool y | 33 | def_bool y |
@@ -97,26 +106,6 @@ config HVC_TILE | |||
97 | select HVC_DRIVER | 106 | select HVC_DRIVER |
98 | def_bool y | 107 | def_bool y |
99 | 108 | ||
100 | config TILE | ||
101 | def_bool y | ||
102 | select HAVE_KVM if !TILEGX | ||
103 | select GENERIC_FIND_FIRST_BIT | ||
104 | select GENERIC_FIND_NEXT_BIT | ||
105 | select USE_GENERIC_SMP_HELPERS | ||
106 | select CC_OPTIMIZE_FOR_SIZE | ||
107 | |||
108 | # FIXME: investigate whether we need/want these options. | ||
109 | # select HAVE_IOREMAP_PROT | ||
110 | # select HAVE_OPTPROBES | ||
111 | # select HAVE_REGS_AND_STACK_ACCESS_API | ||
112 | # select HAVE_HW_BREAKPOINT | ||
113 | # select PERF_EVENTS | ||
114 | # select HAVE_USER_RETURN_NOTIFIER | ||
115 | # config NO_BOOTMEM | ||
116 | # config ARCH_SUPPORTS_DEBUG_PAGEALLOC | ||
117 | # config HUGETLB_PAGE_SIZE_VARIABLE | ||
118 | |||
119 | |||
120 | # Please note: TILE-Gx support is not yet finalized; this is | 109 | # Please note: TILE-Gx support is not yet finalized; this is |
121 | # the preliminary support. TILE-Gx drivers are only provided | 110 | # the preliminary support. TILE-Gx drivers are only provided |
122 | # with the alpha or beta test versions for Tilera customers. | 111 | # with the alpha or beta test versions for Tilera customers. |
@@ -220,7 +209,7 @@ config FORCE_MAX_ZONEORDER | |||
220 | 209 | ||
221 | choice | 210 | choice |
222 | depends on !TILEGX | 211 | depends on !TILEGX |
223 | prompt "Memory split" if EMBEDDED | 212 | prompt "Memory split" if EXPERT |
224 | default VMSPLIT_3G | 213 | default VMSPLIT_3G |
225 | ---help--- | 214 | ---help--- |
226 | Select the desired split between kernel and user memory. | 215 | Select the desired split between kernel and user memory. |
diff --git a/arch/tile/Kconfig.debug b/arch/tile/Kconfig.debug index a81f0fbf7e6..9bc161a02c7 100644 --- a/arch/tile/Kconfig.debug +++ b/arch/tile/Kconfig.debug | |||
@@ -3,7 +3,7 @@ menu "Kernel hacking" | |||
3 | source "lib/Kconfig.debug" | 3 | source "lib/Kconfig.debug" |
4 | 4 | ||
5 | config EARLY_PRINTK | 5 | config EARLY_PRINTK |
6 | bool "Early printk" if EMBEDDED && DEBUG_KERNEL | 6 | bool "Early printk" if EXPERT && DEBUG_KERNEL |
7 | default y | 7 | default y |
8 | help | 8 | help |
9 | Write kernel log output directly via the hypervisor console. | 9 | Write kernel log output directly via the hypervisor console. |
diff --git a/arch/tile/configs/tile_defconfig b/arch/tile/configs/tile_defconfig index 919c54afd98..0fe54445fda 100644 --- a/arch/tile/configs/tile_defconfig +++ b/arch/tile/configs/tile_defconfig | |||
@@ -3,7 +3,7 @@ CONFIG_EXPERIMENTAL=y | |||
3 | CONFIG_SYSVIPC=y | 3 | CONFIG_SYSVIPC=y |
4 | CONFIG_BLK_DEV_INITRD=y | 4 | CONFIG_BLK_DEV_INITRD=y |
5 | CONFIG_INITRAMFS_SOURCE="usr/contents.txt" | 5 | CONFIG_INITRAMFS_SOURCE="usr/contents.txt" |
6 | CONFIG_EMBEDDED=y | 6 | CONFIG_EXPERT=y |
7 | # CONFIG_COMPAT_BRK is not set | 7 | # CONFIG_COMPAT_BRK is not set |
8 | CONFIG_PROFILING=y | 8 | CONFIG_PROFILING=y |
9 | CONFIG_MODULES=y | 9 | CONFIG_MODULES=y |
diff --git a/arch/um/Kconfig.common b/arch/um/Kconfig.common index 049d048b070..e351e14b433 100644 --- a/arch/um/Kconfig.common +++ b/arch/um/Kconfig.common | |||
@@ -3,14 +3,10 @@ config DEFCONFIG_LIST | |||
3 | option defconfig_list | 3 | option defconfig_list |
4 | default "arch/$ARCH/defconfig" | 4 | default "arch/$ARCH/defconfig" |
5 | 5 | ||
6 | # UML uses the generic IRQ subsystem | ||
7 | config GENERIC_HARDIRQS | ||
8 | bool | ||
9 | default y | ||
10 | |||
11 | config UML | 6 | config UML |
12 | bool | 7 | bool |
13 | default y | 8 | default y |
9 | select HAVE_GENERIC_HARDIRQS | ||
14 | 10 | ||
15 | config MMU | 11 | config MMU |
16 | bool | 12 | bool |
diff --git a/arch/um/Kconfig.um b/arch/um/Kconfig.um index f8d1d0d47fe..90a438acbfa 100644 --- a/arch/um/Kconfig.um +++ b/arch/um/Kconfig.um | |||
@@ -120,9 +120,6 @@ config SMP | |||
120 | 120 | ||
121 | If you don't know what to do, say N. | 121 | If you don't know what to do, say N. |
122 | 122 | ||
123 | config GENERIC_HARDIRQS_NO__DO_IRQ | ||
124 | def_bool y | ||
125 | |||
126 | config NR_CPUS | 123 | config NR_CPUS |
127 | int "Maximum number of CPUs (2-32)" | 124 | int "Maximum number of CPUs (2-32)" |
128 | range 2 32 | 125 | range 2 32 |
diff --git a/arch/um/defconfig b/arch/um/defconfig index 564f3de65b4..9f7634f08cf 100644 --- a/arch/um/defconfig +++ b/arch/um/defconfig | |||
@@ -133,7 +133,7 @@ CONFIG_SYSFS_DEPRECATED=y | |||
133 | # CONFIG_BLK_DEV_INITRD is not set | 133 | # CONFIG_BLK_DEV_INITRD is not set |
134 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | 134 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y |
135 | CONFIG_SYSCTL=y | 135 | CONFIG_SYSCTL=y |
136 | # CONFIG_EMBEDDED is not set | 136 | # CONFIG_EXPERT is not set |
137 | CONFIG_UID16=y | 137 | CONFIG_UID16=y |
138 | CONFIG_SYSCTL_SYSCALL=y | 138 | CONFIG_SYSCTL_SYSCALL=y |
139 | CONFIG_KALLSYMS=y | 139 | CONFIG_KALLSYMS=y |
diff --git a/arch/um/kernel/skas/mmu.c b/arch/um/kernel/skas/mmu.c index 3d099f97478..1aee587e9c5 100644 --- a/arch/um/kernel/skas/mmu.c +++ b/arch/um/kernel/skas/mmu.c | |||
@@ -31,7 +31,7 @@ static int init_stub_pte(struct mm_struct *mm, unsigned long proc, | |||
31 | if (!pmd) | 31 | if (!pmd) |
32 | goto out_pmd; | 32 | goto out_pmd; |
33 | 33 | ||
34 | pte = pte_alloc_map(mm, pmd, proc); | 34 | pte = pte_alloc_map(mm, NULL, pmd, proc); |
35 | if (!pte) | 35 | if (!pte) |
36 | goto out_pte; | 36 | goto out_pte; |
37 | 37 | ||
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 36ed2e2c896..d5ed94d30aa 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -627,11 +627,11 @@ config APB_TIMER | |||
627 | as it is off-chip. APB timers are always running regardless of CPU | 627 | as it is off-chip. APB timers are always running regardless of CPU |
628 | C states, they are used as per CPU clockevent device when possible. | 628 | C states, they are used as per CPU clockevent device when possible. |
629 | 629 | ||
630 | # Mark as embedded because too many people got it wrong. | 630 | # Mark as expert because too many people got it wrong. |
631 | # The code disables itself when not needed. | 631 | # The code disables itself when not needed. |
632 | config DMI | 632 | config DMI |
633 | default y | 633 | default y |
634 | bool "Enable DMI scanning" if EMBEDDED | 634 | bool "Enable DMI scanning" if EXPERT |
635 | ---help--- | 635 | ---help--- |
636 | Enabled scanning of DMI to identify machine quirks. Say Y | 636 | Enabled scanning of DMI to identify machine quirks. Say Y |
637 | here unless you have verified that your setup is not | 637 | here unless you have verified that your setup is not |
@@ -639,7 +639,7 @@ config DMI | |||
639 | BIOS code. | 639 | BIOS code. |
640 | 640 | ||
641 | config GART_IOMMU | 641 | config GART_IOMMU |
642 | bool "GART IOMMU support" if EMBEDDED | 642 | bool "GART IOMMU support" if EXPERT |
643 | default y | 643 | default y |
644 | select SWIOTLB | 644 | select SWIOTLB |
645 | depends on X86_64 && PCI && AMD_NB | 645 | depends on X86_64 && PCI && AMD_NB |
@@ -889,7 +889,7 @@ config X86_THERMAL_VECTOR | |||
889 | depends on X86_MCE_INTEL | 889 | depends on X86_MCE_INTEL |
890 | 890 | ||
891 | config VM86 | 891 | config VM86 |
892 | bool "Enable VM86 support" if EMBEDDED | 892 | bool "Enable VM86 support" if EXPERT |
893 | default y | 893 | default y |
894 | depends on X86_32 | 894 | depends on X86_32 |
895 | ---help--- | 895 | ---help--- |
@@ -1073,7 +1073,7 @@ endchoice | |||
1073 | 1073 | ||
1074 | choice | 1074 | choice |
1075 | depends on EXPERIMENTAL | 1075 | depends on EXPERIMENTAL |
1076 | prompt "Memory split" if EMBEDDED | 1076 | prompt "Memory split" if EXPERT |
1077 | default VMSPLIT_3G | 1077 | default VMSPLIT_3G |
1078 | depends on X86_32 | 1078 | depends on X86_32 |
1079 | ---help--- | 1079 | ---help--- |
@@ -1135,7 +1135,7 @@ config ARCH_DMA_ADDR_T_64BIT | |||
1135 | def_bool X86_64 || HIGHMEM64G | 1135 | def_bool X86_64 || HIGHMEM64G |
1136 | 1136 | ||
1137 | config DIRECT_GBPAGES | 1137 | config DIRECT_GBPAGES |
1138 | bool "Enable 1GB pages for kernel pagetables" if EMBEDDED | 1138 | bool "Enable 1GB pages for kernel pagetables" if EXPERT |
1139 | default y | 1139 | default y |
1140 | depends on X86_64 | 1140 | depends on X86_64 |
1141 | ---help--- | 1141 | ---help--- |
@@ -1369,7 +1369,7 @@ config MATH_EMULATION | |||
1369 | 1369 | ||
1370 | config MTRR | 1370 | config MTRR |
1371 | def_bool y | 1371 | def_bool y |
1372 | prompt "MTRR (Memory Type Range Register) support" if EMBEDDED | 1372 | prompt "MTRR (Memory Type Range Register) support" if EXPERT |
1373 | ---help--- | 1373 | ---help--- |
1374 | On Intel P6 family processors (Pentium Pro, Pentium II and later) | 1374 | On Intel P6 family processors (Pentium Pro, Pentium II and later) |
1375 | the Memory Type Range Registers (MTRRs) may be used to control | 1375 | the Memory Type Range Registers (MTRRs) may be used to control |
@@ -1435,7 +1435,7 @@ config MTRR_SANITIZER_SPARE_REG_NR_DEFAULT | |||
1435 | 1435 | ||
1436 | config X86_PAT | 1436 | config X86_PAT |
1437 | def_bool y | 1437 | def_bool y |
1438 | prompt "x86 PAT support" if EMBEDDED | 1438 | prompt "x86 PAT support" if EXPERT |
1439 | depends on MTRR | 1439 | depends on MTRR |
1440 | ---help--- | 1440 | ---help--- |
1441 | Use PAT attributes to setup page level cache control. | 1441 | Use PAT attributes to setup page level cache control. |
@@ -1539,7 +1539,7 @@ config KEXEC_JUMP | |||
1539 | code in physical address mode via KEXEC | 1539 | code in physical address mode via KEXEC |
1540 | 1540 | ||
1541 | config PHYSICAL_START | 1541 | config PHYSICAL_START |
1542 | hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP) | 1542 | hex "Physical address where the kernel is loaded" if (EXPERT || CRASH_DUMP) |
1543 | default "0x1000000" | 1543 | default "0x1000000" |
1544 | ---help--- | 1544 | ---help--- |
1545 | This gives the physical address where the kernel is loaded. | 1545 | This gives the physical address where the kernel is loaded. |
@@ -1934,13 +1934,19 @@ config PCI_MMCONFIG | |||
1934 | depends on X86_64 && PCI && ACPI | 1934 | depends on X86_64 && PCI && ACPI |
1935 | 1935 | ||
1936 | config PCI_CNB20LE_QUIRK | 1936 | config PCI_CNB20LE_QUIRK |
1937 | bool "Read CNB20LE Host Bridge Windows" | 1937 | bool "Read CNB20LE Host Bridge Windows" if EXPERT |
1938 | depends on PCI | 1938 | default n |
1939 | depends on PCI && EXPERIMENTAL | ||
1939 | help | 1940 | help |
1940 | Read the PCI windows out of the CNB20LE host bridge. This allows | 1941 | Read the PCI windows out of the CNB20LE host bridge. This allows |
1941 | PCI hotplug to work on systems with the CNB20LE chipset which do | 1942 | PCI hotplug to work on systems with the CNB20LE chipset which do |
1942 | not have ACPI. | 1943 | not have ACPI. |
1943 | 1944 | ||
1945 | There's no public spec for this chipset, and this functionality | ||
1946 | is known to be incomplete. | ||
1947 | |||
1948 | You should say N unless you know you need this. | ||
1949 | |||
1944 | config DMAR | 1950 | config DMAR |
1945 | bool "Support for DMA Remapping Devices (EXPERIMENTAL)" | 1951 | bool "Support for DMA Remapping Devices (EXPERIMENTAL)" |
1946 | depends on PCI_MSI && ACPI && EXPERIMENTAL | 1952 | depends on PCI_MSI && ACPI && EXPERIMENTAL |
@@ -2062,13 +2068,14 @@ config OLPC | |||
2062 | bool "One Laptop Per Child support" | 2068 | bool "One Laptop Per Child support" |
2063 | select GPIOLIB | 2069 | select GPIOLIB |
2064 | select OLPC_OPENFIRMWARE | 2070 | select OLPC_OPENFIRMWARE |
2071 | depends on !X86_64 && !X86_PAE | ||
2065 | ---help--- | 2072 | ---help--- |
2066 | Add support for detecting the unique features of the OLPC | 2073 | Add support for detecting the unique features of the OLPC |
2067 | XO hardware. | 2074 | XO hardware. |
2068 | 2075 | ||
2069 | config OLPC_XO1 | 2076 | config OLPC_XO1 |
2070 | tristate "OLPC XO-1 support" | 2077 | tristate "OLPC XO-1 support" |
2071 | depends on OLPC && PCI | 2078 | depends on OLPC && MFD_CS5535 |
2072 | ---help--- | 2079 | ---help--- |
2073 | Add support for non-essential features of the OLPC XO-1 laptop. | 2080 | Add support for non-essential features of the OLPC XO-1 laptop. |
2074 | 2081 | ||
diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu index 15588a0ef46..283c5a6a03a 100644 --- a/arch/x86/Kconfig.cpu +++ b/arch/x86/Kconfig.cpu | |||
@@ -424,7 +424,7 @@ config X86_DEBUGCTLMSR | |||
424 | depends on !(MK6 || MWINCHIPC6 || MWINCHIP3D || MCYRIXIII || M586MMX || M586TSC || M586 || M486 || M386) && !UML | 424 | depends on !(MK6 || MWINCHIPC6 || MWINCHIP3D || MCYRIXIII || M586MMX || M586TSC || M586 || M486 || M386) && !UML |
425 | 425 | ||
426 | menuconfig PROCESSOR_SELECT | 426 | menuconfig PROCESSOR_SELECT |
427 | bool "Supported processor vendors" if EMBEDDED | 427 | bool "Supported processor vendors" if EXPERT |
428 | ---help--- | 428 | ---help--- |
429 | This lets you choose what x86 vendor support code your kernel | 429 | This lets you choose what x86 vendor support code your kernel |
430 | will include. | 430 | will include. |
diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug index 45143bbcfe5..615e18810f4 100644 --- a/arch/x86/Kconfig.debug +++ b/arch/x86/Kconfig.debug | |||
@@ -31,7 +31,7 @@ config X86_VERBOSE_BOOTUP | |||
31 | see errors. Disable this if you want silent bootup. | 31 | see errors. Disable this if you want silent bootup. |
32 | 32 | ||
33 | config EARLY_PRINTK | 33 | config EARLY_PRINTK |
34 | bool "Early printk" if EMBEDDED | 34 | bool "Early printk" if EXPERT |
35 | default y | 35 | default y |
36 | ---help--- | 36 | ---help--- |
37 | Write kernel log output directly into the VGA buffer or to a serial | 37 | Write kernel log output directly into the VGA buffer or to a serial |
@@ -138,7 +138,7 @@ config DEBUG_NX_TEST | |||
138 | 138 | ||
139 | config DOUBLEFAULT | 139 | config DOUBLEFAULT |
140 | default y | 140 | default y |
141 | bool "Enable doublefault exception handler" if EMBEDDED | 141 | bool "Enable doublefault exception handler" if EXPERT |
142 | depends on X86_32 | 142 | depends on X86_32 |
143 | ---help--- | 143 | ---help--- |
144 | This option allows trapping of rare doublefault exceptions that | 144 | This option allows trapping of rare doublefault exceptions that |
diff --git a/arch/x86/include/asm/cacheflush.h b/arch/x86/include/asm/cacheflush.h index 63e35ec9075..62f084478f7 100644 --- a/arch/x86/include/asm/cacheflush.h +++ b/arch/x86/include/asm/cacheflush.h | |||
@@ -1,48 +1,8 @@ | |||
1 | #ifndef _ASM_X86_CACHEFLUSH_H | 1 | #ifndef _ASM_X86_CACHEFLUSH_H |
2 | #define _ASM_X86_CACHEFLUSH_H | 2 | #define _ASM_X86_CACHEFLUSH_H |
3 | 3 | ||
4 | /* Keep includes the same across arches. */ | ||
5 | #include <linux/mm.h> | ||
6 | |||
7 | /* Caches aren't brain-dead on the intel. */ | 4 | /* Caches aren't brain-dead on the intel. */ |
8 | static inline void flush_cache_all(void) { } | 5 | #include <asm-generic/cacheflush.h> |
9 | static inline void flush_cache_mm(struct mm_struct *mm) { } | ||
10 | static inline void flush_cache_dup_mm(struct mm_struct *mm) { } | ||
11 | static inline void flush_cache_range(struct vm_area_struct *vma, | ||
12 | unsigned long start, unsigned long end) { } | ||
13 | static inline void flush_cache_page(struct vm_area_struct *vma, | ||
14 | unsigned long vmaddr, unsigned long pfn) { } | ||
15 | #define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 0 | ||
16 | static inline void flush_dcache_page(struct page *page) { } | ||
17 | static inline void flush_dcache_mmap_lock(struct address_space *mapping) { } | ||
18 | static inline void flush_dcache_mmap_unlock(struct address_space *mapping) { } | ||
19 | static inline void flush_icache_range(unsigned long start, | ||
20 | unsigned long end) { } | ||
21 | static inline void flush_icache_page(struct vm_area_struct *vma, | ||
22 | struct page *page) { } | ||
23 | static inline void flush_icache_user_range(struct vm_area_struct *vma, | ||
24 | struct page *page, | ||
25 | unsigned long addr, | ||
26 | unsigned long len) { } | ||
27 | static inline void flush_cache_vmap(unsigned long start, unsigned long end) { } | ||
28 | static inline void flush_cache_vunmap(unsigned long start, | ||
29 | unsigned long end) { } | ||
30 | |||
31 | static inline void copy_to_user_page(struct vm_area_struct *vma, | ||
32 | struct page *page, unsigned long vaddr, | ||
33 | void *dst, const void *src, | ||
34 | unsigned long len) | ||
35 | { | ||
36 | memcpy(dst, src, len); | ||
37 | } | ||
38 | |||
39 | static inline void copy_from_user_page(struct vm_area_struct *vma, | ||
40 | struct page *page, unsigned long vaddr, | ||
41 | void *dst, const void *src, | ||
42 | unsigned long len) | ||
43 | { | ||
44 | memcpy(dst, src, len); | ||
45 | } | ||
46 | 6 | ||
47 | #ifdef CONFIG_X86_PAT | 7 | #ifdef CONFIG_X86_PAT |
48 | /* | 8 | /* |
diff --git a/arch/x86/include/asm/cpu.h b/arch/x86/include/asm/cpu.h index 4fab24de26b..6e6e7558e70 100644 --- a/arch/x86/include/asm/cpu.h +++ b/arch/x86/include/asm/cpu.h | |||
@@ -32,5 +32,6 @@ extern void arch_unregister_cpu(int); | |||
32 | 32 | ||
33 | DECLARE_PER_CPU(int, cpu_state); | 33 | DECLARE_PER_CPU(int, cpu_state); |
34 | 34 | ||
35 | int __cpuinit mwait_usable(const struct cpuinfo_x86 *); | ||
35 | 36 | ||
36 | #endif /* _ASM_X86_CPU_H */ | 37 | #endif /* _ASM_X86_CPU_H */ |
diff --git a/arch/x86/include/asm/jump_label.h b/arch/x86/include/asm/jump_label.h index f52d42e8058..574dbc22893 100644 --- a/arch/x86/include/asm/jump_label.h +++ b/arch/x86/include/asm/jump_label.h | |||
@@ -14,7 +14,7 @@ | |||
14 | do { \ | 14 | do { \ |
15 | asm goto("1:" \ | 15 | asm goto("1:" \ |
16 | JUMP_LABEL_INITIAL_NOP \ | 16 | JUMP_LABEL_INITIAL_NOP \ |
17 | ".pushsection __jump_table, \"a\" \n\t"\ | 17 | ".pushsection __jump_table, \"aw\" \n\t"\ |
18 | _ASM_PTR "1b, %l[" #label "], %c0 \n\t" \ | 18 | _ASM_PTR "1b, %l[" #label "], %c0 \n\t" \ |
19 | ".popsection \n\t" \ | 19 | ".popsection \n\t" \ |
20 | : : "i" (key) : : label); \ | 20 | : : "i" (key) : : label); \ |
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index aa75f21a9fb..ffd7f8d2918 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h | |||
@@ -822,6 +822,7 @@ extern bool kvm_rebooting; | |||
822 | #define KVM_ARCH_WANT_MMU_NOTIFIER | 822 | #define KVM_ARCH_WANT_MMU_NOTIFIER |
823 | int kvm_unmap_hva(struct kvm *kvm, unsigned long hva); | 823 | int kvm_unmap_hva(struct kvm *kvm, unsigned long hva); |
824 | int kvm_age_hva(struct kvm *kvm, unsigned long hva); | 824 | int kvm_age_hva(struct kvm *kvm, unsigned long hva); |
825 | int kvm_test_age_hva(struct kvm *kvm, unsigned long hva); | ||
825 | void kvm_set_spte_hva(struct kvm *kvm, unsigned long hva, pte_t pte); | 826 | void kvm_set_spte_hva(struct kvm *kvm, unsigned long hva, pte_t pte); |
826 | int cpuid_maxphyaddr(struct kvm_vcpu *vcpu); | 827 | int cpuid_maxphyaddr(struct kvm_vcpu *vcpu); |
827 | int kvm_cpu_has_interrupt(struct kvm_vcpu *vcpu); | 828 | int kvm_cpu_has_interrupt(struct kvm_vcpu *vcpu); |
diff --git a/arch/x86/include/asm/mmu_context.h b/arch/x86/include/asm/mmu_context.h index 4a2d4e0c18d..8b5393ec108 100644 --- a/arch/x86/include/asm/mmu_context.h +++ b/arch/x86/include/asm/mmu_context.h | |||
@@ -36,8 +36,6 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, | |||
36 | unsigned cpu = smp_processor_id(); | 36 | unsigned cpu = smp_processor_id(); |
37 | 37 | ||
38 | if (likely(prev != next)) { | 38 | if (likely(prev != next)) { |
39 | /* stop flush ipis for the previous mm */ | ||
40 | cpumask_clear_cpu(cpu, mm_cpumask(prev)); | ||
41 | #ifdef CONFIG_SMP | 39 | #ifdef CONFIG_SMP |
42 | percpu_write(cpu_tlbstate.state, TLBSTATE_OK); | 40 | percpu_write(cpu_tlbstate.state, TLBSTATE_OK); |
43 | percpu_write(cpu_tlbstate.active_mm, next); | 41 | percpu_write(cpu_tlbstate.active_mm, next); |
@@ -47,6 +45,9 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, | |||
47 | /* Re-load page tables */ | 45 | /* Re-load page tables */ |
48 | load_cr3(next->pgd); | 46 | load_cr3(next->pgd); |
49 | 47 | ||
48 | /* stop flush ipis for the previous mm */ | ||
49 | cpumask_clear_cpu(cpu, mm_cpumask(prev)); | ||
50 | |||
50 | /* | 51 | /* |
51 | * load the LDT, if the LDT is different: | 52 | * load the LDT, if the LDT is different: |
52 | */ | 53 | */ |
diff --git a/arch/x86/include/asm/numa_32.h b/arch/x86/include/asm/numa_32.h index a37229011b5..b0ef2b449a9 100644 --- a/arch/x86/include/asm/numa_32.h +++ b/arch/x86/include/asm/numa_32.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _ASM_X86_NUMA_32_H | 1 | #ifndef _ASM_X86_NUMA_32_H |
2 | #define _ASM_X86_NUMA_32_H | 2 | #define _ASM_X86_NUMA_32_H |
3 | 3 | ||
4 | extern int numa_off; | ||
5 | |||
4 | extern int pxm_to_nid(int pxm); | 6 | extern int pxm_to_nid(int pxm); |
5 | extern void numa_remove_cpu(int cpu); | 7 | extern void numa_remove_cpu(int cpu); |
6 | 8 | ||
diff --git a/arch/x86/include/asm/numa_64.h b/arch/x86/include/asm/numa_64.h index 5ae87285a50..0493be39607 100644 --- a/arch/x86/include/asm/numa_64.h +++ b/arch/x86/include/asm/numa_64.h | |||
@@ -40,6 +40,7 @@ extern void __cpuinit numa_remove_cpu(int cpu); | |||
40 | #ifdef CONFIG_NUMA_EMU | 40 | #ifdef CONFIG_NUMA_EMU |
41 | #define FAKE_NODE_MIN_SIZE ((u64)32 << 20) | 41 | #define FAKE_NODE_MIN_SIZE ((u64)32 << 20) |
42 | #define FAKE_NODE_MIN_HASH_MASK (~(FAKE_NODE_MIN_SIZE - 1UL)) | 42 | #define FAKE_NODE_MIN_HASH_MASK (~(FAKE_NODE_MIN_SIZE - 1UL)) |
43 | void numa_emu_cmdline(char *); | ||
43 | #endif /* CONFIG_NUMA_EMU */ | 44 | #endif /* CONFIG_NUMA_EMU */ |
44 | #else | 45 | #else |
45 | static inline void init_cpu_to_node(void) { } | 46 | static inline void init_cpu_to_node(void) { } |
diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h index 7709c12431b..ebbc4d8ab17 100644 --- a/arch/x86/include/asm/paravirt.h +++ b/arch/x86/include/asm/paravirt.h | |||
@@ -435,6 +435,11 @@ static inline void pte_update(struct mm_struct *mm, unsigned long addr, | |||
435 | { | 435 | { |
436 | PVOP_VCALL3(pv_mmu_ops.pte_update, mm, addr, ptep); | 436 | PVOP_VCALL3(pv_mmu_ops.pte_update, mm, addr, ptep); |
437 | } | 437 | } |
438 | static inline void pmd_update(struct mm_struct *mm, unsigned long addr, | ||
439 | pmd_t *pmdp) | ||
440 | { | ||
441 | PVOP_VCALL3(pv_mmu_ops.pmd_update, mm, addr, pmdp); | ||
442 | } | ||
438 | 443 | ||
439 | static inline void pte_update_defer(struct mm_struct *mm, unsigned long addr, | 444 | static inline void pte_update_defer(struct mm_struct *mm, unsigned long addr, |
440 | pte_t *ptep) | 445 | pte_t *ptep) |
@@ -442,6 +447,12 @@ static inline void pte_update_defer(struct mm_struct *mm, unsigned long addr, | |||
442 | PVOP_VCALL3(pv_mmu_ops.pte_update_defer, mm, addr, ptep); | 447 | PVOP_VCALL3(pv_mmu_ops.pte_update_defer, mm, addr, ptep); |
443 | } | 448 | } |
444 | 449 | ||
450 | static inline void pmd_update_defer(struct mm_struct *mm, unsigned long addr, | ||
451 | pmd_t *pmdp) | ||
452 | { | ||
453 | PVOP_VCALL3(pv_mmu_ops.pmd_update_defer, mm, addr, pmdp); | ||
454 | } | ||
455 | |||
445 | static inline pte_t __pte(pteval_t val) | 456 | static inline pte_t __pte(pteval_t val) |
446 | { | 457 | { |
447 | pteval_t ret; | 458 | pteval_t ret; |
@@ -543,6 +554,19 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, | |||
543 | PVOP_VCALL4(pv_mmu_ops.set_pte_at, mm, addr, ptep, pte.pte); | 554 | PVOP_VCALL4(pv_mmu_ops.set_pte_at, mm, addr, ptep, pte.pte); |
544 | } | 555 | } |
545 | 556 | ||
557 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | ||
558 | static inline void set_pmd_at(struct mm_struct *mm, unsigned long addr, | ||
559 | pmd_t *pmdp, pmd_t pmd) | ||
560 | { | ||
561 | if (sizeof(pmdval_t) > sizeof(long)) | ||
562 | /* 5 arg words */ | ||
563 | pv_mmu_ops.set_pmd_at(mm, addr, pmdp, pmd); | ||
564 | else | ||
565 | PVOP_VCALL4(pv_mmu_ops.set_pmd_at, mm, addr, pmdp, | ||
566 | native_pmd_val(pmd)); | ||
567 | } | ||
568 | #endif | ||
569 | |||
546 | static inline void set_pmd(pmd_t *pmdp, pmd_t pmd) | 570 | static inline void set_pmd(pmd_t *pmdp, pmd_t pmd) |
547 | { | 571 | { |
548 | pmdval_t val = native_pmd_val(pmd); | 572 | pmdval_t val = native_pmd_val(pmd); |
diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h index b82bac97525..82885099c86 100644 --- a/arch/x86/include/asm/paravirt_types.h +++ b/arch/x86/include/asm/paravirt_types.h | |||
@@ -265,10 +265,16 @@ struct pv_mmu_ops { | |||
265 | void (*set_pte_at)(struct mm_struct *mm, unsigned long addr, | 265 | void (*set_pte_at)(struct mm_struct *mm, unsigned long addr, |
266 | pte_t *ptep, pte_t pteval); | 266 | pte_t *ptep, pte_t pteval); |
267 | void (*set_pmd)(pmd_t *pmdp, pmd_t pmdval); | 267 | void (*set_pmd)(pmd_t *pmdp, pmd_t pmdval); |
268 | void (*set_pmd_at)(struct mm_struct *mm, unsigned long addr, | ||
269 | pmd_t *pmdp, pmd_t pmdval); | ||
268 | void (*pte_update)(struct mm_struct *mm, unsigned long addr, | 270 | void (*pte_update)(struct mm_struct *mm, unsigned long addr, |
269 | pte_t *ptep); | 271 | pte_t *ptep); |
270 | void (*pte_update_defer)(struct mm_struct *mm, | 272 | void (*pte_update_defer)(struct mm_struct *mm, |
271 | unsigned long addr, pte_t *ptep); | 273 | unsigned long addr, pte_t *ptep); |
274 | void (*pmd_update)(struct mm_struct *mm, unsigned long addr, | ||
275 | pmd_t *pmdp); | ||
276 | void (*pmd_update_defer)(struct mm_struct *mm, | ||
277 | unsigned long addr, pmd_t *pmdp); | ||
272 | 278 | ||
273 | pte_t (*ptep_modify_prot_start)(struct mm_struct *mm, unsigned long addr, | 279 | pte_t (*ptep_modify_prot_start)(struct mm_struct *mm, unsigned long addr, |
274 | pte_t *ptep); | 280 | pte_t *ptep); |
diff --git a/arch/x86/include/asm/percpu.h b/arch/x86/include/asm/percpu.h index 8ee45167e81..7e172955ee5 100644 --- a/arch/x86/include/asm/percpu.h +++ b/arch/x86/include/asm/percpu.h | |||
@@ -273,34 +273,34 @@ do { \ | |||
273 | typeof(var) pxo_new__ = (nval); \ | 273 | typeof(var) pxo_new__ = (nval); \ |
274 | switch (sizeof(var)) { \ | 274 | switch (sizeof(var)) { \ |
275 | case 1: \ | 275 | case 1: \ |
276 | asm("\n1:mov "__percpu_arg(1)",%%al" \ | 276 | asm("\n\tmov "__percpu_arg(1)",%%al" \ |
277 | "\n\tcmpxchgb %2, "__percpu_arg(1) \ | 277 | "\n1:\tcmpxchgb %2, "__percpu_arg(1) \ |
278 | "\n\tjnz 1b" \ | 278 | "\n\tjnz 1b" \ |
279 | : "=a" (pxo_ret__), "+m" (var) \ | 279 | : "=&a" (pxo_ret__), "+m" (var) \ |
280 | : "q" (pxo_new__) \ | 280 | : "q" (pxo_new__) \ |
281 | : "memory"); \ | 281 | : "memory"); \ |
282 | break; \ | 282 | break; \ |
283 | case 2: \ | 283 | case 2: \ |
284 | asm("\n1:mov "__percpu_arg(1)",%%ax" \ | 284 | asm("\n\tmov "__percpu_arg(1)",%%ax" \ |
285 | "\n\tcmpxchgw %2, "__percpu_arg(1) \ | 285 | "\n1:\tcmpxchgw %2, "__percpu_arg(1) \ |
286 | "\n\tjnz 1b" \ | 286 | "\n\tjnz 1b" \ |
287 | : "=a" (pxo_ret__), "+m" (var) \ | 287 | : "=&a" (pxo_ret__), "+m" (var) \ |
288 | : "r" (pxo_new__) \ | 288 | : "r" (pxo_new__) \ |
289 | : "memory"); \ | 289 | : "memory"); \ |
290 | break; \ | 290 | break; \ |
291 | case 4: \ | 291 | case 4: \ |
292 | asm("\n1:mov "__percpu_arg(1)",%%eax" \ | 292 | asm("\n\tmov "__percpu_arg(1)",%%eax" \ |
293 | "\n\tcmpxchgl %2, "__percpu_arg(1) \ | 293 | "\n1:\tcmpxchgl %2, "__percpu_arg(1) \ |
294 | "\n\tjnz 1b" \ | 294 | "\n\tjnz 1b" \ |
295 | : "=a" (pxo_ret__), "+m" (var) \ | 295 | : "=&a" (pxo_ret__), "+m" (var) \ |
296 | : "r" (pxo_new__) \ | 296 | : "r" (pxo_new__) \ |
297 | : "memory"); \ | 297 | : "memory"); \ |
298 | break; \ | 298 | break; \ |
299 | case 8: \ | 299 | case 8: \ |
300 | asm("\n1:mov "__percpu_arg(1)",%%rax" \ | 300 | asm("\n\tmov "__percpu_arg(1)",%%rax" \ |
301 | "\n\tcmpxchgq %2, "__percpu_arg(1) \ | 301 | "\n1:\tcmpxchgq %2, "__percpu_arg(1) \ |
302 | "\n\tjnz 1b" \ | 302 | "\n\tjnz 1b" \ |
303 | : "=a" (pxo_ret__), "+m" (var) \ | 303 | : "=&a" (pxo_ret__), "+m" (var) \ |
304 | : "r" (pxo_new__) \ | 304 | : "r" (pxo_new__) \ |
305 | : "memory"); \ | 305 | : "memory"); \ |
306 | break; \ | 306 | break; \ |
@@ -414,8 +414,6 @@ do { \ | |||
414 | #define this_cpu_xchg_1(pcp, nval) percpu_xchg_op(pcp, nval) | 414 | #define this_cpu_xchg_1(pcp, nval) percpu_xchg_op(pcp, nval) |
415 | #define this_cpu_xchg_2(pcp, nval) percpu_xchg_op(pcp, nval) | 415 | #define this_cpu_xchg_2(pcp, nval) percpu_xchg_op(pcp, nval) |
416 | #define this_cpu_xchg_4(pcp, nval) percpu_xchg_op(pcp, nval) | 416 | #define this_cpu_xchg_4(pcp, nval) percpu_xchg_op(pcp, nval) |
417 | #define this_cpu_xchg_8(pcp, nval) percpu_xchg_op(pcp, nval) | ||
418 | #define this_cpu_cmpxchg_8(pcp, oval, nval) percpu_cmpxchg_op(pcp, oval, nval) | ||
419 | 417 | ||
420 | #define irqsafe_cpu_add_1(pcp, val) percpu_add_op((pcp), val) | 418 | #define irqsafe_cpu_add_1(pcp, val) percpu_add_op((pcp), val) |
421 | #define irqsafe_cpu_add_2(pcp, val) percpu_add_op((pcp), val) | 419 | #define irqsafe_cpu_add_2(pcp, val) percpu_add_op((pcp), val) |
@@ -432,8 +430,6 @@ do { \ | |||
432 | #define irqsafe_cpu_xchg_1(pcp, nval) percpu_xchg_op(pcp, nval) | 430 | #define irqsafe_cpu_xchg_1(pcp, nval) percpu_xchg_op(pcp, nval) |
433 | #define irqsafe_cpu_xchg_2(pcp, nval) percpu_xchg_op(pcp, nval) | 431 | #define irqsafe_cpu_xchg_2(pcp, nval) percpu_xchg_op(pcp, nval) |
434 | #define irqsafe_cpu_xchg_4(pcp, nval) percpu_xchg_op(pcp, nval) | 432 | #define irqsafe_cpu_xchg_4(pcp, nval) percpu_xchg_op(pcp, nval) |
435 | #define irqsafe_cpu_xchg_8(pcp, nval) percpu_xchg_op(pcp, nval) | ||
436 | #define irqsafe_cpu_cmpxchg_8(pcp, oval, nval) percpu_cmpxchg_op(pcp, oval, nval) | ||
437 | 433 | ||
438 | #ifndef CONFIG_M386 | 434 | #ifndef CONFIG_M386 |
439 | #define __this_cpu_add_return_1(pcp, val) percpu_add_return_op(pcp, val) | 435 | #define __this_cpu_add_return_1(pcp, val) percpu_add_return_op(pcp, val) |
@@ -475,11 +471,15 @@ do { \ | |||
475 | #define this_cpu_or_8(pcp, val) percpu_to_op("or", (pcp), val) | 471 | #define this_cpu_or_8(pcp, val) percpu_to_op("or", (pcp), val) |
476 | #define this_cpu_xor_8(pcp, val) percpu_to_op("xor", (pcp), val) | 472 | #define this_cpu_xor_8(pcp, val) percpu_to_op("xor", (pcp), val) |
477 | #define this_cpu_add_return_8(pcp, val) percpu_add_return_op(pcp, val) | 473 | #define this_cpu_add_return_8(pcp, val) percpu_add_return_op(pcp, val) |
474 | #define this_cpu_xchg_8(pcp, nval) percpu_xchg_op(pcp, nval) | ||
475 | #define this_cpu_cmpxchg_8(pcp, oval, nval) percpu_cmpxchg_op(pcp, oval, nval) | ||
478 | 476 | ||
479 | #define irqsafe_cpu_add_8(pcp, val) percpu_add_op((pcp), val) | 477 | #define irqsafe_cpu_add_8(pcp, val) percpu_add_op((pcp), val) |
480 | #define irqsafe_cpu_and_8(pcp, val) percpu_to_op("and", (pcp), val) | 478 | #define irqsafe_cpu_and_8(pcp, val) percpu_to_op("and", (pcp), val) |
481 | #define irqsafe_cpu_or_8(pcp, val) percpu_to_op("or", (pcp), val) | 479 | #define irqsafe_cpu_or_8(pcp, val) percpu_to_op("or", (pcp), val) |
482 | #define irqsafe_cpu_xor_8(pcp, val) percpu_to_op("xor", (pcp), val) | 480 | #define irqsafe_cpu_xor_8(pcp, val) percpu_to_op("xor", (pcp), val) |
481 | #define irqsafe_cpu_xchg_8(pcp, nval) percpu_xchg_op(pcp, nval) | ||
482 | #define irqsafe_cpu_cmpxchg_8(pcp, oval, nval) percpu_cmpxchg_op(pcp, oval, nval) | ||
483 | #endif | 483 | #endif |
484 | 484 | ||
485 | /* This is not atomic against other CPUs -- CPU preemption needs to be off */ | 485 | /* This is not atomic against other CPUs -- CPU preemption needs to be off */ |
diff --git a/arch/x86/include/asm/pgtable-2level.h b/arch/x86/include/asm/pgtable-2level.h index 2334982b339..98391db840c 100644 --- a/arch/x86/include/asm/pgtable-2level.h +++ b/arch/x86/include/asm/pgtable-2level.h | |||
@@ -46,6 +46,15 @@ static inline pte_t native_ptep_get_and_clear(pte_t *xp) | |||
46 | #define native_ptep_get_and_clear(xp) native_local_ptep_get_and_clear(xp) | 46 | #define native_ptep_get_and_clear(xp) native_local_ptep_get_and_clear(xp) |
47 | #endif | 47 | #endif |
48 | 48 | ||
49 | #ifdef CONFIG_SMP | ||
50 | static inline pmd_t native_pmdp_get_and_clear(pmd_t *xp) | ||
51 | { | ||
52 | return __pmd(xchg((pmdval_t *)xp, 0)); | ||
53 | } | ||
54 | #else | ||
55 | #define native_pmdp_get_and_clear(xp) native_local_pmdp_get_and_clear(xp) | ||
56 | #endif | ||
57 | |||
49 | /* | 58 | /* |
50 | * Bits _PAGE_BIT_PRESENT, _PAGE_BIT_FILE and _PAGE_BIT_PROTNONE are taken, | 59 | * Bits _PAGE_BIT_PRESENT, _PAGE_BIT_FILE and _PAGE_BIT_PROTNONE are taken, |
51 | * split up the 29 bits of offset into this range: | 60 | * split up the 29 bits of offset into this range: |
diff --git a/arch/x86/include/asm/pgtable-3level.h b/arch/x86/include/asm/pgtable-3level.h index 177b0165ea0..94b979d1b58 100644 --- a/arch/x86/include/asm/pgtable-3level.h +++ b/arch/x86/include/asm/pgtable-3level.h | |||
@@ -104,6 +104,29 @@ static inline pte_t native_ptep_get_and_clear(pte_t *ptep) | |||
104 | #define native_ptep_get_and_clear(xp) native_local_ptep_get_and_clear(xp) | 104 | #define native_ptep_get_and_clear(xp) native_local_ptep_get_and_clear(xp) |
105 | #endif | 105 | #endif |
106 | 106 | ||
107 | #ifdef CONFIG_SMP | ||
108 | union split_pmd { | ||
109 | struct { | ||
110 | u32 pmd_low; | ||
111 | u32 pmd_high; | ||
112 | }; | ||
113 | pmd_t pmd; | ||
114 | }; | ||
115 | static inline pmd_t native_pmdp_get_and_clear(pmd_t *pmdp) | ||
116 | { | ||
117 | union split_pmd res, *orig = (union split_pmd *)pmdp; | ||
118 | |||
119 | /* xchg acts as a barrier before setting of the high bits */ | ||
120 | res.pmd_low = xchg(&orig->pmd_low, 0); | ||
121 | res.pmd_high = orig->pmd_high; | ||
122 | orig->pmd_high = 0; | ||
123 | |||
124 | return res.pmd; | ||
125 | } | ||
126 | #else | ||
127 | #define native_pmdp_get_and_clear(xp) native_local_pmdp_get_and_clear(xp) | ||
128 | #endif | ||
129 | |||
107 | /* | 130 | /* |
108 | * Bits 0, 6 and 7 are taken in the low part of the pte, | 131 | * Bits 0, 6 and 7 are taken in the low part of the pte, |
109 | * put the 32 bits of offset into the high part. | 132 | * put the 32 bits of offset into the high part. |
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index ada823a13c7..18601c86fab 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h | |||
@@ -35,6 +35,7 @@ extern struct mm_struct *pgd_page_get_mm(struct page *page); | |||
35 | #else /* !CONFIG_PARAVIRT */ | 35 | #else /* !CONFIG_PARAVIRT */ |
36 | #define set_pte(ptep, pte) native_set_pte(ptep, pte) | 36 | #define set_pte(ptep, pte) native_set_pte(ptep, pte) |
37 | #define set_pte_at(mm, addr, ptep, pte) native_set_pte_at(mm, addr, ptep, pte) | 37 | #define set_pte_at(mm, addr, ptep, pte) native_set_pte_at(mm, addr, ptep, pte) |
38 | #define set_pmd_at(mm, addr, pmdp, pmd) native_set_pmd_at(mm, addr, pmdp, pmd) | ||
38 | 39 | ||
39 | #define set_pte_atomic(ptep, pte) \ | 40 | #define set_pte_atomic(ptep, pte) \ |
40 | native_set_pte_atomic(ptep, pte) | 41 | native_set_pte_atomic(ptep, pte) |
@@ -59,6 +60,8 @@ extern struct mm_struct *pgd_page_get_mm(struct page *page); | |||
59 | 60 | ||
60 | #define pte_update(mm, addr, ptep) do { } while (0) | 61 | #define pte_update(mm, addr, ptep) do { } while (0) |
61 | #define pte_update_defer(mm, addr, ptep) do { } while (0) | 62 | #define pte_update_defer(mm, addr, ptep) do { } while (0) |
63 | #define pmd_update(mm, addr, ptep) do { } while (0) | ||
64 | #define pmd_update_defer(mm, addr, ptep) do { } while (0) | ||
62 | 65 | ||
63 | #define pgd_val(x) native_pgd_val(x) | 66 | #define pgd_val(x) native_pgd_val(x) |
64 | #define __pgd(x) native_make_pgd(x) | 67 | #define __pgd(x) native_make_pgd(x) |
@@ -94,6 +97,11 @@ static inline int pte_young(pte_t pte) | |||
94 | return pte_flags(pte) & _PAGE_ACCESSED; | 97 | return pte_flags(pte) & _PAGE_ACCESSED; |
95 | } | 98 | } |
96 | 99 | ||
100 | static inline int pmd_young(pmd_t pmd) | ||
101 | { | ||
102 | return pmd_flags(pmd) & _PAGE_ACCESSED; | ||
103 | } | ||
104 | |||
97 | static inline int pte_write(pte_t pte) | 105 | static inline int pte_write(pte_t pte) |
98 | { | 106 | { |
99 | return pte_flags(pte) & _PAGE_RW; | 107 | return pte_flags(pte) & _PAGE_RW; |
@@ -142,6 +150,23 @@ static inline int pmd_large(pmd_t pte) | |||
142 | (_PAGE_PSE | _PAGE_PRESENT); | 150 | (_PAGE_PSE | _PAGE_PRESENT); |
143 | } | 151 | } |
144 | 152 | ||
153 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | ||
154 | static inline int pmd_trans_splitting(pmd_t pmd) | ||
155 | { | ||
156 | return pmd_val(pmd) & _PAGE_SPLITTING; | ||
157 | } | ||
158 | |||
159 | static inline int pmd_trans_huge(pmd_t pmd) | ||
160 | { | ||
161 | return pmd_val(pmd) & _PAGE_PSE; | ||
162 | } | ||
163 | |||
164 | static inline int has_transparent_hugepage(void) | ||
165 | { | ||
166 | return cpu_has_pse; | ||
167 | } | ||
168 | #endif /* CONFIG_TRANSPARENT_HUGEPAGE */ | ||
169 | |||
145 | static inline pte_t pte_set_flags(pte_t pte, pteval_t set) | 170 | static inline pte_t pte_set_flags(pte_t pte, pteval_t set) |
146 | { | 171 | { |
147 | pteval_t v = native_pte_val(pte); | 172 | pteval_t v = native_pte_val(pte); |
@@ -216,6 +241,55 @@ static inline pte_t pte_mkspecial(pte_t pte) | |||
216 | return pte_set_flags(pte, _PAGE_SPECIAL); | 241 | return pte_set_flags(pte, _PAGE_SPECIAL); |
217 | } | 242 | } |
218 | 243 | ||
244 | static inline pmd_t pmd_set_flags(pmd_t pmd, pmdval_t set) | ||
245 | { | ||
246 | pmdval_t v = native_pmd_val(pmd); | ||
247 | |||
248 | return __pmd(v | set); | ||
249 | } | ||
250 | |||
251 | static inline pmd_t pmd_clear_flags(pmd_t pmd, pmdval_t clear) | ||
252 | { | ||
253 | pmdval_t v = native_pmd_val(pmd); | ||
254 | |||
255 | return __pmd(v & ~clear); | ||
256 | } | ||
257 | |||
258 | static inline pmd_t pmd_mkold(pmd_t pmd) | ||
259 | { | ||
260 | return pmd_clear_flags(pmd, _PAGE_ACCESSED); | ||
261 | } | ||
262 | |||
263 | static inline pmd_t pmd_wrprotect(pmd_t pmd) | ||
264 | { | ||
265 | return pmd_clear_flags(pmd, _PAGE_RW); | ||
266 | } | ||
267 | |||
268 | static inline pmd_t pmd_mkdirty(pmd_t pmd) | ||
269 | { | ||
270 | return pmd_set_flags(pmd, _PAGE_DIRTY); | ||
271 | } | ||
272 | |||
273 | static inline pmd_t pmd_mkhuge(pmd_t pmd) | ||
274 | { | ||
275 | return pmd_set_flags(pmd, _PAGE_PSE); | ||
276 | } | ||
277 | |||
278 | static inline pmd_t pmd_mkyoung(pmd_t pmd) | ||
279 | { | ||
280 | return pmd_set_flags(pmd, _PAGE_ACCESSED); | ||
281 | } | ||
282 | |||
283 | static inline pmd_t pmd_mkwrite(pmd_t pmd) | ||
284 | { | ||
285 | return pmd_set_flags(pmd, _PAGE_RW); | ||
286 | } | ||
287 | |||
288 | static inline pmd_t pmd_mknotpresent(pmd_t pmd) | ||
289 | { | ||
290 | return pmd_clear_flags(pmd, _PAGE_PRESENT); | ||
291 | } | ||
292 | |||
219 | /* | 293 | /* |
220 | * Mask out unsupported bits in a present pgprot. Non-present pgprots | 294 | * Mask out unsupported bits in a present pgprot. Non-present pgprots |
221 | * can use those bits for other purposes, so leave them be. | 295 | * can use those bits for other purposes, so leave them be. |
@@ -256,6 +330,16 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
256 | return __pte(val); | 330 | return __pte(val); |
257 | } | 331 | } |
258 | 332 | ||
333 | static inline pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot) | ||
334 | { | ||
335 | pmdval_t val = pmd_val(pmd); | ||
336 | |||
337 | val &= _HPAGE_CHG_MASK; | ||
338 | val |= massage_pgprot(newprot) & ~_HPAGE_CHG_MASK; | ||
339 | |||
340 | return __pmd(val); | ||
341 | } | ||
342 | |||
259 | /* mprotect needs to preserve PAT bits when updating vm_page_prot */ | 343 | /* mprotect needs to preserve PAT bits when updating vm_page_prot */ |
260 | #define pgprot_modify pgprot_modify | 344 | #define pgprot_modify pgprot_modify |
261 | static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot) | 345 | static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot) |
@@ -350,7 +434,7 @@ static inline unsigned long pmd_page_vaddr(pmd_t pmd) | |||
350 | * Currently stuck as a macro due to indirect forward reference to | 434 | * Currently stuck as a macro due to indirect forward reference to |
351 | * linux/mmzone.h's __section_mem_map_addr() definition: | 435 | * linux/mmzone.h's __section_mem_map_addr() definition: |
352 | */ | 436 | */ |
353 | #define pmd_page(pmd) pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT) | 437 | #define pmd_page(pmd) pfn_to_page((pmd_val(pmd) & PTE_PFN_MASK) >> PAGE_SHIFT) |
354 | 438 | ||
355 | /* | 439 | /* |
356 | * the pmd page can be thought of an array like this: pmd_t[PTRS_PER_PMD] | 440 | * the pmd page can be thought of an array like this: pmd_t[PTRS_PER_PMD] |
@@ -524,12 +608,26 @@ static inline pte_t native_local_ptep_get_and_clear(pte_t *ptep) | |||
524 | return res; | 608 | return res; |
525 | } | 609 | } |
526 | 610 | ||
611 | static inline pmd_t native_local_pmdp_get_and_clear(pmd_t *pmdp) | ||
612 | { | ||
613 | pmd_t res = *pmdp; | ||
614 | |||
615 | native_pmd_clear(pmdp); | ||
616 | return res; | ||
617 | } | ||
618 | |||
527 | static inline void native_set_pte_at(struct mm_struct *mm, unsigned long addr, | 619 | static inline void native_set_pte_at(struct mm_struct *mm, unsigned long addr, |
528 | pte_t *ptep , pte_t pte) | 620 | pte_t *ptep , pte_t pte) |
529 | { | 621 | { |
530 | native_set_pte(ptep, pte); | 622 | native_set_pte(ptep, pte); |
531 | } | 623 | } |
532 | 624 | ||
625 | static inline void native_set_pmd_at(struct mm_struct *mm, unsigned long addr, | ||
626 | pmd_t *pmdp , pmd_t pmd) | ||
627 | { | ||
628 | native_set_pmd(pmdp, pmd); | ||
629 | } | ||
630 | |||
533 | #ifndef CONFIG_PARAVIRT | 631 | #ifndef CONFIG_PARAVIRT |
534 | /* | 632 | /* |
535 | * Rules for using pte_update - it must be called after any PTE update which | 633 | * Rules for using pte_update - it must be called after any PTE update which |
@@ -607,6 +705,49 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, | |||
607 | 705 | ||
608 | #define flush_tlb_fix_spurious_fault(vma, address) | 706 | #define flush_tlb_fix_spurious_fault(vma, address) |
609 | 707 | ||
708 | #define mk_pmd(page, pgprot) pfn_pmd(page_to_pfn(page), (pgprot)) | ||
709 | |||
710 | #define __HAVE_ARCH_PMDP_SET_ACCESS_FLAGS | ||
711 | extern int pmdp_set_access_flags(struct vm_area_struct *vma, | ||
712 | unsigned long address, pmd_t *pmdp, | ||
713 | pmd_t entry, int dirty); | ||
714 | |||
715 | #define __HAVE_ARCH_PMDP_TEST_AND_CLEAR_YOUNG | ||
716 | extern int pmdp_test_and_clear_young(struct vm_area_struct *vma, | ||
717 | unsigned long addr, pmd_t *pmdp); | ||
718 | |||
719 | #define __HAVE_ARCH_PMDP_CLEAR_YOUNG_FLUSH | ||
720 | extern int pmdp_clear_flush_young(struct vm_area_struct *vma, | ||
721 | unsigned long address, pmd_t *pmdp); | ||
722 | |||
723 | |||
724 | #define __HAVE_ARCH_PMDP_SPLITTING_FLUSH | ||
725 | extern void pmdp_splitting_flush(struct vm_area_struct *vma, | ||
726 | unsigned long addr, pmd_t *pmdp); | ||
727 | |||
728 | #define __HAVE_ARCH_PMD_WRITE | ||
729 | static inline int pmd_write(pmd_t pmd) | ||
730 | { | ||
731 | return pmd_flags(pmd) & _PAGE_RW; | ||
732 | } | ||
733 | |||
734 | #define __HAVE_ARCH_PMDP_GET_AND_CLEAR | ||
735 | static inline pmd_t pmdp_get_and_clear(struct mm_struct *mm, unsigned long addr, | ||
736 | pmd_t *pmdp) | ||
737 | { | ||
738 | pmd_t pmd = native_pmdp_get_and_clear(pmdp); | ||
739 | pmd_update(mm, addr, pmdp); | ||
740 | return pmd; | ||
741 | } | ||
742 | |||
743 | #define __HAVE_ARCH_PMDP_SET_WRPROTECT | ||
744 | static inline void pmdp_set_wrprotect(struct mm_struct *mm, | ||
745 | unsigned long addr, pmd_t *pmdp) | ||
746 | { | ||
747 | clear_bit(_PAGE_BIT_RW, (unsigned long *)pmdp); | ||
748 | pmd_update(mm, addr, pmdp); | ||
749 | } | ||
750 | |||
610 | /* | 751 | /* |
611 | * clone_pgd_range(pgd_t *dst, pgd_t *src, int count); | 752 | * clone_pgd_range(pgd_t *dst, pgd_t *src, int count); |
612 | * | 753 | * |
diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h index f86da20347f..975f709e09a 100644 --- a/arch/x86/include/asm/pgtable_64.h +++ b/arch/x86/include/asm/pgtable_64.h | |||
@@ -59,6 +59,16 @@ static inline void native_set_pte_atomic(pte_t *ptep, pte_t pte) | |||
59 | native_set_pte(ptep, pte); | 59 | native_set_pte(ptep, pte); |
60 | } | 60 | } |
61 | 61 | ||
62 | static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd) | ||
63 | { | ||
64 | *pmdp = pmd; | ||
65 | } | ||
66 | |||
67 | static inline void native_pmd_clear(pmd_t *pmd) | ||
68 | { | ||
69 | native_set_pmd(pmd, native_make_pmd(0)); | ||
70 | } | ||
71 | |||
62 | static inline pte_t native_ptep_get_and_clear(pte_t *xp) | 72 | static inline pte_t native_ptep_get_and_clear(pte_t *xp) |
63 | { | 73 | { |
64 | #ifdef CONFIG_SMP | 74 | #ifdef CONFIG_SMP |
@@ -72,14 +82,17 @@ static inline pte_t native_ptep_get_and_clear(pte_t *xp) | |||
72 | #endif | 82 | #endif |
73 | } | 83 | } |
74 | 84 | ||
75 | static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd) | 85 | static inline pmd_t native_pmdp_get_and_clear(pmd_t *xp) |
76 | { | 86 | { |
77 | *pmdp = pmd; | 87 | #ifdef CONFIG_SMP |
78 | } | 88 | return native_make_pmd(xchg(&xp->pmd, 0)); |
79 | 89 | #else | |
80 | static inline void native_pmd_clear(pmd_t *pmd) | 90 | /* native_local_pmdp_get_and_clear, |
81 | { | 91 | but duplicated because of cyclic dependency */ |
82 | native_set_pmd(pmd, native_make_pmd(0)); | 92 | pmd_t ret = *xp; |
93 | native_pmd_clear(xp); | ||
94 | return ret; | ||
95 | #endif | ||
83 | } | 96 | } |
84 | 97 | ||
85 | static inline void native_set_pud(pud_t *pudp, pud_t pud) | 98 | static inline void native_set_pud(pud_t *pudp, pud_t pud) |
@@ -168,6 +181,7 @@ extern void cleanup_highmap(void); | |||
168 | #define kc_offset_to_vaddr(o) ((o) | ~__VIRTUAL_MASK) | 181 | #define kc_offset_to_vaddr(o) ((o) | ~__VIRTUAL_MASK) |
169 | 182 | ||
170 | #define __HAVE_ARCH_PTE_SAME | 183 | #define __HAVE_ARCH_PTE_SAME |
184 | |||
171 | #endif /* !__ASSEMBLY__ */ | 185 | #endif /* !__ASSEMBLY__ */ |
172 | 186 | ||
173 | #endif /* _ASM_X86_PGTABLE_64_H */ | 187 | #endif /* _ASM_X86_PGTABLE_64_H */ |
diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h index d1f4a760be2..7db7723d1f3 100644 --- a/arch/x86/include/asm/pgtable_types.h +++ b/arch/x86/include/asm/pgtable_types.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #define _PAGE_BIT_PAT_LARGE 12 /* On 2MB or 1GB pages */ | 22 | #define _PAGE_BIT_PAT_LARGE 12 /* On 2MB or 1GB pages */ |
23 | #define _PAGE_BIT_SPECIAL _PAGE_BIT_UNUSED1 | 23 | #define _PAGE_BIT_SPECIAL _PAGE_BIT_UNUSED1 |
24 | #define _PAGE_BIT_CPA_TEST _PAGE_BIT_UNUSED1 | 24 | #define _PAGE_BIT_CPA_TEST _PAGE_BIT_UNUSED1 |
25 | #define _PAGE_BIT_SPLITTING _PAGE_BIT_UNUSED1 /* only valid on a PSE pmd */ | ||
25 | #define _PAGE_BIT_NX 63 /* No execute: only valid after cpuid check */ | 26 | #define _PAGE_BIT_NX 63 /* No execute: only valid after cpuid check */ |
26 | 27 | ||
27 | /* If _PAGE_BIT_PRESENT is clear, we use these: */ | 28 | /* If _PAGE_BIT_PRESENT is clear, we use these: */ |
@@ -45,6 +46,7 @@ | |||
45 | #define _PAGE_PAT_LARGE (_AT(pteval_t, 1) << _PAGE_BIT_PAT_LARGE) | 46 | #define _PAGE_PAT_LARGE (_AT(pteval_t, 1) << _PAGE_BIT_PAT_LARGE) |
46 | #define _PAGE_SPECIAL (_AT(pteval_t, 1) << _PAGE_BIT_SPECIAL) | 47 | #define _PAGE_SPECIAL (_AT(pteval_t, 1) << _PAGE_BIT_SPECIAL) |
47 | #define _PAGE_CPA_TEST (_AT(pteval_t, 1) << _PAGE_BIT_CPA_TEST) | 48 | #define _PAGE_CPA_TEST (_AT(pteval_t, 1) << _PAGE_BIT_CPA_TEST) |
49 | #define _PAGE_SPLITTING (_AT(pteval_t, 1) << _PAGE_BIT_SPLITTING) | ||
48 | #define __HAVE_ARCH_PTE_SPECIAL | 50 | #define __HAVE_ARCH_PTE_SPECIAL |
49 | 51 | ||
50 | #ifdef CONFIG_KMEMCHECK | 52 | #ifdef CONFIG_KMEMCHECK |
@@ -70,6 +72,7 @@ | |||
70 | /* Set of bits not changed in pte_modify */ | 72 | /* Set of bits not changed in pte_modify */ |
71 | #define _PAGE_CHG_MASK (PTE_PFN_MASK | _PAGE_PCD | _PAGE_PWT | \ | 73 | #define _PAGE_CHG_MASK (PTE_PFN_MASK | _PAGE_PCD | _PAGE_PWT | \ |
72 | _PAGE_SPECIAL | _PAGE_ACCESSED | _PAGE_DIRTY) | 74 | _PAGE_SPECIAL | _PAGE_ACCESSED | _PAGE_DIRTY) |
75 | #define _HPAGE_CHG_MASK (_PAGE_CHG_MASK | _PAGE_PSE) | ||
73 | 76 | ||
74 | #define _PAGE_CACHE_MASK (_PAGE_PCD | _PAGE_PWT) | 77 | #define _PAGE_CACHE_MASK (_PAGE_PCD | _PAGE_PWT) |
75 | #define _PAGE_CACHE_WB (0) | 78 | #define _PAGE_CACHE_WB (0) |
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index 53fd1d5a1fe..45636cefa18 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h | |||
@@ -761,10 +761,11 @@ extern void select_idle_routine(const struct cpuinfo_x86 *c); | |||
761 | extern void init_c1e_mask(void); | 761 | extern void init_c1e_mask(void); |
762 | 762 | ||
763 | extern unsigned long boot_option_idle_override; | 763 | extern unsigned long boot_option_idle_override; |
764 | extern unsigned long idle_halt; | ||
765 | extern unsigned long idle_nomwait; | ||
766 | extern bool c1e_detected; | 764 | extern bool c1e_detected; |
767 | 765 | ||
766 | enum idle_boot_override {IDLE_NO_OVERRIDE=0, IDLE_HALT, IDLE_NOMWAIT, | ||
767 | IDLE_POLL, IDLE_FORCE_MWAIT}; | ||
768 | |||
768 | extern void enable_sep_cpu(void); | 769 | extern void enable_sep_cpu(void); |
769 | extern int sysenter_setup(void); | 770 | extern int sysenter_setup(void); |
770 | 771 | ||
diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h index 4c2f63c7fc1..1f469513677 100644 --- a/arch/x86/include/asm/smp.h +++ b/arch/x86/include/asm/smp.h | |||
@@ -40,10 +40,7 @@ DECLARE_EARLY_PER_CPU(u16, x86_cpu_to_apicid); | |||
40 | DECLARE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid); | 40 | DECLARE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid); |
41 | 41 | ||
42 | /* Static state in head.S used to set up a CPU */ | 42 | /* Static state in head.S used to set up a CPU */ |
43 | extern struct { | 43 | extern unsigned long stack_start; /* Initial stack pointer address */ |
44 | void *sp; | ||
45 | unsigned short ss; | ||
46 | } stack_start; | ||
47 | 44 | ||
48 | struct smp_ops { | 45 | struct smp_ops { |
49 | void (*smp_prepare_boot_cpu)(void); | 46 | void (*smp_prepare_boot_cpu)(void); |
diff --git a/arch/x86/include/asm/system_64.h b/arch/x86/include/asm/system_64.h deleted file mode 100644 index 1159e091ad0..00000000000 --- a/arch/x86/include/asm/system_64.h +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | #ifndef _ASM_X86_SYSTEM_64_H | ||
2 | #define _ASM_X86_SYSTEM_64_H | ||
3 | |||
4 | #include <asm/segment.h> | ||
5 | #include <asm/cmpxchg.h> | ||
6 | |||
7 | |||
8 | static inline unsigned long read_cr8(void) | ||
9 | { | ||
10 | unsigned long cr8; | ||
11 | asm volatile("movq %%cr8,%0" : "=r" (cr8)); | ||
12 | return cr8; | ||
13 | } | ||
14 | |||
15 | static inline void write_cr8(unsigned long val) | ||
16 | { | ||
17 | asm volatile("movq %0,%%cr8" :: "r" (val) : "memory"); | ||
18 | } | ||
19 | |||
20 | #include <linux/irqflags.h> | ||
21 | |||
22 | #endif /* _ASM_X86_SYSTEM_64_H */ | ||
diff --git a/arch/x86/include/asm/xen/page.h b/arch/x86/include/asm/xen/page.h index 8760cc60a21..f25bdf238a3 100644 --- a/arch/x86/include/asm/xen/page.h +++ b/arch/x86/include/asm/xen/page.h | |||
@@ -42,6 +42,11 @@ extern unsigned int machine_to_phys_order; | |||
42 | extern unsigned long get_phys_to_machine(unsigned long pfn); | 42 | extern unsigned long get_phys_to_machine(unsigned long pfn); |
43 | extern bool set_phys_to_machine(unsigned long pfn, unsigned long mfn); | 43 | extern bool set_phys_to_machine(unsigned long pfn, unsigned long mfn); |
44 | 44 | ||
45 | extern int m2p_add_override(unsigned long mfn, struct page *page); | ||
46 | extern int m2p_remove_override(struct page *page); | ||
47 | extern struct page *m2p_find_override(unsigned long mfn); | ||
48 | extern unsigned long m2p_find_override_pfn(unsigned long mfn, unsigned long pfn); | ||
49 | |||
45 | static inline unsigned long pfn_to_mfn(unsigned long pfn) | 50 | static inline unsigned long pfn_to_mfn(unsigned long pfn) |
46 | { | 51 | { |
47 | unsigned long mfn; | 52 | unsigned long mfn; |
@@ -72,9 +77,6 @@ static inline unsigned long mfn_to_pfn(unsigned long mfn) | |||
72 | if (xen_feature(XENFEAT_auto_translated_physmap)) | 77 | if (xen_feature(XENFEAT_auto_translated_physmap)) |
73 | return mfn; | 78 | return mfn; |
74 | 79 | ||
75 | if (unlikely((mfn >> machine_to_phys_order) != 0)) | ||
76 | return ~0; | ||
77 | |||
78 | pfn = 0; | 80 | pfn = 0; |
79 | /* | 81 | /* |
80 | * The array access can fail (e.g., device space beyond end of RAM). | 82 | * The array access can fail (e.g., device space beyond end of RAM). |
@@ -83,6 +85,14 @@ static inline unsigned long mfn_to_pfn(unsigned long mfn) | |||
83 | */ | 85 | */ |
84 | __get_user(pfn, &machine_to_phys_mapping[mfn]); | 86 | __get_user(pfn, &machine_to_phys_mapping[mfn]); |
85 | 87 | ||
88 | /* | ||
89 | * If this appears to be a foreign mfn (because the pfn | ||
90 | * doesn't map back to the mfn), then check the local override | ||
91 | * table to see if there's a better pfn to use. | ||
92 | */ | ||
93 | if (get_phys_to_machine(pfn) != mfn) | ||
94 | pfn = m2p_find_override_pfn(mfn, pfn); | ||
95 | |||
86 | return pfn; | 96 | return pfn; |
87 | } | 97 | } |
88 | 98 | ||
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index ec881c6bfee..b3a71137983 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
@@ -509,6 +509,7 @@ int acpi_gsi_to_irq(u32 gsi, unsigned int *irq) | |||
509 | 509 | ||
510 | return 0; | 510 | return 0; |
511 | } | 511 | } |
512 | EXPORT_SYMBOL_GPL(acpi_gsi_to_irq); | ||
512 | 513 | ||
513 | int acpi_isa_irq_to_gsi(unsigned isa_irq, u32 *gsi) | 514 | int acpi_isa_irq_to_gsi(unsigned isa_irq, u32 *gsi) |
514 | { | 515 | { |
diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c index 69fd72aa559..68d1537b8c8 100644 --- a/arch/x86/kernel/acpi/sleep.c +++ b/arch/x86/kernel/acpi/sleep.c | |||
@@ -12,10 +12,8 @@ | |||
12 | #include <linux/cpumask.h> | 12 | #include <linux/cpumask.h> |
13 | #include <asm/segment.h> | 13 | #include <asm/segment.h> |
14 | #include <asm/desc.h> | 14 | #include <asm/desc.h> |
15 | |||
16 | #ifdef CONFIG_X86_32 | ||
17 | #include <asm/pgtable.h> | 15 | #include <asm/pgtable.h> |
18 | #endif | 16 | #include <asm/cacheflush.h> |
19 | 17 | ||
20 | #include "realmode/wakeup.h" | 18 | #include "realmode/wakeup.h" |
21 | #include "sleep.h" | 19 | #include "sleep.h" |
@@ -100,7 +98,7 @@ int acpi_save_state_mem(void) | |||
100 | #else /* CONFIG_64BIT */ | 98 | #else /* CONFIG_64BIT */ |
101 | header->trampoline_segment = setup_trampoline() >> 4; | 99 | header->trampoline_segment = setup_trampoline() >> 4; |
102 | #ifdef CONFIG_SMP | 100 | #ifdef CONFIG_SMP |
103 | stack_start.sp = temp_stack + sizeof(temp_stack); | 101 | stack_start = (unsigned long)temp_stack + sizeof(temp_stack); |
104 | early_gdt_descr.address = | 102 | early_gdt_descr.address = |
105 | (unsigned long)get_cpu_gdt_table(smp_processor_id()); | 103 | (unsigned long)get_cpu_gdt_table(smp_processor_id()); |
106 | initial_gs = per_cpu_offset(smp_processor_id()); | 104 | initial_gs = per_cpu_offset(smp_processor_id()); |
@@ -149,6 +147,15 @@ void __init acpi_reserve_wakeup_memory(void) | |||
149 | memblock_x86_reserve_range(mem, mem + WAKEUP_SIZE, "ACPI WAKEUP"); | 147 | memblock_x86_reserve_range(mem, mem + WAKEUP_SIZE, "ACPI WAKEUP"); |
150 | } | 148 | } |
151 | 149 | ||
150 | int __init acpi_configure_wakeup_memory(void) | ||
151 | { | ||
152 | if (acpi_realmode) | ||
153 | set_memory_x(acpi_realmode, WAKEUP_SIZE >> PAGE_SHIFT); | ||
154 | |||
155 | return 0; | ||
156 | } | ||
157 | arch_initcall(acpi_configure_wakeup_memory); | ||
158 | |||
152 | 159 | ||
153 | static int __init acpi_sleep_setup(char *str) | 160 | static int __init acpi_sleep_setup(char *str) |
154 | { | 161 | { |
diff --git a/arch/x86/kernel/apb_timer.c b/arch/x86/kernel/apb_timer.c index 7c9ab59653e..51ef31a89be 100644 --- a/arch/x86/kernel/apb_timer.c +++ b/arch/x86/kernel/apb_timer.c | |||
@@ -313,14 +313,16 @@ static void apbt_setup_irq(struct apbt_dev *adev) | |||
313 | if (adev->irq == 0) | 313 | if (adev->irq == 0) |
314 | return; | 314 | return; |
315 | 315 | ||
316 | irq_modify_status(adev->irq, 0, IRQ_MOVE_PCNTXT); | ||
317 | irq_set_affinity(adev->irq, cpumask_of(adev->cpu)); | ||
318 | /* APB timer irqs are set up as mp_irqs, timer is edge type */ | ||
319 | __set_irq_handler(adev->irq, handle_edge_irq, 0, "edge"); | ||
320 | |||
316 | if (system_state == SYSTEM_BOOTING) { | 321 | if (system_state == SYSTEM_BOOTING) { |
317 | irq_modify_status(adev->irq, 0, IRQ_MOVE_PCNTXT); | ||
318 | irq_set_affinity(adev->irq, cpumask_of(adev->cpu)); | ||
319 | /* APB timer irqs are set up as mp_irqs, timer is edge type */ | ||
320 | __set_irq_handler(adev->irq, handle_edge_irq, 0, "edge"); | ||
321 | if (request_irq(adev->irq, apbt_interrupt_handler, | 322 | if (request_irq(adev->irq, apbt_interrupt_handler, |
322 | IRQF_TIMER | IRQF_DISABLED | IRQF_NOBALANCING, | 323 | IRQF_TIMER | IRQF_DISABLED | |
323 | adev->name, adev)) { | 324 | IRQF_NOBALANCING, |
325 | adev->name, adev)) { | ||
324 | printk(KERN_ERR "Failed request IRQ for APBT%d\n", | 326 | printk(KERN_ERR "Failed request IRQ for APBT%d\n", |
325 | adev->num); | 327 | adev->num); |
326 | } | 328 | } |
diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c index 7283e98deaa..ec2c19a7b8e 100644 --- a/arch/x86/kernel/cpu/intel_cacheinfo.c +++ b/arch/x86/kernel/cpu/intel_cacheinfo.c | |||
@@ -45,6 +45,7 @@ static const struct _cache_table __cpuinitconst cache_table[] = | |||
45 | { 0x0a, LVL_1_DATA, 8 }, /* 2 way set assoc, 32 byte line size */ | 45 | { 0x0a, LVL_1_DATA, 8 }, /* 2 way set assoc, 32 byte line size */ |
46 | { 0x0c, LVL_1_DATA, 16 }, /* 4-way set assoc, 32 byte line size */ | 46 | { 0x0c, LVL_1_DATA, 16 }, /* 4-way set assoc, 32 byte line size */ |
47 | { 0x0d, LVL_1_DATA, 16 }, /* 4-way set assoc, 64 byte line size */ | 47 | { 0x0d, LVL_1_DATA, 16 }, /* 4-way set assoc, 64 byte line size */ |
48 | { 0x0e, LVL_1_DATA, 24 }, /* 6-way set assoc, 64 byte line size */ | ||
48 | { 0x21, LVL_2, 256 }, /* 8-way set assoc, 64 byte line size */ | 49 | { 0x21, LVL_2, 256 }, /* 8-way set assoc, 64 byte line size */ |
49 | { 0x22, LVL_3, 512 }, /* 4-way set assoc, sectored cache, 64 byte line size */ | 50 | { 0x22, LVL_3, 512 }, /* 4-way set assoc, sectored cache, 64 byte line size */ |
50 | { 0x23, LVL_3, MB(1) }, /* 8-way set assoc, sectored cache, 64 byte line size */ | 51 | { 0x23, LVL_3, MB(1) }, /* 8-way set assoc, sectored cache, 64 byte line size */ |
@@ -66,6 +67,7 @@ static const struct _cache_table __cpuinitconst cache_table[] = | |||
66 | { 0x45, LVL_2, MB(2) }, /* 4-way set assoc, 32 byte line size */ | 67 | { 0x45, LVL_2, MB(2) }, /* 4-way set assoc, 32 byte line size */ |
67 | { 0x46, LVL_3, MB(4) }, /* 4-way set assoc, 64 byte line size */ | 68 | { 0x46, LVL_3, MB(4) }, /* 4-way set assoc, 64 byte line size */ |
68 | { 0x47, LVL_3, MB(8) }, /* 8-way set assoc, 64 byte line size */ | 69 | { 0x47, LVL_3, MB(8) }, /* 8-way set assoc, 64 byte line size */ |
70 | { 0x48, LVL_2, MB(3) }, /* 12-way set assoc, 64 byte line size */ | ||
69 | { 0x49, LVL_3, MB(4) }, /* 16-way set assoc, 64 byte line size */ | 71 | { 0x49, LVL_3, MB(4) }, /* 16-way set assoc, 64 byte line size */ |
70 | { 0x4a, LVL_3, MB(6) }, /* 12-way set assoc, 64 byte line size */ | 72 | { 0x4a, LVL_3, MB(6) }, /* 12-way set assoc, 64 byte line size */ |
71 | { 0x4b, LVL_3, MB(8) }, /* 16-way set assoc, 64 byte line size */ | 73 | { 0x4b, LVL_3, MB(8) }, /* 16-way set assoc, 64 byte line size */ |
@@ -87,6 +89,7 @@ static const struct _cache_table __cpuinitconst cache_table[] = | |||
87 | { 0x7c, LVL_2, MB(1) }, /* 8-way set assoc, sectored cache, 64 byte line size */ | 89 | { 0x7c, LVL_2, MB(1) }, /* 8-way set assoc, sectored cache, 64 byte line size */ |
88 | { 0x7d, LVL_2, MB(2) }, /* 8-way set assoc, 64 byte line size */ | 90 | { 0x7d, LVL_2, MB(2) }, /* 8-way set assoc, 64 byte line size */ |
89 | { 0x7f, LVL_2, 512 }, /* 2-way set assoc, 64 byte line size */ | 91 | { 0x7f, LVL_2, 512 }, /* 2-way set assoc, 64 byte line size */ |
92 | { 0x80, LVL_2, 512 }, /* 8-way set assoc, 64 byte line size */ | ||
90 | { 0x82, LVL_2, 256 }, /* 8-way set assoc, 32 byte line size */ | 93 | { 0x82, LVL_2, 256 }, /* 8-way set assoc, 32 byte line size */ |
91 | { 0x83, LVL_2, 512 }, /* 8-way set assoc, 32 byte line size */ | 94 | { 0x83, LVL_2, 512 }, /* 8-way set assoc, 32 byte line size */ |
92 | { 0x84, LVL_2, MB(1) }, /* 8-way set assoc, 32 byte line size */ | 95 | { 0x84, LVL_2, MB(1) }, /* 8-way set assoc, 32 byte line size */ |
diff --git a/arch/x86/kernel/cpu/mcheck/therm_throt.c b/arch/x86/kernel/cpu/mcheck/therm_throt.c index e12246ff5aa..6f8c5e9da97 100644 --- a/arch/x86/kernel/cpu/mcheck/therm_throt.c +++ b/arch/x86/kernel/cpu/mcheck/therm_throt.c | |||
@@ -59,6 +59,7 @@ struct thermal_state { | |||
59 | 59 | ||
60 | /* Callback to handle core threshold interrupts */ | 60 | /* Callback to handle core threshold interrupts */ |
61 | int (*platform_thermal_notify)(__u64 msr_val); | 61 | int (*platform_thermal_notify)(__u64 msr_val); |
62 | EXPORT_SYMBOL(platform_thermal_notify); | ||
62 | 63 | ||
63 | static DEFINE_PER_CPU(struct thermal_state, thermal_state); | 64 | static DEFINE_PER_CPU(struct thermal_state, thermal_state); |
64 | 65 | ||
diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c index 01c0f3ee6cc..bebabec5b44 100644 --- a/arch/x86/kernel/cpu/mtrr/main.c +++ b/arch/x86/kernel/cpu/mtrr/main.c | |||
@@ -793,13 +793,21 @@ void set_mtrr_aps_delayed_init(void) | |||
793 | } | 793 | } |
794 | 794 | ||
795 | /* | 795 | /* |
796 | * MTRR initialization for all AP's | 796 | * Delayed MTRR initialization for all AP's |
797 | */ | 797 | */ |
798 | void mtrr_aps_init(void) | 798 | void mtrr_aps_init(void) |
799 | { | 799 | { |
800 | if (!use_intel()) | 800 | if (!use_intel()) |
801 | return; | 801 | return; |
802 | 802 | ||
803 | /* | ||
804 | * Check if someone has requested the delay of AP MTRR initialization, | ||
805 | * by doing set_mtrr_aps_delayed_init(), prior to this point. If not, | ||
806 | * then we are done. | ||
807 | */ | ||
808 | if (!mtrr_aps_delayed_init) | ||
809 | return; | ||
810 | |||
803 | set_mtrr(~0U, 0, 0, 0); | 811 | set_mtrr(~0U, 0, 0, 0); |
804 | mtrr_aps_delayed_init = false; | 812 | mtrr_aps_delayed_init = false; |
805 | } | 813 | } |
diff --git a/arch/x86/kernel/cpu/perf_event_p4.c b/arch/x86/kernel/cpu/perf_event_p4.c index e56b9bfbabd..f7a0993c1e7 100644 --- a/arch/x86/kernel/cpu/perf_event_p4.c +++ b/arch/x86/kernel/cpu/perf_event_p4.c | |||
@@ -682,7 +682,7 @@ static int p4_validate_raw_event(struct perf_event *event) | |||
682 | * if an event is shared accross the logical threads | 682 | * if an event is shared accross the logical threads |
683 | * the user needs special permissions to be able to use it | 683 | * the user needs special permissions to be able to use it |
684 | */ | 684 | */ |
685 | if (p4_event_bind_map[v].shared) { | 685 | if (p4_ht_active() && p4_event_bind_map[v].shared) { |
686 | if (perf_paranoid_cpu() && !capable(CAP_SYS_ADMIN)) | 686 | if (perf_paranoid_cpu() && !capable(CAP_SYS_ADMIN)) |
687 | return -EACCES; | 687 | return -EACCES; |
688 | } | 688 | } |
@@ -727,7 +727,8 @@ static int p4_hw_config(struct perf_event *event) | |||
727 | event->hw.config = p4_set_ht_bit(event->hw.config); | 727 | event->hw.config = p4_set_ht_bit(event->hw.config); |
728 | 728 | ||
729 | if (event->attr.type == PERF_TYPE_RAW) { | 729 | if (event->attr.type == PERF_TYPE_RAW) { |
730 | 730 | struct p4_event_bind *bind; | |
731 | unsigned int esel; | ||
731 | /* | 732 | /* |
732 | * Clear bits we reserve to be managed by kernel itself | 733 | * Clear bits we reserve to be managed by kernel itself |
733 | * and never allowed from a user space | 734 | * and never allowed from a user space |
@@ -743,6 +744,13 @@ static int p4_hw_config(struct perf_event *event) | |||
743 | * bits since we keep additional info here (for cache events and etc) | 744 | * bits since we keep additional info here (for cache events and etc) |
744 | */ | 745 | */ |
745 | event->hw.config |= event->attr.config; | 746 | event->hw.config |= event->attr.config; |
747 | bind = p4_config_get_bind(event->attr.config); | ||
748 | if (!bind) { | ||
749 | rc = -EINVAL; | ||
750 | goto out; | ||
751 | } | ||
752 | esel = P4_OPCODE_ESEL(bind->opcode); | ||
753 | event->hw.config |= p4_config_pack_cccr(P4_CCCR_ESEL(esel)); | ||
746 | } | 754 | } |
747 | 755 | ||
748 | rc = x86_setup_perfctr(event); | 756 | rc = x86_setup_perfctr(event); |
diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c index d6fb146c0d8..df20723a6a1 100644 --- a/arch/x86/kernel/dumpstack.c +++ b/arch/x86/kernel/dumpstack.c | |||
@@ -234,6 +234,7 @@ unsigned __kprobes long oops_begin(void) | |||
234 | bust_spinlocks(1); | 234 | bust_spinlocks(1); |
235 | return flags; | 235 | return flags; |
236 | } | 236 | } |
237 | EXPORT_SYMBOL_GPL(oops_begin); | ||
237 | 238 | ||
238 | void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, int signr) | 239 | void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, int signr) |
239 | { | 240 | { |
diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c index 64101335de1..a6b6fcf7f0a 100644 --- a/arch/x86/kernel/dumpstack_64.c +++ b/arch/x86/kernel/dumpstack_64.c | |||
@@ -149,13 +149,13 @@ void dump_trace(struct task_struct *task, | |||
149 | unsigned used = 0; | 149 | unsigned used = 0; |
150 | struct thread_info *tinfo; | 150 | struct thread_info *tinfo; |
151 | int graph = 0; | 151 | int graph = 0; |
152 | unsigned long dummy; | ||
152 | unsigned long bp; | 153 | unsigned long bp; |
153 | 154 | ||
154 | if (!task) | 155 | if (!task) |
155 | task = current; | 156 | task = current; |
156 | 157 | ||
157 | if (!stack) { | 158 | if (!stack) { |
158 | unsigned long dummy; | ||
159 | stack = &dummy; | 159 | stack = &dummy; |
160 | if (task && task != current) | 160 | if (task && task != current) |
161 | stack = (unsigned long *)task->thread.sp; | 161 | stack = (unsigned long *)task->thread.sp; |
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index 0c2b7ef7a34..294f26da0c0 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/bootmem.h> | 14 | #include <linux/bootmem.h> |
15 | #include <linux/pfn.h> | 15 | #include <linux/pfn.h> |
16 | #include <linux/suspend.h> | 16 | #include <linux/suspend.h> |
17 | #include <linux/acpi.h> | ||
17 | #include <linux/firmware-map.h> | 18 | #include <linux/firmware-map.h> |
18 | #include <linux/memblock.h> | 19 | #include <linux/memblock.h> |
19 | 20 | ||
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S index fc293dc8dc3..767d6c43de3 100644 --- a/arch/x86/kernel/head_32.S +++ b/arch/x86/kernel/head_32.S | |||
@@ -85,6 +85,8 @@ RESERVE_BRK(pagetables, INIT_MAP_SIZE) | |||
85 | */ | 85 | */ |
86 | __HEAD | 86 | __HEAD |
87 | ENTRY(startup_32) | 87 | ENTRY(startup_32) |
88 | movl pa(stack_start),%ecx | ||
89 | |||
88 | /* test KEEP_SEGMENTS flag to see if the bootloader is asking | 90 | /* test KEEP_SEGMENTS flag to see if the bootloader is asking |
89 | us to not reload segments */ | 91 | us to not reload segments */ |
90 | testb $(1<<6), BP_loadflags(%esi) | 92 | testb $(1<<6), BP_loadflags(%esi) |
@@ -99,7 +101,9 @@ ENTRY(startup_32) | |||
99 | movl %eax,%es | 101 | movl %eax,%es |
100 | movl %eax,%fs | 102 | movl %eax,%fs |
101 | movl %eax,%gs | 103 | movl %eax,%gs |
104 | movl %eax,%ss | ||
102 | 2: | 105 | 2: |
106 | leal -__PAGE_OFFSET(%ecx),%esp | ||
103 | 107 | ||
104 | /* | 108 | /* |
105 | * Clear BSS first so that there are no surprises... | 109 | * Clear BSS first so that there are no surprises... |
@@ -145,8 +149,6 @@ ENTRY(startup_32) | |||
145 | * _brk_end is set up to point to the first "safe" location. | 149 | * _brk_end is set up to point to the first "safe" location. |
146 | * Mappings are created both at virtual address 0 (identity mapping) | 150 | * Mappings are created both at virtual address 0 (identity mapping) |
147 | * and PAGE_OFFSET for up to _end. | 151 | * and PAGE_OFFSET for up to _end. |
148 | * | ||
149 | * Note that the stack is not yet set up! | ||
150 | */ | 152 | */ |
151 | #ifdef CONFIG_X86_PAE | 153 | #ifdef CONFIG_X86_PAE |
152 | 154 | ||
@@ -282,6 +284,9 @@ ENTRY(startup_32_smp) | |||
282 | movl %eax,%es | 284 | movl %eax,%es |
283 | movl %eax,%fs | 285 | movl %eax,%fs |
284 | movl %eax,%gs | 286 | movl %eax,%gs |
287 | movl pa(stack_start),%ecx | ||
288 | movl %eax,%ss | ||
289 | leal -__PAGE_OFFSET(%ecx),%esp | ||
285 | #endif /* CONFIG_SMP */ | 290 | #endif /* CONFIG_SMP */ |
286 | default_entry: | 291 | default_entry: |
287 | 292 | ||
@@ -347,8 +352,8 @@ default_entry: | |||
347 | movl %eax,%cr0 /* ..and set paging (PG) bit */ | 352 | movl %eax,%cr0 /* ..and set paging (PG) bit */ |
348 | ljmp $__BOOT_CS,$1f /* Clear prefetch and normalize %eip */ | 353 | ljmp $__BOOT_CS,$1f /* Clear prefetch and normalize %eip */ |
349 | 1: | 354 | 1: |
350 | /* Set up the stack pointer */ | 355 | /* Shift the stack pointer to a virtual address */ |
351 | lss stack_start,%esp | 356 | addl $__PAGE_OFFSET, %esp |
352 | 357 | ||
353 | /* | 358 | /* |
354 | * Initialize eflags. Some BIOS's leave bits like NT set. This would | 359 | * Initialize eflags. Some BIOS's leave bits like NT set. This would |
@@ -360,9 +365,7 @@ default_entry: | |||
360 | 365 | ||
361 | #ifdef CONFIG_SMP | 366 | #ifdef CONFIG_SMP |
362 | cmpb $0, ready | 367 | cmpb $0, ready |
363 | jz 1f /* Initial CPU cleans BSS */ | 368 | jnz checkCPUtype |
364 | jmp checkCPUtype | ||
365 | 1: | ||
366 | #endif /* CONFIG_SMP */ | 369 | #endif /* CONFIG_SMP */ |
367 | 370 | ||
368 | /* | 371 | /* |
@@ -470,14 +473,7 @@ is386: movl $2,%ecx # set MP | |||
470 | 473 | ||
471 | cld # gcc2 wants the direction flag cleared at all times | 474 | cld # gcc2 wants the direction flag cleared at all times |
472 | pushl $0 # fake return address for unwinder | 475 | pushl $0 # fake return address for unwinder |
473 | #ifdef CONFIG_SMP | ||
474 | movb ready, %cl | ||
475 | movb $1, ready | 476 | movb $1, ready |
476 | cmpb $0,%cl # the first CPU calls start_kernel | ||
477 | je 1f | ||
478 | movl (stack_start), %esp | ||
479 | 1: | ||
480 | #endif /* CONFIG_SMP */ | ||
481 | jmp *(initial_code) | 477 | jmp *(initial_code) |
482 | 478 | ||
483 | /* | 479 | /* |
@@ -670,15 +666,15 @@ ENTRY(initial_page_table) | |||
670 | #endif | 666 | #endif |
671 | 667 | ||
672 | .data | 668 | .data |
669 | .balign 4 | ||
673 | ENTRY(stack_start) | 670 | ENTRY(stack_start) |
674 | .long init_thread_union+THREAD_SIZE | 671 | .long init_thread_union+THREAD_SIZE |
675 | .long __BOOT_DS | ||
676 | |||
677 | ready: .byte 0 | ||
678 | 672 | ||
679 | early_recursion_flag: | 673 | early_recursion_flag: |
680 | .long 0 | 674 | .long 0 |
681 | 675 | ||
676 | ready: .byte 0 | ||
677 | |||
682 | int_msg: | 678 | int_msg: |
683 | .asciz "Unknown interrupt or fault at: %p %p %p\n" | 679 | .asciz "Unknown interrupt or fault at: %p %p %p\n" |
684 | 680 | ||
diff --git a/arch/x86/kernel/irq_32.c b/arch/x86/kernel/irq_32.c index 48ff6dcffa0..9974d21048f 100644 --- a/arch/x86/kernel/irq_32.c +++ b/arch/x86/kernel/irq_32.c | |||
@@ -129,8 +129,7 @@ void __cpuinit irq_ctx_init(int cpu) | |||
129 | irqctx = page_address(alloc_pages_node(cpu_to_node(cpu), | 129 | irqctx = page_address(alloc_pages_node(cpu_to_node(cpu), |
130 | THREAD_FLAGS, | 130 | THREAD_FLAGS, |
131 | THREAD_ORDER)); | 131 | THREAD_ORDER)); |
132 | irqctx->tinfo.task = NULL; | 132 | memset(&irqctx->tinfo, 0, sizeof(struct thread_info)); |
133 | irqctx->tinfo.exec_domain = NULL; | ||
134 | irqctx->tinfo.cpu = cpu; | 133 | irqctx->tinfo.cpu = cpu; |
135 | irqctx->tinfo.preempt_count = HARDIRQ_OFFSET; | 134 | irqctx->tinfo.preempt_count = HARDIRQ_OFFSET; |
136 | irqctx->tinfo.addr_limit = MAKE_MM_SEG(0); | 135 | irqctx->tinfo.addr_limit = MAKE_MM_SEG(0); |
@@ -140,10 +139,8 @@ void __cpuinit irq_ctx_init(int cpu) | |||
140 | irqctx = page_address(alloc_pages_node(cpu_to_node(cpu), | 139 | irqctx = page_address(alloc_pages_node(cpu_to_node(cpu), |
141 | THREAD_FLAGS, | 140 | THREAD_FLAGS, |
142 | THREAD_ORDER)); | 141 | THREAD_ORDER)); |
143 | irqctx->tinfo.task = NULL; | 142 | memset(&irqctx->tinfo, 0, sizeof(struct thread_info)); |
144 | irqctx->tinfo.exec_domain = NULL; | ||
145 | irqctx->tinfo.cpu = cpu; | 143 | irqctx->tinfo.cpu = cpu; |
146 | irqctx->tinfo.preempt_count = 0; | ||
147 | irqctx->tinfo.addr_limit = MAKE_MM_SEG(0); | 144 | irqctx->tinfo.addr_limit = MAKE_MM_SEG(0); |
148 | 145 | ||
149 | per_cpu(softirq_ctx, cpu) = irqctx; | 146 | per_cpu(softirq_ctx, cpu) = irqctx; |
diff --git a/arch/x86/kernel/module.c b/arch/x86/kernel/module.c index 8f295609173..ab23f1ad4bf 100644 --- a/arch/x86/kernel/module.c +++ b/arch/x86/kernel/module.c | |||
@@ -37,20 +37,11 @@ | |||
37 | 37 | ||
38 | void *module_alloc(unsigned long size) | 38 | void *module_alloc(unsigned long size) |
39 | { | 39 | { |
40 | struct vm_struct *area; | 40 | if (PAGE_ALIGN(size) > MODULES_LEN) |
41 | |||
42 | if (!size) | ||
43 | return NULL; | ||
44 | size = PAGE_ALIGN(size); | ||
45 | if (size > MODULES_LEN) | ||
46 | return NULL; | 41 | return NULL; |
47 | 42 | return __vmalloc_node_range(size, 1, MODULES_VADDR, MODULES_END, | |
48 | area = __get_vm_area(size, VM_ALLOC, MODULES_VADDR, MODULES_END); | 43 | GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL_EXEC, |
49 | if (!area) | 44 | -1, __builtin_return_address(0)); |
50 | return NULL; | ||
51 | |||
52 | return __vmalloc_area(area, GFP_KERNEL | __GFP_HIGHMEM, | ||
53 | PAGE_KERNEL_EXEC); | ||
54 | } | 45 | } |
55 | 46 | ||
56 | /* Free memory returned from module_alloc */ | 47 | /* Free memory returned from module_alloc */ |
diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c index c5b250011fd..869e1aeeb71 100644 --- a/arch/x86/kernel/paravirt.c +++ b/arch/x86/kernel/paravirt.c | |||
@@ -421,8 +421,11 @@ struct pv_mmu_ops pv_mmu_ops = { | |||
421 | .set_pte = native_set_pte, | 421 | .set_pte = native_set_pte, |
422 | .set_pte_at = native_set_pte_at, | 422 | .set_pte_at = native_set_pte_at, |
423 | .set_pmd = native_set_pmd, | 423 | .set_pmd = native_set_pmd, |
424 | .set_pmd_at = native_set_pmd_at, | ||
424 | .pte_update = paravirt_nop, | 425 | .pte_update = paravirt_nop, |
425 | .pte_update_defer = paravirt_nop, | 426 | .pte_update_defer = paravirt_nop, |
427 | .pmd_update = paravirt_nop, | ||
428 | .pmd_update_defer = paravirt_nop, | ||
426 | 429 | ||
427 | .ptep_modify_prot_start = __ptep_modify_prot_start, | 430 | .ptep_modify_prot_start = __ptep_modify_prot_start, |
428 | .ptep_modify_prot_commit = __ptep_modify_prot_commit, | 431 | .ptep_modify_prot_commit = __ptep_modify_prot_commit, |
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index 09c08a1c706..e764fc05d70 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/utsname.h> | 14 | #include <linux/utsname.h> |
15 | #include <trace/events/power.h> | 15 | #include <trace/events/power.h> |
16 | #include <linux/hw_breakpoint.h> | 16 | #include <linux/hw_breakpoint.h> |
17 | #include <asm/cpu.h> | ||
17 | #include <asm/system.h> | 18 | #include <asm/system.h> |
18 | #include <asm/apic.h> | 19 | #include <asm/apic.h> |
19 | #include <asm/syscalls.h> | 20 | #include <asm/syscalls.h> |
@@ -22,11 +23,6 @@ | |||
22 | #include <asm/i387.h> | 23 | #include <asm/i387.h> |
23 | #include <asm/debugreg.h> | 24 | #include <asm/debugreg.h> |
24 | 25 | ||
25 | unsigned long idle_halt; | ||
26 | EXPORT_SYMBOL(idle_halt); | ||
27 | unsigned long idle_nomwait; | ||
28 | EXPORT_SYMBOL(idle_nomwait); | ||
29 | |||
30 | struct kmem_cache *task_xstate_cachep; | 26 | struct kmem_cache *task_xstate_cachep; |
31 | EXPORT_SYMBOL_GPL(task_xstate_cachep); | 27 | EXPORT_SYMBOL_GPL(task_xstate_cachep); |
32 | 28 | ||
@@ -327,7 +323,7 @@ long sys_execve(const char __user *name, | |||
327 | /* | 323 | /* |
328 | * Idle related variables and functions | 324 | * Idle related variables and functions |
329 | */ | 325 | */ |
330 | unsigned long boot_option_idle_override = 0; | 326 | unsigned long boot_option_idle_override = IDLE_NO_OVERRIDE; |
331 | EXPORT_SYMBOL(boot_option_idle_override); | 327 | EXPORT_SYMBOL(boot_option_idle_override); |
332 | 328 | ||
333 | /* | 329 | /* |
@@ -386,6 +382,8 @@ void default_idle(void) | |||
386 | else | 382 | else |
387 | local_irq_enable(); | 383 | local_irq_enable(); |
388 | current_thread_info()->status |= TS_POLLING; | 384 | current_thread_info()->status |= TS_POLLING; |
385 | trace_power_end(smp_processor_id()); | ||
386 | trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id()); | ||
389 | } else { | 387 | } else { |
390 | local_irq_enable(); | 388 | local_irq_enable(); |
391 | /* loop is done by the caller */ | 389 | /* loop is done by the caller */ |
@@ -443,8 +441,6 @@ EXPORT_SYMBOL_GPL(cpu_idle_wait); | |||
443 | */ | 441 | */ |
444 | void mwait_idle_with_hints(unsigned long ax, unsigned long cx) | 442 | void mwait_idle_with_hints(unsigned long ax, unsigned long cx) |
445 | { | 443 | { |
446 | trace_power_start(POWER_CSTATE, (ax>>4)+1, smp_processor_id()); | ||
447 | trace_cpu_idle((ax>>4)+1, smp_processor_id()); | ||
448 | if (!need_resched()) { | 444 | if (!need_resched()) { |
449 | if (cpu_has(__this_cpu_ptr(&cpu_info), X86_FEATURE_CLFLUSH_MONITOR)) | 445 | if (cpu_has(__this_cpu_ptr(&cpu_info), X86_FEATURE_CLFLUSH_MONITOR)) |
450 | clflush((void *)¤t_thread_info()->flags); | 446 | clflush((void *)¤t_thread_info()->flags); |
@@ -471,6 +467,8 @@ static void mwait_idle(void) | |||
471 | __sti_mwait(0, 0); | 467 | __sti_mwait(0, 0); |
472 | else | 468 | else |
473 | local_irq_enable(); | 469 | local_irq_enable(); |
470 | trace_power_end(smp_processor_id()); | ||
471 | trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id()); | ||
474 | } else | 472 | } else |
475 | local_irq_enable(); | 473 | local_irq_enable(); |
476 | } | 474 | } |
@@ -503,17 +501,16 @@ static void poll_idle(void) | |||
503 | * | 501 | * |
504 | * idle=mwait overrides this decision and forces the usage of mwait. | 502 | * idle=mwait overrides this decision and forces the usage of mwait. |
505 | */ | 503 | */ |
506 | static int __cpuinitdata force_mwait; | ||
507 | 504 | ||
508 | #define MWAIT_INFO 0x05 | 505 | #define MWAIT_INFO 0x05 |
509 | #define MWAIT_ECX_EXTENDED_INFO 0x01 | 506 | #define MWAIT_ECX_EXTENDED_INFO 0x01 |
510 | #define MWAIT_EDX_C1 0xf0 | 507 | #define MWAIT_EDX_C1 0xf0 |
511 | 508 | ||
512 | static int __cpuinit mwait_usable(const struct cpuinfo_x86 *c) | 509 | int __cpuinit mwait_usable(const struct cpuinfo_x86 *c) |
513 | { | 510 | { |
514 | u32 eax, ebx, ecx, edx; | 511 | u32 eax, ebx, ecx, edx; |
515 | 512 | ||
516 | if (force_mwait) | 513 | if (boot_option_idle_override == IDLE_FORCE_MWAIT) |
517 | return 1; | 514 | return 1; |
518 | 515 | ||
519 | if (c->cpuid_level < MWAIT_INFO) | 516 | if (c->cpuid_level < MWAIT_INFO) |
@@ -633,9 +630,10 @@ static int __init idle_setup(char *str) | |||
633 | if (!strcmp(str, "poll")) { | 630 | if (!strcmp(str, "poll")) { |
634 | printk("using polling idle threads.\n"); | 631 | printk("using polling idle threads.\n"); |
635 | pm_idle = poll_idle; | 632 | pm_idle = poll_idle; |
636 | } else if (!strcmp(str, "mwait")) | 633 | boot_option_idle_override = IDLE_POLL; |
637 | force_mwait = 1; | 634 | } else if (!strcmp(str, "mwait")) { |
638 | else if (!strcmp(str, "halt")) { | 635 | boot_option_idle_override = IDLE_FORCE_MWAIT; |
636 | } else if (!strcmp(str, "halt")) { | ||
639 | /* | 637 | /* |
640 | * When the boot option of idle=halt is added, halt is | 638 | * When the boot option of idle=halt is added, halt is |
641 | * forced to be used for CPU idle. In such case CPU C2/C3 | 639 | * forced to be used for CPU idle. In such case CPU C2/C3 |
@@ -644,8 +642,7 @@ static int __init idle_setup(char *str) | |||
644 | * the boot_option_idle_override. | 642 | * the boot_option_idle_override. |
645 | */ | 643 | */ |
646 | pm_idle = default_idle; | 644 | pm_idle = default_idle; |
647 | idle_halt = 1; | 645 | boot_option_idle_override = IDLE_HALT; |
648 | return 0; | ||
649 | } else if (!strcmp(str, "nomwait")) { | 646 | } else if (!strcmp(str, "nomwait")) { |
650 | /* | 647 | /* |
651 | * If the boot option of "idle=nomwait" is added, | 648 | * If the boot option of "idle=nomwait" is added, |
@@ -653,12 +650,10 @@ static int __init idle_setup(char *str) | |||
653 | * states. In such case it won't touch the variable | 650 | * states. In such case it won't touch the variable |
654 | * of boot_option_idle_override. | 651 | * of boot_option_idle_override. |
655 | */ | 652 | */ |
656 | idle_nomwait = 1; | 653 | boot_option_idle_override = IDLE_NOMWAIT; |
657 | return 0; | ||
658 | } else | 654 | } else |
659 | return -1; | 655 | return -1; |
660 | 656 | ||
661 | boot_option_idle_override = 1; | ||
662 | return 0; | 657 | return 0; |
663 | } | 658 | } |
664 | early_param("idle", idle_setup); | 659 | early_param("idle", idle_setup); |
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index 4b9befa0e34..8d128783af4 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c | |||
@@ -57,8 +57,6 @@ | |||
57 | #include <asm/syscalls.h> | 57 | #include <asm/syscalls.h> |
58 | #include <asm/debugreg.h> | 58 | #include <asm/debugreg.h> |
59 | 59 | ||
60 | #include <trace/events/power.h> | ||
61 | |||
62 | asmlinkage void ret_from_fork(void) __asm__("ret_from_fork"); | 60 | asmlinkage void ret_from_fork(void) __asm__("ret_from_fork"); |
63 | 61 | ||
64 | /* | 62 | /* |
@@ -113,8 +111,6 @@ void cpu_idle(void) | |||
113 | stop_critical_timings(); | 111 | stop_critical_timings(); |
114 | pm_idle(); | 112 | pm_idle(); |
115 | start_critical_timings(); | 113 | start_critical_timings(); |
116 | trace_power_end(smp_processor_id()); | ||
117 | trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id()); | ||
118 | } | 114 | } |
119 | tick_nohz_restart_sched_tick(); | 115 | tick_nohz_restart_sched_tick(); |
120 | preempt_enable_no_resched(); | 116 | preempt_enable_no_resched(); |
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index 4c818a73839..bd387e8f73b 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c | |||
@@ -51,8 +51,6 @@ | |||
51 | #include <asm/syscalls.h> | 51 | #include <asm/syscalls.h> |
52 | #include <asm/debugreg.h> | 52 | #include <asm/debugreg.h> |
53 | 53 | ||
54 | #include <trace/events/power.h> | ||
55 | |||
56 | asmlinkage extern void ret_from_fork(void); | 54 | asmlinkage extern void ret_from_fork(void); |
57 | 55 | ||
58 | DEFINE_PER_CPU(unsigned long, old_rsp); | 56 | DEFINE_PER_CPU(unsigned long, old_rsp); |
@@ -141,10 +139,6 @@ void cpu_idle(void) | |||
141 | pm_idle(); | 139 | pm_idle(); |
142 | start_critical_timings(); | 140 | start_critical_timings(); |
143 | 141 | ||
144 | trace_power_end(smp_processor_id()); | ||
145 | trace_cpu_idle(PWR_EVENT_EXIT, | ||
146 | smp_processor_id()); | ||
147 | |||
148 | /* In many cases the interrupt that ended idle | 142 | /* In many cases the interrupt that ended idle |
149 | has already called exit_idle. But some idle | 143 | has already called exit_idle. But some idle |
150 | loops can be woken up without interrupt. */ | 144 | loops can be woken up without interrupt. */ |
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 763df77343d..03273b6c272 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
@@ -638,7 +638,7 @@ wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip) | |||
638 | * target processor state. | 638 | * target processor state. |
639 | */ | 639 | */ |
640 | startup_ipi_hook(phys_apicid, (unsigned long) start_secondary, | 640 | startup_ipi_hook(phys_apicid, (unsigned long) start_secondary, |
641 | (unsigned long)stack_start.sp); | 641 | stack_start); |
642 | 642 | ||
643 | /* | 643 | /* |
644 | * Run STARTUP IPI loop. | 644 | * Run STARTUP IPI loop. |
@@ -785,7 +785,7 @@ do_rest: | |||
785 | #endif | 785 | #endif |
786 | early_gdt_descr.address = (unsigned long)get_cpu_gdt_table(cpu); | 786 | early_gdt_descr.address = (unsigned long)get_cpu_gdt_table(cpu); |
787 | initial_code = (unsigned long)start_secondary; | 787 | initial_code = (unsigned long)start_secondary; |
788 | stack_start.sp = (void *) c_idle.idle->thread.sp; | 788 | stack_start = c_idle.idle->thread.sp; |
789 | 789 | ||
790 | /* start_ip had better be page-aligned! */ | 790 | /* start_ip had better be page-aligned! */ |
791 | start_ip = setup_trampoline(); | 791 | start_ip = setup_trampoline(); |
@@ -1402,8 +1402,9 @@ static inline void mwait_play_dead(void) | |||
1402 | unsigned int highest_subcstate = 0; | 1402 | unsigned int highest_subcstate = 0; |
1403 | int i; | 1403 | int i; |
1404 | void *mwait_ptr; | 1404 | void *mwait_ptr; |
1405 | struct cpuinfo_x86 *c = __this_cpu_ptr(&cpu_info); | ||
1405 | 1406 | ||
1406 | if (!cpu_has(__this_cpu_ptr(&cpu_info), X86_FEATURE_MWAIT)) | 1407 | if (!(cpu_has(c, X86_FEATURE_MWAIT) && mwait_usable(c))) |
1407 | return; | 1408 | return; |
1408 | if (!cpu_has(__this_cpu_ptr(&cpu_info), X86_FEATURE_CLFLSH)) | 1409 | if (!cpu_has(__this_cpu_ptr(&cpu_info), X86_FEATURE_CLFLSH)) |
1409 | return; | 1410 | return; |
diff --git a/arch/x86/kernel/tboot.c b/arch/x86/kernel/tboot.c index c2f1b26141e..998e972f3b1 100644 --- a/arch/x86/kernel/tboot.c +++ b/arch/x86/kernel/tboot.c | |||
@@ -133,7 +133,7 @@ static int map_tboot_page(unsigned long vaddr, unsigned long pfn, | |||
133 | pmd = pmd_alloc(&tboot_mm, pud, vaddr); | 133 | pmd = pmd_alloc(&tboot_mm, pud, vaddr); |
134 | if (!pmd) | 134 | if (!pmd) |
135 | return -1; | 135 | return -1; |
136 | pte = pte_alloc_map(&tboot_mm, pmd, vaddr); | 136 | pte = pte_alloc_map(&tboot_mm, NULL, pmd, vaddr); |
137 | if (!pte) | 137 | if (!pte) |
138 | return -1; | 138 | return -1; |
139 | set_pte_at(&tboot_mm, vaddr, pte, pfn_pte(pfn, prot)); | 139 | set_pte_at(&tboot_mm, vaddr, pte, pfn_pte(pfn, prot)); |
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c index 823f79a17ad..ffe5755caa8 100644 --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c | |||
@@ -464,7 +464,7 @@ unsigned long native_calibrate_tsc(void) | |||
464 | tsc_pit_min = min(tsc_pit_min, tsc_pit_khz); | 464 | tsc_pit_min = min(tsc_pit_min, tsc_pit_khz); |
465 | 465 | ||
466 | /* hpet or pmtimer available ? */ | 466 | /* hpet or pmtimer available ? */ |
467 | if (!hpet && !ref1 && !ref2) | 467 | if (ref1 == ref2) |
468 | continue; | 468 | continue; |
469 | 469 | ||
470 | /* Check, whether the sampling was disturbed by an SMI */ | 470 | /* Check, whether the sampling was disturbed by an SMI */ |
@@ -935,7 +935,7 @@ static void tsc_refine_calibration_work(struct work_struct *work) | |||
935 | tsc_stop = tsc_read_refs(&ref_stop, hpet); | 935 | tsc_stop = tsc_read_refs(&ref_stop, hpet); |
936 | 936 | ||
937 | /* hpet or pmtimer available ? */ | 937 | /* hpet or pmtimer available ? */ |
938 | if (!hpet && !ref_start && !ref_stop) | 938 | if (ref_start == ref_stop) |
939 | goto out; | 939 | goto out; |
940 | 940 | ||
941 | /* Check, whether the sampling was disturbed by an SMI */ | 941 | /* Check, whether the sampling was disturbed by an SMI */ |
diff --git a/arch/x86/kernel/vm86_32.c b/arch/x86/kernel/vm86_32.c index 61fb9851962..863f8753ab0 100644 --- a/arch/x86/kernel/vm86_32.c +++ b/arch/x86/kernel/vm86_32.c | |||
@@ -179,6 +179,7 @@ static void mark_screen_rdonly(struct mm_struct *mm) | |||
179 | if (pud_none_or_clear_bad(pud)) | 179 | if (pud_none_or_clear_bad(pud)) |
180 | goto out; | 180 | goto out; |
181 | pmd = pmd_offset(pud, 0xA0000); | 181 | pmd = pmd_offset(pud, 0xA0000); |
182 | split_huge_page_pmd(mm, pmd); | ||
182 | if (pmd_none_or_clear_bad(pmd)) | 183 | if (pmd_none_or_clear_bad(pmd)) |
183 | goto out; | 184 | goto out; |
184 | pte = pte_offset_map_lock(mm, pmd, 0xA0000, &ptl); | 185 | pte = pte_offset_map_lock(mm, pmd, 0xA0000, &ptl); |
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 9cafbb49981..f02b8edc3d4 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c | |||
@@ -554,14 +554,18 @@ static int host_mapping_level(struct kvm *kvm, gfn_t gfn) | |||
554 | return ret; | 554 | return ret; |
555 | } | 555 | } |
556 | 556 | ||
557 | static int mapping_level(struct kvm_vcpu *vcpu, gfn_t large_gfn) | 557 | static bool mapping_level_dirty_bitmap(struct kvm_vcpu *vcpu, gfn_t large_gfn) |
558 | { | 558 | { |
559 | struct kvm_memory_slot *slot; | 559 | struct kvm_memory_slot *slot; |
560 | int host_level, level, max_level; | ||
561 | |||
562 | slot = gfn_to_memslot(vcpu->kvm, large_gfn); | 560 | slot = gfn_to_memslot(vcpu->kvm, large_gfn); |
563 | if (slot && slot->dirty_bitmap) | 561 | if (slot && slot->dirty_bitmap) |
564 | return PT_PAGE_TABLE_LEVEL; | 562 | return true; |
563 | return false; | ||
564 | } | ||
565 | |||
566 | static int mapping_level(struct kvm_vcpu *vcpu, gfn_t large_gfn) | ||
567 | { | ||
568 | int host_level, level, max_level; | ||
565 | 569 | ||
566 | host_level = host_mapping_level(vcpu->kvm, large_gfn); | 570 | host_level = host_mapping_level(vcpu->kvm, large_gfn); |
567 | 571 | ||
@@ -941,6 +945,35 @@ static int kvm_age_rmapp(struct kvm *kvm, unsigned long *rmapp, | |||
941 | return young; | 945 | return young; |
942 | } | 946 | } |
943 | 947 | ||
948 | static int kvm_test_age_rmapp(struct kvm *kvm, unsigned long *rmapp, | ||
949 | unsigned long data) | ||
950 | { | ||
951 | u64 *spte; | ||
952 | int young = 0; | ||
953 | |||
954 | /* | ||
955 | * If there's no access bit in the secondary pte set by the | ||
956 | * hardware it's up to gup-fast/gup to set the access bit in | ||
957 | * the primary pte or in the page structure. | ||
958 | */ | ||
959 | if (!shadow_accessed_mask) | ||
960 | goto out; | ||
961 | |||
962 | spte = rmap_next(kvm, rmapp, NULL); | ||
963 | while (spte) { | ||
964 | u64 _spte = *spte; | ||
965 | BUG_ON(!(_spte & PT_PRESENT_MASK)); | ||
966 | young = _spte & PT_ACCESSED_MASK; | ||
967 | if (young) { | ||
968 | young = 1; | ||
969 | break; | ||
970 | } | ||
971 | spte = rmap_next(kvm, rmapp, spte); | ||
972 | } | ||
973 | out: | ||
974 | return young; | ||
975 | } | ||
976 | |||
944 | #define RMAP_RECYCLE_THRESHOLD 1000 | 977 | #define RMAP_RECYCLE_THRESHOLD 1000 |
945 | 978 | ||
946 | static void rmap_recycle(struct kvm_vcpu *vcpu, u64 *spte, gfn_t gfn) | 979 | static void rmap_recycle(struct kvm_vcpu *vcpu, u64 *spte, gfn_t gfn) |
@@ -961,6 +994,11 @@ int kvm_age_hva(struct kvm *kvm, unsigned long hva) | |||
961 | return kvm_handle_hva(kvm, hva, 0, kvm_age_rmapp); | 994 | return kvm_handle_hva(kvm, hva, 0, kvm_age_rmapp); |
962 | } | 995 | } |
963 | 996 | ||
997 | int kvm_test_age_hva(struct kvm *kvm, unsigned long hva) | ||
998 | { | ||
999 | return kvm_handle_hva(kvm, hva, 0, kvm_test_age_rmapp); | ||
1000 | } | ||
1001 | |||
964 | #ifdef MMU_DEBUG | 1002 | #ifdef MMU_DEBUG |
965 | static int is_empty_shadow_page(u64 *spt) | 1003 | static int is_empty_shadow_page(u64 *spt) |
966 | { | 1004 | { |
@@ -2281,6 +2319,48 @@ static int kvm_handle_bad_page(struct kvm *kvm, gfn_t gfn, pfn_t pfn) | |||
2281 | return 1; | 2319 | return 1; |
2282 | } | 2320 | } |
2283 | 2321 | ||
2322 | static void transparent_hugepage_adjust(struct kvm_vcpu *vcpu, | ||
2323 | gfn_t *gfnp, pfn_t *pfnp, int *levelp) | ||
2324 | { | ||
2325 | pfn_t pfn = *pfnp; | ||
2326 | gfn_t gfn = *gfnp; | ||
2327 | int level = *levelp; | ||
2328 | |||
2329 | /* | ||
2330 | * Check if it's a transparent hugepage. If this would be an | ||
2331 | * hugetlbfs page, level wouldn't be set to | ||
2332 | * PT_PAGE_TABLE_LEVEL and there would be no adjustment done | ||
2333 | * here. | ||
2334 | */ | ||
2335 | if (!is_error_pfn(pfn) && !kvm_is_mmio_pfn(pfn) && | ||
2336 | level == PT_PAGE_TABLE_LEVEL && | ||
2337 | PageTransCompound(pfn_to_page(pfn)) && | ||
2338 | !has_wrprotected_page(vcpu->kvm, gfn, PT_DIRECTORY_LEVEL)) { | ||
2339 | unsigned long mask; | ||
2340 | /* | ||
2341 | * mmu_notifier_retry was successful and we hold the | ||
2342 | * mmu_lock here, so the pmd can't become splitting | ||
2343 | * from under us, and in turn | ||
2344 | * __split_huge_page_refcount() can't run from under | ||
2345 | * us and we can safely transfer the refcount from | ||
2346 | * PG_tail to PG_head as we switch the pfn to tail to | ||
2347 | * head. | ||
2348 | */ | ||
2349 | *levelp = level = PT_DIRECTORY_LEVEL; | ||
2350 | mask = KVM_PAGES_PER_HPAGE(level) - 1; | ||
2351 | VM_BUG_ON((gfn & mask) != (pfn & mask)); | ||
2352 | if (pfn & mask) { | ||
2353 | gfn &= ~mask; | ||
2354 | *gfnp = gfn; | ||
2355 | kvm_release_pfn_clean(pfn); | ||
2356 | pfn &= ~mask; | ||
2357 | if (!get_page_unless_zero(pfn_to_page(pfn))) | ||
2358 | BUG(); | ||
2359 | *pfnp = pfn; | ||
2360 | } | ||
2361 | } | ||
2362 | } | ||
2363 | |||
2284 | static bool try_async_pf(struct kvm_vcpu *vcpu, bool prefault, gfn_t gfn, | 2364 | static bool try_async_pf(struct kvm_vcpu *vcpu, bool prefault, gfn_t gfn, |
2285 | gva_t gva, pfn_t *pfn, bool write, bool *writable); | 2365 | gva_t gva, pfn_t *pfn, bool write, bool *writable); |
2286 | 2366 | ||
@@ -2289,20 +2369,25 @@ static int nonpaging_map(struct kvm_vcpu *vcpu, gva_t v, int write, gfn_t gfn, | |||
2289 | { | 2369 | { |
2290 | int r; | 2370 | int r; |
2291 | int level; | 2371 | int level; |
2372 | int force_pt_level; | ||
2292 | pfn_t pfn; | 2373 | pfn_t pfn; |
2293 | unsigned long mmu_seq; | 2374 | unsigned long mmu_seq; |
2294 | bool map_writable; | 2375 | bool map_writable; |
2295 | 2376 | ||
2296 | level = mapping_level(vcpu, gfn); | 2377 | force_pt_level = mapping_level_dirty_bitmap(vcpu, gfn); |
2297 | 2378 | if (likely(!force_pt_level)) { | |
2298 | /* | 2379 | level = mapping_level(vcpu, gfn); |
2299 | * This path builds a PAE pagetable - so we can map 2mb pages at | 2380 | /* |
2300 | * maximum. Therefore check if the level is larger than that. | 2381 | * This path builds a PAE pagetable - so we can map |
2301 | */ | 2382 | * 2mb pages at maximum. Therefore check if the level |
2302 | if (level > PT_DIRECTORY_LEVEL) | 2383 | * is larger than that. |
2303 | level = PT_DIRECTORY_LEVEL; | 2384 | */ |
2385 | if (level > PT_DIRECTORY_LEVEL) | ||
2386 | level = PT_DIRECTORY_LEVEL; | ||
2304 | 2387 | ||
2305 | gfn &= ~(KVM_PAGES_PER_HPAGE(level) - 1); | 2388 | gfn &= ~(KVM_PAGES_PER_HPAGE(level) - 1); |
2389 | } else | ||
2390 | level = PT_PAGE_TABLE_LEVEL; | ||
2306 | 2391 | ||
2307 | mmu_seq = vcpu->kvm->mmu_notifier_seq; | 2392 | mmu_seq = vcpu->kvm->mmu_notifier_seq; |
2308 | smp_rmb(); | 2393 | smp_rmb(); |
@@ -2318,6 +2403,8 @@ static int nonpaging_map(struct kvm_vcpu *vcpu, gva_t v, int write, gfn_t gfn, | |||
2318 | if (mmu_notifier_retry(vcpu, mmu_seq)) | 2403 | if (mmu_notifier_retry(vcpu, mmu_seq)) |
2319 | goto out_unlock; | 2404 | goto out_unlock; |
2320 | kvm_mmu_free_some_pages(vcpu); | 2405 | kvm_mmu_free_some_pages(vcpu); |
2406 | if (likely(!force_pt_level)) | ||
2407 | transparent_hugepage_adjust(vcpu, &gfn, &pfn, &level); | ||
2321 | r = __direct_map(vcpu, v, write, map_writable, level, gfn, pfn, | 2408 | r = __direct_map(vcpu, v, write, map_writable, level, gfn, pfn, |
2322 | prefault); | 2409 | prefault); |
2323 | spin_unlock(&vcpu->kvm->mmu_lock); | 2410 | spin_unlock(&vcpu->kvm->mmu_lock); |
@@ -2655,6 +2742,7 @@ static int tdp_page_fault(struct kvm_vcpu *vcpu, gva_t gpa, u32 error_code, | |||
2655 | pfn_t pfn; | 2742 | pfn_t pfn; |
2656 | int r; | 2743 | int r; |
2657 | int level; | 2744 | int level; |
2745 | int force_pt_level; | ||
2658 | gfn_t gfn = gpa >> PAGE_SHIFT; | 2746 | gfn_t gfn = gpa >> PAGE_SHIFT; |
2659 | unsigned long mmu_seq; | 2747 | unsigned long mmu_seq; |
2660 | int write = error_code & PFERR_WRITE_MASK; | 2748 | int write = error_code & PFERR_WRITE_MASK; |
@@ -2667,9 +2755,12 @@ static int tdp_page_fault(struct kvm_vcpu *vcpu, gva_t gpa, u32 error_code, | |||
2667 | if (r) | 2755 | if (r) |
2668 | return r; | 2756 | return r; |
2669 | 2757 | ||
2670 | level = mapping_level(vcpu, gfn); | 2758 | force_pt_level = mapping_level_dirty_bitmap(vcpu, gfn); |
2671 | 2759 | if (likely(!force_pt_level)) { | |
2672 | gfn &= ~(KVM_PAGES_PER_HPAGE(level) - 1); | 2760 | level = mapping_level(vcpu, gfn); |
2761 | gfn &= ~(KVM_PAGES_PER_HPAGE(level) - 1); | ||
2762 | } else | ||
2763 | level = PT_PAGE_TABLE_LEVEL; | ||
2673 | 2764 | ||
2674 | mmu_seq = vcpu->kvm->mmu_notifier_seq; | 2765 | mmu_seq = vcpu->kvm->mmu_notifier_seq; |
2675 | smp_rmb(); | 2766 | smp_rmb(); |
@@ -2684,6 +2775,8 @@ static int tdp_page_fault(struct kvm_vcpu *vcpu, gva_t gpa, u32 error_code, | |||
2684 | if (mmu_notifier_retry(vcpu, mmu_seq)) | 2775 | if (mmu_notifier_retry(vcpu, mmu_seq)) |
2685 | goto out_unlock; | 2776 | goto out_unlock; |
2686 | kvm_mmu_free_some_pages(vcpu); | 2777 | kvm_mmu_free_some_pages(vcpu); |
2778 | if (likely(!force_pt_level)) | ||
2779 | transparent_hugepage_adjust(vcpu, &gfn, &pfn, &level); | ||
2687 | r = __direct_map(vcpu, gpa, write, map_writable, | 2780 | r = __direct_map(vcpu, gpa, write, map_writable, |
2688 | level, gfn, pfn, prefault); | 2781 | level, gfn, pfn, prefault); |
2689 | spin_unlock(&vcpu->kvm->mmu_lock); | 2782 | spin_unlock(&vcpu->kvm->mmu_lock); |
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index 53210f1e94c..6bccc24c418 100644 --- a/arch/x86/kvm/paging_tmpl.h +++ b/arch/x86/kvm/paging_tmpl.h | |||
@@ -550,6 +550,7 @@ static int FNAME(page_fault)(struct kvm_vcpu *vcpu, gva_t addr, u32 error_code, | |||
550 | int r; | 550 | int r; |
551 | pfn_t pfn; | 551 | pfn_t pfn; |
552 | int level = PT_PAGE_TABLE_LEVEL; | 552 | int level = PT_PAGE_TABLE_LEVEL; |
553 | int force_pt_level; | ||
553 | unsigned long mmu_seq; | 554 | unsigned long mmu_seq; |
554 | bool map_writable; | 555 | bool map_writable; |
555 | 556 | ||
@@ -577,7 +578,11 @@ static int FNAME(page_fault)(struct kvm_vcpu *vcpu, gva_t addr, u32 error_code, | |||
577 | return 0; | 578 | return 0; |
578 | } | 579 | } |
579 | 580 | ||
580 | if (walker.level >= PT_DIRECTORY_LEVEL) { | 581 | if (walker.level >= PT_DIRECTORY_LEVEL) |
582 | force_pt_level = mapping_level_dirty_bitmap(vcpu, walker.gfn); | ||
583 | else | ||
584 | force_pt_level = 1; | ||
585 | if (!force_pt_level) { | ||
581 | level = min(walker.level, mapping_level(vcpu, walker.gfn)); | 586 | level = min(walker.level, mapping_level(vcpu, walker.gfn)); |
582 | walker.gfn = walker.gfn & ~(KVM_PAGES_PER_HPAGE(level) - 1); | 587 | walker.gfn = walker.gfn & ~(KVM_PAGES_PER_HPAGE(level) - 1); |
583 | } | 588 | } |
@@ -599,6 +604,8 @@ static int FNAME(page_fault)(struct kvm_vcpu *vcpu, gva_t addr, u32 error_code, | |||
599 | 604 | ||
600 | trace_kvm_mmu_audit(vcpu, AUDIT_PRE_PAGE_FAULT); | 605 | trace_kvm_mmu_audit(vcpu, AUDIT_PRE_PAGE_FAULT); |
601 | kvm_mmu_free_some_pages(vcpu); | 606 | kvm_mmu_free_some_pages(vcpu); |
607 | if (!force_pt_level) | ||
608 | transparent_hugepage_adjust(vcpu, &walker.gfn, &pfn, &level); | ||
602 | sptep = FNAME(fetch)(vcpu, addr, &walker, user_fault, write_fault, | 609 | sptep = FNAME(fetch)(vcpu, addr, &walker, user_fault, write_fault, |
603 | level, &write_pt, pfn, map_writable, prefault); | 610 | level, &write_pt, pfn, map_writable, prefault); |
604 | (void)sptep; | 611 | (void)sptep; |
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 25bd1bc5aad..54ce246a383 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
@@ -1150,8 +1150,8 @@ static void svm_vcpu_put(struct kvm_vcpu *vcpu) | |||
1150 | kvm_load_ldt(svm->host.ldt); | 1150 | kvm_load_ldt(svm->host.ldt); |
1151 | #ifdef CONFIG_X86_64 | 1151 | #ifdef CONFIG_X86_64 |
1152 | loadsegment(fs, svm->host.fs); | 1152 | loadsegment(fs, svm->host.fs); |
1153 | load_gs_index(svm->host.gs); | ||
1154 | wrmsrl(MSR_KERNEL_GS_BASE, current->thread.gs); | 1153 | wrmsrl(MSR_KERNEL_GS_BASE, current->thread.gs); |
1154 | load_gs_index(svm->host.gs); | ||
1155 | #else | 1155 | #else |
1156 | loadsegment(gs, svm->host.gs); | 1156 | loadsegment(gs, svm->host.gs); |
1157 | #endif | 1157 | #endif |
diff --git a/arch/x86/lguest/Kconfig b/arch/x86/lguest/Kconfig index 38718041efc..6e121a2a49e 100644 --- a/arch/x86/lguest/Kconfig +++ b/arch/x86/lguest/Kconfig | |||
@@ -2,6 +2,7 @@ config LGUEST_GUEST | |||
2 | bool "Lguest guest support" | 2 | bool "Lguest guest support" |
3 | select PARAVIRT | 3 | select PARAVIRT |
4 | depends on X86_32 | 4 | depends on X86_32 |
5 | select VIRTUALIZATION | ||
5 | select VIRTIO | 6 | select VIRTIO |
6 | select VIRTIO_RING | 7 | select VIRTIO_RING |
7 | select VIRTIO_CONSOLE | 8 | select VIRTIO_CONSOLE |
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c index 4996cf5f73a..eba687f0cc0 100644 --- a/arch/x86/lguest/boot.c +++ b/arch/x86/lguest/boot.c | |||
@@ -824,7 +824,7 @@ static void __init lguest_init_IRQ(void) | |||
824 | 824 | ||
825 | for (i = FIRST_EXTERNAL_VECTOR; i < NR_VECTORS; i++) { | 825 | for (i = FIRST_EXTERNAL_VECTOR; i < NR_VECTORS; i++) { |
826 | /* Some systems map "vectors" to interrupts weirdly. Not us! */ | 826 | /* Some systems map "vectors" to interrupts weirdly. Not us! */ |
827 | __get_cpu_var(vector_irq)[i] = i - FIRST_EXTERNAL_VECTOR; | 827 | __this_cpu_write(vector_irq[i], i - FIRST_EXTERNAL_VECTOR); |
828 | if (i != SYSCALL_VECTOR) | 828 | if (i != SYSCALL_VECTOR) |
829 | set_intr_gate(i, interrupt[i - FIRST_EXTERNAL_VECTOR]); | 829 | set_intr_gate(i, interrupt[i - FIRST_EXTERNAL_VECTOR]); |
830 | } | 830 | } |
diff --git a/arch/x86/mm/gup.c b/arch/x86/mm/gup.c index 738e6593799..dbe34b93137 100644 --- a/arch/x86/mm/gup.c +++ b/arch/x86/mm/gup.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/mm.h> | 8 | #include <linux/mm.h> |
9 | #include <linux/vmstat.h> | 9 | #include <linux/vmstat.h> |
10 | #include <linux/highmem.h> | 10 | #include <linux/highmem.h> |
11 | #include <linux/swap.h> | ||
11 | 12 | ||
12 | #include <asm/pgtable.h> | 13 | #include <asm/pgtable.h> |
13 | 14 | ||
@@ -89,6 +90,7 @@ static noinline int gup_pte_range(pmd_t pmd, unsigned long addr, | |||
89 | VM_BUG_ON(!pfn_valid(pte_pfn(pte))); | 90 | VM_BUG_ON(!pfn_valid(pte_pfn(pte))); |
90 | page = pte_page(pte); | 91 | page = pte_page(pte); |
91 | get_page(page); | 92 | get_page(page); |
93 | SetPageReferenced(page); | ||
92 | pages[*nr] = page; | 94 | pages[*nr] = page; |
93 | (*nr)++; | 95 | (*nr)++; |
94 | 96 | ||
@@ -103,6 +105,17 @@ static inline void get_head_page_multiple(struct page *page, int nr) | |||
103 | VM_BUG_ON(page != compound_head(page)); | 105 | VM_BUG_ON(page != compound_head(page)); |
104 | VM_BUG_ON(page_count(page) == 0); | 106 | VM_BUG_ON(page_count(page) == 0); |
105 | atomic_add(nr, &page->_count); | 107 | atomic_add(nr, &page->_count); |
108 | SetPageReferenced(page); | ||
109 | } | ||
110 | |||
111 | static inline void get_huge_page_tail(struct page *page) | ||
112 | { | ||
113 | /* | ||
114 | * __split_huge_page_refcount() cannot run | ||
115 | * from under us. | ||
116 | */ | ||
117 | VM_BUG_ON(atomic_read(&page->_count) < 0); | ||
118 | atomic_inc(&page->_count); | ||
106 | } | 119 | } |
107 | 120 | ||
108 | static noinline int gup_huge_pmd(pmd_t pmd, unsigned long addr, | 121 | static noinline int gup_huge_pmd(pmd_t pmd, unsigned long addr, |
@@ -128,6 +141,8 @@ static noinline int gup_huge_pmd(pmd_t pmd, unsigned long addr, | |||
128 | do { | 141 | do { |
129 | VM_BUG_ON(compound_head(page) != head); | 142 | VM_BUG_ON(compound_head(page) != head); |
130 | pages[*nr] = page; | 143 | pages[*nr] = page; |
144 | if (PageTail(page)) | ||
145 | get_huge_page_tail(page); | ||
131 | (*nr)++; | 146 | (*nr)++; |
132 | page++; | 147 | page++; |
133 | refs++; | 148 | refs++; |
@@ -148,7 +163,18 @@ static int gup_pmd_range(pud_t pud, unsigned long addr, unsigned long end, | |||
148 | pmd_t pmd = *pmdp; | 163 | pmd_t pmd = *pmdp; |
149 | 164 | ||
150 | next = pmd_addr_end(addr, end); | 165 | next = pmd_addr_end(addr, end); |
151 | if (pmd_none(pmd)) | 166 | /* |
167 | * The pmd_trans_splitting() check below explains why | ||
168 | * pmdp_splitting_flush has to flush the tlb, to stop | ||
169 | * this gup-fast code from running while we set the | ||
170 | * splitting bit in the pmd. Returning zero will take | ||
171 | * the slow path that will call wait_split_huge_page() | ||
172 | * if the pmd is still in splitting state. gup-fast | ||
173 | * can't because it has irq disabled and | ||
174 | * wait_split_huge_page() would never return as the | ||
175 | * tlb flush IPI wouldn't run. | ||
176 | */ | ||
177 | if (pmd_none(pmd) || pmd_trans_splitting(pmd)) | ||
152 | return 0; | 178 | return 0; |
153 | if (unlikely(pmd_large(pmd))) { | 179 | if (unlikely(pmd_large(pmd))) { |
154 | if (!gup_huge_pmd(pmd, addr, next, write, pages, nr)) | 180 | if (!gup_huge_pmd(pmd, addr, next, write, pages, nr)) |
diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c index 787c52ca49c..ebf6d7887a3 100644 --- a/arch/x86/mm/numa.c +++ b/arch/x86/mm/numa.c | |||
@@ -2,6 +2,28 @@ | |||
2 | #include <linux/topology.h> | 2 | #include <linux/topology.h> |
3 | #include <linux/module.h> | 3 | #include <linux/module.h> |
4 | #include <linux/bootmem.h> | 4 | #include <linux/bootmem.h> |
5 | #include <asm/numa.h> | ||
6 | #include <asm/acpi.h> | ||
7 | |||
8 | int __initdata numa_off; | ||
9 | |||
10 | static __init int numa_setup(char *opt) | ||
11 | { | ||
12 | if (!opt) | ||
13 | return -EINVAL; | ||
14 | if (!strncmp(opt, "off", 3)) | ||
15 | numa_off = 1; | ||
16 | #ifdef CONFIG_NUMA_EMU | ||
17 | if (!strncmp(opt, "fake=", 5)) | ||
18 | numa_emu_cmdline(opt + 5); | ||
19 | #endif | ||
20 | #ifdef CONFIG_ACPI_NUMA | ||
21 | if (!strncmp(opt, "noacpi", 6)) | ||
22 | acpi_numa = -1; | ||
23 | #endif | ||
24 | return 0; | ||
25 | } | ||
26 | early_param("numa", numa_setup); | ||
5 | 27 | ||
6 | /* | 28 | /* |
7 | * Which logical CPUs are on which nodes | 29 | * Which logical CPUs are on which nodes |
diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c index 1e72102e80c..95ea1551eeb 100644 --- a/arch/x86/mm/numa_64.c +++ b/arch/x86/mm/numa_64.c | |||
@@ -30,7 +30,6 @@ s16 apicid_to_node[MAX_LOCAL_APIC] __cpuinitdata = { | |||
30 | [0 ... MAX_LOCAL_APIC-1] = NUMA_NO_NODE | 30 | [0 ... MAX_LOCAL_APIC-1] = NUMA_NO_NODE |
31 | }; | 31 | }; |
32 | 32 | ||
33 | int numa_off __initdata; | ||
34 | static unsigned long __initdata nodemap_addr; | 33 | static unsigned long __initdata nodemap_addr; |
35 | static unsigned long __initdata nodemap_size; | 34 | static unsigned long __initdata nodemap_size; |
36 | 35 | ||
@@ -263,6 +262,11 @@ static struct bootnode nodes[MAX_NUMNODES] __initdata; | |||
263 | static struct bootnode physnodes[MAX_NUMNODES] __cpuinitdata; | 262 | static struct bootnode physnodes[MAX_NUMNODES] __cpuinitdata; |
264 | static char *cmdline __initdata; | 263 | static char *cmdline __initdata; |
265 | 264 | ||
265 | void __init numa_emu_cmdline(char *str) | ||
266 | { | ||
267 | cmdline = str; | ||
268 | } | ||
269 | |||
266 | static int __init setup_physnodes(unsigned long start, unsigned long end, | 270 | static int __init setup_physnodes(unsigned long start, unsigned long end, |
267 | int acpi, int amd) | 271 | int acpi, int amd) |
268 | { | 272 | { |
@@ -670,24 +674,6 @@ unsigned long __init numa_free_all_bootmem(void) | |||
670 | return pages; | 674 | return pages; |
671 | } | 675 | } |
672 | 676 | ||
673 | static __init int numa_setup(char *opt) | ||
674 | { | ||
675 | if (!opt) | ||
676 | return -EINVAL; | ||
677 | if (!strncmp(opt, "off", 3)) | ||
678 | numa_off = 1; | ||
679 | #ifdef CONFIG_NUMA_EMU | ||
680 | if (!strncmp(opt, "fake=", 5)) | ||
681 | cmdline = opt + 5; | ||
682 | #endif | ||
683 | #ifdef CONFIG_ACPI_NUMA | ||
684 | if (!strncmp(opt, "noacpi", 6)) | ||
685 | acpi_numa = -1; | ||
686 | #endif | ||
687 | return 0; | ||
688 | } | ||
689 | early_param("numa", numa_setup); | ||
690 | |||
691 | #ifdef CONFIG_NUMA | 677 | #ifdef CONFIG_NUMA |
692 | 678 | ||
693 | static __init int find_near_online_node(int node) | 679 | static __init int find_near_online_node(int node) |
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index 8b830ca14ac..d343b3c81f3 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c | |||
@@ -256,7 +256,6 @@ static inline pgprot_t static_protections(pgprot_t prot, unsigned long address, | |||
256 | unsigned long pfn) | 256 | unsigned long pfn) |
257 | { | 257 | { |
258 | pgprot_t forbidden = __pgprot(0); | 258 | pgprot_t forbidden = __pgprot(0); |
259 | pgprot_t required = __pgprot(0); | ||
260 | 259 | ||
261 | /* | 260 | /* |
262 | * The BIOS area between 640k and 1Mb needs to be executable for | 261 | * The BIOS area between 640k and 1Mb needs to be executable for |
@@ -282,12 +281,6 @@ static inline pgprot_t static_protections(pgprot_t prot, unsigned long address, | |||
282 | if (within(pfn, __pa((unsigned long)__start_rodata) >> PAGE_SHIFT, | 281 | if (within(pfn, __pa((unsigned long)__start_rodata) >> PAGE_SHIFT, |
283 | __pa((unsigned long)__end_rodata) >> PAGE_SHIFT)) | 282 | __pa((unsigned long)__end_rodata) >> PAGE_SHIFT)) |
284 | pgprot_val(forbidden) |= _PAGE_RW; | 283 | pgprot_val(forbidden) |= _PAGE_RW; |
285 | /* | ||
286 | * .data and .bss should always be writable. | ||
287 | */ | ||
288 | if (within(address, (unsigned long)_sdata, (unsigned long)_edata) || | ||
289 | within(address, (unsigned long)__bss_start, (unsigned long)__bss_stop)) | ||
290 | pgprot_val(required) |= _PAGE_RW; | ||
291 | 284 | ||
292 | #if defined(CONFIG_X86_64) && defined(CONFIG_DEBUG_RODATA) | 285 | #if defined(CONFIG_X86_64) && defined(CONFIG_DEBUG_RODATA) |
293 | /* | 286 | /* |
@@ -327,7 +320,6 @@ static inline pgprot_t static_protections(pgprot_t prot, unsigned long address, | |||
327 | #endif | 320 | #endif |
328 | 321 | ||
329 | prot = __pgprot(pgprot_val(prot) & ~pgprot_val(forbidden)); | 322 | prot = __pgprot(pgprot_val(prot) & ~pgprot_val(forbidden)); |
330 | prot = __pgprot(pgprot_val(prot) | pgprot_val(required)); | ||
331 | 323 | ||
332 | return prot; | 324 | return prot; |
333 | } | 325 | } |
diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c index 8be8c7d7bc8..500242d3c96 100644 --- a/arch/x86/mm/pgtable.c +++ b/arch/x86/mm/pgtable.c | |||
@@ -320,6 +320,25 @@ int ptep_set_access_flags(struct vm_area_struct *vma, | |||
320 | return changed; | 320 | return changed; |
321 | } | 321 | } |
322 | 322 | ||
323 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | ||
324 | int pmdp_set_access_flags(struct vm_area_struct *vma, | ||
325 | unsigned long address, pmd_t *pmdp, | ||
326 | pmd_t entry, int dirty) | ||
327 | { | ||
328 | int changed = !pmd_same(*pmdp, entry); | ||
329 | |||
330 | VM_BUG_ON(address & ~HPAGE_PMD_MASK); | ||
331 | |||
332 | if (changed && dirty) { | ||
333 | *pmdp = entry; | ||
334 | pmd_update_defer(vma->vm_mm, address, pmdp); | ||
335 | flush_tlb_range(vma, address, address + HPAGE_PMD_SIZE); | ||
336 | } | ||
337 | |||
338 | return changed; | ||
339 | } | ||
340 | #endif | ||
341 | |||
323 | int ptep_test_and_clear_young(struct vm_area_struct *vma, | 342 | int ptep_test_and_clear_young(struct vm_area_struct *vma, |
324 | unsigned long addr, pte_t *ptep) | 343 | unsigned long addr, pte_t *ptep) |
325 | { | 344 | { |
@@ -335,6 +354,23 @@ int ptep_test_and_clear_young(struct vm_area_struct *vma, | |||
335 | return ret; | 354 | return ret; |
336 | } | 355 | } |
337 | 356 | ||
357 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | ||
358 | int pmdp_test_and_clear_young(struct vm_area_struct *vma, | ||
359 | unsigned long addr, pmd_t *pmdp) | ||
360 | { | ||
361 | int ret = 0; | ||
362 | |||
363 | if (pmd_young(*pmdp)) | ||
364 | ret = test_and_clear_bit(_PAGE_BIT_ACCESSED, | ||
365 | (unsigned long *)pmdp); | ||
366 | |||
367 | if (ret) | ||
368 | pmd_update(vma->vm_mm, addr, pmdp); | ||
369 | |||
370 | return ret; | ||
371 | } | ||
372 | #endif | ||
373 | |||
338 | int ptep_clear_flush_young(struct vm_area_struct *vma, | 374 | int ptep_clear_flush_young(struct vm_area_struct *vma, |
339 | unsigned long address, pte_t *ptep) | 375 | unsigned long address, pte_t *ptep) |
340 | { | 376 | { |
@@ -347,6 +383,36 @@ int ptep_clear_flush_young(struct vm_area_struct *vma, | |||
347 | return young; | 383 | return young; |
348 | } | 384 | } |
349 | 385 | ||
386 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | ||
387 | int pmdp_clear_flush_young(struct vm_area_struct *vma, | ||
388 | unsigned long address, pmd_t *pmdp) | ||
389 | { | ||
390 | int young; | ||
391 | |||
392 | VM_BUG_ON(address & ~HPAGE_PMD_MASK); | ||
393 | |||
394 | young = pmdp_test_and_clear_young(vma, address, pmdp); | ||
395 | if (young) | ||
396 | flush_tlb_range(vma, address, address + HPAGE_PMD_SIZE); | ||
397 | |||
398 | return young; | ||
399 | } | ||
400 | |||
401 | void pmdp_splitting_flush(struct vm_area_struct *vma, | ||
402 | unsigned long address, pmd_t *pmdp) | ||
403 | { | ||
404 | int set; | ||
405 | VM_BUG_ON(address & ~HPAGE_PMD_MASK); | ||
406 | set = !test_and_set_bit(_PAGE_BIT_SPLITTING, | ||
407 | (unsigned long *)pmdp); | ||
408 | if (set) { | ||
409 | pmd_update(vma->vm_mm, address, pmdp); | ||
410 | /* need tlb flush only to serialize against gup-fast */ | ||
411 | flush_tlb_range(vma, address, address + HPAGE_PMD_SIZE); | ||
412 | } | ||
413 | } | ||
414 | #endif | ||
415 | |||
350 | /** | 416 | /** |
351 | * reserve_top_address - reserves a hole in the top of kernel address space | 417 | * reserve_top_address - reserves a hole in the top of kernel address space |
352 | * @reserve - size of hole to reserve | 418 | * @reserve - size of hole to reserve |
diff --git a/arch/x86/mm/srat_32.c b/arch/x86/mm/srat_32.c index f16434568a5..ae96e7b8051 100644 --- a/arch/x86/mm/srat_32.c +++ b/arch/x86/mm/srat_32.c | |||
@@ -59,7 +59,6 @@ static struct node_memory_chunk_s __initdata node_memory_chunk[MAXCHUNKS]; | |||
59 | static int __initdata num_memory_chunks; /* total number of memory chunks */ | 59 | static int __initdata num_memory_chunks; /* total number of memory chunks */ |
60 | static u8 __initdata apicid_to_pxm[MAX_APICID]; | 60 | static u8 __initdata apicid_to_pxm[MAX_APICID]; |
61 | 61 | ||
62 | int numa_off __initdata; | ||
63 | int acpi_numa __initdata; | 62 | int acpi_numa __initdata; |
64 | 63 | ||
65 | static __init void bad_srat(void) | 64 | static __init void bad_srat(void) |
diff --git a/arch/x86/pci/broadcom_bus.c b/arch/x86/pci/broadcom_bus.c index 0846a5bbbfb..ab8269b0da2 100644 --- a/arch/x86/pci/broadcom_bus.c +++ b/arch/x86/pci/broadcom_bus.c | |||
@@ -9,6 +9,7 @@ | |||
9 | * option) any later version. | 9 | * option) any later version. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/acpi.h> | ||
12 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
13 | #include <linux/dmi.h> | 14 | #include <linux/dmi.h> |
14 | #include <linux/pci.h> | 15 | #include <linux/pci.h> |
@@ -25,12 +26,14 @@ static void __devinit cnb20le_res(struct pci_dev *dev) | |||
25 | u8 fbus, lbus; | 26 | u8 fbus, lbus; |
26 | int i; | 27 | int i; |
27 | 28 | ||
29 | #ifdef CONFIG_ACPI | ||
28 | /* | 30 | /* |
29 | * The x86_pci_root_bus_res_quirks() function already refuses to use | 31 | * We should get host bridge information from ACPI unless the BIOS |
30 | * this information if ACPI _CRS was used. Therefore, we don't bother | 32 | * doesn't support it. |
31 | * checking if ACPI is enabled, and just generate the information | ||
32 | * for both the ACPI _CRS and no ACPI cases. | ||
33 | */ | 33 | */ |
34 | if (acpi_os_get_root_pointer()) | ||
35 | return; | ||
36 | #endif | ||
34 | 37 | ||
35 | info = &pci_root_info[pci_root_num]; | 38 | info = &pci_root_info[pci_root_num]; |
36 | pci_root_num++; | 39 | pci_root_num++; |
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index f7c8a399978..5fe75026ecc 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c | |||
@@ -22,6 +22,7 @@ unsigned int pci_probe = PCI_PROBE_BIOS | PCI_PROBE_CONF1 | PCI_PROBE_CONF2 | | |||
22 | 22 | ||
23 | unsigned int pci_early_dump_regs; | 23 | unsigned int pci_early_dump_regs; |
24 | static int pci_bf_sort; | 24 | static int pci_bf_sort; |
25 | static int smbios_type_b1_flag; | ||
25 | int pci_routeirq; | 26 | int pci_routeirq; |
26 | int noioapicquirk; | 27 | int noioapicquirk; |
27 | #ifdef CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS | 28 | #ifdef CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS |
@@ -185,6 +186,39 @@ static int __devinit set_bf_sort(const struct dmi_system_id *d) | |||
185 | return 0; | 186 | return 0; |
186 | } | 187 | } |
187 | 188 | ||
189 | static void __devinit read_dmi_type_b1(const struct dmi_header *dm, | ||
190 | void *private_data) | ||
191 | { | ||
192 | u8 *d = (u8 *)dm + 4; | ||
193 | |||
194 | if (dm->type != 0xB1) | ||
195 | return; | ||
196 | switch (((*(u32 *)d) >> 9) & 0x03) { | ||
197 | case 0x00: | ||
198 | printk(KERN_INFO "dmi type 0xB1 record - unknown flag\n"); | ||
199 | break; | ||
200 | case 0x01: /* set pci=bfsort */ | ||
201 | smbios_type_b1_flag = 1; | ||
202 | break; | ||
203 | case 0x02: /* do not set pci=bfsort */ | ||
204 | smbios_type_b1_flag = 2; | ||
205 | break; | ||
206 | default: | ||
207 | break; | ||
208 | } | ||
209 | } | ||
210 | |||
211 | static int __devinit find_sort_method(const struct dmi_system_id *d) | ||
212 | { | ||
213 | dmi_walk(read_dmi_type_b1, NULL); | ||
214 | |||
215 | if (smbios_type_b1_flag == 1) { | ||
216 | set_bf_sort(d); | ||
217 | return 0; | ||
218 | } | ||
219 | return -1; | ||
220 | } | ||
221 | |||
188 | /* | 222 | /* |
189 | * Enable renumbering of PCI bus# ranges to reach all PCI busses (Cardbus) | 223 | * Enable renumbering of PCI bus# ranges to reach all PCI busses (Cardbus) |
190 | */ | 224 | */ |
@@ -213,6 +247,13 @@ static const struct dmi_system_id __devinitconst pciprobe_dmi_table[] = { | |||
213 | }, | 247 | }, |
214 | #endif /* __i386__ */ | 248 | #endif /* __i386__ */ |
215 | { | 249 | { |
250 | .callback = find_sort_method, | ||
251 | .ident = "Dell System", | ||
252 | .matches = { | ||
253 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"), | ||
254 | }, | ||
255 | }, | ||
256 | { | ||
216 | .callback = set_bf_sort, | 257 | .callback = set_bf_sort, |
217 | .ident = "Dell PowerEdge 1950", | 258 | .ident = "Dell PowerEdge 1950", |
218 | .matches = { | 259 | .matches = { |
diff --git a/arch/x86/pci/irq.c b/arch/x86/pci/irq.c index 9f9bfb705cf..87e6c832311 100644 --- a/arch/x86/pci/irq.c +++ b/arch/x86/pci/irq.c | |||
@@ -589,7 +589,8 @@ static __init int intel_router_probe(struct irq_router *r, struct pci_dev *route | |||
589 | case PCI_DEVICE_ID_INTEL_ICH10_1: | 589 | case PCI_DEVICE_ID_INTEL_ICH10_1: |
590 | case PCI_DEVICE_ID_INTEL_ICH10_2: | 590 | case PCI_DEVICE_ID_INTEL_ICH10_2: |
591 | case PCI_DEVICE_ID_INTEL_ICH10_3: | 591 | case PCI_DEVICE_ID_INTEL_ICH10_3: |
592 | case PCI_DEVICE_ID_INTEL_PATSBURG_LPC: | 592 | case PCI_DEVICE_ID_INTEL_PATSBURG_LPC_0: |
593 | case PCI_DEVICE_ID_INTEL_PATSBURG_LPC_1: | ||
593 | r->name = "PIIX/ICH"; | 594 | r->name = "PIIX/ICH"; |
594 | r->get = pirq_piix_get; | 595 | r->get = pirq_piix_get; |
595 | r->set = pirq_piix_set; | 596 | r->set = pirq_piix_set; |
diff --git a/arch/x86/platform/olpc/olpc-xo1.c b/arch/x86/platform/olpc/olpc-xo1.c index f5442c03abc..127775696d6 100644 --- a/arch/x86/platform/olpc/olpc-xo1.c +++ b/arch/x86/platform/olpc/olpc-xo1.c | |||
@@ -1,6 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Support for features of the OLPC XO-1 laptop | 2 | * Support for features of the OLPC XO-1 laptop |
3 | * | 3 | * |
4 | * Copyright (C) 2010 Andres Salomon <dilinger@queued.net> | ||
4 | * Copyright (C) 2010 One Laptop per Child | 5 | * Copyright (C) 2010 One Laptop per Child |
5 | * Copyright (C) 2006 Red Hat, Inc. | 6 | * Copyright (C) 2006 Red Hat, Inc. |
6 | * Copyright (C) 2006 Advanced Micro Devices, Inc. | 7 | * Copyright (C) 2006 Advanced Micro Devices, Inc. |
@@ -12,8 +13,6 @@ | |||
12 | */ | 13 | */ |
13 | 14 | ||
14 | #include <linux/module.h> | 15 | #include <linux/module.h> |
15 | #include <linux/pci.h> | ||
16 | #include <linux/pci_ids.h> | ||
17 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
18 | #include <linux/pm.h> | 17 | #include <linux/pm.h> |
19 | 18 | ||
@@ -22,9 +21,6 @@ | |||
22 | 21 | ||
23 | #define DRV_NAME "olpc-xo1" | 22 | #define DRV_NAME "olpc-xo1" |
24 | 23 | ||
25 | #define PMS_BAR 4 | ||
26 | #define ACPI_BAR 5 | ||
27 | |||
28 | /* PMC registers (PMS block) */ | 24 | /* PMC registers (PMS block) */ |
29 | #define PM_SCLK 0x10 | 25 | #define PM_SCLK 0x10 |
30 | #define PM_IN_SLPCTL 0x20 | 26 | #define PM_IN_SLPCTL 0x20 |
@@ -57,65 +53,67 @@ static void xo1_power_off(void) | |||
57 | outl(0x00002000, acpi_base + PM1_CNT); | 53 | outl(0x00002000, acpi_base + PM1_CNT); |
58 | } | 54 | } |
59 | 55 | ||
60 | /* Read the base addresses from the PCI BAR info */ | 56 | static int __devinit olpc_xo1_probe(struct platform_device *pdev) |
61 | static int __devinit setup_bases(struct pci_dev *pdev) | ||
62 | { | 57 | { |
63 | int r; | 58 | struct resource *res; |
64 | 59 | ||
65 | r = pci_enable_device_io(pdev); | 60 | /* don't run on non-XOs */ |
66 | if (r) { | 61 | if (!machine_is_olpc()) |
67 | dev_err(&pdev->dev, "can't enable device IO\n"); | 62 | return -ENODEV; |
68 | return r; | ||
69 | } | ||
70 | 63 | ||
71 | r = pci_request_region(pdev, ACPI_BAR, DRV_NAME); | 64 | res = platform_get_resource(pdev, IORESOURCE_IO, 0); |
72 | if (r) { | 65 | if (!res) { |
73 | dev_err(&pdev->dev, "can't alloc PCI BAR #%d\n", ACPI_BAR); | 66 | dev_err(&pdev->dev, "can't fetch device resource info\n"); |
74 | return r; | 67 | return -EIO; |
75 | } | 68 | } |
76 | 69 | ||
77 | r = pci_request_region(pdev, PMS_BAR, DRV_NAME); | 70 | if (!request_region(res->start, resource_size(res), DRV_NAME)) { |
78 | if (r) { | 71 | dev_err(&pdev->dev, "can't request region\n"); |
79 | dev_err(&pdev->dev, "can't alloc PCI BAR #%d\n", PMS_BAR); | 72 | return -EIO; |
80 | pci_release_region(pdev, ACPI_BAR); | ||
81 | return r; | ||
82 | } | 73 | } |
83 | 74 | ||
84 | acpi_base = pci_resource_start(pdev, ACPI_BAR); | 75 | if (strcmp(pdev->name, "cs5535-pms") == 0) |
85 | pms_base = pci_resource_start(pdev, PMS_BAR); | 76 | pms_base = res->start; |
77 | else if (strcmp(pdev->name, "cs5535-acpi") == 0) | ||
78 | acpi_base = res->start; | ||
79 | |||
80 | /* If we have both addresses, we can override the poweroff hook */ | ||
81 | if (pms_base && acpi_base) { | ||
82 | pm_power_off = xo1_power_off; | ||
83 | printk(KERN_INFO "OLPC XO-1 support registered\n"); | ||
84 | } | ||
86 | 85 | ||
87 | return 0; | 86 | return 0; |
88 | } | 87 | } |
89 | 88 | ||
90 | static int __devinit olpc_xo1_probe(struct platform_device *pdev) | 89 | static int __devexit olpc_xo1_remove(struct platform_device *pdev) |
91 | { | 90 | { |
92 | struct pci_dev *pcidev; | 91 | struct resource *r; |
93 | int r; | ||
94 | |||
95 | pcidev = pci_get_device(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_ISA, | ||
96 | NULL); | ||
97 | if (!pdev) | ||
98 | return -ENODEV; | ||
99 | |||
100 | r = setup_bases(pcidev); | ||
101 | if (r) | ||
102 | return r; | ||
103 | 92 | ||
104 | pm_power_off = xo1_power_off; | 93 | r = platform_get_resource(pdev, IORESOURCE_IO, 0); |
94 | release_region(r->start, resource_size(r)); | ||
105 | 95 | ||
106 | printk(KERN_INFO "OLPC XO-1 support registered\n"); | 96 | if (strcmp(pdev->name, "cs5535-pms") == 0) |
107 | return 0; | 97 | pms_base = 0; |
108 | } | 98 | else if (strcmp(pdev->name, "cs5535-acpi") == 0) |
99 | acpi_base = 0; | ||
109 | 100 | ||
110 | static int __devexit olpc_xo1_remove(struct platform_device *pdev) | ||
111 | { | ||
112 | pm_power_off = NULL; | 101 | pm_power_off = NULL; |
113 | return 0; | 102 | return 0; |
114 | } | 103 | } |
115 | 104 | ||
116 | static struct platform_driver olpc_xo1_driver = { | 105 | static struct platform_driver cs5535_pms_drv = { |
106 | .driver = { | ||
107 | .name = "cs5535-pms", | ||
108 | .owner = THIS_MODULE, | ||
109 | }, | ||
110 | .probe = olpc_xo1_probe, | ||
111 | .remove = __devexit_p(olpc_xo1_remove), | ||
112 | }; | ||
113 | |||
114 | static struct platform_driver cs5535_acpi_drv = { | ||
117 | .driver = { | 115 | .driver = { |
118 | .name = DRV_NAME, | 116 | .name = "cs5535-acpi", |
119 | .owner = THIS_MODULE, | 117 | .owner = THIS_MODULE, |
120 | }, | 118 | }, |
121 | .probe = olpc_xo1_probe, | 119 | .probe = olpc_xo1_probe, |
@@ -124,12 +122,23 @@ static struct platform_driver olpc_xo1_driver = { | |||
124 | 122 | ||
125 | static int __init olpc_xo1_init(void) | 123 | static int __init olpc_xo1_init(void) |
126 | { | 124 | { |
127 | return platform_driver_register(&olpc_xo1_driver); | 125 | int r; |
126 | |||
127 | r = platform_driver_register(&cs5535_pms_drv); | ||
128 | if (r) | ||
129 | return r; | ||
130 | |||
131 | r = platform_driver_register(&cs5535_acpi_drv); | ||
132 | if (r) | ||
133 | platform_driver_unregister(&cs5535_pms_drv); | ||
134 | |||
135 | return r; | ||
128 | } | 136 | } |
129 | 137 | ||
130 | static void __exit olpc_xo1_exit(void) | 138 | static void __exit olpc_xo1_exit(void) |
131 | { | 139 | { |
132 | platform_driver_unregister(&olpc_xo1_driver); | 140 | platform_driver_unregister(&cs5535_acpi_drv); |
141 | platform_driver_unregister(&cs5535_pms_drv); | ||
133 | } | 142 | } |
134 | 143 | ||
135 | MODULE_AUTHOR("Daniel Drake <dsd@laptop.org>"); | 144 | MODULE_AUTHOR("Daniel Drake <dsd@laptop.org>"); |
diff --git a/arch/x86/xen/Makefile b/arch/x86/xen/Makefile index 77938515891..17c565de3d6 100644 --- a/arch/x86/xen/Makefile +++ b/arch/x86/xen/Makefile | |||
@@ -12,7 +12,8 @@ CFLAGS_mmu.o := $(nostackp) | |||
12 | 12 | ||
13 | obj-y := enlighten.o setup.o multicalls.o mmu.o irq.o \ | 13 | obj-y := enlighten.o setup.o multicalls.o mmu.o irq.o \ |
14 | time.o xen-asm.o xen-asm_$(BITS).o \ | 14 | time.o xen-asm.o xen-asm_$(BITS).o \ |
15 | grant-table.o suspend.o platform-pci-unplug.o | 15 | grant-table.o suspend.o platform-pci-unplug.o \ |
16 | p2m.o | ||
16 | 17 | ||
17 | obj-$(CONFIG_SMP) += smp.o | 18 | obj-$(CONFIG_SMP) += smp.o |
18 | obj-$(CONFIG_PARAVIRT_SPINLOCKS)+= spinlock.o | 19 | obj-$(CONFIG_PARAVIRT_SPINLOCKS)+= spinlock.o |
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 7e8d3bc80af..50542efe45f 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -1194,7 +1194,7 @@ asmlinkage void __init xen_start_kernel(void) | |||
1194 | per_cpu(xen_vcpu, 0) = &HYPERVISOR_shared_info->vcpu_info[0]; | 1194 | per_cpu(xen_vcpu, 0) = &HYPERVISOR_shared_info->vcpu_info[0]; |
1195 | 1195 | ||
1196 | local_irq_disable(); | 1196 | local_irq_disable(); |
1197 | early_boot_irqs_off(); | 1197 | early_boot_irqs_disabled = true; |
1198 | 1198 | ||
1199 | memblock_init(); | 1199 | memblock_init(); |
1200 | 1200 | ||
diff --git a/arch/x86/xen/irq.c b/arch/x86/xen/irq.c index 9d30105a0c4..6a6fe893964 100644 --- a/arch/x86/xen/irq.c +++ b/arch/x86/xen/irq.c | |||
@@ -126,7 +126,7 @@ static const struct pv_irq_ops xen_irq_ops __initdata = { | |||
126 | #endif | 126 | #endif |
127 | }; | 127 | }; |
128 | 128 | ||
129 | void __init xen_init_irq_ops() | 129 | void __init xen_init_irq_ops(void) |
130 | { | 130 | { |
131 | pv_irq_ops = xen_irq_ops; | 131 | pv_irq_ops = xen_irq_ops; |
132 | x86_init.irqs.intr_init = xen_init_IRQ; | 132 | x86_init.irqs.intr_init = xen_init_IRQ; |
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index 44924e551fd..5e92b61ad57 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
@@ -173,371 +173,6 @@ DEFINE_PER_CPU(unsigned long, xen_current_cr3); /* actual vcpu cr3 */ | |||
173 | */ | 173 | */ |
174 | #define USER_LIMIT ((STACK_TOP_MAX + PGDIR_SIZE - 1) & PGDIR_MASK) | 174 | #define USER_LIMIT ((STACK_TOP_MAX + PGDIR_SIZE - 1) & PGDIR_MASK) |
175 | 175 | ||
176 | /* | ||
177 | * Xen leaves the responsibility for maintaining p2m mappings to the | ||
178 | * guests themselves, but it must also access and update the p2m array | ||
179 | * during suspend/resume when all the pages are reallocated. | ||
180 | * | ||
181 | * The p2m table is logically a flat array, but we implement it as a | ||
182 | * three-level tree to allow the address space to be sparse. | ||
183 | * | ||
184 | * Xen | ||
185 | * | | ||
186 | * p2m_top p2m_top_mfn | ||
187 | * / \ / \ | ||
188 | * p2m_mid p2m_mid p2m_mid_mfn p2m_mid_mfn | ||
189 | * / \ / \ / / | ||
190 | * p2m p2m p2m p2m p2m p2m p2m ... | ||
191 | * | ||
192 | * The p2m_mid_mfn pages are mapped by p2m_top_mfn_p. | ||
193 | * | ||
194 | * The p2m_top and p2m_top_mfn levels are limited to 1 page, so the | ||
195 | * maximum representable pseudo-physical address space is: | ||
196 | * P2M_TOP_PER_PAGE * P2M_MID_PER_PAGE * P2M_PER_PAGE pages | ||
197 | * | ||
198 | * P2M_PER_PAGE depends on the architecture, as a mfn is always | ||
199 | * unsigned long (8 bytes on 64-bit, 4 bytes on 32), leading to | ||
200 | * 512 and 1024 entries respectively. | ||
201 | */ | ||
202 | |||
203 | unsigned long xen_max_p2m_pfn __read_mostly; | ||
204 | |||
205 | #define P2M_PER_PAGE (PAGE_SIZE / sizeof(unsigned long)) | ||
206 | #define P2M_MID_PER_PAGE (PAGE_SIZE / sizeof(unsigned long *)) | ||
207 | #define P2M_TOP_PER_PAGE (PAGE_SIZE / sizeof(unsigned long **)) | ||
208 | |||
209 | #define MAX_P2M_PFN (P2M_TOP_PER_PAGE * P2M_MID_PER_PAGE * P2M_PER_PAGE) | ||
210 | |||
211 | /* Placeholders for holes in the address space */ | ||
212 | static RESERVE_BRK_ARRAY(unsigned long, p2m_missing, P2M_PER_PAGE); | ||
213 | static RESERVE_BRK_ARRAY(unsigned long *, p2m_mid_missing, P2M_MID_PER_PAGE); | ||
214 | static RESERVE_BRK_ARRAY(unsigned long, p2m_mid_missing_mfn, P2M_MID_PER_PAGE); | ||
215 | |||
216 | static RESERVE_BRK_ARRAY(unsigned long **, p2m_top, P2M_TOP_PER_PAGE); | ||
217 | static RESERVE_BRK_ARRAY(unsigned long, p2m_top_mfn, P2M_TOP_PER_PAGE); | ||
218 | static RESERVE_BRK_ARRAY(unsigned long *, p2m_top_mfn_p, P2M_TOP_PER_PAGE); | ||
219 | |||
220 | RESERVE_BRK(p2m_mid, PAGE_SIZE * (MAX_DOMAIN_PAGES / (P2M_PER_PAGE * P2M_MID_PER_PAGE))); | ||
221 | RESERVE_BRK(p2m_mid_mfn, PAGE_SIZE * (MAX_DOMAIN_PAGES / (P2M_PER_PAGE * P2M_MID_PER_PAGE))); | ||
222 | |||
223 | static inline unsigned p2m_top_index(unsigned long pfn) | ||
224 | { | ||
225 | BUG_ON(pfn >= MAX_P2M_PFN); | ||
226 | return pfn / (P2M_MID_PER_PAGE * P2M_PER_PAGE); | ||
227 | } | ||
228 | |||
229 | static inline unsigned p2m_mid_index(unsigned long pfn) | ||
230 | { | ||
231 | return (pfn / P2M_PER_PAGE) % P2M_MID_PER_PAGE; | ||
232 | } | ||
233 | |||
234 | static inline unsigned p2m_index(unsigned long pfn) | ||
235 | { | ||
236 | return pfn % P2M_PER_PAGE; | ||
237 | } | ||
238 | |||
239 | static void p2m_top_init(unsigned long ***top) | ||
240 | { | ||
241 | unsigned i; | ||
242 | |||
243 | for (i = 0; i < P2M_TOP_PER_PAGE; i++) | ||
244 | top[i] = p2m_mid_missing; | ||
245 | } | ||
246 | |||
247 | static void p2m_top_mfn_init(unsigned long *top) | ||
248 | { | ||
249 | unsigned i; | ||
250 | |||
251 | for (i = 0; i < P2M_TOP_PER_PAGE; i++) | ||
252 | top[i] = virt_to_mfn(p2m_mid_missing_mfn); | ||
253 | } | ||
254 | |||
255 | static void p2m_top_mfn_p_init(unsigned long **top) | ||
256 | { | ||
257 | unsigned i; | ||
258 | |||
259 | for (i = 0; i < P2M_TOP_PER_PAGE; i++) | ||
260 | top[i] = p2m_mid_missing_mfn; | ||
261 | } | ||
262 | |||
263 | static void p2m_mid_init(unsigned long **mid) | ||
264 | { | ||
265 | unsigned i; | ||
266 | |||
267 | for (i = 0; i < P2M_MID_PER_PAGE; i++) | ||
268 | mid[i] = p2m_missing; | ||
269 | } | ||
270 | |||
271 | static void p2m_mid_mfn_init(unsigned long *mid) | ||
272 | { | ||
273 | unsigned i; | ||
274 | |||
275 | for (i = 0; i < P2M_MID_PER_PAGE; i++) | ||
276 | mid[i] = virt_to_mfn(p2m_missing); | ||
277 | } | ||
278 | |||
279 | static void p2m_init(unsigned long *p2m) | ||
280 | { | ||
281 | unsigned i; | ||
282 | |||
283 | for (i = 0; i < P2M_MID_PER_PAGE; i++) | ||
284 | p2m[i] = INVALID_P2M_ENTRY; | ||
285 | } | ||
286 | |||
287 | /* | ||
288 | * Build the parallel p2m_top_mfn and p2m_mid_mfn structures | ||
289 | * | ||
290 | * This is called both at boot time, and after resuming from suspend: | ||
291 | * - At boot time we're called very early, and must use extend_brk() | ||
292 | * to allocate memory. | ||
293 | * | ||
294 | * - After resume we're called from within stop_machine, but the mfn | ||
295 | * tree should alreay be completely allocated. | ||
296 | */ | ||
297 | void xen_build_mfn_list_list(void) | ||
298 | { | ||
299 | unsigned long pfn; | ||
300 | |||
301 | /* Pre-initialize p2m_top_mfn to be completely missing */ | ||
302 | if (p2m_top_mfn == NULL) { | ||
303 | p2m_mid_missing_mfn = extend_brk(PAGE_SIZE, PAGE_SIZE); | ||
304 | p2m_mid_mfn_init(p2m_mid_missing_mfn); | ||
305 | |||
306 | p2m_top_mfn_p = extend_brk(PAGE_SIZE, PAGE_SIZE); | ||
307 | p2m_top_mfn_p_init(p2m_top_mfn_p); | ||
308 | |||
309 | p2m_top_mfn = extend_brk(PAGE_SIZE, PAGE_SIZE); | ||
310 | p2m_top_mfn_init(p2m_top_mfn); | ||
311 | } else { | ||
312 | /* Reinitialise, mfn's all change after migration */ | ||
313 | p2m_mid_mfn_init(p2m_mid_missing_mfn); | ||
314 | } | ||
315 | |||
316 | for (pfn = 0; pfn < xen_max_p2m_pfn; pfn += P2M_PER_PAGE) { | ||
317 | unsigned topidx = p2m_top_index(pfn); | ||
318 | unsigned mididx = p2m_mid_index(pfn); | ||
319 | unsigned long **mid; | ||
320 | unsigned long *mid_mfn_p; | ||
321 | |||
322 | mid = p2m_top[topidx]; | ||
323 | mid_mfn_p = p2m_top_mfn_p[topidx]; | ||
324 | |||
325 | /* Don't bother allocating any mfn mid levels if | ||
326 | * they're just missing, just update the stored mfn, | ||
327 | * since all could have changed over a migrate. | ||
328 | */ | ||
329 | if (mid == p2m_mid_missing) { | ||
330 | BUG_ON(mididx); | ||
331 | BUG_ON(mid_mfn_p != p2m_mid_missing_mfn); | ||
332 | p2m_top_mfn[topidx] = virt_to_mfn(p2m_mid_missing_mfn); | ||
333 | pfn += (P2M_MID_PER_PAGE - 1) * P2M_PER_PAGE; | ||
334 | continue; | ||
335 | } | ||
336 | |||
337 | if (mid_mfn_p == p2m_mid_missing_mfn) { | ||
338 | /* | ||
339 | * XXX boot-time only! We should never find | ||
340 | * missing parts of the mfn tree after | ||
341 | * runtime. extend_brk() will BUG if we call | ||
342 | * it too late. | ||
343 | */ | ||
344 | mid_mfn_p = extend_brk(PAGE_SIZE, PAGE_SIZE); | ||
345 | p2m_mid_mfn_init(mid_mfn_p); | ||
346 | |||
347 | p2m_top_mfn_p[topidx] = mid_mfn_p; | ||
348 | } | ||
349 | |||
350 | p2m_top_mfn[topidx] = virt_to_mfn(mid_mfn_p); | ||
351 | mid_mfn_p[mididx] = virt_to_mfn(mid[mididx]); | ||
352 | } | ||
353 | } | ||
354 | |||
355 | void xen_setup_mfn_list_list(void) | ||
356 | { | ||
357 | BUG_ON(HYPERVISOR_shared_info == &xen_dummy_shared_info); | ||
358 | |||
359 | HYPERVISOR_shared_info->arch.pfn_to_mfn_frame_list_list = | ||
360 | virt_to_mfn(p2m_top_mfn); | ||
361 | HYPERVISOR_shared_info->arch.max_pfn = xen_max_p2m_pfn; | ||
362 | } | ||
363 | |||
364 | /* Set up p2m_top to point to the domain-builder provided p2m pages */ | ||
365 | void __init xen_build_dynamic_phys_to_machine(void) | ||
366 | { | ||
367 | unsigned long *mfn_list = (unsigned long *)xen_start_info->mfn_list; | ||
368 | unsigned long max_pfn = min(MAX_DOMAIN_PAGES, xen_start_info->nr_pages); | ||
369 | unsigned long pfn; | ||
370 | |||
371 | xen_max_p2m_pfn = max_pfn; | ||
372 | |||
373 | p2m_missing = extend_brk(PAGE_SIZE, PAGE_SIZE); | ||
374 | p2m_init(p2m_missing); | ||
375 | |||
376 | p2m_mid_missing = extend_brk(PAGE_SIZE, PAGE_SIZE); | ||
377 | p2m_mid_init(p2m_mid_missing); | ||
378 | |||
379 | p2m_top = extend_brk(PAGE_SIZE, PAGE_SIZE); | ||
380 | p2m_top_init(p2m_top); | ||
381 | |||
382 | /* | ||
383 | * The domain builder gives us a pre-constructed p2m array in | ||
384 | * mfn_list for all the pages initially given to us, so we just | ||
385 | * need to graft that into our tree structure. | ||
386 | */ | ||
387 | for (pfn = 0; pfn < max_pfn; pfn += P2M_PER_PAGE) { | ||
388 | unsigned topidx = p2m_top_index(pfn); | ||
389 | unsigned mididx = p2m_mid_index(pfn); | ||
390 | |||
391 | if (p2m_top[topidx] == p2m_mid_missing) { | ||
392 | unsigned long **mid = extend_brk(PAGE_SIZE, PAGE_SIZE); | ||
393 | p2m_mid_init(mid); | ||
394 | |||
395 | p2m_top[topidx] = mid; | ||
396 | } | ||
397 | |||
398 | p2m_top[topidx][mididx] = &mfn_list[pfn]; | ||
399 | } | ||
400 | } | ||
401 | |||
402 | unsigned long get_phys_to_machine(unsigned long pfn) | ||
403 | { | ||
404 | unsigned topidx, mididx, idx; | ||
405 | |||
406 | if (unlikely(pfn >= MAX_P2M_PFN)) | ||
407 | return INVALID_P2M_ENTRY; | ||
408 | |||
409 | topidx = p2m_top_index(pfn); | ||
410 | mididx = p2m_mid_index(pfn); | ||
411 | idx = p2m_index(pfn); | ||
412 | |||
413 | return p2m_top[topidx][mididx][idx]; | ||
414 | } | ||
415 | EXPORT_SYMBOL_GPL(get_phys_to_machine); | ||
416 | |||
417 | static void *alloc_p2m_page(void) | ||
418 | { | ||
419 | return (void *)__get_free_page(GFP_KERNEL | __GFP_REPEAT); | ||
420 | } | ||
421 | |||
422 | static void free_p2m_page(void *p) | ||
423 | { | ||
424 | free_page((unsigned long)p); | ||
425 | } | ||
426 | |||
427 | /* | ||
428 | * Fully allocate the p2m structure for a given pfn. We need to check | ||
429 | * that both the top and mid levels are allocated, and make sure the | ||
430 | * parallel mfn tree is kept in sync. We may race with other cpus, so | ||
431 | * the new pages are installed with cmpxchg; if we lose the race then | ||
432 | * simply free the page we allocated and use the one that's there. | ||
433 | */ | ||
434 | static bool alloc_p2m(unsigned long pfn) | ||
435 | { | ||
436 | unsigned topidx, mididx; | ||
437 | unsigned long ***top_p, **mid; | ||
438 | unsigned long *top_mfn_p, *mid_mfn; | ||
439 | |||
440 | topidx = p2m_top_index(pfn); | ||
441 | mididx = p2m_mid_index(pfn); | ||
442 | |||
443 | top_p = &p2m_top[topidx]; | ||
444 | mid = *top_p; | ||
445 | |||
446 | if (mid == p2m_mid_missing) { | ||
447 | /* Mid level is missing, allocate a new one */ | ||
448 | mid = alloc_p2m_page(); | ||
449 | if (!mid) | ||
450 | return false; | ||
451 | |||
452 | p2m_mid_init(mid); | ||
453 | |||
454 | if (cmpxchg(top_p, p2m_mid_missing, mid) != p2m_mid_missing) | ||
455 | free_p2m_page(mid); | ||
456 | } | ||
457 | |||
458 | top_mfn_p = &p2m_top_mfn[topidx]; | ||
459 | mid_mfn = p2m_top_mfn_p[topidx]; | ||
460 | |||
461 | BUG_ON(virt_to_mfn(mid_mfn) != *top_mfn_p); | ||
462 | |||
463 | if (mid_mfn == p2m_mid_missing_mfn) { | ||
464 | /* Separately check the mid mfn level */ | ||
465 | unsigned long missing_mfn; | ||
466 | unsigned long mid_mfn_mfn; | ||
467 | |||
468 | mid_mfn = alloc_p2m_page(); | ||
469 | if (!mid_mfn) | ||
470 | return false; | ||
471 | |||
472 | p2m_mid_mfn_init(mid_mfn); | ||
473 | |||
474 | missing_mfn = virt_to_mfn(p2m_mid_missing_mfn); | ||
475 | mid_mfn_mfn = virt_to_mfn(mid_mfn); | ||
476 | if (cmpxchg(top_mfn_p, missing_mfn, mid_mfn_mfn) != missing_mfn) | ||
477 | free_p2m_page(mid_mfn); | ||
478 | else | ||
479 | p2m_top_mfn_p[topidx] = mid_mfn; | ||
480 | } | ||
481 | |||
482 | if (p2m_top[topidx][mididx] == p2m_missing) { | ||
483 | /* p2m leaf page is missing */ | ||
484 | unsigned long *p2m; | ||
485 | |||
486 | p2m = alloc_p2m_page(); | ||
487 | if (!p2m) | ||
488 | return false; | ||
489 | |||
490 | p2m_init(p2m); | ||
491 | |||
492 | if (cmpxchg(&mid[mididx], p2m_missing, p2m) != p2m_missing) | ||
493 | free_p2m_page(p2m); | ||
494 | else | ||
495 | mid_mfn[mididx] = virt_to_mfn(p2m); | ||
496 | } | ||
497 | |||
498 | return true; | ||
499 | } | ||
500 | |||
501 | /* Try to install p2m mapping; fail if intermediate bits missing */ | ||
502 | bool __set_phys_to_machine(unsigned long pfn, unsigned long mfn) | ||
503 | { | ||
504 | unsigned topidx, mididx, idx; | ||
505 | |||
506 | if (unlikely(pfn >= MAX_P2M_PFN)) { | ||
507 | BUG_ON(mfn != INVALID_P2M_ENTRY); | ||
508 | return true; | ||
509 | } | ||
510 | |||
511 | topidx = p2m_top_index(pfn); | ||
512 | mididx = p2m_mid_index(pfn); | ||
513 | idx = p2m_index(pfn); | ||
514 | |||
515 | if (p2m_top[topidx][mididx] == p2m_missing) | ||
516 | return mfn == INVALID_P2M_ENTRY; | ||
517 | |||
518 | p2m_top[topidx][mididx][idx] = mfn; | ||
519 | |||
520 | return true; | ||
521 | } | ||
522 | |||
523 | bool set_phys_to_machine(unsigned long pfn, unsigned long mfn) | ||
524 | { | ||
525 | if (unlikely(xen_feature(XENFEAT_auto_translated_physmap))) { | ||
526 | BUG_ON(pfn != mfn && mfn != INVALID_P2M_ENTRY); | ||
527 | return true; | ||
528 | } | ||
529 | |||
530 | if (unlikely(!__set_phys_to_machine(pfn, mfn))) { | ||
531 | if (!alloc_p2m(pfn)) | ||
532 | return false; | ||
533 | |||
534 | if (!__set_phys_to_machine(pfn, mfn)) | ||
535 | return false; | ||
536 | } | ||
537 | |||
538 | return true; | ||
539 | } | ||
540 | |||
541 | unsigned long arbitrary_virt_to_mfn(void *vaddr) | 176 | unsigned long arbitrary_virt_to_mfn(void *vaddr) |
542 | { | 177 | { |
543 | xmaddr_t maddr = arbitrary_virt_to_machine(vaddr); | 178 | xmaddr_t maddr = arbitrary_virt_to_machine(vaddr); |
@@ -566,6 +201,7 @@ xmaddr_t arbitrary_virt_to_machine(void *vaddr) | |||
566 | offset = address & ~PAGE_MASK; | 201 | offset = address & ~PAGE_MASK; |
567 | return XMADDR(((phys_addr_t)pte_mfn(*pte) << PAGE_SHIFT) + offset); | 202 | return XMADDR(((phys_addr_t)pte_mfn(*pte) << PAGE_SHIFT) + offset); |
568 | } | 203 | } |
204 | EXPORT_SYMBOL_GPL(arbitrary_virt_to_machine); | ||
569 | 205 | ||
570 | void make_lowmem_page_readonly(void *vaddr) | 206 | void make_lowmem_page_readonly(void *vaddr) |
571 | { | 207 | { |
diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c new file mode 100644 index 00000000000..fd12d7ce7ff --- /dev/null +++ b/arch/x86/xen/p2m.c | |||
@@ -0,0 +1,522 @@ | |||
1 | /* | ||
2 | * Xen leaves the responsibility for maintaining p2m mappings to the | ||
3 | * guests themselves, but it must also access and update the p2m array | ||
4 | * during suspend/resume when all the pages are reallocated. | ||
5 | * | ||
6 | * The p2m table is logically a flat array, but we implement it as a | ||
7 | * three-level tree to allow the address space to be sparse. | ||
8 | * | ||
9 | * Xen | ||
10 | * | | ||
11 | * p2m_top p2m_top_mfn | ||
12 | * / \ / \ | ||
13 | * p2m_mid p2m_mid p2m_mid_mfn p2m_mid_mfn | ||
14 | * / \ / \ / / | ||
15 | * p2m p2m p2m p2m p2m p2m p2m ... | ||
16 | * | ||
17 | * The p2m_mid_mfn pages are mapped by p2m_top_mfn_p. | ||
18 | * | ||
19 | * The p2m_top and p2m_top_mfn levels are limited to 1 page, so the | ||
20 | * maximum representable pseudo-physical address space is: | ||
21 | * P2M_TOP_PER_PAGE * P2M_MID_PER_PAGE * P2M_PER_PAGE pages | ||
22 | * | ||
23 | * P2M_PER_PAGE depends on the architecture, as a mfn is always | ||
24 | * unsigned long (8 bytes on 64-bit, 4 bytes on 32), leading to | ||
25 | * 512 and 1024 entries respectively. | ||
26 | */ | ||
27 | |||
28 | #include <linux/init.h> | ||
29 | #include <linux/module.h> | ||
30 | #include <linux/list.h> | ||
31 | #include <linux/hash.h> | ||
32 | #include <linux/sched.h> | ||
33 | |||
34 | #include <asm/cache.h> | ||
35 | #include <asm/setup.h> | ||
36 | |||
37 | #include <asm/xen/page.h> | ||
38 | #include <asm/xen/hypercall.h> | ||
39 | #include <asm/xen/hypervisor.h> | ||
40 | |||
41 | #include "xen-ops.h" | ||
42 | |||
43 | static void __init m2p_override_init(void); | ||
44 | |||
45 | unsigned long xen_max_p2m_pfn __read_mostly; | ||
46 | |||
47 | #define P2M_PER_PAGE (PAGE_SIZE / sizeof(unsigned long)) | ||
48 | #define P2M_MID_PER_PAGE (PAGE_SIZE / sizeof(unsigned long *)) | ||
49 | #define P2M_TOP_PER_PAGE (PAGE_SIZE / sizeof(unsigned long **)) | ||
50 | |||
51 | #define MAX_P2M_PFN (P2M_TOP_PER_PAGE * P2M_MID_PER_PAGE * P2M_PER_PAGE) | ||
52 | |||
53 | /* Placeholders for holes in the address space */ | ||
54 | static RESERVE_BRK_ARRAY(unsigned long, p2m_missing, P2M_PER_PAGE); | ||
55 | static RESERVE_BRK_ARRAY(unsigned long *, p2m_mid_missing, P2M_MID_PER_PAGE); | ||
56 | static RESERVE_BRK_ARRAY(unsigned long, p2m_mid_missing_mfn, P2M_MID_PER_PAGE); | ||
57 | |||
58 | static RESERVE_BRK_ARRAY(unsigned long **, p2m_top, P2M_TOP_PER_PAGE); | ||
59 | static RESERVE_BRK_ARRAY(unsigned long, p2m_top_mfn, P2M_TOP_PER_PAGE); | ||
60 | static RESERVE_BRK_ARRAY(unsigned long *, p2m_top_mfn_p, P2M_TOP_PER_PAGE); | ||
61 | |||
62 | RESERVE_BRK(p2m_mid, PAGE_SIZE * (MAX_DOMAIN_PAGES / (P2M_PER_PAGE * P2M_MID_PER_PAGE))); | ||
63 | RESERVE_BRK(p2m_mid_mfn, PAGE_SIZE * (MAX_DOMAIN_PAGES / (P2M_PER_PAGE * P2M_MID_PER_PAGE))); | ||
64 | |||
65 | static inline unsigned p2m_top_index(unsigned long pfn) | ||
66 | { | ||
67 | BUG_ON(pfn >= MAX_P2M_PFN); | ||
68 | return pfn / (P2M_MID_PER_PAGE * P2M_PER_PAGE); | ||
69 | } | ||
70 | |||
71 | static inline unsigned p2m_mid_index(unsigned long pfn) | ||
72 | { | ||
73 | return (pfn / P2M_PER_PAGE) % P2M_MID_PER_PAGE; | ||
74 | } | ||
75 | |||
76 | static inline unsigned p2m_index(unsigned long pfn) | ||
77 | { | ||
78 | return pfn % P2M_PER_PAGE; | ||
79 | } | ||
80 | |||
81 | static void p2m_top_init(unsigned long ***top) | ||
82 | { | ||
83 | unsigned i; | ||
84 | |||
85 | for (i = 0; i < P2M_TOP_PER_PAGE; i++) | ||
86 | top[i] = p2m_mid_missing; | ||
87 | } | ||
88 | |||
89 | static void p2m_top_mfn_init(unsigned long *top) | ||
90 | { | ||
91 | unsigned i; | ||
92 | |||
93 | for (i = 0; i < P2M_TOP_PER_PAGE; i++) | ||
94 | top[i] = virt_to_mfn(p2m_mid_missing_mfn); | ||
95 | } | ||
96 | |||
97 | static void p2m_top_mfn_p_init(unsigned long **top) | ||
98 | { | ||
99 | unsigned i; | ||
100 | |||
101 | for (i = 0; i < P2M_TOP_PER_PAGE; i++) | ||
102 | top[i] = p2m_mid_missing_mfn; | ||
103 | } | ||
104 | |||
105 | static void p2m_mid_init(unsigned long **mid) | ||
106 | { | ||
107 | unsigned i; | ||
108 | |||
109 | for (i = 0; i < P2M_MID_PER_PAGE; i++) | ||
110 | mid[i] = p2m_missing; | ||
111 | } | ||
112 | |||
113 | static void p2m_mid_mfn_init(unsigned long *mid) | ||
114 | { | ||
115 | unsigned i; | ||
116 | |||
117 | for (i = 0; i < P2M_MID_PER_PAGE; i++) | ||
118 | mid[i] = virt_to_mfn(p2m_missing); | ||
119 | } | ||
120 | |||
121 | static void p2m_init(unsigned long *p2m) | ||
122 | { | ||
123 | unsigned i; | ||
124 | |||
125 | for (i = 0; i < P2M_MID_PER_PAGE; i++) | ||
126 | p2m[i] = INVALID_P2M_ENTRY; | ||
127 | } | ||
128 | |||
129 | /* | ||
130 | * Build the parallel p2m_top_mfn and p2m_mid_mfn structures | ||
131 | * | ||
132 | * This is called both at boot time, and after resuming from suspend: | ||
133 | * - At boot time we're called very early, and must use extend_brk() | ||
134 | * to allocate memory. | ||
135 | * | ||
136 | * - After resume we're called from within stop_machine, but the mfn | ||
137 | * tree should alreay be completely allocated. | ||
138 | */ | ||
139 | void xen_build_mfn_list_list(void) | ||
140 | { | ||
141 | unsigned long pfn; | ||
142 | |||
143 | /* Pre-initialize p2m_top_mfn to be completely missing */ | ||
144 | if (p2m_top_mfn == NULL) { | ||
145 | p2m_mid_missing_mfn = extend_brk(PAGE_SIZE, PAGE_SIZE); | ||
146 | p2m_mid_mfn_init(p2m_mid_missing_mfn); | ||
147 | |||
148 | p2m_top_mfn_p = extend_brk(PAGE_SIZE, PAGE_SIZE); | ||
149 | p2m_top_mfn_p_init(p2m_top_mfn_p); | ||
150 | |||
151 | p2m_top_mfn = extend_brk(PAGE_SIZE, PAGE_SIZE); | ||
152 | p2m_top_mfn_init(p2m_top_mfn); | ||
153 | } else { | ||
154 | /* Reinitialise, mfn's all change after migration */ | ||
155 | p2m_mid_mfn_init(p2m_mid_missing_mfn); | ||
156 | } | ||
157 | |||
158 | for (pfn = 0; pfn < xen_max_p2m_pfn; pfn += P2M_PER_PAGE) { | ||
159 | unsigned topidx = p2m_top_index(pfn); | ||
160 | unsigned mididx = p2m_mid_index(pfn); | ||
161 | unsigned long **mid; | ||
162 | unsigned long *mid_mfn_p; | ||
163 | |||
164 | mid = p2m_top[topidx]; | ||
165 | mid_mfn_p = p2m_top_mfn_p[topidx]; | ||
166 | |||
167 | /* Don't bother allocating any mfn mid levels if | ||
168 | * they're just missing, just update the stored mfn, | ||
169 | * since all could have changed over a migrate. | ||
170 | */ | ||
171 | if (mid == p2m_mid_missing) { | ||
172 | BUG_ON(mididx); | ||
173 | BUG_ON(mid_mfn_p != p2m_mid_missing_mfn); | ||
174 | p2m_top_mfn[topidx] = virt_to_mfn(p2m_mid_missing_mfn); | ||
175 | pfn += (P2M_MID_PER_PAGE - 1) * P2M_PER_PAGE; | ||
176 | continue; | ||
177 | } | ||
178 | |||
179 | if (mid_mfn_p == p2m_mid_missing_mfn) { | ||
180 | /* | ||
181 | * XXX boot-time only! We should never find | ||
182 | * missing parts of the mfn tree after | ||
183 | * runtime. extend_brk() will BUG if we call | ||
184 | * it too late. | ||
185 | */ | ||
186 | mid_mfn_p = extend_brk(PAGE_SIZE, PAGE_SIZE); | ||
187 | p2m_mid_mfn_init(mid_mfn_p); | ||
188 | |||
189 | p2m_top_mfn_p[topidx] = mid_mfn_p; | ||
190 | } | ||
191 | |||
192 | p2m_top_mfn[topidx] = virt_to_mfn(mid_mfn_p); | ||
193 | mid_mfn_p[mididx] = virt_to_mfn(mid[mididx]); | ||
194 | } | ||
195 | } | ||
196 | |||
197 | void xen_setup_mfn_list_list(void) | ||
198 | { | ||
199 | BUG_ON(HYPERVISOR_shared_info == &xen_dummy_shared_info); | ||
200 | |||
201 | HYPERVISOR_shared_info->arch.pfn_to_mfn_frame_list_list = | ||
202 | virt_to_mfn(p2m_top_mfn); | ||
203 | HYPERVISOR_shared_info->arch.max_pfn = xen_max_p2m_pfn; | ||
204 | } | ||
205 | |||
206 | /* Set up p2m_top to point to the domain-builder provided p2m pages */ | ||
207 | void __init xen_build_dynamic_phys_to_machine(void) | ||
208 | { | ||
209 | unsigned long *mfn_list = (unsigned long *)xen_start_info->mfn_list; | ||
210 | unsigned long max_pfn = min(MAX_DOMAIN_PAGES, xen_start_info->nr_pages); | ||
211 | unsigned long pfn; | ||
212 | |||
213 | xen_max_p2m_pfn = max_pfn; | ||
214 | |||
215 | p2m_missing = extend_brk(PAGE_SIZE, PAGE_SIZE); | ||
216 | p2m_init(p2m_missing); | ||
217 | |||
218 | p2m_mid_missing = extend_brk(PAGE_SIZE, PAGE_SIZE); | ||
219 | p2m_mid_init(p2m_mid_missing); | ||
220 | |||
221 | p2m_top = extend_brk(PAGE_SIZE, PAGE_SIZE); | ||
222 | p2m_top_init(p2m_top); | ||
223 | |||
224 | /* | ||
225 | * The domain builder gives us a pre-constructed p2m array in | ||
226 | * mfn_list for all the pages initially given to us, so we just | ||
227 | * need to graft that into our tree structure. | ||
228 | */ | ||
229 | for (pfn = 0; pfn < max_pfn; pfn += P2M_PER_PAGE) { | ||
230 | unsigned topidx = p2m_top_index(pfn); | ||
231 | unsigned mididx = p2m_mid_index(pfn); | ||
232 | |||
233 | if (p2m_top[topidx] == p2m_mid_missing) { | ||
234 | unsigned long **mid = extend_brk(PAGE_SIZE, PAGE_SIZE); | ||
235 | p2m_mid_init(mid); | ||
236 | |||
237 | p2m_top[topidx] = mid; | ||
238 | } | ||
239 | |||
240 | /* | ||
241 | * As long as the mfn_list has enough entries to completely | ||
242 | * fill a p2m page, pointing into the array is ok. But if | ||
243 | * not the entries beyond the last pfn will be undefined. | ||
244 | */ | ||
245 | if (unlikely(pfn + P2M_PER_PAGE > max_pfn)) { | ||
246 | unsigned long p2midx; | ||
247 | |||
248 | p2midx = max_pfn % P2M_PER_PAGE; | ||
249 | for ( ; p2midx < P2M_PER_PAGE; p2midx++) | ||
250 | mfn_list[pfn + p2midx] = INVALID_P2M_ENTRY; | ||
251 | } | ||
252 | p2m_top[topidx][mididx] = &mfn_list[pfn]; | ||
253 | } | ||
254 | |||
255 | m2p_override_init(); | ||
256 | } | ||
257 | |||
258 | unsigned long get_phys_to_machine(unsigned long pfn) | ||
259 | { | ||
260 | unsigned topidx, mididx, idx; | ||
261 | |||
262 | if (unlikely(pfn >= MAX_P2M_PFN)) | ||
263 | return INVALID_P2M_ENTRY; | ||
264 | |||
265 | topidx = p2m_top_index(pfn); | ||
266 | mididx = p2m_mid_index(pfn); | ||
267 | idx = p2m_index(pfn); | ||
268 | |||
269 | return p2m_top[topidx][mididx][idx]; | ||
270 | } | ||
271 | EXPORT_SYMBOL_GPL(get_phys_to_machine); | ||
272 | |||
273 | static void *alloc_p2m_page(void) | ||
274 | { | ||
275 | return (void *)__get_free_page(GFP_KERNEL | __GFP_REPEAT); | ||
276 | } | ||
277 | |||
278 | static void free_p2m_page(void *p) | ||
279 | { | ||
280 | free_page((unsigned long)p); | ||
281 | } | ||
282 | |||
283 | /* | ||
284 | * Fully allocate the p2m structure for a given pfn. We need to check | ||
285 | * that both the top and mid levels are allocated, and make sure the | ||
286 | * parallel mfn tree is kept in sync. We may race with other cpus, so | ||
287 | * the new pages are installed with cmpxchg; if we lose the race then | ||
288 | * simply free the page we allocated and use the one that's there. | ||
289 | */ | ||
290 | static bool alloc_p2m(unsigned long pfn) | ||
291 | { | ||
292 | unsigned topidx, mididx; | ||
293 | unsigned long ***top_p, **mid; | ||
294 | unsigned long *top_mfn_p, *mid_mfn; | ||
295 | |||
296 | topidx = p2m_top_index(pfn); | ||
297 | mididx = p2m_mid_index(pfn); | ||
298 | |||
299 | top_p = &p2m_top[topidx]; | ||
300 | mid = *top_p; | ||
301 | |||
302 | if (mid == p2m_mid_missing) { | ||
303 | /* Mid level is missing, allocate a new one */ | ||
304 | mid = alloc_p2m_page(); | ||
305 | if (!mid) | ||
306 | return false; | ||
307 | |||
308 | p2m_mid_init(mid); | ||
309 | |||
310 | if (cmpxchg(top_p, p2m_mid_missing, mid) != p2m_mid_missing) | ||
311 | free_p2m_page(mid); | ||
312 | } | ||
313 | |||
314 | top_mfn_p = &p2m_top_mfn[topidx]; | ||
315 | mid_mfn = p2m_top_mfn_p[topidx]; | ||
316 | |||
317 | BUG_ON(virt_to_mfn(mid_mfn) != *top_mfn_p); | ||
318 | |||
319 | if (mid_mfn == p2m_mid_missing_mfn) { | ||
320 | /* Separately check the mid mfn level */ | ||
321 | unsigned long missing_mfn; | ||
322 | unsigned long mid_mfn_mfn; | ||
323 | |||
324 | mid_mfn = alloc_p2m_page(); | ||
325 | if (!mid_mfn) | ||
326 | return false; | ||
327 | |||
328 | p2m_mid_mfn_init(mid_mfn); | ||
329 | |||
330 | missing_mfn = virt_to_mfn(p2m_mid_missing_mfn); | ||
331 | mid_mfn_mfn = virt_to_mfn(mid_mfn); | ||
332 | if (cmpxchg(top_mfn_p, missing_mfn, mid_mfn_mfn) != missing_mfn) | ||
333 | free_p2m_page(mid_mfn); | ||
334 | else | ||
335 | p2m_top_mfn_p[topidx] = mid_mfn; | ||
336 | } | ||
337 | |||
338 | if (p2m_top[topidx][mididx] == p2m_missing) { | ||
339 | /* p2m leaf page is missing */ | ||
340 | unsigned long *p2m; | ||
341 | |||
342 | p2m = alloc_p2m_page(); | ||
343 | if (!p2m) | ||
344 | return false; | ||
345 | |||
346 | p2m_init(p2m); | ||
347 | |||
348 | if (cmpxchg(&mid[mididx], p2m_missing, p2m) != p2m_missing) | ||
349 | free_p2m_page(p2m); | ||
350 | else | ||
351 | mid_mfn[mididx] = virt_to_mfn(p2m); | ||
352 | } | ||
353 | |||
354 | return true; | ||
355 | } | ||
356 | |||
357 | /* Try to install p2m mapping; fail if intermediate bits missing */ | ||
358 | bool __set_phys_to_machine(unsigned long pfn, unsigned long mfn) | ||
359 | { | ||
360 | unsigned topidx, mididx, idx; | ||
361 | |||
362 | if (unlikely(pfn >= MAX_P2M_PFN)) { | ||
363 | BUG_ON(mfn != INVALID_P2M_ENTRY); | ||
364 | return true; | ||
365 | } | ||
366 | |||
367 | topidx = p2m_top_index(pfn); | ||
368 | mididx = p2m_mid_index(pfn); | ||
369 | idx = p2m_index(pfn); | ||
370 | |||
371 | if (p2m_top[topidx][mididx] == p2m_missing) | ||
372 | return mfn == INVALID_P2M_ENTRY; | ||
373 | |||
374 | p2m_top[topidx][mididx][idx] = mfn; | ||
375 | |||
376 | return true; | ||
377 | } | ||
378 | |||
379 | bool set_phys_to_machine(unsigned long pfn, unsigned long mfn) | ||
380 | { | ||
381 | if (unlikely(xen_feature(XENFEAT_auto_translated_physmap))) { | ||
382 | BUG_ON(pfn != mfn && mfn != INVALID_P2M_ENTRY); | ||
383 | return true; | ||
384 | } | ||
385 | |||
386 | if (unlikely(!__set_phys_to_machine(pfn, mfn))) { | ||
387 | if (!alloc_p2m(pfn)) | ||
388 | return false; | ||
389 | |||
390 | if (!__set_phys_to_machine(pfn, mfn)) | ||
391 | return false; | ||
392 | } | ||
393 | |||
394 | return true; | ||
395 | } | ||
396 | |||
397 | #define M2P_OVERRIDE_HASH_SHIFT 10 | ||
398 | #define M2P_OVERRIDE_HASH (1 << M2P_OVERRIDE_HASH_SHIFT) | ||
399 | |||
400 | static RESERVE_BRK_ARRAY(struct list_head, m2p_overrides, M2P_OVERRIDE_HASH); | ||
401 | static DEFINE_SPINLOCK(m2p_override_lock); | ||
402 | |||
403 | static void __init m2p_override_init(void) | ||
404 | { | ||
405 | unsigned i; | ||
406 | |||
407 | m2p_overrides = extend_brk(sizeof(*m2p_overrides) * M2P_OVERRIDE_HASH, | ||
408 | sizeof(unsigned long)); | ||
409 | |||
410 | for (i = 0; i < M2P_OVERRIDE_HASH; i++) | ||
411 | INIT_LIST_HEAD(&m2p_overrides[i]); | ||
412 | } | ||
413 | |||
414 | static unsigned long mfn_hash(unsigned long mfn) | ||
415 | { | ||
416 | return hash_long(mfn, M2P_OVERRIDE_HASH_SHIFT); | ||
417 | } | ||
418 | |||
419 | /* Add an MFN override for a particular page */ | ||
420 | int m2p_add_override(unsigned long mfn, struct page *page) | ||
421 | { | ||
422 | unsigned long flags; | ||
423 | unsigned long pfn; | ||
424 | unsigned long address; | ||
425 | unsigned level; | ||
426 | pte_t *ptep = NULL; | ||
427 | |||
428 | pfn = page_to_pfn(page); | ||
429 | if (!PageHighMem(page)) { | ||
430 | address = (unsigned long)__va(pfn << PAGE_SHIFT); | ||
431 | ptep = lookup_address(address, &level); | ||
432 | |||
433 | if (WARN(ptep == NULL || level != PG_LEVEL_4K, | ||
434 | "m2p_add_override: pfn %lx not mapped", pfn)) | ||
435 | return -EINVAL; | ||
436 | } | ||
437 | |||
438 | page->private = mfn; | ||
439 | page->index = pfn_to_mfn(pfn); | ||
440 | |||
441 | __set_phys_to_machine(pfn, FOREIGN_FRAME(mfn)); | ||
442 | if (!PageHighMem(page)) | ||
443 | /* Just zap old mapping for now */ | ||
444 | pte_clear(&init_mm, address, ptep); | ||
445 | |||
446 | spin_lock_irqsave(&m2p_override_lock, flags); | ||
447 | list_add(&page->lru, &m2p_overrides[mfn_hash(mfn)]); | ||
448 | spin_unlock_irqrestore(&m2p_override_lock, flags); | ||
449 | |||
450 | return 0; | ||
451 | } | ||
452 | |||
453 | int m2p_remove_override(struct page *page) | ||
454 | { | ||
455 | unsigned long flags; | ||
456 | unsigned long mfn; | ||
457 | unsigned long pfn; | ||
458 | unsigned long address; | ||
459 | unsigned level; | ||
460 | pte_t *ptep = NULL; | ||
461 | |||
462 | pfn = page_to_pfn(page); | ||
463 | mfn = get_phys_to_machine(pfn); | ||
464 | if (mfn == INVALID_P2M_ENTRY || !(mfn & FOREIGN_FRAME_BIT)) | ||
465 | return -EINVAL; | ||
466 | |||
467 | if (!PageHighMem(page)) { | ||
468 | address = (unsigned long)__va(pfn << PAGE_SHIFT); | ||
469 | ptep = lookup_address(address, &level); | ||
470 | |||
471 | if (WARN(ptep == NULL || level != PG_LEVEL_4K, | ||
472 | "m2p_remove_override: pfn %lx not mapped", pfn)) | ||
473 | return -EINVAL; | ||
474 | } | ||
475 | |||
476 | spin_lock_irqsave(&m2p_override_lock, flags); | ||
477 | list_del(&page->lru); | ||
478 | spin_unlock_irqrestore(&m2p_override_lock, flags); | ||
479 | __set_phys_to_machine(pfn, page->index); | ||
480 | |||
481 | if (!PageHighMem(page)) | ||
482 | set_pte_at(&init_mm, address, ptep, | ||
483 | pfn_pte(pfn, PAGE_KERNEL)); | ||
484 | /* No tlb flush necessary because the caller already | ||
485 | * left the pte unmapped. */ | ||
486 | |||
487 | return 0; | ||
488 | } | ||
489 | |||
490 | struct page *m2p_find_override(unsigned long mfn) | ||
491 | { | ||
492 | unsigned long flags; | ||
493 | struct list_head *bucket = &m2p_overrides[mfn_hash(mfn)]; | ||
494 | struct page *p, *ret; | ||
495 | |||
496 | ret = NULL; | ||
497 | |||
498 | spin_lock_irqsave(&m2p_override_lock, flags); | ||
499 | |||
500 | list_for_each_entry(p, bucket, lru) { | ||
501 | if (p->private == mfn) { | ||
502 | ret = p; | ||
503 | break; | ||
504 | } | ||
505 | } | ||
506 | |||
507 | spin_unlock_irqrestore(&m2p_override_lock, flags); | ||
508 | |||
509 | return ret; | ||
510 | } | ||
511 | |||
512 | unsigned long m2p_find_override_pfn(unsigned long mfn, unsigned long pfn) | ||
513 | { | ||
514 | struct page *p = m2p_find_override(mfn); | ||
515 | unsigned long ret = pfn; | ||
516 | |||
517 | if (p) | ||
518 | ret = page_to_pfn(p); | ||
519 | |||
520 | return ret; | ||
521 | } | ||
522 | EXPORT_SYMBOL_GPL(m2p_find_override_pfn); | ||
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c index b5a7f928234..a8a66a50d44 100644 --- a/arch/x86/xen/setup.c +++ b/arch/x86/xen/setup.c | |||
@@ -179,8 +179,13 @@ char * __init xen_memory_setup(void) | |||
179 | e820.nr_map = 0; | 179 | e820.nr_map = 0; |
180 | xen_extra_mem_start = mem_end; | 180 | xen_extra_mem_start = mem_end; |
181 | for (i = 0; i < memmap.nr_entries; i++) { | 181 | for (i = 0; i < memmap.nr_entries; i++) { |
182 | unsigned long long end = map[i].addr + map[i].size; | 182 | unsigned long long end; |
183 | 183 | ||
184 | /* Guard against non-page aligned E820 entries. */ | ||
185 | if (map[i].type == E820_RAM) | ||
186 | map[i].size -= (map[i].size + map[i].addr) % PAGE_SIZE; | ||
187 | |||
188 | end = map[i].addr + map[i].size; | ||
184 | if (map[i].type == E820_RAM && end > mem_end) { | 189 | if (map[i].type == E820_RAM && end > mem_end) { |
185 | /* RAM off the end - may be partially included */ | 190 | /* RAM off the end - may be partially included */ |
186 | u64 delta = min(map[i].size, end - mem_end); | 191 | u64 delta = min(map[i].size, end - mem_end); |
@@ -350,6 +355,7 @@ void __init xen_arch_setup(void) | |||
350 | boot_cpu_data.hlt_works_ok = 1; | 355 | boot_cpu_data.hlt_works_ok = 1; |
351 | #endif | 356 | #endif |
352 | pm_idle = default_idle; | 357 | pm_idle = default_idle; |
358 | boot_option_idle_override = IDLE_HALT; | ||
353 | 359 | ||
354 | fiddle_vdso(); | 360 | fiddle_vdso(); |
355 | } | 361 | } |
diff --git a/arch/xtensa/configs/common_defconfig b/arch/xtensa/configs/common_defconfig index 1d230ee081b..b90038e40dd 100644 --- a/arch/xtensa/configs/common_defconfig +++ b/arch/xtensa/configs/common_defconfig | |||
@@ -32,7 +32,7 @@ CONFIG_LOG_BUF_SHIFT=14 | |||
32 | # CONFIG_HOTPLUG is not set | 32 | # CONFIG_HOTPLUG is not set |
33 | CONFIG_KOBJECT_UEVENT=y | 33 | CONFIG_KOBJECT_UEVENT=y |
34 | # CONFIG_IKCONFIG is not set | 34 | # CONFIG_IKCONFIG is not set |
35 | # CONFIG_EMBEDDED is not set | 35 | # CONFIG_EXPERT is not set |
36 | CONFIG_KALLSYMS=y | 36 | CONFIG_KALLSYMS=y |
37 | # CONFIG_KALLSYMS_ALL is not set | 37 | # CONFIG_KALLSYMS_ALL is not set |
38 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 38 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
diff --git a/arch/xtensa/configs/iss_defconfig b/arch/xtensa/configs/iss_defconfig index 7368164843b..0234cd198c5 100644 --- a/arch/xtensa/configs/iss_defconfig +++ b/arch/xtensa/configs/iss_defconfig | |||
@@ -55,7 +55,7 @@ CONFIG_LOG_BUF_SHIFT=14 | |||
55 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 55 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
56 | CONFIG_SYSCTL=y | 56 | CONFIG_SYSCTL=y |
57 | CONFIG_ANON_INODES=y | 57 | CONFIG_ANON_INODES=y |
58 | CONFIG_EMBEDDED=y | 58 | CONFIG_EXPERT=y |
59 | CONFIG_SYSCTL_SYSCALL=y | 59 | CONFIG_SYSCTL_SYSCALL=y |
60 | CONFIG_KALLSYMS=y | 60 | CONFIG_KALLSYMS=y |
61 | # CONFIG_KALLSYMS_ALL is not set | 61 | # CONFIG_KALLSYMS_ALL is not set |
diff --git a/arch/xtensa/configs/s6105_defconfig b/arch/xtensa/configs/s6105_defconfig index 5334f238f85..42b7feba71b 100644 --- a/arch/xtensa/configs/s6105_defconfig +++ b/arch/xtensa/configs/s6105_defconfig | |||
@@ -55,7 +55,7 @@ CONFIG_BLK_DEV_INITRD=y | |||
55 | CONFIG_INITRAMFS_SOURCE="" | 55 | CONFIG_INITRAMFS_SOURCE="" |
56 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | 56 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y |
57 | CONFIG_SYSCTL=y | 57 | CONFIG_SYSCTL=y |
58 | CONFIG_EMBEDDED=y | 58 | CONFIG_EXPERT=y |
59 | CONFIG_SYSCTL_SYSCALL=y | 59 | CONFIG_SYSCTL_SYSCALL=y |
60 | CONFIG_KALLSYMS=y | 60 | CONFIG_KALLSYMS=y |
61 | # CONFIG_KALLSYMS_ALL is not set | 61 | # CONFIG_KALLSYMS_ALL is not set |
diff --git a/arch/xtensa/include/asm/mman.h b/arch/xtensa/include/asm/mman.h index fca4db425f6..30789010733 100644 --- a/arch/xtensa/include/asm/mman.h +++ b/arch/xtensa/include/asm/mman.h | |||
@@ -83,6 +83,9 @@ | |||
83 | #define MADV_MERGEABLE 12 /* KSM may merge identical pages */ | 83 | #define MADV_MERGEABLE 12 /* KSM may merge identical pages */ |
84 | #define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages */ | 84 | #define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages */ |
85 | 85 | ||
86 | #define MADV_HUGEPAGE 14 /* Worth backing with hugepages */ | ||
87 | #define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages */ | ||
88 | |||
86 | /* compatibility flags */ | 89 | /* compatibility flags */ |
87 | #define MAP_FILE 0 | 90 | #define MAP_FILE 0 |
88 | 91 | ||