diff options
Diffstat (limited to 'arch/arm')
470 files changed, 8885 insertions, 23142 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index d7d7cdf955e..64ae22c4fce 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -11,6 +11,7 @@ config ARM | |||
11 | select HAVE_OPROFILE if (HAVE_PERF_EVENTS) | 11 | select HAVE_OPROFILE if (HAVE_PERF_EVENTS) |
12 | select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL | 12 | select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL |
13 | select HAVE_ARCH_KGDB | 13 | select HAVE_ARCH_KGDB |
14 | select HAVE_ARCH_TRACEHOOK | ||
14 | select HAVE_KPROBES if !XIP_KERNEL | 15 | select HAVE_KPROBES if !XIP_KERNEL |
15 | select HAVE_KRETPROBES if (HAVE_KPROBES) | 16 | select HAVE_KRETPROBES if (HAVE_KPROBES) |
16 | select HAVE_FUNCTION_TRACER if (!XIP_KERNEL) | 17 | select HAVE_FUNCTION_TRACER if (!XIP_KERNEL) |
@@ -30,10 +31,15 @@ config ARM | |||
30 | select HAVE_HW_BREAKPOINT if (PERF_EVENTS && (CPU_V6 || CPU_V6K || CPU_V7)) | 31 | select HAVE_HW_BREAKPOINT if (PERF_EVENTS && (CPU_V6 || CPU_V6K || CPU_V7)) |
31 | select HAVE_C_RECORDMCOUNT | 32 | select HAVE_C_RECORDMCOUNT |
32 | select HAVE_GENERIC_HARDIRQS | 33 | select HAVE_GENERIC_HARDIRQS |
34 | select HARDIRQS_SW_RESEND | ||
35 | select GENERIC_IRQ_PROBE | ||
33 | select GENERIC_IRQ_SHOW | 36 | select GENERIC_IRQ_SHOW |
37 | select GENERIC_IRQ_PROBE | ||
38 | select HARDIRQS_SW_RESEND | ||
34 | select CPU_PM if (SUSPEND || CPU_IDLE) | 39 | select CPU_PM if (SUSPEND || CPU_IDLE) |
35 | select GENERIC_PCI_IOMAP | 40 | select GENERIC_PCI_IOMAP |
36 | select HAVE_BPF_JIT if NET | 41 | select HAVE_BPF_JIT |
42 | select GENERIC_SMP_IDLE_THREAD | ||
37 | help | 43 | help |
38 | The ARM series is a line of low-power-consumption RISC chip designs | 44 | The ARM series is a line of low-power-consumption RISC chip designs |
39 | licensed by ARM Ltd and targeted at embedded applications and | 45 | licensed by ARM Ltd and targeted at embedded applications and |
@@ -126,14 +132,6 @@ config TRACE_IRQFLAGS_SUPPORT | |||
126 | bool | 132 | bool |
127 | default y | 133 | default y |
128 | 134 | ||
129 | config HARDIRQS_SW_RESEND | ||
130 | bool | ||
131 | default y | ||
132 | |||
133 | config GENERIC_IRQ_PROBE | ||
134 | bool | ||
135 | default y | ||
136 | |||
137 | config GENERIC_LOCKBREAK | 135 | config GENERIC_LOCKBREAK |
138 | bool | 136 | bool |
139 | default y | 137 | default y |
@@ -159,9 +157,6 @@ config ARCH_HAS_CPUFREQ | |||
159 | and that the relevant menu configurations are displayed for | 157 | and that the relevant menu configurations are displayed for |
160 | it. | 158 | it. |
161 | 159 | ||
162 | config ARCH_HAS_CPU_IDLE_WAIT | ||
163 | def_bool y | ||
164 | |||
165 | config GENERIC_HWEIGHT | 160 | config GENERIC_HWEIGHT |
166 | bool | 161 | bool |
167 | default y | 162 | default y |
@@ -280,6 +275,7 @@ config ARCH_INTEGRATOR | |||
280 | select NEED_MACH_IO_H | 275 | select NEED_MACH_IO_H |
281 | select NEED_MACH_MEMORY_H | 276 | select NEED_MACH_MEMORY_H |
282 | select SPARSE_IRQ | 277 | select SPARSE_IRQ |
278 | select MULTI_IRQ_HANDLER | ||
283 | help | 279 | help |
284 | Support for ARM's Integrator platform. | 280 | Support for ARM's Integrator platform. |
285 | 281 | ||
@@ -340,8 +336,8 @@ config ARCH_AT91 | |||
340 | select IRQ_DOMAIN | 336 | select IRQ_DOMAIN |
341 | select NEED_MACH_IO_H if PCCARD | 337 | select NEED_MACH_IO_H if PCCARD |
342 | help | 338 | help |
343 | This enables support for systems based on the Atmel AT91RM9200, | 339 | This enables support for systems based on Atmel |
344 | AT91SAM9 processors. | 340 | AT91RM9200 and AT91SAM9* processors. |
345 | 341 | ||
346 | config ARCH_BCMRING | 342 | config ARCH_BCMRING |
347 | bool "Broadcom BCMRING" | 343 | bool "Broadcom BCMRING" |
@@ -373,12 +369,12 @@ config ARCH_HIGHBANK | |||
373 | Support for the Calxeda Highbank SoC based boards. | 369 | Support for the Calxeda Highbank SoC based boards. |
374 | 370 | ||
375 | config ARCH_CLPS711X | 371 | config ARCH_CLPS711X |
376 | bool "Cirrus Logic CLPS711x/EP721x-based" | 372 | bool "Cirrus Logic CLPS711x/EP721x/EP731x-based" |
377 | select CPU_ARM720T | 373 | select CPU_ARM720T |
378 | select ARCH_USES_GETTIMEOFFSET | 374 | select ARCH_USES_GETTIMEOFFSET |
379 | select NEED_MACH_MEMORY_H | 375 | select NEED_MACH_MEMORY_H |
380 | help | 376 | help |
381 | Support for Cirrus Logic 711x/721x based boards. | 377 | Support for Cirrus Logic 711x/721x/731x based boards. |
382 | 378 | ||
383 | config ARCH_CNS3XXX | 379 | config ARCH_CNS3XXX |
384 | bool "Cavium Networks CNS3XXX family" | 380 | bool "Cavium Networks CNS3XXX family" |
@@ -528,28 +524,6 @@ config ARCH_IOP33X | |||
528 | help | 524 | help |
529 | Support for Intel's IOP33X (XScale) family of processors. | 525 | Support for Intel's IOP33X (XScale) family of processors. |
530 | 526 | ||
531 | config ARCH_IXP23XX | ||
532 | bool "IXP23XX-based" | ||
533 | depends on MMU | ||
534 | select CPU_XSC3 | ||
535 | select PCI | ||
536 | select ARCH_USES_GETTIMEOFFSET | ||
537 | select NEED_MACH_IO_H | ||
538 | select NEED_MACH_MEMORY_H | ||
539 | help | ||
540 | Support for Intel's IXP23xx (XScale) family of processors. | ||
541 | |||
542 | config ARCH_IXP2000 | ||
543 | bool "IXP2400/2800-based" | ||
544 | depends on MMU | ||
545 | select CPU_XSCALE | ||
546 | select PCI | ||
547 | select ARCH_USES_GETTIMEOFFSET | ||
548 | select NEED_MACH_IO_H | ||
549 | select NEED_MACH_MEMORY_H | ||
550 | help | ||
551 | Support for Intel's IXP2400/2800 (XScale) family of processors. | ||
552 | |||
553 | config ARCH_IXP4XX | 527 | config ARCH_IXP4XX |
554 | bool "IXP4xx-based" | 528 | bool "IXP4xx-based" |
555 | depends on MMU | 529 | depends on MMU |
@@ -632,7 +606,6 @@ config ARCH_MMP | |||
632 | select CLKDEV_LOOKUP | 606 | select CLKDEV_LOOKUP |
633 | select GENERIC_CLOCKEVENTS | 607 | select GENERIC_CLOCKEVENTS |
634 | select GPIO_PXA | 608 | select GPIO_PXA |
635 | select TICK_ONESHOT | ||
636 | select PLAT_PXA | 609 | select PLAT_PXA |
637 | select SPARSE_IRQ | 610 | select SPARSE_IRQ |
638 | select GENERIC_ALLOCATOR | 611 | select GENERIC_ALLOCATOR |
@@ -716,7 +689,6 @@ config ARCH_PXA | |||
716 | select ARCH_REQUIRE_GPIOLIB | 689 | select ARCH_REQUIRE_GPIOLIB |
717 | select GENERIC_CLOCKEVENTS | 690 | select GENERIC_CLOCKEVENTS |
718 | select GPIO_PXA | 691 | select GPIO_PXA |
719 | select TICK_ONESHOT | ||
720 | select PLAT_PXA | 692 | select PLAT_PXA |
721 | select SPARSE_IRQ | 693 | select SPARSE_IRQ |
722 | select AUTO_ZRELADDR | 694 | select AUTO_ZRELADDR |
@@ -783,7 +755,6 @@ config ARCH_SA1100 | |||
783 | select CPU_FREQ | 755 | select CPU_FREQ |
784 | select GENERIC_CLOCKEVENTS | 756 | select GENERIC_CLOCKEVENTS |
785 | select CLKDEV_LOOKUP | 757 | select CLKDEV_LOOKUP |
786 | select TICK_ONESHOT | ||
787 | select ARCH_REQUIRE_GPIOLIB | 758 | select ARCH_REQUIRE_GPIOLIB |
788 | select HAVE_IDE | 759 | select HAVE_IDE |
789 | select NEED_MACH_MEMORY_H | 760 | select NEED_MACH_MEMORY_H |
@@ -1046,10 +1017,6 @@ source "arch/arm/mach-iop13xx/Kconfig" | |||
1046 | 1017 | ||
1047 | source "arch/arm/mach-ixp4xx/Kconfig" | 1018 | source "arch/arm/mach-ixp4xx/Kconfig" |
1048 | 1019 | ||
1049 | source "arch/arm/mach-ixp2000/Kconfig" | ||
1050 | |||
1051 | source "arch/arm/mach-ixp23xx/Kconfig" | ||
1052 | |||
1053 | source "arch/arm/mach-kirkwood/Kconfig" | 1020 | source "arch/arm/mach-kirkwood/Kconfig" |
1054 | 1021 | ||
1055 | source "arch/arm/mach-ks8695/Kconfig" | 1022 | source "arch/arm/mach-ks8695/Kconfig" |
@@ -1552,10 +1519,15 @@ config HAVE_ARM_SCU | |||
1552 | help | 1519 | help |
1553 | This option enables support for the ARM system coherency unit | 1520 | This option enables support for the ARM system coherency unit |
1554 | 1521 | ||
1522 | config ARM_ARCH_TIMER | ||
1523 | bool "Architected timer support" | ||
1524 | depends on CPU_V7 | ||
1525 | help | ||
1526 | This option enables support for the ARM architected timer | ||
1527 | |||
1555 | config HAVE_ARM_TWD | 1528 | config HAVE_ARM_TWD |
1556 | bool | 1529 | bool |
1557 | depends on SMP | 1530 | depends on SMP |
1558 | select TICK_ONESHOT | ||
1559 | help | 1531 | help |
1560 | This options enables support for the ARM timer and watchdog unit | 1532 | This options enables support for the ARM timer and watchdog unit |
1561 | 1533 | ||
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 047a20780fc..157900da878 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -70,8 +70,6 @@ arch-$(CONFIG_CPU_32v4) :=-D__LINUX_ARM_ARCH__=4 -march=armv4 | |||
70 | arch-$(CONFIG_CPU_32v3) :=-D__LINUX_ARM_ARCH__=3 -march=armv3 | 70 | arch-$(CONFIG_CPU_32v3) :=-D__LINUX_ARM_ARCH__=3 -march=armv3 |
71 | 71 | ||
72 | # This selects how we optimise for the processor. | 72 | # This selects how we optimise for the processor. |
73 | tune-$(CONFIG_CPU_ARM610) :=-mtune=arm610 | ||
74 | tune-$(CONFIG_CPU_ARM710) :=-mtune=arm710 | ||
75 | tune-$(CONFIG_CPU_ARM7TDMI) :=-mtune=arm7tdmi | 73 | tune-$(CONFIG_CPU_ARM7TDMI) :=-mtune=arm7tdmi |
76 | tune-$(CONFIG_CPU_ARM720T) :=-mtune=arm7tdmi | 74 | tune-$(CONFIG_CPU_ARM720T) :=-mtune=arm7tdmi |
77 | tune-$(CONFIG_CPU_ARM740T) :=-mtune=arm7tdmi | 75 | tune-$(CONFIG_CPU_ARM740T) :=-mtune=arm7tdmi |
@@ -119,7 +117,7 @@ KBUILD_AFLAGS +=$(CFLAGS_ABI) $(AFLAGS_THUMB2) $(arch-y) $(tune-y) -include asm/ | |||
119 | CHECKFLAGS += -D__arm__ | 117 | CHECKFLAGS += -D__arm__ |
120 | 118 | ||
121 | #Default value | 119 | #Default value |
122 | head-y := arch/arm/kernel/head$(MMUEXT).o arch/arm/kernel/init_task.o | 120 | head-y := arch/arm/kernel/head$(MMUEXT).o |
123 | textofs-y := 0x00008000 | 121 | textofs-y := 0x00008000 |
124 | textofs-$(CONFIG_ARCH_CLPS711X) := 0x00028000 | 122 | textofs-$(CONFIG_ARCH_CLPS711X) := 0x00028000 |
125 | # We don't want the htc bootloader to corrupt kernel during resume | 123 | # We don't want the htc bootloader to corrupt kernel during resume |
@@ -149,8 +147,6 @@ machine-$(CONFIG_ARCH_INTEGRATOR) := integrator | |||
149 | machine-$(CONFIG_ARCH_IOP13XX) := iop13xx | 147 | machine-$(CONFIG_ARCH_IOP13XX) := iop13xx |
150 | machine-$(CONFIG_ARCH_IOP32X) := iop32x | 148 | machine-$(CONFIG_ARCH_IOP32X) := iop32x |
151 | machine-$(CONFIG_ARCH_IOP33X) := iop33x | 149 | machine-$(CONFIG_ARCH_IOP33X) := iop33x |
152 | machine-$(CONFIG_ARCH_IXP2000) := ixp2000 | ||
153 | machine-$(CONFIG_ARCH_IXP23XX) := ixp23xx | ||
154 | machine-$(CONFIG_ARCH_IXP4XX) := ixp4xx | 150 | machine-$(CONFIG_ARCH_IXP4XX) := ixp4xx |
155 | machine-$(CONFIG_ARCH_KIRKWOOD) := kirkwood | 151 | machine-$(CONFIG_ARCH_KIRKWOOD) := kirkwood |
156 | machine-$(CONFIG_ARCH_KS8695) := ks8695 | 152 | machine-$(CONFIG_ARCH_KS8695) := ks8695 |
diff --git a/arch/arm/boot/compressed/head-xscale.S b/arch/arm/boot/compressed/head-xscale.S index aa5ee49c5c5..6ab0599c02d 100644 --- a/arch/arm/boot/compressed/head-xscale.S +++ b/arch/arm/boot/compressed/head-xscale.S | |||
@@ -32,10 +32,3 @@ __XScale_start: | |||
32 | bic r0, r0, #0x1000 @ clear Icache | 32 | bic r0, r0, #0x1000 @ clear Icache |
33 | mcr p15, 0, r0, c1, c0, 0 | 33 | mcr p15, 0, r0, c1, c0, 0 |
34 | 34 | ||
35 | #ifdef CONFIG_ARCH_IXP2000 | ||
36 | mov r1, #-1 | ||
37 | mov r0, #0xd6000000 | ||
38 | str r1, [r0, #0x14] | ||
39 | str r1, [r0, #0x18] | ||
40 | #endif | ||
41 | |||
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index dc7e8ce8e6b..b8c64b80baf 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S | |||
@@ -567,6 +567,12 @@ __armv3_mpu_cache_on: | |||
567 | mcr p15, 0, r0, c7, c0, 0 @ invalidate whole cache v3 | 567 | mcr p15, 0, r0, c7, c0, 0 @ invalidate whole cache v3 |
568 | mov pc, lr | 568 | mov pc, lr |
569 | 569 | ||
570 | #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH | ||
571 | #define CB_BITS 0x08 | ||
572 | #else | ||
573 | #define CB_BITS 0x0c | ||
574 | #endif | ||
575 | |||
570 | __setup_mmu: sub r3, r4, #16384 @ Page directory size | 576 | __setup_mmu: sub r3, r4, #16384 @ Page directory size |
571 | bic r3, r3, #0xff @ Align the pointer | 577 | bic r3, r3, #0xff @ Align the pointer |
572 | bic r3, r3, #0x3f00 | 578 | bic r3, r3, #0x3f00 |
@@ -578,17 +584,14 @@ __setup_mmu: sub r3, r4, #16384 @ Page directory size | |||
578 | mov r9, r0, lsr #18 | 584 | mov r9, r0, lsr #18 |
579 | mov r9, r9, lsl #18 @ start of RAM | 585 | mov r9, r9, lsl #18 @ start of RAM |
580 | add r10, r9, #0x10000000 @ a reasonable RAM size | 586 | add r10, r9, #0x10000000 @ a reasonable RAM size |
581 | mov r1, #0x12 | 587 | mov r1, #0x12 @ XN|U + section mapping |
582 | orr r1, r1, #3 << 10 | 588 | orr r1, r1, #3 << 10 @ AP=11 |
583 | add r2, r3, #16384 | 589 | add r2, r3, #16384 |
584 | 1: cmp r1, r9 @ if virt > start of RAM | 590 | 1: cmp r1, r9 @ if virt > start of RAM |
585 | #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH | 591 | cmphs r10, r1 @ && end of RAM > virt |
586 | orrhs r1, r1, #0x08 @ set cacheable | 592 | bic r1, r1, #0x1c @ clear XN|U + C + B |
587 | #else | 593 | orrlo r1, r1, #0x10 @ Set XN|U for non-RAM |
588 | orrhs r1, r1, #0x0c @ set cacheable, bufferable | 594 | orrhs r1, r1, r6 @ set RAM section settings |
589 | #endif | ||
590 | cmp r1, r10 @ if virt > end of RAM | ||
591 | bichs r1, r1, #0x0c @ clear cacheable, bufferable | ||
592 | str r1, [r0], #4 @ 1:1 mapping | 595 | str r1, [r0], #4 @ 1:1 mapping |
593 | add r1, r1, #1048576 | 596 | add r1, r1, #1048576 |
594 | teq r0, r2 | 597 | teq r0, r2 |
@@ -599,7 +602,7 @@ __setup_mmu: sub r3, r4, #16384 @ Page directory size | |||
599 | * so there is no map overlap problem for up to 1 MB compressed kernel. | 602 | * so there is no map overlap problem for up to 1 MB compressed kernel. |
600 | * If the execution is in RAM then we would only be duplicating the above. | 603 | * If the execution is in RAM then we would only be duplicating the above. |
601 | */ | 604 | */ |
602 | mov r1, #0x1e | 605 | orr r1, r6, #0x04 @ ensure B is set for this |
603 | orr r1, r1, #3 << 10 | 606 | orr r1, r1, #3 << 10 |
604 | mov r2, pc | 607 | mov r2, pc |
605 | mov r2, r2, lsr #20 | 608 | mov r2, r2, lsr #20 |
@@ -620,6 +623,7 @@ __arm926ejs_mmu_cache_on: | |||
620 | __armv4_mmu_cache_on: | 623 | __armv4_mmu_cache_on: |
621 | mov r12, lr | 624 | mov r12, lr |
622 | #ifdef CONFIG_MMU | 625 | #ifdef CONFIG_MMU |
626 | mov r6, #CB_BITS | 0x12 @ U | ||
623 | bl __setup_mmu | 627 | bl __setup_mmu |
624 | mov r0, #0 | 628 | mov r0, #0 |
625 | mcr p15, 0, r0, c7, c10, 4 @ drain write buffer | 629 | mcr p15, 0, r0, c7, c10, 4 @ drain write buffer |
@@ -641,6 +645,7 @@ __armv7_mmu_cache_on: | |||
641 | #ifdef CONFIG_MMU | 645 | #ifdef CONFIG_MMU |
642 | mrc p15, 0, r11, c0, c1, 4 @ read ID_MMFR0 | 646 | mrc p15, 0, r11, c0, c1, 4 @ read ID_MMFR0 |
643 | tst r11, #0xf @ VMSA | 647 | tst r11, #0xf @ VMSA |
648 | movne r6, #CB_BITS | 0x02 @ !XN | ||
644 | blne __setup_mmu | 649 | blne __setup_mmu |
645 | mov r0, #0 | 650 | mov r0, #0 |
646 | mcr p15, 0, r0, c7, c10, 4 @ drain write buffer | 651 | mcr p15, 0, r0, c7, c10, 4 @ drain write buffer |
@@ -655,7 +660,7 @@ __armv7_mmu_cache_on: | |||
655 | orr r0, r0, #1 << 25 @ big-endian page tables | 660 | orr r0, r0, #1 << 25 @ big-endian page tables |
656 | #endif | 661 | #endif |
657 | orrne r0, r0, #1 @ MMU enabled | 662 | orrne r0, r0, #1 @ MMU enabled |
658 | movne r1, #-1 | 663 | movne r1, #0xfffffffd @ domain 0 = client |
659 | mcrne p15, 0, r3, c2, c0, 0 @ load page table pointer | 664 | mcrne p15, 0, r3, c2, c0, 0 @ load page table pointer |
660 | mcrne p15, 0, r1, c3, c0, 0 @ load domain access control | 665 | mcrne p15, 0, r1, c3, c0, 0 @ load domain access control |
661 | #endif | 666 | #endif |
@@ -668,6 +673,7 @@ __armv7_mmu_cache_on: | |||
668 | 673 | ||
669 | __fa526_cache_on: | 674 | __fa526_cache_on: |
670 | mov r12, lr | 675 | mov r12, lr |
676 | mov r6, #CB_BITS | 0x12 @ U | ||
671 | bl __setup_mmu | 677 | bl __setup_mmu |
672 | mov r0, #0 | 678 | mov r0, #0 |
673 | mcr p15, 0, r0, c7, c7, 0 @ Invalidate whole cache | 679 | mcr p15, 0, r0, c7, c7, 0 @ Invalidate whole cache |
@@ -680,18 +686,6 @@ __fa526_cache_on: | |||
680 | mcr p15, 0, r0, c8, c7, 0 @ flush UTLB | 686 | mcr p15, 0, r0, c8, c7, 0 @ flush UTLB |
681 | mov pc, r12 | 687 | mov pc, r12 |
682 | 688 | ||
683 | __arm6_mmu_cache_on: | ||
684 | mov r12, lr | ||
685 | bl __setup_mmu | ||
686 | mov r0, #0 | ||
687 | mcr p15, 0, r0, c7, c0, 0 @ invalidate whole cache v3 | ||
688 | mcr p15, 0, r0, c5, c0, 0 @ invalidate whole TLB v3 | ||
689 | mov r0, #0x30 | ||
690 | bl __common_mmu_cache_on | ||
691 | mov r0, #0 | ||
692 | mcr p15, 0, r0, c5, c0, 0 @ invalidate whole TLB v3 | ||
693 | mov pc, r12 | ||
694 | |||
695 | __common_mmu_cache_on: | 689 | __common_mmu_cache_on: |
696 | #ifndef CONFIG_THUMB2_KERNEL | 690 | #ifndef CONFIG_THUMB2_KERNEL |
697 | #ifndef DEBUG | 691 | #ifndef DEBUG |
@@ -756,16 +750,6 @@ call_cache_fn: adr r12, proc_types | |||
756 | .align 2 | 750 | .align 2 |
757 | .type proc_types,#object | 751 | .type proc_types,#object |
758 | proc_types: | 752 | proc_types: |
759 | .word 0x41560600 @ ARM6/610 | ||
760 | .word 0xffffffe0 | ||
761 | W(b) __arm6_mmu_cache_off @ works, but slow | ||
762 | W(b) __arm6_mmu_cache_off | ||
763 | mov pc, lr | ||
764 | THUMB( nop ) | ||
765 | @ b __arm6_mmu_cache_on @ untested | ||
766 | @ b __arm6_mmu_cache_off | ||
767 | @ b __armv3_mmu_cache_flush | ||
768 | |||
769 | .word 0x00000000 @ old ARM ID | 753 | .word 0x00000000 @ old ARM ID |
770 | .word 0x0000f000 | 754 | .word 0x0000f000 |
771 | mov pc, lr | 755 | mov pc, lr |
@@ -777,8 +761,10 @@ proc_types: | |||
777 | 761 | ||
778 | .word 0x41007000 @ ARM7/710 | 762 | .word 0x41007000 @ ARM7/710 |
779 | .word 0xfff8fe00 | 763 | .word 0xfff8fe00 |
780 | W(b) __arm7_mmu_cache_off | 764 | mov pc, lr |
781 | W(b) __arm7_mmu_cache_off | 765 | THUMB( nop ) |
766 | mov pc, lr | ||
767 | THUMB( nop ) | ||
782 | mov pc, lr | 768 | mov pc, lr |
783 | THUMB( nop ) | 769 | THUMB( nop ) |
784 | 770 | ||
@@ -977,21 +963,6 @@ __armv7_mmu_cache_off: | |||
977 | mcr p15, 0, r0, c7, c5, 4 @ ISB | 963 | mcr p15, 0, r0, c7, c5, 4 @ ISB |
978 | mov pc, r12 | 964 | mov pc, r12 |
979 | 965 | ||
980 | __arm6_mmu_cache_off: | ||
981 | mov r0, #0x00000030 @ ARM6 control reg. | ||
982 | b __armv3_mmu_cache_off | ||
983 | |||
984 | __arm7_mmu_cache_off: | ||
985 | mov r0, #0x00000070 @ ARM7 control reg. | ||
986 | b __armv3_mmu_cache_off | ||
987 | |||
988 | __armv3_mmu_cache_off: | ||
989 | mcr p15, 0, r0, c1, c0, 0 @ turn MMU and cache off | ||
990 | mov r0, #0 | ||
991 | mcr p15, 0, r0, c7, c0, 0 @ invalidate whole cache v3 | ||
992 | mcr p15, 0, r0, c5, c0, 0 @ invalidate whole TLB v3 | ||
993 | mov pc, lr | ||
994 | |||
995 | /* | 966 | /* |
996 | * Clean and flush the cache to maintain consistency. | 967 | * Clean and flush the cache to maintain consistency. |
997 | * | 968 | * |
diff --git a/arch/arm/common/Makefile b/arch/arm/common/Makefile index 215816f1775..e8a4e58f1b8 100644 --- a/arch/arm/common/Makefile +++ b/arch/arm/common/Makefile | |||
@@ -11,7 +11,5 @@ obj-$(CONFIG_DMABOUNCE) += dmabounce.o | |||
11 | obj-$(CONFIG_SHARP_LOCOMO) += locomo.o | 11 | obj-$(CONFIG_SHARP_LOCOMO) += locomo.o |
12 | obj-$(CONFIG_SHARP_PARAM) += sharpsl_param.o | 12 | obj-$(CONFIG_SHARP_PARAM) += sharpsl_param.o |
13 | obj-$(CONFIG_SHARP_SCOOP) += scoop.o | 13 | obj-$(CONFIG_SHARP_SCOOP) += scoop.o |
14 | obj-$(CONFIG_ARCH_IXP2000) += uengine.o | ||
15 | obj-$(CONFIG_ARCH_IXP23XX) += uengine.o | ||
16 | obj-$(CONFIG_PCI_HOST_ITE8152) += it8152.o | 14 | obj-$(CONFIG_PCI_HOST_ITE8152) += it8152.o |
17 | obj-$(CONFIG_ARM_TIMER_SP804) += timer-sp.o | 15 | obj-$(CONFIG_ARM_TIMER_SP804) += timer-sp.o |
diff --git a/arch/arm/common/it8152.c b/arch/arm/common/it8152.c index dcb13494ca0..c4110d1b1f2 100644 --- a/arch/arm/common/it8152.c +++ b/arch/arm/common/it8152.c | |||
@@ -222,7 +222,7 @@ static int it8152_pci_write_config(struct pci_bus *bus, | |||
222 | return PCIBIOS_SUCCESSFUL; | 222 | return PCIBIOS_SUCCESSFUL; |
223 | } | 223 | } |
224 | 224 | ||
225 | static struct pci_ops it8152_ops = { | 225 | struct pci_ops it8152_ops = { |
226 | .read = it8152_pci_read_config, | 226 | .read = it8152_pci_read_config, |
227 | .write = it8152_pci_write_config, | 227 | .write = it8152_pci_write_config, |
228 | }; | 228 | }; |
@@ -346,9 +346,4 @@ void pcibios_set_master(struct pci_dev *dev) | |||
346 | } | 346 | } |
347 | 347 | ||
348 | 348 | ||
349 | struct pci_bus * __init it8152_pci_scan_bus(int nr, struct pci_sys_data *sys) | ||
350 | { | ||
351 | return pci_scan_root_bus(NULL, nr, &it8152_ops, sys, &sys->resources); | ||
352 | } | ||
353 | |||
354 | EXPORT_SYMBOL(dma_set_coherent_mask); | 349 | EXPORT_SYMBOL(dma_set_coherent_mask); |
diff --git a/arch/arm/common/uengine.c b/arch/arm/common/uengine.c deleted file mode 100644 index bef408f3d76..00000000000 --- a/arch/arm/common/uengine.c +++ /dev/null | |||
@@ -1,507 +0,0 @@ | |||
1 | /* | ||
2 | * Generic library functions for the microengines found on the Intel | ||
3 | * IXP2000 series of network processors. | ||
4 | * | ||
5 | * Copyright (C) 2004, 2005 Lennert Buytenhek <buytenh@wantstofly.org> | ||
6 | * Dedicated to Marija Kulikova. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU Lesser General Public License as | ||
10 | * published by the Free Software Foundation; either version 2.1 of the | ||
11 | * License, or (at your option) any later version. | ||
12 | */ | ||
13 | |||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/slab.h> | ||
17 | #include <linux/module.h> | ||
18 | #include <linux/string.h> | ||
19 | #include <linux/io.h> | ||
20 | #include <mach/hardware.h> | ||
21 | #include <asm/hardware/uengine.h> | ||
22 | |||
23 | #if defined(CONFIG_ARCH_IXP2000) | ||
24 | #define IXP_UENGINE_CSR_VIRT_BASE IXP2000_UENGINE_CSR_VIRT_BASE | ||
25 | #define IXP_PRODUCT_ID IXP2000_PRODUCT_ID | ||
26 | #define IXP_MISC_CONTROL IXP2000_MISC_CONTROL | ||
27 | #define IXP_RESET1 IXP2000_RESET1 | ||
28 | #else | ||
29 | #if defined(CONFIG_ARCH_IXP23XX) | ||
30 | #define IXP_UENGINE_CSR_VIRT_BASE IXP23XX_UENGINE_CSR_VIRT_BASE | ||
31 | #define IXP_PRODUCT_ID IXP23XX_PRODUCT_ID | ||
32 | #define IXP_MISC_CONTROL IXP23XX_MISC_CONTROL | ||
33 | #define IXP_RESET1 IXP23XX_RESET1 | ||
34 | #else | ||
35 | #error unknown platform | ||
36 | #endif | ||
37 | #endif | ||
38 | |||
39 | #define USTORE_ADDRESS 0x000 | ||
40 | #define USTORE_DATA_LOWER 0x004 | ||
41 | #define USTORE_DATA_UPPER 0x008 | ||
42 | #define CTX_ENABLES 0x018 | ||
43 | #define CC_ENABLE 0x01c | ||
44 | #define CSR_CTX_POINTER 0x020 | ||
45 | #define INDIRECT_CTX_STS 0x040 | ||
46 | #define ACTIVE_CTX_STS 0x044 | ||
47 | #define INDIRECT_CTX_SIG_EVENTS 0x048 | ||
48 | #define INDIRECT_CTX_WAKEUP_EVENTS 0x050 | ||
49 | #define NN_PUT 0x080 | ||
50 | #define NN_GET 0x084 | ||
51 | #define TIMESTAMP_LOW 0x0c0 | ||
52 | #define TIMESTAMP_HIGH 0x0c4 | ||
53 | #define T_INDEX_BYTE_INDEX 0x0f4 | ||
54 | #define LOCAL_CSR_STATUS 0x180 | ||
55 | |||
56 | u32 ixp2000_uengine_mask; | ||
57 | |||
58 | static void *ixp2000_uengine_csr_area(int uengine) | ||
59 | { | ||
60 | return ((void *)IXP_UENGINE_CSR_VIRT_BASE) + (uengine << 10); | ||
61 | } | ||
62 | |||
63 | /* | ||
64 | * LOCAL_CSR_STATUS=1 after a read or write to a microengine's CSR | ||
65 | * space means that the microengine we tried to access was also trying | ||
66 | * to access its own CSR space on the same clock cycle as we did. When | ||
67 | * this happens, we lose the arbitration process by default, and the | ||
68 | * read or write we tried to do was not actually performed, so we try | ||
69 | * again until it succeeds. | ||
70 | */ | ||
71 | u32 ixp2000_uengine_csr_read(int uengine, int offset) | ||
72 | { | ||
73 | void *uebase; | ||
74 | u32 *local_csr_status; | ||
75 | u32 *reg; | ||
76 | u32 value; | ||
77 | |||
78 | uebase = ixp2000_uengine_csr_area(uengine); | ||
79 | |||
80 | local_csr_status = (u32 *)(uebase + LOCAL_CSR_STATUS); | ||
81 | reg = (u32 *)(uebase + offset); | ||
82 | do { | ||
83 | value = ixp2000_reg_read(reg); | ||
84 | } while (ixp2000_reg_read(local_csr_status) & 1); | ||
85 | |||
86 | return value; | ||
87 | } | ||
88 | EXPORT_SYMBOL(ixp2000_uengine_csr_read); | ||
89 | |||
90 | void ixp2000_uengine_csr_write(int uengine, int offset, u32 value) | ||
91 | { | ||
92 | void *uebase; | ||
93 | u32 *local_csr_status; | ||
94 | u32 *reg; | ||
95 | |||
96 | uebase = ixp2000_uengine_csr_area(uengine); | ||
97 | |||
98 | local_csr_status = (u32 *)(uebase + LOCAL_CSR_STATUS); | ||
99 | reg = (u32 *)(uebase + offset); | ||
100 | do { | ||
101 | ixp2000_reg_write(reg, value); | ||
102 | } while (ixp2000_reg_read(local_csr_status) & 1); | ||
103 | } | ||
104 | EXPORT_SYMBOL(ixp2000_uengine_csr_write); | ||
105 | |||
106 | void ixp2000_uengine_reset(u32 uengine_mask) | ||
107 | { | ||
108 | u32 value; | ||
109 | |||
110 | value = ixp2000_reg_read(IXP_RESET1) & ~ixp2000_uengine_mask; | ||
111 | |||
112 | uengine_mask &= ixp2000_uengine_mask; | ||
113 | ixp2000_reg_wrb(IXP_RESET1, value | uengine_mask); | ||
114 | ixp2000_reg_wrb(IXP_RESET1, value); | ||
115 | } | ||
116 | EXPORT_SYMBOL(ixp2000_uengine_reset); | ||
117 | |||
118 | void ixp2000_uengine_set_mode(int uengine, u32 mode) | ||
119 | { | ||
120 | /* | ||
121 | * CTL_STR_PAR_EN: unconditionally enable parity checking on | ||
122 | * control store. | ||
123 | */ | ||
124 | mode |= 0x10000000; | ||
125 | ixp2000_uengine_csr_write(uengine, CTX_ENABLES, mode); | ||
126 | |||
127 | /* | ||
128 | * Enable updating of condition codes. | ||
129 | */ | ||
130 | ixp2000_uengine_csr_write(uengine, CC_ENABLE, 0x00002000); | ||
131 | |||
132 | /* | ||
133 | * Initialise other per-microengine registers. | ||
134 | */ | ||
135 | ixp2000_uengine_csr_write(uengine, NN_PUT, 0x00); | ||
136 | ixp2000_uengine_csr_write(uengine, NN_GET, 0x00); | ||
137 | ixp2000_uengine_csr_write(uengine, T_INDEX_BYTE_INDEX, 0); | ||
138 | } | ||
139 | EXPORT_SYMBOL(ixp2000_uengine_set_mode); | ||
140 | |||
141 | static int make_even_parity(u32 x) | ||
142 | { | ||
143 | return hweight32(x) & 1; | ||
144 | } | ||
145 | |||
146 | static void ustore_write(int uengine, u64 insn) | ||
147 | { | ||
148 | /* | ||
149 | * Generate even parity for top and bottom 20 bits. | ||
150 | */ | ||
151 | insn |= (u64)make_even_parity((insn >> 20) & 0x000fffff) << 41; | ||
152 | insn |= (u64)make_even_parity(insn & 0x000fffff) << 40; | ||
153 | |||
154 | /* | ||
155 | * Write to microstore. The second write auto-increments | ||
156 | * the USTORE_ADDRESS index register. | ||
157 | */ | ||
158 | ixp2000_uengine_csr_write(uengine, USTORE_DATA_LOWER, (u32)insn); | ||
159 | ixp2000_uengine_csr_write(uengine, USTORE_DATA_UPPER, (u32)(insn >> 32)); | ||
160 | } | ||
161 | |||
162 | void ixp2000_uengine_load_microcode(int uengine, u8 *ucode, int insns) | ||
163 | { | ||
164 | int i; | ||
165 | |||
166 | /* | ||
167 | * Start writing to microstore at address 0. | ||
168 | */ | ||
169 | ixp2000_uengine_csr_write(uengine, USTORE_ADDRESS, 0x80000000); | ||
170 | for (i = 0; i < insns; i++) { | ||
171 | u64 insn; | ||
172 | |||
173 | insn = (((u64)ucode[0]) << 32) | | ||
174 | (((u64)ucode[1]) << 24) | | ||
175 | (((u64)ucode[2]) << 16) | | ||
176 | (((u64)ucode[3]) << 8) | | ||
177 | ((u64)ucode[4]); | ||
178 | ucode += 5; | ||
179 | |||
180 | ustore_write(uengine, insn); | ||
181 | } | ||
182 | |||
183 | /* | ||
184 | * Pad with a few NOPs at the end (to avoid the microengine | ||
185 | * aborting as it prefetches beyond the last instruction), unless | ||
186 | * we run off the end of the instruction store first, at which | ||
187 | * point the address register will wrap back to zero. | ||
188 | */ | ||
189 | for (i = 0; i < 4; i++) { | ||
190 | u32 addr; | ||
191 | |||
192 | addr = ixp2000_uengine_csr_read(uengine, USTORE_ADDRESS); | ||
193 | if (addr == 0x80000000) | ||
194 | break; | ||
195 | ustore_write(uengine, 0xf0000c0300ULL); | ||
196 | } | ||
197 | |||
198 | /* | ||
199 | * End programming. | ||
200 | */ | ||
201 | ixp2000_uengine_csr_write(uengine, USTORE_ADDRESS, 0x00000000); | ||
202 | } | ||
203 | EXPORT_SYMBOL(ixp2000_uengine_load_microcode); | ||
204 | |||
205 | void ixp2000_uengine_init_context(int uengine, int context, int pc) | ||
206 | { | ||
207 | /* | ||
208 | * Select the right context for indirect access. | ||
209 | */ | ||
210 | ixp2000_uengine_csr_write(uengine, CSR_CTX_POINTER, context); | ||
211 | |||
212 | /* | ||
213 | * Initialise signal masks to immediately go to Ready state. | ||
214 | */ | ||
215 | ixp2000_uengine_csr_write(uengine, INDIRECT_CTX_SIG_EVENTS, 1); | ||
216 | ixp2000_uengine_csr_write(uengine, INDIRECT_CTX_WAKEUP_EVENTS, 1); | ||
217 | |||
218 | /* | ||
219 | * Set program counter. | ||
220 | */ | ||
221 | ixp2000_uengine_csr_write(uengine, INDIRECT_CTX_STS, pc); | ||
222 | } | ||
223 | EXPORT_SYMBOL(ixp2000_uengine_init_context); | ||
224 | |||
225 | void ixp2000_uengine_start_contexts(int uengine, u8 ctx_mask) | ||
226 | { | ||
227 | u32 mask; | ||
228 | |||
229 | /* | ||
230 | * Enable the specified context to go to Executing state. | ||
231 | */ | ||
232 | mask = ixp2000_uengine_csr_read(uengine, CTX_ENABLES); | ||
233 | mask |= ctx_mask << 8; | ||
234 | ixp2000_uengine_csr_write(uengine, CTX_ENABLES, mask); | ||
235 | } | ||
236 | EXPORT_SYMBOL(ixp2000_uengine_start_contexts); | ||
237 | |||
238 | void ixp2000_uengine_stop_contexts(int uengine, u8 ctx_mask) | ||
239 | { | ||
240 | u32 mask; | ||
241 | |||
242 | /* | ||
243 | * Disable the Ready->Executing transition. Note that this | ||
244 | * does not stop the context until it voluntarily yields. | ||
245 | */ | ||
246 | mask = ixp2000_uengine_csr_read(uengine, CTX_ENABLES); | ||
247 | mask &= ~(ctx_mask << 8); | ||
248 | ixp2000_uengine_csr_write(uengine, CTX_ENABLES, mask); | ||
249 | } | ||
250 | EXPORT_SYMBOL(ixp2000_uengine_stop_contexts); | ||
251 | |||
252 | static int check_ixp_type(struct ixp2000_uengine_code *c) | ||
253 | { | ||
254 | u32 product_id; | ||
255 | u32 rev; | ||
256 | |||
257 | product_id = ixp2000_reg_read(IXP_PRODUCT_ID); | ||
258 | if (((product_id >> 16) & 0x1f) != 0) | ||
259 | return 0; | ||
260 | |||
261 | switch ((product_id >> 8) & 0xff) { | ||
262 | #ifdef CONFIG_ARCH_IXP2000 | ||
263 | case 0: /* IXP2800 */ | ||
264 | if (!(c->cpu_model_bitmask & 4)) | ||
265 | return 0; | ||
266 | break; | ||
267 | |||
268 | case 1: /* IXP2850 */ | ||
269 | if (!(c->cpu_model_bitmask & 8)) | ||
270 | return 0; | ||
271 | break; | ||
272 | |||
273 | case 2: /* IXP2400 */ | ||
274 | if (!(c->cpu_model_bitmask & 2)) | ||
275 | return 0; | ||
276 | break; | ||
277 | #endif | ||
278 | |||
279 | #ifdef CONFIG_ARCH_IXP23XX | ||
280 | case 4: /* IXP23xx */ | ||
281 | if (!(c->cpu_model_bitmask & 0x3f0)) | ||
282 | return 0; | ||
283 | break; | ||
284 | #endif | ||
285 | |||
286 | default: | ||
287 | return 0; | ||
288 | } | ||
289 | |||
290 | rev = product_id & 0xff; | ||
291 | if (rev < c->cpu_min_revision || rev > c->cpu_max_revision) | ||
292 | return 0; | ||
293 | |||
294 | return 1; | ||
295 | } | ||
296 | |||
297 | static void generate_ucode(u8 *ucode, u32 *gpr_a, u32 *gpr_b) | ||
298 | { | ||
299 | int offset; | ||
300 | int i; | ||
301 | |||
302 | offset = 0; | ||
303 | |||
304 | for (i = 0; i < 128; i++) { | ||
305 | u8 b3; | ||
306 | u8 b2; | ||
307 | u8 b1; | ||
308 | u8 b0; | ||
309 | |||
310 | b3 = (gpr_a[i] >> 24) & 0xff; | ||
311 | b2 = (gpr_a[i] >> 16) & 0xff; | ||
312 | b1 = (gpr_a[i] >> 8) & 0xff; | ||
313 | b0 = gpr_a[i] & 0xff; | ||
314 | |||
315 | /* immed[@ai, (b1 << 8) | b0] */ | ||
316 | /* 11110000 0000VVVV VVVV11VV VVVVVV00 1IIIIIII */ | ||
317 | ucode[offset++] = 0xf0; | ||
318 | ucode[offset++] = (b1 >> 4); | ||
319 | ucode[offset++] = (b1 << 4) | 0x0c | (b0 >> 6); | ||
320 | ucode[offset++] = (b0 << 2); | ||
321 | ucode[offset++] = 0x80 | i; | ||
322 | |||
323 | /* immed_w1[@ai, (b3 << 8) | b2] */ | ||
324 | /* 11110100 0100VVVV VVVV11VV VVVVVV00 1IIIIIII */ | ||
325 | ucode[offset++] = 0xf4; | ||
326 | ucode[offset++] = 0x40 | (b3 >> 4); | ||
327 | ucode[offset++] = (b3 << 4) | 0x0c | (b2 >> 6); | ||
328 | ucode[offset++] = (b2 << 2); | ||
329 | ucode[offset++] = 0x80 | i; | ||
330 | } | ||
331 | |||
332 | for (i = 0; i < 128; i++) { | ||
333 | u8 b3; | ||
334 | u8 b2; | ||
335 | u8 b1; | ||
336 | u8 b0; | ||
337 | |||
338 | b3 = (gpr_b[i] >> 24) & 0xff; | ||
339 | b2 = (gpr_b[i] >> 16) & 0xff; | ||
340 | b1 = (gpr_b[i] >> 8) & 0xff; | ||
341 | b0 = gpr_b[i] & 0xff; | ||
342 | |||
343 | /* immed[@bi, (b1 << 8) | b0] */ | ||
344 | /* 11110000 0000VVVV VVVV001I IIIIII11 VVVVVVVV */ | ||
345 | ucode[offset++] = 0xf0; | ||
346 | ucode[offset++] = (b1 >> 4); | ||
347 | ucode[offset++] = (b1 << 4) | 0x02 | (i >> 6); | ||
348 | ucode[offset++] = (i << 2) | 0x03; | ||
349 | ucode[offset++] = b0; | ||
350 | |||
351 | /* immed_w1[@bi, (b3 << 8) | b2] */ | ||
352 | /* 11110100 0100VVVV VVVV001I IIIIII11 VVVVVVVV */ | ||
353 | ucode[offset++] = 0xf4; | ||
354 | ucode[offset++] = 0x40 | (b3 >> 4); | ||
355 | ucode[offset++] = (b3 << 4) | 0x02 | (i >> 6); | ||
356 | ucode[offset++] = (i << 2) | 0x03; | ||
357 | ucode[offset++] = b2; | ||
358 | } | ||
359 | |||
360 | /* ctx_arb[kill] */ | ||
361 | ucode[offset++] = 0xe0; | ||
362 | ucode[offset++] = 0x00; | ||
363 | ucode[offset++] = 0x01; | ||
364 | ucode[offset++] = 0x00; | ||
365 | ucode[offset++] = 0x00; | ||
366 | } | ||
367 | |||
368 | static int set_initial_registers(int uengine, struct ixp2000_uengine_code *c) | ||
369 | { | ||
370 | int per_ctx_regs; | ||
371 | u32 *gpr_a; | ||
372 | u32 *gpr_b; | ||
373 | u8 *ucode; | ||
374 | int i; | ||
375 | |||
376 | gpr_a = kzalloc(128 * sizeof(u32), GFP_KERNEL); | ||
377 | gpr_b = kzalloc(128 * sizeof(u32), GFP_KERNEL); | ||
378 | ucode = kmalloc(513 * 5, GFP_KERNEL); | ||
379 | if (gpr_a == NULL || gpr_b == NULL || ucode == NULL) { | ||
380 | kfree(ucode); | ||
381 | kfree(gpr_b); | ||
382 | kfree(gpr_a); | ||
383 | return 1; | ||
384 | } | ||
385 | |||
386 | per_ctx_regs = 16; | ||
387 | if (c->uengine_parameters & IXP2000_UENGINE_4_CONTEXTS) | ||
388 | per_ctx_regs = 32; | ||
389 | |||
390 | for (i = 0; i < 256; i++) { | ||
391 | struct ixp2000_reg_value *r = c->initial_reg_values + i; | ||
392 | u32 *bank; | ||
393 | int inc; | ||
394 | int j; | ||
395 | |||
396 | if (r->reg == -1) | ||
397 | break; | ||
398 | |||
399 | bank = (r->reg & 0x400) ? gpr_b : gpr_a; | ||
400 | inc = (r->reg & 0x80) ? 128 : per_ctx_regs; | ||
401 | |||
402 | j = r->reg & 0x7f; | ||
403 | while (j < 128) { | ||
404 | bank[j] = r->value; | ||
405 | j += inc; | ||
406 | } | ||
407 | } | ||
408 | |||
409 | generate_ucode(ucode, gpr_a, gpr_b); | ||
410 | ixp2000_uengine_load_microcode(uengine, ucode, 513); | ||
411 | ixp2000_uengine_init_context(uengine, 0, 0); | ||
412 | ixp2000_uengine_start_contexts(uengine, 0x01); | ||
413 | for (i = 0; i < 100; i++) { | ||
414 | u32 status; | ||
415 | |||
416 | status = ixp2000_uengine_csr_read(uengine, ACTIVE_CTX_STS); | ||
417 | if (!(status & 0x80000000)) | ||
418 | break; | ||
419 | } | ||
420 | ixp2000_uengine_stop_contexts(uengine, 0x01); | ||
421 | |||
422 | kfree(ucode); | ||
423 | kfree(gpr_b); | ||
424 | kfree(gpr_a); | ||
425 | |||
426 | return !!(i == 100); | ||
427 | } | ||
428 | |||
429 | int ixp2000_uengine_load(int uengine, struct ixp2000_uengine_code *c) | ||
430 | { | ||
431 | int ctx; | ||
432 | |||
433 | if (!check_ixp_type(c)) | ||
434 | return 1; | ||
435 | |||
436 | if (!(ixp2000_uengine_mask & (1 << uengine))) | ||
437 | return 1; | ||
438 | |||
439 | ixp2000_uengine_reset(1 << uengine); | ||
440 | ixp2000_uengine_set_mode(uengine, c->uengine_parameters); | ||
441 | if (set_initial_registers(uengine, c)) | ||
442 | return 1; | ||
443 | ixp2000_uengine_load_microcode(uengine, c->insns, c->num_insns); | ||
444 | |||
445 | for (ctx = 0; ctx < 8; ctx++) | ||
446 | ixp2000_uengine_init_context(uengine, ctx, 0); | ||
447 | |||
448 | return 0; | ||
449 | } | ||
450 | EXPORT_SYMBOL(ixp2000_uengine_load); | ||
451 | |||
452 | |||
453 | static int __init ixp2000_uengine_init(void) | ||
454 | { | ||
455 | int uengine; | ||
456 | u32 value; | ||
457 | |||
458 | /* | ||
459 | * Determine number of microengines present. | ||
460 | */ | ||
461 | switch ((ixp2000_reg_read(IXP_PRODUCT_ID) >> 8) & 0x1fff) { | ||
462 | #ifdef CONFIG_ARCH_IXP2000 | ||
463 | case 0: /* IXP2800 */ | ||
464 | case 1: /* IXP2850 */ | ||
465 | ixp2000_uengine_mask = 0x00ff00ff; | ||
466 | break; | ||
467 | |||
468 | case 2: /* IXP2400 */ | ||
469 | ixp2000_uengine_mask = 0x000f000f; | ||
470 | break; | ||
471 | #endif | ||
472 | |||
473 | #ifdef CONFIG_ARCH_IXP23XX | ||
474 | case 4: /* IXP23xx */ | ||
475 | ixp2000_uengine_mask = (*IXP23XX_EXP_CFG_FUSE >> 8) & 0xf; | ||
476 | break; | ||
477 | #endif | ||
478 | |||
479 | default: | ||
480 | printk(KERN_INFO "Detected unknown IXP2000 model (%.8x)\n", | ||
481 | (unsigned int)ixp2000_reg_read(IXP_PRODUCT_ID)); | ||
482 | ixp2000_uengine_mask = 0x00000000; | ||
483 | break; | ||
484 | } | ||
485 | |||
486 | /* | ||
487 | * Reset microengines. | ||
488 | */ | ||
489 | ixp2000_uengine_reset(ixp2000_uengine_mask); | ||
490 | |||
491 | /* | ||
492 | * Synchronise timestamp counters across all microengines. | ||
493 | */ | ||
494 | value = ixp2000_reg_read(IXP_MISC_CONTROL); | ||
495 | ixp2000_reg_wrb(IXP_MISC_CONTROL, value & ~0x80); | ||
496 | for (uengine = 0; uengine < 32; uengine++) { | ||
497 | if (ixp2000_uengine_mask & (1 << uengine)) { | ||
498 | ixp2000_uengine_csr_write(uengine, TIMESTAMP_LOW, 0); | ||
499 | ixp2000_uengine_csr_write(uengine, TIMESTAMP_HIGH, 0); | ||
500 | } | ||
501 | } | ||
502 | ixp2000_reg_wrb(IXP_MISC_CONTROL, value | 0x80); | ||
503 | |||
504 | return 0; | ||
505 | } | ||
506 | |||
507 | subsys_initcall(ixp2000_uengine_init); | ||
diff --git a/arch/arm/common/via82c505.c b/arch/arm/common/via82c505.c index 1171a5010ae..6cb362e56d2 100644 --- a/arch/arm/common/via82c505.c +++ b/arch/arm/common/via82c505.c | |||
@@ -51,7 +51,7 @@ via82c505_write_config(struct pci_bus *bus, unsigned int devfn, int where, | |||
51 | return PCIBIOS_SUCCESSFUL; | 51 | return PCIBIOS_SUCCESSFUL; |
52 | } | 52 | } |
53 | 53 | ||
54 | static struct pci_ops via82c505_ops = { | 54 | struct pci_ops via82c505_ops = { |
55 | .read = via82c505_read_config, | 55 | .read = via82c505_read_config, |
56 | .write = via82c505_write_config, | 56 | .write = via82c505_write_config, |
57 | }; | 57 | }; |
@@ -81,12 +81,3 @@ int __init via82c505_setup(int nr, struct pci_sys_data *sys) | |||
81 | { | 81 | { |
82 | return (nr == 0); | 82 | return (nr == 0); |
83 | } | 83 | } |
84 | |||
85 | struct pci_bus * __init via82c505_scan_bus(int nr, struct pci_sys_data *sysdata) | ||
86 | { | ||
87 | if (nr == 0) | ||
88 | return pci_scan_root_bus(NULL, 0, &via82c505_ops, sysdata, | ||
89 | &sysdata->resources); | ||
90 | |||
91 | return NULL; | ||
92 | } | ||
diff --git a/arch/arm/common/vic.c b/arch/arm/common/vic.c index 7e288f96ced..e0d538803cc 100644 --- a/arch/arm/common/vic.c +++ b/arch/arm/common/vic.c | |||
@@ -39,6 +39,7 @@ | |||
39 | * struct vic_device - VIC PM device | 39 | * struct vic_device - VIC PM device |
40 | * @irq: The IRQ number for the base of the VIC. | 40 | * @irq: The IRQ number for the base of the VIC. |
41 | * @base: The register base for the VIC. | 41 | * @base: The register base for the VIC. |
42 | * @valid_sources: A bitmask of valid interrupts | ||
42 | * @resume_sources: A bitmask of interrupts for resume. | 43 | * @resume_sources: A bitmask of interrupts for resume. |
43 | * @resume_irqs: The IRQs enabled for resume. | 44 | * @resume_irqs: The IRQs enabled for resume. |
44 | * @int_select: Save for VIC_INT_SELECT. | 45 | * @int_select: Save for VIC_INT_SELECT. |
@@ -50,6 +51,7 @@ | |||
50 | struct vic_device { | 51 | struct vic_device { |
51 | void __iomem *base; | 52 | void __iomem *base; |
52 | int irq; | 53 | int irq; |
54 | u32 valid_sources; | ||
53 | u32 resume_sources; | 55 | u32 resume_sources; |
54 | u32 resume_irqs; | 56 | u32 resume_irqs; |
55 | u32 int_select; | 57 | u32 int_select; |
@@ -164,10 +166,32 @@ static int __init vic_pm_init(void) | |||
164 | late_initcall(vic_pm_init); | 166 | late_initcall(vic_pm_init); |
165 | #endif /* CONFIG_PM */ | 167 | #endif /* CONFIG_PM */ |
166 | 168 | ||
169 | static struct irq_chip vic_chip; | ||
170 | |||
171 | static int vic_irqdomain_map(struct irq_domain *d, unsigned int irq, | ||
172 | irq_hw_number_t hwirq) | ||
173 | { | ||
174 | struct vic_device *v = d->host_data; | ||
175 | |||
176 | /* Skip invalid IRQs, only register handlers for the real ones */ | ||
177 | if (!(v->valid_sources & (1 << hwirq))) | ||
178 | return -ENOTSUPP; | ||
179 | irq_set_chip_and_handler(irq, &vic_chip, handle_level_irq); | ||
180 | irq_set_chip_data(irq, v->base); | ||
181 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | ||
182 | return 0; | ||
183 | } | ||
184 | |||
185 | static struct irq_domain_ops vic_irqdomain_ops = { | ||
186 | .map = vic_irqdomain_map, | ||
187 | .xlate = irq_domain_xlate_onetwocell, | ||
188 | }; | ||
189 | |||
167 | /** | 190 | /** |
168 | * vic_register() - Register a VIC. | 191 | * vic_register() - Register a VIC. |
169 | * @base: The base address of the VIC. | 192 | * @base: The base address of the VIC. |
170 | * @irq: The base IRQ for the VIC. | 193 | * @irq: The base IRQ for the VIC. |
194 | * @valid_sources: bitmask of valid interrupts | ||
171 | * @resume_sources: bitmask of interrupts allowed for resume sources. | 195 | * @resume_sources: bitmask of interrupts allowed for resume sources. |
172 | * @node: The device tree node associated with the VIC. | 196 | * @node: The device tree node associated with the VIC. |
173 | * | 197 | * |
@@ -178,7 +202,8 @@ late_initcall(vic_pm_init); | |||
178 | * This also configures the IRQ domain for the VIC. | 202 | * This also configures the IRQ domain for the VIC. |
179 | */ | 203 | */ |
180 | static void __init vic_register(void __iomem *base, unsigned int irq, | 204 | static void __init vic_register(void __iomem *base, unsigned int irq, |
181 | u32 resume_sources, struct device_node *node) | 205 | u32 valid_sources, u32 resume_sources, |
206 | struct device_node *node) | ||
182 | { | 207 | { |
183 | struct vic_device *v; | 208 | struct vic_device *v; |
184 | 209 | ||
@@ -189,11 +214,12 @@ static void __init vic_register(void __iomem *base, unsigned int irq, | |||
189 | 214 | ||
190 | v = &vic_devices[vic_id]; | 215 | v = &vic_devices[vic_id]; |
191 | v->base = base; | 216 | v->base = base; |
217 | v->valid_sources = valid_sources; | ||
192 | v->resume_sources = resume_sources; | 218 | v->resume_sources = resume_sources; |
193 | v->irq = irq; | 219 | v->irq = irq; |
194 | vic_id++; | 220 | vic_id++; |
195 | v->domain = irq_domain_add_legacy(node, 32, irq, 0, | 221 | v->domain = irq_domain_add_legacy(node, fls(valid_sources), irq, 0, |
196 | &irq_domain_simple_ops, v); | 222 | &vic_irqdomain_ops, v); |
197 | } | 223 | } |
198 | 224 | ||
199 | static void vic_ack_irq(struct irq_data *d) | 225 | static void vic_ack_irq(struct irq_data *d) |
@@ -287,23 +313,6 @@ static void __init vic_clear_interrupts(void __iomem *base) | |||
287 | } | 313 | } |
288 | } | 314 | } |
289 | 315 | ||
290 | static void __init vic_set_irq_sources(void __iomem *base, | ||
291 | unsigned int irq_start, u32 vic_sources) | ||
292 | { | ||
293 | unsigned int i; | ||
294 | |||
295 | for (i = 0; i < 32; i++) { | ||
296 | if (vic_sources & (1 << i)) { | ||
297 | unsigned int irq = irq_start + i; | ||
298 | |||
299 | irq_set_chip_and_handler(irq, &vic_chip, | ||
300 | handle_level_irq); | ||
301 | irq_set_chip_data(irq, base); | ||
302 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | ||
303 | } | ||
304 | } | ||
305 | } | ||
306 | |||
307 | /* | 316 | /* |
308 | * The PL190 cell from ARM has been modified by ST to handle 64 interrupts. | 317 | * The PL190 cell from ARM has been modified by ST to handle 64 interrupts. |
309 | * The original cell has 32 interrupts, while the modified one has 64, | 318 | * The original cell has 32 interrupts, while the modified one has 64, |
@@ -338,8 +347,7 @@ static void __init vic_init_st(void __iomem *base, unsigned int irq_start, | |||
338 | writel(32, base + VIC_PL190_DEF_VECT_ADDR); | 347 | writel(32, base + VIC_PL190_DEF_VECT_ADDR); |
339 | } | 348 | } |
340 | 349 | ||
341 | vic_set_irq_sources(base, irq_start, vic_sources); | 350 | vic_register(base, irq_start, vic_sources, 0, node); |
342 | vic_register(base, irq_start, 0, node); | ||
343 | } | 351 | } |
344 | 352 | ||
345 | void __init __vic_init(void __iomem *base, unsigned int irq_start, | 353 | void __init __vic_init(void __iomem *base, unsigned int irq_start, |
@@ -379,9 +387,7 @@ void __init __vic_init(void __iomem *base, unsigned int irq_start, | |||
379 | 387 | ||
380 | vic_init2(base); | 388 | vic_init2(base); |
381 | 389 | ||
382 | vic_set_irq_sources(base, irq_start, vic_sources); | 390 | vic_register(base, irq_start, vic_sources, resume_sources, node); |
383 | |||
384 | vic_register(base, irq_start, resume_sources, node); | ||
385 | } | 391 | } |
386 | 392 | ||
387 | /** | 393 | /** |
diff --git a/arch/arm/configs/at91_dt_defconfig b/arch/arm/configs/at91_dt_defconfig new file mode 100644 index 00000000000..67bc571ed0c --- /dev/null +++ b/arch/arm/configs/at91_dt_defconfig | |||
@@ -0,0 +1,196 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | # CONFIG_LOCALVERSION_AUTO is not set | ||
3 | # CONFIG_SWAP is not set | ||
4 | CONFIG_SYSVIPC=y | ||
5 | CONFIG_LOG_BUF_SHIFT=14 | ||
6 | CONFIG_BLK_DEV_INITRD=y | ||
7 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
8 | CONFIG_KALLSYMS_ALL=y | ||
9 | CONFIG_EMBEDDED=y | ||
10 | CONFIG_SLAB=y | ||
11 | CONFIG_MODULES=y | ||
12 | CONFIG_MODULE_UNLOAD=y | ||
13 | # CONFIG_LBDAF is not set | ||
14 | # CONFIG_BLK_DEV_BSG is not set | ||
15 | # CONFIG_IOSCHED_DEADLINE is not set | ||
16 | # CONFIG_IOSCHED_CFQ is not set | ||
17 | CONFIG_ARCH_AT91=y | ||
18 | CONFIG_SOC_AT91SAM9260=y | ||
19 | CONFIG_SOC_AT91SAM9263=y | ||
20 | CONFIG_SOC_AT91SAM9G45=y | ||
21 | CONFIG_SOC_AT91SAM9X5=y | ||
22 | CONFIG_MACH_AT91SAM_DT=y | ||
23 | CONFIG_AT91_PROGRAMMABLE_CLOCKS=y | ||
24 | CONFIG_AT91_TIMER_HZ=128 | ||
25 | CONFIG_AEABI=y | ||
26 | # CONFIG_OABI_COMPAT is not set | ||
27 | CONFIG_LEDS=y | ||
28 | CONFIG_LEDS_CPU=y | ||
29 | CONFIG_UACCESS_WITH_MEMCPY=y | ||
30 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
31 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
32 | CONFIG_ARM_APPENDED_DTB=y | ||
33 | CONFIG_ARM_ATAG_DTB_COMPAT=y | ||
34 | CONFIG_CMDLINE="mem=128M console=ttyS0,115200 initrd=0x21100000,25165824 root=/dev/ram0 rw" | ||
35 | CONFIG_KEXEC=y | ||
36 | CONFIG_AUTO_ZRELADDR=y | ||
37 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | ||
38 | CONFIG_NET=y | ||
39 | CONFIG_PACKET=y | ||
40 | CONFIG_UNIX=y | ||
41 | CONFIG_INET=y | ||
42 | CONFIG_IP_MULTICAST=y | ||
43 | CONFIG_IP_PNP=y | ||
44 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
45 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
46 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
47 | # CONFIG_INET_DIAG is not set | ||
48 | CONFIG_IPV6=y | ||
49 | # CONFIG_INET6_XFRM_MODE_TRANSPORT is not set | ||
50 | # CONFIG_INET6_XFRM_MODE_TUNNEL is not set | ||
51 | # CONFIG_INET6_XFRM_MODE_BEET is not set | ||
52 | CONFIG_IPV6_SIT_6RD=y | ||
53 | # CONFIG_WIRELESS is not set | ||
54 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
55 | CONFIG_DEVTMPFS=y | ||
56 | CONFIG_DEVTMPFS_MOUNT=y | ||
57 | # CONFIG_STANDALONE is not set | ||
58 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | ||
59 | CONFIG_MTD=y | ||
60 | CONFIG_MTD_CMDLINE_PARTS=y | ||
61 | CONFIG_MTD_CHAR=y | ||
62 | CONFIG_MTD_BLOCK=y | ||
63 | CONFIG_MTD_NAND=y | ||
64 | CONFIG_MTD_NAND_ATMEL=y | ||
65 | CONFIG_MTD_UBI=y | ||
66 | CONFIG_MTD_UBI_GLUEBI=y | ||
67 | CONFIG_PROC_DEVICETREE=y | ||
68 | CONFIG_BLK_DEV_LOOP=y | ||
69 | CONFIG_BLK_DEV_RAM=y | ||
70 | CONFIG_BLK_DEV_RAM_COUNT=4 | ||
71 | CONFIG_BLK_DEV_RAM_SIZE=8192 | ||
72 | CONFIG_ATMEL_PWM=y | ||
73 | CONFIG_ATMEL_TCLIB=y | ||
74 | CONFIG_EEPROM_93CX6=m | ||
75 | CONFIG_SCSI=y | ||
76 | CONFIG_BLK_DEV_SD=y | ||
77 | CONFIG_SCSI_MULTI_LUN=y | ||
78 | # CONFIG_SCSI_LOWLEVEL is not set | ||
79 | CONFIG_NETDEVICES=y | ||
80 | CONFIG_MII=y | ||
81 | CONFIG_MACB=y | ||
82 | # CONFIG_NET_VENDOR_BROADCOM is not set | ||
83 | # CONFIG_NET_VENDOR_CHELSIO is not set | ||
84 | # CONFIG_NET_VENDOR_FARADAY is not set | ||
85 | # CONFIG_NET_VENDOR_INTEL is not set | ||
86 | # CONFIG_NET_VENDOR_MARVELL is not set | ||
87 | # CONFIG_NET_VENDOR_MICREL is not set | ||
88 | # CONFIG_NET_VENDOR_NATSEMI is not set | ||
89 | # CONFIG_NET_VENDOR_SEEQ is not set | ||
90 | # CONFIG_NET_VENDOR_SMSC is not set | ||
91 | # CONFIG_NET_VENDOR_STMICRO is not set | ||
92 | CONFIG_DAVICOM_PHY=y | ||
93 | CONFIG_MICREL_PHY=y | ||
94 | # CONFIG_WLAN is not set | ||
95 | CONFIG_INPUT_POLLDEV=y | ||
96 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
97 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=480 | ||
98 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=272 | ||
99 | CONFIG_INPUT_JOYDEV=y | ||
100 | CONFIG_INPUT_EVDEV=y | ||
101 | # CONFIG_KEYBOARD_ATKBD is not set | ||
102 | CONFIG_KEYBOARD_GPIO=y | ||
103 | # CONFIG_INPUT_MOUSE is not set | ||
104 | CONFIG_INPUT_TOUCHSCREEN=y | ||
105 | # CONFIG_SERIO is not set | ||
106 | CONFIG_LEGACY_PTY_COUNT=4 | ||
107 | CONFIG_SERIAL_ATMEL=y | ||
108 | CONFIG_SERIAL_ATMEL_CONSOLE=y | ||
109 | CONFIG_HW_RANDOM=y | ||
110 | CONFIG_I2C=y | ||
111 | CONFIG_I2C_GPIO=y | ||
112 | CONFIG_SPI=y | ||
113 | CONFIG_SPI_ATMEL=y | ||
114 | # CONFIG_HWMON is not set | ||
115 | CONFIG_WATCHDOG=y | ||
116 | CONFIG_AT91SAM9X_WATCHDOG=y | ||
117 | CONFIG_SSB=m | ||
118 | CONFIG_FB=y | ||
119 | CONFIG_FB_MODE_HELPERS=y | ||
120 | CONFIG_FB_ATMEL=y | ||
121 | CONFIG_BACKLIGHT_LCD_SUPPORT=y | ||
122 | # CONFIG_LCD_CLASS_DEVICE is not set | ||
123 | CONFIG_BACKLIGHT_CLASS_DEVICE=y | ||
124 | CONFIG_BACKLIGHT_ATMEL_LCDC=y | ||
125 | # CONFIG_BACKLIGHT_GENERIC is not set | ||
126 | CONFIG_FRAMEBUFFER_CONSOLE=y | ||
127 | CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y | ||
128 | CONFIG_FONTS=y | ||
129 | CONFIG_FONT_8x8=y | ||
130 | CONFIG_FONT_ACORN_8x8=y | ||
131 | CONFIG_FONT_MINI_4x6=y | ||
132 | CONFIG_LOGO=y | ||
133 | # CONFIG_HID_SUPPORT is not set | ||
134 | CONFIG_USB=y | ||
135 | CONFIG_USB_ANNOUNCE_NEW_DEVICES=y | ||
136 | CONFIG_USB_DEVICEFS=y | ||
137 | # CONFIG_USB_DEVICE_CLASS is not set | ||
138 | CONFIG_USB_EHCI_HCD=y | ||
139 | CONFIG_USB_OHCI_HCD=y | ||
140 | CONFIG_USB_ACM=y | ||
141 | CONFIG_USB_STORAGE=y | ||
142 | CONFIG_USB_SERIAL=y | ||
143 | CONFIG_USB_SERIAL_GENERIC=y | ||
144 | CONFIG_USB_SERIAL_FTDI_SIO=y | ||
145 | CONFIG_USB_SERIAL_PL2303=y | ||
146 | CONFIG_USB_GADGET=y | ||
147 | CONFIG_USB_AT91=m | ||
148 | CONFIG_USB_ATMEL_USBA=m | ||
149 | CONFIG_USB_ETH=m | ||
150 | CONFIG_USB_GADGETFS=m | ||
151 | CONFIG_USB_CDC_COMPOSITE=m | ||
152 | CONFIG_USB_G_ACM_MS=m | ||
153 | CONFIG_USB_G_MULTI=m | ||
154 | CONFIG_USB_G_MULTI_CDC=y | ||
155 | CONFIG_MMC=y | ||
156 | CONFIG_MMC_ATMELMCI=y | ||
157 | CONFIG_NEW_LEDS=y | ||
158 | CONFIG_LEDS_CLASS=y | ||
159 | CONFIG_LEDS_GPIO=y | ||
160 | CONFIG_LEDS_TRIGGERS=y | ||
161 | CONFIG_LEDS_TRIGGER_TIMER=y | ||
162 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y | ||
163 | CONFIG_LEDS_TRIGGER_GPIO=y | ||
164 | CONFIG_RTC_CLASS=y | ||
165 | CONFIG_RTC_DRV_AT91RM9200=y | ||
166 | CONFIG_RTC_DRV_AT91SAM9=y | ||
167 | CONFIG_DMADEVICES=y | ||
168 | # CONFIG_IOMMU_SUPPORT is not set | ||
169 | CONFIG_EXT2_FS=y | ||
170 | CONFIG_FANOTIFY=y | ||
171 | CONFIG_VFAT_FS=y | ||
172 | CONFIG_TMPFS=y | ||
173 | CONFIG_NFS_FS=y | ||
174 | CONFIG_NFS_V3=y | ||
175 | CONFIG_ROOT_NFS=y | ||
176 | CONFIG_NLS_CODEPAGE_437=y | ||
177 | CONFIG_NLS_CODEPAGE_850=y | ||
178 | CONFIG_NLS_ISO8859_1=y | ||
179 | CONFIG_STRIP_ASM_SYMS=y | ||
180 | CONFIG_DEBUG_FS=y | ||
181 | # CONFIG_SCHED_DEBUG is not set | ||
182 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
183 | # CONFIG_FTRACE is not set | ||
184 | CONFIG_DEBUG_USER=y | ||
185 | CONFIG_CRYPTO=y | ||
186 | CONFIG_CRYPTO_ECB=y | ||
187 | CONFIG_CRYPTO_AES=y | ||
188 | CONFIG_CRYPTO_ARC4=y | ||
189 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | ||
190 | CONFIG_CRYPTO_USER_API_HASH=m | ||
191 | CONFIG_CRYPTO_USER_API_SKCIPHER=m | ||
192 | # CONFIG_CRYPTO_HW is not set | ||
193 | CONFIG_CRC_CCITT=m | ||
194 | CONFIG_CRC_ITU_T=m | ||
195 | CONFIG_CRC7=m | ||
196 | CONFIG_AVERAGE=y | ||
diff --git a/arch/arm/configs/at91rm9200_defconfig b/arch/arm/configs/at91rm9200_defconfig index bbe4e1a1f5d..d54e2acd3ab 100644 --- a/arch/arm/configs/at91rm9200_defconfig +++ b/arch/arm/configs/at91rm9200_defconfig | |||
@@ -14,6 +14,7 @@ CONFIG_MODULE_SRCVERSION_ALL=y | |||
14 | # CONFIG_BLK_DEV_BSG is not set | 14 | # CONFIG_BLK_DEV_BSG is not set |
15 | # CONFIG_IOSCHED_CFQ is not set | 15 | # CONFIG_IOSCHED_CFQ is not set |
16 | CONFIG_ARCH_AT91=y | 16 | CONFIG_ARCH_AT91=y |
17 | CONFIG_ARCH_AT91RM9200=y | ||
17 | CONFIG_MACH_ONEARM=y | 18 | CONFIG_MACH_ONEARM=y |
18 | CONFIG_ARCH_AT91RM9200DK=y | 19 | CONFIG_ARCH_AT91RM9200DK=y |
19 | CONFIG_MACH_AT91RM9200EK=y | 20 | CONFIG_MACH_AT91RM9200EK=y |
diff --git a/arch/arm/configs/ixp2000_defconfig b/arch/arm/configs/ixp2000_defconfig deleted file mode 100644 index 8405aded97a..00000000000 --- a/arch/arm/configs/ixp2000_defconfig +++ /dev/null | |||
@@ -1,99 +0,0 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | CONFIG_SYSVIPC=y | ||
3 | CONFIG_BSD_PROCESS_ACCT=y | ||
4 | CONFIG_LOG_BUF_SHIFT=14 | ||
5 | CONFIG_BLK_DEV_INITRD=y | ||
6 | CONFIG_EXPERT=y | ||
7 | # CONFIG_HOTPLUG is not set | ||
8 | CONFIG_SLAB=y | ||
9 | CONFIG_MODULES=y | ||
10 | CONFIG_MODULE_UNLOAD=y | ||
11 | CONFIG_ARCH_IXP2000=y | ||
12 | CONFIG_ARCH_ENP2611=y | ||
13 | CONFIG_ARCH_IXDP2400=y | ||
14 | CONFIG_ARCH_IXDP2800=y | ||
15 | CONFIG_ARCH_IXDP2401=y | ||
16 | CONFIG_ARCH_IXDP2801=y | ||
17 | # CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO is not set | ||
18 | # CONFIG_ARM_THUMB is not set | ||
19 | CONFIG_CPU_BIG_ENDIAN=y | ||
20 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
21 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
22 | CONFIG_CMDLINE="console=ttyS0,57600 root=/dev/nfs ip=bootp mem=64M@0x0" | ||
23 | CONFIG_FPE_NWFPE=y | ||
24 | CONFIG_FPE_NWFPE_XP=y | ||
25 | CONFIG_NET=y | ||
26 | CONFIG_PACKET=y | ||
27 | CONFIG_UNIX=y | ||
28 | CONFIG_INET=y | ||
29 | CONFIG_IP_PNP=y | ||
30 | CONFIG_IP_PNP_DHCP=y | ||
31 | CONFIG_IP_PNP_BOOTP=y | ||
32 | CONFIG_SYN_COOKIES=y | ||
33 | CONFIG_IPV6=y | ||
34 | # CONFIG_INET6_XFRM_MODE_TRANSPORT is not set | ||
35 | # CONFIG_INET6_XFRM_MODE_TUNNEL is not set | ||
36 | # CONFIG_INET6_XFRM_MODE_BEET is not set | ||
37 | # CONFIG_IPV6_SIT is not set | ||
38 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | ||
39 | CONFIG_MTD=y | ||
40 | CONFIG_MTD_PARTITIONS=y | ||
41 | CONFIG_MTD_REDBOOT_PARTS=y | ||
42 | CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y | ||
43 | CONFIG_MTD_REDBOOT_PARTS_READONLY=y | ||
44 | CONFIG_MTD_CHAR=y | ||
45 | CONFIG_MTD_BLOCK=y | ||
46 | CONFIG_MTD_CFI=y | ||
47 | CONFIG_MTD_CFI_INTELEXT=y | ||
48 | CONFIG_MTD_COMPLEX_MAPPINGS=y | ||
49 | CONFIG_MTD_IXP2000=y | ||
50 | CONFIG_BLK_DEV_LOOP=y | ||
51 | CONFIG_BLK_DEV_NBD=y | ||
52 | CONFIG_BLK_DEV_RAM=y | ||
53 | CONFIG_BLK_DEV_RAM_SIZE=8192 | ||
54 | CONFIG_EEPROM_LEGACY=y | ||
55 | CONFIG_NETDEVICES=y | ||
56 | CONFIG_DUMMY=y | ||
57 | CONFIG_NET_ETHERNET=y | ||
58 | CONFIG_NET_PCI=y | ||
59 | CONFIG_CS89x0=y | ||
60 | CONFIG_E100=y | ||
61 | CONFIG_ENP2611_MSF_NET=y | ||
62 | CONFIG_WAN=y | ||
63 | CONFIG_HDLC=y | ||
64 | CONFIG_HDLC_RAW=y | ||
65 | CONFIG_HDLC_CISCO=y | ||
66 | CONFIG_HDLC_FR=y | ||
67 | CONFIG_HDLC_PPP=y | ||
68 | CONFIG_DLCI=y | ||
69 | # CONFIG_INPUT_KEYBOARD is not set | ||
70 | # CONFIG_INPUT_MOUSE is not set | ||
71 | # CONFIG_SERIO is not set | ||
72 | # CONFIG_VT is not set | ||
73 | CONFIG_SERIAL_8250=y | ||
74 | CONFIG_SERIAL_8250_CONSOLE=y | ||
75 | CONFIG_SERIAL_8250_NR_UARTS=3 | ||
76 | # CONFIG_HW_RANDOM is not set | ||
77 | CONFIG_I2C=y | ||
78 | CONFIG_I2C_CHARDEV=y | ||
79 | CONFIG_I2C_IXP2000=y | ||
80 | CONFIG_WATCHDOG=y | ||
81 | CONFIG_IXP2000_WATCHDOG=y | ||
82 | CONFIG_EXT2_FS=y | ||
83 | CONFIG_EXT2_FS_XATTR=y | ||
84 | CONFIG_EXT2_FS_POSIX_ACL=y | ||
85 | CONFIG_EXT3_FS=y | ||
86 | CONFIG_EXT3_FS_POSIX_ACL=y | ||
87 | CONFIG_INOTIFY=y | ||
88 | CONFIG_TMPFS=y | ||
89 | CONFIG_JFFS2_FS=y | ||
90 | CONFIG_NFS_FS=y | ||
91 | CONFIG_NFS_V3=y | ||
92 | CONFIG_ROOT_NFS=y | ||
93 | CONFIG_PARTITION_ADVANCED=y | ||
94 | CONFIG_MAGIC_SYSRQ=y | ||
95 | CONFIG_DEBUG_KERNEL=y | ||
96 | CONFIG_DEBUG_MUTEXES=y | ||
97 | CONFIG_DEBUG_USER=y | ||
98 | CONFIG_DEBUG_ERRORS=y | ||
99 | CONFIG_DEBUG_LL=y | ||
diff --git a/arch/arm/configs/ixp23xx_defconfig b/arch/arm/configs/ixp23xx_defconfig deleted file mode 100644 index 688717612e9..00000000000 --- a/arch/arm/configs/ixp23xx_defconfig +++ /dev/null | |||
@@ -1,105 +0,0 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | CONFIG_SYSVIPC=y | ||
3 | CONFIG_BSD_PROCESS_ACCT=y | ||
4 | CONFIG_LOG_BUF_SHIFT=14 | ||
5 | CONFIG_BLK_DEV_INITRD=y | ||
6 | CONFIG_EXPERT=y | ||
7 | CONFIG_SLAB=y | ||
8 | CONFIG_MODULES=y | ||
9 | CONFIG_MODULE_UNLOAD=y | ||
10 | CONFIG_ARCH_IXP23XX=y | ||
11 | CONFIG_MACH_ESPRESSO=y | ||
12 | CONFIG_MACH_IXDP2351=y | ||
13 | CONFIG_MACH_ROADRUNNER=y | ||
14 | # CONFIG_ARM_THUMB is not set | ||
15 | CONFIG_CPU_BIG_ENDIAN=y | ||
16 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
17 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
18 | CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/nfs ip=bootp" | ||
19 | CONFIG_FPE_NWFPE=y | ||
20 | CONFIG_FPE_NWFPE_XP=y | ||
21 | CONFIG_NET=y | ||
22 | CONFIG_PACKET=y | ||
23 | CONFIG_UNIX=y | ||
24 | CONFIG_INET=y | ||
25 | CONFIG_IP_PNP=y | ||
26 | CONFIG_IP_PNP_DHCP=y | ||
27 | CONFIG_IP_PNP_BOOTP=y | ||
28 | CONFIG_SYN_COOKIES=y | ||
29 | CONFIG_IPV6=y | ||
30 | # CONFIG_INET6_XFRM_MODE_TRANSPORT is not set | ||
31 | # CONFIG_INET6_XFRM_MODE_TUNNEL is not set | ||
32 | # CONFIG_INET6_XFRM_MODE_BEET is not set | ||
33 | # CONFIG_IPV6_SIT is not set | ||
34 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | ||
35 | # CONFIG_FW_LOADER is not set | ||
36 | CONFIG_MTD=y | ||
37 | CONFIG_MTD_PARTITIONS=y | ||
38 | CONFIG_MTD_REDBOOT_PARTS=y | ||
39 | CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y | ||
40 | CONFIG_MTD_REDBOOT_PARTS_READONLY=y | ||
41 | CONFIG_MTD_CHAR=y | ||
42 | CONFIG_MTD_BLOCK=y | ||
43 | CONFIG_MTD_CFI=y | ||
44 | CONFIG_MTD_CFI_INTELEXT=y | ||
45 | CONFIG_MTD_COMPLEX_MAPPINGS=y | ||
46 | CONFIG_MTD_PHYSMAP=y | ||
47 | CONFIG_BLK_DEV_LOOP=y | ||
48 | CONFIG_BLK_DEV_NBD=y | ||
49 | CONFIG_BLK_DEV_RAM=y | ||
50 | CONFIG_BLK_DEV_RAM_SIZE=8192 | ||
51 | CONFIG_EEPROM_LEGACY=y | ||
52 | CONFIG_IDE=y | ||
53 | CONFIG_BLK_DEV_SIIMAGE=y | ||
54 | CONFIG_SCSI=y | ||
55 | CONFIG_BLK_DEV_SD=y | ||
56 | CONFIG_NETDEVICES=y | ||
57 | CONFIG_DUMMY=y | ||
58 | CONFIG_NET_ETHERNET=y | ||
59 | CONFIG_NET_PCI=y | ||
60 | CONFIG_E100=y | ||
61 | CONFIG_E1000=y | ||
62 | CONFIG_WAN=y | ||
63 | CONFIG_HDLC=y | ||
64 | CONFIG_HDLC_RAW=y | ||
65 | CONFIG_HDLC_CISCO=y | ||
66 | CONFIG_HDLC_FR=y | ||
67 | CONFIG_HDLC_PPP=y | ||
68 | CONFIG_DLCI=y | ||
69 | # CONFIG_INPUT_KEYBOARD is not set | ||
70 | # CONFIG_INPUT_MOUSE is not set | ||
71 | # CONFIG_SERIO is not set | ||
72 | # CONFIG_VT is not set | ||
73 | CONFIG_SERIAL_8250=y | ||
74 | CONFIG_SERIAL_8250_CONSOLE=y | ||
75 | # CONFIG_HW_RANDOM is not set | ||
76 | CONFIG_I2C=y | ||
77 | CONFIG_I2C_CHARDEV=y | ||
78 | CONFIG_WATCHDOG=y | ||
79 | # CONFIG_USB_HID is not set | ||
80 | CONFIG_USB=y | ||
81 | CONFIG_USB_MON=y | ||
82 | CONFIG_USB_EHCI_HCD=y | ||
83 | CONFIG_USB_OHCI_HCD=y | ||
84 | CONFIG_USB_UHCI_HCD=y | ||
85 | CONFIG_USB_STORAGE=y | ||
86 | CONFIG_EXT2_FS=y | ||
87 | CONFIG_EXT2_FS_XATTR=y | ||
88 | CONFIG_EXT2_FS_POSIX_ACL=y | ||
89 | CONFIG_EXT3_FS=y | ||
90 | CONFIG_EXT3_FS_POSIX_ACL=y | ||
91 | CONFIG_INOTIFY=y | ||
92 | CONFIG_MSDOS_FS=y | ||
93 | CONFIG_TMPFS=y | ||
94 | CONFIG_JFFS2_FS=y | ||
95 | CONFIG_NFS_FS=y | ||
96 | CONFIG_NFS_V3=y | ||
97 | CONFIG_ROOT_NFS=y | ||
98 | CONFIG_PARTITION_ADVANCED=y | ||
99 | CONFIG_NLS_CODEPAGE_437=y | ||
100 | CONFIG_MAGIC_SYSRQ=y | ||
101 | CONFIG_DEBUG_KERNEL=y | ||
102 | CONFIG_DEBUG_MUTEXES=y | ||
103 | CONFIG_DEBUG_USER=y | ||
104 | CONFIG_DEBUG_ERRORS=y | ||
105 | CONFIG_DEBUG_LL=y | ||
diff --git a/arch/arm/configs/rpc_defconfig b/arch/arm/configs/rpc_defconfig index af278f7a224..00515ef9782 100644 --- a/arch/arm/configs/rpc_defconfig +++ b/arch/arm/configs/rpc_defconfig | |||
@@ -8,8 +8,6 @@ CONFIG_MODULES=y | |||
8 | CONFIG_MODULE_UNLOAD=y | 8 | CONFIG_MODULE_UNLOAD=y |
9 | # CONFIG_BLK_DEV_BSG is not set | 9 | # CONFIG_BLK_DEV_BSG is not set |
10 | CONFIG_ARCH_RPC=y | 10 | CONFIG_ARCH_RPC=y |
11 | CONFIG_CPU_ARM610=y | ||
12 | CONFIG_CPU_ARM710=y | ||
13 | CONFIG_CPU_SA110=y | 11 | CONFIG_CPU_SA110=y |
14 | CONFIG_ZBOOT_ROM_TEXT=0x0 | 12 | CONFIG_ZBOOT_ROM_TEXT=0x0 |
15 | CONFIG_ZBOOT_ROM_BSS=0x0 | 13 | CONFIG_ZBOOT_ROM_BSS=0x0 |
diff --git a/arch/arm/include/asm/arch_timer.h b/arch/arm/include/asm/arch_timer.h new file mode 100644 index 00000000000..ed2e95d46e2 --- /dev/null +++ b/arch/arm/include/asm/arch_timer.h | |||
@@ -0,0 +1,19 @@ | |||
1 | #ifndef __ASMARM_ARCH_TIMER_H | ||
2 | #define __ASMARM_ARCH_TIMER_H | ||
3 | |||
4 | #ifdef CONFIG_ARM_ARCH_TIMER | ||
5 | int arch_timer_of_register(void); | ||
6 | int arch_timer_sched_clock_init(void); | ||
7 | #else | ||
8 | static inline int arch_timer_of_register(void) | ||
9 | { | ||
10 | return -ENXIO; | ||
11 | } | ||
12 | |||
13 | static inline int arch_timer_sched_clock_init(void) | ||
14 | { | ||
15 | return -ENXIO; | ||
16 | } | ||
17 | #endif | ||
18 | |||
19 | #endif | ||
diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h index d5d8d5c7268..004c1bc95d2 100644 --- a/arch/arm/include/asm/cacheflush.h +++ b/arch/arm/include/asm/cacheflush.h | |||
@@ -101,7 +101,7 @@ struct cpu_cache_fns { | |||
101 | void (*flush_user_range)(unsigned long, unsigned long, unsigned int); | 101 | void (*flush_user_range)(unsigned long, unsigned long, unsigned int); |
102 | 102 | ||
103 | void (*coherent_kern_range)(unsigned long, unsigned long); | 103 | void (*coherent_kern_range)(unsigned long, unsigned long); |
104 | void (*coherent_user_range)(unsigned long, unsigned long); | 104 | int (*coherent_user_range)(unsigned long, unsigned long); |
105 | void (*flush_kern_dcache_area)(void *, size_t); | 105 | void (*flush_kern_dcache_area)(void *, size_t); |
106 | 106 | ||
107 | void (*dma_map_area)(const void *, size_t, int); | 107 | void (*dma_map_area)(const void *, size_t, int); |
@@ -142,7 +142,7 @@ extern void __cpuc_flush_kern_all(void); | |||
142 | extern void __cpuc_flush_user_all(void); | 142 | extern void __cpuc_flush_user_all(void); |
143 | extern void __cpuc_flush_user_range(unsigned long, unsigned long, unsigned int); | 143 | extern void __cpuc_flush_user_range(unsigned long, unsigned long, unsigned int); |
144 | extern void __cpuc_coherent_kern_range(unsigned long, unsigned long); | 144 | extern void __cpuc_coherent_kern_range(unsigned long, unsigned long); |
145 | extern void __cpuc_coherent_user_range(unsigned long, unsigned long); | 145 | extern int __cpuc_coherent_user_range(unsigned long, unsigned long); |
146 | extern void __cpuc_flush_dcache_area(void *, size_t); | 146 | extern void __cpuc_flush_dcache_area(void *, size_t); |
147 | 147 | ||
148 | /* | 148 | /* |
@@ -249,7 +249,7 @@ extern void flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr | |||
249 | * Harvard caches are synchronised for the user space address range. | 249 | * Harvard caches are synchronised for the user space address range. |
250 | * This is used for the ARM private sys_cacheflush system call. | 250 | * This is used for the ARM private sys_cacheflush system call. |
251 | */ | 251 | */ |
252 | #define flush_cache_user_range(vma,start,end) \ | 252 | #define flush_cache_user_range(start,end) \ |
253 | __cpuc_coherent_user_range((start) & PAGE_MASK, PAGE_ALIGN(end)) | 253 | __cpuc_coherent_user_range((start) & PAGE_MASK, PAGE_ALIGN(end)) |
254 | 254 | ||
255 | /* | 255 | /* |
diff --git a/arch/arm/include/asm/cmpxchg.h b/arch/arm/include/asm/cmpxchg.h index d41d7cbf0ad..7eb18c1d8d6 100644 --- a/arch/arm/include/asm/cmpxchg.h +++ b/arch/arm/include/asm/cmpxchg.h | |||
@@ -229,66 +229,19 @@ static inline unsigned long __cmpxchg_local(volatile void *ptr, | |||
229 | (unsigned long)(n), \ | 229 | (unsigned long)(n), \ |
230 | sizeof(*(ptr)))) | 230 | sizeof(*(ptr)))) |
231 | 231 | ||
232 | #ifndef CONFIG_CPU_V6 /* min ARCH >= ARMv6K */ | 232 | #define cmpxchg64(ptr, o, n) \ |
233 | 233 | ((__typeof__(*(ptr)))atomic64_cmpxchg(container_of((ptr), \ | |
234 | /* | 234 | atomic64_t, \ |
235 | * Note : ARMv7-M (currently unsupported by Linux) does not support | 235 | counter), \ |
236 | * ldrexd/strexd. If ARMv7-M is ever supported by the Linux kernel, it should | 236 | (unsigned long)(o), \ |
237 | * not be allowed to use __cmpxchg64. | 237 | (unsigned long)(n))) |
238 | */ | 238 | |
239 | static inline unsigned long long __cmpxchg64(volatile void *ptr, | 239 | #define cmpxchg64_local(ptr, o, n) \ |
240 | unsigned long long old, | 240 | ((__typeof__(*(ptr)))local64_cmpxchg(container_of((ptr), \ |
241 | unsigned long long new) | 241 | local64_t, \ |
242 | { | 242 | a), \ |
243 | register unsigned long long oldval asm("r0"); | 243 | (unsigned long)(o), \ |
244 | register unsigned long long __old asm("r2") = old; | 244 | (unsigned long)(n))) |
245 | register unsigned long long __new asm("r4") = new; | ||
246 | unsigned long res; | ||
247 | |||
248 | do { | ||
249 | asm volatile( | ||
250 | " @ __cmpxchg8\n" | ||
251 | " ldrexd %1, %H1, [%2]\n" | ||
252 | " mov %0, #0\n" | ||
253 | " teq %1, %3\n" | ||
254 | " teqeq %H1, %H3\n" | ||
255 | " strexdeq %0, %4, %H4, [%2]\n" | ||
256 | : "=&r" (res), "=&r" (oldval) | ||
257 | : "r" (ptr), "Ir" (__old), "r" (__new) | ||
258 | : "memory", "cc"); | ||
259 | } while (res); | ||
260 | |||
261 | return oldval; | ||
262 | } | ||
263 | |||
264 | static inline unsigned long long __cmpxchg64_mb(volatile void *ptr, | ||
265 | unsigned long long old, | ||
266 | unsigned long long new) | ||
267 | { | ||
268 | unsigned long long ret; | ||
269 | |||
270 | smp_mb(); | ||
271 | ret = __cmpxchg64(ptr, old, new); | ||
272 | smp_mb(); | ||
273 | |||
274 | return ret; | ||
275 | } | ||
276 | |||
277 | #define cmpxchg64(ptr,o,n) \ | ||
278 | ((__typeof__(*(ptr)))__cmpxchg64_mb((ptr), \ | ||
279 | (unsigned long long)(o), \ | ||
280 | (unsigned long long)(n))) | ||
281 | |||
282 | #define cmpxchg64_local(ptr,o,n) \ | ||
283 | ((__typeof__(*(ptr)))__cmpxchg64((ptr), \ | ||
284 | (unsigned long long)(o), \ | ||
285 | (unsigned long long)(n))) | ||
286 | |||
287 | #else /* min ARCH = ARMv6 */ | ||
288 | |||
289 | #define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) | ||
290 | |||
291 | #endif | ||
292 | 245 | ||
293 | #endif /* __LINUX_ARM_ARCH__ >= 6 */ | 246 | #endif /* __LINUX_ARM_ARCH__ >= 6 */ |
294 | 247 | ||
diff --git a/arch/arm/include/asm/cpu.h b/arch/arm/include/asm/cpu.h index 793968173be..d797223b39d 100644 --- a/arch/arm/include/asm/cpu.h +++ b/arch/arm/include/asm/cpu.h | |||
@@ -16,7 +16,6 @@ | |||
16 | struct cpuinfo_arm { | 16 | struct cpuinfo_arm { |
17 | struct cpu cpu; | 17 | struct cpu cpu; |
18 | #ifdef CONFIG_SMP | 18 | #ifdef CONFIG_SMP |
19 | struct task_struct *idle; | ||
20 | unsigned int loops_per_jiffy; | 19 | unsigned int loops_per_jiffy; |
21 | #endif | 20 | #endif |
22 | }; | 21 | }; |
diff --git a/arch/arm/include/asm/glue-df.h b/arch/arm/include/asm/glue-df.h index 354d571e8bc..8cacbcda76d 100644 --- a/arch/arm/include/asm/glue-df.h +++ b/arch/arm/include/asm/glue-df.h | |||
@@ -31,14 +31,6 @@ | |||
31 | #undef CPU_DABORT_HANDLER | 31 | #undef CPU_DABORT_HANDLER |
32 | #undef MULTI_DABORT | 32 | #undef MULTI_DABORT |
33 | 33 | ||
34 | #if defined(CONFIG_CPU_ARM610) | ||
35 | # ifdef CPU_DABORT_HANDLER | ||
36 | # define MULTI_DABORT 1 | ||
37 | # else | ||
38 | # define CPU_DABORT_HANDLER cpu_arm6_data_abort | ||
39 | # endif | ||
40 | #endif | ||
41 | |||
42 | #if defined(CONFIG_CPU_ARM710) | 34 | #if defined(CONFIG_CPU_ARM710) |
43 | # ifdef CPU_DABORT_HANDLER | 35 | # ifdef CPU_DABORT_HANDLER |
44 | # define MULTI_DABORT 1 | 36 | # define MULTI_DABORT 1 |
diff --git a/arch/arm/include/asm/glue-proc.h b/arch/arm/include/asm/glue-proc.h index e2be7f14266..ac1dd54724b 100644 --- a/arch/arm/include/asm/glue-proc.h +++ b/arch/arm/include/asm/glue-proc.h | |||
@@ -23,15 +23,6 @@ | |||
23 | * CPU_NAME - the prefix for CPU related functions | 23 | * CPU_NAME - the prefix for CPU related functions |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #ifdef CONFIG_CPU_ARM610 | ||
27 | # ifdef CPU_NAME | ||
28 | # undef MULTI_CPU | ||
29 | # define MULTI_CPU | ||
30 | # else | ||
31 | # define CPU_NAME cpu_arm6 | ||
32 | # endif | ||
33 | #endif | ||
34 | |||
35 | #ifdef CONFIG_CPU_ARM7TDMI | 26 | #ifdef CONFIG_CPU_ARM7TDMI |
36 | # ifdef CPU_NAME | 27 | # ifdef CPU_NAME |
37 | # undef MULTI_CPU | 28 | # undef MULTI_CPU |
@@ -41,15 +32,6 @@ | |||
41 | # endif | 32 | # endif |
42 | #endif | 33 | #endif |
43 | 34 | ||
44 | #ifdef CONFIG_CPU_ARM710 | ||
45 | # ifdef CPU_NAME | ||
46 | # undef MULTI_CPU | ||
47 | # define MULTI_CPU | ||
48 | # else | ||
49 | # define CPU_NAME cpu_arm7 | ||
50 | # endif | ||
51 | #endif | ||
52 | |||
53 | #ifdef CONFIG_CPU_ARM720T | 35 | #ifdef CONFIG_CPU_ARM720T |
54 | # ifdef CPU_NAME | 36 | # ifdef CPU_NAME |
55 | # undef MULTI_CPU | 37 | # undef MULTI_CPU |
diff --git a/arch/arm/include/asm/hardware/cs89712.h b/arch/arm/include/asm/hardware/cs89712.h deleted file mode 100644 index f75626933e9..00000000000 --- a/arch/arm/include/asm/hardware/cs89712.h +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/hardware/cs89712.h | ||
3 | * | ||
4 | * This file contains the hardware definitions of the CS89712 | ||
5 | * additional internal registers. | ||
6 | * | ||
7 | * Copyright (C) 2001 Thomas Gleixner autronix automation <gleixner@autronix.de> | ||
8 | * | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | * | ||
15 | * This program is distributed in the hope that it will be useful, | ||
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | * GNU General Public License for more details. | ||
19 | * | ||
20 | * You should have received a copy of the GNU General Public License | ||
21 | * along with this program; if not, write to the Free Software | ||
22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
23 | */ | ||
24 | #ifndef __ASM_HARDWARE_CS89712_H | ||
25 | #define __ASM_HARDWARE_CS89712_H | ||
26 | |||
27 | /* | ||
28 | * CS89712 additional registers | ||
29 | */ | ||
30 | |||
31 | #define PCDR 0x0002 /* Port C Data register ---------------------------- */ | ||
32 | #define PCDDR 0x0042 /* Port C Data Direction register ------------------ */ | ||
33 | #define SDCONF 0x2300 /* SDRAM Configuration register ---------------------*/ | ||
34 | #define SDRFPR 0x2340 /* SDRAM Refresh period register --------------------*/ | ||
35 | |||
36 | #define SDCONF_ACTIVE (1 << 10) | ||
37 | #define SDCONF_CLKCTL (1 << 9) | ||
38 | #define SDCONF_WIDTH_4 (0 << 7) | ||
39 | #define SDCONF_WIDTH_8 (1 << 7) | ||
40 | #define SDCONF_WIDTH_16 (2 << 7) | ||
41 | #define SDCONF_WIDTH_32 (3 << 7) | ||
42 | #define SDCONF_SIZE_16 (0 << 5) | ||
43 | #define SDCONF_SIZE_64 (1 << 5) | ||
44 | #define SDCONF_SIZE_128 (2 << 5) | ||
45 | #define SDCONF_SIZE_256 (3 << 5) | ||
46 | #define SDCONF_CASLAT_2 (2) | ||
47 | #define SDCONF_CASLAT_3 (3) | ||
48 | |||
49 | #endif /* __ASM_HARDWARE_CS89712_H */ | ||
diff --git a/arch/arm/include/asm/hardware/ep7211.h b/arch/arm/include/asm/hardware/ep7211.h deleted file mode 100644 index 654d5f625c4..00000000000 --- a/arch/arm/include/asm/hardware/ep7211.h +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/hardware/ep7211.h | ||
3 | * | ||
4 | * This file contains the hardware definitions of the EP7211 internal | ||
5 | * registers. | ||
6 | * | ||
7 | * Copyright (C) 2001 Blue Mug, Inc. All Rights Reserved. | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License as published by | ||
11 | * the Free Software Foundation; either version 2 of the License, or | ||
12 | * (at your option) any later version. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
22 | */ | ||
23 | #ifndef __ASM_HARDWARE_EP7211_H | ||
24 | #define __ASM_HARDWARE_EP7211_H | ||
25 | |||
26 | #include <asm/hardware/clps7111.h> | ||
27 | |||
28 | /* | ||
29 | * define EP7211_BASE to be the base address of the region | ||
30 | * you want to access. | ||
31 | */ | ||
32 | |||
33 | #define EP7211_PHYS_BASE (0x80000000) | ||
34 | |||
35 | /* | ||
36 | * XXX miket@bluemug.com: need to introduce EP7211 registers (those not | ||
37 | * present in 7212) here. | ||
38 | */ | ||
39 | |||
40 | #endif /* __ASM_HARDWARE_EP7211_H */ | ||
diff --git a/arch/arm/include/asm/hardware/ep7212.h b/arch/arm/include/asm/hardware/ep7212.h deleted file mode 100644 index 3b43bbeaf1d..00000000000 --- a/arch/arm/include/asm/hardware/ep7212.h +++ /dev/null | |||
@@ -1,83 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/hardware/ep7212.h | ||
3 | * | ||
4 | * This file contains the hardware definitions of the EP7212 internal | ||
5 | * registers. | ||
6 | * | ||
7 | * Copyright (C) 2000 Deep Blue Solutions Ltd. | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License as published by | ||
11 | * the Free Software Foundation; either version 2 of the License, or | ||
12 | * (at your option) any later version. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
22 | */ | ||
23 | #ifndef __ASM_HARDWARE_EP7212_H | ||
24 | #define __ASM_HARDWARE_EP7212_H | ||
25 | |||
26 | /* | ||
27 | * define EP7212_BASE to be the base address of the region | ||
28 | * you want to access. | ||
29 | */ | ||
30 | |||
31 | #define EP7212_PHYS_BASE (0x80000000) | ||
32 | |||
33 | #ifndef __ASSEMBLY__ | ||
34 | #define ep_readl(off) __raw_readl(EP7212_BASE + (off)) | ||
35 | #define ep_writel(val,off) __raw_writel(val, EP7212_BASE + (off)) | ||
36 | #endif | ||
37 | |||
38 | /* | ||
39 | * These registers are specific to the EP7212 only | ||
40 | */ | ||
41 | #define DAIR 0x2000 | ||
42 | #define DAIR0 0x2040 | ||
43 | #define DAIDR1 0x2080 | ||
44 | #define DAIDR2 0x20c0 | ||
45 | #define DAISR 0x2100 | ||
46 | #define SYSCON3 0x2200 | ||
47 | #define INTSR3 0x2240 | ||
48 | #define INTMR3 0x2280 | ||
49 | #define LEDFLSH 0x22c0 | ||
50 | |||
51 | #define DAIR_DAIEN (1 << 16) | ||
52 | #define DAIR_ECS (1 << 17) | ||
53 | #define DAIR_LCTM (1 << 19) | ||
54 | #define DAIR_LCRM (1 << 20) | ||
55 | #define DAIR_RCTM (1 << 21) | ||
56 | #define DAIR_RCRM (1 << 22) | ||
57 | #define DAIR_LBM (1 << 23) | ||
58 | |||
59 | #define DAIDR2_FIFOEN (1 << 15) | ||
60 | #define DAIDR2_FIFOLEFT (0x0d << 16) | ||
61 | #define DAIDR2_FIFORIGHT (0x11 << 16) | ||
62 | |||
63 | #define DAISR_RCTS (1 << 0) | ||
64 | #define DAISR_RCRS (1 << 1) | ||
65 | #define DAISR_LCTS (1 << 2) | ||
66 | #define DAISR_LCRS (1 << 3) | ||
67 | #define DAISR_RCTU (1 << 4) | ||
68 | #define DAISR_RCRO (1 << 5) | ||
69 | #define DAISR_LCTU (1 << 6) | ||
70 | #define DAISR_LCRO (1 << 7) | ||
71 | #define DAISR_RCNF (1 << 8) | ||
72 | #define DAISR_RCNE (1 << 9) | ||
73 | #define DAISR_LCNF (1 << 10) | ||
74 | #define DAISR_LCNE (1 << 11) | ||
75 | #define DAISR_FIFO (1 << 12) | ||
76 | |||
77 | #define SYSCON3_ADCCON (1 << 0) | ||
78 | #define SYSCON3_DAISEL (1 << 3) | ||
79 | #define SYSCON3_ADCCKNSEN (1 << 4) | ||
80 | #define SYSCON3_FASTWAKE (1 << 8) | ||
81 | #define SYSCON3_DAIEN (1 << 9) | ||
82 | |||
83 | #endif /* __ASM_HARDWARE_EP7212_H */ | ||
diff --git a/arch/arm/include/asm/hardware/it8152.h b/arch/arm/include/asm/hardware/it8152.h index 73f84fa4f36..d36a73d7c0e 100644 --- a/arch/arm/include/asm/hardware/it8152.h +++ b/arch/arm/include/asm/hardware/it8152.h | |||
@@ -110,6 +110,6 @@ extern void it8152_irq_demux(unsigned int irq, struct irq_desc *desc); | |||
110 | extern void it8152_init_irq(void); | 110 | extern void it8152_init_irq(void); |
111 | extern int it8152_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin); | 111 | extern int it8152_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin); |
112 | extern int it8152_pci_setup(int nr, struct pci_sys_data *sys); | 112 | extern int it8152_pci_setup(int nr, struct pci_sys_data *sys); |
113 | extern struct pci_bus *it8152_pci_scan_bus(int nr, struct pci_sys_data *sys); | 113 | extern struct pci_ops it8152_ops; |
114 | 114 | ||
115 | #endif /* __ASM_HARDWARE_IT8152_H */ | 115 | #endif /* __ASM_HARDWARE_IT8152_H */ |
diff --git a/arch/arm/include/asm/hardware/uengine.h b/arch/arm/include/asm/hardware/uengine.h deleted file mode 100644 index b442d65c659..00000000000 --- a/arch/arm/include/asm/hardware/uengine.h +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | /* | ||
2 | * Generic library functions for the microengines found on the Intel | ||
3 | * IXP2000 series of network processors. | ||
4 | * | ||
5 | * Copyright (C) 2004, 2005 Lennert Buytenhek <buytenh@wantstofly.org> | ||
6 | * Dedicated to Marija Kulikova. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU Lesser General Public License as | ||
10 | * published by the Free Software Foundation; either version 2.1 of the | ||
11 | * License, or (at your option) any later version. | ||
12 | */ | ||
13 | |||
14 | #ifndef __IXP2000_UENGINE_H | ||
15 | #define __IXP2000_UENGINE_H | ||
16 | |||
17 | extern u32 ixp2000_uengine_mask; | ||
18 | |||
19 | struct ixp2000_uengine_code | ||
20 | { | ||
21 | u32 cpu_model_bitmask; | ||
22 | u8 cpu_min_revision; | ||
23 | u8 cpu_max_revision; | ||
24 | |||
25 | u32 uengine_parameters; | ||
26 | |||
27 | struct ixp2000_reg_value { | ||
28 | int reg; | ||
29 | u32 value; | ||
30 | } *initial_reg_values; | ||
31 | |||
32 | int num_insns; | ||
33 | u8 *insns; | ||
34 | }; | ||
35 | |||
36 | u32 ixp2000_uengine_csr_read(int uengine, int offset); | ||
37 | void ixp2000_uengine_csr_write(int uengine, int offset, u32 value); | ||
38 | void ixp2000_uengine_reset(u32 uengine_mask); | ||
39 | void ixp2000_uengine_set_mode(int uengine, u32 mode); | ||
40 | void ixp2000_uengine_load_microcode(int uengine, u8 *ucode, int insns); | ||
41 | void ixp2000_uengine_init_context(int uengine, int context, int pc); | ||
42 | void ixp2000_uengine_start_contexts(int uengine, u8 ctx_mask); | ||
43 | void ixp2000_uengine_stop_contexts(int uengine, u8 ctx_mask); | ||
44 | int ixp2000_uengine_load(int uengine, struct ixp2000_uengine_code *c); | ||
45 | |||
46 | #define IXP2000_UENGINE_8_CONTEXTS 0x00000000 | ||
47 | #define IXP2000_UENGINE_4_CONTEXTS 0x80000000 | ||
48 | #define IXP2000_UENGINE_PRN_UPDATE_EVERY 0x40000000 | ||
49 | #define IXP2000_UENGINE_PRN_UPDATE_ON_ACCESS 0x00000000 | ||
50 | #define IXP2000_UENGINE_NN_FROM_SELF 0x00100000 | ||
51 | #define IXP2000_UENGINE_NN_FROM_PREVIOUS 0x00000000 | ||
52 | #define IXP2000_UENGINE_ASSERT_EMPTY_AT_3 0x000c0000 | ||
53 | #define IXP2000_UENGINE_ASSERT_EMPTY_AT_2 0x00080000 | ||
54 | #define IXP2000_UENGINE_ASSERT_EMPTY_AT_1 0x00040000 | ||
55 | #define IXP2000_UENGINE_ASSERT_EMPTY_AT_0 0x00000000 | ||
56 | #define IXP2000_UENGINE_LM_ADDR1_GLOBAL 0x00020000 | ||
57 | #define IXP2000_UENGINE_LM_ADDR1_PER_CONTEXT 0x00000000 | ||
58 | #define IXP2000_UENGINE_LM_ADDR0_GLOBAL 0x00010000 | ||
59 | #define IXP2000_UENGINE_LM_ADDR0_PER_CONTEXT 0x00000000 | ||
60 | |||
61 | |||
62 | #endif | ||
diff --git a/arch/arm/include/asm/mach/pci.h b/arch/arm/include/asm/mach/pci.h index d943b7d20f1..26c511fddf8 100644 --- a/arch/arm/include/asm/mach/pci.h +++ b/arch/arm/include/asm/mach/pci.h | |||
@@ -12,13 +12,14 @@ | |||
12 | #define __ASM_MACH_PCI_H | 12 | #define __ASM_MACH_PCI_H |
13 | 13 | ||
14 | struct pci_sys_data; | 14 | struct pci_sys_data; |
15 | struct pci_ops; | ||
15 | struct pci_bus; | 16 | struct pci_bus; |
16 | 17 | ||
17 | struct hw_pci { | 18 | struct hw_pci { |
18 | #ifdef CONFIG_PCI_DOMAINS | 19 | #ifdef CONFIG_PCI_DOMAINS |
19 | int domain; | 20 | int domain; |
20 | #endif | 21 | #endif |
21 | struct list_head buses; | 22 | struct pci_ops *ops; |
22 | int nr_controllers; | 23 | int nr_controllers; |
23 | int (*setup)(int nr, struct pci_sys_data *); | 24 | int (*setup)(int nr, struct pci_sys_data *); |
24 | struct pci_bus *(*scan)(int nr, struct pci_sys_data *); | 25 | struct pci_bus *(*scan)(int nr, struct pci_sys_data *); |
@@ -45,16 +46,10 @@ struct pci_sys_data { | |||
45 | u8 (*swizzle)(struct pci_dev *, u8 *); | 46 | u8 (*swizzle)(struct pci_dev *, u8 *); |
46 | /* IRQ mapping */ | 47 | /* IRQ mapping */ |
47 | int (*map_irq)(const struct pci_dev *, u8, u8); | 48 | int (*map_irq)(const struct pci_dev *, u8, u8); |
48 | struct hw_pci *hw; | ||
49 | void *private_data; /* platform controller private data */ | 49 | void *private_data; /* platform controller private data */ |
50 | }; | 50 | }; |
51 | 51 | ||
52 | /* | 52 | /* |
53 | * This is the standard PCI-PCI bridge swizzling algorithm. | ||
54 | */ | ||
55 | #define pci_std_swizzle pci_common_swizzle | ||
56 | |||
57 | /* | ||
58 | * Call this with your hw_pci struct to initialise the PCI system. | 53 | * Call this with your hw_pci struct to initialise the PCI system. |
59 | */ | 54 | */ |
60 | void pci_common_init(struct hw_pci *); | 55 | void pci_common_init(struct hw_pci *); |
@@ -62,22 +57,22 @@ void pci_common_init(struct hw_pci *); | |||
62 | /* | 57 | /* |
63 | * PCI controllers | 58 | * PCI controllers |
64 | */ | 59 | */ |
60 | extern struct pci_ops iop3xx_ops; | ||
65 | extern int iop3xx_pci_setup(int nr, struct pci_sys_data *); | 61 | extern int iop3xx_pci_setup(int nr, struct pci_sys_data *); |
66 | extern struct pci_bus *iop3xx_pci_scan_bus(int nr, struct pci_sys_data *); | ||
67 | extern void iop3xx_pci_preinit(void); | 62 | extern void iop3xx_pci_preinit(void); |
68 | extern void iop3xx_pci_preinit_cond(void); | 63 | extern void iop3xx_pci_preinit_cond(void); |
69 | 64 | ||
65 | extern struct pci_ops dc21285_ops; | ||
70 | extern int dc21285_setup(int nr, struct pci_sys_data *); | 66 | extern int dc21285_setup(int nr, struct pci_sys_data *); |
71 | extern struct pci_bus *dc21285_scan_bus(int nr, struct pci_sys_data *); | ||
72 | extern void dc21285_preinit(void); | 67 | extern void dc21285_preinit(void); |
73 | extern void dc21285_postinit(void); | 68 | extern void dc21285_postinit(void); |
74 | 69 | ||
70 | extern struct pci_ops via82c505_ops; | ||
75 | extern int via82c505_setup(int nr, struct pci_sys_data *); | 71 | extern int via82c505_setup(int nr, struct pci_sys_data *); |
76 | extern struct pci_bus *via82c505_scan_bus(int nr, struct pci_sys_data *); | ||
77 | extern void via82c505_init(void *sysdata); | 72 | extern void via82c505_init(void *sysdata); |
78 | 73 | ||
74 | extern struct pci_ops pci_v3_ops; | ||
79 | extern int pci_v3_setup(int nr, struct pci_sys_data *); | 75 | extern int pci_v3_setup(int nr, struct pci_sys_data *); |
80 | extern struct pci_bus *pci_v3_scan_bus(int nr, struct pci_sys_data *); | ||
81 | extern void pci_v3_preinit(void); | 76 | extern void pci_v3_preinit(void); |
82 | extern void pci_v3_postinit(void); | 77 | extern void pci_v3_postinit(void); |
83 | 78 | ||
diff --git a/arch/arm/include/asm/mach/time.h b/arch/arm/include/asm/mach/time.h index f73c908b7fa..6ca945f534a 100644 --- a/arch/arm/include/asm/mach/time.h +++ b/arch/arm/include/asm/mach/time.h | |||
@@ -42,4 +42,9 @@ struct sys_timer { | |||
42 | 42 | ||
43 | extern void timer_tick(void); | 43 | extern void timer_tick(void); |
44 | 44 | ||
45 | struct timespec; | ||
46 | typedef void (*clock_access_fn)(struct timespec *); | ||
47 | extern int register_persistent_clock(clock_access_fn read_boot, | ||
48 | clock_access_fn read_persistent); | ||
49 | |||
45 | #endif | 50 | #endif |
diff --git a/arch/arm/include/asm/mmu.h b/arch/arm/include/asm/mmu.h index b8e580a297e..14965658a92 100644 --- a/arch/arm/include/asm/mmu.h +++ b/arch/arm/include/asm/mmu.h | |||
@@ -34,11 +34,4 @@ typedef struct { | |||
34 | 34 | ||
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | /* | ||
38 | * switch_mm() may do a full cache flush over the context switch, | ||
39 | * so enable interrupts over the context switch to avoid high | ||
40 | * latency. | ||
41 | */ | ||
42 | #define __ARCH_WANT_INTERRUPTS_ON_CTXSW | ||
43 | |||
44 | #endif | 37 | #endif |
diff --git a/arch/arm/include/asm/mmu_context.h b/arch/arm/include/asm/mmu_context.h index a0b3cac0547..0306bc642c0 100644 --- a/arch/arm/include/asm/mmu_context.h +++ b/arch/arm/include/asm/mmu_context.h | |||
@@ -43,45 +43,104 @@ void __check_kvm_seq(struct mm_struct *mm); | |||
43 | #define ASID_FIRST_VERSION (1 << ASID_BITS) | 43 | #define ASID_FIRST_VERSION (1 << ASID_BITS) |
44 | 44 | ||
45 | extern unsigned int cpu_last_asid; | 45 | extern unsigned int cpu_last_asid; |
46 | #ifdef CONFIG_SMP | ||
47 | DECLARE_PER_CPU(struct mm_struct *, current_mm); | ||
48 | #endif | ||
49 | 46 | ||
50 | void __init_new_context(struct task_struct *tsk, struct mm_struct *mm); | 47 | void __init_new_context(struct task_struct *tsk, struct mm_struct *mm); |
51 | void __new_context(struct mm_struct *mm); | 48 | void __new_context(struct mm_struct *mm); |
49 | void cpu_set_reserved_ttbr0(void); | ||
52 | 50 | ||
53 | static inline void check_context(struct mm_struct *mm) | 51 | static inline void switch_new_context(struct mm_struct *mm) |
54 | { | 52 | { |
55 | /* | 53 | unsigned long flags; |
56 | * This code is executed with interrupts enabled. Therefore, | 54 | |
57 | * mm->context.id cannot be updated to the latest ASID version | 55 | __new_context(mm); |
58 | * on a different CPU (and condition below not triggered) | 56 | |
59 | * without first getting an IPI to reset the context. The | 57 | local_irq_save(flags); |
60 | * alternative is to take a read_lock on mm->context.id_lock | 58 | cpu_switch_mm(mm->pgd, mm); |
61 | * (after changing its type to rwlock_t). | 59 | local_irq_restore(flags); |
62 | */ | 60 | } |
63 | if (unlikely((mm->context.id ^ cpu_last_asid) >> ASID_BITS)) | ||
64 | __new_context(mm); | ||
65 | 61 | ||
62 | static inline void check_and_switch_context(struct mm_struct *mm, | ||
63 | struct task_struct *tsk) | ||
64 | { | ||
66 | if (unlikely(mm->context.kvm_seq != init_mm.context.kvm_seq)) | 65 | if (unlikely(mm->context.kvm_seq != init_mm.context.kvm_seq)) |
67 | __check_kvm_seq(mm); | 66 | __check_kvm_seq(mm); |
67 | |||
68 | /* | ||
69 | * Required during context switch to avoid speculative page table | ||
70 | * walking with the wrong TTBR. | ||
71 | */ | ||
72 | cpu_set_reserved_ttbr0(); | ||
73 | |||
74 | if (!((mm->context.id ^ cpu_last_asid) >> ASID_BITS)) | ||
75 | /* | ||
76 | * The ASID is from the current generation, just switch to the | ||
77 | * new pgd. This condition is only true for calls from | ||
78 | * context_switch() and interrupts are already disabled. | ||
79 | */ | ||
80 | cpu_switch_mm(mm->pgd, mm); | ||
81 | else if (irqs_disabled()) | ||
82 | /* | ||
83 | * Defer the new ASID allocation until after the context | ||
84 | * switch critical region since __new_context() cannot be | ||
85 | * called with interrupts disabled (it sends IPIs). | ||
86 | */ | ||
87 | set_ti_thread_flag(task_thread_info(tsk), TIF_SWITCH_MM); | ||
88 | else | ||
89 | /* | ||
90 | * That is a direct call to switch_mm() or activate_mm() with | ||
91 | * interrupts enabled and a new context. | ||
92 | */ | ||
93 | switch_new_context(mm); | ||
68 | } | 94 | } |
69 | 95 | ||
70 | #define init_new_context(tsk,mm) (__init_new_context(tsk,mm),0) | 96 | #define init_new_context(tsk,mm) (__init_new_context(tsk,mm),0) |
71 | 97 | ||
72 | #else | 98 | #define finish_arch_post_lock_switch \ |
73 | 99 | finish_arch_post_lock_switch | |
74 | static inline void check_context(struct mm_struct *mm) | 100 | static inline void finish_arch_post_lock_switch(void) |
75 | { | 101 | { |
102 | if (test_and_clear_thread_flag(TIF_SWITCH_MM)) | ||
103 | switch_new_context(current->mm); | ||
104 | } | ||
105 | |||
106 | #else /* !CONFIG_CPU_HAS_ASID */ | ||
107 | |||
76 | #ifdef CONFIG_MMU | 108 | #ifdef CONFIG_MMU |
109 | |||
110 | static inline void check_and_switch_context(struct mm_struct *mm, | ||
111 | struct task_struct *tsk) | ||
112 | { | ||
77 | if (unlikely(mm->context.kvm_seq != init_mm.context.kvm_seq)) | 113 | if (unlikely(mm->context.kvm_seq != init_mm.context.kvm_seq)) |
78 | __check_kvm_seq(mm); | 114 | __check_kvm_seq(mm); |
79 | #endif | 115 | |
116 | if (irqs_disabled()) | ||
117 | /* | ||
118 | * cpu_switch_mm() needs to flush the VIVT caches. To avoid | ||
119 | * high interrupt latencies, defer the call and continue | ||
120 | * running with the old mm. Since we only support UP systems | ||
121 | * on non-ASID CPUs, the old mm will remain valid until the | ||
122 | * finish_arch_post_lock_switch() call. | ||
123 | */ | ||
124 | set_ti_thread_flag(task_thread_info(tsk), TIF_SWITCH_MM); | ||
125 | else | ||
126 | cpu_switch_mm(mm->pgd, mm); | ||
80 | } | 127 | } |
81 | 128 | ||
129 | #define finish_arch_post_lock_switch \ | ||
130 | finish_arch_post_lock_switch | ||
131 | static inline void finish_arch_post_lock_switch(void) | ||
132 | { | ||
133 | if (test_and_clear_thread_flag(TIF_SWITCH_MM)) { | ||
134 | struct mm_struct *mm = current->mm; | ||
135 | cpu_switch_mm(mm->pgd, mm); | ||
136 | } | ||
137 | } | ||
138 | |||
139 | #endif /* CONFIG_MMU */ | ||
140 | |||
82 | #define init_new_context(tsk,mm) 0 | 141 | #define init_new_context(tsk,mm) 0 |
83 | 142 | ||
84 | #endif | 143 | #endif /* CONFIG_CPU_HAS_ASID */ |
85 | 144 | ||
86 | #define destroy_context(mm) do { } while(0) | 145 | #define destroy_context(mm) do { } while(0) |
87 | 146 | ||
@@ -119,12 +178,7 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next, | |||
119 | __flush_icache_all(); | 178 | __flush_icache_all(); |
120 | #endif | 179 | #endif |
121 | if (!cpumask_test_and_set_cpu(cpu, mm_cpumask(next)) || prev != next) { | 180 | if (!cpumask_test_and_set_cpu(cpu, mm_cpumask(next)) || prev != next) { |
122 | #ifdef CONFIG_SMP | 181 | check_and_switch_context(next, tsk); |
123 | struct mm_struct **crt_mm = &per_cpu(current_mm, cpu); | ||
124 | *crt_mm = next; | ||
125 | #endif | ||
126 | check_context(next); | ||
127 | cpu_switch_mm(next->pgd, next); | ||
128 | if (cache_is_vivt()) | 182 | if (cache_is_vivt()) |
129 | cpumask_clear_cpu(cpu, mm_cpumask(prev)); | 183 | cpumask_clear_cpu(cpu, mm_cpumask(prev)); |
130 | } | 184 | } |
diff --git a/arch/arm/include/asm/page.h b/arch/arm/include/asm/page.h index 5838361c48b..ecf901902e4 100644 --- a/arch/arm/include/asm/page.h +++ b/arch/arm/include/asm/page.h | |||
@@ -34,7 +34,6 @@ | |||
34 | * processor(s) we're building for. | 34 | * processor(s) we're building for. |
35 | * | 35 | * |
36 | * We have the following to choose from: | 36 | * We have the following to choose from: |
37 | * v3 - ARMv3 | ||
38 | * v4wt - ARMv4 with writethrough cache, without minicache | 37 | * v4wt - ARMv4 with writethrough cache, without minicache |
39 | * v4wb - ARMv4 with writeback cache, without minicache | 38 | * v4wb - ARMv4 with writeback cache, without minicache |
40 | * v4_mc - ARMv4 with minicache | 39 | * v4_mc - ARMv4 with minicache |
@@ -44,14 +43,6 @@ | |||
44 | #undef _USER | 43 | #undef _USER |
45 | #undef MULTI_USER | 44 | #undef MULTI_USER |
46 | 45 | ||
47 | #ifdef CONFIG_CPU_COPY_V3 | ||
48 | # ifdef _USER | ||
49 | # define MULTI_USER 1 | ||
50 | # else | ||
51 | # define _USER v3 | ||
52 | # endif | ||
53 | #endif | ||
54 | |||
55 | #ifdef CONFIG_CPU_COPY_V4WT | 46 | #ifdef CONFIG_CPU_COPY_V4WT |
56 | # ifdef _USER | 47 | # ifdef _USER |
57 | # define MULTI_USER 1 | 48 | # define MULTI_USER 1 |
diff --git a/arch/arm/include/asm/pgtable-3level.h b/arch/arm/include/asm/pgtable-3level.h index 759af70f9a0..b24903549d1 100644 --- a/arch/arm/include/asm/pgtable-3level.h +++ b/arch/arm/include/asm/pgtable-3level.h | |||
@@ -69,8 +69,6 @@ | |||
69 | */ | 69 | */ |
70 | #define L_PTE_PRESENT (_AT(pteval_t, 3) << 0) /* Valid */ | 70 | #define L_PTE_PRESENT (_AT(pteval_t, 3) << 0) /* Valid */ |
71 | #define L_PTE_FILE (_AT(pteval_t, 1) << 2) /* only when !PRESENT */ | 71 | #define L_PTE_FILE (_AT(pteval_t, 1) << 2) /* only when !PRESENT */ |
72 | #define L_PTE_BUFFERABLE (_AT(pteval_t, 1) << 2) /* AttrIndx[0] */ | ||
73 | #define L_PTE_CACHEABLE (_AT(pteval_t, 1) << 3) /* AttrIndx[1] */ | ||
74 | #define L_PTE_USER (_AT(pteval_t, 1) << 6) /* AP[1] */ | 72 | #define L_PTE_USER (_AT(pteval_t, 1) << 6) /* AP[1] */ |
75 | #define L_PTE_RDONLY (_AT(pteval_t, 1) << 7) /* AP[2] */ | 73 | #define L_PTE_RDONLY (_AT(pteval_t, 1) << 7) /* AP[2] */ |
76 | #define L_PTE_SHARED (_AT(pteval_t, 3) << 8) /* SH[1:0], inner shareable */ | 74 | #define L_PTE_SHARED (_AT(pteval_t, 3) << 8) /* SH[1:0], inner shareable */ |
diff --git a/arch/arm/include/asm/processor.h b/arch/arm/include/asm/processor.h index 5ac8d3d3e02..d7038fa2234 100644 --- a/arch/arm/include/asm/processor.h +++ b/arch/arm/include/asm/processor.h | |||
@@ -88,8 +88,6 @@ unsigned long get_wchan(struct task_struct *p); | |||
88 | #define cpu_relax() barrier() | 88 | #define cpu_relax() barrier() |
89 | #endif | 89 | #endif |
90 | 90 | ||
91 | void cpu_idle_wait(void); | ||
92 | |||
93 | /* | 91 | /* |
94 | * Create a new kernel thread | 92 | * Create a new kernel thread |
95 | */ | 93 | */ |
diff --git a/arch/arm/include/asm/ptrace.h b/arch/arm/include/asm/ptrace.h index 451808ba121..355ece523f4 100644 --- a/arch/arm/include/asm/ptrace.h +++ b/arch/arm/include/asm/ptrace.h | |||
@@ -249,6 +249,11 @@ static inline unsigned long kernel_stack_pointer(struct pt_regs *regs) | |||
249 | return regs->ARM_sp; | 249 | return regs->ARM_sp; |
250 | } | 250 | } |
251 | 251 | ||
252 | static inline unsigned long user_stack_pointer(struct pt_regs *regs) | ||
253 | { | ||
254 | return regs->ARM_sp; | ||
255 | } | ||
256 | |||
252 | #endif /* __KERNEL__ */ | 257 | #endif /* __KERNEL__ */ |
253 | 258 | ||
254 | #endif /* __ASSEMBLY__ */ | 259 | #endif /* __ASSEMBLY__ */ |
diff --git a/arch/arm/include/asm/syscall.h b/arch/arm/include/asm/syscall.h new file mode 100644 index 00000000000..c334a23ddf7 --- /dev/null +++ b/arch/arm/include/asm/syscall.h | |||
@@ -0,0 +1,93 @@ | |||
1 | /* | ||
2 | * Access to user system call parameters and results | ||
3 | * | ||
4 | * See asm-generic/syscall.h for descriptions of what we must do here. | ||
5 | */ | ||
6 | |||
7 | #ifndef _ASM_ARM_SYSCALL_H | ||
8 | #define _ASM_ARM_SYSCALL_H | ||
9 | |||
10 | #include <linux/err.h> | ||
11 | |||
12 | extern const unsigned long sys_call_table[]; | ||
13 | |||
14 | static inline int syscall_get_nr(struct task_struct *task, | ||
15 | struct pt_regs *regs) | ||
16 | { | ||
17 | return task_thread_info(task)->syscall; | ||
18 | } | ||
19 | |||
20 | static inline void syscall_rollback(struct task_struct *task, | ||
21 | struct pt_regs *regs) | ||
22 | { | ||
23 | regs->ARM_r0 = regs->ARM_ORIG_r0; | ||
24 | } | ||
25 | |||
26 | static inline long syscall_get_error(struct task_struct *task, | ||
27 | struct pt_regs *regs) | ||
28 | { | ||
29 | unsigned long error = regs->ARM_r0; | ||
30 | return IS_ERR_VALUE(error) ? error : 0; | ||
31 | } | ||
32 | |||
33 | static inline long syscall_get_return_value(struct task_struct *task, | ||
34 | struct pt_regs *regs) | ||
35 | { | ||
36 | return regs->ARM_r0; | ||
37 | } | ||
38 | |||
39 | static inline void syscall_set_return_value(struct task_struct *task, | ||
40 | struct pt_regs *regs, | ||
41 | int error, long val) | ||
42 | { | ||
43 | regs->ARM_r0 = (long) error ? error : val; | ||
44 | } | ||
45 | |||
46 | #define SYSCALL_MAX_ARGS 7 | ||
47 | |||
48 | static inline void syscall_get_arguments(struct task_struct *task, | ||
49 | struct pt_regs *regs, | ||
50 | unsigned int i, unsigned int n, | ||
51 | unsigned long *args) | ||
52 | { | ||
53 | if (i + n > SYSCALL_MAX_ARGS) { | ||
54 | unsigned long *args_bad = args + SYSCALL_MAX_ARGS - i; | ||
55 | unsigned int n_bad = n + i - SYSCALL_MAX_ARGS; | ||
56 | pr_warning("%s called with max args %d, handling only %d\n", | ||
57 | __func__, i + n, SYSCALL_MAX_ARGS); | ||
58 | memset(args_bad, 0, n_bad * sizeof(args[0])); | ||
59 | n = SYSCALL_MAX_ARGS - i; | ||
60 | } | ||
61 | |||
62 | if (i == 0) { | ||
63 | args[0] = regs->ARM_ORIG_r0; | ||
64 | args++; | ||
65 | i++; | ||
66 | n--; | ||
67 | } | ||
68 | |||
69 | memcpy(args, ®s->ARM_r0 + i, n * sizeof(args[0])); | ||
70 | } | ||
71 | |||
72 | static inline void syscall_set_arguments(struct task_struct *task, | ||
73 | struct pt_regs *regs, | ||
74 | unsigned int i, unsigned int n, | ||
75 | const unsigned long *args) | ||
76 | { | ||
77 | if (i + n > SYSCALL_MAX_ARGS) { | ||
78 | pr_warning("%s called with max args %d, handling only %d\n", | ||
79 | __func__, i + n, SYSCALL_MAX_ARGS); | ||
80 | n = SYSCALL_MAX_ARGS - i; | ||
81 | } | ||
82 | |||
83 | if (i == 0) { | ||
84 | regs->ARM_ORIG_r0 = args[0]; | ||
85 | args++; | ||
86 | i++; | ||
87 | n--; | ||
88 | } | ||
89 | |||
90 | memcpy(®s->ARM_r0 + i, args, n * sizeof(args[0])); | ||
91 | } | ||
92 | |||
93 | #endif /* _ASM_ARM_SYSCALL_H */ | ||
diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h index 0f04d84582e..68388eb4946 100644 --- a/arch/arm/include/asm/thread_info.h +++ b/arch/arm/include/asm/thread_info.h | |||
@@ -153,6 +153,7 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *, | |||
153 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ | 153 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ |
154 | #define TIF_RESTORE_SIGMASK 20 | 154 | #define TIF_RESTORE_SIGMASK 20 |
155 | #define TIF_SECCOMP 21 | 155 | #define TIF_SECCOMP 21 |
156 | #define TIF_SWITCH_MM 22 /* deferred switch_mm */ | ||
156 | 157 | ||
157 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) | 158 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) |
158 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) | 159 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) |
diff --git a/arch/arm/include/asm/tlbflush.h b/arch/arm/include/asm/tlbflush.h index 85fe61e7320..6e924d3a77e 100644 --- a/arch/arm/include/asm/tlbflush.h +++ b/arch/arm/include/asm/tlbflush.h | |||
@@ -65,21 +65,6 @@ | |||
65 | #define MULTI_TLB 1 | 65 | #define MULTI_TLB 1 |
66 | #endif | 66 | #endif |
67 | 67 | ||
68 | #define v3_tlb_flags (TLB_V3_FULL | TLB_V3_PAGE) | ||
69 | |||
70 | #ifdef CONFIG_CPU_TLB_V3 | ||
71 | # define v3_possible_flags v3_tlb_flags | ||
72 | # define v3_always_flags v3_tlb_flags | ||
73 | # ifdef _TLB | ||
74 | # define MULTI_TLB 1 | ||
75 | # else | ||
76 | # define _TLB v3 | ||
77 | # endif | ||
78 | #else | ||
79 | # define v3_possible_flags 0 | ||
80 | # define v3_always_flags (-1UL) | ||
81 | #endif | ||
82 | |||
83 | #define v4_tlb_flags (TLB_V4_U_FULL | TLB_V4_U_PAGE) | 68 | #define v4_tlb_flags (TLB_V4_U_FULL | TLB_V4_U_PAGE) |
84 | 69 | ||
85 | #ifdef CONFIG_CPU_TLB_V4WT | 70 | #ifdef CONFIG_CPU_TLB_V4WT |
@@ -298,8 +283,7 @@ extern struct cpu_tlb_fns cpu_tlb; | |||
298 | * implemented the "%?" method, but this has been discontinued due to too | 283 | * implemented the "%?" method, but this has been discontinued due to too |
299 | * many people getting it wrong. | 284 | * many people getting it wrong. |
300 | */ | 285 | */ |
301 | #define possible_tlb_flags (v3_possible_flags | \ | 286 | #define possible_tlb_flags (v4_possible_flags | \ |
302 | v4_possible_flags | \ | ||
303 | v4wbi_possible_flags | \ | 287 | v4wbi_possible_flags | \ |
304 | fr_possible_flags | \ | 288 | fr_possible_flags | \ |
305 | v4wb_possible_flags | \ | 289 | v4wb_possible_flags | \ |
@@ -307,8 +291,7 @@ extern struct cpu_tlb_fns cpu_tlb; | |||
307 | v6wbi_possible_flags | \ | 291 | v6wbi_possible_flags | \ |
308 | v7wbi_possible_flags) | 292 | v7wbi_possible_flags) |
309 | 293 | ||
310 | #define always_tlb_flags (v3_always_flags & \ | 294 | #define always_tlb_flags (v4_always_flags & \ |
311 | v4_always_flags & \ | ||
312 | v4wbi_always_flags & \ | 295 | v4wbi_always_flags & \ |
313 | fr_always_flags & \ | 296 | fr_always_flags & \ |
314 | v4wb_always_flags & \ | 297 | v4wb_always_flags & \ |
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index 7b787d642af..7ad2d5cf700 100644 --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile | |||
@@ -34,6 +34,7 @@ obj-$(CONFIG_ARM_CPU_SUSPEND) += sleep.o suspend.o | |||
34 | obj-$(CONFIG_SMP) += smp.o smp_tlb.o | 34 | obj-$(CONFIG_SMP) += smp.o smp_tlb.o |
35 | obj-$(CONFIG_HAVE_ARM_SCU) += smp_scu.o | 35 | obj-$(CONFIG_HAVE_ARM_SCU) += smp_scu.o |
36 | obj-$(CONFIG_HAVE_ARM_TWD) += smp_twd.o | 36 | obj-$(CONFIG_HAVE_ARM_TWD) += smp_twd.o |
37 | obj-$(CONFIG_ARM_ARCH_TIMER) += arch_timer.o | ||
37 | obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o insn.o | 38 | obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o insn.o |
38 | obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o insn.o | 39 | obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o insn.o |
39 | obj-$(CONFIG_JUMP_LABEL) += jump_label.o insn.o patch.o | 40 | obj-$(CONFIG_JUMP_LABEL) += jump_label.o insn.o patch.o |
@@ -81,4 +82,4 @@ head-y := head$(MMUEXT).o | |||
81 | obj-$(CONFIG_DEBUG_LL) += debug.o | 82 | obj-$(CONFIG_DEBUG_LL) += debug.o |
82 | obj-$(CONFIG_EARLY_PRINTK) += early_printk.o | 83 | obj-$(CONFIG_EARLY_PRINTK) += early_printk.o |
83 | 84 | ||
84 | extra-y := $(head-y) init_task.o vmlinux.lds | 85 | extra-y := $(head-y) vmlinux.lds |
diff --git a/arch/arm/kernel/arch_timer.c b/arch/arm/kernel/arch_timer.c new file mode 100644 index 00000000000..dd58035621f --- /dev/null +++ b/arch/arm/kernel/arch_timer.c | |||
@@ -0,0 +1,350 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/kernel/arch_timer.c | ||
3 | * | ||
4 | * Copyright (C) 2011 ARM Ltd. | ||
5 | * All Rights Reserved | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | #include <linux/init.h> | ||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/delay.h> | ||
14 | #include <linux/device.h> | ||
15 | #include <linux/smp.h> | ||
16 | #include <linux/cpu.h> | ||
17 | #include <linux/jiffies.h> | ||
18 | #include <linux/clockchips.h> | ||
19 | #include <linux/interrupt.h> | ||
20 | #include <linux/of_irq.h> | ||
21 | #include <linux/io.h> | ||
22 | |||
23 | #include <asm/cputype.h> | ||
24 | #include <asm/localtimer.h> | ||
25 | #include <asm/arch_timer.h> | ||
26 | #include <asm/system_info.h> | ||
27 | #include <asm/sched_clock.h> | ||
28 | |||
29 | static unsigned long arch_timer_rate; | ||
30 | static int arch_timer_ppi; | ||
31 | static int arch_timer_ppi2; | ||
32 | |||
33 | static struct clock_event_device __percpu **arch_timer_evt; | ||
34 | |||
35 | /* | ||
36 | * Architected system timer support. | ||
37 | */ | ||
38 | |||
39 | #define ARCH_TIMER_CTRL_ENABLE (1 << 0) | ||
40 | #define ARCH_TIMER_CTRL_IT_MASK (1 << 1) | ||
41 | #define ARCH_TIMER_CTRL_IT_STAT (1 << 2) | ||
42 | |||
43 | #define ARCH_TIMER_REG_CTRL 0 | ||
44 | #define ARCH_TIMER_REG_FREQ 1 | ||
45 | #define ARCH_TIMER_REG_TVAL 2 | ||
46 | |||
47 | static void arch_timer_reg_write(int reg, u32 val) | ||
48 | { | ||
49 | switch (reg) { | ||
50 | case ARCH_TIMER_REG_CTRL: | ||
51 | asm volatile("mcr p15, 0, %0, c14, c2, 1" : : "r" (val)); | ||
52 | break; | ||
53 | case ARCH_TIMER_REG_TVAL: | ||
54 | asm volatile("mcr p15, 0, %0, c14, c2, 0" : : "r" (val)); | ||
55 | break; | ||
56 | } | ||
57 | |||
58 | isb(); | ||
59 | } | ||
60 | |||
61 | static u32 arch_timer_reg_read(int reg) | ||
62 | { | ||
63 | u32 val; | ||
64 | |||
65 | switch (reg) { | ||
66 | case ARCH_TIMER_REG_CTRL: | ||
67 | asm volatile("mrc p15, 0, %0, c14, c2, 1" : "=r" (val)); | ||
68 | break; | ||
69 | case ARCH_TIMER_REG_FREQ: | ||
70 | asm volatile("mrc p15, 0, %0, c14, c0, 0" : "=r" (val)); | ||
71 | break; | ||
72 | case ARCH_TIMER_REG_TVAL: | ||
73 | asm volatile("mrc p15, 0, %0, c14, c2, 0" : "=r" (val)); | ||
74 | break; | ||
75 | default: | ||
76 | BUG(); | ||
77 | } | ||
78 | |||
79 | return val; | ||
80 | } | ||
81 | |||
82 | static irqreturn_t arch_timer_handler(int irq, void *dev_id) | ||
83 | { | ||
84 | struct clock_event_device *evt = *(struct clock_event_device **)dev_id; | ||
85 | unsigned long ctrl; | ||
86 | |||
87 | ctrl = arch_timer_reg_read(ARCH_TIMER_REG_CTRL); | ||
88 | if (ctrl & ARCH_TIMER_CTRL_IT_STAT) { | ||
89 | ctrl |= ARCH_TIMER_CTRL_IT_MASK; | ||
90 | arch_timer_reg_write(ARCH_TIMER_REG_CTRL, ctrl); | ||
91 | evt->event_handler(evt); | ||
92 | return IRQ_HANDLED; | ||
93 | } | ||
94 | |||
95 | return IRQ_NONE; | ||
96 | } | ||
97 | |||
98 | static void arch_timer_disable(void) | ||
99 | { | ||
100 | unsigned long ctrl; | ||
101 | |||
102 | ctrl = arch_timer_reg_read(ARCH_TIMER_REG_CTRL); | ||
103 | ctrl &= ~ARCH_TIMER_CTRL_ENABLE; | ||
104 | arch_timer_reg_write(ARCH_TIMER_REG_CTRL, ctrl); | ||
105 | } | ||
106 | |||
107 | static void arch_timer_set_mode(enum clock_event_mode mode, | ||
108 | struct clock_event_device *clk) | ||
109 | { | ||
110 | switch (mode) { | ||
111 | case CLOCK_EVT_MODE_UNUSED: | ||
112 | case CLOCK_EVT_MODE_SHUTDOWN: | ||
113 | arch_timer_disable(); | ||
114 | break; | ||
115 | default: | ||
116 | break; | ||
117 | } | ||
118 | } | ||
119 | |||
120 | static int arch_timer_set_next_event(unsigned long evt, | ||
121 | struct clock_event_device *unused) | ||
122 | { | ||
123 | unsigned long ctrl; | ||
124 | |||
125 | ctrl = arch_timer_reg_read(ARCH_TIMER_REG_CTRL); | ||
126 | ctrl |= ARCH_TIMER_CTRL_ENABLE; | ||
127 | ctrl &= ~ARCH_TIMER_CTRL_IT_MASK; | ||
128 | |||
129 | arch_timer_reg_write(ARCH_TIMER_REG_TVAL, evt); | ||
130 | arch_timer_reg_write(ARCH_TIMER_REG_CTRL, ctrl); | ||
131 | |||
132 | return 0; | ||
133 | } | ||
134 | |||
135 | static int __cpuinit arch_timer_setup(struct clock_event_device *clk) | ||
136 | { | ||
137 | /* Be safe... */ | ||
138 | arch_timer_disable(); | ||
139 | |||
140 | clk->features = CLOCK_EVT_FEAT_ONESHOT; | ||
141 | clk->name = "arch_sys_timer"; | ||
142 | clk->rating = 450; | ||
143 | clk->set_mode = arch_timer_set_mode; | ||
144 | clk->set_next_event = arch_timer_set_next_event; | ||
145 | clk->irq = arch_timer_ppi; | ||
146 | |||
147 | clockevents_config_and_register(clk, arch_timer_rate, | ||
148 | 0xf, 0x7fffffff); | ||
149 | |||
150 | *__this_cpu_ptr(arch_timer_evt) = clk; | ||
151 | |||
152 | enable_percpu_irq(clk->irq, 0); | ||
153 | if (arch_timer_ppi2) | ||
154 | enable_percpu_irq(arch_timer_ppi2, 0); | ||
155 | |||
156 | return 0; | ||
157 | } | ||
158 | |||
159 | /* Is the optional system timer available? */ | ||
160 | static int local_timer_is_architected(void) | ||
161 | { | ||
162 | return (cpu_architecture() >= CPU_ARCH_ARMv7) && | ||
163 | ((read_cpuid_ext(CPUID_EXT_PFR1) >> 16) & 0xf) == 1; | ||
164 | } | ||
165 | |||
166 | static int arch_timer_available(void) | ||
167 | { | ||
168 | unsigned long freq; | ||
169 | |||
170 | if (!local_timer_is_architected()) | ||
171 | return -ENXIO; | ||
172 | |||
173 | if (arch_timer_rate == 0) { | ||
174 | arch_timer_reg_write(ARCH_TIMER_REG_CTRL, 0); | ||
175 | freq = arch_timer_reg_read(ARCH_TIMER_REG_FREQ); | ||
176 | |||
177 | /* Check the timer frequency. */ | ||
178 | if (freq == 0) { | ||
179 | pr_warn("Architected timer frequency not available\n"); | ||
180 | return -EINVAL; | ||
181 | } | ||
182 | |||
183 | arch_timer_rate = freq; | ||
184 | } | ||
185 | |||
186 | pr_info_once("Architected local timer running at %lu.%02luMHz.\n", | ||
187 | arch_timer_rate / 1000000, (arch_timer_rate / 10000) % 100); | ||
188 | return 0; | ||
189 | } | ||
190 | |||
191 | static inline cycle_t arch_counter_get_cntpct(void) | ||
192 | { | ||
193 | u32 cvall, cvalh; | ||
194 | |||
195 | asm volatile("mrrc p15, 0, %0, %1, c14" : "=r" (cvall), "=r" (cvalh)); | ||
196 | |||
197 | return ((cycle_t) cvalh << 32) | cvall; | ||
198 | } | ||
199 | |||
200 | static inline cycle_t arch_counter_get_cntvct(void) | ||
201 | { | ||
202 | u32 cvall, cvalh; | ||
203 | |||
204 | asm volatile("mrrc p15, 1, %0, %1, c14" : "=r" (cvall), "=r" (cvalh)); | ||
205 | |||
206 | return ((cycle_t) cvalh << 32) | cvall; | ||
207 | } | ||
208 | |||
209 | static u32 notrace arch_counter_get_cntvct32(void) | ||
210 | { | ||
211 | cycle_t cntvct = arch_counter_get_cntvct(); | ||
212 | |||
213 | /* | ||
214 | * The sched_clock infrastructure only knows about counters | ||
215 | * with at most 32bits. Forget about the upper 24 bits for the | ||
216 | * time being... | ||
217 | */ | ||
218 | return (u32)(cntvct & (u32)~0); | ||
219 | } | ||
220 | |||
221 | static cycle_t arch_counter_read(struct clocksource *cs) | ||
222 | { | ||
223 | return arch_counter_get_cntpct(); | ||
224 | } | ||
225 | |||
226 | static struct clocksource clocksource_counter = { | ||
227 | .name = "arch_sys_counter", | ||
228 | .rating = 400, | ||
229 | .read = arch_counter_read, | ||
230 | .mask = CLOCKSOURCE_MASK(56), | ||
231 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | ||
232 | }; | ||
233 | |||
234 | static void __cpuinit arch_timer_stop(struct clock_event_device *clk) | ||
235 | { | ||
236 | pr_debug("arch_timer_teardown disable IRQ%d cpu #%d\n", | ||
237 | clk->irq, smp_processor_id()); | ||
238 | disable_percpu_irq(clk->irq); | ||
239 | if (arch_timer_ppi2) | ||
240 | disable_percpu_irq(arch_timer_ppi2); | ||
241 | arch_timer_set_mode(CLOCK_EVT_MODE_UNUSED, clk); | ||
242 | } | ||
243 | |||
244 | static struct local_timer_ops arch_timer_ops __cpuinitdata = { | ||
245 | .setup = arch_timer_setup, | ||
246 | .stop = arch_timer_stop, | ||
247 | }; | ||
248 | |||
249 | static struct clock_event_device arch_timer_global_evt; | ||
250 | |||
251 | static int __init arch_timer_register(void) | ||
252 | { | ||
253 | int err; | ||
254 | |||
255 | err = arch_timer_available(); | ||
256 | if (err) | ||
257 | return err; | ||
258 | |||
259 | arch_timer_evt = alloc_percpu(struct clock_event_device *); | ||
260 | if (!arch_timer_evt) | ||
261 | return -ENOMEM; | ||
262 | |||
263 | clocksource_register_hz(&clocksource_counter, arch_timer_rate); | ||
264 | |||
265 | err = request_percpu_irq(arch_timer_ppi, arch_timer_handler, | ||
266 | "arch_timer", arch_timer_evt); | ||
267 | if (err) { | ||
268 | pr_err("arch_timer: can't register interrupt %d (%d)\n", | ||
269 | arch_timer_ppi, err); | ||
270 | goto out_free; | ||
271 | } | ||
272 | |||
273 | if (arch_timer_ppi2) { | ||
274 | err = request_percpu_irq(arch_timer_ppi2, arch_timer_handler, | ||
275 | "arch_timer", arch_timer_evt); | ||
276 | if (err) { | ||
277 | pr_err("arch_timer: can't register interrupt %d (%d)\n", | ||
278 | arch_timer_ppi2, err); | ||
279 | arch_timer_ppi2 = 0; | ||
280 | goto out_free_irq; | ||
281 | } | ||
282 | } | ||
283 | |||
284 | err = local_timer_register(&arch_timer_ops); | ||
285 | if (err) { | ||
286 | /* | ||
287 | * We couldn't register as a local timer (could be | ||
288 | * because we're on a UP platform, or because some | ||
289 | * other local timer is already present...). Try as a | ||
290 | * global timer instead. | ||
291 | */ | ||
292 | arch_timer_global_evt.cpumask = cpumask_of(0); | ||
293 | err = arch_timer_setup(&arch_timer_global_evt); | ||
294 | } | ||
295 | |||
296 | if (err) | ||
297 | goto out_free_irq; | ||
298 | |||
299 | return 0; | ||
300 | |||
301 | out_free_irq: | ||
302 | free_percpu_irq(arch_timer_ppi, arch_timer_evt); | ||
303 | if (arch_timer_ppi2) | ||
304 | free_percpu_irq(arch_timer_ppi2, arch_timer_evt); | ||
305 | |||
306 | out_free: | ||
307 | free_percpu(arch_timer_evt); | ||
308 | |||
309 | return err; | ||
310 | } | ||
311 | |||
312 | static const struct of_device_id arch_timer_of_match[] __initconst = { | ||
313 | { .compatible = "arm,armv7-timer", }, | ||
314 | {}, | ||
315 | }; | ||
316 | |||
317 | int __init arch_timer_of_register(void) | ||
318 | { | ||
319 | struct device_node *np; | ||
320 | u32 freq; | ||
321 | |||
322 | np = of_find_matching_node(NULL, arch_timer_of_match); | ||
323 | if (!np) { | ||
324 | pr_err("arch_timer: can't find DT node\n"); | ||
325 | return -ENODEV; | ||
326 | } | ||
327 | |||
328 | /* Try to determine the frequency from the device tree or CNTFRQ */ | ||
329 | if (!of_property_read_u32(np, "clock-frequency", &freq)) | ||
330 | arch_timer_rate = freq; | ||
331 | |||
332 | arch_timer_ppi = irq_of_parse_and_map(np, 0); | ||
333 | arch_timer_ppi2 = irq_of_parse_and_map(np, 1); | ||
334 | pr_info("arch_timer: found %s irqs %d %d\n", | ||
335 | np->name, arch_timer_ppi, arch_timer_ppi2); | ||
336 | |||
337 | return arch_timer_register(); | ||
338 | } | ||
339 | |||
340 | int __init arch_timer_sched_clock_init(void) | ||
341 | { | ||
342 | int err; | ||
343 | |||
344 | err = arch_timer_available(); | ||
345 | if (err) | ||
346 | return err; | ||
347 | |||
348 | setup_sched_clock(arch_counter_get_cntvct32, 32, arch_timer_rate); | ||
349 | return 0; | ||
350 | } | ||
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c index ede5f7741c4..25552508c3f 100644 --- a/arch/arm/kernel/bios32.c +++ b/arch/arm/kernel/bios32.c | |||
@@ -374,16 +374,29 @@ EXPORT_SYMBOL(pcibios_fixup_bus); | |||
374 | #endif | 374 | #endif |
375 | 375 | ||
376 | /* | 376 | /* |
377 | * Swizzle the device pin each time we cross a bridge. | 377 | * Swizzle the device pin each time we cross a bridge. If a platform does |
378 | * This might update pin and returns the slot number. | 378 | * not provide a swizzle function, we perform the standard PCI swizzling. |
379 | * | ||
380 | * The default swizzling walks up the bus tree one level at a time, applying | ||
381 | * the standard swizzle function at each step, stopping when it finds the PCI | ||
382 | * root bus. This will return the slot number of the bridge device on the | ||
383 | * root bus and the interrupt pin on that device which should correspond | ||
384 | * with the downstream device interrupt. | ||
385 | * | ||
386 | * Platforms may override this, in which case the slot and pin returned | ||
387 | * depend entirely on the platform code. However, please note that the | ||
388 | * PCI standard swizzle is implemented on plug-in cards and Cardbus based | ||
389 | * PCI extenders, so it can not be ignored. | ||
379 | */ | 390 | */ |
380 | static u8 __devinit pcibios_swizzle(struct pci_dev *dev, u8 *pin) | 391 | static u8 __devinit pcibios_swizzle(struct pci_dev *dev, u8 *pin) |
381 | { | 392 | { |
382 | struct pci_sys_data *sys = dev->sysdata; | 393 | struct pci_sys_data *sys = dev->sysdata; |
383 | int slot = 0, oldpin = *pin; | 394 | int slot, oldpin = *pin; |
384 | 395 | ||
385 | if (sys->swizzle) | 396 | if (sys->swizzle) |
386 | slot = sys->swizzle(dev, pin); | 397 | slot = sys->swizzle(dev, pin); |
398 | else | ||
399 | slot = pci_common_swizzle(dev, pin); | ||
387 | 400 | ||
388 | if (debug_pci) | 401 | if (debug_pci) |
389 | printk("PCI: %s swizzling pin %d => pin %d slot %d\n", | 402 | printk("PCI: %s swizzling pin %d => pin %d slot %d\n", |
@@ -410,7 +423,7 @@ static int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
410 | return irq; | 423 | return irq; |
411 | } | 424 | } |
412 | 425 | ||
413 | static void __init pcibios_init_hw(struct hw_pci *hw) | 426 | static void __init pcibios_init_hw(struct hw_pci *hw, struct list_head *head) |
414 | { | 427 | { |
415 | struct pci_sys_data *sys = NULL; | 428 | struct pci_sys_data *sys = NULL; |
416 | int ret; | 429 | int ret; |
@@ -424,7 +437,6 @@ static void __init pcibios_init_hw(struct hw_pci *hw) | |||
424 | #ifdef CONFIG_PCI_DOMAINS | 437 | #ifdef CONFIG_PCI_DOMAINS |
425 | sys->domain = hw->domain; | 438 | sys->domain = hw->domain; |
426 | #endif | 439 | #endif |
427 | sys->hw = hw; | ||
428 | sys->busnr = busnr; | 440 | sys->busnr = busnr; |
429 | sys->swizzle = hw->swizzle; | 441 | sys->swizzle = hw->swizzle; |
430 | sys->map_irq = hw->map_irq; | 442 | sys->map_irq = hw->map_irq; |
@@ -440,14 +452,18 @@ static void __init pcibios_init_hw(struct hw_pci *hw) | |||
440 | &iomem_resource, sys->mem_offset); | 452 | &iomem_resource, sys->mem_offset); |
441 | } | 453 | } |
442 | 454 | ||
443 | sys->bus = hw->scan(nr, sys); | 455 | if (hw->scan) |
456 | sys->bus = hw->scan(nr, sys); | ||
457 | else | ||
458 | sys->bus = pci_scan_root_bus(NULL, sys->busnr, | ||
459 | hw->ops, sys, &sys->resources); | ||
444 | 460 | ||
445 | if (!sys->bus) | 461 | if (!sys->bus) |
446 | panic("PCI: unable to scan bus!"); | 462 | panic("PCI: unable to scan bus!"); |
447 | 463 | ||
448 | busnr = sys->bus->subordinate + 1; | 464 | busnr = sys->bus->subordinate + 1; |
449 | 465 | ||
450 | list_add(&sys->node, &hw->buses); | 466 | list_add(&sys->node, head); |
451 | } else { | 467 | } else { |
452 | kfree(sys); | 468 | kfree(sys); |
453 | if (ret < 0) | 469 | if (ret < 0) |
@@ -459,19 +475,18 @@ static void __init pcibios_init_hw(struct hw_pci *hw) | |||
459 | void __init pci_common_init(struct hw_pci *hw) | 475 | void __init pci_common_init(struct hw_pci *hw) |
460 | { | 476 | { |
461 | struct pci_sys_data *sys; | 477 | struct pci_sys_data *sys; |
462 | 478 | LIST_HEAD(head); | |
463 | INIT_LIST_HEAD(&hw->buses); | ||
464 | 479 | ||
465 | pci_add_flags(PCI_REASSIGN_ALL_RSRC); | 480 | pci_add_flags(PCI_REASSIGN_ALL_RSRC); |
466 | if (hw->preinit) | 481 | if (hw->preinit) |
467 | hw->preinit(); | 482 | hw->preinit(); |
468 | pcibios_init_hw(hw); | 483 | pcibios_init_hw(hw, &head); |
469 | if (hw->postinit) | 484 | if (hw->postinit) |
470 | hw->postinit(); | 485 | hw->postinit(); |
471 | 486 | ||
472 | pci_fixup_irqs(pcibios_swizzle, pcibios_map_irq); | 487 | pci_fixup_irqs(pcibios_swizzle, pcibios_map_irq); |
473 | 488 | ||
474 | list_for_each_entry(sys, &hw->buses, node) { | 489 | list_for_each_entry(sys, &head, node) { |
475 | struct pci_bus *bus = sys->bus; | 490 | struct pci_bus *bus = sys->bus; |
476 | 491 | ||
477 | if (!pci_has_flag(PCI_PROBE_ONLY)) { | 492 | if (!pci_has_flag(PCI_PROBE_ONLY)) { |
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index 7fd3ad048da..437f0c42651 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -556,10 +556,6 @@ call_fpe: | |||
556 | #endif | 556 | #endif |
557 | tst r0, #0x08000000 @ only CDP/CPRT/LDC/STC have bit 27 | 557 | tst r0, #0x08000000 @ only CDP/CPRT/LDC/STC have bit 27 |
558 | tstne r0, #0x04000000 @ bit 26 set on both ARM and Thumb-2 | 558 | tstne r0, #0x04000000 @ bit 26 set on both ARM and Thumb-2 |
559 | #if defined(CONFIG_CPU_ARM610) || defined(CONFIG_CPU_ARM710) | ||
560 | and r8, r0, #0x0f000000 @ mask out op-code bits | ||
561 | teqne r8, #0x0f000000 @ SWI (ARM6/7 bug)? | ||
562 | #endif | ||
563 | moveq pc, lr | 559 | moveq pc, lr |
564 | get_thread_info r10 @ get current thread | 560 | get_thread_info r10 @ get current thread |
565 | and r8, r0, #0x00000f00 @ mask out CP number | 561 | and r8, r0, #0x00000f00 @ mask out CP number |
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index 54ee265dd81..7bd2d3cb895 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S | |||
@@ -335,20 +335,6 @@ ENDPROC(ftrace_stub) | |||
335 | *----------------------------------------------------------------------------- | 335 | *----------------------------------------------------------------------------- |
336 | */ | 336 | */ |
337 | 337 | ||
338 | /* If we're optimising for StrongARM the resulting code won't | ||
339 | run on an ARM7 and we can save a couple of instructions. | ||
340 | --pb */ | ||
341 | #ifdef CONFIG_CPU_ARM710 | ||
342 | #define A710(code...) code | ||
343 | .Larm710bug: | ||
344 | ldmia sp, {r0 - lr}^ @ Get calling r0 - lr | ||
345 | mov r0, r0 | ||
346 | add sp, sp, #S_FRAME_SIZE | ||
347 | subs pc, lr, #4 | ||
348 | #else | ||
349 | #define A710(code...) | ||
350 | #endif | ||
351 | |||
352 | .align 5 | 338 | .align 5 |
353 | ENTRY(vector_swi) | 339 | ENTRY(vector_swi) |
354 | sub sp, sp, #S_FRAME_SIZE | 340 | sub sp, sp, #S_FRAME_SIZE |
@@ -379,9 +365,6 @@ ENTRY(vector_swi) | |||
379 | ldreq r10, [lr, #-4] @ get SWI instruction | 365 | ldreq r10, [lr, #-4] @ get SWI instruction |
380 | #else | 366 | #else |
381 | ldr r10, [lr, #-4] @ get SWI instruction | 367 | ldr r10, [lr, #-4] @ get SWI instruction |
382 | A710( and ip, r10, #0x0f000000 @ check for SWI ) | ||
383 | A710( teq ip, #0x0f000000 ) | ||
384 | A710( bne .Larm710bug ) | ||
385 | #endif | 368 | #endif |
386 | #ifdef CONFIG_CPU_ENDIAN_BE8 | 369 | #ifdef CONFIG_CPU_ENDIAN_BE8 |
387 | rev r10, r10 @ little endian instruction | 370 | rev r10, r10 @ little endian instruction |
@@ -392,26 +375,15 @@ ENTRY(vector_swi) | |||
392 | /* | 375 | /* |
393 | * Pure EABI user space always put syscall number into scno (r7). | 376 | * Pure EABI user space always put syscall number into scno (r7). |
394 | */ | 377 | */ |
395 | A710( ldr ip, [lr, #-4] @ get SWI instruction ) | ||
396 | A710( and ip, ip, #0x0f000000 @ check for SWI ) | ||
397 | A710( teq ip, #0x0f000000 ) | ||
398 | A710( bne .Larm710bug ) | ||
399 | |||
400 | #elif defined(CONFIG_ARM_THUMB) | 378 | #elif defined(CONFIG_ARM_THUMB) |
401 | |||
402 | /* Legacy ABI only, possibly thumb mode. */ | 379 | /* Legacy ABI only, possibly thumb mode. */ |
403 | tst r8, #PSR_T_BIT @ this is SPSR from save_user_regs | 380 | tst r8, #PSR_T_BIT @ this is SPSR from save_user_regs |
404 | addne scno, r7, #__NR_SYSCALL_BASE @ put OS number in | 381 | addne scno, r7, #__NR_SYSCALL_BASE @ put OS number in |
405 | ldreq scno, [lr, #-4] | 382 | ldreq scno, [lr, #-4] |
406 | 383 | ||
407 | #else | 384 | #else |
408 | |||
409 | /* Legacy ABI only. */ | 385 | /* Legacy ABI only. */ |
410 | ldr scno, [lr, #-4] @ get SWI instruction | 386 | ldr scno, [lr, #-4] @ get SWI instruction |
411 | A710( and ip, scno, #0x0f000000 @ check for SWI ) | ||
412 | A710( teq ip, #0x0f000000 ) | ||
413 | A710( bne .Larm710bug ) | ||
414 | |||
415 | #endif | 387 | #endif |
416 | 388 | ||
417 | #ifdef CONFIG_ALIGNMENT_TRAP | 389 | #ifdef CONFIG_ALIGNMENT_TRAP |
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 3bf0c7f8b04..835898e7d70 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S | |||
@@ -277,10 +277,6 @@ __create_page_tables: | |||
277 | mov r3, r3, lsl #PMD_ORDER | 277 | mov r3, r3, lsl #PMD_ORDER |
278 | 278 | ||
279 | add r0, r4, r3 | 279 | add r0, r4, r3 |
280 | rsb r3, r3, #0x4000 @ PTRS_PER_PGD*sizeof(long) | ||
281 | cmp r3, #0x0800 @ limit to 512MB | ||
282 | movhi r3, #0x0800 | ||
283 | add r6, r0, r3 | ||
284 | mov r3, r7, lsr #SECTION_SHIFT | 280 | mov r3, r7, lsr #SECTION_SHIFT |
285 | ldr r7, [r10, #PROCINFO_IO_MMUFLAGS] @ io_mmuflags | 281 | ldr r7, [r10, #PROCINFO_IO_MMUFLAGS] @ io_mmuflags |
286 | orr r3, r7, r3, lsl #SECTION_SHIFT | 282 | orr r3, r7, r3, lsl #SECTION_SHIFT |
@@ -289,13 +285,10 @@ __create_page_tables: | |||
289 | #else | 285 | #else |
290 | orr r3, r3, #PMD_SECT_XN | 286 | orr r3, r3, #PMD_SECT_XN |
291 | #endif | 287 | #endif |
292 | 1: str r3, [r0], #4 | 288 | str r3, [r0], #4 |
293 | #ifdef CONFIG_ARM_LPAE | 289 | #ifdef CONFIG_ARM_LPAE |
294 | str r7, [r0], #4 | 290 | str r7, [r0], #4 |
295 | #endif | 291 | #endif |
296 | add r3, r3, #1 << SECTION_SHIFT | ||
297 | cmp r0, r6 | ||
298 | blo 1b | ||
299 | 292 | ||
300 | #else /* CONFIG_DEBUG_ICEDCC || CONFIG_DEBUG_SEMIHOSTING */ | 293 | #else /* CONFIG_DEBUG_ICEDCC || CONFIG_DEBUG_SEMIHOSTING */ |
301 | /* we don't need any serial debugging mappings */ | 294 | /* we don't need any serial debugging mappings */ |
diff --git a/arch/arm/kernel/init_task.c b/arch/arm/kernel/init_task.c deleted file mode 100644 index e7cbb50dc35..00000000000 --- a/arch/arm/kernel/init_task.c +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/kernel/init_task.c | ||
3 | */ | ||
4 | #include <linux/mm.h> | ||
5 | #include <linux/module.h> | ||
6 | #include <linux/fs.h> | ||
7 | #include <linux/sched.h> | ||
8 | #include <linux/init.h> | ||
9 | #include <linux/init_task.h> | ||
10 | #include <linux/mqueue.h> | ||
11 | #include <linux/uaccess.h> | ||
12 | |||
13 | #include <asm/pgtable.h> | ||
14 | |||
15 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | ||
16 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | ||
17 | /* | ||
18 | * Initial thread structure. | ||
19 | * | ||
20 | * We need to make sure that this is 8192-byte aligned due to the | ||
21 | * way process stacks are handled. This is done by making sure | ||
22 | * the linker maps this in the .text segment right after head.S, | ||
23 | * and making head.S ensure the proper alignment. | ||
24 | * | ||
25 | * The things we do for performance.. | ||
26 | */ | ||
27 | union thread_union init_thread_union __init_task_data = | ||
28 | { INIT_THREAD_INFO(init_task) }; | ||
29 | |||
30 | /* | ||
31 | * Initial task structure. | ||
32 | * | ||
33 | * All other task structs will be allocated on slabs in fork.c | ||
34 | */ | ||
35 | struct task_struct init_task = INIT_TASK(init_task); | ||
36 | |||
37 | EXPORT_SYMBOL(init_task); | ||
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 2b7b017a20c..19c95ea65b2 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
@@ -157,26 +157,6 @@ EXPORT_SYMBOL(pm_power_off); | |||
157 | void (*arm_pm_restart)(char str, const char *cmd) = null_restart; | 157 | void (*arm_pm_restart)(char str, const char *cmd) = null_restart; |
158 | EXPORT_SYMBOL_GPL(arm_pm_restart); | 158 | EXPORT_SYMBOL_GPL(arm_pm_restart); |
159 | 159 | ||
160 | static void do_nothing(void *unused) | ||
161 | { | ||
162 | } | ||
163 | |||
164 | /* | ||
165 | * cpu_idle_wait - Used to ensure that all the CPUs discard old value of | ||
166 | * pm_idle and update to new pm_idle value. Required while changing pm_idle | ||
167 | * handler on SMP systems. | ||
168 | * | ||
169 | * Caller must have changed pm_idle to the new value before the call. Old | ||
170 | * pm_idle value will not be used by any CPU after the return of this function. | ||
171 | */ | ||
172 | void cpu_idle_wait(void) | ||
173 | { | ||
174 | smp_mb(); | ||
175 | /* kick all the CPUs so that they exit out of pm_idle */ | ||
176 | smp_call_function(do_nothing, NULL, 1); | ||
177 | } | ||
178 | EXPORT_SYMBOL_GPL(cpu_idle_wait); | ||
179 | |||
180 | /* | 160 | /* |
181 | * This is our default idle handler. | 161 | * This is our default idle handler. |
182 | */ | 162 | */ |
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c index 80abafb9bf3..14e38261cd3 100644 --- a/arch/arm/kernel/ptrace.c +++ b/arch/arm/kernel/ptrace.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/hw_breakpoint.h> | 24 | #include <linux/hw_breakpoint.h> |
25 | #include <linux/regset.h> | 25 | #include <linux/regset.h> |
26 | #include <linux/audit.h> | 26 | #include <linux/audit.h> |
27 | #include <linux/tracehook.h> | ||
27 | 28 | ||
28 | #include <asm/pgtable.h> | 29 | #include <asm/pgtable.h> |
29 | #include <asm/traps.h> | 30 | #include <asm/traps.h> |
@@ -906,49 +907,33 @@ long arch_ptrace(struct task_struct *child, long request, | |||
906 | return ret; | 907 | return ret; |
907 | } | 908 | } |
908 | 909 | ||
909 | #ifdef __ARMEB__ | ||
910 | #define AUDIT_ARCH_NR AUDIT_ARCH_ARMEB | ||
911 | #else | ||
912 | #define AUDIT_ARCH_NR AUDIT_ARCH_ARM | ||
913 | #endif | ||
914 | |||
915 | asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno) | 910 | asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno) |
916 | { | 911 | { |
917 | unsigned long ip; | 912 | unsigned long ip; |
918 | 913 | ||
919 | /* | 914 | if (why) |
920 | * Save IP. IP is used to denote syscall entry/exit: | ||
921 | * IP = 0 -> entry, = 1 -> exit | ||
922 | */ | ||
923 | ip = regs->ARM_ip; | ||
924 | regs->ARM_ip = why; | ||
925 | |||
926 | if (!ip) | ||
927 | audit_syscall_exit(regs); | 915 | audit_syscall_exit(regs); |
928 | else | 916 | else |
929 | audit_syscall_entry(AUDIT_ARCH_NR, scno, regs->ARM_r0, | 917 | audit_syscall_entry(AUDIT_ARCH_ARM, scno, regs->ARM_r0, |
930 | regs->ARM_r1, regs->ARM_r2, regs->ARM_r3); | 918 | regs->ARM_r1, regs->ARM_r2, regs->ARM_r3); |
931 | 919 | ||
932 | if (!test_thread_flag(TIF_SYSCALL_TRACE)) | 920 | if (!test_thread_flag(TIF_SYSCALL_TRACE)) |
933 | return scno; | 921 | return scno; |
934 | if (!(current->ptrace & PT_PTRACED)) | ||
935 | return scno; | ||
936 | 922 | ||
937 | current_thread_info()->syscall = scno; | 923 | current_thread_info()->syscall = scno; |
938 | 924 | ||
939 | /* the 0x80 provides a way for the tracing parent to distinguish | ||
940 | between a syscall stop and SIGTRAP delivery */ | ||
941 | ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) | ||
942 | ? 0x80 : 0)); | ||
943 | /* | 925 | /* |
944 | * this isn't the same as continuing with a signal, but it will do | 926 | * IP is used to denote syscall entry/exit: |
945 | * for normal use. strace only continues with a signal if the | 927 | * IP = 0 -> entry, =1 -> exit |
946 | * stopping signal is not SIGTRAP. -brl | ||
947 | */ | 928 | */ |
948 | if (current->exit_code) { | 929 | ip = regs->ARM_ip; |
949 | send_sig(current->exit_code, current, 1); | 930 | regs->ARM_ip = why; |
950 | current->exit_code = 0; | 931 | |
951 | } | 932 | if (why) |
933 | tracehook_report_syscall_exit(regs, 0); | ||
934 | else if (tracehook_report_syscall_entry(regs)) | ||
935 | current_thread_info()->syscall = -1; | ||
936 | |||
952 | regs->ARM_ip = ip; | 937 | regs->ARM_ip = ip; |
953 | 938 | ||
954 | return current_thread_info()->syscall; | 939 | return current_thread_info()->syscall; |
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index d68d1b69468..73d9a420850 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c | |||
@@ -589,6 +589,8 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, | |||
589 | */ | 589 | */ |
590 | block_sigmask(ka, sig); | 590 | block_sigmask(ka, sig); |
591 | 591 | ||
592 | tracehook_signal_handler(sig, info, ka, regs, 0); | ||
593 | |||
592 | return 0; | 594 | return 0; |
593 | } | 595 | } |
594 | 596 | ||
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index f6a4d32b042..b735521a4a5 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -60,32 +60,11 @@ enum ipi_msg_type { | |||
60 | 60 | ||
61 | static DECLARE_COMPLETION(cpu_running); | 61 | static DECLARE_COMPLETION(cpu_running); |
62 | 62 | ||
63 | int __cpuinit __cpu_up(unsigned int cpu) | 63 | int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *idle) |
64 | { | 64 | { |
65 | struct cpuinfo_arm *ci = &per_cpu(cpu_data, cpu); | ||
66 | struct task_struct *idle = ci->idle; | ||
67 | int ret; | 65 | int ret; |
68 | 66 | ||
69 | /* | 67 | /* |
70 | * Spawn a new process manually, if not already done. | ||
71 | * Grab a pointer to its task struct so we can mess with it | ||
72 | */ | ||
73 | if (!idle) { | ||
74 | idle = fork_idle(cpu); | ||
75 | if (IS_ERR(idle)) { | ||
76 | printk(KERN_ERR "CPU%u: fork() failed\n", cpu); | ||
77 | return PTR_ERR(idle); | ||
78 | } | ||
79 | ci->idle = idle; | ||
80 | } else { | ||
81 | /* | ||
82 | * Since this idle thread is being re-used, call | ||
83 | * init_idle() to reinitialize the thread structure. | ||
84 | */ | ||
85 | init_idle(idle, cpu); | ||
86 | } | ||
87 | |||
88 | /* | ||
89 | * We need to tell the secondary core where to find | 68 | * We need to tell the secondary core where to find |
90 | * its stack and the page tables. | 69 | * its stack and the page tables. |
91 | */ | 70 | */ |
@@ -251,8 +230,6 @@ asmlinkage void __cpuinit secondary_start_kernel(void) | |||
251 | struct mm_struct *mm = &init_mm; | 230 | struct mm_struct *mm = &init_mm; |
252 | unsigned int cpu = smp_processor_id(); | 231 | unsigned int cpu = smp_processor_id(); |
253 | 232 | ||
254 | printk("CPU%u: Booted secondary processor\n", cpu); | ||
255 | |||
256 | /* | 233 | /* |
257 | * All kernel threads share the same mm context; grab a | 234 | * All kernel threads share the same mm context; grab a |
258 | * reference and switch to it. | 235 | * reference and switch to it. |
@@ -264,6 +241,8 @@ asmlinkage void __cpuinit secondary_start_kernel(void) | |||
264 | enter_lazy_tlb(mm, current); | 241 | enter_lazy_tlb(mm, current); |
265 | local_flush_tlb_all(); | 242 | local_flush_tlb_all(); |
266 | 243 | ||
244 | printk("CPU%u: Booted secondary processor\n", cpu); | ||
245 | |||
267 | cpu_init(); | 246 | cpu_init(); |
268 | preempt_disable(); | 247 | preempt_disable(); |
269 | trace_hardirqs_off(); | 248 | trace_hardirqs_off(); |
@@ -318,9 +297,6 @@ void __init smp_cpus_done(unsigned int max_cpus) | |||
318 | 297 | ||
319 | void __init smp_prepare_boot_cpu(void) | 298 | void __init smp_prepare_boot_cpu(void) |
320 | { | 299 | { |
321 | unsigned int cpu = smp_processor_id(); | ||
322 | |||
323 | per_cpu(cpu_data, cpu).idle = current; | ||
324 | } | 300 | } |
325 | 301 | ||
326 | void __init smp_prepare_cpus(unsigned int max_cpus) | 302 | void __init smp_prepare_cpus(unsigned int max_cpus) |
@@ -454,6 +430,9 @@ static struct local_timer_ops *lt_ops; | |||
454 | #ifdef CONFIG_LOCAL_TIMERS | 430 | #ifdef CONFIG_LOCAL_TIMERS |
455 | int local_timer_register(struct local_timer_ops *ops) | 431 | int local_timer_register(struct local_timer_ops *ops) |
456 | { | 432 | { |
433 | if (!is_smp() || !setup_max_cpus) | ||
434 | return -ENXIO; | ||
435 | |||
457 | if (lt_ops) | 436 | if (lt_ops) |
458 | return -EBUSY; | 437 | return -EBUSY; |
459 | 438 | ||
diff --git a/arch/arm/kernel/smp_scu.c b/arch/arm/kernel/smp_scu.c index 8f5dd796335..b9f015e843d 100644 --- a/arch/arm/kernel/smp_scu.c +++ b/arch/arm/kernel/smp_scu.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/io.h> | 12 | #include <linux/io.h> |
13 | 13 | ||
14 | #include <asm/smp_plat.h> | ||
14 | #include <asm/smp_scu.h> | 15 | #include <asm/smp_scu.h> |
15 | #include <asm/cacheflush.h> | 16 | #include <asm/cacheflush.h> |
16 | #include <asm/cputype.h> | 17 | #include <asm/cputype.h> |
@@ -74,7 +75,7 @@ void scu_enable(void __iomem *scu_base) | |||
74 | int scu_power_mode(void __iomem *scu_base, unsigned int mode) | 75 | int scu_power_mode(void __iomem *scu_base, unsigned int mode) |
75 | { | 76 | { |
76 | unsigned int val; | 77 | unsigned int val; |
77 | int cpu = smp_processor_id(); | 78 | int cpu = cpu_logical_map(smp_processor_id()); |
78 | 79 | ||
79 | if (mode > 3 || mode == 1 || cpu > 3) | 80 | if (mode > 3 || mode == 1 || cpu > 3) |
80 | return -EINVAL; | 81 | return -EINVAL; |
diff --git a/arch/arm/kernel/sys_arm.c b/arch/arm/kernel/sys_arm.c index d2b177905cd..76cbb055dd0 100644 --- a/arch/arm/kernel/sys_arm.c +++ b/arch/arm/kernel/sys_arm.c | |||
@@ -115,7 +115,7 @@ int kernel_execve(const char *filename, | |||
115 | "Ir" (THREAD_START_SP - sizeof(regs)), | 115 | "Ir" (THREAD_START_SP - sizeof(regs)), |
116 | "r" (®s), | 116 | "r" (®s), |
117 | "Ir" (sizeof(regs)) | 117 | "Ir" (sizeof(regs)) |
118 | : "r0", "r1", "r2", "r3", "ip", "lr", "memory"); | 118 | : "r0", "r1", "r2", "r3", "r8", "r9", "ip", "lr", "memory"); |
119 | 119 | ||
120 | out: | 120 | out: |
121 | return ret; | 121 | return ret; |
diff --git a/arch/arm/kernel/thumbee.c b/arch/arm/kernel/thumbee.c index aab89976405..7b8403b7666 100644 --- a/arch/arm/kernel/thumbee.c +++ b/arch/arm/kernel/thumbee.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | 22 | ||
23 | #include <asm/cputype.h> | ||
23 | #include <asm/system_info.h> | 24 | #include <asm/system_info.h> |
24 | #include <asm/thread_notify.h> | 25 | #include <asm/thread_notify.h> |
25 | 26 | ||
@@ -67,8 +68,7 @@ static int __init thumbee_init(void) | |||
67 | if (cpu_arch < CPU_ARCH_ARMv7) | 68 | if (cpu_arch < CPU_ARCH_ARMv7) |
68 | return 0; | 69 | return 0; |
69 | 70 | ||
70 | /* processor feature register 0 */ | 71 | pfr0 = read_cpuid_ext(CPUID_EXT_PFR0); |
71 | asm("mrc p15, 0, %0, c0, c1, 0\n" : "=r" (pfr0)); | ||
72 | if ((pfr0 & 0x0000f000) != 0x00001000) | 72 | if ((pfr0 & 0x0000f000) != 0x00001000) |
73 | return 0; | 73 | return 0; |
74 | 74 | ||
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index fe31b22f18f..af2afb01967 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c | |||
@@ -110,6 +110,42 @@ void timer_tick(void) | |||
110 | } | 110 | } |
111 | #endif | 111 | #endif |
112 | 112 | ||
113 | static void dummy_clock_access(struct timespec *ts) | ||
114 | { | ||
115 | ts->tv_sec = 0; | ||
116 | ts->tv_nsec = 0; | ||
117 | } | ||
118 | |||
119 | static clock_access_fn __read_persistent_clock = dummy_clock_access; | ||
120 | static clock_access_fn __read_boot_clock = dummy_clock_access;; | ||
121 | |||
122 | void read_persistent_clock(struct timespec *ts) | ||
123 | { | ||
124 | __read_persistent_clock(ts); | ||
125 | } | ||
126 | |||
127 | void read_boot_clock(struct timespec *ts) | ||
128 | { | ||
129 | __read_boot_clock(ts); | ||
130 | } | ||
131 | |||
132 | int __init register_persistent_clock(clock_access_fn read_boot, | ||
133 | clock_access_fn read_persistent) | ||
134 | { | ||
135 | /* Only allow the clockaccess functions to be registered once */ | ||
136 | if (__read_persistent_clock == dummy_clock_access && | ||
137 | __read_boot_clock == dummy_clock_access) { | ||
138 | if (read_boot) | ||
139 | __read_boot_clock = read_boot; | ||
140 | if (read_persistent) | ||
141 | __read_persistent_clock = read_persistent; | ||
142 | |||
143 | return 0; | ||
144 | } | ||
145 | |||
146 | return -EINVAL; | ||
147 | } | ||
148 | |||
113 | #if defined(CONFIG_PM) && !defined(CONFIG_GENERIC_CLOCKEVENTS) | 149 | #if defined(CONFIG_PM) && !defined(CONFIG_GENERIC_CLOCKEVENTS) |
114 | static int timer_suspend(void) | 150 | static int timer_suspend(void) |
115 | { | 151 | { |
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 778454750a6..3647170e9a1 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
@@ -479,14 +479,14 @@ static int bad_syscall(int n, struct pt_regs *regs) | |||
479 | return regs->ARM_r0; | 479 | return regs->ARM_r0; |
480 | } | 480 | } |
481 | 481 | ||
482 | static inline void | 482 | static inline int |
483 | do_cache_op(unsigned long start, unsigned long end, int flags) | 483 | do_cache_op(unsigned long start, unsigned long end, int flags) |
484 | { | 484 | { |
485 | struct mm_struct *mm = current->active_mm; | 485 | struct mm_struct *mm = current->active_mm; |
486 | struct vm_area_struct *vma; | 486 | struct vm_area_struct *vma; |
487 | 487 | ||
488 | if (end < start || flags) | 488 | if (end < start || flags) |
489 | return; | 489 | return -EINVAL; |
490 | 490 | ||
491 | down_read(&mm->mmap_sem); | 491 | down_read(&mm->mmap_sem); |
492 | vma = find_vma(mm, start); | 492 | vma = find_vma(mm, start); |
@@ -496,9 +496,11 @@ do_cache_op(unsigned long start, unsigned long end, int flags) | |||
496 | if (end > vma->vm_end) | 496 | if (end > vma->vm_end) |
497 | end = vma->vm_end; | 497 | end = vma->vm_end; |
498 | 498 | ||
499 | flush_cache_user_range(vma, start, end); | 499 | up_read(&mm->mmap_sem); |
500 | return flush_cache_user_range(start, end); | ||
500 | } | 501 | } |
501 | up_read(&mm->mmap_sem); | 502 | up_read(&mm->mmap_sem); |
503 | return -EINVAL; | ||
502 | } | 504 | } |
503 | 505 | ||
504 | /* | 506 | /* |
@@ -544,8 +546,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) | |||
544 | * the specified region). | 546 | * the specified region). |
545 | */ | 547 | */ |
546 | case NR(cacheflush): | 548 | case NR(cacheflush): |
547 | do_cache_op(regs->ARM_r0, regs->ARM_r1, regs->ARM_r2); | 549 | return do_cache_op(regs->ARM_r0, regs->ARM_r1, regs->ARM_r2); |
548 | return 0; | ||
549 | 550 | ||
550 | case NR(usr26): | 551 | case NR(usr26): |
551 | if (!(elf_hwcap & HWCAP_26BIT)) | 552 | if (!(elf_hwcap & HWCAP_26BIT)) |
diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index 0ade0acc1ed..992769ae259 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile | |||
@@ -17,30 +17,13 @@ lib-y := backtrace.o changebit.o csumipv6.o csumpartial.o \ | |||
17 | call_with_stack.o | 17 | call_with_stack.o |
18 | 18 | ||
19 | mmu-y := clear_user.o copy_page.o getuser.o putuser.o | 19 | mmu-y := clear_user.o copy_page.o getuser.o putuser.o |
20 | 20 | mmu-y += copy_from_user.o copy_to_user.o | |
21 | # the code in uaccess.S is not preemption safe and | ||
22 | # probably faster on ARMv3 only | ||
23 | ifeq ($(CONFIG_PREEMPT),y) | ||
24 | mmu-y += copy_from_user.o copy_to_user.o | ||
25 | else | ||
26 | ifneq ($(CONFIG_CPU_32v3),y) | ||
27 | mmu-y += copy_from_user.o copy_to_user.o | ||
28 | else | ||
29 | mmu-y += uaccess.o | ||
30 | endif | ||
31 | endif | ||
32 | 21 | ||
33 | # using lib_ here won't override already available weak symbols | 22 | # using lib_ here won't override already available weak symbols |
34 | obj-$(CONFIG_UACCESS_WITH_MEMCPY) += uaccess_with_memcpy.o | 23 | obj-$(CONFIG_UACCESS_WITH_MEMCPY) += uaccess_with_memcpy.o |
35 | 24 | ||
36 | lib-$(CONFIG_MMU) += $(mmu-y) | 25 | lib-$(CONFIG_MMU) += $(mmu-y) |
37 | 26 | lib-y += io-readsw-armv4.o io-writesw-armv4.o | |
38 | ifeq ($(CONFIG_CPU_32v3),y) | ||
39 | lib-y += io-readsw-armv3.o io-writesw-armv3.o | ||
40 | else | ||
41 | lib-y += io-readsw-armv4.o io-writesw-armv4.o | ||
42 | endif | ||
43 | |||
44 | lib-$(CONFIG_ARCH_RPC) += ecard.o io-acorn.o floppydma.o | 27 | lib-$(CONFIG_ARCH_RPC) += ecard.o io-acorn.o floppydma.o |
45 | lib-$(CONFIG_ARCH_SHARK) += io-shark.o | 28 | lib-$(CONFIG_ARCH_SHARK) += io-shark.o |
46 | 29 | ||
diff --git a/arch/arm/lib/io-readsw-armv3.S b/arch/arm/lib/io-readsw-armv3.S deleted file mode 100644 index 88487c8c4f2..00000000000 --- a/arch/arm/lib/io-readsw-armv3.S +++ /dev/null | |||
@@ -1,106 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/lib/io-readsw-armv3.S | ||
3 | * | ||
4 | * Copyright (C) 1995-2000 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #include <linux/linkage.h> | ||
11 | #include <asm/assembler.h> | ||
12 | |||
13 | .Linsw_bad_alignment: | ||
14 | adr r0, .Linsw_bad_align_msg | ||
15 | mov r2, lr | ||
16 | b panic | ||
17 | .Linsw_bad_align_msg: | ||
18 | .asciz "insw: bad buffer alignment (0x%p, lr=0x%08lX)\n" | ||
19 | .align | ||
20 | |||
21 | .Linsw_align: tst r1, #1 | ||
22 | bne .Linsw_bad_alignment | ||
23 | |||
24 | ldr r3, [r0] | ||
25 | strb r3, [r1], #1 | ||
26 | mov r3, r3, lsr #8 | ||
27 | strb r3, [r1], #1 | ||
28 | |||
29 | subs r2, r2, #1 | ||
30 | moveq pc, lr | ||
31 | |||
32 | ENTRY(__raw_readsw) | ||
33 | teq r2, #0 @ do we have to check for the zero len? | ||
34 | moveq pc, lr | ||
35 | tst r1, #3 | ||
36 | bne .Linsw_align | ||
37 | |||
38 | .Linsw_aligned: mov ip, #0xff | ||
39 | orr ip, ip, ip, lsl #8 | ||
40 | stmfd sp!, {r4, r5, r6, lr} | ||
41 | |||
42 | subs r2, r2, #8 | ||
43 | bmi .Lno_insw_8 | ||
44 | |||
45 | .Linsw_8_lp: ldr r3, [r0] | ||
46 | and r3, r3, ip | ||
47 | ldr r4, [r0] | ||
48 | orr r3, r3, r4, lsl #16 | ||
49 | |||
50 | ldr r4, [r0] | ||
51 | and r4, r4, ip | ||
52 | ldr r5, [r0] | ||
53 | orr r4, r4, r5, lsl #16 | ||
54 | |||
55 | ldr r5, [r0] | ||
56 | and r5, r5, ip | ||
57 | ldr r6, [r0] | ||
58 | orr r5, r5, r6, lsl #16 | ||
59 | |||
60 | ldr r6, [r0] | ||
61 | and r6, r6, ip | ||
62 | ldr lr, [r0] | ||
63 | orr r6, r6, lr, lsl #16 | ||
64 | |||
65 | stmia r1!, {r3 - r6} | ||
66 | |||
67 | subs r2, r2, #8 | ||
68 | bpl .Linsw_8_lp | ||
69 | |||
70 | tst r2, #7 | ||
71 | ldmeqfd sp!, {r4, r5, r6, pc} | ||
72 | |||
73 | .Lno_insw_8: tst r2, #4 | ||
74 | beq .Lno_insw_4 | ||
75 | |||
76 | ldr r3, [r0] | ||
77 | and r3, r3, ip | ||
78 | ldr r4, [r0] | ||
79 | orr r3, r3, r4, lsl #16 | ||
80 | |||
81 | ldr r4, [r0] | ||
82 | and r4, r4, ip | ||
83 | ldr r5, [r0] | ||
84 | orr r4, r4, r5, lsl #16 | ||
85 | |||
86 | stmia r1!, {r3, r4} | ||
87 | |||
88 | .Lno_insw_4: tst r2, #2 | ||
89 | beq .Lno_insw_2 | ||
90 | |||
91 | ldr r3, [r0] | ||
92 | and r3, r3, ip | ||
93 | ldr r4, [r0] | ||
94 | orr r3, r3, r4, lsl #16 | ||
95 | |||
96 | str r3, [r1], #4 | ||
97 | |||
98 | .Lno_insw_2: tst r2, #1 | ||
99 | ldrne r3, [r0] | ||
100 | strneb r3, [r1], #1 | ||
101 | movne r3, r3, lsr #8 | ||
102 | strneb r3, [r1] | ||
103 | |||
104 | ldmfd sp!, {r4, r5, r6, pc} | ||
105 | |||
106 | |||
diff --git a/arch/arm/lib/io-writesw-armv3.S b/arch/arm/lib/io-writesw-armv3.S deleted file mode 100644 index 49b800419e3..00000000000 --- a/arch/arm/lib/io-writesw-armv3.S +++ /dev/null | |||
@@ -1,126 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/lib/io-writesw-armv3.S | ||
3 | * | ||
4 | * Copyright (C) 1995-2000 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #include <linux/linkage.h> | ||
11 | #include <asm/assembler.h> | ||
12 | |||
13 | .Loutsw_bad_alignment: | ||
14 | adr r0, .Loutsw_bad_align_msg | ||
15 | mov r2, lr | ||
16 | b panic | ||
17 | .Loutsw_bad_align_msg: | ||
18 | .asciz "outsw: bad buffer alignment (0x%p, lr=0x%08lX)\n" | ||
19 | .align | ||
20 | |||
21 | .Loutsw_align: tst r1, #1 | ||
22 | bne .Loutsw_bad_alignment | ||
23 | |||
24 | add r1, r1, #2 | ||
25 | |||
26 | ldr r3, [r1, #-4] | ||
27 | mov r3, r3, lsr #16 | ||
28 | orr r3, r3, r3, lsl #16 | ||
29 | str r3, [r0] | ||
30 | subs r2, r2, #1 | ||
31 | moveq pc, lr | ||
32 | |||
33 | ENTRY(__raw_writesw) | ||
34 | teq r2, #0 @ do we have to check for the zero len? | ||
35 | moveq pc, lr | ||
36 | tst r1, #3 | ||
37 | bne .Loutsw_align | ||
38 | |||
39 | stmfd sp!, {r4, r5, r6, lr} | ||
40 | |||
41 | subs r2, r2, #8 | ||
42 | bmi .Lno_outsw_8 | ||
43 | |||
44 | .Loutsw_8_lp: ldmia r1!, {r3, r4, r5, r6} | ||
45 | |||
46 | mov ip, r3, lsl #16 | ||
47 | orr ip, ip, ip, lsr #16 | ||
48 | str ip, [r0] | ||
49 | |||
50 | mov ip, r3, lsr #16 | ||
51 | orr ip, ip, ip, lsl #16 | ||
52 | str ip, [r0] | ||
53 | |||
54 | mov ip, r4, lsl #16 | ||
55 | orr ip, ip, ip, lsr #16 | ||
56 | str ip, [r0] | ||
57 | |||
58 | mov ip, r4, lsr #16 | ||
59 | orr ip, ip, ip, lsl #16 | ||
60 | str ip, [r0] | ||
61 | |||
62 | mov ip, r5, lsl #16 | ||
63 | orr ip, ip, ip, lsr #16 | ||
64 | str ip, [r0] | ||
65 | |||
66 | mov ip, r5, lsr #16 | ||
67 | orr ip, ip, ip, lsl #16 | ||
68 | str ip, [r0] | ||
69 | |||
70 | mov ip, r6, lsl #16 | ||
71 | orr ip, ip, ip, lsr #16 | ||
72 | str ip, [r0] | ||
73 | |||
74 | mov ip, r6, lsr #16 | ||
75 | orr ip, ip, ip, lsl #16 | ||
76 | str ip, [r0] | ||
77 | |||
78 | subs r2, r2, #8 | ||
79 | bpl .Loutsw_8_lp | ||
80 | |||
81 | tst r2, #7 | ||
82 | ldmeqfd sp!, {r4, r5, r6, pc} | ||
83 | |||
84 | .Lno_outsw_8: tst r2, #4 | ||
85 | beq .Lno_outsw_4 | ||
86 | |||
87 | ldmia r1!, {r3, r4} | ||
88 | |||
89 | mov ip, r3, lsl #16 | ||
90 | orr ip, ip, ip, lsr #16 | ||
91 | str ip, [r0] | ||
92 | |||
93 | mov ip, r3, lsr #16 | ||
94 | orr ip, ip, ip, lsl #16 | ||
95 | str ip, [r0] | ||
96 | |||
97 | mov ip, r4, lsl #16 | ||
98 | orr ip, ip, ip, lsr #16 | ||
99 | str ip, [r0] | ||
100 | |||
101 | mov ip, r4, lsr #16 | ||
102 | orr ip, ip, ip, lsl #16 | ||
103 | str ip, [r0] | ||
104 | |||
105 | .Lno_outsw_4: tst r2, #2 | ||
106 | beq .Lno_outsw_2 | ||
107 | |||
108 | ldr r3, [r1], #4 | ||
109 | |||
110 | mov ip, r3, lsl #16 | ||
111 | orr ip, ip, ip, lsr #16 | ||
112 | str ip, [r0] | ||
113 | |||
114 | mov ip, r3, lsr #16 | ||
115 | orr ip, ip, ip, lsl #16 | ||
116 | str ip, [r0] | ||
117 | |||
118 | .Lno_outsw_2: tst r2, #1 | ||
119 | |||
120 | ldrne r3, [r1] | ||
121 | |||
122 | movne ip, r3, lsl #16 | ||
123 | orrne ip, ip, ip, lsr #16 | ||
124 | strne ip, [r0] | ||
125 | |||
126 | ldmfd sp!, {r4, r5, r6, pc} | ||
diff --git a/arch/arm/lib/uaccess.S b/arch/arm/lib/uaccess.S deleted file mode 100644 index 5c908b1cb8e..00000000000 --- a/arch/arm/lib/uaccess.S +++ /dev/null | |||
@@ -1,564 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/lib/uaccess.S | ||
3 | * | ||
4 | * Copyright (C) 1995, 1996,1997,1998 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * Routines to block copy data to/from user memory | ||
11 | * These are highly optimised both for the 4k page size | ||
12 | * and for various alignments. | ||
13 | */ | ||
14 | #include <linux/linkage.h> | ||
15 | #include <asm/assembler.h> | ||
16 | #include <asm/errno.h> | ||
17 | #include <asm/domain.h> | ||
18 | |||
19 | .text | ||
20 | |||
21 | #define PAGE_SHIFT 12 | ||
22 | |||
23 | /* Prototype: int __copy_to_user(void *to, const char *from, size_t n) | ||
24 | * Purpose : copy a block to user memory from kernel memory | ||
25 | * Params : to - user memory | ||
26 | * : from - kernel memory | ||
27 | * : n - number of bytes to copy | ||
28 | * Returns : Number of bytes NOT copied. | ||
29 | */ | ||
30 | |||
31 | .Lc2u_dest_not_aligned: | ||
32 | rsb ip, ip, #4 | ||
33 | cmp ip, #2 | ||
34 | ldrb r3, [r1], #1 | ||
35 | USER( TUSER( strb) r3, [r0], #1) @ May fault | ||
36 | ldrgeb r3, [r1], #1 | ||
37 | USER( TUSER( strgeb) r3, [r0], #1) @ May fault | ||
38 | ldrgtb r3, [r1], #1 | ||
39 | USER( TUSER( strgtb) r3, [r0], #1) @ May fault | ||
40 | sub r2, r2, ip | ||
41 | b .Lc2u_dest_aligned | ||
42 | |||
43 | ENTRY(__copy_to_user) | ||
44 | stmfd sp!, {r2, r4 - r7, lr} | ||
45 | cmp r2, #4 | ||
46 | blt .Lc2u_not_enough | ||
47 | ands ip, r0, #3 | ||
48 | bne .Lc2u_dest_not_aligned | ||
49 | .Lc2u_dest_aligned: | ||
50 | |||
51 | ands ip, r1, #3 | ||
52 | bne .Lc2u_src_not_aligned | ||
53 | /* | ||
54 | * Seeing as there has to be at least 8 bytes to copy, we can | ||
55 | * copy one word, and force a user-mode page fault... | ||
56 | */ | ||
57 | |||
58 | .Lc2u_0fupi: subs r2, r2, #4 | ||
59 | addmi ip, r2, #4 | ||
60 | bmi .Lc2u_0nowords | ||
61 | ldr r3, [r1], #4 | ||
62 | USER( TUSER( str) r3, [r0], #4) @ May fault | ||
63 | mov ip, r0, lsl #32 - PAGE_SHIFT @ On each page, use a ld/st??t instruction | ||
64 | rsb ip, ip, #0 | ||
65 | movs ip, ip, lsr #32 - PAGE_SHIFT | ||
66 | beq .Lc2u_0fupi | ||
67 | /* | ||
68 | * ip = max no. of bytes to copy before needing another "strt" insn | ||
69 | */ | ||
70 | cmp r2, ip | ||
71 | movlt ip, r2 | ||
72 | sub r2, r2, ip | ||
73 | subs ip, ip, #32 | ||
74 | blt .Lc2u_0rem8lp | ||
75 | |||
76 | .Lc2u_0cpy8lp: ldmia r1!, {r3 - r6} | ||
77 | stmia r0!, {r3 - r6} @ Shouldnt fault | ||
78 | ldmia r1!, {r3 - r6} | ||
79 | subs ip, ip, #32 | ||
80 | stmia r0!, {r3 - r6} @ Shouldnt fault | ||
81 | bpl .Lc2u_0cpy8lp | ||
82 | |||
83 | .Lc2u_0rem8lp: cmn ip, #16 | ||
84 | ldmgeia r1!, {r3 - r6} | ||
85 | stmgeia r0!, {r3 - r6} @ Shouldnt fault | ||
86 | tst ip, #8 | ||
87 | ldmneia r1!, {r3 - r4} | ||
88 | stmneia r0!, {r3 - r4} @ Shouldnt fault | ||
89 | tst ip, #4 | ||
90 | ldrne r3, [r1], #4 | ||
91 | TUSER( strne) r3, [r0], #4 @ Shouldnt fault | ||
92 | ands ip, ip, #3 | ||
93 | beq .Lc2u_0fupi | ||
94 | .Lc2u_0nowords: teq ip, #0 | ||
95 | beq .Lc2u_finished | ||
96 | .Lc2u_nowords: cmp ip, #2 | ||
97 | ldrb r3, [r1], #1 | ||
98 | USER( TUSER( strb) r3, [r0], #1) @ May fault | ||
99 | ldrgeb r3, [r1], #1 | ||
100 | USER( TUSER( strgeb) r3, [r0], #1) @ May fault | ||
101 | ldrgtb r3, [r1], #1 | ||
102 | USER( TUSER( strgtb) r3, [r0], #1) @ May fault | ||
103 | b .Lc2u_finished | ||
104 | |||
105 | .Lc2u_not_enough: | ||
106 | movs ip, r2 | ||
107 | bne .Lc2u_nowords | ||
108 | .Lc2u_finished: mov r0, #0 | ||
109 | ldmfd sp!, {r2, r4 - r7, pc} | ||
110 | |||
111 | .Lc2u_src_not_aligned: | ||
112 | bic r1, r1, #3 | ||
113 | ldr r7, [r1], #4 | ||
114 | cmp ip, #2 | ||
115 | bgt .Lc2u_3fupi | ||
116 | beq .Lc2u_2fupi | ||
117 | .Lc2u_1fupi: subs r2, r2, #4 | ||
118 | addmi ip, r2, #4 | ||
119 | bmi .Lc2u_1nowords | ||
120 | mov r3, r7, pull #8 | ||
121 | ldr r7, [r1], #4 | ||
122 | orr r3, r3, r7, push #24 | ||
123 | USER( TUSER( str) r3, [r0], #4) @ May fault | ||
124 | mov ip, r0, lsl #32 - PAGE_SHIFT | ||
125 | rsb ip, ip, #0 | ||
126 | movs ip, ip, lsr #32 - PAGE_SHIFT | ||
127 | beq .Lc2u_1fupi | ||
128 | cmp r2, ip | ||
129 | movlt ip, r2 | ||
130 | sub r2, r2, ip | ||
131 | subs ip, ip, #16 | ||
132 | blt .Lc2u_1rem8lp | ||
133 | |||
134 | .Lc2u_1cpy8lp: mov r3, r7, pull #8 | ||
135 | ldmia r1!, {r4 - r7} | ||
136 | subs ip, ip, #16 | ||
137 | orr r3, r3, r4, push #24 | ||
138 | mov r4, r4, pull #8 | ||
139 | orr r4, r4, r5, push #24 | ||
140 | mov r5, r5, pull #8 | ||
141 | orr r5, r5, r6, push #24 | ||
142 | mov r6, r6, pull #8 | ||
143 | orr r6, r6, r7, push #24 | ||
144 | stmia r0!, {r3 - r6} @ Shouldnt fault | ||
145 | bpl .Lc2u_1cpy8lp | ||
146 | |||
147 | .Lc2u_1rem8lp: tst ip, #8 | ||
148 | movne r3, r7, pull #8 | ||
149 | ldmneia r1!, {r4, r7} | ||
150 | orrne r3, r3, r4, push #24 | ||
151 | movne r4, r4, pull #8 | ||
152 | orrne r4, r4, r7, push #24 | ||
153 | stmneia r0!, {r3 - r4} @ Shouldnt fault | ||
154 | tst ip, #4 | ||
155 | movne r3, r7, pull #8 | ||
156 | ldrne r7, [r1], #4 | ||
157 | orrne r3, r3, r7, push #24 | ||
158 | TUSER( strne) r3, [r0], #4 @ Shouldnt fault | ||
159 | ands ip, ip, #3 | ||
160 | beq .Lc2u_1fupi | ||
161 | .Lc2u_1nowords: mov r3, r7, get_byte_1 | ||
162 | teq ip, #0 | ||
163 | beq .Lc2u_finished | ||
164 | cmp ip, #2 | ||
165 | USER( TUSER( strb) r3, [r0], #1) @ May fault | ||
166 | movge r3, r7, get_byte_2 | ||
167 | USER( TUSER( strgeb) r3, [r0], #1) @ May fault | ||
168 | movgt r3, r7, get_byte_3 | ||
169 | USER( TUSER( strgtb) r3, [r0], #1) @ May fault | ||
170 | b .Lc2u_finished | ||
171 | |||
172 | .Lc2u_2fupi: subs r2, r2, #4 | ||
173 | addmi ip, r2, #4 | ||
174 | bmi .Lc2u_2nowords | ||
175 | mov r3, r7, pull #16 | ||
176 | ldr r7, [r1], #4 | ||
177 | orr r3, r3, r7, push #16 | ||
178 | USER( TUSER( str) r3, [r0], #4) @ May fault | ||
179 | mov ip, r0, lsl #32 - PAGE_SHIFT | ||
180 | rsb ip, ip, #0 | ||
181 | movs ip, ip, lsr #32 - PAGE_SHIFT | ||
182 | beq .Lc2u_2fupi | ||
183 | cmp r2, ip | ||
184 | movlt ip, r2 | ||
185 | sub r2, r2, ip | ||
186 | subs ip, ip, #16 | ||
187 | blt .Lc2u_2rem8lp | ||
188 | |||
189 | .Lc2u_2cpy8lp: mov r3, r7, pull #16 | ||
190 | ldmia r1!, {r4 - r7} | ||
191 | subs ip, ip, #16 | ||
192 | orr r3, r3, r4, push #16 | ||
193 | mov r4, r4, pull #16 | ||
194 | orr r4, r4, r5, push #16 | ||
195 | mov r5, r5, pull #16 | ||
196 | orr r5, r5, r6, push #16 | ||
197 | mov r6, r6, pull #16 | ||
198 | orr r6, r6, r7, push #16 | ||
199 | stmia r0!, {r3 - r6} @ Shouldnt fault | ||
200 | bpl .Lc2u_2cpy8lp | ||
201 | |||
202 | .Lc2u_2rem8lp: tst ip, #8 | ||
203 | movne r3, r7, pull #16 | ||
204 | ldmneia r1!, {r4, r7} | ||
205 | orrne r3, r3, r4, push #16 | ||
206 | movne r4, r4, pull #16 | ||
207 | orrne r4, r4, r7, push #16 | ||
208 | stmneia r0!, {r3 - r4} @ Shouldnt fault | ||
209 | tst ip, #4 | ||
210 | movne r3, r7, pull #16 | ||
211 | ldrne r7, [r1], #4 | ||
212 | orrne r3, r3, r7, push #16 | ||
213 | TUSER( strne) r3, [r0], #4 @ Shouldnt fault | ||
214 | ands ip, ip, #3 | ||
215 | beq .Lc2u_2fupi | ||
216 | .Lc2u_2nowords: mov r3, r7, get_byte_2 | ||
217 | teq ip, #0 | ||
218 | beq .Lc2u_finished | ||
219 | cmp ip, #2 | ||
220 | USER( TUSER( strb) r3, [r0], #1) @ May fault | ||
221 | movge r3, r7, get_byte_3 | ||
222 | USER( TUSER( strgeb) r3, [r0], #1) @ May fault | ||
223 | ldrgtb r3, [r1], #0 | ||
224 | USER( TUSER( strgtb) r3, [r0], #1) @ May fault | ||
225 | b .Lc2u_finished | ||
226 | |||
227 | .Lc2u_3fupi: subs r2, r2, #4 | ||
228 | addmi ip, r2, #4 | ||
229 | bmi .Lc2u_3nowords | ||
230 | mov r3, r7, pull #24 | ||
231 | ldr r7, [r1], #4 | ||
232 | orr r3, r3, r7, push #8 | ||
233 | USER( TUSER( str) r3, [r0], #4) @ May fault | ||
234 | mov ip, r0, lsl #32 - PAGE_SHIFT | ||
235 | rsb ip, ip, #0 | ||
236 | movs ip, ip, lsr #32 - PAGE_SHIFT | ||
237 | beq .Lc2u_3fupi | ||
238 | cmp r2, ip | ||
239 | movlt ip, r2 | ||
240 | sub r2, r2, ip | ||
241 | subs ip, ip, #16 | ||
242 | blt .Lc2u_3rem8lp | ||
243 | |||
244 | .Lc2u_3cpy8lp: mov r3, r7, pull #24 | ||
245 | ldmia r1!, {r4 - r7} | ||
246 | subs ip, ip, #16 | ||
247 | orr r3, r3, r4, push #8 | ||
248 | mov r4, r4, pull #24 | ||
249 | orr r4, r4, r5, push #8 | ||
250 | mov r5, r5, pull #24 | ||
251 | orr r5, r5, r6, push #8 | ||
252 | mov r6, r6, pull #24 | ||
253 | orr r6, r6, r7, push #8 | ||
254 | stmia r0!, {r3 - r6} @ Shouldnt fault | ||
255 | bpl .Lc2u_3cpy8lp | ||
256 | |||
257 | .Lc2u_3rem8lp: tst ip, #8 | ||
258 | movne r3, r7, pull #24 | ||
259 | ldmneia r1!, {r4, r7} | ||
260 | orrne r3, r3, r4, push #8 | ||
261 | movne r4, r4, pull #24 | ||
262 | orrne r4, r4, r7, push #8 | ||
263 | stmneia r0!, {r3 - r4} @ Shouldnt fault | ||
264 | tst ip, #4 | ||
265 | movne r3, r7, pull #24 | ||
266 | ldrne r7, [r1], #4 | ||
267 | orrne r3, r3, r7, push #8 | ||
268 | TUSER( strne) r3, [r0], #4 @ Shouldnt fault | ||
269 | ands ip, ip, #3 | ||
270 | beq .Lc2u_3fupi | ||
271 | .Lc2u_3nowords: mov r3, r7, get_byte_3 | ||
272 | teq ip, #0 | ||
273 | beq .Lc2u_finished | ||
274 | cmp ip, #2 | ||
275 | USER( TUSER( strb) r3, [r0], #1) @ May fault | ||
276 | ldrgeb r3, [r1], #1 | ||
277 | USER( TUSER( strgeb) r3, [r0], #1) @ May fault | ||
278 | ldrgtb r3, [r1], #0 | ||
279 | USER( TUSER( strgtb) r3, [r0], #1) @ May fault | ||
280 | b .Lc2u_finished | ||
281 | ENDPROC(__copy_to_user) | ||
282 | |||
283 | .pushsection .fixup,"ax" | ||
284 | .align 0 | ||
285 | 9001: ldmfd sp!, {r0, r4 - r7, pc} | ||
286 | .popsection | ||
287 | |||
288 | /* Prototype: unsigned long __copy_from_user(void *to,const void *from,unsigned long n); | ||
289 | * Purpose : copy a block from user memory to kernel memory | ||
290 | * Params : to - kernel memory | ||
291 | * : from - user memory | ||
292 | * : n - number of bytes to copy | ||
293 | * Returns : Number of bytes NOT copied. | ||
294 | */ | ||
295 | .Lcfu_dest_not_aligned: | ||
296 | rsb ip, ip, #4 | ||
297 | cmp ip, #2 | ||
298 | USER( TUSER( ldrb) r3, [r1], #1) @ May fault | ||
299 | strb r3, [r0], #1 | ||
300 | USER( TUSER( ldrgeb) r3, [r1], #1) @ May fault | ||
301 | strgeb r3, [r0], #1 | ||
302 | USER( TUSER( ldrgtb) r3, [r1], #1) @ May fault | ||
303 | strgtb r3, [r0], #1 | ||
304 | sub r2, r2, ip | ||
305 | b .Lcfu_dest_aligned | ||
306 | |||
307 | ENTRY(__copy_from_user) | ||
308 | stmfd sp!, {r0, r2, r4 - r7, lr} | ||
309 | cmp r2, #4 | ||
310 | blt .Lcfu_not_enough | ||
311 | ands ip, r0, #3 | ||
312 | bne .Lcfu_dest_not_aligned | ||
313 | .Lcfu_dest_aligned: | ||
314 | ands ip, r1, #3 | ||
315 | bne .Lcfu_src_not_aligned | ||
316 | |||
317 | /* | ||
318 | * Seeing as there has to be at least 8 bytes to copy, we can | ||
319 | * copy one word, and force a user-mode page fault... | ||
320 | */ | ||
321 | |||
322 | .Lcfu_0fupi: subs r2, r2, #4 | ||
323 | addmi ip, r2, #4 | ||
324 | bmi .Lcfu_0nowords | ||
325 | USER( TUSER( ldr) r3, [r1], #4) | ||
326 | str r3, [r0], #4 | ||
327 | mov ip, r1, lsl #32 - PAGE_SHIFT @ On each page, use a ld/st??t instruction | ||
328 | rsb ip, ip, #0 | ||
329 | movs ip, ip, lsr #32 - PAGE_SHIFT | ||
330 | beq .Lcfu_0fupi | ||
331 | /* | ||
332 | * ip = max no. of bytes to copy before needing another "strt" insn | ||
333 | */ | ||
334 | cmp r2, ip | ||
335 | movlt ip, r2 | ||
336 | sub r2, r2, ip | ||
337 | subs ip, ip, #32 | ||
338 | blt .Lcfu_0rem8lp | ||
339 | |||
340 | .Lcfu_0cpy8lp: ldmia r1!, {r3 - r6} @ Shouldnt fault | ||
341 | stmia r0!, {r3 - r6} | ||
342 | ldmia r1!, {r3 - r6} @ Shouldnt fault | ||
343 | subs ip, ip, #32 | ||
344 | stmia r0!, {r3 - r6} | ||
345 | bpl .Lcfu_0cpy8lp | ||
346 | |||
347 | .Lcfu_0rem8lp: cmn ip, #16 | ||
348 | ldmgeia r1!, {r3 - r6} @ Shouldnt fault | ||
349 | stmgeia r0!, {r3 - r6} | ||
350 | tst ip, #8 | ||
351 | ldmneia r1!, {r3 - r4} @ Shouldnt fault | ||
352 | stmneia r0!, {r3 - r4} | ||
353 | tst ip, #4 | ||
354 | TUSER( ldrne) r3, [r1], #4 @ Shouldnt fault | ||
355 | strne r3, [r0], #4 | ||
356 | ands ip, ip, #3 | ||
357 | beq .Lcfu_0fupi | ||
358 | .Lcfu_0nowords: teq ip, #0 | ||
359 | beq .Lcfu_finished | ||
360 | .Lcfu_nowords: cmp ip, #2 | ||
361 | USER( TUSER( ldrb) r3, [r1], #1) @ May fault | ||
362 | strb r3, [r0], #1 | ||
363 | USER( TUSER( ldrgeb) r3, [r1], #1) @ May fault | ||
364 | strgeb r3, [r0], #1 | ||
365 | USER( TUSER( ldrgtb) r3, [r1], #1) @ May fault | ||
366 | strgtb r3, [r0], #1 | ||
367 | b .Lcfu_finished | ||
368 | |||
369 | .Lcfu_not_enough: | ||
370 | movs ip, r2 | ||
371 | bne .Lcfu_nowords | ||
372 | .Lcfu_finished: mov r0, #0 | ||
373 | add sp, sp, #8 | ||
374 | ldmfd sp!, {r4 - r7, pc} | ||
375 | |||
376 | .Lcfu_src_not_aligned: | ||
377 | bic r1, r1, #3 | ||
378 | USER( TUSER( ldr) r7, [r1], #4) @ May fault | ||
379 | cmp ip, #2 | ||
380 | bgt .Lcfu_3fupi | ||
381 | beq .Lcfu_2fupi | ||
382 | .Lcfu_1fupi: subs r2, r2, #4 | ||
383 | addmi ip, r2, #4 | ||
384 | bmi .Lcfu_1nowords | ||
385 | mov r3, r7, pull #8 | ||
386 | USER( TUSER( ldr) r7, [r1], #4) @ May fault | ||
387 | orr r3, r3, r7, push #24 | ||
388 | str r3, [r0], #4 | ||
389 | mov ip, r1, lsl #32 - PAGE_SHIFT | ||
390 | rsb ip, ip, #0 | ||
391 | movs ip, ip, lsr #32 - PAGE_SHIFT | ||
392 | beq .Lcfu_1fupi | ||
393 | cmp r2, ip | ||
394 | movlt ip, r2 | ||
395 | sub r2, r2, ip | ||
396 | subs ip, ip, #16 | ||
397 | blt .Lcfu_1rem8lp | ||
398 | |||
399 | .Lcfu_1cpy8lp: mov r3, r7, pull #8 | ||
400 | ldmia r1!, {r4 - r7} @ Shouldnt fault | ||
401 | subs ip, ip, #16 | ||
402 | orr r3, r3, r4, push #24 | ||
403 | mov r4, r4, pull #8 | ||
404 | orr r4, r4, r5, push #24 | ||
405 | mov r5, r5, pull #8 | ||
406 | orr r5, r5, r6, push #24 | ||
407 | mov r6, r6, pull #8 | ||
408 | orr r6, r6, r7, push #24 | ||
409 | stmia r0!, {r3 - r6} | ||
410 | bpl .Lcfu_1cpy8lp | ||
411 | |||
412 | .Lcfu_1rem8lp: tst ip, #8 | ||
413 | movne r3, r7, pull #8 | ||
414 | ldmneia r1!, {r4, r7} @ Shouldnt fault | ||
415 | orrne r3, r3, r4, push #24 | ||
416 | movne r4, r4, pull #8 | ||
417 | orrne r4, r4, r7, push #24 | ||
418 | stmneia r0!, {r3 - r4} | ||
419 | tst ip, #4 | ||
420 | movne r3, r7, pull #8 | ||
421 | USER( TUSER( ldrne) r7, [r1], #4) @ May fault | ||
422 | orrne r3, r3, r7, push #24 | ||
423 | strne r3, [r0], #4 | ||
424 | ands ip, ip, #3 | ||
425 | beq .Lcfu_1fupi | ||
426 | .Lcfu_1nowords: mov r3, r7, get_byte_1 | ||
427 | teq ip, #0 | ||
428 | beq .Lcfu_finished | ||
429 | cmp ip, #2 | ||
430 | strb r3, [r0], #1 | ||
431 | movge r3, r7, get_byte_2 | ||
432 | strgeb r3, [r0], #1 | ||
433 | movgt r3, r7, get_byte_3 | ||
434 | strgtb r3, [r0], #1 | ||
435 | b .Lcfu_finished | ||
436 | |||
437 | .Lcfu_2fupi: subs r2, r2, #4 | ||
438 | addmi ip, r2, #4 | ||
439 | bmi .Lcfu_2nowords | ||
440 | mov r3, r7, pull #16 | ||
441 | USER( TUSER( ldr) r7, [r1], #4) @ May fault | ||
442 | orr r3, r3, r7, push #16 | ||
443 | str r3, [r0], #4 | ||
444 | mov ip, r1, lsl #32 - PAGE_SHIFT | ||
445 | rsb ip, ip, #0 | ||
446 | movs ip, ip, lsr #32 - PAGE_SHIFT | ||
447 | beq .Lcfu_2fupi | ||
448 | cmp r2, ip | ||
449 | movlt ip, r2 | ||
450 | sub r2, r2, ip | ||
451 | subs ip, ip, #16 | ||
452 | blt .Lcfu_2rem8lp | ||
453 | |||
454 | |||
455 | .Lcfu_2cpy8lp: mov r3, r7, pull #16 | ||
456 | ldmia r1!, {r4 - r7} @ Shouldnt fault | ||
457 | subs ip, ip, #16 | ||
458 | orr r3, r3, r4, push #16 | ||
459 | mov r4, r4, pull #16 | ||
460 | orr r4, r4, r5, push #16 | ||
461 | mov r5, r5, pull #16 | ||
462 | orr r5, r5, r6, push #16 | ||
463 | mov r6, r6, pull #16 | ||
464 | orr r6, r6, r7, push #16 | ||
465 | stmia r0!, {r3 - r6} | ||
466 | bpl .Lcfu_2cpy8lp | ||
467 | |||
468 | .Lcfu_2rem8lp: tst ip, #8 | ||
469 | movne r3, r7, pull #16 | ||
470 | ldmneia r1!, {r4, r7} @ Shouldnt fault | ||
471 | orrne r3, r3, r4, push #16 | ||
472 | movne r4, r4, pull #16 | ||
473 | orrne r4, r4, r7, push #16 | ||
474 | stmneia r0!, {r3 - r4} | ||
475 | tst ip, #4 | ||
476 | movne r3, r7, pull #16 | ||
477 | USER( TUSER( ldrne) r7, [r1], #4) @ May fault | ||
478 | orrne r3, r3, r7, push #16 | ||
479 | strne r3, [r0], #4 | ||
480 | ands ip, ip, #3 | ||
481 | beq .Lcfu_2fupi | ||
482 | .Lcfu_2nowords: mov r3, r7, get_byte_2 | ||
483 | teq ip, #0 | ||
484 | beq .Lcfu_finished | ||
485 | cmp ip, #2 | ||
486 | strb r3, [r0], #1 | ||
487 | movge r3, r7, get_byte_3 | ||
488 | strgeb r3, [r0], #1 | ||
489 | USER( TUSER( ldrgtb) r3, [r1], #0) @ May fault | ||
490 | strgtb r3, [r0], #1 | ||
491 | b .Lcfu_finished | ||
492 | |||
493 | .Lcfu_3fupi: subs r2, r2, #4 | ||
494 | addmi ip, r2, #4 | ||
495 | bmi .Lcfu_3nowords | ||
496 | mov r3, r7, pull #24 | ||
497 | USER( TUSER( ldr) r7, [r1], #4) @ May fault | ||
498 | orr r3, r3, r7, push #8 | ||
499 | str r3, [r0], #4 | ||
500 | mov ip, r1, lsl #32 - PAGE_SHIFT | ||
501 | rsb ip, ip, #0 | ||
502 | movs ip, ip, lsr #32 - PAGE_SHIFT | ||
503 | beq .Lcfu_3fupi | ||
504 | cmp r2, ip | ||
505 | movlt ip, r2 | ||
506 | sub r2, r2, ip | ||
507 | subs ip, ip, #16 | ||
508 | blt .Lcfu_3rem8lp | ||
509 | |||
510 | .Lcfu_3cpy8lp: mov r3, r7, pull #24 | ||
511 | ldmia r1!, {r4 - r7} @ Shouldnt fault | ||
512 | orr r3, r3, r4, push #8 | ||
513 | mov r4, r4, pull #24 | ||
514 | orr r4, r4, r5, push #8 | ||
515 | mov r5, r5, pull #24 | ||
516 | orr r5, r5, r6, push #8 | ||
517 | mov r6, r6, pull #24 | ||
518 | orr r6, r6, r7, push #8 | ||
519 | stmia r0!, {r3 - r6} | ||
520 | subs ip, ip, #16 | ||
521 | bpl .Lcfu_3cpy8lp | ||
522 | |||
523 | .Lcfu_3rem8lp: tst ip, #8 | ||
524 | movne r3, r7, pull #24 | ||
525 | ldmneia r1!, {r4, r7} @ Shouldnt fault | ||
526 | orrne r3, r3, r4, push #8 | ||
527 | movne r4, r4, pull #24 | ||
528 | orrne r4, r4, r7, push #8 | ||
529 | stmneia r0!, {r3 - r4} | ||
530 | tst ip, #4 | ||
531 | movne r3, r7, pull #24 | ||
532 | USER( TUSER( ldrne) r7, [r1], #4) @ May fault | ||
533 | orrne r3, r3, r7, push #8 | ||
534 | strne r3, [r0], #4 | ||
535 | ands ip, ip, #3 | ||
536 | beq .Lcfu_3fupi | ||
537 | .Lcfu_3nowords: mov r3, r7, get_byte_3 | ||
538 | teq ip, #0 | ||
539 | beq .Lcfu_finished | ||
540 | cmp ip, #2 | ||
541 | strb r3, [r0], #1 | ||
542 | USER( TUSER( ldrgeb) r3, [r1], #1) @ May fault | ||
543 | strgeb r3, [r0], #1 | ||
544 | USER( TUSER( ldrgtb) r3, [r1], #1) @ May fault | ||
545 | strgtb r3, [r0], #1 | ||
546 | b .Lcfu_finished | ||
547 | ENDPROC(__copy_from_user) | ||
548 | |||
549 | .pushsection .fixup,"ax" | ||
550 | .align 0 | ||
551 | /* | ||
552 | * We took an exception. r0 contains a pointer to | ||
553 | * the byte not copied. | ||
554 | */ | ||
555 | 9001: ldr r2, [sp], #4 @ void *to | ||
556 | sub r2, r0, r2 @ bytes copied | ||
557 | ldr r1, [sp], #4 @ unsigned long count | ||
558 | subs r4, r1, r2 @ bytes left to copy | ||
559 | movne r1, r4 | ||
560 | blne __memzero | ||
561 | mov r0, r4 | ||
562 | ldmfd sp!, {r4 - r7, pc} | ||
563 | .popsection | ||
564 | |||
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index 45db05d8d94..98a42f3472d 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig | |||
@@ -9,15 +9,6 @@ config HAVE_AT91_DBGU0 | |||
9 | config HAVE_AT91_DBGU1 | 9 | config HAVE_AT91_DBGU1 |
10 | bool | 10 | bool |
11 | 11 | ||
12 | config HAVE_AT91_USART3 | ||
13 | bool | ||
14 | |||
15 | config HAVE_AT91_USART4 | ||
16 | bool | ||
17 | |||
18 | config HAVE_AT91_USART5 | ||
19 | bool | ||
20 | |||
21 | config AT91_SAM9_ALT_RESET | 12 | config AT91_SAM9_ALT_RESET |
22 | bool | 13 | bool |
23 | default !ARCH_AT91X40 | 14 | default !ARCH_AT91X40 |
@@ -26,87 +17,121 @@ config AT91_SAM9G45_RESET | |||
26 | bool | 17 | bool |
27 | default !ARCH_AT91X40 | 18 | default !ARCH_AT91X40 |
28 | 19 | ||
20 | config SOC_AT91SAM9 | ||
21 | bool | ||
22 | select GENERIC_CLOCKEVENTS | ||
23 | select CPU_ARM926T | ||
24 | |||
29 | menu "Atmel AT91 System-on-Chip" | 25 | menu "Atmel AT91 System-on-Chip" |
30 | 26 | ||
31 | choice | 27 | comment "Atmel AT91 Processor" |
32 | prompt "Atmel AT91 Processor" | ||
33 | 28 | ||
34 | config ARCH_AT91RM9200 | 29 | config SOC_AT91SAM9 |
30 | bool | ||
31 | select CPU_ARM926T | ||
32 | select AT91_SAM9_TIME | ||
33 | select AT91_SAM9_SMC | ||
34 | |||
35 | config SOC_AT91RM9200 | ||
35 | bool "AT91RM9200" | 36 | bool "AT91RM9200" |
36 | select CPU_ARM920T | 37 | select CPU_ARM920T |
37 | select GENERIC_CLOCKEVENTS | 38 | select GENERIC_CLOCKEVENTS |
38 | select HAVE_AT91_DBGU0 | 39 | select HAVE_AT91_DBGU0 |
39 | select HAVE_AT91_USART3 | ||
40 | 40 | ||
41 | config ARCH_AT91SAM9260 | 41 | config SOC_AT91SAM9260 |
42 | bool "AT91SAM9260 or AT91SAM9XE" | 42 | bool "AT91SAM9260, AT91SAM9XE or AT91SAM9G20" |
43 | select CPU_ARM926T | 43 | select SOC_AT91SAM9 |
44 | select GENERIC_CLOCKEVENTS | ||
45 | select HAVE_AT91_DBGU0 | 44 | select HAVE_AT91_DBGU0 |
46 | select HAVE_AT91_USART3 | ||
47 | select HAVE_AT91_USART4 | ||
48 | select HAVE_AT91_USART5 | ||
49 | select HAVE_NET_MACB | 45 | select HAVE_NET_MACB |
46 | help | ||
47 | Select this if you are using one of Atmel's AT91SAM9260, AT91SAM9XE | ||
48 | or AT91SAM9G20 SoC. | ||
50 | 49 | ||
51 | config ARCH_AT91SAM9261 | 50 | config SOC_AT91SAM9261 |
52 | bool "AT91SAM9261" | 51 | bool "AT91SAM9261 or AT91SAM9G10" |
53 | select CPU_ARM926T | 52 | select SOC_AT91SAM9 |
54 | select GENERIC_CLOCKEVENTS | 53 | select HAVE_AT91_DBGU0 |
55 | select HAVE_FB_ATMEL | 54 | select HAVE_FB_ATMEL |
55 | help | ||
56 | Select this if you are using one of Atmel's AT91SAM9261 or AT91SAM9G10 SoC. | ||
57 | |||
58 | config SOC_AT91SAM9263 | ||
59 | bool "AT91SAM9263" | ||
60 | select SOC_AT91SAM9 | ||
61 | select HAVE_AT91_DBGU1 | ||
62 | select HAVE_FB_ATMEL | ||
63 | select HAVE_NET_MACB | ||
64 | |||
65 | config SOC_AT91SAM9RL | ||
66 | bool "AT91SAM9RL" | ||
67 | select SOC_AT91SAM9 | ||
56 | select HAVE_AT91_DBGU0 | 68 | select HAVE_AT91_DBGU0 |
69 | select HAVE_FB_ATMEL | ||
57 | 70 | ||
58 | config ARCH_AT91SAM9G10 | 71 | config SOC_AT91SAM9G45 |
59 | bool "AT91SAM9G10" | 72 | bool "AT91SAM9G45 or AT91SAM9M10 families" |
60 | select CPU_ARM926T | 73 | select SOC_AT91SAM9 |
61 | select GENERIC_CLOCKEVENTS | 74 | select HAVE_AT91_DBGU1 |
75 | select HAVE_FB_ATMEL | ||
76 | select HAVE_NET_MACB | ||
77 | help | ||
78 | Select this if you are using one of Atmel's AT91SAM9G45 family SoC. | ||
79 | This support covers AT91SAM9G45, AT91SAM9G46, AT91SAM9M10 and AT91SAM9M11. | ||
80 | |||
81 | config SOC_AT91SAM9X5 | ||
82 | bool "AT91SAM9x5 family" | ||
83 | select SOC_AT91SAM9 | ||
62 | select HAVE_AT91_DBGU0 | 84 | select HAVE_AT91_DBGU0 |
63 | select HAVE_FB_ATMEL | 85 | select HAVE_FB_ATMEL |
86 | select HAVE_NET_MACB | ||
87 | help | ||
88 | Select this if you are using one of Atmel's AT91SAM9x5 family SoC. | ||
89 | This means that your SAM9 name finishes with a '5' (except if it is | ||
90 | AT91SAM9G45!). | ||
91 | This support covers AT91SAM9G15, AT91SAM9G25, AT91SAM9X25, AT91SAM9G35 | ||
92 | and AT91SAM9X35. | ||
93 | |||
94 | choice | ||
95 | prompt "Atmel AT91 Processor Devices for non DT boards" | ||
96 | |||
97 | config ARCH_AT91_NONE | ||
98 | bool "None" | ||
99 | |||
100 | config ARCH_AT91RM9200 | ||
101 | bool "AT91RM9200" | ||
102 | select SOC_AT91RM9200 | ||
103 | |||
104 | config ARCH_AT91SAM9260 | ||
105 | bool "AT91SAM9260 or AT91SAM9XE" | ||
106 | select SOC_AT91SAM9260 | ||
107 | |||
108 | config ARCH_AT91SAM9261 | ||
109 | bool "AT91SAM9261" | ||
110 | select SOC_AT91SAM9261 | ||
111 | |||
112 | config ARCH_AT91SAM9G10 | ||
113 | bool "AT91SAM9G10" | ||
114 | select SOC_AT91SAM9261 | ||
64 | 115 | ||
65 | config ARCH_AT91SAM9263 | 116 | config ARCH_AT91SAM9263 |
66 | bool "AT91SAM9263" | 117 | bool "AT91SAM9263" |
67 | select CPU_ARM926T | 118 | select SOC_AT91SAM9263 |
68 | select GENERIC_CLOCKEVENTS | ||
69 | select HAVE_FB_ATMEL | ||
70 | select HAVE_NET_MACB | ||
71 | select HAVE_AT91_DBGU1 | ||
72 | 119 | ||
73 | config ARCH_AT91SAM9RL | 120 | config ARCH_AT91SAM9RL |
74 | bool "AT91SAM9RL" | 121 | bool "AT91SAM9RL" |
75 | select CPU_ARM926T | 122 | select SOC_AT91SAM9RL |
76 | select GENERIC_CLOCKEVENTS | ||
77 | select HAVE_AT91_USART3 | ||
78 | select HAVE_FB_ATMEL | ||
79 | select HAVE_AT91_DBGU0 | ||
80 | 123 | ||
81 | config ARCH_AT91SAM9G20 | 124 | config ARCH_AT91SAM9G20 |
82 | bool "AT91SAM9G20" | 125 | bool "AT91SAM9G20" |
83 | select CPU_ARM926T | 126 | select SOC_AT91SAM9260 |
84 | select GENERIC_CLOCKEVENTS | ||
85 | select HAVE_AT91_DBGU0 | ||
86 | select HAVE_AT91_USART3 | ||
87 | select HAVE_AT91_USART4 | ||
88 | select HAVE_AT91_USART5 | ||
89 | select HAVE_NET_MACB | ||
90 | 127 | ||
91 | config ARCH_AT91SAM9G45 | 128 | config ARCH_AT91SAM9G45 |
92 | bool "AT91SAM9G45" | 129 | bool "AT91SAM9G45" |
93 | select CPU_ARM926T | 130 | select SOC_AT91SAM9G45 |
94 | select GENERIC_CLOCKEVENTS | ||
95 | select HAVE_AT91_USART3 | ||
96 | select HAVE_FB_ATMEL | ||
97 | select HAVE_NET_MACB | ||
98 | select HAVE_AT91_DBGU1 | ||
99 | |||
100 | config ARCH_AT91SAM9X5 | ||
101 | bool "AT91SAM9x5 family" | ||
102 | select CPU_ARM926T | ||
103 | select GENERIC_CLOCKEVENTS | ||
104 | select HAVE_FB_ATMEL | ||
105 | select HAVE_NET_MACB | ||
106 | select HAVE_AT91_DBGU0 | ||
107 | 131 | ||
108 | config ARCH_AT91X40 | 132 | config ARCH_AT91X40 |
109 | bool "AT91x40" | 133 | bool "AT91x40" |
134 | depends on !MMU | ||
110 | select ARCH_USES_GETTIMEOFFSET | 135 | select ARCH_USES_GETTIMEOFFSET |
111 | 136 | ||
112 | endchoice | 137 | endchoice |
@@ -364,6 +389,7 @@ config MACH_AT91SAM9G20EK_2MMC | |||
364 | Select this if you are using an Atmel AT91SAM9G20-EK Evaluation Kit | 389 | Select this if you are using an Atmel AT91SAM9G20-EK Evaluation Kit |
365 | with 2 SD/MMC Slots. This is the case for AT91SAM9G20-EK rev. C and | 390 | with 2 SD/MMC Slots. This is the case for AT91SAM9G20-EK rev. C and |
366 | onwards. | 391 | onwards. |
392 | <http://www.atmel.com/tools/SAM9G20-EK.aspx> | ||
367 | 393 | ||
368 | config MACH_CPU9G20 | 394 | config MACH_CPU9G20 |
369 | bool "Eukrea CPU9G20 board" | 395 | bool "Eukrea CPU9G20 board" |
@@ -433,9 +459,10 @@ comment "AT91SAM9G45 Board Type" | |||
433 | config MACH_AT91SAM9M10G45EK | 459 | config MACH_AT91SAM9M10G45EK |
434 | bool "Atmel AT91SAM9M10G45-EK Evaluation Kits" | 460 | bool "Atmel AT91SAM9M10G45-EK Evaluation Kits" |
435 | help | 461 | help |
436 | Select this if you are using Atmel's AT91SAM9G45-EKES Evaluation Kit. | 462 | Select this if you are using Atmel's AT91SAM9M10G45-EK Evaluation Kit. |
437 | "ES" at the end of the name means that this board is an | 463 | Those boards can be populated with any SoC of AT91SAM9G45 or AT91SAM9M10 |
438 | Engineering Sample. | 464 | families: AT91SAM9G45, AT91SAM9G46, AT91SAM9M10 and AT91SAM9M11. |
465 | <http://www.atmel.com/tools/SAM9M10-G45-EK.aspx> | ||
439 | 466 | ||
440 | endif | 467 | endif |
441 | 468 | ||
@@ -515,41 +542,6 @@ config AT91_TIMER_HZ | |||
515 | system clock (of at least several MHz), rounding is less of a | 542 | system clock (of at least several MHz), rounding is less of a |
516 | problem so it can be safer to use a decimal values like 100. | 543 | problem so it can be safer to use a decimal values like 100. |
517 | 544 | ||
518 | choice | ||
519 | prompt "Select a UART for early kernel messages" | ||
520 | |||
521 | config AT91_EARLY_DBGU0 | ||
522 | bool "DBGU on rm9200, 9260/9g20, 9261/9g10 and 9rl" | ||
523 | depends on HAVE_AT91_DBGU0 | ||
524 | |||
525 | config AT91_EARLY_DBGU1 | ||
526 | bool "DBGU on 9263 and 9g45" | ||
527 | depends on HAVE_AT91_DBGU1 | ||
528 | |||
529 | config AT91_EARLY_USART0 | ||
530 | bool "USART0" | ||
531 | |||
532 | config AT91_EARLY_USART1 | ||
533 | bool "USART1" | ||
534 | |||
535 | config AT91_EARLY_USART2 | ||
536 | bool "USART2" | ||
537 | depends on ! ARCH_AT91X40 | ||
538 | |||
539 | config AT91_EARLY_USART3 | ||
540 | bool "USART3" | ||
541 | depends on HAVE_AT91_USART3 | ||
542 | |||
543 | config AT91_EARLY_USART4 | ||
544 | bool "USART4" | ||
545 | depends on HAVE_AT91_USART4 | ||
546 | |||
547 | config AT91_EARLY_USART5 | ||
548 | bool "USART5" | ||
549 | depends on HAVE_AT91_USART5 | ||
550 | |||
551 | endchoice | ||
552 | |||
553 | endmenu | 545 | endmenu |
554 | 546 | ||
555 | endif | 547 | endif |
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile index 8512e53bed9..79d0f60af0b 100644 --- a/arch/arm/mach-at91/Makefile +++ b/arch/arm/mach-at91/Makefile | |||
@@ -10,17 +10,25 @@ obj- := | |||
10 | obj-$(CONFIG_AT91_PMC_UNIT) += clock.o | 10 | obj-$(CONFIG_AT91_PMC_UNIT) += clock.o |
11 | obj-$(CONFIG_AT91_SAM9_ALT_RESET) += at91sam9_alt_reset.o | 11 | obj-$(CONFIG_AT91_SAM9_ALT_RESET) += at91sam9_alt_reset.o |
12 | obj-$(CONFIG_AT91_SAM9G45_RESET) += at91sam9g45_reset.o | 12 | obj-$(CONFIG_AT91_SAM9G45_RESET) += at91sam9g45_reset.o |
13 | obj-$(CONFIG_SOC_AT91SAM9) += at91sam926x_time.o sam9_smc.o | ||
13 | 14 | ||
14 | # CPU-specific support | 15 | # CPU-specific support |
15 | obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200.o at91rm9200_time.o at91rm9200_devices.o | 16 | obj-$(CONFIG_SOC_AT91RM9200) += at91rm9200.o at91rm9200_time.o |
16 | obj-$(CONFIG_ARCH_AT91SAM9260) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o sam9_smc.o | 17 | obj-$(CONFIG_SOC_AT91SAM9260) += at91sam9260.o |
17 | obj-$(CONFIG_ARCH_AT91SAM9261) += at91sam9261.o at91sam926x_time.o at91sam9261_devices.o sam9_smc.o | 18 | obj-$(CONFIG_SOC_AT91SAM9261) += at91sam9261.o |
18 | obj-$(CONFIG_ARCH_AT91SAM9G10) += at91sam9261.o at91sam926x_time.o at91sam9261_devices.o sam9_smc.o | 19 | obj-$(CONFIG_SOC_AT91SAM9263) += at91sam9263.o |
19 | obj-$(CONFIG_ARCH_AT91SAM9263) += at91sam9263.o at91sam926x_time.o at91sam9263_devices.o sam9_smc.o | 20 | obj-$(CONFIG_SOC_AT91SAM9G45) += at91sam9g45.o |
20 | obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl.o at91sam926x_time.o at91sam9rl_devices.o sam9_smc.o | 21 | obj-$(CONFIG_SOC_AT91SAM9X5) += at91sam9x5.o |
21 | obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o sam9_smc.o | 22 | obj-$(CONFIG_SOC_AT91SAM9RL) += at91sam9rl.o |
22 | obj-$(CONFIG_ARCH_AT91SAM9G45) += at91sam9g45.o at91sam926x_time.o at91sam9g45_devices.o sam9_smc.o | 23 | |
23 | obj-$(CONFIG_ARCH_AT91SAM9X5) += at91sam9x5.o at91sam926x_time.o sam9_smc.o | 24 | obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200_devices.o |
25 | obj-$(CONFIG_ARCH_AT91SAM9260) += at91sam9260_devices.o | ||
26 | obj-$(CONFIG_ARCH_AT91SAM9261) += at91sam9261_devices.o | ||
27 | obj-$(CONFIG_ARCH_AT91SAM9G10) += at91sam9261_devices.o | ||
28 | obj-$(CONFIG_ARCH_AT91SAM9263) += at91sam9263_devices.o | ||
29 | obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl_devices.o | ||
30 | obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260_devices.o | ||
31 | obj-$(CONFIG_ARCH_AT91SAM9G45) += at91sam9g45_devices.o | ||
24 | obj-$(CONFIG_ARCH_AT91X40) += at91x40.o at91x40_time.o | 32 | obj-$(CONFIG_ARCH_AT91X40) += at91x40.o at91x40_time.o |
25 | 33 | ||
26 | # AT91RM9200 board-specific support | 34 | # AT91RM9200 board-specific support |
diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c index 364c19357e6..26917687fc3 100644 --- a/arch/arm/mach-at91/at91rm9200.c +++ b/arch/arm/mach-at91/at91rm9200.c | |||
@@ -26,15 +26,6 @@ | |||
26 | #include "clock.h" | 26 | #include "clock.h" |
27 | #include "sam9_smc.h" | 27 | #include "sam9_smc.h" |
28 | 28 | ||
29 | static struct map_desc at91rm9200_io_desc[] __initdata = { | ||
30 | { | ||
31 | .virtual = AT91_VA_BASE_EMAC, | ||
32 | .pfn = __phys_to_pfn(AT91RM9200_BASE_EMAC), | ||
33 | .length = SZ_16K, | ||
34 | .type = MT_DEVICE, | ||
35 | }, | ||
36 | }; | ||
37 | |||
38 | /* -------------------------------------------------------------------- | 29 | /* -------------------------------------------------------------------- |
39 | * Clocks | 30 | * Clocks |
40 | * -------------------------------------------------------------------- */ | 31 | * -------------------------------------------------------------------- */ |
@@ -258,18 +249,6 @@ static void __init at91rm9200_register_clocks(void) | |||
258 | clk_register(&pck3); | 249 | clk_register(&pck3); |
259 | } | 250 | } |
260 | 251 | ||
261 | static struct clk_lookup console_clock_lookup; | ||
262 | |||
263 | void __init at91rm9200_set_console_clock(int id) | ||
264 | { | ||
265 | if (id >= ARRAY_SIZE(usart_clocks_lookups)) | ||
266 | return; | ||
267 | |||
268 | console_clock_lookup.con_id = "usart"; | ||
269 | console_clock_lookup.clk = usart_clocks_lookups[id].clk; | ||
270 | clkdev_add(&console_clock_lookup); | ||
271 | } | ||
272 | |||
273 | /* -------------------------------------------------------------------- | 252 | /* -------------------------------------------------------------------- |
274 | * GPIO | 253 | * GPIO |
275 | * -------------------------------------------------------------------- */ | 254 | * -------------------------------------------------------------------- */ |
@@ -315,7 +294,6 @@ static void __init at91rm9200_map_io(void) | |||
315 | { | 294 | { |
316 | /* Map peripherals */ | 295 | /* Map peripherals */ |
317 | at91_init_sram(0, AT91RM9200_SRAM_BASE, AT91RM9200_SRAM_SIZE); | 296 | at91_init_sram(0, AT91RM9200_SRAM_BASE, AT91RM9200_SRAM_SIZE); |
318 | iotable_init(at91rm9200_io_desc, ARRAY_SIZE(at91rm9200_io_desc)); | ||
319 | } | 297 | } |
320 | 298 | ||
321 | static void __init at91rm9200_ioremap_registers(void) | 299 | static void __init at91rm9200_ioremap_registers(void) |
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c index 05774e5b1cb..e6b7d0533dd 100644 --- a/arch/arm/mach-at91/at91rm9200_devices.c +++ b/arch/arm/mach-at91/at91rm9200_devices.c | |||
@@ -140,8 +140,8 @@ static struct macb_platform_data eth_data; | |||
140 | 140 | ||
141 | static struct resource eth_resources[] = { | 141 | static struct resource eth_resources[] = { |
142 | [0] = { | 142 | [0] = { |
143 | .start = AT91_VA_BASE_EMAC, | 143 | .start = AT91RM9200_BASE_EMAC, |
144 | .end = AT91_VA_BASE_EMAC + SZ_16K - 1, | 144 | .end = AT91RM9200_BASE_EMAC + SZ_16K - 1, |
145 | .flags = IORESOURCE_MEM, | 145 | .flags = IORESOURCE_MEM, |
146 | }, | 146 | }, |
147 | [1] = { | 147 | [1] = { |
@@ -1152,14 +1152,6 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | |||
1152 | at91_uarts[portnr] = pdev; | 1152 | at91_uarts[portnr] = pdev; |
1153 | } | 1153 | } |
1154 | 1154 | ||
1155 | void __init at91_set_serial_console(unsigned portnr) | ||
1156 | { | ||
1157 | if (portnr < ATMEL_MAX_UART) { | ||
1158 | atmel_default_console_device = at91_uarts[portnr]; | ||
1159 | at91rm9200_set_console_clock(at91_uarts[portnr]->id); | ||
1160 | } | ||
1161 | } | ||
1162 | |||
1163 | void __init at91_add_device_serial(void) | 1155 | void __init at91_add_device_serial(void) |
1164 | { | 1156 | { |
1165 | int i; | 1157 | int i; |
@@ -1168,13 +1160,9 @@ void __init at91_add_device_serial(void) | |||
1168 | if (at91_uarts[i]) | 1160 | if (at91_uarts[i]) |
1169 | platform_device_register(at91_uarts[i]); | 1161 | platform_device_register(at91_uarts[i]); |
1170 | } | 1162 | } |
1171 | |||
1172 | if (!atmel_default_console_device) | ||
1173 | printk(KERN_INFO "AT91: No default serial console defined.\n"); | ||
1174 | } | 1163 | } |
1175 | #else | 1164 | #else |
1176 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} | 1165 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} |
1177 | void __init at91_set_serial_console(unsigned portnr) {} | ||
1178 | void __init at91_add_device_serial(void) {} | 1166 | void __init at91_add_device_serial(void) {} |
1179 | #endif | 1167 | #endif |
1180 | 1168 | ||
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c index 46f77423329..a27bbec50ca 100644 --- a/arch/arm/mach-at91/at91sam9260.c +++ b/arch/arm/mach-at91/at91sam9260.c | |||
@@ -268,18 +268,6 @@ static void __init at91sam9260_register_clocks(void) | |||
268 | clk_register(&pck1); | 268 | clk_register(&pck1); |
269 | } | 269 | } |
270 | 270 | ||
271 | static struct clk_lookup console_clock_lookup; | ||
272 | |||
273 | void __init at91sam9260_set_console_clock(int id) | ||
274 | { | ||
275 | if (id >= ARRAY_SIZE(usart_clocks_lookups)) | ||
276 | return; | ||
277 | |||
278 | console_clock_lookup.con_id = "usart"; | ||
279 | console_clock_lookup.clk = usart_clocks_lookups[id].clk; | ||
280 | clkdev_add(&console_clock_lookup); | ||
281 | } | ||
282 | |||
283 | /* -------------------------------------------------------------------- | 271 | /* -------------------------------------------------------------------- |
284 | * GPIO | 272 | * GPIO |
285 | * -------------------------------------------------------------------- */ | 273 | * -------------------------------------------------------------------- */ |
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c index 5652dde4bbe..ad00fe91d37 100644 --- a/arch/arm/mach-at91/at91sam9260_devices.c +++ b/arch/arm/mach-at91/at91sam9260_devices.c | |||
@@ -1229,14 +1229,6 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | |||
1229 | at91_uarts[portnr] = pdev; | 1229 | at91_uarts[portnr] = pdev; |
1230 | } | 1230 | } |
1231 | 1231 | ||
1232 | void __init at91_set_serial_console(unsigned portnr) | ||
1233 | { | ||
1234 | if (portnr < ATMEL_MAX_UART) { | ||
1235 | atmel_default_console_device = at91_uarts[portnr]; | ||
1236 | at91sam9260_set_console_clock(at91_uarts[portnr]->id); | ||
1237 | } | ||
1238 | } | ||
1239 | |||
1240 | void __init at91_add_device_serial(void) | 1232 | void __init at91_add_device_serial(void) |
1241 | { | 1233 | { |
1242 | int i; | 1234 | int i; |
@@ -1245,13 +1237,9 @@ void __init at91_add_device_serial(void) | |||
1245 | if (at91_uarts[i]) | 1237 | if (at91_uarts[i]) |
1246 | platform_device_register(at91_uarts[i]); | 1238 | platform_device_register(at91_uarts[i]); |
1247 | } | 1239 | } |
1248 | |||
1249 | if (!atmel_default_console_device) | ||
1250 | printk(KERN_INFO "AT91: No default serial console defined.\n"); | ||
1251 | } | 1240 | } |
1252 | #else | 1241 | #else |
1253 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} | 1242 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} |
1254 | void __init at91_set_serial_console(unsigned portnr) {} | ||
1255 | void __init at91_add_device_serial(void) {} | 1243 | void __init at91_add_device_serial(void) {} |
1256 | #endif | 1244 | #endif |
1257 | 1245 | ||
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c index 7de81e6222f..c77d503d09d 100644 --- a/arch/arm/mach-at91/at91sam9261.c +++ b/arch/arm/mach-at91/at91sam9261.c | |||
@@ -239,18 +239,6 @@ static void __init at91sam9261_register_clocks(void) | |||
239 | clk_register(&hck1); | 239 | clk_register(&hck1); |
240 | } | 240 | } |
241 | 241 | ||
242 | static struct clk_lookup console_clock_lookup; | ||
243 | |||
244 | void __init at91sam9261_set_console_clock(int id) | ||
245 | { | ||
246 | if (id >= ARRAY_SIZE(usart_clocks_lookups)) | ||
247 | return; | ||
248 | |||
249 | console_clock_lookup.con_id = "usart"; | ||
250 | console_clock_lookup.clk = usart_clocks_lookups[id].clk; | ||
251 | clkdev_add(&console_clock_lookup); | ||
252 | } | ||
253 | |||
254 | /* -------------------------------------------------------------------- | 242 | /* -------------------------------------------------------------------- |
255 | * GPIO | 243 | * GPIO |
256 | * -------------------------------------------------------------------- */ | 244 | * -------------------------------------------------------------------- */ |
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c index 4db961a9308..9295e90b08f 100644 --- a/arch/arm/mach-at91/at91sam9261_devices.c +++ b/arch/arm/mach-at91/at91sam9261_devices.c | |||
@@ -1051,14 +1051,6 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | |||
1051 | at91_uarts[portnr] = pdev; | 1051 | at91_uarts[portnr] = pdev; |
1052 | } | 1052 | } |
1053 | 1053 | ||
1054 | void __init at91_set_serial_console(unsigned portnr) | ||
1055 | { | ||
1056 | if (portnr < ATMEL_MAX_UART) { | ||
1057 | atmel_default_console_device = at91_uarts[portnr]; | ||
1058 | at91sam9261_set_console_clock(at91_uarts[portnr]->id); | ||
1059 | } | ||
1060 | } | ||
1061 | |||
1062 | void __init at91_add_device_serial(void) | 1054 | void __init at91_add_device_serial(void) |
1063 | { | 1055 | { |
1064 | int i; | 1056 | int i; |
@@ -1067,13 +1059,9 @@ void __init at91_add_device_serial(void) | |||
1067 | if (at91_uarts[i]) | 1059 | if (at91_uarts[i]) |
1068 | platform_device_register(at91_uarts[i]); | 1060 | platform_device_register(at91_uarts[i]); |
1069 | } | 1061 | } |
1070 | |||
1071 | if (!atmel_default_console_device) | ||
1072 | printk(KERN_INFO "AT91: No default serial console defined.\n"); | ||
1073 | } | 1062 | } |
1074 | #else | 1063 | #else |
1075 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} | 1064 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} |
1076 | void __init at91_set_serial_console(unsigned portnr) {} | ||
1077 | void __init at91_add_device_serial(void) {} | 1065 | void __init at91_add_device_serial(void) {} |
1078 | #endif | 1066 | #endif |
1079 | 1067 | ||
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c index ef301be6657..7fae36502fb 100644 --- a/arch/arm/mach-at91/at91sam9263.c +++ b/arch/arm/mach-at91/at91sam9263.c | |||
@@ -255,18 +255,6 @@ static void __init at91sam9263_register_clocks(void) | |||
255 | clk_register(&pck3); | 255 | clk_register(&pck3); |
256 | } | 256 | } |
257 | 257 | ||
258 | static struct clk_lookup console_clock_lookup; | ||
259 | |||
260 | void __init at91sam9263_set_console_clock(int id) | ||
261 | { | ||
262 | if (id >= ARRAY_SIZE(usart_clocks_lookups)) | ||
263 | return; | ||
264 | |||
265 | console_clock_lookup.con_id = "usart"; | ||
266 | console_clock_lookup.clk = usart_clocks_lookups[id].clk; | ||
267 | clkdev_add(&console_clock_lookup); | ||
268 | } | ||
269 | |||
270 | /* -------------------------------------------------------------------- | 258 | /* -------------------------------------------------------------------- |
271 | * GPIO | 259 | * GPIO |
272 | * -------------------------------------------------------------------- */ | 260 | * -------------------------------------------------------------------- */ |
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c index fe99206de88..dfe5bc006d5 100644 --- a/arch/arm/mach-at91/at91sam9263_devices.c +++ b/arch/arm/mach-at91/at91sam9263_devices.c | |||
@@ -1461,14 +1461,6 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | |||
1461 | at91_uarts[portnr] = pdev; | 1461 | at91_uarts[portnr] = pdev; |
1462 | } | 1462 | } |
1463 | 1463 | ||
1464 | void __init at91_set_serial_console(unsigned portnr) | ||
1465 | { | ||
1466 | if (portnr < ATMEL_MAX_UART) { | ||
1467 | atmel_default_console_device = at91_uarts[portnr]; | ||
1468 | at91sam9263_set_console_clock(at91_uarts[portnr]->id); | ||
1469 | } | ||
1470 | } | ||
1471 | |||
1472 | void __init at91_add_device_serial(void) | 1464 | void __init at91_add_device_serial(void) |
1473 | { | 1465 | { |
1474 | int i; | 1466 | int i; |
@@ -1477,13 +1469,9 @@ void __init at91_add_device_serial(void) | |||
1477 | if (at91_uarts[i]) | 1469 | if (at91_uarts[i]) |
1478 | platform_device_register(at91_uarts[i]); | 1470 | platform_device_register(at91_uarts[i]); |
1479 | } | 1471 | } |
1480 | |||
1481 | if (!atmel_default_console_device) | ||
1482 | printk(KERN_INFO "AT91: No default serial console defined.\n"); | ||
1483 | } | 1472 | } |
1484 | #else | 1473 | #else |
1485 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} | 1474 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} |
1486 | void __init at91_set_serial_console(unsigned portnr) {} | ||
1487 | void __init at91_add_device_serial(void) {} | 1475 | void __init at91_add_device_serial(void) {} |
1488 | #endif | 1476 | #endif |
1489 | 1477 | ||
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c index d222f8333da..f2054495a65 100644 --- a/arch/arm/mach-at91/at91sam9g45.c +++ b/arch/arm/mach-at91/at91sam9g45.c | |||
@@ -288,18 +288,6 @@ static void __init at91sam9g45_register_clocks(void) | |||
288 | clk_register(&pck1); | 288 | clk_register(&pck1); |
289 | } | 289 | } |
290 | 290 | ||
291 | static struct clk_lookup console_clock_lookup; | ||
292 | |||
293 | void __init at91sam9g45_set_console_clock(int id) | ||
294 | { | ||
295 | if (id >= ARRAY_SIZE(usart_clocks_lookups)) | ||
296 | return; | ||
297 | |||
298 | console_clock_lookup.con_id = "usart"; | ||
299 | console_clock_lookup.clk = usart_clocks_lookups[id].clk; | ||
300 | clkdev_add(&console_clock_lookup); | ||
301 | } | ||
302 | |||
303 | /* -------------------------------------------------------------------- | 291 | /* -------------------------------------------------------------------- |
304 | * GPIO | 292 | * GPIO |
305 | * -------------------------------------------------------------------- */ | 293 | * -------------------------------------------------------------------- */ |
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c index 6b008aee1df..db2f88c246f 100644 --- a/arch/arm/mach-at91/at91sam9g45_devices.c +++ b/arch/arm/mach-at91/at91sam9g45_devices.c | |||
@@ -1741,14 +1741,6 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | |||
1741 | at91_uarts[portnr] = pdev; | 1741 | at91_uarts[portnr] = pdev; |
1742 | } | 1742 | } |
1743 | 1743 | ||
1744 | void __init at91_set_serial_console(unsigned portnr) | ||
1745 | { | ||
1746 | if (portnr < ATMEL_MAX_UART) { | ||
1747 | atmel_default_console_device = at91_uarts[portnr]; | ||
1748 | at91sam9g45_set_console_clock(at91_uarts[portnr]->id); | ||
1749 | } | ||
1750 | } | ||
1751 | |||
1752 | void __init at91_add_device_serial(void) | 1744 | void __init at91_add_device_serial(void) |
1753 | { | 1745 | { |
1754 | int i; | 1746 | int i; |
@@ -1757,13 +1749,9 @@ void __init at91_add_device_serial(void) | |||
1757 | if (at91_uarts[i]) | 1749 | if (at91_uarts[i]) |
1758 | platform_device_register(at91_uarts[i]); | 1750 | platform_device_register(at91_uarts[i]); |
1759 | } | 1751 | } |
1760 | |||
1761 | if (!atmel_default_console_device) | ||
1762 | printk(KERN_INFO "AT91: No default serial console defined.\n"); | ||
1763 | } | 1752 | } |
1764 | #else | 1753 | #else |
1765 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} | 1754 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} |
1766 | void __init at91_set_serial_console(unsigned portnr) {} | ||
1767 | void __init at91_add_device_serial(void) {} | 1755 | void __init at91_add_device_serial(void) {} |
1768 | #endif | 1756 | #endif |
1769 | 1757 | ||
diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c index d9f2774f385..e420085a57e 100644 --- a/arch/arm/mach-at91/at91sam9rl.c +++ b/arch/arm/mach-at91/at91sam9rl.c | |||
@@ -232,18 +232,6 @@ static void __init at91sam9rl_register_clocks(void) | |||
232 | clk_register(&pck1); | 232 | clk_register(&pck1); |
233 | } | 233 | } |
234 | 234 | ||
235 | static struct clk_lookup console_clock_lookup; | ||
236 | |||
237 | void __init at91sam9rl_set_console_clock(int id) | ||
238 | { | ||
239 | if (id >= ARRAY_SIZE(usart_clocks_lookups)) | ||
240 | return; | ||
241 | |||
242 | console_clock_lookup.con_id = "usart"; | ||
243 | console_clock_lookup.clk = usart_clocks_lookups[id].clk; | ||
244 | clkdev_add(&console_clock_lookup); | ||
245 | } | ||
246 | |||
247 | /* -------------------------------------------------------------------- | 235 | /* -------------------------------------------------------------------- |
248 | * GPIO | 236 | * GPIO |
249 | * -------------------------------------------------------------------- */ | 237 | * -------------------------------------------------------------------- */ |
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c index fe4ae22e856..9c0b1481a9a 100644 --- a/arch/arm/mach-at91/at91sam9rl_devices.c +++ b/arch/arm/mach-at91/at91sam9rl_devices.c | |||
@@ -1192,14 +1192,6 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | |||
1192 | at91_uarts[portnr] = pdev; | 1192 | at91_uarts[portnr] = pdev; |
1193 | } | 1193 | } |
1194 | 1194 | ||
1195 | void __init at91_set_serial_console(unsigned portnr) | ||
1196 | { | ||
1197 | if (portnr < ATMEL_MAX_UART) { | ||
1198 | atmel_default_console_device = at91_uarts[portnr]; | ||
1199 | at91sam9rl_set_console_clock(at91_uarts[portnr]->id); | ||
1200 | } | ||
1201 | } | ||
1202 | |||
1203 | void __init at91_add_device_serial(void) | 1195 | void __init at91_add_device_serial(void) |
1204 | { | 1196 | { |
1205 | int i; | 1197 | int i; |
@@ -1208,13 +1200,9 @@ void __init at91_add_device_serial(void) | |||
1208 | if (at91_uarts[i]) | 1200 | if (at91_uarts[i]) |
1209 | platform_device_register(at91_uarts[i]); | 1201 | platform_device_register(at91_uarts[i]); |
1210 | } | 1202 | } |
1211 | |||
1212 | if (!atmel_default_console_device) | ||
1213 | printk(KERN_INFO "AT91: No default serial console defined.\n"); | ||
1214 | } | 1203 | } |
1215 | #else | 1204 | #else |
1216 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} | 1205 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} |
1217 | void __init at91_set_serial_console(unsigned portnr) {} | ||
1218 | void __init at91_add_device_serial(void) {} | 1206 | void __init at91_add_device_serial(void) {} |
1219 | #endif | 1207 | #endif |
1220 | 1208 | ||
diff --git a/arch/arm/mach-at91/board-1arm.c b/arch/arm/mach-at91/board-1arm.c index 2628384aaae..271f994314a 100644 --- a/arch/arm/mach-at91/board-1arm.c +++ b/arch/arm/mach-at91/board-1arm.c | |||
@@ -47,20 +47,6 @@ static void __init onearm_init_early(void) | |||
47 | 47 | ||
48 | /* Initialize processor: 18.432 MHz crystal */ | 48 | /* Initialize processor: 18.432 MHz crystal */ |
49 | at91_initialize(18432000); | 49 | at91_initialize(18432000); |
50 | |||
51 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
52 | at91_register_uart(0, 0, 0); | ||
53 | |||
54 | /* USART0 on ttyS1 (Rx, Tx, CTS, RTS) */ | ||
55 | at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
56 | |||
57 | /* USART1 on ttyS2 (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
58 | at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
59 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
60 | | ATMEL_UART_RI); | ||
61 | |||
62 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
63 | at91_set_serial_console(0); | ||
64 | } | 50 | } |
65 | 51 | ||
66 | static struct macb_platform_data __initdata onearm_eth_data = { | 52 | static struct macb_platform_data __initdata onearm_eth_data = { |
@@ -82,6 +68,16 @@ static struct at91_udc_data __initdata onearm_udc_data = { | |||
82 | static void __init onearm_board_init(void) | 68 | static void __init onearm_board_init(void) |
83 | { | 69 | { |
84 | /* Serial */ | 70 | /* Serial */ |
71 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
72 | at91_register_uart(0, 0, 0); | ||
73 | |||
74 | /* USART0 on ttyS1 (Rx, Tx, CTS, RTS) */ | ||
75 | at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
76 | |||
77 | /* USART1 on ttyS2 (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
78 | at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
79 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
80 | | ATMEL_UART_RI); | ||
85 | at91_add_device_serial(); | 81 | at91_add_device_serial(); |
86 | /* Ethernet */ | 82 | /* Ethernet */ |
87 | at91_add_device_eth(&onearm_eth_data); | 83 | at91_add_device_eth(&onearm_eth_data); |
diff --git a/arch/arm/mach-at91/board-afeb-9260v1.c b/arch/arm/mach-at91/board-afeb-9260v1.c index 161efbaa102..b7d8aa7b81e 100644 --- a/arch/arm/mach-at91/board-afeb-9260v1.c +++ b/arch/arm/mach-at91/board-afeb-9260v1.c | |||
@@ -52,22 +52,6 @@ static void __init afeb9260_init_early(void) | |||
52 | { | 52 | { |
53 | /* Initialize processor: 18.432 MHz crystal */ | 53 | /* Initialize processor: 18.432 MHz crystal */ |
54 | at91_initialize(18432000); | 54 | at91_initialize(18432000); |
55 | |||
56 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
57 | at91_register_uart(0, 0, 0); | ||
58 | |||
59 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
60 | at91_register_uart(AT91SAM9260_ID_US0, 1, | ||
61 | ATMEL_UART_CTS | ATMEL_UART_RTS | ||
62 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ||
63 | | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
64 | |||
65 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
66 | at91_register_uart(AT91SAM9260_ID_US1, 2, | ||
67 | ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
68 | |||
69 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
70 | at91_set_serial_console(0); | ||
71 | } | 55 | } |
72 | 56 | ||
73 | /* | 57 | /* |
@@ -183,6 +167,18 @@ static struct at91_cf_data afeb9260_cf_data = { | |||
183 | static void __init afeb9260_board_init(void) | 167 | static void __init afeb9260_board_init(void) |
184 | { | 168 | { |
185 | /* Serial */ | 169 | /* Serial */ |
170 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
171 | at91_register_uart(0, 0, 0); | ||
172 | |||
173 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
174 | at91_register_uart(AT91SAM9260_ID_US0, 1, | ||
175 | ATMEL_UART_CTS | ATMEL_UART_RTS | ||
176 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ||
177 | | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
178 | |||
179 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
180 | at91_register_uart(AT91SAM9260_ID_US1, 2, | ||
181 | ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
186 | at91_add_device_serial(); | 182 | at91_add_device_serial(); |
187 | /* USB Host */ | 183 | /* USB Host */ |
188 | at91_add_device_usbh(&afeb9260_usbh_data); | 184 | at91_add_device_usbh(&afeb9260_usbh_data); |
diff --git a/arch/arm/mach-at91/board-cam60.c b/arch/arm/mach-at91/board-cam60.c index c6d44ee0c77..29d3ef0a50f 100644 --- a/arch/arm/mach-at91/board-cam60.c +++ b/arch/arm/mach-at91/board-cam60.c | |||
@@ -49,12 +49,6 @@ static void __init cam60_init_early(void) | |||
49 | { | 49 | { |
50 | /* Initialize processor: 10 MHz crystal */ | 50 | /* Initialize processor: 10 MHz crystal */ |
51 | at91_initialize(10000000); | 51 | at91_initialize(10000000); |
52 | |||
53 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
54 | at91_register_uart(0, 0, 0); | ||
55 | |||
56 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
57 | at91_set_serial_console(0); | ||
58 | } | 52 | } |
59 | 53 | ||
60 | /* | 54 | /* |
@@ -175,6 +169,8 @@ static void __init cam60_add_device_nand(void) | |||
175 | static void __init cam60_board_init(void) | 169 | static void __init cam60_board_init(void) |
176 | { | 170 | { |
177 | /* Serial */ | 171 | /* Serial */ |
172 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
173 | at91_register_uart(0, 0, 0); | ||
178 | at91_add_device_serial(); | 174 | at91_add_device_serial(); |
179 | /* SPI */ | 175 | /* SPI */ |
180 | at91_add_device_spi(cam60_spi_devices, ARRAY_SIZE(cam60_spi_devices)); | 176 | at91_add_device_spi(cam60_spi_devices, ARRAY_SIZE(cam60_spi_devices)); |
diff --git a/arch/arm/mach-at91/board-carmeva.c b/arch/arm/mach-at91/board-carmeva.c index 59d9cf99753..44328a6d460 100644 --- a/arch/arm/mach-at91/board-carmeva.c +++ b/arch/arm/mach-at91/board-carmeva.c | |||
@@ -44,17 +44,6 @@ static void __init carmeva_init_early(void) | |||
44 | { | 44 | { |
45 | /* Initialize processor: 20.000 MHz crystal */ | 45 | /* Initialize processor: 20.000 MHz crystal */ |
46 | at91_initialize(20000000); | 46 | at91_initialize(20000000); |
47 | |||
48 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
49 | at91_register_uart(0, 0, 0); | ||
50 | |||
51 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
52 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
53 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
54 | | ATMEL_UART_RI); | ||
55 | |||
56 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
57 | at91_set_serial_console(0); | ||
58 | } | 47 | } |
59 | 48 | ||
60 | static struct macb_platform_data __initdata carmeva_eth_data = { | 49 | static struct macb_platform_data __initdata carmeva_eth_data = { |
@@ -139,6 +128,13 @@ static struct gpio_led carmeva_leds[] = { | |||
139 | static void __init carmeva_board_init(void) | 128 | static void __init carmeva_board_init(void) |
140 | { | 129 | { |
141 | /* Serial */ | 130 | /* Serial */ |
131 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
132 | at91_register_uart(0, 0, 0); | ||
133 | |||
134 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
135 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
136 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
137 | | ATMEL_UART_RI); | ||
142 | at91_add_device_serial(); | 138 | at91_add_device_serial(); |
143 | /* Ethernet */ | 139 | /* Ethernet */ |
144 | at91_add_device_eth(&carmeva_eth_data); | 140 | at91_add_device_eth(&carmeva_eth_data); |
diff --git a/arch/arm/mach-at91/board-cpu9krea.c b/arch/arm/mach-at91/board-cpu9krea.c index 5f3680e7c88..69951ec7dbf 100644 --- a/arch/arm/mach-at91/board-cpu9krea.c +++ b/arch/arm/mach-at91/board-cpu9krea.c | |||
@@ -52,34 +52,6 @@ static void __init cpu9krea_init_early(void) | |||
52 | { | 52 | { |
53 | /* Initialize processor: 18.432 MHz crystal */ | 53 | /* Initialize processor: 18.432 MHz crystal */ |
54 | at91_initialize(18432000); | 54 | at91_initialize(18432000); |
55 | |||
56 | /* DGBU on ttyS0. (Rx & Tx only) */ | ||
57 | at91_register_uart(0, 0, 0); | ||
58 | |||
59 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
60 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | | ||
61 | ATMEL_UART_RTS | ATMEL_UART_DTR | ATMEL_UART_DSR | | ||
62 | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
63 | |||
64 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
65 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | | ||
66 | ATMEL_UART_RTS); | ||
67 | |||
68 | /* USART2 on ttyS3. (Rx, Tx, RTS, CTS) */ | ||
69 | at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS | | ||
70 | ATMEL_UART_RTS); | ||
71 | |||
72 | /* USART3 on ttyS4. (Rx, Tx) */ | ||
73 | at91_register_uart(AT91SAM9260_ID_US3, 4, 0); | ||
74 | |||
75 | /* USART4 on ttyS5. (Rx, Tx) */ | ||
76 | at91_register_uart(AT91SAM9260_ID_US4, 5, 0); | ||
77 | |||
78 | /* USART5 on ttyS6. (Rx, Tx) */ | ||
79 | at91_register_uart(AT91SAM9260_ID_US5, 6, 0); | ||
80 | |||
81 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
82 | at91_set_serial_console(0); | ||
83 | } | 55 | } |
84 | 56 | ||
85 | /* | 57 | /* |
@@ -352,6 +324,30 @@ static void __init cpu9krea_board_init(void) | |||
352 | /* NOR */ | 324 | /* NOR */ |
353 | cpu9krea_add_device_nor(); | 325 | cpu9krea_add_device_nor(); |
354 | /* Serial */ | 326 | /* Serial */ |
327 | /* DGBU on ttyS0. (Rx & Tx only) */ | ||
328 | at91_register_uart(0, 0, 0); | ||
329 | |||
330 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
331 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | | ||
332 | ATMEL_UART_RTS | ATMEL_UART_DTR | ATMEL_UART_DSR | | ||
333 | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
334 | |||
335 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
336 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | | ||
337 | ATMEL_UART_RTS); | ||
338 | |||
339 | /* USART2 on ttyS3. (Rx, Tx, RTS, CTS) */ | ||
340 | at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS | | ||
341 | ATMEL_UART_RTS); | ||
342 | |||
343 | /* USART3 on ttyS4. (Rx, Tx) */ | ||
344 | at91_register_uart(AT91SAM9260_ID_US3, 4, 0); | ||
345 | |||
346 | /* USART4 on ttyS5. (Rx, Tx) */ | ||
347 | at91_register_uart(AT91SAM9260_ID_US4, 5, 0); | ||
348 | |||
349 | /* USART5 on ttyS6. (Rx, Tx) */ | ||
350 | at91_register_uart(AT91SAM9260_ID_US5, 6, 0); | ||
355 | at91_add_device_serial(); | 351 | at91_add_device_serial(); |
356 | /* USB Host */ | 352 | /* USB Host */ |
357 | at91_add_device_usbh(&cpu9krea_usbh_data); | 353 | at91_add_device_usbh(&cpu9krea_usbh_data); |
diff --git a/arch/arm/mach-at91/board-cpuat91.c b/arch/arm/mach-at91/board-cpuat91.c index e094cc81fe2..895cf2dba61 100644 --- a/arch/arm/mach-at91/board-cpuat91.c +++ b/arch/arm/mach-at91/board-cpuat91.c | |||
@@ -59,28 +59,6 @@ static void __init cpuat91_init_early(void) | |||
59 | 59 | ||
60 | /* Initialize processor: 18.432 MHz crystal */ | 60 | /* Initialize processor: 18.432 MHz crystal */ |
61 | at91_initialize(18432000); | 61 | at91_initialize(18432000); |
62 | |||
63 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
64 | at91_register_uart(0, 0, 0); | ||
65 | |||
66 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) */ | ||
67 | at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS | | ||
68 | ATMEL_UART_RTS); | ||
69 | |||
70 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
71 | at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS | | ||
72 | ATMEL_UART_RTS | ATMEL_UART_DTR | ATMEL_UART_DSR | | ||
73 | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
74 | |||
75 | /* USART2 on ttyS3 (Rx, Tx) */ | ||
76 | at91_register_uart(AT91RM9200_ID_US2, 3, 0); | ||
77 | |||
78 | /* USART3 on ttyS4 (Rx, Tx, CTS, RTS) */ | ||
79 | at91_register_uart(AT91RM9200_ID_US3, 4, ATMEL_UART_CTS | | ||
80 | ATMEL_UART_RTS); | ||
81 | |||
82 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
83 | at91_set_serial_console(0); | ||
84 | } | 62 | } |
85 | 63 | ||
86 | static struct macb_platform_data __initdata cpuat91_eth_data = { | 64 | static struct macb_platform_data __initdata cpuat91_eth_data = { |
@@ -161,6 +139,24 @@ static struct platform_device *platform_devices[] __initdata = { | |||
161 | static void __init cpuat91_board_init(void) | 139 | static void __init cpuat91_board_init(void) |
162 | { | 140 | { |
163 | /* Serial */ | 141 | /* Serial */ |
142 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
143 | at91_register_uart(0, 0, 0); | ||
144 | |||
145 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) */ | ||
146 | at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS | | ||
147 | ATMEL_UART_RTS); | ||
148 | |||
149 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
150 | at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS | | ||
151 | ATMEL_UART_RTS | ATMEL_UART_DTR | ATMEL_UART_DSR | | ||
152 | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
153 | |||
154 | /* USART2 on ttyS3 (Rx, Tx) */ | ||
155 | at91_register_uart(AT91RM9200_ID_US2, 3, 0); | ||
156 | |||
157 | /* USART3 on ttyS4 (Rx, Tx, CTS, RTS) */ | ||
158 | at91_register_uart(AT91RM9200_ID_US3, 4, ATMEL_UART_CTS | | ||
159 | ATMEL_UART_RTS); | ||
164 | at91_add_device_serial(); | 160 | at91_add_device_serial(); |
165 | /* LEDs. */ | 161 | /* LEDs. */ |
166 | at91_gpio_leds(cpuat91_leds, ARRAY_SIZE(cpuat91_leds)); | 162 | at91_gpio_leds(cpuat91_leds, ARRAY_SIZE(cpuat91_leds)); |
diff --git a/arch/arm/mach-at91/board-csb337.c b/arch/arm/mach-at91/board-csb337.c index 1a1547b1ce4..cd813361cd2 100644 --- a/arch/arm/mach-at91/board-csb337.c +++ b/arch/arm/mach-at91/board-csb337.c | |||
@@ -47,15 +47,6 @@ static void __init csb337_init_early(void) | |||
47 | { | 47 | { |
48 | /* Initialize processor: 3.6864 MHz crystal */ | 48 | /* Initialize processor: 3.6864 MHz crystal */ |
49 | at91_initialize(3686400); | 49 | at91_initialize(3686400); |
50 | |||
51 | /* Setup the LEDs */ | ||
52 | at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1); | ||
53 | |||
54 | /* DBGU on ttyS0 */ | ||
55 | at91_register_uart(0, 0, 0); | ||
56 | |||
57 | /* make console=ttyS0 the default */ | ||
58 | at91_set_serial_console(0); | ||
59 | } | 50 | } |
60 | 51 | ||
61 | static struct macb_platform_data __initdata csb337_eth_data = { | 52 | static struct macb_platform_data __initdata csb337_eth_data = { |
@@ -228,7 +219,11 @@ static struct gpio_led csb_leds[] = { | |||
228 | 219 | ||
229 | static void __init csb337_board_init(void) | 220 | static void __init csb337_board_init(void) |
230 | { | 221 | { |
222 | /* Setup the LEDs */ | ||
223 | at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1); | ||
231 | /* Serial */ | 224 | /* Serial */ |
225 | /* DBGU on ttyS0 */ | ||
226 | at91_register_uart(0, 0, 0); | ||
232 | at91_add_device_serial(); | 227 | at91_add_device_serial(); |
233 | /* Ethernet */ | 228 | /* Ethernet */ |
234 | at91_add_device_eth(&csb337_eth_data); | 229 | at91_add_device_eth(&csb337_eth_data); |
diff --git a/arch/arm/mach-at91/board-csb637.c b/arch/arm/mach-at91/board-csb637.c index f650bf39455..7c8b05a57d7 100644 --- a/arch/arm/mach-at91/board-csb637.c +++ b/arch/arm/mach-at91/board-csb637.c | |||
@@ -44,12 +44,6 @@ static void __init csb637_init_early(void) | |||
44 | { | 44 | { |
45 | /* Initialize processor: 3.6864 MHz crystal */ | 45 | /* Initialize processor: 3.6864 MHz crystal */ |
46 | at91_initialize(3686400); | 46 | at91_initialize(3686400); |
47 | |||
48 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
49 | at91_register_uart(0, 0, 0); | ||
50 | |||
51 | /* make console=ttyS0 (ie, DBGU) the default */ | ||
52 | at91_set_serial_console(0); | ||
53 | } | 47 | } |
54 | 48 | ||
55 | static struct macb_platform_data __initdata csb637_eth_data = { | 49 | static struct macb_platform_data __initdata csb637_eth_data = { |
@@ -118,6 +112,8 @@ static void __init csb637_board_init(void) | |||
118 | /* LED(s) */ | 112 | /* LED(s) */ |
119 | at91_gpio_leds(csb_leds, ARRAY_SIZE(csb_leds)); | 113 | at91_gpio_leds(csb_leds, ARRAY_SIZE(csb_leds)); |
120 | /* Serial */ | 114 | /* Serial */ |
115 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
116 | at91_register_uart(0, 0, 0); | ||
121 | at91_add_device_serial(); | 117 | at91_add_device_serial(); |
122 | /* Ethernet */ | 118 | /* Ethernet */ |
123 | at91_add_device_eth(&csb637_eth_data); | 119 | at91_add_device_eth(&csb637_eth_data); |
diff --git a/arch/arm/mach-at91/board-dt.c b/arch/arm/mach-at91/board-dt.c index c18d4d30780..a1fce05aa7a 100644 --- a/arch/arm/mach-at91/board-dt.c +++ b/arch/arm/mach-at91/board-dt.c | |||
@@ -1,10 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Setup code for AT91SAM Evaluation Kits with Device Tree support | 2 | * Setup code for AT91SAM Evaluation Kits with Device Tree support |
3 | * | 3 | * |
4 | * Covers: * AT91SAM9G45-EKES board | ||
5 | * * AT91SAM9M10-EKES board | ||
6 | * * AT91SAM9M10G45-EK board | ||
7 | * | ||
8 | * Copyright (C) 2011 Atmel, | 4 | * Copyright (C) 2011 Atmel, |
9 | * 2011 Nicolas Ferre <nicolas.ferre@atmel.com> | 5 | * 2011 Nicolas Ferre <nicolas.ferre@atmel.com> |
10 | * | 6 | * |
@@ -49,9 +45,7 @@ static void __init at91_dt_device_init(void) | |||
49 | } | 45 | } |
50 | 46 | ||
51 | static const char *at91_dt_board_compat[] __initdata = { | 47 | static const char *at91_dt_board_compat[] __initdata = { |
52 | "atmel,at91sam9m10g45ek", | 48 | "atmel,at91sam9", |
53 | "atmel,at91sam9x5ek", | ||
54 | "calao,usb-a9g20", | ||
55 | NULL | 49 | NULL |
56 | }; | 50 | }; |
57 | 51 | ||
diff --git a/arch/arm/mach-at91/board-eb9200.c b/arch/arm/mach-at91/board-eb9200.c index d302ca3eeb6..bd101729798 100644 --- a/arch/arm/mach-at91/board-eb9200.c +++ b/arch/arm/mach-at91/board-eb9200.c | |||
@@ -44,20 +44,6 @@ static void __init eb9200_init_early(void) | |||
44 | { | 44 | { |
45 | /* Initialize processor: 18.432 MHz crystal */ | 45 | /* Initialize processor: 18.432 MHz crystal */ |
46 | at91_initialize(18432000); | 46 | at91_initialize(18432000); |
47 | |||
48 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
49 | at91_register_uart(0, 0, 0); | ||
50 | |||
51 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
52 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
53 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
54 | | ATMEL_UART_RI); | ||
55 | |||
56 | /* USART2 on ttyS2. (Rx, Tx) - IRDA */ | ||
57 | at91_register_uart(AT91RM9200_ID_US2, 2, 0); | ||
58 | |||
59 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
60 | at91_set_serial_console(0); | ||
61 | } | 47 | } |
62 | 48 | ||
63 | static struct macb_platform_data __initdata eb9200_eth_data = { | 49 | static struct macb_platform_data __initdata eb9200_eth_data = { |
@@ -101,6 +87,16 @@ static struct i2c_board_info __initdata eb9200_i2c_devices[] = { | |||
101 | static void __init eb9200_board_init(void) | 87 | static void __init eb9200_board_init(void) |
102 | { | 88 | { |
103 | /* Serial */ | 89 | /* Serial */ |
90 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
91 | at91_register_uart(0, 0, 0); | ||
92 | |||
93 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
94 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
95 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
96 | | ATMEL_UART_RI); | ||
97 | |||
98 | /* USART2 on ttyS2. (Rx, Tx) - IRDA */ | ||
99 | at91_register_uart(AT91RM9200_ID_US2, 2, 0); | ||
104 | at91_add_device_serial(); | 100 | at91_add_device_serial(); |
105 | /* Ethernet */ | 101 | /* Ethernet */ |
106 | at91_add_device_eth(&eb9200_eth_data); | 102 | at91_add_device_eth(&eb9200_eth_data); |
diff --git a/arch/arm/mach-at91/board-ecbat91.c b/arch/arm/mach-at91/board-ecbat91.c index 69966ce4d77..89cc3726a9c 100644 --- a/arch/arm/mach-at91/board-ecbat91.c +++ b/arch/arm/mach-at91/board-ecbat91.c | |||
@@ -50,18 +50,6 @@ static void __init ecb_at91init_early(void) | |||
50 | 50 | ||
51 | /* Initialize processor: 18.432 MHz crystal */ | 51 | /* Initialize processor: 18.432 MHz crystal */ |
52 | at91_initialize(18432000); | 52 | at91_initialize(18432000); |
53 | |||
54 | /* Setup the LEDs */ | ||
55 | at91_init_leds(AT91_PIN_PC7, AT91_PIN_PC7); | ||
56 | |||
57 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
58 | at91_register_uart(0, 0, 0); | ||
59 | |||
60 | /* USART0 on ttyS1. (Rx & Tx only) */ | ||
61 | at91_register_uart(AT91RM9200_ID_US0, 1, 0); | ||
62 | |||
63 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
64 | at91_set_serial_console(0); | ||
65 | } | 53 | } |
66 | 54 | ||
67 | static struct macb_platform_data __initdata ecb_at91eth_data = { | 55 | static struct macb_platform_data __initdata ecb_at91eth_data = { |
@@ -151,7 +139,15 @@ static struct spi_board_info __initdata ecb_at91spi_devices[] = { | |||
151 | 139 | ||
152 | static void __init ecb_at91board_init(void) | 140 | static void __init ecb_at91board_init(void) |
153 | { | 141 | { |
142 | /* Setup the LEDs */ | ||
143 | at91_init_leds(AT91_PIN_PC7, AT91_PIN_PC7); | ||
144 | |||
154 | /* Serial */ | 145 | /* Serial */ |
146 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
147 | at91_register_uart(0, 0, 0); | ||
148 | |||
149 | /* USART0 on ttyS1. (Rx & Tx only) */ | ||
150 | at91_register_uart(AT91RM9200_ID_US0, 1, 0); | ||
155 | at91_add_device_serial(); | 151 | at91_add_device_serial(); |
156 | 152 | ||
157 | /* Ethernet */ | 153 | /* Ethernet */ |
diff --git a/arch/arm/mach-at91/board-eco920.c b/arch/arm/mach-at91/board-eco920.c index f23aabef855..558546cf63f 100644 --- a/arch/arm/mach-at91/board-eco920.c +++ b/arch/arm/mach-at91/board-eco920.c | |||
@@ -37,15 +37,6 @@ static void __init eco920_init_early(void) | |||
37 | at91rm9200_set_type(ARCH_REVISON_9200_PQFP); | 37 | at91rm9200_set_type(ARCH_REVISON_9200_PQFP); |
38 | 38 | ||
39 | at91_initialize(18432000); | 39 | at91_initialize(18432000); |
40 | |||
41 | /* Setup the LEDs */ | ||
42 | at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1); | ||
43 | |||
44 | /* DBGU on ttyS0. (Rx & Tx only */ | ||
45 | at91_register_uart(0, 0, 0); | ||
46 | |||
47 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
48 | at91_set_serial_console(0); | ||
49 | } | 40 | } |
50 | 41 | ||
51 | static struct macb_platform_data __initdata eco920_eth_data = { | 42 | static struct macb_platform_data __initdata eco920_eth_data = { |
@@ -103,6 +94,10 @@ static struct spi_board_info eco920_spi_devices[] = { | |||
103 | 94 | ||
104 | static void __init eco920_board_init(void) | 95 | static void __init eco920_board_init(void) |
105 | { | 96 | { |
97 | /* Setup the LEDs */ | ||
98 | at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1); | ||
99 | /* DBGU on ttyS0. (Rx & Tx only */ | ||
100 | at91_register_uart(0, 0, 0); | ||
106 | at91_add_device_serial(); | 101 | at91_add_device_serial(); |
107 | at91_add_device_eth(&eco920_eth_data); | 102 | at91_add_device_eth(&eco920_eth_data); |
108 | at91_add_device_usbh(&eco920_usbh_data); | 103 | at91_add_device_usbh(&eco920_usbh_data); |
diff --git a/arch/arm/mach-at91/board-flexibity.c b/arch/arm/mach-at91/board-flexibity.c index 1815152001f..47658f78105 100644 --- a/arch/arm/mach-at91/board-flexibity.c +++ b/arch/arm/mach-at91/board-flexibity.c | |||
@@ -41,12 +41,6 @@ static void __init flexibity_init_early(void) | |||
41 | { | 41 | { |
42 | /* Initialize processor: 18.432 MHz crystal */ | 42 | /* Initialize processor: 18.432 MHz crystal */ |
43 | at91_initialize(18432000); | 43 | at91_initialize(18432000); |
44 | |||
45 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
46 | at91_register_uart(0, 0, 0); | ||
47 | |||
48 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
49 | at91_set_serial_console(0); | ||
50 | } | 44 | } |
51 | 45 | ||
52 | /* USB Host port */ | 46 | /* USB Host port */ |
@@ -143,6 +137,8 @@ static struct gpio_led flexibity_leds[] = { | |||
143 | static void __init flexibity_board_init(void) | 137 | static void __init flexibity_board_init(void) |
144 | { | 138 | { |
145 | /* Serial */ | 139 | /* Serial */ |
140 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
141 | at91_register_uart(0, 0, 0); | ||
146 | at91_add_device_serial(); | 142 | at91_add_device_serial(); |
147 | /* USB Host */ | 143 | /* USB Host */ |
148 | at91_add_device_usbh(&flexibity_usbh_data); | 144 | at91_add_device_usbh(&flexibity_usbh_data); |
diff --git a/arch/arm/mach-at91/board-foxg20.c b/arch/arm/mach-at91/board-foxg20.c index caf017f0f4e..33411e6ecb1 100644 --- a/arch/arm/mach-at91/board-foxg20.c +++ b/arch/arm/mach-at91/board-foxg20.c | |||
@@ -61,44 +61,6 @@ static void __init foxg20_init_early(void) | |||
61 | { | 61 | { |
62 | /* Initialize processor: 18.432 MHz crystal */ | 62 | /* Initialize processor: 18.432 MHz crystal */ |
63 | at91_initialize(18432000); | 63 | at91_initialize(18432000); |
64 | |||
65 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
66 | at91_register_uart(0, 0, 0); | ||
67 | |||
68 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
69 | at91_register_uart(AT91SAM9260_ID_US0, 1, | ||
70 | ATMEL_UART_CTS | ||
71 | | ATMEL_UART_RTS | ||
72 | | ATMEL_UART_DTR | ||
73 | | ATMEL_UART_DSR | ||
74 | | ATMEL_UART_DCD | ||
75 | | ATMEL_UART_RI); | ||
76 | |||
77 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
78 | at91_register_uart(AT91SAM9260_ID_US1, 2, | ||
79 | ATMEL_UART_CTS | ||
80 | | ATMEL_UART_RTS); | ||
81 | |||
82 | /* USART2 on ttyS3. (Rx & Tx only) */ | ||
83 | at91_register_uart(AT91SAM9260_ID_US2, 3, 0); | ||
84 | |||
85 | /* USART3 on ttyS4. (Rx, Tx, RTS, CTS) */ | ||
86 | at91_register_uart(AT91SAM9260_ID_US3, 4, | ||
87 | ATMEL_UART_CTS | ||
88 | | ATMEL_UART_RTS); | ||
89 | |||
90 | /* USART4 on ttyS5. (Rx & Tx only) */ | ||
91 | at91_register_uart(AT91SAM9260_ID_US4, 5, 0); | ||
92 | |||
93 | /* USART5 on ttyS6. (Rx & Tx only) */ | ||
94 | at91_register_uart(AT91SAM9260_ID_US5, 6, 0); | ||
95 | |||
96 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
97 | at91_set_serial_console(0); | ||
98 | |||
99 | /* Set the internal pull-up resistor on DRXD */ | ||
100 | at91_set_A_periph(AT91_PIN_PB14, 1); | ||
101 | |||
102 | } | 64 | } |
103 | 65 | ||
104 | /* | 66 | /* |
@@ -241,6 +203,39 @@ static struct i2c_board_info __initdata foxg20_i2c_devices[] = { | |||
241 | static void __init foxg20_board_init(void) | 203 | static void __init foxg20_board_init(void) |
242 | { | 204 | { |
243 | /* Serial */ | 205 | /* Serial */ |
206 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
207 | at91_register_uart(0, 0, 0); | ||
208 | |||
209 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
210 | at91_register_uart(AT91SAM9260_ID_US0, 1, | ||
211 | ATMEL_UART_CTS | ||
212 | | ATMEL_UART_RTS | ||
213 | | ATMEL_UART_DTR | ||
214 | | ATMEL_UART_DSR | ||
215 | | ATMEL_UART_DCD | ||
216 | | ATMEL_UART_RI); | ||
217 | |||
218 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
219 | at91_register_uart(AT91SAM9260_ID_US1, 2, | ||
220 | ATMEL_UART_CTS | ||
221 | | ATMEL_UART_RTS); | ||
222 | |||
223 | /* USART2 on ttyS3. (Rx & Tx only) */ | ||
224 | at91_register_uart(AT91SAM9260_ID_US2, 3, 0); | ||
225 | |||
226 | /* USART3 on ttyS4. (Rx, Tx, RTS, CTS) */ | ||
227 | at91_register_uart(AT91SAM9260_ID_US3, 4, | ||
228 | ATMEL_UART_CTS | ||
229 | | ATMEL_UART_RTS); | ||
230 | |||
231 | /* USART4 on ttyS5. (Rx & Tx only) */ | ||
232 | at91_register_uart(AT91SAM9260_ID_US4, 5, 0); | ||
233 | |||
234 | /* USART5 on ttyS6. (Rx & Tx only) */ | ||
235 | at91_register_uart(AT91SAM9260_ID_US5, 6, 0); | ||
236 | |||
237 | /* Set the internal pull-up resistor on DRXD */ | ||
238 | at91_set_A_periph(AT91_PIN_PB14, 1); | ||
244 | at91_add_device_serial(); | 239 | at91_add_device_serial(); |
245 | /* USB Host */ | 240 | /* USB Host */ |
246 | at91_add_device_usbh(&foxg20_usbh_data); | 241 | at91_add_device_usbh(&foxg20_usbh_data); |
diff --git a/arch/arm/mach-at91/board-gsia18s.c b/arch/arm/mach-at91/board-gsia18s.c index 230e71969fb..3e0dfa643a8 100644 --- a/arch/arm/mach-at91/board-gsia18s.c +++ b/arch/arm/mach-at91/board-gsia18s.c | |||
@@ -41,38 +41,6 @@ | |||
41 | static void __init gsia18s_init_early(void) | 41 | static void __init gsia18s_init_early(void) |
42 | { | 42 | { |
43 | stamp9g20_init_early(); | 43 | stamp9g20_init_early(); |
44 | |||
45 | /* | ||
46 | * USART0 on ttyS1 (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI). | ||
47 | * Used for Internal Analog Modem. | ||
48 | */ | ||
49 | at91_register_uart(AT91SAM9260_ID_US0, 1, | ||
50 | ATMEL_UART_CTS | ATMEL_UART_RTS | | ||
51 | ATMEL_UART_DTR | ATMEL_UART_DSR | | ||
52 | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
53 | /* | ||
54 | * USART1 on ttyS2 (Rx, Tx, CTS, RTS). | ||
55 | * Used for GPS or WiFi or Data stream. | ||
56 | */ | ||
57 | at91_register_uart(AT91SAM9260_ID_US1, 2, | ||
58 | ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
59 | /* | ||
60 | * USART2 on ttyS3 (Rx, Tx, CTS, RTS). | ||
61 | * Used for External Modem. | ||
62 | */ | ||
63 | at91_register_uart(AT91SAM9260_ID_US2, 3, | ||
64 | ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
65 | /* | ||
66 | * USART3 on ttyS4 (Rx, Tx, RTS). | ||
67 | * Used for RS-485. | ||
68 | */ | ||
69 | at91_register_uart(AT91SAM9260_ID_US3, 4, ATMEL_UART_RTS); | ||
70 | |||
71 | /* | ||
72 | * USART4 on ttyS5 (Rx, Tx). | ||
73 | * Used for TRX433 Radio Module. | ||
74 | */ | ||
75 | at91_register_uart(AT91SAM9260_ID_US4, 5, 0); | ||
76 | } | 44 | } |
77 | 45 | ||
78 | /* | 46 | /* |
@@ -558,6 +526,37 @@ static int __init gsia18s_power_off_init(void) | |||
558 | 526 | ||
559 | static void __init gsia18s_board_init(void) | 527 | static void __init gsia18s_board_init(void) |
560 | { | 528 | { |
529 | /* | ||
530 | * USART0 on ttyS1 (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI). | ||
531 | * Used for Internal Analog Modem. | ||
532 | */ | ||
533 | at91_register_uart(AT91SAM9260_ID_US0, 1, | ||
534 | ATMEL_UART_CTS | ATMEL_UART_RTS | | ||
535 | ATMEL_UART_DTR | ATMEL_UART_DSR | | ||
536 | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
537 | /* | ||
538 | * USART1 on ttyS2 (Rx, Tx, CTS, RTS). | ||
539 | * Used for GPS or WiFi or Data stream. | ||
540 | */ | ||
541 | at91_register_uart(AT91SAM9260_ID_US1, 2, | ||
542 | ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
543 | /* | ||
544 | * USART2 on ttyS3 (Rx, Tx, CTS, RTS). | ||
545 | * Used for External Modem. | ||
546 | */ | ||
547 | at91_register_uart(AT91SAM9260_ID_US2, 3, | ||
548 | ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
549 | /* | ||
550 | * USART3 on ttyS4 (Rx, Tx, RTS). | ||
551 | * Used for RS-485. | ||
552 | */ | ||
553 | at91_register_uart(AT91SAM9260_ID_US3, 4, ATMEL_UART_RTS); | ||
554 | |||
555 | /* | ||
556 | * USART4 on ttyS5 (Rx, Tx). | ||
557 | * Used for TRX433 Radio Module. | ||
558 | */ | ||
559 | at91_register_uart(AT91SAM9260_ID_US4, 5, 0); | ||
561 | stamp9g20_board_init(); | 560 | stamp9g20_board_init(); |
562 | at91_add_device_usbh(&usbh_data); | 561 | at91_add_device_usbh(&usbh_data); |
563 | at91_add_device_udc(&udc_data); | 562 | at91_add_device_udc(&udc_data); |
diff --git a/arch/arm/mach-at91/board-kafa.c b/arch/arm/mach-at91/board-kafa.c index efde1b2327c..f260657f32b 100644 --- a/arch/arm/mach-at91/board-kafa.c +++ b/arch/arm/mach-at91/board-kafa.c | |||
@@ -47,18 +47,6 @@ static void __init kafa_init_early(void) | |||
47 | 47 | ||
48 | /* Initialize processor: 18.432 MHz crystal */ | 48 | /* Initialize processor: 18.432 MHz crystal */ |
49 | at91_initialize(18432000); | 49 | at91_initialize(18432000); |
50 | |||
51 | /* Set up the LEDs */ | ||
52 | at91_init_leds(AT91_PIN_PB4, AT91_PIN_PB4); | ||
53 | |||
54 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
55 | at91_register_uart(0, 0, 0); | ||
56 | |||
57 | /* USART0 on ttyS1 (Rx, Tx, CTS, RTS) */ | ||
58 | at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
59 | |||
60 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
61 | at91_set_serial_console(0); | ||
62 | } | 50 | } |
63 | 51 | ||
64 | static struct macb_platform_data __initdata kafa_eth_data = { | 52 | static struct macb_platform_data __initdata kafa_eth_data = { |
@@ -79,7 +67,15 @@ static struct at91_udc_data __initdata kafa_udc_data = { | |||
79 | 67 | ||
80 | static void __init kafa_board_init(void) | 68 | static void __init kafa_board_init(void) |
81 | { | 69 | { |
70 | /* Set up the LEDs */ | ||
71 | at91_init_leds(AT91_PIN_PB4, AT91_PIN_PB4); | ||
72 | |||
82 | /* Serial */ | 73 | /* Serial */ |
74 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
75 | at91_register_uart(0, 0, 0); | ||
76 | |||
77 | /* USART0 on ttyS1 (Rx, Tx, CTS, RTS) */ | ||
78 | at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
83 | at91_add_device_serial(); | 79 | at91_add_device_serial(); |
84 | /* Ethernet */ | 80 | /* Ethernet */ |
85 | at91_add_device_eth(&kafa_eth_data); | 81 | at91_add_device_eth(&kafa_eth_data); |
diff --git a/arch/arm/mach-at91/board-kb9202.c b/arch/arm/mach-at91/board-kb9202.c index 59b92aab9bc..ba39db5482b 100644 --- a/arch/arm/mach-at91/board-kb9202.c +++ b/arch/arm/mach-at91/board-kb9202.c | |||
@@ -50,24 +50,6 @@ static void __init kb9202_init_early(void) | |||
50 | 50 | ||
51 | /* Initialize processor: 10 MHz crystal */ | 51 | /* Initialize processor: 10 MHz crystal */ |
52 | at91_initialize(10000000); | 52 | at91_initialize(10000000); |
53 | |||
54 | /* Set up the LEDs */ | ||
55 | at91_init_leds(AT91_PIN_PC19, AT91_PIN_PC18); | ||
56 | |||
57 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
58 | at91_register_uart(0, 0, 0); | ||
59 | |||
60 | /* USART0 on ttyS1 (Rx & Tx only) */ | ||
61 | at91_register_uart(AT91RM9200_ID_US0, 1, 0); | ||
62 | |||
63 | /* USART1 on ttyS2 (Rx & Tx only) - IRDA (optional) */ | ||
64 | at91_register_uart(AT91RM9200_ID_US1, 2, 0); | ||
65 | |||
66 | /* USART3 on ttyS3 (Rx, Tx, CTS, RTS) - RS485 (optional) */ | ||
67 | at91_register_uart(AT91RM9200_ID_US3, 3, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
68 | |||
69 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
70 | at91_set_serial_console(0); | ||
71 | } | 53 | } |
72 | 54 | ||
73 | static struct macb_platform_data __initdata kb9202_eth_data = { | 55 | static struct macb_platform_data __initdata kb9202_eth_data = { |
@@ -115,7 +97,21 @@ static struct atmel_nand_data __initdata kb9202_nand_data = { | |||
115 | 97 | ||
116 | static void __init kb9202_board_init(void) | 98 | static void __init kb9202_board_init(void) |
117 | { | 99 | { |
100 | /* Set up the LEDs */ | ||
101 | at91_init_leds(AT91_PIN_PC19, AT91_PIN_PC18); | ||
102 | |||
118 | /* Serial */ | 103 | /* Serial */ |
104 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
105 | at91_register_uart(0, 0, 0); | ||
106 | |||
107 | /* USART0 on ttyS1 (Rx & Tx only) */ | ||
108 | at91_register_uart(AT91RM9200_ID_US0, 1, 0); | ||
109 | |||
110 | /* USART1 on ttyS2 (Rx & Tx only) - IRDA (optional) */ | ||
111 | at91_register_uart(AT91RM9200_ID_US1, 2, 0); | ||
112 | |||
113 | /* USART3 on ttyS3 (Rx, Tx, CTS, RTS) - RS485 (optional) */ | ||
114 | at91_register_uart(AT91RM9200_ID_US3, 3, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
119 | at91_add_device_serial(); | 115 | at91_add_device_serial(); |
120 | /* Ethernet */ | 116 | /* Ethernet */ |
121 | at91_add_device_eth(&kb9202_eth_data); | 117 | at91_add_device_eth(&kb9202_eth_data); |
diff --git a/arch/arm/mach-at91/board-neocore926.c b/arch/arm/mach-at91/board-neocore926.c index 57d5f6a4726..d2f4cc16176 100644 --- a/arch/arm/mach-at91/board-neocore926.c +++ b/arch/arm/mach-at91/board-neocore926.c | |||
@@ -55,15 +55,6 @@ static void __init neocore926_init_early(void) | |||
55 | { | 55 | { |
56 | /* Initialize processor: 20 MHz crystal */ | 56 | /* Initialize processor: 20 MHz crystal */ |
57 | at91_initialize(20000000); | 57 | at91_initialize(20000000); |
58 | |||
59 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
60 | at91_register_uart(0, 0, 0); | ||
61 | |||
62 | /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */ | ||
63 | at91_register_uart(AT91SAM9263_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
64 | |||
65 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
66 | at91_set_serial_console(0); | ||
67 | } | 58 | } |
68 | 59 | ||
69 | /* | 60 | /* |
@@ -341,6 +332,11 @@ static struct ac97c_platform_data neocore926_ac97_data = { | |||
341 | static void __init neocore926_board_init(void) | 332 | static void __init neocore926_board_init(void) |
342 | { | 333 | { |
343 | /* Serial */ | 334 | /* Serial */ |
335 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
336 | at91_register_uart(0, 0, 0); | ||
337 | |||
338 | /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */ | ||
339 | at91_register_uart(AT91SAM9263_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
344 | at91_add_device_serial(); | 340 | at91_add_device_serial(); |
345 | 341 | ||
346 | /* USB Host */ | 342 | /* USB Host */ |
diff --git a/arch/arm/mach-at91/board-pcontrol-g20.c b/arch/arm/mach-at91/board-pcontrol-g20.c index b4a12fc184c..7fe63834242 100644 --- a/arch/arm/mach-at91/board-pcontrol-g20.c +++ b/arch/arm/mach-at91/board-pcontrol-g20.c | |||
@@ -40,17 +40,6 @@ | |||
40 | static void __init pcontrol_g20_init_early(void) | 40 | static void __init pcontrol_g20_init_early(void) |
41 | { | 41 | { |
42 | stamp9g20_init_early(); | 42 | stamp9g20_init_early(); |
43 | |||
44 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) piggyback A2 */ | ||
45 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ||
46 | | ATMEL_UART_RTS); | ||
47 | |||
48 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) isolated RS485 X5 */ | ||
49 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ||
50 | | ATMEL_UART_RTS); | ||
51 | |||
52 | /* USART2 on ttyS3. (Rx, Tx) 9bit-Bus Multidrop-mode X4 */ | ||
53 | at91_register_uart(AT91SAM9260_ID_US4, 3, 0); | ||
54 | } | 43 | } |
55 | 44 | ||
56 | static struct sam9_smc_config __initdata pcontrol_smc_config[2] = { { | 45 | static struct sam9_smc_config __initdata pcontrol_smc_config[2] = { { |
@@ -199,6 +188,16 @@ static struct spi_board_info pcontrol_g20_spi_devices[] = { | |||
199 | 188 | ||
200 | static void __init pcontrol_g20_board_init(void) | 189 | static void __init pcontrol_g20_board_init(void) |
201 | { | 190 | { |
191 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) piggyback A2 */ | ||
192 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ||
193 | | ATMEL_UART_RTS); | ||
194 | |||
195 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) isolated RS485 X5 */ | ||
196 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ||
197 | | ATMEL_UART_RTS); | ||
198 | |||
199 | /* USART2 on ttyS3. (Rx, Tx) 9bit-Bus Multidrop-mode X4 */ | ||
200 | at91_register_uart(AT91SAM9260_ID_US4, 3, 0); | ||
202 | stamp9g20_board_init(); | 201 | stamp9g20_board_init(); |
203 | at91_add_device_usbh(&usbh_data); | 202 | at91_add_device_usbh(&usbh_data); |
204 | at91_add_device_eth(&macb_data); | 203 | at91_add_device_eth(&macb_data); |
diff --git a/arch/arm/mach-at91/board-picotux200.c b/arch/arm/mach-at91/board-picotux200.c index 59e35dd1486..b45c0a5d5ca 100644 --- a/arch/arm/mach-at91/board-picotux200.c +++ b/arch/arm/mach-at91/board-picotux200.c | |||
@@ -48,17 +48,6 @@ static void __init picotux200_init_early(void) | |||
48 | { | 48 | { |
49 | /* Initialize processor: 18.432 MHz crystal */ | 49 | /* Initialize processor: 18.432 MHz crystal */ |
50 | at91_initialize(18432000); | 50 | at91_initialize(18432000); |
51 | |||
52 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
53 | at91_register_uart(0, 0, 0); | ||
54 | |||
55 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
56 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
57 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
58 | | ATMEL_UART_RI); | ||
59 | |||
60 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
61 | at91_set_serial_console(0); | ||
62 | } | 51 | } |
63 | 52 | ||
64 | static struct macb_platform_data __initdata picotux200_eth_data = { | 53 | static struct macb_platform_data __initdata picotux200_eth_data = { |
@@ -106,6 +95,13 @@ static struct platform_device picotux200_flash = { | |||
106 | static void __init picotux200_board_init(void) | 95 | static void __init picotux200_board_init(void) |
107 | { | 96 | { |
108 | /* Serial */ | 97 | /* Serial */ |
98 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
99 | at91_register_uart(0, 0, 0); | ||
100 | |||
101 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
102 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
103 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
104 | | ATMEL_UART_RI); | ||
109 | at91_add_device_serial(); | 105 | at91_add_device_serial(); |
110 | /* Ethernet */ | 106 | /* Ethernet */ |
111 | at91_add_device_eth(&picotux200_eth_data); | 107 | at91_add_device_eth(&picotux200_eth_data); |
diff --git a/arch/arm/mach-at91/board-qil-a9260.c b/arch/arm/mach-at91/board-qil-a9260.c index b6ed5ed7081..0c61bf0d272 100644 --- a/arch/arm/mach-at91/board-qil-a9260.c +++ b/arch/arm/mach-at91/board-qil-a9260.c | |||
@@ -52,24 +52,6 @@ static void __init ek_init_early(void) | |||
52 | { | 52 | { |
53 | /* Initialize processor: 12.000 MHz crystal */ | 53 | /* Initialize processor: 12.000 MHz crystal */ |
54 | at91_initialize(12000000); | 54 | at91_initialize(12000000); |
55 | |||
56 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
57 | at91_register_uart(0, 0, 0); | ||
58 | |||
59 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
60 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
61 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
62 | | ATMEL_UART_RI); | ||
63 | |||
64 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */ | ||
65 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
66 | |||
67 | /* USART2 on ttyS3. (Rx, Tx, CTS, RTS) */ | ||
68 | at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
69 | |||
70 | /* set serial console to ttyS1 (ie, USART0) */ | ||
71 | at91_set_serial_console(1); | ||
72 | |||
73 | } | 55 | } |
74 | 56 | ||
75 | /* | 57 | /* |
@@ -235,6 +217,19 @@ static struct gpio_led ek_leds[] = { | |||
235 | static void __init ek_board_init(void) | 217 | static void __init ek_board_init(void) |
236 | { | 218 | { |
237 | /* Serial */ | 219 | /* Serial */ |
220 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
221 | at91_register_uart(0, 0, 0); | ||
222 | |||
223 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
224 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
225 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
226 | | ATMEL_UART_RI); | ||
227 | |||
228 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */ | ||
229 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
230 | |||
231 | /* USART2 on ttyS3. (Rx, Tx, CTS, RTS) */ | ||
232 | at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
238 | at91_add_device_serial(); | 233 | at91_add_device_serial(); |
239 | /* USB Host */ | 234 | /* USB Host */ |
240 | at91_add_device_usbh(&ek_usbh_data); | 235 | at91_add_device_usbh(&ek_usbh_data); |
diff --git a/arch/arm/mach-at91/board-rm9200dk.c b/arch/arm/mach-at91/board-rm9200dk.c index 01332aa538b..afd7a471376 100644 --- a/arch/arm/mach-at91/board-rm9200dk.c +++ b/arch/arm/mach-at91/board-rm9200dk.c | |||
@@ -50,20 +50,6 @@ static void __init dk_init_early(void) | |||
50 | { | 50 | { |
51 | /* Initialize processor: 18.432 MHz crystal */ | 51 | /* Initialize processor: 18.432 MHz crystal */ |
52 | at91_initialize(18432000); | 52 | at91_initialize(18432000); |
53 | |||
54 | /* Setup the LEDs */ | ||
55 | at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2); | ||
56 | |||
57 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
58 | at91_register_uart(0, 0, 0); | ||
59 | |||
60 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
61 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
62 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
63 | | ATMEL_UART_RI); | ||
64 | |||
65 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
66 | at91_set_serial_console(0); | ||
67 | } | 53 | } |
68 | 54 | ||
69 | static struct macb_platform_data __initdata dk_eth_data = { | 55 | static struct macb_platform_data __initdata dk_eth_data = { |
@@ -190,7 +176,17 @@ static struct gpio_led dk_leds[] = { | |||
190 | 176 | ||
191 | static void __init dk_board_init(void) | 177 | static void __init dk_board_init(void) |
192 | { | 178 | { |
179 | /* Setup the LEDs */ | ||
180 | at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2); | ||
181 | |||
193 | /* Serial */ | 182 | /* Serial */ |
183 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
184 | at91_register_uart(0, 0, 0); | ||
185 | |||
186 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
187 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
188 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
189 | | ATMEL_UART_RI); | ||
194 | at91_add_device_serial(); | 190 | at91_add_device_serial(); |
195 | /* Ethernet */ | 191 | /* Ethernet */ |
196 | at91_add_device_eth(&dk_eth_data); | 192 | at91_add_device_eth(&dk_eth_data); |
diff --git a/arch/arm/mach-at91/board-rm9200ek.c b/arch/arm/mach-at91/board-rm9200ek.c index b2e4fe21f34..2b15b8adec4 100644 --- a/arch/arm/mach-at91/board-rm9200ek.c +++ b/arch/arm/mach-at91/board-rm9200ek.c | |||
@@ -50,20 +50,6 @@ static void __init ek_init_early(void) | |||
50 | { | 50 | { |
51 | /* Initialize processor: 18.432 MHz crystal */ | 51 | /* Initialize processor: 18.432 MHz crystal */ |
52 | at91_initialize(18432000); | 52 | at91_initialize(18432000); |
53 | |||
54 | /* Setup the LEDs */ | ||
55 | at91_init_leds(AT91_PIN_PB1, AT91_PIN_PB2); | ||
56 | |||
57 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
58 | at91_register_uart(0, 0, 0); | ||
59 | |||
60 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
61 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
62 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
63 | | ATMEL_UART_RI); | ||
64 | |||
65 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
66 | at91_set_serial_console(0); | ||
67 | } | 53 | } |
68 | 54 | ||
69 | static struct macb_platform_data __initdata ek_eth_data = { | 55 | static struct macb_platform_data __initdata ek_eth_data = { |
@@ -161,7 +147,17 @@ static struct gpio_led ek_leds[] = { | |||
161 | 147 | ||
162 | static void __init ek_board_init(void) | 148 | static void __init ek_board_init(void) |
163 | { | 149 | { |
150 | /* Setup the LEDs */ | ||
151 | at91_init_leds(AT91_PIN_PB1, AT91_PIN_PB2); | ||
152 | |||
164 | /* Serial */ | 153 | /* Serial */ |
154 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
155 | at91_register_uart(0, 0, 0); | ||
156 | |||
157 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
158 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
159 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
160 | | ATMEL_UART_RI); | ||
165 | at91_add_device_serial(); | 161 | at91_add_device_serial(); |
166 | /* Ethernet */ | 162 | /* Ethernet */ |
167 | at91_add_device_eth(&ek_eth_data); | 163 | at91_add_device_eth(&ek_eth_data); |
diff --git a/arch/arm/mach-at91/board-rsi-ews.c b/arch/arm/mach-at91/board-rsi-ews.c index af0750fafa2..24ab9be7510 100644 --- a/arch/arm/mach-at91/board-rsi-ews.c +++ b/arch/arm/mach-at91/board-rsi-ews.c | |||
@@ -35,26 +35,6 @@ static void __init rsi_ews_init_early(void) | |||
35 | { | 35 | { |
36 | /* Initialize processor: 18.432 MHz crystal */ | 36 | /* Initialize processor: 18.432 MHz crystal */ |
37 | at91_initialize(18432000); | 37 | at91_initialize(18432000); |
38 | |||
39 | /* Setup the LEDs */ | ||
40 | at91_init_leds(AT91_PIN_PB6, AT91_PIN_PB9); | ||
41 | |||
42 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
43 | /* This one is for debugging */ | ||
44 | at91_register_uart(0, 0, 0); | ||
45 | |||
46 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
47 | /* Dialin/-out modem interface */ | ||
48 | at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
49 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
50 | | ATMEL_UART_RI); | ||
51 | |||
52 | /* USART3 on ttyS4. (Rx, Tx, RTS) */ | ||
53 | /* RS485 communication */ | ||
54 | at91_register_uart(AT91RM9200_ID_US3, 4, ATMEL_UART_RTS); | ||
55 | |||
56 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
57 | at91_set_serial_console(0); | ||
58 | } | 38 | } |
59 | 39 | ||
60 | /* | 40 | /* |
@@ -204,7 +184,23 @@ static struct platform_device rsiews_nor_flash = { | |||
204 | */ | 184 | */ |
205 | static void __init rsi_ews_board_init(void) | 185 | static void __init rsi_ews_board_init(void) |
206 | { | 186 | { |
187 | /* Setup the LEDs */ | ||
188 | at91_init_leds(AT91_PIN_PB6, AT91_PIN_PB9); | ||
189 | |||
207 | /* Serial */ | 190 | /* Serial */ |
191 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
192 | /* This one is for debugging */ | ||
193 | at91_register_uart(0, 0, 0); | ||
194 | |||
195 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
196 | /* Dialin/-out modem interface */ | ||
197 | at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
198 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
199 | | ATMEL_UART_RI); | ||
200 | |||
201 | /* USART3 on ttyS4. (Rx, Tx, RTS) */ | ||
202 | /* RS485 communication */ | ||
203 | at91_register_uart(AT91RM9200_ID_US3, 4, ATMEL_UART_RTS); | ||
208 | at91_add_device_serial(); | 204 | at91_add_device_serial(); |
209 | at91_set_gpio_output(AT91_PIN_PA21, 0); | 205 | at91_set_gpio_output(AT91_PIN_PA21, 0); |
210 | /* Ethernet */ | 206 | /* Ethernet */ |
diff --git a/arch/arm/mach-at91/board-sam9-l9260.c b/arch/arm/mach-at91/board-sam9-l9260.c index e8b116b6cba..cdd21f2595d 100644 --- a/arch/arm/mach-at91/board-sam9-l9260.c +++ b/arch/arm/mach-at91/board-sam9-l9260.c | |||
@@ -48,23 +48,6 @@ static void __init ek_init_early(void) | |||
48 | { | 48 | { |
49 | /* Initialize processor: 18.432 MHz crystal */ | 49 | /* Initialize processor: 18.432 MHz crystal */ |
50 | at91_initialize(18432000); | 50 | at91_initialize(18432000); |
51 | |||
52 | /* Setup the LEDs */ | ||
53 | at91_init_leds(AT91_PIN_PA9, AT91_PIN_PA6); | ||
54 | |||
55 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
56 | at91_register_uart(0, 0, 0); | ||
57 | |||
58 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
59 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
60 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
61 | | ATMEL_UART_RI); | ||
62 | |||
63 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */ | ||
64 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
65 | |||
66 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
67 | at91_set_serial_console(0); | ||
68 | } | 51 | } |
69 | 52 | ||
70 | /* | 53 | /* |
@@ -184,7 +167,20 @@ static struct at91_mmc_data __initdata ek_mmc_data = { | |||
184 | 167 | ||
185 | static void __init ek_board_init(void) | 168 | static void __init ek_board_init(void) |
186 | { | 169 | { |
170 | /* Setup the LEDs */ | ||
171 | at91_init_leds(AT91_PIN_PA9, AT91_PIN_PA6); | ||
172 | |||
187 | /* Serial */ | 173 | /* Serial */ |
174 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
175 | at91_register_uart(0, 0, 0); | ||
176 | |||
177 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
178 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
179 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
180 | | ATMEL_UART_RI); | ||
181 | |||
182 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */ | ||
183 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
188 | at91_add_device_serial(); | 184 | at91_add_device_serial(); |
189 | /* USB Host */ | 185 | /* USB Host */ |
190 | at91_add_device_usbh(&ek_usbh_data); | 186 | at91_add_device_usbh(&ek_usbh_data); |
diff --git a/arch/arm/mach-at91/board-sam9260ek.c b/arch/arm/mach-at91/board-sam9260ek.c index d5aec55b0eb..7b3c3913551 100644 --- a/arch/arm/mach-at91/board-sam9260ek.c +++ b/arch/arm/mach-at91/board-sam9260ek.c | |||
@@ -54,20 +54,6 @@ static void __init ek_init_early(void) | |||
54 | { | 54 | { |
55 | /* Initialize processor: 18.432 MHz crystal */ | 55 | /* Initialize processor: 18.432 MHz crystal */ |
56 | at91_initialize(18432000); | 56 | at91_initialize(18432000); |
57 | |||
58 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
59 | at91_register_uart(0, 0, 0); | ||
60 | |||
61 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
62 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
63 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
64 | | ATMEL_UART_RI); | ||
65 | |||
66 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
67 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
68 | |||
69 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
70 | at91_set_serial_console(0); | ||
71 | } | 57 | } |
72 | 58 | ||
73 | /* | 59 | /* |
@@ -320,6 +306,16 @@ static void __init ek_add_device_buttons(void) {} | |||
320 | static void __init ek_board_init(void) | 306 | static void __init ek_board_init(void) |
321 | { | 307 | { |
322 | /* Serial */ | 308 | /* Serial */ |
309 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
310 | at91_register_uart(0, 0, 0); | ||
311 | |||
312 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
313 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
314 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
315 | | ATMEL_UART_RI); | ||
316 | |||
317 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
318 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
323 | at91_add_device_serial(); | 319 | at91_add_device_serial(); |
324 | /* USB Host */ | 320 | /* USB Host */ |
325 | at91_add_device_usbh(&ek_usbh_data); | 321 | at91_add_device_usbh(&ek_usbh_data); |
diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c index 065fed34242..2736453821b 100644 --- a/arch/arm/mach-at91/board-sam9261ek.c +++ b/arch/arm/mach-at91/board-sam9261ek.c | |||
@@ -58,15 +58,6 @@ static void __init ek_init_early(void) | |||
58 | { | 58 | { |
59 | /* Initialize processor: 18.432 MHz crystal */ | 59 | /* Initialize processor: 18.432 MHz crystal */ |
60 | at91_initialize(18432000); | 60 | at91_initialize(18432000); |
61 | |||
62 | /* Setup the LEDs */ | ||
63 | at91_init_leds(AT91_PIN_PA13, AT91_PIN_PA14); | ||
64 | |||
65 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
66 | at91_register_uart(0, 0, 0); | ||
67 | |||
68 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
69 | at91_set_serial_console(0); | ||
70 | } | 61 | } |
71 | 62 | ||
72 | /* | 63 | /* |
@@ -577,7 +568,12 @@ static struct gpio_led ek_leds[] = { | |||
577 | 568 | ||
578 | static void __init ek_board_init(void) | 569 | static void __init ek_board_init(void) |
579 | { | 570 | { |
571 | /* Setup the LEDs */ | ||
572 | at91_init_leds(AT91_PIN_PA13, AT91_PIN_PA14); | ||
573 | |||
580 | /* Serial */ | 574 | /* Serial */ |
575 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
576 | at91_register_uart(0, 0, 0); | ||
581 | at91_add_device_serial(); | 577 | at91_add_device_serial(); |
582 | /* USB Host */ | 578 | /* USB Host */ |
583 | at91_add_device_usbh(&ek_usbh_data); | 579 | at91_add_device_usbh(&ek_usbh_data); |
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c index 2ffe50f3a9e..983cb98d246 100644 --- a/arch/arm/mach-at91/board-sam9263ek.c +++ b/arch/arm/mach-at91/board-sam9263ek.c | |||
@@ -57,15 +57,6 @@ static void __init ek_init_early(void) | |||
57 | { | 57 | { |
58 | /* Initialize processor: 16.367 MHz crystal */ | 58 | /* Initialize processor: 16.367 MHz crystal */ |
59 | at91_initialize(16367660); | 59 | at91_initialize(16367660); |
60 | |||
61 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
62 | at91_register_uart(0, 0, 0); | ||
63 | |||
64 | /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */ | ||
65 | at91_register_uart(AT91SAM9263_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
66 | |||
67 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
68 | at91_set_serial_console(0); | ||
69 | } | 60 | } |
70 | 61 | ||
71 | /* | 62 | /* |
@@ -412,6 +403,11 @@ static struct at91_can_data ek_can_data = { | |||
412 | static void __init ek_board_init(void) | 403 | static void __init ek_board_init(void) |
413 | { | 404 | { |
414 | /* Serial */ | 405 | /* Serial */ |
406 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
407 | at91_register_uart(0, 0, 0); | ||
408 | |||
409 | /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */ | ||
410 | at91_register_uart(AT91SAM9263_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
415 | at91_add_device_serial(); | 411 | at91_add_device_serial(); |
416 | /* USB Host */ | 412 | /* USB Host */ |
417 | at91_add_device_usbh(&ek_usbh_data); | 413 | at91_add_device_usbh(&ek_usbh_data); |
diff --git a/arch/arm/mach-at91/board-sam9g20ek.c b/arch/arm/mach-at91/board-sam9g20ek.c index 8923ec9f583..3d615532ae5 100644 --- a/arch/arm/mach-at91/board-sam9g20ek.c +++ b/arch/arm/mach-at91/board-sam9g20ek.c | |||
@@ -65,20 +65,6 @@ static void __init ek_init_early(void) | |||
65 | { | 65 | { |
66 | /* Initialize processor: 18.432 MHz crystal */ | 66 | /* Initialize processor: 18.432 MHz crystal */ |
67 | at91_initialize(18432000); | 67 | at91_initialize(18432000); |
68 | |||
69 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
70 | at91_register_uart(0, 0, 0); | ||
71 | |||
72 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
73 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
74 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
75 | | ATMEL_UART_RI); | ||
76 | |||
77 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
78 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
79 | |||
80 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
81 | at91_set_serial_console(0); | ||
82 | } | 68 | } |
83 | 69 | ||
84 | /* | 70 | /* |
@@ -372,6 +358,16 @@ static struct i2c_board_info __initdata ek_i2c_devices[] = { | |||
372 | static void __init ek_board_init(void) | 358 | static void __init ek_board_init(void) |
373 | { | 359 | { |
374 | /* Serial */ | 360 | /* Serial */ |
361 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
362 | at91_register_uart(0, 0, 0); | ||
363 | |||
364 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
365 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
366 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
367 | | ATMEL_UART_RI); | ||
368 | |||
369 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
370 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
375 | at91_add_device_serial(); | 371 | at91_add_device_serial(); |
376 | /* USB Host */ | 372 | /* USB Host */ |
377 | at91_add_device_usbh(&ek_usbh_data); | 373 | at91_add_device_usbh(&ek_usbh_data); |
diff --git a/arch/arm/mach-at91/board-sam9m10g45ek.c b/arch/arm/mach-at91/board-sam9m10g45ek.c index c88e908ddd8..9a87f0b072f 100644 --- a/arch/arm/mach-at91/board-sam9m10g45ek.c +++ b/arch/arm/mach-at91/board-sam9m10g45ek.c | |||
@@ -53,16 +53,6 @@ static void __init ek_init_early(void) | |||
53 | { | 53 | { |
54 | /* Initialize processor: 12.000 MHz crystal */ | 54 | /* Initialize processor: 12.000 MHz crystal */ |
55 | at91_initialize(12000000); | 55 | at91_initialize(12000000); |
56 | |||
57 | /* DGBU on ttyS0. (Rx & Tx only) */ | ||
58 | at91_register_uart(0, 0, 0); | ||
59 | |||
60 | /* USART0 not connected on the -EK board */ | ||
61 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
62 | at91_register_uart(AT91SAM9G45_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
63 | |||
64 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
65 | at91_set_serial_console(0); | ||
66 | } | 56 | } |
67 | 57 | ||
68 | /* | 58 | /* |
@@ -457,6 +447,12 @@ static struct platform_device *devices[] __initdata = { | |||
457 | static void __init ek_board_init(void) | 447 | static void __init ek_board_init(void) |
458 | { | 448 | { |
459 | /* Serial */ | 449 | /* Serial */ |
450 | /* DGBU on ttyS0. (Rx & Tx only) */ | ||
451 | at91_register_uart(0, 0, 0); | ||
452 | |||
453 | /* USART0 not connected on the -EK board */ | ||
454 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
455 | at91_register_uart(AT91SAM9G45_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
460 | at91_add_device_serial(); | 456 | at91_add_device_serial(); |
461 | /* USB HS Host */ | 457 | /* USB HS Host */ |
462 | at91_add_device_usbh_ohci(&ek_usbh_hs_data); | 458 | at91_add_device_usbh_ohci(&ek_usbh_hs_data); |
diff --git a/arch/arm/mach-at91/board-sam9rlek.c b/arch/arm/mach-at91/board-sam9rlek.c index b109ce2ba86..be3239f13da 100644 --- a/arch/arm/mach-at91/board-sam9rlek.c +++ b/arch/arm/mach-at91/board-sam9rlek.c | |||
@@ -42,15 +42,6 @@ static void __init ek_init_early(void) | |||
42 | { | 42 | { |
43 | /* Initialize processor: 12.000 MHz crystal */ | 43 | /* Initialize processor: 12.000 MHz crystal */ |
44 | at91_initialize(12000000); | 44 | at91_initialize(12000000); |
45 | |||
46 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
47 | at91_register_uart(0, 0, 0); | ||
48 | |||
49 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) */ | ||
50 | at91_register_uart(AT91SAM9RL_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
51 | |||
52 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
53 | at91_set_serial_console(0); | ||
54 | } | 45 | } |
55 | 46 | ||
56 | /* | 47 | /* |
@@ -296,6 +287,11 @@ static void __init ek_add_device_buttons(void) {} | |||
296 | static void __init ek_board_init(void) | 287 | static void __init ek_board_init(void) |
297 | { | 288 | { |
298 | /* Serial */ | 289 | /* Serial */ |
290 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
291 | at91_register_uart(0, 0, 0); | ||
292 | |||
293 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) */ | ||
294 | at91_register_uart(AT91SAM9RL_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
299 | at91_add_device_serial(); | 295 | at91_add_device_serial(); |
300 | /* USB HS */ | 296 | /* USB HS */ |
301 | at91_add_device_usba(&ek_usba_udc_data); | 297 | at91_add_device_usba(&ek_usba_udc_data); |
diff --git a/arch/arm/mach-at91/board-snapper9260.c b/arch/arm/mach-at91/board-snapper9260.c index ebc9d01ce74..9d446f1bb45 100644 --- a/arch/arm/mach-at91/board-snapper9260.c +++ b/arch/arm/mach-at91/board-snapper9260.c | |||
@@ -43,16 +43,6 @@ | |||
43 | static void __init snapper9260_init_early(void) | 43 | static void __init snapper9260_init_early(void) |
44 | { | 44 | { |
45 | at91_initialize(18432000); | 45 | at91_initialize(18432000); |
46 | |||
47 | /* Debug on ttyS0 */ | ||
48 | at91_register_uart(0, 0, 0); | ||
49 | at91_set_serial_console(0); | ||
50 | |||
51 | at91_register_uart(AT91SAM9260_ID_US0, 1, | ||
52 | ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
53 | at91_register_uart(AT91SAM9260_ID_US1, 2, | ||
54 | ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
55 | at91_register_uart(AT91SAM9260_ID_US2, 3, 0); | ||
56 | } | 46 | } |
57 | 47 | ||
58 | static struct at91_usbh_data __initdata snapper9260_usbh_data = { | 48 | static struct at91_usbh_data __initdata snapper9260_usbh_data = { |
@@ -168,6 +158,14 @@ static void __init snapper9260_board_init(void) | |||
168 | snapper9260_i2c_isl1208.irq = gpio_to_irq(AT91_PIN_PA31); | 158 | snapper9260_i2c_isl1208.irq = gpio_to_irq(AT91_PIN_PA31); |
169 | i2c_register_board_info(0, &snapper9260_i2c_isl1208, 1); | 159 | i2c_register_board_info(0, &snapper9260_i2c_isl1208, 1); |
170 | 160 | ||
161 | /* Debug on ttyS0 */ | ||
162 | at91_register_uart(0, 0, 0); | ||
163 | |||
164 | at91_register_uart(AT91SAM9260_ID_US0, 1, | ||
165 | ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
166 | at91_register_uart(AT91SAM9260_ID_US1, 2, | ||
167 | ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
168 | at91_register_uart(AT91SAM9260_ID_US2, 3, 0); | ||
171 | at91_add_device_serial(); | 169 | at91_add_device_serial(); |
172 | at91_add_device_usbh(&snapper9260_usbh_data); | 170 | at91_add_device_usbh(&snapper9260_usbh_data); |
173 | at91_add_device_udc(&snapper9260_udc_data); | 171 | at91_add_device_udc(&snapper9260_udc_data); |
diff --git a/arch/arm/mach-at91/board-stamp9g20.c b/arch/arm/mach-at91/board-stamp9g20.c index 7640049410a..ee86f9d7ee7 100644 --- a/arch/arm/mach-at91/board-stamp9g20.c +++ b/arch/arm/mach-at91/board-stamp9g20.c | |||
@@ -36,44 +36,6 @@ void __init stamp9g20_init_early(void) | |||
36 | { | 36 | { |
37 | /* Initialize processor: 18.432 MHz crystal */ | 37 | /* Initialize processor: 18.432 MHz crystal */ |
38 | at91_initialize(18432000); | 38 | at91_initialize(18432000); |
39 | |||
40 | /* DGBU on ttyS0. (Rx & Tx only) */ | ||
41 | at91_register_uart(0, 0, 0); | ||
42 | |||
43 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
44 | at91_set_serial_console(0); | ||
45 | } | ||
46 | |||
47 | static void __init stamp9g20evb_init_early(void) | ||
48 | { | ||
49 | stamp9g20_init_early(); | ||
50 | |||
51 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
52 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
53 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ||
54 | | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
55 | } | ||
56 | |||
57 | static void __init portuxg20_init_early(void) | ||
58 | { | ||
59 | stamp9g20_init_early(); | ||
60 | |||
61 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
62 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
63 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ||
64 | | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
65 | |||
66 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */ | ||
67 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
68 | |||
69 | /* USART2 on ttyS3. (Rx, Tx, CTS, RTS) */ | ||
70 | at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
71 | |||
72 | /* USART4 on ttyS5. (Rx, Tx only) */ | ||
73 | at91_register_uart(AT91SAM9260_ID_US4, 5, 0); | ||
74 | |||
75 | /* USART5 on ttyS6. (Rx, Tx only) */ | ||
76 | at91_register_uart(AT91SAM9260_ID_US5, 6, 0); | ||
77 | } | 39 | } |
78 | 40 | ||
79 | /* | 41 | /* |
@@ -254,6 +216,8 @@ void add_w1(void) | |||
254 | void __init stamp9g20_board_init(void) | 216 | void __init stamp9g20_board_init(void) |
255 | { | 217 | { |
256 | /* Serial */ | 218 | /* Serial */ |
219 | /* DGBU on ttyS0. (Rx & Tx only) */ | ||
220 | at91_register_uart(0, 0, 0); | ||
257 | at91_add_device_serial(); | 221 | at91_add_device_serial(); |
258 | /* NAND */ | 222 | /* NAND */ |
259 | add_device_nand(); | 223 | add_device_nand(); |
@@ -269,6 +233,22 @@ void __init stamp9g20_board_init(void) | |||
269 | 233 | ||
270 | static void __init portuxg20_board_init(void) | 234 | static void __init portuxg20_board_init(void) |
271 | { | 235 | { |
236 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
237 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
238 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ||
239 | | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
240 | |||
241 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */ | ||
242 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
243 | |||
244 | /* USART2 on ttyS3. (Rx, Tx, CTS, RTS) */ | ||
245 | at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
246 | |||
247 | /* USART4 on ttyS5. (Rx, Tx only) */ | ||
248 | at91_register_uart(AT91SAM9260_ID_US4, 5, 0); | ||
249 | |||
250 | /* USART5 on ttyS6. (Rx, Tx only) */ | ||
251 | at91_register_uart(AT91SAM9260_ID_US5, 6, 0); | ||
272 | stamp9g20_board_init(); | 252 | stamp9g20_board_init(); |
273 | /* USB Host */ | 253 | /* USB Host */ |
274 | at91_add_device_usbh(&usbh_data); | 254 | at91_add_device_usbh(&usbh_data); |
@@ -286,6 +266,10 @@ static void __init portuxg20_board_init(void) | |||
286 | 266 | ||
287 | static void __init stamp9g20evb_board_init(void) | 267 | static void __init stamp9g20evb_board_init(void) |
288 | { | 268 | { |
269 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
270 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
271 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ||
272 | | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
289 | stamp9g20_board_init(); | 273 | stamp9g20_board_init(); |
290 | /* USB Host */ | 274 | /* USB Host */ |
291 | at91_add_device_usbh(&usbh_data); | 275 | at91_add_device_usbh(&usbh_data); |
@@ -303,7 +287,7 @@ MACHINE_START(PORTUXG20, "taskit PortuxG20") | |||
303 | /* Maintainer: taskit GmbH */ | 287 | /* Maintainer: taskit GmbH */ |
304 | .timer = &at91sam926x_timer, | 288 | .timer = &at91sam926x_timer, |
305 | .map_io = at91_map_io, | 289 | .map_io = at91_map_io, |
306 | .init_early = portuxg20_init_early, | 290 | .init_early = stamp9g20_init_early, |
307 | .init_irq = at91_init_irq_default, | 291 | .init_irq = at91_init_irq_default, |
308 | .init_machine = portuxg20_board_init, | 292 | .init_machine = portuxg20_board_init, |
309 | MACHINE_END | 293 | MACHINE_END |
@@ -312,7 +296,7 @@ MACHINE_START(STAMP9G20, "taskit Stamp9G20") | |||
312 | /* Maintainer: taskit GmbH */ | 296 | /* Maintainer: taskit GmbH */ |
313 | .timer = &at91sam926x_timer, | 297 | .timer = &at91sam926x_timer, |
314 | .map_io = at91_map_io, | 298 | .map_io = at91_map_io, |
315 | .init_early = stamp9g20evb_init_early, | 299 | .init_early = stamp9g20_init_early, |
316 | .init_irq = at91_init_irq_default, | 300 | .init_irq = at91_init_irq_default, |
317 | .init_machine = stamp9g20evb_board_init, | 301 | .init_machine = stamp9g20evb_board_init, |
318 | MACHINE_END | 302 | MACHINE_END |
diff --git a/arch/arm/mach-at91/board-usb-a926x.c b/arch/arm/mach-at91/board-usb-a926x.c index b7483a3d098..332ecd40bd0 100644 --- a/arch/arm/mach-at91/board-usb-a926x.c +++ b/arch/arm/mach-at91/board-usb-a926x.c | |||
@@ -53,12 +53,6 @@ static void __init ek_init_early(void) | |||
53 | { | 53 | { |
54 | /* Initialize processor: 12.00 MHz crystal */ | 54 | /* Initialize processor: 12.00 MHz crystal */ |
55 | at91_initialize(12000000); | 55 | at91_initialize(12000000); |
56 | |||
57 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
58 | at91_register_uart(0, 0, 0); | ||
59 | |||
60 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
61 | at91_set_serial_console(0); | ||
62 | } | 56 | } |
63 | 57 | ||
64 | /* | 58 | /* |
@@ -325,6 +319,8 @@ static void __init ek_add_device_leds(void) | |||
325 | static void __init ek_board_init(void) | 319 | static void __init ek_board_init(void) |
326 | { | 320 | { |
327 | /* Serial */ | 321 | /* Serial */ |
322 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
323 | at91_register_uart(0, 0, 0); | ||
328 | at91_add_device_serial(); | 324 | at91_add_device_serial(); |
329 | /* USB Host */ | 325 | /* USB Host */ |
330 | at91_add_device_usbh(&ek_usbh_data); | 326 | at91_add_device_usbh(&ek_usbh_data); |
diff --git a/arch/arm/mach-at91/board-yl-9200.c b/arch/arm/mach-at91/board-yl-9200.c index 38dd279d30b..d56665ea4b5 100644 --- a/arch/arm/mach-at91/board-yl-9200.c +++ b/arch/arm/mach-at91/board-yl-9200.c | |||
@@ -58,26 +58,6 @@ static void __init yl9200_init_early(void) | |||
58 | 58 | ||
59 | /* Initialize processor: 18.432 MHz crystal */ | 59 | /* Initialize processor: 18.432 MHz crystal */ |
60 | at91_initialize(18432000); | 60 | at91_initialize(18432000); |
61 | |||
62 | /* Setup the LEDs D2=PB17 (timer), D3=PB16 (cpu) */ | ||
63 | at91_init_leds(AT91_PIN_PB16, AT91_PIN_PB17); | ||
64 | |||
65 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
66 | at91_register_uart(0, 0, 0); | ||
67 | |||
68 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
69 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
70 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
71 | | ATMEL_UART_RI); | ||
72 | |||
73 | /* USART0 on ttyS2. (Rx & Tx only to JP3) */ | ||
74 | at91_register_uart(AT91RM9200_ID_US0, 2, 0); | ||
75 | |||
76 | /* USART3 on ttyS3. (Rx, Tx, RTS - RS485 interface) */ | ||
77 | at91_register_uart(AT91RM9200_ID_US3, 3, ATMEL_UART_RTS); | ||
78 | |||
79 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
80 | at91_set_serial_console(0); | ||
81 | } | 61 | } |
82 | 62 | ||
83 | /* | 63 | /* |
@@ -560,7 +540,23 @@ void __init yl9200_add_device_video(void) {} | |||
560 | 540 | ||
561 | static void __init yl9200_board_init(void) | 541 | static void __init yl9200_board_init(void) |
562 | { | 542 | { |
543 | /* Setup the LEDs D2=PB17 (timer), D3=PB16 (cpu) */ | ||
544 | at91_init_leds(AT91_PIN_PB16, AT91_PIN_PB17); | ||
545 | |||
563 | /* Serial */ | 546 | /* Serial */ |
547 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
548 | at91_register_uart(0, 0, 0); | ||
549 | |||
550 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
551 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
552 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
553 | | ATMEL_UART_RI); | ||
554 | |||
555 | /* USART0 on ttyS2. (Rx & Tx only to JP3) */ | ||
556 | at91_register_uart(AT91RM9200_ID_US0, 2, 0); | ||
557 | |||
558 | /* USART3 on ttyS3. (Rx, Tx, RTS - RS485 interface) */ | ||
559 | at91_register_uart(AT91RM9200_ID_US3, 3, ATMEL_UART_RTS); | ||
564 | at91_add_device_serial(); | 560 | at91_add_device_serial(); |
565 | /* Ethernet */ | 561 | /* Ethernet */ |
566 | at91_add_device_eth(&yl9200_eth_data); | 562 | at91_add_device_eth(&yl9200_eth_data); |
diff --git a/arch/arm/mach-at91/cpuidle.c b/arch/arm/mach-at91/cpuidle.c index ece1f9aefb4..0c6381516a5 100644 --- a/arch/arm/mach-at91/cpuidle.c +++ b/arch/arm/mach-at91/cpuidle.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/export.h> | 21 | #include <linux/export.h> |
22 | #include <asm/proc-fns.h> | 22 | #include <asm/proc-fns.h> |
23 | #include <asm/cpuidle.h> | 23 | #include <asm/cpuidle.h> |
24 | #include <mach/cpu.h> | ||
24 | 25 | ||
25 | #include "pm.h" | 26 | #include "pm.h" |
26 | 27 | ||
@@ -33,7 +34,12 @@ static int at91_enter_idle(struct cpuidle_device *dev, | |||
33 | struct cpuidle_driver *drv, | 34 | struct cpuidle_driver *drv, |
34 | int index) | 35 | int index) |
35 | { | 36 | { |
36 | at91_standby(); | 37 | if (cpu_is_at91rm9200()) |
38 | at91rm9200_standby(); | ||
39 | else if (cpu_is_at91sam9g45()) | ||
40 | at91sam9g45_standby(); | ||
41 | else | ||
42 | at91sam9_standby(); | ||
37 | 43 | ||
38 | return index; | 44 | return index; |
39 | } | 45 | } |
diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h index dd9b346c451..0a60bf83703 100644 --- a/arch/arm/mach-at91/generic.h +++ b/arch/arm/mach-at91/generic.h | |||
@@ -40,17 +40,6 @@ extern struct sys_timer at91sam926x_timer; | |||
40 | extern struct sys_timer at91x40_timer; | 40 | extern struct sys_timer at91x40_timer; |
41 | 41 | ||
42 | /* Clocks */ | 42 | /* Clocks */ |
43 | /* | ||
44 | * function to specify the clock of the default console. As we do not | ||
45 | * use the device/driver bus, the dev_name is not intialize. So we need | ||
46 | * to link the clock to a specific con_id only "usart" | ||
47 | */ | ||
48 | extern void __init at91rm9200_set_console_clock(int id); | ||
49 | extern void __init at91sam9260_set_console_clock(int id); | ||
50 | extern void __init at91sam9261_set_console_clock(int id); | ||
51 | extern void __init at91sam9263_set_console_clock(int id); | ||
52 | extern void __init at91sam9rl_set_console_clock(int id); | ||
53 | extern void __init at91sam9g45_set_console_clock(int id); | ||
54 | #ifdef CONFIG_AT91_PMC_UNIT | 43 | #ifdef CONFIG_AT91_PMC_UNIT |
55 | extern int __init at91_clock_init(unsigned long main_clock); | 44 | extern int __init at91_clock_init(unsigned long main_clock); |
56 | extern int __init at91_dt_clock_init(void); | 45 | extern int __init at91_dt_clock_init(void); |
diff --git a/arch/arm/mach-at91/include/mach/at91rm9200.h b/arch/arm/mach-at91/include/mach/at91rm9200.h index 603e6aac2a4..e67317c6776 100644 --- a/arch/arm/mach-at91/include/mach/at91rm9200.h +++ b/arch/arm/mach-at91/include/mach/at91rm9200.h | |||
@@ -88,11 +88,6 @@ | |||
88 | #define AT91RM9200_BASE_RTC 0xfffffe00 /* Real-Time Clock */ | 88 | #define AT91RM9200_BASE_RTC 0xfffffe00 /* Real-Time Clock */ |
89 | #define AT91RM9200_BASE_MC 0xffffff00 /* Memory Controllers */ | 89 | #define AT91RM9200_BASE_MC 0xffffff00 /* Memory Controllers */ |
90 | 90 | ||
91 | #define AT91_USART0 AT91RM9200_BASE_US0 | ||
92 | #define AT91_USART1 AT91RM9200_BASE_US1 | ||
93 | #define AT91_USART2 AT91RM9200_BASE_US2 | ||
94 | #define AT91_USART3 AT91RM9200_BASE_US3 | ||
95 | |||
96 | /* | 91 | /* |
97 | * Internal Memory. | 92 | * Internal Memory. |
98 | */ | 93 | */ |
diff --git a/arch/arm/mach-at91/include/mach/at91sam9260.h b/arch/arm/mach-at91/include/mach/at91sam9260.h index 08ae9afd00f..416c7b6c56d 100644 --- a/arch/arm/mach-at91/include/mach/at91sam9260.h +++ b/arch/arm/mach-at91/include/mach/at91sam9260.h | |||
@@ -95,13 +95,6 @@ | |||
95 | #define AT91SAM9260_BASE_WDT 0xfffffd40 | 95 | #define AT91SAM9260_BASE_WDT 0xfffffd40 |
96 | #define AT91SAM9260_BASE_GPBR 0xfffffd50 | 96 | #define AT91SAM9260_BASE_GPBR 0xfffffd50 |
97 | 97 | ||
98 | #define AT91_USART0 AT91SAM9260_BASE_US0 | ||
99 | #define AT91_USART1 AT91SAM9260_BASE_US1 | ||
100 | #define AT91_USART2 AT91SAM9260_BASE_US2 | ||
101 | #define AT91_USART3 AT91SAM9260_BASE_US3 | ||
102 | #define AT91_USART4 AT91SAM9260_BASE_US4 | ||
103 | #define AT91_USART5 AT91SAM9260_BASE_US5 | ||
104 | |||
105 | 98 | ||
106 | /* | 99 | /* |
107 | * Internal Memory. | 100 | * Internal Memory. |
diff --git a/arch/arm/mach-at91/include/mach/at91sam9261.h b/arch/arm/mach-at91/include/mach/at91sam9261.h index 44fbdc12ee6..a041406d06e 100644 --- a/arch/arm/mach-at91/include/mach/at91sam9261.h +++ b/arch/arm/mach-at91/include/mach/at91sam9261.h | |||
@@ -79,10 +79,6 @@ | |||
79 | #define AT91SAM9261_BASE_WDT 0xfffffd40 | 79 | #define AT91SAM9261_BASE_WDT 0xfffffd40 |
80 | #define AT91SAM9261_BASE_GPBR 0xfffffd50 | 80 | #define AT91SAM9261_BASE_GPBR 0xfffffd50 |
81 | 81 | ||
82 | #define AT91_USART0 AT91SAM9261_BASE_US0 | ||
83 | #define AT91_USART1 AT91SAM9261_BASE_US1 | ||
84 | #define AT91_USART2 AT91SAM9261_BASE_US2 | ||
85 | |||
86 | 82 | ||
87 | /* | 83 | /* |
88 | * Internal Memory. | 84 | * Internal Memory. |
diff --git a/arch/arm/mach-at91/include/mach/at91sam9263.h b/arch/arm/mach-at91/include/mach/at91sam9263.h index d96cbb2e03c..d201029d60b 100644 --- a/arch/arm/mach-at91/include/mach/at91sam9263.h +++ b/arch/arm/mach-at91/include/mach/at91sam9263.h | |||
@@ -95,10 +95,6 @@ | |||
95 | #define AT91SAM9263_BASE_RTT1 0xfffffd50 | 95 | #define AT91SAM9263_BASE_RTT1 0xfffffd50 |
96 | #define AT91SAM9263_BASE_GPBR 0xfffffd60 | 96 | #define AT91SAM9263_BASE_GPBR 0xfffffd60 |
97 | 97 | ||
98 | #define AT91_USART0 AT91SAM9263_BASE_US0 | ||
99 | #define AT91_USART1 AT91SAM9263_BASE_US1 | ||
100 | #define AT91_USART2 AT91SAM9263_BASE_US2 | ||
101 | |||
102 | #define AT91_SMC AT91_SMC0 | 98 | #define AT91_SMC AT91_SMC0 |
103 | 99 | ||
104 | /* | 100 | /* |
diff --git a/arch/arm/mach-at91/include/mach/at91sam9g45.h b/arch/arm/mach-at91/include/mach/at91sam9g45.h index d052abcff85..3a4da24d591 100644 --- a/arch/arm/mach-at91/include/mach/at91sam9g45.h +++ b/arch/arm/mach-at91/include/mach/at91sam9g45.h | |||
@@ -106,11 +106,6 @@ | |||
106 | #define AT91SAM9G45_BASE_RTC 0xfffffdb0 | 106 | #define AT91SAM9G45_BASE_RTC 0xfffffdb0 |
107 | #define AT91SAM9G45_BASE_GPBR 0xfffffd60 | 107 | #define AT91SAM9G45_BASE_GPBR 0xfffffd60 |
108 | 108 | ||
109 | #define AT91_USART0 AT91SAM9G45_BASE_US0 | ||
110 | #define AT91_USART1 AT91SAM9G45_BASE_US1 | ||
111 | #define AT91_USART2 AT91SAM9G45_BASE_US2 | ||
112 | #define AT91_USART3 AT91SAM9G45_BASE_US3 | ||
113 | |||
114 | /* | 109 | /* |
115 | * Internal Memory. | 110 | * Internal Memory. |
116 | */ | 111 | */ |
diff --git a/arch/arm/mach-at91/include/mach/at91sam9rl.h b/arch/arm/mach-at91/include/mach/at91sam9rl.h index e0073eb1014..a15db56d33f 100644 --- a/arch/arm/mach-at91/include/mach/at91sam9rl.h +++ b/arch/arm/mach-at91/include/mach/at91sam9rl.h | |||
@@ -89,11 +89,6 @@ | |||
89 | #define AT91SAM9RL_BASE_GPBR 0xfffffd60 | 89 | #define AT91SAM9RL_BASE_GPBR 0xfffffd60 |
90 | #define AT91SAM9RL_BASE_RTC 0xfffffe00 | 90 | #define AT91SAM9RL_BASE_RTC 0xfffffe00 |
91 | 91 | ||
92 | #define AT91_USART0 AT91SAM9RL_BASE_US0 | ||
93 | #define AT91_USART1 AT91SAM9RL_BASE_US1 | ||
94 | #define AT91_USART2 AT91SAM9RL_BASE_US2 | ||
95 | #define AT91_USART3 AT91SAM9RL_BASE_US3 | ||
96 | |||
97 | 92 | ||
98 | /* | 93 | /* |
99 | * Internal Memory. | 94 | * Internal Memory. |
diff --git a/arch/arm/mach-at91/include/mach/at91sam9x5.h b/arch/arm/mach-at91/include/mach/at91sam9x5.h index 88e43d534cd..c75ee19b58d 100644 --- a/arch/arm/mach-at91/include/mach/at91sam9x5.h +++ b/arch/arm/mach-at91/include/mach/at91sam9x5.h | |||
@@ -55,14 +55,6 @@ | |||
55 | #define AT91SAM9X5_BASE_USART2 0xf8024000 | 55 | #define AT91SAM9X5_BASE_USART2 0xf8024000 |
56 | 56 | ||
57 | /* | 57 | /* |
58 | * Base addresses for early serial code (uncompress.h) | ||
59 | */ | ||
60 | #define AT91_DBGU AT91_BASE_DBGU0 | ||
61 | #define AT91_USART0 AT91SAM9X5_BASE_USART0 | ||
62 | #define AT91_USART1 AT91SAM9X5_BASE_USART1 | ||
63 | #define AT91_USART2 AT91SAM9X5_BASE_USART2 | ||
64 | |||
65 | /* | ||
66 | * Internal Memory. | 58 | * Internal Memory. |
67 | */ | 59 | */ |
68 | #define AT91SAM9X5_SRAM_BASE 0x00300000 /* Internal SRAM base address */ | 60 | #define AT91SAM9X5_SRAM_BASE 0x00300000 /* Internal SRAM base address */ |
diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h index 49a821192c6..369afc2ffc5 100644 --- a/arch/arm/mach-at91/include/mach/board.h +++ b/arch/arm/mach-at91/include/mach/board.h | |||
@@ -121,7 +121,6 @@ extern void __init at91_add_device_spi(struct spi_board_info *devices, int nr_de | |||
121 | #define ATMEL_UART_RI 0x20 | 121 | #define ATMEL_UART_RI 0x20 |
122 | 122 | ||
123 | extern void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins); | 123 | extern void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins); |
124 | extern void __init at91_set_serial_console(unsigned portnr); | ||
125 | 124 | ||
126 | extern struct platform_device *atmel_default_console_device; | 125 | extern struct platform_device *atmel_default_console_device; |
127 | 126 | ||
diff --git a/arch/arm/mach-at91/include/mach/cpu.h b/arch/arm/mach-at91/include/mach/cpu.h index 0118c333855..73d2fd209ce 100644 --- a/arch/arm/mach-at91/include/mach/cpu.h +++ b/arch/arm/mach-at91/include/mach/cpu.h | |||
@@ -54,6 +54,7 @@ | |||
54 | #define ARCH_REVISON_9200_BGA (0 << 0) | 54 | #define ARCH_REVISON_9200_BGA (0 << 0) |
55 | #define ARCH_REVISON_9200_PQFP (1 << 0) | 55 | #define ARCH_REVISON_9200_PQFP (1 << 0) |
56 | 56 | ||
57 | #ifndef __ASSEMBLY__ | ||
57 | enum at91_soc_type { | 58 | enum at91_soc_type { |
58 | /* 920T */ | 59 | /* 920T */ |
59 | AT91_SOC_RM9200, | 60 | AT91_SOC_RM9200, |
@@ -106,7 +107,7 @@ static inline int at91_soc_is_detected(void) | |||
106 | return at91_soc_initdata.type != AT91_SOC_NONE; | 107 | return at91_soc_initdata.type != AT91_SOC_NONE; |
107 | } | 108 | } |
108 | 109 | ||
109 | #ifdef CONFIG_ARCH_AT91RM9200 | 110 | #ifdef CONFIG_SOC_AT91RM9200 |
110 | #define cpu_is_at91rm9200() (at91_soc_initdata.type == AT91_SOC_RM9200) | 111 | #define cpu_is_at91rm9200() (at91_soc_initdata.type == AT91_SOC_RM9200) |
111 | #define cpu_is_at91rm9200_bga() (at91_soc_initdata.subtype == AT91_SOC_RM9200_BGA) | 112 | #define cpu_is_at91rm9200_bga() (at91_soc_initdata.subtype == AT91_SOC_RM9200_BGA) |
112 | #define cpu_is_at91rm9200_pqfp() (at91_soc_initdata.subtype == AT91_SOC_RM9200_PQFP) | 113 | #define cpu_is_at91rm9200_pqfp() (at91_soc_initdata.subtype == AT91_SOC_RM9200_PQFP) |
@@ -116,45 +117,37 @@ static inline int at91_soc_is_detected(void) | |||
116 | #define cpu_is_at91rm9200_pqfp() (0) | 117 | #define cpu_is_at91rm9200_pqfp() (0) |
117 | #endif | 118 | #endif |
118 | 119 | ||
119 | #ifdef CONFIG_ARCH_AT91SAM9260 | 120 | #ifdef CONFIG_SOC_AT91SAM9260 |
120 | #define cpu_is_at91sam9xe() (at91_soc_initdata.subtype == AT91_SOC_SAM9XE) | 121 | #define cpu_is_at91sam9xe() (at91_soc_initdata.subtype == AT91_SOC_SAM9XE) |
121 | #define cpu_is_at91sam9260() (at91_soc_initdata.type == AT91_SOC_SAM9260) | 122 | #define cpu_is_at91sam9260() (at91_soc_initdata.type == AT91_SOC_SAM9260) |
123 | #define cpu_is_at91sam9g20() (at91_soc_initdata.type == AT91_SOC_SAM9G20) | ||
122 | #else | 124 | #else |
123 | #define cpu_is_at91sam9xe() (0) | 125 | #define cpu_is_at91sam9xe() (0) |
124 | #define cpu_is_at91sam9260() (0) | 126 | #define cpu_is_at91sam9260() (0) |
125 | #endif | ||
126 | |||
127 | #ifdef CONFIG_ARCH_AT91SAM9G20 | ||
128 | #define cpu_is_at91sam9g20() (at91_soc_initdata.type == AT91_SOC_SAM9G20) | ||
129 | #else | ||
130 | #define cpu_is_at91sam9g20() (0) | 127 | #define cpu_is_at91sam9g20() (0) |
131 | #endif | 128 | #endif |
132 | 129 | ||
133 | #ifdef CONFIG_ARCH_AT91SAM9261 | 130 | #ifdef CONFIG_SOC_AT91SAM9261 |
134 | #define cpu_is_at91sam9261() (at91_soc_initdata.type == AT91_SOC_SAM9261) | 131 | #define cpu_is_at91sam9261() (at91_soc_initdata.type == AT91_SOC_SAM9261) |
135 | #else | ||
136 | #define cpu_is_at91sam9261() (0) | ||
137 | #endif | ||
138 | |||
139 | #ifdef CONFIG_ARCH_AT91SAM9G10 | ||
140 | #define cpu_is_at91sam9g10() (at91_soc_initdata.type == AT91_SOC_SAM9G10) | 132 | #define cpu_is_at91sam9g10() (at91_soc_initdata.type == AT91_SOC_SAM9G10) |
141 | #else | 133 | #else |
134 | #define cpu_is_at91sam9261() (0) | ||
142 | #define cpu_is_at91sam9g10() (0) | 135 | #define cpu_is_at91sam9g10() (0) |
143 | #endif | 136 | #endif |
144 | 137 | ||
145 | #ifdef CONFIG_ARCH_AT91SAM9263 | 138 | #ifdef CONFIG_SOC_AT91SAM9263 |
146 | #define cpu_is_at91sam9263() (at91_soc_initdata.type == AT91_SOC_SAM9263) | 139 | #define cpu_is_at91sam9263() (at91_soc_initdata.type == AT91_SOC_SAM9263) |
147 | #else | 140 | #else |
148 | #define cpu_is_at91sam9263() (0) | 141 | #define cpu_is_at91sam9263() (0) |
149 | #endif | 142 | #endif |
150 | 143 | ||
151 | #ifdef CONFIG_ARCH_AT91SAM9RL | 144 | #ifdef CONFIG_SOC_AT91SAM9RL |
152 | #define cpu_is_at91sam9rl() (at91_soc_initdata.type == AT91_SOC_SAM9RL) | 145 | #define cpu_is_at91sam9rl() (at91_soc_initdata.type == AT91_SOC_SAM9RL) |
153 | #else | 146 | #else |
154 | #define cpu_is_at91sam9rl() (0) | 147 | #define cpu_is_at91sam9rl() (0) |
155 | #endif | 148 | #endif |
156 | 149 | ||
157 | #ifdef CONFIG_ARCH_AT91SAM9G45 | 150 | #ifdef CONFIG_SOC_AT91SAM9G45 |
158 | #define cpu_is_at91sam9g45() (at91_soc_initdata.type == AT91_SOC_SAM9G45) | 151 | #define cpu_is_at91sam9g45() (at91_soc_initdata.type == AT91_SOC_SAM9G45) |
159 | #define cpu_is_at91sam9g45es() (at91_soc_initdata.subtype == AT91_SOC_SAM9G45ES) | 152 | #define cpu_is_at91sam9g45es() (at91_soc_initdata.subtype == AT91_SOC_SAM9G45ES) |
160 | #define cpu_is_at91sam9m10() (at91_soc_initdata.subtype == AT91_SOC_SAM9M10) | 153 | #define cpu_is_at91sam9m10() (at91_soc_initdata.subtype == AT91_SOC_SAM9M10) |
@@ -168,7 +161,7 @@ static inline int at91_soc_is_detected(void) | |||
168 | #define cpu_is_at91sam9m11() (0) | 161 | #define cpu_is_at91sam9m11() (0) |
169 | #endif | 162 | #endif |
170 | 163 | ||
171 | #ifdef CONFIG_ARCH_AT91SAM9X5 | 164 | #ifdef CONFIG_SOC_AT91SAM9X5 |
172 | #define cpu_is_at91sam9x5() (at91_soc_initdata.type == AT91_SOC_SAM9X5) | 165 | #define cpu_is_at91sam9x5() (at91_soc_initdata.type == AT91_SOC_SAM9X5) |
173 | #define cpu_is_at91sam9g15() (at91_soc_initdata.subtype == AT91_SOC_SAM9G15) | 166 | #define cpu_is_at91sam9g15() (at91_soc_initdata.subtype == AT91_SOC_SAM9G15) |
174 | #define cpu_is_at91sam9g35() (at91_soc_initdata.subtype == AT91_SOC_SAM9G35) | 167 | #define cpu_is_at91sam9g35() (at91_soc_initdata.subtype == AT91_SOC_SAM9G35) |
@@ -189,5 +182,6 @@ static inline int at91_soc_is_detected(void) | |||
189 | * definitions may reduce clutter in common drivers. | 182 | * definitions may reduce clutter in common drivers. |
190 | */ | 183 | */ |
191 | #define cpu_is_at32ap7000() (0) | 184 | #define cpu_is_at32ap7000() (0) |
185 | #endif /* __ASSEMBLY__ */ | ||
192 | 186 | ||
193 | #endif /* __MACH_CPU_H__ */ | 187 | #endif /* __MACH_CPU_H__ */ |
diff --git a/arch/arm/mach-at91/include/mach/hardware.h b/arch/arm/mach-at91/include/mach/hardware.h index e9e29a6c386..ef5786299c6 100644 --- a/arch/arm/mach-at91/include/mach/hardware.h +++ b/arch/arm/mach-at91/include/mach/hardware.h | |||
@@ -22,27 +22,17 @@ | |||
22 | /* 9263, 9g45 */ | 22 | /* 9263, 9g45 */ |
23 | #define AT91_BASE_DBGU1 0xffffee00 | 23 | #define AT91_BASE_DBGU1 0xffffee00 |
24 | 24 | ||
25 | #if defined(CONFIG_ARCH_AT91RM9200) | 25 | #if defined(CONFIG_ARCH_AT91X40) |
26 | #include <mach/at91x40.h> | ||
27 | #else | ||
26 | #include <mach/at91rm9200.h> | 28 | #include <mach/at91rm9200.h> |
27 | #elif defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9G20) | ||
28 | #include <mach/at91sam9260.h> | 29 | #include <mach/at91sam9260.h> |
29 | #elif defined(CONFIG_ARCH_AT91SAM9261) || defined(CONFIG_ARCH_AT91SAM9G10) | ||
30 | #include <mach/at91sam9261.h> | 30 | #include <mach/at91sam9261.h> |
31 | #elif defined(CONFIG_ARCH_AT91SAM9263) | ||
32 | #include <mach/at91sam9263.h> | 31 | #include <mach/at91sam9263.h> |
33 | #elif defined(CONFIG_ARCH_AT91SAM9RL) | ||
34 | #include <mach/at91sam9rl.h> | 32 | #include <mach/at91sam9rl.h> |
35 | #elif defined(CONFIG_ARCH_AT91SAM9G45) | ||
36 | #include <mach/at91sam9g45.h> | 33 | #include <mach/at91sam9g45.h> |
37 | #elif defined(CONFIG_ARCH_AT91SAM9X5) | ||
38 | #include <mach/at91sam9x5.h> | 34 | #include <mach/at91sam9x5.h> |
39 | #elif defined(CONFIG_ARCH_AT91X40) | ||
40 | #include <mach/at91x40.h> | ||
41 | #else | ||
42 | #error "Unsupported AT91 processor" | ||
43 | #endif | ||
44 | 35 | ||
45 | #if !defined(CONFIG_ARCH_AT91X40) | ||
46 | /* | 36 | /* |
47 | * On all at91 except rm9200 and x40 have the System Controller starts | 37 | * On all at91 except rm9200 and x40 have the System Controller starts |
48 | * at address 0xffffc000 and has a size of 16KiB. | 38 | * at address 0xffffc000 and has a size of 16KiB. |
@@ -94,7 +84,6 @@ | |||
94 | * Virtual to Physical Address mapping for IO devices. | 84 | * Virtual to Physical Address mapping for IO devices. |
95 | */ | 85 | */ |
96 | #define AT91_VA_BASE_SYS AT91_IO_P2V(AT91_BASE_SYS) | 86 | #define AT91_VA_BASE_SYS AT91_IO_P2V(AT91_BASE_SYS) |
97 | #define AT91_VA_BASE_EMAC AT91_IO_P2V(AT91RM9200_BASE_EMAC) | ||
98 | 87 | ||
99 | /* Internal SRAM is mapped below the IO devices */ | 88 | /* Internal SRAM is mapped below the IO devices */ |
100 | #define AT91_SRAM_MAX SZ_1M | 89 | #define AT91_SRAM_MAX SZ_1M |
diff --git a/arch/arm/mach-at91/include/mach/uncompress.h b/arch/arm/mach-at91/include/mach/uncompress.h index 4218647c1fc..6f6118d1576 100644 --- a/arch/arm/mach-at91/include/mach/uncompress.h +++ b/arch/arm/mach-at91/include/mach/uncompress.h | |||
@@ -1,7 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * arch/arm/mach-at91/include/mach/uncompress.h | 2 | * arch/arm/mach-at91/include/mach/uncompress.h |
3 | * | 3 | * |
4 | * Copyright (C) 2003 SAN People | 4 | * Copyright (C) 2003 SAN People |
5 | * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | ||
5 | * | 6 | * |
6 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
@@ -25,22 +26,147 @@ | |||
25 | #include <linux/atmel_serial.h> | 26 | #include <linux/atmel_serial.h> |
26 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
27 | 28 | ||
28 | #if defined(CONFIG_AT91_EARLY_DBGU0) | 29 | #include <mach/at91_dbgu.h> |
29 | #define UART_OFFSET AT91_BASE_DBGU0 | 30 | #include <mach/cpu.h> |
30 | #elif defined(CONFIG_AT91_EARLY_DBGU1) | 31 | |
31 | #define UART_OFFSET AT91_BASE_DBGU1 | 32 | void __iomem *at91_uart; |
32 | #elif defined(CONFIG_AT91_EARLY_USART0) | 33 | |
33 | #define UART_OFFSET AT91_USART0 | 34 | #if !defined(CONFIG_ARCH_AT91X40) |
34 | #elif defined(CONFIG_AT91_EARLY_USART1) | 35 | static const u32 uarts_rm9200[] = { |
35 | #define UART_OFFSET AT91_USART1 | 36 | AT91_BASE_DBGU0, |
36 | #elif defined(CONFIG_AT91_EARLY_USART2) | 37 | AT91RM9200_BASE_US0, |
37 | #define UART_OFFSET AT91_USART2 | 38 | AT91RM9200_BASE_US1, |
38 | #elif defined(CONFIG_AT91_EARLY_USART3) | 39 | AT91RM9200_BASE_US2, |
39 | #define UART_OFFSET AT91_USART3 | 40 | AT91RM9200_BASE_US3, |
40 | #elif defined(CONFIG_AT91_EARLY_USART4) | 41 | 0, |
41 | #define UART_OFFSET AT91_USART4 | 42 | }; |
42 | #elif defined(CONFIG_AT91_EARLY_USART5) | 43 | |
43 | #define UART_OFFSET AT91_USART5 | 44 | static const u32 uarts_sam9260[] = { |
45 | AT91_BASE_DBGU0, | ||
46 | AT91SAM9260_BASE_US0, | ||
47 | AT91SAM9260_BASE_US1, | ||
48 | AT91SAM9260_BASE_US2, | ||
49 | AT91SAM9260_BASE_US3, | ||
50 | AT91SAM9260_BASE_US4, | ||
51 | AT91SAM9260_BASE_US5, | ||
52 | 0, | ||
53 | }; | ||
54 | |||
55 | static const u32 uarts_sam9261[] = { | ||
56 | AT91_BASE_DBGU0, | ||
57 | AT91SAM9261_BASE_US0, | ||
58 | AT91SAM9261_BASE_US1, | ||
59 | AT91SAM9261_BASE_US2, | ||
60 | 0, | ||
61 | }; | ||
62 | |||
63 | static const u32 uarts_sam9263[] = { | ||
64 | AT91_BASE_DBGU1, | ||
65 | AT91SAM9263_BASE_US0, | ||
66 | AT91SAM9263_BASE_US1, | ||
67 | AT91SAM9263_BASE_US2, | ||
68 | 0, | ||
69 | }; | ||
70 | |||
71 | static const u32 uarts_sam9g45[] = { | ||
72 | AT91_BASE_DBGU1, | ||
73 | AT91SAM9G45_BASE_US0, | ||
74 | AT91SAM9G45_BASE_US1, | ||
75 | AT91SAM9G45_BASE_US2, | ||
76 | AT91SAM9G45_BASE_US3, | ||
77 | 0, | ||
78 | }; | ||
79 | |||
80 | static const u32 uarts_sam9rl[] = { | ||
81 | AT91_BASE_DBGU0, | ||
82 | AT91SAM9RL_BASE_US0, | ||
83 | AT91SAM9RL_BASE_US1, | ||
84 | AT91SAM9RL_BASE_US2, | ||
85 | AT91SAM9RL_BASE_US3, | ||
86 | 0, | ||
87 | }; | ||
88 | |||
89 | static const u32 uarts_sam9x5[] = { | ||
90 | AT91_BASE_DBGU0, | ||
91 | AT91SAM9X5_BASE_USART0, | ||
92 | AT91SAM9X5_BASE_USART1, | ||
93 | AT91SAM9X5_BASE_USART2, | ||
94 | 0, | ||
95 | }; | ||
96 | |||
97 | static inline const u32* decomp_soc_detect(u32 dbgu_base) | ||
98 | { | ||
99 | u32 cidr, socid; | ||
100 | |||
101 | cidr = __raw_readl(dbgu_base + AT91_DBGU_CIDR); | ||
102 | socid = cidr & ~AT91_CIDR_VERSION; | ||
103 | |||
104 | switch (socid) { | ||
105 | case ARCH_ID_AT91RM9200: | ||
106 | return uarts_rm9200; | ||
107 | |||
108 | case ARCH_ID_AT91SAM9G20: | ||
109 | case ARCH_ID_AT91SAM9260: | ||
110 | return uarts_sam9260; | ||
111 | |||
112 | case ARCH_ID_AT91SAM9261: | ||
113 | return uarts_sam9261; | ||
114 | |||
115 | case ARCH_ID_AT91SAM9263: | ||
116 | return uarts_sam9263; | ||
117 | |||
118 | case ARCH_ID_AT91SAM9G45: | ||
119 | return uarts_sam9g45; | ||
120 | |||
121 | case ARCH_ID_AT91SAM9RL64: | ||
122 | return uarts_sam9rl; | ||
123 | |||
124 | case ARCH_ID_AT91SAM9X5: | ||
125 | return uarts_sam9x5; | ||
126 | } | ||
127 | |||
128 | /* at91sam9g10 */ | ||
129 | if ((cidr & ~AT91_CIDR_EXT) == ARCH_ID_AT91SAM9G10) { | ||
130 | return uarts_sam9261; | ||
131 | } | ||
132 | /* at91sam9xe */ | ||
133 | else if ((cidr & AT91_CIDR_ARCH) == ARCH_FAMILY_AT91SAM9XE) { | ||
134 | return uarts_sam9260; | ||
135 | } | ||
136 | |||
137 | return NULL; | ||
138 | } | ||
139 | |||
140 | static inline void arch_decomp_setup(void) | ||
141 | { | ||
142 | int i = 0; | ||
143 | const u32* usarts; | ||
144 | |||
145 | usarts = decomp_soc_detect(AT91_BASE_DBGU0); | ||
146 | |||
147 | if (!usarts) | ||
148 | usarts = decomp_soc_detect(AT91_BASE_DBGU1); | ||
149 | if (!usarts) { | ||
150 | at91_uart = NULL; | ||
151 | return; | ||
152 | } | ||
153 | |||
154 | do { | ||
155 | /* physical address */ | ||
156 | at91_uart = (void __iomem *)usarts[i]; | ||
157 | |||
158 | if (__raw_readl(at91_uart + ATMEL_US_BRGR)) | ||
159 | return; | ||
160 | i++; | ||
161 | } while (usarts[i]); | ||
162 | |||
163 | at91_uart = NULL; | ||
164 | } | ||
165 | #else | ||
166 | static inline void arch_decomp_setup(void) | ||
167 | { | ||
168 | at91_uart = NULL; | ||
169 | } | ||
44 | #endif | 170 | #endif |
45 | 171 | ||
46 | /* | 172 | /* |
@@ -52,28 +178,24 @@ | |||
52 | */ | 178 | */ |
53 | static void putc(int c) | 179 | static void putc(int c) |
54 | { | 180 | { |
55 | #ifdef UART_OFFSET | 181 | if (!at91_uart) |
56 | void __iomem *sys = (void __iomem *) UART_OFFSET; /* physical address */ | 182 | return; |
57 | 183 | ||
58 | while (!(__raw_readl(sys + ATMEL_US_CSR) & ATMEL_US_TXRDY)) | 184 | while (!(__raw_readl(at91_uart + ATMEL_US_CSR) & ATMEL_US_TXRDY)) |
59 | barrier(); | 185 | barrier(); |
60 | __raw_writel(c, sys + ATMEL_US_THR); | 186 | __raw_writel(c, at91_uart + ATMEL_US_THR); |
61 | #endif | ||
62 | } | 187 | } |
63 | 188 | ||
64 | static inline void flush(void) | 189 | static inline void flush(void) |
65 | { | 190 | { |
66 | #ifdef UART_OFFSET | 191 | if (!at91_uart) |
67 | void __iomem *sys = (void __iomem *) UART_OFFSET; /* physical address */ | 192 | return; |
68 | 193 | ||
69 | /* wait for transmission to complete */ | 194 | /* wait for transmission to complete */ |
70 | while (!(__raw_readl(sys + ATMEL_US_CSR) & ATMEL_US_TXEMPTY)) | 195 | while (!(__raw_readl(at91_uart + ATMEL_US_CSR) & ATMEL_US_TXEMPTY)) |
71 | barrier(); | 196 | barrier(); |
72 | #endif | ||
73 | } | 197 | } |
74 | 198 | ||
75 | #define arch_decomp_setup() | ||
76 | |||
77 | #define arch_decomp_wdog() | 199 | #define arch_decomp_wdog() |
78 | 200 | ||
79 | #endif | 201 | #endif |
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c index f630250c6b8..1bfaad62873 100644 --- a/arch/arm/mach-at91/pm.c +++ b/arch/arm/mach-at91/pm.c | |||
@@ -261,7 +261,12 @@ static int at91_pm_enter(suspend_state_t state) | |||
261 | * For ARM 926 based chips, this requirement is weaker | 261 | * For ARM 926 based chips, this requirement is weaker |
262 | * as at91sam9 can access a RAM in self-refresh mode. | 262 | * as at91sam9 can access a RAM in self-refresh mode. |
263 | */ | 263 | */ |
264 | at91_standby(); | 264 | if (cpu_is_at91rm9200()) |
265 | at91rm9200_standby(); | ||
266 | else if (cpu_is_at91sam9g45()) | ||
267 | at91sam9g45_standby(); | ||
268 | else | ||
269 | at91sam9_standby(); | ||
265 | break; | 270 | break; |
266 | 271 | ||
267 | case PM_SUSPEND_ON: | 272 | case PM_SUSPEND_ON: |
@@ -307,10 +312,9 @@ static int __init at91_pm_init(void) | |||
307 | 312 | ||
308 | pr_info("AT91: Power Management%s\n", (slow_clock ? " (with slow clock mode)" : "")); | 313 | pr_info("AT91: Power Management%s\n", (slow_clock ? " (with slow clock mode)" : "")); |
309 | 314 | ||
310 | #ifdef CONFIG_ARCH_AT91RM9200 | ||
311 | /* AT91RM9200 SDRAM low-power mode cannot be used with self-refresh. */ | 315 | /* AT91RM9200 SDRAM low-power mode cannot be used with self-refresh. */ |
312 | at91_ramc_write(0, AT91RM9200_SDRAMC_LPR, 0); | 316 | if (cpu_is_at91rm9200()) |
313 | #endif | 317 | at91_ramc_write(0, AT91RM9200_SDRAMC_LPR, 0); |
314 | 318 | ||
315 | suspend_set_ops(&at91_pm_ops); | 319 | suspend_set_ops(&at91_pm_ops); |
316 | 320 | ||
diff --git a/arch/arm/mach-at91/pm.h b/arch/arm/mach-at91/pm.h index 89f56f3a802..38f467c6b71 100644 --- a/arch/arm/mach-at91/pm.h +++ b/arch/arm/mach-at91/pm.h | |||
@@ -12,7 +12,6 @@ | |||
12 | #define __ARCH_ARM_MACH_AT91_PM | 12 | #define __ARCH_ARM_MACH_AT91_PM |
13 | 13 | ||
14 | #include <mach/at91_ramc.h> | 14 | #include <mach/at91_ramc.h> |
15 | #ifdef CONFIG_ARCH_AT91RM9200 | ||
16 | #include <mach/at91rm9200_sdramc.h> | 15 | #include <mach/at91rm9200_sdramc.h> |
17 | 16 | ||
18 | /* | 17 | /* |
@@ -43,10 +42,6 @@ static inline void at91rm9200_standby(void) | |||
43 | "r" (lpr)); | 42 | "r" (lpr)); |
44 | } | 43 | } |
45 | 44 | ||
46 | #define at91_standby at91rm9200_standby | ||
47 | |||
48 | #elif defined(CONFIG_ARCH_AT91SAM9G45) | ||
49 | |||
50 | /* We manage both DDRAM/SDRAM controllers, we need more than one value to | 45 | /* We manage both DDRAM/SDRAM controllers, we need more than one value to |
51 | * remember. | 46 | * remember. |
52 | */ | 47 | */ |
@@ -75,11 +70,7 @@ static inline void at91sam9g45_standby(void) | |||
75 | at91_ramc_write(1, AT91_DDRSDRC_LPR, saved_lpr1); | 70 | at91_ramc_write(1, AT91_DDRSDRC_LPR, saved_lpr1); |
76 | } | 71 | } |
77 | 72 | ||
78 | #define at91_standby at91sam9g45_standby | 73 | #ifdef CONFIG_SOC_AT91SAM9263 |
79 | |||
80 | #else | ||
81 | |||
82 | #ifdef CONFIG_ARCH_AT91SAM9263 | ||
83 | /* | 74 | /* |
84 | * FIXME either or both the SDRAM controllers (EB0, EB1) might be in use; | 75 | * FIXME either or both the SDRAM controllers (EB0, EB1) might be in use; |
85 | * handle those cases both here and in the Suspend-To-RAM support. | 76 | * handle those cases both here and in the Suspend-To-RAM support. |
@@ -102,8 +93,4 @@ static inline void at91sam9_standby(void) | |||
102 | at91_ramc_write(0, AT91_SDRAMC_LPR, saved_lpr); | 93 | at91_ramc_write(0, AT91_SDRAMC_LPR, saved_lpr); |
103 | } | 94 | } |
104 | 95 | ||
105 | #define at91_standby at91sam9_standby | ||
106 | |||
107 | #endif | ||
108 | |||
109 | #endif | 96 | #endif |
diff --git a/arch/arm/mach-at91/pm_slowclock.S b/arch/arm/mach-at91/pm_slowclock.S index db5452123f1..098c28ddf02 100644 --- a/arch/arm/mach-at91/pm_slowclock.S +++ b/arch/arm/mach-at91/pm_slowclock.S | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <mach/at91_ramc.h> | 18 | #include <mach/at91_ramc.h> |
19 | 19 | ||
20 | 20 | ||
21 | #ifdef CONFIG_ARCH_AT91SAM9263 | 21 | #ifdef CONFIG_SOC_AT91SAM9263 |
22 | /* | 22 | /* |
23 | * FIXME either or both the SDRAM controllers (EB0, EB1) might be in use; | 23 | * FIXME either or both the SDRAM controllers (EB0, EB1) might be in use; |
24 | * handle those cases both here and in the Suspend-To-RAM support. | 24 | * handle those cases both here and in the Suspend-To-RAM support. |
diff --git a/arch/arm/mach-at91/soc.h b/arch/arm/mach-at91/soc.h index 5db4aa45404..683dddfd8b1 100644 --- a/arch/arm/mach-at91/soc.h +++ b/arch/arm/mach-at91/soc.h | |||
@@ -26,30 +26,30 @@ static inline int at91_soc_is_enabled(void) | |||
26 | return at91_boot_soc.init != NULL; | 26 | return at91_boot_soc.init != NULL; |
27 | } | 27 | } |
28 | 28 | ||
29 | #if !defined(CONFIG_ARCH_AT91RM9200) | 29 | #if !defined(CONFIG_SOC_AT91RM9200) |
30 | #define at91rm9200_soc at91_boot_soc | 30 | #define at91rm9200_soc at91_boot_soc |
31 | #endif | 31 | #endif |
32 | 32 | ||
33 | #if !(defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9G20)) | 33 | #if !defined(CONFIG_SOC_AT91SAM9260) |
34 | #define at91sam9260_soc at91_boot_soc | 34 | #define at91sam9260_soc at91_boot_soc |
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | #if !(defined(CONFIG_ARCH_AT91SAM9261) || defined(CONFIG_ARCH_AT91SAM9G10)) | 37 | #if !defined(CONFIG_SOC_AT91SAM9261) |
38 | #define at91sam9261_soc at91_boot_soc | 38 | #define at91sam9261_soc at91_boot_soc |
39 | #endif | 39 | #endif |
40 | 40 | ||
41 | #if !defined(CONFIG_ARCH_AT91SAM9263) | 41 | #if !defined(CONFIG_SOC_AT91SAM9263) |
42 | #define at91sam9263_soc at91_boot_soc | 42 | #define at91sam9263_soc at91_boot_soc |
43 | #endif | 43 | #endif |
44 | 44 | ||
45 | #if !defined(CONFIG_ARCH_AT91SAM9G45) | 45 | #if !defined(CONFIG_SOC_AT91SAM9G45) |
46 | #define at91sam9g45_soc at91_boot_soc | 46 | #define at91sam9g45_soc at91_boot_soc |
47 | #endif | 47 | #endif |
48 | 48 | ||
49 | #if !defined(CONFIG_ARCH_AT91SAM9RL) | 49 | #if !defined(CONFIG_SOC_AT91SAM9RL) |
50 | #define at91sam9rl_soc at91_boot_soc | 50 | #define at91sam9rl_soc at91_boot_soc |
51 | #endif | 51 | #endif |
52 | 52 | ||
53 | #if !defined(CONFIG_ARCH_AT91SAM9X5) | 53 | #if !defined(CONFIG_SOC_AT91SAM9X5) |
54 | #define at91sam9x5_soc at91_boot_soc | 54 | #define at91sam9x5_soc at91_boot_soc |
55 | #endif | 55 | #endif |
diff --git a/arch/arm/mach-clps711x/Kconfig b/arch/arm/mach-clps711x/Kconfig index eb34bd1251d..ea036d62158 100644 --- a/arch/arm/mach-clps711x/Kconfig +++ b/arch/arm/mach-clps711x/Kconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | if ARCH_CLPS711X | 1 | if ARCH_CLPS711X |
2 | 2 | ||
3 | menu "CLPS711X/EP721X Implementations" | 3 | menu "CLPS711X/EP721X/EP731X Implementations" |
4 | 4 | ||
5 | config ARCH_AUTCPU12 | 5 | config ARCH_AUTCPU12 |
6 | bool "AUTCPU12" | 6 | bool "AUTCPU12" |
@@ -45,26 +45,13 @@ config ARCH_P720T | |||
45 | config ARCH_FORTUNET | 45 | config ARCH_FORTUNET |
46 | bool "FORTUNET" | 46 | bool "FORTUNET" |
47 | 47 | ||
48 | # XXX Maybe these should indicate register compatibility | ||
49 | # instead of being mutually exclusive. | ||
50 | config ARCH_EP7211 | ||
51 | bool | ||
52 | depends on ARCH_EDB7211 | ||
53 | default y | ||
54 | |||
55 | config ARCH_EP7212 | ||
56 | bool | ||
57 | depends on ARCH_P720T || ARCH_CEIVA | ||
58 | default y | ||
59 | |||
60 | config EP72XX_ROM_BOOT | 48 | config EP72XX_ROM_BOOT |
61 | bool "EP72xx ROM boot" | 49 | bool "EP721x/EP731x ROM boot" |
62 | depends on ARCH_EP7211 || ARCH_EP7212 | 50 | help |
63 | ---help--- | ||
64 | If you say Y here, your CLPS711x-based kernel will use the bootstrap | 51 | If you say Y here, your CLPS711x-based kernel will use the bootstrap |
65 | mode memory map instead of the normal memory map. | 52 | mode memory map instead of the normal memory map. |
66 | 53 | ||
67 | Processors derived from the Cirrus CLPS-711X core support two boot | 54 | Processors derived from the Cirrus CLPS711X core support two boot |
68 | modes. Normal mode boots from the external memory device at CS0. | 55 | modes. Normal mode boots from the external memory device at CS0. |
69 | Bootstrap mode rearranges parts of the memory map, placing an | 56 | Bootstrap mode rearranges parts of the memory map, placing an |
70 | internal 128 byte bootstrap ROM at CS0. This option performs the | 57 | internal 128 byte bootstrap ROM at CS0. This option performs the |
diff --git a/arch/arm/mach-clps711x/common.c b/arch/arm/mach-clps711x/common.c index 3c5b5bbf24e..c965fd8eb31 100644 --- a/arch/arm/mach-clps711x/common.c +++ b/arch/arm/mach-clps711x/common.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <asm/page.h> | 36 | #include <asm/page.h> |
37 | #include <asm/mach/map.h> | 37 | #include <asm/mach/map.h> |
38 | #include <asm/mach/time.h> | 38 | #include <asm/mach/time.h> |
39 | #include <asm/hardware/clps7111.h> | ||
40 | #include <asm/system_misc.h> | 39 | #include <asm/system_misc.h> |
41 | 40 | ||
42 | /* | 41 | /* |
@@ -44,8 +43,8 @@ | |||
44 | */ | 43 | */ |
45 | static struct map_desc clps711x_io_desc[] __initdata = { | 44 | static struct map_desc clps711x_io_desc[] __initdata = { |
46 | { | 45 | { |
47 | .virtual = CLPS7111_VIRT_BASE, | 46 | .virtual = (unsigned long)CLPS711X_VIRT_BASE, |
48 | .pfn = __phys_to_pfn(CLPS7111_PHYS_BASE), | 47 | .pfn = __phys_to_pfn(CLPS711X_PHYS_BASE), |
49 | .length = SZ_1M, | 48 | .length = SZ_1M, |
50 | .type = MT_DEVICE | 49 | .type = MT_DEVICE |
51 | } | 50 | } |
@@ -67,12 +66,6 @@ static void int1_mask(struct irq_data *d) | |||
67 | 66 | ||
68 | static void int1_ack(struct irq_data *d) | 67 | static void int1_ack(struct irq_data *d) |
69 | { | 68 | { |
70 | u32 intmr1; | ||
71 | |||
72 | intmr1 = clps_readl(INTMR1); | ||
73 | intmr1 &= ~(1 << d->irq); | ||
74 | clps_writel(intmr1, INTMR1); | ||
75 | |||
76 | switch (d->irq) { | 69 | switch (d->irq) { |
77 | case IRQ_CSINT: clps_writel(0, COEOI); break; | 70 | case IRQ_CSINT: clps_writel(0, COEOI); break; |
78 | case IRQ_TC1OI: clps_writel(0, TC1EOI); break; | 71 | case IRQ_TC1OI: clps_writel(0, TC1EOI); break; |
@@ -109,12 +102,6 @@ static void int2_mask(struct irq_data *d) | |||
109 | 102 | ||
110 | static void int2_ack(struct irq_data *d) | 103 | static void int2_ack(struct irq_data *d) |
111 | { | 104 | { |
112 | u32 intmr2; | ||
113 | |||
114 | intmr2 = clps_readl(INTMR2); | ||
115 | intmr2 &= ~(1 << (d->irq - 16)); | ||
116 | clps_writel(intmr2, INTMR2); | ||
117 | |||
118 | switch (d->irq) { | 105 | switch (d->irq) { |
119 | case IRQ_KBDINT: clps_writel(0, KBDEOI); break; | 106 | case IRQ_KBDINT: clps_writel(0, KBDEOI); break; |
120 | } | 107 | } |
diff --git a/arch/arm/include/asm/hardware/clps7111.h b/arch/arm/mach-clps711x/include/mach/clps711x.h index 44477225aed..1dd806f2847 100644 --- a/arch/arm/include/asm/hardware/clps7111.h +++ b/arch/arm/mach-clps711x/include/mach/clps711x.h | |||
@@ -1,8 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * arch/arm/include/asm/hardware/clps7111.h | 2 | * This file contains the hardware definitions of the Cirrus Logic |
3 | * | 3 | * ARM7 CLPS711X internal registers. |
4 | * This file contains the hardware definitions of the CLPS7111 internal | ||
5 | * registers. | ||
6 | * | 4 | * |
7 | * Copyright (C) 2000 Deep Blue Solutions Ltd. | 5 | * Copyright (C) 2000 Deep Blue Solutions Ltd. |
8 | * | 6 | * |
@@ -20,25 +18,18 @@ | |||
20 | * along with this program; if not, write to the Free Software | 18 | * along with this program; if not, write to the Free Software |
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
22 | */ | 20 | */ |
23 | #ifndef __ASM_HARDWARE_CLPS7111_H | 21 | #ifndef __MACH_CLPS711X_H |
24 | #define __ASM_HARDWARE_CLPS7111_H | 22 | #define __MACH_CLPS711X_H |
25 | |||
26 | #define CLPS7111_PHYS_BASE (0x80000000) | ||
27 | 23 | ||
28 | #ifndef __ASSEMBLY__ | 24 | #define CLPS711X_PHYS_BASE (0x80000000) |
29 | #define clps_readb(off) __raw_readb(CLPS7111_BASE + (off)) | ||
30 | #define clps_readw(off) __raw_readw(CLPS7111_BASE + (off)) | ||
31 | #define clps_readl(off) __raw_readl(CLPS7111_BASE + (off)) | ||
32 | #define clps_writeb(val,off) __raw_writeb(val, CLPS7111_BASE + (off)) | ||
33 | #define clps_writew(val,off) __raw_writew(val, CLPS7111_BASE + (off)) | ||
34 | #define clps_writel(val,off) __raw_writel(val, CLPS7111_BASE + (off)) | ||
35 | #endif | ||
36 | 25 | ||
37 | #define PADR (0x0000) | 26 | #define PADR (0x0000) |
38 | #define PBDR (0x0001) | 27 | #define PBDR (0x0001) |
28 | #define PCDR (0x0002) | ||
39 | #define PDDR (0x0003) | 29 | #define PDDR (0x0003) |
40 | #define PADDR (0x0040) | 30 | #define PADDR (0x0040) |
41 | #define PBDDR (0x0041) | 31 | #define PBDDR (0x0041) |
32 | #define PCDDR (0x0042) | ||
42 | #define PDDDR (0x0043) | 33 | #define PDDDR (0x0043) |
43 | #define PEDR (0x0080) | 34 | #define PEDR (0x0080) |
44 | #define PEDDR (0x00c0) | 35 | #define PEDDR (0x00c0) |
@@ -50,7 +41,7 @@ | |||
50 | #define INTSR1 (0x0240) | 41 | #define INTSR1 (0x0240) |
51 | #define INTMR1 (0x0280) | 42 | #define INTMR1 (0x0280) |
52 | #define LCDCON (0x02c0) | 43 | #define LCDCON (0x02c0) |
53 | #define TC1D (0x0300) | 44 | #define TC1D (0x0300) |
54 | #define TC2D (0x0340) | 45 | #define TC2D (0x0340) |
55 | #define RTCDR (0x0380) | 46 | #define RTCDR (0x0380) |
56 | #define RTCMR (0x03c0) | 47 | #define RTCMR (0x03c0) |
@@ -85,6 +76,26 @@ | |||
85 | #define SS2POP (0x16c0) | 76 | #define SS2POP (0x16c0) |
86 | #define KBDEOI (0x1700) | 77 | #define KBDEOI (0x1700) |
87 | 78 | ||
79 | #define DAIR (0x2000) | ||
80 | #define DAIR0 (0x2040) | ||
81 | #define DAIDR1 (0x2080) | ||
82 | #define DAIDR2 (0x20c0) | ||
83 | #define DAISR (0x2100) | ||
84 | #define SYSCON3 (0x2200) | ||
85 | #define INTSR3 (0x2240) | ||
86 | #define INTMR3 (0x2280) | ||
87 | #define LEDFLSH (0x22c0) | ||
88 | #define SDCONF (0x2300) | ||
89 | #define SDRFPR (0x2340) | ||
90 | #define UNIQID (0x2440) | ||
91 | #define DAI64FS (0x2600) | ||
92 | #define PLLW (0x2610) | ||
93 | #define PLLR (0xa5a8) | ||
94 | #define RANDID0 (0x2700) | ||
95 | #define RANDID1 (0x2704) | ||
96 | #define RANDID2 (0x2708) | ||
97 | #define RANDID3 (0x270c) | ||
98 | |||
88 | /* common bits: SYSCON1 / SYSCON2 */ | 99 | /* common bits: SYSCON1 / SYSCON2 */ |
89 | #define SYSCON_UARTEN (1 << 8) | 100 | #define SYSCON_UARTEN (1 << 8) |
90 | 101 | ||
@@ -131,6 +142,8 @@ | |||
131 | #define SYSFLG1_CTXFF (1 << 25) | 142 | #define SYSFLG1_CTXFF (1 << 25) |
132 | #define SYSFLG1_SSIBUSY (1 << 26) | 143 | #define SYSFLG1_SSIBUSY (1 << 26) |
133 | #define SYSFLG1_ID (1 << 29) | 144 | #define SYSFLG1_ID (1 << 29) |
145 | #define SYSFLG1_VERID(x) (((x) >> 30) & 3) | ||
146 | #define SYSFLG1_VERID_MASK (3 << 30) | ||
134 | 147 | ||
135 | #define SYSFLG2_SSRXOF (1 << 0) | 148 | #define SYSFLG2_SSRXOF (1 << 0) |
136 | #define SYSFLG2_RESVAL (1 << 1) | 149 | #define SYSFLG2_RESVAL (1 << 1) |
@@ -178,7 +191,88 @@ | |||
178 | #define UBRLCR_WRDLEN8 (3 << 17) | 191 | #define UBRLCR_WRDLEN8 (3 << 17) |
179 | #define UBRLCR_WRDLEN_MASK (3 << 17) | 192 | #define UBRLCR_WRDLEN_MASK (3 << 17) |
180 | 193 | ||
194 | #define SYNCIO_FRMLEN(x) (((x) & 0x3f) << 7) | ||
195 | #define SYNCIO_CFGLEN(x) ((x) & 0x7f) | ||
181 | #define SYNCIO_SMCKEN (1 << 13) | 196 | #define SYNCIO_SMCKEN (1 << 13) |
182 | #define SYNCIO_TXFRMEN (1 << 14) | 197 | #define SYNCIO_TXFRMEN (1 << 14) |
183 | 198 | ||
184 | #endif /* __ASM_HARDWARE_CLPS7111_H */ | 199 | #define DAIR_RESERVED (0x0404) |
200 | #define DAIR_DAIEN (1 << 16) | ||
201 | #define DAIR_ECS (1 << 17) | ||
202 | #define DAIR_LCTM (1 << 19) | ||
203 | #define DAIR_LCRM (1 << 20) | ||
204 | #define DAIR_RCTM (1 << 21) | ||
205 | #define DAIR_RCRM (1 << 22) | ||
206 | #define DAIR_LBM (1 << 23) | ||
207 | |||
208 | #define DAIDR2_FIFOEN (1 << 15) | ||
209 | #define DAIDR2_FIFOLEFT (0x0d << 16) | ||
210 | #define DAIDR2_FIFORIGHT (0x11 << 16) | ||
211 | |||
212 | #define DAISR_RCTS (1 << 0) | ||
213 | #define DAISR_RCRS (1 << 1) | ||
214 | #define DAISR_LCTS (1 << 2) | ||
215 | #define DAISR_LCRS (1 << 3) | ||
216 | #define DAISR_RCTU (1 << 4) | ||
217 | #define DAISR_RCRO (1 << 5) | ||
218 | #define DAISR_LCTU (1 << 6) | ||
219 | #define DAISR_LCRO (1 << 7) | ||
220 | #define DAISR_RCNF (1 << 8) | ||
221 | #define DAISR_RCNE (1 << 9) | ||
222 | #define DAISR_LCNF (1 << 10) | ||
223 | #define DAISR_LCNE (1 << 11) | ||
224 | #define DAISR_FIFO (1 << 12) | ||
225 | |||
226 | #define DAI64FS_I2SF64 (1 << 0) | ||
227 | #define DAI64FS_AUDIOCLKEN (1 << 1) | ||
228 | #define DAI64FS_AUDIOCLKSRC (1 << 2) | ||
229 | #define DAI64FS_MCLK256EN (1 << 3) | ||
230 | #define DAI64FS_LOOPBACK (1 << 5) | ||
231 | |||
232 | #define SYSCON3_ADCCON (1 << 0) | ||
233 | #define SYSCON3_CLKCTL0 (1 << 1) | ||
234 | #define SYSCON3_CLKCTL1 (1 << 2) | ||
235 | #define SYSCON3_DAISEL (1 << 3) | ||
236 | #define SYSCON3_ADCCKNSEN (1 << 4) | ||
237 | #define SYSCON3_VERSN(x) (((x) >> 5) & 7) | ||
238 | #define SYSCON3_VERSN_MASK (7 << 5) | ||
239 | #define SYSCON3_FASTWAKE (1 << 8) | ||
240 | #define SYSCON3_DAIEN (1 << 9) | ||
241 | #define SYSCON3_128FS SYSCON3_DAIEN | ||
242 | #define SYSCON3_ENPD67 (1 << 10) | ||
243 | |||
244 | #define SDCONF_ACTIVE (1 << 10) | ||
245 | #define SDCONF_CLKCTL (1 << 9) | ||
246 | #define SDCONF_WIDTH_4 (0 << 7) | ||
247 | #define SDCONF_WIDTH_8 (1 << 7) | ||
248 | #define SDCONF_WIDTH_16 (2 << 7) | ||
249 | #define SDCONF_WIDTH_32 (3 << 7) | ||
250 | #define SDCONF_SIZE_16 (0 << 5) | ||
251 | #define SDCONF_SIZE_64 (1 << 5) | ||
252 | #define SDCONF_SIZE_128 (2 << 5) | ||
253 | #define SDCONF_SIZE_256 (3 << 5) | ||
254 | #define SDCONF_CASLAT_2 (2) | ||
255 | #define SDCONF_CASLAT_3 (3) | ||
256 | |||
257 | #define MEMCFG_BUS_WIDTH_32 (1) | ||
258 | #define MEMCFG_BUS_WIDTH_16 (0) | ||
259 | #define MEMCFG_BUS_WIDTH_8 (3) | ||
260 | |||
261 | #define MEMCFG_WAITSTATE_8_3 (0 << 2) | ||
262 | #define MEMCFG_WAITSTATE_7_3 (1 << 2) | ||
263 | #define MEMCFG_WAITSTATE_6_3 (2 << 2) | ||
264 | #define MEMCFG_WAITSTATE_5_3 (3 << 2) | ||
265 | #define MEMCFG_WAITSTATE_4_2 (4 << 2) | ||
266 | #define MEMCFG_WAITSTATE_3_2 (5 << 2) | ||
267 | #define MEMCFG_WAITSTATE_2_2 (6 << 2) | ||
268 | #define MEMCFG_WAITSTATE_1_2 (7 << 2) | ||
269 | #define MEMCFG_WAITSTATE_8_1 (8 << 2) | ||
270 | #define MEMCFG_WAITSTATE_7_1 (9 << 2) | ||
271 | #define MEMCFG_WAITSTATE_6_1 (10 << 2) | ||
272 | #define MEMCFG_WAITSTATE_5_1 (11 << 2) | ||
273 | #define MEMCFG_WAITSTATE_4_0 (12 << 2) | ||
274 | #define MEMCFG_WAITSTATE_3_0 (13 << 2) | ||
275 | #define MEMCFG_WAITSTATE_2_0 (14 << 2) | ||
276 | #define MEMCFG_WAITSTATE_1_0 (15 << 2) | ||
277 | |||
278 | #endif /* __MACH_CLPS711X_H */ | ||
diff --git a/arch/arm/mach-clps711x/include/mach/debug-macro.S b/arch/arm/mach-clps711x/include/mach/debug-macro.S index b802e8a5183..118b3d93057 100644 --- a/arch/arm/mach-clps711x/include/mach/debug-macro.S +++ b/arch/arm/mach-clps711x/include/mach/debug-macro.S | |||
@@ -12,7 +12,6 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <mach/hardware.h> | 14 | #include <mach/hardware.h> |
15 | #include <asm/hardware/clps7111.h> | ||
16 | 15 | ||
17 | .macro addruart, rp, rv, tmp | 16 | .macro addruart, rp, rv, tmp |
18 | #ifndef CONFIG_DEBUG_CLPS711X_UART2 | 17 | #ifndef CONFIG_DEBUG_CLPS711X_UART2 |
@@ -20,8 +19,8 @@ | |||
20 | #else | 19 | #else |
21 | mov \rp, #0x1000 @ UART2 | 20 | mov \rp, #0x1000 @ UART2 |
22 | #endif | 21 | #endif |
23 | orr \rv, \rp, #CLPS7111_VIRT_BASE | 22 | orr \rv, \rp, #CLPS711X_VIRT_BASE |
24 | orr \rp, \rp, #CLPS7111_PHYS_BASE | 23 | orr \rp, \rp, #CLPS711X_PHYS_BASE |
25 | .endm | 24 | .endm |
26 | 25 | ||
27 | .macro senduart,rd,rx | 26 | .macro senduart,rd,rx |
diff --git a/arch/arm/mach-clps711x/include/mach/entry-macro.S b/arch/arm/mach-clps711x/include/mach/entry-macro.S index 125af59d7a2..56e5c2c2350 100644 --- a/arch/arm/mach-clps711x/include/mach/entry-macro.S +++ b/arch/arm/mach-clps711x/include/mach/entry-macro.S | |||
@@ -8,7 +8,6 @@ | |||
8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
9 | */ | 9 | */ |
10 | #include <mach/hardware.h> | 10 | #include <mach/hardware.h> |
11 | #include <asm/hardware/clps7111.h> | ||
12 | 11 | ||
13 | .macro get_irqnr_preamble, base, tmp | 12 | .macro get_irqnr_preamble, base, tmp |
14 | .endm | 13 | .endm |
@@ -18,7 +17,7 @@ | |||
18 | #endif | 17 | #endif |
19 | 18 | ||
20 | .macro get_irqnr_and_base, irqnr, stat, base, mask | 19 | .macro get_irqnr_and_base, irqnr, stat, base, mask |
21 | mov \base, #CLPS7111_BASE | 20 | mov \base, #CLPS711X_VIRT_BASE |
22 | ldr \stat, [\base, #INTSR1] | 21 | ldr \stat, [\base, #INTSR1] |
23 | ldr \mask, [\base, #INTMR1] | 22 | ldr \mask, [\base, #INTMR1] |
24 | mov \irqnr, #4 | 23 | mov \irqnr, #4 |
diff --git a/arch/arm/mach-clps711x/include/mach/hardware.h b/arch/arm/mach-clps711x/include/mach/hardware.h index d0b7d870be9..13a64fcd7dd 100644 --- a/arch/arm/mach-clps711x/include/mach/hardware.h +++ b/arch/arm/mach-clps711x/include/mach/hardware.h | |||
@@ -19,12 +19,21 @@ | |||
19 | * along with this program; if not, write to the Free Software | 19 | * along with this program; if not, write to the Free Software |
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 | */ | 21 | */ |
22 | #ifndef __ASM_ARCH_HARDWARE_H | 22 | #ifndef __MACH_HARDWARE_H |
23 | #define __ASM_ARCH_HARDWARE_H | 23 | #define __MACH_HARDWARE_H |
24 | 24 | ||
25 | #include <mach/clps711x.h> | ||
25 | 26 | ||
26 | #define CLPS7111_VIRT_BASE 0xff000000 | 27 | #define CLPS711X_VIRT_BASE IOMEM(0xff000000) |
27 | #define CLPS7111_BASE CLPS7111_VIRT_BASE | 28 | |
29 | #ifndef __ASSEMBLY__ | ||
30 | #define clps_readb(off) readb(CLPS711X_VIRT_BASE + (off)) | ||
31 | #define clps_readw(off) readw(CLPS711X_VIRT_BASE + (off)) | ||
32 | #define clps_readl(off) readl(CLPS711X_VIRT_BASE + (off)) | ||
33 | #define clps_writeb(val,off) writeb(val, CLPS711X_VIRT_BASE + (off)) | ||
34 | #define clps_writew(val,off) writew(val, CLPS711X_VIRT_BASE + (off)) | ||
35 | #define clps_writel(val,off) writel(val, CLPS711X_VIRT_BASE + (off)) | ||
36 | #endif | ||
28 | 37 | ||
29 | /* | 38 | /* |
30 | * The physical addresses that the external chip select signals map to is | 39 | * The physical addresses that the external chip select signals map to is |
@@ -52,46 +61,11 @@ | |||
52 | #define CS7_PHYS_BASE (0x00000000) | 61 | #define CS7_PHYS_BASE (0x00000000) |
53 | #endif | 62 | #endif |
54 | 63 | ||
55 | #if defined (CONFIG_ARCH_EP7211) | ||
56 | |||
57 | #define EP7211_VIRT_BASE CLPS7111_VIRT_BASE | ||
58 | #define EP7211_BASE CLPS7111_VIRT_BASE | ||
59 | #include <asm/hardware/ep7211.h> | ||
60 | |||
61 | #elif defined (CONFIG_ARCH_EP7212) | ||
62 | |||
63 | #define EP7212_VIRT_BASE CLPS7111_VIRT_BASE | ||
64 | #define EP7212_BASE CLPS7111_VIRT_BASE | ||
65 | #include <asm/hardware/ep7212.h> | ||
66 | |||
67 | #endif | ||
68 | |||
69 | #define SYSPLD_VIRT_BASE 0xfe000000 | 64 | #define SYSPLD_VIRT_BASE 0xfe000000 |
70 | #define SYSPLD_BASE SYSPLD_VIRT_BASE | 65 | #define SYSPLD_BASE SYSPLD_VIRT_BASE |
71 | 66 | ||
72 | #if defined (CONFIG_ARCH_AUTCPU12) | ||
73 | |||
74 | #define CS89712_VIRT_BASE CLPS7111_VIRT_BASE | ||
75 | #define CS89712_BASE CLPS7111_VIRT_BASE | ||
76 | |||
77 | #include <asm/hardware/clps7111.h> | ||
78 | #include <asm/hardware/ep7212.h> | ||
79 | #include <asm/hardware/cs89712.h> | ||
80 | |||
81 | #endif | ||
82 | |||
83 | |||
84 | #if defined (CONFIG_ARCH_CDB89712) | 67 | #if defined (CONFIG_ARCH_CDB89712) |
85 | 68 | ||
86 | #include <asm/hardware/clps7111.h> | ||
87 | #include <asm/hardware/ep7212.h> | ||
88 | #include <asm/hardware/cs89712.h> | ||
89 | |||
90 | /* static cdb89712_map_io() areas */ | ||
91 | #define REGISTER_START 0x80000000 | ||
92 | #define REGISTER_SIZE 0x4000 | ||
93 | #define REGISTER_BASE 0xff000000 | ||
94 | |||
95 | #define ETHER_START 0x20000000 | 69 | #define ETHER_START 0x20000000 |
96 | #define ETHER_SIZE 0x1000 | 70 | #define ETHER_SIZE 0x1000 |
97 | #define ETHER_BASE 0xfe000000 | 71 | #define ETHER_BASE 0xfe000000 |
@@ -154,13 +128,6 @@ | |||
154 | 128 | ||
155 | #if defined (CONFIG_ARCH_CEIVA) | 129 | #if defined (CONFIG_ARCH_CEIVA) |
156 | 130 | ||
157 | #define CEIVA_VIRT_BASE CLPS7111_VIRT_BASE | ||
158 | #define CEIVA_BASE CLPS7111_VIRT_BASE | ||
159 | |||
160 | #include <asm/hardware/clps7111.h> | ||
161 | #include <asm/hardware/ep7212.h> | ||
162 | |||
163 | |||
164 | /* | 131 | /* |
165 | * The two flash banks are wired to chip selects 0 and 1. This is the mapping | 132 | * The two flash banks are wired to chip selects 0 and 1. This is the mapping |
166 | * for them. | 133 | * for them. |
diff --git a/arch/arm/mach-clps711x/include/mach/irqs.h b/arch/arm/mach-clps711x/include/mach/irqs.h index 30b7e97285a..14d215f8ca8 100644 --- a/arch/arm/mach-clps711x/include/mach/irqs.h +++ b/arch/arm/mach-clps711x/include/mach/irqs.h | |||
@@ -35,7 +35,6 @@ | |||
35 | #define IRQ_SSEOTI 15 | 35 | #define IRQ_SSEOTI 15 |
36 | 36 | ||
37 | #define INT1_IRQS (0x0000fff0) | 37 | #define INT1_IRQS (0x0000fff0) |
38 | #define INT1_ACK_IRQS (0x00004f10) | ||
39 | 38 | ||
40 | /* | 39 | /* |
41 | * Interrupts from INTSR2 | 40 | * Interrupts from INTSR2 |
@@ -47,7 +46,5 @@ | |||
47 | #define IRQ_URXINT2 (16+13) /* bit 13 */ | 46 | #define IRQ_URXINT2 (16+13) /* bit 13 */ |
48 | 47 | ||
49 | #define INT2_IRQS (0x30070000) | 48 | #define INT2_IRQS (0x30070000) |
50 | #define INT2_ACK_IRQS (0x00010000) | ||
51 | |||
52 | #define NR_IRQS 30 | ||
53 | 49 | ||
50 | #define NR_IRQS 30 | ||
diff --git a/arch/arm/mach-clps711x/include/mach/time.h b/arch/arm/mach-clps711x/include/mach/time.h deleted file mode 100644 index 61fef9129c6..00000000000 --- a/arch/arm/mach-clps711x/include/mach/time.h +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-clps711x/include/mach/time.h | ||
3 | * | ||
4 | * Copyright (C) 2000 Deep Blue Solutions Ltd. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #include <asm/leds.h> | ||
21 | #include <asm/hardware/clps7111.h> | ||
22 | |||
23 | extern void clps711x_setup_timer(void); | ||
24 | |||
25 | /* | ||
26 | * IRQ handler for the timer | ||
27 | */ | ||
28 | static irqreturn_t | ||
29 | p720t_timer_interrupt(int irq, void *dev_id) | ||
30 | { | ||
31 | struct pt_regs *regs = get_irq_regs(); | ||
32 | do_leds(); | ||
33 | xtime_update(1); | ||
34 | #ifndef CONFIG_SMP | ||
35 | update_process_times(user_mode(regs)); | ||
36 | #endif | ||
37 | do_profile(regs); | ||
38 | return IRQ_HANDLED; | ||
39 | } | ||
40 | |||
41 | /* | ||
42 | * Set up timer interrupt, and return the current time in seconds. | ||
43 | */ | ||
44 | void __init time_init(void) | ||
45 | { | ||
46 | clps711x_setup_timer(); | ||
47 | timer_irq.handler = p720t_timer_interrupt; | ||
48 | setup_irq(IRQ_TC2OI, &timer_irq); | ||
49 | } | ||
diff --git a/arch/arm/mach-clps711x/include/mach/uncompress.h b/arch/arm/mach-clps711x/include/mach/uncompress.h index 35ed731b9f1..7b28d6a4769 100644 --- a/arch/arm/mach-clps711x/include/mach/uncompress.h +++ b/arch/arm/mach-clps711x/include/mach/uncompress.h | |||
@@ -17,14 +17,7 @@ | |||
17 | * along with this program; if not, write to the Free Software | 17 | * along with this program; if not, write to the Free Software |
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 | */ | 19 | */ |
20 | #include <mach/hardware.h> | 20 | #include <mach/clps711x.h> |
21 | #include <asm/hardware/clps7111.h> | ||
22 | |||
23 | #undef CLPS7111_BASE | ||
24 | #define CLPS7111_BASE CLPS7111_PHYS_BASE | ||
25 | |||
26 | #define __raw_readl(p) (*(unsigned long *)(p)) | ||
27 | #define __raw_writel(v,p) (*(unsigned long *)(p) = (v)) | ||
28 | 21 | ||
29 | #ifdef CONFIG_DEBUG_CLPS711X_UART2 | 22 | #ifdef CONFIG_DEBUG_CLPS711X_UART2 |
30 | #define SYSFLGx SYSFLG2 | 23 | #define SYSFLGx SYSFLG2 |
@@ -34,19 +27,25 @@ | |||
34 | #define UARTDRx UARTDR1 | 27 | #define UARTDRx UARTDR1 |
35 | #endif | 28 | #endif |
36 | 29 | ||
30 | #define phys_reg(x) (*(volatile u32 *)(CLPS711X_PHYS_BASE + (x))) | ||
31 | |||
37 | /* | 32 | /* |
33 | * The following code assumes the serial port has already been | ||
34 | * initialized by the bootloader. If you didn't setup a port in | ||
35 | * your bootloader then nothing will appear (which might be desired). | ||
36 | * | ||
38 | * This does not append a newline | 37 | * This does not append a newline |
39 | */ | 38 | */ |
40 | static inline void putc(int c) | 39 | static inline void putc(int c) |
41 | { | 40 | { |
42 | while (clps_readl(SYSFLGx) & SYSFLG_UTXFF) | 41 | while (phys_reg(SYSFLGx) & SYSFLG_UTXFF) |
43 | barrier(); | 42 | barrier(); |
44 | clps_writel(c, UARTDRx); | 43 | phys_reg(UARTDRx) = c; |
45 | } | 44 | } |
46 | 45 | ||
47 | static inline void flush(void) | 46 | static inline void flush(void) |
48 | { | 47 | { |
49 | while (clps_readl(SYSFLGx) & SYSFLG_UBUSY) | 48 | while (phys_reg(SYSFLGx) & SYSFLG_UBUSY) |
50 | barrier(); | 49 | barrier(); |
51 | } | 50 | } |
52 | 51 | ||
diff --git a/arch/arm/mach-clps711x/p720t-leds.c b/arch/arm/mach-clps711x/p720t-leds.c index dd9a6cdbeb0..bbc449fbe14 100644 --- a/arch/arm/mach-clps711x/p720t-leds.c +++ b/arch/arm/mach-clps711x/p720t-leds.c | |||
@@ -27,9 +27,6 @@ | |||
27 | #include <asm/leds.h> | 27 | #include <asm/leds.h> |
28 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
29 | 29 | ||
30 | #include <asm/hardware/clps7111.h> | ||
31 | #include <asm/hardware/ep7212.h> | ||
32 | |||
33 | static void p720t_leds_event(led_event_t ledevt) | 30 | static void p720t_leds_event(led_event_t ledevt) |
34 | { | 31 | { |
35 | unsigned long flags; | 32 | unsigned long flags; |
diff --git a/arch/arm/mach-cns3xxx/pcie.c b/arch/arm/mach-cns3xxx/pcie.c index 79d001f831e..31132831416 100644 --- a/arch/arm/mach-cns3xxx/pcie.c +++ b/arch/arm/mach-cns3xxx/pcie.c | |||
@@ -166,12 +166,6 @@ static struct pci_ops cns3xxx_pcie_ops = { | |||
166 | .write = cns3xxx_pci_write_config, | 166 | .write = cns3xxx_pci_write_config, |
167 | }; | 167 | }; |
168 | 168 | ||
169 | static struct pci_bus *cns3xxx_pci_scan_bus(int nr, struct pci_sys_data *sys) | ||
170 | { | ||
171 | return pci_scan_root_bus(NULL, sys->busnr, &cns3xxx_pcie_ops, sys, | ||
172 | &sys->resources); | ||
173 | } | ||
174 | |||
175 | static int cns3xxx_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | 169 | static int cns3xxx_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
176 | { | 170 | { |
177 | struct cns3xxx_pcie *cnspci = pdev_to_cnspci(dev); | 171 | struct cns3xxx_pcie *cnspci = pdev_to_cnspci(dev); |
@@ -221,10 +215,9 @@ static struct cns3xxx_pcie cns3xxx_pcie[] = { | |||
221 | .irqs = { IRQ_CNS3XXX_PCIE0_RC, IRQ_CNS3XXX_PCIE0_DEVICE, }, | 215 | .irqs = { IRQ_CNS3XXX_PCIE0_RC, IRQ_CNS3XXX_PCIE0_DEVICE, }, |
222 | .hw_pci = { | 216 | .hw_pci = { |
223 | .domain = 0, | 217 | .domain = 0, |
224 | .swizzle = pci_std_swizzle, | ||
225 | .nr_controllers = 1, | 218 | .nr_controllers = 1, |
219 | .ops = &cns3xxx_pcie_ops, | ||
226 | .setup = cns3xxx_pci_setup, | 220 | .setup = cns3xxx_pci_setup, |
227 | .scan = cns3xxx_pci_scan_bus, | ||
228 | .map_irq = cns3xxx_pcie_map_irq, | 221 | .map_irq = cns3xxx_pcie_map_irq, |
229 | }, | 222 | }, |
230 | }, | 223 | }, |
@@ -264,10 +257,9 @@ static struct cns3xxx_pcie cns3xxx_pcie[] = { | |||
264 | .irqs = { IRQ_CNS3XXX_PCIE1_RC, IRQ_CNS3XXX_PCIE1_DEVICE, }, | 257 | .irqs = { IRQ_CNS3XXX_PCIE1_RC, IRQ_CNS3XXX_PCIE1_DEVICE, }, |
265 | .hw_pci = { | 258 | .hw_pci = { |
266 | .domain = 1, | 259 | .domain = 1, |
267 | .swizzle = pci_std_swizzle, | ||
268 | .nr_controllers = 1, | 260 | .nr_controllers = 1, |
261 | .ops = &cns3xxx_pcie_ops, | ||
269 | .setup = cns3xxx_pci_setup, | 262 | .setup = cns3xxx_pci_setup, |
270 | .scan = cns3xxx_pci_scan_bus, | ||
271 | .map_irq = cns3xxx_pcie_map_irq, | 263 | .map_irq = cns3xxx_pcie_map_irq, |
272 | }, | 264 | }, |
273 | }, | 265 | }, |
diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c index bda7aca04ca..42ab1e7c4ec 100644 --- a/arch/arm/mach-dove/common.c +++ b/arch/arm/mach-dove/common.c | |||
@@ -181,7 +181,7 @@ static int get_tclk(void) | |||
181 | return 166666667; | 181 | return 166666667; |
182 | } | 182 | } |
183 | 183 | ||
184 | static void dove_timer_init(void) | 184 | static void __init dove_timer_init(void) |
185 | { | 185 | { |
186 | orion_time_init(BRIDGE_VIRT_BASE, BRIDGE_INT_TIMER1_CLR, | 186 | orion_time_init(BRIDGE_VIRT_BASE, BRIDGE_INT_TIMER1_CLR, |
187 | IRQ_DOVE_BRIDGE, get_tclk()); | 187 | IRQ_DOVE_BRIDGE, get_tclk()); |
diff --git a/arch/arm/mach-dove/mpp.c b/arch/arm/mach-dove/mpp.c index 51e0e411c9c..7f70afc26f9 100644 --- a/arch/arm/mach-dove/mpp.c +++ b/arch/arm/mach-dove/mpp.c | |||
@@ -56,7 +56,7 @@ static void dove_mpp_gpio_mode(int start, int end, int gpio_mode) | |||
56 | 56 | ||
57 | /* Dump all the extra MPP registers. The platform code will dump the | 57 | /* Dump all the extra MPP registers. The platform code will dump the |
58 | registers for pins 0-23. */ | 58 | registers for pins 0-23. */ |
59 | static void dove_mpp_dump_regs(void) | 59 | static void __init dove_mpp_dump_regs(void) |
60 | { | 60 | { |
61 | pr_debug("PMU_CTRL4_CTRL: %08x\n", | 61 | pr_debug("PMU_CTRL4_CTRL: %08x\n", |
62 | readl(DOVE_MPP_CTRL4_VIRT_BASE)); | 62 | readl(DOVE_MPP_CTRL4_VIRT_BASE)); |
@@ -67,7 +67,7 @@ static void dove_mpp_dump_regs(void) | |||
67 | pr_debug("MPP_GENERAL: %08x\n", readl(DOVE_MPP_GENERAL_VIRT_BASE)); | 67 | pr_debug("MPP_GENERAL: %08x\n", readl(DOVE_MPP_GENERAL_VIRT_BASE)); |
68 | } | 68 | } |
69 | 69 | ||
70 | static void dove_mpp_cfg_nfc(int sel) | 70 | static void __init dove_mpp_cfg_nfc(int sel) |
71 | { | 71 | { |
72 | u32 mpp_gen_cfg = readl(DOVE_MPP_GENERAL_VIRT_BASE); | 72 | u32 mpp_gen_cfg = readl(DOVE_MPP_GENERAL_VIRT_BASE); |
73 | 73 | ||
@@ -78,7 +78,7 @@ static void dove_mpp_cfg_nfc(int sel) | |||
78 | dove_mpp_gpio_mode(64, 71, GPIO_OUTPUT_OK); | 78 | dove_mpp_gpio_mode(64, 71, GPIO_OUTPUT_OK); |
79 | } | 79 | } |
80 | 80 | ||
81 | static void dove_mpp_cfg_au1(int sel) | 81 | static void __init dove_mpp_cfg_au1(int sel) |
82 | { | 82 | { |
83 | u32 mpp_ctrl4 = readl(DOVE_MPP_CTRL4_VIRT_BASE); | 83 | u32 mpp_ctrl4 = readl(DOVE_MPP_CTRL4_VIRT_BASE); |
84 | u32 ssp_ctrl1 = readl(DOVE_SSP_CTRL_STATUS_1); | 84 | u32 ssp_ctrl1 = readl(DOVE_SSP_CTRL_STATUS_1); |
@@ -118,7 +118,7 @@ static void dove_mpp_cfg_au1(int sel) | |||
118 | 118 | ||
119 | /* Configure the group registers, enabling GPIO if sel indicates the | 119 | /* Configure the group registers, enabling GPIO if sel indicates the |
120 | pin is to be used for GPIO */ | 120 | pin is to be used for GPIO */ |
121 | static void dove_mpp_conf_grp(unsigned int *mpp_grp_list) | 121 | static void __init dove_mpp_conf_grp(unsigned int *mpp_grp_list) |
122 | { | 122 | { |
123 | u32 mpp_ctrl4 = readl(DOVE_MPP_CTRL4_VIRT_BASE); | 123 | u32 mpp_ctrl4 = readl(DOVE_MPP_CTRL4_VIRT_BASE); |
124 | int gpio_mode; | 124 | int gpio_mode; |
diff --git a/arch/arm/mach-dove/pcie.c b/arch/arm/mach-dove/pcie.c index 48a032005ea..47921b0cdc6 100644 --- a/arch/arm/mach-dove/pcie.c +++ b/arch/arm/mach-dove/pcie.c | |||
@@ -43,6 +43,7 @@ static int __init dove_pcie_setup(int nr, struct pci_sys_data *sys) | |||
43 | return 0; | 43 | return 0; |
44 | 44 | ||
45 | pp = &pcie_port[nr]; | 45 | pp = &pcie_port[nr]; |
46 | sys->private_data = pp; | ||
46 | pp->root_bus_nr = sys->busnr; | 47 | pp->root_bus_nr = sys->busnr; |
47 | 48 | ||
48 | /* | 49 | /* |
@@ -93,19 +94,6 @@ static int __init dove_pcie_setup(int nr, struct pci_sys_data *sys) | |||
93 | return 1; | 94 | return 1; |
94 | } | 95 | } |
95 | 96 | ||
96 | static struct pcie_port *bus_to_port(int bus) | ||
97 | { | ||
98 | int i; | ||
99 | |||
100 | for (i = num_pcie_ports - 1; i >= 0; i--) { | ||
101 | int rbus = pcie_port[i].root_bus_nr; | ||
102 | if (rbus != -1 && rbus <= bus) | ||
103 | break; | ||
104 | } | ||
105 | |||
106 | return i >= 0 ? pcie_port + i : NULL; | ||
107 | } | ||
108 | |||
109 | static int pcie_valid_config(struct pcie_port *pp, int bus, int dev) | 97 | static int pcie_valid_config(struct pcie_port *pp, int bus, int dev) |
110 | { | 98 | { |
111 | /* | 99 | /* |
@@ -121,7 +109,8 @@ static int pcie_valid_config(struct pcie_port *pp, int bus, int dev) | |||
121 | static int pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, | 109 | static int pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, |
122 | int size, u32 *val) | 110 | int size, u32 *val) |
123 | { | 111 | { |
124 | struct pcie_port *pp = bus_to_port(bus->number); | 112 | struct pci_sys_data *sys = bus->sysdata; |
113 | struct pcie_port *pp = sys->private_data; | ||
125 | unsigned long flags; | 114 | unsigned long flags; |
126 | int ret; | 115 | int ret; |
127 | 116 | ||
@@ -140,7 +129,8 @@ static int pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, | |||
140 | static int pcie_wr_conf(struct pci_bus *bus, u32 devfn, | 129 | static int pcie_wr_conf(struct pci_bus *bus, u32 devfn, |
141 | int where, int size, u32 val) | 130 | int where, int size, u32 val) |
142 | { | 131 | { |
143 | struct pcie_port *pp = bus_to_port(bus->number); | 132 | struct pci_sys_data *sys = bus->sysdata; |
133 | struct pcie_port *pp = sys->private_data; | ||
144 | unsigned long flags; | 134 | unsigned long flags; |
145 | int ret; | 135 | int ret; |
146 | 136 | ||
@@ -194,14 +184,14 @@ dove_pcie_scan_bus(int nr, struct pci_sys_data *sys) | |||
194 | 184 | ||
195 | static int __init dove_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | 185 | static int __init dove_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
196 | { | 186 | { |
197 | struct pcie_port *pp = bus_to_port(dev->bus->number); | 187 | struct pci_sys_data *sys = dev->sysdata; |
188 | struct pcie_port *pp = sys->private_data; | ||
198 | 189 | ||
199 | return pp->index ? IRQ_DOVE_PCIE1 : IRQ_DOVE_PCIE0; | 190 | return pp->index ? IRQ_DOVE_PCIE1 : IRQ_DOVE_PCIE0; |
200 | } | 191 | } |
201 | 192 | ||
202 | static struct hw_pci dove_pci __initdata = { | 193 | static struct hw_pci dove_pci __initdata = { |
203 | .nr_controllers = 2, | 194 | .nr_controllers = 2, |
204 | .swizzle = pci_std_swizzle, | ||
205 | .setup = dove_pcie_setup, | 195 | .setup = dove_pcie_setup, |
206 | .scan = dove_pcie_scan_bus, | 196 | .scan = dove_pcie_scan_bus, |
207 | .map_irq = dove_pcie_map_irq, | 197 | .map_irq = dove_pcie_map_irq, |
diff --git a/arch/arm/mach-ep93xx/Kconfig b/arch/arm/mach-ep93xx/Kconfig index 97a249395b5..fe3c1fa5462 100644 --- a/arch/arm/mach-ep93xx/Kconfig +++ b/arch/arm/mach-ep93xx/Kconfig | |||
@@ -2,6 +2,11 @@ if ARCH_EP93XX | |||
2 | 2 | ||
3 | menu "Cirrus EP93xx Implementation Options" | 3 | menu "Cirrus EP93xx Implementation Options" |
4 | 4 | ||
5 | config EP93XX_SOC_COMMON | ||
6 | bool | ||
7 | default y | ||
8 | select LEDS_GPIO_REGISTER | ||
9 | |||
5 | config CRUNCH | 10 | config CRUNCH |
6 | bool "Support for MaverickCrunch" | 11 | bool "Support for MaverickCrunch" |
7 | help | 12 | help |
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index 8d258958871..66b1494f23a 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c | |||
@@ -241,11 +241,7 @@ unsigned int ep93xx_chip_revision(void) | |||
241 | * EP93xx GPIO | 241 | * EP93xx GPIO |
242 | *************************************************************************/ | 242 | *************************************************************************/ |
243 | static struct resource ep93xx_gpio_resource[] = { | 243 | static struct resource ep93xx_gpio_resource[] = { |
244 | { | 244 | DEFINE_RES_MEM(EP93XX_GPIO_PHYS_BASE, 0xcc), |
245 | .start = EP93XX_GPIO_PHYS_BASE, | ||
246 | .end = EP93XX_GPIO_PHYS_BASE + 0xcc - 1, | ||
247 | .flags = IORESOURCE_MEM, | ||
248 | }, | ||
249 | }; | 245 | }; |
250 | 246 | ||
251 | static struct platform_device ep93xx_gpio_device = { | 247 | static struct platform_device ep93xx_gpio_device = { |
@@ -288,11 +284,7 @@ static AMBA_APB_DEVICE(uart3, "apb:uart3", 0x00041010, EP93XX_UART3_PHYS_BASE, | |||
288 | { IRQ_EP93XX_UART3 }, &ep93xx_uart_data); | 284 | { IRQ_EP93XX_UART3 }, &ep93xx_uart_data); |
289 | 285 | ||
290 | static struct resource ep93xx_rtc_resource[] = { | 286 | static struct resource ep93xx_rtc_resource[] = { |
291 | { | 287 | DEFINE_RES_MEM(EP93XX_RTC_PHYS_BASE, 0x10c), |
292 | .start = EP93XX_RTC_PHYS_BASE, | ||
293 | .end = EP93XX_RTC_PHYS_BASE + 0x10c - 1, | ||
294 | .flags = IORESOURCE_MEM, | ||
295 | }, | ||
296 | }; | 288 | }; |
297 | 289 | ||
298 | static struct platform_device ep93xx_rtc_device = { | 290 | static struct platform_device ep93xx_rtc_device = { |
@@ -304,16 +296,8 @@ static struct platform_device ep93xx_rtc_device = { | |||
304 | 296 | ||
305 | 297 | ||
306 | static struct resource ep93xx_ohci_resources[] = { | 298 | static struct resource ep93xx_ohci_resources[] = { |
307 | [0] = { | 299 | DEFINE_RES_MEM(EP93XX_USB_PHYS_BASE, 0x1000), |
308 | .start = EP93XX_USB_PHYS_BASE, | 300 | DEFINE_RES_IRQ(IRQ_EP93XX_USB), |
309 | .end = EP93XX_USB_PHYS_BASE + 0x0fff, | ||
310 | .flags = IORESOURCE_MEM, | ||
311 | }, | ||
312 | [1] = { | ||
313 | .start = IRQ_EP93XX_USB, | ||
314 | .end = IRQ_EP93XX_USB, | ||
315 | .flags = IORESOURCE_IRQ, | ||
316 | }, | ||
317 | }; | 301 | }; |
318 | 302 | ||
319 | 303 | ||
@@ -372,15 +356,8 @@ void __init ep93xx_register_flash(unsigned int width, | |||
372 | static struct ep93xx_eth_data ep93xx_eth_data; | 356 | static struct ep93xx_eth_data ep93xx_eth_data; |
373 | 357 | ||
374 | static struct resource ep93xx_eth_resource[] = { | 358 | static struct resource ep93xx_eth_resource[] = { |
375 | { | 359 | DEFINE_RES_MEM(EP93XX_ETHERNET_PHYS_BASE, 0x10000), |
376 | .start = EP93XX_ETHERNET_PHYS_BASE, | 360 | DEFINE_RES_IRQ(IRQ_EP93XX_ETHERNET), |
377 | .end = EP93XX_ETHERNET_PHYS_BASE + 0xffff, | ||
378 | .flags = IORESOURCE_MEM, | ||
379 | }, { | ||
380 | .start = IRQ_EP93XX_ETHERNET, | ||
381 | .end = IRQ_EP93XX_ETHERNET, | ||
382 | .flags = IORESOURCE_IRQ, | ||
383 | } | ||
384 | }; | 361 | }; |
385 | 362 | ||
386 | static u64 ep93xx_eth_dma_mask = DMA_BIT_MASK(32); | 363 | static u64 ep93xx_eth_dma_mask = DMA_BIT_MASK(32); |
@@ -461,16 +438,8 @@ void __init ep93xx_register_i2c(struct i2c_gpio_platform_data *data, | |||
461 | static struct ep93xx_spi_info ep93xx_spi_master_data; | 438 | static struct ep93xx_spi_info ep93xx_spi_master_data; |
462 | 439 | ||
463 | static struct resource ep93xx_spi_resources[] = { | 440 | static struct resource ep93xx_spi_resources[] = { |
464 | { | 441 | DEFINE_RES_MEM(EP93XX_SPI_PHYS_BASE, 0x18), |
465 | .start = EP93XX_SPI_PHYS_BASE, | 442 | DEFINE_RES_IRQ(IRQ_EP93XX_SSP), |
466 | .end = EP93XX_SPI_PHYS_BASE + 0x18 - 1, | ||
467 | .flags = IORESOURCE_MEM, | ||
468 | }, | ||
469 | { | ||
470 | .start = IRQ_EP93XX_SSP, | ||
471 | .end = IRQ_EP93XX_SSP, | ||
472 | .flags = IORESOURCE_IRQ, | ||
473 | }, | ||
474 | }; | 443 | }; |
475 | 444 | ||
476 | static u64 ep93xx_spi_dma_mask = DMA_BIT_MASK(32); | 445 | static u64 ep93xx_spi_dma_mask = DMA_BIT_MASK(32); |
@@ -513,7 +482,7 @@ void __init ep93xx_register_spi(struct ep93xx_spi_info *info, | |||
513 | /************************************************************************* | 482 | /************************************************************************* |
514 | * EP93xx LEDs | 483 | * EP93xx LEDs |
515 | *************************************************************************/ | 484 | *************************************************************************/ |
516 | static struct gpio_led ep93xx_led_pins[] = { | 485 | static const struct gpio_led ep93xx_led_pins[] __initconst = { |
517 | { | 486 | { |
518 | .name = "platform:grled", | 487 | .name = "platform:grled", |
519 | .gpio = EP93XX_GPIO_LINE_GRLED, | 488 | .gpio = EP93XX_GPIO_LINE_GRLED, |
@@ -523,29 +492,16 @@ static struct gpio_led ep93xx_led_pins[] = { | |||
523 | }, | 492 | }, |
524 | }; | 493 | }; |
525 | 494 | ||
526 | static struct gpio_led_platform_data ep93xx_led_data = { | 495 | static const struct gpio_led_platform_data ep93xx_led_data __initconst = { |
527 | .num_leds = ARRAY_SIZE(ep93xx_led_pins), | 496 | .num_leds = ARRAY_SIZE(ep93xx_led_pins), |
528 | .leds = ep93xx_led_pins, | 497 | .leds = ep93xx_led_pins, |
529 | }; | 498 | }; |
530 | 499 | ||
531 | static struct platform_device ep93xx_leds = { | ||
532 | .name = "leds-gpio", | ||
533 | .id = -1, | ||
534 | .dev = { | ||
535 | .platform_data = &ep93xx_led_data, | ||
536 | }, | ||
537 | }; | ||
538 | |||
539 | |||
540 | /************************************************************************* | 500 | /************************************************************************* |
541 | * EP93xx pwm peripheral handling | 501 | * EP93xx pwm peripheral handling |
542 | *************************************************************************/ | 502 | *************************************************************************/ |
543 | static struct resource ep93xx_pwm0_resource[] = { | 503 | static struct resource ep93xx_pwm0_resource[] = { |
544 | { | 504 | DEFINE_RES_MEM(EP93XX_PWM_PHYS_BASE, 0x10), |
545 | .start = EP93XX_PWM_PHYS_BASE, | ||
546 | .end = EP93XX_PWM_PHYS_BASE + 0x10 - 1, | ||
547 | .flags = IORESOURCE_MEM, | ||
548 | }, | ||
549 | }; | 505 | }; |
550 | 506 | ||
551 | static struct platform_device ep93xx_pwm0_device = { | 507 | static struct platform_device ep93xx_pwm0_device = { |
@@ -556,11 +512,7 @@ static struct platform_device ep93xx_pwm0_device = { | |||
556 | }; | 512 | }; |
557 | 513 | ||
558 | static struct resource ep93xx_pwm1_resource[] = { | 514 | static struct resource ep93xx_pwm1_resource[] = { |
559 | { | 515 | DEFINE_RES_MEM(EP93XX_PWM_PHYS_BASE + 0x20, 0x10), |
560 | .start = EP93XX_PWM_PHYS_BASE + 0x20, | ||
561 | .end = EP93XX_PWM_PHYS_BASE + 0x30 - 1, | ||
562 | .flags = IORESOURCE_MEM, | ||
563 | }, | ||
564 | }; | 516 | }; |
565 | 517 | ||
566 | static struct platform_device ep93xx_pwm1_device = { | 518 | static struct platform_device ep93xx_pwm1_device = { |
@@ -628,11 +580,7 @@ EXPORT_SYMBOL(ep93xx_pwm_release_gpio); | |||
628 | static struct ep93xxfb_mach_info ep93xxfb_data; | 580 | static struct ep93xxfb_mach_info ep93xxfb_data; |
629 | 581 | ||
630 | static struct resource ep93xx_fb_resource[] = { | 582 | static struct resource ep93xx_fb_resource[] = { |
631 | { | 583 | DEFINE_RES_MEM(EP93XX_RASTER_PHYS_BASE, 0x800), |
632 | .start = EP93XX_RASTER_PHYS_BASE, | ||
633 | .end = EP93XX_RASTER_PHYS_BASE + 0x800 - 1, | ||
634 | .flags = IORESOURCE_MEM, | ||
635 | }, | ||
636 | }; | 584 | }; |
637 | 585 | ||
638 | static struct platform_device ep93xx_fb_device = { | 586 | static struct platform_device ep93xx_fb_device = { |
@@ -680,15 +628,8 @@ void __init ep93xx_register_fb(struct ep93xxfb_mach_info *data) | |||
680 | static struct ep93xx_keypad_platform_data ep93xx_keypad_data; | 628 | static struct ep93xx_keypad_platform_data ep93xx_keypad_data; |
681 | 629 | ||
682 | static struct resource ep93xx_keypad_resource[] = { | 630 | static struct resource ep93xx_keypad_resource[] = { |
683 | { | 631 | DEFINE_RES_MEM(EP93XX_KEY_MATRIX_PHYS_BASE, 0x0c), |
684 | .start = EP93XX_KEY_MATRIX_PHYS_BASE, | 632 | DEFINE_RES_IRQ(IRQ_EP93XX_KEY), |
685 | .end = EP93XX_KEY_MATRIX_PHYS_BASE + 0x0c - 1, | ||
686 | .flags = IORESOURCE_MEM, | ||
687 | }, { | ||
688 | .start = IRQ_EP93XX_KEY, | ||
689 | .end = IRQ_EP93XX_KEY, | ||
690 | .flags = IORESOURCE_IRQ, | ||
691 | }, | ||
692 | }; | 633 | }; |
693 | 634 | ||
694 | static struct platform_device ep93xx_keypad_device = { | 635 | static struct platform_device ep93xx_keypad_device = { |
@@ -761,11 +702,7 @@ EXPORT_SYMBOL(ep93xx_keypad_release_gpio); | |||
761 | * EP93xx I2S audio peripheral handling | 702 | * EP93xx I2S audio peripheral handling |
762 | *************************************************************************/ | 703 | *************************************************************************/ |
763 | static struct resource ep93xx_i2s_resource[] = { | 704 | static struct resource ep93xx_i2s_resource[] = { |
764 | { | 705 | DEFINE_RES_MEM(EP93XX_I2S_PHYS_BASE, 0x100), |
765 | .start = EP93XX_I2S_PHYS_BASE, | ||
766 | .end = EP93XX_I2S_PHYS_BASE + 0x100 - 1, | ||
767 | .flags = IORESOURCE_MEM, | ||
768 | }, | ||
769 | }; | 706 | }; |
770 | 707 | ||
771 | static struct platform_device ep93xx_i2s_device = { | 708 | static struct platform_device ep93xx_i2s_device = { |
@@ -824,16 +761,8 @@ EXPORT_SYMBOL(ep93xx_i2s_release); | |||
824 | * EP93xx AC97 audio peripheral handling | 761 | * EP93xx AC97 audio peripheral handling |
825 | *************************************************************************/ | 762 | *************************************************************************/ |
826 | static struct resource ep93xx_ac97_resources[] = { | 763 | static struct resource ep93xx_ac97_resources[] = { |
827 | { | 764 | DEFINE_RES_MEM(EP93XX_AAC_PHYS_BASE, 0xac), |
828 | .start = EP93XX_AAC_PHYS_BASE, | 765 | DEFINE_RES_IRQ(IRQ_EP93XX_AACINTR), |
829 | .end = EP93XX_AAC_PHYS_BASE + 0xac - 1, | ||
830 | .flags = IORESOURCE_MEM, | ||
831 | }, | ||
832 | { | ||
833 | .start = IRQ_EP93XX_AACINTR, | ||
834 | .end = IRQ_EP93XX_AACINTR, | ||
835 | .flags = IORESOURCE_IRQ, | ||
836 | }, | ||
837 | }; | 766 | }; |
838 | 767 | ||
839 | static struct platform_device ep93xx_ac97_device = { | 768 | static struct platform_device ep93xx_ac97_device = { |
@@ -889,8 +818,9 @@ void __init ep93xx_init_devices(void) | |||
889 | 818 | ||
890 | platform_device_register(&ep93xx_rtc_device); | 819 | platform_device_register(&ep93xx_rtc_device); |
891 | platform_device_register(&ep93xx_ohci_device); | 820 | platform_device_register(&ep93xx_ohci_device); |
892 | platform_device_register(&ep93xx_leds); | ||
893 | platform_device_register(&ep93xx_wdt_device); | 821 | platform_device_register(&ep93xx_wdt_device); |
822 | |||
823 | gpio_led_register_device(-1, &ep93xx_led_data); | ||
894 | } | 824 | } |
895 | 825 | ||
896 | void ep93xx_restart(char mode, const char *cmd) | 826 | void ep93xx_restart(char mode, const char *cmd) |
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index e81c35f936b..b8df521fb68 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig | |||
@@ -232,6 +232,9 @@ config MACH_ARMLEX4210 | |||
232 | config MACH_UNIVERSAL_C210 | 232 | config MACH_UNIVERSAL_C210 |
233 | bool "Mobile UNIVERSAL_C210 Board" | 233 | bool "Mobile UNIVERSAL_C210 Board" |
234 | select CPU_EXYNOS4210 | 234 | select CPU_EXYNOS4210 |
235 | select S5P_HRT | ||
236 | select CLKSRC_MMIO | ||
237 | select HAVE_SCHED_CLOCK | ||
235 | select S5P_GPIO_INT | 238 | select S5P_GPIO_INT |
236 | select S5P_DEV_FIMC0 | 239 | select S5P_DEV_FIMC0 |
237 | select S5P_DEV_FIMC1 | 240 | select S5P_DEV_FIMC1 |
diff --git a/arch/arm/mach-exynos/clock-exynos5.c b/arch/arm/mach-exynos/clock-exynos5.c index 5cd7a8b8868..7ac6ff4c46b 100644 --- a/arch/arm/mach-exynos/clock-exynos5.c +++ b/arch/arm/mach-exynos/clock-exynos5.c | |||
@@ -678,7 +678,7 @@ static struct clk exynos5_clk_pdma1 = { | |||
678 | .name = "dma", | 678 | .name = "dma", |
679 | .devname = "dma-pl330.1", | 679 | .devname = "dma-pl330.1", |
680 | .enable = exynos5_clk_ip_fsys_ctrl, | 680 | .enable = exynos5_clk_ip_fsys_ctrl, |
681 | .ctrlbit = (1 << 1), | 681 | .ctrlbit = (1 << 2), |
682 | }; | 682 | }; |
683 | 683 | ||
684 | static struct clk exynos5_clk_mdma1 = { | 684 | static struct clk exynos5_clk_mdma1 = { |
diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c index 33ab4e7558a..26dac2893b8 100644 --- a/arch/arm/mach-exynos/cpuidle.c +++ b/arch/arm/mach-exynos/cpuidle.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <asm/smp_scu.h> | 20 | #include <asm/smp_scu.h> |
21 | #include <asm/suspend.h> | 21 | #include <asm/suspend.h> |
22 | #include <asm/unified.h> | 22 | #include <asm/unified.h> |
23 | #include <asm/cpuidle.h> | ||
23 | #include <mach/regs-pmu.h> | 24 | #include <mach/regs-pmu.h> |
24 | #include <mach/pmu.h> | 25 | #include <mach/pmu.h> |
25 | 26 | ||
@@ -34,22 +35,12 @@ | |||
34 | 35 | ||
35 | #define S5P_CHECK_AFTR 0xFCBA0D10 | 36 | #define S5P_CHECK_AFTR 0xFCBA0D10 |
36 | 37 | ||
37 | static int exynos4_enter_idle(struct cpuidle_device *dev, | ||
38 | struct cpuidle_driver *drv, | ||
39 | int index); | ||
40 | static int exynos4_enter_lowpower(struct cpuidle_device *dev, | 38 | static int exynos4_enter_lowpower(struct cpuidle_device *dev, |
41 | struct cpuidle_driver *drv, | 39 | struct cpuidle_driver *drv, |
42 | int index); | 40 | int index); |
43 | 41 | ||
44 | static struct cpuidle_state exynos4_cpuidle_set[] __initdata = { | 42 | static struct cpuidle_state exynos4_cpuidle_set[] __initdata = { |
45 | [0] = { | 43 | [0] = ARM_CPUIDLE_WFI_STATE, |
46 | .enter = exynos4_enter_idle, | ||
47 | .exit_latency = 1, | ||
48 | .target_residency = 100000, | ||
49 | .flags = CPUIDLE_FLAG_TIME_VALID, | ||
50 | .name = "C0", | ||
51 | .desc = "ARM clock gating(WFI)", | ||
52 | }, | ||
53 | [1] = { | 44 | [1] = { |
54 | .enter = exynos4_enter_lowpower, | 45 | .enter = exynos4_enter_lowpower, |
55 | .exit_latency = 300, | 46 | .exit_latency = 300, |
@@ -63,8 +54,9 @@ static struct cpuidle_state exynos4_cpuidle_set[] __initdata = { | |||
63 | static DEFINE_PER_CPU(struct cpuidle_device, exynos4_cpuidle_device); | 54 | static DEFINE_PER_CPU(struct cpuidle_device, exynos4_cpuidle_device); |
64 | 55 | ||
65 | static struct cpuidle_driver exynos4_idle_driver = { | 56 | static struct cpuidle_driver exynos4_idle_driver = { |
66 | .name = "exynos4_idle", | 57 | .name = "exynos4_idle", |
67 | .owner = THIS_MODULE, | 58 | .owner = THIS_MODULE, |
59 | .en_core_tk_irqen = 1, | ||
68 | }; | 60 | }; |
69 | 61 | ||
70 | /* Ext-GIC nIRQ/nFIQ is the only wakeup source in AFTR */ | 62 | /* Ext-GIC nIRQ/nFIQ is the only wakeup source in AFTR */ |
@@ -103,13 +95,8 @@ static int exynos4_enter_core0_aftr(struct cpuidle_device *dev, | |||
103 | struct cpuidle_driver *drv, | 95 | struct cpuidle_driver *drv, |
104 | int index) | 96 | int index) |
105 | { | 97 | { |
106 | struct timeval before, after; | ||
107 | int idle_time; | ||
108 | unsigned long tmp; | 98 | unsigned long tmp; |
109 | 99 | ||
110 | local_irq_disable(); | ||
111 | do_gettimeofday(&before); | ||
112 | |||
113 | exynos4_set_wakeupmask(); | 100 | exynos4_set_wakeupmask(); |
114 | 101 | ||
115 | /* Set value of power down register for aftr mode */ | 102 | /* Set value of power down register for aftr mode */ |
@@ -150,34 +137,6 @@ static int exynos4_enter_core0_aftr(struct cpuidle_device *dev, | |||
150 | /* Clear wakeup state register */ | 137 | /* Clear wakeup state register */ |
151 | __raw_writel(0x0, S5P_WAKEUP_STAT); | 138 | __raw_writel(0x0, S5P_WAKEUP_STAT); |
152 | 139 | ||
153 | do_gettimeofday(&after); | ||
154 | |||
155 | local_irq_enable(); | ||
156 | idle_time = (after.tv_sec - before.tv_sec) * USEC_PER_SEC + | ||
157 | (after.tv_usec - before.tv_usec); | ||
158 | |||
159 | dev->last_residency = idle_time; | ||
160 | return index; | ||
161 | } | ||
162 | |||
163 | static int exynos4_enter_idle(struct cpuidle_device *dev, | ||
164 | struct cpuidle_driver *drv, | ||
165 | int index) | ||
166 | { | ||
167 | struct timeval before, after; | ||
168 | int idle_time; | ||
169 | |||
170 | local_irq_disable(); | ||
171 | do_gettimeofday(&before); | ||
172 | |||
173 | cpu_do_idle(); | ||
174 | |||
175 | do_gettimeofday(&after); | ||
176 | local_irq_enable(); | ||
177 | idle_time = (after.tv_sec - before.tv_sec) * USEC_PER_SEC + | ||
178 | (after.tv_usec - before.tv_usec); | ||
179 | |||
180 | dev->last_residency = idle_time; | ||
181 | return index; | 140 | return index; |
182 | } | 141 | } |
183 | 142 | ||
@@ -192,7 +151,7 @@ static int exynos4_enter_lowpower(struct cpuidle_device *dev, | |||
192 | new_index = drv->safe_state_index; | 151 | new_index = drv->safe_state_index; |
193 | 152 | ||
194 | if (new_index == 0) | 153 | if (new_index == 0) |
195 | return exynos4_enter_idle(dev, drv, new_index); | 154 | return arm_cpuidle_simple_enter(dev, drv, new_index); |
196 | else | 155 | else |
197 | return exynos4_enter_core0_aftr(dev, drv, new_index); | 156 | return exynos4_enter_core0_aftr(dev, drv, new_index); |
198 | } | 157 | } |
diff --git a/arch/arm/mach-exynos/dev-ahci.c b/arch/arm/mach-exynos/dev-ahci.c index 50ce5b0adcf..ce1aad3eeeb 100644 --- a/arch/arm/mach-exynos/dev-ahci.c +++ b/arch/arm/mach-exynos/dev-ahci.c | |||
@@ -236,16 +236,8 @@ static struct ahci_platform_data exynos4_ahci_pdata = { | |||
236 | }; | 236 | }; |
237 | 237 | ||
238 | static struct resource exynos4_ahci_resource[] = { | 238 | static struct resource exynos4_ahci_resource[] = { |
239 | [0] = { | 239 | [0] = DEFINE_RES_MEM(EXYNOS4_PA_SATA, SZ_64K), |
240 | .start = EXYNOS4_PA_SATA, | 240 | [1] = DEFINE_RES_IRQ(EXYNOS4_IRQ_SATA), |
241 | .end = EXYNOS4_PA_SATA + SZ_64K - 1, | ||
242 | .flags = IORESOURCE_MEM, | ||
243 | }, | ||
244 | [1] = { | ||
245 | .start = EXYNOS4_IRQ_SATA, | ||
246 | .end = EXYNOS4_IRQ_SATA, | ||
247 | .flags = IORESOURCE_IRQ, | ||
248 | }, | ||
249 | }; | 241 | }; |
250 | 242 | ||
251 | static u64 exynos4_ahci_dmamask = DMA_BIT_MASK(32); | 243 | static u64 exynos4_ahci_dmamask = DMA_BIT_MASK(32); |
diff --git a/arch/arm/mach-exynos/dev-audio.c b/arch/arm/mach-exynos/dev-audio.c index 7199e1ae79b..b33a5b67b54 100644 --- a/arch/arm/mach-exynos/dev-audio.c +++ b/arch/arm/mach-exynos/dev-audio.c | |||
@@ -62,26 +62,10 @@ static struct s3c_audio_pdata i2sv5_pdata = { | |||
62 | }; | 62 | }; |
63 | 63 | ||
64 | static struct resource exynos4_i2s0_resource[] = { | 64 | static struct resource exynos4_i2s0_resource[] = { |
65 | [0] = { | 65 | [0] = DEFINE_RES_MEM(EXYNOS4_PA_I2S0, SZ_256), |
66 | .start = EXYNOS4_PA_I2S0, | 66 | [1] = DEFINE_RES_DMA(DMACH_I2S0_TX), |
67 | .end = EXYNOS4_PA_I2S0 + 0x100 - 1, | 67 | [2] = DEFINE_RES_DMA(DMACH_I2S0_RX), |
68 | .flags = IORESOURCE_MEM, | 68 | [3] = DEFINE_RES_DMA(DMACH_I2S0S_TX), |
69 | }, | ||
70 | [1] = { | ||
71 | .start = DMACH_I2S0_TX, | ||
72 | .end = DMACH_I2S0_TX, | ||
73 | .flags = IORESOURCE_DMA, | ||
74 | }, | ||
75 | [2] = { | ||
76 | .start = DMACH_I2S0_RX, | ||
77 | .end = DMACH_I2S0_RX, | ||
78 | .flags = IORESOURCE_DMA, | ||
79 | }, | ||
80 | [3] = { | ||
81 | .start = DMACH_I2S0S_TX, | ||
82 | .end = DMACH_I2S0S_TX, | ||
83 | .flags = IORESOURCE_DMA, | ||
84 | }, | ||
85 | }; | 69 | }; |
86 | 70 | ||
87 | struct platform_device exynos4_device_i2s0 = { | 71 | struct platform_device exynos4_device_i2s0 = { |
@@ -110,21 +94,9 @@ static struct s3c_audio_pdata i2sv3_pdata = { | |||
110 | }; | 94 | }; |
111 | 95 | ||
112 | static struct resource exynos4_i2s1_resource[] = { | 96 | static struct resource exynos4_i2s1_resource[] = { |
113 | [0] = { | 97 | [0] = DEFINE_RES_MEM(EXYNOS4_PA_I2S1, SZ_256), |
114 | .start = EXYNOS4_PA_I2S1, | 98 | [1] = DEFINE_RES_DMA(DMACH_I2S1_TX), |
115 | .end = EXYNOS4_PA_I2S1 + 0x100 - 1, | 99 | [2] = DEFINE_RES_DMA(DMACH_I2S1_RX), |
116 | .flags = IORESOURCE_MEM, | ||
117 | }, | ||
118 | [1] = { | ||
119 | .start = DMACH_I2S1_TX, | ||
120 | .end = DMACH_I2S1_TX, | ||
121 | .flags = IORESOURCE_DMA, | ||
122 | }, | ||
123 | [2] = { | ||
124 | .start = DMACH_I2S1_RX, | ||
125 | .end = DMACH_I2S1_RX, | ||
126 | .flags = IORESOURCE_DMA, | ||
127 | }, | ||
128 | }; | 100 | }; |
129 | 101 | ||
130 | struct platform_device exynos4_device_i2s1 = { | 102 | struct platform_device exynos4_device_i2s1 = { |
@@ -138,21 +110,9 @@ struct platform_device exynos4_device_i2s1 = { | |||
138 | }; | 110 | }; |
139 | 111 | ||
140 | static struct resource exynos4_i2s2_resource[] = { | 112 | static struct resource exynos4_i2s2_resource[] = { |
141 | [0] = { | 113 | [0] = DEFINE_RES_MEM(EXYNOS4_PA_I2S2, SZ_256), |
142 | .start = EXYNOS4_PA_I2S2, | 114 | [1] = DEFINE_RES_DMA(DMACH_I2S2_TX), |
143 | .end = EXYNOS4_PA_I2S2 + 0x100 - 1, | 115 | [2] = DEFINE_RES_DMA(DMACH_I2S2_RX), |
144 | .flags = IORESOURCE_MEM, | ||
145 | }, | ||
146 | [1] = { | ||
147 | .start = DMACH_I2S2_TX, | ||
148 | .end = DMACH_I2S2_TX, | ||
149 | .flags = IORESOURCE_DMA, | ||
150 | }, | ||
151 | [2] = { | ||
152 | .start = DMACH_I2S2_RX, | ||
153 | .end = DMACH_I2S2_RX, | ||
154 | .flags = IORESOURCE_DMA, | ||
155 | }, | ||
156 | }; | 116 | }; |
157 | 117 | ||
158 | struct platform_device exynos4_device_i2s2 = { | 118 | struct platform_device exynos4_device_i2s2 = { |
@@ -192,21 +152,9 @@ static struct s3c_audio_pdata s3c_pcm_pdata = { | |||
192 | }; | 152 | }; |
193 | 153 | ||
194 | static struct resource exynos4_pcm0_resource[] = { | 154 | static struct resource exynos4_pcm0_resource[] = { |
195 | [0] = { | 155 | [0] = DEFINE_RES_MEM(EXYNOS4_PA_PCM0, SZ_256), |
196 | .start = EXYNOS4_PA_PCM0, | 156 | [1] = DEFINE_RES_DMA(DMACH_PCM0_TX), |
197 | .end = EXYNOS4_PA_PCM0 + 0x100 - 1, | 157 | [2] = DEFINE_RES_DMA(DMACH_PCM0_RX), |
198 | .flags = IORESOURCE_MEM, | ||
199 | }, | ||
200 | [1] = { | ||
201 | .start = DMACH_PCM0_TX, | ||
202 | .end = DMACH_PCM0_TX, | ||
203 | .flags = IORESOURCE_DMA, | ||
204 | }, | ||
205 | [2] = { | ||
206 | .start = DMACH_PCM0_RX, | ||
207 | .end = DMACH_PCM0_RX, | ||
208 | .flags = IORESOURCE_DMA, | ||
209 | }, | ||
210 | }; | 158 | }; |
211 | 159 | ||
212 | struct platform_device exynos4_device_pcm0 = { | 160 | struct platform_device exynos4_device_pcm0 = { |
@@ -220,21 +168,9 @@ struct platform_device exynos4_device_pcm0 = { | |||
220 | }; | 168 | }; |
221 | 169 | ||
222 | static struct resource exynos4_pcm1_resource[] = { | 170 | static struct resource exynos4_pcm1_resource[] = { |
223 | [0] = { | 171 | [0] = DEFINE_RES_MEM(EXYNOS4_PA_PCM1, SZ_256), |
224 | .start = EXYNOS4_PA_PCM1, | 172 | [1] = DEFINE_RES_DMA(DMACH_PCM1_TX), |
225 | .end = EXYNOS4_PA_PCM1 + 0x100 - 1, | 173 | [2] = DEFINE_RES_DMA(DMACH_PCM1_RX), |
226 | .flags = IORESOURCE_MEM, | ||
227 | }, | ||
228 | [1] = { | ||
229 | .start = DMACH_PCM1_TX, | ||
230 | .end = DMACH_PCM1_TX, | ||
231 | .flags = IORESOURCE_DMA, | ||
232 | }, | ||
233 | [2] = { | ||
234 | .start = DMACH_PCM1_RX, | ||
235 | .end = DMACH_PCM1_RX, | ||
236 | .flags = IORESOURCE_DMA, | ||
237 | }, | ||
238 | }; | 174 | }; |
239 | 175 | ||
240 | struct platform_device exynos4_device_pcm1 = { | 176 | struct platform_device exynos4_device_pcm1 = { |
@@ -248,21 +184,9 @@ struct platform_device exynos4_device_pcm1 = { | |||
248 | }; | 184 | }; |
249 | 185 | ||
250 | static struct resource exynos4_pcm2_resource[] = { | 186 | static struct resource exynos4_pcm2_resource[] = { |
251 | [0] = { | 187 | [0] = DEFINE_RES_MEM(EXYNOS4_PA_PCM2, SZ_256), |
252 | .start = EXYNOS4_PA_PCM2, | 188 | [1] = DEFINE_RES_DMA(DMACH_PCM2_TX), |
253 | .end = EXYNOS4_PA_PCM2 + 0x100 - 1, | 189 | [2] = DEFINE_RES_DMA(DMACH_PCM2_RX), |
254 | .flags = IORESOURCE_MEM, | ||
255 | }, | ||
256 | [1] = { | ||
257 | .start = DMACH_PCM2_TX, | ||
258 | .end = DMACH_PCM2_TX, | ||
259 | .flags = IORESOURCE_DMA, | ||
260 | }, | ||
261 | [2] = { | ||
262 | .start = DMACH_PCM2_RX, | ||
263 | .end = DMACH_PCM2_RX, | ||
264 | .flags = IORESOURCE_DMA, | ||
265 | }, | ||
266 | }; | 190 | }; |
267 | 191 | ||
268 | struct platform_device exynos4_device_pcm2 = { | 192 | struct platform_device exynos4_device_pcm2 = { |
@@ -283,31 +207,11 @@ static int exynos4_ac97_cfg_gpio(struct platform_device *pdev) | |||
283 | } | 207 | } |
284 | 208 | ||
285 | static struct resource exynos4_ac97_resource[] = { | 209 | static struct resource exynos4_ac97_resource[] = { |
286 | [0] = { | 210 | [0] = DEFINE_RES_MEM(EXYNOS4_PA_AC97, SZ_256), |
287 | .start = EXYNOS4_PA_AC97, | 211 | [1] = DEFINE_RES_DMA(DMACH_AC97_PCMOUT), |
288 | .end = EXYNOS4_PA_AC97 + 0x100 - 1, | 212 | [2] = DEFINE_RES_DMA(DMACH_AC97_PCMIN), |
289 | .flags = IORESOURCE_MEM, | 213 | [3] = DEFINE_RES_DMA(DMACH_AC97_MICIN), |
290 | }, | 214 | [4] = DEFINE_RES_IRQ(EXYNOS4_IRQ_AC97), |
291 | [1] = { | ||
292 | .start = DMACH_AC97_PCMOUT, | ||
293 | .end = DMACH_AC97_PCMOUT, | ||
294 | .flags = IORESOURCE_DMA, | ||
295 | }, | ||
296 | [2] = { | ||
297 | .start = DMACH_AC97_PCMIN, | ||
298 | .end = DMACH_AC97_PCMIN, | ||
299 | .flags = IORESOURCE_DMA, | ||
300 | }, | ||
301 | [3] = { | ||
302 | .start = DMACH_AC97_MICIN, | ||
303 | .end = DMACH_AC97_MICIN, | ||
304 | .flags = IORESOURCE_DMA, | ||
305 | }, | ||
306 | [4] = { | ||
307 | .start = EXYNOS4_IRQ_AC97, | ||
308 | .end = EXYNOS4_IRQ_AC97, | ||
309 | .flags = IORESOURCE_IRQ, | ||
310 | }, | ||
311 | }; | 215 | }; |
312 | 216 | ||
313 | static struct s3c_audio_pdata s3c_ac97_pdata = { | 217 | static struct s3c_audio_pdata s3c_ac97_pdata = { |
@@ -338,16 +242,8 @@ static int exynos4_spdif_cfg_gpio(struct platform_device *pdev) | |||
338 | } | 242 | } |
339 | 243 | ||
340 | static struct resource exynos4_spdif_resource[] = { | 244 | static struct resource exynos4_spdif_resource[] = { |
341 | [0] = { | 245 | [0] = DEFINE_RES_MEM(EXYNOS4_PA_SPDIF, SZ_256), |
342 | .start = EXYNOS4_PA_SPDIF, | 246 | [1] = DEFINE_RES_DMA(DMACH_SPDIF), |
343 | .end = EXYNOS4_PA_SPDIF + 0x100 - 1, | ||
344 | .flags = IORESOURCE_MEM, | ||
345 | }, | ||
346 | [1] = { | ||
347 | .start = DMACH_SPDIF, | ||
348 | .end = DMACH_SPDIF, | ||
349 | .flags = IORESOURCE_DMA, | ||
350 | }, | ||
351 | }; | 247 | }; |
352 | 248 | ||
353 | static struct s3c_audio_pdata samsung_spdif_pdata = { | 249 | static struct s3c_audio_pdata samsung_spdif_pdata = { |
diff --git a/arch/arm/mach-exynos/mach-armlex4210.c b/arch/arm/mach-exynos/mach-armlex4210.c index d726fcd3acf..fed7116418e 100644 --- a/arch/arm/mach-exynos/mach-armlex4210.c +++ b/arch/arm/mach-exynos/mach-armlex4210.c | |||
@@ -77,7 +77,6 @@ static struct s3c2410_uartcfg armlex4210_uartcfgs[] __initdata = { | |||
77 | 77 | ||
78 | static struct s3c_sdhci_platdata armlex4210_hsmmc0_pdata __initdata = { | 78 | static struct s3c_sdhci_platdata armlex4210_hsmmc0_pdata __initdata = { |
79 | .cd_type = S3C_SDHCI_CD_PERMANENT, | 79 | .cd_type = S3C_SDHCI_CD_PERMANENT, |
80 | .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, | ||
81 | #ifdef CONFIG_EXYNOS4_SDHCI_CH0_8BIT | 80 | #ifdef CONFIG_EXYNOS4_SDHCI_CH0_8BIT |
82 | .max_width = 8, | 81 | .max_width = 8, |
83 | .host_caps = MMC_CAP_8_BIT_DATA, | 82 | .host_caps = MMC_CAP_8_BIT_DATA, |
@@ -88,13 +87,11 @@ static struct s3c_sdhci_platdata armlex4210_hsmmc2_pdata __initdata = { | |||
88 | .cd_type = S3C_SDHCI_CD_GPIO, | 87 | .cd_type = S3C_SDHCI_CD_GPIO, |
89 | .ext_cd_gpio = EXYNOS4_GPX2(5), | 88 | .ext_cd_gpio = EXYNOS4_GPX2(5), |
90 | .ext_cd_gpio_invert = 1, | 89 | .ext_cd_gpio_invert = 1, |
91 | .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, | ||
92 | .max_width = 4, | 90 | .max_width = 4, |
93 | }; | 91 | }; |
94 | 92 | ||
95 | static struct s3c_sdhci_platdata armlex4210_hsmmc3_pdata __initdata = { | 93 | static struct s3c_sdhci_platdata armlex4210_hsmmc3_pdata __initdata = { |
96 | .cd_type = S3C_SDHCI_CD_PERMANENT, | 94 | .cd_type = S3C_SDHCI_CD_PERMANENT, |
97 | .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, | ||
98 | .max_width = 4, | 95 | .max_width = 4, |
99 | }; | 96 | }; |
100 | 97 | ||
@@ -121,16 +118,9 @@ static void __init armlex4210_wlan_init(void) | |||
121 | } | 118 | } |
122 | 119 | ||
123 | static struct resource armlex4210_smsc911x_resources[] = { | 120 | static struct resource armlex4210_smsc911x_resources[] = { |
124 | [0] = { | 121 | [0] = DEFINE_RES_MEM(EXYNOS4_PA_SROM_BANK(3), SZ_64K), |
125 | .start = EXYNOS4_PA_SROM_BANK(3), | 122 | [1] = DEFINE_RES_NAMED(IRQ_EINT(27), 1, NULL, IORESOURCE_IRQ \ |
126 | .end = EXYNOS4_PA_SROM_BANK(3) + SZ_64K - 1, | 123 | | IRQF_TRIGGER_HIGH), |
127 | .flags = IORESOURCE_MEM, | ||
128 | }, | ||
129 | [1] = { | ||
130 | .start = IRQ_EINT(27), | ||
131 | .end = IRQ_EINT(27), | ||
132 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_HIGH, | ||
133 | }, | ||
134 | }; | 124 | }; |
135 | 125 | ||
136 | static struct smsc911x_platform_config smsc9215_config = { | 126 | static struct smsc911x_platform_config smsc9215_config = { |
diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c index ed90aef404c..021dc68e89b 100644 --- a/arch/arm/mach-exynos/mach-nuri.c +++ b/arch/arm/mach-exynos/mach-nuri.c | |||
@@ -114,7 +114,6 @@ static struct s3c_sdhci_platdata nuri_hsmmc0_data __initdata = { | |||
114 | MMC_CAP_ERASE), | 114 | MMC_CAP_ERASE), |
115 | .host_caps2 = MMC_CAP2_BROKEN_VOLTAGE, | 115 | .host_caps2 = MMC_CAP2_BROKEN_VOLTAGE, |
116 | .cd_type = S3C_SDHCI_CD_PERMANENT, | 116 | .cd_type = S3C_SDHCI_CD_PERMANENT, |
117 | .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, | ||
118 | }; | 117 | }; |
119 | 118 | ||
120 | static struct regulator_consumer_supply emmc_supplies[] = { | 119 | static struct regulator_consumer_supply emmc_supplies[] = { |
@@ -155,7 +154,6 @@ static struct s3c_sdhci_platdata nuri_hsmmc2_data __initdata = { | |||
155 | .ext_cd_gpio = EXYNOS4_GPX3(3), /* XEINT_27 */ | 154 | .ext_cd_gpio = EXYNOS4_GPX3(3), /* XEINT_27 */ |
156 | .ext_cd_gpio_invert = 1, | 155 | .ext_cd_gpio_invert = 1, |
157 | .cd_type = S3C_SDHCI_CD_GPIO, | 156 | .cd_type = S3C_SDHCI_CD_GPIO, |
158 | .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, | ||
159 | }; | 157 | }; |
160 | 158 | ||
161 | /* WLAN */ | 159 | /* WLAN */ |
@@ -164,7 +162,6 @@ static struct s3c_sdhci_platdata nuri_hsmmc3_data __initdata = { | |||
164 | .host_caps = MMC_CAP_4_BIT_DATA | | 162 | .host_caps = MMC_CAP_4_BIT_DATA | |
165 | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED, | 163 | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED, |
166 | .cd_type = S3C_SDHCI_CD_EXTERNAL, | 164 | .cd_type = S3C_SDHCI_CD_EXTERNAL, |
167 | .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, | ||
168 | }; | 165 | }; |
169 | 166 | ||
170 | static void __init nuri_sdhci_init(void) | 167 | static void __init nuri_sdhci_init(void) |
diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c index 878d4c99142..827cb990c31 100644 --- a/arch/arm/mach-exynos/mach-origen.c +++ b/arch/arm/mach-exynos/mach-origen.c | |||
@@ -472,12 +472,10 @@ static struct i2c_board_info i2c0_devs[] __initdata = { | |||
472 | 472 | ||
473 | static struct s3c_sdhci_platdata origen_hsmmc0_pdata __initdata = { | 473 | static struct s3c_sdhci_platdata origen_hsmmc0_pdata __initdata = { |
474 | .cd_type = S3C_SDHCI_CD_INTERNAL, | 474 | .cd_type = S3C_SDHCI_CD_INTERNAL, |
475 | .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, | ||
476 | }; | 475 | }; |
477 | 476 | ||
478 | static struct s3c_sdhci_platdata origen_hsmmc2_pdata __initdata = { | 477 | static struct s3c_sdhci_platdata origen_hsmmc2_pdata __initdata = { |
479 | .cd_type = S3C_SDHCI_CD_INTERNAL, | 478 | .cd_type = S3C_SDHCI_CD_INTERNAL, |
480 | .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, | ||
481 | }; | 479 | }; |
482 | 480 | ||
483 | /* USB EHCI */ | 481 | /* USB EHCI */ |
diff --git a/arch/arm/mach-exynos/mach-smdk4x12.c b/arch/arm/mach-exynos/mach-smdk4x12.c index d00e4f016a6..4be083acf99 100644 --- a/arch/arm/mach-exynos/mach-smdk4x12.c +++ b/arch/arm/mach-exynos/mach-smdk4x12.c | |||
@@ -85,7 +85,6 @@ static struct s3c2410_uartcfg smdk4x12_uartcfgs[] __initdata = { | |||
85 | 85 | ||
86 | static struct s3c_sdhci_platdata smdk4x12_hsmmc2_pdata __initdata = { | 86 | static struct s3c_sdhci_platdata smdk4x12_hsmmc2_pdata __initdata = { |
87 | .cd_type = S3C_SDHCI_CD_INTERNAL, | 87 | .cd_type = S3C_SDHCI_CD_INTERNAL, |
88 | .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, | ||
89 | #ifdef CONFIG_EXYNOS4_SDHCI_CH2_8BIT | 88 | #ifdef CONFIG_EXYNOS4_SDHCI_CH2_8BIT |
90 | .max_width = 8, | 89 | .max_width = 8, |
91 | .host_caps = MMC_CAP_8_BIT_DATA, | 90 | .host_caps = MMC_CAP_8_BIT_DATA, |
@@ -94,7 +93,6 @@ static struct s3c_sdhci_platdata smdk4x12_hsmmc2_pdata __initdata = { | |||
94 | 93 | ||
95 | static struct s3c_sdhci_platdata smdk4x12_hsmmc3_pdata __initdata = { | 94 | static struct s3c_sdhci_platdata smdk4x12_hsmmc3_pdata __initdata = { |
96 | .cd_type = S3C_SDHCI_CD_INTERNAL, | 95 | .cd_type = S3C_SDHCI_CD_INTERNAL, |
97 | .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, | ||
98 | }; | 96 | }; |
99 | 97 | ||
100 | static struct regulator_consumer_supply max8997_buck1 = | 98 | static struct regulator_consumer_supply max8997_buck1 = |
diff --git a/arch/arm/mach-exynos/mach-smdkv310.c b/arch/arm/mach-exynos/mach-smdkv310.c index 83b91fa777c..ea39f614f2d 100644 --- a/arch/arm/mach-exynos/mach-smdkv310.c +++ b/arch/arm/mach-exynos/mach-smdkv310.c | |||
@@ -93,7 +93,6 @@ static struct s3c2410_uartcfg smdkv310_uartcfgs[] __initdata = { | |||
93 | 93 | ||
94 | static struct s3c_sdhci_platdata smdkv310_hsmmc0_pdata __initdata = { | 94 | static struct s3c_sdhci_platdata smdkv310_hsmmc0_pdata __initdata = { |
95 | .cd_type = S3C_SDHCI_CD_INTERNAL, | 95 | .cd_type = S3C_SDHCI_CD_INTERNAL, |
96 | .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, | ||
97 | #ifdef CONFIG_EXYNOS4_SDHCI_CH0_8BIT | 96 | #ifdef CONFIG_EXYNOS4_SDHCI_CH0_8BIT |
98 | .max_width = 8, | 97 | .max_width = 8, |
99 | .host_caps = MMC_CAP_8_BIT_DATA, | 98 | .host_caps = MMC_CAP_8_BIT_DATA, |
@@ -104,12 +103,10 @@ static struct s3c_sdhci_platdata smdkv310_hsmmc1_pdata __initdata = { | |||
104 | .cd_type = S3C_SDHCI_CD_GPIO, | 103 | .cd_type = S3C_SDHCI_CD_GPIO, |
105 | .ext_cd_gpio = EXYNOS4_GPK0(2), | 104 | .ext_cd_gpio = EXYNOS4_GPK0(2), |
106 | .ext_cd_gpio_invert = 1, | 105 | .ext_cd_gpio_invert = 1, |
107 | .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, | ||
108 | }; | 106 | }; |
109 | 107 | ||
110 | static struct s3c_sdhci_platdata smdkv310_hsmmc2_pdata __initdata = { | 108 | static struct s3c_sdhci_platdata smdkv310_hsmmc2_pdata __initdata = { |
111 | .cd_type = S3C_SDHCI_CD_INTERNAL, | 109 | .cd_type = S3C_SDHCI_CD_INTERNAL, |
112 | .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, | ||
113 | #ifdef CONFIG_EXYNOS4_SDHCI_CH2_8BIT | 110 | #ifdef CONFIG_EXYNOS4_SDHCI_CH2_8BIT |
114 | .max_width = 8, | 111 | .max_width = 8, |
115 | .host_caps = MMC_CAP_8_BIT_DATA, | 112 | .host_caps = MMC_CAP_8_BIT_DATA, |
@@ -120,7 +117,6 @@ static struct s3c_sdhci_platdata smdkv310_hsmmc3_pdata __initdata = { | |||
120 | .cd_type = S3C_SDHCI_CD_GPIO, | 117 | .cd_type = S3C_SDHCI_CD_GPIO, |
121 | .ext_cd_gpio = EXYNOS4_GPK2(2), | 118 | .ext_cd_gpio = EXYNOS4_GPK2(2), |
122 | .ext_cd_gpio_invert = 1, | 119 | .ext_cd_gpio_invert = 1, |
123 | .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, | ||
124 | }; | 120 | }; |
125 | 121 | ||
126 | static void lcd_lte480wv_set_power(struct plat_lcd_data *pd, | 122 | static void lcd_lte480wv_set_power(struct plat_lcd_data *pd, |
@@ -183,16 +179,9 @@ static struct s3c_fb_platdata smdkv310_lcd0_pdata __initdata = { | |||
183 | }; | 179 | }; |
184 | 180 | ||
185 | static struct resource smdkv310_smsc911x_resources[] = { | 181 | static struct resource smdkv310_smsc911x_resources[] = { |
186 | [0] = { | 182 | [0] = DEFINE_RES_MEM(EXYNOS4_PA_SROM_BANK(1), SZ_64K), |
187 | .start = EXYNOS4_PA_SROM_BANK(1), | 183 | [1] = DEFINE_RES_NAMED(IRQ_EINT(5), 1, NULL, IORESOURCE_IRQ \ |
188 | .end = EXYNOS4_PA_SROM_BANK(1) + SZ_64K - 1, | 184 | | IRQF_TRIGGER_LOW), |
189 | .flags = IORESOURCE_MEM, | ||
190 | }, | ||
191 | [1] = { | ||
192 | .start = IRQ_EINT(5), | ||
193 | .end = IRQ_EINT(5), | ||
194 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW, | ||
195 | }, | ||
196 | }; | 185 | }; |
197 | 186 | ||
198 | static struct smsc911x_platform_config smsc9215_config = { | 187 | static struct smsc911x_platform_config smsc9215_config = { |
diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c index cb2b027f09a..57d524e03d6 100644 --- a/arch/arm/mach-exynos/mach-universal_c210.c +++ b/arch/arm/mach-exynos/mach-universal_c210.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <plat/pd.h> | 40 | #include <plat/pd.h> |
41 | #include <plat/regs-fb-v4.h> | 41 | #include <plat/regs-fb-v4.h> |
42 | #include <plat/fimc-core.h> | 42 | #include <plat/fimc-core.h> |
43 | #include <plat/s5p-time.h> | ||
43 | #include <plat/camport.h> | 44 | #include <plat/camport.h> |
44 | #include <plat/mipi_csis.h> | 45 | #include <plat/mipi_csis.h> |
45 | 46 | ||
@@ -749,7 +750,6 @@ static struct s3c_sdhci_platdata universal_hsmmc0_data __initdata = { | |||
749 | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED), | 750 | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED), |
750 | .host_caps2 = MMC_CAP2_BROKEN_VOLTAGE, | 751 | .host_caps2 = MMC_CAP2_BROKEN_VOLTAGE, |
751 | .cd_type = S3C_SDHCI_CD_PERMANENT, | 752 | .cd_type = S3C_SDHCI_CD_PERMANENT, |
752 | .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, | ||
753 | }; | 753 | }; |
754 | 754 | ||
755 | static struct regulator_consumer_supply mmc0_supplies[] = { | 755 | static struct regulator_consumer_supply mmc0_supplies[] = { |
@@ -789,7 +789,6 @@ static struct s3c_sdhci_platdata universal_hsmmc2_data __initdata = { | |||
789 | .ext_cd_gpio = EXYNOS4_GPX3(4), /* XEINT_28 */ | 789 | .ext_cd_gpio = EXYNOS4_GPX3(4), /* XEINT_28 */ |
790 | .ext_cd_gpio_invert = 1, | 790 | .ext_cd_gpio_invert = 1, |
791 | .cd_type = S3C_SDHCI_CD_GPIO, | 791 | .cd_type = S3C_SDHCI_CD_GPIO, |
792 | .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, | ||
793 | }; | 792 | }; |
794 | 793 | ||
795 | /* WiFi */ | 794 | /* WiFi */ |
@@ -1063,6 +1062,7 @@ static void __init universal_map_io(void) | |||
1063 | exynos_init_io(NULL, 0); | 1062 | exynos_init_io(NULL, 0); |
1064 | s3c24xx_init_clocks(24000000); | 1063 | s3c24xx_init_clocks(24000000); |
1065 | s3c24xx_init_uarts(universal_uartcfgs, ARRAY_SIZE(universal_uartcfgs)); | 1064 | s3c24xx_init_uarts(universal_uartcfgs, ARRAY_SIZE(universal_uartcfgs)); |
1065 | s5p_set_timer_source(S5P_PWM2, S5P_PWM4); | ||
1066 | } | 1066 | } |
1067 | 1067 | ||
1068 | static void s5p_tv_setup(void) | 1068 | static void s5p_tv_setup(void) |
@@ -1113,7 +1113,7 @@ MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210") | |||
1113 | .map_io = universal_map_io, | 1113 | .map_io = universal_map_io, |
1114 | .handle_irq = gic_handle_irq, | 1114 | .handle_irq = gic_handle_irq, |
1115 | .init_machine = universal_machine_init, | 1115 | .init_machine = universal_machine_init, |
1116 | .timer = &exynos4_timer, | 1116 | .timer = &s5p_timer, |
1117 | .reserve = &universal_reserve, | 1117 | .reserve = &universal_reserve, |
1118 | .restart = exynos4_restart, | 1118 | .restart = exynos4_restart, |
1119 | MACHINE_END | 1119 | MACHINE_END |
diff --git a/arch/arm/mach-footbridge/cats-pci.c b/arch/arm/mach-footbridge/cats-pci.c index 32321f66dec..5cec2567c9c 100644 --- a/arch/arm/mach-footbridge/cats-pci.c +++ b/arch/arm/mach-footbridge/cats-pci.c | |||
@@ -16,6 +16,11 @@ | |||
16 | /* cats host-specific stuff */ | 16 | /* cats host-specific stuff */ |
17 | static int irqmap_cats[] __initdata = { IRQ_PCI, IRQ_IN0, IRQ_IN1, IRQ_IN3 }; | 17 | static int irqmap_cats[] __initdata = { IRQ_PCI, IRQ_IN0, IRQ_IN1, IRQ_IN3 }; |
18 | 18 | ||
19 | static u8 cats_no_swizzle(struct pci_dev *dev, u8 *pin) | ||
20 | { | ||
21 | return 0; | ||
22 | } | ||
23 | |||
19 | static int __init cats_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | 24 | static int __init cats_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
20 | { | 25 | { |
21 | if (dev->irq >= 255) | 26 | if (dev->irq >= 255) |
@@ -39,11 +44,11 @@ static int __init cats_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
39 | * cards being used (ie, pci-pci bridge based cards)? | 44 | * cards being used (ie, pci-pci bridge based cards)? |
40 | */ | 45 | */ |
41 | static struct hw_pci cats_pci __initdata = { | 46 | static struct hw_pci cats_pci __initdata = { |
42 | .swizzle = NULL, | 47 | .swizzle = cats_no_swizzle, |
43 | .map_irq = cats_map_irq, | 48 | .map_irq = cats_map_irq, |
44 | .nr_controllers = 1, | 49 | .nr_controllers = 1, |
50 | .ops = &dc21285_ops, | ||
45 | .setup = dc21285_setup, | 51 | .setup = dc21285_setup, |
46 | .scan = dc21285_scan_bus, | ||
47 | .preinit = dc21285_preinit, | 52 | .preinit = dc21285_preinit, |
48 | .postinit = dc21285_postinit, | 53 | .postinit = dc21285_postinit, |
49 | }; | 54 | }; |
diff --git a/arch/arm/mach-footbridge/dc21285.c b/arch/arm/mach-footbridge/dc21285.c index e17e11de4f5..9d62e338102 100644 --- a/arch/arm/mach-footbridge/dc21285.c +++ b/arch/arm/mach-footbridge/dc21285.c | |||
@@ -129,7 +129,7 @@ dc21285_write_config(struct pci_bus *bus, unsigned int devfn, int where, | |||
129 | return PCIBIOS_SUCCESSFUL; | 129 | return PCIBIOS_SUCCESSFUL; |
130 | } | 130 | } |
131 | 131 | ||
132 | static struct pci_ops dc21285_ops = { | 132 | struct pci_ops dc21285_ops = { |
133 | .read = dc21285_read_config, | 133 | .read = dc21285_read_config, |
134 | .write = dc21285_write_config, | 134 | .write = dc21285_write_config, |
135 | }; | 135 | }; |
@@ -284,11 +284,6 @@ int __init dc21285_setup(int nr, struct pci_sys_data *sys) | |||
284 | return 1; | 284 | return 1; |
285 | } | 285 | } |
286 | 286 | ||
287 | struct pci_bus * __init dc21285_scan_bus(int nr, struct pci_sys_data *sys) | ||
288 | { | ||
289 | return pci_scan_root_bus(NULL, 0, &dc21285_ops, sys, &sys->resources); | ||
290 | } | ||
291 | |||
292 | #define dc21285_request_irq(_a, _b, _c, _d, _e) \ | 287 | #define dc21285_request_irq(_a, _b, _c, _d, _e) \ |
293 | WARN_ON(request_irq(_a, _b, _c, _d, _e) < 0) | 288 | WARN_ON(request_irq(_a, _b, _c, _d, _e) < 0) |
294 | 289 | ||
diff --git a/arch/arm/mach-footbridge/ebsa285-pci.c b/arch/arm/mach-footbridge/ebsa285-pci.c index 511c673ffa9..fd12d8a36dc 100644 --- a/arch/arm/mach-footbridge/ebsa285-pci.c +++ b/arch/arm/mach-footbridge/ebsa285-pci.c | |||
@@ -29,11 +29,10 @@ static int __init ebsa285_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
29 | } | 29 | } |
30 | 30 | ||
31 | static struct hw_pci ebsa285_pci __initdata = { | 31 | static struct hw_pci ebsa285_pci __initdata = { |
32 | .swizzle = pci_std_swizzle, | ||
33 | .map_irq = ebsa285_map_irq, | 32 | .map_irq = ebsa285_map_irq, |
34 | .nr_controllers = 1, | 33 | .nr_controllers = 1, |
34 | .ops = &dc21285_ops, | ||
35 | .setup = dc21285_setup, | 35 | .setup = dc21285_setup, |
36 | .scan = dc21285_scan_bus, | ||
37 | .preinit = dc21285_preinit, | 36 | .preinit = dc21285_preinit, |
38 | .postinit = dc21285_postinit, | 37 | .postinit = dc21285_postinit, |
39 | }; | 38 | }; |
diff --git a/arch/arm/mach-footbridge/netwinder-pci.c b/arch/arm/mach-footbridge/netwinder-pci.c index 62187610e17..0fba5134e4f 100644 --- a/arch/arm/mach-footbridge/netwinder-pci.c +++ b/arch/arm/mach-footbridge/netwinder-pci.c | |||
@@ -43,11 +43,10 @@ static int __init netwinder_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
43 | } | 43 | } |
44 | 44 | ||
45 | static struct hw_pci netwinder_pci __initdata = { | 45 | static struct hw_pci netwinder_pci __initdata = { |
46 | .swizzle = pci_std_swizzle, | ||
47 | .map_irq = netwinder_map_irq, | 46 | .map_irq = netwinder_map_irq, |
48 | .nr_controllers = 1, | 47 | .nr_controllers = 1, |
48 | .ops = &dc21285_ops, | ||
49 | .setup = dc21285_setup, | 49 | .setup = dc21285_setup, |
50 | .scan = dc21285_scan_bus, | ||
51 | .preinit = dc21285_preinit, | 50 | .preinit = dc21285_preinit, |
52 | .postinit = dc21285_postinit, | 51 | .postinit = dc21285_postinit, |
53 | }; | 52 | }; |
diff --git a/arch/arm/mach-footbridge/personal-pci.c b/arch/arm/mach-footbridge/personal-pci.c index aeb651d914a..5c9ee54613b 100644 --- a/arch/arm/mach-footbridge/personal-pci.c +++ b/arch/arm/mach-footbridge/personal-pci.c | |||
@@ -41,8 +41,8 @@ static int __init personal_server_map_irq(const struct pci_dev *dev, u8 slot, | |||
41 | static struct hw_pci personal_server_pci __initdata = { | 41 | static struct hw_pci personal_server_pci __initdata = { |
42 | .map_irq = personal_server_map_irq, | 42 | .map_irq = personal_server_map_irq, |
43 | .nr_controllers = 1, | 43 | .nr_controllers = 1, |
44 | .ops = &dc21285_ops, | ||
44 | .setup = dc21285_setup, | 45 | .setup = dc21285_setup, |
45 | .scan = dc21285_scan_bus, | ||
46 | .preinit = dc21285_preinit, | 46 | .preinit = dc21285_preinit, |
47 | .postinit = dc21285_postinit, | 47 | .postinit = dc21285_postinit, |
48 | }; | 48 | }; |
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 7561eca131b..f72d399ff3d 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
@@ -571,8 +571,10 @@ config MACH_MX35_3DS | |||
571 | select MXC_DEBUG_BOARD | 571 | select MXC_DEBUG_BOARD |
572 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC | 572 | select IMX_HAVE_PLATFORM_FSL_USB2_UDC |
573 | select IMX_HAVE_PLATFORM_IMX2_WDT | 573 | select IMX_HAVE_PLATFORM_IMX2_WDT |
574 | select IMX_HAVE_PLATFORM_IMX_FB | ||
574 | select IMX_HAVE_PLATFORM_IMX_I2C | 575 | select IMX_HAVE_PLATFORM_IMX_I2C |
575 | select IMX_HAVE_PLATFORM_IMX_UART | 576 | select IMX_HAVE_PLATFORM_IMX_UART |
577 | select IMX_HAVE_PLATFORM_IPU_CORE | ||
576 | select IMX_HAVE_PLATFORM_MXC_EHCI | 578 | select IMX_HAVE_PLATFORM_MXC_EHCI |
577 | select IMX_HAVE_PLATFORM_MXC_NAND | 579 | select IMX_HAVE_PLATFORM_MXC_NAND |
578 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | 580 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX |
diff --git a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c index 5f2f91d1798..b46cab0ced5 100644 --- a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c +++ b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c | |||
@@ -243,7 +243,7 @@ static const struct imxuart_platform_data uart_pdata __initconst = { | |||
243 | static void __maybe_unused ads7846_dev_init(void) | 243 | static void __maybe_unused ads7846_dev_init(void) |
244 | { | 244 | { |
245 | if (gpio_request(ADS7846_PENDOWN, "ADS7846 pendown") < 0) { | 245 | if (gpio_request(ADS7846_PENDOWN, "ADS7846 pendown") < 0) { |
246 | printk(KERN_ERR "can't get ads746 pen down GPIO\n"); | 246 | printk(KERN_ERR "can't get ads7846 pen down GPIO\n"); |
247 | return; | 247 | return; |
248 | } | 248 | } |
249 | gpio_direction_input(ADS7846_PENDOWN); | 249 | gpio_direction_input(ADS7846_PENDOWN); |
diff --git a/arch/arm/mach-imx/mach-cpuimx35.c b/arch/arm/mach-imx/mach-cpuimx35.c index 8ecc872b254..c515f8ede1a 100644 --- a/arch/arm/mach-imx/mach-cpuimx35.c +++ b/arch/arm/mach-imx/mach-cpuimx35.c | |||
@@ -194,7 +194,7 @@ static void __init eukrea_cpuimx35_timer_init(void) | |||
194 | mx35_clocks_init(); | 194 | mx35_clocks_init(); |
195 | } | 195 | } |
196 | 196 | ||
197 | struct sys_timer eukrea_cpuimx35_timer = { | 197 | static struct sys_timer eukrea_cpuimx35_timer = { |
198 | .init = eukrea_cpuimx35_timer_init, | 198 | .init = eukrea_cpuimx35_timer_init, |
199 | }; | 199 | }; |
200 | 200 | ||
diff --git a/arch/arm/mach-imx/mach-mx1ads.c b/arch/arm/mach-imx/mach-mx1ads.c index 97046088ff1..7274e792813 100644 --- a/arch/arm/mach-imx/mach-mx1ads.c +++ b/arch/arm/mach-imx/mach-mx1ads.c | |||
@@ -134,7 +134,7 @@ static void __init mx1ads_timer_init(void) | |||
134 | mx1_clocks_init(32000); | 134 | mx1_clocks_init(32000); |
135 | } | 135 | } |
136 | 136 | ||
137 | struct sys_timer mx1ads_timer = { | 137 | static struct sys_timer mx1ads_timer = { |
138 | .init = mx1ads_timer_init, | 138 | .init = mx1ads_timer_init, |
139 | }; | 139 | }; |
140 | 140 | ||
diff --git a/arch/arm/mach-imx/mach-mx21ads.c b/arch/arm/mach-imx/mach-mx21ads.c index e432d4acee1..d14bbe949a4 100644 --- a/arch/arm/mach-imx/mach-mx21ads.c +++ b/arch/arm/mach-imx/mach-mx21ads.c | |||
@@ -304,8 +304,7 @@ static void __init mx21ads_board_init(void) | |||
304 | imx21_add_mxc_nand(&mx21ads_nand_board_info); | 304 | imx21_add_mxc_nand(&mx21ads_nand_board_info); |
305 | 305 | ||
306 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 306 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
307 | platform_device_register_full( | 307 | platform_device_register_full(&mx21ads_cs8900_devinfo); |
308 | (struct platform_device_info *)&mx21ads_cs8900_devinfo); | ||
309 | } | 308 | } |
310 | 309 | ||
311 | static void __init mx21ads_timer_init(void) | 310 | static void __init mx21ads_timer_init(void) |
diff --git a/arch/arm/mach-imx/mach-mx31lite.c b/arch/arm/mach-imx/mach-mx31lite.c index 0abef5f13df..686c6058798 100644 --- a/arch/arm/mach-imx/mach-mx31lite.c +++ b/arch/arm/mach-imx/mach-mx31lite.c | |||
@@ -283,7 +283,7 @@ static void __init mx31lite_timer_init(void) | |||
283 | mx31_clocks_init(26000000); | 283 | mx31_clocks_init(26000000); |
284 | } | 284 | } |
285 | 285 | ||
286 | struct sys_timer mx31lite_timer = { | 286 | static struct sys_timer mx31lite_timer = { |
287 | .init = mx31lite_timer_init, | 287 | .init = mx31lite_timer_init, |
288 | }; | 288 | }; |
289 | 289 | ||
diff --git a/arch/arm/mach-imx/mach-mx31moboard.c b/arch/arm/mach-imx/mach-mx31moboard.c index f17a15f2831..1dfe3c7a7be 100644 --- a/arch/arm/mach-imx/mach-mx31moboard.c +++ b/arch/arm/mach-imx/mach-mx31moboard.c | |||
@@ -580,7 +580,7 @@ static void __init mx31moboard_timer_init(void) | |||
580 | mx31_clocks_init(26000000); | 580 | mx31_clocks_init(26000000); |
581 | } | 581 | } |
582 | 582 | ||
583 | struct sys_timer mx31moboard_timer = { | 583 | static struct sys_timer mx31moboard_timer = { |
584 | .init = mx31moboard_timer_init, | 584 | .init = mx31moboard_timer_init, |
585 | }; | 585 | }; |
586 | 586 | ||
diff --git a/arch/arm/mach-imx/mach-mx35_3ds.c b/arch/arm/mach-imx/mach-mx35_3ds.c index 6ae51c6b95b..c433187988a 100644 --- a/arch/arm/mach-imx/mach-mx35_3ds.c +++ b/arch/arm/mach-imx/mach-mx35_3ds.c | |||
@@ -419,7 +419,7 @@ static void __init mx35pdk_timer_init(void) | |||
419 | mx35_clocks_init(); | 419 | mx35_clocks_init(); |
420 | } | 420 | } |
421 | 421 | ||
422 | struct sys_timer mx35pdk_timer = { | 422 | static struct sys_timer mx35pdk_timer = { |
423 | .init = mx35pdk_timer_init, | 423 | .init = mx35pdk_timer_init, |
424 | }; | 424 | }; |
425 | 425 | ||
diff --git a/arch/arm/mach-imx/mach-mx51_efikamx.c b/arch/arm/mach-imx/mach-mx51_efikamx.c index 586e9f82212..86e96ef11f9 100644 --- a/arch/arm/mach-imx/mach-mx51_efikamx.c +++ b/arch/arm/mach-imx/mach-mx51_efikamx.c | |||
@@ -284,8 +284,7 @@ static struct sys_timer mx51_efikamx_timer = { | |||
284 | .init = mx51_efikamx_timer_init, | 284 | .init = mx51_efikamx_timer_init, |
285 | }; | 285 | }; |
286 | 286 | ||
287 | MACHINE_START(MX51_EFIKAMX, "Genesi EfikaMX nettop") | 287 | MACHINE_START(MX51_EFIKAMX, "Genesi Efika MX (Smarttop)") |
288 | /* Maintainer: Amit Kucheria <amit.kucheria@linaro.org> */ | ||
289 | .atag_offset = 0x100, | 288 | .atag_offset = 0x100, |
290 | .map_io = mx51_map_io, | 289 | .map_io = mx51_map_io, |
291 | .init_early = imx51_init_early, | 290 | .init_early = imx51_init_early, |
diff --git a/arch/arm/mach-imx/mach-mx51_efikasb.c b/arch/arm/mach-imx/mach-mx51_efikasb.c index 24aded9e109..88f837a6cc7 100644 --- a/arch/arm/mach-imx/mach-mx51_efikasb.c +++ b/arch/arm/mach-imx/mach-mx51_efikasb.c | |||
@@ -280,7 +280,7 @@ static struct sys_timer mx51_efikasb_timer = { | |||
280 | .init = mx51_efikasb_timer_init, | 280 | .init = mx51_efikasb_timer_init, |
281 | }; | 281 | }; |
282 | 282 | ||
283 | MACHINE_START(MX51_EFIKASB, "Genesi Efika Smartbook") | 283 | MACHINE_START(MX51_EFIKASB, "Genesi Efika MX (Smartbook)") |
284 | .atag_offset = 0x100, | 284 | .atag_offset = 0x100, |
285 | .map_io = mx51_map_io, | 285 | .map_io = mx51_map_io, |
286 | .init_early = imx51_init_early, | 286 | .init_early = imx51_init_early, |
diff --git a/arch/arm/mach-imx/mach-pcm037.c b/arch/arm/mach-imx/mach-pcm037.c index 5fddf94cc96..10c9795934a 100644 --- a/arch/arm/mach-imx/mach-pcm037.c +++ b/arch/arm/mach-imx/mach-pcm037.c | |||
@@ -683,7 +683,7 @@ static void __init pcm037_timer_init(void) | |||
683 | mx31_clocks_init(26000000); | 683 | mx31_clocks_init(26000000); |
684 | } | 684 | } |
685 | 685 | ||
686 | struct sys_timer pcm037_timer = { | 686 | static struct sys_timer pcm037_timer = { |
687 | .init = pcm037_timer_init, | 687 | .init = pcm037_timer_init, |
688 | }; | 688 | }; |
689 | 689 | ||
diff --git a/arch/arm/mach-imx/mach-pcm043.c b/arch/arm/mach-imx/mach-pcm043.c index 237474fcca2..73585f55cca 100644 --- a/arch/arm/mach-imx/mach-pcm043.c +++ b/arch/arm/mach-imx/mach-pcm043.c | |||
@@ -399,7 +399,7 @@ static void __init pcm043_timer_init(void) | |||
399 | mx35_clocks_init(); | 399 | mx35_clocks_init(); |
400 | } | 400 | } |
401 | 401 | ||
402 | struct sys_timer pcm043_timer = { | 402 | static struct sys_timer pcm043_timer = { |
403 | .init = pcm043_timer_init, | 403 | .init = pcm043_timer_init, |
404 | }; | 404 | }; |
405 | 405 | ||
diff --git a/arch/arm/mach-imx/mach-vpr200.c b/arch/arm/mach-imx/mach-vpr200.c index 033257e553e..add8c69c6c1 100644 --- a/arch/arm/mach-imx/mach-vpr200.c +++ b/arch/arm/mach-imx/mach-vpr200.c | |||
@@ -310,7 +310,7 @@ static void __init vpr200_timer_init(void) | |||
310 | mx35_clocks_init(); | 310 | mx35_clocks_init(); |
311 | } | 311 | } |
312 | 312 | ||
313 | struct sys_timer vpr200_timer = { | 313 | static struct sys_timer vpr200_timer = { |
314 | .init = vpr200_timer_init, | 314 | .init = vpr200_timer_init, |
315 | }; | 315 | }; |
316 | 316 | ||
diff --git a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c index 3e538da6cb1..e428f3ab15c 100644 --- a/arch/arm/mach-integrator/impd1.c +++ b/arch/arm/mach-integrator/impd1.c | |||
@@ -398,24 +398,16 @@ static int impd1_probe(struct lm_device *dev) | |||
398 | struct impd1_device *idev = impd1_devs + i; | 398 | struct impd1_device *idev = impd1_devs + i; |
399 | struct amba_device *d; | 399 | struct amba_device *d; |
400 | unsigned long pc_base; | 400 | unsigned long pc_base; |
401 | char devname[32]; | ||
401 | 402 | ||
402 | pc_base = dev->resource.start + idev->offset; | 403 | pc_base = dev->resource.start + idev->offset; |
403 | 404 | snprintf(devname, 32, "lm%x:%5.5lx", dev->id, idev->offset >> 12); | |
404 | d = amba_device_alloc(NULL, pc_base, SZ_4K); | 405 | d = amba_ahb_device_add(&dev->dev, devname, pc_base, SZ_4K, |
405 | if (!d) | 406 | dev->irq, dev->irq, |
407 | idev->platform_data, idev->id); | ||
408 | if (IS_ERR(d)) { | ||
409 | dev_err(&dev->dev, "unable to register device: %ld\n", PTR_ERR(d)); | ||
406 | continue; | 410 | continue; |
407 | |||
408 | dev_set_name(&d->dev, "lm%x:%5.5lx", dev->id, idev->offset >> 12); | ||
409 | d->dev.parent = &dev->dev; | ||
410 | d->irq[0] = dev->irq; | ||
411 | d->irq[1] = dev->irq; | ||
412 | d->periphid = idev->id; | ||
413 | d->dev.platform_data = idev->platform_data; | ||
414 | |||
415 | ret = amba_device_add(d, &dev->resource); | ||
416 | if (ret) { | ||
417 | dev_err(&d->dev, "unable to register device: %d\n", ret); | ||
418 | amba_device_put(d); | ||
419 | } | 411 | } |
420 | } | 412 | } |
421 | 413 | ||
diff --git a/arch/arm/mach-integrator/include/mach/entry-macro.S b/arch/arm/mach-integrator/include/mach/entry-macro.S deleted file mode 100644 index 5cc7b85ad9d..00000000000 --- a/arch/arm/mach-integrator/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-integrator/include/mach/entry-macro.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for Integrator platforms | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | #include <mach/hardware.h> | ||
11 | #include <mach/platform.h> | ||
12 | #include <mach/irqs.h> | ||
13 | |||
14 | .macro get_irqnr_preamble, base, tmp | ||
15 | .endm | ||
16 | |||
17 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
18 | /* FIXME: should not be using soo many LDRs here */ | ||
19 | ldr \base, =IO_ADDRESS(INTEGRATOR_IC_BASE) | ||
20 | mov \irqnr, #IRQ_PIC_START | ||
21 | ldr \irqstat, [\base, #IRQ_STATUS] @ get masked status | ||
22 | ldr \base, =IO_ADDRESS(INTEGRATOR_HDR_BASE) | ||
23 | teq \irqstat, #0 | ||
24 | ldreq \irqstat, [\base, #(INTEGRATOR_HDR_IC_OFFSET+IRQ_STATUS)] | ||
25 | moveq \irqnr, #IRQ_CIC_START | ||
26 | |||
27 | 1001: tst \irqstat, #15 | ||
28 | bne 1002f | ||
29 | add \irqnr, \irqnr, #4 | ||
30 | movs \irqstat, \irqstat, lsr #4 | ||
31 | bne 1001b | ||
32 | 1002: tst \irqstat, #1 | ||
33 | bne 1003f | ||
34 | add \irqnr, \irqnr, #1 | ||
35 | movs \irqstat, \irqstat, lsr #1 | ||
36 | bne 1002b | ||
37 | 1003: /* EQ will be set if no irqs pending */ | ||
38 | .endm | ||
39 | |||
diff --git a/arch/arm/mach-integrator/include/mach/irqs.h b/arch/arm/mach-integrator/include/mach/irqs.h index a19a1a2fcf6..7371018455d 100644 --- a/arch/arm/mach-integrator/include/mach/irqs.h +++ b/arch/arm/mach-integrator/include/mach/irqs.h | |||
@@ -22,37 +22,37 @@ | |||
22 | /* | 22 | /* |
23 | * Interrupt numbers | 23 | * Interrupt numbers |
24 | */ | 24 | */ |
25 | #define IRQ_PIC_START 0 | 25 | #define IRQ_PIC_START 1 |
26 | #define IRQ_SOFTINT 0 | 26 | #define IRQ_SOFTINT 1 |
27 | #define IRQ_UARTINT0 1 | 27 | #define IRQ_UARTINT0 2 |
28 | #define IRQ_UARTINT1 2 | 28 | #define IRQ_UARTINT1 3 |
29 | #define IRQ_KMIINT0 3 | 29 | #define IRQ_KMIINT0 4 |
30 | #define IRQ_KMIINT1 4 | 30 | #define IRQ_KMIINT1 5 |
31 | #define IRQ_TIMERINT0 5 | 31 | #define IRQ_TIMERINT0 6 |
32 | #define IRQ_TIMERINT1 6 | 32 | #define IRQ_TIMERINT1 7 |
33 | #define IRQ_TIMERINT2 7 | 33 | #define IRQ_TIMERINT2 8 |
34 | #define IRQ_RTCINT 8 | 34 | #define IRQ_RTCINT 9 |
35 | #define IRQ_AP_EXPINT0 9 | 35 | #define IRQ_AP_EXPINT0 10 |
36 | #define IRQ_AP_EXPINT1 10 | 36 | #define IRQ_AP_EXPINT1 11 |
37 | #define IRQ_AP_EXPINT2 11 | 37 | #define IRQ_AP_EXPINT2 12 |
38 | #define IRQ_AP_EXPINT3 12 | 38 | #define IRQ_AP_EXPINT3 13 |
39 | #define IRQ_AP_PCIINT0 13 | 39 | #define IRQ_AP_PCIINT0 14 |
40 | #define IRQ_AP_PCIINT1 14 | 40 | #define IRQ_AP_PCIINT1 15 |
41 | #define IRQ_AP_PCIINT2 15 | 41 | #define IRQ_AP_PCIINT2 16 |
42 | #define IRQ_AP_PCIINT3 16 | 42 | #define IRQ_AP_PCIINT3 17 |
43 | #define IRQ_AP_V3INT 17 | 43 | #define IRQ_AP_V3INT 18 |
44 | #define IRQ_AP_CPINT0 18 | 44 | #define IRQ_AP_CPINT0 19 |
45 | #define IRQ_AP_CPINT1 19 | 45 | #define IRQ_AP_CPINT1 20 |
46 | #define IRQ_AP_LBUSTIMEOUT 20 | 46 | #define IRQ_AP_LBUSTIMEOUT 21 |
47 | #define IRQ_AP_APCINT 21 | 47 | #define IRQ_AP_APCINT 22 |
48 | #define IRQ_CP_CLCDCINT 22 | 48 | #define IRQ_CP_CLCDCINT 23 |
49 | #define IRQ_CP_MMCIINT0 23 | 49 | #define IRQ_CP_MMCIINT0 24 |
50 | #define IRQ_CP_MMCIINT1 24 | 50 | #define IRQ_CP_MMCIINT1 25 |
51 | #define IRQ_CP_AACIINT 25 | 51 | #define IRQ_CP_AACIINT 26 |
52 | #define IRQ_CP_CPPLDINT 26 | 52 | #define IRQ_CP_CPPLDINT 27 |
53 | #define IRQ_CP_ETHINT 27 | 53 | #define IRQ_CP_ETHINT 28 |
54 | #define IRQ_CP_TSPENINT 28 | 54 | #define IRQ_CP_TSPENINT 29 |
55 | #define IRQ_PIC_END 31 | 55 | #define IRQ_PIC_END 29 |
56 | 56 | ||
57 | #define IRQ_CIC_START 32 | 57 | #define IRQ_CIC_START 32 |
58 | #define IRQ_CM_SOFTINT 32 | 58 | #define IRQ_CM_SOFTINT 32 |
@@ -80,4 +80,3 @@ | |||
80 | 80 | ||
81 | #define NR_IRQS_INTEGRATOR_AP 34 | 81 | #define NR_IRQS_INTEGRATOR_AP 34 |
82 | #define NR_IRQS_INTEGRATOR_CP 47 | 82 | #define NR_IRQS_INTEGRATOR_CP 47 |
83 | |||
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c index 871f148ffd7..c857501c578 100644 --- a/arch/arm/mach-integrator/integrator_ap.c +++ b/arch/arm/mach-integrator/integrator_ap.c | |||
@@ -162,12 +162,6 @@ static void __init ap_map_io(void) | |||
162 | 162 | ||
163 | #define INTEGRATOR_SC_VALID_INT 0x003fffff | 163 | #define INTEGRATOR_SC_VALID_INT 0x003fffff |
164 | 164 | ||
165 | static struct fpga_irq_data sc_irq_data = { | ||
166 | .base = VA_IC_BASE, | ||
167 | .irq_start = 0, | ||
168 | .chip.name = "SC", | ||
169 | }; | ||
170 | |||
171 | static void __init ap_init_irq(void) | 165 | static void __init ap_init_irq(void) |
172 | { | 166 | { |
173 | /* Disable all interrupts initially. */ | 167 | /* Disable all interrupts initially. */ |
@@ -178,7 +172,8 @@ static void __init ap_init_irq(void) | |||
178 | writel(-1, VA_IC_BASE + IRQ_ENABLE_CLEAR); | 172 | writel(-1, VA_IC_BASE + IRQ_ENABLE_CLEAR); |
179 | writel(-1, VA_IC_BASE + FIQ_ENABLE_CLEAR); | 173 | writel(-1, VA_IC_BASE + FIQ_ENABLE_CLEAR); |
180 | 174 | ||
181 | fpga_irq_init(-1, INTEGRATOR_SC_VALID_INT, &sc_irq_data); | 175 | fpga_irq_init(VA_IC_BASE, "SC", IRQ_PIC_START, |
176 | -1, INTEGRATOR_SC_VALID_INT, NULL); | ||
182 | } | 177 | } |
183 | 178 | ||
184 | #ifdef CONFIG_PM | 179 | #ifdef CONFIG_PM |
@@ -478,6 +473,7 @@ MACHINE_START(INTEGRATOR, "ARM-Integrator") | |||
478 | .nr_irqs = NR_IRQS_INTEGRATOR_AP, | 473 | .nr_irqs = NR_IRQS_INTEGRATOR_AP, |
479 | .init_early = integrator_init_early, | 474 | .init_early = integrator_init_early, |
480 | .init_irq = ap_init_irq, | 475 | .init_irq = ap_init_irq, |
476 | .handle_irq = fpga_handle_irq, | ||
481 | .timer = &ap_timer, | 477 | .timer = &ap_timer, |
482 | .init_machine = ap_init, | 478 | .init_machine = ap_init, |
483 | .restart = integrator_restart, | 479 | .restart = integrator_restart, |
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c index 48a115a91d9..a56c5360893 100644 --- a/arch/arm/mach-integrator/integrator_cp.c +++ b/arch/arm/mach-integrator/integrator_cp.c | |||
@@ -143,30 +143,14 @@ static void __init intcp_map_io(void) | |||
143 | iotable_init(intcp_io_desc, ARRAY_SIZE(intcp_io_desc)); | 143 | iotable_init(intcp_io_desc, ARRAY_SIZE(intcp_io_desc)); |
144 | } | 144 | } |
145 | 145 | ||
146 | static struct fpga_irq_data cic_irq_data = { | ||
147 | .base = INTCP_VA_CIC_BASE, | ||
148 | .irq_start = IRQ_CIC_START, | ||
149 | .chip.name = "CIC", | ||
150 | }; | ||
151 | |||
152 | static struct fpga_irq_data pic_irq_data = { | ||
153 | .base = INTCP_VA_PIC_BASE, | ||
154 | .irq_start = IRQ_PIC_START, | ||
155 | .chip.name = "PIC", | ||
156 | }; | ||
157 | |||
158 | static struct fpga_irq_data sic_irq_data = { | ||
159 | .base = INTCP_VA_SIC_BASE, | ||
160 | .irq_start = IRQ_SIC_START, | ||
161 | .chip.name = "SIC", | ||
162 | }; | ||
163 | |||
164 | static void __init intcp_init_irq(void) | 146 | static void __init intcp_init_irq(void) |
165 | { | 147 | { |
166 | u32 pic_mask, sic_mask; | 148 | u32 pic_mask, cic_mask, sic_mask; |
167 | 149 | ||
150 | /* These masks are for the HW IRQ registers */ | ||
168 | pic_mask = ~((~0u) << (11 - IRQ_PIC_START)); | 151 | pic_mask = ~((~0u) << (11 - IRQ_PIC_START)); |
169 | pic_mask |= (~((~0u) << (29 - 22))) << 22; | 152 | pic_mask |= (~((~0u) << (29 - 22))) << 22; |
153 | cic_mask = ~((~0u) << (1 + IRQ_CIC_END - IRQ_CIC_START)); | ||
170 | sic_mask = ~((~0u) << (1 + IRQ_SIC_END - IRQ_SIC_START)); | 154 | sic_mask = ~((~0u) << (1 + IRQ_SIC_END - IRQ_SIC_START)); |
171 | 155 | ||
172 | /* | 156 | /* |
@@ -179,12 +163,14 @@ static void __init intcp_init_irq(void) | |||
179 | writel(sic_mask, INTCP_VA_SIC_BASE + IRQ_ENABLE_CLEAR); | 163 | writel(sic_mask, INTCP_VA_SIC_BASE + IRQ_ENABLE_CLEAR); |
180 | writel(sic_mask, INTCP_VA_SIC_BASE + FIQ_ENABLE_CLEAR); | 164 | writel(sic_mask, INTCP_VA_SIC_BASE + FIQ_ENABLE_CLEAR); |
181 | 165 | ||
182 | fpga_irq_init(-1, pic_mask, &pic_irq_data); | 166 | fpga_irq_init(INTCP_VA_PIC_BASE, "PIC", IRQ_PIC_START, |
167 | -1, pic_mask, NULL); | ||
183 | 168 | ||
184 | fpga_irq_init(-1, ~((~0u) << (1 + IRQ_CIC_END - IRQ_CIC_START)), | 169 | fpga_irq_init(INTCP_VA_CIC_BASE, "CIC", IRQ_CIC_START, |
185 | &cic_irq_data); | 170 | -1, cic_mask, NULL); |
186 | 171 | ||
187 | fpga_irq_init(IRQ_CP_CPPLDINT, sic_mask, &sic_irq_data); | 172 | fpga_irq_init(INTCP_VA_SIC_BASE, "SIC", IRQ_SIC_START, |
173 | IRQ_CP_CPPLDINT, sic_mask, NULL); | ||
188 | } | 174 | } |
189 | 175 | ||
190 | /* | 176 | /* |
@@ -467,6 +453,7 @@ MACHINE_START(CINTEGRATOR, "ARM-IntegratorCP") | |||
467 | .nr_irqs = NR_IRQS_INTEGRATOR_CP, | 453 | .nr_irqs = NR_IRQS_INTEGRATOR_CP, |
468 | .init_early = intcp_init_early, | 454 | .init_early = intcp_init_early, |
469 | .init_irq = intcp_init_irq, | 455 | .init_irq = intcp_init_irq, |
456 | .handle_irq = fpga_handle_irq, | ||
470 | .timer = &cp_timer, | 457 | .timer = &cp_timer, |
471 | .init_machine = intcp_init, | 458 | .init_machine = intcp_init, |
472 | .restart = integrator_restart, | 459 | .restart = integrator_restart, |
diff --git a/arch/arm/mach-integrator/pci.c b/arch/arm/mach-integrator/pci.c index f1ca9c12286..6c1667e728f 100644 --- a/arch/arm/mach-integrator/pci.c +++ b/arch/arm/mach-integrator/pci.c | |||
@@ -70,21 +70,10 @@ | |||
70 | */ | 70 | */ |
71 | static u8 __init integrator_swizzle(struct pci_dev *dev, u8 *pinp) | 71 | static u8 __init integrator_swizzle(struct pci_dev *dev, u8 *pinp) |
72 | { | 72 | { |
73 | int pin = *pinp; | 73 | if (*pinp == 0) |
74 | *pinp = 1; | ||
74 | 75 | ||
75 | if (pin == 0) | 76 | return pci_common_swizzle(dev, pinp); |
76 | pin = 1; | ||
77 | |||
78 | while (dev->bus->self) { | ||
79 | pin = pci_swizzle_interrupt_pin(dev, pin); | ||
80 | /* | ||
81 | * move up the chain of bridges, swizzling as we go. | ||
82 | */ | ||
83 | dev = dev->bus->self; | ||
84 | } | ||
85 | *pinp = pin; | ||
86 | |||
87 | return PCI_SLOT(dev->devfn); | ||
88 | } | 77 | } |
89 | 78 | ||
90 | static int irq_tab[4] __initdata = { | 79 | static int irq_tab[4] __initdata = { |
@@ -109,7 +98,7 @@ static struct hw_pci integrator_pci __initdata = { | |||
109 | .map_irq = integrator_map_irq, | 98 | .map_irq = integrator_map_irq, |
110 | .setup = pci_v3_setup, | 99 | .setup = pci_v3_setup, |
111 | .nr_controllers = 1, | 100 | .nr_controllers = 1, |
112 | .scan = pci_v3_scan_bus, | 101 | .ops = &pci_v3_ops, |
113 | .preinit = pci_v3_preinit, | 102 | .preinit = pci_v3_preinit, |
114 | .postinit = pci_v3_postinit, | 103 | .postinit = pci_v3_postinit, |
115 | }; | 104 | }; |
diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c index 67e6f9a9d1a..b866880e82a 100644 --- a/arch/arm/mach-integrator/pci_v3.c +++ b/arch/arm/mach-integrator/pci_v3.c | |||
@@ -340,7 +340,7 @@ static int v3_write_config(struct pci_bus *bus, unsigned int devfn, int where, | |||
340 | return PCIBIOS_SUCCESSFUL; | 340 | return PCIBIOS_SUCCESSFUL; |
341 | } | 341 | } |
342 | 342 | ||
343 | static struct pci_ops pci_v3_ops = { | 343 | struct pci_ops pci_v3_ops = { |
344 | .read = v3_read_config, | 344 | .read = v3_read_config, |
345 | .write = v3_write_config, | 345 | .write = v3_write_config, |
346 | }; | 346 | }; |
@@ -488,12 +488,6 @@ int __init pci_v3_setup(int nr, struct pci_sys_data *sys) | |||
488 | return ret; | 488 | return ret; |
489 | } | 489 | } |
490 | 490 | ||
491 | struct pci_bus * __init pci_v3_scan_bus(int nr, struct pci_sys_data *sys) | ||
492 | { | ||
493 | return pci_scan_root_bus(NULL, sys->busnr, &pci_v3_ops, sys, | ||
494 | &sys->resources); | ||
495 | } | ||
496 | |||
497 | /* | 491 | /* |
498 | * V3_LB_BASE? - local bus address | 492 | * V3_LB_BASE? - local bus address |
499 | * V3_LB_MAP? - pci bus address | 493 | * V3_LB_MAP? - pci bus address |
diff --git a/arch/arm/mach-iop13xx/iq81340mc.c b/arch/arm/mach-iop13xx/iq81340mc.c index 5c96b73e696..e3f3e7daa79 100644 --- a/arch/arm/mach-iop13xx/iq81340mc.c +++ b/arch/arm/mach-iop13xx/iq81340mc.c | |||
@@ -54,7 +54,6 @@ iq81340mc_pcix_map_irq(const struct pci_dev *dev, u8 idsel, u8 pin) | |||
54 | } | 54 | } |
55 | 55 | ||
56 | static struct hw_pci iq81340mc_pci __initdata = { | 56 | static struct hw_pci iq81340mc_pci __initdata = { |
57 | .swizzle = pci_std_swizzle, | ||
58 | .nr_controllers = 0, | 57 | .nr_controllers = 0, |
59 | .setup = iop13xx_pci_setup, | 58 | .setup = iop13xx_pci_setup, |
60 | .map_irq = iq81340mc_pcix_map_irq, | 59 | .map_irq = iq81340mc_pcix_map_irq, |
diff --git a/arch/arm/mach-iop13xx/iq81340sc.c b/arch/arm/mach-iop13xx/iq81340sc.c index aa4dd750135..060cddde2fd 100644 --- a/arch/arm/mach-iop13xx/iq81340sc.c +++ b/arch/arm/mach-iop13xx/iq81340sc.c | |||
@@ -56,7 +56,6 @@ iq81340sc_atux_map_irq(struct pci_dev *dev, u8 idsel, u8 pin) | |||
56 | } | 56 | } |
57 | 57 | ||
58 | static struct hw_pci iq81340sc_pci __initdata = { | 58 | static struct hw_pci iq81340sc_pci __initdata = { |
59 | .swizzle = pci_std_swizzle, | ||
60 | .nr_controllers = 0, | 59 | .nr_controllers = 0, |
61 | .setup = iop13xx_pci_setup, | 60 | .setup = iop13xx_pci_setup, |
62 | .scan = iop13xx_scan_bus, | 61 | .scan = iop13xx_scan_bus, |
diff --git a/arch/arm/mach-iop32x/em7210.c b/arch/arm/mach-iop32x/em7210.c index 24069e03fdc..9f369f09c29 100644 --- a/arch/arm/mach-iop32x/em7210.c +++ b/arch/arm/mach-iop32x/em7210.c | |||
@@ -103,11 +103,10 @@ em7210_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
103 | } | 103 | } |
104 | 104 | ||
105 | static struct hw_pci em7210_pci __initdata = { | 105 | static struct hw_pci em7210_pci __initdata = { |
106 | .swizzle = pci_std_swizzle, | ||
107 | .nr_controllers = 1, | 106 | .nr_controllers = 1, |
107 | .ops = &iop3xx_ops, | ||
108 | .setup = iop3xx_pci_setup, | 108 | .setup = iop3xx_pci_setup, |
109 | .preinit = iop3xx_pci_preinit, | 109 | .preinit = iop3xx_pci_preinit, |
110 | .scan = iop3xx_pci_scan_bus, | ||
111 | .map_irq = em7210_pci_map_irq, | 110 | .map_irq = em7210_pci_map_irq, |
112 | }; | 111 | }; |
113 | 112 | ||
diff --git a/arch/arm/mach-iop32x/glantank.c b/arch/arm/mach-iop32x/glantank.c index 204e1d1cd76..c15a100ba77 100644 --- a/arch/arm/mach-iop32x/glantank.c +++ b/arch/arm/mach-iop32x/glantank.c | |||
@@ -96,11 +96,10 @@ glantank_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
96 | } | 96 | } |
97 | 97 | ||
98 | static struct hw_pci glantank_pci __initdata = { | 98 | static struct hw_pci glantank_pci __initdata = { |
99 | .swizzle = pci_std_swizzle, | ||
100 | .nr_controllers = 1, | 99 | .nr_controllers = 1, |
100 | .ops = &iop3xx_ops, | ||
101 | .setup = iop3xx_pci_setup, | 101 | .setup = iop3xx_pci_setup, |
102 | .preinit = iop3xx_pci_preinit, | 102 | .preinit = iop3xx_pci_preinit, |
103 | .scan = iop3xx_pci_scan_bus, | ||
104 | .map_irq = glantank_pci_map_irq, | 103 | .map_irq = glantank_pci_map_irq, |
105 | }; | 104 | }; |
106 | 105 | ||
diff --git a/arch/arm/mach-iop32x/iq31244.c b/arch/arm/mach-iop32x/iq31244.c index 3eb642af1cd..ddd1c7ecfe5 100644 --- a/arch/arm/mach-iop32x/iq31244.c +++ b/arch/arm/mach-iop32x/iq31244.c | |||
@@ -130,11 +130,10 @@ ep80219_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
130 | } | 130 | } |
131 | 131 | ||
132 | static struct hw_pci ep80219_pci __initdata = { | 132 | static struct hw_pci ep80219_pci __initdata = { |
133 | .swizzle = pci_std_swizzle, | ||
134 | .nr_controllers = 1, | 133 | .nr_controllers = 1, |
134 | .ops = &iop3xx_ops, | ||
135 | .setup = iop3xx_pci_setup, | 135 | .setup = iop3xx_pci_setup, |
136 | .preinit = iop3xx_pci_preinit, | 136 | .preinit = iop3xx_pci_preinit, |
137 | .scan = iop3xx_pci_scan_bus, | ||
138 | .map_irq = ep80219_pci_map_irq, | 137 | .map_irq = ep80219_pci_map_irq, |
139 | }; | 138 | }; |
140 | 139 | ||
@@ -166,11 +165,10 @@ iq31244_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
166 | } | 165 | } |
167 | 166 | ||
168 | static struct hw_pci iq31244_pci __initdata = { | 167 | static struct hw_pci iq31244_pci __initdata = { |
169 | .swizzle = pci_std_swizzle, | ||
170 | .nr_controllers = 1, | 168 | .nr_controllers = 1, |
169 | .ops = &iop3xx_ops, | ||
171 | .setup = iop3xx_pci_setup, | 170 | .setup = iop3xx_pci_setup, |
172 | .preinit = iop3xx_pci_preinit, | 171 | .preinit = iop3xx_pci_preinit, |
173 | .scan = iop3xx_pci_scan_bus, | ||
174 | .map_irq = iq31244_pci_map_irq, | 172 | .map_irq = iq31244_pci_map_irq, |
175 | }; | 173 | }; |
176 | 174 | ||
diff --git a/arch/arm/mach-iop32x/iq80321.c b/arch/arm/mach-iop32x/iq80321.c index 2ec724b58a2..bf155e6a3b4 100644 --- a/arch/arm/mach-iop32x/iq80321.c +++ b/arch/arm/mach-iop32x/iq80321.c | |||
@@ -101,11 +101,10 @@ iq80321_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
101 | } | 101 | } |
102 | 102 | ||
103 | static struct hw_pci iq80321_pci __initdata = { | 103 | static struct hw_pci iq80321_pci __initdata = { |
104 | .swizzle = pci_std_swizzle, | ||
105 | .nr_controllers = 1, | 104 | .nr_controllers = 1, |
105 | .ops = &iop3xx_ops, | ||
106 | .setup = iop3xx_pci_setup, | 106 | .setup = iop3xx_pci_setup, |
107 | .preinit = iop3xx_pci_preinit_cond, | 107 | .preinit = iop3xx_pci_preinit_cond, |
108 | .scan = iop3xx_pci_scan_bus, | ||
109 | .map_irq = iq80321_pci_map_irq, | 108 | .map_irq = iq80321_pci_map_irq, |
110 | }; | 109 | }; |
111 | 110 | ||
diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c index 6b6d5591244..5a7ae91e884 100644 --- a/arch/arm/mach-iop32x/n2100.c +++ b/arch/arm/mach-iop32x/n2100.c | |||
@@ -114,11 +114,10 @@ n2100_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
114 | } | 114 | } |
115 | 115 | ||
116 | static struct hw_pci n2100_pci __initdata = { | 116 | static struct hw_pci n2100_pci __initdata = { |
117 | .swizzle = pci_std_swizzle, | ||
118 | .nr_controllers = 1, | 117 | .nr_controllers = 1, |
118 | .ops = &iop3xx_ops, | ||
119 | .setup = iop3xx_pci_setup, | 119 | .setup = iop3xx_pci_setup, |
120 | .preinit = iop3xx_pci_preinit, | 120 | .preinit = iop3xx_pci_preinit, |
121 | .scan = iop3xx_pci_scan_bus, | ||
122 | .map_irq = n2100_pci_map_irq, | 121 | .map_irq = n2100_pci_map_irq, |
123 | }; | 122 | }; |
124 | 123 | ||
diff --git a/arch/arm/mach-iop33x/iq80331.c b/arch/arm/mach-iop33x/iq80331.c index abce934f381..e74a7debe79 100644 --- a/arch/arm/mach-iop33x/iq80331.c +++ b/arch/arm/mach-iop33x/iq80331.c | |||
@@ -84,11 +84,10 @@ iq80331_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
84 | } | 84 | } |
85 | 85 | ||
86 | static struct hw_pci iq80331_pci __initdata = { | 86 | static struct hw_pci iq80331_pci __initdata = { |
87 | .swizzle = pci_std_swizzle, | ||
88 | .nr_controllers = 1, | 87 | .nr_controllers = 1, |
88 | .ops = &iop3xx_ops, | ||
89 | .setup = iop3xx_pci_setup, | 89 | .setup = iop3xx_pci_setup, |
90 | .preinit = iop3xx_pci_preinit_cond, | 90 | .preinit = iop3xx_pci_preinit_cond, |
91 | .scan = iop3xx_pci_scan_bus, | ||
92 | .map_irq = iq80331_pci_map_irq, | 91 | .map_irq = iq80331_pci_map_irq, |
93 | }; | 92 | }; |
94 | 93 | ||
diff --git a/arch/arm/mach-iop33x/iq80332.c b/arch/arm/mach-iop33x/iq80332.c index 7513559e25b..e2f5beece6e 100644 --- a/arch/arm/mach-iop33x/iq80332.c +++ b/arch/arm/mach-iop33x/iq80332.c | |||
@@ -84,11 +84,10 @@ iq80332_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
84 | } | 84 | } |
85 | 85 | ||
86 | static struct hw_pci iq80332_pci __initdata = { | 86 | static struct hw_pci iq80332_pci __initdata = { |
87 | .swizzle = pci_std_swizzle, | ||
88 | .nr_controllers = 1, | 87 | .nr_controllers = 1, |
88 | .ops = &iop3xx_ops, | ||
89 | .setup = iop3xx_pci_setup, | 89 | .setup = iop3xx_pci_setup, |
90 | .preinit = iop3xx_pci_preinit_cond, | 90 | .preinit = iop3xx_pci_preinit_cond, |
91 | .scan = iop3xx_pci_scan_bus, | ||
92 | .map_irq = iq80332_pci_map_irq, | 91 | .map_irq = iq80332_pci_map_irq, |
93 | }; | 92 | }; |
94 | 93 | ||
diff --git a/arch/arm/mach-ixp2000/Kconfig b/arch/arm/mach-ixp2000/Kconfig deleted file mode 100644 index 08d2707f6ca..00000000000 --- a/arch/arm/mach-ixp2000/Kconfig +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | |||
2 | if ARCH_IXP2000 | ||
3 | |||
4 | config ARCH_SUPPORTS_BIG_ENDIAN | ||
5 | bool | ||
6 | default y | ||
7 | |||
8 | menu "Intel IXP2400/2800 Implementation Options" | ||
9 | |||
10 | comment "IXP2400/2800 Platforms" | ||
11 | |||
12 | config ARCH_ENP2611 | ||
13 | bool "Support Radisys ENP-2611" | ||
14 | help | ||
15 | Say 'Y' here if you want your kernel to support the Radisys | ||
16 | ENP2611 PCI network processing card. For more information on | ||
17 | this card, see <file:Documentation/arm/IXP2000>. | ||
18 | |||
19 | config ARCH_IXDP2400 | ||
20 | bool "Support Intel IXDP2400" | ||
21 | help | ||
22 | Say 'Y' here if you want your kernel to support the Intel | ||
23 | IXDP2400 reference platform. For more information on | ||
24 | this platform, see <file:Documentation/arm/IXP2000>. | ||
25 | |||
26 | config ARCH_IXDP2800 | ||
27 | bool "Support Intel IXDP2800" | ||
28 | help | ||
29 | Say 'Y' here if you want your kernel to support the Intel | ||
30 | IXDP2800 reference platform. For more information on | ||
31 | this platform, see <file:Documentation/arm/IXP2000>. | ||
32 | |||
33 | config ARCH_IXDP2X00 | ||
34 | bool | ||
35 | depends on ARCH_IXDP2400 || ARCH_IXDP2800 | ||
36 | default y | ||
37 | |||
38 | config ARCH_IXDP2401 | ||
39 | bool "Support Intel IXDP2401" | ||
40 | help | ||
41 | Say 'Y' here if you want your kernel to support the Intel | ||
42 | IXDP2401 reference platform. For more information on | ||
43 | this platform, see <file:Documentation/arm/IXP2000>. | ||
44 | |||
45 | config ARCH_IXDP2801 | ||
46 | bool "Support Intel IXDP2801 and IXDP28x5" | ||
47 | help | ||
48 | Say 'Y' here if you want your kernel to support the Intel | ||
49 | IXDP2801/2805/2855 reference platforms. For more information on | ||
50 | this platform, see <file:Documentation/arm/IXP2000>. | ||
51 | |||
52 | config MACH_IXDP28X5 | ||
53 | bool | ||
54 | depends on ARCH_IXDP2801 | ||
55 | default y | ||
56 | |||
57 | config ARCH_IXDP2X01 | ||
58 | bool | ||
59 | depends on ARCH_IXDP2401 || ARCH_IXDP2801 | ||
60 | default y | ||
61 | |||
62 | config IXP2000_SUPPORT_BROKEN_PCI_IO | ||
63 | bool "Support broken PCI I/O on older IXP2000s" | ||
64 | default y | ||
65 | help | ||
66 | Say 'N' here if you only intend to run your kernel on an | ||
67 | IXP2000 B0 or later model and do not need the PCI I/O | ||
68 | byteswap workaround. Say 'Y' otherwise. | ||
69 | |||
70 | endmenu | ||
71 | |||
72 | endif | ||
diff --git a/arch/arm/mach-ixp2000/Makefile b/arch/arm/mach-ixp2000/Makefile deleted file mode 100644 index 1e6139d42a9..00000000000 --- a/arch/arm/mach-ixp2000/Makefile +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | # | ||
2 | # Makefile for the linux kernel. | ||
3 | # | ||
4 | obj-y := core.o pci.o | ||
5 | obj-m := | ||
6 | obj-n := | ||
7 | obj- := | ||
8 | |||
9 | obj-$(CONFIG_ARCH_ENP2611) += enp2611.o | ||
10 | obj-$(CONFIG_ARCH_IXDP2400) += ixdp2400.o | ||
11 | obj-$(CONFIG_ARCH_IXDP2800) += ixdp2800.o | ||
12 | obj-$(CONFIG_ARCH_IXDP2X00) += ixdp2x00.o | ||
13 | obj-$(CONFIG_ARCH_IXDP2X01) += ixdp2x01.o | ||
14 | |||
diff --git a/arch/arm/mach-ixp2000/Makefile.boot b/arch/arm/mach-ixp2000/Makefile.boot deleted file mode 100644 index 9c7af91d93d..00000000000 --- a/arch/arm/mach-ixp2000/Makefile.boot +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | zreladdr-y += 0x00008000 | ||
2 | params_phys-y := 0x00000100 | ||
3 | |||
diff --git a/arch/arm/mach-ixp2000/core.c b/arch/arm/mach-ixp2000/core.c deleted file mode 100644 index f214cdff01c..00000000000 --- a/arch/arm/mach-ixp2000/core.c +++ /dev/null | |||
@@ -1,520 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/core.c | ||
3 | * | ||
4 | * Common routines used by all IXP2400/2800 based platforms. | ||
5 | * | ||
6 | * Author: Deepak Saxena <dsaxena@plexity.net> | ||
7 | * | ||
8 | * Copyright 2004 (C) MontaVista Software, Inc. | ||
9 | * | ||
10 | * Based on work Copyright (C) 2002-2003 Intel Corporation | ||
11 | * | ||
12 | * This file is licensed under the terms of the GNU General Public | ||
13 | * License version 2. This program is licensed "as is" without any | ||
14 | * warranty of any kind, whether express or implied. | ||
15 | */ | ||
16 | #include <linux/gpio.h> | ||
17 | #include <linux/kernel.h> | ||
18 | #include <linux/init.h> | ||
19 | #include <linux/spinlock.h> | ||
20 | #include <linux/sched.h> | ||
21 | #include <linux/interrupt.h> | ||
22 | #include <linux/irq.h> | ||
23 | #include <linux/serial.h> | ||
24 | #include <linux/tty.h> | ||
25 | #include <linux/bitops.h> | ||
26 | #include <linux/serial_8250.h> | ||
27 | #include <linux/mm.h> | ||
28 | #include <linux/export.h> | ||
29 | |||
30 | #include <asm/types.h> | ||
31 | #include <asm/setup.h> | ||
32 | #include <asm/memory.h> | ||
33 | #include <mach/hardware.h> | ||
34 | #include <asm/irq.h> | ||
35 | #include <asm/tlbflush.h> | ||
36 | #include <asm/pgtable.h> | ||
37 | |||
38 | #include <asm/mach/map.h> | ||
39 | #include <asm/mach/time.h> | ||
40 | #include <asm/mach/irq.h> | ||
41 | |||
42 | #include <mach/gpio-ixp2000.h> | ||
43 | |||
44 | static DEFINE_SPINLOCK(ixp2000_slowport_lock); | ||
45 | static unsigned long ixp2000_slowport_irq_flags; | ||
46 | |||
47 | /************************************************************************* | ||
48 | * Slowport access routines | ||
49 | *************************************************************************/ | ||
50 | void ixp2000_acquire_slowport(struct slowport_cfg *new_cfg, struct slowport_cfg *old_cfg) | ||
51 | { | ||
52 | spin_lock_irqsave(&ixp2000_slowport_lock, ixp2000_slowport_irq_flags); | ||
53 | |||
54 | old_cfg->CCR = *IXP2000_SLOWPORT_CCR; | ||
55 | old_cfg->WTC = *IXP2000_SLOWPORT_WTC2; | ||
56 | old_cfg->RTC = *IXP2000_SLOWPORT_RTC2; | ||
57 | old_cfg->PCR = *IXP2000_SLOWPORT_PCR; | ||
58 | old_cfg->ADC = *IXP2000_SLOWPORT_ADC; | ||
59 | |||
60 | ixp2000_reg_write(IXP2000_SLOWPORT_CCR, new_cfg->CCR); | ||
61 | ixp2000_reg_write(IXP2000_SLOWPORT_WTC2, new_cfg->WTC); | ||
62 | ixp2000_reg_write(IXP2000_SLOWPORT_RTC2, new_cfg->RTC); | ||
63 | ixp2000_reg_write(IXP2000_SLOWPORT_PCR, new_cfg->PCR); | ||
64 | ixp2000_reg_wrb(IXP2000_SLOWPORT_ADC, new_cfg->ADC); | ||
65 | } | ||
66 | |||
67 | void ixp2000_release_slowport(struct slowport_cfg *old_cfg) | ||
68 | { | ||
69 | ixp2000_reg_write(IXP2000_SLOWPORT_CCR, old_cfg->CCR); | ||
70 | ixp2000_reg_write(IXP2000_SLOWPORT_WTC2, old_cfg->WTC); | ||
71 | ixp2000_reg_write(IXP2000_SLOWPORT_RTC2, old_cfg->RTC); | ||
72 | ixp2000_reg_write(IXP2000_SLOWPORT_PCR, old_cfg->PCR); | ||
73 | ixp2000_reg_wrb(IXP2000_SLOWPORT_ADC, old_cfg->ADC); | ||
74 | |||
75 | spin_unlock_irqrestore(&ixp2000_slowport_lock, | ||
76 | ixp2000_slowport_irq_flags); | ||
77 | } | ||
78 | |||
79 | /************************************************************************* | ||
80 | * Chip specific mappings shared by all IXP2000 systems | ||
81 | *************************************************************************/ | ||
82 | static struct map_desc ixp2000_io_desc[] __initdata = { | ||
83 | { | ||
84 | .virtual = IXP2000_CAP_VIRT_BASE, | ||
85 | .pfn = __phys_to_pfn(IXP2000_CAP_PHYS_BASE), | ||
86 | .length = IXP2000_CAP_SIZE, | ||
87 | .type = MT_DEVICE, | ||
88 | }, { | ||
89 | .virtual = IXP2000_INTCTL_VIRT_BASE, | ||
90 | .pfn = __phys_to_pfn(IXP2000_INTCTL_PHYS_BASE), | ||
91 | .length = IXP2000_INTCTL_SIZE, | ||
92 | .type = MT_DEVICE, | ||
93 | }, { | ||
94 | .virtual = IXP2000_PCI_CREG_VIRT_BASE, | ||
95 | .pfn = __phys_to_pfn(IXP2000_PCI_CREG_PHYS_BASE), | ||
96 | .length = IXP2000_PCI_CREG_SIZE, | ||
97 | .type = MT_DEVICE, | ||
98 | }, { | ||
99 | .virtual = IXP2000_PCI_CSR_VIRT_BASE, | ||
100 | .pfn = __phys_to_pfn(IXP2000_PCI_CSR_PHYS_BASE), | ||
101 | .length = IXP2000_PCI_CSR_SIZE, | ||
102 | .type = MT_DEVICE, | ||
103 | }, { | ||
104 | .virtual = IXP2000_MSF_VIRT_BASE, | ||
105 | .pfn = __phys_to_pfn(IXP2000_MSF_PHYS_BASE), | ||
106 | .length = IXP2000_MSF_SIZE, | ||
107 | .type = MT_DEVICE, | ||
108 | }, { | ||
109 | .virtual = IXP2000_SCRATCH_RING_VIRT_BASE, | ||
110 | .pfn = __phys_to_pfn(IXP2000_SCRATCH_RING_PHYS_BASE), | ||
111 | .length = IXP2000_SCRATCH_RING_SIZE, | ||
112 | .type = MT_DEVICE, | ||
113 | }, { | ||
114 | .virtual = IXP2000_SRAM0_VIRT_BASE, | ||
115 | .pfn = __phys_to_pfn(IXP2000_SRAM0_PHYS_BASE), | ||
116 | .length = IXP2000_SRAM0_SIZE, | ||
117 | .type = MT_DEVICE, | ||
118 | }, { | ||
119 | .virtual = IXP2000_PCI_IO_VIRT_BASE, | ||
120 | .pfn = __phys_to_pfn(IXP2000_PCI_IO_PHYS_BASE), | ||
121 | .length = IXP2000_PCI_IO_SIZE, | ||
122 | .type = MT_DEVICE, | ||
123 | }, { | ||
124 | .virtual = IXP2000_PCI_CFG0_VIRT_BASE, | ||
125 | .pfn = __phys_to_pfn(IXP2000_PCI_CFG0_PHYS_BASE), | ||
126 | .length = IXP2000_PCI_CFG0_SIZE, | ||
127 | .type = MT_DEVICE, | ||
128 | }, { | ||
129 | .virtual = IXP2000_PCI_CFG1_VIRT_BASE, | ||
130 | .pfn = __phys_to_pfn(IXP2000_PCI_CFG1_PHYS_BASE), | ||
131 | .length = IXP2000_PCI_CFG1_SIZE, | ||
132 | .type = MT_DEVICE, | ||
133 | } | ||
134 | }; | ||
135 | |||
136 | void __init ixp2000_map_io(void) | ||
137 | { | ||
138 | iotable_init(ixp2000_io_desc, ARRAY_SIZE(ixp2000_io_desc)); | ||
139 | |||
140 | /* Set slowport to 8-bit mode. */ | ||
141 | ixp2000_reg_wrb(IXP2000_SLOWPORT_FRM, 1); | ||
142 | } | ||
143 | |||
144 | |||
145 | /************************************************************************* | ||
146 | * Serial port support for IXP2000 | ||
147 | *************************************************************************/ | ||
148 | static struct plat_serial8250_port ixp2000_serial_port[] = { | ||
149 | { | ||
150 | .mapbase = IXP2000_UART_PHYS_BASE, | ||
151 | .membase = (char *)(IXP2000_UART_VIRT_BASE + 3), | ||
152 | .irq = IRQ_IXP2000_UART, | ||
153 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, | ||
154 | .iotype = UPIO_MEM, | ||
155 | .regshift = 2, | ||
156 | .uartclk = 50000000, | ||
157 | }, | ||
158 | { }, | ||
159 | }; | ||
160 | |||
161 | static struct resource ixp2000_uart_resource = { | ||
162 | .start = IXP2000_UART_PHYS_BASE, | ||
163 | .end = IXP2000_UART_PHYS_BASE + 0x1f, | ||
164 | .flags = IORESOURCE_MEM, | ||
165 | }; | ||
166 | |||
167 | static struct platform_device ixp2000_serial_device = { | ||
168 | .name = "serial8250", | ||
169 | .id = PLAT8250_DEV_PLATFORM, | ||
170 | .dev = { | ||
171 | .platform_data = ixp2000_serial_port, | ||
172 | }, | ||
173 | .num_resources = 1, | ||
174 | .resource = &ixp2000_uart_resource, | ||
175 | }; | ||
176 | |||
177 | void __init ixp2000_uart_init(void) | ||
178 | { | ||
179 | platform_device_register(&ixp2000_serial_device); | ||
180 | } | ||
181 | |||
182 | |||
183 | /************************************************************************* | ||
184 | * Timer-tick functions for IXP2000 | ||
185 | *************************************************************************/ | ||
186 | static unsigned ticks_per_jiffy; | ||
187 | static unsigned ticks_per_usec; | ||
188 | static unsigned next_jiffy_time; | ||
189 | static volatile unsigned long *missing_jiffy_timer_csr; | ||
190 | |||
191 | unsigned long ixp2000_gettimeoffset (void) | ||
192 | { | ||
193 | unsigned long offset; | ||
194 | |||
195 | offset = next_jiffy_time - *missing_jiffy_timer_csr; | ||
196 | |||
197 | return offset / ticks_per_usec; | ||
198 | } | ||
199 | |||
200 | static irqreturn_t ixp2000_timer_interrupt(int irq, void *dev_id) | ||
201 | { | ||
202 | /* clear timer 1 */ | ||
203 | ixp2000_reg_wrb(IXP2000_T1_CLR, 1); | ||
204 | |||
205 | while ((signed long)(next_jiffy_time - *missing_jiffy_timer_csr) | ||
206 | >= ticks_per_jiffy) { | ||
207 | timer_tick(); | ||
208 | next_jiffy_time -= ticks_per_jiffy; | ||
209 | } | ||
210 | |||
211 | return IRQ_HANDLED; | ||
212 | } | ||
213 | |||
214 | static struct irqaction ixp2000_timer_irq = { | ||
215 | .name = "IXP2000 Timer Tick", | ||
216 | .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, | ||
217 | .handler = ixp2000_timer_interrupt, | ||
218 | }; | ||
219 | |||
220 | void __init ixp2000_init_time(unsigned long tick_rate) | ||
221 | { | ||
222 | ticks_per_jiffy = (tick_rate + HZ/2) / HZ; | ||
223 | ticks_per_usec = tick_rate / 1000000; | ||
224 | |||
225 | /* | ||
226 | * We use timer 1 as our timer interrupt. | ||
227 | */ | ||
228 | ixp2000_reg_write(IXP2000_T1_CLR, 0); | ||
229 | ixp2000_reg_write(IXP2000_T1_CLD, ticks_per_jiffy - 1); | ||
230 | ixp2000_reg_write(IXP2000_T1_CTL, (1 << 7)); | ||
231 | |||
232 | /* | ||
233 | * We use a second timer as a monotonic counter for tracking | ||
234 | * missed jiffies. The IXP2000 has four timers, but if we're | ||
235 | * on an A-step IXP2800, timer 2 and 3 don't work, so on those | ||
236 | * chips we use timer 4. Timer 4 is the only timer that can | ||
237 | * be used for the watchdog, so we use timer 2 if we're on a | ||
238 | * non-buggy chip. | ||
239 | */ | ||
240 | if ((*IXP2000_PRODUCT_ID & 0x001ffef0) == 0x00000000) { | ||
241 | printk(KERN_INFO "Enabling IXP2800 erratum #25 workaround\n"); | ||
242 | |||
243 | ixp2000_reg_write(IXP2000_T4_CLR, 0); | ||
244 | ixp2000_reg_write(IXP2000_T4_CLD, -1); | ||
245 | ixp2000_reg_wrb(IXP2000_T4_CTL, (1 << 7)); | ||
246 | missing_jiffy_timer_csr = IXP2000_T4_CSR; | ||
247 | } else { | ||
248 | ixp2000_reg_write(IXP2000_T2_CLR, 0); | ||
249 | ixp2000_reg_write(IXP2000_T2_CLD, -1); | ||
250 | ixp2000_reg_wrb(IXP2000_T2_CTL, (1 << 7)); | ||
251 | missing_jiffy_timer_csr = IXP2000_T2_CSR; | ||
252 | } | ||
253 | next_jiffy_time = 0xffffffff; | ||
254 | |||
255 | /* register for interrupt */ | ||
256 | setup_irq(IRQ_IXP2000_TIMER1, &ixp2000_timer_irq); | ||
257 | } | ||
258 | |||
259 | /************************************************************************* | ||
260 | * GPIO helpers | ||
261 | *************************************************************************/ | ||
262 | static unsigned long GPIO_IRQ_falling_edge; | ||
263 | static unsigned long GPIO_IRQ_rising_edge; | ||
264 | static unsigned long GPIO_IRQ_level_low; | ||
265 | static unsigned long GPIO_IRQ_level_high; | ||
266 | |||
267 | static void update_gpio_int_csrs(void) | ||
268 | { | ||
269 | ixp2000_reg_write(IXP2000_GPIO_FEDR, GPIO_IRQ_falling_edge); | ||
270 | ixp2000_reg_write(IXP2000_GPIO_REDR, GPIO_IRQ_rising_edge); | ||
271 | ixp2000_reg_write(IXP2000_GPIO_LSLR, GPIO_IRQ_level_low); | ||
272 | ixp2000_reg_wrb(IXP2000_GPIO_LSHR, GPIO_IRQ_level_high); | ||
273 | } | ||
274 | |||
275 | void gpio_line_config(int line, int direction) | ||
276 | { | ||
277 | unsigned long flags; | ||
278 | |||
279 | local_irq_save(flags); | ||
280 | if (direction == GPIO_OUT) { | ||
281 | /* if it's an output, it ain't an interrupt anymore */ | ||
282 | GPIO_IRQ_falling_edge &= ~(1 << line); | ||
283 | GPIO_IRQ_rising_edge &= ~(1 << line); | ||
284 | GPIO_IRQ_level_low &= ~(1 << line); | ||
285 | GPIO_IRQ_level_high &= ~(1 << line); | ||
286 | update_gpio_int_csrs(); | ||
287 | |||
288 | ixp2000_reg_wrb(IXP2000_GPIO_PDSR, 1 << line); | ||
289 | } else if (direction == GPIO_IN) { | ||
290 | ixp2000_reg_wrb(IXP2000_GPIO_PDCR, 1 << line); | ||
291 | } | ||
292 | local_irq_restore(flags); | ||
293 | } | ||
294 | EXPORT_SYMBOL(gpio_line_config); | ||
295 | |||
296 | |||
297 | /************************************************************************* | ||
298 | * IRQ handling IXP2000 | ||
299 | *************************************************************************/ | ||
300 | static void ixp2000_GPIO_irq_handler(unsigned int irq, struct irq_desc *desc) | ||
301 | { | ||
302 | int i; | ||
303 | unsigned long status = *IXP2000_GPIO_INST; | ||
304 | |||
305 | for (i = 0; i <= 7; i++) { | ||
306 | if (status & (1<<i)) { | ||
307 | generic_handle_irq(i + IRQ_IXP2000_GPIO0); | ||
308 | } | ||
309 | } | ||
310 | } | ||
311 | |||
312 | static int ixp2000_GPIO_irq_type(struct irq_data *d, unsigned int type) | ||
313 | { | ||
314 | int line = d->irq - IRQ_IXP2000_GPIO0; | ||
315 | |||
316 | /* | ||
317 | * First, configure this GPIO line as an input. | ||
318 | */ | ||
319 | ixp2000_reg_write(IXP2000_GPIO_PDCR, 1 << line); | ||
320 | |||
321 | /* | ||
322 | * Then, set the proper trigger type. | ||
323 | */ | ||
324 | if (type & IRQ_TYPE_EDGE_FALLING) | ||
325 | GPIO_IRQ_falling_edge |= 1 << line; | ||
326 | else | ||
327 | GPIO_IRQ_falling_edge &= ~(1 << line); | ||
328 | if (type & IRQ_TYPE_EDGE_RISING) | ||
329 | GPIO_IRQ_rising_edge |= 1 << line; | ||
330 | else | ||
331 | GPIO_IRQ_rising_edge &= ~(1 << line); | ||
332 | if (type & IRQ_TYPE_LEVEL_LOW) | ||
333 | GPIO_IRQ_level_low |= 1 << line; | ||
334 | else | ||
335 | GPIO_IRQ_level_low &= ~(1 << line); | ||
336 | if (type & IRQ_TYPE_LEVEL_HIGH) | ||
337 | GPIO_IRQ_level_high |= 1 << line; | ||
338 | else | ||
339 | GPIO_IRQ_level_high &= ~(1 << line); | ||
340 | update_gpio_int_csrs(); | ||
341 | |||
342 | return 0; | ||
343 | } | ||
344 | |||
345 | static void ixp2000_GPIO_irq_mask_ack(struct irq_data *d) | ||
346 | { | ||
347 | unsigned int irq = d->irq; | ||
348 | |||
349 | ixp2000_reg_write(IXP2000_GPIO_INCR, (1 << (irq - IRQ_IXP2000_GPIO0))); | ||
350 | |||
351 | ixp2000_reg_write(IXP2000_GPIO_EDSR, (1 << (irq - IRQ_IXP2000_GPIO0))); | ||
352 | ixp2000_reg_write(IXP2000_GPIO_LDSR, (1 << (irq - IRQ_IXP2000_GPIO0))); | ||
353 | ixp2000_reg_wrb(IXP2000_GPIO_INST, (1 << (irq - IRQ_IXP2000_GPIO0))); | ||
354 | } | ||
355 | |||
356 | static void ixp2000_GPIO_irq_mask(struct irq_data *d) | ||
357 | { | ||
358 | unsigned int irq = d->irq; | ||
359 | |||
360 | ixp2000_reg_wrb(IXP2000_GPIO_INCR, (1 << (irq - IRQ_IXP2000_GPIO0))); | ||
361 | } | ||
362 | |||
363 | static void ixp2000_GPIO_irq_unmask(struct irq_data *d) | ||
364 | { | ||
365 | unsigned int irq = d->irq; | ||
366 | |||
367 | ixp2000_reg_write(IXP2000_GPIO_INSR, (1 << (irq - IRQ_IXP2000_GPIO0))); | ||
368 | } | ||
369 | |||
370 | static struct irq_chip ixp2000_GPIO_irq_chip = { | ||
371 | .irq_ack = ixp2000_GPIO_irq_mask_ack, | ||
372 | .irq_mask = ixp2000_GPIO_irq_mask, | ||
373 | .irq_unmask = ixp2000_GPIO_irq_unmask, | ||
374 | .irq_set_type = ixp2000_GPIO_irq_type, | ||
375 | }; | ||
376 | |||
377 | static void ixp2000_pci_irq_mask(struct irq_data *d) | ||
378 | { | ||
379 | unsigned long temp = *IXP2000_PCI_XSCALE_INT_ENABLE; | ||
380 | if (d->irq == IRQ_IXP2000_PCIA) | ||
381 | ixp2000_reg_wrb(IXP2000_PCI_XSCALE_INT_ENABLE, (temp & ~(1 << 26))); | ||
382 | else if (d->irq == IRQ_IXP2000_PCIB) | ||
383 | ixp2000_reg_wrb(IXP2000_PCI_XSCALE_INT_ENABLE, (temp & ~(1 << 27))); | ||
384 | } | ||
385 | |||
386 | static void ixp2000_pci_irq_unmask(struct irq_data *d) | ||
387 | { | ||
388 | unsigned long temp = *IXP2000_PCI_XSCALE_INT_ENABLE; | ||
389 | if (d->irq == IRQ_IXP2000_PCIA) | ||
390 | ixp2000_reg_write(IXP2000_PCI_XSCALE_INT_ENABLE, (temp | (1 << 26))); | ||
391 | else if (d->irq == IRQ_IXP2000_PCIB) | ||
392 | ixp2000_reg_write(IXP2000_PCI_XSCALE_INT_ENABLE, (temp | (1 << 27))); | ||
393 | } | ||
394 | |||
395 | /* | ||
396 | * Error interrupts. These are used extensively by the microengine drivers | ||
397 | */ | ||
398 | static void ixp2000_err_irq_handler(unsigned int irq, struct irq_desc *desc) | ||
399 | { | ||
400 | int i; | ||
401 | unsigned long status = *IXP2000_IRQ_ERR_STATUS; | ||
402 | |||
403 | for(i = 31; i >= 0; i--) { | ||
404 | if(status & (1 << i)) { | ||
405 | generic_handle_irq(IRQ_IXP2000_DRAM0_MIN_ERR + i); | ||
406 | } | ||
407 | } | ||
408 | } | ||
409 | |||
410 | static void ixp2000_err_irq_mask(struct irq_data *d) | ||
411 | { | ||
412 | ixp2000_reg_write(IXP2000_IRQ_ERR_ENABLE_CLR, | ||
413 | (1 << (d->irq - IRQ_IXP2000_DRAM0_MIN_ERR))); | ||
414 | } | ||
415 | |||
416 | static void ixp2000_err_irq_unmask(struct irq_data *d) | ||
417 | { | ||
418 | ixp2000_reg_write(IXP2000_IRQ_ERR_ENABLE_SET, | ||
419 | (1 << (d->irq - IRQ_IXP2000_DRAM0_MIN_ERR))); | ||
420 | } | ||
421 | |||
422 | static struct irq_chip ixp2000_err_irq_chip = { | ||
423 | .irq_ack = ixp2000_err_irq_mask, | ||
424 | .irq_mask = ixp2000_err_irq_mask, | ||
425 | .irq_unmask = ixp2000_err_irq_unmask | ||
426 | }; | ||
427 | |||
428 | static struct irq_chip ixp2000_pci_irq_chip = { | ||
429 | .irq_ack = ixp2000_pci_irq_mask, | ||
430 | .irq_mask = ixp2000_pci_irq_mask, | ||
431 | .irq_unmask = ixp2000_pci_irq_unmask | ||
432 | }; | ||
433 | |||
434 | static void ixp2000_irq_mask(struct irq_data *d) | ||
435 | { | ||
436 | ixp2000_reg_wrb(IXP2000_IRQ_ENABLE_CLR, (1 << d->irq)); | ||
437 | } | ||
438 | |||
439 | static void ixp2000_irq_unmask(struct irq_data *d) | ||
440 | { | ||
441 | ixp2000_reg_write(IXP2000_IRQ_ENABLE_SET, (1 << d->irq)); | ||
442 | } | ||
443 | |||
444 | static struct irq_chip ixp2000_irq_chip = { | ||
445 | .irq_ack = ixp2000_irq_mask, | ||
446 | .irq_mask = ixp2000_irq_mask, | ||
447 | .irq_unmask = ixp2000_irq_unmask | ||
448 | }; | ||
449 | |||
450 | void __init ixp2000_init_irq(void) | ||
451 | { | ||
452 | int irq; | ||
453 | |||
454 | /* | ||
455 | * Mask all sources | ||
456 | */ | ||
457 | ixp2000_reg_write(IXP2000_IRQ_ENABLE_CLR, 0xffffffff); | ||
458 | ixp2000_reg_write(IXP2000_FIQ_ENABLE_CLR, 0xffffffff); | ||
459 | |||
460 | /* clear all GPIO edge/level detects */ | ||
461 | ixp2000_reg_write(IXP2000_GPIO_REDR, 0); | ||
462 | ixp2000_reg_write(IXP2000_GPIO_FEDR, 0); | ||
463 | ixp2000_reg_write(IXP2000_GPIO_LSHR, 0); | ||
464 | ixp2000_reg_write(IXP2000_GPIO_LSLR, 0); | ||
465 | ixp2000_reg_write(IXP2000_GPIO_INCR, -1); | ||
466 | |||
467 | /* clear PCI interrupt sources */ | ||
468 | ixp2000_reg_wrb(IXP2000_PCI_XSCALE_INT_ENABLE, 0); | ||
469 | |||
470 | /* | ||
471 | * Certain bits in the IRQ status register of the | ||
472 | * IXP2000 are reserved. Instead of trying to map | ||
473 | * things non 1:1 from bit position to IRQ number, | ||
474 | * we mark the reserved IRQs as invalid. This makes | ||
475 | * our mask/unmask code much simpler. | ||
476 | */ | ||
477 | for (irq = IRQ_IXP2000_SOFT_INT; irq <= IRQ_IXP2000_THDB3; irq++) { | ||
478 | if ((1 << irq) & IXP2000_VALID_IRQ_MASK) { | ||
479 | irq_set_chip_and_handler(irq, &ixp2000_irq_chip, | ||
480 | handle_level_irq); | ||
481 | set_irq_flags(irq, IRQF_VALID); | ||
482 | } else set_irq_flags(irq, 0); | ||
483 | } | ||
484 | |||
485 | for (irq = IRQ_IXP2000_DRAM0_MIN_ERR; irq <= IRQ_IXP2000_SP_INT; irq++) { | ||
486 | if((1 << (irq - IRQ_IXP2000_DRAM0_MIN_ERR)) & | ||
487 | IXP2000_VALID_ERR_IRQ_MASK) { | ||
488 | irq_set_chip_and_handler(irq, &ixp2000_err_irq_chip, | ||
489 | handle_level_irq); | ||
490 | set_irq_flags(irq, IRQF_VALID); | ||
491 | } | ||
492 | else | ||
493 | set_irq_flags(irq, 0); | ||
494 | } | ||
495 | irq_set_chained_handler(IRQ_IXP2000_ERRSUM, ixp2000_err_irq_handler); | ||
496 | |||
497 | for (irq = IRQ_IXP2000_GPIO0; irq <= IRQ_IXP2000_GPIO7; irq++) { | ||
498 | irq_set_chip_and_handler(irq, &ixp2000_GPIO_irq_chip, | ||
499 | handle_level_irq); | ||
500 | set_irq_flags(irq, IRQF_VALID); | ||
501 | } | ||
502 | irq_set_chained_handler(IRQ_IXP2000_GPIO, ixp2000_GPIO_irq_handler); | ||
503 | |||
504 | /* | ||
505 | * Enable PCI irqs. The actual PCI[AB] decoding is done in | ||
506 | * entry-macro.S, so we don't need a chained handler for the | ||
507 | * PCI interrupt source. | ||
508 | */ | ||
509 | ixp2000_reg_write(IXP2000_IRQ_ENABLE_SET, (1 << IRQ_IXP2000_PCI)); | ||
510 | for (irq = IRQ_IXP2000_PCIA; irq <= IRQ_IXP2000_PCIB; irq++) { | ||
511 | irq_set_chip_and_handler(irq, &ixp2000_pci_irq_chip, | ||
512 | handle_level_irq); | ||
513 | set_irq_flags(irq, IRQF_VALID); | ||
514 | } | ||
515 | } | ||
516 | |||
517 | void ixp2000_restart(char mode, const char *cmd) | ||
518 | { | ||
519 | ixp2000_reg_wrb(IXP2000_RESET0, RSTALL); | ||
520 | } | ||
diff --git a/arch/arm/mach-ixp2000/enp2611.c b/arch/arm/mach-ixp2000/enp2611.c deleted file mode 100644 index 4867f408617..00000000000 --- a/arch/arm/mach-ixp2000/enp2611.c +++ /dev/null | |||
@@ -1,265 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/enp2611.c | ||
3 | * | ||
4 | * Radisys ENP-2611 support. | ||
5 | * | ||
6 | * Created 2004 by Lennert Buytenhek from the ixdp2x01 code. The | ||
7 | * original version carries the following notices: | ||
8 | * | ||
9 | * Original Author: Andrzej Mialkowski <andrzej.mialkowski@intel.com> | ||
10 | * Maintainer: Deepak Saxena <dsaxena@plexity.net> | ||
11 | * | ||
12 | * Copyright (C) 2002-2003 Intel Corp. | ||
13 | * Copyright (C) 2003-2004 MontaVista Software, Inc. | ||
14 | * | ||
15 | * This program is free software; you can redistribute it and/or modify it | ||
16 | * under the terms of the GNU General Public License as published by the | ||
17 | * Free Software Foundation; either version 2 of the License, or (at your | ||
18 | * option) any later version. | ||
19 | */ | ||
20 | |||
21 | #include <linux/kernel.h> | ||
22 | #include <linux/init.h> | ||
23 | #include <linux/mm.h> | ||
24 | #include <linux/sched.h> | ||
25 | #include <linux/interrupt.h> | ||
26 | #include <linux/bitops.h> | ||
27 | #include <linux/pci.h> | ||
28 | #include <linux/ioport.h> | ||
29 | #include <linux/delay.h> | ||
30 | #include <linux/serial.h> | ||
31 | #include <linux/tty.h> | ||
32 | #include <linux/serial_core.h> | ||
33 | #include <linux/platform_device.h> | ||
34 | #include <linux/io.h> | ||
35 | |||
36 | #include <asm/irq.h> | ||
37 | #include <asm/pgtable.h> | ||
38 | #include <asm/page.h> | ||
39 | #include <mach/hardware.h> | ||
40 | #include <asm/mach-types.h> | ||
41 | |||
42 | #include <asm/mach/pci.h> | ||
43 | #include <asm/mach/map.h> | ||
44 | #include <asm/mach/irq.h> | ||
45 | #include <asm/mach/time.h> | ||
46 | #include <asm/mach/arch.h> | ||
47 | #include <asm/mach/flash.h> | ||
48 | |||
49 | /************************************************************************* | ||
50 | * ENP-2611 timer tick configuration | ||
51 | *************************************************************************/ | ||
52 | static void __init enp2611_timer_init(void) | ||
53 | { | ||
54 | ixp2000_init_time(50 * 1000 * 1000); | ||
55 | } | ||
56 | |||
57 | static struct sys_timer enp2611_timer = { | ||
58 | .init = enp2611_timer_init, | ||
59 | .offset = ixp2000_gettimeoffset, | ||
60 | }; | ||
61 | |||
62 | |||
63 | /************************************************************************* | ||
64 | * ENP-2611 I/O | ||
65 | *************************************************************************/ | ||
66 | static struct map_desc enp2611_io_desc[] __initdata = { | ||
67 | { | ||
68 | .virtual = ENP2611_CALEB_VIRT_BASE, | ||
69 | .pfn = __phys_to_pfn(ENP2611_CALEB_PHYS_BASE), | ||
70 | .length = ENP2611_CALEB_SIZE, | ||
71 | .type = MT_DEVICE, | ||
72 | }, { | ||
73 | .virtual = ENP2611_PM3386_0_VIRT_BASE, | ||
74 | .pfn = __phys_to_pfn(ENP2611_PM3386_0_PHYS_BASE), | ||
75 | .length = ENP2611_PM3386_0_SIZE, | ||
76 | .type = MT_DEVICE, | ||
77 | }, { | ||
78 | .virtual = ENP2611_PM3386_1_VIRT_BASE, | ||
79 | .pfn = __phys_to_pfn(ENP2611_PM3386_1_PHYS_BASE), | ||
80 | .length = ENP2611_PM3386_1_SIZE, | ||
81 | .type = MT_DEVICE, | ||
82 | } | ||
83 | }; | ||
84 | |||
85 | void __init enp2611_map_io(void) | ||
86 | { | ||
87 | ixp2000_map_io(); | ||
88 | iotable_init(enp2611_io_desc, ARRAY_SIZE(enp2611_io_desc)); | ||
89 | } | ||
90 | |||
91 | |||
92 | /************************************************************************* | ||
93 | * ENP-2611 PCI | ||
94 | *************************************************************************/ | ||
95 | static int enp2611_pci_setup(int nr, struct pci_sys_data *sys) | ||
96 | { | ||
97 | sys->mem_offset = 0xe0000000; | ||
98 | ixp2000_pci_setup(nr, sys); | ||
99 | return 1; | ||
100 | } | ||
101 | |||
102 | static void __init enp2611_pci_preinit(void) | ||
103 | { | ||
104 | ixp2000_reg_write(IXP2000_PCI_ADDR_EXT, 0x00100000); | ||
105 | ixp2000_pci_preinit(); | ||
106 | pcibios_setup("firmware"); | ||
107 | } | ||
108 | |||
109 | static inline int enp2611_pci_valid_device(struct pci_bus *bus, | ||
110 | unsigned int devfn) | ||
111 | { | ||
112 | /* The 82559 ethernet controller appears at both PCI:1:0:0 and | ||
113 | * PCI:1:2:0, so let's pretend the second one isn't there. | ||
114 | */ | ||
115 | if (bus->number == 0x01 && devfn == 0x10) | ||
116 | return 0; | ||
117 | |||
118 | return 1; | ||
119 | } | ||
120 | |||
121 | static int enp2611_pci_read_config(struct pci_bus *bus, unsigned int devfn, | ||
122 | int where, int size, u32 *value) | ||
123 | { | ||
124 | if (enp2611_pci_valid_device(bus, devfn)) | ||
125 | return ixp2000_pci_read_config(bus, devfn, where, size, value); | ||
126 | |||
127 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
128 | } | ||
129 | |||
130 | static int enp2611_pci_write_config(struct pci_bus *bus, unsigned int devfn, | ||
131 | int where, int size, u32 value) | ||
132 | { | ||
133 | if (enp2611_pci_valid_device(bus, devfn)) | ||
134 | return ixp2000_pci_write_config(bus, devfn, where, size, value); | ||
135 | |||
136 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
137 | } | ||
138 | |||
139 | static struct pci_ops enp2611_pci_ops = { | ||
140 | .read = enp2611_pci_read_config, | ||
141 | .write = enp2611_pci_write_config | ||
142 | }; | ||
143 | |||
144 | static struct pci_bus * __init enp2611_pci_scan_bus(int nr, | ||
145 | struct pci_sys_data *sys) | ||
146 | { | ||
147 | return pci_scan_root_bus(NULL, sys->busnr, &enp2611_pci_ops, sys, | ||
148 | &sys->resources); | ||
149 | } | ||
150 | |||
151 | static int __init enp2611_pci_map_irq(const struct pci_dev *dev, u8 slot, | ||
152 | u8 pin) | ||
153 | { | ||
154 | int irq; | ||
155 | |||
156 | if (dev->bus->number == 0 && PCI_SLOT(dev->devfn) == 0) { | ||
157 | /* IXP2400. */ | ||
158 | irq = IRQ_IXP2000_PCIA; | ||
159 | } else if (dev->bus->number == 0 && PCI_SLOT(dev->devfn) == 1) { | ||
160 | /* 21555 non-transparent bridge. */ | ||
161 | irq = IRQ_IXP2000_PCIB; | ||
162 | } else if (dev->bus->number == 0 && PCI_SLOT(dev->devfn) == 4) { | ||
163 | /* PCI2050B transparent bridge. */ | ||
164 | irq = -1; | ||
165 | } else if (dev->bus->number == 1 && PCI_SLOT(dev->devfn) == 0) { | ||
166 | /* 82559 ethernet. */ | ||
167 | irq = IRQ_IXP2000_PCIA; | ||
168 | } else if (dev->bus->number == 1 && PCI_SLOT(dev->devfn) == 1) { | ||
169 | /* SPI-3 option board. */ | ||
170 | irq = IRQ_IXP2000_PCIB; | ||
171 | } else { | ||
172 | printk(KERN_ERR "enp2611_pci_map_irq() called for unknown " | ||
173 | "device PCI:%d:%d:%d\n", dev->bus->number, | ||
174 | PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn)); | ||
175 | irq = -1; | ||
176 | } | ||
177 | |||
178 | return irq; | ||
179 | } | ||
180 | |||
181 | struct hw_pci enp2611_pci __initdata = { | ||
182 | .nr_controllers = 1, | ||
183 | .setup = enp2611_pci_setup, | ||
184 | .preinit = enp2611_pci_preinit, | ||
185 | .scan = enp2611_pci_scan_bus, | ||
186 | .map_irq = enp2611_pci_map_irq, | ||
187 | }; | ||
188 | |||
189 | int __init enp2611_pci_init(void) | ||
190 | { | ||
191 | if (machine_is_enp2611()) | ||
192 | pci_common_init(&enp2611_pci); | ||
193 | |||
194 | return 0; | ||
195 | } | ||
196 | |||
197 | subsys_initcall(enp2611_pci_init); | ||
198 | |||
199 | |||
200 | /************************************************************************* | ||
201 | * ENP-2611 Machine Initialization | ||
202 | *************************************************************************/ | ||
203 | static struct flash_platform_data enp2611_flash_platform_data = { | ||
204 | .map_name = "cfi_probe", | ||
205 | .width = 1, | ||
206 | }; | ||
207 | |||
208 | static struct ixp2000_flash_data enp2611_flash_data = { | ||
209 | .platform_data = &enp2611_flash_platform_data, | ||
210 | .nr_banks = 1 | ||
211 | }; | ||
212 | |||
213 | static struct resource enp2611_flash_resource = { | ||
214 | .start = 0xc4000000, | ||
215 | .end = 0xc4000000 + 0x00ffffff, | ||
216 | .flags = IORESOURCE_MEM, | ||
217 | }; | ||
218 | |||
219 | static struct platform_device enp2611_flash = { | ||
220 | .name = "IXP2000-Flash", | ||
221 | .id = 0, | ||
222 | .dev = { | ||
223 | .platform_data = &enp2611_flash_data, | ||
224 | }, | ||
225 | .num_resources = 1, | ||
226 | .resource = &enp2611_flash_resource, | ||
227 | }; | ||
228 | |||
229 | static struct ixp2000_i2c_pins enp2611_i2c_gpio_pins = { | ||
230 | .sda_pin = ENP2611_GPIO_SDA, | ||
231 | .scl_pin = ENP2611_GPIO_SCL, | ||
232 | }; | ||
233 | |||
234 | static struct platform_device enp2611_i2c_controller = { | ||
235 | .name = "IXP2000-I2C", | ||
236 | .id = 0, | ||
237 | .dev = { | ||
238 | .platform_data = &enp2611_i2c_gpio_pins | ||
239 | }, | ||
240 | .num_resources = 0 | ||
241 | }; | ||
242 | |||
243 | static struct platform_device *enp2611_devices[] __initdata = { | ||
244 | &enp2611_flash, | ||
245 | &enp2611_i2c_controller | ||
246 | }; | ||
247 | |||
248 | static void __init enp2611_init_machine(void) | ||
249 | { | ||
250 | platform_add_devices(enp2611_devices, ARRAY_SIZE(enp2611_devices)); | ||
251 | ixp2000_uart_init(); | ||
252 | } | ||
253 | |||
254 | |||
255 | MACHINE_START(ENP2611, "Radisys ENP-2611 PCI network processor board") | ||
256 | /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */ | ||
257 | .atag_offset = 0x100, | ||
258 | .map_io = enp2611_map_io, | ||
259 | .init_irq = ixp2000_init_irq, | ||
260 | .timer = &enp2611_timer, | ||
261 | .init_machine = enp2611_init_machine, | ||
262 | .restart = ixp2000_restart, | ||
263 | MACHINE_END | ||
264 | |||
265 | |||
diff --git a/arch/arm/mach-ixp2000/include/mach/debug-macro.S b/arch/arm/mach-ixp2000/include/mach/debug-macro.S deleted file mode 100644 index bdd3ccdc289..00000000000 --- a/arch/arm/mach-ixp2000/include/mach/debug-macro.S +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | /* arch/arm/mach-ixp2000/include/mach/debug-macro.S | ||
2 | * | ||
3 | * Debugging macro include header | ||
4 | * | ||
5 | * Copyright (C) 1994-1999 Russell King | ||
6 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | .macro addruart, rp, rv, tmp | ||
15 | mov \rp, #0x00030000 | ||
16 | #ifdef __ARMEB__ | ||
17 | orr \rp, \rp, #0x00000003 | ||
18 | #endif | ||
19 | orr \rv, \rp, #0xfe000000 @ virtual base | ||
20 | orr \rv, \rv, #0x00f00000 | ||
21 | orr \rp, \rp, #0xc0000000 @ Physical base | ||
22 | .endm | ||
23 | |||
24 | #define UART_SHIFT 2 | ||
25 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/arch/arm/mach-ixp2000/include/mach/enp2611.h b/arch/arm/mach-ixp2000/include/mach/enp2611.h deleted file mode 100644 index 9ce3690061d..00000000000 --- a/arch/arm/mach-ixp2000/include/mach/enp2611.h +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/include/mach/enp2611.h | ||
3 | * | ||
4 | * Register and other defines for Radisys ENP-2611 | ||
5 | * | ||
6 | * Created 2004 by Lennert Buytenhek from the ixdp2x01 code. The | ||
7 | * original version carries the following notices: | ||
8 | * | ||
9 | * Original Author: Naeem Afzal <naeem.m.afzal@intel.com> | ||
10 | * Maintainer: Deepak Saxena <dsaxena@plexity.net> | ||
11 | * | ||
12 | * Copyright (C) 2002 Intel Corp. | ||
13 | * Copyright (C) 2003-2004 MontaVista Software, Inc. | ||
14 | * | ||
15 | * This program is free software; you can redistribute it and/or modify it | ||
16 | * under the terms of the GNU General Public License as published by the | ||
17 | * Free Software Foundation; either version 2 of the License, or (at your | ||
18 | * option) any later version. | ||
19 | */ | ||
20 | |||
21 | #ifndef __ENP2611_H | ||
22 | #define __ENP2611_H | ||
23 | |||
24 | #define ENP2611_CALEB_PHYS_BASE 0xc5000000 | ||
25 | #define ENP2611_CALEB_VIRT_BASE 0xfe000000 | ||
26 | #define ENP2611_CALEB_SIZE 0x00100000 | ||
27 | |||
28 | #define ENP2611_PM3386_0_PHYS_BASE 0xc6000000 | ||
29 | #define ENP2611_PM3386_0_VIRT_BASE 0xfe100000 | ||
30 | #define ENP2611_PM3386_0_SIZE 0x00100000 | ||
31 | |||
32 | #define ENP2611_PM3386_1_PHYS_BASE 0xc6400000 | ||
33 | #define ENP2611_PM3386_1_VIRT_BASE 0xfe200000 | ||
34 | #define ENP2611_PM3386_1_SIZE 0x00100000 | ||
35 | |||
36 | #define ENP2611_GPIO_SCL 7 | ||
37 | #define ENP2611_GPIO_SDA 6 | ||
38 | |||
39 | #define IRQ_ENP2611_THERMAL IRQ_IXP2000_GPIO4 | ||
40 | #define IRQ_ENP2611_OPTION_BOARD IRQ_IXP2000_GPIO3 | ||
41 | #define IRQ_ENP2611_CALEB IRQ_IXP2000_GPIO2 | ||
42 | #define IRQ_ENP2611_PM3386_1 IRQ_IXP2000_GPIO1 | ||
43 | #define IRQ_ENP2611_PM3386_0 IRQ_IXP2000_GPIO0 | ||
44 | |||
45 | |||
46 | #endif | ||
diff --git a/arch/arm/mach-ixp2000/include/mach/entry-macro.S b/arch/arm/mach-ixp2000/include/mach/entry-macro.S deleted file mode 100644 index c4444dff920..00000000000 --- a/arch/arm/mach-ixp2000/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/include/mach/entry-macro.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for IXP2000-based platforms | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | #include <mach/irqs.h> | ||
11 | |||
12 | .macro get_irqnr_preamble, base, tmp | ||
13 | .endm | ||
14 | |||
15 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
16 | |||
17 | mov \irqnr, #0x0 @clear out irqnr as default | ||
18 | mov \base, #0xfe000000 | ||
19 | orr \base, \base, #0x00e00000 | ||
20 | orr \base, \base, #0x08 | ||
21 | ldr \irqstat, [\base] @ get interrupts | ||
22 | |||
23 | cmp \irqstat, #0 | ||
24 | beq 1001f | ||
25 | |||
26 | clz \irqnr, \irqstat | ||
27 | mov \base, #31 | ||
28 | subs \irqnr, \base, \irqnr | ||
29 | |||
30 | /* | ||
31 | * We handle PCIA and PCIB here so we don't have an | ||
32 | * extra layer of code just to check these two bits. | ||
33 | */ | ||
34 | cmp \irqnr, #IRQ_IXP2000_PCI | ||
35 | bne 1001f | ||
36 | |||
37 | mov \base, #0xfe000000 | ||
38 | orr \base, \base, #0x00c00000 | ||
39 | orr \base, \base, #0x00000100 | ||
40 | orr \base, \base, #0x00000058 | ||
41 | ldr \irqstat, [\base] | ||
42 | |||
43 | mov \tmp, #(1<<26) | ||
44 | tst \irqstat, \tmp | ||
45 | movne \irqnr, #IRQ_IXP2000_PCIA | ||
46 | bne 1001f | ||
47 | |||
48 | mov \tmp, #(1<<27) | ||
49 | tst \irqstat, \tmp | ||
50 | movne \irqnr, #IRQ_IXP2000_PCIB | ||
51 | |||
52 | 1001: | ||
53 | .endm | ||
54 | |||
diff --git a/arch/arm/mach-ixp2000/include/mach/gpio-ixp2000.h b/arch/arm/mach-ixp2000/include/mach/gpio-ixp2000.h deleted file mode 100644 index af836c76c3f..00000000000 --- a/arch/arm/mach-ixp2000/include/mach/gpio-ixp2000.h +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/include/mach/gpio.h | ||
3 | * | ||
4 | * Copyright (C) 2002 Intel Corporation. | ||
5 | * | ||
6 | * This program is free software, you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | /* | ||
12 | * IXP2000 GPIO in/out, edge/level detection for IRQs: | ||
13 | * IRQs are generated on Falling-edge, Rising-Edge, Level-low, Level-High | ||
14 | * or both Falling-edge and Rising-edge. | ||
15 | * This must be called *before* the corresponding IRQ is registerd. | ||
16 | * Use this instead of directly setting the GPIO registers. | ||
17 | * GPIOs may also be used as GPIOs (e.g. for emulating i2c/smb) | ||
18 | */ | ||
19 | #ifndef __ASM_ARCH_GPIO_H | ||
20 | #define __ASM_ARCH_GPIO_H | ||
21 | |||
22 | #ifndef __ASSEMBLY__ | ||
23 | |||
24 | #define GPIO_IN 0 | ||
25 | #define GPIO_OUT 1 | ||
26 | |||
27 | #define IXP2000_GPIO_LOW 0 | ||
28 | #define IXP2000_GPIO_HIGH 1 | ||
29 | |||
30 | extern void gpio_line_config(int line, int direction); | ||
31 | |||
32 | static inline int gpio_line_get(int line) | ||
33 | { | ||
34 | return (((*IXP2000_GPIO_PLR) >> line) & 1); | ||
35 | } | ||
36 | |||
37 | static inline void gpio_line_set(int line, int value) | ||
38 | { | ||
39 | if (value == IXP2000_GPIO_HIGH) { | ||
40 | ixp2000_reg_write(IXP2000_GPIO_POSR, 1 << line); | ||
41 | } else if (value == IXP2000_GPIO_LOW) { | ||
42 | ixp2000_reg_write(IXP2000_GPIO_POCR, 1 << line); | ||
43 | } | ||
44 | } | ||
45 | |||
46 | #endif /* !__ASSEMBLY__ */ | ||
47 | |||
48 | #endif /* ASM_ARCH_IXP2000_GPIO_H_ */ | ||
diff --git a/arch/arm/mach-ixp2000/include/mach/hardware.h b/arch/arm/mach-ixp2000/include/mach/hardware.h deleted file mode 100644 index cdaf1db8400..00000000000 --- a/arch/arm/mach-ixp2000/include/mach/hardware.h +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/include/mach/hardware.h | ||
3 | * | ||
4 | * Hardware definitions for IXP2400/2800 based systems | ||
5 | * | ||
6 | * Original Author: Naeem M Afzal <naeem.m.afzal@intel.com> | ||
7 | * | ||
8 | * Maintainer: Deepak Saxena <dsaxena@mvista.com> | ||
9 | * | ||
10 | * Copyright (C) 2001-2002 Intel Corp. | ||
11 | * Copyright (C) 2003-2004 MontaVista Software, Inc. | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or modify it | ||
14 | * under the terms of the GNU General Public License as published by the | ||
15 | * Free Software Foundation; either version 2 of the License, or (at your | ||
16 | * option) any later version. | ||
17 | */ | ||
18 | |||
19 | #ifndef __ASM_ARCH_HARDWARE_H__ | ||
20 | #define __ASM_ARCH_HARDWARE_H__ | ||
21 | |||
22 | #include "ixp2000-regs.h" /* Chipset Registers */ | ||
23 | |||
24 | /* | ||
25 | * Platform helper functions | ||
26 | */ | ||
27 | #include "platform.h" | ||
28 | |||
29 | /* | ||
30 | * Platform-specific bits | ||
31 | */ | ||
32 | #include "enp2611.h" /* ENP-2611 */ | ||
33 | #include "ixdp2x00.h" /* IXDP2400/2800 */ | ||
34 | #include "ixdp2x01.h" /* IXDP2401/2801 */ | ||
35 | |||
36 | #endif /* _ASM_ARCH_HARDWARE_H__ */ | ||
diff --git a/arch/arm/mach-ixp2000/include/mach/io.h b/arch/arm/mach-ixp2000/include/mach/io.h deleted file mode 100644 index f6552d6f35a..00000000000 --- a/arch/arm/mach-ixp2000/include/mach/io.h +++ /dev/null | |||
@@ -1,133 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/include/mach/io.h | ||
3 | * | ||
4 | * Original Author: Naeem M Afzal <naeem.m.afzal@intel.com> | ||
5 | * Maintainer: Deepak Saxena <dsaxena@plexity.net> | ||
6 | * | ||
7 | * Copyright (C) 2002 Intel Corp. | ||
8 | * Copyrgiht (C) 2003-2004 MontaVista Software, Inc. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #ifndef __ASM_ARM_ARCH_IO_H | ||
16 | #define __ASM_ARM_ARCH_IO_H | ||
17 | |||
18 | #include <mach/hardware.h> | ||
19 | |||
20 | #define IO_SPACE_LIMIT 0xffffffff | ||
21 | |||
22 | /* | ||
23 | * The A? revisions of the IXP2000s assert byte lanes for PCI I/O | ||
24 | * transactions the other way round (MEM transactions don't have this | ||
25 | * issue), so if we want to support those models, we need to override | ||
26 | * the standard I/O functions. | ||
27 | * | ||
28 | * B0 and later have a bit that can be set to 1 to get the proper | ||
29 | * behavior for I/O transactions, which then allows us to use the | ||
30 | * standard I/O functions. This is what we do if the user does not | ||
31 | * explicitly ask for support for pre-B0. | ||
32 | */ | ||
33 | #ifdef CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO | ||
34 | #define ___io(p) ((void __iomem *)((p)+IXP2000_PCI_IO_VIRT_BASE)) | ||
35 | |||
36 | #define alignb(addr) (void __iomem *)((unsigned long)(addr) ^ 3) | ||
37 | #define alignw(addr) (void __iomem *)((unsigned long)(addr) ^ 2) | ||
38 | |||
39 | #define outb(v,p) __raw_writeb((v),alignb(___io(p))) | ||
40 | #define outw(v,p) __raw_writew((v),alignw(___io(p))) | ||
41 | #define outl(v,p) __raw_writel((v),___io(p)) | ||
42 | |||
43 | #define inb(p) ({ unsigned int __v = __raw_readb(alignb(___io(p))); __v; }) | ||
44 | #define inw(p) \ | ||
45 | ({ unsigned int __v = (__raw_readw(alignw(___io(p)))); __v; }) | ||
46 | #define inl(p) \ | ||
47 | ({ unsigned int __v = (__raw_readl(___io(p))); __v; }) | ||
48 | |||
49 | #define outsb(p,d,l) __raw_writesb(alignb(___io(p)),d,l) | ||
50 | #define outsw(p,d,l) __raw_writesw(alignw(___io(p)),d,l) | ||
51 | #define outsl(p,d,l) __raw_writesl(___io(p),d,l) | ||
52 | |||
53 | #define insb(p,d,l) __raw_readsb(alignb(___io(p)),d,l) | ||
54 | #define insw(p,d,l) __raw_readsw(alignw(___io(p)),d,l) | ||
55 | #define insl(p,d,l) __raw_readsl(___io(p),d,l) | ||
56 | |||
57 | #define __is_io_address(p) ((((unsigned long)(p)) & ~(IXP2000_PCI_IO_SIZE - 1)) == IXP2000_PCI_IO_VIRT_BASE) | ||
58 | |||
59 | #define ioread8(p) \ | ||
60 | ({ \ | ||
61 | unsigned int __v; \ | ||
62 | \ | ||
63 | if (__is_io_address(p)) { \ | ||
64 | __v = __raw_readb(alignb(p)); \ | ||
65 | } else { \ | ||
66 | __v = __raw_readb(p); \ | ||
67 | } \ | ||
68 | \ | ||
69 | __v; \ | ||
70 | }) \ | ||
71 | |||
72 | #define ioread16(p) \ | ||
73 | ({ \ | ||
74 | unsigned int __v; \ | ||
75 | \ | ||
76 | if (__is_io_address(p)) { \ | ||
77 | __v = __raw_readw(alignw(p)); \ | ||
78 | } else { \ | ||
79 | __v = le16_to_cpu(__raw_readw(p)); \ | ||
80 | } \ | ||
81 | \ | ||
82 | __v; \ | ||
83 | }) | ||
84 | |||
85 | #define ioread32(p) \ | ||
86 | ({ \ | ||
87 | unsigned int __v; \ | ||
88 | \ | ||
89 | if (__is_io_address(p)) { \ | ||
90 | __v = __raw_readl(p); \ | ||
91 | } else { \ | ||
92 | __v = le32_to_cpu(__raw_readl(p)); \ | ||
93 | } \ | ||
94 | \ | ||
95 | __v; \ | ||
96 | }) | ||
97 | |||
98 | #define iowrite8(v,p) \ | ||
99 | ({ \ | ||
100 | if (__is_io_address(p)) { \ | ||
101 | __raw_writeb((v), alignb(p)); \ | ||
102 | } else { \ | ||
103 | __raw_writeb((v), p); \ | ||
104 | } \ | ||
105 | }) | ||
106 | |||
107 | #define iowrite16(v,p) \ | ||
108 | ({ \ | ||
109 | if (__is_io_address(p)) { \ | ||
110 | __raw_writew((v), alignw(p)); \ | ||
111 | } else { \ | ||
112 | __raw_writew(cpu_to_le16(v), p); \ | ||
113 | } \ | ||
114 | }) | ||
115 | |||
116 | #define iowrite32(v,p) \ | ||
117 | ({ \ | ||
118 | if (__is_io_address(p)) { \ | ||
119 | __raw_writel((v), p); \ | ||
120 | } else { \ | ||
121 | __raw_writel(cpu_to_le32(v), p); \ | ||
122 | } \ | ||
123 | }) | ||
124 | |||
125 | #define ioport_map(port, nr) ___io(port) | ||
126 | |||
127 | #define ioport_unmap(addr) | ||
128 | #else | ||
129 | #define __io(p) ((void __iomem *)((p)+IXP2000_PCI_IO_VIRT_BASE)) | ||
130 | #endif | ||
131 | |||
132 | |||
133 | #endif | ||
diff --git a/arch/arm/mach-ixp2000/include/mach/irqs.h b/arch/arm/mach-ixp2000/include/mach/irqs.h deleted file mode 100644 index bee96bcafdc..00000000000 --- a/arch/arm/mach-ixp2000/include/mach/irqs.h +++ /dev/null | |||
@@ -1,207 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/include/mach/irqs.h | ||
3 | * | ||
4 | * Original Author: Naeem Afzal <naeem.m.afzal@intel.com> | ||
5 | * Maintainer: Deepak Saxena <dsaxena@plexity.net> | ||
6 | * | ||
7 | * Copyright (C) 2002 Intel Corp. | ||
8 | * Copyright (C) 2003-2004 MontaVista Software, Inc. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #ifndef _IRQS_H | ||
16 | #define _IRQS_H | ||
17 | |||
18 | /* | ||
19 | * Do NOT add #ifdef MACHINE_FOO in here. | ||
20 | * Simpy add your machine IRQs here and increase NR_IRQS if needed to | ||
21 | * hold your machine's IRQ table. | ||
22 | */ | ||
23 | |||
24 | /* | ||
25 | * Some interrupt numbers go unused b/c the IRQ mask/ummask/status | ||
26 | * register has those bit reserved. We just mark those interrupts | ||
27 | * as invalid and this allows us to do mask/unmask with a single | ||
28 | * shift operation instead of having to map the IRQ number to | ||
29 | * a HW IRQ number. | ||
30 | */ | ||
31 | #define IRQ_IXP2000_SOFT_INT 0 /* soft interrupt */ | ||
32 | #define IRQ_IXP2000_ERRSUM 1 /* OR of all bits in ErrorStatus reg*/ | ||
33 | #define IRQ_IXP2000_UART 2 | ||
34 | #define IRQ_IXP2000_GPIO 3 | ||
35 | #define IRQ_IXP2000_TIMER1 4 | ||
36 | #define IRQ_IXP2000_TIMER2 5 | ||
37 | #define IRQ_IXP2000_TIMER3 6 | ||
38 | #define IRQ_IXP2000_TIMER4 7 | ||
39 | #define IRQ_IXP2000_PMU 8 | ||
40 | #define IRQ_IXP2000_SPF 9 /* Slow port framer IRQ */ | ||
41 | #define IRQ_IXP2000_DMA1 10 | ||
42 | #define IRQ_IXP2000_DMA2 11 | ||
43 | #define IRQ_IXP2000_DMA3 12 | ||
44 | #define IRQ_IXP2000_PCI_DOORBELL 13 | ||
45 | #define IRQ_IXP2000_ME_ATTN 14 | ||
46 | #define IRQ_IXP2000_PCI 15 /* PCI INTA or INTB */ | ||
47 | #define IRQ_IXP2000_THDA0 16 /* thread 0-31A */ | ||
48 | #define IRQ_IXP2000_THDA1 17 /* thread 32-63A, IXP2800 only */ | ||
49 | #define IRQ_IXP2000_THDA2 18 /* thread 64-95A */ | ||
50 | #define IRQ_IXP2000_THDA3 19 /* thread 96-127A, IXP2800 only */ | ||
51 | #define IRQ_IXP2000_THDB0 24 /* thread 0-31B */ | ||
52 | #define IRQ_IXP2000_THDB1 25 /* thread 32-63B, IXP2800 only */ | ||
53 | #define IRQ_IXP2000_THDB2 26 /* thread 64-95B */ | ||
54 | #define IRQ_IXP2000_THDB3 27 /* thread 96-127B, IXP2800 only */ | ||
55 | |||
56 | /* define generic GPIOs */ | ||
57 | #define IRQ_IXP2000_GPIO0 32 | ||
58 | #define IRQ_IXP2000_GPIO1 33 | ||
59 | #define IRQ_IXP2000_GPIO2 34 | ||
60 | #define IRQ_IXP2000_GPIO3 35 | ||
61 | #define IRQ_IXP2000_GPIO4 36 | ||
62 | #define IRQ_IXP2000_GPIO5 37 | ||
63 | #define IRQ_IXP2000_GPIO6 38 | ||
64 | #define IRQ_IXP2000_GPIO7 39 | ||
65 | |||
66 | /* split off the 2 PCI sources */ | ||
67 | #define IRQ_IXP2000_PCIA 40 | ||
68 | #define IRQ_IXP2000_PCIB 41 | ||
69 | |||
70 | /* Int sources from IRQ_ERROR_STATUS */ | ||
71 | #define IRQ_IXP2000_DRAM0_MIN_ERR 42 | ||
72 | #define IRQ_IXP2000_DRAM0_MAJ_ERR 43 | ||
73 | #define IRQ_IXP2000_DRAM1_MIN_ERR 44 | ||
74 | #define IRQ_IXP2000_DRAM1_MAJ_ERR 45 | ||
75 | #define IRQ_IXP2000_DRAM2_MIN_ERR 46 | ||
76 | #define IRQ_IXP2000_DRAM2_MAJ_ERR 47 | ||
77 | /* 48-57 reserved */ | ||
78 | #define IRQ_IXP2000_SRAM0_ERR 58 | ||
79 | #define IRQ_IXP2000_SRAM1_ERR 59 | ||
80 | #define IRQ_IXP2000_SRAM2_ERR 60 | ||
81 | #define IRQ_IXP2000_SRAM3_ERR 61 | ||
82 | /* 62-65 reserved */ | ||
83 | #define IRQ_IXP2000_MEDIA_ERR 66 | ||
84 | #define IRQ_IXP2000_PCI_ERR 67 | ||
85 | #define IRQ_IXP2000_SP_INT 68 | ||
86 | |||
87 | #define NR_IXP2000_IRQS 69 | ||
88 | |||
89 | #define IXP2000_BOARD_IRQ(x) (NR_IXP2000_IRQS + (x)) | ||
90 | |||
91 | #define IXP2000_BOARD_IRQ_MASK(irq) (1 << (irq - NR_IXP2000_IRQS)) | ||
92 | |||
93 | #define IXP2000_ERR_IRQ_MASK(irq) ( 1 << (irq - IRQ_IXP2000_DRAM0_MIN_ERR)) | ||
94 | #define IXP2000_VALID_ERR_IRQ_MASK (\ | ||
95 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM0_MIN_ERR) | \ | ||
96 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM0_MAJ_ERR) | \ | ||
97 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM1_MIN_ERR) | \ | ||
98 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM1_MAJ_ERR) | \ | ||
99 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM2_MIN_ERR) | \ | ||
100 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM2_MAJ_ERR) | \ | ||
101 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_SRAM0_ERR) | \ | ||
102 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_SRAM1_ERR) | \ | ||
103 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_SRAM2_ERR) | \ | ||
104 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_SRAM3_ERR) | \ | ||
105 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_MEDIA_ERR) | \ | ||
106 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_PCI_ERR) | \ | ||
107 | IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_SP_INT) ) | ||
108 | |||
109 | /* | ||
110 | * This allows for all the on-chip sources plus up to 32 CPLD based | ||
111 | * IRQs. Should be more than enough. | ||
112 | */ | ||
113 | #define IXP2000_BOARD_IRQS 32 | ||
114 | #define NR_IRQS (NR_IXP2000_IRQS + IXP2000_BOARD_IRQS) | ||
115 | |||
116 | |||
117 | /* | ||
118 | * IXDP2400 specific IRQs | ||
119 | */ | ||
120 | #define IRQ_IXDP2400_INGRESS_NPU IXP2000_BOARD_IRQ(0) | ||
121 | #define IRQ_IXDP2400_ENET IXP2000_BOARD_IRQ(1) | ||
122 | #define IRQ_IXDP2400_MEDIA_PCI IXP2000_BOARD_IRQ(2) | ||
123 | #define IRQ_IXDP2400_MEDIA_SP IXP2000_BOARD_IRQ(3) | ||
124 | #define IRQ_IXDP2400_SF_PCI IXP2000_BOARD_IRQ(4) | ||
125 | #define IRQ_IXDP2400_SF_SP IXP2000_BOARD_IRQ(5) | ||
126 | #define IRQ_IXDP2400_PMC IXP2000_BOARD_IRQ(6) | ||
127 | #define IRQ_IXDP2400_TVM IXP2000_BOARD_IRQ(7) | ||
128 | |||
129 | #define NR_IXDP2400_IRQS ((IRQ_IXDP2400_TVM)+1) | ||
130 | #define IXDP2400_NR_IRQS NR_IXDP2400_IRQS - NR_IXP2000_IRQS | ||
131 | |||
132 | /* IXDP2800 specific IRQs */ | ||
133 | #define IRQ_IXDP2800_EGRESS_ENET IXP2000_BOARD_IRQ(0) | ||
134 | #define IRQ_IXDP2800_INGRESS_NPU IXP2000_BOARD_IRQ(1) | ||
135 | #define IRQ_IXDP2800_PMC IXP2000_BOARD_IRQ(2) | ||
136 | #define IRQ_IXDP2800_FABRIC_PCI IXP2000_BOARD_IRQ(3) | ||
137 | #define IRQ_IXDP2800_FABRIC IXP2000_BOARD_IRQ(4) | ||
138 | #define IRQ_IXDP2800_MEDIA IXP2000_BOARD_IRQ(5) | ||
139 | |||
140 | #define NR_IXDP2800_IRQS ((IRQ_IXDP2800_MEDIA)+1) | ||
141 | #define IXDP2800_NR_IRQS NR_IXDP2800_IRQS - NR_IXP2000_IRQS | ||
142 | |||
143 | /* | ||
144 | * IRQs on both IXDP2x01 boards | ||
145 | */ | ||
146 | #define IRQ_IXDP2X01_SPCI_DB_0 IXP2000_BOARD_IRQ(2) | ||
147 | #define IRQ_IXDP2X01_SPCI_DB_1 IXP2000_BOARD_IRQ(3) | ||
148 | #define IRQ_IXDP2X01_SPCI_PMC_INTA IXP2000_BOARD_IRQ(4) | ||
149 | #define IRQ_IXDP2X01_SPCI_PMC_INTB IXP2000_BOARD_IRQ(5) | ||
150 | #define IRQ_IXDP2X01_SPCI_PMC_INTC IXP2000_BOARD_IRQ(6) | ||
151 | #define IRQ_IXDP2X01_SPCI_PMC_INTD IXP2000_BOARD_IRQ(7) | ||
152 | #define IRQ_IXDP2X01_SPCI_FIC_INT IXP2000_BOARD_IRQ(8) | ||
153 | #define IRQ_IXDP2X01_IPMI_FROM IXP2000_BOARD_IRQ(16) | ||
154 | #define IRQ_IXDP2X01_125US IXP2000_BOARD_IRQ(17) | ||
155 | #define IRQ_IXDP2X01_DB_0_ADD IXP2000_BOARD_IRQ(18) | ||
156 | #define IRQ_IXDP2X01_DB_1_ADD IXP2000_BOARD_IRQ(19) | ||
157 | #define IRQ_IXDP2X01_UART1 IXP2000_BOARD_IRQ(21) | ||
158 | #define IRQ_IXDP2X01_UART2 IXP2000_BOARD_IRQ(22) | ||
159 | #define IRQ_IXDP2X01_FIC_ADD_INT IXP2000_BOARD_IRQ(24) | ||
160 | #define IRQ_IXDP2X01_CS8900 IXP2000_BOARD_IRQ(25) | ||
161 | #define IRQ_IXDP2X01_BBSRAM IXP2000_BOARD_IRQ(26) | ||
162 | |||
163 | #define IXDP2X01_VALID_IRQ_MASK ( \ | ||
164 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_DB_0) | \ | ||
165 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_DB_1) | \ | ||
166 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_PMC_INTA) | \ | ||
167 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_PMC_INTB) | \ | ||
168 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_PMC_INTC) | \ | ||
169 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_PMC_INTD) | \ | ||
170 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_FIC_INT) | \ | ||
171 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_IPMI_FROM) | \ | ||
172 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_125US) | \ | ||
173 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_DB_0_ADD) | \ | ||
174 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_DB_1_ADD) | \ | ||
175 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_UART1) | \ | ||
176 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_UART2) | \ | ||
177 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_FIC_ADD_INT) | \ | ||
178 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_CS8900) | \ | ||
179 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_BBSRAM) ) | ||
180 | |||
181 | /* | ||
182 | * IXDP2401 specific IRQs | ||
183 | */ | ||
184 | #define IRQ_IXDP2401_INTA_82546 IXP2000_BOARD_IRQ(0) | ||
185 | #define IRQ_IXDP2401_INTB_82546 IXP2000_BOARD_IRQ(1) | ||
186 | |||
187 | #define IXDP2401_VALID_IRQ_MASK ( \ | ||
188 | IXDP2X01_VALID_IRQ_MASK | \ | ||
189 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2401_INTA_82546) |\ | ||
190 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2401_INTB_82546)) | ||
191 | |||
192 | /* | ||
193 | * IXDP2801-specific IRQs | ||
194 | */ | ||
195 | #define IRQ_IXDP2801_RIV IXP2000_BOARD_IRQ(0) | ||
196 | #define IRQ_IXDP2801_CNFG_MEDIA IXP2000_BOARD_IRQ(27) | ||
197 | #define IRQ_IXDP2801_CLOCK_REF IXP2000_BOARD_IRQ(28) | ||
198 | |||
199 | #define IXDP2801_VALID_IRQ_MASK ( \ | ||
200 | IXDP2X01_VALID_IRQ_MASK | \ | ||
201 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2801_RIV) |\ | ||
202 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2801_CNFG_MEDIA) |\ | ||
203 | IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2801_CLOCK_REF)) | ||
204 | |||
205 | #define NR_IXDP2X01_IRQS ((IRQ_IXDP2801_CLOCK_REF) + 1) | ||
206 | |||
207 | #endif /*_IRQS_H*/ | ||
diff --git a/arch/arm/mach-ixp2000/include/mach/ixdp2x00.h b/arch/arm/mach-ixp2000/include/mach/ixdp2x00.h deleted file mode 100644 index 5df8479d948..00000000000 --- a/arch/arm/mach-ixp2000/include/mach/ixdp2x00.h +++ /dev/null | |||
@@ -1,92 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/include/mach/ixdp2x00.h | ||
3 | * | ||
4 | * Register and other defines for IXDP2[48]00 platforms | ||
5 | * | ||
6 | * Original Author: Naeem Afzal <naeem.m.afzal@intel.com> | ||
7 | * Maintainer: Deepak Saxena <dsaxena@plexity.net> | ||
8 | * | ||
9 | * Copyright (C) 2002 Intel Corp. | ||
10 | * Copyright (C) 2003-2004 MontaVista Software, Inc. | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify it | ||
13 | * under the terms of the GNU General Public License as published by the | ||
14 | * Free Software Foundation; either version 2 of the License, or (at your | ||
15 | * option) any later version. | ||
16 | */ | ||
17 | #ifndef _IXDP2X00_H_ | ||
18 | #define _IXDP2X00_H_ | ||
19 | |||
20 | /* | ||
21 | * On board CPLD memory map | ||
22 | */ | ||
23 | #define IXDP2X00_PHYS_CPLD_BASE 0xc7000000 | ||
24 | #define IXDP2X00_VIRT_CPLD_BASE 0xfe000000 | ||
25 | #define IXDP2X00_CPLD_SIZE 0x00100000 | ||
26 | |||
27 | |||
28 | #define IXDP2X00_CPLD_REG(x) \ | ||
29 | (volatile unsigned long *)(IXDP2X00_VIRT_CPLD_BASE | x) | ||
30 | |||
31 | /* | ||
32 | * IXDP2400 CPLD registers | ||
33 | */ | ||
34 | #define IXDP2400_CPLD_SYSLED IXDP2X00_CPLD_REG(0x0) | ||
35 | #define IXDP2400_CPLD_DISP_DATA IXDP2X00_CPLD_REG(0x4) | ||
36 | #define IXDP2400_CPLD_CLOCK_SPEED IXDP2X00_CPLD_REG(0x8) | ||
37 | #define IXDP2400_CPLD_INT_STAT IXDP2X00_CPLD_REG(0xc) | ||
38 | #define IXDP2400_CPLD_REV IXDP2X00_CPLD_REG(0x10) | ||
39 | #define IXDP2400_CPLD_SYS_CLK_M IXDP2X00_CPLD_REG(0x14) | ||
40 | #define IXDP2400_CPLD_SYS_CLK_N IXDP2X00_CPLD_REG(0x18) | ||
41 | #define IXDP2400_CPLD_INT_MASK IXDP2X00_CPLD_REG(0x48) | ||
42 | |||
43 | /* | ||
44 | * IXDP2800 CPLD registers | ||
45 | */ | ||
46 | #define IXDP2800_CPLD_INT_STAT IXDP2X00_CPLD_REG(0x0) | ||
47 | #define IXDP2800_CPLD_INT_MASK IXDP2X00_CPLD_REG(0x140) | ||
48 | |||
49 | |||
50 | #define IXDP2X00_GPIO_I2C_ENABLE 0x02 | ||
51 | #define IXDP2X00_GPIO_SCL 0x07 | ||
52 | #define IXDP2X00_GPIO_SDA 0x06 | ||
53 | |||
54 | /* | ||
55 | * PCI devfns for on-board devices. We need these to be able to | ||
56 | * properly translate IRQs and for device removal. | ||
57 | */ | ||
58 | #define IXDP2400_SLAVE_ENET_DEVFN 0x18 /* Bus 1 */ | ||
59 | #define IXDP2400_MASTER_ENET_DEVFN 0x20 /* Bus 1 */ | ||
60 | #define IXDP2400_MEDIA_DEVFN 0x28 /* Bus 1 */ | ||
61 | #define IXDP2400_SWITCH_FABRIC_DEVFN 0x30 /* Bus 1 */ | ||
62 | |||
63 | #define IXDP2800_SLAVE_ENET_DEVFN 0x20 /* Bus 1 */ | ||
64 | #define IXDP2800_MASTER_ENET_DEVFN 0x18 /* Bus 1 */ | ||
65 | #define IXDP2800_SWITCH_FABRIC_DEVFN 0x30 /* Bus 1 */ | ||
66 | |||
67 | #define IXDP2X00_P2P_DEVFN 0x20 /* Bus 0 */ | ||
68 | #define IXDP2X00_21555_DEVFN 0x30 /* Bus 0 */ | ||
69 | #define IXDP2X00_SLAVE_NPU_DEVFN 0x28 /* Bus 1 */ | ||
70 | #define IXDP2X00_PMC_DEVFN 0x38 /* Bus 1 */ | ||
71 | #define IXDP2X00_MASTER_NPU_DEVFN 0x38 /* Bus 1 */ | ||
72 | |||
73 | #ifndef __ASSEMBLY__ | ||
74 | /* | ||
75 | * The master NPU is always PCI master. | ||
76 | */ | ||
77 | static inline unsigned int ixdp2x00_master_npu(void) | ||
78 | { | ||
79 | return !!ixp2000_is_pcimaster(); | ||
80 | } | ||
81 | |||
82 | /* | ||
83 | * Helper functions used by ixdp2400 and ixdp2800 specific code | ||
84 | */ | ||
85 | void ixdp2x00_init_irq(volatile unsigned long*, volatile unsigned long *, unsigned long); | ||
86 | void ixdp2x00_slave_pci_postinit(void); | ||
87 | void ixdp2x00_init_machine(void); | ||
88 | void ixdp2x00_map_io(void); | ||
89 | |||
90 | #endif | ||
91 | |||
92 | #endif /*_IXDP2X00_H_ */ | ||
diff --git a/arch/arm/mach-ixp2000/include/mach/ixdp2x01.h b/arch/arm/mach-ixp2000/include/mach/ixdp2x01.h deleted file mode 100644 index 4c1f04083e5..00000000000 --- a/arch/arm/mach-ixp2000/include/mach/ixdp2x01.h +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/include/mach/ixdp2x01.h | ||
3 | * | ||
4 | * Platform definitions for IXDP2X01 && IXDP2801 systems | ||
5 | * | ||
6 | * Author: Deepak Saxena <dsaxena@plexity.net> | ||
7 | * | ||
8 | * Copyright 2004 (c) MontaVista Software, Inc. | ||
9 | * | ||
10 | * Based on original code Copyright (c) 2002-2003 Intel Corporation | ||
11 | * | ||
12 | * This file is licensed under the terms of the GNU General Public | ||
13 | * License version 2. This program is licensed "as is" without any | ||
14 | * warranty of any kind, whether express or implied. | ||
15 | */ | ||
16 | |||
17 | #ifndef __IXDP2X01_H__ | ||
18 | #define __IXDP2X01_H__ | ||
19 | |||
20 | #define IXDP2X01_PHYS_CPLD_BASE 0xc6024000 | ||
21 | #define IXDP2X01_VIRT_CPLD_BASE 0xfe000000 | ||
22 | #define IXDP2X01_CPLD_REGION_SIZE 0x00100000 | ||
23 | |||
24 | #define IXDP2X01_CPLD_VIRT_REG(reg) (volatile unsigned long*)(IXDP2X01_VIRT_CPLD_BASE | reg) | ||
25 | #define IXDP2X01_CPLD_PHYS_REG(reg) (IXDP2X01_PHYS_CPLD_BASE | reg) | ||
26 | |||
27 | #define IXDP2X01_UART1_VIRT_BASE IXDP2X01_CPLD_VIRT_REG(0x40) | ||
28 | #define IXDP2X01_UART1_PHYS_BASE IXDP2X01_CPLD_PHYS_REG(0x40) | ||
29 | |||
30 | #define IXDP2X01_UART2_VIRT_BASE IXDP2X01_CPLD_VIRT_REG(0x60) | ||
31 | #define IXDP2X01_UART2_PHYS_BASE IXDP2X01_CPLD_PHYS_REG(0x60) | ||
32 | |||
33 | #define IXDP2X01_CS8900_VIRT_BASE IXDP2X01_CPLD_VIRT_REG(0x80) | ||
34 | #define IXDP2X01_CS8900_VIRT_END (IXDP2X01_CS8900_VIRT_BASE + 16) | ||
35 | |||
36 | #define IXDP2X01_CPLD_RESET_REG IXDP2X01_CPLD_VIRT_REG(0x00) | ||
37 | #define IXDP2X01_INT_MASK_SET_REG IXDP2X01_CPLD_VIRT_REG(0x08) | ||
38 | #define IXDP2X01_INT_STAT_REG IXDP2X01_CPLD_VIRT_REG(0x0C) | ||
39 | #define IXDP2X01_INT_RAW_REG IXDP2X01_CPLD_VIRT_REG(0x10) | ||
40 | #define IXDP2X01_INT_MASK_CLR_REG IXDP2X01_INT_RAW_REG | ||
41 | #define IXDP2X01_INT_SIM_REG IXDP2X01_CPLD_VIRT_REG(0x14) | ||
42 | |||
43 | #define IXDP2X01_CPLD_FLASH_REG IXDP2X01_CPLD_VIRT_REG(0x20) | ||
44 | |||
45 | #define IXDP2X01_CPLD_FLASH_INTERN 0x8000 | ||
46 | #define IXDP2X01_CPLD_FLASH_BANK_MASK 0xF | ||
47 | #define IXDP2X01_FLASH_WINDOW_BITS 25 | ||
48 | #define IXDP2X01_FLASH_WINDOW_SIZE (1 << IXDP2X01_FLASH_WINDOW_BITS) | ||
49 | #define IXDP2X01_FLASH_WINDOW_MASK (IXDP2X01_FLASH_WINDOW_SIZE - 1) | ||
50 | |||
51 | #define IXDP2X01_UART_CLK 1843200 | ||
52 | |||
53 | #define IXDP2X01_GPIO_I2C_ENABLE 0x02 | ||
54 | #define IXDP2X01_GPIO_SCL 0x07 | ||
55 | #define IXDP2X01_GPIO_SDA 0x06 | ||
56 | |||
57 | #endif /* __IXDP2x01_H__ */ | ||
diff --git a/arch/arm/mach-ixp2000/include/mach/ixp2000-regs.h b/arch/arm/mach-ixp2000/include/mach/ixp2000-regs.h deleted file mode 100644 index 822f63f2f4a..00000000000 --- a/arch/arm/mach-ixp2000/include/mach/ixp2000-regs.h +++ /dev/null | |||
@@ -1,451 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/include/mach/ixp2000-regs.h | ||
3 | * | ||
4 | * Chipset register definitions for IXP2400/2800 based systems. | ||
5 | * | ||
6 | * Original Author: Naeem Afzal <naeem.m.afzal@intel.com> | ||
7 | * | ||
8 | * Maintainer: Deepak Saxena <dsaxena@plexity.net> | ||
9 | * | ||
10 | * Copyright (C) 2002 Intel Corp. | ||
11 | * Copyright (C) 2003-2004 MontaVista Software, Inc. | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or modify it | ||
14 | * under the terms of the GNU General Public License as published by the | ||
15 | * Free Software Foundation; either version 2 of the License, or (at your | ||
16 | * option) any later version. | ||
17 | */ | ||
18 | #ifndef _IXP2000_REGS_H_ | ||
19 | #define _IXP2000_REGS_H_ | ||
20 | |||
21 | /* | ||
22 | * IXP2000 linux memory map: | ||
23 | * | ||
24 | * virt phys size | ||
25 | * fb000000 db000000 16M PCI CFG1 | ||
26 | * fc000000 da000000 16M PCI CFG0 | ||
27 | * fd000000 d8000000 16M PCI I/O | ||
28 | * fe[0-7]00000 8M per-platform mappings | ||
29 | * fe900000 80000000 1M SRAM #0 (first MB) | ||
30 | * fea00000 cb400000 1M SCRATCH ring get/put | ||
31 | * feb00000 c8000000 1M MSF | ||
32 | * fec00000 df000000 1M PCI CSRs | ||
33 | * fed00000 de000000 1M PCI CREG | ||
34 | * fee00000 d6000000 1M INTCTL | ||
35 | * fef00000 c0000000 1M CAP | ||
36 | */ | ||
37 | |||
38 | /* | ||
39 | * Static I/O regions. | ||
40 | * | ||
41 | * Most of the registers are clumped in 4K regions spread throughout | ||
42 | * the 0xc0000000 -> 0xc0100000 address range, but we just map in | ||
43 | * the whole range using a single 1 MB section instead of small | ||
44 | * 4K pages. | ||
45 | * | ||
46 | * CAP stands for CSR Access Proxy. | ||
47 | * | ||
48 | * If you change the virtual address of this mapping, please propagate | ||
49 | * the change to arch/arm/kernel/debug.S, which hardcodes the virtual | ||
50 | * address of the UART located in this region. | ||
51 | */ | ||
52 | |||
53 | #define IXP2000_CAP_PHYS_BASE 0xc0000000 | ||
54 | #define IXP2000_CAP_VIRT_BASE 0xfef00000 | ||
55 | #define IXP2000_CAP_SIZE 0x00100000 | ||
56 | |||
57 | /* | ||
58 | * Addresses for specific on-chip peripherals. | ||
59 | */ | ||
60 | #define IXP2000_SLOWPORT_CSR_VIRT_BASE 0xfef80000 | ||
61 | #define IXP2000_GLOBAL_REG_VIRT_BASE 0xfef04000 | ||
62 | #define IXP2000_UART_PHYS_BASE 0xc0030000 | ||
63 | #define IXP2000_UART_VIRT_BASE 0xfef30000 | ||
64 | #define IXP2000_TIMER_VIRT_BASE 0xfef20000 | ||
65 | #define IXP2000_UENGINE_CSR_VIRT_BASE 0xfef18000 | ||
66 | #define IXP2000_GPIO_VIRT_BASE 0xfef10000 | ||
67 | |||
68 | /* | ||
69 | * Devices outside of the 0xc0000000 -> 0xc0100000 range. The virtual | ||
70 | * addresses of the INTCTL and PCI_CSR mappings are hardcoded in | ||
71 | * entry-macro.S, so if you ever change these please propagate | ||
72 | * the change. | ||
73 | */ | ||
74 | #define IXP2000_INTCTL_PHYS_BASE 0xd6000000 | ||
75 | #define IXP2000_INTCTL_VIRT_BASE 0xfee00000 | ||
76 | #define IXP2000_INTCTL_SIZE 0x00100000 | ||
77 | |||
78 | #define IXP2000_PCI_CREG_PHYS_BASE 0xde000000 | ||
79 | #define IXP2000_PCI_CREG_VIRT_BASE 0xfed00000 | ||
80 | #define IXP2000_PCI_CREG_SIZE 0x00100000 | ||
81 | |||
82 | #define IXP2000_PCI_CSR_PHYS_BASE 0xdf000000 | ||
83 | #define IXP2000_PCI_CSR_VIRT_BASE 0xfec00000 | ||
84 | #define IXP2000_PCI_CSR_SIZE 0x00100000 | ||
85 | |||
86 | #define IXP2000_MSF_PHYS_BASE 0xc8000000 | ||
87 | #define IXP2000_MSF_VIRT_BASE 0xfeb00000 | ||
88 | #define IXP2000_MSF_SIZE 0x00100000 | ||
89 | |||
90 | #define IXP2000_SCRATCH_RING_PHYS_BASE 0xcb400000 | ||
91 | #define IXP2000_SCRATCH_RING_VIRT_BASE 0xfea00000 | ||
92 | #define IXP2000_SCRATCH_RING_SIZE 0x00100000 | ||
93 | |||
94 | #define IXP2000_SRAM0_PHYS_BASE 0x80000000 | ||
95 | #define IXP2000_SRAM0_VIRT_BASE 0xfe900000 | ||
96 | #define IXP2000_SRAM0_SIZE 0x00100000 | ||
97 | |||
98 | #define IXP2000_PCI_IO_PHYS_BASE 0xd8000000 | ||
99 | #define IXP2000_PCI_IO_VIRT_BASE 0xfd000000 | ||
100 | #define IXP2000_PCI_IO_SIZE 0x01000000 | ||
101 | |||
102 | #define IXP2000_PCI_CFG0_PHYS_BASE 0xda000000 | ||
103 | #define IXP2000_PCI_CFG0_VIRT_BASE 0xfc000000 | ||
104 | #define IXP2000_PCI_CFG0_SIZE 0x01000000 | ||
105 | |||
106 | #define IXP2000_PCI_CFG1_PHYS_BASE 0xdb000000 | ||
107 | #define IXP2000_PCI_CFG1_VIRT_BASE 0xfb000000 | ||
108 | #define IXP2000_PCI_CFG1_SIZE 0x01000000 | ||
109 | |||
110 | /* | ||
111 | * Timers | ||
112 | */ | ||
113 | #define IXP2000_TIMER_REG(x) ((volatile unsigned long*)(IXP2000_TIMER_VIRT_BASE | (x))) | ||
114 | /* Timer control */ | ||
115 | #define IXP2000_T1_CTL IXP2000_TIMER_REG(0x00) | ||
116 | #define IXP2000_T2_CTL IXP2000_TIMER_REG(0x04) | ||
117 | #define IXP2000_T3_CTL IXP2000_TIMER_REG(0x08) | ||
118 | #define IXP2000_T4_CTL IXP2000_TIMER_REG(0x0c) | ||
119 | /* Store initial value */ | ||
120 | #define IXP2000_T1_CLD IXP2000_TIMER_REG(0x10) | ||
121 | #define IXP2000_T2_CLD IXP2000_TIMER_REG(0x14) | ||
122 | #define IXP2000_T3_CLD IXP2000_TIMER_REG(0x18) | ||
123 | #define IXP2000_T4_CLD IXP2000_TIMER_REG(0x1c) | ||
124 | /* Read current value */ | ||
125 | #define IXP2000_T1_CSR IXP2000_TIMER_REG(0x20) | ||
126 | #define IXP2000_T2_CSR IXP2000_TIMER_REG(0x24) | ||
127 | #define IXP2000_T3_CSR IXP2000_TIMER_REG(0x28) | ||
128 | #define IXP2000_T4_CSR IXP2000_TIMER_REG(0x2c) | ||
129 | /* Clear associated timer interrupt */ | ||
130 | #define IXP2000_T1_CLR IXP2000_TIMER_REG(0x30) | ||
131 | #define IXP2000_T2_CLR IXP2000_TIMER_REG(0x34) | ||
132 | #define IXP2000_T3_CLR IXP2000_TIMER_REG(0x38) | ||
133 | #define IXP2000_T4_CLR IXP2000_TIMER_REG(0x3c) | ||
134 | /* Timer watchdog enable for T4 */ | ||
135 | #define IXP2000_TWDE IXP2000_TIMER_REG(0x40) | ||
136 | |||
137 | #define WDT_ENABLE 0x00000001 | ||
138 | #define TIMER_DIVIDER_256 0x00000008 | ||
139 | #define TIMER_ENABLE 0x00000080 | ||
140 | #define IRQ_MASK_TIMER1 (1 << 4) | ||
141 | |||
142 | /* | ||
143 | * Interrupt controller registers | ||
144 | */ | ||
145 | #define IXP2000_INTCTL_REG(x) (volatile unsigned long*)(IXP2000_INTCTL_VIRT_BASE | (x)) | ||
146 | #define IXP2000_IRQ_STATUS IXP2000_INTCTL_REG(0x08) | ||
147 | #define IXP2000_IRQ_ENABLE IXP2000_INTCTL_REG(0x10) | ||
148 | #define IXP2000_IRQ_ENABLE_SET IXP2000_INTCTL_REG(0x10) | ||
149 | #define IXP2000_IRQ_ENABLE_CLR IXP2000_INTCTL_REG(0x18) | ||
150 | #define IXP2000_FIQ_ENABLE_CLR IXP2000_INTCTL_REG(0x14) | ||
151 | #define IXP2000_IRQ_ERR_STATUS IXP2000_INTCTL_REG(0x24) | ||
152 | #define IXP2000_IRQ_ERR_ENABLE_SET IXP2000_INTCTL_REG(0x2c) | ||
153 | #define IXP2000_FIQ_ERR_ENABLE_CLR IXP2000_INTCTL_REG(0x30) | ||
154 | #define IXP2000_IRQ_ERR_ENABLE_CLR IXP2000_INTCTL_REG(0x34) | ||
155 | #define IXP2000_IRQ_THD_RAW_STATUS_A_0 IXP2000_INTCTL_REG(0x60) | ||
156 | #define IXP2000_IRQ_THD_RAW_STATUS_A_1 IXP2000_INTCTL_REG(0x64) | ||
157 | #define IXP2000_IRQ_THD_RAW_STATUS_A_2 IXP2000_INTCTL_REG(0x68) | ||
158 | #define IXP2000_IRQ_THD_RAW_STATUS_A_3 IXP2000_INTCTL_REG(0x6c) | ||
159 | #define IXP2000_IRQ_THD_RAW_STATUS_B_0 IXP2000_INTCTL_REG(0x80) | ||
160 | #define IXP2000_IRQ_THD_RAW_STATUS_B_1 IXP2000_INTCTL_REG(0x84) | ||
161 | #define IXP2000_IRQ_THD_RAW_STATUS_B_2 IXP2000_INTCTL_REG(0x88) | ||
162 | #define IXP2000_IRQ_THD_RAW_STATUS_B_3 IXP2000_INTCTL_REG(0x8c) | ||
163 | #define IXP2000_IRQ_THD_STATUS_A_0 IXP2000_INTCTL_REG(0xe0) | ||
164 | #define IXP2000_IRQ_THD_STATUS_A_1 IXP2000_INTCTL_REG(0xe4) | ||
165 | #define IXP2000_IRQ_THD_STATUS_A_2 IXP2000_INTCTL_REG(0xe8) | ||
166 | #define IXP2000_IRQ_THD_STATUS_A_3 IXP2000_INTCTL_REG(0xec) | ||
167 | #define IXP2000_IRQ_THD_STATUS_B_0 IXP2000_INTCTL_REG(0x100) | ||
168 | #define IXP2000_IRQ_THD_STATUS_B_1 IXP2000_INTCTL_REG(0x104) | ||
169 | #define IXP2000_IRQ_THD_STATUS_B_2 IXP2000_INTCTL_REG(0x108) | ||
170 | #define IXP2000_IRQ_THD_STATUS_B_3 IXP2000_INTCTL_REG(0x10c) | ||
171 | #define IXP2000_IRQ_THD_ENABLE_SET_A_0 IXP2000_INTCTL_REG(0x160) | ||
172 | #define IXP2000_IRQ_THD_ENABLE_SET_A_1 IXP2000_INTCTL_REG(0x164) | ||
173 | #define IXP2000_IRQ_THD_ENABLE_SET_A_2 IXP2000_INTCTL_REG(0x168) | ||
174 | #define IXP2000_IRQ_THD_ENABLE_SET_A_3 IXP2000_INTCTL_REG(0x16c) | ||
175 | #define IXP2000_IRQ_THD_ENABLE_SET_B_0 IXP2000_INTCTL_REG(0x180) | ||
176 | #define IXP2000_IRQ_THD_ENABLE_SET_B_1 IXP2000_INTCTL_REG(0x184) | ||
177 | #define IXP2000_IRQ_THD_ENABLE_SET_B_2 IXP2000_INTCTL_REG(0x188) | ||
178 | #define IXP2000_IRQ_THD_ENABLE_SET_B_3 IXP2000_INTCTL_REG(0x18c) | ||
179 | #define IXP2000_IRQ_THD_ENABLE_CLEAR_A_0 IXP2000_INTCTL_REG(0x1e0) | ||
180 | #define IXP2000_IRQ_THD_ENABLE_CLEAR_A_1 IXP2000_INTCTL_REG(0x1e4) | ||
181 | #define IXP2000_IRQ_THD_ENABLE_CLEAR_A_2 IXP2000_INTCTL_REG(0x1e8) | ||
182 | #define IXP2000_IRQ_THD_ENABLE_CLEAR_A_3 IXP2000_INTCTL_REG(0x1ec) | ||
183 | #define IXP2000_IRQ_THD_ENABLE_CLEAR_B_0 IXP2000_INTCTL_REG(0x200) | ||
184 | #define IXP2000_IRQ_THD_ENABLE_CLEAR_B_1 IXP2000_INTCTL_REG(0x204) | ||
185 | #define IXP2000_IRQ_THD_ENABLE_CLEAR_B_2 IXP2000_INTCTL_REG(0x208) | ||
186 | #define IXP2000_IRQ_THD_ENABLE_CLEAR_B_3 IXP2000_INTCTL_REG(0x20c) | ||
187 | |||
188 | /* | ||
189 | * Mask of valid IRQs in the 32-bit IRQ register. We use | ||
190 | * this to mark certain IRQs as being invalid. | ||
191 | */ | ||
192 | #define IXP2000_VALID_IRQ_MASK 0x0f0fffff | ||
193 | |||
194 | /* | ||
195 | * PCI config register access from core | ||
196 | */ | ||
197 | #define IXP2000_PCI_CREG(x) (volatile unsigned long*)(IXP2000_PCI_CREG_VIRT_BASE | (x)) | ||
198 | #define IXP2000_PCI_CMDSTAT IXP2000_PCI_CREG(0x04) | ||
199 | #define IXP2000_PCI_CSR_BAR IXP2000_PCI_CREG(0x10) | ||
200 | #define IXP2000_PCI_SRAM_BAR IXP2000_PCI_CREG(0x14) | ||
201 | #define IXP2000_PCI_SDRAM_BAR IXP2000_PCI_CREG(0x18) | ||
202 | |||
203 | /* | ||
204 | * PCI CSRs | ||
205 | */ | ||
206 | #define IXP2000_PCI_CSR(x) (volatile unsigned long*)(IXP2000_PCI_CSR_VIRT_BASE | (x)) | ||
207 | |||
208 | /* | ||
209 | * PCI outbound interrupts | ||
210 | */ | ||
211 | #define IXP2000_PCI_OUT_INT_STATUS IXP2000_PCI_CSR(0x30) | ||
212 | #define IXP2000_PCI_OUT_INT_MASK IXP2000_PCI_CSR(0x34) | ||
213 | /* | ||
214 | * PCI communications | ||
215 | */ | ||
216 | #define IXP2000_PCI_MAILBOX0 IXP2000_PCI_CSR(0x50) | ||
217 | #define IXP2000_PCI_MAILBOX1 IXP2000_PCI_CSR(0x54) | ||
218 | #define IXP2000_PCI_MAILBOX2 IXP2000_PCI_CSR(0x58) | ||
219 | #define IXP2000_PCI_MAILBOX3 IXP2000_PCI_CSR(0x5C) | ||
220 | #define IXP2000_XSCALE_DOORBELL IXP2000_PCI_CSR(0x60) | ||
221 | #define IXP2000_XSCALE_DOORBELL_SETUP IXP2000_PCI_CSR(0x64) | ||
222 | #define IXP2000_PCI_DOORBELL IXP2000_PCI_CSR(0x70) | ||
223 | #define IXP2000_PCI_DOORBELL_SETUP IXP2000_PCI_CSR(0x74) | ||
224 | |||
225 | /* | ||
226 | * DMA engines | ||
227 | */ | ||
228 | #define IXP2000_PCI_CH1_BYTE_CNT IXP2000_PCI_CSR(0x80) | ||
229 | #define IXP2000_PCI_CH1_ADDR IXP2000_PCI_CSR(0x84) | ||
230 | #define IXP2000_PCI_CH1_DRAM_ADDR IXP2000_PCI_CSR(0x88) | ||
231 | #define IXP2000_PCI_CH1_DESC_PTR IXP2000_PCI_CSR(0x8C) | ||
232 | #define IXP2000_PCI_CH1_CNTRL IXP2000_PCI_CSR(0x90) | ||
233 | #define IXP2000_PCI_CH1_ME_PARAM IXP2000_PCI_CSR(0x94) | ||
234 | #define IXP2000_PCI_CH2_BYTE_CNT IXP2000_PCI_CSR(0xA0) | ||
235 | #define IXP2000_PCI_CH2_ADDR IXP2000_PCI_CSR(0xA4) | ||
236 | #define IXP2000_PCI_CH2_DRAM_ADDR IXP2000_PCI_CSR(0xA8) | ||
237 | #define IXP2000_PCI_CH2_DESC_PTR IXP2000_PCI_CSR(0xAC) | ||
238 | #define IXP2000_PCI_CH2_CNTRL IXP2000_PCI_CSR(0xB0) | ||
239 | #define IXP2000_PCI_CH2_ME_PARAM IXP2000_PCI_CSR(0xB4) | ||
240 | #define IXP2000_PCI_CH3_BYTE_CNT IXP2000_PCI_CSR(0xC0) | ||
241 | #define IXP2000_PCI_CH3_ADDR IXP2000_PCI_CSR(0xC4) | ||
242 | #define IXP2000_PCI_CH3_DRAM_ADDR IXP2000_PCI_CSR(0xC8) | ||
243 | #define IXP2000_PCI_CH3_DESC_PTR IXP2000_PCI_CSR(0xCC) | ||
244 | #define IXP2000_PCI_CH3_CNTRL IXP2000_PCI_CSR(0xD0) | ||
245 | #define IXP2000_PCI_CH3_ME_PARAM IXP2000_PCI_CSR(0xD4) | ||
246 | #define IXP2000_DMA_INF_MODE IXP2000_PCI_CSR(0xE0) | ||
247 | /* | ||
248 | * Size masks for BARs | ||
249 | */ | ||
250 | #define IXP2000_PCI_SRAM_BASE_ADDR_MASK IXP2000_PCI_CSR(0xFC) | ||
251 | #define IXP2000_PCI_DRAM_BASE_ADDR_MASK IXP2000_PCI_CSR(0x100) | ||
252 | /* | ||
253 | * Control and uEngine related | ||
254 | */ | ||
255 | #define IXP2000_PCI_CONTROL IXP2000_PCI_CSR(0x13C) | ||
256 | #define IXP2000_PCI_ADDR_EXT IXP2000_PCI_CSR(0x140) | ||
257 | #define IXP2000_PCI_ME_PUSH_STATUS IXP2000_PCI_CSR(0x148) | ||
258 | #define IXP2000_PCI_ME_PUSH_EN IXP2000_PCI_CSR(0x14C) | ||
259 | #define IXP2000_PCI_ERR_STATUS IXP2000_PCI_CSR(0x150) | ||
260 | #define IXP2000_PCI_ERR_ENABLE IXP2000_PCI_CSR(0x154) | ||
261 | /* | ||
262 | * Inbound PCI interrupt control | ||
263 | */ | ||
264 | #define IXP2000_PCI_XSCALE_INT_STATUS IXP2000_PCI_CSR(0x158) | ||
265 | #define IXP2000_PCI_XSCALE_INT_ENABLE IXP2000_PCI_CSR(0x15C) | ||
266 | |||
267 | #define IXP2000_PCICNTL_PNR (1<<17) /* PCI not Reset bit of PCI_CONTROL */ | ||
268 | #define IXP2000_PCICNTL_PCF (1<<28) /* PCI Central function bit */ | ||
269 | #define IXP2000_XSCALE_INT (1<<1) /* Interrupt from XScale to PCI */ | ||
270 | |||
271 | /* These are from the IRQ register in the PCI ISR register */ | ||
272 | #define PCI_CONTROL_BE_DEO (1 << 22) /* Big Endian Data Enable Out */ | ||
273 | #define PCI_CONTROL_BE_DEI (1 << 21) /* Big Endian Data Enable In */ | ||
274 | #define PCI_CONTROL_BE_BEO (1 << 20) /* Big Endian Byte Enable Out */ | ||
275 | #define PCI_CONTROL_BE_BEI (1 << 19) /* Big Endian Byte Enable In */ | ||
276 | #define PCI_CONTROL_IEE (1 << 17) /* I/O cycle Endian swap Enable */ | ||
277 | |||
278 | #define IXP2000_PCI_RST_REL (1 << 2) | ||
279 | #define CFG_RST_DIR (*IXP2000_PCI_CONTROL & IXP2000_PCICNTL_PCF) | ||
280 | #define CFG_PCI_BOOT_HOST (1 << 2) | ||
281 | #define CFG_BOOT_PROM (1 << 1) | ||
282 | |||
283 | /* | ||
284 | * SlowPort CSRs | ||
285 | * | ||
286 | * The slowport is used to access things like flash, SONET framer control | ||
287 | * ports, slave microprocessors, CPLDs, and others of chip memory mapped | ||
288 | * peripherals. | ||
289 | */ | ||
290 | #define SLOWPORT_CSR(x) (volatile unsigned long*)(IXP2000_SLOWPORT_CSR_VIRT_BASE | (x)) | ||
291 | |||
292 | #define IXP2000_SLOWPORT_CCR SLOWPORT_CSR(0x00) | ||
293 | #define IXP2000_SLOWPORT_WTC1 SLOWPORT_CSR(0x04) | ||
294 | #define IXP2000_SLOWPORT_WTC2 SLOWPORT_CSR(0x08) | ||
295 | #define IXP2000_SLOWPORT_RTC1 SLOWPORT_CSR(0x0c) | ||
296 | #define IXP2000_SLOWPORT_RTC2 SLOWPORT_CSR(0x10) | ||
297 | #define IXP2000_SLOWPORT_FSR SLOWPORT_CSR(0x14) | ||
298 | #define IXP2000_SLOWPORT_PCR SLOWPORT_CSR(0x18) | ||
299 | #define IXP2000_SLOWPORT_ADC SLOWPORT_CSR(0x1C) | ||
300 | #define IXP2000_SLOWPORT_FAC SLOWPORT_CSR(0x20) | ||
301 | #define IXP2000_SLOWPORT_FRM SLOWPORT_CSR(0x24) | ||
302 | #define IXP2000_SLOWPORT_FIN SLOWPORT_CSR(0x28) | ||
303 | |||
304 | /* | ||
305 | * CCR values. | ||
306 | * The CCR configures the clock division for the slowport interface. | ||
307 | */ | ||
308 | #define SLOWPORT_CCR_DIV_1 0x00 | ||
309 | #define SLOWPORT_CCR_DIV_2 0x01 | ||
310 | #define SLOWPORT_CCR_DIV_4 0x02 | ||
311 | #define SLOWPORT_CCR_DIV_6 0x03 | ||
312 | #define SLOWPORT_CCR_DIV_8 0x04 | ||
313 | #define SLOWPORT_CCR_DIV_10 0x05 | ||
314 | #define SLOWPORT_CCR_DIV_12 0x06 | ||
315 | #define SLOWPORT_CCR_DIV_14 0x07 | ||
316 | #define SLOWPORT_CCR_DIV_16 0x08 | ||
317 | #define SLOWPORT_CCR_DIV_18 0x09 | ||
318 | #define SLOWPORT_CCR_DIV_20 0x0a | ||
319 | #define SLOWPORT_CCR_DIV_22 0x0b | ||
320 | #define SLOWPORT_CCR_DIV_24 0x0c | ||
321 | #define SLOWPORT_CCR_DIV_26 0x0d | ||
322 | #define SLOWPORT_CCR_DIV_28 0x0e | ||
323 | #define SLOWPORT_CCR_DIV_30 0x0f | ||
324 | |||
325 | /* | ||
326 | * PCR values. PCR configure the mode of the interface. | ||
327 | */ | ||
328 | #define SLOWPORT_MODE_FLASH 0x00 | ||
329 | #define SLOWPORT_MODE_LUCENT 0x01 | ||
330 | #define SLOWPORT_MODE_PMC_SIERRA 0x02 | ||
331 | #define SLOWPORT_MODE_INTEL_UP 0x03 | ||
332 | #define SLOWPORT_MODE_MOTOROLA_UP 0x04 | ||
333 | |||
334 | /* | ||
335 | * ADC values. Defines data and address bus widths. | ||
336 | */ | ||
337 | #define SLOWPORT_ADDR_WIDTH_8 0x00 | ||
338 | #define SLOWPORT_ADDR_WIDTH_16 0x01 | ||
339 | #define SLOWPORT_ADDR_WIDTH_24 0x02 | ||
340 | #define SLOWPORT_ADDR_WIDTH_32 0x03 | ||
341 | #define SLOWPORT_DATA_WIDTH_8 0x00 | ||
342 | #define SLOWPORT_DATA_WIDTH_16 0x10 | ||
343 | #define SLOWPORT_DATA_WIDTH_24 0x20 | ||
344 | #define SLOWPORT_DATA_WIDTH_32 0x30 | ||
345 | |||
346 | /* | ||
347 | * Masks and shifts for various fields in the WTC and RTC registers. | ||
348 | */ | ||
349 | #define SLOWPORT_WRTC_MASK_HD 0x0003 | ||
350 | #define SLOWPORT_WRTC_MASK_PW 0x003c | ||
351 | #define SLOWPORT_WRTC_MASK_SU 0x03c0 | ||
352 | |||
353 | #define SLOWPORT_WRTC_SHIFT_HD 0x00 | ||
354 | #define SLOWPORT_WRTC_SHIFT_SU 0x02 | ||
355 | #define SLOWPORT_WRTC_SHFIT_PW 0x06 | ||
356 | |||
357 | |||
358 | /* | ||
359 | * GPIO registers & GPIO interface. | ||
360 | */ | ||
361 | #define IXP2000_GPIO_REG(x) ((volatile unsigned long*)(IXP2000_GPIO_VIRT_BASE+(x))) | ||
362 | #define IXP2000_GPIO_PLR IXP2000_GPIO_REG(0x00) | ||
363 | #define IXP2000_GPIO_PDPR IXP2000_GPIO_REG(0x04) | ||
364 | #define IXP2000_GPIO_PDSR IXP2000_GPIO_REG(0x08) | ||
365 | #define IXP2000_GPIO_PDCR IXP2000_GPIO_REG(0x0c) | ||
366 | #define IXP2000_GPIO_POPR IXP2000_GPIO_REG(0x10) | ||
367 | #define IXP2000_GPIO_POSR IXP2000_GPIO_REG(0x14) | ||
368 | #define IXP2000_GPIO_POCR IXP2000_GPIO_REG(0x18) | ||
369 | #define IXP2000_GPIO_REDR IXP2000_GPIO_REG(0x1c) | ||
370 | #define IXP2000_GPIO_FEDR IXP2000_GPIO_REG(0x20) | ||
371 | #define IXP2000_GPIO_EDSR IXP2000_GPIO_REG(0x24) | ||
372 | #define IXP2000_GPIO_LSHR IXP2000_GPIO_REG(0x28) | ||
373 | #define IXP2000_GPIO_LSLR IXP2000_GPIO_REG(0x2c) | ||
374 | #define IXP2000_GPIO_LDSR IXP2000_GPIO_REG(0x30) | ||
375 | #define IXP2000_GPIO_INER IXP2000_GPIO_REG(0x34) | ||
376 | #define IXP2000_GPIO_INSR IXP2000_GPIO_REG(0x38) | ||
377 | #define IXP2000_GPIO_INCR IXP2000_GPIO_REG(0x3c) | ||
378 | #define IXP2000_GPIO_INST IXP2000_GPIO_REG(0x40) | ||
379 | |||
380 | /* | ||
381 | * "Global" registers...whatever that's supposed to mean. | ||
382 | */ | ||
383 | #define GLOBAL_REG_BASE (IXP2000_GLOBAL_REG_VIRT_BASE + 0x0a00) | ||
384 | #define GLOBAL_REG(x) (volatile unsigned long*)(GLOBAL_REG_BASE | (x)) | ||
385 | |||
386 | #define IXP2000_MAJ_PROD_TYPE_MASK 0x001F0000 | ||
387 | #define IXP2000_MAJ_PROD_TYPE_IXP2000 0x00000000 | ||
388 | #define IXP2000_MIN_PROD_TYPE_MASK 0x0000FF00 | ||
389 | #define IXP2000_MIN_PROD_TYPE_IXP2400 0x00000200 | ||
390 | #define IXP2000_MIN_PROD_TYPE_IXP2850 0x00000100 | ||
391 | #define IXP2000_MIN_PROD_TYPE_IXP2800 0x00000000 | ||
392 | #define IXP2000_MAJ_REV_MASK 0x000000F0 | ||
393 | #define IXP2000_MIN_REV_MASK 0x0000000F | ||
394 | #define IXP2000_PROD_ID_MASK 0xFFFFFFFF | ||
395 | |||
396 | #define IXP2000_PRODUCT_ID GLOBAL_REG(0x00) | ||
397 | #define IXP2000_MISC_CONTROL GLOBAL_REG(0x04) | ||
398 | #define IXP2000_MSF_CLK_CNTRL GLOBAL_REG(0x08) | ||
399 | #define IXP2000_RESET0 GLOBAL_REG(0x0c) | ||
400 | #define IXP2000_RESET1 GLOBAL_REG(0x10) | ||
401 | #define IXP2000_CCR GLOBAL_REG(0x14) | ||
402 | #define IXP2000_STRAP_OPTIONS GLOBAL_REG(0x18) | ||
403 | |||
404 | #define RSTALL (1 << 16) | ||
405 | #define WDT_RESET_ENABLE 0x01000000 | ||
406 | |||
407 | |||
408 | /* | ||
409 | * MSF registers. The IXP2400 and IXP2800 have somewhat different MSF | ||
410 | * units, but the registers that differ between the two don't overlap, | ||
411 | * so we can have one register list for both. | ||
412 | */ | ||
413 | #define IXP2000_MSF_REG(x) ((volatile unsigned long*)(IXP2000_MSF_VIRT_BASE + (x))) | ||
414 | #define IXP2000_MSF_RX_CONTROL IXP2000_MSF_REG(0x0000) | ||
415 | #define IXP2000_MSF_TX_CONTROL IXP2000_MSF_REG(0x0004) | ||
416 | #define IXP2000_MSF_INTERRUPT_STATUS IXP2000_MSF_REG(0x0008) | ||
417 | #define IXP2000_MSF_INTERRUPT_ENABLE IXP2000_MSF_REG(0x000c) | ||
418 | #define IXP2000_MSF_CSIX_TYPE_MAP IXP2000_MSF_REG(0x0010) | ||
419 | #define IXP2000_MSF_FC_EGRESS_STATUS IXP2000_MSF_REG(0x0014) | ||
420 | #define IXP2000_MSF_FC_INGRESS_STATUS IXP2000_MSF_REG(0x0018) | ||
421 | #define IXP2000_MSF_HWM_CONTROL IXP2000_MSF_REG(0x0024) | ||
422 | #define IXP2000_MSF_FC_STATUS_OVERRIDE IXP2000_MSF_REG(0x0028) | ||
423 | #define IXP2000_MSF_CLOCK_CONTROL IXP2000_MSF_REG(0x002c) | ||
424 | #define IXP2000_MSF_RX_PORT_MAP IXP2000_MSF_REG(0x0040) | ||
425 | #define IXP2000_MSF_RBUF_ELEMENT_DONE IXP2000_MSF_REG(0x0044) | ||
426 | #define IXP2000_MSF_RX_MPHY_POLL_LIMIT IXP2000_MSF_REG(0x0048) | ||
427 | #define IXP2000_MSF_RX_CALENDAR_LENGTH IXP2000_MSF_REG(0x0048) | ||
428 | #define IXP2000_MSF_RX_THREAD_FREELIST_TIMEOUT_0 IXP2000_MSF_REG(0x0050) | ||
429 | #define IXP2000_MSF_RX_THREAD_FREELIST_TIMEOUT_1 IXP2000_MSF_REG(0x0054) | ||
430 | #define IXP2000_MSF_RX_THREAD_FREELIST_TIMEOUT_2 IXP2000_MSF_REG(0x0058) | ||
431 | #define IXP2000_MSF_TX_SEQUENCE_0 IXP2000_MSF_REG(0x0060) | ||
432 | #define IXP2000_MSF_TX_SEQUENCE_1 IXP2000_MSF_REG(0x0064) | ||
433 | #define IXP2000_MSF_TX_SEQUENCE_2 IXP2000_MSF_REG(0x0068) | ||
434 | #define IXP2000_MSF_TX_MPHY_POLL_LIMIT IXP2000_MSF_REG(0x0070) | ||
435 | #define IXP2000_MSF_TX_CALENDAR_LENGTH IXP2000_MSF_REG(0x0070) | ||
436 | #define IXP2000_MSF_RX_UP_CONTROL_0 IXP2000_MSF_REG(0x0080) | ||
437 | #define IXP2000_MSF_RX_UP_CONTROL_1 IXP2000_MSF_REG(0x0084) | ||
438 | #define IXP2000_MSF_RX_UP_CONTROL_2 IXP2000_MSF_REG(0x0088) | ||
439 | #define IXP2000_MSF_RX_UP_CONTROL_3 IXP2000_MSF_REG(0x008c) | ||
440 | #define IXP2000_MSF_TX_UP_CONTROL_0 IXP2000_MSF_REG(0x0090) | ||
441 | #define IXP2000_MSF_TX_UP_CONTROL_1 IXP2000_MSF_REG(0x0094) | ||
442 | #define IXP2000_MSF_TX_UP_CONTROL_2 IXP2000_MSF_REG(0x0098) | ||
443 | #define IXP2000_MSF_TX_UP_CONTROL_3 IXP2000_MSF_REG(0x009c) | ||
444 | #define IXP2000_MSF_TRAIN_DATA IXP2000_MSF_REG(0x00a0) | ||
445 | #define IXP2000_MSF_TRAIN_CALENDAR IXP2000_MSF_REG(0x00a4) | ||
446 | #define IXP2000_MSF_TRAIN_FLOW_CONTROL IXP2000_MSF_REG(0x00a8) | ||
447 | #define IXP2000_MSF_TX_CALENDAR_0 IXP2000_MSF_REG(0x1000) | ||
448 | #define IXP2000_MSF_RX_PORT_CALENDAR_STATUS IXP2000_MSF_REG(0x1400) | ||
449 | |||
450 | |||
451 | #endif /* _IXP2000_H_ */ | ||
diff --git a/arch/arm/mach-ixp2000/include/mach/memory.h b/arch/arm/mach-ixp2000/include/mach/memory.h deleted file mode 100644 index 5f0c4fd4076..00000000000 --- a/arch/arm/mach-ixp2000/include/mach/memory.h +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/include/mach/memory.h | ||
3 | * | ||
4 | * Copyright (c) 2002 Intel Corp. | ||
5 | * Copyright (c) 2003-2004 MontaVista Software, Inc. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License as published by the | ||
9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
10 | * option) any later version. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_MEMORY_H | ||
14 | #define __ASM_ARCH_MEMORY_H | ||
15 | |||
16 | #define PLAT_PHYS_OFFSET UL(0x00000000) | ||
17 | |||
18 | #include <mach/ixp2000-regs.h> | ||
19 | |||
20 | #define IXP2000_PCI_SDRAM_OFFSET (*IXP2000_PCI_SDRAM_BAR & 0xfffffff0) | ||
21 | |||
22 | #define __phys_to_bus(x) ((x) + (IXP2000_PCI_SDRAM_OFFSET - PHYS_OFFSET)) | ||
23 | #define __bus_to_phys(x) ((x) - (IXP2000_PCI_SDRAM_OFFSET - PHYS_OFFSET)) | ||
24 | |||
25 | #define __virt_to_bus(v) __phys_to_bus(__virt_to_phys(v)) | ||
26 | #define __bus_to_virt(b) __phys_to_virt(__bus_to_phys(b)) | ||
27 | #define __pfn_to_bus(p) __phys_to_bus(__pfn_to_phys(p)) | ||
28 | #define __bus_to_pfn(b) __phys_to_pfn(__bus_to_phys(b)) | ||
29 | |||
30 | #endif | ||
31 | |||
diff --git a/arch/arm/mach-ixp2000/include/mach/platform.h b/arch/arm/mach-ixp2000/include/mach/platform.h deleted file mode 100644 index bb0f8dcf9ee..00000000000 --- a/arch/arm/mach-ixp2000/include/mach/platform.h +++ /dev/null | |||
@@ -1,153 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/include/mach/platform.h | ||
3 | * | ||
4 | * Various bits of code used by platform-level code. | ||
5 | * | ||
6 | * Author: Deepak Saxena <dsaxena@plexity.net> | ||
7 | * | ||
8 | * Copyright 2004 (c) MontaVista Software, Inc. | ||
9 | * | ||
10 | * This file is licensed under the terms of the GNU General Public | ||
11 | * License version 2. This program is licensed "as is" without any | ||
12 | * warranty of any kind, whether express or implied. | ||
13 | */ | ||
14 | |||
15 | |||
16 | #ifndef __ASSEMBLY__ | ||
17 | |||
18 | static inline unsigned long ixp2000_reg_read(volatile void *reg) | ||
19 | { | ||
20 | return *((volatile unsigned long *)reg); | ||
21 | } | ||
22 | |||
23 | static inline void ixp2000_reg_write(volatile void *reg, unsigned long val) | ||
24 | { | ||
25 | *((volatile unsigned long *)reg) = val; | ||
26 | } | ||
27 | |||
28 | /* | ||
29 | * On the IXP2400, we can't use XCB=000 due to chip bugs. We use | ||
30 | * XCB=101 instead, but that makes all I/O accesses bufferable. This | ||
31 | * is not a problem in general, but we do have to be slightly more | ||
32 | * careful because I/O writes are no longer automatically flushed out | ||
33 | * of the write buffer. | ||
34 | * | ||
35 | * In cases where we want to make sure that a write has been flushed | ||
36 | * out of the write buffer before we proceed, for example when masking | ||
37 | * a device interrupt before re-enabling IRQs in CPSR, we can use this | ||
38 | * function, ixp2000_reg_wrb, which performs a write, a readback, and | ||
39 | * issues a dummy instruction dependent on the value of the readback | ||
40 | * (mov rX, rX) to make sure that the readback has completed before we | ||
41 | * continue. | ||
42 | */ | ||
43 | static inline void ixp2000_reg_wrb(volatile void *reg, unsigned long val) | ||
44 | { | ||
45 | unsigned long dummy; | ||
46 | |||
47 | *((volatile unsigned long *)reg) = val; | ||
48 | |||
49 | dummy = *((volatile unsigned long *)reg); | ||
50 | __asm__ __volatile__("mov %0, %0" : "+r" (dummy)); | ||
51 | } | ||
52 | |||
53 | /* | ||
54 | * Boards may multiplex different devices on the 2nd channel of | ||
55 | * the slowport interface that each need different configuration | ||
56 | * settings. For example, the IXDP2400 uses channel 2 on the interface | ||
57 | * to access the CPLD, the switch fabric card, and the media card. Each | ||
58 | * one needs a different mode so drivers must save/restore the mode | ||
59 | * before and after each operation. | ||
60 | * | ||
61 | * acquire_slowport(&your_config); | ||
62 | * ... | ||
63 | * do slowport operations | ||
64 | * ... | ||
65 | * release_slowport(); | ||
66 | * | ||
67 | * Note that while you have the slowport, you are holding a spinlock, | ||
68 | * so your code should be written as if you explicitly acquired a lock. | ||
69 | * | ||
70 | * The configuration only affects device 2 on the slowport, so the | ||
71 | * MTD map driver does not acquire/release the slowport. | ||
72 | */ | ||
73 | struct slowport_cfg { | ||
74 | unsigned long CCR; /* Clock divide */ | ||
75 | unsigned long WTC; /* Write Timing Control */ | ||
76 | unsigned long RTC; /* Read Timing Control */ | ||
77 | unsigned long PCR; /* Protocol Control Register */ | ||
78 | unsigned long ADC; /* Address/Data Width Control */ | ||
79 | }; | ||
80 | |||
81 | |||
82 | void ixp2000_acquire_slowport(struct slowport_cfg *, struct slowport_cfg *); | ||
83 | void ixp2000_release_slowport(struct slowport_cfg *); | ||
84 | |||
85 | /* | ||
86 | * IXP2400 A0/A1 and IXP2800 A0/A1/A2 have broken slowport that requires | ||
87 | * tweaking of addresses in the MTD driver. | ||
88 | */ | ||
89 | static inline unsigned ixp2000_has_broken_slowport(void) | ||
90 | { | ||
91 | unsigned long id = *IXP2000_PRODUCT_ID; | ||
92 | unsigned long id_prod = id & (IXP2000_MAJ_PROD_TYPE_MASK | | ||
93 | IXP2000_MIN_PROD_TYPE_MASK); | ||
94 | return (((id_prod == | ||
95 | /* fixed in IXP2400-B0 */ | ||
96 | (IXP2000_MAJ_PROD_TYPE_IXP2000 | | ||
97 | IXP2000_MIN_PROD_TYPE_IXP2400)) && | ||
98 | ((id & IXP2000_MAJ_REV_MASK) == 0)) || | ||
99 | ((id_prod == | ||
100 | /* fixed in IXP2800-B0 */ | ||
101 | (IXP2000_MAJ_PROD_TYPE_IXP2000 | | ||
102 | IXP2000_MIN_PROD_TYPE_IXP2800)) && | ||
103 | ((id & IXP2000_MAJ_REV_MASK) == 0)) || | ||
104 | ((id_prod == | ||
105 | /* fixed in IXP2850-B0 */ | ||
106 | (IXP2000_MAJ_PROD_TYPE_IXP2000 | | ||
107 | IXP2000_MIN_PROD_TYPE_IXP2850)) && | ||
108 | ((id & IXP2000_MAJ_REV_MASK) == 0))); | ||
109 | } | ||
110 | |||
111 | static inline unsigned int ixp2000_has_flash(void) | ||
112 | { | ||
113 | return ((*IXP2000_STRAP_OPTIONS) & (CFG_BOOT_PROM)); | ||
114 | } | ||
115 | |||
116 | static inline unsigned int ixp2000_is_pcimaster(void) | ||
117 | { | ||
118 | return ((*IXP2000_STRAP_OPTIONS) & (CFG_PCI_BOOT_HOST)); | ||
119 | } | ||
120 | |||
121 | void ixp2000_map_io(void); | ||
122 | void ixp2000_uart_init(void); | ||
123 | void ixp2000_init_irq(void); | ||
124 | void ixp2000_init_time(unsigned long); | ||
125 | void ixp2000_restart(char, const char *); | ||
126 | unsigned long ixp2000_gettimeoffset(void); | ||
127 | |||
128 | struct pci_sys_data; | ||
129 | |||
130 | u32 *ixp2000_pci_config_addr(unsigned int bus, unsigned int devfn, int where); | ||
131 | void ixp2000_pci_preinit(void); | ||
132 | int ixp2000_pci_setup(int, struct pci_sys_data*); | ||
133 | struct pci_bus* ixp2000_pci_scan_bus(int, struct pci_sys_data*); | ||
134 | int ixp2000_pci_read_config(struct pci_bus*, unsigned int, int, int, u32 *); | ||
135 | int ixp2000_pci_write_config(struct pci_bus*, unsigned int, int, int, u32); | ||
136 | |||
137 | /* | ||
138 | * Several of the IXP2000 systems have banked flash so we need to extend the | ||
139 | * flash_platform_data structure with some private pointers | ||
140 | */ | ||
141 | struct ixp2000_flash_data { | ||
142 | struct flash_platform_data *platform_data; | ||
143 | int nr_banks; | ||
144 | unsigned long (*bank_setup)(unsigned long); | ||
145 | }; | ||
146 | |||
147 | struct ixp2000_i2c_pins { | ||
148 | unsigned long sda_pin; | ||
149 | unsigned long scl_pin; | ||
150 | }; | ||
151 | |||
152 | |||
153 | #endif /* !__ASSEMBLY__ */ | ||
diff --git a/arch/arm/mach-ixp2000/include/mach/timex.h b/arch/arm/mach-ixp2000/include/mach/timex.h deleted file mode 100644 index 835e659f93d..00000000000 --- a/arch/arm/mach-ixp2000/include/mach/timex.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/include/mach/timex.h | ||
3 | * | ||
4 | * IXP2000 architecture timex specifications | ||
5 | */ | ||
6 | |||
7 | |||
8 | /* | ||
9 | * Default clock is 50MHz APB, but platform code can override this | ||
10 | */ | ||
11 | #define CLOCK_TICK_RATE 50000000 | ||
12 | |||
13 | |||
diff --git a/arch/arm/mach-ixp2000/include/mach/uncompress.h b/arch/arm/mach-ixp2000/include/mach/uncompress.h deleted file mode 100644 index ce363087df7..00000000000 --- a/arch/arm/mach-ixp2000/include/mach/uncompress.h +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/include/mach/uncompress.h | ||
3 | * | ||
4 | * | ||
5 | * Original Author: Naeem Afzal <naeem.m.afzal@intel.com> | ||
6 | * Maintainer: Deepak Saxena <dsaxena@plexity.net> | ||
7 | * | ||
8 | * Copyright 2002 Intel Corp. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify it | ||
11 | * under the terms of the GNU General Public License as published by the | ||
12 | * Free Software Foundation; either version 2 of the License, or (at your | ||
13 | * option) any later version. | ||
14 | * | ||
15 | */ | ||
16 | |||
17 | #include <linux/serial_reg.h> | ||
18 | |||
19 | #define UART_BASE 0xc0030000 | ||
20 | |||
21 | #define PHYS(x) ((volatile unsigned long *)(UART_BASE + x)) | ||
22 | |||
23 | #define UARTDR PHYS(0x00) /* Transmit reg dlab=0 */ | ||
24 | #define UARTDLL PHYS(0x00) /* Divisor Latch reg dlab=1*/ | ||
25 | #define UARTDLM PHYS(0x04) /* Divisor Latch reg dlab=1*/ | ||
26 | #define UARTIER PHYS(0x04) /* Interrupt enable reg */ | ||
27 | #define UARTFCR PHYS(0x08) /* FIFO control reg dlab =0*/ | ||
28 | #define UARTLCR PHYS(0x0c) /* Control reg */ | ||
29 | #define UARTSR PHYS(0x14) /* Status reg */ | ||
30 | |||
31 | |||
32 | static inline void putc(int c) | ||
33 | { | ||
34 | int j = 0x1000; | ||
35 | |||
36 | while (--j && !(*UARTSR & UART_LSR_THRE)) | ||
37 | barrier(); | ||
38 | |||
39 | *UARTDR = c; | ||
40 | } | ||
41 | |||
42 | static inline void flush(void) | ||
43 | { | ||
44 | } | ||
45 | |||
46 | #define arch_decomp_setup() | ||
47 | #define arch_decomp_wdog() | ||
diff --git a/arch/arm/mach-ixp2000/ixdp2400.c b/arch/arm/mach-ixp2000/ixdp2400.c deleted file mode 100644 index 915ad49e3b8..00000000000 --- a/arch/arm/mach-ixp2000/ixdp2400.c +++ /dev/null | |||
@@ -1,180 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/ixdp2400.c | ||
3 | * | ||
4 | * IXDP2400 platform support | ||
5 | * | ||
6 | * Original Author: Naeem Afzal <naeem.m.afzal@intel.com> | ||
7 | * Maintainer: Deepak Saxena <dsaxena@plexity.net> | ||
8 | * | ||
9 | * Copyright (C) 2002 Intel Corp. | ||
10 | * Copyright (C) 2003-2004 MontaVista Software, Inc. | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify it | ||
13 | * under the terms of the GNU General Public License as published by the | ||
14 | * Free Software Foundation; either version 2 of the License, or (at your | ||
15 | * option) any later version. | ||
16 | */ | ||
17 | #include <linux/kernel.h> | ||
18 | #include <linux/init.h> | ||
19 | #include <linux/mm.h> | ||
20 | #include <linux/sched.h> | ||
21 | #include <linux/interrupt.h> | ||
22 | #include <linux/device.h> | ||
23 | #include <linux/bitops.h> | ||
24 | #include <linux/pci.h> | ||
25 | #include <linux/ioport.h> | ||
26 | #include <linux/delay.h> | ||
27 | #include <linux/io.h> | ||
28 | |||
29 | #include <asm/irq.h> | ||
30 | #include <asm/pgtable.h> | ||
31 | #include <asm/page.h> | ||
32 | #include <mach/hardware.h> | ||
33 | #include <asm/mach-types.h> | ||
34 | |||
35 | #include <asm/mach/pci.h> | ||
36 | #include <asm/mach/map.h> | ||
37 | #include <asm/mach/irq.h> | ||
38 | #include <asm/mach/time.h> | ||
39 | #include <asm/mach/flash.h> | ||
40 | #include <asm/mach/arch.h> | ||
41 | |||
42 | /************************************************************************* | ||
43 | * IXDP2400 timer tick | ||
44 | *************************************************************************/ | ||
45 | static void __init ixdp2400_timer_init(void) | ||
46 | { | ||
47 | int numerator, denominator; | ||
48 | int denom_array[] = {2, 4, 8, 16, 1, 2, 4, 8}; | ||
49 | |||
50 | numerator = (*(IXDP2400_CPLD_SYS_CLK_M) & 0xFF) *2; | ||
51 | denominator = denom_array[(*(IXDP2400_CPLD_SYS_CLK_N) & 0x7)]; | ||
52 | |||
53 | ixp2000_init_time(((3125000 * numerator) / (denominator)) / 2); | ||
54 | } | ||
55 | |||
56 | static struct sys_timer ixdp2400_timer = { | ||
57 | .init = ixdp2400_timer_init, | ||
58 | .offset = ixp2000_gettimeoffset, | ||
59 | }; | ||
60 | |||
61 | /************************************************************************* | ||
62 | * IXDP2400 PCI | ||
63 | *************************************************************************/ | ||
64 | void __init ixdp2400_pci_preinit(void) | ||
65 | { | ||
66 | ixp2000_reg_write(IXP2000_PCI_ADDR_EXT, 0x00100000); | ||
67 | ixp2000_pci_preinit(); | ||
68 | pcibios_setup("firmware"); | ||
69 | } | ||
70 | |||
71 | int ixdp2400_pci_setup(int nr, struct pci_sys_data *sys) | ||
72 | { | ||
73 | sys->mem_offset = 0xe0000000; | ||
74 | |||
75 | ixp2000_pci_setup(nr, sys); | ||
76 | |||
77 | return 1; | ||
78 | } | ||
79 | |||
80 | static int __init ixdp2400_pci_map_irq(const struct pci_dev *dev, u8 slot, | ||
81 | u8 pin) | ||
82 | { | ||
83 | if (ixdp2x00_master_npu()) { | ||
84 | |||
85 | /* | ||
86 | * Root bus devices. Slave NPU is only one with interrupt. | ||
87 | * Everything else, we just return -1 b/c nothing else | ||
88 | * on the root bus has interrupts. | ||
89 | */ | ||
90 | if(!dev->bus->self) { | ||
91 | if(dev->devfn == IXDP2X00_SLAVE_NPU_DEVFN ) | ||
92 | return IRQ_IXDP2400_INGRESS_NPU; | ||
93 | |||
94 | return -1; | ||
95 | } | ||
96 | |||
97 | /* | ||
98 | * Bridge behind the PMC slot. | ||
99 | * NOTE: Only INTA from the PMC slot is routed. VERY BAD. | ||
100 | */ | ||
101 | if(dev->bus->self->devfn == IXDP2X00_PMC_DEVFN && | ||
102 | dev->bus->parent->self->devfn == IXDP2X00_P2P_DEVFN && | ||
103 | !dev->bus->parent->self->bus->parent) | ||
104 | return IRQ_IXDP2400_PMC; | ||
105 | |||
106 | /* | ||
107 | * Device behind the first bridge | ||
108 | */ | ||
109 | if(dev->bus->self->devfn == IXDP2X00_P2P_DEVFN) { | ||
110 | switch(dev->devfn) { | ||
111 | case IXDP2400_MASTER_ENET_DEVFN: | ||
112 | return IRQ_IXDP2400_ENET; | ||
113 | |||
114 | case IXDP2400_MEDIA_DEVFN: | ||
115 | return IRQ_IXDP2400_MEDIA_PCI; | ||
116 | |||
117 | case IXDP2400_SWITCH_FABRIC_DEVFN: | ||
118 | return IRQ_IXDP2400_SF_PCI; | ||
119 | |||
120 | case IXDP2X00_PMC_DEVFN: | ||
121 | return IRQ_IXDP2400_PMC; | ||
122 | } | ||
123 | } | ||
124 | |||
125 | return -1; | ||
126 | } else return IRQ_IXP2000_PCIB; /* Slave NIC interrupt */ | ||
127 | } | ||
128 | |||
129 | |||
130 | static void ixdp2400_pci_postinit(void) | ||
131 | { | ||
132 | struct pci_dev *dev; | ||
133 | |||
134 | if (ixdp2x00_master_npu()) { | ||
135 | dev = pci_get_bus_and_slot(1, IXDP2400_SLAVE_ENET_DEVFN); | ||
136 | pci_stop_and_remove_bus_device(dev); | ||
137 | pci_dev_put(dev); | ||
138 | } else { | ||
139 | dev = pci_get_bus_and_slot(1, IXDP2400_MASTER_ENET_DEVFN); | ||
140 | pci_stop_and_remove_bus_device(dev); | ||
141 | pci_dev_put(dev); | ||
142 | |||
143 | ixdp2x00_slave_pci_postinit(); | ||
144 | } | ||
145 | } | ||
146 | |||
147 | static struct hw_pci ixdp2400_pci __initdata = { | ||
148 | .nr_controllers = 1, | ||
149 | .setup = ixdp2400_pci_setup, | ||
150 | .preinit = ixdp2400_pci_preinit, | ||
151 | .postinit = ixdp2400_pci_postinit, | ||
152 | .scan = ixp2000_pci_scan_bus, | ||
153 | .map_irq = ixdp2400_pci_map_irq, | ||
154 | }; | ||
155 | |||
156 | int __init ixdp2400_pci_init(void) | ||
157 | { | ||
158 | if (machine_is_ixdp2400()) | ||
159 | pci_common_init(&ixdp2400_pci); | ||
160 | |||
161 | return 0; | ||
162 | } | ||
163 | |||
164 | subsys_initcall(ixdp2400_pci_init); | ||
165 | |||
166 | void __init ixdp2400_init_irq(void) | ||
167 | { | ||
168 | ixdp2x00_init_irq(IXDP2400_CPLD_INT_STAT, IXDP2400_CPLD_INT_MASK, IXDP2400_NR_IRQS); | ||
169 | } | ||
170 | |||
171 | MACHINE_START(IXDP2400, "Intel IXDP2400 Development Platform") | ||
172 | /* Maintainer: MontaVista Software, Inc. */ | ||
173 | .atag_offset = 0x100, | ||
174 | .map_io = ixdp2x00_map_io, | ||
175 | .init_irq = ixdp2400_init_irq, | ||
176 | .timer = &ixdp2400_timer, | ||
177 | .init_machine = ixdp2x00_init_machine, | ||
178 | .restart = ixp2000_restart, | ||
179 | MACHINE_END | ||
180 | |||
diff --git a/arch/arm/mach-ixp2000/ixdp2800.c b/arch/arm/mach-ixp2000/ixdp2800.c deleted file mode 100644 index a9f1819ea04..00000000000 --- a/arch/arm/mach-ixp2000/ixdp2800.c +++ /dev/null | |||
@@ -1,295 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/ixdp2800.c | ||
3 | * | ||
4 | * IXDP2800 platform support | ||
5 | * | ||
6 | * Original Author: Jeffrey Daly <jeffrey.daly@intel.com> | ||
7 | * Maintainer: Deepak Saxena <dsaxena@plexity.net> | ||
8 | * | ||
9 | * Copyright (C) 2002 Intel Corp. | ||
10 | * Copyright (C) 2003-2004 MontaVista Software, Inc. | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify it | ||
13 | * under the terms of the GNU General Public License as published by the | ||
14 | * Free Software Foundation; either version 2 of the License, or (at your | ||
15 | * option) any later version. | ||
16 | */ | ||
17 | #include <linux/kernel.h> | ||
18 | #include <linux/init.h> | ||
19 | #include <linux/mm.h> | ||
20 | #include <linux/sched.h> | ||
21 | #include <linux/interrupt.h> | ||
22 | #include <linux/device.h> | ||
23 | #include <linux/bitops.h> | ||
24 | #include <linux/pci.h> | ||
25 | #include <linux/ioport.h> | ||
26 | #include <linux/delay.h> | ||
27 | #include <linux/io.h> | ||
28 | |||
29 | #include <asm/irq.h> | ||
30 | #include <asm/pgtable.h> | ||
31 | #include <asm/page.h> | ||
32 | #include <mach/hardware.h> | ||
33 | #include <asm/mach-types.h> | ||
34 | |||
35 | #include <asm/mach/pci.h> | ||
36 | #include <asm/mach/map.h> | ||
37 | #include <asm/mach/irq.h> | ||
38 | #include <asm/mach/time.h> | ||
39 | #include <asm/mach/flash.h> | ||
40 | #include <asm/mach/arch.h> | ||
41 | |||
42 | /************************************************************************* | ||
43 | * IXDP2800 timer tick | ||
44 | *************************************************************************/ | ||
45 | |||
46 | static void __init ixdp2800_timer_init(void) | ||
47 | { | ||
48 | ixp2000_init_time(50000000); | ||
49 | } | ||
50 | |||
51 | static struct sys_timer ixdp2800_timer = { | ||
52 | .init = ixdp2800_timer_init, | ||
53 | .offset = ixp2000_gettimeoffset, | ||
54 | }; | ||
55 | |||
56 | /************************************************************************* | ||
57 | * IXDP2800 PCI | ||
58 | *************************************************************************/ | ||
59 | static void __init ixdp2800_slave_disable_pci_master(void) | ||
60 | { | ||
61 | *IXP2000_PCI_CMDSTAT &= ~(PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY); | ||
62 | } | ||
63 | |||
64 | static void __init ixdp2800_master_wait_for_slave(void) | ||
65 | { | ||
66 | volatile u32 *addr; | ||
67 | |||
68 | printk(KERN_INFO "IXDP2800: waiting for slave NPU to configure " | ||
69 | "its BAR sizes\n"); | ||
70 | |||
71 | addr = ixp2000_pci_config_addr(0, IXDP2X00_SLAVE_NPU_DEVFN, | ||
72 | PCI_BASE_ADDRESS_1); | ||
73 | do { | ||
74 | *addr = 0xffffffff; | ||
75 | cpu_relax(); | ||
76 | } while (*addr != 0xfe000008); | ||
77 | |||
78 | addr = ixp2000_pci_config_addr(0, IXDP2X00_SLAVE_NPU_DEVFN, | ||
79 | PCI_BASE_ADDRESS_2); | ||
80 | do { | ||
81 | *addr = 0xffffffff; | ||
82 | cpu_relax(); | ||
83 | } while (*addr != 0xc0000008); | ||
84 | |||
85 | /* | ||
86 | * Configure the slave's SDRAM BAR by hand. | ||
87 | */ | ||
88 | *addr = 0x40000008; | ||
89 | } | ||
90 | |||
91 | static void __init ixdp2800_slave_wait_for_master_enable(void) | ||
92 | { | ||
93 | printk(KERN_INFO "IXDP2800: waiting for master NPU to enable us\n"); | ||
94 | |||
95 | while ((*IXP2000_PCI_CMDSTAT & PCI_COMMAND_MASTER) == 0) | ||
96 | cpu_relax(); | ||
97 | } | ||
98 | |||
99 | void __init ixdp2800_pci_preinit(void) | ||
100 | { | ||
101 | printk("ixdp2x00_pci_preinit called\n"); | ||
102 | |||
103 | *IXP2000_PCI_ADDR_EXT = 0x0001e000; | ||
104 | |||
105 | if (!ixdp2x00_master_npu()) | ||
106 | ixdp2800_slave_disable_pci_master(); | ||
107 | |||
108 | *IXP2000_PCI_SRAM_BASE_ADDR_MASK = (0x2000000 - 1) & ~0x3ffff; | ||
109 | *IXP2000_PCI_DRAM_BASE_ADDR_MASK = (0x40000000 - 1) & ~0xfffff; | ||
110 | |||
111 | ixp2000_pci_preinit(); | ||
112 | |||
113 | if (ixdp2x00_master_npu()) { | ||
114 | /* | ||
115 | * Wait until the slave set its SRAM/SDRAM BAR sizes | ||
116 | * correctly before we proceed to scan and enumerate | ||
117 | * the bus. | ||
118 | */ | ||
119 | ixdp2800_master_wait_for_slave(); | ||
120 | |||
121 | /* | ||
122 | * We configure the SDRAM BARs by hand because they | ||
123 | * are 1G and fall outside of the regular allocated | ||
124 | * PCI address space. | ||
125 | */ | ||
126 | *IXP2000_PCI_SDRAM_BAR = 0x00000008; | ||
127 | } else { | ||
128 | /* | ||
129 | * Wait for the master to complete scanning the bus | ||
130 | * and assigning resources before we proceed to scan | ||
131 | * the bus ourselves. Set pci=firmware to honor the | ||
132 | * master's resource assignment. | ||
133 | */ | ||
134 | ixdp2800_slave_wait_for_master_enable(); | ||
135 | pcibios_setup("firmware"); | ||
136 | } | ||
137 | } | ||
138 | |||
139 | /* | ||
140 | * We assign the SDRAM BARs for the two IXP2800 CPUs by hand, outside | ||
141 | * of the regular PCI window, because there's only 512M of outbound PCI | ||
142 | * memory window on each IXP, while we need 1G for each of the BARs. | ||
143 | */ | ||
144 | static void __devinit ixp2800_pci_fixup(struct pci_dev *dev) | ||
145 | { | ||
146 | if (machine_is_ixdp2800()) { | ||
147 | dev->resource[2].start = 0; | ||
148 | dev->resource[2].end = 0; | ||
149 | dev->resource[2].flags = 0; | ||
150 | } | ||
151 | } | ||
152 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IXP2800, ixp2800_pci_fixup); | ||
153 | |||
154 | static int __init ixdp2800_pci_setup(int nr, struct pci_sys_data *sys) | ||
155 | { | ||
156 | sys->mem_offset = 0x00000000; | ||
157 | |||
158 | ixp2000_pci_setup(nr, sys); | ||
159 | |||
160 | return 1; | ||
161 | } | ||
162 | |||
163 | static int __init ixdp2800_pci_map_irq(const struct pci_dev *dev, u8 slot, | ||
164 | u8 pin) | ||
165 | { | ||
166 | if (ixdp2x00_master_npu()) { | ||
167 | |||
168 | /* | ||
169 | * Root bus devices. Slave NPU is only one with interrupt. | ||
170 | * Everything else, we just return -1 which is invalid. | ||
171 | */ | ||
172 | if(!dev->bus->self) { | ||
173 | if(dev->devfn == IXDP2X00_SLAVE_NPU_DEVFN ) | ||
174 | return IRQ_IXDP2800_INGRESS_NPU; | ||
175 | |||
176 | return -1; | ||
177 | } | ||
178 | |||
179 | /* | ||
180 | * Bridge behind the PMC slot. | ||
181 | */ | ||
182 | if(dev->bus->self->devfn == IXDP2X00_PMC_DEVFN && | ||
183 | dev->bus->parent->self->devfn == IXDP2X00_P2P_DEVFN && | ||
184 | !dev->bus->parent->self->bus->parent) | ||
185 | return IRQ_IXDP2800_PMC; | ||
186 | |||
187 | /* | ||
188 | * Device behind the first bridge | ||
189 | */ | ||
190 | if(dev->bus->self->devfn == IXDP2X00_P2P_DEVFN) { | ||
191 | switch(dev->devfn) { | ||
192 | case IXDP2X00_PMC_DEVFN: | ||
193 | return IRQ_IXDP2800_PMC; | ||
194 | |||
195 | case IXDP2800_MASTER_ENET_DEVFN: | ||
196 | return IRQ_IXDP2800_EGRESS_ENET; | ||
197 | |||
198 | case IXDP2800_SWITCH_FABRIC_DEVFN: | ||
199 | return IRQ_IXDP2800_FABRIC; | ||
200 | } | ||
201 | } | ||
202 | |||
203 | return -1; | ||
204 | } else return IRQ_IXP2000_PCIB; /* Slave NIC interrupt */ | ||
205 | } | ||
206 | |||
207 | static void __init ixdp2800_master_enable_slave(void) | ||
208 | { | ||
209 | volatile u32 *addr; | ||
210 | |||
211 | printk(KERN_INFO "IXDP2800: enabling slave NPU\n"); | ||
212 | |||
213 | addr = (volatile u32 *)ixp2000_pci_config_addr(0, | ||
214 | IXDP2X00_SLAVE_NPU_DEVFN, | ||
215 | PCI_COMMAND); | ||
216 | |||
217 | *addr |= PCI_COMMAND_MASTER; | ||
218 | } | ||
219 | |||
220 | static void __init ixdp2800_master_wait_for_slave_bus_scan(void) | ||
221 | { | ||
222 | volatile u32 *addr; | ||
223 | |||
224 | printk(KERN_INFO "IXDP2800: waiting for slave to finish bus scan\n"); | ||
225 | |||
226 | addr = (volatile u32 *)ixp2000_pci_config_addr(0, | ||
227 | IXDP2X00_SLAVE_NPU_DEVFN, | ||
228 | PCI_COMMAND); | ||
229 | while ((*addr & PCI_COMMAND_MEMORY) == 0) | ||
230 | cpu_relax(); | ||
231 | } | ||
232 | |||
233 | static void __init ixdp2800_slave_signal_bus_scan_completion(void) | ||
234 | { | ||
235 | printk(KERN_INFO "IXDP2800: bus scan done, signaling master\n"); | ||
236 | *IXP2000_PCI_CMDSTAT |= PCI_COMMAND_MEMORY; | ||
237 | } | ||
238 | |||
239 | static void __init ixdp2800_pci_postinit(void) | ||
240 | { | ||
241 | if (!ixdp2x00_master_npu()) { | ||
242 | ixdp2x00_slave_pci_postinit(); | ||
243 | ixdp2800_slave_signal_bus_scan_completion(); | ||
244 | } | ||
245 | } | ||
246 | |||
247 | struct __initdata hw_pci ixdp2800_pci __initdata = { | ||
248 | .nr_controllers = 1, | ||
249 | .setup = ixdp2800_pci_setup, | ||
250 | .preinit = ixdp2800_pci_preinit, | ||
251 | .postinit = ixdp2800_pci_postinit, | ||
252 | .scan = ixp2000_pci_scan_bus, | ||
253 | .map_irq = ixdp2800_pci_map_irq, | ||
254 | }; | ||
255 | |||
256 | int __init ixdp2800_pci_init(void) | ||
257 | { | ||
258 | if (machine_is_ixdp2800()) { | ||
259 | struct pci_dev *dev; | ||
260 | |||
261 | pci_common_init(&ixdp2800_pci); | ||
262 | if (ixdp2x00_master_npu()) { | ||
263 | dev = pci_get_bus_and_slot(1, IXDP2800_SLAVE_ENET_DEVFN); | ||
264 | pci_stop_and_remove_bus_device(dev); | ||
265 | pci_dev_put(dev); | ||
266 | |||
267 | ixdp2800_master_enable_slave(); | ||
268 | ixdp2800_master_wait_for_slave_bus_scan(); | ||
269 | } else { | ||
270 | dev = pci_get_bus_and_slot(1, IXDP2800_MASTER_ENET_DEVFN); | ||
271 | pci_stop_and_remove_bus_device(dev); | ||
272 | pci_dev_put(dev); | ||
273 | } | ||
274 | } | ||
275 | |||
276 | return 0; | ||
277 | } | ||
278 | |||
279 | subsys_initcall(ixdp2800_pci_init); | ||
280 | |||
281 | void __init ixdp2800_init_irq(void) | ||
282 | { | ||
283 | ixdp2x00_init_irq(IXDP2800_CPLD_INT_STAT, IXDP2800_CPLD_INT_MASK, IXDP2800_NR_IRQS); | ||
284 | } | ||
285 | |||
286 | MACHINE_START(IXDP2800, "Intel IXDP2800 Development Platform") | ||
287 | /* Maintainer: MontaVista Software, Inc. */ | ||
288 | .atag_offset = 0x100, | ||
289 | .map_io = ixdp2x00_map_io, | ||
290 | .init_irq = ixdp2800_init_irq, | ||
291 | .timer = &ixdp2800_timer, | ||
292 | .init_machine = ixdp2x00_init_machine, | ||
293 | .restart = ixp2000_restart, | ||
294 | MACHINE_END | ||
295 | |||
diff --git a/arch/arm/mach-ixp2000/ixdp2x00.c b/arch/arm/mach-ixp2000/ixdp2x00.c deleted file mode 100644 index 421e38dc0fa..00000000000 --- a/arch/arm/mach-ixp2000/ixdp2x00.c +++ /dev/null | |||
@@ -1,306 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/ixdp2x00.c | ||
3 | * | ||
4 | * Code common to IXDP2400 and IXDP2800 platforms. | ||
5 | * | ||
6 | * Original Author: Naeem Afzal <naeem.m.afzal@intel.com> | ||
7 | * Maintainer: Deepak Saxena <dsaxena@plexity.net> | ||
8 | * | ||
9 | * Copyright (C) 2002 Intel Corp. | ||
10 | * Copyright (C) 2003-2004 MontaVista Software, Inc. | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify it | ||
13 | * under the terms of the GNU General Public License as published by the | ||
14 | * Free Software Foundation; either version 2 of the License, or (at your | ||
15 | * option) any later version. | ||
16 | */ | ||
17 | #include <linux/gpio.h> | ||
18 | #include <linux/kernel.h> | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/mm.h> | ||
21 | #include <linux/sched.h> | ||
22 | #include <linux/interrupt.h> | ||
23 | #include <linux/platform_device.h> | ||
24 | #include <linux/bitops.h> | ||
25 | #include <linux/pci.h> | ||
26 | #include <linux/ioport.h> | ||
27 | #include <linux/delay.h> | ||
28 | #include <linux/io.h> | ||
29 | |||
30 | #include <asm/irq.h> | ||
31 | #include <asm/pgtable.h> | ||
32 | #include <asm/page.h> | ||
33 | #include <mach/hardware.h> | ||
34 | #include <asm/mach-types.h> | ||
35 | |||
36 | #include <asm/mach/pci.h> | ||
37 | #include <asm/mach/map.h> | ||
38 | #include <asm/mach/irq.h> | ||
39 | #include <asm/mach/time.h> | ||
40 | #include <asm/mach/flash.h> | ||
41 | #include <asm/mach/arch.h> | ||
42 | |||
43 | #include <mach/gpio-ixp2000.h> | ||
44 | |||
45 | /************************************************************************* | ||
46 | * IXDP2x00 IRQ Initialization | ||
47 | *************************************************************************/ | ||
48 | static volatile unsigned long *board_irq_mask; | ||
49 | static volatile unsigned long *board_irq_stat; | ||
50 | static unsigned long board_irq_count; | ||
51 | |||
52 | #ifdef CONFIG_ARCH_IXDP2400 | ||
53 | /* | ||
54 | * Slowport configuration for accessing CPLD registers on IXDP2x00 | ||
55 | */ | ||
56 | static struct slowport_cfg slowport_cpld_cfg = { | ||
57 | .CCR = SLOWPORT_CCR_DIV_2, | ||
58 | .WTC = 0x00000070, | ||
59 | .RTC = 0x00000070, | ||
60 | .PCR = SLOWPORT_MODE_FLASH, | ||
61 | .ADC = SLOWPORT_ADDR_WIDTH_24 | SLOWPORT_DATA_WIDTH_8 | ||
62 | }; | ||
63 | #endif | ||
64 | |||
65 | static void ixdp2x00_irq_mask(struct irq_data *d) | ||
66 | { | ||
67 | unsigned long dummy; | ||
68 | static struct slowport_cfg old_cfg; | ||
69 | |||
70 | /* | ||
71 | * This is ugly in common code but really don't know | ||
72 | * of a better way to handle it. :( | ||
73 | */ | ||
74 | #ifdef CONFIG_ARCH_IXDP2400 | ||
75 | if (machine_is_ixdp2400()) | ||
76 | ixp2000_acquire_slowport(&slowport_cpld_cfg, &old_cfg); | ||
77 | #endif | ||
78 | |||
79 | dummy = *board_irq_mask; | ||
80 | dummy |= IXP2000_BOARD_IRQ_MASK(d->irq); | ||
81 | ixp2000_reg_wrb(board_irq_mask, dummy); | ||
82 | |||
83 | #ifdef CONFIG_ARCH_IXDP2400 | ||
84 | if (machine_is_ixdp2400()) | ||
85 | ixp2000_release_slowport(&old_cfg); | ||
86 | #endif | ||
87 | } | ||
88 | |||
89 | static void ixdp2x00_irq_unmask(struct irq_data *d) | ||
90 | { | ||
91 | unsigned long dummy; | ||
92 | static struct slowport_cfg old_cfg; | ||
93 | |||
94 | #ifdef CONFIG_ARCH_IXDP2400 | ||
95 | if (machine_is_ixdp2400()) | ||
96 | ixp2000_acquire_slowport(&slowport_cpld_cfg, &old_cfg); | ||
97 | #endif | ||
98 | |||
99 | dummy = *board_irq_mask; | ||
100 | dummy &= ~IXP2000_BOARD_IRQ_MASK(d->irq); | ||
101 | ixp2000_reg_wrb(board_irq_mask, dummy); | ||
102 | |||
103 | if (machine_is_ixdp2400()) | ||
104 | ixp2000_release_slowport(&old_cfg); | ||
105 | } | ||
106 | |||
107 | static void ixdp2x00_irq_handler(unsigned int irq, struct irq_desc *desc) | ||
108 | { | ||
109 | volatile u32 ex_interrupt = 0; | ||
110 | static struct slowport_cfg old_cfg; | ||
111 | int i; | ||
112 | |||
113 | desc->irq_data.chip->irq_mask(&desc->irq_data); | ||
114 | |||
115 | #ifdef CONFIG_ARCH_IXDP2400 | ||
116 | if (machine_is_ixdp2400()) | ||
117 | ixp2000_acquire_slowport(&slowport_cpld_cfg, &old_cfg); | ||
118 | #endif | ||
119 | ex_interrupt = *board_irq_stat & 0xff; | ||
120 | if (machine_is_ixdp2400()) | ||
121 | ixp2000_release_slowport(&old_cfg); | ||
122 | |||
123 | if(!ex_interrupt) { | ||
124 | printk(KERN_ERR "Spurious IXDP2x00 CPLD interrupt!\n"); | ||
125 | return; | ||
126 | } | ||
127 | |||
128 | for(i = 0; i < board_irq_count; i++) { | ||
129 | if(ex_interrupt & (1 << i)) { | ||
130 | int cpld_irq = IXP2000_BOARD_IRQ(0) + i; | ||
131 | generic_handle_irq(cpld_irq); | ||
132 | } | ||
133 | } | ||
134 | |||
135 | desc->irq_data.chip->irq_unmask(&desc->irq_data); | ||
136 | } | ||
137 | |||
138 | static struct irq_chip ixdp2x00_cpld_irq_chip = { | ||
139 | .irq_ack = ixdp2x00_irq_mask, | ||
140 | .irq_mask = ixdp2x00_irq_mask, | ||
141 | .irq_unmask = ixdp2x00_irq_unmask | ||
142 | }; | ||
143 | |||
144 | void __init ixdp2x00_init_irq(volatile unsigned long *stat_reg, volatile unsigned long *mask_reg, unsigned long nr_of_irqs) | ||
145 | { | ||
146 | unsigned int irq; | ||
147 | |||
148 | ixp2000_init_irq(); | ||
149 | |||
150 | if (!ixdp2x00_master_npu()) | ||
151 | return; | ||
152 | |||
153 | board_irq_stat = stat_reg; | ||
154 | board_irq_mask = mask_reg; | ||
155 | board_irq_count = nr_of_irqs; | ||
156 | |||
157 | *board_irq_mask = 0xffffffff; | ||
158 | |||
159 | for(irq = IXP2000_BOARD_IRQ(0); irq < IXP2000_BOARD_IRQ(board_irq_count); irq++) { | ||
160 | irq_set_chip_and_handler(irq, &ixdp2x00_cpld_irq_chip, | ||
161 | handle_level_irq); | ||
162 | set_irq_flags(irq, IRQF_VALID); | ||
163 | } | ||
164 | |||
165 | /* Hook into PCI interrupt */ | ||
166 | irq_set_chained_handler(IRQ_IXP2000_PCIB, ixdp2x00_irq_handler); | ||
167 | } | ||
168 | |||
169 | /************************************************************************* | ||
170 | * IXDP2x00 memory map | ||
171 | *************************************************************************/ | ||
172 | static struct map_desc ixdp2x00_io_desc __initdata = { | ||
173 | .virtual = IXDP2X00_VIRT_CPLD_BASE, | ||
174 | .pfn = __phys_to_pfn(IXDP2X00_PHYS_CPLD_BASE), | ||
175 | .length = IXDP2X00_CPLD_SIZE, | ||
176 | .type = MT_DEVICE | ||
177 | }; | ||
178 | |||
179 | void __init ixdp2x00_map_io(void) | ||
180 | { | ||
181 | ixp2000_map_io(); | ||
182 | |||
183 | iotable_init(&ixdp2x00_io_desc, 1); | ||
184 | } | ||
185 | |||
186 | /************************************************************************* | ||
187 | * IXDP2x00-common PCI init | ||
188 | * | ||
189 | * The IXDP2[48]00 has a horrid PCI bus layout. Basically the board | ||
190 | * contains two NPUs (ingress and egress) connected over PCI, both running | ||
191 | * instances of the kernel. So far so good. Peers on the PCI bus running | ||
192 | * Linux is a common design in telecom systems. The problem is that instead | ||
193 | * of all the devices being controlled by a single host, different | ||
194 | * devices are controlled by different NPUs on the same bus, leading to | ||
195 | * multiple hosts on the bus. The exact bus layout looks like: | ||
196 | * | ||
197 | * Bus 0 | ||
198 | * Master NPU <-------------------+-------------------> Slave NPU | ||
199 | * | | ||
200 | * | | ||
201 | * P2P | ||
202 | * | | ||
203 | * | ||
204 | * Bus 1 | | ||
205 | * <--+------+---------+---------+------+--> | ||
206 | * | | | | | | ||
207 | * | | | | | | ||
208 | * ... Dev PMC Media Eth0 Eth1 ... | ||
209 | * | ||
210 | * The master controls all but Eth1, which is controlled by the | ||
211 | * slave. What this means is that the both the master and the slave | ||
212 | * have to scan the bus, but only one of them can enumerate the bus. | ||
213 | * In addition, after the bus is scanned, each kernel must remove | ||
214 | * the device(s) it does not control from the PCI dev list otherwise | ||
215 | * a driver on each NPU will try to manage it and we will have horrible | ||
216 | * conflicts. Oh..and the slave NPU needs to see the master NPU | ||
217 | * for Intel's drivers to work properly. Closed source drivers... | ||
218 | * | ||
219 | * The way we deal with this is fairly simple but ugly: | ||
220 | * | ||
221 | * 1) Let master scan and enumerate the bus completely. | ||
222 | * 2) Master deletes Eth1 from device list. | ||
223 | * 3) Slave scans bus and then deletes all but Eth1 (Eth0 on slave) | ||
224 | * from device list. | ||
225 | * 4) Find HW designers and LART them. | ||
226 | * | ||
227 | * The boards also do not do normal PCI IRQ routing, or any sort of | ||
228 | * sensical swizzling, so we just need to check where on the bus a | ||
229 | * device sits and figure out to which CPLD pin the interrupt is routed. | ||
230 | * See ixdp2[48]00.c files. | ||
231 | * | ||
232 | *************************************************************************/ | ||
233 | void ixdp2x00_slave_pci_postinit(void) | ||
234 | { | ||
235 | struct pci_dev *dev; | ||
236 | |||
237 | /* | ||
238 | * Remove PMC device is there is one | ||
239 | */ | ||
240 | if((dev = pci_get_bus_and_slot(1, IXDP2X00_PMC_DEVFN))) { | ||
241 | pci_stop_and_remove_bus_device(dev); | ||
242 | pci_dev_put(dev); | ||
243 | } | ||
244 | |||
245 | dev = pci_get_bus_and_slot(0, IXDP2X00_21555_DEVFN); | ||
246 | pci_stop_and_remove_bus_device(dev); | ||
247 | pci_dev_put(dev); | ||
248 | } | ||
249 | |||
250 | /************************************************************************** | ||
251 | * IXDP2x00 Machine Setup | ||
252 | *************************************************************************/ | ||
253 | static struct flash_platform_data ixdp2x00_platform_data = { | ||
254 | .map_name = "cfi_probe", | ||
255 | .width = 1, | ||
256 | }; | ||
257 | |||
258 | static struct ixp2000_flash_data ixdp2x00_flash_data = { | ||
259 | .platform_data = &ixdp2x00_platform_data, | ||
260 | .nr_banks = 1 | ||
261 | }; | ||
262 | |||
263 | static struct resource ixdp2x00_flash_resource = { | ||
264 | .start = 0xc4000000, | ||
265 | .end = 0xc4000000 + 0x00ffffff, | ||
266 | .flags = IORESOURCE_MEM, | ||
267 | }; | ||
268 | |||
269 | static struct platform_device ixdp2x00_flash = { | ||
270 | .name = "IXP2000-Flash", | ||
271 | .id = 0, | ||
272 | .dev = { | ||
273 | .platform_data = &ixdp2x00_flash_data, | ||
274 | }, | ||
275 | .num_resources = 1, | ||
276 | .resource = &ixdp2x00_flash_resource, | ||
277 | }; | ||
278 | |||
279 | static struct ixp2000_i2c_pins ixdp2x00_i2c_gpio_pins = { | ||
280 | .sda_pin = IXDP2X00_GPIO_SDA, | ||
281 | .scl_pin = IXDP2X00_GPIO_SCL, | ||
282 | }; | ||
283 | |||
284 | static struct platform_device ixdp2x00_i2c_controller = { | ||
285 | .name = "IXP2000-I2C", | ||
286 | .id = 0, | ||
287 | .dev = { | ||
288 | .platform_data = &ixdp2x00_i2c_gpio_pins, | ||
289 | }, | ||
290 | .num_resources = 0 | ||
291 | }; | ||
292 | |||
293 | static struct platform_device *ixdp2x00_devices[] __initdata = { | ||
294 | &ixdp2x00_flash, | ||
295 | &ixdp2x00_i2c_controller | ||
296 | }; | ||
297 | |||
298 | void __init ixdp2x00_init_machine(void) | ||
299 | { | ||
300 | gpio_line_set(IXDP2X00_GPIO_I2C_ENABLE, 1); | ||
301 | gpio_line_config(IXDP2X00_GPIO_I2C_ENABLE, GPIO_OUT); | ||
302 | |||
303 | platform_add_devices(ixdp2x00_devices, ARRAY_SIZE(ixdp2x00_devices)); | ||
304 | ixp2000_uart_init(); | ||
305 | } | ||
306 | |||
diff --git a/arch/arm/mach-ixp2000/ixdp2x01.c b/arch/arm/mach-ixp2000/ixdp2x01.c deleted file mode 100644 index 5196c39cdba..00000000000 --- a/arch/arm/mach-ixp2000/ixdp2x01.c +++ /dev/null | |||
@@ -1,483 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/ixdp2x01.c | ||
3 | * | ||
4 | * Code common to Intel IXDP2401 and IXDP2801 platforms | ||
5 | * | ||
6 | * Original Author: Andrzej Mialkowski <andrzej.mialkowski@intel.com> | ||
7 | * Maintainer: Deepak Saxena <dsaxena@plexity.net> | ||
8 | * | ||
9 | * Copyright (C) 2002-2003 Intel Corp. | ||
10 | * Copyright (C) 2003-2004 MontaVista Software, Inc. | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify it | ||
13 | * under the terms of the GNU General Public License as published by the | ||
14 | * Free Software Foundation; either version 2 of the License, or (at your | ||
15 | * option) any later version. | ||
16 | */ | ||
17 | |||
18 | #include <linux/kernel.h> | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/mm.h> | ||
21 | #include <linux/sched.h> | ||
22 | #include <linux/interrupt.h> | ||
23 | #include <linux/bitops.h> | ||
24 | #include <linux/pci.h> | ||
25 | #include <linux/ioport.h> | ||
26 | #include <linux/delay.h> | ||
27 | #include <linux/serial.h> | ||
28 | #include <linux/tty.h> | ||
29 | #include <linux/serial_core.h> | ||
30 | #include <linux/platform_device.h> | ||
31 | #include <linux/serial_8250.h> | ||
32 | #include <linux/io.h> | ||
33 | |||
34 | #include <asm/irq.h> | ||
35 | #include <asm/pgtable.h> | ||
36 | #include <asm/page.h> | ||
37 | #include <mach/hardware.h> | ||
38 | #include <asm/mach-types.h> | ||
39 | |||
40 | #include <asm/mach/pci.h> | ||
41 | #include <asm/mach/map.h> | ||
42 | #include <asm/mach/irq.h> | ||
43 | #include <asm/mach/time.h> | ||
44 | #include <asm/mach/arch.h> | ||
45 | #include <asm/mach/flash.h> | ||
46 | |||
47 | /************************************************************************* | ||
48 | * IXDP2x01 IRQ Handling | ||
49 | *************************************************************************/ | ||
50 | static void ixdp2x01_irq_mask(struct irq_data *d) | ||
51 | { | ||
52 | ixp2000_reg_wrb(IXDP2X01_INT_MASK_SET_REG, | ||
53 | IXP2000_BOARD_IRQ_MASK(d->irq)); | ||
54 | } | ||
55 | |||
56 | static void ixdp2x01_irq_unmask(struct irq_data *d) | ||
57 | { | ||
58 | ixp2000_reg_write(IXDP2X01_INT_MASK_CLR_REG, | ||
59 | IXP2000_BOARD_IRQ_MASK(d->irq)); | ||
60 | } | ||
61 | |||
62 | static u32 valid_irq_mask; | ||
63 | |||
64 | static void ixdp2x01_irq_handler(unsigned int irq, struct irq_desc *desc) | ||
65 | { | ||
66 | u32 ex_interrupt; | ||
67 | int i; | ||
68 | |||
69 | desc->irq_data.chip->irq_mask(&desc->irq_data); | ||
70 | |||
71 | ex_interrupt = *IXDP2X01_INT_STAT_REG & valid_irq_mask; | ||
72 | |||
73 | if (!ex_interrupt) { | ||
74 | printk(KERN_ERR "Spurious IXDP2X01 CPLD interrupt!\n"); | ||
75 | return; | ||
76 | } | ||
77 | |||
78 | for (i = 0; i < IXP2000_BOARD_IRQS; i++) { | ||
79 | if (ex_interrupt & (1 << i)) { | ||
80 | int cpld_irq = IXP2000_BOARD_IRQ(0) + i; | ||
81 | generic_handle_irq(cpld_irq); | ||
82 | } | ||
83 | } | ||
84 | |||
85 | desc->irq_data.chip->irq_unmask(&desc->irq_data); | ||
86 | } | ||
87 | |||
88 | static struct irq_chip ixdp2x01_irq_chip = { | ||
89 | .irq_mask = ixdp2x01_irq_mask, | ||
90 | .irq_ack = ixdp2x01_irq_mask, | ||
91 | .irq_unmask = ixdp2x01_irq_unmask | ||
92 | }; | ||
93 | |||
94 | /* | ||
95 | * We only do anything if we are the master NPU on the board. | ||
96 | * The slave NPU only has the ethernet chip going directly to | ||
97 | * the PCIB interrupt input. | ||
98 | */ | ||
99 | void __init ixdp2x01_init_irq(void) | ||
100 | { | ||
101 | int irq = 0; | ||
102 | |||
103 | /* initialize chip specific interrupts */ | ||
104 | ixp2000_init_irq(); | ||
105 | |||
106 | if (machine_is_ixdp2401()) | ||
107 | valid_irq_mask = IXDP2401_VALID_IRQ_MASK; | ||
108 | else | ||
109 | valid_irq_mask = IXDP2801_VALID_IRQ_MASK; | ||
110 | |||
111 | /* Mask all interrupts from CPLD, disable simulation */ | ||
112 | ixp2000_reg_write(IXDP2X01_INT_MASK_SET_REG, 0xffffffff); | ||
113 | ixp2000_reg_wrb(IXDP2X01_INT_SIM_REG, 0); | ||
114 | |||
115 | for (irq = NR_IXP2000_IRQS; irq < NR_IXDP2X01_IRQS; irq++) { | ||
116 | if (irq & valid_irq_mask) { | ||
117 | irq_set_chip_and_handler(irq, &ixdp2x01_irq_chip, | ||
118 | handle_level_irq); | ||
119 | set_irq_flags(irq, IRQF_VALID); | ||
120 | } else { | ||
121 | set_irq_flags(irq, 0); | ||
122 | } | ||
123 | } | ||
124 | |||
125 | /* Hook into PCI interrupts */ | ||
126 | irq_set_chained_handler(IRQ_IXP2000_PCIB, ixdp2x01_irq_handler); | ||
127 | } | ||
128 | |||
129 | |||
130 | /************************************************************************* | ||
131 | * IXDP2x01 memory map | ||
132 | *************************************************************************/ | ||
133 | static struct map_desc ixdp2x01_io_desc __initdata = { | ||
134 | .virtual = IXDP2X01_VIRT_CPLD_BASE, | ||
135 | .pfn = __phys_to_pfn(IXDP2X01_PHYS_CPLD_BASE), | ||
136 | .length = IXDP2X01_CPLD_REGION_SIZE, | ||
137 | .type = MT_DEVICE | ||
138 | }; | ||
139 | |||
140 | static void __init ixdp2x01_map_io(void) | ||
141 | { | ||
142 | ixp2000_map_io(); | ||
143 | iotable_init(&ixdp2x01_io_desc, 1); | ||
144 | } | ||
145 | |||
146 | |||
147 | /************************************************************************* | ||
148 | * IXDP2x01 serial ports | ||
149 | *************************************************************************/ | ||
150 | static struct plat_serial8250_port ixdp2x01_serial_port1[] = { | ||
151 | { | ||
152 | .mapbase = (unsigned long)IXDP2X01_UART1_PHYS_BASE, | ||
153 | .membase = (char *)IXDP2X01_UART1_VIRT_BASE, | ||
154 | .irq = IRQ_IXDP2X01_UART1, | ||
155 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, | ||
156 | .iotype = UPIO_MEM32, | ||
157 | .regshift = 2, | ||
158 | .uartclk = IXDP2X01_UART_CLK, | ||
159 | }, | ||
160 | { } | ||
161 | }; | ||
162 | |||
163 | static struct resource ixdp2x01_uart_resource1 = { | ||
164 | .start = IXDP2X01_UART1_PHYS_BASE, | ||
165 | .end = IXDP2X01_UART1_PHYS_BASE + 0xffff, | ||
166 | .flags = IORESOURCE_MEM, | ||
167 | }; | ||
168 | |||
169 | static struct platform_device ixdp2x01_serial_device1 = { | ||
170 | .name = "serial8250", | ||
171 | .id = PLAT8250_DEV_PLATFORM1, | ||
172 | .dev = { | ||
173 | .platform_data = ixdp2x01_serial_port1, | ||
174 | }, | ||
175 | .num_resources = 1, | ||
176 | .resource = &ixdp2x01_uart_resource1, | ||
177 | }; | ||
178 | |||
179 | static struct plat_serial8250_port ixdp2x01_serial_port2[] = { | ||
180 | { | ||
181 | .mapbase = (unsigned long)IXDP2X01_UART2_PHYS_BASE, | ||
182 | .membase = (char *)IXDP2X01_UART2_VIRT_BASE, | ||
183 | .irq = IRQ_IXDP2X01_UART2, | ||
184 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, | ||
185 | .iotype = UPIO_MEM32, | ||
186 | .regshift = 2, | ||
187 | .uartclk = IXDP2X01_UART_CLK, | ||
188 | }, | ||
189 | { } | ||
190 | }; | ||
191 | |||
192 | static struct resource ixdp2x01_uart_resource2 = { | ||
193 | .start = IXDP2X01_UART2_PHYS_BASE, | ||
194 | .end = IXDP2X01_UART2_PHYS_BASE + 0xffff, | ||
195 | .flags = IORESOURCE_MEM, | ||
196 | }; | ||
197 | |||
198 | static struct platform_device ixdp2x01_serial_device2 = { | ||
199 | .name = "serial8250", | ||
200 | .id = PLAT8250_DEV_PLATFORM2, | ||
201 | .dev = { | ||
202 | .platform_data = ixdp2x01_serial_port2, | ||
203 | }, | ||
204 | .num_resources = 1, | ||
205 | .resource = &ixdp2x01_uart_resource2, | ||
206 | }; | ||
207 | |||
208 | static void ixdp2x01_uart_init(void) | ||
209 | { | ||
210 | platform_device_register(&ixdp2x01_serial_device1); | ||
211 | platform_device_register(&ixdp2x01_serial_device2); | ||
212 | } | ||
213 | |||
214 | |||
215 | /************************************************************************* | ||
216 | * IXDP2x01 timer tick configuration | ||
217 | *************************************************************************/ | ||
218 | static unsigned int ixdp2x01_clock; | ||
219 | |||
220 | static int __init ixdp2x01_clock_setup(char *str) | ||
221 | { | ||
222 | ixdp2x01_clock = simple_strtoul(str, NULL, 10); | ||
223 | |||
224 | return 1; | ||
225 | } | ||
226 | |||
227 | __setup("ixdp2x01_clock=", ixdp2x01_clock_setup); | ||
228 | |||
229 | static void __init ixdp2x01_timer_init(void) | ||
230 | { | ||
231 | if (!ixdp2x01_clock) | ||
232 | ixdp2x01_clock = 50000000; | ||
233 | |||
234 | ixp2000_init_time(ixdp2x01_clock); | ||
235 | } | ||
236 | |||
237 | static struct sys_timer ixdp2x01_timer = { | ||
238 | .init = ixdp2x01_timer_init, | ||
239 | .offset = ixp2000_gettimeoffset, | ||
240 | }; | ||
241 | |||
242 | /************************************************************************* | ||
243 | * IXDP2x01 PCI | ||
244 | *************************************************************************/ | ||
245 | void __init ixdp2x01_pci_preinit(void) | ||
246 | { | ||
247 | ixp2000_reg_write(IXP2000_PCI_ADDR_EXT, 0x00000000); | ||
248 | ixp2000_pci_preinit(); | ||
249 | pcibios_setup("firmware"); | ||
250 | } | ||
251 | |||
252 | #define DEVPIN(dev, pin) ((pin) | ((dev) << 3)) | ||
253 | |||
254 | static int __init ixdp2x01_pci_map_irq(const struct pci_dev *dev, u8 slot, | ||
255 | u8 pin) | ||
256 | { | ||
257 | u8 bus = dev->bus->number; | ||
258 | u32 devpin = DEVPIN(PCI_SLOT(dev->devfn), pin); | ||
259 | struct pci_bus *tmp_bus = dev->bus; | ||
260 | |||
261 | /* Primary bus, no interrupts here */ | ||
262 | if (bus == 0) { | ||
263 | return -1; | ||
264 | } | ||
265 | |||
266 | /* Lookup first leaf in bus tree */ | ||
267 | while ((tmp_bus->parent != NULL) && (tmp_bus->parent->parent != NULL)) { | ||
268 | tmp_bus = tmp_bus->parent; | ||
269 | } | ||
270 | |||
271 | /* Select between known bridges */ | ||
272 | switch (tmp_bus->self->devfn | (tmp_bus->self->bus->number << 8)) { | ||
273 | /* Device is located after first MB bridge */ | ||
274 | case 0x0008: | ||
275 | if (tmp_bus == dev->bus) { | ||
276 | /* Device is located directly after first MB bridge */ | ||
277 | switch (devpin) { | ||
278 | case DEVPIN(1, 1): /* Onboard 82546 ch 0 */ | ||
279 | if (machine_is_ixdp2401()) | ||
280 | return IRQ_IXDP2401_INTA_82546; | ||
281 | return -1; | ||
282 | case DEVPIN(1, 2): /* Onboard 82546 ch 1 */ | ||
283 | if (machine_is_ixdp2401()) | ||
284 | return IRQ_IXDP2401_INTB_82546; | ||
285 | return -1; | ||
286 | case DEVPIN(0, 1): /* PMC INTA# */ | ||
287 | return IRQ_IXDP2X01_SPCI_PMC_INTA; | ||
288 | case DEVPIN(0, 2): /* PMC INTB# */ | ||
289 | return IRQ_IXDP2X01_SPCI_PMC_INTB; | ||
290 | case DEVPIN(0, 3): /* PMC INTC# */ | ||
291 | return IRQ_IXDP2X01_SPCI_PMC_INTC; | ||
292 | case DEVPIN(0, 4): /* PMC INTD# */ | ||
293 | return IRQ_IXDP2X01_SPCI_PMC_INTD; | ||
294 | } | ||
295 | } | ||
296 | break; | ||
297 | case 0x0010: | ||
298 | if (tmp_bus == dev->bus) { | ||
299 | /* Device is located directly after second MB bridge */ | ||
300 | /* Secondary bus of second bridge */ | ||
301 | switch (devpin) { | ||
302 | case DEVPIN(0, 1): /* DB#0 */ | ||
303 | return IRQ_IXDP2X01_SPCI_DB_0; | ||
304 | case DEVPIN(1, 1): /* DB#1 */ | ||
305 | return IRQ_IXDP2X01_SPCI_DB_1; | ||
306 | } | ||
307 | } else { | ||
308 | /* Device is located indirectly after second MB bridge */ | ||
309 | /* Not supported now */ | ||
310 | } | ||
311 | break; | ||
312 | } | ||
313 | |||
314 | return -1; | ||
315 | } | ||
316 | |||
317 | |||
318 | static int ixdp2x01_pci_setup(int nr, struct pci_sys_data *sys) | ||
319 | { | ||
320 | sys->mem_offset = 0xe0000000; | ||
321 | |||
322 | if (machine_is_ixdp2801() || machine_is_ixdp28x5()) | ||
323 | sys->mem_offset -= ((*IXP2000_PCI_ADDR_EXT & 0xE000) << 16); | ||
324 | |||
325 | return ixp2000_pci_setup(nr, sys); | ||
326 | } | ||
327 | |||
328 | struct hw_pci ixdp2x01_pci __initdata = { | ||
329 | .nr_controllers = 1, | ||
330 | .setup = ixdp2x01_pci_setup, | ||
331 | .preinit = ixdp2x01_pci_preinit, | ||
332 | .scan = ixp2000_pci_scan_bus, | ||
333 | .map_irq = ixdp2x01_pci_map_irq, | ||
334 | }; | ||
335 | |||
336 | int __init ixdp2x01_pci_init(void) | ||
337 | { | ||
338 | if (machine_is_ixdp2401() || machine_is_ixdp2801() ||\ | ||
339 | machine_is_ixdp28x5()) | ||
340 | pci_common_init(&ixdp2x01_pci); | ||
341 | |||
342 | return 0; | ||
343 | } | ||
344 | |||
345 | subsys_initcall(ixdp2x01_pci_init); | ||
346 | |||
347 | /************************************************************************* | ||
348 | * IXDP2x01 Machine Initialization | ||
349 | *************************************************************************/ | ||
350 | static struct flash_platform_data ixdp2x01_flash_platform_data = { | ||
351 | .map_name = "cfi_probe", | ||
352 | .width = 1, | ||
353 | }; | ||
354 | |||
355 | static unsigned long ixdp2x01_flash_bank_setup(unsigned long ofs) | ||
356 | { | ||
357 | ixp2000_reg_wrb(IXDP2X01_CPLD_FLASH_REG, | ||
358 | ((ofs >> IXDP2X01_FLASH_WINDOW_BITS) | IXDP2X01_CPLD_FLASH_INTERN)); | ||
359 | return (ofs & IXDP2X01_FLASH_WINDOW_MASK); | ||
360 | } | ||
361 | |||
362 | static struct ixp2000_flash_data ixdp2x01_flash_data = { | ||
363 | .platform_data = &ixdp2x01_flash_platform_data, | ||
364 | .bank_setup = ixdp2x01_flash_bank_setup | ||
365 | }; | ||
366 | |||
367 | static struct resource ixdp2x01_flash_resource = { | ||
368 | .start = 0xc4000000, | ||
369 | .end = 0xc4000000 + 0x01ffffff, | ||
370 | .flags = IORESOURCE_MEM, | ||
371 | }; | ||
372 | |||
373 | static struct platform_device ixdp2x01_flash = { | ||
374 | .name = "IXP2000-Flash", | ||
375 | .id = 0, | ||
376 | .dev = { | ||
377 | .platform_data = &ixdp2x01_flash_data, | ||
378 | }, | ||
379 | .num_resources = 1, | ||
380 | .resource = &ixdp2x01_flash_resource, | ||
381 | }; | ||
382 | |||
383 | static struct ixp2000_i2c_pins ixdp2x01_i2c_gpio_pins = { | ||
384 | .sda_pin = IXDP2X01_GPIO_SDA, | ||
385 | .scl_pin = IXDP2X01_GPIO_SCL, | ||
386 | }; | ||
387 | |||
388 | static struct platform_device ixdp2x01_i2c_controller = { | ||
389 | .name = "IXP2000-I2C", | ||
390 | .id = 0, | ||
391 | .dev = { | ||
392 | .platform_data = &ixdp2x01_i2c_gpio_pins, | ||
393 | }, | ||
394 | .num_resources = 0 | ||
395 | }; | ||
396 | |||
397 | static struct platform_device *ixdp2x01_devices[] __initdata = { | ||
398 | &ixdp2x01_flash, | ||
399 | &ixdp2x01_i2c_controller | ||
400 | }; | ||
401 | |||
402 | static void __init ixdp2x01_init_machine(void) | ||
403 | { | ||
404 | ixp2000_reg_wrb(IXDP2X01_CPLD_FLASH_REG, | ||
405 | (IXDP2X01_CPLD_FLASH_BANK_MASK | IXDP2X01_CPLD_FLASH_INTERN)); | ||
406 | |||
407 | ixdp2x01_flash_data.nr_banks = | ||
408 | ((*IXDP2X01_CPLD_FLASH_REG & IXDP2X01_CPLD_FLASH_BANK_MASK) + 1); | ||
409 | |||
410 | platform_add_devices(ixdp2x01_devices, ARRAY_SIZE(ixdp2x01_devices)); | ||
411 | ixp2000_uart_init(); | ||
412 | ixdp2x01_uart_init(); | ||
413 | } | ||
414 | |||
415 | static void ixdp2401_restart(char mode, const char *cmd) | ||
416 | { | ||
417 | /* | ||
418 | * Reset flash banking register so that we are pointing at | ||
419 | * RedBoot bank. | ||
420 | */ | ||
421 | ixp2000_reg_write(IXDP2X01_CPLD_FLASH_REG, | ||
422 | ((0 >> IXDP2X01_FLASH_WINDOW_BITS) | ||
423 | | IXDP2X01_CPLD_FLASH_INTERN)); | ||
424 | ixp2000_reg_wrb(IXDP2X01_CPLD_RESET_REG, 0xffffffff); | ||
425 | |||
426 | ixp2000_restart(mode, cmd); | ||
427 | } | ||
428 | |||
429 | static void ixdp280x_restart(char mode, const char *cmd) | ||
430 | { | ||
431 | /* | ||
432 | * On IXDP2801 we need to write this magic sequence to the CPLD | ||
433 | * to cause a complete reset of the CPU and all external devices | ||
434 | * and move the flash bank register back to 0. | ||
435 | */ | ||
436 | unsigned long reset_reg = *IXDP2X01_CPLD_RESET_REG; | ||
437 | |||
438 | reset_reg = 0x55AA0000 | (reset_reg & 0x0000FFFF); | ||
439 | ixp2000_reg_write(IXDP2X01_CPLD_RESET_REG, reset_reg); | ||
440 | ixp2000_reg_wrb(IXDP2X01_CPLD_RESET_REG, 0x80000000); | ||
441 | |||
442 | ixp2000_restart(mode, cmd); | ||
443 | } | ||
444 | |||
445 | #ifdef CONFIG_ARCH_IXDP2401 | ||
446 | MACHINE_START(IXDP2401, "Intel IXDP2401 Development Platform") | ||
447 | /* Maintainer: MontaVista Software, Inc. */ | ||
448 | .atag_offset = 0x100, | ||
449 | .map_io = ixdp2x01_map_io, | ||
450 | .init_irq = ixdp2x01_init_irq, | ||
451 | .timer = &ixdp2x01_timer, | ||
452 | .init_machine = ixdp2x01_init_machine, | ||
453 | .restart = ixdp2401_restart, | ||
454 | MACHINE_END | ||
455 | #endif | ||
456 | |||
457 | #ifdef CONFIG_ARCH_IXDP2801 | ||
458 | MACHINE_START(IXDP2801, "Intel IXDP2801 Development Platform") | ||
459 | /* Maintainer: MontaVista Software, Inc. */ | ||
460 | .atag_offset = 0x100, | ||
461 | .map_io = ixdp2x01_map_io, | ||
462 | .init_irq = ixdp2x01_init_irq, | ||
463 | .timer = &ixdp2x01_timer, | ||
464 | .init_machine = ixdp2x01_init_machine, | ||
465 | .restart = ixdp280x_restart, | ||
466 | MACHINE_END | ||
467 | |||
468 | /* | ||
469 | * IXDP28x5 is basically an IXDP2801 with a different CPU but Intel | ||
470 | * changed the machine ID in the bootloader | ||
471 | */ | ||
472 | MACHINE_START(IXDP28X5, "Intel IXDP2805/2855 Development Platform") | ||
473 | /* Maintainer: MontaVista Software, Inc. */ | ||
474 | .atag_offset = 0x100, | ||
475 | .map_io = ixdp2x01_map_io, | ||
476 | .init_irq = ixdp2x01_init_irq, | ||
477 | .timer = &ixdp2x01_timer, | ||
478 | .init_machine = ixdp2x01_init_machine, | ||
479 | .restart = ixdp280x_restart, | ||
480 | MACHINE_END | ||
481 | #endif | ||
482 | |||
483 | |||
diff --git a/arch/arm/mach-ixp2000/pci.c b/arch/arm/mach-ixp2000/pci.c deleted file mode 100644 index 9c02de932fa..00000000000 --- a/arch/arm/mach-ixp2000/pci.c +++ /dev/null | |||
@@ -1,252 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/pci.c | ||
3 | * | ||
4 | * PCI routines for IXDP2400/IXDP2800 boards | ||
5 | * | ||
6 | * Original Author: Naeem Afzal <naeem.m.afzal@intel.com> | ||
7 | * Maintained by: Deepak Saxena <dsaxena@plexity.net> | ||
8 | * | ||
9 | * Copyright 2002 Intel Corp. | ||
10 | * Copyright (C) 2003-2004 MontaVista Software, Inc. | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify it | ||
13 | * under the terms of the GNU General Public License as published by the | ||
14 | * Free Software Foundation; either version 2 of the License, or (at your | ||
15 | * option) any later version. | ||
16 | */ | ||
17 | |||
18 | #include <linux/sched.h> | ||
19 | #include <linux/kernel.h> | ||
20 | #include <linux/pci.h> | ||
21 | #include <linux/interrupt.h> | ||
22 | #include <linux/mm.h> | ||
23 | #include <linux/init.h> | ||
24 | #include <linux/ioport.h> | ||
25 | #include <linux/delay.h> | ||
26 | #include <linux/io.h> | ||
27 | |||
28 | #include <asm/irq.h> | ||
29 | #include <mach/hardware.h> | ||
30 | |||
31 | #include <asm/mach/pci.h> | ||
32 | |||
33 | static volatile int pci_master_aborts = 0; | ||
34 | |||
35 | static int clear_master_aborts(void); | ||
36 | |||
37 | u32 * | ||
38 | ixp2000_pci_config_addr(unsigned int bus_nr, unsigned int devfn, int where) | ||
39 | { | ||
40 | u32 *paddress; | ||
41 | |||
42 | if (PCI_SLOT(devfn) > 7) | ||
43 | return 0; | ||
44 | |||
45 | /* Must be dword aligned */ | ||
46 | where &= ~3; | ||
47 | |||
48 | /* | ||
49 | * For top bus, generate type 0, else type 1 | ||
50 | */ | ||
51 | if (!bus_nr) { | ||
52 | /* only bits[23:16] are used for IDSEL */ | ||
53 | paddress = (u32 *) (IXP2000_PCI_CFG0_VIRT_BASE | ||
54 | | (1 << (PCI_SLOT(devfn) + 16)) | ||
55 | | (PCI_FUNC(devfn) << 8) | where); | ||
56 | } else { | ||
57 | paddress = (u32 *) (IXP2000_PCI_CFG1_VIRT_BASE | ||
58 | | (bus_nr << 16) | ||
59 | | (PCI_SLOT(devfn) << 11) | ||
60 | | (PCI_FUNC(devfn) << 8) | where); | ||
61 | } | ||
62 | |||
63 | return paddress; | ||
64 | } | ||
65 | |||
66 | /* | ||
67 | * Mask table, bits to mask for quantity of size 1, 2 or 4 bytes. | ||
68 | * 0 and 3 are not valid indexes... | ||
69 | */ | ||
70 | static u32 bytemask[] = { | ||
71 | /*0*/ 0, | ||
72 | /*1*/ 0xff, | ||
73 | /*2*/ 0xffff, | ||
74 | /*3*/ 0, | ||
75 | /*4*/ 0xffffffff, | ||
76 | }; | ||
77 | |||
78 | |||
79 | int ixp2000_pci_read_config(struct pci_bus *bus, unsigned int devfn, int where, | ||
80 | int size, u32 *value) | ||
81 | { | ||
82 | u32 n; | ||
83 | u32 *addr; | ||
84 | |||
85 | n = where % 4; | ||
86 | |||
87 | addr = ixp2000_pci_config_addr(bus->number, devfn, where); | ||
88 | if (!addr) | ||
89 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
90 | |||
91 | pci_master_aborts = 0; | ||
92 | *value = (*addr >> (8*n)) & bytemask[size]; | ||
93 | if (pci_master_aborts) { | ||
94 | pci_master_aborts = 0; | ||
95 | *value = 0xffffffff; | ||
96 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
97 | } | ||
98 | |||
99 | return PCIBIOS_SUCCESSFUL; | ||
100 | } | ||
101 | |||
102 | /* | ||
103 | * We don't do error checks by calling clear_master_aborts() b/c the | ||
104 | * assumption is that the caller did a read first to make sure a device | ||
105 | * exists. | ||
106 | */ | ||
107 | int ixp2000_pci_write_config(struct pci_bus *bus, unsigned int devfn, int where, | ||
108 | int size, u32 value) | ||
109 | { | ||
110 | u32 mask; | ||
111 | u32 *addr; | ||
112 | u32 temp; | ||
113 | |||
114 | mask = ~(bytemask[size] << ((where % 0x4) * 8)); | ||
115 | addr = ixp2000_pci_config_addr(bus->number, devfn, where); | ||
116 | if (!addr) | ||
117 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
118 | temp = (u32) (value) << ((where % 0x4) * 8); | ||
119 | *addr = (*addr & mask) | temp; | ||
120 | |||
121 | clear_master_aborts(); | ||
122 | |||
123 | return PCIBIOS_SUCCESSFUL; | ||
124 | } | ||
125 | |||
126 | |||
127 | static struct pci_ops ixp2000_pci_ops = { | ||
128 | .read = ixp2000_pci_read_config, | ||
129 | .write = ixp2000_pci_write_config | ||
130 | }; | ||
131 | |||
132 | struct pci_bus *ixp2000_pci_scan_bus(int nr, struct pci_sys_data *sysdata) | ||
133 | { | ||
134 | return pci_scan_root_bus(NULL, sysdata->busnr, &ixp2000_pci_ops, | ||
135 | sysdata, &sysdata->resources); | ||
136 | } | ||
137 | |||
138 | |||
139 | int ixp2000_pci_abort_handler(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | ||
140 | { | ||
141 | |||
142 | volatile u32 temp; | ||
143 | unsigned long flags; | ||
144 | |||
145 | pci_master_aborts = 1; | ||
146 | |||
147 | local_irq_save(flags); | ||
148 | temp = *(IXP2000_PCI_CONTROL); | ||
149 | if (temp & ((1 << 8) | (1 << 5))) { | ||
150 | ixp2000_reg_wrb(IXP2000_PCI_CONTROL, temp); | ||
151 | } | ||
152 | |||
153 | temp = *(IXP2000_PCI_CMDSTAT); | ||
154 | if (temp & (1 << 29)) { | ||
155 | while (temp & (1 << 29)) { | ||
156 | ixp2000_reg_write(IXP2000_PCI_CMDSTAT, temp); | ||
157 | temp = *(IXP2000_PCI_CMDSTAT); | ||
158 | } | ||
159 | } | ||
160 | local_irq_restore(flags); | ||
161 | |||
162 | /* | ||
163 | * If it was an imprecise abort, then we need to correct the | ||
164 | * return address to be _after_ the instruction. | ||
165 | */ | ||
166 | if (fsr & (1 << 10)) | ||
167 | regs->ARM_pc += 4; | ||
168 | |||
169 | return 0; | ||
170 | } | ||
171 | |||
172 | int | ||
173 | clear_master_aborts(void) | ||
174 | { | ||
175 | volatile u32 temp; | ||
176 | unsigned long flags; | ||
177 | |||
178 | local_irq_save(flags); | ||
179 | temp = *(IXP2000_PCI_CONTROL); | ||
180 | if (temp & ((1 << 8) | (1 << 5))) { | ||
181 | ixp2000_reg_wrb(IXP2000_PCI_CONTROL, temp); | ||
182 | } | ||
183 | |||
184 | temp = *(IXP2000_PCI_CMDSTAT); | ||
185 | if (temp & (1 << 29)) { | ||
186 | while (temp & (1 << 29)) { | ||
187 | ixp2000_reg_write(IXP2000_PCI_CMDSTAT, temp); | ||
188 | temp = *(IXP2000_PCI_CMDSTAT); | ||
189 | } | ||
190 | } | ||
191 | local_irq_restore(flags); | ||
192 | |||
193 | return 0; | ||
194 | } | ||
195 | |||
196 | void __init | ||
197 | ixp2000_pci_preinit(void) | ||
198 | { | ||
199 | pci_set_flags(0); | ||
200 | |||
201 | pcibios_min_io = 0; | ||
202 | pcibios_min_mem = 0; | ||
203 | |||
204 | #ifndef CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO | ||
205 | /* | ||
206 | * Configure the PCI unit to properly byteswap I/O transactions, | ||
207 | * and verify that it worked. | ||
208 | */ | ||
209 | ixp2000_reg_write(IXP2000_PCI_CONTROL, | ||
210 | (*IXP2000_PCI_CONTROL | PCI_CONTROL_IEE)); | ||
211 | |||
212 | if ((*IXP2000_PCI_CONTROL & PCI_CONTROL_IEE) == 0) | ||
213 | panic("IXP2000: PCI I/O is broken on this ixp model, and " | ||
214 | "the needed workaround has not been configured in"); | ||
215 | #endif | ||
216 | |||
217 | hook_fault_code(16+6, ixp2000_pci_abort_handler, SIGBUS, 0, | ||
218 | "PCI config cycle to non-existent device"); | ||
219 | } | ||
220 | |||
221 | |||
222 | /* | ||
223 | * IXP2000 systems often have large resource requirements, so we just | ||
224 | * use our own resource space. | ||
225 | */ | ||
226 | static struct resource ixp2000_pci_mem_space = { | ||
227 | .start = 0xe0000000, | ||
228 | .end = 0xffffffff, | ||
229 | .flags = IORESOURCE_MEM, | ||
230 | .name = "PCI Mem Space" | ||
231 | }; | ||
232 | |||
233 | static struct resource ixp2000_pci_io_space = { | ||
234 | .start = 0x00010000, | ||
235 | .end = 0x0001ffff, | ||
236 | .flags = IORESOURCE_IO, | ||
237 | .name = "PCI I/O Space" | ||
238 | }; | ||
239 | |||
240 | int ixp2000_pci_setup(int nr, struct pci_sys_data *sys) | ||
241 | { | ||
242 | if (nr >= 1) | ||
243 | return 0; | ||
244 | |||
245 | pci_add_resource_offset(&sys->resources, | ||
246 | &ixp2000_pci_io_space, sys->io_offset); | ||
247 | pci_add_resource_offset(&sys->resources, | ||
248 | &ixp2000_pci_mem_space, sys->mem_offset); | ||
249 | |||
250 | return 1; | ||
251 | } | ||
252 | |||
diff --git a/arch/arm/mach-ixp23xx/Kconfig b/arch/arm/mach-ixp23xx/Kconfig deleted file mode 100644 index 982670ec386..00000000000 --- a/arch/arm/mach-ixp23xx/Kconfig +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | if ARCH_IXP23XX | ||
2 | |||
3 | config ARCH_SUPPORTS_BIG_ENDIAN | ||
4 | bool | ||
5 | default y | ||
6 | |||
7 | menu "Intel IXP23xx Implementation Options" | ||
8 | |||
9 | comment "IXP23xx Platforms" | ||
10 | |||
11 | config MACH_ESPRESSO | ||
12 | bool "Support IP Fabrics Double Espresso platform" | ||
13 | help | ||
14 | |||
15 | config MACH_IXDP2351 | ||
16 | bool "Support Intel IXDP2351 platform" | ||
17 | help | ||
18 | |||
19 | config MACH_ROADRUNNER | ||
20 | bool "Support ADI RoadRunner platform" | ||
21 | help | ||
22 | |||
23 | endmenu | ||
24 | |||
25 | endif | ||
diff --git a/arch/arm/mach-ixp23xx/Makefile b/arch/arm/mach-ixp23xx/Makefile deleted file mode 100644 index 288b371b6d0..00000000000 --- a/arch/arm/mach-ixp23xx/Makefile +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | # | ||
2 | # Makefile for the linux kernel. | ||
3 | # | ||
4 | obj-y := core.o pci.o | ||
5 | obj-m := | ||
6 | obj-n := | ||
7 | obj- := | ||
8 | |||
9 | obj-$(CONFIG_MACH_ESPRESSO) += espresso.o | ||
10 | obj-$(CONFIG_MACH_IXDP2351) += ixdp2351.o | ||
11 | obj-$(CONFIG_MACH_ROADRUNNER) += roadrunner.o | ||
diff --git a/arch/arm/mach-ixp23xx/Makefile.boot b/arch/arm/mach-ixp23xx/Makefile.boot deleted file mode 100644 index 44fb4a717c3..00000000000 --- a/arch/arm/mach-ixp23xx/Makefile.boot +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | zreladdr-y += 0x00008000 | ||
2 | params_phys-y := 0x00000100 | ||
diff --git a/arch/arm/mach-ixp23xx/core.c b/arch/arm/mach-ixp23xx/core.c deleted file mode 100644 index d3454242599..00000000000 --- a/arch/arm/mach-ixp23xx/core.c +++ /dev/null | |||
@@ -1,455 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/core.c | ||
3 | * | ||
4 | * Core routines for IXP23xx chips | ||
5 | * | ||
6 | * Author: Deepak Saxena <dsaxena@plexity.net> | ||
7 | * | ||
8 | * Copyright 2005 (c) MontaVista Software, Inc. | ||
9 | * | ||
10 | * Based on 2.4 code Copyright 2004 (c) Intel Corporation | ||
11 | * | ||
12 | * This file is licensed under the terms of the GNU General Public | ||
13 | * License version 2. This program is licensed "as is" without any | ||
14 | * warranty of any kind, whether express or implied. | ||
15 | */ | ||
16 | |||
17 | #include <linux/kernel.h> | ||
18 | #include <linux/init.h> | ||
19 | #include <linux/spinlock.h> | ||
20 | #include <linux/sched.h> | ||
21 | #include <linux/interrupt.h> | ||
22 | #include <linux/serial.h> | ||
23 | #include <linux/tty.h> | ||
24 | #include <linux/bitops.h> | ||
25 | #include <linux/serial_8250.h> | ||
26 | #include <linux/serial_core.h> | ||
27 | #include <linux/device.h> | ||
28 | #include <linux/mm.h> | ||
29 | #include <linux/time.h> | ||
30 | #include <linux/timex.h> | ||
31 | |||
32 | #include <asm/types.h> | ||
33 | #include <asm/setup.h> | ||
34 | #include <asm/memory.h> | ||
35 | #include <mach/hardware.h> | ||
36 | #include <asm/irq.h> | ||
37 | #include <asm/tlbflush.h> | ||
38 | #include <asm/pgtable.h> | ||
39 | #include <asm/system_misc.h> | ||
40 | |||
41 | #include <asm/mach/map.h> | ||
42 | #include <asm/mach/time.h> | ||
43 | #include <asm/mach/irq.h> | ||
44 | #include <asm/mach/arch.h> | ||
45 | |||
46 | |||
47 | /************************************************************************* | ||
48 | * Chip specific mappings shared by all IXP23xx systems | ||
49 | *************************************************************************/ | ||
50 | static struct map_desc ixp23xx_io_desc[] __initdata = { | ||
51 | { /* XSI-CPP CSRs */ | ||
52 | .virtual = IXP23XX_XSI2CPP_CSR_VIRT, | ||
53 | .pfn = __phys_to_pfn(IXP23XX_XSI2CPP_CSR_PHYS), | ||
54 | .length = IXP23XX_XSI2CPP_CSR_SIZE, | ||
55 | .type = MT_DEVICE, | ||
56 | }, { /* Expansion Bus Config */ | ||
57 | .virtual = IXP23XX_EXP_CFG_VIRT, | ||
58 | .pfn = __phys_to_pfn(IXP23XX_EXP_CFG_PHYS), | ||
59 | .length = IXP23XX_EXP_CFG_SIZE, | ||
60 | .type = MT_DEVICE, | ||
61 | }, { /* UART, Interrupt ctrl, GPIO, timers, NPEs, MACS,.... */ | ||
62 | .virtual = IXP23XX_PERIPHERAL_VIRT, | ||
63 | .pfn = __phys_to_pfn(IXP23XX_PERIPHERAL_PHYS), | ||
64 | .length = IXP23XX_PERIPHERAL_SIZE, | ||
65 | .type = MT_DEVICE, | ||
66 | }, { /* CAP CSRs */ | ||
67 | .virtual = IXP23XX_CAP_CSR_VIRT, | ||
68 | .pfn = __phys_to_pfn(IXP23XX_CAP_CSR_PHYS), | ||
69 | .length = IXP23XX_CAP_CSR_SIZE, | ||
70 | .type = MT_DEVICE, | ||
71 | }, { /* MSF CSRs */ | ||
72 | .virtual = IXP23XX_MSF_CSR_VIRT, | ||
73 | .pfn = __phys_to_pfn(IXP23XX_MSF_CSR_PHYS), | ||
74 | .length = IXP23XX_MSF_CSR_SIZE, | ||
75 | .type = MT_DEVICE, | ||
76 | }, { /* PCI I/O Space */ | ||
77 | .virtual = IXP23XX_PCI_IO_VIRT, | ||
78 | .pfn = __phys_to_pfn(IXP23XX_PCI_IO_PHYS), | ||
79 | .length = IXP23XX_PCI_IO_SIZE, | ||
80 | .type = MT_DEVICE, | ||
81 | }, { /* PCI Config Space */ | ||
82 | .virtual = IXP23XX_PCI_CFG_VIRT, | ||
83 | .pfn = __phys_to_pfn(IXP23XX_PCI_CFG_PHYS), | ||
84 | .length = IXP23XX_PCI_CFG_SIZE, | ||
85 | .type = MT_DEVICE, | ||
86 | }, { /* PCI local CFG CSRs */ | ||
87 | .virtual = IXP23XX_PCI_CREG_VIRT, | ||
88 | .pfn = __phys_to_pfn(IXP23XX_PCI_CREG_PHYS), | ||
89 | .length = IXP23XX_PCI_CREG_SIZE, | ||
90 | .type = MT_DEVICE, | ||
91 | }, { /* PCI MEM Space */ | ||
92 | .virtual = IXP23XX_PCI_MEM_VIRT, | ||
93 | .pfn = __phys_to_pfn(IXP23XX_PCI_MEM_PHYS), | ||
94 | .length = IXP23XX_PCI_MEM_SIZE, | ||
95 | .type = MT_DEVICE, | ||
96 | } | ||
97 | }; | ||
98 | |||
99 | void __init ixp23xx_map_io(void) | ||
100 | { | ||
101 | iotable_init(ixp23xx_io_desc, ARRAY_SIZE(ixp23xx_io_desc)); | ||
102 | } | ||
103 | |||
104 | |||
105 | /*************************************************************************** | ||
106 | * IXP23xx Interrupt Handling | ||
107 | ***************************************************************************/ | ||
108 | enum ixp23xx_irq_type { | ||
109 | IXP23XX_IRQ_LEVEL, IXP23XX_IRQ_EDGE | ||
110 | }; | ||
111 | |||
112 | static void ixp23xx_config_irq(unsigned int, enum ixp23xx_irq_type); | ||
113 | |||
114 | static int ixp23xx_irq_set_type(struct irq_data *d, unsigned int type) | ||
115 | { | ||
116 | int line = d->irq - IRQ_IXP23XX_GPIO6 + 6; | ||
117 | u32 int_style; | ||
118 | enum ixp23xx_irq_type irq_type; | ||
119 | volatile u32 *int_reg; | ||
120 | |||
121 | /* | ||
122 | * Only GPIOs 6-15 are wired to interrupts on IXP23xx | ||
123 | */ | ||
124 | if (line < 6 || line > 15) | ||
125 | return -EINVAL; | ||
126 | |||
127 | switch (type) { | ||
128 | case IRQ_TYPE_EDGE_BOTH: | ||
129 | int_style = IXP23XX_GPIO_STYLE_TRANSITIONAL; | ||
130 | irq_type = IXP23XX_IRQ_EDGE; | ||
131 | break; | ||
132 | case IRQ_TYPE_EDGE_RISING: | ||
133 | int_style = IXP23XX_GPIO_STYLE_RISING_EDGE; | ||
134 | irq_type = IXP23XX_IRQ_EDGE; | ||
135 | break; | ||
136 | case IRQ_TYPE_EDGE_FALLING: | ||
137 | int_style = IXP23XX_GPIO_STYLE_FALLING_EDGE; | ||
138 | irq_type = IXP23XX_IRQ_EDGE; | ||
139 | break; | ||
140 | case IRQ_TYPE_LEVEL_HIGH: | ||
141 | int_style = IXP23XX_GPIO_STYLE_ACTIVE_HIGH; | ||
142 | irq_type = IXP23XX_IRQ_LEVEL; | ||
143 | break; | ||
144 | case IRQ_TYPE_LEVEL_LOW: | ||
145 | int_style = IXP23XX_GPIO_STYLE_ACTIVE_LOW; | ||
146 | irq_type = IXP23XX_IRQ_LEVEL; | ||
147 | break; | ||
148 | default: | ||
149 | return -EINVAL; | ||
150 | } | ||
151 | |||
152 | ixp23xx_config_irq(d->irq, irq_type); | ||
153 | |||
154 | if (line >= 8) { /* pins 8-15 */ | ||
155 | line -= 8; | ||
156 | int_reg = (volatile u32 *)IXP23XX_GPIO_GPIT2R; | ||
157 | } else { /* pins 0-7 */ | ||
158 | int_reg = (volatile u32 *)IXP23XX_GPIO_GPIT1R; | ||
159 | } | ||
160 | |||
161 | /* | ||
162 | * Clear pending interrupts | ||
163 | */ | ||
164 | *IXP23XX_GPIO_GPISR = (1 << line); | ||
165 | |||
166 | /* Clear the style for the appropriate pin */ | ||
167 | *int_reg &= ~(IXP23XX_GPIO_STYLE_MASK << | ||
168 | (line * IXP23XX_GPIO_STYLE_SIZE)); | ||
169 | |||
170 | /* Set the new style */ | ||
171 | *int_reg |= (int_style << (line * IXP23XX_GPIO_STYLE_SIZE)); | ||
172 | |||
173 | return 0; | ||
174 | } | ||
175 | |||
176 | static void ixp23xx_irq_mask(struct irq_data *d) | ||
177 | { | ||
178 | volatile unsigned long *intr_reg; | ||
179 | unsigned int irq = d->irq; | ||
180 | |||
181 | if (irq >= 56) | ||
182 | irq += 8; | ||
183 | |||
184 | intr_reg = IXP23XX_INTR_EN1 + (irq / 32); | ||
185 | *intr_reg &= ~(1 << (irq % 32)); | ||
186 | } | ||
187 | |||
188 | static void ixp23xx_irq_ack(struct irq_data *d) | ||
189 | { | ||
190 | int line = d->irq - IRQ_IXP23XX_GPIO6 + 6; | ||
191 | |||
192 | if ((line < 6) || (line > 15)) | ||
193 | return; | ||
194 | |||
195 | *IXP23XX_GPIO_GPISR = (1 << line); | ||
196 | } | ||
197 | |||
198 | /* | ||
199 | * Level triggered interrupts on GPIO lines can only be cleared when the | ||
200 | * interrupt condition disappears. | ||
201 | */ | ||
202 | static void ixp23xx_irq_level_unmask(struct irq_data *d) | ||
203 | { | ||
204 | volatile unsigned long *intr_reg; | ||
205 | unsigned int irq = d->irq; | ||
206 | |||
207 | ixp23xx_irq_ack(d); | ||
208 | |||
209 | if (irq >= 56) | ||
210 | irq += 8; | ||
211 | |||
212 | intr_reg = IXP23XX_INTR_EN1 + (irq / 32); | ||
213 | *intr_reg |= (1 << (irq % 32)); | ||
214 | } | ||
215 | |||
216 | static void ixp23xx_irq_edge_unmask(struct irq_data *d) | ||
217 | { | ||
218 | volatile unsigned long *intr_reg; | ||
219 | unsigned int irq = d->irq; | ||
220 | |||
221 | if (irq >= 56) | ||
222 | irq += 8; | ||
223 | |||
224 | intr_reg = IXP23XX_INTR_EN1 + (irq / 32); | ||
225 | *intr_reg |= (1 << (irq % 32)); | ||
226 | } | ||
227 | |||
228 | static struct irq_chip ixp23xx_irq_level_chip = { | ||
229 | .irq_ack = ixp23xx_irq_mask, | ||
230 | .irq_mask = ixp23xx_irq_mask, | ||
231 | .irq_unmask = ixp23xx_irq_level_unmask, | ||
232 | .irq_set_type = ixp23xx_irq_set_type | ||
233 | }; | ||
234 | |||
235 | static struct irq_chip ixp23xx_irq_edge_chip = { | ||
236 | .irq_ack = ixp23xx_irq_ack, | ||
237 | .irq_mask = ixp23xx_irq_mask, | ||
238 | .irq_unmask = ixp23xx_irq_edge_unmask, | ||
239 | .irq_set_type = ixp23xx_irq_set_type | ||
240 | }; | ||
241 | |||
242 | static void ixp23xx_pci_irq_mask(struct irq_data *d) | ||
243 | { | ||
244 | unsigned int irq = d->irq; | ||
245 | |||
246 | *IXP23XX_PCI_XSCALE_INT_ENABLE &= ~(1 << (IRQ_IXP23XX_INTA + 27 - irq)); | ||
247 | } | ||
248 | |||
249 | static void ixp23xx_pci_irq_unmask(struct irq_data *d) | ||
250 | { | ||
251 | unsigned int irq = d->irq; | ||
252 | |||
253 | *IXP23XX_PCI_XSCALE_INT_ENABLE |= (1 << (IRQ_IXP23XX_INTA + 27 - irq)); | ||
254 | } | ||
255 | |||
256 | /* | ||
257 | * TODO: Should this just be done at ASM level? | ||
258 | */ | ||
259 | static void pci_handler(unsigned int irq, struct irq_desc *desc) | ||
260 | { | ||
261 | u32 pci_interrupt; | ||
262 | unsigned int irqno; | ||
263 | |||
264 | pci_interrupt = *IXP23XX_PCI_XSCALE_INT_STATUS; | ||
265 | |||
266 | desc->irq_data.chip->irq_ack(&desc->irq_data); | ||
267 | |||
268 | /* See which PCI_INTA, or PCI_INTB interrupted */ | ||
269 | if (pci_interrupt & (1 << 26)) { | ||
270 | irqno = IRQ_IXP23XX_INTB; | ||
271 | } else if (pci_interrupt & (1 << 27)) { | ||
272 | irqno = IRQ_IXP23XX_INTA; | ||
273 | } else { | ||
274 | BUG(); | ||
275 | } | ||
276 | |||
277 | generic_handle_irq(irqno); | ||
278 | |||
279 | desc->irq_data.chip->irq_unmask(&desc->irq_data); | ||
280 | } | ||
281 | |||
282 | static struct irq_chip ixp23xx_pci_irq_chip = { | ||
283 | .irq_ack = ixp23xx_pci_irq_mask, | ||
284 | .irq_mask = ixp23xx_pci_irq_mask, | ||
285 | .irq_unmask = ixp23xx_pci_irq_unmask | ||
286 | }; | ||
287 | |||
288 | static void ixp23xx_config_irq(unsigned int irq, enum ixp23xx_irq_type type) | ||
289 | { | ||
290 | switch (type) { | ||
291 | case IXP23XX_IRQ_LEVEL: | ||
292 | irq_set_chip_and_handler(irq, &ixp23xx_irq_level_chip, | ||
293 | handle_level_irq); | ||
294 | break; | ||
295 | case IXP23XX_IRQ_EDGE: | ||
296 | irq_set_chip_and_handler(irq, &ixp23xx_irq_edge_chip, | ||
297 | handle_edge_irq); | ||
298 | break; | ||
299 | } | ||
300 | set_irq_flags(irq, IRQF_VALID); | ||
301 | } | ||
302 | |||
303 | void __init ixp23xx_init_irq(void) | ||
304 | { | ||
305 | int irq; | ||
306 | |||
307 | /* Route everything to IRQ */ | ||
308 | *IXP23XX_INTR_SEL1 = 0x0; | ||
309 | *IXP23XX_INTR_SEL2 = 0x0; | ||
310 | *IXP23XX_INTR_SEL3 = 0x0; | ||
311 | *IXP23XX_INTR_SEL4 = 0x0; | ||
312 | |||
313 | /* Mask all sources */ | ||
314 | *IXP23XX_INTR_EN1 = 0x0; | ||
315 | *IXP23XX_INTR_EN2 = 0x0; | ||
316 | *IXP23XX_INTR_EN3 = 0x0; | ||
317 | *IXP23XX_INTR_EN4 = 0x0; | ||
318 | |||
319 | /* | ||
320 | * Configure all IRQs for level-sensitive operation | ||
321 | */ | ||
322 | for (irq = 0; irq <= NUM_IXP23XX_RAW_IRQS; irq++) { | ||
323 | ixp23xx_config_irq(irq, IXP23XX_IRQ_LEVEL); | ||
324 | } | ||
325 | |||
326 | for (irq = IRQ_IXP23XX_INTA; irq <= IRQ_IXP23XX_INTB; irq++) { | ||
327 | irq_set_chip_and_handler(irq, &ixp23xx_pci_irq_chip, | ||
328 | handle_level_irq); | ||
329 | set_irq_flags(irq, IRQF_VALID); | ||
330 | } | ||
331 | |||
332 | irq_set_chained_handler(IRQ_IXP23XX_PCI_INT_RPH, pci_handler); | ||
333 | } | ||
334 | |||
335 | |||
336 | /************************************************************************* | ||
337 | * Timer-tick functions for IXP23xx | ||
338 | *************************************************************************/ | ||
339 | #define CLOCK_TICKS_PER_USEC (CLOCK_TICK_RATE / USEC_PER_SEC) | ||
340 | |||
341 | static unsigned long next_jiffy_time; | ||
342 | |||
343 | static unsigned long | ||
344 | ixp23xx_gettimeoffset(void) | ||
345 | { | ||
346 | unsigned long elapsed; | ||
347 | |||
348 | elapsed = *IXP23XX_TIMER_CONT - (next_jiffy_time - LATCH); | ||
349 | |||
350 | return elapsed / CLOCK_TICKS_PER_USEC; | ||
351 | } | ||
352 | |||
353 | static irqreturn_t | ||
354 | ixp23xx_timer_interrupt(int irq, void *dev_id) | ||
355 | { | ||
356 | /* Clear Pending Interrupt by writing '1' to it */ | ||
357 | *IXP23XX_TIMER_STATUS = IXP23XX_TIMER1_INT_PEND; | ||
358 | while ((signed long)(*IXP23XX_TIMER_CONT - next_jiffy_time) >= LATCH) { | ||
359 | timer_tick(); | ||
360 | next_jiffy_time += LATCH; | ||
361 | } | ||
362 | |||
363 | return IRQ_HANDLED; | ||
364 | } | ||
365 | |||
366 | static struct irqaction ixp23xx_timer_irq = { | ||
367 | .name = "IXP23xx Timer Tick", | ||
368 | .handler = ixp23xx_timer_interrupt, | ||
369 | .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, | ||
370 | }; | ||
371 | |||
372 | void __init ixp23xx_init_timer(void) | ||
373 | { | ||
374 | /* Clear Pending Interrupt by writing '1' to it */ | ||
375 | *IXP23XX_TIMER_STATUS = IXP23XX_TIMER1_INT_PEND; | ||
376 | |||
377 | /* Setup the Timer counter value */ | ||
378 | *IXP23XX_TIMER1_RELOAD = | ||
379 | (LATCH & ~IXP23XX_TIMER_RELOAD_MASK) | IXP23XX_TIMER_ENABLE; | ||
380 | |||
381 | *IXP23XX_TIMER_CONT = 0; | ||
382 | next_jiffy_time = LATCH; | ||
383 | |||
384 | /* Connect the interrupt handler and enable the interrupt */ | ||
385 | setup_irq(IRQ_IXP23XX_TIMER1, &ixp23xx_timer_irq); | ||
386 | } | ||
387 | |||
388 | struct sys_timer ixp23xx_timer = { | ||
389 | .init = ixp23xx_init_timer, | ||
390 | .offset = ixp23xx_gettimeoffset, | ||
391 | }; | ||
392 | |||
393 | |||
394 | /************************************************************************* | ||
395 | * IXP23xx Platform Initialization | ||
396 | *************************************************************************/ | ||
397 | static struct resource ixp23xx_uart_resources[] = { | ||
398 | { | ||
399 | .start = IXP23XX_UART1_PHYS, | ||
400 | .end = IXP23XX_UART1_PHYS + 0x0fff, | ||
401 | .flags = IORESOURCE_MEM | ||
402 | }, { | ||
403 | .start = IXP23XX_UART2_PHYS, | ||
404 | .end = IXP23XX_UART2_PHYS + 0x0fff, | ||
405 | .flags = IORESOURCE_MEM | ||
406 | } | ||
407 | }; | ||
408 | |||
409 | static struct plat_serial8250_port ixp23xx_uart_data[] = { | ||
410 | { | ||
411 | .mapbase = IXP23XX_UART1_PHYS, | ||
412 | .membase = (char *)(IXP23XX_UART1_VIRT + 3), | ||
413 | .irq = IRQ_IXP23XX_UART1, | ||
414 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, | ||
415 | .iotype = UPIO_MEM, | ||
416 | .regshift = 2, | ||
417 | .uartclk = IXP23XX_UART_XTAL, | ||
418 | }, { | ||
419 | .mapbase = IXP23XX_UART2_PHYS, | ||
420 | .membase = (char *)(IXP23XX_UART2_VIRT + 3), | ||
421 | .irq = IRQ_IXP23XX_UART2, | ||
422 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, | ||
423 | .iotype = UPIO_MEM, | ||
424 | .regshift = 2, | ||
425 | .uartclk = IXP23XX_UART_XTAL, | ||
426 | }, | ||
427 | { }, | ||
428 | }; | ||
429 | |||
430 | static struct platform_device ixp23xx_uart = { | ||
431 | .name = "serial8250", | ||
432 | .id = 0, | ||
433 | .dev.platform_data = ixp23xx_uart_data, | ||
434 | .num_resources = 2, | ||
435 | .resource = ixp23xx_uart_resources, | ||
436 | }; | ||
437 | |||
438 | static struct platform_device *ixp23xx_devices[] __initdata = { | ||
439 | &ixp23xx_uart, | ||
440 | }; | ||
441 | |||
442 | void __init ixp23xx_sys_init(void) | ||
443 | { | ||
444 | /* by default, the idle code is disabled */ | ||
445 | disable_hlt(); | ||
446 | |||
447 | *IXP23XX_EXP_UNIT_FUSE |= 0xf; | ||
448 | platform_add_devices(ixp23xx_devices, ARRAY_SIZE(ixp23xx_devices)); | ||
449 | } | ||
450 | |||
451 | void ixp23xx_restart(char mode, const char *cmd) | ||
452 | { | ||
453 | /* Use on-chip reset capability */ | ||
454 | *IXP23XX_RESET0 |= IXP23XX_RST_ALL; | ||
455 | } | ||
diff --git a/arch/arm/mach-ixp23xx/espresso.c b/arch/arm/mach-ixp23xx/espresso.c deleted file mode 100644 index d142d45dea1..00000000000 --- a/arch/arm/mach-ixp23xx/espresso.c +++ /dev/null | |||
@@ -1,93 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/espresso.c | ||
3 | * | ||
4 | * Double Espresso-specific routines | ||
5 | * | ||
6 | * Author: Lennert Buytenhek <buytenh@wantstofly.org> | ||
7 | * | ||
8 | * This file is licensed under the terms of the GNU General Public | ||
9 | * License version 2. This program is licensed "as is" without any | ||
10 | * warranty of any kind, whether express or implied. | ||
11 | */ | ||
12 | |||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/spinlock.h> | ||
16 | #include <linux/sched.h> | ||
17 | #include <linux/interrupt.h> | ||
18 | #include <linux/serial.h> | ||
19 | #include <linux/tty.h> | ||
20 | #include <linux/bitops.h> | ||
21 | #include <linux/ioport.h> | ||
22 | #include <linux/serial_8250.h> | ||
23 | #include <linux/serial_core.h> | ||
24 | #include <linux/device.h> | ||
25 | #include <linux/mm.h> | ||
26 | #include <linux/pci.h> | ||
27 | #include <linux/mtd/physmap.h> | ||
28 | |||
29 | #include <asm/types.h> | ||
30 | #include <asm/setup.h> | ||
31 | #include <asm/memory.h> | ||
32 | #include <mach/hardware.h> | ||
33 | #include <asm/mach-types.h> | ||
34 | #include <asm/irq.h> | ||
35 | #include <asm/tlbflush.h> | ||
36 | #include <asm/pgtable.h> | ||
37 | |||
38 | #include <asm/mach/map.h> | ||
39 | #include <asm/mach/irq.h> | ||
40 | #include <asm/mach/arch.h> | ||
41 | #include <asm/mach/pci.h> | ||
42 | |||
43 | static int __init espresso_pci_init(void) | ||
44 | { | ||
45 | if (machine_is_espresso()) | ||
46 | ixp23xx_pci_slave_init(); | ||
47 | |||
48 | return 0; | ||
49 | }; | ||
50 | subsys_initcall(espresso_pci_init); | ||
51 | |||
52 | static struct physmap_flash_data espresso_flash_data = { | ||
53 | .width = 2, | ||
54 | }; | ||
55 | |||
56 | static struct resource espresso_flash_resource = { | ||
57 | .start = 0x90000000, | ||
58 | .end = 0x91ffffff, | ||
59 | .flags = IORESOURCE_MEM, | ||
60 | }; | ||
61 | |||
62 | static struct platform_device espresso_flash = { | ||
63 | .name = "physmap-flash", | ||
64 | .id = 0, | ||
65 | .dev = { | ||
66 | .platform_data = &espresso_flash_data, | ||
67 | }, | ||
68 | .num_resources = 1, | ||
69 | .resource = &espresso_flash_resource, | ||
70 | }; | ||
71 | |||
72 | static void __init espresso_init(void) | ||
73 | { | ||
74 | platform_device_register(&espresso_flash); | ||
75 | |||
76 | /* | ||
77 | * Mark flash as writeable. | ||
78 | */ | ||
79 | IXP23XX_EXP_CS0[0] |= IXP23XX_FLASH_WRITABLE; | ||
80 | IXP23XX_EXP_CS0[1] |= IXP23XX_FLASH_WRITABLE; | ||
81 | |||
82 | ixp23xx_sys_init(); | ||
83 | } | ||
84 | |||
85 | MACHINE_START(ESPRESSO, "IP Fabrics Double Espresso") | ||
86 | /* Maintainer: Lennert Buytenhek */ | ||
87 | .map_io = ixp23xx_map_io, | ||
88 | .init_irq = ixp23xx_init_irq, | ||
89 | .timer = &ixp23xx_timer, | ||
90 | .atag_offset = 0x100, | ||
91 | .init_machine = espresso_init, | ||
92 | .restart = ixp23xx_restart, | ||
93 | MACHINE_END | ||
diff --git a/arch/arm/mach-ixp23xx/include/mach/debug-macro.S b/arch/arm/mach-ixp23xx/include/mach/debug-macro.S deleted file mode 100644 index 5ff524c1374..00000000000 --- a/arch/arm/mach-ixp23xx/include/mach/debug-macro.S +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/include/mach/debug-macro.S | ||
3 | * | ||
4 | * Debugging macro include header | ||
5 | * | ||
6 | * Copyright (C) 1994-1999 Russell King | ||
7 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | #include <mach/ixp23xx.h> | ||
14 | |||
15 | .macro addruart, rp, rv, tmp | ||
16 | ldr \rp, =IXP23XX_PERIPHERAL_PHYS @ physical | ||
17 | ldr \rv, =IXP23XX_PERIPHERAL_VIRT @ virtual | ||
18 | #ifdef __ARMEB__ | ||
19 | orr \rp, \rp, #0x00000003 | ||
20 | orr \rv, \rv, #0x00000003 | ||
21 | #endif | ||
22 | .endm | ||
23 | |||
24 | #define UART_SHIFT 2 | ||
25 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/arch/arm/mach-ixp23xx/include/mach/entry-macro.S b/arch/arm/mach-ixp23xx/include/mach/entry-macro.S deleted file mode 100644 index 3fd2cb984e4..00000000000 --- a/arch/arm/mach-ixp23xx/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/include/mach/entry-macro.S | ||
3 | */ | ||
4 | |||
5 | .macro get_irqnr_preamble, base, tmp | ||
6 | .endm | ||
7 | |||
8 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
9 | ldr \irqnr, =(IXP23XX_INTC_VIRT + IXP23XX_INTR_IRQ_ENC_ST_OFFSET) | ||
10 | ldr \irqnr, [\irqnr] @ get interrupt number | ||
11 | cmp \irqnr, #0x0 @ spurious interrupt ? | ||
12 | movne \irqnr, \irqnr, lsr #2 @ skip unwanted low order bits | ||
13 | subne \irqnr, \irqnr, #1 @ convert to 0 based | ||
14 | |||
15 | #if 0 | ||
16 | cmp \irqnr, #IRQ_IXP23XX_PCI_INT_RPH | ||
17 | bne 1001f | ||
18 | mov \irqnr, #IRQ_IXP23XX_INTA | ||
19 | |||
20 | ldr \irqnr, =0xf5000030 | ||
21 | |||
22 | mov \tmp, #(1<<26) | ||
23 | tst \irqnr, \tmp | ||
24 | movne \irqnr, #IRQ_IXP23XX_INTB | ||
25 | |||
26 | mov \tmp, #(1<<27) | ||
27 | tst \irqnr, \tmp | ||
28 | movne \irqnr, #IRQ_IXP23XX_INTA | ||
29 | 1001: | ||
30 | #endif | ||
31 | .endm | ||
diff --git a/arch/arm/mach-ixp23xx/include/mach/hardware.h b/arch/arm/mach-ixp23xx/include/mach/hardware.h deleted file mode 100644 index 60e55fa1023..00000000000 --- a/arch/arm/mach-ixp23xx/include/mach/hardware.h +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/include/mach/hardware.h | ||
3 | * | ||
4 | * Copyright (C) 2002-2004 Intel Corporation. | ||
5 | * Copyricht (C) 2005 MontaVista Software, Inc. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | * Hardware definitions for IXP23XX based systems | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_ARCH_HARDWARE_H | ||
15 | #define __ASM_ARCH_HARDWARE_H | ||
16 | |||
17 | /* PCI IO info */ | ||
18 | |||
19 | #include "ixp23xx.h" | ||
20 | |||
21 | /* | ||
22 | * Platform helper functions | ||
23 | */ | ||
24 | #include "platform.h" | ||
25 | |||
26 | /* | ||
27 | * Platform-specific headers | ||
28 | */ | ||
29 | #include "ixdp2351.h" | ||
30 | |||
31 | |||
32 | #endif | ||
diff --git a/arch/arm/mach-ixp23xx/include/mach/io.h b/arch/arm/mach-ixp23xx/include/mach/io.h deleted file mode 100644 index a7aceb55c13..00000000000 --- a/arch/arm/mach-ixp23xx/include/mach/io.h +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/include/mach/io.h | ||
3 | * | ||
4 | * Original Author: Naeem M Afzal <naeem.m.afzal@intel.com> | ||
5 | * Maintainer: Deepak Saxena <dsaxena@plexity.net> | ||
6 | * | ||
7 | * Copyright (C) 2003-2005 Intel Corp. | ||
8 | * Copyright (C) 2005 MontaVista Software, Inc | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #ifndef __ASM_ARCH_IO_H | ||
16 | #define __ASM_ARCH_IO_H | ||
17 | |||
18 | #define IO_SPACE_LIMIT 0xffffffff | ||
19 | |||
20 | #define __io(p) ((void __iomem*)((p) + IXP23XX_PCI_IO_VIRT)) | ||
21 | |||
22 | #endif | ||
diff --git a/arch/arm/mach-ixp23xx/include/mach/irqs.h b/arch/arm/mach-ixp23xx/include/mach/irqs.h deleted file mode 100644 index 3af33a04b8a..00000000000 --- a/arch/arm/mach-ixp23xx/include/mach/irqs.h +++ /dev/null | |||
@@ -1,223 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/include/mach/irqs.h | ||
3 | * | ||
4 | * IRQ definitions for IXP23XX based systems | ||
5 | * | ||
6 | * Author: Naeem Afzal <naeem.m.afzal@intel.com> | ||
7 | * | ||
8 | * Copyright (C) 2003-2004 Intel Corporation. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #ifndef __ASM_ARCH_IRQS_H | ||
16 | #define __ASM_ARCH_IRQS_H | ||
17 | |||
18 | #define NR_IXP23XX_IRQS IRQ_IXP23XX_INTB+1 | ||
19 | #define IRQ_IXP23XX_EXTIRQS NR_IXP23XX_IRQS | ||
20 | |||
21 | |||
22 | #define IRQ_IXP23XX_DBG0 0 /* Debug/Execution/MBox */ | ||
23 | #define IRQ_IXP23XX_DBG1 1 /* Debug/Execution/MBox */ | ||
24 | #define IRQ_IXP23XX_NPE_TRG 2 /* npe_trigger */ | ||
25 | #define IRQ_IXP23XX_TIMER1 3 /* Timer[0] */ | ||
26 | #define IRQ_IXP23XX_TIMER2 4 /* Timer[1] */ | ||
27 | #define IRQ_IXP23XX_TIMESTAMP 5 /* Timer[2], Time-stamp */ | ||
28 | #define IRQ_IXP23XX_WDOG 6 /* Time[3], Watchdog Timer */ | ||
29 | #define IRQ_IXP23XX_PCI_DBELL 7 /* PCI Doorbell */ | ||
30 | #define IRQ_IXP23XX_PCI_DMA1 8 /* PCI DMA Channel 1 */ | ||
31 | #define IRQ_IXP23XX_PCI_DMA2 9 /* PCI DMA Channel 2 */ | ||
32 | #define IRQ_IXP23XX_PCI_DMA3 10 /* PCI DMA Channel 3 */ | ||
33 | #define IRQ_IXP23XX_PCI_INT_RPH 11 /* pcxg_pci_int_rph */ | ||
34 | #define IRQ_IXP23XX_CPP_PMU 12 /* xpxg_pm_int_rpl */ | ||
35 | #define IRQ_IXP23XX_SWINT0 13 /* S/W Interrupt0 */ | ||
36 | #define IRQ_IXP23XX_SWINT1 14 /* S/W Interrupt1 */ | ||
37 | #define IRQ_IXP23XX_UART2 15 /* UART1 Interrupt */ | ||
38 | #define IRQ_IXP23XX_UART1 16 /* UART0 Interrupt */ | ||
39 | #define IRQ_IXP23XX_XSI_PMU_ROLLOVER 17 /* AHB Performance M. Unit counter rollover */ | ||
40 | #define IRQ_IXP23XX_XSI_AHB_PM0 18 /* intr_pm_o */ | ||
41 | #define IRQ_IXP23XX_XSI_AHB_ECE0 19 /* intr_ece_o */ | ||
42 | #define IRQ_IXP23XX_XSI_AHB_GASKET 20 /* gas_intr_o */ | ||
43 | #define IRQ_IXP23XX_XSI_CPP 21 /* xsi2cpp_int */ | ||
44 | #define IRQ_IXP23XX_CPP_XSI 22 /* cpp2xsi_int */ | ||
45 | #define IRQ_IXP23XX_ME_ATTN0 23 /* ME_ATTN */ | ||
46 | #define IRQ_IXP23XX_ME_ATTN1 24 /* ME_ATTN */ | ||
47 | #define IRQ_IXP23XX_ME_ATTN2 25 /* ME_ATTN */ | ||
48 | #define IRQ_IXP23XX_ME_ATTN3 26 /* ME_ATTN */ | ||
49 | #define IRQ_IXP23XX_PCI_ERR_RPH 27 /* PCXG_PCI_ERR_RPH */ | ||
50 | #define IRQ_IXP23XX_D0XG_ECC_CORR 28 /* D0XG_DRAM_ECC_CORR */ | ||
51 | #define IRQ_IXP23XX_D0XG_ECC_UNCORR 29 /* D0XG_DRAM_ECC_UNCORR */ | ||
52 | #define IRQ_IXP23XX_SRAM_ERR1 30 /* SRAM1_ERR */ | ||
53 | #define IRQ_IXP23XX_SRAM_ERR0 31 /* SRAM0_ERR */ | ||
54 | #define IRQ_IXP23XX_MEDIA_ERR 32 /* MEDIA_ERR */ | ||
55 | #define IRQ_IXP23XX_STH_DRAM_ECC_MAJ 33 /* STH_DRAM0_ECC_MAJ */ | ||
56 | #define IRQ_IXP23XX_GPIO6 34 /* GPIO0 interrupts */ | ||
57 | #define IRQ_IXP23XX_GPIO7 35 /* GPIO1 interrupts */ | ||
58 | #define IRQ_IXP23XX_GPIO8 36 /* GPIO2 interrupts */ | ||
59 | #define IRQ_IXP23XX_GPIO9 37 /* GPIO3 interrupts */ | ||
60 | #define IRQ_IXP23XX_GPIO10 38 /* GPIO4 interrupts */ | ||
61 | #define IRQ_IXP23XX_GPIO11 39 /* GPIO5 interrupts */ | ||
62 | #define IRQ_IXP23XX_GPIO12 40 /* GPIO6 interrupts */ | ||
63 | #define IRQ_IXP23XX_GPIO13 41 /* GPIO7 interrupts */ | ||
64 | #define IRQ_IXP23XX_GPIO14 42 /* GPIO8 interrupts */ | ||
65 | #define IRQ_IXP23XX_GPIO15 43 /* GPIO9 interrupts */ | ||
66 | #define IRQ_IXP23XX_SHAC_RING0 44 /* SHAC Ring Full */ | ||
67 | #define IRQ_IXP23XX_SHAC_RING1 45 /* SHAC Ring Full */ | ||
68 | #define IRQ_IXP23XX_SHAC_RING2 46 /* SHAC Ring Full */ | ||
69 | #define IRQ_IXP23XX_SHAC_RING3 47 /* SHAC Ring Full */ | ||
70 | #define IRQ_IXP23XX_SHAC_RING4 48 /* SHAC Ring Full */ | ||
71 | #define IRQ_IXP23XX_SHAC_RING5 49 /* SHAC Ring Full */ | ||
72 | #define IRQ_IXP23XX_SHAC_RING6 50 /* SHAC RING Full */ | ||
73 | #define IRQ_IXP23XX_SHAC_RING7 51 /* SHAC Ring Full */ | ||
74 | #define IRQ_IXP23XX_SHAC_RING8 52 /* SHAC Ring Full */ | ||
75 | #define IRQ_IXP23XX_SHAC_RING9 53 /* SHAC Ring Full */ | ||
76 | #define IRQ_IXP23XX_SHAC_RING10 54 /* SHAC Ring Full */ | ||
77 | #define IRQ_IXP23XX_SHAC_RING11 55 /* SHAC Ring Full */ | ||
78 | #define IRQ_IXP23XX_ME_THREAD_A0_ME0 56 /* ME_THREAD_A */ | ||
79 | #define IRQ_IXP23XX_ME_THREAD_A1_ME0 57 /* ME_THREAD_A */ | ||
80 | #define IRQ_IXP23XX_ME_THREAD_A2_ME0 58 /* ME_THREAD_A */ | ||
81 | #define IRQ_IXP23XX_ME_THREAD_A3_ME0 59 /* ME_THREAD_A */ | ||
82 | #define IRQ_IXP23XX_ME_THREAD_A4_ME0 60 /* ME_THREAD_A */ | ||
83 | #define IRQ_IXP23XX_ME_THREAD_A5_ME0 61 /* ME_THREAD_A */ | ||
84 | #define IRQ_IXP23XX_ME_THREAD_A6_ME0 62 /* ME_THREAD_A */ | ||
85 | #define IRQ_IXP23XX_ME_THREAD_A7_ME0 63 /* ME_THREAD_A */ | ||
86 | #define IRQ_IXP23XX_ME_THREAD_A8_ME1 64 /* ME_THREAD_A */ | ||
87 | #define IRQ_IXP23XX_ME_THREAD_A9_ME1 65 /* ME_THREAD_A */ | ||
88 | #define IRQ_IXP23XX_ME_THREAD_A10_ME1 66 /* ME_THREAD_A */ | ||
89 | #define IRQ_IXP23XX_ME_THREAD_A11_ME1 67 /* ME_THREAD_A */ | ||
90 | #define IRQ_IXP23XX_ME_THREAD_A12_ME1 68 /* ME_THREAD_A */ | ||
91 | #define IRQ_IXP23XX_ME_THREAD_A13_ME1 69 /* ME_THREAD_A */ | ||
92 | #define IRQ_IXP23XX_ME_THREAD_A14_ME1 70 /* ME_THREAD_A */ | ||
93 | #define IRQ_IXP23XX_ME_THREAD_A15_ME1 71 /* ME_THREAD_A */ | ||
94 | #define IRQ_IXP23XX_ME_THREAD_A16_ME2 72 /* ME_THREAD_A */ | ||
95 | #define IRQ_IXP23XX_ME_THREAD_A17_ME2 73 /* ME_THREAD_A */ | ||
96 | #define IRQ_IXP23XX_ME_THREAD_A18_ME2 74 /* ME_THREAD_A */ | ||
97 | #define IRQ_IXP23XX_ME_THREAD_A19_ME2 75 /* ME_THREAD_A */ | ||
98 | #define IRQ_IXP23XX_ME_THREAD_A20_ME2 76 /* ME_THREAD_A */ | ||
99 | #define IRQ_IXP23XX_ME_THREAD_A21_ME2 77 /* ME_THREAD_A */ | ||
100 | #define IRQ_IXP23XX_ME_THREAD_A22_ME2 78 /* ME_THREAD_A */ | ||
101 | #define IRQ_IXP23XX_ME_THREAD_A23_ME2 79 /* ME_THREAD_A */ | ||
102 | #define IRQ_IXP23XX_ME_THREAD_A24_ME3 80 /* ME_THREAD_A */ | ||
103 | #define IRQ_IXP23XX_ME_THREAD_A25_ME3 81 /* ME_THREAD_A */ | ||
104 | #define IRQ_IXP23XX_ME_THREAD_A26_ME3 82 /* ME_THREAD_A */ | ||
105 | #define IRQ_IXP23XX_ME_THREAD_A27_ME3 83 /* ME_THREAD_A */ | ||
106 | #define IRQ_IXP23XX_ME_THREAD_A28_ME3 84 /* ME_THREAD_A */ | ||
107 | #define IRQ_IXP23XX_ME_THREAD_A29_ME3 85 /* ME_THREAD_A */ | ||
108 | #define IRQ_IXP23XX_ME_THREAD_A30_ME3 86 /* ME_THREAD_A */ | ||
109 | #define IRQ_IXP23XX_ME_THREAD_A31_ME3 87 /* ME_THREAD_A */ | ||
110 | #define IRQ_IXP23XX_ME_THREAD_B0_ME0 88 /* ME_THREAD_B */ | ||
111 | #define IRQ_IXP23XX_ME_THREAD_B1_ME0 89 /* ME_THREAD_B */ | ||
112 | #define IRQ_IXP23XX_ME_THREAD_B2_ME0 90 /* ME_THREAD_B */ | ||
113 | #define IRQ_IXP23XX_ME_THREAD_B3_ME0 91 /* ME_THREAD_B */ | ||
114 | #define IRQ_IXP23XX_ME_THREAD_B4_ME0 92 /* ME_THREAD_B */ | ||
115 | #define IRQ_IXP23XX_ME_THREAD_B5_ME0 93 /* ME_THREAD_B */ | ||
116 | #define IRQ_IXP23XX_ME_THREAD_B6_ME0 94 /* ME_THREAD_B */ | ||
117 | #define IRQ_IXP23XX_ME_THREAD_B7_ME0 95 /* ME_THREAD_B */ | ||
118 | #define IRQ_IXP23XX_ME_THREAD_B8_ME1 96 /* ME_THREAD_B */ | ||
119 | #define IRQ_IXP23XX_ME_THREAD_B9_ME1 97 /* ME_THREAD_B */ | ||
120 | #define IRQ_IXP23XX_ME_THREAD_B10_ME1 98 /* ME_THREAD_B */ | ||
121 | #define IRQ_IXP23XX_ME_THREAD_B11_ME1 99 /* ME_THREAD_B */ | ||
122 | #define IRQ_IXP23XX_ME_THREAD_B12_ME1 100 /* ME_THREAD_B */ | ||
123 | #define IRQ_IXP23XX_ME_THREAD_B13_ME1 101 /* ME_THREAD_B */ | ||
124 | #define IRQ_IXP23XX_ME_THREAD_B14_ME1 102 /* ME_THREAD_B */ | ||
125 | #define IRQ_IXP23XX_ME_THREAD_B15_ME1 103 /* ME_THREAD_B */ | ||
126 | #define IRQ_IXP23XX_ME_THREAD_B16_ME2 104 /* ME_THREAD_B */ | ||
127 | #define IRQ_IXP23XX_ME_THREAD_B17_ME2 105 /* ME_THREAD_B */ | ||
128 | #define IRQ_IXP23XX_ME_THREAD_B18_ME2 106 /* ME_THREAD_B */ | ||
129 | #define IRQ_IXP23XX_ME_THREAD_B19_ME2 107 /* ME_THREAD_B */ | ||
130 | #define IRQ_IXP23XX_ME_THREAD_B20_ME2 108 /* ME_THREAD_B */ | ||
131 | #define IRQ_IXP23XX_ME_THREAD_B21_ME2 109 /* ME_THREAD_B */ | ||
132 | #define IRQ_IXP23XX_ME_THREAD_B22_ME2 110 /* ME_THREAD_B */ | ||
133 | #define IRQ_IXP23XX_ME_THREAD_B23_ME2 111 /* ME_THREAD_B */ | ||
134 | #define IRQ_IXP23XX_ME_THREAD_B24_ME3 112 /* ME_THREAD_B */ | ||
135 | #define IRQ_IXP23XX_ME_THREAD_B25_ME3 113 /* ME_THREAD_B */ | ||
136 | #define IRQ_IXP23XX_ME_THREAD_B26_ME3 114 /* ME_THREAD_B */ | ||
137 | #define IRQ_IXP23XX_ME_THREAD_B27_ME3 115 /* ME_THREAD_B */ | ||
138 | #define IRQ_IXP23XX_ME_THREAD_B28_ME3 116 /* ME_THREAD_B */ | ||
139 | #define IRQ_IXP23XX_ME_THREAD_B29_ME3 117 /* ME_THREAD_B */ | ||
140 | #define IRQ_IXP23XX_ME_THREAD_B30_ME3 118 /* ME_THREAD_B */ | ||
141 | #define IRQ_IXP23XX_ME_THREAD_B31_ME3 119 /* ME_THREAD_B */ | ||
142 | |||
143 | #define NUM_IXP23XX_RAW_IRQS 120 | ||
144 | |||
145 | #define IRQ_IXP23XX_INTA 120 /* Indirect pcxg_pci_int_rph */ | ||
146 | #define IRQ_IXP23XX_INTB 121 /* Indirect pcxg_pci_int_rph */ | ||
147 | |||
148 | #define NR_IXP23XX_IRQ (IRQ_IXP23XX_INTB + 1) | ||
149 | |||
150 | /* | ||
151 | * We default to 32 per-board IRQs. Increase this number if you need | ||
152 | * more, but keep it realistic. | ||
153 | */ | ||
154 | #define NR_IXP23XX_MACH_IRQS 32 | ||
155 | |||
156 | #define NR_IRQS (NR_IXP23XX_IRQS + NR_IXP23XX_MACH_IRQS) | ||
157 | |||
158 | #define IXP23XX_MACH_IRQ(irq) (NR_IXP23XX_IRQ + (irq)) | ||
159 | |||
160 | |||
161 | /* | ||
162 | * IXDP2351-specific interrupts | ||
163 | */ | ||
164 | |||
165 | /* | ||
166 | * External PCI interrupts signaled through INTB | ||
167 | * | ||
168 | */ | ||
169 | #define IXDP2351_INTB_IRQ_BASE 0 | ||
170 | #define IRQ_IXDP2351_INTA_82546 IXP23XX_MACH_IRQ(0) | ||
171 | #define IRQ_IXDP2351_INTB_82546 IXP23XX_MACH_IRQ(1) | ||
172 | #define IRQ_IXDP2351_SPCI_DB_0 IXP23XX_MACH_IRQ(2) | ||
173 | #define IRQ_IXDP2351_SPCI_DB_1 IXP23XX_MACH_IRQ(3) | ||
174 | #define IRQ_IXDP2351_SPCI_PMC_INTA IXP23XX_MACH_IRQ(4) | ||
175 | #define IRQ_IXDP2351_SPCI_PMC_INTB IXP23XX_MACH_IRQ(5) | ||
176 | #define IRQ_IXDP2351_SPCI_PMC_INTC IXP23XX_MACH_IRQ(6) | ||
177 | #define IRQ_IXDP2351_SPCI_PMC_INTD IXP23XX_MACH_IRQ(7) | ||
178 | #define IRQ_IXDP2351_SPCI_FIC IXP23XX_MACH_IRQ(8) | ||
179 | |||
180 | #define IXDP2351_INTB_IRQ_BIT(irq) (irq - IXP23XX_MACH_IRQ(0)) | ||
181 | #define IXDP2351_INTB_IRQ_MASK(irq) (1 << IXDP2351_INTB_IRQ_BIT(irq)) | ||
182 | #define IXDP2351_INTB_IRQ_VALID 0x01FF | ||
183 | #define IXDP2351_INTB_IRQ_NUM 16 | ||
184 | |||
185 | /* | ||
186 | * Other external interrupts signaled through INTA | ||
187 | */ | ||
188 | #define IXDP2351_INTA_IRQ_BASE 16 | ||
189 | #define IRQ_IXDP2351_IPMI_FROM IXP23XX_MACH_IRQ(16) | ||
190 | #define IRQ_IXDP2351_125US IXP23XX_MACH_IRQ(17) | ||
191 | #define IRQ_IXDP2351_DB_0_ADD IXP23XX_MACH_IRQ(18) | ||
192 | #define IRQ_IXDP2351_DB_1_ADD IXP23XX_MACH_IRQ(19) | ||
193 | #define IRQ_IXDP2351_DEBUG1 IXP23XX_MACH_IRQ(20) | ||
194 | #define IRQ_IXDP2351_ADD_UART IXP23XX_MACH_IRQ(21) | ||
195 | #define IRQ_IXDP2351_FIC_ADD IXP23XX_MACH_IRQ(24) | ||
196 | #define IRQ_IXDP2351_CS8900 IXP23XX_MACH_IRQ(25) | ||
197 | #define IRQ_IXDP2351_BBSRAM IXP23XX_MACH_IRQ(26) | ||
198 | #define IRQ_IXDP2351_CONFIG_MEDIA IXP23XX_MACH_IRQ(27) | ||
199 | #define IRQ_IXDP2351_CLOCK_REF IXP23XX_MACH_IRQ(28) | ||
200 | #define IRQ_IXDP2351_A10_NP IXP23XX_MACH_IRQ(29) | ||
201 | #define IRQ_IXDP2351_A11_NP IXP23XX_MACH_IRQ(30) | ||
202 | #define IRQ_IXDP2351_DEBUG_NP IXP23XX_MACH_IRQ(31) | ||
203 | |||
204 | #define IXDP2351_INTA_IRQ_BIT(irq) (irq - IXP23XX_MACH_IRQ(16)) | ||
205 | #define IXDP2351_INTA_IRQ_MASK(irq) (1 << IXDP2351_INTA_IRQ_BIT(irq)) | ||
206 | #define IXDP2351_INTA_IRQ_VALID 0xFF3F | ||
207 | #define IXDP2351_INTA_IRQ_NUM 16 | ||
208 | |||
209 | |||
210 | /* | ||
211 | * ADI RoadRunner IRQs | ||
212 | */ | ||
213 | #define IRQ_ROADRUNNER_PCI_INTA IRQ_IXP23XX_INTA | ||
214 | #define IRQ_ROADRUNNER_PCI_INTB IRQ_IXP23XX_INTB | ||
215 | #define IRQ_ROADRUNNER_PCI_INTC IRQ_IXP23XX_GPIO11 | ||
216 | #define IRQ_ROADRUNNER_PCI_INTD IRQ_IXP23XX_GPIO12 | ||
217 | |||
218 | /* | ||
219 | * Put new board definitions here | ||
220 | */ | ||
221 | |||
222 | |||
223 | #endif | ||
diff --git a/arch/arm/mach-ixp23xx/include/mach/ixdp2351.h b/arch/arm/mach-ixp23xx/include/mach/ixdp2351.h deleted file mode 100644 index 663951027de..00000000000 --- a/arch/arm/mach-ixp23xx/include/mach/ixdp2351.h +++ /dev/null | |||
@@ -1,89 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/include/mach/ixdp2351.h | ||
3 | * | ||
4 | * Register and other defines for IXDP2351 | ||
5 | * | ||
6 | * Copyright (c) 2002-2004 Intel Corp. | ||
7 | * Copytight (c) 2005 MontaVista Software, Inc. | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License as published by the | ||
11 | * Free Software Foundation; either version 2 of the License, or (at your | ||
12 | * option) any later version. | ||
13 | */ | ||
14 | |||
15 | #ifndef __ASM_ARCH_IXDP2351_H | ||
16 | #define __ASM_ARCH_IXDP2351_H | ||
17 | |||
18 | /* | ||
19 | * NP module memory map | ||
20 | */ | ||
21 | #define IXDP2351_NP_PHYS_BASE (IXP23XX_EXP_BUS_CS4_BASE) | ||
22 | #define IXDP2351_NP_PHYS_SIZE 0x00100000 | ||
23 | #define IXDP2351_NP_VIRT_BASE 0xeff00000 | ||
24 | |||
25 | #define IXDP2351_VIRT_CS8900_BASE (IXDP2351_NP_VIRT_BASE) | ||
26 | #define IXDP2351_VIRT_CS8900_END (IXDP2351_VIRT_CS8900_BASE + 16) | ||
27 | |||
28 | #define IXDP2351_VIRT_NP_CPLD_BASE (IXP23XX_EXP_BUS_CS4_BASE_VIRT + 0x00010000) | ||
29 | |||
30 | #define IXDP2351_NP_CPLD_REG(reg) ((volatile u16 *)(IXDP2351_VIRT_NP_CPLD_BASE + reg)) | ||
31 | |||
32 | #define IXDP2351_NP_CPLD_RESET1_REG IXDP2351_NP_CPLD_REG(0x00) | ||
33 | #define IXDP2351_NP_CPLD_LED_REG IXDP2351_NP_CPLD_REG(0x02) | ||
34 | #define IXDP2351_NP_CPLD_VERSION_REG IXDP2351_NP_CPLD_REG(0x04) | ||
35 | |||
36 | /* | ||
37 | * Base board module memory map | ||
38 | */ | ||
39 | |||
40 | #define IXDP2351_BB_BASE_PHYS (IXP23XX_EXP_BUS_CS5_BASE) | ||
41 | #define IXDP2351_BB_SIZE 0x01000000 | ||
42 | #define IXDP2351_BB_BASE_VIRT (0xee000000) | ||
43 | |||
44 | #define IXDP2351_BB_AREA_BASE(offset) (IXDP2351_BB_BASE_VIRT + offset) | ||
45 | |||
46 | #define IXDP2351_VIRT_NVRAM_BASE IXDP2351_BB_AREA_BASE(0x0) | ||
47 | #define IXDP2351_NVRAM_SIZE (0x20000) | ||
48 | |||
49 | #define IXDP2351_VIRT_MB_IXF1104_BASE IXDP2351_BB_AREA_BASE(0x00020000) | ||
50 | #define IXDP2351_VIRT_ADD_UART_BASE IXDP2351_BB_AREA_BASE(0x000240C0) | ||
51 | #define IXDP2351_VIRT_FIC_BASE IXDP2351_BB_AREA_BASE(0x00200000) | ||
52 | #define IXDP2351_VIRT_DB0_BASE IXDP2351_BB_AREA_BASE(0x00400000) | ||
53 | #define IXDP2351_VIRT_DB1_BASE IXDP2351_BB_AREA_BASE(0x00600000) | ||
54 | #define IXDP2351_VIRT_CPLD_BASE IXDP2351_BB_AREA_BASE(0x00024000) | ||
55 | |||
56 | /* | ||
57 | * On board CPLD registers | ||
58 | */ | ||
59 | #define IXDP2351_CPLD_BB_REG(reg) ((volatile u16 *)(IXDP2351_VIRT_CPLD_BASE + reg)) | ||
60 | |||
61 | #define IXDP2351_CPLD_RESET0_REG IXDP2351_CPLD_BB_REG(0x00) | ||
62 | #define IXDP2351_CPLD_RESET1_REG IXDP2351_CPLD_BB_REG(0x04) | ||
63 | |||
64 | #define IXDP2351_CPLD_RESET1_MAGIC 0x55AA | ||
65 | #define IXDP2351_CPLD_RESET1_ENABLE 0x8000 | ||
66 | |||
67 | #define IXDP2351_CPLD_FPGA_CONFIG_REG IXDP2351_CPLD_BB_REG(0x08) | ||
68 | #define IXDP2351_CPLD_INTB_MASK_SET_REG IXDP2351_CPLD_BB_REG(0x10) | ||
69 | #define IXDP2351_CPLD_INTA_MASK_SET_REG IXDP2351_CPLD_BB_REG(0x14) | ||
70 | #define IXDP2351_CPLD_INTB_STAT_REG IXDP2351_CPLD_BB_REG(0x18) | ||
71 | #define IXDP2351_CPLD_INTA_STAT_REG IXDP2351_CPLD_BB_REG(0x1C) | ||
72 | #define IXDP2351_CPLD_INTB_RAW_REG IXDP2351_CPLD_BB_REG(0x20) /* read */ | ||
73 | #define IXDP2351_CPLD_INTA_RAW_REG IXDP2351_CPLD_BB_REG(0x24) /* read */ | ||
74 | #define IXDP2351_CPLD_INTB_MASK_CLR_REG IXDP2351_CPLD_INTB_RAW_REG /* write */ | ||
75 | #define IXDP2351_CPLD_INTA_MASK_CLR_REG IXDP2351_CPLD_INTA_RAW_REG /* write */ | ||
76 | #define IXDP2351_CPLD_INTB_SIM_REG IXDP2351_CPLD_BB_REG(0x28) | ||
77 | #define IXDP2351_CPLD_INTA_SIM_REG IXDP2351_CPLD_BB_REG(0x2C) | ||
78 | /* Interrupt bits are defined in irqs.h */ | ||
79 | #define IXDP2351_CPLD_BB_GBE0_REG IXDP2351_CPLD_BB_REG(0x30) | ||
80 | #define IXDP2351_CPLD_BB_GBE1_REG IXDP2351_CPLD_BB_REG(0x34) | ||
81 | |||
82 | /* #define IXDP2351_CPLD_BB_MISC_REG IXDP2351_CPLD_REG(0x1C) */ | ||
83 | /* #define IXDP2351_CPLD_BB_MISC_REV_MASK 0xFF */ | ||
84 | /* #define IXDP2351_CPLD_BB_GDXCS0_REG IXDP2351_CPLD_REG(0x24) */ | ||
85 | /* #define IXDP2351_CPLD_BB_GDXCS1_REG IXDP2351_CPLD_REG(0x28) */ | ||
86 | /* #define IXDP2351_CPLD_BB_CLOCK_REG IXDP2351_CPLD_REG(0x04) */ | ||
87 | |||
88 | |||
89 | #endif | ||
diff --git a/arch/arm/mach-ixp23xx/include/mach/ixp23xx.h b/arch/arm/mach-ixp23xx/include/mach/ixp23xx.h deleted file mode 100644 index 6d02481b1d6..00000000000 --- a/arch/arm/mach-ixp23xx/include/mach/ixp23xx.h +++ /dev/null | |||
@@ -1,298 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/include/mach/ixp23xx.h | ||
3 | * | ||
4 | * Register definitions for IXP23XX | ||
5 | * | ||
6 | * Copyright (C) 2003-2005 Intel Corporation. | ||
7 | * Copyright (C) 2005 MontaVista Software, Inc. | ||
8 | * | ||
9 | * Maintainer: Deepak Saxena <dsaxena@plexity.net> | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License version 2 as | ||
13 | * published by the Free Software Foundation. | ||
14 | */ | ||
15 | |||
16 | #ifndef __ASM_ARCH_IXP23XX_H | ||
17 | #define __ASM_ARCH_IXP23XX_H | ||
18 | |||
19 | /* | ||
20 | * IXP2300 linux memory map: | ||
21 | * | ||
22 | * virt phys size | ||
23 | * fffd0000 a0000000 64K XSI2CPP_CSR | ||
24 | * fffc0000 c4000000 4K EXP_CFG | ||
25 | * fff00000 c8000000 64K PERIPHERAL | ||
26 | * fe000000 1c0000000 16M CAP_CSR | ||
27 | * fd000000 1c8000000 16M MSF_CSR | ||
28 | * fb000000 16M --- | ||
29 | * fa000000 1d8000000 32M PCI_IO | ||
30 | * f8000000 1da000000 32M PCI_CFG | ||
31 | * f6000000 1de000000 32M PCI_CREG | ||
32 | * f4000000 32M --- | ||
33 | * f0000000 1e0000000 64M PCI_MEM | ||
34 | * e[c-f]000000 per-platform mappings | ||
35 | */ | ||
36 | |||
37 | |||
38 | /**************************************************************************** | ||
39 | * Static mappings. | ||
40 | ****************************************************************************/ | ||
41 | #define IXP23XX_XSI2CPP_CSR_PHYS 0xa0000000 | ||
42 | #define IXP23XX_XSI2CPP_CSR_VIRT 0xfffd0000 | ||
43 | #define IXP23XX_XSI2CPP_CSR_SIZE 0x00010000 | ||
44 | |||
45 | #define IXP23XX_EXP_CFG_PHYS 0xc4000000 | ||
46 | #define IXP23XX_EXP_CFG_VIRT 0xfffc0000 | ||
47 | #define IXP23XX_EXP_CFG_SIZE 0x00001000 | ||
48 | |||
49 | #define IXP23XX_PERIPHERAL_PHYS 0xc8000000 | ||
50 | #define IXP23XX_PERIPHERAL_VIRT 0xfff00000 | ||
51 | #define IXP23XX_PERIPHERAL_SIZE 0x00010000 | ||
52 | |||
53 | #define IXP23XX_CAP_CSR_PHYS 0x1c0000000ULL | ||
54 | #define IXP23XX_CAP_CSR_VIRT 0xfe000000 | ||
55 | #define IXP23XX_CAP_CSR_SIZE 0x01000000 | ||
56 | |||
57 | #define IXP23XX_MSF_CSR_PHYS 0x1c8000000ULL | ||
58 | #define IXP23XX_MSF_CSR_VIRT 0xfd000000 | ||
59 | #define IXP23XX_MSF_CSR_SIZE 0x01000000 | ||
60 | |||
61 | #define IXP23XX_PCI_IO_PHYS 0x1d8000000ULL | ||
62 | #define IXP23XX_PCI_IO_VIRT 0xfa000000 | ||
63 | #define IXP23XX_PCI_IO_SIZE 0x02000000 | ||
64 | |||
65 | #define IXP23XX_PCI_CFG_PHYS 0x1da000000ULL | ||
66 | #define IXP23XX_PCI_CFG_VIRT 0xf8000000 | ||
67 | #define IXP23XX_PCI_CFG_SIZE 0x02000000 | ||
68 | #define IXP23XX_PCI_CFG0_VIRT IXP23XX_PCI_CFG_VIRT | ||
69 | #define IXP23XX_PCI_CFG1_VIRT (IXP23XX_PCI_CFG_VIRT + 0x01000000) | ||
70 | |||
71 | #define IXP23XX_PCI_CREG_PHYS 0x1de000000ULL | ||
72 | #define IXP23XX_PCI_CREG_VIRT 0xf6000000 | ||
73 | #define IXP23XX_PCI_CREG_SIZE 0x02000000 | ||
74 | #define IXP23XX_PCI_CSR_VIRT (IXP23XX_PCI_CREG_VIRT + 0x01000000) | ||
75 | |||
76 | #define IXP23XX_PCI_MEM_START 0xe0000000 | ||
77 | #define IXP23XX_PCI_MEM_PHYS 0x1e0000000ULL | ||
78 | #define IXP23XX_PCI_MEM_VIRT 0xf0000000 | ||
79 | #define IXP23XX_PCI_MEM_SIZE 0x04000000 | ||
80 | |||
81 | |||
82 | /**************************************************************************** | ||
83 | * XSI2CPP CSRs. | ||
84 | ****************************************************************************/ | ||
85 | #define IXP23XX_XSI2CPP_REG(x) ((volatile unsigned long *)(IXP23XX_XSI2CPP_CSR_VIRT + (x))) | ||
86 | #define IXP23XX_CPP2XSI_CURR_XFER_REG3 IXP23XX_XSI2CPP_REG(0xf8) | ||
87 | #define IXP23XX_CPP2XSI_ADDR_31 (1 << 19) | ||
88 | #define IXP23XX_CPP2XSI_PSH_OFF (1 << 20) | ||
89 | #define IXP23XX_CPP2XSI_COH_OFF (1 << 21) | ||
90 | |||
91 | |||
92 | /**************************************************************************** | ||
93 | * Expansion Bus Config. | ||
94 | ****************************************************************************/ | ||
95 | #define IXP23XX_EXP_CFG_REG(x) ((volatile unsigned long *)(IXP23XX_EXP_CFG_VIRT + (x))) | ||
96 | #define IXP23XX_EXP_CS0 IXP23XX_EXP_CFG_REG(0x00) | ||
97 | #define IXP23XX_EXP_CS1 IXP23XX_EXP_CFG_REG(0x04) | ||
98 | #define IXP23XX_EXP_CS2 IXP23XX_EXP_CFG_REG(0x08) | ||
99 | #define IXP23XX_EXP_CS3 IXP23XX_EXP_CFG_REG(0x0c) | ||
100 | #define IXP23XX_EXP_CS4 IXP23XX_EXP_CFG_REG(0x10) | ||
101 | #define IXP23XX_EXP_CS5 IXP23XX_EXP_CFG_REG(0x14) | ||
102 | #define IXP23XX_EXP_CS6 IXP23XX_EXP_CFG_REG(0x18) | ||
103 | #define IXP23XX_EXP_CS7 IXP23XX_EXP_CFG_REG(0x1c) | ||
104 | #define IXP23XX_FLASH_WRITABLE (0x2) | ||
105 | #define IXP23XX_FLASH_BUS8 (0x1) | ||
106 | |||
107 | #define IXP23XX_EXP_CFG0 IXP23XX_EXP_CFG_REG(0x20) | ||
108 | #define IXP23XX_EXP_CFG1 IXP23XX_EXP_CFG_REG(0x24) | ||
109 | #define IXP23XX_EXP_CFG0_MEM_MAP (1 << 31) | ||
110 | #define IXP23XX_EXP_CFG0_XSCALE_SPEED_SEL (3 << 22) | ||
111 | #define IXP23XX_EXP_CFG0_XSCALE_SPEED_EN (1 << 21) | ||
112 | #define IXP23XX_EXP_CFG0_CPP_SPEED_SEL (3 << 19) | ||
113 | #define IXP23XX_EXP_CFG0_CPP_SPEED_EN (1 << 18) | ||
114 | #define IXP23XX_EXP_CFG0_PCI_SWIN (3 << 16) | ||
115 | #define IXP23XX_EXP_CFG0_PCI_DWIN (3 << 14) | ||
116 | #define IXP23XX_EXP_CFG0_PCI33_MODE (1 << 13) | ||
117 | #define IXP23XX_EXP_CFG0_QDR_SPEED_SEL (1 << 12) | ||
118 | #define IXP23XX_EXP_CFG0_CPP_DIV_SEL (1 << 5) | ||
119 | #define IXP23XX_EXP_CFG0_XSI_NOT_PRES (1 << 4) | ||
120 | #define IXP23XX_EXP_CFG0_PROM_BOOT (1 << 3) | ||
121 | #define IXP23XX_EXP_CFG0_PCI_ARB (1 << 2) | ||
122 | #define IXP23XX_EXP_CFG0_PCI_HOST (1 << 1) | ||
123 | #define IXP23XX_EXP_CFG0_FLASH_WIDTH (1 << 0) | ||
124 | |||
125 | #define IXP23XX_EXP_UNIT_FUSE IXP23XX_EXP_CFG_REG(0x28) | ||
126 | #define IXP23XX_EXP_MSF_MUX IXP23XX_EXP_CFG_REG(0x30) | ||
127 | #define IXP23XX_EXP_CFG_FUSE IXP23XX_EXP_CFG_REG(0x34) | ||
128 | |||
129 | #define IXP23XX_EXP_BUS_PHYS 0x90000000 | ||
130 | #define IXP23XX_EXP_BUS_WINDOW_SIZE 0x01000000 | ||
131 | |||
132 | #define IXP23XX_EXP_BUS_CS0_BASE (IXP23XX_EXP_BUS_PHYS + 0x00000000) | ||
133 | #define IXP23XX_EXP_BUS_CS1_BASE (IXP23XX_EXP_BUS_PHYS + 0x01000000) | ||
134 | #define IXP23XX_EXP_BUS_CS2_BASE (IXP23XX_EXP_BUS_PHYS + 0x02000000) | ||
135 | #define IXP23XX_EXP_BUS_CS3_BASE (IXP23XX_EXP_BUS_PHYS + 0x03000000) | ||
136 | #define IXP23XX_EXP_BUS_CS4_BASE (IXP23XX_EXP_BUS_PHYS + 0x04000000) | ||
137 | #define IXP23XX_EXP_BUS_CS5_BASE (IXP23XX_EXP_BUS_PHYS + 0x05000000) | ||
138 | #define IXP23XX_EXP_BUS_CS6_BASE (IXP23XX_EXP_BUS_PHYS + 0x06000000) | ||
139 | #define IXP23XX_EXP_BUS_CS7_BASE (IXP23XX_EXP_BUS_PHYS + 0x07000000) | ||
140 | |||
141 | |||
142 | /**************************************************************************** | ||
143 | * Peripherals. | ||
144 | ****************************************************************************/ | ||
145 | #define IXP23XX_UART1_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x0000) | ||
146 | #define IXP23XX_UART2_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x1000) | ||
147 | #define IXP23XX_PMU_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x2000) | ||
148 | #define IXP23XX_INTC_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x3000) | ||
149 | #define IXP23XX_GPIO_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x4000) | ||
150 | #define IXP23XX_TIMER_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x5000) | ||
151 | #define IXP23XX_NPE0_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x6000) | ||
152 | #define IXP23XX_DSR_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x7000) | ||
153 | #define IXP23XX_NPE1_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x8000) | ||
154 | #define IXP23XX_ETH0_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x9000) | ||
155 | #define IXP23XX_ETH1_VIRT (IXP23XX_PERIPHERAL_VIRT + 0xA000) | ||
156 | #define IXP23XX_GIG0_VIRT (IXP23XX_PERIPHERAL_VIRT + 0xB000) | ||
157 | #define IXP23XX_GIG1_VIRT (IXP23XX_PERIPHERAL_VIRT + 0xC000) | ||
158 | #define IXP23XX_DDRS_VIRT (IXP23XX_PERIPHERAL_VIRT + 0xD000) | ||
159 | |||
160 | #define IXP23XX_UART1_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x0000) | ||
161 | #define IXP23XX_UART2_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x1000) | ||
162 | #define IXP23XX_PMU_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x2000) | ||
163 | #define IXP23XX_INTC_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x3000) | ||
164 | #define IXP23XX_GPIO_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x4000) | ||
165 | #define IXP23XX_TIMER_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x5000) | ||
166 | #define IXP23XX_NPE0_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x6000) | ||
167 | #define IXP23XX_DSR_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x7000) | ||
168 | #define IXP23XX_NPE1_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x8000) | ||
169 | #define IXP23XX_ETH0_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x9000) | ||
170 | #define IXP23XX_ETH1_PHYS (IXP23XX_PERIPHERAL_PHYS + 0xA000) | ||
171 | #define IXP23XX_GIG0_PHYS (IXP23XX_PERIPHERAL_PHYS + 0xB000) | ||
172 | #define IXP23XX_GIG1_PHYS (IXP23XX_PERIPHERAL_PHYS + 0xC000) | ||
173 | #define IXP23XX_DDRS_PHYS (IXP23XX_PERIPHERAL_PHYS + 0xD000) | ||
174 | |||
175 | |||
176 | /**************************************************************************** | ||
177 | * Interrupt controller. | ||
178 | ****************************************************************************/ | ||
179 | #define IXP23XX_INTC_REG(x) ((volatile unsigned long *)(IXP23XX_INTC_VIRT + (x))) | ||
180 | #define IXP23XX_INTR_ST1 IXP23XX_INTC_REG(0x00) | ||
181 | #define IXP23XX_INTR_ST2 IXP23XX_INTC_REG(0x04) | ||
182 | #define IXP23XX_INTR_ST3 IXP23XX_INTC_REG(0x08) | ||
183 | #define IXP23XX_INTR_ST4 IXP23XX_INTC_REG(0x0c) | ||
184 | #define IXP23XX_INTR_EN1 IXP23XX_INTC_REG(0x10) | ||
185 | #define IXP23XX_INTR_EN2 IXP23XX_INTC_REG(0x14) | ||
186 | #define IXP23XX_INTR_EN3 IXP23XX_INTC_REG(0x18) | ||
187 | #define IXP23XX_INTR_EN4 IXP23XX_INTC_REG(0x1c) | ||
188 | #define IXP23XX_INTR_SEL1 IXP23XX_INTC_REG(0x20) | ||
189 | #define IXP23XX_INTR_SEL2 IXP23XX_INTC_REG(0x24) | ||
190 | #define IXP23XX_INTR_SEL3 IXP23XX_INTC_REG(0x28) | ||
191 | #define IXP23XX_INTR_SEL4 IXP23XX_INTC_REG(0x2c) | ||
192 | #define IXP23XX_INTR_IRQ_ST1 IXP23XX_INTC_REG(0x30) | ||
193 | #define IXP23XX_INTR_IRQ_ST2 IXP23XX_INTC_REG(0x34) | ||
194 | #define IXP23XX_INTR_IRQ_ST3 IXP23XX_INTC_REG(0x38) | ||
195 | #define IXP23XX_INTR_IRQ_ST4 IXP23XX_INTC_REG(0x3c) | ||
196 | #define IXP23XX_INTR_IRQ_ENC_ST_OFFSET 0x54 | ||
197 | |||
198 | |||
199 | /**************************************************************************** | ||
200 | * GPIO. | ||
201 | ****************************************************************************/ | ||
202 | #define IXP23XX_GPIO_REG(x) ((volatile unsigned long *)(IXP23XX_GPIO_VIRT + (x))) | ||
203 | #define IXP23XX_GPIO_GPOUTR IXP23XX_GPIO_REG(0x00) | ||
204 | #define IXP23XX_GPIO_GPOER IXP23XX_GPIO_REG(0x04) | ||
205 | #define IXP23XX_GPIO_GPINR IXP23XX_GPIO_REG(0x08) | ||
206 | #define IXP23XX_GPIO_GPISR IXP23XX_GPIO_REG(0x0c) | ||
207 | #define IXP23XX_GPIO_GPIT1R IXP23XX_GPIO_REG(0x10) | ||
208 | #define IXP23XX_GPIO_GPIT2R IXP23XX_GPIO_REG(0x14) | ||
209 | #define IXP23XX_GPIO_GPCLKR IXP23XX_GPIO_REG(0x18) | ||
210 | #define IXP23XX_GPIO_GPDBSELR IXP23XX_GPIO_REG(0x1c) | ||
211 | |||
212 | #define IXP23XX_GPIO_STYLE_MASK 0x7 | ||
213 | #define IXP23XX_GPIO_STYLE_ACTIVE_HIGH 0x0 | ||
214 | #define IXP23XX_GPIO_STYLE_ACTIVE_LOW 0x1 | ||
215 | #define IXP23XX_GPIO_STYLE_RISING_EDGE 0x2 | ||
216 | #define IXP23XX_GPIO_STYLE_FALLING_EDGE 0x3 | ||
217 | #define IXP23XX_GPIO_STYLE_TRANSITIONAL 0x4 | ||
218 | |||
219 | #define IXP23XX_GPIO_STYLE_SIZE 3 | ||
220 | |||
221 | |||
222 | /**************************************************************************** | ||
223 | * Timer. | ||
224 | ****************************************************************************/ | ||
225 | #define IXP23XX_TIMER_REG(x) ((volatile unsigned long *)(IXP23XX_TIMER_VIRT + (x))) | ||
226 | #define IXP23XX_TIMER_CONT IXP23XX_TIMER_REG(0x00) | ||
227 | #define IXP23XX_TIMER1_TIMESTAMP IXP23XX_TIMER_REG(0x04) | ||
228 | #define IXP23XX_TIMER1_RELOAD IXP23XX_TIMER_REG(0x08) | ||
229 | #define IXP23XX_TIMER2_TIMESTAMP IXP23XX_TIMER_REG(0x0c) | ||
230 | #define IXP23XX_TIMER2_RELOAD IXP23XX_TIMER_REG(0x10) | ||
231 | #define IXP23XX_TIMER_WDOG IXP23XX_TIMER_REG(0x14) | ||
232 | #define IXP23XX_TIMER_WDOG_EN IXP23XX_TIMER_REG(0x18) | ||
233 | #define IXP23XX_TIMER_WDOG_KEY IXP23XX_TIMER_REG(0x1c) | ||
234 | #define IXP23XX_TIMER_WDOG_KEY_MAGIC 0x482e | ||
235 | #define IXP23XX_TIMER_STATUS IXP23XX_TIMER_REG(0x20) | ||
236 | #define IXP23XX_TIMER_SOFT_RESET IXP23XX_TIMER_REG(0x24) | ||
237 | #define IXP23XX_TIMER_SOFT_RESET_EN IXP23XX_TIMER_REG(0x28) | ||
238 | |||
239 | #define IXP23XX_TIMER_ENABLE (1 << 0) | ||
240 | #define IXP23XX_TIMER_ONE_SHOT (1 << 1) | ||
241 | /* Low order bits of reload value ignored */ | ||
242 | #define IXP23XX_TIMER_RELOAD_MASK (0x3) | ||
243 | #define IXP23XX_TIMER_DISABLED (0x0) | ||
244 | #define IXP23XX_TIMER1_INT_PEND (1 << 0) | ||
245 | #define IXP23XX_TIMER2_INT_PEND (1 << 1) | ||
246 | #define IXP23XX_TIMER_STATUS_TS_PEND (1 << 2) | ||
247 | #define IXP23XX_TIMER_STATUS_WDOG_PEND (1 << 3) | ||
248 | #define IXP23XX_TIMER_STATUS_WARM_RESET (1 << 4) | ||
249 | |||
250 | |||
251 | /**************************************************************************** | ||
252 | * CAP CSRs. | ||
253 | ****************************************************************************/ | ||
254 | #define IXP23XX_GLOBAL_REG(x) ((volatile unsigned long *)(IXP23XX_CAP_CSR_VIRT + 0x4a00 + (x))) | ||
255 | #define IXP23XX_PRODUCT_ID IXP23XX_GLOBAL_REG(0x00) | ||
256 | #define IXP23XX_MISC_CONTROL IXP23XX_GLOBAL_REG(0x04) | ||
257 | #define IXP23XX_MSF_CLK_CNTRL IXP23XX_GLOBAL_REG(0x08) | ||
258 | #define IXP23XX_RESET0 IXP23XX_GLOBAL_REG(0x0c) | ||
259 | #define IXP23XX_RESET1 IXP23XX_GLOBAL_REG(0x10) | ||
260 | #define IXP23XX_STRAP_OPTIONS IXP23XX_GLOBAL_REG(0x18) | ||
261 | |||
262 | #define IXP23XX_ENABLE_WATCHDOG (1 << 24) | ||
263 | #define IXP23XX_SHPC_INIT_COMP (1 << 21) | ||
264 | #define IXP23XX_RST_ALL (1 << 16) | ||
265 | #define IXP23XX_RESET_PCI (1 << 2) | ||
266 | #define IXP23XX_PCI_UNIT_RESET (1 << 1) | ||
267 | #define IXP23XX_XSCALE_RESET (1 << 0) | ||
268 | |||
269 | #define IXP23XX_UENGINE_CSR_VIRT_BASE (IXP23XX_CAP_CSR_VIRT + 0x18000) | ||
270 | |||
271 | |||
272 | /**************************************************************************** | ||
273 | * PCI CSRs. | ||
274 | ****************************************************************************/ | ||
275 | #define IXP23XX_PCI_CREG(x) ((volatile unsigned long *)(IXP23XX_PCI_CREG_VIRT + (x))) | ||
276 | #define IXP23XX_PCI_CMDSTAT IXP23XX_PCI_CREG(0x04) | ||
277 | #define IXP23XX_PCI_SRAM_BAR IXP23XX_PCI_CREG(0x14) | ||
278 | #define IXP23XX_PCI_SDRAM_BAR IXP23XX_PCI_CREG(0x18) | ||
279 | |||
280 | |||
281 | #define IXP23XX_PCI_CSR(x) ((volatile unsigned long *)(IXP23XX_PCI_CREG_VIRT + 0x01000000 + (x))) | ||
282 | #define IXP23XX_PCI_OUT_INT_STATUS IXP23XX_PCI_CSR(0x0030) | ||
283 | #define IXP23XX_PCI_OUT_INT_MASK IXP23XX_PCI_CSR(0x0034) | ||
284 | #define IXP23XX_PCI_SRAM_BASE_ADDR_MASK IXP23XX_PCI_CSR(0x00fc) | ||
285 | #define IXP23XX_PCI_DRAM_BASE_ADDR_MASK IXP23XX_PCI_CSR(0x0100) | ||
286 | #define IXP23XX_PCI_CONTROL IXP23XX_PCI_CSR(0x013c) | ||
287 | #define IXP23XX_PCI_ADDR_EXT IXP23XX_PCI_CSR(0x0140) | ||
288 | #define IXP23XX_PCI_ME_PUSH_STATUS IXP23XX_PCI_CSR(0x0148) | ||
289 | #define IXP23XX_PCI_ME_PUSH_EN IXP23XX_PCI_CSR(0x014c) | ||
290 | #define IXP23XX_PCI_ERR_STATUS IXP23XX_PCI_CSR(0x0150) | ||
291 | #define IXP23XX_PCI_ERROR_STATUS IXP23XX_PCI_CSR(0x0150) | ||
292 | #define IXP23XX_PCI_ERR_ENABLE IXP23XX_PCI_CSR(0x0154) | ||
293 | #define IXP23XX_PCI_XSCALE_INT_STATUS IXP23XX_PCI_CSR(0x0158) | ||
294 | #define IXP23XX_PCI_XSCALE_INT_ENABLE IXP23XX_PCI_CSR(0x015c) | ||
295 | #define IXP23XX_PCI_CPP_ADDR_BITS IXP23XX_PCI_CSR(0x0160) | ||
296 | |||
297 | |||
298 | #endif | ||
diff --git a/arch/arm/mach-ixp23xx/include/mach/memory.h b/arch/arm/mach-ixp23xx/include/mach/memory.h deleted file mode 100644 index 6cf0704e946..00000000000 --- a/arch/arm/mach-ixp23xx/include/mach/memory.h +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/include/mach/memory.h | ||
3 | * | ||
4 | * Copyright (c) 2003-2004 Intel Corp. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the | ||
8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
9 | * option) any later version. | ||
10 | */ | ||
11 | |||
12 | #ifndef __ASM_ARCH_MEMORY_H | ||
13 | #define __ASM_ARCH_MEMORY_H | ||
14 | |||
15 | #include <mach/hardware.h> | ||
16 | |||
17 | /* | ||
18 | * Physical DRAM offset. | ||
19 | */ | ||
20 | #define PLAT_PHYS_OFFSET (0x00000000) | ||
21 | |||
22 | #define IXP23XX_PCI_SDRAM_OFFSET (*((volatile int *)IXP23XX_PCI_SDRAM_BAR) & 0xfffffff0) | ||
23 | |||
24 | #define __phys_to_bus(x) ((x) + (IXP23XX_PCI_SDRAM_OFFSET - PHYS_OFFSET)) | ||
25 | #define __bus_to_phys(x) ((x) - (IXP23XX_PCI_SDRAM_OFFSET - PHYS_OFFSET)) | ||
26 | |||
27 | #define __virt_to_bus(v) __phys_to_bus(__virt_to_phys(v)) | ||
28 | #define __bus_to_virt(b) __phys_to_virt(__bus_to_phys(b)) | ||
29 | #define __pfn_to_bus(p) __phys_to_bus(__pfn_to_phys(p)) | ||
30 | #define __bus_to_pfn(b) __phys_to_pfn(__bus_to_phys(b)) | ||
31 | |||
32 | #define arch_is_coherent() 1 | ||
33 | |||
34 | #endif | ||
diff --git a/arch/arm/mach-ixp23xx/include/mach/platform.h b/arch/arm/mach-ixp23xx/include/mach/platform.h deleted file mode 100644 index 50de558e722..00000000000 --- a/arch/arm/mach-ixp23xx/include/mach/platform.h +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/include/mach/platform.h | ||
3 | * | ||
4 | * Various bits of code used by platform-level code. | ||
5 | * | ||
6 | * Author: Deepak Saxena <dsaxena@plexity.net> | ||
7 | * | ||
8 | * Copyright 2005 (c) MontaVista Software, Inc. | ||
9 | * | ||
10 | * This file is licensed under the terms of the GNU General Public | ||
11 | * License version 2. This program is licensed "as is" without any | ||
12 | * warranty of any kind, whether express or implied. | ||
13 | */ | ||
14 | |||
15 | #ifndef __ASSEMBLY__ | ||
16 | |||
17 | static inline unsigned long ixp2000_reg_read(volatile void *reg) | ||
18 | { | ||
19 | return *((volatile unsigned long *)reg); | ||
20 | } | ||
21 | |||
22 | static inline void ixp2000_reg_write(volatile void *reg, unsigned long val) | ||
23 | { | ||
24 | *((volatile unsigned long *)reg) = val; | ||
25 | } | ||
26 | |||
27 | static inline void ixp2000_reg_wrb(volatile void *reg, unsigned long val) | ||
28 | { | ||
29 | *((volatile unsigned long *)reg) = val; | ||
30 | } | ||
31 | |||
32 | struct pci_sys_data; | ||
33 | |||
34 | void ixp23xx_map_io(void); | ||
35 | void ixp23xx_init_irq(void); | ||
36 | void ixp23xx_sys_init(void); | ||
37 | void ixp23xx_restart(char, const char *); | ||
38 | int ixp23xx_pci_setup(int, struct pci_sys_data *); | ||
39 | void ixp23xx_pci_preinit(void); | ||
40 | struct pci_bus *ixp23xx_pci_scan_bus(int, struct pci_sys_data*); | ||
41 | void ixp23xx_pci_slave_init(void); | ||
42 | |||
43 | extern struct sys_timer ixp23xx_timer; | ||
44 | |||
45 | #define IXP23XX_UART_XTAL 14745600 | ||
46 | |||
47 | #ifndef __ASSEMBLY__ | ||
48 | /* | ||
49 | * Is system memory on the XSI or CPP bus? | ||
50 | */ | ||
51 | static inline unsigned ixp23xx_cpp_boot(void) | ||
52 | { | ||
53 | return (*IXP23XX_EXP_CFG0 & IXP23XX_EXP_CFG0_XSI_NOT_PRES); | ||
54 | } | ||
55 | #endif | ||
56 | |||
57 | |||
58 | #endif | ||
diff --git a/arch/arm/mach-ixp23xx/include/mach/time.h b/arch/arm/mach-ixp23xx/include/mach/time.h deleted file mode 100644 index b61dafc884a..00000000000 --- a/arch/arm/mach-ixp23xx/include/mach/time.h +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/include/mach/time.h | ||
3 | */ | ||
diff --git a/arch/arm/mach-ixp23xx/include/mach/timex.h b/arch/arm/mach-ixp23xx/include/mach/timex.h deleted file mode 100644 index e341e9cf9c3..00000000000 --- a/arch/arm/mach-ixp23xx/include/mach/timex.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/include/mach/timex.h | ||
3 | * | ||
4 | * XScale architecture timex specifications | ||
5 | */ | ||
6 | |||
7 | #define CLOCK_TICK_RATE 75000000 | ||
diff --git a/arch/arm/mach-ixp23xx/include/mach/uncompress.h b/arch/arm/mach-ixp23xx/include/mach/uncompress.h deleted file mode 100644 index 8b4c358d2c0..00000000000 --- a/arch/arm/mach-ixp23xx/include/mach/uncompress.h +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/include/mach/uncompress.h | ||
3 | * | ||
4 | * Copyright (C) 2002-2004 Intel Corporation. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_ARCH_UNCOMPRESS_H | ||
12 | #define __ASM_ARCH_UNCOMPRESS_H | ||
13 | |||
14 | #include <mach/ixp23xx.h> | ||
15 | #include <linux/serial_reg.h> | ||
16 | |||
17 | #define UART_BASE ((volatile u32 *)IXP23XX_UART1_PHYS) | ||
18 | |||
19 | static inline void putc(char c) | ||
20 | { | ||
21 | int j; | ||
22 | |||
23 | for (j = 0; j < 0x1000; j++) { | ||
24 | if (UART_BASE[UART_LSR] & UART_LSR_THRE) | ||
25 | break; | ||
26 | barrier(); | ||
27 | } | ||
28 | |||
29 | UART_BASE[UART_TX] = c; | ||
30 | } | ||
31 | |||
32 | static inline void flush(void) | ||
33 | { | ||
34 | } | ||
35 | |||
36 | #define arch_decomp_setup() | ||
37 | #define arch_decomp_wdog() | ||
38 | |||
39 | |||
40 | #endif | ||
diff --git a/arch/arm/mach-ixp23xx/ixdp2351.c b/arch/arm/mach-ixp23xx/ixdp2351.c deleted file mode 100644 index b0e07db5cea..00000000000 --- a/arch/arm/mach-ixp23xx/ixdp2351.c +++ /dev/null | |||
@@ -1,347 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/ixdp2351.c | ||
3 | * | ||
4 | * IXDP2351 board-specific routines | ||
5 | * | ||
6 | * Author: Deepak Saxena <dsaxena@plexity.net> | ||
7 | * | ||
8 | * Copyright 2005 (c) MontaVista Software, Inc. | ||
9 | * | ||
10 | * Based on 2.4 code Copyright 2004 (c) Intel Corporation | ||
11 | * | ||
12 | * This file is licensed under the terms of the GNU General Public | ||
13 | * License version 2. This program is licensed "as is" without any | ||
14 | * warranty of any kind, whether express or implied. | ||
15 | */ | ||
16 | |||
17 | #include <linux/kernel.h> | ||
18 | #include <linux/init.h> | ||
19 | #include <linux/spinlock.h> | ||
20 | #include <linux/sched.h> | ||
21 | #include <linux/interrupt.h> | ||
22 | #include <linux/irq.h> | ||
23 | #include <linux/serial.h> | ||
24 | #include <linux/tty.h> | ||
25 | #include <linux/bitops.h> | ||
26 | #include <linux/ioport.h> | ||
27 | #include <linux/serial_8250.h> | ||
28 | #include <linux/serial_core.h> | ||
29 | #include <linux/device.h> | ||
30 | #include <linux/mm.h> | ||
31 | #include <linux/pci.h> | ||
32 | #include <linux/mtd/physmap.h> | ||
33 | |||
34 | #include <asm/types.h> | ||
35 | #include <asm/setup.h> | ||
36 | #include <asm/memory.h> | ||
37 | #include <mach/hardware.h> | ||
38 | #include <asm/mach-types.h> | ||
39 | #include <asm/tlbflush.h> | ||
40 | #include <asm/pgtable.h> | ||
41 | |||
42 | #include <asm/mach/map.h> | ||
43 | #include <asm/mach/irq.h> | ||
44 | #include <asm/mach/arch.h> | ||
45 | #include <asm/mach/pci.h> | ||
46 | |||
47 | /* | ||
48 | * IXDP2351 Interrupt Handling | ||
49 | */ | ||
50 | static void ixdp2351_inta_mask(struct irq_data *d) | ||
51 | { | ||
52 | *IXDP2351_CPLD_INTA_MASK_SET_REG = IXDP2351_INTA_IRQ_MASK(d->irq); | ||
53 | } | ||
54 | |||
55 | static void ixdp2351_inta_unmask(struct irq_data *d) | ||
56 | { | ||
57 | *IXDP2351_CPLD_INTA_MASK_CLR_REG = IXDP2351_INTA_IRQ_MASK(d->irq); | ||
58 | } | ||
59 | |||
60 | static void ixdp2351_inta_handler(unsigned int irq, struct irq_desc *desc) | ||
61 | { | ||
62 | u16 ex_interrupt = | ||
63 | *IXDP2351_CPLD_INTA_STAT_REG & IXDP2351_INTA_IRQ_VALID; | ||
64 | int i; | ||
65 | |||
66 | desc->irq_data.chip->irq_mask(&desc->irq_data); | ||
67 | |||
68 | for (i = 0; i < IXDP2351_INTA_IRQ_NUM; i++) { | ||
69 | if (ex_interrupt & (1 << i)) { | ||
70 | int cpld_irq = | ||
71 | IXP23XX_MACH_IRQ(IXDP2351_INTA_IRQ_BASE + i); | ||
72 | generic_handle_irq(cpld_irq); | ||
73 | } | ||
74 | } | ||
75 | |||
76 | desc->irq_data.chip->irq_unmask(&desc->irq_data); | ||
77 | } | ||
78 | |||
79 | static struct irq_chip ixdp2351_inta_chip = { | ||
80 | .irq_ack = ixdp2351_inta_mask, | ||
81 | .irq_mask = ixdp2351_inta_mask, | ||
82 | .irq_unmask = ixdp2351_inta_unmask | ||
83 | }; | ||
84 | |||
85 | static void ixdp2351_intb_mask(struct irq_data *d) | ||
86 | { | ||
87 | *IXDP2351_CPLD_INTB_MASK_SET_REG = IXDP2351_INTB_IRQ_MASK(d->irq); | ||
88 | } | ||
89 | |||
90 | static void ixdp2351_intb_unmask(struct irq_data *d) | ||
91 | { | ||
92 | *IXDP2351_CPLD_INTB_MASK_CLR_REG = IXDP2351_INTB_IRQ_MASK(d->irq); | ||
93 | } | ||
94 | |||
95 | static void ixdp2351_intb_handler(unsigned int irq, struct irq_desc *desc) | ||
96 | { | ||
97 | u16 ex_interrupt = | ||
98 | *IXDP2351_CPLD_INTB_STAT_REG & IXDP2351_INTB_IRQ_VALID; | ||
99 | int i; | ||
100 | |||
101 | desc->irq_data.chip->irq_ack(&desc->irq_data); | ||
102 | |||
103 | for (i = 0; i < IXDP2351_INTB_IRQ_NUM; i++) { | ||
104 | if (ex_interrupt & (1 << i)) { | ||
105 | int cpld_irq = | ||
106 | IXP23XX_MACH_IRQ(IXDP2351_INTB_IRQ_BASE + i); | ||
107 | generic_handle_irq(cpld_irq); | ||
108 | } | ||
109 | } | ||
110 | |||
111 | desc->irq_data.chip->irq_unmask(&desc->irq_data); | ||
112 | } | ||
113 | |||
114 | static struct irq_chip ixdp2351_intb_chip = { | ||
115 | .irq_ack = ixdp2351_intb_mask, | ||
116 | .irq_mask = ixdp2351_intb_mask, | ||
117 | .irq_unmask = ixdp2351_intb_unmask | ||
118 | }; | ||
119 | |||
120 | void __init ixdp2351_init_irq(void) | ||
121 | { | ||
122 | int irq; | ||
123 | |||
124 | /* Mask all interrupts from CPLD, disable simulation */ | ||
125 | *IXDP2351_CPLD_INTA_MASK_SET_REG = (u16) -1; | ||
126 | *IXDP2351_CPLD_INTB_MASK_SET_REG = (u16) -1; | ||
127 | *IXDP2351_CPLD_INTA_SIM_REG = 0; | ||
128 | *IXDP2351_CPLD_INTB_SIM_REG = 0; | ||
129 | |||
130 | ixp23xx_init_irq(); | ||
131 | |||
132 | for (irq = IXP23XX_MACH_IRQ(IXDP2351_INTA_IRQ_BASE); | ||
133 | irq < | ||
134 | IXP23XX_MACH_IRQ(IXDP2351_INTA_IRQ_BASE + IXDP2351_INTA_IRQ_NUM); | ||
135 | irq++) { | ||
136 | if (IXDP2351_INTA_IRQ_MASK(irq) & IXDP2351_INTA_IRQ_VALID) { | ||
137 | set_irq_flags(irq, IRQF_VALID); | ||
138 | irq_set_chip_and_handler(irq, &ixdp2351_inta_chip, | ||
139 | handle_level_irq); | ||
140 | } | ||
141 | } | ||
142 | |||
143 | for (irq = IXP23XX_MACH_IRQ(IXDP2351_INTB_IRQ_BASE); | ||
144 | irq < | ||
145 | IXP23XX_MACH_IRQ(IXDP2351_INTB_IRQ_BASE + IXDP2351_INTB_IRQ_NUM); | ||
146 | irq++) { | ||
147 | if (IXDP2351_INTB_IRQ_MASK(irq) & IXDP2351_INTB_IRQ_VALID) { | ||
148 | set_irq_flags(irq, IRQF_VALID); | ||
149 | irq_set_chip_and_handler(irq, &ixdp2351_intb_chip, | ||
150 | handle_level_irq); | ||
151 | } | ||
152 | } | ||
153 | |||
154 | irq_set_chained_handler(IRQ_IXP23XX_INTA, ixdp2351_inta_handler); | ||
155 | irq_set_chained_handler(IRQ_IXP23XX_INTB, ixdp2351_intb_handler); | ||
156 | } | ||
157 | |||
158 | /* | ||
159 | * IXDP2351 PCI | ||
160 | */ | ||
161 | |||
162 | /* | ||
163 | * This board does not do normal PCI IRQ routing, or any | ||
164 | * sort of swizzling, so we just need to check where on the | ||
165 | * bus the device is and figure out what CPLD pin it is | ||
166 | * being routed to. | ||
167 | */ | ||
168 | #define DEVPIN(dev, pin) ((pin) | ((dev) << 3)) | ||
169 | |||
170 | static int __init ixdp2351_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | ||
171 | { | ||
172 | u8 bus = dev->bus->number; | ||
173 | u32 devpin = DEVPIN(PCI_SLOT(dev->devfn), pin); | ||
174 | struct pci_bus *tmp_bus = dev->bus; | ||
175 | |||
176 | /* Primary bus, no interrupts here */ | ||
177 | if (!bus) | ||
178 | return -1; | ||
179 | |||
180 | /* Lookup first leaf in bus tree */ | ||
181 | while ((tmp_bus->parent != NULL) && (tmp_bus->parent->parent != NULL)) | ||
182 | tmp_bus = tmp_bus->parent; | ||
183 | |||
184 | /* Select between known bridges */ | ||
185 | switch (tmp_bus->self->devfn | (tmp_bus->self->bus->number << 8)) { | ||
186 | /* Device is located after first bridge */ | ||
187 | case 0x0008: | ||
188 | if (tmp_bus == dev->bus) { | ||
189 | /* Device is located directy after first bridge */ | ||
190 | switch (devpin) { | ||
191 | /* Onboard 82546 */ | ||
192 | case DEVPIN(1, 1): /* Onboard 82546 ch 0 */ | ||
193 | return IRQ_IXDP2351_INTA_82546; | ||
194 | case DEVPIN(1, 2): /* Onboard 82546 ch 1 */ | ||
195 | return IRQ_IXDP2351_INTB_82546; | ||
196 | /* PMC SLOT */ | ||
197 | case DEVPIN(0, 1): /* PMCP INTA# */ | ||
198 | case DEVPIN(2, 4): /* PMCS INTD# */ | ||
199 | return IRQ_IXDP2351_SPCI_PMC_INTA; | ||
200 | case DEVPIN(0, 2): /* PMCP INTB# */ | ||
201 | case DEVPIN(2, 1): /* PMCS INTA# */ | ||
202 | return IRQ_IXDP2351_SPCI_PMC_INTB; | ||
203 | case DEVPIN(0, 3): /* PMCP INTC# */ | ||
204 | case DEVPIN(2, 2): /* PMCS INTB# */ | ||
205 | return IRQ_IXDP2351_SPCI_PMC_INTC; | ||
206 | case DEVPIN(0, 4): /* PMCP INTD# */ | ||
207 | case DEVPIN(2, 3): /* PMCS INTC# */ | ||
208 | return IRQ_IXDP2351_SPCI_PMC_INTD; | ||
209 | } | ||
210 | } else { | ||
211 | /* Device is located indirectly after first bridge */ | ||
212 | /* Not supported now */ | ||
213 | return -1; | ||
214 | } | ||
215 | break; | ||
216 | case 0x0010: | ||
217 | if (tmp_bus == dev->bus) { | ||
218 | /* Device is located directy after second bridge */ | ||
219 | /* Secondary bus of second bridge */ | ||
220 | switch (devpin) { | ||
221 | case DEVPIN(0, 1): /* DB#0 */ | ||
222 | case DEVPIN(0, 2): | ||
223 | case DEVPIN(0, 3): | ||
224 | case DEVPIN(0, 4): | ||
225 | return IRQ_IXDP2351_SPCI_DB_0; | ||
226 | case DEVPIN(1, 1): /* DB#1 */ | ||
227 | case DEVPIN(1, 2): | ||
228 | case DEVPIN(1, 3): | ||
229 | case DEVPIN(1, 4): | ||
230 | return IRQ_IXDP2351_SPCI_DB_1; | ||
231 | case DEVPIN(2, 1): /* FIC1 */ | ||
232 | case DEVPIN(2, 2): | ||
233 | case DEVPIN(2, 3): | ||
234 | case DEVPIN(2, 4): | ||
235 | case DEVPIN(3, 1): /* FIC2 */ | ||
236 | case DEVPIN(3, 2): | ||
237 | case DEVPIN(3, 3): | ||
238 | case DEVPIN(3, 4): | ||
239 | return IRQ_IXDP2351_SPCI_FIC; | ||
240 | } | ||
241 | } else { | ||
242 | /* Device is located indirectly after second bridge */ | ||
243 | /* Not supported now */ | ||
244 | return -1; | ||
245 | } | ||
246 | break; | ||
247 | } | ||
248 | |||
249 | return -1; | ||
250 | } | ||
251 | |||
252 | struct hw_pci ixdp2351_pci __initdata = { | ||
253 | .nr_controllers = 1, | ||
254 | .preinit = ixp23xx_pci_preinit, | ||
255 | .setup = ixp23xx_pci_setup, | ||
256 | .scan = ixp23xx_pci_scan_bus, | ||
257 | .map_irq = ixdp2351_map_irq, | ||
258 | }; | ||
259 | |||
260 | int __init ixdp2351_pci_init(void) | ||
261 | { | ||
262 | if (machine_is_ixdp2351()) | ||
263 | pci_common_init(&ixdp2351_pci); | ||
264 | |||
265 | return 0; | ||
266 | } | ||
267 | |||
268 | subsys_initcall(ixdp2351_pci_init); | ||
269 | |||
270 | /* | ||
271 | * IXDP2351 Static Mapped I/O | ||
272 | */ | ||
273 | static struct map_desc ixdp2351_io_desc[] __initdata = { | ||
274 | { | ||
275 | .virtual = IXDP2351_NP_VIRT_BASE, | ||
276 | .pfn = __phys_to_pfn((u64)IXDP2351_NP_PHYS_BASE), | ||
277 | .length = IXDP2351_NP_PHYS_SIZE, | ||
278 | .type = MT_DEVICE | ||
279 | }, { | ||
280 | .virtual = IXDP2351_BB_BASE_VIRT, | ||
281 | .pfn = __phys_to_pfn((u64)IXDP2351_BB_BASE_PHYS), | ||
282 | .length = IXDP2351_BB_SIZE, | ||
283 | .type = MT_DEVICE | ||
284 | } | ||
285 | }; | ||
286 | |||
287 | static void __init ixdp2351_map_io(void) | ||
288 | { | ||
289 | ixp23xx_map_io(); | ||
290 | iotable_init(ixdp2351_io_desc, ARRAY_SIZE(ixdp2351_io_desc)); | ||
291 | } | ||
292 | |||
293 | static struct physmap_flash_data ixdp2351_flash_data = { | ||
294 | .width = 1, | ||
295 | }; | ||
296 | |||
297 | static struct resource ixdp2351_flash_resource = { | ||
298 | .start = 0x90000000, | ||
299 | .end = 0x93ffffff, | ||
300 | .flags = IORESOURCE_MEM, | ||
301 | }; | ||
302 | |||
303 | static struct platform_device ixdp2351_flash = { | ||
304 | .name = "physmap-flash", | ||
305 | .id = 0, | ||
306 | .dev = { | ||
307 | .platform_data = &ixdp2351_flash_data, | ||
308 | }, | ||
309 | .num_resources = 1, | ||
310 | .resource = &ixdp2351_flash_resource, | ||
311 | }; | ||
312 | |||
313 | static void __init ixdp2351_init(void) | ||
314 | { | ||
315 | platform_device_register(&ixdp2351_flash); | ||
316 | |||
317 | /* | ||
318 | * Mark flash as writeable | ||
319 | */ | ||
320 | IXP23XX_EXP_CS0[0] |= IXP23XX_FLASH_WRITABLE; | ||
321 | IXP23XX_EXP_CS0[1] |= IXP23XX_FLASH_WRITABLE; | ||
322 | IXP23XX_EXP_CS0[2] |= IXP23XX_FLASH_WRITABLE; | ||
323 | IXP23XX_EXP_CS0[3] |= IXP23XX_FLASH_WRITABLE; | ||
324 | |||
325 | ixp23xx_sys_init(); | ||
326 | } | ||
327 | |||
328 | static void ixdp2351_restart(char mode, const char *cmd) | ||
329 | { | ||
330 | /* First try machine specific support */ | ||
331 | |||
332 | *IXDP2351_CPLD_RESET1_REG = IXDP2351_CPLD_RESET1_MAGIC; | ||
333 | (void) *IXDP2351_CPLD_RESET1_REG; | ||
334 | *IXDP2351_CPLD_RESET1_REG = IXDP2351_CPLD_RESET1_ENABLE; | ||
335 | |||
336 | ixp23xx_restart(mode, cmd); | ||
337 | } | ||
338 | |||
339 | MACHINE_START(IXDP2351, "Intel IXDP2351 Development Platform") | ||
340 | /* Maintainer: MontaVista Software, Inc. */ | ||
341 | .map_io = ixdp2351_map_io, | ||
342 | .init_irq = ixdp2351_init_irq, | ||
343 | .timer = &ixp23xx_timer, | ||
344 | .atag_offset = 0x100, | ||
345 | .init_machine = ixdp2351_init, | ||
346 | .restart = ixdp2351_restart, | ||
347 | MACHINE_END | ||
diff --git a/arch/arm/mach-ixp23xx/pci.c b/arch/arm/mach-ixp23xx/pci.c deleted file mode 100644 index 911f5a58e00..00000000000 --- a/arch/arm/mach-ixp23xx/pci.c +++ /dev/null | |||
@@ -1,294 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/pci.c | ||
3 | * | ||
4 | * PCI routines for IXP23XX based systems | ||
5 | * | ||
6 | * Copyright (c) 2005 MontaVista Software, Inc. | ||
7 | * | ||
8 | * based on original code: | ||
9 | * | ||
10 | * Author: Naeem Afzal <naeem.m.afzal@intel.com> | ||
11 | * Copyright 2002-2005 Intel Corp. | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or modify it | ||
14 | * under the terms of the GNU General Public License as published by the | ||
15 | * Free Software Foundation; either version 2 of the License, or (at your | ||
16 | * option) any later version. | ||
17 | */ | ||
18 | |||
19 | #include <linux/sched.h> | ||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/pci.h> | ||
22 | #include <linux/interrupt.h> | ||
23 | #include <linux/mm.h> | ||
24 | #include <linux/init.h> | ||
25 | #include <linux/ioport.h> | ||
26 | #include <linux/delay.h> | ||
27 | #include <linux/io.h> | ||
28 | |||
29 | #include <asm/irq.h> | ||
30 | #include <asm/sizes.h> | ||
31 | #include <asm/mach/pci.h> | ||
32 | #include <mach/hardware.h> | ||
33 | |||
34 | extern int (*external_fault) (unsigned long, struct pt_regs *); | ||
35 | |||
36 | static volatile int pci_master_aborts = 0; | ||
37 | |||
38 | #ifdef DEBUG | ||
39 | #define DBG(x...) printk(x) | ||
40 | #else | ||
41 | #define DBG(x...) | ||
42 | #endif | ||
43 | |||
44 | int clear_master_aborts(void); | ||
45 | |||
46 | static u32 | ||
47 | *ixp23xx_pci_config_addr(unsigned int bus_nr, unsigned int devfn, int where) | ||
48 | { | ||
49 | u32 *paddress; | ||
50 | |||
51 | /* | ||
52 | * Must be dword aligned | ||
53 | */ | ||
54 | where &= ~3; | ||
55 | |||
56 | /* | ||
57 | * For top bus, generate type 0, else type 1 | ||
58 | */ | ||
59 | if (!bus_nr) { | ||
60 | if (PCI_SLOT(devfn) >= 8) | ||
61 | return 0; | ||
62 | |||
63 | paddress = (u32 *) (IXP23XX_PCI_CFG0_VIRT | ||
64 | | (1 << (PCI_SLOT(devfn) + 16)) | ||
65 | | (PCI_FUNC(devfn) << 8) | where); | ||
66 | } else { | ||
67 | paddress = (u32 *) (IXP23XX_PCI_CFG1_VIRT | ||
68 | | (bus_nr << 16) | ||
69 | | (PCI_SLOT(devfn) << 11) | ||
70 | | (PCI_FUNC(devfn) << 8) | where); | ||
71 | } | ||
72 | |||
73 | return paddress; | ||
74 | } | ||
75 | |||
76 | /* | ||
77 | * Mask table, bits to mask for quantity of size 1, 2 or 4 bytes. | ||
78 | * 0 and 3 are not valid indexes... | ||
79 | */ | ||
80 | static u32 bytemask[] = { | ||
81 | /*0*/ 0, | ||
82 | /*1*/ 0xff, | ||
83 | /*2*/ 0xffff, | ||
84 | /*3*/ 0, | ||
85 | /*4*/ 0xffffffff, | ||
86 | }; | ||
87 | |||
88 | static int ixp23xx_pci_read_config(struct pci_bus *bus, unsigned int devfn, | ||
89 | int where, int size, u32 *value) | ||
90 | { | ||
91 | u32 n; | ||
92 | u32 *addr; | ||
93 | |||
94 | n = where % 4; | ||
95 | |||
96 | DBG("In config_read(%d) %d from dev %d:%d:%d\n", size, where, | ||
97 | bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); | ||
98 | |||
99 | addr = ixp23xx_pci_config_addr(bus->number, devfn, where); | ||
100 | if (!addr) | ||
101 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
102 | |||
103 | pci_master_aborts = 0; | ||
104 | *value = (*addr >> (8*n)) & bytemask[size]; | ||
105 | if (pci_master_aborts) { | ||
106 | pci_master_aborts = 0; | ||
107 | *value = 0xffffffff; | ||
108 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
109 | } | ||
110 | |||
111 | return PCIBIOS_SUCCESSFUL; | ||
112 | } | ||
113 | |||
114 | /* | ||
115 | * We don't do error checking on the address for writes. | ||
116 | * It's assumed that the user checked for the device existing first | ||
117 | * by doing a read first. | ||
118 | */ | ||
119 | static int ixp23xx_pci_write_config(struct pci_bus *bus, unsigned int devfn, | ||
120 | int where, int size, u32 value) | ||
121 | { | ||
122 | u32 mask; | ||
123 | u32 *addr; | ||
124 | u32 temp; | ||
125 | |||
126 | mask = ~(bytemask[size] << ((where % 0x4) * 8)); | ||
127 | addr = ixp23xx_pci_config_addr(bus->number, devfn, where); | ||
128 | if (!addr) | ||
129 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
130 | temp = (u32) (value) << ((where % 0x4) * 8); | ||
131 | *addr = (*addr & mask) | temp; | ||
132 | |||
133 | clear_master_aborts(); | ||
134 | |||
135 | return PCIBIOS_SUCCESSFUL; | ||
136 | } | ||
137 | |||
138 | struct pci_ops ixp23xx_pci_ops = { | ||
139 | .read = ixp23xx_pci_read_config, | ||
140 | .write = ixp23xx_pci_write_config, | ||
141 | }; | ||
142 | |||
143 | struct pci_bus *ixp23xx_pci_scan_bus(int nr, struct pci_sys_data *sysdata) | ||
144 | { | ||
145 | return pci_scan_root_bus(NULL, sysdata->busnr, &ixp23xx_pci_ops, | ||
146 | sysdata, &sysdata->resources); | ||
147 | } | ||
148 | |||
149 | int ixp23xx_pci_abort_handler(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | ||
150 | { | ||
151 | volatile unsigned long temp; | ||
152 | unsigned long flags; | ||
153 | |||
154 | pci_master_aborts = 1; | ||
155 | |||
156 | local_irq_save(flags); | ||
157 | temp = *IXP23XX_PCI_CONTROL; | ||
158 | |||
159 | /* | ||
160 | * master abort and cmd tgt err | ||
161 | */ | ||
162 | if (temp & ((1 << 8) | (1 << 5))) | ||
163 | *IXP23XX_PCI_CONTROL = temp; | ||
164 | |||
165 | temp = *IXP23XX_PCI_CMDSTAT; | ||
166 | |||
167 | if (temp & (1 << 29)) | ||
168 | *IXP23XX_PCI_CMDSTAT = temp; | ||
169 | local_irq_restore(flags); | ||
170 | |||
171 | /* | ||
172 | * If it was an imprecise abort, then we need to correct the | ||
173 | * return address to be _after_ the instruction. | ||
174 | */ | ||
175 | if (fsr & (1 << 10)) | ||
176 | regs->ARM_pc += 4; | ||
177 | |||
178 | return 0; | ||
179 | } | ||
180 | |||
181 | int clear_master_aborts(void) | ||
182 | { | ||
183 | volatile u32 temp; | ||
184 | |||
185 | temp = *IXP23XX_PCI_CONTROL; | ||
186 | |||
187 | /* | ||
188 | * master abort and cmd tgt err | ||
189 | */ | ||
190 | if (temp & ((1 << 8) | (1 << 5))) | ||
191 | *IXP23XX_PCI_CONTROL = temp; | ||
192 | |||
193 | temp = *IXP23XX_PCI_CMDSTAT; | ||
194 | |||
195 | if (temp & (1 << 29)) | ||
196 | *IXP23XX_PCI_CMDSTAT = temp; | ||
197 | |||
198 | return 0; | ||
199 | } | ||
200 | |||
201 | static void __init ixp23xx_pci_common_init(void) | ||
202 | { | ||
203 | #ifdef __ARMEB__ | ||
204 | *IXP23XX_PCI_CONTROL |= 0x20000; /* set I/O swapping */ | ||
205 | #endif | ||
206 | /* | ||
207 | * ADDR_31 needs to be clear for PCI memory access to CPP memory | ||
208 | */ | ||
209 | *IXP23XX_CPP2XSI_CURR_XFER_REG3 &= ~IXP23XX_CPP2XSI_ADDR_31; | ||
210 | *IXP23XX_CPP2XSI_CURR_XFER_REG3 |= IXP23XX_CPP2XSI_PSH_OFF; | ||
211 | |||
212 | /* | ||
213 | * Select correct memory for PCI inbound transactions | ||
214 | */ | ||
215 | if (ixp23xx_cpp_boot()) { | ||
216 | *IXP23XX_PCI_CPP_ADDR_BITS &= ~(1 << 1); | ||
217 | } else { | ||
218 | *IXP23XX_PCI_CPP_ADDR_BITS |= (1 << 1); | ||
219 | |||
220 | /* | ||
221 | * Enable coherency on A2 silicon. | ||
222 | */ | ||
223 | if (arch_is_coherent()) | ||
224 | *IXP23XX_CPP2XSI_CURR_XFER_REG3 &= ~IXP23XX_CPP2XSI_COH_OFF; | ||
225 | } | ||
226 | } | ||
227 | |||
228 | void __init ixp23xx_pci_preinit(void) | ||
229 | { | ||
230 | pcibios_min_io = 0; | ||
231 | pcibios_min_mem = 0xe0000000; | ||
232 | |||
233 | pci_set_flags(0); | ||
234 | |||
235 | ixp23xx_pci_common_init(); | ||
236 | |||
237 | hook_fault_code(16+6, ixp23xx_pci_abort_handler, SIGBUS, 0, | ||
238 | "PCI config cycle to non-existent device"); | ||
239 | |||
240 | *IXP23XX_PCI_ADDR_EXT = 0x0000e000; | ||
241 | } | ||
242 | |||
243 | /* | ||
244 | * Prevent PCI layer from seeing the inbound host-bridge resources | ||
245 | */ | ||
246 | static void __devinit pci_fixup_ixp23xx(struct pci_dev *dev) | ||
247 | { | ||
248 | int i; | ||
249 | |||
250 | dev->class &= 0xff; | ||
251 | dev->class |= PCI_CLASS_BRIDGE_HOST << 8; | ||
252 | for (i = 0; i < PCI_NUM_RESOURCES; i++) { | ||
253 | dev->resource[i].start = 0; | ||
254 | dev->resource[i].end = 0; | ||
255 | dev->resource[i].flags = 0; | ||
256 | } | ||
257 | } | ||
258 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x9002, pci_fixup_ixp23xx); | ||
259 | |||
260 | /* | ||
261 | * IXP2300 systems often have large resource requirements, so we just | ||
262 | * use our own resource space. | ||
263 | */ | ||
264 | static struct resource ixp23xx_pci_mem_space = { | ||
265 | .start = IXP23XX_PCI_MEM_START, | ||
266 | .end = IXP23XX_PCI_MEM_START + IXP23XX_PCI_MEM_SIZE - 1, | ||
267 | .flags = IORESOURCE_MEM, | ||
268 | .name = "PCI Mem Space" | ||
269 | }; | ||
270 | |||
271 | static struct resource ixp23xx_pci_io_space = { | ||
272 | .start = 0x00000100, | ||
273 | .end = 0x01ffffff, | ||
274 | .flags = IORESOURCE_IO, | ||
275 | .name = "PCI I/O Space" | ||
276 | }; | ||
277 | |||
278 | int ixp23xx_pci_setup(int nr, struct pci_sys_data *sys) | ||
279 | { | ||
280 | if (nr >= 1) | ||
281 | return 0; | ||
282 | |||
283 | pci_add_resource_offset(&sys->resources, | ||
284 | &ixp23xx_pci_io_space, sys->io_offset); | ||
285 | pci_add_resource_offset(&sys->resources, | ||
286 | &ixp23xx_pci_mem_space, sys->mem_offset); | ||
287 | |||
288 | return 1; | ||
289 | } | ||
290 | |||
291 | void __init ixp23xx_pci_slave_init(void) | ||
292 | { | ||
293 | ixp23xx_pci_common_init(); | ||
294 | } | ||
diff --git a/arch/arm/mach-ixp23xx/roadrunner.c b/arch/arm/mach-ixp23xx/roadrunner.c deleted file mode 100644 index eaaa3fa9fd0..00000000000 --- a/arch/arm/mach-ixp23xx/roadrunner.c +++ /dev/null | |||
@@ -1,180 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/roadrunner.c | ||
3 | * | ||
4 | * RoadRunner board-specific routines | ||
5 | * | ||
6 | * Author: Deepak Saxena <dsaxena@plexity.net> | ||
7 | * | ||
8 | * Copyright 2005 (c) MontaVista Software, Inc. | ||
9 | * | ||
10 | * Based on 2.4 code Copyright 2005 (c) ADI Engineering Corporation | ||
11 | * | ||
12 | * This file is licensed under the terms of the GNU General Public | ||
13 | * License version 2. This program is licensed "as is" without any | ||
14 | * warranty of any kind, whether express or implied. | ||
15 | */ | ||
16 | |||
17 | #include <linux/kernel.h> | ||
18 | #include <linux/init.h> | ||
19 | #include <linux/spinlock.h> | ||
20 | #include <linux/sched.h> | ||
21 | #include <linux/interrupt.h> | ||
22 | #include <linux/serial.h> | ||
23 | #include <linux/tty.h> | ||
24 | #include <linux/bitops.h> | ||
25 | #include <linux/ioport.h> | ||
26 | #include <linux/serial_8250.h> | ||
27 | #include <linux/serial_core.h> | ||
28 | #include <linux/device.h> | ||
29 | #include <linux/mm.h> | ||
30 | #include <linux/pci.h> | ||
31 | #include <linux/mtd/physmap.h> | ||
32 | |||
33 | #include <asm/types.h> | ||
34 | #include <asm/setup.h> | ||
35 | #include <asm/memory.h> | ||
36 | #include <mach/hardware.h> | ||
37 | #include <asm/mach-types.h> | ||
38 | #include <asm/irq.h> | ||
39 | #include <asm/tlbflush.h> | ||
40 | #include <asm/pgtable.h> | ||
41 | |||
42 | #include <asm/mach/map.h> | ||
43 | #include <asm/mach/irq.h> | ||
44 | #include <asm/mach/arch.h> | ||
45 | #include <asm/mach/pci.h> | ||
46 | |||
47 | /* | ||
48 | * Interrupt mapping | ||
49 | */ | ||
50 | #define INTA IRQ_ROADRUNNER_PCI_INTA | ||
51 | #define INTB IRQ_ROADRUNNER_PCI_INTB | ||
52 | #define INTC IRQ_ROADRUNNER_PCI_INTC | ||
53 | #define INTD IRQ_ROADRUNNER_PCI_INTD | ||
54 | |||
55 | #define INTC_PIN IXP23XX_GPIO_PIN_11 | ||
56 | #define INTD_PIN IXP23XX_GPIO_PIN_12 | ||
57 | |||
58 | static int __init roadrunner_map_irq(const struct pci_dev *dev, u8 idsel, | ||
59 | u8 pin) | ||
60 | { | ||
61 | static int pci_card_slot_irq[] = {INTB, INTC, INTD, INTA}; | ||
62 | static int pmc_card_slot_irq[] = {INTA, INTB, INTC, INTD}; | ||
63 | static int usb_irq[] = {INTB, INTC, INTD, -1}; | ||
64 | static int mini_pci_1_irq[] = {INTB, INTC, -1, -1}; | ||
65 | static int mini_pci_2_irq[] = {INTC, INTD, -1, -1}; | ||
66 | |||
67 | switch(dev->bus->number) { | ||
68 | case 0: | ||
69 | switch(dev->devfn) { | ||
70 | case 0x0: // PCI-PCI bridge | ||
71 | break; | ||
72 | case 0x8: // PCI Card Slot | ||
73 | return pci_card_slot_irq[pin - 1]; | ||
74 | case 0x10: // PMC Slot | ||
75 | return pmc_card_slot_irq[pin - 1]; | ||
76 | case 0x18: // PMC Slot Secondary Agent | ||
77 | break; | ||
78 | case 0x20: // IXP Processor | ||
79 | break; | ||
80 | default: | ||
81 | return NO_IRQ; | ||
82 | } | ||
83 | break; | ||
84 | |||
85 | case 1: | ||
86 | switch(dev->devfn) { | ||
87 | case 0x0: // IDE Controller | ||
88 | return (pin == 1) ? INTC : -1; | ||
89 | case 0x8: // USB fun 0 | ||
90 | case 0x9: // USB fun 1 | ||
91 | case 0xa: // USB fun 2 | ||
92 | return usb_irq[pin - 1]; | ||
93 | case 0x10: // Mini PCI 1 | ||
94 | return mini_pci_1_irq[pin-1]; | ||
95 | case 0x18: // Mini PCI 2 | ||
96 | return mini_pci_2_irq[pin-1]; | ||
97 | case 0x20: // MEM slot | ||
98 | return (pin == 1) ? INTA : -1; | ||
99 | default: | ||
100 | return NO_IRQ; | ||
101 | } | ||
102 | break; | ||
103 | |||
104 | default: | ||
105 | return NO_IRQ; | ||
106 | } | ||
107 | |||
108 | return NO_IRQ; | ||
109 | } | ||
110 | |||
111 | static void __init roadrunner_pci_preinit(void) | ||
112 | { | ||
113 | irq_set_irq_type(IRQ_ROADRUNNER_PCI_INTC, IRQ_TYPE_LEVEL_LOW); | ||
114 | irq_set_irq_type(IRQ_ROADRUNNER_PCI_INTD, IRQ_TYPE_LEVEL_LOW); | ||
115 | |||
116 | ixp23xx_pci_preinit(); | ||
117 | } | ||
118 | |||
119 | static struct hw_pci roadrunner_pci __initdata = { | ||
120 | .nr_controllers = 1, | ||
121 | .preinit = roadrunner_pci_preinit, | ||
122 | .setup = ixp23xx_pci_setup, | ||
123 | .scan = ixp23xx_pci_scan_bus, | ||
124 | .map_irq = roadrunner_map_irq, | ||
125 | }; | ||
126 | |||
127 | static int __init roadrunner_pci_init(void) | ||
128 | { | ||
129 | if (machine_is_roadrunner()) | ||
130 | pci_common_init(&roadrunner_pci); | ||
131 | |||
132 | return 0; | ||
133 | }; | ||
134 | |||
135 | subsys_initcall(roadrunner_pci_init); | ||
136 | |||
137 | static struct physmap_flash_data roadrunner_flash_data = { | ||
138 | .width = 2, | ||
139 | }; | ||
140 | |||
141 | static struct resource roadrunner_flash_resource = { | ||
142 | .start = 0x90000000, | ||
143 | .end = 0x93ffffff, | ||
144 | .flags = IORESOURCE_MEM, | ||
145 | }; | ||
146 | |||
147 | static struct platform_device roadrunner_flash = { | ||
148 | .name = "physmap-flash", | ||
149 | .id = 0, | ||
150 | .dev = { | ||
151 | .platform_data = &roadrunner_flash_data, | ||
152 | }, | ||
153 | .num_resources = 1, | ||
154 | .resource = &roadrunner_flash_resource, | ||
155 | }; | ||
156 | |||
157 | static void __init roadrunner_init(void) | ||
158 | { | ||
159 | platform_device_register(&roadrunner_flash); | ||
160 | |||
161 | /* | ||
162 | * Mark flash as writeable | ||
163 | */ | ||
164 | IXP23XX_EXP_CS0[0] |= IXP23XX_FLASH_WRITABLE; | ||
165 | IXP23XX_EXP_CS0[1] |= IXP23XX_FLASH_WRITABLE; | ||
166 | IXP23XX_EXP_CS0[2] |= IXP23XX_FLASH_WRITABLE; | ||
167 | IXP23XX_EXP_CS0[3] |= IXP23XX_FLASH_WRITABLE; | ||
168 | |||
169 | ixp23xx_sys_init(); | ||
170 | } | ||
171 | |||
172 | MACHINE_START(ROADRUNNER, "ADI Engineering RoadRunner Development Platform") | ||
173 | /* Maintainer: Deepak Saxena */ | ||
174 | .map_io = ixp23xx_map_io, | ||
175 | .init_irq = ixp23xx_init_irq, | ||
176 | .timer = &ixp23xx_timer, | ||
177 | .atag_offset = 0x100, | ||
178 | .init_machine = roadrunner_init, | ||
179 | .restart = ixp23xx_restart, | ||
180 | MACHINE_END | ||
diff --git a/arch/arm/mach-ixp4xx/avila-pci.c b/arch/arm/mach-ixp4xx/avila-pci.c index 8fea0a3c524..548c7d43ade 100644 --- a/arch/arm/mach-ixp4xx/avila-pci.c +++ b/arch/arm/mach-ixp4xx/avila-pci.c | |||
@@ -65,10 +65,9 @@ static int __init avila_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
65 | 65 | ||
66 | struct hw_pci avila_pci __initdata = { | 66 | struct hw_pci avila_pci __initdata = { |
67 | .nr_controllers = 1, | 67 | .nr_controllers = 1, |
68 | .ops = &ixp4xx_ops, | ||
68 | .preinit = avila_pci_preinit, | 69 | .preinit = avila_pci_preinit, |
69 | .swizzle = pci_std_swizzle, | ||
70 | .setup = ixp4xx_setup, | 70 | .setup = ixp4xx_setup, |
71 | .scan = ixp4xx_scan_bus, | ||
72 | .map_irq = avila_map_irq, | 71 | .map_irq = avila_map_irq, |
73 | }; | 72 | }; |
74 | 73 | ||
diff --git a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c index d5719eb4259..1694f01ce2b 100644 --- a/arch/arm/mach-ixp4xx/common-pci.c +++ b/arch/arm/mach-ixp4xx/common-pci.c | |||
@@ -480,12 +480,6 @@ int ixp4xx_setup(int nr, struct pci_sys_data *sys) | |||
480 | return 1; | 480 | return 1; |
481 | } | 481 | } |
482 | 482 | ||
483 | struct pci_bus * __devinit ixp4xx_scan_bus(int nr, struct pci_sys_data *sys) | ||
484 | { | ||
485 | return pci_scan_root_bus(NULL, sys->busnr, &ixp4xx_ops, sys, | ||
486 | &sys->resources); | ||
487 | } | ||
488 | |||
489 | int dma_set_coherent_mask(struct device *dev, u64 mask) | 483 | int dma_set_coherent_mask(struct device *dev, u64 mask) |
490 | { | 484 | { |
491 | if (mask >= SZ_64M - 1) | 485 | if (mask >= SZ_64M - 1) |
diff --git a/arch/arm/mach-ixp4xx/coyote-pci.c b/arch/arm/mach-ixp4xx/coyote-pci.c index 71f5c9c60fc..5d14ce2aee6 100644 --- a/arch/arm/mach-ixp4xx/coyote-pci.c +++ b/arch/arm/mach-ixp4xx/coyote-pci.c | |||
@@ -48,10 +48,9 @@ static int __init coyote_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
48 | 48 | ||
49 | struct hw_pci coyote_pci __initdata = { | 49 | struct hw_pci coyote_pci __initdata = { |
50 | .nr_controllers = 1, | 50 | .nr_controllers = 1, |
51 | .ops = &ixp4xx_ops, | ||
51 | .preinit = coyote_pci_preinit, | 52 | .preinit = coyote_pci_preinit, |
52 | .swizzle = pci_std_swizzle, | ||
53 | .setup = ixp4xx_setup, | 53 | .setup = ixp4xx_setup, |
54 | .scan = ixp4xx_scan_bus, | ||
55 | .map_irq = coyote_map_irq, | 54 | .map_irq = coyote_map_irq, |
56 | }; | 55 | }; |
57 | 56 | ||
diff --git a/arch/arm/mach-ixp4xx/dsmg600-pci.c b/arch/arm/mach-ixp4xx/dsmg600-pci.c index 0532510b5e8..8dca7693772 100644 --- a/arch/arm/mach-ixp4xx/dsmg600-pci.c +++ b/arch/arm/mach-ixp4xx/dsmg600-pci.c | |||
@@ -62,10 +62,9 @@ static int __init dsmg600_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
62 | 62 | ||
63 | struct hw_pci __initdata dsmg600_pci = { | 63 | struct hw_pci __initdata dsmg600_pci = { |
64 | .nr_controllers = 1, | 64 | .nr_controllers = 1, |
65 | .ops = &ixp4xx_ops, | ||
65 | .preinit = dsmg600_pci_preinit, | 66 | .preinit = dsmg600_pci_preinit, |
66 | .swizzle = pci_std_swizzle, | ||
67 | .setup = ixp4xx_setup, | 67 | .setup = ixp4xx_setup, |
68 | .scan = ixp4xx_scan_bus, | ||
69 | .map_irq = dsmg600_map_irq, | 68 | .map_irq = dsmg600_map_irq, |
70 | }; | 69 | }; |
71 | 70 | ||
diff --git a/arch/arm/mach-ixp4xx/fsg-pci.c b/arch/arm/mach-ixp4xx/fsg-pci.c index d2ac803328f..fd4a8625b4a 100644 --- a/arch/arm/mach-ixp4xx/fsg-pci.c +++ b/arch/arm/mach-ixp4xx/fsg-pci.c | |||
@@ -59,10 +59,9 @@ static int __init fsg_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
59 | 59 | ||
60 | struct hw_pci fsg_pci __initdata = { | 60 | struct hw_pci fsg_pci __initdata = { |
61 | .nr_controllers = 1, | 61 | .nr_controllers = 1, |
62 | .ops = &ixp4xx_ops, | ||
62 | .preinit = fsg_pci_preinit, | 63 | .preinit = fsg_pci_preinit, |
63 | .swizzle = pci_std_swizzle, | ||
64 | .setup = ixp4xx_setup, | 64 | .setup = ixp4xx_setup, |
65 | .scan = ixp4xx_scan_bus, | ||
66 | .map_irq = fsg_map_irq, | 65 | .map_irq = fsg_map_irq, |
67 | }; | 66 | }; |
68 | 67 | ||
diff --git a/arch/arm/mach-ixp4xx/gateway7001-pci.c b/arch/arm/mach-ixp4xx/gateway7001-pci.c index 76581fb467c..d9d6cc08970 100644 --- a/arch/arm/mach-ixp4xx/gateway7001-pci.c +++ b/arch/arm/mach-ixp4xx/gateway7001-pci.c | |||
@@ -47,10 +47,9 @@ static int __init gateway7001_map_irq(const struct pci_dev *dev, u8 slot, | |||
47 | 47 | ||
48 | struct hw_pci gateway7001_pci __initdata = { | 48 | struct hw_pci gateway7001_pci __initdata = { |
49 | .nr_controllers = 1, | 49 | .nr_controllers = 1, |
50 | .ops = &ixp4xx_ops, | ||
50 | .preinit = gateway7001_pci_preinit, | 51 | .preinit = gateway7001_pci_preinit, |
51 | .swizzle = pci_std_swizzle, | ||
52 | .setup = ixp4xx_setup, | 52 | .setup = ixp4xx_setup, |
53 | .scan = ixp4xx_scan_bus, | ||
54 | .map_irq = gateway7001_map_irq, | 53 | .map_irq = gateway7001_map_irq, |
55 | }; | 54 | }; |
56 | 55 | ||
diff --git a/arch/arm/mach-ixp4xx/goramo_mlr.c b/arch/arm/mach-ixp4xx/goramo_mlr.c index 46bb924962e..b800a031207 100644 --- a/arch/arm/mach-ixp4xx/goramo_mlr.c +++ b/arch/arm/mach-ixp4xx/goramo_mlr.c | |||
@@ -473,11 +473,10 @@ static int __init gmlr_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
473 | 473 | ||
474 | static struct hw_pci gmlr_hw_pci __initdata = { | 474 | static struct hw_pci gmlr_hw_pci __initdata = { |
475 | .nr_controllers = 1, | 475 | .nr_controllers = 1, |
476 | .ops = &ixp4xx_ops, | ||
476 | .preinit = gmlr_pci_preinit, | 477 | .preinit = gmlr_pci_preinit, |
477 | .postinit = gmlr_pci_postinit, | 478 | .postinit = gmlr_pci_postinit, |
478 | .swizzle = pci_std_swizzle, | ||
479 | .setup = ixp4xx_setup, | 479 | .setup = ixp4xx_setup, |
480 | .scan = ixp4xx_scan_bus, | ||
481 | .map_irq = gmlr_map_irq, | 480 | .map_irq = gmlr_map_irq, |
482 | }; | 481 | }; |
483 | 482 | ||
diff --git a/arch/arm/mach-ixp4xx/gtwx5715-pci.c b/arch/arm/mach-ixp4xx/gtwx5715-pci.c index d68fc068c38..551d114c9e1 100644 --- a/arch/arm/mach-ixp4xx/gtwx5715-pci.c +++ b/arch/arm/mach-ixp4xx/gtwx5715-pci.c | |||
@@ -67,10 +67,9 @@ static int __init gtwx5715_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
67 | 67 | ||
68 | struct hw_pci gtwx5715_pci __initdata = { | 68 | struct hw_pci gtwx5715_pci __initdata = { |
69 | .nr_controllers = 1, | 69 | .nr_controllers = 1, |
70 | .ops = &ixp4xx_ops, | ||
70 | .preinit = gtwx5715_pci_preinit, | 71 | .preinit = gtwx5715_pci_preinit, |
71 | .swizzle = pci_std_swizzle, | ||
72 | .setup = ixp4xx_setup, | 72 | .setup = ixp4xx_setup, |
73 | .scan = ixp4xx_scan_bus, | ||
74 | .map_irq = gtwx5715_map_irq, | 73 | .map_irq = gtwx5715_map_irq, |
75 | }; | 74 | }; |
76 | 75 | ||
diff --git a/arch/arm/mach-ixp4xx/include/mach/ixp46x_ts.h b/arch/arm/mach-ixp4xx/include/mach/ixp46x_ts.h index 292d55ed211..cf03614d250 100644 --- a/arch/arm/mach-ixp4xx/include/mach/ixp46x_ts.h +++ b/arch/arm/mach-ixp4xx/include/mach/ixp46x_ts.h | |||
@@ -75,4 +75,7 @@ struct ixp46x_ts_regs { | |||
75 | #define TX_SNAPSHOT_LOCKED (1<<0) | 75 | #define TX_SNAPSHOT_LOCKED (1<<0) |
76 | #define RX_SNAPSHOT_LOCKED (1<<1) | 76 | #define RX_SNAPSHOT_LOCKED (1<<1) |
77 | 77 | ||
78 | /* The ptp_ixp46x module will set this variable */ | ||
79 | extern int ixp46x_phc_index; | ||
80 | |||
78 | #endif | 81 | #endif |
diff --git a/arch/arm/mach-ixp4xx/include/mach/platform.h b/arch/arm/mach-ixp4xx/include/mach/platform.h index b66bedc64de..5bce94aacca 100644 --- a/arch/arm/mach-ixp4xx/include/mach/platform.h +++ b/arch/arm/mach-ixp4xx/include/mach/platform.h | |||
@@ -130,7 +130,7 @@ extern void ixp4xx_restart(char, const char *); | |||
130 | extern void ixp4xx_pci_preinit(void); | 130 | extern void ixp4xx_pci_preinit(void); |
131 | struct pci_sys_data; | 131 | struct pci_sys_data; |
132 | extern int ixp4xx_setup(int nr, struct pci_sys_data *sys); | 132 | extern int ixp4xx_setup(int nr, struct pci_sys_data *sys); |
133 | extern struct pci_bus *ixp4xx_scan_bus(int nr, struct pci_sys_data *sys); | 133 | extern struct pci_ops ixp4xx_ops; |
134 | 134 | ||
135 | /* | 135 | /* |
136 | * GPIO-functions | 136 | * GPIO-functions |
diff --git a/arch/arm/mach-ixp4xx/ixdp425-pci.c b/arch/arm/mach-ixp4xx/ixdp425-pci.c index fffd8c5e40b..318424dd3c5 100644 --- a/arch/arm/mach-ixp4xx/ixdp425-pci.c +++ b/arch/arm/mach-ixp4xx/ixdp425-pci.c | |||
@@ -60,10 +60,9 @@ static int __init ixdp425_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
60 | 60 | ||
61 | struct hw_pci ixdp425_pci __initdata = { | 61 | struct hw_pci ixdp425_pci __initdata = { |
62 | .nr_controllers = 1, | 62 | .nr_controllers = 1, |
63 | .ops = &ixp4xx_ops, | ||
63 | .preinit = ixdp425_pci_preinit, | 64 | .preinit = ixdp425_pci_preinit, |
64 | .swizzle = pci_std_swizzle, | ||
65 | .setup = ixp4xx_setup, | 65 | .setup = ixp4xx_setup, |
66 | .scan = ixp4xx_scan_bus, | ||
67 | .map_irq = ixdp425_map_irq, | 66 | .map_irq = ixdp425_map_irq, |
68 | }; | 67 | }; |
69 | 68 | ||
diff --git a/arch/arm/mach-ixp4xx/ixdpg425-pci.c b/arch/arm/mach-ixp4xx/ixdpg425-pci.c index 34efe75015e..1f8717ba13d 100644 --- a/arch/arm/mach-ixp4xx/ixdpg425-pci.c +++ b/arch/arm/mach-ixp4xx/ixdpg425-pci.c | |||
@@ -42,10 +42,9 @@ static int __init ixdpg425_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
42 | 42 | ||
43 | struct hw_pci ixdpg425_pci __initdata = { | 43 | struct hw_pci ixdpg425_pci __initdata = { |
44 | .nr_controllers = 1, | 44 | .nr_controllers = 1, |
45 | .ops = &ixp4xx_ops, | ||
45 | .preinit = ixdpg425_pci_preinit, | 46 | .preinit = ixdpg425_pci_preinit, |
46 | .swizzle = pci_std_swizzle, | ||
47 | .setup = ixp4xx_setup, | 47 | .setup = ixp4xx_setup, |
48 | .scan = ixp4xx_scan_bus, | ||
49 | .map_irq = ixdpg425_map_irq, | 48 | .map_irq = ixdpg425_map_irq, |
50 | }; | 49 | }; |
51 | 50 | ||
diff --git a/arch/arm/mach-ixp4xx/miccpt-pci.c b/arch/arm/mach-ixp4xx/miccpt-pci.c index ca0bae7fca9..d114ccd2017 100644 --- a/arch/arm/mach-ixp4xx/miccpt-pci.c +++ b/arch/arm/mach-ixp4xx/miccpt-pci.c | |||
@@ -61,10 +61,9 @@ static int __init miccpt_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
61 | 61 | ||
62 | struct hw_pci miccpt_pci __initdata = { | 62 | struct hw_pci miccpt_pci __initdata = { |
63 | .nr_controllers = 1, | 63 | .nr_controllers = 1, |
64 | .ops = &ixp4xx_ops, | ||
64 | .preinit = miccpt_pci_preinit, | 65 | .preinit = miccpt_pci_preinit, |
65 | .swizzle = pci_std_swizzle, | ||
66 | .setup = ixp4xx_setup, | 66 | .setup = ixp4xx_setup, |
67 | .scan = ixp4xx_scan_bus, | ||
68 | .map_irq = miccpt_map_irq, | 67 | .map_irq = miccpt_map_irq, |
69 | }; | 68 | }; |
70 | 69 | ||
diff --git a/arch/arm/mach-ixp4xx/nas100d-pci.c b/arch/arm/mach-ixp4xx/nas100d-pci.c index 5434ccf553e..8f0eba0a680 100644 --- a/arch/arm/mach-ixp4xx/nas100d-pci.c +++ b/arch/arm/mach-ixp4xx/nas100d-pci.c | |||
@@ -58,10 +58,9 @@ static int __init nas100d_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
58 | 58 | ||
59 | struct hw_pci __initdata nas100d_pci = { | 59 | struct hw_pci __initdata nas100d_pci = { |
60 | .nr_controllers = 1, | 60 | .nr_controllers = 1, |
61 | .ops = &ixp4xx_ops, | ||
61 | .preinit = nas100d_pci_preinit, | 62 | .preinit = nas100d_pci_preinit, |
62 | .swizzle = pci_std_swizzle, | ||
63 | .setup = ixp4xx_setup, | 63 | .setup = ixp4xx_setup, |
64 | .scan = ixp4xx_scan_bus, | ||
65 | .map_irq = nas100d_map_irq, | 64 | .map_irq = nas100d_map_irq, |
66 | }; | 65 | }; |
67 | 66 | ||
diff --git a/arch/arm/mach-ixp4xx/nslu2-pci.c b/arch/arm/mach-ixp4xx/nslu2-pci.c index b57160535e4..032defe111a 100644 --- a/arch/arm/mach-ixp4xx/nslu2-pci.c +++ b/arch/arm/mach-ixp4xx/nslu2-pci.c | |||
@@ -54,10 +54,9 @@ static int __init nslu2_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
54 | 54 | ||
55 | struct hw_pci __initdata nslu2_pci = { | 55 | struct hw_pci __initdata nslu2_pci = { |
56 | .nr_controllers = 1, | 56 | .nr_controllers = 1, |
57 | .ops = &ixp4xx_ops, | ||
57 | .preinit = nslu2_pci_preinit, | 58 | .preinit = nslu2_pci_preinit, |
58 | .swizzle = pci_std_swizzle, | ||
59 | .setup = ixp4xx_setup, | 59 | .setup = ixp4xx_setup, |
60 | .scan = ixp4xx_scan_bus, | ||
61 | .map_irq = nslu2_map_irq, | 60 | .map_irq = nslu2_map_irq, |
62 | }; | 61 | }; |
63 | 62 | ||
diff --git a/arch/arm/mach-ixp4xx/vulcan-pci.c b/arch/arm/mach-ixp4xx/vulcan-pci.c index 0bc3f34c282..a4220fa5e0c 100644 --- a/arch/arm/mach-ixp4xx/vulcan-pci.c +++ b/arch/arm/mach-ixp4xx/vulcan-pci.c | |||
@@ -56,10 +56,9 @@ static int __init vulcan_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
56 | 56 | ||
57 | struct hw_pci vulcan_pci __initdata = { | 57 | struct hw_pci vulcan_pci __initdata = { |
58 | .nr_controllers = 1, | 58 | .nr_controllers = 1, |
59 | .ops = &ixp4xx_ops, | ||
59 | .preinit = vulcan_pci_preinit, | 60 | .preinit = vulcan_pci_preinit, |
60 | .swizzle = pci_std_swizzle, | ||
61 | .setup = ixp4xx_setup, | 61 | .setup = ixp4xx_setup, |
62 | .scan = ixp4xx_scan_bus, | ||
63 | .map_irq = vulcan_map_irq, | 62 | .map_irq = vulcan_map_irq, |
64 | }; | 63 | }; |
65 | 64 | ||
diff --git a/arch/arm/mach-ixp4xx/wg302v2-pci.c b/arch/arm/mach-ixp4xx/wg302v2-pci.c index f27dfcfe811..c92e5b82af3 100644 --- a/arch/arm/mach-ixp4xx/wg302v2-pci.c +++ b/arch/arm/mach-ixp4xx/wg302v2-pci.c | |||
@@ -46,10 +46,9 @@ static int __init wg302v2_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
46 | 46 | ||
47 | struct hw_pci wg302v2_pci __initdata = { | 47 | struct hw_pci wg302v2_pci __initdata = { |
48 | .nr_controllers = 1, | 48 | .nr_controllers = 1, |
49 | .ops = &ixp4xx_ops, | ||
49 | .preinit = wg302v2_pci_preinit, | 50 | .preinit = wg302v2_pci_preinit, |
50 | .swizzle = pci_std_swizzle, | ||
51 | .setup = ixp4xx_setup, | 51 | .setup = ixp4xx_setup, |
52 | .scan = ixp4xx_scan_bus, | ||
53 | .map_irq = wg302v2_map_irq, | 52 | .map_irq = wg302v2_map_irq, |
54 | }; | 53 | }; |
55 | 54 | ||
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c index 1c672d9e665..f7fe1b9f317 100644 --- a/arch/arm/mach-kirkwood/board-dt.c +++ b/arch/arm/mach-kirkwood/board-dt.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/of.h> | 15 | #include <linux/of.h> |
16 | #include <linux/of_platform.h> | 16 | #include <linux/of_platform.h> |
17 | #include <linux/kexec.h> | ||
17 | #include <asm/mach/arch.h> | 18 | #include <asm/mach/arch.h> |
18 | #include <asm/mach/map.h> | 19 | #include <asm/mach/map.h> |
19 | #include <mach/bridge-regs.h> | 20 | #include <mach/bridge-regs.h> |
diff --git a/arch/arm/mach-kirkwood/pcie.c b/arch/arm/mach-kirkwood/pcie.c index f56a0118c1b..de373176ee6 100644 --- a/arch/arm/mach-kirkwood/pcie.c +++ b/arch/arm/mach-kirkwood/pcie.c | |||
@@ -44,12 +44,6 @@ struct pcie_port { | |||
44 | static int pcie_port_map[2]; | 44 | static int pcie_port_map[2]; |
45 | static int num_pcie_ports; | 45 | static int num_pcie_ports; |
46 | 46 | ||
47 | static inline struct pcie_port *bus_to_port(struct pci_bus *bus) | ||
48 | { | ||
49 | struct pci_sys_data *sys = bus->sysdata; | ||
50 | return sys->private_data; | ||
51 | } | ||
52 | |||
53 | static int pcie_valid_config(struct pcie_port *pp, int bus, int dev) | 47 | static int pcie_valid_config(struct pcie_port *pp, int bus, int dev) |
54 | { | 48 | { |
55 | /* | 49 | /* |
@@ -79,7 +73,8 @@ static int pcie_valid_config(struct pcie_port *pp, int bus, int dev) | |||
79 | static int pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, | 73 | static int pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, |
80 | int size, u32 *val) | 74 | int size, u32 *val) |
81 | { | 75 | { |
82 | struct pcie_port *pp = bus_to_port(bus); | 76 | struct pci_sys_data *sys = bus->sysdata; |
77 | struct pcie_port *pp = sys->private_data; | ||
83 | unsigned long flags; | 78 | unsigned long flags; |
84 | int ret; | 79 | int ret; |
85 | 80 | ||
@@ -98,7 +93,8 @@ static int pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, | |||
98 | static int pcie_wr_conf(struct pci_bus *bus, u32 devfn, | 93 | static int pcie_wr_conf(struct pci_bus *bus, u32 devfn, |
99 | int where, int size, u32 val) | 94 | int where, int size, u32 val) |
100 | { | 95 | { |
101 | struct pcie_port *pp = bus_to_port(bus); | 96 | struct pci_sys_data *sys = bus->sysdata; |
97 | struct pcie_port *pp = sys->private_data; | ||
102 | unsigned long flags; | 98 | unsigned long flags; |
103 | int ret; | 99 | int ret; |
104 | 100 | ||
@@ -248,13 +244,13 @@ kirkwood_pcie_scan_bus(int nr, struct pci_sys_data *sys) | |||
248 | static int __init kirkwood_pcie_map_irq(const struct pci_dev *dev, u8 slot, | 244 | static int __init kirkwood_pcie_map_irq(const struct pci_dev *dev, u8 slot, |
249 | u8 pin) | 245 | u8 pin) |
250 | { | 246 | { |
251 | struct pcie_port *pp = bus_to_port(dev->bus); | 247 | struct pci_sys_data *sys = dev->sysdata; |
248 | struct pcie_port *pp = sys->private_data; | ||
252 | 249 | ||
253 | return pp->irq; | 250 | return pp->irq; |
254 | } | 251 | } |
255 | 252 | ||
256 | static struct hw_pci kirkwood_pci __initdata = { | 253 | static struct hw_pci kirkwood_pci __initdata = { |
257 | .swizzle = pci_std_swizzle, | ||
258 | .setup = kirkwood_pcie_setup, | 254 | .setup = kirkwood_pcie_setup, |
259 | .scan = kirkwood_pcie_scan_bus, | 255 | .scan = kirkwood_pcie_scan_bus, |
260 | .map_irq = kirkwood_pcie_map_irq, | 256 | .map_irq = kirkwood_pcie_map_irq, |
diff --git a/arch/arm/mach-ks8695/pci.c b/arch/arm/mach-ks8695/pci.c index acc70143581..bb18193b4ba 100644 --- a/arch/arm/mach-ks8695/pci.c +++ b/arch/arm/mach-ks8695/pci.c | |||
@@ -141,12 +141,6 @@ static struct pci_ops ks8695_pci_ops = { | |||
141 | .write = ks8695_pci_writeconfig, | 141 | .write = ks8695_pci_writeconfig, |
142 | }; | 142 | }; |
143 | 143 | ||
144 | static struct pci_bus* __init ks8695_pci_scan_bus(int nr, struct pci_sys_data *sys) | ||
145 | { | ||
146 | return pci_scan_root_bus(NULL, sys->busnr, &ks8695_pci_ops, sys, | ||
147 | &sys->resources); | ||
148 | } | ||
149 | |||
150 | static struct resource pci_mem = { | 144 | static struct resource pci_mem = { |
151 | .name = "PCI Memory space", | 145 | .name = "PCI Memory space", |
152 | .start = KS8695_PCIMEM_PA, | 146 | .start = KS8695_PCIMEM_PA, |
@@ -302,11 +296,10 @@ static void ks8695_show_pciregs(void) | |||
302 | 296 | ||
303 | static struct hw_pci ks8695_pci __initdata = { | 297 | static struct hw_pci ks8695_pci __initdata = { |
304 | .nr_controllers = 1, | 298 | .nr_controllers = 1, |
299 | .ops = &ks8695_pci_ops, | ||
305 | .preinit = ks8695_pci_preinit, | 300 | .preinit = ks8695_pci_preinit, |
306 | .setup = ks8695_pci_setup, | 301 | .setup = ks8695_pci_setup, |
307 | .scan = ks8695_pci_scan_bus, | ||
308 | .postinit = NULL, | 302 | .postinit = NULL, |
309 | .swizzle = pci_std_swizzle, | ||
310 | .map_irq = NULL, | 303 | .map_irq = NULL, |
311 | }; | 304 | }; |
312 | 305 | ||
diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c index db81ed53103..75b3cfcada6 100644 --- a/arch/arm/mach-msm/board-msm7x30.c +++ b/arch/arm/mach-msm/board-msm7x30.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/gpio.h> | 17 | #include <linux/gpio.h> |
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/irq.h> | 19 | #include <linux/irq.h> |
20 | #include <linux/gpio.h> | ||
21 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
22 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
23 | #include <linux/io.h> | 22 | #include <linux/io.h> |
diff --git a/arch/arm/mach-msm/board-qsd8x50.c b/arch/arm/mach-msm/board-qsd8x50.c index 7e8909c978c..fbaa4ed95a3 100644 --- a/arch/arm/mach-msm/board-qsd8x50.c +++ b/arch/arm/mach-msm/board-qsd8x50.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/gpio.h> | 17 | #include <linux/gpio.h> |
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/irq.h> | 19 | #include <linux/irq.h> |
20 | #include <linux/gpio.h> | ||
21 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
22 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
23 | #include <linux/usb/msm_hsusb.h> | 22 | #include <linux/usb/msm_hsusb.h> |
diff --git a/arch/arm/mach-msm/include/mach/debug-macro.S b/arch/arm/mach-msm/include/mach/debug-macro.S index 3ffd8668c9a..0e05f88abcd 100644 --- a/arch/arm/mach-msm/include/mach/debug-macro.S +++ b/arch/arm/mach-msm/include/mach/debug-macro.S | |||
@@ -30,8 +30,7 @@ | |||
30 | @ Write the 1 character to UARTDM_TF | 30 | @ Write the 1 character to UARTDM_TF |
31 | str \rd, [\rx, #0x70] | 31 | str \rd, [\rx, #0x70] |
32 | #else | 32 | #else |
33 | teq \rx, #0 | 33 | str \rd, [\rx, #0x0C] |
34 | strne \rd, [\rx, #0x0C] | ||
35 | #endif | 34 | #endif |
36 | .endm | 35 | .endm |
37 | 36 | ||
diff --git a/arch/arm/mach-msm/scm.c b/arch/arm/mach-msm/scm.c index bafabb50258..c536fd6bf82 100644 --- a/arch/arm/mach-msm/scm.c +++ b/arch/arm/mach-msm/scm.c | |||
@@ -282,6 +282,9 @@ u32 scm_get_version(void) | |||
282 | __asmeq("%1", "r1") | 282 | __asmeq("%1", "r1") |
283 | __asmeq("%2", "r0") | 283 | __asmeq("%2", "r0") |
284 | __asmeq("%3", "r1") | 284 | __asmeq("%3", "r1") |
285 | #ifdef REQUIRES_SEC | ||
286 | ".arch_extension sec\n" | ||
287 | #endif | ||
285 | "smc #0 @ switch to secure world\n" | 288 | "smc #0 @ switch to secure world\n" |
286 | : "=r" (r0), "=r" (r1) | 289 | : "=r" (r0), "=r" (r1) |
287 | : "r" (r0), "r" (r1) | 290 | : "r" (r0), "r" (r1) |
diff --git a/arch/arm/mach-mv78xx0/pcie.c b/arch/arm/mach-mv78xx0/pcie.c index df3e38055a2..2e56e86b6d6 100644 --- a/arch/arm/mach-mv78xx0/pcie.c +++ b/arch/arm/mach-mv78xx0/pcie.c | |||
@@ -147,6 +147,7 @@ static int __init mv78xx0_pcie_setup(int nr, struct pci_sys_data *sys) | |||
147 | return 0; | 147 | return 0; |
148 | 148 | ||
149 | pp = &pcie_port[nr]; | 149 | pp = &pcie_port[nr]; |
150 | sys->private_data = pp; | ||
150 | pp->root_bus_nr = sys->busnr; | 151 | pp->root_bus_nr = sys->busnr; |
151 | 152 | ||
152 | /* | 153 | /* |
@@ -161,19 +162,6 @@ static int __init mv78xx0_pcie_setup(int nr, struct pci_sys_data *sys) | |||
161 | return 1; | 162 | return 1; |
162 | } | 163 | } |
163 | 164 | ||
164 | static struct pcie_port *bus_to_port(int bus) | ||
165 | { | ||
166 | int i; | ||
167 | |||
168 | for (i = num_pcie_ports - 1; i >= 0; i--) { | ||
169 | int rbus = pcie_port[i].root_bus_nr; | ||
170 | if (rbus != -1 && rbus <= bus) | ||
171 | break; | ||
172 | } | ||
173 | |||
174 | return i >= 0 ? pcie_port + i : NULL; | ||
175 | } | ||
176 | |||
177 | static int pcie_valid_config(struct pcie_port *pp, int bus, int dev) | 165 | static int pcie_valid_config(struct pcie_port *pp, int bus, int dev) |
178 | { | 166 | { |
179 | /* | 167 | /* |
@@ -189,7 +177,8 @@ static int pcie_valid_config(struct pcie_port *pp, int bus, int dev) | |||
189 | static int pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, | 177 | static int pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, |
190 | int size, u32 *val) | 178 | int size, u32 *val) |
191 | { | 179 | { |
192 | struct pcie_port *pp = bus_to_port(bus->number); | 180 | struct pci_sys_data *sys = bus->sysdata; |
181 | struct pcie_port *pp = sys->private_data; | ||
193 | unsigned long flags; | 182 | unsigned long flags; |
194 | int ret; | 183 | int ret; |
195 | 184 | ||
@@ -208,7 +197,8 @@ static int pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, | |||
208 | static int pcie_wr_conf(struct pci_bus *bus, u32 devfn, | 197 | static int pcie_wr_conf(struct pci_bus *bus, u32 devfn, |
209 | int where, int size, u32 val) | 198 | int where, int size, u32 val) |
210 | { | 199 | { |
211 | struct pcie_port *pp = bus_to_port(bus->number); | 200 | struct pci_sys_data *sys = bus->sysdata; |
201 | struct pcie_port *pp = sys->private_data; | ||
212 | unsigned long flags; | 202 | unsigned long flags; |
213 | int ret; | 203 | int ret; |
214 | 204 | ||
@@ -263,7 +253,8 @@ mv78xx0_pcie_scan_bus(int nr, struct pci_sys_data *sys) | |||
263 | static int __init mv78xx0_pcie_map_irq(const struct pci_dev *dev, u8 slot, | 253 | static int __init mv78xx0_pcie_map_irq(const struct pci_dev *dev, u8 slot, |
264 | u8 pin) | 254 | u8 pin) |
265 | { | 255 | { |
266 | struct pcie_port *pp = bus_to_port(dev->bus->number); | 256 | struct pci_sys_data *sys = dev->bus->sysdata; |
257 | struct pcie_port *pp = sys->private_data; | ||
267 | 258 | ||
268 | return IRQ_MV78XX0_PCIE_00 + (pp->maj << 2) + pp->min; | 259 | return IRQ_MV78XX0_PCIE_00 + (pp->maj << 2) + pp->min; |
269 | } | 260 | } |
@@ -271,7 +262,6 @@ static int __init mv78xx0_pcie_map_irq(const struct pci_dev *dev, u8 slot, | |||
271 | static struct hw_pci mv78xx0_pci __initdata = { | 262 | static struct hw_pci mv78xx0_pci __initdata = { |
272 | .nr_controllers = 8, | 263 | .nr_controllers = 8, |
273 | .preinit = mv78xx0_pcie_preinit, | 264 | .preinit = mv78xx0_pcie_preinit, |
274 | .swizzle = pci_std_swizzle, | ||
275 | .setup = mv78xx0_pcie_setup, | 265 | .setup = mv78xx0_pcie_setup, |
276 | .scan = mv78xx0_pcie_scan_bus, | 266 | .scan = mv78xx0_pcie_scan_bus, |
277 | .map_irq = mv78xx0_pcie_map_irq, | 267 | .map_irq = mv78xx0_pcie_map_irq, |
diff --git a/arch/arm/mach-mxs/devices-mx23.h b/arch/arm/mach-mxs/devices-mx23.h index 4d1329d5928..9acdd638704 100644 --- a/arch/arm/mach-mxs/devices-mx23.h +++ b/arch/arm/mach-mxs/devices-mx23.h | |||
@@ -11,10 +11,16 @@ | |||
11 | #include <mach/mx23.h> | 11 | #include <mach/mx23.h> |
12 | #include <mach/devices-common.h> | 12 | #include <mach/devices-common.h> |
13 | #include <mach/mxsfb.h> | 13 | #include <mach/mxsfb.h> |
14 | #include <linux/amba/bus.h> | ||
14 | 15 | ||
15 | extern const struct amba_device mx23_duart_device __initconst; | 16 | static inline int mx23_add_duart(void) |
16 | #define mx23_add_duart() \ | 17 | { |
17 | mxs_add_duart(&mx23_duart_device) | 18 | struct amba_device *d; |
19 | |||
20 | d = amba_ahb_device_add(NULL, "duart", MX23_DUART_BASE_ADDR, SZ_8K, | ||
21 | MX23_INT_DUART, 0, 0, 0); | ||
22 | return IS_ERR(d) ? PTR_ERR(d) : 0; | ||
23 | } | ||
18 | 24 | ||
19 | extern const struct mxs_auart_data mx23_auart_data[] __initconst; | 25 | extern const struct mxs_auart_data mx23_auart_data[] __initconst; |
20 | #define mx23_add_auart(id) mxs_add_auart(&mx23_auart_data[id]) | 26 | #define mx23_add_auart(id) mxs_add_auart(&mx23_auart_data[id]) |
diff --git a/arch/arm/mach-mxs/devices-mx28.h b/arch/arm/mach-mxs/devices-mx28.h index 9dbeae13084..84b2960df11 100644 --- a/arch/arm/mach-mxs/devices-mx28.h +++ b/arch/arm/mach-mxs/devices-mx28.h | |||
@@ -11,10 +11,16 @@ | |||
11 | #include <mach/mx28.h> | 11 | #include <mach/mx28.h> |
12 | #include <mach/devices-common.h> | 12 | #include <mach/devices-common.h> |
13 | #include <mach/mxsfb.h> | 13 | #include <mach/mxsfb.h> |
14 | #include <linux/amba/bus.h> | ||
14 | 15 | ||
15 | extern const struct amba_device mx28_duart_device __initconst; | 16 | static inline int mx28_add_duart(void) |
16 | #define mx28_add_duart() \ | 17 | { |
17 | mxs_add_duart(&mx28_duart_device) | 18 | struct amba_device *d; |
19 | |||
20 | d = amba_ahb_device_add(NULL, "duart", MX28_DUART_BASE_ADDR, SZ_8K, | ||
21 | MX28_INT_DUART, 0, 0, 0); | ||
22 | return IS_ERR(d) ? PTR_ERR(d) : 0; | ||
23 | } | ||
18 | 24 | ||
19 | extern const struct mxs_auart_data mx28_auart_data[] __initconst; | 25 | extern const struct mxs_auart_data mx28_auart_data[] __initconst; |
20 | #define mx28_add_auart(id) mxs_add_auart(&mx28_auart_data[id]) | 26 | #define mx28_add_auart(id) mxs_add_auart(&mx28_auart_data[id]) |
diff --git a/arch/arm/mach-mxs/devices.c b/arch/arm/mach-mxs/devices.c index 01faffec306..cf50b5a66dd 100644 --- a/arch/arm/mach-mxs/devices.c +++ b/arch/arm/mach-mxs/devices.c | |||
@@ -75,22 +75,6 @@ err: | |||
75 | return pdev; | 75 | return pdev; |
76 | } | 76 | } |
77 | 77 | ||
78 | int __init mxs_add_amba_device(const struct amba_device *dev) | ||
79 | { | ||
80 | struct amba_device *adev = amba_device_alloc(dev->dev.init_name, | ||
81 | dev->res.start, resource_size(&dev->res)); | ||
82 | |||
83 | if (!adev) { | ||
84 | pr_err("%s: failed to allocate memory", __func__); | ||
85 | return -ENOMEM; | ||
86 | } | ||
87 | |||
88 | adev->irq[0] = dev->irq[0]; | ||
89 | adev->irq[1] = dev->irq[1]; | ||
90 | |||
91 | return amba_device_add(adev, &iomem_resource); | ||
92 | } | ||
93 | |||
94 | struct device mxs_apbh_bus = { | 78 | struct device mxs_apbh_bus = { |
95 | .init_name = "mxs_apbh", | 79 | .init_name = "mxs_apbh", |
96 | .parent = &platform_bus, | 80 | .parent = &platform_bus, |
diff --git a/arch/arm/mach-mxs/devices/Makefile b/arch/arm/mach-mxs/devices/Makefile index c8f5c9541a3..5f72d978744 100644 --- a/arch/arm/mach-mxs/devices/Makefile +++ b/arch/arm/mach-mxs/devices/Makefile | |||
@@ -1,4 +1,3 @@ | |||
1 | obj-$(CONFIG_MXS_HAVE_AMBA_DUART) += amba-duart.o | ||
2 | obj-$(CONFIG_MXS_HAVE_PLATFORM_AUART) += platform-auart.o | 1 | obj-$(CONFIG_MXS_HAVE_PLATFORM_AUART) += platform-auart.o |
3 | obj-y += platform-dma.o | 2 | obj-y += platform-dma.o |
4 | obj-$(CONFIG_MXS_HAVE_PLATFORM_FEC) += platform-fec.o | 3 | obj-$(CONFIG_MXS_HAVE_PLATFORM_FEC) += platform-fec.o |
diff --git a/arch/arm/mach-mxs/devices/amba-duart.c b/arch/arm/mach-mxs/devices/amba-duart.c deleted file mode 100644 index a5479f76604..00000000000 --- a/arch/arm/mach-mxs/devices/amba-duart.c +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009-2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * Copyright 2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it under | ||
8 | * the terms of the GNU General Public License version 2 as published by the | ||
9 | * Free Software Foundation. | ||
10 | */ | ||
11 | #include <asm/irq.h> | ||
12 | #include <mach/mx23.h> | ||
13 | #include <mach/mx28.h> | ||
14 | #include <mach/devices-common.h> | ||
15 | |||
16 | #define MXS_AMBA_DUART_DEVICE(name, soc) \ | ||
17 | const struct amba_device name##_device __initconst = { \ | ||
18 | .dev = { \ | ||
19 | .init_name = "duart", \ | ||
20 | }, \ | ||
21 | .res = { \ | ||
22 | .start = soc ## _DUART_BASE_ADDR, \ | ||
23 | .end = (soc ## _DUART_BASE_ADDR) + SZ_8K - 1, \ | ||
24 | .flags = IORESOURCE_MEM, \ | ||
25 | }, \ | ||
26 | .irq = {soc ## _INT_DUART}, \ | ||
27 | } | ||
28 | |||
29 | #ifdef CONFIG_SOC_IMX23 | ||
30 | MXS_AMBA_DUART_DEVICE(mx23_duart, MX23); | ||
31 | #endif | ||
32 | |||
33 | #ifdef CONFIG_SOC_IMX28 | ||
34 | MXS_AMBA_DUART_DEVICE(mx28_duart, MX28); | ||
35 | #endif | ||
36 | |||
37 | int __init mxs_add_duart(const struct amba_device *dev) | ||
38 | { | ||
39 | return mxs_add_amba_device(dev); | ||
40 | } | ||
diff --git a/arch/arm/mach-mxs/include/mach/devices-common.h b/arch/arm/mach-mxs/include/mach/devices-common.h index f2e383955d8..21e45a70d34 100644 --- a/arch/arm/mach-mxs/include/mach/devices-common.h +++ b/arch/arm/mach-mxs/include/mach/devices-common.h | |||
@@ -27,11 +27,6 @@ static inline struct platform_device *mxs_add_platform_device( | |||
27 | name, id, res, num_resources, data, size_data, 0); | 27 | name, id, res, num_resources, data, size_data, 0); |
28 | } | 28 | } |
29 | 29 | ||
30 | int __init mxs_add_amba_device(const struct amba_device *dev); | ||
31 | |||
32 | /* duart */ | ||
33 | int __init mxs_add_duart(const struct amba_device *dev); | ||
34 | |||
35 | /* auart */ | 30 | /* auart */ |
36 | struct mxs_auart_data { | 31 | struct mxs_auart_data { |
37 | int id; | 32 | int id; |
diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile index 9923f92b545..398e9e53e18 100644 --- a/arch/arm/mach-omap1/Makefile +++ b/arch/arm/mach-omap1/Makefile | |||
@@ -12,6 +12,9 @@ endif | |||
12 | 12 | ||
13 | obj-$(CONFIG_OMAP_32K_TIMER) += timer32k.o | 13 | obj-$(CONFIG_OMAP_32K_TIMER) += timer32k.o |
14 | 14 | ||
15 | # OCPI interconnect support for 1710, 1610 and 5912 | ||
16 | obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o | ||
17 | |||
15 | # Power Management | 18 | # Power Management |
16 | obj-$(CONFIG_PM) += pm.o sleep.o | 19 | obj-$(CONFIG_PM) += pm.o sleep.o |
17 | 20 | ||
@@ -28,13 +31,15 @@ usb-fs-$(CONFIG_USB) := usb.o | |||
28 | obj-y += $(usb-fs-m) $(usb-fs-y) | 31 | obj-y += $(usb-fs-m) $(usb-fs-y) |
29 | 32 | ||
30 | # Specific board support | 33 | # Specific board support |
31 | obj-$(CONFIG_MACH_OMAP_H2) += board-h2.o board-h2-mmc.o | 34 | obj-$(CONFIG_MACH_OMAP_H2) += board-h2.o board-h2-mmc.o \ |
35 | board-nand.o | ||
32 | obj-$(CONFIG_MACH_OMAP_INNOVATOR) += board-innovator.o | 36 | obj-$(CONFIG_MACH_OMAP_INNOVATOR) += board-innovator.o |
33 | obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o | 37 | obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o |
34 | obj-$(CONFIG_MACH_OMAP_PERSEUS2) += board-perseus2.o | 38 | obj-$(CONFIG_MACH_OMAP_PERSEUS2) += board-perseus2.o board-nand.o |
35 | obj-$(CONFIG_MACH_OMAP_FSAMPLE) += board-fsample.o | 39 | obj-$(CONFIG_MACH_OMAP_FSAMPLE) += board-fsample.o board-nand.o |
36 | obj-$(CONFIG_MACH_OMAP_OSK) += board-osk.o | 40 | obj-$(CONFIG_MACH_OMAP_OSK) += board-osk.o |
37 | obj-$(CONFIG_MACH_OMAP_H3) += board-h3.o board-h3-mmc.o | 41 | obj-$(CONFIG_MACH_OMAP_H3) += board-h3.o board-h3-mmc.o \ |
42 | board-nand.o | ||
38 | obj-$(CONFIG_MACH_VOICEBLUE) += board-voiceblue.o | 43 | obj-$(CONFIG_MACH_VOICEBLUE) += board-voiceblue.o |
39 | obj-$(CONFIG_MACH_OMAP_PALMTE) += board-palmte.o | 44 | obj-$(CONFIG_MACH_OMAP_PALMTE) += board-palmte.o |
40 | obj-$(CONFIG_MACH_OMAP_PALMZ71) += board-palmz71.o | 45 | obj-$(CONFIG_MACH_OMAP_PALMZ71) += board-palmz71.o |
diff --git a/arch/arm/mach-omap1/ams-delta-fiq.c b/arch/arm/mach-omap1/ams-delta-fiq.c index fcce7ff3763..68e8e5654c0 100644 --- a/arch/arm/mach-omap1/ams-delta-fiq.c +++ b/arch/arm/mach-omap1/ams-delta-fiq.c | |||
@@ -48,7 +48,7 @@ static irqreturn_t deferred_fiq(int irq, void *dev_id) | |||
48 | struct irq_chip *irq_chip = NULL; | 48 | struct irq_chip *irq_chip = NULL; |
49 | int gpio, irq_num, fiq_count; | 49 | int gpio, irq_num, fiq_count; |
50 | 50 | ||
51 | irq_desc = irq_to_desc(IH_GPIO_BASE); | 51 | irq_desc = irq_to_desc(gpio_to_irq(AMS_DELTA_GPIO_PIN_KEYBRD_CLK)); |
52 | if (irq_desc) | 52 | if (irq_desc) |
53 | irq_chip = irq_desc->irq_data.chip; | 53 | irq_chip = irq_desc->irq_data.chip; |
54 | 54 | ||
@@ -102,7 +102,7 @@ void __init ams_delta_init_fiq(void) | |||
102 | } | 102 | } |
103 | 103 | ||
104 | retval = request_irq(INT_DEFERRED_FIQ, deferred_fiq, | 104 | retval = request_irq(INT_DEFERRED_FIQ, deferred_fiq, |
105 | IRQ_TYPE_EDGE_RISING, "deferred_fiq", 0); | 105 | IRQ_TYPE_EDGE_RISING, "deferred_fiq", NULL); |
106 | if (retval < 0) { | 106 | if (retval < 0) { |
107 | pr_err("Failed to get deferred_fiq IRQ, ret=%d\n", retval); | 107 | pr_err("Failed to get deferred_fiq IRQ, ret=%d\n", retval); |
108 | release_fiq(&fh); | 108 | release_fiq(&fh); |
diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c index 80bd43c7f4e..4a4afb37102 100644 --- a/arch/arm/mach-omap1/board-fsample.c +++ b/arch/arm/mach-omap1/board-fsample.c | |||
@@ -185,20 +185,6 @@ static struct platform_device nor_device = { | |||
185 | .resource = &nor_resource, | 185 | .resource = &nor_resource, |
186 | }; | 186 | }; |
187 | 187 | ||
188 | static void nand_cmd_ctl(struct mtd_info *mtd, int cmd, unsigned int ctrl) | ||
189 | { | ||
190 | struct nand_chip *this = mtd->priv; | ||
191 | unsigned long mask; | ||
192 | |||
193 | if (cmd == NAND_CMD_NONE) | ||
194 | return; | ||
195 | |||
196 | mask = (ctrl & NAND_CLE) ? 0x02 : 0; | ||
197 | if (ctrl & NAND_ALE) | ||
198 | mask |= 0x04; | ||
199 | writeb(cmd, (unsigned long)this->IO_ADDR_W | mask); | ||
200 | } | ||
201 | |||
202 | #define FSAMPLE_NAND_RB_GPIO_PIN 62 | 188 | #define FSAMPLE_NAND_RB_GPIO_PIN 62 |
203 | 189 | ||
204 | static int nand_dev_ready(struct mtd_info *mtd) | 190 | static int nand_dev_ready(struct mtd_info *mtd) |
@@ -216,7 +202,7 @@ static struct platform_nand_data nand_data = { | |||
216 | .part_probe_types = part_probes, | 202 | .part_probe_types = part_probes, |
217 | }, | 203 | }, |
218 | .ctrl = { | 204 | .ctrl = { |
219 | .cmd_ctrl = nand_cmd_ctl, | 205 | .cmd_ctrl = omap1_nand_cmd_ctl, |
220 | .dev_ready = nand_dev_ready, | 206 | .dev_ready = nand_dev_ready, |
221 | }, | 207 | }, |
222 | }; | 208 | }; |
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c index 553a2e53576..057ec13f064 100644 --- a/arch/arm/mach-omap1/board-h2.c +++ b/arch/arm/mach-omap1/board-h2.c | |||
@@ -179,20 +179,6 @@ static struct mtd_partition h2_nand_partitions[] = { | |||
179 | }, | 179 | }, |
180 | }; | 180 | }; |
181 | 181 | ||
182 | static void h2_nand_cmd_ctl(struct mtd_info *mtd, int cmd, unsigned int ctrl) | ||
183 | { | ||
184 | struct nand_chip *this = mtd->priv; | ||
185 | unsigned long mask; | ||
186 | |||
187 | if (cmd == NAND_CMD_NONE) | ||
188 | return; | ||
189 | |||
190 | mask = (ctrl & NAND_CLE) ? 0x02 : 0; | ||
191 | if (ctrl & NAND_ALE) | ||
192 | mask |= 0x04; | ||
193 | writeb(cmd, (unsigned long)this->IO_ADDR_W | mask); | ||
194 | } | ||
195 | |||
196 | #define H2_NAND_RB_GPIO_PIN 62 | 182 | #define H2_NAND_RB_GPIO_PIN 62 |
197 | 183 | ||
198 | static int h2_nand_dev_ready(struct mtd_info *mtd) | 184 | static int h2_nand_dev_ready(struct mtd_info *mtd) |
@@ -212,9 +198,8 @@ static struct platform_nand_data h2_nand_platdata = { | |||
212 | .part_probe_types = h2_part_probes, | 198 | .part_probe_types = h2_part_probes, |
213 | }, | 199 | }, |
214 | .ctrl = { | 200 | .ctrl = { |
215 | .cmd_ctrl = h2_nand_cmd_ctl, | 201 | .cmd_ctrl = omap1_nand_cmd_ctl, |
216 | .dev_ready = h2_nand_dev_ready, | 202 | .dev_ready = h2_nand_dev_ready, |
217 | |||
218 | }, | 203 | }, |
219 | }; | 204 | }; |
220 | 205 | ||
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index 4c19f4c0685..f6ddf875965 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c | |||
@@ -181,20 +181,6 @@ static struct mtd_partition nand_partitions[] = { | |||
181 | }, | 181 | }, |
182 | }; | 182 | }; |
183 | 183 | ||
184 | static void nand_cmd_ctl(struct mtd_info *mtd, int cmd, unsigned int ctrl) | ||
185 | { | ||
186 | struct nand_chip *this = mtd->priv; | ||
187 | unsigned long mask; | ||
188 | |||
189 | if (cmd == NAND_CMD_NONE) | ||
190 | return; | ||
191 | |||
192 | mask = (ctrl & NAND_CLE) ? 0x02 : 0; | ||
193 | if (ctrl & NAND_ALE) | ||
194 | mask |= 0x04; | ||
195 | writeb(cmd, (unsigned long)this->IO_ADDR_W | mask); | ||
196 | } | ||
197 | |||
198 | #define H3_NAND_RB_GPIO_PIN 10 | 184 | #define H3_NAND_RB_GPIO_PIN 10 |
199 | 185 | ||
200 | static int nand_dev_ready(struct mtd_info *mtd) | 186 | static int nand_dev_ready(struct mtd_info *mtd) |
@@ -214,7 +200,7 @@ static struct platform_nand_data nand_platdata = { | |||
214 | .part_probe_types = part_probes, | 200 | .part_probe_types = part_probes, |
215 | }, | 201 | }, |
216 | .ctrl = { | 202 | .ctrl = { |
217 | .cmd_ctrl = nand_cmd_ctl, | 203 | .cmd_ctrl = omap1_nand_cmd_ctl, |
218 | .dev_ready = nand_dev_ready, | 204 | .dev_ready = nand_dev_ready, |
219 | 205 | ||
220 | }, | 206 | }, |
diff --git a/arch/arm/mach-omap1/board-nand.c b/arch/arm/mach-omap1/board-nand.c new file mode 100644 index 00000000000..4d0835327d2 --- /dev/null +++ b/arch/arm/mach-omap1/board-nand.c | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-omap1/board-nand.c | ||
3 | * | ||
4 | * Common OMAP1 board NAND code | ||
5 | * | ||
6 | * Copyright (C) 2004, 2012 Texas Instruments, Inc. | ||
7 | * Copyright (C) 2002 MontaVista Software, Inc. | ||
8 | * Copyright (C) 2001 RidgeRun, Inc. | ||
9 | * Author: RidgeRun, Inc. | ||
10 | * Greg Lonnon (glonnon@ridgerun.com) or info@ridgerun.com | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify | ||
13 | * it under the terms of the GNU General Public License version 2 as | ||
14 | * published by the Free Software Foundation. | ||
15 | */ | ||
16 | #include <linux/kernel.h> | ||
17 | #include <linux/io.h> | ||
18 | #include <linux/mtd/mtd.h> | ||
19 | #include <linux/mtd/nand.h> | ||
20 | |||
21 | #include "common.h" | ||
22 | |||
23 | void omap1_nand_cmd_ctl(struct mtd_info *mtd, int cmd, unsigned int ctrl) | ||
24 | { | ||
25 | struct nand_chip *this = mtd->priv; | ||
26 | unsigned long mask; | ||
27 | |||
28 | if (cmd == NAND_CMD_NONE) | ||
29 | return; | ||
30 | |||
31 | mask = (ctrl & NAND_CLE) ? 0x02 : 0; | ||
32 | if (ctrl & NAND_ALE) | ||
33 | mask |= 0x04; | ||
34 | |||
35 | writeb(cmd, this->IO_ADDR_W + mask); | ||
36 | } | ||
37 | |||
diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c index a2c5abcd7c8..61ed4f0247c 100644 --- a/arch/arm/mach-omap1/board-palmz71.c +++ b/arch/arm/mach-omap1/board-palmz71.c | |||
@@ -289,10 +289,10 @@ palmz71_gpio_setup(int early) | |||
289 | gpio_direction_input(PALMZ71_USBDETECT_GPIO); | 289 | gpio_direction_input(PALMZ71_USBDETECT_GPIO); |
290 | if (request_irq(gpio_to_irq(PALMZ71_USBDETECT_GPIO), | 290 | if (request_irq(gpio_to_irq(PALMZ71_USBDETECT_GPIO), |
291 | palmz71_powercable, IRQF_SAMPLE_RANDOM, | 291 | palmz71_powercable, IRQF_SAMPLE_RANDOM, |
292 | "palmz71-cable", 0)) | 292 | "palmz71-cable", NULL)) |
293 | printk(KERN_ERR | 293 | printk(KERN_ERR |
294 | "IRQ request for power cable failed!\n"); | 294 | "IRQ request for power cable failed!\n"); |
295 | palmz71_powercable(gpio_to_irq(PALMZ71_USBDETECT_GPIO), 0); | 295 | palmz71_powercable(gpio_to_irq(PALMZ71_USBDETECT_GPIO), NULL); |
296 | } | 296 | } |
297 | } | 297 | } |
298 | 298 | ||
diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c index 76d4ee05a81..a2c88890e76 100644 --- a/arch/arm/mach-omap1/board-perseus2.c +++ b/arch/arm/mach-omap1/board-perseus2.c | |||
@@ -143,20 +143,6 @@ static struct platform_device nor_device = { | |||
143 | .resource = &nor_resource, | 143 | .resource = &nor_resource, |
144 | }; | 144 | }; |
145 | 145 | ||
146 | static void nand_cmd_ctl(struct mtd_info *mtd, int cmd, unsigned int ctrl) | ||
147 | { | ||
148 | struct nand_chip *this = mtd->priv; | ||
149 | unsigned long mask; | ||
150 | |||
151 | if (cmd == NAND_CMD_NONE) | ||
152 | return; | ||
153 | |||
154 | mask = (ctrl & NAND_CLE) ? 0x02 : 0; | ||
155 | if (ctrl & NAND_ALE) | ||
156 | mask |= 0x04; | ||
157 | writeb(cmd, (unsigned long)this->IO_ADDR_W | mask); | ||
158 | } | ||
159 | |||
160 | #define P2_NAND_RB_GPIO_PIN 62 | 146 | #define P2_NAND_RB_GPIO_PIN 62 |
161 | 147 | ||
162 | static int nand_dev_ready(struct mtd_info *mtd) | 148 | static int nand_dev_ready(struct mtd_info *mtd) |
@@ -174,7 +160,7 @@ static struct platform_nand_data nand_data = { | |||
174 | .part_probe_types = part_probes, | 160 | .part_probe_types = part_probes, |
175 | }, | 161 | }, |
176 | .ctrl = { | 162 | .ctrl = { |
177 | .cmd_ctrl = nand_cmd_ctl, | 163 | .cmd_ctrl = omap1_nand_cmd_ctl, |
178 | .dev_ready = nand_dev_ready, | 164 | .dev_ready = nand_dev_ready, |
179 | }, | 165 | }, |
180 | }; | 166 | }; |
diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c index 67382ddd8c8..a9ee06b6cb4 100644 --- a/arch/arm/mach-omap1/clock.c +++ b/arch/arm/mach-omap1/clock.c | |||
@@ -194,9 +194,8 @@ int omap1_select_table_rate(struct clk *clk, unsigned long rate) | |||
194 | { | 194 | { |
195 | /* Find the highest supported frequency <= rate and switch to it */ | 195 | /* Find the highest supported frequency <= rate and switch to it */ |
196 | struct mpu_rate * ptr; | 196 | struct mpu_rate * ptr; |
197 | unsigned long dpll1_rate, ref_rate; | 197 | unsigned long ref_rate; |
198 | 198 | ||
199 | dpll1_rate = ck_dpll1_p->rate; | ||
200 | ref_rate = ck_ref_p->rate; | 199 | ref_rate = ck_ref_p->rate; |
201 | 200 | ||
202 | for (ptr = omap1_rate_table; ptr->rate; ptr++) { | 201 | for (ptr = omap1_rate_table; ptr->rate; ptr++) { |
diff --git a/arch/arm/mach-omap1/common.h b/arch/arm/mach-omap1/common.h index af658ad338e..bb7779b5779 100644 --- a/arch/arm/mach-omap1/common.h +++ b/arch/arm/mach-omap1/common.h | |||
@@ -27,6 +27,7 @@ | |||
27 | #define __ARCH_ARM_MACH_OMAP1_COMMON_H | 27 | #define __ARCH_ARM_MACH_OMAP1_COMMON_H |
28 | 28 | ||
29 | #include <plat/common.h> | 29 | #include <plat/common.h> |
30 | #include <linux/mtd/mtd.h> | ||
30 | 31 | ||
31 | #if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) | 32 | #if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) |
32 | void omap7xx_map_io(void); | 33 | void omap7xx_map_io(void); |
@@ -56,8 +57,20 @@ void omap1_init_early(void); | |||
56 | void omap1_init_irq(void); | 57 | void omap1_init_irq(void); |
57 | void omap1_restart(char, const char *); | 58 | void omap1_restart(char, const char *); |
58 | 59 | ||
60 | extern void __init omap_check_revision(void); | ||
61 | |||
62 | extern void omap1_nand_cmd_ctl(struct mtd_info *mtd, int cmd, | ||
63 | unsigned int ctrl); | ||
64 | |||
59 | extern struct sys_timer omap1_timer; | 65 | extern struct sys_timer omap1_timer; |
60 | extern bool omap_32k_timer_init(void); | 66 | extern bool omap_32k_timer_init(void); |
61 | extern void __init omap_init_consistent_dma_size(void); | 67 | |
68 | extern u32 omap_irq_flags; | ||
69 | |||
70 | #ifdef CONFIG_ARCH_OMAP16XX | ||
71 | extern int ocpi_enable(void); | ||
72 | #else | ||
73 | static inline int ocpi_enable(void) { return 0; } | ||
74 | #endif | ||
62 | 75 | ||
63 | #endif /* __ARCH_ARM_MACH_OMAP1_COMMON_H */ | 76 | #endif /* __ARCH_ARM_MACH_OMAP1_COMMON_H */ |
diff --git a/arch/arm/mach-omap1/fpga.c b/arch/arm/mach-omap1/fpga.c index 76c67b3f9f6..29ec50fc688 100644 --- a/arch/arm/mach-omap1/fpga.c +++ b/arch/arm/mach-omap1/fpga.c | |||
@@ -87,7 +87,7 @@ static void fpga_mask_ack_irq(struct irq_data *d) | |||
87 | fpga_ack_irq(d); | 87 | fpga_ack_irq(d); |
88 | } | 88 | } |
89 | 89 | ||
90 | void innovator_fpga_IRQ_demux(unsigned int irq, struct irq_desc *desc) | 90 | static void innovator_fpga_IRQ_demux(unsigned int irq, struct irq_desc *desc) |
91 | { | 91 | { |
92 | u32 stat; | 92 | u32 stat; |
93 | int fpga_irq; | 93 | int fpga_irq; |
diff --git a/arch/arm/mach-omap1/id.c b/arch/arm/mach-omap1/id.c index 2b28e1da14b..a1b846aacda 100644 --- a/arch/arm/mach-omap1/id.c +++ b/arch/arm/mach-omap1/id.c | |||
@@ -21,6 +21,8 @@ | |||
21 | 21 | ||
22 | #include <mach/hardware.h> | 22 | #include <mach/hardware.h> |
23 | 23 | ||
24 | #include "common.h" | ||
25 | |||
24 | #define OMAP_DIE_ID_0 0xfffe1800 | 26 | #define OMAP_DIE_ID_0 0xfffe1800 |
25 | #define OMAP_DIE_ID_1 0xfffe1804 | 27 | #define OMAP_DIE_ID_1 0xfffe1804 |
26 | #define OMAP_PRODUCTION_ID_0 0xfffe2000 | 28 | #define OMAP_PRODUCTION_ID_0 0xfffe2000 |
diff --git a/arch/arm/mach-omap1/io.c b/arch/arm/mach-omap1/io.c index d969a7203d1..71ce017bf5d 100644 --- a/arch/arm/mach-omap1/io.c +++ b/arch/arm/mach-omap1/io.c | |||
@@ -18,13 +18,12 @@ | |||
18 | 18 | ||
19 | #include <plat/mux.h> | 19 | #include <plat/mux.h> |
20 | #include <plat/tc.h> | 20 | #include <plat/tc.h> |
21 | #include <plat/dma.h> | ||
21 | 22 | ||
22 | #include "iomap.h" | 23 | #include "iomap.h" |
23 | #include "common.h" | 24 | #include "common.h" |
24 | #include "clock.h" | 25 | #include "clock.h" |
25 | 26 | ||
26 | extern void omap_check_revision(void); | ||
27 | |||
28 | /* | 27 | /* |
29 | * The machine specific code may provide the extra mapping besides the | 28 | * The machine specific code may provide the extra mapping besides the |
30 | * default mapping provided here. | 29 | * default mapping provided here. |
diff --git a/arch/arm/mach-omap1/irq.c b/arch/arm/mach-omap1/irq.c index 4448114fab7..6995fb6a334 100644 --- a/arch/arm/mach-omap1/irq.c +++ b/arch/arm/mach-omap1/irq.c | |||
@@ -49,6 +49,8 @@ | |||
49 | 49 | ||
50 | #include <mach/hardware.h> | 50 | #include <mach/hardware.h> |
51 | 51 | ||
52 | #include "common.h" | ||
53 | |||
52 | #define IRQ_BANK(irq) ((irq) >> 5) | 54 | #define IRQ_BANK(irq) ((irq) >> 5) |
53 | #define IRQ_BIT(irq) ((irq) & 0x1f) | 55 | #define IRQ_BIT(irq) ((irq) & 0x1f) |
54 | 56 | ||
diff --git a/arch/arm/mach-omap1/lcd_dma.c b/arch/arm/mach-omap1/lcd_dma.c index 86ace9aaa66..5769c71815b 100644 --- a/arch/arm/mach-omap1/lcd_dma.c +++ b/arch/arm/mach-omap1/lcd_dma.c | |||
@@ -57,7 +57,7 @@ static struct lcd_dma_info { | |||
57 | void *cb_data; | 57 | void *cb_data; |
58 | 58 | ||
59 | int active; | 59 | int active; |
60 | unsigned long addr, size; | 60 | unsigned long addr; |
61 | int rotate, data_type, xres, yres; | 61 | int rotate, data_type, xres, yres; |
62 | int vxres; | 62 | int vxres; |
63 | int mirror; | 63 | int mirror; |
@@ -77,11 +77,6 @@ void omap_set_lcd_dma_b1(unsigned long addr, u16 fb_xres, u16 fb_yres, | |||
77 | } | 77 | } |
78 | EXPORT_SYMBOL(omap_set_lcd_dma_b1); | 78 | EXPORT_SYMBOL(omap_set_lcd_dma_b1); |
79 | 79 | ||
80 | void omap_set_lcd_dma_src_port(int port) | ||
81 | { | ||
82 | lcd_dma.src_port = port; | ||
83 | } | ||
84 | |||
85 | void omap_set_lcd_dma_ext_controller(int external) | 80 | void omap_set_lcd_dma_ext_controller(int external) |
86 | { | 81 | { |
87 | lcd_dma.ext_ctrl = external; | 82 | lcd_dma.ext_ctrl = external; |
diff --git a/arch/arm/plat-omap/ocpi.c b/arch/arm/mach-omap1/ocpi.c index ebe0c73c890..238170cab5b 100644 --- a/arch/arm/plat-omap/ocpi.c +++ b/arch/arm/mach-omap1/ocpi.c | |||
@@ -4,6 +4,7 @@ | |||
4 | * Minimal OCP bus support for omap16xx | 4 | * Minimal OCP bus support for omap16xx |
5 | * | 5 | * |
6 | * Copyright (C) 2003 - 2005 Nokia Corporation | 6 | * Copyright (C) 2003 - 2005 Nokia Corporation |
7 | * Copyright (C) 2012 Texas Instruments, Inc. | ||
7 | * Written by Tony Lindgren <tony@atomide.com> | 8 | * Written by Tony Lindgren <tony@atomide.com> |
8 | * | 9 | * |
9 | * Modified for clock framework by Paul Mundt <paul.mundt@nokia.com>. | 10 | * Modified for clock framework by Paul Mundt <paul.mundt@nokia.com>. |
@@ -35,6 +36,8 @@ | |||
35 | 36 | ||
36 | #include <mach/hardware.h> | 37 | #include <mach/hardware.h> |
37 | 38 | ||
39 | #include "common.h" | ||
40 | |||
38 | #define OCPI_BASE 0xfffec320 | 41 | #define OCPI_BASE 0xfffec320 |
39 | #define OCPI_FAULT (OCPI_BASE + 0x00) | 42 | #define OCPI_FAULT (OCPI_BASE + 0x00) |
40 | #define OCPI_CMD_FAULT (OCPI_BASE + 0x04) | 43 | #define OCPI_CMD_FAULT (OCPI_BASE + 0x04) |
@@ -64,7 +67,7 @@ int ocpi_enable(void) | |||
64 | /* Enable access for OHCI in OCPI */ | 67 | /* Enable access for OHCI in OCPI */ |
65 | val = omap_readl(OCPI_PROT); | 68 | val = omap_readl(OCPI_PROT); |
66 | val &= ~0xff; | 69 | val &= ~0xff; |
67 | //val &= (1 << 0); /* Allow access only to EMIFS */ | 70 | /* val &= (1 << 0); Allow access only to EMIFS */ |
68 | omap_writel(val, OCPI_PROT); | 71 | omap_writel(val, OCPI_PROT); |
69 | 72 | ||
70 | val = omap_readl(OCPI_SEC); | 73 | val = omap_readl(OCPI_SEC); |
@@ -86,7 +89,7 @@ static int __init omap_ocpi_init(void) | |||
86 | 89 | ||
87 | clk_enable(ocpi_ck); | 90 | clk_enable(ocpi_ck); |
88 | ocpi_enable(); | 91 | ocpi_enable(); |
89 | printk("OMAP OCPI interconnect driver loaded\n"); | 92 | pr_info("OMAP OCPI interconnect driver loaded\n"); |
90 | 93 | ||
91 | return 0; | 94 | return 0; |
92 | } | 95 | } |
diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c index f66c32912b2..b2560d32b3a 100644 --- a/arch/arm/mach-omap1/pm.c +++ b/arch/arm/mach-omap1/pm.c | |||
@@ -569,11 +569,10 @@ static int omap_pm_read_proc( | |||
569 | 569 | ||
570 | static void omap_pm_init_proc(void) | 570 | static void omap_pm_init_proc(void) |
571 | { | 571 | { |
572 | struct proc_dir_entry *entry; | 572 | /* XXX Appears to leak memory */ |
573 | 573 | create_proc_read_entry("driver/omap_pm", | |
574 | entry = create_proc_read_entry("driver/omap_pm", | 574 | S_IWUSR | S_IRUGO, NULL, |
575 | S_IWUSR | S_IRUGO, NULL, | 575 | omap_pm_read_proc, NULL); |
576 | omap_pm_read_proc, NULL); | ||
577 | } | 576 | } |
578 | 577 | ||
579 | #endif /* DEBUG && CONFIG_PROC_FS */ | 578 | #endif /* DEBUG && CONFIG_PROC_FS */ |
diff --git a/arch/arm/mach-omap1/reset.c b/arch/arm/mach-omap1/reset.c index f255b153b86..b1770910386 100644 --- a/arch/arm/mach-omap1/reset.c +++ b/arch/arm/mach-omap1/reset.c | |||
@@ -8,6 +8,8 @@ | |||
8 | 8 | ||
9 | #include <mach/hardware.h> | 9 | #include <mach/hardware.h> |
10 | 10 | ||
11 | #include "common.h" | ||
12 | |||
11 | void omap1_restart(char mode, const char *cmd) | 13 | void omap1_restart(char mode, const char *cmd) |
12 | { | 14 | { |
13 | /* | 15 | /* |
diff --git a/arch/arm/mach-omap1/timer.c b/arch/arm/mach-omap1/timer.c index fb202af01d0..64c65bcb2d6 100644 --- a/arch/arm/mach-omap1/timer.c +++ b/arch/arm/mach-omap1/timer.c | |||
@@ -54,8 +54,7 @@ static int omap1_dm_timer_set_src(struct platform_device *pdev, | |||
54 | return 0; | 54 | return 0; |
55 | } | 55 | } |
56 | 56 | ||
57 | 57 | static int __init omap1_dm_timer_init(void) | |
58 | int __init omap1_dm_timer_init(void) | ||
59 | { | 58 | { |
60 | int i; | 59 | int i; |
61 | int ret; | 60 | int ret; |
diff --git a/arch/arm/mach-omap1/usb.c b/arch/arm/mach-omap1/usb.c index 19de03b074e..e61afd92276 100644 --- a/arch/arm/mach-omap1/usb.c +++ b/arch/arm/mach-omap1/usb.c | |||
@@ -29,6 +29,8 @@ | |||
29 | #include <plat/mux.h> | 29 | #include <plat/mux.h> |
30 | #include <plat/usb.h> | 30 | #include <plat/usb.h> |
31 | 31 | ||
32 | #include "common.h" | ||
33 | |||
32 | /* These routines should handle the standard chip-specific modes | 34 | /* These routines should handle the standard chip-specific modes |
33 | * for usb0/1/2 ports, covering basic mux and transceiver setup. | 35 | * for usb0/1/2 ports, covering basic mux and transceiver setup. |
34 | * | 36 | * |
@@ -138,6 +140,7 @@ static inline void ohci_device_init(struct omap_usb_config *pdata) | |||
138 | if (cpu_is_omap7xx()) | 140 | if (cpu_is_omap7xx()) |
139 | ohci_resources[1].start = INT_7XX_USB_HHC_1; | 141 | ohci_resources[1].start = INT_7XX_USB_HHC_1; |
140 | pdata->ohci_device = &ohci_device; | 142 | pdata->ohci_device = &ohci_device; |
143 | pdata->ocpi_enable = &ocpi_enable; | ||
141 | } | 144 | } |
142 | 145 | ||
143 | #else | 146 | #else |
diff --git a/arch/arm/mach-omap2/am35xx-emac.c b/arch/arm/mach-omap2/am35xx-emac.c index 1f97e747520..447682c4e11 100644 --- a/arch/arm/mach-omap2/am35xx-emac.c +++ b/arch/arm/mach-omap2/am35xx-emac.c | |||
@@ -39,26 +39,23 @@ static struct platform_device am35xx_emac_mdio_device = { | |||
39 | 39 | ||
40 | static void am35xx_enable_emac_int(void) | 40 | static void am35xx_enable_emac_int(void) |
41 | { | 41 | { |
42 | u32 regval; | 42 | u32 v; |
43 | 43 | ||
44 | regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); | 44 | v = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); |
45 | regval = (regval | AM35XX_CPGMAC_C0_RX_PULSE_CLR | | 45 | v |= (AM35XX_CPGMAC_C0_RX_PULSE_CLR | AM35XX_CPGMAC_C0_TX_PULSE_CLR | |
46 | AM35XX_CPGMAC_C0_TX_PULSE_CLR | | 46 | AM35XX_CPGMAC_C0_MISC_PULSE_CLR | AM35XX_CPGMAC_C0_RX_THRESH_CLR); |
47 | AM35XX_CPGMAC_C0_MISC_PULSE_CLR | | 47 | omap_ctrl_writel(v, AM35XX_CONTROL_LVL_INTR_CLEAR); |
48 | AM35XX_CPGMAC_C0_RX_THRESH_CLR); | 48 | omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); /* OCP barrier */ |
49 | omap_ctrl_writel(regval, AM35XX_CONTROL_LVL_INTR_CLEAR); | ||
50 | regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); | ||
51 | } | 49 | } |
52 | 50 | ||
53 | static void am35xx_disable_emac_int(void) | 51 | static void am35xx_disable_emac_int(void) |
54 | { | 52 | { |
55 | u32 regval; | 53 | u32 v; |
56 | 54 | ||
57 | regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); | 55 | v = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); |
58 | regval = (regval | AM35XX_CPGMAC_C0_RX_PULSE_CLR | | 56 | v |= (AM35XX_CPGMAC_C0_RX_PULSE_CLR | AM35XX_CPGMAC_C0_TX_PULSE_CLR); |
59 | AM35XX_CPGMAC_C0_TX_PULSE_CLR); | 57 | omap_ctrl_writel(v, AM35XX_CONTROL_LVL_INTR_CLEAR); |
60 | omap_ctrl_writel(regval, AM35XX_CONTROL_LVL_INTR_CLEAR); | 58 | omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); /* OCP barrier */ |
61 | regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); | ||
62 | } | 59 | } |
63 | 60 | ||
64 | static struct emac_platform_data am35xx_emac_pdata = { | 61 | static struct emac_platform_data am35xx_emac_pdata = { |
@@ -92,7 +89,7 @@ static struct platform_device am35xx_emac_device = { | |||
92 | 89 | ||
93 | void __init am35xx_emac_init(unsigned long mdio_bus_freq, u8 rmii_en) | 90 | void __init am35xx_emac_init(unsigned long mdio_bus_freq, u8 rmii_en) |
94 | { | 91 | { |
95 | unsigned int regval; | 92 | u32 v; |
96 | int err; | 93 | int err; |
97 | 94 | ||
98 | am35xx_emac_pdata.rmii_en = rmii_en; | 95 | am35xx_emac_pdata.rmii_en = rmii_en; |
@@ -110,8 +107,8 @@ void __init am35xx_emac_init(unsigned long mdio_bus_freq, u8 rmii_en) | |||
110 | return; | 107 | return; |
111 | } | 108 | } |
112 | 109 | ||
113 | regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET); | 110 | v = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET); |
114 | regval = regval & (~(AM35XX_CPGMACSS_SW_RST)); | 111 | v &= ~AM35XX_CPGMACSS_SW_RST; |
115 | omap_ctrl_writel(regval, AM35XX_CONTROL_IP_SW_RESET); | 112 | omap_ctrl_writel(v, AM35XX_CONTROL_IP_SW_RESET); |
116 | regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET); | 113 | omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET); /* OCP barrier */ |
117 | } | 114 | } |
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c index da75f239873..37abb0d49b5 100644 --- a/arch/arm/mach-omap2/board-3430sdp.c +++ b/arch/arm/mach-omap2/board-3430sdp.c | |||
@@ -37,7 +37,7 @@ | |||
37 | #include <plat/dma.h> | 37 | #include <plat/dma.h> |
38 | #include <plat/gpmc.h> | 38 | #include <plat/gpmc.h> |
39 | #include <video/omapdss.h> | 39 | #include <video/omapdss.h> |
40 | #include <video/omap-panel-dvi.h> | 40 | #include <video/omap-panel-tfp410.h> |
41 | 41 | ||
42 | #include <plat/gpmc-smc91x.h> | 42 | #include <plat/gpmc-smc91x.h> |
43 | 43 | ||
@@ -113,9 +113,6 @@ static struct gpio sdp3430_dss_gpios[] __initdata = { | |||
113 | {SDP3430_LCD_PANEL_BACKLIGHT_GPIO, GPIOF_OUT_INIT_LOW, "LCD Backlight"}, | 113 | {SDP3430_LCD_PANEL_BACKLIGHT_GPIO, GPIOF_OUT_INIT_LOW, "LCD Backlight"}, |
114 | }; | 114 | }; |
115 | 115 | ||
116 | static int lcd_enabled; | ||
117 | static int dvi_enabled; | ||
118 | |||
119 | static void __init sdp3430_display_init(void) | 116 | static void __init sdp3430_display_init(void) |
120 | { | 117 | { |
121 | int r; | 118 | int r; |
@@ -129,44 +126,18 @@ static void __init sdp3430_display_init(void) | |||
129 | 126 | ||
130 | static int sdp3430_panel_enable_lcd(struct omap_dss_device *dssdev) | 127 | static int sdp3430_panel_enable_lcd(struct omap_dss_device *dssdev) |
131 | { | 128 | { |
132 | if (dvi_enabled) { | ||
133 | printk(KERN_ERR "cannot enable LCD, DVI is enabled\n"); | ||
134 | return -EINVAL; | ||
135 | } | ||
136 | |||
137 | gpio_direction_output(SDP3430_LCD_PANEL_ENABLE_GPIO, 1); | 129 | gpio_direction_output(SDP3430_LCD_PANEL_ENABLE_GPIO, 1); |
138 | gpio_direction_output(SDP3430_LCD_PANEL_BACKLIGHT_GPIO, 1); | 130 | gpio_direction_output(SDP3430_LCD_PANEL_BACKLIGHT_GPIO, 1); |
139 | 131 | ||
140 | lcd_enabled = 1; | ||
141 | |||
142 | return 0; | 132 | return 0; |
143 | } | 133 | } |
144 | 134 | ||
145 | static void sdp3430_panel_disable_lcd(struct omap_dss_device *dssdev) | 135 | static void sdp3430_panel_disable_lcd(struct omap_dss_device *dssdev) |
146 | { | 136 | { |
147 | lcd_enabled = 0; | ||
148 | |||
149 | gpio_direction_output(SDP3430_LCD_PANEL_ENABLE_GPIO, 0); | 137 | gpio_direction_output(SDP3430_LCD_PANEL_ENABLE_GPIO, 0); |
150 | gpio_direction_output(SDP3430_LCD_PANEL_BACKLIGHT_GPIO, 0); | 138 | gpio_direction_output(SDP3430_LCD_PANEL_BACKLIGHT_GPIO, 0); |
151 | } | 139 | } |
152 | 140 | ||
153 | static int sdp3430_panel_enable_dvi(struct omap_dss_device *dssdev) | ||
154 | { | ||
155 | if (lcd_enabled) { | ||
156 | printk(KERN_ERR "cannot enable DVI, LCD is enabled\n"); | ||
157 | return -EINVAL; | ||
158 | } | ||
159 | |||
160 | dvi_enabled = 1; | ||
161 | |||
162 | return 0; | ||
163 | } | ||
164 | |||
165 | static void sdp3430_panel_disable_dvi(struct omap_dss_device *dssdev) | ||
166 | { | ||
167 | dvi_enabled = 0; | ||
168 | } | ||
169 | |||
170 | static int sdp3430_panel_enable_tv(struct omap_dss_device *dssdev) | 141 | static int sdp3430_panel_enable_tv(struct omap_dss_device *dssdev) |
171 | { | 142 | { |
172 | return 0; | 143 | return 0; |
@@ -186,15 +157,14 @@ static struct omap_dss_device sdp3430_lcd_device = { | |||
186 | .platform_disable = sdp3430_panel_disable_lcd, | 157 | .platform_disable = sdp3430_panel_disable_lcd, |
187 | }; | 158 | }; |
188 | 159 | ||
189 | static struct panel_dvi_platform_data dvi_panel = { | 160 | static struct tfp410_platform_data dvi_panel = { |
190 | .platform_enable = sdp3430_panel_enable_dvi, | 161 | .power_down_gpio = -1, |
191 | .platform_disable = sdp3430_panel_disable_dvi, | ||
192 | }; | 162 | }; |
193 | 163 | ||
194 | static struct omap_dss_device sdp3430_dvi_device = { | 164 | static struct omap_dss_device sdp3430_dvi_device = { |
195 | .name = "dvi", | 165 | .name = "dvi", |
196 | .type = OMAP_DISPLAY_TYPE_DPI, | 166 | .type = OMAP_DISPLAY_TYPE_DPI, |
197 | .driver_name = "dvi", | 167 | .driver_name = "tfp410", |
198 | .data = &dvi_panel, | 168 | .data = &dvi_panel, |
199 | .phy.dpi.data_lines = 24, | 169 | .phy.dpi.data_lines = 24, |
200 | }; | 170 | }; |
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 6dc18484189..4a9bc00a7d9 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c | |||
@@ -622,6 +622,10 @@ static struct nokia_dsi_panel_data dsi1_panel = { | |||
622 | .use_ext_te = false, | 622 | .use_ext_te = false, |
623 | .ext_te_gpio = 101, | 623 | .ext_te_gpio = 101, |
624 | .esd_interval = 0, | 624 | .esd_interval = 0, |
625 | .pin_config = { | ||
626 | .num_pins = 6, | ||
627 | .pins = { 0, 1, 2, 3, 4, 5 }, | ||
628 | }, | ||
625 | }; | 629 | }; |
626 | 630 | ||
627 | static struct omap_dss_device sdp4430_lcd_device = { | 631 | static struct omap_dss_device sdp4430_lcd_device = { |
@@ -630,13 +634,6 @@ static struct omap_dss_device sdp4430_lcd_device = { | |||
630 | .type = OMAP_DISPLAY_TYPE_DSI, | 634 | .type = OMAP_DISPLAY_TYPE_DSI, |
631 | .data = &dsi1_panel, | 635 | .data = &dsi1_panel, |
632 | .phy.dsi = { | 636 | .phy.dsi = { |
633 | .clk_lane = 1, | ||
634 | .clk_pol = 0, | ||
635 | .data1_lane = 2, | ||
636 | .data1_pol = 0, | ||
637 | .data2_lane = 3, | ||
638 | .data2_pol = 0, | ||
639 | |||
640 | .module = 0, | 637 | .module = 0, |
641 | }, | 638 | }, |
642 | 639 | ||
@@ -671,6 +668,10 @@ static struct nokia_dsi_panel_data dsi2_panel = { | |||
671 | .use_ext_te = false, | 668 | .use_ext_te = false, |
672 | .ext_te_gpio = 103, | 669 | .ext_te_gpio = 103, |
673 | .esd_interval = 0, | 670 | .esd_interval = 0, |
671 | .pin_config = { | ||
672 | .num_pins = 6, | ||
673 | .pins = { 0, 1, 2, 3, 4, 5 }, | ||
674 | }, | ||
674 | }; | 675 | }; |
675 | 676 | ||
676 | static struct omap_dss_device sdp4430_lcd2_device = { | 677 | static struct omap_dss_device sdp4430_lcd2_device = { |
@@ -679,12 +680,6 @@ static struct omap_dss_device sdp4430_lcd2_device = { | |||
679 | .type = OMAP_DISPLAY_TYPE_DSI, | 680 | .type = OMAP_DISPLAY_TYPE_DSI, |
680 | .data = &dsi2_panel, | 681 | .data = &dsi2_panel, |
681 | .phy.dsi = { | 682 | .phy.dsi = { |
682 | .clk_lane = 1, | ||
683 | .clk_pol = 0, | ||
684 | .data1_lane = 2, | ||
685 | .data1_pol = 0, | ||
686 | .data2_lane = 3, | ||
687 | .data2_pol = 0, | ||
688 | 683 | ||
689 | .module = 1, | 684 | .module = 1, |
690 | }, | 685 | }, |
@@ -714,21 +709,6 @@ static struct omap_dss_device sdp4430_lcd2_device = { | |||
714 | .channel = OMAP_DSS_CHANNEL_LCD2, | 709 | .channel = OMAP_DSS_CHANNEL_LCD2, |
715 | }; | 710 | }; |
716 | 711 | ||
717 | static void sdp4430_lcd_init(void) | ||
718 | { | ||
719 | int r; | ||
720 | |||
721 | r = gpio_request_one(dsi1_panel.reset_gpio, GPIOF_DIR_OUT, | ||
722 | "lcd1_reset_gpio"); | ||
723 | if (r) | ||
724 | pr_err("%s: Could not get lcd1_reset_gpio\n", __func__); | ||
725 | |||
726 | r = gpio_request_one(dsi2_panel.reset_gpio, GPIOF_DIR_OUT, | ||
727 | "lcd2_reset_gpio"); | ||
728 | if (r) | ||
729 | pr_err("%s: Could not get lcd2_reset_gpio\n", __func__); | ||
730 | } | ||
731 | |||
732 | static struct omap_dss_hdmi_data sdp4430_hdmi_data = { | 712 | static struct omap_dss_hdmi_data sdp4430_hdmi_data = { |
733 | .hpd_gpio = HDMI_GPIO_HPD, | 713 | .hpd_gpio = HDMI_GPIO_HPD, |
734 | }; | 714 | }; |
@@ -814,7 +794,6 @@ static void __init omap_4430sdp_display_init(void) | |||
814 | if (r) | 794 | if (r) |
815 | pr_err("%s: Could not get display_sel GPIO\n", __func__); | 795 | pr_err("%s: Could not get display_sel GPIO\n", __func__); |
816 | 796 | ||
817 | sdp4430_lcd_init(); | ||
818 | sdp4430_picodlp_init(); | 797 | sdp4430_picodlp_init(); |
819 | omap_display_init(&sdp4430_dss_data); | 798 | omap_display_init(&sdp4430_dss_data); |
820 | /* | 799 | /* |
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c index 3645285a3e2..99790eb646e 100644 --- a/arch/arm/mach-omap2/board-am3517evm.c +++ b/arch/arm/mach-omap2/board-am3517evm.c | |||
@@ -37,7 +37,7 @@ | |||
37 | #include <plat/usb.h> | 37 | #include <plat/usb.h> |
38 | #include <video/omapdss.h> | 38 | #include <video/omapdss.h> |
39 | #include <video/omap-panel-generic-dpi.h> | 39 | #include <video/omap-panel-generic-dpi.h> |
40 | #include <video/omap-panel-dvi.h> | 40 | #include <video/omap-panel-tfp410.h> |
41 | 41 | ||
42 | #include "am35xx-emac.h" | 42 | #include "am35xx-emac.h" |
43 | #include "mux.h" | 43 | #include "mux.h" |
@@ -207,31 +207,14 @@ static struct omap_dss_device am3517_evm_tv_device = { | |||
207 | .platform_disable = am3517_evm_panel_disable_tv, | 207 | .platform_disable = am3517_evm_panel_disable_tv, |
208 | }; | 208 | }; |
209 | 209 | ||
210 | static int am3517_evm_panel_enable_dvi(struct omap_dss_device *dssdev) | 210 | static struct tfp410_platform_data dvi_panel = { |
211 | { | 211 | .power_down_gpio = -1, |
212 | if (lcd_enabled) { | ||
213 | printk(KERN_ERR "cannot enable DVI, LCD is enabled\n"); | ||
214 | return -EINVAL; | ||
215 | } | ||
216 | dvi_enabled = 1; | ||
217 | |||
218 | return 0; | ||
219 | } | ||
220 | |||
221 | static void am3517_evm_panel_disable_dvi(struct omap_dss_device *dssdev) | ||
222 | { | ||
223 | dvi_enabled = 0; | ||
224 | } | ||
225 | |||
226 | static struct panel_dvi_platform_data dvi_panel = { | ||
227 | .platform_enable = am3517_evm_panel_enable_dvi, | ||
228 | .platform_disable = am3517_evm_panel_disable_dvi, | ||
229 | }; | 212 | }; |
230 | 213 | ||
231 | static struct omap_dss_device am3517_evm_dvi_device = { | 214 | static struct omap_dss_device am3517_evm_dvi_device = { |
232 | .type = OMAP_DISPLAY_TYPE_DPI, | 215 | .type = OMAP_DISPLAY_TYPE_DPI, |
233 | .name = "dvi", | 216 | .name = "dvi", |
234 | .driver_name = "dvi", | 217 | .driver_name = "tfp410", |
235 | .data = &dvi_panel, | 218 | .data = &dvi_panel, |
236 | .phy.dpi.data_lines = 24, | 219 | .phy.dpi.data_lines = 24, |
237 | }; | 220 | }; |
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index 909a8b91b56..45746cb56c6 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c | |||
@@ -44,7 +44,7 @@ | |||
44 | #include <plat/usb.h> | 44 | #include <plat/usb.h> |
45 | #include <video/omapdss.h> | 45 | #include <video/omapdss.h> |
46 | #include <video/omap-panel-generic-dpi.h> | 46 | #include <video/omap-panel-generic-dpi.h> |
47 | #include <video/omap-panel-dvi.h> | 47 | #include <video/omap-panel-tfp410.h> |
48 | #include <plat/mcspi.h> | 48 | #include <plat/mcspi.h> |
49 | 49 | ||
50 | #include <mach/hardware.h> | 50 | #include <mach/hardware.h> |
@@ -218,25 +218,6 @@ static void cm_t35_panel_disable_lcd(struct omap_dss_device *dssdev) | |||
218 | gpio_set_value(CM_T35_LCD_EN_GPIO, 0); | 218 | gpio_set_value(CM_T35_LCD_EN_GPIO, 0); |
219 | } | 219 | } |
220 | 220 | ||
221 | static int cm_t35_panel_enable_dvi(struct omap_dss_device *dssdev) | ||
222 | { | ||
223 | if (lcd_enabled) { | ||
224 | printk(KERN_ERR "cannot enable DVI, LCD is enabled\n"); | ||
225 | return -EINVAL; | ||
226 | } | ||
227 | |||
228 | gpio_set_value(CM_T35_DVI_EN_GPIO, 0); | ||
229 | dvi_enabled = 1; | ||
230 | |||
231 | return 0; | ||
232 | } | ||
233 | |||
234 | static void cm_t35_panel_disable_dvi(struct omap_dss_device *dssdev) | ||
235 | { | ||
236 | gpio_set_value(CM_T35_DVI_EN_GPIO, 1); | ||
237 | dvi_enabled = 0; | ||
238 | } | ||
239 | |||
240 | static int cm_t35_panel_enable_tv(struct omap_dss_device *dssdev) | 221 | static int cm_t35_panel_enable_tv(struct omap_dss_device *dssdev) |
241 | { | 222 | { |
242 | return 0; | 223 | return 0; |
@@ -260,15 +241,14 @@ static struct omap_dss_device cm_t35_lcd_device = { | |||
260 | .phy.dpi.data_lines = 18, | 241 | .phy.dpi.data_lines = 18, |
261 | }; | 242 | }; |
262 | 243 | ||
263 | static struct panel_dvi_platform_data dvi_panel = { | 244 | static struct tfp410_platform_data dvi_panel = { |
264 | .platform_enable = cm_t35_panel_enable_dvi, | 245 | .power_down_gpio = CM_T35_DVI_EN_GPIO, |
265 | .platform_disable = cm_t35_panel_disable_dvi, | ||
266 | }; | 246 | }; |
267 | 247 | ||
268 | static struct omap_dss_device cm_t35_dvi_device = { | 248 | static struct omap_dss_device cm_t35_dvi_device = { |
269 | .name = "dvi", | 249 | .name = "dvi", |
270 | .type = OMAP_DISPLAY_TYPE_DPI, | 250 | .type = OMAP_DISPLAY_TYPE_DPI, |
271 | .driver_name = "dvi", | 251 | .driver_name = "tfp410", |
272 | .data = &dvi_panel, | 252 | .data = &dvi_panel, |
273 | .phy.dpi.data_lines = 24, | 253 | .phy.dpi.data_lines = 24, |
274 | }; | 254 | }; |
@@ -316,7 +296,6 @@ static struct spi_board_info cm_t35_lcd_spi_board_info[] __initdata = { | |||
316 | static struct gpio cm_t35_dss_gpios[] __initdata = { | 296 | static struct gpio cm_t35_dss_gpios[] __initdata = { |
317 | { CM_T35_LCD_EN_GPIO, GPIOF_OUT_INIT_LOW, "lcd enable" }, | 297 | { CM_T35_LCD_EN_GPIO, GPIOF_OUT_INIT_LOW, "lcd enable" }, |
318 | { CM_T35_LCD_BL_GPIO, GPIOF_OUT_INIT_LOW, "lcd bl enable" }, | 298 | { CM_T35_LCD_BL_GPIO, GPIOF_OUT_INIT_LOW, "lcd bl enable" }, |
319 | { CM_T35_DVI_EN_GPIO, GPIOF_OUT_INIT_HIGH, "dvi enable" }, | ||
320 | }; | 299 | }; |
321 | 300 | ||
322 | static void __init cm_t35_init_display(void) | 301 | static void __init cm_t35_init_display(void) |
@@ -335,7 +314,6 @@ static void __init cm_t35_init_display(void) | |||
335 | 314 | ||
336 | gpio_export(CM_T35_LCD_EN_GPIO, 0); | 315 | gpio_export(CM_T35_LCD_EN_GPIO, 0); |
337 | gpio_export(CM_T35_LCD_BL_GPIO, 0); | 316 | gpio_export(CM_T35_LCD_BL_GPIO, 0); |
338 | gpio_export(CM_T35_DVI_EN_GPIO, 0); | ||
339 | 317 | ||
340 | msleep(50); | 318 | msleep(50); |
341 | gpio_set_value(CM_T35_LCD_EN_GPIO, 1); | 319 | gpio_set_value(CM_T35_LCD_EN_GPIO, 1); |
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c index a2010f07de3..b063f0d2faa 100644 --- a/arch/arm/mach-omap2/board-devkit8000.c +++ b/arch/arm/mach-omap2/board-devkit8000.c | |||
@@ -47,7 +47,7 @@ | |||
47 | #include <plat/usb.h> | 47 | #include <plat/usb.h> |
48 | #include <video/omapdss.h> | 48 | #include <video/omapdss.h> |
49 | #include <video/omap-panel-generic-dpi.h> | 49 | #include <video/omap-panel-generic-dpi.h> |
50 | #include <video/omap-panel-dvi.h> | 50 | #include <video/omap-panel-tfp410.h> |
51 | 51 | ||
52 | #include <plat/mcspi.h> | 52 | #include <plat/mcspi.h> |
53 | #include <linux/input/matrix_keypad.h> | 53 | #include <linux/input/matrix_keypad.h> |
@@ -118,19 +118,6 @@ static void devkit8000_panel_disable_lcd(struct omap_dss_device *dssdev) | |||
118 | gpio_set_value_cansleep(dssdev->reset_gpio, 0); | 118 | gpio_set_value_cansleep(dssdev->reset_gpio, 0); |
119 | } | 119 | } |
120 | 120 | ||
121 | static int devkit8000_panel_enable_dvi(struct omap_dss_device *dssdev) | ||
122 | { | ||
123 | if (gpio_is_valid(dssdev->reset_gpio)) | ||
124 | gpio_set_value_cansleep(dssdev->reset_gpio, 1); | ||
125 | return 0; | ||
126 | } | ||
127 | |||
128 | static void devkit8000_panel_disable_dvi(struct omap_dss_device *dssdev) | ||
129 | { | ||
130 | if (gpio_is_valid(dssdev->reset_gpio)) | ||
131 | gpio_set_value_cansleep(dssdev->reset_gpio, 0); | ||
132 | } | ||
133 | |||
134 | static struct regulator_consumer_supply devkit8000_vmmc1_supply[] = { | 121 | static struct regulator_consumer_supply devkit8000_vmmc1_supply[] = { |
135 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), | 122 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), |
136 | }; | 123 | }; |
@@ -154,15 +141,14 @@ static struct omap_dss_device devkit8000_lcd_device = { | |||
154 | .phy.dpi.data_lines = 24, | 141 | .phy.dpi.data_lines = 24, |
155 | }; | 142 | }; |
156 | 143 | ||
157 | static struct panel_dvi_platform_data dvi_panel = { | 144 | static struct tfp410_platform_data dvi_panel = { |
158 | .platform_enable = devkit8000_panel_enable_dvi, | 145 | .power_down_gpio = -1, |
159 | .platform_disable = devkit8000_panel_disable_dvi, | ||
160 | }; | 146 | }; |
161 | 147 | ||
162 | static struct omap_dss_device devkit8000_dvi_device = { | 148 | static struct omap_dss_device devkit8000_dvi_device = { |
163 | .name = "dvi", | 149 | .name = "dvi", |
164 | .type = OMAP_DISPLAY_TYPE_DPI, | 150 | .type = OMAP_DISPLAY_TYPE_DPI, |
165 | .driver_name = "dvi", | 151 | .driver_name = "tfp410", |
166 | .data = &dvi_panel, | 152 | .data = &dvi_panel, |
167 | .phy.dpi.data_lines = 24, | 153 | .phy.dpi.data_lines = 24, |
168 | }; | 154 | }; |
@@ -244,13 +230,7 @@ static int devkit8000_twl_gpio_setup(struct device *dev, | |||
244 | } | 230 | } |
245 | 231 | ||
246 | /* gpio + 7 is "DVI_PD" (out, active low) */ | 232 | /* gpio + 7 is "DVI_PD" (out, active low) */ |
247 | devkit8000_dvi_device.reset_gpio = gpio + 7; | 233 | dvi_panel.power_down_gpio = gpio + 7; |
248 | ret = gpio_request_one(devkit8000_dvi_device.reset_gpio, | ||
249 | GPIOF_OUT_INIT_LOW, "DVI PowerDown"); | ||
250 | if (ret < 0) { | ||
251 | devkit8000_dvi_device.reset_gpio = -EINVAL; | ||
252 | printk(KERN_ERR "Failed to request GPIO for DVI PowerDown\n"); | ||
253 | } | ||
254 | 234 | ||
255 | return 0; | 235 | return 0; |
256 | } | 236 | } |
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c index 8f67861405b..4c1acecce93 100644 --- a/arch/arm/mach-omap2/board-igep0020.c +++ b/arch/arm/mach-omap2/board-igep0020.c | |||
@@ -32,7 +32,7 @@ | |||
32 | #include <plat/gpmc.h> | 32 | #include <plat/gpmc.h> |
33 | #include <plat/usb.h> | 33 | #include <plat/usb.h> |
34 | #include <video/omapdss.h> | 34 | #include <video/omapdss.h> |
35 | #include <video/omap-panel-dvi.h> | 35 | #include <video/omap-panel-tfp410.h> |
36 | #include <plat/onenand.h> | 36 | #include <plat/onenand.h> |
37 | 37 | ||
38 | #include "mux.h" | 38 | #include "mux.h" |
@@ -444,28 +444,15 @@ static struct twl4030_gpio_platform_data igep_twl4030_gpio_pdata = { | |||
444 | .setup = igep_twl_gpio_setup, | 444 | .setup = igep_twl_gpio_setup, |
445 | }; | 445 | }; |
446 | 446 | ||
447 | static int igep2_enable_dvi(struct omap_dss_device *dssdev) | 447 | static struct tfp410_platform_data dvi_panel = { |
448 | { | 448 | .i2c_bus_num = 3, |
449 | gpio_direction_output(IGEP2_GPIO_DVI_PUP, 1); | 449 | .power_down_gpio = IGEP2_GPIO_DVI_PUP, |
450 | |||
451 | return 0; | ||
452 | } | ||
453 | |||
454 | static void igep2_disable_dvi(struct omap_dss_device *dssdev) | ||
455 | { | ||
456 | gpio_direction_output(IGEP2_GPIO_DVI_PUP, 0); | ||
457 | } | ||
458 | |||
459 | static struct panel_dvi_platform_data dvi_panel = { | ||
460 | .platform_enable = igep2_enable_dvi, | ||
461 | .platform_disable = igep2_disable_dvi, | ||
462 | .i2c_bus_num = 3, | ||
463 | }; | 450 | }; |
464 | 451 | ||
465 | static struct omap_dss_device igep2_dvi_device = { | 452 | static struct omap_dss_device igep2_dvi_device = { |
466 | .type = OMAP_DISPLAY_TYPE_DPI, | 453 | .type = OMAP_DISPLAY_TYPE_DPI, |
467 | .name = "dvi", | 454 | .name = "dvi", |
468 | .driver_name = "dvi", | 455 | .driver_name = "tfp410", |
469 | .data = &dvi_panel, | 456 | .data = &dvi_panel, |
470 | .phy.dpi.data_lines = 24, | 457 | .phy.dpi.data_lines = 24, |
471 | }; | 458 | }; |
@@ -480,14 +467,6 @@ static struct omap_dss_board_info igep2_dss_data = { | |||
480 | .default_device = &igep2_dvi_device, | 467 | .default_device = &igep2_dvi_device, |
481 | }; | 468 | }; |
482 | 469 | ||
483 | static void __init igep2_display_init(void) | ||
484 | { | ||
485 | int err = gpio_request_one(IGEP2_GPIO_DVI_PUP, GPIOF_OUT_INIT_HIGH, | ||
486 | "GPIO_DVI_PUP"); | ||
487 | if (err) | ||
488 | pr_err("IGEP v2: Could not obtain gpio GPIO_DVI_PUP\n"); | ||
489 | } | ||
490 | |||
491 | static struct platform_device *igep_devices[] __initdata = { | 470 | static struct platform_device *igep_devices[] __initdata = { |
492 | &igep_vwlan_device, | 471 | &igep_vwlan_device, |
493 | }; | 472 | }; |
@@ -641,7 +620,7 @@ static struct regulator_consumer_supply dummy_supplies[] = { | |||
641 | 620 | ||
642 | static void __init igep_init(void) | 621 | static void __init igep_init(void) |
643 | { | 622 | { |
644 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | 623 | regulator_register_fixed(1, dummy_supplies, ARRAY_SIZE(dummy_supplies)); |
645 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | 624 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); |
646 | 625 | ||
647 | /* Get IGEP2 hardware revision */ | 626 | /* Get IGEP2 hardware revision */ |
@@ -668,7 +647,6 @@ static void __init igep_init(void) | |||
668 | 647 | ||
669 | if (machine_is_igep0020()) { | 648 | if (machine_is_igep0020()) { |
670 | omap_display_init(&igep2_dss_data); | 649 | omap_display_init(&igep2_dss_data); |
671 | igep2_display_init(); | ||
672 | igep2_init_smsc911x(); | 650 | igep2_init_smsc911x(); |
673 | usbhs_init(&igep2_usbhs_bdata); | 651 | usbhs_init(&igep2_usbhs_bdata); |
674 | } else { | 652 | } else { |
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 7be8d659d91..8ede8d20d7b 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c | |||
@@ -42,7 +42,7 @@ | |||
42 | #include <plat/board.h> | 42 | #include <plat/board.h> |
43 | #include "common.h" | 43 | #include "common.h" |
44 | #include <video/omapdss.h> | 44 | #include <video/omapdss.h> |
45 | #include <video/omap-panel-dvi.h> | 45 | #include <video/omap-panel-tfp410.h> |
46 | #include <plat/gpmc.h> | 46 | #include <plat/gpmc.h> |
47 | #include <plat/nand.h> | 47 | #include <plat/nand.h> |
48 | #include <plat/usb.h> | 48 | #include <plat/usb.h> |
@@ -189,33 +189,17 @@ static struct mtd_partition omap3beagle_nand_partitions[] = { | |||
189 | 189 | ||
190 | /* DSS */ | 190 | /* DSS */ |
191 | 191 | ||
192 | static int beagle_enable_dvi(struct omap_dss_device *dssdev) | 192 | static struct tfp410_platform_data dvi_panel = { |
193 | { | ||
194 | if (gpio_is_valid(dssdev->reset_gpio)) | ||
195 | gpio_set_value(dssdev->reset_gpio, 1); | ||
196 | |||
197 | return 0; | ||
198 | } | ||
199 | |||
200 | static void beagle_disable_dvi(struct omap_dss_device *dssdev) | ||
201 | { | ||
202 | if (gpio_is_valid(dssdev->reset_gpio)) | ||
203 | gpio_set_value(dssdev->reset_gpio, 0); | ||
204 | } | ||
205 | |||
206 | static struct panel_dvi_platform_data dvi_panel = { | ||
207 | .platform_enable = beagle_enable_dvi, | ||
208 | .platform_disable = beagle_disable_dvi, | ||
209 | .i2c_bus_num = 3, | 193 | .i2c_bus_num = 3, |
194 | .power_down_gpio = -1, | ||
210 | }; | 195 | }; |
211 | 196 | ||
212 | static struct omap_dss_device beagle_dvi_device = { | 197 | static struct omap_dss_device beagle_dvi_device = { |
213 | .type = OMAP_DISPLAY_TYPE_DPI, | 198 | .type = OMAP_DISPLAY_TYPE_DPI, |
214 | .name = "dvi", | 199 | .name = "dvi", |
215 | .driver_name = "dvi", | 200 | .driver_name = "tfp410", |
216 | .data = &dvi_panel, | 201 | .data = &dvi_panel, |
217 | .phy.dpi.data_lines = 24, | 202 | .phy.dpi.data_lines = 24, |
218 | .reset_gpio = -EINVAL, | ||
219 | }; | 203 | }; |
220 | 204 | ||
221 | static struct omap_dss_device beagle_tv_device = { | 205 | static struct omap_dss_device beagle_tv_device = { |
@@ -236,16 +220,6 @@ static struct omap_dss_board_info beagle_dss_data = { | |||
236 | .default_device = &beagle_dvi_device, | 220 | .default_device = &beagle_dvi_device, |
237 | }; | 221 | }; |
238 | 222 | ||
239 | static void __init beagle_display_init(void) | ||
240 | { | ||
241 | int r; | ||
242 | |||
243 | r = gpio_request_one(beagle_dvi_device.reset_gpio, GPIOF_OUT_INIT_LOW, | ||
244 | "DVI reset"); | ||
245 | if (r < 0) | ||
246 | printk(KERN_ERR "Unable to get DVI reset GPIO\n"); | ||
247 | } | ||
248 | |||
249 | #include "sdram-micron-mt46h32m32lf-6.h" | 223 | #include "sdram-micron-mt46h32m32lf-6.h" |
250 | 224 | ||
251 | static struct omap2_hsmmc_info mmc[] = { | 225 | static struct omap2_hsmmc_info mmc[] = { |
@@ -309,7 +283,7 @@ static int beagle_twl_gpio_setup(struct device *dev, | |||
309 | if (gpio_request_one(gpio + 1, GPIOF_IN, "EHCI_nOC")) | 283 | if (gpio_request_one(gpio + 1, GPIOF_IN, "EHCI_nOC")) |
310 | pr_err("%s: unable to configure EHCI_nOC\n", __func__); | 284 | pr_err("%s: unable to configure EHCI_nOC\n", __func__); |
311 | } | 285 | } |
312 | beagle_dvi_device.reset_gpio = beagle_config.reset_gpio; | 286 | dvi_panel.power_down_gpio = beagle_config.reset_gpio; |
313 | 287 | ||
314 | gpio_request_one(gpio + TWL4030_GPIO_MAX, beagle_config.usb_pwr_level, | 288 | gpio_request_one(gpio + TWL4030_GPIO_MAX, beagle_config.usb_pwr_level, |
315 | "nEN_USB_PWR"); | 289 | "nEN_USB_PWR"); |
@@ -552,7 +526,6 @@ static void __init omap3_beagle_init(void) | |||
552 | omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); | 526 | omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); |
553 | omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); | 527 | omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); |
554 | 528 | ||
555 | beagle_display_init(); | ||
556 | beagle_opp_init(); | 529 | beagle_opp_init(); |
557 | } | 530 | } |
558 | 531 | ||
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index 49df12735b4..ace3c675e9c 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c | |||
@@ -46,7 +46,7 @@ | |||
46 | #include "common.h" | 46 | #include "common.h" |
47 | #include <plat/mcspi.h> | 47 | #include <plat/mcspi.h> |
48 | #include <video/omapdss.h> | 48 | #include <video/omapdss.h> |
49 | #include <video/omap-panel-dvi.h> | 49 | #include <video/omap-panel-tfp410.h> |
50 | 50 | ||
51 | #include "mux.h" | 51 | #include "mux.h" |
52 | #include "sdram-micron-mt46h32m32lf-6.h" | 52 | #include "sdram-micron-mt46h32m32lf-6.h" |
@@ -219,35 +219,14 @@ static struct omap_dss_device omap3_evm_tv_device = { | |||
219 | .platform_disable = omap3_evm_disable_tv, | 219 | .platform_disable = omap3_evm_disable_tv, |
220 | }; | 220 | }; |
221 | 221 | ||
222 | static int omap3_evm_enable_dvi(struct omap_dss_device *dssdev) | 222 | static struct tfp410_platform_data dvi_panel = { |
223 | { | 223 | .power_down_gpio = OMAP3EVM_DVI_PANEL_EN_GPIO, |
224 | if (lcd_enabled) { | ||
225 | printk(KERN_ERR "cannot enable DVI, LCD is enabled\n"); | ||
226 | return -EINVAL; | ||
227 | } | ||
228 | |||
229 | gpio_set_value_cansleep(OMAP3EVM_DVI_PANEL_EN_GPIO, 1); | ||
230 | |||
231 | dvi_enabled = 1; | ||
232 | return 0; | ||
233 | } | ||
234 | |||
235 | static void omap3_evm_disable_dvi(struct omap_dss_device *dssdev) | ||
236 | { | ||
237 | gpio_set_value_cansleep(OMAP3EVM_DVI_PANEL_EN_GPIO, 0); | ||
238 | |||
239 | dvi_enabled = 0; | ||
240 | } | ||
241 | |||
242 | static struct panel_dvi_platform_data dvi_panel = { | ||
243 | .platform_enable = omap3_evm_enable_dvi, | ||
244 | .platform_disable = omap3_evm_disable_dvi, | ||
245 | }; | 224 | }; |
246 | 225 | ||
247 | static struct omap_dss_device omap3_evm_dvi_device = { | 226 | static struct omap_dss_device omap3_evm_dvi_device = { |
248 | .name = "dvi", | 227 | .name = "dvi", |
249 | .type = OMAP_DISPLAY_TYPE_DPI, | 228 | .type = OMAP_DISPLAY_TYPE_DPI, |
250 | .driver_name = "dvi", | 229 | .driver_name = "tfp410", |
251 | .data = &dvi_panel, | 230 | .data = &dvi_panel, |
252 | .phy.dpi.data_lines = 24, | 231 | .phy.dpi.data_lines = 24, |
253 | }; | 232 | }; |
@@ -630,13 +609,13 @@ static struct regulator_consumer_supply dummy_supplies[] = { | |||
630 | 609 | ||
631 | static void __init omap3_evm_init(void) | 610 | static void __init omap3_evm_init(void) |
632 | { | 611 | { |
612 | struct omap_board_mux *obm; | ||
613 | |||
633 | omap3_evm_get_revision(); | 614 | omap3_evm_get_revision(); |
634 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | 615 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); |
635 | 616 | ||
636 | if (cpu_is_omap3630()) | 617 | obm = (cpu_is_omap3630()) ? omap36x_board_mux : omap35x_board_mux; |
637 | omap3_mux_init(omap36x_board_mux, OMAP_PACKAGE_CBB); | 618 | omap3_mux_init(obm, OMAP_PACKAGE_CBB); |
638 | else | ||
639 | omap3_mux_init(omap35x_board_mux, OMAP_PACKAGE_CBB); | ||
640 | 619 | ||
641 | omap_board_config = omap3_evm_config; | 620 | omap_board_config = omap3_evm_config; |
642 | omap_board_config_size = ARRAY_SIZE(omap3_evm_config); | 621 | omap_board_config_size = ARRAY_SIZE(omap3_evm_config); |
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c index 4dffc95bddd..4396bae9167 100644 --- a/arch/arm/mach-omap2/board-omap3stalker.c +++ b/arch/arm/mach-omap2/board-omap3stalker.c | |||
@@ -42,7 +42,7 @@ | |||
42 | #include <plat/usb.h> | 42 | #include <plat/usb.h> |
43 | #include <video/omapdss.h> | 43 | #include <video/omapdss.h> |
44 | #include <video/omap-panel-generic-dpi.h> | 44 | #include <video/omap-panel-generic-dpi.h> |
45 | #include <video/omap-panel-dvi.h> | 45 | #include <video/omap-panel-tfp410.h> |
46 | 46 | ||
47 | #include <plat/mcspi.h> | 47 | #include <plat/mcspi.h> |
48 | #include <linux/input/matrix_keypad.h> | 48 | #include <linux/input/matrix_keypad.h> |
@@ -92,9 +92,6 @@ static inline void __init omap3stalker_init_eth(void) | |||
92 | #define LCD_PANEL_BKLIGHT_GPIO 210 | 92 | #define LCD_PANEL_BKLIGHT_GPIO 210 |
93 | #define ENABLE_VPLL2_DEV_GRP 0xE0 | 93 | #define ENABLE_VPLL2_DEV_GRP 0xE0 |
94 | 94 | ||
95 | static int lcd_enabled; | ||
96 | static int dvi_enabled; | ||
97 | |||
98 | static void __init omap3_stalker_display_init(void) | 95 | static void __init omap3_stalker_display_init(void) |
99 | { | 96 | { |
100 | return; | 97 | return; |
@@ -122,32 +119,14 @@ static struct omap_dss_device omap3_stalker_tv_device = { | |||
122 | .platform_disable = omap3_stalker_disable_tv, | 119 | .platform_disable = omap3_stalker_disable_tv, |
123 | }; | 120 | }; |
124 | 121 | ||
125 | static int omap3_stalker_enable_dvi(struct omap_dss_device *dssdev) | 122 | static struct tfp410_platform_data dvi_panel = { |
126 | { | 123 | .power_down_gpio = DSS_ENABLE_GPIO, |
127 | if (lcd_enabled) { | ||
128 | printk(KERN_ERR "cannot enable DVI, LCD is enabled\n"); | ||
129 | return -EINVAL; | ||
130 | } | ||
131 | gpio_set_value(DSS_ENABLE_GPIO, 1); | ||
132 | dvi_enabled = 1; | ||
133 | return 0; | ||
134 | } | ||
135 | |||
136 | static void omap3_stalker_disable_dvi(struct omap_dss_device *dssdev) | ||
137 | { | ||
138 | gpio_set_value(DSS_ENABLE_GPIO, 0); | ||
139 | dvi_enabled = 0; | ||
140 | } | ||
141 | |||
142 | static struct panel_dvi_platform_data dvi_panel = { | ||
143 | .platform_enable = omap3_stalker_enable_dvi, | ||
144 | .platform_disable = omap3_stalker_disable_dvi, | ||
145 | }; | 124 | }; |
146 | 125 | ||
147 | static struct omap_dss_device omap3_stalker_dvi_device = { | 126 | static struct omap_dss_device omap3_stalker_dvi_device = { |
148 | .name = "dvi", | 127 | .name = "dvi", |
149 | .type = OMAP_DISPLAY_TYPE_DPI, | 128 | .type = OMAP_DISPLAY_TYPE_DPI, |
150 | .driver_name = "dvi", | 129 | .driver_name = "tfp410", |
151 | .data = &dvi_panel, | 130 | .data = &dvi_panel, |
152 | .phy.dpi.data_lines = 24, | 131 | .phy.dpi.data_lines = 24, |
153 | }; | 132 | }; |
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index d53b07345f0..bb75eb091a8 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c | |||
@@ -42,7 +42,7 @@ | |||
42 | #include "common.h" | 42 | #include "common.h" |
43 | #include <plat/usb.h> | 43 | #include <plat/usb.h> |
44 | #include <plat/mmc.h> | 44 | #include <plat/mmc.h> |
45 | #include <video/omap-panel-dvi.h> | 45 | #include <video/omap-panel-tfp410.h> |
46 | 46 | ||
47 | #include "hsmmc.h" | 47 | #include "hsmmc.h" |
48 | #include "control.h" | 48 | #include "control.h" |
@@ -371,47 +371,22 @@ static struct omap_board_mux board_mux[] __initdata = { | |||
371 | /* Display DVI */ | 371 | /* Display DVI */ |
372 | #define PANDA_DVI_TFP410_POWER_DOWN_GPIO 0 | 372 | #define PANDA_DVI_TFP410_POWER_DOWN_GPIO 0 |
373 | 373 | ||
374 | static int omap4_panda_enable_dvi(struct omap_dss_device *dssdev) | ||
375 | { | ||
376 | gpio_set_value(dssdev->reset_gpio, 1); | ||
377 | return 0; | ||
378 | } | ||
379 | |||
380 | static void omap4_panda_disable_dvi(struct omap_dss_device *dssdev) | ||
381 | { | ||
382 | gpio_set_value(dssdev->reset_gpio, 0); | ||
383 | } | ||
384 | |||
385 | /* Using generic display panel */ | 374 | /* Using generic display panel */ |
386 | static struct panel_dvi_platform_data omap4_dvi_panel = { | 375 | static struct tfp410_platform_data omap4_dvi_panel = { |
387 | .platform_enable = omap4_panda_enable_dvi, | 376 | .i2c_bus_num = 3, |
388 | .platform_disable = omap4_panda_disable_dvi, | 377 | .power_down_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO, |
389 | .i2c_bus_num = 3, | ||
390 | }; | 378 | }; |
391 | 379 | ||
392 | static struct omap_dss_device omap4_panda_dvi_device = { | 380 | static struct omap_dss_device omap4_panda_dvi_device = { |
393 | .type = OMAP_DISPLAY_TYPE_DPI, | 381 | .type = OMAP_DISPLAY_TYPE_DPI, |
394 | .name = "dvi", | 382 | .name = "dvi", |
395 | .driver_name = "dvi", | 383 | .driver_name = "tfp410", |
396 | .data = &omap4_dvi_panel, | 384 | .data = &omap4_dvi_panel, |
397 | .phy.dpi.data_lines = 24, | 385 | .phy.dpi.data_lines = 24, |
398 | .reset_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO, | 386 | .reset_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO, |
399 | .channel = OMAP_DSS_CHANNEL_LCD2, | 387 | .channel = OMAP_DSS_CHANNEL_LCD2, |
400 | }; | 388 | }; |
401 | 389 | ||
402 | static int __init omap4_panda_dvi_init(void) | ||
403 | { | ||
404 | int r; | ||
405 | |||
406 | /* Requesting TFP410 DVI GPIO and disabling it, at bootup */ | ||
407 | r = gpio_request_one(omap4_panda_dvi_device.reset_gpio, | ||
408 | GPIOF_OUT_INIT_LOW, "DVI PD"); | ||
409 | if (r) | ||
410 | pr_err("Failed to get DVI powerdown GPIO\n"); | ||
411 | |||
412 | return r; | ||
413 | } | ||
414 | |||
415 | static struct gpio panda_hdmi_gpios[] = { | 390 | static struct gpio panda_hdmi_gpios[] = { |
416 | { HDMI_GPIO_CT_CP_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ct_cp_hpd" }, | 391 | { HDMI_GPIO_CT_CP_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ct_cp_hpd" }, |
417 | { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" }, | 392 | { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" }, |
@@ -462,11 +437,6 @@ static struct omap_dss_board_info omap4_panda_dss_data = { | |||
462 | 437 | ||
463 | static void __init omap4_panda_display_init(void) | 438 | static void __init omap4_panda_display_init(void) |
464 | { | 439 | { |
465 | int r; | ||
466 | |||
467 | r = omap4_panda_dvi_init(); | ||
468 | if (r) | ||
469 | pr_err("error initializing panda DVI\n"); | ||
470 | 440 | ||
471 | omap_display_init(&omap4_panda_dss_data); | 441 | omap_display_init(&omap4_panda_dss_data); |
472 | 442 | ||
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c index 33aa3910b09..5527c1979a1 100644 --- a/arch/arm/mach-omap2/board-overo.c +++ b/arch/arm/mach-omap2/board-overo.c | |||
@@ -46,7 +46,7 @@ | |||
46 | #include "common.h" | 46 | #include "common.h" |
47 | #include <video/omapdss.h> | 47 | #include <video/omapdss.h> |
48 | #include <video/omap-panel-generic-dpi.h> | 48 | #include <video/omap-panel-generic-dpi.h> |
49 | #include <video/omap-panel-dvi.h> | 49 | #include <video/omap-panel-tfp410.h> |
50 | #include <plat/gpmc.h> | 50 | #include <plat/gpmc.h> |
51 | #include <mach/hardware.h> | 51 | #include <mach/hardware.h> |
52 | #include <plat/nand.h> | 52 | #include <plat/nand.h> |
@@ -167,32 +167,15 @@ static void __init overo_display_init(void) | |||
167 | gpio_export(OVERO_GPIO_LCD_BL, 0); | 167 | gpio_export(OVERO_GPIO_LCD_BL, 0); |
168 | } | 168 | } |
169 | 169 | ||
170 | static int overo_panel_enable_dvi(struct omap_dss_device *dssdev) | 170 | static struct tfp410_platform_data dvi_panel = { |
171 | { | ||
172 | if (lcd_enabled) { | ||
173 | printk(KERN_ERR "cannot enable DVI, LCD is enabled\n"); | ||
174 | return -EINVAL; | ||
175 | } | ||
176 | dvi_enabled = 1; | ||
177 | |||
178 | return 0; | ||
179 | } | ||
180 | |||
181 | static void overo_panel_disable_dvi(struct omap_dss_device *dssdev) | ||
182 | { | ||
183 | dvi_enabled = 0; | ||
184 | } | ||
185 | |||
186 | static struct panel_dvi_platform_data dvi_panel = { | ||
187 | .platform_enable = overo_panel_enable_dvi, | ||
188 | .platform_disable = overo_panel_disable_dvi, | ||
189 | .i2c_bus_num = 3, | 171 | .i2c_bus_num = 3, |
172 | .power_down_gpio = -1, | ||
190 | }; | 173 | }; |
191 | 174 | ||
192 | static struct omap_dss_device overo_dvi_device = { | 175 | static struct omap_dss_device overo_dvi_device = { |
193 | .name = "dvi", | 176 | .name = "dvi", |
194 | .type = OMAP_DISPLAY_TYPE_DPI, | 177 | .type = OMAP_DISPLAY_TYPE_DPI, |
195 | .driver_name = "dvi", | 178 | .driver_name = "tfp410", |
196 | .data = &dvi_panel, | 179 | .data = &dvi_panel, |
197 | .phy.dpi.data_lines = 24, | 180 | .phy.dpi.data_lines = 24, |
198 | }; | 181 | }; |
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index d87ee061209..ae957c92081 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c | |||
@@ -872,11 +872,11 @@ static struct twl4030_power_data rx51_t2scripts_data __initdata = { | |||
872 | .resource_config = twl4030_rconfig, | 872 | .resource_config = twl4030_rconfig, |
873 | }; | 873 | }; |
874 | 874 | ||
875 | struct twl4030_vibra_data rx51_vibra_data __initdata = { | 875 | static struct twl4030_vibra_data rx51_vibra_data __initdata = { |
876 | .coexist = 0, | 876 | .coexist = 0, |
877 | }; | 877 | }; |
878 | 878 | ||
879 | struct twl4030_audio_data rx51_audio_data __initdata = { | 879 | static struct twl4030_audio_data rx51_audio_data __initdata = { |
880 | .audio_mclk = 26000000, | 880 | .audio_mclk = 26000000, |
881 | .vibra = &rx51_vibra_data, | 881 | .vibra = &rx51_vibra_data, |
882 | }; | 882 | }; |
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c index 27f01f051df..2da92a6ba40 100644 --- a/arch/arm/mach-omap2/board-rx51.c +++ b/arch/arm/mach-omap2/board-rx51.c | |||
@@ -59,25 +59,24 @@ static struct platform_device leds_gpio = { | |||
59 | }; | 59 | }; |
60 | 60 | ||
61 | /* | 61 | /* |
62 | * cpuidle C-states definition override from the default values. | 62 | * cpuidle C-states definition for rx51. |
63 | * The 'exit_latency' field is the sum of sleep and wake-up latencies. | 63 | * |
64 | */ | 64 | * The 'exit_latency' field is the sum of sleep |
65 | static struct cpuidle_params rx51_cpuidle_params[] = { | 65 | * and wake-up latencies. |
66 | /* C1 */ | 66 | |
67 | {110 + 162, 5 , 1}, | 67 | --------------------------------------------- |
68 | /* C2 */ | 68 | | state | exit_latency | target_residency | |
69 | {106 + 180, 309, 1}, | 69 | --------------------------------------------- |
70 | /* C3 */ | 70 | | C1 | 110 + 162 | 5 | |
71 | {107 + 410, 46057, 0}, | 71 | | C2 | 106 + 180 | 309 | |
72 | /* C4 */ | 72 | | C3 | 107 + 410 | 46057 | |
73 | {121 + 3374, 46057, 0}, | 73 | | C4 | 121 + 3374 | 46057 | |
74 | /* C5 */ | 74 | | C5 | 855 + 1146 | 46057 | |
75 | {855 + 1146, 46057, 1}, | 75 | | C6 | 7580 + 4134 | 484329 | |
76 | /* C6 */ | 76 | | C7 | 7505 + 15274 | 484329 | |
77 | {7580 + 4134, 484329, 0}, | 77 | --------------------------------------------- |
78 | /* C7 */ | 78 | |
79 | {7505 + 15274, 484329, 1}, | 79 | */ |
80 | }; | ||
81 | 80 | ||
82 | extern void __init rx51_peripherals_init(void); | 81 | extern void __init rx51_peripherals_init(void); |
83 | 82 | ||
@@ -98,7 +97,6 @@ static void __init rx51_init(void) | |||
98 | struct omap_sdrc_params *sdrc_params; | 97 | struct omap_sdrc_params *sdrc_params; |
99 | 98 | ||
100 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | 99 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); |
101 | omap3_pm_init_cpuidle(rx51_cpuidle_params); | ||
102 | omap_serial_init(); | 100 | omap_serial_init(); |
103 | 101 | ||
104 | sdrc_params = nokia_get_sdram_timings(); | 102 | sdrc_params = nokia_get_sdram_timings(); |
diff --git a/arch/arm/mach-omap2/board-zoom-display.c b/arch/arm/mach-omap2/board-zoom-display.c index a43a765dd09..28187f134ff 100644 --- a/arch/arm/mach-omap2/board-zoom-display.c +++ b/arch/arm/mach-omap2/board-zoom-display.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/spi/spi.h> | 16 | #include <linux/spi/spi.h> |
17 | #include <plat/mcspi.h> | 17 | #include <plat/mcspi.h> |
18 | #include <video/omapdss.h> | 18 | #include <video/omapdss.h> |
19 | #include <mach/board-zoom.h> | ||
19 | 20 | ||
20 | #define LCD_PANEL_RESET_GPIO_PROD 96 | 21 | #define LCD_PANEL_RESET_GPIO_PROD 96 |
21 | #define LCD_PANEL_RESET_GPIO_PILOT 55 | 22 | #define LCD_PANEL_RESET_GPIO_PILOT 55 |
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h index c09ca63b8ac..f14b3aec58c 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h | |||
@@ -135,8 +135,6 @@ void omap4_map_io(void); | |||
135 | void ti81xx_map_io(void); | 135 | void ti81xx_map_io(void); |
136 | void omap_barriers_init(void); | 136 | void omap_barriers_init(void); |
137 | 137 | ||
138 | extern void __init omap_init_consistent_dma_size(void); | ||
139 | |||
140 | /** | 138 | /** |
141 | * omap_test_timeout - busy-loop, testing a condition | 139 | * omap_test_timeout - busy-loop, testing a condition |
142 | * @cond: condition to test until it evaluates to true | 140 | * @cond: condition to test until it evaluates to true |
diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c index 535866489ce..207bc1c7759 100644 --- a/arch/arm/mach-omap2/cpuidle34xx.c +++ b/arch/arm/mach-omap2/cpuidle34xx.c | |||
@@ -38,40 +38,44 @@ | |||
38 | 38 | ||
39 | #ifdef CONFIG_CPU_IDLE | 39 | #ifdef CONFIG_CPU_IDLE |
40 | 40 | ||
41 | /* | ||
42 | * The latencies/thresholds for various C states have | ||
43 | * to be configured from the respective board files. | ||
44 | * These are some default values (which might not provide | ||
45 | * the best power savings) used on boards which do not | ||
46 | * pass these details from the board file. | ||
47 | */ | ||
48 | static struct cpuidle_params cpuidle_params_table[] = { | ||
49 | /* C1 */ | ||
50 | {2 + 2, 5, 1}, | ||
51 | /* C2 */ | ||
52 | {10 + 10, 30, 1}, | ||
53 | /* C3 */ | ||
54 | {50 + 50, 300, 1}, | ||
55 | /* C4 */ | ||
56 | {1500 + 1800, 4000, 1}, | ||
57 | /* C5 */ | ||
58 | {2500 + 7500, 12000, 1}, | ||
59 | /* C6 */ | ||
60 | {3000 + 8500, 15000, 1}, | ||
61 | /* C7 */ | ||
62 | {10000 + 30000, 300000, 1}, | ||
63 | }; | ||
64 | #define OMAP3_NUM_STATES ARRAY_SIZE(cpuidle_params_table) | ||
65 | |||
66 | /* Mach specific information to be recorded in the C-state driver_data */ | 41 | /* Mach specific information to be recorded in the C-state driver_data */ |
67 | struct omap3_idle_statedata { | 42 | struct omap3_idle_statedata { |
68 | u32 mpu_state; | 43 | u32 mpu_state; |
69 | u32 core_state; | 44 | u32 core_state; |
70 | u8 valid; | ||
71 | }; | 45 | }; |
72 | struct omap3_idle_statedata omap3_idle_data[OMAP3_NUM_STATES]; | ||
73 | 46 | ||
74 | struct powerdomain *mpu_pd, *core_pd, *per_pd, *cam_pd; | 47 | static struct omap3_idle_statedata omap3_idle_data[] = { |
48 | { | ||
49 | .mpu_state = PWRDM_POWER_ON, | ||
50 | .core_state = PWRDM_POWER_ON, | ||
51 | }, | ||
52 | { | ||
53 | .mpu_state = PWRDM_POWER_ON, | ||
54 | .core_state = PWRDM_POWER_ON, | ||
55 | }, | ||
56 | { | ||
57 | .mpu_state = PWRDM_POWER_RET, | ||
58 | .core_state = PWRDM_POWER_ON, | ||
59 | }, | ||
60 | { | ||
61 | .mpu_state = PWRDM_POWER_OFF, | ||
62 | .core_state = PWRDM_POWER_ON, | ||
63 | }, | ||
64 | { | ||
65 | .mpu_state = PWRDM_POWER_RET, | ||
66 | .core_state = PWRDM_POWER_RET, | ||
67 | }, | ||
68 | { | ||
69 | .mpu_state = PWRDM_POWER_OFF, | ||
70 | .core_state = PWRDM_POWER_RET, | ||
71 | }, | ||
72 | { | ||
73 | .mpu_state = PWRDM_POWER_OFF, | ||
74 | .core_state = PWRDM_POWER_OFF, | ||
75 | }, | ||
76 | }; | ||
77 | |||
78 | static struct powerdomain *mpu_pd, *core_pd, *per_pd, *cam_pd; | ||
75 | 79 | ||
76 | static int _cpuidle_allow_idle(struct powerdomain *pwrdm, | 80 | static int _cpuidle_allow_idle(struct powerdomain *pwrdm, |
77 | struct clockdomain *clkdm) | 81 | struct clockdomain *clkdm) |
@@ -91,8 +95,7 @@ static int __omap3_enter_idle(struct cpuidle_device *dev, | |||
91 | struct cpuidle_driver *drv, | 95 | struct cpuidle_driver *drv, |
92 | int index) | 96 | int index) |
93 | { | 97 | { |
94 | struct omap3_idle_statedata *cx = | 98 | struct omap3_idle_statedata *cx = &omap3_idle_data[index]; |
95 | cpuidle_get_statedata(&dev->states_usage[index]); | ||
96 | u32 mpu_state = cx->mpu_state, core_state = cx->core_state; | 99 | u32 mpu_state = cx->mpu_state, core_state = cx->core_state; |
97 | 100 | ||
98 | local_fiq_disable(); | 101 | local_fiq_disable(); |
@@ -169,14 +172,12 @@ static inline int omap3_enter_idle(struct cpuidle_device *dev, | |||
169 | * if it satisfies the enable_off_mode condition. | 172 | * if it satisfies the enable_off_mode condition. |
170 | */ | 173 | */ |
171 | static int next_valid_state(struct cpuidle_device *dev, | 174 | static int next_valid_state(struct cpuidle_device *dev, |
172 | struct cpuidle_driver *drv, | 175 | struct cpuidle_driver *drv, int index) |
173 | int index) | ||
174 | { | 176 | { |
175 | struct cpuidle_state_usage *curr_usage = &dev->states_usage[index]; | 177 | struct omap3_idle_statedata *cx = &omap3_idle_data[index]; |
176 | struct cpuidle_state *curr = &drv->states[index]; | ||
177 | struct omap3_idle_statedata *cx = cpuidle_get_statedata(curr_usage); | ||
178 | u32 mpu_deepest_state = PWRDM_POWER_RET; | 178 | u32 mpu_deepest_state = PWRDM_POWER_RET; |
179 | u32 core_deepest_state = PWRDM_POWER_RET; | 179 | u32 core_deepest_state = PWRDM_POWER_RET; |
180 | int idx; | ||
180 | int next_index = -1; | 181 | int next_index = -1; |
181 | 182 | ||
182 | if (enable_off_mode) { | 183 | if (enable_off_mode) { |
@@ -191,45 +192,29 @@ static int next_valid_state(struct cpuidle_device *dev, | |||
191 | } | 192 | } |
192 | 193 | ||
193 | /* Check if current state is valid */ | 194 | /* Check if current state is valid */ |
194 | if ((cx->valid) && | 195 | if ((cx->mpu_state >= mpu_deepest_state) && |
195 | (cx->mpu_state >= mpu_deepest_state) && | 196 | (cx->core_state >= core_deepest_state)) |
196 | (cx->core_state >= core_deepest_state)) { | ||
197 | return index; | 197 | return index; |
198 | } else { | ||
199 | int idx = OMAP3_NUM_STATES - 1; | ||
200 | |||
201 | /* Reach the current state starting at highest C-state */ | ||
202 | for (; idx >= 0; idx--) { | ||
203 | if (&drv->states[idx] == curr) { | ||
204 | next_index = idx; | ||
205 | break; | ||
206 | } | ||
207 | } | ||
208 | |||
209 | /* Should never hit this condition */ | ||
210 | WARN_ON(next_index == -1); | ||
211 | 198 | ||
212 | /* | 199 | /* |
213 | * Drop to next valid state. | 200 | * Drop to next valid state. |
214 | * Start search from the next (lower) state. | 201 | * Start search from the next (lower) state. |
215 | */ | 202 | */ |
216 | idx--; | 203 | for (idx = index - 1; idx >= 0; idx--) { |
217 | for (; idx >= 0; idx--) { | 204 | cx = &omap3_idle_data[idx]; |
218 | cx = cpuidle_get_statedata(&dev->states_usage[idx]); | 205 | if ((cx->mpu_state >= mpu_deepest_state) && |
219 | if ((cx->valid) && | 206 | (cx->core_state >= core_deepest_state)) { |
220 | (cx->mpu_state >= mpu_deepest_state) && | 207 | next_index = idx; |
221 | (cx->core_state >= core_deepest_state)) { | 208 | break; |
222 | next_index = idx; | ||
223 | break; | ||
224 | } | ||
225 | } | 209 | } |
226 | /* | ||
227 | * C1 is always valid. | ||
228 | * So, no need to check for 'next_index == -1' outside | ||
229 | * this loop. | ||
230 | */ | ||
231 | } | 210 | } |
232 | 211 | ||
212 | /* | ||
213 | * C1 is always valid. | ||
214 | * So, no need to check for 'next_index == -1' outside | ||
215 | * this loop. | ||
216 | */ | ||
217 | |||
233 | return next_index; | 218 | return next_index; |
234 | } | 219 | } |
235 | 220 | ||
@@ -273,7 +258,7 @@ static int omap3_enter_idle_bm(struct cpuidle_device *dev, | |||
273 | * Prevent PER off if CORE is not in retention or off as this | 258 | * Prevent PER off if CORE is not in retention or off as this |
274 | * would disable PER wakeups completely. | 259 | * would disable PER wakeups completely. |
275 | */ | 260 | */ |
276 | cx = cpuidle_get_statedata(&dev->states_usage[index]); | 261 | cx = &omap3_idle_data[index]; |
277 | core_next_state = cx->core_state; | 262 | core_next_state = cx->core_state; |
278 | per_next_state = per_saved_state = pwrdm_read_next_pwrst(per_pd); | 263 | per_next_state = per_saved_state = pwrdm_read_next_pwrst(per_pd); |
279 | if ((per_next_state == PWRDM_POWER_OFF) && | 264 | if ((per_next_state == PWRDM_POWER_OFF) && |
@@ -298,57 +283,71 @@ select_state: | |||
298 | 283 | ||
299 | DEFINE_PER_CPU(struct cpuidle_device, omap3_idle_dev); | 284 | DEFINE_PER_CPU(struct cpuidle_device, omap3_idle_dev); |
300 | 285 | ||
301 | void omap3_pm_init_cpuidle(struct cpuidle_params *cpuidle_board_params) | ||
302 | { | ||
303 | int i; | ||
304 | |||
305 | if (!cpuidle_board_params) | ||
306 | return; | ||
307 | |||
308 | for (i = 0; i < OMAP3_NUM_STATES; i++) { | ||
309 | cpuidle_params_table[i].valid = cpuidle_board_params[i].valid; | ||
310 | cpuidle_params_table[i].exit_latency = | ||
311 | cpuidle_board_params[i].exit_latency; | ||
312 | cpuidle_params_table[i].target_residency = | ||
313 | cpuidle_board_params[i].target_residency; | ||
314 | } | ||
315 | return; | ||
316 | } | ||
317 | |||
318 | struct cpuidle_driver omap3_idle_driver = { | 286 | struct cpuidle_driver omap3_idle_driver = { |
319 | .name = "omap3_idle", | 287 | .name = "omap3_idle", |
320 | .owner = THIS_MODULE, | 288 | .owner = THIS_MODULE, |
289 | .states = { | ||
290 | { | ||
291 | .enter = omap3_enter_idle, | ||
292 | .exit_latency = 2 + 2, | ||
293 | .target_residency = 5, | ||
294 | .flags = CPUIDLE_FLAG_TIME_VALID, | ||
295 | .name = "C1", | ||
296 | .desc = "MPU ON + CORE ON", | ||
297 | }, | ||
298 | { | ||
299 | .enter = omap3_enter_idle_bm, | ||
300 | .exit_latency = 10 + 10, | ||
301 | .target_residency = 30, | ||
302 | .flags = CPUIDLE_FLAG_TIME_VALID, | ||
303 | .name = "C2", | ||
304 | .desc = "MPU ON + CORE ON", | ||
305 | }, | ||
306 | { | ||
307 | .enter = omap3_enter_idle_bm, | ||
308 | .exit_latency = 50 + 50, | ||
309 | .target_residency = 300, | ||
310 | .flags = CPUIDLE_FLAG_TIME_VALID, | ||
311 | .name = "C3", | ||
312 | .desc = "MPU RET + CORE ON", | ||
313 | }, | ||
314 | { | ||
315 | .enter = omap3_enter_idle_bm, | ||
316 | .exit_latency = 1500 + 1800, | ||
317 | .target_residency = 4000, | ||
318 | .flags = CPUIDLE_FLAG_TIME_VALID, | ||
319 | .name = "C4", | ||
320 | .desc = "MPU OFF + CORE ON", | ||
321 | }, | ||
322 | { | ||
323 | .enter = omap3_enter_idle_bm, | ||
324 | .exit_latency = 2500 + 7500, | ||
325 | .target_residency = 12000, | ||
326 | .flags = CPUIDLE_FLAG_TIME_VALID, | ||
327 | .name = "C5", | ||
328 | .desc = "MPU RET + CORE RET", | ||
329 | }, | ||
330 | { | ||
331 | .enter = omap3_enter_idle_bm, | ||
332 | .exit_latency = 3000 + 8500, | ||
333 | .target_residency = 15000, | ||
334 | .flags = CPUIDLE_FLAG_TIME_VALID, | ||
335 | .name = "C6", | ||
336 | .desc = "MPU OFF + CORE RET", | ||
337 | }, | ||
338 | { | ||
339 | .enter = omap3_enter_idle_bm, | ||
340 | .exit_latency = 10000 + 30000, | ||
341 | .target_residency = 30000, | ||
342 | .flags = CPUIDLE_FLAG_TIME_VALID, | ||
343 | .name = "C7", | ||
344 | .desc = "MPU OFF + CORE OFF", | ||
345 | }, | ||
346 | }, | ||
347 | .state_count = ARRAY_SIZE(omap3_idle_data), | ||
348 | .safe_state_index = 0, | ||
321 | }; | 349 | }; |
322 | 350 | ||
323 | /* Helper to fill the C-state common data*/ | ||
324 | static inline void _fill_cstate(struct cpuidle_driver *drv, | ||
325 | int idx, const char *descr) | ||
326 | { | ||
327 | struct cpuidle_state *state = &drv->states[idx]; | ||
328 | |||
329 | state->exit_latency = cpuidle_params_table[idx].exit_latency; | ||
330 | state->target_residency = cpuidle_params_table[idx].target_residency; | ||
331 | state->flags = CPUIDLE_FLAG_TIME_VALID; | ||
332 | state->enter = omap3_enter_idle_bm; | ||
333 | sprintf(state->name, "C%d", idx + 1); | ||
334 | strncpy(state->desc, descr, CPUIDLE_DESC_LEN); | ||
335 | |||
336 | } | ||
337 | |||
338 | /* Helper to register the driver_data */ | ||
339 | static inline struct omap3_idle_statedata *_fill_cstate_usage( | ||
340 | struct cpuidle_device *dev, | ||
341 | int idx) | ||
342 | { | ||
343 | struct omap3_idle_statedata *cx = &omap3_idle_data[idx]; | ||
344 | struct cpuidle_state_usage *state_usage = &dev->states_usage[idx]; | ||
345 | |||
346 | cx->valid = cpuidle_params_table[idx].valid; | ||
347 | cpuidle_set_statedata(state_usage, cx); | ||
348 | |||
349 | return cx; | ||
350 | } | ||
351 | |||
352 | /** | 351 | /** |
353 | * omap3_idle_init - Init routine for OMAP3 idle | 352 | * omap3_idle_init - Init routine for OMAP3 idle |
354 | * | 353 | * |
@@ -358,77 +357,20 @@ static inline struct omap3_idle_statedata *_fill_cstate_usage( | |||
358 | int __init omap3_idle_init(void) | 357 | int __init omap3_idle_init(void) |
359 | { | 358 | { |
360 | struct cpuidle_device *dev; | 359 | struct cpuidle_device *dev; |
361 | struct cpuidle_driver *drv = &omap3_idle_driver; | ||
362 | struct omap3_idle_statedata *cx; | ||
363 | 360 | ||
364 | mpu_pd = pwrdm_lookup("mpu_pwrdm"); | 361 | mpu_pd = pwrdm_lookup("mpu_pwrdm"); |
365 | core_pd = pwrdm_lookup("core_pwrdm"); | 362 | core_pd = pwrdm_lookup("core_pwrdm"); |
366 | per_pd = pwrdm_lookup("per_pwrdm"); | 363 | per_pd = pwrdm_lookup("per_pwrdm"); |
367 | cam_pd = pwrdm_lookup("cam_pwrdm"); | 364 | cam_pd = pwrdm_lookup("cam_pwrdm"); |
368 | 365 | ||
366 | if (!mpu_pd || !core_pd || !per_pd || !cam_pd) | ||
367 | return -ENODEV; | ||
369 | 368 | ||
370 | drv->safe_state_index = -1; | ||
371 | dev = &per_cpu(omap3_idle_dev, smp_processor_id()); | ||
372 | |||
373 | /* C1 . MPU WFI + Core active */ | ||
374 | _fill_cstate(drv, 0, "MPU ON + CORE ON"); | ||
375 | (&drv->states[0])->enter = omap3_enter_idle; | ||
376 | drv->safe_state_index = 0; | ||
377 | cx = _fill_cstate_usage(dev, 0); | ||
378 | cx->valid = 1; /* C1 is always valid */ | ||
379 | cx->mpu_state = PWRDM_POWER_ON; | ||
380 | cx->core_state = PWRDM_POWER_ON; | ||
381 | |||
382 | /* C2 . MPU WFI + Core inactive */ | ||
383 | _fill_cstate(drv, 1, "MPU ON + CORE ON"); | ||
384 | cx = _fill_cstate_usage(dev, 1); | ||
385 | cx->mpu_state = PWRDM_POWER_ON; | ||
386 | cx->core_state = PWRDM_POWER_ON; | ||
387 | |||
388 | /* C3 . MPU CSWR + Core inactive */ | ||
389 | _fill_cstate(drv, 2, "MPU RET + CORE ON"); | ||
390 | cx = _fill_cstate_usage(dev, 2); | ||
391 | cx->mpu_state = PWRDM_POWER_RET; | ||
392 | cx->core_state = PWRDM_POWER_ON; | ||
393 | |||
394 | /* C4 . MPU OFF + Core inactive */ | ||
395 | _fill_cstate(drv, 3, "MPU OFF + CORE ON"); | ||
396 | cx = _fill_cstate_usage(dev, 3); | ||
397 | cx->mpu_state = PWRDM_POWER_OFF; | ||
398 | cx->core_state = PWRDM_POWER_ON; | ||
399 | |||
400 | /* C5 . MPU RET + Core RET */ | ||
401 | _fill_cstate(drv, 4, "MPU RET + CORE RET"); | ||
402 | cx = _fill_cstate_usage(dev, 4); | ||
403 | cx->mpu_state = PWRDM_POWER_RET; | ||
404 | cx->core_state = PWRDM_POWER_RET; | ||
405 | |||
406 | /* C6 . MPU OFF + Core RET */ | ||
407 | _fill_cstate(drv, 5, "MPU OFF + CORE RET"); | ||
408 | cx = _fill_cstate_usage(dev, 5); | ||
409 | cx->mpu_state = PWRDM_POWER_OFF; | ||
410 | cx->core_state = PWRDM_POWER_RET; | ||
411 | |||
412 | /* C7 . MPU OFF + Core OFF */ | ||
413 | _fill_cstate(drv, 6, "MPU OFF + CORE OFF"); | ||
414 | cx = _fill_cstate_usage(dev, 6); | ||
415 | /* | ||
416 | * Erratum i583: implementation for ES rev < Es1.2 on 3630. We cannot | ||
417 | * enable OFF mode in a stable form for previous revisions. | ||
418 | * We disable C7 state as a result. | ||
419 | */ | ||
420 | if (IS_PM34XX_ERRATUM(PM_SDRC_WAKEUP_ERRATUM_i583)) { | ||
421 | cx->valid = 0; | ||
422 | pr_warn("%s: core off state C7 disabled due to i583\n", | ||
423 | __func__); | ||
424 | } | ||
425 | cx->mpu_state = PWRDM_POWER_OFF; | ||
426 | cx->core_state = PWRDM_POWER_OFF; | ||
427 | |||
428 | drv->state_count = OMAP3_NUM_STATES; | ||
429 | cpuidle_register_driver(&omap3_idle_driver); | 369 | cpuidle_register_driver(&omap3_idle_driver); |
430 | 370 | ||
431 | dev->state_count = OMAP3_NUM_STATES; | 371 | dev = &per_cpu(omap3_idle_dev, smp_processor_id()); |
372 | dev->cpu = 0; | ||
373 | |||
432 | if (cpuidle_register_device(dev)) { | 374 | if (cpuidle_register_device(dev)) { |
433 | printk(KERN_ERR "%s: CPUidle register device failed\n", | 375 | printk(KERN_ERR "%s: CPUidle register device failed\n", |
434 | __func__); | 376 | __func__); |
diff --git a/arch/arm/mach-omap2/cpuidle44xx.c b/arch/arm/mach-omap2/cpuidle44xx.c index f386cbe9c88..be1617ca84b 100644 --- a/arch/arm/mach-omap2/cpuidle44xx.c +++ b/arch/arm/mach-omap2/cpuidle44xx.c | |||
@@ -24,26 +24,31 @@ | |||
24 | 24 | ||
25 | #ifdef CONFIG_CPU_IDLE | 25 | #ifdef CONFIG_CPU_IDLE |
26 | 26 | ||
27 | /* Machine specific information to be recorded in the C-state driver_data */ | 27 | /* Machine specific information */ |
28 | struct omap4_idle_statedata { | 28 | struct omap4_idle_statedata { |
29 | u32 cpu_state; | 29 | u32 cpu_state; |
30 | u32 mpu_logic_state; | 30 | u32 mpu_logic_state; |
31 | u32 mpu_state; | 31 | u32 mpu_state; |
32 | u8 valid; | ||
33 | }; | 32 | }; |
34 | 33 | ||
35 | static struct cpuidle_params cpuidle_params_table[] = { | 34 | static struct omap4_idle_statedata omap4_idle_data[] = { |
36 | /* C1 - CPU0 ON + CPU1 ON + MPU ON */ | 35 | { |
37 | {.exit_latency = 2 + 2 , .target_residency = 5, .valid = 1}, | 36 | .cpu_state = PWRDM_POWER_ON, |
38 | /* C2- CPU0 OFF + CPU1 OFF + MPU CSWR */ | 37 | .mpu_state = PWRDM_POWER_ON, |
39 | {.exit_latency = 328 + 440 , .target_residency = 960, .valid = 1}, | 38 | .mpu_logic_state = PWRDM_POWER_RET, |
40 | /* C3 - CPU0 OFF + CPU1 OFF + MPU OSWR */ | 39 | }, |
41 | {.exit_latency = 460 + 518 , .target_residency = 1100, .valid = 1}, | 40 | { |
41 | .cpu_state = PWRDM_POWER_OFF, | ||
42 | .mpu_state = PWRDM_POWER_RET, | ||
43 | .mpu_logic_state = PWRDM_POWER_RET, | ||
44 | }, | ||
45 | { | ||
46 | .cpu_state = PWRDM_POWER_OFF, | ||
47 | .mpu_state = PWRDM_POWER_RET, | ||
48 | .mpu_logic_state = PWRDM_POWER_OFF, | ||
49 | }, | ||
42 | }; | 50 | }; |
43 | 51 | ||
44 | #define OMAP4_NUM_STATES ARRAY_SIZE(cpuidle_params_table) | ||
45 | |||
46 | struct omap4_idle_statedata omap4_idle_data[OMAP4_NUM_STATES]; | ||
47 | static struct powerdomain *mpu_pd, *cpu0_pd, *cpu1_pd; | 52 | static struct powerdomain *mpu_pd, *cpu0_pd, *cpu1_pd; |
48 | 53 | ||
49 | /** | 54 | /** |
@@ -60,8 +65,7 @@ static int omap4_enter_idle(struct cpuidle_device *dev, | |||
60 | struct cpuidle_driver *drv, | 65 | struct cpuidle_driver *drv, |
61 | int index) | 66 | int index) |
62 | { | 67 | { |
63 | struct omap4_idle_statedata *cx = | 68 | struct omap4_idle_statedata *cx = &omap4_idle_data[index]; |
64 | cpuidle_get_statedata(&dev->states_usage[index]); | ||
65 | u32 cpu1_state; | 69 | u32 cpu1_state; |
66 | int cpu_id = smp_processor_id(); | 70 | int cpu_id = smp_processor_id(); |
67 | 71 | ||
@@ -78,7 +82,7 @@ static int omap4_enter_idle(struct cpuidle_device *dev, | |||
78 | cpu1_state = pwrdm_read_pwrst(cpu1_pd); | 82 | cpu1_state = pwrdm_read_pwrst(cpu1_pd); |
79 | if (cpu1_state != PWRDM_POWER_OFF) { | 83 | if (cpu1_state != PWRDM_POWER_OFF) { |
80 | index = drv->safe_state_index; | 84 | index = drv->safe_state_index; |
81 | cx = cpuidle_get_statedata(&dev->states_usage[index]); | 85 | cx = &omap4_idle_data[index]; |
82 | } | 86 | } |
83 | 87 | ||
84 | if (index > 0) | 88 | if (index > 0) |
@@ -133,36 +137,39 @@ struct cpuidle_driver omap4_idle_driver = { | |||
133 | .name = "omap4_idle", | 137 | .name = "omap4_idle", |
134 | .owner = THIS_MODULE, | 138 | .owner = THIS_MODULE, |
135 | .en_core_tk_irqen = 1, | 139 | .en_core_tk_irqen = 1, |
140 | .states = { | ||
141 | { | ||
142 | /* C1 - CPU0 ON + CPU1 ON + MPU ON */ | ||
143 | .exit_latency = 2 + 2, | ||
144 | .target_residency = 5, | ||
145 | .flags = CPUIDLE_FLAG_TIME_VALID, | ||
146 | .enter = omap4_enter_idle, | ||
147 | .name = "C1", | ||
148 | .desc = "MPUSS ON" | ||
149 | }, | ||
150 | { | ||
151 | /* C2 - CPU0 OFF + CPU1 OFF + MPU CSWR */ | ||
152 | .exit_latency = 328 + 440, | ||
153 | .target_residency = 960, | ||
154 | .flags = CPUIDLE_FLAG_TIME_VALID, | ||
155 | .enter = omap4_enter_idle, | ||
156 | .name = "C2", | ||
157 | .desc = "MPUSS CSWR", | ||
158 | }, | ||
159 | { | ||
160 | /* C3 - CPU0 OFF + CPU1 OFF + MPU OSWR */ | ||
161 | .exit_latency = 460 + 518, | ||
162 | .target_residency = 1100, | ||
163 | .flags = CPUIDLE_FLAG_TIME_VALID, | ||
164 | .enter = omap4_enter_idle, | ||
165 | .name = "C3", | ||
166 | .desc = "MPUSS OSWR", | ||
167 | }, | ||
168 | }, | ||
169 | .state_count = ARRAY_SIZE(omap4_idle_data), | ||
170 | .safe_state_index = 0, | ||
136 | }; | 171 | }; |
137 | 172 | ||
138 | static inline void _fill_cstate(struct cpuidle_driver *drv, | ||
139 | int idx, const char *descr) | ||
140 | { | ||
141 | struct cpuidle_state *state = &drv->states[idx]; | ||
142 | |||
143 | state->exit_latency = cpuidle_params_table[idx].exit_latency; | ||
144 | state->target_residency = cpuidle_params_table[idx].target_residency; | ||
145 | state->flags = CPUIDLE_FLAG_TIME_VALID; | ||
146 | state->enter = omap4_enter_idle; | ||
147 | sprintf(state->name, "C%d", idx + 1); | ||
148 | strncpy(state->desc, descr, CPUIDLE_DESC_LEN); | ||
149 | } | ||
150 | |||
151 | static inline struct omap4_idle_statedata *_fill_cstate_usage( | ||
152 | struct cpuidle_device *dev, | ||
153 | int idx) | ||
154 | { | ||
155 | struct omap4_idle_statedata *cx = &omap4_idle_data[idx]; | ||
156 | struct cpuidle_state_usage *state_usage = &dev->states_usage[idx]; | ||
157 | |||
158 | cx->valid = cpuidle_params_table[idx].valid; | ||
159 | cpuidle_set_statedata(state_usage, cx); | ||
160 | |||
161 | return cx; | ||
162 | } | ||
163 | |||
164 | |||
165 | |||
166 | /** | 173 | /** |
167 | * omap4_idle_init - Init routine for OMAP4 idle | 174 | * omap4_idle_init - Init routine for OMAP4 idle |
168 | * | 175 | * |
@@ -171,9 +178,7 @@ static inline struct omap4_idle_statedata *_fill_cstate_usage( | |||
171 | */ | 178 | */ |
172 | int __init omap4_idle_init(void) | 179 | int __init omap4_idle_init(void) |
173 | { | 180 | { |
174 | struct omap4_idle_statedata *cx; | ||
175 | struct cpuidle_device *dev; | 181 | struct cpuidle_device *dev; |
176 | struct cpuidle_driver *drv = &omap4_idle_driver; | ||
177 | unsigned int cpu_id = 0; | 182 | unsigned int cpu_id = 0; |
178 | 183 | ||
179 | mpu_pd = pwrdm_lookup("mpu_pwrdm"); | 184 | mpu_pd = pwrdm_lookup("mpu_pwrdm"); |
@@ -182,42 +187,15 @@ int __init omap4_idle_init(void) | |||
182 | if ((!mpu_pd) || (!cpu0_pd) || (!cpu1_pd)) | 187 | if ((!mpu_pd) || (!cpu0_pd) || (!cpu1_pd)) |
183 | return -ENODEV; | 188 | return -ENODEV; |
184 | 189 | ||
185 | |||
186 | drv->safe_state_index = -1; | ||
187 | dev = &per_cpu(omap4_idle_dev, cpu_id); | 190 | dev = &per_cpu(omap4_idle_dev, cpu_id); |
188 | dev->cpu = cpu_id; | 191 | dev->cpu = cpu_id; |
189 | 192 | ||
190 | /* C1 - CPU0 ON + CPU1 ON + MPU ON */ | ||
191 | _fill_cstate(drv, 0, "MPUSS ON"); | ||
192 | drv->safe_state_index = 0; | ||
193 | cx = _fill_cstate_usage(dev, 0); | ||
194 | cx->valid = 1; /* C1 is always valid */ | ||
195 | cx->cpu_state = PWRDM_POWER_ON; | ||
196 | cx->mpu_state = PWRDM_POWER_ON; | ||
197 | cx->mpu_logic_state = PWRDM_POWER_RET; | ||
198 | |||
199 | /* C2 - CPU0 OFF + CPU1 OFF + MPU CSWR */ | ||
200 | _fill_cstate(drv, 1, "MPUSS CSWR"); | ||
201 | cx = _fill_cstate_usage(dev, 1); | ||
202 | cx->cpu_state = PWRDM_POWER_OFF; | ||
203 | cx->mpu_state = PWRDM_POWER_RET; | ||
204 | cx->mpu_logic_state = PWRDM_POWER_RET; | ||
205 | |||
206 | /* C3 - CPU0 OFF + CPU1 OFF + MPU OSWR */ | ||
207 | _fill_cstate(drv, 2, "MPUSS OSWR"); | ||
208 | cx = _fill_cstate_usage(dev, 2); | ||
209 | cx->cpu_state = PWRDM_POWER_OFF; | ||
210 | cx->mpu_state = PWRDM_POWER_RET; | ||
211 | cx->mpu_logic_state = PWRDM_POWER_OFF; | ||
212 | |||
213 | drv->state_count = OMAP4_NUM_STATES; | ||
214 | cpuidle_register_driver(&omap4_idle_driver); | 193 | cpuidle_register_driver(&omap4_idle_driver); |
215 | 194 | ||
216 | dev->state_count = OMAP4_NUM_STATES; | ||
217 | if (cpuidle_register_device(dev)) { | 195 | if (cpuidle_register_device(dev)) { |
218 | pr_err("%s: CPUidle register device failed\n", __func__); | 196 | pr_err("%s: CPUidle register device failed\n", __func__); |
219 | return -EIO; | 197 | return -EIO; |
220 | } | 198 | } |
221 | 199 | ||
222 | return 0; | 200 | return 0; |
223 | } | 201 | } |
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index e4336035c0e..f3953a49928 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
@@ -42,7 +42,6 @@ | |||
42 | 42 | ||
43 | static int __init omap3_l3_init(void) | 43 | static int __init omap3_l3_init(void) |
44 | { | 44 | { |
45 | int l; | ||
46 | struct omap_hwmod *oh; | 45 | struct omap_hwmod *oh; |
47 | struct platform_device *pdev; | 46 | struct platform_device *pdev; |
48 | char oh_name[L3_MODULES_MAX_LEN]; | 47 | char oh_name[L3_MODULES_MAX_LEN]; |
@@ -54,7 +53,7 @@ static int __init omap3_l3_init(void) | |||
54 | if (!(cpu_is_omap34xx())) | 53 | if (!(cpu_is_omap34xx())) |
55 | return -ENODEV; | 54 | return -ENODEV; |
56 | 55 | ||
57 | l = snprintf(oh_name, L3_MODULES_MAX_LEN, "l3_main"); | 56 | snprintf(oh_name, L3_MODULES_MAX_LEN, "l3_main"); |
58 | 57 | ||
59 | oh = omap_hwmod_lookup(oh_name); | 58 | oh = omap_hwmod_lookup(oh_name); |
60 | 59 | ||
@@ -72,7 +71,7 @@ postcore_initcall(omap3_l3_init); | |||
72 | 71 | ||
73 | static int __init omap4_l3_init(void) | 72 | static int __init omap4_l3_init(void) |
74 | { | 73 | { |
75 | int l, i; | 74 | int i; |
76 | struct omap_hwmod *oh[3]; | 75 | struct omap_hwmod *oh[3]; |
77 | struct platform_device *pdev; | 76 | struct platform_device *pdev; |
78 | char oh_name[L3_MODULES_MAX_LEN]; | 77 | char oh_name[L3_MODULES_MAX_LEN]; |
@@ -89,7 +88,7 @@ static int __init omap4_l3_init(void) | |||
89 | return -ENODEV; | 88 | return -ENODEV; |
90 | 89 | ||
91 | for (i = 0; i < L3_MODULES; i++) { | 90 | for (i = 0; i < L3_MODULES; i++) { |
92 | l = snprintf(oh_name, L3_MODULES_MAX_LEN, "l3_main_%d", i+1); | 91 | snprintf(oh_name, L3_MODULES_MAX_LEN, "l3_main_%d", i+1); |
93 | 92 | ||
94 | oh[i] = omap_hwmod_lookup(oh_name); | 93 | oh[i] = omap_hwmod_lookup(oh_name); |
95 | if (!(oh[i])) | 94 | if (!(oh[i])) |
diff --git a/arch/arm/mach-omap2/gpio.c b/arch/arm/mach-omap2/gpio.c index 2f994e5194e..064cab03d2b 100644 --- a/arch/arm/mach-omap2/gpio.c +++ b/arch/arm/mach-omap2/gpio.c | |||
@@ -58,7 +58,7 @@ static int __init omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused) | |||
58 | pdata->virtual_irq_start = IH_GPIO_BASE + 32 * (id - 1); | 58 | pdata->virtual_irq_start = IH_GPIO_BASE + 32 * (id - 1); |
59 | pdata->get_context_loss_count = omap_pm_get_dev_context_loss_count; | 59 | pdata->get_context_loss_count = omap_pm_get_dev_context_loss_count; |
60 | pdata->regs = kzalloc(sizeof(struct omap_gpio_reg_offs), GFP_KERNEL); | 60 | pdata->regs = kzalloc(sizeof(struct omap_gpio_reg_offs), GFP_KERNEL); |
61 | if (!pdata) { | 61 | if (!pdata->regs) { |
62 | pr_err("gpio%d: Memory allocation failed\n", id); | 62 | pr_err("gpio%d: Memory allocation failed\n", id); |
63 | return -ENOMEM; | 63 | return -ENOMEM; |
64 | } | 64 | } |
diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c index 385b3e02c4a..a0fa9bb2bda 100644 --- a/arch/arm/mach-omap2/gpmc-onenand.c +++ b/arch/arm/mach-omap2/gpmc-onenand.c | |||
@@ -176,7 +176,7 @@ static int omap2_onenand_set_sync_mode(struct omap_onenand_platform_data *cfg, | |||
176 | const int t_wpl = 40; | 176 | const int t_wpl = 40; |
177 | const int t_wph = 30; | 177 | const int t_wph = 30; |
178 | int min_gpmc_clk_period, t_ces, t_avds, t_avdh, t_ach, t_aavdh, t_rdyo; | 178 | int min_gpmc_clk_period, t_ces, t_avds, t_avdh, t_ach, t_aavdh, t_rdyo; |
179 | int tick_ns, div, fclk_offset_ns, fclk_offset, gpmc_clk_ns, latency; | 179 | int div, fclk_offset_ns, fclk_offset, gpmc_clk_ns, latency; |
180 | int first_time = 0, hf = 0, vhf = 0, sync_read = 0, sync_write = 0; | 180 | int first_time = 0, hf = 0, vhf = 0, sync_read = 0, sync_write = 0; |
181 | int err, ticks_cez; | 181 | int err, ticks_cez; |
182 | int cs = cfg->cs, freq = *freq_ptr; | 182 | int cs = cfg->cs, freq = *freq_ptr; |
@@ -240,7 +240,6 @@ static int omap2_onenand_set_sync_mode(struct omap_onenand_platform_data *cfg, | |||
240 | break; | 240 | break; |
241 | } | 241 | } |
242 | 242 | ||
243 | tick_ns = gpmc_ticks_to_ns(1); | ||
244 | div = gpmc_cs_calc_divider(cs, min_gpmc_clk_period); | 243 | div = gpmc_cs_calc_divider(cs, min_gpmc_clk_period); |
245 | gpmc_clk_ns = gpmc_ticks_to_ns(div); | 244 | gpmc_clk_ns = gpmc_ticks_to_ns(div); |
246 | if (gpmc_clk_ns < 15) /* >66Mhz */ | 245 | if (gpmc_clk_ns < 15) /* >66Mhz */ |
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index 00d510858e2..580e684e882 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c | |||
@@ -755,8 +755,7 @@ static int __init gpmc_init(void) | |||
755 | irq++; | 755 | irq++; |
756 | } | 756 | } |
757 | 757 | ||
758 | ret = request_irq(gpmc_irq, | 758 | ret = request_irq(gpmc_irq, gpmc_handle_irq, IRQF_SHARED, "gpmc", NULL); |
759 | gpmc_handle_irq, IRQF_SHARED, "gpmc", gpmc_base); | ||
760 | if (ret) | 759 | if (ret) |
761 | pr_err("gpmc: irq-%d could not claim: err %d\n", | 760 | pr_err("gpmc: irq-%d could not claim: err %d\n", |
762 | gpmc_irq, ret); | 761 | gpmc_irq, ret); |
diff --git a/arch/arm/mach-omap2/hwspinlock.c b/arch/arm/mach-omap2/hwspinlock.c index 454dfce125c..8763c8520dc 100644 --- a/arch/arm/mach-omap2/hwspinlock.c +++ b/arch/arm/mach-omap2/hwspinlock.c | |||
@@ -28,7 +28,7 @@ static struct hwspinlock_pdata omap_hwspinlock_pdata __initdata = { | |||
28 | .base_id = 0, | 28 | .base_id = 0, |
29 | }; | 29 | }; |
30 | 30 | ||
31 | int __init hwspinlocks_init(void) | 31 | static int __init hwspinlocks_init(void) |
32 | { | 32 | { |
33 | int retval = 0; | 33 | int retval = 0; |
34 | struct omap_hwmod *oh; | 34 | struct omap_hwmod *oh; |
diff --git a/arch/arm/mach-omap2/include/mach/ctrl_module_pad_core_44xx.h b/arch/arm/mach-omap2/include/mach/ctrl_module_pad_core_44xx.h index 1e2d3322f33..c88420de115 100644 --- a/arch/arm/mach-omap2/include/mach/ctrl_module_pad_core_44xx.h +++ b/arch/arm/mach-omap2/include/mach/ctrl_module_pad_core_44xx.h | |||
@@ -941,10 +941,10 @@ | |||
941 | #define OMAP4_DSI2_LANEENABLE_MASK (0x7 << 29) | 941 | #define OMAP4_DSI2_LANEENABLE_MASK (0x7 << 29) |
942 | #define OMAP4_DSI1_LANEENABLE_SHIFT 24 | 942 | #define OMAP4_DSI1_LANEENABLE_SHIFT 24 |
943 | #define OMAP4_DSI1_LANEENABLE_MASK (0x1f << 24) | 943 | #define OMAP4_DSI1_LANEENABLE_MASK (0x1f << 24) |
944 | #define OMAP4_DSI2_PIPD_SHIFT 19 | 944 | #define OMAP4_DSI1_PIPD_SHIFT 19 |
945 | #define OMAP4_DSI2_PIPD_MASK (0x1f << 19) | 945 | #define OMAP4_DSI1_PIPD_MASK (0x1f << 19) |
946 | #define OMAP4_DSI1_PIPD_SHIFT 14 | 946 | #define OMAP4_DSI2_PIPD_SHIFT 14 |
947 | #define OMAP4_DSI1_PIPD_MASK (0x1f << 14) | 947 | #define OMAP4_DSI2_PIPD_MASK (0x1f << 14) |
948 | 948 | ||
949 | /* CONTROL_MCBSPLP */ | 949 | /* CONTROL_MCBSPLP */ |
950 | #define OMAP4_ALBCTRLRX_FSX_SHIFT 31 | 950 | #define OMAP4_ALBCTRLRX_FSX_SHIFT 31 |
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 065bd768987..2d5a57669a7 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <plat/omap-pm.h> | 31 | #include <plat/omap-pm.h> |
32 | #include <plat/omap_hwmod.h> | 32 | #include <plat/omap_hwmod.h> |
33 | #include <plat/multi.h> | 33 | #include <plat/multi.h> |
34 | #include <plat/dma.h> | ||
34 | 35 | ||
35 | #include "iomap.h" | 36 | #include "iomap.h" |
36 | #include "voltage.h" | 37 | #include "voltage.h" |
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c index 7f47e3f6515..1ecf54565fe 100644 --- a/arch/arm/mach-omap2/irq.c +++ b/arch/arm/mach-omap2/irq.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <mach/hardware.h> | 25 | #include <mach/hardware.h> |
26 | 26 | ||
27 | #include "iomap.h" | 27 | #include "iomap.h" |
28 | #include "common.h" | ||
28 | 29 | ||
29 | /* selected INTC register offsets */ | 30 | /* selected INTC register offsets */ |
30 | 31 | ||
@@ -333,7 +334,7 @@ void omap_intc_restore_context(void) | |||
333 | void omap3_intc_suspend(void) | 334 | void omap3_intc_suspend(void) |
334 | { | 335 | { |
335 | /* A pending interrupt would prevent OMAP from entering suspend */ | 336 | /* A pending interrupt would prevent OMAP from entering suspend */ |
336 | omap_ack_irq(0); | 337 | omap_ack_irq(NULL); |
337 | } | 338 | } |
338 | 339 | ||
339 | void omap3_intc_prepare_idle(void) | 340 | void omap3_intc_prepare_idle(void) |
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index 65c33911341..3268ee24ead 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c | |||
@@ -247,7 +247,7 @@ int __init omap_mux_init_signal(const char *muxname, int val) | |||
247 | int mux_mode; | 247 | int mux_mode; |
248 | 248 | ||
249 | mux_mode = omap_mux_get_by_name(muxname, &partition, &mux); | 249 | mux_mode = omap_mux_get_by_name(muxname, &partition, &mux); |
250 | if (mux_mode < 0) | 250 | if (mux_mode < 0 || !mux) |
251 | return mux_mode; | 251 | return mux_mode; |
252 | 252 | ||
253 | old_mode = omap_mux_read(partition, mux->reg_offset); | 253 | old_mode = omap_mux_read(partition, mux->reg_offset); |
diff --git a/arch/arm/mach-omap2/omap-secure.c b/arch/arm/mach-omap2/omap-secure.c index d8f8ef40290..d9ae4a53d81 100644 --- a/arch/arm/mach-omap2/omap-secure.c +++ b/arch/arm/mach-omap2/omap-secure.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <asm/cacheflush.h> | 18 | #include <asm/cacheflush.h> |
19 | #include <asm/memblock.h> | 19 | #include <asm/memblock.h> |
20 | 20 | ||
21 | #include <plat/omap-secure.h> | ||
21 | #include <mach/omap-secure.h> | 22 | #include <mach/omap-secure.h> |
22 | 23 | ||
23 | static phys_addr_t omap_secure_memblock_base; | 24 | static phys_addr_t omap_secure_memblock_base; |
diff --git a/arch/arm/mach-omap2/omap-wakeupgen.c b/arch/arm/mach-omap2/omap-wakeupgen.c index 42cd7fb5241..d811c779035 100644 --- a/arch/arm/mach-omap2/omap-wakeupgen.c +++ b/arch/arm/mach-omap2/omap-wakeupgen.c | |||
@@ -259,7 +259,7 @@ static void irq_save_context(void) | |||
259 | /* | 259 | /* |
260 | * Clear WakeupGen SAR backup status. | 260 | * Clear WakeupGen SAR backup status. |
261 | */ | 261 | */ |
262 | void irq_sar_clear(void) | 262 | static void irq_sar_clear(void) |
263 | { | 263 | { |
264 | u32 val; | 264 | u32 val; |
265 | val = __raw_readl(sar_base + SAR_BACKUP_STATUS_OFFSET); | 265 | val = __raw_readl(sar_base + SAR_BACKUP_STATUS_OFFSET); |
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 7144ae651d3..bf86f7e8f91 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * omap_hwmod implementation for OMAP2/3/4 | 2 | * omap_hwmod implementation for OMAP2/3/4 |
3 | * | 3 | * |
4 | * Copyright (C) 2009-2011 Nokia Corporation | 4 | * Copyright (C) 2009-2011 Nokia Corporation |
5 | * Copyright (C) 2011 Texas Instruments, Inc. | 5 | * Copyright (C) 2011-2012 Texas Instruments, Inc. |
6 | * | 6 | * |
7 | * Paul Walmsley, Benoît Cousson, Kevin Hilman | 7 | * Paul Walmsley, Benoît Cousson, Kevin Hilman |
8 | * | 8 | * |
@@ -137,6 +137,7 @@ | |||
137 | #include <linux/mutex.h> | 137 | #include <linux/mutex.h> |
138 | #include <linux/spinlock.h> | 138 | #include <linux/spinlock.h> |
139 | #include <linux/slab.h> | 139 | #include <linux/slab.h> |
140 | #include <linux/bootmem.h> | ||
140 | 141 | ||
141 | #include "common.h" | 142 | #include "common.h" |
142 | #include <plat/cpu.h> | 143 | #include <plat/cpu.h> |
@@ -159,16 +160,58 @@ | |||
159 | /* Name of the OMAP hwmod for the MPU */ | 160 | /* Name of the OMAP hwmod for the MPU */ |
160 | #define MPU_INITIATOR_NAME "mpu" | 161 | #define MPU_INITIATOR_NAME "mpu" |
161 | 162 | ||
163 | /* | ||
164 | * Number of struct omap_hwmod_link records per struct | ||
165 | * omap_hwmod_ocp_if record (master->slave and slave->master) | ||
166 | */ | ||
167 | #define LINKS_PER_OCP_IF 2 | ||
168 | |||
162 | /* omap_hwmod_list contains all registered struct omap_hwmods */ | 169 | /* omap_hwmod_list contains all registered struct omap_hwmods */ |
163 | static LIST_HEAD(omap_hwmod_list); | 170 | static LIST_HEAD(omap_hwmod_list); |
164 | 171 | ||
165 | /* mpu_oh: used to add/remove MPU initiator from sleepdep list */ | 172 | /* mpu_oh: used to add/remove MPU initiator from sleepdep list */ |
166 | static struct omap_hwmod *mpu_oh; | 173 | static struct omap_hwmod *mpu_oh; |
167 | 174 | ||
175 | /* | ||
176 | * linkspace: ptr to a buffer that struct omap_hwmod_link records are | ||
177 | * allocated from - used to reduce the number of small memory | ||
178 | * allocations, which has a significant impact on performance | ||
179 | */ | ||
180 | static struct omap_hwmod_link *linkspace; | ||
181 | |||
182 | /* | ||
183 | * free_ls, max_ls: array indexes into linkspace; representing the | ||
184 | * next free struct omap_hwmod_link index, and the maximum number of | ||
185 | * struct omap_hwmod_link records allocated (respectively) | ||
186 | */ | ||
187 | static unsigned short free_ls, max_ls, ls_supp; | ||
168 | 188 | ||
169 | /* Private functions */ | 189 | /* Private functions */ |
170 | 190 | ||
171 | /** | 191 | /** |
192 | * _fetch_next_ocp_if - return the next OCP interface in a list | ||
193 | * @p: ptr to a ptr to the list_head inside the ocp_if to return | ||
194 | * @i: pointer to the index of the element pointed to by @p in the list | ||
195 | * | ||
196 | * Return a pointer to the struct omap_hwmod_ocp_if record | ||
197 | * containing the struct list_head pointed to by @p, and increment | ||
198 | * @p such that a future call to this routine will return the next | ||
199 | * record. | ||
200 | */ | ||
201 | static struct omap_hwmod_ocp_if *_fetch_next_ocp_if(struct list_head **p, | ||
202 | int *i) | ||
203 | { | ||
204 | struct omap_hwmod_ocp_if *oi; | ||
205 | |||
206 | oi = list_entry(*p, struct omap_hwmod_link, node)->ocp_if; | ||
207 | *p = (*p)->next; | ||
208 | |||
209 | *i = *i + 1; | ||
210 | |||
211 | return oi; | ||
212 | } | ||
213 | |||
214 | /** | ||
172 | * _update_sysc_cache - return the module OCP_SYSCONFIG register, keep copy | 215 | * _update_sysc_cache - return the module OCP_SYSCONFIG register, keep copy |
173 | * @oh: struct omap_hwmod * | 216 | * @oh: struct omap_hwmod * |
174 | * | 217 | * |
@@ -582,16 +625,16 @@ static int _init_main_clk(struct omap_hwmod *oh) | |||
582 | */ | 625 | */ |
583 | static int _init_interface_clks(struct omap_hwmod *oh) | 626 | static int _init_interface_clks(struct omap_hwmod *oh) |
584 | { | 627 | { |
628 | struct omap_hwmod_ocp_if *os; | ||
629 | struct list_head *p; | ||
585 | struct clk *c; | 630 | struct clk *c; |
586 | int i; | 631 | int i = 0; |
587 | int ret = 0; | 632 | int ret = 0; |
588 | 633 | ||
589 | if (oh->slaves_cnt == 0) | 634 | p = oh->slave_ports.next; |
590 | return 0; | ||
591 | |||
592 | for (i = 0; i < oh->slaves_cnt; i++) { | ||
593 | struct omap_hwmod_ocp_if *os = oh->slaves[i]; | ||
594 | 635 | ||
636 | while (i < oh->slaves_cnt) { | ||
637 | os = _fetch_next_ocp_if(&p, &i); | ||
595 | if (!os->clk) | 638 | if (!os->clk) |
596 | continue; | 639 | continue; |
597 | 640 | ||
@@ -643,21 +686,22 @@ static int _init_opt_clks(struct omap_hwmod *oh) | |||
643 | */ | 686 | */ |
644 | static int _enable_clocks(struct omap_hwmod *oh) | 687 | static int _enable_clocks(struct omap_hwmod *oh) |
645 | { | 688 | { |
646 | int i; | 689 | struct omap_hwmod_ocp_if *os; |
690 | struct list_head *p; | ||
691 | int i = 0; | ||
647 | 692 | ||
648 | pr_debug("omap_hwmod: %s: enabling clocks\n", oh->name); | 693 | pr_debug("omap_hwmod: %s: enabling clocks\n", oh->name); |
649 | 694 | ||
650 | if (oh->_clk) | 695 | if (oh->_clk) |
651 | clk_enable(oh->_clk); | 696 | clk_enable(oh->_clk); |
652 | 697 | ||
653 | if (oh->slaves_cnt > 0) { | 698 | p = oh->slave_ports.next; |
654 | for (i = 0; i < oh->slaves_cnt; i++) { | ||
655 | struct omap_hwmod_ocp_if *os = oh->slaves[i]; | ||
656 | struct clk *c = os->_clk; | ||
657 | 699 | ||
658 | if (c && (os->flags & OCPIF_SWSUP_IDLE)) | 700 | while (i < oh->slaves_cnt) { |
659 | clk_enable(c); | 701 | os = _fetch_next_ocp_if(&p, &i); |
660 | } | 702 | |
703 | if (os->_clk && (os->flags & OCPIF_SWSUP_IDLE)) | ||
704 | clk_enable(os->_clk); | ||
661 | } | 705 | } |
662 | 706 | ||
663 | /* The opt clocks are controlled by the device driver. */ | 707 | /* The opt clocks are controlled by the device driver. */ |
@@ -673,21 +717,22 @@ static int _enable_clocks(struct omap_hwmod *oh) | |||
673 | */ | 717 | */ |
674 | static int _disable_clocks(struct omap_hwmod *oh) | 718 | static int _disable_clocks(struct omap_hwmod *oh) |
675 | { | 719 | { |
676 | int i; | 720 | struct omap_hwmod_ocp_if *os; |
721 | struct list_head *p; | ||
722 | int i = 0; | ||
677 | 723 | ||
678 | pr_debug("omap_hwmod: %s: disabling clocks\n", oh->name); | 724 | pr_debug("omap_hwmod: %s: disabling clocks\n", oh->name); |
679 | 725 | ||
680 | if (oh->_clk) | 726 | if (oh->_clk) |
681 | clk_disable(oh->_clk); | 727 | clk_disable(oh->_clk); |
682 | 728 | ||
683 | if (oh->slaves_cnt > 0) { | 729 | p = oh->slave_ports.next; |
684 | for (i = 0; i < oh->slaves_cnt; i++) { | ||
685 | struct omap_hwmod_ocp_if *os = oh->slaves[i]; | ||
686 | struct clk *c = os->_clk; | ||
687 | 730 | ||
688 | if (c && (os->flags & OCPIF_SWSUP_IDLE)) | 731 | while (i < oh->slaves_cnt) { |
689 | clk_disable(c); | 732 | os = _fetch_next_ocp_if(&p, &i); |
690 | } | 733 | |
734 | if (os->_clk && (os->flags & OCPIF_SWSUP_IDLE)) | ||
735 | clk_disable(os->_clk); | ||
691 | } | 736 | } |
692 | 737 | ||
693 | /* The opt clocks are controlled by the device driver. */ | 738 | /* The opt clocks are controlled by the device driver. */ |
@@ -781,39 +826,6 @@ static int _omap4_wait_target_disable(struct omap_hwmod *oh) | |||
781 | } | 826 | } |
782 | 827 | ||
783 | /** | 828 | /** |
784 | * _omap4_disable_module - enable CLKCTRL modulemode on OMAP4 | ||
785 | * @oh: struct omap_hwmod * | ||
786 | * | ||
787 | * Disable the PRCM module mode related to the hwmod @oh. | ||
788 | * Return EINVAL if the modulemode is not supported and 0 in case of success. | ||
789 | */ | ||
790 | static int _omap4_disable_module(struct omap_hwmod *oh) | ||
791 | { | ||
792 | int v; | ||
793 | |||
794 | /* The module mode does not exist prior OMAP4 */ | ||
795 | if (!cpu_is_omap44xx()) | ||
796 | return -EINVAL; | ||
797 | |||
798 | if (!oh->clkdm || !oh->prcm.omap4.modulemode) | ||
799 | return -EINVAL; | ||
800 | |||
801 | pr_debug("omap_hwmod: %s: %s\n", oh->name, __func__); | ||
802 | |||
803 | omap4_cminst_module_disable(oh->clkdm->prcm_partition, | ||
804 | oh->clkdm->cm_inst, | ||
805 | oh->clkdm->clkdm_offs, | ||
806 | oh->prcm.omap4.clkctrl_offs); | ||
807 | |||
808 | v = _omap4_wait_target_disable(oh); | ||
809 | if (v) | ||
810 | pr_warn("omap_hwmod: %s: _wait_target_disable failed\n", | ||
811 | oh->name); | ||
812 | |||
813 | return 0; | ||
814 | } | ||
815 | |||
816 | /** | ||
817 | * _count_mpu_irqs - count the number of MPU IRQ lines associated with @oh | 829 | * _count_mpu_irqs - count the number of MPU IRQ lines associated with @oh |
818 | * @oh: struct omap_hwmod *oh | 830 | * @oh: struct omap_hwmod *oh |
819 | * | 831 | * |
@@ -883,59 +895,220 @@ static int _count_ocp_if_addr_spaces(struct omap_hwmod_ocp_if *os) | |||
883 | } | 895 | } |
884 | 896 | ||
885 | /** | 897 | /** |
886 | * _find_mpu_port_index - find hwmod OCP slave port ID intended for MPU use | 898 | * _get_mpu_irq_by_name - fetch MPU interrupt line number by name |
887 | * @oh: struct omap_hwmod * | 899 | * @oh: struct omap_hwmod * to operate on |
900 | * @name: pointer to the name of the MPU interrupt number to fetch (optional) | ||
901 | * @irq: pointer to an unsigned int to store the MPU IRQ number to | ||
888 | * | 902 | * |
889 | * Returns the array index of the OCP slave port that the MPU | 903 | * Retrieve a MPU hardware IRQ line number named by @name associated |
890 | * addresses the device on, or -EINVAL upon error or not found. | 904 | * with the IP block pointed to by @oh. The IRQ number will be filled |
905 | * into the address pointed to by @dma. When @name is non-null, the | ||
906 | * IRQ line number associated with the named entry will be returned. | ||
907 | * If @name is null, the first matching entry will be returned. Data | ||
908 | * order is not meaningful in hwmod data, so callers are strongly | ||
909 | * encouraged to use a non-null @name whenever possible to avoid | ||
910 | * unpredictable effects if hwmod data is later added that causes data | ||
911 | * ordering to change. Returns 0 upon success or a negative error | ||
912 | * code upon error. | ||
891 | */ | 913 | */ |
892 | static int __init _find_mpu_port_index(struct omap_hwmod *oh) | 914 | static int _get_mpu_irq_by_name(struct omap_hwmod *oh, const char *name, |
915 | unsigned int *irq) | ||
893 | { | 916 | { |
894 | int i; | 917 | int i; |
895 | int found = 0; | 918 | bool found = false; |
896 | 919 | ||
897 | if (!oh || oh->slaves_cnt == 0) | 920 | if (!oh->mpu_irqs) |
898 | return -EINVAL; | 921 | return -ENOENT; |
899 | 922 | ||
900 | for (i = 0; i < oh->slaves_cnt; i++) { | 923 | i = 0; |
901 | struct omap_hwmod_ocp_if *os = oh->slaves[i]; | 924 | while (oh->mpu_irqs[i].irq != -1) { |
925 | if (name == oh->mpu_irqs[i].name || | ||
926 | !strcmp(name, oh->mpu_irqs[i].name)) { | ||
927 | found = true; | ||
928 | break; | ||
929 | } | ||
930 | i++; | ||
931 | } | ||
902 | 932 | ||
903 | if (os->user & OCP_USER_MPU) { | 933 | if (!found) |
904 | found = 1; | 934 | return -ENOENT; |
935 | |||
936 | *irq = oh->mpu_irqs[i].irq; | ||
937 | |||
938 | return 0; | ||
939 | } | ||
940 | |||
941 | /** | ||
942 | * _get_sdma_req_by_name - fetch SDMA request line ID by name | ||
943 | * @oh: struct omap_hwmod * to operate on | ||
944 | * @name: pointer to the name of the SDMA request line to fetch (optional) | ||
945 | * @dma: pointer to an unsigned int to store the request line ID to | ||
946 | * | ||
947 | * Retrieve an SDMA request line ID named by @name on the IP block | ||
948 | * pointed to by @oh. The ID will be filled into the address pointed | ||
949 | * to by @dma. When @name is non-null, the request line ID associated | ||
950 | * with the named entry will be returned. If @name is null, the first | ||
951 | * matching entry will be returned. Data order is not meaningful in | ||
952 | * hwmod data, so callers are strongly encouraged to use a non-null | ||
953 | * @name whenever possible to avoid unpredictable effects if hwmod | ||
954 | * data is later added that causes data ordering to change. Returns 0 | ||
955 | * upon success or a negative error code upon error. | ||
956 | */ | ||
957 | static int _get_sdma_req_by_name(struct omap_hwmod *oh, const char *name, | ||
958 | unsigned int *dma) | ||
959 | { | ||
960 | int i; | ||
961 | bool found = false; | ||
962 | |||
963 | if (!oh->sdma_reqs) | ||
964 | return -ENOENT; | ||
965 | |||
966 | i = 0; | ||
967 | while (oh->sdma_reqs[i].dma_req != -1) { | ||
968 | if (name == oh->sdma_reqs[i].name || | ||
969 | !strcmp(name, oh->sdma_reqs[i].name)) { | ||
970 | found = true; | ||
905 | break; | 971 | break; |
906 | } | 972 | } |
973 | i++; | ||
907 | } | 974 | } |
908 | 975 | ||
909 | if (found) | 976 | if (!found) |
910 | pr_debug("omap_hwmod: %s: MPU OCP slave port ID %d\n", | 977 | return -ENOENT; |
911 | oh->name, i); | 978 | |
912 | else | 979 | *dma = oh->sdma_reqs[i].dma_req; |
913 | pr_debug("omap_hwmod: %s: no MPU OCP slave port found\n", | ||
914 | oh->name); | ||
915 | 980 | ||
916 | return (found) ? i : -EINVAL; | 981 | return 0; |
917 | } | 982 | } |
918 | 983 | ||
919 | /** | 984 | /** |
920 | * _find_mpu_rt_base - find hwmod register target base addr accessible by MPU | 985 | * _get_addr_space_by_name - fetch address space start & end by name |
921 | * @oh: struct omap_hwmod * | 986 | * @oh: struct omap_hwmod * to operate on |
987 | * @name: pointer to the name of the address space to fetch (optional) | ||
988 | * @pa_start: pointer to a u32 to store the starting address to | ||
989 | * @pa_end: pointer to a u32 to store the ending address to | ||
922 | * | 990 | * |
923 | * Return the virtual address of the base of the register target of | 991 | * Retrieve address space start and end addresses for the IP block |
924 | * device @oh, or NULL on error. | 992 | * pointed to by @oh. The data will be filled into the addresses |
993 | * pointed to by @pa_start and @pa_end. When @name is non-null, the | ||
994 | * address space data associated with the named entry will be | ||
995 | * returned. If @name is null, the first matching entry will be | ||
996 | * returned. Data order is not meaningful in hwmod data, so callers | ||
997 | * are strongly encouraged to use a non-null @name whenever possible | ||
998 | * to avoid unpredictable effects if hwmod data is later added that | ||
999 | * causes data ordering to change. Returns 0 upon success or a | ||
1000 | * negative error code upon error. | ||
925 | */ | 1001 | */ |
926 | static void __iomem * __init _find_mpu_rt_base(struct omap_hwmod *oh, u8 index) | 1002 | static int _get_addr_space_by_name(struct omap_hwmod *oh, const char *name, |
1003 | u32 *pa_start, u32 *pa_end) | ||
927 | { | 1004 | { |
1005 | int i, j; | ||
928 | struct omap_hwmod_ocp_if *os; | 1006 | struct omap_hwmod_ocp_if *os; |
929 | struct omap_hwmod_addr_space *mem; | 1007 | struct list_head *p = NULL; |
930 | int i = 0, found = 0; | 1008 | bool found = false; |
931 | void __iomem *va_start; | 1009 | |
1010 | p = oh->slave_ports.next; | ||
1011 | |||
1012 | i = 0; | ||
1013 | while (i < oh->slaves_cnt) { | ||
1014 | os = _fetch_next_ocp_if(&p, &i); | ||
1015 | |||
1016 | if (!os->addr) | ||
1017 | return -ENOENT; | ||
1018 | |||
1019 | j = 0; | ||
1020 | while (os->addr[j].pa_start != os->addr[j].pa_end) { | ||
1021 | if (name == os->addr[j].name || | ||
1022 | !strcmp(name, os->addr[j].name)) { | ||
1023 | found = true; | ||
1024 | break; | ||
1025 | } | ||
1026 | j++; | ||
1027 | } | ||
1028 | |||
1029 | if (found) | ||
1030 | break; | ||
1031 | } | ||
1032 | |||
1033 | if (!found) | ||
1034 | return -ENOENT; | ||
1035 | |||
1036 | *pa_start = os->addr[j].pa_start; | ||
1037 | *pa_end = os->addr[j].pa_end; | ||
1038 | |||
1039 | return 0; | ||
1040 | } | ||
1041 | |||
1042 | /** | ||
1043 | * _save_mpu_port_index - find and save the index to @oh's MPU port | ||
1044 | * @oh: struct omap_hwmod * | ||
1045 | * | ||
1046 | * Determines the array index of the OCP slave port that the MPU uses | ||
1047 | * to address the device, and saves it into the struct omap_hwmod. | ||
1048 | * Intended to be called during hwmod registration only. No return | ||
1049 | * value. | ||
1050 | */ | ||
1051 | static void __init _save_mpu_port_index(struct omap_hwmod *oh) | ||
1052 | { | ||
1053 | struct omap_hwmod_ocp_if *os = NULL; | ||
1054 | struct list_head *p; | ||
1055 | int i = 0; | ||
1056 | |||
1057 | if (!oh) | ||
1058 | return; | ||
932 | 1059 | ||
933 | if (!oh || oh->slaves_cnt == 0) | 1060 | oh->_int_flags |= _HWMOD_NO_MPU_PORT; |
1061 | |||
1062 | p = oh->slave_ports.next; | ||
1063 | |||
1064 | while (i < oh->slaves_cnt) { | ||
1065 | os = _fetch_next_ocp_if(&p, &i); | ||
1066 | if (os->user & OCP_USER_MPU) { | ||
1067 | oh->_mpu_port = os; | ||
1068 | oh->_int_flags &= ~_HWMOD_NO_MPU_PORT; | ||
1069 | break; | ||
1070 | } | ||
1071 | } | ||
1072 | |||
1073 | return; | ||
1074 | } | ||
1075 | |||
1076 | /** | ||
1077 | * _find_mpu_rt_port - return omap_hwmod_ocp_if accessible by the MPU | ||
1078 | * @oh: struct omap_hwmod * | ||
1079 | * | ||
1080 | * Given a pointer to a struct omap_hwmod record @oh, return a pointer | ||
1081 | * to the struct omap_hwmod_ocp_if record that is used by the MPU to | ||
1082 | * communicate with the IP block. This interface need not be directly | ||
1083 | * connected to the MPU (and almost certainly is not), but is directly | ||
1084 | * connected to the IP block represented by @oh. Returns a pointer | ||
1085 | * to the struct omap_hwmod_ocp_if * upon success, or returns NULL upon | ||
1086 | * error or if there does not appear to be a path from the MPU to this | ||
1087 | * IP block. | ||
1088 | */ | ||
1089 | static struct omap_hwmod_ocp_if *_find_mpu_rt_port(struct omap_hwmod *oh) | ||
1090 | { | ||
1091 | if (!oh || oh->_int_flags & _HWMOD_NO_MPU_PORT || oh->slaves_cnt == 0) | ||
934 | return NULL; | 1092 | return NULL; |
935 | 1093 | ||
936 | os = oh->slaves[index]; | 1094 | return oh->_mpu_port; |
1095 | }; | ||
1096 | |||
1097 | /** | ||
1098 | * _find_mpu_rt_addr_space - return MPU register target address space for @oh | ||
1099 | * @oh: struct omap_hwmod * | ||
1100 | * | ||
1101 | * Returns a pointer to the struct omap_hwmod_addr_space record representing | ||
1102 | * the register target MPU address space; or returns NULL upon error. | ||
1103 | */ | ||
1104 | static struct omap_hwmod_addr_space * __init _find_mpu_rt_addr_space(struct omap_hwmod *oh) | ||
1105 | { | ||
1106 | struct omap_hwmod_ocp_if *os; | ||
1107 | struct omap_hwmod_addr_space *mem; | ||
1108 | int found = 0, i = 0; | ||
937 | 1109 | ||
938 | if (!os->addr) | 1110 | os = _find_mpu_rt_port(oh); |
1111 | if (!os || !os->addr) | ||
939 | return NULL; | 1112 | return NULL; |
940 | 1113 | ||
941 | do { | 1114 | do { |
@@ -944,20 +1117,7 @@ static void __iomem * __init _find_mpu_rt_base(struct omap_hwmod *oh, u8 index) | |||
944 | found = 1; | 1117 | found = 1; |
945 | } while (!found && mem->pa_start != mem->pa_end); | 1118 | } while (!found && mem->pa_start != mem->pa_end); |
946 | 1119 | ||
947 | if (found) { | 1120 | return (found) ? mem : NULL; |
948 | va_start = ioremap(mem->pa_start, mem->pa_end - mem->pa_start); | ||
949 | if (!va_start) { | ||
950 | pr_err("omap_hwmod: %s: Could not ioremap\n", oh->name); | ||
951 | return NULL; | ||
952 | } | ||
953 | pr_debug("omap_hwmod: %s: MPU register target at va %p\n", | ||
954 | oh->name, va_start); | ||
955 | } else { | ||
956 | pr_debug("omap_hwmod: %s: no MPU register target found\n", | ||
957 | oh->name); | ||
958 | } | ||
959 | |||
960 | return (found) ? va_start : NULL; | ||
961 | } | 1121 | } |
962 | 1122 | ||
963 | /** | 1123 | /** |
@@ -1205,12 +1365,11 @@ static int _wait_target_ready(struct omap_hwmod *oh) | |||
1205 | if (!oh) | 1365 | if (!oh) |
1206 | return -EINVAL; | 1366 | return -EINVAL; |
1207 | 1367 | ||
1208 | if (oh->_int_flags & _HWMOD_NO_MPU_PORT) | 1368 | if (oh->flags & HWMOD_NO_IDLEST) |
1209 | return 0; | 1369 | return 0; |
1210 | 1370 | ||
1211 | os = oh->slaves[oh->_mpu_port_index]; | 1371 | os = _find_mpu_rt_port(oh); |
1212 | 1372 | if (!os) | |
1213 | if (oh->flags & HWMOD_NO_IDLEST) | ||
1214 | return 0; | 1373 | return 0; |
1215 | 1374 | ||
1216 | /* XXX check module SIDLEMODE */ | 1375 | /* XXX check module SIDLEMODE */ |
@@ -1378,13 +1537,73 @@ static int _read_hardreset(struct omap_hwmod *oh, const char *name) | |||
1378 | } | 1537 | } |
1379 | 1538 | ||
1380 | /** | 1539 | /** |
1540 | * _are_any_hardreset_lines_asserted - return true if part of @oh is hard-reset | ||
1541 | * @oh: struct omap_hwmod * | ||
1542 | * | ||
1543 | * If any hardreset line associated with @oh is asserted, then return true. | ||
1544 | * Otherwise, if @oh has no hardreset lines associated with it, or if | ||
1545 | * no hardreset lines associated with @oh are asserted, then return false. | ||
1546 | * This function is used to avoid executing some parts of the IP block | ||
1547 | * enable/disable sequence if a hardreset line is set. | ||
1548 | */ | ||
1549 | static bool _are_any_hardreset_lines_asserted(struct omap_hwmod *oh) | ||
1550 | { | ||
1551 | int i; | ||
1552 | |||
1553 | if (oh->rst_lines_cnt == 0) | ||
1554 | return false; | ||
1555 | |||
1556 | for (i = 0; i < oh->rst_lines_cnt; i++) | ||
1557 | if (_read_hardreset(oh, oh->rst_lines[i].name) > 0) | ||
1558 | return true; | ||
1559 | |||
1560 | return false; | ||
1561 | } | ||
1562 | |||
1563 | /** | ||
1564 | * _omap4_disable_module - enable CLKCTRL modulemode on OMAP4 | ||
1565 | * @oh: struct omap_hwmod * | ||
1566 | * | ||
1567 | * Disable the PRCM module mode related to the hwmod @oh. | ||
1568 | * Return EINVAL if the modulemode is not supported and 0 in case of success. | ||
1569 | */ | ||
1570 | static int _omap4_disable_module(struct omap_hwmod *oh) | ||
1571 | { | ||
1572 | int v; | ||
1573 | |||
1574 | /* The module mode does not exist prior OMAP4 */ | ||
1575 | if (!cpu_is_omap44xx()) | ||
1576 | return -EINVAL; | ||
1577 | |||
1578 | if (!oh->clkdm || !oh->prcm.omap4.modulemode) | ||
1579 | return -EINVAL; | ||
1580 | |||
1581 | pr_debug("omap_hwmod: %s: %s\n", oh->name, __func__); | ||
1582 | |||
1583 | omap4_cminst_module_disable(oh->clkdm->prcm_partition, | ||
1584 | oh->clkdm->cm_inst, | ||
1585 | oh->clkdm->clkdm_offs, | ||
1586 | oh->prcm.omap4.clkctrl_offs); | ||
1587 | |||
1588 | if (_are_any_hardreset_lines_asserted(oh)) | ||
1589 | return 0; | ||
1590 | |||
1591 | v = _omap4_wait_target_disable(oh); | ||
1592 | if (v) | ||
1593 | pr_warn("omap_hwmod: %s: _wait_target_disable failed\n", | ||
1594 | oh->name); | ||
1595 | |||
1596 | return 0; | ||
1597 | } | ||
1598 | |||
1599 | /** | ||
1381 | * _ocp_softreset - reset an omap_hwmod via the OCP_SYSCONFIG bit | 1600 | * _ocp_softreset - reset an omap_hwmod via the OCP_SYSCONFIG bit |
1382 | * @oh: struct omap_hwmod * | 1601 | * @oh: struct omap_hwmod * |
1383 | * | 1602 | * |
1384 | * Resets an omap_hwmod @oh via the OCP_SYSCONFIG bit. hwmod must be | 1603 | * Resets an omap_hwmod @oh via the OCP_SYSCONFIG bit. hwmod must be |
1385 | * enabled for this to work. Returns -EINVAL if the hwmod cannot be | 1604 | * enabled for this to work. Returns -ENOENT if the hwmod cannot be |
1386 | * reset this way or if the hwmod is in the wrong state, -ETIMEDOUT if | 1605 | * reset this way, -EINVAL if the hwmod is in the wrong state, |
1387 | * the module did not reset in time, or 0 upon success. | 1606 | * -ETIMEDOUT if the module did not reset in time, or 0 upon success. |
1388 | * | 1607 | * |
1389 | * In OMAP3 a specific SYSSTATUS register is used to get the reset status. | 1608 | * In OMAP3 a specific SYSSTATUS register is used to get the reset status. |
1390 | * Starting in OMAP4, some IPs do not have SYSSTATUS registers and instead | 1609 | * Starting in OMAP4, some IPs do not have SYSSTATUS registers and instead |
@@ -1401,7 +1620,7 @@ static int _ocp_softreset(struct omap_hwmod *oh) | |||
1401 | 1620 | ||
1402 | if (!oh->class->sysc || | 1621 | if (!oh->class->sysc || |
1403 | !(oh->class->sysc->sysc_flags & SYSC_HAS_SOFTRESET)) | 1622 | !(oh->class->sysc->sysc_flags & SYSC_HAS_SOFTRESET)) |
1404 | return -EINVAL; | 1623 | return -ENOENT; |
1405 | 1624 | ||
1406 | /* clocks must be on for this operation */ | 1625 | /* clocks must be on for this operation */ |
1407 | if (oh->_state != _HWMOD_STATE_ENABLED) { | 1626 | if (oh->_state != _HWMOD_STATE_ENABLED) { |
@@ -1462,32 +1681,60 @@ dis_opt_clks: | |||
1462 | * _reset - reset an omap_hwmod | 1681 | * _reset - reset an omap_hwmod |
1463 | * @oh: struct omap_hwmod * | 1682 | * @oh: struct omap_hwmod * |
1464 | * | 1683 | * |
1465 | * Resets an omap_hwmod @oh. The default software reset mechanism for | 1684 | * Resets an omap_hwmod @oh. If the module has a custom reset |
1466 | * most OMAP IP blocks is triggered via the OCP_SYSCONFIG.SOFTRESET | 1685 | * function pointer defined, then call it to reset the IP block, and |
1467 | * bit. However, some hwmods cannot be reset via this method: some | 1686 | * pass along its return value to the caller. Otherwise, if the IP |
1468 | * are not targets and therefore have no OCP header registers to | 1687 | * block has an OCP_SYSCONFIG register with a SOFTRESET bitfield |
1469 | * access; others (like the IVA) have idiosyncratic reset sequences. | 1688 | * associated with it, call a function to reset the IP block via that |
1470 | * So for these relatively rare cases, custom reset code can be | 1689 | * method, and pass along the return value to the caller. Finally, if |
1471 | * supplied in the struct omap_hwmod_class .reset function pointer. | 1690 | * the IP block has some hardreset lines associated with it, assert |
1472 | * Passes along the return value from either _reset() or the custom | 1691 | * all of those, but do _not_ deassert them. (This is because driver |
1473 | * reset function - these must return -EINVAL if the hwmod cannot be | 1692 | * authors have expressed an apparent requirement to control the |
1474 | * reset this way or if the hwmod is in the wrong state, -ETIMEDOUT if | 1693 | * deassertion of the hardreset lines themselves.) |
1475 | * the module did not reset in time, or 0 upon success. | 1694 | * |
1695 | * The default software reset mechanism for most OMAP IP blocks is | ||
1696 | * triggered via the OCP_SYSCONFIG.SOFTRESET bit. However, some | ||
1697 | * hwmods cannot be reset via this method. Some are not targets and | ||
1698 | * therefore have no OCP header registers to access. Others (like the | ||
1699 | * IVA) have idiosyncratic reset sequences. So for these relatively | ||
1700 | * rare cases, custom reset code can be supplied in the struct | ||
1701 | * omap_hwmod_class .reset function pointer. Passes along the return | ||
1702 | * value from either _ocp_softreset() or the custom reset function - | ||
1703 | * these must return -EINVAL if the hwmod cannot be reset this way or | ||
1704 | * if the hwmod is in the wrong state, -ETIMEDOUT if the module did | ||
1705 | * not reset in time, or 0 upon success. | ||
1476 | */ | 1706 | */ |
1477 | static int _reset(struct omap_hwmod *oh) | 1707 | static int _reset(struct omap_hwmod *oh) |
1478 | { | 1708 | { |
1479 | int ret; | 1709 | int i, r; |
1480 | 1710 | ||
1481 | pr_debug("omap_hwmod: %s: resetting\n", oh->name); | 1711 | pr_debug("omap_hwmod: %s: resetting\n", oh->name); |
1482 | 1712 | ||
1483 | ret = (oh->class->reset) ? oh->class->reset(oh) : _ocp_softreset(oh); | 1713 | if (oh->class->reset) { |
1714 | r = oh->class->reset(oh); | ||
1715 | } else { | ||
1716 | if (oh->rst_lines_cnt > 0) { | ||
1717 | for (i = 0; i < oh->rst_lines_cnt; i++) | ||
1718 | _assert_hardreset(oh, oh->rst_lines[i].name); | ||
1719 | return 0; | ||
1720 | } else { | ||
1721 | r = _ocp_softreset(oh); | ||
1722 | if (r == -ENOENT) | ||
1723 | r = 0; | ||
1724 | } | ||
1725 | } | ||
1484 | 1726 | ||
1727 | /* | ||
1728 | * OCP_SYSCONFIG bits need to be reprogrammed after a | ||
1729 | * softreset. The _enable() function should be split to avoid | ||
1730 | * the rewrite of the OCP_SYSCONFIG register. | ||
1731 | */ | ||
1485 | if (oh->class->sysc) { | 1732 | if (oh->class->sysc) { |
1486 | _update_sysc_cache(oh); | 1733 | _update_sysc_cache(oh); |
1487 | _enable_sysc(oh); | 1734 | _enable_sysc(oh); |
1488 | } | 1735 | } |
1489 | 1736 | ||
1490 | return ret; | 1737 | return r; |
1491 | } | 1738 | } |
1492 | 1739 | ||
1493 | /** | 1740 | /** |
@@ -1506,10 +1753,9 @@ static int _enable(struct omap_hwmod *oh) | |||
1506 | pr_debug("omap_hwmod: %s: enabling\n", oh->name); | 1753 | pr_debug("omap_hwmod: %s: enabling\n", oh->name); |
1507 | 1754 | ||
1508 | /* | 1755 | /* |
1509 | * hwmods with HWMOD_INIT_NO_IDLE flag set are left | 1756 | * hwmods with HWMOD_INIT_NO_IDLE flag set are left in enabled |
1510 | * in enabled state at init. | 1757 | * state at init. Now that someone is really trying to enable |
1511 | * Now that someone is really trying to enable them, | 1758 | * them, just ensure that the hwmod mux is set. |
1512 | * just ensure that the hwmod mux is set. | ||
1513 | */ | 1759 | */ |
1514 | if (oh->_int_flags & _HWMOD_SKIP_ENABLE) { | 1760 | if (oh->_int_flags & _HWMOD_SKIP_ENABLE) { |
1515 | /* | 1761 | /* |
@@ -1532,15 +1778,17 @@ static int _enable(struct omap_hwmod *oh) | |||
1532 | return -EINVAL; | 1778 | return -EINVAL; |
1533 | } | 1779 | } |
1534 | 1780 | ||
1535 | |||
1536 | /* | 1781 | /* |
1537 | * If an IP contains only one HW reset line, then de-assert it in order | 1782 | * If an IP block contains HW reset lines and any of them are |
1538 | * to allow the module state transition. Otherwise the PRCM will return | 1783 | * asserted, we let integration code associated with that |
1539 | * Intransition status, and the init will failed. | 1784 | * block handle the enable. We've received very little |
1785 | * information on what those driver authors need, and until | ||
1786 | * detailed information is provided and the driver code is | ||
1787 | * posted to the public lists, this is probably the best we | ||
1788 | * can do. | ||
1540 | */ | 1789 | */ |
1541 | if ((oh->_state == _HWMOD_STATE_INITIALIZED || | 1790 | if (_are_any_hardreset_lines_asserted(oh)) |
1542 | oh->_state == _HWMOD_STATE_DISABLED) && oh->rst_lines_cnt == 1) | 1791 | return 0; |
1543 | _deassert_hardreset(oh, oh->rst_lines[0].name); | ||
1544 | 1792 | ||
1545 | /* Mux pins for device runtime if populated */ | 1793 | /* Mux pins for device runtime if populated */ |
1546 | if (oh->mux && (!oh->mux->enabled || | 1794 | if (oh->mux && (!oh->mux->enabled || |
@@ -1615,6 +1863,9 @@ static int _idle(struct omap_hwmod *oh) | |||
1615 | return -EINVAL; | 1863 | return -EINVAL; |
1616 | } | 1864 | } |
1617 | 1865 | ||
1866 | if (_are_any_hardreset_lines_asserted(oh)) | ||
1867 | return 0; | ||
1868 | |||
1618 | if (oh->class->sysc) | 1869 | if (oh->class->sysc) |
1619 | _idle_sysc(oh); | 1870 | _idle_sysc(oh); |
1620 | _del_initiator_dep(oh, mpu_oh); | 1871 | _del_initiator_dep(oh, mpu_oh); |
@@ -1687,7 +1938,7 @@ int omap_hwmod_set_ocp_autoidle(struct omap_hwmod *oh, u8 autoidle) | |||
1687 | */ | 1938 | */ |
1688 | static int _shutdown(struct omap_hwmod *oh) | 1939 | static int _shutdown(struct omap_hwmod *oh) |
1689 | { | 1940 | { |
1690 | int ret; | 1941 | int ret, i; |
1691 | u8 prev_state; | 1942 | u8 prev_state; |
1692 | 1943 | ||
1693 | if (oh->_state != _HWMOD_STATE_IDLE && | 1944 | if (oh->_state != _HWMOD_STATE_IDLE && |
@@ -1697,6 +1948,9 @@ static int _shutdown(struct omap_hwmod *oh) | |||
1697 | return -EINVAL; | 1948 | return -EINVAL; |
1698 | } | 1949 | } |
1699 | 1950 | ||
1951 | if (_are_any_hardreset_lines_asserted(oh)) | ||
1952 | return 0; | ||
1953 | |||
1700 | pr_debug("omap_hwmod: %s: disabling\n", oh->name); | 1954 | pr_debug("omap_hwmod: %s: disabling\n", oh->name); |
1701 | 1955 | ||
1702 | if (oh->class->pre_shutdown) { | 1956 | if (oh->class->pre_shutdown) { |
@@ -1728,12 +1982,8 @@ static int _shutdown(struct omap_hwmod *oh) | |||
1728 | } | 1982 | } |
1729 | /* XXX Should this code also force-disable the optional clocks? */ | 1983 | /* XXX Should this code also force-disable the optional clocks? */ |
1730 | 1984 | ||
1731 | /* | 1985 | for (i = 0; i < oh->rst_lines_cnt; i++) |
1732 | * If an IP contains only one HW reset line, then assert it | 1986 | _assert_hardreset(oh, oh->rst_lines[i].name); |
1733 | * after disabling the clocks and before shutting down the IP. | ||
1734 | */ | ||
1735 | if (oh->rst_lines_cnt == 1) | ||
1736 | _assert_hardreset(oh, oh->rst_lines[0].name); | ||
1737 | 1987 | ||
1738 | /* Mux pins to safe mode or use populated off mode values */ | 1988 | /* Mux pins to safe mode or use populated off mode values */ |
1739 | if (oh->mux) | 1989 | if (oh->mux) |
@@ -1745,59 +1995,186 @@ static int _shutdown(struct omap_hwmod *oh) | |||
1745 | } | 1995 | } |
1746 | 1996 | ||
1747 | /** | 1997 | /** |
1748 | * _setup - do initial configuration of omap_hwmod | 1998 | * _init_mpu_rt_base - populate the virtual address for a hwmod |
1749 | * @oh: struct omap_hwmod * | 1999 | * @oh: struct omap_hwmod * to locate the virtual address |
1750 | * | 2000 | * |
1751 | * Writes the CLOCKACTIVITY bits @clockact to the hwmod @oh | 2001 | * Cache the virtual address used by the MPU to access this IP block's |
1752 | * OCP_SYSCONFIG register. Returns 0. | 2002 | * registers. This address is needed early so the OCP registers that |
2003 | * are part of the device's address space can be ioremapped properly. | ||
2004 | * No return value. | ||
1753 | */ | 2005 | */ |
1754 | static int _setup(struct omap_hwmod *oh, void *data) | 2006 | static void __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data) |
1755 | { | 2007 | { |
1756 | int i, r; | 2008 | struct omap_hwmod_addr_space *mem; |
1757 | u8 postsetup_state; | 2009 | void __iomem *va_start; |
2010 | |||
2011 | if (!oh) | ||
2012 | return; | ||
2013 | |||
2014 | _save_mpu_port_index(oh); | ||
1758 | 2015 | ||
1759 | if (oh->_state != _HWMOD_STATE_CLKS_INITED) | 2016 | if (oh->_int_flags & _HWMOD_NO_MPU_PORT) |
2017 | return; | ||
2018 | |||
2019 | mem = _find_mpu_rt_addr_space(oh); | ||
2020 | if (!mem) { | ||
2021 | pr_debug("omap_hwmod: %s: no MPU register target found\n", | ||
2022 | oh->name); | ||
2023 | return; | ||
2024 | } | ||
2025 | |||
2026 | va_start = ioremap(mem->pa_start, mem->pa_end - mem->pa_start); | ||
2027 | if (!va_start) { | ||
2028 | pr_err("omap_hwmod: %s: Could not ioremap\n", oh->name); | ||
2029 | return; | ||
2030 | } | ||
2031 | |||
2032 | pr_debug("omap_hwmod: %s: MPU register target at va %p\n", | ||
2033 | oh->name, va_start); | ||
2034 | |||
2035 | oh->_mpu_rt_va = va_start; | ||
2036 | } | ||
2037 | |||
2038 | /** | ||
2039 | * _init - initialize internal data for the hwmod @oh | ||
2040 | * @oh: struct omap_hwmod * | ||
2041 | * @n: (unused) | ||
2042 | * | ||
2043 | * Look up the clocks and the address space used by the MPU to access | ||
2044 | * registers belonging to the hwmod @oh. @oh must already be | ||
2045 | * registered at this point. This is the first of two phases for | ||
2046 | * hwmod initialization. Code called here does not touch any hardware | ||
2047 | * registers, it simply prepares internal data structures. Returns 0 | ||
2048 | * upon success or if the hwmod isn't registered, or -EINVAL upon | ||
2049 | * failure. | ||
2050 | */ | ||
2051 | static int __init _init(struct omap_hwmod *oh, void *data) | ||
2052 | { | ||
2053 | int r; | ||
2054 | |||
2055 | if (oh->_state != _HWMOD_STATE_REGISTERED) | ||
1760 | return 0; | 2056 | return 0; |
1761 | 2057 | ||
1762 | /* Set iclk autoidle mode */ | 2058 | _init_mpu_rt_base(oh, NULL); |
1763 | if (oh->slaves_cnt > 0) { | ||
1764 | for (i = 0; i < oh->slaves_cnt; i++) { | ||
1765 | struct omap_hwmod_ocp_if *os = oh->slaves[i]; | ||
1766 | struct clk *c = os->_clk; | ||
1767 | 2059 | ||
1768 | if (!c) | 2060 | r = _init_clocks(oh, NULL); |
1769 | continue; | 2061 | if (IS_ERR_VALUE(r)) { |
2062 | WARN(1, "omap_hwmod: %s: couldn't init clocks\n", oh->name); | ||
2063 | return -EINVAL; | ||
2064 | } | ||
1770 | 2065 | ||
1771 | if (os->flags & OCPIF_SWSUP_IDLE) { | 2066 | oh->_state = _HWMOD_STATE_INITIALIZED; |
1772 | /* XXX omap_iclk_deny_idle(c); */ | 2067 | |
1773 | } else { | 2068 | return 0; |
1774 | /* XXX omap_iclk_allow_idle(c); */ | 2069 | } |
1775 | clk_enable(c); | 2070 | |
1776 | } | 2071 | /** |
2072 | * _setup_iclk_autoidle - configure an IP block's interface clocks | ||
2073 | * @oh: struct omap_hwmod * | ||
2074 | * | ||
2075 | * Set up the module's interface clocks. XXX This function is still mostly | ||
2076 | * a stub; implementing this properly requires iclk autoidle usecounting in | ||
2077 | * the clock code. No return value. | ||
2078 | */ | ||
2079 | static void __init _setup_iclk_autoidle(struct omap_hwmod *oh) | ||
2080 | { | ||
2081 | struct omap_hwmod_ocp_if *os; | ||
2082 | struct list_head *p; | ||
2083 | int i = 0; | ||
2084 | if (oh->_state != _HWMOD_STATE_INITIALIZED) | ||
2085 | return; | ||
2086 | |||
2087 | p = oh->slave_ports.next; | ||
2088 | |||
2089 | while (i < oh->slaves_cnt) { | ||
2090 | os = _fetch_next_ocp_if(&p, &i); | ||
2091 | if (!os->_clk) | ||
2092 | continue; | ||
2093 | |||
2094 | if (os->flags & OCPIF_SWSUP_IDLE) { | ||
2095 | /* XXX omap_iclk_deny_idle(c); */ | ||
2096 | } else { | ||
2097 | /* XXX omap_iclk_allow_idle(c); */ | ||
2098 | clk_enable(os->_clk); | ||
1777 | } | 2099 | } |
1778 | } | 2100 | } |
1779 | 2101 | ||
1780 | oh->_state = _HWMOD_STATE_INITIALIZED; | 2102 | return; |
2103 | } | ||
1781 | 2104 | ||
1782 | /* | 2105 | /** |
1783 | * In the case of hwmod with hardreset that should not be | 2106 | * _setup_reset - reset an IP block during the setup process |
1784 | * de-assert at boot time, we have to keep the module | 2107 | * @oh: struct omap_hwmod * |
1785 | * initialized, because we cannot enable it properly with the | 2108 | * |
1786 | * reset asserted. Exit without warning because that behavior is | 2109 | * Reset the IP block corresponding to the hwmod @oh during the setup |
1787 | * expected. | 2110 | * process. The IP block is first enabled so it can be successfully |
1788 | */ | 2111 | * reset. Returns 0 upon success or a negative error code upon |
1789 | if ((oh->flags & HWMOD_INIT_NO_RESET) && oh->rst_lines_cnt == 1) | 2112 | * failure. |
1790 | return 0; | 2113 | */ |
2114 | static int __init _setup_reset(struct omap_hwmod *oh) | ||
2115 | { | ||
2116 | int r; | ||
1791 | 2117 | ||
1792 | r = _enable(oh); | 2118 | if (oh->_state != _HWMOD_STATE_INITIALIZED) |
1793 | if (r) { | 2119 | return -EINVAL; |
1794 | pr_warning("omap_hwmod: %s: cannot be enabled (%d)\n", | 2120 | |
1795 | oh->name, oh->_state); | 2121 | if (oh->rst_lines_cnt == 0) { |
1796 | return 0; | 2122 | r = _enable(oh); |
2123 | if (r) { | ||
2124 | pr_warning("omap_hwmod: %s: cannot be enabled for reset (%d)\n", | ||
2125 | oh->name, oh->_state); | ||
2126 | return -EINVAL; | ||
2127 | } | ||
1797 | } | 2128 | } |
1798 | 2129 | ||
1799 | if (!(oh->flags & HWMOD_INIT_NO_RESET)) | 2130 | if (!(oh->flags & HWMOD_INIT_NO_RESET)) |
1800 | _reset(oh); | 2131 | r = _reset(oh); |
2132 | |||
2133 | return r; | ||
2134 | } | ||
2135 | |||
2136 | /** | ||
2137 | * _setup_postsetup - transition to the appropriate state after _setup | ||
2138 | * @oh: struct omap_hwmod * | ||
2139 | * | ||
2140 | * Place an IP block represented by @oh into a "post-setup" state -- | ||
2141 | * either IDLE, ENABLED, or DISABLED. ("post-setup" simply means that | ||
2142 | * this function is called at the end of _setup().) The postsetup | ||
2143 | * state for an IP block can be changed by calling | ||
2144 | * omap_hwmod_enter_postsetup_state() early in the boot process, | ||
2145 | * before one of the omap_hwmod_setup*() functions are called for the | ||
2146 | * IP block. | ||
2147 | * | ||
2148 | * The IP block stays in this state until a PM runtime-based driver is | ||
2149 | * loaded for that IP block. A post-setup state of IDLE is | ||
2150 | * appropriate for almost all IP blocks with runtime PM-enabled | ||
2151 | * drivers, since those drivers are able to enable the IP block. A | ||
2152 | * post-setup state of ENABLED is appropriate for kernels with PM | ||
2153 | * runtime disabled. The DISABLED state is appropriate for unusual IP | ||
2154 | * blocks such as the MPU WDTIMER on kernels without WDTIMER drivers | ||
2155 | * included, since the WDTIMER starts running on reset and will reset | ||
2156 | * the MPU if left active. | ||
2157 | * | ||
2158 | * This post-setup mechanism is deprecated. Once all of the OMAP | ||
2159 | * drivers have been converted to use PM runtime, and all of the IP | ||
2160 | * block data and interconnect data is available to the hwmod code, it | ||
2161 | * should be possible to replace this mechanism with a "lazy reset" | ||
2162 | * arrangement. In a "lazy reset" setup, each IP block is enabled | ||
2163 | * when the driver first probes, then all remaining IP blocks without | ||
2164 | * drivers are either shut down or enabled after the drivers have | ||
2165 | * loaded. However, this cannot take place until the above | ||
2166 | * preconditions have been met, since otherwise the late reset code | ||
2167 | * has no way of knowing which IP blocks are in use by drivers, and | ||
2168 | * which ones are unused. | ||
2169 | * | ||
2170 | * No return value. | ||
2171 | */ | ||
2172 | static void __init _setup_postsetup(struct omap_hwmod *oh) | ||
2173 | { | ||
2174 | u8 postsetup_state; | ||
2175 | |||
2176 | if (oh->rst_lines_cnt > 0) | ||
2177 | return; | ||
1801 | 2178 | ||
1802 | postsetup_state = oh->_postsetup_state; | 2179 | postsetup_state = oh->_postsetup_state; |
1803 | if (postsetup_state == _HWMOD_STATE_UNKNOWN) | 2180 | if (postsetup_state == _HWMOD_STATE_UNKNOWN) |
@@ -1821,6 +2198,35 @@ static int _setup(struct omap_hwmod *oh, void *data) | |||
1821 | WARN(1, "hwmod: %s: unknown postsetup state %d! defaulting to enabled\n", | 2198 | WARN(1, "hwmod: %s: unknown postsetup state %d! defaulting to enabled\n", |
1822 | oh->name, postsetup_state); | 2199 | oh->name, postsetup_state); |
1823 | 2200 | ||
2201 | return; | ||
2202 | } | ||
2203 | |||
2204 | /** | ||
2205 | * _setup - prepare IP block hardware for use | ||
2206 | * @oh: struct omap_hwmod * | ||
2207 | * @n: (unused, pass NULL) | ||
2208 | * | ||
2209 | * Configure the IP block represented by @oh. This may include | ||
2210 | * enabling the IP block, resetting it, and placing it into a | ||
2211 | * post-setup state, depending on the type of IP block and applicable | ||
2212 | * flags. IP blocks are reset to prevent any previous configuration | ||
2213 | * by the bootloader or previous operating system from interfering | ||
2214 | * with power management or other parts of the system. The reset can | ||
2215 | * be avoided; see omap_hwmod_no_setup_reset(). This is the second of | ||
2216 | * two phases for hwmod initialization. Code called here generally | ||
2217 | * affects the IP block hardware, or system integration hardware | ||
2218 | * associated with the IP block. Returns 0. | ||
2219 | */ | ||
2220 | static int __init _setup(struct omap_hwmod *oh, void *data) | ||
2221 | { | ||
2222 | if (oh->_state != _HWMOD_STATE_INITIALIZED) | ||
2223 | return 0; | ||
2224 | |||
2225 | _setup_iclk_autoidle(oh); | ||
2226 | |||
2227 | if (!_setup_reset(oh)) | ||
2228 | _setup_postsetup(oh); | ||
2229 | |||
1824 | return 0; | 2230 | return 0; |
1825 | } | 2231 | } |
1826 | 2232 | ||
@@ -1843,8 +2249,6 @@ static int _setup(struct omap_hwmod *oh, void *data) | |||
1843 | */ | 2249 | */ |
1844 | static int __init _register(struct omap_hwmod *oh) | 2250 | static int __init _register(struct omap_hwmod *oh) |
1845 | { | 2251 | { |
1846 | int ms_id; | ||
1847 | |||
1848 | if (!oh || !oh->name || !oh->class || !oh->class->name || | 2252 | if (!oh || !oh->name || !oh->class || !oh->class->name || |
1849 | (oh->_state != _HWMOD_STATE_UNKNOWN)) | 2253 | (oh->_state != _HWMOD_STATE_UNKNOWN)) |
1850 | return -EINVAL; | 2254 | return -EINVAL; |
@@ -1854,14 +2258,10 @@ static int __init _register(struct omap_hwmod *oh) | |||
1854 | if (_lookup(oh->name)) | 2258 | if (_lookup(oh->name)) |
1855 | return -EEXIST; | 2259 | return -EEXIST; |
1856 | 2260 | ||
1857 | ms_id = _find_mpu_port_index(oh); | ||
1858 | if (!IS_ERR_VALUE(ms_id)) | ||
1859 | oh->_mpu_port_index = ms_id; | ||
1860 | else | ||
1861 | oh->_int_flags |= _HWMOD_NO_MPU_PORT; | ||
1862 | |||
1863 | list_add_tail(&oh->node, &omap_hwmod_list); | 2261 | list_add_tail(&oh->node, &omap_hwmod_list); |
1864 | 2262 | ||
2263 | INIT_LIST_HEAD(&oh->master_ports); | ||
2264 | INIT_LIST_HEAD(&oh->slave_ports); | ||
1865 | spin_lock_init(&oh->_lock); | 2265 | spin_lock_init(&oh->_lock); |
1866 | 2266 | ||
1867 | oh->_state = _HWMOD_STATE_REGISTERED; | 2267 | oh->_state = _HWMOD_STATE_REGISTERED; |
@@ -1876,6 +2276,160 @@ static int __init _register(struct omap_hwmod *oh) | |||
1876 | return 0; | 2276 | return 0; |
1877 | } | 2277 | } |
1878 | 2278 | ||
2279 | /** | ||
2280 | * _alloc_links - return allocated memory for hwmod links | ||
2281 | * @ml: pointer to a struct omap_hwmod_link * for the master link | ||
2282 | * @sl: pointer to a struct omap_hwmod_link * for the slave link | ||
2283 | * | ||
2284 | * Return pointers to two struct omap_hwmod_link records, via the | ||
2285 | * addresses pointed to by @ml and @sl. Will first attempt to return | ||
2286 | * memory allocated as part of a large initial block, but if that has | ||
2287 | * been exhausted, will allocate memory itself. Since ideally this | ||
2288 | * second allocation path will never occur, the number of these | ||
2289 | * 'supplemental' allocations will be logged when debugging is | ||
2290 | * enabled. Returns 0. | ||
2291 | */ | ||
2292 | static int __init _alloc_links(struct omap_hwmod_link **ml, | ||
2293 | struct omap_hwmod_link **sl) | ||
2294 | { | ||
2295 | unsigned int sz; | ||
2296 | |||
2297 | if ((free_ls + LINKS_PER_OCP_IF) <= max_ls) { | ||
2298 | *ml = &linkspace[free_ls++]; | ||
2299 | *sl = &linkspace[free_ls++]; | ||
2300 | return 0; | ||
2301 | } | ||
2302 | |||
2303 | sz = sizeof(struct omap_hwmod_link) * LINKS_PER_OCP_IF; | ||
2304 | |||
2305 | *sl = NULL; | ||
2306 | *ml = alloc_bootmem(sz); | ||
2307 | |||
2308 | memset(*ml, 0, sz); | ||
2309 | |||
2310 | *sl = (void *)(*ml) + sizeof(struct omap_hwmod_link); | ||
2311 | |||
2312 | ls_supp++; | ||
2313 | pr_debug("omap_hwmod: supplemental link allocations needed: %d\n", | ||
2314 | ls_supp * LINKS_PER_OCP_IF); | ||
2315 | |||
2316 | return 0; | ||
2317 | }; | ||
2318 | |||
2319 | /** | ||
2320 | * _add_link - add an interconnect between two IP blocks | ||
2321 | * @oi: pointer to a struct omap_hwmod_ocp_if record | ||
2322 | * | ||
2323 | * Add struct omap_hwmod_link records connecting the master IP block | ||
2324 | * specified in @oi->master to @oi, and connecting the slave IP block | ||
2325 | * specified in @oi->slave to @oi. This code is assumed to run before | ||
2326 | * preemption or SMP has been enabled, thus avoiding the need for | ||
2327 | * locking in this code. Changes to this assumption will require | ||
2328 | * additional locking. Returns 0. | ||
2329 | */ | ||
2330 | static int __init _add_link(struct omap_hwmod_ocp_if *oi) | ||
2331 | { | ||
2332 | struct omap_hwmod_link *ml, *sl; | ||
2333 | |||
2334 | pr_debug("omap_hwmod: %s -> %s: adding link\n", oi->master->name, | ||
2335 | oi->slave->name); | ||
2336 | |||
2337 | _alloc_links(&ml, &sl); | ||
2338 | |||
2339 | ml->ocp_if = oi; | ||
2340 | INIT_LIST_HEAD(&ml->node); | ||
2341 | list_add(&ml->node, &oi->master->master_ports); | ||
2342 | oi->master->masters_cnt++; | ||
2343 | |||
2344 | sl->ocp_if = oi; | ||
2345 | INIT_LIST_HEAD(&sl->node); | ||
2346 | list_add(&sl->node, &oi->slave->slave_ports); | ||
2347 | oi->slave->slaves_cnt++; | ||
2348 | |||
2349 | return 0; | ||
2350 | } | ||
2351 | |||
2352 | /** | ||
2353 | * _register_link - register a struct omap_hwmod_ocp_if | ||
2354 | * @oi: struct omap_hwmod_ocp_if * | ||
2355 | * | ||
2356 | * Registers the omap_hwmod_ocp_if record @oi. Returns -EEXIST if it | ||
2357 | * has already been registered; -EINVAL if @oi is NULL or if the | ||
2358 | * record pointed to by @oi is missing required fields; or 0 upon | ||
2359 | * success. | ||
2360 | * | ||
2361 | * XXX The data should be copied into bootmem, so the original data | ||
2362 | * should be marked __initdata and freed after init. This would allow | ||
2363 | * unneeded omap_hwmods to be freed on multi-OMAP configurations. | ||
2364 | */ | ||
2365 | static int __init _register_link(struct omap_hwmod_ocp_if *oi) | ||
2366 | { | ||
2367 | if (!oi || !oi->master || !oi->slave || !oi->user) | ||
2368 | return -EINVAL; | ||
2369 | |||
2370 | if (oi->_int_flags & _OCPIF_INT_FLAGS_REGISTERED) | ||
2371 | return -EEXIST; | ||
2372 | |||
2373 | pr_debug("omap_hwmod: registering link from %s to %s\n", | ||
2374 | oi->master->name, oi->slave->name); | ||
2375 | |||
2376 | /* | ||
2377 | * Register the connected hwmods, if they haven't been | ||
2378 | * registered already | ||
2379 | */ | ||
2380 | if (oi->master->_state != _HWMOD_STATE_REGISTERED) | ||
2381 | _register(oi->master); | ||
2382 | |||
2383 | if (oi->slave->_state != _HWMOD_STATE_REGISTERED) | ||
2384 | _register(oi->slave); | ||
2385 | |||
2386 | _add_link(oi); | ||
2387 | |||
2388 | oi->_int_flags |= _OCPIF_INT_FLAGS_REGISTERED; | ||
2389 | |||
2390 | return 0; | ||
2391 | } | ||
2392 | |||
2393 | /** | ||
2394 | * _alloc_linkspace - allocate large block of hwmod links | ||
2395 | * @ois: pointer to an array of struct omap_hwmod_ocp_if records to count | ||
2396 | * | ||
2397 | * Allocate a large block of struct omap_hwmod_link records. This | ||
2398 | * improves boot time significantly by avoiding the need to allocate | ||
2399 | * individual records one by one. If the number of records to | ||
2400 | * allocate in the block hasn't been manually specified, this function | ||
2401 | * will count the number of struct omap_hwmod_ocp_if records in @ois | ||
2402 | * and use that to determine the allocation size. For SoC families | ||
2403 | * that require multiple list registrations, such as OMAP3xxx, this | ||
2404 | * estimation process isn't optimal, so manual estimation is advised | ||
2405 | * in those cases. Returns -EEXIST if the allocation has already occurred | ||
2406 | * or 0 upon success. | ||
2407 | */ | ||
2408 | static int __init _alloc_linkspace(struct omap_hwmod_ocp_if **ois) | ||
2409 | { | ||
2410 | unsigned int i = 0; | ||
2411 | unsigned int sz; | ||
2412 | |||
2413 | if (linkspace) { | ||
2414 | WARN(1, "linkspace already allocated\n"); | ||
2415 | return -EEXIST; | ||
2416 | } | ||
2417 | |||
2418 | if (max_ls == 0) | ||
2419 | while (ois[i++]) | ||
2420 | max_ls += LINKS_PER_OCP_IF; | ||
2421 | |||
2422 | sz = sizeof(struct omap_hwmod_link) * max_ls; | ||
2423 | |||
2424 | pr_debug("omap_hwmod: %s: allocating %d byte linkspace (%d links)\n", | ||
2425 | __func__, sz, max_ls); | ||
2426 | |||
2427 | linkspace = alloc_bootmem(sz); | ||
2428 | |||
2429 | memset(linkspace, 0, sz); | ||
2430 | |||
2431 | return 0; | ||
2432 | } | ||
1879 | 2433 | ||
1880 | /* Public functions */ | 2434 | /* Public functions */ |
1881 | 2435 | ||
@@ -2004,120 +2558,101 @@ int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data), | |||
2004 | } | 2558 | } |
2005 | 2559 | ||
2006 | /** | 2560 | /** |
2007 | * omap_hwmod_register - register an array of hwmods | 2561 | * omap_hwmod_register_links - register an array of hwmod links |
2008 | * @ohs: pointer to an array of omap_hwmods to register | 2562 | * @ois: pointer to an array of omap_hwmod_ocp_if to register |
2009 | * | 2563 | * |
2010 | * Intended to be called early in boot before the clock framework is | 2564 | * Intended to be called early in boot before the clock framework is |
2011 | * initialized. If @ohs is not null, will register all omap_hwmods | 2565 | * initialized. If @ois is not null, will register all omap_hwmods |
2012 | * listed in @ohs that are valid for this chip. Returns 0. | 2566 | * listed in @ois that are valid for this chip. Returns 0. |
2013 | */ | 2567 | */ |
2014 | int __init omap_hwmod_register(struct omap_hwmod **ohs) | 2568 | int __init omap_hwmod_register_links(struct omap_hwmod_ocp_if **ois) |
2015 | { | 2569 | { |
2016 | int r, i; | 2570 | int r, i; |
2017 | 2571 | ||
2018 | if (!ohs) | 2572 | if (!ois) |
2019 | return 0; | 2573 | return 0; |
2020 | 2574 | ||
2575 | if (!linkspace) { | ||
2576 | if (_alloc_linkspace(ois)) { | ||
2577 | pr_err("omap_hwmod: could not allocate link space\n"); | ||
2578 | return -ENOMEM; | ||
2579 | } | ||
2580 | } | ||
2581 | |||
2021 | i = 0; | 2582 | i = 0; |
2022 | do { | 2583 | do { |
2023 | r = _register(ohs[i]); | 2584 | r = _register_link(ois[i]); |
2024 | WARN(r, "omap_hwmod: %s: _register returned %d\n", ohs[i]->name, | 2585 | WARN(r && r != -EEXIST, |
2025 | r); | 2586 | "omap_hwmod: _register_link(%s -> %s) returned %d\n", |
2026 | } while (ohs[++i]); | 2587 | ois[i]->master->name, ois[i]->slave->name, r); |
2588 | } while (ois[++i]); | ||
2027 | 2589 | ||
2028 | return 0; | 2590 | return 0; |
2029 | } | 2591 | } |
2030 | 2592 | ||
2031 | /* | 2593 | /** |
2032 | * _populate_mpu_rt_base - populate the virtual address for a hwmod | 2594 | * _ensure_mpu_hwmod_is_setup - ensure the MPU SS hwmod is init'ed and set up |
2595 | * @oh: pointer to the hwmod currently being set up (usually not the MPU) | ||
2033 | * | 2596 | * |
2034 | * Must be called only from omap_hwmod_setup_*() so ioremap works properly. | 2597 | * If the hwmod data corresponding to the MPU subsystem IP block |
2035 | * Assumes the caller takes care of locking if needed. | 2598 | * hasn't been initialized and set up yet, do so now. This must be |
2599 | * done first since sleep dependencies may be added from other hwmods | ||
2600 | * to the MPU. Intended to be called only by omap_hwmod_setup*(). No | ||
2601 | * return value. | ||
2036 | */ | 2602 | */ |
2037 | static int __init _populate_mpu_rt_base(struct omap_hwmod *oh, void *data) | 2603 | static void __init _ensure_mpu_hwmod_is_setup(struct omap_hwmod *oh) |
2038 | { | 2604 | { |
2039 | if (oh->_state != _HWMOD_STATE_REGISTERED) | 2605 | if (!mpu_oh || mpu_oh->_state == _HWMOD_STATE_UNKNOWN) |
2040 | return 0; | 2606 | pr_err("omap_hwmod: %s: MPU initiator hwmod %s not yet registered\n", |
2041 | 2607 | __func__, MPU_INITIATOR_NAME); | |
2042 | if (oh->_int_flags & _HWMOD_NO_MPU_PORT) | 2608 | else if (mpu_oh->_state == _HWMOD_STATE_REGISTERED && oh != mpu_oh) |
2043 | return 0; | 2609 | omap_hwmod_setup_one(MPU_INITIATOR_NAME); |
2044 | |||
2045 | oh->_mpu_rt_va = _find_mpu_rt_base(oh, oh->_mpu_port_index); | ||
2046 | |||
2047 | return 0; | ||
2048 | } | 2610 | } |
2049 | 2611 | ||
2050 | /** | 2612 | /** |
2051 | * omap_hwmod_setup_one - set up a single hwmod | 2613 | * omap_hwmod_setup_one - set up a single hwmod |
2052 | * @oh_name: const char * name of the already-registered hwmod to set up | 2614 | * @oh_name: const char * name of the already-registered hwmod to set up |
2053 | * | 2615 | * |
2054 | * Must be called after omap2_clk_init(). Resolves the struct clk | 2616 | * Initialize and set up a single hwmod. Intended to be used for a |
2055 | * names to struct clk pointers for each registered omap_hwmod. Also | 2617 | * small number of early devices, such as the timer IP blocks used for |
2056 | * calls _setup() on each hwmod. Returns -EINVAL upon error or 0 upon | 2618 | * the scheduler clock. Must be called after omap2_clk_init(). |
2057 | * success. | 2619 | * Resolves the struct clk names to struct clk pointers for each |
2620 | * registered omap_hwmod. Also calls _setup() on each hwmod. Returns | ||
2621 | * -EINVAL upon error or 0 upon success. | ||
2058 | */ | 2622 | */ |
2059 | int __init omap_hwmod_setup_one(const char *oh_name) | 2623 | int __init omap_hwmod_setup_one(const char *oh_name) |
2060 | { | 2624 | { |
2061 | struct omap_hwmod *oh; | 2625 | struct omap_hwmod *oh; |
2062 | int r; | ||
2063 | 2626 | ||
2064 | pr_debug("omap_hwmod: %s: %s\n", oh_name, __func__); | 2627 | pr_debug("omap_hwmod: %s: %s\n", oh_name, __func__); |
2065 | 2628 | ||
2066 | if (!mpu_oh) { | ||
2067 | pr_err("omap_hwmod: %s: cannot setup_one: MPU initiator hwmod %s not yet registered\n", | ||
2068 | oh_name, MPU_INITIATOR_NAME); | ||
2069 | return -EINVAL; | ||
2070 | } | ||
2071 | |||
2072 | oh = _lookup(oh_name); | 2629 | oh = _lookup(oh_name); |
2073 | if (!oh) { | 2630 | if (!oh) { |
2074 | WARN(1, "omap_hwmod: %s: hwmod not yet registered\n", oh_name); | 2631 | WARN(1, "omap_hwmod: %s: hwmod not yet registered\n", oh_name); |
2075 | return -EINVAL; | 2632 | return -EINVAL; |
2076 | } | 2633 | } |
2077 | 2634 | ||
2078 | if (mpu_oh->_state == _HWMOD_STATE_REGISTERED && oh != mpu_oh) | 2635 | _ensure_mpu_hwmod_is_setup(oh); |
2079 | omap_hwmod_setup_one(MPU_INITIATOR_NAME); | ||
2080 | |||
2081 | r = _populate_mpu_rt_base(oh, NULL); | ||
2082 | if (IS_ERR_VALUE(r)) { | ||
2083 | WARN(1, "omap_hwmod: %s: couldn't set mpu_rt_base\n", oh_name); | ||
2084 | return -EINVAL; | ||
2085 | } | ||
2086 | |||
2087 | r = _init_clocks(oh, NULL); | ||
2088 | if (IS_ERR_VALUE(r)) { | ||
2089 | WARN(1, "omap_hwmod: %s: couldn't init clocks\n", oh_name); | ||
2090 | return -EINVAL; | ||
2091 | } | ||
2092 | 2636 | ||
2637 | _init(oh, NULL); | ||
2093 | _setup(oh, NULL); | 2638 | _setup(oh, NULL); |
2094 | 2639 | ||
2095 | return 0; | 2640 | return 0; |
2096 | } | 2641 | } |
2097 | 2642 | ||
2098 | /** | 2643 | /** |
2099 | * omap_hwmod_setup - do some post-clock framework initialization | 2644 | * omap_hwmod_setup_all - set up all registered IP blocks |
2100 | * | 2645 | * |
2101 | * Must be called after omap2_clk_init(). Resolves the struct clk names | 2646 | * Initialize and set up all IP blocks registered with the hwmod code. |
2102 | * to struct clk pointers for each registered omap_hwmod. Also calls | 2647 | * Must be called after omap2_clk_init(). Resolves the struct clk |
2103 | * _setup() on each hwmod. Returns 0 upon success. | 2648 | * names to struct clk pointers for each registered omap_hwmod. Also |
2649 | * calls _setup() on each hwmod. Returns 0 upon success. | ||
2104 | */ | 2650 | */ |
2105 | static int __init omap_hwmod_setup_all(void) | 2651 | static int __init omap_hwmod_setup_all(void) |
2106 | { | 2652 | { |
2107 | int r; | 2653 | _ensure_mpu_hwmod_is_setup(NULL); |
2108 | |||
2109 | if (!mpu_oh) { | ||
2110 | pr_err("omap_hwmod: %s: MPU initiator hwmod %s not yet registered\n", | ||
2111 | __func__, MPU_INITIATOR_NAME); | ||
2112 | return -EINVAL; | ||
2113 | } | ||
2114 | |||
2115 | r = omap_hwmod_for_each(_populate_mpu_rt_base, NULL); | ||
2116 | |||
2117 | r = omap_hwmod_for_each(_init_clocks, NULL); | ||
2118 | WARN(IS_ERR_VALUE(r), | ||
2119 | "omap_hwmod: %s: _init_clocks failed\n", __func__); | ||
2120 | 2654 | ||
2655 | omap_hwmod_for_each(_init, NULL); | ||
2121 | omap_hwmod_for_each(_setup, NULL); | 2656 | omap_hwmod_for_each(_setup, NULL); |
2122 | 2657 | ||
2123 | return 0; | 2658 | return 0; |
@@ -2274,6 +2809,10 @@ int omap_hwmod_reset(struct omap_hwmod *oh) | |||
2274 | return r; | 2809 | return r; |
2275 | } | 2810 | } |
2276 | 2811 | ||
2812 | /* | ||
2813 | * IP block data retrieval functions | ||
2814 | */ | ||
2815 | |||
2277 | /** | 2816 | /** |
2278 | * omap_hwmod_count_resources - count number of struct resources needed by hwmod | 2817 | * omap_hwmod_count_resources - count number of struct resources needed by hwmod |
2279 | * @oh: struct omap_hwmod * | 2818 | * @oh: struct omap_hwmod * |
@@ -2292,12 +2831,19 @@ int omap_hwmod_reset(struct omap_hwmod *oh) | |||
2292 | */ | 2831 | */ |
2293 | int omap_hwmod_count_resources(struct omap_hwmod *oh) | 2832 | int omap_hwmod_count_resources(struct omap_hwmod *oh) |
2294 | { | 2833 | { |
2295 | int ret, i; | 2834 | struct omap_hwmod_ocp_if *os; |
2835 | struct list_head *p; | ||
2836 | int ret; | ||
2837 | int i = 0; | ||
2296 | 2838 | ||
2297 | ret = _count_mpu_irqs(oh) + _count_sdma_reqs(oh); | 2839 | ret = _count_mpu_irqs(oh) + _count_sdma_reqs(oh); |
2298 | 2840 | ||
2299 | for (i = 0; i < oh->slaves_cnt; i++) | 2841 | p = oh->slave_ports.next; |
2300 | ret += _count_ocp_if_addr_spaces(oh->slaves[i]); | 2842 | |
2843 | while (i < oh->slaves_cnt) { | ||
2844 | os = _fetch_next_ocp_if(&p, &i); | ||
2845 | ret += _count_ocp_if_addr_spaces(os); | ||
2846 | } | ||
2301 | 2847 | ||
2302 | return ret; | 2848 | return ret; |
2303 | } | 2849 | } |
@@ -2314,7 +2860,9 @@ int omap_hwmod_count_resources(struct omap_hwmod *oh) | |||
2314 | */ | 2860 | */ |
2315 | int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res) | 2861 | int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res) |
2316 | { | 2862 | { |
2317 | int i, j, mpu_irqs_cnt, sdma_reqs_cnt; | 2863 | struct omap_hwmod_ocp_if *os; |
2864 | struct list_head *p; | ||
2865 | int i, j, mpu_irqs_cnt, sdma_reqs_cnt, addr_cnt; | ||
2318 | int r = 0; | 2866 | int r = 0; |
2319 | 2867 | ||
2320 | /* For each IRQ, DMA, memory area, fill in array.*/ | 2868 | /* For each IRQ, DMA, memory area, fill in array.*/ |
@@ -2337,11 +2885,11 @@ int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res) | |||
2337 | r++; | 2885 | r++; |
2338 | } | 2886 | } |
2339 | 2887 | ||
2340 | for (i = 0; i < oh->slaves_cnt; i++) { | 2888 | p = oh->slave_ports.next; |
2341 | struct omap_hwmod_ocp_if *os; | ||
2342 | int addr_cnt; | ||
2343 | 2889 | ||
2344 | os = oh->slaves[i]; | 2890 | i = 0; |
2891 | while (i < oh->slaves_cnt) { | ||
2892 | os = _fetch_next_ocp_if(&p, &i); | ||
2345 | addr_cnt = _count_ocp_if_addr_spaces(os); | 2893 | addr_cnt = _count_ocp_if_addr_spaces(os); |
2346 | 2894 | ||
2347 | for (j = 0; j < addr_cnt; j++) { | 2895 | for (j = 0; j < addr_cnt; j++) { |
@@ -2357,6 +2905,69 @@ int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res) | |||
2357 | } | 2905 | } |
2358 | 2906 | ||
2359 | /** | 2907 | /** |
2908 | * omap_hwmod_get_resource_byname - fetch IP block integration data by name | ||
2909 | * @oh: struct omap_hwmod * to operate on | ||
2910 | * @type: one of the IORESOURCE_* constants from include/linux/ioport.h | ||
2911 | * @name: pointer to the name of the data to fetch (optional) | ||
2912 | * @rsrc: pointer to a struct resource, allocated by the caller | ||
2913 | * | ||
2914 | * Retrieve MPU IRQ, SDMA request line, or address space start/end | ||
2915 | * data for the IP block pointed to by @oh. The data will be filled | ||
2916 | * into a struct resource record pointed to by @rsrc. The struct | ||
2917 | * resource must be allocated by the caller. When @name is non-null, | ||
2918 | * the data associated with the matching entry in the IRQ/SDMA/address | ||
2919 | * space hwmod data arrays will be returned. If @name is null, the | ||
2920 | * first array entry will be returned. Data order is not meaningful | ||
2921 | * in hwmod data, so callers are strongly encouraged to use a non-null | ||
2922 | * @name whenever possible to avoid unpredictable effects if hwmod | ||
2923 | * data is later added that causes data ordering to change. This | ||
2924 | * function is only intended for use by OMAP core code. Device | ||
2925 | * drivers should not call this function - the appropriate bus-related | ||
2926 | * data accessor functions should be used instead. Returns 0 upon | ||
2927 | * success or a negative error code upon error. | ||
2928 | */ | ||
2929 | int omap_hwmod_get_resource_byname(struct omap_hwmod *oh, unsigned int type, | ||
2930 | const char *name, struct resource *rsrc) | ||
2931 | { | ||
2932 | int r; | ||
2933 | unsigned int irq, dma; | ||
2934 | u32 pa_start, pa_end; | ||
2935 | |||
2936 | if (!oh || !rsrc) | ||
2937 | return -EINVAL; | ||
2938 | |||
2939 | if (type == IORESOURCE_IRQ) { | ||
2940 | r = _get_mpu_irq_by_name(oh, name, &irq); | ||
2941 | if (r) | ||
2942 | return r; | ||
2943 | |||
2944 | rsrc->start = irq; | ||
2945 | rsrc->end = irq; | ||
2946 | } else if (type == IORESOURCE_DMA) { | ||
2947 | r = _get_sdma_req_by_name(oh, name, &dma); | ||
2948 | if (r) | ||
2949 | return r; | ||
2950 | |||
2951 | rsrc->start = dma; | ||
2952 | rsrc->end = dma; | ||
2953 | } else if (type == IORESOURCE_MEM) { | ||
2954 | r = _get_addr_space_by_name(oh, name, &pa_start, &pa_end); | ||
2955 | if (r) | ||
2956 | return r; | ||
2957 | |||
2958 | rsrc->start = pa_start; | ||
2959 | rsrc->end = pa_end; | ||
2960 | } else { | ||
2961 | return -EINVAL; | ||
2962 | } | ||
2963 | |||
2964 | rsrc->flags = type; | ||
2965 | rsrc->name = name; | ||
2966 | |||
2967 | return 0; | ||
2968 | } | ||
2969 | |||
2970 | /** | ||
2360 | * omap_hwmod_get_pwrdm - return pointer to this module's main powerdomain | 2971 | * omap_hwmod_get_pwrdm - return pointer to this module's main powerdomain |
2361 | * @oh: struct omap_hwmod * | 2972 | * @oh: struct omap_hwmod * |
2362 | * | 2973 | * |
@@ -2370,6 +2981,7 @@ int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res) | |||
2370 | struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh) | 2981 | struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh) |
2371 | { | 2982 | { |
2372 | struct clk *c; | 2983 | struct clk *c; |
2984 | struct omap_hwmod_ocp_if *oi; | ||
2373 | 2985 | ||
2374 | if (!oh) | 2986 | if (!oh) |
2375 | return NULL; | 2987 | return NULL; |
@@ -2377,9 +2989,10 @@ struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh) | |||
2377 | if (oh->_clk) { | 2989 | if (oh->_clk) { |
2378 | c = oh->_clk; | 2990 | c = oh->_clk; |
2379 | } else { | 2991 | } else { |
2380 | if (oh->_int_flags & _HWMOD_NO_MPU_PORT) | 2992 | oi = _find_mpu_rt_port(oh); |
2993 | if (!oi) | ||
2381 | return NULL; | 2994 | return NULL; |
2382 | c = oh->slaves[oh->_mpu_port_index]->_clk; | 2995 | c = oi->_clk; |
2383 | } | 2996 | } |
2384 | 2997 | ||
2385 | if (!c->clkdm) | 2998 | if (!c->clkdm) |
@@ -2653,10 +3266,10 @@ int omap_hwmod_for_each_by_class(const char *classname, | |||
2653 | * @state: state that _setup() should leave the hwmod in | 3266 | * @state: state that _setup() should leave the hwmod in |
2654 | * | 3267 | * |
2655 | * Sets the hwmod state that @oh will enter at the end of _setup() | 3268 | * Sets the hwmod state that @oh will enter at the end of _setup() |
2656 | * (called by omap_hwmod_setup_*()). Only valid to call between | 3269 | * (called by omap_hwmod_setup_*()). See also the documentation |
2657 | * calling omap_hwmod_register() and omap_hwmod_setup_*(). Returns | 3270 | * for _setup_postsetup(), above. Returns 0 upon success or |
2658 | * 0 upon success or -EINVAL if there is a problem with the arguments | 3271 | * -EINVAL if there is a problem with the arguments or if the hwmod is |
2659 | * or if the hwmod is in the wrong state. | 3272 | * in the wrong state. |
2660 | */ | 3273 | */ |
2661 | int omap_hwmod_set_postsetup_state(struct omap_hwmod *oh, u8 state) | 3274 | int omap_hwmod_set_postsetup_state(struct omap_hwmod *oh, u8 state) |
2662 | { | 3275 | { |
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c index a6bde34e443..2c087ffc6a9 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c | |||
@@ -2,6 +2,7 @@ | |||
2 | * omap_hwmod_2420_data.c - hardware modules present on the OMAP2420 chips | 2 | * omap_hwmod_2420_data.c - hardware modules present on the OMAP2420 chips |
3 | * | 3 | * |
4 | * Copyright (C) 2009-2011 Nokia Corporation | 4 | * Copyright (C) 2009-2011 Nokia Corporation |
5 | * Copyright (C) 2012 Texas Instruments, Inc. | ||
5 | * Paul Walmsley | 6 | * Paul Walmsley |
6 | * | 7 | * |
7 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
@@ -32,707 +33,268 @@ | |||
32 | /* | 33 | /* |
33 | * OMAP2420 hardware module integration data | 34 | * OMAP2420 hardware module integration data |
34 | * | 35 | * |
35 | * ALl of the data in this section should be autogeneratable from the | 36 | * All of the data in this section should be autogeneratable from the |
36 | * TI hardware database or other technical documentation. Data that | 37 | * TI hardware database or other technical documentation. Data that |
37 | * is driver-specific or driver-kernel integration-specific belongs | 38 | * is driver-specific or driver-kernel integration-specific belongs |
38 | * elsewhere. | 39 | * elsewhere. |
39 | */ | 40 | */ |
40 | 41 | ||
41 | static struct omap_hwmod omap2420_mpu_hwmod; | ||
42 | static struct omap_hwmod omap2420_iva_hwmod; | ||
43 | static struct omap_hwmod omap2420_l3_main_hwmod; | ||
44 | static struct omap_hwmod omap2420_l4_core_hwmod; | ||
45 | static struct omap_hwmod omap2420_dss_core_hwmod; | ||
46 | static struct omap_hwmod omap2420_dss_dispc_hwmod; | ||
47 | static struct omap_hwmod omap2420_dss_rfbi_hwmod; | ||
48 | static struct omap_hwmod omap2420_dss_venc_hwmod; | ||
49 | static struct omap_hwmod omap2420_wd_timer2_hwmod; | ||
50 | static struct omap_hwmod omap2420_gpio1_hwmod; | ||
51 | static struct omap_hwmod omap2420_gpio2_hwmod; | ||
52 | static struct omap_hwmod omap2420_gpio3_hwmod; | ||
53 | static struct omap_hwmod omap2420_gpio4_hwmod; | ||
54 | static struct omap_hwmod omap2420_dma_system_hwmod; | ||
55 | static struct omap_hwmod omap2420_mcspi1_hwmod; | ||
56 | static struct omap_hwmod omap2420_mcspi2_hwmod; | ||
57 | |||
58 | /* L3 -> L4_CORE interface */ | ||
59 | static struct omap_hwmod_ocp_if omap2420_l3_main__l4_core = { | ||
60 | .master = &omap2420_l3_main_hwmod, | ||
61 | .slave = &omap2420_l4_core_hwmod, | ||
62 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
63 | }; | ||
64 | |||
65 | /* MPU -> L3 interface */ | ||
66 | static struct omap_hwmod_ocp_if omap2420_mpu__l3_main = { | ||
67 | .master = &omap2420_mpu_hwmod, | ||
68 | .slave = &omap2420_l3_main_hwmod, | ||
69 | .user = OCP_USER_MPU, | ||
70 | }; | ||
71 | |||
72 | /* Slave interfaces on the L3 interconnect */ | ||
73 | static struct omap_hwmod_ocp_if *omap2420_l3_main_slaves[] = { | ||
74 | &omap2420_mpu__l3_main, | ||
75 | }; | ||
76 | |||
77 | /* DSS -> l3 */ | ||
78 | static struct omap_hwmod_ocp_if omap2420_dss__l3 = { | ||
79 | .master = &omap2420_dss_core_hwmod, | ||
80 | .slave = &omap2420_l3_main_hwmod, | ||
81 | .fw = { | ||
82 | .omap2 = { | ||
83 | .l3_perm_bit = OMAP2_L3_CORE_FW_CONNID_DSS, | ||
84 | .flags = OMAP_FIREWALL_L3, | ||
85 | } | ||
86 | }, | ||
87 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
88 | }; | ||
89 | |||
90 | /* Master interfaces on the L3 interconnect */ | ||
91 | static struct omap_hwmod_ocp_if *omap2420_l3_main_masters[] = { | ||
92 | &omap2420_l3_main__l4_core, | ||
93 | }; | ||
94 | |||
95 | /* L3 */ | ||
96 | static struct omap_hwmod omap2420_l3_main_hwmod = { | ||
97 | .name = "l3_main", | ||
98 | .class = &l3_hwmod_class, | ||
99 | .masters = omap2420_l3_main_masters, | ||
100 | .masters_cnt = ARRAY_SIZE(omap2420_l3_main_masters), | ||
101 | .slaves = omap2420_l3_main_slaves, | ||
102 | .slaves_cnt = ARRAY_SIZE(omap2420_l3_main_slaves), | ||
103 | .flags = HWMOD_NO_IDLEST, | ||
104 | }; | ||
105 | |||
106 | static struct omap_hwmod omap2420_l4_wkup_hwmod; | ||
107 | static struct omap_hwmod omap2420_uart1_hwmod; | ||
108 | static struct omap_hwmod omap2420_uart2_hwmod; | ||
109 | static struct omap_hwmod omap2420_uart3_hwmod; | ||
110 | static struct omap_hwmod omap2420_i2c1_hwmod; | ||
111 | static struct omap_hwmod omap2420_i2c2_hwmod; | ||
112 | static struct omap_hwmod omap2420_mcbsp1_hwmod; | ||
113 | static struct omap_hwmod omap2420_mcbsp2_hwmod; | ||
114 | |||
115 | /* l4 core -> mcspi1 interface */ | ||
116 | static struct omap_hwmod_ocp_if omap2420_l4_core__mcspi1 = { | ||
117 | .master = &omap2420_l4_core_hwmod, | ||
118 | .slave = &omap2420_mcspi1_hwmod, | ||
119 | .clk = "mcspi1_ick", | ||
120 | .addr = omap2_mcspi1_addr_space, | ||
121 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
122 | }; | ||
123 | |||
124 | /* l4 core -> mcspi2 interface */ | ||
125 | static struct omap_hwmod_ocp_if omap2420_l4_core__mcspi2 = { | ||
126 | .master = &omap2420_l4_core_hwmod, | ||
127 | .slave = &omap2420_mcspi2_hwmod, | ||
128 | .clk = "mcspi2_ick", | ||
129 | .addr = omap2_mcspi2_addr_space, | ||
130 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
131 | }; | ||
132 | |||
133 | /* L4_CORE -> L4_WKUP interface */ | ||
134 | static struct omap_hwmod_ocp_if omap2420_l4_core__l4_wkup = { | ||
135 | .master = &omap2420_l4_core_hwmod, | ||
136 | .slave = &omap2420_l4_wkup_hwmod, | ||
137 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
138 | }; | ||
139 | |||
140 | /* L4 CORE -> UART1 interface */ | ||
141 | static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = { | ||
142 | .master = &omap2420_l4_core_hwmod, | ||
143 | .slave = &omap2420_uart1_hwmod, | ||
144 | .clk = "uart1_ick", | ||
145 | .addr = omap2xxx_uart1_addr_space, | ||
146 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
147 | }; | ||
148 | |||
149 | /* L4 CORE -> UART2 interface */ | ||
150 | static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = { | ||
151 | .master = &omap2420_l4_core_hwmod, | ||
152 | .slave = &omap2420_uart2_hwmod, | ||
153 | .clk = "uart2_ick", | ||
154 | .addr = omap2xxx_uart2_addr_space, | ||
155 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
156 | }; | ||
157 | |||
158 | /* L4 PER -> UART3 interface */ | ||
159 | static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = { | ||
160 | .master = &omap2420_l4_core_hwmod, | ||
161 | .slave = &omap2420_uart3_hwmod, | ||
162 | .clk = "uart3_ick", | ||
163 | .addr = omap2xxx_uart3_addr_space, | ||
164 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
165 | }; | ||
166 | |||
167 | /* L4 CORE -> I2C1 interface */ | ||
168 | static struct omap_hwmod_ocp_if omap2420_l4_core__i2c1 = { | ||
169 | .master = &omap2420_l4_core_hwmod, | ||
170 | .slave = &omap2420_i2c1_hwmod, | ||
171 | .clk = "i2c1_ick", | ||
172 | .addr = omap2_i2c1_addr_space, | ||
173 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
174 | }; | ||
175 | |||
176 | /* L4 CORE -> I2C2 interface */ | ||
177 | static struct omap_hwmod_ocp_if omap2420_l4_core__i2c2 = { | ||
178 | .master = &omap2420_l4_core_hwmod, | ||
179 | .slave = &omap2420_i2c2_hwmod, | ||
180 | .clk = "i2c2_ick", | ||
181 | .addr = omap2_i2c2_addr_space, | ||
182 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
183 | }; | ||
184 | |||
185 | /* Slave interfaces on the L4_CORE interconnect */ | ||
186 | static struct omap_hwmod_ocp_if *omap2420_l4_core_slaves[] = { | ||
187 | &omap2420_l3_main__l4_core, | ||
188 | }; | ||
189 | |||
190 | /* Master interfaces on the L4_CORE interconnect */ | ||
191 | static struct omap_hwmod_ocp_if *omap2420_l4_core_masters[] = { | ||
192 | &omap2420_l4_core__l4_wkup, | ||
193 | &omap2_l4_core__uart1, | ||
194 | &omap2_l4_core__uart2, | ||
195 | &omap2_l4_core__uart3, | ||
196 | &omap2420_l4_core__i2c1, | ||
197 | &omap2420_l4_core__i2c2 | ||
198 | }; | ||
199 | |||
200 | /* L4 CORE */ | ||
201 | static struct omap_hwmod omap2420_l4_core_hwmod = { | ||
202 | .name = "l4_core", | ||
203 | .class = &l4_hwmod_class, | ||
204 | .masters = omap2420_l4_core_masters, | ||
205 | .masters_cnt = ARRAY_SIZE(omap2420_l4_core_masters), | ||
206 | .slaves = omap2420_l4_core_slaves, | ||
207 | .slaves_cnt = ARRAY_SIZE(omap2420_l4_core_slaves), | ||
208 | .flags = HWMOD_NO_IDLEST, | ||
209 | }; | ||
210 | |||
211 | /* Slave interfaces on the L4_WKUP interconnect */ | ||
212 | static struct omap_hwmod_ocp_if *omap2420_l4_wkup_slaves[] = { | ||
213 | &omap2420_l4_core__l4_wkup, | ||
214 | }; | ||
215 | |||
216 | /* Master interfaces on the L4_WKUP interconnect */ | ||
217 | static struct omap_hwmod_ocp_if *omap2420_l4_wkup_masters[] = { | ||
218 | }; | ||
219 | |||
220 | /* L4 WKUP */ | ||
221 | static struct omap_hwmod omap2420_l4_wkup_hwmod = { | ||
222 | .name = "l4_wkup", | ||
223 | .class = &l4_hwmod_class, | ||
224 | .masters = omap2420_l4_wkup_masters, | ||
225 | .masters_cnt = ARRAY_SIZE(omap2420_l4_wkup_masters), | ||
226 | .slaves = omap2420_l4_wkup_slaves, | ||
227 | .slaves_cnt = ARRAY_SIZE(omap2420_l4_wkup_slaves), | ||
228 | .flags = HWMOD_NO_IDLEST, | ||
229 | }; | ||
230 | |||
231 | /* Master interfaces on the MPU device */ | ||
232 | static struct omap_hwmod_ocp_if *omap2420_mpu_masters[] = { | ||
233 | &omap2420_mpu__l3_main, | ||
234 | }; | ||
235 | |||
236 | /* MPU */ | ||
237 | static struct omap_hwmod omap2420_mpu_hwmod = { | ||
238 | .name = "mpu", | ||
239 | .class = &mpu_hwmod_class, | ||
240 | .main_clk = "mpu_ck", | ||
241 | .masters = omap2420_mpu_masters, | ||
242 | .masters_cnt = ARRAY_SIZE(omap2420_mpu_masters), | ||
243 | }; | ||
244 | |||
245 | /* | 42 | /* |
246 | * IVA1 interface data | 43 | * IP blocks |
247 | */ | 44 | */ |
248 | 45 | ||
249 | /* IVA <- L3 interface */ | 46 | /* IVA1 (IVA1) */ |
250 | static struct omap_hwmod_ocp_if omap2420_l3__iva = { | 47 | static struct omap_hwmod_class iva1_hwmod_class = { |
251 | .master = &omap2420_l3_main_hwmod, | 48 | .name = "iva1", |
252 | .slave = &omap2420_iva_hwmod, | ||
253 | .clk = "iva1_ifck", | ||
254 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
255 | }; | 49 | }; |
256 | 50 | ||
257 | static struct omap_hwmod_ocp_if *omap2420_iva_masters[] = { | 51 | static struct omap_hwmod_rst_info omap2420_iva_resets[] = { |
258 | &omap2420_l3__iva, | 52 | { .name = "iva", .rst_shift = 8 }, |
259 | }; | 53 | }; |
260 | 54 | ||
261 | /* | ||
262 | * IVA2 (IVA2) | ||
263 | */ | ||
264 | |||
265 | static struct omap_hwmod omap2420_iva_hwmod = { | 55 | static struct omap_hwmod omap2420_iva_hwmod = { |
266 | .name = "iva", | 56 | .name = "iva", |
267 | .class = &iva_hwmod_class, | 57 | .class = &iva1_hwmod_class, |
268 | .masters = omap2420_iva_masters, | 58 | .clkdm_name = "iva1_clkdm", |
269 | .masters_cnt = ARRAY_SIZE(omap2420_iva_masters), | 59 | .rst_lines = omap2420_iva_resets, |
60 | .rst_lines_cnt = ARRAY_SIZE(omap2420_iva_resets), | ||
61 | .main_clk = "iva1_ifck", | ||
270 | }; | 62 | }; |
271 | 63 | ||
272 | /* always-on timers dev attribute */ | 64 | /* DSP */ |
273 | static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = { | 65 | static struct omap_hwmod_class dsp_hwmod_class = { |
274 | .timer_capability = OMAP_TIMER_ALWON, | 66 | .name = "dsp", |
275 | }; | ||
276 | |||
277 | /* pwm timers dev attribute */ | ||
278 | static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = { | ||
279 | .timer_capability = OMAP_TIMER_HAS_PWM, | ||
280 | }; | ||
281 | |||
282 | /* timer1 */ | ||
283 | static struct omap_hwmod omap2420_timer1_hwmod; | ||
284 | |||
285 | static struct omap_hwmod_addr_space omap2420_timer1_addrs[] = { | ||
286 | { | ||
287 | .pa_start = 0x48028000, | ||
288 | .pa_end = 0x48028000 + SZ_1K - 1, | ||
289 | .flags = ADDR_TYPE_RT | ||
290 | }, | ||
291 | { } | ||
292 | }; | 67 | }; |
293 | 68 | ||
294 | /* l4_wkup -> timer1 */ | 69 | static struct omap_hwmod_rst_info omap2420_dsp_resets[] = { |
295 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__timer1 = { | 70 | { .name = "logic", .rst_shift = 0 }, |
296 | .master = &omap2420_l4_wkup_hwmod, | 71 | { .name = "mmu", .rst_shift = 1 }, |
297 | .slave = &omap2420_timer1_hwmod, | ||
298 | .clk = "gpt1_ick", | ||
299 | .addr = omap2420_timer1_addrs, | ||
300 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
301 | }; | 72 | }; |
302 | 73 | ||
303 | /* timer1 slave port */ | 74 | static struct omap_hwmod omap2420_dsp_hwmod = { |
304 | static struct omap_hwmod_ocp_if *omap2420_timer1_slaves[] = { | 75 | .name = "dsp", |
305 | &omap2420_l4_wkup__timer1, | 76 | .class = &dsp_hwmod_class, |
77 | .clkdm_name = "dsp_clkdm", | ||
78 | .rst_lines = omap2420_dsp_resets, | ||
79 | .rst_lines_cnt = ARRAY_SIZE(omap2420_dsp_resets), | ||
80 | .main_clk = "dsp_fck", | ||
306 | }; | 81 | }; |
307 | 82 | ||
308 | /* timer1 hwmod */ | 83 | /* I2C common */ |
309 | static struct omap_hwmod omap2420_timer1_hwmod = { | 84 | static struct omap_hwmod_class_sysconfig i2c_sysc = { |
310 | .name = "timer1", | 85 | .rev_offs = 0x00, |
311 | .mpu_irqs = omap2_timer1_mpu_irqs, | 86 | .sysc_offs = 0x20, |
312 | .main_clk = "gpt1_fck", | 87 | .syss_offs = 0x10, |
313 | .prcm = { | 88 | .sysc_flags = (SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS), |
314 | .omap2 = { | 89 | .sysc_fields = &omap_hwmod_sysc_type1, |
315 | .prcm_reg_id = 1, | ||
316 | .module_bit = OMAP24XX_EN_GPT1_SHIFT, | ||
317 | .module_offs = WKUP_MOD, | ||
318 | .idlest_reg_id = 1, | ||
319 | .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT, | ||
320 | }, | ||
321 | }, | ||
322 | .dev_attr = &capability_alwon_dev_attr, | ||
323 | .slaves = omap2420_timer1_slaves, | ||
324 | .slaves_cnt = ARRAY_SIZE(omap2420_timer1_slaves), | ||
325 | .class = &omap2xxx_timer_hwmod_class, | ||
326 | }; | 90 | }; |
327 | 91 | ||
328 | /* timer2 */ | 92 | static struct omap_hwmod_class i2c_class = { |
329 | static struct omap_hwmod omap2420_timer2_hwmod; | 93 | .name = "i2c", |
330 | 94 | .sysc = &i2c_sysc, | |
331 | /* l4_core -> timer2 */ | 95 | .rev = OMAP_I2C_IP_VERSION_1, |
332 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer2 = { | 96 | .reset = &omap_i2c_reset, |
333 | .master = &omap2420_l4_core_hwmod, | ||
334 | .slave = &omap2420_timer2_hwmod, | ||
335 | .clk = "gpt2_ick", | ||
336 | .addr = omap2xxx_timer2_addrs, | ||
337 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
338 | }; | 97 | }; |
339 | 98 | ||
340 | /* timer2 slave port */ | 99 | static struct omap_i2c_dev_attr i2c_dev_attr = { |
341 | static struct omap_hwmod_ocp_if *omap2420_timer2_slaves[] = { | 100 | .flags = OMAP_I2C_FLAG_NO_FIFO | |
342 | &omap2420_l4_core__timer2, | 101 | OMAP_I2C_FLAG_SIMPLE_CLOCK | |
102 | OMAP_I2C_FLAG_16BIT_DATA_REG | | ||
103 | OMAP_I2C_FLAG_BUS_SHIFT_2, | ||
343 | }; | 104 | }; |
344 | 105 | ||
345 | /* timer2 hwmod */ | 106 | /* I2C1 */ |
346 | static struct omap_hwmod omap2420_timer2_hwmod = { | 107 | static struct omap_hwmod omap2420_i2c1_hwmod = { |
347 | .name = "timer2", | 108 | .name = "i2c1", |
348 | .mpu_irqs = omap2_timer2_mpu_irqs, | 109 | .mpu_irqs = omap2_i2c1_mpu_irqs, |
349 | .main_clk = "gpt2_fck", | 110 | .sdma_reqs = omap2_i2c1_sdma_reqs, |
111 | .main_clk = "i2c1_fck", | ||
350 | .prcm = { | 112 | .prcm = { |
351 | .omap2 = { | 113 | .omap2 = { |
352 | .prcm_reg_id = 1, | ||
353 | .module_bit = OMAP24XX_EN_GPT2_SHIFT, | ||
354 | .module_offs = CORE_MOD, | 114 | .module_offs = CORE_MOD, |
355 | .idlest_reg_id = 1, | ||
356 | .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT, | ||
357 | }, | ||
358 | }, | ||
359 | .dev_attr = &capability_alwon_dev_attr, | ||
360 | .slaves = omap2420_timer2_slaves, | ||
361 | .slaves_cnt = ARRAY_SIZE(omap2420_timer2_slaves), | ||
362 | .class = &omap2xxx_timer_hwmod_class, | ||
363 | }; | ||
364 | |||
365 | /* timer3 */ | ||
366 | static struct omap_hwmod omap2420_timer3_hwmod; | ||
367 | |||
368 | /* l4_core -> timer3 */ | ||
369 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer3 = { | ||
370 | .master = &omap2420_l4_core_hwmod, | ||
371 | .slave = &omap2420_timer3_hwmod, | ||
372 | .clk = "gpt3_ick", | ||
373 | .addr = omap2xxx_timer3_addrs, | ||
374 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
375 | }; | ||
376 | |||
377 | /* timer3 slave port */ | ||
378 | static struct omap_hwmod_ocp_if *omap2420_timer3_slaves[] = { | ||
379 | &omap2420_l4_core__timer3, | ||
380 | }; | ||
381 | |||
382 | /* timer3 hwmod */ | ||
383 | static struct omap_hwmod omap2420_timer3_hwmod = { | ||
384 | .name = "timer3", | ||
385 | .mpu_irqs = omap2_timer3_mpu_irqs, | ||
386 | .main_clk = "gpt3_fck", | ||
387 | .prcm = { | ||
388 | .omap2 = { | ||
389 | .prcm_reg_id = 1, | 115 | .prcm_reg_id = 1, |
390 | .module_bit = OMAP24XX_EN_GPT3_SHIFT, | 116 | .module_bit = OMAP2420_EN_I2C1_SHIFT, |
391 | .module_offs = CORE_MOD, | ||
392 | .idlest_reg_id = 1, | 117 | .idlest_reg_id = 1, |
393 | .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT, | 118 | .idlest_idle_bit = OMAP2420_ST_I2C1_SHIFT, |
394 | }, | 119 | }, |
395 | }, | 120 | }, |
396 | .dev_attr = &capability_alwon_dev_attr, | 121 | .class = &i2c_class, |
397 | .slaves = omap2420_timer3_slaves, | 122 | .dev_attr = &i2c_dev_attr, |
398 | .slaves_cnt = ARRAY_SIZE(omap2420_timer3_slaves), | 123 | .flags = HWMOD_16BIT_REG, |
399 | .class = &omap2xxx_timer_hwmod_class, | ||
400 | }; | ||
401 | |||
402 | /* timer4 */ | ||
403 | static struct omap_hwmod omap2420_timer4_hwmod; | ||
404 | |||
405 | /* l4_core -> timer4 */ | ||
406 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer4 = { | ||
407 | .master = &omap2420_l4_core_hwmod, | ||
408 | .slave = &omap2420_timer4_hwmod, | ||
409 | .clk = "gpt4_ick", | ||
410 | .addr = omap2xxx_timer4_addrs, | ||
411 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
412 | }; | ||
413 | |||
414 | /* timer4 slave port */ | ||
415 | static struct omap_hwmod_ocp_if *omap2420_timer4_slaves[] = { | ||
416 | &omap2420_l4_core__timer4, | ||
417 | }; | 124 | }; |
418 | 125 | ||
419 | /* timer4 hwmod */ | 126 | /* I2C2 */ |
420 | static struct omap_hwmod omap2420_timer4_hwmod = { | 127 | static struct omap_hwmod omap2420_i2c2_hwmod = { |
421 | .name = "timer4", | 128 | .name = "i2c2", |
422 | .mpu_irqs = omap2_timer4_mpu_irqs, | 129 | .mpu_irqs = omap2_i2c2_mpu_irqs, |
423 | .main_clk = "gpt4_fck", | 130 | .sdma_reqs = omap2_i2c2_sdma_reqs, |
131 | .main_clk = "i2c2_fck", | ||
424 | .prcm = { | 132 | .prcm = { |
425 | .omap2 = { | 133 | .omap2 = { |
426 | .prcm_reg_id = 1, | ||
427 | .module_bit = OMAP24XX_EN_GPT4_SHIFT, | ||
428 | .module_offs = CORE_MOD, | 134 | .module_offs = CORE_MOD, |
429 | .idlest_reg_id = 1, | ||
430 | .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT, | ||
431 | }, | ||
432 | }, | ||
433 | .dev_attr = &capability_alwon_dev_attr, | ||
434 | .slaves = omap2420_timer4_slaves, | ||
435 | .slaves_cnt = ARRAY_SIZE(omap2420_timer4_slaves), | ||
436 | .class = &omap2xxx_timer_hwmod_class, | ||
437 | }; | ||
438 | |||
439 | /* timer5 */ | ||
440 | static struct omap_hwmod omap2420_timer5_hwmod; | ||
441 | |||
442 | /* l4_core -> timer5 */ | ||
443 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer5 = { | ||
444 | .master = &omap2420_l4_core_hwmod, | ||
445 | .slave = &omap2420_timer5_hwmod, | ||
446 | .clk = "gpt5_ick", | ||
447 | .addr = omap2xxx_timer5_addrs, | ||
448 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
449 | }; | ||
450 | |||
451 | /* timer5 slave port */ | ||
452 | static struct omap_hwmod_ocp_if *omap2420_timer5_slaves[] = { | ||
453 | &omap2420_l4_core__timer5, | ||
454 | }; | ||
455 | |||
456 | /* timer5 hwmod */ | ||
457 | static struct omap_hwmod omap2420_timer5_hwmod = { | ||
458 | .name = "timer5", | ||
459 | .mpu_irqs = omap2_timer5_mpu_irqs, | ||
460 | .main_clk = "gpt5_fck", | ||
461 | .prcm = { | ||
462 | .omap2 = { | ||
463 | .prcm_reg_id = 1, | 135 | .prcm_reg_id = 1, |
464 | .module_bit = OMAP24XX_EN_GPT5_SHIFT, | 136 | .module_bit = OMAP2420_EN_I2C2_SHIFT, |
465 | .module_offs = CORE_MOD, | ||
466 | .idlest_reg_id = 1, | 137 | .idlest_reg_id = 1, |
467 | .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT, | 138 | .idlest_idle_bit = OMAP2420_ST_I2C2_SHIFT, |
468 | }, | 139 | }, |
469 | }, | 140 | }, |
470 | .dev_attr = &capability_alwon_dev_attr, | 141 | .class = &i2c_class, |
471 | .slaves = omap2420_timer5_slaves, | 142 | .dev_attr = &i2c_dev_attr, |
472 | .slaves_cnt = ARRAY_SIZE(omap2420_timer5_slaves), | 143 | .flags = HWMOD_16BIT_REG, |
473 | .class = &omap2xxx_timer_hwmod_class, | ||
474 | }; | ||
475 | |||
476 | |||
477 | /* timer6 */ | ||
478 | static struct omap_hwmod omap2420_timer6_hwmod; | ||
479 | |||
480 | /* l4_core -> timer6 */ | ||
481 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer6 = { | ||
482 | .master = &omap2420_l4_core_hwmod, | ||
483 | .slave = &omap2420_timer6_hwmod, | ||
484 | .clk = "gpt6_ick", | ||
485 | .addr = omap2xxx_timer6_addrs, | ||
486 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
487 | }; | ||
488 | |||
489 | /* timer6 slave port */ | ||
490 | static struct omap_hwmod_ocp_if *omap2420_timer6_slaves[] = { | ||
491 | &omap2420_l4_core__timer6, | ||
492 | }; | 144 | }; |
493 | 145 | ||
494 | /* timer6 hwmod */ | 146 | /* dma attributes */ |
495 | static struct omap_hwmod omap2420_timer6_hwmod = { | 147 | static struct omap_dma_dev_attr dma_dev_attr = { |
496 | .name = "timer6", | 148 | .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY | |
497 | .mpu_irqs = omap2_timer6_mpu_irqs, | 149 | IS_CSSA_32 | IS_CDSA_32, |
498 | .main_clk = "gpt6_fck", | 150 | .lch_count = 32, |
499 | .prcm = { | ||
500 | .omap2 = { | ||
501 | .prcm_reg_id = 1, | ||
502 | .module_bit = OMAP24XX_EN_GPT6_SHIFT, | ||
503 | .module_offs = CORE_MOD, | ||
504 | .idlest_reg_id = 1, | ||
505 | .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT, | ||
506 | }, | ||
507 | }, | ||
508 | .dev_attr = &capability_alwon_dev_attr, | ||
509 | .slaves = omap2420_timer6_slaves, | ||
510 | .slaves_cnt = ARRAY_SIZE(omap2420_timer6_slaves), | ||
511 | .class = &omap2xxx_timer_hwmod_class, | ||
512 | }; | 151 | }; |
513 | 152 | ||
514 | /* timer7 */ | 153 | static struct omap_hwmod omap2420_dma_system_hwmod = { |
515 | static struct omap_hwmod omap2420_timer7_hwmod; | 154 | .name = "dma", |
516 | 155 | .class = &omap2xxx_dma_hwmod_class, | |
517 | /* l4_core -> timer7 */ | 156 | .mpu_irqs = omap2_dma_system_irqs, |
518 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer7 = { | 157 | .main_clk = "core_l3_ck", |
519 | .master = &omap2420_l4_core_hwmod, | 158 | .dev_attr = &dma_dev_attr, |
520 | .slave = &omap2420_timer7_hwmod, | 159 | .flags = HWMOD_NO_IDLEST, |
521 | .clk = "gpt7_ick", | ||
522 | .addr = omap2xxx_timer7_addrs, | ||
523 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
524 | }; | 160 | }; |
525 | 161 | ||
526 | /* timer7 slave port */ | 162 | /* mailbox */ |
527 | static struct omap_hwmod_ocp_if *omap2420_timer7_slaves[] = { | 163 | static struct omap_hwmod_irq_info omap2420_mailbox_irqs[] = { |
528 | &omap2420_l4_core__timer7, | 164 | { .name = "dsp", .irq = 26 }, |
165 | { .name = "iva", .irq = 34 }, | ||
166 | { .irq = -1 } | ||
529 | }; | 167 | }; |
530 | 168 | ||
531 | /* timer7 hwmod */ | 169 | static struct omap_hwmod omap2420_mailbox_hwmod = { |
532 | static struct omap_hwmod omap2420_timer7_hwmod = { | 170 | .name = "mailbox", |
533 | .name = "timer7", | 171 | .class = &omap2xxx_mailbox_hwmod_class, |
534 | .mpu_irqs = omap2_timer7_mpu_irqs, | 172 | .mpu_irqs = omap2420_mailbox_irqs, |
535 | .main_clk = "gpt7_fck", | 173 | .main_clk = "mailboxes_ick", |
536 | .prcm = { | 174 | .prcm = { |
537 | .omap2 = { | 175 | .omap2 = { |
538 | .prcm_reg_id = 1, | 176 | .prcm_reg_id = 1, |
539 | .module_bit = OMAP24XX_EN_GPT7_SHIFT, | 177 | .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT, |
540 | .module_offs = CORE_MOD, | 178 | .module_offs = CORE_MOD, |
541 | .idlest_reg_id = 1, | 179 | .idlest_reg_id = 1, |
542 | .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT, | 180 | .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT, |
543 | }, | 181 | }, |
544 | }, | 182 | }, |
545 | .dev_attr = &capability_alwon_dev_attr, | ||
546 | .slaves = omap2420_timer7_slaves, | ||
547 | .slaves_cnt = ARRAY_SIZE(omap2420_timer7_slaves), | ||
548 | .class = &omap2xxx_timer_hwmod_class, | ||
549 | }; | 183 | }; |
550 | 184 | ||
551 | /* timer8 */ | 185 | /* |
552 | static struct omap_hwmod omap2420_timer8_hwmod; | 186 | * 'mcbsp' class |
187 | * multi channel buffered serial port controller | ||
188 | */ | ||
553 | 189 | ||
554 | /* l4_core -> timer8 */ | 190 | static struct omap_hwmod_class omap2420_mcbsp_hwmod_class = { |
555 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer8 = { | 191 | .name = "mcbsp", |
556 | .master = &omap2420_l4_core_hwmod, | ||
557 | .slave = &omap2420_timer8_hwmod, | ||
558 | .clk = "gpt8_ick", | ||
559 | .addr = omap2xxx_timer8_addrs, | ||
560 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
561 | }; | 192 | }; |
562 | 193 | ||
563 | /* timer8 slave port */ | 194 | /* mcbsp1 */ |
564 | static struct omap_hwmod_ocp_if *omap2420_timer8_slaves[] = { | 195 | static struct omap_hwmod_irq_info omap2420_mcbsp1_irqs[] = { |
565 | &omap2420_l4_core__timer8, | 196 | { .name = "tx", .irq = 59 }, |
197 | { .name = "rx", .irq = 60 }, | ||
198 | { .irq = -1 } | ||
566 | }; | 199 | }; |
567 | 200 | ||
568 | /* timer8 hwmod */ | 201 | static struct omap_hwmod omap2420_mcbsp1_hwmod = { |
569 | static struct omap_hwmod omap2420_timer8_hwmod = { | 202 | .name = "mcbsp1", |
570 | .name = "timer8", | 203 | .class = &omap2420_mcbsp_hwmod_class, |
571 | .mpu_irqs = omap2_timer8_mpu_irqs, | 204 | .mpu_irqs = omap2420_mcbsp1_irqs, |
572 | .main_clk = "gpt8_fck", | 205 | .sdma_reqs = omap2_mcbsp1_sdma_reqs, |
206 | .main_clk = "mcbsp1_fck", | ||
573 | .prcm = { | 207 | .prcm = { |
574 | .omap2 = { | 208 | .omap2 = { |
575 | .prcm_reg_id = 1, | 209 | .prcm_reg_id = 1, |
576 | .module_bit = OMAP24XX_EN_GPT8_SHIFT, | 210 | .module_bit = OMAP24XX_EN_MCBSP1_SHIFT, |
577 | .module_offs = CORE_MOD, | 211 | .module_offs = CORE_MOD, |
578 | .idlest_reg_id = 1, | 212 | .idlest_reg_id = 1, |
579 | .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT, | 213 | .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT, |
580 | }, | 214 | }, |
581 | }, | 215 | }, |
582 | .dev_attr = &capability_alwon_dev_attr, | ||
583 | .slaves = omap2420_timer8_slaves, | ||
584 | .slaves_cnt = ARRAY_SIZE(omap2420_timer8_slaves), | ||
585 | .class = &omap2xxx_timer_hwmod_class, | ||
586 | }; | ||
587 | |||
588 | /* timer9 */ | ||
589 | static struct omap_hwmod omap2420_timer9_hwmod; | ||
590 | |||
591 | /* l4_core -> timer9 */ | ||
592 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer9 = { | ||
593 | .master = &omap2420_l4_core_hwmod, | ||
594 | .slave = &omap2420_timer9_hwmod, | ||
595 | .clk = "gpt9_ick", | ||
596 | .addr = omap2xxx_timer9_addrs, | ||
597 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
598 | }; | 216 | }; |
599 | 217 | ||
600 | /* timer9 slave port */ | 218 | /* mcbsp2 */ |
601 | static struct omap_hwmod_ocp_if *omap2420_timer9_slaves[] = { | 219 | static struct omap_hwmod_irq_info omap2420_mcbsp2_irqs[] = { |
602 | &omap2420_l4_core__timer9, | 220 | { .name = "tx", .irq = 62 }, |
221 | { .name = "rx", .irq = 63 }, | ||
222 | { .irq = -1 } | ||
603 | }; | 223 | }; |
604 | 224 | ||
605 | /* timer9 hwmod */ | 225 | static struct omap_hwmod omap2420_mcbsp2_hwmod = { |
606 | static struct omap_hwmod omap2420_timer9_hwmod = { | 226 | .name = "mcbsp2", |
607 | .name = "timer9", | 227 | .class = &omap2420_mcbsp_hwmod_class, |
608 | .mpu_irqs = omap2_timer9_mpu_irqs, | 228 | .mpu_irqs = omap2420_mcbsp2_irqs, |
609 | .main_clk = "gpt9_fck", | 229 | .sdma_reqs = omap2_mcbsp2_sdma_reqs, |
230 | .main_clk = "mcbsp2_fck", | ||
610 | .prcm = { | 231 | .prcm = { |
611 | .omap2 = { | 232 | .omap2 = { |
612 | .prcm_reg_id = 1, | 233 | .prcm_reg_id = 1, |
613 | .module_bit = OMAP24XX_EN_GPT9_SHIFT, | 234 | .module_bit = OMAP24XX_EN_MCBSP2_SHIFT, |
614 | .module_offs = CORE_MOD, | 235 | .module_offs = CORE_MOD, |
615 | .idlest_reg_id = 1, | 236 | .idlest_reg_id = 1, |
616 | .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT, | 237 | .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT, |
617 | }, | 238 | }, |
618 | }, | 239 | }, |
619 | .dev_attr = &capability_pwm_dev_attr, | ||
620 | .slaves = omap2420_timer9_slaves, | ||
621 | .slaves_cnt = ARRAY_SIZE(omap2420_timer9_slaves), | ||
622 | .class = &omap2xxx_timer_hwmod_class, | ||
623 | }; | 240 | }; |
624 | 241 | ||
625 | /* timer10 */ | 242 | /* |
626 | static struct omap_hwmod omap2420_timer10_hwmod; | 243 | * interfaces |
244 | */ | ||
627 | 245 | ||
628 | /* l4_core -> timer10 */ | 246 | /* L4 CORE -> I2C1 interface */ |
629 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer10 = { | 247 | static struct omap_hwmod_ocp_if omap2420_l4_core__i2c1 = { |
630 | .master = &omap2420_l4_core_hwmod, | 248 | .master = &omap2xxx_l4_core_hwmod, |
631 | .slave = &omap2420_timer10_hwmod, | 249 | .slave = &omap2420_i2c1_hwmod, |
632 | .clk = "gpt10_ick", | 250 | .clk = "i2c1_ick", |
633 | .addr = omap2_timer10_addrs, | 251 | .addr = omap2_i2c1_addr_space, |
634 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 252 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
635 | }; | 253 | }; |
636 | 254 | ||
637 | /* timer10 slave port */ | 255 | /* L4 CORE -> I2C2 interface */ |
638 | static struct omap_hwmod_ocp_if *omap2420_timer10_slaves[] = { | 256 | static struct omap_hwmod_ocp_if omap2420_l4_core__i2c2 = { |
639 | &omap2420_l4_core__timer10, | 257 | .master = &omap2xxx_l4_core_hwmod, |
640 | }; | 258 | .slave = &omap2420_i2c2_hwmod, |
641 | 259 | .clk = "i2c2_ick", | |
642 | /* timer10 hwmod */ | 260 | .addr = omap2_i2c2_addr_space, |
643 | static struct omap_hwmod omap2420_timer10_hwmod = { | 261 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
644 | .name = "timer10", | ||
645 | .mpu_irqs = omap2_timer10_mpu_irqs, | ||
646 | .main_clk = "gpt10_fck", | ||
647 | .prcm = { | ||
648 | .omap2 = { | ||
649 | .prcm_reg_id = 1, | ||
650 | .module_bit = OMAP24XX_EN_GPT10_SHIFT, | ||
651 | .module_offs = CORE_MOD, | ||
652 | .idlest_reg_id = 1, | ||
653 | .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT, | ||
654 | }, | ||
655 | }, | ||
656 | .dev_attr = &capability_pwm_dev_attr, | ||
657 | .slaves = omap2420_timer10_slaves, | ||
658 | .slaves_cnt = ARRAY_SIZE(omap2420_timer10_slaves), | ||
659 | .class = &omap2xxx_timer_hwmod_class, | ||
660 | }; | 262 | }; |
661 | 263 | ||
662 | /* timer11 */ | 264 | /* IVA <- L3 interface */ |
663 | static struct omap_hwmod omap2420_timer11_hwmod; | 265 | static struct omap_hwmod_ocp_if omap2420_l3__iva = { |
664 | 266 | .master = &omap2xxx_l3_main_hwmod, | |
665 | /* l4_core -> timer11 */ | 267 | .slave = &omap2420_iva_hwmod, |
666 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer11 = { | 268 | .clk = "core_l3_ck", |
667 | .master = &omap2420_l4_core_hwmod, | ||
668 | .slave = &omap2420_timer11_hwmod, | ||
669 | .clk = "gpt11_ick", | ||
670 | .addr = omap2_timer11_addrs, | ||
671 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 269 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
672 | }; | 270 | }; |
673 | 271 | ||
674 | /* timer11 slave port */ | 272 | /* DSP <- L3 interface */ |
675 | static struct omap_hwmod_ocp_if *omap2420_timer11_slaves[] = { | 273 | static struct omap_hwmod_ocp_if omap2420_l3__dsp = { |
676 | &omap2420_l4_core__timer11, | 274 | .master = &omap2xxx_l3_main_hwmod, |
275 | .slave = &omap2420_dsp_hwmod, | ||
276 | .clk = "dsp_ick", | ||
277 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
677 | }; | 278 | }; |
678 | 279 | ||
679 | /* timer11 hwmod */ | 280 | static struct omap_hwmod_addr_space omap2420_timer1_addrs[] = { |
680 | static struct omap_hwmod omap2420_timer11_hwmod = { | 281 | { |
681 | .name = "timer11", | 282 | .pa_start = 0x48028000, |
682 | .mpu_irqs = omap2_timer11_mpu_irqs, | 283 | .pa_end = 0x48028000 + SZ_1K - 1, |
683 | .main_clk = "gpt11_fck", | 284 | .flags = ADDR_TYPE_RT |
684 | .prcm = { | ||
685 | .omap2 = { | ||
686 | .prcm_reg_id = 1, | ||
687 | .module_bit = OMAP24XX_EN_GPT11_SHIFT, | ||
688 | .module_offs = CORE_MOD, | ||
689 | .idlest_reg_id = 1, | ||
690 | .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT, | ||
691 | }, | ||
692 | }, | 285 | }, |
693 | .dev_attr = &capability_pwm_dev_attr, | 286 | { } |
694 | .slaves = omap2420_timer11_slaves, | ||
695 | .slaves_cnt = ARRAY_SIZE(omap2420_timer11_slaves), | ||
696 | .class = &omap2xxx_timer_hwmod_class, | ||
697 | }; | 287 | }; |
698 | 288 | ||
699 | /* timer12 */ | 289 | /* l4_wkup -> timer1 */ |
700 | static struct omap_hwmod omap2420_timer12_hwmod; | 290 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__timer1 = { |
701 | 291 | .master = &omap2xxx_l4_wkup_hwmod, | |
702 | /* l4_core -> timer12 */ | 292 | .slave = &omap2xxx_timer1_hwmod, |
703 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer12 = { | 293 | .clk = "gpt1_ick", |
704 | .master = &omap2420_l4_core_hwmod, | 294 | .addr = omap2420_timer1_addrs, |
705 | .slave = &omap2420_timer12_hwmod, | ||
706 | .clk = "gpt12_ick", | ||
707 | .addr = omap2xxx_timer12_addrs, | ||
708 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 295 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
709 | }; | 296 | }; |
710 | 297 | ||
711 | /* timer12 slave port */ | ||
712 | static struct omap_hwmod_ocp_if *omap2420_timer12_slaves[] = { | ||
713 | &omap2420_l4_core__timer12, | ||
714 | }; | ||
715 | |||
716 | /* timer12 hwmod */ | ||
717 | static struct omap_hwmod omap2420_timer12_hwmod = { | ||
718 | .name = "timer12", | ||
719 | .mpu_irqs = omap2xxx_timer12_mpu_irqs, | ||
720 | .main_clk = "gpt12_fck", | ||
721 | .prcm = { | ||
722 | .omap2 = { | ||
723 | .prcm_reg_id = 1, | ||
724 | .module_bit = OMAP24XX_EN_GPT12_SHIFT, | ||
725 | .module_offs = CORE_MOD, | ||
726 | .idlest_reg_id = 1, | ||
727 | .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT, | ||
728 | }, | ||
729 | }, | ||
730 | .dev_attr = &capability_pwm_dev_attr, | ||
731 | .slaves = omap2420_timer12_slaves, | ||
732 | .slaves_cnt = ARRAY_SIZE(omap2420_timer12_slaves), | ||
733 | .class = &omap2xxx_timer_hwmod_class, | ||
734 | }; | ||
735 | |||
736 | /* l4_wkup -> wd_timer2 */ | 298 | /* l4_wkup -> wd_timer2 */ |
737 | static struct omap_hwmod_addr_space omap2420_wd_timer2_addrs[] = { | 299 | static struct omap_hwmod_addr_space omap2420_wd_timer2_addrs[] = { |
738 | { | 300 | { |
@@ -744,363 +306,13 @@ static struct omap_hwmod_addr_space omap2420_wd_timer2_addrs[] = { | |||
744 | }; | 306 | }; |
745 | 307 | ||
746 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__wd_timer2 = { | 308 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__wd_timer2 = { |
747 | .master = &omap2420_l4_wkup_hwmod, | 309 | .master = &omap2xxx_l4_wkup_hwmod, |
748 | .slave = &omap2420_wd_timer2_hwmod, | 310 | .slave = &omap2xxx_wd_timer2_hwmod, |
749 | .clk = "mpu_wdt_ick", | 311 | .clk = "mpu_wdt_ick", |
750 | .addr = omap2420_wd_timer2_addrs, | 312 | .addr = omap2420_wd_timer2_addrs, |
751 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 313 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
752 | }; | 314 | }; |
753 | 315 | ||
754 | /* wd_timer2 */ | ||
755 | static struct omap_hwmod_ocp_if *omap2420_wd_timer2_slaves[] = { | ||
756 | &omap2420_l4_wkup__wd_timer2, | ||
757 | }; | ||
758 | |||
759 | static struct omap_hwmod omap2420_wd_timer2_hwmod = { | ||
760 | .name = "wd_timer2", | ||
761 | .class = &omap2xxx_wd_timer_hwmod_class, | ||
762 | .main_clk = "mpu_wdt_fck", | ||
763 | .prcm = { | ||
764 | .omap2 = { | ||
765 | .prcm_reg_id = 1, | ||
766 | .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT, | ||
767 | .module_offs = WKUP_MOD, | ||
768 | .idlest_reg_id = 1, | ||
769 | .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT, | ||
770 | }, | ||
771 | }, | ||
772 | .slaves = omap2420_wd_timer2_slaves, | ||
773 | .slaves_cnt = ARRAY_SIZE(omap2420_wd_timer2_slaves), | ||
774 | }; | ||
775 | |||
776 | /* UART1 */ | ||
777 | |||
778 | static struct omap_hwmod_ocp_if *omap2420_uart1_slaves[] = { | ||
779 | &omap2_l4_core__uart1, | ||
780 | }; | ||
781 | |||
782 | static struct omap_hwmod omap2420_uart1_hwmod = { | ||
783 | .name = "uart1", | ||
784 | .mpu_irqs = omap2_uart1_mpu_irqs, | ||
785 | .sdma_reqs = omap2_uart1_sdma_reqs, | ||
786 | .main_clk = "uart1_fck", | ||
787 | .prcm = { | ||
788 | .omap2 = { | ||
789 | .module_offs = CORE_MOD, | ||
790 | .prcm_reg_id = 1, | ||
791 | .module_bit = OMAP24XX_EN_UART1_SHIFT, | ||
792 | .idlest_reg_id = 1, | ||
793 | .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT, | ||
794 | }, | ||
795 | }, | ||
796 | .slaves = omap2420_uart1_slaves, | ||
797 | .slaves_cnt = ARRAY_SIZE(omap2420_uart1_slaves), | ||
798 | .class = &omap2_uart_class, | ||
799 | }; | ||
800 | |||
801 | /* UART2 */ | ||
802 | |||
803 | static struct omap_hwmod_ocp_if *omap2420_uart2_slaves[] = { | ||
804 | &omap2_l4_core__uart2, | ||
805 | }; | ||
806 | |||
807 | static struct omap_hwmod omap2420_uart2_hwmod = { | ||
808 | .name = "uart2", | ||
809 | .mpu_irqs = omap2_uart2_mpu_irqs, | ||
810 | .sdma_reqs = omap2_uart2_sdma_reqs, | ||
811 | .main_clk = "uart2_fck", | ||
812 | .prcm = { | ||
813 | .omap2 = { | ||
814 | .module_offs = CORE_MOD, | ||
815 | .prcm_reg_id = 1, | ||
816 | .module_bit = OMAP24XX_EN_UART2_SHIFT, | ||
817 | .idlest_reg_id = 1, | ||
818 | .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT, | ||
819 | }, | ||
820 | }, | ||
821 | .slaves = omap2420_uart2_slaves, | ||
822 | .slaves_cnt = ARRAY_SIZE(omap2420_uart2_slaves), | ||
823 | .class = &omap2_uart_class, | ||
824 | }; | ||
825 | |||
826 | /* UART3 */ | ||
827 | |||
828 | static struct omap_hwmod_ocp_if *omap2420_uart3_slaves[] = { | ||
829 | &omap2_l4_core__uart3, | ||
830 | }; | ||
831 | |||
832 | static struct omap_hwmod omap2420_uart3_hwmod = { | ||
833 | .name = "uart3", | ||
834 | .mpu_irqs = omap2_uart3_mpu_irqs, | ||
835 | .sdma_reqs = omap2_uart3_sdma_reqs, | ||
836 | .main_clk = "uart3_fck", | ||
837 | .prcm = { | ||
838 | .omap2 = { | ||
839 | .module_offs = CORE_MOD, | ||
840 | .prcm_reg_id = 2, | ||
841 | .module_bit = OMAP24XX_EN_UART3_SHIFT, | ||
842 | .idlest_reg_id = 2, | ||
843 | .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT, | ||
844 | }, | ||
845 | }, | ||
846 | .slaves = omap2420_uart3_slaves, | ||
847 | .slaves_cnt = ARRAY_SIZE(omap2420_uart3_slaves), | ||
848 | .class = &omap2_uart_class, | ||
849 | }; | ||
850 | |||
851 | /* dss */ | ||
852 | /* dss master ports */ | ||
853 | static struct omap_hwmod_ocp_if *omap2420_dss_masters[] = { | ||
854 | &omap2420_dss__l3, | ||
855 | }; | ||
856 | |||
857 | /* l4_core -> dss */ | ||
858 | static struct omap_hwmod_ocp_if omap2420_l4_core__dss = { | ||
859 | .master = &omap2420_l4_core_hwmod, | ||
860 | .slave = &omap2420_dss_core_hwmod, | ||
861 | .clk = "dss_ick", | ||
862 | .addr = omap2_dss_addrs, | ||
863 | .fw = { | ||
864 | .omap2 = { | ||
865 | .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION, | ||
866 | .flags = OMAP_FIREWALL_L4, | ||
867 | } | ||
868 | }, | ||
869 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
870 | }; | ||
871 | |||
872 | /* dss slave ports */ | ||
873 | static struct omap_hwmod_ocp_if *omap2420_dss_slaves[] = { | ||
874 | &omap2420_l4_core__dss, | ||
875 | }; | ||
876 | |||
877 | static struct omap_hwmod_opt_clk dss_opt_clks[] = { | ||
878 | /* | ||
879 | * The DSS HW needs all DSS clocks enabled during reset. The dss_core | ||
880 | * driver does not use these clocks. | ||
881 | */ | ||
882 | { .role = "tv_clk", .clk = "dss_54m_fck" }, | ||
883 | { .role = "sys_clk", .clk = "dss2_fck" }, | ||
884 | }; | ||
885 | |||
886 | static struct omap_hwmod omap2420_dss_core_hwmod = { | ||
887 | .name = "dss_core", | ||
888 | .class = &omap2_dss_hwmod_class, | ||
889 | .main_clk = "dss1_fck", /* instead of dss_fck */ | ||
890 | .sdma_reqs = omap2xxx_dss_sdma_chs, | ||
891 | .prcm = { | ||
892 | .omap2 = { | ||
893 | .prcm_reg_id = 1, | ||
894 | .module_bit = OMAP24XX_EN_DSS1_SHIFT, | ||
895 | .module_offs = CORE_MOD, | ||
896 | .idlest_reg_id = 1, | ||
897 | .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT, | ||
898 | }, | ||
899 | }, | ||
900 | .opt_clks = dss_opt_clks, | ||
901 | .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks), | ||
902 | .slaves = omap2420_dss_slaves, | ||
903 | .slaves_cnt = ARRAY_SIZE(omap2420_dss_slaves), | ||
904 | .masters = omap2420_dss_masters, | ||
905 | .masters_cnt = ARRAY_SIZE(omap2420_dss_masters), | ||
906 | .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET, | ||
907 | }; | ||
908 | |||
909 | /* l4_core -> dss_dispc */ | ||
910 | static struct omap_hwmod_ocp_if omap2420_l4_core__dss_dispc = { | ||
911 | .master = &omap2420_l4_core_hwmod, | ||
912 | .slave = &omap2420_dss_dispc_hwmod, | ||
913 | .clk = "dss_ick", | ||
914 | .addr = omap2_dss_dispc_addrs, | ||
915 | .fw = { | ||
916 | .omap2 = { | ||
917 | .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_DISPC_REGION, | ||
918 | .flags = OMAP_FIREWALL_L4, | ||
919 | } | ||
920 | }, | ||
921 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
922 | }; | ||
923 | |||
924 | /* dss_dispc slave ports */ | ||
925 | static struct omap_hwmod_ocp_if *omap2420_dss_dispc_slaves[] = { | ||
926 | &omap2420_l4_core__dss_dispc, | ||
927 | }; | ||
928 | |||
929 | static struct omap_hwmod omap2420_dss_dispc_hwmod = { | ||
930 | .name = "dss_dispc", | ||
931 | .class = &omap2_dispc_hwmod_class, | ||
932 | .mpu_irqs = omap2_dispc_irqs, | ||
933 | .main_clk = "dss1_fck", | ||
934 | .prcm = { | ||
935 | .omap2 = { | ||
936 | .prcm_reg_id = 1, | ||
937 | .module_bit = OMAP24XX_EN_DSS1_SHIFT, | ||
938 | .module_offs = CORE_MOD, | ||
939 | .idlest_reg_id = 1, | ||
940 | .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT, | ||
941 | }, | ||
942 | }, | ||
943 | .slaves = omap2420_dss_dispc_slaves, | ||
944 | .slaves_cnt = ARRAY_SIZE(omap2420_dss_dispc_slaves), | ||
945 | .flags = HWMOD_NO_IDLEST, | ||
946 | .dev_attr = &omap2_3_dss_dispc_dev_attr | ||
947 | }; | ||
948 | |||
949 | /* l4_core -> dss_rfbi */ | ||
950 | static struct omap_hwmod_ocp_if omap2420_l4_core__dss_rfbi = { | ||
951 | .master = &omap2420_l4_core_hwmod, | ||
952 | .slave = &omap2420_dss_rfbi_hwmod, | ||
953 | .clk = "dss_ick", | ||
954 | .addr = omap2_dss_rfbi_addrs, | ||
955 | .fw = { | ||
956 | .omap2 = { | ||
957 | .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION, | ||
958 | .flags = OMAP_FIREWALL_L4, | ||
959 | } | ||
960 | }, | ||
961 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
962 | }; | ||
963 | |||
964 | /* dss_rfbi slave ports */ | ||
965 | static struct omap_hwmod_ocp_if *omap2420_dss_rfbi_slaves[] = { | ||
966 | &omap2420_l4_core__dss_rfbi, | ||
967 | }; | ||
968 | |||
969 | static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = { | ||
970 | { .role = "ick", .clk = "dss_ick" }, | ||
971 | }; | ||
972 | |||
973 | static struct omap_hwmod omap2420_dss_rfbi_hwmod = { | ||
974 | .name = "dss_rfbi", | ||
975 | .class = &omap2_rfbi_hwmod_class, | ||
976 | .main_clk = "dss1_fck", | ||
977 | .prcm = { | ||
978 | .omap2 = { | ||
979 | .prcm_reg_id = 1, | ||
980 | .module_bit = OMAP24XX_EN_DSS1_SHIFT, | ||
981 | .module_offs = CORE_MOD, | ||
982 | }, | ||
983 | }, | ||
984 | .opt_clks = dss_rfbi_opt_clks, | ||
985 | .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks), | ||
986 | .slaves = omap2420_dss_rfbi_slaves, | ||
987 | .slaves_cnt = ARRAY_SIZE(omap2420_dss_rfbi_slaves), | ||
988 | .flags = HWMOD_NO_IDLEST, | ||
989 | }; | ||
990 | |||
991 | /* l4_core -> dss_venc */ | ||
992 | static struct omap_hwmod_ocp_if omap2420_l4_core__dss_venc = { | ||
993 | .master = &omap2420_l4_core_hwmod, | ||
994 | .slave = &omap2420_dss_venc_hwmod, | ||
995 | .clk = "dss_ick", | ||
996 | .addr = omap2_dss_venc_addrs, | ||
997 | .fw = { | ||
998 | .omap2 = { | ||
999 | .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_VENC_REGION, | ||
1000 | .flags = OMAP_FIREWALL_L4, | ||
1001 | } | ||
1002 | }, | ||
1003 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1004 | }; | ||
1005 | |||
1006 | /* dss_venc slave ports */ | ||
1007 | static struct omap_hwmod_ocp_if *omap2420_dss_venc_slaves[] = { | ||
1008 | &omap2420_l4_core__dss_venc, | ||
1009 | }; | ||
1010 | |||
1011 | static struct omap_hwmod omap2420_dss_venc_hwmod = { | ||
1012 | .name = "dss_venc", | ||
1013 | .class = &omap2_venc_hwmod_class, | ||
1014 | .main_clk = "dss_54m_fck", | ||
1015 | .prcm = { | ||
1016 | .omap2 = { | ||
1017 | .prcm_reg_id = 1, | ||
1018 | .module_bit = OMAP24XX_EN_DSS1_SHIFT, | ||
1019 | .module_offs = CORE_MOD, | ||
1020 | }, | ||
1021 | }, | ||
1022 | .slaves = omap2420_dss_venc_slaves, | ||
1023 | .slaves_cnt = ARRAY_SIZE(omap2420_dss_venc_slaves), | ||
1024 | .flags = HWMOD_NO_IDLEST, | ||
1025 | }; | ||
1026 | |||
1027 | /* I2C common */ | ||
1028 | static struct omap_hwmod_class_sysconfig i2c_sysc = { | ||
1029 | .rev_offs = 0x00, | ||
1030 | .sysc_offs = 0x20, | ||
1031 | .syss_offs = 0x10, | ||
1032 | .sysc_flags = (SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS), | ||
1033 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1034 | }; | ||
1035 | |||
1036 | static struct omap_hwmod_class i2c_class = { | ||
1037 | .name = "i2c", | ||
1038 | .sysc = &i2c_sysc, | ||
1039 | .rev = OMAP_I2C_IP_VERSION_1, | ||
1040 | .reset = &omap_i2c_reset, | ||
1041 | }; | ||
1042 | |||
1043 | static struct omap_i2c_dev_attr i2c_dev_attr = { | ||
1044 | .flags = OMAP_I2C_FLAG_NO_FIFO | | ||
1045 | OMAP_I2C_FLAG_SIMPLE_CLOCK | | ||
1046 | OMAP_I2C_FLAG_16BIT_DATA_REG | | ||
1047 | OMAP_I2C_FLAG_BUS_SHIFT_2, | ||
1048 | }; | ||
1049 | |||
1050 | /* I2C1 */ | ||
1051 | |||
1052 | static struct omap_hwmod_ocp_if *omap2420_i2c1_slaves[] = { | ||
1053 | &omap2420_l4_core__i2c1, | ||
1054 | }; | ||
1055 | |||
1056 | static struct omap_hwmod omap2420_i2c1_hwmod = { | ||
1057 | .name = "i2c1", | ||
1058 | .mpu_irqs = omap2_i2c1_mpu_irqs, | ||
1059 | .sdma_reqs = omap2_i2c1_sdma_reqs, | ||
1060 | .main_clk = "i2c1_fck", | ||
1061 | .prcm = { | ||
1062 | .omap2 = { | ||
1063 | .module_offs = CORE_MOD, | ||
1064 | .prcm_reg_id = 1, | ||
1065 | .module_bit = OMAP2420_EN_I2C1_SHIFT, | ||
1066 | .idlest_reg_id = 1, | ||
1067 | .idlest_idle_bit = OMAP2420_ST_I2C1_SHIFT, | ||
1068 | }, | ||
1069 | }, | ||
1070 | .slaves = omap2420_i2c1_slaves, | ||
1071 | .slaves_cnt = ARRAY_SIZE(omap2420_i2c1_slaves), | ||
1072 | .class = &i2c_class, | ||
1073 | .dev_attr = &i2c_dev_attr, | ||
1074 | .flags = HWMOD_16BIT_REG, | ||
1075 | }; | ||
1076 | |||
1077 | /* I2C2 */ | ||
1078 | |||
1079 | static struct omap_hwmod_ocp_if *omap2420_i2c2_slaves[] = { | ||
1080 | &omap2420_l4_core__i2c2, | ||
1081 | }; | ||
1082 | |||
1083 | static struct omap_hwmod omap2420_i2c2_hwmod = { | ||
1084 | .name = "i2c2", | ||
1085 | .mpu_irqs = omap2_i2c2_mpu_irqs, | ||
1086 | .sdma_reqs = omap2_i2c2_sdma_reqs, | ||
1087 | .main_clk = "i2c2_fck", | ||
1088 | .prcm = { | ||
1089 | .omap2 = { | ||
1090 | .module_offs = CORE_MOD, | ||
1091 | .prcm_reg_id = 1, | ||
1092 | .module_bit = OMAP2420_EN_I2C2_SHIFT, | ||
1093 | .idlest_reg_id = 1, | ||
1094 | .idlest_idle_bit = OMAP2420_ST_I2C2_SHIFT, | ||
1095 | }, | ||
1096 | }, | ||
1097 | .slaves = omap2420_i2c2_slaves, | ||
1098 | .slaves_cnt = ARRAY_SIZE(omap2420_i2c2_slaves), | ||
1099 | .class = &i2c_class, | ||
1100 | .dev_attr = &i2c_dev_attr, | ||
1101 | .flags = HWMOD_16BIT_REG, | ||
1102 | }; | ||
1103 | |||
1104 | /* l4_wkup -> gpio1 */ | 316 | /* l4_wkup -> gpio1 */ |
1105 | static struct omap_hwmod_addr_space omap2420_gpio1_addr_space[] = { | 317 | static struct omap_hwmod_addr_space omap2420_gpio1_addr_space[] = { |
1106 | { | 318 | { |
@@ -1112,8 +324,8 @@ static struct omap_hwmod_addr_space omap2420_gpio1_addr_space[] = { | |||
1112 | }; | 324 | }; |
1113 | 325 | ||
1114 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio1 = { | 326 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio1 = { |
1115 | .master = &omap2420_l4_wkup_hwmod, | 327 | .master = &omap2xxx_l4_wkup_hwmod, |
1116 | .slave = &omap2420_gpio1_hwmod, | 328 | .slave = &omap2xxx_gpio1_hwmod, |
1117 | .clk = "gpios_ick", | 329 | .clk = "gpios_ick", |
1118 | .addr = omap2420_gpio1_addr_space, | 330 | .addr = omap2420_gpio1_addr_space, |
1119 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 331 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
@@ -1130,8 +342,8 @@ static struct omap_hwmod_addr_space omap2420_gpio2_addr_space[] = { | |||
1130 | }; | 342 | }; |
1131 | 343 | ||
1132 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio2 = { | 344 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio2 = { |
1133 | .master = &omap2420_l4_wkup_hwmod, | 345 | .master = &omap2xxx_l4_wkup_hwmod, |
1134 | .slave = &omap2420_gpio2_hwmod, | 346 | .slave = &omap2xxx_gpio2_hwmod, |
1135 | .clk = "gpios_ick", | 347 | .clk = "gpios_ick", |
1136 | .addr = omap2420_gpio2_addr_space, | 348 | .addr = omap2420_gpio2_addr_space, |
1137 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 349 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
@@ -1148,8 +360,8 @@ static struct omap_hwmod_addr_space omap2420_gpio3_addr_space[] = { | |||
1148 | }; | 360 | }; |
1149 | 361 | ||
1150 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio3 = { | 362 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio3 = { |
1151 | .master = &omap2420_l4_wkup_hwmod, | 363 | .master = &omap2xxx_l4_wkup_hwmod, |
1152 | .slave = &omap2420_gpio3_hwmod, | 364 | .slave = &omap2xxx_gpio3_hwmod, |
1153 | .clk = "gpios_ick", | 365 | .clk = "gpios_ick", |
1154 | .addr = omap2420_gpio3_addr_space, | 366 | .addr = omap2420_gpio3_addr_space, |
1155 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 367 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
@@ -1166,408 +378,100 @@ static struct omap_hwmod_addr_space omap2420_gpio4_addr_space[] = { | |||
1166 | }; | 378 | }; |
1167 | 379 | ||
1168 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio4 = { | 380 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio4 = { |
1169 | .master = &omap2420_l4_wkup_hwmod, | 381 | .master = &omap2xxx_l4_wkup_hwmod, |
1170 | .slave = &omap2420_gpio4_hwmod, | 382 | .slave = &omap2xxx_gpio4_hwmod, |
1171 | .clk = "gpios_ick", | 383 | .clk = "gpios_ick", |
1172 | .addr = omap2420_gpio4_addr_space, | 384 | .addr = omap2420_gpio4_addr_space, |
1173 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 385 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
1174 | }; | 386 | }; |
1175 | 387 | ||
1176 | /* gpio dev_attr */ | ||
1177 | static struct omap_gpio_dev_attr gpio_dev_attr = { | ||
1178 | .bank_width = 32, | ||
1179 | .dbck_flag = false, | ||
1180 | }; | ||
1181 | |||
1182 | /* gpio1 */ | ||
1183 | static struct omap_hwmod_ocp_if *omap2420_gpio1_slaves[] = { | ||
1184 | &omap2420_l4_wkup__gpio1, | ||
1185 | }; | ||
1186 | |||
1187 | static struct omap_hwmod omap2420_gpio1_hwmod = { | ||
1188 | .name = "gpio1", | ||
1189 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | ||
1190 | .mpu_irqs = omap2_gpio1_irqs, | ||
1191 | .main_clk = "gpios_fck", | ||
1192 | .prcm = { | ||
1193 | .omap2 = { | ||
1194 | .prcm_reg_id = 1, | ||
1195 | .module_bit = OMAP24XX_EN_GPIOS_SHIFT, | ||
1196 | .module_offs = WKUP_MOD, | ||
1197 | .idlest_reg_id = 1, | ||
1198 | .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT, | ||
1199 | }, | ||
1200 | }, | ||
1201 | .slaves = omap2420_gpio1_slaves, | ||
1202 | .slaves_cnt = ARRAY_SIZE(omap2420_gpio1_slaves), | ||
1203 | .class = &omap2xxx_gpio_hwmod_class, | ||
1204 | .dev_attr = &gpio_dev_attr, | ||
1205 | }; | ||
1206 | |||
1207 | /* gpio2 */ | ||
1208 | static struct omap_hwmod_ocp_if *omap2420_gpio2_slaves[] = { | ||
1209 | &omap2420_l4_wkup__gpio2, | ||
1210 | }; | ||
1211 | |||
1212 | static struct omap_hwmod omap2420_gpio2_hwmod = { | ||
1213 | .name = "gpio2", | ||
1214 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | ||
1215 | .mpu_irqs = omap2_gpio2_irqs, | ||
1216 | .main_clk = "gpios_fck", | ||
1217 | .prcm = { | ||
1218 | .omap2 = { | ||
1219 | .prcm_reg_id = 1, | ||
1220 | .module_bit = OMAP24XX_EN_GPIOS_SHIFT, | ||
1221 | .module_offs = WKUP_MOD, | ||
1222 | .idlest_reg_id = 1, | ||
1223 | .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT, | ||
1224 | }, | ||
1225 | }, | ||
1226 | .slaves = omap2420_gpio2_slaves, | ||
1227 | .slaves_cnt = ARRAY_SIZE(omap2420_gpio2_slaves), | ||
1228 | .class = &omap2xxx_gpio_hwmod_class, | ||
1229 | .dev_attr = &gpio_dev_attr, | ||
1230 | }; | ||
1231 | |||
1232 | /* gpio3 */ | ||
1233 | static struct omap_hwmod_ocp_if *omap2420_gpio3_slaves[] = { | ||
1234 | &omap2420_l4_wkup__gpio3, | ||
1235 | }; | ||
1236 | |||
1237 | static struct omap_hwmod omap2420_gpio3_hwmod = { | ||
1238 | .name = "gpio3", | ||
1239 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | ||
1240 | .mpu_irqs = omap2_gpio3_irqs, | ||
1241 | .main_clk = "gpios_fck", | ||
1242 | .prcm = { | ||
1243 | .omap2 = { | ||
1244 | .prcm_reg_id = 1, | ||
1245 | .module_bit = OMAP24XX_EN_GPIOS_SHIFT, | ||
1246 | .module_offs = WKUP_MOD, | ||
1247 | .idlest_reg_id = 1, | ||
1248 | .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT, | ||
1249 | }, | ||
1250 | }, | ||
1251 | .slaves = omap2420_gpio3_slaves, | ||
1252 | .slaves_cnt = ARRAY_SIZE(omap2420_gpio3_slaves), | ||
1253 | .class = &omap2xxx_gpio_hwmod_class, | ||
1254 | .dev_attr = &gpio_dev_attr, | ||
1255 | }; | ||
1256 | |||
1257 | /* gpio4 */ | ||
1258 | static struct omap_hwmod_ocp_if *omap2420_gpio4_slaves[] = { | ||
1259 | &omap2420_l4_wkup__gpio4, | ||
1260 | }; | ||
1261 | |||
1262 | static struct omap_hwmod omap2420_gpio4_hwmod = { | ||
1263 | .name = "gpio4", | ||
1264 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | ||
1265 | .mpu_irqs = omap2_gpio4_irqs, | ||
1266 | .main_clk = "gpios_fck", | ||
1267 | .prcm = { | ||
1268 | .omap2 = { | ||
1269 | .prcm_reg_id = 1, | ||
1270 | .module_bit = OMAP24XX_EN_GPIOS_SHIFT, | ||
1271 | .module_offs = WKUP_MOD, | ||
1272 | .idlest_reg_id = 1, | ||
1273 | .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT, | ||
1274 | }, | ||
1275 | }, | ||
1276 | .slaves = omap2420_gpio4_slaves, | ||
1277 | .slaves_cnt = ARRAY_SIZE(omap2420_gpio4_slaves), | ||
1278 | .class = &omap2xxx_gpio_hwmod_class, | ||
1279 | .dev_attr = &gpio_dev_attr, | ||
1280 | }; | ||
1281 | |||
1282 | /* dma attributes */ | ||
1283 | static struct omap_dma_dev_attr dma_dev_attr = { | ||
1284 | .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY | | ||
1285 | IS_CSSA_32 | IS_CDSA_32, | ||
1286 | .lch_count = 32, | ||
1287 | }; | ||
1288 | |||
1289 | /* dma_system -> L3 */ | 388 | /* dma_system -> L3 */ |
1290 | static struct omap_hwmod_ocp_if omap2420_dma_system__l3 = { | 389 | static struct omap_hwmod_ocp_if omap2420_dma_system__l3 = { |
1291 | .master = &omap2420_dma_system_hwmod, | 390 | .master = &omap2420_dma_system_hwmod, |
1292 | .slave = &omap2420_l3_main_hwmod, | 391 | .slave = &omap2xxx_l3_main_hwmod, |
1293 | .clk = "core_l3_ck", | 392 | .clk = "core_l3_ck", |
1294 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 393 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
1295 | }; | 394 | }; |
1296 | 395 | ||
1297 | /* dma_system master ports */ | ||
1298 | static struct omap_hwmod_ocp_if *omap2420_dma_system_masters[] = { | ||
1299 | &omap2420_dma_system__l3, | ||
1300 | }; | ||
1301 | |||
1302 | /* l4_core -> dma_system */ | 396 | /* l4_core -> dma_system */ |
1303 | static struct omap_hwmod_ocp_if omap2420_l4_core__dma_system = { | 397 | static struct omap_hwmod_ocp_if omap2420_l4_core__dma_system = { |
1304 | .master = &omap2420_l4_core_hwmod, | 398 | .master = &omap2xxx_l4_core_hwmod, |
1305 | .slave = &omap2420_dma_system_hwmod, | 399 | .slave = &omap2420_dma_system_hwmod, |
1306 | .clk = "sdma_ick", | 400 | .clk = "sdma_ick", |
1307 | .addr = omap2_dma_system_addrs, | 401 | .addr = omap2_dma_system_addrs, |
1308 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 402 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
1309 | }; | 403 | }; |
1310 | 404 | ||
1311 | /* dma_system slave ports */ | ||
1312 | static struct omap_hwmod_ocp_if *omap2420_dma_system_slaves[] = { | ||
1313 | &omap2420_l4_core__dma_system, | ||
1314 | }; | ||
1315 | |||
1316 | static struct omap_hwmod omap2420_dma_system_hwmod = { | ||
1317 | .name = "dma", | ||
1318 | .class = &omap2xxx_dma_hwmod_class, | ||
1319 | .mpu_irqs = omap2_dma_system_irqs, | ||
1320 | .main_clk = "core_l3_ck", | ||
1321 | .slaves = omap2420_dma_system_slaves, | ||
1322 | .slaves_cnt = ARRAY_SIZE(omap2420_dma_system_slaves), | ||
1323 | .masters = omap2420_dma_system_masters, | ||
1324 | .masters_cnt = ARRAY_SIZE(omap2420_dma_system_masters), | ||
1325 | .dev_attr = &dma_dev_attr, | ||
1326 | .flags = HWMOD_NO_IDLEST, | ||
1327 | }; | ||
1328 | |||
1329 | /* mailbox */ | ||
1330 | static struct omap_hwmod omap2420_mailbox_hwmod; | ||
1331 | static struct omap_hwmod_irq_info omap2420_mailbox_irqs[] = { | ||
1332 | { .name = "dsp", .irq = 26 }, | ||
1333 | { .name = "iva", .irq = 34 }, | ||
1334 | { .irq = -1 } | ||
1335 | }; | ||
1336 | |||
1337 | /* l4_core -> mailbox */ | 405 | /* l4_core -> mailbox */ |
1338 | static struct omap_hwmod_ocp_if omap2420_l4_core__mailbox = { | 406 | static struct omap_hwmod_ocp_if omap2420_l4_core__mailbox = { |
1339 | .master = &omap2420_l4_core_hwmod, | 407 | .master = &omap2xxx_l4_core_hwmod, |
1340 | .slave = &omap2420_mailbox_hwmod, | 408 | .slave = &omap2420_mailbox_hwmod, |
1341 | .addr = omap2_mailbox_addrs, | 409 | .addr = omap2_mailbox_addrs, |
1342 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 410 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
1343 | }; | 411 | }; |
1344 | 412 | ||
1345 | /* mailbox slave ports */ | ||
1346 | static struct omap_hwmod_ocp_if *omap2420_mailbox_slaves[] = { | ||
1347 | &omap2420_l4_core__mailbox, | ||
1348 | }; | ||
1349 | |||
1350 | static struct omap_hwmod omap2420_mailbox_hwmod = { | ||
1351 | .name = "mailbox", | ||
1352 | .class = &omap2xxx_mailbox_hwmod_class, | ||
1353 | .mpu_irqs = omap2420_mailbox_irqs, | ||
1354 | .main_clk = "mailboxes_ick", | ||
1355 | .prcm = { | ||
1356 | .omap2 = { | ||
1357 | .prcm_reg_id = 1, | ||
1358 | .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT, | ||
1359 | .module_offs = CORE_MOD, | ||
1360 | .idlest_reg_id = 1, | ||
1361 | .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT, | ||
1362 | }, | ||
1363 | }, | ||
1364 | .slaves = omap2420_mailbox_slaves, | ||
1365 | .slaves_cnt = ARRAY_SIZE(omap2420_mailbox_slaves), | ||
1366 | }; | ||
1367 | |||
1368 | /* mcspi1 */ | ||
1369 | static struct omap_hwmod_ocp_if *omap2420_mcspi1_slaves[] = { | ||
1370 | &omap2420_l4_core__mcspi1, | ||
1371 | }; | ||
1372 | |||
1373 | static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = { | ||
1374 | .num_chipselect = 4, | ||
1375 | }; | ||
1376 | |||
1377 | static struct omap_hwmod omap2420_mcspi1_hwmod = { | ||
1378 | .name = "mcspi1_hwmod", | ||
1379 | .mpu_irqs = omap2_mcspi1_mpu_irqs, | ||
1380 | .sdma_reqs = omap2_mcspi1_sdma_reqs, | ||
1381 | .main_clk = "mcspi1_fck", | ||
1382 | .prcm = { | ||
1383 | .omap2 = { | ||
1384 | .module_offs = CORE_MOD, | ||
1385 | .prcm_reg_id = 1, | ||
1386 | .module_bit = OMAP24XX_EN_MCSPI1_SHIFT, | ||
1387 | .idlest_reg_id = 1, | ||
1388 | .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT, | ||
1389 | }, | ||
1390 | }, | ||
1391 | .slaves = omap2420_mcspi1_slaves, | ||
1392 | .slaves_cnt = ARRAY_SIZE(omap2420_mcspi1_slaves), | ||
1393 | .class = &omap2xxx_mcspi_class, | ||
1394 | .dev_attr = &omap_mcspi1_dev_attr, | ||
1395 | }; | ||
1396 | |||
1397 | /* mcspi2 */ | ||
1398 | static struct omap_hwmod_ocp_if *omap2420_mcspi2_slaves[] = { | ||
1399 | &omap2420_l4_core__mcspi2, | ||
1400 | }; | ||
1401 | |||
1402 | static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = { | ||
1403 | .num_chipselect = 2, | ||
1404 | }; | ||
1405 | |||
1406 | static struct omap_hwmod omap2420_mcspi2_hwmod = { | ||
1407 | .name = "mcspi2_hwmod", | ||
1408 | .mpu_irqs = omap2_mcspi2_mpu_irqs, | ||
1409 | .sdma_reqs = omap2_mcspi2_sdma_reqs, | ||
1410 | .main_clk = "mcspi2_fck", | ||
1411 | .prcm = { | ||
1412 | .omap2 = { | ||
1413 | .module_offs = CORE_MOD, | ||
1414 | .prcm_reg_id = 1, | ||
1415 | .module_bit = OMAP24XX_EN_MCSPI2_SHIFT, | ||
1416 | .idlest_reg_id = 1, | ||
1417 | .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT, | ||
1418 | }, | ||
1419 | }, | ||
1420 | .slaves = omap2420_mcspi2_slaves, | ||
1421 | .slaves_cnt = ARRAY_SIZE(omap2420_mcspi2_slaves), | ||
1422 | .class = &omap2xxx_mcspi_class, | ||
1423 | .dev_attr = &omap_mcspi2_dev_attr, | ||
1424 | }; | ||
1425 | |||
1426 | /* | ||
1427 | * 'mcbsp' class | ||
1428 | * multi channel buffered serial port controller | ||
1429 | */ | ||
1430 | |||
1431 | static struct omap_hwmod_class omap2420_mcbsp_hwmod_class = { | ||
1432 | .name = "mcbsp", | ||
1433 | }; | ||
1434 | |||
1435 | /* mcbsp1 */ | ||
1436 | static struct omap_hwmod_irq_info omap2420_mcbsp1_irqs[] = { | ||
1437 | { .name = "tx", .irq = 59 }, | ||
1438 | { .name = "rx", .irq = 60 }, | ||
1439 | { .irq = -1 } | ||
1440 | }; | ||
1441 | |||
1442 | /* l4_core -> mcbsp1 */ | 413 | /* l4_core -> mcbsp1 */ |
1443 | static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp1 = { | 414 | static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp1 = { |
1444 | .master = &omap2420_l4_core_hwmod, | 415 | .master = &omap2xxx_l4_core_hwmod, |
1445 | .slave = &omap2420_mcbsp1_hwmod, | 416 | .slave = &omap2420_mcbsp1_hwmod, |
1446 | .clk = "mcbsp1_ick", | 417 | .clk = "mcbsp1_ick", |
1447 | .addr = omap2_mcbsp1_addrs, | 418 | .addr = omap2_mcbsp1_addrs, |
1448 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 419 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
1449 | }; | 420 | }; |
1450 | 421 | ||
1451 | /* mcbsp1 slave ports */ | ||
1452 | static struct omap_hwmod_ocp_if *omap2420_mcbsp1_slaves[] = { | ||
1453 | &omap2420_l4_core__mcbsp1, | ||
1454 | }; | ||
1455 | |||
1456 | static struct omap_hwmod omap2420_mcbsp1_hwmod = { | ||
1457 | .name = "mcbsp1", | ||
1458 | .class = &omap2420_mcbsp_hwmod_class, | ||
1459 | .mpu_irqs = omap2420_mcbsp1_irqs, | ||
1460 | .sdma_reqs = omap2_mcbsp1_sdma_reqs, | ||
1461 | .main_clk = "mcbsp1_fck", | ||
1462 | .prcm = { | ||
1463 | .omap2 = { | ||
1464 | .prcm_reg_id = 1, | ||
1465 | .module_bit = OMAP24XX_EN_MCBSP1_SHIFT, | ||
1466 | .module_offs = CORE_MOD, | ||
1467 | .idlest_reg_id = 1, | ||
1468 | .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT, | ||
1469 | }, | ||
1470 | }, | ||
1471 | .slaves = omap2420_mcbsp1_slaves, | ||
1472 | .slaves_cnt = ARRAY_SIZE(omap2420_mcbsp1_slaves), | ||
1473 | }; | ||
1474 | |||
1475 | /* mcbsp2 */ | ||
1476 | static struct omap_hwmod_irq_info omap2420_mcbsp2_irqs[] = { | ||
1477 | { .name = "tx", .irq = 62 }, | ||
1478 | { .name = "rx", .irq = 63 }, | ||
1479 | { .irq = -1 } | ||
1480 | }; | ||
1481 | |||
1482 | /* l4_core -> mcbsp2 */ | 422 | /* l4_core -> mcbsp2 */ |
1483 | static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp2 = { | 423 | static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp2 = { |
1484 | .master = &omap2420_l4_core_hwmod, | 424 | .master = &omap2xxx_l4_core_hwmod, |
1485 | .slave = &omap2420_mcbsp2_hwmod, | 425 | .slave = &omap2420_mcbsp2_hwmod, |
1486 | .clk = "mcbsp2_ick", | 426 | .clk = "mcbsp2_ick", |
1487 | .addr = omap2xxx_mcbsp2_addrs, | 427 | .addr = omap2xxx_mcbsp2_addrs, |
1488 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 428 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
1489 | }; | 429 | }; |
1490 | 430 | ||
1491 | /* mcbsp2 slave ports */ | 431 | static struct omap_hwmod_ocp_if *omap2420_hwmod_ocp_ifs[] __initdata = { |
1492 | static struct omap_hwmod_ocp_if *omap2420_mcbsp2_slaves[] = { | 432 | &omap2xxx_l3_main__l4_core, |
433 | &omap2xxx_mpu__l3_main, | ||
434 | &omap2xxx_dss__l3, | ||
435 | &omap2xxx_l4_core__mcspi1, | ||
436 | &omap2xxx_l4_core__mcspi2, | ||
437 | &omap2xxx_l4_core__l4_wkup, | ||
438 | &omap2_l4_core__uart1, | ||
439 | &omap2_l4_core__uart2, | ||
440 | &omap2_l4_core__uart3, | ||
441 | &omap2420_l4_core__i2c1, | ||
442 | &omap2420_l4_core__i2c2, | ||
443 | &omap2420_l3__iva, | ||
444 | &omap2420_l3__dsp, | ||
445 | &omap2420_l4_wkup__timer1, | ||
446 | &omap2xxx_l4_core__timer2, | ||
447 | &omap2xxx_l4_core__timer3, | ||
448 | &omap2xxx_l4_core__timer4, | ||
449 | &omap2xxx_l4_core__timer5, | ||
450 | &omap2xxx_l4_core__timer6, | ||
451 | &omap2xxx_l4_core__timer7, | ||
452 | &omap2xxx_l4_core__timer8, | ||
453 | &omap2xxx_l4_core__timer9, | ||
454 | &omap2xxx_l4_core__timer10, | ||
455 | &omap2xxx_l4_core__timer11, | ||
456 | &omap2xxx_l4_core__timer12, | ||
457 | &omap2420_l4_wkup__wd_timer2, | ||
458 | &omap2xxx_l4_core__dss, | ||
459 | &omap2xxx_l4_core__dss_dispc, | ||
460 | &omap2xxx_l4_core__dss_rfbi, | ||
461 | &omap2xxx_l4_core__dss_venc, | ||
462 | &omap2420_l4_wkup__gpio1, | ||
463 | &omap2420_l4_wkup__gpio2, | ||
464 | &omap2420_l4_wkup__gpio3, | ||
465 | &omap2420_l4_wkup__gpio4, | ||
466 | &omap2420_dma_system__l3, | ||
467 | &omap2420_l4_core__dma_system, | ||
468 | &omap2420_l4_core__mailbox, | ||
469 | &omap2420_l4_core__mcbsp1, | ||
1493 | &omap2420_l4_core__mcbsp2, | 470 | &omap2420_l4_core__mcbsp2, |
1494 | }; | ||
1495 | |||
1496 | static struct omap_hwmod omap2420_mcbsp2_hwmod = { | ||
1497 | .name = "mcbsp2", | ||
1498 | .class = &omap2420_mcbsp_hwmod_class, | ||
1499 | .mpu_irqs = omap2420_mcbsp2_irqs, | ||
1500 | .sdma_reqs = omap2_mcbsp2_sdma_reqs, | ||
1501 | .main_clk = "mcbsp2_fck", | ||
1502 | .prcm = { | ||
1503 | .omap2 = { | ||
1504 | .prcm_reg_id = 1, | ||
1505 | .module_bit = OMAP24XX_EN_MCBSP2_SHIFT, | ||
1506 | .module_offs = CORE_MOD, | ||
1507 | .idlest_reg_id = 1, | ||
1508 | .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT, | ||
1509 | }, | ||
1510 | }, | ||
1511 | .slaves = omap2420_mcbsp2_slaves, | ||
1512 | .slaves_cnt = ARRAY_SIZE(omap2420_mcbsp2_slaves), | ||
1513 | }; | ||
1514 | |||
1515 | static __initdata struct omap_hwmod *omap2420_hwmods[] = { | ||
1516 | &omap2420_l3_main_hwmod, | ||
1517 | &omap2420_l4_core_hwmod, | ||
1518 | &omap2420_l4_wkup_hwmod, | ||
1519 | &omap2420_mpu_hwmod, | ||
1520 | &omap2420_iva_hwmod, | ||
1521 | |||
1522 | &omap2420_timer1_hwmod, | ||
1523 | &omap2420_timer2_hwmod, | ||
1524 | &omap2420_timer3_hwmod, | ||
1525 | &omap2420_timer4_hwmod, | ||
1526 | &omap2420_timer5_hwmod, | ||
1527 | &omap2420_timer6_hwmod, | ||
1528 | &omap2420_timer7_hwmod, | ||
1529 | &omap2420_timer8_hwmod, | ||
1530 | &omap2420_timer9_hwmod, | ||
1531 | &omap2420_timer10_hwmod, | ||
1532 | &omap2420_timer11_hwmod, | ||
1533 | &omap2420_timer12_hwmod, | ||
1534 | |||
1535 | &omap2420_wd_timer2_hwmod, | ||
1536 | &omap2420_uart1_hwmod, | ||
1537 | &omap2420_uart2_hwmod, | ||
1538 | &omap2420_uart3_hwmod, | ||
1539 | /* dss class */ | ||
1540 | &omap2420_dss_core_hwmod, | ||
1541 | &omap2420_dss_dispc_hwmod, | ||
1542 | &omap2420_dss_rfbi_hwmod, | ||
1543 | &omap2420_dss_venc_hwmod, | ||
1544 | /* i2c class */ | ||
1545 | &omap2420_i2c1_hwmod, | ||
1546 | &omap2420_i2c2_hwmod, | ||
1547 | |||
1548 | /* gpio class */ | ||
1549 | &omap2420_gpio1_hwmod, | ||
1550 | &omap2420_gpio2_hwmod, | ||
1551 | &omap2420_gpio3_hwmod, | ||
1552 | &omap2420_gpio4_hwmod, | ||
1553 | |||
1554 | /* dma_system class*/ | ||
1555 | &omap2420_dma_system_hwmod, | ||
1556 | |||
1557 | /* mailbox class */ | ||
1558 | &omap2420_mailbox_hwmod, | ||
1559 | |||
1560 | /* mcbsp class */ | ||
1561 | &omap2420_mcbsp1_hwmod, | ||
1562 | &omap2420_mcbsp2_hwmod, | ||
1563 | |||
1564 | /* mcspi class */ | ||
1565 | &omap2420_mcspi1_hwmod, | ||
1566 | &omap2420_mcspi2_hwmod, | ||
1567 | NULL, | 471 | NULL, |
1568 | }; | 472 | }; |
1569 | 473 | ||
1570 | int __init omap2420_hwmod_init(void) | 474 | int __init omap2420_hwmod_init(void) |
1571 | { | 475 | { |
1572 | return omap_hwmod_register(omap2420_hwmods); | 476 | return omap_hwmod_register_links(omap2420_hwmod_ocp_ifs); |
1573 | } | 477 | } |
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c index 04a3885f447..71d9f8824f9 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c | |||
@@ -2,6 +2,7 @@ | |||
2 | * omap_hwmod_2430_data.c - hardware modules present on the OMAP2430 chips | 2 | * omap_hwmod_2430_data.c - hardware modules present on the OMAP2430 chips |
3 | * | 3 | * |
4 | * Copyright (C) 2009-2011 Nokia Corporation | 4 | * Copyright (C) 2009-2011 Nokia Corporation |
5 | * Copyright (C) 2012 Texas Instruments, Inc. | ||
5 | * Paul Walmsley | 6 | * Paul Walmsley |
6 | * | 7 | * |
7 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
@@ -33,1044 +34,29 @@ | |||
33 | /* | 34 | /* |
34 | * OMAP2430 hardware module integration data | 35 | * OMAP2430 hardware module integration data |
35 | * | 36 | * |
36 | * ALl of the data in this section should be autogeneratable from the | 37 | * All of the data in this section should be autogeneratable from the |
37 | * TI hardware database or other technical documentation. Data that | 38 | * TI hardware database or other technical documentation. Data that |
38 | * is driver-specific or driver-kernel integration-specific belongs | 39 | * is driver-specific or driver-kernel integration-specific belongs |
39 | * elsewhere. | 40 | * elsewhere. |
40 | */ | 41 | */ |
41 | 42 | ||
42 | static struct omap_hwmod omap2430_mpu_hwmod; | ||
43 | static struct omap_hwmod omap2430_iva_hwmod; | ||
44 | static struct omap_hwmod omap2430_l3_main_hwmod; | ||
45 | static struct omap_hwmod omap2430_l4_core_hwmod; | ||
46 | static struct omap_hwmod omap2430_dss_core_hwmod; | ||
47 | static struct omap_hwmod omap2430_dss_dispc_hwmod; | ||
48 | static struct omap_hwmod omap2430_dss_rfbi_hwmod; | ||
49 | static struct omap_hwmod omap2430_dss_venc_hwmod; | ||
50 | static struct omap_hwmod omap2430_wd_timer2_hwmod; | ||
51 | static struct omap_hwmod omap2430_gpio1_hwmod; | ||
52 | static struct omap_hwmod omap2430_gpio2_hwmod; | ||
53 | static struct omap_hwmod omap2430_gpio3_hwmod; | ||
54 | static struct omap_hwmod omap2430_gpio4_hwmod; | ||
55 | static struct omap_hwmod omap2430_gpio5_hwmod; | ||
56 | static struct omap_hwmod omap2430_dma_system_hwmod; | ||
57 | static struct omap_hwmod omap2430_mcbsp1_hwmod; | ||
58 | static struct omap_hwmod omap2430_mcbsp2_hwmod; | ||
59 | static struct omap_hwmod omap2430_mcbsp3_hwmod; | ||
60 | static struct omap_hwmod omap2430_mcbsp4_hwmod; | ||
61 | static struct omap_hwmod omap2430_mcbsp5_hwmod; | ||
62 | static struct omap_hwmod omap2430_mcspi1_hwmod; | ||
63 | static struct omap_hwmod omap2430_mcspi2_hwmod; | ||
64 | static struct omap_hwmod omap2430_mcspi3_hwmod; | ||
65 | static struct omap_hwmod omap2430_mmc1_hwmod; | ||
66 | static struct omap_hwmod omap2430_mmc2_hwmod; | ||
67 | |||
68 | /* L3 -> L4_CORE interface */ | ||
69 | static struct omap_hwmod_ocp_if omap2430_l3_main__l4_core = { | ||
70 | .master = &omap2430_l3_main_hwmod, | ||
71 | .slave = &omap2430_l4_core_hwmod, | ||
72 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
73 | }; | ||
74 | |||
75 | /* MPU -> L3 interface */ | ||
76 | static struct omap_hwmod_ocp_if omap2430_mpu__l3_main = { | ||
77 | .master = &omap2430_mpu_hwmod, | ||
78 | .slave = &omap2430_l3_main_hwmod, | ||
79 | .user = OCP_USER_MPU, | ||
80 | }; | ||
81 | |||
82 | /* Slave interfaces on the L3 interconnect */ | ||
83 | static struct omap_hwmod_ocp_if *omap2430_l3_main_slaves[] = { | ||
84 | &omap2430_mpu__l3_main, | ||
85 | }; | ||
86 | |||
87 | /* DSS -> l3 */ | ||
88 | static struct omap_hwmod_ocp_if omap2430_dss__l3 = { | ||
89 | .master = &omap2430_dss_core_hwmod, | ||
90 | .slave = &omap2430_l3_main_hwmod, | ||
91 | .fw = { | ||
92 | .omap2 = { | ||
93 | .l3_perm_bit = OMAP2_L3_CORE_FW_CONNID_DSS, | ||
94 | .flags = OMAP_FIREWALL_L3, | ||
95 | } | ||
96 | }, | ||
97 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
98 | }; | ||
99 | |||
100 | /* Master interfaces on the L3 interconnect */ | ||
101 | static struct omap_hwmod_ocp_if *omap2430_l3_main_masters[] = { | ||
102 | &omap2430_l3_main__l4_core, | ||
103 | }; | ||
104 | |||
105 | /* L3 */ | ||
106 | static struct omap_hwmod omap2430_l3_main_hwmod = { | ||
107 | .name = "l3_main", | ||
108 | .class = &l3_hwmod_class, | ||
109 | .masters = omap2430_l3_main_masters, | ||
110 | .masters_cnt = ARRAY_SIZE(omap2430_l3_main_masters), | ||
111 | .slaves = omap2430_l3_main_slaves, | ||
112 | .slaves_cnt = ARRAY_SIZE(omap2430_l3_main_slaves), | ||
113 | .flags = HWMOD_NO_IDLEST, | ||
114 | }; | ||
115 | |||
116 | static struct omap_hwmod omap2430_l4_wkup_hwmod; | ||
117 | static struct omap_hwmod omap2430_uart1_hwmod; | ||
118 | static struct omap_hwmod omap2430_uart2_hwmod; | ||
119 | static struct omap_hwmod omap2430_uart3_hwmod; | ||
120 | static struct omap_hwmod omap2430_i2c1_hwmod; | ||
121 | static struct omap_hwmod omap2430_i2c2_hwmod; | ||
122 | |||
123 | static struct omap_hwmod omap2430_usbhsotg_hwmod; | ||
124 | |||
125 | /* l3_core -> usbhsotg interface */ | ||
126 | static struct omap_hwmod_ocp_if omap2430_usbhsotg__l3 = { | ||
127 | .master = &omap2430_usbhsotg_hwmod, | ||
128 | .slave = &omap2430_l3_main_hwmod, | ||
129 | .clk = "core_l3_ck", | ||
130 | .user = OCP_USER_MPU, | ||
131 | }; | ||
132 | |||
133 | /* L4 CORE -> I2C1 interface */ | ||
134 | static struct omap_hwmod_ocp_if omap2430_l4_core__i2c1 = { | ||
135 | .master = &omap2430_l4_core_hwmod, | ||
136 | .slave = &omap2430_i2c1_hwmod, | ||
137 | .clk = "i2c1_ick", | ||
138 | .addr = omap2_i2c1_addr_space, | ||
139 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
140 | }; | ||
141 | |||
142 | /* L4 CORE -> I2C2 interface */ | ||
143 | static struct omap_hwmod_ocp_if omap2430_l4_core__i2c2 = { | ||
144 | .master = &omap2430_l4_core_hwmod, | ||
145 | .slave = &omap2430_i2c2_hwmod, | ||
146 | .clk = "i2c2_ick", | ||
147 | .addr = omap2_i2c2_addr_space, | ||
148 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
149 | }; | ||
150 | |||
151 | /* L4_CORE -> L4_WKUP interface */ | ||
152 | static struct omap_hwmod_ocp_if omap2430_l4_core__l4_wkup = { | ||
153 | .master = &omap2430_l4_core_hwmod, | ||
154 | .slave = &omap2430_l4_wkup_hwmod, | ||
155 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
156 | }; | ||
157 | |||
158 | /* L4 CORE -> UART1 interface */ | ||
159 | static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = { | ||
160 | .master = &omap2430_l4_core_hwmod, | ||
161 | .slave = &omap2430_uart1_hwmod, | ||
162 | .clk = "uart1_ick", | ||
163 | .addr = omap2xxx_uart1_addr_space, | ||
164 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
165 | }; | ||
166 | |||
167 | /* L4 CORE -> UART2 interface */ | ||
168 | static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = { | ||
169 | .master = &omap2430_l4_core_hwmod, | ||
170 | .slave = &omap2430_uart2_hwmod, | ||
171 | .clk = "uart2_ick", | ||
172 | .addr = omap2xxx_uart2_addr_space, | ||
173 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
174 | }; | ||
175 | |||
176 | /* L4 PER -> UART3 interface */ | ||
177 | static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = { | ||
178 | .master = &omap2430_l4_core_hwmod, | ||
179 | .slave = &omap2430_uart3_hwmod, | ||
180 | .clk = "uart3_ick", | ||
181 | .addr = omap2xxx_uart3_addr_space, | ||
182 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
183 | }; | ||
184 | |||
185 | /* | 43 | /* |
186 | * usbhsotg interface data | 44 | * IP blocks |
187 | */ | ||
188 | static struct omap_hwmod_addr_space omap2430_usbhsotg_addrs[] = { | ||
189 | { | ||
190 | .pa_start = OMAP243X_HS_BASE, | ||
191 | .pa_end = OMAP243X_HS_BASE + SZ_4K - 1, | ||
192 | .flags = ADDR_TYPE_RT | ||
193 | }, | ||
194 | { } | ||
195 | }; | ||
196 | |||
197 | /* l4_core ->usbhsotg interface */ | ||
198 | static struct omap_hwmod_ocp_if omap2430_l4_core__usbhsotg = { | ||
199 | .master = &omap2430_l4_core_hwmod, | ||
200 | .slave = &omap2430_usbhsotg_hwmod, | ||
201 | .clk = "usb_l4_ick", | ||
202 | .addr = omap2430_usbhsotg_addrs, | ||
203 | .user = OCP_USER_MPU, | ||
204 | }; | ||
205 | |||
206 | static struct omap_hwmod_ocp_if *omap2430_usbhsotg_masters[] = { | ||
207 | &omap2430_usbhsotg__l3, | ||
208 | }; | ||
209 | |||
210 | static struct omap_hwmod_ocp_if *omap2430_usbhsotg_slaves[] = { | ||
211 | &omap2430_l4_core__usbhsotg, | ||
212 | }; | ||
213 | |||
214 | /* L4 CORE -> MMC1 interface */ | ||
215 | static struct omap_hwmod_ocp_if omap2430_l4_core__mmc1 = { | ||
216 | .master = &omap2430_l4_core_hwmod, | ||
217 | .slave = &omap2430_mmc1_hwmod, | ||
218 | .clk = "mmchs1_ick", | ||
219 | .addr = omap2430_mmc1_addr_space, | ||
220 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
221 | }; | ||
222 | |||
223 | /* L4 CORE -> MMC2 interface */ | ||
224 | static struct omap_hwmod_ocp_if omap2430_l4_core__mmc2 = { | ||
225 | .master = &omap2430_l4_core_hwmod, | ||
226 | .slave = &omap2430_mmc2_hwmod, | ||
227 | .clk = "mmchs2_ick", | ||
228 | .addr = omap2430_mmc2_addr_space, | ||
229 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
230 | }; | ||
231 | |||
232 | /* Slave interfaces on the L4_CORE interconnect */ | ||
233 | static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = { | ||
234 | &omap2430_l3_main__l4_core, | ||
235 | }; | ||
236 | |||
237 | /* Master interfaces on the L4_CORE interconnect */ | ||
238 | static struct omap_hwmod_ocp_if *omap2430_l4_core_masters[] = { | ||
239 | &omap2430_l4_core__l4_wkup, | ||
240 | &omap2430_l4_core__mmc1, | ||
241 | &omap2430_l4_core__mmc2, | ||
242 | }; | ||
243 | |||
244 | /* L4 CORE */ | ||
245 | static struct omap_hwmod omap2430_l4_core_hwmod = { | ||
246 | .name = "l4_core", | ||
247 | .class = &l4_hwmod_class, | ||
248 | .masters = omap2430_l4_core_masters, | ||
249 | .masters_cnt = ARRAY_SIZE(omap2430_l4_core_masters), | ||
250 | .slaves = omap2430_l4_core_slaves, | ||
251 | .slaves_cnt = ARRAY_SIZE(omap2430_l4_core_slaves), | ||
252 | .flags = HWMOD_NO_IDLEST, | ||
253 | }; | ||
254 | |||
255 | /* Slave interfaces on the L4_WKUP interconnect */ | ||
256 | static struct omap_hwmod_ocp_if *omap2430_l4_wkup_slaves[] = { | ||
257 | &omap2430_l4_core__l4_wkup, | ||
258 | &omap2_l4_core__uart1, | ||
259 | &omap2_l4_core__uart2, | ||
260 | &omap2_l4_core__uart3, | ||
261 | }; | ||
262 | |||
263 | /* Master interfaces on the L4_WKUP interconnect */ | ||
264 | static struct omap_hwmod_ocp_if *omap2430_l4_wkup_masters[] = { | ||
265 | }; | ||
266 | |||
267 | /* l4 core -> mcspi1 interface */ | ||
268 | static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi1 = { | ||
269 | .master = &omap2430_l4_core_hwmod, | ||
270 | .slave = &omap2430_mcspi1_hwmod, | ||
271 | .clk = "mcspi1_ick", | ||
272 | .addr = omap2_mcspi1_addr_space, | ||
273 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
274 | }; | ||
275 | |||
276 | /* l4 core -> mcspi2 interface */ | ||
277 | static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi2 = { | ||
278 | .master = &omap2430_l4_core_hwmod, | ||
279 | .slave = &omap2430_mcspi2_hwmod, | ||
280 | .clk = "mcspi2_ick", | ||
281 | .addr = omap2_mcspi2_addr_space, | ||
282 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
283 | }; | ||
284 | |||
285 | /* l4 core -> mcspi3 interface */ | ||
286 | static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi3 = { | ||
287 | .master = &omap2430_l4_core_hwmod, | ||
288 | .slave = &omap2430_mcspi3_hwmod, | ||
289 | .clk = "mcspi3_ick", | ||
290 | .addr = omap2430_mcspi3_addr_space, | ||
291 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
292 | }; | ||
293 | |||
294 | /* L4 WKUP */ | ||
295 | static struct omap_hwmod omap2430_l4_wkup_hwmod = { | ||
296 | .name = "l4_wkup", | ||
297 | .class = &l4_hwmod_class, | ||
298 | .masters = omap2430_l4_wkup_masters, | ||
299 | .masters_cnt = ARRAY_SIZE(omap2430_l4_wkup_masters), | ||
300 | .slaves = omap2430_l4_wkup_slaves, | ||
301 | .slaves_cnt = ARRAY_SIZE(omap2430_l4_wkup_slaves), | ||
302 | .flags = HWMOD_NO_IDLEST, | ||
303 | }; | ||
304 | |||
305 | /* Master interfaces on the MPU device */ | ||
306 | static struct omap_hwmod_ocp_if *omap2430_mpu_masters[] = { | ||
307 | &omap2430_mpu__l3_main, | ||
308 | }; | ||
309 | |||
310 | /* MPU */ | ||
311 | static struct omap_hwmod omap2430_mpu_hwmod = { | ||
312 | .name = "mpu", | ||
313 | .class = &mpu_hwmod_class, | ||
314 | .main_clk = "mpu_ck", | ||
315 | .masters = omap2430_mpu_masters, | ||
316 | .masters_cnt = ARRAY_SIZE(omap2430_mpu_masters), | ||
317 | }; | ||
318 | |||
319 | /* | ||
320 | * IVA2_1 interface data | ||
321 | */ | 45 | */ |
322 | 46 | ||
323 | /* IVA2 <- L3 interface */ | 47 | /* IVA2 (IVA2) */ |
324 | static struct omap_hwmod_ocp_if omap2430_l3__iva = { | 48 | static struct omap_hwmod_rst_info omap2430_iva_resets[] = { |
325 | .master = &omap2430_l3_main_hwmod, | 49 | { .name = "logic", .rst_shift = 0 }, |
326 | .slave = &omap2430_iva_hwmod, | 50 | { .name = "mmu", .rst_shift = 1 }, |
327 | .clk = "dsp_fck", | ||
328 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
329 | }; | ||
330 | |||
331 | static struct omap_hwmod_ocp_if *omap2430_iva_masters[] = { | ||
332 | &omap2430_l3__iva, | ||
333 | }; | 51 | }; |
334 | 52 | ||
335 | /* | ||
336 | * IVA2 (IVA2) | ||
337 | */ | ||
338 | |||
339 | static struct omap_hwmod omap2430_iva_hwmod = { | 53 | static struct omap_hwmod omap2430_iva_hwmod = { |
340 | .name = "iva", | 54 | .name = "iva", |
341 | .class = &iva_hwmod_class, | 55 | .class = &iva_hwmod_class, |
342 | .masters = omap2430_iva_masters, | 56 | .clkdm_name = "dsp_clkdm", |
343 | .masters_cnt = ARRAY_SIZE(omap2430_iva_masters), | 57 | .rst_lines = omap2430_iva_resets, |
344 | }; | 58 | .rst_lines_cnt = ARRAY_SIZE(omap2430_iva_resets), |
345 | 59 | .main_clk = "dsp_fck", | |
346 | /* always-on timers dev attribute */ | ||
347 | static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = { | ||
348 | .timer_capability = OMAP_TIMER_ALWON, | ||
349 | }; | ||
350 | |||
351 | /* pwm timers dev attribute */ | ||
352 | static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = { | ||
353 | .timer_capability = OMAP_TIMER_HAS_PWM, | ||
354 | }; | ||
355 | |||
356 | /* timer1 */ | ||
357 | static struct omap_hwmod omap2430_timer1_hwmod; | ||
358 | |||
359 | static struct omap_hwmod_addr_space omap2430_timer1_addrs[] = { | ||
360 | { | ||
361 | .pa_start = 0x49018000, | ||
362 | .pa_end = 0x49018000 + SZ_1K - 1, | ||
363 | .flags = ADDR_TYPE_RT | ||
364 | }, | ||
365 | { } | ||
366 | }; | ||
367 | |||
368 | /* l4_wkup -> timer1 */ | ||
369 | static struct omap_hwmod_ocp_if omap2430_l4_wkup__timer1 = { | ||
370 | .master = &omap2430_l4_wkup_hwmod, | ||
371 | .slave = &omap2430_timer1_hwmod, | ||
372 | .clk = "gpt1_ick", | ||
373 | .addr = omap2430_timer1_addrs, | ||
374 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
375 | }; | ||
376 | |||
377 | /* timer1 slave port */ | ||
378 | static struct omap_hwmod_ocp_if *omap2430_timer1_slaves[] = { | ||
379 | &omap2430_l4_wkup__timer1, | ||
380 | }; | ||
381 | |||
382 | /* timer1 hwmod */ | ||
383 | static struct omap_hwmod omap2430_timer1_hwmod = { | ||
384 | .name = "timer1", | ||
385 | .mpu_irqs = omap2_timer1_mpu_irqs, | ||
386 | .main_clk = "gpt1_fck", | ||
387 | .prcm = { | ||
388 | .omap2 = { | ||
389 | .prcm_reg_id = 1, | ||
390 | .module_bit = OMAP24XX_EN_GPT1_SHIFT, | ||
391 | .module_offs = WKUP_MOD, | ||
392 | .idlest_reg_id = 1, | ||
393 | .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT, | ||
394 | }, | ||
395 | }, | ||
396 | .dev_attr = &capability_alwon_dev_attr, | ||
397 | .slaves = omap2430_timer1_slaves, | ||
398 | .slaves_cnt = ARRAY_SIZE(omap2430_timer1_slaves), | ||
399 | .class = &omap2xxx_timer_hwmod_class, | ||
400 | }; | ||
401 | |||
402 | /* timer2 */ | ||
403 | static struct omap_hwmod omap2430_timer2_hwmod; | ||
404 | |||
405 | /* l4_core -> timer2 */ | ||
406 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer2 = { | ||
407 | .master = &omap2430_l4_core_hwmod, | ||
408 | .slave = &omap2430_timer2_hwmod, | ||
409 | .clk = "gpt2_ick", | ||
410 | .addr = omap2xxx_timer2_addrs, | ||
411 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
412 | }; | ||
413 | |||
414 | /* timer2 slave port */ | ||
415 | static struct omap_hwmod_ocp_if *omap2430_timer2_slaves[] = { | ||
416 | &omap2430_l4_core__timer2, | ||
417 | }; | ||
418 | |||
419 | /* timer2 hwmod */ | ||
420 | static struct omap_hwmod omap2430_timer2_hwmod = { | ||
421 | .name = "timer2", | ||
422 | .mpu_irqs = omap2_timer2_mpu_irqs, | ||
423 | .main_clk = "gpt2_fck", | ||
424 | .prcm = { | ||
425 | .omap2 = { | ||
426 | .prcm_reg_id = 1, | ||
427 | .module_bit = OMAP24XX_EN_GPT2_SHIFT, | ||
428 | .module_offs = CORE_MOD, | ||
429 | .idlest_reg_id = 1, | ||
430 | .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT, | ||
431 | }, | ||
432 | }, | ||
433 | .dev_attr = &capability_alwon_dev_attr, | ||
434 | .slaves = omap2430_timer2_slaves, | ||
435 | .slaves_cnt = ARRAY_SIZE(omap2430_timer2_slaves), | ||
436 | .class = &omap2xxx_timer_hwmod_class, | ||
437 | }; | ||
438 | |||
439 | /* timer3 */ | ||
440 | static struct omap_hwmod omap2430_timer3_hwmod; | ||
441 | |||
442 | /* l4_core -> timer3 */ | ||
443 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer3 = { | ||
444 | .master = &omap2430_l4_core_hwmod, | ||
445 | .slave = &omap2430_timer3_hwmod, | ||
446 | .clk = "gpt3_ick", | ||
447 | .addr = omap2xxx_timer3_addrs, | ||
448 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
449 | }; | ||
450 | |||
451 | /* timer3 slave port */ | ||
452 | static struct omap_hwmod_ocp_if *omap2430_timer3_slaves[] = { | ||
453 | &omap2430_l4_core__timer3, | ||
454 | }; | ||
455 | |||
456 | /* timer3 hwmod */ | ||
457 | static struct omap_hwmod omap2430_timer3_hwmod = { | ||
458 | .name = "timer3", | ||
459 | .mpu_irqs = omap2_timer3_mpu_irqs, | ||
460 | .main_clk = "gpt3_fck", | ||
461 | .prcm = { | ||
462 | .omap2 = { | ||
463 | .prcm_reg_id = 1, | ||
464 | .module_bit = OMAP24XX_EN_GPT3_SHIFT, | ||
465 | .module_offs = CORE_MOD, | ||
466 | .idlest_reg_id = 1, | ||
467 | .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT, | ||
468 | }, | ||
469 | }, | ||
470 | .dev_attr = &capability_alwon_dev_attr, | ||
471 | .slaves = omap2430_timer3_slaves, | ||
472 | .slaves_cnt = ARRAY_SIZE(omap2430_timer3_slaves), | ||
473 | .class = &omap2xxx_timer_hwmod_class, | ||
474 | }; | ||
475 | |||
476 | /* timer4 */ | ||
477 | static struct omap_hwmod omap2430_timer4_hwmod; | ||
478 | |||
479 | /* l4_core -> timer4 */ | ||
480 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer4 = { | ||
481 | .master = &omap2430_l4_core_hwmod, | ||
482 | .slave = &omap2430_timer4_hwmod, | ||
483 | .clk = "gpt4_ick", | ||
484 | .addr = omap2xxx_timer4_addrs, | ||
485 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
486 | }; | ||
487 | |||
488 | /* timer4 slave port */ | ||
489 | static struct omap_hwmod_ocp_if *omap2430_timer4_slaves[] = { | ||
490 | &omap2430_l4_core__timer4, | ||
491 | }; | ||
492 | |||
493 | /* timer4 hwmod */ | ||
494 | static struct omap_hwmod omap2430_timer4_hwmod = { | ||
495 | .name = "timer4", | ||
496 | .mpu_irqs = omap2_timer4_mpu_irqs, | ||
497 | .main_clk = "gpt4_fck", | ||
498 | .prcm = { | ||
499 | .omap2 = { | ||
500 | .prcm_reg_id = 1, | ||
501 | .module_bit = OMAP24XX_EN_GPT4_SHIFT, | ||
502 | .module_offs = CORE_MOD, | ||
503 | .idlest_reg_id = 1, | ||
504 | .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT, | ||
505 | }, | ||
506 | }, | ||
507 | .dev_attr = &capability_alwon_dev_attr, | ||
508 | .slaves = omap2430_timer4_slaves, | ||
509 | .slaves_cnt = ARRAY_SIZE(omap2430_timer4_slaves), | ||
510 | .class = &omap2xxx_timer_hwmod_class, | ||
511 | }; | ||
512 | |||
513 | /* timer5 */ | ||
514 | static struct omap_hwmod omap2430_timer5_hwmod; | ||
515 | |||
516 | /* l4_core -> timer5 */ | ||
517 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer5 = { | ||
518 | .master = &omap2430_l4_core_hwmod, | ||
519 | .slave = &omap2430_timer5_hwmod, | ||
520 | .clk = "gpt5_ick", | ||
521 | .addr = omap2xxx_timer5_addrs, | ||
522 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
523 | }; | ||
524 | |||
525 | /* timer5 slave port */ | ||
526 | static struct omap_hwmod_ocp_if *omap2430_timer5_slaves[] = { | ||
527 | &omap2430_l4_core__timer5, | ||
528 | }; | ||
529 | |||
530 | /* timer5 hwmod */ | ||
531 | static struct omap_hwmod omap2430_timer5_hwmod = { | ||
532 | .name = "timer5", | ||
533 | .mpu_irqs = omap2_timer5_mpu_irqs, | ||
534 | .main_clk = "gpt5_fck", | ||
535 | .prcm = { | ||
536 | .omap2 = { | ||
537 | .prcm_reg_id = 1, | ||
538 | .module_bit = OMAP24XX_EN_GPT5_SHIFT, | ||
539 | .module_offs = CORE_MOD, | ||
540 | .idlest_reg_id = 1, | ||
541 | .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT, | ||
542 | }, | ||
543 | }, | ||
544 | .dev_attr = &capability_alwon_dev_attr, | ||
545 | .slaves = omap2430_timer5_slaves, | ||
546 | .slaves_cnt = ARRAY_SIZE(omap2430_timer5_slaves), | ||
547 | .class = &omap2xxx_timer_hwmod_class, | ||
548 | }; | ||
549 | |||
550 | /* timer6 */ | ||
551 | static struct omap_hwmod omap2430_timer6_hwmod; | ||
552 | |||
553 | /* l4_core -> timer6 */ | ||
554 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer6 = { | ||
555 | .master = &omap2430_l4_core_hwmod, | ||
556 | .slave = &omap2430_timer6_hwmod, | ||
557 | .clk = "gpt6_ick", | ||
558 | .addr = omap2xxx_timer6_addrs, | ||
559 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
560 | }; | ||
561 | |||
562 | /* timer6 slave port */ | ||
563 | static struct omap_hwmod_ocp_if *omap2430_timer6_slaves[] = { | ||
564 | &omap2430_l4_core__timer6, | ||
565 | }; | ||
566 | |||
567 | /* timer6 hwmod */ | ||
568 | static struct omap_hwmod omap2430_timer6_hwmod = { | ||
569 | .name = "timer6", | ||
570 | .mpu_irqs = omap2_timer6_mpu_irqs, | ||
571 | .main_clk = "gpt6_fck", | ||
572 | .prcm = { | ||
573 | .omap2 = { | ||
574 | .prcm_reg_id = 1, | ||
575 | .module_bit = OMAP24XX_EN_GPT6_SHIFT, | ||
576 | .module_offs = CORE_MOD, | ||
577 | .idlest_reg_id = 1, | ||
578 | .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT, | ||
579 | }, | ||
580 | }, | ||
581 | .dev_attr = &capability_alwon_dev_attr, | ||
582 | .slaves = omap2430_timer6_slaves, | ||
583 | .slaves_cnt = ARRAY_SIZE(omap2430_timer6_slaves), | ||
584 | .class = &omap2xxx_timer_hwmod_class, | ||
585 | }; | ||
586 | |||
587 | /* timer7 */ | ||
588 | static struct omap_hwmod omap2430_timer7_hwmod; | ||
589 | |||
590 | /* l4_core -> timer7 */ | ||
591 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer7 = { | ||
592 | .master = &omap2430_l4_core_hwmod, | ||
593 | .slave = &omap2430_timer7_hwmod, | ||
594 | .clk = "gpt7_ick", | ||
595 | .addr = omap2xxx_timer7_addrs, | ||
596 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
597 | }; | ||
598 | |||
599 | /* timer7 slave port */ | ||
600 | static struct omap_hwmod_ocp_if *omap2430_timer7_slaves[] = { | ||
601 | &omap2430_l4_core__timer7, | ||
602 | }; | ||
603 | |||
604 | /* timer7 hwmod */ | ||
605 | static struct omap_hwmod omap2430_timer7_hwmod = { | ||
606 | .name = "timer7", | ||
607 | .mpu_irqs = omap2_timer7_mpu_irqs, | ||
608 | .main_clk = "gpt7_fck", | ||
609 | .prcm = { | ||
610 | .omap2 = { | ||
611 | .prcm_reg_id = 1, | ||
612 | .module_bit = OMAP24XX_EN_GPT7_SHIFT, | ||
613 | .module_offs = CORE_MOD, | ||
614 | .idlest_reg_id = 1, | ||
615 | .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT, | ||
616 | }, | ||
617 | }, | ||
618 | .dev_attr = &capability_alwon_dev_attr, | ||
619 | .slaves = omap2430_timer7_slaves, | ||
620 | .slaves_cnt = ARRAY_SIZE(omap2430_timer7_slaves), | ||
621 | .class = &omap2xxx_timer_hwmod_class, | ||
622 | }; | ||
623 | |||
624 | /* timer8 */ | ||
625 | static struct omap_hwmod omap2430_timer8_hwmod; | ||
626 | |||
627 | /* l4_core -> timer8 */ | ||
628 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer8 = { | ||
629 | .master = &omap2430_l4_core_hwmod, | ||
630 | .slave = &omap2430_timer8_hwmod, | ||
631 | .clk = "gpt8_ick", | ||
632 | .addr = omap2xxx_timer8_addrs, | ||
633 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
634 | }; | ||
635 | |||
636 | /* timer8 slave port */ | ||
637 | static struct omap_hwmod_ocp_if *omap2430_timer8_slaves[] = { | ||
638 | &omap2430_l4_core__timer8, | ||
639 | }; | ||
640 | |||
641 | /* timer8 hwmod */ | ||
642 | static struct omap_hwmod omap2430_timer8_hwmod = { | ||
643 | .name = "timer8", | ||
644 | .mpu_irqs = omap2_timer8_mpu_irqs, | ||
645 | .main_clk = "gpt8_fck", | ||
646 | .prcm = { | ||
647 | .omap2 = { | ||
648 | .prcm_reg_id = 1, | ||
649 | .module_bit = OMAP24XX_EN_GPT8_SHIFT, | ||
650 | .module_offs = CORE_MOD, | ||
651 | .idlest_reg_id = 1, | ||
652 | .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT, | ||
653 | }, | ||
654 | }, | ||
655 | .dev_attr = &capability_alwon_dev_attr, | ||
656 | .slaves = omap2430_timer8_slaves, | ||
657 | .slaves_cnt = ARRAY_SIZE(omap2430_timer8_slaves), | ||
658 | .class = &omap2xxx_timer_hwmod_class, | ||
659 | }; | ||
660 | |||
661 | /* timer9 */ | ||
662 | static struct omap_hwmod omap2430_timer9_hwmod; | ||
663 | |||
664 | /* l4_core -> timer9 */ | ||
665 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer9 = { | ||
666 | .master = &omap2430_l4_core_hwmod, | ||
667 | .slave = &omap2430_timer9_hwmod, | ||
668 | .clk = "gpt9_ick", | ||
669 | .addr = omap2xxx_timer9_addrs, | ||
670 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
671 | }; | ||
672 | |||
673 | /* timer9 slave port */ | ||
674 | static struct omap_hwmod_ocp_if *omap2430_timer9_slaves[] = { | ||
675 | &omap2430_l4_core__timer9, | ||
676 | }; | ||
677 | |||
678 | /* timer9 hwmod */ | ||
679 | static struct omap_hwmod omap2430_timer9_hwmod = { | ||
680 | .name = "timer9", | ||
681 | .mpu_irqs = omap2_timer9_mpu_irqs, | ||
682 | .main_clk = "gpt9_fck", | ||
683 | .prcm = { | ||
684 | .omap2 = { | ||
685 | .prcm_reg_id = 1, | ||
686 | .module_bit = OMAP24XX_EN_GPT9_SHIFT, | ||
687 | .module_offs = CORE_MOD, | ||
688 | .idlest_reg_id = 1, | ||
689 | .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT, | ||
690 | }, | ||
691 | }, | ||
692 | .dev_attr = &capability_pwm_dev_attr, | ||
693 | .slaves = omap2430_timer9_slaves, | ||
694 | .slaves_cnt = ARRAY_SIZE(omap2430_timer9_slaves), | ||
695 | .class = &omap2xxx_timer_hwmod_class, | ||
696 | }; | ||
697 | |||
698 | /* timer10 */ | ||
699 | static struct omap_hwmod omap2430_timer10_hwmod; | ||
700 | |||
701 | /* l4_core -> timer10 */ | ||
702 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer10 = { | ||
703 | .master = &omap2430_l4_core_hwmod, | ||
704 | .slave = &omap2430_timer10_hwmod, | ||
705 | .clk = "gpt10_ick", | ||
706 | .addr = omap2_timer10_addrs, | ||
707 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
708 | }; | ||
709 | |||
710 | /* timer10 slave port */ | ||
711 | static struct omap_hwmod_ocp_if *omap2430_timer10_slaves[] = { | ||
712 | &omap2430_l4_core__timer10, | ||
713 | }; | ||
714 | |||
715 | /* timer10 hwmod */ | ||
716 | static struct omap_hwmod omap2430_timer10_hwmod = { | ||
717 | .name = "timer10", | ||
718 | .mpu_irqs = omap2_timer10_mpu_irqs, | ||
719 | .main_clk = "gpt10_fck", | ||
720 | .prcm = { | ||
721 | .omap2 = { | ||
722 | .prcm_reg_id = 1, | ||
723 | .module_bit = OMAP24XX_EN_GPT10_SHIFT, | ||
724 | .module_offs = CORE_MOD, | ||
725 | .idlest_reg_id = 1, | ||
726 | .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT, | ||
727 | }, | ||
728 | }, | ||
729 | .dev_attr = &capability_pwm_dev_attr, | ||
730 | .slaves = omap2430_timer10_slaves, | ||
731 | .slaves_cnt = ARRAY_SIZE(omap2430_timer10_slaves), | ||
732 | .class = &omap2xxx_timer_hwmod_class, | ||
733 | }; | ||
734 | |||
735 | /* timer11 */ | ||
736 | static struct omap_hwmod omap2430_timer11_hwmod; | ||
737 | |||
738 | /* l4_core -> timer11 */ | ||
739 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer11 = { | ||
740 | .master = &omap2430_l4_core_hwmod, | ||
741 | .slave = &omap2430_timer11_hwmod, | ||
742 | .clk = "gpt11_ick", | ||
743 | .addr = omap2_timer11_addrs, | ||
744 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
745 | }; | ||
746 | |||
747 | /* timer11 slave port */ | ||
748 | static struct omap_hwmod_ocp_if *omap2430_timer11_slaves[] = { | ||
749 | &omap2430_l4_core__timer11, | ||
750 | }; | ||
751 | |||
752 | /* timer11 hwmod */ | ||
753 | static struct omap_hwmod omap2430_timer11_hwmod = { | ||
754 | .name = "timer11", | ||
755 | .mpu_irqs = omap2_timer11_mpu_irqs, | ||
756 | .main_clk = "gpt11_fck", | ||
757 | .prcm = { | ||
758 | .omap2 = { | ||
759 | .prcm_reg_id = 1, | ||
760 | .module_bit = OMAP24XX_EN_GPT11_SHIFT, | ||
761 | .module_offs = CORE_MOD, | ||
762 | .idlest_reg_id = 1, | ||
763 | .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT, | ||
764 | }, | ||
765 | }, | ||
766 | .dev_attr = &capability_pwm_dev_attr, | ||
767 | .slaves = omap2430_timer11_slaves, | ||
768 | .slaves_cnt = ARRAY_SIZE(omap2430_timer11_slaves), | ||
769 | .class = &omap2xxx_timer_hwmod_class, | ||
770 | }; | ||
771 | |||
772 | /* timer12 */ | ||
773 | static struct omap_hwmod omap2430_timer12_hwmod; | ||
774 | |||
775 | /* l4_core -> timer12 */ | ||
776 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer12 = { | ||
777 | .master = &omap2430_l4_core_hwmod, | ||
778 | .slave = &omap2430_timer12_hwmod, | ||
779 | .clk = "gpt12_ick", | ||
780 | .addr = omap2xxx_timer12_addrs, | ||
781 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
782 | }; | ||
783 | |||
784 | /* timer12 slave port */ | ||
785 | static struct omap_hwmod_ocp_if *omap2430_timer12_slaves[] = { | ||
786 | &omap2430_l4_core__timer12, | ||
787 | }; | ||
788 | |||
789 | /* timer12 hwmod */ | ||
790 | static struct omap_hwmod omap2430_timer12_hwmod = { | ||
791 | .name = "timer12", | ||
792 | .mpu_irqs = omap2xxx_timer12_mpu_irqs, | ||
793 | .main_clk = "gpt12_fck", | ||
794 | .prcm = { | ||
795 | .omap2 = { | ||
796 | .prcm_reg_id = 1, | ||
797 | .module_bit = OMAP24XX_EN_GPT12_SHIFT, | ||
798 | .module_offs = CORE_MOD, | ||
799 | .idlest_reg_id = 1, | ||
800 | .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT, | ||
801 | }, | ||
802 | }, | ||
803 | .dev_attr = &capability_pwm_dev_attr, | ||
804 | .slaves = omap2430_timer12_slaves, | ||
805 | .slaves_cnt = ARRAY_SIZE(omap2430_timer12_slaves), | ||
806 | .class = &omap2xxx_timer_hwmod_class, | ||
807 | }; | ||
808 | |||
809 | /* l4_wkup -> wd_timer2 */ | ||
810 | static struct omap_hwmod_addr_space omap2430_wd_timer2_addrs[] = { | ||
811 | { | ||
812 | .pa_start = 0x49016000, | ||
813 | .pa_end = 0x4901607f, | ||
814 | .flags = ADDR_TYPE_RT | ||
815 | }, | ||
816 | { } | ||
817 | }; | ||
818 | |||
819 | static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = { | ||
820 | .master = &omap2430_l4_wkup_hwmod, | ||
821 | .slave = &omap2430_wd_timer2_hwmod, | ||
822 | .clk = "mpu_wdt_ick", | ||
823 | .addr = omap2430_wd_timer2_addrs, | ||
824 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
825 | }; | ||
826 | |||
827 | /* wd_timer2 */ | ||
828 | static struct omap_hwmod_ocp_if *omap2430_wd_timer2_slaves[] = { | ||
829 | &omap2430_l4_wkup__wd_timer2, | ||
830 | }; | ||
831 | |||
832 | static struct omap_hwmod omap2430_wd_timer2_hwmod = { | ||
833 | .name = "wd_timer2", | ||
834 | .class = &omap2xxx_wd_timer_hwmod_class, | ||
835 | .main_clk = "mpu_wdt_fck", | ||
836 | .prcm = { | ||
837 | .omap2 = { | ||
838 | .prcm_reg_id = 1, | ||
839 | .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT, | ||
840 | .module_offs = WKUP_MOD, | ||
841 | .idlest_reg_id = 1, | ||
842 | .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT, | ||
843 | }, | ||
844 | }, | ||
845 | .slaves = omap2430_wd_timer2_slaves, | ||
846 | .slaves_cnt = ARRAY_SIZE(omap2430_wd_timer2_slaves), | ||
847 | }; | ||
848 | |||
849 | /* UART1 */ | ||
850 | |||
851 | static struct omap_hwmod_ocp_if *omap2430_uart1_slaves[] = { | ||
852 | &omap2_l4_core__uart1, | ||
853 | }; | ||
854 | |||
855 | static struct omap_hwmod omap2430_uart1_hwmod = { | ||
856 | .name = "uart1", | ||
857 | .mpu_irqs = omap2_uart1_mpu_irqs, | ||
858 | .sdma_reqs = omap2_uart1_sdma_reqs, | ||
859 | .main_clk = "uart1_fck", | ||
860 | .prcm = { | ||
861 | .omap2 = { | ||
862 | .module_offs = CORE_MOD, | ||
863 | .prcm_reg_id = 1, | ||
864 | .module_bit = OMAP24XX_EN_UART1_SHIFT, | ||
865 | .idlest_reg_id = 1, | ||
866 | .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT, | ||
867 | }, | ||
868 | }, | ||
869 | .slaves = omap2430_uart1_slaves, | ||
870 | .slaves_cnt = ARRAY_SIZE(omap2430_uart1_slaves), | ||
871 | .class = &omap2_uart_class, | ||
872 | }; | ||
873 | |||
874 | /* UART2 */ | ||
875 | |||
876 | static struct omap_hwmod_ocp_if *omap2430_uart2_slaves[] = { | ||
877 | &omap2_l4_core__uart2, | ||
878 | }; | ||
879 | |||
880 | static struct omap_hwmod omap2430_uart2_hwmod = { | ||
881 | .name = "uart2", | ||
882 | .mpu_irqs = omap2_uart2_mpu_irqs, | ||
883 | .sdma_reqs = omap2_uart2_sdma_reqs, | ||
884 | .main_clk = "uart2_fck", | ||
885 | .prcm = { | ||
886 | .omap2 = { | ||
887 | .module_offs = CORE_MOD, | ||
888 | .prcm_reg_id = 1, | ||
889 | .module_bit = OMAP24XX_EN_UART2_SHIFT, | ||
890 | .idlest_reg_id = 1, | ||
891 | .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT, | ||
892 | }, | ||
893 | }, | ||
894 | .slaves = omap2430_uart2_slaves, | ||
895 | .slaves_cnt = ARRAY_SIZE(omap2430_uart2_slaves), | ||
896 | .class = &omap2_uart_class, | ||
897 | }; | ||
898 | |||
899 | /* UART3 */ | ||
900 | |||
901 | static struct omap_hwmod_ocp_if *omap2430_uart3_slaves[] = { | ||
902 | &omap2_l4_core__uart3, | ||
903 | }; | ||
904 | |||
905 | static struct omap_hwmod omap2430_uart3_hwmod = { | ||
906 | .name = "uart3", | ||
907 | .mpu_irqs = omap2_uart3_mpu_irqs, | ||
908 | .sdma_reqs = omap2_uart3_sdma_reqs, | ||
909 | .main_clk = "uart3_fck", | ||
910 | .prcm = { | ||
911 | .omap2 = { | ||
912 | .module_offs = CORE_MOD, | ||
913 | .prcm_reg_id = 2, | ||
914 | .module_bit = OMAP24XX_EN_UART3_SHIFT, | ||
915 | .idlest_reg_id = 2, | ||
916 | .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT, | ||
917 | }, | ||
918 | }, | ||
919 | .slaves = omap2430_uart3_slaves, | ||
920 | .slaves_cnt = ARRAY_SIZE(omap2430_uart3_slaves), | ||
921 | .class = &omap2_uart_class, | ||
922 | }; | ||
923 | |||
924 | /* dss */ | ||
925 | /* dss master ports */ | ||
926 | static struct omap_hwmod_ocp_if *omap2430_dss_masters[] = { | ||
927 | &omap2430_dss__l3, | ||
928 | }; | ||
929 | |||
930 | /* l4_core -> dss */ | ||
931 | static struct omap_hwmod_ocp_if omap2430_l4_core__dss = { | ||
932 | .master = &omap2430_l4_core_hwmod, | ||
933 | .slave = &omap2430_dss_core_hwmod, | ||
934 | .clk = "dss_ick", | ||
935 | .addr = omap2_dss_addrs, | ||
936 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
937 | }; | ||
938 | |||
939 | /* dss slave ports */ | ||
940 | static struct omap_hwmod_ocp_if *omap2430_dss_slaves[] = { | ||
941 | &omap2430_l4_core__dss, | ||
942 | }; | ||
943 | |||
944 | static struct omap_hwmod_opt_clk dss_opt_clks[] = { | ||
945 | /* | ||
946 | * The DSS HW needs all DSS clocks enabled during reset. The dss_core | ||
947 | * driver does not use these clocks. | ||
948 | */ | ||
949 | { .role = "tv_clk", .clk = "dss_54m_fck" }, | ||
950 | { .role = "sys_clk", .clk = "dss2_fck" }, | ||
951 | }; | ||
952 | |||
953 | static struct omap_hwmod omap2430_dss_core_hwmod = { | ||
954 | .name = "dss_core", | ||
955 | .class = &omap2_dss_hwmod_class, | ||
956 | .main_clk = "dss1_fck", /* instead of dss_fck */ | ||
957 | .sdma_reqs = omap2xxx_dss_sdma_chs, | ||
958 | .prcm = { | ||
959 | .omap2 = { | ||
960 | .prcm_reg_id = 1, | ||
961 | .module_bit = OMAP24XX_EN_DSS1_SHIFT, | ||
962 | .module_offs = CORE_MOD, | ||
963 | .idlest_reg_id = 1, | ||
964 | .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT, | ||
965 | }, | ||
966 | }, | ||
967 | .opt_clks = dss_opt_clks, | ||
968 | .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks), | ||
969 | .slaves = omap2430_dss_slaves, | ||
970 | .slaves_cnt = ARRAY_SIZE(omap2430_dss_slaves), | ||
971 | .masters = omap2430_dss_masters, | ||
972 | .masters_cnt = ARRAY_SIZE(omap2430_dss_masters), | ||
973 | .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET, | ||
974 | }; | ||
975 | |||
976 | /* l4_core -> dss_dispc */ | ||
977 | static struct omap_hwmod_ocp_if omap2430_l4_core__dss_dispc = { | ||
978 | .master = &omap2430_l4_core_hwmod, | ||
979 | .slave = &omap2430_dss_dispc_hwmod, | ||
980 | .clk = "dss_ick", | ||
981 | .addr = omap2_dss_dispc_addrs, | ||
982 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
983 | }; | ||
984 | |||
985 | /* dss_dispc slave ports */ | ||
986 | static struct omap_hwmod_ocp_if *omap2430_dss_dispc_slaves[] = { | ||
987 | &omap2430_l4_core__dss_dispc, | ||
988 | }; | ||
989 | |||
990 | static struct omap_hwmod omap2430_dss_dispc_hwmod = { | ||
991 | .name = "dss_dispc", | ||
992 | .class = &omap2_dispc_hwmod_class, | ||
993 | .mpu_irqs = omap2_dispc_irqs, | ||
994 | .main_clk = "dss1_fck", | ||
995 | .prcm = { | ||
996 | .omap2 = { | ||
997 | .prcm_reg_id = 1, | ||
998 | .module_bit = OMAP24XX_EN_DSS1_SHIFT, | ||
999 | .module_offs = CORE_MOD, | ||
1000 | .idlest_reg_id = 1, | ||
1001 | .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT, | ||
1002 | }, | ||
1003 | }, | ||
1004 | .slaves = omap2430_dss_dispc_slaves, | ||
1005 | .slaves_cnt = ARRAY_SIZE(omap2430_dss_dispc_slaves), | ||
1006 | .flags = HWMOD_NO_IDLEST, | ||
1007 | .dev_attr = &omap2_3_dss_dispc_dev_attr | ||
1008 | }; | ||
1009 | |||
1010 | /* l4_core -> dss_rfbi */ | ||
1011 | static struct omap_hwmod_ocp_if omap2430_l4_core__dss_rfbi = { | ||
1012 | .master = &omap2430_l4_core_hwmod, | ||
1013 | .slave = &omap2430_dss_rfbi_hwmod, | ||
1014 | .clk = "dss_ick", | ||
1015 | .addr = omap2_dss_rfbi_addrs, | ||
1016 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1017 | }; | ||
1018 | |||
1019 | /* dss_rfbi slave ports */ | ||
1020 | static struct omap_hwmod_ocp_if *omap2430_dss_rfbi_slaves[] = { | ||
1021 | &omap2430_l4_core__dss_rfbi, | ||
1022 | }; | ||
1023 | |||
1024 | static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = { | ||
1025 | { .role = "ick", .clk = "dss_ick" }, | ||
1026 | }; | ||
1027 | |||
1028 | static struct omap_hwmod omap2430_dss_rfbi_hwmod = { | ||
1029 | .name = "dss_rfbi", | ||
1030 | .class = &omap2_rfbi_hwmod_class, | ||
1031 | .main_clk = "dss1_fck", | ||
1032 | .prcm = { | ||
1033 | .omap2 = { | ||
1034 | .prcm_reg_id = 1, | ||
1035 | .module_bit = OMAP24XX_EN_DSS1_SHIFT, | ||
1036 | .module_offs = CORE_MOD, | ||
1037 | }, | ||
1038 | }, | ||
1039 | .opt_clks = dss_rfbi_opt_clks, | ||
1040 | .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks), | ||
1041 | .slaves = omap2430_dss_rfbi_slaves, | ||
1042 | .slaves_cnt = ARRAY_SIZE(omap2430_dss_rfbi_slaves), | ||
1043 | .flags = HWMOD_NO_IDLEST, | ||
1044 | }; | ||
1045 | |||
1046 | /* l4_core -> dss_venc */ | ||
1047 | static struct omap_hwmod_ocp_if omap2430_l4_core__dss_venc = { | ||
1048 | .master = &omap2430_l4_core_hwmod, | ||
1049 | .slave = &omap2430_dss_venc_hwmod, | ||
1050 | .clk = "dss_ick", | ||
1051 | .addr = omap2_dss_venc_addrs, | ||
1052 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1053 | }; | ||
1054 | |||
1055 | /* dss_venc slave ports */ | ||
1056 | static struct omap_hwmod_ocp_if *omap2430_dss_venc_slaves[] = { | ||
1057 | &omap2430_l4_core__dss_venc, | ||
1058 | }; | ||
1059 | |||
1060 | static struct omap_hwmod omap2430_dss_venc_hwmod = { | ||
1061 | .name = "dss_venc", | ||
1062 | .class = &omap2_venc_hwmod_class, | ||
1063 | .main_clk = "dss_54m_fck", | ||
1064 | .prcm = { | ||
1065 | .omap2 = { | ||
1066 | .prcm_reg_id = 1, | ||
1067 | .module_bit = OMAP24XX_EN_DSS1_SHIFT, | ||
1068 | .module_offs = CORE_MOD, | ||
1069 | }, | ||
1070 | }, | ||
1071 | .slaves = omap2430_dss_venc_slaves, | ||
1072 | .slaves_cnt = ARRAY_SIZE(omap2430_dss_venc_slaves), | ||
1073 | .flags = HWMOD_NO_IDLEST, | ||
1074 | }; | 60 | }; |
1075 | 61 | ||
1076 | /* I2C common */ | 62 | /* I2C common */ |
@@ -1098,11 +84,6 @@ static struct omap_i2c_dev_attr i2c_dev_attr = { | |||
1098 | }; | 84 | }; |
1099 | 85 | ||
1100 | /* I2C1 */ | 86 | /* I2C1 */ |
1101 | |||
1102 | static struct omap_hwmod_ocp_if *omap2430_i2c1_slaves[] = { | ||
1103 | &omap2430_l4_core__i2c1, | ||
1104 | }; | ||
1105 | |||
1106 | static struct omap_hwmod omap2430_i2c1_hwmod = { | 87 | static struct omap_hwmod omap2430_i2c1_hwmod = { |
1107 | .name = "i2c1", | 88 | .name = "i2c1", |
1108 | .flags = HWMOD_16BIT_REG, | 89 | .flags = HWMOD_16BIT_REG, |
@@ -1126,18 +107,11 @@ static struct omap_hwmod omap2430_i2c1_hwmod = { | |||
1126 | .idlest_idle_bit = OMAP2430_ST_I2CHS1_SHIFT, | 107 | .idlest_idle_bit = OMAP2430_ST_I2CHS1_SHIFT, |
1127 | }, | 108 | }, |
1128 | }, | 109 | }, |
1129 | .slaves = omap2430_i2c1_slaves, | ||
1130 | .slaves_cnt = ARRAY_SIZE(omap2430_i2c1_slaves), | ||
1131 | .class = &i2c_class, | 110 | .class = &i2c_class, |
1132 | .dev_attr = &i2c_dev_attr, | 111 | .dev_attr = &i2c_dev_attr, |
1133 | }; | 112 | }; |
1134 | 113 | ||
1135 | /* I2C2 */ | 114 | /* I2C2 */ |
1136 | |||
1137 | static struct omap_hwmod_ocp_if *omap2430_i2c2_slaves[] = { | ||
1138 | &omap2430_l4_core__i2c2, | ||
1139 | }; | ||
1140 | |||
1141 | static struct omap_hwmod omap2430_i2c2_hwmod = { | 115 | static struct omap_hwmod omap2430_i2c2_hwmod = { |
1142 | .name = "i2c2", | 116 | .name = "i2c2", |
1143 | .flags = HWMOD_16BIT_REG, | 117 | .flags = HWMOD_16BIT_REG, |
@@ -1153,218 +127,16 @@ static struct omap_hwmod omap2430_i2c2_hwmod = { | |||
1153 | .idlest_idle_bit = OMAP2430_ST_I2CHS2_SHIFT, | 127 | .idlest_idle_bit = OMAP2430_ST_I2CHS2_SHIFT, |
1154 | }, | 128 | }, |
1155 | }, | 129 | }, |
1156 | .slaves = omap2430_i2c2_slaves, | ||
1157 | .slaves_cnt = ARRAY_SIZE(omap2430_i2c2_slaves), | ||
1158 | .class = &i2c_class, | 130 | .class = &i2c_class, |
1159 | .dev_attr = &i2c_dev_attr, | 131 | .dev_attr = &i2c_dev_attr, |
1160 | }; | 132 | }; |
1161 | 133 | ||
1162 | /* l4_wkup -> gpio1 */ | ||
1163 | static struct omap_hwmod_addr_space omap2430_gpio1_addr_space[] = { | ||
1164 | { | ||
1165 | .pa_start = 0x4900C000, | ||
1166 | .pa_end = 0x4900C1ff, | ||
1167 | .flags = ADDR_TYPE_RT | ||
1168 | }, | ||
1169 | { } | ||
1170 | }; | ||
1171 | |||
1172 | static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = { | ||
1173 | .master = &omap2430_l4_wkup_hwmod, | ||
1174 | .slave = &omap2430_gpio1_hwmod, | ||
1175 | .clk = "gpios_ick", | ||
1176 | .addr = omap2430_gpio1_addr_space, | ||
1177 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1178 | }; | ||
1179 | |||
1180 | /* l4_wkup -> gpio2 */ | ||
1181 | static struct omap_hwmod_addr_space omap2430_gpio2_addr_space[] = { | ||
1182 | { | ||
1183 | .pa_start = 0x4900E000, | ||
1184 | .pa_end = 0x4900E1ff, | ||
1185 | .flags = ADDR_TYPE_RT | ||
1186 | }, | ||
1187 | { } | ||
1188 | }; | ||
1189 | |||
1190 | static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = { | ||
1191 | .master = &omap2430_l4_wkup_hwmod, | ||
1192 | .slave = &omap2430_gpio2_hwmod, | ||
1193 | .clk = "gpios_ick", | ||
1194 | .addr = omap2430_gpio2_addr_space, | ||
1195 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1196 | }; | ||
1197 | |||
1198 | /* l4_wkup -> gpio3 */ | ||
1199 | static struct omap_hwmod_addr_space omap2430_gpio3_addr_space[] = { | ||
1200 | { | ||
1201 | .pa_start = 0x49010000, | ||
1202 | .pa_end = 0x490101ff, | ||
1203 | .flags = ADDR_TYPE_RT | ||
1204 | }, | ||
1205 | { } | ||
1206 | }; | ||
1207 | |||
1208 | static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = { | ||
1209 | .master = &omap2430_l4_wkup_hwmod, | ||
1210 | .slave = &omap2430_gpio3_hwmod, | ||
1211 | .clk = "gpios_ick", | ||
1212 | .addr = omap2430_gpio3_addr_space, | ||
1213 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1214 | }; | ||
1215 | |||
1216 | /* l4_wkup -> gpio4 */ | ||
1217 | static struct omap_hwmod_addr_space omap2430_gpio4_addr_space[] = { | ||
1218 | { | ||
1219 | .pa_start = 0x49012000, | ||
1220 | .pa_end = 0x490121ff, | ||
1221 | .flags = ADDR_TYPE_RT | ||
1222 | }, | ||
1223 | { } | ||
1224 | }; | ||
1225 | |||
1226 | static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = { | ||
1227 | .master = &omap2430_l4_wkup_hwmod, | ||
1228 | .slave = &omap2430_gpio4_hwmod, | ||
1229 | .clk = "gpios_ick", | ||
1230 | .addr = omap2430_gpio4_addr_space, | ||
1231 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1232 | }; | ||
1233 | |||
1234 | /* l4_core -> gpio5 */ | ||
1235 | static struct omap_hwmod_addr_space omap2430_gpio5_addr_space[] = { | ||
1236 | { | ||
1237 | .pa_start = 0x480B6000, | ||
1238 | .pa_end = 0x480B61ff, | ||
1239 | .flags = ADDR_TYPE_RT | ||
1240 | }, | ||
1241 | { } | ||
1242 | }; | ||
1243 | |||
1244 | static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = { | ||
1245 | .master = &omap2430_l4_core_hwmod, | ||
1246 | .slave = &omap2430_gpio5_hwmod, | ||
1247 | .clk = "gpio5_ick", | ||
1248 | .addr = omap2430_gpio5_addr_space, | ||
1249 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1250 | }; | ||
1251 | |||
1252 | /* gpio dev_attr */ | ||
1253 | static struct omap_gpio_dev_attr gpio_dev_attr = { | ||
1254 | .bank_width = 32, | ||
1255 | .dbck_flag = false, | ||
1256 | }; | ||
1257 | |||
1258 | /* gpio1 */ | ||
1259 | static struct omap_hwmod_ocp_if *omap2430_gpio1_slaves[] = { | ||
1260 | &omap2430_l4_wkup__gpio1, | ||
1261 | }; | ||
1262 | |||
1263 | static struct omap_hwmod omap2430_gpio1_hwmod = { | ||
1264 | .name = "gpio1", | ||
1265 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | ||
1266 | .mpu_irqs = omap2_gpio1_irqs, | ||
1267 | .main_clk = "gpios_fck", | ||
1268 | .prcm = { | ||
1269 | .omap2 = { | ||
1270 | .prcm_reg_id = 1, | ||
1271 | .module_bit = OMAP24XX_EN_GPIOS_SHIFT, | ||
1272 | .module_offs = WKUP_MOD, | ||
1273 | .idlest_reg_id = 1, | ||
1274 | .idlest_idle_bit = OMAP24XX_EN_GPIOS_SHIFT, | ||
1275 | }, | ||
1276 | }, | ||
1277 | .slaves = omap2430_gpio1_slaves, | ||
1278 | .slaves_cnt = ARRAY_SIZE(omap2430_gpio1_slaves), | ||
1279 | .class = &omap2xxx_gpio_hwmod_class, | ||
1280 | .dev_attr = &gpio_dev_attr, | ||
1281 | }; | ||
1282 | |||
1283 | /* gpio2 */ | ||
1284 | static struct omap_hwmod_ocp_if *omap2430_gpio2_slaves[] = { | ||
1285 | &omap2430_l4_wkup__gpio2, | ||
1286 | }; | ||
1287 | |||
1288 | static struct omap_hwmod omap2430_gpio2_hwmod = { | ||
1289 | .name = "gpio2", | ||
1290 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | ||
1291 | .mpu_irqs = omap2_gpio2_irqs, | ||
1292 | .main_clk = "gpios_fck", | ||
1293 | .prcm = { | ||
1294 | .omap2 = { | ||
1295 | .prcm_reg_id = 1, | ||
1296 | .module_bit = OMAP24XX_EN_GPIOS_SHIFT, | ||
1297 | .module_offs = WKUP_MOD, | ||
1298 | .idlest_reg_id = 1, | ||
1299 | .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT, | ||
1300 | }, | ||
1301 | }, | ||
1302 | .slaves = omap2430_gpio2_slaves, | ||
1303 | .slaves_cnt = ARRAY_SIZE(omap2430_gpio2_slaves), | ||
1304 | .class = &omap2xxx_gpio_hwmod_class, | ||
1305 | .dev_attr = &gpio_dev_attr, | ||
1306 | }; | ||
1307 | |||
1308 | /* gpio3 */ | ||
1309 | static struct omap_hwmod_ocp_if *omap2430_gpio3_slaves[] = { | ||
1310 | &omap2430_l4_wkup__gpio3, | ||
1311 | }; | ||
1312 | |||
1313 | static struct omap_hwmod omap2430_gpio3_hwmod = { | ||
1314 | .name = "gpio3", | ||
1315 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | ||
1316 | .mpu_irqs = omap2_gpio3_irqs, | ||
1317 | .main_clk = "gpios_fck", | ||
1318 | .prcm = { | ||
1319 | .omap2 = { | ||
1320 | .prcm_reg_id = 1, | ||
1321 | .module_bit = OMAP24XX_EN_GPIOS_SHIFT, | ||
1322 | .module_offs = WKUP_MOD, | ||
1323 | .idlest_reg_id = 1, | ||
1324 | .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT, | ||
1325 | }, | ||
1326 | }, | ||
1327 | .slaves = omap2430_gpio3_slaves, | ||
1328 | .slaves_cnt = ARRAY_SIZE(omap2430_gpio3_slaves), | ||
1329 | .class = &omap2xxx_gpio_hwmod_class, | ||
1330 | .dev_attr = &gpio_dev_attr, | ||
1331 | }; | ||
1332 | |||
1333 | /* gpio4 */ | ||
1334 | static struct omap_hwmod_ocp_if *omap2430_gpio4_slaves[] = { | ||
1335 | &omap2430_l4_wkup__gpio4, | ||
1336 | }; | ||
1337 | |||
1338 | static struct omap_hwmod omap2430_gpio4_hwmod = { | ||
1339 | .name = "gpio4", | ||
1340 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | ||
1341 | .mpu_irqs = omap2_gpio4_irqs, | ||
1342 | .main_clk = "gpios_fck", | ||
1343 | .prcm = { | ||
1344 | .omap2 = { | ||
1345 | .prcm_reg_id = 1, | ||
1346 | .module_bit = OMAP24XX_EN_GPIOS_SHIFT, | ||
1347 | .module_offs = WKUP_MOD, | ||
1348 | .idlest_reg_id = 1, | ||
1349 | .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT, | ||
1350 | }, | ||
1351 | }, | ||
1352 | .slaves = omap2430_gpio4_slaves, | ||
1353 | .slaves_cnt = ARRAY_SIZE(omap2430_gpio4_slaves), | ||
1354 | .class = &omap2xxx_gpio_hwmod_class, | ||
1355 | .dev_attr = &gpio_dev_attr, | ||
1356 | }; | ||
1357 | |||
1358 | /* gpio5 */ | 134 | /* gpio5 */ |
1359 | static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = { | 135 | static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = { |
1360 | { .irq = 33 }, /* INT_24XX_GPIO_BANK5 */ | 136 | { .irq = 33 }, /* INT_24XX_GPIO_BANK5 */ |
1361 | { .irq = -1 } | 137 | { .irq = -1 } |
1362 | }; | 138 | }; |
1363 | 139 | ||
1364 | static struct omap_hwmod_ocp_if *omap2430_gpio5_slaves[] = { | ||
1365 | &omap2430_l4_core__gpio5, | ||
1366 | }; | ||
1367 | |||
1368 | static struct omap_hwmod omap2430_gpio5_hwmod = { | 140 | static struct omap_hwmod omap2430_gpio5_hwmod = { |
1369 | .name = "gpio5", | 141 | .name = "gpio5", |
1370 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | 142 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
@@ -1379,10 +151,8 @@ static struct omap_hwmod omap2430_gpio5_hwmod = { | |||
1379 | .idlest_idle_bit = OMAP2430_ST_GPIO5_SHIFT, | 151 | .idlest_idle_bit = OMAP2430_ST_GPIO5_SHIFT, |
1380 | }, | 152 | }, |
1381 | }, | 153 | }, |
1382 | .slaves = omap2430_gpio5_slaves, | ||
1383 | .slaves_cnt = ARRAY_SIZE(omap2430_gpio5_slaves), | ||
1384 | .class = &omap2xxx_gpio_hwmod_class, | 154 | .class = &omap2xxx_gpio_hwmod_class, |
1385 | .dev_attr = &gpio_dev_attr, | 155 | .dev_attr = &omap2xxx_gpio_dev_attr, |
1386 | }; | 156 | }; |
1387 | 157 | ||
1388 | /* dma attributes */ | 158 | /* dma attributes */ |
@@ -1392,66 +162,21 @@ static struct omap_dma_dev_attr dma_dev_attr = { | |||
1392 | .lch_count = 32, | 162 | .lch_count = 32, |
1393 | }; | 163 | }; |
1394 | 164 | ||
1395 | /* dma_system -> L3 */ | ||
1396 | static struct omap_hwmod_ocp_if omap2430_dma_system__l3 = { | ||
1397 | .master = &omap2430_dma_system_hwmod, | ||
1398 | .slave = &omap2430_l3_main_hwmod, | ||
1399 | .clk = "core_l3_ck", | ||
1400 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1401 | }; | ||
1402 | |||
1403 | /* dma_system master ports */ | ||
1404 | static struct omap_hwmod_ocp_if *omap2430_dma_system_masters[] = { | ||
1405 | &omap2430_dma_system__l3, | ||
1406 | }; | ||
1407 | |||
1408 | /* l4_core -> dma_system */ | ||
1409 | static struct omap_hwmod_ocp_if omap2430_l4_core__dma_system = { | ||
1410 | .master = &omap2430_l4_core_hwmod, | ||
1411 | .slave = &omap2430_dma_system_hwmod, | ||
1412 | .clk = "sdma_ick", | ||
1413 | .addr = omap2_dma_system_addrs, | ||
1414 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1415 | }; | ||
1416 | |||
1417 | /* dma_system slave ports */ | ||
1418 | static struct omap_hwmod_ocp_if *omap2430_dma_system_slaves[] = { | ||
1419 | &omap2430_l4_core__dma_system, | ||
1420 | }; | ||
1421 | |||
1422 | static struct omap_hwmod omap2430_dma_system_hwmod = { | 165 | static struct omap_hwmod omap2430_dma_system_hwmod = { |
1423 | .name = "dma", | 166 | .name = "dma", |
1424 | .class = &omap2xxx_dma_hwmod_class, | 167 | .class = &omap2xxx_dma_hwmod_class, |
1425 | .mpu_irqs = omap2_dma_system_irqs, | 168 | .mpu_irqs = omap2_dma_system_irqs, |
1426 | .main_clk = "core_l3_ck", | 169 | .main_clk = "core_l3_ck", |
1427 | .slaves = omap2430_dma_system_slaves, | ||
1428 | .slaves_cnt = ARRAY_SIZE(omap2430_dma_system_slaves), | ||
1429 | .masters = omap2430_dma_system_masters, | ||
1430 | .masters_cnt = ARRAY_SIZE(omap2430_dma_system_masters), | ||
1431 | .dev_attr = &dma_dev_attr, | 170 | .dev_attr = &dma_dev_attr, |
1432 | .flags = HWMOD_NO_IDLEST, | 171 | .flags = HWMOD_NO_IDLEST, |
1433 | }; | 172 | }; |
1434 | 173 | ||
1435 | /* mailbox */ | 174 | /* mailbox */ |
1436 | static struct omap_hwmod omap2430_mailbox_hwmod; | ||
1437 | static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = { | 175 | static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = { |
1438 | { .irq = 26 }, | 176 | { .irq = 26 }, |
1439 | { .irq = -1 } | 177 | { .irq = -1 } |
1440 | }; | 178 | }; |
1441 | 179 | ||
1442 | /* l4_core -> mailbox */ | ||
1443 | static struct omap_hwmod_ocp_if omap2430_l4_core__mailbox = { | ||
1444 | .master = &omap2430_l4_core_hwmod, | ||
1445 | .slave = &omap2430_mailbox_hwmod, | ||
1446 | .addr = omap2_mailbox_addrs, | ||
1447 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1448 | }; | ||
1449 | |||
1450 | /* mailbox slave ports */ | ||
1451 | static struct omap_hwmod_ocp_if *omap2430_mailbox_slaves[] = { | ||
1452 | &omap2430_l4_core__mailbox, | ||
1453 | }; | ||
1454 | |||
1455 | static struct omap_hwmod omap2430_mailbox_hwmod = { | 180 | static struct omap_hwmod omap2430_mailbox_hwmod = { |
1456 | .name = "mailbox", | 181 | .name = "mailbox", |
1457 | .class = &omap2xxx_mailbox_hwmod_class, | 182 | .class = &omap2xxx_mailbox_hwmod_class, |
@@ -1466,66 +191,6 @@ static struct omap_hwmod omap2430_mailbox_hwmod = { | |||
1466 | .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT, | 191 | .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT, |
1467 | }, | 192 | }, |
1468 | }, | 193 | }, |
1469 | .slaves = omap2430_mailbox_slaves, | ||
1470 | .slaves_cnt = ARRAY_SIZE(omap2430_mailbox_slaves), | ||
1471 | }; | ||
1472 | |||
1473 | /* mcspi1 */ | ||
1474 | static struct omap_hwmod_ocp_if *omap2430_mcspi1_slaves[] = { | ||
1475 | &omap2430_l4_core__mcspi1, | ||
1476 | }; | ||
1477 | |||
1478 | static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = { | ||
1479 | .num_chipselect = 4, | ||
1480 | }; | ||
1481 | |||
1482 | static struct omap_hwmod omap2430_mcspi1_hwmod = { | ||
1483 | .name = "mcspi1_hwmod", | ||
1484 | .mpu_irqs = omap2_mcspi1_mpu_irqs, | ||
1485 | .sdma_reqs = omap2_mcspi1_sdma_reqs, | ||
1486 | .main_clk = "mcspi1_fck", | ||
1487 | .prcm = { | ||
1488 | .omap2 = { | ||
1489 | .module_offs = CORE_MOD, | ||
1490 | .prcm_reg_id = 1, | ||
1491 | .module_bit = OMAP24XX_EN_MCSPI1_SHIFT, | ||
1492 | .idlest_reg_id = 1, | ||
1493 | .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT, | ||
1494 | }, | ||
1495 | }, | ||
1496 | .slaves = omap2430_mcspi1_slaves, | ||
1497 | .slaves_cnt = ARRAY_SIZE(omap2430_mcspi1_slaves), | ||
1498 | .class = &omap2xxx_mcspi_class, | ||
1499 | .dev_attr = &omap_mcspi1_dev_attr, | ||
1500 | }; | ||
1501 | |||
1502 | /* mcspi2 */ | ||
1503 | static struct omap_hwmod_ocp_if *omap2430_mcspi2_slaves[] = { | ||
1504 | &omap2430_l4_core__mcspi2, | ||
1505 | }; | ||
1506 | |||
1507 | static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = { | ||
1508 | .num_chipselect = 2, | ||
1509 | }; | ||
1510 | |||
1511 | static struct omap_hwmod omap2430_mcspi2_hwmod = { | ||
1512 | .name = "mcspi2_hwmod", | ||
1513 | .mpu_irqs = omap2_mcspi2_mpu_irqs, | ||
1514 | .sdma_reqs = omap2_mcspi2_sdma_reqs, | ||
1515 | .main_clk = "mcspi2_fck", | ||
1516 | .prcm = { | ||
1517 | .omap2 = { | ||
1518 | .module_offs = CORE_MOD, | ||
1519 | .prcm_reg_id = 1, | ||
1520 | .module_bit = OMAP24XX_EN_MCSPI2_SHIFT, | ||
1521 | .idlest_reg_id = 1, | ||
1522 | .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT, | ||
1523 | }, | ||
1524 | }, | ||
1525 | .slaves = omap2430_mcspi2_slaves, | ||
1526 | .slaves_cnt = ARRAY_SIZE(omap2430_mcspi2_slaves), | ||
1527 | .class = &omap2xxx_mcspi_class, | ||
1528 | .dev_attr = &omap_mcspi2_dev_attr, | ||
1529 | }; | 194 | }; |
1530 | 195 | ||
1531 | /* mcspi3 */ | 196 | /* mcspi3 */ |
@@ -1542,16 +207,12 @@ static struct omap_hwmod_dma_info omap2430_mcspi3_sdma_reqs[] = { | |||
1542 | { .dma_req = -1 } | 207 | { .dma_req = -1 } |
1543 | }; | 208 | }; |
1544 | 209 | ||
1545 | static struct omap_hwmod_ocp_if *omap2430_mcspi3_slaves[] = { | ||
1546 | &omap2430_l4_core__mcspi3, | ||
1547 | }; | ||
1548 | |||
1549 | static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = { | 210 | static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = { |
1550 | .num_chipselect = 2, | 211 | .num_chipselect = 2, |
1551 | }; | 212 | }; |
1552 | 213 | ||
1553 | static struct omap_hwmod omap2430_mcspi3_hwmod = { | 214 | static struct omap_hwmod omap2430_mcspi3_hwmod = { |
1554 | .name = "mcspi3_hwmod", | 215 | .name = "mcspi3", |
1555 | .mpu_irqs = omap2430_mcspi3_mpu_irqs, | 216 | .mpu_irqs = omap2430_mcspi3_mpu_irqs, |
1556 | .sdma_reqs = omap2430_mcspi3_sdma_reqs, | 217 | .sdma_reqs = omap2430_mcspi3_sdma_reqs, |
1557 | .main_clk = "mcspi3_fck", | 218 | .main_clk = "mcspi3_fck", |
@@ -1564,15 +225,11 @@ static struct omap_hwmod omap2430_mcspi3_hwmod = { | |||
1564 | .idlest_idle_bit = OMAP2430_ST_MCSPI3_SHIFT, | 225 | .idlest_idle_bit = OMAP2430_ST_MCSPI3_SHIFT, |
1565 | }, | 226 | }, |
1566 | }, | 227 | }, |
1567 | .slaves = omap2430_mcspi3_slaves, | ||
1568 | .slaves_cnt = ARRAY_SIZE(omap2430_mcspi3_slaves), | ||
1569 | .class = &omap2xxx_mcspi_class, | 228 | .class = &omap2xxx_mcspi_class, |
1570 | .dev_attr = &omap_mcspi3_dev_attr, | 229 | .dev_attr = &omap_mcspi3_dev_attr, |
1571 | }; | 230 | }; |
1572 | 231 | ||
1573 | /* | 232 | /* usbhsotg */ |
1574 | * usbhsotg | ||
1575 | */ | ||
1576 | static struct omap_hwmod_class_sysconfig omap2430_usbhsotg_sysc = { | 233 | static struct omap_hwmod_class_sysconfig omap2430_usbhsotg_sysc = { |
1577 | .rev_offs = 0x0400, | 234 | .rev_offs = 0x0400, |
1578 | .sysc_offs = 0x0404, | 235 | .sysc_offs = 0x0404, |
@@ -1611,10 +268,6 @@ static struct omap_hwmod omap2430_usbhsotg_hwmod = { | |||
1611 | .idlest_idle_bit = OMAP2430_ST_USBHS_SHIFT, | 268 | .idlest_idle_bit = OMAP2430_ST_USBHS_SHIFT, |
1612 | }, | 269 | }, |
1613 | }, | 270 | }, |
1614 | .masters = omap2430_usbhsotg_masters, | ||
1615 | .masters_cnt = ARRAY_SIZE(omap2430_usbhsotg_masters), | ||
1616 | .slaves = omap2430_usbhsotg_slaves, | ||
1617 | .slaves_cnt = ARRAY_SIZE(omap2430_usbhsotg_slaves), | ||
1618 | .class = &usbotg_class, | 271 | .class = &usbotg_class, |
1619 | /* | 272 | /* |
1620 | * Erratum ID: i479 idle_req / idle_ack mechanism potentially | 273 | * Erratum ID: i479 idle_req / idle_ack mechanism potentially |
@@ -1652,20 +305,6 @@ static struct omap_hwmod_irq_info omap2430_mcbsp1_irqs[] = { | |||
1652 | { .irq = -1 } | 305 | { .irq = -1 } |
1653 | }; | 306 | }; |
1654 | 307 | ||
1655 | /* l4_core -> mcbsp1 */ | ||
1656 | static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp1 = { | ||
1657 | .master = &omap2430_l4_core_hwmod, | ||
1658 | .slave = &omap2430_mcbsp1_hwmod, | ||
1659 | .clk = "mcbsp1_ick", | ||
1660 | .addr = omap2_mcbsp1_addrs, | ||
1661 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1662 | }; | ||
1663 | |||
1664 | /* mcbsp1 slave ports */ | ||
1665 | static struct omap_hwmod_ocp_if *omap2430_mcbsp1_slaves[] = { | ||
1666 | &omap2430_l4_core__mcbsp1, | ||
1667 | }; | ||
1668 | |||
1669 | static struct omap_hwmod omap2430_mcbsp1_hwmod = { | 308 | static struct omap_hwmod omap2430_mcbsp1_hwmod = { |
1670 | .name = "mcbsp1", | 309 | .name = "mcbsp1", |
1671 | .class = &omap2430_mcbsp_hwmod_class, | 310 | .class = &omap2430_mcbsp_hwmod_class, |
@@ -1681,8 +320,6 @@ static struct omap_hwmod omap2430_mcbsp1_hwmod = { | |||
1681 | .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT, | 320 | .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT, |
1682 | }, | 321 | }, |
1683 | }, | 322 | }, |
1684 | .slaves = omap2430_mcbsp1_slaves, | ||
1685 | .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp1_slaves), | ||
1686 | }; | 323 | }; |
1687 | 324 | ||
1688 | /* mcbsp2 */ | 325 | /* mcbsp2 */ |
@@ -1693,20 +330,6 @@ static struct omap_hwmod_irq_info omap2430_mcbsp2_irqs[] = { | |||
1693 | { .irq = -1 } | 330 | { .irq = -1 } |
1694 | }; | 331 | }; |
1695 | 332 | ||
1696 | /* l4_core -> mcbsp2 */ | ||
1697 | static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp2 = { | ||
1698 | .master = &omap2430_l4_core_hwmod, | ||
1699 | .slave = &omap2430_mcbsp2_hwmod, | ||
1700 | .clk = "mcbsp2_ick", | ||
1701 | .addr = omap2xxx_mcbsp2_addrs, | ||
1702 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1703 | }; | ||
1704 | |||
1705 | /* mcbsp2 slave ports */ | ||
1706 | static struct omap_hwmod_ocp_if *omap2430_mcbsp2_slaves[] = { | ||
1707 | &omap2430_l4_core__mcbsp2, | ||
1708 | }; | ||
1709 | |||
1710 | static struct omap_hwmod omap2430_mcbsp2_hwmod = { | 333 | static struct omap_hwmod omap2430_mcbsp2_hwmod = { |
1711 | .name = "mcbsp2", | 334 | .name = "mcbsp2", |
1712 | .class = &omap2430_mcbsp_hwmod_class, | 335 | .class = &omap2430_mcbsp_hwmod_class, |
@@ -1722,8 +345,6 @@ static struct omap_hwmod omap2430_mcbsp2_hwmod = { | |||
1722 | .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT, | 345 | .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT, |
1723 | }, | 346 | }, |
1724 | }, | 347 | }, |
1725 | .slaves = omap2430_mcbsp2_slaves, | ||
1726 | .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp2_slaves), | ||
1727 | }; | 348 | }; |
1728 | 349 | ||
1729 | /* mcbsp3 */ | 350 | /* mcbsp3 */ |
@@ -1734,30 +355,6 @@ static struct omap_hwmod_irq_info omap2430_mcbsp3_irqs[] = { | |||
1734 | { .irq = -1 } | 355 | { .irq = -1 } |
1735 | }; | 356 | }; |
1736 | 357 | ||
1737 | static struct omap_hwmod_addr_space omap2430_mcbsp3_addrs[] = { | ||
1738 | { | ||
1739 | .name = "mpu", | ||
1740 | .pa_start = 0x4808C000, | ||
1741 | .pa_end = 0x4808C0ff, | ||
1742 | .flags = ADDR_TYPE_RT | ||
1743 | }, | ||
1744 | { } | ||
1745 | }; | ||
1746 | |||
1747 | /* l4_core -> mcbsp3 */ | ||
1748 | static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp3 = { | ||
1749 | .master = &omap2430_l4_core_hwmod, | ||
1750 | .slave = &omap2430_mcbsp3_hwmod, | ||
1751 | .clk = "mcbsp3_ick", | ||
1752 | .addr = omap2430_mcbsp3_addrs, | ||
1753 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1754 | }; | ||
1755 | |||
1756 | /* mcbsp3 slave ports */ | ||
1757 | static struct omap_hwmod_ocp_if *omap2430_mcbsp3_slaves[] = { | ||
1758 | &omap2430_l4_core__mcbsp3, | ||
1759 | }; | ||
1760 | |||
1761 | static struct omap_hwmod omap2430_mcbsp3_hwmod = { | 358 | static struct omap_hwmod omap2430_mcbsp3_hwmod = { |
1762 | .name = "mcbsp3", | 359 | .name = "mcbsp3", |
1763 | .class = &omap2430_mcbsp_hwmod_class, | 360 | .class = &omap2430_mcbsp_hwmod_class, |
@@ -1773,8 +370,6 @@ static struct omap_hwmod omap2430_mcbsp3_hwmod = { | |||
1773 | .idlest_idle_bit = OMAP2430_ST_MCBSP3_SHIFT, | 370 | .idlest_idle_bit = OMAP2430_ST_MCBSP3_SHIFT, |
1774 | }, | 371 | }, |
1775 | }, | 372 | }, |
1776 | .slaves = omap2430_mcbsp3_slaves, | ||
1777 | .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp3_slaves), | ||
1778 | }; | 373 | }; |
1779 | 374 | ||
1780 | /* mcbsp4 */ | 375 | /* mcbsp4 */ |
@@ -1791,30 +386,6 @@ static struct omap_hwmod_dma_info omap2430_mcbsp4_sdma_chs[] = { | |||
1791 | { .dma_req = -1 } | 386 | { .dma_req = -1 } |
1792 | }; | 387 | }; |
1793 | 388 | ||
1794 | static struct omap_hwmod_addr_space omap2430_mcbsp4_addrs[] = { | ||
1795 | { | ||
1796 | .name = "mpu", | ||
1797 | .pa_start = 0x4808E000, | ||
1798 | .pa_end = 0x4808E0ff, | ||
1799 | .flags = ADDR_TYPE_RT | ||
1800 | }, | ||
1801 | { } | ||
1802 | }; | ||
1803 | |||
1804 | /* l4_core -> mcbsp4 */ | ||
1805 | static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp4 = { | ||
1806 | .master = &omap2430_l4_core_hwmod, | ||
1807 | .slave = &omap2430_mcbsp4_hwmod, | ||
1808 | .clk = "mcbsp4_ick", | ||
1809 | .addr = omap2430_mcbsp4_addrs, | ||
1810 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1811 | }; | ||
1812 | |||
1813 | /* mcbsp4 slave ports */ | ||
1814 | static struct omap_hwmod_ocp_if *omap2430_mcbsp4_slaves[] = { | ||
1815 | &omap2430_l4_core__mcbsp4, | ||
1816 | }; | ||
1817 | |||
1818 | static struct omap_hwmod omap2430_mcbsp4_hwmod = { | 389 | static struct omap_hwmod omap2430_mcbsp4_hwmod = { |
1819 | .name = "mcbsp4", | 390 | .name = "mcbsp4", |
1820 | .class = &omap2430_mcbsp_hwmod_class, | 391 | .class = &omap2430_mcbsp_hwmod_class, |
@@ -1830,8 +401,6 @@ static struct omap_hwmod omap2430_mcbsp4_hwmod = { | |||
1830 | .idlest_idle_bit = OMAP2430_ST_MCBSP4_SHIFT, | 401 | .idlest_idle_bit = OMAP2430_ST_MCBSP4_SHIFT, |
1831 | }, | 402 | }, |
1832 | }, | 403 | }, |
1833 | .slaves = omap2430_mcbsp4_slaves, | ||
1834 | .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp4_slaves), | ||
1835 | }; | 404 | }; |
1836 | 405 | ||
1837 | /* mcbsp5 */ | 406 | /* mcbsp5 */ |
@@ -1848,30 +417,6 @@ static struct omap_hwmod_dma_info omap2430_mcbsp5_sdma_chs[] = { | |||
1848 | { .dma_req = -1 } | 417 | { .dma_req = -1 } |
1849 | }; | 418 | }; |
1850 | 419 | ||
1851 | static struct omap_hwmod_addr_space omap2430_mcbsp5_addrs[] = { | ||
1852 | { | ||
1853 | .name = "mpu", | ||
1854 | .pa_start = 0x48096000, | ||
1855 | .pa_end = 0x480960ff, | ||
1856 | .flags = ADDR_TYPE_RT | ||
1857 | }, | ||
1858 | { } | ||
1859 | }; | ||
1860 | |||
1861 | /* l4_core -> mcbsp5 */ | ||
1862 | static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp5 = { | ||
1863 | .master = &omap2430_l4_core_hwmod, | ||
1864 | .slave = &omap2430_mcbsp5_hwmod, | ||
1865 | .clk = "mcbsp5_ick", | ||
1866 | .addr = omap2430_mcbsp5_addrs, | ||
1867 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1868 | }; | ||
1869 | |||
1870 | /* mcbsp5 slave ports */ | ||
1871 | static struct omap_hwmod_ocp_if *omap2430_mcbsp5_slaves[] = { | ||
1872 | &omap2430_l4_core__mcbsp5, | ||
1873 | }; | ||
1874 | |||
1875 | static struct omap_hwmod omap2430_mcbsp5_hwmod = { | 420 | static struct omap_hwmod omap2430_mcbsp5_hwmod = { |
1876 | .name = "mcbsp5", | 421 | .name = "mcbsp5", |
1877 | .class = &omap2430_mcbsp_hwmod_class, | 422 | .class = &omap2430_mcbsp_hwmod_class, |
@@ -1887,12 +432,9 @@ static struct omap_hwmod omap2430_mcbsp5_hwmod = { | |||
1887 | .idlest_idle_bit = OMAP2430_ST_MCBSP5_SHIFT, | 432 | .idlest_idle_bit = OMAP2430_ST_MCBSP5_SHIFT, |
1888 | }, | 433 | }, |
1889 | }, | 434 | }, |
1890 | .slaves = omap2430_mcbsp5_slaves, | ||
1891 | .slaves_cnt = ARRAY_SIZE(omap2430_mcbsp5_slaves), | ||
1892 | }; | 435 | }; |
1893 | 436 | ||
1894 | /* MMC/SD/SDIO common */ | 437 | /* MMC/SD/SDIO common */ |
1895 | |||
1896 | static struct omap_hwmod_class_sysconfig omap2430_mmc_sysc = { | 438 | static struct omap_hwmod_class_sysconfig omap2430_mmc_sysc = { |
1897 | .rev_offs = 0x1fc, | 439 | .rev_offs = 0x1fc, |
1898 | .sysc_offs = 0x10, | 440 | .sysc_offs = 0x10, |
@@ -1910,7 +452,6 @@ static struct omap_hwmod_class omap2430_mmc_class = { | |||
1910 | }; | 452 | }; |
1911 | 453 | ||
1912 | /* MMC/SD/SDIO1 */ | 454 | /* MMC/SD/SDIO1 */ |
1913 | |||
1914 | static struct omap_hwmod_irq_info omap2430_mmc1_mpu_irqs[] = { | 455 | static struct omap_hwmod_irq_info omap2430_mmc1_mpu_irqs[] = { |
1915 | { .irq = 83 }, | 456 | { .irq = 83 }, |
1916 | { .irq = -1 } | 457 | { .irq = -1 } |
@@ -1926,10 +467,6 @@ static struct omap_hwmod_opt_clk omap2430_mmc1_opt_clks[] = { | |||
1926 | { .role = "dbck", .clk = "mmchsdb1_fck" }, | 467 | { .role = "dbck", .clk = "mmchsdb1_fck" }, |
1927 | }; | 468 | }; |
1928 | 469 | ||
1929 | static struct omap_hwmod_ocp_if *omap2430_mmc1_slaves[] = { | ||
1930 | &omap2430_l4_core__mmc1, | ||
1931 | }; | ||
1932 | |||
1933 | static struct omap_mmc_dev_attr mmc1_dev_attr = { | 470 | static struct omap_mmc_dev_attr mmc1_dev_attr = { |
1934 | .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT, | 471 | .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT, |
1935 | }; | 472 | }; |
@@ -1952,13 +489,10 @@ static struct omap_hwmod omap2430_mmc1_hwmod = { | |||
1952 | }, | 489 | }, |
1953 | }, | 490 | }, |
1954 | .dev_attr = &mmc1_dev_attr, | 491 | .dev_attr = &mmc1_dev_attr, |
1955 | .slaves = omap2430_mmc1_slaves, | ||
1956 | .slaves_cnt = ARRAY_SIZE(omap2430_mmc1_slaves), | ||
1957 | .class = &omap2430_mmc_class, | 492 | .class = &omap2430_mmc_class, |
1958 | }; | 493 | }; |
1959 | 494 | ||
1960 | /* MMC/SD/SDIO2 */ | 495 | /* MMC/SD/SDIO2 */ |
1961 | |||
1962 | static struct omap_hwmod_irq_info omap2430_mmc2_mpu_irqs[] = { | 496 | static struct omap_hwmod_irq_info omap2430_mmc2_mpu_irqs[] = { |
1963 | { .irq = 86 }, | 497 | { .irq = 86 }, |
1964 | { .irq = -1 } | 498 | { .irq = -1 } |
@@ -1974,10 +508,6 @@ static struct omap_hwmod_opt_clk omap2430_mmc2_opt_clks[] = { | |||
1974 | { .role = "dbck", .clk = "mmchsdb2_fck" }, | 508 | { .role = "dbck", .clk = "mmchsdb2_fck" }, |
1975 | }; | 509 | }; |
1976 | 510 | ||
1977 | static struct omap_hwmod_ocp_if *omap2430_mmc2_slaves[] = { | ||
1978 | &omap2430_l4_core__mmc2, | ||
1979 | }; | ||
1980 | |||
1981 | static struct omap_hwmod omap2430_mmc2_hwmod = { | 511 | static struct omap_hwmod omap2430_mmc2_hwmod = { |
1982 | .name = "mmc2", | 512 | .name = "mmc2", |
1983 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | 513 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
@@ -1995,78 +525,371 @@ static struct omap_hwmod omap2430_mmc2_hwmod = { | |||
1995 | .idlest_idle_bit = OMAP2430_ST_MMCHS2_SHIFT, | 525 | .idlest_idle_bit = OMAP2430_ST_MMCHS2_SHIFT, |
1996 | }, | 526 | }, |
1997 | }, | 527 | }, |
1998 | .slaves = omap2430_mmc2_slaves, | ||
1999 | .slaves_cnt = ARRAY_SIZE(omap2430_mmc2_slaves), | ||
2000 | .class = &omap2430_mmc_class, | 528 | .class = &omap2430_mmc_class, |
2001 | }; | 529 | }; |
2002 | 530 | ||
2003 | static __initdata struct omap_hwmod *omap2430_hwmods[] = { | 531 | /* |
2004 | &omap2430_l3_main_hwmod, | 532 | * interfaces |
2005 | &omap2430_l4_core_hwmod, | 533 | */ |
2006 | &omap2430_l4_wkup_hwmod, | 534 | |
2007 | &omap2430_mpu_hwmod, | 535 | /* L3 -> L4_CORE interface */ |
2008 | &omap2430_iva_hwmod, | 536 | /* l3_core -> usbhsotg interface */ |
2009 | 537 | static struct omap_hwmod_ocp_if omap2430_usbhsotg__l3 = { | |
2010 | &omap2430_timer1_hwmod, | 538 | .master = &omap2430_usbhsotg_hwmod, |
2011 | &omap2430_timer2_hwmod, | 539 | .slave = &omap2xxx_l3_main_hwmod, |
2012 | &omap2430_timer3_hwmod, | 540 | .clk = "core_l3_ck", |
2013 | &omap2430_timer4_hwmod, | 541 | .user = OCP_USER_MPU, |
2014 | &omap2430_timer5_hwmod, | 542 | }; |
2015 | &omap2430_timer6_hwmod, | 543 | |
2016 | &omap2430_timer7_hwmod, | 544 | /* L4 CORE -> I2C1 interface */ |
2017 | &omap2430_timer8_hwmod, | 545 | static struct omap_hwmod_ocp_if omap2430_l4_core__i2c1 = { |
2018 | &omap2430_timer9_hwmod, | 546 | .master = &omap2xxx_l4_core_hwmod, |
2019 | &omap2430_timer10_hwmod, | 547 | .slave = &omap2430_i2c1_hwmod, |
2020 | &omap2430_timer11_hwmod, | 548 | .clk = "i2c1_ick", |
2021 | &omap2430_timer12_hwmod, | 549 | .addr = omap2_i2c1_addr_space, |
2022 | 550 | .user = OCP_USER_MPU | OCP_USER_SDMA, | |
2023 | &omap2430_wd_timer2_hwmod, | 551 | }; |
2024 | &omap2430_uart1_hwmod, | 552 | |
2025 | &omap2430_uart2_hwmod, | 553 | /* L4 CORE -> I2C2 interface */ |
2026 | &omap2430_uart3_hwmod, | 554 | static struct omap_hwmod_ocp_if omap2430_l4_core__i2c2 = { |
2027 | /* dss class */ | 555 | .master = &omap2xxx_l4_core_hwmod, |
2028 | &omap2430_dss_core_hwmod, | 556 | .slave = &omap2430_i2c2_hwmod, |
2029 | &omap2430_dss_dispc_hwmod, | 557 | .clk = "i2c2_ick", |
2030 | &omap2430_dss_rfbi_hwmod, | 558 | .addr = omap2_i2c2_addr_space, |
2031 | &omap2430_dss_venc_hwmod, | 559 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2032 | /* i2c class */ | 560 | }; |
2033 | &omap2430_i2c1_hwmod, | 561 | |
2034 | &omap2430_i2c2_hwmod, | 562 | static struct omap_hwmod_addr_space omap2430_usbhsotg_addrs[] = { |
2035 | &omap2430_mmc1_hwmod, | 563 | { |
2036 | &omap2430_mmc2_hwmod, | 564 | .pa_start = OMAP243X_HS_BASE, |
2037 | 565 | .pa_end = OMAP243X_HS_BASE + SZ_4K - 1, | |
2038 | /* gpio class */ | 566 | .flags = ADDR_TYPE_RT |
2039 | &omap2430_gpio1_hwmod, | 567 | }, |
2040 | &omap2430_gpio2_hwmod, | 568 | { } |
2041 | &omap2430_gpio3_hwmod, | 569 | }; |
2042 | &omap2430_gpio4_hwmod, | 570 | |
2043 | &omap2430_gpio5_hwmod, | 571 | /* l4_core ->usbhsotg interface */ |
2044 | 572 | static struct omap_hwmod_ocp_if omap2430_l4_core__usbhsotg = { | |
2045 | /* dma_system class*/ | 573 | .master = &omap2xxx_l4_core_hwmod, |
2046 | &omap2430_dma_system_hwmod, | 574 | .slave = &omap2430_usbhsotg_hwmod, |
2047 | 575 | .clk = "usb_l4_ick", | |
2048 | /* mcbsp class */ | 576 | .addr = omap2430_usbhsotg_addrs, |
2049 | &omap2430_mcbsp1_hwmod, | 577 | .user = OCP_USER_MPU, |
2050 | &omap2430_mcbsp2_hwmod, | 578 | }; |
2051 | &omap2430_mcbsp3_hwmod, | 579 | |
2052 | &omap2430_mcbsp4_hwmod, | 580 | /* L4 CORE -> MMC1 interface */ |
2053 | &omap2430_mcbsp5_hwmod, | 581 | static struct omap_hwmod_ocp_if omap2430_l4_core__mmc1 = { |
2054 | 582 | .master = &omap2xxx_l4_core_hwmod, | |
2055 | /* mailbox class */ | 583 | .slave = &omap2430_mmc1_hwmod, |
2056 | &omap2430_mailbox_hwmod, | 584 | .clk = "mmchs1_ick", |
2057 | 585 | .addr = omap2430_mmc1_addr_space, | |
2058 | /* mcspi class */ | 586 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2059 | &omap2430_mcspi1_hwmod, | 587 | }; |
2060 | &omap2430_mcspi2_hwmod, | 588 | |
2061 | &omap2430_mcspi3_hwmod, | 589 | /* L4 CORE -> MMC2 interface */ |
2062 | 590 | static struct omap_hwmod_ocp_if omap2430_l4_core__mmc2 = { | |
2063 | /* usbotg class*/ | 591 | .master = &omap2xxx_l4_core_hwmod, |
2064 | &omap2430_usbhsotg_hwmod, | 592 | .slave = &omap2430_mmc2_hwmod, |
593 | .clk = "mmchs2_ick", | ||
594 | .addr = omap2430_mmc2_addr_space, | ||
595 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
596 | }; | ||
597 | |||
598 | /* l4 core -> mcspi3 interface */ | ||
599 | static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi3 = { | ||
600 | .master = &omap2xxx_l4_core_hwmod, | ||
601 | .slave = &omap2430_mcspi3_hwmod, | ||
602 | .clk = "mcspi3_ick", | ||
603 | .addr = omap2430_mcspi3_addr_space, | ||
604 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
605 | }; | ||
606 | |||
607 | /* IVA2 <- L3 interface */ | ||
608 | static struct omap_hwmod_ocp_if omap2430_l3__iva = { | ||
609 | .master = &omap2xxx_l3_main_hwmod, | ||
610 | .slave = &omap2430_iva_hwmod, | ||
611 | .clk = "core_l3_ck", | ||
612 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
613 | }; | ||
614 | |||
615 | static struct omap_hwmod_addr_space omap2430_timer1_addrs[] = { | ||
616 | { | ||
617 | .pa_start = 0x49018000, | ||
618 | .pa_end = 0x49018000 + SZ_1K - 1, | ||
619 | .flags = ADDR_TYPE_RT | ||
620 | }, | ||
621 | { } | ||
622 | }; | ||
623 | |||
624 | /* l4_wkup -> timer1 */ | ||
625 | static struct omap_hwmod_ocp_if omap2430_l4_wkup__timer1 = { | ||
626 | .master = &omap2xxx_l4_wkup_hwmod, | ||
627 | .slave = &omap2xxx_timer1_hwmod, | ||
628 | .clk = "gpt1_ick", | ||
629 | .addr = omap2430_timer1_addrs, | ||
630 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
631 | }; | ||
2065 | 632 | ||
633 | /* l4_wkup -> wd_timer2 */ | ||
634 | static struct omap_hwmod_addr_space omap2430_wd_timer2_addrs[] = { | ||
635 | { | ||
636 | .pa_start = 0x49016000, | ||
637 | .pa_end = 0x4901607f, | ||
638 | .flags = ADDR_TYPE_RT | ||
639 | }, | ||
640 | { } | ||
641 | }; | ||
642 | |||
643 | static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = { | ||
644 | .master = &omap2xxx_l4_wkup_hwmod, | ||
645 | .slave = &omap2xxx_wd_timer2_hwmod, | ||
646 | .clk = "mpu_wdt_ick", | ||
647 | .addr = omap2430_wd_timer2_addrs, | ||
648 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
649 | }; | ||
650 | |||
651 | /* l4_wkup -> gpio1 */ | ||
652 | static struct omap_hwmod_addr_space omap2430_gpio1_addr_space[] = { | ||
653 | { | ||
654 | .pa_start = 0x4900C000, | ||
655 | .pa_end = 0x4900C1ff, | ||
656 | .flags = ADDR_TYPE_RT | ||
657 | }, | ||
658 | { } | ||
659 | }; | ||
660 | |||
661 | static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = { | ||
662 | .master = &omap2xxx_l4_wkup_hwmod, | ||
663 | .slave = &omap2xxx_gpio1_hwmod, | ||
664 | .clk = "gpios_ick", | ||
665 | .addr = omap2430_gpio1_addr_space, | ||
666 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
667 | }; | ||
668 | |||
669 | /* l4_wkup -> gpio2 */ | ||
670 | static struct omap_hwmod_addr_space omap2430_gpio2_addr_space[] = { | ||
671 | { | ||
672 | .pa_start = 0x4900E000, | ||
673 | .pa_end = 0x4900E1ff, | ||
674 | .flags = ADDR_TYPE_RT | ||
675 | }, | ||
676 | { } | ||
677 | }; | ||
678 | |||
679 | static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = { | ||
680 | .master = &omap2xxx_l4_wkup_hwmod, | ||
681 | .slave = &omap2xxx_gpio2_hwmod, | ||
682 | .clk = "gpios_ick", | ||
683 | .addr = omap2430_gpio2_addr_space, | ||
684 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
685 | }; | ||
686 | |||
687 | /* l4_wkup -> gpio3 */ | ||
688 | static struct omap_hwmod_addr_space omap2430_gpio3_addr_space[] = { | ||
689 | { | ||
690 | .pa_start = 0x49010000, | ||
691 | .pa_end = 0x490101ff, | ||
692 | .flags = ADDR_TYPE_RT | ||
693 | }, | ||
694 | { } | ||
695 | }; | ||
696 | |||
697 | static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = { | ||
698 | .master = &omap2xxx_l4_wkup_hwmod, | ||
699 | .slave = &omap2xxx_gpio3_hwmod, | ||
700 | .clk = "gpios_ick", | ||
701 | .addr = omap2430_gpio3_addr_space, | ||
702 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
703 | }; | ||
704 | |||
705 | /* l4_wkup -> gpio4 */ | ||
706 | static struct omap_hwmod_addr_space omap2430_gpio4_addr_space[] = { | ||
707 | { | ||
708 | .pa_start = 0x49012000, | ||
709 | .pa_end = 0x490121ff, | ||
710 | .flags = ADDR_TYPE_RT | ||
711 | }, | ||
712 | { } | ||
713 | }; | ||
714 | |||
715 | static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = { | ||
716 | .master = &omap2xxx_l4_wkup_hwmod, | ||
717 | .slave = &omap2xxx_gpio4_hwmod, | ||
718 | .clk = "gpios_ick", | ||
719 | .addr = omap2430_gpio4_addr_space, | ||
720 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
721 | }; | ||
722 | |||
723 | /* l4_core -> gpio5 */ | ||
724 | static struct omap_hwmod_addr_space omap2430_gpio5_addr_space[] = { | ||
725 | { | ||
726 | .pa_start = 0x480B6000, | ||
727 | .pa_end = 0x480B61ff, | ||
728 | .flags = ADDR_TYPE_RT | ||
729 | }, | ||
730 | { } | ||
731 | }; | ||
732 | |||
733 | static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = { | ||
734 | .master = &omap2xxx_l4_core_hwmod, | ||
735 | .slave = &omap2430_gpio5_hwmod, | ||
736 | .clk = "gpio5_ick", | ||
737 | .addr = omap2430_gpio5_addr_space, | ||
738 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
739 | }; | ||
740 | |||
741 | /* dma_system -> L3 */ | ||
742 | static struct omap_hwmod_ocp_if omap2430_dma_system__l3 = { | ||
743 | .master = &omap2430_dma_system_hwmod, | ||
744 | .slave = &omap2xxx_l3_main_hwmod, | ||
745 | .clk = "core_l3_ck", | ||
746 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
747 | }; | ||
748 | |||
749 | /* l4_core -> dma_system */ | ||
750 | static struct omap_hwmod_ocp_if omap2430_l4_core__dma_system = { | ||
751 | .master = &omap2xxx_l4_core_hwmod, | ||
752 | .slave = &omap2430_dma_system_hwmod, | ||
753 | .clk = "sdma_ick", | ||
754 | .addr = omap2_dma_system_addrs, | ||
755 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
756 | }; | ||
757 | |||
758 | /* l4_core -> mailbox */ | ||
759 | static struct omap_hwmod_ocp_if omap2430_l4_core__mailbox = { | ||
760 | .master = &omap2xxx_l4_core_hwmod, | ||
761 | .slave = &omap2430_mailbox_hwmod, | ||
762 | .addr = omap2_mailbox_addrs, | ||
763 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
764 | }; | ||
765 | |||
766 | /* l4_core -> mcbsp1 */ | ||
767 | static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp1 = { | ||
768 | .master = &omap2xxx_l4_core_hwmod, | ||
769 | .slave = &omap2430_mcbsp1_hwmod, | ||
770 | .clk = "mcbsp1_ick", | ||
771 | .addr = omap2_mcbsp1_addrs, | ||
772 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
773 | }; | ||
774 | |||
775 | /* l4_core -> mcbsp2 */ | ||
776 | static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp2 = { | ||
777 | .master = &omap2xxx_l4_core_hwmod, | ||
778 | .slave = &omap2430_mcbsp2_hwmod, | ||
779 | .clk = "mcbsp2_ick", | ||
780 | .addr = omap2xxx_mcbsp2_addrs, | ||
781 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
782 | }; | ||
783 | |||
784 | static struct omap_hwmod_addr_space omap2430_mcbsp3_addrs[] = { | ||
785 | { | ||
786 | .name = "mpu", | ||
787 | .pa_start = 0x4808C000, | ||
788 | .pa_end = 0x4808C0ff, | ||
789 | .flags = ADDR_TYPE_RT | ||
790 | }, | ||
791 | { } | ||
792 | }; | ||
793 | |||
794 | /* l4_core -> mcbsp3 */ | ||
795 | static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp3 = { | ||
796 | .master = &omap2xxx_l4_core_hwmod, | ||
797 | .slave = &omap2430_mcbsp3_hwmod, | ||
798 | .clk = "mcbsp3_ick", | ||
799 | .addr = omap2430_mcbsp3_addrs, | ||
800 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
801 | }; | ||
802 | |||
803 | static struct omap_hwmod_addr_space omap2430_mcbsp4_addrs[] = { | ||
804 | { | ||
805 | .name = "mpu", | ||
806 | .pa_start = 0x4808E000, | ||
807 | .pa_end = 0x4808E0ff, | ||
808 | .flags = ADDR_TYPE_RT | ||
809 | }, | ||
810 | { } | ||
811 | }; | ||
812 | |||
813 | /* l4_core -> mcbsp4 */ | ||
814 | static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp4 = { | ||
815 | .master = &omap2xxx_l4_core_hwmod, | ||
816 | .slave = &omap2430_mcbsp4_hwmod, | ||
817 | .clk = "mcbsp4_ick", | ||
818 | .addr = omap2430_mcbsp4_addrs, | ||
819 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
820 | }; | ||
821 | |||
822 | static struct omap_hwmod_addr_space omap2430_mcbsp5_addrs[] = { | ||
823 | { | ||
824 | .name = "mpu", | ||
825 | .pa_start = 0x48096000, | ||
826 | .pa_end = 0x480960ff, | ||
827 | .flags = ADDR_TYPE_RT | ||
828 | }, | ||
829 | { } | ||
830 | }; | ||
831 | |||
832 | /* l4_core -> mcbsp5 */ | ||
833 | static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp5 = { | ||
834 | .master = &omap2xxx_l4_core_hwmod, | ||
835 | .slave = &omap2430_mcbsp5_hwmod, | ||
836 | .clk = "mcbsp5_ick", | ||
837 | .addr = omap2430_mcbsp5_addrs, | ||
838 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
839 | }; | ||
840 | |||
841 | static struct omap_hwmod_ocp_if *omap2430_hwmod_ocp_ifs[] __initdata = { | ||
842 | &omap2xxx_l3_main__l4_core, | ||
843 | &omap2xxx_mpu__l3_main, | ||
844 | &omap2xxx_dss__l3, | ||
845 | &omap2430_usbhsotg__l3, | ||
846 | &omap2430_l4_core__i2c1, | ||
847 | &omap2430_l4_core__i2c2, | ||
848 | &omap2xxx_l4_core__l4_wkup, | ||
849 | &omap2_l4_core__uart1, | ||
850 | &omap2_l4_core__uart2, | ||
851 | &omap2_l4_core__uart3, | ||
852 | &omap2430_l4_core__usbhsotg, | ||
853 | &omap2430_l4_core__mmc1, | ||
854 | &omap2430_l4_core__mmc2, | ||
855 | &omap2xxx_l4_core__mcspi1, | ||
856 | &omap2xxx_l4_core__mcspi2, | ||
857 | &omap2430_l4_core__mcspi3, | ||
858 | &omap2430_l3__iva, | ||
859 | &omap2430_l4_wkup__timer1, | ||
860 | &omap2xxx_l4_core__timer2, | ||
861 | &omap2xxx_l4_core__timer3, | ||
862 | &omap2xxx_l4_core__timer4, | ||
863 | &omap2xxx_l4_core__timer5, | ||
864 | &omap2xxx_l4_core__timer6, | ||
865 | &omap2xxx_l4_core__timer7, | ||
866 | &omap2xxx_l4_core__timer8, | ||
867 | &omap2xxx_l4_core__timer9, | ||
868 | &omap2xxx_l4_core__timer10, | ||
869 | &omap2xxx_l4_core__timer11, | ||
870 | &omap2xxx_l4_core__timer12, | ||
871 | &omap2430_l4_wkup__wd_timer2, | ||
872 | &omap2xxx_l4_core__dss, | ||
873 | &omap2xxx_l4_core__dss_dispc, | ||
874 | &omap2xxx_l4_core__dss_rfbi, | ||
875 | &omap2xxx_l4_core__dss_venc, | ||
876 | &omap2430_l4_wkup__gpio1, | ||
877 | &omap2430_l4_wkup__gpio2, | ||
878 | &omap2430_l4_wkup__gpio3, | ||
879 | &omap2430_l4_wkup__gpio4, | ||
880 | &omap2430_l4_core__gpio5, | ||
881 | &omap2430_dma_system__l3, | ||
882 | &omap2430_l4_core__dma_system, | ||
883 | &omap2430_l4_core__mailbox, | ||
884 | &omap2430_l4_core__mcbsp1, | ||
885 | &omap2430_l4_core__mcbsp2, | ||
886 | &omap2430_l4_core__mcbsp3, | ||
887 | &omap2430_l4_core__mcbsp4, | ||
888 | &omap2430_l4_core__mcbsp5, | ||
2066 | NULL, | 889 | NULL, |
2067 | }; | 890 | }; |
2068 | 891 | ||
2069 | int __init omap2430_hwmod_init(void) | 892 | int __init omap2430_hwmod_init(void) |
2070 | { | 893 | { |
2071 | return omap_hwmod_register(omap2430_hwmods); | 894 | return omap_hwmod_register_links(omap2430_hwmod_ocp_ifs); |
2072 | } | 895 | } |
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c index 4f3547c2a49..5178e40e84f 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c | |||
@@ -15,10 +15,12 @@ | |||
15 | 15 | ||
16 | #include <plat/omap_hwmod.h> | 16 | #include <plat/omap_hwmod.h> |
17 | #include <plat/serial.h> | 17 | #include <plat/serial.h> |
18 | #include <plat/l3_2xxx.h> | ||
19 | #include <plat/l4_2xxx.h> | ||
18 | 20 | ||
19 | #include "omap_hwmod_common_data.h" | 21 | #include "omap_hwmod_common_data.h" |
20 | 22 | ||
21 | struct omap_hwmod_addr_space omap2xxx_uart1_addr_space[] = { | 23 | static struct omap_hwmod_addr_space omap2xxx_uart1_addr_space[] = { |
22 | { | 24 | { |
23 | .pa_start = OMAP2_UART1_BASE, | 25 | .pa_start = OMAP2_UART1_BASE, |
24 | .pa_end = OMAP2_UART1_BASE + SZ_8K - 1, | 26 | .pa_end = OMAP2_UART1_BASE + SZ_8K - 1, |
@@ -27,7 +29,7 @@ struct omap_hwmod_addr_space omap2xxx_uart1_addr_space[] = { | |||
27 | { } | 29 | { } |
28 | }; | 30 | }; |
29 | 31 | ||
30 | struct omap_hwmod_addr_space omap2xxx_uart2_addr_space[] = { | 32 | static struct omap_hwmod_addr_space omap2xxx_uart2_addr_space[] = { |
31 | { | 33 | { |
32 | .pa_start = OMAP2_UART2_BASE, | 34 | .pa_start = OMAP2_UART2_BASE, |
33 | .pa_end = OMAP2_UART2_BASE + SZ_1K - 1, | 35 | .pa_end = OMAP2_UART2_BASE + SZ_1K - 1, |
@@ -36,7 +38,7 @@ struct omap_hwmod_addr_space omap2xxx_uart2_addr_space[] = { | |||
36 | { } | 38 | { } |
37 | }; | 39 | }; |
38 | 40 | ||
39 | struct omap_hwmod_addr_space omap2xxx_uart3_addr_space[] = { | 41 | static struct omap_hwmod_addr_space omap2xxx_uart3_addr_space[] = { |
40 | { | 42 | { |
41 | .pa_start = OMAP2_UART3_BASE, | 43 | .pa_start = OMAP2_UART3_BASE, |
42 | .pa_end = OMAP2_UART3_BASE + SZ_1K - 1, | 44 | .pa_end = OMAP2_UART3_BASE + SZ_1K - 1, |
@@ -45,7 +47,7 @@ struct omap_hwmod_addr_space omap2xxx_uart3_addr_space[] = { | |||
45 | { } | 47 | { } |
46 | }; | 48 | }; |
47 | 49 | ||
48 | struct omap_hwmod_addr_space omap2xxx_timer2_addrs[] = { | 50 | static struct omap_hwmod_addr_space omap2xxx_timer2_addrs[] = { |
49 | { | 51 | { |
50 | .pa_start = 0x4802a000, | 52 | .pa_start = 0x4802a000, |
51 | .pa_end = 0x4802a000 + SZ_1K - 1, | 53 | .pa_end = 0x4802a000 + SZ_1K - 1, |
@@ -54,7 +56,7 @@ struct omap_hwmod_addr_space omap2xxx_timer2_addrs[] = { | |||
54 | { } | 56 | { } |
55 | }; | 57 | }; |
56 | 58 | ||
57 | struct omap_hwmod_addr_space omap2xxx_timer3_addrs[] = { | 59 | static struct omap_hwmod_addr_space omap2xxx_timer3_addrs[] = { |
58 | { | 60 | { |
59 | .pa_start = 0x48078000, | 61 | .pa_start = 0x48078000, |
60 | .pa_end = 0x48078000 + SZ_1K - 1, | 62 | .pa_end = 0x48078000 + SZ_1K - 1, |
@@ -63,7 +65,7 @@ struct omap_hwmod_addr_space omap2xxx_timer3_addrs[] = { | |||
63 | { } | 65 | { } |
64 | }; | 66 | }; |
65 | 67 | ||
66 | struct omap_hwmod_addr_space omap2xxx_timer4_addrs[] = { | 68 | static struct omap_hwmod_addr_space omap2xxx_timer4_addrs[] = { |
67 | { | 69 | { |
68 | .pa_start = 0x4807a000, | 70 | .pa_start = 0x4807a000, |
69 | .pa_end = 0x4807a000 + SZ_1K - 1, | 71 | .pa_end = 0x4807a000 + SZ_1K - 1, |
@@ -72,7 +74,7 @@ struct omap_hwmod_addr_space omap2xxx_timer4_addrs[] = { | |||
72 | { } | 74 | { } |
73 | }; | 75 | }; |
74 | 76 | ||
75 | struct omap_hwmod_addr_space omap2xxx_timer5_addrs[] = { | 77 | static struct omap_hwmod_addr_space omap2xxx_timer5_addrs[] = { |
76 | { | 78 | { |
77 | .pa_start = 0x4807c000, | 79 | .pa_start = 0x4807c000, |
78 | .pa_end = 0x4807c000 + SZ_1K - 1, | 80 | .pa_end = 0x4807c000 + SZ_1K - 1, |
@@ -81,7 +83,7 @@ struct omap_hwmod_addr_space omap2xxx_timer5_addrs[] = { | |||
81 | { } | 83 | { } |
82 | }; | 84 | }; |
83 | 85 | ||
84 | struct omap_hwmod_addr_space omap2xxx_timer6_addrs[] = { | 86 | static struct omap_hwmod_addr_space omap2xxx_timer6_addrs[] = { |
85 | { | 87 | { |
86 | .pa_start = 0x4807e000, | 88 | .pa_start = 0x4807e000, |
87 | .pa_end = 0x4807e000 + SZ_1K - 1, | 89 | .pa_end = 0x4807e000 + SZ_1K - 1, |
@@ -90,7 +92,7 @@ struct omap_hwmod_addr_space omap2xxx_timer6_addrs[] = { | |||
90 | { } | 92 | { } |
91 | }; | 93 | }; |
92 | 94 | ||
93 | struct omap_hwmod_addr_space omap2xxx_timer7_addrs[] = { | 95 | static struct omap_hwmod_addr_space omap2xxx_timer7_addrs[] = { |
94 | { | 96 | { |
95 | .pa_start = 0x48080000, | 97 | .pa_start = 0x48080000, |
96 | .pa_end = 0x48080000 + SZ_1K - 1, | 98 | .pa_end = 0x48080000 + SZ_1K - 1, |
@@ -99,7 +101,7 @@ struct omap_hwmod_addr_space omap2xxx_timer7_addrs[] = { | |||
99 | { } | 101 | { } |
100 | }; | 102 | }; |
101 | 103 | ||
102 | struct omap_hwmod_addr_space omap2xxx_timer8_addrs[] = { | 104 | static struct omap_hwmod_addr_space omap2xxx_timer8_addrs[] = { |
103 | { | 105 | { |
104 | .pa_start = 0x48082000, | 106 | .pa_start = 0x48082000, |
105 | .pa_end = 0x48082000 + SZ_1K - 1, | 107 | .pa_end = 0x48082000 + SZ_1K - 1, |
@@ -108,7 +110,7 @@ struct omap_hwmod_addr_space omap2xxx_timer8_addrs[] = { | |||
108 | { } | 110 | { } |
109 | }; | 111 | }; |
110 | 112 | ||
111 | struct omap_hwmod_addr_space omap2xxx_timer9_addrs[] = { | 113 | static struct omap_hwmod_addr_space omap2xxx_timer9_addrs[] = { |
112 | { | 114 | { |
113 | .pa_start = 0x48084000, | 115 | .pa_start = 0x48084000, |
114 | .pa_end = 0x48084000 + SZ_1K - 1, | 116 | .pa_end = 0x48084000 + SZ_1K - 1, |
@@ -127,4 +129,246 @@ struct omap_hwmod_addr_space omap2xxx_mcbsp2_addrs[] = { | |||
127 | { } | 129 | { } |
128 | }; | 130 | }; |
129 | 131 | ||
132 | /* | ||
133 | * Common interconnect data | ||
134 | */ | ||
135 | |||
136 | /* L3 -> L4_CORE interface */ | ||
137 | struct omap_hwmod_ocp_if omap2xxx_l3_main__l4_core = { | ||
138 | .master = &omap2xxx_l3_main_hwmod, | ||
139 | .slave = &omap2xxx_l4_core_hwmod, | ||
140 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
141 | }; | ||
142 | |||
143 | /* MPU -> L3 interface */ | ||
144 | struct omap_hwmod_ocp_if omap2xxx_mpu__l3_main = { | ||
145 | .master = &omap2xxx_mpu_hwmod, | ||
146 | .slave = &omap2xxx_l3_main_hwmod, | ||
147 | .user = OCP_USER_MPU, | ||
148 | }; | ||
149 | |||
150 | /* DSS -> l3 */ | ||
151 | struct omap_hwmod_ocp_if omap2xxx_dss__l3 = { | ||
152 | .master = &omap2xxx_dss_core_hwmod, | ||
153 | .slave = &omap2xxx_l3_main_hwmod, | ||
154 | .fw = { | ||
155 | .omap2 = { | ||
156 | .l3_perm_bit = OMAP2_L3_CORE_FW_CONNID_DSS, | ||
157 | .flags = OMAP_FIREWALL_L3, | ||
158 | } | ||
159 | }, | ||
160 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
161 | }; | ||
162 | |||
163 | /* L4_CORE -> L4_WKUP interface */ | ||
164 | struct omap_hwmod_ocp_if omap2xxx_l4_core__l4_wkup = { | ||
165 | .master = &omap2xxx_l4_core_hwmod, | ||
166 | .slave = &omap2xxx_l4_wkup_hwmod, | ||
167 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
168 | }; | ||
169 | |||
170 | /* L4 CORE -> UART1 interface */ | ||
171 | struct omap_hwmod_ocp_if omap2_l4_core__uart1 = { | ||
172 | .master = &omap2xxx_l4_core_hwmod, | ||
173 | .slave = &omap2xxx_uart1_hwmod, | ||
174 | .clk = "uart1_ick", | ||
175 | .addr = omap2xxx_uart1_addr_space, | ||
176 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
177 | }; | ||
178 | |||
179 | /* L4 CORE -> UART2 interface */ | ||
180 | struct omap_hwmod_ocp_if omap2_l4_core__uart2 = { | ||
181 | .master = &omap2xxx_l4_core_hwmod, | ||
182 | .slave = &omap2xxx_uart2_hwmod, | ||
183 | .clk = "uart2_ick", | ||
184 | .addr = omap2xxx_uart2_addr_space, | ||
185 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
186 | }; | ||
187 | |||
188 | /* L4 PER -> UART3 interface */ | ||
189 | struct omap_hwmod_ocp_if omap2_l4_core__uart3 = { | ||
190 | .master = &omap2xxx_l4_core_hwmod, | ||
191 | .slave = &omap2xxx_uart3_hwmod, | ||
192 | .clk = "uart3_ick", | ||
193 | .addr = omap2xxx_uart3_addr_space, | ||
194 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
195 | }; | ||
196 | |||
197 | /* l4 core -> mcspi1 interface */ | ||
198 | struct omap_hwmod_ocp_if omap2xxx_l4_core__mcspi1 = { | ||
199 | .master = &omap2xxx_l4_core_hwmod, | ||
200 | .slave = &omap2xxx_mcspi1_hwmod, | ||
201 | .clk = "mcspi1_ick", | ||
202 | .addr = omap2_mcspi1_addr_space, | ||
203 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
204 | }; | ||
205 | |||
206 | /* l4 core -> mcspi2 interface */ | ||
207 | struct omap_hwmod_ocp_if omap2xxx_l4_core__mcspi2 = { | ||
208 | .master = &omap2xxx_l4_core_hwmod, | ||
209 | .slave = &omap2xxx_mcspi2_hwmod, | ||
210 | .clk = "mcspi2_ick", | ||
211 | .addr = omap2_mcspi2_addr_space, | ||
212 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
213 | }; | ||
214 | |||
215 | /* l4_core -> timer2 */ | ||
216 | struct omap_hwmod_ocp_if omap2xxx_l4_core__timer2 = { | ||
217 | .master = &omap2xxx_l4_core_hwmod, | ||
218 | .slave = &omap2xxx_timer2_hwmod, | ||
219 | .clk = "gpt2_ick", | ||
220 | .addr = omap2xxx_timer2_addrs, | ||
221 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
222 | }; | ||
223 | |||
224 | /* l4_core -> timer3 */ | ||
225 | struct omap_hwmod_ocp_if omap2xxx_l4_core__timer3 = { | ||
226 | .master = &omap2xxx_l4_core_hwmod, | ||
227 | .slave = &omap2xxx_timer3_hwmod, | ||
228 | .clk = "gpt3_ick", | ||
229 | .addr = omap2xxx_timer3_addrs, | ||
230 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
231 | }; | ||
232 | |||
233 | /* l4_core -> timer4 */ | ||
234 | struct omap_hwmod_ocp_if omap2xxx_l4_core__timer4 = { | ||
235 | .master = &omap2xxx_l4_core_hwmod, | ||
236 | .slave = &omap2xxx_timer4_hwmod, | ||
237 | .clk = "gpt4_ick", | ||
238 | .addr = omap2xxx_timer4_addrs, | ||
239 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
240 | }; | ||
241 | |||
242 | /* l4_core -> timer5 */ | ||
243 | struct omap_hwmod_ocp_if omap2xxx_l4_core__timer5 = { | ||
244 | .master = &omap2xxx_l4_core_hwmod, | ||
245 | .slave = &omap2xxx_timer5_hwmod, | ||
246 | .clk = "gpt5_ick", | ||
247 | .addr = omap2xxx_timer5_addrs, | ||
248 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
249 | }; | ||
250 | |||
251 | /* l4_core -> timer6 */ | ||
252 | struct omap_hwmod_ocp_if omap2xxx_l4_core__timer6 = { | ||
253 | .master = &omap2xxx_l4_core_hwmod, | ||
254 | .slave = &omap2xxx_timer6_hwmod, | ||
255 | .clk = "gpt6_ick", | ||
256 | .addr = omap2xxx_timer6_addrs, | ||
257 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
258 | }; | ||
259 | |||
260 | /* l4_core -> timer7 */ | ||
261 | struct omap_hwmod_ocp_if omap2xxx_l4_core__timer7 = { | ||
262 | .master = &omap2xxx_l4_core_hwmod, | ||
263 | .slave = &omap2xxx_timer7_hwmod, | ||
264 | .clk = "gpt7_ick", | ||
265 | .addr = omap2xxx_timer7_addrs, | ||
266 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
267 | }; | ||
268 | |||
269 | /* l4_core -> timer8 */ | ||
270 | struct omap_hwmod_ocp_if omap2xxx_l4_core__timer8 = { | ||
271 | .master = &omap2xxx_l4_core_hwmod, | ||
272 | .slave = &omap2xxx_timer8_hwmod, | ||
273 | .clk = "gpt8_ick", | ||
274 | .addr = omap2xxx_timer8_addrs, | ||
275 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
276 | }; | ||
277 | |||
278 | /* l4_core -> timer9 */ | ||
279 | struct omap_hwmod_ocp_if omap2xxx_l4_core__timer9 = { | ||
280 | .master = &omap2xxx_l4_core_hwmod, | ||
281 | .slave = &omap2xxx_timer9_hwmod, | ||
282 | .clk = "gpt9_ick", | ||
283 | .addr = omap2xxx_timer9_addrs, | ||
284 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
285 | }; | ||
286 | |||
287 | /* l4_core -> timer10 */ | ||
288 | struct omap_hwmod_ocp_if omap2xxx_l4_core__timer10 = { | ||
289 | .master = &omap2xxx_l4_core_hwmod, | ||
290 | .slave = &omap2xxx_timer10_hwmod, | ||
291 | .clk = "gpt10_ick", | ||
292 | .addr = omap2_timer10_addrs, | ||
293 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
294 | }; | ||
295 | |||
296 | /* l4_core -> timer11 */ | ||
297 | struct omap_hwmod_ocp_if omap2xxx_l4_core__timer11 = { | ||
298 | .master = &omap2xxx_l4_core_hwmod, | ||
299 | .slave = &omap2xxx_timer11_hwmod, | ||
300 | .clk = "gpt11_ick", | ||
301 | .addr = omap2_timer11_addrs, | ||
302 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
303 | }; | ||
304 | |||
305 | /* l4_core -> timer12 */ | ||
306 | struct omap_hwmod_ocp_if omap2xxx_l4_core__timer12 = { | ||
307 | .master = &omap2xxx_l4_core_hwmod, | ||
308 | .slave = &omap2xxx_timer12_hwmod, | ||
309 | .clk = "gpt12_ick", | ||
310 | .addr = omap2xxx_timer12_addrs, | ||
311 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
312 | }; | ||
313 | |||
314 | /* l4_core -> dss */ | ||
315 | struct omap_hwmod_ocp_if omap2xxx_l4_core__dss = { | ||
316 | .master = &omap2xxx_l4_core_hwmod, | ||
317 | .slave = &omap2xxx_dss_core_hwmod, | ||
318 | .clk = "dss_ick", | ||
319 | .addr = omap2_dss_addrs, | ||
320 | .fw = { | ||
321 | .omap2 = { | ||
322 | .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION, | ||
323 | .flags = OMAP_FIREWALL_L4, | ||
324 | } | ||
325 | }, | ||
326 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
327 | }; | ||
328 | |||
329 | /* l4_core -> dss_dispc */ | ||
330 | struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_dispc = { | ||
331 | .master = &omap2xxx_l4_core_hwmod, | ||
332 | .slave = &omap2xxx_dss_dispc_hwmod, | ||
333 | .clk = "dss_ick", | ||
334 | .addr = omap2_dss_dispc_addrs, | ||
335 | .fw = { | ||
336 | .omap2 = { | ||
337 | .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_DISPC_REGION, | ||
338 | .flags = OMAP_FIREWALL_L4, | ||
339 | } | ||
340 | }, | ||
341 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
342 | }; | ||
343 | |||
344 | /* l4_core -> dss_rfbi */ | ||
345 | struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_rfbi = { | ||
346 | .master = &omap2xxx_l4_core_hwmod, | ||
347 | .slave = &omap2xxx_dss_rfbi_hwmod, | ||
348 | .clk = "dss_ick", | ||
349 | .addr = omap2_dss_rfbi_addrs, | ||
350 | .fw = { | ||
351 | .omap2 = { | ||
352 | .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION, | ||
353 | .flags = OMAP_FIREWALL_L4, | ||
354 | } | ||
355 | }, | ||
356 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
357 | }; | ||
358 | |||
359 | /* l4_core -> dss_venc */ | ||
360 | struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_venc = { | ||
361 | .master = &omap2xxx_l4_core_hwmod, | ||
362 | .slave = &omap2xxx_dss_venc_hwmod, | ||
363 | .clk = "dss_ick", | ||
364 | .addr = omap2_dss_venc_addrs, | ||
365 | .fw = { | ||
366 | .omap2 = { | ||
367 | .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_VENC_REGION, | ||
368 | .flags = OMAP_FIREWALL_L4, | ||
369 | } | ||
370 | }, | ||
371 | .flags = OCPIF_SWSUP_IDLE, | ||
372 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
373 | }; | ||
130 | 374 | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c index 2a6729741b0..45aaa07e302 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | #include <plat/omap_hwmod.h> | 11 | #include <plat/omap_hwmod.h> |
12 | #include <plat/serial.h> | 12 | #include <plat/serial.h> |
13 | #include <plat/gpio.h> | ||
13 | #include <plat/dma.h> | 14 | #include <plat/dma.h> |
14 | #include <plat/dmtimer.h> | 15 | #include <plat/dmtimer.h> |
15 | #include <plat/mcspi.h> | 16 | #include <plat/mcspi.h> |
@@ -17,6 +18,8 @@ | |||
17 | #include <mach/irqs.h> | 18 | #include <mach/irqs.h> |
18 | 19 | ||
19 | #include "omap_hwmod_common_data.h" | 20 | #include "omap_hwmod_common_data.h" |
21 | #include "cm-regbits-24xx.h" | ||
22 | #include "prm-regbits-24xx.h" | ||
20 | #include "wd_timer.h" | 23 | #include "wd_timer.h" |
21 | 24 | ||
22 | struct omap_hwmod_irq_info omap2xxx_timer12_mpu_irqs[] = { | 25 | struct omap_hwmod_irq_info omap2xxx_timer12_mpu_irqs[] = { |
@@ -170,3 +173,562 @@ struct omap_hwmod_class omap2xxx_mcspi_class = { | |||
170 | .sysc = &omap2xxx_mcspi_sysc, | 173 | .sysc = &omap2xxx_mcspi_sysc, |
171 | .rev = OMAP2_MCSPI_REV, | 174 | .rev = OMAP2_MCSPI_REV, |
172 | }; | 175 | }; |
176 | |||
177 | /* | ||
178 | * IP blocks | ||
179 | */ | ||
180 | |||
181 | /* L3 */ | ||
182 | struct omap_hwmod omap2xxx_l3_main_hwmod = { | ||
183 | .name = "l3_main", | ||
184 | .class = &l3_hwmod_class, | ||
185 | .flags = HWMOD_NO_IDLEST, | ||
186 | }; | ||
187 | |||
188 | /* L4 CORE */ | ||
189 | struct omap_hwmod omap2xxx_l4_core_hwmod = { | ||
190 | .name = "l4_core", | ||
191 | .class = &l4_hwmod_class, | ||
192 | .flags = HWMOD_NO_IDLEST, | ||
193 | }; | ||
194 | |||
195 | /* L4 WKUP */ | ||
196 | struct omap_hwmod omap2xxx_l4_wkup_hwmod = { | ||
197 | .name = "l4_wkup", | ||
198 | .class = &l4_hwmod_class, | ||
199 | .flags = HWMOD_NO_IDLEST, | ||
200 | }; | ||
201 | |||
202 | /* MPU */ | ||
203 | struct omap_hwmod omap2xxx_mpu_hwmod = { | ||
204 | .name = "mpu", | ||
205 | .class = &mpu_hwmod_class, | ||
206 | .main_clk = "mpu_ck", | ||
207 | }; | ||
208 | |||
209 | /* IVA2 */ | ||
210 | struct omap_hwmod omap2xxx_iva_hwmod = { | ||
211 | .name = "iva", | ||
212 | .class = &iva_hwmod_class, | ||
213 | }; | ||
214 | |||
215 | /* always-on timers dev attribute */ | ||
216 | static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = { | ||
217 | .timer_capability = OMAP_TIMER_ALWON, | ||
218 | }; | ||
219 | |||
220 | /* pwm timers dev attribute */ | ||
221 | static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = { | ||
222 | .timer_capability = OMAP_TIMER_HAS_PWM, | ||
223 | }; | ||
224 | |||
225 | /* timer1 */ | ||
226 | |||
227 | struct omap_hwmod omap2xxx_timer1_hwmod = { | ||
228 | .name = "timer1", | ||
229 | .mpu_irqs = omap2_timer1_mpu_irqs, | ||
230 | .main_clk = "gpt1_fck", | ||
231 | .prcm = { | ||
232 | .omap2 = { | ||
233 | .prcm_reg_id = 1, | ||
234 | .module_bit = OMAP24XX_EN_GPT1_SHIFT, | ||
235 | .module_offs = WKUP_MOD, | ||
236 | .idlest_reg_id = 1, | ||
237 | .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT, | ||
238 | }, | ||
239 | }, | ||
240 | .dev_attr = &capability_alwon_dev_attr, | ||
241 | .class = &omap2xxx_timer_hwmod_class, | ||
242 | }; | ||
243 | |||
244 | /* timer2 */ | ||
245 | |||
246 | struct omap_hwmod omap2xxx_timer2_hwmod = { | ||
247 | .name = "timer2", | ||
248 | .mpu_irqs = omap2_timer2_mpu_irqs, | ||
249 | .main_clk = "gpt2_fck", | ||
250 | .prcm = { | ||
251 | .omap2 = { | ||
252 | .prcm_reg_id = 1, | ||
253 | .module_bit = OMAP24XX_EN_GPT2_SHIFT, | ||
254 | .module_offs = CORE_MOD, | ||
255 | .idlest_reg_id = 1, | ||
256 | .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT, | ||
257 | }, | ||
258 | }, | ||
259 | .dev_attr = &capability_alwon_dev_attr, | ||
260 | .class = &omap2xxx_timer_hwmod_class, | ||
261 | }; | ||
262 | |||
263 | /* timer3 */ | ||
264 | |||
265 | struct omap_hwmod omap2xxx_timer3_hwmod = { | ||
266 | .name = "timer3", | ||
267 | .mpu_irqs = omap2_timer3_mpu_irqs, | ||
268 | .main_clk = "gpt3_fck", | ||
269 | .prcm = { | ||
270 | .omap2 = { | ||
271 | .prcm_reg_id = 1, | ||
272 | .module_bit = OMAP24XX_EN_GPT3_SHIFT, | ||
273 | .module_offs = CORE_MOD, | ||
274 | .idlest_reg_id = 1, | ||
275 | .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT, | ||
276 | }, | ||
277 | }, | ||
278 | .dev_attr = &capability_alwon_dev_attr, | ||
279 | .class = &omap2xxx_timer_hwmod_class, | ||
280 | }; | ||
281 | |||
282 | /* timer4 */ | ||
283 | |||
284 | struct omap_hwmod omap2xxx_timer4_hwmod = { | ||
285 | .name = "timer4", | ||
286 | .mpu_irqs = omap2_timer4_mpu_irqs, | ||
287 | .main_clk = "gpt4_fck", | ||
288 | .prcm = { | ||
289 | .omap2 = { | ||
290 | .prcm_reg_id = 1, | ||
291 | .module_bit = OMAP24XX_EN_GPT4_SHIFT, | ||
292 | .module_offs = CORE_MOD, | ||
293 | .idlest_reg_id = 1, | ||
294 | .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT, | ||
295 | }, | ||
296 | }, | ||
297 | .dev_attr = &capability_alwon_dev_attr, | ||
298 | .class = &omap2xxx_timer_hwmod_class, | ||
299 | }; | ||
300 | |||
301 | /* timer5 */ | ||
302 | |||
303 | struct omap_hwmod omap2xxx_timer5_hwmod = { | ||
304 | .name = "timer5", | ||
305 | .mpu_irqs = omap2_timer5_mpu_irqs, | ||
306 | .main_clk = "gpt5_fck", | ||
307 | .prcm = { | ||
308 | .omap2 = { | ||
309 | .prcm_reg_id = 1, | ||
310 | .module_bit = OMAP24XX_EN_GPT5_SHIFT, | ||
311 | .module_offs = CORE_MOD, | ||
312 | .idlest_reg_id = 1, | ||
313 | .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT, | ||
314 | }, | ||
315 | }, | ||
316 | .dev_attr = &capability_alwon_dev_attr, | ||
317 | .class = &omap2xxx_timer_hwmod_class, | ||
318 | }; | ||
319 | |||
320 | /* timer6 */ | ||
321 | |||
322 | struct omap_hwmod omap2xxx_timer6_hwmod = { | ||
323 | .name = "timer6", | ||
324 | .mpu_irqs = omap2_timer6_mpu_irqs, | ||
325 | .main_clk = "gpt6_fck", | ||
326 | .prcm = { | ||
327 | .omap2 = { | ||
328 | .prcm_reg_id = 1, | ||
329 | .module_bit = OMAP24XX_EN_GPT6_SHIFT, | ||
330 | .module_offs = CORE_MOD, | ||
331 | .idlest_reg_id = 1, | ||
332 | .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT, | ||
333 | }, | ||
334 | }, | ||
335 | .dev_attr = &capability_alwon_dev_attr, | ||
336 | .class = &omap2xxx_timer_hwmod_class, | ||
337 | }; | ||
338 | |||
339 | /* timer7 */ | ||
340 | |||
341 | struct omap_hwmod omap2xxx_timer7_hwmod = { | ||
342 | .name = "timer7", | ||
343 | .mpu_irqs = omap2_timer7_mpu_irqs, | ||
344 | .main_clk = "gpt7_fck", | ||
345 | .prcm = { | ||
346 | .omap2 = { | ||
347 | .prcm_reg_id = 1, | ||
348 | .module_bit = OMAP24XX_EN_GPT7_SHIFT, | ||
349 | .module_offs = CORE_MOD, | ||
350 | .idlest_reg_id = 1, | ||
351 | .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT, | ||
352 | }, | ||
353 | }, | ||
354 | .dev_attr = &capability_alwon_dev_attr, | ||
355 | .class = &omap2xxx_timer_hwmod_class, | ||
356 | }; | ||
357 | |||
358 | /* timer8 */ | ||
359 | |||
360 | struct omap_hwmod omap2xxx_timer8_hwmod = { | ||
361 | .name = "timer8", | ||
362 | .mpu_irqs = omap2_timer8_mpu_irqs, | ||
363 | .main_clk = "gpt8_fck", | ||
364 | .prcm = { | ||
365 | .omap2 = { | ||
366 | .prcm_reg_id = 1, | ||
367 | .module_bit = OMAP24XX_EN_GPT8_SHIFT, | ||
368 | .module_offs = CORE_MOD, | ||
369 | .idlest_reg_id = 1, | ||
370 | .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT, | ||
371 | }, | ||
372 | }, | ||
373 | .dev_attr = &capability_alwon_dev_attr, | ||
374 | .class = &omap2xxx_timer_hwmod_class, | ||
375 | }; | ||
376 | |||
377 | /* timer9 */ | ||
378 | |||
379 | struct omap_hwmod omap2xxx_timer9_hwmod = { | ||
380 | .name = "timer9", | ||
381 | .mpu_irqs = omap2_timer9_mpu_irqs, | ||
382 | .main_clk = "gpt9_fck", | ||
383 | .prcm = { | ||
384 | .omap2 = { | ||
385 | .prcm_reg_id = 1, | ||
386 | .module_bit = OMAP24XX_EN_GPT9_SHIFT, | ||
387 | .module_offs = CORE_MOD, | ||
388 | .idlest_reg_id = 1, | ||
389 | .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT, | ||
390 | }, | ||
391 | }, | ||
392 | .dev_attr = &capability_pwm_dev_attr, | ||
393 | .class = &omap2xxx_timer_hwmod_class, | ||
394 | }; | ||
395 | |||
396 | /* timer10 */ | ||
397 | |||
398 | struct omap_hwmod omap2xxx_timer10_hwmod = { | ||
399 | .name = "timer10", | ||
400 | .mpu_irqs = omap2_timer10_mpu_irqs, | ||
401 | .main_clk = "gpt10_fck", | ||
402 | .prcm = { | ||
403 | .omap2 = { | ||
404 | .prcm_reg_id = 1, | ||
405 | .module_bit = OMAP24XX_EN_GPT10_SHIFT, | ||
406 | .module_offs = CORE_MOD, | ||
407 | .idlest_reg_id = 1, | ||
408 | .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT, | ||
409 | }, | ||
410 | }, | ||
411 | .dev_attr = &capability_pwm_dev_attr, | ||
412 | .class = &omap2xxx_timer_hwmod_class, | ||
413 | }; | ||
414 | |||
415 | /* timer11 */ | ||
416 | |||
417 | struct omap_hwmod omap2xxx_timer11_hwmod = { | ||
418 | .name = "timer11", | ||
419 | .mpu_irqs = omap2_timer11_mpu_irqs, | ||
420 | .main_clk = "gpt11_fck", | ||
421 | .prcm = { | ||
422 | .omap2 = { | ||
423 | .prcm_reg_id = 1, | ||
424 | .module_bit = OMAP24XX_EN_GPT11_SHIFT, | ||
425 | .module_offs = CORE_MOD, | ||
426 | .idlest_reg_id = 1, | ||
427 | .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT, | ||
428 | }, | ||
429 | }, | ||
430 | .dev_attr = &capability_pwm_dev_attr, | ||
431 | .class = &omap2xxx_timer_hwmod_class, | ||
432 | }; | ||
433 | |||
434 | /* timer12 */ | ||
435 | |||
436 | struct omap_hwmod omap2xxx_timer12_hwmod = { | ||
437 | .name = "timer12", | ||
438 | .mpu_irqs = omap2xxx_timer12_mpu_irqs, | ||
439 | .main_clk = "gpt12_fck", | ||
440 | .prcm = { | ||
441 | .omap2 = { | ||
442 | .prcm_reg_id = 1, | ||
443 | .module_bit = OMAP24XX_EN_GPT12_SHIFT, | ||
444 | .module_offs = CORE_MOD, | ||
445 | .idlest_reg_id = 1, | ||
446 | .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT, | ||
447 | }, | ||
448 | }, | ||
449 | .dev_attr = &capability_pwm_dev_attr, | ||
450 | .class = &omap2xxx_timer_hwmod_class, | ||
451 | }; | ||
452 | |||
453 | /* wd_timer2 */ | ||
454 | struct omap_hwmod omap2xxx_wd_timer2_hwmod = { | ||
455 | .name = "wd_timer2", | ||
456 | .class = &omap2xxx_wd_timer_hwmod_class, | ||
457 | .main_clk = "mpu_wdt_fck", | ||
458 | .prcm = { | ||
459 | .omap2 = { | ||
460 | .prcm_reg_id = 1, | ||
461 | .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT, | ||
462 | .module_offs = WKUP_MOD, | ||
463 | .idlest_reg_id = 1, | ||
464 | .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT, | ||
465 | }, | ||
466 | }, | ||
467 | }; | ||
468 | |||
469 | /* UART1 */ | ||
470 | |||
471 | struct omap_hwmod omap2xxx_uart1_hwmod = { | ||
472 | .name = "uart1", | ||
473 | .mpu_irqs = omap2_uart1_mpu_irqs, | ||
474 | .sdma_reqs = omap2_uart1_sdma_reqs, | ||
475 | .main_clk = "uart1_fck", | ||
476 | .prcm = { | ||
477 | .omap2 = { | ||
478 | .module_offs = CORE_MOD, | ||
479 | .prcm_reg_id = 1, | ||
480 | .module_bit = OMAP24XX_EN_UART1_SHIFT, | ||
481 | .idlest_reg_id = 1, | ||
482 | .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT, | ||
483 | }, | ||
484 | }, | ||
485 | .class = &omap2_uart_class, | ||
486 | }; | ||
487 | |||
488 | /* UART2 */ | ||
489 | |||
490 | struct omap_hwmod omap2xxx_uart2_hwmod = { | ||
491 | .name = "uart2", | ||
492 | .mpu_irqs = omap2_uart2_mpu_irqs, | ||
493 | .sdma_reqs = omap2_uart2_sdma_reqs, | ||
494 | .main_clk = "uart2_fck", | ||
495 | .prcm = { | ||
496 | .omap2 = { | ||
497 | .module_offs = CORE_MOD, | ||
498 | .prcm_reg_id = 1, | ||
499 | .module_bit = OMAP24XX_EN_UART2_SHIFT, | ||
500 | .idlest_reg_id = 1, | ||
501 | .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT, | ||
502 | }, | ||
503 | }, | ||
504 | .class = &omap2_uart_class, | ||
505 | }; | ||
506 | |||
507 | /* UART3 */ | ||
508 | |||
509 | struct omap_hwmod omap2xxx_uart3_hwmod = { | ||
510 | .name = "uart3", | ||
511 | .mpu_irqs = omap2_uart3_mpu_irqs, | ||
512 | .sdma_reqs = omap2_uart3_sdma_reqs, | ||
513 | .main_clk = "uart3_fck", | ||
514 | .prcm = { | ||
515 | .omap2 = { | ||
516 | .module_offs = CORE_MOD, | ||
517 | .prcm_reg_id = 2, | ||
518 | .module_bit = OMAP24XX_EN_UART3_SHIFT, | ||
519 | .idlest_reg_id = 2, | ||
520 | .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT, | ||
521 | }, | ||
522 | }, | ||
523 | .class = &omap2_uart_class, | ||
524 | }; | ||
525 | |||
526 | /* dss */ | ||
527 | |||
528 | static struct omap_hwmod_opt_clk dss_opt_clks[] = { | ||
529 | /* | ||
530 | * The DSS HW needs all DSS clocks enabled during reset. The dss_core | ||
531 | * driver does not use these clocks. | ||
532 | */ | ||
533 | { .role = "tv_clk", .clk = "dss_54m_fck" }, | ||
534 | { .role = "sys_clk", .clk = "dss2_fck" }, | ||
535 | }; | ||
536 | |||
537 | struct omap_hwmod omap2xxx_dss_core_hwmod = { | ||
538 | .name = "dss_core", | ||
539 | .class = &omap2_dss_hwmod_class, | ||
540 | .main_clk = "dss1_fck", /* instead of dss_fck */ | ||
541 | .sdma_reqs = omap2xxx_dss_sdma_chs, | ||
542 | .prcm = { | ||
543 | .omap2 = { | ||
544 | .prcm_reg_id = 1, | ||
545 | .module_bit = OMAP24XX_EN_DSS1_SHIFT, | ||
546 | .module_offs = CORE_MOD, | ||
547 | .idlest_reg_id = 1, | ||
548 | .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT, | ||
549 | }, | ||
550 | }, | ||
551 | .opt_clks = dss_opt_clks, | ||
552 | .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks), | ||
553 | .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET, | ||
554 | }; | ||
555 | |||
556 | struct omap_hwmod omap2xxx_dss_dispc_hwmod = { | ||
557 | .name = "dss_dispc", | ||
558 | .class = &omap2_dispc_hwmod_class, | ||
559 | .mpu_irqs = omap2_dispc_irqs, | ||
560 | .main_clk = "dss1_fck", | ||
561 | .prcm = { | ||
562 | .omap2 = { | ||
563 | .prcm_reg_id = 1, | ||
564 | .module_bit = OMAP24XX_EN_DSS1_SHIFT, | ||
565 | .module_offs = CORE_MOD, | ||
566 | .idlest_reg_id = 1, | ||
567 | .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT, | ||
568 | }, | ||
569 | }, | ||
570 | .flags = HWMOD_NO_IDLEST, | ||
571 | .dev_attr = &omap2_3_dss_dispc_dev_attr | ||
572 | }; | ||
573 | |||
574 | static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = { | ||
575 | { .role = "ick", .clk = "dss_ick" }, | ||
576 | }; | ||
577 | |||
578 | struct omap_hwmod omap2xxx_dss_rfbi_hwmod = { | ||
579 | .name = "dss_rfbi", | ||
580 | .class = &omap2_rfbi_hwmod_class, | ||
581 | .main_clk = "dss1_fck", | ||
582 | .prcm = { | ||
583 | .omap2 = { | ||
584 | .prcm_reg_id = 1, | ||
585 | .module_bit = OMAP24XX_EN_DSS1_SHIFT, | ||
586 | .module_offs = CORE_MOD, | ||
587 | }, | ||
588 | }, | ||
589 | .opt_clks = dss_rfbi_opt_clks, | ||
590 | .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks), | ||
591 | .flags = HWMOD_NO_IDLEST, | ||
592 | }; | ||
593 | |||
594 | struct omap_hwmod omap2xxx_dss_venc_hwmod = { | ||
595 | .name = "dss_venc", | ||
596 | .class = &omap2_venc_hwmod_class, | ||
597 | .main_clk = "dss_54m_fck", | ||
598 | .prcm = { | ||
599 | .omap2 = { | ||
600 | .prcm_reg_id = 1, | ||
601 | .module_bit = OMAP24XX_EN_DSS1_SHIFT, | ||
602 | .module_offs = CORE_MOD, | ||
603 | }, | ||
604 | }, | ||
605 | .flags = HWMOD_NO_IDLEST, | ||
606 | }; | ||
607 | |||
608 | /* gpio dev_attr */ | ||
609 | struct omap_gpio_dev_attr omap2xxx_gpio_dev_attr = { | ||
610 | .bank_width = 32, | ||
611 | .dbck_flag = false, | ||
612 | }; | ||
613 | |||
614 | /* gpio1 */ | ||
615 | struct omap_hwmod omap2xxx_gpio1_hwmod = { | ||
616 | .name = "gpio1", | ||
617 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | ||
618 | .mpu_irqs = omap2_gpio1_irqs, | ||
619 | .main_clk = "gpios_fck", | ||
620 | .prcm = { | ||
621 | .omap2 = { | ||
622 | .prcm_reg_id = 1, | ||
623 | .module_bit = OMAP24XX_EN_GPIOS_SHIFT, | ||
624 | .module_offs = WKUP_MOD, | ||
625 | .idlest_reg_id = 1, | ||
626 | .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT, | ||
627 | }, | ||
628 | }, | ||
629 | .class = &omap2xxx_gpio_hwmod_class, | ||
630 | .dev_attr = &omap2xxx_gpio_dev_attr, | ||
631 | }; | ||
632 | |||
633 | /* gpio2 */ | ||
634 | struct omap_hwmod omap2xxx_gpio2_hwmod = { | ||
635 | .name = "gpio2", | ||
636 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | ||
637 | .mpu_irqs = omap2_gpio2_irqs, | ||
638 | .main_clk = "gpios_fck", | ||
639 | .prcm = { | ||
640 | .omap2 = { | ||
641 | .prcm_reg_id = 1, | ||
642 | .module_bit = OMAP24XX_EN_GPIOS_SHIFT, | ||
643 | .module_offs = WKUP_MOD, | ||
644 | .idlest_reg_id = 1, | ||
645 | .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT, | ||
646 | }, | ||
647 | }, | ||
648 | .class = &omap2xxx_gpio_hwmod_class, | ||
649 | .dev_attr = &omap2xxx_gpio_dev_attr, | ||
650 | }; | ||
651 | |||
652 | /* gpio3 */ | ||
653 | struct omap_hwmod omap2xxx_gpio3_hwmod = { | ||
654 | .name = "gpio3", | ||
655 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | ||
656 | .mpu_irqs = omap2_gpio3_irqs, | ||
657 | .main_clk = "gpios_fck", | ||
658 | .prcm = { | ||
659 | .omap2 = { | ||
660 | .prcm_reg_id = 1, | ||
661 | .module_bit = OMAP24XX_EN_GPIOS_SHIFT, | ||
662 | .module_offs = WKUP_MOD, | ||
663 | .idlest_reg_id = 1, | ||
664 | .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT, | ||
665 | }, | ||
666 | }, | ||
667 | .class = &omap2xxx_gpio_hwmod_class, | ||
668 | .dev_attr = &omap2xxx_gpio_dev_attr, | ||
669 | }; | ||
670 | |||
671 | /* gpio4 */ | ||
672 | struct omap_hwmod omap2xxx_gpio4_hwmod = { | ||
673 | .name = "gpio4", | ||
674 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | ||
675 | .mpu_irqs = omap2_gpio4_irqs, | ||
676 | .main_clk = "gpios_fck", | ||
677 | .prcm = { | ||
678 | .omap2 = { | ||
679 | .prcm_reg_id = 1, | ||
680 | .module_bit = OMAP24XX_EN_GPIOS_SHIFT, | ||
681 | .module_offs = WKUP_MOD, | ||
682 | .idlest_reg_id = 1, | ||
683 | .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT, | ||
684 | }, | ||
685 | }, | ||
686 | .class = &omap2xxx_gpio_hwmod_class, | ||
687 | .dev_attr = &omap2xxx_gpio_dev_attr, | ||
688 | }; | ||
689 | |||
690 | /* mcspi1 */ | ||
691 | static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = { | ||
692 | .num_chipselect = 4, | ||
693 | }; | ||
694 | |||
695 | struct omap_hwmod omap2xxx_mcspi1_hwmod = { | ||
696 | .name = "mcspi1", | ||
697 | .mpu_irqs = omap2_mcspi1_mpu_irqs, | ||
698 | .sdma_reqs = omap2_mcspi1_sdma_reqs, | ||
699 | .main_clk = "mcspi1_fck", | ||
700 | .prcm = { | ||
701 | .omap2 = { | ||
702 | .module_offs = CORE_MOD, | ||
703 | .prcm_reg_id = 1, | ||
704 | .module_bit = OMAP24XX_EN_MCSPI1_SHIFT, | ||
705 | .idlest_reg_id = 1, | ||
706 | .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT, | ||
707 | }, | ||
708 | }, | ||
709 | .class = &omap2xxx_mcspi_class, | ||
710 | .dev_attr = &omap_mcspi1_dev_attr, | ||
711 | }; | ||
712 | |||
713 | /* mcspi2 */ | ||
714 | static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = { | ||
715 | .num_chipselect = 2, | ||
716 | }; | ||
717 | |||
718 | struct omap_hwmod omap2xxx_mcspi2_hwmod = { | ||
719 | .name = "mcspi2", | ||
720 | .mpu_irqs = omap2_mcspi2_mpu_irqs, | ||
721 | .sdma_reqs = omap2_mcspi2_sdma_reqs, | ||
722 | .main_clk = "mcspi2_fck", | ||
723 | .prcm = { | ||
724 | .omap2 = { | ||
725 | .module_offs = CORE_MOD, | ||
726 | .prcm_reg_id = 1, | ||
727 | .module_bit = OMAP24XX_EN_MCSPI2_SHIFT, | ||
728 | .idlest_reg_id = 1, | ||
729 | .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT, | ||
730 | }, | ||
731 | }, | ||
732 | .class = &omap2xxx_mcspi_class, | ||
733 | .dev_attr = &omap_mcspi2_dev_attr, | ||
734 | }; | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index db86ce90c69..0c65079c2b6 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | |||
@@ -2,6 +2,7 @@ | |||
2 | * omap_hwmod_3xxx_data.c - hardware modules present on the OMAP3xxx chips | 2 | * omap_hwmod_3xxx_data.c - hardware modules present on the OMAP3xxx chips |
3 | * | 3 | * |
4 | * Copyright (C) 2009-2011 Nokia Corporation | 4 | * Copyright (C) 2009-2011 Nokia Corporation |
5 | * Copyright (C) 2012 Texas Instruments, Inc. | ||
5 | * Paul Walmsley | 6 | * Paul Walmsley |
6 | * | 7 | * |
7 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
@@ -38,491 +39,56 @@ | |||
38 | /* | 39 | /* |
39 | * OMAP3xxx hardware module integration data | 40 | * OMAP3xxx hardware module integration data |
40 | * | 41 | * |
41 | * ALl of the data in this section should be autogeneratable from the | 42 | * All of the data in this section should be autogeneratable from the |
42 | * TI hardware database or other technical documentation. Data that | 43 | * TI hardware database or other technical documentation. Data that |
43 | * is driver-specific or driver-kernel integration-specific belongs | 44 | * is driver-specific or driver-kernel integration-specific belongs |
44 | * elsewhere. | 45 | * elsewhere. |
45 | */ | 46 | */ |
46 | 47 | ||
47 | static struct omap_hwmod omap3xxx_mpu_hwmod; | 48 | /* |
48 | static struct omap_hwmod omap3xxx_iva_hwmod; | 49 | * IP blocks |
49 | static struct omap_hwmod omap3xxx_l3_main_hwmod; | 50 | */ |
50 | static struct omap_hwmod omap3xxx_l4_core_hwmod; | ||
51 | static struct omap_hwmod omap3xxx_l4_per_hwmod; | ||
52 | static struct omap_hwmod omap3xxx_wd_timer2_hwmod; | ||
53 | static struct omap_hwmod omap3430es1_dss_core_hwmod; | ||
54 | static struct omap_hwmod omap3xxx_dss_core_hwmod; | ||
55 | static struct omap_hwmod omap3xxx_dss_dispc_hwmod; | ||
56 | static struct omap_hwmod omap3xxx_dss_dsi1_hwmod; | ||
57 | static struct omap_hwmod omap3xxx_dss_rfbi_hwmod; | ||
58 | static struct omap_hwmod omap3xxx_dss_venc_hwmod; | ||
59 | static struct omap_hwmod omap3xxx_i2c1_hwmod; | ||
60 | static struct omap_hwmod omap3xxx_i2c2_hwmod; | ||
61 | static struct omap_hwmod omap3xxx_i2c3_hwmod; | ||
62 | static struct omap_hwmod omap3xxx_gpio1_hwmod; | ||
63 | static struct omap_hwmod omap3xxx_gpio2_hwmod; | ||
64 | static struct omap_hwmod omap3xxx_gpio3_hwmod; | ||
65 | static struct omap_hwmod omap3xxx_gpio4_hwmod; | ||
66 | static struct omap_hwmod omap3xxx_gpio5_hwmod; | ||
67 | static struct omap_hwmod omap3xxx_gpio6_hwmod; | ||
68 | static struct omap_hwmod omap34xx_sr1_hwmod; | ||
69 | static struct omap_hwmod omap34xx_sr2_hwmod; | ||
70 | static struct omap_hwmod omap34xx_mcspi1; | ||
71 | static struct omap_hwmod omap34xx_mcspi2; | ||
72 | static struct omap_hwmod omap34xx_mcspi3; | ||
73 | static struct omap_hwmod omap34xx_mcspi4; | ||
74 | static struct omap_hwmod omap3xxx_mmc1_hwmod; | ||
75 | static struct omap_hwmod omap3xxx_mmc2_hwmod; | ||
76 | static struct omap_hwmod omap3xxx_mmc3_hwmod; | ||
77 | static struct omap_hwmod am35xx_usbhsotg_hwmod; | ||
78 | |||
79 | static struct omap_hwmod omap3xxx_dma_system_hwmod; | ||
80 | |||
81 | static struct omap_hwmod omap3xxx_mcbsp1_hwmod; | ||
82 | static struct omap_hwmod omap3xxx_mcbsp2_hwmod; | ||
83 | static struct omap_hwmod omap3xxx_mcbsp3_hwmod; | ||
84 | static struct omap_hwmod omap3xxx_mcbsp4_hwmod; | ||
85 | static struct omap_hwmod omap3xxx_mcbsp5_hwmod; | ||
86 | static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod; | ||
87 | static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod; | ||
88 | static struct omap_hwmod omap3xxx_usb_host_hs_hwmod; | ||
89 | static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod; | ||
90 | |||
91 | /* L3 -> L4_CORE interface */ | ||
92 | static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = { | ||
93 | .master = &omap3xxx_l3_main_hwmod, | ||
94 | .slave = &omap3xxx_l4_core_hwmod, | ||
95 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
96 | }; | ||
97 | |||
98 | /* L3 -> L4_PER interface */ | ||
99 | static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = { | ||
100 | .master = &omap3xxx_l3_main_hwmod, | ||
101 | .slave = &omap3xxx_l4_per_hwmod, | ||
102 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
103 | }; | ||
104 | 51 | ||
105 | /* L3 taret configuration and error log registers */ | 52 | /* L3 */ |
106 | static struct omap_hwmod_irq_info omap3xxx_l3_main_irqs[] = { | 53 | static struct omap_hwmod_irq_info omap3xxx_l3_main_irqs[] = { |
107 | { .irq = INT_34XX_L3_DBG_IRQ }, | 54 | { .irq = INT_34XX_L3_DBG_IRQ }, |
108 | { .irq = INT_34XX_L3_APP_IRQ }, | 55 | { .irq = INT_34XX_L3_APP_IRQ }, |
109 | { .irq = -1 } | 56 | { .irq = -1 } |
110 | }; | 57 | }; |
111 | 58 | ||
112 | static struct omap_hwmod_addr_space omap3xxx_l3_main_addrs[] = { | ||
113 | { | ||
114 | .pa_start = 0x68000000, | ||
115 | .pa_end = 0x6800ffff, | ||
116 | .flags = ADDR_TYPE_RT, | ||
117 | }, | ||
118 | { } | ||
119 | }; | ||
120 | |||
121 | /* MPU -> L3 interface */ | ||
122 | static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = { | ||
123 | .master = &omap3xxx_mpu_hwmod, | ||
124 | .slave = &omap3xxx_l3_main_hwmod, | ||
125 | .addr = omap3xxx_l3_main_addrs, | ||
126 | .user = OCP_USER_MPU, | ||
127 | }; | ||
128 | |||
129 | /* Slave interfaces on the L3 interconnect */ | ||
130 | static struct omap_hwmod_ocp_if *omap3xxx_l3_main_slaves[] = { | ||
131 | &omap3xxx_mpu__l3_main, | ||
132 | }; | ||
133 | |||
134 | /* DSS -> l3 */ | ||
135 | static struct omap_hwmod_ocp_if omap3xxx_dss__l3 = { | ||
136 | .master = &omap3xxx_dss_core_hwmod, | ||
137 | .slave = &omap3xxx_l3_main_hwmod, | ||
138 | .fw = { | ||
139 | .omap2 = { | ||
140 | .l3_perm_bit = OMAP3_L3_CORE_FW_INIT_ID_DSS, | ||
141 | .flags = OMAP_FIREWALL_L3, | ||
142 | } | ||
143 | }, | ||
144 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
145 | }; | ||
146 | |||
147 | /* Master interfaces on the L3 interconnect */ | ||
148 | static struct omap_hwmod_ocp_if *omap3xxx_l3_main_masters[] = { | ||
149 | &omap3xxx_l3_main__l4_core, | ||
150 | &omap3xxx_l3_main__l4_per, | ||
151 | }; | ||
152 | |||
153 | /* L3 */ | ||
154 | static struct omap_hwmod omap3xxx_l3_main_hwmod = { | 59 | static struct omap_hwmod omap3xxx_l3_main_hwmod = { |
155 | .name = "l3_main", | 60 | .name = "l3_main", |
156 | .class = &l3_hwmod_class, | 61 | .class = &l3_hwmod_class, |
157 | .mpu_irqs = omap3xxx_l3_main_irqs, | 62 | .mpu_irqs = omap3xxx_l3_main_irqs, |
158 | .masters = omap3xxx_l3_main_masters, | ||
159 | .masters_cnt = ARRAY_SIZE(omap3xxx_l3_main_masters), | ||
160 | .slaves = omap3xxx_l3_main_slaves, | ||
161 | .slaves_cnt = ARRAY_SIZE(omap3xxx_l3_main_slaves), | ||
162 | .flags = HWMOD_NO_IDLEST, | 63 | .flags = HWMOD_NO_IDLEST, |
163 | }; | 64 | }; |
164 | 65 | ||
165 | static struct omap_hwmod omap3xxx_l4_wkup_hwmod; | ||
166 | static struct omap_hwmod omap3xxx_uart1_hwmod; | ||
167 | static struct omap_hwmod omap3xxx_uart2_hwmod; | ||
168 | static struct omap_hwmod omap3xxx_uart3_hwmod; | ||
169 | static struct omap_hwmod omap3xxx_uart4_hwmod; | ||
170 | static struct omap_hwmod am35xx_uart4_hwmod; | ||
171 | static struct omap_hwmod omap3xxx_usbhsotg_hwmod; | ||
172 | |||
173 | /* l3_core -> usbhsotg interface */ | ||
174 | static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3 = { | ||
175 | .master = &omap3xxx_usbhsotg_hwmod, | ||
176 | .slave = &omap3xxx_l3_main_hwmod, | ||
177 | .clk = "core_l3_ick", | ||
178 | .user = OCP_USER_MPU, | ||
179 | }; | ||
180 | |||
181 | /* l3_core -> am35xx_usbhsotg interface */ | ||
182 | static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3 = { | ||
183 | .master = &am35xx_usbhsotg_hwmod, | ||
184 | .slave = &omap3xxx_l3_main_hwmod, | ||
185 | .clk = "core_l3_ick", | ||
186 | .user = OCP_USER_MPU, | ||
187 | }; | ||
188 | /* L4_CORE -> L4_WKUP interface */ | ||
189 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = { | ||
190 | .master = &omap3xxx_l4_core_hwmod, | ||
191 | .slave = &omap3xxx_l4_wkup_hwmod, | ||
192 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
193 | }; | ||
194 | |||
195 | /* L4 CORE -> MMC1 interface */ | ||
196 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc1 = { | ||
197 | .master = &omap3xxx_l4_core_hwmod, | ||
198 | .slave = &omap3xxx_mmc1_hwmod, | ||
199 | .clk = "mmchs1_ick", | ||
200 | .addr = omap2430_mmc1_addr_space, | ||
201 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
202 | .flags = OMAP_FIREWALL_L4 | ||
203 | }; | ||
204 | |||
205 | /* L4 CORE -> MMC2 interface */ | ||
206 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc2 = { | ||
207 | .master = &omap3xxx_l4_core_hwmod, | ||
208 | .slave = &omap3xxx_mmc2_hwmod, | ||
209 | .clk = "mmchs2_ick", | ||
210 | .addr = omap2430_mmc2_addr_space, | ||
211 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
212 | .flags = OMAP_FIREWALL_L4 | ||
213 | }; | ||
214 | |||
215 | /* L4 CORE -> MMC3 interface */ | ||
216 | static struct omap_hwmod_addr_space omap3xxx_mmc3_addr_space[] = { | ||
217 | { | ||
218 | .pa_start = 0x480ad000, | ||
219 | .pa_end = 0x480ad1ff, | ||
220 | .flags = ADDR_TYPE_RT, | ||
221 | }, | ||
222 | { } | ||
223 | }; | ||
224 | |||
225 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = { | ||
226 | .master = &omap3xxx_l4_core_hwmod, | ||
227 | .slave = &omap3xxx_mmc3_hwmod, | ||
228 | .clk = "mmchs3_ick", | ||
229 | .addr = omap3xxx_mmc3_addr_space, | ||
230 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
231 | .flags = OMAP_FIREWALL_L4 | ||
232 | }; | ||
233 | |||
234 | /* L4 CORE -> UART1 interface */ | ||
235 | static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = { | ||
236 | { | ||
237 | .pa_start = OMAP3_UART1_BASE, | ||
238 | .pa_end = OMAP3_UART1_BASE + SZ_8K - 1, | ||
239 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, | ||
240 | }, | ||
241 | { } | ||
242 | }; | ||
243 | |||
244 | static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = { | ||
245 | .master = &omap3xxx_l4_core_hwmod, | ||
246 | .slave = &omap3xxx_uart1_hwmod, | ||
247 | .clk = "uart1_ick", | ||
248 | .addr = omap3xxx_uart1_addr_space, | ||
249 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
250 | }; | ||
251 | |||
252 | /* L4 CORE -> UART2 interface */ | ||
253 | static struct omap_hwmod_addr_space omap3xxx_uart2_addr_space[] = { | ||
254 | { | ||
255 | .pa_start = OMAP3_UART2_BASE, | ||
256 | .pa_end = OMAP3_UART2_BASE + SZ_1K - 1, | ||
257 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, | ||
258 | }, | ||
259 | { } | ||
260 | }; | ||
261 | |||
262 | static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = { | ||
263 | .master = &omap3xxx_l4_core_hwmod, | ||
264 | .slave = &omap3xxx_uart2_hwmod, | ||
265 | .clk = "uart2_ick", | ||
266 | .addr = omap3xxx_uart2_addr_space, | ||
267 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
268 | }; | ||
269 | |||
270 | /* L4 PER -> UART3 interface */ | ||
271 | static struct omap_hwmod_addr_space omap3xxx_uart3_addr_space[] = { | ||
272 | { | ||
273 | .pa_start = OMAP3_UART3_BASE, | ||
274 | .pa_end = OMAP3_UART3_BASE + SZ_1K - 1, | ||
275 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, | ||
276 | }, | ||
277 | { } | ||
278 | }; | ||
279 | |||
280 | static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = { | ||
281 | .master = &omap3xxx_l4_per_hwmod, | ||
282 | .slave = &omap3xxx_uart3_hwmod, | ||
283 | .clk = "uart3_ick", | ||
284 | .addr = omap3xxx_uart3_addr_space, | ||
285 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
286 | }; | ||
287 | |||
288 | /* L4 PER -> UART4 interface */ | ||
289 | static struct omap_hwmod_addr_space omap3xxx_uart4_addr_space[] = { | ||
290 | { | ||
291 | .pa_start = OMAP3_UART4_BASE, | ||
292 | .pa_end = OMAP3_UART4_BASE + SZ_1K - 1, | ||
293 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, | ||
294 | }, | ||
295 | { } | ||
296 | }; | ||
297 | |||
298 | static struct omap_hwmod_ocp_if omap3_l4_per__uart4 = { | ||
299 | .master = &omap3xxx_l4_per_hwmod, | ||
300 | .slave = &omap3xxx_uart4_hwmod, | ||
301 | .clk = "uart4_ick", | ||
302 | .addr = omap3xxx_uart4_addr_space, | ||
303 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
304 | }; | ||
305 | |||
306 | /* AM35xx: L4 CORE -> UART4 interface */ | ||
307 | static struct omap_hwmod_addr_space am35xx_uart4_addr_space[] = { | ||
308 | { | ||
309 | .pa_start = OMAP3_UART4_AM35XX_BASE, | ||
310 | .pa_end = OMAP3_UART4_AM35XX_BASE + SZ_1K - 1, | ||
311 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, | ||
312 | }, | ||
313 | }; | ||
314 | |||
315 | static struct omap_hwmod_ocp_if am35xx_l4_core__uart4 = { | ||
316 | .master = &omap3xxx_l4_core_hwmod, | ||
317 | .slave = &am35xx_uart4_hwmod, | ||
318 | .clk = "uart4_ick", | ||
319 | .addr = am35xx_uart4_addr_space, | ||
320 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
321 | }; | ||
322 | |||
323 | /* L4 CORE -> I2C1 interface */ | ||
324 | static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = { | ||
325 | .master = &omap3xxx_l4_core_hwmod, | ||
326 | .slave = &omap3xxx_i2c1_hwmod, | ||
327 | .clk = "i2c1_ick", | ||
328 | .addr = omap2_i2c1_addr_space, | ||
329 | .fw = { | ||
330 | .omap2 = { | ||
331 | .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION, | ||
332 | .l4_prot_group = 7, | ||
333 | .flags = OMAP_FIREWALL_L4, | ||
334 | } | ||
335 | }, | ||
336 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
337 | }; | ||
338 | |||
339 | /* L4 CORE -> I2C2 interface */ | ||
340 | static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = { | ||
341 | .master = &omap3xxx_l4_core_hwmod, | ||
342 | .slave = &omap3xxx_i2c2_hwmod, | ||
343 | .clk = "i2c2_ick", | ||
344 | .addr = omap2_i2c2_addr_space, | ||
345 | .fw = { | ||
346 | .omap2 = { | ||
347 | .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION, | ||
348 | .l4_prot_group = 7, | ||
349 | .flags = OMAP_FIREWALL_L4, | ||
350 | } | ||
351 | }, | ||
352 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
353 | }; | ||
354 | |||
355 | /* L4 CORE -> I2C3 interface */ | ||
356 | static struct omap_hwmod_addr_space omap3xxx_i2c3_addr_space[] = { | ||
357 | { | ||
358 | .pa_start = 0x48060000, | ||
359 | .pa_end = 0x48060000 + SZ_128 - 1, | ||
360 | .flags = ADDR_TYPE_RT, | ||
361 | }, | ||
362 | { } | ||
363 | }; | ||
364 | |||
365 | static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = { | ||
366 | .master = &omap3xxx_l4_core_hwmod, | ||
367 | .slave = &omap3xxx_i2c3_hwmod, | ||
368 | .clk = "i2c3_ick", | ||
369 | .addr = omap3xxx_i2c3_addr_space, | ||
370 | .fw = { | ||
371 | .omap2 = { | ||
372 | .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION, | ||
373 | .l4_prot_group = 7, | ||
374 | .flags = OMAP_FIREWALL_L4, | ||
375 | } | ||
376 | }, | ||
377 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
378 | }; | ||
379 | |||
380 | static struct omap_hwmod_irq_info omap3_smartreflex_mpu_irqs[] = { | ||
381 | { .irq = 18}, | ||
382 | { .irq = -1 } | ||
383 | }; | ||
384 | |||
385 | static struct omap_hwmod_irq_info omap3_smartreflex_core_irqs[] = { | ||
386 | { .irq = 19}, | ||
387 | { .irq = -1 } | ||
388 | }; | ||
389 | |||
390 | /* L4 CORE -> SR1 interface */ | ||
391 | static struct omap_hwmod_addr_space omap3_sr1_addr_space[] = { | ||
392 | { | ||
393 | .pa_start = OMAP34XX_SR1_BASE, | ||
394 | .pa_end = OMAP34XX_SR1_BASE + SZ_1K - 1, | ||
395 | .flags = ADDR_TYPE_RT, | ||
396 | }, | ||
397 | { } | ||
398 | }; | ||
399 | |||
400 | static struct omap_hwmod_ocp_if omap3_l4_core__sr1 = { | ||
401 | .master = &omap3xxx_l4_core_hwmod, | ||
402 | .slave = &omap34xx_sr1_hwmod, | ||
403 | .clk = "sr_l4_ick", | ||
404 | .addr = omap3_sr1_addr_space, | ||
405 | .user = OCP_USER_MPU, | ||
406 | }; | ||
407 | |||
408 | /* L4 CORE -> SR1 interface */ | ||
409 | static struct omap_hwmod_addr_space omap3_sr2_addr_space[] = { | ||
410 | { | ||
411 | .pa_start = OMAP34XX_SR2_BASE, | ||
412 | .pa_end = OMAP34XX_SR2_BASE + SZ_1K - 1, | ||
413 | .flags = ADDR_TYPE_RT, | ||
414 | }, | ||
415 | { } | ||
416 | }; | ||
417 | |||
418 | static struct omap_hwmod_ocp_if omap3_l4_core__sr2 = { | ||
419 | .master = &omap3xxx_l4_core_hwmod, | ||
420 | .slave = &omap34xx_sr2_hwmod, | ||
421 | .clk = "sr_l4_ick", | ||
422 | .addr = omap3_sr2_addr_space, | ||
423 | .user = OCP_USER_MPU, | ||
424 | }; | ||
425 | |||
426 | /* | ||
427 | * usbhsotg interface data | ||
428 | */ | ||
429 | |||
430 | static struct omap_hwmod_addr_space omap3xxx_usbhsotg_addrs[] = { | ||
431 | { | ||
432 | .pa_start = OMAP34XX_HSUSB_OTG_BASE, | ||
433 | .pa_end = OMAP34XX_HSUSB_OTG_BASE + SZ_4K - 1, | ||
434 | .flags = ADDR_TYPE_RT | ||
435 | }, | ||
436 | { } | ||
437 | }; | ||
438 | |||
439 | /* l4_core -> usbhsotg */ | ||
440 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = { | ||
441 | .master = &omap3xxx_l4_core_hwmod, | ||
442 | .slave = &omap3xxx_usbhsotg_hwmod, | ||
443 | .clk = "l4_ick", | ||
444 | .addr = omap3xxx_usbhsotg_addrs, | ||
445 | .user = OCP_USER_MPU, | ||
446 | }; | ||
447 | |||
448 | static struct omap_hwmod_ocp_if *omap3xxx_usbhsotg_masters[] = { | ||
449 | &omap3xxx_usbhsotg__l3, | ||
450 | }; | ||
451 | |||
452 | static struct omap_hwmod_ocp_if *omap3xxx_usbhsotg_slaves[] = { | ||
453 | &omap3xxx_l4_core__usbhsotg, | ||
454 | }; | ||
455 | |||
456 | static struct omap_hwmod_addr_space am35xx_usbhsotg_addrs[] = { | ||
457 | { | ||
458 | .pa_start = AM35XX_IPSS_USBOTGSS_BASE, | ||
459 | .pa_end = AM35XX_IPSS_USBOTGSS_BASE + SZ_4K - 1, | ||
460 | .flags = ADDR_TYPE_RT | ||
461 | }, | ||
462 | { } | ||
463 | }; | ||
464 | |||
465 | /* l4_core -> usbhsotg */ | ||
466 | static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = { | ||
467 | .master = &omap3xxx_l4_core_hwmod, | ||
468 | .slave = &am35xx_usbhsotg_hwmod, | ||
469 | .clk = "l4_ick", | ||
470 | .addr = am35xx_usbhsotg_addrs, | ||
471 | .user = OCP_USER_MPU, | ||
472 | }; | ||
473 | |||
474 | static struct omap_hwmod_ocp_if *am35xx_usbhsotg_masters[] = { | ||
475 | &am35xx_usbhsotg__l3, | ||
476 | }; | ||
477 | |||
478 | static struct omap_hwmod_ocp_if *am35xx_usbhsotg_slaves[] = { | ||
479 | &am35xx_l4_core__usbhsotg, | ||
480 | }; | ||
481 | /* Slave interfaces on the L4_CORE interconnect */ | ||
482 | static struct omap_hwmod_ocp_if *omap3xxx_l4_core_slaves[] = { | ||
483 | &omap3xxx_l3_main__l4_core, | ||
484 | }; | ||
485 | |||
486 | /* L4 CORE */ | 66 | /* L4 CORE */ |
487 | static struct omap_hwmod omap3xxx_l4_core_hwmod = { | 67 | static struct omap_hwmod omap3xxx_l4_core_hwmod = { |
488 | .name = "l4_core", | 68 | .name = "l4_core", |
489 | .class = &l4_hwmod_class, | 69 | .class = &l4_hwmod_class, |
490 | .slaves = omap3xxx_l4_core_slaves, | ||
491 | .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_core_slaves), | ||
492 | .flags = HWMOD_NO_IDLEST, | 70 | .flags = HWMOD_NO_IDLEST, |
493 | }; | 71 | }; |
494 | 72 | ||
495 | /* Slave interfaces on the L4_PER interconnect */ | ||
496 | static struct omap_hwmod_ocp_if *omap3xxx_l4_per_slaves[] = { | ||
497 | &omap3xxx_l3_main__l4_per, | ||
498 | }; | ||
499 | |||
500 | /* L4 PER */ | 73 | /* L4 PER */ |
501 | static struct omap_hwmod omap3xxx_l4_per_hwmod = { | 74 | static struct omap_hwmod omap3xxx_l4_per_hwmod = { |
502 | .name = "l4_per", | 75 | .name = "l4_per", |
503 | .class = &l4_hwmod_class, | 76 | .class = &l4_hwmod_class, |
504 | .slaves = omap3xxx_l4_per_slaves, | ||
505 | .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_per_slaves), | ||
506 | .flags = HWMOD_NO_IDLEST, | 77 | .flags = HWMOD_NO_IDLEST, |
507 | }; | 78 | }; |
508 | 79 | ||
509 | /* Slave interfaces on the L4_WKUP interconnect */ | ||
510 | static struct omap_hwmod_ocp_if *omap3xxx_l4_wkup_slaves[] = { | ||
511 | &omap3xxx_l4_core__l4_wkup, | ||
512 | }; | ||
513 | |||
514 | /* L4 WKUP */ | 80 | /* L4 WKUP */ |
515 | static struct omap_hwmod omap3xxx_l4_wkup_hwmod = { | 81 | static struct omap_hwmod omap3xxx_l4_wkup_hwmod = { |
516 | .name = "l4_wkup", | 82 | .name = "l4_wkup", |
517 | .class = &l4_hwmod_class, | 83 | .class = &l4_hwmod_class, |
518 | .slaves = omap3xxx_l4_wkup_slaves, | ||
519 | .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_wkup_slaves), | ||
520 | .flags = HWMOD_NO_IDLEST, | 84 | .flags = HWMOD_NO_IDLEST, |
521 | }; | 85 | }; |
522 | 86 | ||
523 | /* Master interfaces on the MPU device */ | 87 | /* L4 SEC */ |
524 | static struct omap_hwmod_ocp_if *omap3xxx_mpu_masters[] = { | 88 | static struct omap_hwmod omap3xxx_l4_sec_hwmod = { |
525 | &omap3xxx_mpu__l3_main, | 89 | .name = "l4_sec", |
90 | .class = &l4_hwmod_class, | ||
91 | .flags = HWMOD_NO_IDLEST, | ||
526 | }; | 92 | }; |
527 | 93 | ||
528 | /* MPU */ | 94 | /* MPU */ |
@@ -530,35 +96,22 @@ static struct omap_hwmod omap3xxx_mpu_hwmod = { | |||
530 | .name = "mpu", | 96 | .name = "mpu", |
531 | .class = &mpu_hwmod_class, | 97 | .class = &mpu_hwmod_class, |
532 | .main_clk = "arm_fck", | 98 | .main_clk = "arm_fck", |
533 | .masters = omap3xxx_mpu_masters, | ||
534 | .masters_cnt = ARRAY_SIZE(omap3xxx_mpu_masters), | ||
535 | }; | 99 | }; |
536 | 100 | ||
537 | /* | 101 | /* IVA2 (IVA2) */ |
538 | * IVA2_2 interface data | 102 | static struct omap_hwmod_rst_info omap3xxx_iva_resets[] = { |
539 | */ | 103 | { .name = "logic", .rst_shift = 0 }, |
540 | 104 | { .name = "seq0", .rst_shift = 1 }, | |
541 | /* IVA2 <- L3 interface */ | 105 | { .name = "seq1", .rst_shift = 2 }, |
542 | static struct omap_hwmod_ocp_if omap3xxx_l3__iva = { | ||
543 | .master = &omap3xxx_l3_main_hwmod, | ||
544 | .slave = &omap3xxx_iva_hwmod, | ||
545 | .clk = "iva2_ck", | ||
546 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
547 | }; | 106 | }; |
548 | 107 | ||
549 | static struct omap_hwmod_ocp_if *omap3xxx_iva_masters[] = { | ||
550 | &omap3xxx_l3__iva, | ||
551 | }; | ||
552 | |||
553 | /* | ||
554 | * IVA2 (IVA2) | ||
555 | */ | ||
556 | |||
557 | static struct omap_hwmod omap3xxx_iva_hwmod = { | 108 | static struct omap_hwmod omap3xxx_iva_hwmod = { |
558 | .name = "iva", | 109 | .name = "iva", |
559 | .class = &iva_hwmod_class, | 110 | .class = &iva_hwmod_class, |
560 | .masters = omap3xxx_iva_masters, | 111 | .clkdm_name = "iva2_clkdm", |
561 | .masters_cnt = ARRAY_SIZE(omap3xxx_iva_masters), | 112 | .rst_lines = omap3xxx_iva_resets, |
113 | .rst_lines_cnt = ARRAY_SIZE(omap3xxx_iva_resets), | ||
114 | .main_clk = "iva2_ck", | ||
562 | }; | 115 | }; |
563 | 116 | ||
564 | /* timer class */ | 117 | /* timer class */ |
@@ -597,46 +150,20 @@ static struct omap_hwmod_class omap3xxx_timer_hwmod_class = { | |||
597 | 150 | ||
598 | /* secure timers dev attribute */ | 151 | /* secure timers dev attribute */ |
599 | static struct omap_timer_capability_dev_attr capability_secure_dev_attr = { | 152 | static struct omap_timer_capability_dev_attr capability_secure_dev_attr = { |
600 | .timer_capability = OMAP_TIMER_SECURE, | 153 | .timer_capability = OMAP_TIMER_SECURE, |
601 | }; | 154 | }; |
602 | 155 | ||
603 | /* always-on timers dev attribute */ | 156 | /* always-on timers dev attribute */ |
604 | static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = { | 157 | static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = { |
605 | .timer_capability = OMAP_TIMER_ALWON, | 158 | .timer_capability = OMAP_TIMER_ALWON, |
606 | }; | 159 | }; |
607 | 160 | ||
608 | /* pwm timers dev attribute */ | 161 | /* pwm timers dev attribute */ |
609 | static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = { | 162 | static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = { |
610 | .timer_capability = OMAP_TIMER_HAS_PWM, | 163 | .timer_capability = OMAP_TIMER_HAS_PWM, |
611 | }; | 164 | }; |
612 | 165 | ||
613 | /* timer1 */ | 166 | /* timer1 */ |
614 | static struct omap_hwmod omap3xxx_timer1_hwmod; | ||
615 | |||
616 | static struct omap_hwmod_addr_space omap3xxx_timer1_addrs[] = { | ||
617 | { | ||
618 | .pa_start = 0x48318000, | ||
619 | .pa_end = 0x48318000 + SZ_1K - 1, | ||
620 | .flags = ADDR_TYPE_RT | ||
621 | }, | ||
622 | { } | ||
623 | }; | ||
624 | |||
625 | /* l4_wkup -> timer1 */ | ||
626 | static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1 = { | ||
627 | .master = &omap3xxx_l4_wkup_hwmod, | ||
628 | .slave = &omap3xxx_timer1_hwmod, | ||
629 | .clk = "gpt1_ick", | ||
630 | .addr = omap3xxx_timer1_addrs, | ||
631 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
632 | }; | ||
633 | |||
634 | /* timer1 slave port */ | ||
635 | static struct omap_hwmod_ocp_if *omap3xxx_timer1_slaves[] = { | ||
636 | &omap3xxx_l4_wkup__timer1, | ||
637 | }; | ||
638 | |||
639 | /* timer1 hwmod */ | ||
640 | static struct omap_hwmod omap3xxx_timer1_hwmod = { | 167 | static struct omap_hwmod omap3xxx_timer1_hwmod = { |
641 | .name = "timer1", | 168 | .name = "timer1", |
642 | .mpu_irqs = omap2_timer1_mpu_irqs, | 169 | .mpu_irqs = omap2_timer1_mpu_irqs, |
@@ -651,38 +178,10 @@ static struct omap_hwmod omap3xxx_timer1_hwmod = { | |||
651 | }, | 178 | }, |
652 | }, | 179 | }, |
653 | .dev_attr = &capability_alwon_dev_attr, | 180 | .dev_attr = &capability_alwon_dev_attr, |
654 | .slaves = omap3xxx_timer1_slaves, | ||
655 | .slaves_cnt = ARRAY_SIZE(omap3xxx_timer1_slaves), | ||
656 | .class = &omap3xxx_timer_1ms_hwmod_class, | 181 | .class = &omap3xxx_timer_1ms_hwmod_class, |
657 | }; | 182 | }; |
658 | 183 | ||
659 | /* timer2 */ | 184 | /* timer2 */ |
660 | static struct omap_hwmod omap3xxx_timer2_hwmod; | ||
661 | |||
662 | static struct omap_hwmod_addr_space omap3xxx_timer2_addrs[] = { | ||
663 | { | ||
664 | .pa_start = 0x49032000, | ||
665 | .pa_end = 0x49032000 + SZ_1K - 1, | ||
666 | .flags = ADDR_TYPE_RT | ||
667 | }, | ||
668 | { } | ||
669 | }; | ||
670 | |||
671 | /* l4_per -> timer2 */ | ||
672 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2 = { | ||
673 | .master = &omap3xxx_l4_per_hwmod, | ||
674 | .slave = &omap3xxx_timer2_hwmod, | ||
675 | .clk = "gpt2_ick", | ||
676 | .addr = omap3xxx_timer2_addrs, | ||
677 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
678 | }; | ||
679 | |||
680 | /* timer2 slave port */ | ||
681 | static struct omap_hwmod_ocp_if *omap3xxx_timer2_slaves[] = { | ||
682 | &omap3xxx_l4_per__timer2, | ||
683 | }; | ||
684 | |||
685 | /* timer2 hwmod */ | ||
686 | static struct omap_hwmod omap3xxx_timer2_hwmod = { | 185 | static struct omap_hwmod omap3xxx_timer2_hwmod = { |
687 | .name = "timer2", | 186 | .name = "timer2", |
688 | .mpu_irqs = omap2_timer2_mpu_irqs, | 187 | .mpu_irqs = omap2_timer2_mpu_irqs, |
@@ -697,38 +196,10 @@ static struct omap_hwmod omap3xxx_timer2_hwmod = { | |||
697 | }, | 196 | }, |
698 | }, | 197 | }, |
699 | .dev_attr = &capability_alwon_dev_attr, | 198 | .dev_attr = &capability_alwon_dev_attr, |
700 | .slaves = omap3xxx_timer2_slaves, | ||
701 | .slaves_cnt = ARRAY_SIZE(omap3xxx_timer2_slaves), | ||
702 | .class = &omap3xxx_timer_1ms_hwmod_class, | 199 | .class = &omap3xxx_timer_1ms_hwmod_class, |
703 | }; | 200 | }; |
704 | 201 | ||
705 | /* timer3 */ | 202 | /* timer3 */ |
706 | static struct omap_hwmod omap3xxx_timer3_hwmod; | ||
707 | |||
708 | static struct omap_hwmod_addr_space omap3xxx_timer3_addrs[] = { | ||
709 | { | ||
710 | .pa_start = 0x49034000, | ||
711 | .pa_end = 0x49034000 + SZ_1K - 1, | ||
712 | .flags = ADDR_TYPE_RT | ||
713 | }, | ||
714 | { } | ||
715 | }; | ||
716 | |||
717 | /* l4_per -> timer3 */ | ||
718 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3 = { | ||
719 | .master = &omap3xxx_l4_per_hwmod, | ||
720 | .slave = &omap3xxx_timer3_hwmod, | ||
721 | .clk = "gpt3_ick", | ||
722 | .addr = omap3xxx_timer3_addrs, | ||
723 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
724 | }; | ||
725 | |||
726 | /* timer3 slave port */ | ||
727 | static struct omap_hwmod_ocp_if *omap3xxx_timer3_slaves[] = { | ||
728 | &omap3xxx_l4_per__timer3, | ||
729 | }; | ||
730 | |||
731 | /* timer3 hwmod */ | ||
732 | static struct omap_hwmod omap3xxx_timer3_hwmod = { | 203 | static struct omap_hwmod omap3xxx_timer3_hwmod = { |
733 | .name = "timer3", | 204 | .name = "timer3", |
734 | .mpu_irqs = omap2_timer3_mpu_irqs, | 205 | .mpu_irqs = omap2_timer3_mpu_irqs, |
@@ -743,38 +214,10 @@ static struct omap_hwmod omap3xxx_timer3_hwmod = { | |||
743 | }, | 214 | }, |
744 | }, | 215 | }, |
745 | .dev_attr = &capability_alwon_dev_attr, | 216 | .dev_attr = &capability_alwon_dev_attr, |
746 | .slaves = omap3xxx_timer3_slaves, | ||
747 | .slaves_cnt = ARRAY_SIZE(omap3xxx_timer3_slaves), | ||
748 | .class = &omap3xxx_timer_hwmod_class, | 217 | .class = &omap3xxx_timer_hwmod_class, |
749 | }; | 218 | }; |
750 | 219 | ||
751 | /* timer4 */ | 220 | /* timer4 */ |
752 | static struct omap_hwmod omap3xxx_timer4_hwmod; | ||
753 | |||
754 | static struct omap_hwmod_addr_space omap3xxx_timer4_addrs[] = { | ||
755 | { | ||
756 | .pa_start = 0x49036000, | ||
757 | .pa_end = 0x49036000 + SZ_1K - 1, | ||
758 | .flags = ADDR_TYPE_RT | ||
759 | }, | ||
760 | { } | ||
761 | }; | ||
762 | |||
763 | /* l4_per -> timer4 */ | ||
764 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4 = { | ||
765 | .master = &omap3xxx_l4_per_hwmod, | ||
766 | .slave = &omap3xxx_timer4_hwmod, | ||
767 | .clk = "gpt4_ick", | ||
768 | .addr = omap3xxx_timer4_addrs, | ||
769 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
770 | }; | ||
771 | |||
772 | /* timer4 slave port */ | ||
773 | static struct omap_hwmod_ocp_if *omap3xxx_timer4_slaves[] = { | ||
774 | &omap3xxx_l4_per__timer4, | ||
775 | }; | ||
776 | |||
777 | /* timer4 hwmod */ | ||
778 | static struct omap_hwmod omap3xxx_timer4_hwmod = { | 221 | static struct omap_hwmod omap3xxx_timer4_hwmod = { |
779 | .name = "timer4", | 222 | .name = "timer4", |
780 | .mpu_irqs = omap2_timer4_mpu_irqs, | 223 | .mpu_irqs = omap2_timer4_mpu_irqs, |
@@ -789,38 +232,10 @@ static struct omap_hwmod omap3xxx_timer4_hwmod = { | |||
789 | }, | 232 | }, |
790 | }, | 233 | }, |
791 | .dev_attr = &capability_alwon_dev_attr, | 234 | .dev_attr = &capability_alwon_dev_attr, |
792 | .slaves = omap3xxx_timer4_slaves, | ||
793 | .slaves_cnt = ARRAY_SIZE(omap3xxx_timer4_slaves), | ||
794 | .class = &omap3xxx_timer_hwmod_class, | 235 | .class = &omap3xxx_timer_hwmod_class, |
795 | }; | 236 | }; |
796 | 237 | ||
797 | /* timer5 */ | 238 | /* timer5 */ |
798 | static struct omap_hwmod omap3xxx_timer5_hwmod; | ||
799 | |||
800 | static struct omap_hwmod_addr_space omap3xxx_timer5_addrs[] = { | ||
801 | { | ||
802 | .pa_start = 0x49038000, | ||
803 | .pa_end = 0x49038000 + SZ_1K - 1, | ||
804 | .flags = ADDR_TYPE_RT | ||
805 | }, | ||
806 | { } | ||
807 | }; | ||
808 | |||
809 | /* l4_per -> timer5 */ | ||
810 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5 = { | ||
811 | .master = &omap3xxx_l4_per_hwmod, | ||
812 | .slave = &omap3xxx_timer5_hwmod, | ||
813 | .clk = "gpt5_ick", | ||
814 | .addr = omap3xxx_timer5_addrs, | ||
815 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
816 | }; | ||
817 | |||
818 | /* timer5 slave port */ | ||
819 | static struct omap_hwmod_ocp_if *omap3xxx_timer5_slaves[] = { | ||
820 | &omap3xxx_l4_per__timer5, | ||
821 | }; | ||
822 | |||
823 | /* timer5 hwmod */ | ||
824 | static struct omap_hwmod omap3xxx_timer5_hwmod = { | 239 | static struct omap_hwmod omap3xxx_timer5_hwmod = { |
825 | .name = "timer5", | 240 | .name = "timer5", |
826 | .mpu_irqs = omap2_timer5_mpu_irqs, | 241 | .mpu_irqs = omap2_timer5_mpu_irqs, |
@@ -835,38 +250,10 @@ static struct omap_hwmod omap3xxx_timer5_hwmod = { | |||
835 | }, | 250 | }, |
836 | }, | 251 | }, |
837 | .dev_attr = &capability_alwon_dev_attr, | 252 | .dev_attr = &capability_alwon_dev_attr, |
838 | .slaves = omap3xxx_timer5_slaves, | ||
839 | .slaves_cnt = ARRAY_SIZE(omap3xxx_timer5_slaves), | ||
840 | .class = &omap3xxx_timer_hwmod_class, | 253 | .class = &omap3xxx_timer_hwmod_class, |
841 | }; | 254 | }; |
842 | 255 | ||
843 | /* timer6 */ | 256 | /* timer6 */ |
844 | static struct omap_hwmod omap3xxx_timer6_hwmod; | ||
845 | |||
846 | static struct omap_hwmod_addr_space omap3xxx_timer6_addrs[] = { | ||
847 | { | ||
848 | .pa_start = 0x4903A000, | ||
849 | .pa_end = 0x4903A000 + SZ_1K - 1, | ||
850 | .flags = ADDR_TYPE_RT | ||
851 | }, | ||
852 | { } | ||
853 | }; | ||
854 | |||
855 | /* l4_per -> timer6 */ | ||
856 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6 = { | ||
857 | .master = &omap3xxx_l4_per_hwmod, | ||
858 | .slave = &omap3xxx_timer6_hwmod, | ||
859 | .clk = "gpt6_ick", | ||
860 | .addr = omap3xxx_timer6_addrs, | ||
861 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
862 | }; | ||
863 | |||
864 | /* timer6 slave port */ | ||
865 | static struct omap_hwmod_ocp_if *omap3xxx_timer6_slaves[] = { | ||
866 | &omap3xxx_l4_per__timer6, | ||
867 | }; | ||
868 | |||
869 | /* timer6 hwmod */ | ||
870 | static struct omap_hwmod omap3xxx_timer6_hwmod = { | 257 | static struct omap_hwmod omap3xxx_timer6_hwmod = { |
871 | .name = "timer6", | 258 | .name = "timer6", |
872 | .mpu_irqs = omap2_timer6_mpu_irqs, | 259 | .mpu_irqs = omap2_timer6_mpu_irqs, |
@@ -881,38 +268,10 @@ static struct omap_hwmod omap3xxx_timer6_hwmod = { | |||
881 | }, | 268 | }, |
882 | }, | 269 | }, |
883 | .dev_attr = &capability_alwon_dev_attr, | 270 | .dev_attr = &capability_alwon_dev_attr, |
884 | .slaves = omap3xxx_timer6_slaves, | ||
885 | .slaves_cnt = ARRAY_SIZE(omap3xxx_timer6_slaves), | ||
886 | .class = &omap3xxx_timer_hwmod_class, | 271 | .class = &omap3xxx_timer_hwmod_class, |
887 | }; | 272 | }; |
888 | 273 | ||
889 | /* timer7 */ | 274 | /* timer7 */ |
890 | static struct omap_hwmod omap3xxx_timer7_hwmod; | ||
891 | |||
892 | static struct omap_hwmod_addr_space omap3xxx_timer7_addrs[] = { | ||
893 | { | ||
894 | .pa_start = 0x4903C000, | ||
895 | .pa_end = 0x4903C000 + SZ_1K - 1, | ||
896 | .flags = ADDR_TYPE_RT | ||
897 | }, | ||
898 | { } | ||
899 | }; | ||
900 | |||
901 | /* l4_per -> timer7 */ | ||
902 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7 = { | ||
903 | .master = &omap3xxx_l4_per_hwmod, | ||
904 | .slave = &omap3xxx_timer7_hwmod, | ||
905 | .clk = "gpt7_ick", | ||
906 | .addr = omap3xxx_timer7_addrs, | ||
907 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
908 | }; | ||
909 | |||
910 | /* timer7 slave port */ | ||
911 | static struct omap_hwmod_ocp_if *omap3xxx_timer7_slaves[] = { | ||
912 | &omap3xxx_l4_per__timer7, | ||
913 | }; | ||
914 | |||
915 | /* timer7 hwmod */ | ||
916 | static struct omap_hwmod omap3xxx_timer7_hwmod = { | 275 | static struct omap_hwmod omap3xxx_timer7_hwmod = { |
917 | .name = "timer7", | 276 | .name = "timer7", |
918 | .mpu_irqs = omap2_timer7_mpu_irqs, | 277 | .mpu_irqs = omap2_timer7_mpu_irqs, |
@@ -927,38 +286,10 @@ static struct omap_hwmod omap3xxx_timer7_hwmod = { | |||
927 | }, | 286 | }, |
928 | }, | 287 | }, |
929 | .dev_attr = &capability_alwon_dev_attr, | 288 | .dev_attr = &capability_alwon_dev_attr, |
930 | .slaves = omap3xxx_timer7_slaves, | ||
931 | .slaves_cnt = ARRAY_SIZE(omap3xxx_timer7_slaves), | ||
932 | .class = &omap3xxx_timer_hwmod_class, | 289 | .class = &omap3xxx_timer_hwmod_class, |
933 | }; | 290 | }; |
934 | 291 | ||
935 | /* timer8 */ | 292 | /* timer8 */ |
936 | static struct omap_hwmod omap3xxx_timer8_hwmod; | ||
937 | |||
938 | static struct omap_hwmod_addr_space omap3xxx_timer8_addrs[] = { | ||
939 | { | ||
940 | .pa_start = 0x4903E000, | ||
941 | .pa_end = 0x4903E000 + SZ_1K - 1, | ||
942 | .flags = ADDR_TYPE_RT | ||
943 | }, | ||
944 | { } | ||
945 | }; | ||
946 | |||
947 | /* l4_per -> timer8 */ | ||
948 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8 = { | ||
949 | .master = &omap3xxx_l4_per_hwmod, | ||
950 | .slave = &omap3xxx_timer8_hwmod, | ||
951 | .clk = "gpt8_ick", | ||
952 | .addr = omap3xxx_timer8_addrs, | ||
953 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
954 | }; | ||
955 | |||
956 | /* timer8 slave port */ | ||
957 | static struct omap_hwmod_ocp_if *omap3xxx_timer8_slaves[] = { | ||
958 | &omap3xxx_l4_per__timer8, | ||
959 | }; | ||
960 | |||
961 | /* timer8 hwmod */ | ||
962 | static struct omap_hwmod omap3xxx_timer8_hwmod = { | 293 | static struct omap_hwmod omap3xxx_timer8_hwmod = { |
963 | .name = "timer8", | 294 | .name = "timer8", |
964 | .mpu_irqs = omap2_timer8_mpu_irqs, | 295 | .mpu_irqs = omap2_timer8_mpu_irqs, |
@@ -973,38 +304,10 @@ static struct omap_hwmod omap3xxx_timer8_hwmod = { | |||
973 | }, | 304 | }, |
974 | }, | 305 | }, |
975 | .dev_attr = &capability_pwm_dev_attr, | 306 | .dev_attr = &capability_pwm_dev_attr, |
976 | .slaves = omap3xxx_timer8_slaves, | ||
977 | .slaves_cnt = ARRAY_SIZE(omap3xxx_timer8_slaves), | ||
978 | .class = &omap3xxx_timer_hwmod_class, | 307 | .class = &omap3xxx_timer_hwmod_class, |
979 | }; | 308 | }; |
980 | 309 | ||
981 | /* timer9 */ | 310 | /* timer9 */ |
982 | static struct omap_hwmod omap3xxx_timer9_hwmod; | ||
983 | |||
984 | static struct omap_hwmod_addr_space omap3xxx_timer9_addrs[] = { | ||
985 | { | ||
986 | .pa_start = 0x49040000, | ||
987 | .pa_end = 0x49040000 + SZ_1K - 1, | ||
988 | .flags = ADDR_TYPE_RT | ||
989 | }, | ||
990 | { } | ||
991 | }; | ||
992 | |||
993 | /* l4_per -> timer9 */ | ||
994 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9 = { | ||
995 | .master = &omap3xxx_l4_per_hwmod, | ||
996 | .slave = &omap3xxx_timer9_hwmod, | ||
997 | .clk = "gpt9_ick", | ||
998 | .addr = omap3xxx_timer9_addrs, | ||
999 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1000 | }; | ||
1001 | |||
1002 | /* timer9 slave port */ | ||
1003 | static struct omap_hwmod_ocp_if *omap3xxx_timer9_slaves[] = { | ||
1004 | &omap3xxx_l4_per__timer9, | ||
1005 | }; | ||
1006 | |||
1007 | /* timer9 hwmod */ | ||
1008 | static struct omap_hwmod omap3xxx_timer9_hwmod = { | 311 | static struct omap_hwmod omap3xxx_timer9_hwmod = { |
1009 | .name = "timer9", | 312 | .name = "timer9", |
1010 | .mpu_irqs = omap2_timer9_mpu_irqs, | 313 | .mpu_irqs = omap2_timer9_mpu_irqs, |
@@ -1019,29 +322,10 @@ static struct omap_hwmod omap3xxx_timer9_hwmod = { | |||
1019 | }, | 322 | }, |
1020 | }, | 323 | }, |
1021 | .dev_attr = &capability_pwm_dev_attr, | 324 | .dev_attr = &capability_pwm_dev_attr, |
1022 | .slaves = omap3xxx_timer9_slaves, | ||
1023 | .slaves_cnt = ARRAY_SIZE(omap3xxx_timer9_slaves), | ||
1024 | .class = &omap3xxx_timer_hwmod_class, | 325 | .class = &omap3xxx_timer_hwmod_class, |
1025 | }; | 326 | }; |
1026 | 327 | ||
1027 | /* timer10 */ | 328 | /* timer10 */ |
1028 | static struct omap_hwmod omap3xxx_timer10_hwmod; | ||
1029 | |||
1030 | /* l4_core -> timer10 */ | ||
1031 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10 = { | ||
1032 | .master = &omap3xxx_l4_core_hwmod, | ||
1033 | .slave = &omap3xxx_timer10_hwmod, | ||
1034 | .clk = "gpt10_ick", | ||
1035 | .addr = omap2_timer10_addrs, | ||
1036 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1037 | }; | ||
1038 | |||
1039 | /* timer10 slave port */ | ||
1040 | static struct omap_hwmod_ocp_if *omap3xxx_timer10_slaves[] = { | ||
1041 | &omap3xxx_l4_core__timer10, | ||
1042 | }; | ||
1043 | |||
1044 | /* timer10 hwmod */ | ||
1045 | static struct omap_hwmod omap3xxx_timer10_hwmod = { | 329 | static struct omap_hwmod omap3xxx_timer10_hwmod = { |
1046 | .name = "timer10", | 330 | .name = "timer10", |
1047 | .mpu_irqs = omap2_timer10_mpu_irqs, | 331 | .mpu_irqs = omap2_timer10_mpu_irqs, |
@@ -1056,29 +340,10 @@ static struct omap_hwmod omap3xxx_timer10_hwmod = { | |||
1056 | }, | 340 | }, |
1057 | }, | 341 | }, |
1058 | .dev_attr = &capability_pwm_dev_attr, | 342 | .dev_attr = &capability_pwm_dev_attr, |
1059 | .slaves = omap3xxx_timer10_slaves, | ||
1060 | .slaves_cnt = ARRAY_SIZE(omap3xxx_timer10_slaves), | ||
1061 | .class = &omap3xxx_timer_1ms_hwmod_class, | 343 | .class = &omap3xxx_timer_1ms_hwmod_class, |
1062 | }; | 344 | }; |
1063 | 345 | ||
1064 | /* timer11 */ | 346 | /* timer11 */ |
1065 | static struct omap_hwmod omap3xxx_timer11_hwmod; | ||
1066 | |||
1067 | /* l4_core -> timer11 */ | ||
1068 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11 = { | ||
1069 | .master = &omap3xxx_l4_core_hwmod, | ||
1070 | .slave = &omap3xxx_timer11_hwmod, | ||
1071 | .clk = "gpt11_ick", | ||
1072 | .addr = omap2_timer11_addrs, | ||
1073 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1074 | }; | ||
1075 | |||
1076 | /* timer11 slave port */ | ||
1077 | static struct omap_hwmod_ocp_if *omap3xxx_timer11_slaves[] = { | ||
1078 | &omap3xxx_l4_core__timer11, | ||
1079 | }; | ||
1080 | |||
1081 | /* timer11 hwmod */ | ||
1082 | static struct omap_hwmod omap3xxx_timer11_hwmod = { | 347 | static struct omap_hwmod omap3xxx_timer11_hwmod = { |
1083 | .name = "timer11", | 348 | .name = "timer11", |
1084 | .mpu_irqs = omap2_timer11_mpu_irqs, | 349 | .mpu_irqs = omap2_timer11_mpu_irqs, |
@@ -1093,42 +358,15 @@ static struct omap_hwmod omap3xxx_timer11_hwmod = { | |||
1093 | }, | 358 | }, |
1094 | }, | 359 | }, |
1095 | .dev_attr = &capability_pwm_dev_attr, | 360 | .dev_attr = &capability_pwm_dev_attr, |
1096 | .slaves = omap3xxx_timer11_slaves, | ||
1097 | .slaves_cnt = ARRAY_SIZE(omap3xxx_timer11_slaves), | ||
1098 | .class = &omap3xxx_timer_hwmod_class, | 361 | .class = &omap3xxx_timer_hwmod_class, |
1099 | }; | 362 | }; |
1100 | 363 | ||
1101 | /* timer12*/ | 364 | /* timer12 */ |
1102 | static struct omap_hwmod omap3xxx_timer12_hwmod; | ||
1103 | static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = { | 365 | static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = { |
1104 | { .irq = 95, }, | 366 | { .irq = 95, }, |
1105 | { .irq = -1 } | 367 | { .irq = -1 } |
1106 | }; | 368 | }; |
1107 | 369 | ||
1108 | static struct omap_hwmod_addr_space omap3xxx_timer12_addrs[] = { | ||
1109 | { | ||
1110 | .pa_start = 0x48304000, | ||
1111 | .pa_end = 0x48304000 + SZ_1K - 1, | ||
1112 | .flags = ADDR_TYPE_RT | ||
1113 | }, | ||
1114 | { } | ||
1115 | }; | ||
1116 | |||
1117 | /* l4_core -> timer12 */ | ||
1118 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer12 = { | ||
1119 | .master = &omap3xxx_l4_core_hwmod, | ||
1120 | .slave = &omap3xxx_timer12_hwmod, | ||
1121 | .clk = "gpt12_ick", | ||
1122 | .addr = omap3xxx_timer12_addrs, | ||
1123 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1124 | }; | ||
1125 | |||
1126 | /* timer12 slave port */ | ||
1127 | static struct omap_hwmod_ocp_if *omap3xxx_timer12_slaves[] = { | ||
1128 | &omap3xxx_l4_core__timer12, | ||
1129 | }; | ||
1130 | |||
1131 | /* timer12 hwmod */ | ||
1132 | static struct omap_hwmod omap3xxx_timer12_hwmod = { | 370 | static struct omap_hwmod omap3xxx_timer12_hwmod = { |
1133 | .name = "timer12", | 371 | .name = "timer12", |
1134 | .mpu_irqs = omap3xxx_timer12_mpu_irqs, | 372 | .mpu_irqs = omap3xxx_timer12_mpu_irqs, |
@@ -1143,29 +381,9 @@ static struct omap_hwmod omap3xxx_timer12_hwmod = { | |||
1143 | }, | 381 | }, |
1144 | }, | 382 | }, |
1145 | .dev_attr = &capability_secure_dev_attr, | 383 | .dev_attr = &capability_secure_dev_attr, |
1146 | .slaves = omap3xxx_timer12_slaves, | ||
1147 | .slaves_cnt = ARRAY_SIZE(omap3xxx_timer12_slaves), | ||
1148 | .class = &omap3xxx_timer_hwmod_class, | 384 | .class = &omap3xxx_timer_hwmod_class, |
1149 | }; | 385 | }; |
1150 | 386 | ||
1151 | /* l4_wkup -> wd_timer2 */ | ||
1152 | static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = { | ||
1153 | { | ||
1154 | .pa_start = 0x48314000, | ||
1155 | .pa_end = 0x4831407f, | ||
1156 | .flags = ADDR_TYPE_RT | ||
1157 | }, | ||
1158 | { } | ||
1159 | }; | ||
1160 | |||
1161 | static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = { | ||
1162 | .master = &omap3xxx_l4_wkup_hwmod, | ||
1163 | .slave = &omap3xxx_wd_timer2_hwmod, | ||
1164 | .clk = "wdt2_ick", | ||
1165 | .addr = omap3xxx_wd_timer2_addrs, | ||
1166 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1167 | }; | ||
1168 | |||
1169 | /* | 387 | /* |
1170 | * 'wd_timer' class | 388 | * 'wd_timer' class |
1171 | * 32-bit watchdog upward counter that generates a pulse on the reset pin on | 389 | * 32-bit watchdog upward counter that generates a pulse on the reset pin on |
@@ -1203,11 +421,6 @@ static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = { | |||
1203 | .pre_shutdown = &omap2_wd_timer_disable | 421 | .pre_shutdown = &omap2_wd_timer_disable |
1204 | }; | 422 | }; |
1205 | 423 | ||
1206 | /* wd_timer2 */ | ||
1207 | static struct omap_hwmod_ocp_if *omap3xxx_wd_timer2_slaves[] = { | ||
1208 | &omap3xxx_l4_wkup__wd_timer2, | ||
1209 | }; | ||
1210 | |||
1211 | static struct omap_hwmod omap3xxx_wd_timer2_hwmod = { | 424 | static struct omap_hwmod omap3xxx_wd_timer2_hwmod = { |
1212 | .name = "wd_timer2", | 425 | .name = "wd_timer2", |
1213 | .class = &omap3xxx_wd_timer_hwmod_class, | 426 | .class = &omap3xxx_wd_timer_hwmod_class, |
@@ -1221,8 +434,6 @@ static struct omap_hwmod omap3xxx_wd_timer2_hwmod = { | |||
1221 | .idlest_idle_bit = OMAP3430_ST_WDT2_SHIFT, | 434 | .idlest_idle_bit = OMAP3430_ST_WDT2_SHIFT, |
1222 | }, | 435 | }, |
1223 | }, | 436 | }, |
1224 | .slaves = omap3xxx_wd_timer2_slaves, | ||
1225 | .slaves_cnt = ARRAY_SIZE(omap3xxx_wd_timer2_slaves), | ||
1226 | /* | 437 | /* |
1227 | * XXX: Use software supervised mode, HW supervised smartidle seems to | 438 | * XXX: Use software supervised mode, HW supervised smartidle seems to |
1228 | * block CORE power domain idle transitions. Maybe a HW bug in wdt2? | 439 | * block CORE power domain idle transitions. Maybe a HW bug in wdt2? |
@@ -1231,11 +442,6 @@ static struct omap_hwmod omap3xxx_wd_timer2_hwmod = { | |||
1231 | }; | 442 | }; |
1232 | 443 | ||
1233 | /* UART1 */ | 444 | /* UART1 */ |
1234 | |||
1235 | static struct omap_hwmod_ocp_if *omap3xxx_uart1_slaves[] = { | ||
1236 | &omap3_l4_core__uart1, | ||
1237 | }; | ||
1238 | |||
1239 | static struct omap_hwmod omap3xxx_uart1_hwmod = { | 445 | static struct omap_hwmod omap3xxx_uart1_hwmod = { |
1240 | .name = "uart1", | 446 | .name = "uart1", |
1241 | .mpu_irqs = omap2_uart1_mpu_irqs, | 447 | .mpu_irqs = omap2_uart1_mpu_irqs, |
@@ -1250,17 +456,10 @@ static struct omap_hwmod omap3xxx_uart1_hwmod = { | |||
1250 | .idlest_idle_bit = OMAP3430_EN_UART1_SHIFT, | 456 | .idlest_idle_bit = OMAP3430_EN_UART1_SHIFT, |
1251 | }, | 457 | }, |
1252 | }, | 458 | }, |
1253 | .slaves = omap3xxx_uart1_slaves, | ||
1254 | .slaves_cnt = ARRAY_SIZE(omap3xxx_uart1_slaves), | ||
1255 | .class = &omap2_uart_class, | 459 | .class = &omap2_uart_class, |
1256 | }; | 460 | }; |
1257 | 461 | ||
1258 | /* UART2 */ | 462 | /* UART2 */ |
1259 | |||
1260 | static struct omap_hwmod_ocp_if *omap3xxx_uart2_slaves[] = { | ||
1261 | &omap3_l4_core__uart2, | ||
1262 | }; | ||
1263 | |||
1264 | static struct omap_hwmod omap3xxx_uart2_hwmod = { | 463 | static struct omap_hwmod omap3xxx_uart2_hwmod = { |
1265 | .name = "uart2", | 464 | .name = "uart2", |
1266 | .mpu_irqs = omap2_uart2_mpu_irqs, | 465 | .mpu_irqs = omap2_uart2_mpu_irqs, |
@@ -1275,17 +474,10 @@ static struct omap_hwmod omap3xxx_uart2_hwmod = { | |||
1275 | .idlest_idle_bit = OMAP3430_EN_UART2_SHIFT, | 474 | .idlest_idle_bit = OMAP3430_EN_UART2_SHIFT, |
1276 | }, | 475 | }, |
1277 | }, | 476 | }, |
1278 | .slaves = omap3xxx_uart2_slaves, | ||
1279 | .slaves_cnt = ARRAY_SIZE(omap3xxx_uart2_slaves), | ||
1280 | .class = &omap2_uart_class, | 477 | .class = &omap2_uart_class, |
1281 | }; | 478 | }; |
1282 | 479 | ||
1283 | /* UART3 */ | 480 | /* UART3 */ |
1284 | |||
1285 | static struct omap_hwmod_ocp_if *omap3xxx_uart3_slaves[] = { | ||
1286 | &omap3_l4_per__uart3, | ||
1287 | }; | ||
1288 | |||
1289 | static struct omap_hwmod omap3xxx_uart3_hwmod = { | 481 | static struct omap_hwmod omap3xxx_uart3_hwmod = { |
1290 | .name = "uart3", | 482 | .name = "uart3", |
1291 | .mpu_irqs = omap2_uart3_mpu_irqs, | 483 | .mpu_irqs = omap2_uart3_mpu_irqs, |
@@ -1300,13 +492,10 @@ static struct omap_hwmod omap3xxx_uart3_hwmod = { | |||
1300 | .idlest_idle_bit = OMAP3430_EN_UART3_SHIFT, | 492 | .idlest_idle_bit = OMAP3430_EN_UART3_SHIFT, |
1301 | }, | 493 | }, |
1302 | }, | 494 | }, |
1303 | .slaves = omap3xxx_uart3_slaves, | ||
1304 | .slaves_cnt = ARRAY_SIZE(omap3xxx_uart3_slaves), | ||
1305 | .class = &omap2_uart_class, | 495 | .class = &omap2_uart_class, |
1306 | }; | 496 | }; |
1307 | 497 | ||
1308 | /* UART4 */ | 498 | /* UART4 */ |
1309 | |||
1310 | static struct omap_hwmod_irq_info uart4_mpu_irqs[] = { | 499 | static struct omap_hwmod_irq_info uart4_mpu_irqs[] = { |
1311 | { .irq = INT_36XX_UART4_IRQ, }, | 500 | { .irq = INT_36XX_UART4_IRQ, }, |
1312 | { .irq = -1 } | 501 | { .irq = -1 } |
@@ -1318,11 +507,7 @@ static struct omap_hwmod_dma_info uart4_sdma_reqs[] = { | |||
1318 | { .dma_req = -1 } | 507 | { .dma_req = -1 } |
1319 | }; | 508 | }; |
1320 | 509 | ||
1321 | static struct omap_hwmod_ocp_if *omap3xxx_uart4_slaves[] = { | 510 | static struct omap_hwmod omap36xx_uart4_hwmod = { |
1322 | &omap3_l4_per__uart4, | ||
1323 | }; | ||
1324 | |||
1325 | static struct omap_hwmod omap3xxx_uart4_hwmod = { | ||
1326 | .name = "uart4", | 511 | .name = "uart4", |
1327 | .mpu_irqs = uart4_mpu_irqs, | 512 | .mpu_irqs = uart4_mpu_irqs, |
1328 | .sdma_reqs = uart4_sdma_reqs, | 513 | .sdma_reqs = uart4_sdma_reqs, |
@@ -1336,8 +521,6 @@ static struct omap_hwmod omap3xxx_uart4_hwmod = { | |||
1336 | .idlest_idle_bit = OMAP3630_EN_UART4_SHIFT, | 521 | .idlest_idle_bit = OMAP3630_EN_UART4_SHIFT, |
1337 | }, | 522 | }, |
1338 | }, | 523 | }, |
1339 | .slaves = omap3xxx_uart4_slaves, | ||
1340 | .slaves_cnt = ARRAY_SIZE(omap3xxx_uart4_slaves), | ||
1341 | .class = &omap2_uart_class, | 524 | .class = &omap2_uart_class, |
1342 | }; | 525 | }; |
1343 | 526 | ||
@@ -1350,16 +533,12 @@ static struct omap_hwmod_dma_info am35xx_uart4_sdma_reqs[] = { | |||
1350 | { .name = "tx", .dma_req = AM35XX_DMA_UART4_TX, }, | 533 | { .name = "tx", .dma_req = AM35XX_DMA_UART4_TX, }, |
1351 | }; | 534 | }; |
1352 | 535 | ||
1353 | static struct omap_hwmod_ocp_if *am35xx_uart4_slaves[] = { | ||
1354 | &am35xx_l4_core__uart4, | ||
1355 | }; | ||
1356 | |||
1357 | static struct omap_hwmod am35xx_uart4_hwmod = { | 536 | static struct omap_hwmod am35xx_uart4_hwmod = { |
1358 | .name = "uart4", | 537 | .name = "uart4", |
1359 | .mpu_irqs = am35xx_uart4_mpu_irqs, | 538 | .mpu_irqs = am35xx_uart4_mpu_irqs, |
1360 | .sdma_reqs = am35xx_uart4_sdma_reqs, | 539 | .sdma_reqs = am35xx_uart4_sdma_reqs, |
1361 | .main_clk = "uart4_fck", | 540 | .main_clk = "uart4_fck", |
1362 | .prcm = { | 541 | .prcm = { |
1363 | .omap2 = { | 542 | .omap2 = { |
1364 | .module_offs = CORE_MOD, | 543 | .module_offs = CORE_MOD, |
1365 | .prcm_reg_id = 1, | 544 | .prcm_reg_id = 1, |
@@ -1368,12 +547,9 @@ static struct omap_hwmod am35xx_uart4_hwmod = { | |||
1368 | .idlest_idle_bit = OMAP3430_EN_UART4_SHIFT, | 547 | .idlest_idle_bit = OMAP3430_EN_UART4_SHIFT, |
1369 | }, | 548 | }, |
1370 | }, | 549 | }, |
1371 | .slaves = am35xx_uart4_slaves, | 550 | .class = &omap2_uart_class, |
1372 | .slaves_cnt = ARRAY_SIZE(am35xx_uart4_slaves), | ||
1373 | .class = &omap2_uart_class, | ||
1374 | }; | 551 | }; |
1375 | 552 | ||
1376 | |||
1377 | static struct omap_hwmod_class i2c_class = { | 553 | static struct omap_hwmod_class i2c_class = { |
1378 | .name = "i2c", | 554 | .name = "i2c", |
1379 | .sysc = &i2c_sysc, | 555 | .sysc = &i2c_sysc, |
@@ -1388,51 +564,6 @@ static struct omap_hwmod_dma_info omap3xxx_dss_sdma_chs[] = { | |||
1388 | }; | 564 | }; |
1389 | 565 | ||
1390 | /* dss */ | 566 | /* dss */ |
1391 | /* dss master ports */ | ||
1392 | static struct omap_hwmod_ocp_if *omap3xxx_dss_masters[] = { | ||
1393 | &omap3xxx_dss__l3, | ||
1394 | }; | ||
1395 | |||
1396 | /* l4_core -> dss */ | ||
1397 | static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = { | ||
1398 | .master = &omap3xxx_l4_core_hwmod, | ||
1399 | .slave = &omap3430es1_dss_core_hwmod, | ||
1400 | .clk = "dss_ick", | ||
1401 | .addr = omap2_dss_addrs, | ||
1402 | .fw = { | ||
1403 | .omap2 = { | ||
1404 | .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION, | ||
1405 | .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP, | ||
1406 | .flags = OMAP_FIREWALL_L4, | ||
1407 | } | ||
1408 | }, | ||
1409 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1410 | }; | ||
1411 | |||
1412 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = { | ||
1413 | .master = &omap3xxx_l4_core_hwmod, | ||
1414 | .slave = &omap3xxx_dss_core_hwmod, | ||
1415 | .clk = "dss_ick", | ||
1416 | .addr = omap2_dss_addrs, | ||
1417 | .fw = { | ||
1418 | .omap2 = { | ||
1419 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION, | ||
1420 | .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP, | ||
1421 | .flags = OMAP_FIREWALL_L4, | ||
1422 | } | ||
1423 | }, | ||
1424 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1425 | }; | ||
1426 | |||
1427 | /* dss slave ports */ | ||
1428 | static struct omap_hwmod_ocp_if *omap3430es1_dss_slaves[] = { | ||
1429 | &omap3430es1_l4_core__dss, | ||
1430 | }; | ||
1431 | |||
1432 | static struct omap_hwmod_ocp_if *omap3xxx_dss_slaves[] = { | ||
1433 | &omap3xxx_l4_core__dss, | ||
1434 | }; | ||
1435 | |||
1436 | static struct omap_hwmod_opt_clk dss_opt_clks[] = { | 567 | static struct omap_hwmod_opt_clk dss_opt_clks[] = { |
1437 | /* | 568 | /* |
1438 | * The DSS HW needs all DSS clocks enabled during reset. The dss_core | 569 | * The DSS HW needs all DSS clocks enabled during reset. The dss_core |
@@ -1460,10 +591,6 @@ static struct omap_hwmod omap3430es1_dss_core_hwmod = { | |||
1460 | }, | 591 | }, |
1461 | .opt_clks = dss_opt_clks, | 592 | .opt_clks = dss_opt_clks, |
1462 | .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks), | 593 | .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks), |
1463 | .slaves = omap3430es1_dss_slaves, | ||
1464 | .slaves_cnt = ARRAY_SIZE(omap3430es1_dss_slaves), | ||
1465 | .masters = omap3xxx_dss_masters, | ||
1466 | .masters_cnt = ARRAY_SIZE(omap3xxx_dss_masters), | ||
1467 | .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET, | 594 | .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
1468 | }; | 595 | }; |
1469 | 596 | ||
@@ -1485,10 +612,6 @@ static struct omap_hwmod omap3xxx_dss_core_hwmod = { | |||
1485 | }, | 612 | }, |
1486 | .opt_clks = dss_opt_clks, | 613 | .opt_clks = dss_opt_clks, |
1487 | .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks), | 614 | .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks), |
1488 | .slaves = omap3xxx_dss_slaves, | ||
1489 | .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_slaves), | ||
1490 | .masters = omap3xxx_dss_masters, | ||
1491 | .masters_cnt = ARRAY_SIZE(omap3xxx_dss_masters), | ||
1492 | }; | 615 | }; |
1493 | 616 | ||
1494 | /* | 617 | /* |
@@ -1513,27 +636,6 @@ static struct omap_hwmod_class omap3_dispc_hwmod_class = { | |||
1513 | .sysc = &omap3_dispc_sysc, | 636 | .sysc = &omap3_dispc_sysc, |
1514 | }; | 637 | }; |
1515 | 638 | ||
1516 | /* l4_core -> dss_dispc */ | ||
1517 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = { | ||
1518 | .master = &omap3xxx_l4_core_hwmod, | ||
1519 | .slave = &omap3xxx_dss_dispc_hwmod, | ||
1520 | .clk = "dss_ick", | ||
1521 | .addr = omap2_dss_dispc_addrs, | ||
1522 | .fw = { | ||
1523 | .omap2 = { | ||
1524 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION, | ||
1525 | .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP, | ||
1526 | .flags = OMAP_FIREWALL_L4, | ||
1527 | } | ||
1528 | }, | ||
1529 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1530 | }; | ||
1531 | |||
1532 | /* dss_dispc slave ports */ | ||
1533 | static struct omap_hwmod_ocp_if *omap3xxx_dss_dispc_slaves[] = { | ||
1534 | &omap3xxx_l4_core__dss_dispc, | ||
1535 | }; | ||
1536 | |||
1537 | static struct omap_hwmod omap3xxx_dss_dispc_hwmod = { | 639 | static struct omap_hwmod omap3xxx_dss_dispc_hwmod = { |
1538 | .name = "dss_dispc", | 640 | .name = "dss_dispc", |
1539 | .class = &omap3_dispc_hwmod_class, | 641 | .class = &omap3_dispc_hwmod_class, |
@@ -1546,8 +648,6 @@ static struct omap_hwmod omap3xxx_dss_dispc_hwmod = { | |||
1546 | .module_offs = OMAP3430_DSS_MOD, | 648 | .module_offs = OMAP3430_DSS_MOD, |
1547 | }, | 649 | }, |
1548 | }, | 650 | }, |
1549 | .slaves = omap3xxx_dss_dispc_slaves, | ||
1550 | .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_dispc_slaves), | ||
1551 | .flags = HWMOD_NO_IDLEST, | 651 | .flags = HWMOD_NO_IDLEST, |
1552 | .dev_attr = &omap2_3_dss_dispc_dev_attr | 652 | .dev_attr = &omap2_3_dss_dispc_dev_attr |
1553 | }; | 653 | }; |
@@ -1567,36 +667,6 @@ static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = { | |||
1567 | }; | 667 | }; |
1568 | 668 | ||
1569 | /* dss_dsi1 */ | 669 | /* dss_dsi1 */ |
1570 | static struct omap_hwmod_addr_space omap3xxx_dss_dsi1_addrs[] = { | ||
1571 | { | ||
1572 | .pa_start = 0x4804FC00, | ||
1573 | .pa_end = 0x4804FFFF, | ||
1574 | .flags = ADDR_TYPE_RT | ||
1575 | }, | ||
1576 | { } | ||
1577 | }; | ||
1578 | |||
1579 | /* l4_core -> dss_dsi1 */ | ||
1580 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = { | ||
1581 | .master = &omap3xxx_l4_core_hwmod, | ||
1582 | .slave = &omap3xxx_dss_dsi1_hwmod, | ||
1583 | .clk = "dss_ick", | ||
1584 | .addr = omap3xxx_dss_dsi1_addrs, | ||
1585 | .fw = { | ||
1586 | .omap2 = { | ||
1587 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION, | ||
1588 | .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP, | ||
1589 | .flags = OMAP_FIREWALL_L4, | ||
1590 | } | ||
1591 | }, | ||
1592 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1593 | }; | ||
1594 | |||
1595 | /* dss_dsi1 slave ports */ | ||
1596 | static struct omap_hwmod_ocp_if *omap3xxx_dss_dsi1_slaves[] = { | ||
1597 | &omap3xxx_l4_core__dss_dsi1, | ||
1598 | }; | ||
1599 | |||
1600 | static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = { | 670 | static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = { |
1601 | { .role = "sys_clk", .clk = "dss2_alwon_fck" }, | 671 | { .role = "sys_clk", .clk = "dss2_alwon_fck" }, |
1602 | }; | 672 | }; |
@@ -1615,32 +685,9 @@ static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = { | |||
1615 | }, | 685 | }, |
1616 | .opt_clks = dss_dsi1_opt_clks, | 686 | .opt_clks = dss_dsi1_opt_clks, |
1617 | .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks), | 687 | .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks), |
1618 | .slaves = omap3xxx_dss_dsi1_slaves, | ||
1619 | .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_dsi1_slaves), | ||
1620 | .flags = HWMOD_NO_IDLEST, | 688 | .flags = HWMOD_NO_IDLEST, |
1621 | }; | 689 | }; |
1622 | 690 | ||
1623 | /* l4_core -> dss_rfbi */ | ||
1624 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = { | ||
1625 | .master = &omap3xxx_l4_core_hwmod, | ||
1626 | .slave = &omap3xxx_dss_rfbi_hwmod, | ||
1627 | .clk = "dss_ick", | ||
1628 | .addr = omap2_dss_rfbi_addrs, | ||
1629 | .fw = { | ||
1630 | .omap2 = { | ||
1631 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION, | ||
1632 | .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP , | ||
1633 | .flags = OMAP_FIREWALL_L4, | ||
1634 | } | ||
1635 | }, | ||
1636 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1637 | }; | ||
1638 | |||
1639 | /* dss_rfbi slave ports */ | ||
1640 | static struct omap_hwmod_ocp_if *omap3xxx_dss_rfbi_slaves[] = { | ||
1641 | &omap3xxx_l4_core__dss_rfbi, | ||
1642 | }; | ||
1643 | |||
1644 | static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = { | 691 | static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = { |
1645 | { .role = "ick", .clk = "dss_ick" }, | 692 | { .role = "ick", .clk = "dss_ick" }, |
1646 | }; | 693 | }; |
@@ -1658,32 +705,9 @@ static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = { | |||
1658 | }, | 705 | }, |
1659 | .opt_clks = dss_rfbi_opt_clks, | 706 | .opt_clks = dss_rfbi_opt_clks, |
1660 | .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks), | 707 | .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks), |
1661 | .slaves = omap3xxx_dss_rfbi_slaves, | ||
1662 | .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_rfbi_slaves), | ||
1663 | .flags = HWMOD_NO_IDLEST, | 708 | .flags = HWMOD_NO_IDLEST, |
1664 | }; | 709 | }; |
1665 | 710 | ||
1666 | /* l4_core -> dss_venc */ | ||
1667 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = { | ||
1668 | .master = &omap3xxx_l4_core_hwmod, | ||
1669 | .slave = &omap3xxx_dss_venc_hwmod, | ||
1670 | .clk = "dss_ick", | ||
1671 | .addr = omap2_dss_venc_addrs, | ||
1672 | .fw = { | ||
1673 | .omap2 = { | ||
1674 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION, | ||
1675 | .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP, | ||
1676 | .flags = OMAP_FIREWALL_L4, | ||
1677 | } | ||
1678 | }, | ||
1679 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1680 | }; | ||
1681 | |||
1682 | /* dss_venc slave ports */ | ||
1683 | static struct omap_hwmod_ocp_if *omap3xxx_dss_venc_slaves[] = { | ||
1684 | &omap3xxx_l4_core__dss_venc, | ||
1685 | }; | ||
1686 | |||
1687 | static struct omap_hwmod_opt_clk dss_venc_opt_clks[] = { | 711 | static struct omap_hwmod_opt_clk dss_venc_opt_clks[] = { |
1688 | /* required only on OMAP3430 */ | 712 | /* required only on OMAP3430 */ |
1689 | { .role = "tv_dac_clk", .clk = "dss_96m_fck" }, | 713 | { .role = "tv_dac_clk", .clk = "dss_96m_fck" }, |
@@ -1702,13 +726,10 @@ static struct omap_hwmod omap3xxx_dss_venc_hwmod = { | |||
1702 | }, | 726 | }, |
1703 | .opt_clks = dss_venc_opt_clks, | 727 | .opt_clks = dss_venc_opt_clks, |
1704 | .opt_clks_cnt = ARRAY_SIZE(dss_venc_opt_clks), | 728 | .opt_clks_cnt = ARRAY_SIZE(dss_venc_opt_clks), |
1705 | .slaves = omap3xxx_dss_venc_slaves, | ||
1706 | .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_venc_slaves), | ||
1707 | .flags = HWMOD_NO_IDLEST, | 729 | .flags = HWMOD_NO_IDLEST, |
1708 | }; | 730 | }; |
1709 | 731 | ||
1710 | /* I2C1 */ | 732 | /* I2C1 */ |
1711 | |||
1712 | static struct omap_i2c_dev_attr i2c1_dev_attr = { | 733 | static struct omap_i2c_dev_attr i2c1_dev_attr = { |
1713 | .fifo_depth = 8, /* bytes */ | 734 | .fifo_depth = 8, /* bytes */ |
1714 | .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 | | 735 | .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 | |
@@ -1716,10 +737,6 @@ static struct omap_i2c_dev_attr i2c1_dev_attr = { | |||
1716 | OMAP_I2C_FLAG_BUS_SHIFT_2, | 737 | OMAP_I2C_FLAG_BUS_SHIFT_2, |
1717 | }; | 738 | }; |
1718 | 739 | ||
1719 | static struct omap_hwmod_ocp_if *omap3xxx_i2c1_slaves[] = { | ||
1720 | &omap3_l4_core__i2c1, | ||
1721 | }; | ||
1722 | |||
1723 | static struct omap_hwmod omap3xxx_i2c1_hwmod = { | 740 | static struct omap_hwmod omap3xxx_i2c1_hwmod = { |
1724 | .name = "i2c1", | 741 | .name = "i2c1", |
1725 | .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT, | 742 | .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT, |
@@ -1735,14 +752,11 @@ static struct omap_hwmod omap3xxx_i2c1_hwmod = { | |||
1735 | .idlest_idle_bit = OMAP3430_ST_I2C1_SHIFT, | 752 | .idlest_idle_bit = OMAP3430_ST_I2C1_SHIFT, |
1736 | }, | 753 | }, |
1737 | }, | 754 | }, |
1738 | .slaves = omap3xxx_i2c1_slaves, | ||
1739 | .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c1_slaves), | ||
1740 | .class = &i2c_class, | 755 | .class = &i2c_class, |
1741 | .dev_attr = &i2c1_dev_attr, | 756 | .dev_attr = &i2c1_dev_attr, |
1742 | }; | 757 | }; |
1743 | 758 | ||
1744 | /* I2C2 */ | 759 | /* I2C2 */ |
1745 | |||
1746 | static struct omap_i2c_dev_attr i2c2_dev_attr = { | 760 | static struct omap_i2c_dev_attr i2c2_dev_attr = { |
1747 | .fifo_depth = 8, /* bytes */ | 761 | .fifo_depth = 8, /* bytes */ |
1748 | .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 | | 762 | .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 | |
@@ -1750,10 +764,6 @@ static struct omap_i2c_dev_attr i2c2_dev_attr = { | |||
1750 | OMAP_I2C_FLAG_BUS_SHIFT_2, | 764 | OMAP_I2C_FLAG_BUS_SHIFT_2, |
1751 | }; | 765 | }; |
1752 | 766 | ||
1753 | static struct omap_hwmod_ocp_if *omap3xxx_i2c2_slaves[] = { | ||
1754 | &omap3_l4_core__i2c2, | ||
1755 | }; | ||
1756 | |||
1757 | static struct omap_hwmod omap3xxx_i2c2_hwmod = { | 767 | static struct omap_hwmod omap3xxx_i2c2_hwmod = { |
1758 | .name = "i2c2", | 768 | .name = "i2c2", |
1759 | .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT, | 769 | .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT, |
@@ -1769,14 +779,11 @@ static struct omap_hwmod omap3xxx_i2c2_hwmod = { | |||
1769 | .idlest_idle_bit = OMAP3430_ST_I2C2_SHIFT, | 779 | .idlest_idle_bit = OMAP3430_ST_I2C2_SHIFT, |
1770 | }, | 780 | }, |
1771 | }, | 781 | }, |
1772 | .slaves = omap3xxx_i2c2_slaves, | ||
1773 | .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c2_slaves), | ||
1774 | .class = &i2c_class, | 782 | .class = &i2c_class, |
1775 | .dev_attr = &i2c2_dev_attr, | 783 | .dev_attr = &i2c2_dev_attr, |
1776 | }; | 784 | }; |
1777 | 785 | ||
1778 | /* I2C3 */ | 786 | /* I2C3 */ |
1779 | |||
1780 | static struct omap_i2c_dev_attr i2c3_dev_attr = { | 787 | static struct omap_i2c_dev_attr i2c3_dev_attr = { |
1781 | .fifo_depth = 64, /* bytes */ | 788 | .fifo_depth = 64, /* bytes */ |
1782 | .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 | | 789 | .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 | |
@@ -1795,10 +802,6 @@ static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = { | |||
1795 | { .dma_req = -1 } | 802 | { .dma_req = -1 } |
1796 | }; | 803 | }; |
1797 | 804 | ||
1798 | static struct omap_hwmod_ocp_if *omap3xxx_i2c3_slaves[] = { | ||
1799 | &omap3_l4_core__i2c3, | ||
1800 | }; | ||
1801 | |||
1802 | static struct omap_hwmod omap3xxx_i2c3_hwmod = { | 805 | static struct omap_hwmod omap3xxx_i2c3_hwmod = { |
1803 | .name = "i2c3", | 806 | .name = "i2c3", |
1804 | .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT, | 807 | .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT, |
@@ -1814,114 +817,10 @@ static struct omap_hwmod omap3xxx_i2c3_hwmod = { | |||
1814 | .idlest_idle_bit = OMAP3430_ST_I2C3_SHIFT, | 817 | .idlest_idle_bit = OMAP3430_ST_I2C3_SHIFT, |
1815 | }, | 818 | }, |
1816 | }, | 819 | }, |
1817 | .slaves = omap3xxx_i2c3_slaves, | ||
1818 | .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c3_slaves), | ||
1819 | .class = &i2c_class, | 820 | .class = &i2c_class, |
1820 | .dev_attr = &i2c3_dev_attr, | 821 | .dev_attr = &i2c3_dev_attr, |
1821 | }; | 822 | }; |
1822 | 823 | ||
1823 | /* l4_wkup -> gpio1 */ | ||
1824 | static struct omap_hwmod_addr_space omap3xxx_gpio1_addrs[] = { | ||
1825 | { | ||
1826 | .pa_start = 0x48310000, | ||
1827 | .pa_end = 0x483101ff, | ||
1828 | .flags = ADDR_TYPE_RT | ||
1829 | }, | ||
1830 | { } | ||
1831 | }; | ||
1832 | |||
1833 | static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = { | ||
1834 | .master = &omap3xxx_l4_wkup_hwmod, | ||
1835 | .slave = &omap3xxx_gpio1_hwmod, | ||
1836 | .addr = omap3xxx_gpio1_addrs, | ||
1837 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1838 | }; | ||
1839 | |||
1840 | /* l4_per -> gpio2 */ | ||
1841 | static struct omap_hwmod_addr_space omap3xxx_gpio2_addrs[] = { | ||
1842 | { | ||
1843 | .pa_start = 0x49050000, | ||
1844 | .pa_end = 0x490501ff, | ||
1845 | .flags = ADDR_TYPE_RT | ||
1846 | }, | ||
1847 | { } | ||
1848 | }; | ||
1849 | |||
1850 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = { | ||
1851 | .master = &omap3xxx_l4_per_hwmod, | ||
1852 | .slave = &omap3xxx_gpio2_hwmod, | ||
1853 | .addr = omap3xxx_gpio2_addrs, | ||
1854 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1855 | }; | ||
1856 | |||
1857 | /* l4_per -> gpio3 */ | ||
1858 | static struct omap_hwmod_addr_space omap3xxx_gpio3_addrs[] = { | ||
1859 | { | ||
1860 | .pa_start = 0x49052000, | ||
1861 | .pa_end = 0x490521ff, | ||
1862 | .flags = ADDR_TYPE_RT | ||
1863 | }, | ||
1864 | { } | ||
1865 | }; | ||
1866 | |||
1867 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = { | ||
1868 | .master = &omap3xxx_l4_per_hwmod, | ||
1869 | .slave = &omap3xxx_gpio3_hwmod, | ||
1870 | .addr = omap3xxx_gpio3_addrs, | ||
1871 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1872 | }; | ||
1873 | |||
1874 | /* l4_per -> gpio4 */ | ||
1875 | static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = { | ||
1876 | { | ||
1877 | .pa_start = 0x49054000, | ||
1878 | .pa_end = 0x490541ff, | ||
1879 | .flags = ADDR_TYPE_RT | ||
1880 | }, | ||
1881 | { } | ||
1882 | }; | ||
1883 | |||
1884 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = { | ||
1885 | .master = &omap3xxx_l4_per_hwmod, | ||
1886 | .slave = &omap3xxx_gpio4_hwmod, | ||
1887 | .addr = omap3xxx_gpio4_addrs, | ||
1888 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1889 | }; | ||
1890 | |||
1891 | /* l4_per -> gpio5 */ | ||
1892 | static struct omap_hwmod_addr_space omap3xxx_gpio5_addrs[] = { | ||
1893 | { | ||
1894 | .pa_start = 0x49056000, | ||
1895 | .pa_end = 0x490561ff, | ||
1896 | .flags = ADDR_TYPE_RT | ||
1897 | }, | ||
1898 | { } | ||
1899 | }; | ||
1900 | |||
1901 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = { | ||
1902 | .master = &omap3xxx_l4_per_hwmod, | ||
1903 | .slave = &omap3xxx_gpio5_hwmod, | ||
1904 | .addr = omap3xxx_gpio5_addrs, | ||
1905 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1906 | }; | ||
1907 | |||
1908 | /* l4_per -> gpio6 */ | ||
1909 | static struct omap_hwmod_addr_space omap3xxx_gpio6_addrs[] = { | ||
1910 | { | ||
1911 | .pa_start = 0x49058000, | ||
1912 | .pa_end = 0x490581ff, | ||
1913 | .flags = ADDR_TYPE_RT | ||
1914 | }, | ||
1915 | { } | ||
1916 | }; | ||
1917 | |||
1918 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = { | ||
1919 | .master = &omap3xxx_l4_per_hwmod, | ||
1920 | .slave = &omap3xxx_gpio6_hwmod, | ||
1921 | .addr = omap3xxx_gpio6_addrs, | ||
1922 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1923 | }; | ||
1924 | |||
1925 | /* | 824 | /* |
1926 | * 'gpio' class | 825 | * 'gpio' class |
1927 | * general purpose io module | 826 | * general purpose io module |
@@ -1944,7 +843,7 @@ static struct omap_hwmod_class omap3xxx_gpio_hwmod_class = { | |||
1944 | .rev = 1, | 843 | .rev = 1, |
1945 | }; | 844 | }; |
1946 | 845 | ||
1947 | /* gpio_dev_attr*/ | 846 | /* gpio_dev_attr */ |
1948 | static struct omap_gpio_dev_attr gpio_dev_attr = { | 847 | static struct omap_gpio_dev_attr gpio_dev_attr = { |
1949 | .bank_width = 32, | 848 | .bank_width = 32, |
1950 | .dbck_flag = true, | 849 | .dbck_flag = true, |
@@ -1955,10 +854,6 @@ static struct omap_hwmod_opt_clk gpio1_opt_clks[] = { | |||
1955 | { .role = "dbclk", .clk = "gpio1_dbck", }, | 854 | { .role = "dbclk", .clk = "gpio1_dbck", }, |
1956 | }; | 855 | }; |
1957 | 856 | ||
1958 | static struct omap_hwmod_ocp_if *omap3xxx_gpio1_slaves[] = { | ||
1959 | &omap3xxx_l4_wkup__gpio1, | ||
1960 | }; | ||
1961 | |||
1962 | static struct omap_hwmod omap3xxx_gpio1_hwmod = { | 857 | static struct omap_hwmod omap3xxx_gpio1_hwmod = { |
1963 | .name = "gpio1", | 858 | .name = "gpio1", |
1964 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | 859 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
@@ -1975,8 +870,6 @@ static struct omap_hwmod omap3xxx_gpio1_hwmod = { | |||
1975 | .idlest_idle_bit = OMAP3430_ST_GPIO1_SHIFT, | 870 | .idlest_idle_bit = OMAP3430_ST_GPIO1_SHIFT, |
1976 | }, | 871 | }, |
1977 | }, | 872 | }, |
1978 | .slaves = omap3xxx_gpio1_slaves, | ||
1979 | .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio1_slaves), | ||
1980 | .class = &omap3xxx_gpio_hwmod_class, | 873 | .class = &omap3xxx_gpio_hwmod_class, |
1981 | .dev_attr = &gpio_dev_attr, | 874 | .dev_attr = &gpio_dev_attr, |
1982 | }; | 875 | }; |
@@ -1986,10 +879,6 @@ static struct omap_hwmod_opt_clk gpio2_opt_clks[] = { | |||
1986 | { .role = "dbclk", .clk = "gpio2_dbck", }, | 879 | { .role = "dbclk", .clk = "gpio2_dbck", }, |
1987 | }; | 880 | }; |
1988 | 881 | ||
1989 | static struct omap_hwmod_ocp_if *omap3xxx_gpio2_slaves[] = { | ||
1990 | &omap3xxx_l4_per__gpio2, | ||
1991 | }; | ||
1992 | |||
1993 | static struct omap_hwmod omap3xxx_gpio2_hwmod = { | 882 | static struct omap_hwmod omap3xxx_gpio2_hwmod = { |
1994 | .name = "gpio2", | 883 | .name = "gpio2", |
1995 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | 884 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
@@ -2006,8 +895,6 @@ static struct omap_hwmod omap3xxx_gpio2_hwmod = { | |||
2006 | .idlest_idle_bit = OMAP3430_ST_GPIO2_SHIFT, | 895 | .idlest_idle_bit = OMAP3430_ST_GPIO2_SHIFT, |
2007 | }, | 896 | }, |
2008 | }, | 897 | }, |
2009 | .slaves = omap3xxx_gpio2_slaves, | ||
2010 | .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio2_slaves), | ||
2011 | .class = &omap3xxx_gpio_hwmod_class, | 898 | .class = &omap3xxx_gpio_hwmod_class, |
2012 | .dev_attr = &gpio_dev_attr, | 899 | .dev_attr = &gpio_dev_attr, |
2013 | }; | 900 | }; |
@@ -2017,10 +904,6 @@ static struct omap_hwmod_opt_clk gpio3_opt_clks[] = { | |||
2017 | { .role = "dbclk", .clk = "gpio3_dbck", }, | 904 | { .role = "dbclk", .clk = "gpio3_dbck", }, |
2018 | }; | 905 | }; |
2019 | 906 | ||
2020 | static struct omap_hwmod_ocp_if *omap3xxx_gpio3_slaves[] = { | ||
2021 | &omap3xxx_l4_per__gpio3, | ||
2022 | }; | ||
2023 | |||
2024 | static struct omap_hwmod omap3xxx_gpio3_hwmod = { | 907 | static struct omap_hwmod omap3xxx_gpio3_hwmod = { |
2025 | .name = "gpio3", | 908 | .name = "gpio3", |
2026 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | 909 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
@@ -2037,8 +920,6 @@ static struct omap_hwmod omap3xxx_gpio3_hwmod = { | |||
2037 | .idlest_idle_bit = OMAP3430_ST_GPIO3_SHIFT, | 920 | .idlest_idle_bit = OMAP3430_ST_GPIO3_SHIFT, |
2038 | }, | 921 | }, |
2039 | }, | 922 | }, |
2040 | .slaves = omap3xxx_gpio3_slaves, | ||
2041 | .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio3_slaves), | ||
2042 | .class = &omap3xxx_gpio_hwmod_class, | 923 | .class = &omap3xxx_gpio_hwmod_class, |
2043 | .dev_attr = &gpio_dev_attr, | 924 | .dev_attr = &gpio_dev_attr, |
2044 | }; | 925 | }; |
@@ -2048,10 +929,6 @@ static struct omap_hwmod_opt_clk gpio4_opt_clks[] = { | |||
2048 | { .role = "dbclk", .clk = "gpio4_dbck", }, | 929 | { .role = "dbclk", .clk = "gpio4_dbck", }, |
2049 | }; | 930 | }; |
2050 | 931 | ||
2051 | static struct omap_hwmod_ocp_if *omap3xxx_gpio4_slaves[] = { | ||
2052 | &omap3xxx_l4_per__gpio4, | ||
2053 | }; | ||
2054 | |||
2055 | static struct omap_hwmod omap3xxx_gpio4_hwmod = { | 932 | static struct omap_hwmod omap3xxx_gpio4_hwmod = { |
2056 | .name = "gpio4", | 933 | .name = "gpio4", |
2057 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | 934 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
@@ -2068,8 +945,6 @@ static struct omap_hwmod omap3xxx_gpio4_hwmod = { | |||
2068 | .idlest_idle_bit = OMAP3430_ST_GPIO4_SHIFT, | 945 | .idlest_idle_bit = OMAP3430_ST_GPIO4_SHIFT, |
2069 | }, | 946 | }, |
2070 | }, | 947 | }, |
2071 | .slaves = omap3xxx_gpio4_slaves, | ||
2072 | .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio4_slaves), | ||
2073 | .class = &omap3xxx_gpio_hwmod_class, | 948 | .class = &omap3xxx_gpio_hwmod_class, |
2074 | .dev_attr = &gpio_dev_attr, | 949 | .dev_attr = &gpio_dev_attr, |
2075 | }; | 950 | }; |
@@ -2084,10 +959,6 @@ static struct omap_hwmod_opt_clk gpio5_opt_clks[] = { | |||
2084 | { .role = "dbclk", .clk = "gpio5_dbck", }, | 959 | { .role = "dbclk", .clk = "gpio5_dbck", }, |
2085 | }; | 960 | }; |
2086 | 961 | ||
2087 | static struct omap_hwmod_ocp_if *omap3xxx_gpio5_slaves[] = { | ||
2088 | &omap3xxx_l4_per__gpio5, | ||
2089 | }; | ||
2090 | |||
2091 | static struct omap_hwmod omap3xxx_gpio5_hwmod = { | 962 | static struct omap_hwmod omap3xxx_gpio5_hwmod = { |
2092 | .name = "gpio5", | 963 | .name = "gpio5", |
2093 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | 964 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
@@ -2104,8 +975,6 @@ static struct omap_hwmod omap3xxx_gpio5_hwmod = { | |||
2104 | .idlest_idle_bit = OMAP3430_ST_GPIO5_SHIFT, | 975 | .idlest_idle_bit = OMAP3430_ST_GPIO5_SHIFT, |
2105 | }, | 976 | }, |
2106 | }, | 977 | }, |
2107 | .slaves = omap3xxx_gpio5_slaves, | ||
2108 | .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio5_slaves), | ||
2109 | .class = &omap3xxx_gpio_hwmod_class, | 978 | .class = &omap3xxx_gpio_hwmod_class, |
2110 | .dev_attr = &gpio_dev_attr, | 979 | .dev_attr = &gpio_dev_attr, |
2111 | }; | 980 | }; |
@@ -2120,10 +989,6 @@ static struct omap_hwmod_opt_clk gpio6_opt_clks[] = { | |||
2120 | { .role = "dbclk", .clk = "gpio6_dbck", }, | 989 | { .role = "dbclk", .clk = "gpio6_dbck", }, |
2121 | }; | 990 | }; |
2122 | 991 | ||
2123 | static struct omap_hwmod_ocp_if *omap3xxx_gpio6_slaves[] = { | ||
2124 | &omap3xxx_l4_per__gpio6, | ||
2125 | }; | ||
2126 | |||
2127 | static struct omap_hwmod omap3xxx_gpio6_hwmod = { | 992 | static struct omap_hwmod omap3xxx_gpio6_hwmod = { |
2128 | .name = "gpio6", | 993 | .name = "gpio6", |
2129 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | 994 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
@@ -2140,20 +1005,10 @@ static struct omap_hwmod omap3xxx_gpio6_hwmod = { | |||
2140 | .idlest_idle_bit = OMAP3430_ST_GPIO6_SHIFT, | 1005 | .idlest_idle_bit = OMAP3430_ST_GPIO6_SHIFT, |
2141 | }, | 1006 | }, |
2142 | }, | 1007 | }, |
2143 | .slaves = omap3xxx_gpio6_slaves, | ||
2144 | .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio6_slaves), | ||
2145 | .class = &omap3xxx_gpio_hwmod_class, | 1008 | .class = &omap3xxx_gpio_hwmod_class, |
2146 | .dev_attr = &gpio_dev_attr, | 1009 | .dev_attr = &gpio_dev_attr, |
2147 | }; | 1010 | }; |
2148 | 1011 | ||
2149 | /* dma_system -> L3 */ | ||
2150 | static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = { | ||
2151 | .master = &omap3xxx_dma_system_hwmod, | ||
2152 | .slave = &omap3xxx_l3_main_hwmod, | ||
2153 | .clk = "core_l3_ick", | ||
2154 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2155 | }; | ||
2156 | |||
2157 | /* dma attributes */ | 1012 | /* dma attributes */ |
2158 | static struct omap_dma_dev_attr dma_dev_attr = { | 1013 | static struct omap_dma_dev_attr dma_dev_attr = { |
2159 | .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY | | 1014 | .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY | |
@@ -2180,34 +1035,6 @@ static struct omap_hwmod_class omap3xxx_dma_hwmod_class = { | |||
2180 | }; | 1035 | }; |
2181 | 1036 | ||
2182 | /* dma_system */ | 1037 | /* dma_system */ |
2183 | static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = { | ||
2184 | { | ||
2185 | .pa_start = 0x48056000, | ||
2186 | .pa_end = 0x48056fff, | ||
2187 | .flags = ADDR_TYPE_RT | ||
2188 | }, | ||
2189 | { } | ||
2190 | }; | ||
2191 | |||
2192 | /* dma_system master ports */ | ||
2193 | static struct omap_hwmod_ocp_if *omap3xxx_dma_system_masters[] = { | ||
2194 | &omap3xxx_dma_system__l3, | ||
2195 | }; | ||
2196 | |||
2197 | /* l4_cfg -> dma_system */ | ||
2198 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = { | ||
2199 | .master = &omap3xxx_l4_core_hwmod, | ||
2200 | .slave = &omap3xxx_dma_system_hwmod, | ||
2201 | .clk = "core_l4_ick", | ||
2202 | .addr = omap3xxx_dma_system_addrs, | ||
2203 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2204 | }; | ||
2205 | |||
2206 | /* dma_system slave ports */ | ||
2207 | static struct omap_hwmod_ocp_if *omap3xxx_dma_system_slaves[] = { | ||
2208 | &omap3xxx_l4_core__dma_system, | ||
2209 | }; | ||
2210 | |||
2211 | static struct omap_hwmod omap3xxx_dma_system_hwmod = { | 1038 | static struct omap_hwmod omap3xxx_dma_system_hwmod = { |
2212 | .name = "dma", | 1039 | .name = "dma", |
2213 | .class = &omap3xxx_dma_hwmod_class, | 1040 | .class = &omap3xxx_dma_hwmod_class, |
@@ -2222,10 +1049,6 @@ static struct omap_hwmod omap3xxx_dma_system_hwmod = { | |||
2222 | .idlest_idle_bit = OMAP3430_ST_SDMA_SHIFT, | 1049 | .idlest_idle_bit = OMAP3430_ST_SDMA_SHIFT, |
2223 | }, | 1050 | }, |
2224 | }, | 1051 | }, |
2225 | .slaves = omap3xxx_dma_system_slaves, | ||
2226 | .slaves_cnt = ARRAY_SIZE(omap3xxx_dma_system_slaves), | ||
2227 | .masters = omap3xxx_dma_system_masters, | ||
2228 | .masters_cnt = ARRAY_SIZE(omap3xxx_dma_system_masters), | ||
2229 | .dev_attr = &dma_dev_attr, | 1052 | .dev_attr = &dma_dev_attr, |
2230 | .flags = HWMOD_NO_IDLEST, | 1053 | .flags = HWMOD_NO_IDLEST, |
2231 | }; | 1054 | }; |
@@ -2258,30 +1081,6 @@ static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = { | |||
2258 | { .irq = -1 } | 1081 | { .irq = -1 } |
2259 | }; | 1082 | }; |
2260 | 1083 | ||
2261 | static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = { | ||
2262 | { | ||
2263 | .name = "mpu", | ||
2264 | .pa_start = 0x48074000, | ||
2265 | .pa_end = 0x480740ff, | ||
2266 | .flags = ADDR_TYPE_RT | ||
2267 | }, | ||
2268 | { } | ||
2269 | }; | ||
2270 | |||
2271 | /* l4_core -> mcbsp1 */ | ||
2272 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = { | ||
2273 | .master = &omap3xxx_l4_core_hwmod, | ||
2274 | .slave = &omap3xxx_mcbsp1_hwmod, | ||
2275 | .clk = "mcbsp1_ick", | ||
2276 | .addr = omap3xxx_mcbsp1_addrs, | ||
2277 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2278 | }; | ||
2279 | |||
2280 | /* mcbsp1 slave ports */ | ||
2281 | static struct omap_hwmod_ocp_if *omap3xxx_mcbsp1_slaves[] = { | ||
2282 | &omap3xxx_l4_core__mcbsp1, | ||
2283 | }; | ||
2284 | |||
2285 | static struct omap_hwmod omap3xxx_mcbsp1_hwmod = { | 1084 | static struct omap_hwmod omap3xxx_mcbsp1_hwmod = { |
2286 | .name = "mcbsp1", | 1085 | .name = "mcbsp1", |
2287 | .class = &omap3xxx_mcbsp_hwmod_class, | 1086 | .class = &omap3xxx_mcbsp_hwmod_class, |
@@ -2297,8 +1096,6 @@ static struct omap_hwmod omap3xxx_mcbsp1_hwmod = { | |||
2297 | .idlest_idle_bit = OMAP3430_ST_MCBSP1_SHIFT, | 1096 | .idlest_idle_bit = OMAP3430_ST_MCBSP1_SHIFT, |
2298 | }, | 1097 | }, |
2299 | }, | 1098 | }, |
2300 | .slaves = omap3xxx_mcbsp1_slaves, | ||
2301 | .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp1_slaves), | ||
2302 | }; | 1099 | }; |
2303 | 1100 | ||
2304 | /* mcbsp2 */ | 1101 | /* mcbsp2 */ |
@@ -2309,30 +1106,6 @@ static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = { | |||
2309 | { .irq = -1 } | 1106 | { .irq = -1 } |
2310 | }; | 1107 | }; |
2311 | 1108 | ||
2312 | static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = { | ||
2313 | { | ||
2314 | .name = "mpu", | ||
2315 | .pa_start = 0x49022000, | ||
2316 | .pa_end = 0x490220ff, | ||
2317 | .flags = ADDR_TYPE_RT | ||
2318 | }, | ||
2319 | { } | ||
2320 | }; | ||
2321 | |||
2322 | /* l4_per -> mcbsp2 */ | ||
2323 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = { | ||
2324 | .master = &omap3xxx_l4_per_hwmod, | ||
2325 | .slave = &omap3xxx_mcbsp2_hwmod, | ||
2326 | .clk = "mcbsp2_ick", | ||
2327 | .addr = omap3xxx_mcbsp2_addrs, | ||
2328 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2329 | }; | ||
2330 | |||
2331 | /* mcbsp2 slave ports */ | ||
2332 | static struct omap_hwmod_ocp_if *omap3xxx_mcbsp2_slaves[] = { | ||
2333 | &omap3xxx_l4_per__mcbsp2, | ||
2334 | }; | ||
2335 | |||
2336 | static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = { | 1109 | static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = { |
2337 | .sidetone = "mcbsp2_sidetone", | 1110 | .sidetone = "mcbsp2_sidetone", |
2338 | }; | 1111 | }; |
@@ -2352,8 +1125,6 @@ static struct omap_hwmod omap3xxx_mcbsp2_hwmod = { | |||
2352 | .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT, | 1125 | .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT, |
2353 | }, | 1126 | }, |
2354 | }, | 1127 | }, |
2355 | .slaves = omap3xxx_mcbsp2_slaves, | ||
2356 | .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_slaves), | ||
2357 | .dev_attr = &omap34xx_mcbsp2_dev_attr, | 1128 | .dev_attr = &omap34xx_mcbsp2_dev_attr, |
2358 | }; | 1129 | }; |
2359 | 1130 | ||
@@ -2365,32 +1136,8 @@ static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = { | |||
2365 | { .irq = -1 } | 1136 | { .irq = -1 } |
2366 | }; | 1137 | }; |
2367 | 1138 | ||
2368 | static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = { | ||
2369 | { | ||
2370 | .name = "mpu", | ||
2371 | .pa_start = 0x49024000, | ||
2372 | .pa_end = 0x490240ff, | ||
2373 | .flags = ADDR_TYPE_RT | ||
2374 | }, | ||
2375 | { } | ||
2376 | }; | ||
2377 | |||
2378 | /* l4_per -> mcbsp3 */ | ||
2379 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = { | ||
2380 | .master = &omap3xxx_l4_per_hwmod, | ||
2381 | .slave = &omap3xxx_mcbsp3_hwmod, | ||
2382 | .clk = "mcbsp3_ick", | ||
2383 | .addr = omap3xxx_mcbsp3_addrs, | ||
2384 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2385 | }; | ||
2386 | |||
2387 | /* mcbsp3 slave ports */ | ||
2388 | static struct omap_hwmod_ocp_if *omap3xxx_mcbsp3_slaves[] = { | ||
2389 | &omap3xxx_l4_per__mcbsp3, | ||
2390 | }; | ||
2391 | |||
2392 | static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = { | 1139 | static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = { |
2393 | .sidetone = "mcbsp3_sidetone", | 1140 | .sidetone = "mcbsp3_sidetone", |
2394 | }; | 1141 | }; |
2395 | 1142 | ||
2396 | static struct omap_hwmod omap3xxx_mcbsp3_hwmod = { | 1143 | static struct omap_hwmod omap3xxx_mcbsp3_hwmod = { |
@@ -2408,8 +1155,6 @@ static struct omap_hwmod omap3xxx_mcbsp3_hwmod = { | |||
2408 | .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT, | 1155 | .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT, |
2409 | }, | 1156 | }, |
2410 | }, | 1157 | }, |
2411 | .slaves = omap3xxx_mcbsp3_slaves, | ||
2412 | .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_slaves), | ||
2413 | .dev_attr = &omap34xx_mcbsp3_dev_attr, | 1158 | .dev_attr = &omap34xx_mcbsp3_dev_attr, |
2414 | }; | 1159 | }; |
2415 | 1160 | ||
@@ -2427,30 +1172,6 @@ static struct omap_hwmod_dma_info omap3xxx_mcbsp4_sdma_chs[] = { | |||
2427 | { .dma_req = -1 } | 1172 | { .dma_req = -1 } |
2428 | }; | 1173 | }; |
2429 | 1174 | ||
2430 | static struct omap_hwmod_addr_space omap3xxx_mcbsp4_addrs[] = { | ||
2431 | { | ||
2432 | .name = "mpu", | ||
2433 | .pa_start = 0x49026000, | ||
2434 | .pa_end = 0x490260ff, | ||
2435 | .flags = ADDR_TYPE_RT | ||
2436 | }, | ||
2437 | { } | ||
2438 | }; | ||
2439 | |||
2440 | /* l4_per -> mcbsp4 */ | ||
2441 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = { | ||
2442 | .master = &omap3xxx_l4_per_hwmod, | ||
2443 | .slave = &omap3xxx_mcbsp4_hwmod, | ||
2444 | .clk = "mcbsp4_ick", | ||
2445 | .addr = omap3xxx_mcbsp4_addrs, | ||
2446 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2447 | }; | ||
2448 | |||
2449 | /* mcbsp4 slave ports */ | ||
2450 | static struct omap_hwmod_ocp_if *omap3xxx_mcbsp4_slaves[] = { | ||
2451 | &omap3xxx_l4_per__mcbsp4, | ||
2452 | }; | ||
2453 | |||
2454 | static struct omap_hwmod omap3xxx_mcbsp4_hwmod = { | 1175 | static struct omap_hwmod omap3xxx_mcbsp4_hwmod = { |
2455 | .name = "mcbsp4", | 1176 | .name = "mcbsp4", |
2456 | .class = &omap3xxx_mcbsp_hwmod_class, | 1177 | .class = &omap3xxx_mcbsp_hwmod_class, |
@@ -2466,8 +1187,6 @@ static struct omap_hwmod omap3xxx_mcbsp4_hwmod = { | |||
2466 | .idlest_idle_bit = OMAP3430_ST_MCBSP4_SHIFT, | 1187 | .idlest_idle_bit = OMAP3430_ST_MCBSP4_SHIFT, |
2467 | }, | 1188 | }, |
2468 | }, | 1189 | }, |
2469 | .slaves = omap3xxx_mcbsp4_slaves, | ||
2470 | .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp4_slaves), | ||
2471 | }; | 1190 | }; |
2472 | 1191 | ||
2473 | /* mcbsp5 */ | 1192 | /* mcbsp5 */ |
@@ -2484,30 +1203,6 @@ static struct omap_hwmod_dma_info omap3xxx_mcbsp5_sdma_chs[] = { | |||
2484 | { .dma_req = -1 } | 1203 | { .dma_req = -1 } |
2485 | }; | 1204 | }; |
2486 | 1205 | ||
2487 | static struct omap_hwmod_addr_space omap3xxx_mcbsp5_addrs[] = { | ||
2488 | { | ||
2489 | .name = "mpu", | ||
2490 | .pa_start = 0x48096000, | ||
2491 | .pa_end = 0x480960ff, | ||
2492 | .flags = ADDR_TYPE_RT | ||
2493 | }, | ||
2494 | { } | ||
2495 | }; | ||
2496 | |||
2497 | /* l4_core -> mcbsp5 */ | ||
2498 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = { | ||
2499 | .master = &omap3xxx_l4_core_hwmod, | ||
2500 | .slave = &omap3xxx_mcbsp5_hwmod, | ||
2501 | .clk = "mcbsp5_ick", | ||
2502 | .addr = omap3xxx_mcbsp5_addrs, | ||
2503 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2504 | }; | ||
2505 | |||
2506 | /* mcbsp5 slave ports */ | ||
2507 | static struct omap_hwmod_ocp_if *omap3xxx_mcbsp5_slaves[] = { | ||
2508 | &omap3xxx_l4_core__mcbsp5, | ||
2509 | }; | ||
2510 | |||
2511 | static struct omap_hwmod omap3xxx_mcbsp5_hwmod = { | 1206 | static struct omap_hwmod omap3xxx_mcbsp5_hwmod = { |
2512 | .name = "mcbsp5", | 1207 | .name = "mcbsp5", |
2513 | .class = &omap3xxx_mcbsp_hwmod_class, | 1208 | .class = &omap3xxx_mcbsp_hwmod_class, |
@@ -2523,11 +1218,9 @@ static struct omap_hwmod omap3xxx_mcbsp5_hwmod = { | |||
2523 | .idlest_idle_bit = OMAP3430_ST_MCBSP5_SHIFT, | 1218 | .idlest_idle_bit = OMAP3430_ST_MCBSP5_SHIFT, |
2524 | }, | 1219 | }, |
2525 | }, | 1220 | }, |
2526 | .slaves = omap3xxx_mcbsp5_slaves, | ||
2527 | .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp5_slaves), | ||
2528 | }; | 1221 | }; |
2529 | /* 'mcbsp sidetone' class */ | ||
2530 | 1222 | ||
1223 | /* 'mcbsp sidetone' class */ | ||
2531 | static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sidetone_sysc = { | 1224 | static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sidetone_sysc = { |
2532 | .sysc_offs = 0x0010, | 1225 | .sysc_offs = 0x0010, |
2533 | .sysc_flags = SYSC_HAS_AUTOIDLE, | 1226 | .sysc_flags = SYSC_HAS_AUTOIDLE, |
@@ -2545,30 +1238,6 @@ static struct omap_hwmod_irq_info omap3xxx_mcbsp2_sidetone_irqs[] = { | |||
2545 | { .irq = -1 } | 1238 | { .irq = -1 } |
2546 | }; | 1239 | }; |
2547 | 1240 | ||
2548 | static struct omap_hwmod_addr_space omap3xxx_mcbsp2_sidetone_addrs[] = { | ||
2549 | { | ||
2550 | .name = "sidetone", | ||
2551 | .pa_start = 0x49028000, | ||
2552 | .pa_end = 0x490280ff, | ||
2553 | .flags = ADDR_TYPE_RT | ||
2554 | }, | ||
2555 | { } | ||
2556 | }; | ||
2557 | |||
2558 | /* l4_per -> mcbsp2_sidetone */ | ||
2559 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = { | ||
2560 | .master = &omap3xxx_l4_per_hwmod, | ||
2561 | .slave = &omap3xxx_mcbsp2_sidetone_hwmod, | ||
2562 | .clk = "mcbsp2_ick", | ||
2563 | .addr = omap3xxx_mcbsp2_sidetone_addrs, | ||
2564 | .user = OCP_USER_MPU, | ||
2565 | }; | ||
2566 | |||
2567 | /* mcbsp2_sidetone slave ports */ | ||
2568 | static struct omap_hwmod_ocp_if *omap3xxx_mcbsp2_sidetone_slaves[] = { | ||
2569 | &omap3xxx_l4_per__mcbsp2_sidetone, | ||
2570 | }; | ||
2571 | |||
2572 | static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = { | 1241 | static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = { |
2573 | .name = "mcbsp2_sidetone", | 1242 | .name = "mcbsp2_sidetone", |
2574 | .class = &omap3xxx_mcbsp_sidetone_hwmod_class, | 1243 | .class = &omap3xxx_mcbsp_sidetone_hwmod_class, |
@@ -2583,8 +1252,6 @@ static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = { | |||
2583 | .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT, | 1252 | .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT, |
2584 | }, | 1253 | }, |
2585 | }, | 1254 | }, |
2586 | .slaves = omap3xxx_mcbsp2_sidetone_slaves, | ||
2587 | .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_sidetone_slaves), | ||
2588 | }; | 1255 | }; |
2589 | 1256 | ||
2590 | /* mcbsp3_sidetone */ | 1257 | /* mcbsp3_sidetone */ |
@@ -2593,30 +1260,6 @@ static struct omap_hwmod_irq_info omap3xxx_mcbsp3_sidetone_irqs[] = { | |||
2593 | { .irq = -1 } | 1260 | { .irq = -1 } |
2594 | }; | 1261 | }; |
2595 | 1262 | ||
2596 | static struct omap_hwmod_addr_space omap3xxx_mcbsp3_sidetone_addrs[] = { | ||
2597 | { | ||
2598 | .name = "sidetone", | ||
2599 | .pa_start = 0x4902A000, | ||
2600 | .pa_end = 0x4902A0ff, | ||
2601 | .flags = ADDR_TYPE_RT | ||
2602 | }, | ||
2603 | { } | ||
2604 | }; | ||
2605 | |||
2606 | /* l4_per -> mcbsp3_sidetone */ | ||
2607 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = { | ||
2608 | .master = &omap3xxx_l4_per_hwmod, | ||
2609 | .slave = &omap3xxx_mcbsp3_sidetone_hwmod, | ||
2610 | .clk = "mcbsp3_ick", | ||
2611 | .addr = omap3xxx_mcbsp3_sidetone_addrs, | ||
2612 | .user = OCP_USER_MPU, | ||
2613 | }; | ||
2614 | |||
2615 | /* mcbsp3_sidetone slave ports */ | ||
2616 | static struct omap_hwmod_ocp_if *omap3xxx_mcbsp3_sidetone_slaves[] = { | ||
2617 | &omap3xxx_l4_per__mcbsp3_sidetone, | ||
2618 | }; | ||
2619 | |||
2620 | static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = { | 1263 | static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = { |
2621 | .name = "mcbsp3_sidetone", | 1264 | .name = "mcbsp3_sidetone", |
2622 | .class = &omap3xxx_mcbsp_sidetone_hwmod_class, | 1265 | .class = &omap3xxx_mcbsp_sidetone_hwmod_class, |
@@ -2631,11 +1274,8 @@ static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = { | |||
2631 | .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT, | 1274 | .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT, |
2632 | }, | 1275 | }, |
2633 | }, | 1276 | }, |
2634 | .slaves = omap3xxx_mcbsp3_sidetone_slaves, | ||
2635 | .slaves_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_sidetone_slaves), | ||
2636 | }; | 1277 | }; |
2637 | 1278 | ||
2638 | |||
2639 | /* SR common */ | 1279 | /* SR common */ |
2640 | static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = { | 1280 | static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = { |
2641 | .clkact_shift = 20, | 1281 | .clkact_shift = 20, |
@@ -2656,7 +1296,7 @@ static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class = { | |||
2656 | 1296 | ||
2657 | static struct omap_hwmod_sysc_fields omap36xx_sr_sysc_fields = { | 1297 | static struct omap_hwmod_sysc_fields omap36xx_sr_sysc_fields = { |
2658 | .sidle_shift = 24, | 1298 | .sidle_shift = 24, |
2659 | .enwkup_shift = 26 | 1299 | .enwkup_shift = 26, |
2660 | }; | 1300 | }; |
2661 | 1301 | ||
2662 | static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = { | 1302 | static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = { |
@@ -2678,12 +1318,13 @@ static struct omap_smartreflex_dev_attr sr1_dev_attr = { | |||
2678 | .sensor_voltdm_name = "mpu_iva", | 1318 | .sensor_voltdm_name = "mpu_iva", |
2679 | }; | 1319 | }; |
2680 | 1320 | ||
2681 | static struct omap_hwmod_ocp_if *omap3_sr1_slaves[] = { | 1321 | static struct omap_hwmod_irq_info omap3_smartreflex_mpu_irqs[] = { |
2682 | &omap3_l4_core__sr1, | 1322 | { .irq = 18 }, |
1323 | { .irq = -1 } | ||
2683 | }; | 1324 | }; |
2684 | 1325 | ||
2685 | static struct omap_hwmod omap34xx_sr1_hwmod = { | 1326 | static struct omap_hwmod omap34xx_sr1_hwmod = { |
2686 | .name = "sr1_hwmod", | 1327 | .name = "sr1", |
2687 | .class = &omap34xx_smartreflex_hwmod_class, | 1328 | .class = &omap34xx_smartreflex_hwmod_class, |
2688 | .main_clk = "sr1_fck", | 1329 | .main_clk = "sr1_fck", |
2689 | .prcm = { | 1330 | .prcm = { |
@@ -2695,15 +1336,13 @@ static struct omap_hwmod omap34xx_sr1_hwmod = { | |||
2695 | .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT, | 1336 | .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT, |
2696 | }, | 1337 | }, |
2697 | }, | 1338 | }, |
2698 | .slaves = omap3_sr1_slaves, | ||
2699 | .slaves_cnt = ARRAY_SIZE(omap3_sr1_slaves), | ||
2700 | .dev_attr = &sr1_dev_attr, | 1339 | .dev_attr = &sr1_dev_attr, |
2701 | .mpu_irqs = omap3_smartreflex_mpu_irqs, | 1340 | .mpu_irqs = omap3_smartreflex_mpu_irqs, |
2702 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, | 1341 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, |
2703 | }; | 1342 | }; |
2704 | 1343 | ||
2705 | static struct omap_hwmod omap36xx_sr1_hwmod = { | 1344 | static struct omap_hwmod omap36xx_sr1_hwmod = { |
2706 | .name = "sr1_hwmod", | 1345 | .name = "sr1", |
2707 | .class = &omap36xx_smartreflex_hwmod_class, | 1346 | .class = &omap36xx_smartreflex_hwmod_class, |
2708 | .main_clk = "sr1_fck", | 1347 | .main_clk = "sr1_fck", |
2709 | .prcm = { | 1348 | .prcm = { |
@@ -2715,8 +1354,6 @@ static struct omap_hwmod omap36xx_sr1_hwmod = { | |||
2715 | .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT, | 1354 | .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT, |
2716 | }, | 1355 | }, |
2717 | }, | 1356 | }, |
2718 | .slaves = omap3_sr1_slaves, | ||
2719 | .slaves_cnt = ARRAY_SIZE(omap3_sr1_slaves), | ||
2720 | .dev_attr = &sr1_dev_attr, | 1357 | .dev_attr = &sr1_dev_attr, |
2721 | .mpu_irqs = omap3_smartreflex_mpu_irqs, | 1358 | .mpu_irqs = omap3_smartreflex_mpu_irqs, |
2722 | }; | 1359 | }; |
@@ -2726,12 +1363,13 @@ static struct omap_smartreflex_dev_attr sr2_dev_attr = { | |||
2726 | .sensor_voltdm_name = "core", | 1363 | .sensor_voltdm_name = "core", |
2727 | }; | 1364 | }; |
2728 | 1365 | ||
2729 | static struct omap_hwmod_ocp_if *omap3_sr2_slaves[] = { | 1366 | static struct omap_hwmod_irq_info omap3_smartreflex_core_irqs[] = { |
2730 | &omap3_l4_core__sr2, | 1367 | { .irq = 19 }, |
1368 | { .irq = -1 } | ||
2731 | }; | 1369 | }; |
2732 | 1370 | ||
2733 | static struct omap_hwmod omap34xx_sr2_hwmod = { | 1371 | static struct omap_hwmod omap34xx_sr2_hwmod = { |
2734 | .name = "sr2_hwmod", | 1372 | .name = "sr2", |
2735 | .class = &omap34xx_smartreflex_hwmod_class, | 1373 | .class = &omap34xx_smartreflex_hwmod_class, |
2736 | .main_clk = "sr2_fck", | 1374 | .main_clk = "sr2_fck", |
2737 | .prcm = { | 1375 | .prcm = { |
@@ -2743,15 +1381,13 @@ static struct omap_hwmod omap34xx_sr2_hwmod = { | |||
2743 | .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT, | 1381 | .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT, |
2744 | }, | 1382 | }, |
2745 | }, | 1383 | }, |
2746 | .slaves = omap3_sr2_slaves, | ||
2747 | .slaves_cnt = ARRAY_SIZE(omap3_sr2_slaves), | ||
2748 | .dev_attr = &sr2_dev_attr, | 1384 | .dev_attr = &sr2_dev_attr, |
2749 | .mpu_irqs = omap3_smartreflex_core_irqs, | 1385 | .mpu_irqs = omap3_smartreflex_core_irqs, |
2750 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, | 1386 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, |
2751 | }; | 1387 | }; |
2752 | 1388 | ||
2753 | static struct omap_hwmod omap36xx_sr2_hwmod = { | 1389 | static struct omap_hwmod omap36xx_sr2_hwmod = { |
2754 | .name = "sr2_hwmod", | 1390 | .name = "sr2", |
2755 | .class = &omap36xx_smartreflex_hwmod_class, | 1391 | .class = &omap36xx_smartreflex_hwmod_class, |
2756 | .main_clk = "sr2_fck", | 1392 | .main_clk = "sr2_fck", |
2757 | .prcm = { | 1393 | .prcm = { |
@@ -2763,8 +1399,6 @@ static struct omap_hwmod omap36xx_sr2_hwmod = { | |||
2763 | .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT, | 1399 | .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT, |
2764 | }, | 1400 | }, |
2765 | }, | 1401 | }, |
2766 | .slaves = omap3_sr2_slaves, | ||
2767 | .slaves_cnt = ARRAY_SIZE(omap3_sr2_slaves), | ||
2768 | .dev_attr = &sr2_dev_attr, | 1402 | .dev_attr = &sr2_dev_attr, |
2769 | .mpu_irqs = omap3_smartreflex_core_irqs, | 1403 | .mpu_irqs = omap3_smartreflex_core_irqs, |
2770 | }; | 1404 | }; |
@@ -2790,34 +1424,11 @@ static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = { | |||
2790 | .sysc = &omap3xxx_mailbox_sysc, | 1424 | .sysc = &omap3xxx_mailbox_sysc, |
2791 | }; | 1425 | }; |
2792 | 1426 | ||
2793 | static struct omap_hwmod omap3xxx_mailbox_hwmod; | ||
2794 | static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = { | 1427 | static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = { |
2795 | { .irq = 26 }, | 1428 | { .irq = 26 }, |
2796 | { .irq = -1 } | 1429 | { .irq = -1 } |
2797 | }; | 1430 | }; |
2798 | 1431 | ||
2799 | static struct omap_hwmod_addr_space omap3xxx_mailbox_addrs[] = { | ||
2800 | { | ||
2801 | .pa_start = 0x48094000, | ||
2802 | .pa_end = 0x480941ff, | ||
2803 | .flags = ADDR_TYPE_RT, | ||
2804 | }, | ||
2805 | { } | ||
2806 | }; | ||
2807 | |||
2808 | /* l4_core -> mailbox */ | ||
2809 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = { | ||
2810 | .master = &omap3xxx_l4_core_hwmod, | ||
2811 | .slave = &omap3xxx_mailbox_hwmod, | ||
2812 | .addr = omap3xxx_mailbox_addrs, | ||
2813 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2814 | }; | ||
2815 | |||
2816 | /* mailbox slave ports */ | ||
2817 | static struct omap_hwmod_ocp_if *omap3xxx_mailbox_slaves[] = { | ||
2818 | &omap3xxx_l4_core__mailbox, | ||
2819 | }; | ||
2820 | |||
2821 | static struct omap_hwmod omap3xxx_mailbox_hwmod = { | 1432 | static struct omap_hwmod omap3xxx_mailbox_hwmod = { |
2822 | .name = "mailbox", | 1433 | .name = "mailbox", |
2823 | .class = &omap3xxx_mailbox_hwmod_class, | 1434 | .class = &omap3xxx_mailbox_hwmod_class, |
@@ -2832,53 +1443,6 @@ static struct omap_hwmod omap3xxx_mailbox_hwmod = { | |||
2832 | .idlest_idle_bit = OMAP3430_ST_MAILBOXES_SHIFT, | 1443 | .idlest_idle_bit = OMAP3430_ST_MAILBOXES_SHIFT, |
2833 | }, | 1444 | }, |
2834 | }, | 1445 | }, |
2835 | .slaves = omap3xxx_mailbox_slaves, | ||
2836 | .slaves_cnt = ARRAY_SIZE(omap3xxx_mailbox_slaves), | ||
2837 | }; | ||
2838 | |||
2839 | /* l4 core -> mcspi1 interface */ | ||
2840 | static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = { | ||
2841 | .master = &omap3xxx_l4_core_hwmod, | ||
2842 | .slave = &omap34xx_mcspi1, | ||
2843 | .clk = "mcspi1_ick", | ||
2844 | .addr = omap2_mcspi1_addr_space, | ||
2845 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2846 | }; | ||
2847 | |||
2848 | /* l4 core -> mcspi2 interface */ | ||
2849 | static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = { | ||
2850 | .master = &omap3xxx_l4_core_hwmod, | ||
2851 | .slave = &omap34xx_mcspi2, | ||
2852 | .clk = "mcspi2_ick", | ||
2853 | .addr = omap2_mcspi2_addr_space, | ||
2854 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2855 | }; | ||
2856 | |||
2857 | /* l4 core -> mcspi3 interface */ | ||
2858 | static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = { | ||
2859 | .master = &omap3xxx_l4_core_hwmod, | ||
2860 | .slave = &omap34xx_mcspi3, | ||
2861 | .clk = "mcspi3_ick", | ||
2862 | .addr = omap2430_mcspi3_addr_space, | ||
2863 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2864 | }; | ||
2865 | |||
2866 | /* l4 core -> mcspi4 interface */ | ||
2867 | static struct omap_hwmod_addr_space omap34xx_mcspi4_addr_space[] = { | ||
2868 | { | ||
2869 | .pa_start = 0x480ba000, | ||
2870 | .pa_end = 0x480ba0ff, | ||
2871 | .flags = ADDR_TYPE_RT, | ||
2872 | }, | ||
2873 | { } | ||
2874 | }; | ||
2875 | |||
2876 | static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = { | ||
2877 | .master = &omap3xxx_l4_core_hwmod, | ||
2878 | .slave = &omap34xx_mcspi4, | ||
2879 | .clk = "mcspi4_ick", | ||
2880 | .addr = omap34xx_mcspi4_addr_space, | ||
2881 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2882 | }; | 1446 | }; |
2883 | 1447 | ||
2884 | /* | 1448 | /* |
@@ -2905,10 +1469,6 @@ static struct omap_hwmod_class omap34xx_mcspi_class = { | |||
2905 | }; | 1469 | }; |
2906 | 1470 | ||
2907 | /* mcspi1 */ | 1471 | /* mcspi1 */ |
2908 | static struct omap_hwmod_ocp_if *omap34xx_mcspi1_slaves[] = { | ||
2909 | &omap34xx_l4_core__mcspi1, | ||
2910 | }; | ||
2911 | |||
2912 | static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = { | 1472 | static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = { |
2913 | .num_chipselect = 4, | 1473 | .num_chipselect = 4, |
2914 | }; | 1474 | }; |
@@ -2927,17 +1487,11 @@ static struct omap_hwmod omap34xx_mcspi1 = { | |||
2927 | .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT, | 1487 | .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT, |
2928 | }, | 1488 | }, |
2929 | }, | 1489 | }, |
2930 | .slaves = omap34xx_mcspi1_slaves, | ||
2931 | .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi1_slaves), | ||
2932 | .class = &omap34xx_mcspi_class, | 1490 | .class = &omap34xx_mcspi_class, |
2933 | .dev_attr = &omap_mcspi1_dev_attr, | 1491 | .dev_attr = &omap_mcspi1_dev_attr, |
2934 | }; | 1492 | }; |
2935 | 1493 | ||
2936 | /* mcspi2 */ | 1494 | /* mcspi2 */ |
2937 | static struct omap_hwmod_ocp_if *omap34xx_mcspi2_slaves[] = { | ||
2938 | &omap34xx_l4_core__mcspi2, | ||
2939 | }; | ||
2940 | |||
2941 | static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = { | 1495 | static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = { |
2942 | .num_chipselect = 2, | 1496 | .num_chipselect = 2, |
2943 | }; | 1497 | }; |
@@ -2956,8 +1510,6 @@ static struct omap_hwmod omap34xx_mcspi2 = { | |||
2956 | .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT, | 1510 | .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT, |
2957 | }, | 1511 | }, |
2958 | }, | 1512 | }, |
2959 | .slaves = omap34xx_mcspi2_slaves, | ||
2960 | .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi2_slaves), | ||
2961 | .class = &omap34xx_mcspi_class, | 1513 | .class = &omap34xx_mcspi_class, |
2962 | .dev_attr = &omap_mcspi2_dev_attr, | 1514 | .dev_attr = &omap_mcspi2_dev_attr, |
2963 | }; | 1515 | }; |
@@ -2976,10 +1528,6 @@ static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = { | |||
2976 | { .dma_req = -1 } | 1528 | { .dma_req = -1 } |
2977 | }; | 1529 | }; |
2978 | 1530 | ||
2979 | static struct omap_hwmod_ocp_if *omap34xx_mcspi3_slaves[] = { | ||
2980 | &omap34xx_l4_core__mcspi3, | ||
2981 | }; | ||
2982 | |||
2983 | static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = { | 1531 | static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = { |
2984 | .num_chipselect = 2, | 1532 | .num_chipselect = 2, |
2985 | }; | 1533 | }; |
@@ -2998,13 +1546,11 @@ static struct omap_hwmod omap34xx_mcspi3 = { | |||
2998 | .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT, | 1546 | .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT, |
2999 | }, | 1547 | }, |
3000 | }, | 1548 | }, |
3001 | .slaves = omap34xx_mcspi3_slaves, | ||
3002 | .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi3_slaves), | ||
3003 | .class = &omap34xx_mcspi_class, | 1549 | .class = &omap34xx_mcspi_class, |
3004 | .dev_attr = &omap_mcspi3_dev_attr, | 1550 | .dev_attr = &omap_mcspi3_dev_attr, |
3005 | }; | 1551 | }; |
3006 | 1552 | ||
3007 | /* SPI4 */ | 1553 | /* mcspi4 */ |
3008 | static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = { | 1554 | static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = { |
3009 | { .name = "irq", .irq = INT_34XX_SPI4_IRQ }, /* 48 */ | 1555 | { .name = "irq", .irq = INT_34XX_SPI4_IRQ }, /* 48 */ |
3010 | { .irq = -1 } | 1556 | { .irq = -1 } |
@@ -3016,10 +1562,6 @@ static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = { | |||
3016 | { .dma_req = -1 } | 1562 | { .dma_req = -1 } |
3017 | }; | 1563 | }; |
3018 | 1564 | ||
3019 | static struct omap_hwmod_ocp_if *omap34xx_mcspi4_slaves[] = { | ||
3020 | &omap34xx_l4_core__mcspi4, | ||
3021 | }; | ||
3022 | |||
3023 | static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = { | 1565 | static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = { |
3024 | .num_chipselect = 1, | 1566 | .num_chipselect = 1, |
3025 | }; | 1567 | }; |
@@ -3038,15 +1580,11 @@ static struct omap_hwmod omap34xx_mcspi4 = { | |||
3038 | .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT, | 1580 | .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT, |
3039 | }, | 1581 | }, |
3040 | }, | 1582 | }, |
3041 | .slaves = omap34xx_mcspi4_slaves, | ||
3042 | .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi4_slaves), | ||
3043 | .class = &omap34xx_mcspi_class, | 1583 | .class = &omap34xx_mcspi_class, |
3044 | .dev_attr = &omap_mcspi4_dev_attr, | 1584 | .dev_attr = &omap_mcspi4_dev_attr, |
3045 | }; | 1585 | }; |
3046 | 1586 | ||
3047 | /* | 1587 | /* usbhsotg */ |
3048 | * usbhsotg | ||
3049 | */ | ||
3050 | static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = { | 1588 | static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = { |
3051 | .rev_offs = 0x0400, | 1589 | .rev_offs = 0x0400, |
3052 | .sysc_offs = 0x0404, | 1590 | .sysc_offs = 0x0404, |
@@ -3063,6 +1601,7 @@ static struct omap_hwmod_class usbotg_class = { | |||
3063 | .name = "usbotg", | 1601 | .name = "usbotg", |
3064 | .sysc = &omap3xxx_usbhsotg_sysc, | 1602 | .sysc = &omap3xxx_usbhsotg_sysc, |
3065 | }; | 1603 | }; |
1604 | |||
3066 | /* usb_otg_hs */ | 1605 | /* usb_otg_hs */ |
3067 | static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = { | 1606 | static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = { |
3068 | 1607 | ||
@@ -3085,10 +1624,6 @@ static struct omap_hwmod omap3xxx_usbhsotg_hwmod = { | |||
3085 | .idlest_stdby_bit = OMAP3430ES2_ST_HSOTGUSB_STDBY_SHIFT | 1624 | .idlest_stdby_bit = OMAP3430ES2_ST_HSOTGUSB_STDBY_SHIFT |
3086 | }, | 1625 | }, |
3087 | }, | 1626 | }, |
3088 | .masters = omap3xxx_usbhsotg_masters, | ||
3089 | .masters_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_masters), | ||
3090 | .slaves = omap3xxx_usbhsotg_slaves, | ||
3091 | .slaves_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_slaves), | ||
3092 | .class = &usbotg_class, | 1627 | .class = &usbotg_class, |
3093 | 1628 | ||
3094 | /* | 1629 | /* |
@@ -3120,15 +1655,10 @@ static struct omap_hwmod am35xx_usbhsotg_hwmod = { | |||
3120 | .omap2 = { | 1655 | .omap2 = { |
3121 | }, | 1656 | }, |
3122 | }, | 1657 | }, |
3123 | .masters = am35xx_usbhsotg_masters, | ||
3124 | .masters_cnt = ARRAY_SIZE(am35xx_usbhsotg_masters), | ||
3125 | .slaves = am35xx_usbhsotg_slaves, | ||
3126 | .slaves_cnt = ARRAY_SIZE(am35xx_usbhsotg_slaves), | ||
3127 | .class = &am35xx_usbotg_class, | 1658 | .class = &am35xx_usbotg_class, |
3128 | }; | 1659 | }; |
3129 | 1660 | ||
3130 | /* MMC/SD/SDIO common */ | 1661 | /* MMC/SD/SDIO common */ |
3131 | |||
3132 | static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc = { | 1662 | static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc = { |
3133 | .rev_offs = 0x1fc, | 1663 | .rev_offs = 0x1fc, |
3134 | .sysc_offs = 0x10, | 1664 | .sysc_offs = 0x10, |
@@ -3162,10 +1692,6 @@ static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = { | |||
3162 | { .role = "dbck", .clk = "omap_32k_fck", }, | 1692 | { .role = "dbck", .clk = "omap_32k_fck", }, |
3163 | }; | 1693 | }; |
3164 | 1694 | ||
3165 | static struct omap_hwmod_ocp_if *omap3xxx_mmc1_slaves[] = { | ||
3166 | &omap3xxx_l4_core__mmc1, | ||
3167 | }; | ||
3168 | |||
3169 | static struct omap_mmc_dev_attr mmc1_dev_attr = { | 1695 | static struct omap_mmc_dev_attr mmc1_dev_attr = { |
3170 | .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT, | 1696 | .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT, |
3171 | }; | 1697 | }; |
@@ -3193,8 +1719,6 @@ static struct omap_hwmod omap3xxx_pre_es3_mmc1_hwmod = { | |||
3193 | }, | 1719 | }, |
3194 | }, | 1720 | }, |
3195 | .dev_attr = &mmc1_pre_es3_dev_attr, | 1721 | .dev_attr = &mmc1_pre_es3_dev_attr, |
3196 | .slaves = omap3xxx_mmc1_slaves, | ||
3197 | .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc1_slaves), | ||
3198 | .class = &omap34xx_mmc_class, | 1722 | .class = &omap34xx_mmc_class, |
3199 | }; | 1723 | }; |
3200 | 1724 | ||
@@ -3215,8 +1739,6 @@ static struct omap_hwmod omap3xxx_es3plus_mmc1_hwmod = { | |||
3215 | }, | 1739 | }, |
3216 | }, | 1740 | }, |
3217 | .dev_attr = &mmc1_dev_attr, | 1741 | .dev_attr = &mmc1_dev_attr, |
3218 | .slaves = omap3xxx_mmc1_slaves, | ||
3219 | .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc1_slaves), | ||
3220 | .class = &omap34xx_mmc_class, | 1742 | .class = &omap34xx_mmc_class, |
3221 | }; | 1743 | }; |
3222 | 1744 | ||
@@ -3237,10 +1759,6 @@ static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = { | |||
3237 | { .role = "dbck", .clk = "omap_32k_fck", }, | 1759 | { .role = "dbck", .clk = "omap_32k_fck", }, |
3238 | }; | 1760 | }; |
3239 | 1761 | ||
3240 | static struct omap_hwmod_ocp_if *omap3xxx_mmc2_slaves[] = { | ||
3241 | &omap3xxx_l4_core__mmc2, | ||
3242 | }; | ||
3243 | |||
3244 | /* See 35xx errata 2.1.1.128 in SPRZ278F */ | 1762 | /* See 35xx errata 2.1.1.128 in SPRZ278F */ |
3245 | static struct omap_mmc_dev_attr mmc2_pre_es3_dev_attr = { | 1763 | static struct omap_mmc_dev_attr mmc2_pre_es3_dev_attr = { |
3246 | .flags = OMAP_HSMMC_BROKEN_MULTIBLOCK_READ, | 1764 | .flags = OMAP_HSMMC_BROKEN_MULTIBLOCK_READ, |
@@ -3263,8 +1781,6 @@ static struct omap_hwmod omap3xxx_pre_es3_mmc2_hwmod = { | |||
3263 | }, | 1781 | }, |
3264 | }, | 1782 | }, |
3265 | .dev_attr = &mmc2_pre_es3_dev_attr, | 1783 | .dev_attr = &mmc2_pre_es3_dev_attr, |
3266 | .slaves = omap3xxx_mmc2_slaves, | ||
3267 | .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc2_slaves), | ||
3268 | .class = &omap34xx_mmc_class, | 1784 | .class = &omap34xx_mmc_class, |
3269 | }; | 1785 | }; |
3270 | 1786 | ||
@@ -3284,8 +1800,6 @@ static struct omap_hwmod omap3xxx_es3plus_mmc2_hwmod = { | |||
3284 | .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT, | 1800 | .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT, |
3285 | }, | 1801 | }, |
3286 | }, | 1802 | }, |
3287 | .slaves = omap3xxx_mmc2_slaves, | ||
3288 | .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc2_slaves), | ||
3289 | .class = &omap34xx_mmc_class, | 1803 | .class = &omap34xx_mmc_class, |
3290 | }; | 1804 | }; |
3291 | 1805 | ||
@@ -3306,10 +1820,6 @@ static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks[] = { | |||
3306 | { .role = "dbck", .clk = "omap_32k_fck", }, | 1820 | { .role = "dbck", .clk = "omap_32k_fck", }, |
3307 | }; | 1821 | }; |
3308 | 1822 | ||
3309 | static struct omap_hwmod_ocp_if *omap3xxx_mmc3_slaves[] = { | ||
3310 | &omap3xxx_l4_core__mmc3, | ||
3311 | }; | ||
3312 | |||
3313 | static struct omap_hwmod omap3xxx_mmc3_hwmod = { | 1823 | static struct omap_hwmod omap3xxx_mmc3_hwmod = { |
3314 | .name = "mmc3", | 1824 | .name = "mmc3", |
3315 | .mpu_irqs = omap34xx_mmc3_mpu_irqs, | 1825 | .mpu_irqs = omap34xx_mmc3_mpu_irqs, |
@@ -3325,8 +1835,6 @@ static struct omap_hwmod omap3xxx_mmc3_hwmod = { | |||
3325 | .idlest_idle_bit = OMAP3430_ST_MMC3_SHIFT, | 1835 | .idlest_idle_bit = OMAP3430_ST_MMC3_SHIFT, |
3326 | }, | 1836 | }, |
3327 | }, | 1837 | }, |
3328 | .slaves = omap3xxx_mmc3_slaves, | ||
3329 | .slaves_cnt = ARRAY_SIZE(omap3xxx_mmc3_slaves), | ||
3330 | .class = &omap34xx_mmc_class, | 1838 | .class = &omap34xx_mmc_class, |
3331 | }; | 1839 | }; |
3332 | 1840 | ||
@@ -3334,12 +1842,6 @@ static struct omap_hwmod omap3xxx_mmc3_hwmod = { | |||
3334 | * 'usb_host_hs' class | 1842 | * 'usb_host_hs' class |
3335 | * high-speed multi-port usb host controller | 1843 | * high-speed multi-port usb host controller |
3336 | */ | 1844 | */ |
3337 | static struct omap_hwmod_ocp_if omap3xxx_usb_host_hs__l3_main_2 = { | ||
3338 | .master = &omap3xxx_usb_host_hs_hwmod, | ||
3339 | .slave = &omap3xxx_l3_main_hwmod, | ||
3340 | .clk = "core_l3_ick", | ||
3341 | .user = OCP_USER_MPU, | ||
3342 | }; | ||
3343 | 1845 | ||
3344 | static struct omap_hwmod_class_sysconfig omap3xxx_usb_host_hs_sysc = { | 1846 | static struct omap_hwmod_class_sysconfig omap3xxx_usb_host_hs_sysc = { |
3345 | .rev_offs = 0x0000, | 1847 | .rev_offs = 0x0000, |
@@ -3358,42 +1860,6 @@ static struct omap_hwmod_class omap3xxx_usb_host_hs_hwmod_class = { | |||
3358 | .sysc = &omap3xxx_usb_host_hs_sysc, | 1860 | .sysc = &omap3xxx_usb_host_hs_sysc, |
3359 | }; | 1861 | }; |
3360 | 1862 | ||
3361 | static struct omap_hwmod_ocp_if *omap3xxx_usb_host_hs_masters[] = { | ||
3362 | &omap3xxx_usb_host_hs__l3_main_2, | ||
3363 | }; | ||
3364 | |||
3365 | static struct omap_hwmod_addr_space omap3xxx_usb_host_hs_addrs[] = { | ||
3366 | { | ||
3367 | .name = "uhh", | ||
3368 | .pa_start = 0x48064000, | ||
3369 | .pa_end = 0x480643ff, | ||
3370 | .flags = ADDR_TYPE_RT | ||
3371 | }, | ||
3372 | { | ||
3373 | .name = "ohci", | ||
3374 | .pa_start = 0x48064400, | ||
3375 | .pa_end = 0x480647ff, | ||
3376 | }, | ||
3377 | { | ||
3378 | .name = "ehci", | ||
3379 | .pa_start = 0x48064800, | ||
3380 | .pa_end = 0x48064cff, | ||
3381 | }, | ||
3382 | {} | ||
3383 | }; | ||
3384 | |||
3385 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_host_hs = { | ||
3386 | .master = &omap3xxx_l4_core_hwmod, | ||
3387 | .slave = &omap3xxx_usb_host_hs_hwmod, | ||
3388 | .clk = "usbhost_ick", | ||
3389 | .addr = omap3xxx_usb_host_hs_addrs, | ||
3390 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3391 | }; | ||
3392 | |||
3393 | static struct omap_hwmod_ocp_if *omap3xxx_usb_host_hs_slaves[] = { | ||
3394 | &omap3xxx_l4_core__usb_host_hs, | ||
3395 | }; | ||
3396 | |||
3397 | static struct omap_hwmod_opt_clk omap3xxx_usb_host_hs_opt_clks[] = { | 1863 | static struct omap_hwmod_opt_clk omap3xxx_usb_host_hs_opt_clks[] = { |
3398 | { .role = "ehci_logic_fck", .clk = "usbhost_120m_fck", }, | 1864 | { .role = "ehci_logic_fck", .clk = "usbhost_120m_fck", }, |
3399 | }; | 1865 | }; |
@@ -3422,10 +1888,6 @@ static struct omap_hwmod omap3xxx_usb_host_hs_hwmod = { | |||
3422 | }, | 1888 | }, |
3423 | .opt_clks = omap3xxx_usb_host_hs_opt_clks, | 1889 | .opt_clks = omap3xxx_usb_host_hs_opt_clks, |
3424 | .opt_clks_cnt = ARRAY_SIZE(omap3xxx_usb_host_hs_opt_clks), | 1890 | .opt_clks_cnt = ARRAY_SIZE(omap3xxx_usb_host_hs_opt_clks), |
3425 | .slaves = omap3xxx_usb_host_hs_slaves, | ||
3426 | .slaves_cnt = ARRAY_SIZE(omap3xxx_usb_host_hs_slaves), | ||
3427 | .masters = omap3xxx_usb_host_hs_masters, | ||
3428 | .masters_cnt = ARRAY_SIZE(omap3xxx_usb_host_hs_masters), | ||
3429 | 1891 | ||
3430 | /* | 1892 | /* |
3431 | * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock | 1893 | * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock |
@@ -3501,6 +1963,1084 @@ static struct omap_hwmod_irq_info omap3xxx_usb_tll_hs_irqs[] = { | |||
3501 | { .irq = -1 } | 1963 | { .irq = -1 } |
3502 | }; | 1964 | }; |
3503 | 1965 | ||
1966 | static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod = { | ||
1967 | .name = "usb_tll_hs", | ||
1968 | .class = &omap3xxx_usb_tll_hs_hwmod_class, | ||
1969 | .clkdm_name = "l3_init_clkdm", | ||
1970 | .mpu_irqs = omap3xxx_usb_tll_hs_irqs, | ||
1971 | .main_clk = "usbtll_fck", | ||
1972 | .prcm = { | ||
1973 | .omap2 = { | ||
1974 | .module_offs = CORE_MOD, | ||
1975 | .prcm_reg_id = 3, | ||
1976 | .module_bit = OMAP3430ES2_EN_USBTLL_SHIFT, | ||
1977 | .idlest_reg_id = 3, | ||
1978 | .idlest_idle_bit = OMAP3430ES2_ST_USBTLL_SHIFT, | ||
1979 | }, | ||
1980 | }, | ||
1981 | }; | ||
1982 | |||
1983 | /* | ||
1984 | * interfaces | ||
1985 | */ | ||
1986 | |||
1987 | /* L3 -> L4_CORE interface */ | ||
1988 | static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = { | ||
1989 | .master = &omap3xxx_l3_main_hwmod, | ||
1990 | .slave = &omap3xxx_l4_core_hwmod, | ||
1991 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1992 | }; | ||
1993 | |||
1994 | /* L3 -> L4_PER interface */ | ||
1995 | static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = { | ||
1996 | .master = &omap3xxx_l3_main_hwmod, | ||
1997 | .slave = &omap3xxx_l4_per_hwmod, | ||
1998 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1999 | }; | ||
2000 | |||
2001 | static struct omap_hwmod_addr_space omap3xxx_l3_main_addrs[] = { | ||
2002 | { | ||
2003 | .pa_start = 0x68000000, | ||
2004 | .pa_end = 0x6800ffff, | ||
2005 | .flags = ADDR_TYPE_RT, | ||
2006 | }, | ||
2007 | { } | ||
2008 | }; | ||
2009 | |||
2010 | /* MPU -> L3 interface */ | ||
2011 | static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = { | ||
2012 | .master = &omap3xxx_mpu_hwmod, | ||
2013 | .slave = &omap3xxx_l3_main_hwmod, | ||
2014 | .addr = omap3xxx_l3_main_addrs, | ||
2015 | .user = OCP_USER_MPU, | ||
2016 | }; | ||
2017 | |||
2018 | /* DSS -> l3 */ | ||
2019 | static struct omap_hwmod_ocp_if omap3430es1_dss__l3 = { | ||
2020 | .master = &omap3430es1_dss_core_hwmod, | ||
2021 | .slave = &omap3xxx_l3_main_hwmod, | ||
2022 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2023 | }; | ||
2024 | |||
2025 | static struct omap_hwmod_ocp_if omap3xxx_dss__l3 = { | ||
2026 | .master = &omap3xxx_dss_core_hwmod, | ||
2027 | .slave = &omap3xxx_l3_main_hwmod, | ||
2028 | .fw = { | ||
2029 | .omap2 = { | ||
2030 | .l3_perm_bit = OMAP3_L3_CORE_FW_INIT_ID_DSS, | ||
2031 | .flags = OMAP_FIREWALL_L3, | ||
2032 | } | ||
2033 | }, | ||
2034 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2035 | }; | ||
2036 | |||
2037 | /* l3_core -> usbhsotg interface */ | ||
2038 | static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3 = { | ||
2039 | .master = &omap3xxx_usbhsotg_hwmod, | ||
2040 | .slave = &omap3xxx_l3_main_hwmod, | ||
2041 | .clk = "core_l3_ick", | ||
2042 | .user = OCP_USER_MPU, | ||
2043 | }; | ||
2044 | |||
2045 | /* l3_core -> am35xx_usbhsotg interface */ | ||
2046 | static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3 = { | ||
2047 | .master = &am35xx_usbhsotg_hwmod, | ||
2048 | .slave = &omap3xxx_l3_main_hwmod, | ||
2049 | .clk = "core_l3_ick", | ||
2050 | .user = OCP_USER_MPU, | ||
2051 | }; | ||
2052 | /* L4_CORE -> L4_WKUP interface */ | ||
2053 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = { | ||
2054 | .master = &omap3xxx_l4_core_hwmod, | ||
2055 | .slave = &omap3xxx_l4_wkup_hwmod, | ||
2056 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2057 | }; | ||
2058 | |||
2059 | /* L4 CORE -> MMC1 interface */ | ||
2060 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc1 = { | ||
2061 | .master = &omap3xxx_l4_core_hwmod, | ||
2062 | .slave = &omap3xxx_pre_es3_mmc1_hwmod, | ||
2063 | .clk = "mmchs1_ick", | ||
2064 | .addr = omap2430_mmc1_addr_space, | ||
2065 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2066 | .flags = OMAP_FIREWALL_L4 | ||
2067 | }; | ||
2068 | |||
2069 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc1 = { | ||
2070 | .master = &omap3xxx_l4_core_hwmod, | ||
2071 | .slave = &omap3xxx_es3plus_mmc1_hwmod, | ||
2072 | .clk = "mmchs1_ick", | ||
2073 | .addr = omap2430_mmc1_addr_space, | ||
2074 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2075 | .flags = OMAP_FIREWALL_L4 | ||
2076 | }; | ||
2077 | |||
2078 | /* L4 CORE -> MMC2 interface */ | ||
2079 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc2 = { | ||
2080 | .master = &omap3xxx_l4_core_hwmod, | ||
2081 | .slave = &omap3xxx_pre_es3_mmc2_hwmod, | ||
2082 | .clk = "mmchs2_ick", | ||
2083 | .addr = omap2430_mmc2_addr_space, | ||
2084 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2085 | .flags = OMAP_FIREWALL_L4 | ||
2086 | }; | ||
2087 | |||
2088 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc2 = { | ||
2089 | .master = &omap3xxx_l4_core_hwmod, | ||
2090 | .slave = &omap3xxx_es3plus_mmc2_hwmod, | ||
2091 | .clk = "mmchs2_ick", | ||
2092 | .addr = omap2430_mmc2_addr_space, | ||
2093 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2094 | .flags = OMAP_FIREWALL_L4 | ||
2095 | }; | ||
2096 | |||
2097 | /* L4 CORE -> MMC3 interface */ | ||
2098 | static struct omap_hwmod_addr_space omap3xxx_mmc3_addr_space[] = { | ||
2099 | { | ||
2100 | .pa_start = 0x480ad000, | ||
2101 | .pa_end = 0x480ad1ff, | ||
2102 | .flags = ADDR_TYPE_RT, | ||
2103 | }, | ||
2104 | { } | ||
2105 | }; | ||
2106 | |||
2107 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = { | ||
2108 | .master = &omap3xxx_l4_core_hwmod, | ||
2109 | .slave = &omap3xxx_mmc3_hwmod, | ||
2110 | .clk = "mmchs3_ick", | ||
2111 | .addr = omap3xxx_mmc3_addr_space, | ||
2112 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2113 | .flags = OMAP_FIREWALL_L4 | ||
2114 | }; | ||
2115 | |||
2116 | /* L4 CORE -> UART1 interface */ | ||
2117 | static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = { | ||
2118 | { | ||
2119 | .pa_start = OMAP3_UART1_BASE, | ||
2120 | .pa_end = OMAP3_UART1_BASE + SZ_8K - 1, | ||
2121 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, | ||
2122 | }, | ||
2123 | { } | ||
2124 | }; | ||
2125 | |||
2126 | static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = { | ||
2127 | .master = &omap3xxx_l4_core_hwmod, | ||
2128 | .slave = &omap3xxx_uart1_hwmod, | ||
2129 | .clk = "uart1_ick", | ||
2130 | .addr = omap3xxx_uart1_addr_space, | ||
2131 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2132 | }; | ||
2133 | |||
2134 | /* L4 CORE -> UART2 interface */ | ||
2135 | static struct omap_hwmod_addr_space omap3xxx_uart2_addr_space[] = { | ||
2136 | { | ||
2137 | .pa_start = OMAP3_UART2_BASE, | ||
2138 | .pa_end = OMAP3_UART2_BASE + SZ_1K - 1, | ||
2139 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, | ||
2140 | }, | ||
2141 | { } | ||
2142 | }; | ||
2143 | |||
2144 | static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = { | ||
2145 | .master = &omap3xxx_l4_core_hwmod, | ||
2146 | .slave = &omap3xxx_uart2_hwmod, | ||
2147 | .clk = "uart2_ick", | ||
2148 | .addr = omap3xxx_uart2_addr_space, | ||
2149 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2150 | }; | ||
2151 | |||
2152 | /* L4 PER -> UART3 interface */ | ||
2153 | static struct omap_hwmod_addr_space omap3xxx_uart3_addr_space[] = { | ||
2154 | { | ||
2155 | .pa_start = OMAP3_UART3_BASE, | ||
2156 | .pa_end = OMAP3_UART3_BASE + SZ_1K - 1, | ||
2157 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, | ||
2158 | }, | ||
2159 | { } | ||
2160 | }; | ||
2161 | |||
2162 | static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = { | ||
2163 | .master = &omap3xxx_l4_per_hwmod, | ||
2164 | .slave = &omap3xxx_uart3_hwmod, | ||
2165 | .clk = "uart3_ick", | ||
2166 | .addr = omap3xxx_uart3_addr_space, | ||
2167 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2168 | }; | ||
2169 | |||
2170 | /* L4 PER -> UART4 interface */ | ||
2171 | static struct omap_hwmod_addr_space omap36xx_uart4_addr_space[] = { | ||
2172 | { | ||
2173 | .pa_start = OMAP3_UART4_BASE, | ||
2174 | .pa_end = OMAP3_UART4_BASE + SZ_1K - 1, | ||
2175 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, | ||
2176 | }, | ||
2177 | { } | ||
2178 | }; | ||
2179 | |||
2180 | static struct omap_hwmod_ocp_if omap36xx_l4_per__uart4 = { | ||
2181 | .master = &omap3xxx_l4_per_hwmod, | ||
2182 | .slave = &omap36xx_uart4_hwmod, | ||
2183 | .clk = "uart4_ick", | ||
2184 | .addr = omap36xx_uart4_addr_space, | ||
2185 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2186 | }; | ||
2187 | |||
2188 | /* AM35xx: L4 CORE -> UART4 interface */ | ||
2189 | static struct omap_hwmod_addr_space am35xx_uart4_addr_space[] = { | ||
2190 | { | ||
2191 | .pa_start = OMAP3_UART4_AM35XX_BASE, | ||
2192 | .pa_end = OMAP3_UART4_AM35XX_BASE + SZ_1K - 1, | ||
2193 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, | ||
2194 | }, | ||
2195 | }; | ||
2196 | |||
2197 | static struct omap_hwmod_ocp_if am35xx_l4_core__uart4 = { | ||
2198 | .master = &omap3xxx_l4_core_hwmod, | ||
2199 | .slave = &am35xx_uart4_hwmod, | ||
2200 | .clk = "uart4_ick", | ||
2201 | .addr = am35xx_uart4_addr_space, | ||
2202 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2203 | }; | ||
2204 | |||
2205 | /* L4 CORE -> I2C1 interface */ | ||
2206 | static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = { | ||
2207 | .master = &omap3xxx_l4_core_hwmod, | ||
2208 | .slave = &omap3xxx_i2c1_hwmod, | ||
2209 | .clk = "i2c1_ick", | ||
2210 | .addr = omap2_i2c1_addr_space, | ||
2211 | .fw = { | ||
2212 | .omap2 = { | ||
2213 | .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION, | ||
2214 | .l4_prot_group = 7, | ||
2215 | .flags = OMAP_FIREWALL_L4, | ||
2216 | } | ||
2217 | }, | ||
2218 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2219 | }; | ||
2220 | |||
2221 | /* L4 CORE -> I2C2 interface */ | ||
2222 | static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = { | ||
2223 | .master = &omap3xxx_l4_core_hwmod, | ||
2224 | .slave = &omap3xxx_i2c2_hwmod, | ||
2225 | .clk = "i2c2_ick", | ||
2226 | .addr = omap2_i2c2_addr_space, | ||
2227 | .fw = { | ||
2228 | .omap2 = { | ||
2229 | .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION, | ||
2230 | .l4_prot_group = 7, | ||
2231 | .flags = OMAP_FIREWALL_L4, | ||
2232 | } | ||
2233 | }, | ||
2234 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2235 | }; | ||
2236 | |||
2237 | /* L4 CORE -> I2C3 interface */ | ||
2238 | static struct omap_hwmod_addr_space omap3xxx_i2c3_addr_space[] = { | ||
2239 | { | ||
2240 | .pa_start = 0x48060000, | ||
2241 | .pa_end = 0x48060000 + SZ_128 - 1, | ||
2242 | .flags = ADDR_TYPE_RT, | ||
2243 | }, | ||
2244 | { } | ||
2245 | }; | ||
2246 | |||
2247 | static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = { | ||
2248 | .master = &omap3xxx_l4_core_hwmod, | ||
2249 | .slave = &omap3xxx_i2c3_hwmod, | ||
2250 | .clk = "i2c3_ick", | ||
2251 | .addr = omap3xxx_i2c3_addr_space, | ||
2252 | .fw = { | ||
2253 | .omap2 = { | ||
2254 | .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION, | ||
2255 | .l4_prot_group = 7, | ||
2256 | .flags = OMAP_FIREWALL_L4, | ||
2257 | } | ||
2258 | }, | ||
2259 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2260 | }; | ||
2261 | |||
2262 | /* L4 CORE -> SR1 interface */ | ||
2263 | static struct omap_hwmod_addr_space omap3_sr1_addr_space[] = { | ||
2264 | { | ||
2265 | .pa_start = OMAP34XX_SR1_BASE, | ||
2266 | .pa_end = OMAP34XX_SR1_BASE + SZ_1K - 1, | ||
2267 | .flags = ADDR_TYPE_RT, | ||
2268 | }, | ||
2269 | { } | ||
2270 | }; | ||
2271 | |||
2272 | static struct omap_hwmod_ocp_if omap34xx_l4_core__sr1 = { | ||
2273 | .master = &omap3xxx_l4_core_hwmod, | ||
2274 | .slave = &omap34xx_sr1_hwmod, | ||
2275 | .clk = "sr_l4_ick", | ||
2276 | .addr = omap3_sr1_addr_space, | ||
2277 | .user = OCP_USER_MPU, | ||
2278 | }; | ||
2279 | |||
2280 | static struct omap_hwmod_ocp_if omap36xx_l4_core__sr1 = { | ||
2281 | .master = &omap3xxx_l4_core_hwmod, | ||
2282 | .slave = &omap36xx_sr1_hwmod, | ||
2283 | .clk = "sr_l4_ick", | ||
2284 | .addr = omap3_sr1_addr_space, | ||
2285 | .user = OCP_USER_MPU, | ||
2286 | }; | ||
2287 | |||
2288 | /* L4 CORE -> SR1 interface */ | ||
2289 | static struct omap_hwmod_addr_space omap3_sr2_addr_space[] = { | ||
2290 | { | ||
2291 | .pa_start = OMAP34XX_SR2_BASE, | ||
2292 | .pa_end = OMAP34XX_SR2_BASE + SZ_1K - 1, | ||
2293 | .flags = ADDR_TYPE_RT, | ||
2294 | }, | ||
2295 | { } | ||
2296 | }; | ||
2297 | |||
2298 | static struct omap_hwmod_ocp_if omap34xx_l4_core__sr2 = { | ||
2299 | .master = &omap3xxx_l4_core_hwmod, | ||
2300 | .slave = &omap34xx_sr2_hwmod, | ||
2301 | .clk = "sr_l4_ick", | ||
2302 | .addr = omap3_sr2_addr_space, | ||
2303 | .user = OCP_USER_MPU, | ||
2304 | }; | ||
2305 | |||
2306 | static struct omap_hwmod_ocp_if omap36xx_l4_core__sr2 = { | ||
2307 | .master = &omap3xxx_l4_core_hwmod, | ||
2308 | .slave = &omap36xx_sr2_hwmod, | ||
2309 | .clk = "sr_l4_ick", | ||
2310 | .addr = omap3_sr2_addr_space, | ||
2311 | .user = OCP_USER_MPU, | ||
2312 | }; | ||
2313 | |||
2314 | static struct omap_hwmod_addr_space omap3xxx_usbhsotg_addrs[] = { | ||
2315 | { | ||
2316 | .pa_start = OMAP34XX_HSUSB_OTG_BASE, | ||
2317 | .pa_end = OMAP34XX_HSUSB_OTG_BASE + SZ_4K - 1, | ||
2318 | .flags = ADDR_TYPE_RT | ||
2319 | }, | ||
2320 | { } | ||
2321 | }; | ||
2322 | |||
2323 | /* l4_core -> usbhsotg */ | ||
2324 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = { | ||
2325 | .master = &omap3xxx_l4_core_hwmod, | ||
2326 | .slave = &omap3xxx_usbhsotg_hwmod, | ||
2327 | .clk = "l4_ick", | ||
2328 | .addr = omap3xxx_usbhsotg_addrs, | ||
2329 | .user = OCP_USER_MPU, | ||
2330 | }; | ||
2331 | |||
2332 | static struct omap_hwmod_addr_space am35xx_usbhsotg_addrs[] = { | ||
2333 | { | ||
2334 | .pa_start = AM35XX_IPSS_USBOTGSS_BASE, | ||
2335 | .pa_end = AM35XX_IPSS_USBOTGSS_BASE + SZ_4K - 1, | ||
2336 | .flags = ADDR_TYPE_RT | ||
2337 | }, | ||
2338 | { } | ||
2339 | }; | ||
2340 | |||
2341 | /* l4_core -> usbhsotg */ | ||
2342 | static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = { | ||
2343 | .master = &omap3xxx_l4_core_hwmod, | ||
2344 | .slave = &am35xx_usbhsotg_hwmod, | ||
2345 | .clk = "l4_ick", | ||
2346 | .addr = am35xx_usbhsotg_addrs, | ||
2347 | .user = OCP_USER_MPU, | ||
2348 | }; | ||
2349 | |||
2350 | /* L4_WKUP -> L4_SEC interface */ | ||
2351 | static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__l4_sec = { | ||
2352 | .master = &omap3xxx_l4_wkup_hwmod, | ||
2353 | .slave = &omap3xxx_l4_sec_hwmod, | ||
2354 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2355 | }; | ||
2356 | |||
2357 | /* IVA2 <- L3 interface */ | ||
2358 | static struct omap_hwmod_ocp_if omap3xxx_l3__iva = { | ||
2359 | .master = &omap3xxx_l3_main_hwmod, | ||
2360 | .slave = &omap3xxx_iva_hwmod, | ||
2361 | .clk = "core_l3_ick", | ||
2362 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2363 | }; | ||
2364 | |||
2365 | static struct omap_hwmod_addr_space omap3xxx_timer1_addrs[] = { | ||
2366 | { | ||
2367 | .pa_start = 0x48318000, | ||
2368 | .pa_end = 0x48318000 + SZ_1K - 1, | ||
2369 | .flags = ADDR_TYPE_RT | ||
2370 | }, | ||
2371 | { } | ||
2372 | }; | ||
2373 | |||
2374 | /* l4_wkup -> timer1 */ | ||
2375 | static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1 = { | ||
2376 | .master = &omap3xxx_l4_wkup_hwmod, | ||
2377 | .slave = &omap3xxx_timer1_hwmod, | ||
2378 | .clk = "gpt1_ick", | ||
2379 | .addr = omap3xxx_timer1_addrs, | ||
2380 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2381 | }; | ||
2382 | |||
2383 | static struct omap_hwmod_addr_space omap3xxx_timer2_addrs[] = { | ||
2384 | { | ||
2385 | .pa_start = 0x49032000, | ||
2386 | .pa_end = 0x49032000 + SZ_1K - 1, | ||
2387 | .flags = ADDR_TYPE_RT | ||
2388 | }, | ||
2389 | { } | ||
2390 | }; | ||
2391 | |||
2392 | /* l4_per -> timer2 */ | ||
2393 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2 = { | ||
2394 | .master = &omap3xxx_l4_per_hwmod, | ||
2395 | .slave = &omap3xxx_timer2_hwmod, | ||
2396 | .clk = "gpt2_ick", | ||
2397 | .addr = omap3xxx_timer2_addrs, | ||
2398 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2399 | }; | ||
2400 | |||
2401 | static struct omap_hwmod_addr_space omap3xxx_timer3_addrs[] = { | ||
2402 | { | ||
2403 | .pa_start = 0x49034000, | ||
2404 | .pa_end = 0x49034000 + SZ_1K - 1, | ||
2405 | .flags = ADDR_TYPE_RT | ||
2406 | }, | ||
2407 | { } | ||
2408 | }; | ||
2409 | |||
2410 | /* l4_per -> timer3 */ | ||
2411 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3 = { | ||
2412 | .master = &omap3xxx_l4_per_hwmod, | ||
2413 | .slave = &omap3xxx_timer3_hwmod, | ||
2414 | .clk = "gpt3_ick", | ||
2415 | .addr = omap3xxx_timer3_addrs, | ||
2416 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2417 | }; | ||
2418 | |||
2419 | static struct omap_hwmod_addr_space omap3xxx_timer4_addrs[] = { | ||
2420 | { | ||
2421 | .pa_start = 0x49036000, | ||
2422 | .pa_end = 0x49036000 + SZ_1K - 1, | ||
2423 | .flags = ADDR_TYPE_RT | ||
2424 | }, | ||
2425 | { } | ||
2426 | }; | ||
2427 | |||
2428 | /* l4_per -> timer4 */ | ||
2429 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4 = { | ||
2430 | .master = &omap3xxx_l4_per_hwmod, | ||
2431 | .slave = &omap3xxx_timer4_hwmod, | ||
2432 | .clk = "gpt4_ick", | ||
2433 | .addr = omap3xxx_timer4_addrs, | ||
2434 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2435 | }; | ||
2436 | |||
2437 | static struct omap_hwmod_addr_space omap3xxx_timer5_addrs[] = { | ||
2438 | { | ||
2439 | .pa_start = 0x49038000, | ||
2440 | .pa_end = 0x49038000 + SZ_1K - 1, | ||
2441 | .flags = ADDR_TYPE_RT | ||
2442 | }, | ||
2443 | { } | ||
2444 | }; | ||
2445 | |||
2446 | /* l4_per -> timer5 */ | ||
2447 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5 = { | ||
2448 | .master = &omap3xxx_l4_per_hwmod, | ||
2449 | .slave = &omap3xxx_timer5_hwmod, | ||
2450 | .clk = "gpt5_ick", | ||
2451 | .addr = omap3xxx_timer5_addrs, | ||
2452 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2453 | }; | ||
2454 | |||
2455 | static struct omap_hwmod_addr_space omap3xxx_timer6_addrs[] = { | ||
2456 | { | ||
2457 | .pa_start = 0x4903A000, | ||
2458 | .pa_end = 0x4903A000 + SZ_1K - 1, | ||
2459 | .flags = ADDR_TYPE_RT | ||
2460 | }, | ||
2461 | { } | ||
2462 | }; | ||
2463 | |||
2464 | /* l4_per -> timer6 */ | ||
2465 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6 = { | ||
2466 | .master = &omap3xxx_l4_per_hwmod, | ||
2467 | .slave = &omap3xxx_timer6_hwmod, | ||
2468 | .clk = "gpt6_ick", | ||
2469 | .addr = omap3xxx_timer6_addrs, | ||
2470 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2471 | }; | ||
2472 | |||
2473 | static struct omap_hwmod_addr_space omap3xxx_timer7_addrs[] = { | ||
2474 | { | ||
2475 | .pa_start = 0x4903C000, | ||
2476 | .pa_end = 0x4903C000 + SZ_1K - 1, | ||
2477 | .flags = ADDR_TYPE_RT | ||
2478 | }, | ||
2479 | { } | ||
2480 | }; | ||
2481 | |||
2482 | /* l4_per -> timer7 */ | ||
2483 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7 = { | ||
2484 | .master = &omap3xxx_l4_per_hwmod, | ||
2485 | .slave = &omap3xxx_timer7_hwmod, | ||
2486 | .clk = "gpt7_ick", | ||
2487 | .addr = omap3xxx_timer7_addrs, | ||
2488 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2489 | }; | ||
2490 | |||
2491 | static struct omap_hwmod_addr_space omap3xxx_timer8_addrs[] = { | ||
2492 | { | ||
2493 | .pa_start = 0x4903E000, | ||
2494 | .pa_end = 0x4903E000 + SZ_1K - 1, | ||
2495 | .flags = ADDR_TYPE_RT | ||
2496 | }, | ||
2497 | { } | ||
2498 | }; | ||
2499 | |||
2500 | /* l4_per -> timer8 */ | ||
2501 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8 = { | ||
2502 | .master = &omap3xxx_l4_per_hwmod, | ||
2503 | .slave = &omap3xxx_timer8_hwmod, | ||
2504 | .clk = "gpt8_ick", | ||
2505 | .addr = omap3xxx_timer8_addrs, | ||
2506 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2507 | }; | ||
2508 | |||
2509 | static struct omap_hwmod_addr_space omap3xxx_timer9_addrs[] = { | ||
2510 | { | ||
2511 | .pa_start = 0x49040000, | ||
2512 | .pa_end = 0x49040000 + SZ_1K - 1, | ||
2513 | .flags = ADDR_TYPE_RT | ||
2514 | }, | ||
2515 | { } | ||
2516 | }; | ||
2517 | |||
2518 | /* l4_per -> timer9 */ | ||
2519 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9 = { | ||
2520 | .master = &omap3xxx_l4_per_hwmod, | ||
2521 | .slave = &omap3xxx_timer9_hwmod, | ||
2522 | .clk = "gpt9_ick", | ||
2523 | .addr = omap3xxx_timer9_addrs, | ||
2524 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2525 | }; | ||
2526 | |||
2527 | /* l4_core -> timer10 */ | ||
2528 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10 = { | ||
2529 | .master = &omap3xxx_l4_core_hwmod, | ||
2530 | .slave = &omap3xxx_timer10_hwmod, | ||
2531 | .clk = "gpt10_ick", | ||
2532 | .addr = omap2_timer10_addrs, | ||
2533 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2534 | }; | ||
2535 | |||
2536 | /* l4_core -> timer11 */ | ||
2537 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11 = { | ||
2538 | .master = &omap3xxx_l4_core_hwmod, | ||
2539 | .slave = &omap3xxx_timer11_hwmod, | ||
2540 | .clk = "gpt11_ick", | ||
2541 | .addr = omap2_timer11_addrs, | ||
2542 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2543 | }; | ||
2544 | |||
2545 | static struct omap_hwmod_addr_space omap3xxx_timer12_addrs[] = { | ||
2546 | { | ||
2547 | .pa_start = 0x48304000, | ||
2548 | .pa_end = 0x48304000 + SZ_1K - 1, | ||
2549 | .flags = ADDR_TYPE_RT | ||
2550 | }, | ||
2551 | { } | ||
2552 | }; | ||
2553 | |||
2554 | /* l4_core -> timer12 */ | ||
2555 | static struct omap_hwmod_ocp_if omap3xxx_l4_sec__timer12 = { | ||
2556 | .master = &omap3xxx_l4_sec_hwmod, | ||
2557 | .slave = &omap3xxx_timer12_hwmod, | ||
2558 | .clk = "gpt12_ick", | ||
2559 | .addr = omap3xxx_timer12_addrs, | ||
2560 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2561 | }; | ||
2562 | |||
2563 | /* l4_wkup -> wd_timer2 */ | ||
2564 | static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = { | ||
2565 | { | ||
2566 | .pa_start = 0x48314000, | ||
2567 | .pa_end = 0x4831407f, | ||
2568 | .flags = ADDR_TYPE_RT | ||
2569 | }, | ||
2570 | { } | ||
2571 | }; | ||
2572 | |||
2573 | static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = { | ||
2574 | .master = &omap3xxx_l4_wkup_hwmod, | ||
2575 | .slave = &omap3xxx_wd_timer2_hwmod, | ||
2576 | .clk = "wdt2_ick", | ||
2577 | .addr = omap3xxx_wd_timer2_addrs, | ||
2578 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2579 | }; | ||
2580 | |||
2581 | /* l4_core -> dss */ | ||
2582 | static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = { | ||
2583 | .master = &omap3xxx_l4_core_hwmod, | ||
2584 | .slave = &omap3430es1_dss_core_hwmod, | ||
2585 | .clk = "dss_ick", | ||
2586 | .addr = omap2_dss_addrs, | ||
2587 | .fw = { | ||
2588 | .omap2 = { | ||
2589 | .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION, | ||
2590 | .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP, | ||
2591 | .flags = OMAP_FIREWALL_L4, | ||
2592 | } | ||
2593 | }, | ||
2594 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2595 | }; | ||
2596 | |||
2597 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = { | ||
2598 | .master = &omap3xxx_l4_core_hwmod, | ||
2599 | .slave = &omap3xxx_dss_core_hwmod, | ||
2600 | .clk = "dss_ick", | ||
2601 | .addr = omap2_dss_addrs, | ||
2602 | .fw = { | ||
2603 | .omap2 = { | ||
2604 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION, | ||
2605 | .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP, | ||
2606 | .flags = OMAP_FIREWALL_L4, | ||
2607 | } | ||
2608 | }, | ||
2609 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2610 | }; | ||
2611 | |||
2612 | /* l4_core -> dss_dispc */ | ||
2613 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = { | ||
2614 | .master = &omap3xxx_l4_core_hwmod, | ||
2615 | .slave = &omap3xxx_dss_dispc_hwmod, | ||
2616 | .clk = "dss_ick", | ||
2617 | .addr = omap2_dss_dispc_addrs, | ||
2618 | .fw = { | ||
2619 | .omap2 = { | ||
2620 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION, | ||
2621 | .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP, | ||
2622 | .flags = OMAP_FIREWALL_L4, | ||
2623 | } | ||
2624 | }, | ||
2625 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2626 | }; | ||
2627 | |||
2628 | static struct omap_hwmod_addr_space omap3xxx_dss_dsi1_addrs[] = { | ||
2629 | { | ||
2630 | .pa_start = 0x4804FC00, | ||
2631 | .pa_end = 0x4804FFFF, | ||
2632 | .flags = ADDR_TYPE_RT | ||
2633 | }, | ||
2634 | { } | ||
2635 | }; | ||
2636 | |||
2637 | /* l4_core -> dss_dsi1 */ | ||
2638 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = { | ||
2639 | .master = &omap3xxx_l4_core_hwmod, | ||
2640 | .slave = &omap3xxx_dss_dsi1_hwmod, | ||
2641 | .clk = "dss_ick", | ||
2642 | .addr = omap3xxx_dss_dsi1_addrs, | ||
2643 | .fw = { | ||
2644 | .omap2 = { | ||
2645 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION, | ||
2646 | .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP, | ||
2647 | .flags = OMAP_FIREWALL_L4, | ||
2648 | } | ||
2649 | }, | ||
2650 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2651 | }; | ||
2652 | |||
2653 | /* l4_core -> dss_rfbi */ | ||
2654 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = { | ||
2655 | .master = &omap3xxx_l4_core_hwmod, | ||
2656 | .slave = &omap3xxx_dss_rfbi_hwmod, | ||
2657 | .clk = "dss_ick", | ||
2658 | .addr = omap2_dss_rfbi_addrs, | ||
2659 | .fw = { | ||
2660 | .omap2 = { | ||
2661 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION, | ||
2662 | .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP , | ||
2663 | .flags = OMAP_FIREWALL_L4, | ||
2664 | } | ||
2665 | }, | ||
2666 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2667 | }; | ||
2668 | |||
2669 | /* l4_core -> dss_venc */ | ||
2670 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = { | ||
2671 | .master = &omap3xxx_l4_core_hwmod, | ||
2672 | .slave = &omap3xxx_dss_venc_hwmod, | ||
2673 | .clk = "dss_ick", | ||
2674 | .addr = omap2_dss_venc_addrs, | ||
2675 | .fw = { | ||
2676 | .omap2 = { | ||
2677 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION, | ||
2678 | .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP, | ||
2679 | .flags = OMAP_FIREWALL_L4, | ||
2680 | } | ||
2681 | }, | ||
2682 | .flags = OCPIF_SWSUP_IDLE, | ||
2683 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2684 | }; | ||
2685 | |||
2686 | /* l4_wkup -> gpio1 */ | ||
2687 | static struct omap_hwmod_addr_space omap3xxx_gpio1_addrs[] = { | ||
2688 | { | ||
2689 | .pa_start = 0x48310000, | ||
2690 | .pa_end = 0x483101ff, | ||
2691 | .flags = ADDR_TYPE_RT | ||
2692 | }, | ||
2693 | { } | ||
2694 | }; | ||
2695 | |||
2696 | static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = { | ||
2697 | .master = &omap3xxx_l4_wkup_hwmod, | ||
2698 | .slave = &omap3xxx_gpio1_hwmod, | ||
2699 | .addr = omap3xxx_gpio1_addrs, | ||
2700 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2701 | }; | ||
2702 | |||
2703 | /* l4_per -> gpio2 */ | ||
2704 | static struct omap_hwmod_addr_space omap3xxx_gpio2_addrs[] = { | ||
2705 | { | ||
2706 | .pa_start = 0x49050000, | ||
2707 | .pa_end = 0x490501ff, | ||
2708 | .flags = ADDR_TYPE_RT | ||
2709 | }, | ||
2710 | { } | ||
2711 | }; | ||
2712 | |||
2713 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = { | ||
2714 | .master = &omap3xxx_l4_per_hwmod, | ||
2715 | .slave = &omap3xxx_gpio2_hwmod, | ||
2716 | .addr = omap3xxx_gpio2_addrs, | ||
2717 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2718 | }; | ||
2719 | |||
2720 | /* l4_per -> gpio3 */ | ||
2721 | static struct omap_hwmod_addr_space omap3xxx_gpio3_addrs[] = { | ||
2722 | { | ||
2723 | .pa_start = 0x49052000, | ||
2724 | .pa_end = 0x490521ff, | ||
2725 | .flags = ADDR_TYPE_RT | ||
2726 | }, | ||
2727 | { } | ||
2728 | }; | ||
2729 | |||
2730 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = { | ||
2731 | .master = &omap3xxx_l4_per_hwmod, | ||
2732 | .slave = &omap3xxx_gpio3_hwmod, | ||
2733 | .addr = omap3xxx_gpio3_addrs, | ||
2734 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2735 | }; | ||
2736 | |||
2737 | /* l4_per -> gpio4 */ | ||
2738 | static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = { | ||
2739 | { | ||
2740 | .pa_start = 0x49054000, | ||
2741 | .pa_end = 0x490541ff, | ||
2742 | .flags = ADDR_TYPE_RT | ||
2743 | }, | ||
2744 | { } | ||
2745 | }; | ||
2746 | |||
2747 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = { | ||
2748 | .master = &omap3xxx_l4_per_hwmod, | ||
2749 | .slave = &omap3xxx_gpio4_hwmod, | ||
2750 | .addr = omap3xxx_gpio4_addrs, | ||
2751 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2752 | }; | ||
2753 | |||
2754 | /* l4_per -> gpio5 */ | ||
2755 | static struct omap_hwmod_addr_space omap3xxx_gpio5_addrs[] = { | ||
2756 | { | ||
2757 | .pa_start = 0x49056000, | ||
2758 | .pa_end = 0x490561ff, | ||
2759 | .flags = ADDR_TYPE_RT | ||
2760 | }, | ||
2761 | { } | ||
2762 | }; | ||
2763 | |||
2764 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = { | ||
2765 | .master = &omap3xxx_l4_per_hwmod, | ||
2766 | .slave = &omap3xxx_gpio5_hwmod, | ||
2767 | .addr = omap3xxx_gpio5_addrs, | ||
2768 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2769 | }; | ||
2770 | |||
2771 | /* l4_per -> gpio6 */ | ||
2772 | static struct omap_hwmod_addr_space omap3xxx_gpio6_addrs[] = { | ||
2773 | { | ||
2774 | .pa_start = 0x49058000, | ||
2775 | .pa_end = 0x490581ff, | ||
2776 | .flags = ADDR_TYPE_RT | ||
2777 | }, | ||
2778 | { } | ||
2779 | }; | ||
2780 | |||
2781 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = { | ||
2782 | .master = &omap3xxx_l4_per_hwmod, | ||
2783 | .slave = &omap3xxx_gpio6_hwmod, | ||
2784 | .addr = omap3xxx_gpio6_addrs, | ||
2785 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2786 | }; | ||
2787 | |||
2788 | /* dma_system -> L3 */ | ||
2789 | static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = { | ||
2790 | .master = &omap3xxx_dma_system_hwmod, | ||
2791 | .slave = &omap3xxx_l3_main_hwmod, | ||
2792 | .clk = "core_l3_ick", | ||
2793 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2794 | }; | ||
2795 | |||
2796 | static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = { | ||
2797 | { | ||
2798 | .pa_start = 0x48056000, | ||
2799 | .pa_end = 0x48056fff, | ||
2800 | .flags = ADDR_TYPE_RT | ||
2801 | }, | ||
2802 | { } | ||
2803 | }; | ||
2804 | |||
2805 | /* l4_cfg -> dma_system */ | ||
2806 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = { | ||
2807 | .master = &omap3xxx_l4_core_hwmod, | ||
2808 | .slave = &omap3xxx_dma_system_hwmod, | ||
2809 | .clk = "core_l4_ick", | ||
2810 | .addr = omap3xxx_dma_system_addrs, | ||
2811 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2812 | }; | ||
2813 | |||
2814 | static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = { | ||
2815 | { | ||
2816 | .name = "mpu", | ||
2817 | .pa_start = 0x48074000, | ||
2818 | .pa_end = 0x480740ff, | ||
2819 | .flags = ADDR_TYPE_RT | ||
2820 | }, | ||
2821 | { } | ||
2822 | }; | ||
2823 | |||
2824 | /* l4_core -> mcbsp1 */ | ||
2825 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = { | ||
2826 | .master = &omap3xxx_l4_core_hwmod, | ||
2827 | .slave = &omap3xxx_mcbsp1_hwmod, | ||
2828 | .clk = "mcbsp1_ick", | ||
2829 | .addr = omap3xxx_mcbsp1_addrs, | ||
2830 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2831 | }; | ||
2832 | |||
2833 | static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = { | ||
2834 | { | ||
2835 | .name = "mpu", | ||
2836 | .pa_start = 0x49022000, | ||
2837 | .pa_end = 0x490220ff, | ||
2838 | .flags = ADDR_TYPE_RT | ||
2839 | }, | ||
2840 | { } | ||
2841 | }; | ||
2842 | |||
2843 | /* l4_per -> mcbsp2 */ | ||
2844 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = { | ||
2845 | .master = &omap3xxx_l4_per_hwmod, | ||
2846 | .slave = &omap3xxx_mcbsp2_hwmod, | ||
2847 | .clk = "mcbsp2_ick", | ||
2848 | .addr = omap3xxx_mcbsp2_addrs, | ||
2849 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2850 | }; | ||
2851 | |||
2852 | static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = { | ||
2853 | { | ||
2854 | .name = "mpu", | ||
2855 | .pa_start = 0x49024000, | ||
2856 | .pa_end = 0x490240ff, | ||
2857 | .flags = ADDR_TYPE_RT | ||
2858 | }, | ||
2859 | { } | ||
2860 | }; | ||
2861 | |||
2862 | /* l4_per -> mcbsp3 */ | ||
2863 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = { | ||
2864 | .master = &omap3xxx_l4_per_hwmod, | ||
2865 | .slave = &omap3xxx_mcbsp3_hwmod, | ||
2866 | .clk = "mcbsp3_ick", | ||
2867 | .addr = omap3xxx_mcbsp3_addrs, | ||
2868 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2869 | }; | ||
2870 | |||
2871 | static struct omap_hwmod_addr_space omap3xxx_mcbsp4_addrs[] = { | ||
2872 | { | ||
2873 | .name = "mpu", | ||
2874 | .pa_start = 0x49026000, | ||
2875 | .pa_end = 0x490260ff, | ||
2876 | .flags = ADDR_TYPE_RT | ||
2877 | }, | ||
2878 | { } | ||
2879 | }; | ||
2880 | |||
2881 | /* l4_per -> mcbsp4 */ | ||
2882 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = { | ||
2883 | .master = &omap3xxx_l4_per_hwmod, | ||
2884 | .slave = &omap3xxx_mcbsp4_hwmod, | ||
2885 | .clk = "mcbsp4_ick", | ||
2886 | .addr = omap3xxx_mcbsp4_addrs, | ||
2887 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2888 | }; | ||
2889 | |||
2890 | static struct omap_hwmod_addr_space omap3xxx_mcbsp5_addrs[] = { | ||
2891 | { | ||
2892 | .name = "mpu", | ||
2893 | .pa_start = 0x48096000, | ||
2894 | .pa_end = 0x480960ff, | ||
2895 | .flags = ADDR_TYPE_RT | ||
2896 | }, | ||
2897 | { } | ||
2898 | }; | ||
2899 | |||
2900 | /* l4_core -> mcbsp5 */ | ||
2901 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = { | ||
2902 | .master = &omap3xxx_l4_core_hwmod, | ||
2903 | .slave = &omap3xxx_mcbsp5_hwmod, | ||
2904 | .clk = "mcbsp5_ick", | ||
2905 | .addr = omap3xxx_mcbsp5_addrs, | ||
2906 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2907 | }; | ||
2908 | |||
2909 | static struct omap_hwmod_addr_space omap3xxx_mcbsp2_sidetone_addrs[] = { | ||
2910 | { | ||
2911 | .name = "sidetone", | ||
2912 | .pa_start = 0x49028000, | ||
2913 | .pa_end = 0x490280ff, | ||
2914 | .flags = ADDR_TYPE_RT | ||
2915 | }, | ||
2916 | { } | ||
2917 | }; | ||
2918 | |||
2919 | /* l4_per -> mcbsp2_sidetone */ | ||
2920 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = { | ||
2921 | .master = &omap3xxx_l4_per_hwmod, | ||
2922 | .slave = &omap3xxx_mcbsp2_sidetone_hwmod, | ||
2923 | .clk = "mcbsp2_ick", | ||
2924 | .addr = omap3xxx_mcbsp2_sidetone_addrs, | ||
2925 | .user = OCP_USER_MPU, | ||
2926 | }; | ||
2927 | |||
2928 | static struct omap_hwmod_addr_space omap3xxx_mcbsp3_sidetone_addrs[] = { | ||
2929 | { | ||
2930 | .name = "sidetone", | ||
2931 | .pa_start = 0x4902A000, | ||
2932 | .pa_end = 0x4902A0ff, | ||
2933 | .flags = ADDR_TYPE_RT | ||
2934 | }, | ||
2935 | { } | ||
2936 | }; | ||
2937 | |||
2938 | /* l4_per -> mcbsp3_sidetone */ | ||
2939 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = { | ||
2940 | .master = &omap3xxx_l4_per_hwmod, | ||
2941 | .slave = &omap3xxx_mcbsp3_sidetone_hwmod, | ||
2942 | .clk = "mcbsp3_ick", | ||
2943 | .addr = omap3xxx_mcbsp3_sidetone_addrs, | ||
2944 | .user = OCP_USER_MPU, | ||
2945 | }; | ||
2946 | |||
2947 | static struct omap_hwmod_addr_space omap3xxx_mailbox_addrs[] = { | ||
2948 | { | ||
2949 | .pa_start = 0x48094000, | ||
2950 | .pa_end = 0x480941ff, | ||
2951 | .flags = ADDR_TYPE_RT, | ||
2952 | }, | ||
2953 | { } | ||
2954 | }; | ||
2955 | |||
2956 | /* l4_core -> mailbox */ | ||
2957 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = { | ||
2958 | .master = &omap3xxx_l4_core_hwmod, | ||
2959 | .slave = &omap3xxx_mailbox_hwmod, | ||
2960 | .addr = omap3xxx_mailbox_addrs, | ||
2961 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2962 | }; | ||
2963 | |||
2964 | /* l4 core -> mcspi1 interface */ | ||
2965 | static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = { | ||
2966 | .master = &omap3xxx_l4_core_hwmod, | ||
2967 | .slave = &omap34xx_mcspi1, | ||
2968 | .clk = "mcspi1_ick", | ||
2969 | .addr = omap2_mcspi1_addr_space, | ||
2970 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2971 | }; | ||
2972 | |||
2973 | /* l4 core -> mcspi2 interface */ | ||
2974 | static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = { | ||
2975 | .master = &omap3xxx_l4_core_hwmod, | ||
2976 | .slave = &omap34xx_mcspi2, | ||
2977 | .clk = "mcspi2_ick", | ||
2978 | .addr = omap2_mcspi2_addr_space, | ||
2979 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2980 | }; | ||
2981 | |||
2982 | /* l4 core -> mcspi3 interface */ | ||
2983 | static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = { | ||
2984 | .master = &omap3xxx_l4_core_hwmod, | ||
2985 | .slave = &omap34xx_mcspi3, | ||
2986 | .clk = "mcspi3_ick", | ||
2987 | .addr = omap2430_mcspi3_addr_space, | ||
2988 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2989 | }; | ||
2990 | |||
2991 | /* l4 core -> mcspi4 interface */ | ||
2992 | static struct omap_hwmod_addr_space omap34xx_mcspi4_addr_space[] = { | ||
2993 | { | ||
2994 | .pa_start = 0x480ba000, | ||
2995 | .pa_end = 0x480ba0ff, | ||
2996 | .flags = ADDR_TYPE_RT, | ||
2997 | }, | ||
2998 | { } | ||
2999 | }; | ||
3000 | |||
3001 | static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = { | ||
3002 | .master = &omap3xxx_l4_core_hwmod, | ||
3003 | .slave = &omap34xx_mcspi4, | ||
3004 | .clk = "mcspi4_ick", | ||
3005 | .addr = omap34xx_mcspi4_addr_space, | ||
3006 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3007 | }; | ||
3008 | |||
3009 | static struct omap_hwmod_ocp_if omap3xxx_usb_host_hs__l3_main_2 = { | ||
3010 | .master = &omap3xxx_usb_host_hs_hwmod, | ||
3011 | .slave = &omap3xxx_l3_main_hwmod, | ||
3012 | .clk = "core_l3_ick", | ||
3013 | .user = OCP_USER_MPU, | ||
3014 | }; | ||
3015 | |||
3016 | static struct omap_hwmod_addr_space omap3xxx_usb_host_hs_addrs[] = { | ||
3017 | { | ||
3018 | .name = "uhh", | ||
3019 | .pa_start = 0x48064000, | ||
3020 | .pa_end = 0x480643ff, | ||
3021 | .flags = ADDR_TYPE_RT | ||
3022 | }, | ||
3023 | { | ||
3024 | .name = "ohci", | ||
3025 | .pa_start = 0x48064400, | ||
3026 | .pa_end = 0x480647ff, | ||
3027 | }, | ||
3028 | { | ||
3029 | .name = "ehci", | ||
3030 | .pa_start = 0x48064800, | ||
3031 | .pa_end = 0x48064cff, | ||
3032 | }, | ||
3033 | {} | ||
3034 | }; | ||
3035 | |||
3036 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_host_hs = { | ||
3037 | .master = &omap3xxx_l4_core_hwmod, | ||
3038 | .slave = &omap3xxx_usb_host_hs_hwmod, | ||
3039 | .clk = "usbhost_ick", | ||
3040 | .addr = omap3xxx_usb_host_hs_addrs, | ||
3041 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3042 | }; | ||
3043 | |||
3504 | static struct omap_hwmod_addr_space omap3xxx_usb_tll_hs_addrs[] = { | 3044 | static struct omap_hwmod_addr_space omap3xxx_usb_tll_hs_addrs[] = { |
3505 | { | 3045 | { |
3506 | .name = "tll", | 3046 | .name = "tll", |
@@ -3519,183 +3059,156 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_tll_hs = { | |||
3519 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 3059 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
3520 | }; | 3060 | }; |
3521 | 3061 | ||
3522 | static struct omap_hwmod_ocp_if *omap3xxx_usb_tll_hs_slaves[] = { | 3062 | static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = { |
3523 | &omap3xxx_l4_core__usb_tll_hs, | 3063 | &omap3xxx_l3_main__l4_core, |
3524 | }; | 3064 | &omap3xxx_l3_main__l4_per, |
3525 | 3065 | &omap3xxx_mpu__l3_main, | |
3526 | static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod = { | 3066 | &omap3xxx_l4_core__l4_wkup, |
3527 | .name = "usb_tll_hs", | 3067 | &omap3xxx_l4_core__mmc3, |
3528 | .class = &omap3xxx_usb_tll_hs_hwmod_class, | 3068 | &omap3_l4_core__uart1, |
3529 | .clkdm_name = "l3_init_clkdm", | 3069 | &omap3_l4_core__uart2, |
3530 | .mpu_irqs = omap3xxx_usb_tll_hs_irqs, | 3070 | &omap3_l4_per__uart3, |
3531 | .main_clk = "usbtll_fck", | 3071 | &omap3_l4_core__i2c1, |
3532 | .prcm = { | 3072 | &omap3_l4_core__i2c2, |
3533 | .omap2 = { | 3073 | &omap3_l4_core__i2c3, |
3534 | .module_offs = CORE_MOD, | 3074 | &omap3xxx_l4_wkup__l4_sec, |
3535 | .prcm_reg_id = 3, | 3075 | &omap3xxx_l4_wkup__timer1, |
3536 | .module_bit = OMAP3430ES2_EN_USBTLL_SHIFT, | 3076 | &omap3xxx_l4_per__timer2, |
3537 | .idlest_reg_id = 3, | 3077 | &omap3xxx_l4_per__timer3, |
3538 | .idlest_idle_bit = OMAP3430ES2_ST_USBTLL_SHIFT, | 3078 | &omap3xxx_l4_per__timer4, |
3539 | }, | 3079 | &omap3xxx_l4_per__timer5, |
3540 | }, | 3080 | &omap3xxx_l4_per__timer6, |
3541 | .slaves = omap3xxx_usb_tll_hs_slaves, | 3081 | &omap3xxx_l4_per__timer7, |
3542 | .slaves_cnt = ARRAY_SIZE(omap3xxx_usb_tll_hs_slaves), | 3082 | &omap3xxx_l4_per__timer8, |
3543 | }; | 3083 | &omap3xxx_l4_per__timer9, |
3544 | 3084 | &omap3xxx_l4_core__timer10, | |
3545 | static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { | 3085 | &omap3xxx_l4_core__timer11, |
3546 | &omap3xxx_l3_main_hwmod, | 3086 | &omap3xxx_l4_wkup__wd_timer2, |
3547 | &omap3xxx_l4_core_hwmod, | 3087 | &omap3xxx_l4_wkup__gpio1, |
3548 | &omap3xxx_l4_per_hwmod, | 3088 | &omap3xxx_l4_per__gpio2, |
3549 | &omap3xxx_l4_wkup_hwmod, | 3089 | &omap3xxx_l4_per__gpio3, |
3550 | &omap3xxx_mmc3_hwmod, | 3090 | &omap3xxx_l4_per__gpio4, |
3551 | &omap3xxx_mpu_hwmod, | 3091 | &omap3xxx_l4_per__gpio5, |
3552 | 3092 | &omap3xxx_l4_per__gpio6, | |
3553 | &omap3xxx_timer1_hwmod, | 3093 | &omap3xxx_dma_system__l3, |
3554 | &omap3xxx_timer2_hwmod, | 3094 | &omap3xxx_l4_core__dma_system, |
3555 | &omap3xxx_timer3_hwmod, | 3095 | &omap3xxx_l4_core__mcbsp1, |
3556 | &omap3xxx_timer4_hwmod, | 3096 | &omap3xxx_l4_per__mcbsp2, |
3557 | &omap3xxx_timer5_hwmod, | 3097 | &omap3xxx_l4_per__mcbsp3, |
3558 | &omap3xxx_timer6_hwmod, | 3098 | &omap3xxx_l4_per__mcbsp4, |
3559 | &omap3xxx_timer7_hwmod, | 3099 | &omap3xxx_l4_core__mcbsp5, |
3560 | &omap3xxx_timer8_hwmod, | 3100 | &omap3xxx_l4_per__mcbsp2_sidetone, |
3561 | &omap3xxx_timer9_hwmod, | 3101 | &omap3xxx_l4_per__mcbsp3_sidetone, |
3562 | &omap3xxx_timer10_hwmod, | 3102 | &omap34xx_l4_core__mcspi1, |
3563 | &omap3xxx_timer11_hwmod, | 3103 | &omap34xx_l4_core__mcspi2, |
3564 | 3104 | &omap34xx_l4_core__mcspi3, | |
3565 | &omap3xxx_wd_timer2_hwmod, | 3105 | &omap34xx_l4_core__mcspi4, |
3566 | &omap3xxx_uart1_hwmod, | ||
3567 | &omap3xxx_uart2_hwmod, | ||
3568 | &omap3xxx_uart3_hwmod, | ||
3569 | |||
3570 | /* i2c class */ | ||
3571 | &omap3xxx_i2c1_hwmod, | ||
3572 | &omap3xxx_i2c2_hwmod, | ||
3573 | &omap3xxx_i2c3_hwmod, | ||
3574 | |||
3575 | /* gpio class */ | ||
3576 | &omap3xxx_gpio1_hwmod, | ||
3577 | &omap3xxx_gpio2_hwmod, | ||
3578 | &omap3xxx_gpio3_hwmod, | ||
3579 | &omap3xxx_gpio4_hwmod, | ||
3580 | &omap3xxx_gpio5_hwmod, | ||
3581 | &omap3xxx_gpio6_hwmod, | ||
3582 | |||
3583 | /* dma_system class*/ | ||
3584 | &omap3xxx_dma_system_hwmod, | ||
3585 | |||
3586 | /* mcbsp class */ | ||
3587 | &omap3xxx_mcbsp1_hwmod, | ||
3588 | &omap3xxx_mcbsp2_hwmod, | ||
3589 | &omap3xxx_mcbsp3_hwmod, | ||
3590 | &omap3xxx_mcbsp4_hwmod, | ||
3591 | &omap3xxx_mcbsp5_hwmod, | ||
3592 | &omap3xxx_mcbsp2_sidetone_hwmod, | ||
3593 | &omap3xxx_mcbsp3_sidetone_hwmod, | ||
3594 | |||
3595 | |||
3596 | /* mcspi class */ | ||
3597 | &omap34xx_mcspi1, | ||
3598 | &omap34xx_mcspi2, | ||
3599 | &omap34xx_mcspi3, | ||
3600 | &omap34xx_mcspi4, | ||
3601 | |||
3602 | NULL, | 3106 | NULL, |
3603 | }; | 3107 | }; |
3604 | 3108 | ||
3605 | /* GP-only hwmods */ | 3109 | /* GP-only hwmod links */ |
3606 | static __initdata struct omap_hwmod *omap3xxx_gp_hwmods[] = { | 3110 | static struct omap_hwmod_ocp_if *omap3xxx_gp_hwmod_ocp_ifs[] __initdata = { |
3607 | &omap3xxx_timer12_hwmod, | 3111 | &omap3xxx_l4_sec__timer12, |
3608 | NULL | 3112 | NULL |
3609 | }; | 3113 | }; |
3610 | 3114 | ||
3611 | /* 3430ES1-only hwmods */ | 3115 | /* 3430ES1-only hwmod links */ |
3612 | static __initdata struct omap_hwmod *omap3430es1_hwmods[] = { | 3116 | static struct omap_hwmod_ocp_if *omap3430es1_hwmod_ocp_ifs[] __initdata = { |
3613 | &omap3430es1_dss_core_hwmod, | 3117 | &omap3430es1_dss__l3, |
3118 | &omap3430es1_l4_core__dss, | ||
3614 | NULL | 3119 | NULL |
3615 | }; | 3120 | }; |
3616 | 3121 | ||
3617 | /* 3430ES2+-only hwmods */ | 3122 | /* 3430ES2+-only hwmod links */ |
3618 | static __initdata struct omap_hwmod *omap3430es2plus_hwmods[] = { | 3123 | static struct omap_hwmod_ocp_if *omap3430es2plus_hwmod_ocp_ifs[] __initdata = { |
3619 | &omap3xxx_dss_core_hwmod, | 3124 | &omap3xxx_dss__l3, |
3620 | &omap3xxx_usbhsotg_hwmod, | 3125 | &omap3xxx_l4_core__dss, |
3621 | &omap3xxx_usb_host_hs_hwmod, | 3126 | &omap3xxx_usbhsotg__l3, |
3622 | &omap3xxx_usb_tll_hs_hwmod, | 3127 | &omap3xxx_l4_core__usbhsotg, |
3128 | &omap3xxx_usb_host_hs__l3_main_2, | ||
3129 | &omap3xxx_l4_core__usb_host_hs, | ||
3130 | &omap3xxx_l4_core__usb_tll_hs, | ||
3623 | NULL | 3131 | NULL |
3624 | }; | 3132 | }; |
3625 | 3133 | ||
3626 | /* <= 3430ES3-only hwmods */ | 3134 | /* <= 3430ES3-only hwmod links */ |
3627 | static struct omap_hwmod *omap3430_pre_es3_hwmods[] __initdata = { | 3135 | static struct omap_hwmod_ocp_if *omap3430_pre_es3_hwmod_ocp_ifs[] __initdata = { |
3628 | &omap3xxx_pre_es3_mmc1_hwmod, | 3136 | &omap3xxx_l4_core__pre_es3_mmc1, |
3629 | &omap3xxx_pre_es3_mmc2_hwmod, | 3137 | &omap3xxx_l4_core__pre_es3_mmc2, |
3630 | NULL | 3138 | NULL |
3631 | }; | 3139 | }; |
3632 | 3140 | ||
3633 | /* 3430ES3+-only hwmods */ | 3141 | /* 3430ES3+-only hwmod links */ |
3634 | static struct omap_hwmod *omap3430_es3plus_hwmods[] __initdata = { | 3142 | static struct omap_hwmod_ocp_if *omap3430_es3plus_hwmod_ocp_ifs[] __initdata = { |
3635 | &omap3xxx_es3plus_mmc1_hwmod, | 3143 | &omap3xxx_l4_core__es3plus_mmc1, |
3636 | &omap3xxx_es3plus_mmc2_hwmod, | 3144 | &omap3xxx_l4_core__es3plus_mmc2, |
3637 | NULL | 3145 | NULL |
3638 | }; | 3146 | }; |
3639 | 3147 | ||
3640 | /* 34xx-only hwmods (all ES revisions) */ | 3148 | /* 34xx-only hwmod links (all ES revisions) */ |
3641 | static __initdata struct omap_hwmod *omap34xx_hwmods[] = { | 3149 | static struct omap_hwmod_ocp_if *omap34xx_hwmod_ocp_ifs[] __initdata = { |
3642 | &omap3xxx_iva_hwmod, | 3150 | &omap3xxx_l3__iva, |
3643 | &omap34xx_sr1_hwmod, | 3151 | &omap34xx_l4_core__sr1, |
3644 | &omap34xx_sr2_hwmod, | 3152 | &omap34xx_l4_core__sr2, |
3645 | &omap3xxx_mailbox_hwmod, | 3153 | &omap3xxx_l4_core__mailbox, |
3646 | NULL | 3154 | NULL |
3647 | }; | 3155 | }; |
3648 | 3156 | ||
3649 | /* 36xx-only hwmods (all ES revisions) */ | 3157 | /* 36xx-only hwmod links (all ES revisions) */ |
3650 | static __initdata struct omap_hwmod *omap36xx_hwmods[] = { | 3158 | static struct omap_hwmod_ocp_if *omap36xx_hwmod_ocp_ifs[] __initdata = { |
3651 | &omap3xxx_iva_hwmod, | 3159 | &omap3xxx_l3__iva, |
3652 | &omap3xxx_uart4_hwmod, | 3160 | &omap36xx_l4_per__uart4, |
3653 | &omap3xxx_dss_core_hwmod, | 3161 | &omap3xxx_dss__l3, |
3654 | &omap36xx_sr1_hwmod, | 3162 | &omap3xxx_l4_core__dss, |
3655 | &omap36xx_sr2_hwmod, | 3163 | &omap36xx_l4_core__sr1, |
3656 | &omap3xxx_usbhsotg_hwmod, | 3164 | &omap36xx_l4_core__sr2, |
3657 | &omap3xxx_mailbox_hwmod, | 3165 | &omap3xxx_usbhsotg__l3, |
3658 | &omap3xxx_usb_host_hs_hwmod, | 3166 | &omap3xxx_l4_core__usbhsotg, |
3659 | &omap3xxx_usb_tll_hs_hwmod, | 3167 | &omap3xxx_l4_core__mailbox, |
3660 | &omap3xxx_es3plus_mmc1_hwmod, | 3168 | &omap3xxx_usb_host_hs__l3_main_2, |
3661 | &omap3xxx_es3plus_mmc2_hwmod, | 3169 | &omap3xxx_l4_core__usb_host_hs, |
3170 | &omap3xxx_l4_core__usb_tll_hs, | ||
3171 | &omap3xxx_l4_core__es3plus_mmc1, | ||
3172 | &omap3xxx_l4_core__es3plus_mmc2, | ||
3662 | NULL | 3173 | NULL |
3663 | }; | 3174 | }; |
3664 | 3175 | ||
3665 | static __initdata struct omap_hwmod *am35xx_hwmods[] = { | 3176 | static struct omap_hwmod_ocp_if *am35xx_hwmod_ocp_ifs[] __initdata = { |
3666 | &omap3xxx_dss_core_hwmod, /* XXX ??? */ | 3177 | &omap3xxx_dss__l3, |
3667 | &am35xx_usbhsotg_hwmod, | 3178 | &omap3xxx_l4_core__dss, |
3668 | &am35xx_uart4_hwmod, | 3179 | &am35xx_usbhsotg__l3, |
3669 | &omap3xxx_usb_host_hs_hwmod, | 3180 | &am35xx_l4_core__usbhsotg, |
3670 | &omap3xxx_usb_tll_hs_hwmod, | 3181 | &am35xx_l4_core__uart4, |
3671 | &omap3xxx_es3plus_mmc1_hwmod, | 3182 | &omap3xxx_usb_host_hs__l3_main_2, |
3672 | &omap3xxx_es3plus_mmc2_hwmod, | 3183 | &omap3xxx_l4_core__usb_host_hs, |
3184 | &omap3xxx_l4_core__usb_tll_hs, | ||
3185 | &omap3xxx_l4_core__es3plus_mmc1, | ||
3186 | &omap3xxx_l4_core__es3plus_mmc2, | ||
3673 | NULL | 3187 | NULL |
3674 | }; | 3188 | }; |
3675 | 3189 | ||
3676 | static __initdata struct omap_hwmod *omap3xxx_dss_hwmods[] = { | 3190 | static struct omap_hwmod_ocp_if *omap3xxx_dss_hwmod_ocp_ifs[] __initdata = { |
3677 | /* dss class */ | 3191 | &omap3xxx_l4_core__dss_dispc, |
3678 | &omap3xxx_dss_dispc_hwmod, | 3192 | &omap3xxx_l4_core__dss_dsi1, |
3679 | &omap3xxx_dss_dsi1_hwmod, | 3193 | &omap3xxx_l4_core__dss_rfbi, |
3680 | &omap3xxx_dss_rfbi_hwmod, | 3194 | &omap3xxx_l4_core__dss_venc, |
3681 | &omap3xxx_dss_venc_hwmod, | ||
3682 | NULL | 3195 | NULL |
3683 | }; | 3196 | }; |
3684 | 3197 | ||
3685 | int __init omap3xxx_hwmod_init(void) | 3198 | int __init omap3xxx_hwmod_init(void) |
3686 | { | 3199 | { |
3687 | int r; | 3200 | int r; |
3688 | struct omap_hwmod **h = NULL; | 3201 | struct omap_hwmod_ocp_if **h = NULL; |
3689 | unsigned int rev; | 3202 | unsigned int rev; |
3690 | 3203 | ||
3691 | /* Register hwmods common to all OMAP3 */ | 3204 | /* Register hwmod links common to all OMAP3 */ |
3692 | r = omap_hwmod_register(omap3xxx_hwmods); | 3205 | r = omap_hwmod_register_links(omap3xxx_hwmod_ocp_ifs); |
3693 | if (r < 0) | 3206 | if (r < 0) |
3694 | return r; | 3207 | return r; |
3695 | 3208 | ||
3696 | /* Register GP-only hwmods. */ | 3209 | /* Register GP-only hwmod links. */ |
3697 | if (omap_type() == OMAP2_DEVICE_TYPE_GP) { | 3210 | if (omap_type() == OMAP2_DEVICE_TYPE_GP) { |
3698 | r = omap_hwmod_register(omap3xxx_gp_hwmods); | 3211 | r = omap_hwmod_register_links(omap3xxx_gp_hwmod_ocp_ifs); |
3699 | if (r < 0) | 3212 | if (r < 0) |
3700 | return r; | 3213 | return r; |
3701 | } | 3214 | } |
@@ -3703,43 +3216,43 @@ int __init omap3xxx_hwmod_init(void) | |||
3703 | rev = omap_rev(); | 3216 | rev = omap_rev(); |
3704 | 3217 | ||
3705 | /* | 3218 | /* |
3706 | * Register hwmods common to individual OMAP3 families, all | 3219 | * Register hwmod links common to individual OMAP3 families, all |
3707 | * silicon revisions (e.g., 34xx, or AM3505/3517, or 36xx) | 3220 | * silicon revisions (e.g., 34xx, or AM3505/3517, or 36xx) |
3708 | * All possible revisions should be included in this conditional. | 3221 | * All possible revisions should be included in this conditional. |
3709 | */ | 3222 | */ |
3710 | if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 || | 3223 | if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 || |
3711 | rev == OMAP3430_REV_ES2_1 || rev == OMAP3430_REV_ES3_0 || | 3224 | rev == OMAP3430_REV_ES2_1 || rev == OMAP3430_REV_ES3_0 || |
3712 | rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2) { | 3225 | rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2) { |
3713 | h = omap34xx_hwmods; | 3226 | h = omap34xx_hwmod_ocp_ifs; |
3714 | } else if (rev == OMAP3517_REV_ES1_0 || rev == OMAP3517_REV_ES1_1) { | 3227 | } else if (rev == OMAP3517_REV_ES1_0 || rev == OMAP3517_REV_ES1_1) { |
3715 | h = am35xx_hwmods; | 3228 | h = am35xx_hwmod_ocp_ifs; |
3716 | } else if (rev == OMAP3630_REV_ES1_0 || rev == OMAP3630_REV_ES1_1 || | 3229 | } else if (rev == OMAP3630_REV_ES1_0 || rev == OMAP3630_REV_ES1_1 || |
3717 | rev == OMAP3630_REV_ES1_2) { | 3230 | rev == OMAP3630_REV_ES1_2) { |
3718 | h = omap36xx_hwmods; | 3231 | h = omap36xx_hwmod_ocp_ifs; |
3719 | } else { | 3232 | } else { |
3720 | WARN(1, "OMAP3 hwmod family init: unknown chip type\n"); | 3233 | WARN(1, "OMAP3 hwmod family init: unknown chip type\n"); |
3721 | return -EINVAL; | 3234 | return -EINVAL; |
3722 | }; | 3235 | }; |
3723 | 3236 | ||
3724 | r = omap_hwmod_register(h); | 3237 | r = omap_hwmod_register_links(h); |
3725 | if (r < 0) | 3238 | if (r < 0) |
3726 | return r; | 3239 | return r; |
3727 | 3240 | ||
3728 | /* | 3241 | /* |
3729 | * Register hwmods specific to certain ES levels of a | 3242 | * Register hwmod links specific to certain ES levels of a |
3730 | * particular family of silicon (e.g., 34xx ES1.0) | 3243 | * particular family of silicon (e.g., 34xx ES1.0) |
3731 | */ | 3244 | */ |
3732 | h = NULL; | 3245 | h = NULL; |
3733 | if (rev == OMAP3430_REV_ES1_0) { | 3246 | if (rev == OMAP3430_REV_ES1_0) { |
3734 | h = omap3430es1_hwmods; | 3247 | h = omap3430es1_hwmod_ocp_ifs; |
3735 | } else if (rev == OMAP3430_REV_ES2_0 || rev == OMAP3430_REV_ES2_1 || | 3248 | } else if (rev == OMAP3430_REV_ES2_0 || rev == OMAP3430_REV_ES2_1 || |
3736 | rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 || | 3249 | rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 || |
3737 | rev == OMAP3430_REV_ES3_1_2) { | 3250 | rev == OMAP3430_REV_ES3_1_2) { |
3738 | h = omap3430es2plus_hwmods; | 3251 | h = omap3430es2plus_hwmod_ocp_ifs; |
3739 | }; | 3252 | }; |
3740 | 3253 | ||
3741 | if (h) { | 3254 | if (h) { |
3742 | r = omap_hwmod_register(h); | 3255 | r = omap_hwmod_register_links(h); |
3743 | if (r < 0) | 3256 | if (r < 0) |
3744 | return r; | 3257 | return r; |
3745 | } | 3258 | } |
@@ -3747,29 +3260,29 @@ int __init omap3xxx_hwmod_init(void) | |||
3747 | h = NULL; | 3260 | h = NULL; |
3748 | if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 || | 3261 | if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 || |
3749 | rev == OMAP3430_REV_ES2_1) { | 3262 | rev == OMAP3430_REV_ES2_1) { |
3750 | h = omap3430_pre_es3_hwmods; | 3263 | h = omap3430_pre_es3_hwmod_ocp_ifs; |
3751 | } else if (rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 || | 3264 | } else if (rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 || |
3752 | rev == OMAP3430_REV_ES3_1_2) { | 3265 | rev == OMAP3430_REV_ES3_1_2) { |
3753 | h = omap3430_es3plus_hwmods; | 3266 | h = omap3430_es3plus_hwmod_ocp_ifs; |
3754 | }; | 3267 | }; |
3755 | 3268 | ||
3756 | if (h) | 3269 | if (h) |
3757 | r = omap_hwmod_register(h); | 3270 | r = omap_hwmod_register_links(h); |
3758 | if (r < 0) | 3271 | if (r < 0) |
3759 | return r; | 3272 | return r; |
3760 | 3273 | ||
3761 | /* | 3274 | /* |
3762 | * DSS code presumes that dss_core hwmod is handled first, | 3275 | * DSS code presumes that dss_core hwmod is handled first, |
3763 | * _before_ any other DSS related hwmods so register common | 3276 | * _before_ any other DSS related hwmods so register common |
3764 | * DSS hwmods last to ensure that dss_core is already registered. | 3277 | * DSS hwmod links last to ensure that dss_core is already |
3765 | * Otherwise some change things may happen, for ex. if dispc | 3278 | * registered. Otherwise some change things may happen, for |
3766 | * is handled before dss_core and DSS is enabled in bootloader | 3279 | * ex. if dispc is handled before dss_core and DSS is enabled |
3767 | * DIPSC will be reset with outputs enabled which sometimes leads | 3280 | * in bootloader DISPC will be reset with outputs enabled |
3768 | * to unrecoverable L3 error. | 3281 | * which sometimes leads to unrecoverable L3 error. XXX The |
3769 | * XXX The long-term fix to this is to ensure modules are set up | 3282 | * long-term fix to this is to ensure hwmods are set up in |
3770 | * in dependency order in the hwmod core code. | 3283 | * dependency order in the hwmod core code. |
3771 | */ | 3284 | */ |
3772 | r = omap_hwmod_register(omap3xxx_dss_hwmods); | 3285 | r = omap_hwmod_register_links(omap3xxx_dss_hwmod_ocp_ifs); |
3773 | 3286 | ||
3774 | return r; | 3287 | return r; |
3775 | } | 3288 | } |
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index 6abc75753e4..0d91dec5b4b 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Hardware modules present on the OMAP44xx chips | 2 | * Hardware modules present on the OMAP44xx chips |
3 | * | 3 | * |
4 | * Copyright (C) 2009-2011 Texas Instruments, Inc. | 4 | * Copyright (C) 2009-2012 Texas Instruments, Inc. |
5 | * Copyright (C) 2009-2010 Nokia Corporation | 5 | * Copyright (C) 2009-2010 Nokia Corporation |
6 | * | 6 | * |
7 | * Paul Walmsley | 7 | * Paul Walmsley |
@@ -44,38 +44,10 @@ | |||
44 | #define OMAP44XX_IRQ_GIC_START 32 | 44 | #define OMAP44XX_IRQ_GIC_START 32 |
45 | 45 | ||
46 | /* Base offset for all OMAP4 dma requests */ | 46 | /* Base offset for all OMAP4 dma requests */ |
47 | #define OMAP44XX_DMA_REQ_START 1 | 47 | #define OMAP44XX_DMA_REQ_START 1 |
48 | |||
49 | /* Backward references (IPs with Bus Master capability) */ | ||
50 | static struct omap_hwmod omap44xx_aess_hwmod; | ||
51 | static struct omap_hwmod omap44xx_dma_system_hwmod; | ||
52 | static struct omap_hwmod omap44xx_dmm_hwmod; | ||
53 | static struct omap_hwmod omap44xx_dsp_hwmod; | ||
54 | static struct omap_hwmod omap44xx_dss_hwmod; | ||
55 | static struct omap_hwmod omap44xx_emif_fw_hwmod; | ||
56 | static struct omap_hwmod omap44xx_hsi_hwmod; | ||
57 | static struct omap_hwmod omap44xx_ipu_hwmod; | ||
58 | static struct omap_hwmod omap44xx_iss_hwmod; | ||
59 | static struct omap_hwmod omap44xx_iva_hwmod; | ||
60 | static struct omap_hwmod omap44xx_l3_instr_hwmod; | ||
61 | static struct omap_hwmod omap44xx_l3_main_1_hwmod; | ||
62 | static struct omap_hwmod omap44xx_l3_main_2_hwmod; | ||
63 | static struct omap_hwmod omap44xx_l3_main_3_hwmod; | ||
64 | static struct omap_hwmod omap44xx_l4_abe_hwmod; | ||
65 | static struct omap_hwmod omap44xx_l4_cfg_hwmod; | ||
66 | static struct omap_hwmod omap44xx_l4_per_hwmod; | ||
67 | static struct omap_hwmod omap44xx_l4_wkup_hwmod; | ||
68 | static struct omap_hwmod omap44xx_mmc1_hwmod; | ||
69 | static struct omap_hwmod omap44xx_mmc2_hwmod; | ||
70 | static struct omap_hwmod omap44xx_mpu_hwmod; | ||
71 | static struct omap_hwmod omap44xx_mpu_private_hwmod; | ||
72 | static struct omap_hwmod omap44xx_usb_otg_hs_hwmod; | ||
73 | static struct omap_hwmod omap44xx_usb_host_hs_hwmod; | ||
74 | static struct omap_hwmod omap44xx_usb_tll_hs_hwmod; | ||
75 | 48 | ||
76 | /* | 49 | /* |
77 | * Interconnects omap_hwmod structures | 50 | * IP blocks |
78 | * hwmods that compose the global OMAP interconnect | ||
79 | */ | 51 | */ |
80 | 52 | ||
81 | /* | 53 | /* |
@@ -92,51 +64,17 @@ static struct omap_hwmod_irq_info omap44xx_dmm_irqs[] = { | |||
92 | { .irq = -1 } | 64 | { .irq = -1 } |
93 | }; | 65 | }; |
94 | 66 | ||
95 | /* l3_main_1 -> dmm */ | ||
96 | static struct omap_hwmod_ocp_if omap44xx_l3_main_1__dmm = { | ||
97 | .master = &omap44xx_l3_main_1_hwmod, | ||
98 | .slave = &omap44xx_dmm_hwmod, | ||
99 | .clk = "l3_div_ck", | ||
100 | .user = OCP_USER_SDMA, | ||
101 | }; | ||
102 | |||
103 | static struct omap_hwmod_addr_space omap44xx_dmm_addrs[] = { | ||
104 | { | ||
105 | .pa_start = 0x4e000000, | ||
106 | .pa_end = 0x4e0007ff, | ||
107 | .flags = ADDR_TYPE_RT | ||
108 | }, | ||
109 | { } | ||
110 | }; | ||
111 | |||
112 | /* mpu -> dmm */ | ||
113 | static struct omap_hwmod_ocp_if omap44xx_mpu__dmm = { | ||
114 | .master = &omap44xx_mpu_hwmod, | ||
115 | .slave = &omap44xx_dmm_hwmod, | ||
116 | .clk = "l3_div_ck", | ||
117 | .addr = omap44xx_dmm_addrs, | ||
118 | .user = OCP_USER_MPU, | ||
119 | }; | ||
120 | |||
121 | /* dmm slave ports */ | ||
122 | static struct omap_hwmod_ocp_if *omap44xx_dmm_slaves[] = { | ||
123 | &omap44xx_l3_main_1__dmm, | ||
124 | &omap44xx_mpu__dmm, | ||
125 | }; | ||
126 | |||
127 | static struct omap_hwmod omap44xx_dmm_hwmod = { | 67 | static struct omap_hwmod omap44xx_dmm_hwmod = { |
128 | .name = "dmm", | 68 | .name = "dmm", |
129 | .class = &omap44xx_dmm_hwmod_class, | 69 | .class = &omap44xx_dmm_hwmod_class, |
130 | .clkdm_name = "l3_emif_clkdm", | 70 | .clkdm_name = "l3_emif_clkdm", |
71 | .mpu_irqs = omap44xx_dmm_irqs, | ||
131 | .prcm = { | 72 | .prcm = { |
132 | .omap4 = { | 73 | .omap4 = { |
133 | .clkctrl_offs = OMAP4_CM_MEMIF_DMM_CLKCTRL_OFFSET, | 74 | .clkctrl_offs = OMAP4_CM_MEMIF_DMM_CLKCTRL_OFFSET, |
134 | .context_offs = OMAP4_RM_MEMIF_DMM_CONTEXT_OFFSET, | 75 | .context_offs = OMAP4_RM_MEMIF_DMM_CONTEXT_OFFSET, |
135 | }, | 76 | }, |
136 | }, | 77 | }, |
137 | .slaves = omap44xx_dmm_slaves, | ||
138 | .slaves_cnt = ARRAY_SIZE(omap44xx_dmm_slaves), | ||
139 | .mpu_irqs = omap44xx_dmm_irqs, | ||
140 | }; | 78 | }; |
141 | 79 | ||
142 | /* | 80 | /* |
@@ -148,38 +86,6 @@ static struct omap_hwmod_class omap44xx_emif_fw_hwmod_class = { | |||
148 | }; | 86 | }; |
149 | 87 | ||
150 | /* emif_fw */ | 88 | /* emif_fw */ |
151 | /* dmm -> emif_fw */ | ||
152 | static struct omap_hwmod_ocp_if omap44xx_dmm__emif_fw = { | ||
153 | .master = &omap44xx_dmm_hwmod, | ||
154 | .slave = &omap44xx_emif_fw_hwmod, | ||
155 | .clk = "l3_div_ck", | ||
156 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
157 | }; | ||
158 | |||
159 | static struct omap_hwmod_addr_space omap44xx_emif_fw_addrs[] = { | ||
160 | { | ||
161 | .pa_start = 0x4a20c000, | ||
162 | .pa_end = 0x4a20c0ff, | ||
163 | .flags = ADDR_TYPE_RT | ||
164 | }, | ||
165 | { } | ||
166 | }; | ||
167 | |||
168 | /* l4_cfg -> emif_fw */ | ||
169 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__emif_fw = { | ||
170 | .master = &omap44xx_l4_cfg_hwmod, | ||
171 | .slave = &omap44xx_emif_fw_hwmod, | ||
172 | .clk = "l4_div_ck", | ||
173 | .addr = omap44xx_emif_fw_addrs, | ||
174 | .user = OCP_USER_MPU, | ||
175 | }; | ||
176 | |||
177 | /* emif_fw slave ports */ | ||
178 | static struct omap_hwmod_ocp_if *omap44xx_emif_fw_slaves[] = { | ||
179 | &omap44xx_dmm__emif_fw, | ||
180 | &omap44xx_l4_cfg__emif_fw, | ||
181 | }; | ||
182 | |||
183 | static struct omap_hwmod omap44xx_emif_fw_hwmod = { | 89 | static struct omap_hwmod omap44xx_emif_fw_hwmod = { |
184 | .name = "emif_fw", | 90 | .name = "emif_fw", |
185 | .class = &omap44xx_emif_fw_hwmod_class, | 91 | .class = &omap44xx_emif_fw_hwmod_class, |
@@ -190,8 +96,6 @@ static struct omap_hwmod omap44xx_emif_fw_hwmod = { | |||
190 | .context_offs = OMAP4_RM_MEMIF_EMIF_FW_CONTEXT_OFFSET, | 96 | .context_offs = OMAP4_RM_MEMIF_EMIF_FW_CONTEXT_OFFSET, |
191 | }, | 97 | }, |
192 | }, | 98 | }, |
193 | .slaves = omap44xx_emif_fw_slaves, | ||
194 | .slaves_cnt = ARRAY_SIZE(omap44xx_emif_fw_slaves), | ||
195 | }; | 99 | }; |
196 | 100 | ||
197 | /* | 101 | /* |
@@ -203,28 +107,6 @@ static struct omap_hwmod_class omap44xx_l3_hwmod_class = { | |||
203 | }; | 107 | }; |
204 | 108 | ||
205 | /* l3_instr */ | 109 | /* l3_instr */ |
206 | /* iva -> l3_instr */ | ||
207 | static struct omap_hwmod_ocp_if omap44xx_iva__l3_instr = { | ||
208 | .master = &omap44xx_iva_hwmod, | ||
209 | .slave = &omap44xx_l3_instr_hwmod, | ||
210 | .clk = "l3_div_ck", | ||
211 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
212 | }; | ||
213 | |||
214 | /* l3_main_3 -> l3_instr */ | ||
215 | static struct omap_hwmod_ocp_if omap44xx_l3_main_3__l3_instr = { | ||
216 | .master = &omap44xx_l3_main_3_hwmod, | ||
217 | .slave = &omap44xx_l3_instr_hwmod, | ||
218 | .clk = "l3_div_ck", | ||
219 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
220 | }; | ||
221 | |||
222 | /* l3_instr slave ports */ | ||
223 | static struct omap_hwmod_ocp_if *omap44xx_l3_instr_slaves[] = { | ||
224 | &omap44xx_iva__l3_instr, | ||
225 | &omap44xx_l3_main_3__l3_instr, | ||
226 | }; | ||
227 | |||
228 | static struct omap_hwmod omap44xx_l3_instr_hwmod = { | 110 | static struct omap_hwmod omap44xx_l3_instr_hwmod = { |
229 | .name = "l3_instr", | 111 | .name = "l3_instr", |
230 | .class = &omap44xx_l3_hwmod_class, | 112 | .class = &omap44xx_l3_hwmod_class, |
@@ -236,8 +118,6 @@ static struct omap_hwmod omap44xx_l3_instr_hwmod = { | |||
236 | .modulemode = MODULEMODE_HWCTRL, | 118 | .modulemode = MODULEMODE_HWCTRL, |
237 | }, | 119 | }, |
238 | }, | 120 | }, |
239 | .slaves = omap44xx_l3_instr_slaves, | ||
240 | .slaves_cnt = ARRAY_SIZE(omap44xx_l3_instr_slaves), | ||
241 | }; | 121 | }; |
242 | 122 | ||
243 | /* l3_main_1 */ | 123 | /* l3_main_1 */ |
@@ -247,83 +127,6 @@ static struct omap_hwmod_irq_info omap44xx_l3_main_1_irqs[] = { | |||
247 | { .irq = -1 } | 127 | { .irq = -1 } |
248 | }; | 128 | }; |
249 | 129 | ||
250 | /* dsp -> l3_main_1 */ | ||
251 | static struct omap_hwmod_ocp_if omap44xx_dsp__l3_main_1 = { | ||
252 | .master = &omap44xx_dsp_hwmod, | ||
253 | .slave = &omap44xx_l3_main_1_hwmod, | ||
254 | .clk = "l3_div_ck", | ||
255 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
256 | }; | ||
257 | |||
258 | /* dss -> l3_main_1 */ | ||
259 | static struct omap_hwmod_ocp_if omap44xx_dss__l3_main_1 = { | ||
260 | .master = &omap44xx_dss_hwmod, | ||
261 | .slave = &omap44xx_l3_main_1_hwmod, | ||
262 | .clk = "l3_div_ck", | ||
263 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
264 | }; | ||
265 | |||
266 | /* l3_main_2 -> l3_main_1 */ | ||
267 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_1 = { | ||
268 | .master = &omap44xx_l3_main_2_hwmod, | ||
269 | .slave = &omap44xx_l3_main_1_hwmod, | ||
270 | .clk = "l3_div_ck", | ||
271 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
272 | }; | ||
273 | |||
274 | /* l4_cfg -> l3_main_1 */ | ||
275 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_1 = { | ||
276 | .master = &omap44xx_l4_cfg_hwmod, | ||
277 | .slave = &omap44xx_l3_main_1_hwmod, | ||
278 | .clk = "l4_div_ck", | ||
279 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
280 | }; | ||
281 | |||
282 | /* mmc1 -> l3_main_1 */ | ||
283 | static struct omap_hwmod_ocp_if omap44xx_mmc1__l3_main_1 = { | ||
284 | .master = &omap44xx_mmc1_hwmod, | ||
285 | .slave = &omap44xx_l3_main_1_hwmod, | ||
286 | .clk = "l3_div_ck", | ||
287 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
288 | }; | ||
289 | |||
290 | /* mmc2 -> l3_main_1 */ | ||
291 | static struct omap_hwmod_ocp_if omap44xx_mmc2__l3_main_1 = { | ||
292 | .master = &omap44xx_mmc2_hwmod, | ||
293 | .slave = &omap44xx_l3_main_1_hwmod, | ||
294 | .clk = "l3_div_ck", | ||
295 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
296 | }; | ||
297 | |||
298 | static struct omap_hwmod_addr_space omap44xx_l3_main_1_addrs[] = { | ||
299 | { | ||
300 | .pa_start = 0x44000000, | ||
301 | .pa_end = 0x44000fff, | ||
302 | .flags = ADDR_TYPE_RT | ||
303 | }, | ||
304 | { } | ||
305 | }; | ||
306 | |||
307 | /* mpu -> l3_main_1 */ | ||
308 | static struct omap_hwmod_ocp_if omap44xx_mpu__l3_main_1 = { | ||
309 | .master = &omap44xx_mpu_hwmod, | ||
310 | .slave = &omap44xx_l3_main_1_hwmod, | ||
311 | .clk = "l3_div_ck", | ||
312 | .addr = omap44xx_l3_main_1_addrs, | ||
313 | .user = OCP_USER_MPU, | ||
314 | }; | ||
315 | |||
316 | /* l3_main_1 slave ports */ | ||
317 | static struct omap_hwmod_ocp_if *omap44xx_l3_main_1_slaves[] = { | ||
318 | &omap44xx_dsp__l3_main_1, | ||
319 | &omap44xx_dss__l3_main_1, | ||
320 | &omap44xx_l3_main_2__l3_main_1, | ||
321 | &omap44xx_l4_cfg__l3_main_1, | ||
322 | &omap44xx_mmc1__l3_main_1, | ||
323 | &omap44xx_mmc2__l3_main_1, | ||
324 | &omap44xx_mpu__l3_main_1, | ||
325 | }; | ||
326 | |||
327 | static struct omap_hwmod omap44xx_l3_main_1_hwmod = { | 130 | static struct omap_hwmod omap44xx_l3_main_1_hwmod = { |
328 | .name = "l3_main_1", | 131 | .name = "l3_main_1", |
329 | .class = &omap44xx_l3_hwmod_class, | 132 | .class = &omap44xx_l3_hwmod_class, |
@@ -335,97 +138,9 @@ static struct omap_hwmod omap44xx_l3_main_1_hwmod = { | |||
335 | .context_offs = OMAP4_RM_L3_1_L3_1_CONTEXT_OFFSET, | 138 | .context_offs = OMAP4_RM_L3_1_L3_1_CONTEXT_OFFSET, |
336 | }, | 139 | }, |
337 | }, | 140 | }, |
338 | .slaves = omap44xx_l3_main_1_slaves, | ||
339 | .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_1_slaves), | ||
340 | }; | 141 | }; |
341 | 142 | ||
342 | /* l3_main_2 */ | 143 | /* l3_main_2 */ |
343 | /* dma_system -> l3_main_2 */ | ||
344 | static struct omap_hwmod_ocp_if omap44xx_dma_system__l3_main_2 = { | ||
345 | .master = &omap44xx_dma_system_hwmod, | ||
346 | .slave = &omap44xx_l3_main_2_hwmod, | ||
347 | .clk = "l3_div_ck", | ||
348 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
349 | }; | ||
350 | |||
351 | /* hsi -> l3_main_2 */ | ||
352 | static struct omap_hwmod_ocp_if omap44xx_hsi__l3_main_2 = { | ||
353 | .master = &omap44xx_hsi_hwmod, | ||
354 | .slave = &omap44xx_l3_main_2_hwmod, | ||
355 | .clk = "l3_div_ck", | ||
356 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
357 | }; | ||
358 | |||
359 | /* ipu -> l3_main_2 */ | ||
360 | static struct omap_hwmod_ocp_if omap44xx_ipu__l3_main_2 = { | ||
361 | .master = &omap44xx_ipu_hwmod, | ||
362 | .slave = &omap44xx_l3_main_2_hwmod, | ||
363 | .clk = "l3_div_ck", | ||
364 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
365 | }; | ||
366 | |||
367 | /* iss -> l3_main_2 */ | ||
368 | static struct omap_hwmod_ocp_if omap44xx_iss__l3_main_2 = { | ||
369 | .master = &omap44xx_iss_hwmod, | ||
370 | .slave = &omap44xx_l3_main_2_hwmod, | ||
371 | .clk = "l3_div_ck", | ||
372 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
373 | }; | ||
374 | |||
375 | /* iva -> l3_main_2 */ | ||
376 | static struct omap_hwmod_ocp_if omap44xx_iva__l3_main_2 = { | ||
377 | .master = &omap44xx_iva_hwmod, | ||
378 | .slave = &omap44xx_l3_main_2_hwmod, | ||
379 | .clk = "l3_div_ck", | ||
380 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
381 | }; | ||
382 | |||
383 | static struct omap_hwmod_addr_space omap44xx_l3_main_2_addrs[] = { | ||
384 | { | ||
385 | .pa_start = 0x44800000, | ||
386 | .pa_end = 0x44801fff, | ||
387 | .flags = ADDR_TYPE_RT | ||
388 | }, | ||
389 | { } | ||
390 | }; | ||
391 | |||
392 | /* l3_main_1 -> l3_main_2 */ | ||
393 | static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_2 = { | ||
394 | .master = &omap44xx_l3_main_1_hwmod, | ||
395 | .slave = &omap44xx_l3_main_2_hwmod, | ||
396 | .clk = "l3_div_ck", | ||
397 | .addr = omap44xx_l3_main_2_addrs, | ||
398 | .user = OCP_USER_MPU, | ||
399 | }; | ||
400 | |||
401 | /* l4_cfg -> l3_main_2 */ | ||
402 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_2 = { | ||
403 | .master = &omap44xx_l4_cfg_hwmod, | ||
404 | .slave = &omap44xx_l3_main_2_hwmod, | ||
405 | .clk = "l4_div_ck", | ||
406 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
407 | }; | ||
408 | |||
409 | /* usb_otg_hs -> l3_main_2 */ | ||
410 | static struct omap_hwmod_ocp_if omap44xx_usb_otg_hs__l3_main_2 = { | ||
411 | .master = &omap44xx_usb_otg_hs_hwmod, | ||
412 | .slave = &omap44xx_l3_main_2_hwmod, | ||
413 | .clk = "l3_div_ck", | ||
414 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
415 | }; | ||
416 | |||
417 | /* l3_main_2 slave ports */ | ||
418 | static struct omap_hwmod_ocp_if *omap44xx_l3_main_2_slaves[] = { | ||
419 | &omap44xx_dma_system__l3_main_2, | ||
420 | &omap44xx_hsi__l3_main_2, | ||
421 | &omap44xx_ipu__l3_main_2, | ||
422 | &omap44xx_iss__l3_main_2, | ||
423 | &omap44xx_iva__l3_main_2, | ||
424 | &omap44xx_l3_main_1__l3_main_2, | ||
425 | &omap44xx_l4_cfg__l3_main_2, | ||
426 | &omap44xx_usb_otg_hs__l3_main_2, | ||
427 | }; | ||
428 | |||
429 | static struct omap_hwmod omap44xx_l3_main_2_hwmod = { | 144 | static struct omap_hwmod omap44xx_l3_main_2_hwmod = { |
430 | .name = "l3_main_2", | 145 | .name = "l3_main_2", |
431 | .class = &omap44xx_l3_hwmod_class, | 146 | .class = &omap44xx_l3_hwmod_class, |
@@ -436,52 +151,9 @@ static struct omap_hwmod omap44xx_l3_main_2_hwmod = { | |||
436 | .context_offs = OMAP4_RM_L3_2_L3_2_CONTEXT_OFFSET, | 151 | .context_offs = OMAP4_RM_L3_2_L3_2_CONTEXT_OFFSET, |
437 | }, | 152 | }, |
438 | }, | 153 | }, |
439 | .slaves = omap44xx_l3_main_2_slaves, | ||
440 | .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_2_slaves), | ||
441 | }; | 154 | }; |
442 | 155 | ||
443 | /* l3_main_3 */ | 156 | /* l3_main_3 */ |
444 | static struct omap_hwmod_addr_space omap44xx_l3_main_3_addrs[] = { | ||
445 | { | ||
446 | .pa_start = 0x45000000, | ||
447 | .pa_end = 0x45000fff, | ||
448 | .flags = ADDR_TYPE_RT | ||
449 | }, | ||
450 | { } | ||
451 | }; | ||
452 | |||
453 | /* l3_main_1 -> l3_main_3 */ | ||
454 | static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_3 = { | ||
455 | .master = &omap44xx_l3_main_1_hwmod, | ||
456 | .slave = &omap44xx_l3_main_3_hwmod, | ||
457 | .clk = "l3_div_ck", | ||
458 | .addr = omap44xx_l3_main_3_addrs, | ||
459 | .user = OCP_USER_MPU, | ||
460 | }; | ||
461 | |||
462 | /* l3_main_2 -> l3_main_3 */ | ||
463 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_3 = { | ||
464 | .master = &omap44xx_l3_main_2_hwmod, | ||
465 | .slave = &omap44xx_l3_main_3_hwmod, | ||
466 | .clk = "l3_div_ck", | ||
467 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
468 | }; | ||
469 | |||
470 | /* l4_cfg -> l3_main_3 */ | ||
471 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_3 = { | ||
472 | .master = &omap44xx_l4_cfg_hwmod, | ||
473 | .slave = &omap44xx_l3_main_3_hwmod, | ||
474 | .clk = "l4_div_ck", | ||
475 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
476 | }; | ||
477 | |||
478 | /* l3_main_3 slave ports */ | ||
479 | static struct omap_hwmod_ocp_if *omap44xx_l3_main_3_slaves[] = { | ||
480 | &omap44xx_l3_main_1__l3_main_3, | ||
481 | &omap44xx_l3_main_2__l3_main_3, | ||
482 | &omap44xx_l4_cfg__l3_main_3, | ||
483 | }; | ||
484 | |||
485 | static struct omap_hwmod omap44xx_l3_main_3_hwmod = { | 157 | static struct omap_hwmod omap44xx_l3_main_3_hwmod = { |
486 | .name = "l3_main_3", | 158 | .name = "l3_main_3", |
487 | .class = &omap44xx_l3_hwmod_class, | 159 | .class = &omap44xx_l3_hwmod_class, |
@@ -493,8 +165,6 @@ static struct omap_hwmod omap44xx_l3_main_3_hwmod = { | |||
493 | .modulemode = MODULEMODE_HWCTRL, | 165 | .modulemode = MODULEMODE_HWCTRL, |
494 | }, | 166 | }, |
495 | }, | 167 | }, |
496 | .slaves = omap44xx_l3_main_3_slaves, | ||
497 | .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_3_slaves), | ||
498 | }; | 168 | }; |
499 | 169 | ||
500 | /* | 170 | /* |
@@ -506,46 +176,6 @@ static struct omap_hwmod_class omap44xx_l4_hwmod_class = { | |||
506 | }; | 176 | }; |
507 | 177 | ||
508 | /* l4_abe */ | 178 | /* l4_abe */ |
509 | /* aess -> l4_abe */ | ||
510 | static struct omap_hwmod_ocp_if omap44xx_aess__l4_abe = { | ||
511 | .master = &omap44xx_aess_hwmod, | ||
512 | .slave = &omap44xx_l4_abe_hwmod, | ||
513 | .clk = "ocp_abe_iclk", | ||
514 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
515 | }; | ||
516 | |||
517 | /* dsp -> l4_abe */ | ||
518 | static struct omap_hwmod_ocp_if omap44xx_dsp__l4_abe = { | ||
519 | .master = &omap44xx_dsp_hwmod, | ||
520 | .slave = &omap44xx_l4_abe_hwmod, | ||
521 | .clk = "ocp_abe_iclk", | ||
522 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
523 | }; | ||
524 | |||
525 | /* l3_main_1 -> l4_abe */ | ||
526 | static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_abe = { | ||
527 | .master = &omap44xx_l3_main_1_hwmod, | ||
528 | .slave = &omap44xx_l4_abe_hwmod, | ||
529 | .clk = "l3_div_ck", | ||
530 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
531 | }; | ||
532 | |||
533 | /* mpu -> l4_abe */ | ||
534 | static struct omap_hwmod_ocp_if omap44xx_mpu__l4_abe = { | ||
535 | .master = &omap44xx_mpu_hwmod, | ||
536 | .slave = &omap44xx_l4_abe_hwmod, | ||
537 | .clk = "ocp_abe_iclk", | ||
538 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
539 | }; | ||
540 | |||
541 | /* l4_abe slave ports */ | ||
542 | static struct omap_hwmod_ocp_if *omap44xx_l4_abe_slaves[] = { | ||
543 | &omap44xx_aess__l4_abe, | ||
544 | &omap44xx_dsp__l4_abe, | ||
545 | &omap44xx_l3_main_1__l4_abe, | ||
546 | &omap44xx_mpu__l4_abe, | ||
547 | }; | ||
548 | |||
549 | static struct omap_hwmod omap44xx_l4_abe_hwmod = { | 179 | static struct omap_hwmod omap44xx_l4_abe_hwmod = { |
550 | .name = "l4_abe", | 180 | .name = "l4_abe", |
551 | .class = &omap44xx_l4_hwmod_class, | 181 | .class = &omap44xx_l4_hwmod_class, |
@@ -555,24 +185,9 @@ static struct omap_hwmod omap44xx_l4_abe_hwmod = { | |||
555 | .clkctrl_offs = OMAP4_CM1_ABE_L4ABE_CLKCTRL_OFFSET, | 185 | .clkctrl_offs = OMAP4_CM1_ABE_L4ABE_CLKCTRL_OFFSET, |
556 | }, | 186 | }, |
557 | }, | 187 | }, |
558 | .slaves = omap44xx_l4_abe_slaves, | ||
559 | .slaves_cnt = ARRAY_SIZE(omap44xx_l4_abe_slaves), | ||
560 | }; | 188 | }; |
561 | 189 | ||
562 | /* l4_cfg */ | 190 | /* l4_cfg */ |
563 | /* l3_main_1 -> l4_cfg */ | ||
564 | static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_cfg = { | ||
565 | .master = &omap44xx_l3_main_1_hwmod, | ||
566 | .slave = &omap44xx_l4_cfg_hwmod, | ||
567 | .clk = "l3_div_ck", | ||
568 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
569 | }; | ||
570 | |||
571 | /* l4_cfg slave ports */ | ||
572 | static struct omap_hwmod_ocp_if *omap44xx_l4_cfg_slaves[] = { | ||
573 | &omap44xx_l3_main_1__l4_cfg, | ||
574 | }; | ||
575 | |||
576 | static struct omap_hwmod omap44xx_l4_cfg_hwmod = { | 191 | static struct omap_hwmod omap44xx_l4_cfg_hwmod = { |
577 | .name = "l4_cfg", | 192 | .name = "l4_cfg", |
578 | .class = &omap44xx_l4_hwmod_class, | 193 | .class = &omap44xx_l4_hwmod_class, |
@@ -583,24 +198,9 @@ static struct omap_hwmod omap44xx_l4_cfg_hwmod = { | |||
583 | .context_offs = OMAP4_RM_L4CFG_L4_CFG_CONTEXT_OFFSET, | 198 | .context_offs = OMAP4_RM_L4CFG_L4_CFG_CONTEXT_OFFSET, |
584 | }, | 199 | }, |
585 | }, | 200 | }, |
586 | .slaves = omap44xx_l4_cfg_slaves, | ||
587 | .slaves_cnt = ARRAY_SIZE(omap44xx_l4_cfg_slaves), | ||
588 | }; | 201 | }; |
589 | 202 | ||
590 | /* l4_per */ | 203 | /* l4_per */ |
591 | /* l3_main_2 -> l4_per */ | ||
592 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l4_per = { | ||
593 | .master = &omap44xx_l3_main_2_hwmod, | ||
594 | .slave = &omap44xx_l4_per_hwmod, | ||
595 | .clk = "l3_div_ck", | ||
596 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
597 | }; | ||
598 | |||
599 | /* l4_per slave ports */ | ||
600 | static struct omap_hwmod_ocp_if *omap44xx_l4_per_slaves[] = { | ||
601 | &omap44xx_l3_main_2__l4_per, | ||
602 | }; | ||
603 | |||
604 | static struct omap_hwmod omap44xx_l4_per_hwmod = { | 204 | static struct omap_hwmod omap44xx_l4_per_hwmod = { |
605 | .name = "l4_per", | 205 | .name = "l4_per", |
606 | .class = &omap44xx_l4_hwmod_class, | 206 | .class = &omap44xx_l4_hwmod_class, |
@@ -611,24 +211,9 @@ static struct omap_hwmod omap44xx_l4_per_hwmod = { | |||
611 | .context_offs = OMAP4_RM_L4PER_L4_PER_CONTEXT_OFFSET, | 211 | .context_offs = OMAP4_RM_L4PER_L4_PER_CONTEXT_OFFSET, |
612 | }, | 212 | }, |
613 | }, | 213 | }, |
614 | .slaves = omap44xx_l4_per_slaves, | ||
615 | .slaves_cnt = ARRAY_SIZE(omap44xx_l4_per_slaves), | ||
616 | }; | 214 | }; |
617 | 215 | ||
618 | /* l4_wkup */ | 216 | /* l4_wkup */ |
619 | /* l4_cfg -> l4_wkup */ | ||
620 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l4_wkup = { | ||
621 | .master = &omap44xx_l4_cfg_hwmod, | ||
622 | .slave = &omap44xx_l4_wkup_hwmod, | ||
623 | .clk = "l4_div_ck", | ||
624 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
625 | }; | ||
626 | |||
627 | /* l4_wkup slave ports */ | ||
628 | static struct omap_hwmod_ocp_if *omap44xx_l4_wkup_slaves[] = { | ||
629 | &omap44xx_l4_cfg__l4_wkup, | ||
630 | }; | ||
631 | |||
632 | static struct omap_hwmod omap44xx_l4_wkup_hwmod = { | 217 | static struct omap_hwmod omap44xx_l4_wkup_hwmod = { |
633 | .name = "l4_wkup", | 218 | .name = "l4_wkup", |
634 | .class = &omap44xx_l4_hwmod_class, | 219 | .class = &omap44xx_l4_hwmod_class, |
@@ -639,8 +224,6 @@ static struct omap_hwmod omap44xx_l4_wkup_hwmod = { | |||
639 | .context_offs = OMAP4_RM_WKUP_L4WKUP_CONTEXT_OFFSET, | 224 | .context_offs = OMAP4_RM_WKUP_L4WKUP_CONTEXT_OFFSET, |
640 | }, | 225 | }, |
641 | }, | 226 | }, |
642 | .slaves = omap44xx_l4_wkup_slaves, | ||
643 | .slaves_cnt = ARRAY_SIZE(omap44xx_l4_wkup_slaves), | ||
644 | }; | 227 | }; |
645 | 228 | ||
646 | /* | 229 | /* |
@@ -652,25 +235,10 @@ static struct omap_hwmod_class omap44xx_mpu_bus_hwmod_class = { | |||
652 | }; | 235 | }; |
653 | 236 | ||
654 | /* mpu_private */ | 237 | /* mpu_private */ |
655 | /* mpu -> mpu_private */ | ||
656 | static struct omap_hwmod_ocp_if omap44xx_mpu__mpu_private = { | ||
657 | .master = &omap44xx_mpu_hwmod, | ||
658 | .slave = &omap44xx_mpu_private_hwmod, | ||
659 | .clk = "l3_div_ck", | ||
660 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
661 | }; | ||
662 | |||
663 | /* mpu_private slave ports */ | ||
664 | static struct omap_hwmod_ocp_if *omap44xx_mpu_private_slaves[] = { | ||
665 | &omap44xx_mpu__mpu_private, | ||
666 | }; | ||
667 | |||
668 | static struct omap_hwmod omap44xx_mpu_private_hwmod = { | 238 | static struct omap_hwmod omap44xx_mpu_private_hwmod = { |
669 | .name = "mpu_private", | 239 | .name = "mpu_private", |
670 | .class = &omap44xx_mpu_bus_hwmod_class, | 240 | .class = &omap44xx_mpu_bus_hwmod_class, |
671 | .clkdm_name = "mpuss_clkdm", | 241 | .clkdm_name = "mpuss_clkdm", |
672 | .slaves = omap44xx_mpu_private_slaves, | ||
673 | .slaves_cnt = ARRAY_SIZE(omap44xx_mpu_private_slaves), | ||
674 | }; | 242 | }; |
675 | 243 | ||
676 | /* | 244 | /* |
@@ -756,53 +324,6 @@ static struct omap_hwmod_dma_info omap44xx_aess_sdma_reqs[] = { | |||
756 | { .dma_req = -1 } | 324 | { .dma_req = -1 } |
757 | }; | 325 | }; |
758 | 326 | ||
759 | /* aess master ports */ | ||
760 | static struct omap_hwmod_ocp_if *omap44xx_aess_masters[] = { | ||
761 | &omap44xx_aess__l4_abe, | ||
762 | }; | ||
763 | |||
764 | static struct omap_hwmod_addr_space omap44xx_aess_addrs[] = { | ||
765 | { | ||
766 | .pa_start = 0x401f1000, | ||
767 | .pa_end = 0x401f13ff, | ||
768 | .flags = ADDR_TYPE_RT | ||
769 | }, | ||
770 | { } | ||
771 | }; | ||
772 | |||
773 | /* l4_abe -> aess */ | ||
774 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess = { | ||
775 | .master = &omap44xx_l4_abe_hwmod, | ||
776 | .slave = &omap44xx_aess_hwmod, | ||
777 | .clk = "ocp_abe_iclk", | ||
778 | .addr = omap44xx_aess_addrs, | ||
779 | .user = OCP_USER_MPU, | ||
780 | }; | ||
781 | |||
782 | static struct omap_hwmod_addr_space omap44xx_aess_dma_addrs[] = { | ||
783 | { | ||
784 | .pa_start = 0x490f1000, | ||
785 | .pa_end = 0x490f13ff, | ||
786 | .flags = ADDR_TYPE_RT | ||
787 | }, | ||
788 | { } | ||
789 | }; | ||
790 | |||
791 | /* l4_abe -> aess (dma) */ | ||
792 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess_dma = { | ||
793 | .master = &omap44xx_l4_abe_hwmod, | ||
794 | .slave = &omap44xx_aess_hwmod, | ||
795 | .clk = "ocp_abe_iclk", | ||
796 | .addr = omap44xx_aess_dma_addrs, | ||
797 | .user = OCP_USER_SDMA, | ||
798 | }; | ||
799 | |||
800 | /* aess slave ports */ | ||
801 | static struct omap_hwmod_ocp_if *omap44xx_aess_slaves[] = { | ||
802 | &omap44xx_l4_abe__aess, | ||
803 | &omap44xx_l4_abe__aess_dma, | ||
804 | }; | ||
805 | |||
806 | static struct omap_hwmod omap44xx_aess_hwmod = { | 327 | static struct omap_hwmod omap44xx_aess_hwmod = { |
807 | .name = "aess", | 328 | .name = "aess", |
808 | .class = &omap44xx_aess_hwmod_class, | 329 | .class = &omap44xx_aess_hwmod_class, |
@@ -817,37 +338,6 @@ static struct omap_hwmod omap44xx_aess_hwmod = { | |||
817 | .modulemode = MODULEMODE_SWCTRL, | 338 | .modulemode = MODULEMODE_SWCTRL, |
818 | }, | 339 | }, |
819 | }, | 340 | }, |
820 | .slaves = omap44xx_aess_slaves, | ||
821 | .slaves_cnt = ARRAY_SIZE(omap44xx_aess_slaves), | ||
822 | .masters = omap44xx_aess_masters, | ||
823 | .masters_cnt = ARRAY_SIZE(omap44xx_aess_masters), | ||
824 | }; | ||
825 | |||
826 | /* | ||
827 | * 'bandgap' class | ||
828 | * bangap reference for ldo regulators | ||
829 | */ | ||
830 | |||
831 | static struct omap_hwmod_class omap44xx_bandgap_hwmod_class = { | ||
832 | .name = "bandgap", | ||
833 | }; | ||
834 | |||
835 | /* bandgap */ | ||
836 | static struct omap_hwmod_opt_clk bandgap_opt_clks[] = { | ||
837 | { .role = "fclk", .clk = "bandgap_fclk" }, | ||
838 | }; | ||
839 | |||
840 | static struct omap_hwmod omap44xx_bandgap_hwmod = { | ||
841 | .name = "bandgap", | ||
842 | .class = &omap44xx_bandgap_hwmod_class, | ||
843 | .clkdm_name = "l4_wkup_clkdm", | ||
844 | .prcm = { | ||
845 | .omap4 = { | ||
846 | .clkctrl_offs = OMAP4_CM_WKUP_BANDGAP_CLKCTRL_OFFSET, | ||
847 | }, | ||
848 | }, | ||
849 | .opt_clks = bandgap_opt_clks, | ||
850 | .opt_clks_cnt = ARRAY_SIZE(bandgap_opt_clks), | ||
851 | }; | 341 | }; |
852 | 342 | ||
853 | /* | 343 | /* |
@@ -870,30 +360,6 @@ static struct omap_hwmod_class omap44xx_counter_hwmod_class = { | |||
870 | }; | 360 | }; |
871 | 361 | ||
872 | /* counter_32k */ | 362 | /* counter_32k */ |
873 | static struct omap_hwmod omap44xx_counter_32k_hwmod; | ||
874 | static struct omap_hwmod_addr_space omap44xx_counter_32k_addrs[] = { | ||
875 | { | ||
876 | .pa_start = 0x4a304000, | ||
877 | .pa_end = 0x4a30401f, | ||
878 | .flags = ADDR_TYPE_RT | ||
879 | }, | ||
880 | { } | ||
881 | }; | ||
882 | |||
883 | /* l4_wkup -> counter_32k */ | ||
884 | static struct omap_hwmod_ocp_if omap44xx_l4_wkup__counter_32k = { | ||
885 | .master = &omap44xx_l4_wkup_hwmod, | ||
886 | .slave = &omap44xx_counter_32k_hwmod, | ||
887 | .clk = "l4_wkup_clk_mux_ck", | ||
888 | .addr = omap44xx_counter_32k_addrs, | ||
889 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
890 | }; | ||
891 | |||
892 | /* counter_32k slave ports */ | ||
893 | static struct omap_hwmod_ocp_if *omap44xx_counter_32k_slaves[] = { | ||
894 | &omap44xx_l4_wkup__counter_32k, | ||
895 | }; | ||
896 | |||
897 | static struct omap_hwmod omap44xx_counter_32k_hwmod = { | 363 | static struct omap_hwmod omap44xx_counter_32k_hwmod = { |
898 | .name = "counter_32k", | 364 | .name = "counter_32k", |
899 | .class = &omap44xx_counter_hwmod_class, | 365 | .class = &omap44xx_counter_hwmod_class, |
@@ -906,8 +372,6 @@ static struct omap_hwmod omap44xx_counter_32k_hwmod = { | |||
906 | .context_offs = OMAP4_RM_WKUP_SYNCTIMER_CONTEXT_OFFSET, | 372 | .context_offs = OMAP4_RM_WKUP_SYNCTIMER_CONTEXT_OFFSET, |
907 | }, | 373 | }, |
908 | }, | 374 | }, |
909 | .slaves = omap44xx_counter_32k_slaves, | ||
910 | .slaves_cnt = ARRAY_SIZE(omap44xx_counter_32k_slaves), | ||
911 | }; | 375 | }; |
912 | 376 | ||
913 | /* | 377 | /* |
@@ -950,34 +414,6 @@ static struct omap_hwmod_irq_info omap44xx_dma_system_irqs[] = { | |||
950 | { .irq = -1 } | 414 | { .irq = -1 } |
951 | }; | 415 | }; |
952 | 416 | ||
953 | /* dma_system master ports */ | ||
954 | static struct omap_hwmod_ocp_if *omap44xx_dma_system_masters[] = { | ||
955 | &omap44xx_dma_system__l3_main_2, | ||
956 | }; | ||
957 | |||
958 | static struct omap_hwmod_addr_space omap44xx_dma_system_addrs[] = { | ||
959 | { | ||
960 | .pa_start = 0x4a056000, | ||
961 | .pa_end = 0x4a056fff, | ||
962 | .flags = ADDR_TYPE_RT | ||
963 | }, | ||
964 | { } | ||
965 | }; | ||
966 | |||
967 | /* l4_cfg -> dma_system */ | ||
968 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__dma_system = { | ||
969 | .master = &omap44xx_l4_cfg_hwmod, | ||
970 | .slave = &omap44xx_dma_system_hwmod, | ||
971 | .clk = "l4_div_ck", | ||
972 | .addr = omap44xx_dma_system_addrs, | ||
973 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
974 | }; | ||
975 | |||
976 | /* dma_system slave ports */ | ||
977 | static struct omap_hwmod_ocp_if *omap44xx_dma_system_slaves[] = { | ||
978 | &omap44xx_l4_cfg__dma_system, | ||
979 | }; | ||
980 | |||
981 | static struct omap_hwmod omap44xx_dma_system_hwmod = { | 417 | static struct omap_hwmod omap44xx_dma_system_hwmod = { |
982 | .name = "dma_system", | 418 | .name = "dma_system", |
983 | .class = &omap44xx_dma_hwmod_class, | 419 | .class = &omap44xx_dma_hwmod_class, |
@@ -991,10 +427,6 @@ static struct omap_hwmod omap44xx_dma_system_hwmod = { | |||
991 | }, | 427 | }, |
992 | }, | 428 | }, |
993 | .dev_attr = &dma_dev_attr, | 429 | .dev_attr = &dma_dev_attr, |
994 | .slaves = omap44xx_dma_system_slaves, | ||
995 | .slaves_cnt = ARRAY_SIZE(omap44xx_dma_system_slaves), | ||
996 | .masters = omap44xx_dma_system_masters, | ||
997 | .masters_cnt = ARRAY_SIZE(omap44xx_dma_system_masters), | ||
998 | }; | 430 | }; |
999 | 431 | ||
1000 | /* | 432 | /* |
@@ -1018,7 +450,6 @@ static struct omap_hwmod_class omap44xx_dmic_hwmod_class = { | |||
1018 | }; | 450 | }; |
1019 | 451 | ||
1020 | /* dmic */ | 452 | /* dmic */ |
1021 | static struct omap_hwmod omap44xx_dmic_hwmod; | ||
1022 | static struct omap_hwmod_irq_info omap44xx_dmic_irqs[] = { | 453 | static struct omap_hwmod_irq_info omap44xx_dmic_irqs[] = { |
1023 | { .irq = 114 + OMAP44XX_IRQ_GIC_START }, | 454 | { .irq = 114 + OMAP44XX_IRQ_GIC_START }, |
1024 | { .irq = -1 } | 455 | { .irq = -1 } |
@@ -1029,50 +460,6 @@ static struct omap_hwmod_dma_info omap44xx_dmic_sdma_reqs[] = { | |||
1029 | { .dma_req = -1 } | 460 | { .dma_req = -1 } |
1030 | }; | 461 | }; |
1031 | 462 | ||
1032 | static struct omap_hwmod_addr_space omap44xx_dmic_addrs[] = { | ||
1033 | { | ||
1034 | .name = "mpu", | ||
1035 | .pa_start = 0x4012e000, | ||
1036 | .pa_end = 0x4012e07f, | ||
1037 | .flags = ADDR_TYPE_RT | ||
1038 | }, | ||
1039 | { } | ||
1040 | }; | ||
1041 | |||
1042 | /* l4_abe -> dmic */ | ||
1043 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic = { | ||
1044 | .master = &omap44xx_l4_abe_hwmod, | ||
1045 | .slave = &omap44xx_dmic_hwmod, | ||
1046 | .clk = "ocp_abe_iclk", | ||
1047 | .addr = omap44xx_dmic_addrs, | ||
1048 | .user = OCP_USER_MPU, | ||
1049 | }; | ||
1050 | |||
1051 | static struct omap_hwmod_addr_space omap44xx_dmic_dma_addrs[] = { | ||
1052 | { | ||
1053 | .name = "dma", | ||
1054 | .pa_start = 0x4902e000, | ||
1055 | .pa_end = 0x4902e07f, | ||
1056 | .flags = ADDR_TYPE_RT | ||
1057 | }, | ||
1058 | { } | ||
1059 | }; | ||
1060 | |||
1061 | /* l4_abe -> dmic (dma) */ | ||
1062 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic_dma = { | ||
1063 | .master = &omap44xx_l4_abe_hwmod, | ||
1064 | .slave = &omap44xx_dmic_hwmod, | ||
1065 | .clk = "ocp_abe_iclk", | ||
1066 | .addr = omap44xx_dmic_dma_addrs, | ||
1067 | .user = OCP_USER_SDMA, | ||
1068 | }; | ||
1069 | |||
1070 | /* dmic slave ports */ | ||
1071 | static struct omap_hwmod_ocp_if *omap44xx_dmic_slaves[] = { | ||
1072 | &omap44xx_l4_abe__dmic, | ||
1073 | &omap44xx_l4_abe__dmic_dma, | ||
1074 | }; | ||
1075 | |||
1076 | static struct omap_hwmod omap44xx_dmic_hwmod = { | 463 | static struct omap_hwmod omap44xx_dmic_hwmod = { |
1077 | .name = "dmic", | 464 | .name = "dmic", |
1078 | .class = &omap44xx_dmic_hwmod_class, | 465 | .class = &omap44xx_dmic_hwmod_class, |
@@ -1087,8 +474,6 @@ static struct omap_hwmod omap44xx_dmic_hwmod = { | |||
1087 | .modulemode = MODULEMODE_SWCTRL, | 474 | .modulemode = MODULEMODE_SWCTRL, |
1088 | }, | 475 | }, |
1089 | }, | 476 | }, |
1090 | .slaves = omap44xx_dmic_slaves, | ||
1091 | .slaves_cnt = ARRAY_SIZE(omap44xx_dmic_slaves), | ||
1092 | }; | 477 | }; |
1093 | 478 | ||
1094 | /* | 479 | /* |
@@ -1107,53 +492,8 @@ static struct omap_hwmod_irq_info omap44xx_dsp_irqs[] = { | |||
1107 | }; | 492 | }; |
1108 | 493 | ||
1109 | static struct omap_hwmod_rst_info omap44xx_dsp_resets[] = { | 494 | static struct omap_hwmod_rst_info omap44xx_dsp_resets[] = { |
1110 | { .name = "mmu_cache", .rst_shift = 1 }, | ||
1111 | }; | ||
1112 | |||
1113 | static struct omap_hwmod_rst_info omap44xx_dsp_c0_resets[] = { | ||
1114 | { .name = "dsp", .rst_shift = 0 }, | 495 | { .name = "dsp", .rst_shift = 0 }, |
1115 | }; | 496 | { .name = "mmu_cache", .rst_shift = 1 }, |
1116 | |||
1117 | /* dsp -> iva */ | ||
1118 | static struct omap_hwmod_ocp_if omap44xx_dsp__iva = { | ||
1119 | .master = &omap44xx_dsp_hwmod, | ||
1120 | .slave = &omap44xx_iva_hwmod, | ||
1121 | .clk = "dpll_iva_m5x2_ck", | ||
1122 | }; | ||
1123 | |||
1124 | /* dsp master ports */ | ||
1125 | static struct omap_hwmod_ocp_if *omap44xx_dsp_masters[] = { | ||
1126 | &omap44xx_dsp__l3_main_1, | ||
1127 | &omap44xx_dsp__l4_abe, | ||
1128 | &omap44xx_dsp__iva, | ||
1129 | }; | ||
1130 | |||
1131 | /* l4_cfg -> dsp */ | ||
1132 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__dsp = { | ||
1133 | .master = &omap44xx_l4_cfg_hwmod, | ||
1134 | .slave = &omap44xx_dsp_hwmod, | ||
1135 | .clk = "l4_div_ck", | ||
1136 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1137 | }; | ||
1138 | |||
1139 | /* dsp slave ports */ | ||
1140 | static struct omap_hwmod_ocp_if *omap44xx_dsp_slaves[] = { | ||
1141 | &omap44xx_l4_cfg__dsp, | ||
1142 | }; | ||
1143 | |||
1144 | /* Pseudo hwmod for reset control purpose only */ | ||
1145 | static struct omap_hwmod omap44xx_dsp_c0_hwmod = { | ||
1146 | .name = "dsp_c0", | ||
1147 | .class = &omap44xx_dsp_hwmod_class, | ||
1148 | .clkdm_name = "tesla_clkdm", | ||
1149 | .flags = HWMOD_INIT_NO_RESET, | ||
1150 | .rst_lines = omap44xx_dsp_c0_resets, | ||
1151 | .rst_lines_cnt = ARRAY_SIZE(omap44xx_dsp_c0_resets), | ||
1152 | .prcm = { | ||
1153 | .omap4 = { | ||
1154 | .rstctrl_offs = OMAP4_RM_TESLA_RSTCTRL_OFFSET, | ||
1155 | }, | ||
1156 | }, | ||
1157 | }; | 497 | }; |
1158 | 498 | ||
1159 | static struct omap_hwmod omap44xx_dsp_hwmod = { | 499 | static struct omap_hwmod omap44xx_dsp_hwmod = { |
@@ -1172,10 +512,6 @@ static struct omap_hwmod omap44xx_dsp_hwmod = { | |||
1172 | .modulemode = MODULEMODE_HWCTRL, | 512 | .modulemode = MODULEMODE_HWCTRL, |
1173 | }, | 513 | }, |
1174 | }, | 514 | }, |
1175 | .slaves = omap44xx_dsp_slaves, | ||
1176 | .slaves_cnt = ARRAY_SIZE(omap44xx_dsp_slaves), | ||
1177 | .masters = omap44xx_dsp_masters, | ||
1178 | .masters_cnt = ARRAY_SIZE(omap44xx_dsp_masters), | ||
1179 | }; | 515 | }; |
1180 | 516 | ||
1181 | /* | 517 | /* |
@@ -1196,53 +532,6 @@ static struct omap_hwmod_class omap44xx_dss_hwmod_class = { | |||
1196 | }; | 532 | }; |
1197 | 533 | ||
1198 | /* dss */ | 534 | /* dss */ |
1199 | /* dss master ports */ | ||
1200 | static struct omap_hwmod_ocp_if *omap44xx_dss_masters[] = { | ||
1201 | &omap44xx_dss__l3_main_1, | ||
1202 | }; | ||
1203 | |||
1204 | static struct omap_hwmod_addr_space omap44xx_dss_dma_addrs[] = { | ||
1205 | { | ||
1206 | .pa_start = 0x58000000, | ||
1207 | .pa_end = 0x5800007f, | ||
1208 | .flags = ADDR_TYPE_RT | ||
1209 | }, | ||
1210 | { } | ||
1211 | }; | ||
1212 | |||
1213 | /* l3_main_2 -> dss */ | ||
1214 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss = { | ||
1215 | .master = &omap44xx_l3_main_2_hwmod, | ||
1216 | .slave = &omap44xx_dss_hwmod, | ||
1217 | .clk = "dss_fck", | ||
1218 | .addr = omap44xx_dss_dma_addrs, | ||
1219 | .user = OCP_USER_SDMA, | ||
1220 | }; | ||
1221 | |||
1222 | static struct omap_hwmod_addr_space omap44xx_dss_addrs[] = { | ||
1223 | { | ||
1224 | .pa_start = 0x48040000, | ||
1225 | .pa_end = 0x4804007f, | ||
1226 | .flags = ADDR_TYPE_RT | ||
1227 | }, | ||
1228 | { } | ||
1229 | }; | ||
1230 | |||
1231 | /* l4_per -> dss */ | ||
1232 | static struct omap_hwmod_ocp_if omap44xx_l4_per__dss = { | ||
1233 | .master = &omap44xx_l4_per_hwmod, | ||
1234 | .slave = &omap44xx_dss_hwmod, | ||
1235 | .clk = "l4_div_ck", | ||
1236 | .addr = omap44xx_dss_addrs, | ||
1237 | .user = OCP_USER_MPU, | ||
1238 | }; | ||
1239 | |||
1240 | /* dss slave ports */ | ||
1241 | static struct omap_hwmod_ocp_if *omap44xx_dss_slaves[] = { | ||
1242 | &omap44xx_l3_main_2__dss, | ||
1243 | &omap44xx_l4_per__dss, | ||
1244 | }; | ||
1245 | |||
1246 | static struct omap_hwmod_opt_clk dss_opt_clks[] = { | 535 | static struct omap_hwmod_opt_clk dss_opt_clks[] = { |
1247 | { .role = "sys_clk", .clk = "dss_sys_clk" }, | 536 | { .role = "sys_clk", .clk = "dss_sys_clk" }, |
1248 | { .role = "tv_clk", .clk = "dss_tv_clk" }, | 537 | { .role = "tv_clk", .clk = "dss_tv_clk" }, |
@@ -1263,10 +552,6 @@ static struct omap_hwmod omap44xx_dss_hwmod = { | |||
1263 | }, | 552 | }, |
1264 | .opt_clks = dss_opt_clks, | 553 | .opt_clks = dss_opt_clks, |
1265 | .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks), | 554 | .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks), |
1266 | .slaves = omap44xx_dss_slaves, | ||
1267 | .slaves_cnt = ARRAY_SIZE(omap44xx_dss_slaves), | ||
1268 | .masters = omap44xx_dss_masters, | ||
1269 | .masters_cnt = ARRAY_SIZE(omap44xx_dss_masters), | ||
1270 | }; | 555 | }; |
1271 | 556 | ||
1272 | /* | 557 | /* |
@@ -1293,7 +578,6 @@ static struct omap_hwmod_class omap44xx_dispc_hwmod_class = { | |||
1293 | }; | 578 | }; |
1294 | 579 | ||
1295 | /* dss_dispc */ | 580 | /* dss_dispc */ |
1296 | static struct omap_hwmod omap44xx_dss_dispc_hwmod; | ||
1297 | static struct omap_hwmod_irq_info omap44xx_dss_dispc_irqs[] = { | 581 | static struct omap_hwmod_irq_info omap44xx_dss_dispc_irqs[] = { |
1298 | { .irq = 25 + OMAP44XX_IRQ_GIC_START }, | 582 | { .irq = 25 + OMAP44XX_IRQ_GIC_START }, |
1299 | { .irq = -1 } | 583 | { .irq = -1 } |
@@ -1304,53 +588,11 @@ static struct omap_hwmod_dma_info omap44xx_dss_dispc_sdma_reqs[] = { | |||
1304 | { .dma_req = -1 } | 588 | { .dma_req = -1 } |
1305 | }; | 589 | }; |
1306 | 590 | ||
1307 | static struct omap_hwmod_addr_space omap44xx_dss_dispc_dma_addrs[] = { | ||
1308 | { | ||
1309 | .pa_start = 0x58001000, | ||
1310 | .pa_end = 0x58001fff, | ||
1311 | .flags = ADDR_TYPE_RT | ||
1312 | }, | ||
1313 | { } | ||
1314 | }; | ||
1315 | |||
1316 | /* l3_main_2 -> dss_dispc */ | ||
1317 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dispc = { | ||
1318 | .master = &omap44xx_l3_main_2_hwmod, | ||
1319 | .slave = &omap44xx_dss_dispc_hwmod, | ||
1320 | .clk = "dss_fck", | ||
1321 | .addr = omap44xx_dss_dispc_dma_addrs, | ||
1322 | .user = OCP_USER_SDMA, | ||
1323 | }; | ||
1324 | |||
1325 | static struct omap_hwmod_addr_space omap44xx_dss_dispc_addrs[] = { | ||
1326 | { | ||
1327 | .pa_start = 0x48041000, | ||
1328 | .pa_end = 0x48041fff, | ||
1329 | .flags = ADDR_TYPE_RT | ||
1330 | }, | ||
1331 | { } | ||
1332 | }; | ||
1333 | |||
1334 | static struct omap_dss_dispc_dev_attr omap44xx_dss_dispc_dev_attr = { | 591 | static struct omap_dss_dispc_dev_attr omap44xx_dss_dispc_dev_attr = { |
1335 | .manager_count = 3, | 592 | .manager_count = 3, |
1336 | .has_framedonetv_irq = 1 | 593 | .has_framedonetv_irq = 1 |
1337 | }; | 594 | }; |
1338 | 595 | ||
1339 | /* l4_per -> dss_dispc */ | ||
1340 | static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dispc = { | ||
1341 | .master = &omap44xx_l4_per_hwmod, | ||
1342 | .slave = &omap44xx_dss_dispc_hwmod, | ||
1343 | .clk = "l4_div_ck", | ||
1344 | .addr = omap44xx_dss_dispc_addrs, | ||
1345 | .user = OCP_USER_MPU, | ||
1346 | }; | ||
1347 | |||
1348 | /* dss_dispc slave ports */ | ||
1349 | static struct omap_hwmod_ocp_if *omap44xx_dss_dispc_slaves[] = { | ||
1350 | &omap44xx_l3_main_2__dss_dispc, | ||
1351 | &omap44xx_l4_per__dss_dispc, | ||
1352 | }; | ||
1353 | |||
1354 | static struct omap_hwmod omap44xx_dss_dispc_hwmod = { | 596 | static struct omap_hwmod omap44xx_dss_dispc_hwmod = { |
1355 | .name = "dss_dispc", | 597 | .name = "dss_dispc", |
1356 | .class = &omap44xx_dispc_hwmod_class, | 598 | .class = &omap44xx_dispc_hwmod_class, |
@@ -1364,8 +606,6 @@ static struct omap_hwmod omap44xx_dss_dispc_hwmod = { | |||
1364 | .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET, | 606 | .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET, |
1365 | }, | 607 | }, |
1366 | }, | 608 | }, |
1367 | .slaves = omap44xx_dss_dispc_slaves, | ||
1368 | .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dispc_slaves), | ||
1369 | .dev_attr = &omap44xx_dss_dispc_dev_attr | 609 | .dev_attr = &omap44xx_dss_dispc_dev_attr |
1370 | }; | 610 | }; |
1371 | 611 | ||
@@ -1391,7 +631,6 @@ static struct omap_hwmod_class omap44xx_dsi_hwmod_class = { | |||
1391 | }; | 631 | }; |
1392 | 632 | ||
1393 | /* dss_dsi1 */ | 633 | /* dss_dsi1 */ |
1394 | static struct omap_hwmod omap44xx_dss_dsi1_hwmod; | ||
1395 | static struct omap_hwmod_irq_info omap44xx_dss_dsi1_irqs[] = { | 634 | static struct omap_hwmod_irq_info omap44xx_dss_dsi1_irqs[] = { |
1396 | { .irq = 53 + OMAP44XX_IRQ_GIC_START }, | 635 | { .irq = 53 + OMAP44XX_IRQ_GIC_START }, |
1397 | { .irq = -1 } | 636 | { .irq = -1 } |
@@ -1402,48 +641,6 @@ static struct omap_hwmod_dma_info omap44xx_dss_dsi1_sdma_reqs[] = { | |||
1402 | { .dma_req = -1 } | 641 | { .dma_req = -1 } |
1403 | }; | 642 | }; |
1404 | 643 | ||
1405 | static struct omap_hwmod_addr_space omap44xx_dss_dsi1_dma_addrs[] = { | ||
1406 | { | ||
1407 | .pa_start = 0x58004000, | ||
1408 | .pa_end = 0x580041ff, | ||
1409 | .flags = ADDR_TYPE_RT | ||
1410 | }, | ||
1411 | { } | ||
1412 | }; | ||
1413 | |||
1414 | /* l3_main_2 -> dss_dsi1 */ | ||
1415 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi1 = { | ||
1416 | .master = &omap44xx_l3_main_2_hwmod, | ||
1417 | .slave = &omap44xx_dss_dsi1_hwmod, | ||
1418 | .clk = "dss_fck", | ||
1419 | .addr = omap44xx_dss_dsi1_dma_addrs, | ||
1420 | .user = OCP_USER_SDMA, | ||
1421 | }; | ||
1422 | |||
1423 | static struct omap_hwmod_addr_space omap44xx_dss_dsi1_addrs[] = { | ||
1424 | { | ||
1425 | .pa_start = 0x48044000, | ||
1426 | .pa_end = 0x480441ff, | ||
1427 | .flags = ADDR_TYPE_RT | ||
1428 | }, | ||
1429 | { } | ||
1430 | }; | ||
1431 | |||
1432 | /* l4_per -> dss_dsi1 */ | ||
1433 | static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dsi1 = { | ||
1434 | .master = &omap44xx_l4_per_hwmod, | ||
1435 | .slave = &omap44xx_dss_dsi1_hwmod, | ||
1436 | .clk = "l4_div_ck", | ||
1437 | .addr = omap44xx_dss_dsi1_addrs, | ||
1438 | .user = OCP_USER_MPU, | ||
1439 | }; | ||
1440 | |||
1441 | /* dss_dsi1 slave ports */ | ||
1442 | static struct omap_hwmod_ocp_if *omap44xx_dss_dsi1_slaves[] = { | ||
1443 | &omap44xx_l3_main_2__dss_dsi1, | ||
1444 | &omap44xx_l4_per__dss_dsi1, | ||
1445 | }; | ||
1446 | |||
1447 | static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = { | 644 | static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = { |
1448 | { .role = "sys_clk", .clk = "dss_sys_clk" }, | 645 | { .role = "sys_clk", .clk = "dss_sys_clk" }, |
1449 | }; | 646 | }; |
@@ -1463,12 +660,9 @@ static struct omap_hwmod omap44xx_dss_dsi1_hwmod = { | |||
1463 | }, | 660 | }, |
1464 | .opt_clks = dss_dsi1_opt_clks, | 661 | .opt_clks = dss_dsi1_opt_clks, |
1465 | .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks), | 662 | .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks), |
1466 | .slaves = omap44xx_dss_dsi1_slaves, | ||
1467 | .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dsi1_slaves), | ||
1468 | }; | 663 | }; |
1469 | 664 | ||
1470 | /* dss_dsi2 */ | 665 | /* dss_dsi2 */ |
1471 | static struct omap_hwmod omap44xx_dss_dsi2_hwmod; | ||
1472 | static struct omap_hwmod_irq_info omap44xx_dss_dsi2_irqs[] = { | 666 | static struct omap_hwmod_irq_info omap44xx_dss_dsi2_irqs[] = { |
1473 | { .irq = 84 + OMAP44XX_IRQ_GIC_START }, | 667 | { .irq = 84 + OMAP44XX_IRQ_GIC_START }, |
1474 | { .irq = -1 } | 668 | { .irq = -1 } |
@@ -1479,48 +673,6 @@ static struct omap_hwmod_dma_info omap44xx_dss_dsi2_sdma_reqs[] = { | |||
1479 | { .dma_req = -1 } | 673 | { .dma_req = -1 } |
1480 | }; | 674 | }; |
1481 | 675 | ||
1482 | static struct omap_hwmod_addr_space omap44xx_dss_dsi2_dma_addrs[] = { | ||
1483 | { | ||
1484 | .pa_start = 0x58005000, | ||
1485 | .pa_end = 0x580051ff, | ||
1486 | .flags = ADDR_TYPE_RT | ||
1487 | }, | ||
1488 | { } | ||
1489 | }; | ||
1490 | |||
1491 | /* l3_main_2 -> dss_dsi2 */ | ||
1492 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi2 = { | ||
1493 | .master = &omap44xx_l3_main_2_hwmod, | ||
1494 | .slave = &omap44xx_dss_dsi2_hwmod, | ||
1495 | .clk = "dss_fck", | ||
1496 | .addr = omap44xx_dss_dsi2_dma_addrs, | ||
1497 | .user = OCP_USER_SDMA, | ||
1498 | }; | ||
1499 | |||
1500 | static struct omap_hwmod_addr_space omap44xx_dss_dsi2_addrs[] = { | ||
1501 | { | ||
1502 | .pa_start = 0x48045000, | ||
1503 | .pa_end = 0x480451ff, | ||
1504 | .flags = ADDR_TYPE_RT | ||
1505 | }, | ||
1506 | { } | ||
1507 | }; | ||
1508 | |||
1509 | /* l4_per -> dss_dsi2 */ | ||
1510 | static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dsi2 = { | ||
1511 | .master = &omap44xx_l4_per_hwmod, | ||
1512 | .slave = &omap44xx_dss_dsi2_hwmod, | ||
1513 | .clk = "l4_div_ck", | ||
1514 | .addr = omap44xx_dss_dsi2_addrs, | ||
1515 | .user = OCP_USER_MPU, | ||
1516 | }; | ||
1517 | |||
1518 | /* dss_dsi2 slave ports */ | ||
1519 | static struct omap_hwmod_ocp_if *omap44xx_dss_dsi2_slaves[] = { | ||
1520 | &omap44xx_l3_main_2__dss_dsi2, | ||
1521 | &omap44xx_l4_per__dss_dsi2, | ||
1522 | }; | ||
1523 | |||
1524 | static struct omap_hwmod_opt_clk dss_dsi2_opt_clks[] = { | 676 | static struct omap_hwmod_opt_clk dss_dsi2_opt_clks[] = { |
1525 | { .role = "sys_clk", .clk = "dss_sys_clk" }, | 677 | { .role = "sys_clk", .clk = "dss_sys_clk" }, |
1526 | }; | 678 | }; |
@@ -1540,8 +692,6 @@ static struct omap_hwmod omap44xx_dss_dsi2_hwmod = { | |||
1540 | }, | 692 | }, |
1541 | .opt_clks = dss_dsi2_opt_clks, | 693 | .opt_clks = dss_dsi2_opt_clks, |
1542 | .opt_clks_cnt = ARRAY_SIZE(dss_dsi2_opt_clks), | 694 | .opt_clks_cnt = ARRAY_SIZE(dss_dsi2_opt_clks), |
1543 | .slaves = omap44xx_dss_dsi2_slaves, | ||
1544 | .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dsi2_slaves), | ||
1545 | }; | 695 | }; |
1546 | 696 | ||
1547 | /* | 697 | /* |
@@ -1565,7 +715,6 @@ static struct omap_hwmod_class omap44xx_hdmi_hwmod_class = { | |||
1565 | }; | 715 | }; |
1566 | 716 | ||
1567 | /* dss_hdmi */ | 717 | /* dss_hdmi */ |
1568 | static struct omap_hwmod omap44xx_dss_hdmi_hwmod; | ||
1569 | static struct omap_hwmod_irq_info omap44xx_dss_hdmi_irqs[] = { | 718 | static struct omap_hwmod_irq_info omap44xx_dss_hdmi_irqs[] = { |
1570 | { .irq = 101 + OMAP44XX_IRQ_GIC_START }, | 719 | { .irq = 101 + OMAP44XX_IRQ_GIC_START }, |
1571 | { .irq = -1 } | 720 | { .irq = -1 } |
@@ -1576,48 +725,6 @@ static struct omap_hwmod_dma_info omap44xx_dss_hdmi_sdma_reqs[] = { | |||
1576 | { .dma_req = -1 } | 725 | { .dma_req = -1 } |
1577 | }; | 726 | }; |
1578 | 727 | ||
1579 | static struct omap_hwmod_addr_space omap44xx_dss_hdmi_dma_addrs[] = { | ||
1580 | { | ||
1581 | .pa_start = 0x58006000, | ||
1582 | .pa_end = 0x58006fff, | ||
1583 | .flags = ADDR_TYPE_RT | ||
1584 | }, | ||
1585 | { } | ||
1586 | }; | ||
1587 | |||
1588 | /* l3_main_2 -> dss_hdmi */ | ||
1589 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_hdmi = { | ||
1590 | .master = &omap44xx_l3_main_2_hwmod, | ||
1591 | .slave = &omap44xx_dss_hdmi_hwmod, | ||
1592 | .clk = "dss_fck", | ||
1593 | .addr = omap44xx_dss_hdmi_dma_addrs, | ||
1594 | .user = OCP_USER_SDMA, | ||
1595 | }; | ||
1596 | |||
1597 | static struct omap_hwmod_addr_space omap44xx_dss_hdmi_addrs[] = { | ||
1598 | { | ||
1599 | .pa_start = 0x48046000, | ||
1600 | .pa_end = 0x48046fff, | ||
1601 | .flags = ADDR_TYPE_RT | ||
1602 | }, | ||
1603 | { } | ||
1604 | }; | ||
1605 | |||
1606 | /* l4_per -> dss_hdmi */ | ||
1607 | static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_hdmi = { | ||
1608 | .master = &omap44xx_l4_per_hwmod, | ||
1609 | .slave = &omap44xx_dss_hdmi_hwmod, | ||
1610 | .clk = "l4_div_ck", | ||
1611 | .addr = omap44xx_dss_hdmi_addrs, | ||
1612 | .user = OCP_USER_MPU, | ||
1613 | }; | ||
1614 | |||
1615 | /* dss_hdmi slave ports */ | ||
1616 | static struct omap_hwmod_ocp_if *omap44xx_dss_hdmi_slaves[] = { | ||
1617 | &omap44xx_l3_main_2__dss_hdmi, | ||
1618 | &omap44xx_l4_per__dss_hdmi, | ||
1619 | }; | ||
1620 | |||
1621 | static struct omap_hwmod_opt_clk dss_hdmi_opt_clks[] = { | 728 | static struct omap_hwmod_opt_clk dss_hdmi_opt_clks[] = { |
1622 | { .role = "sys_clk", .clk = "dss_sys_clk" }, | 729 | { .role = "sys_clk", .clk = "dss_sys_clk" }, |
1623 | }; | 730 | }; |
@@ -1637,8 +744,6 @@ static struct omap_hwmod omap44xx_dss_hdmi_hwmod = { | |||
1637 | }, | 744 | }, |
1638 | .opt_clks = dss_hdmi_opt_clks, | 745 | .opt_clks = dss_hdmi_opt_clks, |
1639 | .opt_clks_cnt = ARRAY_SIZE(dss_hdmi_opt_clks), | 746 | .opt_clks_cnt = ARRAY_SIZE(dss_hdmi_opt_clks), |
1640 | .slaves = omap44xx_dss_hdmi_slaves, | ||
1641 | .slaves_cnt = ARRAY_SIZE(omap44xx_dss_hdmi_slaves), | ||
1642 | }; | 747 | }; |
1643 | 748 | ||
1644 | /* | 749 | /* |
@@ -1662,54 +767,11 @@ static struct omap_hwmod_class omap44xx_rfbi_hwmod_class = { | |||
1662 | }; | 767 | }; |
1663 | 768 | ||
1664 | /* dss_rfbi */ | 769 | /* dss_rfbi */ |
1665 | static struct omap_hwmod omap44xx_dss_rfbi_hwmod; | ||
1666 | static struct omap_hwmod_dma_info omap44xx_dss_rfbi_sdma_reqs[] = { | 770 | static struct omap_hwmod_dma_info omap44xx_dss_rfbi_sdma_reqs[] = { |
1667 | { .dma_req = 13 + OMAP44XX_DMA_REQ_START }, | 771 | { .dma_req = 13 + OMAP44XX_DMA_REQ_START }, |
1668 | { .dma_req = -1 } | 772 | { .dma_req = -1 } |
1669 | }; | 773 | }; |
1670 | 774 | ||
1671 | static struct omap_hwmod_addr_space omap44xx_dss_rfbi_dma_addrs[] = { | ||
1672 | { | ||
1673 | .pa_start = 0x58002000, | ||
1674 | .pa_end = 0x580020ff, | ||
1675 | .flags = ADDR_TYPE_RT | ||
1676 | }, | ||
1677 | { } | ||
1678 | }; | ||
1679 | |||
1680 | /* l3_main_2 -> dss_rfbi */ | ||
1681 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_rfbi = { | ||
1682 | .master = &omap44xx_l3_main_2_hwmod, | ||
1683 | .slave = &omap44xx_dss_rfbi_hwmod, | ||
1684 | .clk = "dss_fck", | ||
1685 | .addr = omap44xx_dss_rfbi_dma_addrs, | ||
1686 | .user = OCP_USER_SDMA, | ||
1687 | }; | ||
1688 | |||
1689 | static struct omap_hwmod_addr_space omap44xx_dss_rfbi_addrs[] = { | ||
1690 | { | ||
1691 | .pa_start = 0x48042000, | ||
1692 | .pa_end = 0x480420ff, | ||
1693 | .flags = ADDR_TYPE_RT | ||
1694 | }, | ||
1695 | { } | ||
1696 | }; | ||
1697 | |||
1698 | /* l4_per -> dss_rfbi */ | ||
1699 | static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_rfbi = { | ||
1700 | .master = &omap44xx_l4_per_hwmod, | ||
1701 | .slave = &omap44xx_dss_rfbi_hwmod, | ||
1702 | .clk = "l4_div_ck", | ||
1703 | .addr = omap44xx_dss_rfbi_addrs, | ||
1704 | .user = OCP_USER_MPU, | ||
1705 | }; | ||
1706 | |||
1707 | /* dss_rfbi slave ports */ | ||
1708 | static struct omap_hwmod_ocp_if *omap44xx_dss_rfbi_slaves[] = { | ||
1709 | &omap44xx_l3_main_2__dss_rfbi, | ||
1710 | &omap44xx_l4_per__dss_rfbi, | ||
1711 | }; | ||
1712 | |||
1713 | static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = { | 775 | static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = { |
1714 | { .role = "ick", .clk = "dss_fck" }, | 776 | { .role = "ick", .clk = "dss_fck" }, |
1715 | }; | 777 | }; |
@@ -1728,8 +790,6 @@ static struct omap_hwmod omap44xx_dss_rfbi_hwmod = { | |||
1728 | }, | 790 | }, |
1729 | .opt_clks = dss_rfbi_opt_clks, | 791 | .opt_clks = dss_rfbi_opt_clks, |
1730 | .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks), | 792 | .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks), |
1731 | .slaves = omap44xx_dss_rfbi_slaves, | ||
1732 | .slaves_cnt = ARRAY_SIZE(omap44xx_dss_rfbi_slaves), | ||
1733 | }; | 793 | }; |
1734 | 794 | ||
1735 | /* | 795 | /* |
@@ -1742,49 +802,6 @@ static struct omap_hwmod_class omap44xx_venc_hwmod_class = { | |||
1742 | }; | 802 | }; |
1743 | 803 | ||
1744 | /* dss_venc */ | 804 | /* dss_venc */ |
1745 | static struct omap_hwmod omap44xx_dss_venc_hwmod; | ||
1746 | static struct omap_hwmod_addr_space omap44xx_dss_venc_dma_addrs[] = { | ||
1747 | { | ||
1748 | .pa_start = 0x58003000, | ||
1749 | .pa_end = 0x580030ff, | ||
1750 | .flags = ADDR_TYPE_RT | ||
1751 | }, | ||
1752 | { } | ||
1753 | }; | ||
1754 | |||
1755 | /* l3_main_2 -> dss_venc */ | ||
1756 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_venc = { | ||
1757 | .master = &omap44xx_l3_main_2_hwmod, | ||
1758 | .slave = &omap44xx_dss_venc_hwmod, | ||
1759 | .clk = "dss_fck", | ||
1760 | .addr = omap44xx_dss_venc_dma_addrs, | ||
1761 | .user = OCP_USER_SDMA, | ||
1762 | }; | ||
1763 | |||
1764 | static struct omap_hwmod_addr_space omap44xx_dss_venc_addrs[] = { | ||
1765 | { | ||
1766 | .pa_start = 0x48043000, | ||
1767 | .pa_end = 0x480430ff, | ||
1768 | .flags = ADDR_TYPE_RT | ||
1769 | }, | ||
1770 | { } | ||
1771 | }; | ||
1772 | |||
1773 | /* l4_per -> dss_venc */ | ||
1774 | static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_venc = { | ||
1775 | .master = &omap44xx_l4_per_hwmod, | ||
1776 | .slave = &omap44xx_dss_venc_hwmod, | ||
1777 | .clk = "l4_div_ck", | ||
1778 | .addr = omap44xx_dss_venc_addrs, | ||
1779 | .user = OCP_USER_MPU, | ||
1780 | }; | ||
1781 | |||
1782 | /* dss_venc slave ports */ | ||
1783 | static struct omap_hwmod_ocp_if *omap44xx_dss_venc_slaves[] = { | ||
1784 | &omap44xx_l3_main_2__dss_venc, | ||
1785 | &omap44xx_l4_per__dss_venc, | ||
1786 | }; | ||
1787 | |||
1788 | static struct omap_hwmod omap44xx_dss_venc_hwmod = { | 805 | static struct omap_hwmod omap44xx_dss_venc_hwmod = { |
1789 | .name = "dss_venc", | 806 | .name = "dss_venc", |
1790 | .class = &omap44xx_venc_hwmod_class, | 807 | .class = &omap44xx_venc_hwmod_class, |
@@ -1796,8 +813,6 @@ static struct omap_hwmod omap44xx_dss_venc_hwmod = { | |||
1796 | .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET, | 813 | .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET, |
1797 | }, | 814 | }, |
1798 | }, | 815 | }, |
1799 | .slaves = omap44xx_dss_venc_slaves, | ||
1800 | .slaves_cnt = ARRAY_SIZE(omap44xx_dss_venc_slaves), | ||
1801 | }; | 816 | }; |
1802 | 817 | ||
1803 | /* | 818 | /* |
@@ -1830,35 +845,11 @@ static struct omap_gpio_dev_attr gpio_dev_attr = { | |||
1830 | }; | 845 | }; |
1831 | 846 | ||
1832 | /* gpio1 */ | 847 | /* gpio1 */ |
1833 | static struct omap_hwmod omap44xx_gpio1_hwmod; | ||
1834 | static struct omap_hwmod_irq_info omap44xx_gpio1_irqs[] = { | 848 | static struct omap_hwmod_irq_info omap44xx_gpio1_irqs[] = { |
1835 | { .irq = 29 + OMAP44XX_IRQ_GIC_START }, | 849 | { .irq = 29 + OMAP44XX_IRQ_GIC_START }, |
1836 | { .irq = -1 } | 850 | { .irq = -1 } |
1837 | }; | 851 | }; |
1838 | 852 | ||
1839 | static struct omap_hwmod_addr_space omap44xx_gpio1_addrs[] = { | ||
1840 | { | ||
1841 | .pa_start = 0x4a310000, | ||
1842 | .pa_end = 0x4a3101ff, | ||
1843 | .flags = ADDR_TYPE_RT | ||
1844 | }, | ||
1845 | { } | ||
1846 | }; | ||
1847 | |||
1848 | /* l4_wkup -> gpio1 */ | ||
1849 | static struct omap_hwmod_ocp_if omap44xx_l4_wkup__gpio1 = { | ||
1850 | .master = &omap44xx_l4_wkup_hwmod, | ||
1851 | .slave = &omap44xx_gpio1_hwmod, | ||
1852 | .clk = "l4_wkup_clk_mux_ck", | ||
1853 | .addr = omap44xx_gpio1_addrs, | ||
1854 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1855 | }; | ||
1856 | |||
1857 | /* gpio1 slave ports */ | ||
1858 | static struct omap_hwmod_ocp_if *omap44xx_gpio1_slaves[] = { | ||
1859 | &omap44xx_l4_wkup__gpio1, | ||
1860 | }; | ||
1861 | |||
1862 | static struct omap_hwmod_opt_clk gpio1_opt_clks[] = { | 853 | static struct omap_hwmod_opt_clk gpio1_opt_clks[] = { |
1863 | { .role = "dbclk", .clk = "gpio1_dbclk" }, | 854 | { .role = "dbclk", .clk = "gpio1_dbclk" }, |
1864 | }; | 855 | }; |
@@ -1879,40 +870,14 @@ static struct omap_hwmod omap44xx_gpio1_hwmod = { | |||
1879 | .opt_clks = gpio1_opt_clks, | 870 | .opt_clks = gpio1_opt_clks, |
1880 | .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks), | 871 | .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks), |
1881 | .dev_attr = &gpio_dev_attr, | 872 | .dev_attr = &gpio_dev_attr, |
1882 | .slaves = omap44xx_gpio1_slaves, | ||
1883 | .slaves_cnt = ARRAY_SIZE(omap44xx_gpio1_slaves), | ||
1884 | }; | 873 | }; |
1885 | 874 | ||
1886 | /* gpio2 */ | 875 | /* gpio2 */ |
1887 | static struct omap_hwmod omap44xx_gpio2_hwmod; | ||
1888 | static struct omap_hwmod_irq_info omap44xx_gpio2_irqs[] = { | 876 | static struct omap_hwmod_irq_info omap44xx_gpio2_irqs[] = { |
1889 | { .irq = 30 + OMAP44XX_IRQ_GIC_START }, | 877 | { .irq = 30 + OMAP44XX_IRQ_GIC_START }, |
1890 | { .irq = -1 } | 878 | { .irq = -1 } |
1891 | }; | 879 | }; |
1892 | 880 | ||
1893 | static struct omap_hwmod_addr_space omap44xx_gpio2_addrs[] = { | ||
1894 | { | ||
1895 | .pa_start = 0x48055000, | ||
1896 | .pa_end = 0x480551ff, | ||
1897 | .flags = ADDR_TYPE_RT | ||
1898 | }, | ||
1899 | { } | ||
1900 | }; | ||
1901 | |||
1902 | /* l4_per -> gpio2 */ | ||
1903 | static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio2 = { | ||
1904 | .master = &omap44xx_l4_per_hwmod, | ||
1905 | .slave = &omap44xx_gpio2_hwmod, | ||
1906 | .clk = "l4_div_ck", | ||
1907 | .addr = omap44xx_gpio2_addrs, | ||
1908 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1909 | }; | ||
1910 | |||
1911 | /* gpio2 slave ports */ | ||
1912 | static struct omap_hwmod_ocp_if *omap44xx_gpio2_slaves[] = { | ||
1913 | &omap44xx_l4_per__gpio2, | ||
1914 | }; | ||
1915 | |||
1916 | static struct omap_hwmod_opt_clk gpio2_opt_clks[] = { | 881 | static struct omap_hwmod_opt_clk gpio2_opt_clks[] = { |
1917 | { .role = "dbclk", .clk = "gpio2_dbclk" }, | 882 | { .role = "dbclk", .clk = "gpio2_dbclk" }, |
1918 | }; | 883 | }; |
@@ -1934,40 +899,14 @@ static struct omap_hwmod omap44xx_gpio2_hwmod = { | |||
1934 | .opt_clks = gpio2_opt_clks, | 899 | .opt_clks = gpio2_opt_clks, |
1935 | .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks), | 900 | .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks), |
1936 | .dev_attr = &gpio_dev_attr, | 901 | .dev_attr = &gpio_dev_attr, |
1937 | .slaves = omap44xx_gpio2_slaves, | ||
1938 | .slaves_cnt = ARRAY_SIZE(omap44xx_gpio2_slaves), | ||
1939 | }; | 902 | }; |
1940 | 903 | ||
1941 | /* gpio3 */ | 904 | /* gpio3 */ |
1942 | static struct omap_hwmod omap44xx_gpio3_hwmod; | ||
1943 | static struct omap_hwmod_irq_info omap44xx_gpio3_irqs[] = { | 905 | static struct omap_hwmod_irq_info omap44xx_gpio3_irqs[] = { |
1944 | { .irq = 31 + OMAP44XX_IRQ_GIC_START }, | 906 | { .irq = 31 + OMAP44XX_IRQ_GIC_START }, |
1945 | { .irq = -1 } | 907 | { .irq = -1 } |
1946 | }; | 908 | }; |
1947 | 909 | ||
1948 | static struct omap_hwmod_addr_space omap44xx_gpio3_addrs[] = { | ||
1949 | { | ||
1950 | .pa_start = 0x48057000, | ||
1951 | .pa_end = 0x480571ff, | ||
1952 | .flags = ADDR_TYPE_RT | ||
1953 | }, | ||
1954 | { } | ||
1955 | }; | ||
1956 | |||
1957 | /* l4_per -> gpio3 */ | ||
1958 | static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio3 = { | ||
1959 | .master = &omap44xx_l4_per_hwmod, | ||
1960 | .slave = &omap44xx_gpio3_hwmod, | ||
1961 | .clk = "l4_div_ck", | ||
1962 | .addr = omap44xx_gpio3_addrs, | ||
1963 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1964 | }; | ||
1965 | |||
1966 | /* gpio3 slave ports */ | ||
1967 | static struct omap_hwmod_ocp_if *omap44xx_gpio3_slaves[] = { | ||
1968 | &omap44xx_l4_per__gpio3, | ||
1969 | }; | ||
1970 | |||
1971 | static struct omap_hwmod_opt_clk gpio3_opt_clks[] = { | 910 | static struct omap_hwmod_opt_clk gpio3_opt_clks[] = { |
1972 | { .role = "dbclk", .clk = "gpio3_dbclk" }, | 911 | { .role = "dbclk", .clk = "gpio3_dbclk" }, |
1973 | }; | 912 | }; |
@@ -1989,40 +928,14 @@ static struct omap_hwmod omap44xx_gpio3_hwmod = { | |||
1989 | .opt_clks = gpio3_opt_clks, | 928 | .opt_clks = gpio3_opt_clks, |
1990 | .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks), | 929 | .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks), |
1991 | .dev_attr = &gpio_dev_attr, | 930 | .dev_attr = &gpio_dev_attr, |
1992 | .slaves = omap44xx_gpio3_slaves, | ||
1993 | .slaves_cnt = ARRAY_SIZE(omap44xx_gpio3_slaves), | ||
1994 | }; | 931 | }; |
1995 | 932 | ||
1996 | /* gpio4 */ | 933 | /* gpio4 */ |
1997 | static struct omap_hwmod omap44xx_gpio4_hwmod; | ||
1998 | static struct omap_hwmod_irq_info omap44xx_gpio4_irqs[] = { | 934 | static struct omap_hwmod_irq_info omap44xx_gpio4_irqs[] = { |
1999 | { .irq = 32 + OMAP44XX_IRQ_GIC_START }, | 935 | { .irq = 32 + OMAP44XX_IRQ_GIC_START }, |
2000 | { .irq = -1 } | 936 | { .irq = -1 } |
2001 | }; | 937 | }; |
2002 | 938 | ||
2003 | static struct omap_hwmod_addr_space omap44xx_gpio4_addrs[] = { | ||
2004 | { | ||
2005 | .pa_start = 0x48059000, | ||
2006 | .pa_end = 0x480591ff, | ||
2007 | .flags = ADDR_TYPE_RT | ||
2008 | }, | ||
2009 | { } | ||
2010 | }; | ||
2011 | |||
2012 | /* l4_per -> gpio4 */ | ||
2013 | static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio4 = { | ||
2014 | .master = &omap44xx_l4_per_hwmod, | ||
2015 | .slave = &omap44xx_gpio4_hwmod, | ||
2016 | .clk = "l4_div_ck", | ||
2017 | .addr = omap44xx_gpio4_addrs, | ||
2018 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2019 | }; | ||
2020 | |||
2021 | /* gpio4 slave ports */ | ||
2022 | static struct omap_hwmod_ocp_if *omap44xx_gpio4_slaves[] = { | ||
2023 | &omap44xx_l4_per__gpio4, | ||
2024 | }; | ||
2025 | |||
2026 | static struct omap_hwmod_opt_clk gpio4_opt_clks[] = { | 939 | static struct omap_hwmod_opt_clk gpio4_opt_clks[] = { |
2027 | { .role = "dbclk", .clk = "gpio4_dbclk" }, | 940 | { .role = "dbclk", .clk = "gpio4_dbclk" }, |
2028 | }; | 941 | }; |
@@ -2044,40 +957,14 @@ static struct omap_hwmod omap44xx_gpio4_hwmod = { | |||
2044 | .opt_clks = gpio4_opt_clks, | 957 | .opt_clks = gpio4_opt_clks, |
2045 | .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks), | 958 | .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks), |
2046 | .dev_attr = &gpio_dev_attr, | 959 | .dev_attr = &gpio_dev_attr, |
2047 | .slaves = omap44xx_gpio4_slaves, | ||
2048 | .slaves_cnt = ARRAY_SIZE(omap44xx_gpio4_slaves), | ||
2049 | }; | 960 | }; |
2050 | 961 | ||
2051 | /* gpio5 */ | 962 | /* gpio5 */ |
2052 | static struct omap_hwmod omap44xx_gpio5_hwmod; | ||
2053 | static struct omap_hwmod_irq_info omap44xx_gpio5_irqs[] = { | 963 | static struct omap_hwmod_irq_info omap44xx_gpio5_irqs[] = { |
2054 | { .irq = 33 + OMAP44XX_IRQ_GIC_START }, | 964 | { .irq = 33 + OMAP44XX_IRQ_GIC_START }, |
2055 | { .irq = -1 } | 965 | { .irq = -1 } |
2056 | }; | 966 | }; |
2057 | 967 | ||
2058 | static struct omap_hwmod_addr_space omap44xx_gpio5_addrs[] = { | ||
2059 | { | ||
2060 | .pa_start = 0x4805b000, | ||
2061 | .pa_end = 0x4805b1ff, | ||
2062 | .flags = ADDR_TYPE_RT | ||
2063 | }, | ||
2064 | { } | ||
2065 | }; | ||
2066 | |||
2067 | /* l4_per -> gpio5 */ | ||
2068 | static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio5 = { | ||
2069 | .master = &omap44xx_l4_per_hwmod, | ||
2070 | .slave = &omap44xx_gpio5_hwmod, | ||
2071 | .clk = "l4_div_ck", | ||
2072 | .addr = omap44xx_gpio5_addrs, | ||
2073 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2074 | }; | ||
2075 | |||
2076 | /* gpio5 slave ports */ | ||
2077 | static struct omap_hwmod_ocp_if *omap44xx_gpio5_slaves[] = { | ||
2078 | &omap44xx_l4_per__gpio5, | ||
2079 | }; | ||
2080 | |||
2081 | static struct omap_hwmod_opt_clk gpio5_opt_clks[] = { | 968 | static struct omap_hwmod_opt_clk gpio5_opt_clks[] = { |
2082 | { .role = "dbclk", .clk = "gpio5_dbclk" }, | 969 | { .role = "dbclk", .clk = "gpio5_dbclk" }, |
2083 | }; | 970 | }; |
@@ -2099,40 +986,14 @@ static struct omap_hwmod omap44xx_gpio5_hwmod = { | |||
2099 | .opt_clks = gpio5_opt_clks, | 986 | .opt_clks = gpio5_opt_clks, |
2100 | .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks), | 987 | .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks), |
2101 | .dev_attr = &gpio_dev_attr, | 988 | .dev_attr = &gpio_dev_attr, |
2102 | .slaves = omap44xx_gpio5_slaves, | ||
2103 | .slaves_cnt = ARRAY_SIZE(omap44xx_gpio5_slaves), | ||
2104 | }; | 989 | }; |
2105 | 990 | ||
2106 | /* gpio6 */ | 991 | /* gpio6 */ |
2107 | static struct omap_hwmod omap44xx_gpio6_hwmod; | ||
2108 | static struct omap_hwmod_irq_info omap44xx_gpio6_irqs[] = { | 992 | static struct omap_hwmod_irq_info omap44xx_gpio6_irqs[] = { |
2109 | { .irq = 34 + OMAP44XX_IRQ_GIC_START }, | 993 | { .irq = 34 + OMAP44XX_IRQ_GIC_START }, |
2110 | { .irq = -1 } | 994 | { .irq = -1 } |
2111 | }; | 995 | }; |
2112 | 996 | ||
2113 | static struct omap_hwmod_addr_space omap44xx_gpio6_addrs[] = { | ||
2114 | { | ||
2115 | .pa_start = 0x4805d000, | ||
2116 | .pa_end = 0x4805d1ff, | ||
2117 | .flags = ADDR_TYPE_RT | ||
2118 | }, | ||
2119 | { } | ||
2120 | }; | ||
2121 | |||
2122 | /* l4_per -> gpio6 */ | ||
2123 | static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio6 = { | ||
2124 | .master = &omap44xx_l4_per_hwmod, | ||
2125 | .slave = &omap44xx_gpio6_hwmod, | ||
2126 | .clk = "l4_div_ck", | ||
2127 | .addr = omap44xx_gpio6_addrs, | ||
2128 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2129 | }; | ||
2130 | |||
2131 | /* gpio6 slave ports */ | ||
2132 | static struct omap_hwmod_ocp_if *omap44xx_gpio6_slaves[] = { | ||
2133 | &omap44xx_l4_per__gpio6, | ||
2134 | }; | ||
2135 | |||
2136 | static struct omap_hwmod_opt_clk gpio6_opt_clks[] = { | 997 | static struct omap_hwmod_opt_clk gpio6_opt_clks[] = { |
2137 | { .role = "dbclk", .clk = "gpio6_dbclk" }, | 998 | { .role = "dbclk", .clk = "gpio6_dbclk" }, |
2138 | }; | 999 | }; |
@@ -2154,8 +1015,6 @@ static struct omap_hwmod omap44xx_gpio6_hwmod = { | |||
2154 | .opt_clks = gpio6_opt_clks, | 1015 | .opt_clks = gpio6_opt_clks, |
2155 | .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks), | 1016 | .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks), |
2156 | .dev_attr = &gpio_dev_attr, | 1017 | .dev_attr = &gpio_dev_attr, |
2157 | .slaves = omap44xx_gpio6_slaves, | ||
2158 | .slaves_cnt = ARRAY_SIZE(omap44xx_gpio6_slaves), | ||
2159 | }; | 1018 | }; |
2160 | 1019 | ||
2161 | /* | 1020 | /* |
@@ -2190,34 +1049,6 @@ static struct omap_hwmod_irq_info omap44xx_hsi_irqs[] = { | |||
2190 | { .irq = -1 } | 1049 | { .irq = -1 } |
2191 | }; | 1050 | }; |
2192 | 1051 | ||
2193 | /* hsi master ports */ | ||
2194 | static struct omap_hwmod_ocp_if *omap44xx_hsi_masters[] = { | ||
2195 | &omap44xx_hsi__l3_main_2, | ||
2196 | }; | ||
2197 | |||
2198 | static struct omap_hwmod_addr_space omap44xx_hsi_addrs[] = { | ||
2199 | { | ||
2200 | .pa_start = 0x4a058000, | ||
2201 | .pa_end = 0x4a05bfff, | ||
2202 | .flags = ADDR_TYPE_RT | ||
2203 | }, | ||
2204 | { } | ||
2205 | }; | ||
2206 | |||
2207 | /* l4_cfg -> hsi */ | ||
2208 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__hsi = { | ||
2209 | .master = &omap44xx_l4_cfg_hwmod, | ||
2210 | .slave = &omap44xx_hsi_hwmod, | ||
2211 | .clk = "l4_div_ck", | ||
2212 | .addr = omap44xx_hsi_addrs, | ||
2213 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2214 | }; | ||
2215 | |||
2216 | /* hsi slave ports */ | ||
2217 | static struct omap_hwmod_ocp_if *omap44xx_hsi_slaves[] = { | ||
2218 | &omap44xx_l4_cfg__hsi, | ||
2219 | }; | ||
2220 | |||
2221 | static struct omap_hwmod omap44xx_hsi_hwmod = { | 1052 | static struct omap_hwmod omap44xx_hsi_hwmod = { |
2222 | .name = "hsi", | 1053 | .name = "hsi", |
2223 | .class = &omap44xx_hsi_hwmod_class, | 1054 | .class = &omap44xx_hsi_hwmod_class, |
@@ -2231,10 +1062,6 @@ static struct omap_hwmod omap44xx_hsi_hwmod = { | |||
2231 | .modulemode = MODULEMODE_HWCTRL, | 1062 | .modulemode = MODULEMODE_HWCTRL, |
2232 | }, | 1063 | }, |
2233 | }, | 1064 | }, |
2234 | .slaves = omap44xx_hsi_slaves, | ||
2235 | .slaves_cnt = ARRAY_SIZE(omap44xx_hsi_slaves), | ||
2236 | .masters = omap44xx_hsi_masters, | ||
2237 | .masters_cnt = ARRAY_SIZE(omap44xx_hsi_masters), | ||
2238 | }; | 1065 | }; |
2239 | 1066 | ||
2240 | /* | 1067 | /* |
@@ -2266,7 +1093,6 @@ static struct omap_i2c_dev_attr i2c_dev_attr = { | |||
2266 | }; | 1093 | }; |
2267 | 1094 | ||
2268 | /* i2c1 */ | 1095 | /* i2c1 */ |
2269 | static struct omap_hwmod omap44xx_i2c1_hwmod; | ||
2270 | static struct omap_hwmod_irq_info omap44xx_i2c1_irqs[] = { | 1096 | static struct omap_hwmod_irq_info omap44xx_i2c1_irqs[] = { |
2271 | { .irq = 56 + OMAP44XX_IRQ_GIC_START }, | 1097 | { .irq = 56 + OMAP44XX_IRQ_GIC_START }, |
2272 | { .irq = -1 } | 1098 | { .irq = -1 } |
@@ -2278,29 +1104,6 @@ static struct omap_hwmod_dma_info omap44xx_i2c1_sdma_reqs[] = { | |||
2278 | { .dma_req = -1 } | 1104 | { .dma_req = -1 } |
2279 | }; | 1105 | }; |
2280 | 1106 | ||
2281 | static struct omap_hwmod_addr_space omap44xx_i2c1_addrs[] = { | ||
2282 | { | ||
2283 | .pa_start = 0x48070000, | ||
2284 | .pa_end = 0x480700ff, | ||
2285 | .flags = ADDR_TYPE_RT | ||
2286 | }, | ||
2287 | { } | ||
2288 | }; | ||
2289 | |||
2290 | /* l4_per -> i2c1 */ | ||
2291 | static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c1 = { | ||
2292 | .master = &omap44xx_l4_per_hwmod, | ||
2293 | .slave = &omap44xx_i2c1_hwmod, | ||
2294 | .clk = "l4_div_ck", | ||
2295 | .addr = omap44xx_i2c1_addrs, | ||
2296 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2297 | }; | ||
2298 | |||
2299 | /* i2c1 slave ports */ | ||
2300 | static struct omap_hwmod_ocp_if *omap44xx_i2c1_slaves[] = { | ||
2301 | &omap44xx_l4_per__i2c1, | ||
2302 | }; | ||
2303 | |||
2304 | static struct omap_hwmod omap44xx_i2c1_hwmod = { | 1107 | static struct omap_hwmod omap44xx_i2c1_hwmod = { |
2305 | .name = "i2c1", | 1108 | .name = "i2c1", |
2306 | .class = &omap44xx_i2c_hwmod_class, | 1109 | .class = &omap44xx_i2c_hwmod_class, |
@@ -2316,13 +1119,10 @@ static struct omap_hwmod omap44xx_i2c1_hwmod = { | |||
2316 | .modulemode = MODULEMODE_SWCTRL, | 1119 | .modulemode = MODULEMODE_SWCTRL, |
2317 | }, | 1120 | }, |
2318 | }, | 1121 | }, |
2319 | .slaves = omap44xx_i2c1_slaves, | ||
2320 | .slaves_cnt = ARRAY_SIZE(omap44xx_i2c1_slaves), | ||
2321 | .dev_attr = &i2c_dev_attr, | 1122 | .dev_attr = &i2c_dev_attr, |
2322 | }; | 1123 | }; |
2323 | 1124 | ||
2324 | /* i2c2 */ | 1125 | /* i2c2 */ |
2325 | static struct omap_hwmod omap44xx_i2c2_hwmod; | ||
2326 | static struct omap_hwmod_irq_info omap44xx_i2c2_irqs[] = { | 1126 | static struct omap_hwmod_irq_info omap44xx_i2c2_irqs[] = { |
2327 | { .irq = 57 + OMAP44XX_IRQ_GIC_START }, | 1127 | { .irq = 57 + OMAP44XX_IRQ_GIC_START }, |
2328 | { .irq = -1 } | 1128 | { .irq = -1 } |
@@ -2334,29 +1134,6 @@ static struct omap_hwmod_dma_info omap44xx_i2c2_sdma_reqs[] = { | |||
2334 | { .dma_req = -1 } | 1134 | { .dma_req = -1 } |
2335 | }; | 1135 | }; |
2336 | 1136 | ||
2337 | static struct omap_hwmod_addr_space omap44xx_i2c2_addrs[] = { | ||
2338 | { | ||
2339 | .pa_start = 0x48072000, | ||
2340 | .pa_end = 0x480720ff, | ||
2341 | .flags = ADDR_TYPE_RT | ||
2342 | }, | ||
2343 | { } | ||
2344 | }; | ||
2345 | |||
2346 | /* l4_per -> i2c2 */ | ||
2347 | static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c2 = { | ||
2348 | .master = &omap44xx_l4_per_hwmod, | ||
2349 | .slave = &omap44xx_i2c2_hwmod, | ||
2350 | .clk = "l4_div_ck", | ||
2351 | .addr = omap44xx_i2c2_addrs, | ||
2352 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2353 | }; | ||
2354 | |||
2355 | /* i2c2 slave ports */ | ||
2356 | static struct omap_hwmod_ocp_if *omap44xx_i2c2_slaves[] = { | ||
2357 | &omap44xx_l4_per__i2c2, | ||
2358 | }; | ||
2359 | |||
2360 | static struct omap_hwmod omap44xx_i2c2_hwmod = { | 1137 | static struct omap_hwmod omap44xx_i2c2_hwmod = { |
2361 | .name = "i2c2", | 1138 | .name = "i2c2", |
2362 | .class = &omap44xx_i2c_hwmod_class, | 1139 | .class = &omap44xx_i2c_hwmod_class, |
@@ -2372,13 +1149,10 @@ static struct omap_hwmod omap44xx_i2c2_hwmod = { | |||
2372 | .modulemode = MODULEMODE_SWCTRL, | 1149 | .modulemode = MODULEMODE_SWCTRL, |
2373 | }, | 1150 | }, |
2374 | }, | 1151 | }, |
2375 | .slaves = omap44xx_i2c2_slaves, | ||
2376 | .slaves_cnt = ARRAY_SIZE(omap44xx_i2c2_slaves), | ||
2377 | .dev_attr = &i2c_dev_attr, | 1152 | .dev_attr = &i2c_dev_attr, |
2378 | }; | 1153 | }; |
2379 | 1154 | ||
2380 | /* i2c3 */ | 1155 | /* i2c3 */ |
2381 | static struct omap_hwmod omap44xx_i2c3_hwmod; | ||
2382 | static struct omap_hwmod_irq_info omap44xx_i2c3_irqs[] = { | 1156 | static struct omap_hwmod_irq_info omap44xx_i2c3_irqs[] = { |
2383 | { .irq = 61 + OMAP44XX_IRQ_GIC_START }, | 1157 | { .irq = 61 + OMAP44XX_IRQ_GIC_START }, |
2384 | { .irq = -1 } | 1158 | { .irq = -1 } |
@@ -2390,29 +1164,6 @@ static struct omap_hwmod_dma_info omap44xx_i2c3_sdma_reqs[] = { | |||
2390 | { .dma_req = -1 } | 1164 | { .dma_req = -1 } |
2391 | }; | 1165 | }; |
2392 | 1166 | ||
2393 | static struct omap_hwmod_addr_space omap44xx_i2c3_addrs[] = { | ||
2394 | { | ||
2395 | .pa_start = 0x48060000, | ||
2396 | .pa_end = 0x480600ff, | ||
2397 | .flags = ADDR_TYPE_RT | ||
2398 | }, | ||
2399 | { } | ||
2400 | }; | ||
2401 | |||
2402 | /* l4_per -> i2c3 */ | ||
2403 | static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c3 = { | ||
2404 | .master = &omap44xx_l4_per_hwmod, | ||
2405 | .slave = &omap44xx_i2c3_hwmod, | ||
2406 | .clk = "l4_div_ck", | ||
2407 | .addr = omap44xx_i2c3_addrs, | ||
2408 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2409 | }; | ||
2410 | |||
2411 | /* i2c3 slave ports */ | ||
2412 | static struct omap_hwmod_ocp_if *omap44xx_i2c3_slaves[] = { | ||
2413 | &omap44xx_l4_per__i2c3, | ||
2414 | }; | ||
2415 | |||
2416 | static struct omap_hwmod omap44xx_i2c3_hwmod = { | 1167 | static struct omap_hwmod omap44xx_i2c3_hwmod = { |
2417 | .name = "i2c3", | 1168 | .name = "i2c3", |
2418 | .class = &omap44xx_i2c_hwmod_class, | 1169 | .class = &omap44xx_i2c_hwmod_class, |
@@ -2428,13 +1179,10 @@ static struct omap_hwmod omap44xx_i2c3_hwmod = { | |||
2428 | .modulemode = MODULEMODE_SWCTRL, | 1179 | .modulemode = MODULEMODE_SWCTRL, |
2429 | }, | 1180 | }, |
2430 | }, | 1181 | }, |
2431 | .slaves = omap44xx_i2c3_slaves, | ||
2432 | .slaves_cnt = ARRAY_SIZE(omap44xx_i2c3_slaves), | ||
2433 | .dev_attr = &i2c_dev_attr, | 1182 | .dev_attr = &i2c_dev_attr, |
2434 | }; | 1183 | }; |
2435 | 1184 | ||
2436 | /* i2c4 */ | 1185 | /* i2c4 */ |
2437 | static struct omap_hwmod omap44xx_i2c4_hwmod; | ||
2438 | static struct omap_hwmod_irq_info omap44xx_i2c4_irqs[] = { | 1186 | static struct omap_hwmod_irq_info omap44xx_i2c4_irqs[] = { |
2439 | { .irq = 62 + OMAP44XX_IRQ_GIC_START }, | 1187 | { .irq = 62 + OMAP44XX_IRQ_GIC_START }, |
2440 | { .irq = -1 } | 1188 | { .irq = -1 } |
@@ -2446,29 +1194,6 @@ static struct omap_hwmod_dma_info omap44xx_i2c4_sdma_reqs[] = { | |||
2446 | { .dma_req = -1 } | 1194 | { .dma_req = -1 } |
2447 | }; | 1195 | }; |
2448 | 1196 | ||
2449 | static struct omap_hwmod_addr_space omap44xx_i2c4_addrs[] = { | ||
2450 | { | ||
2451 | .pa_start = 0x48350000, | ||
2452 | .pa_end = 0x483500ff, | ||
2453 | .flags = ADDR_TYPE_RT | ||
2454 | }, | ||
2455 | { } | ||
2456 | }; | ||
2457 | |||
2458 | /* l4_per -> i2c4 */ | ||
2459 | static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c4 = { | ||
2460 | .master = &omap44xx_l4_per_hwmod, | ||
2461 | .slave = &omap44xx_i2c4_hwmod, | ||
2462 | .clk = "l4_div_ck", | ||
2463 | .addr = omap44xx_i2c4_addrs, | ||
2464 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2465 | }; | ||
2466 | |||
2467 | /* i2c4 slave ports */ | ||
2468 | static struct omap_hwmod_ocp_if *omap44xx_i2c4_slaves[] = { | ||
2469 | &omap44xx_l4_per__i2c4, | ||
2470 | }; | ||
2471 | |||
2472 | static struct omap_hwmod omap44xx_i2c4_hwmod = { | 1197 | static struct omap_hwmod omap44xx_i2c4_hwmod = { |
2473 | .name = "i2c4", | 1198 | .name = "i2c4", |
2474 | .class = &omap44xx_i2c_hwmod_class, | 1199 | .class = &omap44xx_i2c_hwmod_class, |
@@ -2484,8 +1209,6 @@ static struct omap_hwmod omap44xx_i2c4_hwmod = { | |||
2484 | .modulemode = MODULEMODE_SWCTRL, | 1209 | .modulemode = MODULEMODE_SWCTRL, |
2485 | }, | 1210 | }, |
2486 | }, | 1211 | }, |
2487 | .slaves = omap44xx_i2c4_slaves, | ||
2488 | .slaves_cnt = ARRAY_SIZE(omap44xx_i2c4_slaves), | ||
2489 | .dev_attr = &i2c_dev_attr, | 1212 | .dev_attr = &i2c_dev_attr, |
2490 | }; | 1213 | }; |
2491 | 1214 | ||
@@ -2504,66 +1227,12 @@ static struct omap_hwmod_irq_info omap44xx_ipu_irqs[] = { | |||
2504 | { .irq = -1 } | 1227 | { .irq = -1 } |
2505 | }; | 1228 | }; |
2506 | 1229 | ||
2507 | static struct omap_hwmod_rst_info omap44xx_ipu_c0_resets[] = { | 1230 | static struct omap_hwmod_rst_info omap44xx_ipu_resets[] = { |
2508 | { .name = "cpu0", .rst_shift = 0 }, | 1231 | { .name = "cpu0", .rst_shift = 0 }, |
2509 | }; | ||
2510 | |||
2511 | static struct omap_hwmod_rst_info omap44xx_ipu_c1_resets[] = { | ||
2512 | { .name = "cpu1", .rst_shift = 1 }, | 1232 | { .name = "cpu1", .rst_shift = 1 }, |
2513 | }; | ||
2514 | |||
2515 | static struct omap_hwmod_rst_info omap44xx_ipu_resets[] = { | ||
2516 | { .name = "mmu_cache", .rst_shift = 2 }, | 1233 | { .name = "mmu_cache", .rst_shift = 2 }, |
2517 | }; | 1234 | }; |
2518 | 1235 | ||
2519 | /* ipu master ports */ | ||
2520 | static struct omap_hwmod_ocp_if *omap44xx_ipu_masters[] = { | ||
2521 | &omap44xx_ipu__l3_main_2, | ||
2522 | }; | ||
2523 | |||
2524 | /* l3_main_2 -> ipu */ | ||
2525 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__ipu = { | ||
2526 | .master = &omap44xx_l3_main_2_hwmod, | ||
2527 | .slave = &omap44xx_ipu_hwmod, | ||
2528 | .clk = "l3_div_ck", | ||
2529 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2530 | }; | ||
2531 | |||
2532 | /* ipu slave ports */ | ||
2533 | static struct omap_hwmod_ocp_if *omap44xx_ipu_slaves[] = { | ||
2534 | &omap44xx_l3_main_2__ipu, | ||
2535 | }; | ||
2536 | |||
2537 | /* Pseudo hwmod for reset control purpose only */ | ||
2538 | static struct omap_hwmod omap44xx_ipu_c0_hwmod = { | ||
2539 | .name = "ipu_c0", | ||
2540 | .class = &omap44xx_ipu_hwmod_class, | ||
2541 | .clkdm_name = "ducati_clkdm", | ||
2542 | .flags = HWMOD_INIT_NO_RESET, | ||
2543 | .rst_lines = omap44xx_ipu_c0_resets, | ||
2544 | .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_c0_resets), | ||
2545 | .prcm = { | ||
2546 | .omap4 = { | ||
2547 | .rstctrl_offs = OMAP4_RM_DUCATI_RSTCTRL_OFFSET, | ||
2548 | }, | ||
2549 | }, | ||
2550 | }; | ||
2551 | |||
2552 | /* Pseudo hwmod for reset control purpose only */ | ||
2553 | static struct omap_hwmod omap44xx_ipu_c1_hwmod = { | ||
2554 | .name = "ipu_c1", | ||
2555 | .class = &omap44xx_ipu_hwmod_class, | ||
2556 | .clkdm_name = "ducati_clkdm", | ||
2557 | .flags = HWMOD_INIT_NO_RESET, | ||
2558 | .rst_lines = omap44xx_ipu_c1_resets, | ||
2559 | .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_c1_resets), | ||
2560 | .prcm = { | ||
2561 | .omap4 = { | ||
2562 | .rstctrl_offs = OMAP4_RM_DUCATI_RSTCTRL_OFFSET, | ||
2563 | }, | ||
2564 | }, | ||
2565 | }; | ||
2566 | |||
2567 | static struct omap_hwmod omap44xx_ipu_hwmod = { | 1236 | static struct omap_hwmod omap44xx_ipu_hwmod = { |
2568 | .name = "ipu", | 1237 | .name = "ipu", |
2569 | .class = &omap44xx_ipu_hwmod_class, | 1238 | .class = &omap44xx_ipu_hwmod_class, |
@@ -2580,10 +1249,6 @@ static struct omap_hwmod omap44xx_ipu_hwmod = { | |||
2580 | .modulemode = MODULEMODE_HWCTRL, | 1249 | .modulemode = MODULEMODE_HWCTRL, |
2581 | }, | 1250 | }, |
2582 | }, | 1251 | }, |
2583 | .slaves = omap44xx_ipu_slaves, | ||
2584 | .slaves_cnt = ARRAY_SIZE(omap44xx_ipu_slaves), | ||
2585 | .masters = omap44xx_ipu_masters, | ||
2586 | .masters_cnt = ARRAY_SIZE(omap44xx_ipu_masters), | ||
2587 | }; | 1252 | }; |
2588 | 1253 | ||
2589 | /* | 1254 | /* |
@@ -2630,34 +1295,6 @@ static struct omap_hwmod_dma_info omap44xx_iss_sdma_reqs[] = { | |||
2630 | { .dma_req = -1 } | 1295 | { .dma_req = -1 } |
2631 | }; | 1296 | }; |
2632 | 1297 | ||
2633 | /* iss master ports */ | ||
2634 | static struct omap_hwmod_ocp_if *omap44xx_iss_masters[] = { | ||
2635 | &omap44xx_iss__l3_main_2, | ||
2636 | }; | ||
2637 | |||
2638 | static struct omap_hwmod_addr_space omap44xx_iss_addrs[] = { | ||
2639 | { | ||
2640 | .pa_start = 0x52000000, | ||
2641 | .pa_end = 0x520000ff, | ||
2642 | .flags = ADDR_TYPE_RT | ||
2643 | }, | ||
2644 | { } | ||
2645 | }; | ||
2646 | |||
2647 | /* l3_main_2 -> iss */ | ||
2648 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iss = { | ||
2649 | .master = &omap44xx_l3_main_2_hwmod, | ||
2650 | .slave = &omap44xx_iss_hwmod, | ||
2651 | .clk = "l3_div_ck", | ||
2652 | .addr = omap44xx_iss_addrs, | ||
2653 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2654 | }; | ||
2655 | |||
2656 | /* iss slave ports */ | ||
2657 | static struct omap_hwmod_ocp_if *omap44xx_iss_slaves[] = { | ||
2658 | &omap44xx_l3_main_2__iss, | ||
2659 | }; | ||
2660 | |||
2661 | static struct omap_hwmod_opt_clk iss_opt_clks[] = { | 1298 | static struct omap_hwmod_opt_clk iss_opt_clks[] = { |
2662 | { .role = "ctrlclk", .clk = "iss_ctrlclk" }, | 1299 | { .role = "ctrlclk", .clk = "iss_ctrlclk" }, |
2663 | }; | 1300 | }; |
@@ -2678,10 +1315,6 @@ static struct omap_hwmod omap44xx_iss_hwmod = { | |||
2678 | }, | 1315 | }, |
2679 | .opt_clks = iss_opt_clks, | 1316 | .opt_clks = iss_opt_clks, |
2680 | .opt_clks_cnt = ARRAY_SIZE(iss_opt_clks), | 1317 | .opt_clks_cnt = ARRAY_SIZE(iss_opt_clks), |
2681 | .slaves = omap44xx_iss_slaves, | ||
2682 | .slaves_cnt = ARRAY_SIZE(omap44xx_iss_slaves), | ||
2683 | .masters = omap44xx_iss_masters, | ||
2684 | .masters_cnt = ARRAY_SIZE(omap44xx_iss_masters), | ||
2685 | }; | 1318 | }; |
2686 | 1319 | ||
2687 | /* | 1320 | /* |
@@ -2702,75 +1335,9 @@ static struct omap_hwmod_irq_info omap44xx_iva_irqs[] = { | |||
2702 | }; | 1335 | }; |
2703 | 1336 | ||
2704 | static struct omap_hwmod_rst_info omap44xx_iva_resets[] = { | 1337 | static struct omap_hwmod_rst_info omap44xx_iva_resets[] = { |
2705 | { .name = "logic", .rst_shift = 2 }, | ||
2706 | }; | ||
2707 | |||
2708 | static struct omap_hwmod_rst_info omap44xx_iva_seq0_resets[] = { | ||
2709 | { .name = "seq0", .rst_shift = 0 }, | 1338 | { .name = "seq0", .rst_shift = 0 }, |
2710 | }; | ||
2711 | |||
2712 | static struct omap_hwmod_rst_info omap44xx_iva_seq1_resets[] = { | ||
2713 | { .name = "seq1", .rst_shift = 1 }, | 1339 | { .name = "seq1", .rst_shift = 1 }, |
2714 | }; | 1340 | { .name = "logic", .rst_shift = 2 }, |
2715 | |||
2716 | /* iva master ports */ | ||
2717 | static struct omap_hwmod_ocp_if *omap44xx_iva_masters[] = { | ||
2718 | &omap44xx_iva__l3_main_2, | ||
2719 | &omap44xx_iva__l3_instr, | ||
2720 | }; | ||
2721 | |||
2722 | static struct omap_hwmod_addr_space omap44xx_iva_addrs[] = { | ||
2723 | { | ||
2724 | .pa_start = 0x5a000000, | ||
2725 | .pa_end = 0x5a07ffff, | ||
2726 | .flags = ADDR_TYPE_RT | ||
2727 | }, | ||
2728 | { } | ||
2729 | }; | ||
2730 | |||
2731 | /* l3_main_2 -> iva */ | ||
2732 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iva = { | ||
2733 | .master = &omap44xx_l3_main_2_hwmod, | ||
2734 | .slave = &omap44xx_iva_hwmod, | ||
2735 | .clk = "l3_div_ck", | ||
2736 | .addr = omap44xx_iva_addrs, | ||
2737 | .user = OCP_USER_MPU, | ||
2738 | }; | ||
2739 | |||
2740 | /* iva slave ports */ | ||
2741 | static struct omap_hwmod_ocp_if *omap44xx_iva_slaves[] = { | ||
2742 | &omap44xx_dsp__iva, | ||
2743 | &omap44xx_l3_main_2__iva, | ||
2744 | }; | ||
2745 | |||
2746 | /* Pseudo hwmod for reset control purpose only */ | ||
2747 | static struct omap_hwmod omap44xx_iva_seq0_hwmod = { | ||
2748 | .name = "iva_seq0", | ||
2749 | .class = &omap44xx_iva_hwmod_class, | ||
2750 | .clkdm_name = "ivahd_clkdm", | ||
2751 | .flags = HWMOD_INIT_NO_RESET, | ||
2752 | .rst_lines = omap44xx_iva_seq0_resets, | ||
2753 | .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_seq0_resets), | ||
2754 | .prcm = { | ||
2755 | .omap4 = { | ||
2756 | .rstctrl_offs = OMAP4_RM_IVAHD_RSTCTRL_OFFSET, | ||
2757 | }, | ||
2758 | }, | ||
2759 | }; | ||
2760 | |||
2761 | /* Pseudo hwmod for reset control purpose only */ | ||
2762 | static struct omap_hwmod omap44xx_iva_seq1_hwmod = { | ||
2763 | .name = "iva_seq1", | ||
2764 | .class = &omap44xx_iva_hwmod_class, | ||
2765 | .clkdm_name = "ivahd_clkdm", | ||
2766 | .flags = HWMOD_INIT_NO_RESET, | ||
2767 | .rst_lines = omap44xx_iva_seq1_resets, | ||
2768 | .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_seq1_resets), | ||
2769 | .prcm = { | ||
2770 | .omap4 = { | ||
2771 | .rstctrl_offs = OMAP4_RM_IVAHD_RSTCTRL_OFFSET, | ||
2772 | }, | ||
2773 | }, | ||
2774 | }; | 1341 | }; |
2775 | 1342 | ||
2776 | static struct omap_hwmod omap44xx_iva_hwmod = { | 1343 | static struct omap_hwmod omap44xx_iva_hwmod = { |
@@ -2789,10 +1356,6 @@ static struct omap_hwmod omap44xx_iva_hwmod = { | |||
2789 | .modulemode = MODULEMODE_HWCTRL, | 1356 | .modulemode = MODULEMODE_HWCTRL, |
2790 | }, | 1357 | }, |
2791 | }, | 1358 | }, |
2792 | .slaves = omap44xx_iva_slaves, | ||
2793 | .slaves_cnt = ARRAY_SIZE(omap44xx_iva_slaves), | ||
2794 | .masters = omap44xx_iva_masters, | ||
2795 | .masters_cnt = ARRAY_SIZE(omap44xx_iva_masters), | ||
2796 | }; | 1359 | }; |
2797 | 1360 | ||
2798 | /* | 1361 | /* |
@@ -2818,35 +1381,11 @@ static struct omap_hwmod_class omap44xx_kbd_hwmod_class = { | |||
2818 | }; | 1381 | }; |
2819 | 1382 | ||
2820 | /* kbd */ | 1383 | /* kbd */ |
2821 | static struct omap_hwmod omap44xx_kbd_hwmod; | ||
2822 | static struct omap_hwmod_irq_info omap44xx_kbd_irqs[] = { | 1384 | static struct omap_hwmod_irq_info omap44xx_kbd_irqs[] = { |
2823 | { .irq = 120 + OMAP44XX_IRQ_GIC_START }, | 1385 | { .irq = 120 + OMAP44XX_IRQ_GIC_START }, |
2824 | { .irq = -1 } | 1386 | { .irq = -1 } |
2825 | }; | 1387 | }; |
2826 | 1388 | ||
2827 | static struct omap_hwmod_addr_space omap44xx_kbd_addrs[] = { | ||
2828 | { | ||
2829 | .pa_start = 0x4a31c000, | ||
2830 | .pa_end = 0x4a31c07f, | ||
2831 | .flags = ADDR_TYPE_RT | ||
2832 | }, | ||
2833 | { } | ||
2834 | }; | ||
2835 | |||
2836 | /* l4_wkup -> kbd */ | ||
2837 | static struct omap_hwmod_ocp_if omap44xx_l4_wkup__kbd = { | ||
2838 | .master = &omap44xx_l4_wkup_hwmod, | ||
2839 | .slave = &omap44xx_kbd_hwmod, | ||
2840 | .clk = "l4_wkup_clk_mux_ck", | ||
2841 | .addr = omap44xx_kbd_addrs, | ||
2842 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2843 | }; | ||
2844 | |||
2845 | /* kbd slave ports */ | ||
2846 | static struct omap_hwmod_ocp_if *omap44xx_kbd_slaves[] = { | ||
2847 | &omap44xx_l4_wkup__kbd, | ||
2848 | }; | ||
2849 | |||
2850 | static struct omap_hwmod omap44xx_kbd_hwmod = { | 1389 | static struct omap_hwmod omap44xx_kbd_hwmod = { |
2851 | .name = "kbd", | 1390 | .name = "kbd", |
2852 | .class = &omap44xx_kbd_hwmod_class, | 1391 | .class = &omap44xx_kbd_hwmod_class, |
@@ -2860,8 +1399,6 @@ static struct omap_hwmod omap44xx_kbd_hwmod = { | |||
2860 | .modulemode = MODULEMODE_SWCTRL, | 1399 | .modulemode = MODULEMODE_SWCTRL, |
2861 | }, | 1400 | }, |
2862 | }, | 1401 | }, |
2863 | .slaves = omap44xx_kbd_slaves, | ||
2864 | .slaves_cnt = ARRAY_SIZE(omap44xx_kbd_slaves), | ||
2865 | }; | 1402 | }; |
2866 | 1403 | ||
2867 | /* | 1404 | /* |
@@ -2885,35 +1422,11 @@ static struct omap_hwmod_class omap44xx_mailbox_hwmod_class = { | |||
2885 | }; | 1422 | }; |
2886 | 1423 | ||
2887 | /* mailbox */ | 1424 | /* mailbox */ |
2888 | static struct omap_hwmod omap44xx_mailbox_hwmod; | ||
2889 | static struct omap_hwmod_irq_info omap44xx_mailbox_irqs[] = { | 1425 | static struct omap_hwmod_irq_info omap44xx_mailbox_irqs[] = { |
2890 | { .irq = 26 + OMAP44XX_IRQ_GIC_START }, | 1426 | { .irq = 26 + OMAP44XX_IRQ_GIC_START }, |
2891 | { .irq = -1 } | 1427 | { .irq = -1 } |
2892 | }; | 1428 | }; |
2893 | 1429 | ||
2894 | static struct omap_hwmod_addr_space omap44xx_mailbox_addrs[] = { | ||
2895 | { | ||
2896 | .pa_start = 0x4a0f4000, | ||
2897 | .pa_end = 0x4a0f41ff, | ||
2898 | .flags = ADDR_TYPE_RT | ||
2899 | }, | ||
2900 | { } | ||
2901 | }; | ||
2902 | |||
2903 | /* l4_cfg -> mailbox */ | ||
2904 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__mailbox = { | ||
2905 | .master = &omap44xx_l4_cfg_hwmod, | ||
2906 | .slave = &omap44xx_mailbox_hwmod, | ||
2907 | .clk = "l4_div_ck", | ||
2908 | .addr = omap44xx_mailbox_addrs, | ||
2909 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2910 | }; | ||
2911 | |||
2912 | /* mailbox slave ports */ | ||
2913 | static struct omap_hwmod_ocp_if *omap44xx_mailbox_slaves[] = { | ||
2914 | &omap44xx_l4_cfg__mailbox, | ||
2915 | }; | ||
2916 | |||
2917 | static struct omap_hwmod omap44xx_mailbox_hwmod = { | 1430 | static struct omap_hwmod omap44xx_mailbox_hwmod = { |
2918 | .name = "mailbox", | 1431 | .name = "mailbox", |
2919 | .class = &omap44xx_mailbox_hwmod_class, | 1432 | .class = &omap44xx_mailbox_hwmod_class, |
@@ -2925,8 +1438,6 @@ static struct omap_hwmod omap44xx_mailbox_hwmod = { | |||
2925 | .context_offs = OMAP4_RM_L4CFG_MAILBOX_CONTEXT_OFFSET, | 1438 | .context_offs = OMAP4_RM_L4CFG_MAILBOX_CONTEXT_OFFSET, |
2926 | }, | 1439 | }, |
2927 | }, | 1440 | }, |
2928 | .slaves = omap44xx_mailbox_slaves, | ||
2929 | .slaves_cnt = ARRAY_SIZE(omap44xx_mailbox_slaves), | ||
2930 | }; | 1441 | }; |
2931 | 1442 | ||
2932 | /* | 1443 | /* |
@@ -2949,7 +1460,6 @@ static struct omap_hwmod_class omap44xx_mcbsp_hwmod_class = { | |||
2949 | }; | 1460 | }; |
2950 | 1461 | ||
2951 | /* mcbsp1 */ | 1462 | /* mcbsp1 */ |
2952 | static struct omap_hwmod omap44xx_mcbsp1_hwmod; | ||
2953 | static struct omap_hwmod_irq_info omap44xx_mcbsp1_irqs[] = { | 1463 | static struct omap_hwmod_irq_info omap44xx_mcbsp1_irqs[] = { |
2954 | { .irq = 17 + OMAP44XX_IRQ_GIC_START }, | 1464 | { .irq = 17 + OMAP44XX_IRQ_GIC_START }, |
2955 | { .irq = -1 } | 1465 | { .irq = -1 } |
@@ -2961,50 +1471,6 @@ static struct omap_hwmod_dma_info omap44xx_mcbsp1_sdma_reqs[] = { | |||
2961 | { .dma_req = -1 } | 1471 | { .dma_req = -1 } |
2962 | }; | 1472 | }; |
2963 | 1473 | ||
2964 | static struct omap_hwmod_addr_space omap44xx_mcbsp1_addrs[] = { | ||
2965 | { | ||
2966 | .name = "mpu", | ||
2967 | .pa_start = 0x40122000, | ||
2968 | .pa_end = 0x401220ff, | ||
2969 | .flags = ADDR_TYPE_RT | ||
2970 | }, | ||
2971 | { } | ||
2972 | }; | ||
2973 | |||
2974 | /* l4_abe -> mcbsp1 */ | ||
2975 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1 = { | ||
2976 | .master = &omap44xx_l4_abe_hwmod, | ||
2977 | .slave = &omap44xx_mcbsp1_hwmod, | ||
2978 | .clk = "ocp_abe_iclk", | ||
2979 | .addr = omap44xx_mcbsp1_addrs, | ||
2980 | .user = OCP_USER_MPU, | ||
2981 | }; | ||
2982 | |||
2983 | static struct omap_hwmod_addr_space omap44xx_mcbsp1_dma_addrs[] = { | ||
2984 | { | ||
2985 | .name = "dma", | ||
2986 | .pa_start = 0x49022000, | ||
2987 | .pa_end = 0x490220ff, | ||
2988 | .flags = ADDR_TYPE_RT | ||
2989 | }, | ||
2990 | { } | ||
2991 | }; | ||
2992 | |||
2993 | /* l4_abe -> mcbsp1 (dma) */ | ||
2994 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1_dma = { | ||
2995 | .master = &omap44xx_l4_abe_hwmod, | ||
2996 | .slave = &omap44xx_mcbsp1_hwmod, | ||
2997 | .clk = "ocp_abe_iclk", | ||
2998 | .addr = omap44xx_mcbsp1_dma_addrs, | ||
2999 | .user = OCP_USER_SDMA, | ||
3000 | }; | ||
3001 | |||
3002 | /* mcbsp1 slave ports */ | ||
3003 | static struct omap_hwmod_ocp_if *omap44xx_mcbsp1_slaves[] = { | ||
3004 | &omap44xx_l4_abe__mcbsp1, | ||
3005 | &omap44xx_l4_abe__mcbsp1_dma, | ||
3006 | }; | ||
3007 | |||
3008 | static struct omap_hwmod_opt_clk mcbsp1_opt_clks[] = { | 1474 | static struct omap_hwmod_opt_clk mcbsp1_opt_clks[] = { |
3009 | { .role = "pad_fck", .clk = "pad_clks_ck" }, | 1475 | { .role = "pad_fck", .clk = "pad_clks_ck" }, |
3010 | { .role = "prcm_clk", .clk = "mcbsp1_sync_mux_ck" }, | 1476 | { .role = "prcm_clk", .clk = "mcbsp1_sync_mux_ck" }, |
@@ -3024,14 +1490,11 @@ static struct omap_hwmod omap44xx_mcbsp1_hwmod = { | |||
3024 | .modulemode = MODULEMODE_SWCTRL, | 1490 | .modulemode = MODULEMODE_SWCTRL, |
3025 | }, | 1491 | }, |
3026 | }, | 1492 | }, |
3027 | .slaves = omap44xx_mcbsp1_slaves, | ||
3028 | .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp1_slaves), | ||
3029 | .opt_clks = mcbsp1_opt_clks, | 1493 | .opt_clks = mcbsp1_opt_clks, |
3030 | .opt_clks_cnt = ARRAY_SIZE(mcbsp1_opt_clks), | 1494 | .opt_clks_cnt = ARRAY_SIZE(mcbsp1_opt_clks), |
3031 | }; | 1495 | }; |
3032 | 1496 | ||
3033 | /* mcbsp2 */ | 1497 | /* mcbsp2 */ |
3034 | static struct omap_hwmod omap44xx_mcbsp2_hwmod; | ||
3035 | static struct omap_hwmod_irq_info omap44xx_mcbsp2_irqs[] = { | 1498 | static struct omap_hwmod_irq_info omap44xx_mcbsp2_irqs[] = { |
3036 | { .irq = 22 + OMAP44XX_IRQ_GIC_START }, | 1499 | { .irq = 22 + OMAP44XX_IRQ_GIC_START }, |
3037 | { .irq = -1 } | 1500 | { .irq = -1 } |
@@ -3043,50 +1506,6 @@ static struct omap_hwmod_dma_info omap44xx_mcbsp2_sdma_reqs[] = { | |||
3043 | { .dma_req = -1 } | 1506 | { .dma_req = -1 } |
3044 | }; | 1507 | }; |
3045 | 1508 | ||
3046 | static struct omap_hwmod_addr_space omap44xx_mcbsp2_addrs[] = { | ||
3047 | { | ||
3048 | .name = "mpu", | ||
3049 | .pa_start = 0x40124000, | ||
3050 | .pa_end = 0x401240ff, | ||
3051 | .flags = ADDR_TYPE_RT | ||
3052 | }, | ||
3053 | { } | ||
3054 | }; | ||
3055 | |||
3056 | /* l4_abe -> mcbsp2 */ | ||
3057 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2 = { | ||
3058 | .master = &omap44xx_l4_abe_hwmod, | ||
3059 | .slave = &omap44xx_mcbsp2_hwmod, | ||
3060 | .clk = "ocp_abe_iclk", | ||
3061 | .addr = omap44xx_mcbsp2_addrs, | ||
3062 | .user = OCP_USER_MPU, | ||
3063 | }; | ||
3064 | |||
3065 | static struct omap_hwmod_addr_space omap44xx_mcbsp2_dma_addrs[] = { | ||
3066 | { | ||
3067 | .name = "dma", | ||
3068 | .pa_start = 0x49024000, | ||
3069 | .pa_end = 0x490240ff, | ||
3070 | .flags = ADDR_TYPE_RT | ||
3071 | }, | ||
3072 | { } | ||
3073 | }; | ||
3074 | |||
3075 | /* l4_abe -> mcbsp2 (dma) */ | ||
3076 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2_dma = { | ||
3077 | .master = &omap44xx_l4_abe_hwmod, | ||
3078 | .slave = &omap44xx_mcbsp2_hwmod, | ||
3079 | .clk = "ocp_abe_iclk", | ||
3080 | .addr = omap44xx_mcbsp2_dma_addrs, | ||
3081 | .user = OCP_USER_SDMA, | ||
3082 | }; | ||
3083 | |||
3084 | /* mcbsp2 slave ports */ | ||
3085 | static struct omap_hwmod_ocp_if *omap44xx_mcbsp2_slaves[] = { | ||
3086 | &omap44xx_l4_abe__mcbsp2, | ||
3087 | &omap44xx_l4_abe__mcbsp2_dma, | ||
3088 | }; | ||
3089 | |||
3090 | static struct omap_hwmod_opt_clk mcbsp2_opt_clks[] = { | 1509 | static struct omap_hwmod_opt_clk mcbsp2_opt_clks[] = { |
3091 | { .role = "pad_fck", .clk = "pad_clks_ck" }, | 1510 | { .role = "pad_fck", .clk = "pad_clks_ck" }, |
3092 | { .role = "prcm_clk", .clk = "mcbsp2_sync_mux_ck" }, | 1511 | { .role = "prcm_clk", .clk = "mcbsp2_sync_mux_ck" }, |
@@ -3106,14 +1525,11 @@ static struct omap_hwmod omap44xx_mcbsp2_hwmod = { | |||
3106 | .modulemode = MODULEMODE_SWCTRL, | 1525 | .modulemode = MODULEMODE_SWCTRL, |
3107 | }, | 1526 | }, |
3108 | }, | 1527 | }, |
3109 | .slaves = omap44xx_mcbsp2_slaves, | ||
3110 | .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp2_slaves), | ||
3111 | .opt_clks = mcbsp2_opt_clks, | 1528 | .opt_clks = mcbsp2_opt_clks, |
3112 | .opt_clks_cnt = ARRAY_SIZE(mcbsp2_opt_clks), | 1529 | .opt_clks_cnt = ARRAY_SIZE(mcbsp2_opt_clks), |
3113 | }; | 1530 | }; |
3114 | 1531 | ||
3115 | /* mcbsp3 */ | 1532 | /* mcbsp3 */ |
3116 | static struct omap_hwmod omap44xx_mcbsp3_hwmod; | ||
3117 | static struct omap_hwmod_irq_info omap44xx_mcbsp3_irqs[] = { | 1533 | static struct omap_hwmod_irq_info omap44xx_mcbsp3_irqs[] = { |
3118 | { .irq = 23 + OMAP44XX_IRQ_GIC_START }, | 1534 | { .irq = 23 + OMAP44XX_IRQ_GIC_START }, |
3119 | { .irq = -1 } | 1535 | { .irq = -1 } |
@@ -3125,50 +1541,6 @@ static struct omap_hwmod_dma_info omap44xx_mcbsp3_sdma_reqs[] = { | |||
3125 | { .dma_req = -1 } | 1541 | { .dma_req = -1 } |
3126 | }; | 1542 | }; |
3127 | 1543 | ||
3128 | static struct omap_hwmod_addr_space omap44xx_mcbsp3_addrs[] = { | ||
3129 | { | ||
3130 | .name = "mpu", | ||
3131 | .pa_start = 0x40126000, | ||
3132 | .pa_end = 0x401260ff, | ||
3133 | .flags = ADDR_TYPE_RT | ||
3134 | }, | ||
3135 | { } | ||
3136 | }; | ||
3137 | |||
3138 | /* l4_abe -> mcbsp3 */ | ||
3139 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3 = { | ||
3140 | .master = &omap44xx_l4_abe_hwmod, | ||
3141 | .slave = &omap44xx_mcbsp3_hwmod, | ||
3142 | .clk = "ocp_abe_iclk", | ||
3143 | .addr = omap44xx_mcbsp3_addrs, | ||
3144 | .user = OCP_USER_MPU, | ||
3145 | }; | ||
3146 | |||
3147 | static struct omap_hwmod_addr_space omap44xx_mcbsp3_dma_addrs[] = { | ||
3148 | { | ||
3149 | .name = "dma", | ||
3150 | .pa_start = 0x49026000, | ||
3151 | .pa_end = 0x490260ff, | ||
3152 | .flags = ADDR_TYPE_RT | ||
3153 | }, | ||
3154 | { } | ||
3155 | }; | ||
3156 | |||
3157 | /* l4_abe -> mcbsp3 (dma) */ | ||
3158 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3_dma = { | ||
3159 | .master = &omap44xx_l4_abe_hwmod, | ||
3160 | .slave = &omap44xx_mcbsp3_hwmod, | ||
3161 | .clk = "ocp_abe_iclk", | ||
3162 | .addr = omap44xx_mcbsp3_dma_addrs, | ||
3163 | .user = OCP_USER_SDMA, | ||
3164 | }; | ||
3165 | |||
3166 | /* mcbsp3 slave ports */ | ||
3167 | static struct omap_hwmod_ocp_if *omap44xx_mcbsp3_slaves[] = { | ||
3168 | &omap44xx_l4_abe__mcbsp3, | ||
3169 | &omap44xx_l4_abe__mcbsp3_dma, | ||
3170 | }; | ||
3171 | |||
3172 | static struct omap_hwmod_opt_clk mcbsp3_opt_clks[] = { | 1544 | static struct omap_hwmod_opt_clk mcbsp3_opt_clks[] = { |
3173 | { .role = "pad_fck", .clk = "pad_clks_ck" }, | 1545 | { .role = "pad_fck", .clk = "pad_clks_ck" }, |
3174 | { .role = "prcm_clk", .clk = "mcbsp3_sync_mux_ck" }, | 1546 | { .role = "prcm_clk", .clk = "mcbsp3_sync_mux_ck" }, |
@@ -3188,14 +1560,11 @@ static struct omap_hwmod omap44xx_mcbsp3_hwmod = { | |||
3188 | .modulemode = MODULEMODE_SWCTRL, | 1560 | .modulemode = MODULEMODE_SWCTRL, |
3189 | }, | 1561 | }, |
3190 | }, | 1562 | }, |
3191 | .slaves = omap44xx_mcbsp3_slaves, | ||
3192 | .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp3_slaves), | ||
3193 | .opt_clks = mcbsp3_opt_clks, | 1563 | .opt_clks = mcbsp3_opt_clks, |
3194 | .opt_clks_cnt = ARRAY_SIZE(mcbsp3_opt_clks), | 1564 | .opt_clks_cnt = ARRAY_SIZE(mcbsp3_opt_clks), |
3195 | }; | 1565 | }; |
3196 | 1566 | ||
3197 | /* mcbsp4 */ | 1567 | /* mcbsp4 */ |
3198 | static struct omap_hwmod omap44xx_mcbsp4_hwmod; | ||
3199 | static struct omap_hwmod_irq_info omap44xx_mcbsp4_irqs[] = { | 1568 | static struct omap_hwmod_irq_info omap44xx_mcbsp4_irqs[] = { |
3200 | { .irq = 16 + OMAP44XX_IRQ_GIC_START }, | 1569 | { .irq = 16 + OMAP44XX_IRQ_GIC_START }, |
3201 | { .irq = -1 } | 1570 | { .irq = -1 } |
@@ -3207,29 +1576,6 @@ static struct omap_hwmod_dma_info omap44xx_mcbsp4_sdma_reqs[] = { | |||
3207 | { .dma_req = -1 } | 1576 | { .dma_req = -1 } |
3208 | }; | 1577 | }; |
3209 | 1578 | ||
3210 | static struct omap_hwmod_addr_space omap44xx_mcbsp4_addrs[] = { | ||
3211 | { | ||
3212 | .pa_start = 0x48096000, | ||
3213 | .pa_end = 0x480960ff, | ||
3214 | .flags = ADDR_TYPE_RT | ||
3215 | }, | ||
3216 | { } | ||
3217 | }; | ||
3218 | |||
3219 | /* l4_per -> mcbsp4 */ | ||
3220 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mcbsp4 = { | ||
3221 | .master = &omap44xx_l4_per_hwmod, | ||
3222 | .slave = &omap44xx_mcbsp4_hwmod, | ||
3223 | .clk = "l4_div_ck", | ||
3224 | .addr = omap44xx_mcbsp4_addrs, | ||
3225 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3226 | }; | ||
3227 | |||
3228 | /* mcbsp4 slave ports */ | ||
3229 | static struct omap_hwmod_ocp_if *omap44xx_mcbsp4_slaves[] = { | ||
3230 | &omap44xx_l4_per__mcbsp4, | ||
3231 | }; | ||
3232 | |||
3233 | static struct omap_hwmod_opt_clk mcbsp4_opt_clks[] = { | 1579 | static struct omap_hwmod_opt_clk mcbsp4_opt_clks[] = { |
3234 | { .role = "pad_fck", .clk = "pad_clks_ck" }, | 1580 | { .role = "pad_fck", .clk = "pad_clks_ck" }, |
3235 | { .role = "prcm_clk", .clk = "mcbsp4_sync_mux_ck" }, | 1581 | { .role = "prcm_clk", .clk = "mcbsp4_sync_mux_ck" }, |
@@ -3249,8 +1595,6 @@ static struct omap_hwmod omap44xx_mcbsp4_hwmod = { | |||
3249 | .modulemode = MODULEMODE_SWCTRL, | 1595 | .modulemode = MODULEMODE_SWCTRL, |
3250 | }, | 1596 | }, |
3251 | }, | 1597 | }, |
3252 | .slaves = omap44xx_mcbsp4_slaves, | ||
3253 | .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp4_slaves), | ||
3254 | .opt_clks = mcbsp4_opt_clks, | 1598 | .opt_clks = mcbsp4_opt_clks, |
3255 | .opt_clks_cnt = ARRAY_SIZE(mcbsp4_opt_clks), | 1599 | .opt_clks_cnt = ARRAY_SIZE(mcbsp4_opt_clks), |
3256 | }; | 1600 | }; |
@@ -3277,7 +1621,6 @@ static struct omap_hwmod_class omap44xx_mcpdm_hwmod_class = { | |||
3277 | }; | 1621 | }; |
3278 | 1622 | ||
3279 | /* mcpdm */ | 1623 | /* mcpdm */ |
3280 | static struct omap_hwmod omap44xx_mcpdm_hwmod; | ||
3281 | static struct omap_hwmod_irq_info omap44xx_mcpdm_irqs[] = { | 1624 | static struct omap_hwmod_irq_info omap44xx_mcpdm_irqs[] = { |
3282 | { .irq = 112 + OMAP44XX_IRQ_GIC_START }, | 1625 | { .irq = 112 + OMAP44XX_IRQ_GIC_START }, |
3283 | { .irq = -1 } | 1626 | { .irq = -1 } |
@@ -3289,48 +1632,6 @@ static struct omap_hwmod_dma_info omap44xx_mcpdm_sdma_reqs[] = { | |||
3289 | { .dma_req = -1 } | 1632 | { .dma_req = -1 } |
3290 | }; | 1633 | }; |
3291 | 1634 | ||
3292 | static struct omap_hwmod_addr_space omap44xx_mcpdm_addrs[] = { | ||
3293 | { | ||
3294 | .pa_start = 0x40132000, | ||
3295 | .pa_end = 0x4013207f, | ||
3296 | .flags = ADDR_TYPE_RT | ||
3297 | }, | ||
3298 | { } | ||
3299 | }; | ||
3300 | |||
3301 | /* l4_abe -> mcpdm */ | ||
3302 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm = { | ||
3303 | .master = &omap44xx_l4_abe_hwmod, | ||
3304 | .slave = &omap44xx_mcpdm_hwmod, | ||
3305 | .clk = "ocp_abe_iclk", | ||
3306 | .addr = omap44xx_mcpdm_addrs, | ||
3307 | .user = OCP_USER_MPU, | ||
3308 | }; | ||
3309 | |||
3310 | static struct omap_hwmod_addr_space omap44xx_mcpdm_dma_addrs[] = { | ||
3311 | { | ||
3312 | .pa_start = 0x49032000, | ||
3313 | .pa_end = 0x4903207f, | ||
3314 | .flags = ADDR_TYPE_RT | ||
3315 | }, | ||
3316 | { } | ||
3317 | }; | ||
3318 | |||
3319 | /* l4_abe -> mcpdm (dma) */ | ||
3320 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm_dma = { | ||
3321 | .master = &omap44xx_l4_abe_hwmod, | ||
3322 | .slave = &omap44xx_mcpdm_hwmod, | ||
3323 | .clk = "ocp_abe_iclk", | ||
3324 | .addr = omap44xx_mcpdm_dma_addrs, | ||
3325 | .user = OCP_USER_SDMA, | ||
3326 | }; | ||
3327 | |||
3328 | /* mcpdm slave ports */ | ||
3329 | static struct omap_hwmod_ocp_if *omap44xx_mcpdm_slaves[] = { | ||
3330 | &omap44xx_l4_abe__mcpdm, | ||
3331 | &omap44xx_l4_abe__mcpdm_dma, | ||
3332 | }; | ||
3333 | |||
3334 | static struct omap_hwmod omap44xx_mcpdm_hwmod = { | 1635 | static struct omap_hwmod omap44xx_mcpdm_hwmod = { |
3335 | .name = "mcpdm", | 1636 | .name = "mcpdm", |
3336 | .class = &omap44xx_mcpdm_hwmod_class, | 1637 | .class = &omap44xx_mcpdm_hwmod_class, |
@@ -3345,8 +1646,6 @@ static struct omap_hwmod omap44xx_mcpdm_hwmod = { | |||
3345 | .modulemode = MODULEMODE_SWCTRL, | 1646 | .modulemode = MODULEMODE_SWCTRL, |
3346 | }, | 1647 | }, |
3347 | }, | 1648 | }, |
3348 | .slaves = omap44xx_mcpdm_slaves, | ||
3349 | .slaves_cnt = ARRAY_SIZE(omap44xx_mcpdm_slaves), | ||
3350 | }; | 1649 | }; |
3351 | 1650 | ||
3352 | /* | 1651 | /* |
@@ -3372,7 +1671,6 @@ static struct omap_hwmod_class omap44xx_mcspi_hwmod_class = { | |||
3372 | }; | 1671 | }; |
3373 | 1672 | ||
3374 | /* mcspi1 */ | 1673 | /* mcspi1 */ |
3375 | static struct omap_hwmod omap44xx_mcspi1_hwmod; | ||
3376 | static struct omap_hwmod_irq_info omap44xx_mcspi1_irqs[] = { | 1674 | static struct omap_hwmod_irq_info omap44xx_mcspi1_irqs[] = { |
3377 | { .irq = 65 + OMAP44XX_IRQ_GIC_START }, | 1675 | { .irq = 65 + OMAP44XX_IRQ_GIC_START }, |
3378 | { .irq = -1 } | 1676 | { .irq = -1 } |
@@ -3390,29 +1688,6 @@ static struct omap_hwmod_dma_info omap44xx_mcspi1_sdma_reqs[] = { | |||
3390 | { .dma_req = -1 } | 1688 | { .dma_req = -1 } |
3391 | }; | 1689 | }; |
3392 | 1690 | ||
3393 | static struct omap_hwmod_addr_space omap44xx_mcspi1_addrs[] = { | ||
3394 | { | ||
3395 | .pa_start = 0x48098000, | ||
3396 | .pa_end = 0x480981ff, | ||
3397 | .flags = ADDR_TYPE_RT | ||
3398 | }, | ||
3399 | { } | ||
3400 | }; | ||
3401 | |||
3402 | /* l4_per -> mcspi1 */ | ||
3403 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi1 = { | ||
3404 | .master = &omap44xx_l4_per_hwmod, | ||
3405 | .slave = &omap44xx_mcspi1_hwmod, | ||
3406 | .clk = "l4_div_ck", | ||
3407 | .addr = omap44xx_mcspi1_addrs, | ||
3408 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3409 | }; | ||
3410 | |||
3411 | /* mcspi1 slave ports */ | ||
3412 | static struct omap_hwmod_ocp_if *omap44xx_mcspi1_slaves[] = { | ||
3413 | &omap44xx_l4_per__mcspi1, | ||
3414 | }; | ||
3415 | |||
3416 | /* mcspi1 dev_attr */ | 1691 | /* mcspi1 dev_attr */ |
3417 | static struct omap2_mcspi_dev_attr mcspi1_dev_attr = { | 1692 | static struct omap2_mcspi_dev_attr mcspi1_dev_attr = { |
3418 | .num_chipselect = 4, | 1693 | .num_chipselect = 4, |
@@ -3433,12 +1708,9 @@ static struct omap_hwmod omap44xx_mcspi1_hwmod = { | |||
3433 | }, | 1708 | }, |
3434 | }, | 1709 | }, |
3435 | .dev_attr = &mcspi1_dev_attr, | 1710 | .dev_attr = &mcspi1_dev_attr, |
3436 | .slaves = omap44xx_mcspi1_slaves, | ||
3437 | .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi1_slaves), | ||
3438 | }; | 1711 | }; |
3439 | 1712 | ||
3440 | /* mcspi2 */ | 1713 | /* mcspi2 */ |
3441 | static struct omap_hwmod omap44xx_mcspi2_hwmod; | ||
3442 | static struct omap_hwmod_irq_info omap44xx_mcspi2_irqs[] = { | 1714 | static struct omap_hwmod_irq_info omap44xx_mcspi2_irqs[] = { |
3443 | { .irq = 66 + OMAP44XX_IRQ_GIC_START }, | 1715 | { .irq = 66 + OMAP44XX_IRQ_GIC_START }, |
3444 | { .irq = -1 } | 1716 | { .irq = -1 } |
@@ -3452,29 +1724,6 @@ static struct omap_hwmod_dma_info omap44xx_mcspi2_sdma_reqs[] = { | |||
3452 | { .dma_req = -1 } | 1724 | { .dma_req = -1 } |
3453 | }; | 1725 | }; |
3454 | 1726 | ||
3455 | static struct omap_hwmod_addr_space omap44xx_mcspi2_addrs[] = { | ||
3456 | { | ||
3457 | .pa_start = 0x4809a000, | ||
3458 | .pa_end = 0x4809a1ff, | ||
3459 | .flags = ADDR_TYPE_RT | ||
3460 | }, | ||
3461 | { } | ||
3462 | }; | ||
3463 | |||
3464 | /* l4_per -> mcspi2 */ | ||
3465 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi2 = { | ||
3466 | .master = &omap44xx_l4_per_hwmod, | ||
3467 | .slave = &omap44xx_mcspi2_hwmod, | ||
3468 | .clk = "l4_div_ck", | ||
3469 | .addr = omap44xx_mcspi2_addrs, | ||
3470 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3471 | }; | ||
3472 | |||
3473 | /* mcspi2 slave ports */ | ||
3474 | static struct omap_hwmod_ocp_if *omap44xx_mcspi2_slaves[] = { | ||
3475 | &omap44xx_l4_per__mcspi2, | ||
3476 | }; | ||
3477 | |||
3478 | /* mcspi2 dev_attr */ | 1727 | /* mcspi2 dev_attr */ |
3479 | static struct omap2_mcspi_dev_attr mcspi2_dev_attr = { | 1728 | static struct omap2_mcspi_dev_attr mcspi2_dev_attr = { |
3480 | .num_chipselect = 2, | 1729 | .num_chipselect = 2, |
@@ -3495,12 +1744,9 @@ static struct omap_hwmod omap44xx_mcspi2_hwmod = { | |||
3495 | }, | 1744 | }, |
3496 | }, | 1745 | }, |
3497 | .dev_attr = &mcspi2_dev_attr, | 1746 | .dev_attr = &mcspi2_dev_attr, |
3498 | .slaves = omap44xx_mcspi2_slaves, | ||
3499 | .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi2_slaves), | ||
3500 | }; | 1747 | }; |
3501 | 1748 | ||
3502 | /* mcspi3 */ | 1749 | /* mcspi3 */ |
3503 | static struct omap_hwmod omap44xx_mcspi3_hwmod; | ||
3504 | static struct omap_hwmod_irq_info omap44xx_mcspi3_irqs[] = { | 1750 | static struct omap_hwmod_irq_info omap44xx_mcspi3_irqs[] = { |
3505 | { .irq = 91 + OMAP44XX_IRQ_GIC_START }, | 1751 | { .irq = 91 + OMAP44XX_IRQ_GIC_START }, |
3506 | { .irq = -1 } | 1752 | { .irq = -1 } |
@@ -3514,29 +1760,6 @@ static struct omap_hwmod_dma_info omap44xx_mcspi3_sdma_reqs[] = { | |||
3514 | { .dma_req = -1 } | 1760 | { .dma_req = -1 } |
3515 | }; | 1761 | }; |
3516 | 1762 | ||
3517 | static struct omap_hwmod_addr_space omap44xx_mcspi3_addrs[] = { | ||
3518 | { | ||
3519 | .pa_start = 0x480b8000, | ||
3520 | .pa_end = 0x480b81ff, | ||
3521 | .flags = ADDR_TYPE_RT | ||
3522 | }, | ||
3523 | { } | ||
3524 | }; | ||
3525 | |||
3526 | /* l4_per -> mcspi3 */ | ||
3527 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi3 = { | ||
3528 | .master = &omap44xx_l4_per_hwmod, | ||
3529 | .slave = &omap44xx_mcspi3_hwmod, | ||
3530 | .clk = "l4_div_ck", | ||
3531 | .addr = omap44xx_mcspi3_addrs, | ||
3532 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3533 | }; | ||
3534 | |||
3535 | /* mcspi3 slave ports */ | ||
3536 | static struct omap_hwmod_ocp_if *omap44xx_mcspi3_slaves[] = { | ||
3537 | &omap44xx_l4_per__mcspi3, | ||
3538 | }; | ||
3539 | |||
3540 | /* mcspi3 dev_attr */ | 1763 | /* mcspi3 dev_attr */ |
3541 | static struct omap2_mcspi_dev_attr mcspi3_dev_attr = { | 1764 | static struct omap2_mcspi_dev_attr mcspi3_dev_attr = { |
3542 | .num_chipselect = 2, | 1765 | .num_chipselect = 2, |
@@ -3557,12 +1780,9 @@ static struct omap_hwmod omap44xx_mcspi3_hwmod = { | |||
3557 | }, | 1780 | }, |
3558 | }, | 1781 | }, |
3559 | .dev_attr = &mcspi3_dev_attr, | 1782 | .dev_attr = &mcspi3_dev_attr, |
3560 | .slaves = omap44xx_mcspi3_slaves, | ||
3561 | .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi3_slaves), | ||
3562 | }; | 1783 | }; |
3563 | 1784 | ||
3564 | /* mcspi4 */ | 1785 | /* mcspi4 */ |
3565 | static struct omap_hwmod omap44xx_mcspi4_hwmod; | ||
3566 | static struct omap_hwmod_irq_info omap44xx_mcspi4_irqs[] = { | 1786 | static struct omap_hwmod_irq_info omap44xx_mcspi4_irqs[] = { |
3567 | { .irq = 48 + OMAP44XX_IRQ_GIC_START }, | 1787 | { .irq = 48 + OMAP44XX_IRQ_GIC_START }, |
3568 | { .irq = -1 } | 1788 | { .irq = -1 } |
@@ -3574,29 +1794,6 @@ static struct omap_hwmod_dma_info omap44xx_mcspi4_sdma_reqs[] = { | |||
3574 | { .dma_req = -1 } | 1794 | { .dma_req = -1 } |
3575 | }; | 1795 | }; |
3576 | 1796 | ||
3577 | static struct omap_hwmod_addr_space omap44xx_mcspi4_addrs[] = { | ||
3578 | { | ||
3579 | .pa_start = 0x480ba000, | ||
3580 | .pa_end = 0x480ba1ff, | ||
3581 | .flags = ADDR_TYPE_RT | ||
3582 | }, | ||
3583 | { } | ||
3584 | }; | ||
3585 | |||
3586 | /* l4_per -> mcspi4 */ | ||
3587 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi4 = { | ||
3588 | .master = &omap44xx_l4_per_hwmod, | ||
3589 | .slave = &omap44xx_mcspi4_hwmod, | ||
3590 | .clk = "l4_div_ck", | ||
3591 | .addr = omap44xx_mcspi4_addrs, | ||
3592 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3593 | }; | ||
3594 | |||
3595 | /* mcspi4 slave ports */ | ||
3596 | static struct omap_hwmod_ocp_if *omap44xx_mcspi4_slaves[] = { | ||
3597 | &omap44xx_l4_per__mcspi4, | ||
3598 | }; | ||
3599 | |||
3600 | /* mcspi4 dev_attr */ | 1797 | /* mcspi4 dev_attr */ |
3601 | static struct omap2_mcspi_dev_attr mcspi4_dev_attr = { | 1798 | static struct omap2_mcspi_dev_attr mcspi4_dev_attr = { |
3602 | .num_chipselect = 1, | 1799 | .num_chipselect = 1, |
@@ -3617,8 +1814,6 @@ static struct omap_hwmod omap44xx_mcspi4_hwmod = { | |||
3617 | }, | 1814 | }, |
3618 | }, | 1815 | }, |
3619 | .dev_attr = &mcspi4_dev_attr, | 1816 | .dev_attr = &mcspi4_dev_attr, |
3620 | .slaves = omap44xx_mcspi4_slaves, | ||
3621 | .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi4_slaves), | ||
3622 | }; | 1817 | }; |
3623 | 1818 | ||
3624 | /* | 1819 | /* |
@@ -3655,34 +1850,6 @@ static struct omap_hwmod_dma_info omap44xx_mmc1_sdma_reqs[] = { | |||
3655 | { .dma_req = -1 } | 1850 | { .dma_req = -1 } |
3656 | }; | 1851 | }; |
3657 | 1852 | ||
3658 | /* mmc1 master ports */ | ||
3659 | static struct omap_hwmod_ocp_if *omap44xx_mmc1_masters[] = { | ||
3660 | &omap44xx_mmc1__l3_main_1, | ||
3661 | }; | ||
3662 | |||
3663 | static struct omap_hwmod_addr_space omap44xx_mmc1_addrs[] = { | ||
3664 | { | ||
3665 | .pa_start = 0x4809c000, | ||
3666 | .pa_end = 0x4809c3ff, | ||
3667 | .flags = ADDR_TYPE_RT | ||
3668 | }, | ||
3669 | { } | ||
3670 | }; | ||
3671 | |||
3672 | /* l4_per -> mmc1 */ | ||
3673 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc1 = { | ||
3674 | .master = &omap44xx_l4_per_hwmod, | ||
3675 | .slave = &omap44xx_mmc1_hwmod, | ||
3676 | .clk = "l4_div_ck", | ||
3677 | .addr = omap44xx_mmc1_addrs, | ||
3678 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3679 | }; | ||
3680 | |||
3681 | /* mmc1 slave ports */ | ||
3682 | static struct omap_hwmod_ocp_if *omap44xx_mmc1_slaves[] = { | ||
3683 | &omap44xx_l4_per__mmc1, | ||
3684 | }; | ||
3685 | |||
3686 | /* mmc1 dev_attr */ | 1853 | /* mmc1 dev_attr */ |
3687 | static struct omap_mmc_dev_attr mmc1_dev_attr = { | 1854 | static struct omap_mmc_dev_attr mmc1_dev_attr = { |
3688 | .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT, | 1855 | .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT, |
@@ -3703,10 +1870,6 @@ static struct omap_hwmod omap44xx_mmc1_hwmod = { | |||
3703 | }, | 1870 | }, |
3704 | }, | 1871 | }, |
3705 | .dev_attr = &mmc1_dev_attr, | 1872 | .dev_attr = &mmc1_dev_attr, |
3706 | .slaves = omap44xx_mmc1_slaves, | ||
3707 | .slaves_cnt = ARRAY_SIZE(omap44xx_mmc1_slaves), | ||
3708 | .masters = omap44xx_mmc1_masters, | ||
3709 | .masters_cnt = ARRAY_SIZE(omap44xx_mmc1_masters), | ||
3710 | }; | 1873 | }; |
3711 | 1874 | ||
3712 | /* mmc2 */ | 1875 | /* mmc2 */ |
@@ -3721,34 +1884,6 @@ static struct omap_hwmod_dma_info omap44xx_mmc2_sdma_reqs[] = { | |||
3721 | { .dma_req = -1 } | 1884 | { .dma_req = -1 } |
3722 | }; | 1885 | }; |
3723 | 1886 | ||
3724 | /* mmc2 master ports */ | ||
3725 | static struct omap_hwmod_ocp_if *omap44xx_mmc2_masters[] = { | ||
3726 | &omap44xx_mmc2__l3_main_1, | ||
3727 | }; | ||
3728 | |||
3729 | static struct omap_hwmod_addr_space omap44xx_mmc2_addrs[] = { | ||
3730 | { | ||
3731 | .pa_start = 0x480b4000, | ||
3732 | .pa_end = 0x480b43ff, | ||
3733 | .flags = ADDR_TYPE_RT | ||
3734 | }, | ||
3735 | { } | ||
3736 | }; | ||
3737 | |||
3738 | /* l4_per -> mmc2 */ | ||
3739 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc2 = { | ||
3740 | .master = &omap44xx_l4_per_hwmod, | ||
3741 | .slave = &omap44xx_mmc2_hwmod, | ||
3742 | .clk = "l4_div_ck", | ||
3743 | .addr = omap44xx_mmc2_addrs, | ||
3744 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3745 | }; | ||
3746 | |||
3747 | /* mmc2 slave ports */ | ||
3748 | static struct omap_hwmod_ocp_if *omap44xx_mmc2_slaves[] = { | ||
3749 | &omap44xx_l4_per__mmc2, | ||
3750 | }; | ||
3751 | |||
3752 | static struct omap_hwmod omap44xx_mmc2_hwmod = { | 1887 | static struct omap_hwmod omap44xx_mmc2_hwmod = { |
3753 | .name = "mmc2", | 1888 | .name = "mmc2", |
3754 | .class = &omap44xx_mmc_hwmod_class, | 1889 | .class = &omap44xx_mmc_hwmod_class, |
@@ -3763,14 +1898,9 @@ static struct omap_hwmod omap44xx_mmc2_hwmod = { | |||
3763 | .modulemode = MODULEMODE_SWCTRL, | 1898 | .modulemode = MODULEMODE_SWCTRL, |
3764 | }, | 1899 | }, |
3765 | }, | 1900 | }, |
3766 | .slaves = omap44xx_mmc2_slaves, | ||
3767 | .slaves_cnt = ARRAY_SIZE(omap44xx_mmc2_slaves), | ||
3768 | .masters = omap44xx_mmc2_masters, | ||
3769 | .masters_cnt = ARRAY_SIZE(omap44xx_mmc2_masters), | ||
3770 | }; | 1901 | }; |
3771 | 1902 | ||
3772 | /* mmc3 */ | 1903 | /* mmc3 */ |
3773 | static struct omap_hwmod omap44xx_mmc3_hwmod; | ||
3774 | static struct omap_hwmod_irq_info omap44xx_mmc3_irqs[] = { | 1904 | static struct omap_hwmod_irq_info omap44xx_mmc3_irqs[] = { |
3775 | { .irq = 94 + OMAP44XX_IRQ_GIC_START }, | 1905 | { .irq = 94 + OMAP44XX_IRQ_GIC_START }, |
3776 | { .irq = -1 } | 1906 | { .irq = -1 } |
@@ -3782,29 +1912,6 @@ static struct omap_hwmod_dma_info omap44xx_mmc3_sdma_reqs[] = { | |||
3782 | { .dma_req = -1 } | 1912 | { .dma_req = -1 } |
3783 | }; | 1913 | }; |
3784 | 1914 | ||
3785 | static struct omap_hwmod_addr_space omap44xx_mmc3_addrs[] = { | ||
3786 | { | ||
3787 | .pa_start = 0x480ad000, | ||
3788 | .pa_end = 0x480ad3ff, | ||
3789 | .flags = ADDR_TYPE_RT | ||
3790 | }, | ||
3791 | { } | ||
3792 | }; | ||
3793 | |||
3794 | /* l4_per -> mmc3 */ | ||
3795 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc3 = { | ||
3796 | .master = &omap44xx_l4_per_hwmod, | ||
3797 | .slave = &omap44xx_mmc3_hwmod, | ||
3798 | .clk = "l4_div_ck", | ||
3799 | .addr = omap44xx_mmc3_addrs, | ||
3800 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3801 | }; | ||
3802 | |||
3803 | /* mmc3 slave ports */ | ||
3804 | static struct omap_hwmod_ocp_if *omap44xx_mmc3_slaves[] = { | ||
3805 | &omap44xx_l4_per__mmc3, | ||
3806 | }; | ||
3807 | |||
3808 | static struct omap_hwmod omap44xx_mmc3_hwmod = { | 1915 | static struct omap_hwmod omap44xx_mmc3_hwmod = { |
3809 | .name = "mmc3", | 1916 | .name = "mmc3", |
3810 | .class = &omap44xx_mmc_hwmod_class, | 1917 | .class = &omap44xx_mmc_hwmod_class, |
@@ -3819,12 +1926,9 @@ static struct omap_hwmod omap44xx_mmc3_hwmod = { | |||
3819 | .modulemode = MODULEMODE_SWCTRL, | 1926 | .modulemode = MODULEMODE_SWCTRL, |
3820 | }, | 1927 | }, |
3821 | }, | 1928 | }, |
3822 | .slaves = omap44xx_mmc3_slaves, | ||
3823 | .slaves_cnt = ARRAY_SIZE(omap44xx_mmc3_slaves), | ||
3824 | }; | 1929 | }; |
3825 | 1930 | ||
3826 | /* mmc4 */ | 1931 | /* mmc4 */ |
3827 | static struct omap_hwmod omap44xx_mmc4_hwmod; | ||
3828 | static struct omap_hwmod_irq_info omap44xx_mmc4_irqs[] = { | 1932 | static struct omap_hwmod_irq_info omap44xx_mmc4_irqs[] = { |
3829 | { .irq = 96 + OMAP44XX_IRQ_GIC_START }, | 1933 | { .irq = 96 + OMAP44XX_IRQ_GIC_START }, |
3830 | { .irq = -1 } | 1934 | { .irq = -1 } |
@@ -3836,35 +1940,11 @@ static struct omap_hwmod_dma_info omap44xx_mmc4_sdma_reqs[] = { | |||
3836 | { .dma_req = -1 } | 1940 | { .dma_req = -1 } |
3837 | }; | 1941 | }; |
3838 | 1942 | ||
3839 | static struct omap_hwmod_addr_space omap44xx_mmc4_addrs[] = { | ||
3840 | { | ||
3841 | .pa_start = 0x480d1000, | ||
3842 | .pa_end = 0x480d13ff, | ||
3843 | .flags = ADDR_TYPE_RT | ||
3844 | }, | ||
3845 | { } | ||
3846 | }; | ||
3847 | |||
3848 | /* l4_per -> mmc4 */ | ||
3849 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc4 = { | ||
3850 | .master = &omap44xx_l4_per_hwmod, | ||
3851 | .slave = &omap44xx_mmc4_hwmod, | ||
3852 | .clk = "l4_div_ck", | ||
3853 | .addr = omap44xx_mmc4_addrs, | ||
3854 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3855 | }; | ||
3856 | |||
3857 | /* mmc4 slave ports */ | ||
3858 | static struct omap_hwmod_ocp_if *omap44xx_mmc4_slaves[] = { | ||
3859 | &omap44xx_l4_per__mmc4, | ||
3860 | }; | ||
3861 | |||
3862 | static struct omap_hwmod omap44xx_mmc4_hwmod = { | 1943 | static struct omap_hwmod omap44xx_mmc4_hwmod = { |
3863 | .name = "mmc4", | 1944 | .name = "mmc4", |
3864 | .class = &omap44xx_mmc_hwmod_class, | 1945 | .class = &omap44xx_mmc_hwmod_class, |
3865 | .clkdm_name = "l4_per_clkdm", | 1946 | .clkdm_name = "l4_per_clkdm", |
3866 | .mpu_irqs = omap44xx_mmc4_irqs, | 1947 | .mpu_irqs = omap44xx_mmc4_irqs, |
3867 | |||
3868 | .sdma_reqs = omap44xx_mmc4_sdma_reqs, | 1948 | .sdma_reqs = omap44xx_mmc4_sdma_reqs, |
3869 | .main_clk = "mmc4_fck", | 1949 | .main_clk = "mmc4_fck", |
3870 | .prcm = { | 1950 | .prcm = { |
@@ -3874,12 +1954,9 @@ static struct omap_hwmod omap44xx_mmc4_hwmod = { | |||
3874 | .modulemode = MODULEMODE_SWCTRL, | 1954 | .modulemode = MODULEMODE_SWCTRL, |
3875 | }, | 1955 | }, |
3876 | }, | 1956 | }, |
3877 | .slaves = omap44xx_mmc4_slaves, | ||
3878 | .slaves_cnt = ARRAY_SIZE(omap44xx_mmc4_slaves), | ||
3879 | }; | 1957 | }; |
3880 | 1958 | ||
3881 | /* mmc5 */ | 1959 | /* mmc5 */ |
3882 | static struct omap_hwmod omap44xx_mmc5_hwmod; | ||
3883 | static struct omap_hwmod_irq_info omap44xx_mmc5_irqs[] = { | 1960 | static struct omap_hwmod_irq_info omap44xx_mmc5_irqs[] = { |
3884 | { .irq = 59 + OMAP44XX_IRQ_GIC_START }, | 1961 | { .irq = 59 + OMAP44XX_IRQ_GIC_START }, |
3885 | { .irq = -1 } | 1962 | { .irq = -1 } |
@@ -3891,29 +1968,6 @@ static struct omap_hwmod_dma_info omap44xx_mmc5_sdma_reqs[] = { | |||
3891 | { .dma_req = -1 } | 1968 | { .dma_req = -1 } |
3892 | }; | 1969 | }; |
3893 | 1970 | ||
3894 | static struct omap_hwmod_addr_space omap44xx_mmc5_addrs[] = { | ||
3895 | { | ||
3896 | .pa_start = 0x480d5000, | ||
3897 | .pa_end = 0x480d53ff, | ||
3898 | .flags = ADDR_TYPE_RT | ||
3899 | }, | ||
3900 | { } | ||
3901 | }; | ||
3902 | |||
3903 | /* l4_per -> mmc5 */ | ||
3904 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc5 = { | ||
3905 | .master = &omap44xx_l4_per_hwmod, | ||
3906 | .slave = &omap44xx_mmc5_hwmod, | ||
3907 | .clk = "l4_div_ck", | ||
3908 | .addr = omap44xx_mmc5_addrs, | ||
3909 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3910 | }; | ||
3911 | |||
3912 | /* mmc5 slave ports */ | ||
3913 | static struct omap_hwmod_ocp_if *omap44xx_mmc5_slaves[] = { | ||
3914 | &omap44xx_l4_per__mmc5, | ||
3915 | }; | ||
3916 | |||
3917 | static struct omap_hwmod omap44xx_mmc5_hwmod = { | 1971 | static struct omap_hwmod omap44xx_mmc5_hwmod = { |
3918 | .name = "mmc5", | 1972 | .name = "mmc5", |
3919 | .class = &omap44xx_mmc_hwmod_class, | 1973 | .class = &omap44xx_mmc_hwmod_class, |
@@ -3928,8 +1982,6 @@ static struct omap_hwmod omap44xx_mmc5_hwmod = { | |||
3928 | .modulemode = MODULEMODE_SWCTRL, | 1982 | .modulemode = MODULEMODE_SWCTRL, |
3929 | }, | 1983 | }, |
3930 | }, | 1984 | }, |
3931 | .slaves = omap44xx_mmc5_slaves, | ||
3932 | .slaves_cnt = ARRAY_SIZE(omap44xx_mmc5_slaves), | ||
3933 | }; | 1985 | }; |
3934 | 1986 | ||
3935 | /* | 1987 | /* |
@@ -3949,13 +2001,6 @@ static struct omap_hwmod_irq_info omap44xx_mpu_irqs[] = { | |||
3949 | { .irq = -1 } | 2001 | { .irq = -1 } |
3950 | }; | 2002 | }; |
3951 | 2003 | ||
3952 | /* mpu master ports */ | ||
3953 | static struct omap_hwmod_ocp_if *omap44xx_mpu_masters[] = { | ||
3954 | &omap44xx_mpu__l3_main_1, | ||
3955 | &omap44xx_mpu__l4_abe, | ||
3956 | &omap44xx_mpu__dmm, | ||
3957 | }; | ||
3958 | |||
3959 | static struct omap_hwmod omap44xx_mpu_hwmod = { | 2004 | static struct omap_hwmod omap44xx_mpu_hwmod = { |
3960 | .name = "mpu", | 2005 | .name = "mpu", |
3961 | .class = &omap44xx_mpu_hwmod_class, | 2006 | .class = &omap44xx_mpu_hwmod_class, |
@@ -3969,8 +2014,6 @@ static struct omap_hwmod omap44xx_mpu_hwmod = { | |||
3969 | .context_offs = OMAP4_RM_MPU_MPU_CONTEXT_OFFSET, | 2014 | .context_offs = OMAP4_RM_MPU_MPU_CONTEXT_OFFSET, |
3970 | }, | 2015 | }, |
3971 | }, | 2016 | }, |
3972 | .masters = omap44xx_mpu_masters, | ||
3973 | .masters_cnt = ARRAY_SIZE(omap44xx_mpu_masters), | ||
3974 | }; | 2017 | }; |
3975 | 2018 | ||
3976 | /* | 2019 | /* |
@@ -4004,35 +2047,11 @@ static struct omap_smartreflex_dev_attr smartreflex_core_dev_attr = { | |||
4004 | .sensor_voltdm_name = "core", | 2047 | .sensor_voltdm_name = "core", |
4005 | }; | 2048 | }; |
4006 | 2049 | ||
4007 | static struct omap_hwmod omap44xx_smartreflex_core_hwmod; | ||
4008 | static struct omap_hwmod_irq_info omap44xx_smartreflex_core_irqs[] = { | 2050 | static struct omap_hwmod_irq_info omap44xx_smartreflex_core_irqs[] = { |
4009 | { .irq = 19 + OMAP44XX_IRQ_GIC_START }, | 2051 | { .irq = 19 + OMAP44XX_IRQ_GIC_START }, |
4010 | { .irq = -1 } | 2052 | { .irq = -1 } |
4011 | }; | 2053 | }; |
4012 | 2054 | ||
4013 | static struct omap_hwmod_addr_space omap44xx_smartreflex_core_addrs[] = { | ||
4014 | { | ||
4015 | .pa_start = 0x4a0dd000, | ||
4016 | .pa_end = 0x4a0dd03f, | ||
4017 | .flags = ADDR_TYPE_RT | ||
4018 | }, | ||
4019 | { } | ||
4020 | }; | ||
4021 | |||
4022 | /* l4_cfg -> smartreflex_core */ | ||
4023 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_core = { | ||
4024 | .master = &omap44xx_l4_cfg_hwmod, | ||
4025 | .slave = &omap44xx_smartreflex_core_hwmod, | ||
4026 | .clk = "l4_div_ck", | ||
4027 | .addr = omap44xx_smartreflex_core_addrs, | ||
4028 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4029 | }; | ||
4030 | |||
4031 | /* smartreflex_core slave ports */ | ||
4032 | static struct omap_hwmod_ocp_if *omap44xx_smartreflex_core_slaves[] = { | ||
4033 | &omap44xx_l4_cfg__smartreflex_core, | ||
4034 | }; | ||
4035 | |||
4036 | static struct omap_hwmod omap44xx_smartreflex_core_hwmod = { | 2055 | static struct omap_hwmod omap44xx_smartreflex_core_hwmod = { |
4037 | .name = "smartreflex_core", | 2056 | .name = "smartreflex_core", |
4038 | .class = &omap44xx_smartreflex_hwmod_class, | 2057 | .class = &omap44xx_smartreflex_hwmod_class, |
@@ -4047,8 +2066,6 @@ static struct omap_hwmod omap44xx_smartreflex_core_hwmod = { | |||
4047 | .modulemode = MODULEMODE_SWCTRL, | 2066 | .modulemode = MODULEMODE_SWCTRL, |
4048 | }, | 2067 | }, |
4049 | }, | 2068 | }, |
4050 | .slaves = omap44xx_smartreflex_core_slaves, | ||
4051 | .slaves_cnt = ARRAY_SIZE(omap44xx_smartreflex_core_slaves), | ||
4052 | .dev_attr = &smartreflex_core_dev_attr, | 2069 | .dev_attr = &smartreflex_core_dev_attr, |
4053 | }; | 2070 | }; |
4054 | 2071 | ||
@@ -4057,35 +2074,11 @@ static struct omap_smartreflex_dev_attr smartreflex_iva_dev_attr = { | |||
4057 | .sensor_voltdm_name = "iva", | 2074 | .sensor_voltdm_name = "iva", |
4058 | }; | 2075 | }; |
4059 | 2076 | ||
4060 | static struct omap_hwmod omap44xx_smartreflex_iva_hwmod; | ||
4061 | static struct omap_hwmod_irq_info omap44xx_smartreflex_iva_irqs[] = { | 2077 | static struct omap_hwmod_irq_info omap44xx_smartreflex_iva_irqs[] = { |
4062 | { .irq = 102 + OMAP44XX_IRQ_GIC_START }, | 2078 | { .irq = 102 + OMAP44XX_IRQ_GIC_START }, |
4063 | { .irq = -1 } | 2079 | { .irq = -1 } |
4064 | }; | 2080 | }; |
4065 | 2081 | ||
4066 | static struct omap_hwmod_addr_space omap44xx_smartreflex_iva_addrs[] = { | ||
4067 | { | ||
4068 | .pa_start = 0x4a0db000, | ||
4069 | .pa_end = 0x4a0db03f, | ||
4070 | .flags = ADDR_TYPE_RT | ||
4071 | }, | ||
4072 | { } | ||
4073 | }; | ||
4074 | |||
4075 | /* l4_cfg -> smartreflex_iva */ | ||
4076 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_iva = { | ||
4077 | .master = &omap44xx_l4_cfg_hwmod, | ||
4078 | .slave = &omap44xx_smartreflex_iva_hwmod, | ||
4079 | .clk = "l4_div_ck", | ||
4080 | .addr = omap44xx_smartreflex_iva_addrs, | ||
4081 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4082 | }; | ||
4083 | |||
4084 | /* smartreflex_iva slave ports */ | ||
4085 | static struct omap_hwmod_ocp_if *omap44xx_smartreflex_iva_slaves[] = { | ||
4086 | &omap44xx_l4_cfg__smartreflex_iva, | ||
4087 | }; | ||
4088 | |||
4089 | static struct omap_hwmod omap44xx_smartreflex_iva_hwmod = { | 2082 | static struct omap_hwmod omap44xx_smartreflex_iva_hwmod = { |
4090 | .name = "smartreflex_iva", | 2083 | .name = "smartreflex_iva", |
4091 | .class = &omap44xx_smartreflex_hwmod_class, | 2084 | .class = &omap44xx_smartreflex_hwmod_class, |
@@ -4099,8 +2092,6 @@ static struct omap_hwmod omap44xx_smartreflex_iva_hwmod = { | |||
4099 | .modulemode = MODULEMODE_SWCTRL, | 2092 | .modulemode = MODULEMODE_SWCTRL, |
4100 | }, | 2093 | }, |
4101 | }, | 2094 | }, |
4102 | .slaves = omap44xx_smartreflex_iva_slaves, | ||
4103 | .slaves_cnt = ARRAY_SIZE(omap44xx_smartreflex_iva_slaves), | ||
4104 | .dev_attr = &smartreflex_iva_dev_attr, | 2095 | .dev_attr = &smartreflex_iva_dev_attr, |
4105 | }; | 2096 | }; |
4106 | 2097 | ||
@@ -4109,35 +2100,11 @@ static struct omap_smartreflex_dev_attr smartreflex_mpu_dev_attr = { | |||
4109 | .sensor_voltdm_name = "mpu", | 2100 | .sensor_voltdm_name = "mpu", |
4110 | }; | 2101 | }; |
4111 | 2102 | ||
4112 | static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod; | ||
4113 | static struct omap_hwmod_irq_info omap44xx_smartreflex_mpu_irqs[] = { | 2103 | static struct omap_hwmod_irq_info omap44xx_smartreflex_mpu_irqs[] = { |
4114 | { .irq = 18 + OMAP44XX_IRQ_GIC_START }, | 2104 | { .irq = 18 + OMAP44XX_IRQ_GIC_START }, |
4115 | { .irq = -1 } | 2105 | { .irq = -1 } |
4116 | }; | 2106 | }; |
4117 | 2107 | ||
4118 | static struct omap_hwmod_addr_space omap44xx_smartreflex_mpu_addrs[] = { | ||
4119 | { | ||
4120 | .pa_start = 0x4a0d9000, | ||
4121 | .pa_end = 0x4a0d903f, | ||
4122 | .flags = ADDR_TYPE_RT | ||
4123 | }, | ||
4124 | { } | ||
4125 | }; | ||
4126 | |||
4127 | /* l4_cfg -> smartreflex_mpu */ | ||
4128 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_mpu = { | ||
4129 | .master = &omap44xx_l4_cfg_hwmod, | ||
4130 | .slave = &omap44xx_smartreflex_mpu_hwmod, | ||
4131 | .clk = "l4_div_ck", | ||
4132 | .addr = omap44xx_smartreflex_mpu_addrs, | ||
4133 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4134 | }; | ||
4135 | |||
4136 | /* smartreflex_mpu slave ports */ | ||
4137 | static struct omap_hwmod_ocp_if *omap44xx_smartreflex_mpu_slaves[] = { | ||
4138 | &omap44xx_l4_cfg__smartreflex_mpu, | ||
4139 | }; | ||
4140 | |||
4141 | static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod = { | 2108 | static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod = { |
4142 | .name = "smartreflex_mpu", | 2109 | .name = "smartreflex_mpu", |
4143 | .class = &omap44xx_smartreflex_hwmod_class, | 2110 | .class = &omap44xx_smartreflex_hwmod_class, |
@@ -4151,8 +2118,6 @@ static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod = { | |||
4151 | .modulemode = MODULEMODE_SWCTRL, | 2118 | .modulemode = MODULEMODE_SWCTRL, |
4152 | }, | 2119 | }, |
4153 | }, | 2120 | }, |
4154 | .slaves = omap44xx_smartreflex_mpu_slaves, | ||
4155 | .slaves_cnt = ARRAY_SIZE(omap44xx_smartreflex_mpu_slaves), | ||
4156 | .dev_attr = &smartreflex_mpu_dev_attr, | 2121 | .dev_attr = &smartreflex_mpu_dev_attr, |
4157 | }; | 2122 | }; |
4158 | 2123 | ||
@@ -4180,30 +2145,6 @@ static struct omap_hwmod_class omap44xx_spinlock_hwmod_class = { | |||
4180 | }; | 2145 | }; |
4181 | 2146 | ||
4182 | /* spinlock */ | 2147 | /* spinlock */ |
4183 | static struct omap_hwmod omap44xx_spinlock_hwmod; | ||
4184 | static struct omap_hwmod_addr_space omap44xx_spinlock_addrs[] = { | ||
4185 | { | ||
4186 | .pa_start = 0x4a0f6000, | ||
4187 | .pa_end = 0x4a0f6fff, | ||
4188 | .flags = ADDR_TYPE_RT | ||
4189 | }, | ||
4190 | { } | ||
4191 | }; | ||
4192 | |||
4193 | /* l4_cfg -> spinlock */ | ||
4194 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__spinlock = { | ||
4195 | .master = &omap44xx_l4_cfg_hwmod, | ||
4196 | .slave = &omap44xx_spinlock_hwmod, | ||
4197 | .clk = "l4_div_ck", | ||
4198 | .addr = omap44xx_spinlock_addrs, | ||
4199 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4200 | }; | ||
4201 | |||
4202 | /* spinlock slave ports */ | ||
4203 | static struct omap_hwmod_ocp_if *omap44xx_spinlock_slaves[] = { | ||
4204 | &omap44xx_l4_cfg__spinlock, | ||
4205 | }; | ||
4206 | |||
4207 | static struct omap_hwmod omap44xx_spinlock_hwmod = { | 2148 | static struct omap_hwmod omap44xx_spinlock_hwmod = { |
4208 | .name = "spinlock", | 2149 | .name = "spinlock", |
4209 | .class = &omap44xx_spinlock_hwmod_class, | 2150 | .class = &omap44xx_spinlock_hwmod_class, |
@@ -4214,8 +2155,6 @@ static struct omap_hwmod omap44xx_spinlock_hwmod = { | |||
4214 | .context_offs = OMAP4_RM_L4CFG_HW_SEM_CONTEXT_OFFSET, | 2155 | .context_offs = OMAP4_RM_L4CFG_HW_SEM_CONTEXT_OFFSET, |
4215 | }, | 2156 | }, |
4216 | }, | 2157 | }, |
4217 | .slaves = omap44xx_spinlock_slaves, | ||
4218 | .slaves_cnt = ARRAY_SIZE(omap44xx_spinlock_slaves), | ||
4219 | }; | 2158 | }; |
4220 | 2159 | ||
4221 | /* | 2160 | /* |
@@ -4267,35 +2206,11 @@ static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = { | |||
4267 | }; | 2206 | }; |
4268 | 2207 | ||
4269 | /* timer1 */ | 2208 | /* timer1 */ |
4270 | static struct omap_hwmod omap44xx_timer1_hwmod; | ||
4271 | static struct omap_hwmod_irq_info omap44xx_timer1_irqs[] = { | 2209 | static struct omap_hwmod_irq_info omap44xx_timer1_irqs[] = { |
4272 | { .irq = 37 + OMAP44XX_IRQ_GIC_START }, | 2210 | { .irq = 37 + OMAP44XX_IRQ_GIC_START }, |
4273 | { .irq = -1 } | 2211 | { .irq = -1 } |
4274 | }; | 2212 | }; |
4275 | 2213 | ||
4276 | static struct omap_hwmod_addr_space omap44xx_timer1_addrs[] = { | ||
4277 | { | ||
4278 | .pa_start = 0x4a318000, | ||
4279 | .pa_end = 0x4a31807f, | ||
4280 | .flags = ADDR_TYPE_RT | ||
4281 | }, | ||
4282 | { } | ||
4283 | }; | ||
4284 | |||
4285 | /* l4_wkup -> timer1 */ | ||
4286 | static struct omap_hwmod_ocp_if omap44xx_l4_wkup__timer1 = { | ||
4287 | .master = &omap44xx_l4_wkup_hwmod, | ||
4288 | .slave = &omap44xx_timer1_hwmod, | ||
4289 | .clk = "l4_wkup_clk_mux_ck", | ||
4290 | .addr = omap44xx_timer1_addrs, | ||
4291 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4292 | }; | ||
4293 | |||
4294 | /* timer1 slave ports */ | ||
4295 | static struct omap_hwmod_ocp_if *omap44xx_timer1_slaves[] = { | ||
4296 | &omap44xx_l4_wkup__timer1, | ||
4297 | }; | ||
4298 | |||
4299 | static struct omap_hwmod omap44xx_timer1_hwmod = { | 2214 | static struct omap_hwmod omap44xx_timer1_hwmod = { |
4300 | .name = "timer1", | 2215 | .name = "timer1", |
4301 | .class = &omap44xx_timer_1ms_hwmod_class, | 2216 | .class = &omap44xx_timer_1ms_hwmod_class, |
@@ -4310,40 +2225,14 @@ static struct omap_hwmod omap44xx_timer1_hwmod = { | |||
4310 | }, | 2225 | }, |
4311 | }, | 2226 | }, |
4312 | .dev_attr = &capability_alwon_dev_attr, | 2227 | .dev_attr = &capability_alwon_dev_attr, |
4313 | .slaves = omap44xx_timer1_slaves, | ||
4314 | .slaves_cnt = ARRAY_SIZE(omap44xx_timer1_slaves), | ||
4315 | }; | 2228 | }; |
4316 | 2229 | ||
4317 | /* timer2 */ | 2230 | /* timer2 */ |
4318 | static struct omap_hwmod omap44xx_timer2_hwmod; | ||
4319 | static struct omap_hwmod_irq_info omap44xx_timer2_irqs[] = { | 2231 | static struct omap_hwmod_irq_info omap44xx_timer2_irqs[] = { |
4320 | { .irq = 38 + OMAP44XX_IRQ_GIC_START }, | 2232 | { .irq = 38 + OMAP44XX_IRQ_GIC_START }, |
4321 | { .irq = -1 } | 2233 | { .irq = -1 } |
4322 | }; | 2234 | }; |
4323 | 2235 | ||
4324 | static struct omap_hwmod_addr_space omap44xx_timer2_addrs[] = { | ||
4325 | { | ||
4326 | .pa_start = 0x48032000, | ||
4327 | .pa_end = 0x4803207f, | ||
4328 | .flags = ADDR_TYPE_RT | ||
4329 | }, | ||
4330 | { } | ||
4331 | }; | ||
4332 | |||
4333 | /* l4_per -> timer2 */ | ||
4334 | static struct omap_hwmod_ocp_if omap44xx_l4_per__timer2 = { | ||
4335 | .master = &omap44xx_l4_per_hwmod, | ||
4336 | .slave = &omap44xx_timer2_hwmod, | ||
4337 | .clk = "l4_div_ck", | ||
4338 | .addr = omap44xx_timer2_addrs, | ||
4339 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4340 | }; | ||
4341 | |||
4342 | /* timer2 slave ports */ | ||
4343 | static struct omap_hwmod_ocp_if *omap44xx_timer2_slaves[] = { | ||
4344 | &omap44xx_l4_per__timer2, | ||
4345 | }; | ||
4346 | |||
4347 | static struct omap_hwmod omap44xx_timer2_hwmod = { | 2236 | static struct omap_hwmod omap44xx_timer2_hwmod = { |
4348 | .name = "timer2", | 2237 | .name = "timer2", |
4349 | .class = &omap44xx_timer_1ms_hwmod_class, | 2238 | .class = &omap44xx_timer_1ms_hwmod_class, |
@@ -4358,40 +2247,14 @@ static struct omap_hwmod omap44xx_timer2_hwmod = { | |||
4358 | }, | 2247 | }, |
4359 | }, | 2248 | }, |
4360 | .dev_attr = &capability_alwon_dev_attr, | 2249 | .dev_attr = &capability_alwon_dev_attr, |
4361 | .slaves = omap44xx_timer2_slaves, | ||
4362 | .slaves_cnt = ARRAY_SIZE(omap44xx_timer2_slaves), | ||
4363 | }; | 2250 | }; |
4364 | 2251 | ||
4365 | /* timer3 */ | 2252 | /* timer3 */ |
4366 | static struct omap_hwmod omap44xx_timer3_hwmod; | ||
4367 | static struct omap_hwmod_irq_info omap44xx_timer3_irqs[] = { | 2253 | static struct omap_hwmod_irq_info omap44xx_timer3_irqs[] = { |
4368 | { .irq = 39 + OMAP44XX_IRQ_GIC_START }, | 2254 | { .irq = 39 + OMAP44XX_IRQ_GIC_START }, |
4369 | { .irq = -1 } | 2255 | { .irq = -1 } |
4370 | }; | 2256 | }; |
4371 | 2257 | ||
4372 | static struct omap_hwmod_addr_space omap44xx_timer3_addrs[] = { | ||
4373 | { | ||
4374 | .pa_start = 0x48034000, | ||
4375 | .pa_end = 0x4803407f, | ||
4376 | .flags = ADDR_TYPE_RT | ||
4377 | }, | ||
4378 | { } | ||
4379 | }; | ||
4380 | |||
4381 | /* l4_per -> timer3 */ | ||
4382 | static struct omap_hwmod_ocp_if omap44xx_l4_per__timer3 = { | ||
4383 | .master = &omap44xx_l4_per_hwmod, | ||
4384 | .slave = &omap44xx_timer3_hwmod, | ||
4385 | .clk = "l4_div_ck", | ||
4386 | .addr = omap44xx_timer3_addrs, | ||
4387 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4388 | }; | ||
4389 | |||
4390 | /* timer3 slave ports */ | ||
4391 | static struct omap_hwmod_ocp_if *omap44xx_timer3_slaves[] = { | ||
4392 | &omap44xx_l4_per__timer3, | ||
4393 | }; | ||
4394 | |||
4395 | static struct omap_hwmod omap44xx_timer3_hwmod = { | 2258 | static struct omap_hwmod omap44xx_timer3_hwmod = { |
4396 | .name = "timer3", | 2259 | .name = "timer3", |
4397 | .class = &omap44xx_timer_hwmod_class, | 2260 | .class = &omap44xx_timer_hwmod_class, |
@@ -4406,40 +2269,14 @@ static struct omap_hwmod omap44xx_timer3_hwmod = { | |||
4406 | }, | 2269 | }, |
4407 | }, | 2270 | }, |
4408 | .dev_attr = &capability_alwon_dev_attr, | 2271 | .dev_attr = &capability_alwon_dev_attr, |
4409 | .slaves = omap44xx_timer3_slaves, | ||
4410 | .slaves_cnt = ARRAY_SIZE(omap44xx_timer3_slaves), | ||
4411 | }; | 2272 | }; |
4412 | 2273 | ||
4413 | /* timer4 */ | 2274 | /* timer4 */ |
4414 | static struct omap_hwmod omap44xx_timer4_hwmod; | ||
4415 | static struct omap_hwmod_irq_info omap44xx_timer4_irqs[] = { | 2275 | static struct omap_hwmod_irq_info omap44xx_timer4_irqs[] = { |
4416 | { .irq = 40 + OMAP44XX_IRQ_GIC_START }, | 2276 | { .irq = 40 + OMAP44XX_IRQ_GIC_START }, |
4417 | { .irq = -1 } | 2277 | { .irq = -1 } |
4418 | }; | 2278 | }; |
4419 | 2279 | ||
4420 | static struct omap_hwmod_addr_space omap44xx_timer4_addrs[] = { | ||
4421 | { | ||
4422 | .pa_start = 0x48036000, | ||
4423 | .pa_end = 0x4803607f, | ||
4424 | .flags = ADDR_TYPE_RT | ||
4425 | }, | ||
4426 | { } | ||
4427 | }; | ||
4428 | |||
4429 | /* l4_per -> timer4 */ | ||
4430 | static struct omap_hwmod_ocp_if omap44xx_l4_per__timer4 = { | ||
4431 | .master = &omap44xx_l4_per_hwmod, | ||
4432 | .slave = &omap44xx_timer4_hwmod, | ||
4433 | .clk = "l4_div_ck", | ||
4434 | .addr = omap44xx_timer4_addrs, | ||
4435 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4436 | }; | ||
4437 | |||
4438 | /* timer4 slave ports */ | ||
4439 | static struct omap_hwmod_ocp_if *omap44xx_timer4_slaves[] = { | ||
4440 | &omap44xx_l4_per__timer4, | ||
4441 | }; | ||
4442 | |||
4443 | static struct omap_hwmod omap44xx_timer4_hwmod = { | 2280 | static struct omap_hwmod omap44xx_timer4_hwmod = { |
4444 | .name = "timer4", | 2281 | .name = "timer4", |
4445 | .class = &omap44xx_timer_hwmod_class, | 2282 | .class = &omap44xx_timer_hwmod_class, |
@@ -4454,59 +2291,14 @@ static struct omap_hwmod omap44xx_timer4_hwmod = { | |||
4454 | }, | 2291 | }, |
4455 | }, | 2292 | }, |
4456 | .dev_attr = &capability_alwon_dev_attr, | 2293 | .dev_attr = &capability_alwon_dev_attr, |
4457 | .slaves = omap44xx_timer4_slaves, | ||
4458 | .slaves_cnt = ARRAY_SIZE(omap44xx_timer4_slaves), | ||
4459 | }; | 2294 | }; |
4460 | 2295 | ||
4461 | /* timer5 */ | 2296 | /* timer5 */ |
4462 | static struct omap_hwmod omap44xx_timer5_hwmod; | ||
4463 | static struct omap_hwmod_irq_info omap44xx_timer5_irqs[] = { | 2297 | static struct omap_hwmod_irq_info omap44xx_timer5_irqs[] = { |
4464 | { .irq = 41 + OMAP44XX_IRQ_GIC_START }, | 2298 | { .irq = 41 + OMAP44XX_IRQ_GIC_START }, |
4465 | { .irq = -1 } | 2299 | { .irq = -1 } |
4466 | }; | 2300 | }; |
4467 | 2301 | ||
4468 | static struct omap_hwmod_addr_space omap44xx_timer5_addrs[] = { | ||
4469 | { | ||
4470 | .pa_start = 0x40138000, | ||
4471 | .pa_end = 0x4013807f, | ||
4472 | .flags = ADDR_TYPE_RT | ||
4473 | }, | ||
4474 | { } | ||
4475 | }; | ||
4476 | |||
4477 | /* l4_abe -> timer5 */ | ||
4478 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5 = { | ||
4479 | .master = &omap44xx_l4_abe_hwmod, | ||
4480 | .slave = &omap44xx_timer5_hwmod, | ||
4481 | .clk = "ocp_abe_iclk", | ||
4482 | .addr = omap44xx_timer5_addrs, | ||
4483 | .user = OCP_USER_MPU, | ||
4484 | }; | ||
4485 | |||
4486 | static struct omap_hwmod_addr_space omap44xx_timer5_dma_addrs[] = { | ||
4487 | { | ||
4488 | .pa_start = 0x49038000, | ||
4489 | .pa_end = 0x4903807f, | ||
4490 | .flags = ADDR_TYPE_RT | ||
4491 | }, | ||
4492 | { } | ||
4493 | }; | ||
4494 | |||
4495 | /* l4_abe -> timer5 (dma) */ | ||
4496 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5_dma = { | ||
4497 | .master = &omap44xx_l4_abe_hwmod, | ||
4498 | .slave = &omap44xx_timer5_hwmod, | ||
4499 | .clk = "ocp_abe_iclk", | ||
4500 | .addr = omap44xx_timer5_dma_addrs, | ||
4501 | .user = OCP_USER_SDMA, | ||
4502 | }; | ||
4503 | |||
4504 | /* timer5 slave ports */ | ||
4505 | static struct omap_hwmod_ocp_if *omap44xx_timer5_slaves[] = { | ||
4506 | &omap44xx_l4_abe__timer5, | ||
4507 | &omap44xx_l4_abe__timer5_dma, | ||
4508 | }; | ||
4509 | |||
4510 | static struct omap_hwmod omap44xx_timer5_hwmod = { | 2302 | static struct omap_hwmod omap44xx_timer5_hwmod = { |
4511 | .name = "timer5", | 2303 | .name = "timer5", |
4512 | .class = &omap44xx_timer_hwmod_class, | 2304 | .class = &omap44xx_timer_hwmod_class, |
@@ -4521,59 +2313,14 @@ static struct omap_hwmod omap44xx_timer5_hwmod = { | |||
4521 | }, | 2313 | }, |
4522 | }, | 2314 | }, |
4523 | .dev_attr = &capability_alwon_dev_attr, | 2315 | .dev_attr = &capability_alwon_dev_attr, |
4524 | .slaves = omap44xx_timer5_slaves, | ||
4525 | .slaves_cnt = ARRAY_SIZE(omap44xx_timer5_slaves), | ||
4526 | }; | 2316 | }; |
4527 | 2317 | ||
4528 | /* timer6 */ | 2318 | /* timer6 */ |
4529 | static struct omap_hwmod omap44xx_timer6_hwmod; | ||
4530 | static struct omap_hwmod_irq_info omap44xx_timer6_irqs[] = { | 2319 | static struct omap_hwmod_irq_info omap44xx_timer6_irqs[] = { |
4531 | { .irq = 42 + OMAP44XX_IRQ_GIC_START }, | 2320 | { .irq = 42 + OMAP44XX_IRQ_GIC_START }, |
4532 | { .irq = -1 } | 2321 | { .irq = -1 } |
4533 | }; | 2322 | }; |
4534 | 2323 | ||
4535 | static struct omap_hwmod_addr_space omap44xx_timer6_addrs[] = { | ||
4536 | { | ||
4537 | .pa_start = 0x4013a000, | ||
4538 | .pa_end = 0x4013a07f, | ||
4539 | .flags = ADDR_TYPE_RT | ||
4540 | }, | ||
4541 | { } | ||
4542 | }; | ||
4543 | |||
4544 | /* l4_abe -> timer6 */ | ||
4545 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6 = { | ||
4546 | .master = &omap44xx_l4_abe_hwmod, | ||
4547 | .slave = &omap44xx_timer6_hwmod, | ||
4548 | .clk = "ocp_abe_iclk", | ||
4549 | .addr = omap44xx_timer6_addrs, | ||
4550 | .user = OCP_USER_MPU, | ||
4551 | }; | ||
4552 | |||
4553 | static struct omap_hwmod_addr_space omap44xx_timer6_dma_addrs[] = { | ||
4554 | { | ||
4555 | .pa_start = 0x4903a000, | ||
4556 | .pa_end = 0x4903a07f, | ||
4557 | .flags = ADDR_TYPE_RT | ||
4558 | }, | ||
4559 | { } | ||
4560 | }; | ||
4561 | |||
4562 | /* l4_abe -> timer6 (dma) */ | ||
4563 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6_dma = { | ||
4564 | .master = &omap44xx_l4_abe_hwmod, | ||
4565 | .slave = &omap44xx_timer6_hwmod, | ||
4566 | .clk = "ocp_abe_iclk", | ||
4567 | .addr = omap44xx_timer6_dma_addrs, | ||
4568 | .user = OCP_USER_SDMA, | ||
4569 | }; | ||
4570 | |||
4571 | /* timer6 slave ports */ | ||
4572 | static struct omap_hwmod_ocp_if *omap44xx_timer6_slaves[] = { | ||
4573 | &omap44xx_l4_abe__timer6, | ||
4574 | &omap44xx_l4_abe__timer6_dma, | ||
4575 | }; | ||
4576 | |||
4577 | static struct omap_hwmod omap44xx_timer6_hwmod = { | 2324 | static struct omap_hwmod omap44xx_timer6_hwmod = { |
4578 | .name = "timer6", | 2325 | .name = "timer6", |
4579 | .class = &omap44xx_timer_hwmod_class, | 2326 | .class = &omap44xx_timer_hwmod_class, |
@@ -4589,59 +2336,14 @@ static struct omap_hwmod omap44xx_timer6_hwmod = { | |||
4589 | }, | 2336 | }, |
4590 | }, | 2337 | }, |
4591 | .dev_attr = &capability_alwon_dev_attr, | 2338 | .dev_attr = &capability_alwon_dev_attr, |
4592 | .slaves = omap44xx_timer6_slaves, | ||
4593 | .slaves_cnt = ARRAY_SIZE(omap44xx_timer6_slaves), | ||
4594 | }; | 2339 | }; |
4595 | 2340 | ||
4596 | /* timer7 */ | 2341 | /* timer7 */ |
4597 | static struct omap_hwmod omap44xx_timer7_hwmod; | ||
4598 | static struct omap_hwmod_irq_info omap44xx_timer7_irqs[] = { | 2342 | static struct omap_hwmod_irq_info omap44xx_timer7_irqs[] = { |
4599 | { .irq = 43 + OMAP44XX_IRQ_GIC_START }, | 2343 | { .irq = 43 + OMAP44XX_IRQ_GIC_START }, |
4600 | { .irq = -1 } | 2344 | { .irq = -1 } |
4601 | }; | 2345 | }; |
4602 | 2346 | ||
4603 | static struct omap_hwmod_addr_space omap44xx_timer7_addrs[] = { | ||
4604 | { | ||
4605 | .pa_start = 0x4013c000, | ||
4606 | .pa_end = 0x4013c07f, | ||
4607 | .flags = ADDR_TYPE_RT | ||
4608 | }, | ||
4609 | { } | ||
4610 | }; | ||
4611 | |||
4612 | /* l4_abe -> timer7 */ | ||
4613 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7 = { | ||
4614 | .master = &omap44xx_l4_abe_hwmod, | ||
4615 | .slave = &omap44xx_timer7_hwmod, | ||
4616 | .clk = "ocp_abe_iclk", | ||
4617 | .addr = omap44xx_timer7_addrs, | ||
4618 | .user = OCP_USER_MPU, | ||
4619 | }; | ||
4620 | |||
4621 | static struct omap_hwmod_addr_space omap44xx_timer7_dma_addrs[] = { | ||
4622 | { | ||
4623 | .pa_start = 0x4903c000, | ||
4624 | .pa_end = 0x4903c07f, | ||
4625 | .flags = ADDR_TYPE_RT | ||
4626 | }, | ||
4627 | { } | ||
4628 | }; | ||
4629 | |||
4630 | /* l4_abe -> timer7 (dma) */ | ||
4631 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7_dma = { | ||
4632 | .master = &omap44xx_l4_abe_hwmod, | ||
4633 | .slave = &omap44xx_timer7_hwmod, | ||
4634 | .clk = "ocp_abe_iclk", | ||
4635 | .addr = omap44xx_timer7_dma_addrs, | ||
4636 | .user = OCP_USER_SDMA, | ||
4637 | }; | ||
4638 | |||
4639 | /* timer7 slave ports */ | ||
4640 | static struct omap_hwmod_ocp_if *omap44xx_timer7_slaves[] = { | ||
4641 | &omap44xx_l4_abe__timer7, | ||
4642 | &omap44xx_l4_abe__timer7_dma, | ||
4643 | }; | ||
4644 | |||
4645 | static struct omap_hwmod omap44xx_timer7_hwmod = { | 2347 | static struct omap_hwmod omap44xx_timer7_hwmod = { |
4646 | .name = "timer7", | 2348 | .name = "timer7", |
4647 | .class = &omap44xx_timer_hwmod_class, | 2349 | .class = &omap44xx_timer_hwmod_class, |
@@ -4656,59 +2358,14 @@ static struct omap_hwmod omap44xx_timer7_hwmod = { | |||
4656 | }, | 2358 | }, |
4657 | }, | 2359 | }, |
4658 | .dev_attr = &capability_alwon_dev_attr, | 2360 | .dev_attr = &capability_alwon_dev_attr, |
4659 | .slaves = omap44xx_timer7_slaves, | ||
4660 | .slaves_cnt = ARRAY_SIZE(omap44xx_timer7_slaves), | ||
4661 | }; | 2361 | }; |
4662 | 2362 | ||
4663 | /* timer8 */ | 2363 | /* timer8 */ |
4664 | static struct omap_hwmod omap44xx_timer8_hwmod; | ||
4665 | static struct omap_hwmod_irq_info omap44xx_timer8_irqs[] = { | 2364 | static struct omap_hwmod_irq_info omap44xx_timer8_irqs[] = { |
4666 | { .irq = 44 + OMAP44XX_IRQ_GIC_START }, | 2365 | { .irq = 44 + OMAP44XX_IRQ_GIC_START }, |
4667 | { .irq = -1 } | 2366 | { .irq = -1 } |
4668 | }; | 2367 | }; |
4669 | 2368 | ||
4670 | static struct omap_hwmod_addr_space omap44xx_timer8_addrs[] = { | ||
4671 | { | ||
4672 | .pa_start = 0x4013e000, | ||
4673 | .pa_end = 0x4013e07f, | ||
4674 | .flags = ADDR_TYPE_RT | ||
4675 | }, | ||
4676 | { } | ||
4677 | }; | ||
4678 | |||
4679 | /* l4_abe -> timer8 */ | ||
4680 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8 = { | ||
4681 | .master = &omap44xx_l4_abe_hwmod, | ||
4682 | .slave = &omap44xx_timer8_hwmod, | ||
4683 | .clk = "ocp_abe_iclk", | ||
4684 | .addr = omap44xx_timer8_addrs, | ||
4685 | .user = OCP_USER_MPU, | ||
4686 | }; | ||
4687 | |||
4688 | static struct omap_hwmod_addr_space omap44xx_timer8_dma_addrs[] = { | ||
4689 | { | ||
4690 | .pa_start = 0x4903e000, | ||
4691 | .pa_end = 0x4903e07f, | ||
4692 | .flags = ADDR_TYPE_RT | ||
4693 | }, | ||
4694 | { } | ||
4695 | }; | ||
4696 | |||
4697 | /* l4_abe -> timer8 (dma) */ | ||
4698 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8_dma = { | ||
4699 | .master = &omap44xx_l4_abe_hwmod, | ||
4700 | .slave = &omap44xx_timer8_hwmod, | ||
4701 | .clk = "ocp_abe_iclk", | ||
4702 | .addr = omap44xx_timer8_dma_addrs, | ||
4703 | .user = OCP_USER_SDMA, | ||
4704 | }; | ||
4705 | |||
4706 | /* timer8 slave ports */ | ||
4707 | static struct omap_hwmod_ocp_if *omap44xx_timer8_slaves[] = { | ||
4708 | &omap44xx_l4_abe__timer8, | ||
4709 | &omap44xx_l4_abe__timer8_dma, | ||
4710 | }; | ||
4711 | |||
4712 | static struct omap_hwmod omap44xx_timer8_hwmod = { | 2369 | static struct omap_hwmod omap44xx_timer8_hwmod = { |
4713 | .name = "timer8", | 2370 | .name = "timer8", |
4714 | .class = &omap44xx_timer_hwmod_class, | 2371 | .class = &omap44xx_timer_hwmod_class, |
@@ -4723,40 +2380,14 @@ static struct omap_hwmod omap44xx_timer8_hwmod = { | |||
4723 | }, | 2380 | }, |
4724 | }, | 2381 | }, |
4725 | .dev_attr = &capability_pwm_dev_attr, | 2382 | .dev_attr = &capability_pwm_dev_attr, |
4726 | .slaves = omap44xx_timer8_slaves, | ||
4727 | .slaves_cnt = ARRAY_SIZE(omap44xx_timer8_slaves), | ||
4728 | }; | 2383 | }; |
4729 | 2384 | ||
4730 | /* timer9 */ | 2385 | /* timer9 */ |
4731 | static struct omap_hwmod omap44xx_timer9_hwmod; | ||
4732 | static struct omap_hwmod_irq_info omap44xx_timer9_irqs[] = { | 2386 | static struct omap_hwmod_irq_info omap44xx_timer9_irqs[] = { |
4733 | { .irq = 45 + OMAP44XX_IRQ_GIC_START }, | 2387 | { .irq = 45 + OMAP44XX_IRQ_GIC_START }, |
4734 | { .irq = -1 } | 2388 | { .irq = -1 } |
4735 | }; | 2389 | }; |
4736 | 2390 | ||
4737 | static struct omap_hwmod_addr_space omap44xx_timer9_addrs[] = { | ||
4738 | { | ||
4739 | .pa_start = 0x4803e000, | ||
4740 | .pa_end = 0x4803e07f, | ||
4741 | .flags = ADDR_TYPE_RT | ||
4742 | }, | ||
4743 | { } | ||
4744 | }; | ||
4745 | |||
4746 | /* l4_per -> timer9 */ | ||
4747 | static struct omap_hwmod_ocp_if omap44xx_l4_per__timer9 = { | ||
4748 | .master = &omap44xx_l4_per_hwmod, | ||
4749 | .slave = &omap44xx_timer9_hwmod, | ||
4750 | .clk = "l4_div_ck", | ||
4751 | .addr = omap44xx_timer9_addrs, | ||
4752 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4753 | }; | ||
4754 | |||
4755 | /* timer9 slave ports */ | ||
4756 | static struct omap_hwmod_ocp_if *omap44xx_timer9_slaves[] = { | ||
4757 | &omap44xx_l4_per__timer9, | ||
4758 | }; | ||
4759 | |||
4760 | static struct omap_hwmod omap44xx_timer9_hwmod = { | 2391 | static struct omap_hwmod omap44xx_timer9_hwmod = { |
4761 | .name = "timer9", | 2392 | .name = "timer9", |
4762 | .class = &omap44xx_timer_hwmod_class, | 2393 | .class = &omap44xx_timer_hwmod_class, |
@@ -4771,40 +2402,14 @@ static struct omap_hwmod omap44xx_timer9_hwmod = { | |||
4771 | }, | 2402 | }, |
4772 | }, | 2403 | }, |
4773 | .dev_attr = &capability_pwm_dev_attr, | 2404 | .dev_attr = &capability_pwm_dev_attr, |
4774 | .slaves = omap44xx_timer9_slaves, | ||
4775 | .slaves_cnt = ARRAY_SIZE(omap44xx_timer9_slaves), | ||
4776 | }; | 2405 | }; |
4777 | 2406 | ||
4778 | /* timer10 */ | 2407 | /* timer10 */ |
4779 | static struct omap_hwmod omap44xx_timer10_hwmod; | ||
4780 | static struct omap_hwmod_irq_info omap44xx_timer10_irqs[] = { | 2408 | static struct omap_hwmod_irq_info omap44xx_timer10_irqs[] = { |
4781 | { .irq = 46 + OMAP44XX_IRQ_GIC_START }, | 2409 | { .irq = 46 + OMAP44XX_IRQ_GIC_START }, |
4782 | { .irq = -1 } | 2410 | { .irq = -1 } |
4783 | }; | 2411 | }; |
4784 | 2412 | ||
4785 | static struct omap_hwmod_addr_space omap44xx_timer10_addrs[] = { | ||
4786 | { | ||
4787 | .pa_start = 0x48086000, | ||
4788 | .pa_end = 0x4808607f, | ||
4789 | .flags = ADDR_TYPE_RT | ||
4790 | }, | ||
4791 | { } | ||
4792 | }; | ||
4793 | |||
4794 | /* l4_per -> timer10 */ | ||
4795 | static struct omap_hwmod_ocp_if omap44xx_l4_per__timer10 = { | ||
4796 | .master = &omap44xx_l4_per_hwmod, | ||
4797 | .slave = &omap44xx_timer10_hwmod, | ||
4798 | .clk = "l4_div_ck", | ||
4799 | .addr = omap44xx_timer10_addrs, | ||
4800 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4801 | }; | ||
4802 | |||
4803 | /* timer10 slave ports */ | ||
4804 | static struct omap_hwmod_ocp_if *omap44xx_timer10_slaves[] = { | ||
4805 | &omap44xx_l4_per__timer10, | ||
4806 | }; | ||
4807 | |||
4808 | static struct omap_hwmod omap44xx_timer10_hwmod = { | 2413 | static struct omap_hwmod omap44xx_timer10_hwmod = { |
4809 | .name = "timer10", | 2414 | .name = "timer10", |
4810 | .class = &omap44xx_timer_1ms_hwmod_class, | 2415 | .class = &omap44xx_timer_1ms_hwmod_class, |
@@ -4819,40 +2424,14 @@ static struct omap_hwmod omap44xx_timer10_hwmod = { | |||
4819 | }, | 2424 | }, |
4820 | }, | 2425 | }, |
4821 | .dev_attr = &capability_pwm_dev_attr, | 2426 | .dev_attr = &capability_pwm_dev_attr, |
4822 | .slaves = omap44xx_timer10_slaves, | ||
4823 | .slaves_cnt = ARRAY_SIZE(omap44xx_timer10_slaves), | ||
4824 | }; | 2427 | }; |
4825 | 2428 | ||
4826 | /* timer11 */ | 2429 | /* timer11 */ |
4827 | static struct omap_hwmod omap44xx_timer11_hwmod; | ||
4828 | static struct omap_hwmod_irq_info omap44xx_timer11_irqs[] = { | 2430 | static struct omap_hwmod_irq_info omap44xx_timer11_irqs[] = { |
4829 | { .irq = 47 + OMAP44XX_IRQ_GIC_START }, | 2431 | { .irq = 47 + OMAP44XX_IRQ_GIC_START }, |
4830 | { .irq = -1 } | 2432 | { .irq = -1 } |
4831 | }; | 2433 | }; |
4832 | 2434 | ||
4833 | static struct omap_hwmod_addr_space omap44xx_timer11_addrs[] = { | ||
4834 | { | ||
4835 | .pa_start = 0x48088000, | ||
4836 | .pa_end = 0x4808807f, | ||
4837 | .flags = ADDR_TYPE_RT | ||
4838 | }, | ||
4839 | { } | ||
4840 | }; | ||
4841 | |||
4842 | /* l4_per -> timer11 */ | ||
4843 | static struct omap_hwmod_ocp_if omap44xx_l4_per__timer11 = { | ||
4844 | .master = &omap44xx_l4_per_hwmod, | ||
4845 | .slave = &omap44xx_timer11_hwmod, | ||
4846 | .clk = "l4_div_ck", | ||
4847 | .addr = omap44xx_timer11_addrs, | ||
4848 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4849 | }; | ||
4850 | |||
4851 | /* timer11 slave ports */ | ||
4852 | static struct omap_hwmod_ocp_if *omap44xx_timer11_slaves[] = { | ||
4853 | &omap44xx_l4_per__timer11, | ||
4854 | }; | ||
4855 | |||
4856 | static struct omap_hwmod omap44xx_timer11_hwmod = { | 2435 | static struct omap_hwmod omap44xx_timer11_hwmod = { |
4857 | .name = "timer11", | 2436 | .name = "timer11", |
4858 | .class = &omap44xx_timer_hwmod_class, | 2437 | .class = &omap44xx_timer_hwmod_class, |
@@ -4867,8 +2446,6 @@ static struct omap_hwmod omap44xx_timer11_hwmod = { | |||
4867 | }, | 2446 | }, |
4868 | }, | 2447 | }, |
4869 | .dev_attr = &capability_pwm_dev_attr, | 2448 | .dev_attr = &capability_pwm_dev_attr, |
4870 | .slaves = omap44xx_timer11_slaves, | ||
4871 | .slaves_cnt = ARRAY_SIZE(omap44xx_timer11_slaves), | ||
4872 | }; | 2449 | }; |
4873 | 2450 | ||
4874 | /* | 2451 | /* |
@@ -4894,7 +2471,6 @@ static struct omap_hwmod_class omap44xx_uart_hwmod_class = { | |||
4894 | }; | 2471 | }; |
4895 | 2472 | ||
4896 | /* uart1 */ | 2473 | /* uart1 */ |
4897 | static struct omap_hwmod omap44xx_uart1_hwmod; | ||
4898 | static struct omap_hwmod_irq_info omap44xx_uart1_irqs[] = { | 2474 | static struct omap_hwmod_irq_info omap44xx_uart1_irqs[] = { |
4899 | { .irq = 72 + OMAP44XX_IRQ_GIC_START }, | 2475 | { .irq = 72 + OMAP44XX_IRQ_GIC_START }, |
4900 | { .irq = -1 } | 2476 | { .irq = -1 } |
@@ -4906,29 +2482,6 @@ static struct omap_hwmod_dma_info omap44xx_uart1_sdma_reqs[] = { | |||
4906 | { .dma_req = -1 } | 2482 | { .dma_req = -1 } |
4907 | }; | 2483 | }; |
4908 | 2484 | ||
4909 | static struct omap_hwmod_addr_space omap44xx_uart1_addrs[] = { | ||
4910 | { | ||
4911 | .pa_start = 0x4806a000, | ||
4912 | .pa_end = 0x4806a0ff, | ||
4913 | .flags = ADDR_TYPE_RT | ||
4914 | }, | ||
4915 | { } | ||
4916 | }; | ||
4917 | |||
4918 | /* l4_per -> uart1 */ | ||
4919 | static struct omap_hwmod_ocp_if omap44xx_l4_per__uart1 = { | ||
4920 | .master = &omap44xx_l4_per_hwmod, | ||
4921 | .slave = &omap44xx_uart1_hwmod, | ||
4922 | .clk = "l4_div_ck", | ||
4923 | .addr = omap44xx_uart1_addrs, | ||
4924 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4925 | }; | ||
4926 | |||
4927 | /* uart1 slave ports */ | ||
4928 | static struct omap_hwmod_ocp_if *omap44xx_uart1_slaves[] = { | ||
4929 | &omap44xx_l4_per__uart1, | ||
4930 | }; | ||
4931 | |||
4932 | static struct omap_hwmod omap44xx_uart1_hwmod = { | 2485 | static struct omap_hwmod omap44xx_uart1_hwmod = { |
4933 | .name = "uart1", | 2486 | .name = "uart1", |
4934 | .class = &omap44xx_uart_hwmod_class, | 2487 | .class = &omap44xx_uart_hwmod_class, |
@@ -4943,12 +2496,9 @@ static struct omap_hwmod omap44xx_uart1_hwmod = { | |||
4943 | .modulemode = MODULEMODE_SWCTRL, | 2496 | .modulemode = MODULEMODE_SWCTRL, |
4944 | }, | 2497 | }, |
4945 | }, | 2498 | }, |
4946 | .slaves = omap44xx_uart1_slaves, | ||
4947 | .slaves_cnt = ARRAY_SIZE(omap44xx_uart1_slaves), | ||
4948 | }; | 2499 | }; |
4949 | 2500 | ||
4950 | /* uart2 */ | 2501 | /* uart2 */ |
4951 | static struct omap_hwmod omap44xx_uart2_hwmod; | ||
4952 | static struct omap_hwmod_irq_info omap44xx_uart2_irqs[] = { | 2502 | static struct omap_hwmod_irq_info omap44xx_uart2_irqs[] = { |
4953 | { .irq = 73 + OMAP44XX_IRQ_GIC_START }, | 2503 | { .irq = 73 + OMAP44XX_IRQ_GIC_START }, |
4954 | { .irq = -1 } | 2504 | { .irq = -1 } |
@@ -4960,29 +2510,6 @@ static struct omap_hwmod_dma_info omap44xx_uart2_sdma_reqs[] = { | |||
4960 | { .dma_req = -1 } | 2510 | { .dma_req = -1 } |
4961 | }; | 2511 | }; |
4962 | 2512 | ||
4963 | static struct omap_hwmod_addr_space omap44xx_uart2_addrs[] = { | ||
4964 | { | ||
4965 | .pa_start = 0x4806c000, | ||
4966 | .pa_end = 0x4806c0ff, | ||
4967 | .flags = ADDR_TYPE_RT | ||
4968 | }, | ||
4969 | { } | ||
4970 | }; | ||
4971 | |||
4972 | /* l4_per -> uart2 */ | ||
4973 | static struct omap_hwmod_ocp_if omap44xx_l4_per__uart2 = { | ||
4974 | .master = &omap44xx_l4_per_hwmod, | ||
4975 | .slave = &omap44xx_uart2_hwmod, | ||
4976 | .clk = "l4_div_ck", | ||
4977 | .addr = omap44xx_uart2_addrs, | ||
4978 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4979 | }; | ||
4980 | |||
4981 | /* uart2 slave ports */ | ||
4982 | static struct omap_hwmod_ocp_if *omap44xx_uart2_slaves[] = { | ||
4983 | &omap44xx_l4_per__uart2, | ||
4984 | }; | ||
4985 | |||
4986 | static struct omap_hwmod omap44xx_uart2_hwmod = { | 2513 | static struct omap_hwmod omap44xx_uart2_hwmod = { |
4987 | .name = "uart2", | 2514 | .name = "uart2", |
4988 | .class = &omap44xx_uart_hwmod_class, | 2515 | .class = &omap44xx_uart_hwmod_class, |
@@ -4997,12 +2524,9 @@ static struct omap_hwmod omap44xx_uart2_hwmod = { | |||
4997 | .modulemode = MODULEMODE_SWCTRL, | 2524 | .modulemode = MODULEMODE_SWCTRL, |
4998 | }, | 2525 | }, |
4999 | }, | 2526 | }, |
5000 | .slaves = omap44xx_uart2_slaves, | ||
5001 | .slaves_cnt = ARRAY_SIZE(omap44xx_uart2_slaves), | ||
5002 | }; | 2527 | }; |
5003 | 2528 | ||
5004 | /* uart3 */ | 2529 | /* uart3 */ |
5005 | static struct omap_hwmod omap44xx_uart3_hwmod; | ||
5006 | static struct omap_hwmod_irq_info omap44xx_uart3_irqs[] = { | 2530 | static struct omap_hwmod_irq_info omap44xx_uart3_irqs[] = { |
5007 | { .irq = 74 + OMAP44XX_IRQ_GIC_START }, | 2531 | { .irq = 74 + OMAP44XX_IRQ_GIC_START }, |
5008 | { .irq = -1 } | 2532 | { .irq = -1 } |
@@ -5014,29 +2538,6 @@ static struct omap_hwmod_dma_info omap44xx_uart3_sdma_reqs[] = { | |||
5014 | { .dma_req = -1 } | 2538 | { .dma_req = -1 } |
5015 | }; | 2539 | }; |
5016 | 2540 | ||
5017 | static struct omap_hwmod_addr_space omap44xx_uart3_addrs[] = { | ||
5018 | { | ||
5019 | .pa_start = 0x48020000, | ||
5020 | .pa_end = 0x480200ff, | ||
5021 | .flags = ADDR_TYPE_RT | ||
5022 | }, | ||
5023 | { } | ||
5024 | }; | ||
5025 | |||
5026 | /* l4_per -> uart3 */ | ||
5027 | static struct omap_hwmod_ocp_if omap44xx_l4_per__uart3 = { | ||
5028 | .master = &omap44xx_l4_per_hwmod, | ||
5029 | .slave = &omap44xx_uart3_hwmod, | ||
5030 | .clk = "l4_div_ck", | ||
5031 | .addr = omap44xx_uart3_addrs, | ||
5032 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
5033 | }; | ||
5034 | |||
5035 | /* uart3 slave ports */ | ||
5036 | static struct omap_hwmod_ocp_if *omap44xx_uart3_slaves[] = { | ||
5037 | &omap44xx_l4_per__uart3, | ||
5038 | }; | ||
5039 | |||
5040 | static struct omap_hwmod omap44xx_uart3_hwmod = { | 2541 | static struct omap_hwmod omap44xx_uart3_hwmod = { |
5041 | .name = "uart3", | 2542 | .name = "uart3", |
5042 | .class = &omap44xx_uart_hwmod_class, | 2543 | .class = &omap44xx_uart_hwmod_class, |
@@ -5052,12 +2553,9 @@ static struct omap_hwmod omap44xx_uart3_hwmod = { | |||
5052 | .modulemode = MODULEMODE_SWCTRL, | 2553 | .modulemode = MODULEMODE_SWCTRL, |
5053 | }, | 2554 | }, |
5054 | }, | 2555 | }, |
5055 | .slaves = omap44xx_uart3_slaves, | ||
5056 | .slaves_cnt = ARRAY_SIZE(omap44xx_uart3_slaves), | ||
5057 | }; | 2556 | }; |
5058 | 2557 | ||
5059 | /* uart4 */ | 2558 | /* uart4 */ |
5060 | static struct omap_hwmod omap44xx_uart4_hwmod; | ||
5061 | static struct omap_hwmod_irq_info omap44xx_uart4_irqs[] = { | 2559 | static struct omap_hwmod_irq_info omap44xx_uart4_irqs[] = { |
5062 | { .irq = 70 + OMAP44XX_IRQ_GIC_START }, | 2560 | { .irq = 70 + OMAP44XX_IRQ_GIC_START }, |
5063 | { .irq = -1 } | 2561 | { .irq = -1 } |
@@ -5069,29 +2567,6 @@ static struct omap_hwmod_dma_info omap44xx_uart4_sdma_reqs[] = { | |||
5069 | { .dma_req = -1 } | 2567 | { .dma_req = -1 } |
5070 | }; | 2568 | }; |
5071 | 2569 | ||
5072 | static struct omap_hwmod_addr_space omap44xx_uart4_addrs[] = { | ||
5073 | { | ||
5074 | .pa_start = 0x4806e000, | ||
5075 | .pa_end = 0x4806e0ff, | ||
5076 | .flags = ADDR_TYPE_RT | ||
5077 | }, | ||
5078 | { } | ||
5079 | }; | ||
5080 | |||
5081 | /* l4_per -> uart4 */ | ||
5082 | static struct omap_hwmod_ocp_if omap44xx_l4_per__uart4 = { | ||
5083 | .master = &omap44xx_l4_per_hwmod, | ||
5084 | .slave = &omap44xx_uart4_hwmod, | ||
5085 | .clk = "l4_div_ck", | ||
5086 | .addr = omap44xx_uart4_addrs, | ||
5087 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
5088 | }; | ||
5089 | |||
5090 | /* uart4 slave ports */ | ||
5091 | static struct omap_hwmod_ocp_if *omap44xx_uart4_slaves[] = { | ||
5092 | &omap44xx_l4_per__uart4, | ||
5093 | }; | ||
5094 | |||
5095 | static struct omap_hwmod omap44xx_uart4_hwmod = { | 2570 | static struct omap_hwmod omap44xx_uart4_hwmod = { |
5096 | .name = "uart4", | 2571 | .name = "uart4", |
5097 | .class = &omap44xx_uart_hwmod_class, | 2572 | .class = &omap44xx_uart_hwmod_class, |
@@ -5106,8 +2581,98 @@ static struct omap_hwmod omap44xx_uart4_hwmod = { | |||
5106 | .modulemode = MODULEMODE_SWCTRL, | 2581 | .modulemode = MODULEMODE_SWCTRL, |
5107 | }, | 2582 | }, |
5108 | }, | 2583 | }, |
5109 | .slaves = omap44xx_uart4_slaves, | 2584 | }; |
5110 | .slaves_cnt = ARRAY_SIZE(omap44xx_uart4_slaves), | 2585 | |
2586 | /* | ||
2587 | * 'usb_host_hs' class | ||
2588 | * high-speed multi-port usb host controller | ||
2589 | */ | ||
2590 | |||
2591 | static struct omap_hwmod_class_sysconfig omap44xx_usb_host_hs_sysc = { | ||
2592 | .rev_offs = 0x0000, | ||
2593 | .sysc_offs = 0x0010, | ||
2594 | .syss_offs = 0x0014, | ||
2595 | .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE | | ||
2596 | SYSC_HAS_SOFTRESET), | ||
2597 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
2598 | SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO | | ||
2599 | MSTANDBY_SMART | MSTANDBY_SMART_WKUP), | ||
2600 | .sysc_fields = &omap_hwmod_sysc_type2, | ||
2601 | }; | ||
2602 | |||
2603 | static struct omap_hwmod_class omap44xx_usb_host_hs_hwmod_class = { | ||
2604 | .name = "usb_host_hs", | ||
2605 | .sysc = &omap44xx_usb_host_hs_sysc, | ||
2606 | }; | ||
2607 | |||
2608 | /* usb_host_hs */ | ||
2609 | static struct omap_hwmod_irq_info omap44xx_usb_host_hs_irqs[] = { | ||
2610 | { .name = "ohci-irq", .irq = 76 + OMAP44XX_IRQ_GIC_START }, | ||
2611 | { .name = "ehci-irq", .irq = 77 + OMAP44XX_IRQ_GIC_START }, | ||
2612 | { .irq = -1 } | ||
2613 | }; | ||
2614 | |||
2615 | static struct omap_hwmod omap44xx_usb_host_hs_hwmod = { | ||
2616 | .name = "usb_host_hs", | ||
2617 | .class = &omap44xx_usb_host_hs_hwmod_class, | ||
2618 | .clkdm_name = "l3_init_clkdm", | ||
2619 | .main_clk = "usb_host_hs_fck", | ||
2620 | .prcm = { | ||
2621 | .omap4 = { | ||
2622 | .clkctrl_offs = OMAP4_CM_L3INIT_USB_HOST_CLKCTRL_OFFSET, | ||
2623 | .context_offs = OMAP4_RM_L3INIT_USB_HOST_CONTEXT_OFFSET, | ||
2624 | .modulemode = MODULEMODE_SWCTRL, | ||
2625 | }, | ||
2626 | }, | ||
2627 | .mpu_irqs = omap44xx_usb_host_hs_irqs, | ||
2628 | |||
2629 | /* | ||
2630 | * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock | ||
2631 | * id: i660 | ||
2632 | * | ||
2633 | * Description: | ||
2634 | * In the following configuration : | ||
2635 | * - USBHOST module is set to smart-idle mode | ||
2636 | * - PRCM asserts idle_req to the USBHOST module ( This typically | ||
2637 | * happens when the system is going to a low power mode : all ports | ||
2638 | * have been suspended, the master part of the USBHOST module has | ||
2639 | * entered the standby state, and SW has cut the functional clocks) | ||
2640 | * - an USBHOST interrupt occurs before the module is able to answer | ||
2641 | * idle_ack, typically a remote wakeup IRQ. | ||
2642 | * Then the USB HOST module will enter a deadlock situation where it | ||
2643 | * is no more accessible nor functional. | ||
2644 | * | ||
2645 | * Workaround: | ||
2646 | * Don't use smart idle; use only force idle, hence HWMOD_SWSUP_SIDLE | ||
2647 | */ | ||
2648 | |||
2649 | /* | ||
2650 | * Errata: USB host EHCI may stall when entering smart-standby mode | ||
2651 | * Id: i571 | ||
2652 | * | ||
2653 | * Description: | ||
2654 | * When the USBHOST module is set to smart-standby mode, and when it is | ||
2655 | * ready to enter the standby state (i.e. all ports are suspended and | ||
2656 | * all attached devices are in suspend mode), then it can wrongly assert | ||
2657 | * the Mstandby signal too early while there are still some residual OCP | ||
2658 | * transactions ongoing. If this condition occurs, the internal state | ||
2659 | * machine may go to an undefined state and the USB link may be stuck | ||
2660 | * upon the next resume. | ||
2661 | * | ||
2662 | * Workaround: | ||
2663 | * Don't use smart standby; use only force standby, | ||
2664 | * hence HWMOD_SWSUP_MSTANDBY | ||
2665 | */ | ||
2666 | |||
2667 | /* | ||
2668 | * During system boot; If the hwmod framework resets the module | ||
2669 | * the module will have smart idle settings; which can lead to deadlock | ||
2670 | * (above Errata Id:i660); so, dont reset the module during boot; | ||
2671 | * Use HWMOD_INIT_NO_RESET. | ||
2672 | */ | ||
2673 | |||
2674 | .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY | | ||
2675 | HWMOD_INIT_NO_RESET, | ||
5111 | }; | 2676 | }; |
5112 | 2677 | ||
5113 | /* | 2678 | /* |
@@ -5140,34 +2705,6 @@ static struct omap_hwmod_irq_info omap44xx_usb_otg_hs_irqs[] = { | |||
5140 | { .irq = -1 } | 2705 | { .irq = -1 } |
5141 | }; | 2706 | }; |
5142 | 2707 | ||
5143 | /* usb_otg_hs master ports */ | ||
5144 | static struct omap_hwmod_ocp_if *omap44xx_usb_otg_hs_masters[] = { | ||
5145 | &omap44xx_usb_otg_hs__l3_main_2, | ||
5146 | }; | ||
5147 | |||
5148 | static struct omap_hwmod_addr_space omap44xx_usb_otg_hs_addrs[] = { | ||
5149 | { | ||
5150 | .pa_start = 0x4a0ab000, | ||
5151 | .pa_end = 0x4a0ab003, | ||
5152 | .flags = ADDR_TYPE_RT | ||
5153 | }, | ||
5154 | { } | ||
5155 | }; | ||
5156 | |||
5157 | /* l4_cfg -> usb_otg_hs */ | ||
5158 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_otg_hs = { | ||
5159 | .master = &omap44xx_l4_cfg_hwmod, | ||
5160 | .slave = &omap44xx_usb_otg_hs_hwmod, | ||
5161 | .clk = "l4_div_ck", | ||
5162 | .addr = omap44xx_usb_otg_hs_addrs, | ||
5163 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
5164 | }; | ||
5165 | |||
5166 | /* usb_otg_hs slave ports */ | ||
5167 | static struct omap_hwmod_ocp_if *omap44xx_usb_otg_hs_slaves[] = { | ||
5168 | &omap44xx_l4_cfg__usb_otg_hs, | ||
5169 | }; | ||
5170 | |||
5171 | static struct omap_hwmod_opt_clk usb_otg_hs_opt_clks[] = { | 2708 | static struct omap_hwmod_opt_clk usb_otg_hs_opt_clks[] = { |
5172 | { .role = "xclk", .clk = "usb_otg_hs_xclk" }, | 2709 | { .role = "xclk", .clk = "usb_otg_hs_xclk" }, |
5173 | }; | 2710 | }; |
@@ -5188,10 +2725,47 @@ static struct omap_hwmod omap44xx_usb_otg_hs_hwmod = { | |||
5188 | }, | 2725 | }, |
5189 | .opt_clks = usb_otg_hs_opt_clks, | 2726 | .opt_clks = usb_otg_hs_opt_clks, |
5190 | .opt_clks_cnt = ARRAY_SIZE(usb_otg_hs_opt_clks), | 2727 | .opt_clks_cnt = ARRAY_SIZE(usb_otg_hs_opt_clks), |
5191 | .slaves = omap44xx_usb_otg_hs_slaves, | 2728 | }; |
5192 | .slaves_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_slaves), | 2729 | |
5193 | .masters = omap44xx_usb_otg_hs_masters, | 2730 | /* |
5194 | .masters_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_masters), | 2731 | * 'usb_tll_hs' class |
2732 | * usb_tll_hs module is the adapter on the usb_host_hs ports | ||
2733 | */ | ||
2734 | |||
2735 | static struct omap_hwmod_class_sysconfig omap44xx_usb_tll_hs_sysc = { | ||
2736 | .rev_offs = 0x0000, | ||
2737 | .sysc_offs = 0x0010, | ||
2738 | .syss_offs = 0x0014, | ||
2739 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | | ||
2740 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
2741 | SYSC_HAS_AUTOIDLE), | ||
2742 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
2743 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
2744 | }; | ||
2745 | |||
2746 | static struct omap_hwmod_class omap44xx_usb_tll_hs_hwmod_class = { | ||
2747 | .name = "usb_tll_hs", | ||
2748 | .sysc = &omap44xx_usb_tll_hs_sysc, | ||
2749 | }; | ||
2750 | |||
2751 | static struct omap_hwmod_irq_info omap44xx_usb_tll_hs_irqs[] = { | ||
2752 | { .name = "tll-irq", .irq = 78 + OMAP44XX_IRQ_GIC_START }, | ||
2753 | { .irq = -1 } | ||
2754 | }; | ||
2755 | |||
2756 | static struct omap_hwmod omap44xx_usb_tll_hs_hwmod = { | ||
2757 | .name = "usb_tll_hs", | ||
2758 | .class = &omap44xx_usb_tll_hs_hwmod_class, | ||
2759 | .clkdm_name = "l3_init_clkdm", | ||
2760 | .mpu_irqs = omap44xx_usb_tll_hs_irqs, | ||
2761 | .main_clk = "usb_tll_hs_ick", | ||
2762 | .prcm = { | ||
2763 | .omap4 = { | ||
2764 | .clkctrl_offs = OMAP4_CM_L3INIT_USB_TLL_CLKCTRL_OFFSET, | ||
2765 | .context_offs = OMAP4_RM_L3INIT_USB_TLL_CONTEXT_OFFSET, | ||
2766 | .modulemode = MODULEMODE_HWCTRL, | ||
2767 | }, | ||
2768 | }, | ||
5195 | }; | 2769 | }; |
5196 | 2770 | ||
5197 | /* | 2771 | /* |
@@ -5218,35 +2792,11 @@ static struct omap_hwmod_class omap44xx_wd_timer_hwmod_class = { | |||
5218 | }; | 2792 | }; |
5219 | 2793 | ||
5220 | /* wd_timer2 */ | 2794 | /* wd_timer2 */ |
5221 | static struct omap_hwmod omap44xx_wd_timer2_hwmod; | ||
5222 | static struct omap_hwmod_irq_info omap44xx_wd_timer2_irqs[] = { | 2795 | static struct omap_hwmod_irq_info omap44xx_wd_timer2_irqs[] = { |
5223 | { .irq = 80 + OMAP44XX_IRQ_GIC_START }, | 2796 | { .irq = 80 + OMAP44XX_IRQ_GIC_START }, |
5224 | { .irq = -1 } | 2797 | { .irq = -1 } |
5225 | }; | 2798 | }; |
5226 | 2799 | ||
5227 | static struct omap_hwmod_addr_space omap44xx_wd_timer2_addrs[] = { | ||
5228 | { | ||
5229 | .pa_start = 0x4a314000, | ||
5230 | .pa_end = 0x4a31407f, | ||
5231 | .flags = ADDR_TYPE_RT | ||
5232 | }, | ||
5233 | { } | ||
5234 | }; | ||
5235 | |||
5236 | /* l4_wkup -> wd_timer2 */ | ||
5237 | static struct omap_hwmod_ocp_if omap44xx_l4_wkup__wd_timer2 = { | ||
5238 | .master = &omap44xx_l4_wkup_hwmod, | ||
5239 | .slave = &omap44xx_wd_timer2_hwmod, | ||
5240 | .clk = "l4_wkup_clk_mux_ck", | ||
5241 | .addr = omap44xx_wd_timer2_addrs, | ||
5242 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
5243 | }; | ||
5244 | |||
5245 | /* wd_timer2 slave ports */ | ||
5246 | static struct omap_hwmod_ocp_if *omap44xx_wd_timer2_slaves[] = { | ||
5247 | &omap44xx_l4_wkup__wd_timer2, | ||
5248 | }; | ||
5249 | |||
5250 | static struct omap_hwmod omap44xx_wd_timer2_hwmod = { | 2800 | static struct omap_hwmod omap44xx_wd_timer2_hwmod = { |
5251 | .name = "wd_timer2", | 2801 | .name = "wd_timer2", |
5252 | .class = &omap44xx_wd_timer_hwmod_class, | 2802 | .class = &omap44xx_wd_timer_hwmod_class, |
@@ -5260,106 +2810,1746 @@ static struct omap_hwmod omap44xx_wd_timer2_hwmod = { | |||
5260 | .modulemode = MODULEMODE_SWCTRL, | 2810 | .modulemode = MODULEMODE_SWCTRL, |
5261 | }, | 2811 | }, |
5262 | }, | 2812 | }, |
5263 | .slaves = omap44xx_wd_timer2_slaves, | ||
5264 | .slaves_cnt = ARRAY_SIZE(omap44xx_wd_timer2_slaves), | ||
5265 | }; | 2813 | }; |
5266 | 2814 | ||
5267 | /* wd_timer3 */ | 2815 | /* wd_timer3 */ |
5268 | static struct omap_hwmod omap44xx_wd_timer3_hwmod; | ||
5269 | static struct omap_hwmod_irq_info omap44xx_wd_timer3_irqs[] = { | 2816 | static struct omap_hwmod_irq_info omap44xx_wd_timer3_irqs[] = { |
5270 | { .irq = 36 + OMAP44XX_IRQ_GIC_START }, | 2817 | { .irq = 36 + OMAP44XX_IRQ_GIC_START }, |
5271 | { .irq = -1 } | 2818 | { .irq = -1 } |
5272 | }; | 2819 | }; |
5273 | 2820 | ||
5274 | static struct omap_hwmod_addr_space omap44xx_wd_timer3_addrs[] = { | 2821 | static struct omap_hwmod omap44xx_wd_timer3_hwmod = { |
2822 | .name = "wd_timer3", | ||
2823 | .class = &omap44xx_wd_timer_hwmod_class, | ||
2824 | .clkdm_name = "abe_clkdm", | ||
2825 | .mpu_irqs = omap44xx_wd_timer3_irqs, | ||
2826 | .main_clk = "wd_timer3_fck", | ||
2827 | .prcm = { | ||
2828 | .omap4 = { | ||
2829 | .clkctrl_offs = OMAP4_CM1_ABE_WDT3_CLKCTRL_OFFSET, | ||
2830 | .context_offs = OMAP4_RM_ABE_WDT3_CONTEXT_OFFSET, | ||
2831 | .modulemode = MODULEMODE_SWCTRL, | ||
2832 | }, | ||
2833 | }, | ||
2834 | }; | ||
2835 | |||
2836 | |||
2837 | /* | ||
2838 | * interfaces | ||
2839 | */ | ||
2840 | |||
2841 | /* l3_main_1 -> dmm */ | ||
2842 | static struct omap_hwmod_ocp_if omap44xx_l3_main_1__dmm = { | ||
2843 | .master = &omap44xx_l3_main_1_hwmod, | ||
2844 | .slave = &omap44xx_dmm_hwmod, | ||
2845 | .clk = "l3_div_ck", | ||
2846 | .user = OCP_USER_SDMA, | ||
2847 | }; | ||
2848 | |||
2849 | static struct omap_hwmod_addr_space omap44xx_dmm_addrs[] = { | ||
5275 | { | 2850 | { |
5276 | .pa_start = 0x40130000, | 2851 | .pa_start = 0x4e000000, |
5277 | .pa_end = 0x4013007f, | 2852 | .pa_end = 0x4e0007ff, |
5278 | .flags = ADDR_TYPE_RT | 2853 | .flags = ADDR_TYPE_RT |
5279 | }, | 2854 | }, |
5280 | { } | 2855 | { } |
5281 | }; | 2856 | }; |
5282 | 2857 | ||
5283 | /* l4_abe -> wd_timer3 */ | 2858 | /* mpu -> dmm */ |
5284 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3 = { | 2859 | static struct omap_hwmod_ocp_if omap44xx_mpu__dmm = { |
2860 | .master = &omap44xx_mpu_hwmod, | ||
2861 | .slave = &omap44xx_dmm_hwmod, | ||
2862 | .clk = "l3_div_ck", | ||
2863 | .addr = omap44xx_dmm_addrs, | ||
2864 | .user = OCP_USER_MPU, | ||
2865 | }; | ||
2866 | |||
2867 | /* dmm -> emif_fw */ | ||
2868 | static struct omap_hwmod_ocp_if omap44xx_dmm__emif_fw = { | ||
2869 | .master = &omap44xx_dmm_hwmod, | ||
2870 | .slave = &omap44xx_emif_fw_hwmod, | ||
2871 | .clk = "l3_div_ck", | ||
2872 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2873 | }; | ||
2874 | |||
2875 | static struct omap_hwmod_addr_space omap44xx_emif_fw_addrs[] = { | ||
2876 | { | ||
2877 | .pa_start = 0x4a20c000, | ||
2878 | .pa_end = 0x4a20c0ff, | ||
2879 | .flags = ADDR_TYPE_RT | ||
2880 | }, | ||
2881 | { } | ||
2882 | }; | ||
2883 | |||
2884 | /* l4_cfg -> emif_fw */ | ||
2885 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__emif_fw = { | ||
2886 | .master = &omap44xx_l4_cfg_hwmod, | ||
2887 | .slave = &omap44xx_emif_fw_hwmod, | ||
2888 | .clk = "l4_div_ck", | ||
2889 | .addr = omap44xx_emif_fw_addrs, | ||
2890 | .user = OCP_USER_MPU, | ||
2891 | }; | ||
2892 | |||
2893 | /* iva -> l3_instr */ | ||
2894 | static struct omap_hwmod_ocp_if omap44xx_iva__l3_instr = { | ||
2895 | .master = &omap44xx_iva_hwmod, | ||
2896 | .slave = &omap44xx_l3_instr_hwmod, | ||
2897 | .clk = "l3_div_ck", | ||
2898 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2899 | }; | ||
2900 | |||
2901 | /* l3_main_3 -> l3_instr */ | ||
2902 | static struct omap_hwmod_ocp_if omap44xx_l3_main_3__l3_instr = { | ||
2903 | .master = &omap44xx_l3_main_3_hwmod, | ||
2904 | .slave = &omap44xx_l3_instr_hwmod, | ||
2905 | .clk = "l3_div_ck", | ||
2906 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2907 | }; | ||
2908 | |||
2909 | /* dsp -> l3_main_1 */ | ||
2910 | static struct omap_hwmod_ocp_if omap44xx_dsp__l3_main_1 = { | ||
2911 | .master = &omap44xx_dsp_hwmod, | ||
2912 | .slave = &omap44xx_l3_main_1_hwmod, | ||
2913 | .clk = "l3_div_ck", | ||
2914 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2915 | }; | ||
2916 | |||
2917 | /* dss -> l3_main_1 */ | ||
2918 | static struct omap_hwmod_ocp_if omap44xx_dss__l3_main_1 = { | ||
2919 | .master = &omap44xx_dss_hwmod, | ||
2920 | .slave = &omap44xx_l3_main_1_hwmod, | ||
2921 | .clk = "l3_div_ck", | ||
2922 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2923 | }; | ||
2924 | |||
2925 | /* l3_main_2 -> l3_main_1 */ | ||
2926 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_1 = { | ||
2927 | .master = &omap44xx_l3_main_2_hwmod, | ||
2928 | .slave = &omap44xx_l3_main_1_hwmod, | ||
2929 | .clk = "l3_div_ck", | ||
2930 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2931 | }; | ||
2932 | |||
2933 | /* l4_cfg -> l3_main_1 */ | ||
2934 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_1 = { | ||
2935 | .master = &omap44xx_l4_cfg_hwmod, | ||
2936 | .slave = &omap44xx_l3_main_1_hwmod, | ||
2937 | .clk = "l4_div_ck", | ||
2938 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2939 | }; | ||
2940 | |||
2941 | /* mmc1 -> l3_main_1 */ | ||
2942 | static struct omap_hwmod_ocp_if omap44xx_mmc1__l3_main_1 = { | ||
2943 | .master = &omap44xx_mmc1_hwmod, | ||
2944 | .slave = &omap44xx_l3_main_1_hwmod, | ||
2945 | .clk = "l3_div_ck", | ||
2946 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2947 | }; | ||
2948 | |||
2949 | /* mmc2 -> l3_main_1 */ | ||
2950 | static struct omap_hwmod_ocp_if omap44xx_mmc2__l3_main_1 = { | ||
2951 | .master = &omap44xx_mmc2_hwmod, | ||
2952 | .slave = &omap44xx_l3_main_1_hwmod, | ||
2953 | .clk = "l3_div_ck", | ||
2954 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2955 | }; | ||
2956 | |||
2957 | static struct omap_hwmod_addr_space omap44xx_l3_main_1_addrs[] = { | ||
2958 | { | ||
2959 | .pa_start = 0x44000000, | ||
2960 | .pa_end = 0x44000fff, | ||
2961 | .flags = ADDR_TYPE_RT | ||
2962 | }, | ||
2963 | { } | ||
2964 | }; | ||
2965 | |||
2966 | /* mpu -> l3_main_1 */ | ||
2967 | static struct omap_hwmod_ocp_if omap44xx_mpu__l3_main_1 = { | ||
2968 | .master = &omap44xx_mpu_hwmod, | ||
2969 | .slave = &omap44xx_l3_main_1_hwmod, | ||
2970 | .clk = "l3_div_ck", | ||
2971 | .addr = omap44xx_l3_main_1_addrs, | ||
2972 | .user = OCP_USER_MPU, | ||
2973 | }; | ||
2974 | |||
2975 | /* dma_system -> l3_main_2 */ | ||
2976 | static struct omap_hwmod_ocp_if omap44xx_dma_system__l3_main_2 = { | ||
2977 | .master = &omap44xx_dma_system_hwmod, | ||
2978 | .slave = &omap44xx_l3_main_2_hwmod, | ||
2979 | .clk = "l3_div_ck", | ||
2980 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2981 | }; | ||
2982 | |||
2983 | /* hsi -> l3_main_2 */ | ||
2984 | static struct omap_hwmod_ocp_if omap44xx_hsi__l3_main_2 = { | ||
2985 | .master = &omap44xx_hsi_hwmod, | ||
2986 | .slave = &omap44xx_l3_main_2_hwmod, | ||
2987 | .clk = "l3_div_ck", | ||
2988 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2989 | }; | ||
2990 | |||
2991 | /* ipu -> l3_main_2 */ | ||
2992 | static struct omap_hwmod_ocp_if omap44xx_ipu__l3_main_2 = { | ||
2993 | .master = &omap44xx_ipu_hwmod, | ||
2994 | .slave = &omap44xx_l3_main_2_hwmod, | ||
2995 | .clk = "l3_div_ck", | ||
2996 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2997 | }; | ||
2998 | |||
2999 | /* iss -> l3_main_2 */ | ||
3000 | static struct omap_hwmod_ocp_if omap44xx_iss__l3_main_2 = { | ||
3001 | .master = &omap44xx_iss_hwmod, | ||
3002 | .slave = &omap44xx_l3_main_2_hwmod, | ||
3003 | .clk = "l3_div_ck", | ||
3004 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3005 | }; | ||
3006 | |||
3007 | /* iva -> l3_main_2 */ | ||
3008 | static struct omap_hwmod_ocp_if omap44xx_iva__l3_main_2 = { | ||
3009 | .master = &omap44xx_iva_hwmod, | ||
3010 | .slave = &omap44xx_l3_main_2_hwmod, | ||
3011 | .clk = "l3_div_ck", | ||
3012 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3013 | }; | ||
3014 | |||
3015 | static struct omap_hwmod_addr_space omap44xx_l3_main_2_addrs[] = { | ||
3016 | { | ||
3017 | .pa_start = 0x44800000, | ||
3018 | .pa_end = 0x44801fff, | ||
3019 | .flags = ADDR_TYPE_RT | ||
3020 | }, | ||
3021 | { } | ||
3022 | }; | ||
3023 | |||
3024 | /* l3_main_1 -> l3_main_2 */ | ||
3025 | static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_2 = { | ||
3026 | .master = &omap44xx_l3_main_1_hwmod, | ||
3027 | .slave = &omap44xx_l3_main_2_hwmod, | ||
3028 | .clk = "l3_div_ck", | ||
3029 | .addr = omap44xx_l3_main_2_addrs, | ||
3030 | .user = OCP_USER_MPU, | ||
3031 | }; | ||
3032 | |||
3033 | /* l4_cfg -> l3_main_2 */ | ||
3034 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_2 = { | ||
3035 | .master = &omap44xx_l4_cfg_hwmod, | ||
3036 | .slave = &omap44xx_l3_main_2_hwmod, | ||
3037 | .clk = "l4_div_ck", | ||
3038 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3039 | }; | ||
3040 | |||
3041 | /* usb_host_hs -> l3_main_2 */ | ||
3042 | static struct omap_hwmod_ocp_if omap44xx_usb_host_hs__l3_main_2 = { | ||
3043 | .master = &omap44xx_usb_host_hs_hwmod, | ||
3044 | .slave = &omap44xx_l3_main_2_hwmod, | ||
3045 | .clk = "l3_div_ck", | ||
3046 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3047 | }; | ||
3048 | |||
3049 | /* usb_otg_hs -> l3_main_2 */ | ||
3050 | static struct omap_hwmod_ocp_if omap44xx_usb_otg_hs__l3_main_2 = { | ||
3051 | .master = &omap44xx_usb_otg_hs_hwmod, | ||
3052 | .slave = &omap44xx_l3_main_2_hwmod, | ||
3053 | .clk = "l3_div_ck", | ||
3054 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3055 | }; | ||
3056 | |||
3057 | static struct omap_hwmod_addr_space omap44xx_l3_main_3_addrs[] = { | ||
3058 | { | ||
3059 | .pa_start = 0x45000000, | ||
3060 | .pa_end = 0x45000fff, | ||
3061 | .flags = ADDR_TYPE_RT | ||
3062 | }, | ||
3063 | { } | ||
3064 | }; | ||
3065 | |||
3066 | /* l3_main_1 -> l3_main_3 */ | ||
3067 | static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_3 = { | ||
3068 | .master = &omap44xx_l3_main_1_hwmod, | ||
3069 | .slave = &omap44xx_l3_main_3_hwmod, | ||
3070 | .clk = "l3_div_ck", | ||
3071 | .addr = omap44xx_l3_main_3_addrs, | ||
3072 | .user = OCP_USER_MPU, | ||
3073 | }; | ||
3074 | |||
3075 | /* l3_main_2 -> l3_main_3 */ | ||
3076 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_3 = { | ||
3077 | .master = &omap44xx_l3_main_2_hwmod, | ||
3078 | .slave = &omap44xx_l3_main_3_hwmod, | ||
3079 | .clk = "l3_div_ck", | ||
3080 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3081 | }; | ||
3082 | |||
3083 | /* l4_cfg -> l3_main_3 */ | ||
3084 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_3 = { | ||
3085 | .master = &omap44xx_l4_cfg_hwmod, | ||
3086 | .slave = &omap44xx_l3_main_3_hwmod, | ||
3087 | .clk = "l4_div_ck", | ||
3088 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3089 | }; | ||
3090 | |||
3091 | /* aess -> l4_abe */ | ||
3092 | static struct omap_hwmod_ocp_if omap44xx_aess__l4_abe = { | ||
3093 | .master = &omap44xx_aess_hwmod, | ||
3094 | .slave = &omap44xx_l4_abe_hwmod, | ||
3095 | .clk = "ocp_abe_iclk", | ||
3096 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3097 | }; | ||
3098 | |||
3099 | /* dsp -> l4_abe */ | ||
3100 | static struct omap_hwmod_ocp_if omap44xx_dsp__l4_abe = { | ||
3101 | .master = &omap44xx_dsp_hwmod, | ||
3102 | .slave = &omap44xx_l4_abe_hwmod, | ||
3103 | .clk = "ocp_abe_iclk", | ||
3104 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3105 | }; | ||
3106 | |||
3107 | /* l3_main_1 -> l4_abe */ | ||
3108 | static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_abe = { | ||
3109 | .master = &omap44xx_l3_main_1_hwmod, | ||
3110 | .slave = &omap44xx_l4_abe_hwmod, | ||
3111 | .clk = "l3_div_ck", | ||
3112 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3113 | }; | ||
3114 | |||
3115 | /* mpu -> l4_abe */ | ||
3116 | static struct omap_hwmod_ocp_if omap44xx_mpu__l4_abe = { | ||
3117 | .master = &omap44xx_mpu_hwmod, | ||
3118 | .slave = &omap44xx_l4_abe_hwmod, | ||
3119 | .clk = "ocp_abe_iclk", | ||
3120 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3121 | }; | ||
3122 | |||
3123 | /* l3_main_1 -> l4_cfg */ | ||
3124 | static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_cfg = { | ||
3125 | .master = &omap44xx_l3_main_1_hwmod, | ||
3126 | .slave = &omap44xx_l4_cfg_hwmod, | ||
3127 | .clk = "l3_div_ck", | ||
3128 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3129 | }; | ||
3130 | |||
3131 | /* l3_main_2 -> l4_per */ | ||
3132 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l4_per = { | ||
3133 | .master = &omap44xx_l3_main_2_hwmod, | ||
3134 | .slave = &omap44xx_l4_per_hwmod, | ||
3135 | .clk = "l3_div_ck", | ||
3136 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3137 | }; | ||
3138 | |||
3139 | /* l4_cfg -> l4_wkup */ | ||
3140 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l4_wkup = { | ||
3141 | .master = &omap44xx_l4_cfg_hwmod, | ||
3142 | .slave = &omap44xx_l4_wkup_hwmod, | ||
3143 | .clk = "l4_div_ck", | ||
3144 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3145 | }; | ||
3146 | |||
3147 | /* mpu -> mpu_private */ | ||
3148 | static struct omap_hwmod_ocp_if omap44xx_mpu__mpu_private = { | ||
3149 | .master = &omap44xx_mpu_hwmod, | ||
3150 | .slave = &omap44xx_mpu_private_hwmod, | ||
3151 | .clk = "l3_div_ck", | ||
3152 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3153 | }; | ||
3154 | |||
3155 | static struct omap_hwmod_addr_space omap44xx_aess_addrs[] = { | ||
3156 | { | ||
3157 | .pa_start = 0x401f1000, | ||
3158 | .pa_end = 0x401f13ff, | ||
3159 | .flags = ADDR_TYPE_RT | ||
3160 | }, | ||
3161 | { } | ||
3162 | }; | ||
3163 | |||
3164 | /* l4_abe -> aess */ | ||
3165 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess = { | ||
5285 | .master = &omap44xx_l4_abe_hwmod, | 3166 | .master = &omap44xx_l4_abe_hwmod, |
5286 | .slave = &omap44xx_wd_timer3_hwmod, | 3167 | .slave = &omap44xx_aess_hwmod, |
5287 | .clk = "ocp_abe_iclk", | 3168 | .clk = "ocp_abe_iclk", |
5288 | .addr = omap44xx_wd_timer3_addrs, | 3169 | .addr = omap44xx_aess_addrs, |
5289 | .user = OCP_USER_MPU, | 3170 | .user = OCP_USER_MPU, |
5290 | }; | 3171 | }; |
5291 | 3172 | ||
5292 | static struct omap_hwmod_addr_space omap44xx_wd_timer3_dma_addrs[] = { | 3173 | static struct omap_hwmod_addr_space omap44xx_aess_dma_addrs[] = { |
5293 | { | 3174 | { |
5294 | .pa_start = 0x49030000, | 3175 | .pa_start = 0x490f1000, |
5295 | .pa_end = 0x4903007f, | 3176 | .pa_end = 0x490f13ff, |
5296 | .flags = ADDR_TYPE_RT | 3177 | .flags = ADDR_TYPE_RT |
5297 | }, | 3178 | }, |
5298 | { } | 3179 | { } |
5299 | }; | 3180 | }; |
5300 | 3181 | ||
5301 | /* l4_abe -> wd_timer3 (dma) */ | 3182 | /* l4_abe -> aess (dma) */ |
5302 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3_dma = { | 3183 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess_dma = { |
5303 | .master = &omap44xx_l4_abe_hwmod, | 3184 | .master = &omap44xx_l4_abe_hwmod, |
5304 | .slave = &omap44xx_wd_timer3_hwmod, | 3185 | .slave = &omap44xx_aess_hwmod, |
5305 | .clk = "ocp_abe_iclk", | 3186 | .clk = "ocp_abe_iclk", |
5306 | .addr = omap44xx_wd_timer3_dma_addrs, | 3187 | .addr = omap44xx_aess_dma_addrs, |
5307 | .user = OCP_USER_SDMA, | 3188 | .user = OCP_USER_SDMA, |
5308 | }; | 3189 | }; |
5309 | 3190 | ||
5310 | /* wd_timer3 slave ports */ | 3191 | static struct omap_hwmod_addr_space omap44xx_counter_32k_addrs[] = { |
5311 | static struct omap_hwmod_ocp_if *omap44xx_wd_timer3_slaves[] = { | 3192 | { |
5312 | &omap44xx_l4_abe__wd_timer3, | 3193 | .pa_start = 0x4a304000, |
5313 | &omap44xx_l4_abe__wd_timer3_dma, | 3194 | .pa_end = 0x4a30401f, |
3195 | .flags = ADDR_TYPE_RT | ||
3196 | }, | ||
3197 | { } | ||
5314 | }; | 3198 | }; |
5315 | 3199 | ||
5316 | static struct omap_hwmod omap44xx_wd_timer3_hwmod = { | 3200 | /* l4_wkup -> counter_32k */ |
5317 | .name = "wd_timer3", | 3201 | static struct omap_hwmod_ocp_if omap44xx_l4_wkup__counter_32k = { |
5318 | .class = &omap44xx_wd_timer_hwmod_class, | 3202 | .master = &omap44xx_l4_wkup_hwmod, |
5319 | .clkdm_name = "abe_clkdm", | 3203 | .slave = &omap44xx_counter_32k_hwmod, |
5320 | .mpu_irqs = omap44xx_wd_timer3_irqs, | 3204 | .clk = "l4_wkup_clk_mux_ck", |
5321 | .main_clk = "wd_timer3_fck", | 3205 | .addr = omap44xx_counter_32k_addrs, |
5322 | .prcm = { | 3206 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
5323 | .omap4 = { | 3207 | }; |
5324 | .clkctrl_offs = OMAP4_CM1_ABE_WDT3_CLKCTRL_OFFSET, | 3208 | |
5325 | .context_offs = OMAP4_RM_ABE_WDT3_CONTEXT_OFFSET, | 3209 | static struct omap_hwmod_addr_space omap44xx_dma_system_addrs[] = { |
5326 | .modulemode = MODULEMODE_SWCTRL, | 3210 | { |
5327 | }, | 3211 | .pa_start = 0x4a056000, |
3212 | .pa_end = 0x4a056fff, | ||
3213 | .flags = ADDR_TYPE_RT | ||
5328 | }, | 3214 | }, |
5329 | .slaves = omap44xx_wd_timer3_slaves, | 3215 | { } |
5330 | .slaves_cnt = ARRAY_SIZE(omap44xx_wd_timer3_slaves), | ||
5331 | }; | 3216 | }; |
5332 | 3217 | ||
5333 | /* | 3218 | /* l4_cfg -> dma_system */ |
5334 | * 'usb_host_hs' class | 3219 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__dma_system = { |
5335 | * high-speed multi-port usb host controller | 3220 | .master = &omap44xx_l4_cfg_hwmod, |
5336 | */ | 3221 | .slave = &omap44xx_dma_system_hwmod, |
5337 | static struct omap_hwmod_ocp_if omap44xx_usb_host_hs__l3_main_2 = { | 3222 | .clk = "l4_div_ck", |
5338 | .master = &omap44xx_usb_host_hs_hwmod, | 3223 | .addr = omap44xx_dma_system_addrs, |
5339 | .slave = &omap44xx_l3_main_2_hwmod, | 3224 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
3225 | }; | ||
3226 | |||
3227 | static struct omap_hwmod_addr_space omap44xx_dmic_addrs[] = { | ||
3228 | { | ||
3229 | .name = "mpu", | ||
3230 | .pa_start = 0x4012e000, | ||
3231 | .pa_end = 0x4012e07f, | ||
3232 | .flags = ADDR_TYPE_RT | ||
3233 | }, | ||
3234 | { } | ||
3235 | }; | ||
3236 | |||
3237 | /* l4_abe -> dmic */ | ||
3238 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic = { | ||
3239 | .master = &omap44xx_l4_abe_hwmod, | ||
3240 | .slave = &omap44xx_dmic_hwmod, | ||
3241 | .clk = "ocp_abe_iclk", | ||
3242 | .addr = omap44xx_dmic_addrs, | ||
3243 | .user = OCP_USER_MPU, | ||
3244 | }; | ||
3245 | |||
3246 | static struct omap_hwmod_addr_space omap44xx_dmic_dma_addrs[] = { | ||
3247 | { | ||
3248 | .name = "dma", | ||
3249 | .pa_start = 0x4902e000, | ||
3250 | .pa_end = 0x4902e07f, | ||
3251 | .flags = ADDR_TYPE_RT | ||
3252 | }, | ||
3253 | { } | ||
3254 | }; | ||
3255 | |||
3256 | /* l4_abe -> dmic (dma) */ | ||
3257 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic_dma = { | ||
3258 | .master = &omap44xx_l4_abe_hwmod, | ||
3259 | .slave = &omap44xx_dmic_hwmod, | ||
3260 | .clk = "ocp_abe_iclk", | ||
3261 | .addr = omap44xx_dmic_dma_addrs, | ||
3262 | .user = OCP_USER_SDMA, | ||
3263 | }; | ||
3264 | |||
3265 | /* dsp -> iva */ | ||
3266 | static struct omap_hwmod_ocp_if omap44xx_dsp__iva = { | ||
3267 | .master = &omap44xx_dsp_hwmod, | ||
3268 | .slave = &omap44xx_iva_hwmod, | ||
3269 | .clk = "dpll_iva_m5x2_ck", | ||
3270 | .user = OCP_USER_DSP, | ||
3271 | }; | ||
3272 | |||
3273 | /* l4_cfg -> dsp */ | ||
3274 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__dsp = { | ||
3275 | .master = &omap44xx_l4_cfg_hwmod, | ||
3276 | .slave = &omap44xx_dsp_hwmod, | ||
3277 | .clk = "l4_div_ck", | ||
3278 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3279 | }; | ||
3280 | |||
3281 | static struct omap_hwmod_addr_space omap44xx_dss_dma_addrs[] = { | ||
3282 | { | ||
3283 | .pa_start = 0x58000000, | ||
3284 | .pa_end = 0x5800007f, | ||
3285 | .flags = ADDR_TYPE_RT | ||
3286 | }, | ||
3287 | { } | ||
3288 | }; | ||
3289 | |||
3290 | /* l3_main_2 -> dss */ | ||
3291 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss = { | ||
3292 | .master = &omap44xx_l3_main_2_hwmod, | ||
3293 | .slave = &omap44xx_dss_hwmod, | ||
3294 | .clk = "dss_fck", | ||
3295 | .addr = omap44xx_dss_dma_addrs, | ||
3296 | .user = OCP_USER_SDMA, | ||
3297 | }; | ||
3298 | |||
3299 | static struct omap_hwmod_addr_space omap44xx_dss_addrs[] = { | ||
3300 | { | ||
3301 | .pa_start = 0x48040000, | ||
3302 | .pa_end = 0x4804007f, | ||
3303 | .flags = ADDR_TYPE_RT | ||
3304 | }, | ||
3305 | { } | ||
3306 | }; | ||
3307 | |||
3308 | /* l4_per -> dss */ | ||
3309 | static struct omap_hwmod_ocp_if omap44xx_l4_per__dss = { | ||
3310 | .master = &omap44xx_l4_per_hwmod, | ||
3311 | .slave = &omap44xx_dss_hwmod, | ||
3312 | .clk = "l4_div_ck", | ||
3313 | .addr = omap44xx_dss_addrs, | ||
3314 | .user = OCP_USER_MPU, | ||
3315 | }; | ||
3316 | |||
3317 | static struct omap_hwmod_addr_space omap44xx_dss_dispc_dma_addrs[] = { | ||
3318 | { | ||
3319 | .pa_start = 0x58001000, | ||
3320 | .pa_end = 0x58001fff, | ||
3321 | .flags = ADDR_TYPE_RT | ||
3322 | }, | ||
3323 | { } | ||
3324 | }; | ||
3325 | |||
3326 | /* l3_main_2 -> dss_dispc */ | ||
3327 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dispc = { | ||
3328 | .master = &omap44xx_l3_main_2_hwmod, | ||
3329 | .slave = &omap44xx_dss_dispc_hwmod, | ||
3330 | .clk = "dss_fck", | ||
3331 | .addr = omap44xx_dss_dispc_dma_addrs, | ||
3332 | .user = OCP_USER_SDMA, | ||
3333 | }; | ||
3334 | |||
3335 | static struct omap_hwmod_addr_space omap44xx_dss_dispc_addrs[] = { | ||
3336 | { | ||
3337 | .pa_start = 0x48041000, | ||
3338 | .pa_end = 0x48041fff, | ||
3339 | .flags = ADDR_TYPE_RT | ||
3340 | }, | ||
3341 | { } | ||
3342 | }; | ||
3343 | |||
3344 | /* l4_per -> dss_dispc */ | ||
3345 | static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dispc = { | ||
3346 | .master = &omap44xx_l4_per_hwmod, | ||
3347 | .slave = &omap44xx_dss_dispc_hwmod, | ||
3348 | .clk = "l4_div_ck", | ||
3349 | .addr = omap44xx_dss_dispc_addrs, | ||
3350 | .user = OCP_USER_MPU, | ||
3351 | }; | ||
3352 | |||
3353 | static struct omap_hwmod_addr_space omap44xx_dss_dsi1_dma_addrs[] = { | ||
3354 | { | ||
3355 | .pa_start = 0x58004000, | ||
3356 | .pa_end = 0x580041ff, | ||
3357 | .flags = ADDR_TYPE_RT | ||
3358 | }, | ||
3359 | { } | ||
3360 | }; | ||
3361 | |||
3362 | /* l3_main_2 -> dss_dsi1 */ | ||
3363 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi1 = { | ||
3364 | .master = &omap44xx_l3_main_2_hwmod, | ||
3365 | .slave = &omap44xx_dss_dsi1_hwmod, | ||
3366 | .clk = "dss_fck", | ||
3367 | .addr = omap44xx_dss_dsi1_dma_addrs, | ||
3368 | .user = OCP_USER_SDMA, | ||
3369 | }; | ||
3370 | |||
3371 | static struct omap_hwmod_addr_space omap44xx_dss_dsi1_addrs[] = { | ||
3372 | { | ||
3373 | .pa_start = 0x48044000, | ||
3374 | .pa_end = 0x480441ff, | ||
3375 | .flags = ADDR_TYPE_RT | ||
3376 | }, | ||
3377 | { } | ||
3378 | }; | ||
3379 | |||
3380 | /* l4_per -> dss_dsi1 */ | ||
3381 | static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dsi1 = { | ||
3382 | .master = &omap44xx_l4_per_hwmod, | ||
3383 | .slave = &omap44xx_dss_dsi1_hwmod, | ||
3384 | .clk = "l4_div_ck", | ||
3385 | .addr = omap44xx_dss_dsi1_addrs, | ||
3386 | .user = OCP_USER_MPU, | ||
3387 | }; | ||
3388 | |||
3389 | static struct omap_hwmod_addr_space omap44xx_dss_dsi2_dma_addrs[] = { | ||
3390 | { | ||
3391 | .pa_start = 0x58005000, | ||
3392 | .pa_end = 0x580051ff, | ||
3393 | .flags = ADDR_TYPE_RT | ||
3394 | }, | ||
3395 | { } | ||
3396 | }; | ||
3397 | |||
3398 | /* l3_main_2 -> dss_dsi2 */ | ||
3399 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi2 = { | ||
3400 | .master = &omap44xx_l3_main_2_hwmod, | ||
3401 | .slave = &omap44xx_dss_dsi2_hwmod, | ||
3402 | .clk = "dss_fck", | ||
3403 | .addr = omap44xx_dss_dsi2_dma_addrs, | ||
3404 | .user = OCP_USER_SDMA, | ||
3405 | }; | ||
3406 | |||
3407 | static struct omap_hwmod_addr_space omap44xx_dss_dsi2_addrs[] = { | ||
3408 | { | ||
3409 | .pa_start = 0x48045000, | ||
3410 | .pa_end = 0x480451ff, | ||
3411 | .flags = ADDR_TYPE_RT | ||
3412 | }, | ||
3413 | { } | ||
3414 | }; | ||
3415 | |||
3416 | /* l4_per -> dss_dsi2 */ | ||
3417 | static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dsi2 = { | ||
3418 | .master = &omap44xx_l4_per_hwmod, | ||
3419 | .slave = &omap44xx_dss_dsi2_hwmod, | ||
3420 | .clk = "l4_div_ck", | ||
3421 | .addr = omap44xx_dss_dsi2_addrs, | ||
3422 | .user = OCP_USER_MPU, | ||
3423 | }; | ||
3424 | |||
3425 | static struct omap_hwmod_addr_space omap44xx_dss_hdmi_dma_addrs[] = { | ||
3426 | { | ||
3427 | .pa_start = 0x58006000, | ||
3428 | .pa_end = 0x58006fff, | ||
3429 | .flags = ADDR_TYPE_RT | ||
3430 | }, | ||
3431 | { } | ||
3432 | }; | ||
3433 | |||
3434 | /* l3_main_2 -> dss_hdmi */ | ||
3435 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_hdmi = { | ||
3436 | .master = &omap44xx_l3_main_2_hwmod, | ||
3437 | .slave = &omap44xx_dss_hdmi_hwmod, | ||
3438 | .clk = "dss_fck", | ||
3439 | .addr = omap44xx_dss_hdmi_dma_addrs, | ||
3440 | .user = OCP_USER_SDMA, | ||
3441 | }; | ||
3442 | |||
3443 | static struct omap_hwmod_addr_space omap44xx_dss_hdmi_addrs[] = { | ||
3444 | { | ||
3445 | .pa_start = 0x48046000, | ||
3446 | .pa_end = 0x48046fff, | ||
3447 | .flags = ADDR_TYPE_RT | ||
3448 | }, | ||
3449 | { } | ||
3450 | }; | ||
3451 | |||
3452 | /* l4_per -> dss_hdmi */ | ||
3453 | static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_hdmi = { | ||
3454 | .master = &omap44xx_l4_per_hwmod, | ||
3455 | .slave = &omap44xx_dss_hdmi_hwmod, | ||
3456 | .clk = "l4_div_ck", | ||
3457 | .addr = omap44xx_dss_hdmi_addrs, | ||
3458 | .user = OCP_USER_MPU, | ||
3459 | }; | ||
3460 | |||
3461 | static struct omap_hwmod_addr_space omap44xx_dss_rfbi_dma_addrs[] = { | ||
3462 | { | ||
3463 | .pa_start = 0x58002000, | ||
3464 | .pa_end = 0x580020ff, | ||
3465 | .flags = ADDR_TYPE_RT | ||
3466 | }, | ||
3467 | { } | ||
3468 | }; | ||
3469 | |||
3470 | /* l3_main_2 -> dss_rfbi */ | ||
3471 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_rfbi = { | ||
3472 | .master = &omap44xx_l3_main_2_hwmod, | ||
3473 | .slave = &omap44xx_dss_rfbi_hwmod, | ||
3474 | .clk = "dss_fck", | ||
3475 | .addr = omap44xx_dss_rfbi_dma_addrs, | ||
3476 | .user = OCP_USER_SDMA, | ||
3477 | }; | ||
3478 | |||
3479 | static struct omap_hwmod_addr_space omap44xx_dss_rfbi_addrs[] = { | ||
3480 | { | ||
3481 | .pa_start = 0x48042000, | ||
3482 | .pa_end = 0x480420ff, | ||
3483 | .flags = ADDR_TYPE_RT | ||
3484 | }, | ||
3485 | { } | ||
3486 | }; | ||
3487 | |||
3488 | /* l4_per -> dss_rfbi */ | ||
3489 | static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_rfbi = { | ||
3490 | .master = &omap44xx_l4_per_hwmod, | ||
3491 | .slave = &omap44xx_dss_rfbi_hwmod, | ||
3492 | .clk = "l4_div_ck", | ||
3493 | .addr = omap44xx_dss_rfbi_addrs, | ||
3494 | .user = OCP_USER_MPU, | ||
3495 | }; | ||
3496 | |||
3497 | static struct omap_hwmod_addr_space omap44xx_dss_venc_dma_addrs[] = { | ||
3498 | { | ||
3499 | .pa_start = 0x58003000, | ||
3500 | .pa_end = 0x580030ff, | ||
3501 | .flags = ADDR_TYPE_RT | ||
3502 | }, | ||
3503 | { } | ||
3504 | }; | ||
3505 | |||
3506 | /* l3_main_2 -> dss_venc */ | ||
3507 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_venc = { | ||
3508 | .master = &omap44xx_l3_main_2_hwmod, | ||
3509 | .slave = &omap44xx_dss_venc_hwmod, | ||
3510 | .clk = "dss_fck", | ||
3511 | .addr = omap44xx_dss_venc_dma_addrs, | ||
3512 | .user = OCP_USER_SDMA, | ||
3513 | }; | ||
3514 | |||
3515 | static struct omap_hwmod_addr_space omap44xx_dss_venc_addrs[] = { | ||
3516 | { | ||
3517 | .pa_start = 0x48043000, | ||
3518 | .pa_end = 0x480430ff, | ||
3519 | .flags = ADDR_TYPE_RT | ||
3520 | }, | ||
3521 | { } | ||
3522 | }; | ||
3523 | |||
3524 | /* l4_per -> dss_venc */ | ||
3525 | static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_venc = { | ||
3526 | .master = &omap44xx_l4_per_hwmod, | ||
3527 | .slave = &omap44xx_dss_venc_hwmod, | ||
3528 | .clk = "l4_div_ck", | ||
3529 | .addr = omap44xx_dss_venc_addrs, | ||
3530 | .user = OCP_USER_MPU, | ||
3531 | }; | ||
3532 | |||
3533 | static struct omap_hwmod_addr_space omap44xx_gpio1_addrs[] = { | ||
3534 | { | ||
3535 | .pa_start = 0x4a310000, | ||
3536 | .pa_end = 0x4a3101ff, | ||
3537 | .flags = ADDR_TYPE_RT | ||
3538 | }, | ||
3539 | { } | ||
3540 | }; | ||
3541 | |||
3542 | /* l4_wkup -> gpio1 */ | ||
3543 | static struct omap_hwmod_ocp_if omap44xx_l4_wkup__gpio1 = { | ||
3544 | .master = &omap44xx_l4_wkup_hwmod, | ||
3545 | .slave = &omap44xx_gpio1_hwmod, | ||
3546 | .clk = "l4_wkup_clk_mux_ck", | ||
3547 | .addr = omap44xx_gpio1_addrs, | ||
3548 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3549 | }; | ||
3550 | |||
3551 | static struct omap_hwmod_addr_space omap44xx_gpio2_addrs[] = { | ||
3552 | { | ||
3553 | .pa_start = 0x48055000, | ||
3554 | .pa_end = 0x480551ff, | ||
3555 | .flags = ADDR_TYPE_RT | ||
3556 | }, | ||
3557 | { } | ||
3558 | }; | ||
3559 | |||
3560 | /* l4_per -> gpio2 */ | ||
3561 | static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio2 = { | ||
3562 | .master = &omap44xx_l4_per_hwmod, | ||
3563 | .slave = &omap44xx_gpio2_hwmod, | ||
3564 | .clk = "l4_div_ck", | ||
3565 | .addr = omap44xx_gpio2_addrs, | ||
3566 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3567 | }; | ||
3568 | |||
3569 | static struct omap_hwmod_addr_space omap44xx_gpio3_addrs[] = { | ||
3570 | { | ||
3571 | .pa_start = 0x48057000, | ||
3572 | .pa_end = 0x480571ff, | ||
3573 | .flags = ADDR_TYPE_RT | ||
3574 | }, | ||
3575 | { } | ||
3576 | }; | ||
3577 | |||
3578 | /* l4_per -> gpio3 */ | ||
3579 | static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio3 = { | ||
3580 | .master = &omap44xx_l4_per_hwmod, | ||
3581 | .slave = &omap44xx_gpio3_hwmod, | ||
3582 | .clk = "l4_div_ck", | ||
3583 | .addr = omap44xx_gpio3_addrs, | ||
3584 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3585 | }; | ||
3586 | |||
3587 | static struct omap_hwmod_addr_space omap44xx_gpio4_addrs[] = { | ||
3588 | { | ||
3589 | .pa_start = 0x48059000, | ||
3590 | .pa_end = 0x480591ff, | ||
3591 | .flags = ADDR_TYPE_RT | ||
3592 | }, | ||
3593 | { } | ||
3594 | }; | ||
3595 | |||
3596 | /* l4_per -> gpio4 */ | ||
3597 | static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio4 = { | ||
3598 | .master = &omap44xx_l4_per_hwmod, | ||
3599 | .slave = &omap44xx_gpio4_hwmod, | ||
3600 | .clk = "l4_div_ck", | ||
3601 | .addr = omap44xx_gpio4_addrs, | ||
3602 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3603 | }; | ||
3604 | |||
3605 | static struct omap_hwmod_addr_space omap44xx_gpio5_addrs[] = { | ||
3606 | { | ||
3607 | .pa_start = 0x4805b000, | ||
3608 | .pa_end = 0x4805b1ff, | ||
3609 | .flags = ADDR_TYPE_RT | ||
3610 | }, | ||
3611 | { } | ||
3612 | }; | ||
3613 | |||
3614 | /* l4_per -> gpio5 */ | ||
3615 | static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio5 = { | ||
3616 | .master = &omap44xx_l4_per_hwmod, | ||
3617 | .slave = &omap44xx_gpio5_hwmod, | ||
3618 | .clk = "l4_div_ck", | ||
3619 | .addr = omap44xx_gpio5_addrs, | ||
3620 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3621 | }; | ||
3622 | |||
3623 | static struct omap_hwmod_addr_space omap44xx_gpio6_addrs[] = { | ||
3624 | { | ||
3625 | .pa_start = 0x4805d000, | ||
3626 | .pa_end = 0x4805d1ff, | ||
3627 | .flags = ADDR_TYPE_RT | ||
3628 | }, | ||
3629 | { } | ||
3630 | }; | ||
3631 | |||
3632 | /* l4_per -> gpio6 */ | ||
3633 | static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio6 = { | ||
3634 | .master = &omap44xx_l4_per_hwmod, | ||
3635 | .slave = &omap44xx_gpio6_hwmod, | ||
3636 | .clk = "l4_div_ck", | ||
3637 | .addr = omap44xx_gpio6_addrs, | ||
3638 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3639 | }; | ||
3640 | |||
3641 | static struct omap_hwmod_addr_space omap44xx_hsi_addrs[] = { | ||
3642 | { | ||
3643 | .pa_start = 0x4a058000, | ||
3644 | .pa_end = 0x4a05bfff, | ||
3645 | .flags = ADDR_TYPE_RT | ||
3646 | }, | ||
3647 | { } | ||
3648 | }; | ||
3649 | |||
3650 | /* l4_cfg -> hsi */ | ||
3651 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__hsi = { | ||
3652 | .master = &omap44xx_l4_cfg_hwmod, | ||
3653 | .slave = &omap44xx_hsi_hwmod, | ||
3654 | .clk = "l4_div_ck", | ||
3655 | .addr = omap44xx_hsi_addrs, | ||
3656 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3657 | }; | ||
3658 | |||
3659 | static struct omap_hwmod_addr_space omap44xx_i2c1_addrs[] = { | ||
3660 | { | ||
3661 | .pa_start = 0x48070000, | ||
3662 | .pa_end = 0x480700ff, | ||
3663 | .flags = ADDR_TYPE_RT | ||
3664 | }, | ||
3665 | { } | ||
3666 | }; | ||
3667 | |||
3668 | /* l4_per -> i2c1 */ | ||
3669 | static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c1 = { | ||
3670 | .master = &omap44xx_l4_per_hwmod, | ||
3671 | .slave = &omap44xx_i2c1_hwmod, | ||
3672 | .clk = "l4_div_ck", | ||
3673 | .addr = omap44xx_i2c1_addrs, | ||
3674 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3675 | }; | ||
3676 | |||
3677 | static struct omap_hwmod_addr_space omap44xx_i2c2_addrs[] = { | ||
3678 | { | ||
3679 | .pa_start = 0x48072000, | ||
3680 | .pa_end = 0x480720ff, | ||
3681 | .flags = ADDR_TYPE_RT | ||
3682 | }, | ||
3683 | { } | ||
3684 | }; | ||
3685 | |||
3686 | /* l4_per -> i2c2 */ | ||
3687 | static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c2 = { | ||
3688 | .master = &omap44xx_l4_per_hwmod, | ||
3689 | .slave = &omap44xx_i2c2_hwmod, | ||
3690 | .clk = "l4_div_ck", | ||
3691 | .addr = omap44xx_i2c2_addrs, | ||
3692 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3693 | }; | ||
3694 | |||
3695 | static struct omap_hwmod_addr_space omap44xx_i2c3_addrs[] = { | ||
3696 | { | ||
3697 | .pa_start = 0x48060000, | ||
3698 | .pa_end = 0x480600ff, | ||
3699 | .flags = ADDR_TYPE_RT | ||
3700 | }, | ||
3701 | { } | ||
3702 | }; | ||
3703 | |||
3704 | /* l4_per -> i2c3 */ | ||
3705 | static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c3 = { | ||
3706 | .master = &omap44xx_l4_per_hwmod, | ||
3707 | .slave = &omap44xx_i2c3_hwmod, | ||
3708 | .clk = "l4_div_ck", | ||
3709 | .addr = omap44xx_i2c3_addrs, | ||
3710 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3711 | }; | ||
3712 | |||
3713 | static struct omap_hwmod_addr_space omap44xx_i2c4_addrs[] = { | ||
3714 | { | ||
3715 | .pa_start = 0x48350000, | ||
3716 | .pa_end = 0x483500ff, | ||
3717 | .flags = ADDR_TYPE_RT | ||
3718 | }, | ||
3719 | { } | ||
3720 | }; | ||
3721 | |||
3722 | /* l4_per -> i2c4 */ | ||
3723 | static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c4 = { | ||
3724 | .master = &omap44xx_l4_per_hwmod, | ||
3725 | .slave = &omap44xx_i2c4_hwmod, | ||
3726 | .clk = "l4_div_ck", | ||
3727 | .addr = omap44xx_i2c4_addrs, | ||
3728 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3729 | }; | ||
3730 | |||
3731 | /* l3_main_2 -> ipu */ | ||
3732 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__ipu = { | ||
3733 | .master = &omap44xx_l3_main_2_hwmod, | ||
3734 | .slave = &omap44xx_ipu_hwmod, | ||
5340 | .clk = "l3_div_ck", | 3735 | .clk = "l3_div_ck", |
5341 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 3736 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
5342 | }; | 3737 | }; |
5343 | 3738 | ||
5344 | static struct omap_hwmod_class_sysconfig omap44xx_usb_host_hs_sysc = { | 3739 | static struct omap_hwmod_addr_space omap44xx_iss_addrs[] = { |
5345 | .rev_offs = 0x0000, | 3740 | { |
5346 | .sysc_offs = 0x0010, | 3741 | .pa_start = 0x52000000, |
5347 | .syss_offs = 0x0014, | 3742 | .pa_end = 0x520000ff, |
5348 | .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE | | 3743 | .flags = ADDR_TYPE_RT |
5349 | SYSC_HAS_SOFTRESET), | 3744 | }, |
5350 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | 3745 | { } |
5351 | SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO | | ||
5352 | MSTANDBY_SMART | MSTANDBY_SMART_WKUP), | ||
5353 | .sysc_fields = &omap_hwmod_sysc_type2, | ||
5354 | }; | 3746 | }; |
5355 | 3747 | ||
5356 | static struct omap_hwmod_class omap44xx_usb_host_hs_hwmod_class = { | 3748 | /* l3_main_2 -> iss */ |
5357 | .name = "usb_host_hs", | 3749 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iss = { |
5358 | .sysc = &omap44xx_usb_host_hs_sysc, | 3750 | .master = &omap44xx_l3_main_2_hwmod, |
3751 | .slave = &omap44xx_iss_hwmod, | ||
3752 | .clk = "l3_div_ck", | ||
3753 | .addr = omap44xx_iss_addrs, | ||
3754 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
5359 | }; | 3755 | }; |
5360 | 3756 | ||
5361 | static struct omap_hwmod_ocp_if *omap44xx_usb_host_hs_masters[] = { | 3757 | static struct omap_hwmod_addr_space omap44xx_iva_addrs[] = { |
5362 | &omap44xx_usb_host_hs__l3_main_2, | 3758 | { |
3759 | .pa_start = 0x5a000000, | ||
3760 | .pa_end = 0x5a07ffff, | ||
3761 | .flags = ADDR_TYPE_RT | ||
3762 | }, | ||
3763 | { } | ||
3764 | }; | ||
3765 | |||
3766 | /* l3_main_2 -> iva */ | ||
3767 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iva = { | ||
3768 | .master = &omap44xx_l3_main_2_hwmod, | ||
3769 | .slave = &omap44xx_iva_hwmod, | ||
3770 | .clk = "l3_div_ck", | ||
3771 | .addr = omap44xx_iva_addrs, | ||
3772 | .user = OCP_USER_MPU, | ||
3773 | }; | ||
3774 | |||
3775 | static struct omap_hwmod_addr_space omap44xx_kbd_addrs[] = { | ||
3776 | { | ||
3777 | .pa_start = 0x4a31c000, | ||
3778 | .pa_end = 0x4a31c07f, | ||
3779 | .flags = ADDR_TYPE_RT | ||
3780 | }, | ||
3781 | { } | ||
3782 | }; | ||
3783 | |||
3784 | /* l4_wkup -> kbd */ | ||
3785 | static struct omap_hwmod_ocp_if omap44xx_l4_wkup__kbd = { | ||
3786 | .master = &omap44xx_l4_wkup_hwmod, | ||
3787 | .slave = &omap44xx_kbd_hwmod, | ||
3788 | .clk = "l4_wkup_clk_mux_ck", | ||
3789 | .addr = omap44xx_kbd_addrs, | ||
3790 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3791 | }; | ||
3792 | |||
3793 | static struct omap_hwmod_addr_space omap44xx_mailbox_addrs[] = { | ||
3794 | { | ||
3795 | .pa_start = 0x4a0f4000, | ||
3796 | .pa_end = 0x4a0f41ff, | ||
3797 | .flags = ADDR_TYPE_RT | ||
3798 | }, | ||
3799 | { } | ||
3800 | }; | ||
3801 | |||
3802 | /* l4_cfg -> mailbox */ | ||
3803 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__mailbox = { | ||
3804 | .master = &omap44xx_l4_cfg_hwmod, | ||
3805 | .slave = &omap44xx_mailbox_hwmod, | ||
3806 | .clk = "l4_div_ck", | ||
3807 | .addr = omap44xx_mailbox_addrs, | ||
3808 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3809 | }; | ||
3810 | |||
3811 | static struct omap_hwmod_addr_space omap44xx_mcbsp1_addrs[] = { | ||
3812 | { | ||
3813 | .name = "mpu", | ||
3814 | .pa_start = 0x40122000, | ||
3815 | .pa_end = 0x401220ff, | ||
3816 | .flags = ADDR_TYPE_RT | ||
3817 | }, | ||
3818 | { } | ||
3819 | }; | ||
3820 | |||
3821 | /* l4_abe -> mcbsp1 */ | ||
3822 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1 = { | ||
3823 | .master = &omap44xx_l4_abe_hwmod, | ||
3824 | .slave = &omap44xx_mcbsp1_hwmod, | ||
3825 | .clk = "ocp_abe_iclk", | ||
3826 | .addr = omap44xx_mcbsp1_addrs, | ||
3827 | .user = OCP_USER_MPU, | ||
3828 | }; | ||
3829 | |||
3830 | static struct omap_hwmod_addr_space omap44xx_mcbsp1_dma_addrs[] = { | ||
3831 | { | ||
3832 | .name = "dma", | ||
3833 | .pa_start = 0x49022000, | ||
3834 | .pa_end = 0x490220ff, | ||
3835 | .flags = ADDR_TYPE_RT | ||
3836 | }, | ||
3837 | { } | ||
3838 | }; | ||
3839 | |||
3840 | /* l4_abe -> mcbsp1 (dma) */ | ||
3841 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1_dma = { | ||
3842 | .master = &omap44xx_l4_abe_hwmod, | ||
3843 | .slave = &omap44xx_mcbsp1_hwmod, | ||
3844 | .clk = "ocp_abe_iclk", | ||
3845 | .addr = omap44xx_mcbsp1_dma_addrs, | ||
3846 | .user = OCP_USER_SDMA, | ||
3847 | }; | ||
3848 | |||
3849 | static struct omap_hwmod_addr_space omap44xx_mcbsp2_addrs[] = { | ||
3850 | { | ||
3851 | .name = "mpu", | ||
3852 | .pa_start = 0x40124000, | ||
3853 | .pa_end = 0x401240ff, | ||
3854 | .flags = ADDR_TYPE_RT | ||
3855 | }, | ||
3856 | { } | ||
3857 | }; | ||
3858 | |||
3859 | /* l4_abe -> mcbsp2 */ | ||
3860 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2 = { | ||
3861 | .master = &omap44xx_l4_abe_hwmod, | ||
3862 | .slave = &omap44xx_mcbsp2_hwmod, | ||
3863 | .clk = "ocp_abe_iclk", | ||
3864 | .addr = omap44xx_mcbsp2_addrs, | ||
3865 | .user = OCP_USER_MPU, | ||
3866 | }; | ||
3867 | |||
3868 | static struct omap_hwmod_addr_space omap44xx_mcbsp2_dma_addrs[] = { | ||
3869 | { | ||
3870 | .name = "dma", | ||
3871 | .pa_start = 0x49024000, | ||
3872 | .pa_end = 0x490240ff, | ||
3873 | .flags = ADDR_TYPE_RT | ||
3874 | }, | ||
3875 | { } | ||
3876 | }; | ||
3877 | |||
3878 | /* l4_abe -> mcbsp2 (dma) */ | ||
3879 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2_dma = { | ||
3880 | .master = &omap44xx_l4_abe_hwmod, | ||
3881 | .slave = &omap44xx_mcbsp2_hwmod, | ||
3882 | .clk = "ocp_abe_iclk", | ||
3883 | .addr = omap44xx_mcbsp2_dma_addrs, | ||
3884 | .user = OCP_USER_SDMA, | ||
3885 | }; | ||
3886 | |||
3887 | static struct omap_hwmod_addr_space omap44xx_mcbsp3_addrs[] = { | ||
3888 | { | ||
3889 | .name = "mpu", | ||
3890 | .pa_start = 0x40126000, | ||
3891 | .pa_end = 0x401260ff, | ||
3892 | .flags = ADDR_TYPE_RT | ||
3893 | }, | ||
3894 | { } | ||
3895 | }; | ||
3896 | |||
3897 | /* l4_abe -> mcbsp3 */ | ||
3898 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3 = { | ||
3899 | .master = &omap44xx_l4_abe_hwmod, | ||
3900 | .slave = &omap44xx_mcbsp3_hwmod, | ||
3901 | .clk = "ocp_abe_iclk", | ||
3902 | .addr = omap44xx_mcbsp3_addrs, | ||
3903 | .user = OCP_USER_MPU, | ||
3904 | }; | ||
3905 | |||
3906 | static struct omap_hwmod_addr_space omap44xx_mcbsp3_dma_addrs[] = { | ||
3907 | { | ||
3908 | .name = "dma", | ||
3909 | .pa_start = 0x49026000, | ||
3910 | .pa_end = 0x490260ff, | ||
3911 | .flags = ADDR_TYPE_RT | ||
3912 | }, | ||
3913 | { } | ||
3914 | }; | ||
3915 | |||
3916 | /* l4_abe -> mcbsp3 (dma) */ | ||
3917 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3_dma = { | ||
3918 | .master = &omap44xx_l4_abe_hwmod, | ||
3919 | .slave = &omap44xx_mcbsp3_hwmod, | ||
3920 | .clk = "ocp_abe_iclk", | ||
3921 | .addr = omap44xx_mcbsp3_dma_addrs, | ||
3922 | .user = OCP_USER_SDMA, | ||
3923 | }; | ||
3924 | |||
3925 | static struct omap_hwmod_addr_space omap44xx_mcbsp4_addrs[] = { | ||
3926 | { | ||
3927 | .pa_start = 0x48096000, | ||
3928 | .pa_end = 0x480960ff, | ||
3929 | .flags = ADDR_TYPE_RT | ||
3930 | }, | ||
3931 | { } | ||
3932 | }; | ||
3933 | |||
3934 | /* l4_per -> mcbsp4 */ | ||
3935 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mcbsp4 = { | ||
3936 | .master = &omap44xx_l4_per_hwmod, | ||
3937 | .slave = &omap44xx_mcbsp4_hwmod, | ||
3938 | .clk = "l4_div_ck", | ||
3939 | .addr = omap44xx_mcbsp4_addrs, | ||
3940 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3941 | }; | ||
3942 | |||
3943 | static struct omap_hwmod_addr_space omap44xx_mcpdm_addrs[] = { | ||
3944 | { | ||
3945 | .pa_start = 0x40132000, | ||
3946 | .pa_end = 0x4013207f, | ||
3947 | .flags = ADDR_TYPE_RT | ||
3948 | }, | ||
3949 | { } | ||
3950 | }; | ||
3951 | |||
3952 | /* l4_abe -> mcpdm */ | ||
3953 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm = { | ||
3954 | .master = &omap44xx_l4_abe_hwmod, | ||
3955 | .slave = &omap44xx_mcpdm_hwmod, | ||
3956 | .clk = "ocp_abe_iclk", | ||
3957 | .addr = omap44xx_mcpdm_addrs, | ||
3958 | .user = OCP_USER_MPU, | ||
3959 | }; | ||
3960 | |||
3961 | static struct omap_hwmod_addr_space omap44xx_mcpdm_dma_addrs[] = { | ||
3962 | { | ||
3963 | .pa_start = 0x49032000, | ||
3964 | .pa_end = 0x4903207f, | ||
3965 | .flags = ADDR_TYPE_RT | ||
3966 | }, | ||
3967 | { } | ||
3968 | }; | ||
3969 | |||
3970 | /* l4_abe -> mcpdm (dma) */ | ||
3971 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm_dma = { | ||
3972 | .master = &omap44xx_l4_abe_hwmod, | ||
3973 | .slave = &omap44xx_mcpdm_hwmod, | ||
3974 | .clk = "ocp_abe_iclk", | ||
3975 | .addr = omap44xx_mcpdm_dma_addrs, | ||
3976 | .user = OCP_USER_SDMA, | ||
3977 | }; | ||
3978 | |||
3979 | static struct omap_hwmod_addr_space omap44xx_mcspi1_addrs[] = { | ||
3980 | { | ||
3981 | .pa_start = 0x48098000, | ||
3982 | .pa_end = 0x480981ff, | ||
3983 | .flags = ADDR_TYPE_RT | ||
3984 | }, | ||
3985 | { } | ||
3986 | }; | ||
3987 | |||
3988 | /* l4_per -> mcspi1 */ | ||
3989 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi1 = { | ||
3990 | .master = &omap44xx_l4_per_hwmod, | ||
3991 | .slave = &omap44xx_mcspi1_hwmod, | ||
3992 | .clk = "l4_div_ck", | ||
3993 | .addr = omap44xx_mcspi1_addrs, | ||
3994 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3995 | }; | ||
3996 | |||
3997 | static struct omap_hwmod_addr_space omap44xx_mcspi2_addrs[] = { | ||
3998 | { | ||
3999 | .pa_start = 0x4809a000, | ||
4000 | .pa_end = 0x4809a1ff, | ||
4001 | .flags = ADDR_TYPE_RT | ||
4002 | }, | ||
4003 | { } | ||
4004 | }; | ||
4005 | |||
4006 | /* l4_per -> mcspi2 */ | ||
4007 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi2 = { | ||
4008 | .master = &omap44xx_l4_per_hwmod, | ||
4009 | .slave = &omap44xx_mcspi2_hwmod, | ||
4010 | .clk = "l4_div_ck", | ||
4011 | .addr = omap44xx_mcspi2_addrs, | ||
4012 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4013 | }; | ||
4014 | |||
4015 | static struct omap_hwmod_addr_space omap44xx_mcspi3_addrs[] = { | ||
4016 | { | ||
4017 | .pa_start = 0x480b8000, | ||
4018 | .pa_end = 0x480b81ff, | ||
4019 | .flags = ADDR_TYPE_RT | ||
4020 | }, | ||
4021 | { } | ||
4022 | }; | ||
4023 | |||
4024 | /* l4_per -> mcspi3 */ | ||
4025 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi3 = { | ||
4026 | .master = &omap44xx_l4_per_hwmod, | ||
4027 | .slave = &omap44xx_mcspi3_hwmod, | ||
4028 | .clk = "l4_div_ck", | ||
4029 | .addr = omap44xx_mcspi3_addrs, | ||
4030 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4031 | }; | ||
4032 | |||
4033 | static struct omap_hwmod_addr_space omap44xx_mcspi4_addrs[] = { | ||
4034 | { | ||
4035 | .pa_start = 0x480ba000, | ||
4036 | .pa_end = 0x480ba1ff, | ||
4037 | .flags = ADDR_TYPE_RT | ||
4038 | }, | ||
4039 | { } | ||
4040 | }; | ||
4041 | |||
4042 | /* l4_per -> mcspi4 */ | ||
4043 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi4 = { | ||
4044 | .master = &omap44xx_l4_per_hwmod, | ||
4045 | .slave = &omap44xx_mcspi4_hwmod, | ||
4046 | .clk = "l4_div_ck", | ||
4047 | .addr = omap44xx_mcspi4_addrs, | ||
4048 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4049 | }; | ||
4050 | |||
4051 | static struct omap_hwmod_addr_space omap44xx_mmc1_addrs[] = { | ||
4052 | { | ||
4053 | .pa_start = 0x4809c000, | ||
4054 | .pa_end = 0x4809c3ff, | ||
4055 | .flags = ADDR_TYPE_RT | ||
4056 | }, | ||
4057 | { } | ||
4058 | }; | ||
4059 | |||
4060 | /* l4_per -> mmc1 */ | ||
4061 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc1 = { | ||
4062 | .master = &omap44xx_l4_per_hwmod, | ||
4063 | .slave = &omap44xx_mmc1_hwmod, | ||
4064 | .clk = "l4_div_ck", | ||
4065 | .addr = omap44xx_mmc1_addrs, | ||
4066 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4067 | }; | ||
4068 | |||
4069 | static struct omap_hwmod_addr_space omap44xx_mmc2_addrs[] = { | ||
4070 | { | ||
4071 | .pa_start = 0x480b4000, | ||
4072 | .pa_end = 0x480b43ff, | ||
4073 | .flags = ADDR_TYPE_RT | ||
4074 | }, | ||
4075 | { } | ||
4076 | }; | ||
4077 | |||
4078 | /* l4_per -> mmc2 */ | ||
4079 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc2 = { | ||
4080 | .master = &omap44xx_l4_per_hwmod, | ||
4081 | .slave = &omap44xx_mmc2_hwmod, | ||
4082 | .clk = "l4_div_ck", | ||
4083 | .addr = omap44xx_mmc2_addrs, | ||
4084 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4085 | }; | ||
4086 | |||
4087 | static struct omap_hwmod_addr_space omap44xx_mmc3_addrs[] = { | ||
4088 | { | ||
4089 | .pa_start = 0x480ad000, | ||
4090 | .pa_end = 0x480ad3ff, | ||
4091 | .flags = ADDR_TYPE_RT | ||
4092 | }, | ||
4093 | { } | ||
4094 | }; | ||
4095 | |||
4096 | /* l4_per -> mmc3 */ | ||
4097 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc3 = { | ||
4098 | .master = &omap44xx_l4_per_hwmod, | ||
4099 | .slave = &omap44xx_mmc3_hwmod, | ||
4100 | .clk = "l4_div_ck", | ||
4101 | .addr = omap44xx_mmc3_addrs, | ||
4102 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4103 | }; | ||
4104 | |||
4105 | static struct omap_hwmod_addr_space omap44xx_mmc4_addrs[] = { | ||
4106 | { | ||
4107 | .pa_start = 0x480d1000, | ||
4108 | .pa_end = 0x480d13ff, | ||
4109 | .flags = ADDR_TYPE_RT | ||
4110 | }, | ||
4111 | { } | ||
4112 | }; | ||
4113 | |||
4114 | /* l4_per -> mmc4 */ | ||
4115 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc4 = { | ||
4116 | .master = &omap44xx_l4_per_hwmod, | ||
4117 | .slave = &omap44xx_mmc4_hwmod, | ||
4118 | .clk = "l4_div_ck", | ||
4119 | .addr = omap44xx_mmc4_addrs, | ||
4120 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4121 | }; | ||
4122 | |||
4123 | static struct omap_hwmod_addr_space omap44xx_mmc5_addrs[] = { | ||
4124 | { | ||
4125 | .pa_start = 0x480d5000, | ||
4126 | .pa_end = 0x480d53ff, | ||
4127 | .flags = ADDR_TYPE_RT | ||
4128 | }, | ||
4129 | { } | ||
4130 | }; | ||
4131 | |||
4132 | /* l4_per -> mmc5 */ | ||
4133 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc5 = { | ||
4134 | .master = &omap44xx_l4_per_hwmod, | ||
4135 | .slave = &omap44xx_mmc5_hwmod, | ||
4136 | .clk = "l4_div_ck", | ||
4137 | .addr = omap44xx_mmc5_addrs, | ||
4138 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4139 | }; | ||
4140 | |||
4141 | static struct omap_hwmod_addr_space omap44xx_smartreflex_core_addrs[] = { | ||
4142 | { | ||
4143 | .pa_start = 0x4a0dd000, | ||
4144 | .pa_end = 0x4a0dd03f, | ||
4145 | .flags = ADDR_TYPE_RT | ||
4146 | }, | ||
4147 | { } | ||
4148 | }; | ||
4149 | |||
4150 | /* l4_cfg -> smartreflex_core */ | ||
4151 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_core = { | ||
4152 | .master = &omap44xx_l4_cfg_hwmod, | ||
4153 | .slave = &omap44xx_smartreflex_core_hwmod, | ||
4154 | .clk = "l4_div_ck", | ||
4155 | .addr = omap44xx_smartreflex_core_addrs, | ||
4156 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4157 | }; | ||
4158 | |||
4159 | static struct omap_hwmod_addr_space omap44xx_smartreflex_iva_addrs[] = { | ||
4160 | { | ||
4161 | .pa_start = 0x4a0db000, | ||
4162 | .pa_end = 0x4a0db03f, | ||
4163 | .flags = ADDR_TYPE_RT | ||
4164 | }, | ||
4165 | { } | ||
4166 | }; | ||
4167 | |||
4168 | /* l4_cfg -> smartreflex_iva */ | ||
4169 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_iva = { | ||
4170 | .master = &omap44xx_l4_cfg_hwmod, | ||
4171 | .slave = &omap44xx_smartreflex_iva_hwmod, | ||
4172 | .clk = "l4_div_ck", | ||
4173 | .addr = omap44xx_smartreflex_iva_addrs, | ||
4174 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4175 | }; | ||
4176 | |||
4177 | static struct omap_hwmod_addr_space omap44xx_smartreflex_mpu_addrs[] = { | ||
4178 | { | ||
4179 | .pa_start = 0x4a0d9000, | ||
4180 | .pa_end = 0x4a0d903f, | ||
4181 | .flags = ADDR_TYPE_RT | ||
4182 | }, | ||
4183 | { } | ||
4184 | }; | ||
4185 | |||
4186 | /* l4_cfg -> smartreflex_mpu */ | ||
4187 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_mpu = { | ||
4188 | .master = &omap44xx_l4_cfg_hwmod, | ||
4189 | .slave = &omap44xx_smartreflex_mpu_hwmod, | ||
4190 | .clk = "l4_div_ck", | ||
4191 | .addr = omap44xx_smartreflex_mpu_addrs, | ||
4192 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4193 | }; | ||
4194 | |||
4195 | static struct omap_hwmod_addr_space omap44xx_spinlock_addrs[] = { | ||
4196 | { | ||
4197 | .pa_start = 0x4a0f6000, | ||
4198 | .pa_end = 0x4a0f6fff, | ||
4199 | .flags = ADDR_TYPE_RT | ||
4200 | }, | ||
4201 | { } | ||
4202 | }; | ||
4203 | |||
4204 | /* l4_cfg -> spinlock */ | ||
4205 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__spinlock = { | ||
4206 | .master = &omap44xx_l4_cfg_hwmod, | ||
4207 | .slave = &omap44xx_spinlock_hwmod, | ||
4208 | .clk = "l4_div_ck", | ||
4209 | .addr = omap44xx_spinlock_addrs, | ||
4210 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4211 | }; | ||
4212 | |||
4213 | static struct omap_hwmod_addr_space omap44xx_timer1_addrs[] = { | ||
4214 | { | ||
4215 | .pa_start = 0x4a318000, | ||
4216 | .pa_end = 0x4a31807f, | ||
4217 | .flags = ADDR_TYPE_RT | ||
4218 | }, | ||
4219 | { } | ||
4220 | }; | ||
4221 | |||
4222 | /* l4_wkup -> timer1 */ | ||
4223 | static struct omap_hwmod_ocp_if omap44xx_l4_wkup__timer1 = { | ||
4224 | .master = &omap44xx_l4_wkup_hwmod, | ||
4225 | .slave = &omap44xx_timer1_hwmod, | ||
4226 | .clk = "l4_wkup_clk_mux_ck", | ||
4227 | .addr = omap44xx_timer1_addrs, | ||
4228 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4229 | }; | ||
4230 | |||
4231 | static struct omap_hwmod_addr_space omap44xx_timer2_addrs[] = { | ||
4232 | { | ||
4233 | .pa_start = 0x48032000, | ||
4234 | .pa_end = 0x4803207f, | ||
4235 | .flags = ADDR_TYPE_RT | ||
4236 | }, | ||
4237 | { } | ||
4238 | }; | ||
4239 | |||
4240 | /* l4_per -> timer2 */ | ||
4241 | static struct omap_hwmod_ocp_if omap44xx_l4_per__timer2 = { | ||
4242 | .master = &omap44xx_l4_per_hwmod, | ||
4243 | .slave = &omap44xx_timer2_hwmod, | ||
4244 | .clk = "l4_div_ck", | ||
4245 | .addr = omap44xx_timer2_addrs, | ||
4246 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4247 | }; | ||
4248 | |||
4249 | static struct omap_hwmod_addr_space omap44xx_timer3_addrs[] = { | ||
4250 | { | ||
4251 | .pa_start = 0x48034000, | ||
4252 | .pa_end = 0x4803407f, | ||
4253 | .flags = ADDR_TYPE_RT | ||
4254 | }, | ||
4255 | { } | ||
4256 | }; | ||
4257 | |||
4258 | /* l4_per -> timer3 */ | ||
4259 | static struct omap_hwmod_ocp_if omap44xx_l4_per__timer3 = { | ||
4260 | .master = &omap44xx_l4_per_hwmod, | ||
4261 | .slave = &omap44xx_timer3_hwmod, | ||
4262 | .clk = "l4_div_ck", | ||
4263 | .addr = omap44xx_timer3_addrs, | ||
4264 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4265 | }; | ||
4266 | |||
4267 | static struct omap_hwmod_addr_space omap44xx_timer4_addrs[] = { | ||
4268 | { | ||
4269 | .pa_start = 0x48036000, | ||
4270 | .pa_end = 0x4803607f, | ||
4271 | .flags = ADDR_TYPE_RT | ||
4272 | }, | ||
4273 | { } | ||
4274 | }; | ||
4275 | |||
4276 | /* l4_per -> timer4 */ | ||
4277 | static struct omap_hwmod_ocp_if omap44xx_l4_per__timer4 = { | ||
4278 | .master = &omap44xx_l4_per_hwmod, | ||
4279 | .slave = &omap44xx_timer4_hwmod, | ||
4280 | .clk = "l4_div_ck", | ||
4281 | .addr = omap44xx_timer4_addrs, | ||
4282 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4283 | }; | ||
4284 | |||
4285 | static struct omap_hwmod_addr_space omap44xx_timer5_addrs[] = { | ||
4286 | { | ||
4287 | .pa_start = 0x40138000, | ||
4288 | .pa_end = 0x4013807f, | ||
4289 | .flags = ADDR_TYPE_RT | ||
4290 | }, | ||
4291 | { } | ||
4292 | }; | ||
4293 | |||
4294 | /* l4_abe -> timer5 */ | ||
4295 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5 = { | ||
4296 | .master = &omap44xx_l4_abe_hwmod, | ||
4297 | .slave = &omap44xx_timer5_hwmod, | ||
4298 | .clk = "ocp_abe_iclk", | ||
4299 | .addr = omap44xx_timer5_addrs, | ||
4300 | .user = OCP_USER_MPU, | ||
4301 | }; | ||
4302 | |||
4303 | static struct omap_hwmod_addr_space omap44xx_timer5_dma_addrs[] = { | ||
4304 | { | ||
4305 | .pa_start = 0x49038000, | ||
4306 | .pa_end = 0x4903807f, | ||
4307 | .flags = ADDR_TYPE_RT | ||
4308 | }, | ||
4309 | { } | ||
4310 | }; | ||
4311 | |||
4312 | /* l4_abe -> timer5 (dma) */ | ||
4313 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5_dma = { | ||
4314 | .master = &omap44xx_l4_abe_hwmod, | ||
4315 | .slave = &omap44xx_timer5_hwmod, | ||
4316 | .clk = "ocp_abe_iclk", | ||
4317 | .addr = omap44xx_timer5_dma_addrs, | ||
4318 | .user = OCP_USER_SDMA, | ||
4319 | }; | ||
4320 | |||
4321 | static struct omap_hwmod_addr_space omap44xx_timer6_addrs[] = { | ||
4322 | { | ||
4323 | .pa_start = 0x4013a000, | ||
4324 | .pa_end = 0x4013a07f, | ||
4325 | .flags = ADDR_TYPE_RT | ||
4326 | }, | ||
4327 | { } | ||
4328 | }; | ||
4329 | |||
4330 | /* l4_abe -> timer6 */ | ||
4331 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6 = { | ||
4332 | .master = &omap44xx_l4_abe_hwmod, | ||
4333 | .slave = &omap44xx_timer6_hwmod, | ||
4334 | .clk = "ocp_abe_iclk", | ||
4335 | .addr = omap44xx_timer6_addrs, | ||
4336 | .user = OCP_USER_MPU, | ||
4337 | }; | ||
4338 | |||
4339 | static struct omap_hwmod_addr_space omap44xx_timer6_dma_addrs[] = { | ||
4340 | { | ||
4341 | .pa_start = 0x4903a000, | ||
4342 | .pa_end = 0x4903a07f, | ||
4343 | .flags = ADDR_TYPE_RT | ||
4344 | }, | ||
4345 | { } | ||
4346 | }; | ||
4347 | |||
4348 | /* l4_abe -> timer6 (dma) */ | ||
4349 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6_dma = { | ||
4350 | .master = &omap44xx_l4_abe_hwmod, | ||
4351 | .slave = &omap44xx_timer6_hwmod, | ||
4352 | .clk = "ocp_abe_iclk", | ||
4353 | .addr = omap44xx_timer6_dma_addrs, | ||
4354 | .user = OCP_USER_SDMA, | ||
4355 | }; | ||
4356 | |||
4357 | static struct omap_hwmod_addr_space omap44xx_timer7_addrs[] = { | ||
4358 | { | ||
4359 | .pa_start = 0x4013c000, | ||
4360 | .pa_end = 0x4013c07f, | ||
4361 | .flags = ADDR_TYPE_RT | ||
4362 | }, | ||
4363 | { } | ||
4364 | }; | ||
4365 | |||
4366 | /* l4_abe -> timer7 */ | ||
4367 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7 = { | ||
4368 | .master = &omap44xx_l4_abe_hwmod, | ||
4369 | .slave = &omap44xx_timer7_hwmod, | ||
4370 | .clk = "ocp_abe_iclk", | ||
4371 | .addr = omap44xx_timer7_addrs, | ||
4372 | .user = OCP_USER_MPU, | ||
4373 | }; | ||
4374 | |||
4375 | static struct omap_hwmod_addr_space omap44xx_timer7_dma_addrs[] = { | ||
4376 | { | ||
4377 | .pa_start = 0x4903c000, | ||
4378 | .pa_end = 0x4903c07f, | ||
4379 | .flags = ADDR_TYPE_RT | ||
4380 | }, | ||
4381 | { } | ||
4382 | }; | ||
4383 | |||
4384 | /* l4_abe -> timer7 (dma) */ | ||
4385 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7_dma = { | ||
4386 | .master = &omap44xx_l4_abe_hwmod, | ||
4387 | .slave = &omap44xx_timer7_hwmod, | ||
4388 | .clk = "ocp_abe_iclk", | ||
4389 | .addr = omap44xx_timer7_dma_addrs, | ||
4390 | .user = OCP_USER_SDMA, | ||
4391 | }; | ||
4392 | |||
4393 | static struct omap_hwmod_addr_space omap44xx_timer8_addrs[] = { | ||
4394 | { | ||
4395 | .pa_start = 0x4013e000, | ||
4396 | .pa_end = 0x4013e07f, | ||
4397 | .flags = ADDR_TYPE_RT | ||
4398 | }, | ||
4399 | { } | ||
4400 | }; | ||
4401 | |||
4402 | /* l4_abe -> timer8 */ | ||
4403 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8 = { | ||
4404 | .master = &omap44xx_l4_abe_hwmod, | ||
4405 | .slave = &omap44xx_timer8_hwmod, | ||
4406 | .clk = "ocp_abe_iclk", | ||
4407 | .addr = omap44xx_timer8_addrs, | ||
4408 | .user = OCP_USER_MPU, | ||
4409 | }; | ||
4410 | |||
4411 | static struct omap_hwmod_addr_space omap44xx_timer8_dma_addrs[] = { | ||
4412 | { | ||
4413 | .pa_start = 0x4903e000, | ||
4414 | .pa_end = 0x4903e07f, | ||
4415 | .flags = ADDR_TYPE_RT | ||
4416 | }, | ||
4417 | { } | ||
4418 | }; | ||
4419 | |||
4420 | /* l4_abe -> timer8 (dma) */ | ||
4421 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8_dma = { | ||
4422 | .master = &omap44xx_l4_abe_hwmod, | ||
4423 | .slave = &omap44xx_timer8_hwmod, | ||
4424 | .clk = "ocp_abe_iclk", | ||
4425 | .addr = omap44xx_timer8_dma_addrs, | ||
4426 | .user = OCP_USER_SDMA, | ||
4427 | }; | ||
4428 | |||
4429 | static struct omap_hwmod_addr_space omap44xx_timer9_addrs[] = { | ||
4430 | { | ||
4431 | .pa_start = 0x4803e000, | ||
4432 | .pa_end = 0x4803e07f, | ||
4433 | .flags = ADDR_TYPE_RT | ||
4434 | }, | ||
4435 | { } | ||
4436 | }; | ||
4437 | |||
4438 | /* l4_per -> timer9 */ | ||
4439 | static struct omap_hwmod_ocp_if omap44xx_l4_per__timer9 = { | ||
4440 | .master = &omap44xx_l4_per_hwmod, | ||
4441 | .slave = &omap44xx_timer9_hwmod, | ||
4442 | .clk = "l4_div_ck", | ||
4443 | .addr = omap44xx_timer9_addrs, | ||
4444 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4445 | }; | ||
4446 | |||
4447 | static struct omap_hwmod_addr_space omap44xx_timer10_addrs[] = { | ||
4448 | { | ||
4449 | .pa_start = 0x48086000, | ||
4450 | .pa_end = 0x4808607f, | ||
4451 | .flags = ADDR_TYPE_RT | ||
4452 | }, | ||
4453 | { } | ||
4454 | }; | ||
4455 | |||
4456 | /* l4_per -> timer10 */ | ||
4457 | static struct omap_hwmod_ocp_if omap44xx_l4_per__timer10 = { | ||
4458 | .master = &omap44xx_l4_per_hwmod, | ||
4459 | .slave = &omap44xx_timer10_hwmod, | ||
4460 | .clk = "l4_div_ck", | ||
4461 | .addr = omap44xx_timer10_addrs, | ||
4462 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4463 | }; | ||
4464 | |||
4465 | static struct omap_hwmod_addr_space omap44xx_timer11_addrs[] = { | ||
4466 | { | ||
4467 | .pa_start = 0x48088000, | ||
4468 | .pa_end = 0x4808807f, | ||
4469 | .flags = ADDR_TYPE_RT | ||
4470 | }, | ||
4471 | { } | ||
4472 | }; | ||
4473 | |||
4474 | /* l4_per -> timer11 */ | ||
4475 | static struct omap_hwmod_ocp_if omap44xx_l4_per__timer11 = { | ||
4476 | .master = &omap44xx_l4_per_hwmod, | ||
4477 | .slave = &omap44xx_timer11_hwmod, | ||
4478 | .clk = "l4_div_ck", | ||
4479 | .addr = omap44xx_timer11_addrs, | ||
4480 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4481 | }; | ||
4482 | |||
4483 | static struct omap_hwmod_addr_space omap44xx_uart1_addrs[] = { | ||
4484 | { | ||
4485 | .pa_start = 0x4806a000, | ||
4486 | .pa_end = 0x4806a0ff, | ||
4487 | .flags = ADDR_TYPE_RT | ||
4488 | }, | ||
4489 | { } | ||
4490 | }; | ||
4491 | |||
4492 | /* l4_per -> uart1 */ | ||
4493 | static struct omap_hwmod_ocp_if omap44xx_l4_per__uart1 = { | ||
4494 | .master = &omap44xx_l4_per_hwmod, | ||
4495 | .slave = &omap44xx_uart1_hwmod, | ||
4496 | .clk = "l4_div_ck", | ||
4497 | .addr = omap44xx_uart1_addrs, | ||
4498 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4499 | }; | ||
4500 | |||
4501 | static struct omap_hwmod_addr_space omap44xx_uart2_addrs[] = { | ||
4502 | { | ||
4503 | .pa_start = 0x4806c000, | ||
4504 | .pa_end = 0x4806c0ff, | ||
4505 | .flags = ADDR_TYPE_RT | ||
4506 | }, | ||
4507 | { } | ||
4508 | }; | ||
4509 | |||
4510 | /* l4_per -> uart2 */ | ||
4511 | static struct omap_hwmod_ocp_if omap44xx_l4_per__uart2 = { | ||
4512 | .master = &omap44xx_l4_per_hwmod, | ||
4513 | .slave = &omap44xx_uart2_hwmod, | ||
4514 | .clk = "l4_div_ck", | ||
4515 | .addr = omap44xx_uart2_addrs, | ||
4516 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4517 | }; | ||
4518 | |||
4519 | static struct omap_hwmod_addr_space omap44xx_uart3_addrs[] = { | ||
4520 | { | ||
4521 | .pa_start = 0x48020000, | ||
4522 | .pa_end = 0x480200ff, | ||
4523 | .flags = ADDR_TYPE_RT | ||
4524 | }, | ||
4525 | { } | ||
4526 | }; | ||
4527 | |||
4528 | /* l4_per -> uart3 */ | ||
4529 | static struct omap_hwmod_ocp_if omap44xx_l4_per__uart3 = { | ||
4530 | .master = &omap44xx_l4_per_hwmod, | ||
4531 | .slave = &omap44xx_uart3_hwmod, | ||
4532 | .clk = "l4_div_ck", | ||
4533 | .addr = omap44xx_uart3_addrs, | ||
4534 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4535 | }; | ||
4536 | |||
4537 | static struct omap_hwmod_addr_space omap44xx_uart4_addrs[] = { | ||
4538 | { | ||
4539 | .pa_start = 0x4806e000, | ||
4540 | .pa_end = 0x4806e0ff, | ||
4541 | .flags = ADDR_TYPE_RT | ||
4542 | }, | ||
4543 | { } | ||
4544 | }; | ||
4545 | |||
4546 | /* l4_per -> uart4 */ | ||
4547 | static struct omap_hwmod_ocp_if omap44xx_l4_per__uart4 = { | ||
4548 | .master = &omap44xx_l4_per_hwmod, | ||
4549 | .slave = &omap44xx_uart4_hwmod, | ||
4550 | .clk = "l4_div_ck", | ||
4551 | .addr = omap44xx_uart4_addrs, | ||
4552 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
5363 | }; | 4553 | }; |
5364 | 4554 | ||
5365 | static struct omap_hwmod_addr_space omap44xx_usb_host_hs_addrs[] = { | 4555 | static struct omap_hwmod_addr_space omap44xx_usb_host_hs_addrs[] = { |
@@ -5382,12 +4572,7 @@ static struct omap_hwmod_addr_space omap44xx_usb_host_hs_addrs[] = { | |||
5382 | {} | 4572 | {} |
5383 | }; | 4573 | }; |
5384 | 4574 | ||
5385 | static struct omap_hwmod_irq_info omap44xx_usb_host_hs_irqs[] = { | 4575 | /* l4_cfg -> usb_host_hs */ |
5386 | { .name = "ohci-irq", .irq = 76 + OMAP44XX_IRQ_GIC_START }, | ||
5387 | { .name = "ehci-irq", .irq = 77 + OMAP44XX_IRQ_GIC_START }, | ||
5388 | { .irq = -1 } | ||
5389 | }; | ||
5390 | |||
5391 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_host_hs = { | 4576 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_host_hs = { |
5392 | .master = &omap44xx_l4_cfg_hwmod, | 4577 | .master = &omap44xx_l4_cfg_hwmod, |
5393 | .slave = &omap44xx_usb_host_hs_hwmod, | 4578 | .slave = &omap44xx_usb_host_hs_hwmod, |
@@ -5396,100 +4581,22 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_host_hs = { | |||
5396 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 4581 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
5397 | }; | 4582 | }; |
5398 | 4583 | ||
5399 | static struct omap_hwmod_ocp_if *omap44xx_usb_host_hs_slaves[] = { | 4584 | static struct omap_hwmod_addr_space omap44xx_usb_otg_hs_addrs[] = { |
5400 | &omap44xx_l4_cfg__usb_host_hs, | 4585 | { |
5401 | }; | 4586 | .pa_start = 0x4a0ab000, |
5402 | 4587 | .pa_end = 0x4a0ab003, | |
5403 | static struct omap_hwmod omap44xx_usb_host_hs_hwmod = { | 4588 | .flags = ADDR_TYPE_RT |
5404 | .name = "usb_host_hs", | ||
5405 | .class = &omap44xx_usb_host_hs_hwmod_class, | ||
5406 | .clkdm_name = "l3_init_clkdm", | ||
5407 | .main_clk = "usb_host_hs_fck", | ||
5408 | .prcm = { | ||
5409 | .omap4 = { | ||
5410 | .clkctrl_offs = OMAP4_CM_L3INIT_USB_HOST_CLKCTRL_OFFSET, | ||
5411 | .context_offs = OMAP4_RM_L3INIT_USB_HOST_CONTEXT_OFFSET, | ||
5412 | .modulemode = MODULEMODE_SWCTRL, | ||
5413 | }, | ||
5414 | }, | 4589 | }, |
5415 | .mpu_irqs = omap44xx_usb_host_hs_irqs, | 4590 | { } |
5416 | .slaves = omap44xx_usb_host_hs_slaves, | ||
5417 | .slaves_cnt = ARRAY_SIZE(omap44xx_usb_host_hs_slaves), | ||
5418 | .masters = omap44xx_usb_host_hs_masters, | ||
5419 | .masters_cnt = ARRAY_SIZE(omap44xx_usb_host_hs_masters), | ||
5420 | |||
5421 | /* | ||
5422 | * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock | ||
5423 | * id: i660 | ||
5424 | * | ||
5425 | * Description: | ||
5426 | * In the following configuration : | ||
5427 | * - USBHOST module is set to smart-idle mode | ||
5428 | * - PRCM asserts idle_req to the USBHOST module ( This typically | ||
5429 | * happens when the system is going to a low power mode : all ports | ||
5430 | * have been suspended, the master part of the USBHOST module has | ||
5431 | * entered the standby state, and SW has cut the functional clocks) | ||
5432 | * - an USBHOST interrupt occurs before the module is able to answer | ||
5433 | * idle_ack, typically a remote wakeup IRQ. | ||
5434 | * Then the USB HOST module will enter a deadlock situation where it | ||
5435 | * is no more accessible nor functional. | ||
5436 | * | ||
5437 | * Workaround: | ||
5438 | * Don't use smart idle; use only force idle, hence HWMOD_SWSUP_SIDLE | ||
5439 | */ | ||
5440 | |||
5441 | /* | ||
5442 | * Errata: USB host EHCI may stall when entering smart-standby mode | ||
5443 | * Id: i571 | ||
5444 | * | ||
5445 | * Description: | ||
5446 | * When the USBHOST module is set to smart-standby mode, and when it is | ||
5447 | * ready to enter the standby state (i.e. all ports are suspended and | ||
5448 | * all attached devices are in suspend mode), then it can wrongly assert | ||
5449 | * the Mstandby signal too early while there are still some residual OCP | ||
5450 | * transactions ongoing. If this condition occurs, the internal state | ||
5451 | * machine may go to an undefined state and the USB link may be stuck | ||
5452 | * upon the next resume. | ||
5453 | * | ||
5454 | * Workaround: | ||
5455 | * Don't use smart standby; use only force standby, | ||
5456 | * hence HWMOD_SWSUP_MSTANDBY | ||
5457 | */ | ||
5458 | |||
5459 | /* | ||
5460 | * During system boot; If the hwmod framework resets the module | ||
5461 | * the module will have smart idle settings; which can lead to deadlock | ||
5462 | * (above Errata Id:i660); so, dont reset the module during boot; | ||
5463 | * Use HWMOD_INIT_NO_RESET. | ||
5464 | */ | ||
5465 | |||
5466 | .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY | | ||
5467 | HWMOD_INIT_NO_RESET, | ||
5468 | }; | ||
5469 | |||
5470 | /* | ||
5471 | * 'usb_tll_hs' class | ||
5472 | * usb_tll_hs module is the adapter on the usb_host_hs ports | ||
5473 | */ | ||
5474 | static struct omap_hwmod_class_sysconfig omap44xx_usb_tll_hs_sysc = { | ||
5475 | .rev_offs = 0x0000, | ||
5476 | .sysc_offs = 0x0010, | ||
5477 | .syss_offs = 0x0014, | ||
5478 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | | ||
5479 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
5480 | SYSC_HAS_AUTOIDLE), | ||
5481 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
5482 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
5483 | }; | ||
5484 | |||
5485 | static struct omap_hwmod_class omap44xx_usb_tll_hs_hwmod_class = { | ||
5486 | .name = "usb_tll_hs", | ||
5487 | .sysc = &omap44xx_usb_tll_hs_sysc, | ||
5488 | }; | 4591 | }; |
5489 | 4592 | ||
5490 | static struct omap_hwmod_irq_info omap44xx_usb_tll_hs_irqs[] = { | 4593 | /* l4_cfg -> usb_otg_hs */ |
5491 | { .name = "tll-irq", .irq = 78 + OMAP44XX_IRQ_GIC_START }, | 4594 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_otg_hs = { |
5492 | { .irq = -1 } | 4595 | .master = &omap44xx_l4_cfg_hwmod, |
4596 | .slave = &omap44xx_usb_otg_hs_hwmod, | ||
4597 | .clk = "l4_div_ck", | ||
4598 | .addr = omap44xx_usb_otg_hs_addrs, | ||
4599 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
5493 | }; | 4600 | }; |
5494 | 4601 | ||
5495 | static struct omap_hwmod_addr_space omap44xx_usb_tll_hs_addrs[] = { | 4602 | static struct omap_hwmod_addr_space omap44xx_usb_tll_hs_addrs[] = { |
@@ -5502,6 +4609,7 @@ static struct omap_hwmod_addr_space omap44xx_usb_tll_hs_addrs[] = { | |||
5502 | {} | 4609 | {} |
5503 | }; | 4610 | }; |
5504 | 4611 | ||
4612 | /* l4_cfg -> usb_tll_hs */ | ||
5505 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_tll_hs = { | 4613 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_tll_hs = { |
5506 | .master = &omap44xx_l4_cfg_hwmod, | 4614 | .master = &omap44xx_l4_cfg_hwmod, |
5507 | .slave = &omap44xx_usb_tll_hs_hwmod, | 4615 | .slave = &omap44xx_usb_tll_hs_hwmod, |
@@ -5510,181 +4618,184 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_tll_hs = { | |||
5510 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 4618 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
5511 | }; | 4619 | }; |
5512 | 4620 | ||
5513 | static struct omap_hwmod_ocp_if *omap44xx_usb_tll_hs_slaves[] = { | 4621 | static struct omap_hwmod_addr_space omap44xx_wd_timer2_addrs[] = { |
5514 | &omap44xx_l4_cfg__usb_tll_hs, | 4622 | { |
4623 | .pa_start = 0x4a314000, | ||
4624 | .pa_end = 0x4a31407f, | ||
4625 | .flags = ADDR_TYPE_RT | ||
4626 | }, | ||
4627 | { } | ||
5515 | }; | 4628 | }; |
5516 | 4629 | ||
5517 | static struct omap_hwmod omap44xx_usb_tll_hs_hwmod = { | 4630 | /* l4_wkup -> wd_timer2 */ |
5518 | .name = "usb_tll_hs", | 4631 | static struct omap_hwmod_ocp_if omap44xx_l4_wkup__wd_timer2 = { |
5519 | .class = &omap44xx_usb_tll_hs_hwmod_class, | 4632 | .master = &omap44xx_l4_wkup_hwmod, |
5520 | .clkdm_name = "l3_init_clkdm", | 4633 | .slave = &omap44xx_wd_timer2_hwmod, |
5521 | .main_clk = "usb_tll_hs_ick", | 4634 | .clk = "l4_wkup_clk_mux_ck", |
5522 | .prcm = { | 4635 | .addr = omap44xx_wd_timer2_addrs, |
5523 | .omap4 = { | 4636 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
5524 | .clkctrl_offs = OMAP4_CM_L3INIT_USB_TLL_CLKCTRL_OFFSET, | 4637 | }; |
5525 | .context_offs = OMAP4_RM_L3INIT_USB_TLL_CONTEXT_OFFSET, | 4638 | |
5526 | .modulemode = MODULEMODE_HWCTRL, | 4639 | static struct omap_hwmod_addr_space omap44xx_wd_timer3_addrs[] = { |
5527 | }, | 4640 | { |
4641 | .pa_start = 0x40130000, | ||
4642 | .pa_end = 0x4013007f, | ||
4643 | .flags = ADDR_TYPE_RT | ||
5528 | }, | 4644 | }, |
5529 | .mpu_irqs = omap44xx_usb_tll_hs_irqs, | 4645 | { } |
5530 | .slaves = omap44xx_usb_tll_hs_slaves, | 4646 | }; |
5531 | .slaves_cnt = ARRAY_SIZE(omap44xx_usb_tll_hs_slaves), | 4647 | |
4648 | /* l4_abe -> wd_timer3 */ | ||
4649 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3 = { | ||
4650 | .master = &omap44xx_l4_abe_hwmod, | ||
4651 | .slave = &omap44xx_wd_timer3_hwmod, | ||
4652 | .clk = "ocp_abe_iclk", | ||
4653 | .addr = omap44xx_wd_timer3_addrs, | ||
4654 | .user = OCP_USER_MPU, | ||
5532 | }; | 4655 | }; |
5533 | 4656 | ||
5534 | static __initdata struct omap_hwmod *omap44xx_hwmods[] = { | 4657 | static struct omap_hwmod_addr_space omap44xx_wd_timer3_dma_addrs[] = { |
5535 | 4658 | { | |
5536 | /* dmm class */ | 4659 | .pa_start = 0x49030000, |
5537 | &omap44xx_dmm_hwmod, | 4660 | .pa_end = 0x4903007f, |
5538 | 4661 | .flags = ADDR_TYPE_RT | |
5539 | /* emif_fw class */ | 4662 | }, |
5540 | &omap44xx_emif_fw_hwmod, | 4663 | { } |
5541 | 4664 | }; | |
5542 | /* l3 class */ | 4665 | |
5543 | &omap44xx_l3_instr_hwmod, | 4666 | /* l4_abe -> wd_timer3 (dma) */ |
5544 | &omap44xx_l3_main_1_hwmod, | 4667 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3_dma = { |
5545 | &omap44xx_l3_main_2_hwmod, | 4668 | .master = &omap44xx_l4_abe_hwmod, |
5546 | &omap44xx_l3_main_3_hwmod, | 4669 | .slave = &omap44xx_wd_timer3_hwmod, |
5547 | 4670 | .clk = "ocp_abe_iclk", | |
5548 | /* l4 class */ | 4671 | .addr = omap44xx_wd_timer3_dma_addrs, |
5549 | &omap44xx_l4_abe_hwmod, | 4672 | .user = OCP_USER_SDMA, |
5550 | &omap44xx_l4_cfg_hwmod, | 4673 | }; |
5551 | &omap44xx_l4_per_hwmod, | 4674 | |
5552 | &omap44xx_l4_wkup_hwmod, | 4675 | static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = { |
5553 | 4676 | &omap44xx_l3_main_1__dmm, | |
5554 | /* mpu_bus class */ | 4677 | &omap44xx_mpu__dmm, |
5555 | &omap44xx_mpu_private_hwmod, | 4678 | &omap44xx_dmm__emif_fw, |
5556 | 4679 | &omap44xx_l4_cfg__emif_fw, | |
5557 | /* aess class */ | 4680 | &omap44xx_iva__l3_instr, |
5558 | /* &omap44xx_aess_hwmod, */ | 4681 | &omap44xx_l3_main_3__l3_instr, |
5559 | 4682 | &omap44xx_dsp__l3_main_1, | |
5560 | /* bandgap class */ | 4683 | &omap44xx_dss__l3_main_1, |
5561 | &omap44xx_bandgap_hwmod, | 4684 | &omap44xx_l3_main_2__l3_main_1, |
5562 | 4685 | &omap44xx_l4_cfg__l3_main_1, | |
5563 | /* counter class */ | 4686 | &omap44xx_mmc1__l3_main_1, |
5564 | /* &omap44xx_counter_32k_hwmod, */ | 4687 | &omap44xx_mmc2__l3_main_1, |
5565 | 4688 | &omap44xx_mpu__l3_main_1, | |
5566 | /* dma class */ | 4689 | &omap44xx_dma_system__l3_main_2, |
5567 | &omap44xx_dma_system_hwmod, | 4690 | &omap44xx_hsi__l3_main_2, |
5568 | 4691 | &omap44xx_ipu__l3_main_2, | |
5569 | /* dmic class */ | 4692 | &omap44xx_iss__l3_main_2, |
5570 | &omap44xx_dmic_hwmod, | 4693 | &omap44xx_iva__l3_main_2, |
5571 | 4694 | &omap44xx_l3_main_1__l3_main_2, | |
5572 | /* dsp class */ | 4695 | &omap44xx_l4_cfg__l3_main_2, |
5573 | &omap44xx_dsp_hwmod, | 4696 | &omap44xx_usb_host_hs__l3_main_2, |
5574 | &omap44xx_dsp_c0_hwmod, | 4697 | &omap44xx_usb_otg_hs__l3_main_2, |
5575 | 4698 | &omap44xx_l3_main_1__l3_main_3, | |
5576 | /* dss class */ | 4699 | &omap44xx_l3_main_2__l3_main_3, |
5577 | &omap44xx_dss_hwmod, | 4700 | &omap44xx_l4_cfg__l3_main_3, |
5578 | &omap44xx_dss_dispc_hwmod, | 4701 | &omap44xx_aess__l4_abe, |
5579 | &omap44xx_dss_dsi1_hwmod, | 4702 | &omap44xx_dsp__l4_abe, |
5580 | &omap44xx_dss_dsi2_hwmod, | 4703 | &omap44xx_l3_main_1__l4_abe, |
5581 | &omap44xx_dss_hdmi_hwmod, | 4704 | &omap44xx_mpu__l4_abe, |
5582 | &omap44xx_dss_rfbi_hwmod, | 4705 | &omap44xx_l3_main_1__l4_cfg, |
5583 | &omap44xx_dss_venc_hwmod, | 4706 | &omap44xx_l3_main_2__l4_per, |
5584 | 4707 | &omap44xx_l4_cfg__l4_wkup, | |
5585 | /* gpio class */ | 4708 | &omap44xx_mpu__mpu_private, |
5586 | &omap44xx_gpio1_hwmod, | 4709 | &omap44xx_l4_abe__aess, |
5587 | &omap44xx_gpio2_hwmod, | 4710 | &omap44xx_l4_abe__aess_dma, |
5588 | &omap44xx_gpio3_hwmod, | 4711 | &omap44xx_l4_wkup__counter_32k, |
5589 | &omap44xx_gpio4_hwmod, | 4712 | &omap44xx_l4_cfg__dma_system, |
5590 | &omap44xx_gpio5_hwmod, | 4713 | &omap44xx_l4_abe__dmic, |
5591 | &omap44xx_gpio6_hwmod, | 4714 | &omap44xx_l4_abe__dmic_dma, |
5592 | 4715 | &omap44xx_dsp__iva, | |
5593 | /* hsi class */ | 4716 | &omap44xx_l4_cfg__dsp, |
5594 | /* &omap44xx_hsi_hwmod, */ | 4717 | &omap44xx_l3_main_2__dss, |
5595 | 4718 | &omap44xx_l4_per__dss, | |
5596 | /* i2c class */ | 4719 | &omap44xx_l3_main_2__dss_dispc, |
5597 | &omap44xx_i2c1_hwmod, | 4720 | &omap44xx_l4_per__dss_dispc, |
5598 | &omap44xx_i2c2_hwmod, | 4721 | &omap44xx_l3_main_2__dss_dsi1, |
5599 | &omap44xx_i2c3_hwmod, | 4722 | &omap44xx_l4_per__dss_dsi1, |
5600 | &omap44xx_i2c4_hwmod, | 4723 | &omap44xx_l3_main_2__dss_dsi2, |
5601 | 4724 | &omap44xx_l4_per__dss_dsi2, | |
5602 | /* ipu class */ | 4725 | &omap44xx_l3_main_2__dss_hdmi, |
5603 | &omap44xx_ipu_hwmod, | 4726 | &omap44xx_l4_per__dss_hdmi, |
5604 | &omap44xx_ipu_c0_hwmod, | 4727 | &omap44xx_l3_main_2__dss_rfbi, |
5605 | &omap44xx_ipu_c1_hwmod, | 4728 | &omap44xx_l4_per__dss_rfbi, |
5606 | 4729 | &omap44xx_l3_main_2__dss_venc, | |
5607 | /* iss class */ | 4730 | &omap44xx_l4_per__dss_venc, |
5608 | /* &omap44xx_iss_hwmod, */ | 4731 | &omap44xx_l4_wkup__gpio1, |
5609 | 4732 | &omap44xx_l4_per__gpio2, | |
5610 | /* iva class */ | 4733 | &omap44xx_l4_per__gpio3, |
5611 | &omap44xx_iva_hwmod, | 4734 | &omap44xx_l4_per__gpio4, |
5612 | &omap44xx_iva_seq0_hwmod, | 4735 | &omap44xx_l4_per__gpio5, |
5613 | &omap44xx_iva_seq1_hwmod, | 4736 | &omap44xx_l4_per__gpio6, |
5614 | 4737 | &omap44xx_l4_cfg__hsi, | |
5615 | /* kbd class */ | 4738 | &omap44xx_l4_per__i2c1, |
5616 | &omap44xx_kbd_hwmod, | 4739 | &omap44xx_l4_per__i2c2, |
5617 | 4740 | &omap44xx_l4_per__i2c3, | |
5618 | /* mailbox class */ | 4741 | &omap44xx_l4_per__i2c4, |
5619 | &omap44xx_mailbox_hwmod, | 4742 | &omap44xx_l3_main_2__ipu, |
5620 | 4743 | &omap44xx_l3_main_2__iss, | |
5621 | /* mcbsp class */ | 4744 | &omap44xx_l3_main_2__iva, |
5622 | &omap44xx_mcbsp1_hwmod, | 4745 | &omap44xx_l4_wkup__kbd, |
5623 | &omap44xx_mcbsp2_hwmod, | 4746 | &omap44xx_l4_cfg__mailbox, |
5624 | &omap44xx_mcbsp3_hwmod, | 4747 | &omap44xx_l4_abe__mcbsp1, |
5625 | &omap44xx_mcbsp4_hwmod, | 4748 | &omap44xx_l4_abe__mcbsp1_dma, |
5626 | 4749 | &omap44xx_l4_abe__mcbsp2, | |
5627 | /* mcpdm class */ | 4750 | &omap44xx_l4_abe__mcbsp2_dma, |
5628 | &omap44xx_mcpdm_hwmod, | 4751 | &omap44xx_l4_abe__mcbsp3, |
5629 | 4752 | &omap44xx_l4_abe__mcbsp3_dma, | |
5630 | /* mcspi class */ | 4753 | &omap44xx_l4_per__mcbsp4, |
5631 | &omap44xx_mcspi1_hwmod, | 4754 | &omap44xx_l4_abe__mcpdm, |
5632 | &omap44xx_mcspi2_hwmod, | 4755 | &omap44xx_l4_abe__mcpdm_dma, |
5633 | &omap44xx_mcspi3_hwmod, | 4756 | &omap44xx_l4_per__mcspi1, |
5634 | &omap44xx_mcspi4_hwmod, | 4757 | &omap44xx_l4_per__mcspi2, |
5635 | 4758 | &omap44xx_l4_per__mcspi3, | |
5636 | /* mmc class */ | 4759 | &omap44xx_l4_per__mcspi4, |
5637 | &omap44xx_mmc1_hwmod, | 4760 | &omap44xx_l4_per__mmc1, |
5638 | &omap44xx_mmc2_hwmod, | 4761 | &omap44xx_l4_per__mmc2, |
5639 | &omap44xx_mmc3_hwmod, | 4762 | &omap44xx_l4_per__mmc3, |
5640 | &omap44xx_mmc4_hwmod, | 4763 | &omap44xx_l4_per__mmc4, |
5641 | &omap44xx_mmc5_hwmod, | 4764 | &omap44xx_l4_per__mmc5, |
5642 | 4765 | &omap44xx_l4_cfg__smartreflex_core, | |
5643 | /* mpu class */ | 4766 | &omap44xx_l4_cfg__smartreflex_iva, |
5644 | &omap44xx_mpu_hwmod, | 4767 | &omap44xx_l4_cfg__smartreflex_mpu, |
5645 | 4768 | &omap44xx_l4_cfg__spinlock, | |
5646 | /* smartreflex class */ | 4769 | &omap44xx_l4_wkup__timer1, |
5647 | &omap44xx_smartreflex_core_hwmod, | 4770 | &omap44xx_l4_per__timer2, |
5648 | &omap44xx_smartreflex_iva_hwmod, | 4771 | &omap44xx_l4_per__timer3, |
5649 | &omap44xx_smartreflex_mpu_hwmod, | 4772 | &omap44xx_l4_per__timer4, |
5650 | 4773 | &omap44xx_l4_abe__timer5, | |
5651 | /* spinlock class */ | 4774 | &omap44xx_l4_abe__timer5_dma, |
5652 | &omap44xx_spinlock_hwmod, | 4775 | &omap44xx_l4_abe__timer6, |
5653 | 4776 | &omap44xx_l4_abe__timer6_dma, | |
5654 | /* timer class */ | 4777 | &omap44xx_l4_abe__timer7, |
5655 | &omap44xx_timer1_hwmod, | 4778 | &omap44xx_l4_abe__timer7_dma, |
5656 | &omap44xx_timer2_hwmod, | 4779 | &omap44xx_l4_abe__timer8, |
5657 | &omap44xx_timer3_hwmod, | 4780 | &omap44xx_l4_abe__timer8_dma, |
5658 | &omap44xx_timer4_hwmod, | 4781 | &omap44xx_l4_per__timer9, |
5659 | &omap44xx_timer5_hwmod, | 4782 | &omap44xx_l4_per__timer10, |
5660 | &omap44xx_timer6_hwmod, | 4783 | &omap44xx_l4_per__timer11, |
5661 | &omap44xx_timer7_hwmod, | 4784 | &omap44xx_l4_per__uart1, |
5662 | &omap44xx_timer8_hwmod, | 4785 | &omap44xx_l4_per__uart2, |
5663 | &omap44xx_timer9_hwmod, | 4786 | &omap44xx_l4_per__uart3, |
5664 | &omap44xx_timer10_hwmod, | 4787 | &omap44xx_l4_per__uart4, |
5665 | &omap44xx_timer11_hwmod, | 4788 | &omap44xx_l4_cfg__usb_host_hs, |
5666 | 4789 | &omap44xx_l4_cfg__usb_otg_hs, | |
5667 | /* uart class */ | 4790 | &omap44xx_l4_cfg__usb_tll_hs, |
5668 | &omap44xx_uart1_hwmod, | 4791 | &omap44xx_l4_wkup__wd_timer2, |
5669 | &omap44xx_uart2_hwmod, | 4792 | &omap44xx_l4_abe__wd_timer3, |
5670 | &omap44xx_uart3_hwmod, | 4793 | &omap44xx_l4_abe__wd_timer3_dma, |
5671 | &omap44xx_uart4_hwmod, | ||
5672 | |||
5673 | /* usb host class */ | ||
5674 | &omap44xx_usb_host_hs_hwmod, | ||
5675 | &omap44xx_usb_tll_hs_hwmod, | ||
5676 | |||
5677 | /* usb_otg_hs class */ | ||
5678 | &omap44xx_usb_otg_hs_hwmod, | ||
5679 | |||
5680 | /* wd_timer class */ | ||
5681 | &omap44xx_wd_timer2_hwmod, | ||
5682 | &omap44xx_wd_timer3_hwmod, | ||
5683 | NULL, | 4794 | NULL, |
5684 | }; | 4795 | }; |
5685 | 4796 | ||
5686 | int __init omap44xx_hwmod_init(void) | 4797 | int __init omap44xx_hwmod_init(void) |
5687 | { | 4798 | { |
5688 | return omap_hwmod_register(omap44xx_hwmods); | 4799 | return omap_hwmod_register_links(omap44xx_hwmod_ocp_ifs); |
5689 | } | 4800 | } |
5690 | 4801 | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_common_data.h b/arch/arm/mach-omap2/omap_hwmod_common_data.h index ad5d8f04c0b..7aa9156d50a 100644 --- a/arch/arm/mach-omap2/omap_hwmod_common_data.h +++ b/arch/arm/mach-omap2/omap_hwmod_common_data.h | |||
@@ -19,18 +19,6 @@ | |||
19 | #include "display.h" | 19 | #include "display.h" |
20 | 20 | ||
21 | /* Common address space across OMAP2xxx */ | 21 | /* Common address space across OMAP2xxx */ |
22 | extern struct omap_hwmod_addr_space omap2xxx_uart1_addr_space[]; | ||
23 | extern struct omap_hwmod_addr_space omap2xxx_uart2_addr_space[]; | ||
24 | extern struct omap_hwmod_addr_space omap2xxx_uart3_addr_space[]; | ||
25 | extern struct omap_hwmod_addr_space omap2xxx_timer2_addrs[]; | ||
26 | extern struct omap_hwmod_addr_space omap2xxx_timer3_addrs[]; | ||
27 | extern struct omap_hwmod_addr_space omap2xxx_timer4_addrs[]; | ||
28 | extern struct omap_hwmod_addr_space omap2xxx_timer5_addrs[]; | ||
29 | extern struct omap_hwmod_addr_space omap2xxx_timer6_addrs[]; | ||
30 | extern struct omap_hwmod_addr_space omap2xxx_timer7_addrs[]; | ||
31 | extern struct omap_hwmod_addr_space omap2xxx_timer8_addrs[]; | ||
32 | extern struct omap_hwmod_addr_space omap2xxx_timer9_addrs[]; | ||
33 | extern struct omap_hwmod_addr_space omap2xxx_timer12_addrs[]; | ||
34 | extern struct omap_hwmod_addr_space omap2xxx_mcbsp2_addrs[]; | 22 | extern struct omap_hwmod_addr_space omap2xxx_mcbsp2_addrs[]; |
35 | 23 | ||
36 | /* Common address space across OMAP2xxx/3xxx */ | 24 | /* Common address space across OMAP2xxx/3xxx */ |
@@ -54,6 +42,64 @@ extern struct omap_hwmod_addr_space omap2_mcbsp1_addrs[]; | |||
54 | /* Common IP block data across OMAP2xxx */ | 42 | /* Common IP block data across OMAP2xxx */ |
55 | extern struct omap_hwmod_irq_info omap2xxx_timer12_mpu_irqs[]; | 43 | extern struct omap_hwmod_irq_info omap2xxx_timer12_mpu_irqs[]; |
56 | extern struct omap_hwmod_dma_info omap2xxx_dss_sdma_chs[]; | 44 | extern struct omap_hwmod_dma_info omap2xxx_dss_sdma_chs[]; |
45 | extern struct omap_gpio_dev_attr omap2xxx_gpio_dev_attr; | ||
46 | extern struct omap_hwmod omap2xxx_l3_main_hwmod; | ||
47 | extern struct omap_hwmod omap2xxx_l4_core_hwmod; | ||
48 | extern struct omap_hwmod omap2xxx_l4_wkup_hwmod; | ||
49 | extern struct omap_hwmod omap2xxx_mpu_hwmod; | ||
50 | extern struct omap_hwmod omap2xxx_iva_hwmod; | ||
51 | extern struct omap_hwmod omap2xxx_timer1_hwmod; | ||
52 | extern struct omap_hwmod omap2xxx_timer2_hwmod; | ||
53 | extern struct omap_hwmod omap2xxx_timer3_hwmod; | ||
54 | extern struct omap_hwmod omap2xxx_timer4_hwmod; | ||
55 | extern struct omap_hwmod omap2xxx_timer5_hwmod; | ||
56 | extern struct omap_hwmod omap2xxx_timer6_hwmod; | ||
57 | extern struct omap_hwmod omap2xxx_timer7_hwmod; | ||
58 | extern struct omap_hwmod omap2xxx_timer8_hwmod; | ||
59 | extern struct omap_hwmod omap2xxx_timer9_hwmod; | ||
60 | extern struct omap_hwmod omap2xxx_timer10_hwmod; | ||
61 | extern struct omap_hwmod omap2xxx_timer11_hwmod; | ||
62 | extern struct omap_hwmod omap2xxx_timer12_hwmod; | ||
63 | extern struct omap_hwmod omap2xxx_wd_timer2_hwmod; | ||
64 | extern struct omap_hwmod omap2xxx_uart1_hwmod; | ||
65 | extern struct omap_hwmod omap2xxx_uart2_hwmod; | ||
66 | extern struct omap_hwmod omap2xxx_uart3_hwmod; | ||
67 | extern struct omap_hwmod omap2xxx_dss_core_hwmod; | ||
68 | extern struct omap_hwmod omap2xxx_dss_dispc_hwmod; | ||
69 | extern struct omap_hwmod omap2xxx_dss_rfbi_hwmod; | ||
70 | extern struct omap_hwmod omap2xxx_dss_venc_hwmod; | ||
71 | extern struct omap_hwmod omap2xxx_gpio1_hwmod; | ||
72 | extern struct omap_hwmod omap2xxx_gpio2_hwmod; | ||
73 | extern struct omap_hwmod omap2xxx_gpio3_hwmod; | ||
74 | extern struct omap_hwmod omap2xxx_gpio4_hwmod; | ||
75 | extern struct omap_hwmod omap2xxx_mcspi1_hwmod; | ||
76 | extern struct omap_hwmod omap2xxx_mcspi2_hwmod; | ||
77 | |||
78 | /* Common interface data across OMAP2xxx */ | ||
79 | extern struct omap_hwmod_ocp_if omap2xxx_l3_main__l4_core; | ||
80 | extern struct omap_hwmod_ocp_if omap2xxx_mpu__l3_main; | ||
81 | extern struct omap_hwmod_ocp_if omap2xxx_dss__l3; | ||
82 | extern struct omap_hwmod_ocp_if omap2xxx_l4_core__l4_wkup; | ||
83 | extern struct omap_hwmod_ocp_if omap2_l4_core__uart1; | ||
84 | extern struct omap_hwmod_ocp_if omap2_l4_core__uart2; | ||
85 | extern struct omap_hwmod_ocp_if omap2_l4_core__uart3; | ||
86 | extern struct omap_hwmod_ocp_if omap2xxx_l4_core__mcspi1; | ||
87 | extern struct omap_hwmod_ocp_if omap2xxx_l4_core__mcspi2; | ||
88 | extern struct omap_hwmod_ocp_if omap2xxx_l4_core__timer2; | ||
89 | extern struct omap_hwmod_ocp_if omap2xxx_l4_core__timer3; | ||
90 | extern struct omap_hwmod_ocp_if omap2xxx_l4_core__timer4; | ||
91 | extern struct omap_hwmod_ocp_if omap2xxx_l4_core__timer5; | ||
92 | extern struct omap_hwmod_ocp_if omap2xxx_l4_core__timer6; | ||
93 | extern struct omap_hwmod_ocp_if omap2xxx_l4_core__timer7; | ||
94 | extern struct omap_hwmod_ocp_if omap2xxx_l4_core__timer8; | ||
95 | extern struct omap_hwmod_ocp_if omap2xxx_l4_core__timer9; | ||
96 | extern struct omap_hwmod_ocp_if omap2xxx_l4_core__timer10; | ||
97 | extern struct omap_hwmod_ocp_if omap2xxx_l4_core__timer11; | ||
98 | extern struct omap_hwmod_ocp_if omap2xxx_l4_core__timer12; | ||
99 | extern struct omap_hwmod_ocp_if omap2xxx_l4_core__dss; | ||
100 | extern struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_dispc; | ||
101 | extern struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_rfbi; | ||
102 | extern struct omap_hwmod_ocp_if omap2xxx_l4_core__dss_venc; | ||
57 | 103 | ||
58 | /* Common IP block data */ | 104 | /* Common IP block data */ |
59 | extern struct omap_hwmod_dma_info omap2_uart1_sdma_reqs[]; | 105 | extern struct omap_hwmod_dma_info omap2_uart1_sdma_reqs[]; |
@@ -94,6 +140,7 @@ extern struct omap_hwmod_irq_info omap2_gpio4_irqs[]; | |||
94 | extern struct omap_hwmod_irq_info omap2_dma_system_irqs[]; | 140 | extern struct omap_hwmod_irq_info omap2_dma_system_irqs[]; |
95 | extern struct omap_hwmod_irq_info omap2_mcspi1_mpu_irqs[]; | 141 | extern struct omap_hwmod_irq_info omap2_mcspi1_mpu_irqs[]; |
96 | extern struct omap_hwmod_irq_info omap2_mcspi2_mpu_irqs[]; | 142 | extern struct omap_hwmod_irq_info omap2_mcspi2_mpu_irqs[]; |
143 | extern struct omap_hwmod_addr_space omap2xxx_timer12_addrs[]; | ||
97 | 144 | ||
98 | /* OMAP hwmod classes - forward declarations */ | 145 | /* OMAP hwmod classes - forward declarations */ |
99 | extern struct omap_hwmod_class l3_hwmod_class; | 146 | extern struct omap_hwmod_class l3_hwmod_class; |
diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h index 36fa90b6ece..78564895e91 100644 --- a/arch/arm/mach-omap2/pm.h +++ b/arch/arm/mach-omap2/pm.h | |||
@@ -38,27 +38,6 @@ static inline int omap4_opp_init(void) | |||
38 | } | 38 | } |
39 | #endif | 39 | #endif |
40 | 40 | ||
41 | /* | ||
42 | * cpuidle mach specific parameters | ||
43 | * | ||
44 | * The board code can override the default C-states definition using | ||
45 | * omap3_pm_init_cpuidle | ||
46 | */ | ||
47 | struct cpuidle_params { | ||
48 | u32 exit_latency; /* exit_latency = sleep + wake-up latencies */ | ||
49 | u32 target_residency; | ||
50 | u8 valid; /* validates the C-state */ | ||
51 | }; | ||
52 | |||
53 | #if defined(CONFIG_PM) && defined(CONFIG_CPU_IDLE) | ||
54 | extern void omap3_pm_init_cpuidle(struct cpuidle_params *cpuidle_board_params); | ||
55 | #else | ||
56 | static | ||
57 | inline void omap3_pm_init_cpuidle(struct cpuidle_params *cpuidle_board_params) | ||
58 | { | ||
59 | } | ||
60 | #endif | ||
61 | |||
62 | extern int omap3_pm_get_suspend_state(struct powerdomain *pwrdm); | 41 | extern int omap3_pm_get_suspend_state(struct powerdomain *pwrdm); |
63 | extern int omap3_pm_set_suspend_state(struct powerdomain *pwrdm, int state); | 42 | extern int omap3_pm_set_suspend_state(struct powerdomain *pwrdm, int state); |
64 | 43 | ||
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c index 95442b69ae2..facfffca9ea 100644 --- a/arch/arm/mach-omap2/pm24xx.c +++ b/arch/arm/mach-omap2/pm24xx.c | |||
@@ -171,8 +171,6 @@ static int omap2_allow_mpu_retention(void) | |||
171 | 171 | ||
172 | static void omap2_enter_mpu_retention(void) | 172 | static void omap2_enter_mpu_retention(void) |
173 | { | 173 | { |
174 | int only_idle = 0; | ||
175 | |||
176 | /* Putting MPU into the WFI state while a transfer is active | 174 | /* Putting MPU into the WFI state while a transfer is active |
177 | * seems to cause the I2C block to timeout. Why? Good question. */ | 175 | * seems to cause the I2C block to timeout. Why? Good question. */ |
178 | if (omap2_i2c_active()) | 176 | if (omap2_i2c_active()) |
@@ -195,7 +193,6 @@ static void omap2_enter_mpu_retention(void) | |||
195 | 193 | ||
196 | omap2_prm_write_mod_reg(OMAP_LOGICRETSTATE_MASK, MPU_MOD, | 194 | omap2_prm_write_mod_reg(OMAP_LOGICRETSTATE_MASK, MPU_MOD, |
197 | OMAP2_PM_PWSTCTRL); | 195 | OMAP2_PM_PWSTCTRL); |
198 | only_idle = 1; | ||
199 | } | 196 | } |
200 | 197 | ||
201 | omap2_sram_idle(); | 198 | omap2_sram_idle(); |
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 703bd109925..8b43aefba0e 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c | |||
@@ -273,7 +273,7 @@ void omap_sram_idle(void) | |||
273 | int per_next_state = PWRDM_POWER_ON; | 273 | int per_next_state = PWRDM_POWER_ON; |
274 | int core_next_state = PWRDM_POWER_ON; | 274 | int core_next_state = PWRDM_POWER_ON; |
275 | int per_going_off; | 275 | int per_going_off; |
276 | int core_prev_state, per_prev_state; | 276 | int core_prev_state; |
277 | u32 sdrc_pwr = 0; | 277 | u32 sdrc_pwr = 0; |
278 | 278 | ||
279 | mpu_next_state = pwrdm_read_next_pwrst(mpu_pwrdm); | 279 | mpu_next_state = pwrdm_read_next_pwrst(mpu_pwrdm); |
@@ -375,10 +375,8 @@ void omap_sram_idle(void) | |||
375 | pwrdm_post_transition(); | 375 | pwrdm_post_transition(); |
376 | 376 | ||
377 | /* PER */ | 377 | /* PER */ |
378 | if (per_next_state < PWRDM_POWER_ON) { | 378 | if (per_next_state < PWRDM_POWER_ON) |
379 | per_prev_state = pwrdm_read_prev_pwrst(per_pwrdm); | ||
380 | omap2_gpio_resume_after_idle(); | 379 | omap2_gpio_resume_after_idle(); |
381 | } | ||
382 | 380 | ||
383 | /* Disable IO-PAD and IO-CHAIN wakeup */ | 381 | /* Disable IO-PAD and IO-CHAIN wakeup */ |
384 | if (omap3_has_io_wakeup() && | 382 | if (omap3_has_io_wakeup() && |
@@ -702,7 +700,7 @@ static void __init pm_errata_configure(void) | |||
702 | static int __init omap3_pm_init(void) | 700 | static int __init omap3_pm_init(void) |
703 | { | 701 | { |
704 | struct power_state *pwrst, *tmp; | 702 | struct power_state *pwrst, *tmp; |
705 | struct clockdomain *neon_clkdm, *per_clkdm, *mpu_clkdm, *core_clkdm; | 703 | struct clockdomain *neon_clkdm, *mpu_clkdm; |
706 | int ret; | 704 | int ret; |
707 | 705 | ||
708 | if (!cpu_is_omap34xx()) | 706 | if (!cpu_is_omap34xx()) |
@@ -757,8 +755,6 @@ static int __init omap3_pm_init(void) | |||
757 | 755 | ||
758 | neon_clkdm = clkdm_lookup("neon_clkdm"); | 756 | neon_clkdm = clkdm_lookup("neon_clkdm"); |
759 | mpu_clkdm = clkdm_lookup("mpu_clkdm"); | 757 | mpu_clkdm = clkdm_lookup("mpu_clkdm"); |
760 | per_clkdm = clkdm_lookup("per_clkdm"); | ||
761 | core_clkdm = clkdm_lookup("core_clkdm"); | ||
762 | 758 | ||
763 | #ifdef CONFIG_SUSPEND | 759 | #ifdef CONFIG_SUSPEND |
764 | omap_pm_suspend = omap3_pm_suspend; | 760 | omap_pm_suspend = omap3_pm_suspend; |
diff --git a/arch/arm/mach-omap2/prm_common.c b/arch/arm/mach-omap2/prm_common.c index d28f848897d..dfe00ddb5c6 100644 --- a/arch/arm/mach-omap2/prm_common.c +++ b/arch/arm/mach-omap2/prm_common.c | |||
@@ -237,7 +237,7 @@ void omap_prcm_irq_complete(void) | |||
237 | */ | 237 | */ |
238 | int omap_prcm_register_chain_handler(struct omap_prcm_irq_setup *irq_setup) | 238 | int omap_prcm_register_chain_handler(struct omap_prcm_irq_setup *irq_setup) |
239 | { | 239 | { |
240 | int nr_regs = irq_setup->nr_regs; | 240 | int nr_regs; |
241 | u32 mask[OMAP_PRCM_MAX_NR_PENDING_REG]; | 241 | u32 mask[OMAP_PRCM_MAX_NR_PENDING_REG]; |
242 | int offset, i; | 242 | int offset, i; |
243 | struct irq_chip_generic *gc; | 243 | struct irq_chip_generic *gc; |
@@ -246,6 +246,8 @@ int omap_prcm_register_chain_handler(struct omap_prcm_irq_setup *irq_setup) | |||
246 | if (!irq_setup) | 246 | if (!irq_setup) |
247 | return -EINVAL; | 247 | return -EINVAL; |
248 | 248 | ||
249 | nr_regs = irq_setup->nr_regs; | ||
250 | |||
249 | if (prcm_irq_setup) { | 251 | if (prcm_irq_setup) { |
250 | pr_err("PRCM: already initialized; won't reinitialize\n"); | 252 | pr_err("PRCM: already initialized; won't reinitialize\n"); |
251 | return -EINVAL; | 253 | return -EINVAL; |
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index 9fc2f44188c..678dd1d612e 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c | |||
@@ -133,7 +133,7 @@ static void omap_serial_fill_default_pads(struct omap_board_data *bdata) | |||
133 | static void omap_serial_fill_default_pads(struct omap_board_data *bdata) {} | 133 | static void omap_serial_fill_default_pads(struct omap_board_data *bdata) {} |
134 | #endif | 134 | #endif |
135 | 135 | ||
136 | char *cmdline_find_option(char *str) | 136 | static char *cmdline_find_option(char *str) |
137 | { | 137 | { |
138 | extern char *saved_command_line; | 138 | extern char *saved_command_line; |
139 | 139 | ||
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index c512bac69ec..ecec873e78c 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c | |||
@@ -145,8 +145,10 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer, | |||
145 | { | 145 | { |
146 | char name[10]; /* 10 = sizeof("gptXX_Xck0") */ | 146 | char name[10]; /* 10 = sizeof("gptXX_Xck0") */ |
147 | struct omap_hwmod *oh; | 147 | struct omap_hwmod *oh; |
148 | struct resource irq_rsrc, mem_rsrc; | ||
148 | size_t size; | 149 | size_t size; |
149 | int res = 0; | 150 | int res = 0; |
151 | int r; | ||
150 | 152 | ||
151 | sprintf(name, "timer%d", gptimer_id); | 153 | sprintf(name, "timer%d", gptimer_id); |
152 | omap_hwmod_setup_one(name); | 154 | omap_hwmod_setup_one(name); |
@@ -154,9 +156,16 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer, | |||
154 | if (!oh) | 156 | if (!oh) |
155 | return -ENODEV; | 157 | return -ENODEV; |
156 | 158 | ||
157 | timer->irq = oh->mpu_irqs[0].irq; | 159 | r = omap_hwmod_get_resource_byname(oh, IORESOURCE_IRQ, NULL, &irq_rsrc); |
158 | timer->phys_base = oh->slaves[0]->addr->pa_start; | 160 | if (r) |
159 | size = oh->slaves[0]->addr->pa_end - timer->phys_base; | 161 | return -ENXIO; |
162 | timer->irq = irq_rsrc.start; | ||
163 | |||
164 | r = omap_hwmod_get_resource_byname(oh, IORESOURCE_MEM, NULL, &mem_rsrc); | ||
165 | if (r) | ||
166 | return -ENXIO; | ||
167 | timer->phys_base = mem_rsrc.start; | ||
168 | size = mem_rsrc.end - mem_rsrc.start; | ||
160 | 169 | ||
161 | /* Static mapping, never released */ | 170 | /* Static mapping, never released */ |
162 | timer->io_base = ioremap(timer->phys_base, size); | 171 | timer->io_base = ioremap(timer->phys_base, size); |
diff --git a/arch/arm/mach-omap2/usb-tusb6010.c b/arch/arm/mach-omap2/usb-tusb6010.c index 994d8f591a1..db84a46ce7f 100644 --- a/arch/arm/mach-omap2/usb-tusb6010.c +++ b/arch/arm/mach-omap2/usb-tusb6010.c | |||
@@ -126,7 +126,7 @@ static int tusb_set_sync_mode(unsigned sysclk_ps, unsigned fclk_ps) | |||
126 | tmp = (t.sync_clk + fclk_ps - 1) / fclk_ps; | 126 | tmp = (t.sync_clk + fclk_ps - 1) / fclk_ps; |
127 | if (tmp > 4) | 127 | if (tmp > 4) |
128 | return -ERANGE; | 128 | return -ERANGE; |
129 | if (tmp <= 0) | 129 | if (tmp == 0) |
130 | tmp = 1; | 130 | tmp = 1; |
131 | t.page_burst_access = (fclk_ps * tmp) / 1000; | 131 | t.page_burst_access = (fclk_ps * tmp) / 1000; |
132 | 132 | ||
diff --git a/arch/arm/mach-orion5x/Kconfig b/arch/arm/mach-orion5x/Kconfig index 6604fc6ca58..0673f0c1043 100644 --- a/arch/arm/mach-orion5x/Kconfig +++ b/arch/arm/mach-orion5x/Kconfig | |||
@@ -86,7 +86,6 @@ config MACH_WRT350N_V2 | |||
86 | 86 | ||
87 | config MACH_TS78XX | 87 | config MACH_TS78XX |
88 | bool "Technologic Systems TS-78xx" | 88 | bool "Technologic Systems TS-78xx" |
89 | select PM | ||
90 | help | 89 | help |
91 | Say 'Y' here if you want your kernel to support the | 90 | Say 'Y' here if you want your kernel to support the |
92 | Technologic Systems TS-78xx platform. | 91 | Technologic Systems TS-78xx platform. |
diff --git a/arch/arm/mach-orion5x/addr-map.c b/arch/arm/mach-orion5x/addr-map.c index 3638e5c12b7..eaac83d1df6 100644 --- a/arch/arm/mach-orion5x/addr-map.c +++ b/arch/arm/mach-orion5x/addr-map.c | |||
@@ -76,7 +76,7 @@ static int __init cpu_win_can_remap(const struct orion_addr_map_cfg *cfg, | |||
76 | /* | 76 | /* |
77 | * Description of the windows needed by the platform code | 77 | * Description of the windows needed by the platform code |
78 | */ | 78 | */ |
79 | static struct __initdata orion_addr_map_cfg addr_map_cfg = { | 79 | static struct orion_addr_map_cfg addr_map_cfg __initdata = { |
80 | .num_wins = 8, | 80 | .num_wins = 8, |
81 | .cpu_win_can_remap = cpu_win_can_remap, | 81 | .cpu_win_can_remap = cpu_win_can_remap, |
82 | .bridge_virt_base = ORION5X_BRIDGE_VIRT_BASE, | 82 | .bridge_virt_base = ORION5X_BRIDGE_VIRT_BASE, |
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index 24481666d2c..e2e9db492d0 100644 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c | |||
@@ -205,7 +205,7 @@ int __init orion5x_find_tclk(void) | |||
205 | return 166666667; | 205 | return 166666667; |
206 | } | 206 | } |
207 | 207 | ||
208 | static void orion5x_timer_init(void) | 208 | static void __init orion5x_timer_init(void) |
209 | { | 209 | { |
210 | orion5x_tclk = orion5x_find_tclk(); | 210 | orion5x_tclk = orion5x_find_tclk(); |
211 | 211 | ||
diff --git a/arch/arm/mach-orion5x/common.h b/arch/arm/mach-orion5x/common.h index 2e6454c8d4b..31bab92ce03 100644 --- a/arch/arm/mach-orion5x/common.h +++ b/arch/arm/mach-orion5x/common.h | |||
@@ -45,6 +45,7 @@ void orion5x_restart(char, const char *); | |||
45 | */ | 45 | */ |
46 | struct pci_bus; | 46 | struct pci_bus; |
47 | struct pci_sys_data; | 47 | struct pci_sys_data; |
48 | struct pci_dev; | ||
48 | 49 | ||
49 | void orion5x_pcie_id(u32 *dev, u32 *rev); | 50 | void orion5x_pcie_id(u32 *dev, u32 *rev); |
50 | void orion5x_pci_disable(void); | 51 | void orion5x_pci_disable(void); |
diff --git a/arch/arm/mach-orion5x/db88f5281-setup.c b/arch/arm/mach-orion5x/db88f5281-setup.c index e52108c9aae..49a3fd63031 100644 --- a/arch/arm/mach-orion5x/db88f5281-setup.c +++ b/arch/arm/mach-orion5x/db88f5281-setup.c | |||
@@ -265,7 +265,6 @@ static int __init db88f5281_pci_map_irq(const struct pci_dev *dev, u8 slot, | |||
265 | static struct hw_pci db88f5281_pci __initdata = { | 265 | static struct hw_pci db88f5281_pci __initdata = { |
266 | .nr_controllers = 2, | 266 | .nr_controllers = 2, |
267 | .preinit = db88f5281_pci_preinit, | 267 | .preinit = db88f5281_pci_preinit, |
268 | .swizzle = pci_std_swizzle, | ||
269 | .setup = orion5x_pci_sys_setup, | 268 | .setup = orion5x_pci_sys_setup, |
270 | .scan = orion5x_pci_sys_scan_bus, | 269 | .scan = orion5x_pci_sys_scan_bus, |
271 | .map_irq = db88f5281_pci_map_irq, | 270 | .map_irq = db88f5281_pci_map_irq, |
diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c index c3ed15b8ea2..8c06ccac44c 100644 --- a/arch/arm/mach-orion5x/dns323-setup.c +++ b/arch/arm/mach-orion5x/dns323-setup.c | |||
@@ -86,7 +86,6 @@ static int __init dns323_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
86 | 86 | ||
87 | static struct hw_pci dns323_pci __initdata = { | 87 | static struct hw_pci dns323_pci __initdata = { |
88 | .nr_controllers = 2, | 88 | .nr_controllers = 2, |
89 | .swizzle = pci_std_swizzle, | ||
90 | .setup = orion5x_pci_sys_setup, | 89 | .setup = orion5x_pci_sys_setup, |
91 | .scan = orion5x_pci_sys_scan_bus, | 90 | .scan = orion5x_pci_sys_scan_bus, |
92 | .map_irq = dns323_pci_map_irq, | 91 | .map_irq = dns323_pci_map_irq, |
diff --git a/arch/arm/mach-orion5x/kurobox_pro-setup.c b/arch/arm/mach-orion5x/kurobox_pro-setup.c index 47587b83284..1e458efafb9 100644 --- a/arch/arm/mach-orion5x/kurobox_pro-setup.c +++ b/arch/arm/mach-orion5x/kurobox_pro-setup.c | |||
@@ -138,7 +138,6 @@ static int __init kurobox_pro_pci_map_irq(const struct pci_dev *dev, u8 slot, | |||
138 | 138 | ||
139 | static struct hw_pci kurobox_pro_pci __initdata = { | 139 | static struct hw_pci kurobox_pro_pci __initdata = { |
140 | .nr_controllers = 2, | 140 | .nr_controllers = 2, |
141 | .swizzle = pci_std_swizzle, | ||
142 | .setup = orion5x_pci_sys_setup, | 141 | .setup = orion5x_pci_sys_setup, |
143 | .scan = orion5x_pci_sys_scan_bus, | 142 | .scan = orion5x_pci_sys_scan_bus, |
144 | .map_irq = kurobox_pro_pci_map_irq, | 143 | .map_irq = kurobox_pro_pci_map_irq, |
diff --git a/arch/arm/mach-orion5x/mpp.h b/arch/arm/mach-orion5x/mpp.h index eac68978a2c..db70e79a119 100644 --- a/arch/arm/mach-orion5x/mpp.h +++ b/arch/arm/mach-orion5x/mpp.h | |||
@@ -65,8 +65,8 @@ | |||
65 | #define MPP8_GIGE MPP(8, 0x1, 0, 0, 1, 1, 1) | 65 | #define MPP8_GIGE MPP(8, 0x1, 0, 0, 1, 1, 1) |
66 | 66 | ||
67 | #define MPP9_UNUSED MPP(9, 0x0, 0, 0, 1, 1, 1) | 67 | #define MPP9_UNUSED MPP(9, 0x0, 0, 0, 1, 1, 1) |
68 | #define MPP9_GPIO MPP(9, 0x0, 0, 0, 1, 1, 1) | 68 | #define MPP9_GPIO MPP(9, 0x0, 1, 1, 1, 1, 1) |
69 | #define MPP9_GIGE MPP(9, 0x1, 1, 1, 1, 1, 1) | 69 | #define MPP9_GIGE MPP(9, 0x1, 0, 0, 1, 1, 1) |
70 | 70 | ||
71 | #define MPP10_UNUSED MPP(10, 0x0, 0, 0, 1, 1, 1) | 71 | #define MPP10_UNUSED MPP(10, 0x0, 0, 0, 1, 1, 1) |
72 | #define MPP10_GPIO MPP(10, 0x0, 1, 1, 1, 1, 1) | 72 | #define MPP10_GPIO MPP(10, 0x0, 1, 1, 1, 1, 1) |
diff --git a/arch/arm/mach-orion5x/mss2-setup.c b/arch/arm/mach-orion5x/mss2-setup.c index 65faaa34de6..1c16d045333 100644 --- a/arch/arm/mach-orion5x/mss2-setup.c +++ b/arch/arm/mach-orion5x/mss2-setup.c | |||
@@ -89,7 +89,6 @@ static int __init mss2_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
89 | 89 | ||
90 | static struct hw_pci mss2_pci __initdata = { | 90 | static struct hw_pci mss2_pci __initdata = { |
91 | .nr_controllers = 2, | 91 | .nr_controllers = 2, |
92 | .swizzle = pci_std_swizzle, | ||
93 | .setup = orion5x_pci_sys_setup, | 92 | .setup = orion5x_pci_sys_setup, |
94 | .scan = orion5x_pci_sys_scan_bus, | 93 | .scan = orion5x_pci_sys_scan_bus, |
95 | .map_irq = mss2_pci_map_irq, | 94 | .map_irq = mss2_pci_map_irq, |
diff --git a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c index 292038fc59f..78a6a11d821 100644 --- a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c +++ b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c | |||
@@ -149,7 +149,6 @@ rd88f5181l_fxo_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
149 | 149 | ||
150 | static struct hw_pci rd88f5181l_fxo_pci __initdata = { | 150 | static struct hw_pci rd88f5181l_fxo_pci __initdata = { |
151 | .nr_controllers = 2, | 151 | .nr_controllers = 2, |
152 | .swizzle = pci_std_swizzle, | ||
153 | .setup = orion5x_pci_sys_setup, | 152 | .setup = orion5x_pci_sys_setup, |
154 | .scan = orion5x_pci_sys_scan_bus, | 153 | .scan = orion5x_pci_sys_scan_bus, |
155 | .map_irq = rd88f5181l_fxo_pci_map_irq, | 154 | .map_irq = rd88f5181l_fxo_pci_map_irq, |
diff --git a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c index c44eabaabc1..2f5dc54cd4c 100644 --- a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c +++ b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c | |||
@@ -161,7 +161,6 @@ rd88f5181l_ge_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
161 | 161 | ||
162 | static struct hw_pci rd88f5181l_ge_pci __initdata = { | 162 | static struct hw_pci rd88f5181l_ge_pci __initdata = { |
163 | .nr_controllers = 2, | 163 | .nr_controllers = 2, |
164 | .swizzle = pci_std_swizzle, | ||
165 | .setup = orion5x_pci_sys_setup, | 164 | .setup = orion5x_pci_sys_setup, |
166 | .scan = orion5x_pci_sys_scan_bus, | 165 | .scan = orion5x_pci_sys_scan_bus, |
167 | .map_irq = rd88f5181l_ge_pci_map_irq, | 166 | .map_irq = rd88f5181l_ge_pci_map_irq, |
diff --git a/arch/arm/mach-orion5x/rd88f5182-setup.c b/arch/arm/mach-orion5x/rd88f5182-setup.c index e3ce6171147..399130fac0b 100644 --- a/arch/arm/mach-orion5x/rd88f5182-setup.c +++ b/arch/arm/mach-orion5x/rd88f5182-setup.c | |||
@@ -200,7 +200,6 @@ static int __init rd88f5182_pci_map_irq(const struct pci_dev *dev, u8 slot, | |||
200 | static struct hw_pci rd88f5182_pci __initdata = { | 200 | static struct hw_pci rd88f5182_pci __initdata = { |
201 | .nr_controllers = 2, | 201 | .nr_controllers = 2, |
202 | .preinit = rd88f5182_pci_preinit, | 202 | .preinit = rd88f5182_pci_preinit, |
203 | .swizzle = pci_std_swizzle, | ||
204 | .setup = orion5x_pci_sys_setup, | 203 | .setup = orion5x_pci_sys_setup, |
205 | .scan = orion5x_pci_sys_scan_bus, | 204 | .scan = orion5x_pci_sys_scan_bus, |
206 | .map_irq = rd88f5182_pci_map_irq, | 205 | .map_irq = rd88f5182_pci_map_irq, |
diff --git a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c index 2c5fab00d20..e91bf0ba4e8 100644 --- a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c +++ b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c | |||
@@ -102,7 +102,6 @@ static void __init rd88f6183ap_ge_init(void) | |||
102 | 102 | ||
103 | static struct hw_pci rd88f6183ap_ge_pci __initdata = { | 103 | static struct hw_pci rd88f6183ap_ge_pci __initdata = { |
104 | .nr_controllers = 2, | 104 | .nr_controllers = 2, |
105 | .swizzle = pci_std_swizzle, | ||
106 | .setup = orion5x_pci_sys_setup, | 105 | .setup = orion5x_pci_sys_setup, |
107 | .scan = orion5x_pci_sys_scan_bus, | 106 | .scan = orion5x_pci_sys_scan_bus, |
108 | .map_irq = orion5x_pci_map_irq, | 107 | .map_irq = orion5x_pci_map_irq, |
diff --git a/arch/arm/mach-orion5x/terastation_pro2-setup.c b/arch/arm/mach-orion5x/terastation_pro2-setup.c index 632a861ef82..90e571dc4de 100644 --- a/arch/arm/mach-orion5x/terastation_pro2-setup.c +++ b/arch/arm/mach-orion5x/terastation_pro2-setup.c | |||
@@ -122,7 +122,6 @@ static int __init tsp2_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
122 | static struct hw_pci tsp2_pci __initdata = { | 122 | static struct hw_pci tsp2_pci __initdata = { |
123 | .nr_controllers = 2, | 123 | .nr_controllers = 2, |
124 | .preinit = tsp2_pci_preinit, | 124 | .preinit = tsp2_pci_preinit, |
125 | .swizzle = pci_std_swizzle, | ||
126 | .setup = orion5x_pci_sys_setup, | 125 | .setup = orion5x_pci_sys_setup, |
127 | .scan = orion5x_pci_sys_scan_bus, | 126 | .scan = orion5x_pci_sys_scan_bus, |
128 | .map_irq = tsp2_pci_map_irq, | 127 | .map_irq = tsp2_pci_map_irq, |
diff --git a/arch/arm/mach-orion5x/ts209-setup.c b/arch/arm/mach-orion5x/ts209-setup.c index 5d640874558..b184f680e0d 100644 --- a/arch/arm/mach-orion5x/ts209-setup.c +++ b/arch/arm/mach-orion5x/ts209-setup.c | |||
@@ -170,7 +170,6 @@ static int __init qnap_ts209_pci_map_irq(const struct pci_dev *dev, u8 slot, | |||
170 | static struct hw_pci qnap_ts209_pci __initdata = { | 170 | static struct hw_pci qnap_ts209_pci __initdata = { |
171 | .nr_controllers = 2, | 171 | .nr_controllers = 2, |
172 | .preinit = qnap_ts209_pci_preinit, | 172 | .preinit = qnap_ts209_pci_preinit, |
173 | .swizzle = pci_std_swizzle, | ||
174 | .setup = orion5x_pci_sys_setup, | 173 | .setup = orion5x_pci_sys_setup, |
175 | .scan = orion5x_pci_sys_scan_bus, | 174 | .scan = orion5x_pci_sys_scan_bus, |
176 | .map_irq = qnap_ts209_pci_map_irq, | 175 | .map_irq = qnap_ts209_pci_map_irq, |
diff --git a/arch/arm/mach-orion5x/ts409-setup.c b/arch/arm/mach-orion5x/ts409-setup.c index 4e6ff759cd3..a5c2e64c4ec 100644 --- a/arch/arm/mach-orion5x/ts409-setup.c +++ b/arch/arm/mach-orion5x/ts409-setup.c | |||
@@ -140,7 +140,6 @@ static int __init qnap_ts409_pci_map_irq(const struct pci_dev *dev, u8 slot, | |||
140 | 140 | ||
141 | static struct hw_pci qnap_ts409_pci __initdata = { | 141 | static struct hw_pci qnap_ts409_pci __initdata = { |
142 | .nr_controllers = 2, | 142 | .nr_controllers = 2, |
143 | .swizzle = pci_std_swizzle, | ||
144 | .setup = orion5x_pci_sys_setup, | 143 | .setup = orion5x_pci_sys_setup, |
145 | .scan = orion5x_pci_sys_scan_bus, | 144 | .scan = orion5x_pci_sys_scan_bus, |
146 | .map_irq = qnap_ts409_pci_map_irq, | 145 | .map_irq = qnap_ts409_pci_map_irq, |
diff --git a/arch/arm/mach-orion5x/ts78xx-fpga.h b/arch/arm/mach-orion5x/ts78xx-fpga.h index 151e89e1e67..97c393d39ae 100644 --- a/arch/arm/mach-orion5x/ts78xx-fpga.h +++ b/arch/arm/mach-orion5x/ts78xx-fpga.h | |||
@@ -28,9 +28,9 @@ struct fpga_device { | |||
28 | 28 | ||
29 | struct fpga_devices { | 29 | struct fpga_devices { |
30 | /* Technologic Systems */ | 30 | /* Technologic Systems */ |
31 | struct fpga_device ts_rtc; | 31 | struct fpga_device ts_rtc; |
32 | struct fpga_device ts_nand; | 32 | struct fpga_device ts_nand; |
33 | struct fpga_device ts_rng; | 33 | struct fpga_device ts_rng; |
34 | }; | 34 | }; |
35 | 35 | ||
36 | struct ts78xx_fpga_data { | 36 | struct ts78xx_fpga_data { |
diff --git a/arch/arm/mach-orion5x/ts78xx-setup.c b/arch/arm/mach-orion5x/ts78xx-setup.c index c96f37472ed..a74f3cf54cc 100644 --- a/arch/arm/mach-orion5x/ts78xx-setup.c +++ b/arch/arm/mach-orion5x/ts78xx-setup.c | |||
@@ -8,6 +8,8 @@ | |||
8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
12 | |||
11 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
12 | #include <linux/init.h> | 14 | #include <linux/init.h> |
13 | #include <linux/sysfs.h> | 15 | #include <linux/sysfs.h> |
@@ -115,7 +117,7 @@ static struct platform_device ts78xx_ts_rtc_device = { | |||
115 | * I've used the method TS use in their rtc7800.c example for the detection | 117 | * I've used the method TS use in their rtc7800.c example for the detection |
116 | * | 118 | * |
117 | * TODO: track down a guinea pig without an RTC to see if we can work out a | 119 | * TODO: track down a guinea pig without an RTC to see if we can work out a |
118 | * better RTC detection routine | 120 | * better RTC detection routine |
119 | */ | 121 | */ |
120 | static int ts78xx_ts_rtc_load(void) | 122 | static int ts78xx_ts_rtc_load(void) |
121 | { | 123 | { |
@@ -141,10 +143,14 @@ static int ts78xx_ts_rtc_load(void) | |||
141 | } else | 143 | } else |
142 | rc = platform_device_add(&ts78xx_ts_rtc_device); | 144 | rc = platform_device_add(&ts78xx_ts_rtc_device); |
143 | 145 | ||
146 | if (rc) | ||
147 | pr_info("RTC could not be registered: %d\n", | ||
148 | rc); | ||
144 | return rc; | 149 | return rc; |
145 | } | 150 | } |
146 | } | 151 | } |
147 | 152 | ||
153 | pr_info("RTC not found\n"); | ||
148 | return -ENODEV; | 154 | return -ENODEV; |
149 | }; | 155 | }; |
150 | 156 | ||
@@ -292,11 +298,8 @@ static struct platform_nand_data ts78xx_ts_nand_data = { | |||
292 | }, | 298 | }, |
293 | }; | 299 | }; |
294 | 300 | ||
295 | static struct resource ts78xx_ts_nand_resources = { | 301 | static struct resource ts78xx_ts_nand_resources |
296 | .start = TS_NAND_DATA, | 302 | = DEFINE_RES_MEM(TS_NAND_DATA, 4); |
297 | .end = TS_NAND_DATA + 4, | ||
298 | .flags = IORESOURCE_MEM, | ||
299 | }; | ||
300 | 303 | ||
301 | static struct platform_device ts78xx_ts_nand_device = { | 304 | static struct platform_device ts78xx_ts_nand_device = { |
302 | .name = "gen_nand", | 305 | .name = "gen_nand", |
@@ -319,6 +322,8 @@ static int ts78xx_ts_nand_load(void) | |||
319 | } else | 322 | } else |
320 | rc = platform_device_add(&ts78xx_ts_nand_device); | 323 | rc = platform_device_add(&ts78xx_ts_nand_device); |
321 | 324 | ||
325 | if (rc) | ||
326 | pr_info("NAND could not be registered: %d\n", rc); | ||
322 | return rc; | 327 | return rc; |
323 | }; | 328 | }; |
324 | 329 | ||
@@ -332,11 +337,8 @@ static void ts78xx_ts_nand_unload(void) | |||
332 | ****************************************************************************/ | 337 | ****************************************************************************/ |
333 | #define TS_RNG_DATA (TS78XX_FPGA_REGS_PHYS_BASE | 0x044) | 338 | #define TS_RNG_DATA (TS78XX_FPGA_REGS_PHYS_BASE | 0x044) |
334 | 339 | ||
335 | static struct resource ts78xx_ts_rng_resource = { | 340 | static struct resource ts78xx_ts_rng_resource |
336 | .flags = IORESOURCE_MEM, | 341 | = DEFINE_RES_MEM(TS_RNG_DATA, 4); |
337 | .start = TS_RNG_DATA, | ||
338 | .end = TS_RNG_DATA + 4 - 1, | ||
339 | }; | ||
340 | 342 | ||
341 | static struct timeriomem_rng_data ts78xx_ts_rng_data = { | 343 | static struct timeriomem_rng_data ts78xx_ts_rng_data = { |
342 | .period = 1000000, /* one second */ | 344 | .period = 1000000, /* one second */ |
@@ -363,6 +365,8 @@ static int ts78xx_ts_rng_load(void) | |||
363 | } else | 365 | } else |
364 | rc = platform_device_add(&ts78xx_ts_rng_device); | 366 | rc = platform_device_add(&ts78xx_ts_rng_device); |
365 | 367 | ||
368 | if (rc) | ||
369 | pr_info("RNG could not be registered: %d\n", rc); | ||
366 | return rc; | 370 | return rc; |
367 | }; | 371 | }; |
368 | 372 | ||
@@ -402,7 +406,7 @@ static void ts78xx_fpga_supports(void) | |||
402 | /* enable devices if magic matches */ | 406 | /* enable devices if magic matches */ |
403 | switch ((ts78xx_fpga.id >> 8) & 0xffffff) { | 407 | switch ((ts78xx_fpga.id >> 8) & 0xffffff) { |
404 | case TS7800_FPGA_MAGIC: | 408 | case TS7800_FPGA_MAGIC: |
405 | pr_warning("TS-7800 FPGA: unrecognized revision 0x%.2x\n", | 409 | pr_warning("unrecognised FPGA revision 0x%.2x\n", |
406 | ts78xx_fpga.id & 0xff); | 410 | ts78xx_fpga.id & 0xff); |
407 | ts78xx_fpga.supports.ts_rtc.present = 1; | 411 | ts78xx_fpga.supports.ts_rtc.present = 1; |
408 | ts78xx_fpga.supports.ts_nand.present = 1; | 412 | ts78xx_fpga.supports.ts_nand.present = 1; |
@@ -422,26 +426,20 @@ static int ts78xx_fpga_load_devices(void) | |||
422 | 426 | ||
423 | if (ts78xx_fpga.supports.ts_rtc.present == 1) { | 427 | if (ts78xx_fpga.supports.ts_rtc.present == 1) { |
424 | tmp = ts78xx_ts_rtc_load(); | 428 | tmp = ts78xx_ts_rtc_load(); |
425 | if (tmp) { | 429 | if (tmp) |
426 | pr_info("TS-78xx: RTC not registered\n"); | ||
427 | ts78xx_fpga.supports.ts_rtc.present = 0; | 430 | ts78xx_fpga.supports.ts_rtc.present = 0; |
428 | } | ||
429 | ret |= tmp; | 431 | ret |= tmp; |
430 | } | 432 | } |
431 | if (ts78xx_fpga.supports.ts_nand.present == 1) { | 433 | if (ts78xx_fpga.supports.ts_nand.present == 1) { |
432 | tmp = ts78xx_ts_nand_load(); | 434 | tmp = ts78xx_ts_nand_load(); |
433 | if (tmp) { | 435 | if (tmp) |
434 | pr_info("TS-78xx: NAND not registered\n"); | ||
435 | ts78xx_fpga.supports.ts_nand.present = 0; | 436 | ts78xx_fpga.supports.ts_nand.present = 0; |
436 | } | ||
437 | ret |= tmp; | 437 | ret |= tmp; |
438 | } | 438 | } |
439 | if (ts78xx_fpga.supports.ts_rng.present == 1) { | 439 | if (ts78xx_fpga.supports.ts_rng.present == 1) { |
440 | tmp = ts78xx_ts_rng_load(); | 440 | tmp = ts78xx_ts_rng_load(); |
441 | if (tmp) { | 441 | if (tmp) |
442 | pr_info("TS-78xx: RNG not registered\n"); | ||
443 | ts78xx_fpga.supports.ts_rng.present = 0; | 442 | ts78xx_fpga.supports.ts_rng.present = 0; |
444 | } | ||
445 | ret |= tmp; | 443 | ret |= tmp; |
446 | } | 444 | } |
447 | 445 | ||
@@ -466,7 +464,7 @@ static int ts78xx_fpga_load(void) | |||
466 | { | 464 | { |
467 | ts78xx_fpga.id = readl(TS78XX_FPGA_REGS_VIRT_BASE); | 465 | ts78xx_fpga.id = readl(TS78XX_FPGA_REGS_VIRT_BASE); |
468 | 466 | ||
469 | pr_info("TS-78xx FPGA: magic=0x%.6x, rev=0x%.2x\n", | 467 | pr_info("FPGA magic=0x%.6x, rev=0x%.2x\n", |
470 | (ts78xx_fpga.id >> 8) & 0xffffff, | 468 | (ts78xx_fpga.id >> 8) & 0xffffff, |
471 | ts78xx_fpga.id & 0xff); | 469 | ts78xx_fpga.id & 0xff); |
472 | 470 | ||
@@ -494,7 +492,7 @@ static int ts78xx_fpga_unload(void) | |||
494 | * UrJTAG SVN since r1381 can be used to reprogram the FPGA | 492 | * UrJTAG SVN since r1381 can be used to reprogram the FPGA |
495 | */ | 493 | */ |
496 | if (ts78xx_fpga.id != fpga_id) { | 494 | if (ts78xx_fpga.id != fpga_id) { |
497 | pr_err("TS-78xx FPGA: magic/rev mismatch\n" | 495 | pr_err("FPGA magic/rev mismatch\n" |
498 | "TS-78xx FPGA: was 0x%.6x/%.2x but now 0x%.6x/%.2x\n", | 496 | "TS-78xx FPGA: was 0x%.6x/%.2x but now 0x%.6x/%.2x\n", |
499 | (ts78xx_fpga.id >> 8) & 0xffffff, ts78xx_fpga.id & 0xff, | 497 | (ts78xx_fpga.id >> 8) & 0xffffff, ts78xx_fpga.id & 0xff, |
500 | (fpga_id >> 8) & 0xffffff, fpga_id & 0xff); | 498 | (fpga_id >> 8) & 0xffffff, fpga_id & 0xff); |
@@ -525,7 +523,7 @@ static ssize_t ts78xx_fpga_store(struct kobject *kobj, | |||
525 | int value, ret; | 523 | int value, ret; |
526 | 524 | ||
527 | if (ts78xx_fpga.state < 0) { | 525 | if (ts78xx_fpga.state < 0) { |
528 | pr_err("TS-78xx FPGA: borked, you must powercycle asap\n"); | 526 | pr_err("FPGA borked, you must powercycle ASAP\n"); |
529 | return -EBUSY; | 527 | return -EBUSY; |
530 | } | 528 | } |
531 | 529 | ||
@@ -533,10 +531,8 @@ static ssize_t ts78xx_fpga_store(struct kobject *kobj, | |||
533 | value = 1; | 531 | value = 1; |
534 | else if (strncmp(buf, "offline", sizeof("offline") - 1) == 0) | 532 | else if (strncmp(buf, "offline", sizeof("offline") - 1) == 0) |
535 | value = 0; | 533 | value = 0; |
536 | else { | 534 | else |
537 | pr_err("ts78xx_fpga_store: Invalid value\n"); | ||
538 | return -EINVAL; | 535 | return -EINVAL; |
539 | } | ||
540 | 536 | ||
541 | if (ts78xx_fpga.state == value) | 537 | if (ts78xx_fpga.state == value) |
542 | return n; | 538 | return n; |
@@ -614,7 +610,7 @@ static void __init ts78xx_init(void) | |||
614 | /* FPGA init */ | 610 | /* FPGA init */ |
615 | ts78xx_fpga_devices_zero_init(); | 611 | ts78xx_fpga_devices_zero_init(); |
616 | ret = ts78xx_fpga_load(); | 612 | ret = ts78xx_fpga_load(); |
617 | ret = sysfs_create_file(power_kobj, &ts78xx_fpga_attr.attr); | 613 | ret = sysfs_create_file(firmware_kobj, &ts78xx_fpga_attr.attr); |
618 | if (ret) | 614 | if (ret) |
619 | pr_err("sysfs_create_file failed: %d\n", ret); | 615 | pr_err("sysfs_create_file failed: %d\n", ret); |
620 | } | 616 | } |
diff --git a/arch/arm/mach-orion5x/wnr854t-setup.c b/arch/arm/mach-orion5x/wnr854t-setup.c index 078c03f7cd5..754c12b6abf 100644 --- a/arch/arm/mach-orion5x/wnr854t-setup.c +++ b/arch/arm/mach-orion5x/wnr854t-setup.c | |||
@@ -155,7 +155,6 @@ static int __init wnr854t_pci_map_irq(const struct pci_dev *dev, u8 slot, | |||
155 | 155 | ||
156 | static struct hw_pci wnr854t_pci __initdata = { | 156 | static struct hw_pci wnr854t_pci __initdata = { |
157 | .nr_controllers = 2, | 157 | .nr_controllers = 2, |
158 | .swizzle = pci_std_swizzle, | ||
159 | .setup = orion5x_pci_sys_setup, | 158 | .setup = orion5x_pci_sys_setup, |
160 | .scan = orion5x_pci_sys_scan_bus, | 159 | .scan = orion5x_pci_sys_scan_bus, |
161 | .map_irq = wnr854t_pci_map_irq, | 160 | .map_irq = wnr854t_pci_map_irq, |
diff --git a/arch/arm/mach-orion5x/wrt350n-v2-setup.c b/arch/arm/mach-orion5x/wrt350n-v2-setup.c index 46a9778171c..45c21251eb1 100644 --- a/arch/arm/mach-orion5x/wrt350n-v2-setup.c +++ b/arch/arm/mach-orion5x/wrt350n-v2-setup.c | |||
@@ -243,7 +243,6 @@ static int __init wrt350n_v2_pci_map_irq(const struct pci_dev *dev, u8 slot, | |||
243 | 243 | ||
244 | static struct hw_pci wrt350n_v2_pci __initdata = { | 244 | static struct hw_pci wrt350n_v2_pci __initdata = { |
245 | .nr_controllers = 2, | 245 | .nr_controllers = 2, |
246 | .swizzle = pci_std_swizzle, | ||
247 | .setup = orion5x_pci_sys_setup, | 246 | .setup = orion5x_pci_sys_setup, |
248 | .scan = orion5x_pci_sys_scan_bus, | 247 | .scan = orion5x_pci_sys_scan_bus, |
249 | .map_irq = wrt350n_v2_pci_map_irq, | 248 | .map_irq = wrt350n_v2_pci_map_irq, |
diff --git a/arch/arm/mach-prima2/irq.c b/arch/arm/mach-prima2/irq.c index 37c2de9b6f2..a7b9415d30f 100644 --- a/arch/arm/mach-prima2/irq.c +++ b/arch/arm/mach-prima2/irq.c | |||
@@ -42,7 +42,8 @@ sirfsoc_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num) | |||
42 | static __init void sirfsoc_irq_init(void) | 42 | static __init void sirfsoc_irq_init(void) |
43 | { | 43 | { |
44 | sirfsoc_alloc_gc(sirfsoc_intc_base, 0, 32); | 44 | sirfsoc_alloc_gc(sirfsoc_intc_base, 0, 32); |
45 | sirfsoc_alloc_gc(sirfsoc_intc_base + 4, 32, SIRFSOC_INTENAL_IRQ_END - 32); | 45 | sirfsoc_alloc_gc(sirfsoc_intc_base + 4, 32, |
46 | SIRFSOC_INTENAL_IRQ_END + 1 - 32); | ||
46 | 47 | ||
47 | writel_relaxed(0, sirfsoc_intc_base + SIRFSOC_INT_RISC_LEVEL0); | 48 | writel_relaxed(0, sirfsoc_intc_base + SIRFSOC_INT_RISC_LEVEL0); |
48 | writel_relaxed(0, sirfsoc_intc_base + SIRFSOC_INT_RISC_LEVEL1); | 49 | writel_relaxed(0, sirfsoc_intc_base + SIRFSOC_INT_RISC_LEVEL1); |
@@ -68,7 +69,8 @@ void __init sirfsoc_of_irq_init(void) | |||
68 | if (!sirfsoc_intc_base) | 69 | if (!sirfsoc_intc_base) |
69 | panic("unable to map intc cpu registers\n"); | 70 | panic("unable to map intc cpu registers\n"); |
70 | 71 | ||
71 | irq_domain_add_legacy(np, 32, 0, 0, &irq_domain_simple_ops, NULL); | 72 | irq_domain_add_legacy(np, SIRFSOC_INTENAL_IRQ_END + 1, 0, 0, |
73 | &irq_domain_simple_ops, NULL); | ||
72 | 74 | ||
73 | of_node_put(np); | 75 | of_node_put(np); |
74 | 76 | ||
diff --git a/arch/arm/mach-pxa/cm-x2xx-pci.c b/arch/arm/mach-pxa/cm-x2xx-pci.c index ebd9259f5ac..d8f816c24a2 100644 --- a/arch/arm/mach-pxa/cm-x2xx-pci.c +++ b/arch/arm/mach-pxa/cm-x2xx-pci.c | |||
@@ -181,11 +181,10 @@ static void cmx2xx_pci_preinit(void) | |||
181 | } | 181 | } |
182 | 182 | ||
183 | static struct hw_pci cmx2xx_pci __initdata = { | 183 | static struct hw_pci cmx2xx_pci __initdata = { |
184 | .swizzle = pci_std_swizzle, | ||
185 | .map_irq = cmx2xx_pci_map_irq, | 184 | .map_irq = cmx2xx_pci_map_irq, |
186 | .nr_controllers = 1, | 185 | .nr_controllers = 1, |
186 | .ops = &it8152_ops, | ||
187 | .setup = it8152_pci_setup, | 187 | .setup = it8152_pci_setup, |
188 | .scan = it8152_pci_scan_bus, | ||
189 | .preinit = cmx2xx_pci_preinit, | 188 | .preinit = cmx2xx_pci_preinit, |
190 | }; | 189 | }; |
191 | 190 | ||
diff --git a/arch/arm/mach-s3c24xx/bast-ide.c b/arch/arm/mach-s3c24xx/bast-ide.c index 298ececfa36..ba02cf8d80a 100644 --- a/arch/arm/mach-s3c24xx/bast-ide.c +++ b/arch/arm/mach-s3c24xx/bast-ide.c | |||
@@ -37,21 +37,9 @@ static struct pata_platform_info bast_ide_platdata = { | |||
37 | #define IDE_CS S3C2410_CS5 | 37 | #define IDE_CS S3C2410_CS5 |
38 | 38 | ||
39 | static struct resource bast_ide0_resource[] = { | 39 | static struct resource bast_ide0_resource[] = { |
40 | [0] = { | 40 | [0] = DEFINE_RES_MEM(IDE_CS + BAST_PA_IDEPRI, 8 * 0x20), |
41 | .start = IDE_CS + BAST_PA_IDEPRI, | 41 | [1] = DEFINE_RES_MEM(IDE_CS + BAST_PA_IDEPRIAUX + (6 * 0x20), 0x20), |
42 | .end = IDE_CS + BAST_PA_IDEPRI + (8 * 0x20) - 1, | 42 | [2] = DEFINE_RES_IRQ(IRQ_IDE0), |
43 | .flags = IORESOURCE_MEM, | ||
44 | }, | ||
45 | [1] = { | ||
46 | .start = IDE_CS + BAST_PA_IDEPRIAUX + (6 * 0x20) , | ||
47 | .end = IDE_CS + BAST_PA_IDEPRIAUX + (7 * 0x20) - 1, | ||
48 | .flags = IORESOURCE_MEM, | ||
49 | }, | ||
50 | [2] = { | ||
51 | .start = IRQ_IDE0, | ||
52 | .end = IRQ_IDE0, | ||
53 | .flags = IORESOURCE_IRQ, | ||
54 | }, | ||
55 | }; | 43 | }; |
56 | 44 | ||
57 | static struct platform_device bast_device_ide0 = { | 45 | static struct platform_device bast_device_ide0 = { |
@@ -67,21 +55,9 @@ static struct platform_device bast_device_ide0 = { | |||
67 | }; | 55 | }; |
68 | 56 | ||
69 | static struct resource bast_ide1_resource[] = { | 57 | static struct resource bast_ide1_resource[] = { |
70 | [0] = { | 58 | [0] = DEFINE_RES_MEM(IDE_CS + BAST_PA_IDESEC, 8 * 0x20), |
71 | .start = IDE_CS + BAST_PA_IDESEC, | 59 | [1] = DEFINE_RES_MEM(IDE_CS + BAST_PA_IDESECAUX + (6 * 0x20), 0x20), |
72 | .end = IDE_CS + BAST_PA_IDESEC + (8 * 0x20) - 1, | 60 | [2] = DEFINE_RES_IRQ(IRQ_IDE1), |
73 | .flags = IORESOURCE_MEM, | ||
74 | }, | ||
75 | [1] = { | ||
76 | .start = IDE_CS + BAST_PA_IDESECAUX + (6 * 0x20), | ||
77 | .end = IDE_CS + BAST_PA_IDESECAUX + (7 * 0x20) - 1, | ||
78 | .flags = IORESOURCE_MEM, | ||
79 | }, | ||
80 | [2] = { | ||
81 | .start = IRQ_IDE1, | ||
82 | .end = IRQ_IDE1, | ||
83 | .flags = IORESOURCE_IRQ, | ||
84 | }, | ||
85 | }; | 61 | }; |
86 | 62 | ||
87 | static struct platform_device bast_device_ide1 = { | 63 | static struct platform_device bast_device_ide1 = { |
diff --git a/arch/arm/mach-s3c24xx/mach-amlm5900.c b/arch/arm/mach-s3c24xx/mach-amlm5900.c index 4220cc60de3..ea2c4b003d5 100644 --- a/arch/arm/mach-s3c24xx/mach-amlm5900.c +++ b/arch/arm/mach-s3c24xx/mach-amlm5900.c | |||
@@ -65,13 +65,8 @@ | |||
65 | 65 | ||
66 | #include "common.h" | 66 | #include "common.h" |
67 | 67 | ||
68 | static struct resource amlm5900_nor_resource = { | 68 | static struct resource amlm5900_nor_resource = |
69 | .start = 0x00000000, | 69 | DEFINE_RES_MEM(0x00000000, SZ_16M); |
70 | .end = 0x01000000 - 1, | ||
71 | .flags = IORESOURCE_MEM, | ||
72 | }; | ||
73 | |||
74 | |||
75 | 70 | ||
76 | static struct mtd_partition amlm5900_mtd_partitions[] = { | 71 | static struct mtd_partition amlm5900_mtd_partitions[] = { |
77 | { | 72 | { |
diff --git a/arch/arm/mach-s3c24xx/mach-anubis.c b/arch/arm/mach-s3c24xx/mach-anubis.c index 60c72c54c21..5a7d0c0010f 100644 --- a/arch/arm/mach-s3c24xx/mach-anubis.c +++ b/arch/arm/mach-s3c24xx/mach-anubis.c | |||
@@ -235,19 +235,9 @@ static struct pata_platform_info anubis_ide_platdata = { | |||
235 | }; | 235 | }; |
236 | 236 | ||
237 | static struct resource anubis_ide0_resource[] = { | 237 | static struct resource anubis_ide0_resource[] = { |
238 | { | 238 | [0] = DEFINE_RES_MEM(S3C2410_CS3, 8 * 32), |
239 | .start = S3C2410_CS3, | 239 | [2] = DEFINE_RES_MEM(S3C2410_CS3 + (1 << 26) + (6 * 32), 32), |
240 | .end = S3C2410_CS3 + (8*32) - 1, | 240 | [3] = DEFINE_RES_IRQ(IRQ_IDE0), |
241 | .flags = IORESOURCE_MEM, | ||
242 | }, { | ||
243 | .start = S3C2410_CS3 + (1<<26) + (6*32), | ||
244 | .end = S3C2410_CS3 + (1<<26) + (7*32) - 1, | ||
245 | .flags = IORESOURCE_MEM, | ||
246 | }, { | ||
247 | .start = IRQ_IDE0, | ||
248 | .end = IRQ_IDE0, | ||
249 | .flags = IORESOURCE_IRQ, | ||
250 | }, | ||
251 | }; | 241 | }; |
252 | 242 | ||
253 | static struct platform_device anubis_device_ide0 = { | 243 | static struct platform_device anubis_device_ide0 = { |
@@ -262,19 +252,9 @@ static struct platform_device anubis_device_ide0 = { | |||
262 | }; | 252 | }; |
263 | 253 | ||
264 | static struct resource anubis_ide1_resource[] = { | 254 | static struct resource anubis_ide1_resource[] = { |
265 | { | 255 | [0] = DEFINE_RES_MEM(S3C2410_CS4, 8 * 32), |
266 | .start = S3C2410_CS4, | 256 | [1] = DEFINE_RES_MEM(S3C2410_CS4 + (1 << 26) + (6 * 32), 32), |
267 | .end = S3C2410_CS4 + (8*32) - 1, | 257 | [2] = DEFINE_RES_IRQ(IRQ_IDE0), |
268 | .flags = IORESOURCE_MEM, | ||
269 | }, { | ||
270 | .start = S3C2410_CS4 + (1<<26) + (6*32), | ||
271 | .end = S3C2410_CS4 + (1<<26) + (7*32) - 1, | ||
272 | .flags = IORESOURCE_MEM, | ||
273 | }, { | ||
274 | .start = IRQ_IDE0, | ||
275 | .end = IRQ_IDE0, | ||
276 | .flags = IORESOURCE_IRQ, | ||
277 | }, | ||
278 | }; | 258 | }; |
279 | 259 | ||
280 | static struct platform_device anubis_device_ide1 = { | 260 | static struct platform_device anubis_device_ide1 = { |
@@ -298,16 +278,8 @@ static struct ax_plat_data anubis_asix_platdata = { | |||
298 | }; | 278 | }; |
299 | 279 | ||
300 | static struct resource anubis_asix_resource[] = { | 280 | static struct resource anubis_asix_resource[] = { |
301 | [0] = { | 281 | [0] = DEFINE_RES_MEM(S3C2410_CS5, 0x20 * 0x20), |
302 | .start = S3C2410_CS5, | 282 | [1] = DEFINE_RES_IRQ(IRQ_ASIX), |
303 | .end = S3C2410_CS5 + (0x20 * 0x20) -1, | ||
304 | .flags = IORESOURCE_MEM | ||
305 | }, | ||
306 | [1] = { | ||
307 | .start = IRQ_ASIX, | ||
308 | .end = IRQ_ASIX, | ||
309 | .flags = IORESOURCE_IRQ | ||
310 | } | ||
311 | }; | 283 | }; |
312 | 284 | ||
313 | static struct platform_device anubis_device_asix = { | 285 | static struct platform_device anubis_device_asix = { |
@@ -323,21 +295,9 @@ static struct platform_device anubis_device_asix = { | |||
323 | /* SM501 */ | 295 | /* SM501 */ |
324 | 296 | ||
325 | static struct resource anubis_sm501_resource[] = { | 297 | static struct resource anubis_sm501_resource[] = { |
326 | [0] = { | 298 | [0] = DEFINE_RES_MEM(S3C2410_CS2, SZ_8M), |
327 | .start = S3C2410_CS2, | 299 | [1] = DEFINE_RES_MEM(S3C2410_CS2 + SZ_64M - SZ_2M, SZ_2M), |
328 | .end = S3C2410_CS2 + SZ_8M, | 300 | [2] = DEFINE_RES_IRQ(IRQ_EINT0), |
329 | .flags = IORESOURCE_MEM, | ||
330 | }, | ||
331 | [1] = { | ||
332 | .start = S3C2410_CS2 + SZ_64M - SZ_2M, | ||
333 | .end = S3C2410_CS2 + SZ_64M - 1, | ||
334 | .flags = IORESOURCE_MEM, | ||
335 | }, | ||
336 | [2] = { | ||
337 | .start = IRQ_EINT0, | ||
338 | .end = IRQ_EINT0, | ||
339 | .flags = IORESOURCE_IRQ, | ||
340 | }, | ||
341 | }; | 301 | }; |
342 | 302 | ||
343 | static struct sm501_initdata anubis_sm501_initdata = { | 303 | static struct sm501_initdata anubis_sm501_initdata = { |
diff --git a/arch/arm/mach-s3c24xx/mach-at2440evb.c b/arch/arm/mach-s3c24xx/mach-at2440evb.c index d7ae49c9011..7a05abf1270 100644 --- a/arch/arm/mach-s3c24xx/mach-at2440evb.c +++ b/arch/arm/mach-s3c24xx/mach-at2440evb.c | |||
@@ -118,21 +118,10 @@ static struct s3c2410_platform_nand __initdata at2440evb_nand_info = { | |||
118 | /* DM9000AEP 10/100 ethernet controller */ | 118 | /* DM9000AEP 10/100 ethernet controller */ |
119 | 119 | ||
120 | static struct resource at2440evb_dm9k_resource[] = { | 120 | static struct resource at2440evb_dm9k_resource[] = { |
121 | [0] = { | 121 | [0] = DEFINE_RES_MEM(S3C2410_CS3, 4), |
122 | .start = S3C2410_CS3, | 122 | [1] = DEFINE_RES_MEM(S3C2410_CS3 + 4, 4), |
123 | .end = S3C2410_CS3 + 3, | 123 | [2] = DEFINE_RES_NAMED(IRQ_EINT7, 1, NULL, IORESOURCE_IRQ \ |
124 | .flags = IORESOURCE_MEM | 124 | | IORESOURCE_IRQ_HIGHEDGE), |
125 | }, | ||
126 | [1] = { | ||
127 | .start = S3C2410_CS3 + 4, | ||
128 | .end = S3C2410_CS3 + 7, | ||
129 | .flags = IORESOURCE_MEM | ||
130 | }, | ||
131 | [2] = { | ||
132 | .start = IRQ_EINT7, | ||
133 | .end = IRQ_EINT7, | ||
134 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, | ||
135 | } | ||
136 | }; | 125 | }; |
137 | 126 | ||
138 | static struct dm9000_plat_data at2440evb_dm9k_pdata = { | 127 | static struct dm9000_plat_data at2440evb_dm9k_pdata = { |
diff --git a/arch/arm/mach-s3c24xx/mach-bast.c b/arch/arm/mach-s3c24xx/mach-bast.c index 53219c02eca..1cf1720682d 100644 --- a/arch/arm/mach-s3c24xx/mach-bast.c +++ b/arch/arm/mach-s3c24xx/mach-bast.c | |||
@@ -310,22 +310,10 @@ static struct s3c2410_platform_nand __initdata bast_nand_info = { | |||
310 | /* DM9000 */ | 310 | /* DM9000 */ |
311 | 311 | ||
312 | static struct resource bast_dm9k_resource[] = { | 312 | static struct resource bast_dm9k_resource[] = { |
313 | [0] = { | 313 | [0] = DEFINE_RES_MEM(S3C2410_CS5 + BAST_PA_DM9000, 4), |
314 | .start = S3C2410_CS5 + BAST_PA_DM9000, | 314 | [1] = DEFINE_RES_MEM(S3C2410_CS5 + BAST_PA_DM9000 + 0x40, 0x40), |
315 | .end = S3C2410_CS5 + BAST_PA_DM9000 + 3, | 315 | [2] = DEFINE_RES_NAMED(IRQ_DM9000 , 1, NULL, IORESOURCE_IRQ \ |
316 | .flags = IORESOURCE_MEM, | 316 | | IORESOURCE_IRQ_HIGHLEVEL), |
317 | }, | ||
318 | [1] = { | ||
319 | .start = S3C2410_CS5 + BAST_PA_DM9000 + 0x40, | ||
320 | .end = S3C2410_CS5 + BAST_PA_DM9000 + 0x40 + 0x3f, | ||
321 | .flags = IORESOURCE_MEM, | ||
322 | }, | ||
323 | [2] = { | ||
324 | .start = IRQ_DM9000, | ||
325 | .end = IRQ_DM9000, | ||
326 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | ||
327 | } | ||
328 | |||
329 | }; | 317 | }; |
330 | 318 | ||
331 | /* for the moment we limit ourselves to 16bit IO until some | 319 | /* for the moment we limit ourselves to 16bit IO until some |
@@ -400,21 +388,9 @@ static struct ax_plat_data bast_asix_platdata = { | |||
400 | }; | 388 | }; |
401 | 389 | ||
402 | static struct resource bast_asix_resource[] = { | 390 | static struct resource bast_asix_resource[] = { |
403 | [0] = { | 391 | [0] = DEFINE_RES_MEM(S3C2410_CS5 + BAST_PA_ASIXNET, 0x18 * 0x20), |
404 | .start = S3C2410_CS5 + BAST_PA_ASIXNET, | 392 | [1] = DEFINE_RES_MEM(S3C2410_CS5 + BAST_PA_ASIXNET + (0x1f * 0x20), 1), |
405 | .end = S3C2410_CS5 + BAST_PA_ASIXNET + (0x18 * 0x20) - 1, | 393 | [2] = DEFINE_RES_IRQ(IRQ_ASIX), |
406 | .flags = IORESOURCE_MEM, | ||
407 | }, | ||
408 | [1] = { | ||
409 | .start = S3C2410_CS5 + BAST_PA_ASIXNET + (0x1f * 0x20), | ||
410 | .end = S3C2410_CS5 + BAST_PA_ASIXNET + (0x1f * 0x20), | ||
411 | .flags = IORESOURCE_MEM, | ||
412 | }, | ||
413 | [2] = { | ||
414 | .start = IRQ_ASIX, | ||
415 | .end = IRQ_ASIX, | ||
416 | .flags = IORESOURCE_IRQ | ||
417 | } | ||
418 | }; | 394 | }; |
419 | 395 | ||
420 | static struct platform_device bast_device_asix = { | 396 | static struct platform_device bast_device_asix = { |
@@ -430,11 +406,8 @@ static struct platform_device bast_device_asix = { | |||
430 | /* Asix AX88796 10/100 ethernet controller parallel port */ | 406 | /* Asix AX88796 10/100 ethernet controller parallel port */ |
431 | 407 | ||
432 | static struct resource bast_asixpp_resource[] = { | 408 | static struct resource bast_asixpp_resource[] = { |
433 | [0] = { | 409 | [0] = DEFINE_RES_MEM(S3C2410_CS5 + BAST_PA_ASIXNET + (0x18 * 0x20), \ |
434 | .start = S3C2410_CS5 + BAST_PA_ASIXNET + (0x18 * 0x20), | 410 | 0x30 * 0x20), |
435 | .end = S3C2410_CS5 + BAST_PA_ASIXNET + (0x1b * 0x20) - 1, | ||
436 | .flags = IORESOURCE_MEM, | ||
437 | } | ||
438 | }; | 411 | }; |
439 | 412 | ||
440 | static struct platform_device bast_device_axpp = { | 413 | static struct platform_device bast_device_axpp = { |
diff --git a/arch/arm/mach-s3c24xx/mach-gta02.c b/arch/arm/mach-s3c24xx/mach-gta02.c index ba5d8539410..0f29f64a3ee 100644 --- a/arch/arm/mach-s3c24xx/mach-gta02.c +++ b/arch/arm/mach-s3c24xx/mach-gta02.c | |||
@@ -387,11 +387,8 @@ static struct physmap_flash_data gta02_nor_flash_data = { | |||
387 | .width = 2, | 387 | .width = 2, |
388 | }; | 388 | }; |
389 | 389 | ||
390 | static struct resource gta02_nor_flash_resource = { | 390 | static struct resource gta02_nor_flash_resource = |
391 | .start = GTA02_FLASH_BASE, | 391 | DEFINE_RES_MEM(GTA02_FLASH_BASE, GTA02_FLASH_SIZE); |
392 | .end = GTA02_FLASH_BASE + GTA02_FLASH_SIZE - 1, | ||
393 | .flags = IORESOURCE_MEM, | ||
394 | }; | ||
395 | 392 | ||
396 | static struct platform_device gta02_nor_flash = { | 393 | static struct platform_device gta02_nor_flash = { |
397 | .name = "physmap-flash", | 394 | .name = "physmap-flash", |
diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c index 6b21ba107ea..bb8d008d5a5 100644 --- a/arch/arm/mach-s3c24xx/mach-h1940.c +++ b/arch/arm/mach-s3c24xx/mach-h1940.c | |||
@@ -253,13 +253,8 @@ static struct pda_power_pdata power_supply_info = { | |||
253 | }; | 253 | }; |
254 | 254 | ||
255 | static struct resource power_supply_resources[] = { | 255 | static struct resource power_supply_resources[] = { |
256 | [0] = { | 256 | [0] = DEFINE_RES_NAMED(IRQ_EINT2, 1, "ac", IORESOURCE_IRQ \ |
257 | .name = "ac", | 257 | | IORESOURCE_IRQ_LOWEDGE | IORESOURCE_IRQ_HIGHEDGE), |
258 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE | | ||
259 | IORESOURCE_IRQ_HIGHEDGE, | ||
260 | .start = IRQ_EINT2, | ||
261 | .end = IRQ_EINT2, | ||
262 | }, | ||
263 | }; | 258 | }; |
264 | 259 | ||
265 | static struct platform_device power_supply = { | 260 | static struct platform_device power_supply = { |
diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c24xx/mach-mini2440.c index 5d66fb218a4..f092b188ab7 100644 --- a/arch/arm/mach-s3c24xx/mach-mini2440.c +++ b/arch/arm/mach-s3c24xx/mach-mini2440.c | |||
@@ -292,21 +292,10 @@ static struct s3c2410_platform_nand mini2440_nand_info __initdata = { | |||
292 | /* DM9000AEP 10/100 ethernet controller */ | 292 | /* DM9000AEP 10/100 ethernet controller */ |
293 | 293 | ||
294 | static struct resource mini2440_dm9k_resource[] = { | 294 | static struct resource mini2440_dm9k_resource[] = { |
295 | [0] = { | 295 | [0] = DEFINE_RES_MEM(MACH_MINI2440_DM9K_BASE, 4), |
296 | .start = MACH_MINI2440_DM9K_BASE, | 296 | [1] = DEFINE_RES_MEM(MACH_MINI2440_DM9K_BASE + 4, 4), |
297 | .end = MACH_MINI2440_DM9K_BASE + 3, | 297 | [2] = DEFINE_RES_NAMED(IRQ_EINT7, 1, NULL, IORESOURCE_IRQ \ |
298 | .flags = IORESOURCE_MEM | 298 | | IORESOURCE_IRQ_HIGHEDGE), |
299 | }, | ||
300 | [1] = { | ||
301 | .start = MACH_MINI2440_DM9K_BASE + 4, | ||
302 | .end = MACH_MINI2440_DM9K_BASE + 7, | ||
303 | .flags = IORESOURCE_MEM | ||
304 | }, | ||
305 | [2] = { | ||
306 | .start = IRQ_EINT7, | ||
307 | .end = IRQ_EINT7, | ||
308 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, | ||
309 | } | ||
310 | }; | 299 | }; |
311 | 300 | ||
312 | /* | 301 | /* |
diff --git a/arch/arm/mach-s3c24xx/mach-nexcoder.c b/arch/arm/mach-s3c24xx/mach-nexcoder.c index 5198e3e1c5b..5c05ba1c330 100644 --- a/arch/arm/mach-s3c24xx/mach-nexcoder.c +++ b/arch/arm/mach-s3c24xx/mach-nexcoder.c | |||
@@ -84,11 +84,7 @@ static struct s3c2410_uartcfg nexcoder_uartcfgs[] __initdata = { | |||
84 | /* NOR Flash on NexVision NexCoder 2440 board */ | 84 | /* NOR Flash on NexVision NexCoder 2440 board */ |
85 | 85 | ||
86 | static struct resource nexcoder_nor_resource[] = { | 86 | static struct resource nexcoder_nor_resource[] = { |
87 | [0] = { | 87 | [0] = DEFINE_RES_MEM(S3C2410_CS0, SZ_8M), |
88 | .start = S3C2410_CS0, | ||
89 | .end = S3C2410_CS0 + (8*1024*1024) - 1, | ||
90 | .flags = IORESOURCE_MEM, | ||
91 | } | ||
92 | }; | 88 | }; |
93 | 89 | ||
94 | static struct map_info nexcoder_nor_map = { | 90 | static struct map_info nexcoder_nor_map = { |
diff --git a/arch/arm/mach-s3c24xx/mach-osiris.c b/arch/arm/mach-s3c24xx/mach-osiris.c index c5daeb612a8..95d07725502 100644 --- a/arch/arm/mach-s3c24xx/mach-osiris.c +++ b/arch/arm/mach-s3c24xx/mach-osiris.c | |||
@@ -244,16 +244,8 @@ static struct s3c2410_platform_nand __initdata osiris_nand_info = { | |||
244 | /* PCMCIA control and configuration */ | 244 | /* PCMCIA control and configuration */ |
245 | 245 | ||
246 | static struct resource osiris_pcmcia_resource[] = { | 246 | static struct resource osiris_pcmcia_resource[] = { |
247 | [0] = { | 247 | [0] = DEFINE_RES_MEM(0x0f000000, SZ_1M), |
248 | .start = 0x0f000000, | 248 | [1] = DEFINE_RES_MEM(0x0c000000, SZ_1M), |
249 | .end = 0x0f100000, | ||
250 | .flags = IORESOURCE_MEM, | ||
251 | }, | ||
252 | [1] = { | ||
253 | .start = 0x0c000000, | ||
254 | .end = 0x0c100000, | ||
255 | .flags = IORESOURCE_MEM, | ||
256 | } | ||
257 | }; | 249 | }; |
258 | 250 | ||
259 | static struct platform_device osiris_pcmcia = { | 251 | static struct platform_device osiris_pcmcia = { |
diff --git a/arch/arm/mach-s3c24xx/mach-otom.c b/arch/arm/mach-s3c24xx/mach-otom.c index 5f1e0eeb38a..bc4b6efb3b2 100644 --- a/arch/arm/mach-s3c24xx/mach-otom.c +++ b/arch/arm/mach-s3c24xx/mach-otom.c | |||
@@ -77,11 +77,7 @@ static struct s3c2410_uartcfg otom11_uartcfgs[] __initdata = { | |||
77 | /* NOR Flash on NexVision OTOM board */ | 77 | /* NOR Flash on NexVision OTOM board */ |
78 | 78 | ||
79 | static struct resource otom_nor_resource[] = { | 79 | static struct resource otom_nor_resource[] = { |
80 | [0] = { | 80 | [0] = DEFINE_RES_MEM(S3C2410_CS0, SZ_4M), |
81 | .start = S3C2410_CS0, | ||
82 | .end = S3C2410_CS0 + (4*1024*1024) - 1, | ||
83 | .flags = IORESOURCE_MEM, | ||
84 | } | ||
85 | }; | 81 | }; |
86 | 82 | ||
87 | static struct platform_device otom_device_nor = { | 83 | static struct platform_device otom_device_nor = { |
diff --git a/arch/arm/mach-s3c24xx/mach-qt2410.c b/arch/arm/mach-s3c24xx/mach-qt2410.c index 91c16d9d245..b868dddcb83 100644 --- a/arch/arm/mach-s3c24xx/mach-qt2410.c +++ b/arch/arm/mach-s3c24xx/mach-qt2410.c | |||
@@ -180,16 +180,8 @@ static struct s3c2410fb_mach_info qt2410_fb_info __initdata = { | |||
180 | /* CS8900 */ | 180 | /* CS8900 */ |
181 | 181 | ||
182 | static struct resource qt2410_cs89x0_resources[] = { | 182 | static struct resource qt2410_cs89x0_resources[] = { |
183 | [0] = { | 183 | [0] = DEFINE_RES_MEM(0x19000000, 17), |
184 | .start = 0x19000000, | 184 | [1] = DEFINE_RES_IRQ(IRQ_EINT9), |
185 | .end = 0x19000000 + 16, | ||
186 | .flags = IORESOURCE_MEM, | ||
187 | }, | ||
188 | [1] = { | ||
189 | .start = IRQ_EINT9, | ||
190 | .end = IRQ_EINT9, | ||
191 | .flags = IORESOURCE_IRQ, | ||
192 | }, | ||
193 | }; | 185 | }; |
194 | 186 | ||
195 | static struct platform_device qt2410_cs89x0 = { | 187 | static struct platform_device qt2410_cs89x0 = { |
diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c index 200debb4c72..a6762aae472 100644 --- a/arch/arm/mach-s3c24xx/mach-rx1950.c +++ b/arch/arm/mach-s3c24xx/mach-rx1950.c | |||
@@ -152,13 +152,8 @@ static struct pda_power_pdata power_supply_info = { | |||
152 | }; | 152 | }; |
153 | 153 | ||
154 | static struct resource power_supply_resources[] = { | 154 | static struct resource power_supply_resources[] = { |
155 | [0] = { | 155 | [0] = DEFINE_RES_NAMED(IRQ_EINT2, 1, "ac", IORESOURCE_IRQ \ |
156 | .name = "ac", | 156 | | IORESOURCE_IRQ_LOWEDGE | IORESOURCE_IRQ_HIGHEDGE), |
157 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE | | ||
158 | IORESOURCE_IRQ_HIGHEDGE, | ||
159 | .start = IRQ_EINT2, | ||
160 | .end = IRQ_EINT2, | ||
161 | }, | ||
162 | }; | 157 | }; |
163 | 158 | ||
164 | static struct platform_device power_supply = { | 159 | static struct platform_device power_supply = { |
diff --git a/arch/arm/mach-s3c24xx/mach-tct_hammer.c b/arch/arm/mach-s3c24xx/mach-tct_hammer.c index 1114666f0ef..fe990289ee7 100644 --- a/arch/arm/mach-s3c24xx/mach-tct_hammer.c +++ b/arch/arm/mach-s3c24xx/mach-tct_hammer.c | |||
@@ -56,11 +56,8 @@ | |||
56 | 56 | ||
57 | #include "common.h" | 57 | #include "common.h" |
58 | 58 | ||
59 | static struct resource tct_hammer_nor_resource = { | 59 | static struct resource tct_hammer_nor_resource = |
60 | .start = 0x00000000, | 60 | DEFINE_RES_MEM(0x00000000, SZ_16M); |
61 | .end = 0x01000000 - 1, | ||
62 | .flags = IORESOURCE_MEM, | ||
63 | }; | ||
64 | 61 | ||
65 | static struct mtd_partition tct_hammer_mtd_partitions[] = { | 62 | static struct mtd_partition tct_hammer_mtd_partitions[] = { |
66 | { | 63 | { |
diff --git a/arch/arm/mach-s3c24xx/mach-vr1000.c b/arch/arm/mach-s3c24xx/mach-vr1000.c index 87608d45dac..bd5f189f042 100644 --- a/arch/arm/mach-s3c24xx/mach-vr1000.c +++ b/arch/arm/mach-s3c24xx/mach-vr1000.c | |||
@@ -187,40 +187,17 @@ static struct platform_device serial_device = { | |||
187 | /* DM9000 ethernet devices */ | 187 | /* DM9000 ethernet devices */ |
188 | 188 | ||
189 | static struct resource vr1000_dm9k0_resource[] = { | 189 | static struct resource vr1000_dm9k0_resource[] = { |
190 | [0] = { | 190 | [0] = DEFINE_RES_MEM(S3C2410_CS5 + VR1000_PA_DM9000, 4), |
191 | .start = S3C2410_CS5 + VR1000_PA_DM9000, | 191 | [1] = DEFINE_RES_MEM(S3C2410_CS5 + VR1000_PA_DM9000 + 0x40, 0x40), |
192 | .end = S3C2410_CS5 + VR1000_PA_DM9000 + 3, | 192 | [2] = DEFINE_RES_NAMED(IRQ_VR1000_DM9000A, 1, NULL, IORESOURCE_IRQ \ |
193 | .flags = IORESOURCE_MEM | 193 | | IORESOURCE_IRQ_HIGHLEVEL), |
194 | }, | ||
195 | [1] = { | ||
196 | .start = S3C2410_CS5 + VR1000_PA_DM9000 + 0x40, | ||
197 | .end = S3C2410_CS5 + VR1000_PA_DM9000 + 0x7f, | ||
198 | .flags = IORESOURCE_MEM | ||
199 | }, | ||
200 | [2] = { | ||
201 | .start = IRQ_VR1000_DM9000A, | ||
202 | .end = IRQ_VR1000_DM9000A, | ||
203 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | ||
204 | } | ||
205 | |||
206 | }; | 194 | }; |
207 | 195 | ||
208 | static struct resource vr1000_dm9k1_resource[] = { | 196 | static struct resource vr1000_dm9k1_resource[] = { |
209 | [0] = { | 197 | [0] = DEFINE_RES_MEM(S3C2410_CS5 + VR1000_PA_DM9000 + 0x80, 4), |
210 | .start = S3C2410_CS5 + VR1000_PA_DM9000 + 0x80, | 198 | [1] = DEFINE_RES_MEM(S3C2410_CS5 + VR1000_PA_DM9000 + 0xC0, 0x40), |
211 | .end = S3C2410_CS5 + VR1000_PA_DM9000 + 0x83, | 199 | [2] = DEFINE_RES_NAMED(IRQ_VR1000_DM9000N, 1, NULL, IORESOURCE_IRQ \ |
212 | .flags = IORESOURCE_MEM | 200 | | IORESOURCE_IRQ_HIGHLEVEL), |
213 | }, | ||
214 | [1] = { | ||
215 | .start = S3C2410_CS5 + VR1000_PA_DM9000 + 0xC0, | ||
216 | .end = S3C2410_CS5 + VR1000_PA_DM9000 + 0xFF, | ||
217 | .flags = IORESOURCE_MEM | ||
218 | }, | ||
219 | [2] = { | ||
220 | .start = IRQ_VR1000_DM9000N, | ||
221 | .end = IRQ_VR1000_DM9000N, | ||
222 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | ||
223 | } | ||
224 | }; | 201 | }; |
225 | 202 | ||
226 | /* for the moment we limit ourselves to 16bit IO until some | 203 | /* for the moment we limit ourselves to 16bit IO until some |
diff --git a/arch/arm/mach-s3c24xx/simtec-nor.c b/arch/arm/mach-s3c24xx/simtec-nor.c index b9d6d4f92c0..029744fcaac 100644 --- a/arch/arm/mach-s3c24xx/simtec-nor.c +++ b/arch/arm/mach-s3c24xx/simtec-nor.c | |||
@@ -55,11 +55,7 @@ static struct physmap_flash_data simtec_nor_pdata = { | |||
55 | }; | 55 | }; |
56 | 56 | ||
57 | static struct resource simtec_nor_resource[] = { | 57 | static struct resource simtec_nor_resource[] = { |
58 | [0] = { | 58 | [0] = DEFINE_RES_MEM(S3C2410_CS1 + 0x4000000, SZ_8M), |
59 | .start = S3C2410_CS1 + 0x4000000, | ||
60 | .end = S3C2410_CS1 + 0x4000000 + SZ_8M - 1, | ||
61 | .flags = IORESOURCE_MEM, | ||
62 | } | ||
63 | }; | 59 | }; |
64 | 60 | ||
65 | static struct platform_device simtec_device_nor = { | 61 | static struct platform_device simtec_device_nor = { |
diff --git a/arch/arm/mach-s3c64xx/dev-audio.c b/arch/arm/mach-s3c64xx/dev-audio.c index 93470b158a4..124fd5d6300 100644 --- a/arch/arm/mach-s3c64xx/dev-audio.c +++ b/arch/arm/mach-s3c64xx/dev-audio.c | |||
@@ -57,21 +57,9 @@ static int s3c64xx_i2s_cfg_gpio(struct platform_device *pdev) | |||
57 | } | 57 | } |
58 | 58 | ||
59 | static struct resource s3c64xx_iis0_resource[] = { | 59 | static struct resource s3c64xx_iis0_resource[] = { |
60 | [0] = { | 60 | [0] = DEFINE_RES_MEM(S3C64XX_PA_IIS0, SZ_256), |
61 | .start = S3C64XX_PA_IIS0, | 61 | [1] = DEFINE_RES_DMA(DMACH_I2S0_OUT), |
62 | .end = S3C64XX_PA_IIS0 + 0x100 - 1, | 62 | [2] = DEFINE_RES_DMA(DMACH_I2S0_IN), |
63 | .flags = IORESOURCE_MEM, | ||
64 | }, | ||
65 | [1] = { | ||
66 | .start = DMACH_I2S0_OUT, | ||
67 | .end = DMACH_I2S0_OUT, | ||
68 | .flags = IORESOURCE_DMA, | ||
69 | }, | ||
70 | [2] = { | ||
71 | .start = DMACH_I2S0_IN, | ||
72 | .end = DMACH_I2S0_IN, | ||
73 | .flags = IORESOURCE_DMA, | ||
74 | }, | ||
75 | }; | 63 | }; |
76 | 64 | ||
77 | static struct s3c_audio_pdata i2sv3_pdata = { | 65 | static struct s3c_audio_pdata i2sv3_pdata = { |
@@ -95,21 +83,9 @@ struct platform_device s3c64xx_device_iis0 = { | |||
95 | EXPORT_SYMBOL(s3c64xx_device_iis0); | 83 | EXPORT_SYMBOL(s3c64xx_device_iis0); |
96 | 84 | ||
97 | static struct resource s3c64xx_iis1_resource[] = { | 85 | static struct resource s3c64xx_iis1_resource[] = { |
98 | [0] = { | 86 | [0] = DEFINE_RES_MEM(S3C64XX_PA_IIS1, SZ_256), |
99 | .start = S3C64XX_PA_IIS1, | 87 | [1] = DEFINE_RES_DMA(DMACH_I2S1_OUT), |
100 | .end = S3C64XX_PA_IIS1 + 0x100 - 1, | 88 | [2] = DEFINE_RES_DMA(DMACH_I2S1_IN), |
101 | .flags = IORESOURCE_MEM, | ||
102 | }, | ||
103 | [1] = { | ||
104 | .start = DMACH_I2S1_OUT, | ||
105 | .end = DMACH_I2S1_OUT, | ||
106 | .flags = IORESOURCE_DMA, | ||
107 | }, | ||
108 | [2] = { | ||
109 | .start = DMACH_I2S1_IN, | ||
110 | .end = DMACH_I2S1_IN, | ||
111 | .flags = IORESOURCE_DMA, | ||
112 | }, | ||
113 | }; | 89 | }; |
114 | 90 | ||
115 | struct platform_device s3c64xx_device_iis1 = { | 91 | struct platform_device s3c64xx_device_iis1 = { |
@@ -124,21 +100,9 @@ struct platform_device s3c64xx_device_iis1 = { | |||
124 | EXPORT_SYMBOL(s3c64xx_device_iis1); | 100 | EXPORT_SYMBOL(s3c64xx_device_iis1); |
125 | 101 | ||
126 | static struct resource s3c64xx_iisv4_resource[] = { | 102 | static struct resource s3c64xx_iisv4_resource[] = { |
127 | [0] = { | 103 | [0] = DEFINE_RES_MEM(S3C64XX_PA_IISV4, SZ_256), |
128 | .start = S3C64XX_PA_IISV4, | 104 | [1] = DEFINE_RES_DMA(DMACH_HSI_I2SV40_TX), |
129 | .end = S3C64XX_PA_IISV4 + 0x100 - 1, | 105 | [2] = DEFINE_RES_DMA(DMACH_HSI_I2SV40_RX), |
130 | .flags = IORESOURCE_MEM, | ||
131 | }, | ||
132 | [1] = { | ||
133 | .start = DMACH_HSI_I2SV40_TX, | ||
134 | .end = DMACH_HSI_I2SV40_TX, | ||
135 | .flags = IORESOURCE_DMA, | ||
136 | }, | ||
137 | [2] = { | ||
138 | .start = DMACH_HSI_I2SV40_RX, | ||
139 | .end = DMACH_HSI_I2SV40_RX, | ||
140 | .flags = IORESOURCE_DMA, | ||
141 | }, | ||
142 | }; | 106 | }; |
143 | 107 | ||
144 | static struct s3c_audio_pdata i2sv4_pdata = { | 108 | static struct s3c_audio_pdata i2sv4_pdata = { |
@@ -187,21 +151,9 @@ static int s3c64xx_pcm_cfg_gpio(struct platform_device *pdev) | |||
187 | } | 151 | } |
188 | 152 | ||
189 | static struct resource s3c64xx_pcm0_resource[] = { | 153 | static struct resource s3c64xx_pcm0_resource[] = { |
190 | [0] = { | 154 | [0] = DEFINE_RES_MEM(S3C64XX_PA_PCM0, SZ_256), |
191 | .start = S3C64XX_PA_PCM0, | 155 | [1] = DEFINE_RES_DMA(DMACH_PCM0_TX), |
192 | .end = S3C64XX_PA_PCM0 + 0x100 - 1, | 156 | [2] = DEFINE_RES_DMA(DMACH_PCM0_RX), |
193 | .flags = IORESOURCE_MEM, | ||
194 | }, | ||
195 | [1] = { | ||
196 | .start = DMACH_PCM0_TX, | ||
197 | .end = DMACH_PCM0_TX, | ||
198 | .flags = IORESOURCE_DMA, | ||
199 | }, | ||
200 | [2] = { | ||
201 | .start = DMACH_PCM0_RX, | ||
202 | .end = DMACH_PCM0_RX, | ||
203 | .flags = IORESOURCE_DMA, | ||
204 | }, | ||
205 | }; | 157 | }; |
206 | 158 | ||
207 | static struct s3c_audio_pdata s3c_pcm0_pdata = { | 159 | static struct s3c_audio_pdata s3c_pcm0_pdata = { |
@@ -220,21 +172,9 @@ struct platform_device s3c64xx_device_pcm0 = { | |||
220 | EXPORT_SYMBOL(s3c64xx_device_pcm0); | 172 | EXPORT_SYMBOL(s3c64xx_device_pcm0); |
221 | 173 | ||
222 | static struct resource s3c64xx_pcm1_resource[] = { | 174 | static struct resource s3c64xx_pcm1_resource[] = { |
223 | [0] = { | 175 | [0] = DEFINE_RES_MEM(S3C64XX_PA_PCM1, SZ_256), |
224 | .start = S3C64XX_PA_PCM1, | 176 | [1] = DEFINE_RES_DMA(DMACH_PCM1_TX), |
225 | .end = S3C64XX_PA_PCM1 + 0x100 - 1, | 177 | [2] = DEFINE_RES_DMA(DMACH_PCM1_RX), |
226 | .flags = IORESOURCE_MEM, | ||
227 | }, | ||
228 | [1] = { | ||
229 | .start = DMACH_PCM1_TX, | ||
230 | .end = DMACH_PCM1_TX, | ||
231 | .flags = IORESOURCE_DMA, | ||
232 | }, | ||
233 | [2] = { | ||
234 | .start = DMACH_PCM1_RX, | ||
235 | .end = DMACH_PCM1_RX, | ||
236 | .flags = IORESOURCE_DMA, | ||
237 | }, | ||
238 | }; | 178 | }; |
239 | 179 | ||
240 | static struct s3c_audio_pdata s3c_pcm1_pdata = { | 180 | static struct s3c_audio_pdata s3c_pcm1_pdata = { |
@@ -265,31 +205,11 @@ static int s3c64xx_ac97_cfg_gpe(struct platform_device *pdev) | |||
265 | } | 205 | } |
266 | 206 | ||
267 | static struct resource s3c64xx_ac97_resource[] = { | 207 | static struct resource s3c64xx_ac97_resource[] = { |
268 | [0] = { | 208 | [0] = DEFINE_RES_MEM(S3C64XX_PA_AC97, SZ_256), |
269 | .start = S3C64XX_PA_AC97, | 209 | [1] = DEFINE_RES_DMA(DMACH_AC97_PCMOUT), |
270 | .end = S3C64XX_PA_AC97 + 0x100 - 1, | 210 | [2] = DEFINE_RES_DMA(DMACH_AC97_PCMIN), |
271 | .flags = IORESOURCE_MEM, | 211 | [3] = DEFINE_RES_DMA(DMACH_AC97_MICIN), |
272 | }, | 212 | [4] = DEFINE_RES_IRQ(IRQ_AC97), |
273 | [1] = { | ||
274 | .start = DMACH_AC97_PCMOUT, | ||
275 | .end = DMACH_AC97_PCMOUT, | ||
276 | .flags = IORESOURCE_DMA, | ||
277 | }, | ||
278 | [2] = { | ||
279 | .start = DMACH_AC97_PCMIN, | ||
280 | .end = DMACH_AC97_PCMIN, | ||
281 | .flags = IORESOURCE_DMA, | ||
282 | }, | ||
283 | [3] = { | ||
284 | .start = DMACH_AC97_MICIN, | ||
285 | .end = DMACH_AC97_MICIN, | ||
286 | .flags = IORESOURCE_DMA, | ||
287 | }, | ||
288 | [4] = { | ||
289 | .start = IRQ_AC97, | ||
290 | .end = IRQ_AC97, | ||
291 | .flags = IORESOURCE_IRQ, | ||
292 | }, | ||
293 | }; | 213 | }; |
294 | 214 | ||
295 | static struct s3c_audio_pdata s3c_ac97_pdata; | 215 | static struct s3c_audio_pdata s3c_ac97_pdata; |
diff --git a/arch/arm/mach-s3c64xx/dev-uart.c b/arch/arm/mach-s3c64xx/dev-uart.c index c681b99eda0..46e18d77ea9 100644 --- a/arch/arm/mach-s3c64xx/dev-uart.c +++ b/arch/arm/mach-s3c64xx/dev-uart.c | |||
@@ -31,55 +31,23 @@ | |||
31 | /* 64xx uarts are closer together */ | 31 | /* 64xx uarts are closer together */ |
32 | 32 | ||
33 | static struct resource s3c64xx_uart0_resource[] = { | 33 | static struct resource s3c64xx_uart0_resource[] = { |
34 | [0] = { | 34 | [0] = DEFINE_RES_MEM(S3C_PA_UART0, SZ_256), |
35 | .start = S3C_PA_UART0, | 35 | [1] = DEFINE_RES_IRQ(IRQ_UART0), |
36 | .end = S3C_PA_UART0 + 0x100, | ||
37 | .flags = IORESOURCE_MEM, | ||
38 | }, | ||
39 | [1] = { | ||
40 | .start = IRQ_UART0, | ||
41 | .end = IRQ_UART0, | ||
42 | .flags = IORESOURCE_IRQ, | ||
43 | }, | ||
44 | }; | 36 | }; |
45 | 37 | ||
46 | static struct resource s3c64xx_uart1_resource[] = { | 38 | static struct resource s3c64xx_uart1_resource[] = { |
47 | [0] = { | 39 | [0] = DEFINE_RES_MEM(S3C_PA_UART1, SZ_256), |
48 | .start = S3C_PA_UART1, | 40 | [1] = DEFINE_RES_IRQ(IRQ_UART1), |
49 | .end = S3C_PA_UART1 + 0x100, | ||
50 | .flags = IORESOURCE_MEM, | ||
51 | }, | ||
52 | [1] = { | ||
53 | .start = IRQ_UART1, | ||
54 | .end = IRQ_UART1, | ||
55 | .flags = IORESOURCE_IRQ, | ||
56 | }, | ||
57 | }; | 41 | }; |
58 | 42 | ||
59 | static struct resource s3c6xx_uart2_resource[] = { | 43 | static struct resource s3c6xx_uart2_resource[] = { |
60 | [0] = { | 44 | [0] = DEFINE_RES_MEM(S3C_PA_UART2, SZ_256), |
61 | .start = S3C_PA_UART2, | 45 | [1] = DEFINE_RES_IRQ(IRQ_UART2), |
62 | .end = S3C_PA_UART2 + 0x100, | ||
63 | .flags = IORESOURCE_MEM, | ||
64 | }, | ||
65 | [1] = { | ||
66 | .start = IRQ_UART2, | ||
67 | .end = IRQ_UART2, | ||
68 | .flags = IORESOURCE_IRQ, | ||
69 | }, | ||
70 | }; | 46 | }; |
71 | 47 | ||
72 | static struct resource s3c64xx_uart3_resource[] = { | 48 | static struct resource s3c64xx_uart3_resource[] = { |
73 | [0] = { | 49 | [0] = DEFINE_RES_MEM(S3C_PA_UART3, SZ_256), |
74 | .start = S3C_PA_UART3, | 50 | [1] = DEFINE_RES_IRQ(IRQ_UART3), |
75 | .end = S3C_PA_UART3 + 0x100, | ||
76 | .flags = IORESOURCE_MEM, | ||
77 | }, | ||
78 | [1] = { | ||
79 | .start = IRQ_UART3, | ||
80 | .end = IRQ_UART3, | ||
81 | .flags = IORESOURCE_IRQ, | ||
82 | }, | ||
83 | }; | 51 | }; |
84 | 52 | ||
85 | 53 | ||
diff --git a/arch/arm/mach-s3c64xx/mach-anw6410.c b/arch/arm/mach-s3c64xx/mach-anw6410.c index b86f2779e4e..f252691fb20 100644 --- a/arch/arm/mach-s3c64xx/mach-anw6410.c +++ b/arch/arm/mach-s3c64xx/mach-anw6410.c | |||
@@ -165,21 +165,10 @@ static void __init anw6410_dm9000_enable(void) | |||
165 | } | 165 | } |
166 | 166 | ||
167 | static struct resource anw6410_dm9000_resource[] = { | 167 | static struct resource anw6410_dm9000_resource[] = { |
168 | [0] = { | 168 | [0] = DEFINE_RES_MEM(ANW6410_PA_DM9000, 4), |
169 | .start = ANW6410_PA_DM9000, | 169 | [1] = DEFINE_RES_MEM(ANW6410_PA_DM9000 + 4, 501), |
170 | .end = ANW6410_PA_DM9000 + 3, | 170 | [2] = DEFINE_RES_NAMED(IRQ_EINT(15), 1, NULL, IORESOURCE_IRQ \ |
171 | .flags = IORESOURCE_MEM, | 171 | | IRQF_TRIGGER_HIGH), |
172 | }, | ||
173 | [1] = { | ||
174 | .start = ANW6410_PA_DM9000 + 4, | ||
175 | .end = ANW6410_PA_DM9000 + 4 + 500, | ||
176 | .flags = IORESOURCE_MEM, | ||
177 | }, | ||
178 | [2] = { | ||
179 | .start = IRQ_EINT(15), | ||
180 | .end = IRQ_EINT(15), | ||
181 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_HIGH, | ||
182 | }, | ||
183 | }; | 172 | }; |
184 | 173 | ||
185 | static struct dm9000_plat_data anw6410_dm9000_pdata = { | 174 | static struct dm9000_plat_data anw6410_dm9000_pdata = { |
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c index e20bf583536..164467cbb7e 100644 --- a/arch/arm/mach-s3c64xx/mach-crag6410.c +++ b/arch/arm/mach-s3c64xx/mach-crag6410.c | |||
@@ -232,21 +232,10 @@ static struct platform_device crag6410_gpio_keydev = { | |||
232 | }; | 232 | }; |
233 | 233 | ||
234 | static struct resource crag6410_dm9k_resource[] = { | 234 | static struct resource crag6410_dm9k_resource[] = { |
235 | [0] = { | 235 | [0] = DEFINE_RES_MEM(S3C64XX_PA_XM0CSN5, 2), |
236 | .start = S3C64XX_PA_XM0CSN5, | 236 | [1] = DEFINE_RES_MEM(S3C64XX_PA_XM0CSN5 + (1 << 8), 2), |
237 | .end = S3C64XX_PA_XM0CSN5 + 1, | 237 | [2] = DEFINE_RES_NAMED(S3C_EINT(17), 1, NULL, IORESOURCE_IRQ \ |
238 | .flags = IORESOURCE_MEM, | 238 | | IORESOURCE_IRQ_HIGHLEVEL), |
239 | }, | ||
240 | [1] = { | ||
241 | .start = S3C64XX_PA_XM0CSN5 + (1 << 8), | ||
242 | .end = S3C64XX_PA_XM0CSN5 + (1 << 8) + 1, | ||
243 | .flags = IORESOURCE_MEM, | ||
244 | }, | ||
245 | [2] = { | ||
246 | .start = S3C_EINT(17), | ||
247 | .end = S3C_EINT(17), | ||
248 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | ||
249 | }, | ||
250 | }; | 239 | }; |
251 | 240 | ||
252 | static struct dm9000_plat_data mini6410_dm9k_pdata = { | 241 | static struct dm9000_plat_data mini6410_dm9k_pdata = { |
@@ -262,12 +251,7 @@ static struct platform_device crag6410_dm9k_device = { | |||
262 | }; | 251 | }; |
263 | 252 | ||
264 | static struct resource crag6410_mmgpio_resource[] = { | 253 | static struct resource crag6410_mmgpio_resource[] = { |
265 | [0] = { | 254 | [0] = DEFINE_RES_MEM_NAMED(S3C64XX_PA_XM0CSN4, 1, "dat"), |
266 | .name = "dat", | ||
267 | .start = S3C64XX_PA_XM0CSN4 + 1, | ||
268 | .end = S3C64XX_PA_XM0CSN4 + 1, | ||
269 | .flags = IORESOURCE_MEM, | ||
270 | }, | ||
271 | }; | 255 | }; |
272 | 256 | ||
273 | static struct platform_device crag6410_mmgpio = { | 257 | static struct platform_device crag6410_mmgpio = { |
diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c64xx/mach-mini6410.c index c34c2ab22ea..b2166d4a553 100644 --- a/arch/arm/mach-s3c64xx/mach-mini6410.c +++ b/arch/arm/mach-s3c64xx/mach-mini6410.c | |||
@@ -85,21 +85,10 @@ static struct s3c2410_uartcfg mini6410_uartcfgs[] __initdata = { | |||
85 | /* DM9000AEP 10/100 ethernet controller */ | 85 | /* DM9000AEP 10/100 ethernet controller */ |
86 | 86 | ||
87 | static struct resource mini6410_dm9k_resource[] = { | 87 | static struct resource mini6410_dm9k_resource[] = { |
88 | [0] = { | 88 | [0] = DEFINE_RES_MEM(S3C64XX_PA_XM0CSN1, 2), |
89 | .start = S3C64XX_PA_XM0CSN1, | 89 | [1] = DEFINE_RES_MEM(S3C64XX_PA_XM0CSN1 + 4, 2), |
90 | .end = S3C64XX_PA_XM0CSN1 + 1, | 90 | [2] = DEFINE_RES_NAMED(S3C_EINT(7), 1, NULL, IORESOURCE_IRQ \ |
91 | .flags = IORESOURCE_MEM | 91 | | IORESOURCE_IRQ_HIGHLEVEL), |
92 | }, | ||
93 | [1] = { | ||
94 | .start = S3C64XX_PA_XM0CSN1 + 4, | ||
95 | .end = S3C64XX_PA_XM0CSN1 + 5, | ||
96 | .flags = IORESOURCE_MEM | ||
97 | }, | ||
98 | [2] = { | ||
99 | .start = S3C_EINT(7), | ||
100 | .end = S3C_EINT(7), | ||
101 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL | ||
102 | } | ||
103 | }; | 92 | }; |
104 | 93 | ||
105 | static struct dm9000_plat_data mini6410_dm9k_pdata = { | 94 | static struct dm9000_plat_data mini6410_dm9k_pdata = { |
diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c index be2a9a22ab7..5c08266cea2 100644 --- a/arch/arm/mach-s3c64xx/mach-real6410.c +++ b/arch/arm/mach-s3c64xx/mach-real6410.c | |||
@@ -86,21 +86,10 @@ static struct s3c2410_uartcfg real6410_uartcfgs[] __initdata = { | |||
86 | /* DM9000AEP 10/100 ethernet controller */ | 86 | /* DM9000AEP 10/100 ethernet controller */ |
87 | 87 | ||
88 | static struct resource real6410_dm9k_resource[] = { | 88 | static struct resource real6410_dm9k_resource[] = { |
89 | [0] = { | 89 | [0] = DEFINE_RES_MEM(S3C64XX_PA_XM0CSN1, 2), |
90 | .start = S3C64XX_PA_XM0CSN1, | 90 | [1] = DEFINE_RES_MEM(S3C64XX_PA_XM0CSN1 + 4, 2), |
91 | .end = S3C64XX_PA_XM0CSN1 + 1, | 91 | [2] = DEFINE_RES_NAMED(S3C_EINT(7), 1, NULL, IORESOURCE_IRQ \ |
92 | .flags = IORESOURCE_MEM | 92 | | IORESOURCE_IRQ_HIGHLEVEL), |
93 | }, | ||
94 | [1] = { | ||
95 | .start = S3C64XX_PA_XM0CSN1 + 4, | ||
96 | .end = S3C64XX_PA_XM0CSN1 + 5, | ||
97 | .flags = IORESOURCE_MEM | ||
98 | }, | ||
99 | [2] = { | ||
100 | .start = S3C_EINT(7), | ||
101 | .end = S3C_EINT(7), | ||
102 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL | ||
103 | } | ||
104 | }; | 93 | }; |
105 | 94 | ||
106 | static struct dm9000_plat_data real6410_dm9k_pdata = { | 95 | static struct dm9000_plat_data real6410_dm9k_pdata = { |
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c index d55bc96d958..1ecd0485a9b 100644 --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c | |||
@@ -182,16 +182,9 @@ static struct s3c_fb_platdata smdk6410_lcd_pdata __initdata = { | |||
182 | */ | 182 | */ |
183 | 183 | ||
184 | static struct resource smdk6410_smsc911x_resources[] = { | 184 | static struct resource smdk6410_smsc911x_resources[] = { |
185 | [0] = { | 185 | [0] = DEFINE_RES_MEM(S3C64XX_PA_XM0CSN1, SZ_64K), |
186 | .start = S3C64XX_PA_XM0CSN1, | 186 | [1] = DEFINE_RES_NAMED(S3C_EINT(10), 1, NULL, IORESOURCE_IRQ \ |
187 | .end = S3C64XX_PA_XM0CSN1 + SZ_64K - 1, | 187 | | IRQ_TYPE_LEVEL_LOW), |
188 | .flags = IORESOURCE_MEM, | ||
189 | }, | ||
190 | [1] = { | ||
191 | .start = S3C_EINT(10), | ||
192 | .end = S3C_EINT(10), | ||
193 | .flags = IORESOURCE_IRQ | IRQ_TYPE_LEVEL_LOW, | ||
194 | }, | ||
195 | }; | 188 | }; |
196 | 189 | ||
197 | static struct smsc911x_platform_config smdk6410_smsc911x_pdata = { | 190 | static struct smsc911x_platform_config smdk6410_smsc911x_pdata = { |
diff --git a/arch/arm/mach-s5p64x0/dev-audio.c b/arch/arm/mach-s5p64x0/dev-audio.c index 35f1f226dab..91113ddc51d 100644 --- a/arch/arm/mach-s5p64x0/dev-audio.c +++ b/arch/arm/mach-s5p64x0/dev-audio.c | |||
@@ -51,21 +51,9 @@ static struct s3c_audio_pdata s5p6440_i2s_pdata = { | |||
51 | }; | 51 | }; |
52 | 52 | ||
53 | static struct resource s5p64x0_i2s0_resource[] = { | 53 | static struct resource s5p64x0_i2s0_resource[] = { |
54 | [0] = { | 54 | [0] = DEFINE_RES_MEM(S5P64X0_PA_I2S, SZ_256), |
55 | .start = S5P64X0_PA_I2S, | 55 | [1] = DEFINE_RES_DMA(DMACH_I2S0_TX), |
56 | .end = S5P64X0_PA_I2S + 0x100 - 1, | 56 | [2] = DEFINE_RES_DMA(DMACH_I2S0_RX), |
57 | .flags = IORESOURCE_MEM, | ||
58 | }, | ||
59 | [1] = { | ||
60 | .start = DMACH_I2S0_TX, | ||
61 | .end = DMACH_I2S0_TX, | ||
62 | .flags = IORESOURCE_DMA, | ||
63 | }, | ||
64 | [2] = { | ||
65 | .start = DMACH_I2S0_RX, | ||
66 | .end = DMACH_I2S0_RX, | ||
67 | .flags = IORESOURCE_DMA, | ||
68 | }, | ||
69 | }; | 57 | }; |
70 | 58 | ||
71 | struct platform_device s5p6440_device_iis = { | 59 | struct platform_device s5p6440_device_iis = { |
@@ -130,21 +118,9 @@ static struct s3c_audio_pdata s5p6450_i2s_pdata = { | |||
130 | }; | 118 | }; |
131 | 119 | ||
132 | static struct resource s5p6450_i2s1_resource[] = { | 120 | static struct resource s5p6450_i2s1_resource[] = { |
133 | [0] = { | 121 | [0] = DEFINE_RES_MEM(S5P6450_PA_I2S1, SZ_256), |
134 | .start = S5P6450_PA_I2S1, | 122 | [1] = DEFINE_RES_DMA(DMACH_I2S1_TX), |
135 | .end = S5P6450_PA_I2S1 + 0x100 - 1, | 123 | [2] = DEFINE_RES_DMA(DMACH_I2S1_RX), |
136 | .flags = IORESOURCE_MEM, | ||
137 | }, | ||
138 | [1] = { | ||
139 | .start = DMACH_I2S1_TX, | ||
140 | .end = DMACH_I2S1_TX, | ||
141 | .flags = IORESOURCE_DMA, | ||
142 | }, | ||
143 | [2] = { | ||
144 | .start = DMACH_I2S1_RX, | ||
145 | .end = DMACH_I2S1_RX, | ||
146 | .flags = IORESOURCE_DMA, | ||
147 | }, | ||
148 | }; | 124 | }; |
149 | 125 | ||
150 | struct platform_device s5p6450_device_iis1 = { | 126 | struct platform_device s5p6450_device_iis1 = { |
@@ -158,21 +134,9 @@ struct platform_device s5p6450_device_iis1 = { | |||
158 | }; | 134 | }; |
159 | 135 | ||
160 | static struct resource s5p6450_i2s2_resource[] = { | 136 | static struct resource s5p6450_i2s2_resource[] = { |
161 | [0] = { | 137 | [0] = DEFINE_RES_MEM(S5P6450_PA_I2S2, SZ_256), |
162 | .start = S5P6450_PA_I2S2, | 138 | [1] = DEFINE_RES_DMA(DMACH_I2S2_TX), |
163 | .end = S5P6450_PA_I2S2 + 0x100 - 1, | 139 | [2] = DEFINE_RES_DMA(DMACH_I2S2_RX), |
164 | .flags = IORESOURCE_MEM, | ||
165 | }, | ||
166 | [1] = { | ||
167 | .start = DMACH_I2S2_TX, | ||
168 | .end = DMACH_I2S2_TX, | ||
169 | .flags = IORESOURCE_DMA, | ||
170 | }, | ||
171 | [2] = { | ||
172 | .start = DMACH_I2S2_RX, | ||
173 | .end = DMACH_I2S2_RX, | ||
174 | .flags = IORESOURCE_DMA, | ||
175 | }, | ||
176 | }; | 140 | }; |
177 | 141 | ||
178 | struct platform_device s5p6450_device_iis2 = { | 142 | struct platform_device s5p6450_device_iis2 = { |
@@ -208,21 +172,9 @@ static struct s3c_audio_pdata s5p6440_pcm_pdata = { | |||
208 | }; | 172 | }; |
209 | 173 | ||
210 | static struct resource s5p6440_pcm0_resource[] = { | 174 | static struct resource s5p6440_pcm0_resource[] = { |
211 | [0] = { | 175 | [0] = DEFINE_RES_MEM(S5P64X0_PA_PCM, SZ_256), |
212 | .start = S5P64X0_PA_PCM, | 176 | [1] = DEFINE_RES_DMA(DMACH_PCM0_TX), |
213 | .end = S5P64X0_PA_PCM + 0x100 - 1, | 177 | [2] = DEFINE_RES_DMA(DMACH_PCM0_RX), |
214 | .flags = IORESOURCE_MEM, | ||
215 | }, | ||
216 | [1] = { | ||
217 | .start = DMACH_PCM0_TX, | ||
218 | .end = DMACH_PCM0_TX, | ||
219 | .flags = IORESOURCE_DMA, | ||
220 | }, | ||
221 | [2] = { | ||
222 | .start = DMACH_PCM0_RX, | ||
223 | .end = DMACH_PCM0_RX, | ||
224 | .flags = IORESOURCE_DMA, | ||
225 | }, | ||
226 | }; | 178 | }; |
227 | 179 | ||
228 | struct platform_device s5p6440_device_pcm = { | 180 | struct platform_device s5p6440_device_pcm = { |
diff --git a/arch/arm/mach-s5pc100/dev-audio.c b/arch/arm/mach-s5pc100/dev-audio.c index ab2d27172cb..9d4bde3f111 100644 --- a/arch/arm/mach-s5pc100/dev-audio.c +++ b/arch/arm/mach-s5pc100/dev-audio.c | |||
@@ -56,26 +56,10 @@ static struct s3c_audio_pdata i2sv5_pdata = { | |||
56 | }; | 56 | }; |
57 | 57 | ||
58 | static struct resource s5pc100_iis0_resource[] = { | 58 | static struct resource s5pc100_iis0_resource[] = { |
59 | [0] = { | 59 | [0] = DEFINE_RES_MEM(S5PC100_PA_I2S0, SZ_256), |
60 | .start = S5PC100_PA_I2S0, | 60 | [1] = DEFINE_RES_DMA(DMACH_I2S0_TX), |
61 | .end = S5PC100_PA_I2S0 + 0x100 - 1, | 61 | [2] = DEFINE_RES_DMA(DMACH_I2S0_RX), |
62 | .flags = IORESOURCE_MEM, | 62 | [3] = DEFINE_RES_DMA(DMACH_I2S0S_TX), |
63 | }, | ||
64 | [1] = { | ||
65 | .start = DMACH_I2S0_TX, | ||
66 | .end = DMACH_I2S0_TX, | ||
67 | .flags = IORESOURCE_DMA, | ||
68 | }, | ||
69 | [2] = { | ||
70 | .start = DMACH_I2S0_RX, | ||
71 | .end = DMACH_I2S0_RX, | ||
72 | .flags = IORESOURCE_DMA, | ||
73 | }, | ||
74 | [3] = { | ||
75 | .start = DMACH_I2S0S_TX, | ||
76 | .end = DMACH_I2S0S_TX, | ||
77 | .flags = IORESOURCE_DMA, | ||
78 | }, | ||
79 | }; | 63 | }; |
80 | 64 | ||
81 | struct platform_device s5pc100_device_iis0 = { | 65 | struct platform_device s5pc100_device_iis0 = { |
@@ -103,21 +87,9 @@ static struct s3c_audio_pdata i2sv3_pdata = { | |||
103 | }; | 87 | }; |
104 | 88 | ||
105 | static struct resource s5pc100_iis1_resource[] = { | 89 | static struct resource s5pc100_iis1_resource[] = { |
106 | [0] = { | 90 | [0] = DEFINE_RES_MEM(S5PC100_PA_I2S1, SZ_256), |
107 | .start = S5PC100_PA_I2S1, | 91 | [1] = DEFINE_RES_DMA(DMACH_I2S1_TX), |
108 | .end = S5PC100_PA_I2S1 + 0x100 - 1, | 92 | [2] = DEFINE_RES_DMA(DMACH_I2S1_RX), |
109 | .flags = IORESOURCE_MEM, | ||
110 | }, | ||
111 | [1] = { | ||
112 | .start = DMACH_I2S1_TX, | ||
113 | .end = DMACH_I2S1_TX, | ||
114 | .flags = IORESOURCE_DMA, | ||
115 | }, | ||
116 | [2] = { | ||
117 | .start = DMACH_I2S1_RX, | ||
118 | .end = DMACH_I2S1_RX, | ||
119 | .flags = IORESOURCE_DMA, | ||
120 | }, | ||
121 | }; | 93 | }; |
122 | 94 | ||
123 | struct platform_device s5pc100_device_iis1 = { | 95 | struct platform_device s5pc100_device_iis1 = { |
@@ -131,21 +103,9 @@ struct platform_device s5pc100_device_iis1 = { | |||
131 | }; | 103 | }; |
132 | 104 | ||
133 | static struct resource s5pc100_iis2_resource[] = { | 105 | static struct resource s5pc100_iis2_resource[] = { |
134 | [0] = { | 106 | [0] = DEFINE_RES_MEM(S5PC100_PA_I2S2, SZ_256), |
135 | .start = S5PC100_PA_I2S2, | 107 | [1] = DEFINE_RES_DMA(DMACH_I2S2_TX), |
136 | .end = S5PC100_PA_I2S2 + 0x100 - 1, | 108 | [2] = DEFINE_RES_DMA(DMACH_I2S2_RX), |
137 | .flags = IORESOURCE_MEM, | ||
138 | }, | ||
139 | [1] = { | ||
140 | .start = DMACH_I2S2_TX, | ||
141 | .end = DMACH_I2S2_TX, | ||
142 | .flags = IORESOURCE_DMA, | ||
143 | }, | ||
144 | [2] = { | ||
145 | .start = DMACH_I2S2_RX, | ||
146 | .end = DMACH_I2S2_RX, | ||
147 | .flags = IORESOURCE_DMA, | ||
148 | }, | ||
149 | }; | 109 | }; |
150 | 110 | ||
151 | struct platform_device s5pc100_device_iis2 = { | 111 | struct platform_device s5pc100_device_iis2 = { |
@@ -184,21 +144,9 @@ static struct s3c_audio_pdata s3c_pcm_pdata = { | |||
184 | }; | 144 | }; |
185 | 145 | ||
186 | static struct resource s5pc100_pcm0_resource[] = { | 146 | static struct resource s5pc100_pcm0_resource[] = { |
187 | [0] = { | 147 | [0] = DEFINE_RES_MEM(S5PC100_PA_PCM0, SZ_256), |
188 | .start = S5PC100_PA_PCM0, | 148 | [1] = DEFINE_RES_DMA(DMACH_PCM0_TX), |
189 | .end = S5PC100_PA_PCM0 + 0x100 - 1, | 149 | [2] = DEFINE_RES_DMA(DMACH_PCM0_RX), |
190 | .flags = IORESOURCE_MEM, | ||
191 | }, | ||
192 | [1] = { | ||
193 | .start = DMACH_PCM0_TX, | ||
194 | .end = DMACH_PCM0_TX, | ||
195 | .flags = IORESOURCE_DMA, | ||
196 | }, | ||
197 | [2] = { | ||
198 | .start = DMACH_PCM0_RX, | ||
199 | .end = DMACH_PCM0_RX, | ||
200 | .flags = IORESOURCE_DMA, | ||
201 | }, | ||
202 | }; | 150 | }; |
203 | 151 | ||
204 | struct platform_device s5pc100_device_pcm0 = { | 152 | struct platform_device s5pc100_device_pcm0 = { |
@@ -212,21 +160,9 @@ struct platform_device s5pc100_device_pcm0 = { | |||
212 | }; | 160 | }; |
213 | 161 | ||
214 | static struct resource s5pc100_pcm1_resource[] = { | 162 | static struct resource s5pc100_pcm1_resource[] = { |
215 | [0] = { | 163 | [0] = DEFINE_RES_MEM(S5PC100_PA_PCM1, SZ_256), |
216 | .start = S5PC100_PA_PCM1, | 164 | [1] = DEFINE_RES_DMA(DMACH_PCM1_TX), |
217 | .end = S5PC100_PA_PCM1 + 0x100 - 1, | 165 | [2] = DEFINE_RES_DMA(DMACH_PCM1_RX), |
218 | .flags = IORESOURCE_MEM, | ||
219 | }, | ||
220 | [1] = { | ||
221 | .start = DMACH_PCM1_TX, | ||
222 | .end = DMACH_PCM1_TX, | ||
223 | .flags = IORESOURCE_DMA, | ||
224 | }, | ||
225 | [2] = { | ||
226 | .start = DMACH_PCM1_RX, | ||
227 | .end = DMACH_PCM1_RX, | ||
228 | .flags = IORESOURCE_DMA, | ||
229 | }, | ||
230 | }; | 166 | }; |
231 | 167 | ||
232 | struct platform_device s5pc100_device_pcm1 = { | 168 | struct platform_device s5pc100_device_pcm1 = { |
@@ -247,31 +183,11 @@ static int s5pc100_ac97_cfg_gpio(struct platform_device *pdev) | |||
247 | } | 183 | } |
248 | 184 | ||
249 | static struct resource s5pc100_ac97_resource[] = { | 185 | static struct resource s5pc100_ac97_resource[] = { |
250 | [0] = { | 186 | [0] = DEFINE_RES_MEM(S5PC100_PA_AC97, SZ_256), |
251 | .start = S5PC100_PA_AC97, | 187 | [1] = DEFINE_RES_DMA(DMACH_AC97_PCMOUT), |
252 | .end = S5PC100_PA_AC97 + 0x100 - 1, | 188 | [2] = DEFINE_RES_DMA(DMACH_AC97_PCMIN), |
253 | .flags = IORESOURCE_MEM, | 189 | [3] = DEFINE_RES_DMA(DMACH_AC97_MICIN), |
254 | }, | 190 | [4] = DEFINE_RES_IRQ(IRQ_AC97), |
255 | [1] = { | ||
256 | .start = DMACH_AC97_PCMOUT, | ||
257 | .end = DMACH_AC97_PCMOUT, | ||
258 | .flags = IORESOURCE_DMA, | ||
259 | }, | ||
260 | [2] = { | ||
261 | .start = DMACH_AC97_PCMIN, | ||
262 | .end = DMACH_AC97_PCMIN, | ||
263 | .flags = IORESOURCE_DMA, | ||
264 | }, | ||
265 | [3] = { | ||
266 | .start = DMACH_AC97_MICIN, | ||
267 | .end = DMACH_AC97_MICIN, | ||
268 | .flags = IORESOURCE_DMA, | ||
269 | }, | ||
270 | [4] = { | ||
271 | .start = IRQ_AC97, | ||
272 | .end = IRQ_AC97, | ||
273 | .flags = IORESOURCE_IRQ, | ||
274 | }, | ||
275 | }; | 191 | }; |
276 | 192 | ||
277 | static struct s3c_audio_pdata s3c_ac97_pdata = { | 193 | static struct s3c_audio_pdata s3c_ac97_pdata = { |
@@ -308,16 +224,8 @@ static int s5pc100_spdif_cfg_gpg3(struct platform_device *pdev) | |||
308 | } | 224 | } |
309 | 225 | ||
310 | static struct resource s5pc100_spdif_resource[] = { | 226 | static struct resource s5pc100_spdif_resource[] = { |
311 | [0] = { | 227 | [0] = DEFINE_RES_MEM(S5PC100_PA_SPDIF, SZ_256), |
312 | .start = S5PC100_PA_SPDIF, | 228 | [1] = DEFINE_RES_DMA(DMACH_SPDIF), |
313 | .end = S5PC100_PA_SPDIF + 0x100 - 1, | ||
314 | .flags = IORESOURCE_MEM, | ||
315 | }, | ||
316 | [1] = { | ||
317 | .start = DMACH_SPDIF, | ||
318 | .end = DMACH_SPDIF, | ||
319 | .flags = IORESOURCE_DMA, | ||
320 | }, | ||
321 | }; | 229 | }; |
322 | 230 | ||
323 | static struct s3c_audio_pdata s5p_spdif_pdata = { | 231 | static struct s3c_audio_pdata s5p_spdif_pdata = { |
diff --git a/arch/arm/mach-s5pv210/dev-audio.c b/arch/arm/mach-s5pv210/dev-audio.c index 63f5d82004b..8367749c3ee 100644 --- a/arch/arm/mach-s5pv210/dev-audio.c +++ b/arch/arm/mach-s5pv210/dev-audio.c | |||
@@ -59,26 +59,10 @@ static struct s3c_audio_pdata i2sv5_pdata = { | |||
59 | }; | 59 | }; |
60 | 60 | ||
61 | static struct resource s5pv210_iis0_resource[] = { | 61 | static struct resource s5pv210_iis0_resource[] = { |
62 | [0] = { | 62 | [0] = DEFINE_RES_MEM(S5PV210_PA_IIS0, SZ_256), |
63 | .start = S5PV210_PA_IIS0, | 63 | [1] = DEFINE_RES_DMA(DMACH_I2S0_TX), |
64 | .end = S5PV210_PA_IIS0 + 0x100 - 1, | 64 | [2] = DEFINE_RES_DMA(DMACH_I2S0_RX), |
65 | .flags = IORESOURCE_MEM, | 65 | [3] = DEFINE_RES_DMA(DMACH_I2S0S_TX), |
66 | }, | ||
67 | [1] = { | ||
68 | .start = DMACH_I2S0_TX, | ||
69 | .end = DMACH_I2S0_TX, | ||
70 | .flags = IORESOURCE_DMA, | ||
71 | }, | ||
72 | [2] = { | ||
73 | .start = DMACH_I2S0_RX, | ||
74 | .end = DMACH_I2S0_RX, | ||
75 | .flags = IORESOURCE_DMA, | ||
76 | }, | ||
77 | [3] = { | ||
78 | .start = DMACH_I2S0S_TX, | ||
79 | .end = DMACH_I2S0S_TX, | ||
80 | .flags = IORESOURCE_DMA, | ||
81 | }, | ||
82 | }; | 66 | }; |
83 | 67 | ||
84 | struct platform_device s5pv210_device_iis0 = { | 68 | struct platform_device s5pv210_device_iis0 = { |
@@ -106,21 +90,9 @@ static struct s3c_audio_pdata i2sv3_pdata = { | |||
106 | }; | 90 | }; |
107 | 91 | ||
108 | static struct resource s5pv210_iis1_resource[] = { | 92 | static struct resource s5pv210_iis1_resource[] = { |
109 | [0] = { | 93 | [0] = DEFINE_RES_MEM(S5PV210_PA_IIS1, SZ_256), |
110 | .start = S5PV210_PA_IIS1, | 94 | [1] = DEFINE_RES_DMA(DMACH_I2S1_TX), |
111 | .end = S5PV210_PA_IIS1 + 0x100 - 1, | 95 | [2] = DEFINE_RES_DMA(DMACH_I2S1_RX), |
112 | .flags = IORESOURCE_MEM, | ||
113 | }, | ||
114 | [1] = { | ||
115 | .start = DMACH_I2S1_TX, | ||
116 | .end = DMACH_I2S1_TX, | ||
117 | .flags = IORESOURCE_DMA, | ||
118 | }, | ||
119 | [2] = { | ||
120 | .start = DMACH_I2S1_RX, | ||
121 | .end = DMACH_I2S1_RX, | ||
122 | .flags = IORESOURCE_DMA, | ||
123 | }, | ||
124 | }; | 96 | }; |
125 | 97 | ||
126 | struct platform_device s5pv210_device_iis1 = { | 98 | struct platform_device s5pv210_device_iis1 = { |
@@ -134,21 +106,9 @@ struct platform_device s5pv210_device_iis1 = { | |||
134 | }; | 106 | }; |
135 | 107 | ||
136 | static struct resource s5pv210_iis2_resource[] = { | 108 | static struct resource s5pv210_iis2_resource[] = { |
137 | [0] = { | 109 | [0] = DEFINE_RES_MEM(S5PV210_PA_IIS2, SZ_256), |
138 | .start = S5PV210_PA_IIS2, | 110 | [1] = DEFINE_RES_DMA(DMACH_I2S2_TX), |
139 | .end = S5PV210_PA_IIS2 + 0x100 - 1, | 111 | [2] = DEFINE_RES_DMA(DMACH_I2S2_RX), |
140 | .flags = IORESOURCE_MEM, | ||
141 | }, | ||
142 | [1] = { | ||
143 | .start = DMACH_I2S2_TX, | ||
144 | .end = DMACH_I2S2_TX, | ||
145 | .flags = IORESOURCE_DMA, | ||
146 | }, | ||
147 | [2] = { | ||
148 | .start = DMACH_I2S2_RX, | ||
149 | .end = DMACH_I2S2_RX, | ||
150 | .flags = IORESOURCE_DMA, | ||
151 | }, | ||
152 | }; | 112 | }; |
153 | 113 | ||
154 | struct platform_device s5pv210_device_iis2 = { | 114 | struct platform_device s5pv210_device_iis2 = { |
@@ -188,21 +148,9 @@ static struct s3c_audio_pdata s3c_pcm_pdata = { | |||
188 | }; | 148 | }; |
189 | 149 | ||
190 | static struct resource s5pv210_pcm0_resource[] = { | 150 | static struct resource s5pv210_pcm0_resource[] = { |
191 | [0] = { | 151 | [0] = DEFINE_RES_MEM(S5PV210_PA_PCM0, SZ_256), |
192 | .start = S5PV210_PA_PCM0, | 152 | [1] = DEFINE_RES_DMA(DMACH_PCM0_TX), |
193 | .end = S5PV210_PA_PCM0 + 0x100 - 1, | 153 | [2] = DEFINE_RES_DMA(DMACH_PCM0_RX), |
194 | .flags = IORESOURCE_MEM, | ||
195 | }, | ||
196 | [1] = { | ||
197 | .start = DMACH_PCM0_TX, | ||
198 | .end = DMACH_PCM0_TX, | ||
199 | .flags = IORESOURCE_DMA, | ||
200 | }, | ||
201 | [2] = { | ||
202 | .start = DMACH_PCM0_RX, | ||
203 | .end = DMACH_PCM0_RX, | ||
204 | .flags = IORESOURCE_DMA, | ||
205 | }, | ||
206 | }; | 154 | }; |
207 | 155 | ||
208 | struct platform_device s5pv210_device_pcm0 = { | 156 | struct platform_device s5pv210_device_pcm0 = { |
@@ -216,21 +164,9 @@ struct platform_device s5pv210_device_pcm0 = { | |||
216 | }; | 164 | }; |
217 | 165 | ||
218 | static struct resource s5pv210_pcm1_resource[] = { | 166 | static struct resource s5pv210_pcm1_resource[] = { |
219 | [0] = { | 167 | [0] = DEFINE_RES_MEM(S5PV210_PA_PCM1, SZ_256), |
220 | .start = S5PV210_PA_PCM1, | 168 | [1] = DEFINE_RES_DMA(DMACH_PCM1_TX), |
221 | .end = S5PV210_PA_PCM1 + 0x100 - 1, | 169 | [2] = DEFINE_RES_DMA(DMACH_PCM1_RX), |
222 | .flags = IORESOURCE_MEM, | ||
223 | }, | ||
224 | [1] = { | ||
225 | .start = DMACH_PCM1_TX, | ||
226 | .end = DMACH_PCM1_TX, | ||
227 | .flags = IORESOURCE_DMA, | ||
228 | }, | ||
229 | [2] = { | ||
230 | .start = DMACH_PCM1_RX, | ||
231 | .end = DMACH_PCM1_RX, | ||
232 | .flags = IORESOURCE_DMA, | ||
233 | }, | ||
234 | }; | 170 | }; |
235 | 171 | ||
236 | struct platform_device s5pv210_device_pcm1 = { | 172 | struct platform_device s5pv210_device_pcm1 = { |
@@ -244,21 +180,9 @@ struct platform_device s5pv210_device_pcm1 = { | |||
244 | }; | 180 | }; |
245 | 181 | ||
246 | static struct resource s5pv210_pcm2_resource[] = { | 182 | static struct resource s5pv210_pcm2_resource[] = { |
247 | [0] = { | 183 | [0] = DEFINE_RES_MEM(S5PV210_PA_PCM2, SZ_256), |
248 | .start = S5PV210_PA_PCM2, | 184 | [1] = DEFINE_RES_DMA(DMACH_PCM2_TX), |
249 | .end = S5PV210_PA_PCM2 + 0x100 - 1, | 185 | [2] = DEFINE_RES_DMA(DMACH_PCM2_RX), |
250 | .flags = IORESOURCE_MEM, | ||
251 | }, | ||
252 | [1] = { | ||
253 | .start = DMACH_PCM2_TX, | ||
254 | .end = DMACH_PCM2_TX, | ||
255 | .flags = IORESOURCE_DMA, | ||
256 | }, | ||
257 | [2] = { | ||
258 | .start = DMACH_PCM2_RX, | ||
259 | .end = DMACH_PCM2_RX, | ||
260 | .flags = IORESOURCE_DMA, | ||
261 | }, | ||
262 | }; | 186 | }; |
263 | 187 | ||
264 | struct platform_device s5pv210_device_pcm2 = { | 188 | struct platform_device s5pv210_device_pcm2 = { |
@@ -279,31 +203,11 @@ static int s5pv210_ac97_cfg_gpio(struct platform_device *pdev) | |||
279 | } | 203 | } |
280 | 204 | ||
281 | static struct resource s5pv210_ac97_resource[] = { | 205 | static struct resource s5pv210_ac97_resource[] = { |
282 | [0] = { | 206 | [0] = DEFINE_RES_MEM(S5PV210_PA_AC97, SZ_256), |
283 | .start = S5PV210_PA_AC97, | 207 | [1] = DEFINE_RES_DMA(DMACH_AC97_PCMOUT), |
284 | .end = S5PV210_PA_AC97 + 0x100 - 1, | 208 | [2] = DEFINE_RES_DMA(DMACH_AC97_PCMIN), |
285 | .flags = IORESOURCE_MEM, | 209 | [3] = DEFINE_RES_DMA(DMACH_AC97_MICIN), |
286 | }, | 210 | [4] = DEFINE_RES_IRQ(IRQ_AC97), |
287 | [1] = { | ||
288 | .start = DMACH_AC97_PCMOUT, | ||
289 | .end = DMACH_AC97_PCMOUT, | ||
290 | .flags = IORESOURCE_DMA, | ||
291 | }, | ||
292 | [2] = { | ||
293 | .start = DMACH_AC97_PCMIN, | ||
294 | .end = DMACH_AC97_PCMIN, | ||
295 | .flags = IORESOURCE_DMA, | ||
296 | }, | ||
297 | [3] = { | ||
298 | .start = DMACH_AC97_MICIN, | ||
299 | .end = DMACH_AC97_MICIN, | ||
300 | .flags = IORESOURCE_DMA, | ||
301 | }, | ||
302 | [4] = { | ||
303 | .start = IRQ_AC97, | ||
304 | .end = IRQ_AC97, | ||
305 | .flags = IORESOURCE_IRQ, | ||
306 | }, | ||
307 | }; | 211 | }; |
308 | 212 | ||
309 | static struct s3c_audio_pdata s3c_ac97_pdata = { | 213 | static struct s3c_audio_pdata s3c_ac97_pdata = { |
@@ -334,16 +238,8 @@ static int s5pv210_spdif_cfg_gpio(struct platform_device *pdev) | |||
334 | } | 238 | } |
335 | 239 | ||
336 | static struct resource s5pv210_spdif_resource[] = { | 240 | static struct resource s5pv210_spdif_resource[] = { |
337 | [0] = { | 241 | [0] = DEFINE_RES_MEM(S5PV210_PA_SPDIF, SZ_256), |
338 | .start = S5PV210_PA_SPDIF, | 242 | [1] = DEFINE_RES_DMA(DMACH_SPDIF), |
339 | .end = S5PV210_PA_SPDIF + 0x100 - 1, | ||
340 | .flags = IORESOURCE_MEM, | ||
341 | }, | ||
342 | [1] = { | ||
343 | .start = DMACH_SPDIF, | ||
344 | .end = DMACH_SPDIF, | ||
345 | .flags = IORESOURCE_DMA, | ||
346 | }, | ||
347 | }; | 243 | }; |
348 | 244 | ||
349 | static struct s3c_audio_pdata samsung_spdif_pdata = { | 245 | static struct s3c_audio_pdata samsung_spdif_pdata = { |
diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c b/arch/arm/mach-s5pv210/mach-smdkv210.c index 91d4ad8bcc7..fa1b61209fd 100644 --- a/arch/arm/mach-s5pv210/mach-smdkv210.c +++ b/arch/arm/mach-s5pv210/mach-smdkv210.c | |||
@@ -119,21 +119,10 @@ static struct samsung_keypad_platdata smdkv210_keypad_data __initdata = { | |||
119 | }; | 119 | }; |
120 | 120 | ||
121 | static struct resource smdkv210_dm9000_resources[] = { | 121 | static struct resource smdkv210_dm9000_resources[] = { |
122 | [0] = { | 122 | [0] = DEFINE_RES_MEM(S5PV210_PA_SROM_BANK5, 1), |
123 | .start = S5PV210_PA_SROM_BANK5, | 123 | [1] = DEFINE_RES_MEM(S5PV210_PA_SROM_BANK5 + 2, 1), |
124 | .end = S5PV210_PA_SROM_BANK5, | 124 | [2] = DEFINE_RES_NAMED(IRQ_EINT(9), 1, NULL, IORESOURCE_IRQ \ |
125 | .flags = IORESOURCE_MEM, | 125 | | IORESOURCE_IRQ_HIGHLEVEL), |
126 | }, | ||
127 | [1] = { | ||
128 | .start = S5PV210_PA_SROM_BANK5 + 2, | ||
129 | .end = S5PV210_PA_SROM_BANK5 + 2, | ||
130 | .flags = IORESOURCE_MEM, | ||
131 | }, | ||
132 | [2] = { | ||
133 | .start = IRQ_EINT(9), | ||
134 | .end = IRQ_EINT(9), | ||
135 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | ||
136 | }, | ||
137 | }; | 126 | }; |
138 | 127 | ||
139 | static struct dm9000_plat_data smdkv210_dm9000_platdata = { | 128 | static struct dm9000_plat_data smdkv210_dm9000_platdata = { |
diff --git a/arch/arm/mach-sa1100/pci-nanoengine.c b/arch/arm/mach-sa1100/pci-nanoengine.c index b49108b890a..ff02e2da99f 100644 --- a/arch/arm/mach-sa1100/pci-nanoengine.c +++ b/arch/arm/mach-sa1100/pci-nanoengine.c | |||
@@ -129,12 +129,6 @@ static int __init pci_nanoengine_map_irq(const struct pci_dev *dev, u8 slot, | |||
129 | return NANOENGINE_IRQ_GPIO_PCI; | 129 | return NANOENGINE_IRQ_GPIO_PCI; |
130 | } | 130 | } |
131 | 131 | ||
132 | struct pci_bus * __init pci_nanoengine_scan_bus(int nr, struct pci_sys_data *sys) | ||
133 | { | ||
134 | return pci_scan_root_bus(NULL, sys->busnr, &pci_nano_ops, sys, | ||
135 | &sys->resources); | ||
136 | } | ||
137 | |||
138 | static struct resource pci_io_ports = | 132 | static struct resource pci_io_ports = |
139 | DEFINE_RES_IO_NAMED(0x400, 0x400, "PCI IO"); | 133 | DEFINE_RES_IO_NAMED(0x400, 0x400, "PCI IO"); |
140 | 134 | ||
@@ -274,7 +268,7 @@ int __init pci_nanoengine_setup(int nr, struct pci_sys_data *sys) | |||
274 | static struct hw_pci nanoengine_pci __initdata = { | 268 | static struct hw_pci nanoengine_pci __initdata = { |
275 | .map_irq = pci_nanoengine_map_irq, | 269 | .map_irq = pci_nanoengine_map_irq, |
276 | .nr_controllers = 1, | 270 | .nr_controllers = 1, |
277 | .scan = pci_nanoengine_scan_bus, | 271 | .ops = &pci_nano_ops, |
278 | .setup = pci_nanoengine_setup, | 272 | .setup = pci_nanoengine_setup, |
279 | }; | 273 | }; |
280 | 274 | ||
diff --git a/arch/arm/mach-shark/pci.c b/arch/arm/mach-shark/pci.c index 7cb79a092f3..9089407d532 100644 --- a/arch/arm/mach-shark/pci.c +++ b/arch/arm/mach-shark/pci.c | |||
@@ -29,10 +29,9 @@ extern void __init via82c505_preinit(void); | |||
29 | 29 | ||
30 | static struct hw_pci shark_pci __initdata = { | 30 | static struct hw_pci shark_pci __initdata = { |
31 | .setup = via82c505_setup, | 31 | .setup = via82c505_setup, |
32 | .swizzle = pci_std_swizzle, | ||
33 | .map_irq = shark_map_irq, | 32 | .map_irq = shark_map_irq, |
34 | .nr_controllers = 1, | 33 | .nr_controllers = 1, |
35 | .scan = via82c505_scan_bus, | 34 | .ops = &via82c505_ops, |
36 | .preinit = via82c505_preinit, | 35 | .preinit = via82c505_preinit, |
37 | }; | 36 | }; |
38 | 37 | ||
diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c index cb224a344af..0891ec6e27f 100644 --- a/arch/arm/mach-shmobile/board-ag5evm.c +++ b/arch/arm/mach-shmobile/board-ag5evm.c | |||
@@ -365,23 +365,13 @@ static struct platform_device mipidsi0_device = { | |||
365 | }; | 365 | }; |
366 | 366 | ||
367 | /* SDHI0 */ | 367 | /* SDHI0 */ |
368 | static irqreturn_t ag5evm_sdhi0_gpio_cd(int irq, void *arg) | ||
369 | { | ||
370 | struct device *dev = arg; | ||
371 | struct sh_mobile_sdhi_info *info = dev->platform_data; | ||
372 | struct tmio_mmc_data *pdata = info->pdata; | ||
373 | |||
374 | tmio_mmc_cd_wakeup(pdata); | ||
375 | |||
376 | return IRQ_HANDLED; | ||
377 | } | ||
378 | |||
379 | static struct sh_mobile_sdhi_info sdhi0_info = { | 368 | static struct sh_mobile_sdhi_info sdhi0_info = { |
380 | .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX, | 369 | .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX, |
381 | .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX, | 370 | .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX, |
382 | .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT, | 371 | .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_USE_GPIO_CD, |
383 | .tmio_caps = MMC_CAP_SD_HIGHSPEED, | 372 | .tmio_caps = MMC_CAP_SD_HIGHSPEED, |
384 | .tmio_ocr_mask = MMC_VDD_27_28 | MMC_VDD_28_29, | 373 | .tmio_ocr_mask = MMC_VDD_27_28 | MMC_VDD_28_29, |
374 | .cd_gpio = GPIO_PORT251, | ||
385 | }; | 375 | }; |
386 | 376 | ||
387 | static struct resource sdhi0_resources[] = { | 377 | static struct resource sdhi0_resources[] = { |
@@ -557,7 +547,6 @@ static void __init ag5evm_init(void) | |||
557 | lcd_backlight_reset(); | 547 | lcd_backlight_reset(); |
558 | 548 | ||
559 | /* enable SDHI0 on CN15 [SD I/F] */ | 549 | /* enable SDHI0 on CN15 [SD I/F] */ |
560 | gpio_request(GPIO_FN_SDHICD0, NULL); | ||
561 | gpio_request(GPIO_FN_SDHIWP0, NULL); | 550 | gpio_request(GPIO_FN_SDHIWP0, NULL); |
562 | gpio_request(GPIO_FN_SDHICMD0, NULL); | 551 | gpio_request(GPIO_FN_SDHICMD0, NULL); |
563 | gpio_request(GPIO_FN_SDHICLK0, NULL); | 552 | gpio_request(GPIO_FN_SDHICLK0, NULL); |
@@ -566,13 +555,6 @@ static void __init ag5evm_init(void) | |||
566 | gpio_request(GPIO_FN_SDHID0_1, NULL); | 555 | gpio_request(GPIO_FN_SDHID0_1, NULL); |
567 | gpio_request(GPIO_FN_SDHID0_0, NULL); | 556 | gpio_request(GPIO_FN_SDHID0_0, NULL); |
568 | 557 | ||
569 | if (!request_irq(intcs_evt2irq(0x3c0), ag5evm_sdhi0_gpio_cd, | ||
570 | IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING, | ||
571 | "sdhi0 cd", &sdhi0_device.dev)) | ||
572 | sdhi0_info.tmio_flags |= TMIO_MMC_HAS_COLD_CD; | ||
573 | else | ||
574 | pr_warn("Unable to setup SDHI0 GPIO IRQ\n"); | ||
575 | |||
576 | /* enable SDHI1 on CN4 [WLAN I/F] */ | 558 | /* enable SDHI1 on CN4 [WLAN I/F] */ |
577 | gpio_request(GPIO_FN_SDHICLK1, NULL); | 559 | gpio_request(GPIO_FN_SDHICLK1, NULL); |
578 | gpio_request(GPIO_FN_SDHICMD1_PU, NULL); | 560 | gpio_request(GPIO_FN_SDHICMD1_PU, NULL); |
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index f49e28abe0a..8c6202bb6ae 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c | |||
@@ -1011,21 +1011,12 @@ static int slot_cn7_get_cd(struct platform_device *pdev) | |||
1011 | } | 1011 | } |
1012 | 1012 | ||
1013 | /* SDHI0 */ | 1013 | /* SDHI0 */ |
1014 | static irqreturn_t mackerel_sdhi0_gpio_cd(int irq, void *arg) | ||
1015 | { | ||
1016 | struct device *dev = arg; | ||
1017 | struct sh_mobile_sdhi_info *info = dev->platform_data; | ||
1018 | struct tmio_mmc_data *pdata = info->pdata; | ||
1019 | |||
1020 | tmio_mmc_cd_wakeup(pdata); | ||
1021 | |||
1022 | return IRQ_HANDLED; | ||
1023 | } | ||
1024 | |||
1025 | static struct sh_mobile_sdhi_info sdhi0_info = { | 1014 | static struct sh_mobile_sdhi_info sdhi0_info = { |
1026 | .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX, | 1015 | .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX, |
1027 | .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX, | 1016 | .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX, |
1017 | .tmio_flags = TMIO_MMC_USE_GPIO_CD, | ||
1028 | .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ, | 1018 | .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ, |
1019 | .cd_gpio = GPIO_PORT172, | ||
1029 | }; | 1020 | }; |
1030 | 1021 | ||
1031 | static struct resource sdhi0_resources[] = { | 1022 | static struct resource sdhi0_resources[] = { |
@@ -1384,7 +1375,6 @@ static void __init mackerel_init(void) | |||
1384 | { | 1375 | { |
1385 | u32 srcr4; | 1376 | u32 srcr4; |
1386 | struct clk *clk; | 1377 | struct clk *clk; |
1387 | int ret; | ||
1388 | 1378 | ||
1389 | /* External clock source */ | 1379 | /* External clock source */ |
1390 | clk_set_rate(&sh7372_dv_clki_clk, 27000000); | 1380 | clk_set_rate(&sh7372_dv_clki_clk, 27000000); |
@@ -1481,7 +1471,6 @@ static void __init mackerel_init(void) | |||
1481 | irq_set_irq_type(IRQ21, IRQ_TYPE_LEVEL_HIGH); | 1471 | irq_set_irq_type(IRQ21, IRQ_TYPE_LEVEL_HIGH); |
1482 | 1472 | ||
1483 | /* enable SDHI0 */ | 1473 | /* enable SDHI0 */ |
1484 | gpio_request(GPIO_FN_SDHICD0, NULL); | ||
1485 | gpio_request(GPIO_FN_SDHIWP0, NULL); | 1474 | gpio_request(GPIO_FN_SDHIWP0, NULL); |
1486 | gpio_request(GPIO_FN_SDHICMD0, NULL); | 1475 | gpio_request(GPIO_FN_SDHICMD0, NULL); |
1487 | gpio_request(GPIO_FN_SDHICLK0, NULL); | 1476 | gpio_request(GPIO_FN_SDHICLK0, NULL); |
@@ -1490,13 +1479,6 @@ static void __init mackerel_init(void) | |||
1490 | gpio_request(GPIO_FN_SDHID0_1, NULL); | 1479 | gpio_request(GPIO_FN_SDHID0_1, NULL); |
1491 | gpio_request(GPIO_FN_SDHID0_0, NULL); | 1480 | gpio_request(GPIO_FN_SDHID0_0, NULL); |
1492 | 1481 | ||
1493 | ret = request_irq(evt2irq(0x3340), mackerel_sdhi0_gpio_cd, | ||
1494 | IRQF_TRIGGER_FALLING, "sdhi0 cd", &sdhi0_device.dev); | ||
1495 | if (!ret) | ||
1496 | sdhi0_info.tmio_flags |= TMIO_MMC_HAS_COLD_CD; | ||
1497 | else | ||
1498 | pr_err("Cannot get IRQ #%d: %d\n", evt2irq(0x3340), ret); | ||
1499 | |||
1500 | #if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE) | 1482 | #if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE) |
1501 | /* enable SDHI1 */ | 1483 | /* enable SDHI1 */ |
1502 | gpio_request(GPIO_FN_SDHICMD1, NULL); | 1484 | gpio_request(GPIO_FN_SDHICMD1, NULL); |
diff --git a/arch/arm/mach-shmobile/headsmp.S b/arch/arm/mach-shmobile/headsmp.S index 6ac015c8920..b202c127252 100644 --- a/arch/arm/mach-shmobile/headsmp.S +++ b/arch/arm/mach-shmobile/headsmp.S | |||
@@ -16,6 +16,59 @@ | |||
16 | 16 | ||
17 | __CPUINIT | 17 | __CPUINIT |
18 | 18 | ||
19 | /* Cache invalidation nicked from arch/arm/mach-imx/head-v7.S, thanks! | ||
20 | * | ||
21 | * The secondary kernel init calls v7_flush_dcache_all before it enables | ||
22 | * the L1; however, the L1 comes out of reset in an undefined state, so | ||
23 | * the clean + invalidate performed by v7_flush_dcache_all causes a bunch | ||
24 | * of cache lines with uninitialized data and uninitialized tags to get | ||
25 | * written out to memory, which does really unpleasant things to the main | ||
26 | * processor. We fix this by performing an invalidate, rather than a | ||
27 | * clean + invalidate, before jumping into the kernel. | ||
28 | * | ||
29 | * This funciton is cloned from arch/arm/mach-tegra/headsmp.S, and needs | ||
30 | * to be called for both secondary cores startup and primary core resume | ||
31 | * procedures. Ideally, it should be moved into arch/arm/mm/cache-v7.S. | ||
32 | */ | ||
33 | ENTRY(v7_invalidate_l1) | ||
34 | mov r0, #0 | ||
35 | mcr p15, 0, r0, c7, c5, 0 @ invalidate I cache | ||
36 | mcr p15, 2, r0, c0, c0, 0 | ||
37 | mrc p15, 1, r0, c0, c0, 0 | ||
38 | |||
39 | ldr r1, =0x7fff | ||
40 | and r2, r1, r0, lsr #13 | ||
41 | |||
42 | ldr r1, =0x3ff | ||
43 | |||
44 | and r3, r1, r0, lsr #3 @ NumWays - 1 | ||
45 | add r2, r2, #1 @ NumSets | ||
46 | |||
47 | and r0, r0, #0x7 | ||
48 | add r0, r0, #4 @ SetShift | ||
49 | |||
50 | clz r1, r3 @ WayShift | ||
51 | add r4, r3, #1 @ NumWays | ||
52 | 1: sub r2, r2, #1 @ NumSets-- | ||
53 | mov r3, r4 @ Temp = NumWays | ||
54 | 2: subs r3, r3, #1 @ Temp-- | ||
55 | mov r5, r3, lsl r1 | ||
56 | mov r6, r2, lsl r0 | ||
57 | orr r5, r5, r6 @ Reg = (Temp<<WayShift)|(NumSets<<SetShift) | ||
58 | mcr p15, 0, r5, c7, c6, 2 | ||
59 | bgt 2b | ||
60 | cmp r2, #0 | ||
61 | bgt 1b | ||
62 | dsb | ||
63 | isb | ||
64 | mov pc, lr | ||
65 | ENDPROC(v7_invalidate_l1) | ||
66 | |||
67 | ENTRY(shmobile_invalidate_start) | ||
68 | bl v7_invalidate_l1 | ||
69 | b secondary_startup | ||
70 | ENDPROC(shmobile_invalidate_start) | ||
71 | |||
19 | /* | 72 | /* |
20 | * Reset vector for secondary CPUs. | 73 | * Reset vector for secondary CPUs. |
21 | * This will be mapped at address 0 by SBAR register. | 74 | * This will be mapped at address 0 by SBAR register. |
@@ -24,4 +77,5 @@ | |||
24 | .align 12 | 77 | .align 12 |
25 | ENTRY(shmobile_secondary_vector) | 78 | ENTRY(shmobile_secondary_vector) |
26 | ldr pc, 1f | 79 | ldr pc, 1f |
27 | 1: .long secondary_startup - PAGE_OFFSET + PLAT_PHYS_OFFSET | 80 | 1: .long shmobile_invalidate_start - PAGE_OFFSET + PLAT_PHYS_OFFSET |
81 | ENDPROC(shmobile_secondary_vector) | ||
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h index 83ad3fe0a75..c85e6ecda60 100644 --- a/arch/arm/mach-shmobile/include/mach/common.h +++ b/arch/arm/mach-shmobile/include/mach/common.h | |||
@@ -4,7 +4,6 @@ | |||
4 | extern void shmobile_earlytimer_init(void); | 4 | extern void shmobile_earlytimer_init(void); |
5 | extern struct sys_timer shmobile_timer; | 5 | extern struct sys_timer shmobile_timer; |
6 | struct twd_local_timer; | 6 | struct twd_local_timer; |
7 | void shmobile_twd_init(struct twd_local_timer *twd_local_timer); | ||
8 | extern void shmobile_setup_console(void); | 7 | extern void shmobile_setup_console(void); |
9 | extern void shmobile_secondary_vector(void); | 8 | extern void shmobile_secondary_vector(void); |
10 | extern int shmobile_platform_cpu_kill(unsigned int cpu); | 9 | extern int shmobile_platform_cpu_kill(unsigned int cpu); |
@@ -82,5 +81,6 @@ extern int r8a7779_platform_cpu_kill(unsigned int cpu); | |||
82 | extern void r8a7779_secondary_init(unsigned int cpu); | 81 | extern void r8a7779_secondary_init(unsigned int cpu); |
83 | extern int r8a7779_boot_secondary(unsigned int cpu); | 82 | extern int r8a7779_boot_secondary(unsigned int cpu); |
84 | extern void r8a7779_smp_prepare_cpus(void); | 83 | extern void r8a7779_smp_prepare_cpus(void); |
84 | extern void r8a7779_register_twd(void); | ||
85 | 85 | ||
86 | #endif /* __ARCH_MACH_COMMON_H */ | 86 | #endif /* __ARCH_MACH_COMMON_H */ |
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c index 12c6f529ab8..e98e46f6cf5 100644 --- a/arch/arm/mach-shmobile/setup-r8a7779.c +++ b/arch/arm/mach-shmobile/setup-r8a7779.c | |||
@@ -262,10 +262,14 @@ void __init r8a7779_add_standard_devices(void) | |||
262 | ARRAY_SIZE(r8a7779_late_devices)); | 262 | ARRAY_SIZE(r8a7779_late_devices)); |
263 | } | 263 | } |
264 | 264 | ||
265 | /* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */ | ||
266 | void __init __weak r8a7779_register_twd(void) { } | ||
267 | |||
265 | static void __init r8a7779_earlytimer_init(void) | 268 | static void __init r8a7779_earlytimer_init(void) |
266 | { | 269 | { |
267 | r8a7779_clock_init(); | 270 | r8a7779_clock_init(); |
268 | shmobile_earlytimer_init(); | 271 | shmobile_earlytimer_init(); |
272 | r8a7779_register_twd(); | ||
269 | } | 273 | } |
270 | 274 | ||
271 | void __init r8a7779_add_early_devices(void) | 275 | void __init r8a7779_add_early_devices(void) |
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c index 5bebffc1045..04a0dfe7549 100644 --- a/arch/arm/mach-shmobile/setup-sh73a0.c +++ b/arch/arm/mach-shmobile/setup-sh73a0.c | |||
@@ -688,10 +688,14 @@ void __init sh73a0_add_standard_devices(void) | |||
688 | ARRAY_SIZE(sh73a0_late_devices)); | 688 | ARRAY_SIZE(sh73a0_late_devices)); |
689 | } | 689 | } |
690 | 690 | ||
691 | /* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */ | ||
692 | void __init __weak sh73a0_register_twd(void) { } | ||
693 | |||
691 | static void __init sh73a0_earlytimer_init(void) | 694 | static void __init sh73a0_earlytimer_init(void) |
692 | { | 695 | { |
693 | sh73a0_clock_init(); | 696 | sh73a0_clock_init(); |
694 | shmobile_earlytimer_init(); | 697 | shmobile_earlytimer_init(); |
698 | sh73a0_register_twd(); | ||
695 | } | 699 | } |
696 | 700 | ||
697 | void __init sh73a0_add_early_devices(void) | 701 | void __init sh73a0_add_early_devices(void) |
diff --git a/arch/arm/mach-shmobile/smp-r8a7779.c b/arch/arm/mach-shmobile/smp-r8a7779.c index b62e19d4c9a..6d1d0238cbf 100644 --- a/arch/arm/mach-shmobile/smp-r8a7779.c +++ b/arch/arm/mach-shmobile/smp-r8a7779.c | |||
@@ -64,8 +64,15 @@ static void __iomem *scu_base_addr(void) | |||
64 | static DEFINE_SPINLOCK(scu_lock); | 64 | static DEFINE_SPINLOCK(scu_lock); |
65 | static unsigned long tmp; | 65 | static unsigned long tmp; |
66 | 66 | ||
67 | #ifdef CONFIG_HAVE_ARM_TWD | ||
67 | static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, 0xf0000600, 29); | 68 | static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, 0xf0000600, 29); |
68 | 69 | ||
70 | void __init r8a7779_register_twd(void) | ||
71 | { | ||
72 | twd_local_timer_register(&twd_local_timer); | ||
73 | } | ||
74 | #endif | ||
75 | |||
69 | static void modify_scu_cpu_psr(unsigned long set, unsigned long clr) | 76 | static void modify_scu_cpu_psr(unsigned long set, unsigned long clr) |
70 | { | 77 | { |
71 | void __iomem *scu_base = scu_base_addr(); | 78 | void __iomem *scu_base = scu_base_addr(); |
@@ -84,7 +91,6 @@ unsigned int __init r8a7779_get_core_count(void) | |||
84 | { | 91 | { |
85 | void __iomem *scu_base = scu_base_addr(); | 92 | void __iomem *scu_base = scu_base_addr(); |
86 | 93 | ||
87 | shmobile_twd_init(&twd_local_timer); | ||
88 | return scu_get_core_count(scu_base); | 94 | return scu_get_core_count(scu_base); |
89 | } | 95 | } |
90 | 96 | ||
diff --git a/arch/arm/mach-shmobile/smp-sh73a0.c b/arch/arm/mach-shmobile/smp-sh73a0.c index 14ad8b052f1..e36c41c4ab4 100644 --- a/arch/arm/mach-shmobile/smp-sh73a0.c +++ b/arch/arm/mach-shmobile/smp-sh73a0.c | |||
@@ -42,7 +42,13 @@ static void __iomem *scu_base_addr(void) | |||
42 | static DEFINE_SPINLOCK(scu_lock); | 42 | static DEFINE_SPINLOCK(scu_lock); |
43 | static unsigned long tmp; | 43 | static unsigned long tmp; |
44 | 44 | ||
45 | #ifdef CONFIG_HAVE_ARM_TWD | ||
45 | static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, 0xf0000600, 29); | 46 | static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, 0xf0000600, 29); |
47 | void __init sh73a0_register_twd(void) | ||
48 | { | ||
49 | twd_local_timer_register(&twd_local_timer); | ||
50 | } | ||
51 | #endif | ||
46 | 52 | ||
47 | static void modify_scu_cpu_psr(unsigned long set, unsigned long clr) | 53 | static void modify_scu_cpu_psr(unsigned long set, unsigned long clr) |
48 | { | 54 | { |
@@ -62,7 +68,6 @@ unsigned int __init sh73a0_get_core_count(void) | |||
62 | { | 68 | { |
63 | void __iomem *scu_base = scu_base_addr(); | 69 | void __iomem *scu_base = scu_base_addr(); |
64 | 70 | ||
65 | shmobile_twd_init(&twd_local_timer); | ||
66 | return scu_get_core_count(scu_base); | 71 | return scu_get_core_count(scu_base); |
67 | } | 72 | } |
68 | 73 | ||
diff --git a/arch/arm/mach-shmobile/timer.c b/arch/arm/mach-shmobile/timer.c index 2fba5f3d1c8..8b79e7917a2 100644 --- a/arch/arm/mach-shmobile/timer.c +++ b/arch/arm/mach-shmobile/timer.c | |||
@@ -46,15 +46,6 @@ static void __init shmobile_timer_init(void) | |||
46 | { | 46 | { |
47 | } | 47 | } |
48 | 48 | ||
49 | void __init shmobile_twd_init(struct twd_local_timer *twd_local_timer) | ||
50 | { | ||
51 | #ifdef CONFIG_HAVE_ARM_TWD | ||
52 | int err = twd_local_timer_register(twd_local_timer); | ||
53 | if (err) | ||
54 | pr_err("twd_local_timer_register failed %d\n", err); | ||
55 | #endif | ||
56 | } | ||
57 | |||
58 | struct sys_timer shmobile_timer = { | 49 | struct sys_timer shmobile_timer = { |
59 | .init = shmobile_timer_init, | 50 | .init = shmobile_timer_init, |
60 | }; | 51 | }; |
diff --git a/arch/arm/mach-tegra/board-dt-tegra20.c b/arch/arm/mach-tegra/board-dt-tegra20.c index 0952494f481..72ae6200352 100644 --- a/arch/arm/mach-tegra/board-dt-tegra20.c +++ b/arch/arm/mach-tegra/board-dt-tegra20.c | |||
@@ -37,7 +37,6 @@ | |||
37 | #include <asm/mach/arch.h> | 37 | #include <asm/mach/arch.h> |
38 | #include <asm/mach/time.h> | 38 | #include <asm/mach/time.h> |
39 | #include <asm/setup.h> | 39 | #include <asm/setup.h> |
40 | #include <asm/hardware/gic.h> | ||
41 | 40 | ||
42 | #include <mach/iomap.h> | 41 | #include <mach/iomap.h> |
43 | #include <mach/irqs.h> | 42 | #include <mach/irqs.h> |
diff --git a/arch/arm/mach-tegra/flowctrl.c b/arch/arm/mach-tegra/flowctrl.c index fef66a7486e..f07488e0bd3 100644 --- a/arch/arm/mach-tegra/flowctrl.c +++ b/arch/arm/mach-tegra/flowctrl.c | |||
@@ -53,10 +53,10 @@ static void flowctrl_update(u8 offset, u32 value) | |||
53 | 53 | ||
54 | void flowctrl_write_cpu_csr(unsigned int cpuid, u32 value) | 54 | void flowctrl_write_cpu_csr(unsigned int cpuid, u32 value) |
55 | { | 55 | { |
56 | return flowctrl_update(flowctrl_offset_halt_cpu[cpuid], value); | 56 | return flowctrl_update(flowctrl_offset_cpu_csr[cpuid], value); |
57 | } | 57 | } |
58 | 58 | ||
59 | void flowctrl_write_cpu_halt(unsigned int cpuid, u32 value) | 59 | void flowctrl_write_cpu_halt(unsigned int cpuid, u32 value) |
60 | { | 60 | { |
61 | return flowctrl_update(flowctrl_offset_cpu_csr[cpuid], value); | 61 | return flowctrl_update(flowctrl_offset_halt_cpu[cpuid], value); |
62 | } | 62 | } |
diff --git a/arch/arm/mach-tegra/include/mach/dma.h b/arch/arm/mach-tegra/include/mach/dma.h index 3c9339058be..9077092812c 100644 --- a/arch/arm/mach-tegra/include/mach/dma.h +++ b/arch/arm/mach-tegra/include/mach/dma.h | |||
@@ -51,8 +51,6 @@ | |||
51 | #define TEGRA_DMA_REQ_SEL_OWR 25 | 51 | #define TEGRA_DMA_REQ_SEL_OWR 25 |
52 | #define TEGRA_DMA_REQ_SEL_INVALID 31 | 52 | #define TEGRA_DMA_REQ_SEL_INVALID 31 |
53 | 53 | ||
54 | #if defined(CONFIG_TEGRA_SYSTEM_DMA) | ||
55 | |||
56 | struct tegra_dma_req; | 54 | struct tegra_dma_req; |
57 | struct tegra_dma_channel; | 55 | struct tegra_dma_channel; |
58 | 56 | ||
@@ -151,5 +149,3 @@ void tegra_dma_free_channel(struct tegra_dma_channel *ch); | |||
151 | int __init tegra_dma_init(void); | 149 | int __init tegra_dma_init(void); |
152 | 150 | ||
153 | #endif | 151 | #endif |
154 | |||
155 | #endif | ||
diff --git a/arch/arm/mach-tegra/pcie.c b/arch/arm/mach-tegra/pcie.c index 54a816ff384..0e09137506e 100644 --- a/arch/arm/mach-tegra/pcie.c +++ b/arch/arm/mach-tegra/pcie.c | |||
@@ -475,7 +475,6 @@ static struct hw_pci tegra_pcie_hw __initdata = { | |||
475 | .nr_controllers = 2, | 475 | .nr_controllers = 2, |
476 | .setup = tegra_pcie_setup, | 476 | .setup = tegra_pcie_setup, |
477 | .scan = tegra_pcie_scan_bus, | 477 | .scan = tegra_pcie_scan_bus, |
478 | .swizzle = pci_std_swizzle, | ||
479 | .map_irq = tegra_pcie_map_irq, | 478 | .map_irq = tegra_pcie_map_irq, |
480 | }; | 479 | }; |
481 | 480 | ||
diff --git a/arch/arm/mach-tegra/timer.c b/arch/arm/mach-tegra/timer.c index 1eed8d4a80e..315672c7bd4 100644 --- a/arch/arm/mach-tegra/timer.c +++ b/arch/arm/mach-tegra/timer.c | |||
@@ -124,7 +124,7 @@ static u64 tegra_rtc_read_ms(void) | |||
124 | } | 124 | } |
125 | 125 | ||
126 | /* | 126 | /* |
127 | * read_persistent_clock - Return time from a persistent clock. | 127 | * tegra_read_persistent_clock - Return time from a persistent clock. |
128 | * | 128 | * |
129 | * Reads the time from a source which isn't disabled during PM, the | 129 | * Reads the time from a source which isn't disabled during PM, the |
130 | * 32k sync timer. Convert the cycles elapsed since last read into | 130 | * 32k sync timer. Convert the cycles elapsed since last read into |
@@ -133,7 +133,7 @@ static u64 tegra_rtc_read_ms(void) | |||
133 | * tegra_rtc driver could be executing to avoid race conditions | 133 | * tegra_rtc driver could be executing to avoid race conditions |
134 | * on the RTC shadow register | 134 | * on the RTC shadow register |
135 | */ | 135 | */ |
136 | void read_persistent_clock(struct timespec *ts) | 136 | static void tegra_read_persistent_clock(struct timespec *ts) |
137 | { | 137 | { |
138 | u64 delta; | 138 | u64 delta; |
139 | struct timespec *tsp = &persistent_ts; | 139 | struct timespec *tsp = &persistent_ts; |
@@ -243,6 +243,7 @@ static void __init tegra_init_timer(void) | |||
243 | tegra_clockevent.irq = tegra_timer_irq.irq; | 243 | tegra_clockevent.irq = tegra_timer_irq.irq; |
244 | clockevents_register_device(&tegra_clockevent); | 244 | clockevents_register_device(&tegra_clockevent); |
245 | tegra_twd_init(); | 245 | tegra_twd_init(); |
246 | register_persistent_clock(NULL, tegra_read_persistent_clock); | ||
246 | } | 247 | } |
247 | 248 | ||
248 | struct sys_timer tegra_timer = { | 249 | struct sys_timer tegra_timer = { |
diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig index ef7099eea0f..0e8470a3fbe 100644 --- a/arch/arm/mach-ux500/Kconfig +++ b/arch/arm/mach-ux500/Kconfig | |||
@@ -10,10 +10,6 @@ config UX500_SOC_COMMON | |||
10 | select ARM_ERRATA_764369 | 10 | select ARM_ERRATA_764369 |
11 | select CACHE_L2X0 | 11 | select CACHE_L2X0 |
12 | 12 | ||
13 | config UX500_SOC_DB5500 | ||
14 | bool | ||
15 | select MFD_DB5500_PRCMU | ||
16 | |||
17 | config UX500_SOC_DB8500 | 13 | config UX500_SOC_DB8500 |
18 | bool | 14 | bool |
19 | select MFD_DB8500_PRCMU | 15 | select MFD_DB8500_PRCMU |
@@ -45,15 +41,8 @@ config MACH_SNOWBALL | |||
45 | help | 41 | help |
46 | Include support for the snowball development platform. | 42 | Include support for the snowball development platform. |
47 | 43 | ||
48 | config MACH_U5500 | ||
49 | bool "U5500 Development platform" | ||
50 | select UX500_SOC_DB5500 | ||
51 | help | ||
52 | Include support for the U5500 development platform. | ||
53 | |||
54 | config UX500_AUTO_PLATFORM | 44 | config UX500_AUTO_PLATFORM |
55 | def_bool y | 45 | def_bool y |
56 | depends on !MACH_U5500 | ||
57 | select MACH_MOP500 | 46 | select MACH_MOP500 |
58 | help | 47 | help |
59 | At least one platform needs to be selected in order to build | 48 | At least one platform needs to be selected in order to build |
@@ -74,18 +63,4 @@ config UX500_DEBUG_UART | |||
74 | Choose the UART on which kernel low-level debug messages should be | 63 | Choose the UART on which kernel low-level debug messages should be |
75 | output. | 64 | output. |
76 | 65 | ||
77 | config U5500_MODEM_IRQ | ||
78 | bool "Modem IRQ support" | ||
79 | depends on UX500_SOC_DB5500 | ||
80 | default y | ||
81 | help | ||
82 | Add support for handling IRQ:s from modem side | ||
83 | |||
84 | config U5500_MBOX | ||
85 | bool "Mailbox support" | ||
86 | depends on U5500_MODEM_IRQ | ||
87 | default y | ||
88 | help | ||
89 | Add support for U5500 mailbox communication with modem side | ||
90 | |||
91 | endif | 66 | endif |
diff --git a/arch/arm/mach-ux500/Makefile b/arch/arm/mach-ux500/Makefile index 465b9ec9510..fc7db5df970 100644 --- a/arch/arm/mach-ux500/Makefile +++ b/arch/arm/mach-ux500/Makefile | |||
@@ -5,16 +5,11 @@ | |||
5 | obj-y := clock.o cpu.o devices.o devices-common.o \ | 5 | obj-y := clock.o cpu.o devices.o devices-common.o \ |
6 | id.o usb.o timer.o | 6 | id.o usb.o timer.o |
7 | obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o | 7 | obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o |
8 | obj-$(CONFIG_UX500_SOC_DB5500) += cpu-db5500.o dma-db5500.o | ||
9 | obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o devices-db8500.o | 8 | obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o devices-db8500.o |
10 | obj-$(CONFIG_MACH_MOP500) += board-mop500.o board-mop500-sdi.o \ | 9 | obj-$(CONFIG_MACH_MOP500) += board-mop500.o board-mop500-sdi.o \ |
11 | board-mop500-regulators.o \ | 10 | board-mop500-regulators.o \ |
12 | board-mop500-uib.o board-mop500-stuib.o \ | 11 | board-mop500-uib.o board-mop500-stuib.o \ |
13 | board-mop500-u8500uib.o \ | 12 | board-mop500-u8500uib.o \ |
14 | board-mop500-pins.o | 13 | board-mop500-pins.o |
15 | obj-$(CONFIG_MACH_U5500) += board-u5500.o board-u5500-sdi.o | ||
16 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o | 14 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o |
17 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o | 15 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o |
18 | obj-$(CONFIG_U5500_MODEM_IRQ) += modem-irq-db5500.o | ||
19 | obj-$(CONFIG_U5500_MBOX) += mbox-db5500.o | ||
20 | |||
diff --git a/arch/arm/mach-ux500/board-u5500-sdi.c b/arch/arm/mach-ux500/board-u5500-sdi.c deleted file mode 100644 index 836112eedde..00000000000 --- a/arch/arm/mach-ux500/board-u5500-sdi.c +++ /dev/null | |||
@@ -1,74 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * | ||
4 | * Author: Hanumath Prasad <ulf.hansson@stericsson.com> | ||
5 | * License terms: GNU General Public License (GPL) version 2 | ||
6 | */ | ||
7 | |||
8 | #include <linux/amba/mmci.h> | ||
9 | #include <linux/mmc/host.h> | ||
10 | |||
11 | #include <plat/pincfg.h> | ||
12 | #include <plat/gpio-nomadik.h> | ||
13 | #include <mach/db5500-regs.h> | ||
14 | #include <plat/ste_dma40.h> | ||
15 | |||
16 | #include "pins-db5500.h" | ||
17 | #include "devices-db5500.h" | ||
18 | #include "ste-dma40-db5500.h" | ||
19 | |||
20 | static pin_cfg_t u5500_sdi_pins[] = { | ||
21 | /* SDI0 (POP eMMC) */ | ||
22 | GPIO5_MC0_DAT0 | PIN_DIR_INPUT | PIN_PULL_UP, | ||
23 | GPIO6_MC0_DAT1 | PIN_DIR_INPUT | PIN_PULL_UP, | ||
24 | GPIO7_MC0_DAT2 | PIN_DIR_INPUT | PIN_PULL_UP, | ||
25 | GPIO8_MC0_DAT3 | PIN_DIR_INPUT | PIN_PULL_UP, | ||
26 | GPIO9_MC0_DAT4 | PIN_DIR_INPUT | PIN_PULL_UP, | ||
27 | GPIO10_MC0_DAT5 | PIN_DIR_INPUT | PIN_PULL_UP, | ||
28 | GPIO11_MC0_DAT6 | PIN_DIR_INPUT | PIN_PULL_UP, | ||
29 | GPIO12_MC0_DAT7 | PIN_DIR_INPUT | PIN_PULL_UP, | ||
30 | GPIO13_MC0_CMD | PIN_DIR_INPUT | PIN_PULL_UP, | ||
31 | GPIO14_MC0_CLK | PIN_DIR_OUTPUT | PIN_VAL_LOW, | ||
32 | }; | ||
33 | |||
34 | #ifdef CONFIG_STE_DMA40 | ||
35 | struct stedma40_chan_cfg u5500_sdi0_dma_cfg_rx = { | ||
36 | .mode = STEDMA40_MODE_LOGICAL, | ||
37 | .dir = STEDMA40_PERIPH_TO_MEM, | ||
38 | .src_dev_type = DB5500_DMA_DEV24_SDMMC0_RX, | ||
39 | .dst_dev_type = STEDMA40_DEV_DST_MEMORY, | ||
40 | .src_info.data_width = STEDMA40_WORD_WIDTH, | ||
41 | .dst_info.data_width = STEDMA40_WORD_WIDTH, | ||
42 | }; | ||
43 | |||
44 | static struct stedma40_chan_cfg u5500_sdi0_dma_cfg_tx = { | ||
45 | .mode = STEDMA40_MODE_LOGICAL, | ||
46 | .dir = STEDMA40_MEM_TO_PERIPH, | ||
47 | .src_dev_type = STEDMA40_DEV_SRC_MEMORY, | ||
48 | .dst_dev_type = DB5500_DMA_DEV24_SDMMC0_TX, | ||
49 | .src_info.data_width = STEDMA40_WORD_WIDTH, | ||
50 | .dst_info.data_width = STEDMA40_WORD_WIDTH, | ||
51 | }; | ||
52 | #endif | ||
53 | |||
54 | static struct mmci_platform_data u5500_sdi0_data = { | ||
55 | .ocr_mask = MMC_VDD_165_195, | ||
56 | .f_max = 50000000, | ||
57 | .capabilities = MMC_CAP_4_BIT_DATA | | ||
58 | MMC_CAP_8_BIT_DATA | | ||
59 | MMC_CAP_MMC_HIGHSPEED, | ||
60 | .gpio_cd = -1, | ||
61 | .gpio_wp = -1, | ||
62 | #ifdef CONFIG_STE_DMA40 | ||
63 | .dma_filter = stedma40_filter, | ||
64 | .dma_rx_param = &u5500_sdi0_dma_cfg_rx, | ||
65 | .dma_tx_param = &u5500_sdi0_dma_cfg_tx, | ||
66 | #endif | ||
67 | }; | ||
68 | |||
69 | void __init u5500_sdi_init(struct device *parent) | ||
70 | { | ||
71 | nmk_config_pins(u5500_sdi_pins, ARRAY_SIZE(u5500_sdi_pins)); | ||
72 | |||
73 | db5500_add_sdi0(parent, &u5500_sdi0_data); | ||
74 | } | ||
diff --git a/arch/arm/mach-ux500/board-u5500.c b/arch/arm/mach-ux500/board-u5500.c deleted file mode 100644 index 0ff4be72a80..00000000000 --- a/arch/arm/mach-ux500/board-u5500.c +++ /dev/null | |||
@@ -1,162 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * | ||
4 | * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson | ||
5 | * License terms: GNU General Public License (GPL) version 2 | ||
6 | */ | ||
7 | |||
8 | #include <linux/init.h> | ||
9 | #include <linux/platform_device.h> | ||
10 | #include <linux/amba/bus.h> | ||
11 | #include <linux/irq.h> | ||
12 | #include <linux/i2c.h> | ||
13 | #include <linux/mfd/abx500/ab5500.h> | ||
14 | |||
15 | #include <asm/hardware/gic.h> | ||
16 | #include <asm/mach/arch.h> | ||
17 | #include <asm/mach-types.h> | ||
18 | |||
19 | #include <plat/pincfg.h> | ||
20 | #include <plat/i2c.h> | ||
21 | #include <plat/gpio-nomadik.h> | ||
22 | |||
23 | #include <mach/hardware.h> | ||
24 | #include <mach/devices.h> | ||
25 | #include <mach/setup.h> | ||
26 | |||
27 | #include "pins-db5500.h" | ||
28 | #include "devices-db5500.h" | ||
29 | #include <linux/led-lm3530.h> | ||
30 | |||
31 | /* | ||
32 | * GPIO | ||
33 | */ | ||
34 | |||
35 | static pin_cfg_t u5500_pins[] = { | ||
36 | /* I2C */ | ||
37 | GPIO218_I2C2_SCL | PIN_INPUT_PULLUP, | ||
38 | GPIO219_I2C2_SDA | PIN_INPUT_PULLUP, | ||
39 | |||
40 | /* DISPLAY_ENABLE */ | ||
41 | GPIO226_GPIO | PIN_OUTPUT_LOW, | ||
42 | |||
43 | /* Backlight Enbale */ | ||
44 | GPIO224_GPIO | PIN_OUTPUT_HIGH, | ||
45 | }; | ||
46 | /* | ||
47 | * I2C | ||
48 | */ | ||
49 | |||
50 | #define U5500_I2C_CONTROLLER(id, _slsu, _tft, _rft, clk, _sm) \ | ||
51 | static struct nmk_i2c_controller u5500_i2c##id##_data = { \ | ||
52 | /* \ | ||
53 | * slave data setup time, which is \ | ||
54 | * 250 ns,100ns,10ns which is 14,6,2 \ | ||
55 | * respectively for a 48 Mhz \ | ||
56 | * i2c clock \ | ||
57 | */ \ | ||
58 | .slsu = _slsu, \ | ||
59 | /* Tx FIFO threshold */ \ | ||
60 | .tft = _tft, \ | ||
61 | /* Rx FIFO threshold */ \ | ||
62 | .rft = _rft, \ | ||
63 | /* std. mode operation */ \ | ||
64 | .clk_freq = clk, \ | ||
65 | .sm = _sm, \ | ||
66 | } | ||
67 | /* | ||
68 | * The board uses TODO <3> i2c controllers, initialize all of | ||
69 | * them with slave data setup time of 250 ns, | ||
70 | * Tx & Rx FIFO threshold values as 1 and standard | ||
71 | * mode of operation | ||
72 | */ | ||
73 | |||
74 | U5500_I2C_CONTROLLER(2, 0xe, 1, 1, 400000, I2C_FREQ_MODE_FAST); | ||
75 | |||
76 | static struct lm3530_platform_data u5500_als_platform_data = { | ||
77 | .mode = LM3530_BL_MODE_MANUAL, | ||
78 | .als_input_mode = LM3530_INPUT_ALS1, | ||
79 | .max_current = LM3530_FS_CURR_26mA, | ||
80 | .pwm_pol_hi = true, | ||
81 | .als_avrg_time = LM3530_ALS_AVRG_TIME_512ms, | ||
82 | .brt_ramp_law = 1, /* Linear */ | ||
83 | .brt_ramp_fall = LM3530_RAMP_TIME_8s, | ||
84 | .brt_ramp_rise = LM3530_RAMP_TIME_8s, | ||
85 | .als1_resistor_sel = LM3530_ALS_IMPD_13_53kOhm, | ||
86 | .als2_resistor_sel = LM3530_ALS_IMPD_Z, | ||
87 | .als_vmin = 730, /* mV */ | ||
88 | .als_vmax = 1020, /* mV */ | ||
89 | .brt_val = 0x7F, /* Max brightness */ | ||
90 | }; | ||
91 | |||
92 | static struct i2c_board_info __initdata u5500_i2c2_devices[] = { | ||
93 | { | ||
94 | /* Backlight */ | ||
95 | I2C_BOARD_INFO("lm3530-led", 0x36), | ||
96 | .platform_data = &u5500_als_platform_data, | ||
97 | }, | ||
98 | }; | ||
99 | |||
100 | static void __init u5500_i2c_init(struct device *parent) | ||
101 | { | ||
102 | db5500_add_i2c2(parent, &u5500_i2c2_data); | ||
103 | i2c_register_board_info(2, ARRAY_AND_SIZE(u5500_i2c2_devices)); | ||
104 | } | ||
105 | |||
106 | static struct ab5500_platform_data ab5500_plf_data = { | ||
107 | .irq = { | ||
108 | .base = 0, | ||
109 | .count = 0, | ||
110 | }, | ||
111 | .init_settings = NULL, | ||
112 | .init_settings_sz = 0, | ||
113 | .pm_power_off = false, | ||
114 | }; | ||
115 | |||
116 | static struct platform_device ab5500_device = { | ||
117 | .name = "ab5500-core", | ||
118 | .id = 0, | ||
119 | .dev = { | ||
120 | .platform_data = &ab5500_plf_data, | ||
121 | }, | ||
122 | .num_resources = 0, | ||
123 | }; | ||
124 | |||
125 | static struct platform_device *u5500_platform_devices[] __initdata = { | ||
126 | &ab5500_device, | ||
127 | }; | ||
128 | |||
129 | static void __init u5500_uart_init(struct device *parent) | ||
130 | { | ||
131 | db5500_add_uart0(parent, NULL); | ||
132 | db5500_add_uart1(parent, NULL); | ||
133 | db5500_add_uart2(parent, NULL); | ||
134 | } | ||
135 | |||
136 | static void __init u5500_init_machine(void) | ||
137 | { | ||
138 | struct device *parent = NULL; | ||
139 | int i; | ||
140 | |||
141 | parent = u5500_init_devices(); | ||
142 | nmk_config_pins(u5500_pins, ARRAY_SIZE(u5500_pins)); | ||
143 | |||
144 | u5500_i2c_init(parent); | ||
145 | u5500_sdi_init(parent); | ||
146 | u5500_uart_init(parent); | ||
147 | |||
148 | for (i = 0; i < ARRAY_SIZE(u5500_platform_devices); i++) | ||
149 | u5500_platform_devices[i]->dev.parent = parent; | ||
150 | |||
151 | platform_add_devices(u5500_platform_devices, | ||
152 | ARRAY_SIZE(u5500_platform_devices)); | ||
153 | } | ||
154 | |||
155 | MACHINE_START(U5500, "ST-Ericsson U5500 Platform") | ||
156 | .atag_offset = 0x100, | ||
157 | .map_io = u5500_map_io, | ||
158 | .init_irq = ux500_init_irq, | ||
159 | .timer = &ux500_timer, | ||
160 | .handle_irq = gic_handle_irq, | ||
161 | .init_machine = u5500_init_machine, | ||
162 | MACHINE_END | ||
diff --git a/arch/arm/mach-ux500/cache-l2x0.c b/arch/arm/mach-ux500/cache-l2x0.c index 77a75ed0df6..df91344aa2d 100644 --- a/arch/arm/mach-ux500/cache-l2x0.c +++ b/arch/arm/mach-ux500/cache-l2x0.c | |||
@@ -36,9 +36,7 @@ static int __init ux500_l2x0_unlock(void) | |||
36 | 36 | ||
37 | static int __init ux500_l2x0_init(void) | 37 | static int __init ux500_l2x0_init(void) |
38 | { | 38 | { |
39 | if (cpu_is_u5500()) | 39 | if (cpu_is_u8500()) |
40 | l2x0_base = __io_address(U5500_L2CC_BASE); | ||
41 | else if (cpu_is_u8500()) | ||
42 | l2x0_base = __io_address(U8500_L2CC_BASE); | 40 | l2x0_base = __io_address(U8500_L2CC_BASE); |
43 | else | 41 | else |
44 | ux500_unknown_soc(); | 42 | ux500_unknown_soc(); |
diff --git a/arch/arm/mach-ux500/clock.c b/arch/arm/mach-ux500/clock.c index ec35f0aa566..9feb6bc7f20 100644 --- a/arch/arm/mach-ux500/clock.c +++ b/arch/arm/mach-ux500/clock.c | |||
@@ -149,9 +149,7 @@ static unsigned long clk_mtu_get_rate(struct clk *clk) | |||
149 | unsigned long mturate; | 149 | unsigned long mturate; |
150 | unsigned long retclk; | 150 | unsigned long retclk; |
151 | 151 | ||
152 | if (cpu_is_u5500()) | 152 | if (cpu_is_u8500()) |
153 | addr = __io_address(U5500_PRCMU_BASE); | ||
154 | else if (cpu_is_u8500()) | ||
155 | addr = __io_address(U8500_PRCMU_BASE); | 153 | addr = __io_address(U8500_PRCMU_BASE); |
156 | else | 154 | else |
157 | ux500_unknown_soc(); | 155 | ux500_unknown_soc(); |
@@ -705,14 +703,6 @@ late_initcall(clk_init_smp_twd_cpufreq); | |||
705 | 703 | ||
706 | int __init clk_init(void) | 704 | int __init clk_init(void) |
707 | { | 705 | { |
708 | if (cpu_is_u5500()) { | ||
709 | /* Clock tree for U5500 not implemented yet */ | ||
710 | clk_prcc_ops.enable = clk_prcc_ops.disable = NULL; | ||
711 | clk_prcmu_ops.enable = clk_prcmu_ops.disable = NULL; | ||
712 | clk_uartclk.rate = 36360000; | ||
713 | clk_sdmmcclk.rate = 99900000; | ||
714 | } | ||
715 | |||
716 | clkdev_add_table(u8500_clks, ARRAY_SIZE(u8500_clks)); | 706 | clkdev_add_table(u8500_clks, ARRAY_SIZE(u8500_clks)); |
717 | clkdev_add(&clk_smp_twd_lookup); | 707 | clkdev_add(&clk_smp_twd_lookup); |
718 | 708 | ||
diff --git a/arch/arm/mach-ux500/cpu-db5500.c b/arch/arm/mach-ux500/cpu-db5500.c deleted file mode 100644 index bca47f32082..00000000000 --- a/arch/arm/mach-ux500/cpu-db5500.c +++ /dev/null | |||
@@ -1,247 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * | ||
4 | * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson | ||
5 | * License terms: GNU General Public License (GPL) version 2 | ||
6 | */ | ||
7 | |||
8 | #include <linux/platform_device.h> | ||
9 | #include <linux/amba/bus.h> | ||
10 | #include <linux/io.h> | ||
11 | #include <linux/irq.h> | ||
12 | |||
13 | #include <asm/mach/map.h> | ||
14 | #include <asm/pmu.h> | ||
15 | |||
16 | #include <plat/gpio-nomadik.h> | ||
17 | |||
18 | #include <mach/hardware.h> | ||
19 | #include <mach/devices.h> | ||
20 | #include <mach/setup.h> | ||
21 | #include <mach/irqs.h> | ||
22 | #include <mach/usb.h> | ||
23 | |||
24 | #include "devices-db5500.h" | ||
25 | #include "ste-dma40-db5500.h" | ||
26 | |||
27 | static struct map_desc u5500_uart_io_desc[] __initdata = { | ||
28 | __IO_DEV_DESC(U5500_UART0_BASE, SZ_4K), | ||
29 | __IO_DEV_DESC(U5500_UART2_BASE, SZ_4K), | ||
30 | }; | ||
31 | |||
32 | static struct map_desc u5500_io_desc[] __initdata = { | ||
33 | /* SCU base also covers GIC CPU BASE and TWD with its 4K page */ | ||
34 | __IO_DEV_DESC(U5500_SCU_BASE, SZ_4K), | ||
35 | __IO_DEV_DESC(U5500_GIC_DIST_BASE, SZ_4K), | ||
36 | __IO_DEV_DESC(U5500_L2CC_BASE, SZ_4K), | ||
37 | __IO_DEV_DESC(U5500_MTU0_BASE, SZ_4K), | ||
38 | __IO_DEV_DESC(U5500_BACKUPRAM0_BASE, SZ_8K), | ||
39 | |||
40 | __IO_DEV_DESC(U5500_GPIO0_BASE, SZ_4K), | ||
41 | __IO_DEV_DESC(U5500_GPIO1_BASE, SZ_4K), | ||
42 | __IO_DEV_DESC(U5500_GPIO2_BASE, SZ_4K), | ||
43 | __IO_DEV_DESC(U5500_GPIO3_BASE, SZ_4K), | ||
44 | __IO_DEV_DESC(U5500_GPIO4_BASE, SZ_4K), | ||
45 | __IO_DEV_DESC(U5500_PRCMU_BASE, SZ_4K), | ||
46 | __IO_DEV_DESC(U5500_PRCMU_TCDM_BASE, SZ_4K), | ||
47 | }; | ||
48 | |||
49 | static struct resource mbox0_resources[] = { | ||
50 | { | ||
51 | .name = "mbox_peer", | ||
52 | .start = U5500_MBOX0_PEER_START, | ||
53 | .end = U5500_MBOX0_PEER_END, | ||
54 | .flags = IORESOURCE_MEM, | ||
55 | }, | ||
56 | { | ||
57 | .name = "mbox_local", | ||
58 | .start = U5500_MBOX0_LOCAL_START, | ||
59 | .end = U5500_MBOX0_LOCAL_END, | ||
60 | .flags = IORESOURCE_MEM, | ||
61 | }, | ||
62 | { | ||
63 | .name = "mbox_irq", | ||
64 | .start = MBOX_PAIR0_VIRT_IRQ, | ||
65 | .end = MBOX_PAIR0_VIRT_IRQ, | ||
66 | .flags = IORESOURCE_IRQ, | ||
67 | } | ||
68 | }; | ||
69 | |||
70 | static struct resource mbox1_resources[] = { | ||
71 | { | ||
72 | .name = "mbox_peer", | ||
73 | .start = U5500_MBOX1_PEER_START, | ||
74 | .end = U5500_MBOX1_PEER_END, | ||
75 | .flags = IORESOURCE_MEM, | ||
76 | }, | ||
77 | { | ||
78 | .name = "mbox_local", | ||
79 | .start = U5500_MBOX1_LOCAL_START, | ||
80 | .end = U5500_MBOX1_LOCAL_END, | ||
81 | .flags = IORESOURCE_MEM, | ||
82 | }, | ||
83 | { | ||
84 | .name = "mbox_irq", | ||
85 | .start = MBOX_PAIR1_VIRT_IRQ, | ||
86 | .end = MBOX_PAIR1_VIRT_IRQ, | ||
87 | .flags = IORESOURCE_IRQ, | ||
88 | } | ||
89 | }; | ||
90 | |||
91 | static struct resource mbox2_resources[] = { | ||
92 | { | ||
93 | .name = "mbox_peer", | ||
94 | .start = U5500_MBOX2_PEER_START, | ||
95 | .end = U5500_MBOX2_PEER_END, | ||
96 | .flags = IORESOURCE_MEM, | ||
97 | }, | ||
98 | { | ||
99 | .name = "mbox_local", | ||
100 | .start = U5500_MBOX2_LOCAL_START, | ||
101 | .end = U5500_MBOX2_LOCAL_END, | ||
102 | .flags = IORESOURCE_MEM, | ||
103 | }, | ||
104 | { | ||
105 | .name = "mbox_irq", | ||
106 | .start = MBOX_PAIR2_VIRT_IRQ, | ||
107 | .end = MBOX_PAIR2_VIRT_IRQ, | ||
108 | .flags = IORESOURCE_IRQ, | ||
109 | } | ||
110 | }; | ||
111 | |||
112 | static struct platform_device mbox0_device = { | ||
113 | .id = 0, | ||
114 | .name = "mbox", | ||
115 | .resource = mbox0_resources, | ||
116 | .num_resources = ARRAY_SIZE(mbox0_resources), | ||
117 | }; | ||
118 | |||
119 | static struct platform_device mbox1_device = { | ||
120 | .id = 1, | ||
121 | .name = "mbox", | ||
122 | .resource = mbox1_resources, | ||
123 | .num_resources = ARRAY_SIZE(mbox1_resources), | ||
124 | }; | ||
125 | |||
126 | static struct platform_device mbox2_device = { | ||
127 | .id = 2, | ||
128 | .name = "mbox", | ||
129 | .resource = mbox2_resources, | ||
130 | .num_resources = ARRAY_SIZE(mbox2_resources), | ||
131 | }; | ||
132 | |||
133 | static struct platform_device *db5500_platform_devs[] __initdata = { | ||
134 | &mbox0_device, | ||
135 | &mbox1_device, | ||
136 | &mbox2_device, | ||
137 | }; | ||
138 | |||
139 | static resource_size_t __initdata db5500_gpio_base[] = { | ||
140 | U5500_GPIOBANK0_BASE, | ||
141 | U5500_GPIOBANK1_BASE, | ||
142 | U5500_GPIOBANK2_BASE, | ||
143 | U5500_GPIOBANK3_BASE, | ||
144 | U5500_GPIOBANK4_BASE, | ||
145 | U5500_GPIOBANK5_BASE, | ||
146 | U5500_GPIOBANK6_BASE, | ||
147 | U5500_GPIOBANK7_BASE, | ||
148 | }; | ||
149 | |||
150 | static void __init db5500_add_gpios(struct device *parent) | ||
151 | { | ||
152 | struct nmk_gpio_platform_data pdata = { | ||
153 | /* No custom data yet */ | ||
154 | }; | ||
155 | |||
156 | dbx500_add_gpios(parent, ARRAY_AND_SIZE(db5500_gpio_base), | ||
157 | IRQ_DB5500_GPIO0, &pdata); | ||
158 | } | ||
159 | |||
160 | void __init u5500_map_io(void) | ||
161 | { | ||
162 | /* | ||
163 | * Map the UARTs early so that the DEBUG_LL stuff continues to work. | ||
164 | */ | ||
165 | iotable_init(u5500_uart_io_desc, ARRAY_SIZE(u5500_uart_io_desc)); | ||
166 | |||
167 | ux500_map_io(); | ||
168 | |||
169 | iotable_init(u5500_io_desc, ARRAY_SIZE(u5500_io_desc)); | ||
170 | |||
171 | _PRCMU_BASE = __io_address(U5500_PRCMU_BASE); | ||
172 | } | ||
173 | |||
174 | static void __init db5500_pmu_init(void) | ||
175 | { | ||
176 | struct resource res[] = { | ||
177 | [0] = { | ||
178 | .start = IRQ_DB5500_PMU0, | ||
179 | .end = IRQ_DB5500_PMU0, | ||
180 | .flags = IORESOURCE_IRQ, | ||
181 | }, | ||
182 | [1] = { | ||
183 | .start = IRQ_DB5500_PMU1, | ||
184 | .end = IRQ_DB5500_PMU1, | ||
185 | .flags = IORESOURCE_IRQ, | ||
186 | }, | ||
187 | }; | ||
188 | |||
189 | platform_device_register_simple("arm-pmu", ARM_PMU_DEVICE_CPU, | ||
190 | res, ARRAY_SIZE(res)); | ||
191 | } | ||
192 | |||
193 | static int usb_db5500_rx_dma_cfg[] = { | ||
194 | DB5500_DMA_DEV4_USB_OTG_IEP_1_9, | ||
195 | DB5500_DMA_DEV5_USB_OTG_IEP_2_10, | ||
196 | DB5500_DMA_DEV6_USB_OTG_IEP_3_11, | ||
197 | DB5500_DMA_DEV20_USB_OTG_IEP_4_12, | ||
198 | DB5500_DMA_DEV21_USB_OTG_IEP_5_13, | ||
199 | DB5500_DMA_DEV22_USB_OTG_IEP_6_14, | ||
200 | DB5500_DMA_DEV23_USB_OTG_IEP_7_15, | ||
201 | DB5500_DMA_DEV38_USB_OTG_IEP_8 | ||
202 | }; | ||
203 | |||
204 | static int usb_db5500_tx_dma_cfg[] = { | ||
205 | DB5500_DMA_DEV4_USB_OTG_OEP_1_9, | ||
206 | DB5500_DMA_DEV5_USB_OTG_OEP_2_10, | ||
207 | DB5500_DMA_DEV6_USB_OTG_OEP_3_11, | ||
208 | DB5500_DMA_DEV20_USB_OTG_OEP_4_12, | ||
209 | DB5500_DMA_DEV21_USB_OTG_OEP_5_13, | ||
210 | DB5500_DMA_DEV22_USB_OTG_OEP_6_14, | ||
211 | DB5500_DMA_DEV23_USB_OTG_OEP_7_15, | ||
212 | DB5500_DMA_DEV38_USB_OTG_OEP_8 | ||
213 | }; | ||
214 | |||
215 | static const char *db5500_read_soc_id(void) | ||
216 | { | ||
217 | return kasprintf(GFP_KERNEL, "u5500 currently unsupported\n"); | ||
218 | } | ||
219 | |||
220 | static struct device * __init db5500_soc_device_init(void) | ||
221 | { | ||
222 | const char *soc_id = db5500_read_soc_id(); | ||
223 | |||
224 | return ux500_soc_device_init(soc_id); | ||
225 | } | ||
226 | |||
227 | struct device * __init u5500_init_devices(void) | ||
228 | { | ||
229 | struct device *parent; | ||
230 | int i; | ||
231 | |||
232 | parent = db5500_soc_device_init(); | ||
233 | |||
234 | db5500_add_gpios(parent); | ||
235 | db5500_pmu_init(); | ||
236 | db5500_dma_init(parent); | ||
237 | db5500_add_rtc(parent); | ||
238 | db5500_add_usb(parent, usb_db5500_rx_dma_cfg, usb_db5500_tx_dma_cfg); | ||
239 | |||
240 | for (i = 0; i < ARRAY_SIZE(db5500_platform_devs); i++) | ||
241 | db5500_platform_devs[i]->dev.parent = parent; | ||
242 | |||
243 | platform_add_devices(db5500_platform_devs, | ||
244 | ARRAY_SIZE(db5500_platform_devs)); | ||
245 | |||
246 | return parent; | ||
247 | } | ||
diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c index d11f3892a27..4b4e59b30d8 100644 --- a/arch/arm/mach-ux500/cpu.c +++ b/arch/arm/mach-ux500/cpu.c | |||
@@ -10,7 +10,6 @@ | |||
10 | #include <linux/io.h> | 10 | #include <linux/io.h> |
11 | #include <linux/clk.h> | 11 | #include <linux/clk.h> |
12 | #include <linux/mfd/db8500-prcmu.h> | 12 | #include <linux/mfd/db8500-prcmu.h> |
13 | #include <linux/mfd/db5500-prcmu.h> | ||
14 | #include <linux/clksrc-dbx500-prcmu.h> | 13 | #include <linux/clksrc-dbx500-prcmu.h> |
15 | #include <linux/sys_soc.h> | 14 | #include <linux/sys_soc.h> |
16 | #include <linux/err.h> | 15 | #include <linux/err.h> |
@@ -40,10 +39,7 @@ void __init ux500_init_irq(void) | |||
40 | void __iomem *dist_base; | 39 | void __iomem *dist_base; |
41 | void __iomem *cpu_base; | 40 | void __iomem *cpu_base; |
42 | 41 | ||
43 | if (cpu_is_u5500()) { | 42 | if (cpu_is_u8500()) { |
44 | dist_base = __io_address(U5500_GIC_DIST_BASE); | ||
45 | cpu_base = __io_address(U5500_GIC_CPU_BASE); | ||
46 | } else if (cpu_is_u8500()) { | ||
47 | dist_base = __io_address(U8500_GIC_DIST_BASE); | 43 | dist_base = __io_address(U8500_GIC_DIST_BASE); |
48 | cpu_base = __io_address(U8500_GIC_CPU_BASE); | 44 | cpu_base = __io_address(U8500_GIC_CPU_BASE); |
49 | } else | 45 | } else |
@@ -60,8 +56,6 @@ void __init ux500_init_irq(void) | |||
60 | * Init clocks here so that they are available for system timer | 56 | * Init clocks here so that they are available for system timer |
61 | * initialization. | 57 | * initialization. |
62 | */ | 58 | */ |
63 | if (cpu_is_u5500()) | ||
64 | db5500_prcmu_early_init(); | ||
65 | if (cpu_is_u8500()) | 59 | if (cpu_is_u8500()) |
66 | db8500_prcmu_early_init(); | 60 | db8500_prcmu_early_init(); |
67 | clk_init(); | 61 | clk_init(); |
diff --git a/arch/arm/mach-ux500/devices-common.c b/arch/arm/mach-ux500/devices-common.c index c5312a4b49f..dfdd4a54668 100644 --- a/arch/arm/mach-ux500/devices-common.c +++ b/arch/arm/mach-ux500/devices-common.c | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/irq.h> | 11 | #include <linux/irq.h> |
12 | #include <linux/slab.h> | 12 | #include <linux/slab.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/amba/bus.h> | ||
15 | 14 | ||
16 | #include <plat/gpio-nomadik.h> | 15 | #include <plat/gpio-nomadik.h> |
17 | 16 | ||
@@ -19,38 +18,6 @@ | |||
19 | 18 | ||
20 | #include "devices-common.h" | 19 | #include "devices-common.h" |
21 | 20 | ||
22 | struct amba_device * | ||
23 | dbx500_add_amba_device(struct device *parent, const char *name, | ||
24 | resource_size_t base, int irq, void *pdata, | ||
25 | unsigned int periphid) | ||
26 | { | ||
27 | struct amba_device *dev; | ||
28 | int ret; | ||
29 | |||
30 | dev = amba_device_alloc(name, base, SZ_4K); | ||
31 | if (!dev) | ||
32 | return ERR_PTR(-ENOMEM); | ||
33 | |||
34 | dev->dma_mask = DMA_BIT_MASK(32); | ||
35 | dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); | ||
36 | |||
37 | dev->irq[0] = irq; | ||
38 | |||
39 | dev->periphid = periphid; | ||
40 | |||
41 | dev->dev.platform_data = pdata; | ||
42 | |||
43 | dev->dev.parent = parent; | ||
44 | |||
45 | ret = amba_device_add(dev, &iomem_resource); | ||
46 | if (ret) { | ||
47 | amba_device_put(dev); | ||
48 | return ERR_PTR(ret); | ||
49 | } | ||
50 | |||
51 | return dev; | ||
52 | } | ||
53 | |||
54 | static struct platform_device * | 21 | static struct platform_device * |
55 | dbx500_add_gpio(struct device *parent, int id, resource_size_t addr, int irq, | 22 | dbx500_add_gpio(struct device *parent, int id, resource_size_t addr, int irq, |
56 | struct nmk_gpio_platform_data *pdata) | 23 | struct nmk_gpio_platform_data *pdata) |
diff --git a/arch/arm/mach-ux500/devices-common.h b/arch/arm/mach-ux500/devices-common.h index 39c74ec82ad..f75bcb2ab13 100644 --- a/arch/arm/mach-ux500/devices-common.h +++ b/arch/arm/mach-ux500/devices-common.h | |||
@@ -11,13 +11,9 @@ | |||
11 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
12 | #include <linux/dma-mapping.h> | 12 | #include <linux/dma-mapping.h> |
13 | #include <linux/sys_soc.h> | 13 | #include <linux/sys_soc.h> |
14 | #include <linux/amba/bus.h> | ||
14 | #include <plat/i2c.h> | 15 | #include <plat/i2c.h> |
15 | 16 | ||
16 | extern struct amba_device * | ||
17 | dbx500_add_amba_device(struct device *parent, const char *name, | ||
18 | resource_size_t base, int irq, void *pdata, | ||
19 | unsigned int periphid); | ||
20 | |||
21 | struct spi_master_cntlr; | 17 | struct spi_master_cntlr; |
22 | 18 | ||
23 | static inline struct amba_device * | 19 | static inline struct amba_device * |
@@ -25,8 +21,8 @@ dbx500_add_msp_spi(struct device *parent, const char *name, | |||
25 | resource_size_t base, int irq, | 21 | resource_size_t base, int irq, |
26 | struct spi_master_cntlr *pdata) | 22 | struct spi_master_cntlr *pdata) |
27 | { | 23 | { |
28 | return dbx500_add_amba_device(parent, name, base, irq, | 24 | return amba_ahb_device_add(parent, name, base, SZ_4K, irq, 0, |
29 | pdata, 0); | 25 | pdata, 0); |
30 | } | 26 | } |
31 | 27 | ||
32 | static inline struct amba_device * | 28 | static inline struct amba_device * |
@@ -34,8 +30,8 @@ dbx500_add_spi(struct device *parent, const char *name, resource_size_t base, | |||
34 | int irq, struct spi_master_cntlr *pdata, | 30 | int irq, struct spi_master_cntlr *pdata, |
35 | u32 periphid) | 31 | u32 periphid) |
36 | { | 32 | { |
37 | return dbx500_add_amba_device(parent, name, base, irq, | 33 | return amba_ahb_device_add(parent, name, base, SZ_4K, irq, 0, |
38 | pdata, periphid); | 34 | pdata, periphid); |
39 | } | 35 | } |
40 | 36 | ||
41 | struct mmci_platform_data; | 37 | struct mmci_platform_data; |
@@ -44,8 +40,8 @@ static inline struct amba_device * | |||
44 | dbx500_add_sdi(struct device *parent, const char *name, resource_size_t base, | 40 | dbx500_add_sdi(struct device *parent, const char *name, resource_size_t base, |
45 | int irq, struct mmci_platform_data *pdata, u32 periphid) | 41 | int irq, struct mmci_platform_data *pdata, u32 periphid) |
46 | { | 42 | { |
47 | return dbx500_add_amba_device(parent, name, base, irq, | 43 | return amba_ahb_device_add(parent, name, base, SZ_4K, irq, 0, |
48 | pdata, periphid); | 44 | pdata, periphid); |
49 | } | 45 | } |
50 | 46 | ||
51 | struct amba_pl011_data; | 47 | struct amba_pl011_data; |
@@ -54,7 +50,7 @@ static inline struct amba_device * | |||
54 | dbx500_add_uart(struct device *parent, const char *name, resource_size_t base, | 50 | dbx500_add_uart(struct device *parent, const char *name, resource_size_t base, |
55 | int irq, struct amba_pl011_data *pdata) | 51 | int irq, struct amba_pl011_data *pdata) |
56 | { | 52 | { |
57 | return dbx500_add_amba_device(parent, name, base, irq, pdata, 0); | 53 | return amba_ahb_device_add(parent, name, base, SZ_4K, irq, 0, pdata, 0); |
58 | } | 54 | } |
59 | 55 | ||
60 | struct nmk_i2c_controller; | 56 | struct nmk_i2c_controller; |
@@ -85,7 +81,8 @@ dbx500_add_i2c(struct device *parent, int id, resource_size_t base, int irq, | |||
85 | static inline struct amba_device * | 81 | static inline struct amba_device * |
86 | dbx500_add_rtc(struct device *parent, resource_size_t base, int irq) | 82 | dbx500_add_rtc(struct device *parent, resource_size_t base, int irq) |
87 | { | 83 | { |
88 | return dbx500_add_amba_device(parent, "rtc-pl031", base, irq, NULL, 0); | 84 | return amba_apb_device_add(parent, "rtc-pl031", base, SZ_4K, irq, |
85 | 0, NULL, 0); | ||
89 | } | 86 | } |
90 | 87 | ||
91 | struct nmk_gpio_platform_data; | 88 | struct nmk_gpio_platform_data; |
diff --git a/arch/arm/mach-ux500/devices-db5500.h b/arch/arm/mach-ux500/devices-db5500.h deleted file mode 100644 index e70955502c3..00000000000 --- a/arch/arm/mach-ux500/devices-db5500.h +++ /dev/null | |||
@@ -1,99 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * | ||
4 | * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson | ||
5 | * License terms: GNU General Public License (GPL), version 2. | ||
6 | */ | ||
7 | |||
8 | #ifndef __DEVICES_DB5500_H | ||
9 | #define __DEVICES_DB5500_H | ||
10 | |||
11 | #include "devices-common.h" | ||
12 | |||
13 | #define db5500_add_i2c1(parent, pdata) \ | ||
14 | dbx500_add_i2c(parent, 1, U5500_I2C1_BASE, IRQ_DB5500_I2C1, pdata) | ||
15 | #define db5500_add_i2c2(parent, pdata) \ | ||
16 | dbx500_add_i2c(parent, 2, U5500_I2C2_BASE, IRQ_DB5500_I2C2, pdata) | ||
17 | #define db5500_add_i2c3(parent, pdata) \ | ||
18 | dbx500_add_i2c(parent, 3, U5500_I2C3_BASE, IRQ_DB5500_I2C3, pdata) | ||
19 | |||
20 | #define db5500_add_msp0_spi(parent, pdata) \ | ||
21 | dbx500_add_msp_spi(parent, "msp0", U5500_MSP0_BASE, \ | ||
22 | IRQ_DB5500_MSP0, pdata) | ||
23 | #define db5500_add_msp1_spi(parent, pdata) \ | ||
24 | dbx500_add_msp_spi(parent, "msp1", U5500_MSP1_BASE, \ | ||
25 | IRQ_DB5500_MSP1, pdata) | ||
26 | #define db5500_add_msp2_spi(parent, pdata) \ | ||
27 | dbx500_add_msp_spi(parent, "msp2", U5500_MSP2_BASE, \ | ||
28 | IRQ_DB5500_MSP2, pdata) | ||
29 | |||
30 | #define db5500_add_msp0_spi(parent, pdata) \ | ||
31 | dbx500_add_msp_spi(parent, "msp0", U5500_MSP0_BASE, \ | ||
32 | IRQ_DB5500_MSP0, pdata) | ||
33 | #define db5500_add_msp1_spi(parent, pdata) \ | ||
34 | dbx500_add_msp_spi(parent, "msp1", U5500_MSP1_BASE, \ | ||
35 | IRQ_DB5500_MSP1, pdata) | ||
36 | #define db5500_add_msp2_spi(parent, pdata) \ | ||
37 | dbx500_add_msp_spi(parent, "msp2", U5500_MSP2_BASE, \ | ||
38 | IRQ_DB5500_MSP2, pdata) | ||
39 | |||
40 | #define db5500_add_rtc(parent) \ | ||
41 | dbx500_add_rtc(parent, U5500_RTC_BASE, IRQ_DB5500_RTC); | ||
42 | |||
43 | #define db5500_add_usb(parent, rx_cfg, tx_cfg) \ | ||
44 | ux500_add_usb(parent, U5500_USBOTG_BASE, \ | ||
45 | IRQ_DB5500_USBOTG, rx_cfg, tx_cfg) | ||
46 | |||
47 | #define db5500_add_sdi0(parent, pdata) \ | ||
48 | dbx500_add_sdi(parent, "sdi0", U5500_SDI0_BASE, \ | ||
49 | IRQ_DB5500_SDMMC0, pdata, \ | ||
50 | 0x10480180) | ||
51 | #define db5500_add_sdi1(parent, pdata) \ | ||
52 | dbx500_add_sdi(parent, "sdi1", U5500_SDI1_BASE, \ | ||
53 | IRQ_DB5500_SDMMC1, pdata, \ | ||
54 | 0x10480180) | ||
55 | #define db5500_add_sdi2(parent, pdata) \ | ||
56 | dbx500_add_sdi(parent, "sdi2", U5500_SDI2_BASE, \ | ||
57 | IRQ_DB5500_SDMMC2, pdata \ | ||
58 | 0x10480180) | ||
59 | #define db5500_add_sdi3(parent, pdata) \ | ||
60 | dbx500_add_sdi(parent, "sdi3", U5500_SDI3_BASE, \ | ||
61 | IRQ_DB5500_SDMMC3, pdata \ | ||
62 | 0x10480180) | ||
63 | #define db5500_add_sdi4(parent, pdata) \ | ||
64 | dbx500_add_sdi(parent, "sdi4", U5500_SDI4_BASE, \ | ||
65 | IRQ_DB5500_SDMMC4, pdata \ | ||
66 | 0x10480180) | ||
67 | |||
68 | /* This one has a bad peripheral ID in the U5500 silicon */ | ||
69 | #define db5500_add_spi0(parent, pdata) \ | ||
70 | dbx500_add_spi(parent, "spi0", U5500_SPI0_BASE, \ | ||
71 | IRQ_DB5500_SPI0, pdata, \ | ||
72 | 0x10080023) | ||
73 | #define db5500_add_spi1(parent, pdata) \ | ||
74 | dbx500_add_spi(parent, "spi1", U5500_SPI1_BASE, \ | ||
75 | IRQ_DB5500_SPI1, pdata, \ | ||
76 | 0x10080023) | ||
77 | #define db5500_add_spi2(parent, pdata) \ | ||
78 | dbx500_add_spi(parent, "spi2", U5500_SPI2_BASE, \ | ||
79 | IRQ_DB5500_SPI2, pdata \ | ||
80 | 0x10080023) | ||
81 | #define db5500_add_spi3(parent, pdata) \ | ||
82 | dbx500_add_spi(parent, "spi3", U5500_SPI3_BASE, \ | ||
83 | IRQ_DB5500_SPI3, pdata \ | ||
84 | 0x10080023) | ||
85 | |||
86 | #define db5500_add_uart0(parent, plat) \ | ||
87 | dbx500_add_uart(parent, "uart0", U5500_UART0_BASE, \ | ||
88 | IRQ_DB5500_UART0, plat) | ||
89 | #define db5500_add_uart1(parent, plat) \ | ||
90 | dbx500_add_uart(parent, "uart1", U5500_UART1_BASE, \ | ||
91 | IRQ_DB5500_UART1, plat) | ||
92 | #define db5500_add_uart2(parent, plat) \ | ||
93 | dbx500_add_uart(parent, "uart2", U5500_UART2_BASE, \ | ||
94 | IRQ_DB5500_UART2, plat) | ||
95 | #define db5500_add_uart3(parent, plat) \ | ||
96 | dbx500_add_uart(parent, "uart3", U5500_UART3_BASE, \ | ||
97 | IRQ_DB5500_UART3, plat) | ||
98 | |||
99 | #endif | ||
diff --git a/arch/arm/mach-ux500/devices-db8500.h b/arch/arm/mach-ux500/devices-db8500.h index 9fd93e9da52..6fc7eb24d9a 100644 --- a/arch/arm/mach-ux500/devices-db8500.h +++ b/arch/arm/mach-ux500/devices-db8500.h | |||
@@ -31,7 +31,7 @@ static inline struct amba_device * | |||
31 | db8500_add_ssp(struct device *parent, const char *name, resource_size_t base, | 31 | db8500_add_ssp(struct device *parent, const char *name, resource_size_t base, |
32 | int irq, struct pl022_ssp_controller *pdata) | 32 | int irq, struct pl022_ssp_controller *pdata) |
33 | { | 33 | { |
34 | return dbx500_add_amba_device(parent, name, base, irq, pdata, 0); | 34 | return amba_ahb_device_add(parent, name, base, SZ_4K, irq, 0, pdata, 0); |
35 | } | 35 | } |
36 | 36 | ||
37 | 37 | ||
diff --git a/arch/arm/mach-ux500/dma-db5500.c b/arch/arm/mach-ux500/dma-db5500.c deleted file mode 100644 index 41e9470fa0e..00000000000 --- a/arch/arm/mach-ux500/dma-db5500.c +++ /dev/null | |||
@@ -1,137 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * | ||
4 | * Author: Per Forlin <per.forlin@stericsson.com> for ST-Ericsson | ||
5 | * Author: Jonas Aaberg <jonas.aberg@stericsson.com> for ST-Ericsson | ||
6 | * Author: Rabin Vincent <rabinv.vincent@stericsson.com> for ST-Ericsson | ||
7 | * | ||
8 | * License terms: GNU General Public License (GPL), version 2 | ||
9 | */ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/platform_device.h> | ||
13 | |||
14 | #include <plat/ste_dma40.h> | ||
15 | #include <mach/setup.h> | ||
16 | #include <mach/hardware.h> | ||
17 | |||
18 | #include "ste-dma40-db5500.h" | ||
19 | |||
20 | static struct resource dma40_resources[] = { | ||
21 | [0] = { | ||
22 | .start = U5500_DMA_BASE, | ||
23 | .end = U5500_DMA_BASE + SZ_4K - 1, | ||
24 | .flags = IORESOURCE_MEM, | ||
25 | .name = "base", | ||
26 | }, | ||
27 | [1] = { | ||
28 | .start = U5500_DMA_LCPA_BASE, | ||
29 | .end = U5500_DMA_LCPA_BASE + 2 * SZ_1K - 1, | ||
30 | .flags = IORESOURCE_MEM, | ||
31 | .name = "lcpa", | ||
32 | }, | ||
33 | [2] = { | ||
34 | .start = IRQ_DB5500_DMA, | ||
35 | .end = IRQ_DB5500_DMA, | ||
36 | .flags = IORESOURCE_IRQ | ||
37 | } | ||
38 | }; | ||
39 | |||
40 | /* Default configuration for physical memcpy */ | ||
41 | static struct stedma40_chan_cfg dma40_memcpy_conf_phy = { | ||
42 | .mode = STEDMA40_MODE_PHYSICAL, | ||
43 | .dir = STEDMA40_MEM_TO_MEM, | ||
44 | |||
45 | .src_info.data_width = STEDMA40_BYTE_WIDTH, | ||
46 | .src_info.psize = STEDMA40_PSIZE_PHY_1, | ||
47 | .src_info.flow_ctrl = STEDMA40_NO_FLOW_CTRL, | ||
48 | |||
49 | .dst_info.data_width = STEDMA40_BYTE_WIDTH, | ||
50 | .dst_info.psize = STEDMA40_PSIZE_PHY_1, | ||
51 | .dst_info.flow_ctrl = STEDMA40_NO_FLOW_CTRL, | ||
52 | }; | ||
53 | |||
54 | /* Default configuration for logical memcpy */ | ||
55 | static struct stedma40_chan_cfg dma40_memcpy_conf_log = { | ||
56 | .dir = STEDMA40_MEM_TO_MEM, | ||
57 | |||
58 | .src_info.data_width = STEDMA40_BYTE_WIDTH, | ||
59 | .src_info.psize = STEDMA40_PSIZE_LOG_1, | ||
60 | .src_info.flow_ctrl = STEDMA40_NO_FLOW_CTRL, | ||
61 | |||
62 | .dst_info.data_width = STEDMA40_BYTE_WIDTH, | ||
63 | .dst_info.psize = STEDMA40_PSIZE_LOG_1, | ||
64 | .dst_info.flow_ctrl = STEDMA40_NO_FLOW_CTRL, | ||
65 | }; | ||
66 | |||
67 | /* | ||
68 | * Mapping between soruce event lines and physical device address This was | ||
69 | * created assuming that the event line is tied to a device and therefore the | ||
70 | * address is constant, however this is not true for at least USB, and the | ||
71 | * values are just placeholders for USB. This table is preserved and used for | ||
72 | * now. | ||
73 | */ | ||
74 | static const dma_addr_t dma40_rx_map[DB5500_DMA_NR_DEV] = { | ||
75 | [DB5500_DMA_DEV24_SDMMC0_RX] = -1, | ||
76 | [DB5500_DMA_DEV38_USB_OTG_IEP_8] = -1, | ||
77 | [DB5500_DMA_DEV23_USB_OTG_IEP_7_15] = -1, | ||
78 | [DB5500_DMA_DEV22_USB_OTG_IEP_6_14] = -1, | ||
79 | [DB5500_DMA_DEV21_USB_OTG_IEP_5_13] = -1, | ||
80 | [DB5500_DMA_DEV20_USB_OTG_IEP_4_12] = -1, | ||
81 | [DB5500_DMA_DEV6_USB_OTG_IEP_3_11] = -1, | ||
82 | [DB5500_DMA_DEV5_USB_OTG_IEP_2_10] = -1, | ||
83 | [DB5500_DMA_DEV4_USB_OTG_IEP_1_9] = -1, | ||
84 | }; | ||
85 | |||
86 | /* Mapping between destination event lines and physical device address */ | ||
87 | static const dma_addr_t dma40_tx_map[DB5500_DMA_NR_DEV] = { | ||
88 | [DB5500_DMA_DEV24_SDMMC0_TX] = -1, | ||
89 | [DB5500_DMA_DEV38_USB_OTG_OEP_8] = -1, | ||
90 | [DB5500_DMA_DEV23_USB_OTG_OEP_7_15] = -1, | ||
91 | [DB5500_DMA_DEV22_USB_OTG_OEP_6_14] = -1, | ||
92 | [DB5500_DMA_DEV21_USB_OTG_OEP_5_13] = -1, | ||
93 | [DB5500_DMA_DEV20_USB_OTG_OEP_4_12] = -1, | ||
94 | [DB5500_DMA_DEV6_USB_OTG_OEP_3_11] = -1, | ||
95 | [DB5500_DMA_DEV5_USB_OTG_OEP_2_10] = -1, | ||
96 | [DB5500_DMA_DEV4_USB_OTG_OEP_1_9] = -1, | ||
97 | }; | ||
98 | |||
99 | static int dma40_memcpy_event[] = { | ||
100 | DB5500_DMA_MEMCPY_TX_1, | ||
101 | DB5500_DMA_MEMCPY_TX_2, | ||
102 | DB5500_DMA_MEMCPY_TX_3, | ||
103 | DB5500_DMA_MEMCPY_TX_4, | ||
104 | DB5500_DMA_MEMCPY_TX_5, | ||
105 | }; | ||
106 | |||
107 | static struct stedma40_platform_data dma40_plat_data = { | ||
108 | .dev_len = ARRAY_SIZE(dma40_rx_map), | ||
109 | .dev_rx = dma40_rx_map, | ||
110 | .dev_tx = dma40_tx_map, | ||
111 | .memcpy = dma40_memcpy_event, | ||
112 | .memcpy_len = ARRAY_SIZE(dma40_memcpy_event), | ||
113 | .memcpy_conf_phy = &dma40_memcpy_conf_phy, | ||
114 | .memcpy_conf_log = &dma40_memcpy_conf_log, | ||
115 | .disabled_channels = {-1}, | ||
116 | }; | ||
117 | |||
118 | static struct platform_device dma40_device = { | ||
119 | .dev = { | ||
120 | .platform_data = &dma40_plat_data, | ||
121 | }, | ||
122 | .name = "dma40", | ||
123 | .id = 0, | ||
124 | .num_resources = ARRAY_SIZE(dma40_resources), | ||
125 | .resource = dma40_resources | ||
126 | }; | ||
127 | |||
128 | void __init db5500_dma_init(struct device *parent) | ||
129 | { | ||
130 | int ret; | ||
131 | |||
132 | dma40_device.dev.parent = parent; | ||
133 | ret = platform_device_register(&dma40_device); | ||
134 | if (ret) | ||
135 | dev_err(&dma40_device.dev, "unable to register device: %d\n", ret); | ||
136 | |||
137 | } | ||
diff --git a/arch/arm/mach-ux500/include/mach/db5500-regs.h b/arch/arm/mach-ux500/include/mach/db5500-regs.h deleted file mode 100644 index 8e714bcb099..00000000000 --- a/arch/arm/mach-ux500/include/mach/db5500-regs.h +++ /dev/null | |||
@@ -1,143 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * | ||
4 | * License terms: GNU General Public License (GPL) version 2 | ||
5 | */ | ||
6 | |||
7 | #ifndef __MACH_DB5500_REGS_H | ||
8 | #define __MACH_DB5500_REGS_H | ||
9 | |||
10 | #define U5500_PER1_BASE 0xA0020000 | ||
11 | #define U5500_PER2_BASE 0xA0010000 | ||
12 | #define U5500_PER3_BASE 0x80140000 | ||
13 | #define U5500_PER4_BASE 0x80150000 | ||
14 | #define U5500_PER5_BASE 0x80100000 | ||
15 | #define U5500_PER6_BASE 0x80120000 | ||
16 | |||
17 | #define U5500_GIC_DIST_BASE 0xA0411000 | ||
18 | #define U5500_GIC_CPU_BASE 0xA0410100 | ||
19 | #define U5500_DMA_BASE 0x90030000 | ||
20 | #define U5500_STM_BASE 0x90020000 | ||
21 | #define U5500_STM_REG_BASE (U5500_STM_BASE + 0xF000) | ||
22 | #define U5500_MCDE_BASE 0xA0400000 | ||
23 | #define U5500_MODEM_BASE 0xB0000000 | ||
24 | #define U5500_L2CC_BASE 0xA0412000 | ||
25 | #define U5500_SCU_BASE 0xA0410000 | ||
26 | #define U5500_DSI1_BASE 0xA0401000 | ||
27 | #define U5500_DSI2_BASE 0xA0402000 | ||
28 | #define U5500_SIA_BASE 0xA0100000 | ||
29 | #define U5500_SVA_BASE 0x80200000 | ||
30 | #define U5500_HSEM_BASE 0xA0000000 | ||
31 | #define U5500_NAND0_BASE 0x60000000 | ||
32 | #define U5500_NAND1_BASE 0x70000000 | ||
33 | #define U5500_TWD_BASE 0xa0410600 | ||
34 | #define U5500_ICN_BASE 0xA0040000 | ||
35 | #define U5500_B2R2_BASE 0xa0200000 | ||
36 | #define U5500_BOOT_ROM_BASE 0x90000000 | ||
37 | |||
38 | #define U5500_FSMC_BASE (U5500_PER1_BASE + 0x0000) | ||
39 | #define U5500_SDI0_BASE (U5500_PER1_BASE + 0x1000) | ||
40 | #define U5500_SDI2_BASE (U5500_PER1_BASE + 0x2000) | ||
41 | #define U5500_UART0_BASE (U5500_PER1_BASE + 0x3000) | ||
42 | #define U5500_I2C1_BASE (U5500_PER1_BASE + 0x4000) | ||
43 | #define U5500_MSP0_BASE (U5500_PER1_BASE + 0x5000) | ||
44 | #define U5500_GPIO0_BASE (U5500_PER1_BASE + 0xE000) | ||
45 | #define U5500_CLKRST1_BASE (U5500_PER1_BASE + 0xF000) | ||
46 | |||
47 | #define U5500_USBOTG_BASE (U5500_PER2_BASE + 0x0000) | ||
48 | #define U5500_GPIO1_BASE (U5500_PER2_BASE + 0xE000) | ||
49 | #define U5500_CLKRST2_BASE (U5500_PER2_BASE + 0xF000) | ||
50 | |||
51 | #define U5500_KEYPAD_BASE (U5500_PER3_BASE + 0x0000) | ||
52 | #define U5500_PWM_BASE (U5500_PER3_BASE + 0x1000) | ||
53 | #define U5500_GPIO3_BASE (U5500_PER3_BASE + 0xE000) | ||
54 | #define U5500_CLKRST3_BASE (U5500_PER3_BASE + 0xF000) | ||
55 | |||
56 | #define U5500_BACKUPRAM0_BASE (U5500_PER4_BASE + 0x0000) | ||
57 | #define U5500_BACKUPRAM1_BASE (U5500_PER4_BASE + 0x1000) | ||
58 | #define U5500_RTT0_BASE (U5500_PER4_BASE + 0x2000) | ||
59 | #define U5500_RTT1_BASE (U5500_PER4_BASE + 0x3000) | ||
60 | #define U5500_RTC_BASE (U5500_PER4_BASE + 0x4000) | ||
61 | #define U5500_SCR_BASE (U5500_PER4_BASE + 0x5000) | ||
62 | #define U5500_DMC_BASE (U5500_PER4_BASE + 0x6000) | ||
63 | #define U5500_PRCMU_BASE (U5500_PER4_BASE + 0x7000) | ||
64 | #define U5500_PRCMU_TIMER_3_BASE (U5500_PER4_BASE + 0x07338) | ||
65 | #define U5500_PRCMU_TIMER_4_BASE (U5500_PER4_BASE + 0x07450) | ||
66 | #define U5500_MSP1_BASE (U5500_PER4_BASE + 0x9000) | ||
67 | #define U5500_GPIO2_BASE (U5500_PER4_BASE + 0xA000) | ||
68 | #define U5500_MTIMER_BASE (U5500_PER4_BASE + 0xC000) | ||
69 | #define U5500_CDETECT_BASE (U5500_PER4_BASE + 0xF000) | ||
70 | #define U5500_PRCMU_TCDM_BASE (U5500_PER4_BASE + 0x18000) | ||
71 | #define U5500_PRCMU_TCPM_BASE (U5500_PER4_BASE + 0x10000) | ||
72 | #define U5500_TPIU_BASE (U5500_PER4_BASE + 0x50000) | ||
73 | |||
74 | #define U5500_SPI0_BASE (U5500_PER5_BASE + 0x0000) | ||
75 | #define U5500_SPI1_BASE (U5500_PER5_BASE + 0x1000) | ||
76 | #define U5500_SPI2_BASE (U5500_PER5_BASE + 0x2000) | ||
77 | #define U5500_SPI3_BASE (U5500_PER5_BASE + 0x3000) | ||
78 | #define U5500_UART1_BASE (U5500_PER5_BASE + 0x4000) | ||
79 | #define U5500_UART2_BASE (U5500_PER5_BASE + 0x5000) | ||
80 | #define U5500_UART3_BASE (U5500_PER5_BASE + 0x6000) | ||
81 | #define U5500_SDI1_BASE (U5500_PER5_BASE + 0x7000) | ||
82 | #define U5500_SDI3_BASE (U5500_PER5_BASE + 0x8000) | ||
83 | #define U5500_SDI4_BASE (U5500_PER5_BASE + 0x9000) | ||
84 | #define U5500_I2C2_BASE (U5500_PER5_BASE + 0xA000) | ||
85 | #define U5500_I2C3_BASE (U5500_PER5_BASE + 0xB000) | ||
86 | #define U5500_MSP2_BASE (U5500_PER5_BASE + 0xC000) | ||
87 | #define U5500_IRDA_BASE (U5500_PER5_BASE + 0xD000) | ||
88 | #define U5500_IRRC_BASE (U5500_PER5_BASE + 0x10000) | ||
89 | #define U5500_GPIO4_BASE (U5500_PER5_BASE + 0x1E000) | ||
90 | #define U5500_CLKRST5_BASE (U5500_PER5_BASE + 0x1F000) | ||
91 | |||
92 | #define U5500_RNG_BASE (U5500_PER6_BASE + 0x0000) | ||
93 | #define U5500_HASH0_BASE (U5500_PER6_BASE + 0x1000) | ||
94 | #define U5500_HASH1_BASE (U5500_PER6_BASE + 0x2000) | ||
95 | #define U5500_PKA_BASE (U5500_PER6_BASE + 0x4000) | ||
96 | #define U5500_PKAM_BASE (U5500_PER6_BASE + 0x5100) | ||
97 | #define U5500_MTU0_BASE (U5500_PER6_BASE + 0x6000) | ||
98 | #define U5500_MTU1_BASE (U5500_PER6_BASE + 0x7000) | ||
99 | #define U5500_CR_BASE (U5500_PER6_BASE + 0x8000) | ||
100 | #define U5500_CRYP0_BASE (U5500_PER6_BASE + 0xA000) | ||
101 | #define U5500_CRYP1_BASE (U5500_PER6_BASE + 0xB000) | ||
102 | #define U5500_CLKRST6_BASE (U5500_PER6_BASE + 0xF000) | ||
103 | |||
104 | #define U5500_GPIOBANK0_BASE U5500_GPIO0_BASE | ||
105 | #define U5500_GPIOBANK1_BASE (U5500_GPIO0_BASE + 0x80) | ||
106 | #define U5500_GPIOBANK2_BASE U5500_GPIO1_BASE | ||
107 | #define U5500_GPIOBANK3_BASE U5500_GPIO2_BASE | ||
108 | #define U5500_GPIOBANK4_BASE U5500_GPIO3_BASE | ||
109 | #define U5500_GPIOBANK5_BASE U5500_GPIO4_BASE | ||
110 | #define U5500_GPIOBANK6_BASE (U5500_GPIO4_BASE + 0x80) | ||
111 | #define U5500_GPIOBANK7_BASE (U5500_GPIO4_BASE + 0x100) | ||
112 | |||
113 | #define U5500_MBOX_BASE (U5500_MODEM_BASE + 0xFFD1000) | ||
114 | #define U5500_MBOX0_PEER_START (U5500_MBOX_BASE + 0x40) | ||
115 | #define U5500_MBOX0_PEER_END (U5500_MBOX_BASE + 0x5F) | ||
116 | #define U5500_MBOX0_LOCAL_START (U5500_MBOX_BASE + 0x60) | ||
117 | #define U5500_MBOX0_LOCAL_END (U5500_MBOX_BASE + 0x7F) | ||
118 | #define U5500_MBOX1_PEER_START (U5500_MBOX_BASE + 0x80) | ||
119 | #define U5500_MBOX1_PEER_END (U5500_MBOX_BASE + 0x9F) | ||
120 | #define U5500_MBOX1_LOCAL_START (U5500_MBOX_BASE + 0xA0) | ||
121 | #define U5500_MBOX1_LOCAL_END (U5500_MBOX_BASE + 0xBF) | ||
122 | #define U5500_MBOX2_PEER_START (U5500_MBOX_BASE + 0x00) | ||
123 | #define U5500_MBOX2_PEER_END (U5500_MBOX_BASE + 0x1F) | ||
124 | #define U5500_MBOX2_LOCAL_START (U5500_MBOX_BASE + 0x20) | ||
125 | #define U5500_MBOX2_LOCAL_END (U5500_MBOX_BASE + 0x3F) | ||
126 | |||
127 | #define U5500_ACCCON_BASE_SEC (0xBFFF0000) | ||
128 | #define U5500_ACCCON_BASE (0xBFFF1000) | ||
129 | #define U5500_ACCCON_CPUVEC_RESET_ADDR_OFFSET (0x00000020) | ||
130 | #define U5500_ACCCON_ACC_CPU_CTRL_OFFSET (0x000000BC) | ||
131 | #define U5500_INTCON_MBOX1_INT_RESET_ADDR (0xBFFD31A4) | ||
132 | |||
133 | #define U5500_ESRAM_BASE 0x40000000 | ||
134 | #define U5500_ESRAM_DMA_LCPA_OFFSET 0x10000 | ||
135 | #define U5500_DMA_LCPA_BASE (U5500_ESRAM_BASE + U5500_ESRAM_DMA_LCPA_OFFSET) | ||
136 | |||
137 | #define U5500_MCDE_SIZE 0x1000 | ||
138 | #define U5500_DSI_LINK_SIZE 0x1000 | ||
139 | #define U5500_DSI_LINK_COUNT 0x2 | ||
140 | #define U5500_DSI_LINK1_BASE (U5500_MCDE_BASE + U5500_MCDE_SIZE) | ||
141 | #define U5500_DSI_LINK2_BASE (U5500_DSI_LINK1_BASE + U5500_DSI_LINK_SIZE) | ||
142 | |||
143 | #endif | ||
diff --git a/arch/arm/mach-ux500/include/mach/debug-macro.S b/arch/arm/mach-ux500/include/mach/debug-macro.S index 8d74d927d4e..67035223334 100644 --- a/arch/arm/mach-ux500/include/mach/debug-macro.S +++ b/arch/arm/mach-ux500/include/mach/debug-macro.S | |||
@@ -20,10 +20,6 @@ | |||
20 | * built, so that there's some hint during the build that something is wrong. | 20 | * built, so that there's some hint during the build that something is wrong. |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #ifdef CONFIG_UX500_SOC_DB5500 | ||
24 | #define __UX500_UART(n) U5500_UART##n##_BASE | ||
25 | #endif | ||
26 | |||
27 | #ifdef CONFIG_UX500_SOC_DB8500 | 23 | #ifdef CONFIG_UX500_SOC_DB8500 |
28 | #define __UX500_UART(n) U8500_UART##n##_BASE | 24 | #define __UX500_UART(n) U8500_UART##n##_BASE |
29 | #endif | 25 | #endif |
diff --git a/arch/arm/mach-ux500/include/mach/devices.h b/arch/arm/mach-ux500/include/mach/devices.h index 5f6cb71fc62..9b5eb69a015 100644 --- a/arch/arm/mach-ux500/include/mach/devices.h +++ b/arch/arm/mach-ux500/include/mach/devices.h | |||
@@ -10,7 +10,6 @@ | |||
10 | struct platform_device; | 10 | struct platform_device; |
11 | struct amba_device; | 11 | struct amba_device; |
12 | 12 | ||
13 | extern struct platform_device u5500_gpio_devs[]; | ||
14 | extern struct platform_device u8500_gpio_devs[]; | 13 | extern struct platform_device u8500_gpio_devs[]; |
15 | 14 | ||
16 | extern struct amba_device ux500_pl031_device; | 15 | extern struct amba_device ux500_pl031_device; |
diff --git a/arch/arm/mach-ux500/include/mach/hardware.h b/arch/arm/mach-ux500/include/mach/hardware.h index f84698936d3..cf6fac3d1ee 100644 --- a/arch/arm/mach-ux500/include/mach/hardware.h +++ b/arch/arm/mach-ux500/include/mach/hardware.h | |||
@@ -28,7 +28,6 @@ | |||
28 | #define io_p2v(n) __io_address(n) | 28 | #define io_p2v(n) __io_address(n) |
29 | 29 | ||
30 | #include <mach/db8500-regs.h> | 30 | #include <mach/db8500-regs.h> |
31 | #include <mach/db5500-regs.h> | ||
32 | 31 | ||
33 | #define MSP_TX_RX_REG_OFFSET 0 | 32 | #define MSP_TX_RX_REG_OFFSET 0 |
34 | 33 | ||
diff --git a/arch/arm/mach-ux500/include/mach/irqs-board-u5500.h b/arch/arm/mach-ux500/include/mach/irqs-board-u5500.h deleted file mode 100644 index 29d972c7717..00000000000 --- a/arch/arm/mach-ux500/include/mach/irqs-board-u5500.h +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * | ||
4 | * License terms: GNU General Public License (GPL) version 2 | ||
5 | */ | ||
6 | |||
7 | #ifndef __MACH_IRQS_BOARD_U5500_H | ||
8 | #define __MACH_IRQS_BOARD_U5500_H | ||
9 | |||
10 | #define AB5500_NR_IRQS 5 | ||
11 | #define IRQ_AB5500_BASE IRQ_BOARD_START | ||
12 | #define IRQ_AB5500_END (IRQ_AB5500_BASE + AB5500_NR_IRQS) | ||
13 | |||
14 | #define U5500_IRQ_END IRQ_AB5500_END | ||
15 | |||
16 | #if IRQ_BOARD_END < U5500_IRQ_END | ||
17 | #undef IRQ_BOARD_END | ||
18 | #define IRQ_BOARD_END U5500_IRQ_END | ||
19 | #endif | ||
20 | |||
21 | #endif | ||
diff --git a/arch/arm/mach-ux500/include/mach/irqs-db5500.h b/arch/arm/mach-ux500/include/mach/irqs-db5500.h deleted file mode 100644 index 77239776a6f..00000000000 --- a/arch/arm/mach-ux500/include/mach/irqs-db5500.h +++ /dev/null | |||
@@ -1,113 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * | ||
4 | * Author: Rabin Vincent <rabin.vincent@stericsson.com> | ||
5 | * License terms: GNU General Public License (GPL) version 2 | ||
6 | */ | ||
7 | |||
8 | #ifndef __MACH_IRQS_DB5500_H | ||
9 | #define __MACH_IRQS_DB5500_H | ||
10 | |||
11 | #define IRQ_DB5500_MTU0 (IRQ_SHPI_START + 4) | ||
12 | #define IRQ_DB5500_SPI2 (IRQ_SHPI_START + 6) | ||
13 | #define IRQ_DB5500_PMU0 (IRQ_SHPI_START + 7) | ||
14 | #define IRQ_DB5500_SPI0 (IRQ_SHPI_START + 8) | ||
15 | #define IRQ_DB5500_RTT (IRQ_SHPI_START + 9) | ||
16 | #define IRQ_DB5500_PKA (IRQ_SHPI_START + 10) | ||
17 | #define IRQ_DB5500_UART0 (IRQ_SHPI_START + 11) | ||
18 | #define IRQ_DB5500_I2C3 (IRQ_SHPI_START + 12) | ||
19 | #define IRQ_DB5500_L2CC (IRQ_SHPI_START + 13) | ||
20 | #define IRQ_DB5500_MSP0 (IRQ_SHPI_START + 14) | ||
21 | #define IRQ_DB5500_CRYP1 (IRQ_SHPI_START + 15) | ||
22 | #define IRQ_DB5500_PMU1 (IRQ_SHPI_START + 16) | ||
23 | #define IRQ_DB5500_MTU1 (IRQ_SHPI_START + 17) | ||
24 | #define IRQ_DB5500_RTC (IRQ_SHPI_START + 18) | ||
25 | #define IRQ_DB5500_UART1 (IRQ_SHPI_START + 19) | ||
26 | #define IRQ_DB5500_USB_WAKEUP (IRQ_SHPI_START + 20) | ||
27 | #define IRQ_DB5500_I2C0 (IRQ_SHPI_START + 21) | ||
28 | #define IRQ_DB5500_I2C1 (IRQ_SHPI_START + 22) | ||
29 | #define IRQ_DB5500_USBOTG (IRQ_SHPI_START + 23) | ||
30 | #define IRQ_DB5500_DMA_SECURE (IRQ_SHPI_START + 24) | ||
31 | #define IRQ_DB5500_DMA (IRQ_SHPI_START + 25) | ||
32 | #define IRQ_DB5500_UART2 (IRQ_SHPI_START + 26) | ||
33 | #define IRQ_DB5500_ICN_PMU1 (IRQ_SHPI_START + 27) | ||
34 | #define IRQ_DB5500_ICN_PMU2 (IRQ_SHPI_START + 28) | ||
35 | #define IRQ_DB5500_UART3 (IRQ_SHPI_START + 29) | ||
36 | #define IRQ_DB5500_SPI3 (IRQ_SHPI_START + 30) | ||
37 | #define IRQ_DB5500_SDMMC4 (IRQ_SHPI_START + 31) | ||
38 | #define IRQ_DB5500_IRRC (IRQ_SHPI_START + 33) | ||
39 | #define IRQ_DB5500_IRDA_FT (IRQ_SHPI_START + 34) | ||
40 | #define IRQ_DB5500_IRDA_SD (IRQ_SHPI_START + 35) | ||
41 | #define IRQ_DB5500_IRDA_FI (IRQ_SHPI_START + 36) | ||
42 | #define IRQ_DB5500_IRDA_FD (IRQ_SHPI_START + 37) | ||
43 | #define IRQ_DB5500_FSMC_CODEREADY (IRQ_SHPI_START + 38) | ||
44 | #define IRQ_DB5500_FSMC_NANDWAIT (IRQ_SHPI_START + 39) | ||
45 | #define IRQ_DB5500_AB5500 (IRQ_SHPI_START + 40) | ||
46 | #define IRQ_DB5500_SDMMC2 (IRQ_SHPI_START + 41) | ||
47 | #define IRQ_DB5500_SIA (IRQ_SHPI_START + 42) | ||
48 | #define IRQ_DB5500_SIA2 (IRQ_SHPI_START + 43) | ||
49 | #define IRQ_DB5500_HVA (IRQ_SHPI_START + 44) | ||
50 | #define IRQ_DB5500_HVA2 (IRQ_SHPI_START + 45) | ||
51 | #define IRQ_DB5500_PRCMU0 (IRQ_SHPI_START + 46) | ||
52 | #define IRQ_DB5500_PRCMU1 (IRQ_SHPI_START + 47) | ||
53 | #define IRQ_DB5500_DISP (IRQ_SHPI_START + 48) | ||
54 | #define IRQ_DB5500_SDMMC1 (IRQ_SHPI_START + 50) | ||
55 | #define IRQ_DB5500_MSP1 (IRQ_SHPI_START + 52) | ||
56 | #define IRQ_DB5500_KBD (IRQ_SHPI_START + 53) | ||
57 | #define IRQ_DB5500_I2C2 (IRQ_SHPI_START + 55) | ||
58 | #define IRQ_DB5500_B2R2 (IRQ_SHPI_START + 56) | ||
59 | #define IRQ_DB5500_CRYP0 (IRQ_SHPI_START + 57) | ||
60 | #define IRQ_DB5500_SDMMC3 (IRQ_SHPI_START + 59) | ||
61 | #define IRQ_DB5500_SDMMC0 (IRQ_SHPI_START + 60) | ||
62 | #define IRQ_DB5500_HSEM (IRQ_SHPI_START + 61) | ||
63 | #define IRQ_DB5500_SBAG (IRQ_SHPI_START + 63) | ||
64 | #define IRQ_DB5500_MODEM (IRQ_SHPI_START + 65) | ||
65 | #define IRQ_DB5500_SPI1 (IRQ_SHPI_START + 96) | ||
66 | #define IRQ_DB5500_MSP2 (IRQ_SHPI_START + 98) | ||
67 | #define IRQ_DB5500_SRPTIMER (IRQ_SHPI_START + 101) | ||
68 | #define IRQ_DB5500_CTI0 (IRQ_SHPI_START + 108) | ||
69 | #define IRQ_DB5500_CTI1 (IRQ_SHPI_START + 109) | ||
70 | #define IRQ_DB5500_ICN_ERR (IRQ_SHPI_START + 110) | ||
71 | #define IRQ_DB5500_MALI_PPMMU (IRQ_SHPI_START + 112) | ||
72 | #define IRQ_DB5500_MALI_PP (IRQ_SHPI_START + 113) | ||
73 | #define IRQ_DB5500_MALI_GPMMU (IRQ_SHPI_START + 114) | ||
74 | #define IRQ_DB5500_MALI_GP (IRQ_SHPI_START + 115) | ||
75 | #define IRQ_DB5500_MALI (IRQ_SHPI_START + 116) | ||
76 | #define IRQ_DB5500_PRCMU_SEM (IRQ_SHPI_START + 118) | ||
77 | #define IRQ_DB5500_GPIO0 (IRQ_SHPI_START + 119) | ||
78 | #define IRQ_DB5500_GPIO1 (IRQ_SHPI_START + 120) | ||
79 | #define IRQ_DB5500_GPIO2 (IRQ_SHPI_START + 121) | ||
80 | #define IRQ_DB5500_GPIO3 (IRQ_SHPI_START + 122) | ||
81 | #define IRQ_DB5500_GPIO4 (IRQ_SHPI_START + 123) | ||
82 | #define IRQ_DB5500_GPIO5 (IRQ_SHPI_START + 124) | ||
83 | #define IRQ_DB5500_GPIO6 (IRQ_SHPI_START + 125) | ||
84 | #define IRQ_DB5500_GPIO7 (IRQ_SHPI_START + 126) | ||
85 | |||
86 | #ifdef CONFIG_UX500_SOC_DB5500 | ||
87 | |||
88 | /* | ||
89 | * After the GPIO ones we reserve a range of IRQ:s in which virtual | ||
90 | * IRQ:s representing modem IRQ:s can be allocated | ||
91 | */ | ||
92 | #define IRQ_MODEM_EVENTS_BASE IRQ_SOC_START | ||
93 | #define IRQ_MODEM_EVENTS_NBR 72 | ||
94 | #define IRQ_MODEM_EVENTS_END (IRQ_MODEM_EVENTS_BASE + IRQ_MODEM_EVENTS_NBR) | ||
95 | |||
96 | /* List of virtual IRQ:s that are allocated from the range above */ | ||
97 | #define MBOX_PAIR0_VIRT_IRQ (IRQ_MODEM_EVENTS_BASE + 43) | ||
98 | #define MBOX_PAIR1_VIRT_IRQ (IRQ_MODEM_EVENTS_BASE + 45) | ||
99 | #define MBOX_PAIR2_VIRT_IRQ (IRQ_MODEM_EVENTS_BASE + 41) | ||
100 | |||
101 | /* | ||
102 | * We may have several SoCs, but only one will run at a | ||
103 | * time, so the one with most IRQs will bump this ahead, | ||
104 | * but the IRQ_SOC_START remains the same for either SoC. | ||
105 | */ | ||
106 | #if IRQ_SOC_END < IRQ_MODEM_EVENTS_END | ||
107 | #undef IRQ_SOC_END | ||
108 | #define IRQ_SOC_END IRQ_MODEM_EVENTS_END | ||
109 | #endif | ||
110 | |||
111 | #endif /* CONFIG_UX500_SOC_DB5500 */ | ||
112 | |||
113 | #endif | ||
diff --git a/arch/arm/mach-ux500/include/mach/irqs.h b/arch/arm/mach-ux500/include/mach/irqs.h index c23a6b5f0c4..d06dcf6208f 100644 --- a/arch/arm/mach-ux500/include/mach/irqs.h +++ b/arch/arm/mach-ux500/include/mach/irqs.h | |||
@@ -36,7 +36,6 @@ | |||
36 | /* This will be overridden by SoC-specific irq headers */ | 36 | /* This will be overridden by SoC-specific irq headers */ |
37 | #define IRQ_SOC_END IRQ_SOC_START | 37 | #define IRQ_SOC_END IRQ_SOC_START |
38 | 38 | ||
39 | #include <mach/irqs-db5500.h> | ||
40 | #include <mach/irqs-db8500.h> | 39 | #include <mach/irqs-db8500.h> |
41 | 40 | ||
42 | #define IRQ_BOARD_START IRQ_SOC_END | 41 | #define IRQ_BOARD_START IRQ_SOC_END |
@@ -47,10 +46,6 @@ | |||
47 | #include <mach/irqs-board-mop500.h> | 46 | #include <mach/irqs-board-mop500.h> |
48 | #endif | 47 | #endif |
49 | 48 | ||
50 | #ifdef CONFIG_MACH_U5500 | ||
51 | #include <mach/irqs-board-u5500.h> | ||
52 | #endif | ||
53 | |||
54 | #define NR_IRQS IRQ_BOARD_END | 49 | #define NR_IRQS IRQ_BOARD_END |
55 | 50 | ||
56 | #endif /* ASM_ARCH_IRQS_H */ | 51 | #endif /* ASM_ARCH_IRQS_H */ |
diff --git a/arch/arm/mach-ux500/include/mach/mbox-db5500.h b/arch/arm/mach-ux500/include/mach/mbox-db5500.h deleted file mode 100644 index 7f9da4d2fbd..00000000000 --- a/arch/arm/mach-ux500/include/mach/mbox-db5500.h +++ /dev/null | |||
@@ -1,88 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * Author: Stefan Nilsson <stefan.xk.nilsson@stericsson.com> for ST-Ericsson. | ||
4 | * Author: Martin Persson <martin.persson@stericsson.com> for ST-Ericsson. | ||
5 | * License terms: GNU General Public License (GPL), version 2. | ||
6 | */ | ||
7 | |||
8 | #ifndef __INC_STE_MBOX_H | ||
9 | #define __INC_STE_MBOX_H | ||
10 | |||
11 | #define MBOX_BUF_SIZE 16 | ||
12 | #define MBOX_NAME_SIZE 8 | ||
13 | |||
14 | /** | ||
15 | * mbox_recv_cb_t - Definition of the mailbox callback. | ||
16 | * @mbox_msg: The mailbox message. | ||
17 | * @priv: The clients private data as specified in the call to mbox_setup. | ||
18 | * | ||
19 | * This function will be called upon reception of new mailbox messages. | ||
20 | */ | ||
21 | typedef void mbox_recv_cb_t (u32 mbox_msg, void *priv); | ||
22 | |||
23 | /** | ||
24 | * struct mbox - Mailbox instance struct | ||
25 | * @list: Linked list head. | ||
26 | * @pdev: Pointer to device struct. | ||
27 | * @cb: Callback function. Will be called | ||
28 | * when new data is received. | ||
29 | * @client_data: Clients private data. Will be sent back | ||
30 | * in the callback function. | ||
31 | * @virtbase_peer: Virtual address for outgoing mailbox. | ||
32 | * @virtbase_local: Virtual address for incoming mailbox. | ||
33 | * @buffer: Then internal queue for outgoing messages. | ||
34 | * @name: Name of this mailbox. | ||
35 | * @buffer_available: Completion variable to achieve "blocking send". | ||
36 | * This variable will be signaled when there is | ||
37 | * internal buffer space available. | ||
38 | * @client_blocked: To keep track if any client is currently | ||
39 | * blocked. | ||
40 | * @lock: Spinlock to protect this mailbox instance. | ||
41 | * @write_index: Index in internal buffer to write to. | ||
42 | * @read_index: Index in internal buffer to read from. | ||
43 | * @allocated: Indicates whether this particular mailbox | ||
44 | * id has been allocated by someone. | ||
45 | */ | ||
46 | struct mbox { | ||
47 | struct list_head list; | ||
48 | struct platform_device *pdev; | ||
49 | mbox_recv_cb_t *cb; | ||
50 | void *client_data; | ||
51 | void __iomem *virtbase_peer; | ||
52 | void __iomem *virtbase_local; | ||
53 | u32 buffer[MBOX_BUF_SIZE]; | ||
54 | char name[MBOX_NAME_SIZE]; | ||
55 | struct completion buffer_available; | ||
56 | u8 client_blocked; | ||
57 | spinlock_t lock; | ||
58 | u8 write_index; | ||
59 | u8 read_index; | ||
60 | bool allocated; | ||
61 | }; | ||
62 | |||
63 | /** | ||
64 | * mbox_setup - Set up a mailbox and return its instance. | ||
65 | * @mbox_id: The ID number of the mailbox. 0 or 1 for modem CPU, | ||
66 | * 2 for modem DSP. | ||
67 | * @mbox_cb: Pointer to the callback function to be called when a new message | ||
68 | * is received. | ||
69 | * @priv: Client user data which will be returned in the callback. | ||
70 | * | ||
71 | * Returns a mailbox instance to be specified in subsequent calls to mbox_send. | ||
72 | */ | ||
73 | struct mbox *mbox_setup(u8 mbox_id, mbox_recv_cb_t *mbox_cb, void *priv); | ||
74 | |||
75 | /** | ||
76 | * mbox_send - Send a mailbox message. | ||
77 | * @mbox: Mailbox instance (returned by mbox_setup) | ||
78 | * @mbox_msg: The mailbox message to send. | ||
79 | * @block: Specifies whether this call will block until send is possible, | ||
80 | * or return an error if the mailbox buffer is full. | ||
81 | * | ||
82 | * Returns 0 on success or a negative error code on error. -ENOMEM indicates | ||
83 | * that the internal buffer is full and you have to try again later (or | ||
84 | * specify "block" in order to block until send is possible). | ||
85 | */ | ||
86 | int mbox_send(struct mbox *mbox, u32 mbox_msg, bool block); | ||
87 | |||
88 | #endif /*INC_STE_MBOX_H*/ | ||
diff --git a/arch/arm/mach-ux500/include/mach/setup.h b/arch/arm/mach-ux500/include/mach/setup.h index 3dc00ffa7bf..4e369f1645e 100644 --- a/arch/arm/mach-ux500/include/mach/setup.h +++ b/arch/arm/mach-ux500/include/mach/setup.h | |||
@@ -15,18 +15,12 @@ | |||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | 16 | ||
17 | void __init ux500_map_io(void); | 17 | void __init ux500_map_io(void); |
18 | extern void __init u5500_map_io(void); | ||
19 | extern void __init u8500_map_io(void); | 18 | extern void __init u8500_map_io(void); |
20 | 19 | ||
21 | extern struct device * __init u5500_init_devices(void); | ||
22 | extern struct device * __init u8500_init_devices(void); | 20 | extern struct device * __init u8500_init_devices(void); |
23 | 21 | ||
24 | extern void __init ux500_init_irq(void); | 22 | extern void __init ux500_init_irq(void); |
25 | 23 | ||
26 | extern void __init u5500_sdi_init(struct device *parent); | ||
27 | |||
28 | extern void __init db5500_dma_init(struct device *parent); | ||
29 | |||
30 | extern struct device *ux500_soc_device_init(const char *soc_id); | 24 | extern struct device *ux500_soc_device_init(const char *soc_id); |
31 | 25 | ||
32 | struct amba_device; | 26 | struct amba_device; |
diff --git a/arch/arm/mach-ux500/include/mach/uncompress.h b/arch/arm/mach-ux500/include/mach/uncompress.h index 6fb3c4b0105..34775baadae 100644 --- a/arch/arm/mach-ux500/include/mach/uncompress.h +++ b/arch/arm/mach-ux500/include/mach/uncompress.h | |||
@@ -50,11 +50,8 @@ static void flush(void) | |||
50 | 50 | ||
51 | static inline void arch_decomp_setup(void) | 51 | static inline void arch_decomp_setup(void) |
52 | { | 52 | { |
53 | /* Check in run time if we run on an U8500 or U5500 */ | 53 | /* Use machine_is_foo() macro if you need to switch base someday */ |
54 | if (machine_is_u5500()) | 54 | ux500_uart_base = U8500_UART2_BASE; |
55 | ux500_uart_base = U5500_UART0_BASE; | ||
56 | else | ||
57 | ux500_uart_base = U8500_UART2_BASE; | ||
58 | } | 55 | } |
59 | 56 | ||
60 | #define arch_decomp_wdog() /* nothing to do here */ | 57 | #define arch_decomp_wdog() /* nothing to do here */ |
diff --git a/arch/arm/mach-ux500/mbox-db5500.c b/arch/arm/mach-ux500/mbox-db5500.c deleted file mode 100644 index 0127490218c..00000000000 --- a/arch/arm/mach-ux500/mbox-db5500.c +++ /dev/null | |||
@@ -1,565 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * Author: Stefan Nilsson <stefan.xk.nilsson@stericsson.com> for ST-Ericsson. | ||
4 | * Author: Martin Persson <martin.persson@stericsson.com> for ST-Ericsson. | ||
5 | * License terms: GNU General Public License (GPL), version 2. | ||
6 | */ | ||
7 | |||
8 | /* | ||
9 | * Mailbox nomenclature: | ||
10 | * | ||
11 | * APE MODEM | ||
12 | * mbox pairX | ||
13 | * .......................... | ||
14 | * . . | ||
15 | * . peer . | ||
16 | * . send ---- . | ||
17 | * . --> | | . | ||
18 | * . | | . | ||
19 | * . ---- . | ||
20 | * . . | ||
21 | * . local . | ||
22 | * . rec ---- . | ||
23 | * . | | <-- . | ||
24 | * . | | . | ||
25 | * . ---- . | ||
26 | * ......................... | ||
27 | */ | ||
28 | |||
29 | #include <linux/init.h> | ||
30 | #include <linux/module.h> | ||
31 | #include <linux/device.h> | ||
32 | #include <linux/interrupt.h> | ||
33 | #include <linux/spinlock.h> | ||
34 | #include <linux/errno.h> | ||
35 | #include <linux/io.h> | ||
36 | #include <linux/irq.h> | ||
37 | #include <linux/platform_device.h> | ||
38 | #include <linux/debugfs.h> | ||
39 | #include <linux/seq_file.h> | ||
40 | #include <linux/completion.h> | ||
41 | #include <mach/mbox-db5500.h> | ||
42 | |||
43 | #define MBOX_NAME "mbox" | ||
44 | |||
45 | #define MBOX_FIFO_DATA 0x000 | ||
46 | #define MBOX_FIFO_ADD 0x004 | ||
47 | #define MBOX_FIFO_REMOVE 0x008 | ||
48 | #define MBOX_FIFO_THRES_FREE 0x00C | ||
49 | #define MBOX_FIFO_THRES_OCCUP 0x010 | ||
50 | #define MBOX_FIFO_STATUS 0x014 | ||
51 | |||
52 | #define MBOX_DISABLE_IRQ 0x4 | ||
53 | #define MBOX_ENABLE_IRQ 0x0 | ||
54 | #define MBOX_LATCH 1 | ||
55 | |||
56 | /* Global list of all mailboxes */ | ||
57 | static struct list_head mboxs = LIST_HEAD_INIT(mboxs); | ||
58 | |||
59 | static struct mbox *get_mbox_with_id(u8 id) | ||
60 | { | ||
61 | u8 i; | ||
62 | struct list_head *pos = &mboxs; | ||
63 | for (i = 0; i <= id; i++) | ||
64 | pos = pos->next; | ||
65 | |||
66 | return (struct mbox *) list_entry(pos, struct mbox, list); | ||
67 | } | ||
68 | |||
69 | int mbox_send(struct mbox *mbox, u32 mbox_msg, bool block) | ||
70 | { | ||
71 | int res = 0; | ||
72 | |||
73 | spin_lock(&mbox->lock); | ||
74 | |||
75 | dev_dbg(&(mbox->pdev->dev), | ||
76 | "About to buffer 0x%X to mailbox 0x%X." | ||
77 | " ri = %d, wi = %d\n", | ||
78 | mbox_msg, (u32)mbox, mbox->read_index, | ||
79 | mbox->write_index); | ||
80 | |||
81 | /* Check if write buffer is full */ | ||
82 | while (((mbox->write_index + 1) % MBOX_BUF_SIZE) == mbox->read_index) { | ||
83 | if (!block) { | ||
84 | dev_dbg(&(mbox->pdev->dev), | ||
85 | "Buffer full in non-blocking call! " | ||
86 | "Returning -ENOMEM!\n"); | ||
87 | res = -ENOMEM; | ||
88 | goto exit; | ||
89 | } | ||
90 | spin_unlock(&mbox->lock); | ||
91 | dev_dbg(&(mbox->pdev->dev), | ||
92 | "Buffer full in blocking call! Sleeping...\n"); | ||
93 | mbox->client_blocked = 1; | ||
94 | wait_for_completion(&mbox->buffer_available); | ||
95 | dev_dbg(&(mbox->pdev->dev), | ||
96 | "Blocking send was woken up! Trying again...\n"); | ||
97 | spin_lock(&mbox->lock); | ||
98 | } | ||
99 | |||
100 | mbox->buffer[mbox->write_index] = mbox_msg; | ||
101 | mbox->write_index = (mbox->write_index + 1) % MBOX_BUF_SIZE; | ||
102 | |||
103 | /* | ||
104 | * Indicate that we want an IRQ as soon as there is a slot | ||
105 | * in the FIFO | ||
106 | */ | ||
107 | writel(MBOX_ENABLE_IRQ, mbox->virtbase_peer + MBOX_FIFO_THRES_FREE); | ||
108 | |||
109 | exit: | ||
110 | spin_unlock(&mbox->lock); | ||
111 | return res; | ||
112 | } | ||
113 | EXPORT_SYMBOL(mbox_send); | ||
114 | |||
115 | #if defined(CONFIG_DEBUG_FS) | ||
116 | /* | ||
117 | * Expected input: <value> <nbr sends> | ||
118 | * Example: "echo 0xdeadbeef 4 > mbox-node" sends 0xdeadbeef 4 times | ||
119 | */ | ||
120 | static ssize_t mbox_write_fifo(struct device *dev, | ||
121 | struct device_attribute *attr, | ||
122 | const char *buf, | ||
123 | size_t count) | ||
124 | { | ||
125 | unsigned long mbox_mess; | ||
126 | unsigned long nbr_sends; | ||
127 | unsigned long i; | ||
128 | char int_buf[16]; | ||
129 | char *token; | ||
130 | char *val; | ||
131 | |||
132 | struct mbox *mbox = (struct mbox *) dev->platform_data; | ||
133 | |||
134 | strncpy((char *) &int_buf, buf, sizeof(int_buf)); | ||
135 | token = (char *) &int_buf; | ||
136 | |||
137 | /* Parse message */ | ||
138 | val = strsep(&token, " "); | ||
139 | if ((val == NULL) || (strict_strtoul(val, 16, &mbox_mess) != 0)) | ||
140 | mbox_mess = 0xDEADBEEF; | ||
141 | |||
142 | val = strsep(&token, " "); | ||
143 | if ((val == NULL) || (strict_strtoul(val, 10, &nbr_sends) != 0)) | ||
144 | nbr_sends = 1; | ||
145 | |||
146 | dev_dbg(dev, "Will write 0x%lX %ld times using data struct at 0x%X\n", | ||
147 | mbox_mess, nbr_sends, (u32) mbox); | ||
148 | |||
149 | for (i = 0; i < nbr_sends; i++) | ||
150 | mbox_send(mbox, mbox_mess, true); | ||
151 | |||
152 | return count; | ||
153 | } | ||
154 | |||
155 | static ssize_t mbox_read_fifo(struct device *dev, | ||
156 | struct device_attribute *attr, | ||
157 | char *buf) | ||
158 | { | ||
159 | int mbox_value; | ||
160 | struct mbox *mbox = (struct mbox *) dev->platform_data; | ||
161 | |||
162 | if ((readl(mbox->virtbase_local + MBOX_FIFO_STATUS) & 0x7) <= 0) | ||
163 | return sprintf(buf, "Mailbox is empty\n"); | ||
164 | |||
165 | mbox_value = readl(mbox->virtbase_local + MBOX_FIFO_DATA); | ||
166 | writel(MBOX_LATCH, (mbox->virtbase_local + MBOX_FIFO_REMOVE)); | ||
167 | |||
168 | return sprintf(buf, "0x%X\n", mbox_value); | ||
169 | } | ||
170 | |||
171 | static DEVICE_ATTR(fifo, S_IWUSR | S_IRUGO, mbox_read_fifo, mbox_write_fifo); | ||
172 | |||
173 | static int mbox_show(struct seq_file *s, void *data) | ||
174 | { | ||
175 | struct list_head *pos; | ||
176 | u8 mbox_index = 0; | ||
177 | |||
178 | list_for_each(pos, &mboxs) { | ||
179 | struct mbox *m = | ||
180 | (struct mbox *) list_entry(pos, struct mbox, list); | ||
181 | if (m == NULL) { | ||
182 | seq_printf(s, | ||
183 | "Unable to retrieve mailbox %d\n", | ||
184 | mbox_index); | ||
185 | continue; | ||
186 | } | ||
187 | |||
188 | spin_lock(&m->lock); | ||
189 | if ((m->virtbase_peer == NULL) || (m->virtbase_local == NULL)) { | ||
190 | seq_printf(s, "MAILBOX %d not setup or corrupt\n", | ||
191 | mbox_index); | ||
192 | spin_unlock(&m->lock); | ||
193 | continue; | ||
194 | } | ||
195 | |||
196 | seq_printf(s, | ||
197 | "===========================\n" | ||
198 | " MAILBOX %d\n" | ||
199 | " PEER MAILBOX DUMP\n" | ||
200 | "---------------------------\n" | ||
201 | "FIFO: 0x%X (%d)\n" | ||
202 | "Free Threshold: 0x%.2X (%d)\n" | ||
203 | "Occupied Threshold: 0x%.2X (%d)\n" | ||
204 | "Status: 0x%.2X (%d)\n" | ||
205 | " Free spaces (ot): %d (%d)\n" | ||
206 | " Occup spaces (ot): %d (%d)\n" | ||
207 | "===========================\n" | ||
208 | " LOCAL MAILBOX DUMP\n" | ||
209 | "---------------------------\n" | ||
210 | "FIFO: 0x%.X (%d)\n" | ||
211 | "Free Threshold: 0x%.2X (%d)\n" | ||
212 | "Occupied Threshold: 0x%.2X (%d)\n" | ||
213 | "Status: 0x%.2X (%d)\n" | ||
214 | " Free spaces (ot): %d (%d)\n" | ||
215 | " Occup spaces (ot): %d (%d)\n" | ||
216 | "===========================\n" | ||
217 | "write_index: %d\n" | ||
218 | "read_index : %d\n" | ||
219 | "===========================\n" | ||
220 | "\n", | ||
221 | mbox_index, | ||
222 | readl(m->virtbase_peer + MBOX_FIFO_DATA), | ||
223 | readl(m->virtbase_peer + MBOX_FIFO_DATA), | ||
224 | readl(m->virtbase_peer + MBOX_FIFO_THRES_FREE), | ||
225 | readl(m->virtbase_peer + MBOX_FIFO_THRES_FREE), | ||
226 | readl(m->virtbase_peer + MBOX_FIFO_THRES_OCCUP), | ||
227 | readl(m->virtbase_peer + MBOX_FIFO_THRES_OCCUP), | ||
228 | readl(m->virtbase_peer + MBOX_FIFO_STATUS), | ||
229 | readl(m->virtbase_peer + MBOX_FIFO_STATUS), | ||
230 | (readl(m->virtbase_peer + MBOX_FIFO_STATUS) >> 4) & 0x7, | ||
231 | (readl(m->virtbase_peer + MBOX_FIFO_STATUS) >> 7) & 0x1, | ||
232 | (readl(m->virtbase_peer + MBOX_FIFO_STATUS) >> 0) & 0x7, | ||
233 | (readl(m->virtbase_peer + MBOX_FIFO_STATUS) >> 3) & 0x1, | ||
234 | readl(m->virtbase_local + MBOX_FIFO_DATA), | ||
235 | readl(m->virtbase_local + MBOX_FIFO_DATA), | ||
236 | readl(m->virtbase_local + MBOX_FIFO_THRES_FREE), | ||
237 | readl(m->virtbase_local + MBOX_FIFO_THRES_FREE), | ||
238 | readl(m->virtbase_local + MBOX_FIFO_THRES_OCCUP), | ||
239 | readl(m->virtbase_local + MBOX_FIFO_THRES_OCCUP), | ||
240 | readl(m->virtbase_local + MBOX_FIFO_STATUS), | ||
241 | readl(m->virtbase_local + MBOX_FIFO_STATUS), | ||
242 | (readl(m->virtbase_local + MBOX_FIFO_STATUS) >> 4) & 0x7, | ||
243 | (readl(m->virtbase_local + MBOX_FIFO_STATUS) >> 7) & 0x1, | ||
244 | (readl(m->virtbase_local + MBOX_FIFO_STATUS) >> 0) & 0x7, | ||
245 | (readl(m->virtbase_local + MBOX_FIFO_STATUS) >> 3) & 0x1, | ||
246 | m->write_index, m->read_index); | ||
247 | mbox_index++; | ||
248 | spin_unlock(&m->lock); | ||
249 | } | ||
250 | |||
251 | return 0; | ||
252 | } | ||
253 | |||
254 | static int mbox_open(struct inode *inode, struct file *file) | ||
255 | { | ||
256 | return single_open(file, mbox_show, NULL); | ||
257 | } | ||
258 | |||
259 | static const struct file_operations mbox_operations = { | ||
260 | .owner = THIS_MODULE, | ||
261 | .open = mbox_open, | ||
262 | .read = seq_read, | ||
263 | .llseek = seq_lseek, | ||
264 | .release = single_release, | ||
265 | }; | ||
266 | #endif | ||
267 | |||
268 | static irqreturn_t mbox_irq(int irq, void *arg) | ||
269 | { | ||
270 | u32 mbox_value; | ||
271 | int nbr_occup; | ||
272 | int nbr_free; | ||
273 | struct mbox *mbox = (struct mbox *) arg; | ||
274 | |||
275 | spin_lock(&mbox->lock); | ||
276 | |||
277 | dev_dbg(&(mbox->pdev->dev), | ||
278 | "mbox IRQ [%d] received. ri = %d, wi = %d\n", | ||
279 | irq, mbox->read_index, mbox->write_index); | ||
280 | |||
281 | /* | ||
282 | * Check if we have any outgoing messages, and if there is space for | ||
283 | * them in the FIFO. | ||
284 | */ | ||
285 | if (mbox->read_index != mbox->write_index) { | ||
286 | /* | ||
287 | * Check by reading FREE for LOCAL since that indicates | ||
288 | * OCCUP for PEER | ||
289 | */ | ||
290 | nbr_free = (readl(mbox->virtbase_local + MBOX_FIFO_STATUS) | ||
291 | >> 4) & 0x7; | ||
292 | dev_dbg(&(mbox->pdev->dev), | ||
293 | "Status indicates %d empty spaces in the FIFO!\n", | ||
294 | nbr_free); | ||
295 | |||
296 | while ((nbr_free > 0) && | ||
297 | (mbox->read_index != mbox->write_index)) { | ||
298 | /* Write the message and latch it into the FIFO */ | ||
299 | writel(mbox->buffer[mbox->read_index], | ||
300 | (mbox->virtbase_peer + MBOX_FIFO_DATA)); | ||
301 | writel(MBOX_LATCH, | ||
302 | (mbox->virtbase_peer + MBOX_FIFO_ADD)); | ||
303 | dev_dbg(&(mbox->pdev->dev), | ||
304 | "Wrote message 0x%X to addr 0x%X\n", | ||
305 | mbox->buffer[mbox->read_index], | ||
306 | (u32) (mbox->virtbase_peer + MBOX_FIFO_DATA)); | ||
307 | |||
308 | nbr_free--; | ||
309 | mbox->read_index = | ||
310 | (mbox->read_index + 1) % MBOX_BUF_SIZE; | ||
311 | } | ||
312 | |||
313 | /* | ||
314 | * Check if we still want IRQ:s when there is free | ||
315 | * space to send | ||
316 | */ | ||
317 | if (mbox->read_index != mbox->write_index) { | ||
318 | dev_dbg(&(mbox->pdev->dev), | ||
319 | "Still have messages to send, but FIFO full. " | ||
320 | "Request IRQ again!\n"); | ||
321 | writel(MBOX_ENABLE_IRQ, | ||
322 | mbox->virtbase_peer + MBOX_FIFO_THRES_FREE); | ||
323 | } else { | ||
324 | dev_dbg(&(mbox->pdev->dev), | ||
325 | "No more messages to send. " | ||
326 | "Do not request IRQ again!\n"); | ||
327 | writel(MBOX_DISABLE_IRQ, | ||
328 | mbox->virtbase_peer + MBOX_FIFO_THRES_FREE); | ||
329 | } | ||
330 | |||
331 | /* | ||
332 | * Check if we can signal any blocked clients that it is OK to | ||
333 | * start buffering again | ||
334 | */ | ||
335 | if (mbox->client_blocked && | ||
336 | (((mbox->write_index + 1) % MBOX_BUF_SIZE) | ||
337 | != mbox->read_index)) { | ||
338 | dev_dbg(&(mbox->pdev->dev), | ||
339 | "Waking up blocked client\n"); | ||
340 | complete(&mbox->buffer_available); | ||
341 | mbox->client_blocked = 0; | ||
342 | } | ||
343 | } | ||
344 | |||
345 | /* Check if we have any incoming messages */ | ||
346 | nbr_occup = readl(mbox->virtbase_local + MBOX_FIFO_STATUS) & 0x7; | ||
347 | if (nbr_occup == 0) | ||
348 | goto exit; | ||
349 | |||
350 | if (mbox->cb == NULL) { | ||
351 | dev_dbg(&(mbox->pdev->dev), "No receive callback registered, " | ||
352 | "leaving %d incoming messages in fifo!\n", nbr_occup); | ||
353 | goto exit; | ||
354 | } | ||
355 | |||
356 | /* Read and acknowledge the message */ | ||
357 | mbox_value = readl(mbox->virtbase_local + MBOX_FIFO_DATA); | ||
358 | writel(MBOX_LATCH, (mbox->virtbase_local + MBOX_FIFO_REMOVE)); | ||
359 | |||
360 | /* Notify consumer of new mailbox message */ | ||
361 | dev_dbg(&(mbox->pdev->dev), "Calling callback for message 0x%X!\n", | ||
362 | mbox_value); | ||
363 | mbox->cb(mbox_value, mbox->client_data); | ||
364 | |||
365 | exit: | ||
366 | dev_dbg(&(mbox->pdev->dev), "Exit mbox IRQ. ri = %d, wi = %d\n", | ||
367 | mbox->read_index, mbox->write_index); | ||
368 | spin_unlock(&mbox->lock); | ||
369 | |||
370 | return IRQ_HANDLED; | ||
371 | } | ||
372 | |||
373 | /* Setup is executed once for each mbox pair */ | ||
374 | struct mbox *mbox_setup(u8 mbox_id, mbox_recv_cb_t *mbox_cb, void *priv) | ||
375 | { | ||
376 | struct resource *resource; | ||
377 | int irq; | ||
378 | int res; | ||
379 | struct mbox *mbox; | ||
380 | |||
381 | mbox = get_mbox_with_id(mbox_id); | ||
382 | if (mbox == NULL) { | ||
383 | dev_err(&(mbox->pdev->dev), "Incorrect mailbox id: %d!\n", | ||
384 | mbox_id); | ||
385 | goto exit; | ||
386 | } | ||
387 | |||
388 | /* | ||
389 | * Check if mailbox has been allocated to someone else, | ||
390 | * otherwise allocate it | ||
391 | */ | ||
392 | if (mbox->allocated) { | ||
393 | dev_err(&(mbox->pdev->dev), "Mailbox number %d is busy!\n", | ||
394 | mbox_id); | ||
395 | mbox = NULL; | ||
396 | goto exit; | ||
397 | } | ||
398 | mbox->allocated = true; | ||
399 | |||
400 | dev_dbg(&(mbox->pdev->dev), "Initiating mailbox number %d: 0x%X...\n", | ||
401 | mbox_id, (u32)mbox); | ||
402 | |||
403 | mbox->client_data = priv; | ||
404 | mbox->cb = mbox_cb; | ||
405 | |||
406 | /* Get addr for peer mailbox and ioremap it */ | ||
407 | resource = platform_get_resource_byname(mbox->pdev, | ||
408 | IORESOURCE_MEM, | ||
409 | "mbox_peer"); | ||
410 | if (resource == NULL) { | ||
411 | dev_err(&(mbox->pdev->dev), | ||
412 | "Unable to retrieve mbox peer resource\n"); | ||
413 | mbox = NULL; | ||
414 | goto exit; | ||
415 | } | ||
416 | dev_dbg(&(mbox->pdev->dev), | ||
417 | "Resource name: %s start: 0x%X, end: 0x%X\n", | ||
418 | resource->name, resource->start, resource->end); | ||
419 | mbox->virtbase_peer = ioremap(resource->start, resource_size(resource)); | ||
420 | if (!mbox->virtbase_peer) { | ||
421 | dev_err(&(mbox->pdev->dev), "Unable to ioremap peer mbox\n"); | ||
422 | mbox = NULL; | ||
423 | goto exit; | ||
424 | } | ||
425 | dev_dbg(&(mbox->pdev->dev), | ||
426 | "ioremapped peer physical: (0x%X-0x%X) to virtual: 0x%X\n", | ||
427 | resource->start, resource->end, (u32) mbox->virtbase_peer); | ||
428 | |||
429 | /* Get addr for local mailbox and ioremap it */ | ||
430 | resource = platform_get_resource_byname(mbox->pdev, | ||
431 | IORESOURCE_MEM, | ||
432 | "mbox_local"); | ||
433 | if (resource == NULL) { | ||
434 | dev_err(&(mbox->pdev->dev), | ||
435 | "Unable to retrieve mbox local resource\n"); | ||
436 | mbox = NULL; | ||
437 | goto exit; | ||
438 | } | ||
439 | dev_dbg(&(mbox->pdev->dev), | ||
440 | "Resource name: %s start: 0x%X, end: 0x%X\n", | ||
441 | resource->name, resource->start, resource->end); | ||
442 | mbox->virtbase_local = ioremap(resource->start, resource_size(resource)); | ||
443 | if (!mbox->virtbase_local) { | ||
444 | dev_err(&(mbox->pdev->dev), "Unable to ioremap local mbox\n"); | ||
445 | mbox = NULL; | ||
446 | goto exit; | ||
447 | } | ||
448 | dev_dbg(&(mbox->pdev->dev), | ||
449 | "ioremapped local physical: (0x%X-0x%X) to virtual: 0x%X\n", | ||
450 | resource->start, resource->end, (u32) mbox->virtbase_peer); | ||
451 | |||
452 | init_completion(&mbox->buffer_available); | ||
453 | mbox->client_blocked = 0; | ||
454 | |||
455 | /* Get IRQ for mailbox and allocate it */ | ||
456 | irq = platform_get_irq_byname(mbox->pdev, "mbox_irq"); | ||
457 | if (irq < 0) { | ||
458 | dev_err(&(mbox->pdev->dev), | ||
459 | "Unable to retrieve mbox irq resource\n"); | ||
460 | mbox = NULL; | ||
461 | goto exit; | ||
462 | } | ||
463 | |||
464 | dev_dbg(&(mbox->pdev->dev), "Allocating irq %d...\n", irq); | ||
465 | res = request_irq(irq, mbox_irq, 0, mbox->name, (void *) mbox); | ||
466 | if (res < 0) { | ||
467 | dev_err(&(mbox->pdev->dev), | ||
468 | "Unable to allocate mbox irq %d\n", irq); | ||
469 | mbox = NULL; | ||
470 | goto exit; | ||
471 | } | ||
472 | |||
473 | /* Set up mailbox to not launch IRQ on free space in mailbox */ | ||
474 | writel(MBOX_DISABLE_IRQ, mbox->virtbase_peer + MBOX_FIFO_THRES_FREE); | ||
475 | |||
476 | /* | ||
477 | * Set up mailbox to launch IRQ on new message if we have | ||
478 | * a callback set. If not, do not raise IRQ, but keep message | ||
479 | * in FIFO for manual retrieval | ||
480 | */ | ||
481 | if (mbox_cb != NULL) | ||
482 | writel(MBOX_ENABLE_IRQ, | ||
483 | mbox->virtbase_local + MBOX_FIFO_THRES_OCCUP); | ||
484 | else | ||
485 | writel(MBOX_DISABLE_IRQ, | ||
486 | mbox->virtbase_local + MBOX_FIFO_THRES_OCCUP); | ||
487 | |||
488 | #if defined(CONFIG_DEBUG_FS) | ||
489 | res = device_create_file(&(mbox->pdev->dev), &dev_attr_fifo); | ||
490 | if (res != 0) | ||
491 | dev_warn(&(mbox->pdev->dev), | ||
492 | "Unable to create mbox sysfs entry"); | ||
493 | |||
494 | (void) debugfs_create_file("mbox", S_IFREG | S_IRUGO, NULL, | ||
495 | NULL, &mbox_operations); | ||
496 | #endif | ||
497 | |||
498 | dev_info(&(mbox->pdev->dev), | ||
499 | "Mailbox driver with index %d initiated!\n", mbox_id); | ||
500 | |||
501 | exit: | ||
502 | return mbox; | ||
503 | } | ||
504 | EXPORT_SYMBOL(mbox_setup); | ||
505 | |||
506 | |||
507 | int __init mbox_probe(struct platform_device *pdev) | ||
508 | { | ||
509 | struct mbox local_mbox; | ||
510 | struct mbox *mbox; | ||
511 | int res = 0; | ||
512 | dev_dbg(&(pdev->dev), "Probing mailbox (pdev = 0x%X)...\n", (u32) pdev); | ||
513 | |||
514 | memset(&local_mbox, 0x0, sizeof(struct mbox)); | ||
515 | |||
516 | /* Associate our mbox data with the platform device */ | ||
517 | res = platform_device_add_data(pdev, | ||
518 | (void *) &local_mbox, | ||
519 | sizeof(struct mbox)); | ||
520 | if (res != 0) { | ||
521 | dev_err(&(pdev->dev), | ||
522 | "Unable to allocate driver platform data!\n"); | ||
523 | goto exit; | ||
524 | } | ||
525 | |||
526 | mbox = (struct mbox *) pdev->dev.platform_data; | ||
527 | mbox->pdev = pdev; | ||
528 | mbox->write_index = 0; | ||
529 | mbox->read_index = 0; | ||
530 | |||
531 | INIT_LIST_HEAD(&(mbox->list)); | ||
532 | list_add_tail(&(mbox->list), &mboxs); | ||
533 | |||
534 | sprintf(mbox->name, "%s", MBOX_NAME); | ||
535 | spin_lock_init(&mbox->lock); | ||
536 | |||
537 | dev_info(&(pdev->dev), "Mailbox driver loaded\n"); | ||
538 | |||
539 | exit: | ||
540 | return res; | ||
541 | } | ||
542 | |||
543 | static struct platform_driver mbox_driver = { | ||
544 | .driver = { | ||
545 | .name = MBOX_NAME, | ||
546 | .owner = THIS_MODULE, | ||
547 | }, | ||
548 | }; | ||
549 | |||
550 | static int __init mbox_init(void) | ||
551 | { | ||
552 | return platform_driver_probe(&mbox_driver, mbox_probe); | ||
553 | } | ||
554 | |||
555 | module_init(mbox_init); | ||
556 | |||
557 | void __exit mbox_exit(void) | ||
558 | { | ||
559 | platform_driver_unregister(&mbox_driver); | ||
560 | } | ||
561 | |||
562 | module_exit(mbox_exit); | ||
563 | |||
564 | MODULE_LICENSE("GPL"); | ||
565 | MODULE_DESCRIPTION("MBOX driver"); | ||
diff --git a/arch/arm/mach-ux500/modem-irq-db5500.c b/arch/arm/mach-ux500/modem-irq-db5500.c deleted file mode 100644 index 6b86416c94c..00000000000 --- a/arch/arm/mach-ux500/modem-irq-db5500.c +++ /dev/null | |||
@@ -1,143 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * Author: Stefan Nilsson <stefan.xk.nilsson@stericsson.com> for ST-Ericsson. | ||
4 | * Author: Martin Persson <martin.persson@stericsson.com> for ST-Ericsson. | ||
5 | * License terms: GNU General Public License (GPL), version 2. | ||
6 | */ | ||
7 | |||
8 | #include <linux/module.h> | ||
9 | #include <linux/kernel.h> | ||
10 | #include <linux/irq.h> | ||
11 | #include <linux/interrupt.h> | ||
12 | #include <linux/io.h> | ||
13 | #include <linux/slab.h> | ||
14 | |||
15 | #include <mach/id.h> | ||
16 | |||
17 | #define MODEM_INTCON_BASE_ADDR 0xBFFD3000 | ||
18 | #define MODEM_INTCON_SIZE 0xFFF | ||
19 | |||
20 | #define DEST_IRQ41_OFFSET 0x2A4 | ||
21 | #define DEST_IRQ43_OFFSET 0x2AC | ||
22 | #define DEST_IRQ45_OFFSET 0x2B4 | ||
23 | |||
24 | #define PRIO_IRQ41_OFFSET 0x6A4 | ||
25 | #define PRIO_IRQ43_OFFSET 0x6AC | ||
26 | #define PRIO_IRQ45_OFFSET 0x6B4 | ||
27 | |||
28 | #define ALLOW_IRQ_OFFSET 0x104 | ||
29 | |||
30 | #define MODEM_INTCON_CPU_NBR 0x1 | ||
31 | #define MODEM_INTCON_PRIO_HIGH 0x0 | ||
32 | |||
33 | #define MODEM_INTCON_ALLOW_IRQ41 0x0200 | ||
34 | #define MODEM_INTCON_ALLOW_IRQ43 0x0800 | ||
35 | #define MODEM_INTCON_ALLOW_IRQ45 0x2000 | ||
36 | |||
37 | #define MODEM_IRQ_REG_OFFSET 0x4 | ||
38 | |||
39 | struct modem_irq { | ||
40 | void __iomem *modem_intcon_base; | ||
41 | }; | ||
42 | |||
43 | |||
44 | static void setup_modem_intcon(void __iomem *modem_intcon_base) | ||
45 | { | ||
46 | /* IC_DESTINATION_BASE_ARRAY - Which CPU to receive the IRQ */ | ||
47 | writel(MODEM_INTCON_CPU_NBR, modem_intcon_base + DEST_IRQ41_OFFSET); | ||
48 | writel(MODEM_INTCON_CPU_NBR, modem_intcon_base + DEST_IRQ43_OFFSET); | ||
49 | writel(MODEM_INTCON_CPU_NBR, modem_intcon_base + DEST_IRQ45_OFFSET); | ||
50 | |||
51 | /* IC_PRIORITY_BASE_ARRAY - IRQ priority in modem IRQ controller */ | ||
52 | writel(MODEM_INTCON_PRIO_HIGH, modem_intcon_base + PRIO_IRQ41_OFFSET); | ||
53 | writel(MODEM_INTCON_PRIO_HIGH, modem_intcon_base + PRIO_IRQ43_OFFSET); | ||
54 | writel(MODEM_INTCON_PRIO_HIGH, modem_intcon_base + PRIO_IRQ45_OFFSET); | ||
55 | |||
56 | /* IC_ALLOW_ARRAY - IRQ enable */ | ||
57 | writel(MODEM_INTCON_ALLOW_IRQ41 | | ||
58 | MODEM_INTCON_ALLOW_IRQ43 | | ||
59 | MODEM_INTCON_ALLOW_IRQ45, | ||
60 | modem_intcon_base + ALLOW_IRQ_OFFSET); | ||
61 | } | ||
62 | |||
63 | static irqreturn_t modem_cpu_irq_handler(int irq, void *data) | ||
64 | { | ||
65 | int real_irq; | ||
66 | int virt_irq; | ||
67 | struct modem_irq *mi = (struct modem_irq *)data; | ||
68 | |||
69 | /* Read modem side IRQ number from modem IRQ controller */ | ||
70 | real_irq = readl(mi->modem_intcon_base + MODEM_IRQ_REG_OFFSET) & 0xFF; | ||
71 | virt_irq = IRQ_MODEM_EVENTS_BASE + real_irq; | ||
72 | |||
73 | pr_debug("modem_irq: Worker read addr 0x%X and got value 0x%X " | ||
74 | "which will be 0x%X (%d) which translates to " | ||
75 | "virtual IRQ 0x%X (%d)!\n", | ||
76 | (u32)mi->modem_intcon_base + MODEM_IRQ_REG_OFFSET, | ||
77 | real_irq, | ||
78 | real_irq & 0xFF, | ||
79 | real_irq & 0xFF, | ||
80 | virt_irq, | ||
81 | virt_irq); | ||
82 | |||
83 | if (virt_irq != 0) | ||
84 | generic_handle_irq(virt_irq); | ||
85 | |||
86 | pr_debug("modem_irq: Done handling virtual IRQ %d!\n", virt_irq); | ||
87 | |||
88 | return IRQ_HANDLED; | ||
89 | } | ||
90 | |||
91 | static void create_virtual_irq(int irq, struct irq_chip *modem_irq_chip) | ||
92 | { | ||
93 | irq_set_chip_and_handler(irq, modem_irq_chip, handle_simple_irq); | ||
94 | set_irq_flags(irq, IRQF_VALID); | ||
95 | |||
96 | pr_debug("modem_irq: Created virtual IRQ %d\n", irq); | ||
97 | } | ||
98 | |||
99 | static int modem_irq_init(void) | ||
100 | { | ||
101 | int err; | ||
102 | static struct irq_chip modem_irq_chip; | ||
103 | struct modem_irq *mi; | ||
104 | |||
105 | if (!cpu_is_u5500()) | ||
106 | return -ENODEV; | ||
107 | |||
108 | pr_info("modem_irq: Set up IRQ handler for incoming modem IRQ %d\n", | ||
109 | IRQ_DB5500_MODEM); | ||
110 | |||
111 | mi = kmalloc(sizeof(struct modem_irq), GFP_KERNEL); | ||
112 | if (!mi) { | ||
113 | pr_err("modem_irq: Could not allocate device\n"); | ||
114 | return -ENOMEM; | ||
115 | } | ||
116 | |||
117 | mi->modem_intcon_base = | ||
118 | ioremap(MODEM_INTCON_BASE_ADDR, MODEM_INTCON_SIZE); | ||
119 | pr_debug("modem_irq: ioremapped modem_intcon_base from " | ||
120 | "phy 0x%x to virt 0x%x\n", MODEM_INTCON_BASE_ADDR, | ||
121 | (u32)mi->modem_intcon_base); | ||
122 | |||
123 | setup_modem_intcon(mi->modem_intcon_base); | ||
124 | |||
125 | modem_irq_chip = dummy_irq_chip; | ||
126 | modem_irq_chip.name = "modem_irq"; | ||
127 | |||
128 | /* Create the virtual IRQ:s needed */ | ||
129 | create_virtual_irq(MBOX_PAIR0_VIRT_IRQ, &modem_irq_chip); | ||
130 | create_virtual_irq(MBOX_PAIR1_VIRT_IRQ, &modem_irq_chip); | ||
131 | create_virtual_irq(MBOX_PAIR2_VIRT_IRQ, &modem_irq_chip); | ||
132 | |||
133 | err = request_threaded_irq(IRQ_DB5500_MODEM, NULL, | ||
134 | modem_cpu_irq_handler, IRQF_ONESHOT, | ||
135 | "modem_irq", mi); | ||
136 | if (err) | ||
137 | pr_err("modem_irq: Could not register IRQ %d\n", | ||
138 | IRQ_DB5500_MODEM); | ||
139 | |||
140 | return 0; | ||
141 | } | ||
142 | |||
143 | arch_initcall(modem_irq_init); | ||
diff --git a/arch/arm/mach-ux500/pins-db5500.h b/arch/arm/mach-ux500/pins-db5500.h deleted file mode 100644 index bf50c21fe69..00000000000 --- a/arch/arm/mach-ux500/pins-db5500.h +++ /dev/null | |||
@@ -1,620 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * | ||
4 | * License terms: GNU General Public License, version 2 | ||
5 | * Author: Rabin Vincent <rabin.vincent@stericsson.com> | ||
6 | */ | ||
7 | |||
8 | #ifndef __MACH_DB5500_PINS_H | ||
9 | #define __MACH_DB5500_PINS_H | ||
10 | |||
11 | #define GPIO0_GPIO PIN_CFG(0, GPIO) | ||
12 | #define GPIO0_SM_CS3n PIN_CFG(0, ALT_A) | ||
13 | |||
14 | #define GPIO1_GPIO PIN_CFG(1, GPIO) | ||
15 | #define GPIO1_SM_A3 PIN_CFG(1, ALT_A) | ||
16 | |||
17 | #define GPIO2_GPIO PIN_CFG(2, GPIO) | ||
18 | #define GPIO2_SM_A4 PIN_CFG(2, ALT_A) | ||
19 | #define GPIO2_SM_AVD PIN_CFG(2, ALT_B) | ||
20 | |||
21 | #define GPIO3_GPIO PIN_CFG(3, GPIO) | ||
22 | #define GPIO3_I2C1_SCL PIN_CFG(3, ALT_A) | ||
23 | |||
24 | #define GPIO4_GPIO PIN_CFG(4, GPIO) | ||
25 | #define GPIO4_I2C1_SDA PIN_CFG(4, ALT_A) | ||
26 | |||
27 | #define GPIO5_GPIO PIN_CFG(5, GPIO) | ||
28 | #define GPIO5_MC0_DAT0 PIN_CFG(5, ALT_A) | ||
29 | #define GPIO5_SM_ADQ8 PIN_CFG(5, ALT_B) | ||
30 | |||
31 | #define GPIO6_GPIO PIN_CFG(6, GPIO) | ||
32 | #define GPIO6_MC0_DAT1 PIN_CFG(6, ALT_A) | ||
33 | #define GPIO6_SM_ADQ0 PIN_CFG(6, ALT_B) | ||
34 | |||
35 | #define GPIO7_GPIO PIN_CFG(7, GPIO) | ||
36 | #define GPIO7_MC0_DAT2 PIN_CFG(7, ALT_A) | ||
37 | #define GPIO7_SM_ADQ9 PIN_CFG(7, ALT_B) | ||
38 | |||
39 | #define GPIO8_GPIO PIN_CFG(8, GPIO) | ||
40 | #define GPIO8_MC0_DAT3 PIN_CFG(8, ALT_A) | ||
41 | #define GPIO8_SM_ADQ1 PIN_CFG(8, ALT_B) | ||
42 | |||
43 | #define GPIO9_GPIO PIN_CFG(9, GPIO) | ||
44 | #define GPIO9_MC0_DAT4 PIN_CFG(9, ALT_A) | ||
45 | #define GPIO9_SM_ADQ10 PIN_CFG(9, ALT_B) | ||
46 | |||
47 | #define GPIO10_GPIO PIN_CFG(10, GPIO) | ||
48 | #define GPIO10_MC0_DAT5 PIN_CFG(10, ALT_A) | ||
49 | #define GPIO10_SM_ADQ2 PIN_CFG(10, ALT_B) | ||
50 | |||
51 | #define GPIO11_GPIO PIN_CFG(11, GPIO) | ||
52 | #define GPIO11_MC0_DAT6 PIN_CFG(11, ALT_A) | ||
53 | #define GPIO11_SM_ADQ11 PIN_CFG(11, ALT_B) | ||
54 | |||
55 | #define GPIO12_GPIO PIN_CFG(12, GPIO) | ||
56 | #define GPIO12_MC0_DAT7 PIN_CFG(12, ALT_A) | ||
57 | #define GPIO12_SM_ADQ3 PIN_CFG(12, ALT_B) | ||
58 | |||
59 | #define GPIO13_GPIO PIN_CFG(13, GPIO) | ||
60 | #define GPIO13_MC0_CMD PIN_CFG(13, ALT_A) | ||
61 | #define GPIO13_SM_BUSY0n PIN_CFG(13, ALT_B) | ||
62 | #define GPIO13_SM_WAIT0n PIN_CFG(13, ALT_C) | ||
63 | |||
64 | #define GPIO14_GPIO PIN_CFG(14, GPIO) | ||
65 | #define GPIO14_MC0_CLK PIN_CFG(14, ALT_A) | ||
66 | #define GPIO14_SM_CS1n PIN_CFG(14, ALT_B) | ||
67 | #define GPIO14_SM_CKO PIN_CFG(14, ALT_C) | ||
68 | |||
69 | #define GPIO15_GPIO PIN_CFG(15, GPIO) | ||
70 | #define GPIO15_SM_A5 PIN_CFG(15, ALT_A) | ||
71 | #define GPIO15_SM_CLE PIN_CFG(15, ALT_B) | ||
72 | |||
73 | #define GPIO16_GPIO PIN_CFG(16, GPIO) | ||
74 | #define GPIO16_MC2_CMD PIN_CFG(16, ALT_A) | ||
75 | #define GPIO16_SM_OEn PIN_CFG(16, ALT_B) | ||
76 | |||
77 | #define GPIO17_GPIO PIN_CFG(17, GPIO) | ||
78 | #define GPIO17_MC2_CLK PIN_CFG(17, ALT_A) | ||
79 | #define GPIO17_SM_WEn PIN_CFG(17, ALT_B) | ||
80 | |||
81 | #define GPIO18_GPIO PIN_CFG(18, GPIO) | ||
82 | #define GPIO18_SM_A6 PIN_CFG(18, ALT_A) | ||
83 | #define GPIO18_SM_ALE PIN_CFG(18, ALT_B) | ||
84 | #define GPIO18_SM_AVDn PIN_CFG(18, ALT_C) | ||
85 | |||
86 | #define GPIO19_GPIO PIN_CFG(19, GPIO) | ||
87 | #define GPIO19_MC2_DAT1 PIN_CFG(19, ALT_A) | ||
88 | #define GPIO19_SM_ADQ4 PIN_CFG(19, ALT_B) | ||
89 | |||
90 | #define GPIO20_GPIO PIN_CFG(20, GPIO) | ||
91 | #define GPIO20_MC2_DAT3 PIN_CFG(20, ALT_A) | ||
92 | #define GPIO20_SM_ADQ5 PIN_CFG(20, ALT_B) | ||
93 | |||
94 | #define GPIO21_GPIO PIN_CFG(21, GPIO) | ||
95 | #define GPIO21_MC2_DAT5 PIN_CFG(21, ALT_A) | ||
96 | #define GPIO21_SM_ADQ6 PIN_CFG(21, ALT_B) | ||
97 | |||
98 | #define GPIO22_GPIO PIN_CFG(22, GPIO) | ||
99 | #define GPIO22_MC2_DAT7 PIN_CFG(22, ALT_A) | ||
100 | #define GPIO22_SM_ADQ7 PIN_CFG(22, ALT_B) | ||
101 | |||
102 | #define GPIO23_GPIO PIN_CFG(23, GPIO) | ||
103 | #define GPIO23_MC2_DAT0 PIN_CFG(23, ALT_A) | ||
104 | #define GPIO23_SM_ADQ12 PIN_CFG(23, ALT_B) | ||
105 | #define GPIO23_MC0_DAT1 PIN_CFG(23, ALT_C) | ||
106 | |||
107 | #define GPIO24_GPIO PIN_CFG(24, GPIO) | ||
108 | #define GPIO24_MC2_DAT2 PIN_CFG(24, ALT_A) | ||
109 | #define GPIO24_SM_ADQ13 PIN_CFG(24, ALT_B) | ||
110 | #define GPIO24_MC0_DAT3 PIN_CFG(24, ALT_C) | ||
111 | |||
112 | #define GPIO25_GPIO PIN_CFG(25, GPIO) | ||
113 | #define GPIO25_MC2_DAT4 PIN_CFG(25, ALT_A) | ||
114 | #define GPIO25_SM_ADQ14 PIN_CFG(25, ALT_B) | ||
115 | #define GPIO25_MC0_CMD PIN_CFG(25, ALT_C) | ||
116 | |||
117 | #define GPIO26_GPIO PIN_CFG(26, GPIO) | ||
118 | #define GPIO26_MC2_DAT6 PIN_CFG(26, ALT_A) | ||
119 | #define GPIO26_SM_ADQ15 PIN_CFG(26, ALT_B) | ||
120 | |||
121 | #define GPIO27_GPIO PIN_CFG(27, GPIO) | ||
122 | #define GPIO27_SM_CS0n PIN_CFG(27, ALT_A) | ||
123 | #define GPIO27_SM_PS0n PIN_CFG(27, ALT_B) | ||
124 | |||
125 | #define GPIO28_GPIO PIN_CFG(28, GPIO) | ||
126 | #define GPIO28_U0_TXD PIN_CFG(28, ALT_A) | ||
127 | #define GPIO28_SM_A0 PIN_CFG(28, ALT_B) | ||
128 | |||
129 | #define GPIO29_GPIO PIN_CFG(29, GPIO) | ||
130 | #define GPIO29_U0_RXD PIN_CFG(29, ALT_A) | ||
131 | #define GPIO29_SM_A1 PIN_CFG(29, ALT_B) | ||
132 | #define GPIO29_PWM_0 PIN_CFG(29, ALT_C) | ||
133 | |||
134 | #define GPIO30_GPIO PIN_CFG(30, GPIO) | ||
135 | #define GPIO30_MC0_DAT5 PIN_CFG(30, ALT_A) | ||
136 | #define GPIO30_SM_A2 PIN_CFG(30, ALT_B) | ||
137 | #define GPIO30_PWM_1 PIN_CFG(30, ALT_C) | ||
138 | |||
139 | #define GPIO31_GPIO PIN_CFG(31, GPIO) | ||
140 | #define GPIO31_MC0_DAT7 PIN_CFG(31, ALT_A) | ||
141 | #define GPIO31_SM_CS2n PIN_CFG(31, ALT_B) | ||
142 | #define GPIO31_PWM_2 PIN_CFG(31, ALT_C) | ||
143 | |||
144 | #define GPIO32_GPIO PIN_CFG(32, GPIO) | ||
145 | #define GPIO32_MSP0_TCK PIN_CFG(32, ALT_A) | ||
146 | #define GPIO32_ACCI2S0_SCK PIN_CFG(32, ALT_B) | ||
147 | |||
148 | #define GPIO33_GPIO PIN_CFG(33, GPIO) | ||
149 | #define GPIO33_MSP0_TFS PIN_CFG(33, ALT_A) | ||
150 | #define GPIO33_ACCI2S0_WS PIN_CFG(33, ALT_B) | ||
151 | |||
152 | #define GPIO34_GPIO PIN_CFG(34, GPIO) | ||
153 | #define GPIO34_MSP0_TXD PIN_CFG(34, ALT_A) | ||
154 | #define GPIO34_ACCI2S0_DLD PIN_CFG(34, ALT_B) | ||
155 | |||
156 | #define GPIO35_GPIO PIN_CFG(35, GPIO) | ||
157 | #define GPIO35_MSP0_RXD PIN_CFG(35, ALT_A) | ||
158 | #define GPIO35_ACCI2S0_ULD PIN_CFG(35, ALT_B) | ||
159 | |||
160 | #define GPIO64_GPIO PIN_CFG(64, GPIO) | ||
161 | #define GPIO64_USB_DAT0 PIN_CFG(64, ALT_A) | ||
162 | #define GPIO64_U0_TXD PIN_CFG(64, ALT_B) | ||
163 | |||
164 | #define GPIO65_GPIO PIN_CFG(65, GPIO) | ||
165 | #define GPIO65_USB_DAT1 PIN_CFG(65, ALT_A) | ||
166 | #define GPIO65_U0_RXD PIN_CFG(65, ALT_B) | ||
167 | |||
168 | #define GPIO66_GPIO PIN_CFG(66, GPIO) | ||
169 | #define GPIO66_USB_DAT2 PIN_CFG(66, ALT_A) | ||
170 | |||
171 | #define GPIO67_GPIO PIN_CFG(67, GPIO) | ||
172 | #define GPIO67_USB_DAT3 PIN_CFG(67, ALT_A) | ||
173 | |||
174 | #define GPIO68_GPIO PIN_CFG(68, GPIO) | ||
175 | #define GPIO68_USB_DAT4 PIN_CFG(68, ALT_A) | ||
176 | |||
177 | #define GPIO69_GPIO PIN_CFG(69, GPIO) | ||
178 | #define GPIO69_USB_DAT5 PIN_CFG(69, ALT_A) | ||
179 | |||
180 | #define GPIO70_GPIO PIN_CFG(70, GPIO) | ||
181 | #define GPIO70_USB_DAT6 PIN_CFG(70, ALT_A) | ||
182 | |||
183 | #define GPIO71_GPIO PIN_CFG(71, GPIO) | ||
184 | #define GPIO71_USB_DAT7 PIN_CFG(71, ALT_A) | ||
185 | |||
186 | #define GPIO72_GPIO PIN_CFG(72, GPIO) | ||
187 | #define GPIO72_USB_STP PIN_CFG(72, ALT_A) | ||
188 | |||
189 | #define GPIO73_GPIO PIN_CFG(73, GPIO) | ||
190 | #define GPIO73_USB_DIR PIN_CFG(73, ALT_A) | ||
191 | |||
192 | #define GPIO74_GPIO PIN_CFG(74, GPIO) | ||
193 | #define GPIO74_USB_NXT PIN_CFG(74, ALT_A) | ||
194 | |||
195 | #define GPIO75_GPIO PIN_CFG(75, GPIO) | ||
196 | #define GPIO75_USB_XCLK PIN_CFG(75, ALT_A) | ||
197 | |||
198 | #define GPIO76_GPIO PIN_CFG(76, GPIO) | ||
199 | |||
200 | #define GPIO77_GPIO PIN_CFG(77, GPIO) | ||
201 | #define GPIO77_ACCTX_ON PIN_CFG(77, ALT_A) | ||
202 | |||
203 | #define GPIO78_GPIO PIN_CFG(78, GPIO) | ||
204 | #define GPIO78_IRQn PIN_CFG(78, ALT_A) | ||
205 | |||
206 | #define GPIO79_GPIO PIN_CFG(79, GPIO) | ||
207 | #define GPIO79_ACCSIM_Clk PIN_CFG(79, ALT_A) | ||
208 | |||
209 | #define GPIO80_GPIO PIN_CFG(80, GPIO) | ||
210 | #define GPIO80_ACCSIM_Da PIN_CFG(80, ALT_A) | ||
211 | |||
212 | #define GPIO81_GPIO PIN_CFG(81, GPIO) | ||
213 | #define GPIO81_ACCSIM_Reset PIN_CFG(81, ALT_A) | ||
214 | |||
215 | #define GPIO82_GPIO PIN_CFG(82, GPIO) | ||
216 | #define GPIO82_ACCSIM_DDir PIN_CFG(82, ALT_A) | ||
217 | |||
218 | #define GPIO96_GPIO PIN_CFG(96, GPIO) | ||
219 | #define GPIO96_MSP1_TCK PIN_CFG(96, ALT_A) | ||
220 | #define GPIO96_PRCMU_DEBUG3 PIN_CFG(96, ALT_B) | ||
221 | #define GPIO96_PRCMU_DEBUG7 PIN_CFG(96, ALT_C) | ||
222 | |||
223 | #define GPIO97_GPIO PIN_CFG(97, GPIO) | ||
224 | #define GPIO97_MSP1_TFS PIN_CFG(97, ALT_A) | ||
225 | #define GPIO97_PRCMU_DEBUG2 PIN_CFG(97, ALT_B) | ||
226 | #define GPIO97_PRCMU_DEBUG6 PIN_CFG(97, ALT_C) | ||
227 | |||
228 | #define GPIO98_GPIO PIN_CFG(98, GPIO) | ||
229 | #define GPIO98_MSP1_TXD PIN_CFG(98, ALT_A) | ||
230 | #define GPIO98_PRCMU_DEBUG1 PIN_CFG(98, ALT_B) | ||
231 | #define GPIO98_PRCMU_DEBUG5 PIN_CFG(98, ALT_C) | ||
232 | |||
233 | #define GPIO99_GPIO PIN_CFG(99, GPIO) | ||
234 | #define GPIO99_MSP1_RXD PIN_CFG(99, ALT_A) | ||
235 | #define GPIO99_PRCMU_DEBUG0 PIN_CFG(99, ALT_B) | ||
236 | #define GPIO99_PRCMU_DEBUG4 PIN_CFG(99, ALT_C) | ||
237 | |||
238 | #define GPIO100_GPIO PIN_CFG(100, GPIO) | ||
239 | #define GPIO100_I2C0_SCL PIN_CFG(100, ALT_A) | ||
240 | |||
241 | #define GPIO101_GPIO PIN_CFG(101, GPIO) | ||
242 | #define GPIO101_I2C0_SDA PIN_CFG(101, ALT_A) | ||
243 | |||
244 | #define GPIO128_GPIO PIN_CFG(128, GPIO) | ||
245 | #define GPIO128_KP_I0 PIN_CFG(128, ALT_A) | ||
246 | #define GPIO128_BUSMON_D0 PIN_CFG(128, ALT_B) | ||
247 | |||
248 | #define GPIO129_GPIO PIN_CFG(129, GPIO) | ||
249 | #define GPIO129_KP_O0 PIN_CFG(129, ALT_A) | ||
250 | #define GPIO129_BUSMON_D1 PIN_CFG(129, ALT_B) | ||
251 | |||
252 | #define GPIO130_GPIO PIN_CFG(130, GPIO) | ||
253 | #define GPIO130_KP_I1 PIN_CFG(130, ALT_A) | ||
254 | #define GPIO130_BUSMON_D2 PIN_CFG(130, ALT_B) | ||
255 | |||
256 | #define GPIO131_GPIO PIN_CFG(131, GPIO) | ||
257 | #define GPIO131_KP_O1 PIN_CFG(131, ALT_A) | ||
258 | #define GPIO131_BUSMON_D3 PIN_CFG(131, ALT_B) | ||
259 | |||
260 | #define GPIO132_GPIO PIN_CFG(132, GPIO) | ||
261 | #define GPIO132_KP_I2 PIN_CFG(132, ALT_A) | ||
262 | #define GPIO132_ETM_D15 PIN_CFG(132, ALT_B) | ||
263 | #define GPIO132_STMAPE_CLK PIN_CFG(132, ALT_C) | ||
264 | |||
265 | #define GPIO133_GPIO PIN_CFG(133, GPIO) | ||
266 | #define GPIO133_KP_O2 PIN_CFG(133, ALT_A) | ||
267 | #define GPIO133_ETM_D14 PIN_CFG(133, ALT_B) | ||
268 | #define GPIO133_U0_RXD PIN_CFG(133, ALT_C) | ||
269 | |||
270 | #define GPIO134_GPIO PIN_CFG(134, GPIO) | ||
271 | #define GPIO134_KP_I3 PIN_CFG(134, ALT_A) | ||
272 | #define GPIO134_ETM_D13 PIN_CFG(134, ALT_B) | ||
273 | #define GPIO134_STMAPE_DAT0 PIN_CFG(134, ALT_C) | ||
274 | |||
275 | #define GPIO135_GPIO PIN_CFG(135, GPIO) | ||
276 | #define GPIO135_KP_O3 PIN_CFG(135, ALT_A) | ||
277 | #define GPIO135_ETM_D12 PIN_CFG(135, ALT_B) | ||
278 | #define GPIO135_STMAPE_DAT1 PIN_CFG(135, ALT_C) | ||
279 | |||
280 | #define GPIO136_GPIO PIN_CFG(136, GPIO) | ||
281 | #define GPIO136_KP_I4 PIN_CFG(136, ALT_A) | ||
282 | #define GPIO136_ETM_D11 PIN_CFG(136, ALT_B) | ||
283 | #define GPIO136_STMAPE_DAT2 PIN_CFG(136, ALT_C) | ||
284 | |||
285 | #define GPIO137_GPIO PIN_CFG(137, GPIO) | ||
286 | #define GPIO137_KP_O4 PIN_CFG(137, ALT_A) | ||
287 | #define GPIO137_ETM_D10 PIN_CFG(137, ALT_B) | ||
288 | #define GPIO137_STMAPE_DAT3 PIN_CFG(137, ALT_C) | ||
289 | |||
290 | #define GPIO138_GPIO PIN_CFG(138, GPIO) | ||
291 | #define GPIO138_KP_I5 PIN_CFG(138, ALT_A) | ||
292 | #define GPIO138_ETM_D9 PIN_CFG(138, ALT_B) | ||
293 | #define GPIO138_U0_TXD PIN_CFG(138, ALT_C) | ||
294 | |||
295 | #define GPIO139_GPIO PIN_CFG(139, GPIO) | ||
296 | #define GPIO139_KP_O5 PIN_CFG(139, ALT_A) | ||
297 | #define GPIO139_ETM_D8 PIN_CFG(139, ALT_B) | ||
298 | #define GPIO139_BUSMON_D11 PIN_CFG(139, ALT_C) | ||
299 | |||
300 | #define GPIO140_GPIO PIN_CFG(140, GPIO) | ||
301 | #define GPIO140_KP_I6 PIN_CFG(140, ALT_A) | ||
302 | #define GPIO140_ETM_D7 PIN_CFG(140, ALT_B) | ||
303 | #define GPIO140_STMAPE_CLK PIN_CFG(140, ALT_C) | ||
304 | |||
305 | #define GPIO141_GPIO PIN_CFG(141, GPIO) | ||
306 | #define GPIO141_KP_O6 PIN_CFG(141, ALT_A) | ||
307 | #define GPIO141_ETM_D6 PIN_CFG(141, ALT_B) | ||
308 | #define GPIO141_U0_RXD PIN_CFG(141, ALT_C) | ||
309 | |||
310 | #define GPIO142_GPIO PIN_CFG(142, GPIO) | ||
311 | #define GPIO142_KP_I7 PIN_CFG(142, ALT_A) | ||
312 | #define GPIO142_ETM_D5 PIN_CFG(142, ALT_B) | ||
313 | #define GPIO142_STMAPE_DAT0 PIN_CFG(142, ALT_C) | ||
314 | |||
315 | #define GPIO143_GPIO PIN_CFG(143, GPIO) | ||
316 | #define GPIO143_KP_O7 PIN_CFG(143, ALT_A) | ||
317 | #define GPIO143_ETM_D4 PIN_CFG(143, ALT_B) | ||
318 | #define GPIO143_STMAPE_DAT1 PIN_CFG(143, ALT_C) | ||
319 | |||
320 | #define GPIO144_GPIO PIN_CFG(144, GPIO) | ||
321 | #define GPIO144_I2C3_SCL PIN_CFG(144, ALT_A) | ||
322 | #define GPIO144_ETM_D3 PIN_CFG(144, ALT_B) | ||
323 | #define GPIO144_STMAPE_DAT2 PIN_CFG(144, ALT_C) | ||
324 | |||
325 | #define GPIO145_GPIO PIN_CFG(145, GPIO) | ||
326 | #define GPIO145_I2C3_SDA PIN_CFG(145, ALT_A) | ||
327 | #define GPIO145_ETM_D2 PIN_CFG(145, ALT_B) | ||
328 | #define GPIO145_STMAPE_DAT3 PIN_CFG(145, ALT_C) | ||
329 | |||
330 | #define GPIO146_GPIO PIN_CFG(146, GPIO) | ||
331 | #define GPIO146_PWM_0 PIN_CFG(146, ALT_A) | ||
332 | #define GPIO146_ETM_D1 PIN_CFG(146, ALT_B) | ||
333 | |||
334 | #define GPIO147_GPIO PIN_CFG(147, GPIO) | ||
335 | #define GPIO147_PWM_1 PIN_CFG(147, ALT_A) | ||
336 | #define GPIO147_ETM_D0 PIN_CFG(147, ALT_B) | ||
337 | |||
338 | #define GPIO148_GPIO PIN_CFG(148, GPIO) | ||
339 | #define GPIO148_PWM_2 PIN_CFG(148, ALT_A) | ||
340 | #define GPIO148_ETM_CLK PIN_CFG(148, ALT_B) | ||
341 | |||
342 | #define GPIO160_GPIO PIN_CFG(160, GPIO) | ||
343 | #define GPIO160_CLKOUT_REQn PIN_CFG(160, ALT_A) | ||
344 | |||
345 | #define GPIO161_GPIO PIN_CFG(161, GPIO) | ||
346 | #define GPIO161_CLKOUT_0 PIN_CFG(161, ALT_A) | ||
347 | |||
348 | #define GPIO162_GPIO PIN_CFG(162, GPIO) | ||
349 | #define GPIO162_CLKOUT_1 PIN_CFG(162, ALT_A) | ||
350 | |||
351 | #define GPIO163_GPIO PIN_CFG(163, GPIO) | ||
352 | |||
353 | #define GPIO164_GPIO PIN_CFG(164, GPIO) | ||
354 | #define GPIO164_GPS_START PIN_CFG(164, ALT_A) | ||
355 | |||
356 | #define GPIO165_GPIO PIN_CFG(165, GPIO) | ||
357 | #define GPIO165_SPI1_CS2n PIN_CFG(165, ALT_A) | ||
358 | #define GPIO165_U3_RXD PIN_CFG(165, ALT_B) | ||
359 | #define GPIO165_BUSMON_D20 PIN_CFG(165, ALT_C) | ||
360 | |||
361 | #define GPIO166_GPIO PIN_CFG(166, GPIO) | ||
362 | #define GPIO166_SPI1_CS1n PIN_CFG(166, ALT_A) | ||
363 | #define GPIO166_U3_TXD PIN_CFG(166, ALT_B) | ||
364 | #define GPIO166_BUSMON_D21 PIN_CFG(166, ALT_C) | ||
365 | |||
366 | #define GPIO167_GPIO PIN_CFG(167, GPIO) | ||
367 | #define GPIO167_SPI1_CS0n PIN_CFG(167, ALT_A) | ||
368 | #define GPIO167_U3_RTSn PIN_CFG(167, ALT_B) | ||
369 | #define GPIO167_BUSMON_D22 PIN_CFG(167, ALT_C) | ||
370 | |||
371 | #define GPIO168_GPIO PIN_CFG(168, GPIO) | ||
372 | #define GPIO168_SPI1_RXD PIN_CFG(168, ALT_A) | ||
373 | #define GPIO168_U3_CTSn PIN_CFG(168, ALT_B) | ||
374 | #define GPIO168_BUSMON_D23 PIN_CFG(168, ALT_C) | ||
375 | |||
376 | #define GPIO169_GPIO PIN_CFG(169, GPIO) | ||
377 | #define GPIO169_SPI1_TXD PIN_CFG(169, ALT_A) | ||
378 | #define GPIO169_DDR_RC PIN_CFG(169, ALT_B) | ||
379 | #define GPIO169_BUSMON_D24 PIN_CFG(169, ALT_C) | ||
380 | |||
381 | #define GPIO170_GPIO PIN_CFG(170, GPIO) | ||
382 | #define GPIO170_SPI1_CLK PIN_CFG(170, ALT_A) | ||
383 | |||
384 | #define GPIO171_GPIO PIN_CFG(171, GPIO) | ||
385 | #define GPIO171_MC3_DAT0 PIN_CFG(171, ALT_A) | ||
386 | #define GPIO171_SPI3_RXD PIN_CFG(171, ALT_B) | ||
387 | #define GPIO171_BUSMON_D25 PIN_CFG(171, ALT_C) | ||
388 | |||
389 | #define GPIO172_GPIO PIN_CFG(172, GPIO) | ||
390 | #define GPIO172_MC3_DAT1 PIN_CFG(172, ALT_A) | ||
391 | #define GPIO172_SPI3_CS1n PIN_CFG(172, ALT_B) | ||
392 | #define GPIO172_BUSMON_D26 PIN_CFG(172, ALT_C) | ||
393 | |||
394 | #define GPIO173_GPIO PIN_CFG(173, GPIO) | ||
395 | #define GPIO173_MC3_DAT2 PIN_CFG(173, ALT_A) | ||
396 | #define GPIO173_SPI3_CS2n PIN_CFG(173, ALT_B) | ||
397 | #define GPIO173_BUSMON_D27 PIN_CFG(173, ALT_C) | ||
398 | |||
399 | #define GPIO174_GPIO PIN_CFG(174, GPIO) | ||
400 | #define GPIO174_MC3_DAT3 PIN_CFG(174, ALT_A) | ||
401 | #define GPIO174_SPI3_CS0n PIN_CFG(174, ALT_B) | ||
402 | #define GPIO174_BUSMON_D28 PIN_CFG(174, ALT_C) | ||
403 | |||
404 | #define GPIO175_GPIO PIN_CFG(175, GPIO) | ||
405 | #define GPIO175_MC3_CMD PIN_CFG(175, ALT_A) | ||
406 | #define GPIO175_SPI3_TXD PIN_CFG(175, ALT_B) | ||
407 | #define GPIO175_BUSMON_D29 PIN_CFG(175, ALT_C) | ||
408 | |||
409 | #define GPIO176_GPIO PIN_CFG(176, GPIO) | ||
410 | #define GPIO176_MC3_CLK PIN_CFG(176, ALT_A) | ||
411 | #define GPIO176_SPI3_CLK PIN_CFG(176, ALT_B) | ||
412 | |||
413 | #define GPIO177_GPIO PIN_CFG(177, GPIO) | ||
414 | #define GPIO177_U2_RXD PIN_CFG(177, ALT_A) | ||
415 | #define GPIO177_I2C3_SCL PIN_CFG(177, ALT_B) | ||
416 | #define GPIO177_BUSMON_D30 PIN_CFG(177, ALT_C) | ||
417 | |||
418 | #define GPIO178_GPIO PIN_CFG(178, GPIO) | ||
419 | #define GPIO178_U2_TXD PIN_CFG(178, ALT_A) | ||
420 | #define GPIO178_I2C3_SDA PIN_CFG(178, ALT_B) | ||
421 | #define GPIO178_BUSMON_D31 PIN_CFG(178, ALT_C) | ||
422 | |||
423 | #define GPIO179_GPIO PIN_CFG(179, GPIO) | ||
424 | #define GPIO179_U2_CTSn PIN_CFG(179, ALT_A) | ||
425 | #define GPIO179_U3_RXD PIN_CFG(179, ALT_B) | ||
426 | #define GPIO179_BUSMON_D32 PIN_CFG(179, ALT_C) | ||
427 | |||
428 | #define GPIO180_GPIO PIN_CFG(180, GPIO) | ||
429 | #define GPIO180_U2_RTSn PIN_CFG(180, ALT_A) | ||
430 | #define GPIO180_U3_TXD PIN_CFG(180, ALT_B) | ||
431 | #define GPIO180_BUSMON_D33 PIN_CFG(180, ALT_C) | ||
432 | |||
433 | #define GPIO185_GPIO PIN_CFG(185, GPIO) | ||
434 | #define GPIO185_SPI3_CS2n PIN_CFG(185, ALT_A) | ||
435 | #define GPIO185_MC4_DAT0 PIN_CFG(185, ALT_B) | ||
436 | |||
437 | #define GPIO186_GPIO PIN_CFG(186, GPIO) | ||
438 | #define GPIO186_SPI3_CS1n PIN_CFG(186, ALT_A) | ||
439 | #define GPIO186_MC4_DAT1 PIN_CFG(186, ALT_B) | ||
440 | |||
441 | #define GPIO187_GPIO PIN_CFG(187, GPIO) | ||
442 | #define GPIO187_SPI3_CS0n PIN_CFG(187, ALT_A) | ||
443 | #define GPIO187_MC4_DAT2 PIN_CFG(187, ALT_B) | ||
444 | |||
445 | #define GPIO188_GPIO PIN_CFG(188, GPIO) | ||
446 | #define GPIO188_SPI3_RXD PIN_CFG(188, ALT_A) | ||
447 | #define GPIO188_MC4_DAT3 PIN_CFG(188, ALT_B) | ||
448 | |||
449 | #define GPIO189_GPIO PIN_CFG(189, GPIO) | ||
450 | #define GPIO189_SPI3_TXD PIN_CFG(189, ALT_A) | ||
451 | #define GPIO189_MC4_CMD PIN_CFG(189, ALT_B) | ||
452 | |||
453 | #define GPIO190_GPIO PIN_CFG(190, GPIO) | ||
454 | #define GPIO190_SPI3_CLK PIN_CFG(190, ALT_A) | ||
455 | #define GPIO190_MC4_CLK PIN_CFG(190, ALT_B) | ||
456 | |||
457 | #define GPIO191_GPIO PIN_CFG(191, GPIO) | ||
458 | #define GPIO191_MC1_DAT0 PIN_CFG(191, ALT_A) | ||
459 | #define GPIO191_MC4_DAT4 PIN_CFG(191, ALT_B) | ||
460 | #define GPIO191_STMAPE_DAT0 PIN_CFG(191, ALT_C) | ||
461 | |||
462 | #define GPIO192_GPIO PIN_CFG(192, GPIO) | ||
463 | #define GPIO192_MC1_DAT1 PIN_CFG(192, ALT_A) | ||
464 | #define GPIO192_MC4_DAT5 PIN_CFG(192, ALT_B) | ||
465 | #define GPIO192_STMAPE_DAT1 PIN_CFG(192, ALT_C) | ||
466 | |||
467 | #define GPIO193_GPIO PIN_CFG(193, GPIO) | ||
468 | #define GPIO193_MC1_DAT2 PIN_CFG(193, ALT_A) | ||
469 | #define GPIO193_MC4_DAT6 PIN_CFG(193, ALT_B) | ||
470 | #define GPIO193_STMAPE_DAT2 PIN_CFG(193, ALT_C) | ||
471 | |||
472 | #define GPIO194_GPIO PIN_CFG(194, GPIO) | ||
473 | #define GPIO194_MC1_DAT3 PIN_CFG(194, ALT_A) | ||
474 | #define GPIO194_MC4_DAT7 PIN_CFG(194, ALT_B) | ||
475 | #define GPIO194_STMAPE_DAT3 PIN_CFG(194, ALT_C) | ||
476 | |||
477 | #define GPIO195_GPIO PIN_CFG(195, GPIO) | ||
478 | #define GPIO195_MC1_CLK PIN_CFG(195, ALT_A) | ||
479 | #define GPIO195_STMAPE_CLK PIN_CFG(195, ALT_B) | ||
480 | #define GPIO195_BUSMON_CLK PIN_CFG(195, ALT_C) | ||
481 | |||
482 | #define GPIO196_GPIO PIN_CFG(196, GPIO) | ||
483 | #define GPIO196_MC1_CMD PIN_CFG(196, ALT_A) | ||
484 | #define GPIO196_U0_RXD PIN_CFG(196, ALT_B) | ||
485 | #define GPIO196_BUSMON_D38 PIN_CFG(196, ALT_C) | ||
486 | |||
487 | #define GPIO197_GPIO PIN_CFG(197, GPIO) | ||
488 | #define GPIO197_MC1_CMDDIR PIN_CFG(197, ALT_A) | ||
489 | #define GPIO197_BUSMON_D39 PIN_CFG(197, ALT_B) | ||
490 | |||
491 | #define GPIO198_GPIO PIN_CFG(198, GPIO) | ||
492 | #define GPIO198_MC1_FBCLK PIN_CFG(198, ALT_A) | ||
493 | |||
494 | #define GPIO199_GPIO PIN_CFG(199, GPIO) | ||
495 | #define GPIO199_MC1_DAT0DIR PIN_CFG(199, ALT_A) | ||
496 | #define GPIO199_BUSMON_D40 PIN_CFG(199, ALT_B) | ||
497 | |||
498 | #define GPIO200_GPIO PIN_CFG(200, GPIO) | ||
499 | #define GPIO200_U1_TXD PIN_CFG(200, ALT_A) | ||
500 | #define GPIO200_ACCU0_RTSn PIN_CFG(200, ALT_B) | ||
501 | |||
502 | #define GPIO201_GPIO PIN_CFG(201, GPIO) | ||
503 | #define GPIO201_U1_RXD PIN_CFG(201, ALT_A) | ||
504 | #define GPIO201_ACCU0_CTSn PIN_CFG(201, ALT_B) | ||
505 | |||
506 | #define GPIO202_GPIO PIN_CFG(202, GPIO) | ||
507 | #define GPIO202_U1_CTSn PIN_CFG(202, ALT_A) | ||
508 | #define GPIO202_ACCU0_RXD PIN_CFG(202, ALT_B) | ||
509 | |||
510 | #define GPIO203_GPIO PIN_CFG(203, GPIO) | ||
511 | #define GPIO203_U1_RTSn PIN_CFG(203, ALT_A) | ||
512 | #define GPIO203_ACCU0_TXD PIN_CFG(203, ALT_B) | ||
513 | |||
514 | #define GPIO204_GPIO PIN_CFG(204, GPIO) | ||
515 | #define GPIO204_SPI0_CS2n PIN_CFG(204, ALT_A) | ||
516 | #define GPIO204_ACCGPIO_000 PIN_CFG(204, ALT_B) | ||
517 | #define GPIO204_LCD_VSI1 PIN_CFG(204, ALT_C) | ||
518 | |||
519 | #define GPIO205_GPIO PIN_CFG(205, GPIO) | ||
520 | #define GPIO205_SPI0_CS1n PIN_CFG(205, ALT_A) | ||
521 | #define GPIO205_ACCGPIO_001 PIN_CFG(205, ALT_B) | ||
522 | #define GPIO205_LCD_D3 PIN_CFG(205, ALT_C) | ||
523 | |||
524 | #define GPIO206_GPIO PIN_CFG(206, GPIO) | ||
525 | #define GPIO206_SPI0_CS0n PIN_CFG(206, ALT_A) | ||
526 | #define GPIO206_ACCGPIO_002 PIN_CFG(206, ALT_B) | ||
527 | #define GPIO206_LCD_D2 PIN_CFG(206, ALT_C) | ||
528 | |||
529 | #define GPIO207_GPIO PIN_CFG(207, GPIO) | ||
530 | #define GPIO207_SPI0_RXD PIN_CFG(207, ALT_A) | ||
531 | #define GPIO207_ACCGPIO_003 PIN_CFG(207, ALT_B) | ||
532 | #define GPIO207_LCD_D1 PIN_CFG(207, ALT_C) | ||
533 | |||
534 | #define GPIO208_GPIO PIN_CFG(208, GPIO) | ||
535 | #define GPIO208_SPI0_TXD PIN_CFG(208, ALT_A) | ||
536 | #define GPIO208_ACCGPIO_004 PIN_CFG(208, ALT_B) | ||
537 | #define GPIO208_LCD_D0 PIN_CFG(208, ALT_C) | ||
538 | |||
539 | #define GPIO209_GPIO PIN_CFG(209, GPIO) | ||
540 | #define GPIO209_SPI0_CLK PIN_CFG(209, ALT_A) | ||
541 | #define GPIO209_ACCGPIO_005 PIN_CFG(209, ALT_B) | ||
542 | #define GPIO209_LCD_CLK PIN_CFG(209, ALT_C) | ||
543 | |||
544 | #define GPIO210_GPIO PIN_CFG(210, GPIO) | ||
545 | #define GPIO210_LCD_VSO PIN_CFG(210, ALT_A) | ||
546 | #define GPIO210_PRCMU_PWRCTRL1 PIN_CFG(210, ALT_B) | ||
547 | |||
548 | #define GPIO211_GPIO PIN_CFG(211, GPIO) | ||
549 | #define GPIO211_LCD_VSI0 PIN_CFG(211, ALT_A) | ||
550 | #define GPIO211_PRCMU_PWRCTRL2 PIN_CFG(211, ALT_B) | ||
551 | |||
552 | #define GPIO212_GPIO PIN_CFG(212, GPIO) | ||
553 | #define GPIO212_SPI2_CS2n PIN_CFG(212, ALT_A) | ||
554 | #define GPIO212_LCD_HSO PIN_CFG(212, ALT_B) | ||
555 | |||
556 | #define GPIO213_GPIO PIN_CFG(213, GPIO) | ||
557 | #define GPIO213_SPI2_CS1n PIN_CFG(213, ALT_A) | ||
558 | #define GPIO213_LCD_DE PIN_CFG(213, ALT_B) | ||
559 | #define GPIO213_BUSMON_D16 PIN_CFG(213, ALT_C) | ||
560 | |||
561 | #define GPIO214_GPIO PIN_CFG(214, GPIO) | ||
562 | #define GPIO214_SPI2_CS0n PIN_CFG(214, ALT_A) | ||
563 | #define GPIO214_LCD_D7 PIN_CFG(214, ALT_B) | ||
564 | #define GPIO214_BUSMON_D17 PIN_CFG(214, ALT_C) | ||
565 | |||
566 | #define GPIO215_GPIO PIN_CFG(215, GPIO) | ||
567 | #define GPIO215_SPI2_RXD PIN_CFG(215, ALT_A) | ||
568 | #define GPIO215_LCD_D6 PIN_CFG(215, ALT_B) | ||
569 | #define GPIO215_BUSMON_D18 PIN_CFG(215, ALT_C) | ||
570 | |||
571 | #define GPIO216_GPIO PIN_CFG(216, GPIO) | ||
572 | #define GPIO216_SPI2_CLK PIN_CFG(216, ALT_A) | ||
573 | #define GPIO216_LCD_D5 PIN_CFG(216, ALT_B) | ||
574 | |||
575 | #define GPIO217_GPIO PIN_CFG(217, GPIO) | ||
576 | #define GPIO217_SPI2_TXD PIN_CFG(217, ALT_A) | ||
577 | #define GPIO217_LCD_D4 PIN_CFG(217, ALT_B) | ||
578 | #define GPIO217_BUSMON_D19 PIN_CFG(217, ALT_C) | ||
579 | |||
580 | #define GPIO218_GPIO PIN_CFG(218, GPIO) | ||
581 | #define GPIO218_I2C2_SCL PIN_CFG(218, ALT_A) | ||
582 | #define GPIO218_LCD_VSO PIN_CFG(218, ALT_B) | ||
583 | |||
584 | #define GPIO219_GPIO PIN_CFG(219, GPIO) | ||
585 | #define GPIO219_I2C2_SDA PIN_CFG(219, ALT_A) | ||
586 | #define GPIO219_LCD_D3 PIN_CFG(219, ALT_B) | ||
587 | |||
588 | #define GPIO220_GPIO PIN_CFG(220, GPIO) | ||
589 | #define GPIO220_MSP2_TCK PIN_CFG(220, ALT_A) | ||
590 | #define GPIO220_LCD_D2 PIN_CFG(220, ALT_B) | ||
591 | |||
592 | #define GPIO221_GPIO PIN_CFG(221, GPIO) | ||
593 | #define GPIO221_MSP2_TFS PIN_CFG(221, ALT_A) | ||
594 | #define GPIO221_LCD_D1 PIN_CFG(221, ALT_B) | ||
595 | |||
596 | #define GPIO222_GPIO PIN_CFG(222, GPIO) | ||
597 | #define GPIO222_MSP2_TXD PIN_CFG(222, ALT_A) | ||
598 | #define GPIO222_LCD_D0 PIN_CFG(222, ALT_B) | ||
599 | |||
600 | #define GPIO223_GPIO PIN_CFG(223, GPIO) | ||
601 | #define GPIO223_MSP2_RXD PIN_CFG(223, ALT_A) | ||
602 | #define GPIO223_LCD_CLK PIN_CFG(223, ALT_B) | ||
603 | |||
604 | #define GPIO224_GPIO PIN_CFG(224, GPIO) | ||
605 | #define GPIO224_PRCMU_PWRCTRL0 PIN_CFG(224, ALT_A) | ||
606 | #define GPIO224_LCD_VSI1 PIN_CFG(224, ALT_B) | ||
607 | |||
608 | #define GPIO225_GPIO PIN_CFG(225, GPIO) | ||
609 | #define GPIO225_PRCMU_PWRCTRL1 PIN_CFG(225, ALT_A) | ||
610 | #define GPIO225_IRDA_RXD PIN_CFG(225, ALT_B) | ||
611 | |||
612 | #define GPIO226_GPIO PIN_CFG(226, GPIO) | ||
613 | #define GPIO226_PRCMU_PWRCTRL2 PIN_CFG(226, ALT_A) | ||
614 | #define GPIO226_IRRC_DAT PIN_CFG(226, ALT_B) | ||
615 | |||
616 | #define GPIO227_GPIO PIN_CFG(227, GPIO) | ||
617 | #define GPIO227_IRRC_DAT PIN_CFG(227, ALT_A) | ||
618 | #define GPIO227_IRDA_TXD PIN_CFG(227, ALT_B) | ||
619 | |||
620 | #endif | ||
diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c index eff5842f623..e8cd51aa61e 100644 --- a/arch/arm/mach-ux500/platsmp.c +++ b/arch/arm/mach-ux500/platsmp.c | |||
@@ -48,9 +48,7 @@ static void write_pen_release(int val) | |||
48 | 48 | ||
49 | static void __iomem *scu_base_addr(void) | 49 | static void __iomem *scu_base_addr(void) |
50 | { | 50 | { |
51 | if (cpu_is_u5500()) | 51 | if (cpu_is_u8500()) |
52 | return __io_address(U5500_SCU_BASE); | ||
53 | else if (cpu_is_u8500()) | ||
54 | return __io_address(U8500_SCU_BASE); | 52 | return __io_address(U8500_SCU_BASE); |
55 | else | 53 | else |
56 | ux500_unknown_soc(); | 54 | ux500_unknown_soc(); |
@@ -120,9 +118,7 @@ static void __init wakeup_secondary(void) | |||
120 | { | 118 | { |
121 | void __iomem *backupram; | 119 | void __iomem *backupram; |
122 | 120 | ||
123 | if (cpu_is_u5500()) | 121 | if (cpu_is_u8500()) |
124 | backupram = __io_address(U5500_BACKUPRAM0_BASE); | ||
125 | else if (cpu_is_u8500()) | ||
126 | backupram = __io_address(U8500_BACKUPRAM0_BASE); | 122 | backupram = __io_address(U8500_BACKUPRAM0_BASE); |
127 | else | 123 | else |
128 | ux500_unknown_soc(); | 124 | ux500_unknown_soc(); |
diff --git a/arch/arm/mach-ux500/ste-dma40-db5500.h b/arch/arm/mach-ux500/ste-dma40-db5500.h deleted file mode 100644 index cb2110c3285..00000000000 --- a/arch/arm/mach-ux500/ste-dma40-db5500.h +++ /dev/null | |||
@@ -1,135 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * | ||
4 | * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson | ||
5 | * License terms: GNU General Public License (GPL) version 2 | ||
6 | * | ||
7 | * DB5500-SoC-specific configuration for DMA40 | ||
8 | */ | ||
9 | |||
10 | #ifndef STE_DMA40_DB5500_H | ||
11 | #define STE_DMA40_DB5500_H | ||
12 | |||
13 | #define DB5500_DMA_NR_DEV 64 | ||
14 | |||
15 | enum dma_src_dev_type { | ||
16 | DB5500_DMA_DEV0_SPI0_RX = 0, | ||
17 | DB5500_DMA_DEV1_SPI1_RX = 1, | ||
18 | DB5500_DMA_DEV2_SPI2_RX = 2, | ||
19 | DB5500_DMA_DEV3_SPI3_RX = 3, | ||
20 | DB5500_DMA_DEV4_USB_OTG_IEP_1_9 = 4, | ||
21 | DB5500_DMA_DEV5_USB_OTG_IEP_2_10 = 5, | ||
22 | DB5500_DMA_DEV6_USB_OTG_IEP_3_11 = 6, | ||
23 | DB5500_DMA_DEV7_IRDA_RFS = 7, | ||
24 | DB5500_DMA_DEV8_IRDA_FIFO_RX = 8, | ||
25 | DB5500_DMA_DEV9_MSP0_RX = 9, | ||
26 | DB5500_DMA_DEV10_MSP1_RX = 10, | ||
27 | DB5500_DMA_DEV11_MSP2_RX = 11, | ||
28 | DB5500_DMA_DEV12_UART0_RX = 12, | ||
29 | DB5500_DMA_DEV13_UART1_RX = 13, | ||
30 | DB5500_DMA_DEV14_UART2_RX = 14, | ||
31 | DB5500_DMA_DEV15_UART3_RX = 15, | ||
32 | DB5500_DMA_DEV16_USB_OTG_IEP_8 = 16, | ||
33 | DB5500_DMA_DEV17_USB_OTG_IEP_1_9 = 17, | ||
34 | DB5500_DMA_DEV18_USB_OTG_IEP_2_10 = 18, | ||
35 | DB5500_DMA_DEV19_USB_OTG_IEP_3_11 = 19, | ||
36 | DB5500_DMA_DEV20_USB_OTG_IEP_4_12 = 20, | ||
37 | DB5500_DMA_DEV21_USB_OTG_IEP_5_13 = 21, | ||
38 | DB5500_DMA_DEV22_USB_OTG_IEP_6_14 = 22, | ||
39 | DB5500_DMA_DEV23_USB_OTG_IEP_7_15 = 23, | ||
40 | DB5500_DMA_DEV24_SDMMC0_RX = 24, | ||
41 | DB5500_DMA_DEV25_SDMMC1_RX = 25, | ||
42 | DB5500_DMA_DEV26_SDMMC2_RX = 26, | ||
43 | DB5500_DMA_DEV27_SDMMC3_RX = 27, | ||
44 | DB5500_DMA_DEV28_SDMMC4_RX = 28, | ||
45 | /* 29 - 32 not used */ | ||
46 | DB5500_DMA_DEV33_SDMMC0_RX = 33, | ||
47 | DB5500_DMA_DEV34_SDMMC1_RX = 34, | ||
48 | DB5500_DMA_DEV35_SDMMC2_RX = 35, | ||
49 | DB5500_DMA_DEV36_SDMMC3_RX = 36, | ||
50 | DB5500_DMA_DEV37_SDMMC4_RX = 37, | ||
51 | DB5500_DMA_DEV38_USB_OTG_IEP_8 = 38, | ||
52 | DB5500_DMA_DEV39_USB_OTG_IEP_1_9 = 39, | ||
53 | DB5500_DMA_DEV40_USB_OTG_IEP_2_10 = 40, | ||
54 | DB5500_DMA_DEV41_USB_OTG_IEP_3_11 = 41, | ||
55 | DB5500_DMA_DEV42_USB_OTG_IEP_4_12 = 42, | ||
56 | DB5500_DMA_DEV43_USB_OTG_IEP_5_13 = 43, | ||
57 | DB5500_DMA_DEV44_USB_OTG_IEP_6_14 = 44, | ||
58 | DB5500_DMA_DEV45_USB_OTG_IEP_7_15 = 45, | ||
59 | /* 46 not used */ | ||
60 | DB5500_DMA_DEV47_MCDE_RX = 47, | ||
61 | DB5500_DMA_DEV48_CRYPTO1_RX = 48, | ||
62 | /* 49, 50 not used */ | ||
63 | DB5500_DMA_DEV49_I2C1_RX = 51, | ||
64 | DB5500_DMA_DEV50_I2C3_RX = 52, | ||
65 | DB5500_DMA_DEV51_I2C2_RX = 53, | ||
66 | /* 54 - 60 not used */ | ||
67 | DB5500_DMA_DEV61_CRYPTO0_RX = 61, | ||
68 | /* 62, 63 not used */ | ||
69 | }; | ||
70 | |||
71 | enum dma_dest_dev_type { | ||
72 | DB5500_DMA_DEV0_SPI0_TX = 0, | ||
73 | DB5500_DMA_DEV1_SPI1_TX = 1, | ||
74 | DB5500_DMA_DEV2_SPI2_TX = 2, | ||
75 | DB5500_DMA_DEV3_SPI3_TX = 3, | ||
76 | DB5500_DMA_DEV4_USB_OTG_OEP_1_9 = 4, | ||
77 | DB5500_DMA_DEV5_USB_OTG_OEP_2_10 = 5, | ||
78 | DB5500_DMA_DEV6_USB_OTG_OEP_3_11 = 6, | ||
79 | DB5500_DMA_DEV7_IRRC_TX = 7, | ||
80 | DB5500_DMA_DEV8_IRDA_FIFO_TX = 8, | ||
81 | DB5500_DMA_DEV9_MSP0_TX = 9, | ||
82 | DB5500_DMA_DEV10_MSP1_TX = 10, | ||
83 | DB5500_DMA_DEV11_MSP2_TX = 11, | ||
84 | DB5500_DMA_DEV12_UART0_TX = 12, | ||
85 | DB5500_DMA_DEV13_UART1_TX = 13, | ||
86 | DB5500_DMA_DEV14_UART2_TX = 14, | ||
87 | DB5500_DMA_DEV15_UART3_TX = 15, | ||
88 | DB5500_DMA_DEV16_USB_OTG_OEP_8 = 16, | ||
89 | DB5500_DMA_DEV17_USB_OTG_OEP_1_9 = 17, | ||
90 | DB5500_DMA_DEV18_USB_OTG_OEP_2_10 = 18, | ||
91 | DB5500_DMA_DEV19_USB_OTG_OEP_3_11 = 19, | ||
92 | DB5500_DMA_DEV20_USB_OTG_OEP_4_12 = 20, | ||
93 | DB5500_DMA_DEV21_USB_OTG_OEP_5_13 = 21, | ||
94 | DB5500_DMA_DEV22_USB_OTG_OEP_6_14 = 22, | ||
95 | DB5500_DMA_DEV23_USB_OTG_OEP_7_15 = 23, | ||
96 | DB5500_DMA_DEV24_SDMMC0_TX = 24, | ||
97 | DB5500_DMA_DEV25_SDMMC1_TX = 25, | ||
98 | DB5500_DMA_DEV26_SDMMC2_TX = 26, | ||
99 | DB5500_DMA_DEV27_SDMMC3_TX = 27, | ||
100 | DB5500_DMA_DEV28_SDMMC4_TX = 28, | ||
101 | /* 29 - 31 not used */ | ||
102 | DB5500_DMA_DEV32_FSMC_TX = 32, | ||
103 | DB5500_DMA_DEV33_SDMMC0_TX = 33, | ||
104 | DB5500_DMA_DEV34_SDMMC1_TX = 34, | ||
105 | DB5500_DMA_DEV35_SDMMC2_TX = 35, | ||
106 | DB5500_DMA_DEV36_SDMMC3_TX = 36, | ||
107 | DB5500_DMA_DEV37_SDMMC4_TX = 37, | ||
108 | DB5500_DMA_DEV38_USB_OTG_OEP_8 = 38, | ||
109 | DB5500_DMA_DEV39_USB_OTG_OEP_1_9 = 39, | ||
110 | DB5500_DMA_DEV40_USB_OTG_OEP_2_10 = 40, | ||
111 | DB5500_DMA_DEV41_USB_OTG_OEP_3_11 = 41, | ||
112 | DB5500_DMA_DEV42_USB_OTG_OEP_4_12 = 42, | ||
113 | DB5500_DMA_DEV43_USB_OTG_OEP_5_13 = 43, | ||
114 | DB5500_DMA_DEV44_USB_OTG_OEP_6_14 = 44, | ||
115 | DB5500_DMA_DEV45_USB_OTG_OEP_7_15 = 45, | ||
116 | /* 46 not used */ | ||
117 | DB5500_DMA_DEV47_STM_TX = 47, | ||
118 | DB5500_DMA_DEV48_CRYPTO1_TX = 48, | ||
119 | DB5500_DMA_DEV49_CRYPTO1_TX_HASH1_TX = 49, | ||
120 | DB5500_DMA_DEV50_HASH1_TX = 50, | ||
121 | DB5500_DMA_DEV51_I2C1_TX = 51, | ||
122 | DB5500_DMA_DEV52_I2C3_TX = 52, | ||
123 | DB5500_DMA_DEV53_I2C2_TX = 53, | ||
124 | /* 54, 55 not used */ | ||
125 | DB5500_DMA_MEMCPY_TX_1 = 56, | ||
126 | DB5500_DMA_MEMCPY_TX_2 = 57, | ||
127 | DB5500_DMA_MEMCPY_TX_3 = 58, | ||
128 | DB5500_DMA_MEMCPY_TX_4 = 59, | ||
129 | DB5500_DMA_MEMCPY_TX_5 = 60, | ||
130 | DB5500_DMA_DEV61_CRYPTO0_TX = 61, | ||
131 | DB5500_DMA_DEV62_CRYPTO0_TX_HASH0_TX = 62, | ||
132 | DB5500_DMA_DEV63_HASH0_TX = 63, | ||
133 | }; | ||
134 | |||
135 | #endif | ||
diff --git a/arch/arm/mach-ux500/timer.c b/arch/arm/mach-ux500/timer.c index d37df98b5c3..52e55337aa9 100644 --- a/arch/arm/mach-ux500/timer.c +++ b/arch/arm/mach-ux500/timer.c | |||
@@ -18,8 +18,6 @@ | |||
18 | #include <mach/irqs.h> | 18 | #include <mach/irqs.h> |
19 | 19 | ||
20 | #ifdef CONFIG_HAVE_ARM_TWD | 20 | #ifdef CONFIG_HAVE_ARM_TWD |
21 | static DEFINE_TWD_LOCAL_TIMER(u5500_twd_local_timer, | ||
22 | U5500_TWD_BASE, IRQ_LOCALTIMER); | ||
23 | static DEFINE_TWD_LOCAL_TIMER(u8500_twd_local_timer, | 21 | static DEFINE_TWD_LOCAL_TIMER(u8500_twd_local_timer, |
24 | U8500_TWD_BASE, IRQ_LOCALTIMER); | 22 | U8500_TWD_BASE, IRQ_LOCALTIMER); |
25 | 23 | ||
@@ -28,8 +26,8 @@ static void __init ux500_twd_init(void) | |||
28 | struct twd_local_timer *twd_local_timer; | 26 | struct twd_local_timer *twd_local_timer; |
29 | int err; | 27 | int err; |
30 | 28 | ||
31 | twd_local_timer = cpu_is_u5500() ? &u5500_twd_local_timer : | 29 | /* Use this to switch local timer base if changed in new ASICs */ |
32 | &u8500_twd_local_timer; | 30 | twd_local_timer = &u8500_twd_local_timer; |
33 | 31 | ||
34 | if (of_have_populated_dt()) | 32 | if (of_have_populated_dt()) |
35 | twd_local_timer_of_register(); | 33 | twd_local_timer_of_register(); |
@@ -48,10 +46,7 @@ static void __init ux500_timer_init(void) | |||
48 | void __iomem *mtu_timer_base; | 46 | void __iomem *mtu_timer_base; |
49 | void __iomem *prcmu_timer_base; | 47 | void __iomem *prcmu_timer_base; |
50 | 48 | ||
51 | if (cpu_is_u5500()) { | 49 | if (cpu_is_u8500()) { |
52 | mtu_timer_base = __io_address(U5500_MTU0_BASE); | ||
53 | prcmu_timer_base = __io_address(U5500_PRCMU_TIMER_3_BASE); | ||
54 | } else if (cpu_is_u8500()) { | ||
55 | mtu_timer_base = __io_address(U8500_MTU0_BASE); | 50 | mtu_timer_base = __io_address(U8500_MTU0_BASE); |
56 | prcmu_timer_base = __io_address(U8500_PRCMU_TIMER_4_BASE); | 51 | prcmu_timer_base = __io_address(U8500_PRCMU_TIMER_4_BASE); |
57 | } else { | 52 | } else { |
@@ -70,7 +65,7 @@ static void __init ux500_timer_init(void) | |||
70 | * depending on delay which is not yet calibrated. RTC-RTT is in the | 65 | * depending on delay which is not yet calibrated. RTC-RTT is in the |
71 | * always-on powerdomain and is used as clockevent instead of twd when | 66 | * always-on powerdomain and is used as clockevent instead of twd when |
72 | * sleeping. | 67 | * sleeping. |
73 | * The PRCMU timer 4(3 for DB5500) register a clocksource and | 68 | * The PRCMU timer 4 register a clocksource and |
74 | * sched_clock with higher rating then MTU since is always-on. | 69 | * sched_clock with higher rating then MTU since is always-on. |
75 | * | 70 | * |
76 | */ | 71 | */ |
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index 6bbd74e950a..cf4687ee2a7 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
@@ -66,12 +66,6 @@ | |||
66 | #define VA_VIC_BASE __io_address(VERSATILE_VIC_BASE) | 66 | #define VA_VIC_BASE __io_address(VERSATILE_VIC_BASE) |
67 | #define VA_SIC_BASE __io_address(VERSATILE_SIC_BASE) | 67 | #define VA_SIC_BASE __io_address(VERSATILE_SIC_BASE) |
68 | 68 | ||
69 | static struct fpga_irq_data sic_irq = { | ||
70 | .base = VA_SIC_BASE, | ||
71 | .irq_start = IRQ_SIC_START, | ||
72 | .chip.name = "SIC", | ||
73 | }; | ||
74 | |||
75 | #if 1 | 69 | #if 1 |
76 | #define IRQ_MMCI0A IRQ_VICSOURCE22 | 70 | #define IRQ_MMCI0A IRQ_VICSOURCE22 |
77 | #define IRQ_AACI IRQ_VICSOURCE24 | 71 | #define IRQ_AACI IRQ_VICSOURCE24 |
@@ -105,8 +99,11 @@ void __init versatile_init_irq(void) | |||
105 | 99 | ||
106 | writel(~0, VA_SIC_BASE + SIC_IRQ_ENABLE_CLEAR); | 100 | writel(~0, VA_SIC_BASE + SIC_IRQ_ENABLE_CLEAR); |
107 | 101 | ||
108 | fpga_irq_init(IRQ_VICSOURCE31, ~PIC_MASK, &sic_irq); | 102 | np = of_find_matching_node_by_address(NULL, sic_of_match, |
109 | irq_domain_generate_simple(sic_of_match, VERSATILE_SIC_BASE, IRQ_SIC_START); | 103 | VERSATILE_SIC_BASE); |
104 | |||
105 | fpga_irq_init(VA_SIC_BASE, "SIC", IRQ_SIC_START, | ||
106 | IRQ_VICSOURCE31, ~PIC_MASK, np); | ||
110 | 107 | ||
111 | /* | 108 | /* |
112 | * Interrupts on secondary controller from 0 to 8 are routed to | 109 | * Interrupts on secondary controller from 0 to 8 are routed to |
@@ -666,17 +663,18 @@ static struct amba_device *amba_devs[] __initdata = { | |||
666 | * having a specific name. | 663 | * having a specific name. |
667 | */ | 664 | */ |
668 | struct of_dev_auxdata versatile_auxdata_lookup[] __initdata = { | 665 | struct of_dev_auxdata versatile_auxdata_lookup[] __initdata = { |
669 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_MMCI0_BASE, "fpga:05", NULL), | 666 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_MMCI0_BASE, "fpga:05", &mmc0_plat_data), |
670 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_KMI0_BASE, "fpga:06", NULL), | 667 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_KMI0_BASE, "fpga:06", NULL), |
671 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_KMI1_BASE, "fpga:07", NULL), | 668 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_KMI1_BASE, "fpga:07", NULL), |
672 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_UART3_BASE, "fpga:09", NULL), | 669 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_UART3_BASE, "fpga:09", NULL), |
670 | /* FIXME: this is buggy, the platform data is needed for this MMC instance too */ | ||
673 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_MMCI1_BASE, "fpga:0b", NULL), | 671 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_MMCI1_BASE, "fpga:0b", NULL), |
674 | 672 | ||
675 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_CLCD_BASE, "dev:20", &clcd_plat_data), | 673 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_CLCD_BASE, "dev:20", &clcd_plat_data), |
676 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_UART0_BASE, "dev:f1", NULL), | 674 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_UART0_BASE, "dev:f1", NULL), |
677 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_UART1_BASE, "dev:f2", NULL), | 675 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_UART1_BASE, "dev:f2", NULL), |
678 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_UART2_BASE, "dev:f3", NULL), | 676 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_UART2_BASE, "dev:f3", NULL), |
679 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_SSP_BASE, "dev:f4", NULL), | 677 | OF_DEV_AUXDATA("arm,primecell", VERSATILE_SSP_BASE, "dev:f4", &ssp0_plat_data), |
680 | 678 | ||
681 | #if 0 | 679 | #if 0 |
682 | /* | 680 | /* |
diff --git a/arch/arm/mach-versatile/pci.c b/arch/arm/mach-versatile/pci.c index d2268be8c34..15c6a00000e 100644 --- a/arch/arm/mach-versatile/pci.c +++ b/arch/arm/mach-versatile/pci.c | |||
@@ -303,12 +303,6 @@ int __init pci_versatile_setup(int nr, struct pci_sys_data *sys) | |||
303 | } | 303 | } |
304 | 304 | ||
305 | 305 | ||
306 | struct pci_bus * __init pci_versatile_scan_bus(int nr, struct pci_sys_data *sys) | ||
307 | { | ||
308 | return pci_scan_root_bus(NULL, sys->busnr, &pci_versatile_ops, sys, | ||
309 | &sys->resources); | ||
310 | } | ||
311 | |||
312 | void __init pci_versatile_preinit(void) | 306 | void __init pci_versatile_preinit(void) |
313 | { | 307 | { |
314 | pcibios_min_io = 0x44000000; | 308 | pcibios_min_io = 0x44000000; |
@@ -339,19 +333,16 @@ static int __init versatile_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
339 | * 26 1 29 | 333 | * 26 1 29 |
340 | * 27 1 30 | 334 | * 27 1 30 |
341 | */ | 335 | */ |
342 | irq = 27 + ((slot + pin - 1) & 3); | 336 | irq = 27 + ((slot - 24 + pin - 1) & 3); |
343 | |||
344 | printk("PCI map irq: slot %d, pin %d, devslot %d, irq: %d\n",slot,pin,devslot,irq); | ||
345 | 337 | ||
346 | return irq; | 338 | return irq; |
347 | } | 339 | } |
348 | 340 | ||
349 | static struct hw_pci versatile_pci __initdata = { | 341 | static struct hw_pci versatile_pci __initdata = { |
350 | .swizzle = NULL, | ||
351 | .map_irq = versatile_map_irq, | 342 | .map_irq = versatile_map_irq, |
352 | .nr_controllers = 1, | 343 | .nr_controllers = 1, |
344 | .ops = &pci_versatile_ops, | ||
353 | .setup = pci_versatile_setup, | 345 | .setup = pci_versatile_setup, |
354 | .scan = pci_versatile_scan_bus, | ||
355 | .preinit = pci_versatile_preinit, | 346 | .preinit = pci_versatile_preinit, |
356 | }; | 347 | }; |
357 | 348 | ||
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c index 47cdcca5a7e..04dd092211b 100644 --- a/arch/arm/mach-vexpress/v2m.c +++ b/arch/arm/mach-vexpress/v2m.c | |||
@@ -19,8 +19,10 @@ | |||
19 | #include <linux/clkdev.h> | 19 | #include <linux/clkdev.h> |
20 | #include <linux/mtd/physmap.h> | 20 | #include <linux/mtd/physmap.h> |
21 | 21 | ||
22 | #include <asm/arch_timer.h> | ||
22 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
23 | #include <asm/sizes.h> | 24 | #include <asm/sizes.h> |
25 | #include <asm/smp_twd.h> | ||
24 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
25 | #include <asm/mach/map.h> | 27 | #include <asm/mach/map.h> |
26 | #include <asm/mach/time.h> | 28 | #include <asm/mach/time.h> |
@@ -616,7 +618,6 @@ void __init v2m_dt_init_early(void) | |||
616 | } | 618 | } |
617 | 619 | ||
618 | clkdev_add_table(v2m_dt_lookups, ARRAY_SIZE(v2m_dt_lookups)); | 620 | clkdev_add_table(v2m_dt_lookups, ARRAY_SIZE(v2m_dt_lookups)); |
619 | versatile_sched_clock_init(v2m_sysreg_base + V2M_SYS_24MHZ, 24000000); | ||
620 | } | 621 | } |
621 | 622 | ||
622 | static struct of_device_id vexpress_irq_match[] __initdata = { | 623 | static struct of_device_id vexpress_irq_match[] __initdata = { |
@@ -643,6 +644,11 @@ static void __init v2m_dt_timer_init(void) | |||
643 | return; | 644 | return; |
644 | node = of_find_node_by_path(path); | 645 | node = of_find_node_by_path(path); |
645 | v2m_sp804_init(of_iomap(node, 0), irq_of_parse_and_map(node, 0)); | 646 | v2m_sp804_init(of_iomap(node, 0), irq_of_parse_and_map(node, 0)); |
647 | if (arch_timer_of_register() != 0) | ||
648 | twd_local_timer_of_register(); | ||
649 | |||
650 | if (arch_timer_sched_clock_init() != 0) | ||
651 | versatile_sched_clock_init(v2m_sysreg_base + V2M_SYS_24MHZ, 24000000); | ||
646 | } | 652 | } |
647 | 653 | ||
648 | static struct sys_timer v2m_dt_timer = { | 654 | static struct sys_timer v2m_dt_timer = { |
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index 7c8a7d8467b..101b9681c08 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig | |||
@@ -4,23 +4,6 @@ comment "Processor Type" | |||
4 | # which CPUs we support in the kernel image, and the compiler instruction | 4 | # which CPUs we support in the kernel image, and the compiler instruction |
5 | # optimiser behaviour. | 5 | # optimiser behaviour. |
6 | 6 | ||
7 | # ARM610 | ||
8 | config CPU_ARM610 | ||
9 | bool "Support ARM610 processor" if ARCH_RPC | ||
10 | select CPU_32v3 | ||
11 | select CPU_CACHE_V3 | ||
12 | select CPU_CACHE_VIVT | ||
13 | select CPU_CP15_MMU | ||
14 | select CPU_COPY_V3 if MMU | ||
15 | select CPU_TLB_V3 if MMU | ||
16 | select CPU_PABRT_LEGACY | ||
17 | help | ||
18 | The ARM610 is the successor to the ARM3 processor | ||
19 | and was produced by VLSI Technology Inc. | ||
20 | |||
21 | Say Y if you want support for the ARM610 processor. | ||
22 | Otherwise, say N. | ||
23 | |||
24 | # ARM7TDMI | 7 | # ARM7TDMI |
25 | config CPU_ARM7TDMI | 8 | config CPU_ARM7TDMI |
26 | bool "Support ARM7TDMI processor" | 9 | bool "Support ARM7TDMI processor" |
@@ -36,25 +19,6 @@ config CPU_ARM7TDMI | |||
36 | Say Y if you want support for the ARM7TDMI processor. | 19 | Say Y if you want support for the ARM7TDMI processor. |
37 | Otherwise, say N. | 20 | Otherwise, say N. |
38 | 21 | ||
39 | # ARM710 | ||
40 | config CPU_ARM710 | ||
41 | bool "Support ARM710 processor" if ARCH_RPC | ||
42 | select CPU_32v3 | ||
43 | select CPU_CACHE_V3 | ||
44 | select CPU_CACHE_VIVT | ||
45 | select CPU_CP15_MMU | ||
46 | select CPU_COPY_V3 if MMU | ||
47 | select CPU_TLB_V3 if MMU | ||
48 | select CPU_PABRT_LEGACY | ||
49 | help | ||
50 | A 32-bit RISC microprocessor based on the ARM7 processor core | ||
51 | designed by Advanced RISC Machines Ltd. The ARM710 is the | ||
52 | successor to the ARM610 processor. It was released in | ||
53 | July 1994 by VLSI Technology Inc. | ||
54 | |||
55 | Say Y if you want support for the ARM710 processor. | ||
56 | Otherwise, say N. | ||
57 | |||
58 | # ARM720T | 22 | # ARM720T |
59 | config CPU_ARM720T | 23 | config CPU_ARM720T |
60 | bool "Support ARM720T processor" if ARCH_INTEGRATOR | 24 | bool "Support ARM720T processor" if ARCH_INTEGRATOR |
@@ -530,9 +494,6 @@ config CPU_CACHE_FA | |||
530 | 494 | ||
531 | if MMU | 495 | if MMU |
532 | # The copy-page model | 496 | # The copy-page model |
533 | config CPU_COPY_V3 | ||
534 | bool | ||
535 | |||
536 | config CPU_COPY_V4WT | 497 | config CPU_COPY_V4WT |
537 | bool | 498 | bool |
538 | 499 | ||
@@ -549,11 +510,6 @@ config CPU_COPY_V6 | |||
549 | bool | 510 | bool |
550 | 511 | ||
551 | # This selects the TLB model | 512 | # This selects the TLB model |
552 | config CPU_TLB_V3 | ||
553 | bool | ||
554 | help | ||
555 | ARM Architecture Version 3 TLB. | ||
556 | |||
557 | config CPU_TLB_V4WT | 513 | config CPU_TLB_V4WT |
558 | bool | 514 | bool |
559 | help | 515 | help |
@@ -731,7 +687,7 @@ config CPU_HIGH_VECTOR | |||
731 | 687 | ||
732 | config CPU_ICACHE_DISABLE | 688 | config CPU_ICACHE_DISABLE |
733 | bool "Disable I-Cache (I-bit)" | 689 | bool "Disable I-Cache (I-bit)" |
734 | depends on CPU_CP15 && !(CPU_ARM610 || CPU_ARM710 || CPU_ARM720T || CPU_ARM740T || CPU_XSCALE || CPU_XSC3) | 690 | depends on CPU_CP15 && !(CPU_ARM720T || CPU_ARM740T || CPU_XSCALE || CPU_XSC3) |
735 | help | 691 | help |
736 | Say Y here to disable the processor instruction cache. Unless | 692 | Say Y here to disable the processor instruction cache. Unless |
737 | you have a reason not to or are unsure, say N. | 693 | you have a reason not to or are unsure, say N. |
diff --git a/arch/arm/mm/Makefile b/arch/arm/mm/Makefile index bca7e61928c..8a9c4cb50a9 100644 --- a/arch/arm/mm/Makefile +++ b/arch/arm/mm/Makefile | |||
@@ -44,7 +44,6 @@ obj-$(CONFIG_CPU_CACHE_FA) += cache-fa.o | |||
44 | AFLAGS_cache-v6.o :=-Wa,-march=armv6 | 44 | AFLAGS_cache-v6.o :=-Wa,-march=armv6 |
45 | AFLAGS_cache-v7.o :=-Wa,-march=armv7-a | 45 | AFLAGS_cache-v7.o :=-Wa,-march=armv7-a |
46 | 46 | ||
47 | obj-$(CONFIG_CPU_COPY_V3) += copypage-v3.o | ||
48 | obj-$(CONFIG_CPU_COPY_V4WT) += copypage-v4wt.o | 47 | obj-$(CONFIG_CPU_COPY_V4WT) += copypage-v4wt.o |
49 | obj-$(CONFIG_CPU_COPY_V4WB) += copypage-v4wb.o | 48 | obj-$(CONFIG_CPU_COPY_V4WB) += copypage-v4wb.o |
50 | obj-$(CONFIG_CPU_COPY_FEROCEON) += copypage-feroceon.o | 49 | obj-$(CONFIG_CPU_COPY_FEROCEON) += copypage-feroceon.o |
@@ -54,7 +53,6 @@ obj-$(CONFIG_CPU_XSCALE) += copypage-xscale.o | |||
54 | obj-$(CONFIG_CPU_XSC3) += copypage-xsc3.o | 53 | obj-$(CONFIG_CPU_XSC3) += copypage-xsc3.o |
55 | obj-$(CONFIG_CPU_COPY_FA) += copypage-fa.o | 54 | obj-$(CONFIG_CPU_COPY_FA) += copypage-fa.o |
56 | 55 | ||
57 | obj-$(CONFIG_CPU_TLB_V3) += tlb-v3.o | ||
58 | obj-$(CONFIG_CPU_TLB_V4WT) += tlb-v4.o | 56 | obj-$(CONFIG_CPU_TLB_V4WT) += tlb-v4.o |
59 | obj-$(CONFIG_CPU_TLB_V4WB) += tlb-v4wb.o | 57 | obj-$(CONFIG_CPU_TLB_V4WB) += tlb-v4wb.o |
60 | obj-$(CONFIG_CPU_TLB_V4WBI) += tlb-v4wbi.o | 58 | obj-$(CONFIG_CPU_TLB_V4WBI) += tlb-v4wbi.o |
@@ -66,8 +64,6 @@ obj-$(CONFIG_CPU_TLB_FA) += tlb-fa.o | |||
66 | AFLAGS_tlb-v6.o :=-Wa,-march=armv6 | 64 | AFLAGS_tlb-v6.o :=-Wa,-march=armv6 |
67 | AFLAGS_tlb-v7.o :=-Wa,-march=armv7-a | 65 | AFLAGS_tlb-v7.o :=-Wa,-march=armv7-a |
68 | 66 | ||
69 | obj-$(CONFIG_CPU_ARM610) += proc-arm6_7.o | ||
70 | obj-$(CONFIG_CPU_ARM710) += proc-arm6_7.o | ||
71 | obj-$(CONFIG_CPU_ARM7TDMI) += proc-arm7tdmi.o | 67 | obj-$(CONFIG_CPU_ARM7TDMI) += proc-arm7tdmi.o |
72 | obj-$(CONFIG_CPU_ARM720T) += proc-arm720.o | 68 | obj-$(CONFIG_CPU_ARM720T) += proc-arm720.o |
73 | obj-$(CONFIG_CPU_ARM740T) += proc-arm740.o | 69 | obj-$(CONFIG_CPU_ARM740T) += proc-arm740.o |
diff --git a/arch/arm/mm/cache-v3.S b/arch/arm/mm/cache-v3.S index c2301f22610..52e35f32eef 100644 --- a/arch/arm/mm/cache-v3.S +++ b/arch/arm/mm/cache-v3.S | |||
@@ -78,6 +78,7 @@ ENTRY(v3_coherent_kern_range) | |||
78 | * - end - virtual end address | 78 | * - end - virtual end address |
79 | */ | 79 | */ |
80 | ENTRY(v3_coherent_user_range) | 80 | ENTRY(v3_coherent_user_range) |
81 | mov r0, #0 | ||
81 | mov pc, lr | 82 | mov pc, lr |
82 | 83 | ||
83 | /* | 84 | /* |
diff --git a/arch/arm/mm/cache-v4.S b/arch/arm/mm/cache-v4.S index fd9bb7addc8..022135d2b7e 100644 --- a/arch/arm/mm/cache-v4.S +++ b/arch/arm/mm/cache-v4.S | |||
@@ -88,6 +88,7 @@ ENTRY(v4_coherent_kern_range) | |||
88 | * - end - virtual end address | 88 | * - end - virtual end address |
89 | */ | 89 | */ |
90 | ENTRY(v4_coherent_user_range) | 90 | ENTRY(v4_coherent_user_range) |
91 | mov r0, #0 | ||
91 | mov pc, lr | 92 | mov pc, lr |
92 | 93 | ||
93 | /* | 94 | /* |
diff --git a/arch/arm/mm/cache-v4wb.S b/arch/arm/mm/cache-v4wb.S index 4f2c14151cc..8f1eeae340c 100644 --- a/arch/arm/mm/cache-v4wb.S +++ b/arch/arm/mm/cache-v4wb.S | |||
@@ -167,9 +167,9 @@ ENTRY(v4wb_coherent_user_range) | |||
167 | add r0, r0, #CACHE_DLINESIZE | 167 | add r0, r0, #CACHE_DLINESIZE |
168 | cmp r0, r1 | 168 | cmp r0, r1 |
169 | blo 1b | 169 | blo 1b |
170 | mov ip, #0 | 170 | mov r0, #0 |
171 | mcr p15, 0, ip, c7, c5, 0 @ invalidate I cache | 171 | mcr p15, 0, r0, c7, c5, 0 @ invalidate I cache |
172 | mcr p15, 0, ip, c7, c10, 4 @ drain WB | 172 | mcr p15, 0, r0, c7, c10, 4 @ drain WB |
173 | mov pc, lr | 173 | mov pc, lr |
174 | 174 | ||
175 | 175 | ||
diff --git a/arch/arm/mm/cache-v4wt.S b/arch/arm/mm/cache-v4wt.S index 4d7b467631c..b34a5f908a8 100644 --- a/arch/arm/mm/cache-v4wt.S +++ b/arch/arm/mm/cache-v4wt.S | |||
@@ -125,6 +125,7 @@ ENTRY(v4wt_coherent_user_range) | |||
125 | add r0, r0, #CACHE_DLINESIZE | 125 | add r0, r0, #CACHE_DLINESIZE |
126 | cmp r0, r1 | 126 | cmp r0, r1 |
127 | blo 1b | 127 | blo 1b |
128 | mov r0, #0 | ||
128 | mov pc, lr | 129 | mov pc, lr |
129 | 130 | ||
130 | /* | 131 | /* |
diff --git a/arch/arm/mm/cache-v6.S b/arch/arm/mm/cache-v6.S index 74c2e5a33a4..4b10760c56d 100644 --- a/arch/arm/mm/cache-v6.S +++ b/arch/arm/mm/cache-v6.S | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/linkage.h> | 12 | #include <linux/linkage.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <asm/assembler.h> | 14 | #include <asm/assembler.h> |
15 | #include <asm/errno.h> | ||
15 | #include <asm/unwind.h> | 16 | #include <asm/unwind.h> |
16 | 17 | ||
17 | #include "proc-macros.S" | 18 | #include "proc-macros.S" |
@@ -135,7 +136,6 @@ ENTRY(v6_coherent_user_range) | |||
135 | 1: | 136 | 1: |
136 | USER( mcr p15, 0, r0, c7, c10, 1 ) @ clean D line | 137 | USER( mcr p15, 0, r0, c7, c10, 1 ) @ clean D line |
137 | add r0, r0, #CACHE_LINE_SIZE | 138 | add r0, r0, #CACHE_LINE_SIZE |
138 | 2: | ||
139 | cmp r0, r1 | 139 | cmp r0, r1 |
140 | blo 1b | 140 | blo 1b |
141 | #endif | 141 | #endif |
@@ -154,13 +154,11 @@ ENTRY(v6_coherent_user_range) | |||
154 | 154 | ||
155 | /* | 155 | /* |
156 | * Fault handling for the cache operation above. If the virtual address in r0 | 156 | * Fault handling for the cache operation above. If the virtual address in r0 |
157 | * isn't mapped, just try the next page. | 157 | * isn't mapped, fail with -EFAULT. |
158 | */ | 158 | */ |
159 | 9001: | 159 | 9001: |
160 | mov r0, r0, lsr #12 | 160 | mov r0, #-EFAULT |
161 | mov r0, r0, lsl #12 | 161 | mov pc, lr |
162 | add r0, r0, #4096 | ||
163 | b 2b | ||
164 | UNWIND(.fnend ) | 162 | UNWIND(.fnend ) |
165 | ENDPROC(v6_coherent_user_range) | 163 | ENDPROC(v6_coherent_user_range) |
166 | ENDPROC(v6_coherent_kern_range) | 164 | ENDPROC(v6_coherent_kern_range) |
diff --git a/arch/arm/mm/cache-v7.S b/arch/arm/mm/cache-v7.S index a655d3da386..39e3fb3db80 100644 --- a/arch/arm/mm/cache-v7.S +++ b/arch/arm/mm/cache-v7.S | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/linkage.h> | 13 | #include <linux/linkage.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <asm/assembler.h> | 15 | #include <asm/assembler.h> |
16 | #include <asm/errno.h> | ||
16 | #include <asm/unwind.h> | 17 | #include <asm/unwind.h> |
17 | 18 | ||
18 | #include "proc-macros.S" | 19 | #include "proc-macros.S" |
@@ -198,7 +199,6 @@ ENTRY(v7_coherent_user_range) | |||
198 | add r12, r12, r2 | 199 | add r12, r12, r2 |
199 | cmp r12, r1 | 200 | cmp r12, r1 |
200 | blo 2b | 201 | blo 2b |
201 | 3: | ||
202 | mov r0, #0 | 202 | mov r0, #0 |
203 | ALT_SMP(mcr p15, 0, r0, c7, c1, 6) @ invalidate BTB Inner Shareable | 203 | ALT_SMP(mcr p15, 0, r0, c7, c1, 6) @ invalidate BTB Inner Shareable |
204 | ALT_UP(mcr p15, 0, r0, c7, c5, 6) @ invalidate BTB | 204 | ALT_UP(mcr p15, 0, r0, c7, c5, 6) @ invalidate BTB |
@@ -208,13 +208,11 @@ ENTRY(v7_coherent_user_range) | |||
208 | 208 | ||
209 | /* | 209 | /* |
210 | * Fault handling for the cache operation above. If the virtual address in r0 | 210 | * Fault handling for the cache operation above. If the virtual address in r0 |
211 | * isn't mapped, just try the next page. | 211 | * isn't mapped, fail with -EFAULT. |
212 | */ | 212 | */ |
213 | 9001: | 213 | 9001: |
214 | mov r12, r12, lsr #12 | 214 | mov r0, #-EFAULT |
215 | mov r12, r12, lsl #12 | 215 | mov pc, lr |
216 | add r12, r12, #4096 | ||
217 | b 3b | ||
218 | UNWIND(.fnend ) | 216 | UNWIND(.fnend ) |
219 | ENDPROC(v7_coherent_kern_range) | 217 | ENDPROC(v7_coherent_kern_range) |
220 | ENDPROC(v7_coherent_user_range) | 218 | ENDPROC(v7_coherent_user_range) |
diff --git a/arch/arm/mm/context.c b/arch/arm/mm/context.c index ee9bb363d60..806cc4f6351 100644 --- a/arch/arm/mm/context.c +++ b/arch/arm/mm/context.c | |||
@@ -18,30 +18,39 @@ | |||
18 | 18 | ||
19 | static DEFINE_RAW_SPINLOCK(cpu_asid_lock); | 19 | static DEFINE_RAW_SPINLOCK(cpu_asid_lock); |
20 | unsigned int cpu_last_asid = ASID_FIRST_VERSION; | 20 | unsigned int cpu_last_asid = ASID_FIRST_VERSION; |
21 | #ifdef CONFIG_SMP | ||
22 | DEFINE_PER_CPU(struct mm_struct *, current_mm); | ||
23 | #endif | ||
24 | 21 | ||
25 | #ifdef CONFIG_ARM_LPAE | 22 | #ifdef CONFIG_ARM_LPAE |
26 | #define cpu_set_asid(asid) { \ | 23 | void cpu_set_reserved_ttbr0(void) |
27 | unsigned long ttbl, ttbh; \ | 24 | { |
28 | asm volatile( \ | 25 | unsigned long ttbl = __pa(swapper_pg_dir); |
29 | " mrrc p15, 0, %0, %1, c2 @ read TTBR0\n" \ | 26 | unsigned long ttbh = 0; |
30 | " mov %1, %2, lsl #(48 - 32) @ set ASID\n" \ | 27 | |
31 | " mcrr p15, 0, %0, %1, c2 @ set TTBR0\n" \ | 28 | /* |
32 | : "=&r" (ttbl), "=&r" (ttbh) \ | 29 | * Set TTBR0 to swapper_pg_dir which contains only global entries. The |
33 | : "r" (asid & ~ASID_MASK)); \ | 30 | * ASID is set to 0. |
31 | */ | ||
32 | asm volatile( | ||
33 | " mcrr p15, 0, %0, %1, c2 @ set TTBR0\n" | ||
34 | : | ||
35 | : "r" (ttbl), "r" (ttbh)); | ||
36 | isb(); | ||
34 | } | 37 | } |
35 | #else | 38 | #else |
36 | #define cpu_set_asid(asid) \ | 39 | void cpu_set_reserved_ttbr0(void) |
37 | asm(" mcr p15, 0, %0, c13, c0, 1\n" : : "r" (asid)) | 40 | { |
41 | u32 ttb; | ||
42 | /* Copy TTBR1 into TTBR0 */ | ||
43 | asm volatile( | ||
44 | " mrc p15, 0, %0, c2, c0, 1 @ read TTBR1\n" | ||
45 | " mcr p15, 0, %0, c2, c0, 0 @ set TTBR0\n" | ||
46 | : "=r" (ttb)); | ||
47 | isb(); | ||
48 | } | ||
38 | #endif | 49 | #endif |
39 | 50 | ||
40 | /* | 51 | /* |
41 | * We fork()ed a process, and we need a new context for the child | 52 | * We fork()ed a process, and we need a new context for the child |
42 | * to run in. We reserve version 0 for initial tasks so we will | 53 | * to run in. |
43 | * always allocate an ASID. The ASID 0 is reserved for the TTBR | ||
44 | * register changing sequence. | ||
45 | */ | 54 | */ |
46 | void __init_new_context(struct task_struct *tsk, struct mm_struct *mm) | 55 | void __init_new_context(struct task_struct *tsk, struct mm_struct *mm) |
47 | { | 56 | { |
@@ -51,9 +60,7 @@ void __init_new_context(struct task_struct *tsk, struct mm_struct *mm) | |||
51 | 60 | ||
52 | static void flush_context(void) | 61 | static void flush_context(void) |
53 | { | 62 | { |
54 | /* set the reserved ASID before flushing the TLB */ | 63 | cpu_set_reserved_ttbr0(); |
55 | cpu_set_asid(0); | ||
56 | isb(); | ||
57 | local_flush_tlb_all(); | 64 | local_flush_tlb_all(); |
58 | if (icache_is_vivt_asid_tagged()) { | 65 | if (icache_is_vivt_asid_tagged()) { |
59 | __flush_icache_all(); | 66 | __flush_icache_all(); |
@@ -98,14 +105,7 @@ static void reset_context(void *info) | |||
98 | { | 105 | { |
99 | unsigned int asid; | 106 | unsigned int asid; |
100 | unsigned int cpu = smp_processor_id(); | 107 | unsigned int cpu = smp_processor_id(); |
101 | struct mm_struct *mm = per_cpu(current_mm, cpu); | 108 | struct mm_struct *mm = current->active_mm; |
102 | |||
103 | /* | ||
104 | * Check if a current_mm was set on this CPU as it might still | ||
105 | * be in the early booting stages and using the reserved ASID. | ||
106 | */ | ||
107 | if (!mm) | ||
108 | return; | ||
109 | 109 | ||
110 | smp_rmb(); | 110 | smp_rmb(); |
111 | asid = cpu_last_asid + cpu + 1; | 111 | asid = cpu_last_asid + cpu + 1; |
@@ -114,8 +114,7 @@ static void reset_context(void *info) | |||
114 | set_mm_context(mm, asid); | 114 | set_mm_context(mm, asid); |
115 | 115 | ||
116 | /* set the new ASID */ | 116 | /* set the new ASID */ |
117 | cpu_set_asid(mm->context.id); | 117 | cpu_switch_mm(mm->pgd, mm); |
118 | isb(); | ||
119 | } | 118 | } |
120 | 119 | ||
121 | #else | 120 | #else |
diff --git a/arch/arm/mm/copypage-v3.c b/arch/arm/mm/copypage-v3.c deleted file mode 100644 index 3935bddd476..00000000000 --- a/arch/arm/mm/copypage-v3.c +++ /dev/null | |||
@@ -1,81 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mm/copypage-v3.c | ||
3 | * | ||
4 | * Copyright (C) 1995-1999 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #include <linux/init.h> | ||
11 | #include <linux/highmem.h> | ||
12 | |||
13 | /* | ||
14 | * ARMv3 optimised copy_user_highpage | ||
15 | * | ||
16 | * FIXME: do we need to handle cache stuff... | ||
17 | */ | ||
18 | static void __naked | ||
19 | v3_copy_user_page(void *kto, const void *kfrom) | ||
20 | { | ||
21 | asm("\n\ | ||
22 | stmfd sp!, {r4, lr} @ 2\n\ | ||
23 | mov r2, %2 @ 1\n\ | ||
24 | ldmia %0!, {r3, r4, ip, lr} @ 4+1\n\ | ||
25 | 1: stmia %1!, {r3, r4, ip, lr} @ 4\n\ | ||
26 | ldmia %0!, {r3, r4, ip, lr} @ 4+1\n\ | ||
27 | stmia %1!, {r3, r4, ip, lr} @ 4\n\ | ||
28 | ldmia %0!, {r3, r4, ip, lr} @ 4+1\n\ | ||
29 | stmia %1!, {r3, r4, ip, lr} @ 4\n\ | ||
30 | ldmia %0!, {r3, r4, ip, lr} @ 4\n\ | ||
31 | subs r2, r2, #1 @ 1\n\ | ||
32 | stmia %1!, {r3, r4, ip, lr} @ 4\n\ | ||
33 | ldmneia %0!, {r3, r4, ip, lr} @ 4\n\ | ||
34 | bne 1b @ 1\n\ | ||
35 | ldmfd sp!, {r4, pc} @ 3" | ||
36 | : | ||
37 | : "r" (kfrom), "r" (kto), "I" (PAGE_SIZE / 64)); | ||
38 | } | ||
39 | |||
40 | void v3_copy_user_highpage(struct page *to, struct page *from, | ||
41 | unsigned long vaddr, struct vm_area_struct *vma) | ||
42 | { | ||
43 | void *kto, *kfrom; | ||
44 | |||
45 | kto = kmap_atomic(to); | ||
46 | kfrom = kmap_atomic(from); | ||
47 | v3_copy_user_page(kto, kfrom); | ||
48 | kunmap_atomic(kfrom); | ||
49 | kunmap_atomic(kto); | ||
50 | } | ||
51 | |||
52 | /* | ||
53 | * ARMv3 optimised clear_user_page | ||
54 | * | ||
55 | * FIXME: do we need to handle cache stuff... | ||
56 | */ | ||
57 | void v3_clear_user_highpage(struct page *page, unsigned long vaddr) | ||
58 | { | ||
59 | void *ptr, *kaddr = kmap_atomic(page); | ||
60 | asm volatile("\n\ | ||
61 | mov r1, %2 @ 1\n\ | ||
62 | mov r2, #0 @ 1\n\ | ||
63 | mov r3, #0 @ 1\n\ | ||
64 | mov ip, #0 @ 1\n\ | ||
65 | mov lr, #0 @ 1\n\ | ||
66 | 1: stmia %0!, {r2, r3, ip, lr} @ 4\n\ | ||
67 | stmia %0!, {r2, r3, ip, lr} @ 4\n\ | ||
68 | stmia %0!, {r2, r3, ip, lr} @ 4\n\ | ||
69 | stmia %0!, {r2, r3, ip, lr} @ 4\n\ | ||
70 | subs r1, r1, #1 @ 1\n\ | ||
71 | bne 1b @ 1" | ||
72 | : "=r" (ptr) | ||
73 | : "0" (kaddr), "I" (PAGE_SIZE / 64) | ||
74 | : "r1", "r2", "r3", "ip", "lr"); | ||
75 | kunmap_atomic(kaddr); | ||
76 | } | ||
77 | |||
78 | struct cpu_user_fns v3_user_fns __initdata = { | ||
79 | .cpu_clear_user_highpage = v3_clear_user_highpage, | ||
80 | .cpu_copy_user_highpage = v3_copy_user_highpage, | ||
81 | }; | ||
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index f0746753336..c3bd8345022 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c | |||
@@ -247,7 +247,9 @@ good_area: | |||
247 | return handle_mm_fault(mm, vma, addr & PAGE_MASK, flags); | 247 | return handle_mm_fault(mm, vma, addr & PAGE_MASK, flags); |
248 | 248 | ||
249 | check_stack: | 249 | check_stack: |
250 | if (vma->vm_flags & VM_GROWSDOWN && !expand_stack(vma, addr)) | 250 | /* Don't allow expansion below FIRST_USER_ADDRESS */ |
251 | if (vma->vm_flags & VM_GROWSDOWN && | ||
252 | addr >= FIRST_USER_ADDRESS && !expand_stack(vma, addr)) | ||
251 | goto good_area; | 253 | goto good_area; |
252 | out: | 254 | out: |
253 | return fault; | 255 | return fault; |
@@ -430,9 +432,6 @@ do_translation_fault(unsigned long addr, unsigned int fsr, | |||
430 | 432 | ||
431 | index = pgd_index(addr); | 433 | index = pgd_index(addr); |
432 | 434 | ||
433 | /* | ||
434 | * FIXME: CP15 C1 is write only on ARMv3 architectures. | ||
435 | */ | ||
436 | pgd = cpu_get_pgd() + index; | 435 | pgd = cpu_get_pgd() + index; |
437 | pgd_k = init_mm.pgd + index; | 436 | pgd_k = init_mm.pgd + index; |
438 | 437 | ||
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 2c7cf2f9c83..aa78de8bfdd 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -489,7 +489,8 @@ static void __init build_mem_type_table(void) | |||
489 | */ | 489 | */ |
490 | for (i = 0; i < ARRAY_SIZE(mem_types); i++) { | 490 | for (i = 0; i < ARRAY_SIZE(mem_types); i++) { |
491 | mem_types[i].prot_pte |= PTE_EXT_AF; | 491 | mem_types[i].prot_pte |= PTE_EXT_AF; |
492 | mem_types[i].prot_sect |= PMD_SECT_AF; | 492 | if (mem_types[i].prot_sect) |
493 | mem_types[i].prot_sect |= PMD_SECT_AF; | ||
493 | } | 494 | } |
494 | kern_pgprot |= PTE_EXT_AF; | 495 | kern_pgprot |= PTE_EXT_AF; |
495 | vecs_pgprot |= PTE_EXT_AF; | 496 | vecs_pgprot |= PTE_EXT_AF; |
diff --git a/arch/arm/mm/proc-arm1020.S b/arch/arm/mm/proc-arm1020.S index 234951345eb..0650bb87c1e 100644 --- a/arch/arm/mm/proc-arm1020.S +++ b/arch/arm/mm/proc-arm1020.S | |||
@@ -241,6 +241,7 @@ ENTRY(arm1020_coherent_user_range) | |||
241 | cmp r0, r1 | 241 | cmp r0, r1 |
242 | blo 1b | 242 | blo 1b |
243 | mcr p15, 0, ip, c7, c10, 4 @ drain WB | 243 | mcr p15, 0, ip, c7, c10, 4 @ drain WB |
244 | mov r0, #0 | ||
244 | mov pc, lr | 245 | mov pc, lr |
245 | 246 | ||
246 | /* | 247 | /* |
diff --git a/arch/arm/mm/proc-arm1020e.S b/arch/arm/mm/proc-arm1020e.S index c244b06caac..4188478325a 100644 --- a/arch/arm/mm/proc-arm1020e.S +++ b/arch/arm/mm/proc-arm1020e.S | |||
@@ -235,6 +235,7 @@ ENTRY(arm1020e_coherent_user_range) | |||
235 | cmp r0, r1 | 235 | cmp r0, r1 |
236 | blo 1b | 236 | blo 1b |
237 | mcr p15, 0, ip, c7, c10, 4 @ drain WB | 237 | mcr p15, 0, ip, c7, c10, 4 @ drain WB |
238 | mov r0, #0 | ||
238 | mov pc, lr | 239 | mov pc, lr |
239 | 240 | ||
240 | /* | 241 | /* |
diff --git a/arch/arm/mm/proc-arm1022.S b/arch/arm/mm/proc-arm1022.S index 38fe22efd18..33c68824bff 100644 --- a/arch/arm/mm/proc-arm1022.S +++ b/arch/arm/mm/proc-arm1022.S | |||
@@ -224,6 +224,7 @@ ENTRY(arm1022_coherent_user_range) | |||
224 | cmp r0, r1 | 224 | cmp r0, r1 |
225 | blo 1b | 225 | blo 1b |
226 | mcr p15, 0, ip, c7, c10, 4 @ drain WB | 226 | mcr p15, 0, ip, c7, c10, 4 @ drain WB |
227 | mov r0, #0 | ||
227 | mov pc, lr | 228 | mov pc, lr |
228 | 229 | ||
229 | /* | 230 | /* |
diff --git a/arch/arm/mm/proc-arm1026.S b/arch/arm/mm/proc-arm1026.S index 3eb9c3c26c7..fbc1d5fc24d 100644 --- a/arch/arm/mm/proc-arm1026.S +++ b/arch/arm/mm/proc-arm1026.S | |||
@@ -218,6 +218,7 @@ ENTRY(arm1026_coherent_user_range) | |||
218 | cmp r0, r1 | 218 | cmp r0, r1 |
219 | blo 1b | 219 | blo 1b |
220 | mcr p15, 0, ip, c7, c10, 4 @ drain WB | 220 | mcr p15, 0, ip, c7, c10, 4 @ drain WB |
221 | mov r0, #0 | ||
221 | mov pc, lr | 222 | mov pc, lr |
222 | 223 | ||
223 | /* | 224 | /* |
diff --git a/arch/arm/mm/proc-arm6_7.S b/arch/arm/mm/proc-arm6_7.S deleted file mode 100644 index 4fbeb5b8e6c..00000000000 --- a/arch/arm/mm/proc-arm6_7.S +++ /dev/null | |||
@@ -1,327 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mm/proc-arm6,7.S | ||
3 | * | ||
4 | * Copyright (C) 1997-2000 Russell King | ||
5 | * hacked for non-paged-MM by Hyok S. Choi, 2003. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | * These are the low level assembler for performing cache and TLB | ||
12 | * functions on the ARM610 & ARM710. | ||
13 | */ | ||
14 | #include <linux/linkage.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <asm/assembler.h> | ||
17 | #include <asm/asm-offsets.h> | ||
18 | #include <asm/hwcap.h> | ||
19 | #include <asm/pgtable-hwdef.h> | ||
20 | #include <asm/pgtable.h> | ||
21 | #include <asm/ptrace.h> | ||
22 | |||
23 | #include "proc-macros.S" | ||
24 | |||
25 | ENTRY(cpu_arm6_dcache_clean_area) | ||
26 | ENTRY(cpu_arm7_dcache_clean_area) | ||
27 | mov pc, lr | ||
28 | |||
29 | /* | ||
30 | * Function: arm6_7_data_abort () | ||
31 | * | ||
32 | * Params : r2 = pt_regs | ||
33 | * : r4 = aborted context pc | ||
34 | * : r5 = aborted context psr | ||
35 | * | ||
36 | * Purpose : obtain information about current aborted instruction | ||
37 | * | ||
38 | * Returns : r4-r5, r10-r11, r13 preserved | ||
39 | */ | ||
40 | |||
41 | ENTRY(cpu_arm7_data_abort) | ||
42 | mrc p15, 0, r1, c5, c0, 0 @ get FSR | ||
43 | mrc p15, 0, r0, c6, c0, 0 @ get FAR | ||
44 | ldr r8, [r4] @ read arm instruction | ||
45 | tst r8, #1 << 20 @ L = 0 -> write? | ||
46 | orreq r1, r1, #1 << 11 @ yes. | ||
47 | and r7, r8, #15 << 24 | ||
48 | add pc, pc, r7, lsr #22 @ Now branch to the relevant processing routine | ||
49 | nop | ||
50 | |||
51 | /* 0 */ b .data_unknown | ||
52 | /* 1 */ b do_DataAbort @ swp | ||
53 | /* 2 */ b .data_unknown | ||
54 | /* 3 */ b .data_unknown | ||
55 | /* 4 */ b .data_arm_lateldrpostconst @ ldr rd, [rn], #m | ||
56 | /* 5 */ b .data_arm_lateldrpreconst @ ldr rd, [rn, #m] | ||
57 | /* 6 */ b .data_arm_lateldrpostreg @ ldr rd, [rn], rm | ||
58 | /* 7 */ b .data_arm_lateldrprereg @ ldr rd, [rn, rm] | ||
59 | /* 8 */ b .data_arm_ldmstm @ ldm*a rn, <rlist> | ||
60 | /* 9 */ b .data_arm_ldmstm @ ldm*b rn, <rlist> | ||
61 | /* a */ b .data_unknown | ||
62 | /* b */ b .data_unknown | ||
63 | /* c */ b do_DataAbort @ ldc rd, [rn], #m @ Same as ldr rd, [rn], #m | ||
64 | /* d */ b do_DataAbort @ ldc rd, [rn, #m] | ||
65 | /* e */ b .data_unknown | ||
66 | /* f */ | ||
67 | .data_unknown: @ Part of jumptable | ||
68 | mov r0, r4 | ||
69 | mov r1, r8 | ||
70 | b baddataabort | ||
71 | |||
72 | ENTRY(cpu_arm6_data_abort) | ||
73 | mrc p15, 0, r1, c5, c0, 0 @ get FSR | ||
74 | mrc p15, 0, r0, c6, c0, 0 @ get FAR | ||
75 | ldr r8, [r4] @ read arm instruction | ||
76 | tst r8, #1 << 20 @ L = 0 -> write? | ||
77 | orreq r1, r1, #1 << 11 @ yes. | ||
78 | and r7, r8, #14 << 24 | ||
79 | teq r7, #8 << 24 @ was it ldm/stm | ||
80 | bne do_DataAbort | ||
81 | |||
82 | .data_arm_ldmstm: | ||
83 | tst r8, #1 << 21 @ check writeback bit | ||
84 | beq do_DataAbort @ no writeback -> no fixup | ||
85 | mov r7, #0x11 | ||
86 | orr r7, r7, #0x1100 | ||
87 | and r6, r8, r7 | ||
88 | and r9, r8, r7, lsl #1 | ||
89 | add r6, r6, r9, lsr #1 | ||
90 | and r9, r8, r7, lsl #2 | ||
91 | add r6, r6, r9, lsr #2 | ||
92 | and r9, r8, r7, lsl #3 | ||
93 | add r6, r6, r9, lsr #3 | ||
94 | add r6, r6, r6, lsr #8 | ||
95 | add r6, r6, r6, lsr #4 | ||
96 | and r6, r6, #15 @ r6 = no. of registers to transfer. | ||
97 | and r9, r8, #15 << 16 @ Extract 'n' from instruction | ||
98 | ldr r7, [r2, r9, lsr #14] @ Get register 'Rn' | ||
99 | tst r8, #1 << 23 @ Check U bit | ||
100 | subne r7, r7, r6, lsl #2 @ Undo increment | ||
101 | addeq r7, r7, r6, lsl #2 @ Undo decrement | ||
102 | str r7, [r2, r9, lsr #14] @ Put register 'Rn' | ||
103 | b do_DataAbort | ||
104 | |||
105 | .data_arm_apply_r6_and_rn: | ||
106 | and r9, r8, #15 << 16 @ Extract 'n' from instruction | ||
107 | ldr r7, [r2, r9, lsr #14] @ Get register 'Rn' | ||
108 | tst r8, #1 << 23 @ Check U bit | ||
109 | subne r7, r7, r6 @ Undo incrmenet | ||
110 | addeq r7, r7, r6 @ Undo decrement | ||
111 | str r7, [r2, r9, lsr #14] @ Put register 'Rn' | ||
112 | b do_DataAbort | ||
113 | |||
114 | .data_arm_lateldrpreconst: | ||
115 | tst r8, #1 << 21 @ check writeback bit | ||
116 | beq do_DataAbort @ no writeback -> no fixup | ||
117 | .data_arm_lateldrpostconst: | ||
118 | movs r6, r8, lsl #20 @ Get offset | ||
119 | beq do_DataAbort @ zero -> no fixup | ||
120 | and r9, r8, #15 << 16 @ Extract 'n' from instruction | ||
121 | ldr r7, [r2, r9, lsr #14] @ Get register 'Rn' | ||
122 | tst r8, #1 << 23 @ Check U bit | ||
123 | subne r7, r7, r6, lsr #20 @ Undo increment | ||
124 | addeq r7, r7, r6, lsr #20 @ Undo decrement | ||
125 | str r7, [r2, r9, lsr #14] @ Put register 'Rn' | ||
126 | b do_DataAbort | ||
127 | |||
128 | .data_arm_lateldrprereg: | ||
129 | tst r8, #1 << 21 @ check writeback bit | ||
130 | beq do_DataAbort @ no writeback -> no fixup | ||
131 | .data_arm_lateldrpostreg: | ||
132 | and r7, r8, #15 @ Extract 'm' from instruction | ||
133 | ldr r6, [r2, r7, lsl #2] @ Get register 'Rm' | ||
134 | mov r9, r8, lsr #7 @ get shift count | ||
135 | ands r9, r9, #31 | ||
136 | and r7, r8, #0x70 @ get shift type | ||
137 | orreq r7, r7, #8 @ shift count = 0 | ||
138 | add pc, pc, r7 | ||
139 | nop | ||
140 | |||
141 | mov r6, r6, lsl r9 @ 0: LSL #!0 | ||
142 | b .data_arm_apply_r6_and_rn | ||
143 | b .data_arm_apply_r6_and_rn @ 1: LSL #0 | ||
144 | nop | ||
145 | b .data_unknown @ 2: MUL? | ||
146 | nop | ||
147 | b .data_unknown @ 3: MUL? | ||
148 | nop | ||
149 | mov r6, r6, lsr r9 @ 4: LSR #!0 | ||
150 | b .data_arm_apply_r6_and_rn | ||
151 | mov r6, r6, lsr #32 @ 5: LSR #32 | ||
152 | b .data_arm_apply_r6_and_rn | ||
153 | b .data_unknown @ 6: MUL? | ||
154 | nop | ||
155 | b .data_unknown @ 7: MUL? | ||
156 | nop | ||
157 | mov r6, r6, asr r9 @ 8: ASR #!0 | ||
158 | b .data_arm_apply_r6_and_rn | ||
159 | mov r6, r6, asr #32 @ 9: ASR #32 | ||
160 | b .data_arm_apply_r6_and_rn | ||
161 | b .data_unknown @ A: MUL? | ||
162 | nop | ||
163 | b .data_unknown @ B: MUL? | ||
164 | nop | ||
165 | mov r6, r6, ror r9 @ C: ROR #!0 | ||
166 | b .data_arm_apply_r6_and_rn | ||
167 | mov r6, r6, rrx @ D: RRX | ||
168 | b .data_arm_apply_r6_and_rn | ||
169 | b .data_unknown @ E: MUL? | ||
170 | nop | ||
171 | b .data_unknown @ F: MUL? | ||
172 | |||
173 | /* | ||
174 | * Function: arm6_7_proc_init (void) | ||
175 | * : arm6_7_proc_fin (void) | ||
176 | * | ||
177 | * Notes : This processor does not require these | ||
178 | */ | ||
179 | ENTRY(cpu_arm6_proc_init) | ||
180 | ENTRY(cpu_arm7_proc_init) | ||
181 | mov pc, lr | ||
182 | |||
183 | ENTRY(cpu_arm6_proc_fin) | ||
184 | ENTRY(cpu_arm7_proc_fin) | ||
185 | mov r0, #0x31 @ ....S..DP...M | ||
186 | mcr p15, 0, r0, c1, c0, 0 @ disable caches | ||
187 | mov pc, lr | ||
188 | |||
189 | ENTRY(cpu_arm6_do_idle) | ||
190 | ENTRY(cpu_arm7_do_idle) | ||
191 | mov pc, lr | ||
192 | |||
193 | /* | ||
194 | * Function: arm6_7_switch_mm(unsigned long pgd_phys) | ||
195 | * Params : pgd_phys Physical address of page table | ||
196 | * Purpose : Perform a task switch, saving the old processes state, and restoring | ||
197 | * the new. | ||
198 | */ | ||
199 | ENTRY(cpu_arm6_switch_mm) | ||
200 | ENTRY(cpu_arm7_switch_mm) | ||
201 | #ifdef CONFIG_MMU | ||
202 | mov r1, #0 | ||
203 | mcr p15, 0, r1, c7, c0, 0 @ flush cache | ||
204 | mcr p15, 0, r0, c2, c0, 0 @ update page table ptr | ||
205 | mcr p15, 0, r1, c5, c0, 0 @ flush TLBs | ||
206 | #endif | ||
207 | mov pc, lr | ||
208 | |||
209 | /* | ||
210 | * Function: arm6_7_set_pte_ext(pte_t *ptep, pte_t pte, unsigned int ext) | ||
211 | * Params : r0 = Address to set | ||
212 | * : r1 = value to set | ||
213 | * Purpose : Set a PTE and flush it out of any WB cache | ||
214 | */ | ||
215 | .align 5 | ||
216 | ENTRY(cpu_arm6_set_pte_ext) | ||
217 | ENTRY(cpu_arm7_set_pte_ext) | ||
218 | #ifdef CONFIG_MMU | ||
219 | armv3_set_pte_ext wc_disable=0 | ||
220 | #endif /* CONFIG_MMU */ | ||
221 | mov pc, lr | ||
222 | |||
223 | /* | ||
224 | * Function: _arm6_7_reset | ||
225 | * Params : r0 = address to jump to | ||
226 | * Notes : This sets up everything for a reset | ||
227 | */ | ||
228 | .pushsection .idmap.text, "ax" | ||
229 | ENTRY(cpu_arm6_reset) | ||
230 | ENTRY(cpu_arm7_reset) | ||
231 | mov r1, #0 | ||
232 | mcr p15, 0, r1, c7, c0, 0 @ flush cache | ||
233 | #ifdef CONFIG_MMU | ||
234 | mcr p15, 0, r1, c5, c0, 0 @ flush TLB | ||
235 | #endif | ||
236 | mov r1, #0x30 | ||
237 | mcr p15, 0, r1, c1, c0, 0 @ turn off MMU etc | ||
238 | mov pc, r0 | ||
239 | ENDPROC(cpu_arm6_reset) | ||
240 | ENDPROC(cpu_arm7_reset) | ||
241 | .popsection | ||
242 | |||
243 | __CPUINIT | ||
244 | |||
245 | .type __arm6_setup, #function | ||
246 | __arm6_setup: mov r0, #0 | ||
247 | mcr p15, 0, r0, c7, c0 @ flush caches on v3 | ||
248 | #ifdef CONFIG_MMU | ||
249 | mcr p15, 0, r0, c5, c0 @ flush TLBs on v3 | ||
250 | mov r0, #0x3d @ . ..RS BLDP WCAM | ||
251 | orr r0, r0, #0x100 @ . ..01 0011 1101 | ||
252 | #else | ||
253 | mov r0, #0x3c @ . ..RS BLDP WCA. | ||
254 | #endif | ||
255 | mov pc, lr | ||
256 | .size __arm6_setup, . - __arm6_setup | ||
257 | |||
258 | .type __arm7_setup, #function | ||
259 | __arm7_setup: mov r0, #0 | ||
260 | mcr p15, 0, r0, c7, c0 @ flush caches on v3 | ||
261 | #ifdef CONFIG_MMU | ||
262 | mcr p15, 0, r0, c5, c0 @ flush TLBs on v3 | ||
263 | mcr p15, 0, r0, c3, c0 @ load domain access register | ||
264 | mov r0, #0x7d @ . ..RS BLDP WCAM | ||
265 | orr r0, r0, #0x100 @ . ..01 0111 1101 | ||
266 | #else | ||
267 | mov r0, #0x7c @ . ..RS BLDP WCA. | ||
268 | #endif | ||
269 | mov pc, lr | ||
270 | .size __arm7_setup, . - __arm7_setup | ||
271 | |||
272 | __INITDATA | ||
273 | |||
274 | @ define struct processor (see <asm/proc-fns.h> and proc-macros.S) | ||
275 | define_processor_functions arm6, dabort=cpu_arm6_data_abort, pabort=legacy_pabort | ||
276 | define_processor_functions arm7, dabort=cpu_arm7_data_abort, pabort=legacy_pabort | ||
277 | |||
278 | .section ".rodata" | ||
279 | |||
280 | string cpu_arch_name, "armv3" | ||
281 | string cpu_elf_name, "v3" | ||
282 | string cpu_arm6_name, "ARM6" | ||
283 | string cpu_arm610_name, "ARM610" | ||
284 | string cpu_arm7_name, "ARM7" | ||
285 | string cpu_arm710_name, "ARM710" | ||
286 | |||
287 | .align | ||
288 | |||
289 | .section ".proc.info.init", #alloc, #execinstr | ||
290 | |||
291 | .macro arm67_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, \ | ||
292 | cpu_mm_mmu_flags:req, cpu_flush:req, cpu_proc_funcs:req | ||
293 | .type __\name\()_proc_info, #object | ||
294 | __\name\()_proc_info: | ||
295 | .long \cpu_val | ||
296 | .long \cpu_mask | ||
297 | .long \cpu_mm_mmu_flags | ||
298 | .long PMD_TYPE_SECT | \ | ||
299 | PMD_BIT4 | \ | ||
300 | PMD_SECT_AP_WRITE | \ | ||
301 | PMD_SECT_AP_READ | ||
302 | b \cpu_flush | ||
303 | .long cpu_arch_name | ||
304 | .long cpu_elf_name | ||
305 | .long HWCAP_SWP | HWCAP_26BIT | ||
306 | .long \cpu_name | ||
307 | .long \cpu_proc_funcs | ||
308 | .long v3_tlb_fns | ||
309 | .long v3_user_fns | ||
310 | .long v3_cache_fns | ||
311 | .size __\name\()_proc_info, . - __\name\()_proc_info | ||
312 | .endm | ||
313 | |||
314 | arm67_proc_info arm6, 0x41560600, 0xfffffff0, cpu_arm6_name, \ | ||
315 | 0x00000c1e, __arm6_setup, arm6_processor_functions | ||
316 | arm67_proc_info arm610, 0x41560610, 0xfffffff0, cpu_arm610_name, \ | ||
317 | 0x00000c1e, __arm6_setup, arm6_processor_functions | ||
318 | arm67_proc_info arm7, 0x41007000, 0xffffff00, cpu_arm7_name, \ | ||
319 | 0x00000c1e, __arm7_setup, arm7_processor_functions | ||
320 | arm67_proc_info arm710, 0x41007100, 0xfff8ff00, cpu_arm710_name, \ | ||
321 | PMD_TYPE_SECT | \ | ||
322 | PMD_SECT_BUFFERABLE | \ | ||
323 | PMD_SECT_CACHEABLE | \ | ||
324 | PMD_BIT4 | \ | ||
325 | PMD_SECT_AP_WRITE | \ | ||
326 | PMD_SECT_AP_READ, \ | ||
327 | __arm7_setup, arm7_processor_functions | ||
diff --git a/arch/arm/mm/proc-arm920.S b/arch/arm/mm/proc-arm920.S index cb941ae95f6..1a8c138eb89 100644 --- a/arch/arm/mm/proc-arm920.S +++ b/arch/arm/mm/proc-arm920.S | |||
@@ -210,6 +210,7 @@ ENTRY(arm920_coherent_user_range) | |||
210 | cmp r0, r1 | 210 | cmp r0, r1 |
211 | blo 1b | 211 | blo 1b |
212 | mcr p15, 0, r0, c7, c10, 4 @ drain WB | 212 | mcr p15, 0, r0, c7, c10, 4 @ drain WB |
213 | mov r0, #0 | ||
213 | mov pc, lr | 214 | mov pc, lr |
214 | 215 | ||
215 | /* | 216 | /* |
diff --git a/arch/arm/mm/proc-arm922.S b/arch/arm/mm/proc-arm922.S index 4ec0e074dd5..4c44d7e1c3c 100644 --- a/arch/arm/mm/proc-arm922.S +++ b/arch/arm/mm/proc-arm922.S | |||
@@ -212,6 +212,7 @@ ENTRY(arm922_coherent_user_range) | |||
212 | cmp r0, r1 | 212 | cmp r0, r1 |
213 | blo 1b | 213 | blo 1b |
214 | mcr p15, 0, r0, c7, c10, 4 @ drain WB | 214 | mcr p15, 0, r0, c7, c10, 4 @ drain WB |
215 | mov r0, #0 | ||
215 | mov pc, lr | 216 | mov pc, lr |
216 | 217 | ||
217 | /* | 218 | /* |
diff --git a/arch/arm/mm/proc-arm925.S b/arch/arm/mm/proc-arm925.S index 9dccd9a365b..ec5b1180994 100644 --- a/arch/arm/mm/proc-arm925.S +++ b/arch/arm/mm/proc-arm925.S | |||
@@ -258,6 +258,7 @@ ENTRY(arm925_coherent_user_range) | |||
258 | cmp r0, r1 | 258 | cmp r0, r1 |
259 | blo 1b | 259 | blo 1b |
260 | mcr p15, 0, r0, c7, c10, 4 @ drain WB | 260 | mcr p15, 0, r0, c7, c10, 4 @ drain WB |
261 | mov r0, #0 | ||
261 | mov pc, lr | 262 | mov pc, lr |
262 | 263 | ||
263 | /* | 264 | /* |
diff --git a/arch/arm/mm/proc-arm926.S b/arch/arm/mm/proc-arm926.S index 820259b81a1..c31e62c606c 100644 --- a/arch/arm/mm/proc-arm926.S +++ b/arch/arm/mm/proc-arm926.S | |||
@@ -221,6 +221,7 @@ ENTRY(arm926_coherent_user_range) | |||
221 | cmp r0, r1 | 221 | cmp r0, r1 |
222 | blo 1b | 222 | blo 1b |
223 | mcr p15, 0, r0, c7, c10, 4 @ drain WB | 223 | mcr p15, 0, r0, c7, c10, 4 @ drain WB |
224 | mov r0, #0 | ||
224 | mov pc, lr | 225 | mov pc, lr |
225 | 226 | ||
226 | /* | 227 | /* |
diff --git a/arch/arm/mm/proc-arm940.S b/arch/arm/mm/proc-arm940.S index 9fdc0a17097..a613a7dd714 100644 --- a/arch/arm/mm/proc-arm940.S +++ b/arch/arm/mm/proc-arm940.S | |||
@@ -160,7 +160,7 @@ ENTRY(arm940_coherent_user_range) | |||
160 | * - size - region size | 160 | * - size - region size |
161 | */ | 161 | */ |
162 | ENTRY(arm940_flush_kern_dcache_area) | 162 | ENTRY(arm940_flush_kern_dcache_area) |
163 | mov ip, #0 | 163 | mov r0, #0 |
164 | mov r1, #(CACHE_DSEGMENTS - 1) << 4 @ 4 segments | 164 | mov r1, #(CACHE_DSEGMENTS - 1) << 4 @ 4 segments |
165 | 1: orr r3, r1, #(CACHE_DENTRIES - 1) << 26 @ 64 entries | 165 | 1: orr r3, r1, #(CACHE_DENTRIES - 1) << 26 @ 64 entries |
166 | 2: mcr p15, 0, r3, c7, c14, 2 @ clean/flush D index | 166 | 2: mcr p15, 0, r3, c7, c14, 2 @ clean/flush D index |
@@ -168,8 +168,8 @@ ENTRY(arm940_flush_kern_dcache_area) | |||
168 | bcs 2b @ entries 63 to 0 | 168 | bcs 2b @ entries 63 to 0 |
169 | subs r1, r1, #1 << 4 | 169 | subs r1, r1, #1 << 4 |
170 | bcs 1b @ segments 7 to 0 | 170 | bcs 1b @ segments 7 to 0 |
171 | mcr p15, 0, ip, c7, c5, 0 @ invalidate I cache | 171 | mcr p15, 0, r0, c7, c5, 0 @ invalidate I cache |
172 | mcr p15, 0, ip, c7, c10, 4 @ drain WB | 172 | mcr p15, 0, r0, c7, c10, 4 @ drain WB |
173 | mov pc, lr | 173 | mov pc, lr |
174 | 174 | ||
175 | /* | 175 | /* |
diff --git a/arch/arm/mm/proc-arm946.S b/arch/arm/mm/proc-arm946.S index f684cfedcca..9f4f2999fdd 100644 --- a/arch/arm/mm/proc-arm946.S +++ b/arch/arm/mm/proc-arm946.S | |||
@@ -190,6 +190,7 @@ ENTRY(arm946_coherent_user_range) | |||
190 | cmp r0, r1 | 190 | cmp r0, r1 |
191 | blo 1b | 191 | blo 1b |
192 | mcr p15, 0, r0, c7, c10, 4 @ drain WB | 192 | mcr p15, 0, r0, c7, c10, 4 @ drain WB |
193 | mov r0, #0 | ||
193 | mov pc, lr | 194 | mov pc, lr |
194 | 195 | ||
195 | /* | 196 | /* |
diff --git a/arch/arm/mm/proc-feroceon.S b/arch/arm/mm/proc-feroceon.S index ba3c500584a..23a8e4c7f2b 100644 --- a/arch/arm/mm/proc-feroceon.S +++ b/arch/arm/mm/proc-feroceon.S | |||
@@ -232,6 +232,7 @@ ENTRY(feroceon_coherent_user_range) | |||
232 | cmp r0, r1 | 232 | cmp r0, r1 |
233 | blo 1b | 233 | blo 1b |
234 | mcr p15, 0, r0, c7, c10, 4 @ drain WB | 234 | mcr p15, 0, r0, c7, c10, 4 @ drain WB |
235 | mov r0, #0 | ||
235 | mov pc, lr | 236 | mov pc, lr |
236 | 237 | ||
237 | /* | 238 | /* |
diff --git a/arch/arm/mm/proc-mohawk.S b/arch/arm/mm/proc-mohawk.S index cdfedc5b8ad..b0475468c71 100644 --- a/arch/arm/mm/proc-mohawk.S +++ b/arch/arm/mm/proc-mohawk.S | |||
@@ -193,6 +193,7 @@ ENTRY(mohawk_coherent_user_range) | |||
193 | cmp r0, r1 | 193 | cmp r0, r1 |
194 | blo 1b | 194 | blo 1b |
195 | mcr p15, 0, r0, c7, c10, 4 @ drain WB | 195 | mcr p15, 0, r0, c7, c10, 4 @ drain WB |
196 | mov r0, #0 | ||
196 | mov pc, lr | 197 | mov pc, lr |
197 | 198 | ||
198 | /* | 199 | /* |
diff --git a/arch/arm/mm/proc-v7-2level.S b/arch/arm/mm/proc-v7-2level.S index 3a4b3e7b888..42ac069c801 100644 --- a/arch/arm/mm/proc-v7-2level.S +++ b/arch/arm/mm/proc-v7-2level.S | |||
@@ -49,15 +49,10 @@ ENTRY(cpu_v7_switch_mm) | |||
49 | #ifdef CONFIG_ARM_ERRATA_754322 | 49 | #ifdef CONFIG_ARM_ERRATA_754322 |
50 | dsb | 50 | dsb |
51 | #endif | 51 | #endif |
52 | mcr p15, 0, r2, c13, c0, 1 @ set reserved context ID | ||
53 | isb | ||
54 | 1: mcr p15, 0, r0, c2, c0, 0 @ set TTB 0 | ||
55 | isb | ||
56 | #ifdef CONFIG_ARM_ERRATA_754322 | ||
57 | dsb | ||
58 | #endif | ||
59 | mcr p15, 0, r1, c13, c0, 1 @ set context ID | 52 | mcr p15, 0, r1, c13, c0, 1 @ set context ID |
60 | isb | 53 | isb |
54 | mcr p15, 0, r0, c2, c0, 0 @ set TTB 0 | ||
55 | isb | ||
61 | #endif | 56 | #endif |
62 | mov pc, lr | 57 | mov pc, lr |
63 | ENDPROC(cpu_v7_switch_mm) | 58 | ENDPROC(cpu_v7_switch_mm) |
diff --git a/arch/arm/mm/tlb-v3.S b/arch/arm/mm/tlb-v3.S deleted file mode 100644 index d253995ec4c..00000000000 --- a/arch/arm/mm/tlb-v3.S +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mm/tlbv3.S | ||
3 | * | ||
4 | * Copyright (C) 1997-2002 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * ARM architecture version 3 TLB handling functions. | ||
11 | * | ||
12 | * Processors: ARM610, ARM710. | ||
13 | */ | ||
14 | #include <linux/linkage.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <asm/asm-offsets.h> | ||
17 | #include <asm/tlbflush.h> | ||
18 | #include "proc-macros.S" | ||
19 | |||
20 | .align 5 | ||
21 | /* | ||
22 | * v3_flush_user_tlb_range(start, end, mm) | ||
23 | * | ||
24 | * Invalidate a range of TLB entries in the specified address space. | ||
25 | * | ||
26 | * - start - range start address | ||
27 | * - end - range end address | ||
28 | * - mm - mm_struct describing address space | ||
29 | */ | ||
30 | .align 5 | ||
31 | ENTRY(v3_flush_user_tlb_range) | ||
32 | vma_vm_mm r2, r2 | ||
33 | act_mm r3 @ get current->active_mm | ||
34 | teq r2, r3 @ == mm ? | ||
35 | movne pc, lr @ no, we dont do anything | ||
36 | ENTRY(v3_flush_kern_tlb_range) | ||
37 | bic r0, r0, #0x0ff | ||
38 | bic r0, r0, #0xf00 | ||
39 | 1: mcr p15, 0, r0, c6, c0, 0 @ invalidate TLB entry | ||
40 | add r0, r0, #PAGE_SZ | ||
41 | cmp r0, r1 | ||
42 | blo 1b | ||
43 | mov pc, lr | ||
44 | |||
45 | __INITDATA | ||
46 | |||
47 | /* define struct cpu_tlb_fns (see <asm/tlbflush.h> and proc-macros.S) */ | ||
48 | define_tlb_functions v3, v3_tlb_flags | ||
diff --git a/arch/arm/plat-iop/pci.c b/arch/arm/plat-iop/pci.c index 0da42058a20..8daae9b230e 100644 --- a/arch/arm/plat-iop/pci.c +++ b/arch/arm/plat-iop/pci.c | |||
@@ -160,7 +160,7 @@ iop3xx_write_config(struct pci_bus *bus, unsigned int devfn, int where, | |||
160 | return PCIBIOS_SUCCESSFUL; | 160 | return PCIBIOS_SUCCESSFUL; |
161 | } | 161 | } |
162 | 162 | ||
163 | static struct pci_ops iop3xx_ops = { | 163 | struct pci_ops iop3xx_ops = { |
164 | .read = iop3xx_read_config, | 164 | .read = iop3xx_read_config, |
165 | .write = iop3xx_write_config, | 165 | .write = iop3xx_write_config, |
166 | }; | 166 | }; |
@@ -220,12 +220,6 @@ int iop3xx_pci_setup(int nr, struct pci_sys_data *sys) | |||
220 | return 1; | 220 | return 1; |
221 | } | 221 | } |
222 | 222 | ||
223 | struct pci_bus *iop3xx_pci_scan_bus(int nr, struct pci_sys_data *sys) | ||
224 | { | ||
225 | return pci_scan_root_bus(NULL, sys->busnr, &iop3xx_ops, sys, | ||
226 | &sys->resources); | ||
227 | } | ||
228 | |||
229 | void __init iop3xx_atu_setup(void) | 223 | void __init iop3xx_atu_setup(void) |
230 | { | 224 | { |
231 | /* BAR 0 ( Disabled ) */ | 225 | /* BAR 0 ( Disabled ) */ |
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx51.h b/arch/arm/plat-mxc/include/mach/iomux-mx51.h index c7f5169a6a5..36c8989d9de 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-mx51.h +++ b/arch/arm/plat-mxc/include/mach/iomux-mx51.h | |||
@@ -256,13 +256,13 @@ | |||
256 | #define MX51_PAD_NANDF_RB1__GPIO3_9 IOMUX_PAD(0x4fc, 0x120, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | 256 | #define MX51_PAD_NANDF_RB1__GPIO3_9 IOMUX_PAD(0x4fc, 0x120, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) |
257 | #define MX51_PAD_NANDF_RB1__NANDF_RB1 IOMUX_PAD(0x4fc, 0x120, 0, __NA_, 0, NO_PAD_CTRL) | 257 | #define MX51_PAD_NANDF_RB1__NANDF_RB1 IOMUX_PAD(0x4fc, 0x120, 0, __NA_, 0, NO_PAD_CTRL) |
258 | #define MX51_PAD_NANDF_RB1__PATA_IORDY IOMUX_PAD(0x4fc, 0x120, 1, __NA_, 0, NO_PAD_CTRL) | 258 | #define MX51_PAD_NANDF_RB1__PATA_IORDY IOMUX_PAD(0x4fc, 0x120, 1, __NA_, 0, NO_PAD_CTRL) |
259 | #define MX51_PAD_NANDF_RB1__SD4_CMD IOMUX_PAD(0x4fc, 0x120, 5, __NA_, 0, MX51_SDHCI_PAD_CTRL) | 259 | #define MX51_PAD_NANDF_RB1__SD4_CMD IOMUX_PAD(0x4fc, 0x120, 0x15, __NA_, 0, MX51_SDHCI_PAD_CTRL) |
260 | #define MX51_PAD_NANDF_RB2__DISP2_WAIT IOMUX_PAD(0x500, 0x124, 5, 0x9a8, 0, NO_PAD_CTRL) | 260 | #define MX51_PAD_NANDF_RB2__DISP2_WAIT IOMUX_PAD(0x500, 0x124, 5, 0x9a8, 0, NO_PAD_CTRL) |
261 | #define MX51_PAD_NANDF_RB2__ECSPI2_SCLK IOMUX_PAD(0x500, 0x124, 2, __NA_, 0, MX51_ECSPI_PAD_CTRL) | 261 | #define MX51_PAD_NANDF_RB2__ECSPI2_SCLK IOMUX_PAD(0x500, 0x124, 2, __NA_, 0, MX51_ECSPI_PAD_CTRL) |
262 | #define MX51_PAD_NANDF_RB2__FEC_COL IOMUX_PAD(0x500, 0x124, 1, 0x94c, 0, MX51_PAD_CTRL_2) | 262 | #define MX51_PAD_NANDF_RB2__FEC_COL IOMUX_PAD(0x500, 0x124, 1, 0x94c, 0, MX51_PAD_CTRL_2) |
263 | #define MX51_PAD_NANDF_RB2__GPIO3_10 IOMUX_PAD(0x500, 0x124, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | 263 | #define MX51_PAD_NANDF_RB2__GPIO3_10 IOMUX_PAD(0x500, 0x124, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) |
264 | #define MX51_PAD_NANDF_RB2__NANDF_RB2 IOMUX_PAD(0x500, 0x124, 0, __NA_, 0, NO_PAD_CTRL) | 264 | #define MX51_PAD_NANDF_RB2__NANDF_RB2 IOMUX_PAD(0x500, 0x124, 0, __NA_, 0, NO_PAD_CTRL) |
265 | #define MX51_PAD_NANDF_RB2__USBH3_H3_DP IOMUX_PAD(0x500, 0x124, 7, __NA_, 0, NO_PAD_CTRL) | 265 | #define MX51_PAD_NANDF_RB2__USBH3_H3_DP IOMUX_PAD(0x500, 0x124, 0x17, __NA_, 0, NO_PAD_CTRL) |
266 | #define MX51_PAD_NANDF_RB2__USBH3_NXT IOMUX_PAD(0x500, 0x124, 6, 0xa20, 0, NO_PAD_CTRL) | 266 | #define MX51_PAD_NANDF_RB2__USBH3_NXT IOMUX_PAD(0x500, 0x124, 6, 0xa20, 0, NO_PAD_CTRL) |
267 | #define MX51_PAD_NANDF_RB3__DISP1_WAIT IOMUX_PAD(0x504, 0x128, 5, __NA_, 0, NO_PAD_CTRL) | 267 | #define MX51_PAD_NANDF_RB3__DISP1_WAIT IOMUX_PAD(0x504, 0x128, 5, __NA_, 0, NO_PAD_CTRL) |
268 | #define MX51_PAD_NANDF_RB3__ECSPI2_MISO IOMUX_PAD(0x504, 0x128, 2, __NA_, 0, MX51_ECSPI_PAD_CTRL) | 268 | #define MX51_PAD_NANDF_RB3__ECSPI2_MISO IOMUX_PAD(0x504, 0x128, 2, __NA_, 0, MX51_ECSPI_PAD_CTRL) |
@@ -270,7 +270,7 @@ | |||
270 | #define MX51_PAD_NANDF_RB3__GPIO3_11 IOMUX_PAD(0x504, 0x128, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | 270 | #define MX51_PAD_NANDF_RB3__GPIO3_11 IOMUX_PAD(0x504, 0x128, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) |
271 | #define MX51_PAD_NANDF_RB3__NANDF_RB3 IOMUX_PAD(0x504, 0x128, 0, __NA_, 0, NO_PAD_CTRL) | 271 | #define MX51_PAD_NANDF_RB3__NANDF_RB3 IOMUX_PAD(0x504, 0x128, 0, __NA_, 0, NO_PAD_CTRL) |
272 | #define MX51_PAD_NANDF_RB3__USBH3_CLK IOMUX_PAD(0x504, 0x128, 6, 0x9f8, 0, NO_PAD_CTRL) | 272 | #define MX51_PAD_NANDF_RB3__USBH3_CLK IOMUX_PAD(0x504, 0x128, 6, 0x9f8, 0, NO_PAD_CTRL) |
273 | #define MX51_PAD_NANDF_RB3__USBH3_H3_DM IOMUX_PAD(0x504, 0x128, 7, __NA_, 0, NO_PAD_CTRL) | 273 | #define MX51_PAD_NANDF_RB3__USBH3_H3_DM IOMUX_PAD(0x504, 0x128, 0x17, __NA_, 0, NO_PAD_CTRL) |
274 | #define MX51_PAD_GPIO_NAND__GPIO_NAND IOMUX_PAD(0x514, 0x12c, 0, 0x998, 0, MX51_GPIO_PAD_CTRL) | 274 | #define MX51_PAD_GPIO_NAND__GPIO_NAND IOMUX_PAD(0x514, 0x12c, 0, 0x998, 0, MX51_GPIO_PAD_CTRL) |
275 | #define MX51_PAD_GPIO_NAND__PATA_INTRQ IOMUX_PAD(0x514, 0x12c, 1, __NA_, 0, NO_PAD_CTRL) | 275 | #define MX51_PAD_GPIO_NAND__PATA_INTRQ IOMUX_PAD(0x514, 0x12c, 1, __NA_, 0, NO_PAD_CTRL) |
276 | #define MX51_PAD_NANDF_CS0__GPIO3_16 IOMUX_PAD(0x518, 0x130, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | 276 | #define MX51_PAD_NANDF_CS0__GPIO3_16 IOMUX_PAD(0x518, 0x130, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) |
@@ -283,13 +283,13 @@ | |||
283 | #define MX51_PAD_NANDF_CS2__NANDF_CS2 IOMUX_PAD(0x520, 0x138, 0, __NA_, 0, NO_PAD_CTRL) | 283 | #define MX51_PAD_NANDF_CS2__NANDF_CS2 IOMUX_PAD(0x520, 0x138, 0, __NA_, 0, NO_PAD_CTRL) |
284 | #define MX51_PAD_NANDF_CS2__PATA_CS_0 IOMUX_PAD(0x520, 0x138, 1, __NA_, 0, NO_PAD_CTRL) | 284 | #define MX51_PAD_NANDF_CS2__PATA_CS_0 IOMUX_PAD(0x520, 0x138, 1, __NA_, 0, NO_PAD_CTRL) |
285 | #define MX51_PAD_NANDF_CS2__SD4_CLK IOMUX_PAD(0x520, 0x138, 5, __NA_, 0, MX51_SDHCI_PAD_CTRL | PAD_CTL_HYS) | 285 | #define MX51_PAD_NANDF_CS2__SD4_CLK IOMUX_PAD(0x520, 0x138, 5, __NA_, 0, MX51_SDHCI_PAD_CTRL | PAD_CTL_HYS) |
286 | #define MX51_PAD_NANDF_CS2__USBH3_H1_DP IOMUX_PAD(0x520, 0x138, 7, __NA_, 0, NO_PAD_CTRL) | 286 | #define MX51_PAD_NANDF_CS2__USBH3_H1_DP IOMUX_PAD(0x520, 0x138, 0x17, __NA_, 0, NO_PAD_CTRL) |
287 | #define MX51_PAD_NANDF_CS3__FEC_MDC IOMUX_PAD(0x524, 0x13c, 2, __NA_, 0, MX51_PAD_CTRL_5) | 287 | #define MX51_PAD_NANDF_CS3__FEC_MDC IOMUX_PAD(0x524, 0x13c, 2, __NA_, 0, MX51_PAD_CTRL_5) |
288 | #define MX51_PAD_NANDF_CS3__GPIO3_19 IOMUX_PAD(0x524, 0x13c, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | 288 | #define MX51_PAD_NANDF_CS3__GPIO3_19 IOMUX_PAD(0x524, 0x13c, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) |
289 | #define MX51_PAD_NANDF_CS3__NANDF_CS3 IOMUX_PAD(0x524, 0x13c, 0, __NA_, 0, NO_PAD_CTRL) | 289 | #define MX51_PAD_NANDF_CS3__NANDF_CS3 IOMUX_PAD(0x524, 0x13c, 0, __NA_, 0, NO_PAD_CTRL) |
290 | #define MX51_PAD_NANDF_CS3__PATA_CS_1 IOMUX_PAD(0x524, 0x13c, 1, __NA_, 0, NO_PAD_CTRL) | 290 | #define MX51_PAD_NANDF_CS3__PATA_CS_1 IOMUX_PAD(0x524, 0x13c, 1, __NA_, 0, NO_PAD_CTRL) |
291 | #define MX51_PAD_NANDF_CS3__SD4_DAT0 IOMUX_PAD(0x524, 0x13c, 5, __NA_, 0, MX51_SDHCI_PAD_CTRL) | 291 | #define MX51_PAD_NANDF_CS3__SD4_DAT0 IOMUX_PAD(0x524, 0x13c, 5, __NA_, 0, MX51_SDHCI_PAD_CTRL) |
292 | #define MX51_PAD_NANDF_CS3__USBH3_H1_DM IOMUX_PAD(0x524, 0x13c, 7, __NA_, 0, NO_PAD_CTRL) | 292 | #define MX51_PAD_NANDF_CS3__USBH3_H1_DM IOMUX_PAD(0x524, 0x13c, 0x17, __NA_, 0, NO_PAD_CTRL) |
293 | #define MX51_PAD_NANDF_CS4__FEC_TDATA1 IOMUX_PAD(0x528, 0x140, 2, __NA_, 0, MX51_PAD_CTRL_5) | 293 | #define MX51_PAD_NANDF_CS4__FEC_TDATA1 IOMUX_PAD(0x528, 0x140, 2, __NA_, 0, MX51_PAD_CTRL_5) |
294 | #define MX51_PAD_NANDF_CS4__GPIO3_20 IOMUX_PAD(0x528, 0x140, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | 294 | #define MX51_PAD_NANDF_CS4__GPIO3_20 IOMUX_PAD(0x528, 0x140, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) |
295 | #define MX51_PAD_NANDF_CS4__NANDF_CS4 IOMUX_PAD(0x528, 0x140, 0, __NA_, 0, NO_PAD_CTRL) | 295 | #define MX51_PAD_NANDF_CS4__NANDF_CS4 IOMUX_PAD(0x528, 0x140, 0, __NA_, 0, NO_PAD_CTRL) |
@@ -316,7 +316,7 @@ | |||
316 | #define MX51_PAD_NANDF_RDY_INT__FEC_TX_CLK IOMUX_PAD(0x538, 0x150, 1, 0x974, 0, MX51_PAD_CTRL_4) | 316 | #define MX51_PAD_NANDF_RDY_INT__FEC_TX_CLK IOMUX_PAD(0x538, 0x150, 1, 0x974, 0, MX51_PAD_CTRL_4) |
317 | #define MX51_PAD_NANDF_RDY_INT__GPIO3_24 IOMUX_PAD(0x538, 0x150, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | 317 | #define MX51_PAD_NANDF_RDY_INT__GPIO3_24 IOMUX_PAD(0x538, 0x150, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) |
318 | #define MX51_PAD_NANDF_RDY_INT__NANDF_RDY_INT IOMUX_PAD(0x538, 0x150, 0, 0x938, 0, NO_PAD_CTRL) | 318 | #define MX51_PAD_NANDF_RDY_INT__NANDF_RDY_INT IOMUX_PAD(0x538, 0x150, 0, 0x938, 0, NO_PAD_CTRL) |
319 | #define MX51_PAD_NANDF_RDY_INT__SD3_CMD IOMUX_PAD(0x538, 0x150, 5, __NA_, 0, MX51_SDHCI_PAD_CTRL) | 319 | #define MX51_PAD_NANDF_RDY_INT__SD3_CMD IOMUX_PAD(0x538, 0x150, 0x15, __NA_, 0, MX51_SDHCI_PAD_CTRL) |
320 | #define MX51_PAD_NANDF_D15__ECSPI2_MOSI IOMUX_PAD(0x53c, 0x154, 2, __NA_, 0, MX51_ECSPI_PAD_CTRL) | 320 | #define MX51_PAD_NANDF_D15__ECSPI2_MOSI IOMUX_PAD(0x53c, 0x154, 2, __NA_, 0, MX51_ECSPI_PAD_CTRL) |
321 | #define MX51_PAD_NANDF_D15__GPIO3_25 IOMUX_PAD(0x53c, 0x154, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) | 321 | #define MX51_PAD_NANDF_D15__GPIO3_25 IOMUX_PAD(0x53c, 0x154, 3, __NA_, 0, MX51_GPIO_PAD_CTRL) |
322 | #define MX51_PAD_NANDF_D15__NANDF_D15 IOMUX_PAD(0x53c, 0x154, 0, __NA_, 0, NO_PAD_CTRL) | 322 | #define MX51_PAD_NANDF_D15__NANDF_D15 IOMUX_PAD(0x53c, 0x154, 0, __NA_, 0, NO_PAD_CTRL) |
@@ -672,23 +672,23 @@ | |||
672 | #define MX51_PAD_DISP2_DAT5__DISP2_DAT5 IOMUX_PAD(0x770, 0x368, 0, __NA_, 0, NO_PAD_CTRL) | 672 | #define MX51_PAD_DISP2_DAT5__DISP2_DAT5 IOMUX_PAD(0x770, 0x368, 0, __NA_, 0, NO_PAD_CTRL) |
673 | #define MX51_PAD_DISP2_DAT6__DISP2_DAT6 IOMUX_PAD(0x774, 0x36c, 0, __NA_, 0, NO_PAD_CTRL) | 673 | #define MX51_PAD_DISP2_DAT6__DISP2_DAT6 IOMUX_PAD(0x774, 0x36c, 0, __NA_, 0, NO_PAD_CTRL) |
674 | #define MX51_PAD_DISP2_DAT6__FEC_TDATA1 IOMUX_PAD(0x774, 0x36c, 2, __NA_, 0, MX51_PAD_CTRL_5) | 674 | #define MX51_PAD_DISP2_DAT6__FEC_TDATA1 IOMUX_PAD(0x774, 0x36c, 2, __NA_, 0, MX51_PAD_CTRL_5) |
675 | #define MX51_PAD_DISP2_DAT6__GPIO1_19 IOMUX_PAD(0x774, 0x36c, 5, __NA_, 0, NO_PAD_CTRL) | 675 | #define MX51_PAD_DISP2_DAT6__GPIO1_19 IOMUX_PAD(0x774, 0x36c, 5, __NA_, 0, MX51_GPIO_PAD_CTRL) |
676 | #define MX51_PAD_DISP2_DAT6__KEY_ROW4 IOMUX_PAD(0x774, 0x36c, 4, 0x9d0, 1, NO_PAD_CTRL) | 676 | #define MX51_PAD_DISP2_DAT6__KEY_ROW4 IOMUX_PAD(0x774, 0x36c, 4, 0x9d0, 1, NO_PAD_CTRL) |
677 | #define MX51_PAD_DISP2_DAT6__USBH3_STP IOMUX_PAD(0x774, 0x36c, 3, 0xa24, 1, NO_PAD_CTRL) | 677 | #define MX51_PAD_DISP2_DAT6__USBH3_STP IOMUX_PAD(0x774, 0x36c, 3, 0xa24, 1, NO_PAD_CTRL) |
678 | #define MX51_PAD_DISP2_DAT7__DISP2_DAT7 IOMUX_PAD(0x778, 0x370, 0, __NA_, 0, NO_PAD_CTRL) | 678 | #define MX51_PAD_DISP2_DAT7__DISP2_DAT7 IOMUX_PAD(0x778, 0x370, 0, __NA_, 0, NO_PAD_CTRL) |
679 | #define MX51_PAD_DISP2_DAT7__FEC_TDATA2 IOMUX_PAD(0x778, 0x370, 2, __NA_, 0, MX51_PAD_CTRL_5) | 679 | #define MX51_PAD_DISP2_DAT7__FEC_TDATA2 IOMUX_PAD(0x778, 0x370, 2, __NA_, 0, MX51_PAD_CTRL_5) |
680 | #define MX51_PAD_DISP2_DAT7__GPIO1_29 IOMUX_PAD(0x778, 0x370, 5, __NA_, 0, NO_PAD_CTRL) | 680 | #define MX51_PAD_DISP2_DAT7__GPIO1_29 IOMUX_PAD(0x778, 0x370, 5, __NA_, 0, MX51_GPIO_PAD_CTRL) |
681 | #define MX51_PAD_DISP2_DAT7__KEY_ROW5 IOMUX_PAD(0x778, 0x370, 4, 0x9d4, 1, NO_PAD_CTRL) | 681 | #define MX51_PAD_DISP2_DAT7__KEY_ROW5 IOMUX_PAD(0x778, 0x370, 4, 0x9d4, 1, NO_PAD_CTRL) |
682 | #define MX51_PAD_DISP2_DAT7__USBH3_NXT IOMUX_PAD(0x778, 0x370, 3, 0xa20, 1, NO_PAD_CTRL) | 682 | #define MX51_PAD_DISP2_DAT7__USBH3_NXT IOMUX_PAD(0x778, 0x370, 3, 0xa20, 1, NO_PAD_CTRL) |
683 | #define MX51_PAD_DISP2_DAT8__DISP2_DAT8 IOMUX_PAD(0x77c, 0x374, 0, __NA_, 0, NO_PAD_CTRL) | 683 | #define MX51_PAD_DISP2_DAT8__DISP2_DAT8 IOMUX_PAD(0x77c, 0x374, 0, __NA_, 0, NO_PAD_CTRL) |
684 | #define MX51_PAD_DISP2_DAT8__FEC_TDATA3 IOMUX_PAD(0x77c, 0x374, 2, __NA_, 0, MX51_PAD_CTRL_5) | 684 | #define MX51_PAD_DISP2_DAT8__FEC_TDATA3 IOMUX_PAD(0x77c, 0x374, 2, __NA_, 0, MX51_PAD_CTRL_5) |
685 | #define MX51_PAD_DISP2_DAT8__GPIO1_30 IOMUX_PAD(0x77c, 0x374, 5, __NA_, 0, NO_PAD_CTRL) | 685 | #define MX51_PAD_DISP2_DAT8__GPIO1_30 IOMUX_PAD(0x77c, 0x374, 5, __NA_, 0, MX51_GPIO_PAD_CTRL) |
686 | #define MX51_PAD_DISP2_DAT8__KEY_ROW6 IOMUX_PAD(0x77c, 0x374, 4, 0x9d8, 1, NO_PAD_CTRL) | 686 | #define MX51_PAD_DISP2_DAT8__KEY_ROW6 IOMUX_PAD(0x77c, 0x374, 4, 0x9d8, 1, NO_PAD_CTRL) |
687 | #define MX51_PAD_DISP2_DAT8__USBH3_DATA0 IOMUX_PAD(0x77c, 0x374, 3, 0x9fc, 1, NO_PAD_CTRL) | 687 | #define MX51_PAD_DISP2_DAT8__USBH3_DATA0 IOMUX_PAD(0x77c, 0x374, 3, 0x9fc, 1, NO_PAD_CTRL) |
688 | #define MX51_PAD_DISP2_DAT9__AUD6_RXC IOMUX_PAD(0x780, 0x378, 4, 0x8f4, 1, NO_PAD_CTRL) | 688 | #define MX51_PAD_DISP2_DAT9__AUD6_RXC IOMUX_PAD(0x780, 0x378, 4, 0x8f4, 1, NO_PAD_CTRL) |
689 | #define MX51_PAD_DISP2_DAT9__DISP2_DAT9 IOMUX_PAD(0x780, 0x378, 0, __NA_, 0, NO_PAD_CTRL) | 689 | #define MX51_PAD_DISP2_DAT9__DISP2_DAT9 IOMUX_PAD(0x780, 0x378, 0, __NA_, 0, NO_PAD_CTRL) |
690 | #define MX51_PAD_DISP2_DAT9__FEC_TX_EN IOMUX_PAD(0x780, 0x378, 2, __NA_, 0, MX51_PAD_CTRL_5) | 690 | #define MX51_PAD_DISP2_DAT9__FEC_TX_EN IOMUX_PAD(0x780, 0x378, 2, __NA_, 0, MX51_PAD_CTRL_5) |
691 | #define MX51_PAD_DISP2_DAT9__GPIO1_31 IOMUX_PAD(0x780, 0x378, 5, __NA_, 0, NO_PAD_CTRL) | 691 | #define MX51_PAD_DISP2_DAT9__GPIO1_31 IOMUX_PAD(0x780, 0x378, 5, __NA_, 0, MX51_GPIO_PAD_CTRL) |
692 | #define MX51_PAD_DISP2_DAT9__USBH3_DATA1 IOMUX_PAD(0x780, 0x378, 3, 0xa00, 1, NO_PAD_CTRL) | 692 | #define MX51_PAD_DISP2_DAT9__USBH3_DATA1 IOMUX_PAD(0x780, 0x378, 3, 0xa00, 1, NO_PAD_CTRL) |
693 | #define MX51_PAD_DISP2_DAT10__DISP2_DAT10 IOMUX_PAD(0x784, 0x37c, 0, __NA_, 0, NO_PAD_CTRL) | 693 | #define MX51_PAD_DISP2_DAT10__DISP2_DAT10 IOMUX_PAD(0x784, 0x37c, 0, __NA_, 0, NO_PAD_CTRL) |
694 | #define MX51_PAD_DISP2_DAT10__DISP2_SER_CS IOMUX_PAD(0x784, 0x37c, 5, __NA_, 0, NO_PAD_CTRL) | 694 | #define MX51_PAD_DISP2_DAT10__DISP2_SER_CS IOMUX_PAD(0x784, 0x37c, 5, __NA_, 0, NO_PAD_CTRL) |
@@ -698,7 +698,7 @@ | |||
698 | #define MX51_PAD_DISP2_DAT11__AUD6_TXD IOMUX_PAD(0x788, 0x380, 4, 0x8f0, 1, NO_PAD_CTRL) | 698 | #define MX51_PAD_DISP2_DAT11__AUD6_TXD IOMUX_PAD(0x788, 0x380, 4, 0x8f0, 1, NO_PAD_CTRL) |
699 | #define MX51_PAD_DISP2_DAT11__DISP2_DAT11 IOMUX_PAD(0x788, 0x380, 0, __NA_, 0, NO_PAD_CTRL) | 699 | #define MX51_PAD_DISP2_DAT11__DISP2_DAT11 IOMUX_PAD(0x788, 0x380, 0, __NA_, 0, NO_PAD_CTRL) |
700 | #define MX51_PAD_DISP2_DAT11__FEC_RX_CLK IOMUX_PAD(0x788, 0x380, 2, 0x968, 1, NO_PAD_CTRL) | 700 | #define MX51_PAD_DISP2_DAT11__FEC_RX_CLK IOMUX_PAD(0x788, 0x380, 2, 0x968, 1, NO_PAD_CTRL) |
701 | #define MX51_PAD_DISP2_DAT11__GPIO1_10 IOMUX_PAD(0x788, 0x380, 7, __NA_, 0, NO_PAD_CTRL) | 701 | #define MX51_PAD_DISP2_DAT11__GPIO1_10 IOMUX_PAD(0x788, 0x380, 7, __NA_, 0, MX51_GPIO_PAD_CTRL) |
702 | #define MX51_PAD_DISP2_DAT11__USBH3_DATA3 IOMUX_PAD(0x788, 0x380, 3, 0xa08, 1, NO_PAD_CTRL) | 702 | #define MX51_PAD_DISP2_DAT11__USBH3_DATA3 IOMUX_PAD(0x788, 0x380, 3, 0xa08, 1, NO_PAD_CTRL) |
703 | #define MX51_PAD_DISP2_DAT12__AUD6_RXD IOMUX_PAD(0x78c, 0x384, 4, 0x8ec, 1, NO_PAD_CTRL) | 703 | #define MX51_PAD_DISP2_DAT12__AUD6_RXD IOMUX_PAD(0x78c, 0x384, 4, 0x8ec, 1, NO_PAD_CTRL) |
704 | #define MX51_PAD_DISP2_DAT12__DISP2_DAT12 IOMUX_PAD(0x78c, 0x384, 0, __NA_, 0, NO_PAD_CTRL) | 704 | #define MX51_PAD_DISP2_DAT12__DISP2_DAT12 IOMUX_PAD(0x78c, 0x384, 0, __NA_, 0, NO_PAD_CTRL) |
@@ -746,16 +746,16 @@ | |||
746 | #define MX51_PAD_SD1_DATA3__CSPI_SS1 IOMUX_PAD(0x7b0, 0x3a8, 2, 0x920, 1, MX51_ECSPI_PAD_CTRL) | 746 | #define MX51_PAD_SD1_DATA3__CSPI_SS1 IOMUX_PAD(0x7b0, 0x3a8, 2, 0x920, 1, MX51_ECSPI_PAD_CTRL) |
747 | #define MX51_PAD_SD1_DATA3__SD1_DATA3 IOMUX_PAD(0x7b0, 0x3a8, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) | 747 | #define MX51_PAD_SD1_DATA3__SD1_DATA3 IOMUX_PAD(0x7b0, 0x3a8, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) |
748 | #define MX51_PAD_GPIO1_0__CSPI_SS2 IOMUX_PAD(0x7b4, 0x3ac, 2, 0x924, 0, MX51_ECSPI_PAD_CTRL) | 748 | #define MX51_PAD_GPIO1_0__CSPI_SS2 IOMUX_PAD(0x7b4, 0x3ac, 2, 0x924, 0, MX51_ECSPI_PAD_CTRL) |
749 | #define MX51_PAD_GPIO1_0__GPIO1_0 IOMUX_PAD(0x7b4, 0x3ac, 1, __NA_, 0, NO_PAD_CTRL) | 749 | #define MX51_PAD_GPIO1_0__GPIO1_0 IOMUX_PAD(0x7b4, 0x3ac, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) |
750 | #define MX51_PAD_GPIO1_0__SD1_CD IOMUX_PAD(0x7b4, 0x3ac, 0, __NA_, 0, MX51_ESDHC_PAD_CTRL) | 750 | #define MX51_PAD_GPIO1_0__SD1_CD IOMUX_PAD(0x7b4, 0x3ac, 0, __NA_, 0, MX51_ESDHC_PAD_CTRL) |
751 | #define MX51_PAD_GPIO1_1__CSPI_MISO IOMUX_PAD(0x7b8, 0x3b0, 2, 0x918, 2, MX51_ECSPI_PAD_CTRL) | 751 | #define MX51_PAD_GPIO1_1__CSPI_MISO IOMUX_PAD(0x7b8, 0x3b0, 2, 0x918, 2, MX51_ECSPI_PAD_CTRL) |
752 | #define MX51_PAD_GPIO1_1__GPIO1_1 IOMUX_PAD(0x7b8, 0x3b0, 1, __NA_, 0, NO_PAD_CTRL) | 752 | #define MX51_PAD_GPIO1_1__GPIO1_1 IOMUX_PAD(0x7b8, 0x3b0, 1, __NA_, 0, MX51_GPIO_PAD_CTRL) |
753 | #define MX51_PAD_GPIO1_1__SD1_WP IOMUX_PAD(0x7b8, 0x3b0, 0, __NA_, 0, MX51_ESDHC_PAD_CTRL) | 753 | #define MX51_PAD_GPIO1_1__SD1_WP IOMUX_PAD(0x7b8, 0x3b0, 0, __NA_, 0, MX51_ESDHC_PAD_CTRL) |
754 | #define MX51_PAD_EIM_DA12__EIM_DA12 IOMUX_PAD(__NA_, 0x04c, 0, 0x000, 0, NO_PAD_CTRL) | 754 | #define MX51_PAD_EIM_DA12__EIM_DA12 IOMUX_PAD(__NA_, 0x04c, 0, 0x000, 0, NO_PAD_CTRL) |
755 | #define MX51_PAD_EIM_DA13__EIM_DA13 IOMUX_PAD(__NA_, 0x050, 0, 0x000, 0, NO_PAD_CTRL) | 755 | #define MX51_PAD_EIM_DA13__EIM_DA13 IOMUX_PAD(__NA_, 0x050, 0, 0x000, 0, NO_PAD_CTRL) |
756 | #define MX51_PAD_EIM_DA14__EIM_DA14 IOMUX_PAD(__NA_, 0x054, 0, 0x000, 0, NO_PAD_CTRL) | 756 | #define MX51_PAD_EIM_DA14__EIM_DA14 IOMUX_PAD(__NA_, 0x054, 0, 0x000, 0, NO_PAD_CTRL) |
757 | #define MX51_PAD_EIM_DA15__EIM_DA15 IOMUX_PAD(__NA_, 0x058, 0, 0x000, 0, NO_PAD_CTRL) | 757 | #define MX51_PAD_EIM_DA15__EIM_DA15 IOMUX_PAD(__NA_, 0x058, 0, 0x000, 0, NO_PAD_CTRL) |
758 | #define MX51_PAD_SD2_CMD__CSPI_MOSI IOMUX_PAD(__NA_, 0x3b4, 2, 0x91c, 3, MX51_ECSPI_PAD_CTRL) | 758 | #define MX51_PAD_SD2_CMD__CSPI_MOSI IOMUX_PAD(0x7bc, 0x3b4, 2, 0x91c, 3, MX51_ECSPI_PAD_CTRL) |
759 | #define MX51_PAD_SD2_CMD__I2C1_SCL IOMUX_PAD(0x7bc, 0x3b4, 0x11, 0x9b0, 2, MX51_I2C_PAD_CTRL) | 759 | #define MX51_PAD_SD2_CMD__I2C1_SCL IOMUX_PAD(0x7bc, 0x3b4, 0x11, 0x9b0, 2, MX51_I2C_PAD_CTRL) |
760 | #define MX51_PAD_SD2_CMD__SD2_CMD IOMUX_PAD(0x7bc, 0x3b4, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) | 760 | #define MX51_PAD_SD2_CMD__SD2_CMD IOMUX_PAD(0x7bc, 0x3b4, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) |
761 | #define MX51_PAD_SD2_CLK__CSPI_SCLK IOMUX_PAD(0x7c0, 0x3b8, 2, 0x914, 3, MX51_ECSPI_PAD_CTRL) | 761 | #define MX51_PAD_SD2_CLK__CSPI_SCLK IOMUX_PAD(0x7c0, 0x3b8, 2, 0x914, 3, MX51_ECSPI_PAD_CTRL) |
@@ -766,19 +766,19 @@ | |||
766 | #define MX51_PAD_SD2_DATA0__SD2_DATA0 IOMUX_PAD(0x7c4, 0x3bc, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) | 766 | #define MX51_PAD_SD2_DATA0__SD2_DATA0 IOMUX_PAD(0x7c4, 0x3bc, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) |
767 | #define MX51_PAD_SD2_DATA1__SD1_DAT5 IOMUX_PAD(0x7c8, 0x3c0, 1, __NA_, 0, NO_PAD_CTRL) | 767 | #define MX51_PAD_SD2_DATA1__SD1_DAT5 IOMUX_PAD(0x7c8, 0x3c0, 1, __NA_, 0, NO_PAD_CTRL) |
768 | #define MX51_PAD_SD2_DATA1__SD2_DATA1 IOMUX_PAD(0x7c8, 0x3c0, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) | 768 | #define MX51_PAD_SD2_DATA1__SD2_DATA1 IOMUX_PAD(0x7c8, 0x3c0, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) |
769 | #define MX51_PAD_SD2_DATA1__USBH3_H2_DP IOMUX_PAD(0x7c8, 0x3c0, 2, __NA_, 0, NO_PAD_CTRL) | 769 | #define MX51_PAD_SD2_DATA1__USBH3_H2_DP IOMUX_PAD(0x7c8, 0x3c0, 0x12, __NA_, 0, NO_PAD_CTRL) |
770 | #define MX51_PAD_SD2_DATA2__SD1_DAT6 IOMUX_PAD(0x7cc, 0x3c4, 1, __NA_, 0, NO_PAD_CTRL) | 770 | #define MX51_PAD_SD2_DATA2__SD1_DAT6 IOMUX_PAD(0x7cc, 0x3c4, 1, __NA_, 0, NO_PAD_CTRL) |
771 | #define MX51_PAD_SD2_DATA2__SD2_DATA2 IOMUX_PAD(0x7cc, 0x3c4, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) | 771 | #define MX51_PAD_SD2_DATA2__SD2_DATA2 IOMUX_PAD(0x7cc, 0x3c4, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) |
772 | #define MX51_PAD_SD2_DATA2__USBH3_H2_DM IOMUX_PAD(0x7cc, 0x3c4, 2, __NA_, 0, NO_PAD_CTRL) | 772 | #define MX51_PAD_SD2_DATA2__USBH3_H2_DM IOMUX_PAD(0x7cc, 0x3c4, 0x12, __NA_, 0, NO_PAD_CTRL) |
773 | #define MX51_PAD_SD2_DATA3__CSPI_SS2 IOMUX_PAD(0x7d0, 0x3c8, 2, 0x924, 1, MX51_ECSPI_PAD_CTRL) | 773 | #define MX51_PAD_SD2_DATA3__CSPI_SS2 IOMUX_PAD(0x7d0, 0x3c8, 2, 0x924, 1, MX51_ECSPI_PAD_CTRL) |
774 | #define MX51_PAD_SD2_DATA3__SD1_DAT7 IOMUX_PAD(0x7d0, 0x3c8, 1, __NA_, 0, NO_PAD_CTRL) | 774 | #define MX51_PAD_SD2_DATA3__SD1_DAT7 IOMUX_PAD(0x7d0, 0x3c8, 1, __NA_, 0, NO_PAD_CTRL) |
775 | #define MX51_PAD_SD2_DATA3__SD2_DATA3 IOMUX_PAD(0x7d0, 0x3c8, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) | 775 | #define MX51_PAD_SD2_DATA3__SD2_DATA3 IOMUX_PAD(0x7d0, 0x3c8, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL) |
776 | #define MX51_PAD_GPIO1_2__CCM_OUT_2 IOMUX_PAD(0x7d4, 0x3cc, 5, __NA_, 0, NO_PAD_CTRL) | 776 | #define MX51_PAD_GPIO1_2__CCM_OUT_2 IOMUX_PAD(0x7d4, 0x3cc, 5, __NA_, 0, NO_PAD_CTRL) |
777 | #define MX51_PAD_GPIO1_2__GPIO1_2 IOMUX_PAD(0x7d4, 0x3cc, 0, __NA_, 0, NO_PAD_CTRL) | 777 | #define MX51_PAD_GPIO1_2__GPIO1_2 IOMUX_PAD(0x7d4, 0x3cc, 0, __NA_, 0, MX51_GPIO_PAD_CTRL) |
778 | #define MX51_PAD_GPIO1_2__I2C2_SCL IOMUX_PAD(0x7d4, 0x3cc, 0x12, 0x9b8, 3, MX51_I2C_PAD_CTRL) | 778 | #define MX51_PAD_GPIO1_2__I2C2_SCL IOMUX_PAD(0x7d4, 0x3cc, 0x12, 0x9b8, 3, MX51_I2C_PAD_CTRL) |
779 | #define MX51_PAD_GPIO1_2__PLL1_BYP IOMUX_PAD(0x7d4, 0x3cc, 7, 0x90c, 1, NO_PAD_CTRL) | 779 | #define MX51_PAD_GPIO1_2__PLL1_BYP IOMUX_PAD(0x7d4, 0x3cc, 7, 0x90c, 1, NO_PAD_CTRL) |
780 | #define MX51_PAD_GPIO1_2__PWM1_PWMO IOMUX_PAD(0x7d4, 0x3cc, 1, __NA_, 0, NO_PAD_CTRL) | 780 | #define MX51_PAD_GPIO1_2__PWM1_PWMO IOMUX_PAD(0x7d4, 0x3cc, 1, __NA_, 0, NO_PAD_CTRL) |
781 | #define MX51_PAD_GPIO1_3__GPIO1_3 IOMUX_PAD(0x7d8, 0x3d0, 0, __NA_, 0, NO_PAD_CTRL) | 781 | #define MX51_PAD_GPIO1_3__GPIO1_3 IOMUX_PAD(0x7d8, 0x3d0, 0, __NA_, 0, MX51_GPIO_PAD_CTRL) |
782 | #define MX51_PAD_GPIO1_3__I2C2_SDA IOMUX_PAD(0x7d8, 0x3d0, 0x12, 0x9bc, 3, MX51_I2C_PAD_CTRL) | 782 | #define MX51_PAD_GPIO1_3__I2C2_SDA IOMUX_PAD(0x7d8, 0x3d0, 0x12, 0x9bc, 3, MX51_I2C_PAD_CTRL) |
783 | #define MX51_PAD_GPIO1_3__PLL2_BYP IOMUX_PAD(0x7d8, 0x3d0, 7, 0x910, 1, NO_PAD_CTRL) | 783 | #define MX51_PAD_GPIO1_3__PLL2_BYP IOMUX_PAD(0x7d8, 0x3d0, 7, 0x910, 1, NO_PAD_CTRL) |
784 | #define MX51_PAD_GPIO1_3__PWM2_PWMO IOMUX_PAD(0x7d8, 0x3d0, 1, __NA_, 0, NO_PAD_CTRL) | 784 | #define MX51_PAD_GPIO1_3__PWM2_PWMO IOMUX_PAD(0x7d8, 0x3d0, 1, __NA_, 0, NO_PAD_CTRL) |
@@ -786,27 +786,27 @@ | |||
786 | #define MX51_PAD_PMIC_INT_REQ__PMIC_PMU_IRQ_B IOMUX_PAD(0x7fc, 0x3d4, 1, __NA_, 0, NO_PAD_CTRL) | 786 | #define MX51_PAD_PMIC_INT_REQ__PMIC_PMU_IRQ_B IOMUX_PAD(0x7fc, 0x3d4, 1, __NA_, 0, NO_PAD_CTRL) |
787 | #define MX51_PAD_GPIO1_4__DISP2_EXT_CLK IOMUX_PAD(0x804, 0x3d8, 4, 0x908, 1, NO_PAD_CTRL) | 787 | #define MX51_PAD_GPIO1_4__DISP2_EXT_CLK IOMUX_PAD(0x804, 0x3d8, 4, 0x908, 1, NO_PAD_CTRL) |
788 | #define MX51_PAD_GPIO1_4__EIM_RDY IOMUX_PAD(0x804, 0x3d8, 3, 0x938, 1, NO_PAD_CTRL) | 788 | #define MX51_PAD_GPIO1_4__EIM_RDY IOMUX_PAD(0x804, 0x3d8, 3, 0x938, 1, NO_PAD_CTRL) |
789 | #define MX51_PAD_GPIO1_4__GPIO1_4 IOMUX_PAD(0x804, 0x3d8, 0, __NA_, 0, NO_PAD_CTRL) | 789 | #define MX51_PAD_GPIO1_4__GPIO1_4 IOMUX_PAD(0x804, 0x3d8, 0, __NA_, 0, MX51_GPIO_PAD_CTRL) |
790 | #define MX51_PAD_GPIO1_4__WDOG1_WDOG_B IOMUX_PAD(0x804, 0x3d8, 2, __NA_, 0, NO_PAD_CTRL) | 790 | #define MX51_PAD_GPIO1_4__WDOG1_WDOG_B IOMUX_PAD(0x804, 0x3d8, 2, __NA_, 0, NO_PAD_CTRL) |
791 | #define MX51_PAD_GPIO1_5__CSI2_MCLK IOMUX_PAD(0x808, 0x3dc, 6, __NA_, 0, NO_PAD_CTRL) | 791 | #define MX51_PAD_GPIO1_5__CSI2_MCLK IOMUX_PAD(0x808, 0x3dc, 6, __NA_, 0, NO_PAD_CTRL) |
792 | #define MX51_PAD_GPIO1_5__DISP2_PIN16 IOMUX_PAD(0x808, 0x3dc, 3, __NA_, 0, NO_PAD_CTRL) | 792 | #define MX51_PAD_GPIO1_5__DISP2_PIN16 IOMUX_PAD(0x808, 0x3dc, 3, __NA_, 0, NO_PAD_CTRL) |
793 | #define MX51_PAD_GPIO1_5__GPIO1_5 IOMUX_PAD(0x808, 0x3dc, 0, __NA_, 0, NO_PAD_CTRL) | 793 | #define MX51_PAD_GPIO1_5__GPIO1_5 IOMUX_PAD(0x808, 0x3dc, 0, __NA_, 0, MX51_GPIO_PAD_CTRL) |
794 | #define MX51_PAD_GPIO1_5__WDOG2_WDOG_B IOMUX_PAD(0x808, 0x3dc, 2, __NA_, 0, NO_PAD_CTRL) | 794 | #define MX51_PAD_GPIO1_5__WDOG2_WDOG_B IOMUX_PAD(0x808, 0x3dc, 2, __NA_, 0, NO_PAD_CTRL) |
795 | #define MX51_PAD_GPIO1_6__DISP2_PIN17 IOMUX_PAD(0x80c, 0x3e0, 4, __NA_, 0, NO_PAD_CTRL) | 795 | #define MX51_PAD_GPIO1_6__DISP2_PIN17 IOMUX_PAD(0x80c, 0x3e0, 4, __NA_, 0, NO_PAD_CTRL) |
796 | #define MX51_PAD_GPIO1_6__GPIO1_6 IOMUX_PAD(0x80c, 0x3e0, 0, __NA_, 0, NO_PAD_CTRL) | 796 | #define MX51_PAD_GPIO1_6__GPIO1_6 IOMUX_PAD(0x80c, 0x3e0, 0, __NA_, 0, MX51_GPIO_PAD_CTRL) |
797 | #define MX51_PAD_GPIO1_6__REF_EN_B IOMUX_PAD(0x80c, 0x3e0, 3, __NA_, 0, NO_PAD_CTRL) | 797 | #define MX51_PAD_GPIO1_6__REF_EN_B IOMUX_PAD(0x80c, 0x3e0, 3, __NA_, 0, NO_PAD_CTRL) |
798 | #define MX51_PAD_GPIO1_7__CCM_OUT_0 IOMUX_PAD(0x810, 0x3e4, 3, __NA_, 0, NO_PAD_CTRL) | 798 | #define MX51_PAD_GPIO1_7__CCM_OUT_0 IOMUX_PAD(0x810, 0x3e4, 3, __NA_, 0, NO_PAD_CTRL) |
799 | #define MX51_PAD_GPIO1_7__GPIO1_7 IOMUX_PAD(0x810, 0x3e4, 0, __NA_, 0, NO_PAD_CTRL) | 799 | #define MX51_PAD_GPIO1_7__GPIO1_7 IOMUX_PAD(0x810, 0x3e4, 0, __NA_, 0, MX51_GPIO_PAD_CTRL) |
800 | #define MX51_PAD_GPIO1_7__SD2_WP IOMUX_PAD(0x810, 0x3e4, 6, __NA_, 0, MX51_ESDHC_PAD_CTRL) | 800 | #define MX51_PAD_GPIO1_7__SD2_WP IOMUX_PAD(0x810, 0x3e4, 6, __NA_, 0, MX51_ESDHC_PAD_CTRL) |
801 | #define MX51_PAD_GPIO1_7__SPDIF_OUT1 IOMUX_PAD(0x810, 0x3e4, 2, __NA_, 0, NO_PAD_CTRL) | 801 | #define MX51_PAD_GPIO1_7__SPDIF_OUT1 IOMUX_PAD(0x810, 0x3e4, 2, __NA_, 0, NO_PAD_CTRL) |
802 | #define MX51_PAD_GPIO1_8__CSI2_DATA_EN IOMUX_PAD(0x814, 0x3e8, 2, 0x99c, 2, NO_PAD_CTRL) | 802 | #define MX51_PAD_GPIO1_8__CSI2_DATA_EN IOMUX_PAD(0x814, 0x3e8, 2, 0x99c, 2, NO_PAD_CTRL) |
803 | #define MX51_PAD_GPIO1_8__GPIO1_8 IOMUX_PAD(0x814, 0x3e8, 0, __NA_, 0, NO_PAD_CTRL) | 803 | #define MX51_PAD_GPIO1_8__GPIO1_8 IOMUX_PAD(0x814, 0x3e8, 0, __NA_, 0, MX51_GPIO_PAD_CTRL) |
804 | #define MX51_PAD_GPIO1_8__SD2_CD IOMUX_PAD(0x814, 0x3e8, 6, __NA_, 0, MX51_ESDHC_PAD_CTRL) | 804 | #define MX51_PAD_GPIO1_8__SD2_CD IOMUX_PAD(0x814, 0x3e8, 6, __NA_, 0, MX51_ESDHC_PAD_CTRL) |
805 | #define MX51_PAD_GPIO1_8__USBH3_PWR IOMUX_PAD(0x814, 0x3e8, 1, __NA_, 0, NO_PAD_CTRL) | 805 | #define MX51_PAD_GPIO1_8__USBH3_PWR IOMUX_PAD(0x814, 0x3e8, 1, __NA_, 0, NO_PAD_CTRL) |
806 | #define MX51_PAD_GPIO1_9__CCM_OUT_1 IOMUX_PAD(0x818, 0x3ec, 3, __NA_, 0, NO_PAD_CTRL) | 806 | #define MX51_PAD_GPIO1_9__CCM_OUT_1 IOMUX_PAD(0x818, 0x3ec, 3, __NA_, 0, NO_PAD_CTRL) |
807 | #define MX51_PAD_GPIO1_9__DISP2_D1_CS IOMUX_PAD(0x818, 0x3ec, 2, __NA_, 0, NO_PAD_CTRL) | 807 | #define MX51_PAD_GPIO1_9__DISP2_D1_CS IOMUX_PAD(0x818, 0x3ec, 2, __NA_, 0, NO_PAD_CTRL) |
808 | #define MX51_PAD_GPIO1_9__DISP2_SER_CS IOMUX_PAD(0x818, 0x3ec, 7, __NA_, 0, NO_PAD_CTRL) | 808 | #define MX51_PAD_GPIO1_9__DISP2_SER_CS IOMUX_PAD(0x818, 0x3ec, 7, __NA_, 0, NO_PAD_CTRL) |
809 | #define MX51_PAD_GPIO1_9__GPIO1_9 IOMUX_PAD(0x818, 0x3ec, 0, __NA_, 0, NO_PAD_CTRL) | 809 | #define MX51_PAD_GPIO1_9__GPIO1_9 IOMUX_PAD(0x818, 0x3ec, 0, __NA_, 0, MX51_GPIO_PAD_CTRL) |
810 | #define MX51_PAD_GPIO1_9__SD2_LCTL IOMUX_PAD(0x818, 0x3ec, 6, __NA_, 0, NO_PAD_CTRL) | 810 | #define MX51_PAD_GPIO1_9__SD2_LCTL IOMUX_PAD(0x818, 0x3ec, 6, __NA_, 0, NO_PAD_CTRL) |
811 | #define MX51_PAD_GPIO1_9__USBH3_OC IOMUX_PAD(0x818, 0x3ec, 1, __NA_, 0, NO_PAD_CTRL) | 811 | #define MX51_PAD_GPIO1_9__USBH3_OC IOMUX_PAD(0x818, 0x3ec, 1, __NA_, 0, NO_PAD_CTRL) |
812 | 812 | ||
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx53.h b/arch/arm/plat-mxc/include/mach/iomux-mx53.h index 527f8fe3e31..9761e003bde 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-mx53.h +++ b/arch/arm/plat-mxc/include/mach/iomux-mx53.h | |||
@@ -573,7 +573,7 @@ | |||
573 | #define MX53_PAD_EIM_D28__UART2_CTS IOMUX_PAD(0x494, 0x14C, 2, __NA_, 0, MX53_UART_PAD_CTRL) | 573 | #define MX53_PAD_EIM_D28__UART2_CTS IOMUX_PAD(0x494, 0x14C, 2, __NA_, 0, MX53_UART_PAD_CTRL) |
574 | #define MX53_PAD_EIM_D28__IPU_DISPB0_SER_DIO IOMUX_PAD(0x494, 0x14C, 3, 0x82C, 1, NO_PAD_CTRL) | 574 | #define MX53_PAD_EIM_D28__IPU_DISPB0_SER_DIO IOMUX_PAD(0x494, 0x14C, 3, 0x82C, 1, NO_PAD_CTRL) |
575 | #define MX53_PAD_EIM_D28__CSPI_MOSI IOMUX_PAD(0x494, 0x14C, 4, 0x788, 1, NO_PAD_CTRL) | 575 | #define MX53_PAD_EIM_D28__CSPI_MOSI IOMUX_PAD(0x494, 0x14C, 4, 0x788, 1, NO_PAD_CTRL) |
576 | #define MX53_PAD_EIM_D28__I2C1_SDA IOMUX_PAD(0x494, 0x14C, 5 | IOMUX_CONFIG_SION, 0x818, 1, PAD_CTRL_I2C) | 576 | #define MX53_PAD_EIM_D28__I2C1_SDA IOMUX_PAD(0x494, 0x14C, 5 | IOMUX_CONFIG_SION, 0x818, 1, NO_PAD_CTRL) |
577 | #define MX53_PAD_EIM_D28__IPU_EXT_TRIG IOMUX_PAD(0x494, 0x14C, 6, __NA_, 0, NO_PAD_CTRL) | 577 | #define MX53_PAD_EIM_D28__IPU_EXT_TRIG IOMUX_PAD(0x494, 0x14C, 6, __NA_, 0, NO_PAD_CTRL) |
578 | #define MX53_PAD_EIM_D28__IPU_DI0_PIN13 IOMUX_PAD(0x494, 0x14C, 7, __NA_, 0, NO_PAD_CTRL) | 578 | #define MX53_PAD_EIM_D28__IPU_DI0_PIN13 IOMUX_PAD(0x494, 0x14C, 7, __NA_, 0, NO_PAD_CTRL) |
579 | #define MX53_PAD_EIM_D29__EMI_WEIM_D_29 IOMUX_PAD(0x498, 0x150, 0, __NA_, 0, NO_PAD_CTRL) | 579 | #define MX53_PAD_EIM_D29__EMI_WEIM_D_29 IOMUX_PAD(0x498, 0x150, 0, __NA_, 0, NO_PAD_CTRL) |
@@ -1187,7 +1187,7 @@ | |||
1187 | #define MX53_PAD_GPIO_8__ESAI1_TX5_RX0 IOMUX_PAD(0x6C8, 0x338, 0, 0x7F8, 1, NO_PAD_CTRL) | 1187 | #define MX53_PAD_GPIO_8__ESAI1_TX5_RX0 IOMUX_PAD(0x6C8, 0x338, 0, 0x7F8, 1, NO_PAD_CTRL) |
1188 | #define MX53_PAD_GPIO_8__GPIO1_8 IOMUX_PAD(0x6C8, 0x338, 1, __NA_, 0, NO_PAD_CTRL) | 1188 | #define MX53_PAD_GPIO_8__GPIO1_8 IOMUX_PAD(0x6C8, 0x338, 1, __NA_, 0, NO_PAD_CTRL) |
1189 | #define MX53_PAD_GPIO_8__EPIT2_EPITO IOMUX_PAD(0x6C8, 0x338, 2, __NA_, 0, NO_PAD_CTRL) | 1189 | #define MX53_PAD_GPIO_8__EPIT2_EPITO IOMUX_PAD(0x6C8, 0x338, 2, __NA_, 0, NO_PAD_CTRL) |
1190 | #define MX53_PAD_GPIO_8__CAN1_RXCAN IOMUX_PAD(0x6C8, 0x338, 3, 0x760, 3, NO_PAD_CTRL) | 1190 | #define MX53_PAD_GPIO_8__CAN1_RXCAN IOMUX_PAD(0x6C8, 0x338, 3, 0x760, 2, NO_PAD_CTRL) |
1191 | #define MX53_PAD_GPIO_8__UART2_RXD_MUX IOMUX_PAD(0x6C8, 0x338, 4, 0x880, 5, MX53_UART_PAD_CTRL) | 1191 | #define MX53_PAD_GPIO_8__UART2_RXD_MUX IOMUX_PAD(0x6C8, 0x338, 4, 0x880, 5, MX53_UART_PAD_CTRL) |
1192 | #define MX53_PAD_GPIO_8__FIRI_TXD IOMUX_PAD(0x6C8, 0x338, 5, __NA_, 0, NO_PAD_CTRL) | 1192 | #define MX53_PAD_GPIO_8__FIRI_TXD IOMUX_PAD(0x6C8, 0x338, 5, __NA_, 0, NO_PAD_CTRL) |
1193 | #define MX53_PAD_GPIO_8__SPDIF_SRCLK IOMUX_PAD(0x6C8, 0x338, 6, __NA_, 0, NO_PAD_CTRL) | 1193 | #define MX53_PAD_GPIO_8__SPDIF_SRCLK IOMUX_PAD(0x6C8, 0x338, 6, __NA_, 0, NO_PAD_CTRL) |
diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile index c0fe2757b69..ed8605f0115 100644 --- a/arch/arm/plat-omap/Makefile +++ b/arch/arm/plat-omap/Makefile | |||
@@ -9,9 +9,6 @@ obj-m := | |||
9 | obj-n := | 9 | obj-n := |
10 | obj- := | 10 | obj- := |
11 | 11 | ||
12 | # OCPI interconnect support for 1710, 1610 and 5912 | ||
13 | obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o | ||
14 | |||
15 | # omap_device support (OMAP2+ only at the moment) | 12 | # omap_device support (OMAP2+ only at the moment) |
16 | obj-$(CONFIG_ARCH_OMAP2) += omap_device.o | 13 | obj-$(CONFIG_ARCH_OMAP2) += omap_device.o |
17 | obj-$(CONFIG_ARCH_OMAP3) += omap_device.o | 14 | obj-$(CONFIG_ARCH_OMAP3) += omap_device.o |
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c index f1e46ea6b81..0a9b9a97011 100644 --- a/arch/arm/plat-omap/common.c +++ b/arch/arm/plat-omap/common.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <plat/board.h> | 20 | #include <plat/board.h> |
21 | #include <plat/vram.h> | 21 | #include <plat/vram.h> |
22 | #include <plat/dsp.h> | 22 | #include <plat/dsp.h> |
23 | #include <plat/dma.h> | ||
23 | 24 | ||
24 | #include <plat/omap-secure.h> | 25 | #include <plat/omap-secure.h> |
25 | 26 | ||
diff --git a/arch/arm/plat-omap/counter_32k.c b/arch/arm/plat-omap/counter_32k.c index 5068fe5a691..44ae077dbc2 100644 --- a/arch/arm/plat-omap/counter_32k.c +++ b/arch/arm/plat-omap/counter_32k.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | #include <linux/clocksource.h> | 20 | #include <linux/clocksource.h> |
21 | 21 | ||
22 | #include <asm/mach/time.h> | ||
22 | #include <asm/sched_clock.h> | 23 | #include <asm/sched_clock.h> |
23 | 24 | ||
24 | #include <plat/hardware.h> | 25 | #include <plat/hardware.h> |
@@ -43,7 +44,7 @@ static u32 notrace omap_32k_read_sched_clock(void) | |||
43 | } | 44 | } |
44 | 45 | ||
45 | /** | 46 | /** |
46 | * read_persistent_clock - Return time from a persistent clock. | 47 | * omap_read_persistent_clock - Return time from a persistent clock. |
47 | * | 48 | * |
48 | * Reads the time from a source which isn't disabled during PM, the | 49 | * Reads the time from a source which isn't disabled during PM, the |
49 | * 32k sync timer. Convert the cycles elapsed since last read into | 50 | * 32k sync timer. Convert the cycles elapsed since last read into |
@@ -52,7 +53,7 @@ static u32 notrace omap_32k_read_sched_clock(void) | |||
52 | static struct timespec persistent_ts; | 53 | static struct timespec persistent_ts; |
53 | static cycles_t cycles, last_cycles; | 54 | static cycles_t cycles, last_cycles; |
54 | static unsigned int persistent_mult, persistent_shift; | 55 | static unsigned int persistent_mult, persistent_shift; |
55 | void read_persistent_clock(struct timespec *ts) | 56 | static void omap_read_persistent_clock(struct timespec *ts) |
56 | { | 57 | { |
57 | unsigned long long nsecs; | 58 | unsigned long long nsecs; |
58 | cycles_t delta; | 59 | cycles_t delta; |
@@ -116,6 +117,7 @@ int __init omap_init_clocksource_32k(void) | |||
116 | printk(err, "32k_counter"); | 117 | printk(err, "32k_counter"); |
117 | 118 | ||
118 | setup_sched_clock(omap_32k_read_sched_clock, 32, 32768); | 119 | setup_sched_clock(omap_32k_read_sched_clock, 32, 32768); |
120 | register_persistent_clock(NULL, omap_read_persistent_clock); | ||
119 | } | 121 | } |
120 | return 0; | 122 | return 0; |
121 | } | 123 | } |
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index c58d896cd5c..987e6101267 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c | |||
@@ -41,6 +41,15 @@ | |||
41 | 41 | ||
42 | #include <plat/tc.h> | 42 | #include <plat/tc.h> |
43 | 43 | ||
44 | /* | ||
45 | * MAX_LOGICAL_DMA_CH_COUNT: the maximum number of logical DMA | ||
46 | * channels that an instance of the SDMA IP block can support. Used | ||
47 | * to size arrays. (The actual maximum on a particular SoC may be less | ||
48 | * than this -- for example, OMAP1 SDMA instances only support 17 logical | ||
49 | * DMA channels.) | ||
50 | */ | ||
51 | #define MAX_LOGICAL_DMA_CH_COUNT 32 | ||
52 | |||
44 | #undef DEBUG | 53 | #undef DEBUG |
45 | 54 | ||
46 | #ifndef CONFIG_ARCH_OMAP1 | 55 | #ifndef CONFIG_ARCH_OMAP1 |
@@ -883,7 +892,7 @@ void omap_start_dma(int lch) | |||
883 | 892 | ||
884 | if (!omap_dma_in_1510_mode() && dma_chan[lch].next_lch != -1) { | 893 | if (!omap_dma_in_1510_mode() && dma_chan[lch].next_lch != -1) { |
885 | int next_lch, cur_lch; | 894 | int next_lch, cur_lch; |
886 | char dma_chan_link_map[dma_lch_count]; | 895 | char dma_chan_link_map[MAX_LOGICAL_DMA_CH_COUNT]; |
887 | 896 | ||
888 | dma_chan_link_map[lch] = 1; | 897 | dma_chan_link_map[lch] = 1; |
889 | /* Set the link register of the first channel */ | 898 | /* Set the link register of the first channel */ |
@@ -981,7 +990,7 @@ void omap_stop_dma(int lch) | |||
981 | 990 | ||
982 | if (!omap_dma_in_1510_mode() && dma_chan[lch].next_lch != -1) { | 991 | if (!omap_dma_in_1510_mode() && dma_chan[lch].next_lch != -1) { |
983 | int next_lch, cur_lch = lch; | 992 | int next_lch, cur_lch = lch; |
984 | char dma_chan_link_map[dma_lch_count]; | 993 | char dma_chan_link_map[MAX_LOGICAL_DMA_CH_COUNT]; |
985 | 994 | ||
986 | memset(dma_chan_link_map, 0, sizeof(dma_chan_link_map)); | 995 | memset(dma_chan_link_map, 0, sizeof(dma_chan_link_map)); |
987 | do { | 996 | do { |
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c index 652139c0339..c4ed35e89fb 100644 --- a/arch/arm/plat-omap/dmtimer.c +++ b/arch/arm/plat-omap/dmtimer.c | |||
@@ -349,11 +349,12 @@ EXPORT_SYMBOL_GPL(omap_dm_timer_start); | |||
349 | int omap_dm_timer_stop(struct omap_dm_timer *timer) | 349 | int omap_dm_timer_stop(struct omap_dm_timer *timer) |
350 | { | 350 | { |
351 | unsigned long rate = 0; | 351 | unsigned long rate = 0; |
352 | struct dmtimer_platform_data *pdata = timer->pdev->dev.platform_data; | 352 | struct dmtimer_platform_data *pdata; |
353 | 353 | ||
354 | if (unlikely(!timer)) | 354 | if (unlikely(!timer)) |
355 | return -EINVAL; | 355 | return -EINVAL; |
356 | 356 | ||
357 | pdata = timer->pdev->dev.platform_data; | ||
357 | if (!pdata->needs_manual_reset) | 358 | if (!pdata->needs_manual_reset) |
358 | rate = clk_get_rate(timer->fclk); | 359 | rate = clk_get_rate(timer->fclk); |
359 | 360 | ||
diff --git a/arch/arm/plat-omap/include/plat/board.h b/arch/arm/plat-omap/include/plat/board.h index d5eb4c87db9..4814c5b6530 100644 --- a/arch/arm/plat-omap/include/plat/board.h +++ b/arch/arm/plat-omap/include/plat/board.h | |||
@@ -91,6 +91,8 @@ struct omap_usb_config { | |||
91 | u32 (*usb0_init)(unsigned nwires, unsigned is_device); | 91 | u32 (*usb0_init)(unsigned nwires, unsigned is_device); |
92 | u32 (*usb1_init)(unsigned nwires); | 92 | u32 (*usb1_init)(unsigned nwires); |
93 | u32 (*usb2_init)(unsigned nwires, unsigned alt_pingroup); | 93 | u32 (*usb2_init)(unsigned nwires, unsigned alt_pingroup); |
94 | |||
95 | int (*ocpi_enable)(void); | ||
94 | }; | 96 | }; |
95 | 97 | ||
96 | struct omap_lcd_config { | 98 | struct omap_lcd_config { |
diff --git a/arch/arm/plat-omap/include/plat/common.h b/arch/arm/plat-omap/include/plat/common.h index b4d7ec3fbfb..a557b8484e6 100644 --- a/arch/arm/plat-omap/include/plat/common.h +++ b/arch/arm/plat-omap/include/plat/common.h | |||
@@ -32,6 +32,8 @@ | |||
32 | 32 | ||
33 | extern int __init omap_init_clocksource_32k(void); | 33 | extern int __init omap_init_clocksource_32k(void); |
34 | 34 | ||
35 | extern void __init omap_check_revision(void); | ||
36 | |||
35 | extern void omap_reserve(void); | 37 | extern void omap_reserve(void); |
36 | extern int omap_dss_reset(struct omap_hwmod *); | 38 | extern int omap_dss_reset(struct omap_hwmod *); |
37 | 39 | ||
diff --git a/arch/arm/plat-omap/include/plat/dma.h b/arch/arm/plat-omap/include/plat/dma.h index dc562a5c0a8..42afb4c4551 100644 --- a/arch/arm/plat-omap/include/plat/dma.h +++ b/arch/arm/plat-omap/include/plat/dma.h | |||
@@ -442,6 +442,7 @@ struct omap_system_dma_plat_info { | |||
442 | u32 (*dma_read)(int reg, int lch); | 442 | u32 (*dma_read)(int reg, int lch); |
443 | }; | 443 | }; |
444 | 444 | ||
445 | extern void __init omap_init_consistent_dma_size(void); | ||
445 | extern void omap_set_dma_priority(int lch, int dst_port, int priority); | 446 | extern void omap_set_dma_priority(int lch, int dst_port, int priority); |
446 | extern int omap_request_dma(int dev_id, const char *dev_name, | 447 | extern int omap_request_dma(int dev_id, const char *dev_name, |
447 | void (*callback)(int lch, u16 ch_status, void *data), | 448 | void (*callback)(int lch, u16 ch_status, void *data), |
diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/arch/arm/plat-omap/include/plat/dmtimer.h index 9418f00b6c3..230ff91be49 100644 --- a/arch/arm/plat-omap/include/plat/dmtimer.h +++ b/arch/arm/plat-omap/include/plat/dmtimer.h | |||
@@ -316,12 +316,12 @@ static inline void __omap_dm_timer_init_regs(struct omap_dm_timer *timer) | |||
316 | OMAP_TIMER_V1_SYS_STAT_OFFSET; | 316 | OMAP_TIMER_V1_SYS_STAT_OFFSET; |
317 | timer->irq_stat = timer->io_base + OMAP_TIMER_V1_STAT_OFFSET; | 317 | timer->irq_stat = timer->io_base + OMAP_TIMER_V1_STAT_OFFSET; |
318 | timer->irq_ena = timer->io_base + OMAP_TIMER_V1_INT_EN_OFFSET; | 318 | timer->irq_ena = timer->io_base + OMAP_TIMER_V1_INT_EN_OFFSET; |
319 | timer->irq_dis = 0; | 319 | timer->irq_dis = NULL; |
320 | timer->pend = timer->io_base + _OMAP_TIMER_WRITE_PEND_OFFSET; | 320 | timer->pend = timer->io_base + _OMAP_TIMER_WRITE_PEND_OFFSET; |
321 | timer->func_base = timer->io_base; | 321 | timer->func_base = timer->io_base; |
322 | } else { | 322 | } else { |
323 | timer->revision = 2; | 323 | timer->revision = 2; |
324 | timer->sys_stat = 0; | 324 | timer->sys_stat = NULL; |
325 | timer->irq_stat = timer->io_base + OMAP_TIMER_V2_IRQSTATUS; | 325 | timer->irq_stat = timer->io_base + OMAP_TIMER_V2_IRQSTATUS; |
326 | timer->irq_ena = timer->io_base + OMAP_TIMER_V2_IRQENABLE_SET; | 326 | timer->irq_ena = timer->io_base + OMAP_TIMER_V2_IRQENABLE_SET; |
327 | timer->irq_dis = timer->io_base + OMAP_TIMER_V2_IRQENABLE_CLR; | 327 | timer->irq_dis = timer->io_base + OMAP_TIMER_V2_IRQENABLE_CLR; |
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h index 3f26db4ee8e..14dde32cd40 100644 --- a/arch/arm/plat-omap/include/plat/omap_hwmod.h +++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h | |||
@@ -213,11 +213,16 @@ struct omap_hwmod_addr_space { | |||
213 | */ | 213 | */ |
214 | #define OCP_USER_MPU (1 << 0) | 214 | #define OCP_USER_MPU (1 << 0) |
215 | #define OCP_USER_SDMA (1 << 1) | 215 | #define OCP_USER_SDMA (1 << 1) |
216 | #define OCP_USER_DSP (1 << 2) | ||
216 | 217 | ||
217 | /* omap_hwmod_ocp_if.flags bits */ | 218 | /* omap_hwmod_ocp_if.flags bits */ |
218 | #define OCPIF_SWSUP_IDLE (1 << 0) | 219 | #define OCPIF_SWSUP_IDLE (1 << 0) |
219 | #define OCPIF_CAN_BURST (1 << 1) | 220 | #define OCPIF_CAN_BURST (1 << 1) |
220 | 221 | ||
222 | /* omap_hwmod_ocp_if._int_flags possibilities */ | ||
223 | #define _OCPIF_INT_FLAGS_REGISTERED (1 << 0) | ||
224 | |||
225 | |||
221 | /** | 226 | /** |
222 | * struct omap_hwmod_ocp_if - OCP interface data | 227 | * struct omap_hwmod_ocp_if - OCP interface data |
223 | * @master: struct omap_hwmod that initiates OCP transactions on this link | 228 | * @master: struct omap_hwmod that initiates OCP transactions on this link |
@@ -229,6 +234,7 @@ struct omap_hwmod_addr_space { | |||
229 | * @width: OCP data width | 234 | * @width: OCP data width |
230 | * @user: initiators using this interface (see OCP_USER_* macros above) | 235 | * @user: initiators using this interface (see OCP_USER_* macros above) |
231 | * @flags: OCP interface flags (see OCPIF_* macros above) | 236 | * @flags: OCP interface flags (see OCPIF_* macros above) |
237 | * @_int_flags: internal flags (see _OCPIF_INT_FLAGS* macros above) | ||
232 | * | 238 | * |
233 | * It may also be useful to add a tag_cnt field for OCP2.x devices. | 239 | * It may also be useful to add a tag_cnt field for OCP2.x devices. |
234 | * | 240 | * |
@@ -247,6 +253,7 @@ struct omap_hwmod_ocp_if { | |||
247 | u8 width; | 253 | u8 width; |
248 | u8 user; | 254 | u8 user; |
249 | u8 flags; | 255 | u8 flags; |
256 | u8 _int_flags; | ||
250 | }; | 257 | }; |
251 | 258 | ||
252 | 259 | ||
@@ -327,9 +334,9 @@ struct omap_hwmod_sysc_fields { | |||
327 | * then this field has to be populated with the correct offset structure. | 334 | * then this field has to be populated with the correct offset structure. |
328 | */ | 335 | */ |
329 | struct omap_hwmod_class_sysconfig { | 336 | struct omap_hwmod_class_sysconfig { |
330 | u16 rev_offs; | 337 | u32 rev_offs; |
331 | u16 sysc_offs; | 338 | u32 sysc_offs; |
332 | u16 syss_offs; | 339 | u32 syss_offs; |
333 | u16 sysc_flags; | 340 | u16 sysc_flags; |
334 | struct omap_hwmod_sysc_fields *sysc_fields; | 341 | struct omap_hwmod_sysc_fields *sysc_fields; |
335 | u8 srst_udelay; | 342 | u8 srst_udelay; |
@@ -476,6 +483,16 @@ struct omap_hwmod_class { | |||
476 | }; | 483 | }; |
477 | 484 | ||
478 | /** | 485 | /** |
486 | * struct omap_hwmod_link - internal structure linking hwmods with ocp_ifs | ||
487 | * @ocp_if: OCP interface structure record pointer | ||
488 | * @node: list_head pointing to next struct omap_hwmod_link in a list | ||
489 | */ | ||
490 | struct omap_hwmod_link { | ||
491 | struct omap_hwmod_ocp_if *ocp_if; | ||
492 | struct list_head node; | ||
493 | }; | ||
494 | |||
495 | /** | ||
479 | * struct omap_hwmod - integration data for OMAP hardware "modules" (IP blocks) | 496 | * struct omap_hwmod - integration data for OMAP hardware "modules" (IP blocks) |
480 | * @name: name of the hwmod | 497 | * @name: name of the hwmod |
481 | * @class: struct omap_hwmod_class * to the class of this hwmod | 498 | * @class: struct omap_hwmod_class * to the class of this hwmod |
@@ -487,12 +504,10 @@ struct omap_hwmod_class { | |||
487 | * @_clk: pointer to the main struct clk (filled in at runtime) | 504 | * @_clk: pointer to the main struct clk (filled in at runtime) |
488 | * @opt_clks: other device clocks that drivers can request (0..*) | 505 | * @opt_clks: other device clocks that drivers can request (0..*) |
489 | * @voltdm: pointer to voltage domain (filled in at runtime) | 506 | * @voltdm: pointer to voltage domain (filled in at runtime) |
490 | * @masters: ptr to array of OCP ifs that this hwmod can initiate on | ||
491 | * @slaves: ptr to array of OCP ifs that this hwmod can respond on | ||
492 | * @dev_attr: arbitrary device attributes that can be passed to the driver | 507 | * @dev_attr: arbitrary device attributes that can be passed to the driver |
493 | * @_sysc_cache: internal-use hwmod flags | 508 | * @_sysc_cache: internal-use hwmod flags |
494 | * @_mpu_rt_va: cached register target start address (internal use) | 509 | * @_mpu_rt_va: cached register target start address (internal use) |
495 | * @_mpu_port_index: cached MPU register target slave ID (internal use) | 510 | * @_mpu_port: cached MPU register target slave (internal use) |
496 | * @opt_clks_cnt: number of @opt_clks | 511 | * @opt_clks_cnt: number of @opt_clks |
497 | * @master_cnt: number of @master entries | 512 | * @master_cnt: number of @master entries |
498 | * @slaves_cnt: number of @slave entries | 513 | * @slaves_cnt: number of @slave entries |
@@ -511,6 +526,8 @@ struct omap_hwmod_class { | |||
511 | * | 526 | * |
512 | * Parameter names beginning with an underscore are managed internally by | 527 | * Parameter names beginning with an underscore are managed internally by |
513 | * the omap_hwmod code and should not be set during initialization. | 528 | * the omap_hwmod code and should not be set during initialization. |
529 | * | ||
530 | * @masters and @slaves are now deprecated. | ||
514 | */ | 531 | */ |
515 | struct omap_hwmod { | 532 | struct omap_hwmod { |
516 | const char *name; | 533 | const char *name; |
@@ -529,15 +546,15 @@ struct omap_hwmod { | |||
529 | struct omap_hwmod_opt_clk *opt_clks; | 546 | struct omap_hwmod_opt_clk *opt_clks; |
530 | char *clkdm_name; | 547 | char *clkdm_name; |
531 | struct clockdomain *clkdm; | 548 | struct clockdomain *clkdm; |
532 | struct omap_hwmod_ocp_if **masters; /* connect to *_IA */ | 549 | struct list_head master_ports; /* connect to *_IA */ |
533 | struct omap_hwmod_ocp_if **slaves; /* connect to *_TA */ | 550 | struct list_head slave_ports; /* connect to *_TA */ |
534 | void *dev_attr; | 551 | void *dev_attr; |
535 | u32 _sysc_cache; | 552 | u32 _sysc_cache; |
536 | void __iomem *_mpu_rt_va; | 553 | void __iomem *_mpu_rt_va; |
537 | spinlock_t _lock; | 554 | spinlock_t _lock; |
538 | struct list_head node; | 555 | struct list_head node; |
556 | struct omap_hwmod_ocp_if *_mpu_port; | ||
539 | u16 flags; | 557 | u16 flags; |
540 | u8 _mpu_port_index; | ||
541 | u8 response_lat; | 558 | u8 response_lat; |
542 | u8 rst_lines_cnt; | 559 | u8 rst_lines_cnt; |
543 | u8 opt_clks_cnt; | 560 | u8 opt_clks_cnt; |
@@ -549,7 +566,6 @@ struct omap_hwmod { | |||
549 | u8 _postsetup_state; | 566 | u8 _postsetup_state; |
550 | }; | 567 | }; |
551 | 568 | ||
552 | int omap_hwmod_register(struct omap_hwmod **ohs); | ||
553 | struct omap_hwmod *omap_hwmod_lookup(const char *name); | 569 | struct omap_hwmod *omap_hwmod_lookup(const char *name); |
554 | int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data), | 570 | int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data), |
555 | void *data); | 571 | void *data); |
@@ -581,6 +597,8 @@ int omap_hwmod_softreset(struct omap_hwmod *oh); | |||
581 | 597 | ||
582 | int omap_hwmod_count_resources(struct omap_hwmod *oh); | 598 | int omap_hwmod_count_resources(struct omap_hwmod *oh); |
583 | int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res); | 599 | int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res); |
600 | int omap_hwmod_get_resource_byname(struct omap_hwmod *oh, unsigned int type, | ||
601 | const char *name, struct resource *res); | ||
584 | 602 | ||
585 | struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh); | 603 | struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh); |
586 | void __iomem *omap_hwmod_get_mpu_rt_va(struct omap_hwmod *oh); | 604 | void __iomem *omap_hwmod_get_mpu_rt_va(struct omap_hwmod *oh); |
@@ -619,4 +637,6 @@ extern int omap2430_hwmod_init(void); | |||
619 | extern int omap3xxx_hwmod_init(void); | 637 | extern int omap3xxx_hwmod_init(void); |
620 | extern int omap44xx_hwmod_init(void); | 638 | extern int omap44xx_hwmod_init(void); |
621 | 639 | ||
640 | extern int __init omap_hwmod_register_links(struct omap_hwmod_ocp_if **ois); | ||
641 | |||
622 | #endif | 642 | #endif |
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index d50cbc6385b..c490240bb82 100644 --- a/arch/arm/plat-omap/omap_device.c +++ b/arch/arm/plat-omap/omap_device.c | |||
@@ -475,13 +475,11 @@ static int omap_device_count_resources(struct omap_device *od) | |||
475 | static int omap_device_fill_resources(struct omap_device *od, | 475 | static int omap_device_fill_resources(struct omap_device *od, |
476 | struct resource *res) | 476 | struct resource *res) |
477 | { | 477 | { |
478 | int c = 0; | ||
479 | int i, r; | 478 | int i, r; |
480 | 479 | ||
481 | for (i = 0; i < od->hwmods_cnt; i++) { | 480 | for (i = 0; i < od->hwmods_cnt; i++) { |
482 | r = omap_hwmod_fill_resources(od->hwmods[i], res); | 481 | r = omap_hwmod_fill_resources(od->hwmods[i], res); |
483 | res += r; | 482 | res += r; |
484 | c += r; | ||
485 | } | 483 | } |
486 | 484 | ||
487 | return 0; | 485 | return 0; |
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c index f9a8c5341ee..477363c163e 100644 --- a/arch/arm/plat-omap/sram.c +++ b/arch/arm/plat-omap/sram.c | |||
@@ -196,8 +196,8 @@ static void __init omap_map_sram(void) | |||
196 | * Looks like we need to preserve some bootloader code at the | 196 | * Looks like we need to preserve some bootloader code at the |
197 | * beginning of SRAM for jumping to flash for reboot to work... | 197 | * beginning of SRAM for jumping to flash for reboot to work... |
198 | */ | 198 | */ |
199 | memset((void *)omap_sram_base + SRAM_BOOTLOADER_SZ, 0, | 199 | memset_io(omap_sram_base + SRAM_BOOTLOADER_SZ, 0, |
200 | omap_sram_size - SRAM_BOOTLOADER_SZ); | 200 | omap_sram_size - SRAM_BOOTLOADER_SZ); |
201 | } | 201 | } |
202 | 202 | ||
203 | /* | 203 | /* |
diff --git a/arch/arm/plat-omap/usb.c b/arch/arm/plat-omap/usb.c index d2bbfd1cb0b..daa0327381b 100644 --- a/arch/arm/plat-omap/usb.c +++ b/arch/arm/plat-omap/usb.c | |||
@@ -31,15 +31,12 @@ | |||
31 | 31 | ||
32 | #include <mach/hardware.h> | 32 | #include <mach/hardware.h> |
33 | 33 | ||
34 | #include "../mach-omap2/common.h" | ||
35 | |||
36 | #ifdef CONFIG_ARCH_OMAP_OTG | 34 | #ifdef CONFIG_ARCH_OMAP_OTG |
37 | 35 | ||
38 | void __init | 36 | void __init |
39 | omap_otg_init(struct omap_usb_config *config) | 37 | omap_otg_init(struct omap_usb_config *config) |
40 | { | 38 | { |
41 | u32 syscon; | 39 | u32 syscon; |
42 | int status; | ||
43 | int alt_pingroup = 0; | 40 | int alt_pingroup = 0; |
44 | 41 | ||
45 | /* NOTE: no bus or clock setup (yet?) */ | 42 | /* NOTE: no bus or clock setup (yet?) */ |
@@ -104,6 +101,7 @@ omap_otg_init(struct omap_usb_config *config) | |||
104 | #ifdef CONFIG_USB_GADGET_OMAP | 101 | #ifdef CONFIG_USB_GADGET_OMAP |
105 | if (config->otg || config->register_dev) { | 102 | if (config->otg || config->register_dev) { |
106 | struct platform_device *udc_device = config->udc_device; | 103 | struct platform_device *udc_device = config->udc_device; |
104 | int status; | ||
107 | 105 | ||
108 | syscon &= ~DEV_IDLE_EN; | 106 | syscon &= ~DEV_IDLE_EN; |
109 | udc_device->dev.platform_data = config; | 107 | udc_device->dev.platform_data = config; |
@@ -116,6 +114,7 @@ omap_otg_init(struct omap_usb_config *config) | |||
116 | #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) | 114 | #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) |
117 | if (config->otg || config->register_host) { | 115 | if (config->otg || config->register_host) { |
118 | struct platform_device *ohci_device = config->ohci_device; | 116 | struct platform_device *ohci_device = config->ohci_device; |
117 | int status; | ||
119 | 118 | ||
120 | syscon &= ~HST_IDLE_EN; | 119 | syscon &= ~HST_IDLE_EN; |
121 | ohci_device->dev.platform_data = config; | 120 | ohci_device->dev.platform_data = config; |
@@ -128,6 +127,7 @@ omap_otg_init(struct omap_usb_config *config) | |||
128 | #ifdef CONFIG_USB_OTG | 127 | #ifdef CONFIG_USB_OTG |
129 | if (config->otg) { | 128 | if (config->otg) { |
130 | struct platform_device *otg_device = config->otg_device; | 129 | struct platform_device *otg_device = config->otg_device; |
130 | int status; | ||
131 | 131 | ||
132 | syscon &= ~OTG_IDLE_EN; | 132 | syscon &= ~OTG_IDLE_EN; |
133 | otg_device->dev.platform_data = config; | 133 | otg_device->dev.platform_data = config; |
@@ -138,8 +138,6 @@ omap_otg_init(struct omap_usb_config *config) | |||
138 | #endif | 138 | #endif |
139 | pr_debug("OTG_SYSCON_1 = %08x\n", omap_readl(OTG_SYSCON_1)); | 139 | pr_debug("OTG_SYSCON_1 = %08x\n", omap_readl(OTG_SYSCON_1)); |
140 | omap_writel(syscon, OTG_SYSCON_1); | 140 | omap_writel(syscon, OTG_SYSCON_1); |
141 | |||
142 | status = 0; | ||
143 | } | 141 | } |
144 | 142 | ||
145 | #else | 143 | #else |
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c index 8b928f9bc1c..1013a341b0f 100644 --- a/arch/arm/plat-samsung/devs.c +++ b/arch/arm/plat-samsung/devs.c | |||
@@ -272,16 +272,8 @@ struct platform_device s5p_device_fimc3 = { | |||
272 | 272 | ||
273 | #ifdef CONFIG_S5P_DEV_G2D | 273 | #ifdef CONFIG_S5P_DEV_G2D |
274 | static struct resource s5p_g2d_resource[] = { | 274 | static struct resource s5p_g2d_resource[] = { |
275 | [0] = { | 275 | [0] = DEFINE_RES_MEM(S5P_PA_G2D, SZ_4K), |
276 | .start = S5P_PA_G2D, | 276 | [1] = DEFINE_RES_IRQ(IRQ_2D), |
277 | .end = S5P_PA_G2D + SZ_4K - 1, | ||
278 | .flags = IORESOURCE_MEM, | ||
279 | }, | ||
280 | [1] = { | ||
281 | .start = IRQ_2D, | ||
282 | .end = IRQ_2D, | ||
283 | .flags = IORESOURCE_IRQ, | ||
284 | }, | ||
285 | }; | 277 | }; |
286 | 278 | ||
287 | struct platform_device s5p_device_g2d = { | 279 | struct platform_device s5p_device_g2d = { |
@@ -370,7 +362,6 @@ struct s3c_sdhci_platdata s3c_hsmmc0_def_platdata = { | |||
370 | .max_width = 4, | 362 | .max_width = 4, |
371 | .host_caps = (MMC_CAP_4_BIT_DATA | | 363 | .host_caps = (MMC_CAP_4_BIT_DATA | |
372 | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED), | 364 | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED), |
373 | .clk_type = S3C_SDHCI_CLK_DIV_INTERNAL, | ||
374 | }; | 365 | }; |
375 | 366 | ||
376 | struct platform_device s3c_device_hsmmc0 = { | 367 | struct platform_device s3c_device_hsmmc0 = { |
@@ -401,7 +392,6 @@ struct s3c_sdhci_platdata s3c_hsmmc1_def_platdata = { | |||
401 | .max_width = 4, | 392 | .max_width = 4, |
402 | .host_caps = (MMC_CAP_4_BIT_DATA | | 393 | .host_caps = (MMC_CAP_4_BIT_DATA | |
403 | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED), | 394 | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED), |
404 | .clk_type = S3C_SDHCI_CLK_DIV_INTERNAL, | ||
405 | }; | 395 | }; |
406 | 396 | ||
407 | struct platform_device s3c_device_hsmmc1 = { | 397 | struct platform_device s3c_device_hsmmc1 = { |
@@ -434,7 +424,6 @@ struct s3c_sdhci_platdata s3c_hsmmc2_def_platdata = { | |||
434 | .max_width = 4, | 424 | .max_width = 4, |
435 | .host_caps = (MMC_CAP_4_BIT_DATA | | 425 | .host_caps = (MMC_CAP_4_BIT_DATA | |
436 | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED), | 426 | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED), |
437 | .clk_type = S3C_SDHCI_CLK_DIV_INTERNAL, | ||
438 | }; | 427 | }; |
439 | 428 | ||
440 | struct platform_device s3c_device_hsmmc2 = { | 429 | struct platform_device s3c_device_hsmmc2 = { |
@@ -465,7 +454,6 @@ struct s3c_sdhci_platdata s3c_hsmmc3_def_platdata = { | |||
465 | .max_width = 4, | 454 | .max_width = 4, |
466 | .host_caps = (MMC_CAP_4_BIT_DATA | | 455 | .host_caps = (MMC_CAP_4_BIT_DATA | |
467 | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED), | 456 | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED), |
468 | .clk_type = S3C_SDHCI_CLK_DIV_INTERNAL, | ||
469 | }; | 457 | }; |
470 | 458 | ||
471 | struct platform_device s3c_device_hsmmc3 = { | 459 | struct platform_device s3c_device_hsmmc3 = { |
diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h b/arch/arm/plat-samsung/include/plat/sdhci.h index e834c5ef437..151cc9195cf 100644 --- a/arch/arm/plat-samsung/include/plat/sdhci.h +++ b/arch/arm/plat-samsung/include/plat/sdhci.h | |||
@@ -33,18 +33,12 @@ enum cd_types { | |||
33 | S3C_SDHCI_CD_PERMANENT, /* no CD line, card permanently wired to host */ | 33 | S3C_SDHCI_CD_PERMANENT, /* no CD line, card permanently wired to host */ |
34 | }; | 34 | }; |
35 | 35 | ||
36 | enum clk_types { | ||
37 | S3C_SDHCI_CLK_DIV_INTERNAL, /* use mmc internal clock divider */ | ||
38 | S3C_SDHCI_CLK_DIV_EXTERNAL, /* use external clock divider */ | ||
39 | }; | ||
40 | |||
41 | /** | 36 | /** |
42 | * struct s3c_sdhci_platdata() - Platform device data for Samsung SDHCI | 37 | * struct s3c_sdhci_platdata() - Platform device data for Samsung SDHCI |
43 | * @max_width: The maximum number of data bits supported. | 38 | * @max_width: The maximum number of data bits supported. |
44 | * @host_caps: Standard MMC host capabilities bit field. | 39 | * @host_caps: Standard MMC host capabilities bit field. |
45 | * @host_caps2: The second standard MMC host capabilities bit field. | 40 | * @host_caps2: The second standard MMC host capabilities bit field. |
46 | * @cd_type: Type of Card Detection method (see cd_types enum above) | 41 | * @cd_type: Type of Card Detection method (see cd_types enum above) |
47 | * @clk_type: Type of clock divider method (see clk_types enum above) | ||
48 | * @ext_cd_init: Initialize external card detect subsystem. Called on | 42 | * @ext_cd_init: Initialize external card detect subsystem. Called on |
49 | * sdhci-s3c driver probe when cd_type == S3C_SDHCI_CD_EXTERNAL. | 43 | * sdhci-s3c driver probe when cd_type == S3C_SDHCI_CD_EXTERNAL. |
50 | * notify_func argument is a callback to the sdhci-s3c driver | 44 | * notify_func argument is a callback to the sdhci-s3c driver |
@@ -69,7 +63,6 @@ struct s3c_sdhci_platdata { | |||
69 | unsigned int host_caps2; | 63 | unsigned int host_caps2; |
70 | unsigned int pm_caps; | 64 | unsigned int pm_caps; |
71 | enum cd_types cd_type; | 65 | enum cd_types cd_type; |
72 | enum clk_types clk_type; | ||
73 | 66 | ||
74 | int ext_cd_gpio; | 67 | int ext_cd_gpio; |
75 | bool ext_cd_gpio_invert; | 68 | bool ext_cd_gpio_invert; |
diff --git a/arch/arm/plat-samsung/platformdata.c b/arch/arm/plat-samsung/platformdata.c index fa78aa710ed..b430e994628 100644 --- a/arch/arm/plat-samsung/platformdata.c +++ b/arch/arm/plat-samsung/platformdata.c | |||
@@ -57,6 +57,4 @@ void s3c_sdhci_set_platdata(struct s3c_sdhci_platdata *pd, | |||
57 | set->host_caps2 |= pd->host_caps2; | 57 | set->host_caps2 |= pd->host_caps2; |
58 | if (pd->pm_caps) | 58 | if (pd->pm_caps) |
59 | set->pm_caps |= pd->pm_caps; | 59 | set->pm_caps |= pd->pm_caps; |
60 | if (pd->clk_type) | ||
61 | set->clk_type = pd->clk_type; | ||
62 | } | 60 | } |
diff --git a/arch/arm/plat-versatile/Kconfig b/arch/arm/plat-versatile/Kconfig index 043f7b02a9e..81ee7cc3445 100644 --- a/arch/arm/plat-versatile/Kconfig +++ b/arch/arm/plat-versatile/Kconfig | |||
@@ -5,6 +5,12 @@ config PLAT_VERSATILE_CLCD | |||
5 | 5 | ||
6 | config PLAT_VERSATILE_FPGA_IRQ | 6 | config PLAT_VERSATILE_FPGA_IRQ |
7 | bool | 7 | bool |
8 | select IRQ_DOMAIN | ||
9 | |||
10 | config PLAT_VERSATILE_FPGA_IRQ_NR | ||
11 | int | ||
12 | default 4 | ||
13 | depends on PLAT_VERSATILE_FPGA_IRQ | ||
8 | 14 | ||
9 | config PLAT_VERSATILE_LEDS | 15 | config PLAT_VERSATILE_LEDS |
10 | def_bool y if LEDS_CLASS | 16 | def_bool y if LEDS_CLASS |
diff --git a/arch/arm/plat-versatile/fpga-irq.c b/arch/arm/plat-versatile/fpga-irq.c index f0cc8e19b09..6e70d03824a 100644 --- a/arch/arm/plat-versatile/fpga-irq.c +++ b/arch/arm/plat-versatile/fpga-irq.c | |||
@@ -3,7 +3,10 @@ | |||
3 | */ | 3 | */ |
4 | #include <linux/irq.h> | 4 | #include <linux/irq.h> |
5 | #include <linux/io.h> | 5 | #include <linux/io.h> |
6 | #include <linux/irqdomain.h> | ||
7 | #include <linux/module.h> | ||
6 | 8 | ||
9 | #include <asm/exception.h> | ||
7 | #include <asm/mach/irq.h> | 10 | #include <asm/mach/irq.h> |
8 | #include <plat/fpga-irq.h> | 11 | #include <plat/fpga-irq.h> |
9 | 12 | ||
@@ -12,10 +15,32 @@ | |||
12 | #define IRQ_ENABLE_SET 0x08 | 15 | #define IRQ_ENABLE_SET 0x08 |
13 | #define IRQ_ENABLE_CLEAR 0x0c | 16 | #define IRQ_ENABLE_CLEAR 0x0c |
14 | 17 | ||
18 | /** | ||
19 | * struct fpga_irq_data - irq data container for the FPGA IRQ controller | ||
20 | * @base: memory offset in virtual memory | ||
21 | * @irq_start: first IRQ number handled by this instance | ||
22 | * @chip: chip container for this instance | ||
23 | * @domain: IRQ domain for this instance | ||
24 | * @valid: mask for valid IRQs on this controller | ||
25 | * @used_irqs: number of active IRQs on this controller | ||
26 | */ | ||
27 | struct fpga_irq_data { | ||
28 | void __iomem *base; | ||
29 | unsigned int irq_start; | ||
30 | struct irq_chip chip; | ||
31 | u32 valid; | ||
32 | struct irq_domain *domain; | ||
33 | u8 used_irqs; | ||
34 | }; | ||
35 | |||
36 | /* we cannot allocate memory when the controllers are initially registered */ | ||
37 | static struct fpga_irq_data fpga_irq_devices[CONFIG_PLAT_VERSATILE_FPGA_IRQ_NR]; | ||
38 | static int fpga_irq_id; | ||
39 | |||
15 | static void fpga_irq_mask(struct irq_data *d) | 40 | static void fpga_irq_mask(struct irq_data *d) |
16 | { | 41 | { |
17 | struct fpga_irq_data *f = irq_data_get_irq_chip_data(d); | 42 | struct fpga_irq_data *f = irq_data_get_irq_chip_data(d); |
18 | u32 mask = 1 << (d->irq - f->irq_start); | 43 | u32 mask = 1 << d->hwirq; |
19 | 44 | ||
20 | writel(mask, f->base + IRQ_ENABLE_CLEAR); | 45 | writel(mask, f->base + IRQ_ENABLE_CLEAR); |
21 | } | 46 | } |
@@ -23,7 +48,7 @@ static void fpga_irq_mask(struct irq_data *d) | |||
23 | static void fpga_irq_unmask(struct irq_data *d) | 48 | static void fpga_irq_unmask(struct irq_data *d) |
24 | { | 49 | { |
25 | struct fpga_irq_data *f = irq_data_get_irq_chip_data(d); | 50 | struct fpga_irq_data *f = irq_data_get_irq_chip_data(d); |
26 | u32 mask = 1 << (d->irq - f->irq_start); | 51 | u32 mask = 1 << d->hwirq; |
27 | 52 | ||
28 | writel(mask, f->base + IRQ_ENABLE_SET); | 53 | writel(mask, f->base + IRQ_ENABLE_SET); |
29 | } | 54 | } |
@@ -41,32 +66,93 @@ static void fpga_irq_handle(unsigned int irq, struct irq_desc *desc) | |||
41 | do { | 66 | do { |
42 | irq = ffs(status) - 1; | 67 | irq = ffs(status) - 1; |
43 | status &= ~(1 << irq); | 68 | status &= ~(1 << irq); |
44 | 69 | generic_handle_irq(irq_find_mapping(f->domain, irq)); | |
45 | generic_handle_irq(irq + f->irq_start); | ||
46 | } while (status); | 70 | } while (status); |
47 | } | 71 | } |
48 | 72 | ||
49 | void __init fpga_irq_init(int parent_irq, u32 valid, struct fpga_irq_data *f) | 73 | /* |
74 | * Handle each interrupt in a single FPGA IRQ controller. Returns non-zero | ||
75 | * if we've handled at least one interrupt. This does a single read of the | ||
76 | * status register and handles all interrupts in order from LSB first. | ||
77 | */ | ||
78 | static int handle_one_fpga(struct fpga_irq_data *f, struct pt_regs *regs) | ||
79 | { | ||
80 | int handled = 0; | ||
81 | int irq; | ||
82 | u32 status; | ||
83 | |||
84 | while ((status = readl(f->base + IRQ_STATUS))) { | ||
85 | irq = ffs(status) - 1; | ||
86 | handle_IRQ(irq_find_mapping(f->domain, irq), regs); | ||
87 | handled = 1; | ||
88 | } | ||
89 | |||
90 | return handled; | ||
91 | } | ||
92 | |||
93 | /* | ||
94 | * Keep iterating over all registered FPGA IRQ controllers until there are | ||
95 | * no pending interrupts. | ||
96 | */ | ||
97 | asmlinkage void __exception_irq_entry fpga_handle_irq(struct pt_regs *regs) | ||
50 | { | 98 | { |
51 | unsigned int i; | 99 | int i, handled; |
52 | 100 | ||
101 | do { | ||
102 | for (i = 0, handled = 0; i < fpga_irq_id; ++i) | ||
103 | handled |= handle_one_fpga(&fpga_irq_devices[i], regs); | ||
104 | } while (handled); | ||
105 | } | ||
106 | |||
107 | static int fpga_irqdomain_map(struct irq_domain *d, unsigned int irq, | ||
108 | irq_hw_number_t hwirq) | ||
109 | { | ||
110 | struct fpga_irq_data *f = d->host_data; | ||
111 | |||
112 | /* Skip invalid IRQs, only register handlers for the real ones */ | ||
113 | if (!(f->valid & (1 << hwirq))) | ||
114 | return -ENOTSUPP; | ||
115 | irq_set_chip_data(irq, f); | ||
116 | irq_set_chip_and_handler(irq, &f->chip, | ||
117 | handle_level_irq); | ||
118 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | ||
119 | f->used_irqs++; | ||
120 | return 0; | ||
121 | } | ||
122 | |||
123 | static struct irq_domain_ops fpga_irqdomain_ops = { | ||
124 | .map = fpga_irqdomain_map, | ||
125 | .xlate = irq_domain_xlate_onetwocell, | ||
126 | }; | ||
127 | |||
128 | void __init fpga_irq_init(void __iomem *base, const char *name, int irq_start, | ||
129 | int parent_irq, u32 valid, struct device_node *node) | ||
130 | { | ||
131 | struct fpga_irq_data *f; | ||
132 | |||
133 | if (fpga_irq_id >= ARRAY_SIZE(fpga_irq_devices)) { | ||
134 | printk(KERN_ERR "%s: too few FPGA IRQ controllers, increase CONFIG_PLAT_VERSATILE_FPGA_IRQ_NR\n", __func__); | ||
135 | return; | ||
136 | } | ||
137 | |||
138 | f = &fpga_irq_devices[fpga_irq_id]; | ||
139 | f->base = base; | ||
140 | f->irq_start = irq_start; | ||
141 | f->chip.name = name; | ||
53 | f->chip.irq_ack = fpga_irq_mask; | 142 | f->chip.irq_ack = fpga_irq_mask; |
54 | f->chip.irq_mask = fpga_irq_mask; | 143 | f->chip.irq_mask = fpga_irq_mask; |
55 | f->chip.irq_unmask = fpga_irq_unmask; | 144 | f->chip.irq_unmask = fpga_irq_unmask; |
145 | f->valid = valid; | ||
56 | 146 | ||
57 | if (parent_irq != -1) { | 147 | if (parent_irq != -1) { |
58 | irq_set_handler_data(parent_irq, f); | 148 | irq_set_handler_data(parent_irq, f); |
59 | irq_set_chained_handler(parent_irq, fpga_irq_handle); | 149 | irq_set_chained_handler(parent_irq, fpga_irq_handle); |
60 | } | 150 | } |
61 | 151 | ||
62 | for (i = 0; i < 32; i++) { | 152 | f->domain = irq_domain_add_legacy(node, fls(valid), f->irq_start, 0, |
63 | if (valid & (1 << i)) { | 153 | &fpga_irqdomain_ops, f); |
64 | unsigned int irq = f->irq_start + i; | 154 | pr_info("FPGA IRQ chip %d \"%s\" @ %p, %u irqs\n", |
155 | fpga_irq_id, name, base, f->used_irqs); | ||
65 | 156 | ||
66 | irq_set_chip_data(irq, f); | 157 | fpga_irq_id++; |
67 | irq_set_chip_and_handler(irq, &f->chip, | ||
68 | handle_level_irq); | ||
69 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | ||
70 | } | ||
71 | } | ||
72 | } | 158 | } |
diff --git a/arch/arm/plat-versatile/include/plat/fpga-irq.h b/arch/arm/plat-versatile/include/plat/fpga-irq.h index 627fafd1e59..91bcfb67551 100644 --- a/arch/arm/plat-versatile/include/plat/fpga-irq.h +++ b/arch/arm/plat-versatile/include/plat/fpga-irq.h | |||
@@ -1,12 +1,11 @@ | |||
1 | #ifndef PLAT_FPGA_IRQ_H | 1 | #ifndef PLAT_FPGA_IRQ_H |
2 | #define PLAT_FPGA_IRQ_H | 2 | #define PLAT_FPGA_IRQ_H |
3 | 3 | ||
4 | struct fpga_irq_data { | 4 | struct device_node; |
5 | void __iomem *base; | 5 | struct pt_regs; |
6 | unsigned int irq_start; | ||
7 | struct irq_chip chip; | ||
8 | }; | ||
9 | 6 | ||
10 | void fpga_irq_init(int, u32, struct fpga_irq_data *); | 7 | void fpga_handle_irq(struct pt_regs *regs); |
8 | void fpga_irq_init(void __iomem *, const char *, int, int, u32, | ||
9 | struct device_node *node); | ||
11 | 10 | ||
12 | #endif | 11 | #endif |
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types index f9c9f33f8cb..2997e56ce0d 100644 --- a/arch/arm/tools/mach-types +++ b/arch/arm/tools/mach-types | |||
@@ -16,7 +16,7 @@ | |||
16 | # are merged into mainline or have been edited in the machine database | 16 | # are merged into mainline or have been edited in the machine database |
17 | # within the last 12 months. References to machine_is_NAME() do not count! | 17 | # within the last 12 months. References to machine_is_NAME() do not count! |
18 | # | 18 | # |
19 | # Last update: Tue Dec 6 11:07:38 2011 | 19 | # Last update: Thu Apr 26 08:44:23 2012 |
20 | # | 20 | # |
21 | # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number | 21 | # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number |
22 | # | 22 | # |
@@ -205,6 +205,7 @@ omap_fsample MACH_OMAP_FSAMPLE OMAP_FSAMPLE 970 | |||
205 | snapper_cl15 MACH_SNAPPER_CL15 SNAPPER_CL15 986 | 205 | snapper_cl15 MACH_SNAPPER_CL15 SNAPPER_CL15 986 |
206 | omap_palmz71 MACH_OMAP_PALMZ71 OMAP_PALMZ71 993 | 206 | omap_palmz71 MACH_OMAP_PALMZ71 OMAP_PALMZ71 993 |
207 | smdk2412 MACH_SMDK2412 SMDK2412 1009 | 207 | smdk2412 MACH_SMDK2412 SMDK2412 1009 |
208 | bkde303 MACH_BKDE303 BKDE303 1021 | ||
208 | smdk2413 MACH_SMDK2413 SMDK2413 1022 | 209 | smdk2413 MACH_SMDK2413 SMDK2413 1022 |
209 | aml_m5900 MACH_AML_M5900 AML_M5900 1024 | 210 | aml_m5900 MACH_AML_M5900 AML_M5900 1024 |
210 | balloon3 MACH_BALLOON3 BALLOON3 1029 | 211 | balloon3 MACH_BALLOON3 BALLOON3 1029 |
@@ -381,8 +382,6 @@ davinci_da850_evm MACH_DAVINCI_DA850_EVM DAVINCI_DA850_EVM 2157 | |||
381 | at91sam9g10ek MACH_AT91SAM9G10EK AT91SAM9G10EK 2159 | 382 | at91sam9g10ek MACH_AT91SAM9G10EK AT91SAM9G10EK 2159 |
382 | omap_4430sdp MACH_OMAP_4430SDP OMAP_4430SDP 2160 | 383 | omap_4430sdp MACH_OMAP_4430SDP OMAP_4430SDP 2160 |
383 | magx_zn5 MACH_MAGX_ZN5 MAGX_ZN5 2162 | 384 | magx_zn5 MACH_MAGX_ZN5 MAGX_ZN5 2162 |
384 | btmavb101 MACH_BTMAVB101 BTMAVB101 2172 | ||
385 | btmawb101 MACH_BTMAWB101 BTMAWB101 2173 | ||
386 | tx25 MACH_TX25 TX25 2177 | 385 | tx25 MACH_TX25 TX25 2177 |
387 | omap3_torpedo MACH_OMAP3_TORPEDO OMAP3_TORPEDO 2178 | 386 | omap3_torpedo MACH_OMAP3_TORPEDO OMAP3_TORPEDO 2178 |
388 | anw6410 MACH_ANW6410 ANW6410 2183 | 387 | anw6410 MACH_ANW6410 ANW6410 2183 |
@@ -397,7 +396,6 @@ net2big_v2 MACH_NET2BIG_V2 NET2BIG_V2 2204 | |||
397 | net5big_v2 MACH_NET5BIG_V2 NET5BIG_V2 2206 | 396 | net5big_v2 MACH_NET5BIG_V2 NET5BIG_V2 2206 |
398 | inetspace_v2 MACH_INETSPACE_V2 INETSPACE_V2 2208 | 397 | inetspace_v2 MACH_INETSPACE_V2 INETSPACE_V2 2208 |
399 | at91sam9g45ekes MACH_AT91SAM9G45EKES AT91SAM9G45EKES 2212 | 398 | at91sam9g45ekes MACH_AT91SAM9G45EKES AT91SAM9G45EKES 2212 |
400 | pc7302 MACH_PC7302 PC7302 2220 | ||
401 | spear600 MACH_SPEAR600 SPEAR600 2236 | 399 | spear600 MACH_SPEAR600 SPEAR600 2236 |
402 | spear300 MACH_SPEAR300 SPEAR300 2237 | 400 | spear300 MACH_SPEAR300 SPEAR300 2237 |
403 | lilly1131 MACH_LILLY1131 LILLY1131 2239 | 401 | lilly1131 MACH_LILLY1131 LILLY1131 2239 |
@@ -407,7 +405,6 @@ d2net MACH_D2NET D2NET 2282 | |||
407 | bigdisk MACH_BIGDISK BIGDISK 2283 | 405 | bigdisk MACH_BIGDISK BIGDISK 2283 |
408 | at91sam9g20ek_2mmc MACH_AT91SAM9G20EK_2MMC AT91SAM9G20EK_2MMC 2288 | 406 | at91sam9g20ek_2mmc MACH_AT91SAM9G20EK_2MMC AT91SAM9G20EK_2MMC 2288 |
409 | bcmring MACH_BCMRING BCMRING 2289 | 407 | bcmring MACH_BCMRING BCMRING 2289 |
410 | dp6xx MACH_DP6XX DP6XX 2302 | ||
411 | mahimahi MACH_MAHIMAHI MAHIMAHI 2304 | 408 | mahimahi MACH_MAHIMAHI MAHIMAHI 2304 |
412 | smdk6442 MACH_SMDK6442 SMDK6442 2324 | 409 | smdk6442 MACH_SMDK6442 SMDK6442 2324 |
413 | openrd_base MACH_OPENRD_BASE OPENRD_BASE 2325 | 410 | openrd_base MACH_OPENRD_BASE OPENRD_BASE 2325 |
@@ -444,8 +441,6 @@ mx28evk MACH_MX28EVK MX28EVK 2531 | |||
444 | smartq5 MACH_SMARTQ5 SMARTQ5 2534 | 441 | smartq5 MACH_SMARTQ5 SMARTQ5 2534 |
445 | davinci_dm6467tevm MACH_DAVINCI_DM6467TEVM DAVINCI_DM6467TEVM 2548 | 442 | davinci_dm6467tevm MACH_DAVINCI_DM6467TEVM DAVINCI_DM6467TEVM 2548 |
446 | mxt_td60 MACH_MXT_TD60 MXT_TD60 2550 | 443 | mxt_td60 MACH_MXT_TD60 MXT_TD60 2550 |
447 | riot_bei2 MACH_RIOT_BEI2 RIOT_BEI2 2576 | ||
448 | riot_x37 MACH_RIOT_X37 RIOT_X37 2578 | ||
449 | pca101 MACH_PCA101 PCA101 2595 | 444 | pca101 MACH_PCA101 PCA101 2595 |
450 | capc7117 MACH_CAPC7117 CAPC7117 2612 | 445 | capc7117 MACH_CAPC7117 CAPC7117 2612 |
451 | icontrol MACH_ICONTROL ICONTROL 2624 | 446 | icontrol MACH_ICONTROL ICONTROL 2624 |
@@ -460,7 +455,6 @@ spear320 MACH_SPEAR320 SPEAR320 2661 | |||
460 | aquila MACH_AQUILA AQUILA 2676 | 455 | aquila MACH_AQUILA AQUILA 2676 |
461 | esata_sheevaplug MACH_ESATA_SHEEVAPLUG ESATA_SHEEVAPLUG 2678 | 456 | esata_sheevaplug MACH_ESATA_SHEEVAPLUG ESATA_SHEEVAPLUG 2678 |
462 | msm7x30_surf MACH_MSM7X30_SURF MSM7X30_SURF 2679 | 457 | msm7x30_surf MACH_MSM7X30_SURF MSM7X30_SURF 2679 |
463 | ea2478devkit MACH_EA2478DEVKIT EA2478DEVKIT 2683 | ||
464 | terastation_wxl MACH_TERASTATION_WXL TERASTATION_WXL 2697 | 458 | terastation_wxl MACH_TERASTATION_WXL TERASTATION_WXL 2697 |
465 | msm7x25_surf MACH_MSM7X25_SURF MSM7X25_SURF 2703 | 459 | msm7x25_surf MACH_MSM7X25_SURF MSM7X25_SURF 2703 |
466 | msm7x25_ffa MACH_MSM7X25_FFA MSM7X25_FFA 2704 | 460 | msm7x25_ffa MACH_MSM7X25_FFA MSM7X25_FFA 2704 |
@@ -479,8 +473,6 @@ wbd222 MACH_WBD222 WBD222 2753 | |||
479 | msm8x60_surf MACH_MSM8X60_SURF MSM8X60_SURF 2755 | 473 | msm8x60_surf MACH_MSM8X60_SURF MSM8X60_SURF 2755 |
480 | msm8x60_sim MACH_MSM8X60_SIM MSM8X60_SIM 2756 | 474 | msm8x60_sim MACH_MSM8X60_SIM MSM8X60_SIM 2756 |
481 | tcc8000_sdk MACH_TCC8000_SDK TCC8000_SDK 2758 | 475 | tcc8000_sdk MACH_TCC8000_SDK TCC8000_SDK 2758 |
482 | nanos MACH_NANOS NANOS 2759 | ||
483 | stamp9g45 MACH_STAMP9G45 STAMP9G45 2761 | ||
484 | cns3420vb MACH_CNS3420VB CNS3420VB 2776 | 476 | cns3420vb MACH_CNS3420VB CNS3420VB 2776 |
485 | omap4_panda MACH_OMAP4_PANDA OMAP4_PANDA 2791 | 477 | omap4_panda MACH_OMAP4_PANDA OMAP4_PANDA 2791 |
486 | ti8168evm MACH_TI8168EVM TI8168EVM 2800 | 478 | ti8168evm MACH_TI8168EVM TI8168EVM 2800 |
@@ -490,12 +482,9 @@ eukrea_cpuimx35sd MACH_EUKREA_CPUIMX35SD EUKREA_CPUIMX35SD 2821 | |||
490 | eukrea_cpuimx51sd MACH_EUKREA_CPUIMX51SD EUKREA_CPUIMX51SD 2822 | 482 | eukrea_cpuimx51sd MACH_EUKREA_CPUIMX51SD EUKREA_CPUIMX51SD 2822 |
491 | eukrea_cpuimx51 MACH_EUKREA_CPUIMX51 EUKREA_CPUIMX51 2823 | 483 | eukrea_cpuimx51 MACH_EUKREA_CPUIMX51 EUKREA_CPUIMX51 2823 |
492 | smdkc210 MACH_SMDKC210 SMDKC210 2838 | 484 | smdkc210 MACH_SMDKC210 SMDKC210 2838 |
493 | pca102 MACH_PCA102 PCA102 2843 | 485 | pcaal1 MACH_PCAAL1 PCAAL1 2843 |
494 | t5325 MACH_T5325 T5325 2846 | 486 | t5325 MACH_T5325 T5325 2846 |
495 | income MACH_INCOME INCOME 2849 | 487 | income MACH_INCOME INCOME 2849 |
496 | vvbox_sdorig2 MACH_VVBOX_SDORIG2 VVBOX_SDORIG2 2857 | ||
497 | vvbox_sdlite2 MACH_VVBOX_SDLITE2 VVBOX_SDLITE2 2858 | ||
498 | vvbox_sdpro4 MACH_VVBOX_SDPRO4 VVBOX_SDPRO4 2859 | ||
499 | mx257sx MACH_MX257SX MX257SX 2861 | 488 | mx257sx MACH_MX257SX MX257SX 2861 |
500 | goni MACH_GONI GONI 2862 | 489 | goni MACH_GONI GONI 2862 |
501 | bv07 MACH_BV07 BV07 2882 | 490 | bv07 MACH_BV07 BV07 2882 |
@@ -504,6 +493,7 @@ devixp MACH_DEVIXP DEVIXP 2885 | |||
504 | miccpt MACH_MICCPT MICCPT 2886 | 493 | miccpt MACH_MICCPT MICCPT 2886 |
505 | mic256 MACH_MIC256 MIC256 2887 | 494 | mic256 MACH_MIC256 MIC256 2887 |
506 | u5500 MACH_U5500 U5500 2890 | 495 | u5500 MACH_U5500 U5500 2890 |
496 | pov15hd MACH_POV15HD POV15HD 2910 | ||
507 | linkstation_lschl MACH_LINKSTATION_LSCHL LINKSTATION_LSCHL 2913 | 497 | linkstation_lschl MACH_LINKSTATION_LSCHL LINKSTATION_LSCHL 2913 |
508 | smdkv310 MACH_SMDKV310 SMDKV310 2925 | 498 | smdkv310 MACH_SMDKV310 SMDKV310 2925 |
509 | wm8505_7in_netbook MACH_WM8505_7IN_NETBOOK WM8505_7IN_NETBOOK 2928 | 499 | wm8505_7in_netbook MACH_WM8505_7IN_NETBOOK WM8505_7IN_NETBOOK 2928 |
@@ -537,243 +527,24 @@ trimslice MACH_TRIMSLICE TRIMSLICE 3209 | |||
537 | mackerel MACH_MACKEREL MACKEREL 3211 | 527 | mackerel MACH_MACKEREL MACKEREL 3211 |
538 | kaen MACH_KAEN KAEN 3217 | 528 | kaen MACH_KAEN KAEN 3217 |
539 | nokia_rm680 MACH_NOKIA_RM680 NOKIA_RM680 3220 | 529 | nokia_rm680 MACH_NOKIA_RM680 NOKIA_RM680 3220 |
540 | dm6446_adbox MACH_DM6446_ADBOX DM6446_ADBOX 3226 | ||
541 | quad_salsa MACH_QUAD_SALSA QUAD_SALSA 3227 | ||
542 | abb_gma_1_1 MACH_ABB_GMA_1_1 ABB_GMA_1_1 3228 | ||
543 | svcid MACH_SVCID SVCID 3229 | ||
544 | msm8960_sim MACH_MSM8960_SIM MSM8960_SIM 3230 | 530 | msm8960_sim MACH_MSM8960_SIM MSM8960_SIM 3230 |
545 | msm8960_rumi3 MACH_MSM8960_RUMI3 MSM8960_RUMI3 3231 | 531 | msm8960_rumi3 MACH_MSM8960_RUMI3 MSM8960_RUMI3 3231 |
546 | icon_g MACH_ICON_G ICON_G 3232 | ||
547 | mb3 MACH_MB3 MB3 3233 | ||
548 | gsia18s MACH_GSIA18S GSIA18S 3234 | 532 | gsia18s MACH_GSIA18S GSIA18S 3234 |
549 | pivicc MACH_PIVICC PIVICC 3235 | ||
550 | pcm048 MACH_PCM048 PCM048 3236 | ||
551 | dds MACH_DDS DDS 3237 | ||
552 | chalten_xa1 MACH_CHALTEN_XA1 CHALTEN_XA1 3238 | ||
553 | ts48xx MACH_TS48XX TS48XX 3239 | ||
554 | tonga2_tfttimer MACH_TONGA2_TFTTIMER TONGA2_TFTTIMER 3240 | ||
555 | whistler MACH_WHISTLER WHISTLER 3241 | ||
556 | asl_phoenix MACH_ASL_PHOENIX ASL_PHOENIX 3242 | ||
557 | at91sam9263otlite MACH_AT91SAM9263OTLITE AT91SAM9263OTLITE 3243 | ||
558 | ddplug MACH_DDPLUG DDPLUG 3244 | ||
559 | d2plug MACH_D2PLUG D2PLUG 3245 | ||
560 | kzm9d MACH_KZM9D KZM9D 3246 | ||
561 | verdi_lte MACH_VERDI_LTE VERDI_LTE 3247 | ||
562 | nanozoom MACH_NANOZOOM NANOZOOM 3248 | ||
563 | dm3730_som_lv MACH_DM3730_SOM_LV DM3730_SOM_LV 3249 | ||
564 | dm3730_torpedo MACH_DM3730_TORPEDO DM3730_TORPEDO 3250 | ||
565 | anchovy MACH_ANCHOVY ANCHOVY 3251 | ||
566 | re2rev20 MACH_RE2REV20 RE2REV20 3253 | ||
567 | re2rev21 MACH_RE2REV21 RE2REV21 3254 | ||
568 | cns21xx MACH_CNS21XX CNS21XX 3255 | ||
569 | rider MACH_RIDER RIDER 3257 | ||
570 | nsk330 MACH_NSK330 NSK330 3258 | ||
571 | cns2133evb MACH_CNS2133EVB CNS2133EVB 3259 | ||
572 | z3_816x_mod MACH_Z3_816X_MOD Z3_816X_MOD 3260 | ||
573 | z3_814x_mod MACH_Z3_814X_MOD Z3_814X_MOD 3261 | ||
574 | beect MACH_BEECT BEECT 3262 | ||
575 | dma_thunderbug MACH_DMA_THUNDERBUG DMA_THUNDERBUG 3263 | ||
576 | omn_at91sam9g20 MACH_OMN_AT91SAM9G20 OMN_AT91SAM9G20 3264 | ||
577 | mx25_e2s_uc MACH_MX25_E2S_UC MX25_E2S_UC 3265 | ||
578 | mione MACH_MIONE MIONE 3266 | ||
579 | top9000_tcu MACH_TOP9000_TCU TOP9000_TCU 3267 | ||
580 | top9000_bsl MACH_TOP9000_BSL TOP9000_BSL 3268 | ||
581 | kingdom MACH_KINGDOM KINGDOM 3269 | ||
582 | armadillo460 MACH_ARMADILLO460 ARMADILLO460 3270 | ||
583 | lq2 MACH_LQ2 LQ2 3271 | ||
584 | sweda_tms2 MACH_SWEDA_TMS2 SWEDA_TMS2 3272 | ||
585 | mx53_loco MACH_MX53_LOCO MX53_LOCO 3273 | 533 | mx53_loco MACH_MX53_LOCO MX53_LOCO 3273 |
586 | acer_a8 MACH_ACER_A8 ACER_A8 3275 | ||
587 | acer_gauguin MACH_ACER_GAUGUIN ACER_GAUGUIN 3276 | ||
588 | guppy MACH_GUPPY GUPPY 3277 | ||
589 | mx61_ard MACH_MX61_ARD MX61_ARD 3278 | ||
590 | tx53 MACH_TX53 TX53 3279 | 534 | tx53 MACH_TX53 TX53 3279 |
591 | omapl138_case_a3 MACH_OMAPL138_CASE_A3 OMAPL138_CASE_A3 3280 | ||
592 | uemd MACH_UEMD UEMD 3281 | ||
593 | ccwmx51mut MACH_CCWMX51MUT CCWMX51MUT 3282 | ||
594 | rockhopper MACH_ROCKHOPPER ROCKHOPPER 3283 | ||
595 | encore MACH_ENCORE ENCORE 3284 | 535 | encore MACH_ENCORE ENCORE 3284 |
596 | hkdkc100 MACH_HKDKC100 HKDKC100 3285 | ||
597 | ts42xx MACH_TS42XX TS42XX 3286 | ||
598 | aebl MACH_AEBL AEBL 3287 | ||
599 | wario MACH_WARIO WARIO 3288 | 536 | wario MACH_WARIO WARIO 3288 |
600 | gfs_spm MACH_GFS_SPM GFS_SPM 3289 | ||
601 | cm_t3730 MACH_CM_T3730 CM_T3730 3290 | 537 | cm_t3730 MACH_CM_T3730 CM_T3730 3290 |
602 | isc3 MACH_ISC3 ISC3 3291 | ||
603 | rascal MACH_RASCAL RASCAL 3292 | ||
604 | hrefv60 MACH_HREFV60 HREFV60 3293 | 538 | hrefv60 MACH_HREFV60 HREFV60 3293 |
605 | tpt_2_0 MACH_TPT_2_0 TPT_2_0 3294 | ||
606 | splendor MACH_SPLENDOR SPLENDOR 3296 | ||
607 | msm8x60_qt MACH_MSM8X60_QT MSM8X60_QT 3298 | ||
608 | htc_hd_mini MACH_HTC_HD_MINI HTC_HD_MINI 3299 | ||
609 | athene MACH_ATHENE ATHENE 3300 | ||
610 | deep_r_ek_1 MACH_DEEP_R_EK_1 DEEP_R_EK_1 3301 | ||
611 | vivow_ct MACH_VIVOW_CT VIVOW_CT 3302 | ||
612 | nery_1000 MACH_NERY_1000 NERY_1000 3303 | ||
613 | rfl109145_ssrv MACH_RFL109145_SSRV RFL109145_SSRV 3304 | ||
614 | nmh MACH_NMH NMH 3305 | ||
615 | wn802t MACH_WN802T WN802T 3306 | ||
616 | dragonet MACH_DRAGONET DRAGONET 3307 | ||
617 | at91sam9263desk16l MACH_AT91SAM9263DESK16L AT91SAM9263DESK16L 3309 | ||
618 | bcmhana_sv MACH_BCMHANA_SV BCMHANA_SV 3310 | ||
619 | bcmhana_tablet MACH_BCMHANA_TABLET BCMHANA_TABLET 3311 | ||
620 | koi MACH_KOI KOI 3312 | ||
621 | ts4800 MACH_TS4800 TS4800 3313 | ||
622 | tqma9263 MACH_TQMA9263 TQMA9263 3314 | ||
623 | holiday MACH_HOLIDAY HOLIDAY 3315 | ||
624 | pcats_overlay MACH_PCATS_OVERLAY PCATS_OVERLAY 3317 | ||
625 | hwgw6410 MACH_HWGW6410 HWGW6410 3318 | ||
626 | shenzhou MACH_SHENZHOU SHENZHOU 3319 | ||
627 | cwme9210 MACH_CWME9210 CWME9210 3320 | ||
628 | cwme9210js MACH_CWME9210JS CWME9210JS 3321 | ||
629 | colibri_tegra2 MACH_COLIBRI_TEGRA2 COLIBRI_TEGRA2 3323 | ||
630 | w21 MACH_W21 W21 3324 | ||
631 | polysat1 MACH_POLYSAT1 POLYSAT1 3325 | ||
632 | dataway MACH_DATAWAY DATAWAY 3326 | ||
633 | cobral138 MACH_COBRAL138 COBRAL138 3327 | ||
634 | roverpcs8 MACH_ROVERPCS8 ROVERPCS8 3328 | ||
635 | marvelc MACH_MARVELC MARVELC 3329 | ||
636 | navefihid MACH_NAVEFIHID NAVEFIHID 3330 | ||
637 | dm365_cv100 MACH_DM365_CV100 DM365_CV100 3331 | ||
638 | able MACH_ABLE ABLE 3332 | ||
639 | legacy MACH_LEGACY LEGACY 3333 | ||
640 | icong MACH_ICONG ICONG 3334 | ||
641 | rover_g8 MACH_ROVER_G8 ROVER_G8 3335 | ||
642 | t5388p MACH_T5388P T5388P 3336 | ||
643 | dingo MACH_DINGO DINGO 3337 | ||
644 | goflexhome MACH_GOFLEXHOME GOFLEXHOME 3338 | ||
645 | lanreadyfn511 MACH_LANREADYFN511 LANREADYFN511 3340 | ||
646 | omap3_baia MACH_OMAP3_BAIA OMAP3_BAIA 3341 | ||
647 | omap3smartdisplay MACH_OMAP3SMARTDISPLAY OMAP3SMARTDISPLAY 3342 | ||
648 | xilinx MACH_XILINX XILINX 3343 | ||
649 | a2f MACH_A2F A2F 3344 | ||
650 | sky25 MACH_SKY25 SKY25 3345 | ||
651 | ccmx53 MACH_CCMX53 CCMX53 3346 | ||
652 | ccmx53js MACH_CCMX53JS CCMX53JS 3347 | ||
653 | ccwmx53 MACH_CCWMX53 CCWMX53 3348 | ||
654 | ccwmx53js MACH_CCWMX53JS CCWMX53JS 3349 | ||
655 | frisms MACH_FRISMS FRISMS 3350 | ||
656 | msm7x27a_ffa MACH_MSM7X27A_FFA MSM7X27A_FFA 3351 | ||
657 | msm7x27a_surf MACH_MSM7X27A_SURF MSM7X27A_SURF 3352 | ||
658 | msm7x27a_rumi3 MACH_MSM7X27A_RUMI3 MSM7X27A_RUMI3 3353 | ||
659 | dimmsam9g20 MACH_DIMMSAM9G20 DIMMSAM9G20 3354 | ||
660 | dimm_imx28 MACH_DIMM_IMX28 DIMM_IMX28 3355 | ||
661 | amk_a4 MACH_AMK_A4 AMK_A4 3356 | ||
662 | gnet_sgme MACH_GNET_SGME GNET_SGME 3357 | ||
663 | shooter_u MACH_SHOOTER_U SHOOTER_U 3358 | ||
664 | vmx53 MACH_VMX53 VMX53 3359 | ||
665 | rhino MACH_RHINO RHINO 3360 | ||
666 | armlex4210 MACH_ARMLEX4210 ARMLEX4210 3361 | 539 | armlex4210 MACH_ARMLEX4210 ARMLEX4210 3361 |
667 | swarcoextmodem MACH_SWARCOEXTMODEM SWARCOEXTMODEM 3362 | ||
668 | snowball MACH_SNOWBALL SNOWBALL 3363 | 540 | snowball MACH_SNOWBALL SNOWBALL 3363 |
669 | pcm049 MACH_PCM049 PCM049 3364 | ||
670 | vigor MACH_VIGOR VIGOR 3365 | ||
671 | oslo_amundsen MACH_OSLO_AMUNDSEN OSLO_AMUNDSEN 3366 | ||
672 | gsl_diamond MACH_GSL_DIAMOND GSL_DIAMOND 3367 | ||
673 | cv2201 MACH_CV2201 CV2201 3368 | ||
674 | cv2202 MACH_CV2202 CV2202 3369 | ||
675 | cv2203 MACH_CV2203 CV2203 3370 | ||
676 | vit_ibox MACH_VIT_IBOX VIT_IBOX 3371 | ||
677 | dm6441_esp MACH_DM6441_ESP DM6441_ESP 3372 | ||
678 | at91sam9x5ek MACH_AT91SAM9X5EK AT91SAM9X5EK 3373 | ||
679 | libra MACH_LIBRA LIBRA 3374 | ||
680 | easycrrh MACH_EASYCRRH EASYCRRH 3375 | ||
681 | tripel MACH_TRIPEL TRIPEL 3376 | ||
682 | endian_mini MACH_ENDIAN_MINI ENDIAN_MINI 3377 | ||
683 | xilinx_ep107 MACH_XILINX_EP107 XILINX_EP107 3378 | 541 | xilinx_ep107 MACH_XILINX_EP107 XILINX_EP107 3378 |
684 | nuri MACH_NURI NURI 3379 | 542 | nuri MACH_NURI NURI 3379 |
685 | janus MACH_JANUS JANUS 3380 | ||
686 | ddnas MACH_DDNAS DDNAS 3381 | ||
687 | tag MACH_TAG TAG 3382 | ||
688 | tagw MACH_TAGW TAGW 3383 | ||
689 | nitrogen_vm_imx51 MACH_NITROGEN_VM_IMX51 NITROGEN_VM_IMX51 3384 | ||
690 | viprinet MACH_VIPRINET VIPRINET 3385 | ||
691 | bockw MACH_BOCKW BOCKW 3386 | ||
692 | eva2000 MACH_EVA2000 EVA2000 3387 | ||
693 | steelyard MACH_STEELYARD STEELYARD 3388 | ||
694 | nsslsboard MACH_NSSLSBOARD NSSLSBOARD 3392 | ||
695 | geneva_b5 MACH_GENEVA_B5 GENEVA_B5 3393 | ||
696 | spear1340 MACH_SPEAR1340 SPEAR1340 3394 | ||
697 | rexmas MACH_REXMAS REXMAS 3395 | ||
698 | msm8960_cdp MACH_MSM8960_CDP MSM8960_CDP 3396 | ||
699 | msm8960_fluid MACH_MSM8960_FLUID MSM8960_FLUID 3398 | ||
700 | msm8960_apq MACH_MSM8960_APQ MSM8960_APQ 3399 | ||
701 | helios_v2 MACH_HELIOS_V2 HELIOS_V2 3400 | ||
702 | mif10p MACH_MIF10P MIF10P 3401 | ||
703 | iam28 MACH_IAM28 IAM28 3402 | ||
704 | picasso MACH_PICASSO PICASSO 3403 | ||
705 | mr301a MACH_MR301A MR301A 3404 | ||
706 | notle MACH_NOTLE NOTLE 3405 | ||
707 | eelx2 MACH_EELX2 EELX2 3406 | ||
708 | moon MACH_MOON MOON 3407 | ||
709 | ruby MACH_RUBY RUBY 3408 | ||
710 | goldengate MACH_GOLDENGATE GOLDENGATE 3409 | ||
711 | ctbu_gen2 MACH_CTBU_GEN2 CTBU_GEN2 3410 | ||
712 | kmp_am17_01 MACH_KMP_AM17_01 KMP_AM17_01 3411 | ||
713 | wtplug MACH_WTPLUG WTPLUG 3412 | 543 | wtplug MACH_WTPLUG WTPLUG 3412 |
714 | mx27su2 MACH_MX27SU2 MX27SU2 3413 | ||
715 | nb31 MACH_NB31 NB31 3414 | ||
716 | hjsdu MACH_HJSDU HJSDU 3415 | ||
717 | td3_rev1 MACH_TD3_REV1 TD3_REV1 3416 | ||
718 | eag_ci4000 MACH_EAG_CI4000 EAG_CI4000 3417 | ||
719 | net5big_nand_v2 MACH_NET5BIG_NAND_V2 NET5BIG_NAND_V2 3418 | ||
720 | cpx2 MACH_CPX2 CPX2 3419 | ||
721 | net2big_nand_v2 MACH_NET2BIG_NAND_V2 NET2BIG_NAND_V2 3420 | ||
722 | ecuv5 MACH_ECUV5 ECUV5 3421 | ||
723 | hsgx6d MACH_HSGX6D HSGX6D 3422 | ||
724 | dawad7 MACH_DAWAD7 DAWAD7 3423 | ||
725 | sam9repeater MACH_SAM9REPEATER SAM9REPEATER 3424 | ||
726 | gt_i5700 MACH_GT_I5700 GT_I5700 3425 | ||
727 | ctera_plug_c2 MACH_CTERA_PLUG_C2 CTERA_PLUG_C2 3426 | ||
728 | marvelct MACH_MARVELCT MARVELCT 3427 | ||
729 | ag11005 MACH_AG11005 AG11005 3428 | ||
730 | vangogh MACH_VANGOGH VANGOGH 3430 | ||
731 | matrix505 MACH_MATRIX505 MATRIX505 3431 | ||
732 | oce_nigma MACH_OCE_NIGMA OCE_NIGMA 3432 | ||
733 | t55 MACH_T55 T55 3433 | ||
734 | bio3k MACH_BIO3K BIO3K 3434 | ||
735 | expressct MACH_EXPRESSCT EXPRESSCT 3435 | ||
736 | cardhu MACH_CARDHU CARDHU 3436 | ||
737 | aruba MACH_ARUBA ARUBA 3437 | ||
738 | bonaire MACH_BONAIRE BONAIRE 3438 | ||
739 | nuc700evb MACH_NUC700EVB NUC700EVB 3439 | ||
740 | nuc710evb MACH_NUC710EVB NUC710EVB 3440 | ||
741 | nuc740evb MACH_NUC740EVB NUC740EVB 3441 | ||
742 | nuc745evb MACH_NUC745EVB NUC745EVB 3442 | ||
743 | transcede MACH_TRANSCEDE TRANSCEDE 3443 | ||
744 | mora MACH_MORA MORA 3444 | ||
745 | nda_evm MACH_NDA_EVM NDA_EVM 3445 | ||
746 | timu MACH_TIMU TIMU 3446 | ||
747 | expressh MACH_EXPRESSH EXPRESSH 3447 | ||
748 | veridis_a300 MACH_VERIDIS_A300 VERIDIS_A300 3448 | 544 | veridis_a300 MACH_VERIDIS_A300 VERIDIS_A300 3448 |
749 | dm368_leopard MACH_DM368_LEOPARD DM368_LEOPARD 3449 | ||
750 | omap_mcop MACH_OMAP_MCOP OMAP_MCOP 3450 | ||
751 | tritip MACH_TRITIP TRITIP 3451 | ||
752 | sm1k MACH_SM1K SM1K 3452 | ||
753 | monch MACH_MONCH MONCH 3453 | ||
754 | curacao MACH_CURACAO CURACAO 3454 | ||
755 | origen MACH_ORIGEN ORIGEN 3455 | 545 | origen MACH_ORIGEN ORIGEN 3455 |
756 | epc10 MACH_EPC10 EPC10 3456 | ||
757 | sgh_i740 MACH_SGH_I740 SGH_I740 3457 | ||
758 | tuna MACH_TUNA TUNA 3458 | ||
759 | mx51_tulip MACH_MX51_TULIP MX51_TULIP 3459 | ||
760 | mx51_aster7 MACH_MX51_ASTER7 MX51_ASTER7 3460 | ||
761 | acro37xbrd MACH_ACRO37XBRD ACRO37XBRD 3461 | ||
762 | elke MACH_ELKE ELKE 3462 | ||
763 | sbc6000x MACH_SBC6000X SBC6000X 3463 | ||
764 | r1801e MACH_R1801E R1801E 3464 | ||
765 | h1600 MACH_H1600 H1600 3465 | ||
766 | mini210 MACH_MINI210 MINI210 3466 | ||
767 | mini8168 MACH_MINI8168 MINI8168 3467 | ||
768 | pc7308 MACH_PC7308 PC7308 3468 | ||
769 | kmm2m01 MACH_KMM2M01 KMM2M01 3470 | ||
770 | mx51erebus MACH_MX51EREBUS MX51EREBUS 3471 | ||
771 | wm8650refboard MACH_WM8650REFBOARD WM8650REFBOARD 3472 | 546 | wm8650refboard MACH_WM8650REFBOARD WM8650REFBOARD 3472 |
772 | tuxrail MACH_TUXRAIL TUXRAIL 3473 | ||
773 | arthur MACH_ARTHUR ARTHUR 3474 | ||
774 | doorboy MACH_DOORBOY DOORBOY 3475 | ||
775 | xarina MACH_XARINA XARINA 3476 | 547 | xarina MACH_XARINA XARINA 3476 |
776 | roverx7 MACH_ROVERX7 ROVERX7 3477 | ||
777 | sdvr MACH_SDVR SDVR 3478 | 548 | sdvr MACH_SDVR SDVR 3478 |
778 | acer_maya MACH_ACER_MAYA ACER_MAYA 3479 | 549 | acer_maya MACH_ACER_MAYA ACER_MAYA 3479 |
779 | pico MACH_PICO PICO 3480 | 550 | pico MACH_PICO PICO 3480 |
@@ -999,6 +770,7 @@ promwad_jade MACH_PROMWAD_JADE PROMWAD_JADE 3708 | |||
999 | amp MACH_AMP AMP 3709 | 770 | amp MACH_AMP AMP 3709 |
1000 | gnet_amp MACH_GNET_AMP GNET_AMP 3710 | 771 | gnet_amp MACH_GNET_AMP GNET_AMP 3710 |
1001 | toques MACH_TOQUES TOQUES 3711 | 772 | toques MACH_TOQUES TOQUES 3711 |
773 | apx4devkit MACH_APX4DEVKIT APX4DEVKIT 3712 | ||
1002 | dct_storm MACH_DCT_STORM DCT_STORM 3713 | 774 | dct_storm MACH_DCT_STORM DCT_STORM 3713 |
1003 | owl MACH_OWL OWL 3715 | 775 | owl MACH_OWL OWL 3715 |
1004 | cogent_csb1741 MACH_COGENT_CSB1741 COGENT_CSB1741 3716 | 776 | cogent_csb1741 MACH_COGENT_CSB1741 COGENT_CSB1741 3716 |
@@ -1063,7 +835,6 @@ shelter MACH_SHELTER SHELTER 3778 | |||
1063 | omap3_devkit8500 MACH_OMAP3_DEVKIT8500 OMAP3_DEVKIT8500 3779 | 835 | omap3_devkit8500 MACH_OMAP3_DEVKIT8500 OMAP3_DEVKIT8500 3779 |
1064 | edgetd MACH_EDGETD EDGETD 3780 | 836 | edgetd MACH_EDGETD EDGETD 3780 |
1065 | copperyard MACH_COPPERYARD COPPERYARD 3781 | 837 | copperyard MACH_COPPERYARD COPPERYARD 3781 |
1066 | edge MACH_EDGE EDGE 3782 | ||
1067 | edge_u MACH_EDGE_U EDGE_U 3783 | 838 | edge_u MACH_EDGE_U EDGE_U 3783 |
1068 | edge_td MACH_EDGE_TD EDGE_TD 3784 | 839 | edge_td MACH_EDGE_TD EDGE_TD 3784 |
1069 | wdss MACH_WDSS WDSS 3785 | 840 | wdss MACH_WDSS WDSS 3785 |
@@ -1169,3 +940,269 @@ elite_ulk MACH_ELITE_ULK ELITE_ULK 3888 | |||
1169 | pov2 MACH_POV2 POV2 3889 | 940 | pov2 MACH_POV2 POV2 3889 |
1170 | ipod_touch_2g MACH_IPOD_TOUCH_2G IPOD_TOUCH_2G 3890 | 941 | ipod_touch_2g MACH_IPOD_TOUCH_2G IPOD_TOUCH_2G 3890 |
1171 | da850_pqab MACH_DA850_PQAB DA850_PQAB 3891 | 942 | da850_pqab MACH_DA850_PQAB DA850_PQAB 3891 |
943 | fermi MACH_FERMI FERMI 3892 | ||
944 | ccardwmx28 MACH_CCARDWMX28 CCARDWMX28 3893 | ||
945 | ccardmx28 MACH_CCARDMX28 CCARDMX28 3894 | ||
946 | fs20_fcm2050 MACH_FS20_FCM2050 FS20_FCM2050 3895 | ||
947 | kinetis MACH_KINETIS KINETIS 3896 | ||
948 | kai MACH_KAI KAI 3897 | ||
949 | bcthb2 MACH_BCTHB2 BCTHB2 3898 | ||
950 | inels3_cu MACH_INELS3_CU INELS3_CU 3899 | ||
951 | da850_apollo MACH_DA850_APOLLO DA850_APOLLO 3901 | ||
952 | tracnas MACH_TRACNAS TRACNAS 3902 | ||
953 | mityarm335x MACH_MITYARM335X MITYARM335X 3903 | ||
954 | xcgz7x MACH_XCGZ7X XCGZ7X 3904 | ||
955 | cubox MACH_CUBOX CUBOX 3905 | ||
956 | terminator MACH_TERMINATOR TERMINATOR 3906 | ||
957 | eye03 MACH_EYE03 EYE03 3907 | ||
958 | kota3 MACH_KOTA3 KOTA3 3908 | ||
959 | pscpe MACH_PSCPE PSCPE 3910 | ||
960 | akt1100 MACH_AKT1100 AKT1100 3911 | ||
961 | pcaaxl2 MACH_PCAAXL2 PCAAXL2 3912 | ||
962 | primodd_ct MACH_PRIMODD_CT PRIMODD_CT 3913 | ||
963 | nsbc MACH_NSBC NSBC 3914 | ||
964 | meson2_skt MACH_MESON2_SKT MESON2_SKT 3915 | ||
965 | meson2_ref MACH_MESON2_REF MESON2_REF 3916 | ||
966 | ccardwmx28js MACH_CCARDWMX28JS CCARDWMX28JS 3917 | ||
967 | ccardmx28js MACH_CCARDMX28JS CCARDMX28JS 3918 | ||
968 | indico MACH_INDICO INDICO 3919 | ||
969 | msm8960dt MACH_MSM8960DT MSM8960DT 3920 | ||
970 | primods MACH_PRIMODS PRIMODS 3921 | ||
971 | beluga_m1388 MACH_BELUGA_M1388 BELUGA_M1388 3922 | ||
972 | primotd MACH_PRIMOTD PRIMOTD 3923 | ||
973 | varan_master MACH_VARAN_MASTER VARAN_MASTER 3924 | ||
974 | primodd MACH_PRIMODD PRIMODD 3925 | ||
975 | jetduo MACH_JETDUO JETDUO 3926 | ||
976 | mx53_umobo MACH_MX53_UMOBO MX53_UMOBO 3927 | ||
977 | trats MACH_TRATS TRATS 3928 | ||
978 | starcraft MACH_STARCRAFT STARCRAFT 3929 | ||
979 | qseven_tegra2 MACH_QSEVEN_TEGRA2 QSEVEN_TEGRA2 3930 | ||
980 | lichee_sun4i_devbd MACH_LICHEE_SUN4I_DEVBD LICHEE_SUN4I_DEVBD 3931 | ||
981 | movenow MACH_MOVENOW MOVENOW 3932 | ||
982 | golf_u MACH_GOLF_U GOLF_U 3933 | ||
983 | msm7627a_evb MACH_MSM7627A_EVB MSM7627A_EVB 3934 | ||
984 | rambo MACH_RAMBO RAMBO 3935 | ||
985 | golfu MACH_GOLFU GOLFU 3936 | ||
986 | mango310 MACH_MANGO310 MANGO310 3937 | ||
987 | dns343 MACH_DNS343 DNS343 3938 | ||
988 | var_som_om44 MACH_VAR_SOM_OM44 VAR_SOM_OM44 3939 | ||
989 | naon MACH_NAON NAON 3940 | ||
990 | vp4000 MACH_VP4000 VP4000 3941 | ||
991 | impcard MACH_IMPCARD IMPCARD 3942 | ||
992 | smoovcam MACH_SMOOVCAM SMOOVCAM 3943 | ||
993 | cobham3725 MACH_COBHAM3725 COBHAM3725 3944 | ||
994 | cobham3730 MACH_COBHAM3730 COBHAM3730 3945 | ||
995 | cobham3703 MACH_COBHAM3703 COBHAM3703 3946 | ||
996 | quetzal MACH_QUETZAL QUETZAL 3947 | ||
997 | apq8064_cdp MACH_APQ8064_CDP APQ8064_CDP 3948 | ||
998 | apq8064_mtp MACH_APQ8064_MTP APQ8064_MTP 3949 | ||
999 | apq8064_fluid MACH_APQ8064_FLUID APQ8064_FLUID 3950 | ||
1000 | apq8064_liquid MACH_APQ8064_LIQUID APQ8064_LIQUID 3951 | ||
1001 | mango210 MACH_MANGO210 MANGO210 3952 | ||
1002 | mango100 MACH_MANGO100 MANGO100 3953 | ||
1003 | mango24 MACH_MANGO24 MANGO24 3954 | ||
1004 | mango64 MACH_MANGO64 MANGO64 3955 | ||
1005 | nsa320 MACH_NSA320 NSA320 3956 | ||
1006 | elv_ccu2 MACH_ELV_CCU2 ELV_CCU2 3957 | ||
1007 | triton_x00 MACH_TRITON_X00 TRITON_X00 3958 | ||
1008 | triton_1500_2000 MACH_TRITON_1500_2000 TRITON_1500_2000 3959 | ||
1009 | pogoplugv4 MACH_POGOPLUGV4 POGOPLUGV4 3960 | ||
1010 | venus_cl MACH_VENUS_CL VENUS_CL 3961 | ||
1011 | vulcano_g20 MACH_VULCANO_G20 VULCANO_G20 3962 | ||
1012 | sgs_i9100 MACH_SGS_I9100 SGS_I9100 3963 | ||
1013 | stsv2 MACH_STSV2 STSV2 3964 | ||
1014 | csb1724 MACH_CSB1724 CSB1724 3965 | ||
1015 | omapl138_lcdk MACH_OMAPL138_LCDK OMAPL138_LCDK 3966 | ||
1016 | pvd_mx25 MACH_PVD_MX25 PVD_MX25 3968 | ||
1017 | meson6_skt MACH_MESON6_SKT MESON6_SKT 3969 | ||
1018 | meson6_ref MACH_MESON6_REF MESON6_REF 3970 | ||
1019 | pxm MACH_PXM PXM 3971 | ||
1020 | pogoplugv3 MACH_POGOPLUGV3 POGOPLUGV3 3973 | ||
1021 | mlp89626 MACH_MLP89626 MLP89626 3974 | ||
1022 | iomegahmndce MACH_IOMEGAHMNDCE IOMEGAHMNDCE 3975 | ||
1023 | pogoplugv3pci MACH_POGOPLUGV3PCI POGOPLUGV3PCI 3976 | ||
1024 | bntv250 MACH_BNTV250 BNTV250 3977 | ||
1025 | mx53_qseven MACH_MX53_QSEVEN MX53_QSEVEN 3978 | ||
1026 | gtl_it1100 MACH_GTL_IT1100 GTL_IT1100 3979 | ||
1027 | mx6q_sabresd MACH_MX6Q_SABRESD MX6Q_SABRESD 3980 | ||
1028 | mt4 MACH_MT4 MT4 3981 | ||
1029 | jumbo_d MACH_JUMBO_D JUMBO_D 3982 | ||
1030 | jumbo_i MACH_JUMBO_I JUMBO_I 3983 | ||
1031 | fs20_dmp MACH_FS20_DMP FS20_DMP 3984 | ||
1032 | dns320 MACH_DNS320 DNS320 3985 | ||
1033 | mx28bacos MACH_MX28BACOS MX28BACOS 3986 | ||
1034 | tl80 MACH_TL80 TL80 3987 | ||
1035 | polatis_nic_1001 MACH_POLATIS_NIC_1001 POLATIS_NIC_1001 3988 | ||
1036 | tely MACH_TELY TELY 3989 | ||
1037 | u8520 MACH_U8520 U8520 3990 | ||
1038 | manta MACH_MANTA MANTA 3991 | ||
1039 | mpq8064_cdp MACH_MPQ8064_CDP MPQ8064_CDP 3993 | ||
1040 | mpq8064_dtv MACH_MPQ8064_DTV MPQ8064_DTV 3995 | ||
1041 | dm368som MACH_DM368SOM DM368SOM 3996 | ||
1042 | gprisb2 MACH_GPRISB2 GPRISB2 3997 | ||
1043 | chammid MACH_CHAMMID CHAMMID 3998 | ||
1044 | seoul2 MACH_SEOUL2 SEOUL2 3999 | ||
1045 | omap4_nooktablet MACH_OMAP4_NOOKTABLET OMAP4_NOOKTABLET 4000 | ||
1046 | aalto MACH_AALTO AALTO 4001 | ||
1047 | metro MACH_METRO METRO 4002 | ||
1048 | cydm3730 MACH_CYDM3730 CYDM3730 4003 | ||
1049 | tqma53 MACH_TQMA53 TQMA53 4004 | ||
1050 | msm7627a_qrd3 MACH_MSM7627A_QRD3 MSM7627A_QRD3 4005 | ||
1051 | mx28_canby MACH_MX28_CANBY MX28_CANBY 4006 | ||
1052 | tiger MACH_TIGER TIGER 4007 | ||
1053 | pcats_9307_type_a MACH_PCATS_9307_TYPE_A PCATS_9307_TYPE_A 4008 | ||
1054 | pcats_9307_type_o MACH_PCATS_9307_TYPE_O PCATS_9307_TYPE_O 4009 | ||
1055 | pcats_9307_type_r MACH_PCATS_9307_TYPE_R PCATS_9307_TYPE_R 4010 | ||
1056 | streamplug MACH_STREAMPLUG STREAMPLUG 4011 | ||
1057 | icechicken_dev MACH_ICECHICKEN_DEV ICECHICKEN_DEV 4012 | ||
1058 | hedgehog MACH_HEDGEHOG HEDGEHOG 4013 | ||
1059 | yusend_obc MACH_YUSEND_OBC YUSEND_OBC 4014 | ||
1060 | imxninja MACH_IMXNINJA IMXNINJA 4015 | ||
1061 | omap4_jarod MACH_OMAP4_JAROD OMAP4_JAROD 4016 | ||
1062 | eco5_pk MACH_ECO5_PK ECO5_PK 4017 | ||
1063 | qj2440 MACH_QJ2440 QJ2440 4018 | ||
1064 | mx6q_mercury MACH_MX6Q_MERCURY MX6Q_MERCURY 4019 | ||
1065 | cm6810 MACH_CM6810 CM6810 4020 | ||
1066 | omap4_torpedo MACH_OMAP4_TORPEDO OMAP4_TORPEDO 4021 | ||
1067 | nsa310 MACH_NSA310 NSA310 4022 | ||
1068 | tmx536 MACH_TMX536 TMX536 4023 | ||
1069 | ktt20 MACH_KTT20 KTT20 4024 | ||
1070 | dragonix MACH_DRAGONIX DRAGONIX 4025 | ||
1071 | lungching MACH_LUNGCHING LUNGCHING 4026 | ||
1072 | bulogics MACH_BULOGICS BULOGICS 4027 | ||
1073 | mx535_sx MACH_MX535_SX MX535_SX 4028 | ||
1074 | ngui3250 MACH_NGUI3250 NGUI3250 4029 | ||
1075 | salutec_dac MACH_SALUTEC_DAC SALUTEC_DAC 4030 | ||
1076 | loco MACH_LOCO LOCO 4031 | ||
1077 | ctera_plug_usi MACH_CTERA_PLUG_USI CTERA_PLUG_USI 4032 | ||
1078 | scepter MACH_SCEPTER SCEPTER 4033 | ||
1079 | sga MACH_SGA SGA 4034 | ||
1080 | p_81_j5 MACH_P_81_J5 P_81_J5 4035 | ||
1081 | p_81_o4 MACH_P_81_O4 P_81_O4 4036 | ||
1082 | msm8625_surf MACH_MSM8625_SURF MSM8625_SURF 4037 | ||
1083 | carallon_shark MACH_CARALLON_SHARK CARALLON_SHARK 4038 | ||
1084 | ordog MACH_ORDOG ORDOG 4040 | ||
1085 | puente_io MACH_PUENTE_IO PUENTE_IO 4041 | ||
1086 | msm8625_evb MACH_MSM8625_EVB MSM8625_EVB 4042 | ||
1087 | ev_am1707 MACH_EV_AM1707 EV_AM1707 4043 | ||
1088 | ev_am1707e2 MACH_EV_AM1707E2 EV_AM1707E2 4044 | ||
1089 | ev_am3517e2 MACH_EV_AM3517E2 EV_AM3517E2 4045 | ||
1090 | calabria MACH_CALABRIA CALABRIA 4046 | ||
1091 | ev_imx287 MACH_EV_IMX287 EV_IMX287 4047 | ||
1092 | erau MACH_ERAU ERAU 4048 | ||
1093 | sichuan MACH_SICHUAN SICHUAN 4049 | ||
1094 | davinci_da850 MACH_DAVINCI_DA850 DAVINCI_DA850 4051 | ||
1095 | omap138_trunarc MACH_OMAP138_TRUNARC OMAP138_TRUNARC 4052 | ||
1096 | bcm4761 MACH_BCM4761 BCM4761 4053 | ||
1097 | picasso_e2 MACH_PICASSO_E2 PICASSO_E2 4054 | ||
1098 | picasso_mf MACH_PICASSO_MF PICASSO_MF 4055 | ||
1099 | miro MACH_MIRO MIRO 4056 | ||
1100 | at91sam9g20ewon3 MACH_AT91SAM9G20EWON3 AT91SAM9G20EWON3 4057 | ||
1101 | yoyo MACH_YOYO YOYO 4058 | ||
1102 | windjkl MACH_WINDJKL WINDJKL 4059 | ||
1103 | monarudo MACH_MONARUDO MONARUDO 4060 | ||
1104 | batan MACH_BATAN BATAN 4061 | ||
1105 | tadao MACH_TADAO TADAO 4062 | ||
1106 | baso MACH_BASO BASO 4063 | ||
1107 | mahon MACH_MAHON MAHON 4064 | ||
1108 | villec2 MACH_VILLEC2 VILLEC2 4065 | ||
1109 | asi1230 MACH_ASI1230 ASI1230 4066 | ||
1110 | alaska MACH_ALASKA ALASKA 4067 | ||
1111 | swarco_shdsl2 MACH_SWARCO_SHDSL2 SWARCO_SHDSL2 4068 | ||
1112 | oxrtu MACH_OXRTU OXRTU 4069 | ||
1113 | omap5_panda MACH_OMAP5_PANDA OMAP5_PANDA 4070 | ||
1114 | c8000 MACH_C8000 C8000 4072 | ||
1115 | bje_display3_5 MACH_BJE_DISPLAY3_5 BJE_DISPLAY3_5 4073 | ||
1116 | picomod7 MACH_PICOMOD7 PICOMOD7 4074 | ||
1117 | picocom5 MACH_PICOCOM5 PICOCOM5 4075 | ||
1118 | qblissa8 MACH_QBLISSA8 QBLISSA8 4076 | ||
1119 | armstonea8 MACH_ARMSTONEA8 ARMSTONEA8 4077 | ||
1120 | netdcu14 MACH_NETDCU14 NETDCU14 4078 | ||
1121 | at91sam9x5_epiphan MACH_AT91SAM9X5_EPIPHAN AT91SAM9X5_EPIPHAN 4079 | ||
1122 | p2u MACH_P2U P2U 4080 | ||
1123 | doris MACH_DORIS DORIS 4081 | ||
1124 | j49 MACH_J49 J49 4082 | ||
1125 | vdss2e MACH_VDSS2E VDSS2E 4083 | ||
1126 | vc300 MACH_VC300 VC300 4084 | ||
1127 | ns115_pad_test MACH_NS115_PAD_TEST NS115_PAD_TEST 4085 | ||
1128 | ns115_pad_ref MACH_NS115_PAD_REF NS115_PAD_REF 4086 | ||
1129 | ns115_phone_test MACH_NS115_PHONE_TEST NS115_PHONE_TEST 4087 | ||
1130 | ns115_phone_ref MACH_NS115_PHONE_REF NS115_PHONE_REF 4088 | ||
1131 | golfc MACH_GOLFC GOLFC 4089 | ||
1132 | xerox_olympus MACH_XEROX_OLYMPUS XEROX_OLYMPUS 4090 | ||
1133 | mx6sl_arm2 MACH_MX6SL_ARM2 MX6SL_ARM2 4091 | ||
1134 | csb1701_csb1726 MACH_CSB1701_CSB1726 CSB1701_CSB1726 4092 | ||
1135 | at91sam9xeek MACH_AT91SAM9XEEK AT91SAM9XEEK 4093 | ||
1136 | ebv210 MACH_EBV210 EBV210 4094 | ||
1137 | msm7627a_qrd7 MACH_MSM7627A_QRD7 MSM7627A_QRD7 4095 | ||
1138 | svthin MACH_SVTHIN SVTHIN 4096 | ||
1139 | duovero MACH_DUOVERO DUOVERO 4097 | ||
1140 | chupacabra MACH_CHUPACABRA CHUPACABRA 4098 | ||
1141 | scorpion MACH_SCORPION SCORPION 4099 | ||
1142 | davinci_he_hmi10 MACH_DAVINCI_HE_HMI10 DAVINCI_HE_HMI10 4100 | ||
1143 | topkick MACH_TOPKICK TOPKICK 4101 | ||
1144 | m3_auguestrush MACH_M3_AUGUESTRUSH M3_AUGUESTRUSH 4102 | ||
1145 | ipc335x MACH_IPC335X IPC335X 4103 | ||
1146 | sun4i MACH_SUN4I SUN4I 4104 | ||
1147 | imx233_olinuxino MACH_IMX233_OLINUXINO IMX233_OLINUXINO 4105 | ||
1148 | k2_wl MACH_K2_WL K2_WL 4106 | ||
1149 | k2_ul MACH_K2_UL K2_UL 4107 | ||
1150 | k2_cl MACH_K2_CL K2_CL 4108 | ||
1151 | minbari_w MACH_MINBARI_W MINBARI_W 4109 | ||
1152 | minbari_m MACH_MINBARI_M MINBARI_M 4110 | ||
1153 | k035 MACH_K035 K035 4111 | ||
1154 | ariel MACH_ARIEL ARIEL 4112 | ||
1155 | arielsaarc MACH_ARIELSAARC ARIELSAARC 4113 | ||
1156 | arieldkb MACH_ARIELDKB ARIELDKB 4114 | ||
1157 | armadillo810 MACH_ARMADILLO810 ARMADILLO810 4115 | ||
1158 | tam335x MACH_TAM335X TAM335X 4116 | ||
1159 | grouper MACH_GROUPER GROUPER 4117 | ||
1160 | mpcsa21_9g20 MACH_MPCSA21_9G20 MPCSA21_9G20 4118 | ||
1161 | m6u_cpu MACH_M6U_CPU M6U_CPU 4119 | ||
1162 | davinci_dp10 MACH_DAVINCI_DP10 DAVINCI_DP10 4120 | ||
1163 | ginkgo MACH_GINKGO GINKGO 4121 | ||
1164 | cgt_qmx6 MACH_CGT_QMX6 CGT_QMX6 4122 | ||
1165 | profpga MACH_PROFPGA PROFPGA 4123 | ||
1166 | acfx100oc MACH_ACFX100OC ACFX100OC 4124 | ||
1167 | acfx100nb MACH_ACFX100NB ACFX100NB 4125 | ||
1168 | capricorn MACH_CAPRICORN CAPRICORN 4126 | ||
1169 | pisces MACH_PISCES PISCES 4127 | ||
1170 | aries MACH_ARIES ARIES 4128 | ||
1171 | cancer MACH_CANCER CANCER 4129 | ||
1172 | leo MACH_LEO LEO 4130 | ||
1173 | virgo MACH_VIRGO VIRGO 4131 | ||
1174 | sagittarius MACH_SAGITTARIUS SAGITTARIUS 4132 | ||
1175 | devil MACH_DEVIL DEVIL 4133 | ||
1176 | ballantines MACH_BALLANTINES BALLANTINES 4134 | ||
1177 | omap3_procerusvpu MACH_OMAP3_PROCERUSVPU OMAP3_PROCERUSVPU 4135 | ||
1178 | my27 MACH_MY27 MY27 4136 | ||
1179 | sun6i MACH_SUN6I SUN6I 4137 | ||
1180 | sun5i MACH_SUN5I SUN5I 4138 | ||
1181 | mx512_mx MACH_MX512_MX MX512_MX 4139 | ||
1182 | kzm9g MACH_KZM9G KZM9G 4140 | ||
1183 | vdstbn MACH_VDSTBN VDSTBN 4141 | ||
1184 | cfa10036 MACH_CFA10036 CFA10036 4142 | ||
1185 | cfa10049 MACH_CFA10049 CFA10049 4143 | ||
1186 | pcm051 MACH_PCM051 PCM051 4144 | ||
1187 | vybrid_vf7xx MACH_VYBRID_VF7XX VYBRID_VF7XX 4145 | ||
1188 | vybrid_vf6xx MACH_VYBRID_VF6XX VYBRID_VF6XX 4146 | ||
1189 | vybrid_vf5xx MACH_VYBRID_VF5XX VYBRID_VF5XX 4147 | ||
1190 | vybrid_vf4xx MACH_VYBRID_VF4XX VYBRID_VF4XX 4148 | ||
1191 | aria_g25 MACH_ARIA_G25 ARIA_G25 4149 | ||
1192 | bcm21553 MACH_BCM21553 BCM21553 4150 | ||
1193 | smdk5410 MACH_SMDK5410 SMDK5410 4151 | ||
1194 | lpc18xx MACH_LPC18XX LPC18XX 4152 | ||
1195 | oratisparty MACH_ORATISPARTY ORATISPARTY 4153 | ||
1196 | qseven MACH_QSEVEN QSEVEN 4154 | ||
1197 | gmv_generic MACH_GMV_GENERIC GMV_GENERIC 4155 | ||
1198 | th_link_eth MACH_TH_LINK_ETH TH_LINK_ETH 4156 | ||
1199 | tn_muninn MACH_TN_MUNINN TN_MUNINN 4157 | ||
1200 | rampage MACH_RAMPAGE RAMPAGE 4158 | ||
1201 | visstrim_mv10 MACH_VISSTRIM_MV10 VISSTRIM_MV10 4159 | ||
1202 | mx28_wilma MACH_MX28_WILMA MX28_WILMA 4164 | ||
1203 | msm8625_ffa MACH_MSM8625_FFA MSM8625_FFA 4166 | ||
1204 | vpu101 MACH_VPU101 VPU101 4167 | ||
1205 | baileys MACH_BAILEYS BAILEYS 4169 | ||
1206 | familybox MACH_FAMILYBOX FAMILYBOX 4170 | ||
1207 | ensemble_mx35 MACH_ENSEMBLE_MX35 ENSEMBLE_MX35 4171 | ||
1208 | sc_sps_1 MACH_SC_SPS_1 SC_SPS_1 4172 | ||
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index bc683b8219b..586961929e9 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | #include <linux/cpu.h> | 12 | #include <linux/cpu.h> |
13 | #include <linux/cpu_pm.h> | 13 | #include <linux/cpu_pm.h> |
14 | #include <linux/hardirq.h> | ||
14 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
15 | #include <linux/notifier.h> | 16 | #include <linux/notifier.h> |
16 | #include <linux/signal.h> | 17 | #include <linux/signal.h> |
@@ -240,11 +241,11 @@ static void vfp_panic(char *reason, u32 inst) | |||
240 | { | 241 | { |
241 | int i; | 242 | int i; |
242 | 243 | ||
243 | printk(KERN_ERR "VFP: Error: %s\n", reason); | 244 | pr_err("VFP: Error: %s\n", reason); |
244 | printk(KERN_ERR "VFP: EXC 0x%08x SCR 0x%08x INST 0x%08x\n", | 245 | pr_err("VFP: EXC 0x%08x SCR 0x%08x INST 0x%08x\n", |
245 | fmrx(FPEXC), fmrx(FPSCR), inst); | 246 | fmrx(FPEXC), fmrx(FPSCR), inst); |
246 | for (i = 0; i < 32; i += 2) | 247 | for (i = 0; i < 32; i += 2) |
247 | printk(KERN_ERR "VFP: s%2u: 0x%08x s%2u: 0x%08x\n", | 248 | pr_err("VFP: s%2u: 0x%08x s%2u: 0x%08x\n", |
248 | i, vfp_get_float(i), i+1, vfp_get_float(i+1)); | 249 | i, vfp_get_float(i), i+1, vfp_get_float(i+1)); |
249 | } | 250 | } |
250 | 251 | ||
@@ -432,7 +433,10 @@ void VFP_bounce(u32 trigger, u32 fpexc, struct pt_regs *regs) | |||
432 | 433 | ||
433 | static void vfp_enable(void *unused) | 434 | static void vfp_enable(void *unused) |
434 | { | 435 | { |
435 | u32 access = get_copro_access(); | 436 | u32 access; |
437 | |||
438 | BUG_ON(preemptible()); | ||
439 | access = get_copro_access(); | ||
436 | 440 | ||
437 | /* | 441 | /* |
438 | * Enable full access to VFP (cp10 and cp11) | 442 | * Enable full access to VFP (cp10 and cp11) |
@@ -448,7 +452,7 @@ static int vfp_pm_suspend(void) | |||
448 | 452 | ||
449 | /* if vfp is on, then save state for resumption */ | 453 | /* if vfp is on, then save state for resumption */ |
450 | if (fpexc & FPEXC_EN) { | 454 | if (fpexc & FPEXC_EN) { |
451 | printk(KERN_DEBUG "%s: saving vfp state\n", __func__); | 455 | pr_debug("%s: saving vfp state\n", __func__); |
452 | vfp_save_state(&ti->vfpstate, fpexc); | 456 | vfp_save_state(&ti->vfpstate, fpexc); |
453 | 457 | ||
454 | /* disable, just in case */ | 458 | /* disable, just in case */ |
@@ -573,12 +577,6 @@ int vfp_preserve_user_clear_hwstate(struct user_vfp __user *ufp, | |||
573 | * entry. | 577 | * entry. |
574 | */ | 578 | */ |
575 | hwstate->fpscr &= ~(FPSCR_LENGTH_MASK | FPSCR_STRIDE_MASK); | 579 | hwstate->fpscr &= ~(FPSCR_LENGTH_MASK | FPSCR_STRIDE_MASK); |
576 | |||
577 | /* | ||
578 | * Disable VFP in the hwstate so that we can detect if it gets | ||
579 | * used. | ||
580 | */ | ||
581 | hwstate->fpexc &= ~FPEXC_EN; | ||
582 | return 0; | 580 | return 0; |
583 | } | 581 | } |
584 | 582 | ||
@@ -591,12 +589,8 @@ int vfp_restore_user_hwstate(struct user_vfp __user *ufp, | |||
591 | unsigned long fpexc; | 589 | unsigned long fpexc; |
592 | int err = 0; | 590 | int err = 0; |
593 | 591 | ||
594 | /* | 592 | /* Disable VFP to avoid corrupting the new thread state. */ |
595 | * If VFP has been used, then disable it to avoid corrupting | 593 | vfp_flush_hwstate(thread); |
596 | * the new thread state. | ||
597 | */ | ||
598 | if (hwstate->fpexc & FPEXC_EN) | ||
599 | vfp_flush_hwstate(thread); | ||
600 | 594 | ||
601 | /* | 595 | /* |
602 | * Copy the floating point registers. There can be unused | 596 | * Copy the floating point registers. There can be unused |
@@ -657,7 +651,7 @@ static int __init vfp_init(void) | |||
657 | unsigned int cpu_arch = cpu_architecture(); | 651 | unsigned int cpu_arch = cpu_architecture(); |
658 | 652 | ||
659 | if (cpu_arch >= CPU_ARCH_ARMv6) | 653 | if (cpu_arch >= CPU_ARCH_ARMv6) |
660 | vfp_enable(NULL); | 654 | on_each_cpu(vfp_enable, NULL, 1); |
661 | 655 | ||
662 | /* | 656 | /* |
663 | * First check that there is a VFP that we can use. | 657 | * First check that there is a VFP that we can use. |
@@ -670,18 +664,16 @@ static int __init vfp_init(void) | |||
670 | barrier(); | 664 | barrier(); |
671 | vfp_vector = vfp_null_entry; | 665 | vfp_vector = vfp_null_entry; |
672 | 666 | ||
673 | printk(KERN_INFO "VFP support v0.3: "); | 667 | pr_info("VFP support v0.3: "); |
674 | if (VFP_arch) | 668 | if (VFP_arch) |
675 | printk("not present\n"); | 669 | pr_cont("not present\n"); |
676 | else if (vfpsid & FPSID_NODOUBLE) { | 670 | else if (vfpsid & FPSID_NODOUBLE) { |
677 | printk("no double precision support\n"); | 671 | pr_cont("no double precision support\n"); |
678 | } else { | 672 | } else { |
679 | hotcpu_notifier(vfp_hotplug, 0); | 673 | hotcpu_notifier(vfp_hotplug, 0); |
680 | 674 | ||
681 | smp_call_function(vfp_enable, NULL, 1); | ||
682 | |||
683 | VFP_arch = (vfpsid & FPSID_ARCH_MASK) >> FPSID_ARCH_BIT; /* Extract the architecture version */ | 675 | VFP_arch = (vfpsid & FPSID_ARCH_MASK) >> FPSID_ARCH_BIT; /* Extract the architecture version */ |
684 | printk("implementor %02x architecture %d part %02x variant %x rev %x\n", | 676 | pr_cont("implementor %02x architecture %d part %02x variant %x rev %x\n", |
685 | (vfpsid & FPSID_IMPLEMENTER_MASK) >> FPSID_IMPLEMENTER_BIT, | 677 | (vfpsid & FPSID_IMPLEMENTER_MASK) >> FPSID_IMPLEMENTER_BIT, |
686 | (vfpsid & FPSID_ARCH_MASK) >> FPSID_ARCH_BIT, | 678 | (vfpsid & FPSID_ARCH_MASK) >> FPSID_ARCH_BIT, |
687 | (vfpsid & FPSID_PART_MASK) >> FPSID_PART_BIT, | 679 | (vfpsid & FPSID_PART_MASK) >> FPSID_PART_BIT, |