diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-03-24 15:13:59 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-03-24 15:13:59 -0400 |
commit | 83fe628e16d84efc8df2731bc403eae4e4f53801 (patch) | |
tree | 9a51c292235621d0f4f632c2a55ddb5a6ab582af /arch/arm | |
parent | 853a0231e057c04255a848f6998f84faaa635c58 (diff) | |
parent | 426f1af947c61dee48a9267f84bff227e503a547 (diff) |
Merge branch 'renesas/soc' into next/soc2
Diffstat (limited to 'arch/arm')
65 files changed, 454 insertions, 433 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 7d809b7e0504..87693e631129 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -1286,7 +1286,7 @@ config ARM_ERRATA_743622 | |||
1286 | depends on CPU_V7 | 1286 | depends on CPU_V7 |
1287 | help | 1287 | help |
1288 | This option enables the workaround for the 743622 Cortex-A9 | 1288 | This option enables the workaround for the 743622 Cortex-A9 |
1289 | (r2p0..r2p2) erratum. Under very rare conditions, a faulty | 1289 | (r2p*) erratum. Under very rare conditions, a faulty |
1290 | optimisation in the Cortex-A9 Store Buffer may lead to data | 1290 | optimisation in the Cortex-A9 Store Buffer may lead to data |
1291 | corruption. This workaround sets a specific bit in the diagnostic | 1291 | corruption. This workaround sets a specific bit in the diagnostic |
1292 | register of the Cortex-A9 which disables the Store Buffer | 1292 | 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/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/vision_ep9307.c b/arch/arm/mach-ep93xx/vision_ep9307.c index d5fb44f16d31..d67d0b4feb6f 100644 --- a/arch/arm/mach-ep93xx/vision_ep9307.c +++ b/arch/arm/mach-ep93xx/vision_ep9307.c | |||
@@ -34,6 +34,7 @@ | |||
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> |
@@ -361,6 +362,7 @@ MACHINE_START(VISION_EP9307, "Vision Engraving Systems EP9307") | |||
361 | .atag_offset = 0x100, | 362 | .atag_offset = 0x100, |
362 | .map_io = vision_map_io, | 363 | .map_io = vision_map_io, |
363 | .init_irq = ep93xx_init_irq, | 364 | .init_irq = ep93xx_init_irq, |
365 | .handle_irq = vic_handle_irq, | ||
364 | .timer = &ep93xx_timer, | 366 | .timer = &ep93xx_timer, |
365 | .init_machine = vision_init_machine, | 367 | .init_machine = vision_init_machine, |
366 | .restart = ep93xx_restart, | 368 | .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-s3c2440/common.h b/arch/arm/mach-s3c2440/common.h index db8a98ac68c5..0c1eb1dfc534 100644 --- a/arch/arm/mach-s3c2440/common.h +++ b/arch/arm/mach-s3c2440/common.h | |||
@@ -12,6 +12,6 @@ | |||
12 | #ifndef __ARCH_ARM_MACH_S3C2440_COMMON_H | 12 | #ifndef __ARCH_ARM_MACH_S3C2440_COMMON_H |
13 | #define __ARCH_ARM_MACH_S3C2440_COMMON_H | 13 | #define __ARCH_ARM_MACH_S3C2440_COMMON_H |
14 | 14 | ||
15 | void s3c2440_restart(char mode, const char *cmd); | 15 | void s3c244x_restart(char mode, const char *cmd); |
16 | 16 | ||
17 | #endif /* __ARCH_ARM_MACH_S3C2440_COMMON_H */ | 17 | #endif /* __ARCH_ARM_MACH_S3C2440_COMMON_H */ |
diff --git a/arch/arm/mach-s3c2440/mach-anubis.c b/arch/arm/mach-s3c2440/mach-anubis.c index 24569550de1a..19b577bc09b8 100644 --- a/arch/arm/mach-s3c2440/mach-anubis.c +++ b/arch/arm/mach-s3c2440/mach-anubis.c | |||
@@ -487,5 +487,5 @@ MACHINE_START(ANUBIS, "Simtec-Anubis") | |||
487 | .init_machine = anubis_init, | 487 | .init_machine = anubis_init, |
488 | .init_irq = s3c24xx_init_irq, | 488 | .init_irq = s3c24xx_init_irq, |
489 | .timer = &s3c24xx_timer, | 489 | .timer = &s3c24xx_timer, |
490 | .restart = s3c2440_restart, | 490 | .restart = s3c244x_restart, |
491 | MACHINE_END | 491 | MACHINE_END |
diff --git a/arch/arm/mach-s3c2440/mach-at2440evb.c b/arch/arm/mach-s3c2440/mach-at2440evb.c index d6a9763110cd..d7ae49c90118 100644 --- a/arch/arm/mach-s3c2440/mach-at2440evb.c +++ b/arch/arm/mach-s3c2440/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-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c index 7365a441cc5c..cfd20202e944 100644 --- a/arch/arm/mach-s3c2440/mach-gta02.c +++ b/arch/arm/mach-s3c2440/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-s3c2440/mach-mini2440.c b/arch/arm/mach-s3c2440/mach-mini2440.c index adbbb85bc4cd..5d66fb218a41 100644 --- a/arch/arm/mach-s3c2440/mach-mini2440.c +++ b/arch/arm/mach-s3c2440/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-s3c2440/mach-nexcoder.c b/arch/arm/mach-s3c2440/mach-nexcoder.c index 40eaf844bc1f..5198e3e1c5be 100644 --- a/arch/arm/mach-s3c2440/mach-nexcoder.c +++ b/arch/arm/mach-s3c2440/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-s3c2440/mach-osiris.c b/arch/arm/mach-s3c2440/mach-osiris.c index 4c480ef734f6..c5daeb612a88 100644 --- a/arch/arm/mach-s3c2440/mach-osiris.c +++ b/arch/arm/mach-s3c2440/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-s3c2440/mach-rx1950.c b/arch/arm/mach-s3c2440/mach-rx1950.c index 4a8e2d34994c..200debb4c72d 100644 --- a/arch/arm/mach-s3c2440/mach-rx1950.c +++ b/arch/arm/mach-s3c2440/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-s3c2440/mach-rx3715.c b/arch/arm/mach-s3c2440/mach-rx3715.c index 20103bafbd4b..56af35447598 100644 --- a/arch/arm/mach-s3c2440/mach-rx3715.c +++ b/arch/arm/mach-s3c2440/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-s3c2440/mach-smdk2440.c b/arch/arm/mach-s3c2440/mach-smdk2440.c index 1deb60d12a60..83a1036d7dcb 100644 --- a/arch/arm/mach-s3c2440/mach-smdk2440.c +++ b/arch/arm/mach-s3c2440/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-s3c2440/s3c2440.c b/arch/arm/mach-s3c2440/s3c2440.c index 517623a09fc5..2b3dddb49af7 100644 --- a/arch/arm/mach-s3c2440/s3c2440.c +++ b/arch/arm/mach-s3c2440/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-s3c2440/s3c244x.c b/arch/arm/mach-s3c2440/s3c244x.c index 36bc60f61d0a..d15852f642b7 100644 --- a/arch/arm/mach-s3c2440/s3c244x.c +++ b/arch/arm/mach-s3c2440/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-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c index 068b754bc348..bd7953b59a84 100644 --- a/arch/arm/mach-shmobile/board-ag5evm.c +++ b/arch/arm/mach-shmobile/board-ag5evm.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/mmc/sh_mobile_sdhi.h> | 38 | #include <linux/mmc/sh_mobile_sdhi.h> |
39 | #include <linux/mfd/tmio.h> | 39 | #include <linux/mfd/tmio.h> |
40 | #include <linux/sh_clk.h> | 40 | #include <linux/sh_clk.h> |
41 | #include <linux/videodev2.h> | ||
41 | #include <video/sh_mobile_lcdc.h> | 42 | #include <video/sh_mobile_lcdc.h> |
42 | #include <video/sh_mipi_dsi.h> | 43 | #include <video/sh_mipi_dsi.h> |
43 | #include <sound/sh_fsi.h> | 44 | #include <sound/sh_fsi.h> |
@@ -46,8 +47,6 @@ | |||
46 | #include <mach/common.h> | 47 | #include <mach/common.h> |
47 | #include <asm/mach-types.h> | 48 | #include <asm/mach-types.h> |
48 | #include <asm/mach/arch.h> | 49 | #include <asm/mach/arch.h> |
49 | #include <asm/mach/map.h> | ||
50 | #include <asm/mach/time.h> | ||
51 | #include <asm/hardware/gic.h> | 50 | #include <asm/hardware/gic.h> |
52 | #include <asm/hardware/cache-l2x0.h> | 51 | #include <asm/hardware/cache-l2x0.h> |
53 | #include <asm/traps.h> | 52 | #include <asm/traps.h> |
@@ -486,27 +485,6 @@ static struct platform_device *ag5evm_devices[] __initdata = { | |||
486 | &sdhi1_device, | 485 | &sdhi1_device, |
487 | }; | 486 | }; |
488 | 487 | ||
489 | static struct map_desc ag5evm_io_desc[] __initdata = { | ||
490 | /* create a 1:1 entity map for 0xe6xxxxxx | ||
491 | * used by CPGA, INTC and PFC. | ||
492 | */ | ||
493 | { | ||
494 | .virtual = 0xe6000000, | ||
495 | .pfn = __phys_to_pfn(0xe6000000), | ||
496 | .length = 256 << 20, | ||
497 | .type = MT_DEVICE_NONSHARED | ||
498 | }, | ||
499 | }; | ||
500 | |||
501 | static void __init ag5evm_map_io(void) | ||
502 | { | ||
503 | iotable_init(ag5evm_io_desc, ARRAY_SIZE(ag5evm_io_desc)); | ||
504 | |||
505 | /* setup early devices and console here as well */ | ||
506 | sh73a0_add_early_devices(); | ||
507 | shmobile_setup_console(); | ||
508 | } | ||
509 | |||
510 | static void __init ag5evm_init(void) | 488 | static void __init ag5evm_init(void) |
511 | { | 489 | { |
512 | sh73a0_pinmux_init(); | 490 | sh73a0_pinmux_init(); |
@@ -622,22 +600,12 @@ static void __init ag5evm_init(void) | |||
622 | platform_add_devices(ag5evm_devices, ARRAY_SIZE(ag5evm_devices)); | 600 | platform_add_devices(ag5evm_devices, ARRAY_SIZE(ag5evm_devices)); |
623 | } | 601 | } |
624 | 602 | ||
625 | static void __init ag5evm_timer_init(void) | ||
626 | { | ||
627 | sh73a0_clock_init(); | ||
628 | shmobile_timer.init(); | ||
629 | return; | ||
630 | } | ||
631 | |||
632 | struct sys_timer ag5evm_timer = { | ||
633 | .init = ag5evm_timer_init, | ||
634 | }; | ||
635 | |||
636 | MACHINE_START(AG5EVM, "ag5evm") | 603 | MACHINE_START(AG5EVM, "ag5evm") |
637 | .map_io = ag5evm_map_io, | 604 | .map_io = sh73a0_map_io, |
605 | .init_early = sh73a0_add_early_devices, | ||
638 | .nr_irqs = NR_IRQS_LEGACY, | 606 | .nr_irqs = NR_IRQS_LEGACY, |
639 | .init_irq = sh73a0_init_irq, | 607 | .init_irq = sh73a0_init_irq, |
640 | .handle_irq = gic_handle_irq, | 608 | .handle_irq = gic_handle_irq, |
641 | .init_machine = ag5evm_init, | 609 | .init_machine = ag5evm_init, |
642 | .timer = &ag5evm_timer, | 610 | .timer = &shmobile_timer, |
643 | MACHINE_END | 611 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index eeb4d9664584..c92c00527123 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c | |||
@@ -61,8 +61,6 @@ | |||
61 | 61 | ||
62 | #include <asm/mach-types.h> | 62 | #include <asm/mach-types.h> |
63 | #include <asm/mach/arch.h> | 63 | #include <asm/mach/arch.h> |
64 | #include <asm/mach/map.h> | ||
65 | #include <asm/mach/time.h> | ||
66 | #include <asm/setup.h> | 64 | #include <asm/setup.h> |
67 | 65 | ||
68 | /* | 66 | /* |
@@ -794,7 +792,7 @@ static struct fsi_ak4642_info fsi2_ak4643_info = { | |||
794 | static struct platform_device fsi_ak4643_device = { | 792 | static struct platform_device fsi_ak4643_device = { |
795 | .name = "fsi-ak4642-audio", | 793 | .name = "fsi-ak4642-audio", |
796 | .dev = { | 794 | .dev = { |
797 | .platform_data = &fsi_info, | 795 | .platform_data = &fsi2_ak4643_info, |
798 | }, | 796 | }, |
799 | }; | 797 | }; |
800 | 798 | ||
@@ -1190,26 +1188,6 @@ static struct i2c_board_info i2c1_devices[] = { | |||
1190 | }, | 1188 | }, |
1191 | }; | 1189 | }; |
1192 | 1190 | ||
1193 | static struct map_desc ap4evb_io_desc[] __initdata = { | ||
1194 | /* create a 1:1 entity map for 0xe6xxxxxx | ||
1195 | * used by CPGA, INTC and PFC. | ||
1196 | */ | ||
1197 | { | ||
1198 | .virtual = 0xe6000000, | ||
1199 | .pfn = __phys_to_pfn(0xe6000000), | ||
1200 | .length = 256 << 20, | ||
1201 | .type = MT_DEVICE_NONSHARED | ||
1202 | }, | ||
1203 | }; | ||
1204 | |||
1205 | static void __init ap4evb_map_io(void) | ||
1206 | { | ||
1207 | iotable_init(ap4evb_io_desc, ARRAY_SIZE(ap4evb_io_desc)); | ||
1208 | |||
1209 | /* setup early devices and console here as well */ | ||
1210 | sh7372_add_early_devices(); | ||
1211 | shmobile_setup_console(); | ||
1212 | } | ||
1213 | 1191 | ||
1214 | #define GPIO_PORT9CR 0xE6051009 | 1192 | #define GPIO_PORT9CR 0xE6051009 |
1215 | #define GPIO_PORT10CR 0xE605100A | 1193 | #define GPIO_PORT10CR 0xE605100A |
@@ -1219,6 +1197,9 @@ static void __init ap4evb_init(void) | |||
1219 | u32 srcr4; | 1197 | u32 srcr4; |
1220 | struct clk *clk; | 1198 | struct clk *clk; |
1221 | 1199 | ||
1200 | /* External clock source */ | ||
1201 | clk_set_rate(&sh7372_dv_clki_clk, 27000000); | ||
1202 | |||
1222 | sh7372_pinmux_init(); | 1203 | sh7372_pinmux_init(); |
1223 | 1204 | ||
1224 | /* enable SCIFA0 */ | 1205 | /* enable SCIFA0 */ |
@@ -1455,23 +1436,11 @@ static void __init ap4evb_init(void) | |||
1455 | pm_clk_add(&lcdc1_device.dev, "hdmi"); | 1436 | pm_clk_add(&lcdc1_device.dev, "hdmi"); |
1456 | } | 1437 | } |
1457 | 1438 | ||
1458 | static void __init ap4evb_timer_init(void) | ||
1459 | { | ||
1460 | sh7372_clock_init(); | ||
1461 | shmobile_timer.init(); | ||
1462 | |||
1463 | /* External clock source */ | ||
1464 | clk_set_rate(&sh7372_dv_clki_clk, 27000000); | ||
1465 | } | ||
1466 | |||
1467 | static struct sys_timer ap4evb_timer = { | ||
1468 | .init = ap4evb_timer_init, | ||
1469 | }; | ||
1470 | |||
1471 | MACHINE_START(AP4EVB, "ap4evb") | 1439 | MACHINE_START(AP4EVB, "ap4evb") |
1472 | .map_io = ap4evb_map_io, | 1440 | .map_io = sh7372_map_io, |
1441 | .init_early = sh7372_add_early_devices, | ||
1473 | .init_irq = sh7372_init_irq, | 1442 | .init_irq = sh7372_init_irq, |
1474 | .handle_irq = shmobile_handle_irq_intc, | 1443 | .handle_irq = shmobile_handle_irq_intc, |
1475 | .init_machine = ap4evb_init, | 1444 | .init_machine = ap4evb_init, |
1476 | .timer = &ap4evb_timer, | 1445 | .timer = &shmobile_timer, |
1477 | MACHINE_END | 1446 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/board-bonito.c b/arch/arm/mach-shmobile/board-bonito.c index 4d2201622323..396814a6a2c9 100644 --- a/arch/arm/mach-shmobile/board-bonito.c +++ b/arch/arm/mach-shmobile/board-bonito.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/platform_device.h> | 27 | #include <linux/platform_device.h> |
28 | #include <linux/gpio.h> | 28 | #include <linux/gpio.h> |
29 | #include <linux/smsc911x.h> | 29 | #include <linux/smsc911x.h> |
30 | #include <linux/videodev2.h> | ||
30 | #include <mach/common.h> | 31 | #include <mach/common.h> |
31 | #include <asm/mach-types.h> | 32 | #include <asm/mach-types.h> |
32 | #include <asm/mach/arch.h> | 33 | #include <asm/mach/arch.h> |
@@ -241,7 +242,7 @@ static struct sh_mobile_lcdc_info lcdc0_info = { | |||
241 | .clock_source = LCDC_CLK_BUS, | 242 | .clock_source = LCDC_CLK_BUS, |
242 | .ch[0] = { | 243 | .ch[0] = { |
243 | .chan = LCDC_CHAN_MAINLCD, | 244 | .chan = LCDC_CHAN_MAINLCD, |
244 | .bpp = 16, | 245 | .fourcc = V4L2_PIX_FMT_RGB565, |
245 | .interface_type = RGB24, | 246 | .interface_type = RGB24, |
246 | .clock_divider = 5, | 247 | .clock_divider = 5, |
247 | .flags = 0, | 248 | .flags = 0, |
@@ -327,28 +328,6 @@ static struct platform_device *bonito_base_devices[] __initdata = { | |||
327 | * map I/O | 328 | * map I/O |
328 | */ | 329 | */ |
329 | static struct map_desc bonito_io_desc[] __initdata = { | 330 | static struct map_desc bonito_io_desc[] __initdata = { |
330 | /* | ||
331 | * for CPGA/INTC/PFC | ||
332 | * 0xe6000000-0xefffffff -> 0xe6000000-0xefffffff | ||
333 | */ | ||
334 | { | ||
335 | .virtual = 0xe6000000, | ||
336 | .pfn = __phys_to_pfn(0xe6000000), | ||
337 | .length = 160 << 20, | ||
338 | .type = MT_DEVICE_NONSHARED | ||
339 | }, | ||
340 | #ifdef CONFIG_CACHE_L2X0 | ||
341 | /* | ||
342 | * for l2x0_init() | ||
343 | * 0xf0100000-0xf0101000 -> 0xf0002000-0xf0003000 | ||
344 | */ | ||
345 | { | ||
346 | .virtual = 0xf0002000, | ||
347 | .pfn = __phys_to_pfn(0xf0100000), | ||
348 | .length = PAGE_SIZE, | ||
349 | .type = MT_DEVICE_NONSHARED | ||
350 | }, | ||
351 | #endif | ||
352 | /* | 331 | /* |
353 | * for FPGA (0x1800000-0x19ffffff) | 332 | * for FPGA (0x1800000-0x19ffffff) |
354 | * 0x18000000-0x18002000 -> 0xf0003000-0xf0005000 | 333 | * 0x18000000-0x18002000 -> 0xf0003000-0xf0005000 |
@@ -363,11 +342,8 @@ static struct map_desc bonito_io_desc[] __initdata = { | |||
363 | 342 | ||
364 | static void __init bonito_map_io(void) | 343 | static void __init bonito_map_io(void) |
365 | { | 344 | { |
345 | r8a7740_map_io(); | ||
366 | iotable_init(bonito_io_desc, ARRAY_SIZE(bonito_io_desc)); | 346 | iotable_init(bonito_io_desc, ARRAY_SIZE(bonito_io_desc)); |
367 | |||
368 | /* setup early devices and console here as well */ | ||
369 | r8a7740_add_early_devices(); | ||
370 | shmobile_setup_console(); | ||
371 | } | 347 | } |
372 | 348 | ||
373 | /* | 349 | /* |
@@ -491,7 +467,7 @@ static void __init bonito_init(void) | |||
491 | } | 467 | } |
492 | } | 468 | } |
493 | 469 | ||
494 | static void __init bonito_timer_init(void) | 470 | static void __init bonito_earlytimer_init(void) |
495 | { | 471 | { |
496 | u16 val; | 472 | u16 val; |
497 | u8 md_ck = 0; | 473 | u8 md_ck = 0; |
@@ -506,17 +482,22 @@ static void __init bonito_timer_init(void) | |||
506 | md_ck |= MD_CK0; | 482 | md_ck |= MD_CK0; |
507 | 483 | ||
508 | r8a7740_clock_init(md_ck); | 484 | r8a7740_clock_init(md_ck); |
509 | shmobile_timer.init(); | 485 | shmobile_earlytimer_init(); |
510 | } | 486 | } |
511 | 487 | ||
512 | struct sys_timer bonito_timer = { | 488 | void __init bonito_add_early_devices(void) |
513 | .init = bonito_timer_init, | 489 | { |
514 | }; | 490 | r8a7740_add_early_devices(); |
491 | |||
492 | /* override timer setup with board-specific code */ | ||
493 | shmobile_timer.init = bonito_earlytimer_init; | ||
494 | } | ||
515 | 495 | ||
516 | MACHINE_START(BONITO, "bonito") | 496 | MACHINE_START(BONITO, "bonito") |
517 | .map_io = bonito_map_io, | 497 | .map_io = bonito_map_io, |
498 | .init_early = bonito_add_early_devices, | ||
518 | .init_irq = r8a7740_init_irq, | 499 | .init_irq = r8a7740_init_irq, |
519 | .handle_irq = shmobile_handle_irq_intc, | 500 | .handle_irq = shmobile_handle_irq_intc, |
520 | .init_machine = bonito_init, | 501 | .init_machine = bonito_init, |
521 | .timer = &bonito_timer, | 502 | .timer = &shmobile_timer, |
522 | MACHINE_END | 503 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/board-g3evm.c b/arch/arm/mach-shmobile/board-g3evm.c index 72d557281b1f..b627e89037f5 100644 --- a/arch/arm/mach-shmobile/board-g3evm.c +++ b/arch/arm/mach-shmobile/board-g3evm.c | |||
@@ -37,8 +37,6 @@ | |||
37 | #include <mach/common.h> | 37 | #include <mach/common.h> |
38 | #include <asm/mach-types.h> | 38 | #include <asm/mach-types.h> |
39 | #include <asm/mach/arch.h> | 39 | #include <asm/mach/arch.h> |
40 | #include <asm/mach/map.h> | ||
41 | #include <asm/mach/time.h> | ||
42 | 40 | ||
43 | /* | 41 | /* |
44 | * IrDA | 42 | * IrDA |
@@ -246,27 +244,6 @@ static struct platform_device *g3evm_devices[] __initdata = { | |||
246 | &irda_device, | 244 | &irda_device, |
247 | }; | 245 | }; |
248 | 246 | ||
249 | static struct map_desc g3evm_io_desc[] __initdata = { | ||
250 | /* create a 1:1 entity map for 0xe6xxxxxx | ||
251 | * used by CPGA, INTC and PFC. | ||
252 | */ | ||
253 | { | ||
254 | .virtual = 0xe6000000, | ||
255 | .pfn = __phys_to_pfn(0xe6000000), | ||
256 | .length = 256 << 20, | ||
257 | .type = MT_DEVICE_NONSHARED | ||
258 | }, | ||
259 | }; | ||
260 | |||
261 | static void __init g3evm_map_io(void) | ||
262 | { | ||
263 | iotable_init(g3evm_io_desc, ARRAY_SIZE(g3evm_io_desc)); | ||
264 | |||
265 | /* setup early devices and console here as well */ | ||
266 | sh7367_add_early_devices(); | ||
267 | shmobile_setup_console(); | ||
268 | } | ||
269 | |||
270 | static void __init g3evm_init(void) | 247 | static void __init g3evm_init(void) |
271 | { | 248 | { |
272 | sh7367_pinmux_init(); | 249 | sh7367_pinmux_init(); |
@@ -354,20 +331,11 @@ static void __init g3evm_init(void) | |||
354 | platform_add_devices(g3evm_devices, ARRAY_SIZE(g3evm_devices)); | 331 | platform_add_devices(g3evm_devices, ARRAY_SIZE(g3evm_devices)); |
355 | } | 332 | } |
356 | 333 | ||
357 | static void __init g3evm_timer_init(void) | ||
358 | { | ||
359 | sh7367_clock_init(); | ||
360 | shmobile_timer.init(); | ||
361 | } | ||
362 | |||
363 | static struct sys_timer g3evm_timer = { | ||
364 | .init = g3evm_timer_init, | ||
365 | }; | ||
366 | |||
367 | MACHINE_START(G3EVM, "g3evm") | 334 | MACHINE_START(G3EVM, "g3evm") |
368 | .map_io = g3evm_map_io, | 335 | .map_io = sh7367_map_io, |
336 | .init_early = sh7367_add_early_devices, | ||
369 | .init_irq = sh7367_init_irq, | 337 | .init_irq = sh7367_init_irq, |
370 | .handle_irq = shmobile_handle_irq_intc, | 338 | .handle_irq = shmobile_handle_irq_intc, |
371 | .init_machine = g3evm_init, | 339 | .init_machine = g3evm_init, |
372 | .timer = &g3evm_timer, | 340 | .timer = &shmobile_timer, |
373 | MACHINE_END | 341 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/board-g4evm.c b/arch/arm/mach-shmobile/board-g4evm.c index 2220b885cff5..46d757d2759d 100644 --- a/arch/arm/mach-shmobile/board-g4evm.c +++ b/arch/arm/mach-shmobile/board-g4evm.c | |||
@@ -38,8 +38,6 @@ | |||
38 | #include <mach/common.h> | 38 | #include <mach/common.h> |
39 | #include <asm/mach-types.h> | 39 | #include <asm/mach-types.h> |
40 | #include <asm/mach/arch.h> | 40 | #include <asm/mach/arch.h> |
41 | #include <asm/mach/map.h> | ||
42 | #include <asm/mach/time.h> | ||
43 | 41 | ||
44 | /* | 42 | /* |
45 | * SDHI | 43 | * SDHI |
@@ -260,27 +258,6 @@ static struct platform_device *g4evm_devices[] __initdata = { | |||
260 | &sdhi1_device, | 258 | &sdhi1_device, |
261 | }; | 259 | }; |
262 | 260 | ||
263 | static struct map_desc g4evm_io_desc[] __initdata = { | ||
264 | /* create a 1:1 entity map for 0xe6xxxxxx | ||
265 | * used by CPGA, INTC and PFC. | ||
266 | */ | ||
267 | { | ||
268 | .virtual = 0xe6000000, | ||
269 | .pfn = __phys_to_pfn(0xe6000000), | ||
270 | .length = 256 << 20, | ||
271 | .type = MT_DEVICE_NONSHARED | ||
272 | }, | ||
273 | }; | ||
274 | |||
275 | static void __init g4evm_map_io(void) | ||
276 | { | ||
277 | iotable_init(g4evm_io_desc, ARRAY_SIZE(g4evm_io_desc)); | ||
278 | |||
279 | /* setup early devices and console here as well */ | ||
280 | sh7377_add_early_devices(); | ||
281 | shmobile_setup_console(); | ||
282 | } | ||
283 | |||
284 | #define GPIO_SDHID0_D0 0xe60520fc | 261 | #define GPIO_SDHID0_D0 0xe60520fc |
285 | #define GPIO_SDHID0_D1 0xe60520fd | 262 | #define GPIO_SDHID0_D1 0xe60520fd |
286 | #define GPIO_SDHID0_D2 0xe60520fe | 263 | #define GPIO_SDHID0_D2 0xe60520fe |
@@ -397,20 +374,11 @@ static void __init g4evm_init(void) | |||
397 | platform_add_devices(g4evm_devices, ARRAY_SIZE(g4evm_devices)); | 374 | platform_add_devices(g4evm_devices, ARRAY_SIZE(g4evm_devices)); |
398 | } | 375 | } |
399 | 376 | ||
400 | static void __init g4evm_timer_init(void) | ||
401 | { | ||
402 | sh7377_clock_init(); | ||
403 | shmobile_timer.init(); | ||
404 | } | ||
405 | |||
406 | static struct sys_timer g4evm_timer = { | ||
407 | .init = g4evm_timer_init, | ||
408 | }; | ||
409 | |||
410 | MACHINE_START(G4EVM, "g4evm") | 377 | MACHINE_START(G4EVM, "g4evm") |
411 | .map_io = g4evm_map_io, | 378 | .map_io = sh7377_map_io, |
379 | .init_early = sh7377_add_early_devices, | ||
412 | .init_irq = sh7377_init_irq, | 380 | .init_irq = sh7377_init_irq, |
413 | .handle_irq = shmobile_handle_irq_intc, | 381 | .handle_irq = shmobile_handle_irq_intc, |
414 | .init_machine = g4evm_init, | 382 | .init_machine = g4evm_init, |
415 | .timer = &g4evm_timer, | 383 | .timer = &shmobile_timer, |
416 | MACHINE_END | 384 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/board-kota2.c b/arch/arm/mach-shmobile/board-kota2.c index c8e7ca23fc06..61c067294660 100644 --- a/arch/arm/mach-shmobile/board-kota2.c +++ b/arch/arm/mach-shmobile/board-kota2.c | |||
@@ -43,7 +43,6 @@ | |||
43 | #include <mach/common.h> | 43 | #include <mach/common.h> |
44 | #include <asm/mach-types.h> | 44 | #include <asm/mach-types.h> |
45 | #include <asm/mach/arch.h> | 45 | #include <asm/mach/arch.h> |
46 | #include <asm/mach/map.h> | ||
47 | #include <asm/mach/time.h> | 46 | #include <asm/mach/time.h> |
48 | #include <asm/hardware/gic.h> | 47 | #include <asm/hardware/gic.h> |
49 | #include <asm/hardware/cache-l2x0.h> | 48 | #include <asm/hardware/cache-l2x0.h> |
@@ -409,27 +408,6 @@ static struct platform_device *kota2_devices[] __initdata = { | |||
409 | &sdhi1_device, | 408 | &sdhi1_device, |
410 | }; | 409 | }; |
411 | 410 | ||
412 | static struct map_desc kota2_io_desc[] __initdata = { | ||
413 | /* create a 1:1 entity map for 0xe6xxxxxx | ||
414 | * used by CPGA, INTC and PFC. | ||
415 | */ | ||
416 | { | ||
417 | .virtual = 0xe6000000, | ||
418 | .pfn = __phys_to_pfn(0xe6000000), | ||
419 | .length = 256 << 20, | ||
420 | .type = MT_DEVICE_NONSHARED | ||
421 | }, | ||
422 | }; | ||
423 | |||
424 | static void __init kota2_map_io(void) | ||
425 | { | ||
426 | iotable_init(kota2_io_desc, ARRAY_SIZE(kota2_io_desc)); | ||
427 | |||
428 | /* setup early devices and console here as well */ | ||
429 | sh73a0_add_early_devices(); | ||
430 | shmobile_setup_console(); | ||
431 | } | ||
432 | |||
433 | static void __init kota2_init(void) | 411 | static void __init kota2_init(void) |
434 | { | 412 | { |
435 | sh73a0_pinmux_init(); | 413 | sh73a0_pinmux_init(); |
@@ -535,22 +513,12 @@ static void __init kota2_init(void) | |||
535 | platform_add_devices(kota2_devices, ARRAY_SIZE(kota2_devices)); | 513 | platform_add_devices(kota2_devices, ARRAY_SIZE(kota2_devices)); |
536 | } | 514 | } |
537 | 515 | ||
538 | static void __init kota2_timer_init(void) | ||
539 | { | ||
540 | sh73a0_clock_init(); | ||
541 | shmobile_timer.init(); | ||
542 | return; | ||
543 | } | ||
544 | |||
545 | struct sys_timer kota2_timer = { | ||
546 | .init = kota2_timer_init, | ||
547 | }; | ||
548 | |||
549 | MACHINE_START(KOTA2, "kota2") | 516 | MACHINE_START(KOTA2, "kota2") |
550 | .map_io = kota2_map_io, | 517 | .map_io = sh73a0_map_io, |
518 | .init_early = sh73a0_add_early_devices, | ||
551 | .nr_irqs = NR_IRQS_LEGACY, | 519 | .nr_irqs = NR_IRQS_LEGACY, |
552 | .init_irq = sh73a0_init_irq, | 520 | .init_irq = sh73a0_init_irq, |
553 | .handle_irq = gic_handle_irq, | 521 | .handle_irq = gic_handle_irq, |
554 | .init_machine = kota2_init, | 522 | .init_machine = kota2_init, |
555 | .timer = &kota2_timer, | 523 | .timer = &shmobile_timer, |
556 | MACHINE_END | 524 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index a2813247b455..55da7a115912 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c | |||
@@ -57,8 +57,6 @@ | |||
57 | #include <mach/sh7372.h> | 57 | #include <mach/sh7372.h> |
58 | 58 | ||
59 | #include <asm/mach/arch.h> | 59 | #include <asm/mach/arch.h> |
60 | #include <asm/mach/time.h> | ||
61 | #include <asm/mach/map.h> | ||
62 | #include <asm/mach-types.h> | 60 | #include <asm/mach-types.h> |
63 | 61 | ||
64 | /* | 62 | /* |
@@ -1337,27 +1335,6 @@ static struct i2c_board_info i2c1_devices[] = { | |||
1337 | }, | 1335 | }, |
1338 | }; | 1336 | }; |
1339 | 1337 | ||
1340 | static struct map_desc mackerel_io_desc[] __initdata = { | ||
1341 | /* create a 1:1 entity map for 0xe6xxxxxx | ||
1342 | * used by CPGA, INTC and PFC. | ||
1343 | */ | ||
1344 | { | ||
1345 | .virtual = 0xe6000000, | ||
1346 | .pfn = __phys_to_pfn(0xe6000000), | ||
1347 | .length = 256 << 20, | ||
1348 | .type = MT_DEVICE_NONSHARED | ||
1349 | }, | ||
1350 | }; | ||
1351 | |||
1352 | static void __init mackerel_map_io(void) | ||
1353 | { | ||
1354 | iotable_init(mackerel_io_desc, ARRAY_SIZE(mackerel_io_desc)); | ||
1355 | |||
1356 | /* setup early devices and console here as well */ | ||
1357 | sh7372_add_early_devices(); | ||
1358 | shmobile_setup_console(); | ||
1359 | } | ||
1360 | |||
1361 | #define GPIO_PORT9CR 0xE6051009 | 1338 | #define GPIO_PORT9CR 0xE6051009 |
1362 | #define GPIO_PORT10CR 0xE605100A | 1339 | #define GPIO_PORT10CR 0xE605100A |
1363 | #define GPIO_PORT167CR 0xE60520A7 | 1340 | #define GPIO_PORT167CR 0xE60520A7 |
@@ -1370,6 +1347,9 @@ static void __init mackerel_init(void) | |||
1370 | struct clk *clk; | 1347 | struct clk *clk; |
1371 | int ret; | 1348 | int ret; |
1372 | 1349 | ||
1350 | /* External clock source */ | ||
1351 | clk_set_rate(&sh7372_dv_clki_clk, 27000000); | ||
1352 | |||
1373 | sh7372_pinmux_init(); | 1353 | sh7372_pinmux_init(); |
1374 | 1354 | ||
1375 | /* enable SCIFA0 */ | 1355 | /* enable SCIFA0 */ |
@@ -1573,23 +1553,11 @@ static void __init mackerel_init(void) | |||
1573 | pm_clk_add(&hdmi_lcdc_device.dev, "hdmi"); | 1553 | pm_clk_add(&hdmi_lcdc_device.dev, "hdmi"); |
1574 | } | 1554 | } |
1575 | 1555 | ||
1576 | static void __init mackerel_timer_init(void) | ||
1577 | { | ||
1578 | sh7372_clock_init(); | ||
1579 | shmobile_timer.init(); | ||
1580 | |||
1581 | /* External clock source */ | ||
1582 | clk_set_rate(&sh7372_dv_clki_clk, 27000000); | ||
1583 | } | ||
1584 | |||
1585 | static struct sys_timer mackerel_timer = { | ||
1586 | .init = mackerel_timer_init, | ||
1587 | }; | ||
1588 | |||
1589 | MACHINE_START(MACKEREL, "mackerel") | 1556 | MACHINE_START(MACKEREL, "mackerel") |
1590 | .map_io = mackerel_map_io, | 1557 | .map_io = sh7372_map_io, |
1558 | .init_early = sh7372_add_early_devices, | ||
1591 | .init_irq = sh7372_init_irq, | 1559 | .init_irq = sh7372_init_irq, |
1592 | .handle_irq = shmobile_handle_irq_intc, | 1560 | .handle_irq = shmobile_handle_irq_intc, |
1593 | .init_machine = mackerel_init, | 1561 | .init_machine = mackerel_init, |
1594 | .timer = &mackerel_timer, | 1562 | .timer = &shmobile_timer, |
1595 | MACHINE_END | 1563 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c index f0e02c0ce99f..cbd5e4cd06d2 100644 --- a/arch/arm/mach-shmobile/board-marzen.c +++ b/arch/arm/mach-shmobile/board-marzen.c | |||
@@ -33,8 +33,6 @@ | |||
33 | #include <mach/common.h> | 33 | #include <mach/common.h> |
34 | #include <asm/mach-types.h> | 34 | #include <asm/mach-types.h> |
35 | #include <asm/mach/arch.h> | 35 | #include <asm/mach/arch.h> |
36 | #include <asm/mach/map.h> | ||
37 | #include <asm/mach/time.h> | ||
38 | #include <asm/hardware/gic.h> | 36 | #include <asm/hardware/gic.h> |
39 | #include <asm/traps.h> | 37 | #include <asm/traps.h> |
40 | 38 | ||
@@ -72,49 +70,6 @@ static struct platform_device *marzen_devices[] __initdata = { | |||
72 | ð_device, | 70 | ð_device, |
73 | }; | 71 | }; |
74 | 72 | ||
75 | static struct map_desc marzen_io_desc[] __initdata = { | ||
76 | /* 2M entity map for 0xf0000000 (MPCORE) */ | ||
77 | { | ||
78 | .virtual = 0xf0000000, | ||
79 | .pfn = __phys_to_pfn(0xf0000000), | ||
80 | .length = SZ_2M, | ||
81 | .type = MT_DEVICE_NONSHARED | ||
82 | }, | ||
83 | /* 16M entity map for 0xfexxxxxx (DMAC-S/HPBREG/INTC2/LRAM/DBSC) */ | ||
84 | { | ||
85 | .virtual = 0xfe000000, | ||
86 | .pfn = __phys_to_pfn(0xfe000000), | ||
87 | .length = SZ_16M, | ||
88 | .type = MT_DEVICE_NONSHARED | ||
89 | }, | ||
90 | }; | ||
91 | |||
92 | static void __init marzen_map_io(void) | ||
93 | { | ||
94 | iotable_init(marzen_io_desc, ARRAY_SIZE(marzen_io_desc)); | ||
95 | } | ||
96 | |||
97 | static void __init marzen_init_early(void) | ||
98 | { | ||
99 | r8a7779_add_early_devices(); | ||
100 | |||
101 | /* Early serial console setup is not included here due to | ||
102 | * memory map collisions. The SCIF serial ports in r8a7779 | ||
103 | * are difficult to entity map 1:1 due to collision with the | ||
104 | * virtual memory range used by the coherent DMA code on ARM. | ||
105 | * | ||
106 | * Anyone wanting to debug early can remove UPF_IOREMAP from | ||
107 | * the sh-sci serial console platform data, adjust mapbase | ||
108 | * to a static M:N virt:phys mapping that needs to be added to | ||
109 | * the mappings passed with iotable_init() above. | ||
110 | * | ||
111 | * Then add a call to shmobile_setup_console() from this function. | ||
112 | * | ||
113 | * As a final step pass earlyprint=sh-sci.2,115200 on the kernel | ||
114 | * command line. | ||
115 | */ | ||
116 | } | ||
117 | |||
118 | static void __init marzen_init(void) | 73 | static void __init marzen_init(void) |
119 | { | 74 | { |
120 | r8a7779_pinmux_init(); | 75 | r8a7779_pinmux_init(); |
@@ -135,23 +90,12 @@ static void __init marzen_init(void) | |||
135 | platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices)); | 90 | platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices)); |
136 | } | 91 | } |
137 | 92 | ||
138 | static void __init marzen_timer_init(void) | ||
139 | { | ||
140 | r8a7779_clock_init(); | ||
141 | shmobile_timer.init(); | ||
142 | return; | ||
143 | } | ||
144 | |||
145 | struct sys_timer marzen_timer = { | ||
146 | .init = marzen_timer_init, | ||
147 | }; | ||
148 | |||
149 | MACHINE_START(MARZEN, "marzen") | 93 | MACHINE_START(MARZEN, "marzen") |
150 | .map_io = marzen_map_io, | 94 | .map_io = r8a7779_map_io, |
151 | .init_early = marzen_init_early, | 95 | .init_early = r8a7779_add_early_devices, |
152 | .nr_irqs = NR_IRQS_LEGACY, | 96 | .nr_irqs = NR_IRQS_LEGACY, |
153 | .init_irq = r8a7779_init_irq, | 97 | .init_irq = r8a7779_init_irq, |
154 | .handle_irq = gic_handle_irq, | 98 | .handle_irq = gic_handle_irq, |
155 | .init_machine = marzen_init, | 99 | .init_machine = marzen_init, |
156 | .timer = &marzen_timer, | 100 | .timer = &shmobile_timer, |
157 | MACHINE_END | 101 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/clock-r8a7740.c b/arch/arm/mach-shmobile/clock-r8a7740.c index 3b35b9afc001..99c4d743a99c 100644 --- a/arch/arm/mach-shmobile/clock-r8a7740.c +++ b/arch/arm/mach-shmobile/clock-r8a7740.c | |||
@@ -93,7 +93,7 @@ static unsigned long div_recalc(struct clk *clk) | |||
93 | return clk->parent->rate / (int)(clk->priv); | 93 | return clk->parent->rate / (int)(clk->priv); |
94 | } | 94 | } |
95 | 95 | ||
96 | static struct clk_ops div_clk_ops = { | 96 | static struct sh_clk_ops div_clk_ops = { |
97 | .recalc = div_recalc, | 97 | .recalc = div_recalc, |
98 | }; | 98 | }; |
99 | 99 | ||
@@ -125,7 +125,7 @@ static struct clk extal2_div2_clk = { | |||
125 | .parent = &extal2_clk, | 125 | .parent = &extal2_clk, |
126 | }; | 126 | }; |
127 | 127 | ||
128 | static struct clk_ops followparent_clk_ops = { | 128 | static struct sh_clk_ops followparent_clk_ops = { |
129 | .recalc = followparent_recalc, | 129 | .recalc = followparent_recalc, |
130 | }; | 130 | }; |
131 | 131 | ||
@@ -156,7 +156,7 @@ static unsigned long pllc01_recalc(struct clk *clk) | |||
156 | return clk->parent->rate * mult; | 156 | return clk->parent->rate * mult; |
157 | } | 157 | } |
158 | 158 | ||
159 | static struct clk_ops pllc01_clk_ops = { | 159 | static struct sh_clk_ops pllc01_clk_ops = { |
160 | .recalc = pllc01_recalc, | 160 | .recalc = pllc01_recalc, |
161 | }; | 161 | }; |
162 | 162 | ||
@@ -376,7 +376,7 @@ void __init r8a7740_clock_init(u8 md_ck) | |||
376 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); | 376 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); |
377 | 377 | ||
378 | if (!ret) | 378 | if (!ret) |
379 | clk_init(); | 379 | shmobile_clk_init(); |
380 | else | 380 | else |
381 | panic("failed to setup r8a7740 clocks\n"); | 381 | panic("failed to setup r8a7740 clocks\n"); |
382 | } | 382 | } |
diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/mach-shmobile/clock-r8a7779.c index b4b0e8cd096d..7d6e9fe47b56 100644 --- a/arch/arm/mach-shmobile/clock-r8a7779.c +++ b/arch/arm/mach-shmobile/clock-r8a7779.c | |||
@@ -107,7 +107,7 @@ static unsigned long mul4_recalc(struct clk *clk) | |||
107 | return clk->parent->rate * 4; | 107 | return clk->parent->rate * 4; |
108 | } | 108 | } |
109 | 109 | ||
110 | static struct clk_ops mul4_clk_ops = { | 110 | static struct sh_clk_ops mul4_clk_ops = { |
111 | .recalc = mul4_recalc, | 111 | .recalc = mul4_recalc, |
112 | }; | 112 | }; |
113 | 113 | ||
@@ -170,7 +170,7 @@ void __init r8a7779_clock_init(void) | |||
170 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); | 170 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); |
171 | 171 | ||
172 | if (!ret) | 172 | if (!ret) |
173 | clk_init(); | 173 | shmobile_clk_init(); |
174 | else | 174 | else |
175 | panic("failed to setup r8a7779 clocks\n"); | 175 | panic("failed to setup r8a7779 clocks\n"); |
176 | } | 176 | } |
diff --git a/arch/arm/mach-shmobile/clock-sh7367.c b/arch/arm/mach-shmobile/clock-sh7367.c index 5218c34a9cc6..006e7b5d304c 100644 --- a/arch/arm/mach-shmobile/clock-sh7367.c +++ b/arch/arm/mach-shmobile/clock-sh7367.c | |||
@@ -74,7 +74,7 @@ static unsigned long div2_recalc(struct clk *clk) | |||
74 | return clk->parent->rate / 2; | 74 | return clk->parent->rate / 2; |
75 | } | 75 | } |
76 | 76 | ||
77 | static struct clk_ops div2_clk_ops = { | 77 | static struct sh_clk_ops div2_clk_ops = { |
78 | .recalc = div2_recalc, | 78 | .recalc = div2_recalc, |
79 | }; | 79 | }; |
80 | 80 | ||
@@ -101,7 +101,7 @@ static unsigned long pllc1_recalc(struct clk *clk) | |||
101 | return clk->parent->rate * mult; | 101 | return clk->parent->rate * mult; |
102 | } | 102 | } |
103 | 103 | ||
104 | static struct clk_ops pllc1_clk_ops = { | 104 | static struct sh_clk_ops pllc1_clk_ops = { |
105 | .recalc = pllc1_recalc, | 105 | .recalc = pllc1_recalc, |
106 | }; | 106 | }; |
107 | 107 | ||
@@ -128,7 +128,7 @@ static unsigned long pllc2_recalc(struct clk *clk) | |||
128 | return clk->parent->rate * mult; | 128 | return clk->parent->rate * mult; |
129 | } | 129 | } |
130 | 130 | ||
131 | static struct clk_ops pllc2_clk_ops = { | 131 | static struct sh_clk_ops pllc2_clk_ops = { |
132 | .recalc = pllc2_recalc, | 132 | .recalc = pllc2_recalc, |
133 | }; | 133 | }; |
134 | 134 | ||
@@ -349,7 +349,7 @@ void __init sh7367_clock_init(void) | |||
349 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); | 349 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); |
350 | 350 | ||
351 | if (!ret) | 351 | if (!ret) |
352 | clk_init(); | 352 | shmobile_clk_init(); |
353 | else | 353 | else |
354 | panic("failed to setup sh7367 clocks\n"); | 354 | panic("failed to setup sh7367 clocks\n"); |
355 | } | 355 | } |
diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c index 293456d8dcfd..de243e3c8392 100644 --- a/arch/arm/mach-shmobile/clock-sh7372.c +++ b/arch/arm/mach-shmobile/clock-sh7372.c | |||
@@ -89,7 +89,7 @@ static unsigned long div2_recalc(struct clk *clk) | |||
89 | return clk->parent->rate / 2; | 89 | return clk->parent->rate / 2; |
90 | } | 90 | } |
91 | 91 | ||
92 | static struct clk_ops div2_clk_ops = { | 92 | static struct sh_clk_ops div2_clk_ops = { |
93 | .recalc = div2_recalc, | 93 | .recalc = div2_recalc, |
94 | }; | 94 | }; |
95 | 95 | ||
@@ -128,7 +128,7 @@ static unsigned long pllc01_recalc(struct clk *clk) | |||
128 | return clk->parent->rate * mult; | 128 | return clk->parent->rate * mult; |
129 | } | 129 | } |
130 | 130 | ||
131 | static struct clk_ops pllc01_clk_ops = { | 131 | static struct sh_clk_ops pllc01_clk_ops = { |
132 | .recalc = pllc01_recalc, | 132 | .recalc = pllc01_recalc, |
133 | }; | 133 | }; |
134 | 134 | ||
@@ -276,7 +276,7 @@ static int pllc2_set_parent(struct clk *clk, struct clk *parent) | |||
276 | return 0; | 276 | return 0; |
277 | } | 277 | } |
278 | 278 | ||
279 | static struct clk_ops pllc2_clk_ops = { | 279 | static struct sh_clk_ops pllc2_clk_ops = { |
280 | .recalc = pllc2_recalc, | 280 | .recalc = pllc2_recalc, |
281 | .round_rate = pllc2_round_rate, | 281 | .round_rate = pllc2_round_rate, |
282 | .set_rate = pllc2_set_rate, | 282 | .set_rate = pllc2_set_rate, |
@@ -468,7 +468,7 @@ static int fsidiv_set_rate(struct clk *clk, unsigned long rate) | |||
468 | return 0; | 468 | return 0; |
469 | } | 469 | } |
470 | 470 | ||
471 | static struct clk_ops fsidiv_clk_ops = { | 471 | static struct sh_clk_ops fsidiv_clk_ops = { |
472 | .recalc = fsidiv_recalc, | 472 | .recalc = fsidiv_recalc, |
473 | .round_rate = fsidiv_round_rate, | 473 | .round_rate = fsidiv_round_rate, |
474 | .set_rate = fsidiv_set_rate, | 474 | .set_rate = fsidiv_set_rate, |
@@ -710,7 +710,7 @@ void __init sh7372_clock_init(void) | |||
710 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); | 710 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); |
711 | 711 | ||
712 | if (!ret) | 712 | if (!ret) |
713 | clk_init(); | 713 | shmobile_clk_init(); |
714 | else | 714 | else |
715 | panic("failed to setup sh7372 clocks\n"); | 715 | panic("failed to setup sh7372 clocks\n"); |
716 | 716 | ||
diff --git a/arch/arm/mach-shmobile/clock-sh7377.c b/arch/arm/mach-shmobile/clock-sh7377.c index 8cee7b151ae3..0798a15936c3 100644 --- a/arch/arm/mach-shmobile/clock-sh7377.c +++ b/arch/arm/mach-shmobile/clock-sh7377.c | |||
@@ -77,7 +77,7 @@ static unsigned long div2_recalc(struct clk *clk) | |||
77 | return clk->parent->rate / 2; | 77 | return clk->parent->rate / 2; |
78 | } | 78 | } |
79 | 79 | ||
80 | static struct clk_ops div2_clk_ops = { | 80 | static struct sh_clk_ops div2_clk_ops = { |
81 | .recalc = div2_recalc, | 81 | .recalc = div2_recalc, |
82 | }; | 82 | }; |
83 | 83 | ||
@@ -110,7 +110,7 @@ static unsigned long pllc1_recalc(struct clk *clk) | |||
110 | return clk->parent->rate * mult; | 110 | return clk->parent->rate * mult; |
111 | } | 111 | } |
112 | 112 | ||
113 | static struct clk_ops pllc1_clk_ops = { | 113 | static struct sh_clk_ops pllc1_clk_ops = { |
114 | .recalc = pllc1_recalc, | 114 | .recalc = pllc1_recalc, |
115 | }; | 115 | }; |
116 | 116 | ||
@@ -137,7 +137,7 @@ static unsigned long pllc2_recalc(struct clk *clk) | |||
137 | return clk->parent->rate * mult; | 137 | return clk->parent->rate * mult; |
138 | } | 138 | } |
139 | 139 | ||
140 | static struct clk_ops pllc2_clk_ops = { | 140 | static struct sh_clk_ops pllc2_clk_ops = { |
141 | .recalc = pllc2_recalc, | 141 | .recalc = pllc2_recalc, |
142 | }; | 142 | }; |
143 | 143 | ||
@@ -360,7 +360,7 @@ void __init sh7377_clock_init(void) | |||
360 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); | 360 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); |
361 | 361 | ||
362 | if (!ret) | 362 | if (!ret) |
363 | clk_init(); | 363 | shmobile_clk_init(); |
364 | else | 364 | else |
365 | panic("failed to setup sh7377 clocks\n"); | 365 | panic("failed to setup sh7377 clocks\n"); |
366 | } | 366 | } |
diff --git a/arch/arm/mach-shmobile/clock-sh73a0.c b/arch/arm/mach-shmobile/clock-sh73a0.c index 7727cca6136c..472d1f5361e5 100644 --- a/arch/arm/mach-shmobile/clock-sh73a0.c +++ b/arch/arm/mach-shmobile/clock-sh73a0.c | |||
@@ -88,7 +88,7 @@ static unsigned long div2_recalc(struct clk *clk) | |||
88 | return clk->parent->rate / 2; | 88 | return clk->parent->rate / 2; |
89 | } | 89 | } |
90 | 90 | ||
91 | static struct clk_ops div2_clk_ops = { | 91 | static struct sh_clk_ops div2_clk_ops = { |
92 | .recalc = div2_recalc, | 92 | .recalc = div2_recalc, |
93 | }; | 93 | }; |
94 | 94 | ||
@@ -97,7 +97,7 @@ static unsigned long div7_recalc(struct clk *clk) | |||
97 | return clk->parent->rate / 7; | 97 | return clk->parent->rate / 7; |
98 | } | 98 | } |
99 | 99 | ||
100 | static struct clk_ops div7_clk_ops = { | 100 | static struct sh_clk_ops div7_clk_ops = { |
101 | .recalc = div7_recalc, | 101 | .recalc = div7_recalc, |
102 | }; | 102 | }; |
103 | 103 | ||
@@ -106,7 +106,7 @@ static unsigned long div13_recalc(struct clk *clk) | |||
106 | return clk->parent->rate / 13; | 106 | return clk->parent->rate / 13; |
107 | } | 107 | } |
108 | 108 | ||
109 | static struct clk_ops div13_clk_ops = { | 109 | static struct sh_clk_ops div13_clk_ops = { |
110 | .recalc = div13_recalc, | 110 | .recalc = div13_recalc, |
111 | }; | 111 | }; |
112 | 112 | ||
@@ -122,7 +122,7 @@ static struct clk extal2_div2_clk = { | |||
122 | .parent = &sh73a0_extal2_clk, | 122 | .parent = &sh73a0_extal2_clk, |
123 | }; | 123 | }; |
124 | 124 | ||
125 | static struct clk_ops main_clk_ops = { | 125 | static struct sh_clk_ops main_clk_ops = { |
126 | .recalc = followparent_recalc, | 126 | .recalc = followparent_recalc, |
127 | }; | 127 | }; |
128 | 128 | ||
@@ -156,7 +156,7 @@ static unsigned long pll_recalc(struct clk *clk) | |||
156 | return clk->parent->rate * mult; | 156 | return clk->parent->rate * mult; |
157 | } | 157 | } |
158 | 158 | ||
159 | static struct clk_ops pll_clk_ops = { | 159 | static struct sh_clk_ops pll_clk_ops = { |
160 | .recalc = pll_recalc, | 160 | .recalc = pll_recalc, |
161 | }; | 161 | }; |
162 | 162 | ||
@@ -438,7 +438,7 @@ static int dsiphy_set_rate(struct clk *clk, unsigned long rate) | |||
438 | return 0; | 438 | return 0; |
439 | } | 439 | } |
440 | 440 | ||
441 | static struct clk_ops dsiphy_clk_ops = { | 441 | static struct sh_clk_ops dsiphy_clk_ops = { |
442 | .recalc = dsiphy_recalc, | 442 | .recalc = dsiphy_recalc, |
443 | .round_rate = dsiphy_round_rate, | 443 | .round_rate = dsiphy_round_rate, |
444 | .set_rate = dsiphy_set_rate, | 444 | .set_rate = dsiphy_set_rate, |
@@ -620,7 +620,7 @@ void __init sh73a0_clock_init(void) | |||
620 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); | 620 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); |
621 | 621 | ||
622 | if (!ret) | 622 | if (!ret) |
623 | clk_init(); | 623 | shmobile_clk_init(); |
624 | else | 624 | else |
625 | panic("failed to setup sh73a0 clocks\n"); | 625 | panic("failed to setup sh73a0 clocks\n"); |
626 | } | 626 | } |
diff --git a/arch/arm/mach-shmobile/clock.c b/arch/arm/mach-shmobile/clock.c index 31654d78b96b..e816ca9bd213 100644 --- a/arch/arm/mach-shmobile/clock.c +++ b/arch/arm/mach-shmobile/clock.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include <linux/sh_clk.h> | 24 | #include <linux/sh_clk.h> |
25 | #include <linux/export.h> | 25 | #include <linux/export.h> |
26 | 26 | ||
27 | int __init clk_init(void) | 27 | int __init shmobile_clk_init(void) |
28 | { | 28 | { |
29 | /* Kick the child clocks.. */ | 29 | /* Kick the child clocks.. */ |
30 | recalculate_root_clocks(); | 30 | recalculate_root_clocks(); |
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h index e4b945e271e7..e41b61a48439 100644 --- a/arch/arm/mach-shmobile/include/mach/common.h +++ b/arch/arm/mach-shmobile/include/mach/common.h | |||
@@ -1,12 +1,13 @@ | |||
1 | #ifndef __ARCH_MACH_COMMON_H | 1 | #ifndef __ARCH_MACH_COMMON_H |
2 | #define __ARCH_MACH_COMMON_H | 2 | #define __ARCH_MACH_COMMON_H |
3 | 3 | ||
4 | extern void shmobile_earlytimer_init(void); | ||
4 | extern struct sys_timer shmobile_timer; | 5 | extern struct sys_timer shmobile_timer; |
5 | extern void shmobile_setup_console(void); | 6 | extern void shmobile_setup_console(void); |
6 | extern void shmobile_secondary_vector(void); | 7 | extern void shmobile_secondary_vector(void); |
7 | extern int shmobile_platform_cpu_kill(unsigned int cpu); | 8 | extern int shmobile_platform_cpu_kill(unsigned int cpu); |
8 | struct clk; | 9 | struct clk; |
9 | extern int clk_init(void); | 10 | extern int shmobile_clk_init(void); |
10 | extern void shmobile_handle_irq_intc(struct pt_regs *); | 11 | extern void shmobile_handle_irq_intc(struct pt_regs *); |
11 | extern struct platform_suspend_ops shmobile_suspend_ops; | 12 | extern struct platform_suspend_ops shmobile_suspend_ops; |
12 | struct cpuidle_driver; | 13 | struct cpuidle_driver; |
@@ -14,6 +15,7 @@ extern void (*shmobile_cpuidle_modes[])(void); | |||
14 | extern void (*shmobile_cpuidle_setup)(struct cpuidle_driver *drv); | 15 | extern void (*shmobile_cpuidle_setup)(struct cpuidle_driver *drv); |
15 | 16 | ||
16 | extern void sh7367_init_irq(void); | 17 | extern void sh7367_init_irq(void); |
18 | extern void sh7367_map_io(void); | ||
17 | extern void sh7367_add_early_devices(void); | 19 | extern void sh7367_add_early_devices(void); |
18 | extern void sh7367_add_standard_devices(void); | 20 | extern void sh7367_add_standard_devices(void); |
19 | extern void sh7367_clock_init(void); | 21 | extern void sh7367_clock_init(void); |
@@ -22,6 +24,7 @@ extern struct clk sh7367_extalb1_clk; | |||
22 | extern struct clk sh7367_extal2_clk; | 24 | extern struct clk sh7367_extal2_clk; |
23 | 25 | ||
24 | extern void sh7377_init_irq(void); | 26 | extern void sh7377_init_irq(void); |
27 | extern void sh7377_map_io(void); | ||
25 | extern void sh7377_add_early_devices(void); | 28 | extern void sh7377_add_early_devices(void); |
26 | extern void sh7377_add_standard_devices(void); | 29 | extern void sh7377_add_standard_devices(void); |
27 | extern void sh7377_clock_init(void); | 30 | extern void sh7377_clock_init(void); |
@@ -30,6 +33,7 @@ extern struct clk sh7377_extalc1_clk; | |||
30 | extern struct clk sh7377_extal2_clk; | 33 | extern struct clk sh7377_extal2_clk; |
31 | 34 | ||
32 | extern void sh7372_init_irq(void); | 35 | extern void sh7372_init_irq(void); |
36 | extern void sh7372_map_io(void); | ||
33 | extern void sh7372_add_early_devices(void); | 37 | extern void sh7372_add_early_devices(void); |
34 | extern void sh7372_add_standard_devices(void); | 38 | extern void sh7372_add_standard_devices(void); |
35 | extern void sh7372_clock_init(void); | 39 | extern void sh7372_clock_init(void); |
@@ -41,6 +45,7 @@ extern struct clk sh7372_extal1_clk; | |||
41 | extern struct clk sh7372_extal2_clk; | 45 | extern struct clk sh7372_extal2_clk; |
42 | 46 | ||
43 | extern void sh73a0_init_irq(void); | 47 | extern void sh73a0_init_irq(void); |
48 | extern void sh73a0_map_io(void); | ||
44 | extern void sh73a0_add_early_devices(void); | 49 | extern void sh73a0_add_early_devices(void); |
45 | extern void sh73a0_add_standard_devices(void); | 50 | extern void sh73a0_add_standard_devices(void); |
46 | extern void sh73a0_clock_init(void); | 51 | extern void sh73a0_clock_init(void); |
@@ -56,12 +61,14 @@ extern int sh73a0_boot_secondary(unsigned int cpu); | |||
56 | extern void sh73a0_smp_prepare_cpus(void); | 61 | extern void sh73a0_smp_prepare_cpus(void); |
57 | 62 | ||
58 | extern void r8a7740_init_irq(void); | 63 | extern void r8a7740_init_irq(void); |
64 | extern void r8a7740_map_io(void); | ||
59 | extern void r8a7740_add_early_devices(void); | 65 | extern void r8a7740_add_early_devices(void); |
60 | extern void r8a7740_add_standard_devices(void); | 66 | extern void r8a7740_add_standard_devices(void); |
61 | extern void r8a7740_clock_init(u8 md_ck); | 67 | extern void r8a7740_clock_init(u8 md_ck); |
62 | extern void r8a7740_pinmux_init(void); | 68 | extern void r8a7740_pinmux_init(void); |
63 | 69 | ||
64 | extern void r8a7779_init_irq(void); | 70 | extern void r8a7779_init_irq(void); |
71 | extern void r8a7779_map_io(void); | ||
65 | extern void r8a7779_add_early_devices(void); | 72 | extern void r8a7779_add_early_devices(void); |
66 | extern void r8a7779_add_standard_devices(void); | 73 | extern void r8a7779_add_standard_devices(void); |
67 | extern void r8a7779_clock_init(void); | 74 | extern void r8a7779_clock_init(void); |
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c index 986dca6b3fad..74e52341dd1b 100644 --- a/arch/arm/mach-shmobile/setup-r8a7740.c +++ b/arch/arm/mach-shmobile/setup-r8a7740.c | |||
@@ -25,8 +25,41 @@ | |||
25 | #include <linux/serial_sci.h> | 25 | #include <linux/serial_sci.h> |
26 | #include <linux/sh_timer.h> | 26 | #include <linux/sh_timer.h> |
27 | #include <mach/r8a7740.h> | 27 | #include <mach/r8a7740.h> |
28 | #include <mach/common.h> | ||
28 | #include <asm/mach-types.h> | 29 | #include <asm/mach-types.h> |
30 | #include <asm/mach/map.h> | ||
29 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
32 | #include <asm/mach/time.h> | ||
33 | |||
34 | static struct map_desc r8a7740_io_desc[] __initdata = { | ||
35 | /* | ||
36 | * for CPGA/INTC/PFC | ||
37 | * 0xe6000000-0xefffffff -> 0xe6000000-0xefffffff | ||
38 | */ | ||
39 | { | ||
40 | .virtual = 0xe6000000, | ||
41 | .pfn = __phys_to_pfn(0xe6000000), | ||
42 | .length = 160 << 20, | ||
43 | .type = MT_DEVICE_NONSHARED | ||
44 | }, | ||
45 | #ifdef CONFIG_CACHE_L2X0 | ||
46 | /* | ||
47 | * for l2x0_init() | ||
48 | * 0xf0100000-0xf0101000 -> 0xf0002000-0xf0003000 | ||
49 | */ | ||
50 | { | ||
51 | .virtual = 0xf0002000, | ||
52 | .pfn = __phys_to_pfn(0xf0100000), | ||
53 | .length = PAGE_SIZE, | ||
54 | .type = MT_DEVICE_NONSHARED | ||
55 | }, | ||
56 | #endif | ||
57 | }; | ||
58 | |||
59 | void __init r8a7740_map_io(void) | ||
60 | { | ||
61 | iotable_init(r8a7740_io_desc, ARRAY_SIZE(r8a7740_io_desc)); | ||
62 | } | ||
30 | 63 | ||
31 | /* SCIFA0 */ | 64 | /* SCIFA0 */ |
32 | static struct plat_sci_port scif0_platform_data = { | 65 | static struct plat_sci_port scif0_platform_data = { |
@@ -345,8 +378,20 @@ void __init r8a7740_add_standard_devices(void) | |||
345 | ARRAY_SIZE(r8a7740_late_devices)); | 378 | ARRAY_SIZE(r8a7740_late_devices)); |
346 | } | 379 | } |
347 | 380 | ||
381 | static void __init r8a7740_earlytimer_init(void) | ||
382 | { | ||
383 | r8a7740_clock_init(0); | ||
384 | shmobile_earlytimer_init(); | ||
385 | } | ||
386 | |||
348 | void __init r8a7740_add_early_devices(void) | 387 | void __init r8a7740_add_early_devices(void) |
349 | { | 388 | { |
350 | early_platform_add_devices(r8a7740_early_devices, | 389 | early_platform_add_devices(r8a7740_early_devices, |
351 | ARRAY_SIZE(r8a7740_early_devices)); | 390 | ARRAY_SIZE(r8a7740_early_devices)); |
391 | |||
392 | /* setup early console here as well */ | ||
393 | shmobile_setup_console(); | ||
394 | |||
395 | /* override timer setup with soc-specific code */ | ||
396 | shmobile_timer.init = r8a7740_earlytimer_init; | ||
352 | } | 397 | } |
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c index 4725663bd032..6820d785493d 100644 --- a/arch/arm/mach-shmobile/setup-r8a7779.c +++ b/arch/arm/mach-shmobile/setup-r8a7779.c | |||
@@ -33,6 +33,31 @@ | |||
33 | #include <mach/common.h> | 33 | #include <mach/common.h> |
34 | #include <asm/mach-types.h> | 34 | #include <asm/mach-types.h> |
35 | #include <asm/mach/arch.h> | 35 | #include <asm/mach/arch.h> |
36 | #include <asm/mach/time.h> | ||
37 | #include <asm/mach/map.h> | ||
38 | #include <asm/hardware/cache-l2x0.h> | ||
39 | |||
40 | static struct map_desc r8a7779_io_desc[] __initdata = { | ||
41 | /* 2M entity map for 0xf0000000 (MPCORE) */ | ||
42 | { | ||
43 | .virtual = 0xf0000000, | ||
44 | .pfn = __phys_to_pfn(0xf0000000), | ||
45 | .length = SZ_2M, | ||
46 | .type = MT_DEVICE_NONSHARED | ||
47 | }, | ||
48 | /* 16M entity map for 0xfexxxxxx (DMAC-S/HPBREG/INTC2/LRAM/DBSC) */ | ||
49 | { | ||
50 | .virtual = 0xfe000000, | ||
51 | .pfn = __phys_to_pfn(0xfe000000), | ||
52 | .length = SZ_16M, | ||
53 | .type = MT_DEVICE_NONSHARED | ||
54 | }, | ||
55 | }; | ||
56 | |||
57 | void __init r8a7779_map_io(void) | ||
58 | { | ||
59 | iotable_init(r8a7779_io_desc, ARRAY_SIZE(r8a7779_io_desc)); | ||
60 | } | ||
36 | 61 | ||
37 | static struct plat_sci_port scif0_platform_data = { | 62 | static struct plat_sci_port scif0_platform_data = { |
38 | .mapbase = 0xffe40000, | 63 | .mapbase = 0xffe40000, |
@@ -219,6 +244,10 @@ static struct platform_device *r8a7779_late_devices[] __initdata = { | |||
219 | 244 | ||
220 | void __init r8a7779_add_standard_devices(void) | 245 | void __init r8a7779_add_standard_devices(void) |
221 | { | 246 | { |
247 | #ifdef CONFIG_CACHE_L2X0 | ||
248 | /* Early BRESP enable, Shared attribute override enable, 64K*16way */ | ||
249 | l2x0_init((void __iomem __force *)(0xf0100000), 0x40470000, 0x82000fff); | ||
250 | #endif | ||
222 | r8a7779_pm_init(); | 251 | r8a7779_pm_init(); |
223 | 252 | ||
224 | r8a7779_init_pm_domain(&r8a7779_sh4a); | 253 | r8a7779_init_pm_domain(&r8a7779_sh4a); |
@@ -232,8 +261,33 @@ void __init r8a7779_add_standard_devices(void) | |||
232 | ARRAY_SIZE(r8a7779_late_devices)); | 261 | ARRAY_SIZE(r8a7779_late_devices)); |
233 | } | 262 | } |
234 | 263 | ||
264 | static void __init r8a7779_earlytimer_init(void) | ||
265 | { | ||
266 | r8a7779_clock_init(); | ||
267 | shmobile_earlytimer_init(); | ||
268 | } | ||
269 | |||
235 | void __init r8a7779_add_early_devices(void) | 270 | void __init r8a7779_add_early_devices(void) |
236 | { | 271 | { |
237 | early_platform_add_devices(r8a7779_early_devices, | 272 | early_platform_add_devices(r8a7779_early_devices, |
238 | ARRAY_SIZE(r8a7779_early_devices)); | 273 | ARRAY_SIZE(r8a7779_early_devices)); |
274 | |||
275 | /* Early serial console setup is not included here due to | ||
276 | * memory map collisions. The SCIF serial ports in r8a7779 | ||
277 | * are difficult to entity map 1:1 due to collision with the | ||
278 | * virtual memory range used by the coherent DMA code on ARM. | ||
279 | * | ||
280 | * Anyone wanting to debug early can remove UPF_IOREMAP from | ||
281 | * the sh-sci serial console platform data, adjust mapbase | ||
282 | * to a static M:N virt:phys mapping that needs to be added to | ||
283 | * the mappings passed with iotable_init() above. | ||
284 | * | ||
285 | * Then add a call to shmobile_setup_console() from this function. | ||
286 | * | ||
287 | * As a final step pass earlyprint=sh-sci.2,115200 on the kernel | ||
288 | * command line in case of the marzen board. | ||
289 | */ | ||
290 | |||
291 | /* override timer setup with soc-specific code */ | ||
292 | shmobile_timer.init = r8a7779_earlytimer_init; | ||
239 | } | 293 | } |
diff --git a/arch/arm/mach-shmobile/setup-sh7367.c b/arch/arm/mach-shmobile/setup-sh7367.c index e546017f15de..a51e1a1e6996 100644 --- a/arch/arm/mach-shmobile/setup-sh7367.c +++ b/arch/arm/mach-shmobile/setup-sh7367.c | |||
@@ -29,8 +29,28 @@ | |||
29 | #include <linux/serial_sci.h> | 29 | #include <linux/serial_sci.h> |
30 | #include <linux/sh_timer.h> | 30 | #include <linux/sh_timer.h> |
31 | #include <mach/hardware.h> | 31 | #include <mach/hardware.h> |
32 | #include <mach/common.h> | ||
32 | #include <asm/mach-types.h> | 33 | #include <asm/mach-types.h> |
33 | #include <asm/mach/arch.h> | 34 | #include <asm/mach/arch.h> |
35 | #include <asm/mach/map.h> | ||
36 | #include <asm/mach/time.h> | ||
37 | |||
38 | static struct map_desc sh7367_io_desc[] __initdata = { | ||
39 | /* create a 1:1 entity map for 0xe6xxxxxx | ||
40 | * used by CPGA, INTC and PFC. | ||
41 | */ | ||
42 | { | ||
43 | .virtual = 0xe6000000, | ||
44 | .pfn = __phys_to_pfn(0xe6000000), | ||
45 | .length = 256 << 20, | ||
46 | .type = MT_DEVICE_NONSHARED | ||
47 | }, | ||
48 | }; | ||
49 | |||
50 | void __init sh7367_map_io(void) | ||
51 | { | ||
52 | iotable_init(sh7367_io_desc, ARRAY_SIZE(sh7367_io_desc)); | ||
53 | } | ||
34 | 54 | ||
35 | /* SCIFA0 */ | 55 | /* SCIFA0 */ |
36 | static struct plat_sci_port scif0_platform_data = { | 56 | static struct plat_sci_port scif0_platform_data = { |
@@ -435,6 +455,12 @@ void __init sh7367_add_standard_devices(void) | |||
435 | ARRAY_SIZE(sh7367_devices)); | 455 | ARRAY_SIZE(sh7367_devices)); |
436 | } | 456 | } |
437 | 457 | ||
458 | static void __init sh7367_earlytimer_init(void) | ||
459 | { | ||
460 | sh7367_clock_init(); | ||
461 | shmobile_earlytimer_init(); | ||
462 | } | ||
463 | |||
438 | #define SYMSTPCR2 0xe6158048 | 464 | #define SYMSTPCR2 0xe6158048 |
439 | #define SYMSTPCR2_CMT1 (1 << 29) | 465 | #define SYMSTPCR2_CMT1 (1 << 29) |
440 | 466 | ||
@@ -445,4 +471,10 @@ void __init sh7367_add_early_devices(void) | |||
445 | 471 | ||
446 | early_platform_add_devices(sh7367_early_devices, | 472 | early_platform_add_devices(sh7367_early_devices, |
447 | ARRAY_SIZE(sh7367_early_devices)); | 473 | ARRAY_SIZE(sh7367_early_devices)); |
474 | |||
475 | /* setup early console here as well */ | ||
476 | shmobile_setup_console(); | ||
477 | |||
478 | /* override timer setup with soc-specific code */ | ||
479 | shmobile_timer.init = sh7367_earlytimer_init; | ||
448 | } | 480 | } |
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c index a83cf51fc099..0ebbee087b5e 100644 --- a/arch/arm/mach-shmobile/setup-sh7372.c +++ b/arch/arm/mach-shmobile/setup-sh7372.c | |||
@@ -31,10 +31,37 @@ | |||
31 | #include <linux/sh_intc.h> | 31 | #include <linux/sh_intc.h> |
32 | #include <linux/sh_timer.h> | 32 | #include <linux/sh_timer.h> |
33 | #include <linux/pm_domain.h> | 33 | #include <linux/pm_domain.h> |
34 | #include <linux/dma-mapping.h> | ||
34 | #include <mach/hardware.h> | 35 | #include <mach/hardware.h> |
35 | #include <mach/sh7372.h> | 36 | #include <mach/sh7372.h> |
37 | #include <mach/common.h> | ||
38 | #include <asm/mach/map.h> | ||
36 | #include <asm/mach-types.h> | 39 | #include <asm/mach-types.h> |
37 | #include <asm/mach/arch.h> | 40 | #include <asm/mach/arch.h> |
41 | #include <asm/mach/time.h> | ||
42 | |||
43 | static struct map_desc sh7372_io_desc[] __initdata = { | ||
44 | /* create a 1:1 entity map for 0xe6xxxxxx | ||
45 | * used by CPGA, INTC and PFC. | ||
46 | */ | ||
47 | { | ||
48 | .virtual = 0xe6000000, | ||
49 | .pfn = __phys_to_pfn(0xe6000000), | ||
50 | .length = 256 << 20, | ||
51 | .type = MT_DEVICE_NONSHARED | ||
52 | }, | ||
53 | }; | ||
54 | |||
55 | void __init sh7372_map_io(void) | ||
56 | { | ||
57 | iotable_init(sh7372_io_desc, ARRAY_SIZE(sh7372_io_desc)); | ||
58 | |||
59 | /* | ||
60 | * DMA memory at 0xff200000 - 0xffdfffff. The default 2MB size isn't | ||
61 | * enough to allocate the frame buffer memory. | ||
62 | */ | ||
63 | init_consistent_dma_size(12 << 20); | ||
64 | } | ||
38 | 65 | ||
39 | /* SCIFA0 */ | 66 | /* SCIFA0 */ |
40 | static struct plat_sci_port scif0_platform_data = { | 67 | static struct plat_sci_port scif0_platform_data = { |
@@ -1045,8 +1072,20 @@ void __init sh7372_add_standard_devices(void) | |||
1045 | sh7372_add_device_to_domain(&sh7372_a4r, &jpu_device); | 1072 | sh7372_add_device_to_domain(&sh7372_a4r, &jpu_device); |
1046 | } | 1073 | } |
1047 | 1074 | ||
1075 | static void __init sh7372_earlytimer_init(void) | ||
1076 | { | ||
1077 | sh7372_clock_init(); | ||
1078 | shmobile_earlytimer_init(); | ||
1079 | } | ||
1080 | |||
1048 | void __init sh7372_add_early_devices(void) | 1081 | void __init sh7372_add_early_devices(void) |
1049 | { | 1082 | { |
1050 | early_platform_add_devices(sh7372_early_devices, | 1083 | early_platform_add_devices(sh7372_early_devices, |
1051 | ARRAY_SIZE(sh7372_early_devices)); | 1084 | ARRAY_SIZE(sh7372_early_devices)); |
1085 | |||
1086 | /* setup early console here as well */ | ||
1087 | shmobile_setup_console(); | ||
1088 | |||
1089 | /* override timer setup with soc-specific code */ | ||
1090 | shmobile_timer.init = sh7372_earlytimer_init; | ||
1052 | } | 1091 | } |
diff --git a/arch/arm/mach-shmobile/setup-sh7377.c b/arch/arm/mach-shmobile/setup-sh7377.c index bb405b8e459b..9f146095098b 100644 --- a/arch/arm/mach-shmobile/setup-sh7377.c +++ b/arch/arm/mach-shmobile/setup-sh7377.c | |||
@@ -30,8 +30,28 @@ | |||
30 | #include <linux/sh_intc.h> | 30 | #include <linux/sh_intc.h> |
31 | #include <linux/sh_timer.h> | 31 | #include <linux/sh_timer.h> |
32 | #include <mach/hardware.h> | 32 | #include <mach/hardware.h> |
33 | #include <mach/common.h> | ||
34 | #include <asm/mach/map.h> | ||
33 | #include <asm/mach-types.h> | 35 | #include <asm/mach-types.h> |
34 | #include <asm/mach/arch.h> | 36 | #include <asm/mach/arch.h> |
37 | #include <asm/mach/time.h> | ||
38 | |||
39 | static struct map_desc sh7377_io_desc[] __initdata = { | ||
40 | /* create a 1:1 entity map for 0xe6xxxxxx | ||
41 | * used by CPGA, INTC and PFC. | ||
42 | */ | ||
43 | { | ||
44 | .virtual = 0xe6000000, | ||
45 | .pfn = __phys_to_pfn(0xe6000000), | ||
46 | .length = 256 << 20, | ||
47 | .type = MT_DEVICE_NONSHARED | ||
48 | }, | ||
49 | }; | ||
50 | |||
51 | void __init sh7377_map_io(void) | ||
52 | { | ||
53 | iotable_init(sh7377_io_desc, ARRAY_SIZE(sh7377_io_desc)); | ||
54 | } | ||
35 | 55 | ||
36 | /* SCIFA0 */ | 56 | /* SCIFA0 */ |
37 | static struct plat_sci_port scif0_platform_data = { | 57 | static struct plat_sci_port scif0_platform_data = { |
@@ -456,6 +476,12 @@ void __init sh7377_add_standard_devices(void) | |||
456 | ARRAY_SIZE(sh7377_devices)); | 476 | ARRAY_SIZE(sh7377_devices)); |
457 | } | 477 | } |
458 | 478 | ||
479 | static void __init sh7377_earlytimer_init(void) | ||
480 | { | ||
481 | sh7377_clock_init(); | ||
482 | shmobile_earlytimer_init(); | ||
483 | } | ||
484 | |||
459 | #define SMSTPCR3 0xe615013c | 485 | #define SMSTPCR3 0xe615013c |
460 | #define SMSTPCR3_CMT1 (1 << 29) | 486 | #define SMSTPCR3_CMT1 (1 << 29) |
461 | 487 | ||
@@ -466,4 +492,10 @@ void __init sh7377_add_early_devices(void) | |||
466 | 492 | ||
467 | early_platform_add_devices(sh7377_early_devices, | 493 | early_platform_add_devices(sh7377_early_devices, |
468 | ARRAY_SIZE(sh7377_early_devices)); | 494 | ARRAY_SIZE(sh7377_early_devices)); |
495 | |||
496 | /* setup early console here as well */ | ||
497 | shmobile_setup_console(); | ||
498 | |||
499 | /* override timer setup with soc-specific code */ | ||
500 | shmobile_timer.init = sh7377_earlytimer_init; | ||
469 | } | 501 | } |
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c index 20e71e5cace4..b6a0734a738e 100644 --- a/arch/arm/mach-shmobile/setup-sh73a0.c +++ b/arch/arm/mach-shmobile/setup-sh73a0.c | |||
@@ -32,8 +32,28 @@ | |||
32 | #include <linux/sh_timer.h> | 32 | #include <linux/sh_timer.h> |
33 | #include <mach/hardware.h> | 33 | #include <mach/hardware.h> |
34 | #include <mach/sh73a0.h> | 34 | #include <mach/sh73a0.h> |
35 | #include <mach/common.h> | ||
35 | #include <asm/mach-types.h> | 36 | #include <asm/mach-types.h> |
37 | #include <asm/mach/map.h> | ||
36 | #include <asm/mach/arch.h> | 38 | #include <asm/mach/arch.h> |
39 | #include <asm/mach/time.h> | ||
40 | |||
41 | static struct map_desc sh73a0_io_desc[] __initdata = { | ||
42 | /* create a 1:1 entity map for 0xe6xxxxxx | ||
43 | * used by CPGA, INTC and PFC. | ||
44 | */ | ||
45 | { | ||
46 | .virtual = 0xe6000000, | ||
47 | .pfn = __phys_to_pfn(0xe6000000), | ||
48 | .length = 256 << 20, | ||
49 | .type = MT_DEVICE_NONSHARED | ||
50 | }, | ||
51 | }; | ||
52 | |||
53 | void __init sh73a0_map_io(void) | ||
54 | { | ||
55 | iotable_init(sh73a0_io_desc, ARRAY_SIZE(sh73a0_io_desc)); | ||
56 | } | ||
37 | 57 | ||
38 | static struct plat_sci_port scif0_platform_data = { | 58 | static struct plat_sci_port scif0_platform_data = { |
39 | .mapbase = 0xe6c40000, | 59 | .mapbase = 0xe6c40000, |
@@ -667,8 +687,20 @@ void __init sh73a0_add_standard_devices(void) | |||
667 | ARRAY_SIZE(sh73a0_late_devices)); | 687 | ARRAY_SIZE(sh73a0_late_devices)); |
668 | } | 688 | } |
669 | 689 | ||
690 | static void __init sh73a0_earlytimer_init(void) | ||
691 | { | ||
692 | sh73a0_clock_init(); | ||
693 | shmobile_earlytimer_init(); | ||
694 | } | ||
695 | |||
670 | void __init sh73a0_add_early_devices(void) | 696 | void __init sh73a0_add_early_devices(void) |
671 | { | 697 | { |
672 | early_platform_add_devices(sh73a0_early_devices, | 698 | early_platform_add_devices(sh73a0_early_devices, |
673 | ARRAY_SIZE(sh73a0_early_devices)); | 699 | ARRAY_SIZE(sh73a0_early_devices)); |
700 | |||
701 | /* setup early console here as well */ | ||
702 | shmobile_setup_console(); | ||
703 | |||
704 | /* override timer setup with soc-specific code */ | ||
705 | shmobile_timer.init = sh73a0_earlytimer_init; | ||
674 | } | 706 | } |
diff --git a/arch/arm/mach-shmobile/timer.c b/arch/arm/mach-shmobile/timer.c index 895794b543cd..be1ad70fe404 100644 --- a/arch/arm/mach-shmobile/timer.c +++ b/arch/arm/mach-shmobile/timer.c | |||
@@ -36,11 +36,15 @@ static void __init shmobile_late_time_init(void) | |||
36 | early_platform_driver_probe("earlytimer", 2, 0); | 36 | early_platform_driver_probe("earlytimer", 2, 0); |
37 | } | 37 | } |
38 | 38 | ||
39 | static void __init shmobile_timer_init(void) | 39 | void __init shmobile_earlytimer_init(void) |
40 | { | 40 | { |
41 | late_time_init = shmobile_late_time_init; | 41 | late_time_init = shmobile_late_time_init; |
42 | } | 42 | } |
43 | 43 | ||
44 | static void __init shmobile_timer_init(void) | ||
45 | { | ||
46 | } | ||
47 | |||
44 | struct sys_timer shmobile_timer = { | 48 | struct sys_timer shmobile_timer = { |
45 | .init = shmobile_timer_init, | 49 | .init = shmobile_timer_init, |
46 | }; | 50 | }; |
diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig index 5cfa5390e0fd..d07a3afc38c0 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 cd5aac08a265..8b928f9bc1c3 100644 --- a/arch/arm/plat-samsung/devs.c +++ b/arch/arm/plat-samsung/devs.c | |||
@@ -1445,7 +1445,7 @@ void __init s5p_ehci_set_platdata(struct s5p_ehci_platdata *pd) | |||
1445 | 1445 | ||
1446 | #ifdef CONFIG_S3C_DEV_USB_HSOTG | 1446 | #ifdef CONFIG_S3C_DEV_USB_HSOTG |
1447 | static struct resource s3c_usb_hsotg_resources[] = { | 1447 | static struct resource s3c_usb_hsotg_resources[] = { |
1448 | [0] = DEFINE_RES_MEM(S3C_PA_USB_HSOTG, SZ_16K), | 1448 | [0] = DEFINE_RES_MEM(S3C_PA_USB_HSOTG, SZ_128K), |
1449 | [1] = DEFINE_RES_IRQ(IRQ_OTG), | 1449 | [1] = DEFINE_RES_IRQ(IRQ_OTG), |
1450 | }; | 1450 | }; |
1451 | 1451 | ||
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 | ||