diff options
Diffstat (limited to 'arch/arm')
325 files changed, 1956 insertions, 5563 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index a48aecc17eac..f2574fef1e41 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -186,6 +186,9 @@ config GENERIC_ISA_DMA | |||
186 | config FIQ | 186 | config FIQ |
187 | bool | 187 | bool |
188 | 188 | ||
189 | config NEED_RET_TO_USER | ||
190 | bool | ||
191 | |||
189 | config ARCH_MTD_XIP | 192 | config ARCH_MTD_XIP |
190 | bool | 193 | bool |
191 | 194 | ||
@@ -324,7 +327,7 @@ config ARCH_AT91 | |||
324 | select CLKDEV_LOOKUP | 327 | select CLKDEV_LOOKUP |
325 | help | 328 | help |
326 | This enables support for systems based on the Atmel AT91RM9200, | 329 | This enables support for systems based on the Atmel AT91RM9200, |
327 | AT91SAM9 and AT91CAP9 processors. | 330 | AT91SAM9 processors. |
328 | 331 | ||
329 | config ARCH_BCMRING | 332 | config ARCH_BCMRING |
330 | bool "Broadcom BCMRING" | 333 | bool "Broadcom BCMRING" |
@@ -479,6 +482,7 @@ config ARCH_IOP13XX | |||
479 | select ARCH_SUPPORTS_MSI | 482 | select ARCH_SUPPORTS_MSI |
480 | select VMSPLIT_1G | 483 | select VMSPLIT_1G |
481 | select NEED_MACH_MEMORY_H | 484 | select NEED_MACH_MEMORY_H |
485 | select NEED_RET_TO_USER | ||
482 | help | 486 | help |
483 | Support for Intel's IOP13XX (XScale) family of processors. | 487 | Support for Intel's IOP13XX (XScale) family of processors. |
484 | 488 | ||
@@ -486,6 +490,7 @@ config ARCH_IOP32X | |||
486 | bool "IOP32x-based" | 490 | bool "IOP32x-based" |
487 | depends on MMU | 491 | depends on MMU |
488 | select CPU_XSCALE | 492 | select CPU_XSCALE |
493 | select NEED_RET_TO_USER | ||
489 | select PLAT_IOP | 494 | select PLAT_IOP |
490 | select PCI | 495 | select PCI |
491 | select ARCH_REQUIRE_GPIOLIB | 496 | select ARCH_REQUIRE_GPIOLIB |
@@ -497,6 +502,7 @@ config ARCH_IOP33X | |||
497 | bool "IOP33x-based" | 502 | bool "IOP33x-based" |
498 | depends on MMU | 503 | depends on MMU |
499 | select CPU_XSCALE | 504 | select CPU_XSCALE |
505 | select NEED_RET_TO_USER | ||
500 | select PLAT_IOP | 506 | select PLAT_IOP |
501 | select PCI | 507 | select PCI |
502 | select ARCH_REQUIRE_GPIOLIB | 508 | select ARCH_REQUIRE_GPIOLIB |
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 03646c4c13d1..b895a2a92da8 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug | |||
@@ -86,7 +86,7 @@ choice | |||
86 | depends on HAVE_AT91_DBGU0 | 86 | depends on HAVE_AT91_DBGU0 |
87 | 87 | ||
88 | config AT91_DEBUG_LL_DBGU1 | 88 | config AT91_DEBUG_LL_DBGU1 |
89 | bool "Kernel low-level debugging on 9263, 9g45 and cap9" | 89 | bool "Kernel low-level debugging on 9263 and 9g45" |
90 | depends on HAVE_AT91_DBGU1 | 90 | depends on HAVE_AT91_DBGU1 |
91 | 91 | ||
92 | config DEBUG_CLPS711X_UART1 | 92 | config DEBUG_CLPS711X_UART1 |
diff --git a/arch/arm/boot/dts/exynos4210.dtsi b/arch/arm/boot/dts/exynos4210.dtsi index 63d7578856c1..a1dd2ee83753 100644 --- a/arch/arm/boot/dts/exynos4210.dtsi +++ b/arch/arm/boot/dts/exynos4210.dtsi | |||
@@ -29,6 +29,7 @@ | |||
29 | compatible = "arm,cortex-a9-gic"; | 29 | compatible = "arm,cortex-a9-gic"; |
30 | #interrupt-cells = <3>; | 30 | #interrupt-cells = <3>; |
31 | interrupt-controller; | 31 | interrupt-controller; |
32 | cpu-offset = <0x8000>; | ||
32 | reg = <0x10490000 0x1000>, <0x10480000 0x100>; | 33 | reg = <0x10490000 0x1000>, <0x10480000 0x100>; |
33 | }; | 34 | }; |
34 | 35 | ||
diff --git a/arch/arm/boot/dts/tegra-paz00.dts b/arch/arm/boot/dts/tegra-paz00.dts index 1a1d7023b69b..825d2957da0b 100644 --- a/arch/arm/boot/dts/tegra-paz00.dts +++ b/arch/arm/boot/dts/tegra-paz00.dts | |||
@@ -46,11 +46,11 @@ | |||
46 | }; | 46 | }; |
47 | 47 | ||
48 | serial@70006200 { | 48 | serial@70006200 { |
49 | status = "disable"; | 49 | clock-frequency = <216000000>; |
50 | }; | 50 | }; |
51 | 51 | ||
52 | serial@70006300 { | 52 | serial@70006300 { |
53 | clock-frequency = <216000000>; | 53 | status = "disable"; |
54 | }; | 54 | }; |
55 | 55 | ||
56 | serial@70006400 { | 56 | serial@70006400 { |
@@ -60,7 +60,7 @@ | |||
60 | sdhci@c8000000 { | 60 | sdhci@c8000000 { |
61 | cd-gpios = <&gpio 173 0>; /* gpio PV5 */ | 61 | cd-gpios = <&gpio 173 0>; /* gpio PV5 */ |
62 | wp-gpios = <&gpio 57 0>; /* gpio PH1 */ | 62 | wp-gpios = <&gpio 57 0>; /* gpio PH1 */ |
63 | power-gpios = <&gpio 155 0>; /* gpio PT3 */ | 63 | power-gpios = <&gpio 169 0>; /* gpio PV1 */ |
64 | }; | 64 | }; |
65 | 65 | ||
66 | sdhci@c8000200 { | 66 | sdhci@c8000200 { |
diff --git a/arch/arm/common/it8152.c b/arch/arm/common/it8152.c index d1bcd7b13ebc..fb1f1cfce60c 100644 --- a/arch/arm/common/it8152.c +++ b/arch/arm/common/it8152.c | |||
@@ -320,13 +320,6 @@ err0: | |||
320 | return -EBUSY; | 320 | return -EBUSY; |
321 | } | 321 | } |
322 | 322 | ||
323 | /* | ||
324 | * If we set up a device for bus mastering, we need to check the latency | ||
325 | * timer as we don't have even crappy BIOSes to set it properly. | ||
326 | * The implementation is from arch/i386/pci/i386.c | ||
327 | */ | ||
328 | unsigned int pcibios_max_latency = 255; | ||
329 | |||
330 | /* ITE bridge requires setting latency timer to avoid early bus access | 323 | /* ITE bridge requires setting latency timer to avoid early bus access |
331 | termination by PCI bus master devices | 324 | termination by PCI bus master devices |
332 | */ | 325 | */ |
diff --git a/arch/arm/common/pl330.c b/arch/arm/common/pl330.c index d8e44a43047c..ff3ad2244824 100644 --- a/arch/arm/common/pl330.c +++ b/arch/arm/common/pl330.c | |||
@@ -1502,12 +1502,13 @@ int pl330_chan_ctrl(void *ch_id, enum pl330_chan_op op) | |||
1502 | struct pl330_thread *thrd = ch_id; | 1502 | struct pl330_thread *thrd = ch_id; |
1503 | struct pl330_dmac *pl330; | 1503 | struct pl330_dmac *pl330; |
1504 | unsigned long flags; | 1504 | unsigned long flags; |
1505 | int ret = 0, active = thrd->req_running; | 1505 | int ret = 0, active; |
1506 | 1506 | ||
1507 | if (!thrd || thrd->free || thrd->dmac->state == DYING) | 1507 | if (!thrd || thrd->free || thrd->dmac->state == DYING) |
1508 | return -EINVAL; | 1508 | return -EINVAL; |
1509 | 1509 | ||
1510 | pl330 = thrd->dmac; | 1510 | pl330 = thrd->dmac; |
1511 | active = thrd->req_running; | ||
1511 | 1512 | ||
1512 | spin_lock_irqsave(&pl330->lock, flags); | 1513 | spin_lock_irqsave(&pl330->lock, flags); |
1513 | 1514 | ||
diff --git a/arch/arm/configs/at91cap9_defconfig b/arch/arm/configs/at91cap9_defconfig deleted file mode 100644 index 8826eb218e73..000000000000 --- a/arch/arm/configs/at91cap9_defconfig +++ /dev/null | |||
@@ -1,108 +0,0 @@ | |||
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_SLAB=y | ||
8 | CONFIG_MODULES=y | ||
9 | CONFIG_MODULE_UNLOAD=y | ||
10 | # CONFIG_BLK_DEV_BSG is not set | ||
11 | # CONFIG_IOSCHED_DEADLINE is not set | ||
12 | # CONFIG_IOSCHED_CFQ is not set | ||
13 | CONFIG_ARCH_AT91=y | ||
14 | CONFIG_ARCH_AT91CAP9=y | ||
15 | CONFIG_MACH_AT91CAP9ADK=y | ||
16 | CONFIG_MTD_AT91_DATAFLASH_CARD=y | ||
17 | CONFIG_AT91_PROGRAMMABLE_CLOCKS=y | ||
18 | # CONFIG_ARM_THUMB is not set | ||
19 | CONFIG_AEABI=y | ||
20 | CONFIG_LEDS=y | ||
21 | CONFIG_LEDS_CPU=y | ||
22 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
23 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
24 | CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/ram0 rw" | ||
25 | CONFIG_FPE_NWFPE=y | ||
26 | CONFIG_NET=y | ||
27 | CONFIG_PACKET=y | ||
28 | CONFIG_UNIX=y | ||
29 | CONFIG_INET=y | ||
30 | CONFIG_IP_PNP=y | ||
31 | CONFIG_IP_PNP_BOOTP=y | ||
32 | CONFIG_IP_PNP_RARP=y | ||
33 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
34 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
35 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
36 | # CONFIG_INET_LRO is not set | ||
37 | # CONFIG_INET_DIAG is not set | ||
38 | # CONFIG_IPV6 is not set | ||
39 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
40 | CONFIG_MTD=y | ||
41 | CONFIG_MTD_CMDLINE_PARTS=y | ||
42 | CONFIG_MTD_CHAR=y | ||
43 | CONFIG_MTD_BLOCK=y | ||
44 | CONFIG_MTD_CFI=y | ||
45 | CONFIG_MTD_JEDECPROBE=y | ||
46 | CONFIG_MTD_CFI_AMDSTD=y | ||
47 | CONFIG_MTD_PHYSMAP=y | ||
48 | CONFIG_MTD_DATAFLASH=y | ||
49 | CONFIG_MTD_NAND=y | ||
50 | CONFIG_MTD_NAND_ATMEL=y | ||
51 | CONFIG_BLK_DEV_LOOP=y | ||
52 | CONFIG_BLK_DEV_RAM=y | ||
53 | CONFIG_BLK_DEV_RAM_SIZE=8192 | ||
54 | CONFIG_SCSI=y | ||
55 | CONFIG_BLK_DEV_SD=y | ||
56 | CONFIG_SCSI_MULTI_LUN=y | ||
57 | CONFIG_NETDEVICES=y | ||
58 | CONFIG_MII=y | ||
59 | CONFIG_MACB=y | ||
60 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
61 | CONFIG_INPUT_EVDEV=y | ||
62 | # CONFIG_INPUT_KEYBOARD is not set | ||
63 | # CONFIG_INPUT_MOUSE is not set | ||
64 | CONFIG_INPUT_TOUCHSCREEN=y | ||
65 | CONFIG_TOUCHSCREEN_ADS7846=y | ||
66 | # CONFIG_SERIO is not set | ||
67 | CONFIG_SERIAL_ATMEL=y | ||
68 | CONFIG_SERIAL_ATMEL_CONSOLE=y | ||
69 | CONFIG_HW_RANDOM=y | ||
70 | CONFIG_I2C=y | ||
71 | CONFIG_I2C_CHARDEV=y | ||
72 | CONFIG_SPI=y | ||
73 | CONFIG_SPI_ATMEL=y | ||
74 | # CONFIG_HWMON is not set | ||
75 | CONFIG_WATCHDOG=y | ||
76 | CONFIG_WATCHDOG_NOWAYOUT=y | ||
77 | CONFIG_FB=y | ||
78 | CONFIG_FB_ATMEL=y | ||
79 | CONFIG_LOGO=y | ||
80 | # CONFIG_LOGO_LINUX_MONO is not set | ||
81 | # CONFIG_LOGO_LINUX_CLUT224 is not set | ||
82 | # CONFIG_USB_HID is not set | ||
83 | CONFIG_USB=y | ||
84 | CONFIG_USB_DEVICEFS=y | ||
85 | CONFIG_USB_MON=y | ||
86 | CONFIG_USB_OHCI_HCD=y | ||
87 | CONFIG_USB_STORAGE=y | ||
88 | CONFIG_USB_GADGET=y | ||
89 | CONFIG_USB_ETH=m | ||
90 | CONFIG_USB_FILE_STORAGE=m | ||
91 | CONFIG_MMC=y | ||
92 | CONFIG_MMC_AT91=m | ||
93 | CONFIG_RTC_CLASS=y | ||
94 | CONFIG_RTC_DRV_AT91SAM9=y | ||
95 | CONFIG_EXT2_FS=y | ||
96 | CONFIG_VFAT_FS=y | ||
97 | CONFIG_TMPFS=y | ||
98 | CONFIG_JFFS2_FS=y | ||
99 | CONFIG_CRAMFS=y | ||
100 | CONFIG_NFS_FS=y | ||
101 | CONFIG_ROOT_NFS=y | ||
102 | CONFIG_NLS_CODEPAGE_437=y | ||
103 | CONFIG_NLS_CODEPAGE_850=y | ||
104 | CONFIG_NLS_ISO8859_1=y | ||
105 | CONFIG_DEBUG_FS=y | ||
106 | CONFIG_DEBUG_KERNEL=y | ||
107 | CONFIG_DEBUG_INFO=y | ||
108 | CONFIG_DEBUG_USER=y | ||
diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h index 62f8095d46de..23371b17b23e 100644 --- a/arch/arm/include/asm/assembler.h +++ b/arch/arm/include/asm/assembler.h | |||
@@ -137,6 +137,11 @@ | |||
137 | disable_irq | 137 | disable_irq |
138 | .endm | 138 | .endm |
139 | 139 | ||
140 | .macro save_and_disable_irqs_notrace, oldcpsr | ||
141 | mrs \oldcpsr, cpsr | ||
142 | disable_irq_notrace | ||
143 | .endm | ||
144 | |||
140 | /* | 145 | /* |
141 | * Restore interrupt state previously stored in a register. We don't | 146 | * Restore interrupt state previously stored in a register. We don't |
142 | * guarantee that this will preserve the flags. | 147 | * guarantee that this will preserve the flags. |
diff --git a/arch/arm/include/asm/hardware/entry-macro-iomd.S b/arch/arm/include/asm/hardware/entry-macro-iomd.S index e0af4983723f..8c215acd9b57 100644 --- a/arch/arm/include/asm/hardware/entry-macro-iomd.S +++ b/arch/arm/include/asm/hardware/entry-macro-iomd.S | |||
@@ -11,14 +11,6 @@ | |||
11 | /* IOC / IOMD based hardware */ | 11 | /* IOC / IOMD based hardware */ |
12 | #include <asm/hardware/iomd.h> | 12 | #include <asm/hardware/iomd.h> |
13 | 13 | ||
14 | .macro disable_fiq | ||
15 | mov r12, #ioc_base_high | ||
16 | .if ioc_base_low | ||
17 | orr r12, r12, #ioc_base_low | ||
18 | .endif | ||
19 | strb r12, [r12, #0x38] @ Disable FIQ register | ||
20 | .endm | ||
21 | |||
22 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 14 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
23 | ldrb \irqstat, [\base, #IOMD_IRQREQB] @ get high priority first | 15 | ldrb \irqstat, [\base, #IOMD_IRQREQB] @ get high priority first |
24 | ldr \tmp, =irq_prio_h | 16 | ldr \tmp, =irq_prio_h |
diff --git a/arch/arm/include/asm/hardware/pl330.h b/arch/arm/include/asm/hardware/pl330.h index 575fa8186ca0..c1821385abfa 100644 --- a/arch/arm/include/asm/hardware/pl330.h +++ b/arch/arm/include/asm/hardware/pl330.h | |||
@@ -41,7 +41,7 @@ enum pl330_dstcachectrl { | |||
41 | DCCTRL1, /* Bufferable only */ | 41 | DCCTRL1, /* Bufferable only */ |
42 | DCCTRL2, /* Cacheable, but do not allocate */ | 42 | DCCTRL2, /* Cacheable, but do not allocate */ |
43 | DCCTRL3, /* Cacheable and bufferable, but do not allocate */ | 43 | DCCTRL3, /* Cacheable and bufferable, but do not allocate */ |
44 | DINVALID1 = 8, | 44 | DINVALID1, /* AWCACHE = 0x1000 */ |
45 | DINVALID2, | 45 | DINVALID2, |
46 | DCCTRL6, /* Cacheable write-through, allocate on writes only */ | 46 | DCCTRL6, /* Cacheable write-through, allocate on writes only */ |
47 | DCCTRL7, /* Cacheable write-back, allocate on writes only */ | 47 | DCCTRL7, /* Cacheable write-back, allocate on writes only */ |
diff --git a/arch/arm/include/asm/processor.h b/arch/arm/include/asm/processor.h index ce280b8d613c..cb8d638924fd 100644 --- a/arch/arm/include/asm/processor.h +++ b/arch/arm/include/asm/processor.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <asm/hw_breakpoint.h> | 22 | #include <asm/hw_breakpoint.h> |
23 | #include <asm/ptrace.h> | 23 | #include <asm/ptrace.h> |
24 | #include <asm/types.h> | 24 | #include <asm/types.h> |
25 | #include <asm/system.h> | ||
25 | 26 | ||
26 | #ifdef __KERNEL__ | 27 | #ifdef __KERNEL__ |
27 | #define STACK_TOP ((current->personality & ADDR_LIMIT_32BIT) ? \ | 28 | #define STACK_TOP ((current->personality & ADDR_LIMIT_32BIT) ? \ |
diff --git a/arch/arm/include/asm/tlb.h b/arch/arm/include/asm/tlb.h index 5d3ed7e38561..314d4664eae7 100644 --- a/arch/arm/include/asm/tlb.h +++ b/arch/arm/include/asm/tlb.h | |||
@@ -198,7 +198,15 @@ static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t pte, | |||
198 | unsigned long addr) | 198 | unsigned long addr) |
199 | { | 199 | { |
200 | pgtable_page_dtor(pte); | 200 | pgtable_page_dtor(pte); |
201 | tlb_add_flush(tlb, addr); | 201 | |
202 | /* | ||
203 | * With the classic ARM MMU, a pte page has two corresponding pmd | ||
204 | * entries, each covering 1MB. | ||
205 | */ | ||
206 | addr &= PMD_MASK; | ||
207 | tlb_add_flush(tlb, addr + SZ_1M - PAGE_SIZE); | ||
208 | tlb_add_flush(tlb, addr + SZ_1M); | ||
209 | |||
202 | tlb_remove_page(tlb, pte); | 210 | tlb_remove_page(tlb, pte); |
203 | } | 211 | } |
204 | 212 | ||
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index 3a456c6c7005..22f0ed324f37 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -19,7 +19,9 @@ | |||
19 | #include <asm/glue-df.h> | 19 | #include <asm/glue-df.h> |
20 | #include <asm/glue-pf.h> | 20 | #include <asm/glue-pf.h> |
21 | #include <asm/vfpmacros.h> | 21 | #include <asm/vfpmacros.h> |
22 | #ifndef CONFIG_MULTI_IRQ_HANDLER | ||
22 | #include <mach/entry-macro.S> | 23 | #include <mach/entry-macro.S> |
24 | #endif | ||
23 | #include <asm/thread_notify.h> | 25 | #include <asm/thread_notify.h> |
24 | #include <asm/unwind.h> | 26 | #include <asm/unwind.h> |
25 | #include <asm/unistd.h> | 27 | #include <asm/unistd.h> |
@@ -790,7 +792,7 @@ __kuser_cmpxchg64: @ 0xffff0f60 | |||
790 | smp_dmb arm | 792 | smp_dmb arm |
791 | rsbs r0, r3, #0 @ set returned val and C flag | 793 | rsbs r0, r3, #0 @ set returned val and C flag |
792 | ldmfd sp!, {r4, r5, r6, r7} | 794 | ldmfd sp!, {r4, r5, r6, r7} |
793 | bx lr | 795 | usr_ret lr |
794 | 796 | ||
795 | #elif !defined(CONFIG_SMP) | 797 | #elif !defined(CONFIG_SMP) |
796 | 798 | ||
@@ -1101,7 +1103,6 @@ __stubs_start: | |||
1101 | * get out of that mode without clobbering one register. | 1103 | * get out of that mode without clobbering one register. |
1102 | */ | 1104 | */ |
1103 | vector_fiq: | 1105 | vector_fiq: |
1104 | disable_fiq | ||
1105 | subs pc, lr, #4 | 1106 | subs pc, lr, #4 |
1106 | 1107 | ||
1107 | /*============================================================================= | 1108 | /*============================================================================= |
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index 9fd0ba90c1d2..54ee265dd819 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S | |||
@@ -10,9 +10,15 @@ | |||
10 | 10 | ||
11 | #include <asm/unistd.h> | 11 | #include <asm/unistd.h> |
12 | #include <asm/ftrace.h> | 12 | #include <asm/ftrace.h> |
13 | #include <mach/entry-macro.S> | ||
14 | #include <asm/unwind.h> | 13 | #include <asm/unwind.h> |
15 | 14 | ||
15 | #ifdef CONFIG_NEED_RET_TO_USER | ||
16 | #include <mach/entry-macro.S> | ||
17 | #else | ||
18 | .macro arch_ret_to_user, tmp1, tmp2 | ||
19 | .endm | ||
20 | #endif | ||
21 | |||
16 | #include "entry-header.S" | 22 | #include "entry-header.S" |
17 | 23 | ||
18 | 24 | ||
diff --git a/arch/arm/kernel/perf_event_v7.c b/arch/arm/kernel/perf_event_v7.c index 460bbbb6b885..6933244c68f9 100644 --- a/arch/arm/kernel/perf_event_v7.c +++ b/arch/arm/kernel/perf_event_v7.c | |||
@@ -469,6 +469,20 @@ static const unsigned armv7_a5_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
469 | [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, | 469 | [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, |
470 | }, | 470 | }, |
471 | }, | 471 | }, |
472 | [C(NODE)] = { | ||
473 | [C(OP_READ)] = { | ||
474 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | ||
475 | [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, | ||
476 | }, | ||
477 | [C(OP_WRITE)] = { | ||
478 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | ||
479 | [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, | ||
480 | }, | ||
481 | [C(OP_PREFETCH)] = { | ||
482 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | ||
483 | [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, | ||
484 | }, | ||
485 | }, | ||
472 | }; | 486 | }; |
473 | 487 | ||
474 | /* | 488 | /* |
@@ -579,6 +593,20 @@ static const unsigned armv7_a15_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
579 | [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, | 593 | [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, |
580 | }, | 594 | }, |
581 | }, | 595 | }, |
596 | [C(NODE)] = { | ||
597 | [C(OP_READ)] = { | ||
598 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | ||
599 | [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, | ||
600 | }, | ||
601 | [C(OP_WRITE)] = { | ||
602 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | ||
603 | [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, | ||
604 | }, | ||
605 | [C(OP_PREFETCH)] = { | ||
606 | [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, | ||
607 | [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, | ||
608 | }, | ||
609 | }, | ||
582 | }; | 610 | }; |
583 | 611 | ||
584 | /* | 612 | /* |
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c index e1d5e1929fbd..ede6443c34d9 100644 --- a/arch/arm/kernel/ptrace.c +++ b/arch/arm/kernel/ptrace.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/perf_event.h> | 23 | #include <linux/perf_event.h> |
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 | 27 | ||
27 | #include <asm/pgtable.h> | 28 | #include <asm/pgtable.h> |
28 | #include <asm/system.h> | 29 | #include <asm/system.h> |
@@ -699,10 +700,13 @@ static int vfp_set(struct task_struct *target, | |||
699 | { | 700 | { |
700 | int ret; | 701 | int ret; |
701 | struct thread_info *thread = task_thread_info(target); | 702 | struct thread_info *thread = task_thread_info(target); |
702 | struct vfp_hard_struct new_vfp = thread->vfpstate.hard; | 703 | struct vfp_hard_struct new_vfp; |
703 | const size_t user_fpregs_offset = offsetof(struct user_vfp, fpregs); | 704 | const size_t user_fpregs_offset = offsetof(struct user_vfp, fpregs); |
704 | const size_t user_fpscr_offset = offsetof(struct user_vfp, fpscr); | 705 | const size_t user_fpscr_offset = offsetof(struct user_vfp, fpscr); |
705 | 706 | ||
707 | vfp_sync_hwstate(thread); | ||
708 | new_vfp = thread->vfpstate.hard; | ||
709 | |||
706 | ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, | 710 | ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, |
707 | &new_vfp.fpregs, | 711 | &new_vfp.fpregs, |
708 | user_fpregs_offset, | 712 | user_fpregs_offset, |
@@ -723,9 +727,8 @@ static int vfp_set(struct task_struct *target, | |||
723 | if (ret) | 727 | if (ret) |
724 | return ret; | 728 | return ret; |
725 | 729 | ||
726 | vfp_sync_hwstate(thread); | ||
727 | thread->vfpstate.hard = new_vfp; | ||
728 | vfp_flush_hwstate(thread); | 730 | vfp_flush_hwstate(thread); |
731 | thread->vfpstate.hard = new_vfp; | ||
729 | 732 | ||
730 | return 0; | 733 | return 0; |
731 | } | 734 | } |
@@ -902,6 +905,12 @@ long arch_ptrace(struct task_struct *child, long request, | |||
902 | return ret; | 905 | return ret; |
903 | } | 906 | } |
904 | 907 | ||
908 | #ifdef __ARMEB__ | ||
909 | #define AUDIT_ARCH_NR AUDIT_ARCH_ARMEB | ||
910 | #else | ||
911 | #define AUDIT_ARCH_NR AUDIT_ARCH_ARM | ||
912 | #endif | ||
913 | |||
905 | asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno) | 914 | asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno) |
906 | { | 915 | { |
907 | unsigned long ip; | 916 | unsigned long ip; |
@@ -916,7 +925,7 @@ asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno) | |||
916 | if (!ip) | 925 | if (!ip) |
917 | audit_syscall_exit(regs); | 926 | audit_syscall_exit(regs); |
918 | else | 927 | else |
919 | audit_syscall_entry(AUDIT_ARCH_ARMEB, scno, regs->ARM_r0, | 928 | audit_syscall_entry(AUDIT_ARCH_NR, scno, regs->ARM_r0, |
920 | regs->ARM_r1, regs->ARM_r2, regs->ARM_r3); | 929 | regs->ARM_r1, regs->ARM_r2, regs->ARM_r3); |
921 | 930 | ||
922 | if (!test_thread_flag(TIF_SYSCALL_TRACE)) | 931 | if (!test_thread_flag(TIF_SYSCALL_TRACE)) |
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index 0340224cf73c..9e617bd4a146 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c | |||
@@ -227,6 +227,8 @@ static int restore_vfp_context(struct vfp_sigframe __user *frame) | |||
227 | if (magic != VFP_MAGIC || size != VFP_STORAGE_SIZE) | 227 | if (magic != VFP_MAGIC || size != VFP_STORAGE_SIZE) |
228 | return -EINVAL; | 228 | return -EINVAL; |
229 | 229 | ||
230 | vfp_flush_hwstate(thread); | ||
231 | |||
230 | /* | 232 | /* |
231 | * Copy the floating point registers. There can be unused | 233 | * Copy the floating point registers. There can be unused |
232 | * registers see asm/hwcap.h for details. | 234 | * registers see asm/hwcap.h for details. |
@@ -251,9 +253,6 @@ static int restore_vfp_context(struct vfp_sigframe __user *frame) | |||
251 | __get_user_error(h->fpinst, &frame->ufp_exc.fpinst, err); | 253 | __get_user_error(h->fpinst, &frame->ufp_exc.fpinst, err); |
252 | __get_user_error(h->fpinst2, &frame->ufp_exc.fpinst2, err); | 254 | __get_user_error(h->fpinst2, &frame->ufp_exc.fpinst2, err); |
253 | 255 | ||
254 | if (!err) | ||
255 | vfp_flush_hwstate(thread); | ||
256 | |||
257 | return err ? -EFAULT : 0; | 256 | return err ? -EFAULT : 0; |
258 | } | 257 | } |
259 | 258 | ||
diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c index 4285daa077b0..7a79b24597b2 100644 --- a/arch/arm/kernel/smp_twd.c +++ b/arch/arm/kernel/smp_twd.c | |||
@@ -129,7 +129,7 @@ static struct notifier_block twd_cpufreq_nb = { | |||
129 | 129 | ||
130 | static int twd_cpufreq_init(void) | 130 | static int twd_cpufreq_init(void) |
131 | { | 131 | { |
132 | if (!IS_ERR(twd_clk)) | 132 | if (twd_evt && *__this_cpu_ptr(twd_evt) && !IS_ERR(twd_clk)) |
133 | return cpufreq_register_notifier(&twd_cpufreq_nb, | 133 | return cpufreq_register_notifier(&twd_cpufreq_nb, |
134 | CPUFREQ_TRANSITION_NOTIFIER); | 134 | CPUFREQ_TRANSITION_NOTIFIER); |
135 | 135 | ||
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 99a572702509..f84dfe67724f 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
@@ -266,6 +266,7 @@ void die(const char *str, struct pt_regs *regs, int err) | |||
266 | { | 266 | { |
267 | struct thread_info *thread = current_thread_info(); | 267 | struct thread_info *thread = current_thread_info(); |
268 | int ret; | 268 | int ret; |
269 | enum bug_trap_type bug_type = BUG_TRAP_TYPE_NONE; | ||
269 | 270 | ||
270 | oops_enter(); | 271 | oops_enter(); |
271 | 272 | ||
@@ -273,7 +274,9 @@ void die(const char *str, struct pt_regs *regs, int err) | |||
273 | console_verbose(); | 274 | console_verbose(); |
274 | bust_spinlocks(1); | 275 | bust_spinlocks(1); |
275 | if (!user_mode(regs)) | 276 | if (!user_mode(regs)) |
276 | report_bug(regs->ARM_pc, regs); | 277 | bug_type = report_bug(regs->ARM_pc, regs); |
278 | if (bug_type != BUG_TRAP_TYPE_NONE) | ||
279 | str = "Oops - BUG"; | ||
277 | ret = __die(str, err, thread, regs); | 280 | ret = __die(str, err, thread, regs); |
278 | 281 | ||
279 | if (regs && kexec_should_crash(thread->task)) | 282 | if (regs && kexec_should_crash(thread->task)) |
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index 1e19691e0406..43a31fb06318 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <asm/page.h> | 10 | #include <asm/page.h> |
11 | 11 | ||
12 | #define PROC_INFO \ | 12 | #define PROC_INFO \ |
13 | . = ALIGN(4); \ | ||
13 | VMLINUX_SYMBOL(__proc_info_begin) = .; \ | 14 | VMLINUX_SYMBOL(__proc_info_begin) = .; \ |
14 | *(.proc.info.init) \ | 15 | *(.proc.info.init) \ |
15 | VMLINUX_SYMBOL(__proc_info_end) = .; | 16 | VMLINUX_SYMBOL(__proc_info_end) = .; |
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index 71feb00a1e99..0284e66c47f9 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig | |||
@@ -102,15 +102,6 @@ config ARCH_AT91SAM9G45 | |||
102 | select HAVE_AT91_DBGU1 | 102 | select HAVE_AT91_DBGU1 |
103 | select AT91_SAM9G45_RESET | 103 | select AT91_SAM9G45_RESET |
104 | 104 | ||
105 | config ARCH_AT91CAP9 | ||
106 | bool "AT91CAP9" | ||
107 | select CPU_ARM926T | ||
108 | select GENERIC_CLOCKEVENTS | ||
109 | select HAVE_FB_ATMEL | ||
110 | select HAVE_NET_MACB | ||
111 | select HAVE_AT91_DBGU1 | ||
112 | select AT91_SAM9G45_RESET | ||
113 | |||
114 | config ARCH_AT91X40 | 105 | config ARCH_AT91X40 |
115 | bool "AT91x40" | 106 | bool "AT91x40" |
116 | select ARCH_USES_GETTIMEOFFSET | 107 | select ARCH_USES_GETTIMEOFFSET |
@@ -447,21 +438,6 @@ endif | |||
447 | 438 | ||
448 | # ---------------------------------------------------------- | 439 | # ---------------------------------------------------------- |
449 | 440 | ||
450 | if ARCH_AT91CAP9 | ||
451 | |||
452 | comment "AT91CAP9 Board Type" | ||
453 | |||
454 | config MACH_AT91CAP9ADK | ||
455 | bool "Atmel AT91CAP9A-DK Evaluation Kit" | ||
456 | select HAVE_AT91_DATAFLASH_CARD | ||
457 | help | ||
458 | Select this if you are using Atmel's AT91CAP9A-DK Evaluation Kit. | ||
459 | <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4138> | ||
460 | |||
461 | endif | ||
462 | |||
463 | # ---------------------------------------------------------- | ||
464 | |||
465 | if ARCH_AT91X40 | 441 | if ARCH_AT91X40 |
466 | 442 | ||
467 | comment "AT91X40 Board Type" | 443 | comment "AT91X40 Board Type" |
@@ -544,7 +520,7 @@ config AT91_EARLY_DBGU0 | |||
544 | depends on HAVE_AT91_DBGU0 | 520 | depends on HAVE_AT91_DBGU0 |
545 | 521 | ||
546 | config AT91_EARLY_DBGU1 | 522 | config AT91_EARLY_DBGU1 |
547 | bool "DBGU on 9263, 9g45 and cap9" | 523 | bool "DBGU on 9263 and 9g45" |
548 | depends on HAVE_AT91_DBGU1 | 524 | depends on HAVE_AT91_DBGU1 |
549 | 525 | ||
550 | config AT91_EARLY_USART0 | 526 | config AT91_EARLY_USART0 |
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile index 705e1fbded39..aeb76f1690d9 100644 --- a/arch/arm/mach-at91/Makefile +++ b/arch/arm/mach-at91/Makefile | |||
@@ -20,7 +20,6 @@ obj-$(CONFIG_ARCH_AT91SAM9263) += at91sam9263.o at91sam926x_time.o at91sam9263_d | |||
20 | obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl.o at91sam926x_time.o at91sam9rl_devices.o sam9_smc.o | 20 | obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl.o at91sam926x_time.o at91sam9rl_devices.o sam9_smc.o |
21 | obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o sam9_smc.o | 21 | obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o sam9_smc.o |
22 | obj-$(CONFIG_ARCH_AT91SAM9G45) += at91sam9g45.o at91sam926x_time.o at91sam9g45_devices.o sam9_smc.o | 22 | obj-$(CONFIG_ARCH_AT91SAM9G45) += at91sam9g45.o at91sam926x_time.o at91sam9g45_devices.o sam9_smc.o |
23 | obj-$(CONFIG_ARCH_AT91CAP9) += at91cap9.o at91sam926x_time.o at91cap9_devices.o sam9_smc.o | ||
24 | obj-$(CONFIG_ARCH_AT91X40) += at91x40.o at91x40_time.o | 23 | obj-$(CONFIG_ARCH_AT91X40) += at91x40.o at91x40_time.o |
25 | 24 | ||
26 | # AT91RM9200 board-specific support | 25 | # AT91RM9200 board-specific support |
@@ -81,9 +80,6 @@ obj-$(CONFIG_MACH_AT91SAM9M10G45EK) += board-sam9m10g45ek.o | |||
81 | # AT91SAM board with device-tree | 80 | # AT91SAM board with device-tree |
82 | obj-$(CONFIG_MACH_AT91SAM_DT) += board-dt.o | 81 | obj-$(CONFIG_MACH_AT91SAM_DT) += board-dt.o |
83 | 82 | ||
84 | # AT91CAP9 board-specific support | ||
85 | obj-$(CONFIG_MACH_AT91CAP9ADK) += board-cap9adk.o | ||
86 | |||
87 | # AT91X40 board-specific support | 83 | # AT91X40 board-specific support |
88 | obj-$(CONFIG_MACH_AT91EB01) += board-eb01.o | 84 | obj-$(CONFIG_MACH_AT91EB01) += board-eb01.o |
89 | 85 | ||
diff --git a/arch/arm/mach-at91/Makefile.boot b/arch/arm/mach-at91/Makefile.boot index 8ddafadfdc7d..2fd051eb2449 100644 --- a/arch/arm/mach-at91/Makefile.boot +++ b/arch/arm/mach-at91/Makefile.boot | |||
@@ -3,11 +3,7 @@ | |||
3 | # PARAMS_PHYS must be within 4MB of ZRELADDR | 3 | # PARAMS_PHYS must be within 4MB of ZRELADDR |
4 | # INITRD_PHYS must be in RAM | 4 | # INITRD_PHYS must be in RAM |
5 | 5 | ||
6 | ifeq ($(CONFIG_ARCH_AT91CAP9),y) | 6 | ifeq ($(CONFIG_ARCH_AT91SAM9G45),y) |
7 | zreladdr-y += 0x70008000 | ||
8 | params_phys-y := 0x70000100 | ||
9 | initrd_phys-y := 0x70410000 | ||
10 | else ifeq ($(CONFIG_ARCH_AT91SAM9G45),y) | ||
11 | zreladdr-y += 0x70008000 | 7 | zreladdr-y += 0x70008000 |
12 | params_phys-y := 0x70000100 | 8 | params_phys-y := 0x70000100 |
13 | initrd_phys-y := 0x70410000 | 9 | initrd_phys-y := 0x70410000 |
diff --git a/arch/arm/mach-at91/at91cap9.c b/arch/arm/mach-at91/at91cap9.c deleted file mode 100644 index 8967d75c2ea3..000000000000 --- a/arch/arm/mach-at91/at91cap9.c +++ /dev/null | |||
@@ -1,404 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-at91/at91cap9.c | ||
3 | * | ||
4 | * Copyright (C) 2007 Stelian Pop <stelian.pop@leadtechdesign.com> | ||
5 | * Copyright (C) 2007 Lead Tech Design <www.leadtechdesign.com> | ||
6 | * Copyright (C) 2007 Atmel Corporation. | ||
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 as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | */ | ||
14 | |||
15 | #include <linux/module.h> | ||
16 | |||
17 | #include <asm/proc-fns.h> | ||
18 | #include <asm/irq.h> | ||
19 | #include <asm/mach/arch.h> | ||
20 | #include <asm/mach/map.h> | ||
21 | |||
22 | #include <mach/cpu.h> | ||
23 | #include <mach/at91cap9.h> | ||
24 | #include <mach/at91_pmc.h> | ||
25 | |||
26 | #include "soc.h" | ||
27 | #include "generic.h" | ||
28 | #include "clock.h" | ||
29 | #include "sam9_smc.h" | ||
30 | |||
31 | /* -------------------------------------------------------------------- | ||
32 | * Clocks | ||
33 | * -------------------------------------------------------------------- */ | ||
34 | |||
35 | /* | ||
36 | * The peripheral clocks. | ||
37 | */ | ||
38 | static struct clk pioABCD_clk = { | ||
39 | .name = "pioABCD_clk", | ||
40 | .pmc_mask = 1 << AT91CAP9_ID_PIOABCD, | ||
41 | .type = CLK_TYPE_PERIPHERAL, | ||
42 | }; | ||
43 | static struct clk mpb0_clk = { | ||
44 | .name = "mpb0_clk", | ||
45 | .pmc_mask = 1 << AT91CAP9_ID_MPB0, | ||
46 | .type = CLK_TYPE_PERIPHERAL, | ||
47 | }; | ||
48 | static struct clk mpb1_clk = { | ||
49 | .name = "mpb1_clk", | ||
50 | .pmc_mask = 1 << AT91CAP9_ID_MPB1, | ||
51 | .type = CLK_TYPE_PERIPHERAL, | ||
52 | }; | ||
53 | static struct clk mpb2_clk = { | ||
54 | .name = "mpb2_clk", | ||
55 | .pmc_mask = 1 << AT91CAP9_ID_MPB2, | ||
56 | .type = CLK_TYPE_PERIPHERAL, | ||
57 | }; | ||
58 | static struct clk mpb3_clk = { | ||
59 | .name = "mpb3_clk", | ||
60 | .pmc_mask = 1 << AT91CAP9_ID_MPB3, | ||
61 | .type = CLK_TYPE_PERIPHERAL, | ||
62 | }; | ||
63 | static struct clk mpb4_clk = { | ||
64 | .name = "mpb4_clk", | ||
65 | .pmc_mask = 1 << AT91CAP9_ID_MPB4, | ||
66 | .type = CLK_TYPE_PERIPHERAL, | ||
67 | }; | ||
68 | static struct clk usart0_clk = { | ||
69 | .name = "usart0_clk", | ||
70 | .pmc_mask = 1 << AT91CAP9_ID_US0, | ||
71 | .type = CLK_TYPE_PERIPHERAL, | ||
72 | }; | ||
73 | static struct clk usart1_clk = { | ||
74 | .name = "usart1_clk", | ||
75 | .pmc_mask = 1 << AT91CAP9_ID_US1, | ||
76 | .type = CLK_TYPE_PERIPHERAL, | ||
77 | }; | ||
78 | static struct clk usart2_clk = { | ||
79 | .name = "usart2_clk", | ||
80 | .pmc_mask = 1 << AT91CAP9_ID_US2, | ||
81 | .type = CLK_TYPE_PERIPHERAL, | ||
82 | }; | ||
83 | static struct clk mmc0_clk = { | ||
84 | .name = "mci0_clk", | ||
85 | .pmc_mask = 1 << AT91CAP9_ID_MCI0, | ||
86 | .type = CLK_TYPE_PERIPHERAL, | ||
87 | }; | ||
88 | static struct clk mmc1_clk = { | ||
89 | .name = "mci1_clk", | ||
90 | .pmc_mask = 1 << AT91CAP9_ID_MCI1, | ||
91 | .type = CLK_TYPE_PERIPHERAL, | ||
92 | }; | ||
93 | static struct clk can_clk = { | ||
94 | .name = "can_clk", | ||
95 | .pmc_mask = 1 << AT91CAP9_ID_CAN, | ||
96 | .type = CLK_TYPE_PERIPHERAL, | ||
97 | }; | ||
98 | static struct clk twi_clk = { | ||
99 | .name = "twi_clk", | ||
100 | .pmc_mask = 1 << AT91CAP9_ID_TWI, | ||
101 | .type = CLK_TYPE_PERIPHERAL, | ||
102 | }; | ||
103 | static struct clk spi0_clk = { | ||
104 | .name = "spi0_clk", | ||
105 | .pmc_mask = 1 << AT91CAP9_ID_SPI0, | ||
106 | .type = CLK_TYPE_PERIPHERAL, | ||
107 | }; | ||
108 | static struct clk spi1_clk = { | ||
109 | .name = "spi1_clk", | ||
110 | .pmc_mask = 1 << AT91CAP9_ID_SPI1, | ||
111 | .type = CLK_TYPE_PERIPHERAL, | ||
112 | }; | ||
113 | static struct clk ssc0_clk = { | ||
114 | .name = "ssc0_clk", | ||
115 | .pmc_mask = 1 << AT91CAP9_ID_SSC0, | ||
116 | .type = CLK_TYPE_PERIPHERAL, | ||
117 | }; | ||
118 | static struct clk ssc1_clk = { | ||
119 | .name = "ssc1_clk", | ||
120 | .pmc_mask = 1 << AT91CAP9_ID_SSC1, | ||
121 | .type = CLK_TYPE_PERIPHERAL, | ||
122 | }; | ||
123 | static struct clk ac97_clk = { | ||
124 | .name = "ac97_clk", | ||
125 | .pmc_mask = 1 << AT91CAP9_ID_AC97C, | ||
126 | .type = CLK_TYPE_PERIPHERAL, | ||
127 | }; | ||
128 | static struct clk tcb_clk = { | ||
129 | .name = "tcb_clk", | ||
130 | .pmc_mask = 1 << AT91CAP9_ID_TCB, | ||
131 | .type = CLK_TYPE_PERIPHERAL, | ||
132 | }; | ||
133 | static struct clk pwm_clk = { | ||
134 | .name = "pwm_clk", | ||
135 | .pmc_mask = 1 << AT91CAP9_ID_PWMC, | ||
136 | .type = CLK_TYPE_PERIPHERAL, | ||
137 | }; | ||
138 | static struct clk macb_clk = { | ||
139 | .name = "pclk", | ||
140 | .pmc_mask = 1 << AT91CAP9_ID_EMAC, | ||
141 | .type = CLK_TYPE_PERIPHERAL, | ||
142 | }; | ||
143 | static struct clk aestdes_clk = { | ||
144 | .name = "aestdes_clk", | ||
145 | .pmc_mask = 1 << AT91CAP9_ID_AESTDES, | ||
146 | .type = CLK_TYPE_PERIPHERAL, | ||
147 | }; | ||
148 | static struct clk adc_clk = { | ||
149 | .name = "adc_clk", | ||
150 | .pmc_mask = 1 << AT91CAP9_ID_ADC, | ||
151 | .type = CLK_TYPE_PERIPHERAL, | ||
152 | }; | ||
153 | static struct clk isi_clk = { | ||
154 | .name = "isi_clk", | ||
155 | .pmc_mask = 1 << AT91CAP9_ID_ISI, | ||
156 | .type = CLK_TYPE_PERIPHERAL, | ||
157 | }; | ||
158 | static struct clk lcdc_clk = { | ||
159 | .name = "lcdc_clk", | ||
160 | .pmc_mask = 1 << AT91CAP9_ID_LCDC, | ||
161 | .type = CLK_TYPE_PERIPHERAL, | ||
162 | }; | ||
163 | static struct clk dma_clk = { | ||
164 | .name = "dma_clk", | ||
165 | .pmc_mask = 1 << AT91CAP9_ID_DMA, | ||
166 | .type = CLK_TYPE_PERIPHERAL, | ||
167 | }; | ||
168 | static struct clk udphs_clk = { | ||
169 | .name = "udphs_clk", | ||
170 | .pmc_mask = 1 << AT91CAP9_ID_UDPHS, | ||
171 | .type = CLK_TYPE_PERIPHERAL, | ||
172 | }; | ||
173 | static struct clk ohci_clk = { | ||
174 | .name = "ohci_clk", | ||
175 | .pmc_mask = 1 << AT91CAP9_ID_UHP, | ||
176 | .type = CLK_TYPE_PERIPHERAL, | ||
177 | }; | ||
178 | |||
179 | static struct clk *periph_clocks[] __initdata = { | ||
180 | &pioABCD_clk, | ||
181 | &mpb0_clk, | ||
182 | &mpb1_clk, | ||
183 | &mpb2_clk, | ||
184 | &mpb3_clk, | ||
185 | &mpb4_clk, | ||
186 | &usart0_clk, | ||
187 | &usart1_clk, | ||
188 | &usart2_clk, | ||
189 | &mmc0_clk, | ||
190 | &mmc1_clk, | ||
191 | &can_clk, | ||
192 | &twi_clk, | ||
193 | &spi0_clk, | ||
194 | &spi1_clk, | ||
195 | &ssc0_clk, | ||
196 | &ssc1_clk, | ||
197 | &ac97_clk, | ||
198 | &tcb_clk, | ||
199 | &pwm_clk, | ||
200 | &macb_clk, | ||
201 | &aestdes_clk, | ||
202 | &adc_clk, | ||
203 | &isi_clk, | ||
204 | &lcdc_clk, | ||
205 | &dma_clk, | ||
206 | &udphs_clk, | ||
207 | &ohci_clk, | ||
208 | // irq0 .. irq1 | ||
209 | }; | ||
210 | |||
211 | static struct clk_lookup periph_clocks_lookups[] = { | ||
212 | /* One additional fake clock for macb_hclk */ | ||
213 | CLKDEV_CON_ID("hclk", &macb_clk), | ||
214 | CLKDEV_CON_DEV_ID("hclk", "atmel_usba_udc", &utmi_clk), | ||
215 | CLKDEV_CON_DEV_ID("pclk", "atmel_usba_udc", &udphs_clk), | ||
216 | CLKDEV_CON_DEV_ID("mci_clk", "at91_mci.0", &mmc0_clk), | ||
217 | CLKDEV_CON_DEV_ID("mci_clk", "at91_mci.1", &mmc1_clk), | ||
218 | CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk), | ||
219 | CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk), | ||
220 | CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tcb_clk), | ||
221 | CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk), | ||
222 | CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk), | ||
223 | /* fake hclk clock */ | ||
224 | CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &ohci_clk), | ||
225 | CLKDEV_CON_ID("pioA", &pioABCD_clk), | ||
226 | CLKDEV_CON_ID("pioB", &pioABCD_clk), | ||
227 | CLKDEV_CON_ID("pioC", &pioABCD_clk), | ||
228 | CLKDEV_CON_ID("pioD", &pioABCD_clk), | ||
229 | }; | ||
230 | |||
231 | static struct clk_lookup usart_clocks_lookups[] = { | ||
232 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.0", &mck), | ||
233 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.1", &usart0_clk), | ||
234 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.2", &usart1_clk), | ||
235 | CLKDEV_CON_DEV_ID("usart", "atmel_usart.3", &usart2_clk), | ||
236 | }; | ||
237 | |||
238 | /* | ||
239 | * The four programmable clocks. | ||
240 | * You must configure pin multiplexing to bring these signals out. | ||
241 | */ | ||
242 | static struct clk pck0 = { | ||
243 | .name = "pck0", | ||
244 | .pmc_mask = AT91_PMC_PCK0, | ||
245 | .type = CLK_TYPE_PROGRAMMABLE, | ||
246 | .id = 0, | ||
247 | }; | ||
248 | static struct clk pck1 = { | ||
249 | .name = "pck1", | ||
250 | .pmc_mask = AT91_PMC_PCK1, | ||
251 | .type = CLK_TYPE_PROGRAMMABLE, | ||
252 | .id = 1, | ||
253 | }; | ||
254 | static struct clk pck2 = { | ||
255 | .name = "pck2", | ||
256 | .pmc_mask = AT91_PMC_PCK2, | ||
257 | .type = CLK_TYPE_PROGRAMMABLE, | ||
258 | .id = 2, | ||
259 | }; | ||
260 | static struct clk pck3 = { | ||
261 | .name = "pck3", | ||
262 | .pmc_mask = AT91_PMC_PCK3, | ||
263 | .type = CLK_TYPE_PROGRAMMABLE, | ||
264 | .id = 3, | ||
265 | }; | ||
266 | |||
267 | static void __init at91cap9_register_clocks(void) | ||
268 | { | ||
269 | int i; | ||
270 | |||
271 | for (i = 0; i < ARRAY_SIZE(periph_clocks); i++) | ||
272 | clk_register(periph_clocks[i]); | ||
273 | |||
274 | clkdev_add_table(periph_clocks_lookups, | ||
275 | ARRAY_SIZE(periph_clocks_lookups)); | ||
276 | clkdev_add_table(usart_clocks_lookups, | ||
277 | ARRAY_SIZE(usart_clocks_lookups)); | ||
278 | |||
279 | clk_register(&pck0); | ||
280 | clk_register(&pck1); | ||
281 | clk_register(&pck2); | ||
282 | clk_register(&pck3); | ||
283 | } | ||
284 | |||
285 | static struct clk_lookup console_clock_lookup; | ||
286 | |||
287 | void __init at91cap9_set_console_clock(int id) | ||
288 | { | ||
289 | if (id >= ARRAY_SIZE(usart_clocks_lookups)) | ||
290 | return; | ||
291 | |||
292 | console_clock_lookup.con_id = "usart"; | ||
293 | console_clock_lookup.clk = usart_clocks_lookups[id].clk; | ||
294 | clkdev_add(&console_clock_lookup); | ||
295 | } | ||
296 | |||
297 | /* -------------------------------------------------------------------- | ||
298 | * GPIO | ||
299 | * -------------------------------------------------------------------- */ | ||
300 | |||
301 | static struct at91_gpio_bank at91cap9_gpio[] __initdata = { | ||
302 | { | ||
303 | .id = AT91CAP9_ID_PIOABCD, | ||
304 | .regbase = AT91CAP9_BASE_PIOA, | ||
305 | }, { | ||
306 | .id = AT91CAP9_ID_PIOABCD, | ||
307 | .regbase = AT91CAP9_BASE_PIOB, | ||
308 | }, { | ||
309 | .id = AT91CAP9_ID_PIOABCD, | ||
310 | .regbase = AT91CAP9_BASE_PIOC, | ||
311 | }, { | ||
312 | .id = AT91CAP9_ID_PIOABCD, | ||
313 | .regbase = AT91CAP9_BASE_PIOD, | ||
314 | } | ||
315 | }; | ||
316 | |||
317 | static void at91cap9_idle(void) | ||
318 | { | ||
319 | at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK); | ||
320 | cpu_do_idle(); | ||
321 | } | ||
322 | |||
323 | /* -------------------------------------------------------------------- | ||
324 | * AT91CAP9 processor initialization | ||
325 | * -------------------------------------------------------------------- */ | ||
326 | |||
327 | static void __init at91cap9_map_io(void) | ||
328 | { | ||
329 | at91_init_sram(0, AT91CAP9_SRAM_BASE, AT91CAP9_SRAM_SIZE); | ||
330 | } | ||
331 | |||
332 | static void __init at91cap9_ioremap_registers(void) | ||
333 | { | ||
334 | at91_ioremap_shdwc(AT91CAP9_BASE_SHDWC); | ||
335 | at91_ioremap_rstc(AT91CAP9_BASE_RSTC); | ||
336 | at91sam926x_ioremap_pit(AT91CAP9_BASE_PIT); | ||
337 | at91sam9_ioremap_smc(0, AT91CAP9_BASE_SMC); | ||
338 | } | ||
339 | |||
340 | static void __init at91cap9_initialize(void) | ||
341 | { | ||
342 | arm_pm_idle = at91cap9_idle; | ||
343 | arm_pm_restart = at91sam9g45_restart; | ||
344 | at91_extern_irq = (1 << AT91CAP9_ID_IRQ0) | (1 << AT91CAP9_ID_IRQ1); | ||
345 | |||
346 | /* Register GPIO subsystem */ | ||
347 | at91_gpio_init(at91cap9_gpio, 4); | ||
348 | |||
349 | /* Remember the silicon revision */ | ||
350 | if (cpu_is_at91cap9_revB()) | ||
351 | system_rev = 0xB; | ||
352 | else if (cpu_is_at91cap9_revC()) | ||
353 | system_rev = 0xC; | ||
354 | } | ||
355 | |||
356 | /* -------------------------------------------------------------------- | ||
357 | * Interrupt initialization | ||
358 | * -------------------------------------------------------------------- */ | ||
359 | |||
360 | /* | ||
361 | * The default interrupt priority levels (0 = lowest, 7 = highest). | ||
362 | */ | ||
363 | static unsigned int at91cap9_default_irq_priority[NR_AIC_IRQS] __initdata = { | ||
364 | 7, /* Advanced Interrupt Controller (FIQ) */ | ||
365 | 7, /* System Peripherals */ | ||
366 | 1, /* Parallel IO Controller A, B, C and D */ | ||
367 | 0, /* MP Block Peripheral 0 */ | ||
368 | 0, /* MP Block Peripheral 1 */ | ||
369 | 0, /* MP Block Peripheral 2 */ | ||
370 | 0, /* MP Block Peripheral 3 */ | ||
371 | 0, /* MP Block Peripheral 4 */ | ||
372 | 5, /* USART 0 */ | ||
373 | 5, /* USART 1 */ | ||
374 | 5, /* USART 2 */ | ||
375 | 0, /* Multimedia Card Interface 0 */ | ||
376 | 0, /* Multimedia Card Interface 1 */ | ||
377 | 3, /* CAN */ | ||
378 | 6, /* Two-Wire Interface */ | ||
379 | 5, /* Serial Peripheral Interface 0 */ | ||
380 | 5, /* Serial Peripheral Interface 1 */ | ||
381 | 4, /* Serial Synchronous Controller 0 */ | ||
382 | 4, /* Serial Synchronous Controller 1 */ | ||
383 | 5, /* AC97 Controller */ | ||
384 | 0, /* Timer Counter 0, 1 and 2 */ | ||
385 | 0, /* Pulse Width Modulation Controller */ | ||
386 | 3, /* Ethernet */ | ||
387 | 0, /* Advanced Encryption Standard, Triple DES*/ | ||
388 | 0, /* Analog-to-Digital Converter */ | ||
389 | 0, /* Image Sensor Interface */ | ||
390 | 3, /* LCD Controller */ | ||
391 | 0, /* DMA Controller */ | ||
392 | 2, /* USB Device Port */ | ||
393 | 2, /* USB Host port */ | ||
394 | 0, /* Advanced Interrupt Controller (IRQ0) */ | ||
395 | 0, /* Advanced Interrupt Controller (IRQ1) */ | ||
396 | }; | ||
397 | |||
398 | struct at91_init_soc __initdata at91cap9_soc = { | ||
399 | .map_io = at91cap9_map_io, | ||
400 | .default_irq_priority = at91cap9_default_irq_priority, | ||
401 | .ioremap_registers = at91cap9_ioremap_registers, | ||
402 | .register_clocks = at91cap9_register_clocks, | ||
403 | .init = at91cap9_initialize, | ||
404 | }; | ||
diff --git a/arch/arm/mach-at91/at91cap9_devices.c b/arch/arm/mach-at91/at91cap9_devices.c deleted file mode 100644 index d298fb7cb210..000000000000 --- a/arch/arm/mach-at91/at91cap9_devices.c +++ /dev/null | |||
@@ -1,1273 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-at91/at91cap9_devices.c | ||
3 | * | ||
4 | * Copyright (C) 2007 Stelian Pop <stelian.pop@leadtechdesign.com> | ||
5 | * Copyright (C) 2007 Lead Tech Design <www.leadtechdesign.com> | ||
6 | * Copyright (C) 2007 Atmel Corporation. | ||
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 as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | */ | ||
14 | #include <asm/mach/arch.h> | ||
15 | #include <asm/mach/map.h> | ||
16 | #include <asm/mach/irq.h> | ||
17 | |||
18 | #include <linux/dma-mapping.h> | ||
19 | #include <linux/gpio.h> | ||
20 | #include <linux/platform_device.h> | ||
21 | #include <linux/i2c-gpio.h> | ||
22 | |||
23 | #include <video/atmel_lcdc.h> | ||
24 | |||
25 | #include <mach/board.h> | ||
26 | #include <mach/cpu.h> | ||
27 | #include <mach/at91cap9.h> | ||
28 | #include <mach/at91cap9_matrix.h> | ||
29 | #include <mach/at91sam9_smc.h> | ||
30 | |||
31 | #include "generic.h" | ||
32 | |||
33 | |||
34 | /* -------------------------------------------------------------------- | ||
35 | * USB Host | ||
36 | * -------------------------------------------------------------------- */ | ||
37 | |||
38 | #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) | ||
39 | static u64 ohci_dmamask = DMA_BIT_MASK(32); | ||
40 | static struct at91_usbh_data usbh_data; | ||
41 | |||
42 | static struct resource usbh_resources[] = { | ||
43 | [0] = { | ||
44 | .start = AT91CAP9_UHP_BASE, | ||
45 | .end = AT91CAP9_UHP_BASE + SZ_1M - 1, | ||
46 | .flags = IORESOURCE_MEM, | ||
47 | }, | ||
48 | [1] = { | ||
49 | .start = AT91CAP9_ID_UHP, | ||
50 | .end = AT91CAP9_ID_UHP, | ||
51 | .flags = IORESOURCE_IRQ, | ||
52 | }, | ||
53 | }; | ||
54 | |||
55 | static struct platform_device at91_usbh_device = { | ||
56 | .name = "at91_ohci", | ||
57 | .id = -1, | ||
58 | .dev = { | ||
59 | .dma_mask = &ohci_dmamask, | ||
60 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
61 | .platform_data = &usbh_data, | ||
62 | }, | ||
63 | .resource = usbh_resources, | ||
64 | .num_resources = ARRAY_SIZE(usbh_resources), | ||
65 | }; | ||
66 | |||
67 | void __init at91_add_device_usbh(struct at91_usbh_data *data) | ||
68 | { | ||
69 | int i; | ||
70 | |||
71 | if (!data) | ||
72 | return; | ||
73 | |||
74 | if (cpu_is_at91cap9_revB()) | ||
75 | irq_set_irq_type(AT91CAP9_ID_UHP, IRQ_TYPE_LEVEL_HIGH); | ||
76 | |||
77 | /* Enable VBus control for UHP ports */ | ||
78 | for (i = 0; i < data->ports; i++) { | ||
79 | if (gpio_is_valid(data->vbus_pin[i])) | ||
80 | at91_set_gpio_output(data->vbus_pin[i], 0); | ||
81 | } | ||
82 | |||
83 | /* Enable overcurrent notification */ | ||
84 | for (i = 0; i < data->ports; i++) { | ||
85 | if (data->overcurrent_pin[i]) | ||
86 | at91_set_gpio_input(data->overcurrent_pin[i], 1); | ||
87 | } | ||
88 | |||
89 | usbh_data = *data; | ||
90 | platform_device_register(&at91_usbh_device); | ||
91 | } | ||
92 | #else | ||
93 | void __init at91_add_device_usbh(struct at91_usbh_data *data) {} | ||
94 | #endif | ||
95 | |||
96 | |||
97 | /* -------------------------------------------------------------------- | ||
98 | * USB HS Device (Gadget) | ||
99 | * -------------------------------------------------------------------- */ | ||
100 | |||
101 | #if defined(CONFIG_USB_ATMEL_USBA) || defined(CONFIG_USB_ATMEL_USBA_MODULE) | ||
102 | |||
103 | static struct resource usba_udc_resources[] = { | ||
104 | [0] = { | ||
105 | .start = AT91CAP9_UDPHS_FIFO, | ||
106 | .end = AT91CAP9_UDPHS_FIFO + SZ_512K - 1, | ||
107 | .flags = IORESOURCE_MEM, | ||
108 | }, | ||
109 | [1] = { | ||
110 | .start = AT91CAP9_BASE_UDPHS, | ||
111 | .end = AT91CAP9_BASE_UDPHS + SZ_1K - 1, | ||
112 | .flags = IORESOURCE_MEM, | ||
113 | }, | ||
114 | [2] = { | ||
115 | .start = AT91CAP9_ID_UDPHS, | ||
116 | .end = AT91CAP9_ID_UDPHS, | ||
117 | .flags = IORESOURCE_IRQ, | ||
118 | }, | ||
119 | }; | ||
120 | |||
121 | #define EP(nam, idx, maxpkt, maxbk, dma, isoc) \ | ||
122 | [idx] = { \ | ||
123 | .name = nam, \ | ||
124 | .index = idx, \ | ||
125 | .fifo_size = maxpkt, \ | ||
126 | .nr_banks = maxbk, \ | ||
127 | .can_dma = dma, \ | ||
128 | .can_isoc = isoc, \ | ||
129 | } | ||
130 | |||
131 | static struct usba_ep_data usba_udc_ep[] = { | ||
132 | EP("ep0", 0, 64, 1, 0, 0), | ||
133 | EP("ep1", 1, 1024, 3, 1, 1), | ||
134 | EP("ep2", 2, 1024, 3, 1, 1), | ||
135 | EP("ep3", 3, 1024, 2, 1, 1), | ||
136 | EP("ep4", 4, 1024, 2, 1, 1), | ||
137 | EP("ep5", 5, 1024, 2, 1, 0), | ||
138 | EP("ep6", 6, 1024, 2, 1, 0), | ||
139 | EP("ep7", 7, 1024, 2, 0, 0), | ||
140 | }; | ||
141 | |||
142 | #undef EP | ||
143 | |||
144 | /* | ||
145 | * pdata doesn't have room for any endpoints, so we need to | ||
146 | * append room for the ones we need right after it. | ||
147 | */ | ||
148 | static struct { | ||
149 | struct usba_platform_data pdata; | ||
150 | struct usba_ep_data ep[8]; | ||
151 | } usba_udc_data; | ||
152 | |||
153 | static struct platform_device at91_usba_udc_device = { | ||
154 | .name = "atmel_usba_udc", | ||
155 | .id = -1, | ||
156 | .dev = { | ||
157 | .platform_data = &usba_udc_data.pdata, | ||
158 | }, | ||
159 | .resource = usba_udc_resources, | ||
160 | .num_resources = ARRAY_SIZE(usba_udc_resources), | ||
161 | }; | ||
162 | |||
163 | void __init at91_add_device_usba(struct usba_platform_data *data) | ||
164 | { | ||
165 | if (cpu_is_at91cap9_revB()) { | ||
166 | irq_set_irq_type(AT91CAP9_ID_UDPHS, IRQ_TYPE_LEVEL_HIGH); | ||
167 | at91_sys_write(AT91_MATRIX_UDPHS, AT91_MATRIX_SELECT_UDPHS | | ||
168 | AT91_MATRIX_UDPHS_BYPASS_LOCK); | ||
169 | } | ||
170 | else | ||
171 | at91_sys_write(AT91_MATRIX_UDPHS, AT91_MATRIX_SELECT_UDPHS); | ||
172 | |||
173 | /* | ||
174 | * Invalid pins are 0 on AT91, but the usba driver is shared | ||
175 | * with AVR32, which use negative values instead. Once/if | ||
176 | * gpio_is_valid() is ported to AT91, revisit this code. | ||
177 | */ | ||
178 | usba_udc_data.pdata.vbus_pin = -EINVAL; | ||
179 | usba_udc_data.pdata.num_ep = ARRAY_SIZE(usba_udc_ep); | ||
180 | memcpy(usba_udc_data.ep, usba_udc_ep, sizeof(usba_udc_ep)); | ||
181 | |||
182 | if (data && gpio_is_valid(data->vbus_pin)) { | ||
183 | at91_set_gpio_input(data->vbus_pin, 0); | ||
184 | at91_set_deglitch(data->vbus_pin, 1); | ||
185 | usba_udc_data.pdata.vbus_pin = data->vbus_pin; | ||
186 | } | ||
187 | |||
188 | /* Pullup pin is handled internally by USB device peripheral */ | ||
189 | |||
190 | platform_device_register(&at91_usba_udc_device); | ||
191 | } | ||
192 | #else | ||
193 | void __init at91_add_device_usba(struct usba_platform_data *data) {} | ||
194 | #endif | ||
195 | |||
196 | |||
197 | /* -------------------------------------------------------------------- | ||
198 | * Ethernet | ||
199 | * -------------------------------------------------------------------- */ | ||
200 | |||
201 | #if defined(CONFIG_MACB) || defined(CONFIG_MACB_MODULE) | ||
202 | static u64 eth_dmamask = DMA_BIT_MASK(32); | ||
203 | static struct macb_platform_data eth_data; | ||
204 | |||
205 | static struct resource eth_resources[] = { | ||
206 | [0] = { | ||
207 | .start = AT91CAP9_BASE_EMAC, | ||
208 | .end = AT91CAP9_BASE_EMAC + SZ_16K - 1, | ||
209 | .flags = IORESOURCE_MEM, | ||
210 | }, | ||
211 | [1] = { | ||
212 | .start = AT91CAP9_ID_EMAC, | ||
213 | .end = AT91CAP9_ID_EMAC, | ||
214 | .flags = IORESOURCE_IRQ, | ||
215 | }, | ||
216 | }; | ||
217 | |||
218 | static struct platform_device at91cap9_eth_device = { | ||
219 | .name = "macb", | ||
220 | .id = -1, | ||
221 | .dev = { | ||
222 | .dma_mask = ð_dmamask, | ||
223 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
224 | .platform_data = ð_data, | ||
225 | }, | ||
226 | .resource = eth_resources, | ||
227 | .num_resources = ARRAY_SIZE(eth_resources), | ||
228 | }; | ||
229 | |||
230 | void __init at91_add_device_eth(struct macb_platform_data *data) | ||
231 | { | ||
232 | if (!data) | ||
233 | return; | ||
234 | |||
235 | if (gpio_is_valid(data->phy_irq_pin)) { | ||
236 | at91_set_gpio_input(data->phy_irq_pin, 0); | ||
237 | at91_set_deglitch(data->phy_irq_pin, 1); | ||
238 | } | ||
239 | |||
240 | /* Pins used for MII and RMII */ | ||
241 | at91_set_A_periph(AT91_PIN_PB21, 0); /* ETXCK_EREFCK */ | ||
242 | at91_set_A_periph(AT91_PIN_PB22, 0); /* ERXDV */ | ||
243 | at91_set_A_periph(AT91_PIN_PB25, 0); /* ERX0 */ | ||
244 | at91_set_A_periph(AT91_PIN_PB26, 0); /* ERX1 */ | ||
245 | at91_set_A_periph(AT91_PIN_PB27, 0); /* ERXER */ | ||
246 | at91_set_A_periph(AT91_PIN_PB28, 0); /* ETXEN */ | ||
247 | at91_set_A_periph(AT91_PIN_PB23, 0); /* ETX0 */ | ||
248 | at91_set_A_periph(AT91_PIN_PB24, 0); /* ETX1 */ | ||
249 | at91_set_A_periph(AT91_PIN_PB30, 0); /* EMDIO */ | ||
250 | at91_set_A_periph(AT91_PIN_PB29, 0); /* EMDC */ | ||
251 | |||
252 | if (!data->is_rmii) { | ||
253 | at91_set_B_periph(AT91_PIN_PC25, 0); /* ECRS */ | ||
254 | at91_set_B_periph(AT91_PIN_PC26, 0); /* ECOL */ | ||
255 | at91_set_B_periph(AT91_PIN_PC22, 0); /* ERX2 */ | ||
256 | at91_set_B_periph(AT91_PIN_PC23, 0); /* ERX3 */ | ||
257 | at91_set_B_periph(AT91_PIN_PC27, 0); /* ERXCK */ | ||
258 | at91_set_B_periph(AT91_PIN_PC20, 0); /* ETX2 */ | ||
259 | at91_set_B_periph(AT91_PIN_PC21, 0); /* ETX3 */ | ||
260 | at91_set_B_periph(AT91_PIN_PC24, 0); /* ETXER */ | ||
261 | } | ||
262 | |||
263 | eth_data = *data; | ||
264 | platform_device_register(&at91cap9_eth_device); | ||
265 | } | ||
266 | #else | ||
267 | void __init at91_add_device_eth(struct macb_platform_data *data) {} | ||
268 | #endif | ||
269 | |||
270 | |||
271 | /* -------------------------------------------------------------------- | ||
272 | * MMC / SD | ||
273 | * -------------------------------------------------------------------- */ | ||
274 | |||
275 | #if defined(CONFIG_MMC_AT91) || defined(CONFIG_MMC_AT91_MODULE) | ||
276 | static u64 mmc_dmamask = DMA_BIT_MASK(32); | ||
277 | static struct at91_mmc_data mmc0_data, mmc1_data; | ||
278 | |||
279 | static struct resource mmc0_resources[] = { | ||
280 | [0] = { | ||
281 | .start = AT91CAP9_BASE_MCI0, | ||
282 | .end = AT91CAP9_BASE_MCI0 + SZ_16K - 1, | ||
283 | .flags = IORESOURCE_MEM, | ||
284 | }, | ||
285 | [1] = { | ||
286 | .start = AT91CAP9_ID_MCI0, | ||
287 | .end = AT91CAP9_ID_MCI0, | ||
288 | .flags = IORESOURCE_IRQ, | ||
289 | }, | ||
290 | }; | ||
291 | |||
292 | static struct platform_device at91cap9_mmc0_device = { | ||
293 | .name = "at91_mci", | ||
294 | .id = 0, | ||
295 | .dev = { | ||
296 | .dma_mask = &mmc_dmamask, | ||
297 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
298 | .platform_data = &mmc0_data, | ||
299 | }, | ||
300 | .resource = mmc0_resources, | ||
301 | .num_resources = ARRAY_SIZE(mmc0_resources), | ||
302 | }; | ||
303 | |||
304 | static struct resource mmc1_resources[] = { | ||
305 | [0] = { | ||
306 | .start = AT91CAP9_BASE_MCI1, | ||
307 | .end = AT91CAP9_BASE_MCI1 + SZ_16K - 1, | ||
308 | .flags = IORESOURCE_MEM, | ||
309 | }, | ||
310 | [1] = { | ||
311 | .start = AT91CAP9_ID_MCI1, | ||
312 | .end = AT91CAP9_ID_MCI1, | ||
313 | .flags = IORESOURCE_IRQ, | ||
314 | }, | ||
315 | }; | ||
316 | |||
317 | static struct platform_device at91cap9_mmc1_device = { | ||
318 | .name = "at91_mci", | ||
319 | .id = 1, | ||
320 | .dev = { | ||
321 | .dma_mask = &mmc_dmamask, | ||
322 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
323 | .platform_data = &mmc1_data, | ||
324 | }, | ||
325 | .resource = mmc1_resources, | ||
326 | .num_resources = ARRAY_SIZE(mmc1_resources), | ||
327 | }; | ||
328 | |||
329 | void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) | ||
330 | { | ||
331 | if (!data) | ||
332 | return; | ||
333 | |||
334 | /* input/irq */ | ||
335 | if (gpio_is_valid(data->det_pin)) { | ||
336 | at91_set_gpio_input(data->det_pin, 1); | ||
337 | at91_set_deglitch(data->det_pin, 1); | ||
338 | } | ||
339 | if (gpio_is_valid(data->wp_pin)) | ||
340 | at91_set_gpio_input(data->wp_pin, 1); | ||
341 | if (gpio_is_valid(data->vcc_pin)) | ||
342 | at91_set_gpio_output(data->vcc_pin, 0); | ||
343 | |||
344 | if (mmc_id == 0) { /* MCI0 */ | ||
345 | /* CLK */ | ||
346 | at91_set_A_periph(AT91_PIN_PA2, 0); | ||
347 | |||
348 | /* CMD */ | ||
349 | at91_set_A_periph(AT91_PIN_PA1, 1); | ||
350 | |||
351 | /* DAT0, maybe DAT1..DAT3 */ | ||
352 | at91_set_A_periph(AT91_PIN_PA0, 1); | ||
353 | if (data->wire4) { | ||
354 | at91_set_A_periph(AT91_PIN_PA3, 1); | ||
355 | at91_set_A_periph(AT91_PIN_PA4, 1); | ||
356 | at91_set_A_periph(AT91_PIN_PA5, 1); | ||
357 | } | ||
358 | |||
359 | mmc0_data = *data; | ||
360 | platform_device_register(&at91cap9_mmc0_device); | ||
361 | } else { /* MCI1 */ | ||
362 | /* CLK */ | ||
363 | at91_set_A_periph(AT91_PIN_PA16, 0); | ||
364 | |||
365 | /* CMD */ | ||
366 | at91_set_A_periph(AT91_PIN_PA17, 1); | ||
367 | |||
368 | /* DAT0, maybe DAT1..DAT3 */ | ||
369 | at91_set_A_periph(AT91_PIN_PA18, 1); | ||
370 | if (data->wire4) { | ||
371 | at91_set_A_periph(AT91_PIN_PA19, 1); | ||
372 | at91_set_A_periph(AT91_PIN_PA20, 1); | ||
373 | at91_set_A_periph(AT91_PIN_PA21, 1); | ||
374 | } | ||
375 | |||
376 | mmc1_data = *data; | ||
377 | platform_device_register(&at91cap9_mmc1_device); | ||
378 | } | ||
379 | } | ||
380 | #else | ||
381 | void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {} | ||
382 | #endif | ||
383 | |||
384 | |||
385 | /* -------------------------------------------------------------------- | ||
386 | * NAND / SmartMedia | ||
387 | * -------------------------------------------------------------------- */ | ||
388 | |||
389 | #if defined(CONFIG_MTD_NAND_ATMEL) || defined(CONFIG_MTD_NAND_ATMEL_MODULE) | ||
390 | static struct atmel_nand_data nand_data; | ||
391 | |||
392 | #define NAND_BASE AT91_CHIPSELECT_3 | ||
393 | |||
394 | static struct resource nand_resources[] = { | ||
395 | [0] = { | ||
396 | .start = NAND_BASE, | ||
397 | .end = NAND_BASE + SZ_256M - 1, | ||
398 | .flags = IORESOURCE_MEM, | ||
399 | }, | ||
400 | [1] = { | ||
401 | .start = AT91CAP9_BASE_ECC, | ||
402 | .end = AT91CAP9_BASE_ECC + SZ_512 - 1, | ||
403 | .flags = IORESOURCE_MEM, | ||
404 | } | ||
405 | }; | ||
406 | |||
407 | static struct platform_device at91cap9_nand_device = { | ||
408 | .name = "atmel_nand", | ||
409 | .id = -1, | ||
410 | .dev = { | ||
411 | .platform_data = &nand_data, | ||
412 | }, | ||
413 | .resource = nand_resources, | ||
414 | .num_resources = ARRAY_SIZE(nand_resources), | ||
415 | }; | ||
416 | |||
417 | void __init at91_add_device_nand(struct atmel_nand_data *data) | ||
418 | { | ||
419 | unsigned long csa; | ||
420 | |||
421 | if (!data) | ||
422 | return; | ||
423 | |||
424 | csa = at91_sys_read(AT91_MATRIX_EBICSA); | ||
425 | at91_sys_write(AT91_MATRIX_EBICSA, csa | AT91_MATRIX_EBI_CS3A_SMC_SMARTMEDIA); | ||
426 | |||
427 | /* enable pin */ | ||
428 | if (gpio_is_valid(data->enable_pin)) | ||
429 | at91_set_gpio_output(data->enable_pin, 1); | ||
430 | |||
431 | /* ready/busy pin */ | ||
432 | if (gpio_is_valid(data->rdy_pin)) | ||
433 | at91_set_gpio_input(data->rdy_pin, 1); | ||
434 | |||
435 | /* card detect pin */ | ||
436 | if (gpio_is_valid(data->det_pin)) | ||
437 | at91_set_gpio_input(data->det_pin, 1); | ||
438 | |||
439 | nand_data = *data; | ||
440 | platform_device_register(&at91cap9_nand_device); | ||
441 | } | ||
442 | #else | ||
443 | void __init at91_add_device_nand(struct atmel_nand_data *data) {} | ||
444 | #endif | ||
445 | |||
446 | |||
447 | /* -------------------------------------------------------------------- | ||
448 | * TWI (i2c) | ||
449 | * -------------------------------------------------------------------- */ | ||
450 | |||
451 | /* | ||
452 | * Prefer the GPIO code since the TWI controller isn't robust | ||
453 | * (gets overruns and underruns under load) and can only issue | ||
454 | * repeated STARTs in one scenario (the driver doesn't yet handle them). | ||
455 | */ | ||
456 | #if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) | ||
457 | |||
458 | static struct i2c_gpio_platform_data pdata = { | ||
459 | .sda_pin = AT91_PIN_PB4, | ||
460 | .sda_is_open_drain = 1, | ||
461 | .scl_pin = AT91_PIN_PB5, | ||
462 | .scl_is_open_drain = 1, | ||
463 | .udelay = 2, /* ~100 kHz */ | ||
464 | }; | ||
465 | |||
466 | static struct platform_device at91cap9_twi_device = { | ||
467 | .name = "i2c-gpio", | ||
468 | .id = -1, | ||
469 | .dev.platform_data = &pdata, | ||
470 | }; | ||
471 | |||
472 | void __init at91_add_device_i2c(struct i2c_board_info *devices, int nr_devices) | ||
473 | { | ||
474 | at91_set_GPIO_periph(AT91_PIN_PB4, 1); /* TWD (SDA) */ | ||
475 | at91_set_multi_drive(AT91_PIN_PB4, 1); | ||
476 | |||
477 | at91_set_GPIO_periph(AT91_PIN_PB5, 1); /* TWCK (SCL) */ | ||
478 | at91_set_multi_drive(AT91_PIN_PB5, 1); | ||
479 | |||
480 | i2c_register_board_info(0, devices, nr_devices); | ||
481 | platform_device_register(&at91cap9_twi_device); | ||
482 | } | ||
483 | |||
484 | #elif defined(CONFIG_I2C_AT91) || defined(CONFIG_I2C_AT91_MODULE) | ||
485 | |||
486 | static struct resource twi_resources[] = { | ||
487 | [0] = { | ||
488 | .start = AT91CAP9_BASE_TWI, | ||
489 | .end = AT91CAP9_BASE_TWI + SZ_16K - 1, | ||
490 | .flags = IORESOURCE_MEM, | ||
491 | }, | ||
492 | [1] = { | ||
493 | .start = AT91CAP9_ID_TWI, | ||
494 | .end = AT91CAP9_ID_TWI, | ||
495 | .flags = IORESOURCE_IRQ, | ||
496 | }, | ||
497 | }; | ||
498 | |||
499 | static struct platform_device at91cap9_twi_device = { | ||
500 | .name = "at91_i2c", | ||
501 | .id = -1, | ||
502 | .resource = twi_resources, | ||
503 | .num_resources = ARRAY_SIZE(twi_resources), | ||
504 | }; | ||
505 | |||
506 | void __init at91_add_device_i2c(struct i2c_board_info *devices, int nr_devices) | ||
507 | { | ||
508 | /* pins used for TWI interface */ | ||
509 | at91_set_B_periph(AT91_PIN_PB4, 0); /* TWD */ | ||
510 | at91_set_multi_drive(AT91_PIN_PB4, 1); | ||
511 | |||
512 | at91_set_B_periph(AT91_PIN_PB5, 0); /* TWCK */ | ||
513 | at91_set_multi_drive(AT91_PIN_PB5, 1); | ||
514 | |||
515 | i2c_register_board_info(0, devices, nr_devices); | ||
516 | platform_device_register(&at91cap9_twi_device); | ||
517 | } | ||
518 | #else | ||
519 | void __init at91_add_device_i2c(struct i2c_board_info *devices, int nr_devices) {} | ||
520 | #endif | ||
521 | |||
522 | /* -------------------------------------------------------------------- | ||
523 | * SPI | ||
524 | * -------------------------------------------------------------------- */ | ||
525 | |||
526 | #if defined(CONFIG_SPI_ATMEL) || defined(CONFIG_SPI_ATMEL_MODULE) | ||
527 | static u64 spi_dmamask = DMA_BIT_MASK(32); | ||
528 | |||
529 | static struct resource spi0_resources[] = { | ||
530 | [0] = { | ||
531 | .start = AT91CAP9_BASE_SPI0, | ||
532 | .end = AT91CAP9_BASE_SPI0 + SZ_16K - 1, | ||
533 | .flags = IORESOURCE_MEM, | ||
534 | }, | ||
535 | [1] = { | ||
536 | .start = AT91CAP9_ID_SPI0, | ||
537 | .end = AT91CAP9_ID_SPI0, | ||
538 | .flags = IORESOURCE_IRQ, | ||
539 | }, | ||
540 | }; | ||
541 | |||
542 | static struct platform_device at91cap9_spi0_device = { | ||
543 | .name = "atmel_spi", | ||
544 | .id = 0, | ||
545 | .dev = { | ||
546 | .dma_mask = &spi_dmamask, | ||
547 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
548 | }, | ||
549 | .resource = spi0_resources, | ||
550 | .num_resources = ARRAY_SIZE(spi0_resources), | ||
551 | }; | ||
552 | |||
553 | static const unsigned spi0_standard_cs[4] = { AT91_PIN_PA5, AT91_PIN_PA3, AT91_PIN_PD0, AT91_PIN_PD1 }; | ||
554 | |||
555 | static struct resource spi1_resources[] = { | ||
556 | [0] = { | ||
557 | .start = AT91CAP9_BASE_SPI1, | ||
558 | .end = AT91CAP9_BASE_SPI1 + SZ_16K - 1, | ||
559 | .flags = IORESOURCE_MEM, | ||
560 | }, | ||
561 | [1] = { | ||
562 | .start = AT91CAP9_ID_SPI1, | ||
563 | .end = AT91CAP9_ID_SPI1, | ||
564 | .flags = IORESOURCE_IRQ, | ||
565 | }, | ||
566 | }; | ||
567 | |||
568 | static struct platform_device at91cap9_spi1_device = { | ||
569 | .name = "atmel_spi", | ||
570 | .id = 1, | ||
571 | .dev = { | ||
572 | .dma_mask = &spi_dmamask, | ||
573 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
574 | }, | ||
575 | .resource = spi1_resources, | ||
576 | .num_resources = ARRAY_SIZE(spi1_resources), | ||
577 | }; | ||
578 | |||
579 | static const unsigned spi1_standard_cs[4] = { AT91_PIN_PB15, AT91_PIN_PB16, AT91_PIN_PB17, AT91_PIN_PB18 }; | ||
580 | |||
581 | void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) | ||
582 | { | ||
583 | int i; | ||
584 | unsigned long cs_pin; | ||
585 | short enable_spi0 = 0; | ||
586 | short enable_spi1 = 0; | ||
587 | |||
588 | /* Choose SPI chip-selects */ | ||
589 | for (i = 0; i < nr_devices; i++) { | ||
590 | if (devices[i].controller_data) | ||
591 | cs_pin = (unsigned long) devices[i].controller_data; | ||
592 | else if (devices[i].bus_num == 0) | ||
593 | cs_pin = spi0_standard_cs[devices[i].chip_select]; | ||
594 | else | ||
595 | cs_pin = spi1_standard_cs[devices[i].chip_select]; | ||
596 | |||
597 | if (devices[i].bus_num == 0) | ||
598 | enable_spi0 = 1; | ||
599 | else | ||
600 | enable_spi1 = 1; | ||
601 | |||
602 | /* enable chip-select pin */ | ||
603 | at91_set_gpio_output(cs_pin, 1); | ||
604 | |||
605 | /* pass chip-select pin to driver */ | ||
606 | devices[i].controller_data = (void *) cs_pin; | ||
607 | } | ||
608 | |||
609 | spi_register_board_info(devices, nr_devices); | ||
610 | |||
611 | /* Configure SPI bus(es) */ | ||
612 | if (enable_spi0) { | ||
613 | at91_set_B_periph(AT91_PIN_PA0, 0); /* SPI0_MISO */ | ||
614 | at91_set_B_periph(AT91_PIN_PA1, 0); /* SPI0_MOSI */ | ||
615 | at91_set_B_periph(AT91_PIN_PA2, 0); /* SPI0_SPCK */ | ||
616 | |||
617 | platform_device_register(&at91cap9_spi0_device); | ||
618 | } | ||
619 | if (enable_spi1) { | ||
620 | at91_set_A_periph(AT91_PIN_PB12, 0); /* SPI1_MISO */ | ||
621 | at91_set_A_periph(AT91_PIN_PB13, 0); /* SPI1_MOSI */ | ||
622 | at91_set_A_periph(AT91_PIN_PB14, 0); /* SPI1_SPCK */ | ||
623 | |||
624 | platform_device_register(&at91cap9_spi1_device); | ||
625 | } | ||
626 | } | ||
627 | #else | ||
628 | void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) {} | ||
629 | #endif | ||
630 | |||
631 | |||
632 | /* -------------------------------------------------------------------- | ||
633 | * Timer/Counter block | ||
634 | * -------------------------------------------------------------------- */ | ||
635 | |||
636 | #ifdef CONFIG_ATMEL_TCLIB | ||
637 | |||
638 | static struct resource tcb_resources[] = { | ||
639 | [0] = { | ||
640 | .start = AT91CAP9_BASE_TCB0, | ||
641 | .end = AT91CAP9_BASE_TCB0 + SZ_16K - 1, | ||
642 | .flags = IORESOURCE_MEM, | ||
643 | }, | ||
644 | [1] = { | ||
645 | .start = AT91CAP9_ID_TCB, | ||
646 | .end = AT91CAP9_ID_TCB, | ||
647 | .flags = IORESOURCE_IRQ, | ||
648 | }, | ||
649 | }; | ||
650 | |||
651 | static struct platform_device at91cap9_tcb_device = { | ||
652 | .name = "atmel_tcb", | ||
653 | .id = 0, | ||
654 | .resource = tcb_resources, | ||
655 | .num_resources = ARRAY_SIZE(tcb_resources), | ||
656 | }; | ||
657 | |||
658 | static void __init at91_add_device_tc(void) | ||
659 | { | ||
660 | platform_device_register(&at91cap9_tcb_device); | ||
661 | } | ||
662 | #else | ||
663 | static void __init at91_add_device_tc(void) { } | ||
664 | #endif | ||
665 | |||
666 | |||
667 | /* -------------------------------------------------------------------- | ||
668 | * RTT | ||
669 | * -------------------------------------------------------------------- */ | ||
670 | |||
671 | static struct resource rtt_resources[] = { | ||
672 | { | ||
673 | .start = AT91CAP9_BASE_RTT, | ||
674 | .end = AT91CAP9_BASE_RTT + SZ_16 - 1, | ||
675 | .flags = IORESOURCE_MEM, | ||
676 | } | ||
677 | }; | ||
678 | |||
679 | static struct platform_device at91cap9_rtt_device = { | ||
680 | .name = "at91_rtt", | ||
681 | .id = 0, | ||
682 | .resource = rtt_resources, | ||
683 | .num_resources = ARRAY_SIZE(rtt_resources), | ||
684 | }; | ||
685 | |||
686 | static void __init at91_add_device_rtt(void) | ||
687 | { | ||
688 | platform_device_register(&at91cap9_rtt_device); | ||
689 | } | ||
690 | |||
691 | |||
692 | /* -------------------------------------------------------------------- | ||
693 | * Watchdog | ||
694 | * -------------------------------------------------------------------- */ | ||
695 | |||
696 | #if defined(CONFIG_AT91SAM9X_WATCHDOG) || defined(CONFIG_AT91SAM9X_WATCHDOG_MODULE) | ||
697 | static struct resource wdt_resources[] = { | ||
698 | { | ||
699 | .start = AT91CAP9_BASE_WDT, | ||
700 | .end = AT91CAP9_BASE_WDT + SZ_16 - 1, | ||
701 | .flags = IORESOURCE_MEM, | ||
702 | } | ||
703 | }; | ||
704 | |||
705 | static struct platform_device at91cap9_wdt_device = { | ||
706 | .name = "at91_wdt", | ||
707 | .id = -1, | ||
708 | .resource = wdt_resources, | ||
709 | .num_resources = ARRAY_SIZE(wdt_resources), | ||
710 | }; | ||
711 | |||
712 | static void __init at91_add_device_watchdog(void) | ||
713 | { | ||
714 | platform_device_register(&at91cap9_wdt_device); | ||
715 | } | ||
716 | #else | ||
717 | static void __init at91_add_device_watchdog(void) {} | ||
718 | #endif | ||
719 | |||
720 | |||
721 | /* -------------------------------------------------------------------- | ||
722 | * PWM | ||
723 | * --------------------------------------------------------------------*/ | ||
724 | |||
725 | #if defined(CONFIG_ATMEL_PWM) | ||
726 | static u32 pwm_mask; | ||
727 | |||
728 | static struct resource pwm_resources[] = { | ||
729 | [0] = { | ||
730 | .start = AT91CAP9_BASE_PWMC, | ||
731 | .end = AT91CAP9_BASE_PWMC + SZ_16K - 1, | ||
732 | .flags = IORESOURCE_MEM, | ||
733 | }, | ||
734 | [1] = { | ||
735 | .start = AT91CAP9_ID_PWMC, | ||
736 | .end = AT91CAP9_ID_PWMC, | ||
737 | .flags = IORESOURCE_IRQ, | ||
738 | }, | ||
739 | }; | ||
740 | |||
741 | static struct platform_device at91cap9_pwm0_device = { | ||
742 | .name = "atmel_pwm", | ||
743 | .id = -1, | ||
744 | .dev = { | ||
745 | .platform_data = &pwm_mask, | ||
746 | }, | ||
747 | .resource = pwm_resources, | ||
748 | .num_resources = ARRAY_SIZE(pwm_resources), | ||
749 | }; | ||
750 | |||
751 | void __init at91_add_device_pwm(u32 mask) | ||
752 | { | ||
753 | if (mask & (1 << AT91_PWM0)) | ||
754 | at91_set_A_periph(AT91_PIN_PB19, 1); /* enable PWM0 */ | ||
755 | |||
756 | if (mask & (1 << AT91_PWM1)) | ||
757 | at91_set_B_periph(AT91_PIN_PB8, 1); /* enable PWM1 */ | ||
758 | |||
759 | if (mask & (1 << AT91_PWM2)) | ||
760 | at91_set_B_periph(AT91_PIN_PC29, 1); /* enable PWM2 */ | ||
761 | |||
762 | if (mask & (1 << AT91_PWM3)) | ||
763 | at91_set_B_periph(AT91_PIN_PA11, 1); /* enable PWM3 */ | ||
764 | |||
765 | pwm_mask = mask; | ||
766 | |||
767 | platform_device_register(&at91cap9_pwm0_device); | ||
768 | } | ||
769 | #else | ||
770 | void __init at91_add_device_pwm(u32 mask) {} | ||
771 | #endif | ||
772 | |||
773 | |||
774 | |||
775 | /* -------------------------------------------------------------------- | ||
776 | * AC97 | ||
777 | * -------------------------------------------------------------------- */ | ||
778 | |||
779 | #if defined(CONFIG_SND_ATMEL_AC97C) || defined(CONFIG_SND_ATMEL_AC97C_MODULE) | ||
780 | static u64 ac97_dmamask = DMA_BIT_MASK(32); | ||
781 | static struct ac97c_platform_data ac97_data; | ||
782 | |||
783 | static struct resource ac97_resources[] = { | ||
784 | [0] = { | ||
785 | .start = AT91CAP9_BASE_AC97C, | ||
786 | .end = AT91CAP9_BASE_AC97C + SZ_16K - 1, | ||
787 | .flags = IORESOURCE_MEM, | ||
788 | }, | ||
789 | [1] = { | ||
790 | .start = AT91CAP9_ID_AC97C, | ||
791 | .end = AT91CAP9_ID_AC97C, | ||
792 | .flags = IORESOURCE_IRQ, | ||
793 | }, | ||
794 | }; | ||
795 | |||
796 | static struct platform_device at91cap9_ac97_device = { | ||
797 | .name = "atmel_ac97c", | ||
798 | .id = 1, | ||
799 | .dev = { | ||
800 | .dma_mask = &ac97_dmamask, | ||
801 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
802 | .platform_data = &ac97_data, | ||
803 | }, | ||
804 | .resource = ac97_resources, | ||
805 | .num_resources = ARRAY_SIZE(ac97_resources), | ||
806 | }; | ||
807 | |||
808 | void __init at91_add_device_ac97(struct ac97c_platform_data *data) | ||
809 | { | ||
810 | if (!data) | ||
811 | return; | ||
812 | |||
813 | at91_set_A_periph(AT91_PIN_PA6, 0); /* AC97FS */ | ||
814 | at91_set_A_periph(AT91_PIN_PA7, 0); /* AC97CK */ | ||
815 | at91_set_A_periph(AT91_PIN_PA8, 0); /* AC97TX */ | ||
816 | at91_set_A_periph(AT91_PIN_PA9, 0); /* AC97RX */ | ||
817 | |||
818 | /* reset */ | ||
819 | if (gpio_is_valid(data->reset_pin)) | ||
820 | at91_set_gpio_output(data->reset_pin, 0); | ||
821 | |||
822 | ac97_data = *data; | ||
823 | platform_device_register(&at91cap9_ac97_device); | ||
824 | } | ||
825 | #else | ||
826 | void __init at91_add_device_ac97(struct ac97c_platform_data *data) {} | ||
827 | #endif | ||
828 | |||
829 | |||
830 | /* -------------------------------------------------------------------- | ||
831 | * LCD Controller | ||
832 | * -------------------------------------------------------------------- */ | ||
833 | |||
834 | #if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE) | ||
835 | static u64 lcdc_dmamask = DMA_BIT_MASK(32); | ||
836 | static struct atmel_lcdfb_info lcdc_data; | ||
837 | |||
838 | static struct resource lcdc_resources[] = { | ||
839 | [0] = { | ||
840 | .start = AT91CAP9_LCDC_BASE, | ||
841 | .end = AT91CAP9_LCDC_BASE + SZ_4K - 1, | ||
842 | .flags = IORESOURCE_MEM, | ||
843 | }, | ||
844 | [1] = { | ||
845 | .start = AT91CAP9_ID_LCDC, | ||
846 | .end = AT91CAP9_ID_LCDC, | ||
847 | .flags = IORESOURCE_IRQ, | ||
848 | }, | ||
849 | }; | ||
850 | |||
851 | static struct platform_device at91_lcdc_device = { | ||
852 | .name = "atmel_lcdfb", | ||
853 | .id = 0, | ||
854 | .dev = { | ||
855 | .dma_mask = &lcdc_dmamask, | ||
856 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
857 | .platform_data = &lcdc_data, | ||
858 | }, | ||
859 | .resource = lcdc_resources, | ||
860 | .num_resources = ARRAY_SIZE(lcdc_resources), | ||
861 | }; | ||
862 | |||
863 | void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data) | ||
864 | { | ||
865 | if (!data) | ||
866 | return; | ||
867 | |||
868 | if (cpu_is_at91cap9_revB()) | ||
869 | irq_set_irq_type(AT91CAP9_ID_LCDC, IRQ_TYPE_LEVEL_HIGH); | ||
870 | |||
871 | at91_set_A_periph(AT91_PIN_PC1, 0); /* LCDHSYNC */ | ||
872 | at91_set_A_periph(AT91_PIN_PC2, 0); /* LCDDOTCK */ | ||
873 | at91_set_A_periph(AT91_PIN_PC3, 0); /* LCDDEN */ | ||
874 | at91_set_B_periph(AT91_PIN_PB9, 0); /* LCDCC */ | ||
875 | at91_set_A_periph(AT91_PIN_PC6, 0); /* LCDD2 */ | ||
876 | at91_set_A_periph(AT91_PIN_PC7, 0); /* LCDD3 */ | ||
877 | at91_set_A_periph(AT91_PIN_PC8, 0); /* LCDD4 */ | ||
878 | at91_set_A_periph(AT91_PIN_PC9, 0); /* LCDD5 */ | ||
879 | at91_set_A_periph(AT91_PIN_PC10, 0); /* LCDD6 */ | ||
880 | at91_set_A_periph(AT91_PIN_PC11, 0); /* LCDD7 */ | ||
881 | at91_set_A_periph(AT91_PIN_PC14, 0); /* LCDD10 */ | ||
882 | at91_set_A_periph(AT91_PIN_PC15, 0); /* LCDD11 */ | ||
883 | at91_set_A_periph(AT91_PIN_PC16, 0); /* LCDD12 */ | ||
884 | at91_set_A_periph(AT91_PIN_PC17, 0); /* LCDD13 */ | ||
885 | at91_set_A_periph(AT91_PIN_PC18, 0); /* LCDD14 */ | ||
886 | at91_set_A_periph(AT91_PIN_PC19, 0); /* LCDD15 */ | ||
887 | at91_set_A_periph(AT91_PIN_PC22, 0); /* LCDD18 */ | ||
888 | at91_set_A_periph(AT91_PIN_PC23, 0); /* LCDD19 */ | ||
889 | at91_set_A_periph(AT91_PIN_PC24, 0); /* LCDD20 */ | ||
890 | at91_set_A_periph(AT91_PIN_PC25, 0); /* LCDD21 */ | ||
891 | at91_set_A_periph(AT91_PIN_PC26, 0); /* LCDD22 */ | ||
892 | at91_set_A_periph(AT91_PIN_PC27, 0); /* LCDD23 */ | ||
893 | |||
894 | lcdc_data = *data; | ||
895 | platform_device_register(&at91_lcdc_device); | ||
896 | } | ||
897 | #else | ||
898 | void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data) {} | ||
899 | #endif | ||
900 | |||
901 | |||
902 | /* -------------------------------------------------------------------- | ||
903 | * SSC -- Synchronous Serial Controller | ||
904 | * -------------------------------------------------------------------- */ | ||
905 | |||
906 | #if defined(CONFIG_ATMEL_SSC) || defined(CONFIG_ATMEL_SSC_MODULE) | ||
907 | static u64 ssc0_dmamask = DMA_BIT_MASK(32); | ||
908 | |||
909 | static struct resource ssc0_resources[] = { | ||
910 | [0] = { | ||
911 | .start = AT91CAP9_BASE_SSC0, | ||
912 | .end = AT91CAP9_BASE_SSC0 + SZ_16K - 1, | ||
913 | .flags = IORESOURCE_MEM, | ||
914 | }, | ||
915 | [1] = { | ||
916 | .start = AT91CAP9_ID_SSC0, | ||
917 | .end = AT91CAP9_ID_SSC0, | ||
918 | .flags = IORESOURCE_IRQ, | ||
919 | }, | ||
920 | }; | ||
921 | |||
922 | static struct platform_device at91cap9_ssc0_device = { | ||
923 | .name = "ssc", | ||
924 | .id = 0, | ||
925 | .dev = { | ||
926 | .dma_mask = &ssc0_dmamask, | ||
927 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
928 | }, | ||
929 | .resource = ssc0_resources, | ||
930 | .num_resources = ARRAY_SIZE(ssc0_resources), | ||
931 | }; | ||
932 | |||
933 | static inline void configure_ssc0_pins(unsigned pins) | ||
934 | { | ||
935 | if (pins & ATMEL_SSC_TF) | ||
936 | at91_set_A_periph(AT91_PIN_PB0, 1); | ||
937 | if (pins & ATMEL_SSC_TK) | ||
938 | at91_set_A_periph(AT91_PIN_PB1, 1); | ||
939 | if (pins & ATMEL_SSC_TD) | ||
940 | at91_set_A_periph(AT91_PIN_PB2, 1); | ||
941 | if (pins & ATMEL_SSC_RD) | ||
942 | at91_set_A_periph(AT91_PIN_PB3, 1); | ||
943 | if (pins & ATMEL_SSC_RK) | ||
944 | at91_set_A_periph(AT91_PIN_PB4, 1); | ||
945 | if (pins & ATMEL_SSC_RF) | ||
946 | at91_set_A_periph(AT91_PIN_PB5, 1); | ||
947 | } | ||
948 | |||
949 | static u64 ssc1_dmamask = DMA_BIT_MASK(32); | ||
950 | |||
951 | static struct resource ssc1_resources[] = { | ||
952 | [0] = { | ||
953 | .start = AT91CAP9_BASE_SSC1, | ||
954 | .end = AT91CAP9_BASE_SSC1 + SZ_16K - 1, | ||
955 | .flags = IORESOURCE_MEM, | ||
956 | }, | ||
957 | [1] = { | ||
958 | .start = AT91CAP9_ID_SSC1, | ||
959 | .end = AT91CAP9_ID_SSC1, | ||
960 | .flags = IORESOURCE_IRQ, | ||
961 | }, | ||
962 | }; | ||
963 | |||
964 | static struct platform_device at91cap9_ssc1_device = { | ||
965 | .name = "ssc", | ||
966 | .id = 1, | ||
967 | .dev = { | ||
968 | .dma_mask = &ssc1_dmamask, | ||
969 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
970 | }, | ||
971 | .resource = ssc1_resources, | ||
972 | .num_resources = ARRAY_SIZE(ssc1_resources), | ||
973 | }; | ||
974 | |||
975 | static inline void configure_ssc1_pins(unsigned pins) | ||
976 | { | ||
977 | if (pins & ATMEL_SSC_TF) | ||
978 | at91_set_A_periph(AT91_PIN_PB6, 1); | ||
979 | if (pins & ATMEL_SSC_TK) | ||
980 | at91_set_A_periph(AT91_PIN_PB7, 1); | ||
981 | if (pins & ATMEL_SSC_TD) | ||
982 | at91_set_A_periph(AT91_PIN_PB8, 1); | ||
983 | if (pins & ATMEL_SSC_RD) | ||
984 | at91_set_A_periph(AT91_PIN_PB9, 1); | ||
985 | if (pins & ATMEL_SSC_RK) | ||
986 | at91_set_A_periph(AT91_PIN_PB10, 1); | ||
987 | if (pins & ATMEL_SSC_RF) | ||
988 | at91_set_A_periph(AT91_PIN_PB11, 1); | ||
989 | } | ||
990 | |||
991 | /* | ||
992 | * SSC controllers are accessed through library code, instead of any | ||
993 | * kind of all-singing/all-dancing driver. For example one could be | ||
994 | * used by a particular I2S audio codec's driver, while another one | ||
995 | * on the same system might be used by a custom data capture driver. | ||
996 | */ | ||
997 | void __init at91_add_device_ssc(unsigned id, unsigned pins) | ||
998 | { | ||
999 | struct platform_device *pdev; | ||
1000 | |||
1001 | /* | ||
1002 | * NOTE: caller is responsible for passing information matching | ||
1003 | * "pins" to whatever will be using each particular controller. | ||
1004 | */ | ||
1005 | switch (id) { | ||
1006 | case AT91CAP9_ID_SSC0: | ||
1007 | pdev = &at91cap9_ssc0_device; | ||
1008 | configure_ssc0_pins(pins); | ||
1009 | break; | ||
1010 | case AT91CAP9_ID_SSC1: | ||
1011 | pdev = &at91cap9_ssc1_device; | ||
1012 | configure_ssc1_pins(pins); | ||
1013 | break; | ||
1014 | default: | ||
1015 | return; | ||
1016 | } | ||
1017 | |||
1018 | platform_device_register(pdev); | ||
1019 | } | ||
1020 | |||
1021 | #else | ||
1022 | void __init at91_add_device_ssc(unsigned id, unsigned pins) {} | ||
1023 | #endif | ||
1024 | |||
1025 | |||
1026 | /* -------------------------------------------------------------------- | ||
1027 | * UART | ||
1028 | * -------------------------------------------------------------------- */ | ||
1029 | |||
1030 | #if defined(CONFIG_SERIAL_ATMEL) | ||
1031 | static struct resource dbgu_resources[] = { | ||
1032 | [0] = { | ||
1033 | .start = AT91CAP9_BASE_DBGU, | ||
1034 | .end = AT91CAP9_BASE_DBGU + SZ_512 - 1, | ||
1035 | .flags = IORESOURCE_MEM, | ||
1036 | }, | ||
1037 | [1] = { | ||
1038 | .start = AT91_ID_SYS, | ||
1039 | .end = AT91_ID_SYS, | ||
1040 | .flags = IORESOURCE_IRQ, | ||
1041 | }, | ||
1042 | }; | ||
1043 | |||
1044 | static struct atmel_uart_data dbgu_data = { | ||
1045 | .use_dma_tx = 0, | ||
1046 | .use_dma_rx = 0, /* DBGU not capable of receive DMA */ | ||
1047 | }; | ||
1048 | |||
1049 | static u64 dbgu_dmamask = DMA_BIT_MASK(32); | ||
1050 | |||
1051 | static struct platform_device at91cap9_dbgu_device = { | ||
1052 | .name = "atmel_usart", | ||
1053 | .id = 0, | ||
1054 | .dev = { | ||
1055 | .dma_mask = &dbgu_dmamask, | ||
1056 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
1057 | .platform_data = &dbgu_data, | ||
1058 | }, | ||
1059 | .resource = dbgu_resources, | ||
1060 | .num_resources = ARRAY_SIZE(dbgu_resources), | ||
1061 | }; | ||
1062 | |||
1063 | static inline void configure_dbgu_pins(void) | ||
1064 | { | ||
1065 | at91_set_A_periph(AT91_PIN_PC30, 0); /* DRXD */ | ||
1066 | at91_set_A_periph(AT91_PIN_PC31, 1); /* DTXD */ | ||
1067 | } | ||
1068 | |||
1069 | static struct resource uart0_resources[] = { | ||
1070 | [0] = { | ||
1071 | .start = AT91CAP9_BASE_US0, | ||
1072 | .end = AT91CAP9_BASE_US0 + SZ_16K - 1, | ||
1073 | .flags = IORESOURCE_MEM, | ||
1074 | }, | ||
1075 | [1] = { | ||
1076 | .start = AT91CAP9_ID_US0, | ||
1077 | .end = AT91CAP9_ID_US0, | ||
1078 | .flags = IORESOURCE_IRQ, | ||
1079 | }, | ||
1080 | }; | ||
1081 | |||
1082 | static struct atmel_uart_data uart0_data = { | ||
1083 | .use_dma_tx = 1, | ||
1084 | .use_dma_rx = 1, | ||
1085 | }; | ||
1086 | |||
1087 | static u64 uart0_dmamask = DMA_BIT_MASK(32); | ||
1088 | |||
1089 | static struct platform_device at91cap9_uart0_device = { | ||
1090 | .name = "atmel_usart", | ||
1091 | .id = 1, | ||
1092 | .dev = { | ||
1093 | .dma_mask = &uart0_dmamask, | ||
1094 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
1095 | .platform_data = &uart0_data, | ||
1096 | }, | ||
1097 | .resource = uart0_resources, | ||
1098 | .num_resources = ARRAY_SIZE(uart0_resources), | ||
1099 | }; | ||
1100 | |||
1101 | static inline void configure_usart0_pins(unsigned pins) | ||
1102 | { | ||
1103 | at91_set_A_periph(AT91_PIN_PA22, 1); /* TXD0 */ | ||
1104 | at91_set_A_periph(AT91_PIN_PA23, 0); /* RXD0 */ | ||
1105 | |||
1106 | if (pins & ATMEL_UART_RTS) | ||
1107 | at91_set_A_periph(AT91_PIN_PA24, 0); /* RTS0 */ | ||
1108 | if (pins & ATMEL_UART_CTS) | ||
1109 | at91_set_A_periph(AT91_PIN_PA25, 0); /* CTS0 */ | ||
1110 | } | ||
1111 | |||
1112 | static struct resource uart1_resources[] = { | ||
1113 | [0] = { | ||
1114 | .start = AT91CAP9_BASE_US1, | ||
1115 | .end = AT91CAP9_BASE_US1 + SZ_16K - 1, | ||
1116 | .flags = IORESOURCE_MEM, | ||
1117 | }, | ||
1118 | [1] = { | ||
1119 | .start = AT91CAP9_ID_US1, | ||
1120 | .end = AT91CAP9_ID_US1, | ||
1121 | .flags = IORESOURCE_IRQ, | ||
1122 | }, | ||
1123 | }; | ||
1124 | |||
1125 | static struct atmel_uart_data uart1_data = { | ||
1126 | .use_dma_tx = 1, | ||
1127 | .use_dma_rx = 1, | ||
1128 | }; | ||
1129 | |||
1130 | static u64 uart1_dmamask = DMA_BIT_MASK(32); | ||
1131 | |||
1132 | static struct platform_device at91cap9_uart1_device = { | ||
1133 | .name = "atmel_usart", | ||
1134 | .id = 2, | ||
1135 | .dev = { | ||
1136 | .dma_mask = &uart1_dmamask, | ||
1137 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
1138 | .platform_data = &uart1_data, | ||
1139 | }, | ||
1140 | .resource = uart1_resources, | ||
1141 | .num_resources = ARRAY_SIZE(uart1_resources), | ||
1142 | }; | ||
1143 | |||
1144 | static inline void configure_usart1_pins(unsigned pins) | ||
1145 | { | ||
1146 | at91_set_A_periph(AT91_PIN_PD0, 1); /* TXD1 */ | ||
1147 | at91_set_A_periph(AT91_PIN_PD1, 0); /* RXD1 */ | ||
1148 | |||
1149 | if (pins & ATMEL_UART_RTS) | ||
1150 | at91_set_B_periph(AT91_PIN_PD7, 0); /* RTS1 */ | ||
1151 | if (pins & ATMEL_UART_CTS) | ||
1152 | at91_set_B_periph(AT91_PIN_PD8, 0); /* CTS1 */ | ||
1153 | } | ||
1154 | |||
1155 | static struct resource uart2_resources[] = { | ||
1156 | [0] = { | ||
1157 | .start = AT91CAP9_BASE_US2, | ||
1158 | .end = AT91CAP9_BASE_US2 + SZ_16K - 1, | ||
1159 | .flags = IORESOURCE_MEM, | ||
1160 | }, | ||
1161 | [1] = { | ||
1162 | .start = AT91CAP9_ID_US2, | ||
1163 | .end = AT91CAP9_ID_US2, | ||
1164 | .flags = IORESOURCE_IRQ, | ||
1165 | }, | ||
1166 | }; | ||
1167 | |||
1168 | static struct atmel_uart_data uart2_data = { | ||
1169 | .use_dma_tx = 1, | ||
1170 | .use_dma_rx = 1, | ||
1171 | }; | ||
1172 | |||
1173 | static u64 uart2_dmamask = DMA_BIT_MASK(32); | ||
1174 | |||
1175 | static struct platform_device at91cap9_uart2_device = { | ||
1176 | .name = "atmel_usart", | ||
1177 | .id = 3, | ||
1178 | .dev = { | ||
1179 | .dma_mask = &uart2_dmamask, | ||
1180 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
1181 | .platform_data = &uart2_data, | ||
1182 | }, | ||
1183 | .resource = uart2_resources, | ||
1184 | .num_resources = ARRAY_SIZE(uart2_resources), | ||
1185 | }; | ||
1186 | |||
1187 | static inline void configure_usart2_pins(unsigned pins) | ||
1188 | { | ||
1189 | at91_set_A_periph(AT91_PIN_PD2, 1); /* TXD2 */ | ||
1190 | at91_set_A_periph(AT91_PIN_PD3, 0); /* RXD2 */ | ||
1191 | |||
1192 | if (pins & ATMEL_UART_RTS) | ||
1193 | at91_set_B_periph(AT91_PIN_PD5, 0); /* RTS2 */ | ||
1194 | if (pins & ATMEL_UART_CTS) | ||
1195 | at91_set_B_periph(AT91_PIN_PD6, 0); /* CTS2 */ | ||
1196 | } | ||
1197 | |||
1198 | static struct platform_device *__initdata at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */ | ||
1199 | struct platform_device *atmel_default_console_device; /* the serial console device */ | ||
1200 | |||
1201 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | ||
1202 | { | ||
1203 | struct platform_device *pdev; | ||
1204 | struct atmel_uart_data *pdata; | ||
1205 | |||
1206 | switch (id) { | ||
1207 | case 0: /* DBGU */ | ||
1208 | pdev = &at91cap9_dbgu_device; | ||
1209 | configure_dbgu_pins(); | ||
1210 | break; | ||
1211 | case AT91CAP9_ID_US0: | ||
1212 | pdev = &at91cap9_uart0_device; | ||
1213 | configure_usart0_pins(pins); | ||
1214 | break; | ||
1215 | case AT91CAP9_ID_US1: | ||
1216 | pdev = &at91cap9_uart1_device; | ||
1217 | configure_usart1_pins(pins); | ||
1218 | break; | ||
1219 | case AT91CAP9_ID_US2: | ||
1220 | pdev = &at91cap9_uart2_device; | ||
1221 | configure_usart2_pins(pins); | ||
1222 | break; | ||
1223 | default: | ||
1224 | return; | ||
1225 | } | ||
1226 | pdata = pdev->dev.platform_data; | ||
1227 | pdata->num = portnr; /* update to mapped ID */ | ||
1228 | |||
1229 | if (portnr < ATMEL_MAX_UART) | ||
1230 | at91_uarts[portnr] = pdev; | ||
1231 | } | ||
1232 | |||
1233 | void __init at91_set_serial_console(unsigned portnr) | ||
1234 | { | ||
1235 | if (portnr < ATMEL_MAX_UART) { | ||
1236 | atmel_default_console_device = at91_uarts[portnr]; | ||
1237 | at91cap9_set_console_clock(at91_uarts[portnr]->id); | ||
1238 | } | ||
1239 | } | ||
1240 | |||
1241 | void __init at91_add_device_serial(void) | ||
1242 | { | ||
1243 | int i; | ||
1244 | |||
1245 | for (i = 0; i < ATMEL_MAX_UART; i++) { | ||
1246 | if (at91_uarts[i]) | ||
1247 | platform_device_register(at91_uarts[i]); | ||
1248 | } | ||
1249 | |||
1250 | if (!atmel_default_console_device) | ||
1251 | printk(KERN_INFO "AT91: No default serial console defined.\n"); | ||
1252 | } | ||
1253 | #else | ||
1254 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} | ||
1255 | void __init at91_set_serial_console(unsigned portnr) {} | ||
1256 | void __init at91_add_device_serial(void) {} | ||
1257 | #endif | ||
1258 | |||
1259 | |||
1260 | /* -------------------------------------------------------------------- */ | ||
1261 | /* | ||
1262 | * These devices are always present and don't need any board-specific | ||
1263 | * setup. | ||
1264 | */ | ||
1265 | static int __init at91_add_standard_devices(void) | ||
1266 | { | ||
1267 | at91_add_device_rtt(); | ||
1268 | at91_add_device_watchdog(); | ||
1269 | at91_add_device_tc(); | ||
1270 | return 0; | ||
1271 | } | ||
1272 | |||
1273 | arch_initcall(at91_add_standard_devices); | ||
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c index 18bacec2b094..97676bdae998 100644 --- a/arch/arm/mach-at91/at91rm9200_devices.c +++ b/arch/arm/mach-at91/at91rm9200_devices.c | |||
@@ -83,7 +83,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data) {} | |||
83 | * USB Device (Gadget) | 83 | * USB Device (Gadget) |
84 | * -------------------------------------------------------------------- */ | 84 | * -------------------------------------------------------------------- */ |
85 | 85 | ||
86 | #ifdef CONFIG_USB_AT91 | 86 | #if defined(CONFIG_USB_AT91) || defined(CONFIG_USB_AT91_MODULE) |
87 | static struct at91_udc_data udc_data; | 87 | static struct at91_udc_data udc_data; |
88 | 88 | ||
89 | static struct resource udc_resources[] = { | 89 | static struct resource udc_resources[] = { |
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c index 642ccb6d26b2..5a24f0b4554d 100644 --- a/arch/arm/mach-at91/at91sam9260_devices.c +++ b/arch/arm/mach-at91/at91sam9260_devices.c | |||
@@ -84,7 +84,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data) {} | |||
84 | * USB Device (Gadget) | 84 | * USB Device (Gadget) |
85 | * -------------------------------------------------------------------- */ | 85 | * -------------------------------------------------------------------- */ |
86 | 86 | ||
87 | #ifdef CONFIG_USB_AT91 | 87 | #if defined(CONFIG_USB_AT91) || defined(CONFIG_USB_AT91_MODULE) |
88 | static struct at91_udc_data udc_data; | 88 | static struct at91_udc_data udc_data; |
89 | 89 | ||
90 | static struct resource udc_resources[] = { | 90 | static struct resource udc_resources[] = { |
@@ -1215,8 +1215,7 @@ void __init at91_add_device_serial(void) {} | |||
1215 | * CF/IDE | 1215 | * CF/IDE |
1216 | * -------------------------------------------------------------------- */ | 1216 | * -------------------------------------------------------------------- */ |
1217 | 1217 | ||
1218 | #if defined(CONFIG_BLK_DEV_IDE_AT91) || defined(CONFIG_BLK_DEV_IDE_AT91_MODULE) || \ | 1218 | #if defined(CONFIG_PATA_AT91) || defined(CONFIG_PATA_AT91_MODULE) || \ |
1219 | defined(CONFIG_PATA_AT91) || defined(CONFIG_PATA_AT91_MODULE) || \ | ||
1220 | defined(CONFIG_AT91_CF) || defined(CONFIG_AT91_CF_MODULE) | 1219 | defined(CONFIG_AT91_CF) || defined(CONFIG_AT91_CF_MODULE) |
1221 | 1220 | ||
1222 | static struct at91_cf_data cf0_data; | 1221 | static struct at91_cf_data cf0_data; |
@@ -1313,10 +1312,8 @@ void __init at91_add_device_cf(struct at91_cf_data *data) | |||
1313 | if (data->flags & AT91_CF_TRUE_IDE) | 1312 | if (data->flags & AT91_CF_TRUE_IDE) |
1314 | #if defined(CONFIG_PATA_AT91) || defined(CONFIG_PATA_AT91_MODULE) | 1313 | #if defined(CONFIG_PATA_AT91) || defined(CONFIG_PATA_AT91_MODULE) |
1315 | pdev->name = "pata_at91"; | 1314 | pdev->name = "pata_at91"; |
1316 | #elif defined(CONFIG_BLK_DEV_IDE_AT91) || defined(CONFIG_BLK_DEV_IDE_AT91_MODULE) | ||
1317 | pdev->name = "at91_ide"; | ||
1318 | #else | 1315 | #else |
1319 | #warning "board requires AT91_CF_TRUE_IDE: enable either at91_ide or pata_at91" | 1316 | #warning "board requires AT91_CF_TRUE_IDE: enable pata_at91" |
1320 | #endif | 1317 | #endif |
1321 | else | 1318 | else |
1322 | pdev->name = "at91_cf"; | 1319 | pdev->name = "at91_cf"; |
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c index fc59cbdb0e3c..1e28bed8f425 100644 --- a/arch/arm/mach-at91/at91sam9261_devices.c +++ b/arch/arm/mach-at91/at91sam9261_devices.c | |||
@@ -87,7 +87,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data) {} | |||
87 | * USB Device (Gadget) | 87 | * USB Device (Gadget) |
88 | * -------------------------------------------------------------------- */ | 88 | * -------------------------------------------------------------------- */ |
89 | 89 | ||
90 | #ifdef CONFIG_USB_AT91 | 90 | #if defined(CONFIG_USB_AT91) || defined(CONFIG_USB_AT91_MODULE) |
91 | static struct at91_udc_data udc_data; | 91 | static struct at91_udc_data udc_data; |
92 | 92 | ||
93 | static struct resource udc_resources[] = { | 93 | static struct resource udc_resources[] = { |
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c index 7b46b2787022..366a7765635b 100644 --- a/arch/arm/mach-at91/at91sam9263_devices.c +++ b/arch/arm/mach-at91/at91sam9263_devices.c | |||
@@ -92,7 +92,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data) {} | |||
92 | * USB Device (Gadget) | 92 | * USB Device (Gadget) |
93 | * -------------------------------------------------------------------- */ | 93 | * -------------------------------------------------------------------- */ |
94 | 94 | ||
95 | #ifdef CONFIG_USB_AT91 | 95 | #if defined(CONFIG_USB_AT91) || defined(CONFIG_USB_AT91_MODULE) |
96 | static struct at91_udc_data udc_data; | 96 | static struct at91_udc_data udc_data; |
97 | 97 | ||
98 | static struct resource udc_resources[] = { | 98 | static struct resource udc_resources[] = { |
@@ -355,8 +355,8 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {} | |||
355 | * Compact Flash (PCMCIA or IDE) | 355 | * Compact Flash (PCMCIA or IDE) |
356 | * -------------------------------------------------------------------- */ | 356 | * -------------------------------------------------------------------- */ |
357 | 357 | ||
358 | #if defined(CONFIG_AT91_CF) || defined(CONFIG_AT91_CF_MODULE) || \ | 358 | #if defined(CONFIG_PATA_AT91) || defined(CONFIG_PATA_AT91_MODULE) || \ |
359 | defined(CONFIG_BLK_DEV_IDE_AT91) || defined(CONFIG_BLK_DEV_IDE_AT91_MODULE) | 359 | defined(CONFIG_AT91_CF) || defined(CONFIG_AT91_CF_MODULE) |
360 | 360 | ||
361 | static struct at91_cf_data cf0_data; | 361 | static struct at91_cf_data cf0_data; |
362 | 362 | ||
@@ -450,7 +450,7 @@ void __init at91_add_device_cf(struct at91_cf_data *data) | |||
450 | at91_set_A_periph(AT91_PIN_PD9, 0); /* CFCE2 */ | 450 | at91_set_A_periph(AT91_PIN_PD9, 0); /* CFCE2 */ |
451 | at91_set_A_periph(AT91_PIN_PD14, 0); /* CFNRW */ | 451 | at91_set_A_periph(AT91_PIN_PD14, 0); /* CFNRW */ |
452 | 452 | ||
453 | pdev->name = (data->flags & AT91_CF_TRUE_IDE) ? "at91_ide" : "at91_cf"; | 453 | pdev->name = (data->flags & AT91_CF_TRUE_IDE) ? "pata_at91" : "at91_cf"; |
454 | platform_device_register(pdev); | 454 | platform_device_register(pdev); |
455 | } | 455 | } |
456 | #else | 456 | #else |
diff --git a/arch/arm/mach-at91/board-cap9adk.c b/arch/arm/mach-at91/board-cap9adk.c deleted file mode 100644 index ac3de4f7c31d..000000000000 --- a/arch/arm/mach-at91/board-cap9adk.c +++ /dev/null | |||
@@ -1,396 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-at91/board-cap9adk.c | ||
3 | * | ||
4 | * Copyright (C) 2007 Stelian Pop <stelian.pop@leadtechdesign.com> | ||
5 | * Copyright (C) 2007 Lead Tech Design <www.leadtechdesign.com> | ||
6 | * Copyright (C) 2005 SAN People | ||
7 | * Copyright (C) 2007 Atmel Corporation. | ||
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 | |||
24 | #include <linux/types.h> | ||
25 | #include <linux/gpio.h> | ||
26 | #include <linux/init.h> | ||
27 | #include <linux/mm.h> | ||
28 | #include <linux/module.h> | ||
29 | #include <linux/platform_device.h> | ||
30 | #include <linux/spi/spi.h> | ||
31 | #include <linux/spi/ads7846.h> | ||
32 | #include <linux/fb.h> | ||
33 | #include <linux/mtd/physmap.h> | ||
34 | |||
35 | #include <video/atmel_lcdc.h> | ||
36 | |||
37 | #include <mach/hardware.h> | ||
38 | #include <asm/setup.h> | ||
39 | #include <asm/mach-types.h> | ||
40 | |||
41 | #include <asm/mach/arch.h> | ||
42 | #include <asm/mach/map.h> | ||
43 | |||
44 | #include <mach/board.h> | ||
45 | #include <mach/at91cap9_matrix.h> | ||
46 | #include <mach/at91sam9_smc.h> | ||
47 | #include <mach/system_rev.h> | ||
48 | |||
49 | #include "sam9_smc.h" | ||
50 | #include "generic.h" | ||
51 | |||
52 | |||
53 | static void __init cap9adk_init_early(void) | ||
54 | { | ||
55 | /* Initialize processor: 12 MHz crystal */ | ||
56 | at91_initialize(12000000); | ||
57 | |||
58 | /* Setup the LEDs: USER1 and USER2 LED for cpu/timer... */ | ||
59 | at91_init_leds(AT91_PIN_PA10, AT91_PIN_PA11); | ||
60 | /* ... POWER LED always on */ | ||
61 | at91_set_gpio_output(AT91_PIN_PC29, 1); | ||
62 | |||
63 | /* Setup the serial ports and console */ | ||
64 | at91_register_uart(0, 0, 0); /* DBGU = ttyS0 */ | ||
65 | at91_set_serial_console(0); | ||
66 | } | ||
67 | |||
68 | /* | ||
69 | * USB Host port | ||
70 | */ | ||
71 | static struct at91_usbh_data __initdata cap9adk_usbh_data = { | ||
72 | .ports = 2, | ||
73 | .vbus_pin = {-EINVAL, -EINVAL}, | ||
74 | .overcurrent_pin= {-EINVAL, -EINVAL}, | ||
75 | }; | ||
76 | |||
77 | /* | ||
78 | * USB HS Device port | ||
79 | */ | ||
80 | static struct usba_platform_data __initdata cap9adk_usba_udc_data = { | ||
81 | .vbus_pin = AT91_PIN_PB31, | ||
82 | }; | ||
83 | |||
84 | /* | ||
85 | * ADS7846 Touchscreen | ||
86 | */ | ||
87 | #if defined(CONFIG_TOUCHSCREEN_ADS7846) || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) | ||
88 | static int ads7843_pendown_state(void) | ||
89 | { | ||
90 | return !at91_get_gpio_value(AT91_PIN_PC4); /* Touchscreen PENIRQ */ | ||
91 | } | ||
92 | |||
93 | static struct ads7846_platform_data ads_info = { | ||
94 | .model = 7843, | ||
95 | .x_min = 150, | ||
96 | .x_max = 3830, | ||
97 | .y_min = 190, | ||
98 | .y_max = 3830, | ||
99 | .vref_delay_usecs = 100, | ||
100 | .x_plate_ohms = 450, | ||
101 | .y_plate_ohms = 250, | ||
102 | .pressure_max = 15000, | ||
103 | .debounce_max = 1, | ||
104 | .debounce_rep = 0, | ||
105 | .debounce_tol = (~0), | ||
106 | .get_pendown_state = ads7843_pendown_state, | ||
107 | }; | ||
108 | |||
109 | static void __init cap9adk_add_device_ts(void) | ||
110 | { | ||
111 | at91_set_gpio_input(AT91_PIN_PC4, 1); /* Touchscreen PENIRQ */ | ||
112 | at91_set_gpio_input(AT91_PIN_PC5, 1); /* Touchscreen BUSY */ | ||
113 | } | ||
114 | #else | ||
115 | static void __init cap9adk_add_device_ts(void) {} | ||
116 | #endif | ||
117 | |||
118 | |||
119 | /* | ||
120 | * SPI devices. | ||
121 | */ | ||
122 | static struct spi_board_info cap9adk_spi_devices[] = { | ||
123 | #if defined(CONFIG_MTD_AT91_DATAFLASH_CARD) | ||
124 | { /* DataFlash card */ | ||
125 | .modalias = "mtd_dataflash", | ||
126 | .chip_select = 0, | ||
127 | .max_speed_hz = 15 * 1000 * 1000, | ||
128 | .bus_num = 0, | ||
129 | }, | ||
130 | #endif | ||
131 | #if defined(CONFIG_TOUCHSCREEN_ADS7846) || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) | ||
132 | { | ||
133 | .modalias = "ads7846", | ||
134 | .chip_select = 3, /* can be 2 or 3, depending on J2 jumper */ | ||
135 | .max_speed_hz = 125000 * 26, /* (max sample rate @ 3V) * (cmd + data + overhead) */ | ||
136 | .bus_num = 0, | ||
137 | .platform_data = &ads_info, | ||
138 | .irq = AT91_PIN_PC4, | ||
139 | }, | ||
140 | #endif | ||
141 | }; | ||
142 | |||
143 | |||
144 | /* | ||
145 | * MCI (SD/MMC) | ||
146 | */ | ||
147 | static struct at91_mmc_data __initdata cap9adk_mmc_data = { | ||
148 | .wire4 = 1, | ||
149 | .det_pin = -EINVAL, | ||
150 | .wp_pin = -EINVAL, | ||
151 | .vcc_pin = -EINVAL, | ||
152 | }; | ||
153 | |||
154 | |||
155 | /* | ||
156 | * MACB Ethernet device | ||
157 | */ | ||
158 | static struct macb_platform_data __initdata cap9adk_macb_data = { | ||
159 | .phy_irq_pin = -EINVAL, | ||
160 | .is_rmii = 1, | ||
161 | }; | ||
162 | |||
163 | |||
164 | /* | ||
165 | * NAND flash | ||
166 | */ | ||
167 | static struct mtd_partition __initdata cap9adk_nand_partitions[] = { | ||
168 | { | ||
169 | .name = "NAND partition", | ||
170 | .offset = 0, | ||
171 | .size = MTDPART_SIZ_FULL, | ||
172 | }, | ||
173 | }; | ||
174 | |||
175 | static struct atmel_nand_data __initdata cap9adk_nand_data = { | ||
176 | .ale = 21, | ||
177 | .cle = 22, | ||
178 | .det_pin = -EINVAL, | ||
179 | .rdy_pin = -EINVAL, | ||
180 | .enable_pin = AT91_PIN_PD15, | ||
181 | .parts = cap9adk_nand_partitions, | ||
182 | .num_parts = ARRAY_SIZE(cap9adk_nand_partitions), | ||
183 | }; | ||
184 | |||
185 | static struct sam9_smc_config __initdata cap9adk_nand_smc_config = { | ||
186 | .ncs_read_setup = 1, | ||
187 | .nrd_setup = 2, | ||
188 | .ncs_write_setup = 1, | ||
189 | .nwe_setup = 2, | ||
190 | |||
191 | .ncs_read_pulse = 6, | ||
192 | .nrd_pulse = 4, | ||
193 | .ncs_write_pulse = 6, | ||
194 | .nwe_pulse = 4, | ||
195 | |||
196 | .read_cycle = 8, | ||
197 | .write_cycle = 8, | ||
198 | |||
199 | .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE, | ||
200 | .tdf_cycles = 1, | ||
201 | }; | ||
202 | |||
203 | static void __init cap9adk_add_device_nand(void) | ||
204 | { | ||
205 | unsigned long csa; | ||
206 | |||
207 | csa = at91_sys_read(AT91_MATRIX_EBICSA); | ||
208 | at91_sys_write(AT91_MATRIX_EBICSA, csa | AT91_MATRIX_EBI_VDDIOMSEL_3_3V); | ||
209 | |||
210 | cap9adk_nand_data.bus_width_16 = board_have_nand_16bit(); | ||
211 | /* setup bus-width (8 or 16) */ | ||
212 | if (cap9adk_nand_data.bus_width_16) | ||
213 | cap9adk_nand_smc_config.mode |= AT91_SMC_DBW_16; | ||
214 | else | ||
215 | cap9adk_nand_smc_config.mode |= AT91_SMC_DBW_8; | ||
216 | |||
217 | /* configure chip-select 3 (NAND) */ | ||
218 | sam9_smc_configure(0, 3, &cap9adk_nand_smc_config); | ||
219 | |||
220 | at91_add_device_nand(&cap9adk_nand_data); | ||
221 | } | ||
222 | |||
223 | |||
224 | /* | ||
225 | * NOR flash | ||
226 | */ | ||
227 | static struct mtd_partition cap9adk_nor_partitions[] = { | ||
228 | { | ||
229 | .name = "NOR partition", | ||
230 | .offset = 0, | ||
231 | .size = MTDPART_SIZ_FULL, | ||
232 | }, | ||
233 | }; | ||
234 | |||
235 | static struct physmap_flash_data cap9adk_nor_data = { | ||
236 | .width = 2, | ||
237 | .parts = cap9adk_nor_partitions, | ||
238 | .nr_parts = ARRAY_SIZE(cap9adk_nor_partitions), | ||
239 | }; | ||
240 | |||
241 | #define NOR_BASE AT91_CHIPSELECT_0 | ||
242 | #define NOR_SIZE SZ_8M | ||
243 | |||
244 | static struct resource nor_flash_resources[] = { | ||
245 | { | ||
246 | .start = NOR_BASE, | ||
247 | .end = NOR_BASE + NOR_SIZE - 1, | ||
248 | .flags = IORESOURCE_MEM, | ||
249 | } | ||
250 | }; | ||
251 | |||
252 | static struct platform_device cap9adk_nor_flash = { | ||
253 | .name = "physmap-flash", | ||
254 | .id = 0, | ||
255 | .dev = { | ||
256 | .platform_data = &cap9adk_nor_data, | ||
257 | }, | ||
258 | .resource = nor_flash_resources, | ||
259 | .num_resources = ARRAY_SIZE(nor_flash_resources), | ||
260 | }; | ||
261 | |||
262 | static struct sam9_smc_config __initdata cap9adk_nor_smc_config = { | ||
263 | .ncs_read_setup = 2, | ||
264 | .nrd_setup = 4, | ||
265 | .ncs_write_setup = 2, | ||
266 | .nwe_setup = 4, | ||
267 | |||
268 | .ncs_read_pulse = 10, | ||
269 | .nrd_pulse = 8, | ||
270 | .ncs_write_pulse = 10, | ||
271 | .nwe_pulse = 8, | ||
272 | |||
273 | .read_cycle = 16, | ||
274 | .write_cycle = 16, | ||
275 | |||
276 | .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_BAT_WRITE | AT91_SMC_DBW_16, | ||
277 | .tdf_cycles = 1, | ||
278 | }; | ||
279 | |||
280 | static __init void cap9adk_add_device_nor(void) | ||
281 | { | ||
282 | unsigned long csa; | ||
283 | |||
284 | csa = at91_sys_read(AT91_MATRIX_EBICSA); | ||
285 | at91_sys_write(AT91_MATRIX_EBICSA, csa | AT91_MATRIX_EBI_VDDIOMSEL_3_3V); | ||
286 | |||
287 | /* configure chip-select 0 (NOR) */ | ||
288 | sam9_smc_configure(0, 0, &cap9adk_nor_smc_config); | ||
289 | |||
290 | platform_device_register(&cap9adk_nor_flash); | ||
291 | } | ||
292 | |||
293 | |||
294 | /* | ||
295 | * LCD Controller | ||
296 | */ | ||
297 | #if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE) | ||
298 | static struct fb_videomode at91_tft_vga_modes[] = { | ||
299 | { | ||
300 | .name = "TX09D50VM1CCA @ 60", | ||
301 | .refresh = 60, | ||
302 | .xres = 240, .yres = 320, | ||
303 | .pixclock = KHZ2PICOS(4965), | ||
304 | |||
305 | .left_margin = 1, .right_margin = 33, | ||
306 | .upper_margin = 1, .lower_margin = 0, | ||
307 | .hsync_len = 5, .vsync_len = 1, | ||
308 | |||
309 | .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, | ||
310 | .vmode = FB_VMODE_NONINTERLACED, | ||
311 | }, | ||
312 | }; | ||
313 | |||
314 | static struct fb_monspecs at91fb_default_monspecs = { | ||
315 | .manufacturer = "HIT", | ||
316 | .monitor = "TX09D70VM1CCA", | ||
317 | |||
318 | .modedb = at91_tft_vga_modes, | ||
319 | .modedb_len = ARRAY_SIZE(at91_tft_vga_modes), | ||
320 | .hfmin = 15000, | ||
321 | .hfmax = 64000, | ||
322 | .vfmin = 50, | ||
323 | .vfmax = 150, | ||
324 | }; | ||
325 | |||
326 | #define AT91CAP9_DEFAULT_LCDCON2 (ATMEL_LCDC_MEMOR_LITTLE \ | ||
327 | | ATMEL_LCDC_DISTYPE_TFT \ | ||
328 | | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE) | ||
329 | |||
330 | static void at91_lcdc_power_control(int on) | ||
331 | { | ||
332 | if (on) | ||
333 | at91_set_gpio_value(AT91_PIN_PC0, 0); /* power up */ | ||
334 | else | ||
335 | at91_set_gpio_value(AT91_PIN_PC0, 1); /* power down */ | ||
336 | } | ||
337 | |||
338 | /* Driver datas */ | ||
339 | static struct atmel_lcdfb_info __initdata cap9adk_lcdc_data = { | ||
340 | .default_bpp = 16, | ||
341 | .default_dmacon = ATMEL_LCDC_DMAEN, | ||
342 | .default_lcdcon2 = AT91CAP9_DEFAULT_LCDCON2, | ||
343 | .default_monspecs = &at91fb_default_monspecs, | ||
344 | .atmel_lcdfb_power_control = at91_lcdc_power_control, | ||
345 | .guard_time = 1, | ||
346 | }; | ||
347 | |||
348 | #else | ||
349 | static struct atmel_lcdfb_info __initdata cap9adk_lcdc_data; | ||
350 | #endif | ||
351 | |||
352 | |||
353 | /* | ||
354 | * AC97 | ||
355 | */ | ||
356 | static struct ac97c_platform_data cap9adk_ac97_data = { | ||
357 | .reset_pin = -EINVAL, | ||
358 | }; | ||
359 | |||
360 | |||
361 | static void __init cap9adk_board_init(void) | ||
362 | { | ||
363 | /* Serial */ | ||
364 | at91_add_device_serial(); | ||
365 | /* USB Host */ | ||
366 | at91_add_device_usbh(&cap9adk_usbh_data); | ||
367 | /* USB HS */ | ||
368 | at91_add_device_usba(&cap9adk_usba_udc_data); | ||
369 | /* SPI */ | ||
370 | at91_add_device_spi(cap9adk_spi_devices, ARRAY_SIZE(cap9adk_spi_devices)); | ||
371 | /* Touchscreen */ | ||
372 | cap9adk_add_device_ts(); | ||
373 | /* MMC */ | ||
374 | at91_add_device_mmc(1, &cap9adk_mmc_data); | ||
375 | /* Ethernet */ | ||
376 | at91_add_device_eth(&cap9adk_macb_data); | ||
377 | /* NAND */ | ||
378 | cap9adk_add_device_nand(); | ||
379 | /* NOR Flash */ | ||
380 | cap9adk_add_device_nor(); | ||
381 | /* I2C */ | ||
382 | at91_add_device_i2c(NULL, 0); | ||
383 | /* LCD Controller */ | ||
384 | at91_add_device_lcdc(&cap9adk_lcdc_data); | ||
385 | /* AC97 */ | ||
386 | at91_add_device_ac97(&cap9adk_ac97_data); | ||
387 | } | ||
388 | |||
389 | MACHINE_START(AT91CAP9ADK, "Atmel AT91CAP9A-DK") | ||
390 | /* Maintainer: Stelian Pop <stelian.pop@leadtechdesign.com> */ | ||
391 | .timer = &at91sam926x_timer, | ||
392 | .map_io = at91_map_io, | ||
393 | .init_early = cap9adk_init_early, | ||
394 | .init_irq = at91_init_irq_default, | ||
395 | .init_machine = cap9adk_board_init, | ||
396 | MACHINE_END | ||
diff --git a/arch/arm/mach-at91/clock.c b/arch/arm/mach-at91/clock.c index 61873f3aa92d..aa04e22a9da6 100644 --- a/arch/arm/mach-at91/clock.c +++ b/arch/arm/mach-at91/clock.c | |||
@@ -47,8 +47,7 @@ | |||
47 | /* | 47 | /* |
48 | * Chips have some kind of clocks : group them by functionality | 48 | * Chips have some kind of clocks : group them by functionality |
49 | */ | 49 | */ |
50 | #define cpu_has_utmi() ( cpu_is_at91cap9() \ | 50 | #define cpu_has_utmi() ( cpu_is_at91sam9rl() \ |
51 | || cpu_is_at91sam9rl() \ | ||
52 | || cpu_is_at91sam9g45()) | 51 | || cpu_is_at91sam9g45()) |
53 | 52 | ||
54 | #define cpu_has_800M_plla() ( cpu_is_at91sam9g20() \ | 53 | #define cpu_has_800M_plla() ( cpu_is_at91sam9g20() \ |
@@ -602,8 +601,6 @@ static void __init at91_pllb_usbfs_clock_init(unsigned long main_clock) | |||
602 | cpu_is_at91sam9g10()) { | 601 | cpu_is_at91sam9g10()) { |
603 | uhpck.pmc_mask = AT91SAM926x_PMC_UHP; | 602 | uhpck.pmc_mask = AT91SAM926x_PMC_UHP; |
604 | udpck.pmc_mask = AT91SAM926x_PMC_UDP; | 603 | udpck.pmc_mask = AT91SAM926x_PMC_UDP; |
605 | } else if (cpu_is_at91cap9()) { | ||
606 | uhpck.pmc_mask = AT91CAP9_PMC_UHP; | ||
607 | } | 604 | } |
608 | at91_sys_write(AT91_CKGR_PLLBR, 0); | 605 | at91_sys_write(AT91_CKGR_PLLBR, 0); |
609 | 606 | ||
diff --git a/arch/arm/mach-at91/cpuidle.c b/arch/arm/mach-at91/cpuidle.c index a851e6c98421..555d956b3a57 100644 --- a/arch/arm/mach-at91/cpuidle.c +++ b/arch/arm/mach-at91/cpuidle.c | |||
@@ -39,20 +39,15 @@ static int at91_enter_idle(struct cpuidle_device *dev, | |||
39 | { | 39 | { |
40 | struct timeval before, after; | 40 | struct timeval before, after; |
41 | int idle_time; | 41 | int idle_time; |
42 | u32 saved_lpr; | ||
43 | 42 | ||
44 | local_irq_disable(); | 43 | local_irq_disable(); |
45 | do_gettimeofday(&before); | 44 | do_gettimeofday(&before); |
46 | if (index == 0) | 45 | if (index == 0) |
47 | /* Wait for interrupt state */ | 46 | /* Wait for interrupt state */ |
48 | cpu_do_idle(); | 47 | cpu_do_idle(); |
49 | else if (index == 1) { | 48 | else if (index == 1) |
50 | asm("b 1f; .align 5; 1:"); | 49 | at91_standby(); |
51 | asm("mcr p15, 0, r0, c7, c10, 4"); /* drain write buffer */ | 50 | |
52 | saved_lpr = sdram_selfrefresh_enable(); | ||
53 | cpu_do_idle(); | ||
54 | sdram_selfrefresh_disable(saved_lpr); | ||
55 | } | ||
56 | do_gettimeofday(&after); | 51 | do_gettimeofday(&after); |
57 | local_irq_enable(); | 52 | local_irq_enable(); |
58 | idle_time = (after.tv_sec - before.tv_sec) * USEC_PER_SEC + | 53 | idle_time = (after.tv_sec - before.tv_sec) * USEC_PER_SEC + |
diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h index 594133451c0c..7e8280e798c1 100644 --- a/arch/arm/mach-at91/generic.h +++ b/arch/arm/mach-at91/generic.h | |||
@@ -45,7 +45,6 @@ extern void __init at91sam9261_set_console_clock(int id); | |||
45 | extern void __init at91sam9263_set_console_clock(int id); | 45 | extern void __init at91sam9263_set_console_clock(int id); |
46 | extern void __init at91sam9rl_set_console_clock(int id); | 46 | extern void __init at91sam9rl_set_console_clock(int id); |
47 | extern void __init at91sam9g45_set_console_clock(int id); | 47 | extern void __init at91sam9g45_set_console_clock(int id); |
48 | extern void __init at91cap9_set_console_clock(int id); | ||
49 | #ifdef CONFIG_AT91_PMC_UNIT | 48 | #ifdef CONFIG_AT91_PMC_UNIT |
50 | extern int __init at91_clock_init(unsigned long main_clock); | 49 | extern int __init at91_clock_init(unsigned long main_clock); |
51 | #else | 50 | #else |
diff --git a/arch/arm/mach-at91/include/mach/at91_pmc.h b/arch/arm/mach-at91/include/mach/at91_pmc.h index e46f93e34aab..dbdd6ae473d5 100644 --- a/arch/arm/mach-at91/include/mach/at91_pmc.h +++ b/arch/arm/mach-at91/include/mach/at91_pmc.h | |||
@@ -23,10 +23,8 @@ | |||
23 | #define AT91_PMC_PCK (1 << 0) /* Processor Clock */ | 23 | #define AT91_PMC_PCK (1 << 0) /* Processor Clock */ |
24 | #define AT91RM9200_PMC_UDP (1 << 1) /* USB Devcice Port Clock [AT91RM9200 only] */ | 24 | #define AT91RM9200_PMC_UDP (1 << 1) /* USB Devcice Port Clock [AT91RM9200 only] */ |
25 | #define AT91RM9200_PMC_MCKUDP (1 << 2) /* USB Device Port Master Clock Automatic Disable on Suspend [AT91RM9200 only] */ | 25 | #define AT91RM9200_PMC_MCKUDP (1 << 2) /* USB Device Port Master Clock Automatic Disable on Suspend [AT91RM9200 only] */ |
26 | #define AT91CAP9_PMC_DDR (1 << 2) /* DDR Clock [CAP9 revC & some SAM9 only] */ | ||
27 | #define AT91RM9200_PMC_UHP (1 << 4) /* USB Host Port Clock [AT91RM9200 only] */ | 26 | #define AT91RM9200_PMC_UHP (1 << 4) /* USB Host Port Clock [AT91RM9200 only] */ |
28 | #define AT91SAM926x_PMC_UHP (1 << 6) /* USB Host Port Clock [AT91SAM926x only] */ | 27 | #define AT91SAM926x_PMC_UHP (1 << 6) /* USB Host Port Clock [AT91SAM926x only] */ |
29 | #define AT91CAP9_PMC_UHP (1 << 6) /* USB Host Port Clock [AT91CAP9 only] */ | ||
30 | #define AT91SAM926x_PMC_UDP (1 << 7) /* USB Devcice Port Clock [AT91SAM926x only] */ | 28 | #define AT91SAM926x_PMC_UDP (1 << 7) /* USB Devcice Port Clock [AT91SAM926x only] */ |
31 | #define AT91_PMC_PCK0 (1 << 8) /* Programmable Clock 0 */ | 29 | #define AT91_PMC_PCK0 (1 << 8) /* Programmable Clock 0 */ |
32 | #define AT91_PMC_PCK1 (1 << 9) /* Programmable Clock 1 */ | 30 | #define AT91_PMC_PCK1 (1 << 9) /* Programmable Clock 1 */ |
@@ -40,7 +38,7 @@ | |||
40 | #define AT91_PMC_PCDR (AT91_PMC + 0x14) /* Peripheral Clock Disable Register */ | 38 | #define AT91_PMC_PCDR (AT91_PMC + 0x14) /* Peripheral Clock Disable Register */ |
41 | #define AT91_PMC_PCSR (AT91_PMC + 0x18) /* Peripheral Clock Status Register */ | 39 | #define AT91_PMC_PCSR (AT91_PMC + 0x18) /* Peripheral Clock Status Register */ |
42 | 40 | ||
43 | #define AT91_CKGR_UCKR (AT91_PMC + 0x1C) /* UTMI Clock Register [some SAM9, CAP9] */ | 41 | #define AT91_CKGR_UCKR (AT91_PMC + 0x1C) /* UTMI Clock Register [some SAM9] */ |
44 | #define AT91_PMC_UPLLEN (1 << 16) /* UTMI PLL Enable */ | 42 | #define AT91_PMC_UPLLEN (1 << 16) /* UTMI PLL Enable */ |
45 | #define AT91_PMC_UPLLCOUNT (0xf << 20) /* UTMI PLL Start-up Time */ | 43 | #define AT91_PMC_UPLLCOUNT (0xf << 20) /* UTMI PLL Start-up Time */ |
46 | #define AT91_PMC_BIASEN (1 << 24) /* UTMI BIAS Enable */ | 44 | #define AT91_PMC_BIASEN (1 << 24) /* UTMI BIAS Enable */ |
@@ -48,7 +46,7 @@ | |||
48 | 46 | ||
49 | #define AT91_CKGR_MOR (AT91_PMC + 0x20) /* Main Oscillator Register [not on SAM9RL] */ | 47 | #define AT91_CKGR_MOR (AT91_PMC + 0x20) /* Main Oscillator Register [not on SAM9RL] */ |
50 | #define AT91_PMC_MOSCEN (1 << 0) /* Main Oscillator Enable */ | 48 | #define AT91_PMC_MOSCEN (1 << 0) /* Main Oscillator Enable */ |
51 | #define AT91_PMC_OSCBYPASS (1 << 1) /* Oscillator Bypass [SAM9x, CAP9] */ | 49 | #define AT91_PMC_OSCBYPASS (1 << 1) /* Oscillator Bypass [SAM9x] */ |
52 | #define AT91_PMC_OSCOUNT (0xff << 8) /* Main Oscillator Start-up Time */ | 50 | #define AT91_PMC_OSCOUNT (0xff << 8) /* Main Oscillator Start-up Time */ |
53 | 51 | ||
54 | #define AT91_CKGR_MCFR (AT91_PMC + 0x24) /* Main Clock Frequency Register */ | 52 | #define AT91_CKGR_MCFR (AT91_PMC + 0x24) /* Main Clock Frequency Register */ |
@@ -87,7 +85,7 @@ | |||
87 | #define AT91RM9200_PMC_MDIV_2 (1 << 8) | 85 | #define AT91RM9200_PMC_MDIV_2 (1 << 8) |
88 | #define AT91RM9200_PMC_MDIV_3 (2 << 8) | 86 | #define AT91RM9200_PMC_MDIV_3 (2 << 8) |
89 | #define AT91RM9200_PMC_MDIV_4 (3 << 8) | 87 | #define AT91RM9200_PMC_MDIV_4 (3 << 8) |
90 | #define AT91SAM9_PMC_MDIV_1 (0 << 8) /* [SAM9,CAP9 only] */ | 88 | #define AT91SAM9_PMC_MDIV_1 (0 << 8) /* [SAM9 only] */ |
91 | #define AT91SAM9_PMC_MDIV_2 (1 << 8) | 89 | #define AT91SAM9_PMC_MDIV_2 (1 << 8) |
92 | #define AT91SAM9_PMC_MDIV_4 (2 << 8) | 90 | #define AT91SAM9_PMC_MDIV_4 (2 << 8) |
93 | #define AT91SAM9_PMC_MDIV_6 (3 << 8) /* [some SAM9 only] */ | 91 | #define AT91SAM9_PMC_MDIV_6 (3 << 8) /* [some SAM9 only] */ |
@@ -117,17 +115,15 @@ | |||
117 | #define AT91_PMC_LOCKA (1 << 1) /* PLLA Lock */ | 115 | #define AT91_PMC_LOCKA (1 << 1) /* PLLA Lock */ |
118 | #define AT91_PMC_LOCKB (1 << 2) /* PLLB Lock */ | 116 | #define AT91_PMC_LOCKB (1 << 2) /* PLLB Lock */ |
119 | #define AT91_PMC_MCKRDY (1 << 3) /* Master Clock */ | 117 | #define AT91_PMC_MCKRDY (1 << 3) /* Master Clock */ |
120 | #define AT91_PMC_LOCKU (1 << 6) /* UPLL Lock [some SAM9, AT91CAP9 only] */ | 118 | #define AT91_PMC_LOCKU (1 << 6) /* UPLL Lock [some SAM9] */ |
121 | #define AT91_PMC_OSCSEL (1 << 7) /* Slow Clock Oscillator [AT91CAP9 revC only] */ | ||
122 | #define AT91_PMC_PCK0RDY (1 << 8) /* Programmable Clock 0 */ | 119 | #define AT91_PMC_PCK0RDY (1 << 8) /* Programmable Clock 0 */ |
123 | #define AT91_PMC_PCK1RDY (1 << 9) /* Programmable Clock 1 */ | 120 | #define AT91_PMC_PCK1RDY (1 << 9) /* Programmable Clock 1 */ |
124 | #define AT91_PMC_PCK2RDY (1 << 10) /* Programmable Clock 2 */ | 121 | #define AT91_PMC_PCK2RDY (1 << 10) /* Programmable Clock 2 */ |
125 | #define AT91_PMC_PCK3RDY (1 << 11) /* Programmable Clock 3 */ | 122 | #define AT91_PMC_PCK3RDY (1 << 11) /* Programmable Clock 3 */ |
126 | #define AT91_PMC_IMR (AT91_PMC + 0x6c) /* Interrupt Mask Register */ | 123 | #define AT91_PMC_IMR (AT91_PMC + 0x6c) /* Interrupt Mask Register */ |
127 | 124 | ||
128 | #define AT91_PMC_PROT (AT91_PMC + 0xe4) /* Protect Register [AT91CAP9 revC only] */ | 125 | #define AT91_PMC_PROT (AT91_PMC + 0xe4) /* Write Protect Mode Register [some SAM9] */ |
129 | #define AT91_PMC_PROTKEY 0x504d4301 /* Activation Code */ | 126 | #define AT91_PMC_PROTKEY 0x504d4301 /* Activation Code */ |
130 | 127 | ||
131 | #define AT91_PMC_VER (AT91_PMC + 0xfc) /* PMC Module Version [AT91CAP9 only] */ | ||
132 | 128 | ||
133 | #endif | 129 | #endif |
diff --git a/arch/arm/mach-at91/include/mach/at91cap9.h b/arch/arm/mach-at91/include/mach/at91cap9.h deleted file mode 100644 index 61d952902f2b..000000000000 --- a/arch/arm/mach-at91/include/mach/at91cap9.h +++ /dev/null | |||
@@ -1,122 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-at91/include/mach/at91cap9.h | ||
3 | * | ||
4 | * Copyright (C) 2007 Stelian Pop <stelian.pop@leadtechdesign.com> | ||
5 | * Copyright (C) 2007 Lead Tech Design <www.leadtechdesign.com> | ||
6 | * Copyright (C) 2007 Atmel Corporation. | ||
7 | * | ||
8 | * Common definitions. | ||
9 | * Based on AT91CAP9 datasheet revision B (Preliminary). | ||
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 as published by | ||
13 | * the Free Software Foundation; either version 2 of the License, or | ||
14 | * (at your option) any later version. | ||
15 | */ | ||
16 | |||
17 | #ifndef AT91CAP9_H | ||
18 | #define AT91CAP9_H | ||
19 | |||
20 | /* | ||
21 | * Peripheral identifiers/interrupts. | ||
22 | */ | ||
23 | #define AT91CAP9_ID_PIOABCD 2 /* Parallel IO Controller A, B, C and D */ | ||
24 | #define AT91CAP9_ID_MPB0 3 /* MP Block Peripheral 0 */ | ||
25 | #define AT91CAP9_ID_MPB1 4 /* MP Block Peripheral 1 */ | ||
26 | #define AT91CAP9_ID_MPB2 5 /* MP Block Peripheral 2 */ | ||
27 | #define AT91CAP9_ID_MPB3 6 /* MP Block Peripheral 3 */ | ||
28 | #define AT91CAP9_ID_MPB4 7 /* MP Block Peripheral 4 */ | ||
29 | #define AT91CAP9_ID_US0 8 /* USART 0 */ | ||
30 | #define AT91CAP9_ID_US1 9 /* USART 1 */ | ||
31 | #define AT91CAP9_ID_US2 10 /* USART 2 */ | ||
32 | #define AT91CAP9_ID_MCI0 11 /* Multimedia Card Interface 0 */ | ||
33 | #define AT91CAP9_ID_MCI1 12 /* Multimedia Card Interface 1 */ | ||
34 | #define AT91CAP9_ID_CAN 13 /* CAN */ | ||
35 | #define AT91CAP9_ID_TWI 14 /* Two-Wire Interface */ | ||
36 | #define AT91CAP9_ID_SPI0 15 /* Serial Peripheral Interface 0 */ | ||
37 | #define AT91CAP9_ID_SPI1 16 /* Serial Peripheral Interface 0 */ | ||
38 | #define AT91CAP9_ID_SSC0 17 /* Serial Synchronous Controller 0 */ | ||
39 | #define AT91CAP9_ID_SSC1 18 /* Serial Synchronous Controller 1 */ | ||
40 | #define AT91CAP9_ID_AC97C 19 /* AC97 Controller */ | ||
41 | #define AT91CAP9_ID_TCB 20 /* Timer Counter 0, 1 and 2 */ | ||
42 | #define AT91CAP9_ID_PWMC 21 /* Pulse Width Modulation Controller */ | ||
43 | #define AT91CAP9_ID_EMAC 22 /* Ethernet */ | ||
44 | #define AT91CAP9_ID_AESTDES 23 /* Advanced Encryption Standard, Triple DES */ | ||
45 | #define AT91CAP9_ID_ADC 24 /* Analog-to-Digital Converter */ | ||
46 | #define AT91CAP9_ID_ISI 25 /* Image Sensor Interface */ | ||
47 | #define AT91CAP9_ID_LCDC 26 /* LCD Controller */ | ||
48 | #define AT91CAP9_ID_DMA 27 /* DMA Controller */ | ||
49 | #define AT91CAP9_ID_UDPHS 28 /* USB High Speed Device Port */ | ||
50 | #define AT91CAP9_ID_UHP 29 /* USB Host Port */ | ||
51 | #define AT91CAP9_ID_IRQ0 30 /* Advanced Interrupt Controller (IRQ0) */ | ||
52 | #define AT91CAP9_ID_IRQ1 31 /* Advanced Interrupt Controller (IRQ1) */ | ||
53 | |||
54 | /* | ||
55 | * User Peripheral physical base addresses. | ||
56 | */ | ||
57 | #define AT91CAP9_BASE_UDPHS 0xfff78000 | ||
58 | #define AT91CAP9_BASE_TCB0 0xfff7c000 | ||
59 | #define AT91CAP9_BASE_TC0 0xfff7c000 | ||
60 | #define AT91CAP9_BASE_TC1 0xfff7c040 | ||
61 | #define AT91CAP9_BASE_TC2 0xfff7c080 | ||
62 | #define AT91CAP9_BASE_MCI0 0xfff80000 | ||
63 | #define AT91CAP9_BASE_MCI1 0xfff84000 | ||
64 | #define AT91CAP9_BASE_TWI 0xfff88000 | ||
65 | #define AT91CAP9_BASE_US0 0xfff8c000 | ||
66 | #define AT91CAP9_BASE_US1 0xfff90000 | ||
67 | #define AT91CAP9_BASE_US2 0xfff94000 | ||
68 | #define AT91CAP9_BASE_SSC0 0xfff98000 | ||
69 | #define AT91CAP9_BASE_SSC1 0xfff9c000 | ||
70 | #define AT91CAP9_BASE_AC97C 0xfffa0000 | ||
71 | #define AT91CAP9_BASE_SPI0 0xfffa4000 | ||
72 | #define AT91CAP9_BASE_SPI1 0xfffa8000 | ||
73 | #define AT91CAP9_BASE_CAN 0xfffac000 | ||
74 | #define AT91CAP9_BASE_PWMC 0xfffb8000 | ||
75 | #define AT91CAP9_BASE_EMAC 0xfffbc000 | ||
76 | #define AT91CAP9_BASE_ADC 0xfffc0000 | ||
77 | #define AT91CAP9_BASE_ISI 0xfffc4000 | ||
78 | |||
79 | /* | ||
80 | * System Peripherals (offset from AT91_BASE_SYS) | ||
81 | */ | ||
82 | #define AT91_BCRAMC (0xffffe400 - AT91_BASE_SYS) | ||
83 | #define AT91_DDRSDRC0 (0xffffe600 - AT91_BASE_SYS) | ||
84 | #define AT91_MATRIX (0xffffea00 - AT91_BASE_SYS) | ||
85 | #define AT91_PMC (0xfffffc00 - AT91_BASE_SYS) | ||
86 | #define AT91_GPBR (cpu_is_at91cap9_revB() ? \ | ||
87 | (0xfffffd50 - AT91_BASE_SYS) : \ | ||
88 | (0xfffffd60 - AT91_BASE_SYS)) | ||
89 | |||
90 | #define AT91CAP9_BASE_ECC 0xffffe200 | ||
91 | #define AT91CAP9_BASE_DMA 0xffffec00 | ||
92 | #define AT91CAP9_BASE_SMC 0xffffe800 | ||
93 | #define AT91CAP9_BASE_DBGU AT91_BASE_DBGU1 | ||
94 | #define AT91CAP9_BASE_PIOA 0xfffff200 | ||
95 | #define AT91CAP9_BASE_PIOB 0xfffff400 | ||
96 | #define AT91CAP9_BASE_PIOC 0xfffff600 | ||
97 | #define AT91CAP9_BASE_PIOD 0xfffff800 | ||
98 | #define AT91CAP9_BASE_RSTC 0xfffffd00 | ||
99 | #define AT91CAP9_BASE_SHDWC 0xfffffd10 | ||
100 | #define AT91CAP9_BASE_RTT 0xfffffd20 | ||
101 | #define AT91CAP9_BASE_PIT 0xfffffd30 | ||
102 | #define AT91CAP9_BASE_WDT 0xfffffd40 | ||
103 | |||
104 | #define AT91_USART0 AT91CAP9_BASE_US0 | ||
105 | #define AT91_USART1 AT91CAP9_BASE_US1 | ||
106 | #define AT91_USART2 AT91CAP9_BASE_US2 | ||
107 | |||
108 | |||
109 | /* | ||
110 | * Internal Memory. | ||
111 | */ | ||
112 | #define AT91CAP9_SRAM_BASE 0x00100000 /* Internal SRAM base address */ | ||
113 | #define AT91CAP9_SRAM_SIZE (32 * SZ_1K) /* Internal SRAM size (32Kb) */ | ||
114 | |||
115 | #define AT91CAP9_ROM_BASE 0x00400000 /* Internal ROM base address */ | ||
116 | #define AT91CAP9_ROM_SIZE (32 * SZ_1K) /* Internal ROM size (32Kb) */ | ||
117 | |||
118 | #define AT91CAP9_LCDC_BASE 0x00500000 /* LCD Controller */ | ||
119 | #define AT91CAP9_UDPHS_FIFO 0x00600000 /* USB High Speed Device Port */ | ||
120 | #define AT91CAP9_UHP_BASE 0x00700000 /* USB Host controller */ | ||
121 | |||
122 | #endif | ||
diff --git a/arch/arm/mach-at91/include/mach/at91cap9_matrix.h b/arch/arm/mach-at91/include/mach/at91cap9_matrix.h deleted file mode 100644 index 4b9d4aff4b4f..000000000000 --- a/arch/arm/mach-at91/include/mach/at91cap9_matrix.h +++ /dev/null | |||
@@ -1,137 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-at91/include/mach/at91cap9_matrix.h | ||
3 | * | ||
4 | * Copyright (C) 2007 Stelian Pop <stelian.pop@leadtechdesign.com> | ||
5 | * Copyright (C) 2007 Lead Tech Design <www.leadtechdesign.com> | ||
6 | * Copyright (C) 2006 Atmel Corporation. | ||
7 | * | ||
8 | * Memory Controllers (MATRIX, EBI) - System peripherals registers. | ||
9 | * Based on AT91CAP9 datasheet revision B (Preliminary). | ||
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 as published by | ||
13 | * the Free Software Foundation; either version 2 of the License, or | ||
14 | * (at your option) any later version. | ||
15 | */ | ||
16 | |||
17 | #ifndef AT91CAP9_MATRIX_H | ||
18 | #define AT91CAP9_MATRIX_H | ||
19 | |||
20 | #define AT91_MATRIX_MCFG0 (AT91_MATRIX + 0x00) /* Master Configuration Register 0 */ | ||
21 | #define AT91_MATRIX_MCFG1 (AT91_MATRIX + 0x04) /* Master Configuration Register 1 */ | ||
22 | #define AT91_MATRIX_MCFG2 (AT91_MATRIX + 0x08) /* Master Configuration Register 2 */ | ||
23 | #define AT91_MATRIX_MCFG3 (AT91_MATRIX + 0x0C) /* Master Configuration Register 3 */ | ||
24 | #define AT91_MATRIX_MCFG4 (AT91_MATRIX + 0x10) /* Master Configuration Register 4 */ | ||
25 | #define AT91_MATRIX_MCFG5 (AT91_MATRIX + 0x14) /* Master Configuration Register 5 */ | ||
26 | #define AT91_MATRIX_MCFG6 (AT91_MATRIX + 0x18) /* Master Configuration Register 6 */ | ||
27 | #define AT91_MATRIX_MCFG7 (AT91_MATRIX + 0x1C) /* Master Configuration Register 7 */ | ||
28 | #define AT91_MATRIX_MCFG8 (AT91_MATRIX + 0x20) /* Master Configuration Register 8 */ | ||
29 | #define AT91_MATRIX_MCFG9 (AT91_MATRIX + 0x24) /* Master Configuration Register 9 */ | ||
30 | #define AT91_MATRIX_MCFG10 (AT91_MATRIX + 0x28) /* Master Configuration Register 10 */ | ||
31 | #define AT91_MATRIX_MCFG11 (AT91_MATRIX + 0x2C) /* Master Configuration Register 11 */ | ||
32 | #define AT91_MATRIX_ULBT (7 << 0) /* Undefined Length Burst Type */ | ||
33 | #define AT91_MATRIX_ULBT_INFINITE (0 << 0) | ||
34 | #define AT91_MATRIX_ULBT_SINGLE (1 << 0) | ||
35 | #define AT91_MATRIX_ULBT_FOUR (2 << 0) | ||
36 | #define AT91_MATRIX_ULBT_EIGHT (3 << 0) | ||
37 | #define AT91_MATRIX_ULBT_SIXTEEN (4 << 0) | ||
38 | |||
39 | #define AT91_MATRIX_SCFG0 (AT91_MATRIX + 0x40) /* Slave Configuration Register 0 */ | ||
40 | #define AT91_MATRIX_SCFG1 (AT91_MATRIX + 0x44) /* Slave Configuration Register 1 */ | ||
41 | #define AT91_MATRIX_SCFG2 (AT91_MATRIX + 0x48) /* Slave Configuration Register 2 */ | ||
42 | #define AT91_MATRIX_SCFG3 (AT91_MATRIX + 0x4C) /* Slave Configuration Register 3 */ | ||
43 | #define AT91_MATRIX_SCFG4 (AT91_MATRIX + 0x50) /* Slave Configuration Register 4 */ | ||
44 | #define AT91_MATRIX_SCFG5 (AT91_MATRIX + 0x54) /* Slave Configuration Register 5 */ | ||
45 | #define AT91_MATRIX_SCFG6 (AT91_MATRIX + 0x58) /* Slave Configuration Register 6 */ | ||
46 | #define AT91_MATRIX_SCFG7 (AT91_MATRIX + 0x5C) /* Slave Configuration Register 7 */ | ||
47 | #define AT91_MATRIX_SCFG8 (AT91_MATRIX + 0x60) /* Slave Configuration Register 8 */ | ||
48 | #define AT91_MATRIX_SCFG9 (AT91_MATRIX + 0x64) /* Slave Configuration Register 9 */ | ||
49 | #define AT91_MATRIX_SLOT_CYCLE (0xff << 0) /* Maximum Number of Allowed Cycles for a Burst */ | ||
50 | #define AT91_MATRIX_DEFMSTR_TYPE (3 << 16) /* Default Master Type */ | ||
51 | #define AT91_MATRIX_DEFMSTR_TYPE_NONE (0 << 16) | ||
52 | #define AT91_MATRIX_DEFMSTR_TYPE_LAST (1 << 16) | ||
53 | #define AT91_MATRIX_DEFMSTR_TYPE_FIXED (2 << 16) | ||
54 | #define AT91_MATRIX_FIXED_DEFMSTR (0xf << 18) /* Fixed Index of Default Master */ | ||
55 | #define AT91_MATRIX_ARBT (3 << 24) /* Arbitration Type */ | ||
56 | #define AT91_MATRIX_ARBT_ROUND_ROBIN (0 << 24) | ||
57 | #define AT91_MATRIX_ARBT_FIXED_PRIORITY (1 << 24) | ||
58 | |||
59 | #define AT91_MATRIX_PRAS0 (AT91_MATRIX + 0x80) /* Priority Register A for Slave 0 */ | ||
60 | #define AT91_MATRIX_PRBS0 (AT91_MATRIX + 0x84) /* Priority Register B for Slave 0 */ | ||
61 | #define AT91_MATRIX_PRAS1 (AT91_MATRIX + 0x88) /* Priority Register A for Slave 1 */ | ||
62 | #define AT91_MATRIX_PRBS1 (AT91_MATRIX + 0x8C) /* Priority Register B for Slave 1 */ | ||
63 | #define AT91_MATRIX_PRAS2 (AT91_MATRIX + 0x90) /* Priority Register A for Slave 2 */ | ||
64 | #define AT91_MATRIX_PRBS2 (AT91_MATRIX + 0x94) /* Priority Register B for Slave 2 */ | ||
65 | #define AT91_MATRIX_PRAS3 (AT91_MATRIX + 0x98) /* Priority Register A for Slave 3 */ | ||
66 | #define AT91_MATRIX_PRBS3 (AT91_MATRIX + 0x9C) /* Priority Register B for Slave 3 */ | ||
67 | #define AT91_MATRIX_PRAS4 (AT91_MATRIX + 0xA0) /* Priority Register A for Slave 4 */ | ||
68 | #define AT91_MATRIX_PRBS4 (AT91_MATRIX + 0xA4) /* Priority Register B for Slave 4 */ | ||
69 | #define AT91_MATRIX_PRAS5 (AT91_MATRIX + 0xA8) /* Priority Register A for Slave 5 */ | ||
70 | #define AT91_MATRIX_PRBS5 (AT91_MATRIX + 0xAC) /* Priority Register B for Slave 5 */ | ||
71 | #define AT91_MATRIX_PRAS6 (AT91_MATRIX + 0xB0) /* Priority Register A for Slave 6 */ | ||
72 | #define AT91_MATRIX_PRBS6 (AT91_MATRIX + 0xB4) /* Priority Register B for Slave 6 */ | ||
73 | #define AT91_MATRIX_PRAS7 (AT91_MATRIX + 0xB8) /* Priority Register A for Slave 7 */ | ||
74 | #define AT91_MATRIX_PRBS7 (AT91_MATRIX + 0xBC) /* Priority Register B for Slave 7 */ | ||
75 | #define AT91_MATRIX_PRAS8 (AT91_MATRIX + 0xC0) /* Priority Register A for Slave 8 */ | ||
76 | #define AT91_MATRIX_PRBS8 (AT91_MATRIX + 0xC4) /* Priority Register B for Slave 8 */ | ||
77 | #define AT91_MATRIX_PRAS9 (AT91_MATRIX + 0xC8) /* Priority Register A for Slave 9 */ | ||
78 | #define AT91_MATRIX_PRBS9 (AT91_MATRIX + 0xCC) /* Priority Register B for Slave 9 */ | ||
79 | #define AT91_MATRIX_M0PR (3 << 0) /* Master 0 Priority */ | ||
80 | #define AT91_MATRIX_M1PR (3 << 4) /* Master 1 Priority */ | ||
81 | #define AT91_MATRIX_M2PR (3 << 8) /* Master 2 Priority */ | ||
82 | #define AT91_MATRIX_M3PR (3 << 12) /* Master 3 Priority */ | ||
83 | #define AT91_MATRIX_M4PR (3 << 16) /* Master 4 Priority */ | ||
84 | #define AT91_MATRIX_M5PR (3 << 20) /* Master 5 Priority */ | ||
85 | #define AT91_MATRIX_M6PR (3 << 24) /* Master 6 Priority */ | ||
86 | #define AT91_MATRIX_M7PR (3 << 28) /* Master 7 Priority */ | ||
87 | #define AT91_MATRIX_M8PR (3 << 0) /* Master 8 Priority (in Register B) */ | ||
88 | #define AT91_MATRIX_M9PR (3 << 4) /* Master 9 Priority (in Register B) */ | ||
89 | #define AT91_MATRIX_M10PR (3 << 8) /* Master 10 Priority (in Register B) */ | ||
90 | #define AT91_MATRIX_M11PR (3 << 12) /* Master 11 Priority (in Register B) */ | ||
91 | |||
92 | #define AT91_MATRIX_MRCR (AT91_MATRIX + 0x100) /* Master Remap Control Register */ | ||
93 | #define AT91_MATRIX_RCB0 (1 << 0) /* Remap Command for AHB Master 0 (ARM926EJ-S Instruction Master) */ | ||
94 | #define AT91_MATRIX_RCB1 (1 << 1) /* Remap Command for AHB Master 1 (ARM926EJ-S Data Master) */ | ||
95 | #define AT91_MATRIX_RCB2 (1 << 2) | ||
96 | #define AT91_MATRIX_RCB3 (1 << 3) | ||
97 | #define AT91_MATRIX_RCB4 (1 << 4) | ||
98 | #define AT91_MATRIX_RCB5 (1 << 5) | ||
99 | #define AT91_MATRIX_RCB6 (1 << 6) | ||
100 | #define AT91_MATRIX_RCB7 (1 << 7) | ||
101 | #define AT91_MATRIX_RCB8 (1 << 8) | ||
102 | #define AT91_MATRIX_RCB9 (1 << 9) | ||
103 | #define AT91_MATRIX_RCB10 (1 << 10) | ||
104 | #define AT91_MATRIX_RCB11 (1 << 11) | ||
105 | |||
106 | #define AT91_MPBS0_SFR (AT91_MATRIX + 0x114) /* MPBlock Slave 0 Special Function Register */ | ||
107 | #define AT91_MPBS1_SFR (AT91_MATRIX + 0x11C) /* MPBlock Slave 1 Special Function Register */ | ||
108 | |||
109 | #define AT91_MATRIX_UDPHS (AT91_MATRIX + 0x118) /* USBHS Special Function Register [AT91CAP9 only] */ | ||
110 | #define AT91_MATRIX_SELECT_UDPHS (0 << 31) /* select High Speed UDP */ | ||
111 | #define AT91_MATRIX_SELECT_UDP (1 << 31) /* select standard UDP */ | ||
112 | #define AT91_MATRIX_UDPHS_BYPASS_LOCK (1 << 30) /* bypass lock bit */ | ||
113 | |||
114 | #define AT91_MATRIX_EBICSA (AT91_MATRIX + 0x120) /* EBI Chip Select Assignment Register */ | ||
115 | #define AT91_MATRIX_EBI_CS1A (1 << 1) /* Chip Select 1 Assignment */ | ||
116 | #define AT91_MATRIX_EBI_CS1A_SMC (0 << 1) | ||
117 | #define AT91_MATRIX_EBI_CS1A_BCRAMC (1 << 1) | ||
118 | #define AT91_MATRIX_EBI_CS3A (1 << 3) /* Chip Select 3 Assignment */ | ||
119 | #define AT91_MATRIX_EBI_CS3A_SMC (0 << 3) | ||
120 | #define AT91_MATRIX_EBI_CS3A_SMC_SMARTMEDIA (1 << 3) | ||
121 | #define AT91_MATRIX_EBI_CS4A (1 << 4) /* Chip Select 4 Assignment */ | ||
122 | #define AT91_MATRIX_EBI_CS4A_SMC (0 << 4) | ||
123 | #define AT91_MATRIX_EBI_CS4A_SMC_CF1 (1 << 4) | ||
124 | #define AT91_MATRIX_EBI_CS5A (1 << 5) /* Chip Select 5 Assignment */ | ||
125 | #define AT91_MATRIX_EBI_CS5A_SMC (0 << 5) | ||
126 | #define AT91_MATRIX_EBI_CS5A_SMC_CF2 (1 << 5) | ||
127 | #define AT91_MATRIX_EBI_DBPUC (1 << 8) /* Data Bus Pull-up Configuration */ | ||
128 | #define AT91_MATRIX_EBI_DQSPDC (1 << 9) /* Data Qualifier Strobe Pull-Down Configuration */ | ||
129 | #define AT91_MATRIX_EBI_VDDIOMSEL (1 << 16) /* Memory voltage selection */ | ||
130 | #define AT91_MATRIX_EBI_VDDIOMSEL_1_8V (0 << 16) | ||
131 | #define AT91_MATRIX_EBI_VDDIOMSEL_3_3V (1 << 16) | ||
132 | |||
133 | #define AT91_MPBS2_SFR (AT91_MATRIX + 0x12C) /* MPBlock Slave 2 Special Function Register */ | ||
134 | #define AT91_MPBS3_SFR (AT91_MATRIX + 0x130) /* MPBlock Slave 3 Special Function Register */ | ||
135 | #define AT91_APB_SFR (AT91_MATRIX + 0x134) /* APB Bridge Special Function Register */ | ||
136 | |||
137 | #endif | ||
diff --git a/arch/arm/mach-at91/include/mach/at91sam9_ddrsdr.h b/arch/arm/mach-at91/include/mach/at91sam9_ddrsdr.h index e2f8da8ce5bc..5d4a9f846584 100644 --- a/arch/arm/mach-at91/include/mach/at91sam9_ddrsdr.h +++ b/arch/arm/mach-at91/include/mach/at91sam9_ddrsdr.h | |||
@@ -59,7 +59,6 @@ | |||
59 | #define AT91_DDRSDRC_TRP (0xf << 16) /* Row precharge delay */ | 59 | #define AT91_DDRSDRC_TRP (0xf << 16) /* Row precharge delay */ |
60 | #define AT91_DDRSDRC_TRRD (0xf << 20) /* Active BankA to BankB */ | 60 | #define AT91_DDRSDRC_TRRD (0xf << 20) /* Active BankA to BankB */ |
61 | #define AT91_DDRSDRC_TWTR (0x7 << 24) /* Internal Write to Read delay */ | 61 | #define AT91_DDRSDRC_TWTR (0x7 << 24) /* Internal Write to Read delay */ |
62 | #define AT91CAP9_DDRSDRC_TWTR (1 << 24) /* Internal Write to Read delay */ | ||
63 | #define AT91_DDRSDRC_RED_WRRD (0x1 << 27) /* Reduce Write to Read Delay [SAM9 Only] */ | 62 | #define AT91_DDRSDRC_RED_WRRD (0x1 << 27) /* Reduce Write to Read Delay [SAM9 Only] */ |
64 | #define AT91_DDRSDRC_TMRD (0xf << 28) /* Load mode to active/refresh delay */ | 63 | #define AT91_DDRSDRC_TMRD (0xf << 28) /* Load mode to active/refresh delay */ |
65 | 64 | ||
@@ -76,7 +75,6 @@ | |||
76 | #define AT91_DDRSDRC_TRTP (0x7 << 12) /* Read to Precharge delay */ | 75 | #define AT91_DDRSDRC_TRTP (0x7 << 12) /* Read to Precharge delay */ |
77 | 76 | ||
78 | #define AT91_DDRSDRC_LPR 0x1C /* Low Power Register */ | 77 | #define AT91_DDRSDRC_LPR 0x1C /* Low Power Register */ |
79 | #define AT91CAP9_DDRSDRC_LPR 0x18 /* Low Power Register */ | ||
80 | #define AT91_DDRSDRC_LPCB (3 << 0) /* Low-power Configurations */ | 78 | #define AT91_DDRSDRC_LPCB (3 << 0) /* Low-power Configurations */ |
81 | #define AT91_DDRSDRC_LPCB_DISABLE 0 | 79 | #define AT91_DDRSDRC_LPCB_DISABLE 0 |
82 | #define AT91_DDRSDRC_LPCB_SELF_REFRESH 1 | 80 | #define AT91_DDRSDRC_LPCB_SELF_REFRESH 1 |
@@ -94,11 +92,9 @@ | |||
94 | #define AT91_DDRSDRC_UPD_MR (3 << 20) /* Update load mode register and extended mode register */ | 92 | #define AT91_DDRSDRC_UPD_MR (3 << 20) /* Update load mode register and extended mode register */ |
95 | 93 | ||
96 | #define AT91_DDRSDRC_MDR 0x20 /* Memory Device Register */ | 94 | #define AT91_DDRSDRC_MDR 0x20 /* Memory Device Register */ |
97 | #define AT91CAP9_DDRSDRC_MDR 0x1C /* Memory Device Register */ | ||
98 | #define AT91_DDRSDRC_MD (3 << 0) /* Memory Device Type */ | 95 | #define AT91_DDRSDRC_MD (3 << 0) /* Memory Device Type */ |
99 | #define AT91_DDRSDRC_MD_SDR 0 | 96 | #define AT91_DDRSDRC_MD_SDR 0 |
100 | #define AT91_DDRSDRC_MD_LOW_POWER_SDR 1 | 97 | #define AT91_DDRSDRC_MD_LOW_POWER_SDR 1 |
101 | #define AT91CAP9_DDRSDRC_MD_DDR 2 | ||
102 | #define AT91_DDRSDRC_MD_LOW_POWER_DDR 3 | 98 | #define AT91_DDRSDRC_MD_LOW_POWER_DDR 3 |
103 | #define AT91_DDRSDRC_MD_DDR2 6 /* [SAM9 Only] */ | 99 | #define AT91_DDRSDRC_MD_DDR2 6 /* [SAM9 Only] */ |
104 | #define AT91_DDRSDRC_DBW (1 << 4) /* Data Bus Width */ | 100 | #define AT91_DDRSDRC_DBW (1 << 4) /* Data Bus Width */ |
@@ -106,16 +102,10 @@ | |||
106 | #define AT91_DDRSDRC_DBW_16BITS (1 << 4) | 102 | #define AT91_DDRSDRC_DBW_16BITS (1 << 4) |
107 | 103 | ||
108 | #define AT91_DDRSDRC_DLL 0x24 /* DLL Information Register */ | 104 | #define AT91_DDRSDRC_DLL 0x24 /* DLL Information Register */ |
109 | #define AT91CAP9_DDRSDRC_DLL 0x20 /* DLL Information Register */ | ||
110 | #define AT91_DDRSDRC_MDINC (1 << 0) /* Master Delay increment */ | 105 | #define AT91_DDRSDRC_MDINC (1 << 0) /* Master Delay increment */ |
111 | #define AT91_DDRSDRC_MDDEC (1 << 1) /* Master Delay decrement */ | 106 | #define AT91_DDRSDRC_MDDEC (1 << 1) /* Master Delay decrement */ |
112 | #define AT91_DDRSDRC_MDOVF (1 << 2) /* Master Delay Overflow */ | 107 | #define AT91_DDRSDRC_MDOVF (1 << 2) /* Master Delay Overflow */ |
113 | #define AT91CAP9_DDRSDRC_SDCOVF (1 << 3) /* Slave Delay Correction Overflow */ | ||
114 | #define AT91CAP9_DDRSDRC_SDCUDF (1 << 4) /* Slave Delay Correction Underflow */ | ||
115 | #define AT91CAP9_DDRSDRC_SDERF (1 << 5) /* Slave Delay Correction error */ | ||
116 | #define AT91_DDRSDRC_MDVAL (0xff << 8) /* Master Delay value */ | 108 | #define AT91_DDRSDRC_MDVAL (0xff << 8) /* Master Delay value */ |
117 | #define AT91CAP9_DDRSDRC_SDVAL (0xff << 16) /* Slave Delay value */ | ||
118 | #define AT91CAP9_DDRSDRC_SDCVAL (0xff << 24) /* Slave Delay Correction value */ | ||
119 | 109 | ||
120 | #define AT91_DDRSDRC_HS 0x2C /* High Speed Register [SAM9 Only] */ | 110 | #define AT91_DDRSDRC_HS 0x2C /* High Speed Register [SAM9 Only] */ |
121 | #define AT91_DDRSDRC_DIS_ATCP_RD (1 << 2) /* Anticip read access is disabled */ | 111 | #define AT91_DDRSDRC_DIS_ATCP_RD (1 << 2) /* Anticip read access is disabled */ |
diff --git a/arch/arm/mach-at91/include/mach/at91sam9_smc.h b/arch/arm/mach-at91/include/mach/at91sam9_smc.h index eb18a70fa647..175e1fdd9fe8 100644 --- a/arch/arm/mach-at91/include/mach/at91sam9_smc.h +++ b/arch/arm/mach-at91/include/mach/at91sam9_smc.h | |||
@@ -18,6 +18,35 @@ | |||
18 | 18 | ||
19 | #include <mach/cpu.h> | 19 | #include <mach/cpu.h> |
20 | 20 | ||
21 | #ifndef __ASSEMBLY__ | ||
22 | struct sam9_smc_config { | ||
23 | /* Setup register */ | ||
24 | u8 ncs_read_setup; | ||
25 | u8 nrd_setup; | ||
26 | u8 ncs_write_setup; | ||
27 | u8 nwe_setup; | ||
28 | |||
29 | /* Pulse register */ | ||
30 | u8 ncs_read_pulse; | ||
31 | u8 nrd_pulse; | ||
32 | u8 ncs_write_pulse; | ||
33 | u8 nwe_pulse; | ||
34 | |||
35 | /* Cycle register */ | ||
36 | u16 read_cycle; | ||
37 | u16 write_cycle; | ||
38 | |||
39 | /* Mode register */ | ||
40 | u32 mode; | ||
41 | u8 tdf_cycles:4; | ||
42 | }; | ||
43 | |||
44 | extern void sam9_smc_configure(int id, int cs, struct sam9_smc_config *config); | ||
45 | extern void sam9_smc_read(int id, int cs, struct sam9_smc_config *config); | ||
46 | extern void sam9_smc_read_mode(int id, int cs, struct sam9_smc_config *config); | ||
47 | extern void sam9_smc_write_mode(int id, int cs, struct sam9_smc_config *config); | ||
48 | #endif | ||
49 | |||
21 | #define AT91_SMC_SETUP 0x00 /* Setup Register for CS n */ | 50 | #define AT91_SMC_SETUP 0x00 /* Setup Register for CS n */ |
22 | #define AT91_SMC_NWESETUP (0x3f << 0) /* NWE Setup Length */ | 51 | #define AT91_SMC_NWESETUP (0x3f << 0) /* NWE Setup Length */ |
23 | #define AT91_SMC_NWESETUP_(x) ((x) << 0) | 52 | #define AT91_SMC_NWESETUP_(x) ((x) << 0) |
diff --git a/arch/arm/mach-at91/include/mach/cpu.h b/arch/arm/mach-at91/include/mach/cpu.h index f6ce936dba2b..0118c3338552 100644 --- a/arch/arm/mach-at91/include/mach/cpu.h +++ b/arch/arm/mach-at91/include/mach/cpu.h | |||
@@ -25,7 +25,6 @@ | |||
25 | #define ARCH_ID_AT91SAM9G45MRL 0x819b05a2 /* aka 9G45-ES2 & non ES lots */ | 25 | #define ARCH_ID_AT91SAM9G45MRL 0x819b05a2 /* aka 9G45-ES2 & non ES lots */ |
26 | #define ARCH_ID_AT91SAM9G45ES 0x819b05a1 /* 9G45-ES (Engineering Sample) */ | 26 | #define ARCH_ID_AT91SAM9G45ES 0x819b05a1 /* 9G45-ES (Engineering Sample) */ |
27 | #define ARCH_ID_AT91SAM9X5 0x819a05a0 | 27 | #define ARCH_ID_AT91SAM9X5 0x819a05a0 |
28 | #define ARCH_ID_AT91CAP9 0x039A03A0 | ||
29 | 28 | ||
30 | #define ARCH_ID_AT91SAM9XE128 0x329973a0 | 29 | #define ARCH_ID_AT91SAM9XE128 0x329973a0 |
31 | #define ARCH_ID_AT91SAM9XE256 0x329a93a0 | 30 | #define ARCH_ID_AT91SAM9XE256 0x329a93a0 |
@@ -51,10 +50,6 @@ | |||
51 | #define ARCH_FAMILY_AT91SAM9 0x01900000 | 50 | #define ARCH_FAMILY_AT91SAM9 0x01900000 |
52 | #define ARCH_FAMILY_AT91SAM9XE 0x02900000 | 51 | #define ARCH_FAMILY_AT91SAM9XE 0x02900000 |
53 | 52 | ||
54 | /* PMC revision */ | ||
55 | #define ARCH_REVISION_CAP9_B 0x399 | ||
56 | #define ARCH_REVISION_CAP9_C 0x601 | ||
57 | |||
58 | /* RM9200 type */ | 53 | /* RM9200 type */ |
59 | #define ARCH_REVISON_9200_BGA (0 << 0) | 54 | #define ARCH_REVISON_9200_BGA (0 << 0) |
60 | #define ARCH_REVISON_9200_PQFP (1 << 0) | 55 | #define ARCH_REVISON_9200_PQFP (1 << 0) |
@@ -63,9 +58,6 @@ enum at91_soc_type { | |||
63 | /* 920T */ | 58 | /* 920T */ |
64 | AT91_SOC_RM9200, | 59 | AT91_SOC_RM9200, |
65 | 60 | ||
66 | /* CAP */ | ||
67 | AT91_SOC_CAP9, | ||
68 | |||
69 | /* SAM92xx */ | 61 | /* SAM92xx */ |
70 | AT91_SOC_SAM9260, AT91_SOC_SAM9261, AT91_SOC_SAM9263, | 62 | AT91_SOC_SAM9260, AT91_SOC_SAM9261, AT91_SOC_SAM9263, |
71 | 63 | ||
@@ -86,9 +78,6 @@ enum at91_soc_subtype { | |||
86 | /* RM9200 */ | 78 | /* RM9200 */ |
87 | AT91_SOC_RM9200_BGA, AT91_SOC_RM9200_PQFP, | 79 | AT91_SOC_RM9200_BGA, AT91_SOC_RM9200_PQFP, |
88 | 80 | ||
89 | /* CAP9 */ | ||
90 | AT91_SOC_CAP9_REV_B, AT91_SOC_CAP9_REV_C, | ||
91 | |||
92 | /* SAM9260 */ | 81 | /* SAM9260 */ |
93 | AT91_SOC_SAM9XE, | 82 | AT91_SOC_SAM9XE, |
94 | 83 | ||
@@ -195,16 +184,6 @@ static inline int at91_soc_is_detected(void) | |||
195 | #define cpu_is_at91sam9x25() (0) | 184 | #define cpu_is_at91sam9x25() (0) |
196 | #endif | 185 | #endif |
197 | 186 | ||
198 | #ifdef CONFIG_ARCH_AT91CAP9 | ||
199 | #define cpu_is_at91cap9() (at91_soc_initdata.type == AT91_SOC_CAP9) | ||
200 | #define cpu_is_at91cap9_revB() (at91_soc_initdata.subtype == AT91_SOC_CAP9_REV_B) | ||
201 | #define cpu_is_at91cap9_revC() (at91_soc_initdata.subtype == AT91_SOC_CAP9_REV_C) | ||
202 | #else | ||
203 | #define cpu_is_at91cap9() (0) | ||
204 | #define cpu_is_at91cap9_revB() (0) | ||
205 | #define cpu_is_at91cap9_revC() (0) | ||
206 | #endif | ||
207 | |||
208 | /* | 187 | /* |
209 | * Since this is ARM, we will never run on any AVR32 CPU. But these | 188 | * Since this is ARM, we will never run on any AVR32 CPU. But these |
210 | * definitions may reduce clutter in common drivers. | 189 | * definitions may reduce clutter in common drivers. |
diff --git a/arch/arm/mach-at91/include/mach/entry-macro.S b/arch/arm/mach-at91/include/mach/entry-macro.S index 423eea0ed74c..903bf205a333 100644 --- a/arch/arm/mach-at91/include/mach/entry-macro.S +++ b/arch/arm/mach-at91/include/mach/entry-macro.S | |||
@@ -13,17 +13,11 @@ | |||
13 | #include <mach/hardware.h> | 13 | #include <mach/hardware.h> |
14 | #include <mach/at91_aic.h> | 14 | #include <mach/at91_aic.h> |
15 | 15 | ||
16 | .macro disable_fiq | ||
17 | .endm | ||
18 | |||
19 | .macro get_irqnr_preamble, base, tmp | 16 | .macro get_irqnr_preamble, base, tmp |
20 | ldr \base, =at91_aic_base @ base virtual address of AIC peripheral | 17 | ldr \base, =at91_aic_base @ base virtual address of AIC peripheral |
21 | ldr \base, [\base] | 18 | ldr \base, [\base] |
22 | .endm | 19 | .endm |
23 | 20 | ||
24 | .macro arch_ret_to_user, tmp1, tmp2 | ||
25 | .endm | ||
26 | |||
27 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 21 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
28 | ldr \irqnr, [\base, #AT91_AIC_IVR] @ read IRQ vector register: de-asserts nIRQ to processor (and clears interrupt) | 22 | ldr \irqnr, [\base, #AT91_AIC_IVR] @ read IRQ vector register: de-asserts nIRQ to processor (and clears interrupt) |
29 | ldr \irqstat, [\base, #AT91_AIC_ISR] @ read interrupt source number | 23 | ldr \irqstat, [\base, #AT91_AIC_ISR] @ read interrupt source number |
diff --git a/arch/arm/mach-at91/include/mach/hardware.h b/arch/arm/mach-at91/include/mach/hardware.h index 2d0e4e998566..c213f28628c0 100644 --- a/arch/arm/mach-at91/include/mach/hardware.h +++ b/arch/arm/mach-at91/include/mach/hardware.h | |||
@@ -19,7 +19,7 @@ | |||
19 | /* DBGU base */ | 19 | /* DBGU base */ |
20 | /* rm9200, 9260/9g20, 9261/9g10, 9rl */ | 20 | /* rm9200, 9260/9g20, 9261/9g10, 9rl */ |
21 | #define AT91_BASE_DBGU0 0xfffff200 | 21 | #define AT91_BASE_DBGU0 0xfffff200 |
22 | /* 9263, 9g45, cap9 */ | 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_AT91RM9200) |
@@ -34,8 +34,6 @@ | |||
34 | #include <mach/at91sam9rl.h> | 34 | #include <mach/at91sam9rl.h> |
35 | #elif defined(CONFIG_ARCH_AT91SAM9G45) | 35 | #elif defined(CONFIG_ARCH_AT91SAM9G45) |
36 | #include <mach/at91sam9g45.h> | 36 | #include <mach/at91sam9g45.h> |
37 | #elif defined(CONFIG_ARCH_AT91CAP9) | ||
38 | #include <mach/at91cap9.h> | ||
39 | #elif defined(CONFIG_ARCH_AT91X40) | 37 | #elif defined(CONFIG_ARCH_AT91X40) |
40 | #include <mach/at91x40.h> | 38 | #include <mach/at91x40.h> |
41 | #else | 39 | #else |
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c index 1606379ac284..d554e6771b4e 100644 --- a/arch/arm/mach-at91/pm.c +++ b/arch/arm/mach-at91/pm.c | |||
@@ -150,11 +150,6 @@ static int at91_pm_verify_clocks(void) | |||
150 | pr_err("AT91: PM - Suspend-to-RAM with USB still active\n"); | 150 | pr_err("AT91: PM - Suspend-to-RAM with USB still active\n"); |
151 | return 0; | 151 | return 0; |
152 | } | 152 | } |
153 | } else if (cpu_is_at91cap9()) { | ||
154 | if ((scsr & AT91CAP9_PMC_UHP) != 0) { | ||
155 | pr_err("AT91: PM - Suspend-to-RAM with USB still active\n"); | ||
156 | return 0; | ||
157 | } | ||
158 | } | 153 | } |
159 | 154 | ||
160 | #ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS | 155 | #ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS |
@@ -203,7 +198,6 @@ extern u32 at91_slow_clock_sz; | |||
203 | 198 | ||
204 | static int at91_pm_enter(suspend_state_t state) | 199 | static int at91_pm_enter(suspend_state_t state) |
205 | { | 200 | { |
206 | u32 saved_lpr; | ||
207 | at91_gpio_suspend(); | 201 | at91_gpio_suspend(); |
208 | at91_irq_suspend(); | 202 | at91_irq_suspend(); |
209 | 203 | ||
@@ -259,16 +253,7 @@ static int at91_pm_enter(suspend_state_t state) | |||
259 | * For ARM 926 based chips, this requirement is weaker | 253 | * For ARM 926 based chips, this requirement is weaker |
260 | * as at91sam9 can access a RAM in self-refresh mode. | 254 | * as at91sam9 can access a RAM in self-refresh mode. |
261 | */ | 255 | */ |
262 | asm volatile ( "mov r0, #0\n\t" | 256 | at91_standby(); |
263 | "b 1f\n\t" | ||
264 | ".align 5\n\t" | ||
265 | "1: mcr p15, 0, r0, c7, c10, 4\n\t" | ||
266 | : /* no output */ | ||
267 | : /* no input */ | ||
268 | : "r0"); | ||
269 | saved_lpr = sdram_selfrefresh_enable(); | ||
270 | wait_for_interrupt_enable(); | ||
271 | sdram_selfrefresh_disable(saved_lpr); | ||
272 | break; | 257 | break; |
273 | 258 | ||
274 | case PM_SUSPEND_ON: | 259 | case PM_SUSPEND_ON: |
diff --git a/arch/arm/mach-at91/pm.h b/arch/arm/mach-at91/pm.h index 7eb40d24242f..bba9ce1aaaec 100644 --- a/arch/arm/mach-at91/pm.h +++ b/arch/arm/mach-at91/pm.h | |||
@@ -1,3 +1,16 @@ | |||
1 | /* | ||
2 | * AT91 Power Management | ||
3 | * | ||
4 | * Copyright (C) 2005 David Brownell | ||
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 | #ifndef __ARCH_ARM_MACH_AT91_PM | ||
12 | #define __ARCH_ARM_MACH_AT91_PM | ||
13 | |||
1 | #ifdef CONFIG_ARCH_AT91RM9200 | 14 | #ifdef CONFIG_ARCH_AT91RM9200 |
2 | #include <mach/at91rm9200_mc.h> | 15 | #include <mach/at91rm9200_mc.h> |
3 | 16 | ||
@@ -11,36 +24,25 @@ | |||
11 | * still in self-refresh is "not recommended", but seems to work. | 24 | * still in self-refresh is "not recommended", but seems to work. |
12 | */ | 25 | */ |
13 | 26 | ||
14 | static inline u32 sdram_selfrefresh_enable(void) | 27 | static inline void at91rm9200_standby(void) |
15 | { | ||
16 | u32 saved_lpr = at91_sys_read(AT91_SDRAMC_LPR); | ||
17 | |||
18 | at91_sys_write(AT91_SDRAMC_LPR, 0); | ||
19 | at91_sys_write(AT91_SDRAMC_SRR, 1); | ||
20 | return saved_lpr; | ||
21 | } | ||
22 | |||
23 | #define sdram_selfrefresh_disable(saved_lpr) at91_sys_write(AT91_SDRAMC_LPR, saved_lpr) | ||
24 | #define wait_for_interrupt_enable() asm volatile ("mcr p15, 0, %0, c7, c0, 4" \ | ||
25 | : : "r" (0)) | ||
26 | |||
27 | #elif defined(CONFIG_ARCH_AT91CAP9) | ||
28 | #include <mach/at91sam9_ddrsdr.h> | ||
29 | |||
30 | |||
31 | static inline u32 sdram_selfrefresh_enable(void) | ||
32 | { | 28 | { |
33 | u32 saved_lpr, lpr; | 29 | u32 lpr = at91_sys_read(AT91_SDRAMC_LPR); |
34 | 30 | ||
35 | saved_lpr = at91_ramc_read(0, AT91CAP9_DDRSDRC_LPR); | 31 | asm volatile( |
36 | 32 | "b 1f\n\t" | |
37 | lpr = saved_lpr & ~AT91_DDRSDRC_LPCB; | 33 | ".align 5\n\t" |
38 | at91_ramc_write(0, AT91CAP9_DDRSDRC_LPR, lpr | AT91_DDRSDRC_LPCB_SELF_REFRESH); | 34 | "1: mcr p15, 0, %0, c7, c10, 4\n\t" |
39 | return saved_lpr; | 35 | " str %0, [%1, %2]\n\t" |
36 | " str %3, [%1, %4]\n\t" | ||
37 | " mcr p15, 0, %0, c7, c0, 4\n\t" | ||
38 | " str %5, [%1, %2]" | ||
39 | : | ||
40 | : "r" (0), "r" (AT91_BASE_SYS), "r" (AT91_SDRAMC_LPR), | ||
41 | "r" (1), "r" (AT91_SDRAMC_SRR), | ||
42 | "r" (lpr)); | ||
40 | } | 43 | } |
41 | 44 | ||
42 | #define sdram_selfrefresh_disable(saved_lpr) at91_ramc_write(0, AT91CAP9_DDRSDRC_LPR, saved_lpr) | 45 | #define at91_standby at91rm9200_standby |
43 | #define wait_for_interrupt_enable() cpu_do_idle() | ||
44 | 46 | ||
45 | #elif defined(CONFIG_ARCH_AT91SAM9G45) | 47 | #elif defined(CONFIG_ARCH_AT91SAM9G45) |
46 | #include <mach/at91sam9_ddrsdr.h> | 48 | #include <mach/at91sam9_ddrsdr.h> |
@@ -48,14 +50,12 @@ static inline u32 sdram_selfrefresh_enable(void) | |||
48 | /* We manage both DDRAM/SDRAM controllers, we need more than one value to | 50 | /* We manage both DDRAM/SDRAM controllers, we need more than one value to |
49 | * remember. | 51 | * remember. |
50 | */ | 52 | */ |
51 | static u32 saved_lpr1; | 53 | static inline void at91sam9g45_standby(void) |
52 | |||
53 | static inline u32 sdram_selfrefresh_enable(void) | ||
54 | { | 54 | { |
55 | /* Those tow values allow us to delay self-refresh activation | 55 | /* Those two values allow us to delay self-refresh activation |
56 | * to the maximum. */ | 56 | * to the maximum. */ |
57 | u32 lpr0, lpr1; | 57 | u32 lpr0, lpr1; |
58 | u32 saved_lpr0; | 58 | u32 saved_lpr0, saved_lpr1; |
59 | 59 | ||
60 | saved_lpr1 = at91_ramc_read(1, AT91_DDRSDRC_LPR); | 60 | saved_lpr1 = at91_ramc_read(1, AT91_DDRSDRC_LPR); |
61 | lpr1 = saved_lpr1 & ~AT91_DDRSDRC_LPCB; | 61 | lpr1 = saved_lpr1 & ~AT91_DDRSDRC_LPCB; |
@@ -69,15 +69,13 @@ static inline u32 sdram_selfrefresh_enable(void) | |||
69 | at91_ramc_write(0, AT91_DDRSDRC_LPR, lpr0); | 69 | at91_ramc_write(0, AT91_DDRSDRC_LPR, lpr0); |
70 | at91_ramc_write(1, AT91_DDRSDRC_LPR, lpr1); | 70 | at91_ramc_write(1, AT91_DDRSDRC_LPR, lpr1); |
71 | 71 | ||
72 | return saved_lpr0; | 72 | cpu_do_idle(); |
73 | |||
74 | at91_ramc_write(0, AT91_DDRSDRC_LPR, saved_lpr0); | ||
75 | at91_ramc_write(1, AT91_DDRSDRC_LPR, saved_lpr1); | ||
73 | } | 76 | } |
74 | 77 | ||
75 | #define sdram_selfrefresh_disable(saved_lpr0) \ | 78 | #define at91_standby at91sam9g45_standby |
76 | do { \ | ||
77 | at91_ramc_write(0, AT91_DDRSDRC_LPR, saved_lpr0); \ | ||
78 | at91_ramc_write(1, AT91_DDRSDRC_LPR, saved_lpr1); \ | ||
79 | } while (0) | ||
80 | #define wait_for_interrupt_enable() cpu_do_idle() | ||
81 | 79 | ||
82 | #else | 80 | #else |
83 | #include <mach/at91sam9_sdramc.h> | 81 | #include <mach/at91sam9_sdramc.h> |
@@ -90,18 +88,23 @@ static inline u32 sdram_selfrefresh_enable(void) | |||
90 | #warning Assuming EB1 SDRAM controller is *NOT* used | 88 | #warning Assuming EB1 SDRAM controller is *NOT* used |
91 | #endif | 89 | #endif |
92 | 90 | ||
93 | static inline u32 sdram_selfrefresh_enable(void) | 91 | static inline void at91sam9_standby(void) |
94 | { | 92 | { |
95 | u32 saved_lpr, lpr; | 93 | u32 saved_lpr, lpr; |
96 | 94 | ||
97 | saved_lpr = at91_ramc_read(0, AT91_SDRAMC_LPR); | 95 | saved_lpr = at91_ramc_read(0, AT91_SDRAMC_LPR); |
98 | 96 | ||
99 | lpr = saved_lpr & ~AT91_SDRAMC_LPCB; | 97 | lpr = saved_lpr & ~AT91_SDRAMC_LPCB; |
100 | at91_ramc_write(0, AT91_SDRAMC_LPR, lpr | AT91_SDRAMC_LPCB_SELF_REFRESH); | 98 | at91_ramc_write(0, AT91_SDRAMC_LPR, lpr | |
101 | return saved_lpr; | 99 | AT91_SDRAMC_LPCB_SELF_REFRESH); |
100 | |||
101 | cpu_do_idle(); | ||
102 | |||
103 | at91_ramc_write(0, AT91_SDRAMC_LPR, saved_lpr); | ||
102 | } | 104 | } |
103 | 105 | ||
104 | #define sdram_selfrefresh_disable(saved_lpr) at91_ramc_write(0, AT91_SDRAMC_LPR, saved_lpr) | 106 | #define at91_standby at91sam9_standby |
105 | #define wait_for_interrupt_enable() cpu_do_idle() | 107 | |
108 | #endif | ||
106 | 109 | ||
107 | #endif | 110 | #endif |
diff --git a/arch/arm/mach-at91/pm_slowclock.S b/arch/arm/mach-at91/pm_slowclock.S index 92dfb8461392..f8539a8bcd6c 100644 --- a/arch/arm/mach-at91/pm_slowclock.S +++ b/arch/arm/mach-at91/pm_slowclock.S | |||
@@ -18,8 +18,7 @@ | |||
18 | 18 | ||
19 | #if defined(CONFIG_ARCH_AT91RM9200) | 19 | #if defined(CONFIG_ARCH_AT91RM9200) |
20 | #include <mach/at91rm9200_mc.h> | 20 | #include <mach/at91rm9200_mc.h> |
21 | #elif defined(CONFIG_ARCH_AT91CAP9) \ | 21 | #elif defined(CONFIG_ARCH_AT91SAM9G45) |
22 | || defined(CONFIG_ARCH_AT91SAM9G45) | ||
23 | #include <mach/at91sam9_ddrsdr.h> | 22 | #include <mach/at91sam9_ddrsdr.h> |
24 | #else | 23 | #else |
25 | #include <mach/at91sam9_sdramc.h> | 24 | #include <mach/at91sam9_sdramc.h> |
@@ -130,8 +129,7 @@ ENTRY(at91_slow_clock) | |||
130 | /* Put SDRAM in self-refresh mode */ | 129 | /* Put SDRAM in self-refresh mode */ |
131 | mov r3, #1 | 130 | mov r3, #1 |
132 | str r3, [r2, #AT91_SDRAMC_SRR] | 131 | str r3, [r2, #AT91_SDRAMC_SRR] |
133 | #elif defined(CONFIG_ARCH_AT91CAP9) \ | 132 | #elif defined(CONFIG_ARCH_AT91SAM9G45) |
134 | || defined(CONFIG_ARCH_AT91SAM9G45) | ||
135 | 133 | ||
136 | /* prepare for DDRAM self-refresh mode */ | 134 | /* prepare for DDRAM self-refresh mode */ |
137 | ldr r3, [r2, #AT91_DDRSDRC_LPR] | 135 | ldr r3, [r2, #AT91_DDRSDRC_LPR] |
@@ -263,8 +261,7 @@ ENTRY(at91_slow_clock) | |||
263 | 261 | ||
264 | #ifdef CONFIG_ARCH_AT91RM9200 | 262 | #ifdef CONFIG_ARCH_AT91RM9200 |
265 | /* Do nothing - self-refresh is automatically disabled. */ | 263 | /* Do nothing - self-refresh is automatically disabled. */ |
266 | #elif defined(CONFIG_ARCH_AT91CAP9) \ | 264 | #elif defined(CONFIG_ARCH_AT91SAM9G45) |
267 | || defined(CONFIG_ARCH_AT91SAM9G45) | ||
268 | /* Restore LPR on AT91 with DDRAM */ | 265 | /* Restore LPR on AT91 with DDRAM */ |
269 | ldr r3, .saved_sam9_lpr | 266 | ldr r3, .saved_sam9_lpr |
270 | str r3, [r2, #AT91_DDRSDRC_LPR] | 267 | str r3, [r2, #AT91_DDRSDRC_LPR] |
@@ -305,8 +302,7 @@ ENTRY(at91_slow_clock) | |||
305 | #ifdef CONFIG_ARCH_AT91RM9200 | 302 | #ifdef CONFIG_ARCH_AT91RM9200 |
306 | .at91_va_base_sdramc: | 303 | .at91_va_base_sdramc: |
307 | .word AT91_VA_BASE_SYS | 304 | .word AT91_VA_BASE_SYS |
308 | #elif defined(CONFIG_ARCH_AT91CAP9) \ | 305 | #elif defined(CONFIG_ARCH_AT91SAM9G45) |
309 | || defined(CONFIG_ARCH_AT91SAM9G45) | ||
310 | .at91_va_base_sdramc: | 306 | .at91_va_base_sdramc: |
311 | .word AT91_VA_BASE_SYS + AT91_DDRSDRC0 | 307 | .word AT91_VA_BASE_SYS + AT91_DDRSDRC0 |
312 | #else | 308 | #else |
diff --git a/arch/arm/mach-at91/sam9_smc.c b/arch/arm/mach-at91/sam9_smc.c index 8294783b679d..99a0a1d2b7dc 100644 --- a/arch/arm/mach-at91/sam9_smc.c +++ b/arch/arm/mach-at91/sam9_smc.c | |||
@@ -2,6 +2,7 @@ | |||
2 | * linux/arch/arm/mach-at91/sam9_smc.c | 2 | * linux/arch/arm/mach-at91/sam9_smc.c |
3 | * | 3 | * |
4 | * Copyright (C) 2008 Andrew Victor | 4 | * Copyright (C) 2008 Andrew Victor |
5 | * Copyright (C) 2011 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 version 2 as | 8 | * it under the terms of the GNU General Public License version 2 as |
@@ -22,7 +23,22 @@ | |||
22 | 23 | ||
23 | static void __iomem *smc_base_addr[2]; | 24 | static void __iomem *smc_base_addr[2]; |
24 | 25 | ||
25 | static void __init sam9_smc_cs_configure(void __iomem *base, struct sam9_smc_config* config) | 26 | static void sam9_smc_cs_write_mode(void __iomem *base, |
27 | struct sam9_smc_config *config) | ||
28 | { | ||
29 | __raw_writel(config->mode | ||
30 | | AT91_SMC_TDF_(config->tdf_cycles), | ||
31 | base + AT91_SMC_MODE); | ||
32 | } | ||
33 | |||
34 | void sam9_smc_write_mode(int id, int cs, | ||
35 | struct sam9_smc_config *config) | ||
36 | { | ||
37 | sam9_smc_cs_write_mode(AT91_SMC_CS(id, cs), config); | ||
38 | } | ||
39 | |||
40 | static void sam9_smc_cs_configure(void __iomem *base, | ||
41 | struct sam9_smc_config *config) | ||
26 | { | 42 | { |
27 | 43 | ||
28 | /* Setup register */ | 44 | /* Setup register */ |
@@ -45,16 +61,66 @@ static void __init sam9_smc_cs_configure(void __iomem *base, struct sam9_smc_con | |||
45 | base + AT91_SMC_CYCLE); | 61 | base + AT91_SMC_CYCLE); |
46 | 62 | ||
47 | /* Mode register */ | 63 | /* Mode register */ |
48 | __raw_writel(config->mode | 64 | sam9_smc_cs_write_mode(base, config); |
49 | | AT91_SMC_TDF_(config->tdf_cycles), | ||
50 | base + AT91_SMC_MODE); | ||
51 | } | 65 | } |
52 | 66 | ||
53 | void __init sam9_smc_configure(int id, int cs, struct sam9_smc_config* config) | 67 | void sam9_smc_configure(int id, int cs, |
68 | struct sam9_smc_config *config) | ||
54 | { | 69 | { |
55 | sam9_smc_cs_configure(AT91_SMC_CS(id, cs), config); | 70 | sam9_smc_cs_configure(AT91_SMC_CS(id, cs), config); |
56 | } | 71 | } |
57 | 72 | ||
73 | static void sam9_smc_cs_read_mode(void __iomem *base, | ||
74 | struct sam9_smc_config *config) | ||
75 | { | ||
76 | u32 val = __raw_readl(base + AT91_SMC_MODE); | ||
77 | |||
78 | config->mode = (val & ~AT91_SMC_NWECYCLE); | ||
79 | config->tdf_cycles = (val & AT91_SMC_NWECYCLE) >> 16 ; | ||
80 | } | ||
81 | |||
82 | void sam9_smc_read_mode(int id, int cs, | ||
83 | struct sam9_smc_config *config) | ||
84 | { | ||
85 | sam9_smc_cs_read_mode(AT91_SMC_CS(id, cs), config); | ||
86 | } | ||
87 | |||
88 | static void sam9_smc_cs_read(void __iomem *base, | ||
89 | struct sam9_smc_config *config) | ||
90 | { | ||
91 | u32 val; | ||
92 | |||
93 | /* Setup register */ | ||
94 | val = __raw_readl(base + AT91_SMC_SETUP); | ||
95 | |||
96 | config->nwe_setup = val & AT91_SMC_NWESETUP; | ||
97 | config->ncs_write_setup = (val & AT91_SMC_NCS_WRSETUP) >> 8; | ||
98 | config->nrd_setup = (val & AT91_SMC_NRDSETUP) >> 16; | ||
99 | config->ncs_read_setup = (val & AT91_SMC_NCS_RDSETUP) >> 24; | ||
100 | |||
101 | /* Pulse register */ | ||
102 | val = __raw_readl(base + AT91_SMC_PULSE); | ||
103 | |||
104 | config->nwe_setup = val & AT91_SMC_NWEPULSE; | ||
105 | config->ncs_write_pulse = (val & AT91_SMC_NCS_WRPULSE) >> 8; | ||
106 | config->nrd_pulse = (val & AT91_SMC_NRDPULSE) >> 16; | ||
107 | config->ncs_read_pulse = (val & AT91_SMC_NCS_RDPULSE) >> 24; | ||
108 | |||
109 | /* Cycle register */ | ||
110 | val = __raw_readl(base + AT91_SMC_CYCLE); | ||
111 | |||
112 | config->write_cycle = val & AT91_SMC_NWECYCLE; | ||
113 | config->read_cycle = (val & AT91_SMC_NRDCYCLE) >> 16; | ||
114 | |||
115 | /* Mode register */ | ||
116 | sam9_smc_cs_read_mode(base, config); | ||
117 | } | ||
118 | |||
119 | void sam9_smc_read(int id, int cs, struct sam9_smc_config *config) | ||
120 | { | ||
121 | sam9_smc_cs_read(AT91_SMC_CS(id, cs), config); | ||
122 | } | ||
123 | |||
58 | void __init at91sam9_ioremap_smc(int id, u32 addr) | 124 | void __init at91sam9_ioremap_smc(int id, u32 addr) |
59 | { | 125 | { |
60 | if (id > 1) { | 126 | if (id > 1) { |
diff --git a/arch/arm/mach-at91/sam9_smc.h b/arch/arm/mach-at91/sam9_smc.h index 039c5ce17aec..3e52dcd4a59f 100644 --- a/arch/arm/mach-at91/sam9_smc.h +++ b/arch/arm/mach-at91/sam9_smc.h | |||
@@ -8,27 +8,4 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | struct sam9_smc_config { | ||
12 | /* Setup register */ | ||
13 | u8 ncs_read_setup; | ||
14 | u8 nrd_setup; | ||
15 | u8 ncs_write_setup; | ||
16 | u8 nwe_setup; | ||
17 | |||
18 | /* Pulse register */ | ||
19 | u8 ncs_read_pulse; | ||
20 | u8 nrd_pulse; | ||
21 | u8 ncs_write_pulse; | ||
22 | u8 nwe_pulse; | ||
23 | |||
24 | /* Cycle register */ | ||
25 | u16 read_cycle; | ||
26 | u16 write_cycle; | ||
27 | |||
28 | /* Mode register */ | ||
29 | u32 mode; | ||
30 | u8 tdf_cycles:4; | ||
31 | }; | ||
32 | |||
33 | extern void __init sam9_smc_configure(int id, int cs, struct sam9_smc_config* config); | ||
34 | extern void __init at91sam9_ioremap_smc(int id, u32 addr); | 11 | extern void __init at91sam9_ioremap_smc(int id, u32 addr); |
diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c index 69d3fc4c46f3..620c67e8f814 100644 --- a/arch/arm/mach-at91/setup.c +++ b/arch/arm/mach-at91/setup.c | |||
@@ -86,20 +86,6 @@ static void __init soc_detect(u32 dbgu_base) | |||
86 | socid = cidr & ~AT91_CIDR_VERSION; | 86 | socid = cidr & ~AT91_CIDR_VERSION; |
87 | 87 | ||
88 | switch (socid) { | 88 | switch (socid) { |
89 | case ARCH_ID_AT91CAP9: { | ||
90 | #ifdef CONFIG_AT91_PMC_UNIT | ||
91 | u32 pmc_ver = at91_sys_read(AT91_PMC_VER); | ||
92 | |||
93 | if (pmc_ver == ARCH_REVISION_CAP9_B) | ||
94 | at91_soc_initdata.subtype = AT91_SOC_CAP9_REV_B; | ||
95 | else if (pmc_ver == ARCH_REVISION_CAP9_C) | ||
96 | at91_soc_initdata.subtype = AT91_SOC_CAP9_REV_C; | ||
97 | #endif | ||
98 | at91_soc_initdata.type = AT91_SOC_CAP9; | ||
99 | at91_boot_soc = at91cap9_soc; | ||
100 | break; | ||
101 | } | ||
102 | |||
103 | case ARCH_ID_AT91RM9200: | 89 | case ARCH_ID_AT91RM9200: |
104 | at91_soc_initdata.type = AT91_SOC_RM9200; | 90 | at91_soc_initdata.type = AT91_SOC_RM9200; |
105 | at91_boot_soc = at91rm9200_soc; | 91 | at91_boot_soc = at91rm9200_soc; |
@@ -200,7 +186,6 @@ static void __init soc_detect(u32 dbgu_base) | |||
200 | 186 | ||
201 | static const char *soc_name[] = { | 187 | static const char *soc_name[] = { |
202 | [AT91_SOC_RM9200] = "at91rm9200", | 188 | [AT91_SOC_RM9200] = "at91rm9200", |
203 | [AT91_SOC_CAP9] = "at91cap9", | ||
204 | [AT91_SOC_SAM9260] = "at91sam9260", | 189 | [AT91_SOC_SAM9260] = "at91sam9260", |
205 | [AT91_SOC_SAM9261] = "at91sam9261", | 190 | [AT91_SOC_SAM9261] = "at91sam9261", |
206 | [AT91_SOC_SAM9263] = "at91sam9263", | 191 | [AT91_SOC_SAM9263] = "at91sam9263", |
@@ -221,8 +206,6 @@ EXPORT_SYMBOL(at91_get_soc_type); | |||
221 | static const char *soc_subtype_name[] = { | 206 | static const char *soc_subtype_name[] = { |
222 | [AT91_SOC_RM9200_BGA] = "at91rm9200 BGA", | 207 | [AT91_SOC_RM9200_BGA] = "at91rm9200 BGA", |
223 | [AT91_SOC_RM9200_PQFP] = "at91rm9200 PQFP", | 208 | [AT91_SOC_RM9200_PQFP] = "at91rm9200 PQFP", |
224 | [AT91_SOC_CAP9_REV_B] = "at91cap9 revB", | ||
225 | [AT91_SOC_CAP9_REV_C] = "at91cap9 revC", | ||
226 | [AT91_SOC_SAM9XE] = "at91sam9xe", | 209 | [AT91_SOC_SAM9XE] = "at91sam9xe", |
227 | [AT91_SOC_SAM9G45ES] = "at91sam9g45es", | 210 | [AT91_SOC_SAM9G45ES] = "at91sam9g45es", |
228 | [AT91_SOC_SAM9M10] = "at91sam9m10", | 211 | [AT91_SOC_SAM9M10] = "at91sam9m10", |
diff --git a/arch/arm/mach-at91/soc.h b/arch/arm/mach-at91/soc.h index 4588ae6f7acd..5db4aa45404a 100644 --- a/arch/arm/mach-at91/soc.h +++ b/arch/arm/mach-at91/soc.h | |||
@@ -13,7 +13,6 @@ struct at91_init_soc { | |||
13 | }; | 13 | }; |
14 | 14 | ||
15 | extern struct at91_init_soc at91_boot_soc; | 15 | extern struct at91_init_soc at91_boot_soc; |
16 | extern struct at91_init_soc at91cap9_soc; | ||
17 | extern struct at91_init_soc at91rm9200_soc; | 16 | extern struct at91_init_soc at91rm9200_soc; |
18 | extern struct at91_init_soc at91sam9260_soc; | 17 | extern struct at91_init_soc at91sam9260_soc; |
19 | extern struct at91_init_soc at91sam9261_soc; | 18 | extern struct at91_init_soc at91sam9261_soc; |
@@ -27,10 +26,6 @@ static inline int at91_soc_is_enabled(void) | |||
27 | return at91_boot_soc.init != NULL; | 26 | return at91_boot_soc.init != NULL; |
28 | } | 27 | } |
29 | 28 | ||
30 | #if !defined(CONFIG_ARCH_AT91CAP9) | ||
31 | #define at91cap9_soc at91_boot_soc | ||
32 | #endif | ||
33 | |||
34 | #if !defined(CONFIG_ARCH_AT91RM9200) | 29 | #if !defined(CONFIG_ARCH_AT91RM9200) |
35 | #define at91rm9200_soc at91_boot_soc | 30 | #define at91rm9200_soc at91_boot_soc |
36 | #endif | 31 | #endif |
diff --git a/arch/arm/mach-bcmring/arch.c b/arch/arm/mach-bcmring/arch.c index 9e5e7552498c..45c97b1ee9b1 100644 --- a/arch/arm/mach-bcmring/arch.c +++ b/arch/arm/mach-bcmring/arch.c | |||
@@ -194,6 +194,6 @@ MACHINE_START(BCMRING, "BCMRING") | |||
194 | .init_early = bcmring_init_early, | 194 | .init_early = bcmring_init_early, |
195 | .init_irq = bcmring_init_irq, | 195 | .init_irq = bcmring_init_irq, |
196 | .timer = &bcmring_timer, | 196 | .timer = &bcmring_timer, |
197 | .init_machine = bcmring_init_machine | 197 | .init_machine = bcmring_init_machine, |
198 | .restart = bcmring_restart, | 198 | .restart = bcmring_restart, |
199 | MACHINE_END | 199 | MACHINE_END |
diff --git a/arch/arm/mach-bcmring/dma.c b/arch/arm/mach-bcmring/dma.c index 1a1a27dd5654..1024396797e1 100644 --- a/arch/arm/mach-bcmring/dma.c +++ b/arch/arm/mach-bcmring/dma.c | |||
@@ -33,17 +33,11 @@ | |||
33 | 33 | ||
34 | #include <mach/timer.h> | 34 | #include <mach/timer.h> |
35 | 35 | ||
36 | #include <linux/mm.h> | ||
37 | #include <linux/pfn.h> | 36 | #include <linux/pfn.h> |
38 | #include <linux/atomic.h> | 37 | #include <linux/atomic.h> |
39 | #include <linux/sched.h> | 38 | #include <linux/sched.h> |
40 | #include <mach/dma.h> | 39 | #include <mach/dma.h> |
41 | 40 | ||
42 | /* I don't quite understand why dc4 fails when this is set to 1 and DMA is enabled */ | ||
43 | /* especially since dc4 doesn't use kmalloc'd memory. */ | ||
44 | |||
45 | #define ALLOW_MAP_OF_KMALLOC_MEMORY 0 | ||
46 | |||
47 | /* ---- Public Variables ------------------------------------------------- */ | 41 | /* ---- Public Variables ------------------------------------------------- */ |
48 | 42 | ||
49 | /* ---- Private Constants and Types -------------------------------------- */ | 43 | /* ---- Private Constants and Types -------------------------------------- */ |
@@ -53,24 +47,12 @@ | |||
53 | #define CONTROLLER_FROM_HANDLE(handle) (((handle) >> 4) & 0x0f) | 47 | #define CONTROLLER_FROM_HANDLE(handle) (((handle) >> 4) & 0x0f) |
54 | #define CHANNEL_FROM_HANDLE(handle) ((handle) & 0x0f) | 48 | #define CHANNEL_FROM_HANDLE(handle) ((handle) & 0x0f) |
55 | 49 | ||
56 | #define DMA_MAP_DEBUG 0 | ||
57 | |||
58 | #if DMA_MAP_DEBUG | ||
59 | # define DMA_MAP_PRINT(fmt, args...) printk("%s: " fmt, __func__, ## args) | ||
60 | #else | ||
61 | # define DMA_MAP_PRINT(fmt, args...) | ||
62 | #endif | ||
63 | 50 | ||
64 | /* ---- Private Variables ------------------------------------------------ */ | 51 | /* ---- Private Variables ------------------------------------------------ */ |
65 | 52 | ||
66 | static DMA_Global_t gDMA; | 53 | static DMA_Global_t gDMA; |
67 | static struct proc_dir_entry *gDmaDir; | 54 | static struct proc_dir_entry *gDmaDir; |
68 | 55 | ||
69 | static atomic_t gDmaStatMemTypeKmalloc = ATOMIC_INIT(0); | ||
70 | static atomic_t gDmaStatMemTypeVmalloc = ATOMIC_INIT(0); | ||
71 | static atomic_t gDmaStatMemTypeUser = ATOMIC_INIT(0); | ||
72 | static atomic_t gDmaStatMemTypeCoherent = ATOMIC_INIT(0); | ||
73 | |||
74 | #include "dma_device.c" | 56 | #include "dma_device.c" |
75 | 57 | ||
76 | /* ---- Private Function Prototypes -------------------------------------- */ | 58 | /* ---- Private Function Prototypes -------------------------------------- */ |
@@ -79,34 +61,6 @@ static atomic_t gDmaStatMemTypeCoherent = ATOMIC_INIT(0); | |||
79 | 61 | ||
80 | /****************************************************************************/ | 62 | /****************************************************************************/ |
81 | /** | 63 | /** |
82 | * Displays information for /proc/dma/mem-type | ||
83 | */ | ||
84 | /****************************************************************************/ | ||
85 | |||
86 | static int dma_proc_read_mem_type(char *buf, char **start, off_t offset, | ||
87 | int count, int *eof, void *data) | ||
88 | { | ||
89 | int len = 0; | ||
90 | |||
91 | len += sprintf(buf + len, "dma_map_mem statistics\n"); | ||
92 | len += | ||
93 | sprintf(buf + len, "coherent: %d\n", | ||
94 | atomic_read(&gDmaStatMemTypeCoherent)); | ||
95 | len += | ||
96 | sprintf(buf + len, "kmalloc: %d\n", | ||
97 | atomic_read(&gDmaStatMemTypeKmalloc)); | ||
98 | len += | ||
99 | sprintf(buf + len, "vmalloc: %d\n", | ||
100 | atomic_read(&gDmaStatMemTypeVmalloc)); | ||
101 | len += | ||
102 | sprintf(buf + len, "user: %d\n", | ||
103 | atomic_read(&gDmaStatMemTypeUser)); | ||
104 | |||
105 | return len; | ||
106 | } | ||
107 | |||
108 | /****************************************************************************/ | ||
109 | /** | ||
110 | * Displays information for /proc/dma/channels | 64 | * Displays information for /proc/dma/channels |
111 | */ | 65 | */ |
112 | /****************************************************************************/ | 66 | /****************************************************************************/ |
@@ -846,8 +800,6 @@ int dma_init(void) | |||
846 | dma_proc_read_channels, NULL); | 800 | dma_proc_read_channels, NULL); |
847 | create_proc_read_entry("devices", 0, gDmaDir, | 801 | create_proc_read_entry("devices", 0, gDmaDir, |
848 | dma_proc_read_devices, NULL); | 802 | dma_proc_read_devices, NULL); |
849 | create_proc_read_entry("mem-type", 0, gDmaDir, | ||
850 | dma_proc_read_mem_type, NULL); | ||
851 | } | 803 | } |
852 | 804 | ||
853 | out: | 805 | out: |
@@ -1565,767 +1517,3 @@ int dma_set_device_handler(DMA_Device_t dev, /* Device to set the callback for. | |||
1565 | } | 1517 | } |
1566 | 1518 | ||
1567 | EXPORT_SYMBOL(dma_set_device_handler); | 1519 | EXPORT_SYMBOL(dma_set_device_handler); |
1568 | |||
1569 | /****************************************************************************/ | ||
1570 | /** | ||
1571 | * Initializes a memory mapping structure | ||
1572 | */ | ||
1573 | /****************************************************************************/ | ||
1574 | |||
1575 | int dma_init_mem_map(DMA_MemMap_t *memMap) | ||
1576 | { | ||
1577 | memset(memMap, 0, sizeof(*memMap)); | ||
1578 | |||
1579 | sema_init(&memMap->lock, 1); | ||
1580 | |||
1581 | return 0; | ||
1582 | } | ||
1583 | |||
1584 | EXPORT_SYMBOL(dma_init_mem_map); | ||
1585 | |||
1586 | /****************************************************************************/ | ||
1587 | /** | ||
1588 | * Releases any memory currently being held by a memory mapping structure. | ||
1589 | */ | ||
1590 | /****************************************************************************/ | ||
1591 | |||
1592 | int dma_term_mem_map(DMA_MemMap_t *memMap) | ||
1593 | { | ||
1594 | down(&memMap->lock); /* Just being paranoid */ | ||
1595 | |||
1596 | /* Free up any allocated memory */ | ||
1597 | |||
1598 | up(&memMap->lock); | ||
1599 | memset(memMap, 0, sizeof(*memMap)); | ||
1600 | |||
1601 | return 0; | ||
1602 | } | ||
1603 | |||
1604 | EXPORT_SYMBOL(dma_term_mem_map); | ||
1605 | |||
1606 | /****************************************************************************/ | ||
1607 | /** | ||
1608 | * Looks at a memory address and categorizes it. | ||
1609 | * | ||
1610 | * @return One of the values from the DMA_MemType_t enumeration. | ||
1611 | */ | ||
1612 | /****************************************************************************/ | ||
1613 | |||
1614 | DMA_MemType_t dma_mem_type(void *addr) | ||
1615 | { | ||
1616 | unsigned long addrVal = (unsigned long)addr; | ||
1617 | |||
1618 | if (addrVal >= CONSISTENT_BASE) { | ||
1619 | /* NOTE: DMA virtual memory space starts at 0xFFxxxxxx */ | ||
1620 | |||
1621 | /* dma_alloc_xxx pages are physically and virtually contiguous */ | ||
1622 | |||
1623 | return DMA_MEM_TYPE_DMA; | ||
1624 | } | ||
1625 | |||
1626 | /* Technically, we could add one more classification. Addresses between VMALLOC_END */ | ||
1627 | /* and the beginning of the DMA virtual address could be considered to be I/O space. */ | ||
1628 | /* Right now, nobody cares about this particular classification, so we ignore it. */ | ||
1629 | |||
1630 | if (is_vmalloc_addr(addr)) { | ||
1631 | /* Address comes from the vmalloc'd region. Pages are virtually */ | ||
1632 | /* contiguous but NOT physically contiguous */ | ||
1633 | |||
1634 | return DMA_MEM_TYPE_VMALLOC; | ||
1635 | } | ||
1636 | |||
1637 | if (addrVal >= PAGE_OFFSET) { | ||
1638 | /* PAGE_OFFSET is typically 0xC0000000 */ | ||
1639 | |||
1640 | /* kmalloc'd pages are physically contiguous */ | ||
1641 | |||
1642 | return DMA_MEM_TYPE_KMALLOC; | ||
1643 | } | ||
1644 | |||
1645 | return DMA_MEM_TYPE_USER; | ||
1646 | } | ||
1647 | |||
1648 | EXPORT_SYMBOL(dma_mem_type); | ||
1649 | |||
1650 | /****************************************************************************/ | ||
1651 | /** | ||
1652 | * Looks at a memory address and determines if we support DMA'ing to/from | ||
1653 | * that type of memory. | ||
1654 | * | ||
1655 | * @return boolean - | ||
1656 | * return value != 0 means dma supported | ||
1657 | * return value == 0 means dma not supported | ||
1658 | */ | ||
1659 | /****************************************************************************/ | ||
1660 | |||
1661 | int dma_mem_supports_dma(void *addr) | ||
1662 | { | ||
1663 | DMA_MemType_t memType = dma_mem_type(addr); | ||
1664 | |||
1665 | return (memType == DMA_MEM_TYPE_DMA) | ||
1666 | #if ALLOW_MAP_OF_KMALLOC_MEMORY | ||
1667 | || (memType == DMA_MEM_TYPE_KMALLOC) | ||
1668 | #endif | ||
1669 | || (memType == DMA_MEM_TYPE_USER); | ||
1670 | } | ||
1671 | |||
1672 | EXPORT_SYMBOL(dma_mem_supports_dma); | ||
1673 | |||
1674 | /****************************************************************************/ | ||
1675 | /** | ||
1676 | * Maps in a memory region such that it can be used for performing a DMA. | ||
1677 | * | ||
1678 | * @return | ||
1679 | */ | ||
1680 | /****************************************************************************/ | ||
1681 | |||
1682 | int dma_map_start(DMA_MemMap_t *memMap, /* Stores state information about the map */ | ||
1683 | enum dma_data_direction dir /* Direction that the mapping will be going */ | ||
1684 | ) { | ||
1685 | int rc; | ||
1686 | |||
1687 | down(&memMap->lock); | ||
1688 | |||
1689 | DMA_MAP_PRINT("memMap: %p\n", memMap); | ||
1690 | |||
1691 | if (memMap->inUse) { | ||
1692 | printk(KERN_ERR "%s: memory map %p is already being used\n", | ||
1693 | __func__, memMap); | ||
1694 | rc = -EBUSY; | ||
1695 | goto out; | ||
1696 | } | ||
1697 | |||
1698 | memMap->inUse = 1; | ||
1699 | memMap->dir = dir; | ||
1700 | memMap->numRegionsUsed = 0; | ||
1701 | |||
1702 | rc = 0; | ||
1703 | |||
1704 | out: | ||
1705 | |||
1706 | DMA_MAP_PRINT("returning %d", rc); | ||
1707 | |||
1708 | up(&memMap->lock); | ||
1709 | |||
1710 | return rc; | ||
1711 | } | ||
1712 | |||
1713 | EXPORT_SYMBOL(dma_map_start); | ||
1714 | |||
1715 | /****************************************************************************/ | ||
1716 | /** | ||
1717 | * Adds a segment of memory to a memory map. Each segment is both | ||
1718 | * physically and virtually contiguous. | ||
1719 | * | ||
1720 | * @return 0 on success, error code otherwise. | ||
1721 | */ | ||
1722 | /****************************************************************************/ | ||
1723 | |||
1724 | static int dma_map_add_segment(DMA_MemMap_t *memMap, /* Stores state information about the map */ | ||
1725 | DMA_Region_t *region, /* Region that the segment belongs to */ | ||
1726 | void *virtAddr, /* Virtual address of the segment being added */ | ||
1727 | dma_addr_t physAddr, /* Physical address of the segment being added */ | ||
1728 | size_t numBytes /* Number of bytes of the segment being added */ | ||
1729 | ) { | ||
1730 | DMA_Segment_t *segment; | ||
1731 | |||
1732 | DMA_MAP_PRINT("memMap:%p va:%p pa:0x%x #:%d\n", memMap, virtAddr, | ||
1733 | physAddr, numBytes); | ||
1734 | |||
1735 | /* Sanity check */ | ||
1736 | |||
1737 | if (((unsigned long)virtAddr < (unsigned long)region->virtAddr) | ||
1738 | || (((unsigned long)virtAddr + numBytes)) > | ||
1739 | ((unsigned long)region->virtAddr + region->numBytes)) { | ||
1740 | printk(KERN_ERR | ||
1741 | "%s: virtAddr %p is outside region @ %p len: %d\n", | ||
1742 | __func__, virtAddr, region->virtAddr, region->numBytes); | ||
1743 | return -EINVAL; | ||
1744 | } | ||
1745 | |||
1746 | if (region->numSegmentsUsed > 0) { | ||
1747 | /* Check to see if this segment is physically contiguous with the previous one */ | ||
1748 | |||
1749 | segment = ®ion->segment[region->numSegmentsUsed - 1]; | ||
1750 | |||
1751 | if ((segment->physAddr + segment->numBytes) == physAddr) { | ||
1752 | /* It is - just add on to the end */ | ||
1753 | |||
1754 | DMA_MAP_PRINT("appending %d bytes to last segment\n", | ||
1755 | numBytes); | ||
1756 | |||
1757 | segment->numBytes += numBytes; | ||
1758 | |||
1759 | return 0; | ||
1760 | } | ||
1761 | } | ||
1762 | |||
1763 | /* Reallocate to hold more segments, if required. */ | ||
1764 | |||
1765 | if (region->numSegmentsUsed >= region->numSegmentsAllocated) { | ||
1766 | DMA_Segment_t *newSegment; | ||
1767 | size_t oldSize = | ||
1768 | region->numSegmentsAllocated * sizeof(*newSegment); | ||
1769 | int newAlloc = region->numSegmentsAllocated + 4; | ||
1770 | size_t newSize = newAlloc * sizeof(*newSegment); | ||
1771 | |||
1772 | newSegment = kmalloc(newSize, GFP_KERNEL); | ||
1773 | if (newSegment == NULL) { | ||
1774 | return -ENOMEM; | ||
1775 | } | ||
1776 | memcpy(newSegment, region->segment, oldSize); | ||
1777 | memset(&((uint8_t *) newSegment)[oldSize], 0, | ||
1778 | newSize - oldSize); | ||
1779 | kfree(region->segment); | ||
1780 | |||
1781 | region->numSegmentsAllocated = newAlloc; | ||
1782 | region->segment = newSegment; | ||
1783 | } | ||
1784 | |||
1785 | segment = ®ion->segment[region->numSegmentsUsed]; | ||
1786 | region->numSegmentsUsed++; | ||
1787 | |||
1788 | segment->virtAddr = virtAddr; | ||
1789 | segment->physAddr = physAddr; | ||
1790 | segment->numBytes = numBytes; | ||
1791 | |||
1792 | DMA_MAP_PRINT("returning success\n"); | ||
1793 | |||
1794 | return 0; | ||
1795 | } | ||
1796 | |||
1797 | /****************************************************************************/ | ||
1798 | /** | ||
1799 | * Adds a region of memory to a memory map. Each region is virtually | ||
1800 | * contiguous, but not necessarily physically contiguous. | ||
1801 | * | ||
1802 | * @return 0 on success, error code otherwise. | ||
1803 | */ | ||
1804 | /****************************************************************************/ | ||
1805 | |||
1806 | int dma_map_add_region(DMA_MemMap_t *memMap, /* Stores state information about the map */ | ||
1807 | void *mem, /* Virtual address that we want to get a map of */ | ||
1808 | size_t numBytes /* Number of bytes being mapped */ | ||
1809 | ) { | ||
1810 | unsigned long addr = (unsigned long)mem; | ||
1811 | unsigned int offset; | ||
1812 | int rc = 0; | ||
1813 | DMA_Region_t *region; | ||
1814 | dma_addr_t physAddr; | ||
1815 | |||
1816 | down(&memMap->lock); | ||
1817 | |||
1818 | DMA_MAP_PRINT("memMap:%p va:%p #:%d\n", memMap, mem, numBytes); | ||
1819 | |||
1820 | if (!memMap->inUse) { | ||
1821 | printk(KERN_ERR "%s: Make sure you call dma_map_start first\n", | ||
1822 | __func__); | ||
1823 | rc = -EINVAL; | ||
1824 | goto out; | ||
1825 | } | ||
1826 | |||
1827 | /* Reallocate to hold more regions. */ | ||
1828 | |||
1829 | if (memMap->numRegionsUsed >= memMap->numRegionsAllocated) { | ||
1830 | DMA_Region_t *newRegion; | ||
1831 | size_t oldSize = | ||
1832 | memMap->numRegionsAllocated * sizeof(*newRegion); | ||
1833 | int newAlloc = memMap->numRegionsAllocated + 4; | ||
1834 | size_t newSize = newAlloc * sizeof(*newRegion); | ||
1835 | |||
1836 | newRegion = kmalloc(newSize, GFP_KERNEL); | ||
1837 | if (newRegion == NULL) { | ||
1838 | rc = -ENOMEM; | ||
1839 | goto out; | ||
1840 | } | ||
1841 | memcpy(newRegion, memMap->region, oldSize); | ||
1842 | memset(&((uint8_t *) newRegion)[oldSize], 0, newSize - oldSize); | ||
1843 | |||
1844 | kfree(memMap->region); | ||
1845 | |||
1846 | memMap->numRegionsAllocated = newAlloc; | ||
1847 | memMap->region = newRegion; | ||
1848 | } | ||
1849 | |||
1850 | region = &memMap->region[memMap->numRegionsUsed]; | ||
1851 | memMap->numRegionsUsed++; | ||
1852 | |||
1853 | offset = addr & ~PAGE_MASK; | ||
1854 | |||
1855 | region->memType = dma_mem_type(mem); | ||
1856 | region->virtAddr = mem; | ||
1857 | region->numBytes = numBytes; | ||
1858 | region->numSegmentsUsed = 0; | ||
1859 | region->numLockedPages = 0; | ||
1860 | region->lockedPages = NULL; | ||
1861 | |||
1862 | switch (region->memType) { | ||
1863 | case DMA_MEM_TYPE_VMALLOC: | ||
1864 | { | ||
1865 | atomic_inc(&gDmaStatMemTypeVmalloc); | ||
1866 | |||
1867 | /* printk(KERN_ERR "%s: vmalloc'd pages are not supported\n", __func__); */ | ||
1868 | |||
1869 | /* vmalloc'd pages are not physically contiguous */ | ||
1870 | |||
1871 | rc = -EINVAL; | ||
1872 | break; | ||
1873 | } | ||
1874 | |||
1875 | case DMA_MEM_TYPE_KMALLOC: | ||
1876 | { | ||
1877 | atomic_inc(&gDmaStatMemTypeKmalloc); | ||
1878 | |||
1879 | /* kmalloc'd pages are physically contiguous, so they'll have exactly */ | ||
1880 | /* one segment */ | ||
1881 | |||
1882 | #if ALLOW_MAP_OF_KMALLOC_MEMORY | ||
1883 | physAddr = | ||
1884 | dma_map_single(NULL, mem, numBytes, memMap->dir); | ||
1885 | rc = dma_map_add_segment(memMap, region, mem, physAddr, | ||
1886 | numBytes); | ||
1887 | #else | ||
1888 | rc = -EINVAL; | ||
1889 | #endif | ||
1890 | break; | ||
1891 | } | ||
1892 | |||
1893 | case DMA_MEM_TYPE_DMA: | ||
1894 | { | ||
1895 | /* dma_alloc_xxx pages are physically contiguous */ | ||
1896 | |||
1897 | atomic_inc(&gDmaStatMemTypeCoherent); | ||
1898 | |||
1899 | physAddr = (vmalloc_to_pfn(mem) << PAGE_SHIFT) + offset; | ||
1900 | |||
1901 | dma_sync_single_for_cpu(NULL, physAddr, numBytes, | ||
1902 | memMap->dir); | ||
1903 | rc = dma_map_add_segment(memMap, region, mem, physAddr, | ||
1904 | numBytes); | ||
1905 | break; | ||
1906 | } | ||
1907 | |||
1908 | case DMA_MEM_TYPE_USER: | ||
1909 | { | ||
1910 | size_t firstPageOffset; | ||
1911 | size_t firstPageSize; | ||
1912 | struct page **pages; | ||
1913 | struct task_struct *userTask; | ||
1914 | |||
1915 | atomic_inc(&gDmaStatMemTypeUser); | ||
1916 | |||
1917 | #if 1 | ||
1918 | /* If the pages are user pages, then the dma_mem_map_set_user_task function */ | ||
1919 | /* must have been previously called. */ | ||
1920 | |||
1921 | if (memMap->userTask == NULL) { | ||
1922 | printk(KERN_ERR | ||
1923 | "%s: must call dma_mem_map_set_user_task when using user-mode memory\n", | ||
1924 | __func__); | ||
1925 | return -EINVAL; | ||
1926 | } | ||
1927 | |||
1928 | /* User pages need to be locked. */ | ||
1929 | |||
1930 | firstPageOffset = | ||
1931 | (unsigned long)region->virtAddr & (PAGE_SIZE - 1); | ||
1932 | firstPageSize = PAGE_SIZE - firstPageOffset; | ||
1933 | |||
1934 | region->numLockedPages = (firstPageOffset | ||
1935 | + region->numBytes + | ||
1936 | PAGE_SIZE - 1) / PAGE_SIZE; | ||
1937 | pages = | ||
1938 | kmalloc(region->numLockedPages * | ||
1939 | sizeof(struct page *), GFP_KERNEL); | ||
1940 | |||
1941 | if (pages == NULL) { | ||
1942 | region->numLockedPages = 0; | ||
1943 | return -ENOMEM; | ||
1944 | } | ||
1945 | |||
1946 | userTask = memMap->userTask; | ||
1947 | |||
1948 | down_read(&userTask->mm->mmap_sem); | ||
1949 | rc = get_user_pages(userTask, /* task */ | ||
1950 | userTask->mm, /* mm */ | ||
1951 | (unsigned long)region->virtAddr, /* start */ | ||
1952 | region->numLockedPages, /* len */ | ||
1953 | memMap->dir == DMA_FROM_DEVICE, /* write */ | ||
1954 | 0, /* force */ | ||
1955 | pages, /* pages (array of pointers to page) */ | ||
1956 | NULL); /* vmas */ | ||
1957 | up_read(&userTask->mm->mmap_sem); | ||
1958 | |||
1959 | if (rc != region->numLockedPages) { | ||
1960 | kfree(pages); | ||
1961 | region->numLockedPages = 0; | ||
1962 | |||
1963 | if (rc >= 0) { | ||
1964 | rc = -EINVAL; | ||
1965 | } | ||
1966 | } else { | ||
1967 | uint8_t *virtAddr = region->virtAddr; | ||
1968 | size_t bytesRemaining; | ||
1969 | int pageIdx; | ||
1970 | |||
1971 | rc = 0; /* Since get_user_pages returns +ve number */ | ||
1972 | |||
1973 | region->lockedPages = pages; | ||
1974 | |||
1975 | /* We've locked the user pages. Now we need to walk them and figure */ | ||
1976 | /* out the physical addresses. */ | ||
1977 | |||
1978 | /* The first page may be partial */ | ||
1979 | |||
1980 | dma_map_add_segment(memMap, | ||
1981 | region, | ||
1982 | virtAddr, | ||
1983 | PFN_PHYS(page_to_pfn | ||
1984 | (pages[0])) + | ||
1985 | firstPageOffset, | ||
1986 | firstPageSize); | ||
1987 | |||
1988 | virtAddr += firstPageSize; | ||
1989 | bytesRemaining = | ||
1990 | region->numBytes - firstPageSize; | ||
1991 | |||
1992 | for (pageIdx = 1; | ||
1993 | pageIdx < region->numLockedPages; | ||
1994 | pageIdx++) { | ||
1995 | size_t bytesThisPage = | ||
1996 | (bytesRemaining > | ||
1997 | PAGE_SIZE ? PAGE_SIZE : | ||
1998 | bytesRemaining); | ||
1999 | |||
2000 | DMA_MAP_PRINT | ||
2001 | ("pageIdx:%d pages[pageIdx]=%p pfn=%u phys=%u\n", | ||
2002 | pageIdx, pages[pageIdx], | ||
2003 | page_to_pfn(pages[pageIdx]), | ||
2004 | PFN_PHYS(page_to_pfn | ||
2005 | (pages[pageIdx]))); | ||
2006 | |||
2007 | dma_map_add_segment(memMap, | ||
2008 | region, | ||
2009 | virtAddr, | ||
2010 | PFN_PHYS(page_to_pfn | ||
2011 | (pages | ||
2012 | [pageIdx])), | ||
2013 | bytesThisPage); | ||
2014 | |||
2015 | virtAddr += bytesThisPage; | ||
2016 | bytesRemaining -= bytesThisPage; | ||
2017 | } | ||
2018 | } | ||
2019 | #else | ||
2020 | printk(KERN_ERR | ||
2021 | "%s: User mode pages are not yet supported\n", | ||
2022 | __func__); | ||
2023 | |||
2024 | /* user pages are not physically contiguous */ | ||
2025 | |||
2026 | rc = -EINVAL; | ||
2027 | #endif | ||
2028 | break; | ||
2029 | } | ||
2030 | |||
2031 | default: | ||
2032 | { | ||
2033 | printk(KERN_ERR "%s: Unsupported memory type: %d\n", | ||
2034 | __func__, region->memType); | ||
2035 | |||
2036 | rc = -EINVAL; | ||
2037 | break; | ||
2038 | } | ||
2039 | } | ||
2040 | |||
2041 | if (rc != 0) { | ||
2042 | memMap->numRegionsUsed--; | ||
2043 | } | ||
2044 | |||
2045 | out: | ||
2046 | |||
2047 | DMA_MAP_PRINT("returning %d\n", rc); | ||
2048 | |||
2049 | up(&memMap->lock); | ||
2050 | |||
2051 | return rc; | ||
2052 | } | ||
2053 | |||
2054 | EXPORT_SYMBOL(dma_map_add_segment); | ||
2055 | |||
2056 | /****************************************************************************/ | ||
2057 | /** | ||
2058 | * Maps in a memory region such that it can be used for performing a DMA. | ||
2059 | * | ||
2060 | * @return 0 on success, error code otherwise. | ||
2061 | */ | ||
2062 | /****************************************************************************/ | ||
2063 | |||
2064 | int dma_map_mem(DMA_MemMap_t *memMap, /* Stores state information about the map */ | ||
2065 | void *mem, /* Virtual address that we want to get a map of */ | ||
2066 | size_t numBytes, /* Number of bytes being mapped */ | ||
2067 | enum dma_data_direction dir /* Direction that the mapping will be going */ | ||
2068 | ) { | ||
2069 | int rc; | ||
2070 | |||
2071 | rc = dma_map_start(memMap, dir); | ||
2072 | if (rc == 0) { | ||
2073 | rc = dma_map_add_region(memMap, mem, numBytes); | ||
2074 | if (rc < 0) { | ||
2075 | /* Since the add fails, this function will fail, and the caller won't */ | ||
2076 | /* call unmap, so we need to do it here. */ | ||
2077 | |||
2078 | dma_unmap(memMap, 0); | ||
2079 | } | ||
2080 | } | ||
2081 | |||
2082 | return rc; | ||
2083 | } | ||
2084 | |||
2085 | EXPORT_SYMBOL(dma_map_mem); | ||
2086 | |||
2087 | /****************************************************************************/ | ||
2088 | /** | ||
2089 | * Setup a descriptor ring for a given memory map. | ||
2090 | * | ||
2091 | * It is assumed that the descriptor ring has already been initialized, and | ||
2092 | * this routine will only reallocate a new descriptor ring if the existing | ||
2093 | * one is too small. | ||
2094 | * | ||
2095 | * @return 0 on success, error code otherwise. | ||
2096 | */ | ||
2097 | /****************************************************************************/ | ||
2098 | |||
2099 | int dma_map_create_descriptor_ring(DMA_Device_t dev, /* DMA device (where the ring is stored) */ | ||
2100 | DMA_MemMap_t *memMap, /* Memory map that will be used */ | ||
2101 | dma_addr_t devPhysAddr /* Physical address of device */ | ||
2102 | ) { | ||
2103 | int rc; | ||
2104 | int numDescriptors; | ||
2105 | DMA_DeviceAttribute_t *devAttr; | ||
2106 | DMA_Region_t *region; | ||
2107 | DMA_Segment_t *segment; | ||
2108 | dma_addr_t srcPhysAddr; | ||
2109 | dma_addr_t dstPhysAddr; | ||
2110 | int regionIdx; | ||
2111 | int segmentIdx; | ||
2112 | |||
2113 | devAttr = &DMA_gDeviceAttribute[dev]; | ||
2114 | |||
2115 | down(&memMap->lock); | ||
2116 | |||
2117 | /* Figure out how many descriptors we need */ | ||
2118 | |||
2119 | numDescriptors = 0; | ||
2120 | for (regionIdx = 0; regionIdx < memMap->numRegionsUsed; regionIdx++) { | ||
2121 | region = &memMap->region[regionIdx]; | ||
2122 | |||
2123 | for (segmentIdx = 0; segmentIdx < region->numSegmentsUsed; | ||
2124 | segmentIdx++) { | ||
2125 | segment = ®ion->segment[segmentIdx]; | ||
2126 | |||
2127 | if (memMap->dir == DMA_TO_DEVICE) { | ||
2128 | srcPhysAddr = segment->physAddr; | ||
2129 | dstPhysAddr = devPhysAddr; | ||
2130 | } else { | ||
2131 | srcPhysAddr = devPhysAddr; | ||
2132 | dstPhysAddr = segment->physAddr; | ||
2133 | } | ||
2134 | |||
2135 | rc = | ||
2136 | dma_calculate_descriptor_count(dev, srcPhysAddr, | ||
2137 | dstPhysAddr, | ||
2138 | segment-> | ||
2139 | numBytes); | ||
2140 | if (rc < 0) { | ||
2141 | printk(KERN_ERR | ||
2142 | "%s: dma_calculate_descriptor_count failed: %d\n", | ||
2143 | __func__, rc); | ||
2144 | goto out; | ||
2145 | } | ||
2146 | numDescriptors += rc; | ||
2147 | } | ||
2148 | } | ||
2149 | |||
2150 | /* Adjust the size of the ring, if it isn't big enough */ | ||
2151 | |||
2152 | if (numDescriptors > devAttr->ring.descriptorsAllocated) { | ||
2153 | dma_free_descriptor_ring(&devAttr->ring); | ||
2154 | rc = | ||
2155 | dma_alloc_descriptor_ring(&devAttr->ring, | ||
2156 | numDescriptors); | ||
2157 | if (rc < 0) { | ||
2158 | printk(KERN_ERR | ||
2159 | "%s: dma_alloc_descriptor_ring failed: %d\n", | ||
2160 | __func__, rc); | ||
2161 | goto out; | ||
2162 | } | ||
2163 | } else { | ||
2164 | rc = | ||
2165 | dma_init_descriptor_ring(&devAttr->ring, | ||
2166 | numDescriptors); | ||
2167 | if (rc < 0) { | ||
2168 | printk(KERN_ERR | ||
2169 | "%s: dma_init_descriptor_ring failed: %d\n", | ||
2170 | __func__, rc); | ||
2171 | goto out; | ||
2172 | } | ||
2173 | } | ||
2174 | |||
2175 | /* Populate the descriptors */ | ||
2176 | |||
2177 | for (regionIdx = 0; regionIdx < memMap->numRegionsUsed; regionIdx++) { | ||
2178 | region = &memMap->region[regionIdx]; | ||
2179 | |||
2180 | for (segmentIdx = 0; segmentIdx < region->numSegmentsUsed; | ||
2181 | segmentIdx++) { | ||
2182 | segment = ®ion->segment[segmentIdx]; | ||
2183 | |||
2184 | if (memMap->dir == DMA_TO_DEVICE) { | ||
2185 | srcPhysAddr = segment->physAddr; | ||
2186 | dstPhysAddr = devPhysAddr; | ||
2187 | } else { | ||
2188 | srcPhysAddr = devPhysAddr; | ||
2189 | dstPhysAddr = segment->physAddr; | ||
2190 | } | ||
2191 | |||
2192 | rc = | ||
2193 | dma_add_descriptors(&devAttr->ring, dev, | ||
2194 | srcPhysAddr, dstPhysAddr, | ||
2195 | segment->numBytes); | ||
2196 | if (rc < 0) { | ||
2197 | printk(KERN_ERR | ||
2198 | "%s: dma_add_descriptors failed: %d\n", | ||
2199 | __func__, rc); | ||
2200 | goto out; | ||
2201 | } | ||
2202 | } | ||
2203 | } | ||
2204 | |||
2205 | rc = 0; | ||
2206 | |||
2207 | out: | ||
2208 | |||
2209 | up(&memMap->lock); | ||
2210 | return rc; | ||
2211 | } | ||
2212 | |||
2213 | EXPORT_SYMBOL(dma_map_create_descriptor_ring); | ||
2214 | |||
2215 | /****************************************************************************/ | ||
2216 | /** | ||
2217 | * Maps in a memory region such that it can be used for performing a DMA. | ||
2218 | * | ||
2219 | * @return | ||
2220 | */ | ||
2221 | /****************************************************************************/ | ||
2222 | |||
2223 | int dma_unmap(DMA_MemMap_t *memMap, /* Stores state information about the map */ | ||
2224 | int dirtied /* non-zero if any of the pages were modified */ | ||
2225 | ) { | ||
2226 | |||
2227 | int rc = 0; | ||
2228 | int regionIdx; | ||
2229 | int segmentIdx; | ||
2230 | DMA_Region_t *region; | ||
2231 | DMA_Segment_t *segment; | ||
2232 | |||
2233 | down(&memMap->lock); | ||
2234 | |||
2235 | for (regionIdx = 0; regionIdx < memMap->numRegionsUsed; regionIdx++) { | ||
2236 | region = &memMap->region[regionIdx]; | ||
2237 | |||
2238 | for (segmentIdx = 0; segmentIdx < region->numSegmentsUsed; | ||
2239 | segmentIdx++) { | ||
2240 | segment = ®ion->segment[segmentIdx]; | ||
2241 | |||
2242 | switch (region->memType) { | ||
2243 | case DMA_MEM_TYPE_VMALLOC: | ||
2244 | { | ||
2245 | printk(KERN_ERR | ||
2246 | "%s: vmalloc'd pages are not yet supported\n", | ||
2247 | __func__); | ||
2248 | rc = -EINVAL; | ||
2249 | goto out; | ||
2250 | } | ||
2251 | |||
2252 | case DMA_MEM_TYPE_KMALLOC: | ||
2253 | { | ||
2254 | #if ALLOW_MAP_OF_KMALLOC_MEMORY | ||
2255 | dma_unmap_single(NULL, | ||
2256 | segment->physAddr, | ||
2257 | segment->numBytes, | ||
2258 | memMap->dir); | ||
2259 | #endif | ||
2260 | break; | ||
2261 | } | ||
2262 | |||
2263 | case DMA_MEM_TYPE_DMA: | ||
2264 | { | ||
2265 | dma_sync_single_for_cpu(NULL, | ||
2266 | segment-> | ||
2267 | physAddr, | ||
2268 | segment-> | ||
2269 | numBytes, | ||
2270 | memMap->dir); | ||
2271 | break; | ||
2272 | } | ||
2273 | |||
2274 | case DMA_MEM_TYPE_USER: | ||
2275 | { | ||
2276 | /* Nothing to do here. */ | ||
2277 | |||
2278 | break; | ||
2279 | } | ||
2280 | |||
2281 | default: | ||
2282 | { | ||
2283 | printk(KERN_ERR | ||
2284 | "%s: Unsupported memory type: %d\n", | ||
2285 | __func__, region->memType); | ||
2286 | rc = -EINVAL; | ||
2287 | goto out; | ||
2288 | } | ||
2289 | } | ||
2290 | |||
2291 | segment->virtAddr = NULL; | ||
2292 | segment->physAddr = 0; | ||
2293 | segment->numBytes = 0; | ||
2294 | } | ||
2295 | |||
2296 | if (region->numLockedPages > 0) { | ||
2297 | int pageIdx; | ||
2298 | |||
2299 | /* Some user pages were locked. We need to go and unlock them now. */ | ||
2300 | |||
2301 | for (pageIdx = 0; pageIdx < region->numLockedPages; | ||
2302 | pageIdx++) { | ||
2303 | struct page *page = | ||
2304 | region->lockedPages[pageIdx]; | ||
2305 | |||
2306 | if (memMap->dir == DMA_FROM_DEVICE) { | ||
2307 | SetPageDirty(page); | ||
2308 | } | ||
2309 | page_cache_release(page); | ||
2310 | } | ||
2311 | kfree(region->lockedPages); | ||
2312 | region->numLockedPages = 0; | ||
2313 | region->lockedPages = NULL; | ||
2314 | } | ||
2315 | |||
2316 | region->memType = DMA_MEM_TYPE_NONE; | ||
2317 | region->virtAddr = NULL; | ||
2318 | region->numBytes = 0; | ||
2319 | region->numSegmentsUsed = 0; | ||
2320 | } | ||
2321 | memMap->userTask = NULL; | ||
2322 | memMap->numRegionsUsed = 0; | ||
2323 | memMap->inUse = 0; | ||
2324 | |||
2325 | out: | ||
2326 | up(&memMap->lock); | ||
2327 | |||
2328 | return rc; | ||
2329 | } | ||
2330 | |||
2331 | EXPORT_SYMBOL(dma_unmap); | ||
diff --git a/arch/arm/mach-bcmring/include/mach/dma.h b/arch/arm/mach-bcmring/include/mach/dma.h index 1f2c5319c056..72543781207b 100644 --- a/arch/arm/mach-bcmring/include/mach/dma.h +++ b/arch/arm/mach-bcmring/include/mach/dma.h | |||
@@ -26,15 +26,9 @@ | |||
26 | /* ---- Include Files ---------------------------------------------------- */ | 26 | /* ---- Include Files ---------------------------------------------------- */ |
27 | 27 | ||
28 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
29 | #include <linux/wait.h> | ||
30 | #include <linux/semaphore.h> | 29 | #include <linux/semaphore.h> |
31 | #include <csp/dmacHw.h> | 30 | #include <csp/dmacHw.h> |
32 | #include <mach/timer.h> | 31 | #include <mach/timer.h> |
33 | #include <linux/scatterlist.h> | ||
34 | #include <linux/dma-mapping.h> | ||
35 | #include <linux/mm.h> | ||
36 | #include <linux/vmalloc.h> | ||
37 | #include <linux/pagemap.h> | ||
38 | 32 | ||
39 | /* ---- Constants and Types ---------------------------------------------- */ | 33 | /* ---- Constants and Types ---------------------------------------------- */ |
40 | 34 | ||
@@ -113,78 +107,6 @@ typedef struct { | |||
113 | 107 | ||
114 | /**************************************************************************** | 108 | /**************************************************************************** |
115 | * | 109 | * |
116 | * The DMA_MemType_t and DMA_MemMap_t are helper structures used to setup | ||
117 | * DMA chains from a variety of memory sources. | ||
118 | * | ||
119 | *****************************************************************************/ | ||
120 | |||
121 | #define DMA_MEM_MAP_MIN_SIZE 4096 /* Pages less than this size are better */ | ||
122 | /* off not being DMA'd. */ | ||
123 | |||
124 | typedef enum { | ||
125 | DMA_MEM_TYPE_NONE, /* Not a valid setting */ | ||
126 | DMA_MEM_TYPE_VMALLOC, /* Memory came from vmalloc call */ | ||
127 | DMA_MEM_TYPE_KMALLOC, /* Memory came from kmalloc call */ | ||
128 | DMA_MEM_TYPE_DMA, /* Memory came from dma_alloc_xxx call */ | ||
129 | DMA_MEM_TYPE_USER, /* Memory came from user space. */ | ||
130 | |||
131 | } DMA_MemType_t; | ||
132 | |||
133 | /* A segment represents a physically and virtually contiguous chunk of memory. */ | ||
134 | /* i.e. each segment can be DMA'd */ | ||
135 | /* A user of the DMA code will add memory regions. Each region may need to be */ | ||
136 | /* represented by one or more segments. */ | ||
137 | |||
138 | typedef struct { | ||
139 | void *virtAddr; /* Virtual address used for this segment */ | ||
140 | dma_addr_t physAddr; /* Physical address this segment maps to */ | ||
141 | size_t numBytes; /* Size of the segment, in bytes */ | ||
142 | |||
143 | } DMA_Segment_t; | ||
144 | |||
145 | /* A region represents a virtually contiguous chunk of memory, which may be */ | ||
146 | /* made up of multiple segments. */ | ||
147 | |||
148 | typedef struct { | ||
149 | DMA_MemType_t memType; | ||
150 | void *virtAddr; | ||
151 | size_t numBytes; | ||
152 | |||
153 | /* Each region (virtually contiguous) consists of one or more segments. Each */ | ||
154 | /* segment is virtually and physically contiguous. */ | ||
155 | |||
156 | int numSegmentsUsed; | ||
157 | int numSegmentsAllocated; | ||
158 | DMA_Segment_t *segment; | ||
159 | |||
160 | /* When a region corresponds to user memory, we need to lock all of the pages */ | ||
161 | /* down before we can figure out the physical addresses. The lockedPage array contains */ | ||
162 | /* the pages that were locked, and which subsequently need to be unlocked once the */ | ||
163 | /* memory is unmapped. */ | ||
164 | |||
165 | unsigned numLockedPages; | ||
166 | struct page **lockedPages; | ||
167 | |||
168 | } DMA_Region_t; | ||
169 | |||
170 | typedef struct { | ||
171 | int inUse; /* Is this mapping currently being used? */ | ||
172 | struct semaphore lock; /* Acquired when using this structure */ | ||
173 | enum dma_data_direction dir; /* Direction this transfer is intended for */ | ||
174 | |||
175 | /* In the event that we're mapping user memory, we need to know which task */ | ||
176 | /* the memory is for, so that we can obtain the correct mm locks. */ | ||
177 | |||
178 | struct task_struct *userTask; | ||
179 | |||
180 | int numRegionsUsed; | ||
181 | int numRegionsAllocated; | ||
182 | DMA_Region_t *region; | ||
183 | |||
184 | } DMA_MemMap_t; | ||
185 | |||
186 | /**************************************************************************** | ||
187 | * | ||
188 | * The DMA_DeviceAttribute_t contains information which describes a | 110 | * The DMA_DeviceAttribute_t contains information which describes a |
189 | * particular DMA device (or peripheral). | 111 | * particular DMA device (or peripheral). |
190 | * | 112 | * |
@@ -570,124 +492,6 @@ int dma_alloc_double_dst_descriptors(DMA_Handle_t handle, /* DMA Handle */ | |||
570 | 492 | ||
571 | /****************************************************************************/ | 493 | /****************************************************************************/ |
572 | /** | 494 | /** |
573 | * Initializes a DMA_MemMap_t data structure | ||
574 | */ | ||
575 | /****************************************************************************/ | ||
576 | |||
577 | int dma_init_mem_map(DMA_MemMap_t *memMap /* Stores state information about the map */ | ||
578 | ); | ||
579 | |||
580 | /****************************************************************************/ | ||
581 | /** | ||
582 | * Releases any memory currently being held by a memory mapping structure. | ||
583 | */ | ||
584 | /****************************************************************************/ | ||
585 | |||
586 | int dma_term_mem_map(DMA_MemMap_t *memMap /* Stores state information about the map */ | ||
587 | ); | ||
588 | |||
589 | /****************************************************************************/ | ||
590 | /** | ||
591 | * Looks at a memory address and categorizes it. | ||
592 | * | ||
593 | * @return One of the values from the DMA_MemType_t enumeration. | ||
594 | */ | ||
595 | /****************************************************************************/ | ||
596 | |||
597 | DMA_MemType_t dma_mem_type(void *addr); | ||
598 | |||
599 | /****************************************************************************/ | ||
600 | /** | ||
601 | * Sets the process (aka userTask) associated with a mem map. This is | ||
602 | * required if user-mode segments will be added to the mapping. | ||
603 | */ | ||
604 | /****************************************************************************/ | ||
605 | |||
606 | static inline void dma_mem_map_set_user_task(DMA_MemMap_t *memMap, | ||
607 | struct task_struct *task) | ||
608 | { | ||
609 | memMap->userTask = task; | ||
610 | } | ||
611 | |||
612 | /****************************************************************************/ | ||
613 | /** | ||
614 | * Looks at a memory address and determines if we support DMA'ing to/from | ||
615 | * that type of memory. | ||
616 | * | ||
617 | * @return boolean - | ||
618 | * return value != 0 means dma supported | ||
619 | * return value == 0 means dma not supported | ||
620 | */ | ||
621 | /****************************************************************************/ | ||
622 | |||
623 | int dma_mem_supports_dma(void *addr); | ||
624 | |||
625 | /****************************************************************************/ | ||
626 | /** | ||
627 | * Initializes a memory map for use. Since this function acquires a | ||
628 | * sempaphore within the memory map, it is VERY important that dma_unmap | ||
629 | * be called when you're finished using the map. | ||
630 | */ | ||
631 | /****************************************************************************/ | ||
632 | |||
633 | int dma_map_start(DMA_MemMap_t *memMap, /* Stores state information about the map */ | ||
634 | enum dma_data_direction dir /* Direction that the mapping will be going */ | ||
635 | ); | ||
636 | |||
637 | /****************************************************************************/ | ||
638 | /** | ||
639 | * Adds a segment of memory to a memory map. | ||
640 | * | ||
641 | * @return 0 on success, error code otherwise. | ||
642 | */ | ||
643 | /****************************************************************************/ | ||
644 | |||
645 | int dma_map_add_region(DMA_MemMap_t *memMap, /* Stores state information about the map */ | ||
646 | void *mem, /* Virtual address that we want to get a map of */ | ||
647 | size_t numBytes /* Number of bytes being mapped */ | ||
648 | ); | ||
649 | |||
650 | /****************************************************************************/ | ||
651 | /** | ||
652 | * Creates a descriptor ring from a memory mapping. | ||
653 | * | ||
654 | * @return 0 on success, error code otherwise. | ||
655 | */ | ||
656 | /****************************************************************************/ | ||
657 | |||
658 | int dma_map_create_descriptor_ring(DMA_Device_t dev, /* DMA device (where the ring is stored) */ | ||
659 | DMA_MemMap_t *memMap, /* Memory map that will be used */ | ||
660 | dma_addr_t devPhysAddr /* Physical address of device */ | ||
661 | ); | ||
662 | |||
663 | /****************************************************************************/ | ||
664 | /** | ||
665 | * Maps in a memory region such that it can be used for performing a DMA. | ||
666 | * | ||
667 | * @return | ||
668 | */ | ||
669 | /****************************************************************************/ | ||
670 | |||
671 | int dma_map_mem(DMA_MemMap_t *memMap, /* Stores state information about the map */ | ||
672 | void *addr, /* Virtual address that we want to get a map of */ | ||
673 | size_t count, /* Number of bytes being mapped */ | ||
674 | enum dma_data_direction dir /* Direction that the mapping will be going */ | ||
675 | ); | ||
676 | |||
677 | /****************************************************************************/ | ||
678 | /** | ||
679 | * Maps in a memory region such that it can be used for performing a DMA. | ||
680 | * | ||
681 | * @return | ||
682 | */ | ||
683 | /****************************************************************************/ | ||
684 | |||
685 | int dma_unmap(DMA_MemMap_t *memMap, /* Stores state information about the map */ | ||
686 | int dirtied /* non-zero if any of the pages were modified */ | ||
687 | ); | ||
688 | |||
689 | /****************************************************************************/ | ||
690 | /** | ||
691 | * Initiates a transfer when the descriptors have already been setup. | 495 | * Initiates a transfer when the descriptors have already been setup. |
692 | * | 496 | * |
693 | * This is a special case, and normally, the dma_transfer_xxx functions should | 497 | * This is a special case, and normally, the dma_transfer_xxx functions should |
diff --git a/arch/arm/mach-bcmring/include/mach/entry-macro.S b/arch/arm/mach-bcmring/include/mach/entry-macro.S index 94c950d783ba..2f316f0e6e69 100644 --- a/arch/arm/mach-bcmring/include/mach/entry-macro.S +++ b/arch/arm/mach-bcmring/include/mach/entry-macro.S | |||
@@ -21,9 +21,6 @@ | |||
21 | #include <mach/hardware.h> | 21 | #include <mach/hardware.h> |
22 | #include <mach/csp/mm_io.h> | 22 | #include <mach/csp/mm_io.h> |
23 | 23 | ||
24 | .macro disable_fiq | ||
25 | .endm | ||
26 | |||
27 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 24 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
28 | ldr \base, =(MM_IO_BASE_INTC0) | 25 | ldr \base, =(MM_IO_BASE_INTC0) |
29 | ldr \irqstat, [\base, #0] @ get status | 26 | ldr \irqstat, [\base, #0] @ get status |
@@ -77,6 +74,3 @@ | |||
77 | 74 | ||
78 | .macro get_irqnr_preamble, base, tmp | 75 | .macro get_irqnr_preamble, base, tmp |
79 | .endm | 76 | .endm |
80 | |||
81 | .macro arch_ret_to_user, tmp1, tmp2 | ||
82 | .endm | ||
diff --git a/arch/arm/mach-clps711x/include/mach/entry-macro.S b/arch/arm/mach-clps711x/include/mach/entry-macro.S index 90fa2f70489f..125af59d7a29 100644 --- a/arch/arm/mach-clps711x/include/mach/entry-macro.S +++ b/arch/arm/mach-clps711x/include/mach/entry-macro.S | |||
@@ -10,15 +10,9 @@ | |||
10 | #include <mach/hardware.h> | 10 | #include <mach/hardware.h> |
11 | #include <asm/hardware/clps7111.h> | 11 | #include <asm/hardware/clps7111.h> |
12 | 12 | ||
13 | .macro disable_fiq | ||
14 | .endm | ||
15 | |||
16 | .macro get_irqnr_preamble, base, tmp | 13 | .macro get_irqnr_preamble, base, tmp |
17 | .endm | 14 | .endm |
18 | 15 | ||
19 | .macro arch_ret_to_user, tmp1, tmp2 | ||
20 | .endm | ||
21 | |||
22 | #if (INTSR2 - INTSR1) != (INTMR2 - INTMR1) | 16 | #if (INTSR2 - INTSR1) != (INTMR2 - INTMR1) |
23 | #error INTSR stride != INTMR stride | 17 | #error INTSR stride != INTMR stride |
24 | #endif | 18 | #endif |
diff --git a/arch/arm/mach-cns3xxx/include/mach/entry-macro.S b/arch/arm/mach-cns3xxx/include/mach/entry-macro.S deleted file mode 100644 index 01c57df5f716..000000000000 --- a/arch/arm/mach-cns3xxx/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | /* | ||
2 | * Low-level IRQ helper macros for Cavium Networks platforms | ||
3 | * | ||
4 | * Copyright 2008 Cavium Networks | ||
5 | * | ||
6 | * This file 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 | .macro disable_fiq | ||
12 | .endm | ||
13 | |||
14 | .macro arch_ret_to_user, tmp1, tmp2 | ||
15 | .endm | ||
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index 6b22b543a83f..d5088900af6c 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c | |||
@@ -44,7 +44,7 @@ | |||
44 | #include <mach/aemif.h> | 44 | #include <mach/aemif.h> |
45 | #include <mach/spi.h> | 45 | #include <mach/spi.h> |
46 | 46 | ||
47 | #define DA850_EVM_PHY_ID "0:00" | 47 | #define DA850_EVM_PHY_ID "davinci_mdio-0:00" |
48 | #define DA850_LCD_PWR_PIN GPIO_TO_PIN(2, 8) | 48 | #define DA850_LCD_PWR_PIN GPIO_TO_PIN(2, 8) |
49 | #define DA850_LCD_BL_PIN GPIO_TO_PIN(2, 15) | 49 | #define DA850_LCD_BL_PIN GPIO_TO_PIN(2, 15) |
50 | 50 | ||
diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c index 275341f159fb..82ed753fb360 100644 --- a/arch/arm/mach-davinci/board-dm355-evm.c +++ b/arch/arm/mach-davinci/board-dm355-evm.c | |||
@@ -26,13 +26,14 @@ | |||
26 | #include <asm/mach-types.h> | 26 | #include <asm/mach-types.h> |
27 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
28 | 28 | ||
29 | #include <mach/dm355.h> | ||
30 | #include <mach/i2c.h> | 29 | #include <mach/i2c.h> |
31 | #include <mach/serial.h> | 30 | #include <mach/serial.h> |
32 | #include <mach/nand.h> | 31 | #include <mach/nand.h> |
33 | #include <mach/mmc.h> | 32 | #include <mach/mmc.h> |
34 | #include <mach/usb.h> | 33 | #include <mach/usb.h> |
35 | 34 | ||
35 | #include "davinci.h" | ||
36 | |||
36 | /* NOTE: this is geared for the standard config, with a socketed | 37 | /* NOTE: this is geared for the standard config, with a socketed |
37 | * 2 GByte Micron NAND (MT29F16G08FAA) using 128KB sectors. If you | 38 | * 2 GByte Micron NAND (MT29F16G08FAA) using 128KB sectors. If you |
38 | * swap chips, maybe with a different block size, partitioning may | 39 | * swap chips, maybe with a different block size, partitioning may |
diff --git a/arch/arm/mach-davinci/board-dm355-leopard.c b/arch/arm/mach-davinci/board-dm355-leopard.c index e99db28181ae..d74a8b3445fb 100644 --- a/arch/arm/mach-davinci/board-dm355-leopard.c +++ b/arch/arm/mach-davinci/board-dm355-leopard.c | |||
@@ -23,13 +23,14 @@ | |||
23 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
24 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
25 | 25 | ||
26 | #include <mach/dm355.h> | ||
27 | #include <mach/i2c.h> | 26 | #include <mach/i2c.h> |
28 | #include <mach/serial.h> | 27 | #include <mach/serial.h> |
29 | #include <mach/nand.h> | 28 | #include <mach/nand.h> |
30 | #include <mach/mmc.h> | 29 | #include <mach/mmc.h> |
31 | #include <mach/usb.h> | 30 | #include <mach/usb.h> |
32 | 31 | ||
32 | #include "davinci.h" | ||
33 | |||
33 | /* NOTE: this is geared for the standard config, with a socketed | 34 | /* NOTE: this is geared for the standard config, with a socketed |
34 | * 2 GByte Micron NAND (MT29F16G08FAA) using 128KB sectors. If you | 35 | * 2 GByte Micron NAND (MT29F16G08FAA) using 128KB sectors. If you |
35 | * swap chips, maybe with a different block size, partitioning may | 36 | * swap chips, maybe with a different block size, partitioning may |
diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c index 346e1de2f5a8..5bce2b83bb4f 100644 --- a/arch/arm/mach-davinci/board-dm365-evm.c +++ b/arch/arm/mach-davinci/board-dm365-evm.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <asm/mach/arch.h> | 32 | #include <asm/mach/arch.h> |
33 | 33 | ||
34 | #include <mach/mux.h> | 34 | #include <mach/mux.h> |
35 | #include <mach/dm365.h> | ||
36 | #include <mach/common.h> | 35 | #include <mach/common.h> |
37 | #include <mach/i2c.h> | 36 | #include <mach/i2c.h> |
38 | #include <mach/serial.h> | 37 | #include <mach/serial.h> |
@@ -42,6 +41,8 @@ | |||
42 | 41 | ||
43 | #include <media/tvp514x.h> | 42 | #include <media/tvp514x.h> |
44 | 43 | ||
44 | #include "davinci.h" | ||
45 | |||
45 | static inline int have_imager(void) | 46 | static inline int have_imager(void) |
46 | { | 47 | { |
47 | /* REVISIT when it's supported, trigger via Kconfig */ | 48 | /* REVISIT when it's supported, trigger via Kconfig */ |
@@ -54,7 +55,7 @@ static inline int have_tvp7002(void) | |||
54 | return 0; | 55 | return 0; |
55 | } | 56 | } |
56 | 57 | ||
57 | #define DM365_EVM_PHY_ID "0:01" | 58 | #define DM365_EVM_PHY_ID "davinci_mdio-0:01" |
58 | /* | 59 | /* |
59 | * A MAX-II CPLD is used for various board control functions. | 60 | * A MAX-II CPLD is used for various board control functions. |
60 | */ | 61 | */ |
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index a64b49cfedca..864f676eccac 100644 --- a/arch/arm/mach-davinci/board-dm644x-evm.c +++ b/arch/arm/mach-davinci/board-dm644x-evm.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
31 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
32 | 32 | ||
33 | #include <mach/dm644x.h> | ||
34 | #include <mach/common.h> | 33 | #include <mach/common.h> |
35 | #include <mach/i2c.h> | 34 | #include <mach/i2c.h> |
36 | #include <mach/serial.h> | 35 | #include <mach/serial.h> |
@@ -40,7 +39,9 @@ | |||
40 | #include <mach/usb.h> | 39 | #include <mach/usb.h> |
41 | #include <mach/aemif.h> | 40 | #include <mach/aemif.h> |
42 | 41 | ||
43 | #define DM644X_EVM_PHY_ID "0:01" | 42 | #include "davinci.h" |
43 | |||
44 | #define DM644X_EVM_PHY_ID "davinci_mdio-0:01" | ||
44 | #define LXT971_PHY_ID (0x001378e2) | 45 | #define LXT971_PHY_ID (0x001378e2) |
45 | #define LXT971_PHY_MASK (0xfffffff0) | 46 | #define LXT971_PHY_MASK (0xfffffff0) |
46 | 47 | ||
@@ -189,7 +190,7 @@ static struct platform_device davinci_fb_device = { | |||
189 | .num_resources = 0, | 190 | .num_resources = 0, |
190 | }; | 191 | }; |
191 | 192 | ||
192 | static struct tvp514x_platform_data tvp5146_pdata = { | 193 | static struct tvp514x_platform_data dm644xevm_tvp5146_pdata = { |
193 | .clk_polarity = 0, | 194 | .clk_polarity = 0, |
194 | .hs_polarity = 1, | 195 | .hs_polarity = 1, |
195 | .vs_polarity = 1 | 196 | .vs_polarity = 1 |
@@ -197,7 +198,7 @@ static struct tvp514x_platform_data tvp5146_pdata = { | |||
197 | 198 | ||
198 | #define TVP514X_STD_ALL (V4L2_STD_NTSC | V4L2_STD_PAL) | 199 | #define TVP514X_STD_ALL (V4L2_STD_NTSC | V4L2_STD_PAL) |
199 | /* Inputs available at the TVP5146 */ | 200 | /* Inputs available at the TVP5146 */ |
200 | static struct v4l2_input tvp5146_inputs[] = { | 201 | static struct v4l2_input dm644xevm_tvp5146_inputs[] = { |
201 | { | 202 | { |
202 | .index = 0, | 203 | .index = 0, |
203 | .name = "Composite", | 204 | .name = "Composite", |
@@ -217,7 +218,7 @@ static struct v4l2_input tvp5146_inputs[] = { | |||
217 | * ouput that goes to vpfe. There is a one to one correspondence | 218 | * ouput that goes to vpfe. There is a one to one correspondence |
218 | * with tvp5146_inputs | 219 | * with tvp5146_inputs |
219 | */ | 220 | */ |
220 | static struct vpfe_route tvp5146_routes[] = { | 221 | static struct vpfe_route dm644xevm_tvp5146_routes[] = { |
221 | { | 222 | { |
222 | .input = INPUT_CVBS_VI2B, | 223 | .input = INPUT_CVBS_VI2B, |
223 | .output = OUTPUT_10BIT_422_EMBEDDED_SYNC, | 224 | .output = OUTPUT_10BIT_422_EMBEDDED_SYNC, |
@@ -228,13 +229,13 @@ static struct vpfe_route tvp5146_routes[] = { | |||
228 | }, | 229 | }, |
229 | }; | 230 | }; |
230 | 231 | ||
231 | static struct vpfe_subdev_info vpfe_sub_devs[] = { | 232 | static struct vpfe_subdev_info dm644xevm_vpfe_sub_devs[] = { |
232 | { | 233 | { |
233 | .name = "tvp5146", | 234 | .name = "tvp5146", |
234 | .grp_id = 0, | 235 | .grp_id = 0, |
235 | .num_inputs = ARRAY_SIZE(tvp5146_inputs), | 236 | .num_inputs = ARRAY_SIZE(dm644xevm_tvp5146_inputs), |
236 | .inputs = tvp5146_inputs, | 237 | .inputs = dm644xevm_tvp5146_inputs, |
237 | .routes = tvp5146_routes, | 238 | .routes = dm644xevm_tvp5146_routes, |
238 | .can_route = 1, | 239 | .can_route = 1, |
239 | .ccdc_if_params = { | 240 | .ccdc_if_params = { |
240 | .if_type = VPFE_BT656, | 241 | .if_type = VPFE_BT656, |
@@ -243,15 +244,15 @@ static struct vpfe_subdev_info vpfe_sub_devs[] = { | |||
243 | }, | 244 | }, |
244 | .board_info = { | 245 | .board_info = { |
245 | I2C_BOARD_INFO("tvp5146", 0x5d), | 246 | I2C_BOARD_INFO("tvp5146", 0x5d), |
246 | .platform_data = &tvp5146_pdata, | 247 | .platform_data = &dm644xevm_tvp5146_pdata, |
247 | }, | 248 | }, |
248 | }, | 249 | }, |
249 | }; | 250 | }; |
250 | 251 | ||
251 | static struct vpfe_config vpfe_cfg = { | 252 | static struct vpfe_config dm644xevm_capture_cfg = { |
252 | .num_subdevs = ARRAY_SIZE(vpfe_sub_devs), | 253 | .num_subdevs = ARRAY_SIZE(dm644xevm_vpfe_sub_devs), |
253 | .i2c_adapter_id = 1, | 254 | .i2c_adapter_id = 1, |
254 | .sub_devs = vpfe_sub_devs, | 255 | .sub_devs = dm644xevm_vpfe_sub_devs, |
255 | .card_name = "DM6446 EVM", | 256 | .card_name = "DM6446 EVM", |
256 | .ccdc = "DM6446 CCDC", | 257 | .ccdc = "DM6446 CCDC", |
257 | }; | 258 | }; |
@@ -624,8 +625,6 @@ static struct davinci_uart_config uart_config __initdata = { | |||
624 | static void __init | 625 | static void __init |
625 | davinci_evm_map_io(void) | 626 | davinci_evm_map_io(void) |
626 | { | 627 | { |
627 | /* setup input configuration for VPFE input devices */ | ||
628 | dm644x_set_vpfe_config(&vpfe_cfg); | ||
629 | dm644x_init(); | 628 | dm644x_init(); |
630 | } | 629 | } |
631 | 630 | ||
@@ -697,6 +696,7 @@ static __init void davinci_evm_init(void) | |||
697 | evm_init_i2c(); | 696 | evm_init_i2c(); |
698 | 697 | ||
699 | davinci_setup_mmc(0, &dm6446evm_mmc_config); | 698 | davinci_setup_mmc(0, &dm6446evm_mmc_config); |
699 | dm644x_init_video(&dm644xevm_capture_cfg); | ||
700 | 700 | ||
701 | davinci_serial_init(&uart_config); | 701 | davinci_serial_init(&uart_config); |
702 | dm644x_init_asp(&dm644x_evm_snd_data); | 702 | dm644x_init_asp(&dm644x_evm_snd_data); |
diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c index 64017558860b..d72ab948d630 100644 --- a/arch/arm/mach-davinci/board-dm646x-evm.c +++ b/arch/arm/mach-davinci/board-dm646x-evm.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <asm/mach-types.h> | 36 | #include <asm/mach-types.h> |
37 | #include <asm/mach/arch.h> | 37 | #include <asm/mach/arch.h> |
38 | 38 | ||
39 | #include <mach/dm646x.h> | ||
40 | #include <mach/common.h> | 39 | #include <mach/common.h> |
41 | #include <mach/serial.h> | 40 | #include <mach/serial.h> |
42 | #include <mach/i2c.h> | 41 | #include <mach/i2c.h> |
@@ -45,6 +44,7 @@ | |||
45 | #include <mach/cdce949.h> | 44 | #include <mach/cdce949.h> |
46 | #include <mach/aemif.h> | 45 | #include <mach/aemif.h> |
47 | 46 | ||
47 | #include "davinci.h" | ||
48 | #include "clock.h" | 48 | #include "clock.h" |
49 | 49 | ||
50 | #define NAND_BLOCK_SIZE SZ_128K | 50 | #define NAND_BLOCK_SIZE SZ_128K |
@@ -410,8 +410,6 @@ static struct davinci_i2c_platform_data i2c_pdata = { | |||
410 | .bus_delay = 0 /* usec */, | 410 | .bus_delay = 0 /* usec */, |
411 | }; | 411 | }; |
412 | 412 | ||
413 | #define VIDCLKCTL_OFFSET (DAVINCI_SYSTEM_MODULE_BASE + 0x38) | ||
414 | #define VSCLKDIS_OFFSET (DAVINCI_SYSTEM_MODULE_BASE + 0x6c) | ||
415 | #define VCH2CLK_MASK (BIT_MASK(10) | BIT_MASK(9) | BIT_MASK(8)) | 413 | #define VCH2CLK_MASK (BIT_MASK(10) | BIT_MASK(9) | BIT_MASK(8)) |
416 | #define VCH2CLK_SYSCLK8 (BIT(9)) | 414 | #define VCH2CLK_SYSCLK8 (BIT(9)) |
417 | #define VCH2CLK_AUXCLK (BIT(9) | BIT(8)) | 415 | #define VCH2CLK_AUXCLK (BIT(9) | BIT(8)) |
@@ -429,8 +427,6 @@ static struct davinci_i2c_platform_data i2c_pdata = { | |||
429 | #define TVP5147_CH0 "tvp514x-0" | 427 | #define TVP5147_CH0 "tvp514x-0" |
430 | #define TVP5147_CH1 "tvp514x-1" | 428 | #define TVP5147_CH1 "tvp514x-1" |
431 | 429 | ||
432 | static void __iomem *vpif_vidclkctl_reg; | ||
433 | static void __iomem *vpif_vsclkdis_reg; | ||
434 | /* spin lock for updating above registers */ | 430 | /* spin lock for updating above registers */ |
435 | static spinlock_t vpif_reg_lock; | 431 | static spinlock_t vpif_reg_lock; |
436 | 432 | ||
@@ -441,14 +437,14 @@ static int set_vpif_clock(int mux_mode, int hd) | |||
441 | int val = 0; | 437 | int val = 0; |
442 | int err = 0; | 438 | int err = 0; |
443 | 439 | ||
444 | if (!vpif_vidclkctl_reg || !vpif_vsclkdis_reg || !cpld_client) | 440 | if (!cpld_client) |
445 | return -ENXIO; | 441 | return -ENXIO; |
446 | 442 | ||
447 | /* disable the clock */ | 443 | /* disable the clock */ |
448 | spin_lock_irqsave(&vpif_reg_lock, flags); | 444 | spin_lock_irqsave(&vpif_reg_lock, flags); |
449 | value = __raw_readl(vpif_vsclkdis_reg); | 445 | value = __raw_readl(DAVINCI_SYSMOD_VIRT(SYSMOD_VSCLKDIS)); |
450 | value |= (VIDCH3CLK | VIDCH2CLK); | 446 | value |= (VIDCH3CLK | VIDCH2CLK); |
451 | __raw_writel(value, vpif_vsclkdis_reg); | 447 | __raw_writel(value, DAVINCI_SYSMOD_VIRT(SYSMOD_VSCLKDIS)); |
452 | spin_unlock_irqrestore(&vpif_reg_lock, flags); | 448 | spin_unlock_irqrestore(&vpif_reg_lock, flags); |
453 | 449 | ||
454 | val = i2c_smbus_read_byte(cpld_client); | 450 | val = i2c_smbus_read_byte(cpld_client); |
@@ -464,7 +460,7 @@ static int set_vpif_clock(int mux_mode, int hd) | |||
464 | if (err) | 460 | if (err) |
465 | return err; | 461 | return err; |
466 | 462 | ||
467 | value = __raw_readl(vpif_vidclkctl_reg); | 463 | value = __raw_readl(DAVINCI_SYSMOD_VIRT(SYSMOD_VIDCLKCTL)); |
468 | value &= ~(VCH2CLK_MASK); | 464 | value &= ~(VCH2CLK_MASK); |
469 | value &= ~(VCH3CLK_MASK); | 465 | value &= ~(VCH3CLK_MASK); |
470 | 466 | ||
@@ -473,13 +469,13 @@ static int set_vpif_clock(int mux_mode, int hd) | |||
473 | else | 469 | else |
474 | value |= (VCH2CLK_AUXCLK | VCH3CLK_AUXCLK); | 470 | value |= (VCH2CLK_AUXCLK | VCH3CLK_AUXCLK); |
475 | 471 | ||
476 | __raw_writel(value, vpif_vidclkctl_reg); | 472 | __raw_writel(value, DAVINCI_SYSMOD_VIRT(SYSMOD_VIDCLKCTL)); |
477 | 473 | ||
478 | spin_lock_irqsave(&vpif_reg_lock, flags); | 474 | spin_lock_irqsave(&vpif_reg_lock, flags); |
479 | value = __raw_readl(vpif_vsclkdis_reg); | 475 | value = __raw_readl(DAVINCI_SYSMOD_VIRT(SYSMOD_VSCLKDIS)); |
480 | /* enable the clock */ | 476 | /* enable the clock */ |
481 | value &= ~(VIDCH3CLK | VIDCH2CLK); | 477 | value &= ~(VIDCH3CLK | VIDCH2CLK); |
482 | __raw_writel(value, vpif_vsclkdis_reg); | 478 | __raw_writel(value, DAVINCI_SYSMOD_VIRT(SYSMOD_VSCLKDIS)); |
483 | spin_unlock_irqrestore(&vpif_reg_lock, flags); | 479 | spin_unlock_irqrestore(&vpif_reg_lock, flags); |
484 | 480 | ||
485 | return 0; | 481 | return 0; |
@@ -564,7 +560,7 @@ static int setup_vpif_input_channel_mode(int mux_mode) | |||
564 | int val; | 560 | int val; |
565 | u32 value; | 561 | u32 value; |
566 | 562 | ||
567 | if (!vpif_vidclkctl_reg || !cpld_client) | 563 | if (!cpld_client) |
568 | return -ENXIO; | 564 | return -ENXIO; |
569 | 565 | ||
570 | val = i2c_smbus_read_byte(cpld_client); | 566 | val = i2c_smbus_read_byte(cpld_client); |
@@ -572,7 +568,7 @@ static int setup_vpif_input_channel_mode(int mux_mode) | |||
572 | return val; | 568 | return val; |
573 | 569 | ||
574 | spin_lock_irqsave(&vpif_reg_lock, flags); | 570 | spin_lock_irqsave(&vpif_reg_lock, flags); |
575 | value = __raw_readl(vpif_vidclkctl_reg); | 571 | value = __raw_readl(DAVINCI_SYSMOD_VIRT(SYSMOD_VIDCLKCTL)); |
576 | if (mux_mode) { | 572 | if (mux_mode) { |
577 | val &= VPIF_INPUT_TWO_CHANNEL; | 573 | val &= VPIF_INPUT_TWO_CHANNEL; |
578 | value |= VIDCH1CLK; | 574 | value |= VIDCH1CLK; |
@@ -580,7 +576,7 @@ static int setup_vpif_input_channel_mode(int mux_mode) | |||
580 | val |= VPIF_INPUT_ONE_CHANNEL; | 576 | val |= VPIF_INPUT_ONE_CHANNEL; |
581 | value &= ~VIDCH1CLK; | 577 | value &= ~VIDCH1CLK; |
582 | } | 578 | } |
583 | __raw_writel(value, vpif_vidclkctl_reg); | 579 | __raw_writel(value, DAVINCI_SYSMOD_VIRT(SYSMOD_VIDCLKCTL)); |
584 | spin_unlock_irqrestore(&vpif_reg_lock, flags); | 580 | spin_unlock_irqrestore(&vpif_reg_lock, flags); |
585 | 581 | ||
586 | err = i2c_smbus_write_byte(cpld_client, val); | 582 | err = i2c_smbus_write_byte(cpld_client, val); |
@@ -674,12 +670,6 @@ static struct vpif_capture_config dm646x_vpif_capture_cfg = { | |||
674 | 670 | ||
675 | static void __init evm_init_video(void) | 671 | static void __init evm_init_video(void) |
676 | { | 672 | { |
677 | vpif_vidclkctl_reg = ioremap(VIDCLKCTL_OFFSET, 4); | ||
678 | vpif_vsclkdis_reg = ioremap(VSCLKDIS_OFFSET, 4); | ||
679 | if (!vpif_vidclkctl_reg || !vpif_vsclkdis_reg) { | ||
680 | pr_err("Can't map VPIF VIDCLKCTL or VSCLKDIS registers\n"); | ||
681 | return; | ||
682 | } | ||
683 | spin_lock_init(&vpif_reg_lock); | 673 | spin_lock_init(&vpif_reg_lock); |
684 | 674 | ||
685 | dm646x_setup_vpif(&dm646x_vpif_display_config, | 675 | dm646x_setup_vpif(&dm646x_vpif_display_config, |
@@ -736,7 +726,7 @@ static struct davinci_uart_config uart_config __initdata = { | |||
736 | .enabled_uarts = (1 << 0), | 726 | .enabled_uarts = (1 << 0), |
737 | }; | 727 | }; |
738 | 728 | ||
739 | #define DM646X_EVM_PHY_ID "0:01" | 729 | #define DM646X_EVM_PHY_ID "davinci_mdio-0:01" |
740 | /* | 730 | /* |
741 | * The following EDMA channels/slots are not being used by drivers (for | 731 | * The following EDMA channels/slots are not being used by drivers (for |
742 | * example: Timer, GPIO, UART events etc) on dm646x, hence they are being | 732 | * example: Timer, GPIO, UART events etc) on dm646x, hence they are being |
diff --git a/arch/arm/mach-davinci/board-neuros-osd2.c b/arch/arm/mach-davinci/board-neuros-osd2.c index 6c4a16415d47..a772bb45570a 100644 --- a/arch/arm/mach-davinci/board-neuros-osd2.c +++ b/arch/arm/mach-davinci/board-neuros-osd2.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
31 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
32 | 32 | ||
33 | #include <mach/dm644x.h> | ||
34 | #include <mach/common.h> | 33 | #include <mach/common.h> |
35 | #include <mach/i2c.h> | 34 | #include <mach/i2c.h> |
36 | #include <mach/serial.h> | 35 | #include <mach/serial.h> |
@@ -39,7 +38,9 @@ | |||
39 | #include <mach/mmc.h> | 38 | #include <mach/mmc.h> |
40 | #include <mach/usb.h> | 39 | #include <mach/usb.h> |
41 | 40 | ||
42 | #define NEUROS_OSD2_PHY_ID "0:01" | 41 | #include "davinci.h" |
42 | |||
43 | #define NEUROS_OSD2_PHY_ID "davinci_mdio-0:01" | ||
43 | #define LXT971_PHY_ID 0x001378e2 | 44 | #define LXT971_PHY_ID 0x001378e2 |
44 | #define LXT971_PHY_MASK 0xfffffff0 | 45 | #define LXT971_PHY_MASK 0xfffffff0 |
45 | 46 | ||
diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c b/arch/arm/mach-davinci/board-omapl138-hawk.c index e7c0c7c53493..45e815760a27 100644 --- a/arch/arm/mach-davinci/board-omapl138-hawk.c +++ b/arch/arm/mach-davinci/board-omapl138-hawk.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #include <mach/da8xx.h> | 21 | #include <mach/da8xx.h> |
22 | #include <mach/mux.h> | 22 | #include <mach/mux.h> |
23 | 23 | ||
24 | #define HAWKBOARD_PHY_ID "0:07" | 24 | #define HAWKBOARD_PHY_ID "davinci_mdio-0:07" |
25 | #define DA850_HAWK_MMCSD_CD_PIN GPIO_TO_PIN(3, 12) | 25 | #define DA850_HAWK_MMCSD_CD_PIN GPIO_TO_PIN(3, 12) |
26 | #define DA850_HAWK_MMCSD_WP_PIN GPIO_TO_PIN(3, 13) | 26 | #define DA850_HAWK_MMCSD_WP_PIN GPIO_TO_PIN(3, 13) |
27 | 27 | ||
diff --git a/arch/arm/mach-davinci/board-sffsdr.c b/arch/arm/mach-davinci/board-sffsdr.c index 0b136a831c59..76e675096104 100644 --- a/arch/arm/mach-davinci/board-sffsdr.c +++ b/arch/arm/mach-davinci/board-sffsdr.c | |||
@@ -35,14 +35,15 @@ | |||
35 | #include <asm/mach/arch.h> | 35 | #include <asm/mach/arch.h> |
36 | #include <asm/mach/flash.h> | 36 | #include <asm/mach/flash.h> |
37 | 37 | ||
38 | #include <mach/dm644x.h> | ||
39 | #include <mach/common.h> | 38 | #include <mach/common.h> |
40 | #include <mach/i2c.h> | 39 | #include <mach/i2c.h> |
41 | #include <mach/serial.h> | 40 | #include <mach/serial.h> |
42 | #include <mach/mux.h> | 41 | #include <mach/mux.h> |
43 | #include <mach/usb.h> | 42 | #include <mach/usb.h> |
44 | 43 | ||
45 | #define SFFSDR_PHY_ID "0:01" | 44 | #include "davinci.h" |
45 | |||
46 | #define SFFSDR_PHY_ID "davinci_mdio-0:01" | ||
46 | static struct mtd_partition davinci_sffsdr_nandflash_partition[] = { | 47 | static struct mtd_partition davinci_sffsdr_nandflash_partition[] = { |
47 | /* U-Boot Environment: Block 0 | 48 | /* U-Boot Environment: Block 0 |
48 | * UBL: Block 1 | 49 | * UBL: Block 1 |
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index 0ed7fdb64efb..992c4c410185 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c | |||
@@ -153,34 +153,6 @@ static struct clk pll1_sysclk3 = { | |||
153 | .div_reg = PLLDIV3, | 153 | .div_reg = PLLDIV3, |
154 | }; | 154 | }; |
155 | 155 | ||
156 | static struct clk pll1_sysclk4 = { | ||
157 | .name = "pll1_sysclk4", | ||
158 | .parent = &pll1_clk, | ||
159 | .flags = CLK_PLL, | ||
160 | .div_reg = PLLDIV4, | ||
161 | }; | ||
162 | |||
163 | static struct clk pll1_sysclk5 = { | ||
164 | .name = "pll1_sysclk5", | ||
165 | .parent = &pll1_clk, | ||
166 | .flags = CLK_PLL, | ||
167 | .div_reg = PLLDIV5, | ||
168 | }; | ||
169 | |||
170 | static struct clk pll1_sysclk6 = { | ||
171 | .name = "pll0_sysclk6", | ||
172 | .parent = &pll0_clk, | ||
173 | .flags = CLK_PLL, | ||
174 | .div_reg = PLLDIV6, | ||
175 | }; | ||
176 | |||
177 | static struct clk pll1_sysclk7 = { | ||
178 | .name = "pll1_sysclk7", | ||
179 | .parent = &pll1_clk, | ||
180 | .flags = CLK_PLL, | ||
181 | .div_reg = PLLDIV7, | ||
182 | }; | ||
183 | |||
184 | static struct clk i2c0_clk = { | 156 | static struct clk i2c0_clk = { |
185 | .name = "i2c0", | 157 | .name = "i2c0", |
186 | .parent = &pll0_aux_clk, | 158 | .parent = &pll0_aux_clk, |
@@ -397,10 +369,6 @@ static struct clk_lookup da850_clks[] = { | |||
397 | CLK(NULL, "pll1_aux", &pll1_aux_clk), | 369 | CLK(NULL, "pll1_aux", &pll1_aux_clk), |
398 | CLK(NULL, "pll1_sysclk2", &pll1_sysclk2), | 370 | CLK(NULL, "pll1_sysclk2", &pll1_sysclk2), |
399 | CLK(NULL, "pll1_sysclk3", &pll1_sysclk3), | 371 | CLK(NULL, "pll1_sysclk3", &pll1_sysclk3), |
400 | CLK(NULL, "pll1_sysclk4", &pll1_sysclk4), | ||
401 | CLK(NULL, "pll1_sysclk5", &pll1_sysclk5), | ||
402 | CLK(NULL, "pll1_sysclk6", &pll1_sysclk6), | ||
403 | CLK(NULL, "pll1_sysclk7", &pll1_sysclk7), | ||
404 | CLK("i2c_davinci.1", NULL, &i2c0_clk), | 372 | CLK("i2c_davinci.1", NULL, &i2c0_clk), |
405 | CLK(NULL, "timer0", &timerp64_0_clk), | 373 | CLK(NULL, "timer0", &timerp64_0_clk), |
406 | CLK("watchdog", NULL, &timerp64_1_clk), | 374 | CLK("watchdog", NULL, &timerp64_1_clk), |
diff --git a/arch/arm/mach-davinci/davinci.h b/arch/arm/mach-davinci/davinci.h new file mode 100644 index 000000000000..9d708034b57f --- /dev/null +++ b/arch/arm/mach-davinci/davinci.h | |||
@@ -0,0 +1,96 @@ | |||
1 | /* | ||
2 | * This file contains the processor specific definitions | ||
3 | * of the TI DM644x, DM355, DM365, and DM646x. | ||
4 | * | ||
5 | * Copyright (C) 2011 Texas Instruments Incorporated | ||
6 | * Copyright (c) 2007 Deep Root Systems, LLC | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License as | ||
10 | * published by the Free Software Foundation version 2. | ||
11 | * | ||
12 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
13 | * kind, whether express or implied; without even the implied warranty | ||
14 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | */ | ||
17 | #ifndef __DAVINCI_H | ||
18 | #define __DAVINCI_H | ||
19 | |||
20 | #include <linux/clk.h> | ||
21 | #include <linux/videodev2.h> | ||
22 | #include <linux/davinci_emac.h> | ||
23 | #include <linux/platform_device.h> | ||
24 | #include <linux/spi/spi.h> | ||
25 | |||
26 | #include <mach/asp.h> | ||
27 | #include <mach/keyscan.h> | ||
28 | #include <mach/hardware.h> | ||
29 | |||
30 | #include <media/davinci/vpfe_capture.h> | ||
31 | #include <media/davinci/vpif_types.h> | ||
32 | |||
33 | #define DAVINCI_SYSTEM_MODULE_BASE 0x01c40000 | ||
34 | #define SYSMOD_VIDCLKCTL 0x38 | ||
35 | #define SYSMOD_VDD3P3VPWDN 0x48 | ||
36 | #define SYSMOD_VSCLKDIS 0x6c | ||
37 | #define SYSMOD_PUPDCTL1 0x7c | ||
38 | |||
39 | extern void __iomem *davinci_sysmod_base; | ||
40 | #define DAVINCI_SYSMOD_VIRT(x) (davinci_sysmod_base + (x)) | ||
41 | void davinci_map_sysmod(void); | ||
42 | |||
43 | /* DM355 base addresses */ | ||
44 | #define DM355_ASYNC_EMIF_CONTROL_BASE 0x01e10000 | ||
45 | #define DM355_ASYNC_EMIF_DATA_CE0_BASE 0x02000000 | ||
46 | |||
47 | #define ASP1_TX_EVT_EN 1 | ||
48 | #define ASP1_RX_EVT_EN 2 | ||
49 | |||
50 | /* DM365 base addresses */ | ||
51 | #define DM365_ASYNC_EMIF_CONTROL_BASE 0x01d10000 | ||
52 | #define DM365_ASYNC_EMIF_DATA_CE0_BASE 0x02000000 | ||
53 | #define DM365_ASYNC_EMIF_DATA_CE1_BASE 0x04000000 | ||
54 | |||
55 | /* DM644x base addresses */ | ||
56 | #define DM644X_ASYNC_EMIF_CONTROL_BASE 0x01e00000 | ||
57 | #define DM644X_ASYNC_EMIF_DATA_CE0_BASE 0x02000000 | ||
58 | #define DM644X_ASYNC_EMIF_DATA_CE1_BASE 0x04000000 | ||
59 | #define DM644X_ASYNC_EMIF_DATA_CE2_BASE 0x06000000 | ||
60 | #define DM644X_ASYNC_EMIF_DATA_CE3_BASE 0x08000000 | ||
61 | |||
62 | /* DM646x base addresses */ | ||
63 | #define DM646X_ASYNC_EMIF_CONTROL_BASE 0x20008000 | ||
64 | #define DM646X_ASYNC_EMIF_CS2_SPACE_BASE 0x42000000 | ||
65 | |||
66 | /* DM355 function declarations */ | ||
67 | void __init dm355_init(void); | ||
68 | void dm355_init_spi0(unsigned chipselect_mask, | ||
69 | struct spi_board_info *info, unsigned len); | ||
70 | void __init dm355_init_asp1(u32 evt_enable, struct snd_platform_data *pdata); | ||
71 | void dm355_set_vpfe_config(struct vpfe_config *cfg); | ||
72 | |||
73 | /* DM365 function declarations */ | ||
74 | void __init dm365_init(void); | ||
75 | void __init dm365_init_asp(struct snd_platform_data *pdata); | ||
76 | void __init dm365_init_vc(struct snd_platform_data *pdata); | ||
77 | void __init dm365_init_ks(struct davinci_ks_platform_data *pdata); | ||
78 | void __init dm365_init_rtc(void); | ||
79 | void dm365_init_spi0(unsigned chipselect_mask, | ||
80 | struct spi_board_info *info, unsigned len); | ||
81 | void dm365_set_vpfe_config(struct vpfe_config *cfg); | ||
82 | |||
83 | /* DM644x function declarations */ | ||
84 | void __init dm644x_init(void); | ||
85 | void __init dm644x_init_asp(struct snd_platform_data *pdata); | ||
86 | int __init dm644x_init_video(struct vpfe_config *); | ||
87 | |||
88 | /* DM646x function declarations */ | ||
89 | void __init dm646x_init(void); | ||
90 | void __init dm646x_init_mcasp0(struct snd_platform_data *pdata); | ||
91 | void __init dm646x_init_mcasp1(struct snd_platform_data *pdata); | ||
92 | int __init dm646x_init_edma(struct edma_rsv_info *rsv); | ||
93 | void dm646x_video_init(void); | ||
94 | void dm646x_setup_vpif(struct vpif_display_config *, | ||
95 | struct vpif_capture_config *); | ||
96 | #endif /*__DAVINCI_H */ | ||
diff --git a/arch/arm/mach-davinci/devices.c b/arch/arm/mach-davinci/devices.c index 50c0156b4262..d2f9666284a7 100644 --- a/arch/arm/mach-davinci/devices.c +++ b/arch/arm/mach-davinci/devices.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <mach/mmc.h> | 23 | #include <mach/mmc.h> |
24 | #include <mach/time.h> | 24 | #include <mach/time.h> |
25 | 25 | ||
26 | #include "davinci.h" | ||
26 | #include "clock.h" | 27 | #include "clock.h" |
27 | 28 | ||
28 | #define DAVINCI_I2C_BASE 0x01C21000 | 29 | #define DAVINCI_I2C_BASE 0x01C21000 |
@@ -33,8 +34,19 @@ | |||
33 | #define DM365_MMCSD0_BASE 0x01D11000 | 34 | #define DM365_MMCSD0_BASE 0x01D11000 |
34 | #define DM365_MMCSD1_BASE 0x01D00000 | 35 | #define DM365_MMCSD1_BASE 0x01D00000 |
35 | 36 | ||
36 | /* System control register offsets */ | 37 | void __iomem *davinci_sysmod_base; |
37 | #define DM64XX_VDD3P3V_PWDN 0x48 | 38 | |
39 | void davinci_map_sysmod(void) | ||
40 | { | ||
41 | davinci_sysmod_base = ioremap_nocache(DAVINCI_SYSTEM_MODULE_BASE, | ||
42 | 0x800); | ||
43 | /* | ||
44 | * Throw a bug since a lot of board initialization code depends | ||
45 | * on system module availability. ioremap() failing this early | ||
46 | * need careful looking into anyway. | ||
47 | */ | ||
48 | BUG_ON(!davinci_sysmod_base); | ||
49 | } | ||
38 | 50 | ||
39 | static struct resource i2c_resources[] = { | 51 | static struct resource i2c_resources[] = { |
40 | { | 52 | { |
@@ -212,12 +224,12 @@ void __init davinci_setup_mmc(int module, struct davinci_mmc_config *config) | |||
212 | davinci_cfg_reg(DM355_SD1_DATA2); | 224 | davinci_cfg_reg(DM355_SD1_DATA2); |
213 | davinci_cfg_reg(DM355_SD1_DATA3); | 225 | davinci_cfg_reg(DM355_SD1_DATA3); |
214 | } else if (cpu_is_davinci_dm365()) { | 226 | } else if (cpu_is_davinci_dm365()) { |
215 | void __iomem *pupdctl1 = | ||
216 | IO_ADDRESS(DAVINCI_SYSTEM_MODULE_BASE + 0x7c); | ||
217 | |||
218 | /* Configure pull down control */ | 227 | /* Configure pull down control */ |
219 | __raw_writel((__raw_readl(pupdctl1) & ~0xfc0), | 228 | unsigned v; |
220 | pupdctl1); | 229 | |
230 | v = __raw_readl(DAVINCI_SYSMOD_VIRT(SYSMOD_PUPDCTL1)); | ||
231 | __raw_writel(v & ~0xfc0, | ||
232 | DAVINCI_SYSMOD_VIRT(SYSMOD_PUPDCTL1)); | ||
221 | 233 | ||
222 | mmcsd1_resources[0].start = DM365_MMCSD1_BASE; | 234 | mmcsd1_resources[0].start = DM365_MMCSD1_BASE; |
223 | mmcsd1_resources[0].end = DM365_MMCSD1_BASE + | 235 | mmcsd1_resources[0].end = DM365_MMCSD1_BASE + |
@@ -246,11 +258,9 @@ void __init davinci_setup_mmc(int module, struct davinci_mmc_config *config) | |||
246 | mmcsd0_resources[2].start = IRQ_DM365_SDIOINT0; | 258 | mmcsd0_resources[2].start = IRQ_DM365_SDIOINT0; |
247 | } else if (cpu_is_davinci_dm644x()) { | 259 | } else if (cpu_is_davinci_dm644x()) { |
248 | /* REVISIT: should this be in board-init code? */ | 260 | /* REVISIT: should this be in board-init code? */ |
249 | void __iomem *base = | ||
250 | IO_ADDRESS(DAVINCI_SYSTEM_MODULE_BASE); | ||
251 | |||
252 | /* Power-on 3.3V IO cells */ | 261 | /* Power-on 3.3V IO cells */ |
253 | __raw_writel(0, base + DM64XX_VDD3P3V_PWDN); | 262 | __raw_writel(0, |
263 | DAVINCI_SYSMOD_VIRT(SYSMOD_VDD3P3VPWDN)); | ||
254 | /*Set up the pull regiter for MMC */ | 264 | /*Set up the pull regiter for MMC */ |
255 | davinci_cfg_reg(DM644X_MSTK); | 265 | davinci_cfg_reg(DM644X_MSTK); |
256 | } | 266 | } |
diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c index 19667cfc5de0..fd3d09aa6cde 100644 --- a/arch/arm/mach-davinci/dm355.c +++ b/arch/arm/mach-davinci/dm355.c | |||
@@ -18,7 +18,6 @@ | |||
18 | 18 | ||
19 | #include <asm/mach/map.h> | 19 | #include <asm/mach/map.h> |
20 | 20 | ||
21 | #include <mach/dm355.h> | ||
22 | #include <mach/cputype.h> | 21 | #include <mach/cputype.h> |
23 | #include <mach/edma.h> | 22 | #include <mach/edma.h> |
24 | #include <mach/psc.h> | 23 | #include <mach/psc.h> |
@@ -31,6 +30,7 @@ | |||
31 | #include <mach/spi.h> | 30 | #include <mach/spi.h> |
32 | #include <mach/gpio-davinci.h> | 31 | #include <mach/gpio-davinci.h> |
33 | 32 | ||
33 | #include "davinci.h" | ||
34 | #include "clock.h" | 34 | #include "clock.h" |
35 | #include "mux.h" | 35 | #include "mux.h" |
36 | 36 | ||
@@ -871,6 +871,7 @@ void __init dm355_init_asp1(u32 evt_enable, struct snd_platform_data *pdata) | |||
871 | void __init dm355_init(void) | 871 | void __init dm355_init(void) |
872 | { | 872 | { |
873 | davinci_common_init(&davinci_soc_info_dm355); | 873 | davinci_common_init(&davinci_soc_info_dm355); |
874 | davinci_map_sysmod(); | ||
874 | } | 875 | } |
875 | 876 | ||
876 | static int __init dm355_init_devices(void) | 877 | static int __init dm355_init_devices(void) |
diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c index f15b435cc655..1a2e953082b3 100644 --- a/arch/arm/mach-davinci/dm365.c +++ b/arch/arm/mach-davinci/dm365.c | |||
@@ -21,7 +21,6 @@ | |||
21 | 21 | ||
22 | #include <asm/mach/map.h> | 22 | #include <asm/mach/map.h> |
23 | 23 | ||
24 | #include <mach/dm365.h> | ||
25 | #include <mach/cputype.h> | 24 | #include <mach/cputype.h> |
26 | #include <mach/edma.h> | 25 | #include <mach/edma.h> |
27 | #include <mach/psc.h> | 26 | #include <mach/psc.h> |
@@ -35,11 +34,28 @@ | |||
35 | #include <mach/spi.h> | 34 | #include <mach/spi.h> |
36 | #include <mach/gpio-davinci.h> | 35 | #include <mach/gpio-davinci.h> |
37 | 36 | ||
37 | #include "davinci.h" | ||
38 | #include "clock.h" | 38 | #include "clock.h" |
39 | #include "mux.h" | 39 | #include "mux.h" |
40 | 40 | ||
41 | #define DM365_REF_FREQ 24000000 /* 24 MHz on the DM365 EVM */ | 41 | #define DM365_REF_FREQ 24000000 /* 24 MHz on the DM365 EVM */ |
42 | 42 | ||
43 | /* Base of key scan register bank */ | ||
44 | #define DM365_KEYSCAN_BASE 0x01c69400 | ||
45 | |||
46 | #define DM365_RTC_BASE 0x01c69000 | ||
47 | |||
48 | #define DAVINCI_DM365_VC_BASE 0x01d0c000 | ||
49 | #define DAVINCI_DMA_VC_TX 2 | ||
50 | #define DAVINCI_DMA_VC_RX 3 | ||
51 | |||
52 | #define DM365_EMAC_BASE 0x01d07000 | ||
53 | #define DM365_EMAC_MDIO_BASE (DM365_EMAC_BASE + 0x4000) | ||
54 | #define DM365_EMAC_CNTRL_OFFSET 0x0000 | ||
55 | #define DM365_EMAC_CNTRL_MOD_OFFSET 0x3000 | ||
56 | #define DM365_EMAC_CNTRL_RAM_OFFSET 0x1000 | ||
57 | #define DM365_EMAC_CNTRL_RAM_SIZE 0x2000 | ||
58 | |||
43 | static struct pll_data pll1_data = { | 59 | static struct pll_data pll1_data = { |
44 | .num = 1, | 60 | .num = 1, |
45 | .phys_base = DAVINCI_PLL1_BASE, | 61 | .phys_base = DAVINCI_PLL1_BASE, |
@@ -1122,6 +1138,7 @@ void __init dm365_init_rtc(void) | |||
1122 | void __init dm365_init(void) | 1138 | void __init dm365_init(void) |
1123 | { | 1139 | { |
1124 | davinci_common_init(&davinci_soc_info_dm365); | 1140 | davinci_common_init(&davinci_soc_info_dm365); |
1141 | davinci_map_sysmod(); | ||
1125 | } | 1142 | } |
1126 | 1143 | ||
1127 | static struct resource dm365_vpss_resources[] = { | 1144 | static struct resource dm365_vpss_resources[] = { |
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c index 43a48ee1917b..23e81cafba8d 100644 --- a/arch/arm/mach-davinci/dm644x.c +++ b/arch/arm/mach-davinci/dm644x.c | |||
@@ -15,7 +15,6 @@ | |||
15 | 15 | ||
16 | #include <asm/mach/map.h> | 16 | #include <asm/mach/map.h> |
17 | 17 | ||
18 | #include <mach/dm644x.h> | ||
19 | #include <mach/cputype.h> | 18 | #include <mach/cputype.h> |
20 | #include <mach/edma.h> | 19 | #include <mach/edma.h> |
21 | #include <mach/irqs.h> | 20 | #include <mach/irqs.h> |
@@ -27,6 +26,7 @@ | |||
27 | #include <mach/asp.h> | 26 | #include <mach/asp.h> |
28 | #include <mach/gpio-davinci.h> | 27 | #include <mach/gpio-davinci.h> |
29 | 28 | ||
29 | #include "davinci.h" | ||
30 | #include "clock.h" | 30 | #include "clock.h" |
31 | #include "mux.h" | 31 | #include "mux.h" |
32 | 32 | ||
@@ -35,6 +35,13 @@ | |||
35 | */ | 35 | */ |
36 | #define DM644X_REF_FREQ 27000000 | 36 | #define DM644X_REF_FREQ 27000000 |
37 | 37 | ||
38 | #define DM644X_EMAC_BASE 0x01c80000 | ||
39 | #define DM644X_EMAC_MDIO_BASE (DM644X_EMAC_BASE + 0x4000) | ||
40 | #define DM644X_EMAC_CNTRL_OFFSET 0x0000 | ||
41 | #define DM644X_EMAC_CNTRL_MOD_OFFSET 0x1000 | ||
42 | #define DM644X_EMAC_CNTRL_RAM_OFFSET 0x2000 | ||
43 | #define DM644X_EMAC_CNTRL_RAM_SIZE 0x2000 | ||
44 | |||
38 | static struct pll_data pll1_data = { | 45 | static struct pll_data pll1_data = { |
39 | .num = 1, | 46 | .num = 1, |
40 | .phys_base = DAVINCI_PLL1_BASE, | 47 | .phys_base = DAVINCI_PLL1_BASE, |
@@ -587,13 +594,15 @@ static struct platform_device dm644x_asp_device = { | |||
587 | .resource = dm644x_asp_resources, | 594 | .resource = dm644x_asp_resources, |
588 | }; | 595 | }; |
589 | 596 | ||
597 | #define DM644X_VPSS_BASE 0x01c73400 | ||
598 | |||
590 | static struct resource dm644x_vpss_resources[] = { | 599 | static struct resource dm644x_vpss_resources[] = { |
591 | { | 600 | { |
592 | /* VPSS Base address */ | 601 | /* VPSS Base address */ |
593 | .name = "vpss", | 602 | .name = "vpss", |
594 | .start = 0x01c73400, | 603 | .start = DM644X_VPSS_BASE, |
595 | .end = 0x01c73400 + 0xff, | 604 | .end = DM644X_VPSS_BASE + 0xff, |
596 | .flags = IORESOURCE_MEM, | 605 | .flags = IORESOURCE_MEM, |
597 | }, | 606 | }, |
598 | }; | 607 | }; |
599 | 608 | ||
@@ -605,7 +614,7 @@ static struct platform_device dm644x_vpss_device = { | |||
605 | .resource = dm644x_vpss_resources, | 614 | .resource = dm644x_vpss_resources, |
606 | }; | 615 | }; |
607 | 616 | ||
608 | static struct resource vpfe_resources[] = { | 617 | static struct resource dm644x_vpfe_resources[] = { |
609 | { | 618 | { |
610 | .start = IRQ_VDINT0, | 619 | .start = IRQ_VDINT0, |
611 | .end = IRQ_VDINT0, | 620 | .end = IRQ_VDINT0, |
@@ -639,22 +648,17 @@ static struct platform_device dm644x_ccdc_dev = { | |||
639 | }, | 648 | }, |
640 | }; | 649 | }; |
641 | 650 | ||
642 | static struct platform_device vpfe_capture_dev = { | 651 | static struct platform_device dm644x_vpfe_dev = { |
643 | .name = CAPTURE_DRV_NAME, | 652 | .name = CAPTURE_DRV_NAME, |
644 | .id = -1, | 653 | .id = -1, |
645 | .num_resources = ARRAY_SIZE(vpfe_resources), | 654 | .num_resources = ARRAY_SIZE(dm644x_vpfe_resources), |
646 | .resource = vpfe_resources, | 655 | .resource = dm644x_vpfe_resources, |
647 | .dev = { | 656 | .dev = { |
648 | .dma_mask = &vpfe_capture_dma_mask, | 657 | .dma_mask = &vpfe_capture_dma_mask, |
649 | .coherent_dma_mask = DMA_BIT_MASK(32), | 658 | .coherent_dma_mask = DMA_BIT_MASK(32), |
650 | }, | 659 | }, |
651 | }; | 660 | }; |
652 | 661 | ||
653 | void dm644x_set_vpfe_config(struct vpfe_config *cfg) | ||
654 | { | ||
655 | vpfe_capture_dev.dev.platform_data = cfg; | ||
656 | } | ||
657 | |||
658 | /*----------------------------------------------------------------------*/ | 662 | /*----------------------------------------------------------------------*/ |
659 | 663 | ||
660 | static struct map_desc dm644x_io_desc[] = { | 664 | static struct map_desc dm644x_io_desc[] = { |
@@ -779,16 +783,29 @@ void __init dm644x_init_asp(struct snd_platform_data *pdata) | |||
779 | void __init dm644x_init(void) | 783 | void __init dm644x_init(void) |
780 | { | 784 | { |
781 | davinci_common_init(&davinci_soc_info_dm644x); | 785 | davinci_common_init(&davinci_soc_info_dm644x); |
786 | davinci_map_sysmod(); | ||
782 | } | 787 | } |
783 | 788 | ||
784 | static int __init dm644x_init_devices(void) | 789 | int __init dm644x_init_video(struct vpfe_config *vpfe_cfg) |
785 | { | 790 | { |
786 | if (!cpu_is_davinci_dm644x()) | 791 | dm644x_vpfe_dev.dev.platform_data = vpfe_cfg; |
787 | return 0; | ||
788 | 792 | ||
789 | /* Add ccdc clock aliases */ | 793 | /* Add ccdc clock aliases */ |
790 | clk_add_alias("master", dm644x_ccdc_dev.name, "vpss_master", NULL); | 794 | clk_add_alias("master", dm644x_ccdc_dev.name, "vpss_master", NULL); |
791 | clk_add_alias("slave", dm644x_ccdc_dev.name, "vpss_slave", NULL); | 795 | clk_add_alias("slave", dm644x_ccdc_dev.name, "vpss_slave", NULL); |
796 | |||
797 | platform_device_register(&dm644x_vpss_device); | ||
798 | platform_device_register(&dm644x_ccdc_dev); | ||
799 | platform_device_register(&dm644x_vpfe_dev); | ||
800 | |||
801 | return 0; | ||
802 | } | ||
803 | |||
804 | static int __init dm644x_init_devices(void) | ||
805 | { | ||
806 | if (!cpu_is_davinci_dm644x()) | ||
807 | return 0; | ||
808 | |||
792 | platform_device_register(&dm644x_edma_device); | 809 | platform_device_register(&dm644x_edma_device); |
793 | 810 | ||
794 | platform_device_register(&dm644x_mdio_device); | 811 | platform_device_register(&dm644x_mdio_device); |
@@ -796,10 +813,6 @@ static int __init dm644x_init_devices(void) | |||
796 | clk_add_alias(NULL, dev_name(&dm644x_mdio_device.dev), | 813 | clk_add_alias(NULL, dev_name(&dm644x_mdio_device.dev), |
797 | NULL, &dm644x_emac_device.dev); | 814 | NULL, &dm644x_emac_device.dev); |
798 | 815 | ||
799 | platform_device_register(&dm644x_vpss_device); | ||
800 | platform_device_register(&dm644x_ccdc_dev); | ||
801 | platform_device_register(&vpfe_capture_dev); | ||
802 | |||
803 | return 0; | 816 | return 0; |
804 | } | 817 | } |
805 | postcore_initcall(dm644x_init_devices); | 818 | postcore_initcall(dm644x_init_devices); |
diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c index 00f774394b16..9eb87c1d1edd 100644 --- a/arch/arm/mach-davinci/dm646x.c +++ b/arch/arm/mach-davinci/dm646x.c | |||
@@ -16,7 +16,6 @@ | |||
16 | 16 | ||
17 | #include <asm/mach/map.h> | 17 | #include <asm/mach/map.h> |
18 | 18 | ||
19 | #include <mach/dm646x.h> | ||
20 | #include <mach/cputype.h> | 19 | #include <mach/cputype.h> |
21 | #include <mach/edma.h> | 20 | #include <mach/edma.h> |
22 | #include <mach/irqs.h> | 21 | #include <mach/irqs.h> |
@@ -28,12 +27,11 @@ | |||
28 | #include <mach/asp.h> | 27 | #include <mach/asp.h> |
29 | #include <mach/gpio-davinci.h> | 28 | #include <mach/gpio-davinci.h> |
30 | 29 | ||
30 | #include "davinci.h" | ||
31 | #include "clock.h" | 31 | #include "clock.h" |
32 | #include "mux.h" | 32 | #include "mux.h" |
33 | 33 | ||
34 | #define DAVINCI_VPIF_BASE (0x01C12000) | 34 | #define DAVINCI_VPIF_BASE (0x01C12000) |
35 | #define VDD3P3V_PWDN_OFFSET (0x48) | ||
36 | #define VSCLKDIS_OFFSET (0x6C) | ||
37 | 35 | ||
38 | #define VDD3P3V_VID_MASK (BIT_MASK(3) | BIT_MASK(2) | BIT_MASK(1) |\ | 36 | #define VDD3P3V_VID_MASK (BIT_MASK(3) | BIT_MASK(2) | BIT_MASK(1) |\ |
39 | BIT_MASK(0)) | 37 | BIT_MASK(0)) |
@@ -46,6 +44,13 @@ | |||
46 | #define DM646X_REF_FREQ 27000000 | 44 | #define DM646X_REF_FREQ 27000000 |
47 | #define DM646X_AUX_FREQ 24000000 | 45 | #define DM646X_AUX_FREQ 24000000 |
48 | 46 | ||
47 | #define DM646X_EMAC_BASE 0x01c80000 | ||
48 | #define DM646X_EMAC_MDIO_BASE (DM646X_EMAC_BASE + 0x4000) | ||
49 | #define DM646X_EMAC_CNTRL_OFFSET 0x0000 | ||
50 | #define DM646X_EMAC_CNTRL_MOD_OFFSET 0x1000 | ||
51 | #define DM646X_EMAC_CNTRL_RAM_OFFSET 0x2000 | ||
52 | #define DM646X_EMAC_CNTRL_RAM_SIZE 0x2000 | ||
53 | |||
49 | static struct pll_data pll1_data = { | 54 | static struct pll_data pll1_data = { |
50 | .num = 1, | 55 | .num = 1, |
51 | .phys_base = DAVINCI_PLL1_BASE, | 56 | .phys_base = DAVINCI_PLL1_BASE, |
@@ -873,15 +878,14 @@ void dm646x_setup_vpif(struct vpif_display_config *display_config, | |||
873 | struct vpif_capture_config *capture_config) | 878 | struct vpif_capture_config *capture_config) |
874 | { | 879 | { |
875 | unsigned int value; | 880 | unsigned int value; |
876 | void __iomem *base = IO_ADDRESS(DAVINCI_SYSTEM_MODULE_BASE); | ||
877 | 881 | ||
878 | value = __raw_readl(base + VSCLKDIS_OFFSET); | 882 | value = __raw_readl(DAVINCI_SYSMOD_VIRT(SYSMOD_VSCLKDIS)); |
879 | value &= ~VSCLKDIS_MASK; | 883 | value &= ~VSCLKDIS_MASK; |
880 | __raw_writel(value, base + VSCLKDIS_OFFSET); | 884 | __raw_writel(value, DAVINCI_SYSMOD_VIRT(SYSMOD_VSCLKDIS)); |
881 | 885 | ||
882 | value = __raw_readl(base + VDD3P3V_PWDN_OFFSET); | 886 | value = __raw_readl(DAVINCI_SYSMOD_VIRT(SYSMOD_VDD3P3VPWDN)); |
883 | value &= ~VDD3P3V_VID_MASK; | 887 | value &= ~VDD3P3V_VID_MASK; |
884 | __raw_writel(value, base + VDD3P3V_PWDN_OFFSET); | 888 | __raw_writel(value, DAVINCI_SYSMOD_VIRT(SYSMOD_VDD3P3VPWDN)); |
885 | 889 | ||
886 | davinci_cfg_reg(DM646X_STSOMUX_DISABLE); | 890 | davinci_cfg_reg(DM646X_STSOMUX_DISABLE); |
887 | davinci_cfg_reg(DM646X_STSIMUX_DISABLE); | 891 | davinci_cfg_reg(DM646X_STSIMUX_DISABLE); |
@@ -905,6 +909,7 @@ int __init dm646x_init_edma(struct edma_rsv_info *rsv) | |||
905 | void __init dm646x_init(void) | 909 | void __init dm646x_init(void) |
906 | { | 910 | { |
907 | davinci_common_init(&davinci_soc_info_dm646x); | 911 | davinci_common_init(&davinci_soc_info_dm646x); |
912 | davinci_map_sysmod(); | ||
908 | } | 913 | } |
909 | 914 | ||
910 | static int __init dm646x_init_devices(void) | 915 | static int __init dm646x_init_devices(void) |
diff --git a/arch/arm/mach-davinci/include/mach/dm355.h b/arch/arm/mach-davinci/include/mach/dm355.h deleted file mode 100644 index 36dff4a0ce3f..000000000000 --- a/arch/arm/mach-davinci/include/mach/dm355.h +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | /* | ||
2 | * Chip specific defines for DM355 SoC | ||
3 | * | ||
4 | * Author: Kevin Hilman, Deep Root Systems, LLC | ||
5 | * | ||
6 | * 2007 (c) Deep Root Systems, LLC. This file is licensed under | ||
7 | * the terms of the GNU General Public License version 2. This program | ||
8 | * is licensed "as is" without any warranty of any kind, whether express | ||
9 | * or implied. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_DM355_H | ||
12 | #define __ASM_ARCH_DM355_H | ||
13 | |||
14 | #include <mach/hardware.h> | ||
15 | #include <mach/asp.h> | ||
16 | #include <media/davinci/vpfe_capture.h> | ||
17 | |||
18 | #define DM355_ASYNC_EMIF_CONTROL_BASE 0x01E10000 | ||
19 | #define DM355_ASYNC_EMIF_DATA_CE0_BASE 0x02000000 | ||
20 | |||
21 | #define ASP1_TX_EVT_EN 1 | ||
22 | #define ASP1_RX_EVT_EN 2 | ||
23 | |||
24 | struct spi_board_info; | ||
25 | |||
26 | void __init dm355_init(void); | ||
27 | void dm355_init_spi0(unsigned chipselect_mask, | ||
28 | struct spi_board_info *info, unsigned len); | ||
29 | void __init dm355_init_asp1(u32 evt_enable, struct snd_platform_data *pdata); | ||
30 | void dm355_set_vpfe_config(struct vpfe_config *cfg); | ||
31 | |||
32 | #endif /* __ASM_ARCH_DM355_H */ | ||
diff --git a/arch/arm/mach-davinci/include/mach/dm365.h b/arch/arm/mach-davinci/include/mach/dm365.h index 2563bf4e93a1..b9bf3d6a4423 100644 --- a/arch/arm/mach-davinci/include/mach/dm365.h +++ b/arch/arm/mach-davinci/include/mach/dm365.h | |||
@@ -1,52 +1 @@ | |||
1 | /* | /* empty, remove once unused */ | |
2 | * Copyright (C) 2009 Texas Instruments Incorporated | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License as | ||
6 | * published by the Free Software Foundation version 2. | ||
7 | * | ||
8 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
9 | * kind, whether express or implied; without even the implied warranty | ||
10 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | */ | ||
13 | #ifndef __ASM_ARCH_DM365_H | ||
14 | #define __ASM_ARCH_DM665_H | ||
15 | |||
16 | #include <linux/platform_device.h> | ||
17 | #include <linux/davinci_emac.h> | ||
18 | #include <mach/hardware.h> | ||
19 | #include <mach/asp.h> | ||
20 | #include <mach/keyscan.h> | ||
21 | #include <media/davinci/vpfe_capture.h> | ||
22 | |||
23 | #define DM365_EMAC_BASE (0x01D07000) | ||
24 | #define DM365_EMAC_MDIO_BASE (DM365_EMAC_BASE + 0x4000) | ||
25 | #define DM365_EMAC_CNTRL_OFFSET (0x0000) | ||
26 | #define DM365_EMAC_CNTRL_MOD_OFFSET (0x3000) | ||
27 | #define DM365_EMAC_CNTRL_RAM_OFFSET (0x1000) | ||
28 | #define DM365_EMAC_CNTRL_RAM_SIZE (0x2000) | ||
29 | |||
30 | /* Base of key scan register bank */ | ||
31 | #define DM365_KEYSCAN_BASE (0x01C69400) | ||
32 | |||
33 | #define DM365_RTC_BASE (0x01C69000) | ||
34 | |||
35 | #define DAVINCI_DM365_VC_BASE (0x01D0C000) | ||
36 | #define DAVINCI_DMA_VC_TX 2 | ||
37 | #define DAVINCI_DMA_VC_RX 3 | ||
38 | |||
39 | #define DM365_ASYNC_EMIF_CONTROL_BASE 0x01D10000 | ||
40 | #define DM365_ASYNC_EMIF_DATA_CE0_BASE 0x02000000 | ||
41 | #define DM365_ASYNC_EMIF_DATA_CE1_BASE 0x04000000 | ||
42 | |||
43 | void __init dm365_init(void); | ||
44 | void __init dm365_init_asp(struct snd_platform_data *pdata); | ||
45 | void __init dm365_init_vc(struct snd_platform_data *pdata); | ||
46 | void __init dm365_init_ks(struct davinci_ks_platform_data *pdata); | ||
47 | void __init dm365_init_rtc(void); | ||
48 | void dm365_init_spi0(unsigned chipselect_mask, | ||
49 | struct spi_board_info *info, unsigned len); | ||
50 | |||
51 | void dm365_set_vpfe_config(struct vpfe_config *cfg); | ||
52 | #endif /* __ASM_ARCH_DM365_H */ | ||
diff --git a/arch/arm/mach-davinci/include/mach/dm644x.h b/arch/arm/mach-davinci/include/mach/dm644x.h deleted file mode 100644 index 5a1b26d4e68b..000000000000 --- a/arch/arm/mach-davinci/include/mach/dm644x.h +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | /* | ||
2 | * This file contains the processor specific definitions | ||
3 | * of the TI DM644x. | ||
4 | * | ||
5 | * Copyright (C) 2008 Texas Instruments. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | * | ||
21 | */ | ||
22 | #ifndef __ASM_ARCH_DM644X_H | ||
23 | #define __ASM_ARCH_DM644X_H | ||
24 | |||
25 | #include <linux/davinci_emac.h> | ||
26 | #include <mach/hardware.h> | ||
27 | #include <mach/asp.h> | ||
28 | #include <media/davinci/vpfe_capture.h> | ||
29 | |||
30 | #define DM644X_EMAC_BASE (0x01C80000) | ||
31 | #define DM644X_EMAC_MDIO_BASE (DM644X_EMAC_BASE + 0x4000) | ||
32 | #define DM644X_EMAC_CNTRL_OFFSET (0x0000) | ||
33 | #define DM644X_EMAC_CNTRL_MOD_OFFSET (0x1000) | ||
34 | #define DM644X_EMAC_CNTRL_RAM_OFFSET (0x2000) | ||
35 | #define DM644X_EMAC_CNTRL_RAM_SIZE (0x2000) | ||
36 | |||
37 | #define DM644X_ASYNC_EMIF_CONTROL_BASE 0x01E00000 | ||
38 | #define DM644X_ASYNC_EMIF_DATA_CE0_BASE 0x02000000 | ||
39 | #define DM644X_ASYNC_EMIF_DATA_CE1_BASE 0x04000000 | ||
40 | #define DM644X_ASYNC_EMIF_DATA_CE2_BASE 0x06000000 | ||
41 | #define DM644X_ASYNC_EMIF_DATA_CE3_BASE 0x08000000 | ||
42 | |||
43 | void __init dm644x_init(void); | ||
44 | void __init dm644x_init_asp(struct snd_platform_data *pdata); | ||
45 | void dm644x_set_vpfe_config(struct vpfe_config *cfg); | ||
46 | |||
47 | #endif /* __ASM_ARCH_DM644X_H */ | ||
diff --git a/arch/arm/mach-davinci/include/mach/dm646x.h b/arch/arm/mach-davinci/include/mach/dm646x.h index a8ee6c9f0bb0..b9bf3d6a4423 100644 --- a/arch/arm/mach-davinci/include/mach/dm646x.h +++ b/arch/arm/mach-davinci/include/mach/dm646x.h | |||
@@ -1,41 +1 @@ | |||
1 | /* | /* empty, remove once unused */ | |
2 | * Chip specific defines for DM646x SoC | ||
3 | * | ||
4 | * Author: Kevin Hilman, Deep Root Systems, LLC | ||
5 | * | ||
6 | * 2007 (c) Deep Root Systems, LLC. This file is licensed under | ||
7 | * the terms of the GNU General Public License version 2. This program | ||
8 | * is licensed "as is" without any warranty of any kind, whether express | ||
9 | * or implied. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_DM646X_H | ||
12 | #define __ASM_ARCH_DM646X_H | ||
13 | |||
14 | #include <mach/hardware.h> | ||
15 | #include <mach/asp.h> | ||
16 | #include <linux/i2c.h> | ||
17 | #include <linux/videodev2.h> | ||
18 | #include <linux/davinci_emac.h> | ||
19 | #include <media/davinci/vpif_types.h> | ||
20 | |||
21 | #define DM646X_EMAC_BASE (0x01C80000) | ||
22 | #define DM646X_EMAC_MDIO_BASE (DM646X_EMAC_BASE + 0x4000) | ||
23 | #define DM646X_EMAC_CNTRL_OFFSET (0x0000) | ||
24 | #define DM646X_EMAC_CNTRL_MOD_OFFSET (0x1000) | ||
25 | #define DM646X_EMAC_CNTRL_RAM_OFFSET (0x2000) | ||
26 | #define DM646X_EMAC_CNTRL_RAM_SIZE (0x2000) | ||
27 | |||
28 | #define DM646X_ASYNC_EMIF_CONTROL_BASE 0x20008000 | ||
29 | #define DM646X_ASYNC_EMIF_CS2_SPACE_BASE 0x42000000 | ||
30 | |||
31 | void __init dm646x_init(void); | ||
32 | void __init dm646x_init_mcasp0(struct snd_platform_data *pdata); | ||
33 | void __init dm646x_init_mcasp1(struct snd_platform_data *pdata); | ||
34 | int __init dm646x_init_edma(struct edma_rsv_info *rsv); | ||
35 | |||
36 | void dm646x_video_init(void); | ||
37 | |||
38 | void dm646x_setup_vpif(struct vpif_display_config *, | ||
39 | struct vpif_capture_config *); | ||
40 | |||
41 | #endif /* __ASM_ARCH_DM646X_H */ | ||
diff --git a/arch/arm/mach-davinci/include/mach/entry-macro.S b/arch/arm/mach-davinci/include/mach/entry-macro.S index e14c0dc0e12c..c1661d2feca9 100644 --- a/arch/arm/mach-davinci/include/mach/entry-macro.S +++ b/arch/arm/mach-davinci/include/mach/entry-macro.S | |||
@@ -11,17 +11,11 @@ | |||
11 | #include <mach/io.h> | 11 | #include <mach/io.h> |
12 | #include <mach/irqs.h> | 12 | #include <mach/irqs.h> |
13 | 13 | ||
14 | .macro disable_fiq | ||
15 | .endm | ||
16 | |||
17 | .macro get_irqnr_preamble, base, tmp | 14 | .macro get_irqnr_preamble, base, tmp |
18 | ldr \base, =davinci_intc_base | 15 | ldr \base, =davinci_intc_base |
19 | ldr \base, [\base] | 16 | ldr \base, [\base] |
20 | .endm | 17 | .endm |
21 | 18 | ||
22 | .macro arch_ret_to_user, tmp1, tmp2 | ||
23 | .endm | ||
24 | |||
25 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 19 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
26 | #if defined(CONFIG_AINTC) && defined(CONFIG_CP_INTC) | 20 | #if defined(CONFIG_AINTC) && defined(CONFIG_CP_INTC) |
27 | ldr \tmp, =davinci_intc_type | 21 | ldr \tmp, =davinci_intc_type |
diff --git a/arch/arm/mach-davinci/include/mach/hardware.h b/arch/arm/mach-davinci/include/mach/hardware.h index 414e0b93e741..0209b1fc22a1 100644 --- a/arch/arm/mach-davinci/include/mach/hardware.h +++ b/arch/arm/mach-davinci/include/mach/hardware.h | |||
@@ -19,8 +19,6 @@ | |||
19 | * and the chip/board init code should then explicitly include | 19 | * and the chip/board init code should then explicitly include |
20 | * <chipname>.h | 20 | * <chipname>.h |
21 | */ | 21 | */ |
22 | #define DAVINCI_SYSTEM_MODULE_BASE 0x01C40000 | ||
23 | |||
24 | /* | 22 | /* |
25 | * I/O mapping | 23 | * I/O mapping |
26 | */ | 24 | */ |
diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c index dd1429ae6405..bda7aca04ca0 100644 --- a/arch/arm/mach-dove/common.c +++ b/arch/arm/mach-dove/common.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <asm/mach/arch.h> | 28 | #include <asm/mach/arch.h> |
29 | #include <linux/irq.h> | 29 | #include <linux/irq.h> |
30 | #include <plat/time.h> | 30 | #include <plat/time.h> |
31 | #include <plat/ehci-orion.h> | ||
31 | #include <plat/common.h> | 32 | #include <plat/common.h> |
32 | #include <plat/addr-map.h> | 33 | #include <plat/addr-map.h> |
33 | #include "common.h" | 34 | #include "common.h" |
@@ -71,7 +72,7 @@ void __init dove_map_io(void) | |||
71 | ****************************************************************************/ | 72 | ****************************************************************************/ |
72 | void __init dove_ehci0_init(void) | 73 | void __init dove_ehci0_init(void) |
73 | { | 74 | { |
74 | orion_ehci_init(DOVE_USB0_PHYS_BASE, IRQ_DOVE_USB0); | 75 | orion_ehci_init(DOVE_USB0_PHYS_BASE, IRQ_DOVE_USB0, EHCI_PHY_NA); |
75 | } | 76 | } |
76 | 77 | ||
77 | /***************************************************************************** | 78 | /***************************************************************************** |
diff --git a/arch/arm/mach-dove/include/mach/entry-macro.S b/arch/arm/mach-dove/include/mach/entry-macro.S index e84c78c2a8b7..72d622baaad3 100644 --- a/arch/arm/mach-dove/include/mach/entry-macro.S +++ b/arch/arm/mach-dove/include/mach/entry-macro.S | |||
@@ -10,12 +10,6 @@ | |||
10 | 10 | ||
11 | #include <mach/bridge-regs.h> | 11 | #include <mach/bridge-regs.h> |
12 | 12 | ||
13 | .macro disable_fiq | ||
14 | .endm | ||
15 | |||
16 | .macro arch_ret_to_user, tmp1, tmp2 | ||
17 | .endm | ||
18 | |||
19 | .macro get_irqnr_preamble, base, tmp | 13 | .macro get_irqnr_preamble, base, tmp |
20 | ldr \base, =IRQ_VIRT_BASE | 14 | ldr \base, =IRQ_VIRT_BASE |
21 | .endm | 15 | .endm |
diff --git a/arch/arm/mach-ebsa110/include/mach/entry-macro.S b/arch/arm/mach-ebsa110/include/mach/entry-macro.S index cc3e5992f6b3..14b110de78a9 100644 --- a/arch/arm/mach-ebsa110/include/mach/entry-macro.S +++ b/arch/arm/mach-ebsa110/include/mach/entry-macro.S | |||
@@ -12,16 +12,10 @@ | |||
12 | 12 | ||
13 | #define IRQ_STAT 0xff000000 /* read */ | 13 | #define IRQ_STAT 0xff000000 /* read */ |
14 | 14 | ||
15 | .macro disable_fiq | ||
16 | .endm | ||
17 | |||
18 | .macro get_irqnr_preamble, base, tmp | 15 | .macro get_irqnr_preamble, base, tmp |
19 | mov \base, #IRQ_STAT | 16 | mov \base, #IRQ_STAT |
20 | .endm | 17 | .endm |
21 | 18 | ||
22 | .macro arch_ret_to_user, tmp1, tmp2 | ||
23 | .endm | ||
24 | |||
25 | .macro get_irqnr_and_base, irqnr, stat, base, tmp | 19 | .macro get_irqnr_and_base, irqnr, stat, base, tmp |
26 | ldrb \stat, [\base] @ get interrupts | 20 | ldrb \stat, [\base] @ get interrupts |
27 | mov \irqnr, #0 | 21 | mov \irqnr, #0 |
diff --git a/arch/arm/mach-ep93xx/include/mach/entry-macro.S b/arch/arm/mach-ep93xx/include/mach/entry-macro.S deleted file mode 100644 index 9be6edcf9045..000000000000 --- a/arch/arm/mach-ep93xx/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/include/mach/entry-macro.S | ||
3 | * IRQ demultiplexing for EP93xx | ||
4 | * | ||
5 | * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or (at | ||
10 | * your option) any later version. | ||
11 | */ | ||
12 | |||
13 | .macro disable_fiq | ||
14 | .endm | ||
15 | |||
16 | .macro arch_ret_to_user, tmp1, tmp2 | ||
17 | .endm | ||
diff --git a/arch/arm/mach-ep93xx/vision_ep9307.c b/arch/arm/mach-ep93xx/vision_ep9307.c index 03dd4012043e..d5fb44f16d31 100644 --- a/arch/arm/mach-ep93xx/vision_ep9307.c +++ b/arch/arm/mach-ep93xx/vision_ep9307.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <mach/hardware.h> | 32 | #include <mach/hardware.h> |
33 | #include <mach/fb.h> | 33 | #include <mach/fb.h> |
34 | #include <mach/ep93xx_spi.h> | 34 | #include <mach/ep93xx_spi.h> |
35 | #include <mach/gpio-ep93xx.h> | ||
35 | 36 | ||
36 | #include <asm/mach-types.h> | 37 | #include <asm/mach-types.h> |
37 | #include <asm/mach/map.h> | 38 | #include <asm/mach/map.h> |
@@ -153,7 +154,6 @@ static struct i2c_board_info vision_i2c_info[] __initdata = { | |||
153 | }, { | 154 | }, { |
154 | I2C_BOARD_INFO("pca9539", 0x74), | 155 | I2C_BOARD_INFO("pca9539", 0x74), |
155 | .platform_data = &pca953x_74_gpio_data, | 156 | .platform_data = &pca953x_74_gpio_data, |
156 | .irq = gpio_to_irq(EP93XX_GPIO_LINE_F(7)), | ||
157 | }, { | 157 | }, { |
158 | I2C_BOARD_INFO("pca9539", 0x75), | 158 | I2C_BOARD_INFO("pca9539", 0x75), |
159 | .platform_data = &pca953x_75_gpio_data, | 159 | .platform_data = &pca953x_75_gpio_data, |
@@ -348,6 +348,8 @@ static void __init vision_init_machine(void) | |||
348 | "pca9539:74")) | 348 | "pca9539:74")) |
349 | pr_warn("cannot request interrupt gpio for pca9539:74\n"); | 349 | pr_warn("cannot request interrupt gpio for pca9539:74\n"); |
350 | 350 | ||
351 | vision_i2c_info[1].irq = gpio_to_irq(EP93XX_GPIO_LINE_F(7)); | ||
352 | |||
351 | ep93xx_register_i2c(&vision_i2c_gpio_data, vision_i2c_info, | 353 | ep93xx_register_i2c(&vision_i2c_gpio_data, vision_i2c_info, |
352 | ARRAY_SIZE(vision_i2c_info)); | 354 | ARRAY_SIZE(vision_i2c_info)); |
353 | ep93xx_register_spi(&vision_spi_master, vision_spi_board_info, | 355 | ep93xx_register_spi(&vision_spi_master, vision_spi_board_info, |
diff --git a/arch/arm/mach-exynos/clock-exynos4210.c b/arch/arm/mach-exynos/clock-exynos4210.c index 25ea4002f400..54a92efcf5b1 100644 --- a/arch/arm/mach-exynos/clock-exynos4210.c +++ b/arch/arm/mach-exynos/clock-exynos4210.c | |||
@@ -32,6 +32,7 @@ | |||
32 | 32 | ||
33 | #include "common.h" | 33 | #include "common.h" |
34 | 34 | ||
35 | #ifdef CONFIG_PM_SLEEP | ||
35 | static struct sleep_save exynos4210_clock_save[] = { | 36 | static struct sleep_save exynos4210_clock_save[] = { |
36 | SAVE_ITEM(S5P_CLKSRC_IMAGE), | 37 | SAVE_ITEM(S5P_CLKSRC_IMAGE), |
37 | SAVE_ITEM(S5P_CLKSRC_LCD1), | 38 | SAVE_ITEM(S5P_CLKSRC_LCD1), |
@@ -42,6 +43,7 @@ static struct sleep_save exynos4210_clock_save[] = { | |||
42 | SAVE_ITEM(S5P_CLKGATE_IP_LCD1), | 43 | SAVE_ITEM(S5P_CLKGATE_IP_LCD1), |
43 | SAVE_ITEM(S5P_CLKGATE_IP_PERIR_4210), | 44 | SAVE_ITEM(S5P_CLKGATE_IP_PERIR_4210), |
44 | }; | 45 | }; |
46 | #endif | ||
45 | 47 | ||
46 | static struct clksrc_clk *sysclks[] = { | 48 | static struct clksrc_clk *sysclks[] = { |
47 | /* nothing here yet */ | 49 | /* nothing here yet */ |
diff --git a/arch/arm/mach-exynos/clock-exynos4212.c b/arch/arm/mach-exynos/clock-exynos4212.c index b133f8615c52..8e07ab13ff19 100644 --- a/arch/arm/mach-exynos/clock-exynos4212.c +++ b/arch/arm/mach-exynos/clock-exynos4212.c | |||
@@ -32,12 +32,14 @@ | |||
32 | 32 | ||
33 | #include "common.h" | 33 | #include "common.h" |
34 | 34 | ||
35 | #ifdef CONFIG_PM_SLEEP | ||
35 | static struct sleep_save exynos4212_clock_save[] = { | 36 | static struct sleep_save exynos4212_clock_save[] = { |
36 | SAVE_ITEM(S5P_CLKSRC_IMAGE), | 37 | SAVE_ITEM(S5P_CLKSRC_IMAGE), |
37 | SAVE_ITEM(S5P_CLKDIV_IMAGE), | 38 | SAVE_ITEM(S5P_CLKDIV_IMAGE), |
38 | SAVE_ITEM(S5P_CLKGATE_IP_IMAGE_4212), | 39 | SAVE_ITEM(S5P_CLKGATE_IP_IMAGE_4212), |
39 | SAVE_ITEM(S5P_CLKGATE_IP_PERIR_4212), | 40 | SAVE_ITEM(S5P_CLKGATE_IP_PERIR_4212), |
40 | }; | 41 | }; |
42 | #endif | ||
41 | 43 | ||
42 | static struct clk *clk_src_mpll_user_list[] = { | 44 | static struct clk *clk_src_mpll_user_list[] = { |
43 | [0] = &clk_fin_mpll, | 45 | [0] = &clk_fin_mpll, |
diff --git a/arch/arm/mach-exynos/clock.c b/arch/arm/mach-exynos/clock.c index c07c6d4bcecd..200874e82dcd 100644 --- a/arch/arm/mach-exynos/clock.c +++ b/arch/arm/mach-exynos/clock.c | |||
@@ -30,6 +30,7 @@ | |||
30 | 30 | ||
31 | #include "common.h" | 31 | #include "common.h" |
32 | 32 | ||
33 | #ifdef CONFIG_PM_SLEEP | ||
33 | static struct sleep_save exynos4_clock_save[] = { | 34 | static struct sleep_save exynos4_clock_save[] = { |
34 | SAVE_ITEM(S5P_CLKDIV_LEFTBUS), | 35 | SAVE_ITEM(S5P_CLKDIV_LEFTBUS), |
35 | SAVE_ITEM(S5P_CLKGATE_IP_LEFTBUS), | 36 | SAVE_ITEM(S5P_CLKGATE_IP_LEFTBUS), |
@@ -93,6 +94,7 @@ static struct sleep_save exynos4_clock_save[] = { | |||
93 | SAVE_ITEM(S5P_CLKGATE_SCLKCPU), | 94 | SAVE_ITEM(S5P_CLKGATE_SCLKCPU), |
94 | SAVE_ITEM(S5P_CLKGATE_IP_CPU), | 95 | SAVE_ITEM(S5P_CLKGATE_IP_CPU), |
95 | }; | 96 | }; |
97 | #endif | ||
96 | 98 | ||
97 | struct clk clk_sclk_hdmi27m = { | 99 | struct clk clk_sclk_hdmi27m = { |
98 | .name = "sclk_hdmi27m", | 100 | .name = "sclk_hdmi27m", |
diff --git a/arch/arm/mach-exynos/include/mach/entry-macro.S b/arch/arm/mach-exynos/include/mach/entry-macro.S deleted file mode 100644 index 3ba4f547534b..000000000000 --- a/arch/arm/mach-exynos/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | /* arch/arm/mach-exynos4/include/mach/entry-macro.S | ||
2 | * | ||
3 | * Cloned from arch/arm/mach-realview/include/mach/entry-macro.S | ||
4 | * | ||
5 | * Low-level IRQ helper macros for EXYNOS4 platforms | ||
6 | * | ||
7 | * This file is licensed under the terms of the GNU General Public | ||
8 | * License version 2. This program is licensed "as is" without any | ||
9 | * warranty of any kind, whether express or implied. | ||
10 | */ | ||
11 | |||
12 | .macro disable_fiq | ||
13 | .endm | ||
14 | |||
15 | .macro arch_ret_to_user, tmp1, tmp2 | ||
16 | .endm | ||
diff --git a/arch/arm/mach-exynos/mach-exynos4-dt.c b/arch/arm/mach-exynos/mach-exynos4-dt.c index 85fa02767d67..e6b02fdf1b09 100644 --- a/arch/arm/mach-exynos/mach-exynos4-dt.c +++ b/arch/arm/mach-exynos/mach-exynos4-dt.c | |||
@@ -15,11 +15,13 @@ | |||
15 | #include <linux/serial_core.h> | 15 | #include <linux/serial_core.h> |
16 | 16 | ||
17 | #include <asm/mach/arch.h> | 17 | #include <asm/mach/arch.h> |
18 | #include <asm/hardware/gic.h> | ||
18 | #include <mach/map.h> | 19 | #include <mach/map.h> |
19 | 20 | ||
20 | #include <plat/cpu.h> | 21 | #include <plat/cpu.h> |
21 | #include <plat/regs-serial.h> | 22 | #include <plat/regs-serial.h> |
22 | #include <plat/exynos4.h> | 23 | |
24 | #include "common.h" | ||
23 | 25 | ||
24 | /* | 26 | /* |
25 | * The following lookup table is used to override device names when devices | 27 | * The following lookup table is used to override device names when devices |
@@ -60,7 +62,7 @@ static const struct of_dev_auxdata exynos4210_auxdata_lookup[] __initconst = { | |||
60 | 62 | ||
61 | static void __init exynos4210_dt_map_io(void) | 63 | static void __init exynos4210_dt_map_io(void) |
62 | { | 64 | { |
63 | s5p_init_io(NULL, 0, S5P_VA_CHIPID); | 65 | exynos_init_io(NULL, 0); |
64 | s3c24xx_init_clocks(24000000); | 66 | s3c24xx_init_clocks(24000000); |
65 | } | 67 | } |
66 | 68 | ||
@@ -79,7 +81,9 @@ DT_MACHINE_START(EXYNOS4210_DT, "Samsung Exynos4 (Flattened Device Tree)") | |||
79 | /* Maintainer: Thomas Abraham <thomas.abraham@linaro.org> */ | 81 | /* Maintainer: Thomas Abraham <thomas.abraham@linaro.org> */ |
80 | .init_irq = exynos4_init_irq, | 82 | .init_irq = exynos4_init_irq, |
81 | .map_io = exynos4210_dt_map_io, | 83 | .map_io = exynos4210_dt_map_io, |
84 | .handle_irq = gic_handle_irq, | ||
82 | .init_machine = exynos4210_dt_machine_init, | 85 | .init_machine = exynos4210_dt_machine_init, |
83 | .timer = &exynos4_timer, | 86 | .timer = &exynos4_timer, |
84 | .dt_compat = exynos4210_dt_compat, | 87 | .dt_compat = exynos4210_dt_compat, |
88 | .restart = exynos4_restart, | ||
85 | MACHINE_END | 89 | MACHINE_END |
diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c index b895ec031105..435261f83f46 100644 --- a/arch/arm/mach-exynos/mach-nuri.c +++ b/arch/arm/mach-exynos/mach-nuri.c | |||
@@ -220,14 +220,14 @@ static struct s3c_fb_pd_win nuri_fb_win0 = { | |||
220 | .lower_margin = 1, | 220 | .lower_margin = 1, |
221 | .hsync_len = 48, | 221 | .hsync_len = 48, |
222 | .vsync_len = 3, | 222 | .vsync_len = 3, |
223 | .xres = 1280, | 223 | .xres = 1024, |
224 | .yres = 800, | 224 | .yres = 600, |
225 | .refresh = 60, | 225 | .refresh = 60, |
226 | }, | 226 | }, |
227 | .max_bpp = 24, | 227 | .max_bpp = 24, |
228 | .default_bpp = 16, | 228 | .default_bpp = 16, |
229 | .virtual_x = 1280, | 229 | .virtual_x = 1024, |
230 | .virtual_y = 800, | 230 | .virtual_y = 2 * 600, |
231 | }; | 231 | }; |
232 | 232 | ||
233 | static struct s3c_fb_platdata nuri_fb_pdata __initdata = { | 233 | static struct s3c_fb_platdata nuri_fb_pdata __initdata = { |
diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c index 29c8e188d8e7..e00d8e26d525 100644 --- a/arch/arm/mach-exynos/mach-universal_c210.c +++ b/arch/arm/mach-exynos/mach-universal_c210.c | |||
@@ -910,7 +910,7 @@ static struct s5p_fimc_isp_info universal_camera_sensors[] = { | |||
910 | .bus_type = FIMC_MIPI_CSI2, | 910 | .bus_type = FIMC_MIPI_CSI2, |
911 | .board_info = &m5mols_board_info, | 911 | .board_info = &m5mols_board_info, |
912 | .i2c_bus_num = 0, | 912 | .i2c_bus_num = 0, |
913 | .clk_frequency = 21600000UL, | 913 | .clk_frequency = 24000000UL, |
914 | .csi_data_align = 32, | 914 | .csi_data_align = 32, |
915 | }, | 915 | }, |
916 | }; | 916 | }; |
diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c index a4f61a43c7ba..e19013051772 100644 --- a/arch/arm/mach-exynos/pm.c +++ b/arch/arm/mach-exynos/pm.c | |||
@@ -206,7 +206,7 @@ static void exynos4_pm_prepare(void) | |||
206 | 206 | ||
207 | } | 207 | } |
208 | 208 | ||
209 | static int exynos4_pm_add(struct device *dev) | 209 | static int exynos4_pm_add(struct device *dev, struct subsys_interface *sif) |
210 | { | 210 | { |
211 | pm_cpu_prep = exynos4_pm_prepare; | 211 | pm_cpu_prep = exynos4_pm_prepare; |
212 | pm_cpu_sleep = exynos4_cpu_suspend; | 212 | pm_cpu_sleep = exynos4_cpu_suspend; |
@@ -384,7 +384,9 @@ static void exynos4_pm_resume(void) | |||
384 | 384 | ||
385 | exynos4_restore_pll(); | 385 | exynos4_restore_pll(); |
386 | 386 | ||
387 | #ifdef CONFIG_SMP | ||
387 | scu_enable(S5P_VA_SCU); | 388 | scu_enable(S5P_VA_SCU); |
389 | #endif | ||
388 | 390 | ||
389 | #ifdef CONFIG_CACHE_L2X0 | 391 | #ifdef CONFIG_CACHE_L2X0 |
390 | s3c_pm_do_restore_core(exynos4_l2cc_save, ARRAY_SIZE(exynos4_l2cc_save)); | 392 | s3c_pm_do_restore_core(exynos4_l2cc_save, ARRAY_SIZE(exynos4_l2cc_save)); |
diff --git a/arch/arm/mach-footbridge/include/mach/entry-macro.S b/arch/arm/mach-footbridge/include/mach/entry-macro.S index d3847be0c667..dabbd5c54a78 100644 --- a/arch/arm/mach-footbridge/include/mach/entry-macro.S +++ b/arch/arm/mach-footbridge/include/mach/entry-macro.S | |||
@@ -14,9 +14,6 @@ | |||
14 | .equ dc21285_high, ARMCSR_BASE & 0xff000000 | 14 | .equ dc21285_high, ARMCSR_BASE & 0xff000000 |
15 | .equ dc21285_low, ARMCSR_BASE & 0x00ffffff | 15 | .equ dc21285_low, ARMCSR_BASE & 0x00ffffff |
16 | 16 | ||
17 | .macro disable_fiq | ||
18 | .endm | ||
19 | |||
20 | .macro get_irqnr_preamble, base, tmp | 17 | .macro get_irqnr_preamble, base, tmp |
21 | mov \base, #dc21285_high | 18 | mov \base, #dc21285_high |
22 | .if dc21285_low | 19 | .if dc21285_low |
@@ -24,9 +21,6 @@ | |||
24 | .endif | 21 | .endif |
25 | .endm | 22 | .endm |
26 | 23 | ||
27 | .macro arch_ret_to_user, tmp1, tmp2 | ||
28 | .endm | ||
29 | |||
30 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 24 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
31 | ldr \irqstat, [\base, #0x180] @ get interrupts | 25 | ldr \irqstat, [\base, #0x180] @ get interrupts |
32 | 26 | ||
diff --git a/arch/arm/mach-gemini/include/mach/entry-macro.S b/arch/arm/mach-gemini/include/mach/entry-macro.S index 1624f91a2b8b..f044e430bfa4 100644 --- a/arch/arm/mach-gemini/include/mach/entry-macro.S +++ b/arch/arm/mach-gemini/include/mach/entry-macro.S | |||
@@ -12,15 +12,9 @@ | |||
12 | 12 | ||
13 | #define IRQ_STATUS 0x14 | 13 | #define IRQ_STATUS 0x14 |
14 | 14 | ||
15 | .macro disable_fiq | ||
16 | .endm | ||
17 | |||
18 | .macro get_irqnr_preamble, base, tmp | 15 | .macro get_irqnr_preamble, base, tmp |
19 | .endm | 16 | .endm |
20 | 17 | ||
21 | .macro arch_ret_to_user, tmp1, tmp2 | ||
22 | .endm | ||
23 | |||
24 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 18 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
25 | ldr \irqstat, =IO_ADDRESS(GEMINI_INTERRUPT_BASE + IRQ_STATUS) | 19 | ldr \irqstat, =IO_ADDRESS(GEMINI_INTERRUPT_BASE + IRQ_STATUS) |
26 | ldr \irqnr, [\irqstat] | 20 | ldr \irqnr, [\irqstat] |
diff --git a/arch/arm/mach-h720x/include/mach/entry-macro.S b/arch/arm/mach-h720x/include/mach/entry-macro.S index c3948e5ba4a0..75267fad7012 100644 --- a/arch/arm/mach-h720x/include/mach/entry-macro.S +++ b/arch/arm/mach-h720x/include/mach/entry-macro.S | |||
@@ -8,15 +8,9 @@ | |||
8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | .macro disable_fiq | ||
12 | .endm | ||
13 | |||
14 | .macro get_irqnr_preamble, base, tmp | 11 | .macro get_irqnr_preamble, base, tmp |
15 | .endm | 12 | .endm |
16 | 13 | ||
17 | .macro arch_ret_to_user, tmp1, tmp2 | ||
18 | .endm | ||
19 | |||
20 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 14 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
21 | #if defined (CONFIG_CPU_H7201) || defined (CONFIG_CPU_H7202) | 15 | #if defined (CONFIG_CPU_H7201) || defined (CONFIG_CPU_H7202) |
22 | @ we could use the id register on H7202, but this is not | 16 | @ we could use the id register on H7202, but this is not |
diff --git a/arch/arm/mach-highbank/include/mach/entry-macro.S b/arch/arm/mach-highbank/include/mach/entry-macro.S deleted file mode 100644 index a14f9e62ca92..000000000000 --- a/arch/arm/mach-highbank/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | .macro disable_fiq | ||
2 | .endm | ||
3 | |||
4 | .macro arch_ret_to_user, tmp1, tmp2 | ||
5 | .endm | ||
diff --git a/arch/arm/mach-imx/clock-imx31.c b/arch/arm/mach-imx/clock-imx31.c index 988a28178d4c..3a943cd4159f 100644 --- a/arch/arm/mach-imx/clock-imx31.c +++ b/arch/arm/mach-imx/clock-imx31.c | |||
@@ -32,7 +32,7 @@ | |||
32 | #include <mach/mx31.h> | 32 | #include <mach/mx31.h> |
33 | #include <mach/common.h> | 33 | #include <mach/common.h> |
34 | 34 | ||
35 | #include "crmregs-imx31.h" | 35 | #include "crmregs-imx3.h" |
36 | 36 | ||
37 | #define PRE_DIV_MIN_FREQ 10000000 /* Minimum Frequency after Predivider */ | 37 | #define PRE_DIV_MIN_FREQ 10000000 /* Minimum Frequency after Predivider */ |
38 | 38 | ||
diff --git a/arch/arm/mach-imx/clock-imx35.c b/arch/arm/mach-imx/clock-imx35.c index ac8238caecb9..1e279af656ad 100644 --- a/arch/arm/mach-imx/clock-imx35.c +++ b/arch/arm/mach-imx/clock-imx35.c | |||
@@ -27,23 +27,7 @@ | |||
27 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
28 | #include <mach/common.h> | 28 | #include <mach/common.h> |
29 | 29 | ||
30 | #define CCM_BASE MX35_IO_ADDRESS(MX35_CCM_BASE_ADDR) | 30 | #include "crmregs-imx3.h" |
31 | |||
32 | #define CCM_CCMR 0x00 | ||
33 | #define CCM_PDR0 0x04 | ||
34 | #define CCM_PDR1 0x08 | ||
35 | #define CCM_PDR2 0x0C | ||
36 | #define CCM_PDR3 0x10 | ||
37 | #define CCM_PDR4 0x14 | ||
38 | #define CCM_RCSR 0x18 | ||
39 | #define CCM_MPCTL 0x1C | ||
40 | #define CCM_PPCTL 0x20 | ||
41 | #define CCM_ACMR 0x24 | ||
42 | #define CCM_COSR 0x28 | ||
43 | #define CCM_CGR0 0x2C | ||
44 | #define CCM_CGR1 0x30 | ||
45 | #define CCM_CGR2 0x34 | ||
46 | #define CCM_CGR3 0x38 | ||
47 | 31 | ||
48 | #ifdef HAVE_SET_RATE_SUPPORT | 32 | #ifdef HAVE_SET_RATE_SUPPORT |
49 | static void calc_dividers(u32 div, u32 *pre, u32 *post, u32 maxpost) | 33 | static void calc_dividers(u32 div, u32 *pre, u32 *post, u32 maxpost) |
@@ -111,14 +95,14 @@ static void calc_dividers_3_3(u32 div, u32 *pre, u32 *post) | |||
111 | 95 | ||
112 | static unsigned long get_rate_mpll(void) | 96 | static unsigned long get_rate_mpll(void) |
113 | { | 97 | { |
114 | ulong mpctl = __raw_readl(CCM_BASE + CCM_MPCTL); | 98 | ulong mpctl = __raw_readl(MX35_CCM_MPCTL); |
115 | 99 | ||
116 | return mxc_decode_pll(mpctl, 24000000); | 100 | return mxc_decode_pll(mpctl, 24000000); |
117 | } | 101 | } |
118 | 102 | ||
119 | static unsigned long get_rate_ppll(void) | 103 | static unsigned long get_rate_ppll(void) |
120 | { | 104 | { |
121 | ulong ppctl = __raw_readl(CCM_BASE + CCM_PPCTL); | 105 | ulong ppctl = __raw_readl(MX35_CCM_PPCTL); |
122 | 106 | ||
123 | return mxc_decode_pll(ppctl, 24000000); | 107 | return mxc_decode_pll(ppctl, 24000000); |
124 | } | 108 | } |
@@ -148,7 +132,7 @@ static struct arm_ahb_div clk_consumer[] = { | |||
148 | 132 | ||
149 | static unsigned long get_rate_arm(void) | 133 | static unsigned long get_rate_arm(void) |
150 | { | 134 | { |
151 | unsigned long pdr0 = __raw_readl(CCM_BASE + CCM_PDR0); | 135 | unsigned long pdr0 = __raw_readl(MXC_CCM_PDR0); |
152 | struct arm_ahb_div *aad; | 136 | struct arm_ahb_div *aad; |
153 | unsigned long fref = get_rate_mpll(); | 137 | unsigned long fref = get_rate_mpll(); |
154 | 138 | ||
@@ -161,7 +145,7 @@ static unsigned long get_rate_arm(void) | |||
161 | 145 | ||
162 | static unsigned long get_rate_ahb(struct clk *clk) | 146 | static unsigned long get_rate_ahb(struct clk *clk) |
163 | { | 147 | { |
164 | unsigned long pdr0 = __raw_readl(CCM_BASE + CCM_PDR0); | 148 | unsigned long pdr0 = __raw_readl(MXC_CCM_PDR0); |
165 | struct arm_ahb_div *aad; | 149 | struct arm_ahb_div *aad; |
166 | unsigned long fref = get_rate_arm(); | 150 | unsigned long fref = get_rate_arm(); |
167 | 151 | ||
@@ -177,8 +161,8 @@ static unsigned long get_rate_ipg(struct clk *clk) | |||
177 | 161 | ||
178 | static unsigned long get_rate_uart(struct clk *clk) | 162 | static unsigned long get_rate_uart(struct clk *clk) |
179 | { | 163 | { |
180 | unsigned long pdr3 = __raw_readl(CCM_BASE + CCM_PDR3); | 164 | unsigned long pdr3 = __raw_readl(MX35_CCM_PDR3); |
181 | unsigned long pdr4 = __raw_readl(CCM_BASE + CCM_PDR4); | 165 | unsigned long pdr4 = __raw_readl(MX35_CCM_PDR4); |
182 | unsigned long div = ((pdr4 >> 10) & 0x3f) + 1; | 166 | unsigned long div = ((pdr4 >> 10) & 0x3f) + 1; |
183 | 167 | ||
184 | if (pdr3 & (1 << 14)) | 168 | if (pdr3 & (1 << 14)) |
@@ -189,7 +173,7 @@ static unsigned long get_rate_uart(struct clk *clk) | |||
189 | 173 | ||
190 | static unsigned long get_rate_sdhc(struct clk *clk) | 174 | static unsigned long get_rate_sdhc(struct clk *clk) |
191 | { | 175 | { |
192 | unsigned long pdr3 = __raw_readl(CCM_BASE + CCM_PDR3); | 176 | unsigned long pdr3 = __raw_readl(MX35_CCM_PDR3); |
193 | unsigned long div, rate; | 177 | unsigned long div, rate; |
194 | 178 | ||
195 | if (pdr3 & (1 << 6)) | 179 | if (pdr3 & (1 << 6)) |
@@ -215,7 +199,7 @@ static unsigned long get_rate_sdhc(struct clk *clk) | |||
215 | 199 | ||
216 | static unsigned long get_rate_mshc(struct clk *clk) | 200 | static unsigned long get_rate_mshc(struct clk *clk) |
217 | { | 201 | { |
218 | unsigned long pdr1 = __raw_readl(CCM_BASE + CCM_PDR1); | 202 | unsigned long pdr1 = __raw_readl(MXC_CCM_PDR1); |
219 | unsigned long div1, div2, rate; | 203 | unsigned long div1, div2, rate; |
220 | 204 | ||
221 | if (pdr1 & (1 << 7)) | 205 | if (pdr1 & (1 << 7)) |
@@ -231,7 +215,7 @@ static unsigned long get_rate_mshc(struct clk *clk) | |||
231 | 215 | ||
232 | static unsigned long get_rate_ssi(struct clk *clk) | 216 | static unsigned long get_rate_ssi(struct clk *clk) |
233 | { | 217 | { |
234 | unsigned long pdr2 = __raw_readl(CCM_BASE + CCM_PDR2); | 218 | unsigned long pdr2 = __raw_readl(MX35_CCM_PDR2); |
235 | unsigned long div1, div2, rate; | 219 | unsigned long div1, div2, rate; |
236 | 220 | ||
237 | if (pdr2 & (1 << 6)) | 221 | if (pdr2 & (1 << 6)) |
@@ -256,7 +240,7 @@ static unsigned long get_rate_ssi(struct clk *clk) | |||
256 | 240 | ||
257 | static unsigned long get_rate_csi(struct clk *clk) | 241 | static unsigned long get_rate_csi(struct clk *clk) |
258 | { | 242 | { |
259 | unsigned long pdr2 = __raw_readl(CCM_BASE + CCM_PDR2); | 243 | unsigned long pdr2 = __raw_readl(MX35_CCM_PDR2); |
260 | unsigned long rate; | 244 | unsigned long rate; |
261 | 245 | ||
262 | if (pdr2 & (1 << 7)) | 246 | if (pdr2 & (1 << 7)) |
@@ -269,7 +253,7 @@ static unsigned long get_rate_csi(struct clk *clk) | |||
269 | 253 | ||
270 | static unsigned long get_rate_otg(struct clk *clk) | 254 | static unsigned long get_rate_otg(struct clk *clk) |
271 | { | 255 | { |
272 | unsigned long pdr4 = __raw_readl(CCM_BASE + CCM_PDR4); | 256 | unsigned long pdr4 = __raw_readl(MX35_CCM_PDR4); |
273 | unsigned long rate; | 257 | unsigned long rate; |
274 | 258 | ||
275 | if (pdr4 & (1 << 9)) | 259 | if (pdr4 & (1 << 9)) |
@@ -282,8 +266,8 @@ static unsigned long get_rate_otg(struct clk *clk) | |||
282 | 266 | ||
283 | static unsigned long get_rate_ipg_per(struct clk *clk) | 267 | static unsigned long get_rate_ipg_per(struct clk *clk) |
284 | { | 268 | { |
285 | unsigned long pdr0 = __raw_readl(CCM_BASE + CCM_PDR0); | 269 | unsigned long pdr0 = __raw_readl(MXC_CCM_PDR0); |
286 | unsigned long pdr4 = __raw_readl(CCM_BASE + CCM_PDR4); | 270 | unsigned long pdr4 = __raw_readl(MX35_CCM_PDR4); |
287 | unsigned long div; | 271 | unsigned long div; |
288 | 272 | ||
289 | if (pdr0 & (1 << 26)) { | 273 | if (pdr0 & (1 << 26)) { |
@@ -297,7 +281,7 @@ static unsigned long get_rate_ipg_per(struct clk *clk) | |||
297 | 281 | ||
298 | static unsigned long get_rate_hsp(struct clk *clk) | 282 | static unsigned long get_rate_hsp(struct clk *clk) |
299 | { | 283 | { |
300 | unsigned long hsp_podf = (__raw_readl(CCM_BASE + CCM_PDR0) >> 20) & 0x03; | 284 | unsigned long hsp_podf = (__raw_readl(MXC_CCM_PDR0) >> 20) & 0x03; |
301 | unsigned long fref = get_rate_mpll(); | 285 | unsigned long fref = get_rate_mpll(); |
302 | 286 | ||
303 | if (fref > 400 * 1000 * 1000) { | 287 | if (fref > 400 * 1000 * 1000) { |
@@ -345,7 +329,7 @@ static void clk_cgr_disable(struct clk *clk) | |||
345 | #define DEFINE_CLOCK(name, i, er, es, gr, sr) \ | 329 | #define DEFINE_CLOCK(name, i, er, es, gr, sr) \ |
346 | static struct clk name = { \ | 330 | static struct clk name = { \ |
347 | .id = i, \ | 331 | .id = i, \ |
348 | .enable_reg = CCM_BASE + er, \ | 332 | .enable_reg = er, \ |
349 | .enable_shift = es, \ | 333 | .enable_shift = es, \ |
350 | .get_rate = gr, \ | 334 | .get_rate = gr, \ |
351 | .set_rate = sr, \ | 335 | .set_rate = sr, \ |
@@ -353,59 +337,59 @@ static void clk_cgr_disable(struct clk *clk) | |||
353 | .disable = clk_cgr_disable, \ | 337 | .disable = clk_cgr_disable, \ |
354 | } | 338 | } |
355 | 339 | ||
356 | DEFINE_CLOCK(asrc_clk, 0, CCM_CGR0, 0, NULL, NULL); | 340 | DEFINE_CLOCK(asrc_clk, 0, MX35_CCM_CGR0, 0, NULL, NULL); |
357 | DEFINE_CLOCK(pata_clk, 0, CCM_CGR0, 2, get_rate_ipg, NULL); | 341 | DEFINE_CLOCK(pata_clk, 0, MX35_CCM_CGR0, 2, get_rate_ipg, NULL); |
358 | /* DEFINE_CLOCK(audmux_clk, 0, CCM_CGR0, 4, NULL, NULL); */ | 342 | /* DEFINE_CLOCK(audmux_clk, 0, MX35_CCM_CGR0, 4, NULL, NULL); */ |
359 | DEFINE_CLOCK(can1_clk, 0, CCM_CGR0, 6, get_rate_ipg, NULL); | 343 | DEFINE_CLOCK(can1_clk, 0, MX35_CCM_CGR0, 6, get_rate_ipg, NULL); |
360 | DEFINE_CLOCK(can2_clk, 1, CCM_CGR0, 8, get_rate_ipg, NULL); | 344 | DEFINE_CLOCK(can2_clk, 1, MX35_CCM_CGR0, 8, get_rate_ipg, NULL); |
361 | DEFINE_CLOCK(cspi1_clk, 0, CCM_CGR0, 10, get_rate_ipg, NULL); | 345 | DEFINE_CLOCK(cspi1_clk, 0, MX35_CCM_CGR0, 10, get_rate_ipg, NULL); |
362 | DEFINE_CLOCK(cspi2_clk, 1, CCM_CGR0, 12, get_rate_ipg, NULL); | 346 | DEFINE_CLOCK(cspi2_clk, 1, MX35_CCM_CGR0, 12, get_rate_ipg, NULL); |
363 | DEFINE_CLOCK(ect_clk, 0, CCM_CGR0, 14, get_rate_ipg, NULL); | 347 | DEFINE_CLOCK(ect_clk, 0, MX35_CCM_CGR0, 14, get_rate_ipg, NULL); |
364 | DEFINE_CLOCK(edio_clk, 0, CCM_CGR0, 16, NULL, NULL); | 348 | DEFINE_CLOCK(edio_clk, 0, MX35_CCM_CGR0, 16, NULL, NULL); |
365 | DEFINE_CLOCK(emi_clk, 0, CCM_CGR0, 18, get_rate_ipg, NULL); | 349 | DEFINE_CLOCK(emi_clk, 0, MX35_CCM_CGR0, 18, get_rate_ipg, NULL); |
366 | DEFINE_CLOCK(epit1_clk, 0, CCM_CGR0, 20, get_rate_ipg, NULL); | 350 | DEFINE_CLOCK(epit1_clk, 0, MX35_CCM_CGR0, 20, get_rate_ipg, NULL); |
367 | DEFINE_CLOCK(epit2_clk, 1, CCM_CGR0, 22, get_rate_ipg, NULL); | 351 | DEFINE_CLOCK(epit2_clk, 1, MX35_CCM_CGR0, 22, get_rate_ipg, NULL); |
368 | DEFINE_CLOCK(esai_clk, 0, CCM_CGR0, 24, NULL, NULL); | 352 | DEFINE_CLOCK(esai_clk, 0, MX35_CCM_CGR0, 24, NULL, NULL); |
369 | DEFINE_CLOCK(esdhc1_clk, 0, CCM_CGR0, 26, get_rate_sdhc, NULL); | 353 | DEFINE_CLOCK(esdhc1_clk, 0, MX35_CCM_CGR0, 26, get_rate_sdhc, NULL); |
370 | DEFINE_CLOCK(esdhc2_clk, 1, CCM_CGR0, 28, get_rate_sdhc, NULL); | 354 | DEFINE_CLOCK(esdhc2_clk, 1, MX35_CCM_CGR0, 28, get_rate_sdhc, NULL); |
371 | DEFINE_CLOCK(esdhc3_clk, 2, CCM_CGR0, 30, get_rate_sdhc, NULL); | 355 | DEFINE_CLOCK(esdhc3_clk, 2, MX35_CCM_CGR0, 30, get_rate_sdhc, NULL); |
372 | 356 | ||
373 | DEFINE_CLOCK(fec_clk, 0, CCM_CGR1, 0, get_rate_ipg, NULL); | 357 | DEFINE_CLOCK(fec_clk, 0, MX35_CCM_CGR1, 0, get_rate_ipg, NULL); |
374 | DEFINE_CLOCK(gpio1_clk, 0, CCM_CGR1, 2, NULL, NULL); | 358 | DEFINE_CLOCK(gpio1_clk, 0, MX35_CCM_CGR1, 2, NULL, NULL); |
375 | DEFINE_CLOCK(gpio2_clk, 1, CCM_CGR1, 4, NULL, NULL); | 359 | DEFINE_CLOCK(gpio2_clk, 1, MX35_CCM_CGR1, 4, NULL, NULL); |
376 | DEFINE_CLOCK(gpio3_clk, 2, CCM_CGR1, 6, NULL, NULL); | 360 | DEFINE_CLOCK(gpio3_clk, 2, MX35_CCM_CGR1, 6, NULL, NULL); |
377 | DEFINE_CLOCK(gpt_clk, 0, CCM_CGR1, 8, get_rate_ipg, NULL); | 361 | DEFINE_CLOCK(gpt_clk, 0, MX35_CCM_CGR1, 8, get_rate_ipg, NULL); |
378 | DEFINE_CLOCK(i2c1_clk, 0, CCM_CGR1, 10, get_rate_ipg_per, NULL); | 362 | DEFINE_CLOCK(i2c1_clk, 0, MX35_CCM_CGR1, 10, get_rate_ipg_per, NULL); |
379 | DEFINE_CLOCK(i2c2_clk, 1, CCM_CGR1, 12, get_rate_ipg_per, NULL); | 363 | DEFINE_CLOCK(i2c2_clk, 1, MX35_CCM_CGR1, 12, get_rate_ipg_per, NULL); |
380 | DEFINE_CLOCK(i2c3_clk, 2, CCM_CGR1, 14, get_rate_ipg_per, NULL); | 364 | DEFINE_CLOCK(i2c3_clk, 2, MX35_CCM_CGR1, 14, get_rate_ipg_per, NULL); |
381 | DEFINE_CLOCK(iomuxc_clk, 0, CCM_CGR1, 16, NULL, NULL); | 365 | DEFINE_CLOCK(iomuxc_clk, 0, MX35_CCM_CGR1, 16, NULL, NULL); |
382 | DEFINE_CLOCK(ipu_clk, 0, CCM_CGR1, 18, get_rate_hsp, NULL); | 366 | DEFINE_CLOCK(ipu_clk, 0, MX35_CCM_CGR1, 18, get_rate_hsp, NULL); |
383 | DEFINE_CLOCK(kpp_clk, 0, CCM_CGR1, 20, get_rate_ipg, NULL); | 367 | DEFINE_CLOCK(kpp_clk, 0, MX35_CCM_CGR1, 20, get_rate_ipg, NULL); |
384 | DEFINE_CLOCK(mlb_clk, 0, CCM_CGR1, 22, get_rate_ahb, NULL); | 368 | DEFINE_CLOCK(mlb_clk, 0, MX35_CCM_CGR1, 22, get_rate_ahb, NULL); |
385 | DEFINE_CLOCK(mshc_clk, 0, CCM_CGR1, 24, get_rate_mshc, NULL); | 369 | DEFINE_CLOCK(mshc_clk, 0, MX35_CCM_CGR1, 24, get_rate_mshc, NULL); |
386 | DEFINE_CLOCK(owire_clk, 0, CCM_CGR1, 26, get_rate_ipg_per, NULL); | 370 | DEFINE_CLOCK(owire_clk, 0, MX35_CCM_CGR1, 26, get_rate_ipg_per, NULL); |
387 | DEFINE_CLOCK(pwm_clk, 0, CCM_CGR1, 28, get_rate_ipg_per, NULL); | 371 | DEFINE_CLOCK(pwm_clk, 0, MX35_CCM_CGR1, 28, get_rate_ipg_per, NULL); |
388 | DEFINE_CLOCK(rngc_clk, 0, CCM_CGR1, 30, get_rate_ipg, NULL); | 372 | DEFINE_CLOCK(rngc_clk, 0, MX35_CCM_CGR1, 30, get_rate_ipg, NULL); |
389 | 373 | ||
390 | DEFINE_CLOCK(rtc_clk, 0, CCM_CGR2, 0, get_rate_ipg, NULL); | 374 | DEFINE_CLOCK(rtc_clk, 0, MX35_CCM_CGR2, 0, get_rate_ipg, NULL); |
391 | DEFINE_CLOCK(rtic_clk, 0, CCM_CGR2, 2, get_rate_ahb, NULL); | 375 | DEFINE_CLOCK(rtic_clk, 0, MX35_CCM_CGR2, 2, get_rate_ahb, NULL); |
392 | DEFINE_CLOCK(scc_clk, 0, CCM_CGR2, 4, get_rate_ipg, NULL); | 376 | DEFINE_CLOCK(scc_clk, 0, MX35_CCM_CGR2, 4, get_rate_ipg, NULL); |
393 | DEFINE_CLOCK(sdma_clk, 0, CCM_CGR2, 6, NULL, NULL); | 377 | DEFINE_CLOCK(sdma_clk, 0, MX35_CCM_CGR2, 6, NULL, NULL); |
394 | DEFINE_CLOCK(spba_clk, 0, CCM_CGR2, 8, get_rate_ipg, NULL); | 378 | DEFINE_CLOCK(spba_clk, 0, MX35_CCM_CGR2, 8, get_rate_ipg, NULL); |
395 | DEFINE_CLOCK(spdif_clk, 0, CCM_CGR2, 10, NULL, NULL); | 379 | DEFINE_CLOCK(spdif_clk, 0, MX35_CCM_CGR2, 10, NULL, NULL); |
396 | DEFINE_CLOCK(ssi1_clk, 0, CCM_CGR2, 12, get_rate_ssi, NULL); | 380 | DEFINE_CLOCK(ssi1_clk, 0, MX35_CCM_CGR2, 12, get_rate_ssi, NULL); |
397 | DEFINE_CLOCK(ssi2_clk, 1, CCM_CGR2, 14, get_rate_ssi, NULL); | 381 | DEFINE_CLOCK(ssi2_clk, 1, MX35_CCM_CGR2, 14, get_rate_ssi, NULL); |
398 | DEFINE_CLOCK(uart1_clk, 0, CCM_CGR2, 16, get_rate_uart, NULL); | 382 | DEFINE_CLOCK(uart1_clk, 0, MX35_CCM_CGR2, 16, get_rate_uart, NULL); |
399 | DEFINE_CLOCK(uart2_clk, 1, CCM_CGR2, 18, get_rate_uart, NULL); | 383 | DEFINE_CLOCK(uart2_clk, 1, MX35_CCM_CGR2, 18, get_rate_uart, NULL); |
400 | DEFINE_CLOCK(uart3_clk, 2, CCM_CGR2, 20, get_rate_uart, NULL); | 384 | DEFINE_CLOCK(uart3_clk, 2, MX35_CCM_CGR2, 20, get_rate_uart, NULL); |
401 | DEFINE_CLOCK(usbotg_clk, 0, CCM_CGR2, 22, get_rate_otg, NULL); | 385 | DEFINE_CLOCK(usbotg_clk, 0, MX35_CCM_CGR2, 22, get_rate_otg, NULL); |
402 | DEFINE_CLOCK(wdog_clk, 0, CCM_CGR2, 24, NULL, NULL); | 386 | DEFINE_CLOCK(wdog_clk, 0, MX35_CCM_CGR2, 24, NULL, NULL); |
403 | DEFINE_CLOCK(max_clk, 0, CCM_CGR2, 26, NULL, NULL); | 387 | DEFINE_CLOCK(max_clk, 0, MX35_CCM_CGR2, 26, NULL, NULL); |
404 | DEFINE_CLOCK(audmux_clk, 0, CCM_CGR2, 30, NULL, NULL); | 388 | DEFINE_CLOCK(audmux_clk, 0, MX35_CCM_CGR2, 30, NULL, NULL); |
405 | 389 | ||
406 | DEFINE_CLOCK(csi_clk, 0, CCM_CGR3, 0, get_rate_csi, NULL); | 390 | DEFINE_CLOCK(csi_clk, 0, MX35_CCM_CGR3, 0, get_rate_csi, NULL); |
407 | DEFINE_CLOCK(iim_clk, 0, CCM_CGR3, 2, NULL, NULL); | 391 | DEFINE_CLOCK(iim_clk, 0, MX35_CCM_CGR3, 2, NULL, NULL); |
408 | DEFINE_CLOCK(gpu2d_clk, 0, CCM_CGR3, 4, NULL, NULL); | 392 | DEFINE_CLOCK(gpu2d_clk, 0, MX35_CCM_CGR3, 4, NULL, NULL); |
409 | 393 | ||
410 | DEFINE_CLOCK(usbahb_clk, 0, 0, 0, get_rate_ahb, NULL); | 394 | DEFINE_CLOCK(usbahb_clk, 0, 0, 0, get_rate_ahb, NULL); |
411 | 395 | ||
@@ -422,7 +406,7 @@ static unsigned long get_rate_nfc(struct clk *clk) | |||
422 | { | 406 | { |
423 | unsigned long div1; | 407 | unsigned long div1; |
424 | 408 | ||
425 | div1 = (__raw_readl(CCM_BASE + CCM_PDR4) >> 28) + 1; | 409 | div1 = (__raw_readl(MX35_CCM_PDR4) >> 28) + 1; |
426 | 410 | ||
427 | return get_rate_ahb(NULL) / div1; | 411 | return get_rate_ahb(NULL) / div1; |
428 | } | 412 | } |
@@ -518,11 +502,11 @@ int __init mx35_clocks_init() | |||
518 | /* Turn off all clocks except the ones we need to survive, namely: | 502 | /* Turn off all clocks except the ones we need to survive, namely: |
519 | * EMI, GPIO1/2/3, GPT, IOMUX, MAX and eventually uart | 503 | * EMI, GPIO1/2/3, GPT, IOMUX, MAX and eventually uart |
520 | */ | 504 | */ |
521 | __raw_writel((3 << 18), CCM_BASE + CCM_CGR0); | 505 | __raw_writel((3 << 18), MX35_CCM_CGR0); |
522 | __raw_writel((3 << 2) | (3 << 4) | (3 << 6) | (3 << 8) | (3 << 16), | 506 | __raw_writel((3 << 2) | (3 << 4) | (3 << 6) | (3 << 8) | (3 << 16), |
523 | CCM_BASE + CCM_CGR1); | 507 | MX35_CCM_CGR1); |
524 | __raw_writel(cgr2, CCM_BASE + CCM_CGR2); | 508 | __raw_writel(cgr2, MX35_CCM_CGR2); |
525 | __raw_writel(0, CCM_BASE + CCM_CGR3); | 509 | __raw_writel(0, MX35_CCM_CGR3); |
526 | 510 | ||
527 | clk_enable(&iim_clk); | 511 | clk_enable(&iim_clk); |
528 | imx_print_silicon_rev("i.MX35", mx35_revision()); | 512 | imx_print_silicon_rev("i.MX35", mx35_revision()); |
@@ -533,7 +517,7 @@ int __init mx35_clocks_init() | |||
533 | * extra clocks turned on, otherwise the MX35 boot ROM code will | 517 | * extra clocks turned on, otherwise the MX35 boot ROM code will |
534 | * hang after a watchdog reset. | 518 | * hang after a watchdog reset. |
535 | */ | 519 | */ |
536 | if (!(__raw_readl(CCM_BASE + CCM_RCSR) & (3 << 10))) { | 520 | if (!(__raw_readl(MX35_CCM_RCSR) & (3 << 10))) { |
537 | /* Additionally turn on UART1, SCC, and IIM clocks */ | 521 | /* Additionally turn on UART1, SCC, and IIM clocks */ |
538 | clk_enable(&iim_clk); | 522 | clk_enable(&iim_clk); |
539 | clk_enable(&uart1_clk); | 523 | clk_enable(&uart1_clk); |
diff --git a/arch/arm/mach-imx/crmregs-imx31.h b/arch/arm/mach-imx/crmregs-imx3.h index 37a8a07beda3..d7691e2362c1 100644 --- a/arch/arm/mach-imx/crmregs-imx31.h +++ b/arch/arm/mach-imx/crmregs-imx3.h | |||
@@ -24,23 +24,36 @@ | |||
24 | #define CKIH_CLK_FREQ_27MHZ 27000000 | 24 | #define CKIH_CLK_FREQ_27MHZ 27000000 |
25 | #define CKIL_CLK_FREQ 32768 | 25 | #define CKIL_CLK_FREQ 32768 |
26 | 26 | ||
27 | #define MXC_CCM_BASE MX31_IO_ADDRESS(MX31_CCM_BASE_ADDR) | 27 | #define MXC_CCM_BASE (cpu_is_mx31() ? \ |
28 | MX31_IO_ADDRESS(MX31_CCM_BASE_ADDR) : MX35_IO_ADDRESS(MX35_CCM_BASE_ADDR)) | ||
28 | 29 | ||
29 | /* Register addresses */ | 30 | /* Register addresses */ |
30 | #define MXC_CCM_CCMR (MXC_CCM_BASE + 0x00) | 31 | #define MXC_CCM_CCMR (MXC_CCM_BASE + 0x00) |
31 | #define MXC_CCM_PDR0 (MXC_CCM_BASE + 0x04) | 32 | #define MXC_CCM_PDR0 (MXC_CCM_BASE + 0x04) |
32 | #define MXC_CCM_PDR1 (MXC_CCM_BASE + 0x08) | 33 | #define MXC_CCM_PDR1 (MXC_CCM_BASE + 0x08) |
34 | #define MX35_CCM_PDR2 (MXC_CCM_BASE + 0x0C) | ||
33 | #define MXC_CCM_RCSR (MXC_CCM_BASE + 0x0C) | 35 | #define MXC_CCM_RCSR (MXC_CCM_BASE + 0x0C) |
36 | #define MX35_CCM_PDR3 (MXC_CCM_BASE + 0x10) | ||
34 | #define MXC_CCM_MPCTL (MXC_CCM_BASE + 0x10) | 37 | #define MXC_CCM_MPCTL (MXC_CCM_BASE + 0x10) |
38 | #define MX35_CCM_PDR4 (MXC_CCM_BASE + 0x14) | ||
35 | #define MXC_CCM_UPCTL (MXC_CCM_BASE + 0x14) | 39 | #define MXC_CCM_UPCTL (MXC_CCM_BASE + 0x14) |
40 | #define MX35_CCM_RCSR (MXC_CCM_BASE + 0x18) | ||
36 | #define MXC_CCM_SRPCTL (MXC_CCM_BASE + 0x18) | 41 | #define MXC_CCM_SRPCTL (MXC_CCM_BASE + 0x18) |
42 | #define MX35_CCM_MPCTL (MXC_CCM_BASE + 0x1C) | ||
37 | #define MXC_CCM_COSR (MXC_CCM_BASE + 0x1C) | 43 | #define MXC_CCM_COSR (MXC_CCM_BASE + 0x1C) |
44 | #define MX35_CCM_PPCTL (MXC_CCM_BASE + 0x20) | ||
38 | #define MXC_CCM_CGR0 (MXC_CCM_BASE + 0x20) | 45 | #define MXC_CCM_CGR0 (MXC_CCM_BASE + 0x20) |
46 | #define MX35_CCM_ACMR (MXC_CCM_BASE + 0x24) | ||
39 | #define MXC_CCM_CGR1 (MXC_CCM_BASE + 0x24) | 47 | #define MXC_CCM_CGR1 (MXC_CCM_BASE + 0x24) |
48 | #define MX35_CCM_COSR (MXC_CCM_BASE + 0x28) | ||
40 | #define MXC_CCM_CGR2 (MXC_CCM_BASE + 0x28) | 49 | #define MXC_CCM_CGR2 (MXC_CCM_BASE + 0x28) |
50 | #define MX35_CCM_CGR0 (MXC_CCM_BASE + 0x2C) | ||
41 | #define MXC_CCM_WIMR (MXC_CCM_BASE + 0x2C) | 51 | #define MXC_CCM_WIMR (MXC_CCM_BASE + 0x2C) |
52 | #define MX35_CCM_CGR1 (MXC_CCM_BASE + 0x30) | ||
42 | #define MXC_CCM_LDC (MXC_CCM_BASE + 0x30) | 53 | #define MXC_CCM_LDC (MXC_CCM_BASE + 0x30) |
54 | #define MX35_CCM_CGR2 (MXC_CCM_BASE + 0x34) | ||
43 | #define MXC_CCM_DCVR0 (MXC_CCM_BASE + 0x34) | 55 | #define MXC_CCM_DCVR0 (MXC_CCM_BASE + 0x34) |
56 | #define MX35_CCM_CGR3 (MXC_CCM_BASE + 0x38) | ||
44 | #define MXC_CCM_DCVR1 (MXC_CCM_BASE + 0x38) | 57 | #define MXC_CCM_DCVR1 (MXC_CCM_BASE + 0x38) |
45 | #define MXC_CCM_DCVR2 (MXC_CCM_BASE + 0x3C) | 58 | #define MXC_CCM_DCVR2 (MXC_CCM_BASE + 0x3C) |
46 | #define MXC_CCM_DCVR3 (MXC_CCM_BASE + 0x40) | 59 | #define MXC_CCM_DCVR3 (MXC_CCM_BASE + 0x40) |
diff --git a/arch/arm/mach-imx/mach-armadillo5x0.c b/arch/arm/mach-imx/mach-armadillo5x0.c index e4f426a09899..27bc27e6ea41 100644 --- a/arch/arm/mach-imx/mach-armadillo5x0.c +++ b/arch/arm/mach-imx/mach-armadillo5x0.c | |||
@@ -51,7 +51,7 @@ | |||
51 | #include <mach/ulpi.h> | 51 | #include <mach/ulpi.h> |
52 | 52 | ||
53 | #include "devices-imx31.h" | 53 | #include "devices-imx31.h" |
54 | #include "crmregs-imx31.h" | 54 | #include "crmregs-imx3.h" |
55 | 55 | ||
56 | static int armadillo5x0_pins[] = { | 56 | static int armadillo5x0_pins[] = { |
57 | /* UART1 */ | 57 | /* UART1 */ |
diff --git a/arch/arm/mach-integrator/include/mach/entry-macro.S b/arch/arm/mach-integrator/include/mach/entry-macro.S index 3d029c9f3ef6..5cc7b85ad9df 100644 --- a/arch/arm/mach-integrator/include/mach/entry-macro.S +++ b/arch/arm/mach-integrator/include/mach/entry-macro.S | |||
@@ -11,15 +11,9 @@ | |||
11 | #include <mach/platform.h> | 11 | #include <mach/platform.h> |
12 | #include <mach/irqs.h> | 12 | #include <mach/irqs.h> |
13 | 13 | ||
14 | .macro disable_fiq | ||
15 | .endm | ||
16 | |||
17 | .macro get_irqnr_preamble, base, tmp | 14 | .macro get_irqnr_preamble, base, tmp |
18 | .endm | 15 | .endm |
19 | 16 | ||
20 | .macro arch_ret_to_user, tmp1, tmp2 | ||
21 | .endm | ||
22 | |||
23 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 17 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
24 | /* FIXME: should not be using soo many LDRs here */ | 18 | /* FIXME: should not be using soo many LDRs here */ |
25 | ldr \base, =IO_ADDRESS(INTEGRATOR_IC_BASE) | 19 | ldr \base, =IO_ADDRESS(INTEGRATOR_IC_BASE) |
diff --git a/arch/arm/mach-iop13xx/include/mach/entry-macro.S b/arch/arm/mach-iop13xx/include/mach/entry-macro.S index a624a7870c64..1a2d603488d8 100644 --- a/arch/arm/mach-iop13xx/include/mach/entry-macro.S +++ b/arch/arm/mach-iop13xx/include/mach/entry-macro.S | |||
@@ -16,9 +16,6 @@ | |||
16 | * Place - Suite 330, Boston, MA 02111-1307 USA. | 16 | * Place - Suite 330, Boston, MA 02111-1307 USA. |
17 | * | 17 | * |
18 | */ | 18 | */ |
19 | .macro disable_fiq | ||
20 | .endm | ||
21 | |||
22 | .macro get_irqnr_preamble, base, tmp | 19 | .macro get_irqnr_preamble, base, tmp |
23 | mrc p15, 0, \tmp, c15, c1, 0 | 20 | mrc p15, 0, \tmp, c15, c1, 0 |
24 | orr \tmp, \tmp, #(1 << 6) | 21 | orr \tmp, \tmp, #(1 << 6) |
diff --git a/arch/arm/mach-iop32x/include/mach/entry-macro.S b/arch/arm/mach-iop32x/include/mach/entry-macro.S index b02fb56bafcc..ea13ae02d9b1 100644 --- a/arch/arm/mach-iop32x/include/mach/entry-macro.S +++ b/arch/arm/mach-iop32x/include/mach/entry-macro.S | |||
@@ -9,9 +9,6 @@ | |||
9 | */ | 9 | */ |
10 | #include <mach/iop32x.h> | 10 | #include <mach/iop32x.h> |
11 | 11 | ||
12 | .macro disable_fiq | ||
13 | .endm | ||
14 | |||
15 | .macro get_irqnr_preamble, base, tmp | 12 | .macro get_irqnr_preamble, base, tmp |
16 | mrc p15, 0, \tmp, c15, c1, 0 | 13 | mrc p15, 0, \tmp, c15, c1, 0 |
17 | orr \tmp, \tmp, #(1 << 6) | 14 | orr \tmp, \tmp, #(1 << 6) |
diff --git a/arch/arm/mach-iop33x/include/mach/entry-macro.S b/arch/arm/mach-iop33x/include/mach/entry-macro.S index 4e1f7282b354..0a398fe1fba4 100644 --- a/arch/arm/mach-iop33x/include/mach/entry-macro.S +++ b/arch/arm/mach-iop33x/include/mach/entry-macro.S | |||
@@ -9,9 +9,6 @@ | |||
9 | */ | 9 | */ |
10 | #include <mach/iop33x.h> | 10 | #include <mach/iop33x.h> |
11 | 11 | ||
12 | .macro disable_fiq | ||
13 | .endm | ||
14 | |||
15 | .macro get_irqnr_preamble, base, tmp | 12 | .macro get_irqnr_preamble, base, tmp |
16 | mrc p15, 0, \tmp, c15, c1, 0 | 13 | mrc p15, 0, \tmp, c15, c1, 0 |
17 | orr \tmp, \tmp, #(1 << 6) | 14 | orr \tmp, \tmp, #(1 << 6) |
diff --git a/arch/arm/mach-ixp2000/include/mach/entry-macro.S b/arch/arm/mach-ixp2000/include/mach/entry-macro.S index 5850ffc8c751..c4444dff9202 100644 --- a/arch/arm/mach-ixp2000/include/mach/entry-macro.S +++ b/arch/arm/mach-ixp2000/include/mach/entry-macro.S | |||
@@ -9,15 +9,9 @@ | |||
9 | */ | 9 | */ |
10 | #include <mach/irqs.h> | 10 | #include <mach/irqs.h> |
11 | 11 | ||
12 | .macro disable_fiq | ||
13 | .endm | ||
14 | |||
15 | .macro get_irqnr_preamble, base, tmp | 12 | .macro get_irqnr_preamble, base, tmp |
16 | .endm | 13 | .endm |
17 | 14 | ||
18 | .macro arch_ret_to_user, tmp1, tmp2 | ||
19 | .endm | ||
20 | |||
21 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 15 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
22 | 16 | ||
23 | mov \irqnr, #0x0 @clear out irqnr as default | 17 | mov \irqnr, #0x0 @clear out irqnr as default |
diff --git a/arch/arm/mach-ixp23xx/include/mach/entry-macro.S b/arch/arm/mach-ixp23xx/include/mach/entry-macro.S index 3f5338a7bbdd..3fd2cb984e42 100644 --- a/arch/arm/mach-ixp23xx/include/mach/entry-macro.S +++ b/arch/arm/mach-ixp23xx/include/mach/entry-macro.S | |||
@@ -2,15 +2,9 @@ | |||
2 | * arch/arm/mach-ixp23xx/include/mach/entry-macro.S | 2 | * arch/arm/mach-ixp23xx/include/mach/entry-macro.S |
3 | */ | 3 | */ |
4 | 4 | ||
5 | .macro disable_fiq | ||
6 | .endm | ||
7 | |||
8 | .macro get_irqnr_preamble, base, tmp | 5 | .macro get_irqnr_preamble, base, tmp |
9 | .endm | 6 | .endm |
10 | 7 | ||
11 | .macro arch_ret_to_user, tmp1, tmp2 | ||
12 | .endm | ||
13 | |||
14 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 8 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
15 | ldr \irqnr, =(IXP23XX_INTC_VIRT + IXP23XX_INTR_IRQ_ENC_ST_OFFSET) | 9 | ldr \irqnr, =(IXP23XX_INTC_VIRT + IXP23XX_INTR_IRQ_ENC_ST_OFFSET) |
16 | ldr \irqnr, [\irqnr] @ get interrupt number | 10 | ldr \irqnr, [\irqnr] @ get interrupt number |
diff --git a/arch/arm/mach-ixp4xx/include/mach/entry-macro.S b/arch/arm/mach-ixp4xx/include/mach/entry-macro.S index f2e14e94ed15..79adf83e2c3d 100644 --- a/arch/arm/mach-ixp4xx/include/mach/entry-macro.S +++ b/arch/arm/mach-ixp4xx/include/mach/entry-macro.S | |||
@@ -9,15 +9,9 @@ | |||
9 | */ | 9 | */ |
10 | #include <mach/hardware.h> | 10 | #include <mach/hardware.h> |
11 | 11 | ||
12 | .macro disable_fiq | ||
13 | .endm | ||
14 | |||
15 | .macro get_irqnr_preamble, base, tmp | 12 | .macro get_irqnr_preamble, base, tmp |
16 | .endm | 13 | .endm |
17 | 14 | ||
18 | .macro arch_ret_to_user, tmp1, tmp2 | ||
19 | .endm | ||
20 | |||
21 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 15 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
22 | ldr \irqstat, =(IXP4XX_INTC_BASE_VIRT+IXP4XX_ICIP_OFFSET) | 16 | ldr \irqstat, =(IXP4XX_INTC_BASE_VIRT+IXP4XX_ICIP_OFFSET) |
23 | ldr \irqstat, [\irqstat] @ get interrupts | 17 | ldr \irqstat, [\irqstat] @ get interrupts |
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index cc15426787b1..77d4852e19f2 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <plat/cache-feroceon-l2.h> | 27 | #include <plat/cache-feroceon-l2.h> |
28 | #include <plat/mvsdio.h> | 28 | #include <plat/mvsdio.h> |
29 | #include <plat/orion_nand.h> | 29 | #include <plat/orion_nand.h> |
30 | #include <plat/ehci-orion.h> | ||
30 | #include <plat/common.h> | 31 | #include <plat/common.h> |
31 | #include <plat/time.h> | 32 | #include <plat/time.h> |
32 | #include <plat/addr-map.h> | 33 | #include <plat/addr-map.h> |
@@ -73,7 +74,7 @@ unsigned int kirkwood_clk_ctrl = CGC_DUNIT | CGC_RESERVED; | |||
73 | void __init kirkwood_ehci_init(void) | 74 | void __init kirkwood_ehci_init(void) |
74 | { | 75 | { |
75 | kirkwood_clk_ctrl |= CGC_USB0; | 76 | kirkwood_clk_ctrl |= CGC_USB0; |
76 | orion_ehci_init(USB_PHYS_BASE, IRQ_KIRKWOOD_USB); | 77 | orion_ehci_init(USB_PHYS_BASE, IRQ_KIRKWOOD_USB, EHCI_PHY_NA); |
77 | } | 78 | } |
78 | 79 | ||
79 | 80 | ||
diff --git a/arch/arm/mach-kirkwood/include/mach/entry-macro.S b/arch/arm/mach-kirkwood/include/mach/entry-macro.S index 8939d36f893c..82db29f7af8f 100644 --- a/arch/arm/mach-kirkwood/include/mach/entry-macro.S +++ b/arch/arm/mach-kirkwood/include/mach/entry-macro.S | |||
@@ -10,12 +10,6 @@ | |||
10 | 10 | ||
11 | #include <mach/bridge-regs.h> | 11 | #include <mach/bridge-regs.h> |
12 | 12 | ||
13 | .macro disable_fiq | ||
14 | .endm | ||
15 | |||
16 | .macro arch_ret_to_user, tmp1, tmp2 | ||
17 | .endm | ||
18 | |||
19 | .macro get_irqnr_preamble, base, tmp | 13 | .macro get_irqnr_preamble, base, tmp |
20 | ldr \base, =IRQ_VIRT_BASE | 14 | ldr \base, =IRQ_VIRT_BASE |
21 | .endm | 15 | .endm |
diff --git a/arch/arm/mach-kirkwood/mpp.h b/arch/arm/mach-kirkwood/mpp.h index e8fda45c0736..d5a0d1da2e0e 100644 --- a/arch/arm/mach-kirkwood/mpp.h +++ b/arch/arm/mach-kirkwood/mpp.h | |||
@@ -31,314 +31,314 @@ | |||
31 | #define MPP_F6282_MASK MPP( 0, 0x0, 0, 0, 0, 0, 0, 0, 1 ) | 31 | #define MPP_F6282_MASK MPP( 0, 0x0, 0, 0, 0, 0, 0, 0, 1 ) |
32 | 32 | ||
33 | #define MPP0_GPIO MPP( 0, 0x0, 1, 1, 1, 1, 1, 1, 1 ) | 33 | #define MPP0_GPIO MPP( 0, 0x0, 1, 1, 1, 1, 1, 1, 1 ) |
34 | #define MPP0_NF_IO2 MPP( 0, 0x1, 1, 1, 1, 1, 1, 1, 1 ) | 34 | #define MPP0_NF_IO2 MPP( 0, 0x1, 0, 0, 1, 1, 1, 1, 1 ) |
35 | #define MPP0_SPI_SCn MPP( 0, 0x2, 0, 1, 1, 1, 1, 1, 1 ) | 35 | #define MPP0_SPI_SCn MPP( 0, 0x2, 0, 0, 1, 1, 1, 1, 1 ) |
36 | 36 | ||
37 | #define MPP1_GPO MPP( 1, 0x0, 0, 1, 1, 1, 1, 1, 1 ) | 37 | #define MPP1_GPO MPP( 1, 0x0, 0, 1, 1, 1, 1, 1, 1 ) |
38 | #define MPP1_NF_IO3 MPP( 1, 0x1, 1, 1, 1, 1, 1, 1, 1 ) | 38 | #define MPP1_NF_IO3 MPP( 1, 0x1, 0, 0, 1, 1, 1, 1, 1 ) |
39 | #define MPP1_SPI_MOSI MPP( 1, 0x2, 0, 1, 1, 1, 1, 1, 1 ) | 39 | #define MPP1_SPI_MOSI MPP( 1, 0x2, 0, 0, 1, 1, 1, 1, 1 ) |
40 | 40 | ||
41 | #define MPP2_GPO MPP( 2, 0x0, 0, 1, 1, 1, 1, 1, 1 ) | 41 | #define MPP2_GPO MPP( 2, 0x0, 0, 1, 1, 1, 1, 1, 1 ) |
42 | #define MPP2_NF_IO4 MPP( 2, 0x1, 1, 1, 1, 1, 1, 1, 1 ) | 42 | #define MPP2_NF_IO4 MPP( 2, 0x1, 0, 0, 1, 1, 1, 1, 1 ) |
43 | #define MPP2_SPI_SCK MPP( 2, 0x2, 0, 1, 1, 1, 1, 1, 1 ) | 43 | #define MPP2_SPI_SCK MPP( 2, 0x2, 0, 0, 1, 1, 1, 1, 1 ) |
44 | 44 | ||
45 | #define MPP3_GPO MPP( 3, 0x0, 0, 1, 1, 1, 1, 1, 1 ) | 45 | #define MPP3_GPO MPP( 3, 0x0, 0, 1, 1, 1, 1, 1, 1 ) |
46 | #define MPP3_NF_IO5 MPP( 3, 0x1, 1, 1, 1, 1, 1, 1, 1 ) | 46 | #define MPP3_NF_IO5 MPP( 3, 0x1, 0, 0, 1, 1, 1, 1, 1 ) |
47 | #define MPP3_SPI_MISO MPP( 3, 0x2, 1, 0, 1, 1, 1, 1, 1 ) | 47 | #define MPP3_SPI_MISO MPP( 3, 0x2, 0, 0, 1, 1, 1, 1, 1 ) |
48 | 48 | ||
49 | #define MPP4_GPIO MPP( 4, 0x0, 1, 1, 1, 1, 1, 1, 1 ) | 49 | #define MPP4_GPIO MPP( 4, 0x0, 1, 1, 1, 1, 1, 1, 1 ) |
50 | #define MPP4_NF_IO6 MPP( 4, 0x1, 1, 1, 1, 1, 1, 1, 1 ) | 50 | #define MPP4_NF_IO6 MPP( 4, 0x1, 0, 0, 1, 1, 1, 1, 1 ) |
51 | #define MPP4_UART0_RXD MPP( 4, 0x2, 1, 0, 1, 1, 1, 1, 1 ) | 51 | #define MPP4_UART0_RXD MPP( 4, 0x2, 0, 0, 1, 1, 1, 1, 1 ) |
52 | #define MPP4_SATA1_ACTn MPP( 4, 0x5, 0, 1, 0, 0, 1, 1, 1 ) | 52 | #define MPP4_SATA1_ACTn MPP( 4, 0x5, 0, 0, 0, 0, 1, 1, 1 ) |
53 | #define MPP4_LCD_VGA_HSYNC MPP( 4, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | 53 | #define MPP4_LCD_VGA_HSYNC MPP( 4, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
54 | #define MPP4_PTP_CLK MPP( 4, 0xd, 1, 0, 1, 1, 1, 1, 0 ) | 54 | #define MPP4_PTP_CLK MPP( 4, 0xd, 0, 0, 1, 1, 1, 1, 0 ) |
55 | 55 | ||
56 | #define MPP5_GPO MPP( 5, 0x0, 0, 1, 1, 1, 1, 1, 1 ) | 56 | #define MPP5_GPO MPP( 5, 0x0, 0, 1, 1, 1, 1, 1, 1 ) |
57 | #define MPP5_NF_IO7 MPP( 5, 0x1, 1, 1, 1, 1, 1, 1, 1 ) | 57 | #define MPP5_NF_IO7 MPP( 5, 0x1, 0, 0, 1, 1, 1, 1, 1 ) |
58 | #define MPP5_UART0_TXD MPP( 5, 0x2, 0, 1, 1, 1, 1, 1, 1 ) | 58 | #define MPP5_UART0_TXD MPP( 5, 0x2, 0, 0, 1, 1, 1, 1, 1 ) |
59 | #define MPP5_PTP_TRIG_GEN MPP( 5, 0x4, 0, 1, 1, 1, 1, 1, 0 ) | 59 | #define MPP5_PTP_TRIG_GEN MPP( 5, 0x4, 0, 0, 1, 1, 1, 1, 0 ) |
60 | #define MPP5_SATA0_ACTn MPP( 5, 0x5, 0, 1, 0, 1, 1, 1, 1 ) | 60 | #define MPP5_SATA0_ACTn MPP( 5, 0x5, 0, 0, 0, 1, 1, 1, 1 ) |
61 | #define MPP5_LCD_VGA_VSYNC MPP( 5, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | 61 | #define MPP5_LCD_VGA_VSYNC MPP( 5, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
62 | 62 | ||
63 | #define MPP6_SYSRST_OUTn MPP( 6, 0x1, 0, 1, 1, 1, 1, 1, 1 ) | 63 | #define MPP6_SYSRST_OUTn MPP( 6, 0x1, 0, 0, 1, 1, 1, 1, 1 ) |
64 | #define MPP6_SPI_MOSI MPP( 6, 0x2, 0, 1, 1, 1, 1, 1, 1 ) | 64 | #define MPP6_SPI_MOSI MPP( 6, 0x2, 0, 0, 1, 1, 1, 1, 1 ) |
65 | #define MPP6_PTP_TRIG_GEN MPP( 6, 0x3, 0, 1, 1, 1, 1, 1, 0 ) | 65 | #define MPP6_PTP_TRIG_GEN MPP( 6, 0x3, 0, 0, 1, 1, 1, 1, 0 ) |
66 | 66 | ||
67 | #define MPP7_GPO MPP( 7, 0x0, 0, 1, 1, 1, 1, 1, 1 ) | 67 | #define MPP7_GPO MPP( 7, 0x0, 0, 1, 1, 1, 1, 1, 1 ) |
68 | #define MPP7_PEX_RST_OUTn MPP( 7, 0x1, 0, 1, 1, 1, 1, 1, 0 ) | 68 | #define MPP7_PEX_RST_OUTn MPP( 7, 0x1, 0, 0, 1, 1, 1, 1, 0 ) |
69 | #define MPP7_SPI_SCn MPP( 7, 0x2, 0, 1, 1, 1, 1, 1, 1 ) | 69 | #define MPP7_SPI_SCn MPP( 7, 0x2, 0, 0, 1, 1, 1, 1, 1 ) |
70 | #define MPP7_PTP_TRIG_GEN MPP( 7, 0x3, 0, 1, 1, 1, 1, 1, 0 ) | 70 | #define MPP7_PTP_TRIG_GEN MPP( 7, 0x3, 0, 0, 1, 1, 1, 1, 0 ) |
71 | #define MPP7_LCD_PWM MPP( 7, 0xb, 0, 1, 0, 0, 0, 0, 1 ) | 71 | #define MPP7_LCD_PWM MPP( 7, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
72 | 72 | ||
73 | #define MPP8_GPIO MPP( 8, 0x0, 1, 1, 1, 1, 1, 1, 1 ) | 73 | #define MPP8_GPIO MPP( 8, 0x0, 1, 1, 1, 1, 1, 1, 1 ) |
74 | #define MPP8_TW0_SDA MPP( 8, 0x1, 1, 1, 1, 1, 1, 1, 1 ) | 74 | #define MPP8_TW0_SDA MPP( 8, 0x1, 0, 0, 1, 1, 1, 1, 1 ) |
75 | #define MPP8_UART0_RTS MPP( 8, 0x2, 0, 1, 1, 1, 1, 1, 1 ) | 75 | #define MPP8_UART0_RTS MPP( 8, 0x2, 0, 0, 1, 1, 1, 1, 1 ) |
76 | #define MPP8_UART1_RTS MPP( 8, 0x3, 0, 1, 1, 1, 1, 1, 1 ) | 76 | #define MPP8_UART1_RTS MPP( 8, 0x3, 0, 0, 1, 1, 1, 1, 1 ) |
77 | #define MPP8_MII0_RXERR MPP( 8, 0x4, 1, 0, 0, 1, 1, 1, 1 ) | 77 | #define MPP8_MII0_RXERR MPP( 8, 0x4, 0, 0, 0, 1, 1, 1, 1 ) |
78 | #define MPP8_SATA1_PRESENTn MPP( 8, 0x5, 0, 1, 0, 0, 1, 1, 1 ) | 78 | #define MPP8_SATA1_PRESENTn MPP( 8, 0x5, 0, 0, 0, 0, 1, 1, 1 ) |
79 | #define MPP8_PTP_CLK MPP( 8, 0xc, 1, 0, 1, 1, 1, 1, 0 ) | 79 | #define MPP8_PTP_CLK MPP( 8, 0xc, 0, 0, 1, 1, 1, 1, 0 ) |
80 | #define MPP8_MII0_COL MPP( 8, 0xd, 1, 0, 1, 1, 1, 1, 1 ) | 80 | #define MPP8_MII0_COL MPP( 8, 0xd, 0, 0, 1, 1, 1, 1, 1 ) |
81 | 81 | ||
82 | #define MPP9_GPIO MPP( 9, 0x0, 1, 1, 1, 1, 1, 1, 1 ) | 82 | #define MPP9_GPIO MPP( 9, 0x0, 1, 1, 1, 1, 1, 1, 1 ) |
83 | #define MPP9_TW0_SCK MPP( 9, 0x1, 1, 1, 1, 1, 1, 1, 1 ) | 83 | #define MPP9_TW0_SCK MPP( 9, 0x1, 0, 0, 1, 1, 1, 1, 1 ) |
84 | #define MPP9_UART0_CTS MPP( 9, 0x2, 1, 0, 1, 1, 1, 1, 1 ) | 84 | #define MPP9_UART0_CTS MPP( 9, 0x2, 0, 0, 1, 1, 1, 1, 1 ) |
85 | #define MPP9_UART1_CTS MPP( 9, 0x3, 1, 0, 1, 1, 1, 1, 1 ) | 85 | #define MPP9_UART1_CTS MPP( 9, 0x3, 0, 0, 1, 1, 1, 1, 1 ) |
86 | #define MPP9_SATA0_PRESENTn MPP( 9, 0x5, 0, 1, 0, 1, 1, 1, 1 ) | 86 | #define MPP9_SATA0_PRESENTn MPP( 9, 0x5, 0, 0, 0, 1, 1, 1, 1 ) |
87 | #define MPP9_PTP_EVENT_REQ MPP( 9, 0xc, 1, 0, 1, 1, 1, 1, 0 ) | 87 | #define MPP9_PTP_EVENT_REQ MPP( 9, 0xc, 0, 0, 1, 1, 1, 1, 0 ) |
88 | #define MPP9_MII0_CRS MPP( 9, 0xd, 1, 0, 1, 1, 1, 1, 1 ) | 88 | #define MPP9_MII0_CRS MPP( 9, 0xd, 0, 0, 1, 1, 1, 1, 1 ) |
89 | 89 | ||
90 | #define MPP10_GPO MPP( 10, 0x0, 0, 1, 1, 1, 1, 1, 1 ) | 90 | #define MPP10_GPO MPP( 10, 0x0, 0, 1, 1, 1, 1, 1, 1 ) |
91 | #define MPP10_SPI_SCK MPP( 10, 0x2, 0, 1, 1, 1, 1, 1, 1 ) | 91 | #define MPP10_SPI_SCK MPP( 10, 0x2, 0, 0, 1, 1, 1, 1, 1 ) |
92 | #define MPP10_UART0_TXD MPP( 10, 0X3, 0, 1, 1, 1, 1, 1, 1 ) | 92 | #define MPP10_UART0_TXD MPP( 10, 0X3, 0, 0, 1, 1, 1, 1, 1 ) |
93 | #define MPP10_SATA1_ACTn MPP( 10, 0x5, 0, 1, 0, 0, 1, 1, 1 ) | 93 | #define MPP10_SATA1_ACTn MPP( 10, 0x5, 0, 0, 0, 0, 1, 1, 1 ) |
94 | #define MPP10_PTP_TRIG_GEN MPP( 10, 0xc, 0, 1, 1, 1, 1, 1, 0 ) | 94 | #define MPP10_PTP_TRIG_GEN MPP( 10, 0xc, 0, 0, 1, 1, 1, 1, 0 ) |
95 | 95 | ||
96 | #define MPP11_GPIO MPP( 11, 0x0, 1, 1, 1, 1, 1, 1, 1 ) | 96 | #define MPP11_GPIO MPP( 11, 0x0, 1, 1, 1, 1, 1, 1, 1 ) |
97 | #define MPP11_SPI_MISO MPP( 11, 0x2, 1, 0, 1, 1, 1, 1, 1 ) | 97 | #define MPP11_SPI_MISO MPP( 11, 0x2, 0, 0, 1, 1, 1, 1, 1 ) |
98 | #define MPP11_UART0_RXD MPP( 11, 0x3, 1, 0, 1, 1, 1, 1, 1 ) | 98 | #define MPP11_UART0_RXD MPP( 11, 0x3, 0, 0, 1, 1, 1, 1, 1 ) |
99 | #define MPP11_PTP_EVENT_REQ MPP( 11, 0x4, 1, 0, 1, 1, 1, 1, 0 ) | 99 | #define MPP11_PTP_EVENT_REQ MPP( 11, 0x4, 0, 0, 1, 1, 1, 1, 0 ) |
100 | #define MPP11_PTP_TRIG_GEN MPP( 11, 0xc, 0, 1, 1, 1, 1, 1, 0 ) | 100 | #define MPP11_PTP_TRIG_GEN MPP( 11, 0xc, 0, 0, 1, 1, 1, 1, 0 ) |
101 | #define MPP11_PTP_CLK MPP( 11, 0xd, 1, 0, 1, 1, 1, 1, 0 ) | 101 | #define MPP11_PTP_CLK MPP( 11, 0xd, 0, 0, 1, 1, 1, 1, 0 ) |
102 | #define MPP11_SATA0_ACTn MPP( 11, 0x5, 0, 1, 0, 1, 1, 1, 1 ) | 102 | #define MPP11_SATA0_ACTn MPP( 11, 0x5, 0, 0, 0, 1, 1, 1, 1 ) |
103 | 103 | ||
104 | #define MPP12_GPO MPP( 12, 0x0, 0, 1, 1, 1, 1, 1, 1 ) | 104 | #define MPP12_GPO MPP( 12, 0x0, 0, 1, 1, 1, 1, 1, 1 ) |
105 | #define MPP12_GPIO MPP( 12, 0x0, 1, 1, 0, 0, 0, 1, 0 ) | 105 | #define MPP12_GPIO MPP( 12, 0x0, 1, 1, 0, 0, 0, 1, 0 ) |
106 | #define MPP12_SD_CLK MPP( 12, 0x1, 0, 1, 1, 1, 1, 1, 1 ) | 106 | #define MPP12_SD_CLK MPP( 12, 0x1, 0, 0, 1, 1, 1, 1, 1 ) |
107 | #define MPP12_AU_SPDIF0 MPP( 12, 0xa, 0, 1, 0, 0, 0, 0, 1 ) | 107 | #define MPP12_AU_SPDIF0 MPP( 12, 0xa, 0, 0, 0, 0, 0, 0, 1 ) |
108 | #define MPP12_SPI_MOSI MPP( 12, 0xb, 0, 1, 0, 0, 0, 0, 1 ) | 108 | #define MPP12_SPI_MOSI MPP( 12, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
109 | #define MPP12_TW1_SDA MPP( 12, 0xd, 1, 0, 0, 0, 0, 0, 1 ) | 109 | #define MPP12_TW1_SDA MPP( 12, 0xd, 0, 0, 0, 0, 0, 0, 1 ) |
110 | 110 | ||
111 | #define MPP13_GPIO MPP( 13, 0x0, 1, 1, 1, 1, 1, 1, 1 ) | 111 | #define MPP13_GPIO MPP( 13, 0x0, 1, 1, 1, 1, 1, 1, 1 ) |
112 | #define MPP13_SD_CMD MPP( 13, 0x1, 1, 1, 1, 1, 1, 1, 1 ) | 112 | #define MPP13_SD_CMD MPP( 13, 0x1, 0, 0, 1, 1, 1, 1, 1 ) |
113 | #define MPP13_UART1_TXD MPP( 13, 0x3, 0, 1, 1, 1, 1, 1, 1 ) | 113 | #define MPP13_UART1_TXD MPP( 13, 0x3, 0, 0, 1, 1, 1, 1, 1 ) |
114 | #define MPP13_AU_SPDIFRMCLK MPP( 13, 0xa, 0, 1, 0, 0, 0, 0, 1 ) | 114 | #define MPP13_AU_SPDIFRMCLK MPP( 13, 0xa, 0, 0, 0, 0, 0, 0, 1 ) |
115 | #define MPP13_LCDPWM MPP( 13, 0xb, 0, 1, 0, 0, 0, 0, 1 ) | 115 | #define MPP13_LCDPWM MPP( 13, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
116 | 116 | ||
117 | #define MPP14_GPIO MPP( 14, 0x0, 1, 1, 1, 1, 1, 1, 1 ) | 117 | #define MPP14_GPIO MPP( 14, 0x0, 1, 1, 1, 1, 1, 1, 1 ) |
118 | #define MPP14_SD_D0 MPP( 14, 0x1, 1, 1, 1, 1, 1, 1, 1 ) | 118 | #define MPP14_SD_D0 MPP( 14, 0x1, 0, 0, 1, 1, 1, 1, 1 ) |
119 | #define MPP14_UART1_RXD MPP( 14, 0x3, 1, 0, 1, 1, 1, 1, 1 ) | 119 | #define MPP14_UART1_RXD MPP( 14, 0x3, 0, 0, 1, 1, 1, 1, 1 ) |
120 | #define MPP14_SATA1_PRESENTn MPP( 14, 0x4, 0, 1, 0, 0, 1, 1, 1 ) | 120 | #define MPP14_SATA1_PRESENTn MPP( 14, 0x4, 0, 0, 0, 0, 1, 1, 1 ) |
121 | #define MPP14_AU_SPDIFI MPP( 14, 0xa, 1, 0, 0, 0, 0, 0, 1 ) | 121 | #define MPP14_AU_SPDIFI MPP( 14, 0xa, 0, 0, 0, 0, 0, 0, 1 ) |
122 | #define MPP14_AU_I2SDI MPP( 14, 0xb, 1, 0, 0, 0, 0, 0, 1 ) | 122 | #define MPP14_AU_I2SDI MPP( 14, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
123 | #define MPP14_MII0_COL MPP( 14, 0xd, 1, 0, 1, 1, 1, 1, 1 ) | 123 | #define MPP14_MII0_COL MPP( 14, 0xd, 0, 0, 1, 1, 1, 1, 1 ) |
124 | 124 | ||
125 | #define MPP15_GPIO MPP( 15, 0x0, 1, 1, 1, 1, 1, 1, 1 ) | 125 | #define MPP15_GPIO MPP( 15, 0x0, 1, 1, 1, 1, 1, 1, 1 ) |
126 | #define MPP15_SD_D1 MPP( 15, 0x1, 1, 1, 1, 1, 1, 1, 1 ) | 126 | #define MPP15_SD_D1 MPP( 15, 0x1, 0, 0, 1, 1, 1, 1, 1 ) |
127 | #define MPP15_UART0_RTS MPP( 15, 0x2, 0, 1, 1, 1, 1, 1, 1 ) | 127 | #define MPP15_UART0_RTS MPP( 15, 0x2, 0, 0, 1, 1, 1, 1, 1 ) |
128 | #define MPP15_UART1_TXD MPP( 15, 0x3, 0, 1, 1, 1, 1, 1, 1 ) | 128 | #define MPP15_UART1_TXD MPP( 15, 0x3, 0, 0, 1, 1, 1, 1, 1 ) |
129 | #define MPP15_SATA0_ACTn MPP( 15, 0x4, 0, 1, 0, 1, 1, 1, 1 ) | 129 | #define MPP15_SATA0_ACTn MPP( 15, 0x4, 0, 0, 0, 1, 1, 1, 1 ) |
130 | #define MPP15_SPI_CSn MPP( 15, 0xb, 0, 1, 0, 0, 0, 0, 1 ) | 130 | #define MPP15_SPI_CSn MPP( 15, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
131 | 131 | ||
132 | #define MPP16_GPIO MPP( 16, 0x0, 1, 1, 1, 1, 1, 1, 1 ) | 132 | #define MPP16_GPIO MPP( 16, 0x0, 1, 1, 1, 1, 1, 1, 1 ) |
133 | #define MPP16_SD_D2 MPP( 16, 0x1, 1, 1, 1, 1, 1, 1, 1 ) | 133 | #define MPP16_SD_D2 MPP( 16, 0x1, 0, 0, 1, 1, 1, 1, 1 ) |
134 | #define MPP16_UART0_CTS MPP( 16, 0x2, 1, 0, 1, 1, 1, 1, 1 ) | 134 | #define MPP16_UART0_CTS MPP( 16, 0x2, 0, 0, 1, 1, 1, 1, 1 ) |
135 | #define MPP16_UART1_RXD MPP( 16, 0x3, 1, 0, 1, 1, 1, 1, 1 ) | 135 | #define MPP16_UART1_RXD MPP( 16, 0x3, 0, 0, 1, 1, 1, 1, 1 ) |
136 | #define MPP16_SATA1_ACTn MPP( 16, 0x4, 0, 1, 0, 0, 1, 1, 1 ) | 136 | #define MPP16_SATA1_ACTn MPP( 16, 0x4, 0, 0, 0, 0, 1, 1, 1 ) |
137 | #define MPP16_LCD_EXT_REF_CLK MPP( 16, 0xb, 1, 0, 0, 0, 0, 0, 1 ) | 137 | #define MPP16_LCD_EXT_REF_CLK MPP( 16, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
138 | #define MPP16_MII0_CRS MPP( 16, 0xd, 1, 0, 1, 1, 1, 1, 1 ) | 138 | #define MPP16_MII0_CRS MPP( 16, 0xd, 0, 0, 1, 1, 1, 1, 1 ) |
139 | 139 | ||
140 | #define MPP17_GPIO MPP( 17, 0x0, 1, 1, 1, 1, 1, 1, 1 ) | 140 | #define MPP17_GPIO MPP( 17, 0x0, 1, 1, 1, 1, 1, 1, 1 ) |
141 | #define MPP17_SD_D3 MPP( 17, 0x1, 1, 1, 1, 1, 1, 1, 1 ) | 141 | #define MPP17_SD_D3 MPP( 17, 0x1, 0, 0, 1, 1, 1, 1, 1 ) |
142 | #define MPP17_SATA0_PRESENTn MPP( 17, 0x4, 0, 1, 0, 1, 1, 1, 1 ) | 142 | #define MPP17_SATA0_PRESENTn MPP( 17, 0x4, 0, 0, 0, 1, 1, 1, 1 ) |
143 | #define MPP17_SATA1_ACTn MPP( 17, 0xa, 0, 1, 0, 0, 0, 0, 1 ) | 143 | #define MPP17_SATA1_ACTn MPP( 17, 0xa, 0, 0, 0, 0, 0, 0, 1 ) |
144 | #define MPP17_TW1_SCK MPP( 17, 0xd, 1, 1, 0, 0, 0, 0, 1 ) | 144 | #define MPP17_TW1_SCK MPP( 17, 0xd, 0, 0, 0, 0, 0, 0, 1 ) |
145 | 145 | ||
146 | #define MPP18_GPO MPP( 18, 0x0, 0, 1, 1, 1, 1, 1, 1 ) | 146 | #define MPP18_GPO MPP( 18, 0x0, 0, 1, 1, 1, 1, 1, 1 ) |
147 | #define MPP18_NF_IO0 MPP( 18, 0x1, 1, 1, 1, 1, 1, 1, 1 ) | 147 | #define MPP18_NF_IO0 MPP( 18, 0x1, 0, 0, 1, 1, 1, 1, 1 ) |
148 | #define MPP18_PEX0_CLKREQ MPP( 18, 0x2, 0, 1, 0, 0, 0, 0, 1 ) | 148 | #define MPP18_PEX0_CLKREQ MPP( 18, 0x2, 0, 0, 0, 0, 0, 0, 1 ) |
149 | 149 | ||
150 | #define MPP19_GPO MPP( 19, 0x0, 0, 1, 1, 1, 1, 1, 1 ) | 150 | #define MPP19_GPO MPP( 19, 0x0, 0, 1, 1, 1, 1, 1, 1 ) |
151 | #define MPP19_NF_IO1 MPP( 19, 0x1, 1, 1, 1, 1, 1, 1, 1 ) | 151 | #define MPP19_NF_IO1 MPP( 19, 0x1, 0, 0, 1, 1, 1, 1, 1 ) |
152 | 152 | ||
153 | #define MPP20_GPIO MPP( 20, 0x0, 1, 1, 0, 1, 1, 1, 1 ) | 153 | #define MPP20_GPIO MPP( 20, 0x0, 1, 1, 0, 1, 1, 1, 1 ) |
154 | #define MPP20_TSMP0 MPP( 20, 0x1, 1, 1, 0, 0, 1, 1, 1 ) | 154 | #define MPP20_TSMP0 MPP( 20, 0x1, 0, 0, 0, 0, 1, 1, 1 ) |
155 | #define MPP20_TDM_CH0_TX_QL MPP( 20, 0x2, 0, 1, 0, 0, 1, 1, 1 ) | 155 | #define MPP20_TDM_CH0_TX_QL MPP( 20, 0x2, 0, 0, 0, 0, 1, 1, 1 ) |
156 | #define MPP20_GE1_TXD0 MPP( 20, 0x3, 0, 0, 0, 1, 1, 1, 1 ) | 156 | #define MPP20_GE1_TXD0 MPP( 20, 0x3, 0, 0, 0, 1, 1, 1, 1 ) |
157 | #define MPP20_AU_SPDIFI MPP( 20, 0x4, 1, 0, 0, 0, 1, 1, 1 ) | 157 | #define MPP20_AU_SPDIFI MPP( 20, 0x4, 0, 0, 0, 0, 1, 1, 1 ) |
158 | #define MPP20_SATA1_ACTn MPP( 20, 0x5, 0, 1, 0, 0, 1, 1, 1 ) | 158 | #define MPP20_SATA1_ACTn MPP( 20, 0x5, 0, 0, 0, 0, 1, 1, 1 ) |
159 | #define MPP20_LCD_D0 MPP( 20, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | 159 | #define MPP20_LCD_D0 MPP( 20, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
160 | 160 | ||
161 | #define MPP21_GPIO MPP( 21, 0x0, 1, 1, 0, 1, 1, 1, 1 ) | 161 | #define MPP21_GPIO MPP( 21, 0x0, 1, 1, 0, 1, 1, 1, 1 ) |
162 | #define MPP21_TSMP1 MPP( 21, 0x1, 1, 1, 0, 0, 1, 1, 1 ) | 162 | #define MPP21_TSMP1 MPP( 21, 0x1, 0, 0, 0, 0, 1, 1, 1 ) |
163 | #define MPP21_TDM_CH0_RX_QL MPP( 21, 0x2, 0, 1, 0, 0, 1, 1, 1 ) | 163 | #define MPP21_TDM_CH0_RX_QL MPP( 21, 0x2, 0, 0, 0, 0, 1, 1, 1 ) |
164 | #define MPP21_GE1_TXD1 MPP( 21, 0x3, 0, 0, 0, 1, 1, 1, 1 ) | 164 | #define MPP21_GE1_TXD1 MPP( 21, 0x3, 0, 0, 0, 1, 1, 1, 1 ) |
165 | #define MPP21_AU_SPDIFO MPP( 21, 0x4, 0, 1, 0, 0, 1, 1, 1 ) | 165 | #define MPP21_AU_SPDIFO MPP( 21, 0x4, 0, 0, 0, 0, 1, 1, 1 ) |
166 | #define MPP21_SATA0_ACTn MPP( 21, 0x5, 0, 1, 0, 1, 1, 1, 1 ) | 166 | #define MPP21_SATA0_ACTn MPP( 21, 0x5, 0, 0, 0, 1, 1, 1, 1 ) |
167 | #define MPP21_LCD_D1 MPP( 21, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | 167 | #define MPP21_LCD_D1 MPP( 21, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
168 | 168 | ||
169 | #define MPP22_GPIO MPP( 22, 0x0, 1, 1, 0, 1, 1, 1, 1 ) | 169 | #define MPP22_GPIO MPP( 22, 0x0, 1, 1, 0, 1, 1, 1, 1 ) |
170 | #define MPP22_TSMP2 MPP( 22, 0x1, 1, 1, 0, 0, 1, 1, 1 ) | 170 | #define MPP22_TSMP2 MPP( 22, 0x1, 0, 0, 0, 0, 1, 1, 1 ) |
171 | #define MPP22_TDM_CH2_TX_QL MPP( 22, 0x2, 0, 1, 0, 0, 1, 1, 1 ) | 171 | #define MPP22_TDM_CH2_TX_QL MPP( 22, 0x2, 0, 0, 0, 0, 1, 1, 1 ) |
172 | #define MPP22_GE1_TXD2 MPP( 22, 0x3, 0, 0, 0, 1, 1, 1, 1 ) | 172 | #define MPP22_GE1_TXD2 MPP( 22, 0x3, 0, 0, 0, 1, 1, 1, 1 ) |
173 | #define MPP22_AU_SPDIFRMKCLK MPP( 22, 0x4, 0, 1, 0, 0, 1, 1, 1 ) | 173 | #define MPP22_AU_SPDIFRMKCLK MPP( 22, 0x4, 0, 0, 0, 0, 1, 1, 1 ) |
174 | #define MPP22_SATA1_PRESENTn MPP( 22, 0x5, 0, 1, 0, 0, 1, 1, 1 ) | 174 | #define MPP22_SATA1_PRESENTn MPP( 22, 0x5, 0, 0, 0, 0, 1, 1, 1 ) |
175 | #define MPP22_LCD_D2 MPP( 22, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | 175 | #define MPP22_LCD_D2 MPP( 22, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
176 | 176 | ||
177 | #define MPP23_GPIO MPP( 23, 0x0, 1, 1, 0, 1, 1, 1, 1 ) | 177 | #define MPP23_GPIO MPP( 23, 0x0, 1, 1, 0, 1, 1, 1, 1 ) |
178 | #define MPP23_TSMP3 MPP( 23, 0x1, 1, 1, 0, 0, 1, 1, 1 ) | 178 | #define MPP23_TSMP3 MPP( 23, 0x1, 0, 0, 0, 0, 1, 1, 1 ) |
179 | #define MPP23_TDM_CH2_RX_QL MPP( 23, 0x2, 1, 0, 0, 0, 1, 1, 1 ) | 179 | #define MPP23_TDM_CH2_RX_QL MPP( 23, 0x2, 0, 0, 0, 0, 1, 1, 1 ) |
180 | #define MPP23_GE1_TXD3 MPP( 23, 0x3, 0, 0, 0, 1, 1, 1, 1 ) | 180 | #define MPP23_GE1_TXD3 MPP( 23, 0x3, 0, 0, 0, 1, 1, 1, 1 ) |
181 | #define MPP23_AU_I2SBCLK MPP( 23, 0x4, 0, 1, 0, 0, 1, 1, 1 ) | 181 | #define MPP23_AU_I2SBCLK MPP( 23, 0x4, 0, 0, 0, 0, 1, 1, 1 ) |
182 | #define MPP23_SATA0_PRESENTn MPP( 23, 0x5, 0, 1, 0, 1, 1, 1, 1 ) | 182 | #define MPP23_SATA0_PRESENTn MPP( 23, 0x5, 0, 0, 0, 1, 1, 1, 1 ) |
183 | #define MPP23_LCD_D3 MPP( 23, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | 183 | #define MPP23_LCD_D3 MPP( 23, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
184 | 184 | ||
185 | #define MPP24_GPIO MPP( 24, 0x0, 1, 1, 0, 1, 1, 1, 1 ) | 185 | #define MPP24_GPIO MPP( 24, 0x0, 1, 1, 0, 1, 1, 1, 1 ) |
186 | #define MPP24_TSMP4 MPP( 24, 0x1, 1, 1, 0, 0, 1, 1, 1 ) | 186 | #define MPP24_TSMP4 MPP( 24, 0x1, 0, 0, 0, 0, 1, 1, 1 ) |
187 | #define MPP24_TDM_SPI_CS0 MPP( 24, 0x2, 0, 1, 0, 0, 1, 1, 1 ) | 187 | #define MPP24_TDM_SPI_CS0 MPP( 24, 0x2, 0, 0, 0, 0, 1, 1, 1 ) |
188 | #define MPP24_GE1_RXD0 MPP( 24, 0x3, 0, 0, 0, 1, 1, 1, 1 ) | 188 | #define MPP24_GE1_RXD0 MPP( 24, 0x3, 0, 0, 0, 1, 1, 1, 1 ) |
189 | #define MPP24_AU_I2SDO MPP( 24, 0x4, 0, 1, 0, 0, 1, 1, 1 ) | 189 | #define MPP24_AU_I2SDO MPP( 24, 0x4, 0, 0, 0, 0, 1, 1, 1 ) |
190 | #define MPP24_LCD_D4 MPP( 24, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | 190 | #define MPP24_LCD_D4 MPP( 24, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
191 | 191 | ||
192 | #define MPP25_GPIO MPP( 25, 0x0, 1, 1, 0, 1, 1, 1, 1 ) | 192 | #define MPP25_GPIO MPP( 25, 0x0, 1, 1, 0, 1, 1, 1, 1 ) |
193 | #define MPP25_TSMP5 MPP( 25, 0x1, 1, 1, 0, 0, 1, 1, 1 ) | 193 | #define MPP25_TSMP5 MPP( 25, 0x1, 0, 0, 0, 0, 1, 1, 1 ) |
194 | #define MPP25_TDM_SPI_SCK MPP( 25, 0x2, 0, 1, 0, 0, 1, 1, 1 ) | 194 | #define MPP25_TDM_SPI_SCK MPP( 25, 0x2, 0, 0, 0, 0, 1, 1, 1 ) |
195 | #define MPP25_GE1_RXD1 MPP( 25, 0x3, 0, 0, 0, 1, 1, 1, 1 ) | 195 | #define MPP25_GE1_RXD1 MPP( 25, 0x3, 0, 0, 0, 1, 1, 1, 1 ) |
196 | #define MPP25_AU_I2SLRCLK MPP( 25, 0x4, 0, 1, 0, 0, 1, 1, 1 ) | 196 | #define MPP25_AU_I2SLRCLK MPP( 25, 0x4, 0, 0, 0, 0, 1, 1, 1 ) |
197 | #define MPP25_LCD_D5 MPP( 25, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | 197 | #define MPP25_LCD_D5 MPP( 25, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
198 | 198 | ||
199 | #define MPP26_GPIO MPP( 26, 0x0, 1, 1, 0, 1, 1, 1, 1 ) | 199 | #define MPP26_GPIO MPP( 26, 0x0, 1, 1, 0, 1, 1, 1, 1 ) |
200 | #define MPP26_TSMP6 MPP( 26, 0x1, 1, 1, 0, 0, 1, 1, 1 ) | 200 | #define MPP26_TSMP6 MPP( 26, 0x1, 0, 0, 0, 0, 1, 1, 1 ) |
201 | #define MPP26_TDM_SPI_MISO MPP( 26, 0x2, 1, 0, 0, 0, 1, 1, 1 ) | 201 | #define MPP26_TDM_SPI_MISO MPP( 26, 0x2, 0, 0, 0, 0, 1, 1, 1 ) |
202 | #define MPP26_GE1_RXD2 MPP( 26, 0x3, 0, 0, 0, 1, 1, 1, 1 ) | 202 | #define MPP26_GE1_RXD2 MPP( 26, 0x3, 0, 0, 0, 1, 1, 1, 1 ) |
203 | #define MPP26_AU_I2SMCLK MPP( 26, 0x4, 0, 1, 0, 0, 1, 1, 1 ) | 203 | #define MPP26_AU_I2SMCLK MPP( 26, 0x4, 0, 0, 0, 0, 1, 1, 1 ) |
204 | #define MPP26_LCD_D6 MPP( 26, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | 204 | #define MPP26_LCD_D6 MPP( 26, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
205 | 205 | ||
206 | #define MPP27_GPIO MPP( 27, 0x0, 1, 1, 0, 1, 1, 1, 1 ) | 206 | #define MPP27_GPIO MPP( 27, 0x0, 1, 1, 0, 1, 1, 1, 1 ) |
207 | #define MPP27_TSMP7 MPP( 27, 0x1, 1, 1, 0, 0, 1, 1, 1 ) | 207 | #define MPP27_TSMP7 MPP( 27, 0x1, 0, 0, 0, 0, 1, 1, 1 ) |
208 | #define MPP27_TDM_SPI_MOSI MPP( 27, 0x2, 0, 1, 0, 0, 1, 1, 1 ) | 208 | #define MPP27_TDM_SPI_MOSI MPP( 27, 0x2, 0, 0, 0, 0, 1, 1, 1 ) |
209 | #define MPP27_GE1_RXD3 MPP( 27, 0x3, 0, 0, 0, 1, 1, 1, 1 ) | 209 | #define MPP27_GE1_RXD3 MPP( 27, 0x3, 0, 0, 0, 1, 1, 1, 1 ) |
210 | #define MPP27_AU_I2SDI MPP( 27, 0x4, 1, 0, 0, 0, 1, 1, 1 ) | 210 | #define MPP27_AU_I2SDI MPP( 27, 0x4, 0, 0, 0, 0, 1, 1, 1 ) |
211 | #define MPP27_LCD_D7 MPP( 27, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | 211 | #define MPP27_LCD_D7 MPP( 27, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
212 | 212 | ||
213 | #define MPP28_GPIO MPP( 28, 0x0, 1, 1, 0, 1, 1, 1, 1 ) | 213 | #define MPP28_GPIO MPP( 28, 0x0, 1, 1, 0, 1, 1, 1, 1 ) |
214 | #define MPP28_TSMP8 MPP( 28, 0x1, 1, 1, 0, 0, 1, 1, 1 ) | 214 | #define MPP28_TSMP8 MPP( 28, 0x1, 0, 0, 0, 0, 1, 1, 1 ) |
215 | #define MPP28_TDM_CODEC_INTn MPP( 28, 0x2, 0, 0, 0, 0, 1, 1, 1 ) | 215 | #define MPP28_TDM_CODEC_INTn MPP( 28, 0x2, 0, 0, 0, 0, 1, 1, 1 ) |
216 | #define MPP28_GE1_COL MPP( 28, 0x3, 0, 0, 0, 1, 1, 1, 1 ) | 216 | #define MPP28_GE1_COL MPP( 28, 0x3, 0, 0, 0, 1, 1, 1, 1 ) |
217 | #define MPP28_AU_EXTCLK MPP( 28, 0x4, 1, 0, 0, 0, 1, 1, 1 ) | 217 | #define MPP28_AU_EXTCLK MPP( 28, 0x4, 0, 0, 0, 0, 1, 1, 1 ) |
218 | #define MPP28_LCD_D8 MPP( 28, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | 218 | #define MPP28_LCD_D8 MPP( 28, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
219 | 219 | ||
220 | #define MPP29_GPIO MPP( 29, 0x0, 1, 1, 0, 1, 1, 1, 1 ) | 220 | #define MPP29_GPIO MPP( 29, 0x0, 1, 1, 0, 1, 1, 1, 1 ) |
221 | #define MPP29_TSMP9 MPP( 29, 0x1, 1, 1, 0, 0, 1, 1, 1 ) | 221 | #define MPP29_TSMP9 MPP( 29, 0x1, 0, 0, 0, 0, 1, 1, 1 ) |
222 | #define MPP29_TDM_CODEC_RSTn MPP( 29, 0x2, 0, 0, 0, 0, 1, 1, 1 ) | 222 | #define MPP29_TDM_CODEC_RSTn MPP( 29, 0x2, 0, 0, 0, 0, 1, 1, 1 ) |
223 | #define MPP29_GE1_TCLK MPP( 29, 0x3, 0, 0, 0, 1, 1, 1, 1 ) | 223 | #define MPP29_GE1_TCLK MPP( 29, 0x3, 0, 0, 0, 1, 1, 1, 1 ) |
224 | #define MPP29_LCD_D9 MPP( 29, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | 224 | #define MPP29_LCD_D9 MPP( 29, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
225 | 225 | ||
226 | #define MPP30_GPIO MPP( 30, 0x0, 1, 1, 0, 1, 1, 1, 1 ) | 226 | #define MPP30_GPIO MPP( 30, 0x0, 1, 1, 0, 1, 1, 1, 1 ) |
227 | #define MPP30_TSMP10 MPP( 30, 0x1, 1, 1, 0, 0, 1, 1, 1 ) | 227 | #define MPP30_TSMP10 MPP( 30, 0x1, 0, 0, 0, 0, 1, 1, 1 ) |
228 | #define MPP30_TDM_PCLK MPP( 30, 0x2, 1, 1, 0, 0, 1, 1, 1 ) | 228 | #define MPP30_TDM_PCLK MPP( 30, 0x2, 0, 0, 0, 0, 1, 1, 1 ) |
229 | #define MPP30_GE1_RXCTL MPP( 30, 0x3, 0, 0, 0, 1, 1, 1, 1 ) | 229 | #define MPP30_GE1_RXCTL MPP( 30, 0x3, 0, 0, 0, 1, 1, 1, 1 ) |
230 | #define MPP30_LCD_D10 MPP( 30, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | 230 | #define MPP30_LCD_D10 MPP( 30, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
231 | 231 | ||
232 | #define MPP31_GPIO MPP( 31, 0x0, 1, 1, 0, 1, 1, 1, 1 ) | 232 | #define MPP31_GPIO MPP( 31, 0x0, 1, 1, 0, 1, 1, 1, 1 ) |
233 | #define MPP31_TSMP11 MPP( 31, 0x1, 1, 1, 0, 0, 1, 1, 1 ) | 233 | #define MPP31_TSMP11 MPP( 31, 0x1, 0, 0, 0, 0, 1, 1, 1 ) |
234 | #define MPP31_TDM_FS MPP( 31, 0x2, 1, 1, 0, 0, 1, 1, 1 ) | 234 | #define MPP31_TDM_FS MPP( 31, 0x2, 0, 0, 0, 0, 1, 1, 1 ) |
235 | #define MPP31_GE1_RXCLK MPP( 31, 0x3, 0, 0, 0, 1, 1, 1, 1 ) | 235 | #define MPP31_GE1_RXCLK MPP( 31, 0x3, 0, 0, 0, 1, 1, 1, 1 ) |
236 | #define MPP31_LCD_D11 MPP( 31, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | 236 | #define MPP31_LCD_D11 MPP( 31, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
237 | 237 | ||
238 | #define MPP32_GPIO MPP( 32, 0x0, 1, 1, 0, 1, 1, 1, 1 ) | 238 | #define MPP32_GPIO MPP( 32, 0x0, 1, 1, 0, 1, 1, 1, 1 ) |
239 | #define MPP32_TSMP12 MPP( 32, 0x1, 1, 1, 0, 0, 1, 1, 1 ) | 239 | #define MPP32_TSMP12 MPP( 32, 0x1, 0, 0, 0, 0, 1, 1, 1 ) |
240 | #define MPP32_TDM_DRX MPP( 32, 0x2, 1, 0, 0, 0, 1, 1, 1 ) | 240 | #define MPP32_TDM_DRX MPP( 32, 0x2, 0, 0, 0, 0, 1, 1, 1 ) |
241 | #define MPP32_GE1_TCLKOUT MPP( 32, 0x3, 0, 0, 0, 1, 1, 1, 1 ) | 241 | #define MPP32_GE1_TCLKOUT MPP( 32, 0x3, 0, 0, 0, 1, 1, 1, 1 ) |
242 | #define MPP32_LCD_D12 MPP( 32, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | 242 | #define MPP32_LCD_D12 MPP( 32, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
243 | 243 | ||
244 | #define MPP33_GPO MPP( 33, 0x0, 0, 1, 0, 1, 1, 1, 1 ) | 244 | #define MPP33_GPO MPP( 33, 0x0, 0, 1, 0, 1, 1, 1, 1 ) |
245 | #define MPP33_TDM_DTX MPP( 33, 0x2, 0, 1, 0, 0, 1, 1, 1 ) | 245 | #define MPP33_TDM_DTX MPP( 33, 0x2, 0, 0, 0, 0, 1, 1, 1 ) |
246 | #define MPP33_GE1_TXCTL MPP( 33, 0x3, 0, 0, 0, 1, 1, 1, 1 ) | 246 | #define MPP33_GE1_TXCTL MPP( 33, 0x3, 0, 0, 0, 1, 1, 1, 1 ) |
247 | #define MPP33_LCD_D13 MPP( 33, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | 247 | #define MPP33_LCD_D13 MPP( 33, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
248 | 248 | ||
249 | #define MPP34_GPIO MPP( 34, 0x0, 1, 1, 0, 1, 1, 1, 1 ) | 249 | #define MPP34_GPIO MPP( 34, 0x0, 1, 1, 0, 1, 1, 1, 1 ) |
250 | #define MPP34_TDM_SPI_CS1 MPP( 34, 0x2, 0, 1, 0, 0, 1, 1, 1 ) | 250 | #define MPP34_TDM_SPI_CS1 MPP( 34, 0x2, 0, 0, 0, 0, 1, 1, 1 ) |
251 | #define MPP34_GE1_TXEN MPP( 34, 0x3, 0, 0, 0, 1, 1, 1, 1 ) | 251 | #define MPP34_GE1_TXEN MPP( 34, 0x3, 0, 0, 0, 1, 1, 1, 1 ) |
252 | #define MPP34_SATA1_ACTn MPP( 34, 0x5, 0, 1, 0, 0, 0, 1, 1 ) | 252 | #define MPP34_SATA1_ACTn MPP( 34, 0x5, 0, 0, 0, 0, 0, 1, 1 ) |
253 | #define MPP34_LCD_D14 MPP( 34, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | 253 | #define MPP34_LCD_D14 MPP( 34, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
254 | 254 | ||
255 | #define MPP35_GPIO MPP( 35, 0x0, 1, 1, 1, 1, 1, 1, 1 ) | 255 | #define MPP35_GPIO MPP( 35, 0x0, 1, 1, 1, 1, 1, 1, 1 ) |
256 | #define MPP35_TDM_CH0_TX_QL MPP( 35, 0x2, 0, 1, 0, 0, 1, 1, 1 ) | 256 | #define MPP35_TDM_CH0_TX_QL MPP( 35, 0x2, 0, 0, 0, 0, 1, 1, 1 ) |
257 | #define MPP35_GE1_RXERR MPP( 35, 0x3, 0, 0, 0, 1, 1, 1, 1 ) | 257 | #define MPP35_GE1_RXERR MPP( 35, 0x3, 0, 0, 0, 1, 1, 1, 1 ) |
258 | #define MPP35_SATA0_ACTn MPP( 35, 0x5, 0, 1, 0, 1, 1, 1, 1 ) | 258 | #define MPP35_SATA0_ACTn MPP( 35, 0x5, 0, 0, 0, 1, 1, 1, 1 ) |
259 | #define MPP35_LCD_D15 MPP( 22, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | 259 | #define MPP35_LCD_D15 MPP( 22, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
260 | #define MPP35_MII0_RXERR MPP( 35, 0xc, 1, 0, 1, 1, 1, 1, 1 ) | 260 | #define MPP35_MII0_RXERR MPP( 35, 0xc, 0, 0, 1, 1, 1, 1, 1 ) |
261 | 261 | ||
262 | #define MPP36_GPIO MPP( 36, 0x0, 1, 1, 1, 0, 0, 1, 1 ) | 262 | #define MPP36_GPIO MPP( 36, 0x0, 1, 1, 1, 0, 0, 1, 1 ) |
263 | #define MPP36_TSMP0 MPP( 36, 0x1, 1, 1, 0, 0, 0, 1, 1 ) | 263 | #define MPP36_TSMP0 MPP( 36, 0x1, 0, 0, 0, 0, 0, 1, 1 ) |
264 | #define MPP36_TDM_SPI_CS1 MPP( 36, 0x2, 0, 1, 0, 0, 0, 1, 1 ) | 264 | #define MPP36_TDM_SPI_CS1 MPP( 36, 0x2, 0, 0, 0, 0, 0, 1, 1 ) |
265 | #define MPP36_AU_SPDIFI MPP( 36, 0x4, 1, 0, 1, 0, 0, 1, 1 ) | 265 | #define MPP36_AU_SPDIFI MPP( 36, 0x4, 0, 0, 1, 0, 0, 1, 1 ) |
266 | #define MPP36_TW1_SDA MPP( 36, 0xb, 1, 1, 0, 0, 0, 0, 1 ) | 266 | #define MPP36_TW1_SDA MPP( 36, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
267 | 267 | ||
268 | #define MPP37_GPIO MPP( 37, 0x0, 1, 1, 1, 0, 0, 1, 1 ) | 268 | #define MPP37_GPIO MPP( 37, 0x0, 1, 1, 1, 0, 0, 1, 1 ) |
269 | #define MPP37_TSMP1 MPP( 37, 0x1, 1, 1, 0, 0, 0, 1, 1 ) | 269 | #define MPP37_TSMP1 MPP( 37, 0x1, 0, 0, 0, 0, 0, 1, 1 ) |
270 | #define MPP37_TDM_CH2_TX_QL MPP( 37, 0x2, 0, 1, 0, 0, 0, 1, 1 ) | 270 | #define MPP37_TDM_CH2_TX_QL MPP( 37, 0x2, 0, 0, 0, 0, 0, 1, 1 ) |
271 | #define MPP37_AU_SPDIFO MPP( 37, 0x4, 0, 1, 1, 0, 0, 1, 1 ) | 271 | #define MPP37_AU_SPDIFO MPP( 37, 0x4, 0, 0, 1, 0, 0, 1, 1 ) |
272 | #define MPP37_TW1_SCK MPP( 37, 0xb, 1, 1, 0, 0, 0, 0, 1 ) | 272 | #define MPP37_TW1_SCK MPP( 37, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
273 | 273 | ||
274 | #define MPP38_GPIO MPP( 38, 0x0, 1, 1, 1, 0, 0, 1, 1 ) | 274 | #define MPP38_GPIO MPP( 38, 0x0, 1, 1, 1, 0, 0, 1, 1 ) |
275 | #define MPP38_TSMP2 MPP( 38, 0x1, 1, 1, 0, 0, 0, 1, 1 ) | 275 | #define MPP38_TSMP2 MPP( 38, 0x1, 0, 0, 0, 0, 0, 1, 1 ) |
276 | #define MPP38_TDM_CH2_RX_QL MPP( 38, 0x2, 0, 1, 0, 0, 0, 1, 1 ) | 276 | #define MPP38_TDM_CH2_RX_QL MPP( 38, 0x2, 0, 0, 0, 0, 0, 1, 1 ) |
277 | #define MPP38_AU_SPDIFRMLCLK MPP( 38, 0x4, 0, 1, 1, 0, 0, 1, 1 ) | 277 | #define MPP38_AU_SPDIFRMLCLK MPP( 38, 0x4, 0, 0, 1, 0, 0, 1, 1 ) |
278 | #define MPP38_LCD_D18 MPP( 38, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | 278 | #define MPP38_LCD_D18 MPP( 38, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
279 | 279 | ||
280 | #define MPP39_GPIO MPP( 39, 0x0, 1, 1, 1, 0, 0, 1, 1 ) | 280 | #define MPP39_GPIO MPP( 39, 0x0, 1, 1, 1, 0, 0, 1, 1 ) |
281 | #define MPP39_TSMP3 MPP( 39, 0x1, 1, 1, 0, 0, 0, 1, 1 ) | 281 | #define MPP39_TSMP3 MPP( 39, 0x1, 0, 0, 0, 0, 0, 1, 1 ) |
282 | #define MPP39_TDM_SPI_CS0 MPP( 39, 0x2, 0, 1, 0, 0, 0, 1, 1 ) | 282 | #define MPP39_TDM_SPI_CS0 MPP( 39, 0x2, 0, 0, 0, 0, 0, 1, 1 ) |
283 | #define MPP39_AU_I2SBCLK MPP( 39, 0x4, 0, 1, 1, 0, 0, 1, 1 ) | 283 | #define MPP39_AU_I2SBCLK MPP( 39, 0x4, 0, 0, 1, 0, 0, 1, 1 ) |
284 | #define MPP39_LCD_D19 MPP( 39, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | 284 | #define MPP39_LCD_D19 MPP( 39, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
285 | 285 | ||
286 | #define MPP40_GPIO MPP( 40, 0x0, 1, 1, 1, 0, 0, 1, 1 ) | 286 | #define MPP40_GPIO MPP( 40, 0x0, 1, 1, 1, 0, 0, 1, 1 ) |
287 | #define MPP40_TSMP4 MPP( 40, 0x1, 1, 1, 0, 0, 0, 1, 1 ) | 287 | #define MPP40_TSMP4 MPP( 40, 0x1, 0, 0, 0, 0, 0, 1, 1 ) |
288 | #define MPP40_TDM_SPI_SCK MPP( 40, 0x2, 0, 1, 0, 0, 0, 1, 1 ) | 288 | #define MPP40_TDM_SPI_SCK MPP( 40, 0x2, 0, 0, 0, 0, 0, 1, 1 ) |
289 | #define MPP40_AU_I2SDO MPP( 40, 0x4, 0, 1, 1, 0, 0, 1, 1 ) | 289 | #define MPP40_AU_I2SDO MPP( 40, 0x4, 0, 0, 1, 0, 0, 1, 1 ) |
290 | #define MPP40_LCD_D20 MPP( 40, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | 290 | #define MPP40_LCD_D20 MPP( 40, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
291 | 291 | ||
292 | #define MPP41_GPIO MPP( 41, 0x0, 1, 1, 1, 0, 0, 1, 1 ) | 292 | #define MPP41_GPIO MPP( 41, 0x0, 1, 1, 1, 0, 0, 1, 1 ) |
293 | #define MPP41_TSMP5 MPP( 41, 0x1, 1, 1, 0, 0, 0, 1, 1 ) | 293 | #define MPP41_TSMP5 MPP( 41, 0x1, 0, 0, 0, 0, 0, 1, 1 ) |
294 | #define MPP41_TDM_SPI_MISO MPP( 41, 0x2, 1, 0, 0, 0, 0, 1, 1 ) | 294 | #define MPP41_TDM_SPI_MISO MPP( 41, 0x2, 0, 0, 0, 0, 0, 1, 1 ) |
295 | #define MPP41_AU_I2SLRCLK MPP( 41, 0x4, 0, 1, 1, 0, 0, 1, 1 ) | 295 | #define MPP41_AU_I2SLRCLK MPP( 41, 0x4, 0, 0, 1, 0, 0, 1, 1 ) |
296 | #define MPP41_LCD_D21 MPP( 41, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | 296 | #define MPP41_LCD_D21 MPP( 41, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
297 | 297 | ||
298 | #define MPP42_GPIO MPP( 42, 0x0, 1, 1, 1, 0, 0, 1, 1 ) | 298 | #define MPP42_GPIO MPP( 42, 0x0, 1, 1, 1, 0, 0, 1, 1 ) |
299 | #define MPP42_TSMP6 MPP( 42, 0x1, 1, 1, 0, 0, 0, 1, 1 ) | 299 | #define MPP42_TSMP6 MPP( 42, 0x1, 0, 0, 0, 0, 0, 1, 1 ) |
300 | #define MPP42_TDM_SPI_MOSI MPP( 42, 0x2, 0, 1, 0, 0, 0, 1, 1 ) | 300 | #define MPP42_TDM_SPI_MOSI MPP( 42, 0x2, 0, 0, 0, 0, 0, 1, 1 ) |
301 | #define MPP42_AU_I2SMCLK MPP( 42, 0x4, 0, 1, 1, 0, 0, 1, 1 ) | 301 | #define MPP42_AU_I2SMCLK MPP( 42, 0x4, 0, 0, 1, 0, 0, 1, 1 ) |
302 | #define MPP42_LCD_D22 MPP( 42, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | 302 | #define MPP42_LCD_D22 MPP( 42, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
303 | 303 | ||
304 | #define MPP43_GPIO MPP( 43, 0x0, 1, 1, 1, 0, 0, 1, 1 ) | 304 | #define MPP43_GPIO MPP( 43, 0x0, 1, 1, 1, 0, 0, 1, 1 ) |
305 | #define MPP43_TSMP7 MPP( 43, 0x1, 1, 1, 0, 0, 0, 1, 1 ) | 305 | #define MPP43_TSMP7 MPP( 43, 0x1, 0, 0, 0, 0, 0, 1, 1 ) |
306 | #define MPP43_TDM_CODEC_INTn MPP( 43, 0x2, 0, 0, 0, 0, 0, 1, 1 ) | 306 | #define MPP43_TDM_CODEC_INTn MPP( 43, 0x2, 0, 0, 0, 0, 0, 1, 1 ) |
307 | #define MPP43_AU_I2SDI MPP( 43, 0x4, 1, 0, 1, 0, 0, 1, 1 ) | 307 | #define MPP43_AU_I2SDI MPP( 43, 0x4, 0, 0, 1, 0, 0, 1, 1 ) |
308 | #define MPP43_LCD_D23 MPP( 22, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | 308 | #define MPP43_LCD_D23 MPP( 22, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
309 | 309 | ||
310 | #define MPP44_GPIO MPP( 44, 0x0, 1, 1, 1, 0, 0, 1, 1 ) | 310 | #define MPP44_GPIO MPP( 44, 0x0, 1, 1, 1, 0, 0, 1, 1 ) |
311 | #define MPP44_TSMP8 MPP( 44, 0x1, 1, 1, 0, 0, 0, 1, 1 ) | 311 | #define MPP44_TSMP8 MPP( 44, 0x1, 0, 0, 0, 0, 0, 1, 1 ) |
312 | #define MPP44_TDM_CODEC_RSTn MPP( 44, 0x2, 0, 0, 0, 0, 0, 1, 1 ) | 312 | #define MPP44_TDM_CODEC_RSTn MPP( 44, 0x2, 0, 0, 0, 0, 0, 1, 1 ) |
313 | #define MPP44_AU_EXTCLK MPP( 44, 0x4, 1, 0, 1, 0, 0, 1, 1 ) | 313 | #define MPP44_AU_EXTCLK MPP( 44, 0x4, 0, 0, 1, 0, 0, 1, 1 ) |
314 | #define MPP44_LCD_CLK MPP( 44, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | 314 | #define MPP44_LCD_CLK MPP( 44, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
315 | 315 | ||
316 | #define MPP45_GPIO MPP( 45, 0x0, 1, 1, 0, 0, 0, 1, 1 ) | 316 | #define MPP45_GPIO MPP( 45, 0x0, 1, 1, 0, 0, 0, 1, 1 ) |
317 | #define MPP45_TSMP9 MPP( 45, 0x1, 1, 1, 0, 0, 0, 1, 1 ) | 317 | #define MPP45_TSMP9 MPP( 45, 0x1, 0, 0, 0, 0, 0, 1, 1 ) |
318 | #define MPP45_TDM_PCLK MPP( 45, 0x2, 1, 1, 0, 0, 0, 1, 1 ) | 318 | #define MPP45_TDM_PCLK MPP( 45, 0x2, 0, 0, 0, 0, 0, 1, 1 ) |
319 | #define MPP245_LCD_E MPP( 45, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | 319 | #define MPP245_LCD_E MPP( 45, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
320 | 320 | ||
321 | #define MPP46_GPIO MPP( 46, 0x0, 1, 1, 0, 0, 0, 1, 1 ) | 321 | #define MPP46_GPIO MPP( 46, 0x0, 1, 1, 0, 0, 0, 1, 1 ) |
322 | #define MPP46_TSMP10 MPP( 46, 0x1, 1, 1, 0, 0, 0, 1, 1 ) | 322 | #define MPP46_TSMP10 MPP( 46, 0x1, 0, 0, 0, 0, 0, 1, 1 ) |
323 | #define MPP46_TDM_FS MPP( 46, 0x2, 1, 1, 0, 0, 0, 1, 1 ) | 323 | #define MPP46_TDM_FS MPP( 46, 0x2, 0, 0, 0, 0, 0, 1, 1 ) |
324 | #define MPP46_LCD_HSYNC MPP( 46, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | 324 | #define MPP46_LCD_HSYNC MPP( 46, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
325 | 325 | ||
326 | #define MPP47_GPIO MPP( 47, 0x0, 1, 1, 0, 0, 0, 1, 1 ) | 326 | #define MPP47_GPIO MPP( 47, 0x0, 1, 1, 0, 0, 0, 1, 1 ) |
327 | #define MPP47_TSMP11 MPP( 47, 0x1, 1, 1, 0, 0, 0, 1, 1 ) | 327 | #define MPP47_TSMP11 MPP( 47, 0x1, 0, 0, 0, 0, 0, 1, 1 ) |
328 | #define MPP47_TDM_DRX MPP( 47, 0x2, 1, 0, 0, 0, 0, 1, 1 ) | 328 | #define MPP47_TDM_DRX MPP( 47, 0x2, 0, 0, 0, 0, 0, 1, 1 ) |
329 | #define MPP47_LCD_VSYNC MPP( 47, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | 329 | #define MPP47_LCD_VSYNC MPP( 47, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
330 | 330 | ||
331 | #define MPP48_GPIO MPP( 48, 0x0, 1, 1, 0, 0, 0, 1, 1 ) | 331 | #define MPP48_GPIO MPP( 48, 0x0, 1, 1, 0, 0, 0, 1, 1 ) |
332 | #define MPP48_TSMP12 MPP( 48, 0x1, 1, 1, 0, 0, 0, 1, 1 ) | 332 | #define MPP48_TSMP12 MPP( 48, 0x1, 0, 0, 0, 0, 0, 1, 1 ) |
333 | #define MPP48_TDM_DTX MPP( 48, 0x2, 0, 1, 0, 0, 0, 1, 1 ) | 333 | #define MPP48_TDM_DTX MPP( 48, 0x2, 0, 0, 0, 0, 0, 1, 1 ) |
334 | #define MPP48_LCD_D16 MPP( 22, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | 334 | #define MPP48_LCD_D16 MPP( 22, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
335 | 335 | ||
336 | #define MPP49_GPIO MPP( 49, 0x0, 1, 1, 0, 0, 0, 1, 0 ) | 336 | #define MPP49_GPIO MPP( 49, 0x0, 1, 1, 0, 0, 0, 1, 0 ) |
337 | #define MPP49_GPO MPP( 49, 0x0, 0, 1, 0, 0, 0, 0, 1 ) | 337 | #define MPP49_GPO MPP( 49, 0x0, 0, 1, 0, 0, 0, 0, 1 ) |
338 | #define MPP49_TSMP9 MPP( 49, 0x1, 1, 1, 0, 0, 0, 1, 0 ) | 338 | #define MPP49_TSMP9 MPP( 49, 0x1, 0, 0, 0, 0, 0, 1, 0 ) |
339 | #define MPP49_TDM_CH0_RX_QL MPP( 49, 0x2, 0, 1, 0, 0, 0, 1, 1 ) | 339 | #define MPP49_TDM_CH0_RX_QL MPP( 49, 0x2, 0, 0, 0, 0, 0, 1, 1 ) |
340 | #define MPP49_PTP_CLK MPP( 49, 0x5, 1, 0, 0, 0, 0, 1, 0 ) | 340 | #define MPP49_PTP_CLK MPP( 49, 0x5, 0, 0, 0, 0, 0, 1, 0 ) |
341 | #define MPP49_PEX0_CLKREQ MPP( 49, 0xa, 0, 1, 0, 0, 0, 0, 1 ) | 341 | #define MPP49_PEX0_CLKREQ MPP( 49, 0xa, 0, 0, 0, 0, 0, 0, 1 ) |
342 | #define MPP49_LCD_D17 MPP( 49, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | 342 | #define MPP49_LCD_D17 MPP( 49, 0xb, 0, 0, 0, 0, 0, 0, 1 ) |
343 | 343 | ||
344 | #define MPP_MAX 49 | 344 | #define MPP_MAX 49 |
diff --git a/arch/arm/mach-ks8695/include/mach/entry-macro.S b/arch/arm/mach-ks8695/include/mach/entry-macro.S index b4fe0c11c6ce..8315b34f32ff 100644 --- a/arch/arm/mach-ks8695/include/mach/entry-macro.S +++ b/arch/arm/mach-ks8695/include/mach/entry-macro.S | |||
@@ -14,16 +14,10 @@ | |||
14 | #include <mach/hardware.h> | 14 | #include <mach/hardware.h> |
15 | #include <mach/regs-irq.h> | 15 | #include <mach/regs-irq.h> |
16 | 16 | ||
17 | .macro disable_fiq | ||
18 | .endm | ||
19 | |||
20 | .macro get_irqnr_preamble, base, tmp | 17 | .macro get_irqnr_preamble, base, tmp |
21 | ldr \base, =KS8695_IRQ_VA @ Base address of interrupt controller | 18 | ldr \base, =KS8695_IRQ_VA @ Base address of interrupt controller |
22 | .endm | 19 | .endm |
23 | 20 | ||
24 | .macro arch_ret_to_user, tmp1, tmp2 | ||
25 | .endm | ||
26 | |||
27 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 21 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
28 | ldr \irqstat, [\base, #KS8695_INTMS] @ Mask Status register | 22 | ldr \irqstat, [\base, #KS8695_INTMS] @ Mask Status register |
29 | 23 | ||
diff --git a/arch/arm/mach-lpc32xx/include/mach/entry-macro.S b/arch/arm/mach-lpc32xx/include/mach/entry-macro.S index b725f6c93975..24ca11b377c8 100644 --- a/arch/arm/mach-lpc32xx/include/mach/entry-macro.S +++ b/arch/arm/mach-lpc32xx/include/mach/entry-macro.S | |||
@@ -21,16 +21,10 @@ | |||
21 | 21 | ||
22 | #define LPC32XX_INTC_MASKED_STATUS_OFS 0x8 | 22 | #define LPC32XX_INTC_MASKED_STATUS_OFS 0x8 |
23 | 23 | ||
24 | .macro disable_fiq | ||
25 | .endm | ||
26 | |||
27 | .macro get_irqnr_preamble, base, tmp | 24 | .macro get_irqnr_preamble, base, tmp |
28 | ldr \base, =IO_ADDRESS(LPC32XX_MIC_BASE) | 25 | ldr \base, =IO_ADDRESS(LPC32XX_MIC_BASE) |
29 | .endm | 26 | .endm |
30 | 27 | ||
31 | .macro arch_ret_to_user, tmp1, tmp2 | ||
32 | .endm | ||
33 | |||
34 | /* | 28 | /* |
35 | * Return IRQ number in irqnr. Also return processor Z flag status in CPSR | 29 | * Return IRQ number in irqnr. Also return processor Z flag status in CPSR |
36 | * as set if an interrupt is pending. | 30 | * as set if an interrupt is pending. |
diff --git a/arch/arm/mach-mmp/include/mach/entry-macro.S b/arch/arm/mach-mmp/include/mach/entry-macro.S index c42d9d4e892d..9cff9e7a2b26 100644 --- a/arch/arm/mach-mmp/include/mach/entry-macro.S +++ b/arch/arm/mach-mmp/include/mach/entry-macro.S | |||
@@ -8,12 +8,6 @@ | |||
8 | 8 | ||
9 | #include <mach/regs-icu.h> | 9 | #include <mach/regs-icu.h> |
10 | 10 | ||
11 | .macro disable_fiq | ||
12 | .endm | ||
13 | |||
14 | .macro arch_ret_to_user, tmp1, tmp2 | ||
15 | .endm | ||
16 | |||
17 | .macro get_irqnr_preamble, base, tmp | 11 | .macro get_irqnr_preamble, base, tmp |
18 | mrc p15, 0, \tmp, c0, c0, 0 @ CPUID | 12 | mrc p15, 0, \tmp, c0, c0, 0 @ CPUID |
19 | and \tmp, \tmp, #0xff00 | 13 | and \tmp, \tmp, #0xff00 |
diff --git a/arch/arm/mach-msm/include/mach/entry-macro.S b/arch/arm/mach-msm/include/mach/entry-macro.S index 41f7003ef34f..f2ae9087f654 100644 --- a/arch/arm/mach-msm/include/mach/entry-macro.S +++ b/arch/arm/mach-msm/include/mach/entry-macro.S | |||
@@ -16,12 +16,6 @@ | |||
16 | * | 16 | * |
17 | */ | 17 | */ |
18 | 18 | ||
19 | .macro disable_fiq | ||
20 | .endm | ||
21 | |||
22 | .macro arch_ret_to_user, tmp1, tmp2 | ||
23 | .endm | ||
24 | |||
25 | #if !defined(CONFIG_ARM_GIC) | 19 | #if !defined(CONFIG_ARM_GIC) |
26 | #include <mach/msm_iomap.h> | 20 | #include <mach/msm_iomap.h> |
27 | 21 | ||
diff --git a/arch/arm/mach-mv78xx0/common.c b/arch/arm/mach-mv78xx0/common.c index 0cdd41004ad0..a5dcf766a3f9 100644 --- a/arch/arm/mach-mv78xx0/common.c +++ b/arch/arm/mach-mv78xx0/common.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <mach/mv78xx0.h> | 19 | #include <mach/mv78xx0.h> |
20 | #include <mach/bridge-regs.h> | 20 | #include <mach/bridge-regs.h> |
21 | #include <plat/cache-feroceon-l2.h> | 21 | #include <plat/cache-feroceon-l2.h> |
22 | #include <plat/ehci-orion.h> | ||
22 | #include <plat/orion_nand.h> | 23 | #include <plat/orion_nand.h> |
23 | #include <plat/time.h> | 24 | #include <plat/time.h> |
24 | #include <plat/common.h> | 25 | #include <plat/common.h> |
@@ -169,7 +170,7 @@ void __init mv78xx0_map_io(void) | |||
169 | ****************************************************************************/ | 170 | ****************************************************************************/ |
170 | void __init mv78xx0_ehci0_init(void) | 171 | void __init mv78xx0_ehci0_init(void) |
171 | { | 172 | { |
172 | orion_ehci_init(USB0_PHYS_BASE, IRQ_MV78XX0_USB_0); | 173 | orion_ehci_init(USB0_PHYS_BASE, IRQ_MV78XX0_USB_0, EHCI_PHY_NA); |
173 | } | 174 | } |
174 | 175 | ||
175 | 176 | ||
diff --git a/arch/arm/mach-mv78xx0/include/mach/entry-macro.S b/arch/arm/mach-mv78xx0/include/mach/entry-macro.S index 66ae2d29e773..6b1f088e0597 100644 --- a/arch/arm/mach-mv78xx0/include/mach/entry-macro.S +++ b/arch/arm/mach-mv78xx0/include/mach/entry-macro.S | |||
@@ -10,12 +10,6 @@ | |||
10 | 10 | ||
11 | #include <mach/bridge-regs.h> | 11 | #include <mach/bridge-regs.h> |
12 | 12 | ||
13 | .macro disable_fiq | ||
14 | .endm | ||
15 | |||
16 | .macro arch_ret_to_user, tmp1, tmp2 | ||
17 | .endm | ||
18 | |||
19 | .macro get_irqnr_preamble, base, tmp | 13 | .macro get_irqnr_preamble, base, tmp |
20 | ldr \base, =IRQ_VIRT_BASE | 14 | ldr \base, =IRQ_VIRT_BASE |
21 | .endm | 15 | .endm |
diff --git a/arch/arm/mach-mv78xx0/mpp.h b/arch/arm/mach-mv78xx0/mpp.h index b61b50927123..3752302ae2ee 100644 --- a/arch/arm/mach-mv78xx0/mpp.h +++ b/arch/arm/mach-mv78xx0/mpp.h | |||
@@ -24,296 +24,296 @@ | |||
24 | #define MPP_78100_A0_MASK MPP(0, 0x0, 0, 0, 1) | 24 | #define MPP_78100_A0_MASK MPP(0, 0x0, 0, 0, 1) |
25 | 25 | ||
26 | #define MPP0_GPIO MPP(0, 0x0, 1, 1, 1) | 26 | #define MPP0_GPIO MPP(0, 0x0, 1, 1, 1) |
27 | #define MPP0_GE0_COL MPP(0, 0x1, 1, 0, 1) | 27 | #define MPP0_GE0_COL MPP(0, 0x1, 0, 0, 1) |
28 | #define MPP0_GE1_TXCLK MPP(0, 0x2, 0, 1, 1) | 28 | #define MPP0_GE1_TXCLK MPP(0, 0x2, 0, 0, 1) |
29 | #define MPP0_UNUSED MPP(0, 0x3, 0, 0, 1) | 29 | #define MPP0_UNUSED MPP(0, 0x3, 0, 0, 1) |
30 | 30 | ||
31 | #define MPP1_GPIO MPP(1, 0x0, 1, 1, 1) | 31 | #define MPP1_GPIO MPP(1, 0x0, 1, 1, 1) |
32 | #define MPP1_GE0_RXERR MPP(1, 0x1, 1, 0, 1) | 32 | #define MPP1_GE0_RXERR MPP(1, 0x1, 0, 0, 1) |
33 | #define MPP1_GE1_TXCTL MPP(1, 0x2, 0, 1, 1) | 33 | #define MPP1_GE1_TXCTL MPP(1, 0x2, 0, 0, 1) |
34 | #define MPP1_UNUSED MPP(1, 0x3, 0, 0, 1) | 34 | #define MPP1_UNUSED MPP(1, 0x3, 0, 0, 1) |
35 | 35 | ||
36 | #define MPP2_GPIO MPP(2, 0x0, 1, 1, 1) | 36 | #define MPP2_GPIO MPP(2, 0x0, 1, 1, 1) |
37 | #define MPP2_GE0_CRS MPP(2, 0x1, 1, 0, 1) | 37 | #define MPP2_GE0_CRS MPP(2, 0x1, 0, 0, 1) |
38 | #define MPP2_GE1_RXCTL MPP(2, 0x2, 1, 0, 1) | 38 | #define MPP2_GE1_RXCTL MPP(2, 0x2, 0, 0, 1) |
39 | #define MPP2_UNUSED MPP(2, 0x3, 0, 0, 1) | 39 | #define MPP2_UNUSED MPP(2, 0x3, 0, 0, 1) |
40 | 40 | ||
41 | #define MPP3_GPIO MPP(3, 0x0, 1, 1, 1) | 41 | #define MPP3_GPIO MPP(3, 0x0, 1, 1, 1) |
42 | #define MPP3_GE0_TXERR MPP(3, 0x1, 0, 1, 1) | 42 | #define MPP3_GE0_TXERR MPP(3, 0x1, 0, 0, 1) |
43 | #define MPP3_GE1_RXCLK MPP(3, 0x2, 1, 0, 1) | 43 | #define MPP3_GE1_RXCLK MPP(3, 0x2, 0, 0, 1) |
44 | #define MPP3_UNUSED MPP(3, 0x3, 0, 0, 1) | 44 | #define MPP3_UNUSED MPP(3, 0x3, 0, 0, 1) |
45 | 45 | ||
46 | #define MPP4_GPIO MPP(4, 0x0, 1, 1, 1) | 46 | #define MPP4_GPIO MPP(4, 0x0, 1, 1, 1) |
47 | #define MPP4_GE0_TXD4 MPP(4, 0x1, 0, 1, 1) | 47 | #define MPP4_GE0_TXD4 MPP(4, 0x1, 0, 0, 1) |
48 | #define MPP4_GE1_TXD0 MPP(4, 0x2, 0, 1, 1) | 48 | #define MPP4_GE1_TXD0 MPP(4, 0x2, 0, 0, 1) |
49 | #define MPP4_UNUSED MPP(4, 0x3, 0, 0, 1) | 49 | #define MPP4_UNUSED MPP(4, 0x3, 0, 0, 1) |
50 | 50 | ||
51 | #define MPP5_GPIO MPP(5, 0x0, 1, 1, 1) | 51 | #define MPP5_GPIO MPP(5, 0x0, 1, 1, 1) |
52 | #define MPP5_GE0_TXD5 MPP(5, 0x1, 0, 1, 1) | 52 | #define MPP5_GE0_TXD5 MPP(5, 0x1, 0, 0, 1) |
53 | #define MPP5_GE1_TXD1 MPP(5, 0x2, 0, 1, 1) | 53 | #define MPP5_GE1_TXD1 MPP(5, 0x2, 0, 0, 1) |
54 | #define MPP5_UNUSED MPP(5, 0x3, 0, 0, 1) | 54 | #define MPP5_UNUSED MPP(5, 0x3, 0, 0, 1) |
55 | 55 | ||
56 | #define MPP6_GPIO MPP(6, 0x0, 1, 1, 1) | 56 | #define MPP6_GPIO MPP(6, 0x0, 1, 1, 1) |
57 | #define MPP6_GE0_TXD6 MPP(6, 0x1, 0, 1, 1) | 57 | #define MPP6_GE0_TXD6 MPP(6, 0x1, 0, 0, 1) |
58 | #define MPP6_GE1_TXD2 MPP(6, 0x2, 0, 1, 1) | 58 | #define MPP6_GE1_TXD2 MPP(6, 0x2, 0, 0, 1) |
59 | #define MPP6_UNUSED MPP(6, 0x3, 0, 0, 1) | 59 | #define MPP6_UNUSED MPP(6, 0x3, 0, 0, 1) |
60 | 60 | ||
61 | #define MPP7_GPIO MPP(7, 0x0, 1, 1, 1) | 61 | #define MPP7_GPIO MPP(7, 0x0, 1, 1, 1) |
62 | #define MPP7_GE0_TXD7 MPP(7, 0x1, 0, 1, 1) | 62 | #define MPP7_GE0_TXD7 MPP(7, 0x1, 0, 0, 1) |
63 | #define MPP7_GE1_TXD3 MPP(7, 0x2, 0, 1, 1) | 63 | #define MPP7_GE1_TXD3 MPP(7, 0x2, 0, 0, 1) |
64 | #define MPP7_UNUSED MPP(7, 0x3, 0, 0, 1) | 64 | #define MPP7_UNUSED MPP(7, 0x3, 0, 0, 1) |
65 | 65 | ||
66 | #define MPP8_GPIO MPP(8, 0x0, 1, 1, 1) | 66 | #define MPP8_GPIO MPP(8, 0x0, 1, 1, 1) |
67 | #define MPP8_GE0_RXD4 MPP(8, 0x1, 1, 0, 1) | 67 | #define MPP8_GE0_RXD4 MPP(8, 0x1, 0, 0, 1) |
68 | #define MPP8_GE1_RXD0 MPP(8, 0x2, 1, 0, 1) | 68 | #define MPP8_GE1_RXD0 MPP(8, 0x2, 0, 0, 1) |
69 | #define MPP8_UNUSED MPP(8, 0x3, 0, 0, 1) | 69 | #define MPP8_UNUSED MPP(8, 0x3, 0, 0, 1) |
70 | 70 | ||
71 | #define MPP9_GPIO MPP(9, 0x0, 1, 1, 1) | 71 | #define MPP9_GPIO MPP(9, 0x0, 1, 1, 1) |
72 | #define MPP9_GE0_RXD5 MPP(9, 0x1, 1, 0, 1) | 72 | #define MPP9_GE0_RXD5 MPP(9, 0x1, 0, 0, 1) |
73 | #define MPP9_GE1_RXD1 MPP(9, 0x2, 1, 0, 1) | 73 | #define MPP9_GE1_RXD1 MPP(9, 0x2, 0, 0, 1) |
74 | #define MPP9_UNUSED MPP(9, 0x3, 0, 0, 1) | 74 | #define MPP9_UNUSED MPP(9, 0x3, 0, 0, 1) |
75 | 75 | ||
76 | #define MPP10_GPIO MPP(10, 0x0, 1, 1, 1) | 76 | #define MPP10_GPIO MPP(10, 0x0, 1, 1, 1) |
77 | #define MPP10_GE0_RXD6 MPP(10, 0x1, 1, 0, 1) | 77 | #define MPP10_GE0_RXD6 MPP(10, 0x1, 0, 0, 1) |
78 | #define MPP10_GE1_RXD2 MPP(10, 0x2, 1, 0, 1) | 78 | #define MPP10_GE1_RXD2 MPP(10, 0x2, 0, 0, 1) |
79 | #define MPP10_UNUSED MPP(10, 0x3, 0, 0, 1) | 79 | #define MPP10_UNUSED MPP(10, 0x3, 0, 0, 1) |
80 | 80 | ||
81 | #define MPP11_GPIO MPP(11, 0x0, 1, 1, 1) | 81 | #define MPP11_GPIO MPP(11, 0x0, 1, 1, 1) |
82 | #define MPP11_GE0_RXD7 MPP(11, 0x1, 1, 0, 1) | 82 | #define MPP11_GE0_RXD7 MPP(11, 0x1, 0, 0, 1) |
83 | #define MPP11_GE1_RXD3 MPP(11, 0x2, 1, 0, 1) | 83 | #define MPP11_GE1_RXD3 MPP(11, 0x2, 0, 0, 1) |
84 | #define MPP11_UNUSED MPP(11, 0x3, 0, 0, 1) | 84 | #define MPP11_UNUSED MPP(11, 0x3, 0, 0, 1) |
85 | 85 | ||
86 | #define MPP12_GPIO MPP(12, 0x0, 1, 1, 1) | 86 | #define MPP12_GPIO MPP(12, 0x0, 1, 1, 1) |
87 | #define MPP12_M_BB MPP(12, 0x3, 1, 0, 1) | 87 | #define MPP12_M_BB MPP(12, 0x3, 0, 0, 1) |
88 | #define MPP12_UA0_CTSn MPP(12, 0x4, 1, 0, 1) | 88 | #define MPP12_UA0_CTSn MPP(12, 0x4, 0, 0, 1) |
89 | #define MPP12_NAND_FLASH_REn0 MPP(12, 0x5, 0, 1, 1) | 89 | #define MPP12_NAND_FLASH_REn0 MPP(12, 0x5, 0, 0, 1) |
90 | #define MPP12_TDM0_SCSn MPP(12, 0X6, 0, 1, 1) | 90 | #define MPP12_TDM0_SCSn MPP(12, 0X6, 0, 0, 1) |
91 | #define MPP12_UNUSED MPP(12, 0x1, 0, 0, 1) | 91 | #define MPP12_UNUSED MPP(12, 0x1, 0, 0, 1) |
92 | 92 | ||
93 | #define MPP13_GPIO MPP(13, 0x0, 1, 1, 1) | 93 | #define MPP13_GPIO MPP(13, 0x0, 1, 1, 1) |
94 | #define MPP13_SYSRST_OUTn MPP(13, 0x3, 0, 1, 1) | 94 | #define MPP13_SYSRST_OUTn MPP(13, 0x3, 0, 0, 1) |
95 | #define MPP13_UA0_RTSn MPP(13, 0x4, 0, 1, 1) | 95 | #define MPP13_UA0_RTSn MPP(13, 0x4, 0, 0, 1) |
96 | #define MPP13_NAN_FLASH_WEn0 MPP(13, 0x5, 0, 1, 1) | 96 | #define MPP13_NAN_FLASH_WEn0 MPP(13, 0x5, 0, 0, 1) |
97 | #define MPP13_TDM_SCLK MPP(13, 0x6, 0, 1, 1) | 97 | #define MPP13_TDM_SCLK MPP(13, 0x6, 0, 0, 1) |
98 | #define MPP13_UNUSED MPP(13, 0x1, 0, 0, 1) | 98 | #define MPP13_UNUSED MPP(13, 0x1, 0, 0, 1) |
99 | 99 | ||
100 | #define MPP14_GPIO MPP(14, 0x0, 1, 1, 1) | 100 | #define MPP14_GPIO MPP(14, 0x0, 1, 1, 1) |
101 | #define MPP14_SATA1_ACTn MPP(14, 0x3, 0, 1, 1) | 101 | #define MPP14_SATA1_ACTn MPP(14, 0x3, 0, 0, 1) |
102 | #define MPP14_UA1_CTSn MPP(14, 0x4, 1, 0, 1) | 102 | #define MPP14_UA1_CTSn MPP(14, 0x4, 0, 0, 1) |
103 | #define MPP14_NAND_FLASH_REn1 MPP(14, 0x5, 0, 1, 1) | 103 | #define MPP14_NAND_FLASH_REn1 MPP(14, 0x5, 0, 0, 1) |
104 | #define MPP14_TDM_SMOSI MPP(14, 0x6, 0, 1, 1) | 104 | #define MPP14_TDM_SMOSI MPP(14, 0x6, 0, 0, 1) |
105 | #define MPP14_UNUSED MPP(14, 0x1, 0, 0, 1) | 105 | #define MPP14_UNUSED MPP(14, 0x1, 0, 0, 1) |
106 | 106 | ||
107 | #define MPP15_GPIO MPP(15, 0x0, 1, 1, 1) | 107 | #define MPP15_GPIO MPP(15, 0x0, 1, 1, 1) |
108 | #define MPP15_SATA0_ACTn MPP(15, 0x3, 0, 1, 1) | 108 | #define MPP15_SATA0_ACTn MPP(15, 0x3, 0, 0, 1) |
109 | #define MPP15_UA1_RTSn MPP(15, 0x4, 0, 1, 1) | 109 | #define MPP15_UA1_RTSn MPP(15, 0x4, 0, 0, 1) |
110 | #define MPP15_NAND_FLASH_WEn1 MPP(15, 0x5, 0, 1, 1) | 110 | #define MPP15_NAND_FLASH_WEn1 MPP(15, 0x5, 0, 0, 1) |
111 | #define MPP15_TDM_SMISO MPP(15, 0x6, 1, 0, 1) | 111 | #define MPP15_TDM_SMISO MPP(15, 0x6, 0, 0, 1) |
112 | #define MPP15_UNUSED MPP(15, 0x1, 0, 0, 1) | 112 | #define MPP15_UNUSED MPP(15, 0x1, 0, 0, 1) |
113 | 113 | ||
114 | #define MPP16_GPIO MPP(16, 0x0, 1, 1, 1) | 114 | #define MPP16_GPIO MPP(16, 0x0, 1, 1, 1) |
115 | #define MPP16_SATA1_PRESENTn MPP(16, 0x3, 0, 1, 1) | 115 | #define MPP16_SATA1_PRESENTn MPP(16, 0x3, 0, 0, 1) |
116 | #define MPP16_UA2_TXD MPP(16, 0x4, 0, 1, 1) | 116 | #define MPP16_UA2_TXD MPP(16, 0x4, 0, 0, 1) |
117 | #define MPP16_NAND_FLASH_REn3 MPP(16, 0x5, 0, 1, 1) | 117 | #define MPP16_NAND_FLASH_REn3 MPP(16, 0x5, 0, 0, 1) |
118 | #define MPP16_TDM_INTn MPP(16, 0x6, 1, 0, 1) | 118 | #define MPP16_TDM_INTn MPP(16, 0x6, 0, 0, 1) |
119 | #define MPP16_UNUSED MPP(16, 0x1, 0, 0, 1) | 119 | #define MPP16_UNUSED MPP(16, 0x1, 0, 0, 1) |
120 | 120 | ||
121 | 121 | ||
122 | #define MPP17_GPIO MPP(17, 0x0, 1, 1, 1) | 122 | #define MPP17_GPIO MPP(17, 0x0, 1, 1, 1) |
123 | #define MPP17_SATA0_PRESENTn MPP(17, 0x3, 0, 1, 1) | 123 | #define MPP17_SATA0_PRESENTn MPP(17, 0x3, 0, 0, 1) |
124 | #define MPP17_UA2_RXD MPP(17, 0x4, 1, 0, 1) | 124 | #define MPP17_UA2_RXD MPP(17, 0x4, 0, 0, 1) |
125 | #define MPP17_NAND_FLASH_WEn3 MPP(17, 0x5, 0, 1, 1) | 125 | #define MPP17_NAND_FLASH_WEn3 MPP(17, 0x5, 0, 0, 1) |
126 | #define MPP17_TDM_RSTn MPP(17, 0x6, 0, 1, 1) | 126 | #define MPP17_TDM_RSTn MPP(17, 0x6, 0, 0, 1) |
127 | #define MPP17_UNUSED MPP(17, 0x1, 0, 0, 1) | 127 | #define MPP17_UNUSED MPP(17, 0x1, 0, 0, 1) |
128 | 128 | ||
129 | 129 | ||
130 | #define MPP18_GPIO MPP(18, 0x0, 1, 1, 1) | 130 | #define MPP18_GPIO MPP(18, 0x0, 1, 1, 1) |
131 | #define MPP18_UA0_CTSn MPP(18, 0x4, 1, 0, 1) | 131 | #define MPP18_UA0_CTSn MPP(18, 0x4, 0, 0, 1) |
132 | #define MPP18_BOOT_FLASH_REn MPP(18, 0x5, 0, 1, 1) | 132 | #define MPP18_BOOT_FLASH_REn MPP(18, 0x5, 0, 0, 1) |
133 | #define MPP18_UNUSED MPP(18, 0x1, 0, 0, 1) | 133 | #define MPP18_UNUSED MPP(18, 0x1, 0, 0, 1) |
134 | 134 | ||
135 | 135 | ||
136 | 136 | ||
137 | #define MPP19_GPIO MPP(19, 0x0, 1, 1, 1) | 137 | #define MPP19_GPIO MPP(19, 0x0, 1, 1, 1) |
138 | #define MPP19_UA0_CTSn MPP(19, 0x4, 0, 1, 1) | 138 | #define MPP19_UA0_CTSn MPP(19, 0x4, 0, 0, 1) |
139 | #define MPP19_BOOT_FLASH_WEn MPP(19, 0x5, 0, 1, 1) | 139 | #define MPP19_BOOT_FLASH_WEn MPP(19, 0x5, 0, 0, 1) |
140 | #define MPP19_UNUSED MPP(19, 0x1, 0, 0, 1) | 140 | #define MPP19_UNUSED MPP(19, 0x1, 0, 0, 1) |
141 | 141 | ||
142 | 142 | ||
143 | #define MPP20_GPIO MPP(20, 0x0, 1, 1, 1) | 143 | #define MPP20_GPIO MPP(20, 0x0, 1, 1, 1) |
144 | #define MPP20_UA1_CTSs MPP(20, 0x4, 1, 0, 1) | 144 | #define MPP20_UA1_CTSs MPP(20, 0x4, 0, 0, 1) |
145 | #define MPP20_TDM_PCLK MPP(20, 0x6, 1, 1, 0) | 145 | #define MPP20_TDM_PCLK MPP(20, 0x6, 0, 0, 0) |
146 | #define MPP20_UNUSED MPP(20, 0x1, 0, 0, 1) | 146 | #define MPP20_UNUSED MPP(20, 0x1, 0, 0, 1) |
147 | 147 | ||
148 | 148 | ||
149 | 149 | ||
150 | #define MPP21_GPIO MPP(21, 0x0, 1, 1, 1) | 150 | #define MPP21_GPIO MPP(21, 0x0, 1, 1, 1) |
151 | #define MPP21_UA1_CTSs MPP(21, 0x4, 0, 1, 1) | 151 | #define MPP21_UA1_CTSs MPP(21, 0x4, 0, 0, 1) |
152 | #define MPP21_TDM_FSYNC MPP(21, 0x6, 1, 1, 0) | 152 | #define MPP21_TDM_FSYNC MPP(21, 0x6, 0, 0, 0) |
153 | #define MPP21_UNUSED MPP(21, 0x1, 0, 0, 1) | 153 | #define MPP21_UNUSED MPP(21, 0x1, 0, 0, 1) |
154 | 154 | ||
155 | 155 | ||
156 | 156 | ||
157 | #define MPP22_GPIO MPP(22, 0x0, 1, 1, 1) | 157 | #define MPP22_GPIO MPP(22, 0x0, 1, 1, 1) |
158 | #define MPP22_UA3_TDX MPP(22, 0x4, 0, 1, 1) | 158 | #define MPP22_UA3_TDX MPP(22, 0x4, 0, 0, 1) |
159 | #define MPP22_NAND_FLASH_REn2 MPP(22, 0x5, 0, 1, 1) | 159 | #define MPP22_NAND_FLASH_REn2 MPP(22, 0x5, 0, 0, 1) |
160 | #define MPP22_TDM_DRX MPP(22, 0x6, 1, 0, 1) | 160 | #define MPP22_TDM_DRX MPP(22, 0x6, 0, 0, 1) |
161 | #define MPP22_UNUSED MPP(22, 0x1, 0, 0, 1) | 161 | #define MPP22_UNUSED MPP(22, 0x1, 0, 0, 1) |
162 | 162 | ||
163 | 163 | ||
164 | 164 | ||
165 | #define MPP23_GPIO MPP(23, 0x0, 1, 1, 1) | 165 | #define MPP23_GPIO MPP(23, 0x0, 1, 1, 1) |
166 | #define MPP23_UA3_RDX MPP(23, 0x4, 1, 0, 1) | 166 | #define MPP23_UA3_RDX MPP(23, 0x4, 0, 0, 1) |
167 | #define MPP23_NAND_FLASH_WEn2 MPP(23, 0x5, 0, 1, 1) | 167 | #define MPP23_NAND_FLASH_WEn2 MPP(23, 0x5, 0, 0, 1) |
168 | #define MPP23_TDM_DTX MPP(23, 0x6, 0, 1, 1) | 168 | #define MPP23_TDM_DTX MPP(23, 0x6, 0, 0, 1) |
169 | #define MPP23_UNUSED MPP(23, 0x1, 0, 0, 1) | 169 | #define MPP23_UNUSED MPP(23, 0x1, 0, 0, 1) |
170 | 170 | ||
171 | 171 | ||
172 | #define MPP24_GPIO MPP(24, 0x0, 1, 1, 1) | 172 | #define MPP24_GPIO MPP(24, 0x0, 1, 1, 1) |
173 | #define MPP24_UA2_TXD MPP(24, 0x4, 0, 1, 1) | 173 | #define MPP24_UA2_TXD MPP(24, 0x4, 0, 0, 1) |
174 | #define MPP24_TDM_INTn MPP(24, 0x6, 1, 0, 1) | 174 | #define MPP24_TDM_INTn MPP(24, 0x6, 0, 0, 1) |
175 | #define MPP24_UNUSED MPP(24, 0x1, 0, 0, 1) | 175 | #define MPP24_UNUSED MPP(24, 0x1, 0, 0, 1) |
176 | 176 | ||
177 | 177 | ||
178 | #define MPP25_GPIO MPP(25, 0x0, 1, 1, 1) | 178 | #define MPP25_GPIO MPP(25, 0x0, 1, 1, 1) |
179 | #define MPP25_UA2_RXD MPP(25, 0x4, 1, 0, 1) | 179 | #define MPP25_UA2_RXD MPP(25, 0x4, 0, 0, 1) |
180 | #define MPP25_TDM_RSTn MPP(25, 0x6, 0, 1, 1) | 180 | #define MPP25_TDM_RSTn MPP(25, 0x6, 0, 0, 1) |
181 | #define MPP25_UNUSED MPP(25, 0x1, 0, 0, 1) | 181 | #define MPP25_UNUSED MPP(25, 0x1, 0, 0, 1) |
182 | 182 | ||
183 | 183 | ||
184 | #define MPP26_GPIO MPP(26, 0x0, 1, 1, 1) | 184 | #define MPP26_GPIO MPP(26, 0x0, 1, 1, 1) |
185 | #define MPP26_UA2_CTSn MPP(26, 0x4, 1, 0, 1) | 185 | #define MPP26_UA2_CTSn MPP(26, 0x4, 0, 0, 1) |
186 | #define MPP26_TDM_PCLK MPP(26, 0x6, 1, 1, 1) | 186 | #define MPP26_TDM_PCLK MPP(26, 0x6, 0, 0, 1) |
187 | #define MPP26_UNUSED MPP(26, 0x1, 0, 0, 1) | 187 | #define MPP26_UNUSED MPP(26, 0x1, 0, 0, 1) |
188 | 188 | ||
189 | 189 | ||
190 | #define MPP27_GPIO MPP(27, 0x0, 1, 1, 1) | 190 | #define MPP27_GPIO MPP(27, 0x0, 1, 1, 1) |
191 | #define MPP27_UA2_RTSn MPP(27, 0x4, 0, 1, 1) | 191 | #define MPP27_UA2_RTSn MPP(27, 0x4, 0, 0, 1) |
192 | #define MPP27_TDM_FSYNC MPP(27, 0x6, 1, 1, 1) | 192 | #define MPP27_TDM_FSYNC MPP(27, 0x6, 0, 0, 1) |
193 | #define MPP27_UNUSED MPP(27, 0x1, 0, 0, 1) | 193 | #define MPP27_UNUSED MPP(27, 0x1, 0, 0, 1) |
194 | 194 | ||
195 | 195 | ||
196 | #define MPP28_GPIO MPP(28, 0x0, 1, 1, 1) | 196 | #define MPP28_GPIO MPP(28, 0x0, 1, 1, 1) |
197 | #define MPP28_UA3_TXD MPP(28, 0x4, 0, 1, 1) | 197 | #define MPP28_UA3_TXD MPP(28, 0x4, 0, 0, 1) |
198 | #define MPP28_TDM_DRX MPP(28, 0x6, 1, 0, 1) | 198 | #define MPP28_TDM_DRX MPP(28, 0x6, 0, 0, 1) |
199 | #define MPP28_UNUSED MPP(28, 0x1, 0, 0, 1) | 199 | #define MPP28_UNUSED MPP(28, 0x1, 0, 0, 1) |
200 | 200 | ||
201 | #define MPP29_GPIO MPP(29, 0x0, 1, 1, 1) | 201 | #define MPP29_GPIO MPP(29, 0x0, 1, 1, 1) |
202 | #define MPP29_UA3_RXD MPP(29, 0x4, 1, 0, 1) | 202 | #define MPP29_UA3_RXD MPP(29, 0x4, 0, 0, 1) |
203 | #define MPP29_SYSRST_OUTn MPP(29, 0x5, 0, 1, 1) | 203 | #define MPP29_SYSRST_OUTn MPP(29, 0x5, 0, 0, 1) |
204 | #define MPP29_TDM_DTX MPP(29, 0x6, 0, 1, 1) | 204 | #define MPP29_TDM_DTX MPP(29, 0x6, 0, 0, 1) |
205 | #define MPP29_UNUSED MPP(29, 0x1, 0, 0, 1) | 205 | #define MPP29_UNUSED MPP(29, 0x1, 0, 0, 1) |
206 | 206 | ||
207 | #define MPP30_GPIO MPP(30, 0x0, 1, 1, 1) | 207 | #define MPP30_GPIO MPP(30, 0x0, 1, 1, 1) |
208 | #define MPP30_UA3_CTSn MPP(30, 0x4, 1, 0, 1) | 208 | #define MPP30_UA3_CTSn MPP(30, 0x4, 0, 0, 1) |
209 | #define MPP30_UNUSED MPP(30, 0x1, 0, 0, 1) | 209 | #define MPP30_UNUSED MPP(30, 0x1, 0, 0, 1) |
210 | 210 | ||
211 | #define MPP31_GPIO MPP(31, 0x0, 1, 1, 1) | 211 | #define MPP31_GPIO MPP(31, 0x0, 1, 1, 1) |
212 | #define MPP31_UA3_RTSn MPP(31, 0x4, 0, 1, 1) | 212 | #define MPP31_UA3_RTSn MPP(31, 0x4, 0, 0, 1) |
213 | #define MPP31_TDM1_SCSn MPP(31, 0x6, 0, 1, 1) | 213 | #define MPP31_TDM1_SCSn MPP(31, 0x6, 0, 0, 1) |
214 | #define MPP31_UNUSED MPP(31, 0x1, 0, 0, 1) | 214 | #define MPP31_UNUSED MPP(31, 0x1, 0, 0, 1) |
215 | 215 | ||
216 | 216 | ||
217 | #define MPP32_GPIO MPP(32, 0x1, 1, 1, 1) | 217 | #define MPP32_GPIO MPP(32, 0x1, 1, 1, 1) |
218 | #define MPP32_UA3_TDX MPP(32, 0x4, 0, 1, 1) | 218 | #define MPP32_UA3_TDX MPP(32, 0x4, 0, 0, 1) |
219 | #define MPP32_SYSRST_OUTn MPP(32, 0x5, 0, 1, 1) | 219 | #define MPP32_SYSRST_OUTn MPP(32, 0x5, 0, 0, 1) |
220 | #define MPP32_TDM0_RXQ MPP(32, 0x6, 0, 1, 1) | 220 | #define MPP32_TDM0_RXQ MPP(32, 0x6, 0, 0, 1) |
221 | #define MPP32_UNUSED MPP(32, 0x3, 0, 0, 1) | 221 | #define MPP32_UNUSED MPP(32, 0x3, 0, 0, 1) |
222 | 222 | ||
223 | 223 | ||
224 | #define MPP33_GPIO MPP(33, 0x1, 1, 1, 1) | 224 | #define MPP33_GPIO MPP(33, 0x1, 1, 1, 1) |
225 | #define MPP33_UA3_RDX MPP(33, 0x4, 1, 0, 1) | 225 | #define MPP33_UA3_RDX MPP(33, 0x4, 0, 0, 1) |
226 | #define MPP33_TDM0_TXQ MPP(33, 0x6, 0, 1, 1) | 226 | #define MPP33_TDM0_TXQ MPP(33, 0x6, 0, 0, 1) |
227 | #define MPP33_UNUSED MPP(33, 0x3, 0, 0, 1) | 227 | #define MPP33_UNUSED MPP(33, 0x3, 0, 0, 1) |
228 | 228 | ||
229 | 229 | ||
230 | 230 | ||
231 | #define MPP34_GPIO MPP(34, 0x1, 1, 1, 1) | 231 | #define MPP34_GPIO MPP(34, 0x1, 1, 1, 1) |
232 | #define MPP34_UA2_TDX MPP(34, 0x4, 0, 1, 1) | 232 | #define MPP34_UA2_TDX MPP(34, 0x4, 0, 0, 1) |
233 | #define MPP34_TDM1_RXQ MPP(34, 0x6, 0, 1, 1) | 233 | #define MPP34_TDM1_RXQ MPP(34, 0x6, 0, 0, 1) |
234 | #define MPP34_UNUSED MPP(34, 0x3, 0, 0, 1) | 234 | #define MPP34_UNUSED MPP(34, 0x3, 0, 0, 1) |
235 | 235 | ||
236 | 236 | ||
237 | 237 | ||
238 | #define MPP35_GPIO MPP(35, 0x1, 1, 1, 1) | 238 | #define MPP35_GPIO MPP(35, 0x1, 1, 1, 1) |
239 | #define MPP35_UA2_RDX MPP(35, 0x4, 1, 0, 1) | 239 | #define MPP35_UA2_RDX MPP(35, 0x4, 0, 0, 1) |
240 | #define MPP35_TDM1_TXQ MPP(35, 0x6, 0, 1, 1) | 240 | #define MPP35_TDM1_TXQ MPP(35, 0x6, 0, 0, 1) |
241 | #define MPP35_UNUSED MPP(35, 0x3, 0, 0, 1) | 241 | #define MPP35_UNUSED MPP(35, 0x3, 0, 0, 1) |
242 | 242 | ||
243 | #define MPP36_GPIO MPP(36, 0x1, 1, 1, 1) | 243 | #define MPP36_GPIO MPP(36, 0x1, 1, 1, 1) |
244 | #define MPP36_UA0_CTSn MPP(36, 0x2, 1, 0, 1) | 244 | #define MPP36_UA0_CTSn MPP(36, 0x2, 0, 0, 1) |
245 | #define MPP36_UA2_TDX MPP(36, 0x4, 0, 1, 1) | 245 | #define MPP36_UA2_TDX MPP(36, 0x4, 0, 0, 1) |
246 | #define MPP36_TDM0_SCSn MPP(36, 0x6, 0, 1, 1) | 246 | #define MPP36_TDM0_SCSn MPP(36, 0x6, 0, 0, 1) |
247 | #define MPP36_UNUSED MPP(36, 0x3, 0, 0, 1) | 247 | #define MPP36_UNUSED MPP(36, 0x3, 0, 0, 1) |
248 | 248 | ||
249 | 249 | ||
250 | #define MPP37_GPIO MPP(37, 0x1, 1, 1, 1) | 250 | #define MPP37_GPIO MPP(37, 0x1, 1, 1, 1) |
251 | #define MPP37_UA0_RTSn MPP(37, 0x2, 0, 1, 1) | 251 | #define MPP37_UA0_RTSn MPP(37, 0x2, 0, 0, 1) |
252 | #define MPP37_UA2_RXD MPP(37, 0x4, 1, 0, 1) | 252 | #define MPP37_UA2_RXD MPP(37, 0x4, 0, 0, 1) |
253 | #define MPP37_SYSRST_OUTn MPP(37, 0x5, 0, 1, 1) | 253 | #define MPP37_SYSRST_OUTn MPP(37, 0x5, 0, 0, 1) |
254 | #define MPP37_TDM_SCLK MPP(37, 0x6, 0, 1, 1) | 254 | #define MPP37_TDM_SCLK MPP(37, 0x6, 0, 0, 1) |
255 | #define MPP37_UNUSED MPP(37, 0x3, 0, 0, 1) | 255 | #define MPP37_UNUSED MPP(37, 0x3, 0, 0, 1) |
256 | 256 | ||
257 | 257 | ||
258 | 258 | ||
259 | 259 | ||
260 | #define MPP38_GPIO MPP(38, 0x1, 1, 1, 1) | 260 | #define MPP38_GPIO MPP(38, 0x1, 1, 1, 1) |
261 | #define MPP38_UA1_CTSn MPP(38, 0x2, 1, 0, 1) | 261 | #define MPP38_UA1_CTSn MPP(38, 0x2, 0, 0, 1) |
262 | #define MPP38_UA3_TXD MPP(38, 0x4, 0, 1, 1) | 262 | #define MPP38_UA3_TXD MPP(38, 0x4, 0, 0, 1) |
263 | #define MPP38_SYSRST_OUTn MPP(38, 0x5, 0, 1, 1) | 263 | #define MPP38_SYSRST_OUTn MPP(38, 0x5, 0, 0, 1) |
264 | #define MPP38_TDM_SMOSI MPP(38, 0x6, 0, 1, 1) | 264 | #define MPP38_TDM_SMOSI MPP(38, 0x6, 0, 0, 1) |
265 | #define MPP38_UNUSED MPP(38, 0x3, 0, 0, 1) | 265 | #define MPP38_UNUSED MPP(38, 0x3, 0, 0, 1) |
266 | 266 | ||
267 | 267 | ||
268 | 268 | ||
269 | 269 | ||
270 | #define MPP39_GPIO MPP(39, 0x1, 1, 1, 1) | 270 | #define MPP39_GPIO MPP(39, 0x1, 1, 1, 1) |
271 | #define MPP39_UA1_RTSn MPP(39, 0x2, 0, 1, 1) | 271 | #define MPP39_UA1_RTSn MPP(39, 0x2, 0, 0, 1) |
272 | #define MPP39_UA3_RXD MPP(39, 0x4, 1, 0, 1) | 272 | #define MPP39_UA3_RXD MPP(39, 0x4, 0, 0, 1) |
273 | #define MPP39_SYSRST_OUTn MPP(39, 0x5, 0, 1, 1) | 273 | #define MPP39_SYSRST_OUTn MPP(39, 0x5, 0, 0, 1) |
274 | #define MPP39_TDM_SMISO MPP(39, 0x6, 1, 0, 1) | 274 | #define MPP39_TDM_SMISO MPP(39, 0x6, 0, 0, 1) |
275 | #define MPP39_UNUSED MPP(39, 0x3, 0, 0, 1) | 275 | #define MPP39_UNUSED MPP(39, 0x3, 0, 0, 1) |
276 | 276 | ||
277 | 277 | ||
278 | 278 | ||
279 | #define MPP40_GPIO MPP(40, 0x1, 1, 1, 1) | 279 | #define MPP40_GPIO MPP(40, 0x1, 1, 1, 1) |
280 | #define MPP40_TDM_INTn MPP(40, 0x6, 1, 0, 1) | 280 | #define MPP40_TDM_INTn MPP(40, 0x6, 0, 0, 1) |
281 | #define MPP40_UNUSED MPP(40, 0x0, 0, 0, 1) | 281 | #define MPP40_UNUSED MPP(40, 0x0, 0, 0, 1) |
282 | 282 | ||
283 | 283 | ||
284 | 284 | ||
285 | #define MPP41_GPIO MPP(41, 0x1, 1, 1, 1) | 285 | #define MPP41_GPIO MPP(41, 0x1, 1, 1, 1) |
286 | #define MPP41_TDM_RSTn MPP(41, 0x6, 0, 1, 1) | 286 | #define MPP41_TDM_RSTn MPP(41, 0x6, 0, 0, 1) |
287 | #define MPP41_UNUSED MPP(41, 0x0, 0, 0, 1) | 287 | #define MPP41_UNUSED MPP(41, 0x0, 0, 0, 1) |
288 | 288 | ||
289 | 289 | ||
290 | 290 | ||
291 | #define MPP42_GPIO MPP(42, 0x1, 1, 1, 1) | 291 | #define MPP42_GPIO MPP(42, 0x1, 1, 1, 1) |
292 | #define MPP42_TDM_PCLK MPP(42, 0x6, 1, 1, 1) | 292 | #define MPP42_TDM_PCLK MPP(42, 0x6, 0, 0, 1) |
293 | #define MPP42_UNUSED MPP(42, 0x0, 0, 0, 1) | 293 | #define MPP42_UNUSED MPP(42, 0x0, 0, 0, 1) |
294 | 294 | ||
295 | 295 | ||
296 | 296 | ||
297 | #define MPP43_GPIO MPP(43, 0x1, 1, 1, 1) | 297 | #define MPP43_GPIO MPP(43, 0x1, 1, 1, 1) |
298 | #define MPP43_TDM_FSYNC MPP(43, 0x6, 1, 1, 1) | 298 | #define MPP43_TDM_FSYNC MPP(43, 0x6, 0, 0, 1) |
299 | #define MPP43_UNUSED MPP(43, 0x0, 0, 0, 1) | 299 | #define MPP43_UNUSED MPP(43, 0x0, 0, 0, 1) |
300 | 300 | ||
301 | 301 | ||
302 | 302 | ||
303 | #define MPP44_GPIO MPP(44, 0x1, 1, 1, 1) | 303 | #define MPP44_GPIO MPP(44, 0x1, 1, 1, 1) |
304 | #define MPP44_TDM_DRX MPP(44, 0x6, 1, 0, 1) | 304 | #define MPP44_TDM_DRX MPP(44, 0x6, 0, 0, 1) |
305 | #define MPP44_UNUSED MPP(44, 0x0, 0, 0, 1) | 305 | #define MPP44_UNUSED MPP(44, 0x0, 0, 0, 1) |
306 | 306 | ||
307 | 307 | ||
308 | 308 | ||
309 | #define MPP45_GPIO MPP(45, 0x1, 1, 1, 1) | 309 | #define MPP45_GPIO MPP(45, 0x1, 1, 1, 1) |
310 | #define MPP45_SATA0_ACTn MPP(45, 0x3, 0, 1, 1) | 310 | #define MPP45_SATA0_ACTn MPP(45, 0x3, 0, 0, 1) |
311 | #define MPP45_TDM_DRX MPP(45, 0x6, 0, 1, 1) | 311 | #define MPP45_TDM_DRX MPP(45, 0x6, 0, 0, 1) |
312 | #define MPP45_UNUSED MPP(45, 0x0, 0, 0, 1) | 312 | #define MPP45_UNUSED MPP(45, 0x0, 0, 0, 1) |
313 | 313 | ||
314 | 314 | ||
315 | #define MPP46_GPIO MPP(46, 0x1, 1, 1, 1) | 315 | #define MPP46_GPIO MPP(46, 0x1, 1, 1, 1) |
316 | #define MPP46_TDM_SCSn MPP(46, 0x6, 0, 1, 1) | 316 | #define MPP46_TDM_SCSn MPP(46, 0x6, 0, 0, 1) |
317 | #define MPP46_UNUSED MPP(46, 0x0, 0, 0, 1) | 317 | #define MPP46_UNUSED MPP(46, 0x0, 0, 0, 1) |
318 | 318 | ||
319 | 319 | ||
@@ -323,14 +323,14 @@ | |||
323 | 323 | ||
324 | 324 | ||
325 | #define MPP48_GPIO MPP(48, 0x1, 1, 1, 1) | 325 | #define MPP48_GPIO MPP(48, 0x1, 1, 1, 1) |
326 | #define MPP48_SATA1_ACTn MPP(48, 0x3, 0, 1, 1) | 326 | #define MPP48_SATA1_ACTn MPP(48, 0x3, 0, 0, 1) |
327 | #define MPP48_UNUSED MPP(48, 0x2, 0, 0, 1) | 327 | #define MPP48_UNUSED MPP(48, 0x2, 0, 0, 1) |
328 | 328 | ||
329 | 329 | ||
330 | 330 | ||
331 | #define MPP49_GPIO MPP(49, 0x1, 1, 1, 1) | 331 | #define MPP49_GPIO MPP(49, 0x1, 1, 1, 1) |
332 | #define MPP49_SATA0_ACTn MPP(49, 0x3, 0, 1, 1) | 332 | #define MPP49_SATA0_ACTn MPP(49, 0x3, 0, 0, 1) |
333 | #define MPP49_M_BB MPP(49, 0x4, 1, 0, 1) | 333 | #define MPP49_M_BB MPP(49, 0x4, 0, 0, 1) |
334 | #define MPP49_UNUSED MPP(49, 0x2, 0, 0, 1) | 334 | #define MPP49_UNUSED MPP(49, 0x2, 0, 0, 1) |
335 | 335 | ||
336 | 336 | ||
diff --git a/arch/arm/mach-mxs/include/mach/entry-macro.S b/arch/arm/mach-mxs/include/mach/entry-macro.S index 9f0da12e657a..0c14259705b9 100644 --- a/arch/arm/mach-mxs/include/mach/entry-macro.S +++ b/arch/arm/mach-mxs/include/mach/entry-macro.S | |||
@@ -23,9 +23,6 @@ | |||
23 | #define MXS_ICOLL_VBASE MXS_IO_ADDRESS(MXS_ICOLL_BASE_ADDR) | 23 | #define MXS_ICOLL_VBASE MXS_IO_ADDRESS(MXS_ICOLL_BASE_ADDR) |
24 | #define HW_ICOLL_STAT_OFFSET 0x70 | 24 | #define HW_ICOLL_STAT_OFFSET 0x70 |
25 | 25 | ||
26 | .macro disable_fiq | ||
27 | .endm | ||
28 | |||
29 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 26 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
30 | ldr \irqnr, [\base, #HW_ICOLL_STAT_OFFSET] | 27 | ldr \irqnr, [\base, #HW_ICOLL_STAT_OFFSET] |
31 | cmp \irqnr, #0x7F | 28 | cmp \irqnr, #0x7F |
@@ -36,6 +33,3 @@ | |||
36 | .macro get_irqnr_preamble, base, tmp | 33 | .macro get_irqnr_preamble, base, tmp |
37 | ldr \base, =MXS_ICOLL_VBASE | 34 | ldr \base, =MXS_ICOLL_VBASE |
38 | .endm | 35 | .endm |
39 | |||
40 | .macro arch_ret_to_user, tmp1, tmp2 | ||
41 | .endm | ||
diff --git a/arch/arm/mach-netx/include/mach/entry-macro.S b/arch/arm/mach-netx/include/mach/entry-macro.S deleted file mode 100644 index 6e9f1cbe1634..000000000000 --- a/arch/arm/mach-netx/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-netx/include/mach/entry-macro.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for Hilscher netX based platforms | ||
5 | * | ||
6 | * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 | ||
10 | * as published by the Free Software Foundation. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | */ | ||
21 | |||
22 | .macro disable_fiq | ||
23 | .endm | ||
24 | |||
25 | .macro arch_ret_to_user, tmp1, tmp2 | ||
26 | .endm | ||
diff --git a/arch/arm/mach-nomadik/include/mach/entry-macro.S b/arch/arm/mach-nomadik/include/mach/entry-macro.S deleted file mode 100644 index 98ea1c1fbbab..000000000000 --- a/arch/arm/mach-nomadik/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | /* | ||
2 | * Low-level IRQ helper macros for Nomadik platforms | ||
3 | * | ||
4 | * This file is licensed under the terms of the GNU General Public | ||
5 | * License version 2. This program is licensed "as is" without any | ||
6 | * warranty of any kind, whether express or implied. | ||
7 | */ | ||
8 | |||
9 | .macro disable_fiq | ||
10 | .endm | ||
11 | |||
12 | .macro arch_ret_to_user, tmp1, tmp2 | ||
13 | .endm | ||
diff --git a/arch/arm/mach-omap1/ams-delta-fiq-handler.S b/arch/arm/mach-omap1/ams-delta-fiq-handler.S index c1c5fb6a5b4c..399c4c49722f 100644 --- a/arch/arm/mach-omap1/ams-delta-fiq-handler.S +++ b/arch/arm/mach-omap1/ams-delta-fiq-handler.S | |||
@@ -15,11 +15,12 @@ | |||
15 | 15 | ||
16 | #include <linux/linkage.h> | 16 | #include <linux/linkage.h> |
17 | 17 | ||
18 | #include <plat/io.h> | ||
19 | #include <plat/board-ams-delta.h> | 18 | #include <plat/board-ams-delta.h> |
20 | 19 | ||
21 | #include <mach/ams-delta-fiq.h> | 20 | #include <mach/ams-delta-fiq.h> |
22 | 21 | ||
22 | #include "iomap.h" | ||
23 | |||
23 | /* | 24 | /* |
24 | * GPIO related definitions, copied from arch/arm/plat-omap/gpio.c. | 25 | * GPIO related definitions, copied from arch/arm/plat-omap/gpio.c. |
25 | * Unfortunately, those were not placed in a separate header file. | 26 | * Unfortunately, those were not placed in a separate header file. |
diff --git a/arch/arm/mach-omap1/ams-delta-fiq.c b/arch/arm/mach-omap1/ams-delta-fiq.c index 152b32c15e28..fcce7ff37630 100644 --- a/arch/arm/mach-omap1/ams-delta-fiq.c +++ b/arch/arm/mach-omap1/ams-delta-fiq.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <plat/board-ams-delta.h> | 22 | #include <plat/board-ams-delta.h> |
23 | 23 | ||
24 | #include <asm/fiq.h> | 24 | #include <asm/fiq.h> |
25 | |||
25 | #include <mach/ams-delta-fiq.h> | 26 | #include <mach/ams-delta-fiq.h> |
26 | 27 | ||
27 | static struct fiq_handler fh = { | 28 | static struct fiq_handler fh = { |
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index 88909cc0b254..ac65d7d7c7a1 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c | |||
@@ -20,25 +20,27 @@ | |||
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/serial_8250.h> | 21 | #include <linux/serial_8250.h> |
22 | #include <linux/export.h> | 22 | #include <linux/export.h> |
23 | #include <linux/io.h> | ||
23 | 24 | ||
24 | #include <media/soc_camera.h> | 25 | #include <media/soc_camera.h> |
25 | 26 | ||
26 | #include <asm/serial.h> | 27 | #include <asm/serial.h> |
27 | #include <mach/hardware.h> | ||
28 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
29 | #include <asm/mach/arch.h> | 29 | #include <asm/mach/arch.h> |
30 | #include <asm/mach/map.h> | 30 | #include <asm/mach/map.h> |
31 | 31 | ||
32 | #include <plat/io.h> | ||
33 | #include <plat/board-ams-delta.h> | 32 | #include <plat/board-ams-delta.h> |
34 | #include <plat/keypad.h> | 33 | #include <plat/keypad.h> |
35 | #include <plat/mux.h> | 34 | #include <plat/mux.h> |
36 | #include <plat/usb.h> | 35 | #include <plat/usb.h> |
37 | #include <plat/board.h> | 36 | #include <plat/board.h> |
38 | #include "common.h" | ||
39 | #include <mach/camera.h> | ||
40 | 37 | ||
38 | #include <mach/hardware.h> | ||
41 | #include <mach/ams-delta-fiq.h> | 39 | #include <mach/ams-delta-fiq.h> |
40 | #include <mach/camera.h> | ||
41 | |||
42 | #include "iomap.h" | ||
43 | #include "common.h" | ||
42 | 44 | ||
43 | static u8 ams_delta_latch1_reg; | 45 | static u8 ams_delta_latch1_reg; |
44 | static u16 ams_delta_latch2_reg; | 46 | static u16 ams_delta_latch2_reg; |
diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c index 0b9464b41212..079292cca584 100644 --- a/arch/arm/mach-omap1/board-fsample.c +++ b/arch/arm/mach-omap1/board-fsample.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/input.h> | 22 | #include <linux/input.h> |
23 | #include <linux/smc91x.h> | 23 | #include <linux/smc91x.h> |
24 | 24 | ||
25 | #include <mach/hardware.h> | ||
26 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
27 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
28 | #include <asm/mach/map.h> | 27 | #include <asm/mach/map.h> |
@@ -32,9 +31,13 @@ | |||
32 | #include <plat/flash.h> | 31 | #include <plat/flash.h> |
33 | #include <plat/fpga.h> | 32 | #include <plat/fpga.h> |
34 | #include <plat/keypad.h> | 33 | #include <plat/keypad.h> |
35 | #include "common.h" | ||
36 | #include <plat/board.h> | 34 | #include <plat/board.h> |
37 | 35 | ||
36 | #include <mach/hardware.h> | ||
37 | |||
38 | #include "iomap.h" | ||
39 | #include "common.h" | ||
40 | |||
38 | /* fsample is pretty close to p2-sample */ | 41 | /* fsample is pretty close to p2-sample */ |
39 | 42 | ||
40 | #define fsample_cpld_read(reg) __raw_readb(reg) | 43 | #define fsample_cpld_read(reg) __raw_readb(reg) |
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c index 00ad6b22d60a..03e0050a8961 100644 --- a/arch/arm/mach-omap1/board-h2.c +++ b/arch/arm/mach-omap1/board-h2.c | |||
@@ -31,8 +31,6 @@ | |||
31 | #include <linux/i2c/tps65010.h> | 31 | #include <linux/i2c/tps65010.h> |
32 | #include <linux/smc91x.h> | 32 | #include <linux/smc91x.h> |
33 | 33 | ||
34 | #include <mach/hardware.h> | ||
35 | |||
36 | #include <asm/mach-types.h> | 34 | #include <asm/mach-types.h> |
37 | #include <asm/mach/arch.h> | 35 | #include <asm/mach/arch.h> |
38 | #include <asm/mach/map.h> | 36 | #include <asm/mach/map.h> |
@@ -43,9 +41,11 @@ | |||
43 | #include <plat/irda.h> | 41 | #include <plat/irda.h> |
44 | #include <plat/usb.h> | 42 | #include <plat/usb.h> |
45 | #include <plat/keypad.h> | 43 | #include <plat/keypad.h> |
46 | #include "common.h" | ||
47 | #include <plat/flash.h> | 44 | #include <plat/flash.h> |
48 | 45 | ||
46 | #include <mach/hardware.h> | ||
47 | |||
48 | #include "common.h" | ||
49 | #include "board-h2.h" | 49 | #include "board-h2.h" |
50 | 50 | ||
51 | /* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */ | 51 | /* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */ |
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index 4a7f25149703..f304fe211b1a 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c | |||
@@ -33,21 +33,21 @@ | |||
33 | 33 | ||
34 | #include <asm/setup.h> | 34 | #include <asm/setup.h> |
35 | #include <asm/page.h> | 35 | #include <asm/page.h> |
36 | #include <mach/hardware.h> | ||
37 | |||
38 | #include <asm/mach-types.h> | 36 | #include <asm/mach-types.h> |
39 | #include <asm/mach/arch.h> | 37 | #include <asm/mach/arch.h> |
40 | #include <asm/mach/map.h> | 38 | #include <asm/mach/map.h> |
41 | 39 | ||
42 | #include <mach/irqs.h> | ||
43 | #include <plat/mux.h> | 40 | #include <plat/mux.h> |
44 | #include <plat/tc.h> | 41 | #include <plat/tc.h> |
45 | #include <plat/usb.h> | 42 | #include <plat/usb.h> |
46 | #include <plat/keypad.h> | 43 | #include <plat/keypad.h> |
47 | #include <plat/dma.h> | 44 | #include <plat/dma.h> |
48 | #include "common.h" | ||
49 | #include <plat/flash.h> | 45 | #include <plat/flash.h> |
50 | 46 | ||
47 | #include <mach/hardware.h> | ||
48 | #include <mach/irqs.h> | ||
49 | |||
50 | #include "common.h" | ||
51 | #include "board-h3.h" | 51 | #include "board-h3.h" |
52 | 52 | ||
53 | /* In OMAP1710 H3 the Ethernet is directly connected to CS1 */ | 53 | /* In OMAP1710 H3 the Ethernet is directly connected to CS1 */ |
diff --git a/arch/arm/mach-omap1/board-htcherald.c b/arch/arm/mach-omap1/board-htcherald.c index 731cc3db7ab3..fa52d145d7b6 100644 --- a/arch/arm/mach-omap1/board-htcherald.c +++ b/arch/arm/mach-omap1/board-htcherald.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
29 | #include <linux/input.h> | 29 | #include <linux/input.h> |
30 | #include <linux/io.h> | 30 | #include <linux/delay.h> |
31 | #include <linux/gpio.h> | 31 | #include <linux/gpio.h> |
32 | #include <linux/gpio_keys.h> | 32 | #include <linux/gpio_keys.h> |
33 | #include <linux/i2c.h> | 33 | #include <linux/i2c.h> |
@@ -41,7 +41,6 @@ | |||
41 | #include <asm/mach/arch.h> | 41 | #include <asm/mach/arch.h> |
42 | 42 | ||
43 | #include <plat/omap7xx.h> | 43 | #include <plat/omap7xx.h> |
44 | #include "common.h" | ||
45 | #include <plat/board.h> | 44 | #include <plat/board.h> |
46 | #include <plat/keypad.h> | 45 | #include <plat/keypad.h> |
47 | #include <plat/usb.h> | 46 | #include <plat/usb.h> |
@@ -49,7 +48,7 @@ | |||
49 | 48 | ||
50 | #include <mach/irqs.h> | 49 | #include <mach/irqs.h> |
51 | 50 | ||
52 | #include <linux/delay.h> | 51 | #include "common.h" |
53 | 52 | ||
54 | /* LCD register definition */ | 53 | /* LCD register definition */ |
55 | #define OMAP_LCDC_CONTROL (0xfffec000 + 0x00) | 54 | #define OMAP_LCDC_CONTROL (0xfffec000 + 0x00) |
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c index 309369ea6978..289a6b82c5f7 100644 --- a/arch/arm/mach-omap1/board-innovator.c +++ b/arch/arm/mach-omap1/board-innovator.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/input.h> | 26 | #include <linux/input.h> |
27 | #include <linux/smc91x.h> | 27 | #include <linux/smc91x.h> |
28 | 28 | ||
29 | #include <mach/hardware.h> | ||
30 | #include <asm/mach-types.h> | 29 | #include <asm/mach-types.h> |
31 | #include <asm/mach/arch.h> | 30 | #include <asm/mach/arch.h> |
32 | #include <asm/mach/map.h> | 31 | #include <asm/mach/map.h> |
@@ -37,9 +36,13 @@ | |||
37 | #include <plat/tc.h> | 36 | #include <plat/tc.h> |
38 | #include <plat/usb.h> | 37 | #include <plat/usb.h> |
39 | #include <plat/keypad.h> | 38 | #include <plat/keypad.h> |
40 | #include "common.h" | ||
41 | #include <plat/mmc.h> | 39 | #include <plat/mmc.h> |
42 | 40 | ||
41 | #include <mach/hardware.h> | ||
42 | |||
43 | #include "iomap.h" | ||
44 | #include "common.h" | ||
45 | |||
43 | /* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */ | 46 | /* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */ |
44 | #define INNOVATOR1610_ETHR_START 0x04000300 | 47 | #define INNOVATOR1610_ETHR_START 0x04000300 |
45 | 48 | ||
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c index f9efc036ba96..abdbdb08644f 100644 --- a/arch/arm/mach-omap1/board-nokia770.c +++ b/arch/arm/mach-omap1/board-nokia770.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/workqueue.h> | 21 | #include <linux/workqueue.h> |
22 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
23 | 23 | ||
24 | #include <mach/hardware.h> | ||
25 | #include <asm/mach-types.h> | 24 | #include <asm/mach-types.h> |
26 | #include <asm/mach/arch.h> | 25 | #include <asm/mach/arch.h> |
27 | #include <asm/mach/map.h> | 26 | #include <asm/mach/map.h> |
@@ -30,12 +29,15 @@ | |||
30 | #include <plat/usb.h> | 29 | #include <plat/usb.h> |
31 | #include <plat/board.h> | 30 | #include <plat/board.h> |
32 | #include <plat/keypad.h> | 31 | #include <plat/keypad.h> |
33 | #include "common.h" | ||
34 | #include <plat/hwa742.h> | 32 | #include <plat/hwa742.h> |
35 | #include <plat/lcd_mipid.h> | 33 | #include <plat/lcd_mipid.h> |
36 | #include <plat/mmc.h> | 34 | #include <plat/mmc.h> |
37 | #include <plat/clock.h> | 35 | #include <plat/clock.h> |
38 | 36 | ||
37 | #include <mach/hardware.h> | ||
38 | |||
39 | #include "common.h" | ||
40 | |||
39 | #define ADS7846_PENDOWN_GPIO 15 | 41 | #define ADS7846_PENDOWN_GPIO 15 |
40 | 42 | ||
41 | static const unsigned int nokia770_keymap[] = { | 43 | static const unsigned int nokia770_keymap[] = { |
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c index 675de06557aa..e2d7ae4418f2 100644 --- a/arch/arm/mach-omap1/board-osk.c +++ b/arch/arm/mach-omap1/board-osk.c | |||
@@ -34,15 +34,11 @@ | |||
34 | #include <linux/i2c.h> | 34 | #include <linux/i2c.h> |
35 | #include <linux/leds.h> | 35 | #include <linux/leds.h> |
36 | #include <linux/smc91x.h> | 36 | #include <linux/smc91x.h> |
37 | |||
38 | #include <linux/mtd/mtd.h> | 37 | #include <linux/mtd/mtd.h> |
39 | #include <linux/mtd/partitions.h> | 38 | #include <linux/mtd/partitions.h> |
40 | #include <linux/mtd/physmap.h> | 39 | #include <linux/mtd/physmap.h> |
41 | |||
42 | #include <linux/i2c/tps65010.h> | 40 | #include <linux/i2c/tps65010.h> |
43 | 41 | ||
44 | #include <mach/hardware.h> | ||
45 | |||
46 | #include <asm/mach-types.h> | 42 | #include <asm/mach-types.h> |
47 | #include <asm/mach/arch.h> | 43 | #include <asm/mach/arch.h> |
48 | #include <asm/mach/map.h> | 44 | #include <asm/mach/map.h> |
@@ -51,6 +47,9 @@ | |||
51 | #include <plat/usb.h> | 47 | #include <plat/usb.h> |
52 | #include <plat/mux.h> | 48 | #include <plat/mux.h> |
53 | #include <plat/tc.h> | 49 | #include <plat/tc.h> |
50 | |||
51 | #include <mach/hardware.h> | ||
52 | |||
54 | #include "common.h" | 53 | #include "common.h" |
55 | 54 | ||
56 | /* At OMAP5912 OSK the Ethernet is directly connected to CS1 */ | 55 | /* At OMAP5912 OSK the Ethernet is directly connected to CS1 */ |
diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c index 81fa27f88369..04efa7e61149 100644 --- a/arch/arm/mach-omap1/board-palmte.c +++ b/arch/arm/mach-omap1/board-palmte.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <linux/interrupt.h> | 28 | #include <linux/interrupt.h> |
29 | #include <linux/apm-emulation.h> | 29 | #include <linux/apm-emulation.h> |
30 | 30 | ||
31 | #include <mach/hardware.h> | ||
32 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
33 | #include <asm/mach/arch.h> | 32 | #include <asm/mach/arch.h> |
34 | #include <asm/mach/map.h> | 33 | #include <asm/mach/map.h> |
@@ -41,6 +40,9 @@ | |||
41 | #include <plat/board.h> | 40 | #include <plat/board.h> |
42 | #include <plat/irda.h> | 41 | #include <plat/irda.h> |
43 | #include <plat/keypad.h> | 42 | #include <plat/keypad.h> |
43 | |||
44 | #include <mach/hardware.h> | ||
45 | |||
44 | #include "common.h" | 46 | #include "common.h" |
45 | 47 | ||
46 | #define PALMTE_USBDETECT_GPIO 0 | 48 | #define PALMTE_USBDETECT_GPIO 0 |
diff --git a/arch/arm/mach-omap1/board-palmtt.c b/arch/arm/mach-omap1/board-palmtt.c index 81cb82178388..acd1f3645ba0 100644 --- a/arch/arm/mach-omap1/board-palmtt.c +++ b/arch/arm/mach-omap1/board-palmtt.c | |||
@@ -24,8 +24,9 @@ | |||
24 | #include <linux/mtd/partitions.h> | 24 | #include <linux/mtd/partitions.h> |
25 | #include <linux/mtd/physmap.h> | 25 | #include <linux/mtd/physmap.h> |
26 | #include <linux/leds.h> | 26 | #include <linux/leds.h> |
27 | #include <linux/spi/spi.h> | ||
28 | #include <linux/spi/ads7846.h> | ||
27 | 29 | ||
28 | #include <mach/hardware.h> | ||
29 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
30 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
31 | #include <asm/mach/map.h> | 32 | #include <asm/mach/map.h> |
@@ -39,10 +40,10 @@ | |||
39 | #include <plat/board.h> | 40 | #include <plat/board.h> |
40 | #include <plat/irda.h> | 41 | #include <plat/irda.h> |
41 | #include <plat/keypad.h> | 42 | #include <plat/keypad.h> |
42 | #include "common.h" | ||
43 | 43 | ||
44 | #include <linux/spi/spi.h> | 44 | #include <mach/hardware.h> |
45 | #include <linux/spi/ads7846.h> | 45 | |
46 | #include "common.h" | ||
46 | 47 | ||
47 | #define PALMTT_USBDETECT_GPIO 0 | 48 | #define PALMTT_USBDETECT_GPIO 0 |
48 | #define PALMTT_CABLE_GPIO 1 | 49 | #define PALMTT_CABLE_GPIO 1 |
diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c index e881945ce8ec..c1cd0f2d6866 100644 --- a/arch/arm/mach-omap1/board-palmz71.c +++ b/arch/arm/mach-omap1/board-palmz71.c | |||
@@ -27,8 +27,9 @@ | |||
27 | #include <linux/mtd/mtd.h> | 27 | #include <linux/mtd/mtd.h> |
28 | #include <linux/mtd/partitions.h> | 28 | #include <linux/mtd/partitions.h> |
29 | #include <linux/mtd/physmap.h> | 29 | #include <linux/mtd/physmap.h> |
30 | #include <linux/spi/spi.h> | ||
31 | #include <linux/spi/ads7846.h> | ||
30 | 32 | ||
31 | #include <mach/hardware.h> | ||
32 | #include <asm/mach-types.h> | 33 | #include <asm/mach-types.h> |
33 | #include <asm/mach/arch.h> | 34 | #include <asm/mach/arch.h> |
34 | #include <asm/mach/map.h> | 35 | #include <asm/mach/map.h> |
@@ -41,10 +42,10 @@ | |||
41 | #include <plat/board.h> | 42 | #include <plat/board.h> |
42 | #include <plat/irda.h> | 43 | #include <plat/irda.h> |
43 | #include <plat/keypad.h> | 44 | #include <plat/keypad.h> |
44 | #include "common.h" | ||
45 | 45 | ||
46 | #include <linux/spi/spi.h> | 46 | #include <mach/hardware.h> |
47 | #include <linux/spi/ads7846.h> | 47 | |
48 | #include "common.h" | ||
48 | 49 | ||
49 | #define PALMZ71_USBDETECT_GPIO 0 | 50 | #define PALMZ71_USBDETECT_GPIO 0 |
50 | #define PALMZ71_PENIRQ_GPIO 6 | 51 | #define PALMZ71_PENIRQ_GPIO 6 |
diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c index c000bed76276..83f5b765c5b6 100644 --- a/arch/arm/mach-omap1/board-perseus2.c +++ b/arch/arm/mach-omap1/board-perseus2.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/input.h> | 22 | #include <linux/input.h> |
23 | #include <linux/smc91x.h> | 23 | #include <linux/smc91x.h> |
24 | 24 | ||
25 | #include <mach/hardware.h> | ||
26 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
27 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
28 | #include <asm/mach/map.h> | 27 | #include <asm/mach/map.h> |
@@ -32,9 +31,13 @@ | |||
32 | #include <plat/fpga.h> | 31 | #include <plat/fpga.h> |
33 | #include <plat/flash.h> | 32 | #include <plat/flash.h> |
34 | #include <plat/keypad.h> | 33 | #include <plat/keypad.h> |
35 | #include "common.h" | ||
36 | #include <plat/board.h> | 34 | #include <plat/board.h> |
37 | 35 | ||
36 | #include <mach/hardware.h> | ||
37 | |||
38 | #include "iomap.h" | ||
39 | #include "common.h" | ||
40 | |||
38 | static const unsigned int p2_keymap[] = { | 41 | static const unsigned int p2_keymap[] = { |
39 | KEY(0, 0, KEY_UP), | 42 | KEY(0, 0, KEY_UP), |
40 | KEY(1, 0, KEY_RIGHT), | 43 | KEY(1, 0, KEY_RIGHT), |
diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c index 7bcd82ab0fd0..fed4435f5d43 100644 --- a/arch/arm/mach-omap1/board-sx1.c +++ b/arch/arm/mach-omap1/board-sx1.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <linux/errno.h> | 28 | #include <linux/errno.h> |
29 | #include <linux/export.h> | 29 | #include <linux/export.h> |
30 | 30 | ||
31 | #include <mach/hardware.h> | ||
32 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
33 | #include <asm/mach/arch.h> | 32 | #include <asm/mach/arch.h> |
34 | #include <asm/mach/map.h> | 33 | #include <asm/mach/map.h> |
@@ -40,10 +39,13 @@ | |||
40 | #include <plat/usb.h> | 39 | #include <plat/usb.h> |
41 | #include <plat/tc.h> | 40 | #include <plat/tc.h> |
42 | #include <plat/board.h> | 41 | #include <plat/board.h> |
43 | #include "common.h" | ||
44 | #include <plat/keypad.h> | 42 | #include <plat/keypad.h> |
45 | #include <plat/board-sx1.h> | 43 | #include <plat/board-sx1.h> |
46 | 44 | ||
45 | #include <mach/hardware.h> | ||
46 | |||
47 | #include "common.h" | ||
48 | |||
47 | /* Write to I2C device */ | 49 | /* Write to I2C device */ |
48 | int sx1_i2c_write_byte(u8 devaddr, u8 regoffset, u8 value) | 50 | int sx1_i2c_write_byte(u8 devaddr, u8 regoffset, u8 value) |
49 | { | 51 | { |
diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c index f83a502dc93c..659d0f75de2c 100644 --- a/arch/arm/mach-omap1/board-voiceblue.c +++ b/arch/arm/mach-omap1/board-voiceblue.c | |||
@@ -27,18 +27,20 @@ | |||
27 | #include <linux/smc91x.h> | 27 | #include <linux/smc91x.h> |
28 | #include <linux/export.h> | 28 | #include <linux/export.h> |
29 | 29 | ||
30 | #include <mach/hardware.h> | ||
31 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
32 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
33 | #include <asm/mach/map.h> | 32 | #include <asm/mach/map.h> |
34 | 33 | ||
35 | #include <plat/board-voiceblue.h> | 34 | #include <plat/board-voiceblue.h> |
36 | #include "common.h" | ||
37 | #include <plat/flash.h> | 35 | #include <plat/flash.h> |
38 | #include <plat/mux.h> | 36 | #include <plat/mux.h> |
39 | #include <plat/tc.h> | 37 | #include <plat/tc.h> |
40 | #include <plat/usb.h> | 38 | #include <plat/usb.h> |
41 | 39 | ||
40 | #include <mach/hardware.h> | ||
41 | |||
42 | #include "common.h" | ||
43 | |||
42 | static struct plat_serial8250_port voiceblue_ports[] = { | 44 | static struct plat_serial8250_port voiceblue_ports[] = { |
43 | { | 45 | { |
44 | .mapbase = (unsigned long)(OMAP_CS1_PHYS + 0x40000), | 46 | .mapbase = (unsigned long)(OMAP_CS1_PHYS + 0x40000), |
diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c index 0c50df05d135..67382ddd8c83 100644 --- a/arch/arm/mach-omap1/clock.c +++ b/arch/arm/mach-omap1/clock.c | |||
@@ -15,8 +15,8 @@ | |||
15 | #include <linux/list.h> | 15 | #include <linux/list.h> |
16 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
17 | #include <linux/err.h> | 17 | #include <linux/err.h> |
18 | #include <linux/clk.h> | ||
19 | #include <linux/io.h> | 18 | #include <linux/io.h> |
19 | #include <linux/clk.h> | ||
20 | #include <linux/clkdev.h> | 20 | #include <linux/clkdev.h> |
21 | 21 | ||
22 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
@@ -27,6 +27,9 @@ | |||
27 | #include <plat/sram.h> | 27 | #include <plat/sram.h> |
28 | #include <plat/clkdev_omap.h> | 28 | #include <plat/clkdev_omap.h> |
29 | 29 | ||
30 | #include <mach/hardware.h> | ||
31 | |||
32 | #include "iomap.h" | ||
30 | #include "clock.h" | 33 | #include "clock.h" |
31 | #include "opp.h" | 34 | #include "opp.h" |
32 | 35 | ||
diff --git a/arch/arm/mach-omap1/clock_data.c b/arch/arm/mach-omap1/clock_data.c index 94699a82a734..c6ce93f71d08 100644 --- a/arch/arm/mach-omap1/clock_data.c +++ b/arch/arm/mach-omap1/clock_data.c | |||
@@ -15,10 +15,10 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/io.h> | ||
18 | #include <linux/clk.h> | 19 | #include <linux/clk.h> |
19 | #include <linux/cpufreq.h> | 20 | #include <linux/cpufreq.h> |
20 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
21 | #include <linux/io.h> | ||
22 | 22 | ||
23 | #include <asm/mach-types.h> /* for machine_is_* */ | 23 | #include <asm/mach-types.h> /* for machine_is_* */ |
24 | 24 | ||
@@ -28,6 +28,9 @@ | |||
28 | #include <plat/sram.h> /* for omap_sram_reprogram_clock() */ | 28 | #include <plat/sram.h> /* for omap_sram_reprogram_clock() */ |
29 | #include <plat/usb.h> /* for OTG_BASE */ | 29 | #include <plat/usb.h> /* for OTG_BASE */ |
30 | 30 | ||
31 | #include <mach/hardware.h> | ||
32 | |||
33 | #include "iomap.h" | ||
31 | #include "clock.h" | 34 | #include "clock.h" |
32 | 35 | ||
33 | /* Some ARM_IDLECT1 bit shifts - used in struct arm_idlect1_clk */ | 36 | /* Some ARM_IDLECT1 bit shifts - used in struct arm_idlect1_clk */ |
diff --git a/arch/arm/mach-omap1/common.h b/arch/arm/mach-omap1/common.h index a9a5146dd2d4..af658ad338ec 100644 --- a/arch/arm/mach-omap1/common.h +++ b/arch/arm/mach-omap1/common.h | |||
@@ -58,5 +58,6 @@ void omap1_restart(char, const char *); | |||
58 | 58 | ||
59 | extern struct sys_timer omap1_timer; | 59 | extern struct sys_timer omap1_timer; |
60 | extern bool omap_32k_timer_init(void); | 60 | extern bool omap_32k_timer_init(void); |
61 | extern void __init omap_init_consistent_dma_size(void); | ||
61 | 62 | ||
62 | #endif /* __ARCH_ARM_MACH_OMAP1_COMMON_H */ | 63 | #endif /* __ARCH_ARM_MACH_OMAP1_COMMON_H */ |
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c index 1d76a63c0983..d06c7140392c 100644 --- a/arch/arm/mach-omap1/devices.c +++ b/arch/arm/mach-omap1/devices.c | |||
@@ -15,14 +15,10 @@ | |||
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/io.h> | ||
19 | #include <linux/spi/spi.h> | 18 | #include <linux/spi/spi.h> |
20 | 19 | ||
21 | #include <mach/camera.h> | ||
22 | #include <mach/hardware.h> | ||
23 | #include <asm/mach/map.h> | 20 | #include <asm/mach/map.h> |
24 | 21 | ||
25 | #include "common.h" | ||
26 | #include <plat/tc.h> | 22 | #include <plat/tc.h> |
27 | #include <plat/board.h> | 23 | #include <plat/board.h> |
28 | #include <plat/mux.h> | 24 | #include <plat/mux.h> |
@@ -30,6 +26,10 @@ | |||
30 | #include <plat/omap7xx.h> | 26 | #include <plat/omap7xx.h> |
31 | #include <plat/mcbsp.h> | 27 | #include <plat/mcbsp.h> |
32 | 28 | ||
29 | #include <mach/camera.h> | ||
30 | #include <mach/hardware.h> | ||
31 | |||
32 | #include "common.h" | ||
33 | #include "clock.h" | 33 | #include "clock.h" |
34 | 34 | ||
35 | /*-------------------------------------------------------------------------*/ | 35 | /*-------------------------------------------------------------------------*/ |
diff --git a/arch/arm/mach-omap1/dma.c b/arch/arm/mach-omap1/dma.c index f5a52204b89f..3ef7d52316b4 100644 --- a/arch/arm/mach-omap1/dma.c +++ b/arch/arm/mach-omap1/dma.c | |||
@@ -19,11 +19,11 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/err.h> | 21 | #include <linux/err.h> |
22 | #include <linux/io.h> | ||
23 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
24 | #include <linux/module.h> | 23 | #include <linux/module.h> |
25 | #include <linux/init.h> | 24 | #include <linux/init.h> |
26 | #include <linux/device.h> | 25 | #include <linux/device.h> |
26 | #include <linux/io.h> | ||
27 | 27 | ||
28 | #include <plat/dma.h> | 28 | #include <plat/dma.h> |
29 | #include <plat/tc.h> | 29 | #include <plat/tc.h> |
diff --git a/arch/arm/mach-omap1/flash.c b/arch/arm/mach-omap1/flash.c index 1749cb37dda0..f9bf78d4fdfb 100644 --- a/arch/arm/mach-omap1/flash.c +++ b/arch/arm/mach-omap1/flash.c | |||
@@ -6,13 +6,15 @@ | |||
6 | * published by the Free Software Foundation. | 6 | * published by the Free Software Foundation. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/io.h> | ||
9 | #include <linux/mtd/mtd.h> | 10 | #include <linux/mtd/mtd.h> |
10 | #include <linux/mtd/map.h> | 11 | #include <linux/mtd/map.h> |
11 | 12 | ||
12 | #include <plat/io.h> | ||
13 | #include <plat/tc.h> | 13 | #include <plat/tc.h> |
14 | #include <plat/flash.h> | 14 | #include <plat/flash.h> |
15 | 15 | ||
16 | #include <mach/hardware.h> | ||
17 | |||
16 | void omap1_set_vpp(struct platform_device *pdev, int enable) | 18 | void omap1_set_vpp(struct platform_device *pdev, int enable) |
17 | { | 19 | { |
18 | static int count; | 20 | static int count; |
diff --git a/arch/arm/mach-omap1/fpga.c b/arch/arm/mach-omap1/fpga.c index 0a17a1a7e00d..76c67b3f9f61 100644 --- a/arch/arm/mach-omap1/fpga.c +++ b/arch/arm/mach-omap1/fpga.c | |||
@@ -24,12 +24,15 @@ | |||
24 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
25 | #include <linux/io.h> | 25 | #include <linux/io.h> |
26 | 26 | ||
27 | #include <mach/hardware.h> | ||
28 | #include <asm/irq.h> | 27 | #include <asm/irq.h> |
29 | #include <asm/mach/irq.h> | 28 | #include <asm/mach/irq.h> |
30 | 29 | ||
31 | #include <plat/fpga.h> | 30 | #include <plat/fpga.h> |
32 | 31 | ||
32 | #include <mach/hardware.h> | ||
33 | |||
34 | #include "iomap.h" | ||
35 | |||
33 | static void fpga_mask_irq(struct irq_data *d) | 36 | static void fpga_mask_irq(struct irq_data *d) |
34 | { | 37 | { |
35 | unsigned int irq = d->irq - OMAP_FPGA_IRQ_BASE; | 38 | unsigned int irq = d->irq - OMAP_FPGA_IRQ_BASE; |
diff --git a/arch/arm/mach-omap1/gpio15xx.c b/arch/arm/mach-omap1/gpio15xx.c index 399da4ce017b..634903ef8292 100644 --- a/arch/arm/mach-omap1/gpio15xx.c +++ b/arch/arm/mach-omap1/gpio15xx.c | |||
@@ -42,11 +42,12 @@ static struct omap_gpio_reg_offs omap15xx_mpuio_regs = { | |||
42 | .irqstatus = OMAP_MPUIO_GPIO_INT, | 42 | .irqstatus = OMAP_MPUIO_GPIO_INT, |
43 | .irqenable = OMAP_MPUIO_GPIO_MASKIT, | 43 | .irqenable = OMAP_MPUIO_GPIO_MASKIT, |
44 | .irqenable_inv = true, | 44 | .irqenable_inv = true, |
45 | .irqctrl = OMAP_MPUIO_GPIO_INT_EDGE, | ||
45 | }; | 46 | }; |
46 | 47 | ||
47 | static struct __initdata omap_gpio_platform_data omap15xx_mpu_gpio_config = { | 48 | static struct __initdata omap_gpio_platform_data omap15xx_mpu_gpio_config = { |
48 | .virtual_irq_start = IH_MPUIO_BASE, | 49 | .virtual_irq_start = IH_MPUIO_BASE, |
49 | .bank_type = METHOD_MPUIO, | 50 | .is_mpuio = true, |
50 | .bank_width = 16, | 51 | .bank_width = 16, |
51 | .bank_stride = 1, | 52 | .bank_stride = 1, |
52 | .regs = &omap15xx_mpuio_regs, | 53 | .regs = &omap15xx_mpuio_regs, |
@@ -83,11 +84,12 @@ static struct omap_gpio_reg_offs omap15xx_gpio_regs = { | |||
83 | .irqstatus = OMAP1510_GPIO_INT_STATUS, | 84 | .irqstatus = OMAP1510_GPIO_INT_STATUS, |
84 | .irqenable = OMAP1510_GPIO_INT_MASK, | 85 | .irqenable = OMAP1510_GPIO_INT_MASK, |
85 | .irqenable_inv = true, | 86 | .irqenable_inv = true, |
87 | .irqctrl = OMAP1510_GPIO_INT_CONTROL, | ||
88 | .pinctrl = OMAP1510_GPIO_PIN_CONTROL, | ||
86 | }; | 89 | }; |
87 | 90 | ||
88 | static struct __initdata omap_gpio_platform_data omap15xx_gpio_config = { | 91 | static struct __initdata omap_gpio_platform_data omap15xx_gpio_config = { |
89 | .virtual_irq_start = IH_GPIO_BASE, | 92 | .virtual_irq_start = IH_GPIO_BASE, |
90 | .bank_type = METHOD_GPIO_1510, | ||
91 | .bank_width = 16, | 93 | .bank_width = 16, |
92 | .regs = &omap15xx_gpio_regs, | 94 | .regs = &omap15xx_gpio_regs, |
93 | }; | 95 | }; |
@@ -115,7 +117,6 @@ static int __init omap15xx_gpio_init(void) | |||
115 | platform_device_register(&omap15xx_mpu_gpio); | 117 | platform_device_register(&omap15xx_mpu_gpio); |
116 | platform_device_register(&omap15xx_gpio); | 118 | platform_device_register(&omap15xx_gpio); |
117 | 119 | ||
118 | gpio_bank_count = 2; | ||
119 | return 0; | 120 | return 0; |
120 | } | 121 | } |
121 | postcore_initcall(omap15xx_gpio_init); | 122 | postcore_initcall(omap15xx_gpio_init); |
diff --git a/arch/arm/mach-omap1/gpio16xx.c b/arch/arm/mach-omap1/gpio16xx.c index 0f399bd0e70e..1fb3b9ad496e 100644 --- a/arch/arm/mach-omap1/gpio16xx.c +++ b/arch/arm/mach-omap1/gpio16xx.c | |||
@@ -24,6 +24,9 @@ | |||
24 | #define OMAP1610_GPIO4_BASE 0xfffbbc00 | 24 | #define OMAP1610_GPIO4_BASE 0xfffbbc00 |
25 | #define OMAP1_MPUIO_VBASE OMAP1_MPUIO_BASE | 25 | #define OMAP1_MPUIO_VBASE OMAP1_MPUIO_BASE |
26 | 26 | ||
27 | /* smart idle, enable wakeup */ | ||
28 | #define SYSCONFIG_WORD 0x14 | ||
29 | |||
27 | /* mpu gpio */ | 30 | /* mpu gpio */ |
28 | static struct __initdata resource omap16xx_mpu_gpio_resources[] = { | 31 | static struct __initdata resource omap16xx_mpu_gpio_resources[] = { |
29 | { | 32 | { |
@@ -45,11 +48,12 @@ static struct omap_gpio_reg_offs omap16xx_mpuio_regs = { | |||
45 | .irqstatus = OMAP_MPUIO_GPIO_INT, | 48 | .irqstatus = OMAP_MPUIO_GPIO_INT, |
46 | .irqenable = OMAP_MPUIO_GPIO_MASKIT, | 49 | .irqenable = OMAP_MPUIO_GPIO_MASKIT, |
47 | .irqenable_inv = true, | 50 | .irqenable_inv = true, |
51 | .irqctrl = OMAP_MPUIO_GPIO_INT_EDGE, | ||
48 | }; | 52 | }; |
49 | 53 | ||
50 | static struct __initdata omap_gpio_platform_data omap16xx_mpu_gpio_config = { | 54 | static struct __initdata omap_gpio_platform_data omap16xx_mpu_gpio_config = { |
51 | .virtual_irq_start = IH_MPUIO_BASE, | 55 | .virtual_irq_start = IH_MPUIO_BASE, |
52 | .bank_type = METHOD_MPUIO, | 56 | .is_mpuio = true, |
53 | .bank_width = 16, | 57 | .bank_width = 16, |
54 | .bank_stride = 1, | 58 | .bank_stride = 1, |
55 | .regs = &omap16xx_mpuio_regs, | 59 | .regs = &omap16xx_mpuio_regs, |
@@ -89,11 +93,13 @@ static struct omap_gpio_reg_offs omap16xx_gpio_regs = { | |||
89 | .irqenable = OMAP1610_GPIO_IRQENABLE1, | 93 | .irqenable = OMAP1610_GPIO_IRQENABLE1, |
90 | .set_irqenable = OMAP1610_GPIO_SET_IRQENABLE1, | 94 | .set_irqenable = OMAP1610_GPIO_SET_IRQENABLE1, |
91 | .clr_irqenable = OMAP1610_GPIO_CLEAR_IRQENABLE1, | 95 | .clr_irqenable = OMAP1610_GPIO_CLEAR_IRQENABLE1, |
96 | .wkup_en = OMAP1610_GPIO_WAKEUPENABLE, | ||
97 | .edgectrl1 = OMAP1610_GPIO_EDGE_CTRL1, | ||
98 | .edgectrl2 = OMAP1610_GPIO_EDGE_CTRL2, | ||
92 | }; | 99 | }; |
93 | 100 | ||
94 | static struct __initdata omap_gpio_platform_data omap16xx_gpio1_config = { | 101 | static struct __initdata omap_gpio_platform_data omap16xx_gpio1_config = { |
95 | .virtual_irq_start = IH_GPIO_BASE, | 102 | .virtual_irq_start = IH_GPIO_BASE, |
96 | .bank_type = METHOD_GPIO_1610, | ||
97 | .bank_width = 16, | 103 | .bank_width = 16, |
98 | .regs = &omap16xx_gpio_regs, | 104 | .regs = &omap16xx_gpio_regs, |
99 | }; | 105 | }; |
@@ -123,7 +129,6 @@ static struct __initdata resource omap16xx_gpio2_resources[] = { | |||
123 | 129 | ||
124 | static struct __initdata omap_gpio_platform_data omap16xx_gpio2_config = { | 130 | static struct __initdata omap_gpio_platform_data omap16xx_gpio2_config = { |
125 | .virtual_irq_start = IH_GPIO_BASE + 16, | 131 | .virtual_irq_start = IH_GPIO_BASE + 16, |
126 | .bank_type = METHOD_GPIO_1610, | ||
127 | .bank_width = 16, | 132 | .bank_width = 16, |
128 | .regs = &omap16xx_gpio_regs, | 133 | .regs = &omap16xx_gpio_regs, |
129 | }; | 134 | }; |
@@ -153,7 +158,6 @@ static struct __initdata resource omap16xx_gpio3_resources[] = { | |||
153 | 158 | ||
154 | static struct __initdata omap_gpio_platform_data omap16xx_gpio3_config = { | 159 | static struct __initdata omap_gpio_platform_data omap16xx_gpio3_config = { |
155 | .virtual_irq_start = IH_GPIO_BASE + 32, | 160 | .virtual_irq_start = IH_GPIO_BASE + 32, |
156 | .bank_type = METHOD_GPIO_1610, | ||
157 | .bank_width = 16, | 161 | .bank_width = 16, |
158 | .regs = &omap16xx_gpio_regs, | 162 | .regs = &omap16xx_gpio_regs, |
159 | }; | 163 | }; |
@@ -183,7 +187,6 @@ static struct __initdata resource omap16xx_gpio4_resources[] = { | |||
183 | 187 | ||
184 | static struct __initdata omap_gpio_platform_data omap16xx_gpio4_config = { | 188 | static struct __initdata omap_gpio_platform_data omap16xx_gpio4_config = { |
185 | .virtual_irq_start = IH_GPIO_BASE + 48, | 189 | .virtual_irq_start = IH_GPIO_BASE + 48, |
186 | .bank_type = METHOD_GPIO_1610, | ||
187 | .bank_width = 16, | 190 | .bank_width = 16, |
188 | .regs = &omap16xx_gpio_regs, | 191 | .regs = &omap16xx_gpio_regs, |
189 | }; | 192 | }; |
@@ -214,14 +217,42 @@ static struct __initdata platform_device * omap16xx_gpio_dev[] = { | |||
214 | static int __init omap16xx_gpio_init(void) | 217 | static int __init omap16xx_gpio_init(void) |
215 | { | 218 | { |
216 | int i; | 219 | int i; |
220 | void __iomem *base; | ||
221 | struct resource *res; | ||
222 | struct platform_device *pdev; | ||
223 | struct omap_gpio_platform_data *pdata; | ||
217 | 224 | ||
218 | if (!cpu_is_omap16xx()) | 225 | if (!cpu_is_omap16xx()) |
219 | return -EINVAL; | 226 | return -EINVAL; |
220 | 227 | ||
221 | for (i = 0; i < ARRAY_SIZE(omap16xx_gpio_dev); i++) | 228 | /* |
222 | platform_device_register(omap16xx_gpio_dev[i]); | 229 | * Enable system clock for GPIO module. |
230 | * The CAM_CLK_CTRL *is* really the right place. | ||
231 | */ | ||
232 | omap_writel(omap_readl(ULPD_CAM_CLK_CTRL) | 0x04, | ||
233 | ULPD_CAM_CLK_CTRL); | ||
234 | |||
235 | for (i = 0; i < ARRAY_SIZE(omap16xx_gpio_dev); i++) { | ||
236 | pdev = omap16xx_gpio_dev[i]; | ||
237 | pdata = pdev->dev.platform_data; | ||
238 | |||
239 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
240 | if (unlikely(!res)) { | ||
241 | dev_err(&pdev->dev, "Invalid mem resource.\n"); | ||
242 | return -ENODEV; | ||
243 | } | ||
223 | 244 | ||
224 | gpio_bank_count = ARRAY_SIZE(omap16xx_gpio_dev); | 245 | base = ioremap(res->start, resource_size(res)); |
246 | if (unlikely(!base)) { | ||
247 | dev_err(&pdev->dev, "ioremap failed.\n"); | ||
248 | return -ENOMEM; | ||
249 | } | ||
250 | |||
251 | __raw_writel(SYSCONFIG_WORD, base + OMAP1610_GPIO_SYSCONFIG); | ||
252 | iounmap(base); | ||
253 | |||
254 | platform_device_register(omap16xx_gpio_dev[i]); | ||
255 | } | ||
225 | 256 | ||
226 | return 0; | 257 | return 0; |
227 | } | 258 | } |
diff --git a/arch/arm/mach-omap1/gpio7xx.c b/arch/arm/mach-omap1/gpio7xx.c index 5ab63eab0ff5..4771d6b68b96 100644 --- a/arch/arm/mach-omap1/gpio7xx.c +++ b/arch/arm/mach-omap1/gpio7xx.c | |||
@@ -47,12 +47,13 @@ static struct omap_gpio_reg_offs omap7xx_mpuio_regs = { | |||
47 | .irqstatus = OMAP_MPUIO_GPIO_INT / 2, | 47 | .irqstatus = OMAP_MPUIO_GPIO_INT / 2, |
48 | .irqenable = OMAP_MPUIO_GPIO_MASKIT / 2, | 48 | .irqenable = OMAP_MPUIO_GPIO_MASKIT / 2, |
49 | .irqenable_inv = true, | 49 | .irqenable_inv = true, |
50 | .irqctrl = OMAP_MPUIO_GPIO_INT_EDGE >> 1, | ||
50 | }; | 51 | }; |
51 | 52 | ||
52 | static struct __initdata omap_gpio_platform_data omap7xx_mpu_gpio_config = { | 53 | static struct __initdata omap_gpio_platform_data omap7xx_mpu_gpio_config = { |
53 | .virtual_irq_start = IH_MPUIO_BASE, | 54 | .virtual_irq_start = IH_MPUIO_BASE, |
54 | .bank_type = METHOD_MPUIO, | 55 | .is_mpuio = true, |
55 | .bank_width = 32, | 56 | .bank_width = 16, |
56 | .bank_stride = 2, | 57 | .bank_stride = 2, |
57 | .regs = &omap7xx_mpuio_regs, | 58 | .regs = &omap7xx_mpuio_regs, |
58 | }; | 59 | }; |
@@ -88,11 +89,11 @@ static struct omap_gpio_reg_offs omap7xx_gpio_regs = { | |||
88 | .irqstatus = OMAP7XX_GPIO_INT_STATUS, | 89 | .irqstatus = OMAP7XX_GPIO_INT_STATUS, |
89 | .irqenable = OMAP7XX_GPIO_INT_MASK, | 90 | .irqenable = OMAP7XX_GPIO_INT_MASK, |
90 | .irqenable_inv = true, | 91 | .irqenable_inv = true, |
92 | .irqctrl = OMAP7XX_GPIO_INT_CONTROL, | ||
91 | }; | 93 | }; |
92 | 94 | ||
93 | static struct __initdata omap_gpio_platform_data omap7xx_gpio1_config = { | 95 | static struct __initdata omap_gpio_platform_data omap7xx_gpio1_config = { |
94 | .virtual_irq_start = IH_GPIO_BASE, | 96 | .virtual_irq_start = IH_GPIO_BASE, |
95 | .bank_type = METHOD_GPIO_7XX, | ||
96 | .bank_width = 32, | 97 | .bank_width = 32, |
97 | .regs = &omap7xx_gpio_regs, | 98 | .regs = &omap7xx_gpio_regs, |
98 | }; | 99 | }; |
@@ -122,7 +123,6 @@ static struct __initdata resource omap7xx_gpio2_resources[] = { | |||
122 | 123 | ||
123 | static struct __initdata omap_gpio_platform_data omap7xx_gpio2_config = { | 124 | static struct __initdata omap_gpio_platform_data omap7xx_gpio2_config = { |
124 | .virtual_irq_start = IH_GPIO_BASE + 32, | 125 | .virtual_irq_start = IH_GPIO_BASE + 32, |
125 | .bank_type = METHOD_GPIO_7XX, | ||
126 | .bank_width = 32, | 126 | .bank_width = 32, |
127 | .regs = &omap7xx_gpio_regs, | 127 | .regs = &omap7xx_gpio_regs, |
128 | }; | 128 | }; |
@@ -152,7 +152,6 @@ static struct __initdata resource omap7xx_gpio3_resources[] = { | |||
152 | 152 | ||
153 | static struct __initdata omap_gpio_platform_data omap7xx_gpio3_config = { | 153 | static struct __initdata omap_gpio_platform_data omap7xx_gpio3_config = { |
154 | .virtual_irq_start = IH_GPIO_BASE + 64, | 154 | .virtual_irq_start = IH_GPIO_BASE + 64, |
155 | .bank_type = METHOD_GPIO_7XX, | ||
156 | .bank_width = 32, | 155 | .bank_width = 32, |
157 | .regs = &omap7xx_gpio_regs, | 156 | .regs = &omap7xx_gpio_regs, |
158 | }; | 157 | }; |
@@ -182,7 +181,6 @@ static struct __initdata resource omap7xx_gpio4_resources[] = { | |||
182 | 181 | ||
183 | static struct __initdata omap_gpio_platform_data omap7xx_gpio4_config = { | 182 | static struct __initdata omap_gpio_platform_data omap7xx_gpio4_config = { |
184 | .virtual_irq_start = IH_GPIO_BASE + 96, | 183 | .virtual_irq_start = IH_GPIO_BASE + 96, |
185 | .bank_type = METHOD_GPIO_7XX, | ||
186 | .bank_width = 32, | 184 | .bank_width = 32, |
187 | .regs = &omap7xx_gpio_regs, | 185 | .regs = &omap7xx_gpio_regs, |
188 | }; | 186 | }; |
@@ -212,7 +210,6 @@ static struct __initdata resource omap7xx_gpio5_resources[] = { | |||
212 | 210 | ||
213 | static struct __initdata omap_gpio_platform_data omap7xx_gpio5_config = { | 211 | static struct __initdata omap_gpio_platform_data omap7xx_gpio5_config = { |
214 | .virtual_irq_start = IH_GPIO_BASE + 128, | 212 | .virtual_irq_start = IH_GPIO_BASE + 128, |
215 | .bank_type = METHOD_GPIO_7XX, | ||
216 | .bank_width = 32, | 213 | .bank_width = 32, |
217 | .regs = &omap7xx_gpio_regs, | 214 | .regs = &omap7xx_gpio_regs, |
218 | }; | 215 | }; |
@@ -242,7 +239,6 @@ static struct __initdata resource omap7xx_gpio6_resources[] = { | |||
242 | 239 | ||
243 | static struct __initdata omap_gpio_platform_data omap7xx_gpio6_config = { | 240 | static struct __initdata omap_gpio_platform_data omap7xx_gpio6_config = { |
244 | .virtual_irq_start = IH_GPIO_BASE + 160, | 241 | .virtual_irq_start = IH_GPIO_BASE + 160, |
245 | .bank_type = METHOD_GPIO_7XX, | ||
246 | .bank_width = 32, | 242 | .bank_width = 32, |
247 | .regs = &omap7xx_gpio_regs, | 243 | .regs = &omap7xx_gpio_regs, |
248 | }; | 244 | }; |
@@ -282,8 +278,6 @@ static int __init omap7xx_gpio_init(void) | |||
282 | for (i = 0; i < ARRAY_SIZE(omap7xx_gpio_dev); i++) | 278 | for (i = 0; i < ARRAY_SIZE(omap7xx_gpio_dev); i++) |
283 | platform_device_register(omap7xx_gpio_dev[i]); | 279 | platform_device_register(omap7xx_gpio_dev[i]); |
284 | 280 | ||
285 | gpio_bank_count = ARRAY_SIZE(omap7xx_gpio_dev); | ||
286 | |||
287 | return 0; | 281 | return 0; |
288 | } | 282 | } |
289 | postcore_initcall(omap7xx_gpio_init); | 283 | postcore_initcall(omap7xx_gpio_init); |
diff --git a/arch/arm/mach-omap1/id.c b/arch/arm/mach-omap1/id.c index a0e3560b39db..f24c1e2c5044 100644 --- a/arch/arm/mach-omap1/id.c +++ b/arch/arm/mach-omap1/id.c | |||
@@ -15,8 +15,11 @@ | |||
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | |||
18 | #include <plat/cpu.h> | 19 | #include <plat/cpu.h> |
19 | 20 | ||
21 | #include <mach/hardware.h> | ||
22 | |||
20 | #define OMAP_DIE_ID_0 0xfffe1800 | 23 | #define OMAP_DIE_ID_0 0xfffe1800 |
21 | #define OMAP_DIE_ID_1 0xfffe1804 | 24 | #define OMAP_DIE_ID_1 0xfffe1804 |
22 | #define OMAP_PRODUCTION_ID_0 0xfffe2000 | 25 | #define OMAP_PRODUCTION_ID_0 0xfffe2000 |
diff --git a/arch/arm/mach-omap1/include/mach/entry-macro.S b/arch/arm/mach-omap1/include/mach/entry-macro.S index bfb4fb1d7382..fa0f32a686aa 100644 --- a/arch/arm/mach-omap1/include/mach/entry-macro.S +++ b/arch/arm/mach-omap1/include/mach/entry-macro.S | |||
@@ -9,20 +9,16 @@ | |||
9 | * License version 2. This program is licensed "as is" without any | 9 | * License version 2. This program is licensed "as is" without any |
10 | * warranty of any kind, whether express or implied. | 10 | * warranty of any kind, whether express or implied. |
11 | */ | 11 | */ |
12 | |||
12 | #include <mach/hardware.h> | 13 | #include <mach/hardware.h> |
13 | #include <mach/io.h> | 14 | #include <mach/io.h> |
14 | #include <mach/irqs.h> | 15 | #include <mach/irqs.h> |
15 | #include <asm/hardware/gic.h> | ||
16 | 16 | ||
17 | .macro disable_fiq | 17 | #include "../../iomap.h" |
18 | .endm | ||
19 | 18 | ||
20 | .macro get_irqnr_preamble, base, tmp | 19 | .macro get_irqnr_preamble, base, tmp |
21 | .endm | 20 | .endm |
22 | 21 | ||
23 | .macro arch_ret_to_user, tmp1, tmp2 | ||
24 | .endm | ||
25 | |||
26 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 22 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
27 | ldr \base, =OMAP1_IO_ADDRESS(OMAP_IH1_BASE) | 23 | ldr \base, =OMAP1_IO_ADDRESS(OMAP_IH1_BASE) |
28 | ldr \irqnr, [\base, #IRQ_ITR_REG_OFFSET] | 24 | ldr \irqnr, [\base, #IRQ_ITR_REG_OFFSET] |
diff --git a/arch/arm/mach-omap1/include/mach/hardware.h b/arch/arm/mach-omap1/include/mach/hardware.h index a3f6287b2007..01e35fa106b8 100644 --- a/arch/arm/mach-omap1/include/mach/hardware.h +++ b/arch/arm/mach-omap1/include/mach/hardware.h | |||
@@ -2,4 +2,40 @@ | |||
2 | * arch/arm/mach-omap1/include/mach/hardware.h | 2 | * arch/arm/mach-omap1/include/mach/hardware.h |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #ifndef __MACH_HARDWARE_H | ||
6 | #define __MACH_HARDWARE_H | ||
7 | |||
8 | #ifndef __ASSEMBLER__ | ||
9 | /* | ||
10 | * NOTE: Please use ioremap + __raw_read/write where possible instead of these | ||
11 | */ | ||
12 | extern u8 omap_readb(u32 pa); | ||
13 | extern u16 omap_readw(u32 pa); | ||
14 | extern u32 omap_readl(u32 pa); | ||
15 | extern void omap_writeb(u8 v, u32 pa); | ||
16 | extern void omap_writew(u16 v, u32 pa); | ||
17 | extern void omap_writel(u32 v, u32 pa); | ||
18 | |||
19 | #include <plat/tc.h> | ||
20 | |||
21 | /* Almost all documentation for chip and board memory maps assumes | ||
22 | * BM is clear. Most devel boards have a switch to control booting | ||
23 | * from NOR flash (using external chipselect 3) rather than mask ROM, | ||
24 | * which uses BM to interchange the physical CS0 and CS3 addresses. | ||
25 | */ | ||
26 | static inline u32 omap_cs0m_phys(void) | ||
27 | { | ||
28 | return (omap_readl(EMIFS_CONFIG) & OMAP_EMIFS_CONFIG_BM) | ||
29 | ? OMAP_CS3_PHYS : 0; | ||
30 | } | ||
31 | |||
32 | static inline u32 omap_cs3_phys(void) | ||
33 | { | ||
34 | return (omap_readl(EMIFS_CONFIG) & OMAP_EMIFS_CONFIG_BM) | ||
35 | ? 0 : OMAP_CS3_PHYS; | ||
36 | } | ||
37 | |||
38 | #endif | ||
39 | #endif | ||
40 | |||
5 | #include <plat/hardware.h> | 41 | #include <plat/hardware.h> |
diff --git a/arch/arm/mach-omap1/include/mach/io.h b/arch/arm/mach-omap1/include/mach/io.h index 57bdf74a3e64..37b12e1fd022 100644 --- a/arch/arm/mach-omap1/include/mach/io.h +++ b/arch/arm/mach-omap1/include/mach/io.h | |||
@@ -1,5 +1,46 @@ | |||
1 | /* | 1 | /* |
2 | * arch/arm/mach-omap1/include/mach/io.h | 2 | * arch/arm/mach-omap1/include/mach/io.h |
3 | * | ||
4 | * IO definitions for TI OMAP processors and boards | ||
5 | * | ||
6 | * Copied from arch/arm/mach-sa1100/include/mach/io.h | ||
7 | * Copyright (C) 1997-1999 Russell King | ||
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 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | ||
15 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
16 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN | ||
17 | * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF | ||
20 | * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
21 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
24 | * | ||
25 | * You should have received a copy of the GNU General Public License along | ||
26 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
27 | * 675 Mass Ave, Cambridge, MA 02139, USA. | ||
28 | * | ||
29 | * Modifications: | ||
30 | * 06-12-1997 RMK Created. | ||
31 | * 07-04-1999 RMK Major cleanup | ||
3 | */ | 32 | */ |
4 | 33 | ||
5 | #include <plat/io.h> | 34 | #ifndef __ASM_ARM_ARCH_IO_H |
35 | #define __ASM_ARM_ARCH_IO_H | ||
36 | |||
37 | #define IO_SPACE_LIMIT 0xffffffff | ||
38 | |||
39 | /* | ||
40 | * We don't actually have real ISA nor PCI buses, but there is so many | ||
41 | * drivers out there that might just work if we fake them... | ||
42 | */ | ||
43 | #define __io(a) __typesafe_io(a) | ||
44 | #define __mem_pci(a) (a) | ||
45 | |||
46 | #endif | ||
diff --git a/arch/arm/mach-omap1/include/mach/memory.h b/arch/arm/mach-omap1/include/mach/memory.h index c6337645ba8a..901082def9bd 100644 --- a/arch/arm/mach-omap1/include/mach/memory.h +++ b/arch/arm/mach-omap1/include/mach/memory.h | |||
@@ -18,7 +18,8 @@ | |||
18 | * Note that the is_lbus_device() test is not very efficient on 1510 | 18 | * Note that the is_lbus_device() test is not very efficient on 1510 |
19 | * because of the strncmp(). | 19 | * because of the strncmp(). |
20 | */ | 20 | */ |
21 | #ifdef CONFIG_ARCH_OMAP15XX | 21 | #if defined(CONFIG_ARCH_OMAP15XX) && !defined(__ASSEMBLER__) |
22 | #include <plat/cpu.h> | ||
22 | 23 | ||
23 | /* | 24 | /* |
24 | * OMAP-1510 Local Bus address offset | 25 | * OMAP-1510 Local Bus address offset |
diff --git a/arch/arm/mach-omap1/io.c b/arch/arm/mach-omap1/io.c index 8e55b6fb3478..56fb444a5f11 100644 --- a/arch/arm/mach-omap1/io.c +++ b/arch/arm/mach-omap1/io.c | |||
@@ -15,9 +15,12 @@ | |||
15 | 15 | ||
16 | #include <asm/tlb.h> | 16 | #include <asm/tlb.h> |
17 | #include <asm/mach/map.h> | 17 | #include <asm/mach/map.h> |
18 | |||
18 | #include <plat/mux.h> | 19 | #include <plat/mux.h> |
19 | #include <plat/tc.h> | 20 | #include <plat/tc.h> |
20 | 21 | ||
22 | #include "iomap.h" | ||
23 | #include "common.h" | ||
21 | #include "clock.h" | 24 | #include "clock.h" |
22 | 25 | ||
23 | extern void omap_check_revision(void); | 26 | extern void omap_check_revision(void); |
diff --git a/arch/arm/mach-omap1/iomap.h b/arch/arm/mach-omap1/iomap.h new file mode 100644 index 000000000000..d68175761c3d --- /dev/null +++ b/arch/arm/mach-omap1/iomap.h | |||
@@ -0,0 +1,42 @@ | |||
1 | /* | ||
2 | * IO mappings for OMAP1 | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms of the GNU General Public License as published by the | ||
6 | * Free Software Foundation; either version 2 of the License, or (at your | ||
7 | * option) any later version. | ||
8 | * | ||
9 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | ||
10 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
11 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN | ||
12 | * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
13 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
14 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF | ||
15 | * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
16 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
17 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
18 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
19 | * | ||
20 | * You should have received a copy of the GNU General Public License along | ||
21 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
22 | * 675 Mass Ave, Cambridge, MA 02139, USA. | ||
23 | */ | ||
24 | |||
25 | #ifdef __ASSEMBLER__ | ||
26 | #define IOMEM(x) (x) | ||
27 | #else | ||
28 | #define IOMEM(x) ((void __force __iomem *)(x)) | ||
29 | #endif | ||
30 | |||
31 | #define OMAP1_IO_OFFSET 0x01000000 /* Virtual IO = 0xfefb0000 */ | ||
32 | #define OMAP1_IO_ADDRESS(pa) IOMEM((pa) - OMAP1_IO_OFFSET) | ||
33 | |||
34 | /* | ||
35 | * ---------------------------------------------------------------------------- | ||
36 | * Omap1 specific IO mapping | ||
37 | * ---------------------------------------------------------------------------- | ||
38 | */ | ||
39 | |||
40 | #define OMAP1_IO_PHYS 0xFFFB0000 | ||
41 | #define OMAP1_IO_SIZE 0x40000 | ||
42 | #define OMAP1_IO_VIRT (OMAP1_IO_PHYS - OMAP1_IO_OFFSET) | ||
diff --git a/arch/arm/mach-omap1/irq.c b/arch/arm/mach-omap1/irq.c index e5b104b7fce6..4448114fab72 100644 --- a/arch/arm/mach-omap1/irq.c +++ b/arch/arm/mach-omap1/irq.c | |||
@@ -42,11 +42,13 @@ | |||
42 | #include <linux/interrupt.h> | 42 | #include <linux/interrupt.h> |
43 | #include <linux/io.h> | 43 | #include <linux/io.h> |
44 | 44 | ||
45 | #include <mach/hardware.h> | ||
46 | #include <asm/irq.h> | 45 | #include <asm/irq.h> |
47 | #include <asm/mach/irq.h> | 46 | #include <asm/mach/irq.h> |
47 | |||
48 | #include <plat/cpu.h> | 48 | #include <plat/cpu.h> |
49 | 49 | ||
50 | #include <mach/hardware.h> | ||
51 | |||
50 | #define IRQ_BANK(irq) ((irq) >> 5) | 52 | #define IRQ_BANK(irq) ((irq) >> 5) |
51 | #define IRQ_BIT(irq) ((irq) & 0x1f) | 53 | #define IRQ_BIT(irq) ((irq) & 0x1f) |
52 | 54 | ||
diff --git a/arch/arm/mach-omap1/lcd_dma.c b/arch/arm/mach-omap1/lcd_dma.c index 453809359ba6..123a0df63d48 100644 --- a/arch/arm/mach-omap1/lcd_dma.c +++ b/arch/arm/mach-omap1/lcd_dma.c | |||
@@ -27,9 +27,10 @@ | |||
27 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
28 | #include <linux/io.h> | 28 | #include <linux/io.h> |
29 | 29 | ||
30 | #include <plat/dma.h> | ||
31 | |||
30 | #include <mach/hardware.h> | 32 | #include <mach/hardware.h> |
31 | #include <mach/lcdc.h> | 33 | #include <mach/lcdc.h> |
32 | #include <plat/dma.h> | ||
33 | 34 | ||
34 | int omap_lcd_dma_running(void) | 35 | int omap_lcd_dma_running(void) |
35 | { | 36 | { |
diff --git a/arch/arm/mach-omap1/mcbsp.c b/arch/arm/mach-omap1/mcbsp.c index 91f9abbd3250..3082d60af082 100644 --- a/arch/arm/mach-omap1/mcbsp.c +++ b/arch/arm/mach-omap1/mcbsp.c | |||
@@ -19,12 +19,15 @@ | |||
19 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
20 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
21 | 21 | ||
22 | #include <mach/irqs.h> | ||
23 | #include <plat/dma.h> | 22 | #include <plat/dma.h> |
24 | #include <plat/mux.h> | 23 | #include <plat/mux.h> |
25 | #include <plat/cpu.h> | 24 | #include <plat/cpu.h> |
26 | #include <plat/mcbsp.h> | 25 | #include <plat/mcbsp.h> |
27 | 26 | ||
27 | #include <mach/irqs.h> | ||
28 | |||
29 | #include "iomap.h" | ||
30 | |||
28 | #define DPS_RSTCT2_PER_EN (1 << 0) | 31 | #define DPS_RSTCT2_PER_EN (1 << 0) |
29 | #define DSP_RSTCT2_WD_PER_EN (1 << 1) | 32 | #define DSP_RSTCT2_WD_PER_EN (1 << 1) |
30 | 33 | ||
diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c index 0c2c3669d594..306beaca14c5 100644 --- a/arch/arm/mach-omap1/pm.c +++ b/arch/arm/mach-omap1/pm.c | |||
@@ -49,7 +49,6 @@ | |||
49 | #include <asm/mach/irq.h> | 49 | #include <asm/mach/irq.h> |
50 | 50 | ||
51 | #include <plat/cpu.h> | 51 | #include <plat/cpu.h> |
52 | #include <mach/irqs.h> | ||
53 | #include <plat/clock.h> | 52 | #include <plat/clock.h> |
54 | #include <plat/sram.h> | 53 | #include <plat/sram.h> |
55 | #include <plat/tc.h> | 54 | #include <plat/tc.h> |
@@ -57,6 +56,9 @@ | |||
57 | #include <plat/dma.h> | 56 | #include <plat/dma.h> |
58 | #include <plat/dmtimer.h> | 57 | #include <plat/dmtimer.h> |
59 | 58 | ||
59 | #include <mach/irqs.h> | ||
60 | |||
61 | #include "iomap.h" | ||
60 | #include "pm.h" | 62 | #include "pm.h" |
61 | 63 | ||
62 | static unsigned int arm_sleep_save[ARM_SLEEP_SAVE_SIZE]; | 64 | static unsigned int arm_sleep_save[ARM_SLEEP_SAVE_SIZE]; |
diff --git a/arch/arm/mach-omap1/reset.c b/arch/arm/mach-omap1/reset.c index 91d199b64979..f255b153b863 100644 --- a/arch/arm/mach-omap1/reset.c +++ b/arch/arm/mach-omap1/reset.c | |||
@@ -4,9 +4,10 @@ | |||
4 | #include <linux/kernel.h> | 4 | #include <linux/kernel.h> |
5 | #include <linux/io.h> | 5 | #include <linux/io.h> |
6 | 6 | ||
7 | #include <mach/hardware.h> | ||
8 | #include <plat/prcm.h> | 7 | #include <plat/prcm.h> |
9 | 8 | ||
9 | #include <mach/hardware.h> | ||
10 | |||
10 | void omap1_restart(char mode, const char *cmd) | 11 | void omap1_restart(char mode, const char *cmd) |
11 | { | 12 | { |
12 | /* | 13 | /* |
diff --git a/arch/arm/mach-omap1/sleep.S b/arch/arm/mach-omap1/sleep.S index c875bdc902c5..0779db150da7 100644 --- a/arch/arm/mach-omap1/sleep.S +++ b/arch/arm/mach-omap1/sleep.S | |||
@@ -33,8 +33,12 @@ | |||
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include <linux/linkage.h> | 35 | #include <linux/linkage.h> |
36 | |||
36 | #include <asm/assembler.h> | 37 | #include <asm/assembler.h> |
38 | |||
37 | #include <mach/io.h> | 39 | #include <mach/io.h> |
40 | |||
41 | #include "iomap.h" | ||
38 | #include "pm.h" | 42 | #include "pm.h" |
39 | 43 | ||
40 | .text | 44 | .text |
diff --git a/arch/arm/mach-omap1/sram.S b/arch/arm/mach-omap1/sram.S index 692587d07ea5..2ce0b9ab20e5 100644 --- a/arch/arm/mach-omap1/sram.S +++ b/arch/arm/mach-omap1/sram.S | |||
@@ -9,10 +9,14 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/linkage.h> | 11 | #include <linux/linkage.h> |
12 | |||
12 | #include <asm/assembler.h> | 13 | #include <asm/assembler.h> |
14 | |||
13 | #include <mach/io.h> | 15 | #include <mach/io.h> |
14 | #include <mach/hardware.h> | 16 | #include <mach/hardware.h> |
15 | 17 | ||
18 | #include "iomap.h" | ||
19 | |||
16 | .text | 20 | .text |
17 | 21 | ||
18 | /* | 22 | /* |
diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c index b8faffa44f9e..2fae6a2740f1 100644 --- a/arch/arm/mach-omap1/time.c +++ b/arch/arm/mach-omap1/time.c | |||
@@ -45,14 +45,15 @@ | |||
45 | #include <linux/io.h> | 45 | #include <linux/io.h> |
46 | 46 | ||
47 | #include <asm/system.h> | 47 | #include <asm/system.h> |
48 | #include <mach/hardware.h> | ||
49 | #include <asm/leds.h> | 48 | #include <asm/leds.h> |
50 | #include <asm/irq.h> | 49 | #include <asm/irq.h> |
51 | #include <asm/sched_clock.h> | 50 | #include <asm/sched_clock.h> |
52 | 51 | ||
52 | #include <mach/hardware.h> | ||
53 | #include <asm/mach/irq.h> | 53 | #include <asm/mach/irq.h> |
54 | #include <asm/mach/time.h> | 54 | #include <asm/mach/time.h> |
55 | 55 | ||
56 | #include "iomap.h" | ||
56 | #include "common.h" | 57 | #include "common.h" |
57 | 58 | ||
58 | #ifdef CONFIG_OMAP_MPU_TIMER | 59 | #ifdef CONFIG_OMAP_MPU_TIMER |
diff --git a/arch/arm/mach-omap1/timer32k.c b/arch/arm/mach-omap1/timer32k.c index 9a54ef4dcf5e..a2e6d0709df2 100644 --- a/arch/arm/mach-omap1/timer32k.c +++ b/arch/arm/mach-omap1/timer32k.c | |||
@@ -47,14 +47,17 @@ | |||
47 | #include <linux/io.h> | 47 | #include <linux/io.h> |
48 | 48 | ||
49 | #include <asm/system.h> | 49 | #include <asm/system.h> |
50 | #include <mach/hardware.h> | ||
51 | #include <asm/leds.h> | 50 | #include <asm/leds.h> |
52 | #include <asm/irq.h> | 51 | #include <asm/irq.h> |
53 | #include <asm/mach/irq.h> | 52 | #include <asm/mach/irq.h> |
54 | #include <asm/mach/time.h> | 53 | #include <asm/mach/time.h> |
55 | #include "common.h" | 54 | |
56 | #include <plat/dmtimer.h> | 55 | #include <plat/dmtimer.h> |
57 | 56 | ||
57 | #include <mach/hardware.h> | ||
58 | |||
59 | #include "common.h" | ||
60 | |||
58 | /* | 61 | /* |
59 | * --------------------------------------------------------------------------- | 62 | * --------------------------------------------------------------------------- |
60 | * 32KHz OS timer | 63 | * 32KHz OS timer |
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 41e6612ecbaf..d965da45160e 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig | |||
@@ -213,13 +213,12 @@ config MACH_OMAP3_PANDORA | |||
213 | depends on ARCH_OMAP3 | 213 | depends on ARCH_OMAP3 |
214 | default y | 214 | default y |
215 | select OMAP_PACKAGE_CBB | 215 | select OMAP_PACKAGE_CBB |
216 | select REGULATOR_FIXED_VOLTAGE | 216 | select REGULATOR_FIXED_VOLTAGE if REGULATOR |
217 | 217 | ||
218 | config MACH_OMAP3_TOUCHBOOK | 218 | config MACH_OMAP3_TOUCHBOOK |
219 | bool "OMAP3 Touch Book" | 219 | bool "OMAP3 Touch Book" |
220 | depends on ARCH_OMAP3 | 220 | depends on ARCH_OMAP3 |
221 | default y | 221 | default y |
222 | select BACKLIGHT_CLASS_DEVICE | ||
223 | 222 | ||
224 | config MACH_OMAP_3430SDP | 223 | config MACH_OMAP_3430SDP |
225 | bool "OMAP 3430 SDP board" | 224 | bool "OMAP 3430 SDP board" |
@@ -265,7 +264,7 @@ config MACH_OMAP_ZOOM2 | |||
265 | select SERIAL_8250 | 264 | select SERIAL_8250 |
266 | select SERIAL_CORE_CONSOLE | 265 | select SERIAL_CORE_CONSOLE |
267 | select SERIAL_8250_CONSOLE | 266 | select SERIAL_8250_CONSOLE |
268 | select REGULATOR_FIXED_VOLTAGE | 267 | select REGULATOR_FIXED_VOLTAGE if REGULATOR |
269 | 268 | ||
270 | config MACH_OMAP_ZOOM3 | 269 | config MACH_OMAP_ZOOM3 |
271 | bool "OMAP3630 Zoom3 board" | 270 | bool "OMAP3630 Zoom3 board" |
@@ -275,7 +274,7 @@ config MACH_OMAP_ZOOM3 | |||
275 | select SERIAL_8250 | 274 | select SERIAL_8250 |
276 | select SERIAL_CORE_CONSOLE | 275 | select SERIAL_CORE_CONSOLE |
277 | select SERIAL_8250_CONSOLE | 276 | select SERIAL_8250_CONSOLE |
278 | select REGULATOR_FIXED_VOLTAGE | 277 | select REGULATOR_FIXED_VOLTAGE if REGULATOR |
279 | 278 | ||
280 | config MACH_CM_T35 | 279 | config MACH_CM_T35 |
281 | bool "CompuLab CM-T35/CM-T3730 modules" | 280 | bool "CompuLab CM-T35/CM-T3730 modules" |
@@ -334,7 +333,7 @@ config MACH_OMAP_4430SDP | |||
334 | depends on ARCH_OMAP4 | 333 | depends on ARCH_OMAP4 |
335 | select OMAP_PACKAGE_CBL | 334 | select OMAP_PACKAGE_CBL |
336 | select OMAP_PACKAGE_CBS | 335 | select OMAP_PACKAGE_CBS |
337 | select REGULATOR_FIXED_VOLTAGE | 336 | select REGULATOR_FIXED_VOLTAGE if REGULATOR |
338 | 337 | ||
339 | config MACH_OMAP4_PANDA | 338 | config MACH_OMAP4_PANDA |
340 | bool "OMAP4 Panda Board" | 339 | bool "OMAP4 Panda Board" |
@@ -342,7 +341,7 @@ config MACH_OMAP4_PANDA | |||
342 | depends on ARCH_OMAP4 | 341 | depends on ARCH_OMAP4 |
343 | select OMAP_PACKAGE_CBL | 342 | select OMAP_PACKAGE_CBL |
344 | select OMAP_PACKAGE_CBS | 343 | select OMAP_PACKAGE_CBS |
345 | select REGULATOR_FIXED_VOLTAGE | 344 | select REGULATOR_FIXED_VOLTAGE if REGULATOR |
346 | 345 | ||
347 | config OMAP3_EMU | 346 | config OMAP3_EMU |
348 | bool "OMAP3 debugging peripherals" | 347 | bool "OMAP3 debugging peripherals" |
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index fc9b238cbc19..bd76394ccaf8 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
@@ -11,9 +11,9 @@ hwmod-common = omap_hwmod.o \ | |||
11 | omap_hwmod_common_data.o | 11 | omap_hwmod_common_data.o |
12 | clock-common = clock.o clock_common_data.o \ | 12 | clock-common = clock.o clock_common_data.o \ |
13 | clkt_dpll.o clkt_clksel.o | 13 | clkt_dpll.o clkt_clksel.o |
14 | secure-common = omap-smc.o omap-secure.o | 14 | secure-common = omap-smc.o omap-secure.o |
15 | 15 | ||
16 | obj-$(CONFIG_ARCH_OMAP2) += $(omap-2-3-common) $(hwmod-common) $(secure-common) | 16 | obj-$(CONFIG_ARCH_OMAP2) += $(omap-2-3-common) $(hwmod-common) |
17 | obj-$(CONFIG_ARCH_OMAP3) += $(omap-2-3-common) $(hwmod-common) $(secure-common) | 17 | obj-$(CONFIG_ARCH_OMAP3) += $(omap-2-3-common) $(hwmod-common) $(secure-common) |
18 | obj-$(CONFIG_ARCH_OMAP4) += prm44xx.o $(hwmod-common) $(secure-common) | 18 | obj-$(CONFIG_ARCH_OMAP4) += prm44xx.o $(hwmod-common) $(secure-common) |
19 | 19 | ||
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 39fba9df17fb..4e9071589bfb 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c | |||
@@ -52,8 +52,9 @@ | |||
52 | #define ETH_KS8851_QUART 138 | 52 | #define ETH_KS8851_QUART 138 |
53 | #define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO 184 | 53 | #define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO 184 |
54 | #define OMAP4_SFH7741_ENABLE_GPIO 188 | 54 | #define OMAP4_SFH7741_ENABLE_GPIO 188 |
55 | #define HDMI_GPIO_HPD 60 /* Hot plug pin for HDMI */ | 55 | #define HDMI_GPIO_CT_CP_HPD 60 /* HPD mode enable/disable */ |
56 | #define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */ | 56 | #define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */ |
57 | #define HDMI_GPIO_HPD 63 /* Hotplug detect */ | ||
57 | #define DISPLAY_SEL_GPIO 59 /* LCD2/PicoDLP switch */ | 58 | #define DISPLAY_SEL_GPIO 59 /* LCD2/PicoDLP switch */ |
58 | #define DLP_POWER_ON_GPIO 40 | 59 | #define DLP_POWER_ON_GPIO 40 |
59 | 60 | ||
@@ -603,8 +604,9 @@ static void __init omap_sfh7741prox_init(void) | |||
603 | } | 604 | } |
604 | 605 | ||
605 | static struct gpio sdp4430_hdmi_gpios[] = { | 606 | static struct gpio sdp4430_hdmi_gpios[] = { |
606 | { HDMI_GPIO_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_hpd" }, | 607 | { HDMI_GPIO_CT_CP_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ct_cp_hpd" }, |
607 | { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" }, | 608 | { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" }, |
609 | { HDMI_GPIO_HPD, GPIOF_DIR_IN, "hdmi_gpio_hpd" }, | ||
608 | }; | 610 | }; |
609 | 611 | ||
610 | static int sdp4430_panel_enable_hdmi(struct omap_dss_device *dssdev) | 612 | static int sdp4430_panel_enable_hdmi(struct omap_dss_device *dssdev) |
@@ -621,8 +623,7 @@ static int sdp4430_panel_enable_hdmi(struct omap_dss_device *dssdev) | |||
621 | 623 | ||
622 | static void sdp4430_panel_disable_hdmi(struct omap_dss_device *dssdev) | 624 | static void sdp4430_panel_disable_hdmi(struct omap_dss_device *dssdev) |
623 | { | 625 | { |
624 | gpio_free(HDMI_GPIO_LS_OE); | 626 | gpio_free_array(sdp4430_hdmi_gpios, ARRAY_SIZE(sdp4430_hdmi_gpios)); |
625 | gpio_free(HDMI_GPIO_HPD); | ||
626 | } | 627 | } |
627 | 628 | ||
628 | static struct nokia_dsi_panel_data dsi1_panel = { | 629 | static struct nokia_dsi_panel_data dsi1_panel = { |
@@ -738,6 +739,10 @@ static void sdp4430_lcd_init(void) | |||
738 | pr_err("%s: Could not get lcd2_reset_gpio\n", __func__); | 739 | pr_err("%s: Could not get lcd2_reset_gpio\n", __func__); |
739 | } | 740 | } |
740 | 741 | ||
742 | static struct omap_dss_hdmi_data sdp4430_hdmi_data = { | ||
743 | .hpd_gpio = HDMI_GPIO_HPD, | ||
744 | }; | ||
745 | |||
741 | static struct omap_dss_device sdp4430_hdmi_device = { | 746 | static struct omap_dss_device sdp4430_hdmi_device = { |
742 | .name = "hdmi", | 747 | .name = "hdmi", |
743 | .driver_name = "hdmi_panel", | 748 | .driver_name = "hdmi_panel", |
@@ -745,6 +750,7 @@ static struct omap_dss_device sdp4430_hdmi_device = { | |||
745 | .platform_enable = sdp4430_panel_enable_hdmi, | 750 | .platform_enable = sdp4430_panel_enable_hdmi, |
746 | .platform_disable = sdp4430_panel_disable_hdmi, | 751 | .platform_disable = sdp4430_panel_disable_hdmi, |
747 | .channel = OMAP_DSS_CHANNEL_DIGIT, | 752 | .channel = OMAP_DSS_CHANNEL_DIGIT, |
753 | .data = &sdp4430_hdmi_data, | ||
748 | }; | 754 | }; |
749 | 755 | ||
750 | static struct picodlp_panel_data sdp4430_picodlp_pdata = { | 756 | static struct picodlp_panel_data sdp4430_picodlp_pdata = { |
@@ -808,7 +814,7 @@ static struct omap_dss_board_info sdp4430_dss_data = { | |||
808 | .default_device = &sdp4430_lcd_device, | 814 | .default_device = &sdp4430_lcd_device, |
809 | }; | 815 | }; |
810 | 816 | ||
811 | static void omap_4430sdp_display_init(void) | 817 | static void __init omap_4430sdp_display_init(void) |
812 | { | 818 | { |
813 | int r; | 819 | int r; |
814 | 820 | ||
@@ -829,6 +835,10 @@ static void omap_4430sdp_display_init(void) | |||
829 | omap_hdmi_init(OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP); | 835 | omap_hdmi_init(OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP); |
830 | else | 836 | else |
831 | omap_hdmi_init(0); | 837 | omap_hdmi_init(0); |
838 | |||
839 | omap_mux_init_gpio(HDMI_GPIO_LS_OE, OMAP_PIN_OUTPUT); | ||
840 | omap_mux_init_gpio(HDMI_GPIO_CT_CP_HPD, OMAP_PIN_OUTPUT); | ||
841 | omap_mux_init_gpio(HDMI_GPIO_HPD, OMAP_PIN_INPUT_PULLDOWN); | ||
832 | } | 842 | } |
833 | 843 | ||
834 | #ifdef CONFIG_OMAP_MUX | 844 | #ifdef CONFIG_OMAP_MUX |
@@ -841,7 +851,7 @@ static struct omap_board_mux board_mux[] __initdata = { | |||
841 | #define board_mux NULL | 851 | #define board_mux NULL |
842 | #endif | 852 | #endif |
843 | 853 | ||
844 | static void omap4_sdp4430_wifi_mux_init(void) | 854 | static void __init omap4_sdp4430_wifi_mux_init(void) |
845 | { | 855 | { |
846 | omap_mux_init_gpio(GPIO_WIFI_IRQ, OMAP_PIN_INPUT | | 856 | omap_mux_init_gpio(GPIO_WIFI_IRQ, OMAP_PIN_INPUT | |
847 | OMAP_PIN_OFF_WAKEUPENABLE); | 857 | OMAP_PIN_OFF_WAKEUPENABLE); |
@@ -868,12 +878,17 @@ static struct wl12xx_platform_data omap4_sdp4430_wlan_data __initdata = { | |||
868 | .board_tcxo_clock = WL12XX_TCXOCLOCK_26, | 878 | .board_tcxo_clock = WL12XX_TCXOCLOCK_26, |
869 | }; | 879 | }; |
870 | 880 | ||
871 | static void omap4_sdp4430_wifi_init(void) | 881 | static void __init omap4_sdp4430_wifi_init(void) |
872 | { | 882 | { |
883 | int ret; | ||
884 | |||
873 | omap4_sdp4430_wifi_mux_init(); | 885 | omap4_sdp4430_wifi_mux_init(); |
874 | if (wl12xx_set_platform_data(&omap4_sdp4430_wlan_data)) | 886 | ret = wl12xx_set_platform_data(&omap4_sdp4430_wlan_data); |
875 | pr_err("Error setting wl12xx data\n"); | 887 | if (ret) |
876 | platform_device_register(&omap_vwlan_device); | 888 | pr_err("Error setting wl12xx data: %d\n", ret); |
889 | ret = platform_device_register(&omap_vwlan_device); | ||
890 | if (ret) | ||
891 | pr_err("Error registering wl12xx device: %d\n", ret); | ||
877 | } | 892 | } |
878 | 893 | ||
879 | static void __init omap_4430sdp_init(void) | 894 | static void __init omap_4430sdp_init(void) |
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index e921e3be24a4..a8cedbeaa952 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c | |||
@@ -280,7 +280,6 @@ static struct omap_dss_board_info cm_t35_dss_data = { | |||
280 | 280 | ||
281 | static struct omap2_mcspi_device_config tdo24m_mcspi_config = { | 281 | static struct omap2_mcspi_device_config tdo24m_mcspi_config = { |
282 | .turbo_mode = 0, | 282 | .turbo_mode = 0, |
283 | .single_channel = 1, /* 0: slave, 1: master */ | ||
284 | }; | 283 | }; |
285 | 284 | ||
286 | static struct tdo24m_platform_data tdo24m_config = { | 285 | static struct tdo24m_platform_data tdo24m_config = { |
@@ -437,7 +436,7 @@ static struct usbhs_omap_board_data usbhs_bdata __initdata = { | |||
437 | .reset_gpio_port[2] = -EINVAL | 436 | .reset_gpio_port[2] = -EINVAL |
438 | }; | 437 | }; |
439 | 438 | ||
440 | static void cm_t35_init_usbh(void) | 439 | static void __init cm_t35_init_usbh(void) |
441 | { | 440 | { |
442 | int err; | 441 | int err; |
443 | 442 | ||
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index d58756060483..ad497620539b 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/i2c/twl.h> | 17 | #include <linux/i2c/twl.h> |
18 | 18 | ||
19 | #include <mach/hardware.h> | 19 | #include <mach/hardware.h> |
20 | #include <asm/hardware/gic.h> | ||
20 | #include <asm/mach/arch.h> | 21 | #include <asm/mach/arch.h> |
21 | 22 | ||
22 | #include <plat/board.h> | 23 | #include <plat/board.h> |
@@ -102,6 +103,7 @@ DT_MACHINE_START(OMAP242X_DT, "Generic OMAP2420 (Flattened Device Tree)") | |||
102 | .map_io = omap242x_map_io, | 103 | .map_io = omap242x_map_io, |
103 | .init_early = omap2420_init_early, | 104 | .init_early = omap2420_init_early, |
104 | .init_irq = omap2_init_irq, | 105 | .init_irq = omap2_init_irq, |
106 | .handle_irq = omap2_intc_handle_irq, | ||
105 | .init_machine = omap_generic_init, | 107 | .init_machine = omap_generic_init, |
106 | .timer = &omap2_timer, | 108 | .timer = &omap2_timer, |
107 | .dt_compat = omap242x_boards_compat, | 109 | .dt_compat = omap242x_boards_compat, |
@@ -141,6 +143,7 @@ DT_MACHINE_START(OMAP3_DT, "Generic OMAP3 (Flattened Device Tree)") | |||
141 | .map_io = omap3_map_io, | 143 | .map_io = omap3_map_io, |
142 | .init_early = omap3430_init_early, | 144 | .init_early = omap3430_init_early, |
143 | .init_irq = omap3_init_irq, | 145 | .init_irq = omap3_init_irq, |
146 | .handle_irq = omap3_intc_handle_irq, | ||
144 | .init_machine = omap3_init, | 147 | .init_machine = omap3_init, |
145 | .timer = &omap3_timer, | 148 | .timer = &omap3_timer, |
146 | .dt_compat = omap3_boards_compat, | 149 | .dt_compat = omap3_boards_compat, |
@@ -160,6 +163,7 @@ DT_MACHINE_START(OMAP4_DT, "Generic OMAP4 (Flattened Device Tree)") | |||
160 | .map_io = omap4_map_io, | 163 | .map_io = omap4_map_io, |
161 | .init_early = omap4430_init_early, | 164 | .init_early = omap4430_init_early, |
162 | .init_irq = gic_init_irq, | 165 | .init_irq = gic_init_irq, |
166 | .handle_irq = gic_handle_irq, | ||
163 | .init_machine = omap4_init, | 167 | .init_machine = omap4_init, |
164 | .timer = &omap4_timer, | 168 | .timer = &omap4_timer, |
165 | .dt_compat = omap4_boards_compat, | 169 | .dt_compat = omap4_boards_compat, |
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c index 42a4d11fad23..a9e983e01199 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c | |||
@@ -137,7 +137,6 @@ static void __init n8x0_usb_init(void) {} | |||
137 | 137 | ||
138 | static struct omap2_mcspi_device_config p54spi_mcspi_config = { | 138 | static struct omap2_mcspi_device_config p54spi_mcspi_config = { |
139 | .turbo_mode = 0, | 139 | .turbo_mode = 0, |
140 | .single_channel = 1, | ||
141 | }; | 140 | }; |
142 | 141 | ||
143 | static struct spi_board_info n800_spi_board_info[] __initdata = { | 142 | static struct spi_board_info n800_spi_board_info[] __initdata = { |
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index 003fe34c9343..c775bead1497 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c | |||
@@ -617,6 +617,21 @@ static struct gpio omap3_evm_ehci_gpios[] __initdata = { | |||
617 | { OMAP3_EVM_EHCI_SELECT, GPIOF_OUT_INIT_LOW, "select EHCI port" }, | 617 | { OMAP3_EVM_EHCI_SELECT, GPIOF_OUT_INIT_LOW, "select EHCI port" }, |
618 | }; | 618 | }; |
619 | 619 | ||
620 | static void __init omap3_evm_wl12xx_init(void) | ||
621 | { | ||
622 | #ifdef CONFIG_WL12XX_PLATFORM_DATA | ||
623 | int ret; | ||
624 | |||
625 | /* WL12xx WLAN Init */ | ||
626 | ret = wl12xx_set_platform_data(&omap3evm_wlan_data); | ||
627 | if (ret) | ||
628 | pr_err("error setting wl12xx data: %d\n", ret); | ||
629 | ret = platform_device_register(&omap3evm_wlan_regulator); | ||
630 | if (ret) | ||
631 | pr_err("error registering wl12xx device: %d\n", ret); | ||
632 | #endif | ||
633 | } | ||
634 | |||
620 | static void __init omap3_evm_init(void) | 635 | static void __init omap3_evm_init(void) |
621 | { | 636 | { |
622 | omap3_evm_get_revision(); | 637 | omap3_evm_get_revision(); |
@@ -665,13 +680,7 @@ static void __init omap3_evm_init(void) | |||
665 | omap_ads7846_init(1, OMAP3_EVM_TS_GPIO, 310, NULL); | 680 | omap_ads7846_init(1, OMAP3_EVM_TS_GPIO, 310, NULL); |
666 | omap3evm_init_smsc911x(); | 681 | omap3evm_init_smsc911x(); |
667 | omap3_evm_display_init(); | 682 | omap3_evm_display_init(); |
668 | 683 | omap3_evm_wl12xx_init(); | |
669 | #ifdef CONFIG_WL12XX_PLATFORM_DATA | ||
670 | /* WL12xx WLAN Init */ | ||
671 | if (wl12xx_set_platform_data(&omap3evm_wlan_data)) | ||
672 | pr_err("error setting wl12xx data\n"); | ||
673 | platform_device_register(&omap3evm_wlan_regulator); | ||
674 | #endif | ||
675 | } | 684 | } |
676 | 685 | ||
677 | MACHINE_START(OMAP3EVM, "OMAP3 EVM") | 686 | MACHINE_START(OMAP3EVM, "OMAP3 EVM") |
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index 30ad40db2cf3..28fc271f7031 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c | |||
@@ -51,8 +51,9 @@ | |||
51 | #define GPIO_HUB_NRESET 62 | 51 | #define GPIO_HUB_NRESET 62 |
52 | #define GPIO_WIFI_PMENA 43 | 52 | #define GPIO_WIFI_PMENA 43 |
53 | #define GPIO_WIFI_IRQ 53 | 53 | #define GPIO_WIFI_IRQ 53 |
54 | #define HDMI_GPIO_HPD 60 /* Hot plug pin for HDMI */ | 54 | #define HDMI_GPIO_CT_CP_HPD 60 /* HPD mode enable/disable */ |
55 | #define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */ | 55 | #define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */ |
56 | #define HDMI_GPIO_HPD 63 /* Hotplug detect */ | ||
56 | 57 | ||
57 | /* wl127x BT, FM, GPS connectivity chip */ | 58 | /* wl127x BT, FM, GPS connectivity chip */ |
58 | static int wl1271_gpios[] = {46, -1, -1}; | 59 | static int wl1271_gpios[] = {46, -1, -1}; |
@@ -413,8 +414,9 @@ int __init omap4_panda_dvi_init(void) | |||
413 | } | 414 | } |
414 | 415 | ||
415 | static struct gpio panda_hdmi_gpios[] = { | 416 | static struct gpio panda_hdmi_gpios[] = { |
416 | { HDMI_GPIO_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_hpd" }, | 417 | { 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" }, | 418 | { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" }, |
419 | { HDMI_GPIO_HPD, GPIOF_DIR_IN, "hdmi_gpio_hpd" }, | ||
418 | }; | 420 | }; |
419 | 421 | ||
420 | static int omap4_panda_panel_enable_hdmi(struct omap_dss_device *dssdev) | 422 | static int omap4_panda_panel_enable_hdmi(struct omap_dss_device *dssdev) |
@@ -431,10 +433,13 @@ static int omap4_panda_panel_enable_hdmi(struct omap_dss_device *dssdev) | |||
431 | 433 | ||
432 | static void omap4_panda_panel_disable_hdmi(struct omap_dss_device *dssdev) | 434 | static void omap4_panda_panel_disable_hdmi(struct omap_dss_device *dssdev) |
433 | { | 435 | { |
434 | gpio_free(HDMI_GPIO_LS_OE); | 436 | gpio_free_array(panda_hdmi_gpios, ARRAY_SIZE(panda_hdmi_gpios)); |
435 | gpio_free(HDMI_GPIO_HPD); | ||
436 | } | 437 | } |
437 | 438 | ||
439 | static struct omap_dss_hdmi_data omap4_panda_hdmi_data = { | ||
440 | .hpd_gpio = HDMI_GPIO_HPD, | ||
441 | }; | ||
442 | |||
438 | static struct omap_dss_device omap4_panda_hdmi_device = { | 443 | static struct omap_dss_device omap4_panda_hdmi_device = { |
439 | .name = "hdmi", | 444 | .name = "hdmi", |
440 | .driver_name = "hdmi_panel", | 445 | .driver_name = "hdmi_panel", |
@@ -442,6 +447,7 @@ static struct omap_dss_device omap4_panda_hdmi_device = { | |||
442 | .platform_enable = omap4_panda_panel_enable_hdmi, | 447 | .platform_enable = omap4_panda_panel_enable_hdmi, |
443 | .platform_disable = omap4_panda_panel_disable_hdmi, | 448 | .platform_disable = omap4_panda_panel_disable_hdmi, |
444 | .channel = OMAP_DSS_CHANNEL_DIGIT, | 449 | .channel = OMAP_DSS_CHANNEL_DIGIT, |
450 | .data = &omap4_panda_hdmi_data, | ||
445 | }; | 451 | }; |
446 | 452 | ||
447 | static struct omap_dss_device *omap4_panda_dss_devices[] = { | 453 | static struct omap_dss_device *omap4_panda_dss_devices[] = { |
@@ -473,18 +479,24 @@ void omap4_panda_display_init(void) | |||
473 | omap_hdmi_init(OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP); | 479 | omap_hdmi_init(OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP); |
474 | else | 480 | else |
475 | omap_hdmi_init(0); | 481 | omap_hdmi_init(0); |
482 | |||
483 | omap_mux_init_gpio(HDMI_GPIO_LS_OE, OMAP_PIN_OUTPUT); | ||
484 | omap_mux_init_gpio(HDMI_GPIO_CT_CP_HPD, OMAP_PIN_OUTPUT); | ||
485 | omap_mux_init_gpio(HDMI_GPIO_HPD, OMAP_PIN_INPUT_PULLDOWN); | ||
476 | } | 486 | } |
477 | 487 | ||
478 | static void __init omap4_panda_init(void) | 488 | static void __init omap4_panda_init(void) |
479 | { | 489 | { |
480 | int package = OMAP_PACKAGE_CBS; | 490 | int package = OMAP_PACKAGE_CBS; |
491 | int ret; | ||
481 | 492 | ||
482 | if (omap_rev() == OMAP4430_REV_ES1_0) | 493 | if (omap_rev() == OMAP4430_REV_ES1_0) |
483 | package = OMAP_PACKAGE_CBL; | 494 | package = OMAP_PACKAGE_CBL; |
484 | omap4_mux_init(board_mux, NULL, package); | 495 | omap4_mux_init(board_mux, NULL, package); |
485 | 496 | ||
486 | if (wl12xx_set_platform_data(&omap_panda_wlan_data)) | 497 | ret = wl12xx_set_platform_data(&omap_panda_wlan_data); |
487 | pr_err("error setting wl12xx data\n"); | 498 | if (ret) |
499 | pr_err("error setting wl12xx data: %d\n", ret); | ||
488 | 500 | ||
489 | omap4_panda_i2c_init(); | 501 | omap4_panda_i2c_init(); |
490 | platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices)); | 502 | platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices)); |
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index acb4e77b39ef..0a668916e3c1 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c | |||
@@ -138,17 +138,14 @@ static struct lp5523_platform_data rx51_lp5523_platform_data = { | |||
138 | 138 | ||
139 | static struct omap2_mcspi_device_config wl1251_mcspi_config = { | 139 | static struct omap2_mcspi_device_config wl1251_mcspi_config = { |
140 | .turbo_mode = 0, | 140 | .turbo_mode = 0, |
141 | .single_channel = 1, | ||
142 | }; | 141 | }; |
143 | 142 | ||
144 | static struct omap2_mcspi_device_config mipid_mcspi_config = { | 143 | static struct omap2_mcspi_device_config mipid_mcspi_config = { |
145 | .turbo_mode = 0, | 144 | .turbo_mode = 0, |
146 | .single_channel = 1, | ||
147 | }; | 145 | }; |
148 | 146 | ||
149 | static struct omap2_mcspi_device_config tsc2005_mcspi_config = { | 147 | static struct omap2_mcspi_device_config tsc2005_mcspi_config = { |
150 | .turbo_mode = 0, | 148 | .turbo_mode = 0, |
151 | .single_channel = 1, | ||
152 | }; | 149 | }; |
153 | 150 | ||
154 | static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = { | 151 | static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = { |
diff --git a/arch/arm/mach-omap2/board-zoom-display.c b/arch/arm/mach-omap2/board-zoom-display.c index d4683ba5f721..281829036758 100644 --- a/arch/arm/mach-omap2/board-zoom-display.c +++ b/arch/arm/mach-omap2/board-zoom-display.c | |||
@@ -117,7 +117,6 @@ static struct omap_dss_board_info zoom_dss_data = { | |||
117 | 117 | ||
118 | static struct omap2_mcspi_device_config dss_lcd_mcspi_config = { | 118 | static struct omap2_mcspi_device_config dss_lcd_mcspi_config = { |
119 | .turbo_mode = 1, | 119 | .turbo_mode = 1, |
120 | .single_channel = 1, /* 0: slave, 1: master */ | ||
121 | }; | 120 | }; |
122 | 121 | ||
123 | static struct spi_board_info nec_8048_spi_board_info[] __initdata = { | 122 | static struct spi_board_info nec_8048_spi_board_info[] __initdata = { |
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c index 8d7ce11cfeaf..c126461836ac 100644 --- a/arch/arm/mach-omap2/board-zoom-peripherals.c +++ b/arch/arm/mach-omap2/board-zoom-peripherals.c | |||
@@ -296,8 +296,10 @@ static void enable_board_wakeup_source(void) | |||
296 | 296 | ||
297 | void __init zoom_peripherals_init(void) | 297 | void __init zoom_peripherals_init(void) |
298 | { | 298 | { |
299 | if (wl12xx_set_platform_data(&omap_zoom_wlan_data)) | 299 | int ret = wl12xx_set_platform_data(&omap_zoom_wlan_data); |
300 | pr_err("error setting wl12xx data\n"); | 300 | |
301 | if (ret) | ||
302 | pr_err("error setting wl12xx data: %d\n", ret); | ||
301 | 303 | ||
302 | omap_i2c_init(); | 304 | omap_i2c_init(); |
303 | platform_device_register(&omap_vwlan_device); | 305 | platform_device_register(&omap_vwlan_device); |
diff --git a/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c b/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c index 39f9d5a58d0c..7072e0d651b1 100644 --- a/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c +++ b/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/cpufreq.h> | 33 | #include <linux/cpufreq.h> |
34 | #include <linux/slab.h> | 34 | #include <linux/slab.h> |
35 | 35 | ||
36 | #include <plat/cpu.h> | ||
36 | #include <plat/clock.h> | 37 | #include <plat/clock.h> |
37 | #include <plat/sram.h> | 38 | #include <plat/sram.h> |
38 | #include <plat/sdrc.h> | 39 | #include <plat/sdrc.h> |
diff --git a/arch/arm/mach-omap2/clkt_dpll.c b/arch/arm/mach-omap2/clkt_dpll.c index e069a9be93df..cd7fd0f91149 100644 --- a/arch/arm/mach-omap2/clkt_dpll.c +++ b/arch/arm/mach-omap2/clkt_dpll.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <asm/div64.h> | 22 | #include <asm/div64.h> |
23 | 23 | ||
24 | #include <plat/clock.h> | 24 | #include <plat/clock.h> |
25 | #include <plat/cpu.h> | ||
25 | 26 | ||
26 | #include "clock.h" | 27 | #include "clock.h" |
27 | #include "cm-regbits-24xx.h" | 28 | #include "cm-regbits-24xx.h" |
diff --git a/arch/arm/mach-omap2/clock2420_data.c b/arch/arm/mach-omap2/clock2420_data.c index 61ad3855f10a..bace9308a4db 100644 --- a/arch/arm/mach-omap2/clock2420_data.c +++ b/arch/arm/mach-omap2/clock2420_data.c | |||
@@ -14,11 +14,14 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/io.h> | ||
17 | #include <linux/clk.h> | 18 | #include <linux/clk.h> |
18 | #include <linux/list.h> | 19 | #include <linux/list.h> |
19 | 20 | ||
21 | #include <plat/hardware.h> | ||
20 | #include <plat/clkdev_omap.h> | 22 | #include <plat/clkdev_omap.h> |
21 | 23 | ||
24 | #include "iomap.h" | ||
22 | #include "clock.h" | 25 | #include "clock.h" |
23 | #include "clock2xxx.h" | 26 | #include "clock2xxx.h" |
24 | #include "opp2xxx.h" | 27 | #include "opp2xxx.h" |
diff --git a/arch/arm/mach-omap2/clock2430.c b/arch/arm/mach-omap2/clock2430.c index d87bc9cb2a36..dfda9a3f2cb2 100644 --- a/arch/arm/mach-omap2/clock2430.c +++ b/arch/arm/mach-omap2/clock2430.c | |||
@@ -21,8 +21,10 @@ | |||
21 | #include <linux/clk.h> | 21 | #include <linux/clk.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | 23 | ||
24 | #include <plat/hardware.h> | ||
24 | #include <plat/clock.h> | 25 | #include <plat/clock.h> |
25 | 26 | ||
27 | #include "iomap.h" | ||
26 | #include "clock.h" | 28 | #include "clock.h" |
27 | #include "clock2xxx.h" | 29 | #include "clock2xxx.h" |
28 | #include "cm2xxx_3xxx.h" | 30 | #include "cm2xxx_3xxx.h" |
diff --git a/arch/arm/mach-omap2/clock2430_data.c b/arch/arm/mach-omap2/clock2430_data.c index 0cc12879e7b9..3b4d09a50399 100644 --- a/arch/arm/mach-omap2/clock2430_data.c +++ b/arch/arm/mach-omap2/clock2430_data.c | |||
@@ -17,8 +17,10 @@ | |||
17 | #include <linux/clk.h> | 17 | #include <linux/clk.h> |
18 | #include <linux/list.h> | 18 | #include <linux/list.h> |
19 | 19 | ||
20 | #include <plat/hardware.h> | ||
20 | #include <plat/clkdev_omap.h> | 21 | #include <plat/clkdev_omap.h> |
21 | 22 | ||
23 | #include "iomap.h" | ||
22 | #include "clock.h" | 24 | #include "clock.h" |
23 | #include "clock2xxx.h" | 25 | #include "clock2xxx.h" |
24 | #include "opp2xxx.h" | 26 | #include "opp2xxx.h" |
diff --git a/arch/arm/mach-omap2/clock2xxx.c b/arch/arm/mach-omap2/clock2xxx.c index 80bb0f0e92e6..12500097378d 100644 --- a/arch/arm/mach-omap2/clock2xxx.c +++ b/arch/arm/mach-omap2/clock2xxx.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/clk.h> | 22 | #include <linux/clk.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | 24 | ||
25 | #include <plat/cpu.h> | ||
25 | #include <plat/clock.h> | 26 | #include <plat/clock.h> |
26 | 27 | ||
27 | #include "clock.h" | 28 | #include "clock.h" |
diff --git a/arch/arm/mach-omap2/clock3xxx.c b/arch/arm/mach-omap2/clock3xxx.c index 952c3e01c9eb..794d82702c85 100644 --- a/arch/arm/mach-omap2/clock3xxx.c +++ b/arch/arm/mach-omap2/clock3xxx.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/clk.h> | 21 | #include <linux/clk.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | 23 | ||
24 | #include <plat/hardware.h> | ||
24 | #include <plat/clock.h> | 25 | #include <plat/clock.h> |
25 | 26 | ||
26 | #include "clock.h" | 27 | #include "clock.h" |
diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c index d75e5f6b8a01..981b9f9111a4 100644 --- a/arch/arm/mach-omap2/clock3xxx_data.c +++ b/arch/arm/mach-omap2/clock3xxx_data.c | |||
@@ -20,14 +20,15 @@ | |||
20 | #include <linux/clk.h> | 20 | #include <linux/clk.h> |
21 | #include <linux/list.h> | 21 | #include <linux/list.h> |
22 | 22 | ||
23 | #include <plat/hardware.h> | ||
23 | #include <plat/clkdev_omap.h> | 24 | #include <plat/clkdev_omap.h> |
24 | 25 | ||
26 | #include "iomap.h" | ||
25 | #include "clock.h" | 27 | #include "clock.h" |
26 | #include "clock3xxx.h" | 28 | #include "clock3xxx.h" |
27 | #include "clock34xx.h" | 29 | #include "clock34xx.h" |
28 | #include "clock36xx.h" | 30 | #include "clock36xx.h" |
29 | #include "clock3517.h" | 31 | #include "clock3517.h" |
30 | |||
31 | #include "cm2xxx_3xxx.h" | 32 | #include "cm2xxx_3xxx.h" |
32 | #include "cm-regbits-34xx.h" | 33 | #include "cm-regbits-34xx.h" |
33 | #include "prm2xxx_3xxx.h" | 34 | #include "prm2xxx_3xxx.h" |
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c index 08e86d793a1f..79b98f22f207 100644 --- a/arch/arm/mach-omap2/clock44xx_data.c +++ b/arch/arm/mach-omap2/clock44xx_data.c | |||
@@ -26,8 +26,11 @@ | |||
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/list.h> | 27 | #include <linux/list.h> |
28 | #include <linux/clk.h> | 28 | #include <linux/clk.h> |
29 | |||
30 | #include <plat/hardware.h> | ||
29 | #include <plat/clkdev_omap.h> | 31 | #include <plat/clkdev_omap.h> |
30 | 32 | ||
33 | #include "iomap.h" | ||
31 | #include "clock.h" | 34 | #include "clock.h" |
32 | #include "clock44xx.h" | 35 | #include "clock44xx.h" |
33 | #include "cm1_44xx.h" | 36 | #include "cm1_44xx.h" |
diff --git a/arch/arm/mach-omap2/cm2xxx_3xxx.c b/arch/arm/mach-omap2/cm2xxx_3xxx.c index 04d39cdd2112..389f9f8b570c 100644 --- a/arch/arm/mach-omap2/cm2xxx_3xxx.c +++ b/arch/arm/mach-omap2/cm2xxx_3xxx.c | |||
@@ -18,8 +18,10 @@ | |||
18 | #include <linux/err.h> | 18 | #include <linux/err.h> |
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | 20 | ||
21 | #include "common.h" | 21 | #include <plat/hardware.h> |
22 | 22 | ||
23 | #include "iomap.h" | ||
24 | #include "common.h" | ||
23 | #include "cm.h" | 25 | #include "cm.h" |
24 | #include "cm2xxx_3xxx.h" | 26 | #include "cm2xxx_3xxx.h" |
25 | #include "cm-regbits-24xx.h" | 27 | #include "cm-regbits-24xx.h" |
diff --git a/arch/arm/mach-omap2/cm44xx.c b/arch/arm/mach-omap2/cm44xx.c index 6a836303252c..535d66e2822c 100644 --- a/arch/arm/mach-omap2/cm44xx.c +++ b/arch/arm/mach-omap2/cm44xx.c | |||
@@ -18,8 +18,8 @@ | |||
18 | #include <linux/err.h> | 18 | #include <linux/err.h> |
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | 20 | ||
21 | #include "iomap.h" | ||
21 | #include "common.h" | 22 | #include "common.h" |
22 | |||
23 | #include "cm.h" | 23 | #include "cm.h" |
24 | #include "cm1_44xx.h" | 24 | #include "cm1_44xx.h" |
25 | #include "cm2_44xx.h" | 25 | #include "cm2_44xx.h" |
diff --git a/arch/arm/mach-omap2/cminst44xx.c b/arch/arm/mach-omap2/cminst44xx.c index 6204deaf85b1..bd8810c3753f 100644 --- a/arch/arm/mach-omap2/cminst44xx.c +++ b/arch/arm/mach-omap2/cminst44xx.c | |||
@@ -20,8 +20,8 @@ | |||
20 | #include <linux/err.h> | 20 | #include <linux/err.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | 22 | ||
23 | #include "iomap.h" | ||
23 | #include "common.h" | 24 | #include "common.h" |
24 | |||
25 | #include "cm.h" | 25 | #include "cm.h" |
26 | #include "cm1_44xx.h" | 26 | #include "cm1_44xx.h" |
27 | #include "cm2_44xx.h" | 27 | #include "cm2_44xx.h" |
diff --git a/arch/arm/mach-omap2/common-board-devices.c b/arch/arm/mach-omap2/common-board-devices.c index bcb0c5817167..2d1d775f2c3e 100644 --- a/arch/arm/mach-omap2/common-board-devices.c +++ b/arch/arm/mach-omap2/common-board-devices.c | |||
@@ -33,7 +33,6 @@ | |||
33 | defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) | 33 | defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) |
34 | static struct omap2_mcspi_device_config ads7846_mcspi_config = { | 34 | static struct omap2_mcspi_device_config ads7846_mcspi_config = { |
35 | .turbo_mode = 0, | 35 | .turbo_mode = 0, |
36 | .single_channel = 1, /* 0: slave, 1: master */ | ||
37 | }; | 36 | }; |
38 | 37 | ||
39 | static struct ads7846_platform_data ads7846_config = { | 38 | static struct ads7846_platform_data ads7846_config = { |
diff --git a/arch/arm/mach-omap2/common.c b/arch/arm/mach-omap2/common.c index aaf421178c91..1549c11000d3 100644 --- a/arch/arm/mach-omap2/common.c +++ b/arch/arm/mach-omap2/common.c | |||
@@ -17,12 +17,13 @@ | |||
17 | #include <linux/clk.h> | 17 | #include <linux/clk.h> |
18 | #include <linux/io.h> | 18 | #include <linux/io.h> |
19 | 19 | ||
20 | #include "common.h" | 20 | #include <plat/hardware.h> |
21 | #include <plat/board.h> | 21 | #include <plat/board.h> |
22 | #include <plat/mux.h> | 22 | #include <plat/mux.h> |
23 | |||
24 | #include <plat/clock.h> | 23 | #include <plat/clock.h> |
25 | 24 | ||
25 | #include "iomap.h" | ||
26 | #include "common.h" | ||
26 | #include "sdrc.h" | 27 | #include "sdrc.h" |
27 | #include "control.h" | 28 | #include "control.h" |
28 | 29 | ||
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h index febffde2ff10..f78ec4e6a5c7 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h | |||
@@ -133,6 +133,8 @@ void am33xx_map_io(void); | |||
133 | void omap4_map_io(void); | 133 | void omap4_map_io(void); |
134 | void ti81xx_map_io(void); | 134 | void ti81xx_map_io(void); |
135 | 135 | ||
136 | extern void __init omap_init_consistent_dma_size(void); | ||
137 | |||
136 | /** | 138 | /** |
137 | * omap_test_timeout - busy-loop, testing a condition | 139 | * omap_test_timeout - busy-loop, testing a condition |
138 | * @cond: condition to test until it evaluates to true | 140 | * @cond: condition to test until it evaluates to true |
@@ -235,5 +237,10 @@ static inline u32 omap4_mpuss_read_prev_context_state(void) | |||
235 | return 0; | 237 | return 0; |
236 | } | 238 | } |
237 | #endif | 239 | #endif |
240 | |||
241 | struct omap_sdrc_params; | ||
242 | extern void omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0, | ||
243 | struct omap_sdrc_params *sdrc_cs1); | ||
244 | |||
238 | #endif /* __ASSEMBLER__ */ | 245 | #endif /* __ASSEMBLER__ */ |
239 | #endif /* __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H */ | 246 | #endif /* __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H */ |
diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c index 114c037e433c..08e674bb0417 100644 --- a/arch/arm/mach-omap2/control.c +++ b/arch/arm/mach-omap2/control.c | |||
@@ -15,9 +15,11 @@ | |||
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | 17 | ||
18 | #include "common.h" | 18 | #include <plat/hardware.h> |
19 | #include <plat/sdrc.h> | 19 | #include <plat/sdrc.h> |
20 | 20 | ||
21 | #include "iomap.h" | ||
22 | #include "common.h" | ||
21 | #include "cm-regbits-34xx.h" | 23 | #include "cm-regbits-34xx.h" |
22 | #include "prm-regbits-34xx.h" | 24 | #include "prm-regbits-34xx.h" |
23 | #include "prm2xxx_3xxx.h" | 25 | #include "prm2xxx_3xxx.h" |
diff --git a/arch/arm/mach-omap2/control.h b/arch/arm/mach-omap2/control.h index 0ba68d3764bc..03149de08544 100644 --- a/arch/arm/mach-omap2/control.h +++ b/arch/arm/mach-omap2/control.h | |||
@@ -16,7 +16,6 @@ | |||
16 | #ifndef __ARCH_ARM_MACH_OMAP2_CONTROL_H | 16 | #ifndef __ARCH_ARM_MACH_OMAP2_CONTROL_H |
17 | #define __ARCH_ARM_MACH_OMAP2_CONTROL_H | 17 | #define __ARCH_ARM_MACH_OMAP2_CONTROL_H |
18 | 18 | ||
19 | #include <mach/io.h> | ||
20 | #include <mach/ctrl_module_core_44xx.h> | 19 | #include <mach/ctrl_module_core_44xx.h> |
21 | #include <mach/ctrl_module_wkup_44xx.h> | 20 | #include <mach/ctrl_module_wkup_44xx.h> |
22 | #include <mach/ctrl_module_pad_core_44xx.h> | 21 | #include <mach/ctrl_module_pad_core_44xx.h> |
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 0b510ad01a00..e13644c11260 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include <asm/mach/map.h> | 24 | #include <asm/mach/map.h> |
25 | #include <asm/pmu.h> | 25 | #include <asm/pmu.h> |
26 | 26 | ||
27 | #include <plat/tc.h> | 27 | #include "iomap.h" |
28 | #include <plat/board.h> | 28 | #include <plat/board.h> |
29 | #include <plat/mcbsp.h> | 29 | #include <plat/mcbsp.h> |
30 | #include <plat/mmc.h> | 30 | #include <plat/mmc.h> |
@@ -405,6 +405,7 @@ static int omap_mcspi_init(struct omap_hwmod *oh, void *unused) | |||
405 | break; | 405 | break; |
406 | default: | 406 | default: |
407 | pr_err("Invalid McSPI Revision value\n"); | 407 | pr_err("Invalid McSPI Revision value\n"); |
408 | kfree(pdata); | ||
408 | return -EINVAL; | 409 | return -EINVAL; |
409 | } | 410 | } |
410 | 411 | ||
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c index 3c446d1a1781..28d16a4bb615 100644 --- a/arch/arm/mach-omap2/display.c +++ b/arch/arm/mach-omap2/display.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <plat/omap-pm.h> | 30 | #include <plat/omap-pm.h> |
31 | #include "common.h" | 31 | #include "common.h" |
32 | 32 | ||
33 | #include "iomap.h" | ||
33 | #include "mux.h" | 34 | #include "mux.h" |
34 | #include "control.h" | 35 | #include "control.h" |
35 | #include "display.h" | 36 | #include "display.h" |
@@ -103,12 +104,8 @@ static void omap4_hdmi_mux_pads(enum omap_hdmi_flags flags) | |||
103 | u32 reg; | 104 | u32 reg; |
104 | u16 control_i2c_1; | 105 | u16 control_i2c_1; |
105 | 106 | ||
106 | /* PAD0_HDMI_HPD_PAD1_HDMI_CEC */ | ||
107 | omap_mux_init_signal("hdmi_hpd", | ||
108 | OMAP_PIN_INPUT_PULLUP); | ||
109 | omap_mux_init_signal("hdmi_cec", | 107 | omap_mux_init_signal("hdmi_cec", |
110 | OMAP_PIN_INPUT_PULLUP); | 108 | OMAP_PIN_INPUT_PULLUP); |
111 | /* PAD0_HDMI_DDC_SCL_PAD1_HDMI_DDC_SDA */ | ||
112 | omap_mux_init_signal("hdmi_ddc_scl", | 109 | omap_mux_init_signal("hdmi_ddc_scl", |
113 | OMAP_PIN_INPUT_PULLUP); | 110 | OMAP_PIN_INPUT_PULLUP); |
114 | omap_mux_init_signal("hdmi_ddc_sda", | 111 | omap_mux_init_signal("hdmi_ddc_sda", |
diff --git a/arch/arm/mach-omap2/emu.c b/arch/arm/mach-omap2/emu.c index ce91aad4cdad..e28e761b7ab9 100644 --- a/arch/arm/mach-omap2/emu.c +++ b/arch/arm/mach-omap2/emu.c | |||
@@ -21,6 +21,10 @@ | |||
21 | #include <linux/clk.h> | 21 | #include <linux/clk.h> |
22 | #include <linux/err.h> | 22 | #include <linux/err.h> |
23 | 23 | ||
24 | #include <mach/hardware.h> | ||
25 | |||
26 | #include "iomap.h" | ||
27 | |||
24 | MODULE_LICENSE("GPL"); | 28 | MODULE_LICENSE("GPL"); |
25 | MODULE_AUTHOR("Alexander Shishkin"); | 29 | MODULE_AUTHOR("Alexander Shishkin"); |
26 | 30 | ||
diff --git a/arch/arm/mach-omap2/gpio.c b/arch/arm/mach-omap2/gpio.c index 8cbfbc2918ce..1e0b750afcaa 100644 --- a/arch/arm/mach-omap2/gpio.c +++ b/arch/arm/mach-omap2/gpio.c | |||
@@ -23,6 +23,9 @@ | |||
23 | 23 | ||
24 | #include <plat/omap_hwmod.h> | 24 | #include <plat/omap_hwmod.h> |
25 | #include <plat/omap_device.h> | 25 | #include <plat/omap_device.h> |
26 | #include <plat/omap-pm.h> | ||
27 | |||
28 | #include "powerdomain.h" | ||
26 | 29 | ||
27 | static int omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused) | 30 | static int omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused) |
28 | { | 31 | { |
@@ -31,6 +34,7 @@ static int omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused) | |||
31 | struct omap_gpio_dev_attr *dev_attr; | 34 | struct omap_gpio_dev_attr *dev_attr; |
32 | char *name = "omap_gpio"; | 35 | char *name = "omap_gpio"; |
33 | int id; | 36 | int id; |
37 | struct powerdomain *pwrdm; | ||
34 | 38 | ||
35 | /* | 39 | /* |
36 | * extract the device id from name field available in the | 40 | * extract the device id from name field available in the |
@@ -52,7 +56,7 @@ static int omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused) | |||
52 | pdata->bank_width = dev_attr->bank_width; | 56 | pdata->bank_width = dev_attr->bank_width; |
53 | pdata->dbck_flag = dev_attr->dbck_flag; | 57 | pdata->dbck_flag = dev_attr->dbck_flag; |
54 | pdata->virtual_irq_start = IH_GPIO_BASE + 32 * (id - 1); | 58 | pdata->virtual_irq_start = IH_GPIO_BASE + 32 * (id - 1); |
55 | 59 | pdata->get_context_loss_count = omap_pm_get_dev_context_loss_count; | |
56 | pdata->regs = kzalloc(sizeof(struct omap_gpio_reg_offs), GFP_KERNEL); | 60 | pdata->regs = kzalloc(sizeof(struct omap_gpio_reg_offs), GFP_KERNEL); |
57 | if (!pdata) { | 61 | if (!pdata) { |
58 | pr_err("gpio%d: Memory allocation failed\n", id); | 62 | pr_err("gpio%d: Memory allocation failed\n", id); |
@@ -61,8 +65,15 @@ static int omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused) | |||
61 | 65 | ||
62 | switch (oh->class->rev) { | 66 | switch (oh->class->rev) { |
63 | case 0: | 67 | case 0: |
68 | if (id == 1) | ||
69 | /* non-wakeup GPIO pins for OMAP2 Bank1 */ | ||
70 | pdata->non_wakeup_gpios = 0xe203ffc0; | ||
71 | else if (id == 2) | ||
72 | /* non-wakeup GPIO pins for OMAP2 Bank2 */ | ||
73 | pdata->non_wakeup_gpios = 0x08700040; | ||
74 | /* fall through */ | ||
75 | |||
64 | case 1: | 76 | case 1: |
65 | pdata->bank_type = METHOD_GPIO_24XX; | ||
66 | pdata->regs->revision = OMAP24XX_GPIO_REVISION; | 77 | pdata->regs->revision = OMAP24XX_GPIO_REVISION; |
67 | pdata->regs->direction = OMAP24XX_GPIO_OE; | 78 | pdata->regs->direction = OMAP24XX_GPIO_OE; |
68 | pdata->regs->datain = OMAP24XX_GPIO_DATAIN; | 79 | pdata->regs->datain = OMAP24XX_GPIO_DATAIN; |
@@ -72,13 +83,19 @@ static int omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused) | |||
72 | pdata->regs->irqstatus = OMAP24XX_GPIO_IRQSTATUS1; | 83 | pdata->regs->irqstatus = OMAP24XX_GPIO_IRQSTATUS1; |
73 | pdata->regs->irqstatus2 = OMAP24XX_GPIO_IRQSTATUS2; | 84 | pdata->regs->irqstatus2 = OMAP24XX_GPIO_IRQSTATUS2; |
74 | pdata->regs->irqenable = OMAP24XX_GPIO_IRQENABLE1; | 85 | pdata->regs->irqenable = OMAP24XX_GPIO_IRQENABLE1; |
86 | pdata->regs->irqenable2 = OMAP24XX_GPIO_IRQENABLE2; | ||
75 | pdata->regs->set_irqenable = OMAP24XX_GPIO_SETIRQENABLE1; | 87 | pdata->regs->set_irqenable = OMAP24XX_GPIO_SETIRQENABLE1; |
76 | pdata->regs->clr_irqenable = OMAP24XX_GPIO_CLEARIRQENABLE1; | 88 | pdata->regs->clr_irqenable = OMAP24XX_GPIO_CLEARIRQENABLE1; |
77 | pdata->regs->debounce = OMAP24XX_GPIO_DEBOUNCE_VAL; | 89 | pdata->regs->debounce = OMAP24XX_GPIO_DEBOUNCE_VAL; |
78 | pdata->regs->debounce_en = OMAP24XX_GPIO_DEBOUNCE_EN; | 90 | pdata->regs->debounce_en = OMAP24XX_GPIO_DEBOUNCE_EN; |
91 | pdata->regs->ctrl = OMAP24XX_GPIO_CTRL; | ||
92 | pdata->regs->wkup_en = OMAP24XX_GPIO_WAKE_EN; | ||
93 | pdata->regs->leveldetect0 = OMAP24XX_GPIO_LEVELDETECT0; | ||
94 | pdata->regs->leveldetect1 = OMAP24XX_GPIO_LEVELDETECT1; | ||
95 | pdata->regs->risingdetect = OMAP24XX_GPIO_RISINGDETECT; | ||
96 | pdata->regs->fallingdetect = OMAP24XX_GPIO_FALLINGDETECT; | ||
79 | break; | 97 | break; |
80 | case 2: | 98 | case 2: |
81 | pdata->bank_type = METHOD_GPIO_44XX; | ||
82 | pdata->regs->revision = OMAP4_GPIO_REVISION; | 99 | pdata->regs->revision = OMAP4_GPIO_REVISION; |
83 | pdata->regs->direction = OMAP4_GPIO_OE; | 100 | pdata->regs->direction = OMAP4_GPIO_OE; |
84 | pdata->regs->datain = OMAP4_GPIO_DATAIN; | 101 | pdata->regs->datain = OMAP4_GPIO_DATAIN; |
@@ -88,10 +105,17 @@ static int omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused) | |||
88 | pdata->regs->irqstatus = OMAP4_GPIO_IRQSTATUS0; | 105 | pdata->regs->irqstatus = OMAP4_GPIO_IRQSTATUS0; |
89 | pdata->regs->irqstatus2 = OMAP4_GPIO_IRQSTATUS1; | 106 | pdata->regs->irqstatus2 = OMAP4_GPIO_IRQSTATUS1; |
90 | pdata->regs->irqenable = OMAP4_GPIO_IRQSTATUSSET0; | 107 | pdata->regs->irqenable = OMAP4_GPIO_IRQSTATUSSET0; |
108 | pdata->regs->irqenable2 = OMAP4_GPIO_IRQSTATUSSET1; | ||
91 | pdata->regs->set_irqenable = OMAP4_GPIO_IRQSTATUSSET0; | 109 | pdata->regs->set_irqenable = OMAP4_GPIO_IRQSTATUSSET0; |
92 | pdata->regs->clr_irqenable = OMAP4_GPIO_IRQSTATUSCLR0; | 110 | pdata->regs->clr_irqenable = OMAP4_GPIO_IRQSTATUSCLR0; |
93 | pdata->regs->debounce = OMAP4_GPIO_DEBOUNCINGTIME; | 111 | pdata->regs->debounce = OMAP4_GPIO_DEBOUNCINGTIME; |
94 | pdata->regs->debounce_en = OMAP4_GPIO_DEBOUNCENABLE; | 112 | pdata->regs->debounce_en = OMAP4_GPIO_DEBOUNCENABLE; |
113 | pdata->regs->ctrl = OMAP4_GPIO_CTRL; | ||
114 | pdata->regs->wkup_en = OMAP4_GPIO_IRQWAKEN0; | ||
115 | pdata->regs->leveldetect0 = OMAP4_GPIO_LEVELDETECT0; | ||
116 | pdata->regs->leveldetect1 = OMAP4_GPIO_LEVELDETECT1; | ||
117 | pdata->regs->risingdetect = OMAP4_GPIO_RISINGDETECT; | ||
118 | pdata->regs->fallingdetect = OMAP4_GPIO_FALLINGDETECT; | ||
95 | break; | 119 | break; |
96 | default: | 120 | default: |
97 | WARN(1, "Invalid gpio bank_type\n"); | 121 | WARN(1, "Invalid gpio bank_type\n"); |
@@ -99,6 +123,9 @@ static int omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused) | |||
99 | return -EINVAL; | 123 | return -EINVAL; |
100 | } | 124 | } |
101 | 125 | ||
126 | pwrdm = omap_hwmod_get_pwrdm(oh); | ||
127 | pdata->loses_context = pwrdm_can_ever_lose_context(pwrdm); | ||
128 | |||
102 | pdev = omap_device_build(name, id - 1, oh, pdata, | 129 | pdev = omap_device_build(name, id - 1, oh, pdata, |
103 | sizeof(*pdata), NULL, 0, false); | 130 | sizeof(*pdata), NULL, 0, false); |
104 | kfree(pdata); | 131 | kfree(pdata); |
@@ -109,9 +136,6 @@ static int omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused) | |||
109 | return PTR_ERR(pdev); | 136 | return PTR_ERR(pdev); |
110 | } | 137 | } |
111 | 138 | ||
112 | omap_device_disable_idle_on_suspend(pdev); | ||
113 | |||
114 | gpio_bank_count++; | ||
115 | return 0; | 139 | return 0; |
116 | } | 140 | } |
117 | 141 | ||
diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c index 8ad210bda9a9..386dec8d2351 100644 --- a/arch/arm/mach-omap2/gpmc-nand.c +++ b/arch/arm/mach-omap2/gpmc-nand.c | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include <asm/mach/flash.h> | 17 | #include <asm/mach/flash.h> |
18 | 18 | ||
19 | #include <plat/cpu.h> | ||
19 | #include <plat/nand.h> | 20 | #include <plat/nand.h> |
20 | #include <plat/board.h> | 21 | #include <plat/board.h> |
21 | #include <plat/gpmc.h> | 22 | #include <plat/gpmc.h> |
diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c index 5cdce10d6183..385b3e02c4a6 100644 --- a/arch/arm/mach-omap2/gpmc-onenand.c +++ b/arch/arm/mach-omap2/gpmc-onenand.c | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #include <asm/mach/flash.h> | 19 | #include <asm/mach/flash.h> |
20 | 20 | ||
21 | #include <plat/cpu.h> | ||
21 | #include <plat/onenand.h> | 22 | #include <plat/onenand.h> |
22 | #include <plat/board.h> | 23 | #include <plat/board.h> |
23 | #include <plat/gpmc.h> | 24 | #include <plat/gpmc.h> |
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index 130034bf01d5..dfffbbf4c009 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c | |||
@@ -528,7 +528,13 @@ int gpmc_cs_configure(int cs, int cmd, int wval) | |||
528 | 528 | ||
529 | case GPMC_CONFIG_DEV_SIZE: | 529 | case GPMC_CONFIG_DEV_SIZE: |
530 | regval = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG1); | 530 | regval = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG1); |
531 | |||
532 | /* clear 2 target bits */ | ||
533 | regval &= ~GPMC_CONFIG1_DEVICESIZE(3); | ||
534 | |||
535 | /* set the proper value */ | ||
531 | regval |= GPMC_CONFIG1_DEVICESIZE(wval); | 536 | regval |= GPMC_CONFIG1_DEVICESIZE(wval); |
537 | |||
532 | gpmc_cs_write_reg(cs, GPMC_CS_CONFIG1, regval); | 538 | gpmc_cs_write_reg(cs, GPMC_CS_CONFIG1, regval); |
533 | break; | 539 | break; |
534 | 540 | ||
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index bd844af13af5..b40c28895298 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c | |||
@@ -175,14 +175,15 @@ static void hsmmc2_select_input_clk_src(struct omap_mmc_platform_data *mmc) | |||
175 | { | 175 | { |
176 | u32 reg; | 176 | u32 reg; |
177 | 177 | ||
178 | if (mmc->slots[0].internal_clock) { | 178 | reg = omap_ctrl_readl(control_devconf1_offset); |
179 | reg = omap_ctrl_readl(control_devconf1_offset); | 179 | if (mmc->slots[0].internal_clock) |
180 | reg |= OMAP2_MMCSDIO2ADPCLKISEL; | 180 | reg |= OMAP2_MMCSDIO2ADPCLKISEL; |
181 | omap_ctrl_writel(reg, control_devconf1_offset); | 181 | else |
182 | } | 182 | reg &= ~OMAP2_MMCSDIO2ADPCLKISEL; |
183 | omap_ctrl_writel(reg, control_devconf1_offset); | ||
183 | } | 184 | } |
184 | 185 | ||
185 | static void hsmmc23_before_set_reg(struct device *dev, int slot, | 186 | static void hsmmc2_before_set_reg(struct device *dev, int slot, |
186 | int power_on, int vdd) | 187 | int power_on, int vdd) |
187 | { | 188 | { |
188 | struct omap_mmc_platform_data *mmc = dev->platform_data; | 189 | struct omap_mmc_platform_data *mmc = dev->platform_data; |
@@ -292,8 +293,8 @@ static inline void omap_hsmmc_mux(struct omap_mmc_platform_data *mmc_controller, | |||
292 | } | 293 | } |
293 | } | 294 | } |
294 | 295 | ||
295 | static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, | 296 | static int omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, |
296 | struct omap_mmc_platform_data *mmc) | 297 | struct omap_mmc_platform_data *mmc) |
297 | { | 298 | { |
298 | char *hc_name; | 299 | char *hc_name; |
299 | 300 | ||
@@ -407,14 +408,13 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, | |||
407 | c->caps &= ~MMC_CAP_8_BIT_DATA; | 408 | c->caps &= ~MMC_CAP_8_BIT_DATA; |
408 | c->caps |= MMC_CAP_4_BIT_DATA; | 409 | c->caps |= MMC_CAP_4_BIT_DATA; |
409 | } | 410 | } |
410 | /* FALLTHROUGH */ | ||
411 | case 3: | ||
412 | if (mmc->slots[0].features & HSMMC_HAS_PBIAS) { | 411 | if (mmc->slots[0].features & HSMMC_HAS_PBIAS) { |
413 | /* off-chip level shifting, or none */ | 412 | /* off-chip level shifting, or none */ |
414 | mmc->slots[0].before_set_reg = hsmmc23_before_set_reg; | 413 | mmc->slots[0].before_set_reg = hsmmc2_before_set_reg; |
415 | mmc->slots[0].after_set_reg = NULL; | 414 | mmc->slots[0].after_set_reg = NULL; |
416 | } | 415 | } |
417 | break; | 416 | break; |
417 | case 3: | ||
418 | case 4: | 418 | case 4: |
419 | case 5: | 419 | case 5: |
420 | mmc->slots[0].before_set_reg = NULL; | 420 | mmc->slots[0].before_set_reg = NULL; |
@@ -430,7 +430,7 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, | |||
430 | 430 | ||
431 | #define MAX_OMAP_MMC_HWMOD_NAME_LEN 16 | 431 | #define MAX_OMAP_MMC_HWMOD_NAME_LEN 16 |
432 | 432 | ||
433 | void __init omap_init_hsmmc(struct omap2_hsmmc_info *hsmmcinfo, int ctrl_nr) | 433 | void omap_init_hsmmc(struct omap2_hsmmc_info *hsmmcinfo, int ctrl_nr) |
434 | { | 434 | { |
435 | struct omap_hwmod *oh; | 435 | struct omap_hwmod *oh; |
436 | struct platform_device *pdev; | 436 | struct platform_device *pdev; |
@@ -487,7 +487,7 @@ done: | |||
487 | kfree(mmc_data); | 487 | kfree(mmc_data); |
488 | } | 488 | } |
489 | 489 | ||
490 | void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers) | 490 | void omap2_hsmmc_init(struct omap2_hsmmc_info *controllers) |
491 | { | 491 | { |
492 | u32 reg; | 492 | u32 reg; |
493 | 493 | ||
diff --git a/arch/arm/mach-omap2/include/mach/entry-macro.S b/arch/arm/mach-omap2/include/mach/entry-macro.S deleted file mode 100644 index 56964a0c4c7e..000000000000 --- a/arch/arm/mach-omap2/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-omap/include/mach/entry-macro.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for OMAP-based platforms | ||
5 | * | ||
6 | * Copyright (C) 2009 Texas Instruments | ||
7 | * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | .macro disable_fiq | ||
15 | .endm | ||
16 | |||
17 | .macro arch_ret_to_user, tmp1, tmp2 | ||
18 | .endm | ||
diff --git a/arch/arm/mach-omap2/include/mach/io.h b/arch/arm/mach-omap2/include/mach/io.h index fd78f31aa1ad..b8758c8a9394 100644 --- a/arch/arm/mach-omap2/include/mach/io.h +++ b/arch/arm/mach-omap2/include/mach/io.h | |||
@@ -1,5 +1,49 @@ | |||
1 | /* | 1 | /* |
2 | * arch/arm/mach-omap2/include/mach/io.h | 2 | * arch/arm/mach-omap2/include/mach/io.h |
3 | * | ||
4 | * IO definitions for TI OMAP processors and boards | ||
5 | * | ||
6 | * Copied from arch/arm/mach-sa1100/include/mach/io.h | ||
7 | * Copyright (C) 1997-1999 Russell King | ||
8 | * | ||
9 | * Copyright (C) 2009 Texas Instruments | ||
10 | * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com> | ||
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 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | ||
18 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
19 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN | ||
20 | * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF | ||
23 | * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
24 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
27 | * | ||
28 | * You should have received a copy of the GNU General Public License along | ||
29 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
30 | * 675 Mass Ave, Cambridge, MA 02139, USA. | ||
31 | * | ||
32 | * Modifications: | ||
33 | * 06-12-1997 RMK Created. | ||
34 | * 07-04-1999 RMK Major cleanup | ||
3 | */ | 35 | */ |
4 | 36 | ||
5 | #include <plat/io.h> | 37 | #ifndef __ASM_ARM_ARCH_IO_H |
38 | #define __ASM_ARM_ARCH_IO_H | ||
39 | |||
40 | #define IO_SPACE_LIMIT 0xffffffff | ||
41 | |||
42 | /* | ||
43 | * We don't actually have real ISA nor PCI buses, but there is so many | ||
44 | * drivers out there that might just work if we fake them... | ||
45 | */ | ||
46 | #define __io(a) __typesafe_io(a) | ||
47 | #define __mem_pci(a) (a) | ||
48 | |||
49 | #endif | ||
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 3f174d51f67f..3203128eef7d 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
@@ -24,26 +24,23 @@ | |||
24 | #include <linux/omapfb.h> | 24 | #include <linux/omapfb.h> |
25 | 25 | ||
26 | #include <asm/tlb.h> | 26 | #include <asm/tlb.h> |
27 | |||
28 | #include <asm/mach/map.h> | 27 | #include <asm/mach/map.h> |
29 | 28 | ||
30 | #include <plat/sram.h> | 29 | #include <plat/sram.h> |
31 | #include <plat/sdrc.h> | 30 | #include <plat/sdrc.h> |
32 | #include <plat/serial.h> | 31 | #include <plat/serial.h> |
33 | |||
34 | #include "clock2xxx.h" | ||
35 | #include "clock3xxx.h" | ||
36 | #include "clock44xx.h" | ||
37 | |||
38 | #include "common.h" | ||
39 | #include <plat/omap-pm.h> | 32 | #include <plat/omap-pm.h> |
33 | #include <plat/omap_hwmod.h> | ||
34 | #include <plat/multi.h> | ||
35 | |||
36 | #include "iomap.h" | ||
40 | #include "voltage.h" | 37 | #include "voltage.h" |
41 | #include "powerdomain.h" | 38 | #include "powerdomain.h" |
42 | |||
43 | #include "clockdomain.h" | 39 | #include "clockdomain.h" |
44 | #include <plat/omap_hwmod.h> | ||
45 | #include <plat/multi.h> | ||
46 | #include "common.h" | 40 | #include "common.h" |
41 | #include "clock2xxx.h" | ||
42 | #include "clock3xxx.h" | ||
43 | #include "clock44xx.h" | ||
47 | 44 | ||
48 | /* | 45 | /* |
49 | * The machine specific code may provide the extra mapping besides the | 46 | * The machine specific code may provide the extra mapping besides the |
@@ -388,7 +385,7 @@ static void __init omap_hwmod_init_postsetup(void) | |||
388 | omap_pm_if_early_init(); | 385 | omap_pm_if_early_init(); |
389 | } | 386 | } |
390 | 387 | ||
391 | #ifdef CONFIG_ARCH_OMAP2 | 388 | #ifdef CONFIG_SOC_OMAP2420 |
392 | void __init omap2420_init_early(void) | 389 | void __init omap2420_init_early(void) |
393 | { | 390 | { |
394 | omap2_set_globals_242x(); | 391 | omap2_set_globals_242x(); |
@@ -400,7 +397,9 @@ void __init omap2420_init_early(void) | |||
400 | omap_hwmod_init_postsetup(); | 397 | omap_hwmod_init_postsetup(); |
401 | omap2420_clk_init(); | 398 | omap2420_clk_init(); |
402 | } | 399 | } |
400 | #endif | ||
403 | 401 | ||
402 | #ifdef CONFIG_SOC_OMAP2430 | ||
404 | void __init omap2430_init_early(void) | 403 | void __init omap2430_init_early(void) |
405 | { | 404 | { |
406 | omap2_set_globals_243x(); | 405 | omap2_set_globals_243x(); |
@@ -488,43 +487,3 @@ void __init omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0, | |||
488 | _omap2_init_reprogram_sdrc(); | 487 | _omap2_init_reprogram_sdrc(); |
489 | } | 488 | } |
490 | } | 489 | } |
491 | |||
492 | /* | ||
493 | * NOTE: Please use ioremap + __raw_read/write where possible instead of these | ||
494 | */ | ||
495 | |||
496 | u8 omap_readb(u32 pa) | ||
497 | { | ||
498 | return __raw_readb(OMAP2_L4_IO_ADDRESS(pa)); | ||
499 | } | ||
500 | EXPORT_SYMBOL(omap_readb); | ||
501 | |||
502 | u16 omap_readw(u32 pa) | ||
503 | { | ||
504 | return __raw_readw(OMAP2_L4_IO_ADDRESS(pa)); | ||
505 | } | ||
506 | EXPORT_SYMBOL(omap_readw); | ||
507 | |||
508 | u32 omap_readl(u32 pa) | ||
509 | { | ||
510 | return __raw_readl(OMAP2_L4_IO_ADDRESS(pa)); | ||
511 | } | ||
512 | EXPORT_SYMBOL(omap_readl); | ||
513 | |||
514 | void omap_writeb(u8 v, u32 pa) | ||
515 | { | ||
516 | __raw_writeb(v, OMAP2_L4_IO_ADDRESS(pa)); | ||
517 | } | ||
518 | EXPORT_SYMBOL(omap_writeb); | ||
519 | |||
520 | void omap_writew(u16 v, u32 pa) | ||
521 | { | ||
522 | __raw_writew(v, OMAP2_L4_IO_ADDRESS(pa)); | ||
523 | } | ||
524 | EXPORT_SYMBOL(omap_writew); | ||
525 | |||
526 | void omap_writel(u32 v, u32 pa) | ||
527 | { | ||
528 | __raw_writel(v, OMAP2_L4_IO_ADDRESS(pa)); | ||
529 | } | ||
530 | EXPORT_SYMBOL(omap_writel); | ||
diff --git a/arch/arm/plat-omap/include/plat/io.h b/arch/arm/mach-omap2/iomap.h index 0696bae1818b..e6f958165296 100644 --- a/arch/arm/plat-omap/include/plat/io.h +++ b/arch/arm/mach-omap2/iomap.h | |||
@@ -1,13 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * arch/arm/plat-omap/include/mach/io.h | 2 | * IO mappings for OMAP2+ |
3 | * | ||
4 | * IO definitions for TI OMAP processors and boards | ||
5 | * | ||
6 | * Copied from arch/arm/mach-sa1100/include/mach/io.h | ||
7 | * Copyright (C) 1997-1999 Russell King | ||
8 | * | ||
9 | * Copyright (C) 2009 Texas Instruments | ||
10 | * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com> | ||
11 | * | 3 | * |
12 | * This program is free software; you can redistribute it and/or modify it | 4 | * 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 | 5 | * under the terms of the GNU General Public License as published by the |
@@ -25,33 +17,9 @@ | |||
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 17 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 18 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | * | 19 | * |
28 | * You should have received a copy of the GNU General Public License along | 20 | * You should have received a copy of the GNU General Public License along |
29 | * with this program; if not, write to the Free Software Foundation, Inc., | 21 | * with this program; if not, write to the Free Software Foundation, Inc., |
30 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 22 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
31 | * | ||
32 | * Modifications: | ||
33 | * 06-12-1997 RMK Created. | ||
34 | * 07-04-1999 RMK Major cleanup | ||
35 | */ | ||
36 | |||
37 | #ifndef __ASM_ARM_ARCH_IO_H | ||
38 | #define __ASM_ARM_ARCH_IO_H | ||
39 | |||
40 | #include <mach/hardware.h> | ||
41 | |||
42 | #define IO_SPACE_LIMIT 0xffffffff | ||
43 | |||
44 | /* | ||
45 | * We don't actually have real ISA nor PCI buses, but there is so many | ||
46 | * drivers out there that might just work if we fake them... | ||
47 | */ | ||
48 | #define __io(a) __typesafe_io(a) | ||
49 | #define __mem_pci(a) (a) | ||
50 | |||
51 | /* | ||
52 | * ---------------------------------------------------------------------------- | ||
53 | * I/O mapping | ||
54 | * ---------------------------------------------------------------------------- | ||
55 | */ | 23 | */ |
56 | 24 | ||
57 | #ifdef __ASSEMBLER__ | 25 | #ifdef __ASSEMBLER__ |
@@ -60,13 +28,9 @@ | |||
60 | #define IOMEM(x) ((void __force __iomem *)(x)) | 28 | #define IOMEM(x) ((void __force __iomem *)(x)) |
61 | #endif | 29 | #endif |
62 | 30 | ||
63 | #define OMAP1_IO_OFFSET 0x01000000 /* Virtual IO = 0xfefb0000 */ | ||
64 | #define OMAP1_IO_ADDRESS(pa) IOMEM((pa) - OMAP1_IO_OFFSET) | ||
65 | |||
66 | #define OMAP2_L3_IO_OFFSET 0x90000000 | 31 | #define OMAP2_L3_IO_OFFSET 0x90000000 |
67 | #define OMAP2_L3_IO_ADDRESS(pa) IOMEM((pa) + OMAP2_L3_IO_OFFSET) /* L3 */ | 32 | #define OMAP2_L3_IO_ADDRESS(pa) IOMEM((pa) + OMAP2_L3_IO_OFFSET) /* L3 */ |
68 | 33 | ||
69 | |||
70 | #define OMAP2_L4_IO_OFFSET 0xb2000000 | 34 | #define OMAP2_L4_IO_OFFSET 0xb2000000 |
71 | #define OMAP2_L4_IO_ADDRESS(pa) IOMEM((pa) + OMAP2_L4_IO_OFFSET) /* L4 */ | 35 | #define OMAP2_L4_IO_ADDRESS(pa) IOMEM((pa) + OMAP2_L4_IO_OFFSET) /* L4 */ |
72 | 36 | ||
@@ -87,16 +51,6 @@ | |||
87 | 51 | ||
88 | /* | 52 | /* |
89 | * ---------------------------------------------------------------------------- | 53 | * ---------------------------------------------------------------------------- |
90 | * Omap1 specific IO mapping | ||
91 | * ---------------------------------------------------------------------------- | ||
92 | */ | ||
93 | |||
94 | #define OMAP1_IO_PHYS 0xFFFB0000 | ||
95 | #define OMAP1_IO_SIZE 0x40000 | ||
96 | #define OMAP1_IO_VIRT (OMAP1_IO_PHYS - OMAP1_IO_OFFSET) | ||
97 | |||
98 | /* | ||
99 | * ---------------------------------------------------------------------------- | ||
100 | * Omap2 specific IO mapping | 54 | * Omap2 specific IO mapping |
101 | * ---------------------------------------------------------------------------- | 55 | * ---------------------------------------------------------------------------- |
102 | */ | 56 | */ |
@@ -247,31 +201,3 @@ | |||
247 | /* 0x4e000000 --> 0xfd300000 */ | 201 | /* 0x4e000000 --> 0xfd300000 */ |
248 | #define OMAP44XX_DMM_SIZE SZ_1M | 202 | #define OMAP44XX_DMM_SIZE SZ_1M |
249 | #define OMAP44XX_DMM_VIRT (OMAP44XX_EMIF2_VIRT + OMAP44XX_EMIF2_SIZE) | 203 | #define OMAP44XX_DMM_VIRT (OMAP44XX_EMIF2_VIRT + OMAP44XX_EMIF2_SIZE) |
250 | /* | ||
251 | * ---------------------------------------------------------------------------- | ||
252 | * Omap specific register access | ||
253 | * ---------------------------------------------------------------------------- | ||
254 | */ | ||
255 | |||
256 | #ifndef __ASSEMBLER__ | ||
257 | |||
258 | /* | ||
259 | * NOTE: Please use ioremap + __raw_read/write where possible instead of these | ||
260 | */ | ||
261 | |||
262 | extern u8 omap_readb(u32 pa); | ||
263 | extern u16 omap_readw(u32 pa); | ||
264 | extern u32 omap_readl(u32 pa); | ||
265 | extern void omap_writeb(u8 v, u32 pa); | ||
266 | extern void omap_writew(u16 v, u32 pa); | ||
267 | extern void omap_writel(u32 v, u32 pa); | ||
268 | |||
269 | struct omap_sdrc_params; | ||
270 | extern void omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0, | ||
271 | struct omap_sdrc_params *sdrc_cs1); | ||
272 | |||
273 | extern void __init omap_init_consistent_dma_size(void); | ||
274 | |||
275 | #endif | ||
276 | |||
277 | #endif | ||
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c index 1fef061f7927..6da2d0edee11 100644 --- a/arch/arm/mach-omap2/irq.c +++ b/arch/arm/mach-omap2/irq.c | |||
@@ -14,10 +14,13 @@ | |||
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <mach/hardware.h> | 17 | |
18 | #include <asm/exception.h> | 18 | #include <asm/exception.h> |
19 | #include <asm/mach/irq.h> | 19 | #include <asm/mach/irq.h> |
20 | 20 | ||
21 | #include <mach/hardware.h> | ||
22 | |||
23 | #include "iomap.h" | ||
21 | 24 | ||
22 | /* selected INTC register offsets */ | 25 | /* selected INTC register offsets */ |
23 | 26 | ||
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index e1cc75d1a57a..fb8bc9fa43b1 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c | |||
@@ -100,8 +100,8 @@ void omap_mux_write_array(struct omap_mux_partition *partition, | |||
100 | 100 | ||
101 | static char *omap_mux_options; | 101 | static char *omap_mux_options; |
102 | 102 | ||
103 | static int __init _omap_mux_init_gpio(struct omap_mux_partition *partition, | 103 | static int _omap_mux_init_gpio(struct omap_mux_partition *partition, |
104 | int gpio, int val) | 104 | int gpio, int val) |
105 | { | 105 | { |
106 | struct omap_mux_entry *e; | 106 | struct omap_mux_entry *e; |
107 | struct omap_mux *gpio_mux = NULL; | 107 | struct omap_mux *gpio_mux = NULL; |
@@ -145,7 +145,7 @@ static int __init _omap_mux_init_gpio(struct omap_mux_partition *partition, | |||
145 | return 0; | 145 | return 0; |
146 | } | 146 | } |
147 | 147 | ||
148 | int __init omap_mux_init_gpio(int gpio, int val) | 148 | int omap_mux_init_gpio(int gpio, int val) |
149 | { | 149 | { |
150 | struct omap_mux_partition *partition; | 150 | struct omap_mux_partition *partition; |
151 | int ret; | 151 | int ret; |
@@ -159,9 +159,9 @@ int __init omap_mux_init_gpio(int gpio, int val) | |||
159 | return -ENODEV; | 159 | return -ENODEV; |
160 | } | 160 | } |
161 | 161 | ||
162 | static int __init _omap_mux_get_by_name(struct omap_mux_partition *partition, | 162 | static int _omap_mux_get_by_name(struct omap_mux_partition *partition, |
163 | const char *muxname, | 163 | const char *muxname, |
164 | struct omap_mux **found_mux) | 164 | struct omap_mux **found_mux) |
165 | { | 165 | { |
166 | struct omap_mux *mux = NULL; | 166 | struct omap_mux *mux = NULL; |
167 | struct omap_mux_entry *e; | 167 | struct omap_mux_entry *e; |
@@ -240,7 +240,7 @@ omap_mux_get_by_name(const char *muxname, | |||
240 | return -ENODEV; | 240 | return -ENODEV; |
241 | } | 241 | } |
242 | 242 | ||
243 | int __init omap_mux_init_signal(const char *muxname, int val) | 243 | int omap_mux_init_signal(const char *muxname, int val) |
244 | { | 244 | { |
245 | struct omap_mux_partition *partition = NULL; | 245 | struct omap_mux_partition *partition = NULL; |
246 | struct omap_mux *mux = NULL; | 246 | struct omap_mux *mux = NULL; |
@@ -1094,8 +1094,8 @@ static void omap_mux_init_package(struct omap_mux *superset, | |||
1094 | omap_mux_package_init_balls(package_balls, superset); | 1094 | omap_mux_package_init_balls(package_balls, superset); |
1095 | } | 1095 | } |
1096 | 1096 | ||
1097 | static void omap_mux_init_signals(struct omap_mux_partition *partition, | 1097 | static void __init omap_mux_init_signals(struct omap_mux_partition *partition, |
1098 | struct omap_board_mux *board_mux) | 1098 | struct omap_board_mux *board_mux) |
1099 | { | 1099 | { |
1100 | omap_mux_set_cmdline_signals(); | 1100 | omap_mux_set_cmdline_signals(); |
1101 | omap_mux_write_array(partition, board_mux); | 1101 | omap_mux_write_array(partition, board_mux); |
@@ -1109,8 +1109,8 @@ static void omap_mux_init_package(struct omap_mux *superset, | |||
1109 | { | 1109 | { |
1110 | } | 1110 | } |
1111 | 1111 | ||
1112 | static void omap_mux_init_signals(struct omap_mux_partition *partition, | 1112 | static void __init omap_mux_init_signals(struct omap_mux_partition *partition, |
1113 | struct omap_board_mux *board_mux) | 1113 | struct omap_board_mux *board_mux) |
1114 | { | 1114 | { |
1115 | } | 1115 | } |
1116 | 1116 | ||
diff --git a/arch/arm/mach-omap2/omap-headsmp.S b/arch/arm/mach-omap2/omap-headsmp.S index b13ef7ef5ef4..503ac777a2ba 100644 --- a/arch/arm/mach-omap2/omap-headsmp.S +++ b/arch/arm/mach-omap2/omap-headsmp.S | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/linkage.h> | 18 | #include <linux/linkage.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | 20 | ||
21 | __CPUINIT | ||
21 | /* | 22 | /* |
22 | * OMAP4 specific entry point for secondary CPU to jump from ROM | 23 | * OMAP4 specific entry point for secondary CPU to jump from ROM |
23 | * code. This routine also provides a holding flag into which | 24 | * code. This routine also provides a holding flag into which |
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c index c1bf3ef0ba02..deffbf1c9627 100644 --- a/arch/arm/mach-omap2/omap-smp.c +++ b/arch/arm/mach-omap2/omap-smp.c | |||
@@ -23,11 +23,12 @@ | |||
23 | #include <asm/cacheflush.h> | 23 | #include <asm/cacheflush.h> |
24 | #include <asm/hardware/gic.h> | 24 | #include <asm/hardware/gic.h> |
25 | #include <asm/smp_scu.h> | 25 | #include <asm/smp_scu.h> |
26 | |||
26 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
27 | #include <mach/omap-secure.h> | 28 | #include <mach/omap-secure.h> |
28 | 29 | ||
30 | #include "iomap.h" | ||
29 | #include "common.h" | 31 | #include "common.h" |
30 | |||
31 | #include "clockdomain.h" | 32 | #include "clockdomain.h" |
32 | 33 | ||
33 | /* SCU base address */ | 34 | /* SCU base address */ |
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 5192cabb40ed..eba6cd3816f5 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -1517,8 +1517,8 @@ static int _enable(struct omap_hwmod *oh) | |||
1517 | if (oh->_state != _HWMOD_STATE_INITIALIZED && | 1517 | if (oh->_state != _HWMOD_STATE_INITIALIZED && |
1518 | oh->_state != _HWMOD_STATE_IDLE && | 1518 | oh->_state != _HWMOD_STATE_IDLE && |
1519 | oh->_state != _HWMOD_STATE_DISABLED) { | 1519 | oh->_state != _HWMOD_STATE_DISABLED) { |
1520 | WARN(1, "omap_hwmod: %s: enabled state can only be entered " | 1520 | WARN(1, "omap_hwmod: %s: enabled state can only be entered from initialized, idle, or disabled state\n", |
1521 | "from initialized, idle, or disabled state\n", oh->name); | 1521 | oh->name); |
1522 | return -EINVAL; | 1522 | return -EINVAL; |
1523 | } | 1523 | } |
1524 | 1524 | ||
@@ -1600,8 +1600,8 @@ static int _idle(struct omap_hwmod *oh) | |||
1600 | pr_debug("omap_hwmod: %s: idling\n", oh->name); | 1600 | pr_debug("omap_hwmod: %s: idling\n", oh->name); |
1601 | 1601 | ||
1602 | if (oh->_state != _HWMOD_STATE_ENABLED) { | 1602 | if (oh->_state != _HWMOD_STATE_ENABLED) { |
1603 | WARN(1, "omap_hwmod: %s: idle state can only be entered from " | 1603 | WARN(1, "omap_hwmod: %s: idle state can only be entered from enabled state\n", |
1604 | "enabled state\n", oh->name); | 1604 | oh->name); |
1605 | return -EINVAL; | 1605 | return -EINVAL; |
1606 | } | 1606 | } |
1607 | 1607 | ||
@@ -1682,8 +1682,8 @@ static int _shutdown(struct omap_hwmod *oh) | |||
1682 | 1682 | ||
1683 | if (oh->_state != _HWMOD_STATE_IDLE && | 1683 | if (oh->_state != _HWMOD_STATE_IDLE && |
1684 | oh->_state != _HWMOD_STATE_ENABLED) { | 1684 | oh->_state != _HWMOD_STATE_ENABLED) { |
1685 | WARN(1, "omap_hwmod: %s: disabled state can only be entered " | 1685 | WARN(1, "omap_hwmod: %s: disabled state can only be entered from idle, or enabled state\n", |
1686 | "from idle, or enabled state\n", oh->name); | 1686 | oh->name); |
1687 | return -EINVAL; | 1687 | return -EINVAL; |
1688 | } | 1688 | } |
1689 | 1689 | ||
@@ -2240,8 +2240,8 @@ void omap_hwmod_ocp_barrier(struct omap_hwmod *oh) | |||
2240 | BUG_ON(!oh); | 2240 | BUG_ON(!oh); |
2241 | 2241 | ||
2242 | if (!oh->class->sysc || !oh->class->sysc->sysc_flags) { | 2242 | if (!oh->class->sysc || !oh->class->sysc->sysc_flags) { |
2243 | WARN(1, "omap_device: %s: OCP barrier impossible due to " | 2243 | WARN(1, "omap_device: %s: OCP barrier impossible due to device configuration\n", |
2244 | "device configuration\n", oh->name); | 2244 | oh->name); |
2245 | return; | 2245 | return; |
2246 | } | 2246 | } |
2247 | 2247 | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c index c11273da5dcc..f08e442af397 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c | |||
@@ -56,27 +56,6 @@ struct omap_hwmod_class omap2_dss_hwmod_class = { | |||
56 | }; | 56 | }; |
57 | 57 | ||
58 | /* | 58 | /* |
59 | * 'dispc' class | ||
60 | * display controller | ||
61 | */ | ||
62 | |||
63 | static struct omap_hwmod_class_sysconfig omap2_dispc_sysc = { | ||
64 | .rev_offs = 0x0000, | ||
65 | .sysc_offs = 0x0010, | ||
66 | .syss_offs = 0x0014, | ||
67 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE | | ||
68 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | ||
69 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
70 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), | ||
71 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
72 | }; | ||
73 | |||
74 | struct omap_hwmod_class omap2_dispc_hwmod_class = { | ||
75 | .name = "dispc", | ||
76 | .sysc = &omap2_dispc_sysc, | ||
77 | }; | ||
78 | |||
79 | /* | ||
80 | * 'rfbi' class | 59 | * 'rfbi' class |
81 | * remote frame buffer interface | 60 | * remote frame buffer interface |
82 | */ | 61 | */ |
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 177dee20faef..2a6729741b06 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c | |||
@@ -28,6 +28,28 @@ struct omap_hwmod_dma_info omap2xxx_dss_sdma_chs[] = { | |||
28 | { .name = "dispc", .dma_req = 5 }, | 28 | { .name = "dispc", .dma_req = 5 }, |
29 | { .dma_req = -1 } | 29 | { .dma_req = -1 } |
30 | }; | 30 | }; |
31 | |||
32 | /* | ||
33 | * 'dispc' class | ||
34 | * display controller | ||
35 | */ | ||
36 | |||
37 | static struct omap_hwmod_class_sysconfig omap2_dispc_sysc = { | ||
38 | .rev_offs = 0x0000, | ||
39 | .sysc_offs = 0x0010, | ||
40 | .syss_offs = 0x0014, | ||
41 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE | | ||
42 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | ||
43 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
44 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), | ||
45 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
46 | }; | ||
47 | |||
48 | struct omap_hwmod_class omap2_dispc_hwmod_class = { | ||
49 | .name = "dispc", | ||
50 | .sysc = &omap2_dispc_sysc, | ||
51 | }; | ||
52 | |||
31 | /* OMAP2xxx Timer Common */ | 53 | /* OMAP2xxx Timer Common */ |
32 | static struct omap_hwmod_class_sysconfig omap2xxx_timer_sysc = { | 54 | static struct omap_hwmod_class_sysconfig omap2xxx_timer_sysc = { |
33 | .rev_offs = 0x0000, | 55 | .rev_offs = 0x0000, |
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index 5324e8d93bc0..3c8dd928628e 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | |||
@@ -1480,6 +1480,28 @@ static struct omap_hwmod omap3xxx_dss_core_hwmod = { | |||
1480 | .masters_cnt = ARRAY_SIZE(omap3xxx_dss_masters), | 1480 | .masters_cnt = ARRAY_SIZE(omap3xxx_dss_masters), |
1481 | }; | 1481 | }; |
1482 | 1482 | ||
1483 | /* | ||
1484 | * 'dispc' class | ||
1485 | * display controller | ||
1486 | */ | ||
1487 | |||
1488 | static struct omap_hwmod_class_sysconfig omap3_dispc_sysc = { | ||
1489 | .rev_offs = 0x0000, | ||
1490 | .sysc_offs = 0x0010, | ||
1491 | .syss_offs = 0x0014, | ||
1492 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE | | ||
1493 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE | | ||
1494 | SYSC_HAS_ENAWAKEUP), | ||
1495 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
1496 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), | ||
1497 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1498 | }; | ||
1499 | |||
1500 | static struct omap_hwmod_class omap3_dispc_hwmod_class = { | ||
1501 | .name = "dispc", | ||
1502 | .sysc = &omap3_dispc_sysc, | ||
1503 | }; | ||
1504 | |||
1483 | /* l4_core -> dss_dispc */ | 1505 | /* l4_core -> dss_dispc */ |
1484 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = { | 1506 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = { |
1485 | .master = &omap3xxx_l4_core_hwmod, | 1507 | .master = &omap3xxx_l4_core_hwmod, |
@@ -1503,7 +1525,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_dss_dispc_slaves[] = { | |||
1503 | 1525 | ||
1504 | static struct omap_hwmod omap3xxx_dss_dispc_hwmod = { | 1526 | static struct omap_hwmod omap3xxx_dss_dispc_hwmod = { |
1505 | .name = "dss_dispc", | 1527 | .name = "dss_dispc", |
1506 | .class = &omap2_dispc_hwmod_class, | 1528 | .class = &omap3_dispc_hwmod_class, |
1507 | .mpu_irqs = omap2_dispc_irqs, | 1529 | .mpu_irqs = omap2_dispc_irqs, |
1508 | .main_clk = "dss1_alwon_fck", | 1530 | .main_clk = "dss1_alwon_fck", |
1509 | .prcm = { | 1531 | .prcm = { |
@@ -3523,12 +3545,6 @@ static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { | |||
3523 | &omap3xxx_uart2_hwmod, | 3545 | &omap3xxx_uart2_hwmod, |
3524 | &omap3xxx_uart3_hwmod, | 3546 | &omap3xxx_uart3_hwmod, |
3525 | 3547 | ||
3526 | /* dss class */ | ||
3527 | &omap3xxx_dss_dispc_hwmod, | ||
3528 | &omap3xxx_dss_dsi1_hwmod, | ||
3529 | &omap3xxx_dss_rfbi_hwmod, | ||
3530 | &omap3xxx_dss_venc_hwmod, | ||
3531 | |||
3532 | /* i2c class */ | 3548 | /* i2c class */ |
3533 | &omap3xxx_i2c1_hwmod, | 3549 | &omap3xxx_i2c1_hwmod, |
3534 | &omap3xxx_i2c2_hwmod, | 3550 | &omap3xxx_i2c2_hwmod, |
@@ -3635,6 +3651,15 @@ static __initdata struct omap_hwmod *am35xx_hwmods[] = { | |||
3635 | NULL | 3651 | NULL |
3636 | }; | 3652 | }; |
3637 | 3653 | ||
3654 | static __initdata struct omap_hwmod *omap3xxx_dss_hwmods[] = { | ||
3655 | /* dss class */ | ||
3656 | &omap3xxx_dss_dispc_hwmod, | ||
3657 | &omap3xxx_dss_dsi1_hwmod, | ||
3658 | &omap3xxx_dss_rfbi_hwmod, | ||
3659 | &omap3xxx_dss_venc_hwmod, | ||
3660 | NULL | ||
3661 | }; | ||
3662 | |||
3638 | int __init omap3xxx_hwmod_init(void) | 3663 | int __init omap3xxx_hwmod_init(void) |
3639 | { | 3664 | { |
3640 | int r; | 3665 | int r; |
@@ -3708,6 +3733,21 @@ int __init omap3xxx_hwmod_init(void) | |||
3708 | 3733 | ||
3709 | if (h) | 3734 | if (h) |
3710 | r = omap_hwmod_register(h); | 3735 | r = omap_hwmod_register(h); |
3736 | if (r < 0) | ||
3737 | return r; | ||
3738 | |||
3739 | /* | ||
3740 | * DSS code presumes that dss_core hwmod is handled first, | ||
3741 | * _before_ any other DSS related hwmods so register common | ||
3742 | * DSS hwmods last to ensure that dss_core is already registered. | ||
3743 | * Otherwise some change things may happen, for ex. if dispc | ||
3744 | * is handled before dss_core and DSS is enabled in bootloader | ||
3745 | * DIPSC will be reset with outputs enabled which sometimes leads | ||
3746 | * to unrecoverable L3 error. | ||
3747 | * XXX The long-term fix to this is to ensure modules are set up | ||
3748 | * in dependency order in the hwmod core code. | ||
3749 | */ | ||
3750 | r = omap_hwmod_register(omap3xxx_dss_hwmods); | ||
3711 | 3751 | ||
3712 | return r; | 3752 | return r; |
3713 | } | 3753 | } |
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index f9f151081760..ef0524c10a84 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c | |||
@@ -1031,6 +1031,7 @@ static struct omap_hwmod_dma_info omap44xx_dmic_sdma_reqs[] = { | |||
1031 | 1031 | ||
1032 | static struct omap_hwmod_addr_space omap44xx_dmic_addrs[] = { | 1032 | static struct omap_hwmod_addr_space omap44xx_dmic_addrs[] = { |
1033 | { | 1033 | { |
1034 | .name = "mpu", | ||
1034 | .pa_start = 0x4012e000, | 1035 | .pa_start = 0x4012e000, |
1035 | .pa_end = 0x4012e07f, | 1036 | .pa_end = 0x4012e07f, |
1036 | .flags = ADDR_TYPE_RT | 1037 | .flags = ADDR_TYPE_RT |
@@ -1049,6 +1050,7 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic = { | |||
1049 | 1050 | ||
1050 | static struct omap_hwmod_addr_space omap44xx_dmic_dma_addrs[] = { | 1051 | static struct omap_hwmod_addr_space omap44xx_dmic_dma_addrs[] = { |
1051 | { | 1052 | { |
1053 | .name = "dma", | ||
1052 | .pa_start = 0x4902e000, | 1054 | .pa_start = 0x4902e000, |
1053 | .pa_end = 0x4902e07f, | 1055 | .pa_end = 0x4902e07f, |
1054 | .flags = ADDR_TYPE_RT | 1056 | .flags = ADDR_TYPE_RT |
diff --git a/arch/arm/mach-omap2/opp2420_data.c b/arch/arm/mach-omap2/opp2420_data.c index e6dda694fd5c..5037e76e4e23 100644 --- a/arch/arm/mach-omap2/opp2420_data.c +++ b/arch/arm/mach-omap2/opp2420_data.c | |||
@@ -28,6 +28,8 @@ | |||
28 | * http://repository.maemo.org/pool/diablo/free/k/kernel-source-diablo/ | 28 | * http://repository.maemo.org/pool/diablo/free/k/kernel-source-diablo/ |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <plat/hardware.h> | ||
32 | |||
31 | #include "opp2xxx.h" | 33 | #include "opp2xxx.h" |
32 | #include "sdrc.h" | 34 | #include "sdrc.h" |
33 | #include "clock.h" | 35 | #include "clock.h" |
diff --git a/arch/arm/mach-omap2/opp2430_data.c b/arch/arm/mach-omap2/opp2430_data.c index 1b9596ae201e..750805c528d8 100644 --- a/arch/arm/mach-omap2/opp2430_data.c +++ b/arch/arm/mach-omap2/opp2430_data.c | |||
@@ -26,6 +26,8 @@ | |||
26 | * This is technically part of the OMAP2xxx clock code. | 26 | * This is technically part of the OMAP2xxx clock code. |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include <plat/hardware.h> | ||
30 | |||
29 | #include "opp2xxx.h" | 31 | #include "opp2xxx.h" |
30 | #include "sdrc.h" | 32 | #include "sdrc.h" |
31 | #include "clock.h" | 33 | #include "clock.h" |
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c index 1f736222a629..36c587f4981b 100644 --- a/arch/arm/mach-omap2/pm24xx.c +++ b/arch/arm/mach-omap2/pm24xx.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
28 | #include <linux/clk.h> | 28 | #include <linux/clk.h> |
29 | #include <linux/io.h> | ||
30 | #include <linux/irq.h> | 29 | #include <linux/irq.h> |
31 | #include <linux/time.h> | 30 | #include <linux/time.h> |
32 | #include <linux/gpio.h> | 31 | #include <linux/gpio.h> |
@@ -35,12 +34,13 @@ | |||
35 | #include <asm/mach/irq.h> | 34 | #include <asm/mach/irq.h> |
36 | #include <asm/mach-types.h> | 35 | #include <asm/mach-types.h> |
37 | 36 | ||
38 | #include <mach/irqs.h> | ||
39 | #include <plat/clock.h> | 37 | #include <plat/clock.h> |
40 | #include <plat/sram.h> | 38 | #include <plat/sram.h> |
41 | #include <plat/dma.h> | 39 | #include <plat/dma.h> |
42 | #include <plat/board.h> | 40 | #include <plat/board.h> |
43 | 41 | ||
42 | #include <mach/irqs.h> | ||
43 | |||
44 | #include "common.h" | 44 | #include "common.h" |
45 | #include "prm2xxx_3xxx.h" | 45 | #include "prm2xxx_3xxx.h" |
46 | #include "prm-regbits-24xx.h" | 46 | #include "prm-regbits-24xx.h" |
@@ -49,7 +49,6 @@ | |||
49 | #include "sdrc.h" | 49 | #include "sdrc.h" |
50 | #include "pm.h" | 50 | #include "pm.h" |
51 | #include "control.h" | 51 | #include "control.h" |
52 | |||
53 | #include "powerdomain.h" | 52 | #include "powerdomain.h" |
54 | #include "clockdomain.h" | 53 | #include "clockdomain.h" |
55 | 54 | ||
@@ -82,13 +81,7 @@ static int omap2_fclks_active(void) | |||
82 | f1 = omap2_cm_read_mod_reg(CORE_MOD, CM_FCLKEN1); | 81 | f1 = omap2_cm_read_mod_reg(CORE_MOD, CM_FCLKEN1); |
83 | f2 = omap2_cm_read_mod_reg(CORE_MOD, OMAP24XX_CM_FCLKEN2); | 82 | f2 = omap2_cm_read_mod_reg(CORE_MOD, OMAP24XX_CM_FCLKEN2); |
84 | 83 | ||
85 | /* Ignore UART clocks. These are handled by UART core (serial.c) */ | 84 | return (f1 | f2) ? 1 : 0; |
86 | f1 &= ~(OMAP24XX_EN_UART1_MASK | OMAP24XX_EN_UART2_MASK); | ||
87 | f2 &= ~OMAP24XX_EN_UART3_MASK; | ||
88 | |||
89 | if (f1 | f2) | ||
90 | return 1; | ||
91 | return 0; | ||
92 | } | 85 | } |
93 | 86 | ||
94 | static void omap2_enter_full_retention(void) | 87 | static void omap2_enter_full_retention(void) |
@@ -258,26 +251,6 @@ static int omap2_pm_begin(suspend_state_t state) | |||
258 | return 0; | 251 | return 0; |
259 | } | 252 | } |
260 | 253 | ||
261 | static int omap2_pm_suspend(void) | ||
262 | { | ||
263 | u32 wken_wkup, mir1; | ||
264 | |||
265 | wken_wkup = omap2_prm_read_mod_reg(WKUP_MOD, PM_WKEN); | ||
266 | wken_wkup &= ~OMAP24XX_EN_GPT1_MASK; | ||
267 | omap2_prm_write_mod_reg(wken_wkup, WKUP_MOD, PM_WKEN); | ||
268 | |||
269 | /* Mask GPT1 */ | ||
270 | mir1 = omap_readl(0x480fe0a4); | ||
271 | omap_writel(1 << 5, 0x480fe0ac); | ||
272 | |||
273 | omap2_enter_full_retention(); | ||
274 | |||
275 | omap_writel(mir1, 0x480fe0a4); | ||
276 | omap2_prm_write_mod_reg(wken_wkup, WKUP_MOD, PM_WKEN); | ||
277 | |||
278 | return 0; | ||
279 | } | ||
280 | |||
281 | static int omap2_pm_enter(suspend_state_t state) | 254 | static int omap2_pm_enter(suspend_state_t state) |
282 | { | 255 | { |
283 | int ret = 0; | 256 | int ret = 0; |
@@ -285,7 +258,7 @@ static int omap2_pm_enter(suspend_state_t state) | |||
285 | switch (state) { | 258 | switch (state) { |
286 | case PM_SUSPEND_STANDBY: | 259 | case PM_SUSPEND_STANDBY: |
287 | case PM_SUSPEND_MEM: | 260 | case PM_SUSPEND_MEM: |
288 | ret = omap2_pm_suspend(); | 261 | omap2_enter_full_retention(); |
289 | break; | 262 | break; |
290 | default: | 263 | default: |
291 | ret = -EINVAL; | 264 | ret = -EINVAL; |
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index b77df735fa6c..816c7940d301 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c | |||
@@ -75,16 +75,6 @@ static struct powerdomain *mpu_pwrdm, *neon_pwrdm; | |||
75 | static struct powerdomain *core_pwrdm, *per_pwrdm; | 75 | static struct powerdomain *core_pwrdm, *per_pwrdm; |
76 | static struct powerdomain *cam_pwrdm; | 76 | static struct powerdomain *cam_pwrdm; |
77 | 77 | ||
78 | static inline void omap3_per_save_context(void) | ||
79 | { | ||
80 | omap_gpio_save_context(); | ||
81 | } | ||
82 | |||
83 | static inline void omap3_per_restore_context(void) | ||
84 | { | ||
85 | omap_gpio_restore_context(); | ||
86 | } | ||
87 | |||
88 | static void omap3_enable_io_chain(void) | 78 | static void omap3_enable_io_chain(void) |
89 | { | 79 | { |
90 | int timeout = 0; | 80 | int timeout = 0; |
@@ -332,8 +322,6 @@ void omap_sram_idle(void) | |||
332 | if (per_next_state < PWRDM_POWER_ON) { | 322 | if (per_next_state < PWRDM_POWER_ON) { |
333 | per_going_off = (per_next_state == PWRDM_POWER_OFF) ? 1 : 0; | 323 | per_going_off = (per_next_state == PWRDM_POWER_OFF) ? 1 : 0; |
334 | omap2_gpio_prepare_for_idle(per_going_off); | 324 | omap2_gpio_prepare_for_idle(per_going_off); |
335 | if (per_next_state == PWRDM_POWER_OFF) | ||
336 | omap3_per_save_context(); | ||
337 | } | 325 | } |
338 | 326 | ||
339 | /* CORE */ | 327 | /* CORE */ |
@@ -399,8 +387,6 @@ void omap_sram_idle(void) | |||
399 | if (per_next_state < PWRDM_POWER_ON) { | 387 | if (per_next_state < PWRDM_POWER_ON) { |
400 | per_prev_state = pwrdm_read_prev_pwrst(per_pwrdm); | 388 | per_prev_state = pwrdm_read_prev_pwrst(per_pwrdm); |
401 | omap2_gpio_resume_after_idle(); | 389 | omap2_gpio_resume_after_idle(); |
402 | if (per_prev_state == PWRDM_POWER_OFF) | ||
403 | omap3_per_restore_context(); | ||
404 | } | 390 | } |
405 | 391 | ||
406 | /* Disable IO-PAD and IO-CHAIN wakeup */ | 392 | /* Disable IO-PAD and IO-CHAIN wakeup */ |
diff --git a/arch/arm/mach-omap2/prcm_mpu44xx.c b/arch/arm/mach-omap2/prcm_mpu44xx.c index ca669b50f390..928dbd4f20ed 100644 --- a/arch/arm/mach-omap2/prcm_mpu44xx.c +++ b/arch/arm/mach-omap2/prcm_mpu44xx.c | |||
@@ -15,8 +15,8 @@ | |||
15 | #include <linux/err.h> | 15 | #include <linux/err.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | 17 | ||
18 | #include "iomap.h" | ||
18 | #include "common.h" | 19 | #include "common.h" |
19 | |||
20 | #include "prcm_mpu44xx.h" | 20 | #include "prcm_mpu44xx.h" |
21 | #include "cm-regbits-44xx.h" | 21 | #include "cm-regbits-44xx.h" |
22 | 22 | ||
diff --git a/arch/arm/mach-omap2/prm2xxx_3xxx.c b/arch/arm/mach-omap2/prm2xxx_3xxx.c index c1c4d86a79a8..9ce765407ad5 100644 --- a/arch/arm/mach-omap2/prm2xxx_3xxx.c +++ b/arch/arm/mach-omap2/prm2xxx_3xxx.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include "common.h" | 19 | #include "common.h" |
20 | #include <plat/cpu.h> | 20 | #include <plat/cpu.h> |
21 | #include <plat/prcm.h> | 21 | #include <plat/prcm.h> |
22 | #include <plat/irqs.h> | ||
22 | 23 | ||
23 | #include "vp.h" | 24 | #include "vp.h" |
24 | 25 | ||
diff --git a/arch/arm/mach-omap2/prm44xx.c b/arch/arm/mach-omap2/prm44xx.c index 33dd655e6aab..eac623c7c3d8 100644 --- a/arch/arm/mach-omap2/prm44xx.c +++ b/arch/arm/mach-omap2/prm44xx.c | |||
@@ -17,10 +17,12 @@ | |||
17 | #include <linux/err.h> | 17 | #include <linux/err.h> |
18 | #include <linux/io.h> | 18 | #include <linux/io.h> |
19 | 19 | ||
20 | #include "common.h" | ||
21 | #include <plat/cpu.h> | 20 | #include <plat/cpu.h> |
21 | #include <plat/irqs.h> | ||
22 | #include <plat/prcm.h> | 22 | #include <plat/prcm.h> |
23 | 23 | ||
24 | #include "iomap.h" | ||
25 | #include "common.h" | ||
24 | #include "vp.h" | 26 | #include "vp.h" |
25 | #include "prm44xx.h" | 27 | #include "prm44xx.h" |
26 | #include "prm-regbits-44xx.h" | 28 | #include "prm-regbits-44xx.h" |
diff --git a/arch/arm/mach-omap2/prminst44xx.c b/arch/arm/mach-omap2/prminst44xx.c index f6de5bc6b12a..9b3898a3ac9b 100644 --- a/arch/arm/mach-omap2/prminst44xx.c +++ b/arch/arm/mach-omap2/prminst44xx.c | |||
@@ -16,8 +16,8 @@ | |||
16 | #include <linux/err.h> | 16 | #include <linux/err.h> |
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | 18 | ||
19 | #include "iomap.h" | ||
19 | #include "common.h" | 20 | #include "common.h" |
20 | |||
21 | #include "prm44xx.h" | 21 | #include "prm44xx.h" |
22 | #include "prminst44xx.h" | 22 | #include "prminst44xx.h" |
23 | #include "prm-regbits-44xx.h" | 23 | #include "prm-regbits-44xx.h" |
diff --git a/arch/arm/mach-omap2/sdram-nokia.c b/arch/arm/mach-omap2/sdram-nokia.c index 7479d7ea1379..845c4fd2b125 100644 --- a/arch/arm/mach-omap2/sdram-nokia.c +++ b/arch/arm/mach-omap2/sdram-nokia.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/err.h> | 17 | #include <linux/err.h> |
18 | #include <linux/io.h> | 18 | #include <linux/io.h> |
19 | 19 | ||
20 | #include <plat/io.h> | ||
21 | #include "common.h" | 20 | #include "common.h" |
22 | #include <plat/clock.h> | 21 | #include <plat/clock.h> |
23 | #include <plat/sdrc.h> | 22 | #include <plat/sdrc.h> |
diff --git a/arch/arm/mach-omap2/sdrc2xxx.c b/arch/arm/mach-omap2/sdrc2xxx.c index 791a63cdceb2..1133bb2f632b 100644 --- a/arch/arm/mach-omap2/sdrc2xxx.c +++ b/arch/arm/mach-omap2/sdrc2xxx.c | |||
@@ -24,13 +24,15 @@ | |||
24 | #include <linux/clk.h> | 24 | #include <linux/clk.h> |
25 | #include <linux/io.h> | 25 | #include <linux/io.h> |
26 | 26 | ||
27 | #include "common.h" | 27 | #include <plat/hardware.h> |
28 | #include <plat/clock.h> | 28 | #include <plat/clock.h> |
29 | #include <plat/sram.h> | 29 | #include <plat/sram.h> |
30 | #include <plat/sdrc.h> | ||
30 | 31 | ||
32 | #include "iomap.h" | ||
33 | #include "common.h" | ||
31 | #include "prm2xxx_3xxx.h" | 34 | #include "prm2xxx_3xxx.h" |
32 | #include "clock.h" | 35 | #include "clock.h" |
33 | #include <plat/sdrc.h> | ||
34 | #include "sdrc.h" | 36 | #include "sdrc.h" |
35 | 37 | ||
36 | /* Memory timing, DLL mode flags */ | 38 | /* Memory timing, DLL mode flags */ |
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index 247d89478f24..f590afc1f673 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c | |||
@@ -107,18 +107,18 @@ static void omap_uart_set_noidle(struct platform_device *pdev) | |||
107 | omap_hwmod_set_slave_idlemode(od->hwmods[0], HWMOD_IDLEMODE_NO); | 107 | omap_hwmod_set_slave_idlemode(od->hwmods[0], HWMOD_IDLEMODE_NO); |
108 | } | 108 | } |
109 | 109 | ||
110 | static void omap_uart_set_forceidle(struct platform_device *pdev) | 110 | static void omap_uart_set_smartidle(struct platform_device *pdev) |
111 | { | 111 | { |
112 | struct omap_device *od = to_omap_device(pdev); | 112 | struct omap_device *od = to_omap_device(pdev); |
113 | 113 | ||
114 | omap_hwmod_set_slave_idlemode(od->hwmods[0], HWMOD_IDLEMODE_FORCE); | 114 | omap_hwmod_set_slave_idlemode(od->hwmods[0], HWMOD_IDLEMODE_SMART); |
115 | } | 115 | } |
116 | 116 | ||
117 | #else | 117 | #else |
118 | static void omap_uart_enable_wakeup(struct platform_device *pdev, bool enable) | 118 | static void omap_uart_enable_wakeup(struct platform_device *pdev, bool enable) |
119 | {} | 119 | {} |
120 | static void omap_uart_set_noidle(struct platform_device *pdev) {} | 120 | static void omap_uart_set_noidle(struct platform_device *pdev) {} |
121 | static void omap_uart_set_forceidle(struct platform_device *pdev) {} | 121 | static void omap_uart_set_smartidle(struct platform_device *pdev) {} |
122 | #endif /* CONFIG_PM */ | 122 | #endif /* CONFIG_PM */ |
123 | 123 | ||
124 | #ifdef CONFIG_OMAP_MUX | 124 | #ifdef CONFIG_OMAP_MUX |
@@ -349,7 +349,7 @@ void __init omap_serial_init_port(struct omap_board_data *bdata, | |||
349 | omap_up.uartclk = OMAP24XX_BASE_BAUD * 16; | 349 | omap_up.uartclk = OMAP24XX_BASE_BAUD * 16; |
350 | omap_up.flags = UPF_BOOT_AUTOCONF; | 350 | omap_up.flags = UPF_BOOT_AUTOCONF; |
351 | omap_up.get_context_loss_count = omap_pm_get_dev_context_loss_count; | 351 | omap_up.get_context_loss_count = omap_pm_get_dev_context_loss_count; |
352 | omap_up.set_forceidle = omap_uart_set_forceidle; | 352 | omap_up.set_forceidle = omap_uart_set_smartidle; |
353 | omap_up.set_noidle = omap_uart_set_noidle; | 353 | omap_up.set_noidle = omap_uart_set_noidle; |
354 | omap_up.enable_wakeup = omap_uart_enable_wakeup; | 354 | omap_up.enable_wakeup = omap_uart_enable_wakeup; |
355 | omap_up.dma_rx_buf_size = info->dma_rx_buf_size; | 355 | omap_up.dma_rx_buf_size = info->dma_rx_buf_size; |
diff --git a/arch/arm/mach-omap2/sleep24xx.S b/arch/arm/mach-omap2/sleep24xx.S index b5071a47ec39..d4bf904d84ab 100644 --- a/arch/arm/mach-omap2/sleep24xx.S +++ b/arch/arm/mach-omap2/sleep24xx.S | |||
@@ -27,7 +27,6 @@ | |||
27 | 27 | ||
28 | #include <linux/linkage.h> | 28 | #include <linux/linkage.h> |
29 | #include <asm/assembler.h> | 29 | #include <asm/assembler.h> |
30 | #include <mach/io.h> | ||
31 | 30 | ||
32 | #include <plat/omap24xx.h> | 31 | #include <plat/omap24xx.h> |
33 | 32 | ||
diff --git a/arch/arm/mach-omap2/sleep34xx.S b/arch/arm/mach-omap2/sleep34xx.S index f2ea1bd1c691..1f62f23673fb 100644 --- a/arch/arm/mach-omap2/sleep34xx.S +++ b/arch/arm/mach-omap2/sleep34xx.S | |||
@@ -23,10 +23,13 @@ | |||
23 | * MA 02111-1307 USA | 23 | * MA 02111-1307 USA |
24 | */ | 24 | */ |
25 | #include <linux/linkage.h> | 25 | #include <linux/linkage.h> |
26 | |||
26 | #include <asm/assembler.h> | 27 | #include <asm/assembler.h> |
28 | |||
29 | #include <plat/hardware.h> | ||
27 | #include <plat/sram.h> | 30 | #include <plat/sram.h> |
28 | #include <mach/io.h> | ||
29 | 31 | ||
32 | #include "iomap.h" | ||
30 | #include "cm2xxx_3xxx.h" | 33 | #include "cm2xxx_3xxx.h" |
31 | #include "prm2xxx_3xxx.h" | 34 | #include "prm2xxx_3xxx.h" |
32 | #include "sdrc.h" | 35 | #include "sdrc.h" |
diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c index 9dd93453e563..7e755bb0ffc4 100644 --- a/arch/arm/mach-omap2/smartreflex.c +++ b/arch/arm/mach-omap2/smartreflex.c | |||
@@ -897,7 +897,7 @@ static int __init omap_sr_probe(struct platform_device *pdev) | |||
897 | ret = sr_late_init(sr_info); | 897 | ret = sr_late_init(sr_info); |
898 | if (ret) { | 898 | if (ret) { |
899 | pr_warning("%s: Error in SR late init\n", __func__); | 899 | pr_warning("%s: Error in SR late init\n", __func__); |
900 | return ret; | 900 | goto err_iounmap; |
901 | } | 901 | } |
902 | } | 902 | } |
903 | 903 | ||
diff --git a/arch/arm/mach-omap2/sram242x.S b/arch/arm/mach-omap2/sram242x.S index ff9b9dbcb30e..ee0bfcc1410f 100644 --- a/arch/arm/mach-omap2/sram242x.S +++ b/arch/arm/mach-omap2/sram242x.S | |||
@@ -29,10 +29,12 @@ | |||
29 | * These crashes may be intermittent. | 29 | * These crashes may be intermittent. |
30 | */ | 30 | */ |
31 | #include <linux/linkage.h> | 31 | #include <linux/linkage.h> |
32 | |||
32 | #include <asm/assembler.h> | 33 | #include <asm/assembler.h> |
33 | #include <mach/io.h> | 34 | |
34 | #include <mach/hardware.h> | 35 | #include <mach/hardware.h> |
35 | 36 | ||
37 | #include "iomap.h" | ||
36 | #include "prm2xxx_3xxx.h" | 38 | #include "prm2xxx_3xxx.h" |
37 | #include "cm2xxx_3xxx.h" | 39 | #include "cm2xxx_3xxx.h" |
38 | #include "sdrc.h" | 40 | #include "sdrc.h" |
diff --git a/arch/arm/mach-omap2/sram243x.S b/arch/arm/mach-omap2/sram243x.S index 76730209fa0e..d4d39ef04769 100644 --- a/arch/arm/mach-omap2/sram243x.S +++ b/arch/arm/mach-omap2/sram243x.S | |||
@@ -29,10 +29,12 @@ | |||
29 | * These crashes may be intermittent. | 29 | * These crashes may be intermittent. |
30 | */ | 30 | */ |
31 | #include <linux/linkage.h> | 31 | #include <linux/linkage.h> |
32 | |||
32 | #include <asm/assembler.h> | 33 | #include <asm/assembler.h> |
33 | #include <mach/io.h> | 34 | |
34 | #include <mach/hardware.h> | 35 | #include <mach/hardware.h> |
35 | 36 | ||
37 | #include "iomap.h" | ||
36 | #include "prm2xxx_3xxx.h" | 38 | #include "prm2xxx_3xxx.h" |
37 | #include "cm2xxx_3xxx.h" | 39 | #include "cm2xxx_3xxx.h" |
38 | #include "sdrc.h" | 40 | #include "sdrc.h" |
diff --git a/arch/arm/mach-omap2/sram34xx.S b/arch/arm/mach-omap2/sram34xx.S index 6f5849aaa7c0..df5a21322b0a 100644 --- a/arch/arm/mach-omap2/sram34xx.S +++ b/arch/arm/mach-omap2/sram34xx.S | |||
@@ -26,11 +26,12 @@ | |||
26 | * MA 02111-1307 USA | 26 | * MA 02111-1307 USA |
27 | */ | 27 | */ |
28 | #include <linux/linkage.h> | 28 | #include <linux/linkage.h> |
29 | |||
29 | #include <asm/assembler.h> | 30 | #include <asm/assembler.h> |
30 | #include <mach/hardware.h> | ||
31 | 31 | ||
32 | #include <mach/io.h> | 32 | #include <mach/hardware.h> |
33 | 33 | ||
34 | #include "iomap.h" | ||
34 | #include "sdrc.h" | 35 | #include "sdrc.h" |
35 | #include "cm2xxx_3xxx.h" | 36 | #include "cm2xxx_3xxx.h" |
36 | 37 | ||
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index 6eeff0e0ae01..5c9acea95761 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c | |||
@@ -270,7 +270,7 @@ static struct clocksource clocksource_gpt = { | |||
270 | static u32 notrace dmtimer_read_sched_clock(void) | 270 | static u32 notrace dmtimer_read_sched_clock(void) |
271 | { | 271 | { |
272 | if (clksrc.reserved) | 272 | if (clksrc.reserved) |
273 | return __omap_dm_timer_read_counter(clksrc.io_base, 1); | 273 | return __omap_dm_timer_read_counter(&clksrc, 1); |
274 | 274 | ||
275 | return 0; | 275 | return 0; |
276 | } | 276 | } |
diff --git a/arch/arm/mach-omap2/vc.c b/arch/arm/mach-omap2/vc.c index 031d116fbf10..175b7d86d86a 100644 --- a/arch/arm/mach-omap2/vc.c +++ b/arch/arm/mach-omap2/vc.c | |||
@@ -247,7 +247,7 @@ static void __init omap4_vc_init_channel(struct voltagedomain *voltdm) | |||
247 | * omap_vc_i2c_init - initialize I2C interface to PMIC | 247 | * omap_vc_i2c_init - initialize I2C interface to PMIC |
248 | * @voltdm: voltage domain containing VC data | 248 | * @voltdm: voltage domain containing VC data |
249 | * | 249 | * |
250 | * Use PMIC supplied seetings for I2C high-speed mode and | 250 | * Use PMIC supplied settings for I2C high-speed mode and |
251 | * master code (if set) and program the VC I2C configuration | 251 | * master code (if set) and program the VC I2C configuration |
252 | * register. | 252 | * register. |
253 | * | 253 | * |
@@ -265,8 +265,8 @@ static void __init omap_vc_i2c_init(struct voltagedomain *voltdm) | |||
265 | 265 | ||
266 | if (initialized) { | 266 | if (initialized) { |
267 | if (voltdm->pmic->i2c_high_speed != i2c_high_speed) | 267 | if (voltdm->pmic->i2c_high_speed != i2c_high_speed) |
268 | pr_warn("%s: I2C config for all channels must match.", | 268 | pr_warn("%s: I2C config for vdd_%s does not match other channels (%u).", |
269 | __func__); | 269 | __func__, voltdm->name, i2c_high_speed); |
270 | return; | 270 | return; |
271 | } | 271 | } |
272 | 272 | ||
@@ -292,9 +292,7 @@ void __init omap_vc_init_channel(struct voltagedomain *voltdm) | |||
292 | u32 val; | 292 | u32 val; |
293 | 293 | ||
294 | if (!voltdm->pmic || !voltdm->pmic->uv_to_vsel) { | 294 | if (!voltdm->pmic || !voltdm->pmic->uv_to_vsel) { |
295 | pr_err("%s: PMIC info requried to configure vc for" | 295 | pr_err("%s: No PMIC info for vdd_%s\n", __func__, voltdm->name); |
296 | "vdd_%s not populated.Hence cannot initialize vc\n", | ||
297 | __func__, voltdm->name); | ||
298 | return; | 296 | return; |
299 | } | 297 | } |
300 | 298 | ||
diff --git a/arch/arm/mach-omap2/voltagedomains3xxx_data.c b/arch/arm/mach-omap2/voltagedomains3xxx_data.c index c005e2f5e383..57db2038b23c 100644 --- a/arch/arm/mach-omap2/voltagedomains3xxx_data.c +++ b/arch/arm/mach-omap2/voltagedomains3xxx_data.c | |||
@@ -108,6 +108,7 @@ void __init omap3xxx_voltagedomains_init(void) | |||
108 | * XXX Will depend on the process, validation, and binning | 108 | * XXX Will depend on the process, validation, and binning |
109 | * for the currently-running IC | 109 | * for the currently-running IC |
110 | */ | 110 | */ |
111 | #ifdef CONFIG_PM_OPP | ||
111 | if (cpu_is_omap3630()) { | 112 | if (cpu_is_omap3630()) { |
112 | omap3_voltdm_mpu.volt_data = omap36xx_vddmpu_volt_data; | 113 | omap3_voltdm_mpu.volt_data = omap36xx_vddmpu_volt_data; |
113 | omap3_voltdm_core.volt_data = omap36xx_vddcore_volt_data; | 114 | omap3_voltdm_core.volt_data = omap36xx_vddcore_volt_data; |
@@ -115,6 +116,7 @@ void __init omap3xxx_voltagedomains_init(void) | |||
115 | omap3_voltdm_mpu.volt_data = omap34xx_vddmpu_volt_data; | 116 | omap3_voltdm_mpu.volt_data = omap34xx_vddmpu_volt_data; |
116 | omap3_voltdm_core.volt_data = omap34xx_vddcore_volt_data; | 117 | omap3_voltdm_core.volt_data = omap34xx_vddcore_volt_data; |
117 | } | 118 | } |
119 | #endif | ||
118 | 120 | ||
119 | if (cpu_is_omap3517() || cpu_is_omap3505()) | 121 | if (cpu_is_omap3517() || cpu_is_omap3505()) |
120 | voltdms = voltagedomains_am35xx; | 122 | voltdms = voltagedomains_am35xx; |
diff --git a/arch/arm/mach-omap2/voltagedomains44xx_data.c b/arch/arm/mach-omap2/voltagedomains44xx_data.c index 4e11d022595d..c3115f6853d4 100644 --- a/arch/arm/mach-omap2/voltagedomains44xx_data.c +++ b/arch/arm/mach-omap2/voltagedomains44xx_data.c | |||
@@ -100,9 +100,11 @@ void __init omap44xx_voltagedomains_init(void) | |||
100 | * XXX Will depend on the process, validation, and binning | 100 | * XXX Will depend on the process, validation, and binning |
101 | * for the currently-running IC | 101 | * for the currently-running IC |
102 | */ | 102 | */ |
103 | #ifdef CONFIG_PM_OPP | ||
103 | omap4_voltdm_mpu.volt_data = omap44xx_vdd_mpu_volt_data; | 104 | omap4_voltdm_mpu.volt_data = omap44xx_vdd_mpu_volt_data; |
104 | omap4_voltdm_iva.volt_data = omap44xx_vdd_iva_volt_data; | 105 | omap4_voltdm_iva.volt_data = omap44xx_vdd_iva_volt_data; |
105 | omap4_voltdm_core.volt_data = omap44xx_vdd_core_volt_data; | 106 | omap4_voltdm_core.volt_data = omap44xx_vdd_core_volt_data; |
107 | #endif | ||
106 | 108 | ||
107 | for (i = 0; voltdm = voltagedomains_omap4[i], voltdm; i++) | 109 | for (i = 0; voltdm = voltagedomains_omap4[i], voltdm; i++) |
108 | voltdm->sys_clk.name = sys_clk_name; | 110 | voltdm->sys_clk.name = sys_clk_name; |
diff --git a/arch/arm/mach-omap2/vp.c b/arch/arm/mach-omap2/vp.c index 807391d84a9d..0df88820978d 100644 --- a/arch/arm/mach-omap2/vp.c +++ b/arch/arm/mach-omap2/vp.c | |||
@@ -41,6 +41,11 @@ void __init omap_vp_init(struct voltagedomain *voltdm) | |||
41 | u32 val, sys_clk_rate, timeout, waittime; | 41 | u32 val, sys_clk_rate, timeout, waittime; |
42 | u32 vddmin, vddmax, vstepmin, vstepmax; | 42 | u32 vddmin, vddmax, vstepmin, vstepmax; |
43 | 43 | ||
44 | if (!voltdm->pmic || !voltdm->pmic->uv_to_vsel) { | ||
45 | pr_err("%s: No PMIC info for vdd_%s\n", __func__, voltdm->name); | ||
46 | return; | ||
47 | } | ||
48 | |||
44 | if (!voltdm->read || !voltdm->write) { | 49 | if (!voltdm->read || !voltdm->write) { |
45 | pr_err("%s: No read/write API for accessing vdd_%s regs\n", | 50 | pr_err("%s: No read/write API for accessing vdd_%s regs\n", |
46 | __func__, voltdm->name); | 51 | __func__, voltdm->name); |
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index 0e28bae20bd4..5dad38ec00ea 100644 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
30 | #include <mach/orion5x.h> | 30 | #include <mach/orion5x.h> |
31 | #include <plat/orion_nand.h> | 31 | #include <plat/orion_nand.h> |
32 | #include <plat/ehci-orion.h> | ||
32 | #include <plat/time.h> | 33 | #include <plat/time.h> |
33 | #include <plat/common.h> | 34 | #include <plat/common.h> |
34 | #include <plat/addr-map.h> | 35 | #include <plat/addr-map.h> |
@@ -72,7 +73,8 @@ void __init orion5x_map_io(void) | |||
72 | ****************************************************************************/ | 73 | ****************************************************************************/ |
73 | void __init orion5x_ehci0_init(void) | 74 | void __init orion5x_ehci0_init(void) |
74 | { | 75 | { |
75 | orion_ehci_init(ORION5X_USB0_PHYS_BASE, IRQ_ORION5X_USB0_CTRL); | 76 | orion_ehci_init(ORION5X_USB0_PHYS_BASE, IRQ_ORION5X_USB0_CTRL, |
77 | EHCI_PHY_ORION); | ||
76 | } | 78 | } |
77 | 79 | ||
78 | 80 | ||
diff --git a/arch/arm/mach-orion5x/include/mach/entry-macro.S b/arch/arm/mach-orion5x/include/mach/entry-macro.S index d658992e5401..79eb502a1e64 100644 --- a/arch/arm/mach-orion5x/include/mach/entry-macro.S +++ b/arch/arm/mach-orion5x/include/mach/entry-macro.S | |||
@@ -10,12 +10,6 @@ | |||
10 | 10 | ||
11 | #include <mach/bridge-regs.h> | 11 | #include <mach/bridge-regs.h> |
12 | 12 | ||
13 | .macro disable_fiq | ||
14 | .endm | ||
15 | |||
16 | .macro arch_ret_to_user, tmp1, tmp2 | ||
17 | .endm | ||
18 | |||
19 | .macro get_irqnr_preamble, base, tmp | 13 | .macro get_irqnr_preamble, base, tmp |
20 | ldr \base, =MAIN_IRQ_CAUSE | 14 | ldr \base, =MAIN_IRQ_CAUSE |
21 | .endm | 15 | .endm |
diff --git a/arch/arm/mach-picoxcell/include/mach/entry-macro.S b/arch/arm/mach-picoxcell/include/mach/entry-macro.S deleted file mode 100644 index 9b505ac00be9..000000000000 --- a/arch/arm/mach-picoxcell/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | /* | ||
2 | * entry-macro.S | ||
3 | * | ||
4 | * Copyright (c) 2011 Picochip Ltd., Jamie Iles | ||
5 | * | ||
6 | * Low-level IRQ helper macros for picoXcell platforms | ||
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 | .macro disable_fiq | ||
13 | .endm | ||
14 | |||
15 | .macro arch_ret_to_user, tmp1, tmp2 | ||
16 | .endm | ||
diff --git a/arch/arm/mach-pnx4008/include/mach/entry-macro.S b/arch/arm/mach-pnx4008/include/mach/entry-macro.S index db7eeebf30d7..77a555846719 100644 --- a/arch/arm/mach-pnx4008/include/mach/entry-macro.S +++ b/arch/arm/mach-pnx4008/include/mach/entry-macro.S | |||
@@ -25,15 +25,9 @@ | |||
25 | #define SIC1_BASE_INT 32 | 25 | #define SIC1_BASE_INT 32 |
26 | #define SIC2_BASE_INT 64 | 26 | #define SIC2_BASE_INT 64 |
27 | 27 | ||
28 | .macro disable_fiq | ||
29 | .endm | ||
30 | |||
31 | .macro get_irqnr_preamble, base, tmp | 28 | .macro get_irqnr_preamble, base, tmp |
32 | .endm | 29 | .endm |
33 | 30 | ||
34 | .macro arch_ret_to_user, tmp1, tmp2 | ||
35 | .endm | ||
36 | |||
37 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 31 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
38 | /* decode the MIC interrupt numbers */ | 32 | /* decode the MIC interrupt numbers */ |
39 | ldr \base, =IO_ADDRESS(PNX4008_INTCTRLMIC_BASE) | 33 | ldr \base, =IO_ADDRESS(PNX4008_INTCTRLMIC_BASE) |
diff --git a/arch/arm/mach-prima2/include/mach/entry-macro.S b/arch/arm/mach-prima2/include/mach/entry-macro.S index 1c8a50f102a7..86434e7a5be9 100644 --- a/arch/arm/mach-prima2/include/mach/entry-macro.S +++ b/arch/arm/mach-prima2/include/mach/entry-macro.S | |||
@@ -20,10 +20,3 @@ | |||
20 | cmp \irqnr, #0x40 @ the irq num can't be larger than 0x3f | 20 | cmp \irqnr, #0x40 @ the irq num can't be larger than 0x3f |
21 | movges \irqnr, #0 | 21 | movges \irqnr, #0 |
22 | .endm | 22 | .endm |
23 | |||
24 | .macro disable_fiq | ||
25 | .endm | ||
26 | |||
27 | .macro arch_ret_to_user, tmp1, tmp2 | ||
28 | .endm | ||
29 | |||
diff --git a/arch/arm/mach-pxa/include/mach/entry-macro.S b/arch/arm/mach-pxa/include/mach/entry-macro.S deleted file mode 100644 index 260c0c17692a..000000000000 --- a/arch/arm/mach-pxa/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-pxa/include/mach/entry-macro.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for PXA-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 | |||
11 | .macro disable_fiq | ||
12 | .endm | ||
13 | |||
14 | .macro arch_ret_to_user, tmp1, tmp2 | ||
15 | .endm | ||
diff --git a/arch/arm/mach-realview/include/mach/entry-macro.S b/arch/arm/mach-realview/include/mach/entry-macro.S deleted file mode 100644 index e8a5179c2653..000000000000 --- a/arch/arm/mach-realview/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-realview/include/mach/entry-macro.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for RealView 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 | |||
11 | .macro disable_fiq | ||
12 | .endm | ||
13 | |||
14 | .macro arch_ret_to_user, tmp1, tmp2 | ||
15 | .endm | ||
16 | |||
diff --git a/arch/arm/mach-rpc/Makefile b/arch/arm/mach-rpc/Makefile index aa77bc9efbbb..dfa405c0cfde 100644 --- a/arch/arm/mach-rpc/Makefile +++ b/arch/arm/mach-rpc/Makefile | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | # Object file lists. | 5 | # Object file lists. |
6 | 6 | ||
7 | obj-y := dma.o irq.o riscpc.o | 7 | obj-y := dma.o fiq.o irq.o riscpc.o |
8 | obj-m := | 8 | obj-m := |
9 | obj-n := | 9 | obj-n := |
10 | obj- := | 10 | obj- := |
diff --git a/arch/arm/mach-rpc/fiq.S b/arch/arm/mach-rpc/fiq.S new file mode 100644 index 000000000000..48ddd57db16e --- /dev/null +++ b/arch/arm/mach-rpc/fiq.S | |||
@@ -0,0 +1,16 @@ | |||
1 | #include <linux/linkage.h> | ||
2 | #include <asm/assembler.h> | ||
3 | #include <mach/hardware.h> | ||
4 | #include <mach/entry-macro.S> | ||
5 | |||
6 | .text | ||
7 | |||
8 | .global rpc_default_fiq_end | ||
9 | ENTRY(rpc_default_fiq_start) | ||
10 | mov r12, #ioc_base_high | ||
11 | .if ioc_base_low | ||
12 | orr r12, r12, #ioc_base_low | ||
13 | .endif | ||
14 | strb r12, [r12, #0x38] @ Disable FIQ register | ||
15 | subs pc, lr, #4 | ||
16 | rpc_default_fiq_end: | ||
diff --git a/arch/arm/mach-rpc/include/mach/entry-macro.S b/arch/arm/mach-rpc/include/mach/entry-macro.S index 4e7e54144093..7178368d7062 100644 --- a/arch/arm/mach-rpc/include/mach/entry-macro.S +++ b/arch/arm/mach-rpc/include/mach/entry-macro.S | |||
@@ -10,7 +10,3 @@ | |||
10 | orr \base, \base, #ioc_base_low | 10 | orr \base, \base, #ioc_base_low |
11 | .endif | 11 | .endif |
12 | .endm | 12 | .endm |
13 | |||
14 | .macro arch_ret_to_user, tmp1, tmp2 | ||
15 | .endm | ||
16 | |||
diff --git a/arch/arm/mach-rpc/irq.c b/arch/arm/mach-rpc/irq.c index 2e1b5309fbab..cf0e669eaf1a 100644 --- a/arch/arm/mach-rpc/irq.c +++ b/arch/arm/mach-rpc/irq.c | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <asm/mach/irq.h> | 5 | #include <asm/mach/irq.h> |
6 | #include <asm/hardware/iomd.h> | 6 | #include <asm/hardware/iomd.h> |
7 | #include <asm/irq.h> | 7 | #include <asm/irq.h> |
8 | #include <asm/fiq.h> | ||
8 | 9 | ||
9 | static void iomd_ack_irq_a(struct irq_data *d) | 10 | static void iomd_ack_irq_a(struct irq_data *d) |
10 | { | 11 | { |
@@ -112,6 +113,8 @@ static struct irq_chip iomd_fiq_chip = { | |||
112 | .irq_unmask = iomd_unmask_irq_fiq, | 113 | .irq_unmask = iomd_unmask_irq_fiq, |
113 | }; | 114 | }; |
114 | 115 | ||
116 | extern unsigned char rpc_default_fiq_start, rpc_default_fiq_end; | ||
117 | |||
115 | void __init rpc_init_irq(void) | 118 | void __init rpc_init_irq(void) |
116 | { | 119 | { |
117 | unsigned int irq, flags; | 120 | unsigned int irq, flags; |
@@ -121,6 +124,9 @@ void __init rpc_init_irq(void) | |||
121 | iomd_writeb(0, IOMD_FIQMASK); | 124 | iomd_writeb(0, IOMD_FIQMASK); |
122 | iomd_writeb(0, IOMD_DMAMASK); | 125 | iomd_writeb(0, IOMD_DMAMASK); |
123 | 126 | ||
127 | set_fiq_handler(&rpc_default_fiq_start, | ||
128 | &rpc_default_fiq_end - &rpc_default_fiq_start); | ||
129 | |||
124 | for (irq = 0; irq < NR_IRQS; irq++) { | 130 | for (irq = 0; irq < NR_IRQS; irq++) { |
125 | flags = IRQF_VALID; | 131 | flags = IRQF_VALID; |
126 | 132 | ||
diff --git a/arch/arm/mach-s3c2410/cpu-freq.c b/arch/arm/mach-s3c2410/cpu-freq.c index 7dc6c46b5e2b..5404535da1a5 100644 --- a/arch/arm/mach-s3c2410/cpu-freq.c +++ b/arch/arm/mach-s3c2410/cpu-freq.c | |||
@@ -115,7 +115,8 @@ static struct s3c_cpufreq_info s3c2410_cpufreq_info = { | |||
115 | .debug_io_show = s3c_cpufreq_debugfs_call(s3c2410_iotiming_debugfs), | 115 | .debug_io_show = s3c_cpufreq_debugfs_call(s3c2410_iotiming_debugfs), |
116 | }; | 116 | }; |
117 | 117 | ||
118 | static int s3c2410_cpufreq_add(struct device *dev) | 118 | static int s3c2410_cpufreq_add(struct device *dev, |
119 | struct subsys_interface *sif) | ||
119 | { | 120 | { |
120 | return s3c_cpufreq_register(&s3c2410_cpufreq_info); | 121 | return s3c_cpufreq_register(&s3c2410_cpufreq_info); |
121 | } | 122 | } |
@@ -133,7 +134,8 @@ static int __init s3c2410_cpufreq_init(void) | |||
133 | 134 | ||
134 | arch_initcall(s3c2410_cpufreq_init); | 135 | arch_initcall(s3c2410_cpufreq_init); |
135 | 136 | ||
136 | static int s3c2410a_cpufreq_add(struct device *dev) | 137 | static int s3c2410a_cpufreq_add(struct device *dev, |
138 | struct subsys_interface *sif) | ||
137 | { | 139 | { |
138 | /* alter the maximum freq settings for S3C2410A. If a board knows | 140 | /* alter the maximum freq settings for S3C2410A. If a board knows |
139 | * it only has a maximum of 200, then it should register its own | 141 | * it only has a maximum of 200, then it should register its own |
@@ -144,7 +146,7 @@ static int s3c2410a_cpufreq_add(struct device *dev) | |||
144 | s3c2410_cpufreq_info.max.pclk = 66500000; | 146 | s3c2410_cpufreq_info.max.pclk = 66500000; |
145 | s3c2410_cpufreq_info.name = "s3c2410a"; | 147 | s3c2410_cpufreq_info.name = "s3c2410a"; |
146 | 148 | ||
147 | return s3c2410_cpufreq_add(dev); | 149 | return s3c2410_cpufreq_add(dev, sif); |
148 | } | 150 | } |
149 | 151 | ||
150 | static struct subsys_interface s3c2410a_cpufreq_interface = { | 152 | static struct subsys_interface s3c2410a_cpufreq_interface = { |
diff --git a/arch/arm/mach-s3c2410/dma.c b/arch/arm/mach-s3c2410/dma.c index 2afd00014a77..4803338cf56e 100644 --- a/arch/arm/mach-s3c2410/dma.c +++ b/arch/arm/mach-s3c2410/dma.c | |||
@@ -132,7 +132,8 @@ static struct s3c24xx_dma_order __initdata s3c2410_dma_order = { | |||
132 | }, | 132 | }, |
133 | }; | 133 | }; |
134 | 134 | ||
135 | static int __init s3c2410_dma_add(struct device *dev) | 135 | static int __init s3c2410_dma_add(struct device *dev, |
136 | struct subsys_interface *sif) | ||
136 | { | 137 | { |
137 | s3c2410_dma_init(); | 138 | s3c2410_dma_init(); |
138 | s3c24xx_dma_order_set(&s3c2410_dma_order); | 139 | s3c24xx_dma_order_set(&s3c2410_dma_order); |
@@ -148,7 +149,7 @@ static struct subsys_interface s3c2410_dma_interface = { | |||
148 | 149 | ||
149 | static int __init s3c2410_dma_drvinit(void) | 150 | static int __init s3c2410_dma_drvinit(void) |
150 | { | 151 | { |
151 | return subsys_interface_register(&s3c2410_interface); | 152 | return subsys_interface_register(&s3c2410_dma_interface); |
152 | } | 153 | } |
153 | 154 | ||
154 | arch_initcall(s3c2410_dma_drvinit); | 155 | arch_initcall(s3c2410_dma_drvinit); |
diff --git a/arch/arm/mach-s3c2410/include/mach/entry-macro.S b/arch/arm/mach-s3c2410/include/mach/entry-macro.S index 473b3cd37d9b..7615a14773fa 100644 --- a/arch/arm/mach-s3c2410/include/mach/entry-macro.S +++ b/arch/arm/mach-s3c2410/include/mach/entry-macro.S | |||
@@ -25,9 +25,6 @@ | |||
25 | .macro get_irqnr_preamble, base, tmp | 25 | .macro get_irqnr_preamble, base, tmp |
26 | .endm | 26 | .endm |
27 | 27 | ||
28 | .macro arch_ret_to_user, tmp1, tmp2 | ||
29 | .endm | ||
30 | |||
31 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 28 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
32 | 29 | ||
33 | mov \base, #S3C24XX_VA_IRQ | 30 | mov \base, #S3C24XX_VA_IRQ |
@@ -71,8 +68,3 @@ | |||
71 | @@ exit here, Z flag unset if IRQ | 68 | @@ exit here, Z flag unset if IRQ |
72 | 69 | ||
73 | .endm | 70 | .endm |
74 | |||
75 | /* currently don't need an disable_fiq macro */ | ||
76 | |||
77 | .macro disable_fiq | ||
78 | .endm | ||
diff --git a/arch/arm/mach-s3c2410/pll.c b/arch/arm/mach-s3c2410/pll.c index c07438bfc99f..e0b3b347da82 100644 --- a/arch/arm/mach-s3c2410/pll.c +++ b/arch/arm/mach-s3c2410/pll.c | |||
@@ -66,7 +66,7 @@ static struct cpufreq_frequency_table pll_vals_12MHz[] = { | |||
66 | { .frequency = 270000000, .index = PLLVAL(127, 1, 1), }, | 66 | { .frequency = 270000000, .index = PLLVAL(127, 1, 1), }, |
67 | }; | 67 | }; |
68 | 68 | ||
69 | static int s3c2410_plls_add(struct device *dev) | 69 | static int s3c2410_plls_add(struct device *dev, struct subsys_interface *sif) |
70 | { | 70 | { |
71 | return s3c_plltab_register(pll_vals_12MHz, ARRAY_SIZE(pll_vals_12MHz)); | 71 | return s3c_plltab_register(pll_vals_12MHz, ARRAY_SIZE(pll_vals_12MHz)); |
72 | } | 72 | } |
diff --git a/arch/arm/mach-s3c2410/pm.c b/arch/arm/mach-s3c2410/pm.c index fda5385deff6..03f706dd6009 100644 --- a/arch/arm/mach-s3c2410/pm.c +++ b/arch/arm/mach-s3c2410/pm.c | |||
@@ -111,7 +111,7 @@ struct syscore_ops s3c2410_pm_syscore_ops = { | |||
111 | .resume = s3c2410_pm_resume, | 111 | .resume = s3c2410_pm_resume, |
112 | }; | 112 | }; |
113 | 113 | ||
114 | static int s3c2410_pm_add(struct device *dev) | 114 | static int s3c2410_pm_add(struct device *dev, struct subsys_interface *sif) |
115 | { | 115 | { |
116 | pm_cpu_prep = s3c2410_pm_prepare; | 116 | pm_cpu_prep = s3c2410_pm_prepare; |
117 | pm_cpu_sleep = s3c2410_cpu_suspend; | 117 | pm_cpu_sleep = s3c2410_cpu_suspend; |
diff --git a/arch/arm/mach-s3c2412/cpu-freq.c b/arch/arm/mach-s3c2412/cpu-freq.c index d8664b7652ce..125be7d5fa60 100644 --- a/arch/arm/mach-s3c2412/cpu-freq.c +++ b/arch/arm/mach-s3c2412/cpu-freq.c | |||
@@ -194,7 +194,8 @@ static struct s3c_cpufreq_info s3c2412_cpufreq_info = { | |||
194 | .debug_io_show = s3c_cpufreq_debugfs_call(s3c2412_iotiming_debugfs), | 194 | .debug_io_show = s3c_cpufreq_debugfs_call(s3c2412_iotiming_debugfs), |
195 | }; | 195 | }; |
196 | 196 | ||
197 | static int s3c2412_cpufreq_add(struct device *dev) | 197 | static int s3c2412_cpufreq_add(struct device *dev, |
198 | struct subsys_interface *sif) | ||
198 | { | 199 | { |
199 | unsigned long fclk_rate; | 200 | unsigned long fclk_rate; |
200 | 201 | ||
diff --git a/arch/arm/mach-s3c2412/dma.c b/arch/arm/mach-s3c2412/dma.c index 142acd3b5e15..38472ac920ff 100644 --- a/arch/arm/mach-s3c2412/dma.c +++ b/arch/arm/mach-s3c2412/dma.c | |||
@@ -159,7 +159,8 @@ static struct s3c24xx_dma_selection __initdata s3c2412_dma_sel = { | |||
159 | .map_size = ARRAY_SIZE(s3c2412_dma_mappings), | 159 | .map_size = ARRAY_SIZE(s3c2412_dma_mappings), |
160 | }; | 160 | }; |
161 | 161 | ||
162 | static int __init s3c2412_dma_add(struct device *dev) | 162 | static int __init s3c2412_dma_add(struct device *dev, |
163 | struct subsys_interface *sif) | ||
163 | { | 164 | { |
164 | s3c2410_dma_init(); | 165 | s3c2410_dma_init(); |
165 | return s3c24xx_dma_init_map(&s3c2412_dma_sel); | 166 | return s3c24xx_dma_init_map(&s3c2412_dma_sel); |
diff --git a/arch/arm/mach-s3c2412/irq.c b/arch/arm/mach-s3c2412/irq.c index a8a46c1644f4..e65619ddbccc 100644 --- a/arch/arm/mach-s3c2412/irq.c +++ b/arch/arm/mach-s3c2412/irq.c | |||
@@ -170,7 +170,7 @@ static int s3c2412_irq_rtc_wake(struct irq_data *data, unsigned int state) | |||
170 | 170 | ||
171 | static struct irq_chip s3c2412_irq_rtc_chip; | 171 | static struct irq_chip s3c2412_irq_rtc_chip; |
172 | 172 | ||
173 | static int s3c2412_irq_add(struct device *dev) | 173 | static int s3c2412_irq_add(struct device *dev, struct subsys_interface *sif) |
174 | { | 174 | { |
175 | unsigned int irqno; | 175 | unsigned int irqno; |
176 | 176 | ||
diff --git a/arch/arm/mach-s3c2412/pm.c b/arch/arm/mach-s3c2412/pm.c index d1adfa65f66d..d04588506ec4 100644 --- a/arch/arm/mach-s3c2412/pm.c +++ b/arch/arm/mach-s3c2412/pm.c | |||
@@ -56,7 +56,7 @@ static void s3c2412_pm_prepare(void) | |||
56 | { | 56 | { |
57 | } | 57 | } |
58 | 58 | ||
59 | static int s3c2412_pm_add(struct device *dev) | 59 | static int s3c2412_pm_add(struct device *dev, struct subsys_interface *sif) |
60 | { | 60 | { |
61 | pm_cpu_prep = s3c2412_pm_prepare; | 61 | pm_cpu_prep = s3c2412_pm_prepare; |
62 | pm_cpu_sleep = s3c2412_cpu_suspend; | 62 | pm_cpu_sleep = s3c2412_cpu_suspend; |
diff --git a/arch/arm/mach-s3c2416/irq.c b/arch/arm/mach-s3c2416/irq.c index 36df761061de..fd49f35e448e 100644 --- a/arch/arm/mach-s3c2416/irq.c +++ b/arch/arm/mach-s3c2416/irq.c | |||
@@ -213,7 +213,8 @@ static int __init s3c2416_add_sub(unsigned int base, | |||
213 | return 0; | 213 | return 0; |
214 | } | 214 | } |
215 | 215 | ||
216 | static int __init s3c2416_irq_add(struct device *dev) | 216 | static int __init s3c2416_irq_add(struct device *dev, |
217 | struct subsys_interface *sif) | ||
217 | { | 218 | { |
218 | printk(KERN_INFO "S3C2416: IRQ Support\n"); | 219 | printk(KERN_INFO "S3C2416: IRQ Support\n"); |
219 | 220 | ||
diff --git a/arch/arm/mach-s3c2416/pm.c b/arch/arm/mach-s3c2416/pm.c index 3bdb15a0d419..1bd4817b8eb8 100644 --- a/arch/arm/mach-s3c2416/pm.c +++ b/arch/arm/mach-s3c2416/pm.c | |||
@@ -48,7 +48,7 @@ static void s3c2416_pm_prepare(void) | |||
48 | __raw_writel(virt_to_phys(s3c_cpu_resume), S3C2412_INFORM1); | 48 | __raw_writel(virt_to_phys(s3c_cpu_resume), S3C2412_INFORM1); |
49 | } | 49 | } |
50 | 50 | ||
51 | static int s3c2416_pm_add(struct device *dev) | 51 | static int s3c2416_pm_add(struct device *dev, struct subsys_interface *sif) |
52 | { | 52 | { |
53 | pm_cpu_prep = s3c2416_pm_prepare; | 53 | pm_cpu_prep = s3c2416_pm_prepare; |
54 | pm_cpu_sleep = s3c2416_cpu_suspend; | 54 | pm_cpu_sleep = s3c2416_cpu_suspend; |
diff --git a/arch/arm/mach-s3c2440/clock.c b/arch/arm/mach-s3c2440/clock.c index bedbc87a3426..414364eb426c 100644 --- a/arch/arm/mach-s3c2440/clock.c +++ b/arch/arm/mach-s3c2440/clock.c | |||
@@ -149,7 +149,7 @@ static struct clk_lookup s3c2440_clk_lookup[] = { | |||
149 | CLKDEV_INIT(NULL, "clk_uart_baud3", &s3c2440_clk_fclk_n), | 149 | CLKDEV_INIT(NULL, "clk_uart_baud3", &s3c2440_clk_fclk_n), |
150 | }; | 150 | }; |
151 | 151 | ||
152 | static int s3c2440_clk_add(struct device *dev) | 152 | static int s3c2440_clk_add(struct device *dev, struct subsys_interface *sif) |
153 | { | 153 | { |
154 | struct clk *clock_upll; | 154 | struct clk *clock_upll; |
155 | struct clk *clock_h; | 155 | struct clk *clock_h; |
diff --git a/arch/arm/mach-s3c2440/dma.c b/arch/arm/mach-s3c2440/dma.c index 15b1ddf8f626..5f0a0c8ef84f 100644 --- a/arch/arm/mach-s3c2440/dma.c +++ b/arch/arm/mach-s3c2440/dma.c | |||
@@ -174,7 +174,8 @@ static struct s3c24xx_dma_order __initdata s3c2440_dma_order = { | |||
174 | }, | 174 | }, |
175 | }; | 175 | }; |
176 | 176 | ||
177 | static int __init s3c2440_dma_add(struct device *dev) | 177 | static int __init s3c2440_dma_add(struct device *dev, |
178 | struct subsys_interface *sif) | ||
178 | { | 179 | { |
179 | s3c2410_dma_init(); | 180 | s3c2410_dma_init(); |
180 | s3c24xx_dma_order_set(&s3c2440_dma_order); | 181 | s3c24xx_dma_order_set(&s3c2440_dma_order); |
diff --git a/arch/arm/mach-s3c2440/irq.c b/arch/arm/mach-s3c2440/irq.c index 4fee9bc6bcb5..4a18cde439cc 100644 --- a/arch/arm/mach-s3c2440/irq.c +++ b/arch/arm/mach-s3c2440/irq.c | |||
@@ -92,7 +92,7 @@ static struct irq_chip s3c_irq_wdtac97 = { | |||
92 | .irq_ack = s3c_irq_wdtac97_ack, | 92 | .irq_ack = s3c_irq_wdtac97_ack, |
93 | }; | 93 | }; |
94 | 94 | ||
95 | static int s3c2440_irq_add(struct device *dev) | 95 | static int s3c2440_irq_add(struct device *dev, struct subsys_interface *sif) |
96 | { | 96 | { |
97 | unsigned int irqno; | 97 | unsigned int irqno; |
98 | 98 | ||
diff --git a/arch/arm/mach-s3c2440/s3c2440-cpufreq.c b/arch/arm/mach-s3c2440/s3c2440-cpufreq.c index cf7596694efe..61776764d9f4 100644 --- a/arch/arm/mach-s3c2440/s3c2440-cpufreq.c +++ b/arch/arm/mach-s3c2440/s3c2440-cpufreq.c | |||
@@ -270,7 +270,8 @@ struct s3c_cpufreq_info s3c2440_cpufreq_info = { | |||
270 | .debug_io_show = s3c_cpufreq_debugfs_call(s3c2410_iotiming_debugfs), | 270 | .debug_io_show = s3c_cpufreq_debugfs_call(s3c2410_iotiming_debugfs), |
271 | }; | 271 | }; |
272 | 272 | ||
273 | static int s3c2440_cpufreq_add(struct device *dev) | 273 | static int s3c2440_cpufreq_add(struct device *dev, |
274 | struct subsys_interface *sif) | ||
274 | { | 275 | { |
275 | xtal = s3c_cpufreq_clk_get(NULL, "xtal"); | 276 | xtal = s3c_cpufreq_clk_get(NULL, "xtal"); |
276 | hclk = s3c_cpufreq_clk_get(NULL, "hclk"); | 277 | hclk = s3c_cpufreq_clk_get(NULL, "hclk"); |
diff --git a/arch/arm/mach-s3c2440/s3c2440-pll-12000000.c b/arch/arm/mach-s3c2440/s3c2440-pll-12000000.c index b5368ae8d7fe..551fb433be87 100644 --- a/arch/arm/mach-s3c2440/s3c2440-pll-12000000.c +++ b/arch/arm/mach-s3c2440/s3c2440-pll-12000000.c | |||
@@ -51,7 +51,7 @@ static struct cpufreq_frequency_table s3c2440_plls_12[] __initdata = { | |||
51 | { .frequency = 400000000, .index = PLLVAL(0x5c, 1, 1), }, /* FVco 800.000000 */ | 51 | { .frequency = 400000000, .index = PLLVAL(0x5c, 1, 1), }, /* FVco 800.000000 */ |
52 | }; | 52 | }; |
53 | 53 | ||
54 | static int s3c2440_plls12_add(struct device *dev) | 54 | static int s3c2440_plls12_add(struct device *dev, struct subsys_interface *sif) |
55 | { | 55 | { |
56 | struct clk *xtal_clk; | 56 | struct clk *xtal_clk; |
57 | unsigned long xtal; | 57 | unsigned long xtal; |
diff --git a/arch/arm/mach-s3c2440/s3c2440-pll-16934400.c b/arch/arm/mach-s3c2440/s3c2440-pll-16934400.c index 42f2b5cd2399..3f15bcf64290 100644 --- a/arch/arm/mach-s3c2440/s3c2440-pll-16934400.c +++ b/arch/arm/mach-s3c2440/s3c2440-pll-16934400.c | |||
@@ -79,7 +79,8 @@ static struct cpufreq_frequency_table s3c2440_plls_169344[] __initdata = { | |||
79 | { .frequency = 402192000, .index = PLLVAL(87, 2, 1), }, /* FVco 804.384000 */ | 79 | { .frequency = 402192000, .index = PLLVAL(87, 2, 1), }, /* FVco 804.384000 */ |
80 | }; | 80 | }; |
81 | 81 | ||
82 | static int s3c2440_plls169344_add(struct device *dev) | 82 | static int s3c2440_plls169344_add(struct device *dev, |
83 | struct subsys_interface *sif) | ||
83 | { | 84 | { |
84 | struct clk *xtal_clk; | 85 | struct clk *xtal_clk; |
85 | unsigned long xtal; | 86 | unsigned long xtal; |
diff --git a/arch/arm/mach-s3c2440/s3c2442.c b/arch/arm/mach-s3c2440/s3c2442.c index 8004e0497bf4..22cb7c94a8c8 100644 --- a/arch/arm/mach-s3c2440/s3c2442.c +++ b/arch/arm/mach-s3c2440/s3c2442.c | |||
@@ -122,7 +122,7 @@ static struct clk s3c2442_clk_cam_upll = { | |||
122 | }, | 122 | }, |
123 | }; | 123 | }; |
124 | 124 | ||
125 | static int s3c2442_clk_add(struct device *dev) | 125 | static int s3c2442_clk_add(struct device *dev, struct subsys_interface *sif) |
126 | { | 126 | { |
127 | struct clk *clock_upll; | 127 | struct clk *clock_upll; |
128 | struct clk *clock_h; | 128 | struct clk *clock_h; |
diff --git a/arch/arm/mach-s3c2440/s3c244x-clock.c b/arch/arm/mach-s3c2440/s3c244x-clock.c index b3fdbdda3d5f..6d9b688c442b 100644 --- a/arch/arm/mach-s3c2440/s3c244x-clock.c +++ b/arch/arm/mach-s3c2440/s3c244x-clock.c | |||
@@ -72,7 +72,7 @@ static struct clk clk_arm = { | |||
72 | }, | 72 | }, |
73 | }; | 73 | }; |
74 | 74 | ||
75 | static int s3c244x_clk_add(struct device *dev) | 75 | static int s3c244x_clk_add(struct device *dev, struct subsys_interface *sif) |
76 | { | 76 | { |
77 | unsigned long camdivn = __raw_readl(S3C2440_CAMDIVN); | 77 | unsigned long camdivn = __raw_readl(S3C2440_CAMDIVN); |
78 | unsigned long clkdivn; | 78 | unsigned long clkdivn; |
diff --git a/arch/arm/mach-s3c2440/s3c244x-irq.c b/arch/arm/mach-s3c2440/s3c244x-irq.c index 74d3dcf46a48..5fe8e58d3afd 100644 --- a/arch/arm/mach-s3c2440/s3c244x-irq.c +++ b/arch/arm/mach-s3c2440/s3c244x-irq.c | |||
@@ -91,7 +91,7 @@ static struct irq_chip s3c_irq_cam = { | |||
91 | .irq_ack = s3c_irq_cam_ack, | 91 | .irq_ack = s3c_irq_cam_ack, |
92 | }; | 92 | }; |
93 | 93 | ||
94 | static int s3c244x_irq_add(struct device *dev) | 94 | static int s3c244x_irq_add(struct device *dev, struct subsys_interface *sif) |
95 | { | 95 | { |
96 | unsigned int irqno; | 96 | unsigned int irqno; |
97 | 97 | ||
diff --git a/arch/arm/mach-s3c2443/dma.c b/arch/arm/mach-s3c2443/dma.c index de6b4a23c9ed..14224517e621 100644 --- a/arch/arm/mach-s3c2443/dma.c +++ b/arch/arm/mach-s3c2443/dma.c | |||
@@ -135,7 +135,8 @@ static struct s3c24xx_dma_selection __initdata s3c2443_dma_sel = { | |||
135 | .map_size = ARRAY_SIZE(s3c2443_dma_mappings), | 135 | .map_size = ARRAY_SIZE(s3c2443_dma_mappings), |
136 | }; | 136 | }; |
137 | 137 | ||
138 | static int __init s3c2443_dma_add(struct device *dev) | 138 | static int __init s3c2443_dma_add(struct device *dev, |
139 | struct subsys_interface *sif) | ||
139 | { | 140 | { |
140 | s3c24xx_dma_init(6, IRQ_S3C2443_DMA0, 0x100); | 141 | s3c24xx_dma_init(6, IRQ_S3C2443_DMA0, 0x100); |
141 | return s3c24xx_dma_init_map(&s3c2443_dma_sel); | 142 | return s3c24xx_dma_init_map(&s3c2443_dma_sel); |
diff --git a/arch/arm/mach-s3c2443/irq.c b/arch/arm/mach-s3c2443/irq.c index 35e4ff24fb43..ac2829f56d12 100644 --- a/arch/arm/mach-s3c2443/irq.c +++ b/arch/arm/mach-s3c2443/irq.c | |||
@@ -241,7 +241,8 @@ static int __init s3c2443_add_sub(unsigned int base, | |||
241 | return 0; | 241 | return 0; |
242 | } | 242 | } |
243 | 243 | ||
244 | static int __init s3c2443_irq_add(struct device *dev) | 244 | static int __init s3c2443_irq_add(struct device *dev, |
245 | struct subsys_interface *sif) | ||
245 | { | 246 | { |
246 | printk("S3C2443: IRQ Support\n"); | 247 | printk("S3C2443: IRQ Support\n"); |
247 | 248 | ||
diff --git a/arch/arm/mach-s3c64xx/clock.c b/arch/arm/mach-s3c64xx/clock.c index 31bb27dc4aeb..aebbcc291b4e 100644 --- a/arch/arm/mach-s3c64xx/clock.c +++ b/arch/arm/mach-s3c64xx/clock.c | |||
@@ -138,6 +138,11 @@ static struct clk init_clocks_off[] = { | |||
138 | .ctrlbit = S3C_CLKCON_PCLK_TSADC, | 138 | .ctrlbit = S3C_CLKCON_PCLK_TSADC, |
139 | }, { | 139 | }, { |
140 | .name = "i2c", | 140 | .name = "i2c", |
141 | #ifdef CONFIG_S3C_DEV_I2C1 | ||
142 | .devname = "s3c2440-i2c.0", | ||
143 | #else | ||
144 | .devname = "s3c2440-i2c", | ||
145 | #endif | ||
141 | .parent = &clk_p, | 146 | .parent = &clk_p, |
142 | .enable = s3c64xx_pclk_ctrl, | 147 | .enable = s3c64xx_pclk_ctrl, |
143 | .ctrlbit = S3C_CLKCON_PCLK_IIC, | 148 | .ctrlbit = S3C_CLKCON_PCLK_IIC, |
diff --git a/arch/arm/mach-s3c64xx/include/mach/entry-macro.S b/arch/arm/mach-s3c64xx/include/mach/entry-macro.S deleted file mode 100644 index dc2bc15142ce..000000000000 --- a/arch/arm/mach-s3c64xx/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* arch/arm/mach-s3c6400/include/mach/entry-macro.S | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * Ben Dooks <ben@simtec.co.uk> | ||
7 | * | ||
8 | * Low-level IRQ helper macros for the Samsung S3C64XX series | ||
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 | .macro disable_fiq | ||
16 | .endm | ||
17 | |||
18 | .macro arch_ret_to_user, tmp1, tmp2 | ||
19 | .endm | ||
diff --git a/arch/arm/mach-s5p64x0/include/mach/entry-macro.S b/arch/arm/mach-s5p64x0/include/mach/entry-macro.S deleted file mode 100644 index fbb246d0a3df..000000000000 --- a/arch/arm/mach-s5p64x0/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5p64x0/include/mach/entry-macro.S | ||
2 | * | ||
3 | * Copyright (c) 2009-2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com | ||
5 | * | ||
6 | * Low-level IRQ helper macros for the Samsung S5P64X0 | ||
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 | .macro disable_fiq | ||
14 | .endm | ||
15 | |||
16 | .macro arch_ret_to_user, tmp1, tmp2 | ||
17 | .endm | ||
diff --git a/arch/arm/mach-s5p64x0/pm.c b/arch/arm/mach-s5p64x0/pm.c index 23f9b22439c9..9cba18bfe47b 100644 --- a/arch/arm/mach-s5p64x0/pm.c +++ b/arch/arm/mach-s5p64x0/pm.c | |||
@@ -160,7 +160,7 @@ static void s5p64x0_pm_prepare(void) | |||
160 | 160 | ||
161 | } | 161 | } |
162 | 162 | ||
163 | static int s5p64x0_pm_add(struct device *dev) | 163 | static int s5p64x0_pm_add(struct device *dev, struct subsys_interface *sif) |
164 | { | 164 | { |
165 | pm_cpu_prep = s5p64x0_pm_prepare; | 165 | pm_cpu_prep = s5p64x0_pm_prepare; |
166 | pm_cpu_sleep = s5p64x0_cpu_suspend; | 166 | pm_cpu_sleep = s5p64x0_cpu_suspend; |
diff --git a/arch/arm/mach-s5pc100/include/mach/entry-macro.S b/arch/arm/mach-s5pc100/include/mach/entry-macro.S index b8c242edfa22..bad0700457db 100644 --- a/arch/arm/mach-s5pc100/include/mach/entry-macro.S +++ b/arch/arm/mach-s5pc100/include/mach/entry-macro.S | |||
@@ -12,14 +12,8 @@ | |||
12 | * warranty of any kind, whether express or implied. | 12 | * warranty of any kind, whether express or implied. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | .macro disable_fiq | ||
16 | .endm | ||
17 | |||
18 | .macro get_irqnr_preamble, base, tmp | 15 | .macro get_irqnr_preamble, base, tmp |
19 | .endm | 16 | .endm |
20 | 17 | ||
21 | .macro arch_ret_to_user, tmp1, tmp2 | ||
22 | .endm | ||
23 | |||
24 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 18 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
25 | .endm | 19 | .endm |
diff --git a/arch/arm/mach-s5pv210/clock.c b/arch/arm/mach-s5pv210/clock.c index c78dfddd77fd..b9ec0c35379f 100644 --- a/arch/arm/mach-s5pv210/clock.c +++ b/arch/arm/mach-s5pv210/clock.c | |||
@@ -175,7 +175,7 @@ static int s5pv210_clk_mask1_ctrl(struct clk *clk, int enable) | |||
175 | return s5p_gatectrl(S5P_CLK_SRC_MASK1, clk, enable); | 175 | return s5p_gatectrl(S5P_CLK_SRC_MASK1, clk, enable); |
176 | } | 176 | } |
177 | 177 | ||
178 | static int exynos4_clk_hdmiphy_ctrl(struct clk *clk, int enable) | 178 | static int s5pv210_clk_hdmiphy_ctrl(struct clk *clk, int enable) |
179 | { | 179 | { |
180 | return s5p_gatectrl(S5P_HDMI_PHY_CONTROL, clk, enable); | 180 | return s5p_gatectrl(S5P_HDMI_PHY_CONTROL, clk, enable); |
181 | } | 181 | } |
@@ -372,7 +372,7 @@ static struct clk init_clocks_off[] = { | |||
372 | }, { | 372 | }, { |
373 | .name = "hdmiphy", | 373 | .name = "hdmiphy", |
374 | .devname = "s5pv210-hdmi", | 374 | .devname = "s5pv210-hdmi", |
375 | .enable = exynos4_clk_hdmiphy_ctrl, | 375 | .enable = s5pv210_clk_hdmiphy_ctrl, |
376 | .ctrlbit = (1 << 0), | 376 | .ctrlbit = (1 << 0), |
377 | }, { | 377 | }, { |
378 | .name = "dacphy", | 378 | .name = "dacphy", |
diff --git a/arch/arm/mach-s5pv210/include/mach/entry-macro.S b/arch/arm/mach-s5pv210/include/mach/entry-macro.S deleted file mode 100644 index bebca1b5d0b1..000000000000 --- a/arch/arm/mach-s5pv210/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | /* linux/arch/arm/mach-s5pv210/include/mach/entry-macro.S | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * Low-level IRQ helper macros for the Samsung S5PV210 | ||
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 | .macro disable_fiq | ||
14 | .endm | ||
15 | |||
16 | .macro arch_ret_to_user, tmp1, tmp2 | ||
17 | .endm | ||
diff --git a/arch/arm/mach-s5pv210/pm.c b/arch/arm/mach-s5pv210/pm.c index 677c71c41e50..736bfb103cbc 100644 --- a/arch/arm/mach-s5pv210/pm.c +++ b/arch/arm/mach-s5pv210/pm.c | |||
@@ -133,7 +133,7 @@ static void s5pv210_pm_prepare(void) | |||
133 | s3c_pm_do_save(s5pv210_core_save, ARRAY_SIZE(s5pv210_core_save)); | 133 | s3c_pm_do_save(s5pv210_core_save, ARRAY_SIZE(s5pv210_core_save)); |
134 | } | 134 | } |
135 | 135 | ||
136 | static int s5pv210_pm_add(struct device *dev) | 136 | static int s5pv210_pm_add(struct device *dev, struct subsys_interface *sif) |
137 | { | 137 | { |
138 | pm_cpu_prep = s5pv210_pm_prepare; | 138 | pm_cpu_prep = s5pv210_pm_prepare; |
139 | pm_cpu_sleep = s5pv210_cpu_suspend; | 139 | pm_cpu_sleep = s5pv210_cpu_suspend; |
diff --git a/arch/arm/mach-sa1100/include/mach/entry-macro.S b/arch/arm/mach-sa1100/include/mach/entry-macro.S index 6aa13c46c5d3..8cf7630bf024 100644 --- a/arch/arm/mach-sa1100/include/mach/entry-macro.S +++ b/arch/arm/mach-sa1100/include/mach/entry-macro.S | |||
@@ -8,17 +8,11 @@ | |||
8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | .macro disable_fiq | ||
12 | .endm | ||
13 | |||
14 | .macro get_irqnr_preamble, base, tmp | 11 | .macro get_irqnr_preamble, base, tmp |
15 | mov \base, #0xfa000000 @ ICIP = 0xfa050000 | 12 | mov \base, #0xfa000000 @ ICIP = 0xfa050000 |
16 | add \base, \base, #0x00050000 | 13 | add \base, \base, #0x00050000 |
17 | .endm | 14 | .endm |
18 | 15 | ||
19 | .macro arch_ret_to_user, tmp1, tmp2 | ||
20 | .endm | ||
21 | |||
22 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 16 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
23 | ldr \irqstat, [\base] @ get irqs | 17 | ldr \irqstat, [\base] @ get irqs |
24 | ldr \irqnr, [\base, #4] @ ICMR = 0xfa050004 | 18 | ldr \irqnr, [\base, #4] @ ICMR = 0xfa050004 |
diff --git a/arch/arm/mach-shark/include/mach/entry-macro.S b/arch/arm/mach-shark/include/mach/entry-macro.S index 0bb6cc626eb7..5901b09fc96a 100644 --- a/arch/arm/mach-shark/include/mach/entry-macro.S +++ b/arch/arm/mach-shark/include/mach/entry-macro.S | |||
@@ -7,16 +7,10 @@ | |||
7 | * License version 2. This program is licensed "as is" without any | 7 | * License version 2. This program is licensed "as is" without any |
8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
9 | */ | 9 | */ |
10 | .macro disable_fiq | ||
11 | .endm | ||
12 | |||
13 | .macro get_irqnr_preamble, base, tmp | 10 | .macro get_irqnr_preamble, base, tmp |
14 | mov \base, #0xe0000000 | 11 | mov \base, #0xe0000000 |
15 | .endm | 12 | .endm |
16 | 13 | ||
17 | .macro arch_ret_to_user, tmp1, tmp2 | ||
18 | .endm | ||
19 | |||
20 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 14 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
21 | 15 | ||
22 | mov \irqstat, #0x0C | 16 | mov \irqstat, #0x0C |
diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c index eff8a96c75ee..068b754bc348 100644 --- a/arch/arm/mach-shmobile/board-ag5evm.c +++ b/arch/arm/mach-shmobile/board-ag5evm.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/serial_sci.h> | 30 | #include <linux/serial_sci.h> |
31 | #include <linux/smsc911x.h> | 31 | #include <linux/smsc911x.h> |
32 | #include <linux/gpio.h> | 32 | #include <linux/gpio.h> |
33 | #include <linux/videodev2.h> | ||
33 | #include <linux/input.h> | 34 | #include <linux/input.h> |
34 | #include <linux/input/sh_keysc.h> | 35 | #include <linux/input/sh_keysc.h> |
35 | #include <linux/mmc/host.h> | 36 | #include <linux/mmc/host.h> |
@@ -37,7 +38,6 @@ | |||
37 | #include <linux/mmc/sh_mobile_sdhi.h> | 38 | #include <linux/mmc/sh_mobile_sdhi.h> |
38 | #include <linux/mfd/tmio.h> | 39 | #include <linux/mfd/tmio.h> |
39 | #include <linux/sh_clk.h> | 40 | #include <linux/sh_clk.h> |
40 | #include <linux/dma-mapping.h> | ||
41 | #include <video/sh_mobile_lcdc.h> | 41 | #include <video/sh_mobile_lcdc.h> |
42 | #include <video/sh_mipi_dsi.h> | 42 | #include <video/sh_mipi_dsi.h> |
43 | #include <sound/sh_fsi.h> | 43 | #include <sound/sh_fsi.h> |
@@ -159,19 +159,12 @@ static struct resource sh_mmcif_resources[] = { | |||
159 | }, | 159 | }, |
160 | }; | 160 | }; |
161 | 161 | ||
162 | static struct sh_mmcif_dma sh_mmcif_dma = { | ||
163 | .chan_priv_rx = { | ||
164 | .slave_id = SHDMA_SLAVE_MMCIF_RX, | ||
165 | }, | ||
166 | .chan_priv_tx = { | ||
167 | .slave_id = SHDMA_SLAVE_MMCIF_TX, | ||
168 | }, | ||
169 | }; | ||
170 | static struct sh_mmcif_plat_data sh_mmcif_platdata = { | 162 | static struct sh_mmcif_plat_data sh_mmcif_platdata = { |
171 | .sup_pclk = 0, | 163 | .sup_pclk = 0, |
172 | .ocr = MMC_VDD_165_195, | 164 | .ocr = MMC_VDD_165_195, |
173 | .caps = MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE, | 165 | .caps = MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE, |
174 | .dma = &sh_mmcif_dma, | 166 | .slave_id_tx = SHDMA_SLAVE_MMCIF_TX, |
167 | .slave_id_rx = SHDMA_SLAVE_MMCIF_RX, | ||
175 | }; | 168 | }; |
176 | 169 | ||
177 | static struct platform_device mmc_device = { | 170 | static struct platform_device mmc_device = { |
@@ -321,12 +314,11 @@ static struct resource mipidsi0_resources[] = { | |||
321 | }, | 314 | }, |
322 | }; | 315 | }; |
323 | 316 | ||
324 | #define DSI0PHYCR 0xe615006c | ||
325 | static int sh_mipi_set_dot_clock(struct platform_device *pdev, | 317 | static int sh_mipi_set_dot_clock(struct platform_device *pdev, |
326 | void __iomem *base, | 318 | void __iomem *base, |
327 | int enable) | 319 | int enable) |
328 | { | 320 | { |
329 | struct clk *pck; | 321 | struct clk *pck, *phy; |
330 | int ret; | 322 | int ret; |
331 | 323 | ||
332 | pck = clk_get(&pdev->dev, "dsip_clk"); | 324 | pck = clk_get(&pdev->dev, "dsip_clk"); |
@@ -335,18 +327,27 @@ static int sh_mipi_set_dot_clock(struct platform_device *pdev, | |||
335 | goto sh_mipi_set_dot_clock_pck_err; | 327 | goto sh_mipi_set_dot_clock_pck_err; |
336 | } | 328 | } |
337 | 329 | ||
330 | phy = clk_get(&pdev->dev, "dsiphy_clk"); | ||
331 | if (IS_ERR(phy)) { | ||
332 | ret = PTR_ERR(phy); | ||
333 | goto sh_mipi_set_dot_clock_phy_err; | ||
334 | } | ||
335 | |||
338 | if (enable) { | 336 | if (enable) { |
339 | clk_set_rate(pck, clk_round_rate(pck, 24000000)); | 337 | clk_set_rate(pck, clk_round_rate(pck, 24000000)); |
340 | __raw_writel(0x2a809010, DSI0PHYCR); | 338 | clk_set_rate(phy, clk_round_rate(pck, 510000000)); |
341 | clk_enable(pck); | 339 | clk_enable(pck); |
340 | clk_enable(phy); | ||
342 | } else { | 341 | } else { |
343 | clk_disable(pck); | 342 | clk_disable(pck); |
343 | clk_disable(phy); | ||
344 | } | 344 | } |
345 | 345 | ||
346 | ret = 0; | 346 | ret = 0; |
347 | 347 | ||
348 | clk_put(phy); | ||
349 | sh_mipi_set_dot_clock_phy_err: | ||
348 | clk_put(pck); | 350 | clk_put(pck); |
349 | |||
350 | sh_mipi_set_dot_clock_pck_err: | 351 | sh_mipi_set_dot_clock_pck_err: |
351 | return ret; | 352 | return ret; |
352 | } | 353 | } |
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index aab0a349f759..eeb4d9664584 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c | |||
@@ -295,15 +295,6 @@ static struct resource sh_mmcif_resources[] = { | |||
295 | }, | 295 | }, |
296 | }; | 296 | }; |
297 | 297 | ||
298 | static struct sh_mmcif_dma sh_mmcif_dma = { | ||
299 | .chan_priv_rx = { | ||
300 | .slave_id = SHDMA_SLAVE_MMCIF_RX, | ||
301 | }, | ||
302 | .chan_priv_tx = { | ||
303 | .slave_id = SHDMA_SLAVE_MMCIF_TX, | ||
304 | }, | ||
305 | }; | ||
306 | |||
307 | static struct sh_mmcif_plat_data sh_mmcif_plat = { | 298 | static struct sh_mmcif_plat_data sh_mmcif_plat = { |
308 | .sup_pclk = 0, | 299 | .sup_pclk = 0, |
309 | .ocr = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34, | 300 | .ocr = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34, |
@@ -311,7 +302,8 @@ static struct sh_mmcif_plat_data sh_mmcif_plat = { | |||
311 | MMC_CAP_8_BIT_DATA | | 302 | MMC_CAP_8_BIT_DATA | |
312 | MMC_CAP_NEEDS_POLL, | 303 | MMC_CAP_NEEDS_POLL, |
313 | .get_cd = slot_cn7_get_cd, | 304 | .get_cd = slot_cn7_get_cd, |
314 | .dma = &sh_mmcif_dma, | 305 | .slave_id_tx = SHDMA_SLAVE_MMCIF_TX, |
306 | .slave_id_rx = SHDMA_SLAVE_MMCIF_RX, | ||
315 | }; | 307 | }; |
316 | 308 | ||
317 | static struct platform_device sh_mmcif_device = { | 309 | static struct platform_device sh_mmcif_device = { |
diff --git a/arch/arm/mach-shmobile/board-kota2.c b/arch/arm/mach-shmobile/board-kota2.c index 857ceeec1bb0..c8e7ca23fc06 100644 --- a/arch/arm/mach-shmobile/board-kota2.c +++ b/arch/arm/mach-shmobile/board-kota2.c | |||
@@ -143,11 +143,10 @@ static struct gpio_keys_button gpio_buttons[] = { | |||
143 | static struct gpio_keys_platform_data gpio_key_info = { | 143 | static struct gpio_keys_platform_data gpio_key_info = { |
144 | .buttons = gpio_buttons, | 144 | .buttons = gpio_buttons, |
145 | .nbuttons = ARRAY_SIZE(gpio_buttons), | 145 | .nbuttons = ARRAY_SIZE(gpio_buttons), |
146 | .poll_interval = 250, /* polled for now */ | ||
147 | }; | 146 | }; |
148 | 147 | ||
149 | static struct platform_device gpio_keys_device = { | 148 | static struct platform_device gpio_keys_device = { |
150 | .name = "gpio-keys-polled", /* polled for now */ | 149 | .name = "gpio-keys", |
151 | .id = -1, | 150 | .id = -1, |
152 | .dev = { | 151 | .dev = { |
153 | .platform_data = &gpio_key_info, | 152 | .platform_data = &gpio_key_info, |
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index 9b42fbd10f8e..a2813247b455 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c | |||
@@ -43,7 +43,6 @@ | |||
43 | #include <linux/smsc911x.h> | 43 | #include <linux/smsc911x.h> |
44 | #include <linux/sh_intc.h> | 44 | #include <linux/sh_intc.h> |
45 | #include <linux/tca6416_keypad.h> | 45 | #include <linux/tca6416_keypad.h> |
46 | #include <linux/usb/r8a66597.h> | ||
47 | #include <linux/usb/renesas_usbhs.h> | 46 | #include <linux/usb/renesas_usbhs.h> |
48 | #include <linux/dma-mapping.h> | 47 | #include <linux/dma-mapping.h> |
49 | 48 | ||
@@ -145,11 +144,6 @@ | |||
145 | * 1-2 short | VBUS 5V | Host | 144 | * 1-2 short | VBUS 5V | Host |
146 | * open | external VBUS | Function | 145 | * open | external VBUS | Function |
147 | * | 146 | * |
148 | * *1 | ||
149 | * CN31 is used as | ||
150 | * CONFIG_USB_R8A66597_HCD Host | ||
151 | * CONFIG_USB_RENESAS_USBHS Function | ||
152 | * | ||
153 | * CAUTION | 147 | * CAUTION |
154 | * | 148 | * |
155 | * renesas_usbhs driver can use external interrupt mode | 149 | * renesas_usbhs driver can use external interrupt mode |
@@ -161,15 +155,6 @@ | |||
161 | * mackerel can not use external interrupt (IRQ7-PORT167) mode on "USB0", | 155 | * mackerel can not use external interrupt (IRQ7-PORT167) mode on "USB0", |
162 | * because Touchscreen is using IRQ7-PORT40. | 156 | * because Touchscreen is using IRQ7-PORT40. |
163 | * It is impossible to use IRQ7 demux on this board. | 157 | * It is impossible to use IRQ7 demux on this board. |
164 | * | ||
165 | * We can use external interrupt mode USB-Function on "USB1". | ||
166 | * USB1 can become Host by r8a66597, and become Function by renesas_usbhs. | ||
167 | * But don't select both drivers in same time. | ||
168 | * These uses same IRQ number for request_irq(), and aren't supporting | ||
169 | * IRQF_SHARED / IORESOURCE_IRQ_SHAREABLE. | ||
170 | * | ||
171 | * Actually these are old/new version of USB driver. | ||
172 | * This mean its register will be broken if it supports shared IRQ, | ||
173 | */ | 158 | */ |
174 | 159 | ||
175 | /* | 160 | /* |
@@ -208,6 +193,16 @@ | |||
208 | */ | 193 | */ |
209 | 194 | ||
210 | /* | 195 | /* |
196 | * FSI - AK4642 | ||
197 | * | ||
198 | * it needs amixer settings for playing | ||
199 | * | ||
200 | * amixer set "Headphone" on | ||
201 | * amixer set "HPOUTL Mixer DACH" on | ||
202 | * amixer set "HPOUTR Mixer DACH" on | ||
203 | */ | ||
204 | |||
205 | /* | ||
211 | * FIXME !! | 206 | * FIXME !! |
212 | * | 207 | * |
213 | * gpio_no_direction | 208 | * gpio_no_direction |
@@ -676,51 +671,16 @@ static struct platform_device usbhs0_device = { | |||
676 | * Use J30 to select between Host and Function. This setting | 671 | * Use J30 to select between Host and Function. This setting |
677 | * can however not be detected by software. Hotplug of USBHS1 | 672 | * can however not be detected by software. Hotplug of USBHS1 |
678 | * is provided via IRQ8. | 673 | * is provided via IRQ8. |
674 | * | ||
675 | * Current USB1 works as "USB Host". | ||
676 | * - set J30 "short" | ||
677 | * | ||
678 | * If you want to use it as "USB gadget", | ||
679 | * - J30 "open" | ||
680 | * - modify usbhs1_get_id() USBHS_HOST -> USBHS_GADGET | ||
681 | * - add .get_vbus = usbhs_get_vbus in usbhs1_private | ||
679 | */ | 682 | */ |
680 | #define IRQ8 evt2irq(0x0300) | 683 | #define IRQ8 evt2irq(0x0300) |
681 | |||
682 | /* USBHS1 USB Host support via r8a66597_hcd */ | ||
683 | static void usb1_host_port_power(int port, int power) | ||
684 | { | ||
685 | if (!power) /* only power-on is supported for now */ | ||
686 | return; | ||
687 | |||
688 | /* set VBOUT/PWEN and EXTLP1 in DVSTCTR */ | ||
689 | __raw_writew(__raw_readw(0xE68B0008) | 0x600, 0xE68B0008); | ||
690 | } | ||
691 | |||
692 | static struct r8a66597_platdata usb1_host_data = { | ||
693 | .on_chip = 1, | ||
694 | .port_power = usb1_host_port_power, | ||
695 | }; | ||
696 | |||
697 | static struct resource usb1_host_resources[] = { | ||
698 | [0] = { | ||
699 | .name = "USBHS1", | ||
700 | .start = 0xe68b0000, | ||
701 | .end = 0xe68b00e6 - 1, | ||
702 | .flags = IORESOURCE_MEM, | ||
703 | }, | ||
704 | [1] = { | ||
705 | .start = evt2irq(0x1ce0) /* USB1_USB1I0 */, | ||
706 | .flags = IORESOURCE_IRQ, | ||
707 | }, | ||
708 | }; | ||
709 | |||
710 | static struct platform_device usb1_host_device = { | ||
711 | .name = "r8a66597_hcd", | ||
712 | .id = 1, | ||
713 | .dev = { | ||
714 | .dma_mask = NULL, /* not use dma */ | ||
715 | .coherent_dma_mask = 0xffffffff, | ||
716 | .platform_data = &usb1_host_data, | ||
717 | }, | ||
718 | .num_resources = ARRAY_SIZE(usb1_host_resources), | ||
719 | .resource = usb1_host_resources, | ||
720 | }; | ||
721 | |||
722 | /* USBHS1 USB Function support via renesas_usbhs */ | ||
723 | |||
724 | #define USB_PHY_MODE (1 << 4) | 684 | #define USB_PHY_MODE (1 << 4) |
725 | #define USB_PHY_INT_EN ((1 << 3) | (1 << 2)) | 685 | #define USB_PHY_INT_EN ((1 << 3) | (1 << 2)) |
726 | #define USB_PHY_ON (1 << 1) | 686 | #define USB_PHY_ON (1 << 1) |
@@ -776,7 +736,7 @@ static void usbhs1_hardware_exit(struct platform_device *pdev) | |||
776 | 736 | ||
777 | static int usbhs1_get_id(struct platform_device *pdev) | 737 | static int usbhs1_get_id(struct platform_device *pdev) |
778 | { | 738 | { |
779 | return USBHS_GADGET; | 739 | return USBHS_HOST; |
780 | } | 740 | } |
781 | 741 | ||
782 | static u32 usbhs1_pipe_cfg[] = { | 742 | static u32 usbhs1_pipe_cfg[] = { |
@@ -807,7 +767,6 @@ static struct usbhs_private usbhs1_private = { | |||
807 | .hardware_exit = usbhs1_hardware_exit, | 767 | .hardware_exit = usbhs1_hardware_exit, |
808 | .get_id = usbhs1_get_id, | 768 | .get_id = usbhs1_get_id, |
809 | .phy_reset = usbhs_phy_reset, | 769 | .phy_reset = usbhs_phy_reset, |
810 | .get_vbus = usbhs_get_vbus, | ||
811 | }, | 770 | }, |
812 | .driver_param = { | 771 | .driver_param = { |
813 | .buswait_bwait = 4, | 772 | .buswait_bwait = 4, |
@@ -1184,15 +1143,6 @@ static struct resource sh_mmcif_resources[] = { | |||
1184 | }, | 1143 | }, |
1185 | }; | 1144 | }; |
1186 | 1145 | ||
1187 | static struct sh_mmcif_dma sh_mmcif_dma = { | ||
1188 | .chan_priv_rx = { | ||
1189 | .slave_id = SHDMA_SLAVE_MMCIF_RX, | ||
1190 | }, | ||
1191 | .chan_priv_tx = { | ||
1192 | .slave_id = SHDMA_SLAVE_MMCIF_TX, | ||
1193 | }, | ||
1194 | }; | ||
1195 | |||
1196 | static struct sh_mmcif_plat_data sh_mmcif_plat = { | 1146 | static struct sh_mmcif_plat_data sh_mmcif_plat = { |
1197 | .sup_pclk = 0, | 1147 | .sup_pclk = 0, |
1198 | .ocr = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34, | 1148 | .ocr = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34, |
@@ -1200,7 +1150,8 @@ static struct sh_mmcif_plat_data sh_mmcif_plat = { | |||
1200 | MMC_CAP_8_BIT_DATA | | 1150 | MMC_CAP_8_BIT_DATA | |
1201 | MMC_CAP_NEEDS_POLL, | 1151 | MMC_CAP_NEEDS_POLL, |
1202 | .get_cd = slot_cn7_get_cd, | 1152 | .get_cd = slot_cn7_get_cd, |
1203 | .dma = &sh_mmcif_dma, | 1153 | .slave_id_tx = SHDMA_SLAVE_MMCIF_TX, |
1154 | .slave_id_rx = SHDMA_SLAVE_MMCIF_RX, | ||
1204 | }; | 1155 | }; |
1205 | 1156 | ||
1206 | static struct platform_device sh_mmcif_device = { | 1157 | static struct platform_device sh_mmcif_device = { |
@@ -1311,7 +1262,6 @@ static struct platform_device *mackerel_devices[] __initdata = { | |||
1311 | &nor_flash_device, | 1262 | &nor_flash_device, |
1312 | &smc911x_device, | 1263 | &smc911x_device, |
1313 | &lcdc_device, | 1264 | &lcdc_device, |
1314 | &usb1_host_device, | ||
1315 | &usbhs1_device, | 1265 | &usbhs1_device, |
1316 | &usbhs0_device, | 1266 | &usbhs0_device, |
1317 | &leds_device, | 1267 | &leds_device, |
@@ -1473,9 +1423,6 @@ static void __init mackerel_init(void) | |||
1473 | gpio_pull_down(GPIO_PORT167CR); /* VBUS0_1 pull down */ | 1423 | gpio_pull_down(GPIO_PORT167CR); /* VBUS0_1 pull down */ |
1474 | gpio_request(GPIO_FN_IDIN_1_113, NULL); | 1424 | gpio_request(GPIO_FN_IDIN_1_113, NULL); |
1475 | 1425 | ||
1476 | /* USB phy tweak to make the r8a66597_hcd host driver work */ | ||
1477 | __raw_writew(0x8a0a, 0xe6058130); /* USBCR4 */ | ||
1478 | |||
1479 | /* enable FSI2 port A (ak4643) */ | 1426 | /* enable FSI2 port A (ak4643) */ |
1480 | gpio_request(GPIO_FN_FSIAIBT, NULL); | 1427 | gpio_request(GPIO_FN_FSIAIBT, NULL); |
1481 | gpio_request(GPIO_FN_FSIAILR, NULL); | 1428 | gpio_request(GPIO_FN_FSIAILR, NULL); |
diff --git a/arch/arm/mach-shmobile/clock-sh73a0.c b/arch/arm/mach-shmobile/clock-sh73a0.c index afbead6a6e17..7727cca6136c 100644 --- a/arch/arm/mach-shmobile/clock-sh73a0.c +++ b/arch/arm/mach-shmobile/clock-sh73a0.c | |||
@@ -365,6 +365,114 @@ static struct clk div6_clks[DIV6_NR] = { | |||
365 | dsi_parent, ARRAY_SIZE(dsi_parent), 12, 3), | 365 | dsi_parent, ARRAY_SIZE(dsi_parent), 12, 3), |
366 | }; | 366 | }; |
367 | 367 | ||
368 | /* DSI DIV */ | ||
369 | static unsigned long dsiphy_recalc(struct clk *clk) | ||
370 | { | ||
371 | u32 value; | ||
372 | |||
373 | value = __raw_readl(clk->mapping->base); | ||
374 | |||
375 | /* FIXME */ | ||
376 | if (!(value & 0x000B8000)) | ||
377 | return clk->parent->rate; | ||
378 | |||
379 | value &= 0x3f; | ||
380 | value += 1; | ||
381 | |||
382 | if ((value < 12) || | ||
383 | (value > 33)) { | ||
384 | pr_err("DSIPHY has wrong value (%d)", value); | ||
385 | return 0; | ||
386 | } | ||
387 | |||
388 | return clk->parent->rate / value; | ||
389 | } | ||
390 | |||
391 | static long dsiphy_round_rate(struct clk *clk, unsigned long rate) | ||
392 | { | ||
393 | return clk_rate_mult_range_round(clk, 12, 33, rate); | ||
394 | } | ||
395 | |||
396 | static void dsiphy_disable(struct clk *clk) | ||
397 | { | ||
398 | u32 value; | ||
399 | |||
400 | value = __raw_readl(clk->mapping->base); | ||
401 | value &= ~0x000B8000; | ||
402 | |||
403 | __raw_writel(value , clk->mapping->base); | ||
404 | } | ||
405 | |||
406 | static int dsiphy_enable(struct clk *clk) | ||
407 | { | ||
408 | u32 value; | ||
409 | int multi; | ||
410 | |||
411 | value = __raw_readl(clk->mapping->base); | ||
412 | multi = (value & 0x3f) + 1; | ||
413 | |||
414 | if ((multi < 12) || (multi > 33)) | ||
415 | return -EIO; | ||
416 | |||
417 | __raw_writel(value | 0x000B8000, clk->mapping->base); | ||
418 | |||
419 | return 0; | ||
420 | } | ||
421 | |||
422 | static int dsiphy_set_rate(struct clk *clk, unsigned long rate) | ||
423 | { | ||
424 | u32 value; | ||
425 | int idx; | ||
426 | |||
427 | idx = rate / clk->parent->rate; | ||
428 | if ((idx < 12) || (idx > 33)) | ||
429 | return -EINVAL; | ||
430 | |||
431 | idx += -1; | ||
432 | |||
433 | value = __raw_readl(clk->mapping->base); | ||
434 | value = (value & ~0x3f) + idx; | ||
435 | |||
436 | __raw_writel(value, clk->mapping->base); | ||
437 | |||
438 | return 0; | ||
439 | } | ||
440 | |||
441 | static struct clk_ops dsiphy_clk_ops = { | ||
442 | .recalc = dsiphy_recalc, | ||
443 | .round_rate = dsiphy_round_rate, | ||
444 | .set_rate = dsiphy_set_rate, | ||
445 | .enable = dsiphy_enable, | ||
446 | .disable = dsiphy_disable, | ||
447 | }; | ||
448 | |||
449 | static struct clk_mapping dsi0phy_clk_mapping = { | ||
450 | .phys = DSI0PHYCR, | ||
451 | .len = 4, | ||
452 | }; | ||
453 | |||
454 | static struct clk_mapping dsi1phy_clk_mapping = { | ||
455 | .phys = DSI1PHYCR, | ||
456 | .len = 4, | ||
457 | }; | ||
458 | |||
459 | static struct clk dsi0phy_clk = { | ||
460 | .ops = &dsiphy_clk_ops, | ||
461 | .parent = &div6_clks[DIV6_DSI0P], /* late install */ | ||
462 | .mapping = &dsi0phy_clk_mapping, | ||
463 | }; | ||
464 | |||
465 | static struct clk dsi1phy_clk = { | ||
466 | .ops = &dsiphy_clk_ops, | ||
467 | .parent = &div6_clks[DIV6_DSI1P], /* late install */ | ||
468 | .mapping = &dsi1phy_clk_mapping, | ||
469 | }; | ||
470 | |||
471 | static struct clk *late_main_clks[] = { | ||
472 | &dsi0phy_clk, | ||
473 | &dsi1phy_clk, | ||
474 | }; | ||
475 | |||
368 | enum { MSTP001, | 476 | enum { MSTP001, |
369 | MSTP129, MSTP128, MSTP127, MSTP126, MSTP125, MSTP118, MSTP116, MSTP100, | 477 | MSTP129, MSTP128, MSTP127, MSTP126, MSTP125, MSTP118, MSTP116, MSTP100, |
370 | MSTP219, | 478 | MSTP219, |
@@ -429,6 +537,8 @@ static struct clk_lookup lookups[] = { | |||
429 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSIT]), | 537 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSIT]), |
430 | CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSI0P]), | 538 | CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSI0P]), |
431 | CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSI1P]), | 539 | CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSI1P]), |
540 | CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.0", &dsi0phy_clk), | ||
541 | CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.1", &dsi1phy_clk), | ||
432 | 542 | ||
433 | /* MSTP32 clocks */ | 543 | /* MSTP32 clocks */ |
434 | CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* I2C2 */ | 544 | CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* I2C2 */ |
@@ -504,6 +614,9 @@ void __init sh73a0_clock_init(void) | |||
504 | if (!ret) | 614 | if (!ret) |
505 | ret = sh_clk_mstp32_register(mstp_clks, MSTP_NR); | 615 | ret = sh_clk_mstp32_register(mstp_clks, MSTP_NR); |
506 | 616 | ||
617 | for (k = 0; !ret && (k < ARRAY_SIZE(late_main_clks)); k++) | ||
618 | ret = clk_register(late_main_clks[k]); | ||
619 | |||
507 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); | 620 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); |
508 | 621 | ||
509 | if (!ret) | 622 | if (!ret) |
diff --git a/arch/arm/mach-shmobile/include/mach/entry-macro.S b/arch/arm/mach-shmobile/include/mach/entry-macro.S deleted file mode 100644 index 2a57b2964ee9..000000000000 --- a/arch/arm/mach-shmobile/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Paul Mundt | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; version 2 of the License. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program; if not, write to the Free Software | ||
15 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
16 | */ | ||
17 | |||
18 | .macro disable_fiq | ||
19 | .endm | ||
20 | |||
21 | .macro arch_ret_to_user, tmp1, tmp2 | ||
22 | .endm | ||
diff --git a/arch/arm/mach-shmobile/include/mach/sh73a0.h b/arch/arm/mach-shmobile/include/mach/sh73a0.h index 881d515a9686..cad57578ceed 100644 --- a/arch/arm/mach-shmobile/include/mach/sh73a0.h +++ b/arch/arm/mach-shmobile/include/mach/sh73a0.h | |||
@@ -515,8 +515,8 @@ enum { | |||
515 | SHDMA_SLAVE_MMCIF_RX, | 515 | SHDMA_SLAVE_MMCIF_RX, |
516 | }; | 516 | }; |
517 | 517 | ||
518 | /* PINT interrupts are located at Linux IRQ 768 and up */ | 518 | /* PINT interrupts are located at Linux IRQ 800 and up */ |
519 | #define SH73A0_PINT0_IRQ(irq) ((irq) + 768) | 519 | #define SH73A0_PINT0_IRQ(irq) ((irq) + 800) |
520 | #define SH73A0_PINT1_IRQ(irq) ((irq) + 800) | 520 | #define SH73A0_PINT1_IRQ(irq) ((irq) + 832) |
521 | 521 | ||
522 | #endif /* __ASM_SH73A0_H__ */ | 522 | #endif /* __ASM_SH73A0_H__ */ |
diff --git a/arch/arm/mach-shmobile/intc-sh73a0.c b/arch/arm/mach-shmobile/intc-sh73a0.c index 1eda6b0b69e3..9857595eaa79 100644 --- a/arch/arm/mach-shmobile/intc-sh73a0.c +++ b/arch/arm/mach-shmobile/intc-sh73a0.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
22 | #include <linux/module.h> | ||
22 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
23 | #include <linux/io.h> | 24 | #include <linux/io.h> |
24 | #include <linux/sh_intc.h> | 25 | #include <linux/sh_intc.h> |
@@ -445,6 +446,7 @@ void __init sh73a0_init_irq(void) | |||
445 | setup_irq(gic_spi(1 + k), &sh73a0_irq_pin_cascade[k]); | 446 | setup_irq(gic_spi(1 + k), &sh73a0_irq_pin_cascade[k]); |
446 | 447 | ||
447 | n = intcs_evt2irq(to_intc_vect(gic_spi(1 + k))); | 448 | n = intcs_evt2irq(to_intc_vect(gic_spi(1 + k))); |
449 | WARN_ON(irq_alloc_desc_at(n, numa_node_id()) != n); | ||
448 | irq_set_chip_and_handler_name(n, &intca_gic_irq_chip, | 450 | irq_set_chip_and_handler_name(n, &intca_gic_irq_chip, |
449 | handle_level_irq, "level"); | 451 | handle_level_irq, "level"); |
450 | set_irq_flags(n, IRQF_VALID); /* yuck */ | 452 | set_irq_flags(n, IRQF_VALID); /* yuck */ |
diff --git a/arch/arm/mach-shmobile/pfc-r8a7779.c b/arch/arm/mach-shmobile/pfc-r8a7779.c index 963532f2b2c4..d14c9b048077 100644 --- a/arch/arm/mach-shmobile/pfc-r8a7779.c +++ b/arch/arm/mach-shmobile/pfc-r8a7779.c | |||
@@ -2120,7 +2120,7 @@ static struct pinmux_cfg_reg pinmux_config_regs[] = { | |||
2120 | FN_AUDATA3, 0, 0, 0 } | 2120 | FN_AUDATA3, 0, 0, 0 } |
2121 | }, | 2121 | }, |
2122 | { PINMUX_CFG_REG_VAR("IPSR4", 0xfffc0030, 32, | 2122 | { PINMUX_CFG_REG_VAR("IPSR4", 0xfffc0030, 32, |
2123 | 3, 1, 1, 1, 1, 1, 1, 3, 3, 1, | 2123 | 3, 1, 1, 1, 1, 1, 1, 3, 3, |
2124 | 1, 1, 1, 1, 1, 1, 3, 3, 3, 2) { | 2124 | 1, 1, 1, 1, 1, 1, 3, 3, 3, 2) { |
2125 | /* IP4_31_29 [3] */ | 2125 | /* IP4_31_29 [3] */ |
2126 | FN_DU1_DB0, FN_VI2_DATA4_VI2_B4, FN_SCL2_B, FN_SD3_DAT0, | 2126 | FN_DU1_DB0, FN_VI2_DATA4_VI2_B4, FN_SCL2_B, FN_SD3_DAT0, |
diff --git a/arch/arm/mach-shmobile/pfc-sh7372.c b/arch/arm/mach-shmobile/pfc-sh7372.c index 1bd6585a6acf..336093f9210a 100644 --- a/arch/arm/mach-shmobile/pfc-sh7372.c +++ b/arch/arm/mach-shmobile/pfc-sh7372.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/gpio.h> | 25 | #include <linux/gpio.h> |
26 | #include <mach/irqs.h> | ||
26 | #include <mach/sh7372.h> | 27 | #include <mach/sh7372.h> |
27 | 28 | ||
28 | #define CPU_ALL_PORT(fn, pfx, sfx) \ | 29 | #define CPU_ALL_PORT(fn, pfx, sfx) \ |
@@ -1594,6 +1595,43 @@ static struct pinmux_data_reg pinmux_data_regs[] = { | |||
1594 | { }, | 1595 | { }, |
1595 | }; | 1596 | }; |
1596 | 1597 | ||
1598 | #define EXT_IRQ16L(n) evt2irq(0x200 + ((n) << 5)) | ||
1599 | #define EXT_IRQ16H(n) evt2irq(0x3200 + (((n) - 16) << 5)) | ||
1600 | static struct pinmux_irq pinmux_irqs[] = { | ||
1601 | PINMUX_IRQ(EXT_IRQ16L(0), PORT6_FN0, PORT162_FN0), | ||
1602 | PINMUX_IRQ(EXT_IRQ16L(1), PORT12_FN0), | ||
1603 | PINMUX_IRQ(EXT_IRQ16L(2), PORT4_FN0, PORT5_FN0), | ||
1604 | PINMUX_IRQ(EXT_IRQ16L(3), PORT8_FN0, PORT16_FN0), | ||
1605 | PINMUX_IRQ(EXT_IRQ16L(4), PORT17_FN0, PORT163_FN0), | ||
1606 | PINMUX_IRQ(EXT_IRQ16L(5), PORT18_FN0), | ||
1607 | PINMUX_IRQ(EXT_IRQ16L(6), PORT39_FN0, PORT164_FN0), | ||
1608 | PINMUX_IRQ(EXT_IRQ16L(7), PORT40_FN0, PORT167_FN0), | ||
1609 | PINMUX_IRQ(EXT_IRQ16L(8), PORT41_FN0, PORT168_FN0), | ||
1610 | PINMUX_IRQ(EXT_IRQ16L(9), PORT42_FN0, PORT169_FN0), | ||
1611 | PINMUX_IRQ(EXT_IRQ16L(10), PORT65_FN0), | ||
1612 | PINMUX_IRQ(EXT_IRQ16L(11), PORT67_FN0), | ||
1613 | PINMUX_IRQ(EXT_IRQ16L(12), PORT80_FN0, PORT137_FN0), | ||
1614 | PINMUX_IRQ(EXT_IRQ16L(13), PORT81_FN0, PORT145_FN0), | ||
1615 | PINMUX_IRQ(EXT_IRQ16L(14), PORT82_FN0, PORT146_FN0), | ||
1616 | PINMUX_IRQ(EXT_IRQ16L(15), PORT83_FN0, PORT147_FN0), | ||
1617 | PINMUX_IRQ(EXT_IRQ16H(16), PORT84_FN0, PORT170_FN0), | ||
1618 | PINMUX_IRQ(EXT_IRQ16H(17), PORT85_FN0), | ||
1619 | PINMUX_IRQ(EXT_IRQ16H(18), PORT86_FN0), | ||
1620 | PINMUX_IRQ(EXT_IRQ16H(19), PORT87_FN0), | ||
1621 | PINMUX_IRQ(EXT_IRQ16H(20), PORT92_FN0), | ||
1622 | PINMUX_IRQ(EXT_IRQ16H(21), PORT93_FN0), | ||
1623 | PINMUX_IRQ(EXT_IRQ16H(22), PORT94_FN0), | ||
1624 | PINMUX_IRQ(EXT_IRQ16H(23), PORT95_FN0), | ||
1625 | PINMUX_IRQ(EXT_IRQ16H(24), PORT112_FN0), | ||
1626 | PINMUX_IRQ(EXT_IRQ16H(25), PORT119_FN0), | ||
1627 | PINMUX_IRQ(EXT_IRQ16H(26), PORT121_FN0, PORT172_FN0), | ||
1628 | PINMUX_IRQ(EXT_IRQ16H(27), PORT122_FN0, PORT180_FN0), | ||
1629 | PINMUX_IRQ(EXT_IRQ16H(28), PORT123_FN0, PORT181_FN0), | ||
1630 | PINMUX_IRQ(EXT_IRQ16H(29), PORT129_FN0, PORT182_FN0), | ||
1631 | PINMUX_IRQ(EXT_IRQ16H(30), PORT130_FN0, PORT183_FN0), | ||
1632 | PINMUX_IRQ(EXT_IRQ16H(31), PORT138_FN0, PORT184_FN0), | ||
1633 | }; | ||
1634 | |||
1597 | static struct pinmux_info sh7372_pinmux_info = { | 1635 | static struct pinmux_info sh7372_pinmux_info = { |
1598 | .name = "sh7372_pfc", | 1636 | .name = "sh7372_pfc", |
1599 | .reserved_id = PINMUX_RESERVED, | 1637 | .reserved_id = PINMUX_RESERVED, |
@@ -1614,6 +1652,9 @@ static struct pinmux_info sh7372_pinmux_info = { | |||
1614 | 1652 | ||
1615 | .gpio_data = pinmux_data, | 1653 | .gpio_data = pinmux_data, |
1616 | .gpio_data_size = ARRAY_SIZE(pinmux_data), | 1654 | .gpio_data_size = ARRAY_SIZE(pinmux_data), |
1655 | |||
1656 | .gpio_irq = pinmux_irqs, | ||
1657 | .gpio_irq_size = ARRAY_SIZE(pinmux_irqs), | ||
1617 | }; | 1658 | }; |
1618 | 1659 | ||
1619 | void sh7372_pinmux_init(void) | 1660 | void sh7372_pinmux_init(void) |
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c index 6fcf304d3cdf..a83cf51fc099 100644 --- a/arch/arm/mach-shmobile/setup-sh7372.c +++ b/arch/arm/mach-shmobile/setup-sh7372.c | |||
@@ -662,6 +662,7 @@ static struct sh_dmae_pdata usb_dma0_platform_data = { | |||
662 | .dmaor_is_32bit = 1, | 662 | .dmaor_is_32bit = 1, |
663 | .needs_tend_set = 1, | 663 | .needs_tend_set = 1, |
664 | .no_dmars = 1, | 664 | .no_dmars = 1, |
665 | .slave_only = 1, | ||
665 | }; | 666 | }; |
666 | 667 | ||
667 | static struct resource sh7372_usb_dmae0_resources[] = { | 668 | static struct resource sh7372_usb_dmae0_resources[] = { |
@@ -723,6 +724,7 @@ static struct sh_dmae_pdata usb_dma1_platform_data = { | |||
723 | .dmaor_is_32bit = 1, | 724 | .dmaor_is_32bit = 1, |
724 | .needs_tend_set = 1, | 725 | .needs_tend_set = 1, |
725 | .no_dmars = 1, | 726 | .no_dmars = 1, |
727 | .slave_only = 1, | ||
726 | }; | 728 | }; |
727 | 729 | ||
728 | static struct resource sh7372_usb_dmae1_resources[] = { | 730 | static struct resource sh7372_usb_dmae1_resources[] = { |
diff --git a/arch/arm/mach-shmobile/smp-sh73a0.c b/arch/arm/mach-shmobile/smp-sh73a0.c index 0d159d64a345..2d0d4212be41 100644 --- a/arch/arm/mach-shmobile/smp-sh73a0.c +++ b/arch/arm/mach-shmobile/smp-sh73a0.c | |||
@@ -80,7 +80,7 @@ int __cpuinit sh73a0_boot_secondary(unsigned int cpu) | |||
80 | /* enable cache coherency */ | 80 | /* enable cache coherency */ |
81 | modify_scu_cpu_psr(0, 3 << (cpu * 8)); | 81 | modify_scu_cpu_psr(0, 3 << (cpu * 8)); |
82 | 82 | ||
83 | if (((__raw_readw(__io(PSTR)) >> (4 * cpu)) & 3) == 3) | 83 | if (((__raw_readl(__io(PSTR)) >> (4 * cpu)) & 3) == 3) |
84 | __raw_writel(1 << cpu, __io(WUPCR)); /* wake up */ | 84 | __raw_writel(1 << cpu, __io(WUPCR)); /* wake up */ |
85 | else | 85 | else |
86 | __raw_writel(1 << cpu, __io(SRESCR)); /* reset */ | 86 | __raw_writel(1 << cpu, __io(SRESCR)); /* reset */ |
diff --git a/arch/arm/mach-spear3xx/include/mach/entry-macro.S b/arch/arm/mach-spear3xx/include/mach/entry-macro.S deleted file mode 100644 index de3bb41c8e9e..000000000000 --- a/arch/arm/mach-spear3xx/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear3xx/include/mach/entry-macro.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for SPEAr3xx machine family | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | .macro disable_fiq | ||
15 | .endm | ||
16 | |||
17 | .macro arch_ret_to_user, tmp1, tmp2 | ||
18 | .endm | ||
diff --git a/arch/arm/mach-spear6xx/include/mach/entry-macro.S b/arch/arm/mach-spear6xx/include/mach/entry-macro.S deleted file mode 100644 index d490a910d925..000000000000 --- a/arch/arm/mach-spear6xx/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear6xx/include/mach/entry-macro.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for SPEAr6xx machine family | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Rajeev Kumar<rajeev-dlh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | .macro disable_fiq | ||
15 | .endm | ||
16 | |||
17 | .macro arch_ret_to_user, tmp1, tmp2 | ||
18 | .endm | ||
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig index 373652d76b90..d2cb4b037f7f 100644 --- a/arch/arm/mach-tegra/Kconfig +++ b/arch/arm/mach-tegra/Kconfig | |||
@@ -10,6 +10,14 @@ config ARCH_TEGRA_2x_SOC | |||
10 | select USB_ARCH_HAS_EHCI if USB_SUPPORT | 10 | select USB_ARCH_HAS_EHCI if USB_SUPPORT |
11 | select USB_ULPI if USB_SUPPORT | 11 | select USB_ULPI if USB_SUPPORT |
12 | select USB_ULPI_VIEWPORT if USB_SUPPORT | 12 | select USB_ULPI_VIEWPORT if USB_SUPPORT |
13 | select ARM_ERRATA_720789 | ||
14 | select ARM_ERRATA_742230 | ||
15 | select ARM_ERRATA_751472 | ||
16 | select ARM_ERRATA_754327 | ||
17 | select ARM_ERRATA_764369 | ||
18 | select PL310_ERRATA_727915 if CACHE_L2X0 | ||
19 | select PL310_ERRATA_769419 if CACHE_L2X0 | ||
20 | select CPU_FREQ_TABLE if CPU_FREQ | ||
13 | help | 21 | help |
14 | Support for NVIDIA Tegra AP20 and T20 processors, based on the | 22 | Support for NVIDIA Tegra AP20 and T20 processors, based on the |
15 | ARM CortexA9MP CPU and the ARM PL310 L2 cache controller | 23 | ARM CortexA9MP CPU and the ARM PL310 L2 cache controller |
@@ -23,6 +31,12 @@ config ARCH_TEGRA_3x_SOC | |||
23 | select USB_ULPI if USB_SUPPORT | 31 | select USB_ULPI if USB_SUPPORT |
24 | select USB_ULPI_VIEWPORT if USB_SUPPORT | 32 | select USB_ULPI_VIEWPORT if USB_SUPPORT |
25 | select USE_OF | 33 | select USE_OF |
34 | select ARM_ERRATA_743622 | ||
35 | select ARM_ERRATA_751472 | ||
36 | select ARM_ERRATA_754322 | ||
37 | select ARM_ERRATA_764369 | ||
38 | select PL310_ERRATA_769419 if CACHE_L2X0 | ||
39 | select CPU_FREQ_TABLE if CPU_FREQ | ||
26 | help | 40 | help |
27 | Support for NVIDIA Tegra T30 processor family, based on the | 41 | Support for NVIDIA Tegra T30 processor family, based on the |
28 | ARM CortexA9MP CPU and the ARM PL310 L2 cache controller | 42 | ARM CortexA9MP CPU and the ARM PL310 L2 cache controller |
diff --git a/arch/arm/mach-tegra/Makefile b/arch/arm/mach-tegra/Makefile index e120ff54f663..829066fdc2ad 100644 --- a/arch/arm/mach-tegra/Makefile +++ b/arch/arm/mach-tegra/Makefile | |||
@@ -13,7 +13,8 @@ obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra2_emc.o | |||
13 | obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += pinmux-tegra20-tables.o | 13 | obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += pinmux-tegra20-tables.o |
14 | obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += pinmux-tegra30-tables.o | 14 | obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += pinmux-tegra30-tables.o |
15 | obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += board-dt-tegra30.o | 15 | obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += board-dt-tegra30.o |
16 | obj-$(CONFIG_SMP) += platsmp.o localtimer.o headsmp.o | 16 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o |
17 | obj-$(CONFIG_LOCAL_TIMERS) += localtimer.o | ||
17 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o | 18 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o |
18 | obj-$(CONFIG_TEGRA_SYSTEM_DMA) += dma.o | 19 | obj-$(CONFIG_TEGRA_SYSTEM_DMA) += dma.o |
19 | obj-$(CONFIG_CPU_FREQ) += cpu-tegra.o | 20 | obj-$(CONFIG_CPU_FREQ) += cpu-tegra.o |
diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c index fcf4f377b1dc..330afdfa2475 100644 --- a/arch/arm/mach-tegra/board-paz00.c +++ b/arch/arm/mach-tegra/board-paz00.c | |||
@@ -60,9 +60,9 @@ static struct plat_serial8250_port debug_uart_platform_data[] = { | |||
60 | .uartclk = 216000000, | 60 | .uartclk = 216000000, |
61 | }, { | 61 | }, { |
62 | /* serial port on mini-pcie */ | 62 | /* serial port on mini-pcie */ |
63 | .membase = IO_ADDRESS(TEGRA_UARTD_BASE), | 63 | .membase = IO_ADDRESS(TEGRA_UARTC_BASE), |
64 | .mapbase = TEGRA_UARTD_BASE, | 64 | .mapbase = TEGRA_UARTC_BASE, |
65 | .irq = INT_UARTD, | 65 | .irq = INT_UARTC, |
66 | .flags = UPF_BOOT_AUTOCONF | UPF_FIXED_TYPE, | 66 | .flags = UPF_BOOT_AUTOCONF | UPF_FIXED_TYPE, |
67 | .type = PORT_TEGRA, | 67 | .type = PORT_TEGRA, |
68 | .iotype = UPIO_MEM, | 68 | .iotype = UPIO_MEM, |
@@ -174,7 +174,7 @@ static void __init tegra_paz00_fixup(struct tag *tags, char **cmdline, | |||
174 | static __initdata struct tegra_clk_init_table paz00_clk_init_table[] = { | 174 | static __initdata struct tegra_clk_init_table paz00_clk_init_table[] = { |
175 | /* name parent rate enabled */ | 175 | /* name parent rate enabled */ |
176 | { "uarta", "pll_p", 216000000, true }, | 176 | { "uarta", "pll_p", 216000000, true }, |
177 | { "uartd", "pll_p", 216000000, true }, | 177 | { "uartc", "pll_p", 216000000, true }, |
178 | 178 | ||
179 | { "pll_p_out4", "pll_p", 24000000, true }, | 179 | { "pll_p_out4", "pll_p", 24000000, true }, |
180 | { "usbd", "clk_m", 12000000, false }, | 180 | { "usbd", "clk_m", 12000000, false }, |
diff --git a/arch/arm/mach-tegra/board-paz00.h b/arch/arm/mach-tegra/board-paz00.h index ffa83f580db6..3c9f8da37ea3 100644 --- a/arch/arm/mach-tegra/board-paz00.h +++ b/arch/arm/mach-tegra/board-paz00.h | |||
@@ -22,7 +22,7 @@ | |||
22 | /* SDCARD */ | 22 | /* SDCARD */ |
23 | #define TEGRA_GPIO_SD1_CD TEGRA_GPIO_PV5 | 23 | #define TEGRA_GPIO_SD1_CD TEGRA_GPIO_PV5 |
24 | #define TEGRA_GPIO_SD1_WP TEGRA_GPIO_PH1 | 24 | #define TEGRA_GPIO_SD1_WP TEGRA_GPIO_PH1 |
25 | #define TEGRA_GPIO_SD1_POWER TEGRA_GPIO_PT3 | 25 | #define TEGRA_GPIO_SD1_POWER TEGRA_GPIO_PV1 |
26 | 26 | ||
27 | /* ULPI */ | 27 | /* ULPI */ |
28 | #define TEGRA_ULPI_RST TEGRA_GPIO_PV0 | 28 | #define TEGRA_ULPI_RST TEGRA_GPIO_PV0 |
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c index 2db20da1d585..fac449e84d80 100644 --- a/arch/arm/mach-tegra/common.c +++ b/arch/arm/mach-tegra/common.c | |||
@@ -95,8 +95,6 @@ static void __init tegra_init_cache(u32 tag_latency, u32 data_latency) | |||
95 | #ifdef CONFIG_ARCH_TEGRA_2x_SOC | 95 | #ifdef CONFIG_ARCH_TEGRA_2x_SOC |
96 | void __init tegra20_init_early(void) | 96 | void __init tegra20_init_early(void) |
97 | { | 97 | { |
98 | disable_hlt(); /* idle WFI usage needs to be confirmed */ | ||
99 | |||
100 | tegra_init_fuse(); | 98 | tegra_init_fuse(); |
101 | tegra2_init_clocks(); | 99 | tegra2_init_clocks(); |
102 | tegra_clk_init_from_table(tegra20_clk_init_table); | 100 | tegra_clk_init_from_table(tegra20_clk_init_table); |
diff --git a/arch/arm/mach-tegra/include/mach/dma.h b/arch/arm/mach-tegra/include/mach/dma.h index d0132e8031a1..3c9339058bec 100644 --- a/arch/arm/mach-tegra/include/mach/dma.h +++ b/arch/arm/mach-tegra/include/mach/dma.h | |||
@@ -23,11 +23,6 @@ | |||
23 | 23 | ||
24 | #include <linux/list.h> | 24 | #include <linux/list.h> |
25 | 25 | ||
26 | #if defined(CONFIG_TEGRA_SYSTEM_DMA) | ||
27 | |||
28 | struct tegra_dma_req; | ||
29 | struct tegra_dma_channel; | ||
30 | |||
31 | #define TEGRA_DMA_REQ_SEL_CNTR 0 | 26 | #define TEGRA_DMA_REQ_SEL_CNTR 0 |
32 | #define TEGRA_DMA_REQ_SEL_I2S_2 1 | 27 | #define TEGRA_DMA_REQ_SEL_I2S_2 1 |
33 | #define TEGRA_DMA_REQ_SEL_I2S_1 2 | 28 | #define TEGRA_DMA_REQ_SEL_I2S_1 2 |
@@ -56,6 +51,11 @@ struct tegra_dma_channel; | |||
56 | #define TEGRA_DMA_REQ_SEL_OWR 25 | 51 | #define TEGRA_DMA_REQ_SEL_OWR 25 |
57 | #define TEGRA_DMA_REQ_SEL_INVALID 31 | 52 | #define TEGRA_DMA_REQ_SEL_INVALID 31 |
58 | 53 | ||
54 | #if defined(CONFIG_TEGRA_SYSTEM_DMA) | ||
55 | |||
56 | struct tegra_dma_req; | ||
57 | struct tegra_dma_channel; | ||
58 | |||
59 | enum tegra_dma_mode { | 59 | enum tegra_dma_mode { |
60 | TEGRA_DMA_SHARED = 1, | 60 | TEGRA_DMA_SHARED = 1, |
61 | TEGRA_DMA_MODE_CONTINOUS = 2, | 61 | TEGRA_DMA_MODE_CONTINOUS = 2, |
diff --git a/arch/arm/mach-tegra/include/mach/entry-macro.S b/arch/arm/mach-tegra/include/mach/entry-macro.S deleted file mode 100644 index e577cfe27e72..000000000000 --- a/arch/arm/mach-tegra/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* arch/arm/mach-tegra/include/mach/entry-macro.S | ||
2 | * | ||
3 | * Copyright (C) 2009 Palm, Inc. | ||
4 | * | ||
5 | * This software is licensed under the terms of the GNU General Public | ||
6 | * License version 2, as published by the Free Software Foundation, and | ||
7 | * may be copied, distributed, and modified under those terms. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | .macro disable_fiq | ||
17 | .endm | ||
18 | |||
19 | .macro arch_ret_to_user, tmp1, tmp2 | ||
20 | .endm | ||
diff --git a/arch/arm/mach-tegra/usb_phy.c b/arch/arm/mach-tegra/usb_phy.c index 37576a721aeb..6091cf3d8e8b 100644 --- a/arch/arm/mach-tegra/usb_phy.c +++ b/arch/arm/mach-tegra/usb_phy.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
23 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
24 | #include <linux/err.h> | 24 | #include <linux/err.h> |
25 | #include <linux/export.h> | ||
25 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
26 | #include <linux/io.h> | 27 | #include <linux/io.h> |
27 | #include <linux/gpio.h> | 28 | #include <linux/gpio.h> |
@@ -730,6 +731,7 @@ err0: | |||
730 | kfree(phy); | 731 | kfree(phy); |
731 | return ERR_PTR(err); | 732 | return ERR_PTR(err); |
732 | } | 733 | } |
734 | EXPORT_SYMBOL_GPL(tegra_usb_phy_open); | ||
733 | 735 | ||
734 | int tegra_usb_phy_power_on(struct tegra_usb_phy *phy) | 736 | int tegra_usb_phy_power_on(struct tegra_usb_phy *phy) |
735 | { | 737 | { |
@@ -738,6 +740,7 @@ int tegra_usb_phy_power_on(struct tegra_usb_phy *phy) | |||
738 | else | 740 | else |
739 | return utmi_phy_power_on(phy); | 741 | return utmi_phy_power_on(phy); |
740 | } | 742 | } |
743 | EXPORT_SYMBOL_GPL(tegra_usb_phy_power_on); | ||
741 | 744 | ||
742 | void tegra_usb_phy_power_off(struct tegra_usb_phy *phy) | 745 | void tegra_usb_phy_power_off(struct tegra_usb_phy *phy) |
743 | { | 746 | { |
@@ -746,18 +749,21 @@ void tegra_usb_phy_power_off(struct tegra_usb_phy *phy) | |||
746 | else | 749 | else |
747 | utmi_phy_power_off(phy); | 750 | utmi_phy_power_off(phy); |
748 | } | 751 | } |
752 | EXPORT_SYMBOL_GPL(tegra_usb_phy_power_off); | ||
749 | 753 | ||
750 | void tegra_usb_phy_preresume(struct tegra_usb_phy *phy) | 754 | void tegra_usb_phy_preresume(struct tegra_usb_phy *phy) |
751 | { | 755 | { |
752 | if (!phy_is_ulpi(phy)) | 756 | if (!phy_is_ulpi(phy)) |
753 | utmi_phy_preresume(phy); | 757 | utmi_phy_preresume(phy); |
754 | } | 758 | } |
759 | EXPORT_SYMBOL_GPL(tegra_usb_phy_preresume); | ||
755 | 760 | ||
756 | void tegra_usb_phy_postresume(struct tegra_usb_phy *phy) | 761 | void tegra_usb_phy_postresume(struct tegra_usb_phy *phy) |
757 | { | 762 | { |
758 | if (!phy_is_ulpi(phy)) | 763 | if (!phy_is_ulpi(phy)) |
759 | utmi_phy_postresume(phy); | 764 | utmi_phy_postresume(phy); |
760 | } | 765 | } |
766 | EXPORT_SYMBOL_GPL(tegra_usb_phy_postresume); | ||
761 | 767 | ||
762 | void tegra_ehci_phy_restore_start(struct tegra_usb_phy *phy, | 768 | void tegra_ehci_phy_restore_start(struct tegra_usb_phy *phy, |
763 | enum tegra_usb_phy_port_speed port_speed) | 769 | enum tegra_usb_phy_port_speed port_speed) |
@@ -765,24 +771,28 @@ void tegra_ehci_phy_restore_start(struct tegra_usb_phy *phy, | |||
765 | if (!phy_is_ulpi(phy)) | 771 | if (!phy_is_ulpi(phy)) |
766 | utmi_phy_restore_start(phy, port_speed); | 772 | utmi_phy_restore_start(phy, port_speed); |
767 | } | 773 | } |
774 | EXPORT_SYMBOL_GPL(tegra_ehci_phy_restore_start); | ||
768 | 775 | ||
769 | void tegra_ehci_phy_restore_end(struct tegra_usb_phy *phy) | 776 | void tegra_ehci_phy_restore_end(struct tegra_usb_phy *phy) |
770 | { | 777 | { |
771 | if (!phy_is_ulpi(phy)) | 778 | if (!phy_is_ulpi(phy)) |
772 | utmi_phy_restore_end(phy); | 779 | utmi_phy_restore_end(phy); |
773 | } | 780 | } |
781 | EXPORT_SYMBOL_GPL(tegra_ehci_phy_restore_end); | ||
774 | 782 | ||
775 | void tegra_usb_phy_clk_disable(struct tegra_usb_phy *phy) | 783 | void tegra_usb_phy_clk_disable(struct tegra_usb_phy *phy) |
776 | { | 784 | { |
777 | if (!phy_is_ulpi(phy)) | 785 | if (!phy_is_ulpi(phy)) |
778 | utmi_phy_clk_disable(phy); | 786 | utmi_phy_clk_disable(phy); |
779 | } | 787 | } |
788 | EXPORT_SYMBOL_GPL(tegra_usb_phy_clk_disable); | ||
780 | 789 | ||
781 | void tegra_usb_phy_clk_enable(struct tegra_usb_phy *phy) | 790 | void tegra_usb_phy_clk_enable(struct tegra_usb_phy *phy) |
782 | { | 791 | { |
783 | if (!phy_is_ulpi(phy)) | 792 | if (!phy_is_ulpi(phy)) |
784 | utmi_phy_clk_enable(phy); | 793 | utmi_phy_clk_enable(phy); |
785 | } | 794 | } |
795 | EXPORT_SYMBOL_GPL(tegra_usb_phy_clk_enable); | ||
786 | 796 | ||
787 | void tegra_usb_phy_close(struct tegra_usb_phy *phy) | 797 | void tegra_usb_phy_close(struct tegra_usb_phy *phy) |
788 | { | 798 | { |
@@ -794,3 +804,4 @@ void tegra_usb_phy_close(struct tegra_usb_phy *phy) | |||
794 | clk_put(phy->pll_u); | 804 | clk_put(phy->pll_u); |
795 | kfree(phy); | 805 | kfree(phy); |
796 | } | 806 | } |
807 | EXPORT_SYMBOL_GPL(tegra_usb_phy_close); | ||
diff --git a/arch/arm/mach-u300/include/mach/entry-macro.S b/arch/arm/mach-u300/include/mach/entry-macro.S deleted file mode 100644 index 7181d6ac6651..000000000000 --- a/arch/arm/mach-u300/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | /* | ||
2 | * | ||
3 | * arch-arm/mach-u300/include/mach/entry-macro.S | ||
4 | * | ||
5 | * | ||
6 | * Copyright (C) 2006-2009 ST-Ericsson AB | ||
7 | * License terms: GNU General Public License (GPL) version 2 | ||
8 | * Low-level IRQ helper macros for ST-Ericsson U300 | ||
9 | * Author: Linus Walleij <linus.walleij@stericsson.com> | ||
10 | */ | ||
11 | |||
12 | .macro disable_fiq | ||
13 | .endm | ||
14 | |||
15 | .macro arch_ret_to_user, tmp1, tmp2 | ||
16 | .endm | ||
diff --git a/arch/arm/mach-ux500/include/mach/entry-macro.S b/arch/arm/mach-ux500/include/mach/entry-macro.S deleted file mode 100644 index e16299e1020a..000000000000 --- a/arch/arm/mach-ux500/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | /* | ||
2 | * Low-level IRQ helper macros for U8500 platforms | ||
3 | * | ||
4 | * Copyright (C) 2009 ST-Ericsson. | ||
5 | * | ||
6 | * This file is a copy of ARM Realview platform. | ||
7 | * -just satisfied checkpatch script. | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | .macro disable_fiq | ||
15 | .endm | ||
16 | |||
17 | .macro arch_ret_to_user, tmp1, tmp2 | ||
18 | .endm | ||
diff --git a/arch/arm/mach-versatile/include/mach/entry-macro.S b/arch/arm/mach-versatile/include/mach/entry-macro.S deleted file mode 100644 index b6f0dbf122ee..000000000000 --- a/arch/arm/mach-versatile/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-versatile/include/mach/entry-macro.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for Versatile 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 | |||
11 | .macro disable_fiq | ||
12 | .endm | ||
13 | |||
14 | .macro arch_ret_to_user, tmp1, tmp2 | ||
15 | .endm | ||
diff --git a/arch/arm/mach-vexpress/include/mach/entry-macro.S b/arch/arm/mach-vexpress/include/mach/entry-macro.S deleted file mode 100644 index a14f9e62ca92..000000000000 --- a/arch/arm/mach-vexpress/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | .macro disable_fiq | ||
2 | .endm | ||
3 | |||
4 | .macro arch_ret_to_user, tmp1, tmp2 | ||
5 | .endm | ||
diff --git a/arch/arm/mach-vt8500/include/mach/entry-macro.S b/arch/arm/mach-vt8500/include/mach/entry-macro.S index 92684c7eaed3..367d1b55fb9a 100644 --- a/arch/arm/mach-vt8500/include/mach/entry-macro.S +++ b/arch/arm/mach-vt8500/include/mach/entry-macro.S | |||
@@ -8,18 +8,12 @@ | |||
8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | .macro disable_fiq | ||
12 | .endm | ||
13 | |||
14 | .macro get_irqnr_preamble, base, tmp | 11 | .macro get_irqnr_preamble, base, tmp |
15 | @ physical 0xd8140000 is virtual 0xf8140000 | 12 | @ physical 0xd8140000 is virtual 0xf8140000 |
16 | mov \base, #0xf8000000 | 13 | mov \base, #0xf8000000 |
17 | orr \base, \base, #0x00140000 | 14 | orr \base, \base, #0x00140000 |
18 | .endm | 15 | .endm |
19 | 16 | ||
20 | .macro arch_ret_to_user, tmp1, tmp2 | ||
21 | .endm | ||
22 | |||
23 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 17 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
24 | ldr \irqnr, [\base] | 18 | ldr \irqnr, [\base] |
25 | cmp \irqnr, #63 @ may be false positive, check interrupt status | 19 | cmp \irqnr, #63 @ may be false positive, check interrupt status |
diff --git a/arch/arm/mach-w90x900/include/mach/entry-macro.S b/arch/arm/mach-w90x900/include/mach/entry-macro.S index d39aca5be9ee..e286daca6827 100644 --- a/arch/arm/mach-w90x900/include/mach/entry-macro.S +++ b/arch/arm/mach-w90x900/include/mach/entry-macro.S | |||
@@ -15,9 +15,6 @@ | |||
15 | .macro get_irqnr_preamble, base, tmp | 15 | .macro get_irqnr_preamble, base, tmp |
16 | .endm | 16 | .endm |
17 | 17 | ||
18 | .macro arch_ret_to_user, tmp1, tmp2 | ||
19 | .endm | ||
20 | |||
21 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 18 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
22 | 19 | ||
23 | mov \base, #AIC_BA | 20 | mov \base, #AIC_BA |
@@ -27,8 +24,3 @@ | |||
27 | cmp \irqnr, #0 | 24 | cmp \irqnr, #0 |
28 | 25 | ||
29 | .endm | 26 | .endm |
30 | |||
31 | /* currently don't need an disable_fiq macro */ | ||
32 | |||
33 | .macro disable_fiq | ||
34 | .endm | ||
diff --git a/arch/arm/mach-zynq/include/mach/entry-macro.S b/arch/arm/mach-zynq/include/mach/entry-macro.S deleted file mode 100644 index d621fb732569..000000000000 --- a/arch/arm/mach-zynq/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-zynq/include/mach/entry-macro.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros | ||
5 | * | ||
6 | * Copyright (C) 2011 Xilinx | ||
7 | * | ||
8 | * based on arch/plat-mxc/include/mach/entry-macro.S | ||
9 | * | ||
10 | * Copyright (C) 2007 Lennert Buytenhek <buytenh@wantstofly.org> | ||
11 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
12 | * | ||
13 | * This software is licensed under the terms of the GNU General Public | ||
14 | * License version 2, as published by the Free Software Foundation, and | ||
15 | * may be copied, distributed, and modified under those terms. | ||
16 | * | ||
17 | * This program is distributed in the hope that it will be useful, | ||
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
20 | * GNU General Public License for more details. | ||
21 | */ | ||
22 | |||
23 | .macro disable_fiq | ||
24 | .endm | ||
25 | |||
26 | .macro arch_ret_to_user, tmp1, tmp2 | ||
27 | .endm | ||
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index 1a3ca2488164..7edef9121632 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig | |||
@@ -631,7 +631,8 @@ comment "Processor Features" | |||
631 | 631 | ||
632 | config ARM_LPAE | 632 | config ARM_LPAE |
633 | bool "Support for the Large Physical Address Extension" | 633 | bool "Support for the Large Physical Address Extension" |
634 | depends on MMU && CPU_V7 | 634 | depends on MMU && CPU_32v7 && !CPU_32v6 && !CPU_32v5 && \ |
635 | !CPU_32v4 && !CPU_32v3 | ||
635 | help | 636 | help |
636 | Say Y if you have an ARMv7 processor supporting the LPAE page | 637 | Say Y if you have an ARMv7 processor supporting the LPAE page |
637 | table format and you would like to access memory beyond the | 638 | table format and you would like to access memory beyond the |
diff --git a/arch/arm/mm/cache-v7.S b/arch/arm/mm/cache-v7.S index 07c4bc8ea0a4..a655d3da386d 100644 --- a/arch/arm/mm/cache-v7.S +++ b/arch/arm/mm/cache-v7.S | |||
@@ -54,9 +54,15 @@ loop1: | |||
54 | and r1, r1, #7 @ mask of the bits for current cache only | 54 | and r1, r1, #7 @ mask of the bits for current cache only |
55 | cmp r1, #2 @ see what cache we have at this level | 55 | cmp r1, #2 @ see what cache we have at this level |
56 | blt skip @ skip if no cache, or just i-cache | 56 | blt skip @ skip if no cache, or just i-cache |
57 | #ifdef CONFIG_PREEMPT | ||
58 | save_and_disable_irqs_notrace r9 @ make cssr&csidr read atomic | ||
59 | #endif | ||
57 | mcr p15, 2, r10, c0, c0, 0 @ select current cache level in cssr | 60 | mcr p15, 2, r10, c0, c0, 0 @ select current cache level in cssr |
58 | isb @ isb to sych the new cssr&csidr | 61 | isb @ isb to sych the new cssr&csidr |
59 | mrc p15, 1, r1, c0, c0, 0 @ read the new csidr | 62 | mrc p15, 1, r1, c0, c0, 0 @ read the new csidr |
63 | #ifdef CONFIG_PREEMPT | ||
64 | restore_irqs_notrace r9 | ||
65 | #endif | ||
60 | and r2, r1, #7 @ extract the length of the cache lines | 66 | and r2, r1, #7 @ extract the length of the cache lines |
61 | add r2, r2, #4 @ add 4 (line length offset) | 67 | add r2, r2, #4 @ add 4 (line length offset) |
62 | ldr r4, =0x3ff | 68 | ldr r4, =0x3ff |
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c index ba159370fa5f..80632e8d7538 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c | |||
@@ -225,8 +225,7 @@ void __iomem * __arm_ioremap_pfn_caller(unsigned long pfn, | |||
225 | if ((area->flags & VM_ARM_MTYPE_MASK) != VM_ARM_MTYPE(mtype)) | 225 | if ((area->flags & VM_ARM_MTYPE_MASK) != VM_ARM_MTYPE(mtype)) |
226 | continue; | 226 | continue; |
227 | if (__phys_to_pfn(area->phys_addr) > pfn || | 227 | if (__phys_to_pfn(area->phys_addr) > pfn || |
228 | __pfn_to_phys(pfn) + offset + size-1 > | 228 | __pfn_to_phys(pfn) + size-1 > area->phys_addr + area->size-1) |
229 | area->phys_addr + area->size-1) | ||
230 | continue; | 229 | continue; |
231 | /* we can drop the lock here as we know *area is static */ | 230 | /* we can drop the lock here as we know *area is static */ |
232 | read_unlock(&vmlist_lock); | 231 | read_unlock(&vmlist_lock); |
diff --git a/arch/arm/plat-mxc/audmux-v1.c b/arch/arm/plat-mxc/audmux-v1.c index 1180bef7664b..14a3c0486750 100644 --- a/arch/arm/plat-mxc/audmux-v1.c +++ b/arch/arm/plat-mxc/audmux-v1.c | |||
@@ -46,16 +46,13 @@ EXPORT_SYMBOL_GPL(mxc_audmux_v1_configure_port); | |||
46 | 46 | ||
47 | static int mxc_audmux_v1_init(void) | 47 | static int mxc_audmux_v1_init(void) |
48 | { | 48 | { |
49 | #ifdef CONFIG_MACH_MX21 | ||
50 | if (cpu_is_mx21()) | 49 | if (cpu_is_mx21()) |
51 | audmux_base = MX21_IO_ADDRESS(MX21_AUDMUX_BASE_ADDR); | 50 | audmux_base = MX21_IO_ADDRESS(MX21_AUDMUX_BASE_ADDR); |
52 | else | 51 | else |
53 | #endif | 52 | |
54 | #ifdef CONFIG_MACH_MX27 | ||
55 | if (cpu_is_mx27()) | 53 | if (cpu_is_mx27()) |
56 | audmux_base = MX27_IO_ADDRESS(MX27_AUDMUX_BASE_ADDR); | 54 | audmux_base = MX27_IO_ADDRESS(MX27_AUDMUX_BASE_ADDR); |
57 | else | 55 | else |
58 | #endif | ||
59 | (void)0; | 56 | (void)0; |
60 | 57 | ||
61 | return 0; | 58 | return 0; |
diff --git a/arch/arm/plat-mxc/avic.c b/arch/arm/plat-mxc/avic.c index 55f15699a383..689f81f9593b 100644 --- a/arch/arm/plat-mxc/avic.c +++ b/arch/arm/plat-mxc/avic.c | |||
@@ -60,7 +60,7 @@ static int avic_irq_set_priority(unsigned char irq, unsigned char prio) | |||
60 | unsigned int mask = 0x0F << irq % 8 * 4; | 60 | unsigned int mask = 0x0F << irq % 8 * 4; |
61 | 61 | ||
62 | if (irq >= AVIC_NUM_IRQS) | 62 | if (irq >= AVIC_NUM_IRQS) |
63 | return -EINVAL;; | 63 | return -EINVAL; |
64 | 64 | ||
65 | temp = __raw_readl(avic_base + AVIC_NIPRIORITY(irq / 8)); | 65 | temp = __raw_readl(avic_base + AVIC_NIPRIORITY(irq / 8)); |
66 | temp &= ~mask; | 66 | temp &= ~mask; |
diff --git a/arch/arm/plat-mxc/include/mach/entry-macro.S b/arch/arm/plat-mxc/include/mach/entry-macro.S deleted file mode 100644 index def5d30cb67e..000000000000 --- a/arch/arm/plat-mxc/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2007 Lennert Buytenhek <buytenh@wantstofly.org> | ||
3 | * Copyright 2004-2009 Freescale Semiconductor, Inc. All Rights Reserved. | ||
4 | */ | ||
5 | |||
6 | /* | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | .macro disable_fiq | ||
13 | .endm | ||
14 | |||
15 | .macro arch_ret_to_user, tmp1, tmp2 | ||
16 | .endm | ||
diff --git a/arch/arm/plat-omap/counter_32k.c b/arch/arm/plat-omap/counter_32k.c index 5f0f2292b7fb..5068fe5a6910 100644 --- a/arch/arm/plat-omap/counter_32k.c +++ b/arch/arm/plat-omap/counter_32k.c | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include <asm/sched_clock.h> | 22 | #include <asm/sched_clock.h> |
23 | 23 | ||
24 | #include <plat/hardware.h> | ||
24 | #include <plat/common.h> | 25 | #include <plat/common.h> |
25 | #include <plat/board.h> | 26 | #include <plat/board.h> |
26 | 27 | ||
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index 002fb4d96bbc..95c3ed693f65 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c | |||
@@ -164,6 +164,8 @@ static inline void set_gdma_dev(int req, int dev) | |||
164 | } | 164 | } |
165 | #else | 165 | #else |
166 | #define set_gdma_dev(req, dev) do {} while (0) | 166 | #define set_gdma_dev(req, dev) do {} while (0) |
167 | #define omap_readl(reg) 0 | ||
168 | #define omap_writel(val, reg) do {} while (0) | ||
167 | #endif | 169 | #endif |
168 | 170 | ||
169 | void omap_set_dma_priority(int lch, int dst_port, int priority) | 171 | void omap_set_dma_priority(int lch, int dst_port, int priority) |
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c index af3b92be8459..2678260d9feb 100644 --- a/arch/arm/plat-omap/dmtimer.c +++ b/arch/arm/plat-omap/dmtimer.c | |||
@@ -43,6 +43,8 @@ | |||
43 | 43 | ||
44 | #include <plat/dmtimer.h> | 44 | #include <plat/dmtimer.h> |
45 | 45 | ||
46 | #include <mach/hardware.h> | ||
47 | |||
46 | static LIST_HEAD(omap_timer_list); | 48 | static LIST_HEAD(omap_timer_list); |
47 | static DEFINE_SPINLOCK(dm_timer_lock); | 49 | static DEFINE_SPINLOCK(dm_timer_lock); |
48 | 50 | ||
diff --git a/arch/arm/plat-omap/include/plat/gpio.h b/arch/arm/plat-omap/include/plat/gpio.h index 9e86ee0aed0a..cb75b657b04b 100644 --- a/arch/arm/plat-omap/include/plat/gpio.h +++ b/arch/arm/plat-omap/include/plat/gpio.h | |||
@@ -162,13 +162,6 @@ | |||
162 | IH_MPUIO_BASE + ((nr) & 0x0f) : \ | 162 | IH_MPUIO_BASE + ((nr) & 0x0f) : \ |
163 | IH_GPIO_BASE + (nr)) | 163 | IH_GPIO_BASE + (nr)) |
164 | 164 | ||
165 | #define METHOD_MPUIO 0 | ||
166 | #define METHOD_GPIO_1510 1 | ||
167 | #define METHOD_GPIO_1610 2 | ||
168 | #define METHOD_GPIO_7XX 3 | ||
169 | #define METHOD_GPIO_24XX 5 | ||
170 | #define METHOD_GPIO_44XX 6 | ||
171 | |||
172 | struct omap_gpio_dev_attr { | 165 | struct omap_gpio_dev_attr { |
173 | int bank_width; /* GPIO bank width */ | 166 | int bank_width; /* GPIO bank width */ |
174 | bool dbck_flag; /* dbck required or not - True for OMAP3&4 */ | 167 | bool dbck_flag; /* dbck required or not - True for OMAP3&4 */ |
@@ -184,10 +177,21 @@ struct omap_gpio_reg_offs { | |||
184 | u16 irqstatus; | 177 | u16 irqstatus; |
185 | u16 irqstatus2; | 178 | u16 irqstatus2; |
186 | u16 irqenable; | 179 | u16 irqenable; |
180 | u16 irqenable2; | ||
187 | u16 set_irqenable; | 181 | u16 set_irqenable; |
188 | u16 clr_irqenable; | 182 | u16 clr_irqenable; |
189 | u16 debounce; | 183 | u16 debounce; |
190 | u16 debounce_en; | 184 | u16 debounce_en; |
185 | u16 ctrl; | ||
186 | u16 wkup_en; | ||
187 | u16 leveldetect0; | ||
188 | u16 leveldetect1; | ||
189 | u16 risingdetect; | ||
190 | u16 fallingdetect; | ||
191 | u16 irqctrl; | ||
192 | u16 edgectrl1; | ||
193 | u16 edgectrl2; | ||
194 | u16 pinctrl; | ||
191 | 195 | ||
192 | bool irqenable_inv; | 196 | bool irqenable_inv; |
193 | }; | 197 | }; |
@@ -198,19 +202,20 @@ struct omap_gpio_platform_data { | |||
198 | int bank_width; /* GPIO bank width */ | 202 | int bank_width; /* GPIO bank width */ |
199 | int bank_stride; /* Only needed for omap1 MPUIO */ | 203 | int bank_stride; /* Only needed for omap1 MPUIO */ |
200 | bool dbck_flag; /* dbck required or not - True for OMAP3&4 */ | 204 | bool dbck_flag; /* dbck required or not - True for OMAP3&4 */ |
205 | bool loses_context; /* whether the bank would ever lose context */ | ||
206 | bool is_mpuio; /* whether the bank is of type MPUIO */ | ||
207 | u32 non_wakeup_gpios; | ||
201 | 208 | ||
202 | struct omap_gpio_reg_offs *regs; | 209 | struct omap_gpio_reg_offs *regs; |
203 | }; | ||
204 | 210 | ||
205 | /* TODO: Analyze removing gpio_bank_count usage from driver code */ | 211 | /* Return context loss count due to PM states changing */ |
206 | extern int gpio_bank_count; | 212 | int (*get_context_loss_count)(struct device *dev); |
213 | }; | ||
207 | 214 | ||
208 | extern void omap2_gpio_prepare_for_idle(int off_mode); | 215 | extern void omap2_gpio_prepare_for_idle(int off_mode); |
209 | extern void omap2_gpio_resume_after_idle(void); | 216 | extern void omap2_gpio_resume_after_idle(void); |
210 | extern void omap_set_gpio_debounce(int gpio, int enable); | 217 | extern void omap_set_gpio_debounce(int gpio, int enable); |
211 | extern void omap_set_gpio_debounce_time(int gpio, int enable); | 218 | extern void omap_set_gpio_debounce_time(int gpio, int enable); |
212 | extern void omap_gpio_save_context(void); | ||
213 | extern void omap_gpio_restore_context(void); | ||
214 | /*-------------------------------------------------------------------------*/ | 219 | /*-------------------------------------------------------------------------*/ |
215 | 220 | ||
216 | /* Wrappers for "new style" GPIO calls, using the new infrastructure | 221 | /* Wrappers for "new style" GPIO calls, using the new infrastructure |
diff --git a/arch/arm/plat-omap/include/plat/hardware.h b/arch/arm/plat-omap/include/plat/hardware.h index e897978371c2..537b05ae1f51 100644 --- a/arch/arm/plat-omap/include/plat/hardware.h +++ b/arch/arm/plat-omap/include/plat/hardware.h | |||
@@ -43,6 +43,12 @@ | |||
43 | #endif | 43 | #endif |
44 | #include <plat/serial.h> | 44 | #include <plat/serial.h> |
45 | 45 | ||
46 | #ifdef __ASSEMBLER__ | ||
47 | #define IOMEM(x) (x) | ||
48 | #else | ||
49 | #define IOMEM(x) ((void __force __iomem *)(x)) | ||
50 | #endif | ||
51 | |||
46 | /* | 52 | /* |
47 | * --------------------------------------------------------------------------- | 53 | * --------------------------------------------------------------------------- |
48 | * Common definitions for all OMAP processors | 54 | * Common definitions for all OMAP processors |
diff --git a/arch/arm/plat-omap/include/plat/keypad.h b/arch/arm/plat-omap/include/plat/keypad.h index 793ce9d53294..a6b21eddb212 100644 --- a/arch/arm/plat-omap/include/plat/keypad.h +++ b/arch/arm/plat-omap/include/plat/keypad.h | |||
@@ -12,6 +12,8 @@ | |||
12 | 12 | ||
13 | #ifndef CONFIG_ARCH_OMAP1 | 13 | #ifndef CONFIG_ARCH_OMAP1 |
14 | #warning Please update the board to use matrix-keypad driver | 14 | #warning Please update the board to use matrix-keypad driver |
15 | #define omap_readw(reg) 0 | ||
16 | #define omap_writew(val, reg) do {} while (0) | ||
15 | #endif | 17 | #endif |
16 | #include <linux/input/matrix_keypad.h> | 18 | #include <linux/input/matrix_keypad.h> |
17 | 19 | ||
diff --git a/arch/arm/plat-omap/include/plat/mcspi.h b/arch/arm/plat-omap/include/plat/mcspi.h index 3d51b18131cc..a357eb26bd25 100644 --- a/arch/arm/plat-omap/include/plat/mcspi.h +++ b/arch/arm/plat-omap/include/plat/mcspi.h | |||
@@ -18,9 +18,6 @@ struct omap2_mcspi_dev_attr { | |||
18 | 18 | ||
19 | struct omap2_mcspi_device_config { | 19 | struct omap2_mcspi_device_config { |
20 | unsigned turbo_mode:1; | 20 | unsigned turbo_mode:1; |
21 | |||
22 | /* Do we want one channel enabled at the same time? */ | ||
23 | unsigned single_channel:1; | ||
24 | }; | 21 | }; |
25 | 22 | ||
26 | #endif | 23 | #endif |
diff --git a/arch/arm/plat-omap/include/plat/omap-secure.h b/arch/arm/plat-omap/include/plat/omap-secure.h index 64f9d1c7f1bb..3047ff923a63 100644 --- a/arch/arm/plat-omap/include/plat/omap-secure.h +++ b/arch/arm/plat-omap/include/plat/omap-secure.h | |||
@@ -3,7 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | 5 | ||
6 | #ifdef CONFIG_ARCH_OMAP2PLUS | 6 | #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4) |
7 | extern int omap_secure_ram_reserve_memblock(void); | 7 | extern int omap_secure_ram_reserve_memblock(void); |
8 | #else | 8 | #else |
9 | static inline void omap_secure_ram_reserve_memblock(void) | 9 | static inline void omap_secure_ram_reserve_memblock(void) |
diff --git a/arch/arm/plat-omap/include/plat/tc.h b/arch/arm/plat-omap/include/plat/tc.h index d2fcd789bb9a..1b4b2da86203 100644 --- a/arch/arm/plat-omap/include/plat/tc.h +++ b/arch/arm/plat-omap/include/plat/tc.h | |||
@@ -84,23 +84,6 @@ | |||
84 | #define EMIFS_CCS(n) (EMIFS_CS0_CONFIG + (4 * (n))) | 84 | #define EMIFS_CCS(n) (EMIFS_CS0_CONFIG + (4 * (n))) |
85 | #define EMIFS_ACS(n) (EMIFS_ACS0 + (4 * (n))) | 85 | #define EMIFS_ACS(n) (EMIFS_ACS0 + (4 * (n))) |
86 | 86 | ||
87 | /* Almost all documentation for chip and board memory maps assumes | ||
88 | * BM is clear. Most devel boards have a switch to control booting | ||
89 | * from NOR flash (using external chipselect 3) rather than mask ROM, | ||
90 | * which uses BM to interchange the physical CS0 and CS3 addresses. | ||
91 | */ | ||
92 | static inline u32 omap_cs0_phys(void) | ||
93 | { | ||
94 | return (omap_readl(EMIFS_CONFIG) & OMAP_EMIFS_CONFIG_BM) | ||
95 | ? OMAP_CS3_PHYS : 0; | ||
96 | } | ||
97 | |||
98 | static inline u32 omap_cs3_phys(void) | ||
99 | { | ||
100 | return (omap_readl(EMIFS_CONFIG) & OMAP_EMIFS_CONFIG_BM) | ||
101 | ? 0 : OMAP_CS3_PHYS; | ||
102 | } | ||
103 | |||
104 | #endif /* __ASSEMBLER__ */ | 87 | #endif /* __ASSEMBLER__ */ |
105 | 88 | ||
106 | #endif /* __ASM_ARCH_TC_H */ | 89 | #endif /* __ASM_ARCH_TC_H */ |
diff --git a/arch/arm/plat-omap/include/plat/usb.h b/arch/arm/plat-omap/include/plat/usb.h index dc864b580da0..d0fc9f4dc155 100644 --- a/arch/arm/plat-omap/include/plat/usb.h +++ b/arch/arm/plat-omap/include/plat/usb.h | |||
@@ -3,6 +3,7 @@ | |||
3 | #ifndef __ASM_ARCH_OMAP_USB_H | 3 | #ifndef __ASM_ARCH_OMAP_USB_H |
4 | #define __ASM_ARCH_OMAP_USB_H | 4 | #define __ASM_ARCH_OMAP_USB_H |
5 | 5 | ||
6 | #include <linux/io.h> | ||
6 | #include <linux/usb/musb.h> | 7 | #include <linux/usb/musb.h> |
7 | #include <plat/board.h> | 8 | #include <plat/board.h> |
8 | 9 | ||
@@ -105,6 +106,46 @@ extern int omap4430_phy_set_clk(struct device *dev, int on); | |||
105 | extern int omap4430_phy_init(struct device *dev); | 106 | extern int omap4430_phy_init(struct device *dev); |
106 | extern int omap4430_phy_exit(struct device *dev); | 107 | extern int omap4430_phy_exit(struct device *dev); |
107 | extern int omap4430_phy_suspend(struct device *dev, int suspend); | 108 | extern int omap4430_phy_suspend(struct device *dev, int suspend); |
109 | |||
110 | /* | ||
111 | * NOTE: Please update omap USB drivers to use ioremap + read/write | ||
112 | */ | ||
113 | |||
114 | #define OMAP2_L4_IO_OFFSET 0xb2000000 | ||
115 | #define IOMEM(x) ((void __force __iomem *)(x)) | ||
116 | #define OMAP2_L4_IO_ADDRESS(pa) IOMEM((pa) + OMAP2_L4_IO_OFFSET) | ||
117 | |||
118 | static inline u8 omap_readb(u32 pa) | ||
119 | { | ||
120 | return __raw_readb(OMAP2_L4_IO_ADDRESS(pa)); | ||
121 | } | ||
122 | |||
123 | static inline u16 omap_readw(u32 pa) | ||
124 | { | ||
125 | return __raw_readw(OMAP2_L4_IO_ADDRESS(pa)); | ||
126 | } | ||
127 | |||
128 | static inline u32 omap_readl(u32 pa) | ||
129 | { | ||
130 | return __raw_readl(OMAP2_L4_IO_ADDRESS(pa)); | ||
131 | } | ||
132 | |||
133 | static inline void omap_writeb(u8 v, u32 pa) | ||
134 | { | ||
135 | __raw_writeb(v, OMAP2_L4_IO_ADDRESS(pa)); | ||
136 | } | ||
137 | |||
138 | |||
139 | static inline void omap_writew(u16 v, u32 pa) | ||
140 | { | ||
141 | __raw_writew(v, OMAP2_L4_IO_ADDRESS(pa)); | ||
142 | } | ||
143 | |||
144 | static inline void omap_writel(u32 v, u32 pa) | ||
145 | { | ||
146 | __raw_writel(v, OMAP2_L4_IO_ADDRESS(pa)); | ||
147 | } | ||
148 | |||
108 | #endif | 149 | #endif |
109 | 150 | ||
110 | extern void am35x_musb_reset(void); | 151 | extern void am35x_musb_reset(void); |
diff --git a/arch/arm/plat-omap/mux.c b/arch/arm/plat-omap/mux.c index 0d4aa0d5876c..cff8712122bb 100644 --- a/arch/arm/plat-omap/mux.c +++ b/arch/arm/plat-omap/mux.c | |||
@@ -26,8 +26,11 @@ | |||
26 | #include <linux/init.h> | 26 | #include <linux/init.h> |
27 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
28 | #include <linux/io.h> | 28 | #include <linux/io.h> |
29 | #include <asm/system.h> | ||
30 | #include <linux/spinlock.h> | 29 | #include <linux/spinlock.h> |
30 | |||
31 | #include <asm/system.h> | ||
32 | |||
33 | #include <plat/cpu.h> | ||
31 | #include <plat/mux.h> | 34 | #include <plat/mux.h> |
32 | 35 | ||
33 | #ifdef CONFIG_OMAP_MUX | 36 | #ifdef CONFIG_OMAP_MUX |
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c index 4243bdcc87bc..3022fc267d23 100644 --- a/arch/arm/plat-omap/sram.c +++ b/arch/arm/plat-omap/sram.c | |||
@@ -31,11 +31,10 @@ | |||
31 | 31 | ||
32 | #include "sram.h" | 32 | #include "sram.h" |
33 | 33 | ||
34 | /* XXX These "sideways" includes are a sign that something is wrong */ | 34 | /* XXX These "sideways" includes will disappear when sram.c becomes a driver */ |
35 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) | 35 | #include "../mach-omap2/iomap.h" |
36 | # include "../mach-omap2/prm2xxx_3xxx.h" | 36 | #include "../mach-omap2/prm2xxx_3xxx.h" |
37 | # include "../mach-omap2/sdrc.h" | 37 | #include "../mach-omap2/sdrc.h" |
38 | #endif | ||
39 | 38 | ||
40 | #define OMAP1_SRAM_PA 0x20000000 | 39 | #define OMAP1_SRAM_PA 0x20000000 |
41 | #define OMAP2_SRAM_PUB_PA (OMAP2_SRAM_PA + 0xf800) | 40 | #define OMAP2_SRAM_PUB_PA (OMAP2_SRAM_PA + 0xf800) |
diff --git a/arch/arm/plat-omap/usb.c b/arch/arm/plat-omap/usb.c index f3570884883e..d2bbfd1cb0b5 100644 --- a/arch/arm/plat-omap/usb.c +++ b/arch/arm/plat-omap/usb.c | |||
@@ -29,6 +29,10 @@ | |||
29 | #include <plat/usb.h> | 29 | #include <plat/usb.h> |
30 | #include <plat/board.h> | 30 | #include <plat/board.h> |
31 | 31 | ||
32 | #include <mach/hardware.h> | ||
33 | |||
34 | #include "../mach-omap2/common.h" | ||
35 | |||
32 | #ifdef CONFIG_ARCH_OMAP_OTG | 36 | #ifdef CONFIG_ARCH_OMAP_OTG |
33 | 37 | ||
34 | void __init | 38 | void __init |
diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c index e5a2fde29b19..089899a7db72 100644 --- a/arch/arm/plat-orion/common.c +++ b/arch/arm/plat-orion/common.c | |||
@@ -789,10 +789,7 @@ void __init orion_xor1_init(unsigned long mapbase_low, | |||
789 | /***************************************************************************** | 789 | /***************************************************************************** |
790 | * EHCI | 790 | * EHCI |
791 | ****************************************************************************/ | 791 | ****************************************************************************/ |
792 | static struct orion_ehci_data orion_ehci_data = { | 792 | static struct orion_ehci_data orion_ehci_data; |
793 | .phy_version = EHCI_PHY_NA, | ||
794 | }; | ||
795 | |||
796 | static u64 ehci_dmamask = DMA_BIT_MASK(32); | 793 | static u64 ehci_dmamask = DMA_BIT_MASK(32); |
797 | 794 | ||
798 | 795 | ||
@@ -812,8 +809,10 @@ static struct platform_device orion_ehci = { | |||
812 | }; | 809 | }; |
813 | 810 | ||
814 | void __init orion_ehci_init(unsigned long mapbase, | 811 | void __init orion_ehci_init(unsigned long mapbase, |
815 | unsigned long irq) | 812 | unsigned long irq, |
813 | enum orion_ehci_phy_ver phy_version) | ||
816 | { | 814 | { |
815 | orion_ehci_data.phy_version = phy_version; | ||
817 | fill_resources(&orion_ehci, orion_ehci_resources, mapbase, SZ_4K - 1, | 816 | fill_resources(&orion_ehci, orion_ehci_resources, mapbase, SZ_4K - 1, |
818 | irq); | 817 | irq); |
819 | 818 | ||
diff --git a/arch/arm/plat-orion/include/plat/common.h b/arch/arm/plat-orion/include/plat/common.h index 0fe08d77e835..a7fa005a5a0e 100644 --- a/arch/arm/plat-orion/include/plat/common.h +++ b/arch/arm/plat-orion/include/plat/common.h | |||
@@ -89,7 +89,8 @@ void __init orion_xor1_init(unsigned long mapbase_low, | |||
89 | unsigned long irq_1); | 89 | unsigned long irq_1); |
90 | 90 | ||
91 | void __init orion_ehci_init(unsigned long mapbase, | 91 | void __init orion_ehci_init(unsigned long mapbase, |
92 | unsigned long irq); | 92 | unsigned long irq, |
93 | enum orion_ehci_phy_ver phy_version); | ||
93 | 94 | ||
94 | void __init orion_ehci_1_init(unsigned long mapbase, | 95 | void __init orion_ehci_1_init(unsigned long mapbase, |
95 | unsigned long irq); | 96 | unsigned long irq); |
diff --git a/arch/arm/plat-orion/mpp.c b/arch/arm/plat-orion/mpp.c index 91553432711d..3b1e17bd3d17 100644 --- a/arch/arm/plat-orion/mpp.c +++ b/arch/arm/plat-orion/mpp.c | |||
@@ -64,8 +64,7 @@ void __init orion_mpp_conf(unsigned int *mpp_list, unsigned int variant_mask, | |||
64 | gpio_mode |= GPIO_INPUT_OK; | 64 | gpio_mode |= GPIO_INPUT_OK; |
65 | if (*mpp_list & MPP_OUTPUT_MASK) | 65 | if (*mpp_list & MPP_OUTPUT_MASK) |
66 | gpio_mode |= GPIO_OUTPUT_OK; | 66 | gpio_mode |= GPIO_OUTPUT_OK; |
67 | if (sel != 0) | 67 | |
68 | gpio_mode = 0; | ||
69 | orion_gpio_set_valid(num, gpio_mode); | 68 | orion_gpio_set_valid(num, gpio_mode); |
70 | } | 69 | } |
71 | 70 | ||
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c index eddb0ebac585..98b864777a31 100644 --- a/arch/arm/plat-samsung/devs.c +++ b/arch/arm/plat-samsung/devs.c | |||
@@ -468,8 +468,10 @@ void __init s3c_i2c0_set_platdata(struct s3c2410_platform_i2c *pd) | |||
468 | { | 468 | { |
469 | struct s3c2410_platform_i2c *npd; | 469 | struct s3c2410_platform_i2c *npd; |
470 | 470 | ||
471 | if (!pd) | 471 | if (!pd) { |
472 | pd = &default_i2c_data; | 472 | pd = &default_i2c_data; |
473 | pd->bus_num = 0; | ||
474 | } | ||
473 | 475 | ||
474 | npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c), | 476 | npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c), |
475 | &s3c_device_i2c0); | 477 | &s3c_device_i2c0); |