diff options
Diffstat (limited to 'arch')
81 files changed, 508 insertions, 398 deletions
diff --git a/arch/alpha/include/asm/futex.h b/arch/alpha/include/asm/futex.h index e8a761aee088..f939794363ac 100644 --- a/arch/alpha/include/asm/futex.h +++ b/arch/alpha/include/asm/futex.h | |||
@@ -108,7 +108,7 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, | |||
108 | " lda $31,3b-2b(%0)\n" | 108 | " lda $31,3b-2b(%0)\n" |
109 | " .previous\n" | 109 | " .previous\n" |
110 | : "+r"(ret), "=&r"(prev), "=&r"(cmp) | 110 | : "+r"(ret), "=&r"(prev), "=&r"(cmp) |
111 | : "r"(uaddr), "r"((long)oldval), "r"(newval) | 111 | : "r"(uaddr), "r"((long)(int)oldval), "r"(newval) |
112 | : "memory"); | 112 | : "memory"); |
113 | 113 | ||
114 | *uval = prev; | 114 | *uval = prev; |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 1655c0734d72..9673bbad16f6 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -1283,7 +1283,7 @@ config ARM_ERRATA_743622 | |||
1283 | depends on CPU_V7 | 1283 | depends on CPU_V7 |
1284 | help | 1284 | help |
1285 | This option enables the workaround for the 743622 Cortex-A9 | 1285 | This option enables the workaround for the 743622 Cortex-A9 |
1286 | (r2p0..r2p2) erratum. Under very rare conditions, a faulty | 1286 | (r2p*) erratum. Under very rare conditions, a faulty |
1287 | optimisation in the Cortex-A9 Store Buffer may lead to data | 1287 | optimisation in the Cortex-A9 Store Buffer may lead to data |
1288 | corruption. This workaround sets a specific bit in the diagnostic | 1288 | corruption. This workaround sets a specific bit in the diagnostic |
1289 | register of the Cortex-A9 which disables the Store Buffer | 1289 | register of the Cortex-A9 which disables the Store Buffer |
diff --git a/arch/arm/boot/.gitignore b/arch/arm/boot/.gitignore index ce1c5ff746e7..3c79f85975aa 100644 --- a/arch/arm/boot/.gitignore +++ b/arch/arm/boot/.gitignore | |||
@@ -3,3 +3,4 @@ zImage | |||
3 | xipImage | 3 | xipImage |
4 | bootpImage | 4 | bootpImage |
5 | uImage | 5 | uImage |
6 | *.dtb | ||
diff --git a/arch/arm/include/asm/pmu.h b/arch/arm/include/asm/pmu.h index b5a5be2536c1..90114faa9f3c 100644 --- a/arch/arm/include/asm/pmu.h +++ b/arch/arm/include/asm/pmu.h | |||
@@ -134,7 +134,7 @@ int __init armpmu_register(struct arm_pmu *armpmu, char *name, int type); | |||
134 | 134 | ||
135 | u64 armpmu_event_update(struct perf_event *event, | 135 | u64 armpmu_event_update(struct perf_event *event, |
136 | struct hw_perf_event *hwc, | 136 | struct hw_perf_event *hwc, |
137 | int idx, int overflow); | 137 | int idx); |
138 | 138 | ||
139 | int armpmu_event_set_period(struct perf_event *event, | 139 | int armpmu_event_set_period(struct perf_event *event, |
140 | struct hw_perf_event *hwc, | 140 | struct hw_perf_event *hwc, |
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index 43b740d0e374..f16d7652f34b 100644 --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile | |||
@@ -62,9 +62,6 @@ obj-$(CONFIG_SWP_EMULATE) += swp_emulate.o | |||
62 | CFLAGS_swp_emulate.o := -Wa,-march=armv7-a | 62 | CFLAGS_swp_emulate.o := -Wa,-march=armv7-a |
63 | obj-$(CONFIG_HAVE_HW_BREAKPOINT) += hw_breakpoint.o | 63 | obj-$(CONFIG_HAVE_HW_BREAKPOINT) += hw_breakpoint.o |
64 | 64 | ||
65 | obj-$(CONFIG_CRUNCH) += crunch.o crunch-bits.o | ||
66 | AFLAGS_crunch-bits.o := -Wa,-mcpu=ep9312 | ||
67 | |||
68 | obj-$(CONFIG_CPU_XSCALE) += xscale-cp0.o | 65 | obj-$(CONFIG_CPU_XSCALE) += xscale-cp0.o |
69 | obj-$(CONFIG_CPU_XSC3) += xscale-cp0.o | 66 | obj-$(CONFIG_CPU_XSC3) += xscale-cp0.o |
70 | obj-$(CONFIG_CPU_MOHAWK) += xscale-cp0.o | 67 | obj-$(CONFIG_CPU_MOHAWK) += xscale-cp0.o |
diff --git a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c index 4dd0edab6a65..1651d4950744 100644 --- a/arch/arm/kernel/ecard.c +++ b/arch/arm/kernel/ecard.c | |||
@@ -242,6 +242,7 @@ static void ecard_init_pgtables(struct mm_struct *mm) | |||
242 | 242 | ||
243 | memcpy(dst_pgd, src_pgd, sizeof(pgd_t) * (EASI_SIZE / PGDIR_SIZE)); | 243 | memcpy(dst_pgd, src_pgd, sizeof(pgd_t) * (EASI_SIZE / PGDIR_SIZE)); |
244 | 244 | ||
245 | vma.vm_flags = VM_EXEC; | ||
245 | vma.vm_mm = mm; | 246 | vma.vm_mm = mm; |
246 | 247 | ||
247 | flush_tlb_range(&vma, IO_START, IO_START + IO_SIZE); | 248 | flush_tlb_range(&vma, IO_START, IO_START + IO_SIZE); |
diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index 5bb91bf3d47f..b2abfa18f137 100644 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c | |||
@@ -180,7 +180,7 @@ armpmu_event_set_period(struct perf_event *event, | |||
180 | u64 | 180 | u64 |
181 | armpmu_event_update(struct perf_event *event, | 181 | armpmu_event_update(struct perf_event *event, |
182 | struct hw_perf_event *hwc, | 182 | struct hw_perf_event *hwc, |
183 | int idx, int overflow) | 183 | int idx) |
184 | { | 184 | { |
185 | struct arm_pmu *armpmu = to_arm_pmu(event->pmu); | 185 | struct arm_pmu *armpmu = to_arm_pmu(event->pmu); |
186 | u64 delta, prev_raw_count, new_raw_count; | 186 | u64 delta, prev_raw_count, new_raw_count; |
@@ -193,13 +193,7 @@ again: | |||
193 | new_raw_count) != prev_raw_count) | 193 | new_raw_count) != prev_raw_count) |
194 | goto again; | 194 | goto again; |
195 | 195 | ||
196 | new_raw_count &= armpmu->max_period; | 196 | delta = (new_raw_count - prev_raw_count) & armpmu->max_period; |
197 | prev_raw_count &= armpmu->max_period; | ||
198 | |||
199 | if (overflow) | ||
200 | delta = armpmu->max_period - prev_raw_count + new_raw_count + 1; | ||
201 | else | ||
202 | delta = new_raw_count - prev_raw_count; | ||
203 | 197 | ||
204 | local64_add(delta, &event->count); | 198 | local64_add(delta, &event->count); |
205 | local64_sub(delta, &hwc->period_left); | 199 | local64_sub(delta, &hwc->period_left); |
@@ -216,7 +210,7 @@ armpmu_read(struct perf_event *event) | |||
216 | if (hwc->idx < 0) | 210 | if (hwc->idx < 0) |
217 | return; | 211 | return; |
218 | 212 | ||
219 | armpmu_event_update(event, hwc, hwc->idx, 0); | 213 | armpmu_event_update(event, hwc, hwc->idx); |
220 | } | 214 | } |
221 | 215 | ||
222 | static void | 216 | static void |
@@ -232,7 +226,7 @@ armpmu_stop(struct perf_event *event, int flags) | |||
232 | if (!(hwc->state & PERF_HES_STOPPED)) { | 226 | if (!(hwc->state & PERF_HES_STOPPED)) { |
233 | armpmu->disable(hwc, hwc->idx); | 227 | armpmu->disable(hwc, hwc->idx); |
234 | barrier(); /* why? */ | 228 | barrier(); /* why? */ |
235 | armpmu_event_update(event, hwc, hwc->idx, 0); | 229 | armpmu_event_update(event, hwc, hwc->idx); |
236 | hwc->state |= PERF_HES_STOPPED | PERF_HES_UPTODATE; | 230 | hwc->state |= PERF_HES_STOPPED | PERF_HES_UPTODATE; |
237 | } | 231 | } |
238 | } | 232 | } |
@@ -518,7 +512,13 @@ __hw_perf_event_init(struct perf_event *event) | |||
518 | hwc->config_base |= (unsigned long)mapping; | 512 | hwc->config_base |= (unsigned long)mapping; |
519 | 513 | ||
520 | if (!hwc->sample_period) { | 514 | if (!hwc->sample_period) { |
521 | hwc->sample_period = armpmu->max_period; | 515 | /* |
516 | * For non-sampling runs, limit the sample_period to half | ||
517 | * of the counter width. That way, the new counter value | ||
518 | * is far less likely to overtake the previous one unless | ||
519 | * you have some serious IRQ latency issues. | ||
520 | */ | ||
521 | hwc->sample_period = armpmu->max_period >> 1; | ||
522 | hwc->last_period = hwc->sample_period; | 522 | hwc->last_period = hwc->sample_period; |
523 | local64_set(&hwc->period_left, hwc->sample_period); | 523 | local64_set(&hwc->period_left, hwc->sample_period); |
524 | } | 524 | } |
@@ -680,6 +680,28 @@ static void __init cpu_pmu_init(struct arm_pmu *armpmu) | |||
680 | } | 680 | } |
681 | 681 | ||
682 | /* | 682 | /* |
683 | * PMU hardware loses all context when a CPU goes offline. | ||
684 | * When a CPU is hotplugged back in, since some hardware registers are | ||
685 | * UNKNOWN at reset, the PMU must be explicitly reset to avoid reading | ||
686 | * junk values out of them. | ||
687 | */ | ||
688 | static int __cpuinit pmu_cpu_notify(struct notifier_block *b, | ||
689 | unsigned long action, void *hcpu) | ||
690 | { | ||
691 | if ((action & ~CPU_TASKS_FROZEN) != CPU_STARTING) | ||
692 | return NOTIFY_DONE; | ||
693 | |||
694 | if (cpu_pmu && cpu_pmu->reset) | ||
695 | cpu_pmu->reset(NULL); | ||
696 | |||
697 | return NOTIFY_OK; | ||
698 | } | ||
699 | |||
700 | static struct notifier_block __cpuinitdata pmu_cpu_notifier = { | ||
701 | .notifier_call = pmu_cpu_notify, | ||
702 | }; | ||
703 | |||
704 | /* | ||
683 | * CPU PMU identification and registration. | 705 | * CPU PMU identification and registration. |
684 | */ | 706 | */ |
685 | static int __init | 707 | static int __init |
@@ -730,6 +752,7 @@ init_hw_perf_events(void) | |||
730 | pr_info("enabled with %s PMU driver, %d counters available\n", | 752 | pr_info("enabled with %s PMU driver, %d counters available\n", |
731 | cpu_pmu->name, cpu_pmu->num_events); | 753 | cpu_pmu->name, cpu_pmu->num_events); |
732 | cpu_pmu_init(cpu_pmu); | 754 | cpu_pmu_init(cpu_pmu); |
755 | register_cpu_notifier(&pmu_cpu_notifier); | ||
733 | armpmu_register(cpu_pmu, "cpu", PERF_TYPE_RAW); | 756 | armpmu_register(cpu_pmu, "cpu", PERF_TYPE_RAW); |
734 | } else { | 757 | } else { |
735 | pr_info("no hardware support available\n"); | 758 | pr_info("no hardware support available\n"); |
diff --git a/arch/arm/kernel/perf_event_v6.c b/arch/arm/kernel/perf_event_v6.c index 533be9930ec2..b78af0cc6ef3 100644 --- a/arch/arm/kernel/perf_event_v6.c +++ b/arch/arm/kernel/perf_event_v6.c | |||
@@ -467,23 +467,6 @@ armv6pmu_enable_event(struct hw_perf_event *hwc, | |||
467 | raw_spin_unlock_irqrestore(&events->pmu_lock, flags); | 467 | raw_spin_unlock_irqrestore(&events->pmu_lock, flags); |
468 | } | 468 | } |
469 | 469 | ||
470 | static int counter_is_active(unsigned long pmcr, int idx) | ||
471 | { | ||
472 | unsigned long mask = 0; | ||
473 | if (idx == ARMV6_CYCLE_COUNTER) | ||
474 | mask = ARMV6_PMCR_CCOUNT_IEN; | ||
475 | else if (idx == ARMV6_COUNTER0) | ||
476 | mask = ARMV6_PMCR_COUNT0_IEN; | ||
477 | else if (idx == ARMV6_COUNTER1) | ||
478 | mask = ARMV6_PMCR_COUNT1_IEN; | ||
479 | |||
480 | if (mask) | ||
481 | return pmcr & mask; | ||
482 | |||
483 | WARN_ONCE(1, "invalid counter number (%d)\n", idx); | ||
484 | return 0; | ||
485 | } | ||
486 | |||
487 | static irqreturn_t | 470 | static irqreturn_t |
488 | armv6pmu_handle_irq(int irq_num, | 471 | armv6pmu_handle_irq(int irq_num, |
489 | void *dev) | 472 | void *dev) |
@@ -513,7 +496,8 @@ armv6pmu_handle_irq(int irq_num, | |||
513 | struct perf_event *event = cpuc->events[idx]; | 496 | struct perf_event *event = cpuc->events[idx]; |
514 | struct hw_perf_event *hwc; | 497 | struct hw_perf_event *hwc; |
515 | 498 | ||
516 | if (!counter_is_active(pmcr, idx)) | 499 | /* Ignore if we don't have an event. */ |
500 | if (!event) | ||
517 | continue; | 501 | continue; |
518 | 502 | ||
519 | /* | 503 | /* |
@@ -524,7 +508,7 @@ armv6pmu_handle_irq(int irq_num, | |||
524 | continue; | 508 | continue; |
525 | 509 | ||
526 | hwc = &event->hw; | 510 | hwc = &event->hw; |
527 | armpmu_event_update(event, hwc, idx, 1); | 511 | armpmu_event_update(event, hwc, idx); |
528 | data.period = event->hw.last_period; | 512 | data.period = event->hw.last_period; |
529 | if (!armpmu_event_set_period(event, hwc, idx)) | 513 | if (!armpmu_event_set_period(event, hwc, idx)) |
530 | continue; | 514 | continue; |
diff --git a/arch/arm/kernel/perf_event_v7.c b/arch/arm/kernel/perf_event_v7.c index 6933244c68f9..4d7095af2ab3 100644 --- a/arch/arm/kernel/perf_event_v7.c +++ b/arch/arm/kernel/perf_event_v7.c | |||
@@ -809,6 +809,11 @@ static inline int armv7_pmnc_disable_intens(int idx) | |||
809 | 809 | ||
810 | counter = ARMV7_IDX_TO_COUNTER(idx); | 810 | counter = ARMV7_IDX_TO_COUNTER(idx); |
811 | asm volatile("mcr p15, 0, %0, c9, c14, 2" : : "r" (BIT(counter))); | 811 | asm volatile("mcr p15, 0, %0, c9, c14, 2" : : "r" (BIT(counter))); |
812 | isb(); | ||
813 | /* Clear the overflow flag in case an interrupt is pending. */ | ||
814 | asm volatile("mcr p15, 0, %0, c9, c12, 3" : : "r" (BIT(counter))); | ||
815 | isb(); | ||
816 | |||
812 | return idx; | 817 | return idx; |
813 | } | 818 | } |
814 | 819 | ||
@@ -955,6 +960,10 @@ static irqreturn_t armv7pmu_handle_irq(int irq_num, void *dev) | |||
955 | struct perf_event *event = cpuc->events[idx]; | 960 | struct perf_event *event = cpuc->events[idx]; |
956 | struct hw_perf_event *hwc; | 961 | struct hw_perf_event *hwc; |
957 | 962 | ||
963 | /* Ignore if we don't have an event. */ | ||
964 | if (!event) | ||
965 | continue; | ||
966 | |||
958 | /* | 967 | /* |
959 | * We have a single interrupt for all counters. Check that | 968 | * We have a single interrupt for all counters. Check that |
960 | * each counter has overflowed before we process it. | 969 | * each counter has overflowed before we process it. |
@@ -963,7 +972,7 @@ static irqreturn_t armv7pmu_handle_irq(int irq_num, void *dev) | |||
963 | continue; | 972 | continue; |
964 | 973 | ||
965 | hwc = &event->hw; | 974 | hwc = &event->hw; |
966 | armpmu_event_update(event, hwc, idx, 1); | 975 | armpmu_event_update(event, hwc, idx); |
967 | data.period = event->hw.last_period; | 976 | data.period = event->hw.last_period; |
968 | if (!armpmu_event_set_period(event, hwc, idx)) | 977 | if (!armpmu_event_set_period(event, hwc, idx)) |
969 | continue; | 978 | continue; |
diff --git a/arch/arm/kernel/perf_event_xscale.c b/arch/arm/kernel/perf_event_xscale.c index 3b99d8269829..71a21e6712f5 100644 --- a/arch/arm/kernel/perf_event_xscale.c +++ b/arch/arm/kernel/perf_event_xscale.c | |||
@@ -255,11 +255,14 @@ xscale1pmu_handle_irq(int irq_num, void *dev) | |||
255 | struct perf_event *event = cpuc->events[idx]; | 255 | struct perf_event *event = cpuc->events[idx]; |
256 | struct hw_perf_event *hwc; | 256 | struct hw_perf_event *hwc; |
257 | 257 | ||
258 | if (!event) | ||
259 | continue; | ||
260 | |||
258 | if (!xscale1_pmnc_counter_has_overflowed(pmnc, idx)) | 261 | if (!xscale1_pmnc_counter_has_overflowed(pmnc, idx)) |
259 | continue; | 262 | continue; |
260 | 263 | ||
261 | hwc = &event->hw; | 264 | hwc = &event->hw; |
262 | armpmu_event_update(event, hwc, idx, 1); | 265 | armpmu_event_update(event, hwc, idx); |
263 | data.period = event->hw.last_period; | 266 | data.period = event->hw.last_period; |
264 | if (!armpmu_event_set_period(event, hwc, idx)) | 267 | if (!armpmu_event_set_period(event, hwc, idx)) |
265 | continue; | 268 | continue; |
@@ -592,11 +595,14 @@ xscale2pmu_handle_irq(int irq_num, void *dev) | |||
592 | struct perf_event *event = cpuc->events[idx]; | 595 | struct perf_event *event = cpuc->events[idx]; |
593 | struct hw_perf_event *hwc; | 596 | struct hw_perf_event *hwc; |
594 | 597 | ||
595 | if (!xscale2_pmnc_counter_has_overflowed(pmnc, idx)) | 598 | if (!event) |
599 | continue; | ||
600 | |||
601 | if (!xscale2_pmnc_counter_has_overflowed(of_flags, idx)) | ||
596 | continue; | 602 | continue; |
597 | 603 | ||
598 | hwc = &event->hw; | 604 | hwc = &event->hw; |
599 | armpmu_event_update(event, hwc, idx, 1); | 605 | armpmu_event_update(event, hwc, idx); |
600 | data.period = event->hw.last_period; | 606 | data.period = event->hw.last_period; |
601 | if (!armpmu_event_set_period(event, hwc, idx)) | 607 | if (!armpmu_event_set_period(event, hwc, idx)) |
602 | continue; | 608 | continue; |
@@ -663,7 +669,7 @@ xscale2pmu_enable_event(struct hw_perf_event *hwc, int idx) | |||
663 | static void | 669 | static void |
664 | xscale2pmu_disable_event(struct hw_perf_event *hwc, int idx) | 670 | xscale2pmu_disable_event(struct hw_perf_event *hwc, int idx) |
665 | { | 671 | { |
666 | unsigned long flags, ien, evtsel; | 672 | unsigned long flags, ien, evtsel, of_flags; |
667 | struct pmu_hw_events *events = cpu_pmu->get_hw_events(); | 673 | struct pmu_hw_events *events = cpu_pmu->get_hw_events(); |
668 | 674 | ||
669 | ien = xscale2pmu_read_int_enable(); | 675 | ien = xscale2pmu_read_int_enable(); |
@@ -672,26 +678,31 @@ xscale2pmu_disable_event(struct hw_perf_event *hwc, int idx) | |||
672 | switch (idx) { | 678 | switch (idx) { |
673 | case XSCALE_CYCLE_COUNTER: | 679 | case XSCALE_CYCLE_COUNTER: |
674 | ien &= ~XSCALE2_CCOUNT_INT_EN; | 680 | ien &= ~XSCALE2_CCOUNT_INT_EN; |
681 | of_flags = XSCALE2_CCOUNT_OVERFLOW; | ||
675 | break; | 682 | break; |
676 | case XSCALE_COUNTER0: | 683 | case XSCALE_COUNTER0: |
677 | ien &= ~XSCALE2_COUNT0_INT_EN; | 684 | ien &= ~XSCALE2_COUNT0_INT_EN; |
678 | evtsel &= ~XSCALE2_COUNT0_EVT_MASK; | 685 | evtsel &= ~XSCALE2_COUNT0_EVT_MASK; |
679 | evtsel |= XSCALE_PERFCTR_UNUSED << XSCALE2_COUNT0_EVT_SHFT; | 686 | evtsel |= XSCALE_PERFCTR_UNUSED << XSCALE2_COUNT0_EVT_SHFT; |
687 | of_flags = XSCALE2_COUNT0_OVERFLOW; | ||
680 | break; | 688 | break; |
681 | case XSCALE_COUNTER1: | 689 | case XSCALE_COUNTER1: |
682 | ien &= ~XSCALE2_COUNT1_INT_EN; | 690 | ien &= ~XSCALE2_COUNT1_INT_EN; |
683 | evtsel &= ~XSCALE2_COUNT1_EVT_MASK; | 691 | evtsel &= ~XSCALE2_COUNT1_EVT_MASK; |
684 | evtsel |= XSCALE_PERFCTR_UNUSED << XSCALE2_COUNT1_EVT_SHFT; | 692 | evtsel |= XSCALE_PERFCTR_UNUSED << XSCALE2_COUNT1_EVT_SHFT; |
693 | of_flags = XSCALE2_COUNT1_OVERFLOW; | ||
685 | break; | 694 | break; |
686 | case XSCALE_COUNTER2: | 695 | case XSCALE_COUNTER2: |
687 | ien &= ~XSCALE2_COUNT2_INT_EN; | 696 | ien &= ~XSCALE2_COUNT2_INT_EN; |
688 | evtsel &= ~XSCALE2_COUNT2_EVT_MASK; | 697 | evtsel &= ~XSCALE2_COUNT2_EVT_MASK; |
689 | evtsel |= XSCALE_PERFCTR_UNUSED << XSCALE2_COUNT2_EVT_SHFT; | 698 | evtsel |= XSCALE_PERFCTR_UNUSED << XSCALE2_COUNT2_EVT_SHFT; |
699 | of_flags = XSCALE2_COUNT2_OVERFLOW; | ||
690 | break; | 700 | break; |
691 | case XSCALE_COUNTER3: | 701 | case XSCALE_COUNTER3: |
692 | ien &= ~XSCALE2_COUNT3_INT_EN; | 702 | ien &= ~XSCALE2_COUNT3_INT_EN; |
693 | evtsel &= ~XSCALE2_COUNT3_EVT_MASK; | 703 | evtsel &= ~XSCALE2_COUNT3_EVT_MASK; |
694 | evtsel |= XSCALE_PERFCTR_UNUSED << XSCALE2_COUNT3_EVT_SHFT; | 704 | evtsel |= XSCALE_PERFCTR_UNUSED << XSCALE2_COUNT3_EVT_SHFT; |
705 | of_flags = XSCALE2_COUNT3_OVERFLOW; | ||
695 | break; | 706 | break; |
696 | default: | 707 | default: |
697 | WARN_ONCE(1, "invalid counter number (%d)\n", idx); | 708 | WARN_ONCE(1, "invalid counter number (%d)\n", idx); |
@@ -701,6 +712,7 @@ xscale2pmu_disable_event(struct hw_perf_event *hwc, int idx) | |||
701 | raw_spin_lock_irqsave(&events->pmu_lock, flags); | 712 | raw_spin_lock_irqsave(&events->pmu_lock, flags); |
702 | xscale2pmu_write_event_select(evtsel); | 713 | xscale2pmu_write_event_select(evtsel); |
703 | xscale2pmu_write_int_enable(ien); | 714 | xscale2pmu_write_int_enable(ien); |
715 | xscale2pmu_write_overflow_flags(of_flags); | ||
704 | raw_spin_unlock_irqrestore(&events->pmu_lock, flags); | 716 | raw_spin_unlock_irqrestore(&events->pmu_lock, flags); |
705 | } | 717 | } |
706 | 718 | ||
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c index b7582dd10dc3..96e2adcd5a84 100644 --- a/arch/arm/mach-at91/at91sam9g45_devices.c +++ b/arch/arm/mach-at91/at91sam9g45_devices.c | |||
@@ -38,10 +38,6 @@ | |||
38 | #if defined(CONFIG_AT_HDMAC) || defined(CONFIG_AT_HDMAC_MODULE) | 38 | #if defined(CONFIG_AT_HDMAC) || defined(CONFIG_AT_HDMAC_MODULE) |
39 | static u64 hdmac_dmamask = DMA_BIT_MASK(32); | 39 | static u64 hdmac_dmamask = DMA_BIT_MASK(32); |
40 | 40 | ||
41 | static struct at_dma_platform_data atdma_pdata = { | ||
42 | .nr_channels = 8, | ||
43 | }; | ||
44 | |||
45 | static struct resource hdmac_resources[] = { | 41 | static struct resource hdmac_resources[] = { |
46 | [0] = { | 42 | [0] = { |
47 | .start = AT91SAM9G45_BASE_DMA, | 43 | .start = AT91SAM9G45_BASE_DMA, |
@@ -56,12 +52,11 @@ static struct resource hdmac_resources[] = { | |||
56 | }; | 52 | }; |
57 | 53 | ||
58 | static struct platform_device at_hdmac_device = { | 54 | static struct platform_device at_hdmac_device = { |
59 | .name = "at_hdmac", | 55 | .name = "at91sam9g45_dma", |
60 | .id = -1, | 56 | .id = -1, |
61 | .dev = { | 57 | .dev = { |
62 | .dma_mask = &hdmac_dmamask, | 58 | .dma_mask = &hdmac_dmamask, |
63 | .coherent_dma_mask = DMA_BIT_MASK(32), | 59 | .coherent_dma_mask = DMA_BIT_MASK(32), |
64 | .platform_data = &atdma_pdata, | ||
65 | }, | 60 | }, |
66 | .resource = hdmac_resources, | 61 | .resource = hdmac_resources, |
67 | .num_resources = ARRAY_SIZE(hdmac_resources), | 62 | .num_resources = ARRAY_SIZE(hdmac_resources), |
@@ -69,9 +64,15 @@ static struct platform_device at_hdmac_device = { | |||
69 | 64 | ||
70 | void __init at91_add_device_hdmac(void) | 65 | void __init at91_add_device_hdmac(void) |
71 | { | 66 | { |
72 | dma_cap_set(DMA_MEMCPY, atdma_pdata.cap_mask); | 67 | #if defined(CONFIG_OF) |
73 | dma_cap_set(DMA_SLAVE, atdma_pdata.cap_mask); | 68 | struct device_node *of_node = |
74 | platform_device_register(&at_hdmac_device); | 69 | of_find_node_by_name(NULL, "dma-controller"); |
70 | |||
71 | if (of_node) | ||
72 | of_node_put(of_node); | ||
73 | else | ||
74 | #endif | ||
75 | platform_device_register(&at_hdmac_device); | ||
75 | } | 76 | } |
76 | #else | 77 | #else |
77 | void __init at91_add_device_hdmac(void) {} | 78 | void __init at91_add_device_hdmac(void) {} |
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c index 61908dce9784..9be71c11d0f0 100644 --- a/arch/arm/mach-at91/at91sam9rl_devices.c +++ b/arch/arm/mach-at91/at91sam9rl_devices.c | |||
@@ -33,10 +33,6 @@ | |||
33 | #if defined(CONFIG_AT_HDMAC) || defined(CONFIG_AT_HDMAC_MODULE) | 33 | #if defined(CONFIG_AT_HDMAC) || defined(CONFIG_AT_HDMAC_MODULE) |
34 | static u64 hdmac_dmamask = DMA_BIT_MASK(32); | 34 | static u64 hdmac_dmamask = DMA_BIT_MASK(32); |
35 | 35 | ||
36 | static struct at_dma_platform_data atdma_pdata = { | ||
37 | .nr_channels = 2, | ||
38 | }; | ||
39 | |||
40 | static struct resource hdmac_resources[] = { | 36 | static struct resource hdmac_resources[] = { |
41 | [0] = { | 37 | [0] = { |
42 | .start = AT91SAM9RL_BASE_DMA, | 38 | .start = AT91SAM9RL_BASE_DMA, |
@@ -51,12 +47,11 @@ static struct resource hdmac_resources[] = { | |||
51 | }; | 47 | }; |
52 | 48 | ||
53 | static struct platform_device at_hdmac_device = { | 49 | static struct platform_device at_hdmac_device = { |
54 | .name = "at_hdmac", | 50 | .name = "at91sam9rl_dma", |
55 | .id = -1, | 51 | .id = -1, |
56 | .dev = { | 52 | .dev = { |
57 | .dma_mask = &hdmac_dmamask, | 53 | .dma_mask = &hdmac_dmamask, |
58 | .coherent_dma_mask = DMA_BIT_MASK(32), | 54 | .coherent_dma_mask = DMA_BIT_MASK(32), |
59 | .platform_data = &atdma_pdata, | ||
60 | }, | 55 | }, |
61 | .resource = hdmac_resources, | 56 | .resource = hdmac_resources, |
62 | .num_resources = ARRAY_SIZE(hdmac_resources), | 57 | .num_resources = ARRAY_SIZE(hdmac_resources), |
@@ -64,7 +59,6 @@ static struct platform_device at_hdmac_device = { | |||
64 | 59 | ||
65 | void __init at91_add_device_hdmac(void) | 60 | void __init at91_add_device_hdmac(void) |
66 | { | 61 | { |
67 | dma_cap_set(DMA_MEMCPY, atdma_pdata.cap_mask); | ||
68 | platform_device_register(&at_hdmac_device); | 62 | platform_device_register(&at_hdmac_device); |
69 | } | 63 | } |
70 | #else | 64 | #else |
diff --git a/arch/arm/mach-ep93xx/Makefile b/arch/arm/mach-ep93xx/Makefile index 574209d9e246..0dc51f9462de 100644 --- a/arch/arm/mach-ep93xx/Makefile +++ b/arch/arm/mach-ep93xx/Makefile | |||
@@ -8,6 +8,9 @@ obj- := | |||
8 | 8 | ||
9 | obj-$(CONFIG_EP93XX_DMA) += dma.o | 9 | obj-$(CONFIG_EP93XX_DMA) += dma.o |
10 | 10 | ||
11 | obj-$(CONFIG_CRUNCH) += crunch.o crunch-bits.o | ||
12 | AFLAGS_crunch-bits.o := -Wa,-mcpu=ep9312 | ||
13 | |||
11 | obj-$(CONFIG_MACH_ADSSPHERE) += adssphere.o | 14 | obj-$(CONFIG_MACH_ADSSPHERE) += adssphere.o |
12 | obj-$(CONFIG_MACH_EDB93XX) += edb93xx.o | 15 | obj-$(CONFIG_MACH_EDB93XX) += edb93xx.o |
13 | obj-$(CONFIG_MACH_GESBC9312) += gesbc9312.o | 16 | obj-$(CONFIG_MACH_GESBC9312) += gesbc9312.o |
diff --git a/arch/arm/mach-ep93xx/adssphere.c b/arch/arm/mach-ep93xx/adssphere.c index 681e939407d4..2d45947a3034 100644 --- a/arch/arm/mach-ep93xx/adssphere.c +++ b/arch/arm/mach-ep93xx/adssphere.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <asm/mach-types.h> | 20 | #include <asm/mach-types.h> |
21 | #include <asm/mach/arch.h> | 21 | #include <asm/mach/arch.h> |
22 | 22 | ||
23 | #include "soc.h" | ||
23 | 24 | ||
24 | static struct ep93xx_eth_data __initdata adssphere_eth_data = { | 25 | static struct ep93xx_eth_data __initdata adssphere_eth_data = { |
25 | .phy_id = 1, | 26 | .phy_id = 1, |
diff --git a/arch/arm/mach-ep93xx/clock.c b/arch/arm/mach-ep93xx/clock.c index ca4de7105097..c95dbce2468e 100644 --- a/arch/arm/mach-ep93xx/clock.c +++ b/arch/arm/mach-ep93xx/clock.c | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | #include <asm/div64.h> | 26 | #include <asm/div64.h> |
27 | 27 | ||
28 | #include "soc.h" | ||
28 | 29 | ||
29 | struct clk { | 30 | struct clk { |
30 | struct clk *parent; | 31 | struct clk *parent; |
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index 903edb02fe4f..8d2589588713 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c | |||
@@ -46,6 +46,7 @@ | |||
46 | 46 | ||
47 | #include <asm/hardware/vic.h> | 47 | #include <asm/hardware/vic.h> |
48 | 48 | ||
49 | #include "soc.h" | ||
49 | 50 | ||
50 | /************************************************************************* | 51 | /************************************************************************* |
51 | * Static I/O mappings that are needed for all EP93xx platforms | 52 | * Static I/O mappings that are needed for all EP93xx platforms |
@@ -204,7 +205,6 @@ void ep93xx_syscon_swlocked_write(unsigned int val, void __iomem *reg) | |||
204 | 205 | ||
205 | spin_unlock_irqrestore(&syscon_swlock, flags); | 206 | spin_unlock_irqrestore(&syscon_swlock, flags); |
206 | } | 207 | } |
207 | EXPORT_SYMBOL(ep93xx_syscon_swlocked_write); | ||
208 | 208 | ||
209 | void ep93xx_devcfg_set_clear(unsigned int set_bits, unsigned int clear_bits) | 209 | void ep93xx_devcfg_set_clear(unsigned int set_bits, unsigned int clear_bits) |
210 | { | 210 | { |
@@ -221,7 +221,6 @@ void ep93xx_devcfg_set_clear(unsigned int set_bits, unsigned int clear_bits) | |||
221 | 221 | ||
222 | spin_unlock_irqrestore(&syscon_swlock, flags); | 222 | spin_unlock_irqrestore(&syscon_swlock, flags); |
223 | } | 223 | } |
224 | EXPORT_SYMBOL(ep93xx_devcfg_set_clear); | ||
225 | 224 | ||
226 | /** | 225 | /** |
227 | * ep93xx_chip_revision() - returns the EP93xx chip revision | 226 | * ep93xx_chip_revision() - returns the EP93xx chip revision |
@@ -648,9 +647,19 @@ static struct platform_device ep93xx_fb_device = { | |||
648 | .resource = ep93xx_fb_resource, | 647 | .resource = ep93xx_fb_resource, |
649 | }; | 648 | }; |
650 | 649 | ||
650 | /* The backlight use a single register in the framebuffer's register space */ | ||
651 | #define EP93XX_RASTER_REG_BRIGHTNESS 0x20 | ||
652 | |||
653 | static struct resource ep93xx_bl_resources[] = { | ||
654 | DEFINE_RES_MEM(EP93XX_RASTER_PHYS_BASE + | ||
655 | EP93XX_RASTER_REG_BRIGHTNESS, 0x04), | ||
656 | }; | ||
657 | |||
651 | static struct platform_device ep93xx_bl_device = { | 658 | static struct platform_device ep93xx_bl_device = { |
652 | .name = "ep93xx-bl", | 659 | .name = "ep93xx-bl", |
653 | .id = -1, | 660 | .id = -1, |
661 | .num_resources = ARRAY_SIZE(ep93xx_bl_resources), | ||
662 | .resource = ep93xx_bl_resources, | ||
654 | }; | 663 | }; |
655 | 664 | ||
656 | /** | 665 | /** |
@@ -783,23 +792,12 @@ void __init ep93xx_register_i2s(void) | |||
783 | #define EP93XX_I2SCLKDIV_MASK (EP93XX_SYSCON_I2SCLKDIV_ORIDE | \ | 792 | #define EP93XX_I2SCLKDIV_MASK (EP93XX_SYSCON_I2SCLKDIV_ORIDE | \ |
784 | EP93XX_SYSCON_I2SCLKDIV_SPOL) | 793 | EP93XX_SYSCON_I2SCLKDIV_SPOL) |
785 | 794 | ||
786 | int ep93xx_i2s_acquire(unsigned i2s_pins, unsigned i2s_config) | 795 | int ep93xx_i2s_acquire(void) |
787 | { | 796 | { |
788 | unsigned val; | 797 | unsigned val; |
789 | 798 | ||
790 | /* Sanity check */ | 799 | ep93xx_devcfg_set_clear(EP93XX_SYSCON_DEVCFG_I2SONAC97, |
791 | if (i2s_pins & ~EP93XX_SYSCON_DEVCFG_I2S_MASK) | 800 | EP93XX_SYSCON_DEVCFG_I2S_MASK); |
792 | return -EINVAL; | ||
793 | if (i2s_config & ~EP93XX_I2SCLKDIV_MASK) | ||
794 | return -EINVAL; | ||
795 | |||
796 | /* Must have only one of I2SONSSP/I2SONAC97 set */ | ||
797 | if ((i2s_pins & EP93XX_SYSCON_DEVCFG_I2SONSSP) == | ||
798 | (i2s_pins & EP93XX_SYSCON_DEVCFG_I2SONAC97)) | ||
799 | return -EINVAL; | ||
800 | |||
801 | ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_I2S_MASK); | ||
802 | ep93xx_devcfg_set_bits(i2s_pins); | ||
803 | 801 | ||
804 | /* | 802 | /* |
805 | * This is potentially racy with the clock api for i2s_mclk, sclk and | 803 | * This is potentially racy with the clock api for i2s_mclk, sclk and |
@@ -809,7 +807,7 @@ int ep93xx_i2s_acquire(unsigned i2s_pins, unsigned i2s_config) | |||
809 | */ | 807 | */ |
810 | val = __raw_readl(EP93XX_SYSCON_I2SCLKDIV); | 808 | val = __raw_readl(EP93XX_SYSCON_I2SCLKDIV); |
811 | val &= ~EP93XX_I2SCLKDIV_MASK; | 809 | val &= ~EP93XX_I2SCLKDIV_MASK; |
812 | val |= i2s_config; | 810 | val |= EP93XX_SYSCON_I2SCLKDIV_ORIDE | EP93XX_SYSCON_I2SCLKDIV_SPOL; |
813 | ep93xx_syscon_swlocked_write(val, EP93XX_SYSCON_I2SCLKDIV); | 811 | ep93xx_syscon_swlocked_write(val, EP93XX_SYSCON_I2SCLKDIV); |
814 | 812 | ||
815 | return 0; | 813 | return 0; |
@@ -856,11 +854,32 @@ void __init ep93xx_register_ac97(void) | |||
856 | platform_device_register(&ep93xx_pcm_device); | 854 | platform_device_register(&ep93xx_pcm_device); |
857 | } | 855 | } |
858 | 856 | ||
857 | /************************************************************************* | ||
858 | * EP93xx Watchdog | ||
859 | *************************************************************************/ | ||
860 | static struct resource ep93xx_wdt_resources[] = { | ||
861 | DEFINE_RES_MEM(EP93XX_WATCHDOG_PHYS_BASE, 0x08), | ||
862 | }; | ||
863 | |||
864 | static struct platform_device ep93xx_wdt_device = { | ||
865 | .name = "ep93xx-wdt", | ||
866 | .id = -1, | ||
867 | .num_resources = ARRAY_SIZE(ep93xx_wdt_resources), | ||
868 | .resource = ep93xx_wdt_resources, | ||
869 | }; | ||
870 | |||
859 | void __init ep93xx_init_devices(void) | 871 | void __init ep93xx_init_devices(void) |
860 | { | 872 | { |
861 | /* Disallow access to MaverickCrunch initially */ | 873 | /* Disallow access to MaverickCrunch initially */ |
862 | ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_CPENA); | 874 | ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_CPENA); |
863 | 875 | ||
876 | /* Default all ports to GPIO */ | ||
877 | ep93xx_devcfg_set_bits(EP93XX_SYSCON_DEVCFG_KEYS | | ||
878 | EP93XX_SYSCON_DEVCFG_GONK | | ||
879 | EP93XX_SYSCON_DEVCFG_EONIDE | | ||
880 | EP93XX_SYSCON_DEVCFG_GONIDE | | ||
881 | EP93XX_SYSCON_DEVCFG_HONIDE); | ||
882 | |||
864 | /* Get the GPIO working early, other devices need it */ | 883 | /* Get the GPIO working early, other devices need it */ |
865 | platform_device_register(&ep93xx_gpio_device); | 884 | platform_device_register(&ep93xx_gpio_device); |
866 | 885 | ||
@@ -871,6 +890,7 @@ void __init ep93xx_init_devices(void) | |||
871 | platform_device_register(&ep93xx_rtc_device); | 890 | platform_device_register(&ep93xx_rtc_device); |
872 | platform_device_register(&ep93xx_ohci_device); | 891 | platform_device_register(&ep93xx_ohci_device); |
873 | platform_device_register(&ep93xx_leds); | 892 | platform_device_register(&ep93xx_leds); |
893 | platform_device_register(&ep93xx_wdt_device); | ||
874 | } | 894 | } |
875 | 895 | ||
876 | void ep93xx_restart(char mode, const char *cmd) | 896 | void ep93xx_restart(char mode, const char *cmd) |
diff --git a/arch/arm/kernel/crunch-bits.S b/arch/arm/mach-ep93xx/crunch-bits.S index 0ec9bb48fab9..0ec9bb48fab9 100644 --- a/arch/arm/kernel/crunch-bits.S +++ b/arch/arm/mach-ep93xx/crunch-bits.S | |||
diff --git a/arch/arm/kernel/crunch.c b/arch/arm/mach-ep93xx/crunch.c index 25ef223ba7f3..74753e2df603 100644 --- a/arch/arm/kernel/crunch.c +++ b/arch/arm/mach-ep93xx/crunch.c | |||
@@ -16,9 +16,11 @@ | |||
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/io.h> | 18 | #include <linux/io.h> |
19 | #include <mach/ep93xx-regs.h> | 19 | |
20 | #include <asm/thread_notify.h> | 20 | #include <asm/thread_notify.h> |
21 | 21 | ||
22 | #include "soc.h" | ||
23 | |||
22 | struct crunch_state *crunch_owner; | 24 | struct crunch_state *crunch_owner; |
23 | 25 | ||
24 | void crunch_task_release(struct thread_info *thread) | 26 | void crunch_task_release(struct thread_info *thread) |
diff --git a/arch/arm/mach-ep93xx/dma.c b/arch/arm/mach-ep93xx/dma.c index 5a2570881255..16976d7bdc8a 100644 --- a/arch/arm/mach-ep93xx/dma.c +++ b/arch/arm/mach-ep93xx/dma.c | |||
@@ -28,6 +28,8 @@ | |||
28 | #include <mach/dma.h> | 28 | #include <mach/dma.h> |
29 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
30 | 30 | ||
31 | #include "soc.h" | ||
32 | |||
31 | #define DMA_CHANNEL(_name, _base, _irq) \ | 33 | #define DMA_CHANNEL(_name, _base, _irq) \ |
32 | { .name = (_name), .base = (_base), .irq = (_irq) } | 34 | { .name = (_name), .base = (_base), .irq = (_irq) } |
33 | 35 | ||
diff --git a/arch/arm/mach-ep93xx/edb93xx.c b/arch/arm/mach-ep93xx/edb93xx.c index d115653edca3..da9047d726f0 100644 --- a/arch/arm/mach-ep93xx/edb93xx.c +++ b/arch/arm/mach-ep93xx/edb93xx.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <asm/mach-types.h> | 43 | #include <asm/mach-types.h> |
44 | #include <asm/mach/arch.h> | 44 | #include <asm/mach/arch.h> |
45 | 45 | ||
46 | #include "soc.h" | ||
46 | 47 | ||
47 | static void __init edb93xx_register_flash(void) | 48 | static void __init edb93xx_register_flash(void) |
48 | { | 49 | { |
diff --git a/arch/arm/mach-ep93xx/gesbc9312.c b/arch/arm/mach-ep93xx/gesbc9312.c index af46970dc58e..fcdffbe49dcc 100644 --- a/arch/arm/mach-ep93xx/gesbc9312.c +++ b/arch/arm/mach-ep93xx/gesbc9312.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <asm/mach-types.h> | 20 | #include <asm/mach-types.h> |
21 | #include <asm/mach/arch.h> | 21 | #include <asm/mach/arch.h> |
22 | 22 | ||
23 | #include "soc.h" | ||
23 | 24 | ||
24 | static struct ep93xx_eth_data __initdata gesbc9312_eth_data = { | 25 | static struct ep93xx_eth_data __initdata gesbc9312_eth_data = { |
25 | .phy_id = 1, | 26 | .phy_id = 1, |
diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h index c4a7b84ef06d..c64d74246602 100644 --- a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h +++ b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h | |||
@@ -6,40 +6,6 @@ | |||
6 | #define __ASM_ARCH_EP93XX_REGS_H | 6 | #define __ASM_ARCH_EP93XX_REGS_H |
7 | 7 | ||
8 | /* | 8 | /* |
9 | * EP93xx Physical Memory Map: | ||
10 | * | ||
11 | * The ASDO pin is sampled at system reset to select a synchronous or | ||
12 | * asynchronous boot configuration. When ASDO is "1" (i.e. pulled-up) | ||
13 | * the synchronous boot mode is selected. When ASDO is "0" (i.e | ||
14 | * pulled-down) the asynchronous boot mode is selected. | ||
15 | * | ||
16 | * In synchronous boot mode nSDCE3 is decoded starting at physical address | ||
17 | * 0x00000000 and nCS0 is decoded starting at 0xf0000000. For asynchronous | ||
18 | * boot mode they are swapped with nCS0 decoded at 0x00000000 ann nSDCE3 | ||
19 | * decoded at 0xf0000000. | ||
20 | * | ||
21 | * There is known errata for the EP93xx dealing with External Memory | ||
22 | * Configurations. Please refer to "AN273: EP93xx Silicon Rev E Design | ||
23 | * Guidelines" for more information. This document can be found at: | ||
24 | * | ||
25 | * http://www.cirrus.com/en/pubs/appNote/AN273REV4.pdf | ||
26 | */ | ||
27 | |||
28 | #define EP93XX_CS0_PHYS_BASE_ASYNC 0x00000000 /* ASDO Pin = 0 */ | ||
29 | #define EP93XX_SDCE3_PHYS_BASE_SYNC 0x00000000 /* ASDO Pin = 1 */ | ||
30 | #define EP93XX_CS1_PHYS_BASE 0x10000000 | ||
31 | #define EP93XX_CS2_PHYS_BASE 0x20000000 | ||
32 | #define EP93XX_CS3_PHYS_BASE 0x30000000 | ||
33 | #define EP93XX_PCMCIA_PHYS_BASE 0x40000000 | ||
34 | #define EP93XX_CS6_PHYS_BASE 0x60000000 | ||
35 | #define EP93XX_CS7_PHYS_BASE 0x70000000 | ||
36 | #define EP93XX_SDCE0_PHYS_BASE 0xc0000000 | ||
37 | #define EP93XX_SDCE1_PHYS_BASE 0xd0000000 | ||
38 | #define EP93XX_SDCE2_PHYS_BASE 0xe0000000 | ||
39 | #define EP93XX_SDCE3_PHYS_BASE_ASYNC 0xf0000000 /* ASDO Pin = 0 */ | ||
40 | #define EP93XX_CS0_PHYS_BASE_SYNC 0xf0000000 /* ASDO Pin = 1 */ | ||
41 | |||
42 | /* | ||
43 | * EP93xx linux memory map: | 9 | * EP93xx linux memory map: |
44 | * | 10 | * |
45 | * virt phys size | 11 | * virt phys size |
@@ -62,58 +28,7 @@ | |||
62 | #define EP93XX_APB_PHYS(x) (EP93XX_APB_PHYS_BASE + (x)) | 28 | #define EP93XX_APB_PHYS(x) (EP93XX_APB_PHYS_BASE + (x)) |
63 | #define EP93XX_APB_IOMEM(x) IOMEM(EP93XX_APB_VIRT_BASE + (x)) | 29 | #define EP93XX_APB_IOMEM(x) IOMEM(EP93XX_APB_VIRT_BASE + (x)) |
64 | 30 | ||
65 | 31 | /* APB UARTs */ | |
66 | /* AHB peripherals */ | ||
67 | #define EP93XX_DMA_BASE EP93XX_AHB_IOMEM(0x00000000) | ||
68 | |||
69 | #define EP93XX_ETHERNET_PHYS_BASE EP93XX_AHB_PHYS(0x00010000) | ||
70 | #define EP93XX_ETHERNET_BASE EP93XX_AHB_IOMEM(0x00010000) | ||
71 | |||
72 | #define EP93XX_USB_PHYS_BASE EP93XX_AHB_PHYS(0x00020000) | ||
73 | #define EP93XX_USB_BASE EP93XX_AHB_IOMEM(0x00020000) | ||
74 | |||
75 | #define EP93XX_RASTER_PHYS_BASE EP93XX_AHB_PHYS(0x00030000) | ||
76 | #define EP93XX_RASTER_BASE EP93XX_AHB_IOMEM(0x00030000) | ||
77 | |||
78 | #define EP93XX_GRAPHICS_ACCEL_BASE EP93XX_AHB_IOMEM(0x00040000) | ||
79 | |||
80 | #define EP93XX_SDRAM_CONTROLLER_BASE EP93XX_AHB_IOMEM(0x00060000) | ||
81 | |||
82 | #define EP93XX_PCMCIA_CONTROLLER_BASE EP93XX_AHB_IOMEM(0x00080000) | ||
83 | |||
84 | #define EP93XX_BOOT_ROM_BASE EP93XX_AHB_IOMEM(0x00090000) | ||
85 | |||
86 | #define EP93XX_IDE_BASE EP93XX_AHB_IOMEM(0x000a0000) | ||
87 | |||
88 | #define EP93XX_VIC1_BASE EP93XX_AHB_IOMEM(0x000b0000) | ||
89 | |||
90 | #define EP93XX_VIC2_BASE EP93XX_AHB_IOMEM(0x000c0000) | ||
91 | |||
92 | |||
93 | /* APB peripherals */ | ||
94 | #define EP93XX_TIMER_BASE EP93XX_APB_IOMEM(0x00010000) | ||
95 | |||
96 | #define EP93XX_I2S_PHYS_BASE EP93XX_APB_PHYS(0x00020000) | ||
97 | #define EP93XX_I2S_BASE EP93XX_APB_IOMEM(0x00020000) | ||
98 | |||
99 | #define EP93XX_SECURITY_BASE EP93XX_APB_IOMEM(0x00030000) | ||
100 | |||
101 | #define EP93XX_GPIO_PHYS_BASE EP93XX_APB_PHYS(0x00040000) | ||
102 | #define EP93XX_GPIO_BASE EP93XX_APB_IOMEM(0x00040000) | ||
103 | #define EP93XX_GPIO_REG(x) (EP93XX_GPIO_BASE + (x)) | ||
104 | #define EP93XX_GPIO_F_INT_STATUS EP93XX_GPIO_REG(0x5c) | ||
105 | #define EP93XX_GPIO_A_INT_STATUS EP93XX_GPIO_REG(0xa0) | ||
106 | #define EP93XX_GPIO_B_INT_STATUS EP93XX_GPIO_REG(0xbc) | ||
107 | #define EP93XX_GPIO_EEDRIVE EP93XX_GPIO_REG(0xc8) | ||
108 | |||
109 | #define EP93XX_AAC_PHYS_BASE EP93XX_APB_PHYS(0x00080000) | ||
110 | #define EP93XX_AAC_BASE EP93XX_APB_IOMEM(0x00080000) | ||
111 | |||
112 | #define EP93XX_SPI_PHYS_BASE EP93XX_APB_PHYS(0x000a0000) | ||
113 | #define EP93XX_SPI_BASE EP93XX_APB_IOMEM(0x000a0000) | ||
114 | |||
115 | #define EP93XX_IRDA_BASE EP93XX_APB_IOMEM(0x000b0000) | ||
116 | |||
117 | #define EP93XX_UART1_PHYS_BASE EP93XX_APB_PHYS(0x000c0000) | 32 | #define EP93XX_UART1_PHYS_BASE EP93XX_APB_PHYS(0x000c0000) |
118 | #define EP93XX_UART1_BASE EP93XX_APB_IOMEM(0x000c0000) | 33 | #define EP93XX_UART1_BASE EP93XX_APB_IOMEM(0x000c0000) |
119 | 34 | ||
@@ -123,108 +38,4 @@ | |||
123 | #define EP93XX_UART3_PHYS_BASE EP93XX_APB_PHYS(0x000e0000) | 38 | #define EP93XX_UART3_PHYS_BASE EP93XX_APB_PHYS(0x000e0000) |
124 | #define EP93XX_UART3_BASE EP93XX_APB_IOMEM(0x000e0000) | 39 | #define EP93XX_UART3_BASE EP93XX_APB_IOMEM(0x000e0000) |
125 | 40 | ||
126 | #define EP93XX_KEY_MATRIX_PHYS_BASE EP93XX_APB_PHYS(0x000f0000) | ||
127 | #define EP93XX_KEY_MATRIX_BASE EP93XX_APB_IOMEM(0x000f0000) | ||
128 | |||
129 | #define EP93XX_ADC_BASE EP93XX_APB_IOMEM(0x00100000) | ||
130 | #define EP93XX_TOUCHSCREEN_BASE EP93XX_APB_IOMEM(0x00100000) | ||
131 | |||
132 | #define EP93XX_PWM_PHYS_BASE EP93XX_APB_PHYS(0x00110000) | ||
133 | #define EP93XX_PWM_BASE EP93XX_APB_IOMEM(0x00110000) | ||
134 | |||
135 | #define EP93XX_RTC_PHYS_BASE EP93XX_APB_PHYS(0x00120000) | ||
136 | #define EP93XX_RTC_BASE EP93XX_APB_IOMEM(0x00120000) | ||
137 | |||
138 | #define EP93XX_SYSCON_BASE EP93XX_APB_IOMEM(0x00130000) | ||
139 | #define EP93XX_SYSCON_REG(x) (EP93XX_SYSCON_BASE + (x)) | ||
140 | #define EP93XX_SYSCON_POWER_STATE EP93XX_SYSCON_REG(0x00) | ||
141 | #define EP93XX_SYSCON_PWRCNT EP93XX_SYSCON_REG(0x04) | ||
142 | #define EP93XX_SYSCON_PWRCNT_FIR_EN (1<<31) | ||
143 | #define EP93XX_SYSCON_PWRCNT_UARTBAUD (1<<29) | ||
144 | #define EP93XX_SYSCON_PWRCNT_USH_EN (1<<28) | ||
145 | #define EP93XX_SYSCON_PWRCNT_DMA_M2M1 (1<<27) | ||
146 | #define EP93XX_SYSCON_PWRCNT_DMA_M2M0 (1<<26) | ||
147 | #define EP93XX_SYSCON_PWRCNT_DMA_M2P8 (1<<25) | ||
148 | #define EP93XX_SYSCON_PWRCNT_DMA_M2P9 (1<<24) | ||
149 | #define EP93XX_SYSCON_PWRCNT_DMA_M2P6 (1<<23) | ||
150 | #define EP93XX_SYSCON_PWRCNT_DMA_M2P7 (1<<22) | ||
151 | #define EP93XX_SYSCON_PWRCNT_DMA_M2P4 (1<<21) | ||
152 | #define EP93XX_SYSCON_PWRCNT_DMA_M2P5 (1<<20) | ||
153 | #define EP93XX_SYSCON_PWRCNT_DMA_M2P2 (1<<19) | ||
154 | #define EP93XX_SYSCON_PWRCNT_DMA_M2P3 (1<<18) | ||
155 | #define EP93XX_SYSCON_PWRCNT_DMA_M2P0 (1<<17) | ||
156 | #define EP93XX_SYSCON_PWRCNT_DMA_M2P1 (1<<16) | ||
157 | #define EP93XX_SYSCON_HALT EP93XX_SYSCON_REG(0x08) | ||
158 | #define EP93XX_SYSCON_STANDBY EP93XX_SYSCON_REG(0x0c) | ||
159 | #define EP93XX_SYSCON_CLKSET1 EP93XX_SYSCON_REG(0x20) | ||
160 | #define EP93XX_SYSCON_CLKSET1_NBYP1 (1<<23) | ||
161 | #define EP93XX_SYSCON_CLKSET2 EP93XX_SYSCON_REG(0x24) | ||
162 | #define EP93XX_SYSCON_CLKSET2_NBYP2 (1<<19) | ||
163 | #define EP93XX_SYSCON_CLKSET2_PLL2_EN (1<<18) | ||
164 | #define EP93XX_SYSCON_DEVCFG EP93XX_SYSCON_REG(0x80) | ||
165 | #define EP93XX_SYSCON_DEVCFG_SWRST (1<<31) | ||
166 | #define EP93XX_SYSCON_DEVCFG_D1ONG (1<<30) | ||
167 | #define EP93XX_SYSCON_DEVCFG_D0ONG (1<<29) | ||
168 | #define EP93XX_SYSCON_DEVCFG_IONU2 (1<<28) | ||
169 | #define EP93XX_SYSCON_DEVCFG_GONK (1<<27) | ||
170 | #define EP93XX_SYSCON_DEVCFG_TONG (1<<26) | ||
171 | #define EP93XX_SYSCON_DEVCFG_MONG (1<<25) | ||
172 | #define EP93XX_SYSCON_DEVCFG_U3EN (1<<24) | ||
173 | #define EP93XX_SYSCON_DEVCFG_CPENA (1<<23) | ||
174 | #define EP93XX_SYSCON_DEVCFG_A2ONG (1<<22) | ||
175 | #define EP93XX_SYSCON_DEVCFG_A1ONG (1<<21) | ||
176 | #define EP93XX_SYSCON_DEVCFG_U2EN (1<<20) | ||
177 | #define EP93XX_SYSCON_DEVCFG_EXVC (1<<19) | ||
178 | #define EP93XX_SYSCON_DEVCFG_U1EN (1<<18) | ||
179 | #define EP93XX_SYSCON_DEVCFG_TIN (1<<17) | ||
180 | #define EP93XX_SYSCON_DEVCFG_HC3IN (1<<15) | ||
181 | #define EP93XX_SYSCON_DEVCFG_HC3EN (1<<14) | ||
182 | #define EP93XX_SYSCON_DEVCFG_HC1IN (1<<13) | ||
183 | #define EP93XX_SYSCON_DEVCFG_HC1EN (1<<12) | ||
184 | #define EP93XX_SYSCON_DEVCFG_HONIDE (1<<11) | ||
185 | #define EP93XX_SYSCON_DEVCFG_GONIDE (1<<10) | ||
186 | #define EP93XX_SYSCON_DEVCFG_PONG (1<<9) | ||
187 | #define EP93XX_SYSCON_DEVCFG_EONIDE (1<<8) | ||
188 | #define EP93XX_SYSCON_DEVCFG_I2SONSSP (1<<7) | ||
189 | #define EP93XX_SYSCON_DEVCFG_I2SONAC97 (1<<6) | ||
190 | #define EP93XX_SYSCON_DEVCFG_RASONP3 (1<<4) | ||
191 | #define EP93XX_SYSCON_DEVCFG_RAS (1<<3) | ||
192 | #define EP93XX_SYSCON_DEVCFG_ADCPD (1<<2) | ||
193 | #define EP93XX_SYSCON_DEVCFG_KEYS (1<<1) | ||
194 | #define EP93XX_SYSCON_DEVCFG_SHENA (1<<0) | ||
195 | #define EP93XX_SYSCON_VIDCLKDIV EP93XX_SYSCON_REG(0x84) | ||
196 | #define EP93XX_SYSCON_CLKDIV_ENABLE (1<<15) | ||
197 | #define EP93XX_SYSCON_CLKDIV_ESEL (1<<14) | ||
198 | #define EP93XX_SYSCON_CLKDIV_PSEL (1<<13) | ||
199 | #define EP93XX_SYSCON_CLKDIV_PDIV_SHIFT 8 | ||
200 | #define EP93XX_SYSCON_I2SCLKDIV EP93XX_SYSCON_REG(0x8c) | ||
201 | #define EP93XX_SYSCON_I2SCLKDIV_SENA (1<<31) | ||
202 | #define EP93XX_SYSCON_I2SCLKDIV_ORIDE (1<<29) | ||
203 | #define EP93XX_SYSCON_I2SCLKDIV_SPOL (1<<19) | ||
204 | #define EP93XX_I2SCLKDIV_SDIV (1 << 16) | ||
205 | #define EP93XX_I2SCLKDIV_LRDIV32 (0 << 17) | ||
206 | #define EP93XX_I2SCLKDIV_LRDIV64 (1 << 17) | ||
207 | #define EP93XX_I2SCLKDIV_LRDIV128 (2 << 17) | ||
208 | #define EP93XX_I2SCLKDIV_LRDIV_MASK (3 << 17) | ||
209 | #define EP93XX_SYSCON_KEYTCHCLKDIV EP93XX_SYSCON_REG(0x90) | ||
210 | #define EP93XX_SYSCON_KEYTCHCLKDIV_TSEN (1<<31) | ||
211 | #define EP93XX_SYSCON_KEYTCHCLKDIV_ADIV (1<<16) | ||
212 | #define EP93XX_SYSCON_KEYTCHCLKDIV_KEN (1<<15) | ||
213 | #define EP93XX_SYSCON_KEYTCHCLKDIV_KDIV (1<<0) | ||
214 | #define EP93XX_SYSCON_SYSCFG EP93XX_SYSCON_REG(0x9c) | ||
215 | #define EP93XX_SYSCON_SYSCFG_REV_MASK (0xf0000000) | ||
216 | #define EP93XX_SYSCON_SYSCFG_REV_SHIFT (28) | ||
217 | #define EP93XX_SYSCON_SYSCFG_SBOOT (1<<8) | ||
218 | #define EP93XX_SYSCON_SYSCFG_LCSN7 (1<<7) | ||
219 | #define EP93XX_SYSCON_SYSCFG_LCSN6 (1<<6) | ||
220 | #define EP93XX_SYSCON_SYSCFG_LASDO (1<<5) | ||
221 | #define EP93XX_SYSCON_SYSCFG_LEEDA (1<<4) | ||
222 | #define EP93XX_SYSCON_SYSCFG_LEECLK (1<<3) | ||
223 | #define EP93XX_SYSCON_SYSCFG_LCSN2 (1<<1) | ||
224 | #define EP93XX_SYSCON_SYSCFG_LCSN1 (1<<0) | ||
225 | #define EP93XX_SYSCON_SWLOCK EP93XX_SYSCON_REG(0xc0) | ||
226 | |||
227 | #define EP93XX_WATCHDOG_BASE EP93XX_APB_IOMEM(0x00140000) | ||
228 | |||
229 | |||
230 | #endif | 41 | #endif |
diff --git a/arch/arm/mach-ep93xx/include/mach/gpio-ep93xx.h b/arch/arm/mach-ep93xx/include/mach/gpio-ep93xx.h index 8aff2ea35877..6d7c571a519f 100644 --- a/arch/arm/mach-ep93xx/include/mach/gpio-ep93xx.h +++ b/arch/arm/mach-ep93xx/include/mach/gpio-ep93xx.h | |||
@@ -3,6 +3,16 @@ | |||
3 | #ifndef __GPIO_EP93XX_H | 3 | #ifndef __GPIO_EP93XX_H |
4 | #define __GPIO_EP93XX_H | 4 | #define __GPIO_EP93XX_H |
5 | 5 | ||
6 | #include <mach/ep93xx-regs.h> | ||
7 | |||
8 | #define EP93XX_GPIO_PHYS_BASE EP93XX_APB_PHYS(0x00040000) | ||
9 | #define EP93XX_GPIO_BASE EP93XX_APB_IOMEM(0x00040000) | ||
10 | #define EP93XX_GPIO_REG(x) (EP93XX_GPIO_BASE + (x)) | ||
11 | #define EP93XX_GPIO_F_INT_STATUS EP93XX_GPIO_REG(0x5c) | ||
12 | #define EP93XX_GPIO_A_INT_STATUS EP93XX_GPIO_REG(0xa0) | ||
13 | #define EP93XX_GPIO_B_INT_STATUS EP93XX_GPIO_REG(0xbc) | ||
14 | #define EP93XX_GPIO_EEDRIVE EP93XX_GPIO_REG(0xc8) | ||
15 | |||
6 | /* GPIO port A. */ | 16 | /* GPIO port A. */ |
7 | #define EP93XX_GPIO_LINE_A(x) ((x) + 0) | 17 | #define EP93XX_GPIO_LINE_A(x) ((x) + 0) |
8 | #define EP93XX_GPIO_LINE_EGPIO0 EP93XX_GPIO_LINE_A(0) | 18 | #define EP93XX_GPIO_LINE_EGPIO0 EP93XX_GPIO_LINE_A(0) |
diff --git a/arch/arm/mach-ep93xx/include/mach/hardware.h b/arch/arm/mach-ep93xx/include/mach/hardware.h index 4df842897eae..efcd47815a91 100644 --- a/arch/arm/mach-ep93xx/include/mach/hardware.h +++ b/arch/arm/mach-ep93xx/include/mach/hardware.h | |||
@@ -5,7 +5,6 @@ | |||
5 | #ifndef __ASM_ARCH_HARDWARE_H | 5 | #ifndef __ASM_ARCH_HARDWARE_H |
6 | #define __ASM_ARCH_HARDWARE_H | 6 | #define __ASM_ARCH_HARDWARE_H |
7 | 7 | ||
8 | #include <mach/ep93xx-regs.h> | ||
9 | #include <mach/platform.h> | 8 | #include <mach/platform.h> |
10 | 9 | ||
11 | /* | 10 | /* |
diff --git a/arch/arm/mach-ep93xx/include/mach/platform.h b/arch/arm/mach-ep93xx/include/mach/platform.h index d4c934931f9d..602bd87fd0ab 100644 --- a/arch/arm/mach-ep93xx/include/mach/platform.h +++ b/arch/arm/mach-ep93xx/include/mach/platform.h | |||
@@ -21,20 +21,6 @@ struct ep93xx_eth_data | |||
21 | void ep93xx_map_io(void); | 21 | void ep93xx_map_io(void); |
22 | void ep93xx_init_irq(void); | 22 | void ep93xx_init_irq(void); |
23 | 23 | ||
24 | /* EP93xx System Controller software locked register write */ | ||
25 | void ep93xx_syscon_swlocked_write(unsigned int val, void __iomem *reg); | ||
26 | void ep93xx_devcfg_set_clear(unsigned int set_bits, unsigned int clear_bits); | ||
27 | |||
28 | static inline void ep93xx_devcfg_set_bits(unsigned int bits) | ||
29 | { | ||
30 | ep93xx_devcfg_set_clear(bits, 0x00); | ||
31 | } | ||
32 | |||
33 | static inline void ep93xx_devcfg_clear_bits(unsigned int bits) | ||
34 | { | ||
35 | ep93xx_devcfg_set_clear(0x00, bits); | ||
36 | } | ||
37 | |||
38 | #define EP93XX_CHIP_REV_D0 3 | 24 | #define EP93XX_CHIP_REV_D0 3 |
39 | #define EP93XX_CHIP_REV_D1 4 | 25 | #define EP93XX_CHIP_REV_D1 4 |
40 | #define EP93XX_CHIP_REV_E0 5 | 26 | #define EP93XX_CHIP_REV_E0 5 |
@@ -59,7 +45,7 @@ void ep93xx_register_keypad(struct ep93xx_keypad_platform_data *data); | |||
59 | int ep93xx_keypad_acquire_gpio(struct platform_device *pdev); | 45 | int ep93xx_keypad_acquire_gpio(struct platform_device *pdev); |
60 | void ep93xx_keypad_release_gpio(struct platform_device *pdev); | 46 | void ep93xx_keypad_release_gpio(struct platform_device *pdev); |
61 | void ep93xx_register_i2s(void); | 47 | void ep93xx_register_i2s(void); |
62 | int ep93xx_i2s_acquire(unsigned i2s_pins, unsigned i2s_config); | 48 | int ep93xx_i2s_acquire(void); |
63 | void ep93xx_i2s_release(void); | 49 | void ep93xx_i2s_release(void); |
64 | void ep93xx_register_ac97(void); | 50 | void ep93xx_register_ac97(void); |
65 | 51 | ||
diff --git a/arch/arm/mach-ep93xx/micro9.c b/arch/arm/mach-ep93xx/micro9.c index 7b98084f0c97..dc431c5f04ce 100644 --- a/arch/arm/mach-ep93xx/micro9.c +++ b/arch/arm/mach-ep93xx/micro9.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
23 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
24 | 24 | ||
25 | #include "soc.h" | ||
25 | 26 | ||
26 | /************************************************************************* | 27 | /************************************************************************* |
27 | * Micro9 NOR Flash | 28 | * Micro9 NOR Flash |
diff --git a/arch/arm/mach-ep93xx/simone.c b/arch/arm/mach-ep93xx/simone.c index f4e553eca21c..f40c2987e545 100644 --- a/arch/arm/mach-ep93xx/simone.c +++ b/arch/arm/mach-ep93xx/simone.c | |||
@@ -29,6 +29,8 @@ | |||
29 | #include <asm/mach-types.h> | 29 | #include <asm/mach-types.h> |
30 | #include <asm/mach/arch.h> | 30 | #include <asm/mach/arch.h> |
31 | 31 | ||
32 | #include "soc.h" | ||
33 | |||
32 | static struct ep93xx_eth_data __initdata simone_eth_data = { | 34 | static struct ep93xx_eth_data __initdata simone_eth_data = { |
33 | .phy_id = 1, | 35 | .phy_id = 1, |
34 | }; | 36 | }; |
diff --git a/arch/arm/mach-ep93xx/snappercl15.c b/arch/arm/mach-ep93xx/snappercl15.c index fd846331ddff..0c00852ef160 100644 --- a/arch/arm/mach-ep93xx/snappercl15.c +++ b/arch/arm/mach-ep93xx/snappercl15.c | |||
@@ -35,6 +35,8 @@ | |||
35 | #include <asm/mach-types.h> | 35 | #include <asm/mach-types.h> |
36 | #include <asm/mach/arch.h> | 36 | #include <asm/mach/arch.h> |
37 | 37 | ||
38 | #include "soc.h" | ||
39 | |||
38 | #define SNAPPERCL15_NAND_BASE (EP93XX_CS7_PHYS_BASE + SZ_16M) | 40 | #define SNAPPERCL15_NAND_BASE (EP93XX_CS7_PHYS_BASE + SZ_16M) |
39 | 41 | ||
40 | #define SNAPPERCL15_NAND_WPN (1 << 8) /* Write protect (active low) */ | 42 | #define SNAPPERCL15_NAND_WPN (1 << 8) /* Write protect (active low) */ |
diff --git a/arch/arm/mach-ep93xx/soc.h b/arch/arm/mach-ep93xx/soc.h new file mode 100644 index 000000000000..979fba722926 --- /dev/null +++ b/arch/arm/mach-ep93xx/soc.h | |||
@@ -0,0 +1,213 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/soc.h | ||
3 | * | ||
4 | * Copyright (C) 2012 Open Kernel Labs <www.ok-labs.com> | ||
5 | * Copyright (C) 2012 Ryan Mallon <rmallon@gmail.com> | ||
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 (at | ||
10 | * your option) any later version. | ||
11 | */ | ||
12 | |||
13 | #ifndef _EP93XX_SOC_H | ||
14 | #define _EP93XX_SOC_H | ||
15 | |||
16 | #include <mach/ep93xx-regs.h> | ||
17 | |||
18 | /* | ||
19 | * EP93xx Physical Memory Map: | ||
20 | * | ||
21 | * The ASDO pin is sampled at system reset to select a synchronous or | ||
22 | * asynchronous boot configuration. When ASDO is "1" (i.e. pulled-up) | ||
23 | * the synchronous boot mode is selected. When ASDO is "0" (i.e | ||
24 | * pulled-down) the asynchronous boot mode is selected. | ||
25 | * | ||
26 | * In synchronous boot mode nSDCE3 is decoded starting at physical address | ||
27 | * 0x00000000 and nCS0 is decoded starting at 0xf0000000. For asynchronous | ||
28 | * boot mode they are swapped with nCS0 decoded at 0x00000000 ann nSDCE3 | ||
29 | * decoded at 0xf0000000. | ||
30 | * | ||
31 | * There is known errata for the EP93xx dealing with External Memory | ||
32 | * Configurations. Please refer to "AN273: EP93xx Silicon Rev E Design | ||
33 | * Guidelines" for more information. This document can be found at: | ||
34 | * | ||
35 | * http://www.cirrus.com/en/pubs/appNote/AN273REV4.pdf | ||
36 | */ | ||
37 | |||
38 | #define EP93XX_CS0_PHYS_BASE_ASYNC 0x00000000 /* ASDO Pin = 0 */ | ||
39 | #define EP93XX_SDCE3_PHYS_BASE_SYNC 0x00000000 /* ASDO Pin = 1 */ | ||
40 | #define EP93XX_CS1_PHYS_BASE 0x10000000 | ||
41 | #define EP93XX_CS2_PHYS_BASE 0x20000000 | ||
42 | #define EP93XX_CS3_PHYS_BASE 0x30000000 | ||
43 | #define EP93XX_PCMCIA_PHYS_BASE 0x40000000 | ||
44 | #define EP93XX_CS6_PHYS_BASE 0x60000000 | ||
45 | #define EP93XX_CS7_PHYS_BASE 0x70000000 | ||
46 | #define EP93XX_SDCE0_PHYS_BASE 0xc0000000 | ||
47 | #define EP93XX_SDCE1_PHYS_BASE 0xd0000000 | ||
48 | #define EP93XX_SDCE2_PHYS_BASE 0xe0000000 | ||
49 | #define EP93XX_SDCE3_PHYS_BASE_ASYNC 0xf0000000 /* ASDO Pin = 0 */ | ||
50 | #define EP93XX_CS0_PHYS_BASE_SYNC 0xf0000000 /* ASDO Pin = 1 */ | ||
51 | |||
52 | /* AHB peripherals */ | ||
53 | #define EP93XX_DMA_BASE EP93XX_AHB_IOMEM(0x00000000) | ||
54 | |||
55 | #define EP93XX_ETHERNET_PHYS_BASE EP93XX_AHB_PHYS(0x00010000) | ||
56 | #define EP93XX_ETHERNET_BASE EP93XX_AHB_IOMEM(0x00010000) | ||
57 | |||
58 | #define EP93XX_USB_PHYS_BASE EP93XX_AHB_PHYS(0x00020000) | ||
59 | #define EP93XX_USB_BASE EP93XX_AHB_IOMEM(0x00020000) | ||
60 | |||
61 | #define EP93XX_RASTER_PHYS_BASE EP93XX_AHB_PHYS(0x00030000) | ||
62 | #define EP93XX_RASTER_BASE EP93XX_AHB_IOMEM(0x00030000) | ||
63 | |||
64 | #define EP93XX_GRAPHICS_ACCEL_BASE EP93XX_AHB_IOMEM(0x00040000) | ||
65 | |||
66 | #define EP93XX_SDRAM_CONTROLLER_BASE EP93XX_AHB_IOMEM(0x00060000) | ||
67 | |||
68 | #define EP93XX_PCMCIA_CONTROLLER_BASE EP93XX_AHB_IOMEM(0x00080000) | ||
69 | |||
70 | #define EP93XX_BOOT_ROM_BASE EP93XX_AHB_IOMEM(0x00090000) | ||
71 | |||
72 | #define EP93XX_IDE_BASE EP93XX_AHB_IOMEM(0x000a0000) | ||
73 | |||
74 | #define EP93XX_VIC1_BASE EP93XX_AHB_IOMEM(0x000b0000) | ||
75 | |||
76 | #define EP93XX_VIC2_BASE EP93XX_AHB_IOMEM(0x000c0000) | ||
77 | |||
78 | /* APB peripherals */ | ||
79 | #define EP93XX_TIMER_BASE EP93XX_APB_IOMEM(0x00010000) | ||
80 | |||
81 | #define EP93XX_I2S_PHYS_BASE EP93XX_APB_PHYS(0x00020000) | ||
82 | #define EP93XX_I2S_BASE EP93XX_APB_IOMEM(0x00020000) | ||
83 | |||
84 | #define EP93XX_SECURITY_BASE EP93XX_APB_IOMEM(0x00030000) | ||
85 | |||
86 | #define EP93XX_AAC_PHYS_BASE EP93XX_APB_PHYS(0x00080000) | ||
87 | #define EP93XX_AAC_BASE EP93XX_APB_IOMEM(0x00080000) | ||
88 | |||
89 | #define EP93XX_SPI_PHYS_BASE EP93XX_APB_PHYS(0x000a0000) | ||
90 | #define EP93XX_SPI_BASE EP93XX_APB_IOMEM(0x000a0000) | ||
91 | |||
92 | #define EP93XX_IRDA_BASE EP93XX_APB_IOMEM(0x000b0000) | ||
93 | |||
94 | #define EP93XX_KEY_MATRIX_PHYS_BASE EP93XX_APB_PHYS(0x000f0000) | ||
95 | #define EP93XX_KEY_MATRIX_BASE EP93XX_APB_IOMEM(0x000f0000) | ||
96 | |||
97 | #define EP93XX_ADC_BASE EP93XX_APB_IOMEM(0x00100000) | ||
98 | #define EP93XX_TOUCHSCREEN_BASE EP93XX_APB_IOMEM(0x00100000) | ||
99 | |||
100 | #define EP93XX_PWM_PHYS_BASE EP93XX_APB_PHYS(0x00110000) | ||
101 | #define EP93XX_PWM_BASE EP93XX_APB_IOMEM(0x00110000) | ||
102 | |||
103 | #define EP93XX_RTC_PHYS_BASE EP93XX_APB_PHYS(0x00120000) | ||
104 | #define EP93XX_RTC_BASE EP93XX_APB_IOMEM(0x00120000) | ||
105 | |||
106 | #define EP93XX_WATCHDOG_PHYS_BASE EP93XX_APB_PHYS(0x00140000) | ||
107 | #define EP93XX_WATCHDOG_BASE EP93XX_APB_IOMEM(0x00140000) | ||
108 | |||
109 | /* System controller */ | ||
110 | #define EP93XX_SYSCON_BASE EP93XX_APB_IOMEM(0x00130000) | ||
111 | #define EP93XX_SYSCON_REG(x) (EP93XX_SYSCON_BASE + (x)) | ||
112 | #define EP93XX_SYSCON_POWER_STATE EP93XX_SYSCON_REG(0x00) | ||
113 | #define EP93XX_SYSCON_PWRCNT EP93XX_SYSCON_REG(0x04) | ||
114 | #define EP93XX_SYSCON_PWRCNT_FIR_EN (1<<31) | ||
115 | #define EP93XX_SYSCON_PWRCNT_UARTBAUD (1<<29) | ||
116 | #define EP93XX_SYSCON_PWRCNT_USH_EN (1<<28) | ||
117 | #define EP93XX_SYSCON_PWRCNT_DMA_M2M1 (1<<27) | ||
118 | #define EP93XX_SYSCON_PWRCNT_DMA_M2M0 (1<<26) | ||
119 | #define EP93XX_SYSCON_PWRCNT_DMA_M2P8 (1<<25) | ||
120 | #define EP93XX_SYSCON_PWRCNT_DMA_M2P9 (1<<24) | ||
121 | #define EP93XX_SYSCON_PWRCNT_DMA_M2P6 (1<<23) | ||
122 | #define EP93XX_SYSCON_PWRCNT_DMA_M2P7 (1<<22) | ||
123 | #define EP93XX_SYSCON_PWRCNT_DMA_M2P4 (1<<21) | ||
124 | #define EP93XX_SYSCON_PWRCNT_DMA_M2P5 (1<<20) | ||
125 | #define EP93XX_SYSCON_PWRCNT_DMA_M2P2 (1<<19) | ||
126 | #define EP93XX_SYSCON_PWRCNT_DMA_M2P3 (1<<18) | ||
127 | #define EP93XX_SYSCON_PWRCNT_DMA_M2P0 (1<<17) | ||
128 | #define EP93XX_SYSCON_PWRCNT_DMA_M2P1 (1<<16) | ||
129 | #define EP93XX_SYSCON_HALT EP93XX_SYSCON_REG(0x08) | ||
130 | #define EP93XX_SYSCON_STANDBY EP93XX_SYSCON_REG(0x0c) | ||
131 | #define EP93XX_SYSCON_CLKSET1 EP93XX_SYSCON_REG(0x20) | ||
132 | #define EP93XX_SYSCON_CLKSET1_NBYP1 (1<<23) | ||
133 | #define EP93XX_SYSCON_CLKSET2 EP93XX_SYSCON_REG(0x24) | ||
134 | #define EP93XX_SYSCON_CLKSET2_NBYP2 (1<<19) | ||
135 | #define EP93XX_SYSCON_CLKSET2_PLL2_EN (1<<18) | ||
136 | #define EP93XX_SYSCON_DEVCFG EP93XX_SYSCON_REG(0x80) | ||
137 | #define EP93XX_SYSCON_DEVCFG_SWRST (1<<31) | ||
138 | #define EP93XX_SYSCON_DEVCFG_D1ONG (1<<30) | ||
139 | #define EP93XX_SYSCON_DEVCFG_D0ONG (1<<29) | ||
140 | #define EP93XX_SYSCON_DEVCFG_IONU2 (1<<28) | ||
141 | #define EP93XX_SYSCON_DEVCFG_GONK (1<<27) | ||
142 | #define EP93XX_SYSCON_DEVCFG_TONG (1<<26) | ||
143 | #define EP93XX_SYSCON_DEVCFG_MONG (1<<25) | ||
144 | #define EP93XX_SYSCON_DEVCFG_U3EN (1<<24) | ||
145 | #define EP93XX_SYSCON_DEVCFG_CPENA (1<<23) | ||
146 | #define EP93XX_SYSCON_DEVCFG_A2ONG (1<<22) | ||
147 | #define EP93XX_SYSCON_DEVCFG_A1ONG (1<<21) | ||
148 | #define EP93XX_SYSCON_DEVCFG_U2EN (1<<20) | ||
149 | #define EP93XX_SYSCON_DEVCFG_EXVC (1<<19) | ||
150 | #define EP93XX_SYSCON_DEVCFG_U1EN (1<<18) | ||
151 | #define EP93XX_SYSCON_DEVCFG_TIN (1<<17) | ||
152 | #define EP93XX_SYSCON_DEVCFG_HC3IN (1<<15) | ||
153 | #define EP93XX_SYSCON_DEVCFG_HC3EN (1<<14) | ||
154 | #define EP93XX_SYSCON_DEVCFG_HC1IN (1<<13) | ||
155 | #define EP93XX_SYSCON_DEVCFG_HC1EN (1<<12) | ||
156 | #define EP93XX_SYSCON_DEVCFG_HONIDE (1<<11) | ||
157 | #define EP93XX_SYSCON_DEVCFG_GONIDE (1<<10) | ||
158 | #define EP93XX_SYSCON_DEVCFG_PONG (1<<9) | ||
159 | #define EP93XX_SYSCON_DEVCFG_EONIDE (1<<8) | ||
160 | #define EP93XX_SYSCON_DEVCFG_I2SONSSP (1<<7) | ||
161 | #define EP93XX_SYSCON_DEVCFG_I2SONAC97 (1<<6) | ||
162 | #define EP93XX_SYSCON_DEVCFG_RASONP3 (1<<4) | ||
163 | #define EP93XX_SYSCON_DEVCFG_RAS (1<<3) | ||
164 | #define EP93XX_SYSCON_DEVCFG_ADCPD (1<<2) | ||
165 | #define EP93XX_SYSCON_DEVCFG_KEYS (1<<1) | ||
166 | #define EP93XX_SYSCON_DEVCFG_SHENA (1<<0) | ||
167 | #define EP93XX_SYSCON_VIDCLKDIV EP93XX_SYSCON_REG(0x84) | ||
168 | #define EP93XX_SYSCON_CLKDIV_ENABLE (1<<15) | ||
169 | #define EP93XX_SYSCON_CLKDIV_ESEL (1<<14) | ||
170 | #define EP93XX_SYSCON_CLKDIV_PSEL (1<<13) | ||
171 | #define EP93XX_SYSCON_CLKDIV_PDIV_SHIFT 8 | ||
172 | #define EP93XX_SYSCON_I2SCLKDIV EP93XX_SYSCON_REG(0x8c) | ||
173 | #define EP93XX_SYSCON_I2SCLKDIV_SENA (1<<31) | ||
174 | #define EP93XX_SYSCON_I2SCLKDIV_ORIDE (1<<29) | ||
175 | #define EP93XX_SYSCON_I2SCLKDIV_SPOL (1<<19) | ||
176 | #define EP93XX_I2SCLKDIV_SDIV (1 << 16) | ||
177 | #define EP93XX_I2SCLKDIV_LRDIV32 (0 << 17) | ||
178 | #define EP93XX_I2SCLKDIV_LRDIV64 (1 << 17) | ||
179 | #define EP93XX_I2SCLKDIV_LRDIV128 (2 << 17) | ||
180 | #define EP93XX_I2SCLKDIV_LRDIV_MASK (3 << 17) | ||
181 | #define EP93XX_SYSCON_KEYTCHCLKDIV EP93XX_SYSCON_REG(0x90) | ||
182 | #define EP93XX_SYSCON_KEYTCHCLKDIV_TSEN (1<<31) | ||
183 | #define EP93XX_SYSCON_KEYTCHCLKDIV_ADIV (1<<16) | ||
184 | #define EP93XX_SYSCON_KEYTCHCLKDIV_KEN (1<<15) | ||
185 | #define EP93XX_SYSCON_KEYTCHCLKDIV_KDIV (1<<0) | ||
186 | #define EP93XX_SYSCON_SYSCFG EP93XX_SYSCON_REG(0x9c) | ||
187 | #define EP93XX_SYSCON_SYSCFG_REV_MASK (0xf0000000) | ||
188 | #define EP93XX_SYSCON_SYSCFG_REV_SHIFT (28) | ||
189 | #define EP93XX_SYSCON_SYSCFG_SBOOT (1<<8) | ||
190 | #define EP93XX_SYSCON_SYSCFG_LCSN7 (1<<7) | ||
191 | #define EP93XX_SYSCON_SYSCFG_LCSN6 (1<<6) | ||
192 | #define EP93XX_SYSCON_SYSCFG_LASDO (1<<5) | ||
193 | #define EP93XX_SYSCON_SYSCFG_LEEDA (1<<4) | ||
194 | #define EP93XX_SYSCON_SYSCFG_LEECLK (1<<3) | ||
195 | #define EP93XX_SYSCON_SYSCFG_LCSN2 (1<<1) | ||
196 | #define EP93XX_SYSCON_SYSCFG_LCSN1 (1<<0) | ||
197 | #define EP93XX_SYSCON_SWLOCK EP93XX_SYSCON_REG(0xc0) | ||
198 | |||
199 | /* EP93xx System Controller software locked register write */ | ||
200 | void ep93xx_syscon_swlocked_write(unsigned int val, void __iomem *reg); | ||
201 | void ep93xx_devcfg_set_clear(unsigned int set_bits, unsigned int clear_bits); | ||
202 | |||
203 | static inline void ep93xx_devcfg_set_bits(unsigned int bits) | ||
204 | { | ||
205 | ep93xx_devcfg_set_clear(bits, 0x00); | ||
206 | } | ||
207 | |||
208 | static inline void ep93xx_devcfg_clear_bits(unsigned int bits) | ||
209 | { | ||
210 | ep93xx_devcfg_set_clear(0x00, bits); | ||
211 | } | ||
212 | |||
213 | #endif /* _EP93XX_SOC_H */ | ||
diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c index 79f8ecf07a19..5ea790942e94 100644 --- a/arch/arm/mach-ep93xx/ts72xx.c +++ b/arch/arm/mach-ep93xx/ts72xx.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <asm/mach/map.h> | 28 | #include <asm/mach/map.h> |
29 | #include <asm/mach/arch.h> | 29 | #include <asm/mach/arch.h> |
30 | 30 | ||
31 | #include "soc.h" | ||
31 | 32 | ||
32 | static struct map_desc ts72xx_io_desc[] __initdata = { | 33 | static struct map_desc ts72xx_io_desc[] __initdata = { |
33 | { | 34 | { |
diff --git a/arch/arm/mach-ep93xx/vision_ep9307.c b/arch/arm/mach-ep93xx/vision_ep9307.c index d5fb44f16d31..ba156eb225e8 100644 --- a/arch/arm/mach-ep93xx/vision_ep9307.c +++ b/arch/arm/mach-ep93xx/vision_ep9307.c | |||
@@ -34,10 +34,13 @@ | |||
34 | #include <mach/ep93xx_spi.h> | 34 | #include <mach/ep93xx_spi.h> |
35 | #include <mach/gpio-ep93xx.h> | 35 | #include <mach/gpio-ep93xx.h> |
36 | 36 | ||
37 | #include <asm/hardware/vic.h> | ||
37 | #include <asm/mach-types.h> | 38 | #include <asm/mach-types.h> |
38 | #include <asm/mach/map.h> | 39 | #include <asm/mach/map.h> |
39 | #include <asm/mach/arch.h> | 40 | #include <asm/mach/arch.h> |
40 | 41 | ||
42 | #include "soc.h" | ||
43 | |||
41 | /************************************************************************* | 44 | /************************************************************************* |
42 | * Static I/O mappings for the FPGA | 45 | * Static I/O mappings for the FPGA |
43 | *************************************************************************/ | 46 | *************************************************************************/ |
@@ -361,6 +364,7 @@ MACHINE_START(VISION_EP9307, "Vision Engraving Systems EP9307") | |||
361 | .atag_offset = 0x100, | 364 | .atag_offset = 0x100, |
362 | .map_io = vision_map_io, | 365 | .map_io = vision_map_io, |
363 | .init_irq = ep93xx_init_irq, | 366 | .init_irq = ep93xx_init_irq, |
367 | .handle_irq = vic_handle_irq, | ||
364 | .timer = &ep93xx_timer, | 368 | .timer = &ep93xx_timer, |
365 | .init_machine = vision_init_machine, | 369 | .init_machine = vision_init_machine, |
366 | .restart = ep93xx_restart, | 370 | .restart = ep93xx_restart, |
diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c index e00d8e26d525..5ca91ec12642 100644 --- a/arch/arm/mach-exynos/mach-universal_c210.c +++ b/arch/arm/mach-exynos/mach-universal_c210.c | |||
@@ -13,6 +13,7 @@ | |||
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/interrupt.h> | ||
16 | #include <linux/fb.h> | 17 | #include <linux/fb.h> |
17 | #include <linux/mfd/max8998.h> | 18 | #include <linux/mfd/max8998.h> |
18 | #include <linux/regulator/machine.h> | 19 | #include <linux/regulator/machine.h> |
@@ -595,6 +596,7 @@ static struct mxt_platform_data qt602240_platform_data = { | |||
595 | .threshold = 0x28, | 596 | .threshold = 0x28, |
596 | .voltage = 2800000, /* 2.8V */ | 597 | .voltage = 2800000, /* 2.8V */ |
597 | .orient = MXT_DIAGONAL, | 598 | .orient = MXT_DIAGONAL, |
599 | .irqflags = IRQF_TRIGGER_FALLING, | ||
598 | }; | 600 | }; |
599 | 601 | ||
600 | static struct i2c_board_info i2c3_devs[] __initdata = { | 602 | static struct i2c_board_info i2c3_devs[] __initdata = { |
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index 6c5826605eae..719ee423abe2 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c | |||
@@ -343,6 +343,7 @@ static void __init omap3_check_revision(const char **cpu_rev) | |||
343 | case 0xb944: | 343 | case 0xb944: |
344 | omap_revision = AM335X_REV_ES1_0; | 344 | omap_revision = AM335X_REV_ES1_0; |
345 | *cpu_rev = "1.0"; | 345 | *cpu_rev = "1.0"; |
346 | break; | ||
346 | case 0xb8f2: | 347 | case 0xb8f2: |
347 | switch (rev) { | 348 | switch (rev) { |
348 | case 0: | 349 | case 0: |
diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c index 2cc1aa004b94..415a6f1cf419 100644 --- a/arch/arm/mach-omap2/mailbox.c +++ b/arch/arm/mach-omap2/mailbox.c | |||
@@ -420,8 +420,7 @@ static void __exit omap2_mbox_exit(void) | |||
420 | platform_driver_unregister(&omap2_mbox_driver); | 420 | platform_driver_unregister(&omap2_mbox_driver); |
421 | } | 421 | } |
422 | 422 | ||
423 | /* must be ready before omap3isp is probed */ | 423 | module_init(omap2_mbox_init); |
424 | subsys_initcall(omap2_mbox_init); | ||
425 | module_exit(omap2_mbox_exit); | 424 | module_exit(omap2_mbox_exit); |
426 | 425 | ||
427 | MODULE_LICENSE("GPL v2"); | 426 | MODULE_LICENSE("GPL v2"); |
diff --git a/arch/arm/mach-omap2/omap-iommu.c b/arch/arm/mach-omap2/omap-iommu.c index b8822048e409..ac49384d0285 100644 --- a/arch/arm/mach-omap2/omap-iommu.c +++ b/arch/arm/mach-omap2/omap-iommu.c | |||
@@ -150,7 +150,8 @@ err_out: | |||
150 | platform_device_put(omap_iommu_pdev[i]); | 150 | platform_device_put(omap_iommu_pdev[i]); |
151 | return err; | 151 | return err; |
152 | } | 152 | } |
153 | module_init(omap_iommu_init); | 153 | /* must be ready before omap3isp is probed */ |
154 | subsys_initcall(omap_iommu_init); | ||
154 | 155 | ||
155 | static void __exit omap_iommu_exit(void) | 156 | static void __exit omap_iommu_exit(void) |
156 | { | 157 | { |
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c index ebc595091312..70de277f5c15 100644 --- a/arch/arm/mach-omap2/omap4-common.c +++ b/arch/arm/mach-omap2/omap4-common.c | |||
@@ -31,6 +31,7 @@ | |||
31 | 31 | ||
32 | #include "common.h" | 32 | #include "common.h" |
33 | #include "omap4-sar-layout.h" | 33 | #include "omap4-sar-layout.h" |
34 | #include <linux/export.h> | ||
34 | 35 | ||
35 | #ifdef CONFIG_CACHE_L2X0 | 36 | #ifdef CONFIG_CACHE_L2X0 |
36 | static void __iomem *l2cache_base; | 37 | static void __iomem *l2cache_base; |
@@ -55,6 +56,7 @@ void omap_bus_sync(void) | |||
55 | isb(); | 56 | isb(); |
56 | } | 57 | } |
57 | } | 58 | } |
59 | EXPORT_SYMBOL(omap_bus_sync); | ||
58 | 60 | ||
59 | /* Steal one page physical memory for barrier implementation */ | 61 | /* Steal one page physical memory for barrier implementation */ |
60 | int __init omap_barrier_reserve_memblock(void) | 62 | int __init omap_barrier_reserve_memblock(void) |
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c index 10b20c652e5d..4b57757bf9d1 100644 --- a/arch/arm/mach-omap2/twl-common.c +++ b/arch/arm/mach-omap2/twl-common.c | |||
@@ -270,7 +270,6 @@ static struct regulator_init_data omap4_vusb_idata = { | |||
270 | .constraints = { | 270 | .constraints = { |
271 | .min_uV = 3300000, | 271 | .min_uV = 3300000, |
272 | .max_uV = 3300000, | 272 | .max_uV = 3300000, |
273 | .apply_uV = true, | ||
274 | .valid_modes_mask = REGULATOR_MODE_NORMAL | 273 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
275 | | REGULATOR_MODE_STANDBY, | 274 | | REGULATOR_MODE_STANDBY, |
276 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 275 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
diff --git a/arch/arm/mach-pxa/generic.h b/arch/arm/mach-pxa/generic.h index 0d729e6619df..42d5cca66257 100644 --- a/arch/arm/mach-pxa/generic.h +++ b/arch/arm/mach-pxa/generic.h | |||
@@ -49,7 +49,6 @@ extern unsigned pxa3xx_get_clk_frequency_khz(int); | |||
49 | #endif | 49 | #endif |
50 | 50 | ||
51 | extern struct syscore_ops pxa_irq_syscore_ops; | 51 | extern struct syscore_ops pxa_irq_syscore_ops; |
52 | extern struct syscore_ops pxa_gpio_syscore_ops; | ||
53 | extern struct syscore_ops pxa2xx_mfp_syscore_ops; | 52 | extern struct syscore_ops pxa2xx_mfp_syscore_ops; |
54 | extern struct syscore_ops pxa3xx_mfp_syscore_ops; | 53 | extern struct syscore_ops pxa3xx_mfp_syscore_ops; |
55 | 54 | ||
diff --git a/arch/arm/mach-pxa/mfp-pxa2xx.c b/arch/arm/mach-pxa/mfp-pxa2xx.c index f14775536b83..29b62afc6f7c 100644 --- a/arch/arm/mach-pxa/mfp-pxa2xx.c +++ b/arch/arm/mach-pxa/mfp-pxa2xx.c | |||
@@ -226,6 +226,12 @@ static void __init pxa25x_mfp_init(void) | |||
226 | { | 226 | { |
227 | int i; | 227 | int i; |
228 | 228 | ||
229 | /* running before pxa_gpio_probe() */ | ||
230 | #ifdef CONFIG_CPU_PXA26x | ||
231 | pxa_last_gpio = 89; | ||
232 | #else | ||
233 | pxa_last_gpio = 84; | ||
234 | #endif | ||
229 | for (i = 0; i <= pxa_last_gpio; i++) | 235 | for (i = 0; i <= pxa_last_gpio; i++) |
230 | gpio_desc[i].valid = 1; | 236 | gpio_desc[i].valid = 1; |
231 | 237 | ||
@@ -295,6 +301,7 @@ static void __init pxa27x_mfp_init(void) | |||
295 | { | 301 | { |
296 | int i, gpio; | 302 | int i, gpio; |
297 | 303 | ||
304 | pxa_last_gpio = 120; /* running before pxa_gpio_probe() */ | ||
298 | for (i = 0; i <= pxa_last_gpio; i++) { | 305 | for (i = 0; i <= pxa_last_gpio; i++) { |
299 | /* skip GPIO2, 5, 6, 7, 8, they are not | 306 | /* skip GPIO2, 5, 6, 7, 8, they are not |
300 | * valid pins allow configuration | 307 | * valid pins allow configuration |
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index 00d6eacab8e4..3352b37b60cf 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c | |||
@@ -208,6 +208,7 @@ static struct clk_lookup pxa25x_clkregs[] = { | |||
208 | INIT_CLKREG(&clk_pxa25x_gpio11, NULL, "GPIO11_CLK"), | 208 | INIT_CLKREG(&clk_pxa25x_gpio11, NULL, "GPIO11_CLK"), |
209 | INIT_CLKREG(&clk_pxa25x_gpio12, NULL, "GPIO12_CLK"), | 209 | INIT_CLKREG(&clk_pxa25x_gpio12, NULL, "GPIO12_CLK"), |
210 | INIT_CLKREG(&clk_pxa25x_mem, "pxa2xx-pcmcia", NULL), | 210 | INIT_CLKREG(&clk_pxa25x_mem, "pxa2xx-pcmcia", NULL), |
211 | INIT_CLKREG(&clk_dummy, "pxa-gpio", NULL), | ||
211 | }; | 212 | }; |
212 | 213 | ||
213 | static struct clk_lookup pxa25x_hwuart_clkreg = | 214 | static struct clk_lookup pxa25x_hwuart_clkreg = |
@@ -367,7 +368,6 @@ static int __init pxa25x_init(void) | |||
367 | 368 | ||
368 | register_syscore_ops(&pxa_irq_syscore_ops); | 369 | register_syscore_ops(&pxa_irq_syscore_ops); |
369 | register_syscore_ops(&pxa2xx_mfp_syscore_ops); | 370 | register_syscore_ops(&pxa2xx_mfp_syscore_ops); |
370 | register_syscore_ops(&pxa_gpio_syscore_ops); | ||
371 | register_syscore_ops(&pxa2xx_clock_syscore_ops); | 371 | register_syscore_ops(&pxa2xx_clock_syscore_ops); |
372 | 372 | ||
373 | ret = platform_add_devices(pxa25x_devices, | 373 | ret = platform_add_devices(pxa25x_devices, |
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index c1673b3441d4..6bce78edce7a 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c | |||
@@ -229,6 +229,7 @@ static struct clk_lookup pxa27x_clkregs[] = { | |||
229 | INIT_CLKREG(&clk_pxa27x_im, NULL, "IMCLK"), | 229 | INIT_CLKREG(&clk_pxa27x_im, NULL, "IMCLK"), |
230 | INIT_CLKREG(&clk_pxa27x_memc, NULL, "MEMCLK"), | 230 | INIT_CLKREG(&clk_pxa27x_memc, NULL, "MEMCLK"), |
231 | INIT_CLKREG(&clk_pxa27x_mem, "pxa2xx-pcmcia", NULL), | 231 | INIT_CLKREG(&clk_pxa27x_mem, "pxa2xx-pcmcia", NULL), |
232 | INIT_CLKREG(&clk_dummy, "pxa-gpio", NULL), | ||
232 | }; | 233 | }; |
233 | 234 | ||
234 | #ifdef CONFIG_PM | 235 | #ifdef CONFIG_PM |
@@ -455,7 +456,6 @@ static int __init pxa27x_init(void) | |||
455 | 456 | ||
456 | register_syscore_ops(&pxa_irq_syscore_ops); | 457 | register_syscore_ops(&pxa_irq_syscore_ops); |
457 | register_syscore_ops(&pxa2xx_mfp_syscore_ops); | 458 | register_syscore_ops(&pxa2xx_mfp_syscore_ops); |
458 | register_syscore_ops(&pxa_gpio_syscore_ops); | ||
459 | register_syscore_ops(&pxa2xx_clock_syscore_ops); | 459 | register_syscore_ops(&pxa2xx_clock_syscore_ops); |
460 | 460 | ||
461 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); | 461 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); |
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index 4f402afa6609..3918a672238e 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c | |||
@@ -462,7 +462,6 @@ static int __init pxa3xx_init(void) | |||
462 | 462 | ||
463 | register_syscore_ops(&pxa_irq_syscore_ops); | 463 | register_syscore_ops(&pxa_irq_syscore_ops); |
464 | register_syscore_ops(&pxa3xx_mfp_syscore_ops); | 464 | register_syscore_ops(&pxa3xx_mfp_syscore_ops); |
465 | register_syscore_ops(&pxa_gpio_syscore_ops); | ||
466 | register_syscore_ops(&pxa3xx_clock_syscore_ops); | 465 | register_syscore_ops(&pxa3xx_clock_syscore_ops); |
467 | 466 | ||
468 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); | 467 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); |
diff --git a/arch/arm/mach-pxa/pxa95x.c b/arch/arm/mach-pxa/pxa95x.c index d082a583df78..5ce434b95e87 100644 --- a/arch/arm/mach-pxa/pxa95x.c +++ b/arch/arm/mach-pxa/pxa95x.c | |||
@@ -283,7 +283,6 @@ static int __init pxa95x_init(void) | |||
283 | return ret; | 283 | return ret; |
284 | 284 | ||
285 | register_syscore_ops(&pxa_irq_syscore_ops); | 285 | register_syscore_ops(&pxa_irq_syscore_ops); |
286 | register_syscore_ops(&pxa_gpio_syscore_ops); | ||
287 | register_syscore_ops(&pxa3xx_clock_syscore_ops); | 286 | register_syscore_ops(&pxa3xx_clock_syscore_ops); |
288 | 287 | ||
289 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); | 288 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); |
diff --git a/arch/arm/mach-s3c24xx/common.h b/arch/arm/mach-s3c24xx/common.h deleted file mode 100644 index 62a2e196a68e..000000000000 --- a/arch/arm/mach-s3c24xx/common.h +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2011 Samsung Electronics Co., Ltd. | ||
3 | * http://www.samsung.com | ||
4 | * | ||
5 | * Common Header for S3C2410 machines | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #ifndef __ARCH_ARM_MACH_S3C2410_COMMON_H | ||
13 | #define __ARCH_ARM_MACH_S3C2410_COMMON_H | ||
14 | |||
15 | #ifdef CONFIG_CPU_S3C2410 | ||
16 | void s3c2410_restart(char mode, const char *cmd); | ||
17 | #endif | ||
18 | |||
19 | #ifdef CONFIG_CPU_S3C2440 | ||
20 | void s3c2440_restart(char mode, const char *cmd); | ||
21 | #endif | ||
22 | |||
23 | #endif /* __ARCH_ARM_MACH_S3C2410_COMMON_H */ | ||
diff --git a/arch/arm/mach-s3c24xx/mach-anubis.c b/arch/arm/mach-s3c24xx/mach-anubis.c index 9e0f74515bb1..60c72c54c21e 100644 --- a/arch/arm/mach-s3c24xx/mach-anubis.c +++ b/arch/arm/mach-s3c24xx/mach-anubis.c | |||
@@ -488,5 +488,5 @@ MACHINE_START(ANUBIS, "Simtec-Anubis") | |||
488 | .init_machine = anubis_init, | 488 | .init_machine = anubis_init, |
489 | .init_irq = s3c24xx_init_irq, | 489 | .init_irq = s3c24xx_init_irq, |
490 | .timer = &s3c24xx_timer, | 490 | .timer = &s3c24xx_timer, |
491 | .restart = s3c2440_restart, | 491 | .restart = s3c244x_restart, |
492 | MACHINE_END | 492 | MACHINE_END |
diff --git a/arch/arm/mach-s3c24xx/mach-at2440evb.c b/arch/arm/mach-s3c24xx/mach-at2440evb.c index d6a9763110cd..d7ae49c90118 100644 --- a/arch/arm/mach-s3c24xx/mach-at2440evb.c +++ b/arch/arm/mach-s3c24xx/mach-at2440evb.c | |||
@@ -222,5 +222,5 @@ MACHINE_START(AT2440EVB, "AT2440EVB") | |||
222 | .init_machine = at2440evb_init, | 222 | .init_machine = at2440evb_init, |
223 | .init_irq = s3c24xx_init_irq, | 223 | .init_irq = s3c24xx_init_irq, |
224 | .timer = &s3c24xx_timer, | 224 | .timer = &s3c24xx_timer, |
225 | .restart = s3c2440_restart, | 225 | .restart = s3c244x_restart, |
226 | MACHINE_END | 226 | MACHINE_END |
diff --git a/arch/arm/mach-s3c24xx/mach-gta02.c b/arch/arm/mach-s3c24xx/mach-gta02.c index d0e0ad4e6598..ba5d85394105 100644 --- a/arch/arm/mach-s3c24xx/mach-gta02.c +++ b/arch/arm/mach-s3c24xx/mach-gta02.c | |||
@@ -601,5 +601,5 @@ MACHINE_START(NEO1973_GTA02, "GTA02") | |||
601 | .init_irq = s3c24xx_init_irq, | 601 | .init_irq = s3c24xx_init_irq, |
602 | .init_machine = gta02_machine_init, | 602 | .init_machine = gta02_machine_init, |
603 | .timer = &s3c24xx_timer, | 603 | .timer = &s3c24xx_timer, |
604 | .restart = s3c2440_restart, | 604 | .restart = s3c244x_restart, |
605 | MACHINE_END | 605 | MACHINE_END |
diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c24xx/mach-mini2440.c index adbbb85bc4cd..5d66fb218a41 100644 --- a/arch/arm/mach-s3c24xx/mach-mini2440.c +++ b/arch/arm/mach-s3c24xx/mach-mini2440.c | |||
@@ -701,5 +701,5 @@ MACHINE_START(MINI2440, "MINI2440") | |||
701 | .init_machine = mini2440_init, | 701 | .init_machine = mini2440_init, |
702 | .init_irq = s3c24xx_init_irq, | 702 | .init_irq = s3c24xx_init_irq, |
703 | .timer = &s3c24xx_timer, | 703 | .timer = &s3c24xx_timer, |
704 | .restart = s3c2440_restart, | 704 | .restart = s3c244x_restart, |
705 | MACHINE_END | 705 | MACHINE_END |
diff --git a/arch/arm/mach-s3c24xx/mach-nexcoder.c b/arch/arm/mach-s3c24xx/mach-nexcoder.c index 40eaf844bc1f..5198e3e1c5be 100644 --- a/arch/arm/mach-s3c24xx/mach-nexcoder.c +++ b/arch/arm/mach-s3c24xx/mach-nexcoder.c | |||
@@ -158,5 +158,5 @@ MACHINE_START(NEXCODER_2440, "NexVision - Nexcoder 2440") | |||
158 | .init_machine = nexcoder_init, | 158 | .init_machine = nexcoder_init, |
159 | .init_irq = s3c24xx_init_irq, | 159 | .init_irq = s3c24xx_init_irq, |
160 | .timer = &s3c24xx_timer, | 160 | .timer = &s3c24xx_timer, |
161 | .restart = s3c2440_restart, | 161 | .restart = s3c244x_restart, |
162 | MACHINE_END | 162 | MACHINE_END |
diff --git a/arch/arm/mach-s3c24xx/mach-osiris.c b/arch/arm/mach-s3c24xx/mach-osiris.c index 4c480ef734f6..c5daeb612a88 100644 --- a/arch/arm/mach-s3c24xx/mach-osiris.c +++ b/arch/arm/mach-s3c24xx/mach-osiris.c | |||
@@ -436,5 +436,5 @@ MACHINE_START(OSIRIS, "Simtec-OSIRIS") | |||
436 | .init_irq = s3c24xx_init_irq, | 436 | .init_irq = s3c24xx_init_irq, |
437 | .init_machine = osiris_init, | 437 | .init_machine = osiris_init, |
438 | .timer = &s3c24xx_timer, | 438 | .timer = &s3c24xx_timer, |
439 | .restart = s3c2440_restart, | 439 | .restart = s3c244x_restart, |
440 | MACHINE_END | 440 | MACHINE_END |
diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c index 4a8e2d34994c..200debb4c72d 100644 --- a/arch/arm/mach-s3c24xx/mach-rx1950.c +++ b/arch/arm/mach-s3c24xx/mach-rx1950.c | |||
@@ -822,5 +822,5 @@ MACHINE_START(RX1950, "HP iPAQ RX1950") | |||
822 | .init_irq = s3c24xx_init_irq, | 822 | .init_irq = s3c24xx_init_irq, |
823 | .init_machine = rx1950_init_machine, | 823 | .init_machine = rx1950_init_machine, |
824 | .timer = &s3c24xx_timer, | 824 | .timer = &s3c24xx_timer, |
825 | .restart = s3c2440_restart, | 825 | .restart = s3c244x_restart, |
826 | MACHINE_END | 826 | MACHINE_END |
diff --git a/arch/arm/mach-s3c24xx/mach-rx3715.c b/arch/arm/mach-s3c24xx/mach-rx3715.c index 20103bafbd4b..56af35447598 100644 --- a/arch/arm/mach-s3c24xx/mach-rx3715.c +++ b/arch/arm/mach-s3c24xx/mach-rx3715.c | |||
@@ -213,5 +213,5 @@ MACHINE_START(RX3715, "IPAQ-RX3715") | |||
213 | .init_irq = rx3715_init_irq, | 213 | .init_irq = rx3715_init_irq, |
214 | .init_machine = rx3715_init_machine, | 214 | .init_machine = rx3715_init_machine, |
215 | .timer = &s3c24xx_timer, | 215 | .timer = &s3c24xx_timer, |
216 | .restart = s3c2440_restart, | 216 | .restart = s3c244x_restart, |
217 | MACHINE_END | 217 | MACHINE_END |
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2440.c b/arch/arm/mach-s3c24xx/mach-smdk2440.c index 1deb60d12a60..83a1036d7dcb 100644 --- a/arch/arm/mach-s3c24xx/mach-smdk2440.c +++ b/arch/arm/mach-s3c24xx/mach-smdk2440.c | |||
@@ -183,5 +183,5 @@ MACHINE_START(S3C2440, "SMDK2440") | |||
183 | .map_io = smdk2440_map_io, | 183 | .map_io = smdk2440_map_io, |
184 | .init_machine = smdk2440_machine_init, | 184 | .init_machine = smdk2440_machine_init, |
185 | .timer = &s3c24xx_timer, | 185 | .timer = &s3c24xx_timer, |
186 | .restart = s3c2440_restart, | 186 | .restart = s3c244x_restart, |
187 | MACHINE_END | 187 | MACHINE_END |
diff --git a/arch/arm/mach-s3c24xx/s3c2440.c b/arch/arm/mach-s3c24xx/s3c2440.c index 517623a09fc5..2b3dddb49af7 100644 --- a/arch/arm/mach-s3c24xx/s3c2440.c +++ b/arch/arm/mach-s3c24xx/s3c2440.c | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <plat/cpu.h> | 35 | #include <plat/cpu.h> |
36 | #include <plat/s3c244x.h> | 36 | #include <plat/s3c244x.h> |
37 | #include <plat/pm.h> | 37 | #include <plat/pm.h> |
38 | #include <plat/watchdog-reset.h> | ||
39 | 38 | ||
40 | #include <plat/gpio-core.h> | 39 | #include <plat/gpio-core.h> |
41 | #include <plat/gpio-cfg.h> | 40 | #include <plat/gpio-cfg.h> |
@@ -74,15 +73,3 @@ void __init s3c2440_map_io(void) | |||
74 | s3c24xx_gpiocfg_default.set_pull = s3c24xx_gpio_setpull_1up; | 73 | s3c24xx_gpiocfg_default.set_pull = s3c24xx_gpio_setpull_1up; |
75 | s3c24xx_gpiocfg_default.get_pull = s3c24xx_gpio_getpull_1up; | 74 | s3c24xx_gpiocfg_default.get_pull = s3c24xx_gpio_getpull_1up; |
76 | } | 75 | } |
77 | |||
78 | void s3c2440_restart(char mode, const char *cmd) | ||
79 | { | ||
80 | if (mode == 's') { | ||
81 | soft_restart(0); | ||
82 | } | ||
83 | |||
84 | arch_wdt_reset(); | ||
85 | |||
86 | /* we'll take a jump through zero as a poor second */ | ||
87 | soft_restart(0); | ||
88 | } | ||
diff --git a/arch/arm/mach-s3c24xx/s3c244x.c b/arch/arm/mach-s3c24xx/s3c244x.c index 36bc60f61d0a..d15852f642b7 100644 --- a/arch/arm/mach-s3c24xx/s3c244x.c +++ b/arch/arm/mach-s3c24xx/s3c244x.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <plat/pm.h> | 46 | #include <plat/pm.h> |
47 | #include <plat/pll.h> | 47 | #include <plat/pll.h> |
48 | #include <plat/nand-core.h> | 48 | #include <plat/nand-core.h> |
49 | #include <plat/watchdog-reset.h> | ||
49 | 50 | ||
50 | static struct map_desc s3c244x_iodesc[] __initdata = { | 51 | static struct map_desc s3c244x_iodesc[] __initdata = { |
51 | IODESC_ENT(CLKPWR), | 52 | IODESC_ENT(CLKPWR), |
@@ -196,3 +197,14 @@ struct syscore_ops s3c244x_pm_syscore_ops = { | |||
196 | .suspend = s3c244x_suspend, | 197 | .suspend = s3c244x_suspend, |
197 | .resume = s3c244x_resume, | 198 | .resume = s3c244x_resume, |
198 | }; | 199 | }; |
200 | |||
201 | void s3c244x_restart(char mode, const char *cmd) | ||
202 | { | ||
203 | if (mode == 's') | ||
204 | soft_restart(0); | ||
205 | |||
206 | arch_wdt_reset(); | ||
207 | |||
208 | /* we'll take a jump through zero as a poor second */ | ||
209 | soft_restart(0); | ||
210 | } | ||
diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig index 52af00446a63..c59e8b892d6b 100644 --- a/arch/arm/mach-ux500/Kconfig +++ b/arch/arm/mach-ux500/Kconfig | |||
@@ -5,7 +5,7 @@ config UX500_SOC_COMMON | |||
5 | default y | 5 | default y |
6 | select ARM_GIC | 6 | select ARM_GIC |
7 | select HAS_MTU | 7 | select HAS_MTU |
8 | select ARM_ERRATA_753970 | 8 | select PL310_ERRATA_753970 |
9 | select ARM_ERRATA_754322 | 9 | select ARM_ERRATA_754322 |
10 | select ARM_ERRATA_764369 | 10 | select ARM_ERRATA_764369 |
11 | 11 | ||
diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig index 9b3d0fbaee72..88c3ba151e87 100644 --- a/arch/arm/mach-vexpress/Kconfig +++ b/arch/arm/mach-vexpress/Kconfig | |||
@@ -7,7 +7,7 @@ config ARCH_VEXPRESS_CA9X4 | |||
7 | select ARM_GIC | 7 | select ARM_GIC |
8 | select ARM_ERRATA_720789 | 8 | select ARM_ERRATA_720789 |
9 | select ARM_ERRATA_751472 | 9 | select ARM_ERRATA_751472 |
10 | select ARM_ERRATA_753970 | 10 | select PL310_ERRATA_753970 |
11 | select HAVE_SMP | 11 | select HAVE_SMP |
12 | select MIGHT_HAVE_CACHE_L2X0 | 12 | select MIGHT_HAVE_CACHE_L2X0 |
13 | 13 | ||
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index 0404ccbb8aa3..f1c8486f7501 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
@@ -230,9 +230,7 @@ __v7_setup: | |||
230 | mcreq p15, 0, r10, c15, c0, 1 @ write diagnostic register | 230 | mcreq p15, 0, r10, c15, c0, 1 @ write diagnostic register |
231 | #endif | 231 | #endif |
232 | #ifdef CONFIG_ARM_ERRATA_743622 | 232 | #ifdef CONFIG_ARM_ERRATA_743622 |
233 | teq r6, #0x20 @ present in r2p0 | 233 | teq r5, #0x00200000 @ only present in r2p* |
234 | teqne r6, #0x21 @ present in r2p1 | ||
235 | teqne r6, #0x22 @ present in r2p2 | ||
236 | mrceq p15, 0, r10, c15, c0, 1 @ read diagnostic register | 234 | mrceq p15, 0, r10, c15, c0, 1 @ read diagnostic register |
237 | orreq r10, r10, #1 << 6 @ set bit #6 | 235 | orreq r10, r10, #1 << 6 @ set bit #6 |
238 | mcreq p15, 0, r10, c15, c0, 1 @ write diagnostic register | 236 | mcreq p15, 0, r10, c15, c0, 1 @ write diagnostic register |
diff --git a/arch/arm/plat-omap/include/plat/irqs.h b/arch/arm/plat-omap/include/plat/irqs.h index 2efd6454bce0..37bbbbb981b2 100644 --- a/arch/arm/plat-omap/include/plat/irqs.h +++ b/arch/arm/plat-omap/include/plat/irqs.h | |||
@@ -428,8 +428,16 @@ | |||
428 | #define OMAP_GPMC_NR_IRQS 8 | 428 | #define OMAP_GPMC_NR_IRQS 8 |
429 | #define OMAP_GPMC_IRQ_END (OMAP_GPMC_IRQ_BASE + OMAP_GPMC_NR_IRQS) | 429 | #define OMAP_GPMC_IRQ_END (OMAP_GPMC_IRQ_BASE + OMAP_GPMC_NR_IRQS) |
430 | 430 | ||
431 | /* PRCM IRQ handler */ | ||
432 | #ifdef CONFIG_ARCH_OMAP2PLUS | ||
433 | #define OMAP_PRCM_IRQ_BASE (OMAP_GPMC_IRQ_END) | ||
434 | #define OMAP_PRCM_NR_IRQS 64 | ||
435 | #define OMAP_PRCM_IRQ_END (OMAP_PRCM_IRQ_BASE + OMAP_PRCM_NR_IRQS) | ||
436 | #else | ||
437 | #define OMAP_PRCM_IRQ_END OMAP_GPMC_IRQ_END | ||
438 | #endif | ||
431 | 439 | ||
432 | #define NR_IRQS OMAP_GPMC_IRQ_END | 440 | #define NR_IRQS OMAP_PRCM_IRQ_END |
433 | 441 | ||
434 | #define OMAP_IRQ_BIT(irq) (1 << ((irq) % 32)) | 442 | #define OMAP_IRQ_BIT(irq) (1 << ((irq) % 32)) |
435 | 443 | ||
diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c index 9fe35348e03b..2bab4c99a234 100644 --- a/arch/arm/plat-s3c24xx/dma.c +++ b/arch/arm/plat-s3c24xx/dma.c | |||
@@ -1249,7 +1249,7 @@ static void s3c2410_dma_resume(void) | |||
1249 | struct s3c2410_dma_chan *cp = s3c2410_chans + dma_channels - 1; | 1249 | struct s3c2410_dma_chan *cp = s3c2410_chans + dma_channels - 1; |
1250 | int channel; | 1250 | int channel; |
1251 | 1251 | ||
1252 | for (channel = dma_channels - 1; channel >= 0; cp++, channel--) | 1252 | for (channel = dma_channels - 1; channel >= 0; cp--, channel--) |
1253 | s3c2410_dma_resume_chan(cp); | 1253 | s3c2410_dma_resume_chan(cp); |
1254 | } | 1254 | } |
1255 | 1255 | ||
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c index 98b864777a31..d322ba883f2f 100644 --- a/arch/arm/plat-samsung/devs.c +++ b/arch/arm/plat-samsung/devs.c | |||
@@ -1398,7 +1398,7 @@ void __init s5p_ehci_set_platdata(struct s5p_ehci_platdata *pd) | |||
1398 | 1398 | ||
1399 | #ifdef CONFIG_S3C_DEV_USB_HSOTG | 1399 | #ifdef CONFIG_S3C_DEV_USB_HSOTG |
1400 | static struct resource s3c_usb_hsotg_resources[] = { | 1400 | static struct resource s3c_usb_hsotg_resources[] = { |
1401 | [0] = DEFINE_RES_MEM(S3C_PA_USB_HSOTG, SZ_16K), | 1401 | [0] = DEFINE_RES_MEM(S3C_PA_USB_HSOTG, SZ_128K), |
1402 | [1] = DEFINE_RES_IRQ(IRQ_OTG), | 1402 | [1] = DEFINE_RES_IRQ(IRQ_OTG), |
1403 | }; | 1403 | }; |
1404 | 1404 | ||
diff --git a/arch/arm/plat-spear/time.c b/arch/arm/plat-spear/time.c index 0c77e4298675..abb5bdecd509 100644 --- a/arch/arm/plat-spear/time.c +++ b/arch/arm/plat-spear/time.c | |||
@@ -145,11 +145,13 @@ static void clockevent_set_mode(enum clock_event_mode mode, | |||
145 | static int clockevent_next_event(unsigned long cycles, | 145 | static int clockevent_next_event(unsigned long cycles, |
146 | struct clock_event_device *clk_event_dev) | 146 | struct clock_event_device *clk_event_dev) |
147 | { | 147 | { |
148 | u16 val; | 148 | u16 val = readw(gpt_base + CR(CLKEVT)); |
149 | |||
150 | if (val & CTRL_ENABLE) | ||
151 | writew(val & ~CTRL_ENABLE, gpt_base + CR(CLKEVT)); | ||
149 | 152 | ||
150 | writew(cycles, gpt_base + LOAD(CLKEVT)); | 153 | writew(cycles, gpt_base + LOAD(CLKEVT)); |
151 | 154 | ||
152 | val = readw(gpt_base + CR(CLKEVT)); | ||
153 | val |= CTRL_ENABLE | CTRL_INT_ENABLE; | 155 | val |= CTRL_ENABLE | CTRL_INT_ENABLE; |
154 | writew(val, gpt_base + CR(CLKEVT)); | 156 | writew(val, gpt_base + CR(CLKEVT)); |
155 | 157 | ||
diff --git a/arch/c6x/include/asm/processor.h b/arch/c6x/include/asm/processor.h index 8154c4ee8c9c..77ecbded1f37 100644 --- a/arch/c6x/include/asm/processor.h +++ b/arch/c6x/include/asm/processor.h | |||
@@ -122,8 +122,8 @@ extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); | |||
122 | 122 | ||
123 | extern unsigned long get_wchan(struct task_struct *p); | 123 | extern unsigned long get_wchan(struct task_struct *p); |
124 | 124 | ||
125 | #define KSTK_EIP(tsk) (task_pt_regs(task)->pc) | 125 | #define KSTK_EIP(task) (task_pt_regs(task)->pc) |
126 | #define KSTK_ESP(tsk) (task_pt_regs(task)->sp) | 126 | #define KSTK_ESP(task) (task_pt_regs(task)->sp) |
127 | 127 | ||
128 | #define cpu_relax() do { } while (0) | 128 | #define cpu_relax() do { } while (0) |
129 | 129 | ||
diff --git a/arch/mips/alchemy/common/time.c b/arch/mips/alchemy/common/time.c index 7da4d0081487..a7193ae13a5d 100644 --- a/arch/mips/alchemy/common/time.c +++ b/arch/mips/alchemy/common/time.c | |||
@@ -146,7 +146,7 @@ static int __init alchemy_time_init(unsigned int m2int) | |||
146 | cd->shift = 32; | 146 | cd->shift = 32; |
147 | cd->mult = div_sc(32768, NSEC_PER_SEC, cd->shift); | 147 | cd->mult = div_sc(32768, NSEC_PER_SEC, cd->shift); |
148 | cd->max_delta_ns = clockevent_delta2ns(0xffffffff, cd); | 148 | cd->max_delta_ns = clockevent_delta2ns(0xffffffff, cd); |
149 | cd->min_delta_ns = clockevent_delta2ns(8, cd); /* ~0.25ms */ | 149 | cd->min_delta_ns = clockevent_delta2ns(9, cd); /* ~0.28ms */ |
150 | clockevents_register_device(cd); | 150 | clockevents_register_device(cd); |
151 | setup_irq(m2int, &au1x_rtcmatch2_irqaction); | 151 | setup_irq(m2int, &au1x_rtcmatch2_irqaction); |
152 | 152 | ||
diff --git a/arch/mips/ath79/dev-wmac.c b/arch/mips/ath79/dev-wmac.c index 24f546985b69..e21507052066 100644 --- a/arch/mips/ath79/dev-wmac.c +++ b/arch/mips/ath79/dev-wmac.c | |||
@@ -96,7 +96,7 @@ void __init ath79_register_wmac(u8 *cal_data) | |||
96 | { | 96 | { |
97 | if (soc_is_ar913x()) | 97 | if (soc_is_ar913x()) |
98 | ar913x_wmac_setup(); | 98 | ar913x_wmac_setup(); |
99 | if (soc_is_ar933x()) | 99 | else if (soc_is_ar933x()) |
100 | ar933x_wmac_setup(); | 100 | ar933x_wmac_setup(); |
101 | else | 101 | else |
102 | BUG(); | 102 | BUG(); |
diff --git a/arch/mips/configs/nlm_xlp_defconfig b/arch/mips/configs/nlm_xlp_defconfig index 4479fd669ac1..28c6b276c216 100644 --- a/arch/mips/configs/nlm_xlp_defconfig +++ b/arch/mips/configs/nlm_xlp_defconfig | |||
@@ -8,7 +8,7 @@ CONFIG_HIGH_RES_TIMERS=y | |||
8 | # CONFIG_SECCOMP is not set | 8 | # CONFIG_SECCOMP is not set |
9 | CONFIG_USE_OF=y | 9 | CONFIG_USE_OF=y |
10 | CONFIG_EXPERIMENTAL=y | 10 | CONFIG_EXPERIMENTAL=y |
11 | CONFIG_CROSS_COMPILE="mips-linux-gnu-" | 11 | CONFIG_CROSS_COMPILE="" |
12 | # CONFIG_LOCALVERSION_AUTO is not set | 12 | # CONFIG_LOCALVERSION_AUTO is not set |
13 | CONFIG_SYSVIPC=y | 13 | CONFIG_SYSVIPC=y |
14 | CONFIG_POSIX_MQUEUE=y | 14 | CONFIG_POSIX_MQUEUE=y |
@@ -22,7 +22,7 @@ CONFIG_AUDIT=y | |||
22 | CONFIG_CGROUPS=y | 22 | CONFIG_CGROUPS=y |
23 | CONFIG_NAMESPACES=y | 23 | CONFIG_NAMESPACES=y |
24 | CONFIG_BLK_DEV_INITRD=y | 24 | CONFIG_BLK_DEV_INITRD=y |
25 | CONFIG_INITRAMFS_SOURCE="usr/dev_file_list usr/rootfs.xlp" | 25 | CONFIG_INITRAMFS_SOURCE="" |
26 | CONFIG_RD_BZIP2=y | 26 | CONFIG_RD_BZIP2=y |
27 | CONFIG_RD_LZMA=y | 27 | CONFIG_RD_LZMA=y |
28 | CONFIG_INITRAMFS_COMPRESSION_LZMA=y | 28 | CONFIG_INITRAMFS_COMPRESSION_LZMA=y |
diff --git a/arch/mips/configs/nlm_xlr_defconfig b/arch/mips/configs/nlm_xlr_defconfig index 7c68666fdd64..d0b857d98c91 100644 --- a/arch/mips/configs/nlm_xlr_defconfig +++ b/arch/mips/configs/nlm_xlr_defconfig | |||
@@ -8,7 +8,7 @@ CONFIG_HIGH_RES_TIMERS=y | |||
8 | CONFIG_PREEMPT_VOLUNTARY=y | 8 | CONFIG_PREEMPT_VOLUNTARY=y |
9 | CONFIG_KEXEC=y | 9 | CONFIG_KEXEC=y |
10 | CONFIG_EXPERIMENTAL=y | 10 | CONFIG_EXPERIMENTAL=y |
11 | CONFIG_CROSS_COMPILE="mips-linux-gnu-" | 11 | CONFIG_CROSS_COMPILE="" |
12 | # CONFIG_LOCALVERSION_AUTO is not set | 12 | # CONFIG_LOCALVERSION_AUTO is not set |
13 | CONFIG_SYSVIPC=y | 13 | CONFIG_SYSVIPC=y |
14 | CONFIG_POSIX_MQUEUE=y | 14 | CONFIG_POSIX_MQUEUE=y |
@@ -22,7 +22,7 @@ CONFIG_AUDIT=y | |||
22 | CONFIG_NAMESPACES=y | 22 | CONFIG_NAMESPACES=y |
23 | CONFIG_SCHED_AUTOGROUP=y | 23 | CONFIG_SCHED_AUTOGROUP=y |
24 | CONFIG_BLK_DEV_INITRD=y | 24 | CONFIG_BLK_DEV_INITRD=y |
25 | CONFIG_INITRAMFS_SOURCE="usr/dev_file_list usr/rootfs.xlr" | 25 | CONFIG_INITRAMFS_SOURCE="" |
26 | CONFIG_RD_BZIP2=y | 26 | CONFIG_RD_BZIP2=y |
27 | CONFIG_RD_LZMA=y | 27 | CONFIG_RD_LZMA=y |
28 | CONFIG_INITRAMFS_COMPRESSION_GZIP=y | 28 | CONFIG_INITRAMFS_COMPRESSION_GZIP=y |
diff --git a/arch/mips/configs/powertv_defconfig b/arch/mips/configs/powertv_defconfig index 3b0b6e8c8533..7fda0ce5f692 100644 --- a/arch/mips/configs/powertv_defconfig +++ b/arch/mips/configs/powertv_defconfig | |||
@@ -6,7 +6,7 @@ CONFIG_HZ_1000=y | |||
6 | CONFIG_PREEMPT=y | 6 | CONFIG_PREEMPT=y |
7 | # CONFIG_SECCOMP is not set | 7 | # CONFIG_SECCOMP is not set |
8 | CONFIG_EXPERIMENTAL=y | 8 | CONFIG_EXPERIMENTAL=y |
9 | CONFIG_CROSS_COMPILE="mips-linux-" | 9 | CONFIG_CROSS_COMPILE="" |
10 | # CONFIG_SWAP is not set | 10 | # CONFIG_SWAP is not set |
11 | CONFIG_SYSVIPC=y | 11 | CONFIG_SYSVIPC=y |
12 | CONFIG_LOG_BUF_SHIFT=16 | 12 | CONFIG_LOG_BUF_SHIFT=16 |
diff --git a/arch/mips/include/asm/mach-au1x00/gpio-au1300.h b/arch/mips/include/asm/mach-au1x00/gpio-au1300.h index 556e1be20bf6..fb9975c74c57 100644 --- a/arch/mips/include/asm/mach-au1x00/gpio-au1300.h +++ b/arch/mips/include/asm/mach-au1x00/gpio-au1300.h | |||
@@ -11,6 +11,9 @@ | |||
11 | #include <asm/io.h> | 11 | #include <asm/io.h> |
12 | #include <asm/mach-au1x00/au1000.h> | 12 | #include <asm/mach-au1x00/au1000.h> |
13 | 13 | ||
14 | struct gpio; | ||
15 | struct gpio_chip; | ||
16 | |||
14 | /* with the current GPIC design, up to 128 GPIOs are possible. | 17 | /* with the current GPIC design, up to 128 GPIOs are possible. |
15 | * The only implementation so far is in the Au1300, which has 75 externally | 18 | * The only implementation so far is in the Au1300, which has 75 externally |
16 | * available GPIOs. | 19 | * available GPIOs. |
@@ -203,7 +206,22 @@ static inline int gpio_request(unsigned int gpio, const char *label) | |||
203 | return 0; | 206 | return 0; |
204 | } | 207 | } |
205 | 208 | ||
206 | static inline void gpio_free(unsigned int gpio) | 209 | static inline int gpio_request_one(unsigned gpio, |
210 | unsigned long flags, const char *label) | ||
211 | { | ||
212 | return 0; | ||
213 | } | ||
214 | |||
215 | static inline int gpio_request_array(struct gpio *array, size_t num) | ||
216 | { | ||
217 | return 0; | ||
218 | } | ||
219 | |||
220 | static inline void gpio_free(unsigned gpio) | ||
221 | { | ||
222 | } | ||
223 | |||
224 | static inline void gpio_free_array(struct gpio *array, size_t num) | ||
207 | { | 225 | { |
208 | } | 226 | } |
209 | 227 | ||
diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h index d41790928c64..da9bd7d270d1 100644 --- a/arch/mips/include/asm/page.h +++ b/arch/mips/include/asm/page.h | |||
@@ -39,9 +39,6 @@ | |||
39 | #define HPAGE_MASK (~(HPAGE_SIZE - 1)) | 39 | #define HPAGE_MASK (~(HPAGE_SIZE - 1)) |
40 | #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) | 40 | #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) |
41 | #else /* !CONFIG_HUGETLB_PAGE */ | 41 | #else /* !CONFIG_HUGETLB_PAGE */ |
42 | # ifndef BUILD_BUG | ||
43 | # define BUILD_BUG() do { extern void __build_bug(void); __build_bug(); } while (0) | ||
44 | # endif | ||
45 | #define HPAGE_SHIFT ({BUILD_BUG(); 0; }) | 42 | #define HPAGE_SHIFT ({BUILD_BUG(); 0; }) |
46 | #define HPAGE_SIZE ({BUILD_BUG(); 0; }) | 43 | #define HPAGE_SIZE ({BUILD_BUG(); 0; }) |
47 | #define HPAGE_MASK ({BUILD_BUG(); 0; }) | 44 | #define HPAGE_MASK ({BUILD_BUG(); 0; }) |
diff --git a/arch/mips/kernel/smp-bmips.c b/arch/mips/kernel/smp-bmips.c index 58fe71afd879..d5e950ab8527 100644 --- a/arch/mips/kernel/smp-bmips.c +++ b/arch/mips/kernel/smp-bmips.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * SMP support for BMIPS | 8 | * SMP support for BMIPS |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/version.h> | ||
12 | #include <linux/init.h> | 11 | #include <linux/init.h> |
13 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
14 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index cc4a3f120f54..d79ae5437b58 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
@@ -1135,7 +1135,7 @@ asmlinkage void do_mt(struct pt_regs *regs) | |||
1135 | printk(KERN_DEBUG "YIELD Scheduler Exception\n"); | 1135 | printk(KERN_DEBUG "YIELD Scheduler Exception\n"); |
1136 | break; | 1136 | break; |
1137 | case 5: | 1137 | case 5: |
1138 | printk(KERN_DEBUG "Gating Storage Schedulier Exception\n"); | 1138 | printk(KERN_DEBUG "Gating Storage Scheduler Exception\n"); |
1139 | break; | 1139 | break; |
1140 | default: | 1140 | default: |
1141 | printk(KERN_DEBUG "*** UNKNOWN THREAD EXCEPTION %d ***\n", | 1141 | printk(KERN_DEBUG "*** UNKNOWN THREAD EXCEPTION %d ***\n", |
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S index a81176f44c74..924da5eb7031 100644 --- a/arch/mips/kernel/vmlinux.lds.S +++ b/arch/mips/kernel/vmlinux.lds.S | |||
@@ -69,7 +69,6 @@ SECTIONS | |||
69 | RODATA | 69 | RODATA |
70 | 70 | ||
71 | /* writeable */ | 71 | /* writeable */ |
72 | _sdata = .; /* Start of data section */ | ||
73 | .data : { /* Data */ | 72 | .data : { /* Data */ |
74 | . = . + DATAOFFSET; /* for CONFIG_MAPPED_KERNEL */ | 73 | . = . + DATAOFFSET; /* for CONFIG_MAPPED_KERNEL */ |
75 | 74 | ||
diff --git a/arch/mips/mm/fault.c b/arch/mips/mm/fault.c index 937cf3368164..69ebd586d7ff 100644 --- a/arch/mips/mm/fault.c +++ b/arch/mips/mm/fault.c | |||
@@ -42,6 +42,8 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, unsigned long writ | |||
42 | const int field = sizeof(unsigned long) * 2; | 42 | const int field = sizeof(unsigned long) * 2; |
43 | siginfo_t info; | 43 | siginfo_t info; |
44 | int fault; | 44 | int fault; |
45 | unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE | | ||
46 | (write ? FAULT_FLAG_WRITE : 0); | ||
45 | 47 | ||
46 | #if 0 | 48 | #if 0 |
47 | printk("Cpu%d[%s:%d:%0*lx:%ld:%0*lx]\n", raw_smp_processor_id(), | 49 | printk("Cpu%d[%s:%d:%0*lx:%ld:%0*lx]\n", raw_smp_processor_id(), |
@@ -91,6 +93,7 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, unsigned long writ | |||
91 | if (in_atomic() || !mm) | 93 | if (in_atomic() || !mm) |
92 | goto bad_area_nosemaphore; | 94 | goto bad_area_nosemaphore; |
93 | 95 | ||
96 | retry: | ||
94 | down_read(&mm->mmap_sem); | 97 | down_read(&mm->mmap_sem); |
95 | vma = find_vma(mm, address); | 98 | vma = find_vma(mm, address); |
96 | if (!vma) | 99 | if (!vma) |
@@ -144,7 +147,11 @@ good_area: | |||
144 | * make sure we exit gracefully rather than endlessly redo | 147 | * make sure we exit gracefully rather than endlessly redo |
145 | * the fault. | 148 | * the fault. |
146 | */ | 149 | */ |
147 | fault = handle_mm_fault(mm, vma, address, write ? FAULT_FLAG_WRITE : 0); | 150 | fault = handle_mm_fault(mm, vma, address, flags); |
151 | |||
152 | if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current)) | ||
153 | return; | ||
154 | |||
148 | perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address); | 155 | perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address); |
149 | if (unlikely(fault & VM_FAULT_ERROR)) { | 156 | if (unlikely(fault & VM_FAULT_ERROR)) { |
150 | if (fault & VM_FAULT_OOM) | 157 | if (fault & VM_FAULT_OOM) |
@@ -153,12 +160,27 @@ good_area: | |||
153 | goto do_sigbus; | 160 | goto do_sigbus; |
154 | BUG(); | 161 | BUG(); |
155 | } | 162 | } |
156 | if (fault & VM_FAULT_MAJOR) { | 163 | if (flags & FAULT_FLAG_ALLOW_RETRY) { |
157 | perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, regs, address); | 164 | if (fault & VM_FAULT_MAJOR) { |
158 | tsk->maj_flt++; | 165 | perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, |
159 | } else { | 166 | regs, address); |
160 | perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, regs, address); | 167 | tsk->maj_flt++; |
161 | tsk->min_flt++; | 168 | } else { |
169 | perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, | ||
170 | regs, address); | ||
171 | tsk->min_flt++; | ||
172 | } | ||
173 | if (fault & VM_FAULT_RETRY) { | ||
174 | flags &= ~FAULT_FLAG_ALLOW_RETRY; | ||
175 | |||
176 | /* | ||
177 | * No need to up_read(&mm->mmap_sem) as we would | ||
178 | * have already released it in __lock_page_or_retry | ||
179 | * in mm/filemap.c. | ||
180 | */ | ||
181 | |||
182 | goto retry; | ||
183 | } | ||
162 | } | 184 | } |
163 | 185 | ||
164 | up_read(&mm->mmap_sem); | 186 | up_read(&mm->mmap_sem); |
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c index aec2b111d35b..15521505ebe8 100644 --- a/arch/mips/pci/pci.c +++ b/arch/mips/pci/pci.c | |||
@@ -279,7 +279,6 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus) | |||
279 | { | 279 | { |
280 | /* Propagate hose info into the subordinate devices. */ | 280 | /* Propagate hose info into the subordinate devices. */ |
281 | 281 | ||
282 | struct list_head *ln; | ||
283 | struct pci_dev *dev = bus->self; | 282 | struct pci_dev *dev = bus->self; |
284 | 283 | ||
285 | if (pci_probe_only && dev && | 284 | if (pci_probe_only && dev && |
@@ -288,9 +287,7 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus) | |||
288 | pcibios_fixup_device_resources(dev, bus); | 287 | pcibios_fixup_device_resources(dev, bus); |
289 | } | 288 | } |
290 | 289 | ||
291 | for (ln = bus->devices.next; ln != &bus->devices; ln = ln->next) { | 290 | list_for_each_entry(dev, &bus->devices, bus_list) { |
292 | dev = pci_dev_b(ln); | ||
293 | |||
294 | if ((dev->class >> 8) != PCI_CLASS_BRIDGE_PCI) | 291 | if ((dev->class >> 8) != PCI_CLASS_BRIDGE_PCI) |
295 | pcibios_fixup_device_resources(dev, bus); | 292 | pcibios_fixup_device_resources(dev, bus); |
296 | } | 293 | } |
diff --git a/arch/mips/pmc-sierra/yosemite/ht-irq.c b/arch/mips/pmc-sierra/yosemite/ht-irq.c index 86b98e98fb4f..62ead6601c69 100644 --- a/arch/mips/pmc-sierra/yosemite/ht-irq.c +++ b/arch/mips/pmc-sierra/yosemite/ht-irq.c | |||
@@ -35,16 +35,6 @@ | |||
35 | */ | 35 | */ |
36 | void __init titan_ht_pcibios_fixup_bus(struct pci_bus *bus) | 36 | void __init titan_ht_pcibios_fixup_bus(struct pci_bus *bus) |
37 | { | 37 | { |
38 | struct pci_bus *current_bus = bus; | ||
39 | struct pci_dev *devices; | ||
40 | struct list_head *devices_link; | ||
41 | |||
42 | list_for_each(devices_link, &(current_bus->devices)) { | ||
43 | devices = pci_dev_b(devices_link); | ||
44 | if (devices == NULL) | ||
45 | continue; | ||
46 | } | ||
47 | |||
48 | /* | 38 | /* |
49 | * PLX and SPKT related changes go here | 39 | * PLX and SPKT related changes go here |
50 | */ | 40 | */ |
diff --git a/arch/mips/txx9/generic/7segled.c b/arch/mips/txx9/generic/7segled.c index 8e93b2122524..4642f56e70e5 100644 --- a/arch/mips/txx9/generic/7segled.c +++ b/arch/mips/txx9/generic/7segled.c | |||
@@ -102,7 +102,7 @@ static int __init tx_7segled_init_sysfs(void) | |||
102 | break; | 102 | break; |
103 | } | 103 | } |
104 | dev->id = i; | 104 | dev->id = i; |
105 | dev->dev = &tx_7segled_subsys; | 105 | dev->bus = &tx_7segled_subsys; |
106 | error = device_register(dev); | 106 | error = device_register(dev); |
107 | if (!error) { | 107 | if (!error) { |
108 | device_create_file(dev, &dev_attr_ascii); | 108 | device_create_file(dev, &dev_attr_ascii); |
diff --git a/arch/x86/ia32/ia32_aout.c b/arch/x86/ia32/ia32_aout.c index fd843877e841..39e49091f648 100644 --- a/arch/x86/ia32/ia32_aout.c +++ b/arch/x86/ia32/ia32_aout.c | |||
@@ -315,6 +315,13 @@ static int load_aout_binary(struct linux_binprm *bprm, struct pt_regs *regs) | |||
315 | current->mm->free_area_cache = TASK_UNMAPPED_BASE; | 315 | current->mm->free_area_cache = TASK_UNMAPPED_BASE; |
316 | current->mm->cached_hole_size = 0; | 316 | current->mm->cached_hole_size = 0; |
317 | 317 | ||
318 | retval = setup_arg_pages(bprm, IA32_STACK_TOP, EXSTACK_DEFAULT); | ||
319 | if (retval < 0) { | ||
320 | /* Someone check-me: is this error path enough? */ | ||
321 | send_sig(SIGKILL, current, 0); | ||
322 | return retval; | ||
323 | } | ||
324 | |||
318 | install_exec_creds(bprm); | 325 | install_exec_creds(bprm); |
319 | current->flags &= ~PF_FORKNOEXEC; | 326 | current->flags &= ~PF_FORKNOEXEC; |
320 | 327 | ||
@@ -410,13 +417,6 @@ beyond_if: | |||
410 | 417 | ||
411 | set_brk(current->mm->start_brk, current->mm->brk); | 418 | set_brk(current->mm->start_brk, current->mm->brk); |
412 | 419 | ||
413 | retval = setup_arg_pages(bprm, IA32_STACK_TOP, EXSTACK_DEFAULT); | ||
414 | if (retval < 0) { | ||
415 | /* Someone check-me: is this error path enough? */ | ||
416 | send_sig(SIGKILL, current, 0); | ||
417 | return retval; | ||
418 | } | ||
419 | |||
420 | current->mm->start_stack = | 420 | current->mm->start_stack = |
421 | (unsigned long)create_aout_tables((char __user *)bprm->p, bprm); | 421 | (unsigned long)create_aout_tables((char __user *)bprm->p, bprm); |
422 | /* start thread */ | 422 | /* start thread */ |
diff --git a/arch/x86/lib/delay.c b/arch/x86/lib/delay.c index fc45ba887d05..e395693abdb1 100644 --- a/arch/x86/lib/delay.c +++ b/arch/x86/lib/delay.c | |||
@@ -48,9 +48,9 @@ static void delay_loop(unsigned long loops) | |||
48 | } | 48 | } |
49 | 49 | ||
50 | /* TSC based delay: */ | 50 | /* TSC based delay: */ |
51 | static void delay_tsc(unsigned long loops) | 51 | static void delay_tsc(unsigned long __loops) |
52 | { | 52 | { |
53 | unsigned long bclock, now; | 53 | u32 bclock, now, loops = __loops; |
54 | int cpu; | 54 | int cpu; |
55 | 55 | ||
56 | preempt_disable(); | 56 | preempt_disable(); |
diff --git a/arch/x86/mm/hugetlbpage.c b/arch/x86/mm/hugetlbpage.c index f581a18c0d4d..8ecbb4bba4b3 100644 --- a/arch/x86/mm/hugetlbpage.c +++ b/arch/x86/mm/hugetlbpage.c | |||
@@ -333,13 +333,15 @@ try_again: | |||
333 | * Lookup failure means no vma is above this address, | 333 | * Lookup failure means no vma is above this address, |
334 | * i.e. return with success: | 334 | * i.e. return with success: |
335 | */ | 335 | */ |
336 | if (!(vma = find_vma_prev(mm, addr, &prev_vma))) | 336 | vma = find_vma(mm, addr); |
337 | if (!vma) | ||
337 | return addr; | 338 | return addr; |
338 | 339 | ||
339 | /* | 340 | /* |
340 | * new region fits between prev_vma->vm_end and | 341 | * new region fits between prev_vma->vm_end and |
341 | * vma->vm_start, use it: | 342 | * vma->vm_start, use it: |
342 | */ | 343 | */ |
344 | prev_vma = vma->vm_prev; | ||
343 | if (addr + len <= vma->vm_start && | 345 | if (addr + len <= vma->vm_start && |
344 | (!prev_vma || (addr >= prev_vma->vm_end))) { | 346 | (!prev_vma || (addr >= prev_vma->vm_end))) { |
345 | /* remember the address as a hint for next time */ | 347 | /* remember the address as a hint for next time */ |
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index a312e76063a7..49a5cb55429b 100644 --- a/arch/x86/pci/acpi.c +++ b/arch/x86/pci/acpi.c | |||
@@ -60,6 +60,16 @@ static const struct dmi_system_id pci_use_crs_table[] __initconst = { | |||
60 | DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."), | 60 | DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."), |
61 | }, | 61 | }, |
62 | }, | 62 | }, |
63 | /* https://bugzilla.kernel.org/show_bug.cgi?id=42619 */ | ||
64 | { | ||
65 | .callback = set_use_crs, | ||
66 | .ident = "MSI MS-7253", | ||
67 | .matches = { | ||
68 | DMI_MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"), | ||
69 | DMI_MATCH(DMI_BOARD_NAME, "MS-7253"), | ||
70 | DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies, LTD"), | ||
71 | }, | ||
72 | }, | ||
63 | 73 | ||
64 | /* Now for the blacklist.. */ | 74 | /* Now for the blacklist.. */ |
65 | 75 | ||
@@ -282,9 +292,6 @@ static void add_resources(struct pci_root_info *info) | |||
282 | int i; | 292 | int i; |
283 | struct resource *res, *root, *conflict; | 293 | struct resource *res, *root, *conflict; |
284 | 294 | ||
285 | if (!pci_use_crs) | ||
286 | return; | ||
287 | |||
288 | coalesce_windows(info, IORESOURCE_MEM); | 295 | coalesce_windows(info, IORESOURCE_MEM); |
289 | coalesce_windows(info, IORESOURCE_IO); | 296 | coalesce_windows(info, IORESOURCE_IO); |
290 | 297 | ||
@@ -336,8 +343,13 @@ get_current_resources(struct acpi_device *device, int busnum, | |||
336 | acpi_walk_resources(device->handle, METHOD_NAME__CRS, setup_resource, | 343 | acpi_walk_resources(device->handle, METHOD_NAME__CRS, setup_resource, |
337 | &info); | 344 | &info); |
338 | 345 | ||
339 | add_resources(&info); | 346 | if (pci_use_crs) { |
340 | return; | 347 | add_resources(&info); |
348 | |||
349 | return; | ||
350 | } | ||
351 | |||
352 | kfree(info.name); | ||
341 | 353 | ||
342 | name_alloc_fail: | 354 | name_alloc_fail: |
343 | kfree(info.res); | 355 | kfree(info.res); |