diff options
author | Tejun Heo <tj@kernel.org> | 2011-11-28 12:46:22 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2011-11-28 12:46:22 -0500 |
commit | d4bbf7e7759afc172e2bfbc5c416324590049cdd (patch) | |
tree | 7eab5ee5481cd3dcf1162329fec827177640018a /arch/blackfin | |
parent | a150439c4a97db379f0ed6faa46fbbb6e7bf3cb2 (diff) | |
parent | 401d0069cb344f401bc9d264c31db55876ff78c0 (diff) |
Merge branch 'master' into x86/memblock
Conflicts & resolutions:
* arch/x86/xen/setup.c
dc91c728fd "xen: allow extra memory to be in multiple regions"
24aa07882b "memblock, x86: Replace memblock_x86_reserve/free..."
conflicted on xen_add_extra_mem() updates. The resolution is
trivial as the latter just want to replace
memblock_x86_reserve_range() with memblock_reserve().
* drivers/pci/intel-iommu.c
166e9278a3f "x86/ia64: intel-iommu: move to drivers/iommu/"
5dfe8660a3d "bootmem: Replace work_with_active_regions() with..."
conflicted as the former moved the file under drivers/iommu/.
Resolved by applying the chnages from the latter on the moved
file.
* mm/Kconfig
6661672053a "memblock: add NO_BOOTMEM config symbol"
c378ddd53f9 "memblock, x86: Make ARCH_DISCARD_MEMBLOCK a config option"
conflicted trivially. Both added config options. Just
letting both add their own options resolves the conflict.
* mm/memblock.c
d1f0ece6cdc "mm/memblock.c: small function definition fixes"
ed7b56a799c "memblock: Remove memblock_memory_can_coalesce()"
confliected. The former updates function removed by the
latter. Resolution is trivial.
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'arch/blackfin')
134 files changed, 2137 insertions, 2382 deletions
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index d619b17c4413..abe5a9e85148 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig | |||
@@ -248,10 +248,6 @@ config HOTPLUG_CPU | |||
248 | depends on SMP && HOTPLUG | 248 | depends on SMP && HOTPLUG |
249 | default y | 249 | default y |
250 | 250 | ||
251 | config HAVE_LEGACY_PER_CPU_AREA | ||
252 | def_bool y | ||
253 | depends on SMP | ||
254 | |||
255 | config BF_REV_MIN | 251 | config BF_REV_MIN |
256 | int | 252 | int |
257 | default 0 if (BF51x || BF52x || (BF54x && !BF54xM)) | 253 | default 0 if (BF51x || BF52x || (BF54x && !BF54xM)) |
@@ -953,6 +949,16 @@ config BFIN_GPTIMERS | |||
953 | To compile this driver as a module, choose M here: the module | 949 | To compile this driver as a module, choose M here: the module |
954 | will be called gptimers. | 950 | will be called gptimers. |
955 | 951 | ||
952 | config HAVE_PWM | ||
953 | tristate "Enable PWM API support" | ||
954 | depends on BFIN_GPTIMERS | ||
955 | help | ||
956 | Enable support for the Pulse Width Modulation framework (as | ||
957 | found in linux/pwm.h). | ||
958 | |||
959 | To compile this driver as a module, choose M here: the module | ||
960 | will be called pwm. | ||
961 | |||
956 | choice | 962 | choice |
957 | prompt "Uncached DMA region" | 963 | prompt "Uncached DMA region" |
958 | default DMA_UNCACHED_1M | 964 | default DMA_UNCACHED_1M |
diff --git a/arch/blackfin/configs/BF548-EZKIT_defconfig b/arch/blackfin/configs/BF548-EZKIT_defconfig index 56151b5dbc44..0e6d841b5d01 100644 --- a/arch/blackfin/configs/BF548-EZKIT_defconfig +++ b/arch/blackfin/configs/BF548-EZKIT_defconfig | |||
@@ -4,7 +4,6 @@ CONFIG_IKCONFIG=y | |||
4 | CONFIG_IKCONFIG_PROC=y | 4 | CONFIG_IKCONFIG_PROC=y |
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
7 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
8 | CONFIG_EXPERT=y | 7 | CONFIG_EXPERT=y |
9 | # CONFIG_SYSCTL_SYSCALL is not set | 8 | # CONFIG_SYSCTL_SYSCALL is not set |
10 | # CONFIG_ELF_CORE is not set | 9 | # CONFIG_ELF_CORE is not set |
@@ -40,7 +39,6 @@ CONFIG_EBIU_MODEVAL=0x1 | |||
40 | CONFIG_EBIU_FCTLVAL=0x6 | 39 | CONFIG_EBIU_FCTLVAL=0x6 |
41 | CONFIG_BINFMT_FLAT=y | 40 | CONFIG_BINFMT_FLAT=y |
42 | CONFIG_BINFMT_ZFLAT=y | 41 | CONFIG_BINFMT_ZFLAT=y |
43 | CONFIG_PM=y | ||
44 | CONFIG_NET=y | 42 | CONFIG_NET=y |
45 | CONFIG_PACKET=y | 43 | CONFIG_PACKET=y |
46 | CONFIG_UNIX=y | 44 | CONFIG_UNIX=y |
@@ -55,7 +53,6 @@ CONFIG_IP_PNP=y | |||
55 | CONFIG_CAN=m | 53 | CONFIG_CAN=m |
56 | CONFIG_CAN_RAW=m | 54 | CONFIG_CAN_RAW=m |
57 | CONFIG_CAN_BCM=m | 55 | CONFIG_CAN_BCM=m |
58 | CONFIG_CAN_DEV=m | ||
59 | CONFIG_CAN_BFIN=m | 56 | CONFIG_CAN_BFIN=m |
60 | CONFIG_IRDA=m | 57 | CONFIG_IRDA=m |
61 | CONFIG_IRLAN=m | 58 | CONFIG_IRLAN=m |
@@ -67,7 +64,6 @@ CONFIG_BFIN_SIR3=y | |||
67 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | 64 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" |
68 | CONFIG_FW_LOADER=m | 65 | CONFIG_FW_LOADER=m |
69 | CONFIG_MTD=y | 66 | CONFIG_MTD=y |
70 | CONFIG_MTD_PARTITIONS=y | ||
71 | CONFIG_MTD_CMDLINE_PARTS=y | 67 | CONFIG_MTD_CMDLINE_PARTS=y |
72 | CONFIG_MTD_CHAR=y | 68 | CONFIG_MTD_CHAR=y |
73 | CONFIG_MTD_BLOCK=y | 69 | CONFIG_MTD_BLOCK=y |
@@ -105,12 +101,12 @@ CONFIG_INPUT_TOUCHSCREEN=y | |||
105 | CONFIG_TOUCHSCREEN_AD7877=m | 101 | CONFIG_TOUCHSCREEN_AD7877=m |
106 | CONFIG_INPUT_MISC=y | 102 | CONFIG_INPUT_MISC=y |
107 | # CONFIG_SERIO is not set | 103 | # CONFIG_SERIO is not set |
108 | # CONFIG_DEVKMEM is not set | 104 | # CONFIG_LEGACY_PTYS is not set |
109 | CONFIG_BFIN_JTAG_COMM=m | 105 | CONFIG_BFIN_JTAG_COMM=m |
106 | # CONFIG_DEVKMEM is not set | ||
110 | CONFIG_SERIAL_BFIN=y | 107 | CONFIG_SERIAL_BFIN=y |
111 | CONFIG_SERIAL_BFIN_CONSOLE=y | 108 | CONFIG_SERIAL_BFIN_CONSOLE=y |
112 | CONFIG_SERIAL_BFIN_UART1=y | 109 | CONFIG_SERIAL_BFIN_UART1=y |
113 | # CONFIG_LEGACY_PTYS is not set | ||
114 | # CONFIG_HW_RANDOM is not set | 110 | # CONFIG_HW_RANDOM is not set |
115 | CONFIG_I2C=y | 111 | CONFIG_I2C=y |
116 | CONFIG_I2C_CHARDEV=y | 112 | CONFIG_I2C_CHARDEV=y |
@@ -163,6 +159,7 @@ CONFIG_USB_DEVICEFS=y | |||
163 | CONFIG_USB_OTG_BLACKLIST_HUB=y | 159 | CONFIG_USB_OTG_BLACKLIST_HUB=y |
164 | CONFIG_USB_MON=y | 160 | CONFIG_USB_MON=y |
165 | CONFIG_USB_MUSB_HDRC=y | 161 | CONFIG_USB_MUSB_HDRC=y |
162 | CONFIG_USB_MUSB_BLACKFIN=y | ||
166 | CONFIG_USB_STORAGE=y | 163 | CONFIG_USB_STORAGE=y |
167 | CONFIG_MMC=y | 164 | CONFIG_MMC=y |
168 | CONFIG_MMC_BLOCK=m | 165 | CONFIG_MMC_BLOCK=m |
@@ -185,8 +182,6 @@ CONFIG_NFS_FS=m | |||
185 | CONFIG_NFS_V3=y | 182 | CONFIG_NFS_V3=y |
186 | CONFIG_NFSD=m | 183 | CONFIG_NFSD=m |
187 | CONFIG_NFSD_V3=y | 184 | CONFIG_NFSD_V3=y |
188 | CONFIG_SMB_FS=m | ||
189 | CONFIG_SMB_NLS_DEFAULT=y | ||
190 | CONFIG_CIFS=y | 185 | CONFIG_CIFS=y |
191 | CONFIG_NLS_CODEPAGE_437=m | 186 | CONFIG_NLS_CODEPAGE_437=m |
192 | CONFIG_NLS_CODEPAGE_936=m | 187 | CONFIG_NLS_CODEPAGE_936=m |
@@ -196,7 +191,6 @@ CONFIG_DEBUG_KERNEL=y | |||
196 | CONFIG_DEBUG_SHIRQ=y | 191 | CONFIG_DEBUG_SHIRQ=y |
197 | CONFIG_DETECT_HUNG_TASK=y | 192 | CONFIG_DETECT_HUNG_TASK=y |
198 | CONFIG_DEBUG_INFO=y | 193 | CONFIG_DEBUG_INFO=y |
199 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
200 | # CONFIG_FTRACE is not set | 194 | # CONFIG_FTRACE is not set |
201 | CONFIG_DEBUG_MMRS=y | 195 | CONFIG_DEBUG_MMRS=y |
202 | CONFIG_DEBUG_HWERR=y | 196 | CONFIG_DEBUG_HWERR=y |
@@ -206,5 +200,4 @@ CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE=y | |||
206 | CONFIG_EARLY_PRINTK=y | 200 | CONFIG_EARLY_PRINTK=y |
207 | CONFIG_CPLB_INFO=y | 201 | CONFIG_CPLB_INFO=y |
208 | CONFIG_BFIN_PSEUDODBG_INSNS=y | 202 | CONFIG_BFIN_PSEUDODBG_INSNS=y |
209 | CONFIG_CRYPTO=y | ||
210 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | 203 | # CONFIG_CRYPTO_ANSI_CPRNG is not set |
diff --git a/arch/blackfin/configs/BF561-EZKIT_defconfig b/arch/blackfin/configs/BF561-EZKIT_defconfig index 1c0a82a10591..d7ff2aee3fbc 100644 --- a/arch/blackfin/configs/BF561-EZKIT_defconfig +++ b/arch/blackfin/configs/BF561-EZKIT_defconfig | |||
@@ -58,13 +58,13 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | |||
58 | CONFIG_MTD=y | 58 | CONFIG_MTD=y |
59 | CONFIG_MTD_PARTITIONS=y | 59 | CONFIG_MTD_PARTITIONS=y |
60 | CONFIG_MTD_CMDLINE_PARTS=y | 60 | CONFIG_MTD_CMDLINE_PARTS=y |
61 | CONFIG_MTD_CHAR=m | 61 | CONFIG_MTD_CHAR=y |
62 | CONFIG_MTD_BLOCK=y | 62 | CONFIG_MTD_BLOCK=y |
63 | CONFIG_MTD_CFI=m | 63 | CONFIG_MTD_CFI=y |
64 | CONFIG_MTD_CFI_AMDSTD=m | 64 | CONFIG_MTD_CFI_AMDSTD=y |
65 | CONFIG_MTD_RAM=y | 65 | CONFIG_MTD_RAM=y |
66 | CONFIG_MTD_ROM=m | 66 | CONFIG_MTD_ROM=m |
67 | CONFIG_MTD_PHYSMAP=m | 67 | CONFIG_MTD_PHYSMAP=y |
68 | CONFIG_BLK_DEV_RAM=y | 68 | CONFIG_BLK_DEV_RAM=y |
69 | CONFIG_NETDEVICES=y | 69 | CONFIG_NETDEVICES=y |
70 | CONFIG_NET_ETHERNET=y | 70 | CONFIG_NET_ETHERNET=y |
diff --git a/arch/blackfin/include/asm/Kbuild b/arch/blackfin/include/asm/Kbuild index 9e7c5379d3ff..5a0625aad6a0 100644 --- a/arch/blackfin/include/asm/Kbuild +++ b/arch/blackfin/include/asm/Kbuild | |||
@@ -1,5 +1,49 @@ | |||
1 | include include/asm-generic/Kbuild.asm | 1 | include include/asm-generic/Kbuild.asm |
2 | 2 | ||
3 | generic-y += auxvec.h | ||
4 | generic-y += bitsperlong.h | ||
5 | generic-y += bugs.h | ||
6 | generic-y += cputime.h | ||
7 | generic-y += current.h | ||
8 | generic-y += device.h | ||
9 | generic-y += div64.h | ||
10 | generic-y += emergency-restart.h | ||
11 | generic-y += errno.h | ||
12 | generic-y += fb.h | ||
13 | generic-y += futex.h | ||
14 | generic-y += hw_irq.h | ||
15 | generic-y += ioctl.h | ||
16 | generic-y += ipcbuf.h | ||
17 | generic-y += irq_regs.h | ||
18 | generic-y += kdebug.h | ||
19 | generic-y += kmap_types.h | ||
20 | generic-y += local64.h | ||
21 | generic-y += local.h | ||
22 | generic-y += mman.h | ||
23 | generic-y += msgbuf.h | ||
24 | generic-y += mutex.h | ||
25 | generic-y += param.h | ||
26 | generic-y += percpu.h | ||
27 | generic-y += pgalloc.h | ||
28 | generic-y += resource.h | ||
29 | generic-y += scatterlist.h | ||
30 | generic-y += sembuf.h | ||
31 | generic-y += serial.h | ||
32 | generic-y += setup.h | ||
33 | generic-y += shmbuf.h | ||
34 | generic-y += shmparam.h | ||
35 | generic-y += socket.h | ||
36 | generic-y += sockios.h | ||
37 | generic-y += statfs.h | ||
38 | generic-y += termbits.h | ||
39 | generic-y += termios.h | ||
40 | generic-y += topology.h | ||
41 | generic-y += types.h | ||
42 | generic-y += ucontext.h | ||
43 | generic-y += unaligned.h | ||
44 | generic-y += user.h | ||
45 | generic-y += xor.h | ||
46 | |||
3 | header-y += bfin_sport.h | 47 | header-y += bfin_sport.h |
4 | header-y += cachectl.h | 48 | header-y += cachectl.h |
5 | header-y += fixed_code.h | 49 | header-y += fixed_code.h |
diff --git a/arch/blackfin/include/asm/atomic.h b/arch/blackfin/include/asm/atomic.h index e48508957160..54c6e2887e9f 100644 --- a/arch/blackfin/include/asm/atomic.h +++ b/arch/blackfin/include/asm/atomic.h | |||
@@ -1,126 +1,33 @@ | |||
1 | /* | 1 | /* |
2 | Â * Copyright 2004-2009 Analog Devices Inc. | 2 | * Copyright 2004-2011 Analog Devices Inc. |
3 | Â * | 3 | * |
4 | Â * Licensed under the GPL-2 or later. | 4 | * Licensed under the GPL-2 or later. |
5 | Â */ | 5 | */ |
6 | 6 | ||
7 | #ifndef __ARCH_BLACKFIN_ATOMIC__ | 7 | #ifndef __ARCH_BLACKFIN_ATOMIC__ |
8 | #define __ARCH_BLACKFIN_ATOMIC__ | 8 | #define __ARCH_BLACKFIN_ATOMIC__ |
9 | 9 | ||
10 | #ifndef CONFIG_SMP | 10 | #ifdef CONFIG_SMP |
11 | # include <asm-generic/atomic.h> | ||
12 | #else | ||
13 | |||
14 | #include <linux/types.h> | ||
15 | #include <asm/system.h> /* local_irq_XXX() */ | ||
16 | |||
17 | /* | ||
18 | * Atomic operations that C can't guarantee us. Useful for | ||
19 | * resource counting etc.. | ||
20 | */ | ||
21 | |||
22 | #define ATOMIC_INIT(i) { (i) } | ||
23 | #define atomic_set(v, i) (((v)->counter) = i) | ||
24 | 11 | ||
25 | #define atomic_read(v) __raw_uncached_fetch_asm(&(v)->counter) | 12 | #include <linux/linkage.h> |
26 | 13 | ||
27 | asmlinkage int __raw_uncached_fetch_asm(const volatile int *ptr); | 14 | asmlinkage int __raw_uncached_fetch_asm(const volatile int *ptr); |
28 | |||
29 | asmlinkage int __raw_atomic_update_asm(volatile int *ptr, int value); | 15 | asmlinkage int __raw_atomic_update_asm(volatile int *ptr, int value); |
30 | |||
31 | asmlinkage int __raw_atomic_clear_asm(volatile int *ptr, int value); | 16 | asmlinkage int __raw_atomic_clear_asm(volatile int *ptr, int value); |
32 | |||
33 | asmlinkage int __raw_atomic_set_asm(volatile int *ptr, int value); | 17 | asmlinkage int __raw_atomic_set_asm(volatile int *ptr, int value); |
34 | |||
35 | asmlinkage int __raw_atomic_xor_asm(volatile int *ptr, int value); | 18 | asmlinkage int __raw_atomic_xor_asm(volatile int *ptr, int value); |
36 | |||
37 | asmlinkage int __raw_atomic_test_asm(const volatile int *ptr, int value); | 19 | asmlinkage int __raw_atomic_test_asm(const volatile int *ptr, int value); |
38 | 20 | ||
39 | static inline void atomic_add(int i, atomic_t *v) | 21 | #define atomic_read(v) __raw_uncached_fetch_asm(&(v)->counter) |
40 | { | ||
41 | __raw_atomic_update_asm(&v->counter, i); | ||
42 | } | ||
43 | |||
44 | static inline void atomic_sub(int i, atomic_t *v) | ||
45 | { | ||
46 | __raw_atomic_update_asm(&v->counter, -i); | ||
47 | } | ||
48 | |||
49 | static inline int atomic_add_return(int i, atomic_t *v) | ||
50 | { | ||
51 | return __raw_atomic_update_asm(&v->counter, i); | ||
52 | } | ||
53 | |||
54 | static inline int atomic_sub_return(int i, atomic_t *v) | ||
55 | { | ||
56 | return __raw_atomic_update_asm(&v->counter, -i); | ||
57 | } | ||
58 | |||
59 | static inline void atomic_inc(volatile atomic_t *v) | ||
60 | { | ||
61 | __raw_atomic_update_asm(&v->counter, 1); | ||
62 | } | ||
63 | |||
64 | static inline void atomic_dec(volatile atomic_t *v) | ||
65 | { | ||
66 | __raw_atomic_update_asm(&v->counter, -1); | ||
67 | } | ||
68 | |||
69 | static inline void atomic_clear_mask(int mask, atomic_t *v) | ||
70 | { | ||
71 | __raw_atomic_clear_asm(&v->counter, mask); | ||
72 | } | ||
73 | |||
74 | static inline void atomic_set_mask(int mask, atomic_t *v) | ||
75 | { | ||
76 | __raw_atomic_set_asm(&v->counter, mask); | ||
77 | } | ||
78 | |||
79 | static inline int atomic_test_mask(int mask, atomic_t *v) | ||
80 | { | ||
81 | return __raw_atomic_test_asm(&v->counter, mask); | ||
82 | } | ||
83 | |||
84 | /* Atomic operations are already serializing */ | ||
85 | #define smp_mb__before_atomic_dec() barrier() | ||
86 | #define smp_mb__after_atomic_dec() barrier() | ||
87 | #define smp_mb__before_atomic_inc() barrier() | ||
88 | #define smp_mb__after_atomic_inc() barrier() | ||
89 | |||
90 | #define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0) | ||
91 | #define atomic_dec_return(v) atomic_sub_return(1,(v)) | ||
92 | #define atomic_inc_return(v) atomic_add_return(1,(v)) | ||
93 | |||
94 | #define atomic_cmpxchg(v, o, n) ((int)cmpxchg(&((v)->counter), (o), (n))) | ||
95 | #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) | ||
96 | |||
97 | #define atomic_add_unless(v, a, u) \ | ||
98 | ({ \ | ||
99 | int c, old; \ | ||
100 | c = atomic_read(v); \ | ||
101 | while (c != (u) && (old = atomic_cmpxchg((v), c, c + (a))) != c) \ | ||
102 | c = old; \ | ||
103 | c != (u); \ | ||
104 | }) | ||
105 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | ||
106 | |||
107 | /* | ||
108 | * atomic_inc_and_test - increment and test | ||
109 | * @v: pointer of type atomic_t | ||
110 | * | ||
111 | * Atomically increments @v by 1 | ||
112 | * and returns true if the result is zero, or false for all | ||
113 | * other cases. | ||
114 | */ | ||
115 | #define atomic_inc_and_test(v) (atomic_inc_return(v) == 0) | ||
116 | 22 | ||
117 | #define atomic_sub_and_test(i,v) (atomic_sub_return((i), (v)) == 0) | 23 | #define atomic_add_return(i, v) __raw_atomic_update_asm(&(v)->counter, i) |
118 | #define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0) | 24 | #define atomic_sub_return(i, v) __raw_atomic_update_asm(&(v)->counter, -(i)) |
119 | 25 | ||
120 | #include <asm-generic/atomic-long.h> | 26 | #define atomic_clear_mask(m, v) __raw_atomic_clear_asm(&(v)->counter, m) |
27 | #define atomic_set_mask(m, v) __raw_atomic_set_asm(&(v)->counter, m) | ||
121 | 28 | ||
122 | #endif | 29 | #endif |
123 | 30 | ||
124 | #include <asm-generic/atomic64.h> | 31 | #include <asm-generic/atomic.h> |
125 | 32 | ||
126 | #endif | 33 | #endif |
diff --git a/arch/blackfin/include/asm/auxvec.h b/arch/blackfin/include/asm/auxvec.h deleted file mode 100644 index 41fa68b71287..000000000000 --- a/arch/blackfin/include/asm/auxvec.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/auxvec.h> | ||
diff --git a/arch/blackfin/include/asm/bfin_serial.h b/arch/blackfin/include/asm/bfin_serial.h index 7fd0ec7b5b0f..ecacdf34768b 100644 --- a/arch/blackfin/include/asm/bfin_serial.h +++ b/arch/blackfin/include/asm/bfin_serial.h | |||
@@ -32,6 +32,8 @@ struct work_struct; | |||
32 | struct bfin_serial_port { | 32 | struct bfin_serial_port { |
33 | struct uart_port port; | 33 | struct uart_port port; |
34 | unsigned int old_status; | 34 | unsigned int old_status; |
35 | int tx_irq; | ||
36 | int rx_irq; | ||
35 | int status_irq; | 37 | int status_irq; |
36 | #ifndef BFIN_UART_BF54X_STYLE | 38 | #ifndef BFIN_UART_BF54X_STYLE |
37 | unsigned int lsr; | 39 | unsigned int lsr; |
diff --git a/arch/blackfin/include/asm/bitsperlong.h b/arch/blackfin/include/asm/bitsperlong.h deleted file mode 100644 index 6dc0bb0c13b2..000000000000 --- a/arch/blackfin/include/asm/bitsperlong.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/bitsperlong.h> | ||
diff --git a/arch/blackfin/include/asm/blackfin.h b/arch/blackfin/include/asm/blackfin.h index eb7c1441d8f9..0928700b6bc4 100644 --- a/arch/blackfin/include/asm/blackfin.h +++ b/arch/blackfin/include/asm/blackfin.h | |||
@@ -1,9 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Common header file for Blackfin family of processors. | 2 | * Common header file for Blackfin family of processors. |
3 | * | 3 | * |
4 | Â * Copyright 2004-2009 Analog Devices Inc. | 4 | * Copyright 2004-2009 Analog Devices Inc. |
5 | Â * | 5 | * |
6 | Â * Licensed under the GPL-2 or later. | 6 | * Licensed under the GPL-2 or later. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #ifndef _BLACKFIN_H_ | 9 | #ifndef _BLACKFIN_H_ |
diff --git a/arch/blackfin/include/asm/bugs.h b/arch/blackfin/include/asm/bugs.h deleted file mode 100644 index 61791e1ad9f5..000000000000 --- a/arch/blackfin/include/asm/bugs.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/bugs.h> | ||
diff --git a/arch/blackfin/include/asm/cputime.h b/arch/blackfin/include/asm/cputime.h deleted file mode 100644 index 6d68ad7e0ea3..000000000000 --- a/arch/blackfin/include/asm/cputime.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/cputime.h> | ||
diff --git a/arch/blackfin/include/asm/current.h b/arch/blackfin/include/asm/current.h deleted file mode 100644 index 4c51401b5537..000000000000 --- a/arch/blackfin/include/asm/current.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/current.h> | ||
diff --git a/arch/blackfin/include/asm/device.h b/arch/blackfin/include/asm/device.h deleted file mode 100644 index f0a4c256403b..000000000000 --- a/arch/blackfin/include/asm/device.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/device.h> | ||
diff --git a/arch/blackfin/include/asm/div64.h b/arch/blackfin/include/asm/div64.h deleted file mode 100644 index 6cd978cefb28..000000000000 --- a/arch/blackfin/include/asm/div64.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/div64.h> | ||
diff --git a/arch/blackfin/include/asm/dma.h b/arch/blackfin/include/asm/dma.h index d9dbc1a53534..dac0c97242bb 100644 --- a/arch/blackfin/include/asm/dma.h +++ b/arch/blackfin/include/asm/dma.h | |||
@@ -10,7 +10,7 @@ | |||
10 | 10 | ||
11 | #include <linux/interrupt.h> | 11 | #include <linux/interrupt.h> |
12 | #include <mach/dma.h> | 12 | #include <mach/dma.h> |
13 | #include <asm/atomic.h> | 13 | #include <linux/atomic.h> |
14 | #include <asm/blackfin.h> | 14 | #include <asm/blackfin.h> |
15 | #include <asm/page.h> | 15 | #include <asm/page.h> |
16 | #include <asm-generic/dma.h> | 16 | #include <asm-generic/dma.h> |
diff --git a/arch/blackfin/include/asm/dpmc.h b/arch/blackfin/include/asm/dpmc.h index edf2a2ad5183..c4ec959dad78 100644 --- a/arch/blackfin/include/asm/dpmc.h +++ b/arch/blackfin/include/asm/dpmc.h | |||
@@ -117,7 +117,6 @@ | |||
117 | #ifndef __ASSEMBLY__ | 117 | #ifndef __ASSEMBLY__ |
118 | 118 | ||
119 | void sleep_mode(u32 sic_iwr0, u32 sic_iwr1, u32 sic_iwr2); | 119 | void sleep_mode(u32 sic_iwr0, u32 sic_iwr1, u32 sic_iwr2); |
120 | void hibernate_mode(u32 sic_iwr0, u32 sic_iwr1, u32 sic_iwr2); | ||
121 | void sleep_deeper(u32 sic_iwr0, u32 sic_iwr1, u32 sic_iwr2); | 120 | void sleep_deeper(u32 sic_iwr0, u32 sic_iwr1, u32 sic_iwr2); |
122 | void do_hibernate(int wakeup); | 121 | void do_hibernate(int wakeup); |
123 | void set_dram_srfs(void); | 122 | void set_dram_srfs(void); |
@@ -134,32 +133,6 @@ struct bfin_dpmc_platform_data { | |||
134 | unsigned short vr_settling_time; /* in us */ | 133 | unsigned short vr_settling_time; /* in us */ |
135 | }; | 134 | }; |
136 | 135 | ||
137 | #else | ||
138 | |||
139 | #define PM_PUSH(x) \ | ||
140 | R0 = [P0 + (x - SRAM_BASE_ADDRESS)];\ | ||
141 | [--SP] = R0;\ | ||
142 | |||
143 | #define PM_POP(x) \ | ||
144 | R0 = [SP++];\ | ||
145 | [P0 + (x - SRAM_BASE_ADDRESS)] = R0;\ | ||
146 | |||
147 | #define PM_SYS_PUSH(x) \ | ||
148 | R0 = [P0 + (x - PLL_CTL)];\ | ||
149 | [--SP] = R0;\ | ||
150 | |||
151 | #define PM_SYS_POP(x) \ | ||
152 | R0 = [SP++];\ | ||
153 | [P0 + (x - PLL_CTL)] = R0;\ | ||
154 | |||
155 | #define PM_SYS_PUSH16(x) \ | ||
156 | R0 = w[P0 + (x - PLL_CTL)];\ | ||
157 | [--SP] = R0;\ | ||
158 | |||
159 | #define PM_SYS_POP16(x) \ | ||
160 | R0 = [SP++];\ | ||
161 | w[P0 + (x - PLL_CTL)] = R0;\ | ||
162 | |||
163 | #endif | 136 | #endif |
164 | 137 | ||
165 | #endif /*_BLACKFIN_DPMC_H_*/ | 138 | #endif /*_BLACKFIN_DPMC_H_*/ |
diff --git a/arch/blackfin/include/asm/emergency-restart.h b/arch/blackfin/include/asm/emergency-restart.h deleted file mode 100644 index 3711bd9d50bd..000000000000 --- a/arch/blackfin/include/asm/emergency-restart.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/emergency-restart.h> | ||
diff --git a/arch/blackfin/include/asm/errno.h b/arch/blackfin/include/asm/errno.h deleted file mode 100644 index 4c82b503d92f..000000000000 --- a/arch/blackfin/include/asm/errno.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/errno.h> | ||
diff --git a/arch/blackfin/include/asm/fb.h b/arch/blackfin/include/asm/fb.h deleted file mode 100644 index 3a4988e8df45..000000000000 --- a/arch/blackfin/include/asm/fb.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/fb.h> | ||
diff --git a/arch/blackfin/include/asm/futex.h b/arch/blackfin/include/asm/futex.h deleted file mode 100644 index 0b745828f42b..000000000000 --- a/arch/blackfin/include/asm/futex.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/futex.h> | ||
diff --git a/arch/blackfin/include/asm/gpio.h b/arch/blackfin/include/asm/gpio.h index 1ef8417f5d27..5a25856381ff 100644 --- a/arch/blackfin/include/asm/gpio.h +++ b/arch/blackfin/include/asm/gpio.h | |||
@@ -16,58 +16,13 @@ | |||
16 | 16 | ||
17 | #include <mach/gpio.h> | 17 | #include <mach/gpio.h> |
18 | 18 | ||
19 | #define GPIO_0 0 | ||
20 | #define GPIO_1 1 | ||
21 | #define GPIO_2 2 | ||
22 | #define GPIO_3 3 | ||
23 | #define GPIO_4 4 | ||
24 | #define GPIO_5 5 | ||
25 | #define GPIO_6 6 | ||
26 | #define GPIO_7 7 | ||
27 | #define GPIO_8 8 | ||
28 | #define GPIO_9 9 | ||
29 | #define GPIO_10 10 | ||
30 | #define GPIO_11 11 | ||
31 | #define GPIO_12 12 | ||
32 | #define GPIO_13 13 | ||
33 | #define GPIO_14 14 | ||
34 | #define GPIO_15 15 | ||
35 | #define GPIO_16 16 | ||
36 | #define GPIO_17 17 | ||
37 | #define GPIO_18 18 | ||
38 | #define GPIO_19 19 | ||
39 | #define GPIO_20 20 | ||
40 | #define GPIO_21 21 | ||
41 | #define GPIO_22 22 | ||
42 | #define GPIO_23 23 | ||
43 | #define GPIO_24 24 | ||
44 | #define GPIO_25 25 | ||
45 | #define GPIO_26 26 | ||
46 | #define GPIO_27 27 | ||
47 | #define GPIO_28 28 | ||
48 | #define GPIO_29 29 | ||
49 | #define GPIO_30 30 | ||
50 | #define GPIO_31 31 | ||
51 | #define GPIO_32 32 | ||
52 | #define GPIO_33 33 | ||
53 | #define GPIO_34 34 | ||
54 | #define GPIO_35 35 | ||
55 | #define GPIO_36 36 | ||
56 | #define GPIO_37 37 | ||
57 | #define GPIO_38 38 | ||
58 | #define GPIO_39 39 | ||
59 | #define GPIO_40 40 | ||
60 | #define GPIO_41 41 | ||
61 | #define GPIO_42 42 | ||
62 | #define GPIO_43 43 | ||
63 | #define GPIO_44 44 | ||
64 | #define GPIO_45 45 | ||
65 | #define GPIO_46 46 | ||
66 | #define GPIO_47 47 | ||
67 | |||
68 | #define PERIPHERAL_USAGE 1 | 19 | #define PERIPHERAL_USAGE 1 |
69 | #define GPIO_USAGE 0 | 20 | #define GPIO_USAGE 0 |
70 | 21 | ||
22 | #ifndef BFIN_GPIO_PINT | ||
23 | # define BFIN_GPIO_PINT 0 | ||
24 | #endif | ||
25 | |||
71 | #ifndef __ASSEMBLY__ | 26 | #ifndef __ASSEMBLY__ |
72 | 27 | ||
73 | #include <linux/compiler.h> | 28 | #include <linux/compiler.h> |
@@ -89,7 +44,7 @@ | |||
89 | * MODIFICATION HISTORY : | 44 | * MODIFICATION HISTORY : |
90 | **************************************************************/ | 45 | **************************************************************/ |
91 | 46 | ||
92 | #ifndef CONFIG_BF54x | 47 | #if !BFIN_GPIO_PINT |
93 | void set_gpio_dir(unsigned, unsigned short); | 48 | void set_gpio_dir(unsigned, unsigned short); |
94 | void set_gpio_inen(unsigned, unsigned short); | 49 | void set_gpio_inen(unsigned, unsigned short); |
95 | void set_gpio_polar(unsigned, unsigned short); | 50 | void set_gpio_polar(unsigned, unsigned short); |
@@ -164,6 +119,10 @@ struct gpio_port_t { | |||
164 | #ifdef BFIN_SPECIAL_GPIO_BANKS | 119 | #ifdef BFIN_SPECIAL_GPIO_BANKS |
165 | void bfin_special_gpio_free(unsigned gpio); | 120 | void bfin_special_gpio_free(unsigned gpio); |
166 | int bfin_special_gpio_request(unsigned gpio, const char *label); | 121 | int bfin_special_gpio_request(unsigned gpio, const char *label); |
122 | # ifdef CONFIG_PM | ||
123 | void bfin_special_gpio_pm_hibernate_restore(void); | ||
124 | void bfin_special_gpio_pm_hibernate_suspend(void); | ||
125 | # endif | ||
167 | #endif | 126 | #endif |
168 | 127 | ||
169 | #ifdef CONFIG_PM | 128 | #ifdef CONFIG_PM |
@@ -182,7 +141,7 @@ static inline void bfin_pm_standby_restore(void) | |||
182 | void bfin_gpio_pm_hibernate_restore(void); | 141 | void bfin_gpio_pm_hibernate_restore(void); |
183 | void bfin_gpio_pm_hibernate_suspend(void); | 142 | void bfin_gpio_pm_hibernate_suspend(void); |
184 | 143 | ||
185 | #ifndef CONFIG_BF54x | 144 | # if !BFIN_GPIO_PINT |
186 | int gpio_pm_wakeup_ctrl(unsigned gpio, unsigned ctrl); | 145 | int gpio_pm_wakeup_ctrl(unsigned gpio, unsigned ctrl); |
187 | 146 | ||
188 | struct gpio_port_s { | 147 | struct gpio_port_s { |
@@ -199,8 +158,9 @@ struct gpio_port_s { | |||
199 | unsigned short reserved; | 158 | unsigned short reserved; |
200 | unsigned short mux; | 159 | unsigned short mux; |
201 | }; | 160 | }; |
202 | #endif /*CONFIG_BF54x*/ | 161 | # endif |
203 | #endif /*CONFIG_PM*/ | 162 | #endif /*CONFIG_PM*/ |
163 | |||
204 | /*********************************************************** | 164 | /*********************************************************** |
205 | * | 165 | * |
206 | * FUNCTIONS: Blackfin GPIO Driver | 166 | * FUNCTIONS: Blackfin GPIO Driver |
diff --git a/arch/blackfin/include/asm/gptimers.h b/arch/blackfin/include/asm/gptimers.h index 38657dac1235..38bddcb190c8 100644 --- a/arch/blackfin/include/asm/gptimers.h +++ b/arch/blackfin/include/asm/gptimers.h | |||
@@ -193,6 +193,16 @@ uint16_t get_enabled_gptimers(void); | |||
193 | uint32_t get_gptimer_status(unsigned int group); | 193 | uint32_t get_gptimer_status(unsigned int group); |
194 | void set_gptimer_status(unsigned int group, uint32_t value); | 194 | void set_gptimer_status(unsigned int group, uint32_t value); |
195 | 195 | ||
196 | static inline void enable_gptimer(unsigned int timer_id) | ||
197 | { | ||
198 | enable_gptimers(1 << timer_id); | ||
199 | } | ||
200 | |||
201 | static inline void disable_gptimer(unsigned int timer_id) | ||
202 | { | ||
203 | disable_gptimers(1 << timer_id); | ||
204 | } | ||
205 | |||
196 | /* | 206 | /* |
197 | * All Blackfin system MMRs are padded to 32bits even if the register | 207 | * All Blackfin system MMRs are padded to 32bits even if the register |
198 | * itself is only 16bits. So use a helper macro to streamline this. | 208 | * itself is only 16bits. So use a helper macro to streamline this. |
@@ -209,6 +219,15 @@ struct bfin_gptimer_regs { | |||
209 | u32 width; | 219 | u32 width; |
210 | }; | 220 | }; |
211 | 221 | ||
222 | /* | ||
223 | * bfin group timer registers layout | ||
224 | */ | ||
225 | struct bfin_gptimer_group_regs { | ||
226 | __BFP(enable); | ||
227 | __BFP(disable); | ||
228 | u32 status; | ||
229 | }; | ||
230 | |||
212 | #undef __BFP | 231 | #undef __BFP |
213 | 232 | ||
214 | #endif | 233 | #endif |
diff --git a/arch/blackfin/include/asm/hw_irq.h b/arch/blackfin/include/asm/hw_irq.h deleted file mode 100644 index 1f5ef7da0045..000000000000 --- a/arch/blackfin/include/asm/hw_irq.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/hw_irq.h> | ||
diff --git a/arch/blackfin/include/asm/ioctl.h b/arch/blackfin/include/asm/ioctl.h deleted file mode 100644 index b279fe06dfe5..000000000000 --- a/arch/blackfin/include/asm/ioctl.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/ioctl.h> | ||
diff --git a/arch/blackfin/include/asm/ipcbuf.h b/arch/blackfin/include/asm/ipcbuf.h deleted file mode 100644 index 84c7e51cb6d0..000000000000 --- a/arch/blackfin/include/asm/ipcbuf.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/ipcbuf.h> | ||
diff --git a/arch/blackfin/include/asm/ipipe.h b/arch/blackfin/include/asm/ipipe.h index 9e0cc0e2534f..17b5e92e3bc6 100644 --- a/arch/blackfin/include/asm/ipipe.h +++ b/arch/blackfin/include/asm/ipipe.h | |||
@@ -32,7 +32,7 @@ | |||
32 | #include <asm/ptrace.h> | 32 | #include <asm/ptrace.h> |
33 | #include <asm/irq.h> | 33 | #include <asm/irq.h> |
34 | #include <asm/bitops.h> | 34 | #include <asm/bitops.h> |
35 | #include <asm/atomic.h> | 35 | #include <linux/atomic.h> |
36 | #include <asm/traps.h> | 36 | #include <asm/traps.h> |
37 | #include <asm/bitsperlong.h> | 37 | #include <asm/bitsperlong.h> |
38 | 38 | ||
diff --git a/arch/blackfin/include/asm/irq_regs.h b/arch/blackfin/include/asm/irq_regs.h deleted file mode 100644 index 3dd9c0b70270..000000000000 --- a/arch/blackfin/include/asm/irq_regs.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/irq_regs.h> | ||
diff --git a/arch/blackfin/include/asm/irqflags.h b/arch/blackfin/include/asm/irqflags.h index b4bbb75a9e15..43eb4749de3d 100644 --- a/arch/blackfin/include/asm/irqflags.h +++ b/arch/blackfin/include/asm/irqflags.h | |||
@@ -18,12 +18,12 @@ | |||
18 | extern unsigned long bfin_irq_flags; | 18 | extern unsigned long bfin_irq_flags; |
19 | #endif | 19 | #endif |
20 | 20 | ||
21 | static inline void bfin_sti(unsigned long flags) | 21 | static inline notrace void bfin_sti(unsigned long flags) |
22 | { | 22 | { |
23 | asm volatile("sti %0;" : : "d" (flags)); | 23 | asm volatile("sti %0;" : : "d" (flags)); |
24 | } | 24 | } |
25 | 25 | ||
26 | static inline unsigned long bfin_cli(void) | 26 | static inline notrace unsigned long bfin_cli(void) |
27 | { | 27 | { |
28 | unsigned long flags; | 28 | unsigned long flags; |
29 | asm volatile("cli %0;" : "=d" (flags)); | 29 | asm volatile("cli %0;" : "=d" (flags)); |
@@ -40,22 +40,22 @@ static inline unsigned long bfin_cli(void) | |||
40 | /* | 40 | /* |
41 | * Hard, untraced CPU interrupt flag manipulation and access. | 41 | * Hard, untraced CPU interrupt flag manipulation and access. |
42 | */ | 42 | */ |
43 | static inline void __hard_local_irq_disable(void) | 43 | static inline notrace void __hard_local_irq_disable(void) |
44 | { | 44 | { |
45 | bfin_cli(); | 45 | bfin_cli(); |
46 | } | 46 | } |
47 | 47 | ||
48 | static inline void __hard_local_irq_enable(void) | 48 | static inline notrace void __hard_local_irq_enable(void) |
49 | { | 49 | { |
50 | bfin_sti(bfin_irq_flags); | 50 | bfin_sti(bfin_irq_flags); |
51 | } | 51 | } |
52 | 52 | ||
53 | static inline unsigned long hard_local_save_flags(void) | 53 | static inline notrace unsigned long hard_local_save_flags(void) |
54 | { | 54 | { |
55 | return bfin_read_IMASK(); | 55 | return bfin_read_IMASK(); |
56 | } | 56 | } |
57 | 57 | ||
58 | static inline unsigned long __hard_local_irq_save(void) | 58 | static inline notrace unsigned long __hard_local_irq_save(void) |
59 | { | 59 | { |
60 | unsigned long flags; | 60 | unsigned long flags; |
61 | flags = bfin_cli(); | 61 | flags = bfin_cli(); |
@@ -65,18 +65,18 @@ static inline unsigned long __hard_local_irq_save(void) | |||
65 | return flags; | 65 | return flags; |
66 | } | 66 | } |
67 | 67 | ||
68 | static inline int hard_irqs_disabled_flags(unsigned long flags) | 68 | static inline notrace int hard_irqs_disabled_flags(unsigned long flags) |
69 | { | 69 | { |
70 | return (flags & ~0x3f) == 0; | 70 | return (flags & ~0x3f) == 0; |
71 | } | 71 | } |
72 | 72 | ||
73 | static inline int hard_irqs_disabled(void) | 73 | static inline notrace int hard_irqs_disabled(void) |
74 | { | 74 | { |
75 | unsigned long flags = hard_local_save_flags(); | 75 | unsigned long flags = hard_local_save_flags(); |
76 | return hard_irqs_disabled_flags(flags); | 76 | return hard_irqs_disabled_flags(flags); |
77 | } | 77 | } |
78 | 78 | ||
79 | static inline void __hard_local_irq_restore(unsigned long flags) | 79 | static inline notrace void __hard_local_irq_restore(unsigned long flags) |
80 | { | 80 | { |
81 | if (!hard_irqs_disabled_flags(flags)) | 81 | if (!hard_irqs_disabled_flags(flags)) |
82 | __hard_local_irq_enable(); | 82 | __hard_local_irq_enable(); |
@@ -113,31 +113,31 @@ void ipipe_check_context(struct ipipe_domain *ipd); | |||
113 | /* | 113 | /* |
114 | * Interrupt pipe interface to linux/irqflags.h. | 114 | * Interrupt pipe interface to linux/irqflags.h. |
115 | */ | 115 | */ |
116 | static inline void arch_local_irq_disable(void) | 116 | static inline notrace void arch_local_irq_disable(void) |
117 | { | 117 | { |
118 | __check_irqop_context(); | 118 | __check_irqop_context(); |
119 | __ipipe_stall_root(); | 119 | __ipipe_stall_root(); |
120 | barrier(); | 120 | barrier(); |
121 | } | 121 | } |
122 | 122 | ||
123 | static inline void arch_local_irq_enable(void) | 123 | static inline notrace void arch_local_irq_enable(void) |
124 | { | 124 | { |
125 | barrier(); | 125 | barrier(); |
126 | __check_irqop_context(); | 126 | __check_irqop_context(); |
127 | __ipipe_unstall_root(); | 127 | __ipipe_unstall_root(); |
128 | } | 128 | } |
129 | 129 | ||
130 | static inline unsigned long arch_local_save_flags(void) | 130 | static inline notrace unsigned long arch_local_save_flags(void) |
131 | { | 131 | { |
132 | return __ipipe_test_root() ? bfin_no_irqs : bfin_irq_flags; | 132 | return __ipipe_test_root() ? bfin_no_irqs : bfin_irq_flags; |
133 | } | 133 | } |
134 | 134 | ||
135 | static inline int arch_irqs_disabled_flags(unsigned long flags) | 135 | static inline notrace int arch_irqs_disabled_flags(unsigned long flags) |
136 | { | 136 | { |
137 | return flags == bfin_no_irqs; | 137 | return flags == bfin_no_irqs; |
138 | } | 138 | } |
139 | 139 | ||
140 | static inline unsigned long arch_local_irq_save(void) | 140 | static inline notrace unsigned long arch_local_irq_save(void) |
141 | { | 141 | { |
142 | unsigned long flags; | 142 | unsigned long flags; |
143 | 143 | ||
@@ -148,13 +148,13 @@ static inline unsigned long arch_local_irq_save(void) | |||
148 | return flags; | 148 | return flags; |
149 | } | 149 | } |
150 | 150 | ||
151 | static inline void arch_local_irq_restore(unsigned long flags) | 151 | static inline notrace void arch_local_irq_restore(unsigned long flags) |
152 | { | 152 | { |
153 | __check_irqop_context(); | 153 | __check_irqop_context(); |
154 | __ipipe_restore_root(flags == bfin_no_irqs); | 154 | __ipipe_restore_root(flags == bfin_no_irqs); |
155 | } | 155 | } |
156 | 156 | ||
157 | static inline unsigned long arch_mangle_irq_bits(int virt, unsigned long real) | 157 | static inline notrace unsigned long arch_mangle_irq_bits(int virt, unsigned long real) |
158 | { | 158 | { |
159 | /* | 159 | /* |
160 | * Merge virtual and real interrupt mask bits into a single | 160 | * Merge virtual and real interrupt mask bits into a single |
@@ -163,7 +163,7 @@ static inline unsigned long arch_mangle_irq_bits(int virt, unsigned long real) | |||
163 | return (real & ~(1 << 31)) | ((virt != 0) << 31); | 163 | return (real & ~(1 << 31)) | ((virt != 0) << 31); |
164 | } | 164 | } |
165 | 165 | ||
166 | static inline int arch_demangle_irq_bits(unsigned long *x) | 166 | static inline notrace int arch_demangle_irq_bits(unsigned long *x) |
167 | { | 167 | { |
168 | int virt = (*x & (1 << 31)) != 0; | 168 | int virt = (*x & (1 << 31)) != 0; |
169 | *x &= ~(1L << 31); | 169 | *x &= ~(1L << 31); |
@@ -174,7 +174,7 @@ static inline int arch_demangle_irq_bits(unsigned long *x) | |||
174 | * Interface to various arch routines that may be traced. | 174 | * Interface to various arch routines that may be traced. |
175 | */ | 175 | */ |
176 | #ifdef CONFIG_IPIPE_TRACE_IRQSOFF | 176 | #ifdef CONFIG_IPIPE_TRACE_IRQSOFF |
177 | static inline void hard_local_irq_disable(void) | 177 | static inline notrace void hard_local_irq_disable(void) |
178 | { | 178 | { |
179 | if (!hard_irqs_disabled()) { | 179 | if (!hard_irqs_disabled()) { |
180 | __hard_local_irq_disable(); | 180 | __hard_local_irq_disable(); |
@@ -182,7 +182,7 @@ static inline void hard_local_irq_disable(void) | |||
182 | } | 182 | } |
183 | } | 183 | } |
184 | 184 | ||
185 | static inline void hard_local_irq_enable(void) | 185 | static inline notrace void hard_local_irq_enable(void) |
186 | { | 186 | { |
187 | if (hard_irqs_disabled()) { | 187 | if (hard_irqs_disabled()) { |
188 | ipipe_trace_end(0x80000000); | 188 | ipipe_trace_end(0x80000000); |
@@ -190,7 +190,7 @@ static inline void hard_local_irq_enable(void) | |||
190 | } | 190 | } |
191 | } | 191 | } |
192 | 192 | ||
193 | static inline unsigned long hard_local_irq_save(void) | 193 | static inline notrace unsigned long hard_local_irq_save(void) |
194 | { | 194 | { |
195 | unsigned long flags = hard_local_save_flags(); | 195 | unsigned long flags = hard_local_save_flags(); |
196 | if (!hard_irqs_disabled_flags(flags)) { | 196 | if (!hard_irqs_disabled_flags(flags)) { |
@@ -200,7 +200,7 @@ static inline unsigned long hard_local_irq_save(void) | |||
200 | return flags; | 200 | return flags; |
201 | } | 201 | } |
202 | 202 | ||
203 | static inline void hard_local_irq_restore(unsigned long flags) | 203 | static inline notrace void hard_local_irq_restore(unsigned long flags) |
204 | { | 204 | { |
205 | if (!hard_irqs_disabled_flags(flags)) { | 205 | if (!hard_irqs_disabled_flags(flags)) { |
206 | ipipe_trace_end(0x80000001); | 206 | ipipe_trace_end(0x80000001); |
diff --git a/arch/blackfin/include/asm/kdebug.h b/arch/blackfin/include/asm/kdebug.h deleted file mode 100644 index 6ece1b037665..000000000000 --- a/arch/blackfin/include/asm/kdebug.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/kdebug.h> | ||
diff --git a/arch/blackfin/include/asm/kmap_types.h b/arch/blackfin/include/asm/kmap_types.h deleted file mode 100644 index 3575c64af42a..000000000000 --- a/arch/blackfin/include/asm/kmap_types.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/kmap_types.h> | ||
diff --git a/arch/blackfin/include/asm/local.h b/arch/blackfin/include/asm/local.h deleted file mode 100644 index c11c530f74d0..000000000000 --- a/arch/blackfin/include/asm/local.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/local.h> | ||
diff --git a/arch/blackfin/include/asm/local64.h b/arch/blackfin/include/asm/local64.h deleted file mode 100644 index 36c93b5cc239..000000000000 --- a/arch/blackfin/include/asm/local64.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/local64.h> | ||
diff --git a/arch/blackfin/include/asm/mman.h b/arch/blackfin/include/asm/mman.h deleted file mode 100644 index 8eebf89f5ab1..000000000000 --- a/arch/blackfin/include/asm/mman.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/mman.h> | ||
diff --git a/arch/blackfin/include/asm/module.h b/arch/blackfin/include/asm/module.h index 4282b169ead9..ed5689b82c9f 100644 --- a/arch/blackfin/include/asm/module.h +++ b/arch/blackfin/include/asm/module.h | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | Â * Copyright 2004-2008 Analog Devices Inc. | 2 | * Copyright 2004-2008 Analog Devices Inc. |
3 | Â * | 3 | * |
4 | Â * Licensed under the GPL-2 or later. | 4 | * Licensed under the GPL-2 or later. |
5 | Â */ | 5 | */ |
6 | 6 | ||
7 | #ifndef _ASM_BFIN_MODULE_H | 7 | #ifndef _ASM_BFIN_MODULE_H |
8 | #define _ASM_BFIN_MODULE_H | 8 | #define _ASM_BFIN_MODULE_H |
diff --git a/arch/blackfin/include/asm/msgbuf.h b/arch/blackfin/include/asm/msgbuf.h deleted file mode 100644 index 809134c644a6..000000000000 --- a/arch/blackfin/include/asm/msgbuf.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/msgbuf.h> | ||
diff --git a/arch/blackfin/include/asm/mutex.h b/arch/blackfin/include/asm/mutex.h deleted file mode 100644 index f726e3a80ad0..000000000000 --- a/arch/blackfin/include/asm/mutex.h +++ /dev/null | |||
@@ -1,76 +0,0 @@ | |||
1 | /* | ||
2 | * Pull in the generic implementation for the mutex fastpath. | ||
3 | * | ||
4 | * TODO: implement optimized primitives instead, or leave the generic | ||
5 | * implementation in place, or pick the atomic_xchg() based generic | ||
6 | * implementation. (see asm-generic/mutex-xchg.h for details) | ||
7 | * | ||
8 | * Copyright 2006-2009 Analog Devices Inc. | ||
9 | * | ||
10 | * Licensed under the GPL-2 or later. | ||
11 | */ | ||
12 | |||
13 | #ifndef _ASM_MUTEX_H | ||
14 | #define _ASM_MUTEX_H | ||
15 | |||
16 | #ifndef CONFIG_SMP | ||
17 | #include <asm-generic/mutex.h> | ||
18 | #else | ||
19 | |||
20 | static inline void | ||
21 | __mutex_fastpath_lock(atomic_t *count, void (*fail_fn)(atomic_t *)) | ||
22 | { | ||
23 | if (unlikely(atomic_dec_return(count) < 0)) | ||
24 | fail_fn(count); | ||
25 | else | ||
26 | smp_mb(); | ||
27 | } | ||
28 | |||
29 | static inline int | ||
30 | __mutex_fastpath_lock_retval(atomic_t *count, int (*fail_fn)(atomic_t *)) | ||
31 | { | ||
32 | if (unlikely(atomic_dec_return(count) < 0)) | ||
33 | return fail_fn(count); | ||
34 | else { | ||
35 | smp_mb(); | ||
36 | return 0; | ||
37 | } | ||
38 | } | ||
39 | |||
40 | static inline void | ||
41 | __mutex_fastpath_unlock(atomic_t *count, void (*fail_fn)(atomic_t *)) | ||
42 | { | ||
43 | smp_mb(); | ||
44 | if (unlikely(atomic_inc_return(count) <= 0)) | ||
45 | fail_fn(count); | ||
46 | } | ||
47 | |||
48 | #define __mutex_slowpath_needs_to_unlock() 1 | ||
49 | |||
50 | static inline int | ||
51 | __mutex_fastpath_trylock(atomic_t *count, int (*fail_fn)(atomic_t *)) | ||
52 | { | ||
53 | /* | ||
54 | * We have two variants here. The cmpxchg based one is the best one | ||
55 | * because it never induce a false contention state. It is included | ||
56 | * here because architectures using the inc/dec algorithms over the | ||
57 | * xchg ones are much more likely to support cmpxchg natively. | ||
58 | * | ||
59 | * If not we fall back to the spinlock based variant - that is | ||
60 | * just as efficient (and simpler) as a 'destructive' probing of | ||
61 | * the mutex state would be. | ||
62 | */ | ||
63 | #ifdef __HAVE_ARCH_CMPXCHG | ||
64 | if (likely(atomic_cmpxchg(count, 1, 0) == 1)) { | ||
65 | smp_mb(); | ||
66 | return 1; | ||
67 | } | ||
68 | return 0; | ||
69 | #else | ||
70 | return fail_fn(count); | ||
71 | #endif | ||
72 | } | ||
73 | |||
74 | #endif | ||
75 | |||
76 | #endif | ||
diff --git a/arch/blackfin/include/asm/page.h b/arch/blackfin/include/asm/page.h index d0ce975bcd48..7202404966f6 100644 --- a/arch/blackfin/include/asm/page.h +++ b/arch/blackfin/include/asm/page.h | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | Â * Copyright 2004-2009 Analog Devices Inc. | 2 | * Copyright 2004-2009 Analog Devices Inc. |
3 | Â * | 3 | * |
4 | Â * Licensed under the GPL-2 or later. | 4 | * Licensed under the GPL-2 or later. |
5 | Â */ | 5 | */ |
6 | 6 | ||
7 | #ifndef _BLACKFIN_PAGE_H | 7 | #ifndef _BLACKFIN_PAGE_H |
8 | #define _BLACKFIN_PAGE_H | 8 | #define _BLACKFIN_PAGE_H |
diff --git a/arch/blackfin/include/asm/param.h b/arch/blackfin/include/asm/param.h deleted file mode 100644 index 965d45427975..000000000000 --- a/arch/blackfin/include/asm/param.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/param.h> | ||
diff --git a/arch/blackfin/include/asm/pda.h b/arch/blackfin/include/asm/pda.h index d49bb261d9b7..28c2498c9c98 100644 --- a/arch/blackfin/include/asm/pda.h +++ b/arch/blackfin/include/asm/pda.h | |||
@@ -54,6 +54,16 @@ struct blackfin_pda { /* Per-processor Data Area */ | |||
54 | #endif | 54 | #endif |
55 | }; | 55 | }; |
56 | 56 | ||
57 | struct blackfin_initial_pda { | ||
58 | void *retx; | ||
59 | #ifdef CONFIG_DEBUG_DOUBLEFAULT | ||
60 | void *dcplb_doublefault_addr; | ||
61 | void *icplb_doublefault_addr; | ||
62 | void *retx_doublefault; | ||
63 | unsigned seqstat_doublefault; | ||
64 | #endif | ||
65 | }; | ||
66 | |||
57 | extern struct blackfin_pda cpu_pda[]; | 67 | extern struct blackfin_pda cpu_pda[]; |
58 | 68 | ||
59 | #endif /* __ASSEMBLY__ */ | 69 | #endif /* __ASSEMBLY__ */ |
diff --git a/arch/blackfin/include/asm/percpu.h b/arch/blackfin/include/asm/percpu.h deleted file mode 100644 index 06a959d67234..000000000000 --- a/arch/blackfin/include/asm/percpu.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/percpu.h> | ||
diff --git a/arch/blackfin/include/asm/pgalloc.h b/arch/blackfin/include/asm/pgalloc.h deleted file mode 100644 index f261cb7dda06..000000000000 --- a/arch/blackfin/include/asm/pgalloc.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/pgalloc.h> | ||
diff --git a/arch/blackfin/include/asm/ptrace.h b/arch/blackfin/include/asm/ptrace.h index 7854d4367c15..10d8641180f2 100644 --- a/arch/blackfin/include/asm/ptrace.h +++ b/arch/blackfin/include/asm/ptrace.h | |||
@@ -102,7 +102,6 @@ struct pt_regs { | |||
102 | /* user_mode returns true if only one bit is set in IPEND, other than the | 102 | /* user_mode returns true if only one bit is set in IPEND, other than the |
103 | master interrupt enable. */ | 103 | master interrupt enable. */ |
104 | #define user_mode(regs) (!(((regs)->ipend & ~0x10) & (((regs)->ipend & ~0x10) - 1))) | 104 | #define user_mode(regs) (!(((regs)->ipend & ~0x10) & (((regs)->ipend & ~0x10) - 1))) |
105 | extern void show_regs(struct pt_regs *); | ||
106 | 105 | ||
107 | #define arch_has_single_step() (1) | 106 | #define arch_has_single_step() (1) |
108 | /* common code demands this function */ | 107 | /* common code demands this function */ |
diff --git a/arch/blackfin/include/asm/resource.h b/arch/blackfin/include/asm/resource.h deleted file mode 100644 index 04bc4db8921b..000000000000 --- a/arch/blackfin/include/asm/resource.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/resource.h> | ||
diff --git a/arch/blackfin/include/asm/scatterlist.h b/arch/blackfin/include/asm/scatterlist.h deleted file mode 100644 index d177a1588958..000000000000 --- a/arch/blackfin/include/asm/scatterlist.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _BLACKFIN_SCATTERLIST_H | ||
2 | #define _BLACKFIN_SCATTERLIST_H | ||
3 | |||
4 | #include <asm-generic/scatterlist.h> | ||
5 | |||
6 | #endif /* !(_BLACKFIN_SCATTERLIST_H) */ | ||
diff --git a/arch/blackfin/include/asm/sections.h b/arch/blackfin/include/asm/sections.h index 14a3e66d9167..fbd408475725 100644 --- a/arch/blackfin/include/asm/sections.h +++ b/arch/blackfin/include/asm/sections.h | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | Â * Copyright 2004-2009 Analog Devices Inc. | 2 | * Copyright 2004-2009 Analog Devices Inc. |
3 | Â * | 3 | * |
4 | Â * Licensed under the GPL-2 or later. | 4 | * Licensed under the GPL-2 or later. |
5 | Â */ | 5 | */ |
6 | 6 | ||
7 | #ifndef _BLACKFIN_SECTIONS_H | 7 | #ifndef _BLACKFIN_SECTIONS_H |
8 | #define _BLACKFIN_SECTIONS_H | 8 | #define _BLACKFIN_SECTIONS_H |
diff --git a/arch/blackfin/include/asm/sembuf.h b/arch/blackfin/include/asm/sembuf.h deleted file mode 100644 index 7673b83cfef7..000000000000 --- a/arch/blackfin/include/asm/sembuf.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/sembuf.h> | ||
diff --git a/arch/blackfin/include/asm/serial.h b/arch/blackfin/include/asm/serial.h deleted file mode 100644 index a0cb0caff152..000000000000 --- a/arch/blackfin/include/asm/serial.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/serial.h> | ||
diff --git a/arch/blackfin/include/asm/setup.h b/arch/blackfin/include/asm/setup.h deleted file mode 100644 index 552df83f1a49..000000000000 --- a/arch/blackfin/include/asm/setup.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/setup.h> | ||
diff --git a/arch/blackfin/include/asm/shmbuf.h b/arch/blackfin/include/asm/shmbuf.h deleted file mode 100644 index 83c05fc2de38..000000000000 --- a/arch/blackfin/include/asm/shmbuf.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/shmbuf.h> | ||
diff --git a/arch/blackfin/include/asm/shmparam.h b/arch/blackfin/include/asm/shmparam.h deleted file mode 100644 index 93f30deb95d0..000000000000 --- a/arch/blackfin/include/asm/shmparam.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/shmparam.h> | ||
diff --git a/arch/blackfin/include/asm/sigcontext.h b/arch/blackfin/include/asm/sigcontext.h index ce4081a4d815..906bdc1f5fda 100644 --- a/arch/blackfin/include/asm/sigcontext.h +++ b/arch/blackfin/include/asm/sigcontext.h | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | Â * Copyright 2004-2008 Analog Devices Inc. | 2 | * Copyright 2004-2008 Analog Devices Inc. |
3 | Â * | 3 | * |
4 | Â * Licensed under the GPL-2 or later. | 4 | * Licensed under the GPL-2 or later. |
5 | Â */ | 5 | */ |
6 | 6 | ||
7 | #ifndef _ASM_BLACKFIN_SIGCONTEXT_H | 7 | #ifndef _ASM_BLACKFIN_SIGCONTEXT_H |
8 | #define _ASM_BLACKFIN_SIGCONTEXT_H | 8 | #define _ASM_BLACKFIN_SIGCONTEXT_H |
diff --git a/arch/blackfin/include/asm/socket.h b/arch/blackfin/include/asm/socket.h deleted file mode 100644 index 6b71384b9d8b..000000000000 --- a/arch/blackfin/include/asm/socket.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/socket.h> | ||
diff --git a/arch/blackfin/include/asm/sockios.h b/arch/blackfin/include/asm/sockios.h deleted file mode 100644 index def6d4746ee7..000000000000 --- a/arch/blackfin/include/asm/sockios.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/sockios.h> | ||
diff --git a/arch/blackfin/include/asm/spinlock.h b/arch/blackfin/include/asm/spinlock.h index 1f286e71c21f..490c7caa02d9 100644 --- a/arch/blackfin/include/asm/spinlock.h +++ b/arch/blackfin/include/asm/spinlock.h | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | Â * Copyright 2004-2009 Analog Devices Inc. | 2 | * Copyright 2004-2009 Analog Devices Inc. |
3 | Â * | 3 | * |
4 | Â * Licensed under the GPL-2 or later. | 4 | * Licensed under the GPL-2 or later. |
5 | Â */ | 5 | */ |
6 | 6 | ||
7 | #ifndef __BFIN_SPINLOCK_H | 7 | #ifndef __BFIN_SPINLOCK_H |
8 | #define __BFIN_SPINLOCK_H | 8 | #define __BFIN_SPINLOCK_H |
@@ -11,7 +11,7 @@ | |||
11 | # include <asm-generic/spinlock.h> | 11 | # include <asm-generic/spinlock.h> |
12 | #else | 12 | #else |
13 | 13 | ||
14 | #include <asm/atomic.h> | 14 | #include <linux/atomic.h> |
15 | 15 | ||
16 | asmlinkage int __raw_spin_is_locked_asm(volatile int *ptr); | 16 | asmlinkage int __raw_spin_is_locked_asm(volatile int *ptr); |
17 | asmlinkage void __raw_spin_lock_asm(volatile int *ptr); | 17 | asmlinkage void __raw_spin_lock_asm(volatile int *ptr); |
diff --git a/arch/blackfin/include/asm/statfs.h b/arch/blackfin/include/asm/statfs.h deleted file mode 100644 index 0b91fe198c20..000000000000 --- a/arch/blackfin/include/asm/statfs.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/statfs.h> | ||
diff --git a/arch/blackfin/include/asm/termbits.h b/arch/blackfin/include/asm/termbits.h deleted file mode 100644 index 3935b106de79..000000000000 --- a/arch/blackfin/include/asm/termbits.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/termbits.h> | ||
diff --git a/arch/blackfin/include/asm/termios.h b/arch/blackfin/include/asm/termios.h deleted file mode 100644 index 280d78a9d966..000000000000 --- a/arch/blackfin/include/asm/termios.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/termios.h> | ||
diff --git a/arch/blackfin/include/asm/topology.h b/arch/blackfin/include/asm/topology.h deleted file mode 100644 index 5428f333a02c..000000000000 --- a/arch/blackfin/include/asm/topology.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/topology.h> | ||
diff --git a/arch/blackfin/include/asm/types.h b/arch/blackfin/include/asm/types.h deleted file mode 100644 index b9e79bc580dd..000000000000 --- a/arch/blackfin/include/asm/types.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/types.h> | ||
diff --git a/arch/blackfin/include/asm/uaccess.h b/arch/blackfin/include/asm/uaccess.h index 1c0d190adaef..5cc111502822 100644 --- a/arch/blackfin/include/asm/uaccess.h +++ b/arch/blackfin/include/asm/uaccess.h | |||
@@ -195,17 +195,17 @@ static inline unsigned long __must_check | |||
195 | copy_from_user(void *to, const void __user *from, unsigned long n) | 195 | copy_from_user(void *to, const void __user *from, unsigned long n) |
196 | { | 196 | { |
197 | if (access_ok(VERIFY_READ, from, n)) | 197 | if (access_ok(VERIFY_READ, from, n)) |
198 | memcpy(to, from, n); | 198 | memcpy(to, (const void __force *)from, n); |
199 | else | 199 | else |
200 | return n; | 200 | return n; |
201 | return 0; | 201 | return 0; |
202 | } | 202 | } |
203 | 203 | ||
204 | static inline unsigned long __must_check | 204 | static inline unsigned long __must_check |
205 | copy_to_user(void *to, const void __user *from, unsigned long n) | 205 | copy_to_user(void __user *to, const void *from, unsigned long n) |
206 | { | 206 | { |
207 | if (access_ok(VERIFY_WRITE, to, n)) | 207 | if (access_ok(VERIFY_WRITE, to, n)) |
208 | memcpy(to, from, n); | 208 | memcpy((void __force *)to, from, n); |
209 | else | 209 | else |
210 | return n; | 210 | return n; |
211 | return 0; | 211 | return 0; |
diff --git a/arch/blackfin/include/asm/ucontext.h b/arch/blackfin/include/asm/ucontext.h deleted file mode 100644 index 9bc07b9f30fb..000000000000 --- a/arch/blackfin/include/asm/ucontext.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/ucontext.h> | ||
diff --git a/arch/blackfin/include/asm/unaligned.h b/arch/blackfin/include/asm/unaligned.h deleted file mode 100644 index 6cecbbb2111f..000000000000 --- a/arch/blackfin/include/asm/unaligned.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/unaligned.h> | ||
diff --git a/arch/blackfin/include/asm/user.h b/arch/blackfin/include/asm/user.h deleted file mode 100644 index 4792a60831e4..000000000000 --- a/arch/blackfin/include/asm/user.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/user.h> | ||
diff --git a/arch/blackfin/include/asm/xor.h b/arch/blackfin/include/asm/xor.h deleted file mode 100644 index c82eb12a5b18..000000000000 --- a/arch/blackfin/include/asm/xor.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/xor.h> | ||
diff --git a/arch/blackfin/kernel/Makefile b/arch/blackfin/kernel/Makefile index d550b24d9e9b..1f88edd4572a 100644 --- a/arch/blackfin/kernel/Makefile +++ b/arch/blackfin/kernel/Makefile | |||
@@ -21,6 +21,7 @@ obj-$(CONFIG_FUNCTION_TRACER) += ftrace-entry.o | |||
21 | obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o | 21 | obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o |
22 | CFLAGS_REMOVE_ftrace.o = -pg | 22 | CFLAGS_REMOVE_ftrace.o = -pg |
23 | 23 | ||
24 | obj-$(CONFIG_HAVE_PWM) += pwm.o | ||
24 | obj-$(CONFIG_IPIPE) += ipipe.o | 25 | obj-$(CONFIG_IPIPE) += ipipe.o |
25 | obj-$(CONFIG_BFIN_GPTIMERS) += gptimers.o | 26 | obj-$(CONFIG_BFIN_GPTIMERS) += gptimers.o |
26 | obj-$(CONFIG_CPLB_INFO) += cplbinfo.o | 27 | obj-$(CONFIG_CPLB_INFO) += cplbinfo.o |
@@ -37,6 +38,6 @@ obj-$(CONFIG_PERF_EVENTS) += perf_event.o | |||
37 | 38 | ||
38 | # the kgdb test puts code into L2 and without linker | 39 | # the kgdb test puts code into L2 and without linker |
39 | # relaxation, we need to force long calls to/from it | 40 | # relaxation, we need to force long calls to/from it |
40 | CFLAGS_kgdb_test.o := -mlong-calls -O0 | 41 | CFLAGS_kgdb_test.o := -mlong-calls |
41 | 42 | ||
42 | obj-$(CONFIG_DEBUG_MMRS) += debug-mmrs.o | 43 | obj-$(CONFIG_DEBUG_MMRS) += debug-mmrs.o |
diff --git a/arch/blackfin/kernel/asm-offsets.c b/arch/blackfin/kernel/asm-offsets.c index bd32c09b9349..17e35465a416 100644 --- a/arch/blackfin/kernel/asm-offsets.c +++ b/arch/blackfin/kernel/asm-offsets.c | |||
@@ -138,6 +138,16 @@ int main(void) | |||
138 | DEFINE(PDA_DF_SEQSTAT, offsetof(struct blackfin_pda, seqstat_doublefault)); | 138 | DEFINE(PDA_DF_SEQSTAT, offsetof(struct blackfin_pda, seqstat_doublefault)); |
139 | DEFINE(PDA_DF_RETX, offsetof(struct blackfin_pda, retx_doublefault)); | 139 | DEFINE(PDA_DF_RETX, offsetof(struct blackfin_pda, retx_doublefault)); |
140 | #endif | 140 | #endif |
141 | |||
142 | /* PDA initial management */ | ||
143 | DEFINE(PDA_INIT_RETX, offsetof(struct blackfin_initial_pda, retx)); | ||
144 | #ifdef CONFIG_DEBUG_DOUBLEFAULT | ||
145 | DEFINE(PDA_INIT_DF_DCPLB, offsetof(struct blackfin_initial_pda, dcplb_doublefault_addr)); | ||
146 | DEFINE(PDA_INIT_DF_ICPLB, offsetof(struct blackfin_initial_pda, icplb_doublefault_addr)); | ||
147 | DEFINE(PDA_INIT_DF_SEQSTAT, offsetof(struct blackfin_initial_pda, seqstat_doublefault)); | ||
148 | DEFINE(PDA_INIT_DF_RETX, offsetof(struct blackfin_initial_pda, retx_doublefault)); | ||
149 | #endif | ||
150 | |||
141 | #ifdef CONFIG_SMP | 151 | #ifdef CONFIG_SMP |
142 | /* Inter-core lock (in L2 SRAM) */ | 152 | /* Inter-core lock (in L2 SRAM) */ |
143 | DEFINE(SIZEOF_CORELOCK, sizeof(struct corelock_slot)); | 153 | DEFINE(SIZEOF_CORELOCK, sizeof(struct corelock_slot)); |
diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c index bcf8cf6fe412..02796b88443d 100644 --- a/arch/blackfin/kernel/bfin_gpio.c +++ b/arch/blackfin/kernel/bfin_gpio.c | |||
@@ -118,6 +118,9 @@ static struct str_ident { | |||
118 | 118 | ||
119 | #if defined(CONFIG_PM) | 119 | #if defined(CONFIG_PM) |
120 | static struct gpio_port_s gpio_bank_saved[GPIO_BANK_NUM]; | 120 | static struct gpio_port_s gpio_bank_saved[GPIO_BANK_NUM]; |
121 | # ifdef BF538_FAMILY | ||
122 | static unsigned short port_fer_saved[3]; | ||
123 | # endif | ||
121 | #endif | 124 | #endif |
122 | 125 | ||
123 | static void gpio_error(unsigned gpio) | 126 | static void gpio_error(unsigned gpio) |
@@ -604,6 +607,11 @@ void bfin_gpio_pm_hibernate_suspend(void) | |||
604 | { | 607 | { |
605 | int i, bank; | 608 | int i, bank; |
606 | 609 | ||
610 | #ifdef BF538_FAMILY | ||
611 | for (i = 0; i < ARRAY_SIZE(port_fer_saved); ++i) | ||
612 | port_fer_saved[i] = *port_fer[i]; | ||
613 | #endif | ||
614 | |||
607 | for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) { | 615 | for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) { |
608 | bank = gpio_bank(i); | 616 | bank = gpio_bank(i); |
609 | 617 | ||
@@ -625,6 +633,10 @@ void bfin_gpio_pm_hibernate_suspend(void) | |||
625 | gpio_bank_saved[bank].maska = gpio_array[bank]->maska; | 633 | gpio_bank_saved[bank].maska = gpio_array[bank]->maska; |
626 | } | 634 | } |
627 | 635 | ||
636 | #ifdef BFIN_SPECIAL_GPIO_BANKS | ||
637 | bfin_special_gpio_pm_hibernate_suspend(); | ||
638 | #endif | ||
639 | |||
628 | AWA_DUMMY_READ(maska); | 640 | AWA_DUMMY_READ(maska); |
629 | } | 641 | } |
630 | 642 | ||
@@ -632,6 +644,11 @@ void bfin_gpio_pm_hibernate_restore(void) | |||
632 | { | 644 | { |
633 | int i, bank; | 645 | int i, bank; |
634 | 646 | ||
647 | #ifdef BF538_FAMILY | ||
648 | for (i = 0; i < ARRAY_SIZE(port_fer_saved); ++i) | ||
649 | *port_fer[i] = port_fer_saved[i]; | ||
650 | #endif | ||
651 | |||
635 | for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) { | 652 | for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) { |
636 | bank = gpio_bank(i); | 653 | bank = gpio_bank(i); |
637 | 654 | ||
@@ -653,6 +670,11 @@ void bfin_gpio_pm_hibernate_restore(void) | |||
653 | gpio_array[bank]->both = gpio_bank_saved[bank].both; | 670 | gpio_array[bank]->both = gpio_bank_saved[bank].both; |
654 | gpio_array[bank]->maska = gpio_bank_saved[bank].maska; | 671 | gpio_array[bank]->maska = gpio_bank_saved[bank].maska; |
655 | } | 672 | } |
673 | |||
674 | #ifdef BFIN_SPECIAL_GPIO_BANKS | ||
675 | bfin_special_gpio_pm_hibernate_restore(); | ||
676 | #endif | ||
677 | |||
656 | AWA_DUMMY_READ(maska); | 678 | AWA_DUMMY_READ(maska); |
657 | } | 679 | } |
658 | 680 | ||
@@ -691,9 +713,9 @@ void bfin_gpio_pm_hibernate_restore(void) | |||
691 | gpio_array[bank]->port_mux = gpio_bank_saved[bank].mux; | 713 | gpio_array[bank]->port_mux = gpio_bank_saved[bank].mux; |
692 | gpio_array[bank]->port_fer = gpio_bank_saved[bank].fer; | 714 | gpio_array[bank]->port_fer = gpio_bank_saved[bank].fer; |
693 | gpio_array[bank]->inen = gpio_bank_saved[bank].inen; | 715 | gpio_array[bank]->inen = gpio_bank_saved[bank].inen; |
694 | gpio_array[bank]->dir_set = gpio_bank_saved[bank].dir; | ||
695 | gpio_array[bank]->data_set = gpio_bank_saved[bank].data | 716 | gpio_array[bank]->data_set = gpio_bank_saved[bank].data |
696 | | gpio_bank_saved[bank].dir; | 717 | & gpio_bank_saved[bank].dir; |
718 | gpio_array[bank]->dir_set = gpio_bank_saved[bank].dir; | ||
697 | } | 719 | } |
698 | } | 720 | } |
699 | #endif | 721 | #endif |
diff --git a/arch/blackfin/kernel/debug-mmrs.c b/arch/blackfin/kernel/debug-mmrs.c index fce4807ceef9..92f664826281 100644 --- a/arch/blackfin/kernel/debug-mmrs.c +++ b/arch/blackfin/kernel/debug-mmrs.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #define PORT_MUX BFIN_PORT_MUX | 27 | #define PORT_MUX BFIN_PORT_MUX |
28 | #endif | 28 | #endif |
29 | 29 | ||
30 | #define _d(name, bits, addr, perms) debugfs_create_x##bits(name, perms, parent, (u##bits *)addr) | 30 | #define _d(name, bits, addr, perms) debugfs_create_x##bits(name, perms, parent, (u##bits *)(addr)) |
31 | #define d(name, bits, addr) _d(name, bits, addr, S_IRUSR|S_IWUSR) | 31 | #define d(name, bits, addr) _d(name, bits, addr, S_IRUSR|S_IWUSR) |
32 | #define d_RO(name, bits, addr) _d(name, bits, addr, S_IRUSR) | 32 | #define d_RO(name, bits, addr) _d(name, bits, addr, S_IRUSR) |
33 | #define d_WO(name, bits, addr) _d(name, bits, addr, S_IWUSR) | 33 | #define d_WO(name, bits, addr) _d(name, bits, addr, S_IWUSR) |
@@ -223,7 +223,8 @@ bfin_debug_mmrs_dma(struct dentry *parent, unsigned long base, int num, char mdm | |||
223 | __DMA(CURR_DESC_PTR, curr_desc_ptr); | 223 | __DMA(CURR_DESC_PTR, curr_desc_ptr); |
224 | __DMA(CURR_ADDR, curr_addr); | 224 | __DMA(CURR_ADDR, curr_addr); |
225 | __DMA(IRQ_STATUS, irq_status); | 225 | __DMA(IRQ_STATUS, irq_status); |
226 | __DMA(PERIPHERAL_MAP, peripheral_map); | 226 | if (strcmp(pfx, "IMDMA") != 0) |
227 | __DMA(PERIPHERAL_MAP, peripheral_map); | ||
227 | __DMA(CURR_X_COUNT, curr_x_count); | 228 | __DMA(CURR_X_COUNT, curr_x_count); |
228 | __DMA(CURR_Y_COUNT, curr_y_count); | 229 | __DMA(CURR_Y_COUNT, curr_y_count); |
229 | } | 230 | } |
@@ -277,6 +278,32 @@ bfin_debug_mmrs_gptimer(struct dentry *parent, unsigned long base, int num) | |||
277 | } | 278 | } |
278 | #define GPTIMER(num) bfin_debug_mmrs_gptimer(parent, TIMER##num##_CONFIG, num) | 279 | #define GPTIMER(num) bfin_debug_mmrs_gptimer(parent, TIMER##num##_CONFIG, num) |
279 | 280 | ||
281 | #define GPTIMER_GROUP_OFF(mmr) REGS_OFF(gptimer_group, mmr) | ||
282 | #define __GPTIMER_GROUP(uname, lname) __REGS(gptimer_group, #uname, lname) | ||
283 | static void __init __maybe_unused | ||
284 | bfin_debug_mmrs_gptimer_group(struct dentry *parent, unsigned long base, int num) | ||
285 | { | ||
286 | char buf[32], *_buf; | ||
287 | |||
288 | if (num == -1) { | ||
289 | _buf = buf + sprintf(buf, "TIMER_"); | ||
290 | __GPTIMER_GROUP(ENABLE, enable); | ||
291 | __GPTIMER_GROUP(DISABLE, disable); | ||
292 | __GPTIMER_GROUP(STATUS, status); | ||
293 | } else { | ||
294 | /* These MMRs are a bit odd as the group # is a suffix */ | ||
295 | _buf = buf + sprintf(buf, "TIMER_ENABLE%i", num); | ||
296 | d(buf, 16, base + GPTIMER_GROUP_OFF(enable)); | ||
297 | |||
298 | _buf = buf + sprintf(buf, "TIMER_DISABLE%i", num); | ||
299 | d(buf, 16, base + GPTIMER_GROUP_OFF(disable)); | ||
300 | |||
301 | _buf = buf + sprintf(buf, "TIMER_STATUS%i", num); | ||
302 | d(buf, 32, base + GPTIMER_GROUP_OFF(status)); | ||
303 | } | ||
304 | } | ||
305 | #define GPTIMER_GROUP(mmr, num) bfin_debug_mmrs_gptimer_group(parent, mmr, num) | ||
306 | |||
280 | /* | 307 | /* |
281 | * Handshake MDMA | 308 | * Handshake MDMA |
282 | */ | 309 | */ |
@@ -296,6 +323,29 @@ bfin_debug_mmrs_hmdma(struct dentry *parent, unsigned long base, int num) | |||
296 | #define HMDMA(num) bfin_debug_mmrs_hmdma(parent, HMDMA##num##_CONTROL, num) | 323 | #define HMDMA(num) bfin_debug_mmrs_hmdma(parent, HMDMA##num##_CONTROL, num) |
297 | 324 | ||
298 | /* | 325 | /* |
326 | * Peripheral Interrupts (PINT/GPIO) | ||
327 | */ | ||
328 | #ifdef PINT0_MASK_SET | ||
329 | #define __PINT(uname, lname) __REGS(pint, #uname, lname) | ||
330 | static void __init __maybe_unused | ||
331 | bfin_debug_mmrs_pint(struct dentry *parent, unsigned long base, int num) | ||
332 | { | ||
333 | char buf[32], *_buf = REGS_STR_PFX(buf, PINT, num); | ||
334 | __PINT(MASK_SET, mask_set); | ||
335 | __PINT(MASK_CLEAR, mask_clear); | ||
336 | __PINT(REQUEST, request); | ||
337 | __PINT(ASSIGN, assign); | ||
338 | __PINT(EDGE_SET, edge_set); | ||
339 | __PINT(EDGE_CLEAR, edge_clear); | ||
340 | __PINT(INVERT_SET, invert_set); | ||
341 | __PINT(INVERT_CLEAR, invert_clear); | ||
342 | __PINT(PINSTATE, pinstate); | ||
343 | __PINT(LATCH, latch); | ||
344 | } | ||
345 | #define PINT(num) bfin_debug_mmrs_pint(parent, PINT##num##_MASK_SET, num) | ||
346 | #endif | ||
347 | |||
348 | /* | ||
299 | * Port/GPIO | 349 | * Port/GPIO |
300 | */ | 350 | */ |
301 | #define bfin_gpio_regs gpio_port_t | 351 | #define bfin_gpio_regs gpio_port_t |
@@ -747,7 +797,7 @@ static int __init bfin_debug_mmrs_init(void) | |||
747 | #endif | 797 | #endif |
748 | 798 | ||
749 | parent = debugfs_create_dir("dmac", top); | 799 | parent = debugfs_create_dir("dmac", top); |
750 | #ifdef DMA_TC_CNT | 800 | #ifdef DMAC_TC_CNT |
751 | D16(DMAC_TC_CNT); | 801 | D16(DMAC_TC_CNT); |
752 | D16(DMAC_TC_PER); | 802 | D16(DMAC_TC_PER); |
753 | #endif | 803 | #endif |
@@ -1005,29 +1055,19 @@ static int __init bfin_debug_mmrs_init(void) | |||
1005 | #endif | 1055 | #endif |
1006 | 1056 | ||
1007 | parent = debugfs_create_dir("gptimer", top); | 1057 | parent = debugfs_create_dir("gptimer", top); |
1008 | #ifdef TIMER_DISABLE | 1058 | #ifdef TIMER_ENABLE |
1009 | D16(TIMER_DISABLE); | 1059 | GPTIMER_GROUP(TIMER_ENABLE, -1); |
1010 | D16(TIMER_ENABLE); | ||
1011 | D32(TIMER_STATUS); | ||
1012 | #endif | 1060 | #endif |
1013 | #ifdef TIMER_DISABLE0 | 1061 | #ifdef TIMER_ENABLE0 |
1014 | D16(TIMER_DISABLE0); | 1062 | GPTIMER_GROUP(TIMER_ENABLE0, 0); |
1015 | D16(TIMER_ENABLE0); | ||
1016 | D32(TIMER_STATUS0); | ||
1017 | #endif | 1063 | #endif |
1018 | #ifdef TIMER_DISABLE1 | 1064 | #ifdef TIMER_ENABLE1 |
1019 | D16(TIMER_DISABLE1); | 1065 | GPTIMER_GROUP(TIMER_ENABLE1, 1); |
1020 | D16(TIMER_ENABLE1); | ||
1021 | D32(TIMER_STATUS1); | ||
1022 | #endif | 1066 | #endif |
1023 | /* XXX: Should convert BF561 MMR names */ | 1067 | /* XXX: Should convert BF561 MMR names */ |
1024 | #ifdef TMRS4_DISABLE | 1068 | #ifdef TMRS4_DISABLE |
1025 | D16(TMRS4_DISABLE); | 1069 | GPTIMER_GROUP(TMRS4_ENABLE, 0); |
1026 | D16(TMRS4_ENABLE); | 1070 | GPTIMER_GROUP(TMRS8_ENABLE, 1); |
1027 | D32(TMRS4_STATUS); | ||
1028 | D16(TMRS8_DISABLE); | ||
1029 | D16(TMRS8_ENABLE); | ||
1030 | D32(TMRS8_STATUS); | ||
1031 | #endif | 1071 | #endif |
1032 | GPTIMER(0); | 1072 | GPTIMER(0); |
1033 | GPTIMER(1); | 1073 | GPTIMER(1); |
@@ -1253,6 +1293,14 @@ static int __init bfin_debug_mmrs_init(void) | |||
1253 | D32(OTP_DATA3); | 1293 | D32(OTP_DATA3); |
1254 | #endif | 1294 | #endif |
1255 | 1295 | ||
1296 | #ifdef PINT0_MASK_SET | ||
1297 | parent = debugfs_create_dir("pint", top); | ||
1298 | PINT(0); | ||
1299 | PINT(1); | ||
1300 | PINT(2); | ||
1301 | PINT(3); | ||
1302 | #endif | ||
1303 | |||
1256 | #ifdef PIXC_CTL | 1304 | #ifdef PIXC_CTL |
1257 | parent = debugfs_create_dir("pixc", top); | 1305 | parent = debugfs_create_dir("pixc", top); |
1258 | D16(PIXC_CTL); | 1306 | D16(PIXC_CTL); |
@@ -1816,7 +1864,6 @@ static int __init bfin_debug_mmrs_init(void) | |||
1816 | { | 1864 | { |
1817 | int num; | 1865 | int num; |
1818 | unsigned long base; | 1866 | unsigned long base; |
1819 | char *_buf, buf[32]; | ||
1820 | 1867 | ||
1821 | base = PORTA_FER; | 1868 | base = PORTA_FER; |
1822 | for (num = 0; num < 10; ++num) { | 1869 | for (num = 0; num < 10; ++num) { |
@@ -1824,24 +1871,6 @@ static int __init bfin_debug_mmrs_init(void) | |||
1824 | base += sizeof(struct bfin_gpio_regs); | 1871 | base += sizeof(struct bfin_gpio_regs); |
1825 | } | 1872 | } |
1826 | 1873 | ||
1827 | #define __PINT(uname, lname) __REGS(pint, #uname, lname) | ||
1828 | parent = debugfs_create_dir("pint", top); | ||
1829 | base = PINT0_MASK_SET; | ||
1830 | for (num = 0; num < 4; ++num) { | ||
1831 | _buf = REGS_STR_PFX(buf, PINT, num); | ||
1832 | __PINT(MASK_SET, mask_set); | ||
1833 | __PINT(MASK_CLEAR, mask_clear); | ||
1834 | __PINT(IRQ, irq); | ||
1835 | __PINT(ASSIGN, assign); | ||
1836 | __PINT(EDGE_SET, edge_set); | ||
1837 | __PINT(EDGE_CLEAR, edge_clear); | ||
1838 | __PINT(INVERT_SET, invert_set); | ||
1839 | __PINT(INVERT_CLEAR, invert_clear); | ||
1840 | __PINT(PINSTATE, pinstate); | ||
1841 | __PINT(LATCH, latch); | ||
1842 | base += sizeof(struct bfin_pint_regs); | ||
1843 | } | ||
1844 | |||
1845 | } | 1874 | } |
1846 | #endif /* BF54x */ | 1875 | #endif /* BF54x */ |
1847 | 1876 | ||
diff --git a/arch/blackfin/kernel/dma-mapping.c b/arch/blackfin/kernel/dma-mapping.c index 04ddcfeb7981..f0d1118f1825 100644 --- a/arch/blackfin/kernel/dma-mapping.c +++ b/arch/blackfin/kernel/dma-mapping.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/spinlock.h> | 12 | #include <linux/spinlock.h> |
13 | #include <linux/dma-mapping.h> | 13 | #include <linux/dma-mapping.h> |
14 | #include <linux/scatterlist.h> | 14 | #include <linux/scatterlist.h> |
15 | #include <linux/export.h> | ||
15 | 16 | ||
16 | static spinlock_t dma_page_lock; | 17 | static spinlock_t dma_page_lock; |
17 | static unsigned long *dma_page; | 18 | static unsigned long *dma_page; |
diff --git a/arch/blackfin/kernel/ftrace.c b/arch/blackfin/kernel/ftrace.c index 48808a12b427..9277905b82cf 100644 --- a/arch/blackfin/kernel/ftrace.c +++ b/arch/blackfin/kernel/ftrace.c | |||
@@ -9,7 +9,7 @@ | |||
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/sched.h> | 10 | #include <linux/sched.h> |
11 | #include <linux/uaccess.h> | 11 | #include <linux/uaccess.h> |
12 | #include <asm/atomic.h> | 12 | #include <linux/atomic.h> |
13 | #include <asm/cacheflush.h> | 13 | #include <asm/cacheflush.h> |
14 | 14 | ||
15 | #ifdef CONFIG_DYNAMIC_FTRACE | 15 | #ifdef CONFIG_DYNAMIC_FTRACE |
diff --git a/arch/blackfin/kernel/gptimers.c b/arch/blackfin/kernel/gptimers.c index 8b81dc04488a..06459f4bf43a 100644 --- a/arch/blackfin/kernel/gptimers.c +++ b/arch/blackfin/kernel/gptimers.c | |||
@@ -25,49 +25,33 @@ | |||
25 | 25 | ||
26 | #define BFIN_TIMER_NUM_GROUP (BFIN_TIMER_OCTET(MAX_BLACKFIN_GPTIMERS - 1) + 1) | 26 | #define BFIN_TIMER_NUM_GROUP (BFIN_TIMER_OCTET(MAX_BLACKFIN_GPTIMERS - 1) + 1) |
27 | 27 | ||
28 | typedef struct { | 28 | static struct bfin_gptimer_regs * const timer_regs[MAX_BLACKFIN_GPTIMERS] = |
29 | uint16_t config; | ||
30 | uint16_t __pad; | ||
31 | uint32_t counter; | ||
32 | uint32_t period; | ||
33 | uint32_t width; | ||
34 | } GPTIMER_timer_regs; | ||
35 | |||
36 | typedef struct { | ||
37 | uint16_t enable; | ||
38 | uint16_t __pad0; | ||
39 | uint16_t disable; | ||
40 | uint16_t __pad1; | ||
41 | uint32_t status; | ||
42 | } GPTIMER_group_regs; | ||
43 | |||
44 | static volatile GPTIMER_timer_regs *const timer_regs[MAX_BLACKFIN_GPTIMERS] = | ||
45 | { | 29 | { |
46 | (GPTIMER_timer_regs *)TIMER0_CONFIG, | 30 | (void *)TIMER0_CONFIG, |
47 | (GPTIMER_timer_regs *)TIMER1_CONFIG, | 31 | (void *)TIMER1_CONFIG, |
48 | (GPTIMER_timer_regs *)TIMER2_CONFIG, | 32 | (void *)TIMER2_CONFIG, |
49 | #if (MAX_BLACKFIN_GPTIMERS > 3) | 33 | #if (MAX_BLACKFIN_GPTIMERS > 3) |
50 | (GPTIMER_timer_regs *)TIMER3_CONFIG, | 34 | (void *)TIMER3_CONFIG, |
51 | (GPTIMER_timer_regs *)TIMER4_CONFIG, | 35 | (void *)TIMER4_CONFIG, |
52 | (GPTIMER_timer_regs *)TIMER5_CONFIG, | 36 | (void *)TIMER5_CONFIG, |
53 | (GPTIMER_timer_regs *)TIMER6_CONFIG, | 37 | (void *)TIMER6_CONFIG, |
54 | (GPTIMER_timer_regs *)TIMER7_CONFIG, | 38 | (void *)TIMER7_CONFIG, |
55 | # if (MAX_BLACKFIN_GPTIMERS > 8) | 39 | # if (MAX_BLACKFIN_GPTIMERS > 8) |
56 | (GPTIMER_timer_regs *)TIMER8_CONFIG, | 40 | (void *)TIMER8_CONFIG, |
57 | (GPTIMER_timer_regs *)TIMER9_CONFIG, | 41 | (void *)TIMER9_CONFIG, |
58 | (GPTIMER_timer_regs *)TIMER10_CONFIG, | 42 | (void *)TIMER10_CONFIG, |
59 | # if (MAX_BLACKFIN_GPTIMERS > 11) | 43 | # if (MAX_BLACKFIN_GPTIMERS > 11) |
60 | (GPTIMER_timer_regs *)TIMER11_CONFIG, | 44 | (void *)TIMER11_CONFIG, |
61 | # endif | 45 | # endif |
62 | # endif | 46 | # endif |
63 | #endif | 47 | #endif |
64 | }; | 48 | }; |
65 | 49 | ||
66 | static volatile GPTIMER_group_regs *const group_regs[BFIN_TIMER_NUM_GROUP] = | 50 | static struct bfin_gptimer_group_regs * const group_regs[BFIN_TIMER_NUM_GROUP] = |
67 | { | 51 | { |
68 | (GPTIMER_group_regs *)TIMER0_GROUP_REG, | 52 | (void *)TIMER0_GROUP_REG, |
69 | #if (MAX_BLACKFIN_GPTIMERS > 8) | 53 | #if (MAX_BLACKFIN_GPTIMERS > 8) |
70 | (GPTIMER_group_regs *)TIMER8_GROUP_REG, | 54 | (void *)TIMER8_GROUP_REG, |
71 | #endif | 55 | #endif |
72 | }; | 56 | }; |
73 | 57 | ||
@@ -140,7 +124,7 @@ static uint32_t const timil_mask[MAX_BLACKFIN_GPTIMERS] = | |||
140 | void set_gptimer_pwidth(unsigned int timer_id, uint32_t value) | 124 | void set_gptimer_pwidth(unsigned int timer_id, uint32_t value) |
141 | { | 125 | { |
142 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); | 126 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); |
143 | timer_regs[timer_id]->width = value; | 127 | bfin_write(&timer_regs[timer_id]->width, value); |
144 | SSYNC(); | 128 | SSYNC(); |
145 | } | 129 | } |
146 | EXPORT_SYMBOL(set_gptimer_pwidth); | 130 | EXPORT_SYMBOL(set_gptimer_pwidth); |
@@ -148,14 +132,14 @@ EXPORT_SYMBOL(set_gptimer_pwidth); | |||
148 | uint32_t get_gptimer_pwidth(unsigned int timer_id) | 132 | uint32_t get_gptimer_pwidth(unsigned int timer_id) |
149 | { | 133 | { |
150 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); | 134 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); |
151 | return timer_regs[timer_id]->width; | 135 | return bfin_read(&timer_regs[timer_id]->width); |
152 | } | 136 | } |
153 | EXPORT_SYMBOL(get_gptimer_pwidth); | 137 | EXPORT_SYMBOL(get_gptimer_pwidth); |
154 | 138 | ||
155 | void set_gptimer_period(unsigned int timer_id, uint32_t period) | 139 | void set_gptimer_period(unsigned int timer_id, uint32_t period) |
156 | { | 140 | { |
157 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); | 141 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); |
158 | timer_regs[timer_id]->period = period; | 142 | bfin_write(&timer_regs[timer_id]->period, period); |
159 | SSYNC(); | 143 | SSYNC(); |
160 | } | 144 | } |
161 | EXPORT_SYMBOL(set_gptimer_period); | 145 | EXPORT_SYMBOL(set_gptimer_period); |
@@ -163,71 +147,76 @@ EXPORT_SYMBOL(set_gptimer_period); | |||
163 | uint32_t get_gptimer_period(unsigned int timer_id) | 147 | uint32_t get_gptimer_period(unsigned int timer_id) |
164 | { | 148 | { |
165 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); | 149 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); |
166 | return timer_regs[timer_id]->period; | 150 | return bfin_read(&timer_regs[timer_id]->period); |
167 | } | 151 | } |
168 | EXPORT_SYMBOL(get_gptimer_period); | 152 | EXPORT_SYMBOL(get_gptimer_period); |
169 | 153 | ||
170 | uint32_t get_gptimer_count(unsigned int timer_id) | 154 | uint32_t get_gptimer_count(unsigned int timer_id) |
171 | { | 155 | { |
172 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); | 156 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); |
173 | return timer_regs[timer_id]->counter; | 157 | return bfin_read(&timer_regs[timer_id]->counter); |
174 | } | 158 | } |
175 | EXPORT_SYMBOL(get_gptimer_count); | 159 | EXPORT_SYMBOL(get_gptimer_count); |
176 | 160 | ||
177 | uint32_t get_gptimer_status(unsigned int group) | 161 | uint32_t get_gptimer_status(unsigned int group) |
178 | { | 162 | { |
179 | tassert(group < BFIN_TIMER_NUM_GROUP); | 163 | tassert(group < BFIN_TIMER_NUM_GROUP); |
180 | return group_regs[group]->status; | 164 | return bfin_read(&group_regs[group]->status); |
181 | } | 165 | } |
182 | EXPORT_SYMBOL(get_gptimer_status); | 166 | EXPORT_SYMBOL(get_gptimer_status); |
183 | 167 | ||
184 | void set_gptimer_status(unsigned int group, uint32_t value) | 168 | void set_gptimer_status(unsigned int group, uint32_t value) |
185 | { | 169 | { |
186 | tassert(group < BFIN_TIMER_NUM_GROUP); | 170 | tassert(group < BFIN_TIMER_NUM_GROUP); |
187 | group_regs[group]->status = value; | 171 | bfin_write(&group_regs[group]->status, value); |
188 | SSYNC(); | 172 | SSYNC(); |
189 | } | 173 | } |
190 | EXPORT_SYMBOL(set_gptimer_status); | 174 | EXPORT_SYMBOL(set_gptimer_status); |
191 | 175 | ||
176 | static uint32_t read_gptimer_status(unsigned int timer_id) | ||
177 | { | ||
178 | return bfin_read(&group_regs[BFIN_TIMER_OCTET(timer_id)]->status); | ||
179 | } | ||
180 | |||
192 | int get_gptimer_intr(unsigned int timer_id) | 181 | int get_gptimer_intr(unsigned int timer_id) |
193 | { | 182 | { |
194 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); | 183 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); |
195 | return !!(group_regs[BFIN_TIMER_OCTET(timer_id)]->status & timil_mask[timer_id]); | 184 | return !!(read_gptimer_status(timer_id) & timil_mask[timer_id]); |
196 | } | 185 | } |
197 | EXPORT_SYMBOL(get_gptimer_intr); | 186 | EXPORT_SYMBOL(get_gptimer_intr); |
198 | 187 | ||
199 | void clear_gptimer_intr(unsigned int timer_id) | 188 | void clear_gptimer_intr(unsigned int timer_id) |
200 | { | 189 | { |
201 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); | 190 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); |
202 | group_regs[BFIN_TIMER_OCTET(timer_id)]->status = timil_mask[timer_id]; | 191 | bfin_write(&group_regs[BFIN_TIMER_OCTET(timer_id)]->status, timil_mask[timer_id]); |
203 | } | 192 | } |
204 | EXPORT_SYMBOL(clear_gptimer_intr); | 193 | EXPORT_SYMBOL(clear_gptimer_intr); |
205 | 194 | ||
206 | int get_gptimer_over(unsigned int timer_id) | 195 | int get_gptimer_over(unsigned int timer_id) |
207 | { | 196 | { |
208 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); | 197 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); |
209 | return !!(group_regs[BFIN_TIMER_OCTET(timer_id)]->status & tovf_mask[timer_id]); | 198 | return !!(read_gptimer_status(timer_id) & tovf_mask[timer_id]); |
210 | } | 199 | } |
211 | EXPORT_SYMBOL(get_gptimer_over); | 200 | EXPORT_SYMBOL(get_gptimer_over); |
212 | 201 | ||
213 | void clear_gptimer_over(unsigned int timer_id) | 202 | void clear_gptimer_over(unsigned int timer_id) |
214 | { | 203 | { |
215 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); | 204 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); |
216 | group_regs[BFIN_TIMER_OCTET(timer_id)]->status = tovf_mask[timer_id]; | 205 | bfin_write(&group_regs[BFIN_TIMER_OCTET(timer_id)]->status, tovf_mask[timer_id]); |
217 | } | 206 | } |
218 | EXPORT_SYMBOL(clear_gptimer_over); | 207 | EXPORT_SYMBOL(clear_gptimer_over); |
219 | 208 | ||
220 | int get_gptimer_run(unsigned int timer_id) | 209 | int get_gptimer_run(unsigned int timer_id) |
221 | { | 210 | { |
222 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); | 211 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); |
223 | return !!(group_regs[BFIN_TIMER_OCTET(timer_id)]->status & trun_mask[timer_id]); | 212 | return !!(read_gptimer_status(timer_id) & trun_mask[timer_id]); |
224 | } | 213 | } |
225 | EXPORT_SYMBOL(get_gptimer_run); | 214 | EXPORT_SYMBOL(get_gptimer_run); |
226 | 215 | ||
227 | void set_gptimer_config(unsigned int timer_id, uint16_t config) | 216 | void set_gptimer_config(unsigned int timer_id, uint16_t config) |
228 | { | 217 | { |
229 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); | 218 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); |
230 | timer_regs[timer_id]->config = config; | 219 | bfin_write(&timer_regs[timer_id]->config, config); |
231 | SSYNC(); | 220 | SSYNC(); |
232 | } | 221 | } |
233 | EXPORT_SYMBOL(set_gptimer_config); | 222 | EXPORT_SYMBOL(set_gptimer_config); |
@@ -235,7 +224,7 @@ EXPORT_SYMBOL(set_gptimer_config); | |||
235 | uint16_t get_gptimer_config(unsigned int timer_id) | 224 | uint16_t get_gptimer_config(unsigned int timer_id) |
236 | { | 225 | { |
237 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); | 226 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); |
238 | return timer_regs[timer_id]->config; | 227 | return bfin_read(&timer_regs[timer_id]->config); |
239 | } | 228 | } |
240 | EXPORT_SYMBOL(get_gptimer_config); | 229 | EXPORT_SYMBOL(get_gptimer_config); |
241 | 230 | ||
@@ -244,7 +233,7 @@ void enable_gptimers(uint16_t mask) | |||
244 | int i; | 233 | int i; |
245 | tassert((mask & ~BLACKFIN_GPTIMER_IDMASK) == 0); | 234 | tassert((mask & ~BLACKFIN_GPTIMER_IDMASK) == 0); |
246 | for (i = 0; i < BFIN_TIMER_NUM_GROUP; ++i) { | 235 | for (i = 0; i < BFIN_TIMER_NUM_GROUP; ++i) { |
247 | group_regs[i]->enable = mask & 0xFF; | 236 | bfin_write(&group_regs[i]->enable, mask & 0xFF); |
248 | mask >>= 8; | 237 | mask >>= 8; |
249 | } | 238 | } |
250 | SSYNC(); | 239 | SSYNC(); |
@@ -257,7 +246,7 @@ static void _disable_gptimers(uint16_t mask) | |||
257 | uint16_t m = mask; | 246 | uint16_t m = mask; |
258 | tassert((mask & ~BLACKFIN_GPTIMER_IDMASK) == 0); | 247 | tassert((mask & ~BLACKFIN_GPTIMER_IDMASK) == 0); |
259 | for (i = 0; i < BFIN_TIMER_NUM_GROUP; ++i) { | 248 | for (i = 0; i < BFIN_TIMER_NUM_GROUP; ++i) { |
260 | group_regs[i]->disable = m & 0xFF; | 249 | bfin_write(&group_regs[i]->disable, m & 0xFF); |
261 | m >>= 8; | 250 | m >>= 8; |
262 | } | 251 | } |
263 | } | 252 | } |
@@ -268,7 +257,7 @@ void disable_gptimers(uint16_t mask) | |||
268 | _disable_gptimers(mask); | 257 | _disable_gptimers(mask); |
269 | for (i = 0; i < MAX_BLACKFIN_GPTIMERS; ++i) | 258 | for (i = 0; i < MAX_BLACKFIN_GPTIMERS; ++i) |
270 | if (mask & (1 << i)) | 259 | if (mask & (1 << i)) |
271 | group_regs[BFIN_TIMER_OCTET(i)]->status = trun_mask[i]; | 260 | bfin_write(&group_regs[BFIN_TIMER_OCTET(i)]->status, trun_mask[i]); |
272 | SSYNC(); | 261 | SSYNC(); |
273 | } | 262 | } |
274 | EXPORT_SYMBOL(disable_gptimers); | 263 | EXPORT_SYMBOL(disable_gptimers); |
@@ -283,7 +272,7 @@ EXPORT_SYMBOL(disable_gptimers_sync); | |||
283 | void set_gptimer_pulse_hi(unsigned int timer_id) | 272 | void set_gptimer_pulse_hi(unsigned int timer_id) |
284 | { | 273 | { |
285 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); | 274 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); |
286 | timer_regs[timer_id]->config |= TIMER_PULSE_HI; | 275 | bfin_write_or(&timer_regs[timer_id]->config, TIMER_PULSE_HI); |
287 | SSYNC(); | 276 | SSYNC(); |
288 | } | 277 | } |
289 | EXPORT_SYMBOL(set_gptimer_pulse_hi); | 278 | EXPORT_SYMBOL(set_gptimer_pulse_hi); |
@@ -291,7 +280,7 @@ EXPORT_SYMBOL(set_gptimer_pulse_hi); | |||
291 | void clear_gptimer_pulse_hi(unsigned int timer_id) | 280 | void clear_gptimer_pulse_hi(unsigned int timer_id) |
292 | { | 281 | { |
293 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); | 282 | tassert(timer_id < MAX_BLACKFIN_GPTIMERS); |
294 | timer_regs[timer_id]->config &= ~TIMER_PULSE_HI; | 283 | bfin_write_and(&timer_regs[timer_id]->config, ~TIMER_PULSE_HI); |
295 | SSYNC(); | 284 | SSYNC(); |
296 | } | 285 | } |
297 | EXPORT_SYMBOL(clear_gptimer_pulse_hi); | 286 | EXPORT_SYMBOL(clear_gptimer_pulse_hi); |
@@ -301,7 +290,7 @@ uint16_t get_enabled_gptimers(void) | |||
301 | int i; | 290 | int i; |
302 | uint16_t result = 0; | 291 | uint16_t result = 0; |
303 | for (i = 0; i < BFIN_TIMER_NUM_GROUP; ++i) | 292 | for (i = 0; i < BFIN_TIMER_NUM_GROUP; ++i) |
304 | result |= (group_regs[i]->enable << (i << 3)); | 293 | result |= (bfin_read(&group_regs[i]->enable) << (i << 3)); |
305 | return result; | 294 | return result; |
306 | } | 295 | } |
307 | EXPORT_SYMBOL(get_enabled_gptimers); | 296 | EXPORT_SYMBOL(get_enabled_gptimers); |
diff --git a/arch/blackfin/kernel/ipipe.c b/arch/blackfin/kernel/ipipe.c index 486426f8a0d7..dbe11220cc53 100644 --- a/arch/blackfin/kernel/ipipe.c +++ b/arch/blackfin/kernel/ipipe.c | |||
@@ -32,7 +32,7 @@ | |||
32 | #include <linux/unistd.h> | 32 | #include <linux/unistd.h> |
33 | #include <linux/io.h> | 33 | #include <linux/io.h> |
34 | #include <asm/system.h> | 34 | #include <asm/system.h> |
35 | #include <asm/atomic.h> | 35 | #include <linux/atomic.h> |
36 | #include <asm/irq_handler.h> | 36 | #include <asm/irq_handler.h> |
37 | 37 | ||
38 | DEFINE_PER_CPU(struct pt_regs, __ipipe_tick_regs); | 38 | DEFINE_PER_CPU(struct pt_regs, __ipipe_tick_regs); |
diff --git a/arch/blackfin/kernel/kgdb_test.c b/arch/blackfin/kernel/kgdb_test.c index 2a6e9dbb62a5..4a7dcfea98af 100644 --- a/arch/blackfin/kernel/kgdb_test.c +++ b/arch/blackfin/kernel/kgdb_test.c | |||
@@ -50,8 +50,7 @@ void kgdb_l2_test(void) | |||
50 | 50 | ||
51 | #endif | 51 | #endif |
52 | 52 | ||
53 | 53 | noinline int kgdb_test(char *name, int len, int count, int z) | |
54 | int kgdb_test(char *name, int len, int count, int z) | ||
55 | { | 54 | { |
56 | pr_alert("kgdb name(%d): %s, %d, %d\n", len, name, count, z); | 55 | pr_alert("kgdb name(%d): %s, %d, %d\n", len, name, count, z); |
57 | count = z; | 56 | count = z; |
diff --git a/arch/blackfin/kernel/module.c b/arch/blackfin/kernel/module.c index 35e350cad9d9..4489efc52883 100644 --- a/arch/blackfin/kernel/module.c +++ b/arch/blackfin/kernel/module.c | |||
@@ -16,19 +16,6 @@ | |||
16 | #include <asm/cacheflush.h> | 16 | #include <asm/cacheflush.h> |
17 | #include <asm/uaccess.h> | 17 | #include <asm/uaccess.h> |
18 | 18 | ||
19 | void *module_alloc(unsigned long size) | ||
20 | { | ||
21 | if (size == 0) | ||
22 | return NULL; | ||
23 | return vmalloc(size); | ||
24 | } | ||
25 | |||
26 | /* Free memory returned from module_alloc */ | ||
27 | void module_free(struct module *mod, void *module_region) | ||
28 | { | ||
29 | vfree(module_region); | ||
30 | } | ||
31 | |||
32 | /* Transfer the section to the L1 memory */ | 19 | /* Transfer the section to the L1 memory */ |
33 | int | 20 | int |
34 | module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, | 21 | module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, |
@@ -150,14 +137,6 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, | |||
150 | return 0; | 137 | return 0; |
151 | } | 138 | } |
152 | 139 | ||
153 | int | ||
154 | apply_relocate(Elf_Shdr * sechdrs, const char *strtab, | ||
155 | unsigned int symindex, unsigned int relsec, struct module *mod) | ||
156 | { | ||
157 | pr_err(".rel unsupported\n"); | ||
158 | return -ENOEXEC; | ||
159 | } | ||
160 | |||
161 | /*************************************************************************/ | 140 | /*************************************************************************/ |
162 | /* FUNCTION : apply_relocate_add */ | 141 | /* FUNCTION : apply_relocate_add */ |
163 | /* ABSTRACT : Blackfin specific relocation handling for the loadable */ | 142 | /* ABSTRACT : Blackfin specific relocation handling for the loadable */ |
diff --git a/arch/blackfin/kernel/nmi.c b/arch/blackfin/kernel/nmi.c index 679d0db35256..9919d29287dc 100644 --- a/arch/blackfin/kernel/nmi.c +++ b/arch/blackfin/kernel/nmi.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/smp.h> | 18 | #include <linux/smp.h> |
19 | #include <linux/timer.h> | 19 | #include <linux/timer.h> |
20 | #include <asm/blackfin.h> | 20 | #include <asm/blackfin.h> |
21 | #include <asm/atomic.h> | 21 | #include <linux/atomic.h> |
22 | #include <asm/cacheflush.h> | 22 | #include <asm/cacheflush.h> |
23 | #include <asm/bfin_watchdog.h> | 23 | #include <asm/bfin_watchdog.h> |
24 | 24 | ||
diff --git a/arch/blackfin/kernel/perf_event.c b/arch/blackfin/kernel/perf_event.c index 04300f29c0e7..e47d19ae3e06 100644 --- a/arch/blackfin/kernel/perf_event.c +++ b/arch/blackfin/kernel/perf_event.c | |||
@@ -24,6 +24,7 @@ | |||
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/export.h> | ||
27 | #include <linux/init.h> | 28 | #include <linux/init.h> |
28 | #include <linux/perf_event.h> | 29 | #include <linux/perf_event.h> |
29 | #include <asm/bfin_pfmon.h> | 30 | #include <asm/bfin_pfmon.h> |
diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c index 6a660fa921b5..6a80a9e9fc4a 100644 --- a/arch/blackfin/kernel/process.c +++ b/arch/blackfin/kernel/process.c | |||
@@ -140,7 +140,6 @@ EXPORT_SYMBOL(kernel_thread); | |||
140 | */ | 140 | */ |
141 | void start_thread(struct pt_regs *regs, unsigned long new_ip, unsigned long new_sp) | 141 | void start_thread(struct pt_regs *regs, unsigned long new_ip, unsigned long new_sp) |
142 | { | 142 | { |
143 | set_fs(USER_DS); | ||
144 | regs->pc = new_ip; | 143 | regs->pc = new_ip; |
145 | if (current->mm) | 144 | if (current->mm) |
146 | regs->p5 = current->mm->start_data; | 145 | regs->p5 = current->mm->start_data; |
diff --git a/arch/blackfin/kernel/pwm.c b/arch/blackfin/kernel/pwm.c new file mode 100644 index 000000000000..33f5942733bd --- /dev/null +++ b/arch/blackfin/kernel/pwm.c | |||
@@ -0,0 +1,100 @@ | |||
1 | /* | ||
2 | * Blackfin Pulse Width Modulation (PWM) core | ||
3 | * | ||
4 | * Copyright (c) 2011 Analog Devices Inc. | ||
5 | * | ||
6 | * Licensed under the GPL-2 or later. | ||
7 | */ | ||
8 | |||
9 | #include <linux/module.h> | ||
10 | #include <linux/pwm.h> | ||
11 | #include <linux/slab.h> | ||
12 | |||
13 | #include <asm/gptimers.h> | ||
14 | #include <asm/portmux.h> | ||
15 | |||
16 | struct pwm_device { | ||
17 | unsigned id; | ||
18 | unsigned short pin; | ||
19 | }; | ||
20 | |||
21 | static const unsigned short pwm_to_gptimer_per[] = { | ||
22 | P_TMR0, P_TMR1, P_TMR2, P_TMR3, P_TMR4, P_TMR5, | ||
23 | P_TMR6, P_TMR7, P_TMR8, P_TMR9, P_TMR10, P_TMR11, | ||
24 | }; | ||
25 | |||
26 | struct pwm_device *pwm_request(int pwm_id, const char *label) | ||
27 | { | ||
28 | struct pwm_device *pwm; | ||
29 | int ret; | ||
30 | |||
31 | /* XXX: pwm_id really should be unsigned */ | ||
32 | if (pwm_id < 0) | ||
33 | return NULL; | ||
34 | |||
35 | pwm = kzalloc(sizeof(*pwm), GFP_KERNEL); | ||
36 | if (!pwm) | ||
37 | return pwm; | ||
38 | |||
39 | pwm->id = pwm_id; | ||
40 | if (pwm->id >= ARRAY_SIZE(pwm_to_gptimer_per)) | ||
41 | goto err; | ||
42 | |||
43 | pwm->pin = pwm_to_gptimer_per[pwm->id]; | ||
44 | ret = peripheral_request(pwm->pin, label); | ||
45 | if (ret) | ||
46 | goto err; | ||
47 | |||
48 | return pwm; | ||
49 | err: | ||
50 | kfree(pwm); | ||
51 | return NULL; | ||
52 | } | ||
53 | EXPORT_SYMBOL(pwm_request); | ||
54 | |||
55 | void pwm_free(struct pwm_device *pwm) | ||
56 | { | ||
57 | peripheral_free(pwm->pin); | ||
58 | kfree(pwm); | ||
59 | } | ||
60 | EXPORT_SYMBOL(pwm_free); | ||
61 | |||
62 | int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns) | ||
63 | { | ||
64 | unsigned long period, duty; | ||
65 | unsigned long long val; | ||
66 | |||
67 | if (duty_ns < 0 || duty_ns > period_ns) | ||
68 | return -EINVAL; | ||
69 | |||
70 | val = (unsigned long long)get_sclk() * period_ns; | ||
71 | do_div(val, NSEC_PER_SEC); | ||
72 | period = val; | ||
73 | |||
74 | val = (unsigned long long)period * duty_ns; | ||
75 | do_div(val, period_ns); | ||
76 | duty = period - val; | ||
77 | |||
78 | if (duty >= period) | ||
79 | duty = period - 1; | ||
80 | |||
81 | set_gptimer_config(pwm->id, TIMER_MODE_PWM | TIMER_PERIOD_CNT); | ||
82 | set_gptimer_pwidth(pwm->id, duty); | ||
83 | set_gptimer_period(pwm->id, period); | ||
84 | |||
85 | return 0; | ||
86 | } | ||
87 | EXPORT_SYMBOL(pwm_config); | ||
88 | |||
89 | int pwm_enable(struct pwm_device *pwm) | ||
90 | { | ||
91 | enable_gptimer(pwm->id); | ||
92 | return 0; | ||
93 | } | ||
94 | EXPORT_SYMBOL(pwm_enable); | ||
95 | |||
96 | void pwm_disable(struct pwm_device *pwm) | ||
97 | { | ||
98 | disable_gptimer(pwm->id); | ||
99 | } | ||
100 | EXPORT_SYMBOL(pwm_disable); | ||
diff --git a/arch/blackfin/kernel/reboot.c b/arch/blackfin/kernel/reboot.c index 488bdc51aaa5..c4c0081b1996 100644 --- a/arch/blackfin/kernel/reboot.c +++ b/arch/blackfin/kernel/reboot.c | |||
@@ -54,7 +54,9 @@ static void bfin_reset(void) | |||
54 | 54 | ||
55 | /* The BF526 ROM will crash during reset */ | 55 | /* The BF526 ROM will crash during reset */ |
56 | #if defined(__ADSPBF522__) || defined(__ADSPBF524__) || defined(__ADSPBF526__) | 56 | #if defined(__ADSPBF522__) || defined(__ADSPBF524__) || defined(__ADSPBF526__) |
57 | bfin_read_SWRST(); | 57 | /* Seems to be fixed with newer parts though ... */ |
58 | if (__SILICON_REVISION__ < 1 && bfin_revid() < 1) | ||
59 | bfin_read_SWRST(); | ||
58 | #endif | 60 | #endif |
59 | 61 | ||
60 | /* Wait for the SWRST write to complete. Cannot rely on SSYNC | 62 | /* Wait for the SWRST write to complete. Cannot rely on SSYNC |
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index 536bd9d7e0cf..dfa2525a442d 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c | |||
@@ -54,8 +54,7 @@ EXPORT_SYMBOL(mtd_size); | |||
54 | #endif | 54 | #endif |
55 | 55 | ||
56 | char __initdata command_line[COMMAND_LINE_SIZE]; | 56 | char __initdata command_line[COMMAND_LINE_SIZE]; |
57 | void __initdata *init_retx, *init_saved_retx, *init_saved_seqstat, | 57 | struct blackfin_initial_pda __initdata initial_pda; |
58 | *init_saved_icplb_fault_addr, *init_saved_dcplb_fault_addr; | ||
59 | 58 | ||
60 | /* boot memmap, for parsing "memmap=" */ | 59 | /* boot memmap, for parsing "memmap=" */ |
61 | #define BFIN_MEMMAP_MAX 128 /* number of entries in bfin_memmap */ | 60 | #define BFIN_MEMMAP_MAX 128 /* number of entries in bfin_memmap */ |
@@ -957,13 +956,16 @@ void __init setup_arch(char **cmdline_p) | |||
957 | printk(KERN_EMERG "Recovering from DOUBLE FAULT event\n"); | 956 | printk(KERN_EMERG "Recovering from DOUBLE FAULT event\n"); |
958 | #ifdef CONFIG_DEBUG_DOUBLEFAULT | 957 | #ifdef CONFIG_DEBUG_DOUBLEFAULT |
959 | /* We assume the crashing kernel, and the current symbol table match */ | 958 | /* We assume the crashing kernel, and the current symbol table match */ |
960 | printk(KERN_EMERG " While handling exception (EXCAUSE = 0x%x) at %pF\n", | 959 | printk(KERN_EMERG " While handling exception (EXCAUSE = %#x) at %pF\n", |
961 | (int)init_saved_seqstat & SEQSTAT_EXCAUSE, init_saved_retx); | 960 | initial_pda.seqstat_doublefault & SEQSTAT_EXCAUSE, |
962 | printk(KERN_NOTICE " DCPLB_FAULT_ADDR: %pF\n", init_saved_dcplb_fault_addr); | 961 | initial_pda.retx_doublefault); |
963 | printk(KERN_NOTICE " ICPLB_FAULT_ADDR: %pF\n", init_saved_icplb_fault_addr); | 962 | printk(KERN_NOTICE " DCPLB_FAULT_ADDR: %pF\n", |
963 | initial_pda.dcplb_doublefault_addr); | ||
964 | printk(KERN_NOTICE " ICPLB_FAULT_ADDR: %pF\n", | ||
965 | initial_pda.icplb_doublefault_addr); | ||
964 | #endif | 966 | #endif |
965 | printk(KERN_NOTICE " The instruction at %pF caused a double exception\n", | 967 | printk(KERN_NOTICE " The instruction at %pF caused a double exception\n", |
966 | init_retx); | 968 | initial_pda.retx); |
967 | } else if (_bfin_swrst & RESET_WDOG) | 969 | } else if (_bfin_swrst & RESET_WDOG) |
968 | printk(KERN_INFO "Recovering from Watchdog event\n"); | 970 | printk(KERN_INFO "Recovering from Watchdog event\n"); |
969 | else if (_bfin_swrst & RESET_SOFTWARE) | 971 | else if (_bfin_swrst & RESET_SOFTWARE) |
diff --git a/arch/blackfin/kernel/sys_bfin.c b/arch/blackfin/kernel/sys_bfin.c index 89448ed7065d..d998383cb956 100644 --- a/arch/blackfin/kernel/sys_bfin.c +++ b/arch/blackfin/kernel/sys_bfin.c | |||
@@ -41,6 +41,7 @@ asmlinkage void *sys_dma_memcpy(void *dest, const void *src, size_t len) | |||
41 | 41 | ||
42 | #if defined(CONFIG_FB) || defined(CONFIG_FB_MODULE) | 42 | #if defined(CONFIG_FB) || defined(CONFIG_FB_MODULE) |
43 | #include <linux/fb.h> | 43 | #include <linux/fb.h> |
44 | #include <linux/export.h> | ||
44 | unsigned long get_fb_unmapped_area(struct file *filp, unsigned long orig_addr, | 45 | unsigned long get_fb_unmapped_area(struct file *filp, unsigned long orig_addr, |
45 | unsigned long len, unsigned long pgoff, unsigned long flags) | 46 | unsigned long len, unsigned long pgoff, unsigned long flags) |
46 | { | 47 | { |
diff --git a/arch/blackfin/kernel/time-ts.c b/arch/blackfin/kernel/time-ts.c index 9e9b60d969dc..1bcf3a3c57d8 100644 --- a/arch/blackfin/kernel/time-ts.c +++ b/arch/blackfin/kernel/time-ts.c | |||
@@ -188,8 +188,7 @@ irqreturn_t bfin_gptmr0_interrupt(int irq, void *dev_id) | |||
188 | 188 | ||
189 | static struct irqaction gptmr0_irq = { | 189 | static struct irqaction gptmr0_irq = { |
190 | .name = "Blackfin GPTimer0", | 190 | .name = "Blackfin GPTimer0", |
191 | .flags = IRQF_DISABLED | IRQF_TIMER | \ | 191 | .flags = IRQF_TIMER | IRQF_IRQPOLL | IRQF_PERCPU, |
192 | IRQF_IRQPOLL | IRQF_PERCPU, | ||
193 | .handler = bfin_gptmr0_interrupt, | 192 | .handler = bfin_gptmr0_interrupt, |
194 | }; | 193 | }; |
195 | 194 | ||
@@ -297,8 +296,7 @@ irqreturn_t bfin_coretmr_interrupt(int irq, void *dev_id) | |||
297 | 296 | ||
298 | static struct irqaction coretmr_irq = { | 297 | static struct irqaction coretmr_irq = { |
299 | .name = "Blackfin CoreTimer", | 298 | .name = "Blackfin CoreTimer", |
300 | .flags = IRQF_DISABLED | IRQF_TIMER | \ | 299 | .flags = IRQF_TIMER | IRQF_IRQPOLL | IRQF_PERCPU, |
301 | IRQF_IRQPOLL | IRQF_PERCPU, | ||
302 | .handler = bfin_coretmr_interrupt, | 300 | .handler = bfin_coretmr_interrupt, |
303 | }; | 301 | }; |
304 | 302 | ||
diff --git a/arch/blackfin/kernel/time.c b/arch/blackfin/kernel/time.c index 8d73724c0092..2310b249675f 100644 --- a/arch/blackfin/kernel/time.c +++ b/arch/blackfin/kernel/time.c | |||
@@ -25,7 +25,6 @@ | |||
25 | 25 | ||
26 | static struct irqaction bfin_timer_irq = { | 26 | static struct irqaction bfin_timer_irq = { |
27 | .name = "Blackfin Timer Tick", | 27 | .name = "Blackfin Timer Tick", |
28 | .flags = IRQF_DISABLED | ||
29 | }; | 28 | }; |
30 | 29 | ||
31 | #if defined(CONFIG_IPIPE) | 30 | #if defined(CONFIG_IPIPE) |
@@ -51,7 +50,7 @@ void __init setup_core_timer(void) | |||
51 | u32 tcount; | 50 | u32 tcount; |
52 | 51 | ||
53 | /* power up the timer, but don't enable it just yet */ | 52 | /* power up the timer, but don't enable it just yet */ |
54 | bfin_write_TCNTL(1); | 53 | bfin_write_TCNTL(TMPWR); |
55 | CSYNC(); | 54 | CSYNC(); |
56 | 55 | ||
57 | /* the TSCALE prescaler counter */ | 56 | /* the TSCALE prescaler counter */ |
@@ -64,7 +63,7 @@ void __init setup_core_timer(void) | |||
64 | /* now enable the timer */ | 63 | /* now enable the timer */ |
65 | CSYNC(); | 64 | CSYNC(); |
66 | 65 | ||
67 | bfin_write_TCNTL(7); | 66 | bfin_write_TCNTL(TAUTORLD | TMREN | TMPWR); |
68 | } | 67 | } |
69 | #endif | 68 | #endif |
70 | 69 | ||
diff --git a/arch/blackfin/kernel/vmlinux.lds.S b/arch/blackfin/kernel/vmlinux.lds.S index 3ac5b66d14aa..ba35864b2b74 100644 --- a/arch/blackfin/kernel/vmlinux.lds.S +++ b/arch/blackfin/kernel/vmlinux.lds.S | |||
@@ -155,6 +155,7 @@ SECTIONS | |||
155 | SECURITY_INITCALL | 155 | SECURITY_INITCALL |
156 | INIT_RAM_FS | 156 | INIT_RAM_FS |
157 | 157 | ||
158 | . = ALIGN(PAGE_SIZE); | ||
158 | ___per_cpu_load = .; | 159 | ___per_cpu_load = .; |
159 | PERCPU_INPUT(32) | 160 | PERCPU_INPUT(32) |
160 | 161 | ||
diff --git a/arch/blackfin/mach-bf518/Kconfig b/arch/blackfin/mach-bf518/Kconfig index 1d9f631a7f94..bde92a19970e 100644 --- a/arch/blackfin/mach-bf518/Kconfig +++ b/arch/blackfin/mach-bf518/Kconfig | |||
@@ -11,55 +11,75 @@ menu "BF518 Specific Configuration" | |||
11 | comment "Alternative Multiplexing Scheme" | 11 | comment "Alternative Multiplexing Scheme" |
12 | 12 | ||
13 | choice | 13 | choice |
14 | prompt "SPORT0" | 14 | prompt "PWM Channel Pins" |
15 | default BF518_SPORT0_PORTG | 15 | default BF518_PWM_ALL_PORTF |
16 | help | 16 | help |
17 | Select PORT used for SPORT0. See Hardware Reference Manual | 17 | Select pins used for the PWM channels: |
18 | PWM_AH PWM_AL PWM_BH PWM_BL PWM_CH PWM_CL | ||
18 | 19 | ||
19 | config BF518_SPORT0_PORTF | 20 | See the Hardware Reference Manual for more details. |
20 | bool "PORT F" | 21 | |
22 | config BF518_PWM_ALL_PORTF | ||
23 | bool "PF1 - PF6" | ||
21 | help | 24 | help |
22 | PORT F | 25 | PF{1,2,3,4,5,6} <-> PWM_{AH,AL,BH,BL,CH,CL} |
23 | 26 | ||
24 | config BF518_SPORT0_PORTG | 27 | config BF518_PWM_PORTF_PORTG |
25 | bool "PORT G" | 28 | bool "PF11 - PF14 / PG1 - PG2" |
26 | help | 29 | help |
27 | PORT G | 30 | PF{11,12,13,14} <-> PWM_{AH,AL,BH,BL} |
31 | PG{1,2} <-> PWM_{CH,CL} | ||
32 | |||
28 | endchoice | 33 | endchoice |
29 | 34 | ||
30 | choice | 35 | choice |
31 | prompt "SPORT0 TSCLK Location" | 36 | prompt "PWM Sync Pin" |
32 | depends on BF518_SPORT0_PORTG | 37 | default BF518_PWM_SYNC_PF7 |
33 | default BF518_SPORT0_TSCLK_PG10 | ||
34 | help | 38 | help |
35 | Select PIN used for SPORT0_TSCLK. See Hardware Reference Manual | 39 | Select the pin used for PWM_SYNC. |
36 | 40 | ||
37 | config BF518_SPORT0_TSCLK_PG10 | 41 | See the Hardware Reference Manual for more details. |
38 | bool "PORT PG10" | 42 | |
39 | help | 43 | config BF518_PWM_SYNC_PF7 |
40 | PORT PG10 | 44 | bool "PF7" |
45 | config BF518_PWM_SYNC_PF15 | ||
46 | bool "PF15" | ||
47 | endchoice | ||
41 | 48 | ||
42 | config BF518_SPORT0_TSCLK_PG14 | 49 | choice |
43 | bool "PORT PG14" | 50 | prompt "PWM Trip B Pin" |
51 | default BF518_PWM_TRIPB_PG10 | ||
44 | help | 52 | help |
45 | PORT PG14 | 53 | Select the pin used for PWM_TRIPB. |
54 | |||
55 | See the Hardware Reference Manual for more details. | ||
56 | |||
57 | config BF518_PWM_TRIPB_PG10 | ||
58 | bool "PG10" | ||
59 | config BF518_PWM_TRIPB_PG14 | ||
60 | bool "PG14" | ||
46 | endchoice | 61 | endchoice |
47 | 62 | ||
48 | choice | 63 | choice |
49 | prompt "UART1" | 64 | prompt "PPI / Timer Pins" |
50 | default BF518_UART1_PORTF | 65 | default BF518_PPI_TMR_PG5 |
51 | help | 66 | help |
52 | Select PORT used for UART1. See Hardware Reference Manual | 67 | Select pins used for PPI/Timer: |
68 | PPICLK PPIFS1 PPIFS2 | ||
69 | TMRCLK TMR0 TMR1 | ||
53 | 70 | ||
54 | config BF518_UART1_PORTF | 71 | See the Hardware Reference Manual for more details. |
55 | bool "PORT F" | 72 | |
73 | config BF518_PPI_TMR_PG5 | ||
74 | bool "PG5 - PG7" | ||
56 | help | 75 | help |
57 | PORT F | 76 | PG{5,6,7} <-> {PPICLK/TMRCLK,TMR0/PPIFS1,TMR1/PPIFS2} |
58 | 77 | ||
59 | config BF518_UART1_PORTG | 78 | config BF518_PPI_TMR_PG12 |
60 | bool "PORT G" | 79 | bool "PG12 - PG14" |
61 | help | 80 | help |
62 | PORT G | 81 | PG{12,13,14} <-> {PPICLK/TMRCLK,TMR0/PPIFS1,TMR1/PPIFS2} |
82 | |||
63 | endchoice | 83 | endchoice |
64 | 84 | ||
65 | comment "Hysteresis/Schmitt Trigger Control" | 85 | comment "Hysteresis/Schmitt Trigger Control" |
diff --git a/arch/blackfin/mach-bf518/boards/ezbrd.c b/arch/blackfin/mach-bf518/boards/ezbrd.c index c0ccadcfa44e..d1c0c0cff3ef 100644 --- a/arch/blackfin/mach-bf518/boards/ezbrd.c +++ b/arch/blackfin/mach-bf518/boards/ezbrd.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/device.h> | 9 | #include <linux/device.h> |
10 | #include <linux/export.h> | ||
10 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
11 | #include <linux/mtd/mtd.h> | 12 | #include <linux/mtd/mtd.h> |
12 | #include <linux/mtd/partitions.h> | 13 | #include <linux/mtd/partitions.h> |
@@ -187,43 +188,16 @@ static struct flash_platform_data bfin_spi_flash_data = { | |||
187 | /* SPI flash chip (m25p64) */ | 188 | /* SPI flash chip (m25p64) */ |
188 | static struct bfin5xx_spi_chip spi_flash_chip_info = { | 189 | static struct bfin5xx_spi_chip spi_flash_chip_info = { |
189 | .enable_dma = 0, /* use dma transfer with this chip*/ | 190 | .enable_dma = 0, /* use dma transfer with this chip*/ |
190 | .bits_per_word = 8, | ||
191 | }; | 191 | }; |
192 | #endif | 192 | #endif |
193 | 193 | ||
194 | #if defined(CONFIG_BFIN_SPI_ADC) \ | ||
195 | || defined(CONFIG_BFIN_SPI_ADC_MODULE) | ||
196 | /* SPI ADC chip */ | ||
197 | static struct bfin5xx_spi_chip spi_adc_chip_info = { | ||
198 | .enable_dma = 1, /* use dma transfer with this chip*/ | ||
199 | .bits_per_word = 16, | ||
200 | }; | ||
201 | #endif | ||
202 | |||
203 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | ||
204 | #if defined(CONFIG_NET_DSA_KSZ8893M) \ | ||
205 | || defined(CONFIG_NET_DSA_KSZ8893M_MODULE) | ||
206 | /* SPI SWITCH CHIP */ | ||
207 | static struct bfin5xx_spi_chip spi_switch_info = { | ||
208 | .enable_dma = 0, | ||
209 | .bits_per_word = 8, | ||
210 | }; | ||
211 | #endif | ||
212 | #endif | ||
213 | |||
214 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | 194 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) |
215 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { | 195 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { |
216 | .enable_dma = 0, | 196 | .enable_dma = 0, |
217 | .bits_per_word = 8, | ||
218 | }; | 197 | }; |
219 | #endif | 198 | #endif |
220 | 199 | ||
221 | #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) | 200 | #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) |
222 | static struct bfin5xx_spi_chip spi_ad7877_chip_info = { | ||
223 | .enable_dma = 0, | ||
224 | .bits_per_word = 16, | ||
225 | }; | ||
226 | |||
227 | static const struct ad7877_platform_data bfin_ad7877_ts_info = { | 201 | static const struct ad7877_platform_data bfin_ad7877_ts_info = { |
228 | .model = 7877, | 202 | .model = 7877, |
229 | .vref_delay_usecs = 50, /* internal, no capacitor */ | 203 | .vref_delay_usecs = 50, /* internal, no capacitor */ |
@@ -239,21 +213,6 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = { | |||
239 | }; | 213 | }; |
240 | #endif | 214 | #endif |
241 | 215 | ||
242 | #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ | ||
243 | && defined(CONFIG_SND_SOC_WM8731_SPI) | ||
244 | static struct bfin5xx_spi_chip spi_wm8731_chip_info = { | ||
245 | .enable_dma = 0, | ||
246 | .bits_per_word = 16, | ||
247 | }; | ||
248 | #endif | ||
249 | |||
250 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) | ||
251 | static struct bfin5xx_spi_chip spidev_chip_info = { | ||
252 | .enable_dma = 0, | ||
253 | .bits_per_word = 8, | ||
254 | }; | ||
255 | #endif | ||
256 | |||
257 | static struct spi_board_info bfin_spi_board_info[] __initdata = { | 216 | static struct spi_board_info bfin_spi_board_info[] __initdata = { |
258 | #if defined(CONFIG_MTD_M25P80) \ | 217 | #if defined(CONFIG_MTD_M25P80) \ |
259 | || defined(CONFIG_MTD_M25P80_MODULE) | 218 | || defined(CONFIG_MTD_M25P80_MODULE) |
@@ -269,18 +228,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
269 | }, | 228 | }, |
270 | #endif | 229 | #endif |
271 | 230 | ||
272 | #if defined(CONFIG_BFIN_SPI_ADC) \ | ||
273 | || defined(CONFIG_BFIN_SPI_ADC_MODULE) | ||
274 | { | ||
275 | .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ | ||
276 | .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ | ||
277 | .bus_num = 0, /* Framework bus number */ | ||
278 | .chip_select = 1, /* Framework chip select. */ | ||
279 | .platform_data = NULL, /* No spi_driver specific config */ | ||
280 | .controller_data = &spi_adc_chip_info, | ||
281 | }, | ||
282 | #endif | ||
283 | |||
284 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 231 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
285 | #if defined(CONFIG_NET_DSA_KSZ8893M) \ | 232 | #if defined(CONFIG_NET_DSA_KSZ8893M) \ |
286 | || defined(CONFIG_NET_DSA_KSZ8893M_MODULE) | 233 | || defined(CONFIG_NET_DSA_KSZ8893M_MODULE) |
@@ -290,7 +237,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
290 | .bus_num = 0, | 237 | .bus_num = 0, |
291 | .chip_select = 1, | 238 | .chip_select = 1, |
292 | .platform_data = NULL, | 239 | .platform_data = NULL, |
293 | .controller_data = &spi_switch_info, | ||
294 | .mode = SPI_MODE_3, | 240 | .mode = SPI_MODE_3, |
295 | }, | 241 | }, |
296 | #endif | 242 | #endif |
@@ -314,7 +260,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
314 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ | 260 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ |
315 | .bus_num = 0, | 261 | .bus_num = 0, |
316 | .chip_select = 2, | 262 | .chip_select = 2, |
317 | .controller_data = &spi_ad7877_chip_info, | ||
318 | }, | 263 | }, |
319 | #endif | 264 | #endif |
320 | #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ | 265 | #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ |
@@ -324,7 +269,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
324 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 269 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
325 | .bus_num = 0, | 270 | .bus_num = 0, |
326 | .chip_select = 5, | 271 | .chip_select = 5, |
327 | .controller_data = &spi_wm8731_chip_info, | ||
328 | .mode = SPI_MODE_0, | 272 | .mode = SPI_MODE_0, |
329 | }, | 273 | }, |
330 | #endif | 274 | #endif |
@@ -334,7 +278,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
334 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 278 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
335 | .bus_num = 0, | 279 | .bus_num = 0, |
336 | .chip_select = 1, | 280 | .chip_select = 1, |
337 | .controller_data = &spidev_chip_info, | ||
338 | }, | 281 | }, |
339 | #endif | 282 | #endif |
340 | #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) | 283 | #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) |
@@ -343,7 +286,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
343 | .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ | 286 | .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ |
344 | .bus_num = 0, | 287 | .bus_num = 0, |
345 | .chip_select = 1, | 288 | .chip_select = 1, |
346 | .controller_data = &lq035q1_spi_chip_info, | ||
347 | .mode = SPI_CPHA | SPI_CPOL, | 289 | .mode = SPI_CPHA | SPI_CPOL, |
348 | }, | 290 | }, |
349 | #endif | 291 | #endif |
@@ -431,8 +373,13 @@ static struct resource bfin_uart0_resources[] = { | |||
431 | .flags = IORESOURCE_MEM, | 373 | .flags = IORESOURCE_MEM, |
432 | }, | 374 | }, |
433 | { | 375 | { |
376 | .start = IRQ_UART0_TX, | ||
377 | .end = IRQ_UART0_TX, | ||
378 | .flags = IORESOURCE_IRQ, | ||
379 | }, | ||
380 | { | ||
434 | .start = IRQ_UART0_RX, | 381 | .start = IRQ_UART0_RX, |
435 | .end = IRQ_UART0_RX+1, | 382 | .end = IRQ_UART0_RX, |
436 | .flags = IORESOURCE_IRQ, | 383 | .flags = IORESOURCE_IRQ, |
437 | }, | 384 | }, |
438 | { | 385 | { |
@@ -474,8 +421,13 @@ static struct resource bfin_uart1_resources[] = { | |||
474 | .flags = IORESOURCE_MEM, | 421 | .flags = IORESOURCE_MEM, |
475 | }, | 422 | }, |
476 | { | 423 | { |
424 | .start = IRQ_UART1_TX, | ||
425 | .end = IRQ_UART1_TX, | ||
426 | .flags = IORESOURCE_IRQ, | ||
427 | }, | ||
428 | { | ||
477 | .start = IRQ_UART1_RX, | 429 | .start = IRQ_UART1_RX, |
478 | .end = IRQ_UART1_RX+1, | 430 | .end = IRQ_UART1_RX, |
479 | .flags = IORESOURCE_IRQ, | 431 | .flags = IORESOURCE_IRQ, |
480 | }, | 432 | }, |
481 | { | 433 | { |
diff --git a/arch/blackfin/mach-bf518/boards/tcm-bf518.c b/arch/blackfin/mach-bf518/boards/tcm-bf518.c index 50fc5c89e379..5470bf89e52e 100644 --- a/arch/blackfin/mach-bf518/boards/tcm-bf518.c +++ b/arch/blackfin/mach-bf518/boards/tcm-bf518.c | |||
@@ -138,32 +138,16 @@ static struct flash_platform_data bfin_spi_flash_data = { | |||
138 | /* SPI flash chip (m25p64) */ | 138 | /* SPI flash chip (m25p64) */ |
139 | static struct bfin5xx_spi_chip spi_flash_chip_info = { | 139 | static struct bfin5xx_spi_chip spi_flash_chip_info = { |
140 | .enable_dma = 0, /* use dma transfer with this chip*/ | 140 | .enable_dma = 0, /* use dma transfer with this chip*/ |
141 | .bits_per_word = 8, | ||
142 | }; | ||
143 | #endif | ||
144 | |||
145 | #if defined(CONFIG_BFIN_SPI_ADC) \ | ||
146 | || defined(CONFIG_BFIN_SPI_ADC_MODULE) | ||
147 | /* SPI ADC chip */ | ||
148 | static struct bfin5xx_spi_chip spi_adc_chip_info = { | ||
149 | .enable_dma = 1, /* use dma transfer with this chip*/ | ||
150 | .bits_per_word = 16, | ||
151 | }; | 141 | }; |
152 | #endif | 142 | #endif |
153 | 143 | ||
154 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | 144 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) |
155 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { | 145 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { |
156 | .enable_dma = 0, | 146 | .enable_dma = 0, |
157 | .bits_per_word = 8, | ||
158 | }; | 147 | }; |
159 | #endif | 148 | #endif |
160 | 149 | ||
161 | #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) | 150 | #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) |
162 | static struct bfin5xx_spi_chip spi_ad7877_chip_info = { | ||
163 | .enable_dma = 0, | ||
164 | .bits_per_word = 16, | ||
165 | }; | ||
166 | |||
167 | static const struct ad7877_platform_data bfin_ad7877_ts_info = { | 151 | static const struct ad7877_platform_data bfin_ad7877_ts_info = { |
168 | .model = 7877, | 152 | .model = 7877, |
169 | .vref_delay_usecs = 50, /* internal, no capacitor */ | 153 | .vref_delay_usecs = 50, /* internal, no capacitor */ |
@@ -179,21 +163,6 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = { | |||
179 | }; | 163 | }; |
180 | #endif | 164 | #endif |
181 | 165 | ||
182 | #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ | ||
183 | && defined(CONFIG_SND_SOC_WM8731_SPI) | ||
184 | static struct bfin5xx_spi_chip spi_wm8731_chip_info = { | ||
185 | .enable_dma = 0, | ||
186 | .bits_per_word = 16, | ||
187 | }; | ||
188 | #endif | ||
189 | |||
190 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) | ||
191 | static struct bfin5xx_spi_chip spidev_chip_info = { | ||
192 | .enable_dma = 0, | ||
193 | .bits_per_word = 8, | ||
194 | }; | ||
195 | #endif | ||
196 | |||
197 | static struct spi_board_info bfin_spi_board_info[] __initdata = { | 166 | static struct spi_board_info bfin_spi_board_info[] __initdata = { |
198 | #if defined(CONFIG_MTD_M25P80) \ | 167 | #if defined(CONFIG_MTD_M25P80) \ |
199 | || defined(CONFIG_MTD_M25P80_MODULE) | 168 | || defined(CONFIG_MTD_M25P80_MODULE) |
@@ -209,18 +178,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
209 | }, | 178 | }, |
210 | #endif | 179 | #endif |
211 | 180 | ||
212 | #if defined(CONFIG_BFIN_SPI_ADC) \ | ||
213 | || defined(CONFIG_BFIN_SPI_ADC_MODULE) | ||
214 | { | ||
215 | .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ | ||
216 | .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ | ||
217 | .bus_num = 0, /* Framework bus number */ | ||
218 | .chip_select = 1, /* Framework chip select. */ | ||
219 | .platform_data = NULL, /* No spi_driver specific config */ | ||
220 | .controller_data = &spi_adc_chip_info, | ||
221 | }, | ||
222 | #endif | ||
223 | |||
224 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | 181 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) |
225 | { | 182 | { |
226 | .modalias = "mmc_spi", | 183 | .modalias = "mmc_spi", |
@@ -239,7 +196,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
239 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ | 196 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ |
240 | .bus_num = 0, | 197 | .bus_num = 0, |
241 | .chip_select = 2, | 198 | .chip_select = 2, |
242 | .controller_data = &spi_ad7877_chip_info, | ||
243 | }, | 199 | }, |
244 | #endif | 200 | #endif |
245 | #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ | 201 | #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ |
@@ -249,7 +205,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
249 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 205 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
250 | .bus_num = 0, | 206 | .bus_num = 0, |
251 | .chip_select = 5, | 207 | .chip_select = 5, |
252 | .controller_data = &spi_wm8731_chip_info, | ||
253 | .mode = SPI_MODE_0, | 208 | .mode = SPI_MODE_0, |
254 | }, | 209 | }, |
255 | #endif | 210 | #endif |
@@ -259,7 +214,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
259 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 214 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
260 | .bus_num = 0, | 215 | .bus_num = 0, |
261 | .chip_select = 1, | 216 | .chip_select = 1, |
262 | .controller_data = &spidev_chip_info, | ||
263 | }, | 217 | }, |
264 | #endif | 218 | #endif |
265 | #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) | 219 | #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) |
@@ -268,7 +222,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
268 | .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ | 222 | .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ |
269 | .bus_num = 0, | 223 | .bus_num = 0, |
270 | .chip_select = 1, | 224 | .chip_select = 1, |
271 | .controller_data = &lq035q1_spi_chip_info, | ||
272 | .mode = SPI_CPHA | SPI_CPOL, | 225 | .mode = SPI_CPHA | SPI_CPOL, |
273 | }, | 226 | }, |
274 | #endif | 227 | #endif |
@@ -356,8 +309,13 @@ static struct resource bfin_uart0_resources[] = { | |||
356 | .flags = IORESOURCE_MEM, | 309 | .flags = IORESOURCE_MEM, |
357 | }, | 310 | }, |
358 | { | 311 | { |
312 | .start = IRQ_UART0_TX, | ||
313 | .end = IRQ_UART0_TX, | ||
314 | .flags = IORESOURCE_IRQ, | ||
315 | }, | ||
316 | { | ||
359 | .start = IRQ_UART0_RX, | 317 | .start = IRQ_UART0_RX, |
360 | .end = IRQ_UART0_RX+1, | 318 | .end = IRQ_UART0_RX, |
361 | .flags = IORESOURCE_IRQ, | 319 | .flags = IORESOURCE_IRQ, |
362 | }, | 320 | }, |
363 | { | 321 | { |
@@ -399,8 +357,13 @@ static struct resource bfin_uart1_resources[] = { | |||
399 | .flags = IORESOURCE_MEM, | 357 | .flags = IORESOURCE_MEM, |
400 | }, | 358 | }, |
401 | { | 359 | { |
360 | .start = IRQ_UART1_TX, | ||
361 | .end = IRQ_UART1_TX, | ||
362 | .flags = IORESOURCE_IRQ, | ||
363 | }, | ||
364 | { | ||
402 | .start = IRQ_UART1_RX, | 365 | .start = IRQ_UART1_RX, |
403 | .end = IRQ_UART1_RX+1, | 366 | .end = IRQ_UART1_RX, |
404 | .flags = IORESOURCE_IRQ, | 367 | .flags = IORESOURCE_IRQ, |
405 | }, | 368 | }, |
406 | { | 369 | { |
diff --git a/arch/blackfin/mach-bf518/include/mach/anomaly.h b/arch/blackfin/mach-bf518/include/mach/anomaly.h index d2f076fbbc9e..56383f7cbc07 100644 --- a/arch/blackfin/mach-bf518/include/mach/anomaly.h +++ b/arch/blackfin/mach-bf518/include/mach/anomaly.h | |||
@@ -11,10 +11,9 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | /* This file should be up to date with: | 13 | /* This file should be up to date with: |
14 | * - Revision E, 01/26/2010; ADSP-BF512/BF514/BF516/BF518 Blackfin Processor Anomaly List | 14 | * - Revision F, 05/23/2011; ADSP-BF512/BF514/BF516/BF518 Blackfin Processor Anomaly List |
15 | */ | 15 | */ |
16 | 16 | ||
17 | /* We plan on not supporting 0.0 silicon, but 0.1 isn't out yet - sorry */ | ||
18 | #if __SILICON_REVISION__ < 0 | 17 | #if __SILICON_REVISION__ < 0 |
19 | # error will not work on BF518 silicon version | 18 | # error will not work on BF518 silicon version |
20 | #endif | 19 | #endif |
@@ -77,19 +76,29 @@ | |||
77 | /* False Hardware Error when RETI Points to Invalid Memory */ | 76 | /* False Hardware Error when RETI Points to Invalid Memory */ |
78 | #define ANOMALY_05000461 (1) | 77 | #define ANOMALY_05000461 (1) |
79 | /* Synchronization Problem at Startup May Cause SPORT Transmit Channels to Misalign */ | 78 | /* Synchronization Problem at Startup May Cause SPORT Transmit Channels to Misalign */ |
80 | #define ANOMALY_05000462 (1) | 79 | #define ANOMALY_05000462 (__SILICON_REVISION__ < 2) |
81 | /* PLL Latches Incorrect Settings During Reset */ | ||
82 | #define ANOMALY_05000469 (1) | ||
83 | /* Incorrect Default MSEL Value in PLL_CTL */ | 80 | /* Incorrect Default MSEL Value in PLL_CTL */ |
84 | #define ANOMALY_05000472 (1) | 81 | #define ANOMALY_05000472 (__SILICON_REVISION__ < 2) |
85 | /* Interrupted SPORT Receive Data Register Read Results In Underflow when SLEN > 15 */ | 82 | /* Interrupted SPORT Receive Data Register Read Results In Underflow when SLEN > 15 */ |
86 | #define ANOMALY_05000473 (1) | 83 | #define ANOMALY_05000473 (1) |
87 | /* TESTSET Instruction Cannot Be Interrupted */ | 84 | /* TESTSET Instruction Cannot Be Interrupted */ |
88 | #define ANOMALY_05000477 (1) | 85 | #define ANOMALY_05000477 (1) |
89 | /* Reads of ITEST_COMMAND and ITEST_DATA Registers Cause Cache Corruption */ | 86 | /* Reads of ITEST_COMMAND and ITEST_DATA Registers Cause Cache Corruption */ |
90 | #define ANOMALY_05000481 (1) | 87 | #define ANOMALY_05000481 (1) |
91 | /* IFLUSH sucks at life */ | 88 | /* PLL Latches Incorrect Settings During Reset */ |
89 | #define ANOMALY_05000482 (__SILICON_REVISION__ < 2) | ||
90 | /* PLL_CTL Change Using bfrom_SysControl() Can Result in Processor Overclocking */ | ||
91 | #define ANOMALY_05000485 (__SILICON_REVISION__ < 2) | ||
92 | /* SPI Master Boot Can Fail Under Certain Conditions */ | ||
93 | #define ANOMALY_05000490 (1) | ||
94 | /* Instruction Memory Stalls Can Cause IFLUSH to Fail */ | ||
92 | #define ANOMALY_05000491 (1) | 95 | #define ANOMALY_05000491 (1) |
96 | /* EXCPT Instruction May Be Lost If NMI Happens Simultaneously */ | ||
97 | #define ANOMALY_05000494 (1) | ||
98 | /* CNT_COMMAND Functionality Depends on CNT_IMASK Configuration */ | ||
99 | #define ANOMALY_05000498 (1) | ||
100 | /* RXS Bit in SPI_STAT May Become Stuck In RX DMA Modes */ | ||
101 | #define ANOMALY_05000501 (1) | ||
93 | 102 | ||
94 | /* Anomalies that don't exist on this proc */ | 103 | /* Anomalies that don't exist on this proc */ |
95 | #define ANOMALY_05000099 (0) | 104 | #define ANOMALY_05000099 (0) |
@@ -157,6 +166,5 @@ | |||
157 | #define ANOMALY_05000474 (0) | 166 | #define ANOMALY_05000474 (0) |
158 | #define ANOMALY_05000475 (0) | 167 | #define ANOMALY_05000475 (0) |
159 | #define ANOMALY_05000480 (0) | 168 | #define ANOMALY_05000480 (0) |
160 | #define ANOMALY_05000485 (0) | ||
161 | 169 | ||
162 | #endif | 170 | #endif |
diff --git a/arch/blackfin/mach-bf518/include/mach/portmux.h b/arch/blackfin/mach-bf518/include/mach/portmux.h index cd84a569b04e..b3b806f468da 100644 --- a/arch/blackfin/mach-bf518/include/mach/portmux.h +++ b/arch/blackfin/mach-bf518/include/mach/portmux.h | |||
@@ -81,9 +81,15 @@ | |||
81 | #define P_PPI0_D14 (P_DEFINED | P_IDENT(GPIO_PF14) | P_FUNCT(1)) | 81 | #define P_PPI0_D14 (P_DEFINED | P_IDENT(GPIO_PF14) | P_FUNCT(1)) |
82 | #define P_PPI0_D15 (P_DEFINED | P_IDENT(GPIO_PF15) | P_FUNCT(1)) | 82 | #define P_PPI0_D15 (P_DEFINED | P_IDENT(GPIO_PF15) | P_FUNCT(1)) |
83 | 83 | ||
84 | #ifndef CONFIG_BF518_PPI_TMR_PG12 | ||
85 | #define P_PPI0_CLK (P_DEFINED | P_IDENT(GPIO_PG5) | P_FUNCT(1)) | ||
86 | #define P_PPI0_FS1 (P_DEFINED | P_IDENT(GPIO_PG6) | P_FUNCT(1)) | ||
87 | #define P_PPI0_FS2 (P_DEFINED | P_IDENT(GPIO_PG7) | P_FUNCT(1)) | ||
88 | #else | ||
84 | #define P_PPI0_CLK (P_DEFINED | P_IDENT(GPIO_PG12) | P_FUNCT(1)) | 89 | #define P_PPI0_CLK (P_DEFINED | P_IDENT(GPIO_PG12) | P_FUNCT(1)) |
85 | #define P_PPI0_FS1 (P_DEFINED | P_IDENT(GPIO_PG13) | P_FUNCT(1)) | 90 | #define P_PPI0_FS1 (P_DEFINED | P_IDENT(GPIO_PG13) | P_FUNCT(1)) |
86 | #define P_PPI0_FS2 (P_DEFINED | P_IDENT(GPIO_PG14) | P_FUNCT(1)) | 91 | #define P_PPI0_FS2 (P_DEFINED | P_IDENT(GPIO_PG14) | P_FUNCT(1)) |
92 | #endif | ||
87 | #define P_PPI0_FS3 (P_DEFINED | P_IDENT(GPIO_PG15) | P_FUNCT(1)) | 93 | #define P_PPI0_FS3 (P_DEFINED | P_IDENT(GPIO_PG15) | P_FUNCT(1)) |
88 | 94 | ||
89 | /* SPI Port Mux */ | 95 | /* SPI Port Mux */ |
@@ -139,9 +145,15 @@ | |||
139 | #define P_UART1_RX (P_DEFINED | P_IDENT(GPIO_PH7) | P_FUNCT(1)) | 145 | #define P_UART1_RX (P_DEFINED | P_IDENT(GPIO_PH7) | P_FUNCT(1)) |
140 | 146 | ||
141 | /* Timer */ | 147 | /* Timer */ |
148 | #ifndef CONFIG_BF518_PPI_TMR_PG12 | ||
142 | #define P_TMRCLK (P_DEFINED | P_IDENT(GPIO_PG5) | P_FUNCT(2)) | 149 | #define P_TMRCLK (P_DEFINED | P_IDENT(GPIO_PG5) | P_FUNCT(2)) |
143 | #define P_TMR0 (P_DEFINED | P_IDENT(GPIO_PG6) | P_FUNCT(2)) | 150 | #define P_TMR0 (P_DEFINED | P_IDENT(GPIO_PG6) | P_FUNCT(2)) |
144 | #define P_TMR1 (P_DEFINED | P_IDENT(GPIO_PG7) | P_FUNCT(2)) | 151 | #define P_TMR1 (P_DEFINED | P_IDENT(GPIO_PG7) | P_FUNCT(2)) |
152 | #else | ||
153 | #define P_TMRCLK (P_DEFINED | P_IDENT(GPIO_PG12) | P_FUNCT(2)) | ||
154 | #define P_TMR0 (P_DEFINED | P_IDENT(GPIO_PG13) | P_FUNCT(2)) | ||
155 | #define P_TMR1 (P_DEFINED | P_IDENT(GPIO_PG14) | P_FUNCT(2)) | ||
156 | #endif | ||
145 | #define P_TMR2 (P_DEFINED | P_IDENT(GPIO_PF9) | P_FUNCT(2)) | 157 | #define P_TMR2 (P_DEFINED | P_IDENT(GPIO_PF9) | P_FUNCT(2)) |
146 | #define P_TMR3 (P_DEFINED | P_IDENT(GPIO_PF10) | P_FUNCT(2)) | 158 | #define P_TMR3 (P_DEFINED | P_IDENT(GPIO_PF10) | P_FUNCT(2)) |
147 | #define P_TMR4 (P_DEFINED | P_IDENT(GPIO_PG9) | P_FUNCT(2)) | 159 | #define P_TMR4 (P_DEFINED | P_IDENT(GPIO_PG9) | P_FUNCT(2)) |
@@ -158,23 +170,33 @@ | |||
158 | #define P_TWI0_SDA (P_DONTCARE) | 170 | #define P_TWI0_SDA (P_DONTCARE) |
159 | 171 | ||
160 | /* PWM */ | 172 | /* PWM */ |
161 | #define P_PWM0_AH (P_DEFINED | P_IDENT(GPIO_PF1) | P_FUNCT(2)) | 173 | #ifndef CONFIG_BF518_PWM_PORTF_PORTG |
162 | #define P_PWM0_AL (P_DEFINED | P_IDENT(GPIO_PF2) | P_FUNCT(2)) | 174 | #define P_PWM_AH (P_DEFINED | P_IDENT(GPIO_PF1) | P_FUNCT(2)) |
163 | #define P_PWM0_BH (P_DEFINED | P_IDENT(GPIO_PF3) | P_FUNCT(2)) | 175 | #define P_PWM_AL (P_DEFINED | P_IDENT(GPIO_PF2) | P_FUNCT(2)) |
164 | #define P_PWM0_BL (P_DEFINED | P_IDENT(GPIO_PF4) | P_FUNCT(2)) | 176 | #define P_PWM_BH (P_DEFINED | P_IDENT(GPIO_PF3) | P_FUNCT(2)) |
165 | #define P_PWM0_CH (P_DEFINED | P_IDENT(GPIO_PF5) | P_FUNCT(2)) | 177 | #define P_PWM_BL (P_DEFINED | P_IDENT(GPIO_PF4) | P_FUNCT(2)) |
166 | #define P_PWM0_CL (P_DEFINED | P_IDENT(GPIO_PF6) | P_FUNCT(2)) | 178 | #define P_PWM_CH (P_DEFINED | P_IDENT(GPIO_PF5) | P_FUNCT(2)) |
167 | #define P_PWM0_SYNC (P_DEFINED | P_IDENT(GPIO_PF7) | P_FUNCT(2)) | 179 | #define P_PWM_CL (P_DEFINED | P_IDENT(GPIO_PF6) | P_FUNCT(2)) |
168 | 180 | #else | |
169 | #define P_PWM1_AH (P_DEFINED | P_IDENT(GPIO_PF11) | P_FUNCT(2)) | 181 | #define P_PWM_AH (P_DEFINED | P_IDENT(GPIO_PF11) | P_FUNCT(2)) |
170 | #define P_PWM1_AL (P_DEFINED | P_IDENT(GPIO_PF12) | P_FUNCT(2)) | 182 | #define P_PWM_AL (P_DEFINED | P_IDENT(GPIO_PF12) | P_FUNCT(2)) |
171 | #define P_PWM1_BH (P_DEFINED | P_IDENT(GPIO_PF13) | P_FUNCT(2)) | 183 | #define P_PWM_BH (P_DEFINED | P_IDENT(GPIO_PF13) | P_FUNCT(2)) |
172 | #define P_PWM1_BL (P_DEFINED | P_IDENT(GPIO_PF14) | P_FUNCT(2)) | 184 | #define P_PWM_BL (P_DEFINED | P_IDENT(GPIO_PF14) | P_FUNCT(2)) |
173 | #define P_PWM1_CH (P_DEFINED | P_IDENT(GPIO_PG1) | P_FUNCT(2)) | 185 | #define P_PWM_CH (P_DEFINED | P_IDENT(GPIO_PG1) | P_FUNCT(2)) |
174 | #define P_PWM1_CL (P_DEFINED | P_IDENT(GPIO_PG2) | P_FUNCT(2)) | 186 | #define P_PWM_CL (P_DEFINED | P_IDENT(GPIO_PG2) | P_FUNCT(2)) |
175 | #define P_PWM1_SYNC (P_DEFINED | P_IDENT(GPIO_PF15) | P_FUNCT(2)) | 187 | #endif |
176 | 188 | ||
189 | #ifndef CONFIG_BF518_PWM_SYNC_PF15 | ||
190 | #define P_PWM_SYNC (P_DEFINED | P_IDENT(GPIO_PF7) | P_FUNCT(2)) | ||
191 | #else | ||
192 | #define P_PWM_SYNC (P_DEFINED | P_IDENT(GPIO_PF15) | P_FUNCT(2)) | ||
193 | #endif | ||
194 | |||
195 | #ifndef CONFIG_BF518_PWM_TRIPB_PG14 | ||
196 | #define P_PWM_TRIPB (P_DEFINED | P_IDENT(GPIO_PG10) | P_FUNCT(2)) | ||
197 | #else | ||
177 | #define P_PWM_TRIPB (P_DEFINED | P_IDENT(GPIO_PG14) | P_FUNCT(2)) | 198 | #define P_PWM_TRIPB (P_DEFINED | P_IDENT(GPIO_PG14) | P_FUNCT(2)) |
199 | #endif | ||
178 | 200 | ||
179 | /* RSI */ | 201 | /* RSI */ |
180 | #define P_RSI_DATA0 (P_DEFINED | P_IDENT(GPIO_PG3) | P_FUNCT(1)) | 202 | #define P_RSI_DATA0 (P_DEFINED | P_IDENT(GPIO_PG3) | P_FUNCT(1)) |
diff --git a/arch/blackfin/mach-bf527/boards/ad7160eval.c b/arch/blackfin/mach-bf527/boards/ad7160eval.c index ccab4c689dc3..5bc6938157ad 100644 --- a/arch/blackfin/mach-bf527/boards/ad7160eval.c +++ b/arch/blackfin/mach-bf527/boards/ad7160eval.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/device.h> | 9 | #include <linux/device.h> |
10 | #include <linux/export.h> | ||
10 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
11 | #include <linux/mtd/mtd.h> | 12 | #include <linux/mtd/mtd.h> |
12 | #include <linux/mtd/partitions.h> | 13 | #include <linux/mtd/partitions.h> |
@@ -265,29 +266,12 @@ static struct flash_platform_data bfin_spi_flash_data = { | |||
265 | /* SPI flash chip (m25p64) */ | 266 | /* SPI flash chip (m25p64) */ |
266 | static struct bfin5xx_spi_chip spi_flash_chip_info = { | 267 | static struct bfin5xx_spi_chip spi_flash_chip_info = { |
267 | .enable_dma = 0, /* use dma transfer with this chip*/ | 268 | .enable_dma = 0, /* use dma transfer with this chip*/ |
268 | .bits_per_word = 8, | ||
269 | }; | ||
270 | #endif | ||
271 | |||
272 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ | ||
273 | || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) | ||
274 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { | ||
275 | .enable_dma = 0, | ||
276 | .bits_per_word = 16, | ||
277 | }; | 269 | }; |
278 | #endif | 270 | #endif |
279 | 271 | ||
280 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | 272 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) |
281 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { | 273 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { |
282 | .enable_dma = 0, | 274 | .enable_dma = 0, |
283 | .bits_per_word = 8, | ||
284 | }; | ||
285 | #endif | ||
286 | |||
287 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) | ||
288 | static struct bfin5xx_spi_chip spidev_chip_info = { | ||
289 | .enable_dma = 0, | ||
290 | .bits_per_word = 8, | ||
291 | }; | 275 | }; |
292 | #endif | 276 | #endif |
293 | 277 | ||
@@ -328,7 +312,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
328 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 312 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
329 | .bus_num = 0, | 313 | .bus_num = 0, |
330 | .chip_select = 4, | 314 | .chip_select = 4, |
331 | .controller_data = &ad1836_spi_chip_info, | ||
332 | }, | 315 | }, |
333 | #endif | 316 | #endif |
334 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | 317 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) |
@@ -347,7 +330,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
347 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 330 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
348 | .bus_num = 0, | 331 | .bus_num = 0, |
349 | .chip_select = 1, | 332 | .chip_select = 1, |
350 | .controller_data = &spidev_chip_info, | ||
351 | }, | 333 | }, |
352 | #endif | 334 | #endif |
353 | }; | 335 | }; |
@@ -399,8 +381,13 @@ static struct resource bfin_uart0_resources[] = { | |||
399 | .flags = IORESOURCE_MEM, | 381 | .flags = IORESOURCE_MEM, |
400 | }, | 382 | }, |
401 | { | 383 | { |
384 | .start = IRQ_UART0_TX, | ||
385 | .end = IRQ_UART0_TX, | ||
386 | .flags = IORESOURCE_IRQ, | ||
387 | }, | ||
388 | { | ||
402 | .start = IRQ_UART0_RX, | 389 | .start = IRQ_UART0_RX, |
403 | .end = IRQ_UART0_RX+1, | 390 | .end = IRQ_UART0_RX, |
404 | .flags = IORESOURCE_IRQ, | 391 | .flags = IORESOURCE_IRQ, |
405 | }, | 392 | }, |
406 | { | 393 | { |
@@ -442,8 +429,13 @@ static struct resource bfin_uart1_resources[] = { | |||
442 | .flags = IORESOURCE_MEM, | 429 | .flags = IORESOURCE_MEM, |
443 | }, | 430 | }, |
444 | { | 431 | { |
432 | .start = IRQ_UART1_TX, | ||
433 | .end = IRQ_UART1_TX, | ||
434 | .flags = IORESOURCE_IRQ, | ||
435 | }, | ||
436 | { | ||
445 | .start = IRQ_UART1_RX, | 437 | .start = IRQ_UART1_RX, |
446 | .end = IRQ_UART1_RX+1, | 438 | .end = IRQ_UART1_RX, |
447 | .flags = IORESOURCE_IRQ, | 439 | .flags = IORESOURCE_IRQ, |
448 | }, | 440 | }, |
449 | { | 441 | { |
diff --git a/arch/blackfin/mach-bf527/boards/cm_bf527.c b/arch/blackfin/mach-bf527/boards/cm_bf527.c index c9d6dc88f0e6..cd289698b4dd 100644 --- a/arch/blackfin/mach-bf527/boards/cm_bf527.c +++ b/arch/blackfin/mach-bf527/boards/cm_bf527.c | |||
@@ -8,6 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/device.h> | 10 | #include <linux/device.h> |
11 | #include <linux/export.h> | ||
11 | #include <linux/platform_device.h> | 12 | #include <linux/platform_device.h> |
12 | #include <linux/mtd/mtd.h> | 13 | #include <linux/mtd/mtd.h> |
13 | #include <linux/mtd/partitions.h> | 14 | #include <linux/mtd/partitions.h> |
@@ -354,40 +355,16 @@ static struct flash_platform_data bfin_spi_flash_data = { | |||
354 | /* SPI flash chip (m25p64) */ | 355 | /* SPI flash chip (m25p64) */ |
355 | static struct bfin5xx_spi_chip spi_flash_chip_info = { | 356 | static struct bfin5xx_spi_chip spi_flash_chip_info = { |
356 | .enable_dma = 0, /* use dma transfer with this chip*/ | 357 | .enable_dma = 0, /* use dma transfer with this chip*/ |
357 | .bits_per_word = 8, | ||
358 | }; | ||
359 | #endif | ||
360 | |||
361 | #if defined(CONFIG_BFIN_SPI_ADC) \ | ||
362 | || defined(CONFIG_BFIN_SPI_ADC_MODULE) | ||
363 | /* SPI ADC chip */ | ||
364 | static struct bfin5xx_spi_chip spi_adc_chip_info = { | ||
365 | .enable_dma = 1, /* use dma transfer with this chip*/ | ||
366 | .bits_per_word = 16, | ||
367 | }; | ||
368 | #endif | ||
369 | |||
370 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ | ||
371 | || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) | ||
372 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { | ||
373 | .enable_dma = 0, | ||
374 | .bits_per_word = 16, | ||
375 | }; | 358 | }; |
376 | #endif | 359 | #endif |
377 | 360 | ||
378 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | 361 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) |
379 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { | 362 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { |
380 | .enable_dma = 0, | 363 | .enable_dma = 0, |
381 | .bits_per_word = 8, | ||
382 | }; | 364 | }; |
383 | #endif | 365 | #endif |
384 | 366 | ||
385 | #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) | 367 | #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) |
386 | static struct bfin5xx_spi_chip spi_ad7877_chip_info = { | ||
387 | .enable_dma = 0, | ||
388 | .bits_per_word = 16, | ||
389 | }; | ||
390 | |||
391 | static const struct ad7877_platform_data bfin_ad7877_ts_info = { | 368 | static const struct ad7877_platform_data bfin_ad7877_ts_info = { |
392 | .model = 7877, | 369 | .model = 7877, |
393 | .vref_delay_usecs = 50, /* internal, no capacitor */ | 370 | .vref_delay_usecs = 50, /* internal, no capacitor */ |
@@ -403,21 +380,6 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = { | |||
403 | }; | 380 | }; |
404 | #endif | 381 | #endif |
405 | 382 | ||
406 | #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ | ||
407 | && defined(CONFIG_SND_SOC_WM8731_SPI) | ||
408 | static struct bfin5xx_spi_chip spi_wm8731_chip_info = { | ||
409 | .enable_dma = 0, | ||
410 | .bits_per_word = 16, | ||
411 | }; | ||
412 | #endif | ||
413 | |||
414 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) | ||
415 | static struct bfin5xx_spi_chip spidev_chip_info = { | ||
416 | .enable_dma = 0, | ||
417 | .bits_per_word = 8, | ||
418 | }; | ||
419 | #endif | ||
420 | |||
421 | static struct spi_board_info bfin_spi_board_info[] __initdata = { | 383 | static struct spi_board_info bfin_spi_board_info[] __initdata = { |
422 | #if defined(CONFIG_MTD_M25P80) \ | 384 | #if defined(CONFIG_MTD_M25P80) \ |
423 | || defined(CONFIG_MTD_M25P80_MODULE) | 385 | || defined(CONFIG_MTD_M25P80_MODULE) |
@@ -433,18 +395,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
433 | }, | 395 | }, |
434 | #endif | 396 | #endif |
435 | 397 | ||
436 | #if defined(CONFIG_BFIN_SPI_ADC) \ | ||
437 | || defined(CONFIG_BFIN_SPI_ADC_MODULE) | ||
438 | { | ||
439 | .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ | ||
440 | .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ | ||
441 | .bus_num = 0, /* Framework bus number */ | ||
442 | .chip_select = 1, /* Framework chip select. */ | ||
443 | .platform_data = NULL, /* No spi_driver specific config */ | ||
444 | .controller_data = &spi_adc_chip_info, | ||
445 | }, | ||
446 | #endif | ||
447 | |||
448 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ | 398 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ |
449 | || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) | 399 | || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) |
450 | { | 400 | { |
@@ -452,7 +402,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
452 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 402 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
453 | .bus_num = 0, | 403 | .bus_num = 0, |
454 | .chip_select = 4, | 404 | .chip_select = 4, |
455 | .controller_data = &ad1836_spi_chip_info, | ||
456 | }, | 405 | }, |
457 | #endif | 406 | #endif |
458 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | 407 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) |
@@ -473,7 +422,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
473 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ | 422 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ |
474 | .bus_num = 0, | 423 | .bus_num = 0, |
475 | .chip_select = 2, | 424 | .chip_select = 2, |
476 | .controller_data = &spi_ad7877_chip_info, | ||
477 | }, | 425 | }, |
478 | #endif | 426 | #endif |
479 | #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ | 427 | #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ |
@@ -483,7 +431,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
483 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 431 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
484 | .bus_num = 0, | 432 | .bus_num = 0, |
485 | .chip_select = 5, | 433 | .chip_select = 5, |
486 | .controller_data = &spi_wm8731_chip_info, | ||
487 | .mode = SPI_MODE_0, | 434 | .mode = SPI_MODE_0, |
488 | }, | 435 | }, |
489 | #endif | 436 | #endif |
@@ -493,7 +440,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
493 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 440 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
494 | .bus_num = 0, | 441 | .bus_num = 0, |
495 | .chip_select = 1, | 442 | .chip_select = 1, |
496 | .controller_data = &spidev_chip_info, | ||
497 | }, | 443 | }, |
498 | #endif | 444 | #endif |
499 | }; | 445 | }; |
@@ -594,8 +540,13 @@ static struct resource bfin_uart0_resources[] = { | |||
594 | .flags = IORESOURCE_MEM, | 540 | .flags = IORESOURCE_MEM, |
595 | }, | 541 | }, |
596 | { | 542 | { |
543 | .start = IRQ_UART0_TX, | ||
544 | .end = IRQ_UART0_TX, | ||
545 | .flags = IORESOURCE_IRQ, | ||
546 | }, | ||
547 | { | ||
597 | .start = IRQ_UART0_RX, | 548 | .start = IRQ_UART0_RX, |
598 | .end = IRQ_UART0_RX+1, | 549 | .end = IRQ_UART0_RX, |
599 | .flags = IORESOURCE_IRQ, | 550 | .flags = IORESOURCE_IRQ, |
600 | }, | 551 | }, |
601 | { | 552 | { |
@@ -637,8 +588,13 @@ static struct resource bfin_uart1_resources[] = { | |||
637 | .flags = IORESOURCE_MEM, | 588 | .flags = IORESOURCE_MEM, |
638 | }, | 589 | }, |
639 | { | 590 | { |
591 | .start = IRQ_UART1_TX, | ||
592 | .end = IRQ_UART1_TX, | ||
593 | .flags = IORESOURCE_IRQ, | ||
594 | }, | ||
595 | { | ||
640 | .start = IRQ_UART1_RX, | 596 | .start = IRQ_UART1_RX, |
641 | .end = IRQ_UART1_RX+1, | 597 | .end = IRQ_UART1_RX, |
642 | .flags = IORESOURCE_IRQ, | 598 | .flags = IORESOURCE_IRQ, |
643 | }, | 599 | }, |
644 | { | 600 | { |
diff --git a/arch/blackfin/mach-bf527/boards/ezbrd.c b/arch/blackfin/mach-bf527/boards/ezbrd.c index b7101aa6e3aa..9f792eafd1cc 100644 --- a/arch/blackfin/mach-bf527/boards/ezbrd.c +++ b/arch/blackfin/mach-bf527/boards/ezbrd.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/device.h> | 9 | #include <linux/device.h> |
10 | #include <linux/export.h> | ||
10 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
11 | #include <linux/mtd/mtd.h> | 12 | #include <linux/mtd/mtd.h> |
12 | #include <linux/mtd/partitions.h> | 13 | #include <linux/mtd/partitions.h> |
@@ -253,32 +254,16 @@ static struct flash_platform_data bfin_spi_flash_data = { | |||
253 | /* SPI flash chip (sst25wf040) */ | 254 | /* SPI flash chip (sst25wf040) */ |
254 | static struct bfin5xx_spi_chip spi_flash_chip_info = { | 255 | static struct bfin5xx_spi_chip spi_flash_chip_info = { |
255 | .enable_dma = 0, /* use dma transfer with this chip*/ | 256 | .enable_dma = 0, /* use dma transfer with this chip*/ |
256 | .bits_per_word = 8, | ||
257 | }; | ||
258 | #endif | ||
259 | |||
260 | #if defined(CONFIG_BFIN_SPI_ADC) \ | ||
261 | || defined(CONFIG_BFIN_SPI_ADC_MODULE) | ||
262 | /* SPI ADC chip */ | ||
263 | static struct bfin5xx_spi_chip spi_adc_chip_info = { | ||
264 | .enable_dma = 1, /* use dma transfer with this chip*/ | ||
265 | .bits_per_word = 16, | ||
266 | }; | 257 | }; |
267 | #endif | 258 | #endif |
268 | 259 | ||
269 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | 260 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) |
270 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { | 261 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { |
271 | .enable_dma = 0, | 262 | .enable_dma = 0, |
272 | .bits_per_word = 8, | ||
273 | }; | 263 | }; |
274 | #endif | 264 | #endif |
275 | 265 | ||
276 | #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) | 266 | #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) |
277 | static struct bfin5xx_spi_chip spi_ad7877_chip_info = { | ||
278 | .enable_dma = 0, | ||
279 | .bits_per_word = 16, | ||
280 | }; | ||
281 | |||
282 | static const struct ad7877_platform_data bfin_ad7877_ts_info = { | 267 | static const struct ad7877_platform_data bfin_ad7877_ts_info = { |
283 | .model = 7877, | 268 | .model = 7877, |
284 | .vref_delay_usecs = 50, /* internal, no capacitor */ | 269 | .vref_delay_usecs = 50, /* internal, no capacitor */ |
@@ -311,35 +296,6 @@ static const struct ad7879_platform_data bfin_ad7879_ts_info = { | |||
311 | }; | 296 | }; |
312 | #endif | 297 | #endif |
313 | 298 | ||
314 | #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) | ||
315 | static struct bfin5xx_spi_chip spi_ad7879_chip_info = { | ||
316 | .enable_dma = 0, | ||
317 | .bits_per_word = 16, | ||
318 | }; | ||
319 | #endif | ||
320 | |||
321 | #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ | ||
322 | && defined(CONFIG_SND_SOC_WM8731_SPI) | ||
323 | static struct bfin5xx_spi_chip spi_wm8731_chip_info = { | ||
324 | .enable_dma = 0, | ||
325 | .bits_per_word = 16, | ||
326 | }; | ||
327 | #endif | ||
328 | |||
329 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) | ||
330 | static struct bfin5xx_spi_chip spidev_chip_info = { | ||
331 | .enable_dma = 0, | ||
332 | .bits_per_word = 8, | ||
333 | }; | ||
334 | #endif | ||
335 | |||
336 | #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) | ||
337 | static struct bfin5xx_spi_chip lq035q1_spi_chip_info = { | ||
338 | .enable_dma = 0, | ||
339 | .bits_per_word = 8, | ||
340 | }; | ||
341 | #endif | ||
342 | |||
343 | static struct spi_board_info bfin_spi_board_info[] __initdata = { | 299 | static struct spi_board_info bfin_spi_board_info[] __initdata = { |
344 | #if defined(CONFIG_MTD_M25P80) \ | 300 | #if defined(CONFIG_MTD_M25P80) \ |
345 | || defined(CONFIG_MTD_M25P80_MODULE) | 301 | || defined(CONFIG_MTD_M25P80_MODULE) |
@@ -355,18 +311,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
355 | }, | 311 | }, |
356 | #endif | 312 | #endif |
357 | 313 | ||
358 | #if defined(CONFIG_BFIN_SPI_ADC) \ | ||
359 | || defined(CONFIG_BFIN_SPI_ADC_MODULE) | ||
360 | { | ||
361 | .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ | ||
362 | .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ | ||
363 | .bus_num = 0, /* Framework bus number */ | ||
364 | .chip_select = 1, /* Framework chip select. */ | ||
365 | .platform_data = NULL, /* No spi_driver specific config */ | ||
366 | .controller_data = &spi_adc_chip_info, | ||
367 | }, | ||
368 | #endif | ||
369 | |||
370 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | 314 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) |
371 | { | 315 | { |
372 | .modalias = "mmc_spi", | 316 | .modalias = "mmc_spi", |
@@ -385,7 +329,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
385 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ | 329 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ |
386 | .bus_num = 0, | 330 | .bus_num = 0, |
387 | .chip_select = 2, | 331 | .chip_select = 2, |
388 | .controller_data = &spi_ad7877_chip_info, | ||
389 | }, | 332 | }, |
390 | #endif | 333 | #endif |
391 | #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) | 334 | #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) |
@@ -396,7 +339,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
396 | .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ | 339 | .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ |
397 | .bus_num = 0, | 340 | .bus_num = 0, |
398 | .chip_select = 5, | 341 | .chip_select = 5, |
399 | .controller_data = &spi_ad7879_chip_info, | ||
400 | .mode = SPI_CPHA | SPI_CPOL, | 342 | .mode = SPI_CPHA | SPI_CPOL, |
401 | }, | 343 | }, |
402 | #endif | 344 | #endif |
@@ -407,7 +349,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
407 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 349 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
408 | .bus_num = 0, | 350 | .bus_num = 0, |
409 | .chip_select = 5, | 351 | .chip_select = 5, |
410 | .controller_data = &spi_wm8731_chip_info, | ||
411 | .mode = SPI_MODE_0, | 352 | .mode = SPI_MODE_0, |
412 | }, | 353 | }, |
413 | #endif | 354 | #endif |
@@ -417,7 +358,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
417 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 358 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
418 | .bus_num = 0, | 359 | .bus_num = 0, |
419 | .chip_select = 1, | 360 | .chip_select = 1, |
420 | .controller_data = &spidev_chip_info, | ||
421 | }, | 361 | }, |
422 | #endif | 362 | #endif |
423 | #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) | 363 | #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) |
@@ -426,7 +366,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
426 | .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ | 366 | .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ |
427 | .bus_num = 0, | 367 | .bus_num = 0, |
428 | .chip_select = 1, | 368 | .chip_select = 1, |
429 | .controller_data = &lq035q1_spi_chip_info, | ||
430 | .mode = SPI_CPHA | SPI_CPOL, | 369 | .mode = SPI_CPHA | SPI_CPOL, |
431 | }, | 370 | }, |
432 | #endif | 371 | #endif |
@@ -479,8 +418,13 @@ static struct resource bfin_uart0_resources[] = { | |||
479 | .flags = IORESOURCE_MEM, | 418 | .flags = IORESOURCE_MEM, |
480 | }, | 419 | }, |
481 | { | 420 | { |
421 | .start = IRQ_UART0_TX, | ||
422 | .end = IRQ_UART0_TX, | ||
423 | .flags = IORESOURCE_IRQ, | ||
424 | }, | ||
425 | { | ||
482 | .start = IRQ_UART0_RX, | 426 | .start = IRQ_UART0_RX, |
483 | .end = IRQ_UART0_RX+1, | 427 | .end = IRQ_UART0_RX, |
484 | .flags = IORESOURCE_IRQ, | 428 | .flags = IORESOURCE_IRQ, |
485 | }, | 429 | }, |
486 | { | 430 | { |
@@ -522,8 +466,13 @@ static struct resource bfin_uart1_resources[] = { | |||
522 | .flags = IORESOURCE_MEM, | 466 | .flags = IORESOURCE_MEM, |
523 | }, | 467 | }, |
524 | { | 468 | { |
469 | .start = IRQ_UART1_TX, | ||
470 | .end = IRQ_UART1_TX, | ||
471 | .flags = IORESOURCE_IRQ, | ||
472 | }, | ||
473 | { | ||
525 | .start = IRQ_UART1_RX, | 474 | .start = IRQ_UART1_RX, |
526 | .end = IRQ_UART1_RX+1, | 475 | .end = IRQ_UART1_RX, |
527 | .flags = IORESOURCE_IRQ, | 476 | .flags = IORESOURCE_IRQ, |
528 | }, | 477 | }, |
529 | { | 478 | { |
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c index e67ac7720668..3ecafff5d2ef 100644 --- a/arch/blackfin/mach-bf527/boards/ezkit.c +++ b/arch/blackfin/mach-bf527/boards/ezkit.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/device.h> | 9 | #include <linux/device.h> |
10 | #include <linux/export.h> | ||
10 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
11 | #include <linux/mtd/mtd.h> | 12 | #include <linux/mtd/mtd.h> |
12 | #include <linux/mtd/partitions.h> | 13 | #include <linux/mtd/partitions.h> |
@@ -409,6 +410,9 @@ static struct resource net2272_bfin_resources[] = { | |||
409 | .end = 0x20300000 + 0x100, | 410 | .end = 0x20300000 + 0x100, |
410 | .flags = IORESOURCE_MEM, | 411 | .flags = IORESOURCE_MEM, |
411 | }, { | 412 | }, { |
413 | .start = 1, | ||
414 | .flags = IORESOURCE_BUS, | ||
415 | }, { | ||
412 | .start = IRQ_PF7, | 416 | .start = IRQ_PF7, |
413 | .end = IRQ_PF7, | 417 | .end = IRQ_PF7, |
414 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | 418 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, |
@@ -448,40 +452,16 @@ static struct flash_platform_data bfin_spi_flash_data = { | |||
448 | /* SPI flash chip (m25p64) */ | 452 | /* SPI flash chip (m25p64) */ |
449 | static struct bfin5xx_spi_chip spi_flash_chip_info = { | 453 | static struct bfin5xx_spi_chip spi_flash_chip_info = { |
450 | .enable_dma = 0, /* use dma transfer with this chip*/ | 454 | .enable_dma = 0, /* use dma transfer with this chip*/ |
451 | .bits_per_word = 8, | ||
452 | }; | ||
453 | #endif | ||
454 | |||
455 | #if defined(CONFIG_BFIN_SPI_ADC) \ | ||
456 | || defined(CONFIG_BFIN_SPI_ADC_MODULE) | ||
457 | /* SPI ADC chip */ | ||
458 | static struct bfin5xx_spi_chip spi_adc_chip_info = { | ||
459 | .enable_dma = 1, /* use dma transfer with this chip*/ | ||
460 | .bits_per_word = 16, | ||
461 | }; | ||
462 | #endif | ||
463 | |||
464 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ | ||
465 | || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) | ||
466 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { | ||
467 | .enable_dma = 0, | ||
468 | .bits_per_word = 16, | ||
469 | }; | 455 | }; |
470 | #endif | 456 | #endif |
471 | 457 | ||
472 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | 458 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) |
473 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { | 459 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { |
474 | .enable_dma = 0, | 460 | .enable_dma = 0, |
475 | .bits_per_word = 8, | ||
476 | }; | 461 | }; |
477 | #endif | 462 | #endif |
478 | 463 | ||
479 | #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) | 464 | #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) |
480 | static struct bfin5xx_spi_chip spi_ad7877_chip_info = { | ||
481 | .enable_dma = 0, | ||
482 | .bits_per_word = 16, | ||
483 | }; | ||
484 | |||
485 | static const struct ad7877_platform_data bfin_ad7877_ts_info = { | 465 | static const struct ad7877_platform_data bfin_ad7877_ts_info = { |
486 | .model = 7877, | 466 | .model = 7877, |
487 | .vref_delay_usecs = 50, /* internal, no capacitor */ | 467 | .vref_delay_usecs = 50, /* internal, no capacitor */ |
@@ -513,20 +493,6 @@ static const struct ad7879_platform_data bfin_ad7879_ts_info = { | |||
513 | }; | 493 | }; |
514 | #endif | 494 | #endif |
515 | 495 | ||
516 | #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) | ||
517 | static struct bfin5xx_spi_chip spi_ad7879_chip_info = { | ||
518 | .enable_dma = 0, | ||
519 | .bits_per_word = 16, | ||
520 | }; | ||
521 | #endif | ||
522 | |||
523 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) | ||
524 | static struct bfin5xx_spi_chip spidev_chip_info = { | ||
525 | .enable_dma = 0, | ||
526 | .bits_per_word = 8, | ||
527 | }; | ||
528 | #endif | ||
529 | |||
530 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \ | 496 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \ |
531 | defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) | 497 | defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) |
532 | 498 | ||
@@ -574,9 +540,25 @@ static struct resource bfin_snd_resources[][4] = { | |||
574 | BFIN_SND_RES(0), | 540 | BFIN_SND_RES(0), |
575 | BFIN_SND_RES(1), | 541 | BFIN_SND_RES(1), |
576 | }; | 542 | }; |
543 | #endif | ||
577 | 544 | ||
578 | static struct platform_device bfin_pcm = { | 545 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) |
579 | .name = "bfin-pcm-audio", | 546 | static struct platform_device bfin_i2s_pcm = { |
547 | .name = "bfin-i2s-pcm-audio", | ||
548 | .id = -1, | ||
549 | }; | ||
550 | #endif | ||
551 | |||
552 | #if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) | ||
553 | static struct platform_device bfin_tdm_pcm = { | ||
554 | .name = "bfin-tdm-pcm-audio", | ||
555 | .id = -1, | ||
556 | }; | ||
557 | #endif | ||
558 | |||
559 | #if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) | ||
560 | static struct platform_device bfin_ac97_pcm = { | ||
561 | .name = "bfin-ac97-pcm-audio", | ||
580 | .id = -1, | 562 | .id = -1, |
581 | }; | 563 | }; |
582 | #endif | 564 | #endif |
@@ -605,13 +587,6 @@ static struct platform_device bfin_tdm = { | |||
605 | }; | 587 | }; |
606 | #endif | 588 | #endif |
607 | 589 | ||
608 | #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) | ||
609 | static struct bfin5xx_spi_chip lq035q1_spi_chip_info = { | ||
610 | .enable_dma = 0, | ||
611 | .bits_per_word = 8, | ||
612 | }; | ||
613 | #endif | ||
614 | |||
615 | static struct spi_board_info bfin_spi_board_info[] __initdata = { | 590 | static struct spi_board_info bfin_spi_board_info[] __initdata = { |
616 | #if defined(CONFIG_MTD_M25P80) \ | 591 | #if defined(CONFIG_MTD_M25P80) \ |
617 | || defined(CONFIG_MTD_M25P80_MODULE) | 592 | || defined(CONFIG_MTD_M25P80_MODULE) |
@@ -627,18 +602,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
627 | }, | 602 | }, |
628 | #endif | 603 | #endif |
629 | 604 | ||
630 | #if defined(CONFIG_BFIN_SPI_ADC) \ | ||
631 | || defined(CONFIG_BFIN_SPI_ADC_MODULE) | ||
632 | { | ||
633 | .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ | ||
634 | .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ | ||
635 | .bus_num = 0, /* Framework bus number */ | ||
636 | .chip_select = 1, /* Framework chip select. */ | ||
637 | .platform_data = NULL, /* No spi_driver specific config */ | ||
638 | .controller_data = &spi_adc_chip_info, | ||
639 | }, | ||
640 | #endif | ||
641 | |||
642 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ | 605 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ |
643 | || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) | 606 | || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) |
644 | { | 607 | { |
@@ -647,7 +610,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
647 | .bus_num = 0, | 610 | .bus_num = 0, |
648 | .chip_select = 4, | 611 | .chip_select = 4, |
649 | .platform_data = "ad1836", | 612 | .platform_data = "ad1836", |
650 | .controller_data = &ad1836_spi_chip_info, | ||
651 | .mode = SPI_MODE_3, | 613 | .mode = SPI_MODE_3, |
652 | }, | 614 | }, |
653 | #endif | 615 | #endif |
@@ -670,7 +632,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
670 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ | 632 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ |
671 | .bus_num = 0, | 633 | .bus_num = 0, |
672 | .chip_select = 2, | 634 | .chip_select = 2, |
673 | .controller_data = &spi_ad7877_chip_info, | ||
674 | }, | 635 | }, |
675 | #endif | 636 | #endif |
676 | #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) | 637 | #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) |
@@ -681,7 +642,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
681 | .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ | 642 | .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ |
682 | .bus_num = 0, | 643 | .bus_num = 0, |
683 | .chip_select = 3, | 644 | .chip_select = 3, |
684 | .controller_data = &spi_ad7879_chip_info, | ||
685 | .mode = SPI_CPHA | SPI_CPOL, | 645 | .mode = SPI_CPHA | SPI_CPOL, |
686 | }, | 646 | }, |
687 | #endif | 647 | #endif |
@@ -691,7 +651,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
691 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 651 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
692 | .bus_num = 0, | 652 | .bus_num = 0, |
693 | .chip_select = 1, | 653 | .chip_select = 1, |
694 | .controller_data = &spidev_chip_info, | ||
695 | }, | 654 | }, |
696 | #endif | 655 | #endif |
697 | #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) | 656 | #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) |
@@ -700,7 +659,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
700 | .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ | 659 | .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ |
701 | .bus_num = 0, | 660 | .bus_num = 0, |
702 | .chip_select = 7, | 661 | .chip_select = 7, |
703 | .controller_data = &lq035q1_spi_chip_info, | ||
704 | .mode = SPI_CPHA | SPI_CPOL, | 662 | .mode = SPI_CPHA | SPI_CPOL, |
705 | }, | 663 | }, |
706 | #endif | 664 | #endif |
@@ -753,8 +711,13 @@ static struct resource bfin_uart0_resources[] = { | |||
753 | .flags = IORESOURCE_MEM, | 711 | .flags = IORESOURCE_MEM, |
754 | }, | 712 | }, |
755 | { | 713 | { |
714 | .start = IRQ_UART0_TX, | ||
715 | .end = IRQ_UART0_TX, | ||
716 | .flags = IORESOURCE_IRQ, | ||
717 | }, | ||
718 | { | ||
756 | .start = IRQ_UART0_RX, | 719 | .start = IRQ_UART0_RX, |
757 | .end = IRQ_UART0_RX+1, | 720 | .end = IRQ_UART0_RX, |
758 | .flags = IORESOURCE_IRQ, | 721 | .flags = IORESOURCE_IRQ, |
759 | }, | 722 | }, |
760 | { | 723 | { |
@@ -796,8 +759,13 @@ static struct resource bfin_uart1_resources[] = { | |||
796 | .flags = IORESOURCE_MEM, | 759 | .flags = IORESOURCE_MEM, |
797 | }, | 760 | }, |
798 | { | 761 | { |
762 | .start = IRQ_UART1_TX, | ||
763 | .end = IRQ_UART1_TX, | ||
764 | .flags = IORESOURCE_IRQ, | ||
765 | }, | ||
766 | { | ||
799 | .start = IRQ_UART1_RX, | 767 | .start = IRQ_UART1_RX, |
800 | .end = IRQ_UART1_RX+1, | 768 | .end = IRQ_UART1_RX, |
801 | .flags = IORESOURCE_IRQ, | 769 | .flags = IORESOURCE_IRQ, |
802 | }, | 770 | }, |
803 | { | 771 | { |
@@ -1276,9 +1244,16 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
1276 | &ezkit_flash_device, | 1244 | &ezkit_flash_device, |
1277 | #endif | 1245 | #endif |
1278 | 1246 | ||
1279 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \ | 1247 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) |
1280 | defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) | 1248 | &bfin_i2s_pcm, |
1281 | &bfin_pcm, | 1249 | #endif |
1250 | |||
1251 | #if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) | ||
1252 | &bfin_tdm_pcm, | ||
1253 | #endif | ||
1254 | |||
1255 | #if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) | ||
1256 | &bfin_ac97_pcm, | ||
1282 | #endif | 1257 | #endif |
1283 | 1258 | ||
1284 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) | 1259 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) |
diff --git a/arch/blackfin/mach-bf527/boards/tll6527m.c b/arch/blackfin/mach-bf527/boards/tll6527m.c index 18d303dd5627..3a92c4318d2d 100644 --- a/arch/blackfin/mach-bf527/boards/tll6527m.c +++ b/arch/blackfin/mach-bf527/boards/tll6527m.c | |||
@@ -8,6 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/device.h> | 10 | #include <linux/device.h> |
11 | #include <linux/export.h> | ||
11 | #include <linux/platform_device.h> | 12 | #include <linux/platform_device.h> |
12 | #include <linux/mtd/mtd.h> | 13 | #include <linux/mtd/mtd.h> |
13 | #include <linux/mtd/partitions.h> | 14 | #include <linux/mtd/partitions.h> |
@@ -314,29 +315,12 @@ static struct flash_platform_data bfin_spi_flash_data = { | |||
314 | /* SPI flash chip (m25p64) */ | 315 | /* SPI flash chip (m25p64) */ |
315 | static struct bfin5xx_spi_chip spi_flash_chip_info = { | 316 | static struct bfin5xx_spi_chip spi_flash_chip_info = { |
316 | .enable_dma = 0, /* use dma transfer with this chip*/ | 317 | .enable_dma = 0, /* use dma transfer with this chip*/ |
317 | .bits_per_word = 8, | ||
318 | }; | ||
319 | #endif | ||
320 | |||
321 | #if defined(CONFIG_BFIN_SPI_ADC) \ | ||
322 | || defined(CONFIG_BFIN_SPI_ADC_MODULE) | ||
323 | /* SPI ADC chip */ | ||
324 | static struct bfin5xx_spi_chip spi_adc_chip_info = { | ||
325 | .enable_dma = 0, /* use dma transfer with this chip*/ | ||
326 | /* | ||
327 | * tll6527m V1.0 does not support native spi slave selects | ||
328 | * hence DMA mode will not be useful since the ADC needs | ||
329 | * CS to toggle for each sample and cs_change_per_word | ||
330 | * seems to be removed from spi_bfin5xx.c | ||
331 | */ | ||
332 | .bits_per_word = 16, | ||
333 | }; | 318 | }; |
334 | #endif | 319 | #endif |
335 | 320 | ||
336 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | 321 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) |
337 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { | 322 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { |
338 | .enable_dma = 0, | 323 | .enable_dma = 0, |
339 | .bits_per_word = 8, | ||
340 | }; | 324 | }; |
341 | #endif | 325 | #endif |
342 | 326 | ||
@@ -359,21 +343,6 @@ static const struct ad7879_platform_data bfin_ad7879_ts_info = { | |||
359 | }; | 343 | }; |
360 | #endif | 344 | #endif |
361 | 345 | ||
362 | #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) \ | ||
363 | || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) | ||
364 | static struct bfin5xx_spi_chip spi_ad7879_chip_info = { | ||
365 | .enable_dma = 0, | ||
366 | .bits_per_word = 16, | ||
367 | }; | ||
368 | #endif | ||
369 | |||
370 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) | ||
371 | static struct bfin5xx_spi_chip spidev_chip_info = { | ||
372 | .enable_dma = 0, | ||
373 | .bits_per_word = 8, | ||
374 | }; | ||
375 | #endif | ||
376 | |||
377 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) | 346 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) |
378 | static struct platform_device bfin_i2s = { | 347 | static struct platform_device bfin_i2s = { |
379 | .name = "bfin-i2s", | 348 | .name = "bfin-i2s", |
@@ -382,24 +351,7 @@ static struct platform_device bfin_i2s = { | |||
382 | }; | 351 | }; |
383 | #endif | 352 | #endif |
384 | 353 | ||
385 | #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) | ||
386 | static struct bfin5xx_spi_chip lq035q1_spi_chip_info = { | ||
387 | .enable_dma = 0, | ||
388 | .bits_per_word = 8, | ||
389 | }; | ||
390 | #endif | ||
391 | |||
392 | #if defined(CONFIG_GPIO_MCP23S08) || defined(CONFIG_GPIO_MCP23S08_MODULE) | 354 | #if defined(CONFIG_GPIO_MCP23S08) || defined(CONFIG_GPIO_MCP23S08_MODULE) |
393 | static struct bfin5xx_spi_chip spi_mcp23s08_sys_chip_info = { | ||
394 | .enable_dma = 0, | ||
395 | .bits_per_word = 8, | ||
396 | }; | ||
397 | |||
398 | static struct bfin5xx_spi_chip spi_mcp23s08_usr_chip_info = { | ||
399 | .enable_dma = 0, | ||
400 | .bits_per_word = 8, | ||
401 | }; | ||
402 | |||
403 | #include <linux/spi/mcp23s08.h> | 355 | #include <linux/spi/mcp23s08.h> |
404 | static const struct mcp23s08_platform_data bfin_mcp23s08_sys_gpio_info = { | 356 | static const struct mcp23s08_platform_data bfin_mcp23s08_sys_gpio_info = { |
405 | .chip[0].is_present = true, | 357 | .chip[0].is_present = true, |
@@ -429,22 +381,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
429 | }, | 381 | }, |
430 | #endif | 382 | #endif |
431 | 383 | ||
432 | #if defined(CONFIG_BFIN_SPI_ADC) | ||
433 | || defined(CONFIG_BFIN_SPI_ADC_MODULE) | ||
434 | { | ||
435 | .modalias = "bfin_spi_adc", | ||
436 | /* Name of spi_driver for this device */ | ||
437 | .max_speed_hz = 10000000, | ||
438 | /* max spi clock (SCK) speed in HZ */ | ||
439 | .bus_num = 0, /* Framework bus number */ | ||
440 | .chip_select = EXP_GPIO_SPISEL_BASE + 0x04 + MAX_CTRL_CS, | ||
441 | /* Framework chip select. */ | ||
442 | .platform_data = NULL, /* No spi_driver specific config */ | ||
443 | .controller_data = &spi_adc_chip_info, | ||
444 | .mode = SPI_MODE_0, | ||
445 | }, | ||
446 | #endif | ||
447 | |||
448 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | 384 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) |
449 | { | 385 | { |
450 | .modalias = "mmc_spi", | 386 | .modalias = "mmc_spi", |
@@ -470,7 +406,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
470 | /* max spi clock (SCK) speed in HZ */ | 406 | /* max spi clock (SCK) speed in HZ */ |
471 | .bus_num = 0, | 407 | .bus_num = 0, |
472 | .chip_select = EXP_GPIO_SPISEL_BASE + 0x07 + MAX_CTRL_CS, | 408 | .chip_select = EXP_GPIO_SPISEL_BASE + 0x07 + MAX_CTRL_CS, |
473 | .controller_data = &spi_ad7879_chip_info, | ||
474 | .mode = SPI_CPHA | SPI_CPOL, | 409 | .mode = SPI_CPHA | SPI_CPOL, |
475 | }, | 410 | }, |
476 | #endif | 411 | #endif |
@@ -482,7 +417,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
482 | .bus_num = 0, | 417 | .bus_num = 0, |
483 | .chip_select = EXP_GPIO_SPISEL_BASE + 0x03 + MAX_CTRL_CS, | 418 | .chip_select = EXP_GPIO_SPISEL_BASE + 0x03 + MAX_CTRL_CS, |
484 | .mode = SPI_CPHA | SPI_CPOL, | 419 | .mode = SPI_CPHA | SPI_CPOL, |
485 | .controller_data = &spidev_chip_info, | ||
486 | }, | 420 | }, |
487 | #endif | 421 | #endif |
488 | #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) | 422 | #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) |
@@ -491,7 +425,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
491 | .max_speed_hz = 20000000, | 425 | .max_speed_hz = 20000000, |
492 | .bus_num = 0, | 426 | .bus_num = 0, |
493 | .chip_select = EXP_GPIO_SPISEL_BASE + 0x06 + MAX_CTRL_CS, | 427 | .chip_select = EXP_GPIO_SPISEL_BASE + 0x06 + MAX_CTRL_CS, |
494 | .controller_data = &lq035q1_spi_chip_info, | ||
495 | .mode = SPI_CPHA | SPI_CPOL, | 428 | .mode = SPI_CPHA | SPI_CPOL, |
496 | }, | 429 | }, |
497 | #endif | 430 | #endif |
@@ -502,7 +435,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
502 | .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ | 435 | .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ |
503 | .bus_num = 0, | 436 | .bus_num = 0, |
504 | .chip_select = EXP_GPIO_SPISEL_BASE + 0x01 + MAX_CTRL_CS, | 437 | .chip_select = EXP_GPIO_SPISEL_BASE + 0x01 + MAX_CTRL_CS, |
505 | .controller_data = &spi_mcp23s08_sys_chip_info, | ||
506 | .mode = SPI_CPHA | SPI_CPOL, | 438 | .mode = SPI_CPHA | SPI_CPOL, |
507 | }, | 439 | }, |
508 | { | 440 | { |
@@ -511,7 +443,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
511 | .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ | 443 | .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ |
512 | .bus_num = 0, | 444 | .bus_num = 0, |
513 | .chip_select = EXP_GPIO_SPISEL_BASE + 0x02 + MAX_CTRL_CS, | 445 | .chip_select = EXP_GPIO_SPISEL_BASE + 0x02 + MAX_CTRL_CS, |
514 | .controller_data = &spi_mcp23s08_usr_chip_info, | ||
515 | .mode = SPI_CPHA | SPI_CPOL, | 446 | .mode = SPI_CPHA | SPI_CPOL, |
516 | }, | 447 | }, |
517 | #endif | 448 | #endif |
@@ -565,8 +496,13 @@ static struct resource bfin_uart0_resources[] = { | |||
565 | .flags = IORESOURCE_MEM, | 496 | .flags = IORESOURCE_MEM, |
566 | }, | 497 | }, |
567 | { | 498 | { |
499 | .start = IRQ_UART0_TX, | ||
500 | .end = IRQ_UART0_TX, | ||
501 | .flags = IORESOURCE_IRQ, | ||
502 | }, | ||
503 | { | ||
568 | .start = IRQ_UART0_RX, | 504 | .start = IRQ_UART0_RX, |
569 | .end = IRQ_UART0_RX+1, | 505 | .end = IRQ_UART0_RX, |
570 | .flags = IORESOURCE_IRQ, | 506 | .flags = IORESOURCE_IRQ, |
571 | }, | 507 | }, |
572 | { | 508 | { |
@@ -609,8 +545,13 @@ static struct resource bfin_uart1_resources[] = { | |||
609 | .flags = IORESOURCE_MEM, | 545 | .flags = IORESOURCE_MEM, |
610 | }, | 546 | }, |
611 | { | 547 | { |
548 | .start = IRQ_UART1_TX, | ||
549 | .end = IRQ_UART1_TX, | ||
550 | .flags = IORESOURCE_IRQ, | ||
551 | }, | ||
552 | { | ||
612 | .start = IRQ_UART1_RX, | 553 | .start = IRQ_UART1_RX, |
613 | .end = IRQ_UART1_RX+1, | 554 | .end = IRQ_UART1_RX, |
614 | .flags = IORESOURCE_IRQ, | 555 | .flags = IORESOURCE_IRQ, |
615 | }, | 556 | }, |
616 | { | 557 | { |
diff --git a/arch/blackfin/mach-bf527/include/mach/anomaly.h b/arch/blackfin/mach-bf527/include/mach/anomaly.h index e66a7e89cd3c..688470611e15 100644 --- a/arch/blackfin/mach-bf527/include/mach/anomaly.h +++ b/arch/blackfin/mach-bf527/include/mach/anomaly.h | |||
@@ -11,8 +11,8 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | /* This file should be up to date with: | 13 | /* This file should be up to date with: |
14 | * - Revision E, 03/15/2010; ADSP-BF526 Blackfin Processor Anomaly List | 14 | * - Revision F, 05/23/2011; ADSP-BF526 Blackfin Processor Anomaly List |
15 | * - Revision H, 04/29/2010; ADSP-BF527 Blackfin Processor Anomaly List | 15 | * - Revision I, 05/23/2011; ADSP-BF527 Blackfin Processor Anomaly List |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #ifndef _MACH_ANOMALY_H_ | 18 | #ifndef _MACH_ANOMALY_H_ |
@@ -57,7 +57,7 @@ | |||
57 | /* Incorrect Access of OTP_STATUS During otp_write() Function */ | 57 | /* Incorrect Access of OTP_STATUS During otp_write() Function */ |
58 | #define ANOMALY_05000328 (_ANOMALY_BF527(< 2)) | 58 | #define ANOMALY_05000328 (_ANOMALY_BF527(< 2)) |
59 | /* Host DMA Boot Modes Are Not Functional */ | 59 | /* Host DMA Boot Modes Are Not Functional */ |
60 | #define ANOMALY_05000330 (__SILICON_REVISION__ < 2) | 60 | #define ANOMALY_05000330 (_ANOMALY_BF527(< 2)) |
61 | /* Disallowed Configuration Prevents Subsequent Allowed Configuration on Host DMA Port */ | 61 | /* Disallowed Configuration Prevents Subsequent Allowed Configuration on Host DMA Port */ |
62 | #define ANOMALY_05000337 (_ANOMALY_BF527(< 2)) | 62 | #define ANOMALY_05000337 (_ANOMALY_BF527(< 2)) |
63 | /* Ethernet MAC MDIO Reads Do Not Meet IEEE Specification */ | 63 | /* Ethernet MAC MDIO Reads Do Not Meet IEEE Specification */ |
@@ -135,7 +135,7 @@ | |||
135 | /* Incorrect Default Internal Voltage Regulator Setting */ | 135 | /* Incorrect Default Internal Voltage Regulator Setting */ |
136 | #define ANOMALY_05000410 (_ANOMALY_BF527(< 2)) | 136 | #define ANOMALY_05000410 (_ANOMALY_BF527(< 2)) |
137 | /* bfrom_SysControl() Firmware Function Cannot be Used to Enter Power Saving Modes */ | 137 | /* bfrom_SysControl() Firmware Function Cannot be Used to Enter Power Saving Modes */ |
138 | #define ANOMALY_05000411 (_ANOMALY_BF526_BF527(< 1, < 2)) | 138 | #define ANOMALY_05000411 (_ANOMALY_BF526(< 1)) |
139 | /* OTP_CHECK_FOR_PREV_WRITE Bit is Not Functional in bfrom_OtpWrite() API */ | 139 | /* OTP_CHECK_FOR_PREV_WRITE Bit is Not Functional in bfrom_OtpWrite() API */ |
140 | #define ANOMALY_05000414 (_ANOMALY_BF526_BF527(< 1, < 2)) | 140 | #define ANOMALY_05000414 (_ANOMALY_BF526_BF527(< 1, < 2)) |
141 | /* DEB2_URGENT Bit Not Functional */ | 141 | /* DEB2_URGENT Bit Not Functional */ |
@@ -181,11 +181,11 @@ | |||
181 | /* IFLUSH Instruction at End of Hardware Loop Causes Infinite Stall */ | 181 | /* IFLUSH Instruction at End of Hardware Loop Causes Infinite Stall */ |
182 | #define ANOMALY_05000443 (1) | 182 | #define ANOMALY_05000443 (1) |
183 | /* The WURESET Bit in the SYSCR Register is not Functional */ | 183 | /* The WURESET Bit in the SYSCR Register is not Functional */ |
184 | #define ANOMALY_05000445 (1) | 184 | #define ANOMALY_05000445 (_ANOMALY_BF527(>= 0)) |
185 | /* USB DMA Mode 1 Short Packet Data Corruption */ | 185 | /* USB DMA Short Packet Data Corruption */ |
186 | #define ANOMALY_05000450 (1) | 186 | #define ANOMALY_05000450 (1) |
187 | /* BCODE_QUICKBOOT, BCODE_ALLBOOT, and BCODE_FULLBOOT Settings in SYSCR Register Not Functional */ | 187 | /* BCODE_QUICKBOOT, BCODE_ALLBOOT, and BCODE_FULLBOOT Settings in SYSCR Register Not Functional */ |
188 | #define ANOMALY_05000451 (1) | 188 | #define ANOMALY_05000451 (_ANOMALY_BF527(>= 0)) |
189 | /* Incorrect Default Hysteresis Setting for RESET, NMI, and BMODE Signals */ | 189 | /* Incorrect Default Hysteresis Setting for RESET, NMI, and BMODE Signals */ |
190 | #define ANOMALY_05000452 (_ANOMALY_BF526_BF527(< 1, >= 0)) | 190 | #define ANOMALY_05000452 (_ANOMALY_BF526_BF527(< 1, >= 0)) |
191 | /* USB Receive Interrupt Is Not Generated in DMA Mode 1 */ | 191 | /* USB Receive Interrupt Is Not Generated in DMA Mode 1 */ |
@@ -198,19 +198,19 @@ | |||
198 | #define ANOMALY_05000461 (1) | 198 | #define ANOMALY_05000461 (1) |
199 | /* Synchronization Problem at Startup May Cause SPORT Transmit Channels to Misalign */ | 199 | /* Synchronization Problem at Startup May Cause SPORT Transmit Channels to Misalign */ |
200 | #define ANOMALY_05000462 (1) | 200 | #define ANOMALY_05000462 (1) |
201 | /* USB Rx DMA hang */ | 201 | /* USB Rx DMA Hang */ |
202 | #define ANOMALY_05000465 (1) | 202 | #define ANOMALY_05000465 (1) |
203 | /* TxPktRdy Bit Not Set for Transmit Endpoint When Core and DMA Access USB Endpoint FIFOs Simultaneously */ | 203 | /* TxPktRdy Bit Not Set for Transmit Endpoint When Core and DMA Access USB Endpoint FIFOs Simultaneously */ |
204 | #define ANOMALY_05000466 (1) | 204 | #define ANOMALY_05000466 (1) |
205 | /* Possible RX data corruption when control & data EP FIFOs are accessed via the core */ | 205 | /* Possible USB RX Data Corruption When Control & Data EP FIFOs are Accessed via the Core */ |
206 | #define ANOMALY_05000467 (1) | 206 | #define ANOMALY_05000467 (1) |
207 | /* PLL Latches Incorrect Settings During Reset */ | 207 | /* PLL Latches Incorrect Settings During Reset */ |
208 | #define ANOMALY_05000469 (1) | 208 | #define ANOMALY_05000469 (1) |
209 | /* Incorrect Default MSEL Value in PLL_CTL */ | 209 | /* Incorrect Default MSEL Value in PLL_CTL */ |
210 | #define ANOMALY_05000472 (_ANOMALY_BF526(>= 0)) | 210 | #define ANOMALY_05000472 (_ANOMALY_BF526(>= 0)) |
211 | /* Interrupted 32-Bit SPORT Data Register Access Results In Underflow */ | 211 | /* Interrupted SPORT Receive Data Register Read Results In Underflow when SLEN > 15 */ |
212 | #define ANOMALY_05000473 (1) | 212 | #define ANOMALY_05000473 (1) |
213 | /* Possible Lockup Condition whem Modifying PLL from External Memory */ | 213 | /* Possible Lockup Condition when Modifying PLL from External Memory */ |
214 | #define ANOMALY_05000475 (1) | 214 | #define ANOMALY_05000475 (1) |
215 | /* TESTSET Instruction Cannot Be Interrupted */ | 215 | /* TESTSET Instruction Cannot Be Interrupted */ |
216 | #define ANOMALY_05000477 (1) | 216 | #define ANOMALY_05000477 (1) |
@@ -219,11 +219,19 @@ | |||
219 | /* Possible USB Data Corruption When Multiple Endpoints Are Accessed by the Core */ | 219 | /* Possible USB Data Corruption When Multiple Endpoints Are Accessed by the Core */ |
220 | #define ANOMALY_05000483 (1) | 220 | #define ANOMALY_05000483 (1) |
221 | /* PLL_CTL Change Using bfrom_SysControl() Can Result in Processor Overclocking */ | 221 | /* PLL_CTL Change Using bfrom_SysControl() Can Result in Processor Overclocking */ |
222 | #define ANOMALY_05000485 (_ANOMALY_BF526_BF527(< 2, < 3)) | 222 | #define ANOMALY_05000485 (_ANOMALY_BF526_BF527(< 2, >= 0)) |
223 | /* The CODEC Zero-Cross Detect Feature is not Functional */ | 223 | /* The CODEC Zero-Cross Detect Feature is not Functional */ |
224 | #define ANOMALY_05000487 (1) | 224 | #define ANOMALY_05000487 (1) |
225 | /* IFLUSH sucks at life */ | 225 | /* SPI Master Boot Can Fail Under Certain Conditions */ |
226 | #define ANOMALY_05000490 (1) | ||
227 | /* Instruction Memory Stalls Can Cause IFLUSH to Fail */ | ||
226 | #define ANOMALY_05000491 (1) | 228 | #define ANOMALY_05000491 (1) |
229 | /* EXCPT Instruction May Be Lost If NMI Happens Simultaneously */ | ||
230 | #define ANOMALY_05000494 (1) | ||
231 | /* CNT_COMMAND Functionality Depends on CNT_IMASK Configuration */ | ||
232 | #define ANOMALY_05000498 (1) | ||
233 | /* RXS Bit in SPI_STAT May Become Stuck In RX DMA Modes */ | ||
234 | #define ANOMALY_05000501 (1) | ||
227 | 235 | ||
228 | /* Anomalies that don't exist on this proc */ | 236 | /* Anomalies that don't exist on this proc */ |
229 | #define ANOMALY_05000099 (0) | 237 | #define ANOMALY_05000099 (0) |
diff --git a/arch/blackfin/mach-bf533/boards/H8606.c b/arch/blackfin/mach-bf533/boards/H8606.c index d4bfcea56828..47cadd316e76 100644 --- a/arch/blackfin/mach-bf533/boards/H8606.c +++ b/arch/blackfin/mach-bf533/boards/H8606.c | |||
@@ -54,7 +54,8 @@ static struct resource dm9000_resources[] = { | |||
54 | [2] = { | 54 | [2] = { |
55 | .start = IRQ_PF10, | 55 | .start = IRQ_PF10, |
56 | .end = IRQ_PF10, | 56 | .end = IRQ_PF10, |
57 | .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE | IRQF_SHARED | IRQF_TRIGGER_HIGH), | 57 | .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE | |
58 | IORESOURCE_IRQ_SHAREABLE), | ||
58 | }, | 59 | }, |
59 | }; | 60 | }; |
60 | 61 | ||
@@ -159,22 +160,6 @@ static struct flash_platform_data bfin_spi_flash_data = { | |||
159 | /* SPI flash chip (m25p64) */ | 160 | /* SPI flash chip (m25p64) */ |
160 | static struct bfin5xx_spi_chip spi_flash_chip_info = { | 161 | static struct bfin5xx_spi_chip spi_flash_chip_info = { |
161 | .enable_dma = 0, /* use dma transfer with this chip*/ | 162 | .enable_dma = 0, /* use dma transfer with this chip*/ |
162 | .bits_per_word = 8, | ||
163 | }; | ||
164 | #endif | ||
165 | |||
166 | #if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE) | ||
167 | /* SPI ADC chip */ | ||
168 | static struct bfin5xx_spi_chip spi_adc_chip_info = { | ||
169 | .enable_dma = 1, /* use dma transfer with this chip*/ | ||
170 | .bits_per_word = 16, | ||
171 | }; | ||
172 | #endif | ||
173 | |||
174 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) | ||
175 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { | ||
176 | .enable_dma = 0, | ||
177 | .bits_per_word = 16, | ||
178 | }; | 163 | }; |
179 | #endif | 164 | #endif |
180 | 165 | ||
@@ -195,24 +180,12 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
195 | }, | 180 | }, |
196 | #endif | 181 | #endif |
197 | 182 | ||
198 | #if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE) | ||
199 | { | ||
200 | .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ | ||
201 | .max_speed_hz = 4, /* actual baudrate is SCLK/(2xspeed_hz) */ | ||
202 | .bus_num = 1, /* Framework bus number */ | ||
203 | .chip_select = 1, /* Framework chip select. */ | ||
204 | .platform_data = NULL, /* No spi_driver specific config */ | ||
205 | .controller_data = &spi_adc_chip_info, | ||
206 | }, | ||
207 | #endif | ||
208 | |||
209 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) | 183 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) |
210 | { | 184 | { |
211 | .modalias = "ad183x", | 185 | .modalias = "ad183x", |
212 | .max_speed_hz = 16, | 186 | .max_speed_hz = 16, |
213 | .bus_num = 1, | 187 | .bus_num = 1, |
214 | .chip_select = 4, | 188 | .chip_select = 4, |
215 | .controller_data = &ad1836_spi_chip_info, | ||
216 | }, | 189 | }, |
217 | #endif | 190 | #endif |
218 | 191 | ||
@@ -265,8 +238,13 @@ static struct resource bfin_uart0_resources[] = { | |||
265 | .flags = IORESOURCE_MEM, | 238 | .flags = IORESOURCE_MEM, |
266 | }, | 239 | }, |
267 | { | 240 | { |
241 | .start = IRQ_UART0_TX, | ||
242 | .end = IRQ_UART0_TX, | ||
243 | .flags = IORESOURCE_IRQ, | ||
244 | }, | ||
245 | { | ||
268 | .start = IRQ_UART0_RX, | 246 | .start = IRQ_UART0_RX, |
269 | .end = IRQ_UART0_RX + 1, | 247 | .end = IRQ_UART0_RX, |
270 | .flags = IORESOURCE_IRQ, | 248 | .flags = IORESOURCE_IRQ, |
271 | }, | 249 | }, |
272 | { | 250 | { |
diff --git a/arch/blackfin/mach-bf533/boards/blackstamp.c b/arch/blackfin/mach-bf533/boards/blackstamp.c index 87b5af3693c1..18817d57c7a1 100644 --- a/arch/blackfin/mach-bf533/boards/blackstamp.c +++ b/arch/blackfin/mach-bf533/boards/blackstamp.c | |||
@@ -102,21 +102,12 @@ static struct flash_platform_data bfin_spi_flash_data = { | |||
102 | /* SPI flash chip (m25p64) */ | 102 | /* SPI flash chip (m25p64) */ |
103 | static struct bfin5xx_spi_chip spi_flash_chip_info = { | 103 | static struct bfin5xx_spi_chip spi_flash_chip_info = { |
104 | .enable_dma = 0, /* use dma transfer with this chip*/ | 104 | .enable_dma = 0, /* use dma transfer with this chip*/ |
105 | .bits_per_word = 8, | ||
106 | }; | 105 | }; |
107 | #endif | 106 | #endif |
108 | 107 | ||
109 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | 108 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) |
110 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { | 109 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { |
111 | .enable_dma = 0, | 110 | .enable_dma = 0, |
112 | .bits_per_word = 8, | ||
113 | }; | ||
114 | #endif | ||
115 | |||
116 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) | ||
117 | static struct bfin5xx_spi_chip spidev_chip_info = { | ||
118 | .enable_dma = 0, | ||
119 | .bits_per_word = 8, | ||
120 | }; | 111 | }; |
121 | #endif | 112 | #endif |
122 | 113 | ||
@@ -151,7 +142,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
151 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 142 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
152 | .bus_num = 0, | 143 | .bus_num = 0, |
153 | .chip_select = 7, | 144 | .chip_select = 7, |
154 | .controller_data = &spidev_chip_info, | ||
155 | }, | 145 | }, |
156 | #endif | 146 | #endif |
157 | }; | 147 | }; |
@@ -203,8 +193,13 @@ static struct resource bfin_uart0_resources[] = { | |||
203 | .flags = IORESOURCE_MEM, | 193 | .flags = IORESOURCE_MEM, |
204 | }, | 194 | }, |
205 | { | 195 | { |
196 | .start = IRQ_UART0_TX, | ||
197 | .end = IRQ_UART0_TX, | ||
198 | .flags = IORESOURCE_IRQ, | ||
199 | }, | ||
200 | { | ||
206 | .start = IRQ_UART0_RX, | 201 | .start = IRQ_UART0_RX, |
207 | .end = IRQ_UART0_RX + 1, | 202 | .end = IRQ_UART0_RX, |
208 | .flags = IORESOURCE_IRQ, | 203 | .flags = IORESOURCE_IRQ, |
209 | }, | 204 | }, |
210 | { | 205 | { |
diff --git a/arch/blackfin/mach-bf533/boards/cm_bf533.c b/arch/blackfin/mach-bf533/boards/cm_bf533.c index 4d5604eaa7c2..2c8f30ef6a7b 100644 --- a/arch/blackfin/mach-bf533/boards/cm_bf533.c +++ b/arch/blackfin/mach-bf533/boards/cm_bf533.c | |||
@@ -59,29 +59,12 @@ static struct flash_platform_data bfin_spi_flash_data = { | |||
59 | /* SPI flash chip (m25p64) */ | 59 | /* SPI flash chip (m25p64) */ |
60 | static struct bfin5xx_spi_chip spi_flash_chip_info = { | 60 | static struct bfin5xx_spi_chip spi_flash_chip_info = { |
61 | .enable_dma = 0, /* use dma transfer with this chip*/ | 61 | .enable_dma = 0, /* use dma transfer with this chip*/ |
62 | .bits_per_word = 8, | ||
63 | }; | ||
64 | #endif | ||
65 | |||
66 | /* SPI ADC chip */ | ||
67 | #if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE) | ||
68 | static struct bfin5xx_spi_chip spi_adc_chip_info = { | ||
69 | .enable_dma = 1, /* use dma transfer with this chip*/ | ||
70 | .bits_per_word = 16, | ||
71 | }; | ||
72 | #endif | ||
73 | |||
74 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) | ||
75 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { | ||
76 | .enable_dma = 0, | ||
77 | .bits_per_word = 16, | ||
78 | }; | 62 | }; |
79 | #endif | 63 | #endif |
80 | 64 | ||
81 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | 65 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) |
82 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { | 66 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { |
83 | .enable_dma = 0, | 67 | .enable_dma = 0, |
84 | .bits_per_word = 8, | ||
85 | }; | 68 | }; |
86 | #endif | 69 | #endif |
87 | 70 | ||
@@ -99,24 +82,12 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
99 | }, | 82 | }, |
100 | #endif | 83 | #endif |
101 | 84 | ||
102 | #if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE) | ||
103 | { | ||
104 | .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ | ||
105 | .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ | ||
106 | .bus_num = 0, /* Framework bus number */ | ||
107 | .chip_select = 2, /* Framework chip select. */ | ||
108 | .platform_data = NULL, /* No spi_driver specific config */ | ||
109 | .controller_data = &spi_adc_chip_info, | ||
110 | }, | ||
111 | #endif | ||
112 | |||
113 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) | 85 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) |
114 | { | 86 | { |
115 | .modalias = "ad183x", | 87 | .modalias = "ad183x", |
116 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 88 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
117 | .bus_num = 0, | 89 | .bus_num = 0, |
118 | .chip_select = 4, | 90 | .chip_select = 4, |
119 | .controller_data = &ad1836_spi_chip_info, | ||
120 | }, | 91 | }, |
121 | #endif | 92 | #endif |
122 | 93 | ||
@@ -250,8 +221,13 @@ static struct resource bfin_uart0_resources[] = { | |||
250 | .flags = IORESOURCE_MEM, | 221 | .flags = IORESOURCE_MEM, |
251 | }, | 222 | }, |
252 | { | 223 | { |
224 | .start = IRQ_UART0_TX, | ||
225 | .end = IRQ_UART0_TX, | ||
226 | .flags = IORESOURCE_IRQ, | ||
227 | }, | ||
228 | { | ||
253 | .start = IRQ_UART0_RX, | 229 | .start = IRQ_UART0_RX, |
254 | .end = IRQ_UART0_RX + 1, | 230 | .end = IRQ_UART0_RX, |
255 | .flags = IORESOURCE_IRQ, | 231 | .flags = IORESOURCE_IRQ, |
256 | }, | 232 | }, |
257 | { | 233 | { |
diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c index b67b91d82242..144556e14499 100644 --- a/arch/blackfin/mach-bf533/boards/ezkit.c +++ b/arch/blackfin/mach-bf533/boards/ezkit.c | |||
@@ -210,29 +210,6 @@ static struct flash_platform_data bfin_spi_flash_data = { | |||
210 | /* SPI flash chip (m25p64) */ | 210 | /* SPI flash chip (m25p64) */ |
211 | static struct bfin5xx_spi_chip spi_flash_chip_info = { | 211 | static struct bfin5xx_spi_chip spi_flash_chip_info = { |
212 | .enable_dma = 0, /* use dma transfer with this chip*/ | 212 | .enable_dma = 0, /* use dma transfer with this chip*/ |
213 | .bits_per_word = 8, | ||
214 | }; | ||
215 | #endif | ||
216 | |||
217 | #if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE) | ||
218 | /* SPI ADC chip */ | ||
219 | static struct bfin5xx_spi_chip spi_adc_chip_info = { | ||
220 | .enable_dma = 1, /* use dma transfer with this chip*/ | ||
221 | .bits_per_word = 16, | ||
222 | }; | ||
223 | #endif | ||
224 | |||
225 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) | ||
226 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { | ||
227 | .enable_dma = 0, | ||
228 | .bits_per_word = 16, | ||
229 | }; | ||
230 | #endif | ||
231 | |||
232 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) | ||
233 | static struct bfin5xx_spi_chip spidev_chip_info = { | ||
234 | .enable_dma = 0, | ||
235 | .bits_per_word = 8, | ||
236 | }; | 213 | }; |
237 | #endif | 214 | #endif |
238 | 215 | ||
@@ -250,24 +227,12 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
250 | }, | 227 | }, |
251 | #endif | 228 | #endif |
252 | 229 | ||
253 | #if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE) | ||
254 | { | ||
255 | .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ | ||
256 | .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ | ||
257 | .bus_num = 0, /* Framework bus number */ | ||
258 | .chip_select = 1, /* Framework chip select. */ | ||
259 | .platform_data = NULL, /* No spi_driver specific config */ | ||
260 | .controller_data = &spi_adc_chip_info, | ||
261 | }, | ||
262 | #endif | ||
263 | |||
264 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) | 230 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) |
265 | { | 231 | { |
266 | .modalias = "ad183x", | 232 | .modalias = "ad183x", |
267 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 233 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
268 | .bus_num = 0, | 234 | .bus_num = 0, |
269 | .chip_select = 4, | 235 | .chip_select = 4, |
270 | .controller_data = &ad1836_spi_chip_info, | ||
271 | }, | 236 | }, |
272 | #endif | 237 | #endif |
273 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) | 238 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) |
@@ -276,7 +241,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
276 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 241 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
277 | .bus_num = 0, | 242 | .bus_num = 0, |
278 | .chip_select = 1, | 243 | .chip_select = 1, |
279 | .controller_data = &spidev_chip_info, | ||
280 | }, | 244 | }, |
281 | #endif | 245 | #endif |
282 | }; | 246 | }; |
@@ -328,8 +292,13 @@ static struct resource bfin_uart0_resources[] = { | |||
328 | .flags = IORESOURCE_MEM, | 292 | .flags = IORESOURCE_MEM, |
329 | }, | 293 | }, |
330 | { | 294 | { |
295 | .start = IRQ_UART0_TX, | ||
296 | .end = IRQ_UART0_TX, | ||
297 | .flags = IORESOURCE_IRQ, | ||
298 | }, | ||
299 | { | ||
331 | .start = IRQ_UART0_RX, | 300 | .start = IRQ_UART0_RX, |
332 | .end = IRQ_UART0_RX + 1, | 301 | .end = IRQ_UART0_RX, |
333 | .flags = IORESOURCE_IRQ, | 302 | .flags = IORESOURCE_IRQ, |
334 | }, | 303 | }, |
335 | { | 304 | { |
diff --git a/arch/blackfin/mach-bf533/boards/ip0x.c b/arch/blackfin/mach-bf533/boards/ip0x.c index a377d8afea03..b597d4e50d58 100644 --- a/arch/blackfin/mach-bf533/boards/ip0x.c +++ b/arch/blackfin/mach-bf533/boards/ip0x.c | |||
@@ -110,7 +110,6 @@ static struct platform_device dm9000_device2 = { | |||
110 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | 110 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) |
111 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { | 111 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { |
112 | .enable_dma = 0, /* if 1 - block!!! */ | 112 | .enable_dma = 0, /* if 1 - block!!! */ |
113 | .bits_per_word = 8, | ||
114 | }; | 113 | }; |
115 | #endif | 114 | #endif |
116 | 115 | ||
@@ -152,8 +151,13 @@ static struct resource bfin_uart0_resources[] = { | |||
152 | .flags = IORESOURCE_MEM, | 151 | .flags = IORESOURCE_MEM, |
153 | }, | 152 | }, |
154 | { | 153 | { |
154 | .start = IRQ_UART0_TX, | ||
155 | .end = IRQ_UART0_TX, | ||
156 | .flags = IORESOURCE_IRQ, | ||
157 | }, | ||
158 | { | ||
155 | .start = IRQ_UART0_RX, | 159 | .start = IRQ_UART0_RX, |
156 | .end = IRQ_UART0_RX + 1, | 160 | .end = IRQ_UART0_RX, |
157 | .flags = IORESOURCE_IRQ, | 161 | .flags = IORESOURCE_IRQ, |
158 | }, | 162 | }, |
159 | { | 163 | { |
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c index 43224ef00b8c..2afd02e14bd1 100644 --- a/arch/blackfin/mach-bf533/boards/stamp.c +++ b/arch/blackfin/mach-bf533/boards/stamp.c | |||
@@ -80,6 +80,9 @@ static struct resource net2272_bfin_resources[] = { | |||
80 | .end = 0x20300000 + 0x100, | 80 | .end = 0x20300000 + 0x100, |
81 | .flags = IORESOURCE_MEM, | 81 | .flags = IORESOURCE_MEM, |
82 | }, { | 82 | }, { |
83 | .start = 1, | ||
84 | .flags = IORESOURCE_BUS, | ||
85 | }, { | ||
83 | .start = IRQ_PF10, | 86 | .start = IRQ_PF10, |
84 | .end = IRQ_PF10, | 87 | .end = IRQ_PF10, |
85 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | 88 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, |
@@ -172,29 +175,6 @@ static struct flash_platform_data bfin_spi_flash_data = { | |||
172 | /* SPI flash chip (m25p64) */ | 175 | /* SPI flash chip (m25p64) */ |
173 | static struct bfin5xx_spi_chip spi_flash_chip_info = { | 176 | static struct bfin5xx_spi_chip spi_flash_chip_info = { |
174 | .enable_dma = 0, /* use dma transfer with this chip*/ | 177 | .enable_dma = 0, /* use dma transfer with this chip*/ |
175 | .bits_per_word = 8, | ||
176 | }; | ||
177 | #endif | ||
178 | |||
179 | #if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE) | ||
180 | /* SPI ADC chip */ | ||
181 | static struct bfin5xx_spi_chip spi_adc_chip_info = { | ||
182 | .enable_dma = 1, /* use dma transfer with this chip*/ | ||
183 | .bits_per_word = 16, | ||
184 | }; | ||
185 | #endif | ||
186 | |||
187 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) | ||
188 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { | ||
189 | .enable_dma = 0, | ||
190 | .bits_per_word = 16, | ||
191 | }; | ||
192 | #endif | ||
193 | |||
194 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) | ||
195 | static struct bfin5xx_spi_chip spidev_chip_info = { | ||
196 | .enable_dma = 0, | ||
197 | .bits_per_word = 8, | ||
198 | }; | 178 | }; |
199 | #endif | 179 | #endif |
200 | 180 | ||
@@ -221,7 +201,6 @@ static struct mmc_spi_platform_data bfin_mmc_spi_pdata = { | |||
221 | 201 | ||
222 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { | 202 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { |
223 | .enable_dma = 0, | 203 | .enable_dma = 0, |
224 | .bits_per_word = 8, | ||
225 | .pio_interrupt = 0, | 204 | .pio_interrupt = 0, |
226 | }; | 205 | }; |
227 | #endif | 206 | #endif |
@@ -240,17 +219,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
240 | }, | 219 | }, |
241 | #endif | 220 | #endif |
242 | 221 | ||
243 | #if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE) | ||
244 | { | ||
245 | .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ | ||
246 | .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ | ||
247 | .bus_num = 0, /* Framework bus number */ | ||
248 | .chip_select = 1, /* Framework chip select. */ | ||
249 | .platform_data = NULL, /* No spi_driver specific config */ | ||
250 | .controller_data = &spi_adc_chip_info, | ||
251 | }, | ||
252 | #endif | ||
253 | |||
254 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) | 222 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) |
255 | { | 223 | { |
256 | .modalias = "ad183x", | 224 | .modalias = "ad183x", |
@@ -258,7 +226,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
258 | .bus_num = 0, | 226 | .bus_num = 0, |
259 | .chip_select = 4, | 227 | .chip_select = 4, |
260 | .platform_data = "ad1836", /* only includes chip name for the moment */ | 228 | .platform_data = "ad1836", /* only includes chip name for the moment */ |
261 | .controller_data = &ad1836_spi_chip_info, | ||
262 | .mode = SPI_MODE_3, | 229 | .mode = SPI_MODE_3, |
263 | }, | 230 | }, |
264 | #endif | 231 | #endif |
@@ -269,7 +236,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
269 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 236 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
270 | .bus_num = 0, | 237 | .bus_num = 0, |
271 | .chip_select = 1, | 238 | .chip_select = 1, |
272 | .controller_data = &spidev_chip_info, | ||
273 | }, | 239 | }, |
274 | #endif | 240 | #endif |
275 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | 241 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) |
@@ -332,8 +298,13 @@ static struct resource bfin_uart0_resources[] = { | |||
332 | .flags = IORESOURCE_MEM, | 298 | .flags = IORESOURCE_MEM, |
333 | }, | 299 | }, |
334 | { | 300 | { |
301 | .start = IRQ_UART0_TX, | ||
302 | .end = IRQ_UART0_TX, | ||
303 | .flags = IORESOURCE_IRQ, | ||
304 | }, | ||
305 | { | ||
335 | .start = IRQ_UART0_RX, | 306 | .start = IRQ_UART0_RX, |
336 | .end = IRQ_UART0_RX + 1, | 307 | .end = IRQ_UART0_RX, |
337 | .flags = IORESOURCE_IRQ, | 308 | .flags = IORESOURCE_IRQ, |
338 | }, | 309 | }, |
339 | { | 310 | { |
@@ -659,6 +630,41 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
659 | #endif | 630 | #endif |
660 | }; | 631 | }; |
661 | 632 | ||
633 | static int __init net2272_init(void) | ||
634 | { | ||
635 | #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) | ||
636 | int ret; | ||
637 | |||
638 | /* Set PF0 to 0, PF1 to 1 make /AMS3 work properly */ | ||
639 | ret = gpio_request(GPIO_PF0, "net2272"); | ||
640 | if (ret) | ||
641 | return ret; | ||
642 | |||
643 | ret = gpio_request(GPIO_PF1, "net2272"); | ||
644 | if (ret) { | ||
645 | gpio_free(GPIO_PF0); | ||
646 | return ret; | ||
647 | } | ||
648 | |||
649 | ret = gpio_request(GPIO_PF11, "net2272"); | ||
650 | if (ret) { | ||
651 | gpio_free(GPIO_PF0); | ||
652 | gpio_free(GPIO_PF1); | ||
653 | return ret; | ||
654 | } | ||
655 | |||
656 | gpio_direction_output(GPIO_PF0, 0); | ||
657 | gpio_direction_output(GPIO_PF1, 1); | ||
658 | |||
659 | /* Reset the USB chip */ | ||
660 | gpio_direction_output(GPIO_PF11, 0); | ||
661 | mdelay(2); | ||
662 | gpio_set_value(GPIO_PF11, 1); | ||
663 | #endif | ||
664 | |||
665 | return 0; | ||
666 | } | ||
667 | |||
662 | static int __init stamp_init(void) | 668 | static int __init stamp_init(void) |
663 | { | 669 | { |
664 | int ret; | 670 | int ret; |
@@ -685,6 +691,9 @@ static int __init stamp_init(void) | |||
685 | } | 691 | } |
686 | #endif | 692 | #endif |
687 | 693 | ||
694 | if (net2272_init()) | ||
695 | pr_warning("unable to configure net2272; it probably won't work\n"); | ||
696 | |||
688 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); | 697 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); |
689 | return 0; | 698 | return 0; |
690 | } | 699 | } |
diff --git a/arch/blackfin/mach-bf533/include/mach/anomaly.h b/arch/blackfin/mach-bf533/include/mach/anomaly.h index 72aa59440f82..03f2b40912a3 100644 --- a/arch/blackfin/mach-bf533/include/mach/anomaly.h +++ b/arch/blackfin/mach-bf533/include/mach/anomaly.h | |||
@@ -11,7 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | /* This file should be up to date with: | 13 | /* This file should be up to date with: |
14 | * - Revision F, 05/25/2010; ADSP-BF531/BF532/BF533 Blackfin Processor Anomaly List | 14 | * - Revision G, 05/23/2011; ADSP-BF531/BF532/BF533 Blackfin Processor Anomaly List |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #ifndef _MACH_ANOMALY_H_ | 17 | #ifndef _MACH_ANOMALY_H_ |
@@ -152,7 +152,7 @@ | |||
152 | #define ANOMALY_05000277 (__SILICON_REVISION__ < 6) | 152 | #define ANOMALY_05000277 (__SILICON_REVISION__ < 6) |
153 | /* Disabling Peripherals with DMA Running May Cause DMA System Instability */ | 153 | /* Disabling Peripherals with DMA Running May Cause DMA System Instability */ |
154 | #define ANOMALY_05000278 (__SILICON_REVISION__ < 6) | 154 | #define ANOMALY_05000278 (__SILICON_REVISION__ < 6) |
155 | /* False Hardware Error Exception when ISR Context Is Not Restored */ | 155 | /* False Hardware Error when ISR Context Is Not Restored */ |
156 | #define ANOMALY_05000281 (__SILICON_REVISION__ < 6) | 156 | #define ANOMALY_05000281 (__SILICON_REVISION__ < 6) |
157 | /* Memory DMA Corruption with 32-Bit Data and Traffic Control */ | 157 | /* Memory DMA Corruption with 32-Bit Data and Traffic Control */ |
158 | #define ANOMALY_05000282 (__SILICON_REVISION__ < 6) | 158 | #define ANOMALY_05000282 (__SILICON_REVISION__ < 6) |
@@ -210,18 +210,25 @@ | |||
210 | #define ANOMALY_05000462 (1) | 210 | #define ANOMALY_05000462 (1) |
211 | /* Boot Failure When SDRAM Control Signals Toggle Coming Out Of Reset */ | 211 | /* Boot Failure When SDRAM Control Signals Toggle Coming Out Of Reset */ |
212 | #define ANOMALY_05000471 (1) | 212 | #define ANOMALY_05000471 (1) |
213 | /* Interrupted 32-Bit SPORT Data Register Access Results In Underflow */ | 213 | /* Interrupted SPORT Receive Data Register Read Results In Underflow when SLEN > 15 */ |
214 | #define ANOMALY_05000473 (1) | 214 | #define ANOMALY_05000473 (1) |
215 | /* Possible Lockup Condition whem Modifying PLL from External Memory */ | 215 | /* Possible Lockup Condition when Modifying PLL from External Memory */ |
216 | #define ANOMALY_05000475 (1) | 216 | #define ANOMALY_05000475 (1) |
217 | /* TESTSET Instruction Cannot Be Interrupted */ | 217 | /* TESTSET Instruction Cannot Be Interrupted */ |
218 | #define ANOMALY_05000477 (1) | 218 | #define ANOMALY_05000477 (1) |
219 | /* Reads of ITEST_COMMAND and ITEST_DATA Registers Cause Cache Corruption */ | 219 | /* Reads of ITEST_COMMAND and ITEST_DATA Registers Cause Cache Corruption */ |
220 | #define ANOMALY_05000481 (1) | 220 | #define ANOMALY_05000481 (1) |
221 | /* IFLUSH sucks at life */ | 221 | /* PLL May Latch Incorrect Values Coming Out of Reset */ |
222 | #define ANOMALY_05000489 (1) | ||
223 | /* Instruction Memory Stalls Can Cause IFLUSH to Fail */ | ||
222 | #define ANOMALY_05000491 (1) | 224 | #define ANOMALY_05000491 (1) |
225 | /* EXCPT Instruction May Be Lost If NMI Happens Simultaneously */ | ||
226 | #define ANOMALY_05000494 (1) | ||
227 | /* RXS Bit in SPI_STAT May Become Stuck In RX DMA Modes */ | ||
228 | #define ANOMALY_05000501 (1) | ||
223 | 229 | ||
224 | /* These anomalies have been "phased" out of analog.com anomaly sheets and are | 230 | /* |
231 | * These anomalies have been "phased" out of analog.com anomaly sheets and are | ||
225 | * here to show running on older silicon just isn't feasible. | 232 | * here to show running on older silicon just isn't feasible. |
226 | */ | 233 | */ |
227 | 234 | ||
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537e.c b/arch/blackfin/mach-bf537/boards/cm_bf537e.c index d582b810e7a7..604a430038e1 100644 --- a/arch/blackfin/mach-bf537/boards/cm_bf537e.c +++ b/arch/blackfin/mach-bf537/boards/cm_bf537e.c | |||
@@ -8,6 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/device.h> | 10 | #include <linux/device.h> |
11 | #include <linux/export.h> | ||
11 | #include <linux/etherdevice.h> | 12 | #include <linux/etherdevice.h> |
12 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
13 | #include <linux/mtd/mtd.h> | 14 | #include <linux/mtd/mtd.h> |
@@ -61,29 +62,12 @@ static struct flash_platform_data bfin_spi_flash_data = { | |||
61 | /* SPI flash chip (m25p64) */ | 62 | /* SPI flash chip (m25p64) */ |
62 | static struct bfin5xx_spi_chip spi_flash_chip_info = { | 63 | static struct bfin5xx_spi_chip spi_flash_chip_info = { |
63 | .enable_dma = 0, /* use dma transfer with this chip*/ | 64 | .enable_dma = 0, /* use dma transfer with this chip*/ |
64 | .bits_per_word = 8, | ||
65 | }; | ||
66 | #endif | ||
67 | |||
68 | #if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE) | ||
69 | /* SPI ADC chip */ | ||
70 | static struct bfin5xx_spi_chip spi_adc_chip_info = { | ||
71 | .enable_dma = 1, /* use dma transfer with this chip*/ | ||
72 | .bits_per_word = 16, | ||
73 | }; | ||
74 | #endif | ||
75 | |||
76 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) | ||
77 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { | ||
78 | .enable_dma = 0, | ||
79 | .bits_per_word = 16, | ||
80 | }; | 65 | }; |
81 | #endif | 66 | #endif |
82 | 67 | ||
83 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | 68 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) |
84 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { | 69 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { |
85 | .enable_dma = 0, | 70 | .enable_dma = 0, |
86 | .bits_per_word = 8, | ||
87 | }; | 71 | }; |
88 | #endif | 72 | #endif |
89 | 73 | ||
@@ -101,24 +85,12 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
101 | }, | 85 | }, |
102 | #endif | 86 | #endif |
103 | 87 | ||
104 | #if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE) | ||
105 | { | ||
106 | .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ | ||
107 | .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ | ||
108 | .bus_num = 0, /* Framework bus number */ | ||
109 | .chip_select = 1, /* Framework chip select. */ | ||
110 | .platform_data = NULL, /* No spi_driver specific config */ | ||
111 | .controller_data = &spi_adc_chip_info, | ||
112 | }, | ||
113 | #endif | ||
114 | |||
115 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) | 88 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) |
116 | { | 89 | { |
117 | .modalias = "ad183x", | 90 | .modalias = "ad183x", |
118 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 91 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
119 | .bus_num = 0, | 92 | .bus_num = 0, |
120 | .chip_select = 4, | 93 | .chip_select = 4, |
121 | .controller_data = &ad1836_spi_chip_info, | ||
122 | }, | 94 | }, |
123 | #endif | 95 | #endif |
124 | 96 | ||
@@ -334,8 +306,13 @@ static struct resource bfin_uart0_resources[] = { | |||
334 | .flags = IORESOURCE_MEM, | 306 | .flags = IORESOURCE_MEM, |
335 | }, | 307 | }, |
336 | { | 308 | { |
309 | .start = IRQ_UART0_TX, | ||
310 | .end = IRQ_UART0_TX, | ||
311 | .flags = IORESOURCE_IRQ, | ||
312 | }, | ||
313 | { | ||
337 | .start = IRQ_UART0_RX, | 314 | .start = IRQ_UART0_RX, |
338 | .end = IRQ_UART0_RX+1, | 315 | .end = IRQ_UART0_RX, |
339 | .flags = IORESOURCE_IRQ, | 316 | .flags = IORESOURCE_IRQ, |
340 | }, | 317 | }, |
341 | { | 318 | { |
@@ -395,8 +372,13 @@ static struct resource bfin_uart1_resources[] = { | |||
395 | .flags = IORESOURCE_MEM, | 372 | .flags = IORESOURCE_MEM, |
396 | }, | 373 | }, |
397 | { | 374 | { |
375 | .start = IRQ_UART1_TX, | ||
376 | .end = IRQ_UART1_TX, | ||
377 | .flags = IORESOURCE_IRQ, | ||
378 | }, | ||
379 | { | ||
398 | .start = IRQ_UART1_RX, | 380 | .start = IRQ_UART1_RX, |
399 | .end = IRQ_UART1_RX+1, | 381 | .end = IRQ_UART1_RX, |
400 | .flags = IORESOURCE_IRQ, | 382 | .flags = IORESOURCE_IRQ, |
401 | }, | 383 | }, |
402 | { | 384 | { |
@@ -634,7 +616,7 @@ static struct platform_device bfin_mac_device = { | |||
634 | 616 | ||
635 | static struct pata_platform_info bfin_pata_platform_data = { | 617 | static struct pata_platform_info bfin_pata_platform_data = { |
636 | .ioport_shift = 2, | 618 | .ioport_shift = 2, |
637 | .irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED, | 619 | .irq_type = IRQF_TRIGGER_HIGH, |
638 | }; | 620 | }; |
639 | 621 | ||
640 | static struct resource bfin_pata_resources[] = { | 622 | static struct resource bfin_pata_resources[] = { |
@@ -766,6 +748,24 @@ static struct platform_device *cm_bf537e_devices[] __initdata = { | |||
766 | #endif | 748 | #endif |
767 | }; | 749 | }; |
768 | 750 | ||
751 | static int __init net2272_init(void) | ||
752 | { | ||
753 | #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) | ||
754 | int ret; | ||
755 | |||
756 | ret = gpio_request(GPIO_PG14, "net2272"); | ||
757 | if (ret) | ||
758 | return ret; | ||
759 | |||
760 | /* Reset USB Chip, PG14 */ | ||
761 | gpio_direction_output(GPIO_PG14, 0); | ||
762 | mdelay(2); | ||
763 | gpio_set_value(GPIO_PG14, 1); | ||
764 | #endif | ||
765 | |||
766 | return 0; | ||
767 | } | ||
768 | |||
769 | static int __init cm_bf537e_init(void) | 769 | static int __init cm_bf537e_init(void) |
770 | { | 770 | { |
771 | printk(KERN_INFO "%s(): registering device resources\n", __func__); | 771 | printk(KERN_INFO "%s(): registering device resources\n", __func__); |
@@ -777,6 +777,10 @@ static int __init cm_bf537e_init(void) | |||
777 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | 777 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
778 | irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); | 778 | irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); |
779 | #endif | 779 | #endif |
780 | |||
781 | if (net2272_init()) | ||
782 | pr_warning("unable to configure net2272; it probably won't work\n"); | ||
783 | |||
780 | return 0; | 784 | return 0; |
781 | } | 785 | } |
782 | 786 | ||
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537u.c b/arch/blackfin/mach-bf537/boards/cm_bf537u.c index cbb8098604c5..d916b46a44fe 100644 --- a/arch/blackfin/mach-bf537/boards/cm_bf537u.c +++ b/arch/blackfin/mach-bf537/boards/cm_bf537u.c | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include <linux/device.h> | 10 | #include <linux/device.h> |
11 | #include <linux/etherdevice.h> | 11 | #include <linux/etherdevice.h> |
12 | #include <linux/export.h> | ||
12 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
13 | #include <linux/mtd/mtd.h> | 14 | #include <linux/mtd/mtd.h> |
14 | #include <linux/mtd/partitions.h> | 15 | #include <linux/mtd/partitions.h> |
@@ -62,29 +63,12 @@ static struct flash_platform_data bfin_spi_flash_data = { | |||
62 | /* SPI flash chip (m25p64) */ | 63 | /* SPI flash chip (m25p64) */ |
63 | static struct bfin5xx_spi_chip spi_flash_chip_info = { | 64 | static struct bfin5xx_spi_chip spi_flash_chip_info = { |
64 | .enable_dma = 0, /* use dma transfer with this chip*/ | 65 | .enable_dma = 0, /* use dma transfer with this chip*/ |
65 | .bits_per_word = 8, | ||
66 | }; | ||
67 | #endif | ||
68 | |||
69 | #if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE) | ||
70 | /* SPI ADC chip */ | ||
71 | static struct bfin5xx_spi_chip spi_adc_chip_info = { | ||
72 | .enable_dma = 1, /* use dma transfer with this chip*/ | ||
73 | .bits_per_word = 16, | ||
74 | }; | ||
75 | #endif | ||
76 | |||
77 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) | ||
78 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { | ||
79 | .enable_dma = 0, | ||
80 | .bits_per_word = 16, | ||
81 | }; | 66 | }; |
82 | #endif | 67 | #endif |
83 | 68 | ||
84 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | 69 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) |
85 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { | 70 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { |
86 | .enable_dma = 0, | 71 | .enable_dma = 0, |
87 | .bits_per_word = 8, | ||
88 | }; | 72 | }; |
89 | #endif | 73 | #endif |
90 | 74 | ||
@@ -102,24 +86,12 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
102 | }, | 86 | }, |
103 | #endif | 87 | #endif |
104 | 88 | ||
105 | #if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE) | ||
106 | { | ||
107 | .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ | ||
108 | .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ | ||
109 | .bus_num = 0, /* Framework bus number */ | ||
110 | .chip_select = 1, /* Framework chip select. */ | ||
111 | .platform_data = NULL, /* No spi_driver specific config */ | ||
112 | .controller_data = &spi_adc_chip_info, | ||
113 | }, | ||
114 | #endif | ||
115 | |||
116 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) | 89 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) |
117 | { | 90 | { |
118 | .modalias = "ad183x", | 91 | .modalias = "ad183x", |
119 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 92 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
120 | .bus_num = 0, | 93 | .bus_num = 0, |
121 | .chip_select = 4, | 94 | .chip_select = 4, |
122 | .controller_data = &ad1836_spi_chip_info, | ||
123 | }, | 95 | }, |
124 | #endif | 96 | #endif |
125 | 97 | ||
@@ -335,8 +307,13 @@ static struct resource bfin_uart0_resources[] = { | |||
335 | .flags = IORESOURCE_MEM, | 307 | .flags = IORESOURCE_MEM, |
336 | }, | 308 | }, |
337 | { | 309 | { |
310 | .start = IRQ_UART0_TX, | ||
311 | .end = IRQ_UART0_TX, | ||
312 | .flags = IORESOURCE_IRQ, | ||
313 | }, | ||
314 | { | ||
338 | .start = IRQ_UART0_RX, | 315 | .start = IRQ_UART0_RX, |
339 | .end = IRQ_UART0_RX+1, | 316 | .end = IRQ_UART0_RX, |
340 | .flags = IORESOURCE_IRQ, | 317 | .flags = IORESOURCE_IRQ, |
341 | }, | 318 | }, |
342 | { | 319 | { |
@@ -378,8 +355,13 @@ static struct resource bfin_uart1_resources[] = { | |||
378 | .flags = IORESOURCE_MEM, | 355 | .flags = IORESOURCE_MEM, |
379 | }, | 356 | }, |
380 | { | 357 | { |
358 | .start = IRQ_UART1_TX, | ||
359 | .end = IRQ_UART1_TX, | ||
360 | .flags = IORESOURCE_IRQ, | ||
361 | }, | ||
362 | { | ||
381 | .start = IRQ_UART1_RX, | 363 | .start = IRQ_UART1_RX, |
382 | .end = IRQ_UART1_RX+1, | 364 | .end = IRQ_UART1_RX, |
383 | .flags = IORESOURCE_IRQ, | 365 | .flags = IORESOURCE_IRQ, |
384 | }, | 366 | }, |
385 | { | 367 | { |
@@ -599,7 +581,7 @@ static struct platform_device bfin_mac_device = { | |||
599 | 581 | ||
600 | static struct pata_platform_info bfin_pata_platform_data = { | 582 | static struct pata_platform_info bfin_pata_platform_data = { |
601 | .ioport_shift = 2, | 583 | .ioport_shift = 2, |
602 | .irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED, | 584 | .irq_type = IRQF_TRIGGER_HIGH, |
603 | }; | 585 | }; |
604 | 586 | ||
605 | static struct resource bfin_pata_resources[] = { | 587 | static struct resource bfin_pata_resources[] = { |
@@ -731,6 +713,36 @@ static struct platform_device *cm_bf537u_devices[] __initdata = { | |||
731 | #endif | 713 | #endif |
732 | }; | 714 | }; |
733 | 715 | ||
716 | static int __init net2272_init(void) | ||
717 | { | ||
718 | #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) | ||
719 | int ret; | ||
720 | |||
721 | ret = gpio_request(GPIO_PH15, driver_name); | ||
722 | if (ret) | ||
723 | return ret; | ||
724 | |||
725 | ret = gpio_request(GPIO_PH13, "net2272"); | ||
726 | if (ret) { | ||
727 | gpio_free(GPIO_PH15); | ||
728 | return ret; | ||
729 | } | ||
730 | |||
731 | /* Set PH15 Low make /AMS2 work properly */ | ||
732 | gpio_direction_output(GPIO_PH15, 0); | ||
733 | |||
734 | /* enable CLKBUF output */ | ||
735 | bfin_write_VR_CTL(bfin_read_VR_CTL() | CLKBUFOE); | ||
736 | |||
737 | /* Reset the USB chip */ | ||
738 | gpio_direction_output(GPIO_PH13, 0); | ||
739 | mdelay(2); | ||
740 | gpio_set_value(GPIO_PH13, 1); | ||
741 | #endif | ||
742 | |||
743 | return 0; | ||
744 | } | ||
745 | |||
734 | static int __init cm_bf537u_init(void) | 746 | static int __init cm_bf537u_init(void) |
735 | { | 747 | { |
736 | printk(KERN_INFO "%s(): registering device resources\n", __func__); | 748 | printk(KERN_INFO "%s(): registering device resources\n", __func__); |
@@ -742,6 +754,10 @@ static int __init cm_bf537u_init(void) | |||
742 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | 754 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
743 | irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); | 755 | irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); |
744 | #endif | 756 | #endif |
757 | |||
758 | if (net2272_init()) | ||
759 | pr_warning("unable to configure net2272; it probably won't work\n"); | ||
760 | |||
745 | return 0; | 761 | return 0; |
746 | } | 762 | } |
747 | 763 | ||
diff --git a/arch/blackfin/mach-bf537/boards/dnp5370.c b/arch/blackfin/mach-bf537/boards/dnp5370.c index 6b4ff4605bff..5f307228be63 100644 --- a/arch/blackfin/mach-bf537/boards/dnp5370.c +++ b/arch/blackfin/mach-bf537/boards/dnp5370.c | |||
@@ -12,6 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/device.h> | 14 | #include <linux/device.h> |
15 | #include <linux/export.h> | ||
15 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
16 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
17 | #include <linux/io.h> | 18 | #include <linux/io.h> |
@@ -130,7 +131,6 @@ static struct platform_device asmb_flash_device = { | |||
130 | 131 | ||
131 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { | 132 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { |
132 | .enable_dma = 0, /* use no dma transfer with this chip*/ | 133 | .enable_dma = 0, /* use no dma transfer with this chip*/ |
133 | .bits_per_word = 8, | ||
134 | }; | 134 | }; |
135 | 135 | ||
136 | #endif | 136 | #endif |
@@ -161,7 +161,6 @@ static struct flash_platform_data bfin_spi_dataflash_data = { | |||
161 | 161 | ||
162 | static struct bfin5xx_spi_chip spi_dataflash_chip_info = { | 162 | static struct bfin5xx_spi_chip spi_dataflash_chip_info = { |
163 | .enable_dma = 0, /* use no dma transfer with this chip*/ | 163 | .enable_dma = 0, /* use no dma transfer with this chip*/ |
164 | .bits_per_word = 8, | ||
165 | }; | 164 | }; |
166 | #endif | 165 | #endif |
167 | 166 | ||
@@ -238,8 +237,13 @@ static struct resource bfin_uart0_resources[] = { | |||
238 | .flags = IORESOURCE_MEM, | 237 | .flags = IORESOURCE_MEM, |
239 | }, | 238 | }, |
240 | { | 239 | { |
240 | .start = IRQ_UART0_TX, | ||
241 | .end = IRQ_UART0_TX, | ||
242 | .flags = IORESOURCE_IRQ, | ||
243 | }, | ||
244 | { | ||
241 | .start = IRQ_UART0_RX, | 245 | .start = IRQ_UART0_RX, |
242 | .end = IRQ_UART0_RX+1, | 246 | .end = IRQ_UART0_RX, |
243 | .flags = IORESOURCE_IRQ, | 247 | .flags = IORESOURCE_IRQ, |
244 | }, | 248 | }, |
245 | { | 249 | { |
@@ -282,8 +286,13 @@ static struct resource bfin_uart1_resources[] = { | |||
282 | .flags = IORESOURCE_MEM, | 286 | .flags = IORESOURCE_MEM, |
283 | }, | 287 | }, |
284 | { | 288 | { |
289 | .start = IRQ_UART1_TX, | ||
290 | .end = IRQ_UART1_TX, | ||
291 | .flags = IORESOURCE_IRQ, | ||
292 | }, | ||
293 | { | ||
285 | .start = IRQ_UART1_RX, | 294 | .start = IRQ_UART1_RX, |
286 | .end = IRQ_UART1_RX+1, | 295 | .end = IRQ_UART1_RX, |
287 | .flags = IORESOURCE_IRQ, | 296 | .flags = IORESOURCE_IRQ, |
288 | }, | 297 | }, |
289 | { | 298 | { |
diff --git a/arch/blackfin/mach-bf537/boards/minotaur.c b/arch/blackfin/mach-bf537/boards/minotaur.c index bfb3671a78da..3901dd093b90 100644 --- a/arch/blackfin/mach-bf537/boards/minotaur.c +++ b/arch/blackfin/mach-bf537/boards/minotaur.c | |||
@@ -159,14 +159,12 @@ static struct flash_platform_data bfin_spi_flash_data = { | |||
159 | /* SPI flash chip (m25p64) */ | 159 | /* SPI flash chip (m25p64) */ |
160 | static struct bfin5xx_spi_chip spi_flash_chip_info = { | 160 | static struct bfin5xx_spi_chip spi_flash_chip_info = { |
161 | .enable_dma = 0, /* use dma transfer with this chip*/ | 161 | .enable_dma = 0, /* use dma transfer with this chip*/ |
162 | .bits_per_word = 8, | ||
163 | }; | 162 | }; |
164 | #endif | 163 | #endif |
165 | 164 | ||
166 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | 165 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) |
167 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { | 166 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { |
168 | .enable_dma = 0, | 167 | .enable_dma = 0, |
169 | .bits_per_word = 8, | ||
170 | }; | 168 | }; |
171 | #endif | 169 | #endif |
172 | 170 | ||
@@ -242,8 +240,13 @@ static struct resource bfin_uart0_resources[] = { | |||
242 | .flags = IORESOURCE_MEM, | 240 | .flags = IORESOURCE_MEM, |
243 | }, | 241 | }, |
244 | { | 242 | { |
243 | .start = IRQ_UART0_TX, | ||
244 | .end = IRQ_UART0_TX, | ||
245 | .flags = IORESOURCE_IRQ, | ||
246 | }, | ||
247 | { | ||
245 | .start = IRQ_UART0_RX, | 248 | .start = IRQ_UART0_RX, |
246 | .end = IRQ_UART0_RX+1, | 249 | .end = IRQ_UART0_RX, |
247 | .flags = IORESOURCE_IRQ, | 250 | .flags = IORESOURCE_IRQ, |
248 | }, | 251 | }, |
249 | { | 252 | { |
@@ -285,8 +288,13 @@ static struct resource bfin_uart1_resources[] = { | |||
285 | .flags = IORESOURCE_MEM, | 288 | .flags = IORESOURCE_MEM, |
286 | }, | 289 | }, |
287 | { | 290 | { |
291 | .start = IRQ_UART1_TX, | ||
292 | .end = IRQ_UART1_TX, | ||
293 | .flags = IORESOURCE_IRQ, | ||
294 | }, | ||
295 | { | ||
288 | .start = IRQ_UART1_RX, | 296 | .start = IRQ_UART1_RX, |
289 | .end = IRQ_UART1_RX+1, | 297 | .end = IRQ_UART1_RX, |
290 | .flags = IORESOURCE_IRQ, | 298 | .flags = IORESOURCE_IRQ, |
291 | }, | 299 | }, |
292 | { | 300 | { |
diff --git a/arch/blackfin/mach-bf537/boards/pnav10.c b/arch/blackfin/mach-bf537/boards/pnav10.c index 9389f03e3b0a..aebd31c845f0 100644 --- a/arch/blackfin/mach-bf537/boards/pnav10.c +++ b/arch/blackfin/mach-bf537/boards/pnav10.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/device.h> | 9 | #include <linux/device.h> |
10 | #include <linux/etherdevice.h> | 10 | #include <linux/etherdevice.h> |
11 | #include <linux/export.h> | ||
11 | #include <linux/platform_device.h> | 12 | #include <linux/platform_device.h> |
12 | #include <linux/mtd/mtd.h> | 13 | #include <linux/mtd/mtd.h> |
13 | #include <linux/mtd/partitions.h> | 14 | #include <linux/mtd/partitions.h> |
@@ -100,6 +101,7 @@ static struct platform_device smc91x_device = { | |||
100 | 101 | ||
101 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 102 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
102 | #include <linux/bfin_mac.h> | 103 | #include <linux/bfin_mac.h> |
104 | #include <linux/export.h> | ||
103 | static const unsigned short bfin_mac_peripherals[] = P_RMII0; | 105 | static const unsigned short bfin_mac_peripherals[] = P_RMII0; |
104 | 106 | ||
105 | static struct bfin_phydev_platform_data bfin_phydev_data[] = { | 107 | static struct bfin_phydev_platform_data bfin_phydev_data[] = { |
@@ -184,40 +186,16 @@ static struct flash_platform_data bfin_spi_flash_data = { | |||
184 | /* SPI flash chip (m25p64) */ | 186 | /* SPI flash chip (m25p64) */ |
185 | static struct bfin5xx_spi_chip spi_flash_chip_info = { | 187 | static struct bfin5xx_spi_chip spi_flash_chip_info = { |
186 | .enable_dma = 0, /* use dma transfer with this chip*/ | 188 | .enable_dma = 0, /* use dma transfer with this chip*/ |
187 | .bits_per_word = 8, | ||
188 | }; | ||
189 | #endif | ||
190 | |||
191 | #if defined(CONFIG_BFIN_SPI_ADC) \ | ||
192 | || defined(CONFIG_BFIN_SPI_ADC_MODULE) | ||
193 | /* SPI ADC chip */ | ||
194 | static struct bfin5xx_spi_chip spi_adc_chip_info = { | ||
195 | .enable_dma = 1, /* use dma transfer with this chip*/ | ||
196 | .bits_per_word = 16, | ||
197 | }; | ||
198 | #endif | ||
199 | |||
200 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ | ||
201 | || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) | ||
202 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { | ||
203 | .enable_dma = 0, | ||
204 | .bits_per_word = 16, | ||
205 | }; | 189 | }; |
206 | #endif | 190 | #endif |
207 | 191 | ||
208 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | 192 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) |
209 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { | 193 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { |
210 | .enable_dma = 0, | 194 | .enable_dma = 0, |
211 | .bits_per_word = 8, | ||
212 | }; | 195 | }; |
213 | #endif | 196 | #endif |
214 | 197 | ||
215 | #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) | 198 | #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) |
216 | static struct bfin5xx_spi_chip spi_ad7877_chip_info = { | ||
217 | .enable_dma = 0, | ||
218 | .bits_per_word = 16, | ||
219 | }; | ||
220 | |||
221 | static const struct ad7877_platform_data bfin_ad7877_ts_info = { | 199 | static const struct ad7877_platform_data bfin_ad7877_ts_info = { |
222 | .model = 7877, | 200 | .model = 7877, |
223 | .vref_delay_usecs = 50, /* internal, no capacitor */ | 201 | .vref_delay_usecs = 50, /* internal, no capacitor */ |
@@ -248,18 +226,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
248 | }, | 226 | }, |
249 | #endif | 227 | #endif |
250 | 228 | ||
251 | #if defined(CONFIG_BFIN_SPI_ADC) \ | ||
252 | || defined(CONFIG_BFIN_SPI_ADC_MODULE) | ||
253 | { | ||
254 | .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ | ||
255 | .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ | ||
256 | .bus_num = 0, /* Framework bus number */ | ||
257 | .chip_select = 1, /* Framework chip select. */ | ||
258 | .platform_data = NULL, /* No spi_driver specific config */ | ||
259 | .controller_data = &spi_adc_chip_info, | ||
260 | }, | ||
261 | #endif | ||
262 | |||
263 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ | 229 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ |
264 | || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) | 230 | || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) |
265 | { | 231 | { |
@@ -267,7 +233,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
267 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 233 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
268 | .bus_num = 0, | 234 | .bus_num = 0, |
269 | .chip_select = 4, | 235 | .chip_select = 4, |
270 | .controller_data = &ad1836_spi_chip_info, | ||
271 | }, | 236 | }, |
272 | #endif | 237 | #endif |
273 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | 238 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) |
@@ -288,7 +253,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
288 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ | 253 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ |
289 | .bus_num = 0, | 254 | .bus_num = 0, |
290 | .chip_select = 5, | 255 | .chip_select = 5, |
291 | .controller_data = &spi_ad7877_chip_info, | ||
292 | }, | 256 | }, |
293 | #endif | 257 | #endif |
294 | 258 | ||
@@ -346,8 +310,13 @@ static struct resource bfin_uart0_resources[] = { | |||
346 | .flags = IORESOURCE_MEM, | 310 | .flags = IORESOURCE_MEM, |
347 | }, | 311 | }, |
348 | { | 312 | { |
313 | .start = IRQ_UART0_TX, | ||
314 | .end = IRQ_UART0_TX, | ||
315 | .flags = IORESOURCE_IRQ, | ||
316 | }, | ||
317 | { | ||
349 | .start = IRQ_UART0_RX, | 318 | .start = IRQ_UART0_RX, |
350 | .end = IRQ_UART0_RX+1, | 319 | .end = IRQ_UART0_RX, |
351 | .flags = IORESOURCE_IRQ, | 320 | .flags = IORESOURCE_IRQ, |
352 | }, | 321 | }, |
353 | { | 322 | { |
@@ -389,8 +358,13 @@ static struct resource bfin_uart1_resources[] = { | |||
389 | .flags = IORESOURCE_MEM, | 358 | .flags = IORESOURCE_MEM, |
390 | }, | 359 | }, |
391 | { | 360 | { |
361 | .start = IRQ_UART1_TX, | ||
362 | .end = IRQ_UART1_TX, | ||
363 | .flags = IORESOURCE_IRQ, | ||
364 | }, | ||
365 | { | ||
392 | .start = IRQ_UART1_RX, | 366 | .start = IRQ_UART1_RX, |
393 | .end = IRQ_UART1_RX+1, | 367 | .end = IRQ_UART1_RX, |
394 | .flags = IORESOURCE_IRQ, | 368 | .flags = IORESOURCE_IRQ, |
395 | }, | 369 | }, |
396 | { | 370 | { |
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index 76db1d483173..7fbb0bbf8676 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/device.h> | 9 | #include <linux/device.h> |
10 | #include <linux/export.h> | ||
10 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
11 | #include <linux/platform_device.h> | 12 | #include <linux/platform_device.h> |
12 | #include <linux/io.h> | 13 | #include <linux/io.h> |
@@ -367,6 +368,9 @@ static struct resource net2272_bfin_resources[] = { | |||
367 | .end = 0x20300000 + 0x100, | 368 | .end = 0x20300000 + 0x100, |
368 | .flags = IORESOURCE_MEM, | 369 | .flags = IORESOURCE_MEM, |
369 | }, { | 370 | }, { |
371 | .start = 1, | ||
372 | .flags = IORESOURCE_BUS, | ||
373 | }, { | ||
370 | .start = IRQ_PF7, | 374 | .start = IRQ_PF7, |
371 | .end = IRQ_PF7, | 375 | .end = IRQ_PF7, |
372 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | 376 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, |
@@ -533,49 +537,11 @@ static struct flash_platform_data bfin_spi_flash_data = { | |||
533 | /* SPI flash chip (m25p64) */ | 537 | /* SPI flash chip (m25p64) */ |
534 | static struct bfin5xx_spi_chip spi_flash_chip_info = { | 538 | static struct bfin5xx_spi_chip spi_flash_chip_info = { |
535 | .enable_dma = 0, /* use dma transfer with this chip*/ | 539 | .enable_dma = 0, /* use dma transfer with this chip*/ |
536 | .bits_per_word = 8, | ||
537 | }; | ||
538 | #endif | ||
539 | |||
540 | #if defined(CONFIG_BFIN_SPI_ADC) \ | ||
541 | || defined(CONFIG_BFIN_SPI_ADC_MODULE) | ||
542 | /* SPI ADC chip */ | ||
543 | static struct bfin5xx_spi_chip spi_adc_chip_info = { | ||
544 | .enable_dma = 1, /* use dma transfer with this chip*/ | ||
545 | .bits_per_word = 16, | ||
546 | }; | ||
547 | #endif | ||
548 | |||
549 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ | ||
550 | || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) | ||
551 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { | ||
552 | .enable_dma = 0, | ||
553 | .bits_per_word = 16, | ||
554 | }; | ||
555 | #endif | ||
556 | |||
557 | #if defined(CONFIG_SND_BF5XX_SOC_AD193X) \ | ||
558 | || defined(CONFIG_SND_BF5XX_SOC_AD193X_MODULE) | ||
559 | static struct bfin5xx_spi_chip ad1938_spi_chip_info = { | ||
560 | .enable_dma = 0, | ||
561 | .bits_per_word = 8, | ||
562 | }; | ||
563 | #endif | ||
564 | |||
565 | #if defined(CONFIG_SND_BF5XX_SOC_ADAV80X) \ | ||
566 | || defined(CONFIG_SND_BF5XX_SOC_ADAV80X_MODULE) | ||
567 | static struct bfin5xx_spi_chip adav801_spi_chip_info = { | ||
568 | .enable_dma = 0, | ||
569 | .bits_per_word = 8, | ||
570 | }; | 540 | }; |
571 | #endif | 541 | #endif |
572 | 542 | ||
573 | #if defined(CONFIG_INPUT_AD714X_SPI) || defined(CONFIG_INPUT_AD714X_SPI_MODULE) | 543 | #if defined(CONFIG_INPUT_AD714X_SPI) || defined(CONFIG_INPUT_AD714X_SPI_MODULE) |
574 | #include <linux/input/ad714x.h> | 544 | #include <linux/input/ad714x.h> |
575 | static struct bfin5xx_spi_chip ad7147_spi_chip_info = { | ||
576 | .enable_dma = 0, | ||
577 | .bits_per_word = 16, | ||
578 | }; | ||
579 | 545 | ||
580 | static struct ad714x_slider_plat ad7147_spi_slider_plat[] = { | 546 | static struct ad714x_slider_plat ad7147_spi_slider_plat[] = { |
581 | { | 547 | { |
@@ -685,7 +651,6 @@ static struct ad714x_platform_data ad7142_i2c_platform_data = { | |||
685 | #if defined(CONFIG_AD2S90) || defined(CONFIG_AD2S90_MODULE) | 651 | #if defined(CONFIG_AD2S90) || defined(CONFIG_AD2S90_MODULE) |
686 | static struct bfin5xx_spi_chip ad2s90_spi_chip_info = { | 652 | static struct bfin5xx_spi_chip ad2s90_spi_chip_info = { |
687 | .enable_dma = 0, | 653 | .enable_dma = 0, |
688 | .bits_per_word = 16, | ||
689 | }; | 654 | }; |
690 | #endif | 655 | #endif |
691 | 656 | ||
@@ -697,7 +662,6 @@ static unsigned short ad2s120x_platform_data[] = { | |||
697 | 662 | ||
698 | static struct bfin5xx_spi_chip ad2s120x_spi_chip_info = { | 663 | static struct bfin5xx_spi_chip ad2s120x_spi_chip_info = { |
699 | .enable_dma = 0, | 664 | .enable_dma = 0, |
700 | .bits_per_word = 16, | ||
701 | }; | 665 | }; |
702 | #endif | 666 | #endif |
703 | 667 | ||
@@ -714,14 +678,12 @@ static unsigned short ad2s1210_platform_data[] = { | |||
714 | 678 | ||
715 | static struct bfin5xx_spi_chip ad2s1210_spi_chip_info = { | 679 | static struct bfin5xx_spi_chip ad2s1210_spi_chip_info = { |
716 | .enable_dma = 0, | 680 | .enable_dma = 0, |
717 | .bits_per_word = 8, | ||
718 | }; | 681 | }; |
719 | #endif | 682 | #endif |
720 | 683 | ||
721 | #if defined(CONFIG_AD7314) || defined(CONFIG_AD7314_MODULE) | 684 | #if defined(CONFIG_AD7314) || defined(CONFIG_AD7314_MODULE) |
722 | static struct bfin5xx_spi_chip ad7314_spi_chip_info = { | 685 | static struct bfin5xx_spi_chip ad7314_spi_chip_info = { |
723 | .enable_dma = 0, | 686 | .enable_dma = 0, |
724 | .bits_per_word = 16, | ||
725 | }; | 687 | }; |
726 | #endif | 688 | #endif |
727 | 689 | ||
@@ -735,7 +697,6 @@ static unsigned short ad7816_platform_data[] = { | |||
735 | 697 | ||
736 | static struct bfin5xx_spi_chip ad7816_spi_chip_info = { | 698 | static struct bfin5xx_spi_chip ad7816_spi_chip_info = { |
737 | .enable_dma = 0, | 699 | .enable_dma = 0, |
738 | .bits_per_word = 8, | ||
739 | }; | 700 | }; |
740 | #endif | 701 | #endif |
741 | 702 | ||
@@ -749,7 +710,6 @@ static unsigned long adt7310_platform_data[3] = { | |||
749 | 710 | ||
750 | static struct bfin5xx_spi_chip adt7310_spi_chip_info = { | 711 | static struct bfin5xx_spi_chip adt7310_spi_chip_info = { |
751 | .enable_dma = 0, | 712 | .enable_dma = 0, |
752 | .bits_per_word = 8, | ||
753 | }; | 713 | }; |
754 | #endif | 714 | #endif |
755 | 715 | ||
@@ -758,11 +718,6 @@ static unsigned short ad7298_platform_data[] = { | |||
758 | GPIO_PF7, /* busy_pin */ | 718 | GPIO_PF7, /* busy_pin */ |
759 | 0, | 719 | 0, |
760 | }; | 720 | }; |
761 | |||
762 | static struct bfin5xx_spi_chip ad7298_spi_chip_info = { | ||
763 | .enable_dma = 0, | ||
764 | .bits_per_word = 16, | ||
765 | }; | ||
766 | #endif | 721 | #endif |
767 | 722 | ||
768 | #if defined(CONFIG_ADT7316_SPI) || defined(CONFIG_ADT7316_SPI_MODULE) | 723 | #if defined(CONFIG_ADT7316_SPI) || defined(CONFIG_ADT7316_SPI_MODULE) |
@@ -773,7 +728,6 @@ static unsigned long adt7316_spi_data[2] = { | |||
773 | 728 | ||
774 | static struct bfin5xx_spi_chip adt7316_spi_chip_info = { | 729 | static struct bfin5xx_spi_chip adt7316_spi_chip_info = { |
775 | .enable_dma = 0, | 730 | .enable_dma = 0, |
776 | .bits_per_word = 8, | ||
777 | }; | 731 | }; |
778 | #endif | 732 | #endif |
779 | 733 | ||
@@ -800,18 +754,12 @@ static struct mmc_spi_platform_data bfin_mmc_spi_pdata = { | |||
800 | 754 | ||
801 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { | 755 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { |
802 | .enable_dma = 0, | 756 | .enable_dma = 0, |
803 | .bits_per_word = 8, | ||
804 | .pio_interrupt = 0, | 757 | .pio_interrupt = 0, |
805 | }; | 758 | }; |
806 | #endif | 759 | #endif |
807 | 760 | ||
808 | #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) | 761 | #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) |
809 | #include <linux/spi/ad7877.h> | 762 | #include <linux/spi/ad7877.h> |
810 | static struct bfin5xx_spi_chip spi_ad7877_chip_info = { | ||
811 | .enable_dma = 0, | ||
812 | .bits_per_word = 16, | ||
813 | }; | ||
814 | |||
815 | static const struct ad7877_platform_data bfin_ad7877_ts_info = { | 763 | static const struct ad7877_platform_data bfin_ad7877_ts_info = { |
816 | .model = 7877, | 764 | .model = 7877, |
817 | .vref_delay_usecs = 50, /* internal, no capacitor */ | 765 | .vref_delay_usecs = 50, /* internal, no capacitor */ |
@@ -883,39 +831,13 @@ static const struct adxl34x_platform_data adxl34x_info = { | |||
883 | }; | 831 | }; |
884 | #endif | 832 | #endif |
885 | 833 | ||
886 | #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) | ||
887 | static struct bfin5xx_spi_chip spi_ad7879_chip_info = { | ||
888 | .enable_dma = 0, | ||
889 | .bits_per_word = 16, | ||
890 | }; | ||
891 | #endif | ||
892 | |||
893 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) | ||
894 | static struct bfin5xx_spi_chip spidev_chip_info = { | ||
895 | .enable_dma = 0, | ||
896 | .bits_per_word = 8, | ||
897 | }; | ||
898 | #endif | ||
899 | |||
900 | #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) | ||
901 | static struct bfin5xx_spi_chip lq035q1_spi_chip_info = { | ||
902 | .enable_dma = 0, | ||
903 | .bits_per_word = 8, | ||
904 | }; | ||
905 | #endif | ||
906 | |||
907 | #if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE) | 834 | #if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE) |
908 | static struct bfin5xx_spi_chip enc28j60_spi_chip_info = { | 835 | static struct bfin5xx_spi_chip enc28j60_spi_chip_info = { |
909 | .enable_dma = 1, | 836 | .enable_dma = 1, |
910 | .bits_per_word = 8, | ||
911 | }; | 837 | }; |
912 | #endif | 838 | #endif |
913 | 839 | ||
914 | #if defined(CONFIG_ADF702X) || defined(CONFIG_ADF702X_MODULE) | 840 | #if defined(CONFIG_ADF702X) || defined(CONFIG_ADF702X_MODULE) |
915 | static struct bfin5xx_spi_chip adf7021_spi_chip_info = { | ||
916 | .bits_per_word = 16, | ||
917 | }; | ||
918 | |||
919 | #include <linux/spi/adf702x.h> | 841 | #include <linux/spi/adf702x.h> |
920 | #define TXREG 0x0160A470 | 842 | #define TXREG 0x0160A470 |
921 | static const u32 adf7021_regs[] = { | 843 | static const u32 adf7021_regs[] = { |
@@ -959,10 +881,6 @@ static inline void adf702x_mac_init(void) {} | |||
959 | 881 | ||
960 | #if defined(CONFIG_TOUCHSCREEN_ADS7846) || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) | 882 | #if defined(CONFIG_TOUCHSCREEN_ADS7846) || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) |
961 | #include <linux/spi/ads7846.h> | 883 | #include <linux/spi/ads7846.h> |
962 | static struct bfin5xx_spi_chip ad7873_spi_chip_info = { | ||
963 | .bits_per_word = 8, | ||
964 | }; | ||
965 | |||
966 | static int ads7873_get_pendown_state(void) | 884 | static int ads7873_get_pendown_state(void) |
967 | { | 885 | { |
968 | return gpio_get_value(GPIO_PF6); | 886 | return gpio_get_value(GPIO_PF6); |
@@ -1009,21 +927,12 @@ static struct flash_platform_data bfin_spi_dataflash_data = { | |||
1009 | /* DataFlash chip */ | 927 | /* DataFlash chip */ |
1010 | static struct bfin5xx_spi_chip data_flash_chip_info = { | 928 | static struct bfin5xx_spi_chip data_flash_chip_info = { |
1011 | .enable_dma = 0, /* use dma transfer with this chip*/ | 929 | .enable_dma = 0, /* use dma transfer with this chip*/ |
1012 | .bits_per_word = 8, | ||
1013 | }; | ||
1014 | #endif | ||
1015 | |||
1016 | #if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE) | ||
1017 | static struct bfin5xx_spi_chip spi_adxl34x_chip_info = { | ||
1018 | .enable_dma = 0, /* use dma transfer with this chip*/ | ||
1019 | .bits_per_word = 8, | ||
1020 | }; | 930 | }; |
1021 | #endif | 931 | #endif |
1022 | 932 | ||
1023 | #if defined(CONFIG_AD7476) || defined(CONFIG_AD7476_MODULE) | 933 | #if defined(CONFIG_AD7476) || defined(CONFIG_AD7476_MODULE) |
1024 | static struct bfin5xx_spi_chip spi_ad7476_chip_info = { | 934 | static struct bfin5xx_spi_chip spi_ad7476_chip_info = { |
1025 | .enable_dma = 0, /* use dma transfer with this chip*/ | 935 | .enable_dma = 0, /* use dma transfer with this chip*/ |
1026 | .bits_per_word = 8, | ||
1027 | }; | 936 | }; |
1028 | #endif | 937 | #endif |
1029 | 938 | ||
@@ -1053,27 +962,15 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
1053 | .mode = SPI_MODE_3, | 962 | .mode = SPI_MODE_3, |
1054 | }, | 963 | }, |
1055 | #endif | 964 | #endif |
1056 | #if defined(CONFIG_BFIN_SPI_ADC) \ | ||
1057 | || defined(CONFIG_BFIN_SPI_ADC_MODULE) | ||
1058 | { | ||
1059 | .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ | ||
1060 | .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ | ||
1061 | .bus_num = 0, /* Framework bus number */ | ||
1062 | .chip_select = 1, /* Framework chip select. */ | ||
1063 | .platform_data = NULL, /* No spi_driver specific config */ | ||
1064 | .controller_data = &spi_adc_chip_info, | ||
1065 | }, | ||
1066 | #endif | ||
1067 | 965 | ||
1068 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ | 966 | #if defined(CONFIG_SND_BF5XX_SOC_AD1836) \ |
1069 | || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) | 967 | || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE) |
1070 | { | 968 | { |
1071 | .modalias = "ad183x", | 969 | .modalias = "ad1836", |
1072 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 970 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
1073 | .bus_num = 0, | 971 | .bus_num = 0, |
1074 | .chip_select = 4, | 972 | .chip_select = 4, |
1075 | .platform_data = "ad1836", /* only includes chip name for the moment */ | 973 | .platform_data = "ad1836", /* only includes chip name for the moment */ |
1076 | .controller_data = &ad1836_spi_chip_info, | ||
1077 | .mode = SPI_MODE_3, | 974 | .mode = SPI_MODE_3, |
1078 | }, | 975 | }, |
1079 | #endif | 976 | #endif |
@@ -1084,18 +981,16 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
1084 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 981 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
1085 | .bus_num = 0, | 982 | .bus_num = 0, |
1086 | .chip_select = 5, | 983 | .chip_select = 5, |
1087 | .controller_data = &ad1938_spi_chip_info, | ||
1088 | .mode = SPI_MODE_3, | 984 | .mode = SPI_MODE_3, |
1089 | }, | 985 | }, |
1090 | #endif | 986 | #endif |
1091 | 987 | ||
1092 | #if defined(CONFIG_SND_BF5XX_SOC_ADAV80X) || defined(CONFIG_SND_BF5XX_SOC_ADAV80X_MODULE) | 988 | #if defined(CONFIG_SND_SOC_ADAV80X) || defined(CONFIG_SND_SOC_ADV80X_MODULE) |
1093 | { | 989 | { |
1094 | .modalias = "adav80x", | 990 | .modalias = "adav801", |
1095 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 991 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
1096 | .bus_num = 0, | 992 | .bus_num = 0, |
1097 | .chip_select = 1, | 993 | .chip_select = 1, |
1098 | .controller_data = &adav801_spi_chip_info, | ||
1099 | .mode = SPI_MODE_3, | 994 | .mode = SPI_MODE_3, |
1100 | }, | 995 | }, |
1101 | #endif | 996 | #endif |
@@ -1109,7 +1004,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
1109 | .chip_select = 5, | 1004 | .chip_select = 5, |
1110 | .mode = SPI_MODE_3, | 1005 | .mode = SPI_MODE_3, |
1111 | .platform_data = &ad7147_spi_platform_data, | 1006 | .platform_data = &ad7147_spi_platform_data, |
1112 | .controller_data = &ad7147_spi_chip_info, | ||
1113 | }, | 1007 | }, |
1114 | #endif | 1008 | #endif |
1115 | 1009 | ||
@@ -1188,7 +1082,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
1188 | .bus_num = 0, | 1082 | .bus_num = 0, |
1189 | .chip_select = 4, /* CS, change it for your board */ | 1083 | .chip_select = 4, /* CS, change it for your board */ |
1190 | .platform_data = ad7298_platform_data, | 1084 | .platform_data = ad7298_platform_data, |
1191 | .controller_data = &ad7298_spi_chip_info, | ||
1192 | .mode = SPI_MODE_3, | 1085 | .mode = SPI_MODE_3, |
1193 | }, | 1086 | }, |
1194 | #endif | 1087 | #endif |
@@ -1225,7 +1118,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
1225 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ | 1118 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ |
1226 | .bus_num = 0, | 1119 | .bus_num = 0, |
1227 | .chip_select = 1, | 1120 | .chip_select = 1, |
1228 | .controller_data = &spi_ad7877_chip_info, | ||
1229 | }, | 1121 | }, |
1230 | #endif | 1122 | #endif |
1231 | #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) | 1123 | #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) |
@@ -1236,7 +1128,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
1236 | .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ | 1128 | .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ |
1237 | .bus_num = 0, | 1129 | .bus_num = 0, |
1238 | .chip_select = 1, | 1130 | .chip_select = 1, |
1239 | .controller_data = &spi_ad7879_chip_info, | ||
1240 | .mode = SPI_CPHA | SPI_CPOL, | 1131 | .mode = SPI_CPHA | SPI_CPOL, |
1241 | }, | 1132 | }, |
1242 | #endif | 1133 | #endif |
@@ -1246,7 +1137,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
1246 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 1137 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
1247 | .bus_num = 0, | 1138 | .bus_num = 0, |
1248 | .chip_select = 1, | 1139 | .chip_select = 1, |
1249 | .controller_data = &spidev_chip_info, | ||
1250 | }, | 1140 | }, |
1251 | #endif | 1141 | #endif |
1252 | #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) | 1142 | #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) |
@@ -1255,7 +1145,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
1255 | .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ | 1145 | .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ |
1256 | .bus_num = 0, | 1146 | .bus_num = 0, |
1257 | .chip_select = 2, | 1147 | .chip_select = 2, |
1258 | .controller_data = &lq035q1_spi_chip_info, | ||
1259 | .mode = SPI_CPHA | SPI_CPOL, | 1148 | .mode = SPI_CPHA | SPI_CPOL, |
1260 | }, | 1149 | }, |
1261 | #endif | 1150 | #endif |
@@ -1278,7 +1167,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
1278 | .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ | 1167 | .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ |
1279 | .bus_num = 0, | 1168 | .bus_num = 0, |
1280 | .chip_select = 2, | 1169 | .chip_select = 2, |
1281 | .controller_data = &spi_adxl34x_chip_info, | ||
1282 | .mode = SPI_MODE_3, | 1170 | .mode = SPI_MODE_3, |
1283 | }, | 1171 | }, |
1284 | #endif | 1172 | #endif |
@@ -1288,7 +1176,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
1288 | .max_speed_hz = 16000000, /* max spi clock (SCK) speed in HZ */ | 1176 | .max_speed_hz = 16000000, /* max spi clock (SCK) speed in HZ */ |
1289 | .bus_num = 0, | 1177 | .bus_num = 0, |
1290 | .chip_select = GPIO_PF10 + MAX_CTRL_CS, /* GPIO controlled SSEL */ | 1178 | .chip_select = GPIO_PF10 + MAX_CTRL_CS, /* GPIO controlled SSEL */ |
1291 | .controller_data = &adf7021_spi_chip_info, | ||
1292 | .platform_data = &adf7021_platform_data, | 1179 | .platform_data = &adf7021_platform_data, |
1293 | .mode = SPI_MODE_0, | 1180 | .mode = SPI_MODE_0, |
1294 | }, | 1181 | }, |
@@ -1300,7 +1187,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
1300 | .bus_num = 0, | 1187 | .bus_num = 0, |
1301 | .irq = IRQ_PF6, | 1188 | .irq = IRQ_PF6, |
1302 | .chip_select = GPIO_PF10 + MAX_CTRL_CS, /* GPIO controlled SSEL */ | 1189 | .chip_select = GPIO_PF10 + MAX_CTRL_CS, /* GPIO controlled SSEL */ |
1303 | .controller_data = &ad7873_spi_chip_info, | ||
1304 | .platform_data = &ad7873_pdata, | 1190 | .platform_data = &ad7873_pdata, |
1305 | .mode = SPI_MODE_0, | 1191 | .mode = SPI_MODE_0, |
1306 | }, | 1192 | }, |
@@ -1681,8 +1567,13 @@ static struct resource bfin_uart0_resources[] = { | |||
1681 | .flags = IORESOURCE_MEM, | 1567 | .flags = IORESOURCE_MEM, |
1682 | }, | 1568 | }, |
1683 | { | 1569 | { |
1570 | .start = IRQ_UART0_TX, | ||
1571 | .end = IRQ_UART0_TX, | ||
1572 | .flags = IORESOURCE_IRQ, | ||
1573 | }, | ||
1574 | { | ||
1684 | .start = IRQ_UART0_RX, | 1575 | .start = IRQ_UART0_RX, |
1685 | .end = IRQ_UART0_RX+1, | 1576 | .end = IRQ_UART0_RX, |
1686 | .flags = IORESOURCE_IRQ, | 1577 | .flags = IORESOURCE_IRQ, |
1687 | }, | 1578 | }, |
1688 | { | 1579 | { |
@@ -1736,8 +1627,13 @@ static struct resource bfin_uart1_resources[] = { | |||
1736 | .flags = IORESOURCE_MEM, | 1627 | .flags = IORESOURCE_MEM, |
1737 | }, | 1628 | }, |
1738 | { | 1629 | { |
1630 | .start = IRQ_UART1_TX, | ||
1631 | .end = IRQ_UART1_TX, | ||
1632 | .flags = IORESOURCE_IRQ, | ||
1633 | }, | ||
1634 | { | ||
1739 | .start = IRQ_UART1_RX, | 1635 | .start = IRQ_UART1_RX, |
1740 | .end = IRQ_UART1_RX+1, | 1636 | .end = IRQ_UART1_RX, |
1741 | .flags = IORESOURCE_IRQ, | 1637 | .flags = IORESOURCE_IRQ, |
1742 | }, | 1638 | }, |
1743 | { | 1639 | { |
@@ -2216,7 +2112,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | |||
2216 | }, | 2112 | }, |
2217 | #endif | 2113 | #endif |
2218 | 2114 | ||
2219 | #if defined(CONFIG_SND_BF5XX_SOC_ADAV80X) || defined(CONFIG_SND_BF5XX_SOC_ADAV80X_MODULE) | 2115 | #if defined(CONFIG_SND_SOC_ADAV80X) || defined(CONFIG_SND_SOC_ADAV80X_MODULE) |
2220 | { | 2116 | { |
2221 | I2C_BOARD_INFO("adav803", 0x10), | 2117 | I2C_BOARD_INFO("adav803", 0x10), |
2222 | }, | 2118 | }, |
@@ -2249,23 +2145,6 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | |||
2249 | }, | 2145 | }, |
2250 | #endif | 2146 | #endif |
2251 | 2147 | ||
2252 | #if defined(CONFIG_AD7414) || defined(CONFIG_AD7414_MODULE) | ||
2253 | { | ||
2254 | I2C_BOARD_INFO("ad7414", 0x9), | ||
2255 | .irq = IRQ_PG5, | ||
2256 | .irq_flags = IRQF_TRIGGER_LOW, | ||
2257 | }, | ||
2258 | #endif | ||
2259 | |||
2260 | #if defined(CONFIG_AD7416) || defined(CONFIG_AD7416_MODULE) | ||
2261 | { | ||
2262 | I2C_BOARD_INFO("ad7417", 0xb), | ||
2263 | .irq = IRQ_PG5, | ||
2264 | .irq_flags = IRQF_TRIGGER_LOW, | ||
2265 | .platform_data = (void *)GPIO_PF4, | ||
2266 | }, | ||
2267 | #endif | ||
2268 | |||
2269 | #if defined(CONFIG_ADE7854_I2C) || defined(CONFIG_ADE7854_I2C_MODULE) | 2148 | #if defined(CONFIG_ADE7854_I2C) || defined(CONFIG_ADE7854_I2C_MODULE) |
2270 | { | 2149 | { |
2271 | I2C_BOARD_INFO("ade7854", 0x38), | 2150 | I2C_BOARD_INFO("ade7854", 0x38), |
@@ -2276,15 +2155,6 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | |||
2276 | { | 2155 | { |
2277 | I2C_BOARD_INFO("adt75", 0x9), | 2156 | I2C_BOARD_INFO("adt75", 0x9), |
2278 | .irq = IRQ_PG5, | 2157 | .irq = IRQ_PG5, |
2279 | .irq_flags = IRQF_TRIGGER_LOW, | ||
2280 | }, | ||
2281 | #endif | ||
2282 | |||
2283 | #if defined(CONFIG_ADT7408) || defined(CONFIG_ADT7408_MODULE) | ||
2284 | { | ||
2285 | I2C_BOARD_INFO("adt7408", 0x18), | ||
2286 | .irq = IRQ_PG5, | ||
2287 | .irq_flags = IRQF_TRIGGER_LOW, | ||
2288 | }, | 2158 | }, |
2289 | #endif | 2159 | #endif |
2290 | 2160 | ||
@@ -2293,7 +2163,6 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | |||
2293 | I2C_BOARD_INFO("adt7410", 0x48), | 2163 | I2C_BOARD_INFO("adt7410", 0x48), |
2294 | /* CT critical temperature event. line 0 */ | 2164 | /* CT critical temperature event. line 0 */ |
2295 | .irq = IRQ_PG5, | 2165 | .irq = IRQ_PG5, |
2296 | .irq_flags = IRQF_TRIGGER_LOW, | ||
2297 | .platform_data = (void *)&adt7410_platform_data, | 2166 | .platform_data = (void *)&adt7410_platform_data, |
2298 | }, | 2167 | }, |
2299 | #endif | 2168 | #endif |
@@ -2302,7 +2171,6 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | |||
2302 | { | 2171 | { |
2303 | I2C_BOARD_INFO("ad7291", 0x20), | 2172 | I2C_BOARD_INFO("ad7291", 0x20), |
2304 | .irq = IRQ_PG5, | 2173 | .irq = IRQ_PG5, |
2305 | .irq_flags = IRQF_TRIGGER_LOW, | ||
2306 | }, | 2174 | }, |
2307 | #endif | 2175 | #endif |
2308 | 2176 | ||
@@ -2390,6 +2258,11 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | |||
2390 | I2C_BOARD_INFO("adau1361", 0x38), | 2258 | I2C_BOARD_INFO("adau1361", 0x38), |
2391 | }, | 2259 | }, |
2392 | #endif | 2260 | #endif |
2261 | #if defined(CONFIG_SND_SOC_ADAU1701) || defined(CONFIG_SND_SOC_ADAU1701_MODULE) | ||
2262 | { | ||
2263 | I2C_BOARD_INFO("adau1701", 0x34), | ||
2264 | }, | ||
2265 | #endif | ||
2393 | #if defined(CONFIG_AD525X_DPOT) || defined(CONFIG_AD525X_DPOT_MODULE) | 2266 | #if defined(CONFIG_AD525X_DPOT) || defined(CONFIG_AD525X_DPOT_MODULE) |
2394 | { | 2267 | { |
2395 | I2C_BOARD_INFO("ad5258", 0x18), | 2268 | I2C_BOARD_INFO("ad5258", 0x18), |
@@ -2503,7 +2376,7 @@ static struct platform_device bfin_sport1_uart_device = { | |||
2503 | #define PATA_INT IRQ_PF5 | 2376 | #define PATA_INT IRQ_PF5 |
2504 | static struct pata_platform_info bfin_pata_platform_data = { | 2377 | static struct pata_platform_info bfin_pata_platform_data = { |
2505 | .ioport_shift = 1, | 2378 | .ioport_shift = 1, |
2506 | .irq_flags = IRQF_TRIGGER_HIGH | IRQF_DISABLED, | 2379 | .irq_flags = IRQF_TRIGGER_HIGH, |
2507 | }; | 2380 | }; |
2508 | 2381 | ||
2509 | static struct resource bfin_pata_resources[] = { | 2382 | static struct resource bfin_pata_resources[] = { |
@@ -2632,20 +2505,44 @@ static struct resource bfin_snd_resources[][4] = { | |||
2632 | BFIN_SND_RES(0), | 2505 | BFIN_SND_RES(0), |
2633 | BFIN_SND_RES(1), | 2506 | BFIN_SND_RES(1), |
2634 | }; | 2507 | }; |
2508 | #endif | ||
2509 | |||
2510 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) | ||
2511 | static struct platform_device bfin_i2s_pcm = { | ||
2512 | .name = "bfin-i2s-pcm-audio", | ||
2513 | .id = -1, | ||
2514 | }; | ||
2515 | #endif | ||
2635 | 2516 | ||
2636 | static struct platform_device bfin_pcm = { | 2517 | #if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) |
2637 | .name = "bfin-pcm-audio", | 2518 | static struct platform_device bfin_tdm_pcm = { |
2519 | .name = "bfin-tdm-pcm-audio", | ||
2638 | .id = -1, | 2520 | .id = -1, |
2639 | }; | 2521 | }; |
2640 | #endif | 2522 | #endif |
2641 | 2523 | ||
2642 | #if defined(CONFIG_SND_BF5XX_SOC_AD73311) || defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE) | 2524 | #if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) |
2525 | static struct platform_device bfin_ac97_pcm = { | ||
2526 | .name = "bfin-ac97-pcm-audio", | ||
2527 | .id = -1, | ||
2528 | }; | ||
2529 | #endif | ||
2530 | |||
2531 | #if defined(CONFIG_SND_SOC_AD73311) || defined(CONFIG_SND_SOC_AD73311_MODULE) | ||
2643 | static struct platform_device bfin_ad73311_codec_device = { | 2532 | static struct platform_device bfin_ad73311_codec_device = { |
2644 | .name = "ad73311", | 2533 | .name = "ad73311", |
2645 | .id = -1, | 2534 | .id = -1, |
2646 | }; | 2535 | }; |
2647 | #endif | 2536 | #endif |
2648 | 2537 | ||
2538 | #if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAV80X) || \ | ||
2539 | defined(CONFIG_SND_SOC_BFIN_EVAL_ADAV80X_MODULE) | ||
2540 | static struct platform_device bfin_eval_adav801_device = { | ||
2541 | .name = "bfin-eval-adav801", | ||
2542 | .id = -1, | ||
2543 | }; | ||
2544 | #endif | ||
2545 | |||
2649 | #if defined(CONFIG_SND_BF5XX_SOC_I2S) || defined(CONFIG_SND_BF5XX_SOC_I2S_MODULE) | 2546 | #if defined(CONFIG_SND_BF5XX_SOC_I2S) || defined(CONFIG_SND_BF5XX_SOC_I2S_MODULE) |
2650 | static struct platform_device bfin_i2s = { | 2547 | static struct platform_device bfin_i2s = { |
2651 | .name = "bfin-i2s", | 2548 | .name = "bfin-i2s", |
@@ -2760,6 +2657,20 @@ static struct platform_device iio_gpio_trigger = { | |||
2760 | }; | 2657 | }; |
2761 | #endif | 2658 | #endif |
2762 | 2659 | ||
2660 | #if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1373) || \ | ||
2661 | defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1373_MODULE) | ||
2662 | static struct platform_device bf5xx_adau1373_device = { | ||
2663 | .name = "bfin-eval-adau1373", | ||
2664 | }; | ||
2665 | #endif | ||
2666 | |||
2667 | #if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701) || \ | ||
2668 | defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701_MODULE) | ||
2669 | static struct platform_device bf5xx_adau1701_device = { | ||
2670 | .name = "bfin-eval-adau1701", | ||
2671 | }; | ||
2672 | #endif | ||
2673 | |||
2763 | static struct platform_device *stamp_devices[] __initdata = { | 2674 | static struct platform_device *stamp_devices[] __initdata = { |
2764 | 2675 | ||
2765 | &bfin_dpmc, | 2676 | &bfin_dpmc, |
@@ -2869,13 +2780,19 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
2869 | &stamp_flash_device, | 2780 | &stamp_flash_device, |
2870 | #endif | 2781 | #endif |
2871 | 2782 | ||
2872 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \ | 2783 | #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) |
2873 | defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) || \ | 2784 | &bfin_i2s_pcm, |
2874 | defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) | 2785 | #endif |
2875 | &bfin_pcm, | 2786 | |
2787 | #if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) | ||
2788 | &bfin_tdm_pcm, | ||
2876 | #endif | 2789 | #endif |
2877 | 2790 | ||
2878 | #if defined(CONFIG_SND_BF5XX_SOC_AD73311) || defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE) | 2791 | #if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) |
2792 | &bfin_ac97_pcm, | ||
2793 | #endif | ||
2794 | |||
2795 | #if defined(CONFIG_SND_SOC_AD73311) || defined(CONFIG_SND_SOC_AD73311_MODULE) | ||
2879 | &bfin_ad73311_codec_device, | 2796 | &bfin_ad73311_codec_device, |
2880 | #endif | 2797 | #endif |
2881 | 2798 | ||
@@ -2914,8 +2831,41 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
2914 | defined(CONFIG_IIO_GPIO_TRIGGER_MODULE) | 2831 | defined(CONFIG_IIO_GPIO_TRIGGER_MODULE) |
2915 | &iio_gpio_trigger, | 2832 | &iio_gpio_trigger, |
2916 | #endif | 2833 | #endif |
2834 | |||
2835 | #if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1373) || \ | ||
2836 | defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1373_MODULE) | ||
2837 | &bf5xx_adau1373_device, | ||
2838 | #endif | ||
2839 | |||
2840 | #if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701) || \ | ||
2841 | defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1701_MODULE) | ||
2842 | &bf5xx_adau1701_device, | ||
2843 | #endif | ||
2844 | |||
2845 | #if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAV80X) || \ | ||
2846 | defined(CONFIG_SND_SOC_BFIN_EVAL_ADAV80X_MODULE) | ||
2847 | &bfin_eval_adav801_device, | ||
2848 | #endif | ||
2917 | }; | 2849 | }; |
2918 | 2850 | ||
2851 | static int __init net2272_init(void) | ||
2852 | { | ||
2853 | #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) | ||
2854 | int ret; | ||
2855 | |||
2856 | ret = gpio_request(GPIO_PF6, "net2272"); | ||
2857 | if (ret) | ||
2858 | return ret; | ||
2859 | |||
2860 | /* Reset the USB chip */ | ||
2861 | gpio_direction_output(GPIO_PF6, 0); | ||
2862 | mdelay(2); | ||
2863 | gpio_set_value(GPIO_PF6, 1); | ||
2864 | #endif | ||
2865 | |||
2866 | return 0; | ||
2867 | } | ||
2868 | |||
2919 | static int __init stamp_init(void) | 2869 | static int __init stamp_init(void) |
2920 | { | 2870 | { |
2921 | printk(KERN_INFO "%s(): registering device resources\n", __func__); | 2871 | printk(KERN_INFO "%s(): registering device resources\n", __func__); |
@@ -2926,6 +2876,9 @@ static int __init stamp_init(void) | |||
2926 | ARRAY_SIZE(bfin_i2c_board_info)); | 2876 | ARRAY_SIZE(bfin_i2c_board_info)); |
2927 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); | 2877 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); |
2928 | 2878 | ||
2879 | if (net2272_init()) | ||
2880 | pr_warning("unable to configure net2272; it probably won't work\n"); | ||
2881 | |||
2929 | return 0; | 2882 | return 0; |
2930 | } | 2883 | } |
2931 | 2884 | ||
diff --git a/arch/blackfin/mach-bf537/boards/tcm_bf537.c b/arch/blackfin/mach-bf537/boards/tcm_bf537.c index 164a7e02c022..6917ce2fa55e 100644 --- a/arch/blackfin/mach-bf537/boards/tcm_bf537.c +++ b/arch/blackfin/mach-bf537/boards/tcm_bf537.c | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include <linux/device.h> | 10 | #include <linux/device.h> |
11 | #include <linux/etherdevice.h> | 11 | #include <linux/etherdevice.h> |
12 | #include <linux/export.h> | ||
12 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
13 | #include <linux/mtd/mtd.h> | 14 | #include <linux/mtd/mtd.h> |
14 | #include <linux/mtd/partitions.h> | 15 | #include <linux/mtd/partitions.h> |
@@ -62,29 +63,12 @@ static struct flash_platform_data bfin_spi_flash_data = { | |||
62 | /* SPI flash chip (m25p64) */ | 63 | /* SPI flash chip (m25p64) */ |
63 | static struct bfin5xx_spi_chip spi_flash_chip_info = { | 64 | static struct bfin5xx_spi_chip spi_flash_chip_info = { |
64 | .enable_dma = 0, /* use dma transfer with this chip*/ | 65 | .enable_dma = 0, /* use dma transfer with this chip*/ |
65 | .bits_per_word = 8, | ||
66 | }; | ||
67 | #endif | ||
68 | |||
69 | #if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE) | ||
70 | /* SPI ADC chip */ | ||
71 | static struct bfin5xx_spi_chip spi_adc_chip_info = { | ||
72 | .enable_dma = 1, /* use dma transfer with this chip*/ | ||
73 | .bits_per_word = 16, | ||
74 | }; | ||
75 | #endif | ||
76 | |||
77 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) | ||
78 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { | ||
79 | .enable_dma = 0, | ||
80 | .bits_per_word = 16, | ||
81 | }; | 66 | }; |
82 | #endif | 67 | #endif |
83 | 68 | ||
84 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | 69 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) |
85 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { | 70 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { |
86 | .enable_dma = 0, | 71 | .enable_dma = 0, |
87 | .bits_per_word = 8, | ||
88 | }; | 72 | }; |
89 | #endif | 73 | #endif |
90 | 74 | ||
@@ -102,24 +86,12 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
102 | }, | 86 | }, |
103 | #endif | 87 | #endif |
104 | 88 | ||
105 | #if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE) | ||
106 | { | ||
107 | .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ | ||
108 | .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ | ||
109 | .bus_num = 0, /* Framework bus number */ | ||
110 | .chip_select = 1, /* Framework chip select. */ | ||
111 | .platform_data = NULL, /* No spi_driver specific config */ | ||
112 | .controller_data = &spi_adc_chip_info, | ||
113 | }, | ||
114 | #endif | ||
115 | |||
116 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) | 89 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) |
117 | { | 90 | { |
118 | .modalias = "ad183x", | 91 | .modalias = "ad183x", |
119 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 92 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
120 | .bus_num = 0, | 93 | .bus_num = 0, |
121 | .chip_select = 4, | 94 | .chip_select = 4, |
122 | .controller_data = &ad1836_spi_chip_info, | ||
123 | }, | 95 | }, |
124 | #endif | 96 | #endif |
125 | 97 | ||
@@ -335,8 +307,13 @@ static struct resource bfin_uart0_resources[] = { | |||
335 | .flags = IORESOURCE_MEM, | 307 | .flags = IORESOURCE_MEM, |
336 | }, | 308 | }, |
337 | { | 309 | { |
310 | .start = IRQ_UART0_TX, | ||
311 | .end = IRQ_UART0_TX, | ||
312 | .flags = IORESOURCE_IRQ, | ||
313 | }, | ||
314 | { | ||
338 | .start = IRQ_UART0_RX, | 315 | .start = IRQ_UART0_RX, |
339 | .end = IRQ_UART0_RX+1, | 316 | .end = IRQ_UART0_RX, |
340 | .flags = IORESOURCE_IRQ, | 317 | .flags = IORESOURCE_IRQ, |
341 | }, | 318 | }, |
342 | { | 319 | { |
@@ -378,8 +355,13 @@ static struct resource bfin_uart1_resources[] = { | |||
378 | .flags = IORESOURCE_MEM, | 355 | .flags = IORESOURCE_MEM, |
379 | }, | 356 | }, |
380 | { | 357 | { |
358 | .start = IRQ_UART1_TX, | ||
359 | .end = IRQ_UART1_TX, | ||
360 | .flags = IORESOURCE_IRQ, | ||
361 | }, | ||
362 | { | ||
381 | .start = IRQ_UART1_RX, | 363 | .start = IRQ_UART1_RX, |
382 | .end = IRQ_UART1_RX+1, | 364 | .end = IRQ_UART1_RX, |
383 | .flags = IORESOURCE_IRQ, | 365 | .flags = IORESOURCE_IRQ, |
384 | }, | 366 | }, |
385 | { | 367 | { |
@@ -601,7 +583,7 @@ static struct platform_device bfin_mac_device = { | |||
601 | 583 | ||
602 | static struct pata_platform_info bfin_pata_platform_data = { | 584 | static struct pata_platform_info bfin_pata_platform_data = { |
603 | .ioport_shift = 2, | 585 | .ioport_shift = 2, |
604 | .irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED, | 586 | .irq_type = IRQF_TRIGGER_HIGH, |
605 | }; | 587 | }; |
606 | 588 | ||
607 | static struct resource bfin_pata_resources[] = { | 589 | static struct resource bfin_pata_resources[] = { |
@@ -733,6 +715,24 @@ static struct platform_device *cm_bf537_devices[] __initdata = { | |||
733 | #endif | 715 | #endif |
734 | }; | 716 | }; |
735 | 717 | ||
718 | static int __init net2272_init(void) | ||
719 | { | ||
720 | #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) | ||
721 | int ret; | ||
722 | |||
723 | ret = gpio_request(GPIO_PG14, "net2272"); | ||
724 | if (ret) | ||
725 | return ret; | ||
726 | |||
727 | /* Reset USB Chip, PG14 */ | ||
728 | gpio_direction_output(GPIO_PG14, 0); | ||
729 | mdelay(2); | ||
730 | gpio_set_value(GPIO_PG14, 1); | ||
731 | #endif | ||
732 | |||
733 | return 0; | ||
734 | } | ||
735 | |||
736 | static int __init tcm_bf537_init(void) | 736 | static int __init tcm_bf537_init(void) |
737 | { | 737 | { |
738 | printk(KERN_INFO "%s(): registering device resources\n", __func__); | 738 | printk(KERN_INFO "%s(): registering device resources\n", __func__); |
@@ -744,6 +744,10 @@ static int __init tcm_bf537_init(void) | |||
744 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | 744 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
745 | irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); | 745 | irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); |
746 | #endif | 746 | #endif |
747 | |||
748 | if (net2272_init()) | ||
749 | pr_warning("unable to configure net2272; it probably won't work\n"); | ||
750 | |||
747 | return 0; | 751 | return 0; |
748 | } | 752 | } |
749 | 753 | ||
diff --git a/arch/blackfin/mach-bf537/include/mach/anomaly.h b/arch/blackfin/mach-bf537/include/mach/anomaly.h index 7f8e5a9f5db6..543cd3fb305e 100644 --- a/arch/blackfin/mach-bf537/include/mach/anomaly.h +++ b/arch/blackfin/mach-bf537/include/mach/anomaly.h | |||
@@ -11,7 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | /* This file should be up to date with: | 13 | /* This file should be up to date with: |
14 | * - Revision E, 05/25/2010; ADSP-BF534/ADSP-BF536/ADSP-BF537 Blackfin Processor Anomaly List | 14 | * - Revision F, 05/23/2011; ADSP-BF534/ADSP-BF536/ADSP-BF537 Blackfin Processor Anomaly List |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #ifndef _MACH_ANOMALY_H_ | 17 | #ifndef _MACH_ANOMALY_H_ |
@@ -44,18 +44,12 @@ | |||
44 | #define ANOMALY_05000119 (1) | 44 | #define ANOMALY_05000119 (1) |
45 | /* Rx.H Cannot Be Used to Access 16-bit System MMR Registers */ | 45 | /* Rx.H Cannot Be Used to Access 16-bit System MMR Registers */ |
46 | #define ANOMALY_05000122 (1) | 46 | #define ANOMALY_05000122 (1) |
47 | /* Killed 32-Bit MMR Write Leads to Next System MMR Access Thinking It Should Be 32-Bit */ | ||
48 | #define ANOMALY_05000157 (__SILICON_REVISION__ < 2) | ||
49 | /* PPI_DELAY Not Functional in PPI Modes with 0 Frame Syncs */ | 47 | /* PPI_DELAY Not Functional in PPI Modes with 0 Frame Syncs */ |
50 | #define ANOMALY_05000180 (1) | 48 | #define ANOMALY_05000180 (1) |
51 | /* Instruction Cache Is Not Functional */ | ||
52 | #define ANOMALY_05000237 (__SILICON_REVISION__ < 2) | ||
53 | /* If I-Cache Is On, CSYNC/SSYNC/IDLE Around Change of Control Causes Failures */ | 49 | /* If I-Cache Is On, CSYNC/SSYNC/IDLE Around Change of Control Causes Failures */ |
54 | #define ANOMALY_05000244 (__SILICON_REVISION__ < 3) | 50 | #define ANOMALY_05000244 (__SILICON_REVISION__ < 3) |
55 | /* False Hardware Error from an Access in the Shadow of a Conditional Branch */ | 51 | /* False Hardware Error from an Access in the Shadow of a Conditional Branch */ |
56 | #define ANOMALY_05000245 (1) | 52 | #define ANOMALY_05000245 (1) |
57 | /* Buffered CLKIN Output Is Disabled by Default */ | ||
58 | #define ANOMALY_05000247 (1) | ||
59 | /* Incorrect Bit Shift of Data Word in Multichannel (TDM) Mode in Certain Conditions */ | 53 | /* Incorrect Bit Shift of Data Word in Multichannel (TDM) Mode in Certain Conditions */ |
60 | #define ANOMALY_05000250 (__SILICON_REVISION__ < 3) | 54 | #define ANOMALY_05000250 (__SILICON_REVISION__ < 3) |
61 | /* EMAC TX DMA Error After an Early Frame Abort */ | 55 | /* EMAC TX DMA Error After an Early Frame Abort */ |
@@ -98,7 +92,7 @@ | |||
98 | #define ANOMALY_05000278 (((ANOMALY_BF536 || ANOMALY_BF537) && __SILICON_REVISION__ < 3) || (ANOMALY_BF534 && __SILICON_REVISION__ < 2)) | 92 | #define ANOMALY_05000278 (((ANOMALY_BF536 || ANOMALY_BF537) && __SILICON_REVISION__ < 3) || (ANOMALY_BF534 && __SILICON_REVISION__ < 2)) |
99 | /* SPI Master Boot Mode Does Not Work Well with Atmel Data Flash Devices */ | 93 | /* SPI Master Boot Mode Does Not Work Well with Atmel Data Flash Devices */ |
100 | #define ANOMALY_05000280 (1) | 94 | #define ANOMALY_05000280 (1) |
101 | /* False Hardware Error Exception when ISR Context Is Not Restored */ | 95 | /* False Hardware Error when ISR Context Is Not Restored */ |
102 | #define ANOMALY_05000281 (__SILICON_REVISION__ < 3) | 96 | #define ANOMALY_05000281 (__SILICON_REVISION__ < 3) |
103 | /* Memory DMA Corruption with 32-Bit Data and Traffic Control */ | 97 | /* Memory DMA Corruption with 32-Bit Data and Traffic Control */ |
104 | #define ANOMALY_05000282 (__SILICON_REVISION__ < 3) | 98 | #define ANOMALY_05000282 (__SILICON_REVISION__ < 3) |
@@ -162,9 +156,9 @@ | |||
162 | #define ANOMALY_05000461 (1) | 156 | #define ANOMALY_05000461 (1) |
163 | /* Synchronization Problem at Startup May Cause SPORT Transmit Channels to Misalign */ | 157 | /* Synchronization Problem at Startup May Cause SPORT Transmit Channels to Misalign */ |
164 | #define ANOMALY_05000462 (1) | 158 | #define ANOMALY_05000462 (1) |
165 | /* Interrupted 32-Bit SPORT Data Register Access Results In Underflow */ | 159 | /* Interrupted SPORT Receive Data Register Read Results In Underflow when SLEN > 15 */ |
166 | #define ANOMALY_05000473 (1) | 160 | #define ANOMALY_05000473 (1) |
167 | /* Possible Lockup Condition whem Modifying PLL from External Memory */ | 161 | /* Possible Lockup Condition when Modifying PLL from External Memory */ |
168 | #define ANOMALY_05000475 (1) | 162 | #define ANOMALY_05000475 (1) |
169 | /* TESTSET Instruction Cannot Be Interrupted */ | 163 | /* TESTSET Instruction Cannot Be Interrupted */ |
170 | #define ANOMALY_05000477 (1) | 164 | #define ANOMALY_05000477 (1) |
@@ -172,8 +166,26 @@ | |||
172 | #define ANOMALY_05000480 (__SILICON_REVISION__ < 3) | 166 | #define ANOMALY_05000480 (__SILICON_REVISION__ < 3) |
173 | /* Reads of ITEST_COMMAND and ITEST_DATA Registers Cause Cache Corruption */ | 167 | /* Reads of ITEST_COMMAND and ITEST_DATA Registers Cause Cache Corruption */ |
174 | #define ANOMALY_05000481 (1) | 168 | #define ANOMALY_05000481 (1) |
175 | /* IFLUSH sucks at life */ | 169 | /* PLL May Latch Incorrect Values Coming Out of Reset */ |
170 | #define ANOMALY_05000489 (1) | ||
171 | /* Instruction Memory Stalls Can Cause IFLUSH to Fail */ | ||
176 | #define ANOMALY_05000491 (1) | 172 | #define ANOMALY_05000491 (1) |
173 | /* EXCPT Instruction May Be Lost If NMI Happens Simultaneously */ | ||
174 | #define ANOMALY_05000494 (1) | ||
175 | /* RXS Bit in SPI_STAT May Become Stuck In RX DMA Modes */ | ||
176 | #define ANOMALY_05000501 (1) | ||
177 | |||
178 | /* | ||
179 | * These anomalies have been "phased" out of analog.com anomaly sheets and are | ||
180 | * here to show running on older silicon just isn't feasible. | ||
181 | */ | ||
182 | |||
183 | /* Killed 32-Bit MMR Write Leads to Next System MMR Access Thinking It Should Be 32-Bit */ | ||
184 | #define ANOMALY_05000157 (__SILICON_REVISION__ < 2) | ||
185 | /* Instruction Cache Is Not Functional */ | ||
186 | #define ANOMALY_05000237 (__SILICON_REVISION__ < 2) | ||
187 | /* Buffered CLKIN Output Is Disabled by Default */ | ||
188 | #define ANOMALY_05000247 (__SILICON_REVISION__ < 2) | ||
177 | 189 | ||
178 | /* Anomalies that don't exist on this proc */ | 190 | /* Anomalies that don't exist on this proc */ |
179 | #define ANOMALY_05000099 (0) | 191 | #define ANOMALY_05000099 (0) |
diff --git a/arch/blackfin/mach-bf538/boards/ezkit.c b/arch/blackfin/mach-bf538/boards/ezkit.c index e61424ef35eb..8356eb599f19 100644 --- a/arch/blackfin/mach-bf538/boards/ezkit.c +++ b/arch/blackfin/mach-bf538/boards/ezkit.c | |||
@@ -49,8 +49,13 @@ static struct resource bfin_uart0_resources[] = { | |||
49 | .flags = IORESOURCE_MEM, | 49 | .flags = IORESOURCE_MEM, |
50 | }, | 50 | }, |
51 | { | 51 | { |
52 | .start = IRQ_UART0_TX, | ||
53 | .end = IRQ_UART0_TX, | ||
54 | .flags = IORESOURCE_IRQ, | ||
55 | }, | ||
56 | { | ||
52 | .start = IRQ_UART0_RX, | 57 | .start = IRQ_UART0_RX, |
53 | .end = IRQ_UART0_RX+1, | 58 | .end = IRQ_UART0_RX, |
54 | .flags = IORESOURCE_IRQ, | 59 | .flags = IORESOURCE_IRQ, |
55 | }, | 60 | }, |
56 | { | 61 | { |
@@ -104,8 +109,13 @@ static struct resource bfin_uart1_resources[] = { | |||
104 | .flags = IORESOURCE_MEM, | 109 | .flags = IORESOURCE_MEM, |
105 | }, | 110 | }, |
106 | { | 111 | { |
112 | .start = IRQ_UART1_TX, | ||
113 | .end = IRQ_UART1_TX, | ||
114 | .flags = IORESOURCE_IRQ, | ||
115 | }, | ||
116 | { | ||
107 | .start = IRQ_UART1_RX, | 117 | .start = IRQ_UART1_RX, |
108 | .end = IRQ_UART1_RX+1, | 118 | .end = IRQ_UART1_RX, |
109 | .flags = IORESOURCE_IRQ, | 119 | .flags = IORESOURCE_IRQ, |
110 | }, | 120 | }, |
111 | { | 121 | { |
@@ -147,8 +157,13 @@ static struct resource bfin_uart2_resources[] = { | |||
147 | .flags = IORESOURCE_MEM, | 157 | .flags = IORESOURCE_MEM, |
148 | }, | 158 | }, |
149 | { | 159 | { |
160 | .start = IRQ_UART2_TX, | ||
161 | .end = IRQ_UART2_TX, | ||
162 | .flags = IORESOURCE_IRQ, | ||
163 | }, | ||
164 | { | ||
150 | .start = IRQ_UART2_RX, | 165 | .start = IRQ_UART2_RX, |
151 | .end = IRQ_UART2_RX+1, | 166 | .end = IRQ_UART2_RX, |
152 | .flags = IORESOURCE_IRQ, | 167 | .flags = IORESOURCE_IRQ, |
153 | }, | 168 | }, |
154 | { | 169 | { |
@@ -502,7 +517,6 @@ static struct flash_platform_data bfin_spi_flash_data = { | |||
502 | 517 | ||
503 | static struct bfin5xx_spi_chip spi_flash_chip_info = { | 518 | static struct bfin5xx_spi_chip spi_flash_chip_info = { |
504 | .enable_dma = 0, /* use dma transfer with this chip*/ | 519 | .enable_dma = 0, /* use dma transfer with this chip*/ |
505 | .bits_per_word = 8, | ||
506 | }; | 520 | }; |
507 | #endif | 521 | #endif |
508 | 522 | ||
@@ -523,13 +537,6 @@ static const struct ad7879_platform_data bfin_ad7879_ts_info = { | |||
523 | }; | 537 | }; |
524 | #endif | 538 | #endif |
525 | 539 | ||
526 | #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) | ||
527 | static struct bfin5xx_spi_chip spi_ad7879_chip_info = { | ||
528 | .enable_dma = 0, | ||
529 | .bits_per_word = 16, | ||
530 | }; | ||
531 | #endif | ||
532 | |||
533 | #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) | 540 | #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) |
534 | #include <asm/bfin-lq035q1.h> | 541 | #include <asm/bfin-lq035q1.h> |
535 | 542 | ||
@@ -559,20 +566,6 @@ static struct platform_device bfin_lq035q1_device = { | |||
559 | }; | 566 | }; |
560 | #endif | 567 | #endif |
561 | 568 | ||
562 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) | ||
563 | static struct bfin5xx_spi_chip spidev_chip_info = { | ||
564 | .enable_dma = 0, | ||
565 | .bits_per_word = 8, | ||
566 | }; | ||
567 | #endif | ||
568 | |||
569 | #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) | ||
570 | static struct bfin5xx_spi_chip lq035q1_spi_chip_info = { | ||
571 | .enable_dma = 0, | ||
572 | .bits_per_word = 8, | ||
573 | }; | ||
574 | #endif | ||
575 | |||
576 | static struct spi_board_info bf538_spi_board_info[] __initdata = { | 569 | static struct spi_board_info bf538_spi_board_info[] __initdata = { |
577 | #if defined(CONFIG_MTD_M25P80) \ | 570 | #if defined(CONFIG_MTD_M25P80) \ |
578 | || defined(CONFIG_MTD_M25P80_MODULE) | 571 | || defined(CONFIG_MTD_M25P80_MODULE) |
@@ -595,7 +588,6 @@ static struct spi_board_info bf538_spi_board_info[] __initdata = { | |||
595 | .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ | 588 | .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ |
596 | .bus_num = 0, | 589 | .bus_num = 0, |
597 | .chip_select = 1, | 590 | .chip_select = 1, |
598 | .controller_data = &spi_ad7879_chip_info, | ||
599 | .mode = SPI_CPHA | SPI_CPOL, | 591 | .mode = SPI_CPHA | SPI_CPOL, |
600 | }, | 592 | }, |
601 | #endif | 593 | #endif |
@@ -605,7 +597,6 @@ static struct spi_board_info bf538_spi_board_info[] __initdata = { | |||
605 | .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ | 597 | .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ |
606 | .bus_num = 0, | 598 | .bus_num = 0, |
607 | .chip_select = 2, | 599 | .chip_select = 2, |
608 | .controller_data = &lq035q1_spi_chip_info, | ||
609 | .mode = SPI_CPHA | SPI_CPOL, | 600 | .mode = SPI_CPHA | SPI_CPOL, |
610 | }, | 601 | }, |
611 | #endif | 602 | #endif |
@@ -615,7 +606,6 @@ static struct spi_board_info bf538_spi_board_info[] __initdata = { | |||
615 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 606 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
616 | .bus_num = 0, | 607 | .bus_num = 0, |
617 | .chip_select = 1, | 608 | .chip_select = 1, |
618 | .controller_data = &spidev_chip_info, | ||
619 | }, | 609 | }, |
620 | #endif | 610 | #endif |
621 | }; | 611 | }; |
diff --git a/arch/blackfin/mach-bf538/ext-gpio.c b/arch/blackfin/mach-bf538/ext-gpio.c index 180b1252679f..471a9b184d5b 100644 --- a/arch/blackfin/mach-bf538/ext-gpio.c +++ b/arch/blackfin/mach-bf538/ext-gpio.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * GPIOLIB interface for BF538/9 PORT C, D, and E GPIOs | 2 | * GPIOLIB interface for BF538/9 PORT C, D, and E GPIOs |
3 | * | 3 | * |
4 | * Copyright 2009 Analog Devices Inc. | 4 | * Copyright 2009-2011 Analog Devices Inc. |
5 | * | 5 | * |
6 | * Licensed under the GPL-2 or later. | 6 | * Licensed under the GPL-2 or later. |
7 | */ | 7 | */ |
@@ -121,3 +121,38 @@ static int __init bf538_extgpio_setup(void) | |||
121 | gpiochip_add(&bf538_porte_chip); | 121 | gpiochip_add(&bf538_porte_chip); |
122 | } | 122 | } |
123 | arch_initcall(bf538_extgpio_setup); | 123 | arch_initcall(bf538_extgpio_setup); |
124 | |||
125 | #ifdef CONFIG_PM | ||
126 | static struct { | ||
127 | u16 data, dir, inen; | ||
128 | } gpio_bank_saved[3]; | ||
129 | |||
130 | static void __iomem * const port_bases[3] = { | ||
131 | (void *)PORTCIO, | ||
132 | (void *)PORTDIO, | ||
133 | (void *)PORTEIO, | ||
134 | }; | ||
135 | |||
136 | void bfin_special_gpio_pm_hibernate_suspend(void) | ||
137 | { | ||
138 | int i; | ||
139 | |||
140 | for (i = 0; i < ARRAY_SIZE(port_bases); ++i) { | ||
141 | gpio_bank_saved[i].data = read_PORTIO(port_bases[i]); | ||
142 | gpio_bank_saved[i].inen = read_PORTIO_INEN(port_bases[i]); | ||
143 | gpio_bank_saved[i].dir = read_PORTIO_DIR(port_bases[i]); | ||
144 | } | ||
145 | } | ||
146 | |||
147 | void bfin_special_gpio_pm_hibernate_restore(void) | ||
148 | { | ||
149 | int i; | ||
150 | |||
151 | for (i = 0; i < ARRAY_SIZE(port_bases); ++i) { | ||
152 | write_PORTIO_INEN(port_bases[i], gpio_bank_saved[i].inen); | ||
153 | write_PORTIO_SET(port_bases[i], | ||
154 | gpio_bank_saved[i].data & gpio_bank_saved[i].dir); | ||
155 | write_PORTIO_DIR(port_bases[i], gpio_bank_saved[i].dir); | ||
156 | } | ||
157 | } | ||
158 | #endif | ||
diff --git a/arch/blackfin/mach-bf538/include/mach/anomaly.h b/arch/blackfin/mach-bf538/include/mach/anomaly.h index 55e7d0712a94..b6ca99788710 100644 --- a/arch/blackfin/mach-bf538/include/mach/anomaly.h +++ b/arch/blackfin/mach-bf538/include/mach/anomaly.h | |||
@@ -11,8 +11,8 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | /* This file should be up to date with: | 13 | /* This file should be up to date with: |
14 | * - Revision I, 05/25/2010; ADSP-BF538/BF538F Blackfin Processor Anomaly List | 14 | * - Revision J, 05/23/2011; ADSP-BF538/BF538F Blackfin Processor Anomaly List |
15 | * - Revision N, 05/25/2010; ADSP-BF539/BF539F Blackfin Processor Anomaly List | 15 | * - Revision O, 05/23/2011; ADSP-BF539/BF539F Blackfin Processor Anomaly List |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #ifndef _MACH_ANOMALY_H_ | 18 | #ifndef _MACH_ANOMALY_H_ |
@@ -56,25 +56,21 @@ | |||
56 | #define ANOMALY_05000229 (1) | 56 | #define ANOMALY_05000229 (1) |
57 | /* PPI_FS3 Is Not Driven in 2 or 3 Internal Frame Sync Transmit Modes */ | 57 | /* PPI_FS3 Is Not Driven in 2 or 3 Internal Frame Sync Transmit Modes */ |
58 | #define ANOMALY_05000233 (1) | 58 | #define ANOMALY_05000233 (1) |
59 | /* If I-Cache Is On, CSYNC/SSYNC/IDLE Around Change of Control Causes Failures */ | ||
60 | #define ANOMALY_05000244 (__SILICON_REVISION__ < 3) | ||
61 | /* False Hardware Error from an Access in the Shadow of a Conditional Branch */ | 59 | /* False Hardware Error from an Access in the Shadow of a Conditional Branch */ |
62 | #define ANOMALY_05000245 (1) | 60 | #define ANOMALY_05000245 (1) |
63 | /* Maximum External Clock Speed for Timers */ | 61 | /* Maximum External Clock Speed for Timers */ |
64 | #define ANOMALY_05000253 (1) | 62 | #define ANOMALY_05000253 (1) |
65 | /* DCPLB_FAULT_ADDR MMR Register May Be Corrupted */ | ||
66 | #define ANOMALY_05000261 (__SILICON_REVISION__ < 3) | ||
67 | /* High I/O Activity Causes Output Voltage of Internal Voltage Regulator (Vddint) to Decrease */ | 63 | /* High I/O Activity Causes Output Voltage of Internal Voltage Regulator (Vddint) to Decrease */ |
68 | #define ANOMALY_05000270 (__SILICON_REVISION__ < 4) | 64 | #define ANOMALY_05000270 (__SILICON_REVISION__ < 4) |
69 | /* Certain Data Cache Writethrough Modes Fail for Vddint <= 0.9V */ | 65 | /* Certain Data Cache Writethrough Modes Fail for Vddint <= 0.9V */ |
70 | #define ANOMALY_05000272 (1) | 66 | #define ANOMALY_05000272 (ANOMALY_BF538) |
71 | /* Writes to Synchronous SDRAM Memory May Be Lost */ | 67 | /* Writes to Synchronous SDRAM Memory May Be Lost */ |
72 | #define ANOMALY_05000273 (__SILICON_REVISION__ < 4) | 68 | #define ANOMALY_05000273 (__SILICON_REVISION__ < 4) |
73 | /* Writes to an I/O Data Register One SCLK Cycle after an Edge Is Detected May Clear Interrupt */ | 69 | /* Writes to an I/O Data Register One SCLK Cycle after an Edge Is Detected May Clear Interrupt */ |
74 | #define ANOMALY_05000277 (__SILICON_REVISION__ < 4) | 70 | #define ANOMALY_05000277 (__SILICON_REVISION__ < 4) |
75 | /* Disabling Peripherals with DMA Running May Cause DMA System Instability */ | 71 | /* Disabling Peripherals with DMA Running May Cause DMA System Instability */ |
76 | #define ANOMALY_05000278 (__SILICON_REVISION__ < 4) | 72 | #define ANOMALY_05000278 (__SILICON_REVISION__ < 4) |
77 | /* False Hardware Error Exception when ISR Context Is Not Restored */ | 73 | /* False Hardware Error when ISR Context Is Not Restored */ |
78 | #define ANOMALY_05000281 (__SILICON_REVISION__ < 4) | 74 | #define ANOMALY_05000281 (__SILICON_REVISION__ < 4) |
79 | /* Memory DMA Corruption with 32-Bit Data and Traffic Control */ | 75 | /* Memory DMA Corruption with 32-Bit Data and Traffic Control */ |
80 | #define ANOMALY_05000282 (__SILICON_REVISION__ < 4) | 76 | #define ANOMALY_05000282 (__SILICON_REVISION__ < 4) |
@@ -102,8 +98,10 @@ | |||
102 | #define ANOMALY_05000313 (__SILICON_REVISION__ < 4) | 98 | #define ANOMALY_05000313 (__SILICON_REVISION__ < 4) |
103 | /* Killed System MMR Write Completes Erroneously on Next System MMR Access */ | 99 | /* Killed System MMR Write Completes Erroneously on Next System MMR Access */ |
104 | #define ANOMALY_05000315 (__SILICON_REVISION__ < 4) | 100 | #define ANOMALY_05000315 (__SILICON_REVISION__ < 4) |
101 | /* PFx Glitch on Write to PORTFIO or PORTFIO_TOGGLE */ | ||
102 | #define ANOMALY_05000317 (__SILICON_REVISION__ < 4) /* XXX: Same as 05000318 */ | ||
105 | /* PFx Glitch on Write to FIO_FLAG_D or FIO_FLAG_T */ | 103 | /* PFx Glitch on Write to FIO_FLAG_D or FIO_FLAG_T */ |
106 | #define ANOMALY_05000318 (ANOMALY_BF539 && __SILICON_REVISION__ < 4) | 104 | #define ANOMALY_05000318 (__SILICON_REVISION__ < 4) /* XXX: Same as 05000317 */ |
107 | /* Regulator Programming Blocked when Hibernate Wakeup Source Remains Active */ | 105 | /* Regulator Programming Blocked when Hibernate Wakeup Source Remains Active */ |
108 | #define ANOMALY_05000355 (__SILICON_REVISION__ < 5) | 106 | #define ANOMALY_05000355 (__SILICON_REVISION__ < 5) |
109 | /* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ | 107 | /* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ |
@@ -134,16 +132,32 @@ | |||
134 | #define ANOMALY_05000461 (1) | 132 | #define ANOMALY_05000461 (1) |
135 | /* Synchronization Problem at Startup May Cause SPORT Transmit Channels to Misalign */ | 133 | /* Synchronization Problem at Startup May Cause SPORT Transmit Channels to Misalign */ |
136 | #define ANOMALY_05000462 (1) | 134 | #define ANOMALY_05000462 (1) |
137 | /* Interrupted 32-Bit SPORT Data Register Access Results In Underflow */ | 135 | /* Interrupted SPORT Receive Data Register Read Results In Underflow when SLEN > 15 */ |
138 | #define ANOMALY_05000473 (1) | 136 | #define ANOMALY_05000473 (1) |
139 | /* Possible Lockup Condition whem Modifying PLL from External Memory */ | 137 | /* Possible Lockup Condition when Modifying PLL from External Memory */ |
140 | #define ANOMALY_05000475 (1) | 138 | #define ANOMALY_05000475 (1) |
141 | /* TESTSET Instruction Cannot Be Interrupted */ | 139 | /* TESTSET Instruction Cannot Be Interrupted */ |
142 | #define ANOMALY_05000477 (1) | 140 | #define ANOMALY_05000477 (1) |
143 | /* Reads of ITEST_COMMAND and ITEST_DATA Registers Cause Cache Corruption */ | 141 | /* Reads of ITEST_COMMAND and ITEST_DATA Registers Cause Cache Corruption */ |
144 | #define ANOMALY_05000481 (1) | 142 | #define ANOMALY_05000481 (1) |
145 | /* IFLUSH sucks at life */ | 143 | /* PLL May Latch Incorrect Values Coming Out of Reset */ |
144 | #define ANOMALY_05000489 (1) | ||
145 | /* Instruction Memory Stalls Can Cause IFLUSH to Fail */ | ||
146 | #define ANOMALY_05000491 (1) | 146 | #define ANOMALY_05000491 (1) |
147 | /* EXCPT Instruction May Be Lost If NMI Happens Simultaneously */ | ||
148 | #define ANOMALY_05000494 (1) | ||
149 | /* RXS Bit in SPI_STAT May Become Stuck In RX DMA Modes */ | ||
150 | #define ANOMALY_05000501 (1) | ||
151 | |||
152 | /* | ||
153 | * These anomalies have been "phased" out of analog.com anomaly sheets and are | ||
154 | * here to show running on older silicon just isn't feasible. | ||
155 | */ | ||
156 | |||
157 | /* If I-Cache Is On, CSYNC/SSYNC/IDLE Around Change of Control Causes Failures */ | ||
158 | #define ANOMALY_05000244 (__SILICON_REVISION__ < 3) | ||
159 | /* DCPLB_FAULT_ADDR MMR Register May Be Corrupted */ | ||
160 | #define ANOMALY_05000261 (__SILICON_REVISION__ < 3) | ||
147 | 161 | ||
148 | /* Anomalies that don't exist on this proc */ | 162 | /* Anomalies that don't exist on this proc */ |
149 | #define ANOMALY_05000099 (0) | 163 | #define ANOMALY_05000099 (0) |
diff --git a/arch/blackfin/mach-bf538/include/mach/gpio.h b/arch/blackfin/mach-bf538/include/mach/gpio.h index 8a5beeece996..3561c7d8935b 100644 --- a/arch/blackfin/mach-bf538/include/mach/gpio.h +++ b/arch/blackfin/mach-bf538/include/mach/gpio.h | |||
@@ -8,7 +8,10 @@ | |||
8 | #define _MACH_GPIO_H_ | 8 | #define _MACH_GPIO_H_ |
9 | 9 | ||
10 | #define MAX_BLACKFIN_GPIOS 16 | 10 | #define MAX_BLACKFIN_GPIOS 16 |
11 | #ifdef CONFIG_GPIOLIB | ||
12 | /* We only use the special logic with GPIOLIB devices */ | ||
11 | #define BFIN_SPECIAL_GPIO_BANKS 3 | 13 | #define BFIN_SPECIAL_GPIO_BANKS 3 |
14 | #endif | ||
12 | 15 | ||
13 | #define GPIO_PF0 0 /* PF */ | 16 | #define GPIO_PF0 0 /* PF */ |
14 | #define GPIO_PF1 1 | 17 | #define GPIO_PF1 1 |
diff --git a/arch/blackfin/mach-bf548/boards/cm_bf548.c b/arch/blackfin/mach-bf548/boards/cm_bf548.c index d11502ac5623..0350eacec21b 100644 --- a/arch/blackfin/mach-bf548/boards/cm_bf548.c +++ b/arch/blackfin/mach-bf548/boards/cm_bf548.c | |||
@@ -135,8 +135,13 @@ static struct resource bfin_uart0_resources[] = { | |||
135 | .flags = IORESOURCE_MEM, | 135 | .flags = IORESOURCE_MEM, |
136 | }, | 136 | }, |
137 | { | 137 | { |
138 | .start = IRQ_UART0_TX, | ||
139 | .end = IRQ_UART0_TX, | ||
140 | .flags = IORESOURCE_IRQ, | ||
141 | }, | ||
142 | { | ||
138 | .start = IRQ_UART0_RX, | 143 | .start = IRQ_UART0_RX, |
139 | .end = IRQ_UART0_RX+1, | 144 | .end = IRQ_UART0_RX, |
140 | .flags = IORESOURCE_IRQ, | 145 | .flags = IORESOURCE_IRQ, |
141 | }, | 146 | }, |
142 | { | 147 | { |
@@ -178,8 +183,13 @@ static struct resource bfin_uart1_resources[] = { | |||
178 | .flags = IORESOURCE_MEM, | 183 | .flags = IORESOURCE_MEM, |
179 | }, | 184 | }, |
180 | { | 185 | { |
186 | .start = IRQ_UART1_TX, | ||
187 | .end = IRQ_UART1_TX, | ||
188 | .flags = IORESOURCE_IRQ, | ||
189 | }, | ||
190 | { | ||
181 | .start = IRQ_UART1_RX, | 191 | .start = IRQ_UART1_RX, |
182 | .end = IRQ_UART1_RX+1, | 192 | .end = IRQ_UART1_RX, |
183 | .flags = IORESOURCE_IRQ, | 193 | .flags = IORESOURCE_IRQ, |
184 | }, | 194 | }, |
185 | { | 195 | { |
@@ -237,8 +247,13 @@ static struct resource bfin_uart2_resources[] = { | |||
237 | .flags = IORESOURCE_MEM, | 247 | .flags = IORESOURCE_MEM, |
238 | }, | 248 | }, |
239 | { | 249 | { |
250 | .start = IRQ_UART2_TX, | ||
251 | .end = IRQ_UART2_TX, | ||
252 | .flags = IORESOURCE_IRQ, | ||
253 | }, | ||
254 | { | ||
240 | .start = IRQ_UART2_RX, | 255 | .start = IRQ_UART2_RX, |
241 | .end = IRQ_UART2_RX+1, | 256 | .end = IRQ_UART2_RX, |
242 | .flags = IORESOURCE_IRQ, | 257 | .flags = IORESOURCE_IRQ, |
243 | }, | 258 | }, |
244 | { | 259 | { |
@@ -280,8 +295,13 @@ static struct resource bfin_uart3_resources[] = { | |||
280 | .flags = IORESOURCE_MEM, | 295 | .flags = IORESOURCE_MEM, |
281 | }, | 296 | }, |
282 | { | 297 | { |
298 | .start = IRQ_UART3_TX, | ||
299 | .end = IRQ_UART3_TX, | ||
300 | .flags = IORESOURCE_IRQ, | ||
301 | }, | ||
302 | { | ||
283 | .start = IRQ_UART3_RX, | 303 | .start = IRQ_UART3_RX, |
284 | .end = IRQ_UART3_RX+1, | 304 | .end = IRQ_UART3_RX, |
285 | .flags = IORESOURCE_IRQ, | 305 | .flags = IORESOURCE_IRQ, |
286 | }, | 306 | }, |
287 | { | 307 | { |
@@ -861,16 +881,10 @@ static struct flash_platform_data bfin_spi_flash_data = { | |||
861 | 881 | ||
862 | static struct bfin5xx_spi_chip spi_flash_chip_info = { | 882 | static struct bfin5xx_spi_chip spi_flash_chip_info = { |
863 | .enable_dma = 0, /* use dma transfer with this chip*/ | 883 | .enable_dma = 0, /* use dma transfer with this chip*/ |
864 | .bits_per_word = 8, | ||
865 | }; | 884 | }; |
866 | #endif | 885 | #endif |
867 | 886 | ||
868 | #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) | 887 | #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) |
869 | static struct bfin5xx_spi_chip spi_ad7877_chip_info = { | ||
870 | .enable_dma = 0, | ||
871 | .bits_per_word = 16, | ||
872 | }; | ||
873 | |||
874 | static const struct ad7877_platform_data bfin_ad7877_ts_info = { | 888 | static const struct ad7877_platform_data bfin_ad7877_ts_info = { |
875 | .model = 7877, | 889 | .model = 7877, |
876 | .vref_delay_usecs = 50, /* internal, no capacitor */ | 890 | .vref_delay_usecs = 50, /* internal, no capacitor */ |
@@ -886,13 +900,6 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = { | |||
886 | }; | 900 | }; |
887 | #endif | 901 | #endif |
888 | 902 | ||
889 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) | ||
890 | static struct bfin5xx_spi_chip spidev_chip_info = { | ||
891 | .enable_dma = 0, | ||
892 | .bits_per_word = 8, | ||
893 | }; | ||
894 | #endif | ||
895 | |||
896 | static struct spi_board_info bf54x_spi_board_info[] __initdata = { | 903 | static struct spi_board_info bf54x_spi_board_info[] __initdata = { |
897 | #if defined(CONFIG_MTD_M25P80) \ | 904 | #if defined(CONFIG_MTD_M25P80) \ |
898 | || defined(CONFIG_MTD_M25P80_MODULE) | 905 | || defined(CONFIG_MTD_M25P80_MODULE) |
@@ -915,7 +922,6 @@ static struct spi_board_info bf54x_spi_board_info[] __initdata = { | |||
915 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ | 922 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ |
916 | .bus_num = 0, | 923 | .bus_num = 0, |
917 | .chip_select = 2, | 924 | .chip_select = 2, |
918 | .controller_data = &spi_ad7877_chip_info, | ||
919 | }, | 925 | }, |
920 | #endif | 926 | #endif |
921 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) | 927 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) |
@@ -924,7 +930,6 @@ static struct spi_board_info bf54x_spi_board_info[] __initdata = { | |||
924 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 930 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
925 | .bus_num = 0, | 931 | .bus_num = 0, |
926 | .chip_select = 1, | 932 | .chip_select = 1, |
927 | .controller_data = &spidev_chip_info, | ||
928 | }, | 933 | }, |
929 | #endif | 934 | #endif |
930 | }; | 935 | }; |
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c index 311bf9970fe7..bb868ac0fe2d 100644 --- a/arch/blackfin/mach-bf548/boards/ezkit.c +++ b/arch/blackfin/mach-bf548/boards/ezkit.c | |||
@@ -241,8 +241,13 @@ static struct resource bfin_uart0_resources[] = { | |||
241 | .flags = IORESOURCE_MEM, | 241 | .flags = IORESOURCE_MEM, |
242 | }, | 242 | }, |
243 | { | 243 | { |
244 | .start = IRQ_UART0_TX, | ||
245 | .end = IRQ_UART0_TX, | ||
246 | .flags = IORESOURCE_IRQ, | ||
247 | }, | ||
248 | { | ||
244 | .start = IRQ_UART0_RX, | 249 | .start = IRQ_UART0_RX, |
245 | .end = IRQ_UART0_RX+1, | 250 | .end = IRQ_UART0_RX, |
246 | .flags = IORESOURCE_IRQ, | 251 | .flags = IORESOURCE_IRQ, |
247 | }, | 252 | }, |
248 | { | 253 | { |
@@ -284,8 +289,13 @@ static struct resource bfin_uart1_resources[] = { | |||
284 | .flags = IORESOURCE_MEM, | 289 | .flags = IORESOURCE_MEM, |
285 | }, | 290 | }, |
286 | { | 291 | { |
292 | .start = IRQ_UART1_TX, | ||
293 | .end = IRQ_UART1_TX, | ||
294 | .flags = IORESOURCE_IRQ, | ||
295 | }, | ||
296 | { | ||
287 | .start = IRQ_UART1_RX, | 297 | .start = IRQ_UART1_RX, |
288 | .end = IRQ_UART1_RX+1, | 298 | .end = IRQ_UART1_RX, |
289 | .flags = IORESOURCE_IRQ, | 299 | .flags = IORESOURCE_IRQ, |
290 | }, | 300 | }, |
291 | { | 301 | { |
@@ -343,8 +353,13 @@ static struct resource bfin_uart2_resources[] = { | |||
343 | .flags = IORESOURCE_MEM, | 353 | .flags = IORESOURCE_MEM, |
344 | }, | 354 | }, |
345 | { | 355 | { |
356 | .start = IRQ_UART2_TX, | ||
357 | .end = IRQ_UART2_TX, | ||
358 | .flags = IORESOURCE_IRQ, | ||
359 | }, | ||
360 | { | ||
346 | .start = IRQ_UART2_RX, | 361 | .start = IRQ_UART2_RX, |
347 | .end = IRQ_UART2_RX+1, | 362 | .end = IRQ_UART2_RX, |
348 | .flags = IORESOURCE_IRQ, | 363 | .flags = IORESOURCE_IRQ, |
349 | }, | 364 | }, |
350 | { | 365 | { |
@@ -386,8 +401,13 @@ static struct resource bfin_uart3_resources[] = { | |||
386 | .flags = IORESOURCE_MEM, | 401 | .flags = IORESOURCE_MEM, |
387 | }, | 402 | }, |
388 | { | 403 | { |
404 | .start = IRQ_UART3_TX, | ||
405 | .end = IRQ_UART3_TX, | ||
406 | .flags = IORESOURCE_IRQ, | ||
407 | }, | ||
408 | { | ||
389 | .start = IRQ_UART3_RX, | 409 | .start = IRQ_UART3_RX, |
390 | .end = IRQ_UART3_RX+1, | 410 | .end = IRQ_UART3_RX, |
391 | .flags = IORESOURCE_IRQ, | 411 | .flags = IORESOURCE_IRQ, |
392 | }, | 412 | }, |
393 | { | 413 | { |
@@ -1018,24 +1038,10 @@ static struct flash_platform_data bfin_spi_flash_data = { | |||
1018 | 1038 | ||
1019 | static struct bfin5xx_spi_chip spi_flash_chip_info = { | 1039 | static struct bfin5xx_spi_chip spi_flash_chip_info = { |
1020 | .enable_dma = 0, /* use dma transfer with this chip*/ | 1040 | .enable_dma = 0, /* use dma transfer with this chip*/ |
1021 | .bits_per_word = 8, | ||
1022 | }; | ||
1023 | #endif | ||
1024 | |||
1025 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ | ||
1026 | || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) | ||
1027 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { | ||
1028 | .enable_dma = 0, | ||
1029 | .bits_per_word = 16, | ||
1030 | }; | 1041 | }; |
1031 | #endif | 1042 | #endif |
1032 | 1043 | ||
1033 | #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) | 1044 | #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) |
1034 | static struct bfin5xx_spi_chip spi_ad7877_chip_info = { | ||
1035 | .enable_dma = 0, | ||
1036 | .bits_per_word = 16, | ||
1037 | }; | ||
1038 | |||
1039 | static const struct ad7877_platform_data bfin_ad7877_ts_info = { | 1045 | static const struct ad7877_platform_data bfin_ad7877_ts_info = { |
1040 | .model = 7877, | 1046 | .model = 7877, |
1041 | .vref_delay_usecs = 50, /* internal, no capacitor */ | 1047 | .vref_delay_usecs = 50, /* internal, no capacitor */ |
@@ -1051,20 +1057,6 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = { | |||
1051 | }; | 1057 | }; |
1052 | #endif | 1058 | #endif |
1053 | 1059 | ||
1054 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) | ||
1055 | static struct bfin5xx_spi_chip spidev_chip_info = { | ||
1056 | .enable_dma = 0, | ||
1057 | .bits_per_word = 8, | ||
1058 | }; | ||
1059 | #endif | ||
1060 | |||
1061 | #if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE) | ||
1062 | static struct bfin5xx_spi_chip spi_adxl34x_chip_info = { | ||
1063 | .enable_dma = 0, /* use dma transfer with this chip*/ | ||
1064 | .bits_per_word = 8, | ||
1065 | }; | ||
1066 | #endif | ||
1067 | |||
1068 | static struct spi_board_info bfin_spi_board_info[] __initdata = { | 1060 | static struct spi_board_info bfin_spi_board_info[] __initdata = { |
1069 | #if defined(CONFIG_MTD_M25P80) \ | 1061 | #if defined(CONFIG_MTD_M25P80) \ |
1070 | || defined(CONFIG_MTD_M25P80_MODULE) | 1062 | || defined(CONFIG_MTD_M25P80_MODULE) |
@@ -1086,7 +1078,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
1086 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 1078 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
1087 | .bus_num = 1, | 1079 | .bus_num = 1, |
1088 | .chip_select = 4, | 1080 | .chip_select = 4, |
1089 | .controller_data = &ad1836_spi_chip_info, | ||
1090 | }, | 1081 | }, |
1091 | #endif | 1082 | #endif |
1092 | #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) | 1083 | #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) |
@@ -1097,7 +1088,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
1097 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ | 1088 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ |
1098 | .bus_num = 0, | 1089 | .bus_num = 0, |
1099 | .chip_select = 2, | 1090 | .chip_select = 2, |
1100 | .controller_data = &spi_ad7877_chip_info, | ||
1101 | }, | 1091 | }, |
1102 | #endif | 1092 | #endif |
1103 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) | 1093 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) |
@@ -1106,7 +1096,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
1106 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 1096 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
1107 | .bus_num = 0, | 1097 | .bus_num = 0, |
1108 | .chip_select = 1, | 1098 | .chip_select = 1, |
1109 | .controller_data = &spidev_chip_info, | ||
1110 | }, | 1099 | }, |
1111 | #endif | 1100 | #endif |
1112 | #if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE) | 1101 | #if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE) |
@@ -1117,7 +1106,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
1117 | .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ | 1106 | .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ |
1118 | .bus_num = 1, | 1107 | .bus_num = 1, |
1119 | .chip_select = 2, | 1108 | .chip_select = 2, |
1120 | .controller_data = &spi_adxl34x_chip_info, | ||
1121 | .mode = SPI_MODE_3, | 1109 | .mode = SPI_MODE_3, |
1122 | }, | 1110 | }, |
1123 | #endif | 1111 | #endif |
diff --git a/arch/blackfin/mach-bf548/include/mach/anomaly.h b/arch/blackfin/mach-bf548/include/mach/anomaly.h index 9e70785bdde3..ac96ee83b00e 100644 --- a/arch/blackfin/mach-bf548/include/mach/anomaly.h +++ b/arch/blackfin/mach-bf548/include/mach/anomaly.h | |||
@@ -11,7 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | /* This file should be up to date with: | 13 | /* This file should be up to date with: |
14 | * - Revision J, 06/03/2010; ADSP-BF542/BF544/BF547/BF548/BF549 Blackfin Processor Anomaly List | 14 | * - Revision K, 05/23/2011; ADSP-BF542/BF544/BF547/BF548/BF549 Blackfin Processor Anomaly List |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #ifndef _MACH_ANOMALY_H_ | 17 | #ifndef _MACH_ANOMALY_H_ |
@@ -29,117 +29,37 @@ | |||
29 | /* Rx.H Cannot Be Used to Access 16-bit System MMR Registers */ | 29 | /* Rx.H Cannot Be Used to Access 16-bit System MMR Registers */ |
30 | #define ANOMALY_05000122 (1) | 30 | #define ANOMALY_05000122 (1) |
31 | /* Data Corruption/Core Hang with L2/L3 Configured in Writeback Cache Mode */ | 31 | /* Data Corruption/Core Hang with L2/L3 Configured in Writeback Cache Mode */ |
32 | #define ANOMALY_05000220 (1) | 32 | #define ANOMALY_05000220 (__SILICON_REVISION__ < 4) |
33 | /* False Hardware Error from an Access in the Shadow of a Conditional Branch */ | 33 | /* False Hardware Error from an Access in the Shadow of a Conditional Branch */ |
34 | #define ANOMALY_05000245 (1) | 34 | #define ANOMALY_05000245 (1) |
35 | /* Sensitivity To Noise with Slow Input Edge Rates on External SPORT TX and RX Clocks */ | 35 | /* Sensitivity To Noise with Slow Input Edge Rates on External SPORT TX and RX Clocks */ |
36 | #define ANOMALY_05000265 (1) | 36 | #define ANOMALY_05000265 (1) |
37 | /* Certain Data Cache Writethrough Modes Fail for Vddint <= 0.9V */ | 37 | /* Certain Data Cache Writethrough Modes Fail for Vddint <= 0.9V */ |
38 | #define ANOMALY_05000272 (1) | 38 | #define ANOMALY_05000272 (1) |
39 | /* False Hardware Error Exception when ISR Context Is Not Restored */ | ||
40 | #define ANOMALY_05000281 (__SILICON_REVISION__ < 1) | ||
41 | /* SSYNCs After Writes To CAN/DMA MMR Registers Are Not Always Handled Correctly */ | ||
42 | #define ANOMALY_05000304 (__SILICON_REVISION__ < 1) | ||
43 | /* False Hardware Errors Caused by Fetches at the Boundary of Reserved Memory */ | 39 | /* False Hardware Errors Caused by Fetches at the Boundary of Reserved Memory */ |
44 | #define ANOMALY_05000310 (1) | 40 | #define ANOMALY_05000310 (1) |
45 | /* Errors when SSYNC, CSYNC, or Loads to LT, LB and LC Registers Are Interrupted */ | ||
46 | #define ANOMALY_05000312 (__SILICON_REVISION__ < 1) | ||
47 | /* TWI Slave Boot Mode Is Not Functional */ | ||
48 | #define ANOMALY_05000324 (__SILICON_REVISION__ < 1) | ||
49 | /* FIFO Boot Mode Not Functional */ | 41 | /* FIFO Boot Mode Not Functional */ |
50 | #define ANOMALY_05000325 (__SILICON_REVISION__ < 2) | 42 | #define ANOMALY_05000325 (__SILICON_REVISION__ < 2) |
51 | /* Data Lost When Core and DMA Accesses Are Made to the USB FIFO Simultaneously */ | ||
52 | #define ANOMALY_05000327 (__SILICON_REVISION__ < 1) | ||
53 | /* Incorrect Access of OTP_STATUS During otp_write() Function */ | ||
54 | #define ANOMALY_05000328 (__SILICON_REVISION__ < 1) | ||
55 | /* Synchronous Burst Flash Boot Mode Is Not Functional */ | ||
56 | #define ANOMALY_05000329 (__SILICON_REVISION__ < 1) | ||
57 | /* Host DMA Boot Modes Are Not Functional */ | ||
58 | #define ANOMALY_05000330 (__SILICON_REVISION__ < 1) | ||
59 | /* Inadequate Timing Margins on DDR DQS to DQ and DQM Skew */ | ||
60 | #define ANOMALY_05000334 (__SILICON_REVISION__ < 1) | ||
61 | /* Inadequate Rotary Debounce Logic Duration */ | ||
62 | #define ANOMALY_05000335 (__SILICON_REVISION__ < 1) | ||
63 | /* Phantom Interrupt Occurs After First Configuration of Host DMA Port */ | ||
64 | #define ANOMALY_05000336 (__SILICON_REVISION__ < 1) | ||
65 | /* Disallowed Configuration Prevents Subsequent Allowed Configuration on Host DMA Port */ | ||
66 | #define ANOMALY_05000337 (__SILICON_REVISION__ < 1) | ||
67 | /* Slave-Mode SPI0 MISO Failure With CPHA = 0 */ | ||
68 | #define ANOMALY_05000338 (__SILICON_REVISION__ < 1) | ||
69 | /* If Memory Reads Are Enabled on SDH or HOSTDP, Other DMAC1 Peripherals Cannot Read */ | ||
70 | #define ANOMALY_05000340 (__SILICON_REVISION__ < 1) | ||
71 | /* Boot Host Wait (HWAIT) and Boot Host Wait Alternate (HWAITA) Signals Are Swapped */ | ||
72 | #define ANOMALY_05000344 (__SILICON_REVISION__ < 1) | ||
73 | /* USB Calibration Value Is Not Initialized */ | ||
74 | #define ANOMALY_05000346 (__SILICON_REVISION__ < 1) | ||
75 | /* USB Calibration Value to use */ | ||
76 | #define ANOMALY_05000346_value 0x5411 | ||
77 | /* Preboot Routine Incorrectly Alters Reset Value of USB Register */ | ||
78 | #define ANOMALY_05000347 (__SILICON_REVISION__ < 1) | ||
79 | /* Data Lost when Core Reads SDH Data FIFO */ | ||
80 | #define ANOMALY_05000349 (__SILICON_REVISION__ < 1) | ||
81 | /* PLL Status Register Is Inaccurate */ | ||
82 | #define ANOMALY_05000351 (__SILICON_REVISION__ < 1) | ||
83 | /* bfrom_SysControl() Firmware Function Performs Improper System Reset */ | 43 | /* bfrom_SysControl() Firmware Function Performs Improper System Reset */ |
84 | /* | 44 | /* |
85 | * Note: anomaly sheet says this is fixed with bf54x-0.2+, but testing | 45 | * Note: anomaly sheet says this is fixed with bf54x-0.2+, but testing |
86 | * shows that the fix itself does not cover all cases. | 46 | * shows that the fix itself does not cover all cases. |
87 | */ | 47 | */ |
88 | #define ANOMALY_05000353 (1) | 48 | #define ANOMALY_05000353 (1) |
89 | /* Regulator Programming Blocked when Hibernate Wakeup Source Remains Active */ | ||
90 | #define ANOMALY_05000355 (__SILICON_REVISION__ < 1) | ||
91 | /* System Stalled During A Core Access To AMC While A Core Access To NFC FIFO Is Required */ | ||
92 | #define ANOMALY_05000356 (__SILICON_REVISION__ < 1) | ||
93 | /* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ | 49 | /* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ |
94 | #define ANOMALY_05000357 (1) | 50 | #define ANOMALY_05000357 (1) |
95 | /* External Memory Read Access Hangs Core With PLL Bypass */ | 51 | /* External Memory Read Access Hangs Core With PLL Bypass */ |
96 | #define ANOMALY_05000360 (1) | 52 | #define ANOMALY_05000360 (1) |
97 | /* DMAs that Go Urgent during Tight Core Writes to External Memory Are Blocked */ | 53 | /* DMAs that Go Urgent during Tight Core Writes to External Memory Are Blocked */ |
98 | #define ANOMALY_05000365 (1) | 54 | #define ANOMALY_05000365 (1) |
99 | /* WURESET Bit In SYSCR Register Does Not Properly Indicate Hibernate Wake-Up */ | ||
100 | #define ANOMALY_05000367 (__SILICON_REVISION__ < 1) | ||
101 | /* Addressing Conflict between Boot ROM and Asynchronous Memory */ | 55 | /* Addressing Conflict between Boot ROM and Asynchronous Memory */ |
102 | #define ANOMALY_05000369 (1) | 56 | #define ANOMALY_05000369 (1) |
103 | /* Default PLL MSEL and SSEL Settings Can Cause 400MHz Product To Violate Specifications */ | ||
104 | #define ANOMALY_05000370 (__SILICON_REVISION__ < 1) | ||
105 | /* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ | 57 | /* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ |
106 | #define ANOMALY_05000371 (__SILICON_REVISION__ < 2) | 58 | #define ANOMALY_05000371 (__SILICON_REVISION__ < 2) |
107 | /* USB DP/DM Data Pins May Lose State When Entering Hibernate */ | ||
108 | #define ANOMALY_05000372 (__SILICON_REVISION__ < 1) | ||
109 | /* Security/Authentication Speedpath Causes Authentication To Fail To Initiate */ | 59 | /* Security/Authentication Speedpath Causes Authentication To Fail To Initiate */ |
110 | #define ANOMALY_05000378 (__SILICON_REVISION__ < 2) | 60 | #define ANOMALY_05000378 (__SILICON_REVISION__ < 2) |
111 | /* 16-Bit NAND FLASH Boot Mode Is Not Functional */ | 61 | /* 16-Bit NAND FLASH Boot Mode Is Not Functional */ |
112 | #define ANOMALY_05000379 (1) | 62 | #define ANOMALY_05000379 (1) |
113 | /* 8-Bit NAND Flash Boot Mode Not Functional */ | ||
114 | #define ANOMALY_05000382 (__SILICON_REVISION__ < 1) | ||
115 | /* Some ATAPI Modes Are Not Functional */ | ||
116 | #define ANOMALY_05000383 (1) | ||
117 | /* Boot from OTP Memory Not Functional */ | ||
118 | #define ANOMALY_05000385 (__SILICON_REVISION__ < 1) | ||
119 | /* bfrom_SysControl() Firmware Routine Not Functional */ | ||
120 | #define ANOMALY_05000386 (__SILICON_REVISION__ < 1) | ||
121 | /* Programmable Preboot Settings Not Functional */ | ||
122 | #define ANOMALY_05000387 (__SILICON_REVISION__ < 1) | ||
123 | /* CRC32 Checksum Support Not Functional */ | ||
124 | #define ANOMALY_05000388 (__SILICON_REVISION__ < 1) | ||
125 | /* Reset Vector Must Not Be in SDRAM Memory Space */ | ||
126 | #define ANOMALY_05000389 (__SILICON_REVISION__ < 1) | ||
127 | /* Changed Meaning of BCODE Field in SYSCR Register */ | ||
128 | #define ANOMALY_05000390 (__SILICON_REVISION__ < 1) | ||
129 | /* Repeated Boot from Page-Mode or Burst-Mode Flash Memory May Fail */ | ||
130 | #define ANOMALY_05000391 (__SILICON_REVISION__ < 1) | ||
131 | /* pTempCurrent Not Present in ADI_BOOT_DATA Structure */ | ||
132 | #define ANOMALY_05000392 (__SILICON_REVISION__ < 1) | ||
133 | /* Deprecated Value of dTempByteCount in ADI_BOOT_DATA Structure */ | ||
134 | #define ANOMALY_05000393 (__SILICON_REVISION__ < 1) | ||
135 | /* Log Buffer Not Functional */ | ||
136 | #define ANOMALY_05000394 (__SILICON_REVISION__ < 1) | ||
137 | /* Hook Routine Not Functional */ | ||
138 | #define ANOMALY_05000395 (__SILICON_REVISION__ < 1) | ||
139 | /* Header Indirect Bit Not Functional */ | ||
140 | #define ANOMALY_05000396 (__SILICON_REVISION__ < 1) | ||
141 | /* BK_ONES, BK_ZEROS, and BK_DATECODE Constants Not Functional */ | ||
142 | #define ANOMALY_05000397 (__SILICON_REVISION__ < 1) | ||
143 | /* Lockbox SESR Disallows Certain User Interrupts */ | 63 | /* Lockbox SESR Disallows Certain User Interrupts */ |
144 | #define ANOMALY_05000404 (__SILICON_REVISION__ < 2) | 64 | #define ANOMALY_05000404 (__SILICON_REVISION__ < 2) |
145 | /* Lockbox SESR Firmware Does Not Save/Restore Full Context */ | 65 | /* Lockbox SESR Firmware Does Not Save/Restore Full Context */ |
@@ -161,7 +81,7 @@ | |||
161 | /* Speculative Fetches Can Cause Undesired External FIFO Operations */ | 81 | /* Speculative Fetches Can Cause Undesired External FIFO Operations */ |
162 | #define ANOMALY_05000416 (1) | 82 | #define ANOMALY_05000416 (1) |
163 | /* Multichannel SPORT Channel Misalignment Under Specific Configuration */ | 83 | /* Multichannel SPORT Channel Misalignment Under Specific Configuration */ |
164 | #define ANOMALY_05000425 (1) | 84 | #define ANOMALY_05000425 (__SILICON_REVISION__ < 4) |
165 | /* Speculative Fetches of Indirect-Pointer Instructions Can Cause False Hardware Errors */ | 85 | /* Speculative Fetches of Indirect-Pointer Instructions Can Cause False Hardware Errors */ |
166 | #define ANOMALY_05000426 (1) | 86 | #define ANOMALY_05000426 (1) |
167 | /* CORE_EPPI_PRIO bit and SYS_EPPI_PRIO bit in the HMDMA1_CONTROL register are not functional */ | 87 | /* CORE_EPPI_PRIO bit and SYS_EPPI_PRIO bit in the HMDMA1_CONTROL register are not functional */ |
@@ -174,8 +94,6 @@ | |||
174 | #define ANOMALY_05000431 (__SILICON_REVISION__ < 3) | 94 | #define ANOMALY_05000431 (__SILICON_REVISION__ < 3) |
175 | /* SW Breakpoints Ignored Upon Return From Lockbox Authentication */ | 95 | /* SW Breakpoints Ignored Upon Return From Lockbox Authentication */ |
176 | #define ANOMALY_05000434 (1) | 96 | #define ANOMALY_05000434 (1) |
177 | /* OTP Write Accesses Not Supported */ | ||
178 | #define ANOMALY_05000442 (__SILICON_REVISION__ < 1) | ||
179 | /* IFLUSH Instruction at End of Hardware Loop Causes Infinite Stall */ | 97 | /* IFLUSH Instruction at End of Hardware Loop Causes Infinite Stall */ |
180 | #define ANOMALY_05000443 (1) | 98 | #define ANOMALY_05000443 (1) |
181 | /* CDMAPRIO and L2DMAPRIO Bits in the SYSCR Register Are Not Functional */ | 99 | /* CDMAPRIO and L2DMAPRIO Bits in the SYSCR Register Are Not Functional */ |
@@ -186,34 +104,32 @@ | |||
186 | #define ANOMALY_05000448 (__SILICON_REVISION__ == 1) | 104 | #define ANOMALY_05000448 (__SILICON_REVISION__ == 1) |
187 | /* Reduced Timing Margins on DDR Output Setup and Hold (tDS and tDH) */ | 105 | /* Reduced Timing Margins on DDR Output Setup and Hold (tDS and tDH) */ |
188 | #define ANOMALY_05000449 (__SILICON_REVISION__ == 1) | 106 | #define ANOMALY_05000449 (__SILICON_REVISION__ == 1) |
189 | /* USB DMA Mode 1 Short Packet Data Corruption */ | 107 | /* USB DMA Short Packet Data Corruption */ |
190 | #define ANOMALY_05000450 (1) | 108 | #define ANOMALY_05000450 (1) |
191 | /* Incorrect Default Hysteresis Setting for RESET, NMI, and BMODE Signals */ | ||
192 | #define ANOMALY_05000452 (__SILICON_REVISION__ < 1) | ||
193 | /* USB Receive Interrupt Is Not Generated in DMA Mode 1 */ | 109 | /* USB Receive Interrupt Is Not Generated in DMA Mode 1 */ |
194 | #define ANOMALY_05000456 (1) | 110 | #define ANOMALY_05000456 (1) |
195 | /* Host DMA Port Responds to Certain Bus Activity Without HOST_CE Assertion */ | 111 | /* Host DMA Port Responds to Certain Bus Activity Without HOST_CE Assertion */ |
196 | #define ANOMALY_05000457 (1) | 112 | #define ANOMALY_05000457 (1) |
197 | /* USB DMA Mode 1 Failure When Multiple USB DMA Channels Are Concurrently Enabled */ | 113 | /* USB DMA Mode 1 Failure When Multiple USB DMA Channels Are Concurrently Enabled */ |
198 | #define ANOMALY_05000460 (1) | 114 | #define ANOMALY_05000460 (__SILICON_REVISION__ < 4) |
199 | /* False Hardware Error when RETI Points to Invalid Memory */ | 115 | /* False Hardware Error when RETI Points to Invalid Memory */ |
200 | #define ANOMALY_05000461 (1) | 116 | #define ANOMALY_05000461 (1) |
201 | /* Synchronization Problem at Startup May Cause SPORT Transmit Channels to Misalign */ | 117 | /* Synchronization Problem at Startup May Cause SPORT Transmit Channels to Misalign */ |
202 | #define ANOMALY_05000462 (1) | 118 | #define ANOMALY_05000462 (__SILICON_REVISION__ < 4) |
203 | /* USB DMA RX Data Corruption */ | 119 | /* USB DMA RX Data Corruption */ |
204 | #define ANOMALY_05000463 (1) | 120 | #define ANOMALY_05000463 (__SILICON_REVISION__ < 4) |
205 | /* USB TX DMA Hang */ | 121 | /* USB TX DMA Hang */ |
206 | #define ANOMALY_05000464 (1) | 122 | #define ANOMALY_05000464 (__SILICON_REVISION__ < 4) |
207 | /* USB Rx DMA hang */ | 123 | /* USB Rx DMA Hang */ |
208 | #define ANOMALY_05000465 (1) | 124 | #define ANOMALY_05000465 (1) |
209 | /* TxPktRdy Bit Not Set for Transmit Endpoint When Core and DMA Access USB Endpoint FIFOs Simultaneously */ | 125 | /* TxPktRdy Bit Not Set for Transmit Endpoint When Core and DMA Access USB Endpoint FIFOs Simultaneously */ |
210 | #define ANOMALY_05000466 (1) | 126 | #define ANOMALY_05000466 (__SILICON_REVISION__ < 4) |
211 | /* Possible RX data corruption when control & data EP FIFOs are accessed via the core */ | 127 | /* Possible USB RX Data Corruption When Control & Data EP FIFOs are Accessed via the Core */ |
212 | #define ANOMALY_05000467 (1) | 128 | #define ANOMALY_05000467 (__SILICON_REVISION__ < 4) |
213 | /* Interrupted 32-Bit SPORT Data Register Access Results In Underflow */ | 129 | /* Interrupted SPORT Receive Data Register Read Results In Underflow when SLEN > 15 */ |
214 | #define ANOMALY_05000473 (1) | 130 | #define ANOMALY_05000473 (1) |
215 | /* Access to DDR-SDRAM causes system hang under certain PLL/VR settings */ | 131 | /* Access to DDR SDRAM Causes System Hang with Certain PLL Settings */ |
216 | #define ANOMALY_05000474 (1) | 132 | #define ANOMALY_05000474 (__SILICON_REVISION__ < 4) |
217 | /* TESTSET Instruction Cannot Be Interrupted */ | 133 | /* TESTSET Instruction Cannot Be Interrupted */ |
218 | #define ANOMALY_05000477 (1) | 134 | #define ANOMALY_05000477 (1) |
219 | /* Reads of ITEST_COMMAND and ITEST_DATA Registers Cause Cache Corruption */ | 135 | /* Reads of ITEST_COMMAND and ITEST_DATA Registers Cause Cache Corruption */ |
@@ -223,9 +139,111 @@ | |||
223 | /* DDR Trim May Not Be Performed for Certain VLEV Values in OTP Page PBS00L */ | 139 | /* DDR Trim May Not Be Performed for Certain VLEV Values in OTP Page PBS00L */ |
224 | #define ANOMALY_05000484 (__SILICON_REVISION__ < 3) | 140 | #define ANOMALY_05000484 (__SILICON_REVISION__ < 3) |
225 | /* PLL_CTL Change Using bfrom_SysControl() Can Result in Processor Overclocking */ | 141 | /* PLL_CTL Change Using bfrom_SysControl() Can Result in Processor Overclocking */ |
226 | #define ANOMALY_05000485 (__SILICON_REVISION__ >= 2) | 142 | #define ANOMALY_05000485 (__SILICON_REVISION__ > 1 && __SILICON_REVISION__ < 4) |
227 | /* IFLUSH sucks at life */ | 143 | /* PLL May Latch Incorrect Values Coming Out of Reset */ |
144 | #define ANOMALY_05000489 (1) | ||
145 | /* SPI Master Boot Can Fail Under Certain Conditions */ | ||
146 | #define ANOMALY_05000490 (1) | ||
147 | /* Instruction Memory Stalls Can Cause IFLUSH to Fail */ | ||
228 | #define ANOMALY_05000491 (1) | 148 | #define ANOMALY_05000491 (1) |
149 | /* EXCPT Instruction May Be Lost If NMI Happens Simultaneously */ | ||
150 | #define ANOMALY_05000494 (1) | ||
151 | /* CNT_COMMAND Functionality Depends on CNT_IMASK Configuration */ | ||
152 | #define ANOMALY_05000498 (1) | ||
153 | /* Nand Flash Controller Hangs When the AMC Requests the Async Pins During the last 16 Bytes of a Page Write Operation. */ | ||
154 | #define ANOMALY_05000500 (1) | ||
155 | /* RXS Bit in SPI_STAT May Become Stuck In RX DMA Modes */ | ||
156 | #define ANOMALY_05000501 (1) | ||
157 | /* Async Memory Writes May Be Skipped When Using Odd Clock Ratios */ | ||
158 | #define ANOMALY_05000502 (1) | ||
159 | |||
160 | /* | ||
161 | * These anomalies have been "phased" out of analog.com anomaly sheets and are | ||
162 | * here to show running on older silicon just isn't feasible. | ||
163 | */ | ||
164 | |||
165 | /* False Hardware Error when ISR Context Is Not Restored */ | ||
166 | #define ANOMALY_05000281 (__SILICON_REVISION__ < 1) | ||
167 | /* SSYNCs After Writes To CAN/DMA MMR Registers Are Not Always Handled Correctly */ | ||
168 | #define ANOMALY_05000304 (__SILICON_REVISION__ < 1) | ||
169 | /* Errors when SSYNC, CSYNC, or Loads to LT, LB and LC Registers Are Interrupted */ | ||
170 | #define ANOMALY_05000312 (__SILICON_REVISION__ < 1) | ||
171 | /* TWI Slave Boot Mode Is Not Functional */ | ||
172 | #define ANOMALY_05000324 (__SILICON_REVISION__ < 1) | ||
173 | /* Data Lost When Core and DMA Accesses Are Made to the USB FIFO Simultaneously */ | ||
174 | #define ANOMALY_05000327 (__SILICON_REVISION__ < 1) | ||
175 | /* Incorrect Access of OTP_STATUS During otp_write() Function */ | ||
176 | #define ANOMALY_05000328 (__SILICON_REVISION__ < 1) | ||
177 | /* Synchronous Burst Flash Boot Mode Is Not Functional */ | ||
178 | #define ANOMALY_05000329 (__SILICON_REVISION__ < 1) | ||
179 | /* Host DMA Boot Modes Are Not Functional */ | ||
180 | #define ANOMALY_05000330 (__SILICON_REVISION__ < 1) | ||
181 | /* Inadequate Timing Margins on DDR DQS to DQ and DQM Skew */ | ||
182 | #define ANOMALY_05000334 (__SILICON_REVISION__ < 1) | ||
183 | /* Inadequate Rotary Debounce Logic Duration */ | ||
184 | #define ANOMALY_05000335 (__SILICON_REVISION__ < 1) | ||
185 | /* Phantom Interrupt Occurs After First Configuration of Host DMA Port */ | ||
186 | #define ANOMALY_05000336 (__SILICON_REVISION__ < 1) | ||
187 | /* Disallowed Configuration Prevents Subsequent Allowed Configuration on Host DMA Port */ | ||
188 | #define ANOMALY_05000337 (__SILICON_REVISION__ < 1) | ||
189 | /* Slave-Mode SPI0 MISO Failure With CPHA = 0 */ | ||
190 | #define ANOMALY_05000338 (__SILICON_REVISION__ < 1) | ||
191 | /* If Memory Reads Are Enabled on SDH or HOSTDP, Other DMAC1 Peripherals Cannot Read */ | ||
192 | #define ANOMALY_05000340 (__SILICON_REVISION__ < 1) | ||
193 | /* Boot Host Wait (HWAIT) and Boot Host Wait Alternate (HWAITA) Signals Are Swapped */ | ||
194 | #define ANOMALY_05000344 (__SILICON_REVISION__ < 1) | ||
195 | /* USB Calibration Value Is Not Initialized */ | ||
196 | #define ANOMALY_05000346 (__SILICON_REVISION__ < 1) | ||
197 | /* USB Calibration Value to use */ | ||
198 | #define ANOMALY_05000346_value 0x5411 | ||
199 | /* Preboot Routine Incorrectly Alters Reset Value of USB Register */ | ||
200 | #define ANOMALY_05000347 (__SILICON_REVISION__ < 1) | ||
201 | /* Data Lost when Core Reads SDH Data FIFO */ | ||
202 | #define ANOMALY_05000349 (__SILICON_REVISION__ < 1) | ||
203 | /* PLL Status Register Is Inaccurate */ | ||
204 | #define ANOMALY_05000351 (__SILICON_REVISION__ < 1) | ||
205 | /* Regulator Programming Blocked when Hibernate Wakeup Source Remains Active */ | ||
206 | #define ANOMALY_05000355 (__SILICON_REVISION__ < 1) | ||
207 | /* System Stalled During A Core Access To AMC While A Core Access To NFC FIFO Is Required */ | ||
208 | #define ANOMALY_05000356 (__SILICON_REVISION__ < 1) | ||
209 | /* WURESET Bit In SYSCR Register Does Not Properly Indicate Hibernate Wake-Up */ | ||
210 | #define ANOMALY_05000367 (__SILICON_REVISION__ < 1) | ||
211 | /* Default PLL MSEL and SSEL Settings Can Cause 400MHz Product To Violate Specifications */ | ||
212 | #define ANOMALY_05000370 (__SILICON_REVISION__ < 1) | ||
213 | /* USB DP/DM Data Pins May Lose State When Entering Hibernate */ | ||
214 | #define ANOMALY_05000372 (__SILICON_REVISION__ < 1) | ||
215 | /* 8-Bit NAND Flash Boot Mode Not Functional */ | ||
216 | #define ANOMALY_05000382 (__SILICON_REVISION__ < 1) | ||
217 | /* Boot from OTP Memory Not Functional */ | ||
218 | #define ANOMALY_05000385 (__SILICON_REVISION__ < 1) | ||
219 | /* bfrom_SysControl() Firmware Routine Not Functional */ | ||
220 | #define ANOMALY_05000386 (__SILICON_REVISION__ < 1) | ||
221 | /* Programmable Preboot Settings Not Functional */ | ||
222 | #define ANOMALY_05000387 (__SILICON_REVISION__ < 1) | ||
223 | /* CRC32 Checksum Support Not Functional */ | ||
224 | #define ANOMALY_05000388 (__SILICON_REVISION__ < 1) | ||
225 | /* Reset Vector Must Not Be in SDRAM Memory Space */ | ||
226 | #define ANOMALY_05000389 (__SILICON_REVISION__ < 1) | ||
227 | /* Changed Meaning of BCODE Field in SYSCR Register */ | ||
228 | #define ANOMALY_05000390 (__SILICON_REVISION__ < 1) | ||
229 | /* Repeated Boot from Page-Mode or Burst-Mode Flash Memory May Fail */ | ||
230 | #define ANOMALY_05000391 (__SILICON_REVISION__ < 1) | ||
231 | /* pTempCurrent Not Present in ADI_BOOT_DATA Structure */ | ||
232 | #define ANOMALY_05000392 (__SILICON_REVISION__ < 1) | ||
233 | /* Deprecated Value of dTempByteCount in ADI_BOOT_DATA Structure */ | ||
234 | #define ANOMALY_05000393 (__SILICON_REVISION__ < 1) | ||
235 | /* Log Buffer Not Functional */ | ||
236 | #define ANOMALY_05000394 (__SILICON_REVISION__ < 1) | ||
237 | /* Hook Routine Not Functional */ | ||
238 | #define ANOMALY_05000395 (__SILICON_REVISION__ < 1) | ||
239 | /* Header Indirect Bit Not Functional */ | ||
240 | #define ANOMALY_05000396 (__SILICON_REVISION__ < 1) | ||
241 | /* BK_ONES, BK_ZEROS, and BK_DATECODE Constants Not Functional */ | ||
242 | #define ANOMALY_05000397 (__SILICON_REVISION__ < 1) | ||
243 | /* OTP Write Accesses Not Supported */ | ||
244 | #define ANOMALY_05000442 (__SILICON_REVISION__ < 1) | ||
245 | /* Incorrect Default Hysteresis Setting for RESET, NMI, and BMODE Signals */ | ||
246 | #define ANOMALY_05000452 (__SILICON_REVISION__ < 1) | ||
229 | 247 | ||
230 | /* Anomalies that don't exist on this proc */ | 248 | /* Anomalies that don't exist on this proc */ |
231 | #define ANOMALY_05000099 (0) | 249 | #define ANOMALY_05000099 (0) |
diff --git a/arch/blackfin/mach-bf548/include/mach/gpio.h b/arch/blackfin/mach-bf548/include/mach/gpio.h index 7db433514e3f..35c8ced46158 100644 --- a/arch/blackfin/mach-bf548/include/mach/gpio.h +++ b/arch/blackfin/mach-bf548/include/mach/gpio.h | |||
@@ -170,6 +170,8 @@ | |||
170 | 170 | ||
171 | #define MAX_BLACKFIN_GPIOS 160 | 171 | #define MAX_BLACKFIN_GPIOS 160 |
172 | 172 | ||
173 | #define BFIN_GPIO_PINT 1 | ||
174 | |||
173 | #ifndef __ASSEMBLY__ | 175 | #ifndef __ASSEMBLY__ |
174 | 176 | ||
175 | struct gpio_port_t { | 177 | struct gpio_port_t { |
diff --git a/arch/blackfin/mach-bf548/include/mach/irq.h b/arch/blackfin/mach-bf548/include/mach/irq.h index 533b8095b540..10dc142c518d 100644 --- a/arch/blackfin/mach-bf548/include/mach/irq.h +++ b/arch/blackfin/mach-bf548/include/mach/irq.h | |||
@@ -438,7 +438,7 @@ | |||
438 | struct bfin_pint_regs { | 438 | struct bfin_pint_regs { |
439 | u32 mask_set; | 439 | u32 mask_set; |
440 | u32 mask_clear; | 440 | u32 mask_clear; |
441 | u32 irq; | 441 | u32 request; |
442 | u32 assign; | 442 | u32 assign; |
443 | u32 edge_set; | 443 | u32 edge_set; |
444 | u32 edge_clear; | 444 | u32 edge_clear; |
diff --git a/arch/blackfin/mach-bf561/boards/acvilon.c b/arch/blackfin/mach-bf561/boards/acvilon.c index 9231a942892b..b1b7339b6ba7 100644 --- a/arch/blackfin/mach-bf561/boards/acvilon.c +++ b/arch/blackfin/mach-bf561/boards/acvilon.c | |||
@@ -203,8 +203,13 @@ static struct resource bfin_uart0_resources[] = { | |||
203 | .flags = IORESOURCE_MEM, | 203 | .flags = IORESOURCE_MEM, |
204 | }, | 204 | }, |
205 | { | 205 | { |
206 | .start = IRQ_UART_TX, | ||
207 | .end = IRQ_UART_TX, | ||
208 | .flags = IORESOURCE_IRQ, | ||
209 | }, | ||
210 | { | ||
206 | .start = IRQ_UART_RX, | 211 | .start = IRQ_UART_RX, |
207 | .end = IRQ_UART_RX + 1, | 212 | .end = IRQ_UART_RX, |
208 | .flags = IORESOURCE_IRQ, | 213 | .flags = IORESOURCE_IRQ, |
209 | }, | 214 | }, |
210 | { | 215 | { |
@@ -364,14 +369,6 @@ static struct flash_platform_data bfin_spi_dataflash_data = { | |||
364 | /* DataFlash chip */ | 369 | /* DataFlash chip */ |
365 | static struct bfin5xx_spi_chip data_flash_chip_info = { | 370 | static struct bfin5xx_spi_chip data_flash_chip_info = { |
366 | .enable_dma = 0, /* use dma transfer with this chip */ | 371 | .enable_dma = 0, /* use dma transfer with this chip */ |
367 | .bits_per_word = 8, | ||
368 | }; | ||
369 | #endif | ||
370 | |||
371 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) | ||
372 | static struct bfin5xx_spi_chip spidev_chip_info = { | ||
373 | .enable_dma = 0, | ||
374 | .bits_per_word = 8, | ||
375 | }; | 372 | }; |
376 | #endif | 373 | #endif |
377 | 374 | ||
@@ -420,7 +417,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
420 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 417 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
421 | .bus_num = 0, | 418 | .bus_num = 0, |
422 | .chip_select = 3, | 419 | .chip_select = 3, |
423 | .controller_data = &spidev_chip_info, | ||
424 | }, | 420 | }, |
425 | #endif | 421 | #endif |
426 | #if defined(CONFIG_MTD_DATAFLASH) || defined(CONFIG_MTD_DATAFLASH_MODULE) | 422 | #if defined(CONFIG_MTD_DATAFLASH) || defined(CONFIG_MTD_DATAFLASH_MODULE) |
diff --git a/arch/blackfin/mach-bf561/boards/cm_bf561.c b/arch/blackfin/mach-bf561/boards/cm_bf561.c index 87595cd38afe..c017cf07ed4e 100644 --- a/arch/blackfin/mach-bf561/boards/cm_bf561.c +++ b/arch/blackfin/mach-bf561/boards/cm_bf561.c | |||
@@ -60,29 +60,6 @@ static struct flash_platform_data bfin_spi_flash_data = { | |||
60 | /* SPI flash chip (m25p64) */ | 60 | /* SPI flash chip (m25p64) */ |
61 | static struct bfin5xx_spi_chip spi_flash_chip_info = { | 61 | static struct bfin5xx_spi_chip spi_flash_chip_info = { |
62 | .enable_dma = 0, /* use dma transfer with this chip*/ | 62 | .enable_dma = 0, /* use dma transfer with this chip*/ |
63 | .bits_per_word = 8, | ||
64 | }; | ||
65 | #endif | ||
66 | |||
67 | #if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE) | ||
68 | /* SPI ADC chip */ | ||
69 | static struct bfin5xx_spi_chip spi_adc_chip_info = { | ||
70 | .enable_dma = 1, /* use dma transfer with this chip*/ | ||
71 | .bits_per_word = 16, | ||
72 | }; | ||
73 | #endif | ||
74 | |||
75 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) | ||
76 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { | ||
77 | .enable_dma = 0, | ||
78 | .bits_per_word = 16, | ||
79 | }; | ||
80 | #endif | ||
81 | |||
82 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | ||
83 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { | ||
84 | .enable_dma = 0, | ||
85 | .bits_per_word = 8, | ||
86 | }; | 63 | }; |
87 | #endif | 64 | #endif |
88 | 65 | ||
@@ -100,24 +77,12 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
100 | }, | 77 | }, |
101 | #endif | 78 | #endif |
102 | 79 | ||
103 | #if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE) | ||
104 | { | ||
105 | .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ | ||
106 | .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ | ||
107 | .bus_num = 0, /* Framework bus number */ | ||
108 | .chip_select = 1, /* Framework chip select. */ | ||
109 | .platform_data = NULL, /* No spi_driver specific config */ | ||
110 | .controller_data = &spi_adc_chip_info, | ||
111 | }, | ||
112 | #endif | ||
113 | |||
114 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) | 80 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) |
115 | { | 81 | { |
116 | .modalias = "ad183x", | 82 | .modalias = "ad183x", |
117 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 83 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
118 | .bus_num = 0, | 84 | .bus_num = 0, |
119 | .chip_select = 4, | 85 | .chip_select = 4, |
120 | .controller_data = &ad1836_spi_chip_info, | ||
121 | }, | 86 | }, |
122 | #endif | 87 | #endif |
123 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | 88 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) |
@@ -126,7 +91,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
126 | .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ | 91 | .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ |
127 | .bus_num = 0, | 92 | .bus_num = 0, |
128 | .chip_select = 1, | 93 | .chip_select = 1, |
129 | .controller_data = &mmc_spi_chip_info, | ||
130 | .mode = SPI_MODE_3, | 94 | .mode = SPI_MODE_3, |
131 | }, | 95 | }, |
132 | #endif | 96 | #endif |
@@ -313,8 +277,13 @@ static struct resource bfin_uart0_resources[] = { | |||
313 | .flags = IORESOURCE_MEM, | 277 | .flags = IORESOURCE_MEM, |
314 | }, | 278 | }, |
315 | { | 279 | { |
280 | .start = IRQ_UART_TX, | ||
281 | .end = IRQ_UART_TX, | ||
282 | .flags = IORESOURCE_IRQ, | ||
283 | }, | ||
284 | { | ||
316 | .start = IRQ_UART_RX, | 285 | .start = IRQ_UART_RX, |
317 | .end = IRQ_UART_RX+1, | 286 | .end = IRQ_UART_RX, |
318 | .flags = IORESOURCE_IRQ, | 287 | .flags = IORESOURCE_IRQ, |
319 | }, | 288 | }, |
320 | { | 289 | { |
@@ -384,7 +353,7 @@ static struct platform_device bfin_sir0_device = { | |||
384 | 353 | ||
385 | static struct pata_platform_info bfin_pata_platform_data = { | 354 | static struct pata_platform_info bfin_pata_platform_data = { |
386 | .ioport_shift = 2, | 355 | .ioport_shift = 2, |
387 | .irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED, | 356 | .irq_type = IRQF_TRIGGER_HIGH, |
388 | }; | 357 | }; |
389 | 358 | ||
390 | static struct resource bfin_pata_resources[] = { | 359 | static struct resource bfin_pata_resources[] = { |
@@ -532,6 +501,24 @@ static struct platform_device *cm_bf561_devices[] __initdata = { | |||
532 | #endif | 501 | #endif |
533 | }; | 502 | }; |
534 | 503 | ||
504 | static int __init net2272_init(void) | ||
505 | { | ||
506 | #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) | ||
507 | int ret; | ||
508 | |||
509 | ret = gpio_request(GPIO_PF46, "net2272"); | ||
510 | if (ret) | ||
511 | return ret; | ||
512 | |||
513 | /* Reset USB Chip, PF46 */ | ||
514 | gpio_direction_output(GPIO_PF46, 0); | ||
515 | mdelay(2); | ||
516 | gpio_set_value(GPIO_PF46, 1); | ||
517 | #endif | ||
518 | |||
519 | return 0; | ||
520 | } | ||
521 | |||
535 | static int __init cm_bf561_init(void) | 522 | static int __init cm_bf561_init(void) |
536 | { | 523 | { |
537 | printk(KERN_INFO "%s(): registering device resources\n", __func__); | 524 | printk(KERN_INFO "%s(): registering device resources\n", __func__); |
@@ -543,6 +530,10 @@ static int __init cm_bf561_init(void) | |||
543 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | 530 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
544 | irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); | 531 | irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); |
545 | #endif | 532 | #endif |
533 | |||
534 | if (net2272_init()) | ||
535 | pr_warning("unable to configure net2272; it probably won't work\n"); | ||
536 | |||
546 | return 0; | 537 | return 0; |
547 | } | 538 | } |
548 | 539 | ||
diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c index 5067984a62e7..27f22ed381d9 100644 --- a/arch/blackfin/mach-bf561/boards/ezkit.c +++ b/arch/blackfin/mach-bf561/boards/ezkit.c | |||
@@ -108,6 +108,9 @@ static struct resource net2272_bfin_resources[] = { | |||
108 | .end = 0x2C000000 + 0x7F, | 108 | .end = 0x2C000000 + 0x7F, |
109 | .flags = IORESOURCE_MEM, | 109 | .flags = IORESOURCE_MEM, |
110 | }, { | 110 | }, { |
111 | .start = 1, | ||
112 | .flags = IORESOURCE_BUS, | ||
113 | }, { | ||
111 | .start = IRQ_PF10, | 114 | .start = IRQ_PF10, |
112 | .end = IRQ_PF10, | 115 | .end = IRQ_PF10, |
113 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, | 116 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, |
@@ -169,8 +172,13 @@ static struct resource bfin_uart0_resources[] = { | |||
169 | .flags = IORESOURCE_MEM, | 172 | .flags = IORESOURCE_MEM, |
170 | }, | 173 | }, |
171 | { | 174 | { |
175 | .start = IRQ_UART_TX, | ||
176 | .end = IRQ_UART_TX, | ||
177 | .flags = IORESOURCE_IRQ, | ||
178 | }, | ||
179 | { | ||
172 | .start = IRQ_UART_RX, | 180 | .start = IRQ_UART_RX, |
173 | .end = IRQ_UART_RX+1, | 181 | .end = IRQ_UART_RX, |
174 | .flags = IORESOURCE_IRQ, | 182 | .flags = IORESOURCE_IRQ, |
175 | }, | 183 | }, |
176 | { | 184 | { |
@@ -283,21 +291,6 @@ static struct platform_device ezkit_flash_device = { | |||
283 | }; | 291 | }; |
284 | #endif | 292 | #endif |
285 | 293 | ||
286 | #if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ | ||
287 | || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) | ||
288 | static struct bfin5xx_spi_chip ad1836_spi_chip_info = { | ||
289 | .enable_dma = 0, | ||
290 | .bits_per_word = 16, | ||
291 | }; | ||
292 | #endif | ||
293 | |||
294 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) | ||
295 | static struct bfin5xx_spi_chip spidev_chip_info = { | ||
296 | .enable_dma = 0, | ||
297 | .bits_per_word = 8, | ||
298 | }; | ||
299 | #endif | ||
300 | |||
301 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | 294 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) |
302 | /* SPI (0) */ | 295 | /* SPI (0) */ |
303 | static struct resource bfin_spi0_resource[] = { | 296 | static struct resource bfin_spi0_resource[] = { |
@@ -345,7 +338,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
345 | .bus_num = 0, | 338 | .bus_num = 0, |
346 | .chip_select = 4, | 339 | .chip_select = 4, |
347 | .platform_data = "ad1836", /* only includes chip name for the moment */ | 340 | .platform_data = "ad1836", /* only includes chip name for the moment */ |
348 | .controller_data = &ad1836_spi_chip_info, | ||
349 | .mode = SPI_MODE_3, | 341 | .mode = SPI_MODE_3, |
350 | }, | 342 | }, |
351 | #endif | 343 | #endif |
@@ -355,7 +347,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
355 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 347 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
356 | .bus_num = 0, | 348 | .bus_num = 0, |
357 | .chip_select = 1, | 349 | .chip_select = 1, |
358 | .controller_data = &spidev_chip_info, | ||
359 | }, | 350 | }, |
360 | #endif | 351 | #endif |
361 | }; | 352 | }; |
@@ -516,6 +507,24 @@ static struct platform_device *ezkit_devices[] __initdata = { | |||
516 | #endif | 507 | #endif |
517 | }; | 508 | }; |
518 | 509 | ||
510 | static int __init net2272_init(void) | ||
511 | { | ||
512 | #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) | ||
513 | int ret; | ||
514 | |||
515 | ret = gpio_request(GPIO_PF11, "net2272"); | ||
516 | if (ret) | ||
517 | return ret; | ||
518 | |||
519 | /* Reset the USB chip */ | ||
520 | gpio_direction_output(GPIO_PF11, 0); | ||
521 | mdelay(2); | ||
522 | gpio_set_value(GPIO_PF11, 1); | ||
523 | #endif | ||
524 | |||
525 | return 0; | ||
526 | } | ||
527 | |||
519 | static int __init ezkit_init(void) | 528 | static int __init ezkit_init(void) |
520 | { | 529 | { |
521 | int ret; | 530 | int ret; |
@@ -542,6 +551,9 @@ static int __init ezkit_init(void) | |||
542 | udelay(400); | 551 | udelay(400); |
543 | #endif | 552 | #endif |
544 | 553 | ||
554 | if (net2272_init()) | ||
555 | pr_warning("unable to configure net2272; it probably won't work\n"); | ||
556 | |||
545 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); | 557 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); |
546 | return 0; | 558 | return 0; |
547 | } | 559 | } |
diff --git a/arch/blackfin/mach-bf561/boards/tepla.c b/arch/blackfin/mach-bf561/boards/tepla.c index bb056e60f6ed..1a57bc986aad 100644 --- a/arch/blackfin/mach-bf561/boards/tepla.c +++ b/arch/blackfin/mach-bf561/boards/tepla.c | |||
@@ -51,8 +51,13 @@ static struct resource bfin_uart0_resources[] = { | |||
51 | .flags = IORESOURCE_MEM, | 51 | .flags = IORESOURCE_MEM, |
52 | }, | 52 | }, |
53 | { | 53 | { |
54 | .start = IRQ_UART_TX, | ||
55 | .end = IRQ_UART_TX, | ||
56 | .flags = IORESOURCE_IRQ, | ||
57 | }, | ||
58 | { | ||
54 | .start = IRQ_UART_RX, | 59 | .start = IRQ_UART_RX, |
55 | .end = IRQ_UART_RX+1, | 60 | .end = IRQ_UART_RX, |
56 | .flags = IORESOURCE_IRQ, | 61 | .flags = IORESOURCE_IRQ, |
57 | }, | 62 | }, |
58 | { | 63 | { |
diff --git a/arch/blackfin/mach-bf561/include/mach/anomaly.h b/arch/blackfin/mach-bf561/include/mach/anomaly.h index 22b5ab773027..836baeed303a 100644 --- a/arch/blackfin/mach-bf561/include/mach/anomaly.h +++ b/arch/blackfin/mach-bf561/include/mach/anomaly.h | |||
@@ -11,7 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | /* This file should be up to date with: | 13 | /* This file should be up to date with: |
14 | * - Revision R, 05/25/2010; ADSP-BF561 Blackfin Processor Anomaly List | 14 | * - Revision S, 05/23/2011; ADSP-BF561 Blackfin Processor Anomaly List |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #ifndef _MACH_ANOMALY_H_ | 17 | #ifndef _MACH_ANOMALY_H_ |
@@ -26,62 +26,16 @@ | |||
26 | #define ANOMALY_05000074 (1) | 26 | #define ANOMALY_05000074 (1) |
27 | /* UART Line Status Register (UART_LSR) Bits Are Not Updated at the Same Time */ | 27 | /* UART Line Status Register (UART_LSR) Bits Are Not Updated at the Same Time */ |
28 | #define ANOMALY_05000099 (__SILICON_REVISION__ < 5) | 28 | #define ANOMALY_05000099 (__SILICON_REVISION__ < 5) |
29 | /* Trace Buffers May Contain Errors in Emulation Mode and/or Exception, NMI, Reset Handlers */ | ||
30 | #define ANOMALY_05000116 (__SILICON_REVISION__ < 3) | ||
31 | /* TESTSET Instructions Restricted to 32-Bit Aligned Memory Locations */ | 29 | /* TESTSET Instructions Restricted to 32-Bit Aligned Memory Locations */ |
32 | #define ANOMALY_05000120 (1) | 30 | #define ANOMALY_05000120 (1) |
33 | /* Rx.H Cannot Be Used to Access 16-bit System MMR Registers */ | 31 | /* Rx.H Cannot Be Used to Access 16-bit System MMR Registers */ |
34 | #define ANOMALY_05000122 (1) | 32 | #define ANOMALY_05000122 (1) |
35 | /* Erroneous Exception when Enabling Cache */ | ||
36 | #define ANOMALY_05000125 (__SILICON_REVISION__ < 3) | ||
37 | /* SIGNBITS Instruction Not Functional under Certain Conditions */ | 33 | /* SIGNBITS Instruction Not Functional under Certain Conditions */ |
38 | #define ANOMALY_05000127 (1) | 34 | #define ANOMALY_05000127 (1) |
39 | /* Two bits in the Watchpoint Status Register (WPSTAT) are swapped */ | ||
40 | #define ANOMALY_05000134 (__SILICON_REVISION__ < 3) | ||
41 | /* Enable wires from the Data Watchpoint Address Control Register (WPDACTL) are swapped */ | ||
42 | #define ANOMALY_05000135 (__SILICON_REVISION__ < 3) | ||
43 | /* Stall in multi-unit DMA operations */ | ||
44 | #define ANOMALY_05000136 (__SILICON_REVISION__ < 3) | ||
45 | /* Allowing the SPORT RX FIFO to fill will cause an overflow */ | ||
46 | #define ANOMALY_05000140 (__SILICON_REVISION__ < 3) | ||
47 | /* Infinite Stall may occur with a particular sequence of consecutive dual dag events */ | ||
48 | #define ANOMALY_05000141 (__SILICON_REVISION__ < 3) | ||
49 | /* Interrupts may be lost when a programmable input flag is configured to be edge sensitive */ | ||
50 | #define ANOMALY_05000142 (__SILICON_REVISION__ < 3) | ||
51 | /* DMA and TESTSET conflict when both are accessing external memory */ | ||
52 | #define ANOMALY_05000144 (__SILICON_REVISION__ < 3) | ||
53 | /* In PWM_OUT mode, you must enable the PPI block to generate a waveform from PPI_CLK */ | ||
54 | #define ANOMALY_05000145 (__SILICON_REVISION__ < 3) | ||
55 | /* MDMA may lose the first few words of a descriptor chain */ | ||
56 | #define ANOMALY_05000146 (__SILICON_REVISION__ < 3) | ||
57 | /* Source MDMA descriptor may stop with a DMA Error near beginning of descriptor fetch */ | ||
58 | #define ANOMALY_05000147 (__SILICON_REVISION__ < 3) | ||
59 | /* IMDMA S1/D1 Channel May Stall */ | 35 | /* IMDMA S1/D1 Channel May Stall */ |
60 | #define ANOMALY_05000149 (1) | 36 | #define ANOMALY_05000149 (1) |
61 | /* DMA engine may lose data due to incorrect handshaking */ | ||
62 | #define ANOMALY_05000150 (__SILICON_REVISION__ < 3) | ||
63 | /* DMA stalls when all three controllers read data from the same source */ | ||
64 | #define ANOMALY_05000151 (__SILICON_REVISION__ < 3) | ||
65 | /* Execution stall when executing in L2 and doing external accesses */ | ||
66 | #define ANOMALY_05000152 (__SILICON_REVISION__ < 3) | ||
67 | /* Frame Delay in SPORT Multichannel Mode */ | ||
68 | #define ANOMALY_05000153 (__SILICON_REVISION__ < 3) | ||
69 | /* SPORT TFS signal stays active in multichannel mode outside of valid channels */ | ||
70 | #define ANOMALY_05000154 (__SILICON_REVISION__ < 3) | ||
71 | /* Timers in PWM-Out Mode with PPI GP Receive (Input) Mode with 0 Frame Syncs */ | 37 | /* Timers in PWM-Out Mode with PPI GP Receive (Input) Mode with 0 Frame Syncs */ |
72 | #define ANOMALY_05000156 (__SILICON_REVISION__ < 4) | 38 | #define ANOMALY_05000156 (__SILICON_REVISION__ < 4) |
73 | /* Killed 32-Bit MMR Write Leads to Next System MMR Access Thinking It Should Be 32-Bit */ | ||
74 | #define ANOMALY_05000157 (__SILICON_REVISION__ < 3) | ||
75 | /* DMA Lock-up at CCLK to SCLK ratios of 4:1, 2:1, or 1:1 */ | ||
76 | #define ANOMALY_05000159 (__SILICON_REVISION__ < 3) | ||
77 | /* A read from external memory may return a wrong value with data cache enabled */ | ||
78 | #define ANOMALY_05000160 (__SILICON_REVISION__ < 3) | ||
79 | /* Data Cache Fill data can be corrupted after/during Instruction DMA if certain core stalls exist */ | ||
80 | #define ANOMALY_05000161 (__SILICON_REVISION__ < 3) | ||
81 | /* DMEM_CONTROL<12> is not set on Reset */ | ||
82 | #define ANOMALY_05000162 (__SILICON_REVISION__ < 3) | ||
83 | /* SPORT Transmit Data Is Not Gated by External Frame Sync in Certain Conditions */ | ||
84 | #define ANOMALY_05000163 (__SILICON_REVISION__ < 3) | ||
85 | /* PPI Data Lengths between 8 and 16 Do Not Zero Out Upper Bits */ | 39 | /* PPI Data Lengths between 8 and 16 Do Not Zero Out Upper Bits */ |
86 | #define ANOMALY_05000166 (1) | 40 | #define ANOMALY_05000166 (1) |
87 | /* Turning SPORTs on while External Frame Sync Is Active May Corrupt Data */ | 41 | /* Turning SPORTs on while External Frame Sync Is Active May Corrupt Data */ |
@@ -92,10 +46,6 @@ | |||
92 | #define ANOMALY_05000169 (__SILICON_REVISION__ < 5) | 46 | #define ANOMALY_05000169 (__SILICON_REVISION__ < 5) |
93 | /* Boot-ROM Modifies SICA_IWRx Wakeup Registers */ | 47 | /* Boot-ROM Modifies SICA_IWRx Wakeup Registers */ |
94 | #define ANOMALY_05000171 (__SILICON_REVISION__ < 5) | 48 | #define ANOMALY_05000171 (__SILICON_REVISION__ < 5) |
95 | /* DSPID register values incorrect */ | ||
96 | #define ANOMALY_05000172 (__SILICON_REVISION__ < 3) | ||
97 | /* DMA vs Core accesses to external memory */ | ||
98 | #define ANOMALY_05000173 (__SILICON_REVISION__ < 3) | ||
99 | /* Cache Fill Buffer Data lost */ | 49 | /* Cache Fill Buffer Data lost */ |
100 | #define ANOMALY_05000174 (__SILICON_REVISION__ < 5) | 50 | #define ANOMALY_05000174 (__SILICON_REVISION__ < 5) |
101 | /* Overlapping Sequencer and Memory Stalls */ | 51 | /* Overlapping Sequencer and Memory Stalls */ |
@@ -124,8 +74,6 @@ | |||
124 | #define ANOMALY_05000189 (__SILICON_REVISION__ < 5) | 74 | #define ANOMALY_05000189 (__SILICON_REVISION__ < 5) |
125 | /* PPI Not Functional at Core Voltage < 1Volt */ | 75 | /* PPI Not Functional at Core Voltage < 1Volt */ |
126 | #define ANOMALY_05000190 (1) | 76 | #define ANOMALY_05000190 (1) |
127 | /* PPI does not invert the Driving PPICLK edge in Transmit Modes */ | ||
128 | #define ANOMALY_05000191 (__SILICON_REVISION__ < 3) | ||
129 | /* False I/O Pin Interrupts on Edge-Sensitive Inputs When Polarity Setting Is Changed */ | 77 | /* False I/O Pin Interrupts on Edge-Sensitive Inputs When Polarity Setting Is Changed */ |
130 | #define ANOMALY_05000193 (__SILICON_REVISION__ < 5) | 78 | #define ANOMALY_05000193 (__SILICON_REVISION__ < 5) |
131 | /* Restarting SPORT in Specific Modes May Cause Data Corruption */ | 79 | /* Restarting SPORT in Specific Modes May Cause Data Corruption */ |
@@ -217,10 +165,10 @@ | |||
217 | /* Timing Requirements Change for External Frame Sync PPI Modes with Non-Zero PPI_DELAY */ | 165 | /* Timing Requirements Change for External Frame Sync PPI Modes with Non-Zero PPI_DELAY */ |
218 | #define ANOMALY_05000276 (__SILICON_REVISION__ < 5) | 166 | #define ANOMALY_05000276 (__SILICON_REVISION__ < 5) |
219 | /* Writes to an I/O Data Register One SCLK Cycle after an Edge Is Detected May Clear Interrupt */ | 167 | /* Writes to an I/O Data Register One SCLK Cycle after an Edge Is Detected May Clear Interrupt */ |
220 | #define ANOMALY_05000277 (__SILICON_REVISION__ < 3) | 168 | #define ANOMALY_05000277 (__SILICON_REVISION__ < 5) |
221 | /* Disabling Peripherals with DMA Running May Cause DMA System Instability */ | 169 | /* Disabling Peripherals with DMA Running May Cause DMA System Instability */ |
222 | #define ANOMALY_05000278 (__SILICON_REVISION__ < 5) | 170 | #define ANOMALY_05000278 (__SILICON_REVISION__ < 5) |
223 | /* False Hardware Error Exception when ISR Context Is Not Restored */ | 171 | /* False Hardware Error when ISR Context Is Not Restored */ |
224 | /* Temporarily walk around for bug 5423 till this issue is confirmed by | 172 | /* Temporarily walk around for bug 5423 till this issue is confirmed by |
225 | * official anomaly document. It looks 05000281 still exists on bf561 | 173 | * official anomaly document. It looks 05000281 still exists on bf561 |
226 | * v0.5. | 174 | * v0.5. |
@@ -274,8 +222,6 @@ | |||
274 | #define ANOMALY_05000366 (1) | 222 | #define ANOMALY_05000366 (1) |
275 | /* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ | 223 | /* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ |
276 | #define ANOMALY_05000371 (1) | 224 | #define ANOMALY_05000371 (1) |
277 | /* SSYNC Stalls Processor when Executed from Non-Cacheable Memory */ | ||
278 | #define ANOMALY_05000402 (__SILICON_REVISION__ == 4) | ||
279 | /* Level-Sensitive External GPIO Wakeups May Cause Indefinite Stall */ | 225 | /* Level-Sensitive External GPIO Wakeups May Cause Indefinite Stall */ |
280 | #define ANOMALY_05000403 (1) | 226 | #define ANOMALY_05000403 (1) |
281 | /* TESTSET Instruction Causes Data Corruption with Writeback Data Cache Enabled */ | 227 | /* TESTSET Instruction Causes Data Corruption with Writeback Data Cache Enabled */ |
@@ -298,16 +244,82 @@ | |||
298 | #define ANOMALY_05000462 (1) | 244 | #define ANOMALY_05000462 (1) |
299 | /* Boot Failure When SDRAM Control Signals Toggle Coming Out Of Reset */ | 245 | /* Boot Failure When SDRAM Control Signals Toggle Coming Out Of Reset */ |
300 | #define ANOMALY_05000471 (1) | 246 | #define ANOMALY_05000471 (1) |
301 | /* Interrupted 32-Bit SPORT Data Register Access Results In Underflow */ | 247 | /* Interrupted SPORT Receive Data Register Read Results In Underflow when SLEN > 15 */ |
302 | #define ANOMALY_05000473 (1) | 248 | #define ANOMALY_05000473 (1) |
303 | /* Possible Lockup Condition whem Modifying PLL from External Memory */ | 249 | /* Possible Lockup Condition when Modifying PLL from External Memory */ |
304 | #define ANOMALY_05000475 (1) | 250 | #define ANOMALY_05000475 (1) |
305 | /* TESTSET Instruction Cannot Be Interrupted */ | 251 | /* TESTSET Instruction Cannot Be Interrupted */ |
306 | #define ANOMALY_05000477 (1) | 252 | #define ANOMALY_05000477 (1) |
307 | /* Reads of ITEST_COMMAND and ITEST_DATA Registers Cause Cache Corruption */ | 253 | /* Reads of ITEST_COMMAND and ITEST_DATA Registers Cause Cache Corruption */ |
308 | #define ANOMALY_05000481 (1) | 254 | #define ANOMALY_05000481 (1) |
309 | /* IFLUSH sucks at life */ | 255 | /* PLL May Latch Incorrect Values Coming Out of Reset */ |
256 | #define ANOMALY_05000489 (1) | ||
257 | /* Instruction Memory Stalls Can Cause IFLUSH to Fail */ | ||
310 | #define ANOMALY_05000491 (1) | 258 | #define ANOMALY_05000491 (1) |
259 | /* EXCPT Instruction May Be Lost If NMI Happens Simultaneously */ | ||
260 | #define ANOMALY_05000494 (1) | ||
261 | /* RXS Bit in SPI_STAT May Become Stuck In RX DMA Modes */ | ||
262 | #define ANOMALY_05000501 (1) | ||
263 | |||
264 | /* | ||
265 | * These anomalies have been "phased" out of analog.com anomaly sheets and are | ||
266 | * here to show running on older silicon just isn't feasible. | ||
267 | */ | ||
268 | |||
269 | /* Trace Buffers May Contain Errors in Emulation Mode and/or Exception, NMI, Reset Handlers */ | ||
270 | #define ANOMALY_05000116 (__SILICON_REVISION__ < 3) | ||
271 | /* Erroneous Exception when Enabling Cache */ | ||
272 | #define ANOMALY_05000125 (__SILICON_REVISION__ < 3) | ||
273 | /* Two bits in the Watchpoint Status Register (WPSTAT) are swapped */ | ||
274 | #define ANOMALY_05000134 (__SILICON_REVISION__ < 3) | ||
275 | /* Enable wires from the Data Watchpoint Address Control Register (WPDACTL) are swapped */ | ||
276 | #define ANOMALY_05000135 (__SILICON_REVISION__ < 3) | ||
277 | /* Stall in multi-unit DMA operations */ | ||
278 | #define ANOMALY_05000136 (__SILICON_REVISION__ < 3) | ||
279 | /* Allowing the SPORT RX FIFO to fill will cause an overflow */ | ||
280 | #define ANOMALY_05000140 (__SILICON_REVISION__ < 3) | ||
281 | /* Infinite Stall may occur with a particular sequence of consecutive dual dag events */ | ||
282 | #define ANOMALY_05000141 (__SILICON_REVISION__ < 3) | ||
283 | /* Interrupts may be lost when a programmable input flag is configured to be edge sensitive */ | ||
284 | #define ANOMALY_05000142 (__SILICON_REVISION__ < 3) | ||
285 | /* DMA and TESTSET conflict when both are accessing external memory */ | ||
286 | #define ANOMALY_05000144 (__SILICON_REVISION__ < 3) | ||
287 | /* In PWM_OUT mode, you must enable the PPI block to generate a waveform from PPI_CLK */ | ||
288 | #define ANOMALY_05000145 (__SILICON_REVISION__ < 3) | ||
289 | /* MDMA may lose the first few words of a descriptor chain */ | ||
290 | #define ANOMALY_05000146 (__SILICON_REVISION__ < 3) | ||
291 | /* Source MDMA descriptor may stop with a DMA Error near beginning of descriptor fetch */ | ||
292 | #define ANOMALY_05000147 (__SILICON_REVISION__ < 3) | ||
293 | /* DMA engine may lose data due to incorrect handshaking */ | ||
294 | #define ANOMALY_05000150 (__SILICON_REVISION__ < 3) | ||
295 | /* DMA stalls when all three controllers read data from the same source */ | ||
296 | #define ANOMALY_05000151 (__SILICON_REVISION__ < 3) | ||
297 | /* Execution stall when executing in L2 and doing external accesses */ | ||
298 | #define ANOMALY_05000152 (__SILICON_REVISION__ < 3) | ||
299 | /* Frame Delay in SPORT Multichannel Mode */ | ||
300 | #define ANOMALY_05000153 (__SILICON_REVISION__ < 3) | ||
301 | /* SPORT TFS signal stays active in multichannel mode outside of valid channels */ | ||
302 | #define ANOMALY_05000154 (__SILICON_REVISION__ < 3) | ||
303 | /* Killed 32-Bit MMR Write Leads to Next System MMR Access Thinking It Should Be 32-Bit */ | ||
304 | #define ANOMALY_05000157 (__SILICON_REVISION__ < 3) | ||
305 | /* DMA Lock-up at CCLK to SCLK ratios of 4:1, 2:1, or 1:1 */ | ||
306 | #define ANOMALY_05000159 (__SILICON_REVISION__ < 3) | ||
307 | /* A read from external memory may return a wrong value with data cache enabled */ | ||
308 | #define ANOMALY_05000160 (__SILICON_REVISION__ < 3) | ||
309 | /* Data Cache Fill data can be corrupted after/during Instruction DMA if certain core stalls exist */ | ||
310 | #define ANOMALY_05000161 (__SILICON_REVISION__ < 3) | ||
311 | /* DMEM_CONTROL<12> is not set on Reset */ | ||
312 | #define ANOMALY_05000162 (__SILICON_REVISION__ < 3) | ||
313 | /* SPORT Transmit Data Is Not Gated by External Frame Sync in Certain Conditions */ | ||
314 | #define ANOMALY_05000163 (__SILICON_REVISION__ < 3) | ||
315 | /* DSPID register values incorrect */ | ||
316 | #define ANOMALY_05000172 (__SILICON_REVISION__ < 3) | ||
317 | /* DMA vs Core accesses to external memory */ | ||
318 | #define ANOMALY_05000173 (__SILICON_REVISION__ < 3) | ||
319 | /* PPI does not invert the Driving PPICLK edge in Transmit Modes */ | ||
320 | #define ANOMALY_05000191 (__SILICON_REVISION__ < 3) | ||
321 | /* SSYNC Stalls Processor when Executed from Non-Cacheable Memory */ | ||
322 | #define ANOMALY_05000402 (__SILICON_REVISION__ == 4) | ||
311 | 323 | ||
312 | /* Anomalies that don't exist on this proc */ | 324 | /* Anomalies that don't exist on this proc */ |
313 | #define ANOMALY_05000119 (0) | 325 | #define ANOMALY_05000119 (0) |
diff --git a/arch/blackfin/mach-bf561/include/mach/gpio.h b/arch/blackfin/mach-bf561/include/mach/gpio.h index 57d5eab59faf..f9f8b2adf4ba 100644 --- a/arch/blackfin/mach-bf561/include/mach/gpio.h +++ b/arch/blackfin/mach-bf561/include/mach/gpio.h | |||
@@ -58,9 +58,9 @@ | |||
58 | #define GPIO_PF46 46 | 58 | #define GPIO_PF46 46 |
59 | #define GPIO_PF47 47 | 59 | #define GPIO_PF47 47 |
60 | 60 | ||
61 | #define PORT_FIO0 GPIO_0 | 61 | #define PORT_FIO0 GPIO_PF0 |
62 | #define PORT_FIO1 GPIO_16 | 62 | #define PORT_FIO1 GPIO_PF16 |
63 | #define PORT_FIO2 GPIO_32 | 63 | #define PORT_FIO2 GPIO_PF32 |
64 | 64 | ||
65 | #include <mach-common/ports-f.h> | 65 | #include <mach-common/ports-f.h> |
66 | 66 | ||
diff --git a/arch/blackfin/mach-bf561/secondary.S b/arch/blackfin/mach-bf561/secondary.S index 4c462838f4e1..01e5408620ac 100644 --- a/arch/blackfin/mach-bf561/secondary.S +++ b/arch/blackfin/mach-bf561/secondary.S | |||
@@ -23,108 +23,78 @@ | |||
23 | #define INITIAL_STACK (COREB_L1_SCRATCH_START + L1_SCRATCH_LENGTH - 12) | 23 | #define INITIAL_STACK (COREB_L1_SCRATCH_START + L1_SCRATCH_LENGTH - 12) |
24 | 24 | ||
25 | ENTRY(_coreb_trampoline_start) | 25 | ENTRY(_coreb_trampoline_start) |
26 | /* Set the SYSCFG register */ | 26 | /* Enable Cycle Counter and Nesting Of Interrupts */ |
27 | R0 = 0x36; | 27 | #ifdef CONFIG_BFIN_SCRATCH_REG_CYCLES |
28 | SYSCFG = R0; /*Enable Cycle Counter and Nesting Of Interrupts(3rd Bit)*/ | 28 | R0 = SYSCFG_SNEN; |
29 | R0 = 0; | 29 | #else |
30 | 30 | R0 = SYSCFG_SNEN | SYSCFG_CCEN; | |
31 | /*Clear Out All the data and pointer Registers*/ | 31 | #endif |
32 | R1 = R0; | 32 | SYSCFG = R0; |
33 | R2 = R0; | ||
34 | R3 = R0; | ||
35 | R4 = R0; | ||
36 | R5 = R0; | ||
37 | R6 = R0; | ||
38 | R7 = R0; | ||
39 | |||
40 | P0 = R0; | ||
41 | P1 = R0; | ||
42 | P2 = R0; | ||
43 | P3 = R0; | ||
44 | P4 = R0; | ||
45 | P5 = R0; | ||
46 | |||
47 | LC0 = r0; | ||
48 | LC1 = r0; | ||
49 | L0 = r0; | ||
50 | L1 = r0; | ||
51 | L2 = r0; | ||
52 | L3 = r0; | ||
53 | |||
54 | /* Clear Out All the DAG Registers*/ | ||
55 | B0 = r0; | ||
56 | B1 = r0; | ||
57 | B2 = r0; | ||
58 | B3 = r0; | ||
59 | |||
60 | I0 = r0; | ||
61 | I1 = r0; | ||
62 | I2 = r0; | ||
63 | I3 = r0; | ||
64 | |||
65 | M0 = r0; | ||
66 | M1 = r0; | ||
67 | M2 = r0; | ||
68 | M3 = r0; | ||
69 | 33 | ||
70 | trace_buffer_init(p0,r0); | 34 | /* Optimization register tricks: keep a base value in the |
35 | * reserved P registers so we use the load/store with an | ||
36 | * offset syntax. R0 = [P5 + <constant>]; | ||
37 | * P5 - core MMR base | ||
38 | * R6 - 0 | ||
39 | */ | ||
40 | r6 = 0; | ||
41 | p5.l = 0; | ||
42 | p5.h = hi(COREMMR_BASE); | ||
71 | 43 | ||
72 | /* Turn off the icache */ | 44 | /* Zero out registers required by Blackfin ABI */ |
73 | p0.l = LO(IMEM_CONTROL); | ||
74 | p0.h = HI(IMEM_CONTROL); | ||
75 | R1 = [p0]; | ||
76 | R0 = ~ENICPLB; | ||
77 | R0 = R0 & R1; | ||
78 | 45 | ||
79 | /* Disabling of CPLBs should be proceeded by a CSYNC */ | 46 | /* Disable circular buffers */ |
47 | L0 = r6; | ||
48 | L1 = r6; | ||
49 | L2 = r6; | ||
50 | L3 = r6; | ||
51 | |||
52 | /* Disable hardware loops in case we were started by 'go' */ | ||
53 | LC0 = r6; | ||
54 | LC1 = r6; | ||
55 | |||
56 | /* | ||
57 | * Clear ITEST_COMMAND and DTEST_COMMAND registers, | ||
58 | * Leaving these as non-zero can confuse the emulator | ||
59 | */ | ||
60 | [p5 + (DTEST_COMMAND - COREMMR_BASE)] = r6; | ||
61 | [p5 + (ITEST_COMMAND - COREMMR_BASE)] = r6; | ||
80 | CSYNC; | 62 | CSYNC; |
81 | [p0] = R0; | 63 | |
64 | trace_buffer_init(p0,r0); | ||
65 | |||
66 | /* Turn off the icache */ | ||
67 | r1 = [p5 + (IMEM_CONTROL - COREMMR_BASE)]; | ||
68 | BITCLR (r1, ENICPLB_P); | ||
69 | [p5 + (IMEM_CONTROL - COREMMR_BASE)] = r1; | ||
82 | SSYNC; | 70 | SSYNC; |
83 | 71 | ||
84 | /* Turn off the dcache */ | 72 | /* Turn off the dcache */ |
85 | p0.l = LO(DMEM_CONTROL); | 73 | r1 = [p5 + (DMEM_CONTROL - COREMMR_BASE)]; |
86 | p0.h = HI(DMEM_CONTROL); | 74 | BITCLR (r1, ENDCPLB_P); |
87 | R1 = [p0]; | 75 | [p5 + (DMEM_CONTROL - COREMMR_BASE)] = r1; |
88 | R0 = ~ENDCPLB; | ||
89 | R0 = R0 & R1; | ||
90 | |||
91 | /* Disabling of CPLBs should be proceeded by a CSYNC */ | ||
92 | CSYNC; | ||
93 | [p0] = R0; | ||
94 | SSYNC; | 76 | SSYNC; |
95 | 77 | ||
96 | /* in case of double faults, save a few things */ | 78 | /* in case of double faults, save a few things */ |
97 | p0.l = _init_retx_coreb; | 79 | p1.l = _initial_pda_coreb; |
98 | p0.h = _init_retx_coreb; | 80 | p1.h = _initial_pda_coreb; |
99 | R0 = RETX; | 81 | r4 = RETX; |
100 | [P0] = R0; | ||
101 | |||
102 | #ifdef CONFIG_DEBUG_DOUBLEFAULT | 82 | #ifdef CONFIG_DEBUG_DOUBLEFAULT |
103 | /* Only save these if we are storing them, | 83 | /* Only save these if we are storing them, |
104 | * This happens here, since L1 gets clobbered | 84 | * This happens here, since L1 gets clobbered |
105 | * below | 85 | * below |
106 | */ | 86 | */ |
107 | GET_PDA(p0, r0); | 87 | GET_PDA(p0, r0); |
108 | r7 = [p0 + PDA_DF_RETX]; | 88 | r0 = [p0 + PDA_DF_RETX]; |
109 | p1.l = _init_saved_retx_coreb; | 89 | r1 = [p0 + PDA_DF_DCPLB]; |
110 | p1.h = _init_saved_retx_coreb; | 90 | r2 = [p0 + PDA_DF_ICPLB]; |
111 | [p1] = r7; | 91 | r3 = [p0 + PDA_DF_SEQSTAT]; |
112 | 92 | [p1 + PDA_INIT_DF_RETX] = r0; | |
113 | r7 = [p0 + PDA_DF_DCPLB]; | 93 | [p1 + PDA_INIT_DF_DCPLB] = r1; |
114 | p1.l = _init_saved_dcplb_fault_addr_coreb; | 94 | [p1 + PDA_INIT_DF_ICPLB] = r2; |
115 | p1.h = _init_saved_dcplb_fault_addr_coreb; | 95 | [p1 + PDA_INIT_DF_SEQSTAT] = r3; |
116 | [p1] = r7; | ||
117 | |||
118 | r7 = [p0 + PDA_DF_ICPLB]; | ||
119 | p1.l = _init_saved_icplb_fault_addr_coreb; | ||
120 | p1.h = _init_saved_icplb_fault_addr_coreb; | ||
121 | [p1] = r7; | ||
122 | |||
123 | r7 = [p0 + PDA_DF_SEQSTAT]; | ||
124 | p1.l = _init_saved_seqstat_coreb; | ||
125 | p1.h = _init_saved_seqstat_coreb; | ||
126 | [p1] = r7; | ||
127 | #endif | 96 | #endif |
97 | [p1 + PDA_INIT_RETX] = r4; | ||
128 | 98 | ||
129 | /* Initialize stack pointer */ | 99 | /* Initialize stack pointer */ |
130 | sp.l = lo(INITIAL_STACK); | 100 | sp.l = lo(INITIAL_STACK); |
@@ -138,19 +108,13 @@ ENTRY(_coreb_trampoline_start) | |||
138 | 108 | ||
139 | /* EVT15 = _real_start */ | 109 | /* EVT15 = _real_start */ |
140 | 110 | ||
141 | p0.l = lo(EVT15); | ||
142 | p0.h = hi(EVT15); | ||
143 | p1.l = _coreb_start; | 111 | p1.l = _coreb_start; |
144 | p1.h = _coreb_start; | 112 | p1.h = _coreb_start; |
145 | [p0] = p1; | 113 | [p5 + (EVT15 - COREMMR_BASE)] = p1; |
146 | csync; | 114 | csync; |
147 | 115 | ||
148 | p0.l = lo(IMASK); | 116 | r0 = EVT_IVG15 (z); |
149 | p0.h = hi(IMASK); | 117 | sti r0; |
150 | p1.l = IMASK_IVG15; | ||
151 | p1.h = 0x0; | ||
152 | [p0] = p1; | ||
153 | csync; | ||
154 | 118 | ||
155 | raise 15; | 119 | raise 15; |
156 | p0.l = .LWAIT_HERE; | 120 | p0.l = .LWAIT_HERE; |
diff --git a/arch/blackfin/mach-bf561/smp.c b/arch/blackfin/mach-bf561/smp.c index 85abd8be1343..db22401e7605 100644 --- a/arch/blackfin/mach-bf561/smp.c +++ b/arch/blackfin/mach-bf561/smp.c | |||
@@ -114,7 +114,7 @@ void __init platform_request_ipi(int irq, void *handler) | |||
114 | int ret; | 114 | int ret; |
115 | const char *name = (irq == IRQ_SUPPLE_0) ? supple0 : supple1; | 115 | const char *name = (irq == IRQ_SUPPLE_0) ? supple0 : supple1; |
116 | 116 | ||
117 | ret = request_irq(irq, handler, IRQF_DISABLED | IRQF_PERCPU, name, handler); | 117 | ret = request_irq(irq, handler, IRQF_PERCPU, name, handler); |
118 | if (ret) | 118 | if (ret) |
119 | panic("Cannot request %s for IPI service", name); | 119 | panic("Cannot request %s for IPI service", name); |
120 | } | 120 | } |
diff --git a/arch/blackfin/mach-common/cpufreq.c b/arch/blackfin/mach-common/cpufreq.c index 85dc6d69f9c0..2e6eefd812f4 100644 --- a/arch/blackfin/mach-common/cpufreq.c +++ b/arch/blackfin/mach-common/cpufreq.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/module.h> | ||
10 | #include <linux/types.h> | 11 | #include <linux/types.h> |
11 | #include <linux/init.h> | 12 | #include <linux/init.h> |
12 | #include <linux/cpufreq.h> | 13 | #include <linux/cpufreq.h> |
diff --git a/arch/blackfin/mach-common/dpmc_modes.S b/arch/blackfin/mach-common/dpmc_modes.S index 9cfdd49a3127..1c534d298de4 100644 --- a/arch/blackfin/mach-common/dpmc_modes.S +++ b/arch/blackfin/mach-common/dpmc_modes.S | |||
@@ -12,8 +12,8 @@ | |||
12 | .section .l1.text | 12 | .section .l1.text |
13 | 13 | ||
14 | ENTRY(_sleep_mode) | 14 | ENTRY(_sleep_mode) |
15 | [--SP] = ( R7:0, P5:0 ); | 15 | [--SP] = (R7:4, P5:3); |
16 | [--SP] = RETS; | 16 | [--SP] = RETS; |
17 | 17 | ||
18 | call _set_sic_iwr; | 18 | call _set_sic_iwr; |
19 | 19 | ||
@@ -46,15 +46,25 @@ ENTRY(_sleep_mode) | |||
46 | call _test_pll_locked; | 46 | call _test_pll_locked; |
47 | 47 | ||
48 | RETS = [SP++]; | 48 | RETS = [SP++]; |
49 | ( R7:0, P5:0 ) = [SP++]; | 49 | (R7:4, P5:3) = [SP++]; |
50 | RTS; | 50 | RTS; |
51 | ENDPROC(_sleep_mode) | 51 | ENDPROC(_sleep_mode) |
52 | 52 | ||
53 | /* | ||
54 | * This func never returns as it puts the part into hibernate, and | ||
55 | * is only called from do_hibernate, so we don't bother saving or | ||
56 | * restoring any of the normal C runtime state. When we wake up, | ||
57 | * the entry point will be in do_hibernate and not here. | ||
58 | * | ||
59 | * We accept just one argument -- the value to write to VR_CTL. | ||
60 | */ | ||
53 | ENTRY(_hibernate_mode) | 61 | ENTRY(_hibernate_mode) |
54 | [--SP] = ( R7:0, P5:0 ); | 62 | /* Save/setup the regs we need early for minor pipeline optimization */ |
55 | [--SP] = RETS; | 63 | R4 = R0; |
64 | P3.H = hi(VR_CTL); | ||
65 | P3.L = lo(VR_CTL); | ||
56 | 66 | ||
57 | R3 = R0; | 67 | /* Disable all wakeup sources */ |
58 | R0 = IWR_DISABLE_ALL; | 68 | R0 = IWR_DISABLE_ALL; |
59 | R1 = IWR_DISABLE_ALL; | 69 | R1 = IWR_DISABLE_ALL; |
60 | R2 = IWR_DISABLE_ALL; | 70 | R2 = IWR_DISABLE_ALL; |
@@ -62,10 +72,8 @@ ENTRY(_hibernate_mode) | |||
62 | call _set_dram_srfs; | 72 | call _set_dram_srfs; |
63 | SSYNC; | 73 | SSYNC; |
64 | 74 | ||
65 | P0.H = hi(VR_CTL); | 75 | /* Finally, we climb into our cave to hibernate */ |
66 | P0.L = lo(VR_CTL); | 76 | W[P3] = R4.L; |
67 | |||
68 | W[P0] = R3.L; | ||
69 | CLI R2; | 77 | CLI R2; |
70 | IDLE; | 78 | IDLE; |
71 | .Lforever: | 79 | .Lforever: |
@@ -73,8 +81,8 @@ ENTRY(_hibernate_mode) | |||
73 | ENDPROC(_hibernate_mode) | 81 | ENDPROC(_hibernate_mode) |
74 | 82 | ||
75 | ENTRY(_sleep_deeper) | 83 | ENTRY(_sleep_deeper) |
76 | [--SP] = ( R7:0, P5:0 ); | 84 | [--SP] = (R7:4, P5:3); |
77 | [--SP] = RETS; | 85 | [--SP] = RETS; |
78 | 86 | ||
79 | CLI R4; | 87 | CLI R4; |
80 | 88 | ||
@@ -167,7 +175,7 @@ ENTRY(_sleep_deeper) | |||
167 | STI R4; | 175 | STI R4; |
168 | 176 | ||
169 | RETS = [SP++]; | 177 | RETS = [SP++]; |
170 | ( R7:0, P5:0 ) = [SP++]; | 178 | (R7:4, P5:3) = [SP++]; |
171 | RTS; | 179 | RTS; |
172 | ENDPROC(_sleep_deeper) | 180 | ENDPROC(_sleep_deeper) |
173 | 181 | ||
@@ -188,21 +196,20 @@ ENTRY(_set_dram_srfs) | |||
188 | #else /* SDRAM */ | 196 | #else /* SDRAM */ |
189 | P0.L = lo(EBIU_SDGCTL); | 197 | P0.L = lo(EBIU_SDGCTL); |
190 | P0.H = hi(EBIU_SDGCTL); | 198 | P0.H = hi(EBIU_SDGCTL); |
199 | P1.L = lo(EBIU_SDSTAT); | ||
200 | P1.H = hi(EBIU_SDSTAT); | ||
201 | |||
191 | R2 = [P0]; | 202 | R2 = [P0]; |
192 | BITSET(R2, 24); /* SRFS enter self-refresh mode */ | 203 | BITSET(R2, 24); /* SRFS enter self-refresh mode */ |
193 | [P0] = R2; | 204 | [P0] = R2; |
194 | SSYNC; | 205 | SSYNC; |
195 | 206 | ||
196 | P0.L = lo(EBIU_SDSTAT); | ||
197 | P0.H = hi(EBIU_SDSTAT); | ||
198 | 1: | 207 | 1: |
199 | R2 = w[P0]; | 208 | R2 = w[P1]; |
200 | SSYNC; | 209 | SSYNC; |
201 | cc = BITTST(R2, 1); /* SDSRA poll self-refresh status */ | 210 | cc = BITTST(R2, 1); /* SDSRA poll self-refresh status */ |
202 | if !cc jump 1b; | 211 | if !cc jump 1b; |
203 | 212 | ||
204 | P0.L = lo(EBIU_SDGCTL); | ||
205 | P0.H = hi(EBIU_SDGCTL); | ||
206 | R2 = [P0]; | 213 | R2 = [P0]; |
207 | BITCLR(R2, 0); /* SCTLE disable CLKOUT */ | 214 | BITCLR(R2, 0); /* SCTLE disable CLKOUT */ |
208 | [P0] = R2; | 215 | [P0] = R2; |
@@ -212,6 +219,7 @@ ENDPROC(_set_dram_srfs) | |||
212 | 219 | ||
213 | ENTRY(_unset_dram_srfs) | 220 | ENTRY(_unset_dram_srfs) |
214 | /* set the dram out of self refresh mode */ | 221 | /* set the dram out of self refresh mode */ |
222 | |||
215 | #if defined(EBIU_RSTCTL) /* DDR */ | 223 | #if defined(EBIU_RSTCTL) /* DDR */ |
216 | P0.H = hi(EBIU_RSTCTL); | 224 | P0.H = hi(EBIU_RSTCTL); |
217 | P0.L = lo(EBIU_RSTCTL); | 225 | P0.L = lo(EBIU_RSTCTL); |
@@ -219,42 +227,39 @@ ENTRY(_unset_dram_srfs) | |||
219 | BITCLR(R2, 3); /* clear SRREQ bit */ | 227 | BITCLR(R2, 3); /* clear SRREQ bit */ |
220 | [P0] = R2; | 228 | [P0] = R2; |
221 | #elif defined(EBIU_SDGCTL) /* SDRAM */ | 229 | #elif defined(EBIU_SDGCTL) /* SDRAM */ |
222 | 230 | /* release CLKOUT from self-refresh */ | |
223 | P0.L = lo(EBIU_SDGCTL); /* release CLKOUT from self-refresh */ | 231 | P0.L = lo(EBIU_SDGCTL); |
224 | P0.H = hi(EBIU_SDGCTL); | 232 | P0.H = hi(EBIU_SDGCTL); |
233 | |||
225 | R2 = [P0]; | 234 | R2 = [P0]; |
226 | BITSET(R2, 0); /* SCTLE enable CLKOUT */ | 235 | BITSET(R2, 0); /* SCTLE enable CLKOUT */ |
227 | [P0] = R2 | 236 | [P0] = R2 |
228 | SSYNC; | 237 | SSYNC; |
229 | 238 | ||
230 | P0.L = lo(EBIU_SDGCTL); /* release SDRAM from self-refresh */ | 239 | /* release SDRAM from self-refresh */ |
231 | P0.H = hi(EBIU_SDGCTL); | ||
232 | R2 = [P0]; | 240 | R2 = [P0]; |
233 | BITCLR(R2, 24); /* clear SRFS bit */ | 241 | BITCLR(R2, 24); /* clear SRFS bit */ |
234 | [P0] = R2 | 242 | [P0] = R2 |
235 | #endif | 243 | #endif |
244 | |||
236 | SSYNC; | 245 | SSYNC; |
237 | RTS; | 246 | RTS; |
238 | ENDPROC(_unset_dram_srfs) | 247 | ENDPROC(_unset_dram_srfs) |
239 | 248 | ||
240 | ENTRY(_set_sic_iwr) | 249 | ENTRY(_set_sic_iwr) |
241 | #if defined(CONFIG_BF54x) || defined(CONFIG_BF52x) || defined(CONFIG_BF561) || \ | 250 | #ifdef SIC_IWR0 |
242 | defined(CONFIG_BF538) || defined(CONFIG_BF539) || defined(CONFIG_BF51x) | 251 | P0.H = hi(SYSMMR_BASE); |
243 | P0.H = hi(SIC_IWR0); | 252 | P0.L = lo(SYSMMR_BASE); |
244 | P0.L = lo(SIC_IWR0); | 253 | [P0 + (SIC_IWR0 - SYSMMR_BASE)] = R0; |
245 | P1.H = hi(SIC_IWR1); | 254 | [P0 + (SIC_IWR1 - SYSMMR_BASE)] = R1; |
246 | P1.L = lo(SIC_IWR1); | 255 | # ifdef SIC_IWR2 |
247 | [P1] = R1; | 256 | [P0 + (SIC_IWR2 - SYSMMR_BASE)] = R2; |
248 | #if defined(CONFIG_BF54x) | 257 | # endif |
249 | P1.H = hi(SIC_IWR2); | ||
250 | P1.L = lo(SIC_IWR2); | ||
251 | [P1] = R2; | ||
252 | #endif | ||
253 | #else | 258 | #else |
254 | P0.H = hi(SIC_IWR); | 259 | P0.H = hi(SIC_IWR); |
255 | P0.L = lo(SIC_IWR); | 260 | P0.L = lo(SIC_IWR); |
256 | #endif | ||
257 | [P0] = R0; | 261 | [P0] = R0; |
262 | #endif | ||
258 | 263 | ||
259 | SSYNC; | 264 | SSYNC; |
260 | RTS; | 265 | RTS; |
@@ -272,206 +277,55 @@ ENDPROC(_test_pll_locked) | |||
272 | 277 | ||
273 | .section .text | 278 | .section .text |
274 | 279 | ||
275 | ENTRY(_do_hibernate) | 280 | #define PM_REG0 R7 |
276 | [--SP] = ( R7:0, P5:0 ); | 281 | #define PM_REG1 R6 |
277 | [--SP] = RETS; | 282 | #define PM_REG2 R5 |
278 | /* Save System MMRs */ | 283 | #define PM_REG3 R4 |
279 | R2 = R0; | 284 | #define PM_REG4 R3 |
280 | P0.H = hi(PLL_CTL); | 285 | #define PM_REG5 R2 |
281 | P0.L = lo(PLL_CTL); | 286 | #define PM_REG6 R1 |
282 | 287 | #define PM_REG7 R0 | |
283 | #ifdef SIC_IMASK0 | 288 | #define PM_REG8 P5 |
284 | PM_SYS_PUSH(SIC_IMASK0) | 289 | #define PM_REG9 P4 |
285 | #endif | 290 | #define PM_REG10 P3 |
286 | #ifdef SIC_IMASK1 | 291 | #define PM_REG11 P2 |
287 | PM_SYS_PUSH(SIC_IMASK1) | 292 | #define PM_REG12 P1 |
288 | #endif | 293 | #define PM_REG13 P0 |
289 | #ifdef SIC_IMASK2 | 294 | |
290 | PM_SYS_PUSH(SIC_IMASK2) | 295 | #define PM_REGSET0 R7:7 |
291 | #endif | 296 | #define PM_REGSET1 R7:6 |
292 | #ifdef SIC_IMASK | 297 | #define PM_REGSET2 R7:5 |
293 | PM_SYS_PUSH(SIC_IMASK) | 298 | #define PM_REGSET3 R7:4 |
294 | #endif | 299 | #define PM_REGSET4 R7:3 |
295 | #ifdef SIC_IAR0 | 300 | #define PM_REGSET5 R7:2 |
296 | PM_SYS_PUSH(SIC_IAR0) | 301 | #define PM_REGSET6 R7:1 |
297 | PM_SYS_PUSH(SIC_IAR1) | 302 | #define PM_REGSET7 R7:0 |
298 | PM_SYS_PUSH(SIC_IAR2) | 303 | #define PM_REGSET8 R7:0, P5:5 |
299 | #endif | 304 | #define PM_REGSET9 R7:0, P5:4 |
300 | #ifdef SIC_IAR3 | 305 | #define PM_REGSET10 R7:0, P5:3 |
301 | PM_SYS_PUSH(SIC_IAR3) | 306 | #define PM_REGSET11 R7:0, P5:2 |
302 | #endif | 307 | #define PM_REGSET12 R7:0, P5:1 |
303 | #ifdef SIC_IAR4 | 308 | #define PM_REGSET13 R7:0, P5:0 |
304 | PM_SYS_PUSH(SIC_IAR4) | 309 | |
305 | PM_SYS_PUSH(SIC_IAR5) | 310 | #define _PM_PUSH(n, x, w, base) PM_REG##n = w[FP + ((x) - (base))]; |
306 | PM_SYS_PUSH(SIC_IAR6) | 311 | #define _PM_POP(n, x, w, base) w[FP + ((x) - (base))] = PM_REG##n; |
307 | #endif | 312 | #define PM_PUSH_SYNC(n) [--sp] = (PM_REGSET##n); |
308 | #ifdef SIC_IAR7 | 313 | #define PM_POP_SYNC(n) (PM_REGSET##n) = [sp++]; |
309 | PM_SYS_PUSH(SIC_IAR7) | 314 | #define PM_PUSH(n, x) PM_REG##n = [FP++]; |
310 | #endif | 315 | #define PM_POP(n, x) [FP--] = PM_REG##n; |
311 | #ifdef SIC_IAR8 | 316 | #define PM_CORE_PUSH(n, x) _PM_PUSH(n, x, , COREMMR_BASE) |
312 | PM_SYS_PUSH(SIC_IAR8) | 317 | #define PM_CORE_POP(n, x) _PM_POP(n, x, , COREMMR_BASE) |
313 | PM_SYS_PUSH(SIC_IAR9) | 318 | #define PM_SYS_PUSH(n, x) _PM_PUSH(n, x, , SYSMMR_BASE) |
314 | PM_SYS_PUSH(SIC_IAR10) | 319 | #define PM_SYS_POP(n, x) _PM_POP(n, x, , SYSMMR_BASE) |
315 | PM_SYS_PUSH(SIC_IAR11) | 320 | #define PM_SYS_PUSH16(n, x) _PM_PUSH(n, x, w, SYSMMR_BASE) |
316 | #endif | 321 | #define PM_SYS_POP16(n, x) _PM_POP(n, x, w, SYSMMR_BASE) |
317 | 322 | ||
318 | #ifdef SIC_IWR | 323 | ENTRY(_do_hibernate) |
319 | PM_SYS_PUSH(SIC_IWR) | 324 | /* |
320 | #endif | 325 | * Save the core regs early so we can blow them away when |
321 | #ifdef SIC_IWR0 | 326 | * saving/restoring MMR states |
322 | PM_SYS_PUSH(SIC_IWR0) | 327 | */ |
323 | #endif | 328 | [--sp] = (R7:0, P5:0); |
324 | #ifdef SIC_IWR1 | ||
325 | PM_SYS_PUSH(SIC_IWR1) | ||
326 | #endif | ||
327 | #ifdef SIC_IWR2 | ||
328 | PM_SYS_PUSH(SIC_IWR2) | ||
329 | #endif | ||
330 | |||
331 | #ifdef PINT0_ASSIGN | ||
332 | PM_SYS_PUSH(PINT0_MASK_SET) | ||
333 | PM_SYS_PUSH(PINT1_MASK_SET) | ||
334 | PM_SYS_PUSH(PINT2_MASK_SET) | ||
335 | PM_SYS_PUSH(PINT3_MASK_SET) | ||
336 | PM_SYS_PUSH(PINT0_ASSIGN) | ||
337 | PM_SYS_PUSH(PINT1_ASSIGN) | ||
338 | PM_SYS_PUSH(PINT2_ASSIGN) | ||
339 | PM_SYS_PUSH(PINT3_ASSIGN) | ||
340 | PM_SYS_PUSH(PINT0_INVERT_SET) | ||
341 | PM_SYS_PUSH(PINT1_INVERT_SET) | ||
342 | PM_SYS_PUSH(PINT2_INVERT_SET) | ||
343 | PM_SYS_PUSH(PINT3_INVERT_SET) | ||
344 | PM_SYS_PUSH(PINT0_EDGE_SET) | ||
345 | PM_SYS_PUSH(PINT1_EDGE_SET) | ||
346 | PM_SYS_PUSH(PINT2_EDGE_SET) | ||
347 | PM_SYS_PUSH(PINT3_EDGE_SET) | ||
348 | #endif | ||
349 | |||
350 | PM_SYS_PUSH(EBIU_AMBCTL0) | ||
351 | PM_SYS_PUSH(EBIU_AMBCTL1) | ||
352 | PM_SYS_PUSH16(EBIU_AMGCTL) | ||
353 | |||
354 | #ifdef EBIU_FCTL | ||
355 | PM_SYS_PUSH(EBIU_MBSCTL) | ||
356 | PM_SYS_PUSH(EBIU_MODE) | ||
357 | PM_SYS_PUSH(EBIU_FCTL) | ||
358 | #endif | ||
359 | |||
360 | #ifdef PORTCIO_FER | ||
361 | PM_SYS_PUSH16(PORTCIO_DIR) | ||
362 | PM_SYS_PUSH16(PORTCIO_INEN) | ||
363 | PM_SYS_PUSH16(PORTCIO) | ||
364 | PM_SYS_PUSH16(PORTCIO_FER) | ||
365 | PM_SYS_PUSH16(PORTDIO_DIR) | ||
366 | PM_SYS_PUSH16(PORTDIO_INEN) | ||
367 | PM_SYS_PUSH16(PORTDIO) | ||
368 | PM_SYS_PUSH16(PORTDIO_FER) | ||
369 | PM_SYS_PUSH16(PORTEIO_DIR) | ||
370 | PM_SYS_PUSH16(PORTEIO_INEN) | ||
371 | PM_SYS_PUSH16(PORTEIO) | ||
372 | PM_SYS_PUSH16(PORTEIO_FER) | ||
373 | #endif | ||
374 | |||
375 | PM_SYS_PUSH16(SYSCR) | ||
376 | |||
377 | /* Save Core MMRs */ | ||
378 | P0.H = hi(SRAM_BASE_ADDRESS); | ||
379 | P0.L = lo(SRAM_BASE_ADDRESS); | ||
380 | |||
381 | PM_PUSH(DMEM_CONTROL) | ||
382 | PM_PUSH(DCPLB_ADDR0) | ||
383 | PM_PUSH(DCPLB_ADDR1) | ||
384 | PM_PUSH(DCPLB_ADDR2) | ||
385 | PM_PUSH(DCPLB_ADDR3) | ||
386 | PM_PUSH(DCPLB_ADDR4) | ||
387 | PM_PUSH(DCPLB_ADDR5) | ||
388 | PM_PUSH(DCPLB_ADDR6) | ||
389 | PM_PUSH(DCPLB_ADDR7) | ||
390 | PM_PUSH(DCPLB_ADDR8) | ||
391 | PM_PUSH(DCPLB_ADDR9) | ||
392 | PM_PUSH(DCPLB_ADDR10) | ||
393 | PM_PUSH(DCPLB_ADDR11) | ||
394 | PM_PUSH(DCPLB_ADDR12) | ||
395 | PM_PUSH(DCPLB_ADDR13) | ||
396 | PM_PUSH(DCPLB_ADDR14) | ||
397 | PM_PUSH(DCPLB_ADDR15) | ||
398 | PM_PUSH(DCPLB_DATA0) | ||
399 | PM_PUSH(DCPLB_DATA1) | ||
400 | PM_PUSH(DCPLB_DATA2) | ||
401 | PM_PUSH(DCPLB_DATA3) | ||
402 | PM_PUSH(DCPLB_DATA4) | ||
403 | PM_PUSH(DCPLB_DATA5) | ||
404 | PM_PUSH(DCPLB_DATA6) | ||
405 | PM_PUSH(DCPLB_DATA7) | ||
406 | PM_PUSH(DCPLB_DATA8) | ||
407 | PM_PUSH(DCPLB_DATA9) | ||
408 | PM_PUSH(DCPLB_DATA10) | ||
409 | PM_PUSH(DCPLB_DATA11) | ||
410 | PM_PUSH(DCPLB_DATA12) | ||
411 | PM_PUSH(DCPLB_DATA13) | ||
412 | PM_PUSH(DCPLB_DATA14) | ||
413 | PM_PUSH(DCPLB_DATA15) | ||
414 | PM_PUSH(IMEM_CONTROL) | ||
415 | PM_PUSH(ICPLB_ADDR0) | ||
416 | PM_PUSH(ICPLB_ADDR1) | ||
417 | PM_PUSH(ICPLB_ADDR2) | ||
418 | PM_PUSH(ICPLB_ADDR3) | ||
419 | PM_PUSH(ICPLB_ADDR4) | ||
420 | PM_PUSH(ICPLB_ADDR5) | ||
421 | PM_PUSH(ICPLB_ADDR6) | ||
422 | PM_PUSH(ICPLB_ADDR7) | ||
423 | PM_PUSH(ICPLB_ADDR8) | ||
424 | PM_PUSH(ICPLB_ADDR9) | ||
425 | PM_PUSH(ICPLB_ADDR10) | ||
426 | PM_PUSH(ICPLB_ADDR11) | ||
427 | PM_PUSH(ICPLB_ADDR12) | ||
428 | PM_PUSH(ICPLB_ADDR13) | ||
429 | PM_PUSH(ICPLB_ADDR14) | ||
430 | PM_PUSH(ICPLB_ADDR15) | ||
431 | PM_PUSH(ICPLB_DATA0) | ||
432 | PM_PUSH(ICPLB_DATA1) | ||
433 | PM_PUSH(ICPLB_DATA2) | ||
434 | PM_PUSH(ICPLB_DATA3) | ||
435 | PM_PUSH(ICPLB_DATA4) | ||
436 | PM_PUSH(ICPLB_DATA5) | ||
437 | PM_PUSH(ICPLB_DATA6) | ||
438 | PM_PUSH(ICPLB_DATA7) | ||
439 | PM_PUSH(ICPLB_DATA8) | ||
440 | PM_PUSH(ICPLB_DATA9) | ||
441 | PM_PUSH(ICPLB_DATA10) | ||
442 | PM_PUSH(ICPLB_DATA11) | ||
443 | PM_PUSH(ICPLB_DATA12) | ||
444 | PM_PUSH(ICPLB_DATA13) | ||
445 | PM_PUSH(ICPLB_DATA14) | ||
446 | PM_PUSH(ICPLB_DATA15) | ||
447 | PM_PUSH(EVT0) | ||
448 | PM_PUSH(EVT1) | ||
449 | PM_PUSH(EVT2) | ||
450 | PM_PUSH(EVT3) | ||
451 | PM_PUSH(EVT4) | ||
452 | PM_PUSH(EVT5) | ||
453 | PM_PUSH(EVT6) | ||
454 | PM_PUSH(EVT7) | ||
455 | PM_PUSH(EVT8) | ||
456 | PM_PUSH(EVT9) | ||
457 | PM_PUSH(EVT10) | ||
458 | PM_PUSH(EVT11) | ||
459 | PM_PUSH(EVT12) | ||
460 | PM_PUSH(EVT13) | ||
461 | PM_PUSH(EVT14) | ||
462 | PM_PUSH(EVT15) | ||
463 | PM_PUSH(IMASK) | ||
464 | PM_PUSH(ILAT) | ||
465 | PM_PUSH(IPRIO) | ||
466 | PM_PUSH(TCNTL) | ||
467 | PM_PUSH(TPERIOD) | ||
468 | PM_PUSH(TSCALE) | ||
469 | PM_PUSH(TCOUNT) | ||
470 | PM_PUSH(TBUFCTL) | ||
471 | |||
472 | /* Save Core Registers */ | ||
473 | [--sp] = SYSCFG; | ||
474 | [--sp] = ( R7:0, P5:0 ); | ||
475 | [--sp] = fp; | 329 | [--sp] = fp; |
476 | [--sp] = usp; | 330 | [--sp] = usp; |
477 | 331 | ||
@@ -506,47 +360,497 @@ ENTRY(_do_hibernate) | |||
506 | [--sp] = LB0; | 360 | [--sp] = LB0; |
507 | [--sp] = LB1; | 361 | [--sp] = LB1; |
508 | 362 | ||
363 | /* We can't push RETI directly as that'll change IPEND[4] */ | ||
364 | r7 = RETI; | ||
365 | [--sp] = RETS; | ||
509 | [--sp] = ASTAT; | 366 | [--sp] = ASTAT; |
510 | [--sp] = CYCLES; | 367 | [--sp] = CYCLES; |
511 | [--sp] = CYCLES2; | 368 | [--sp] = CYCLES2; |
512 | 369 | [--sp] = SYSCFG; | |
513 | [--sp] = RETS; | ||
514 | r0 = RETI; | ||
515 | [--sp] = r0; | ||
516 | [--sp] = RETX; | 370 | [--sp] = RETX; |
517 | [--sp] = RETN; | ||
518 | [--sp] = RETE; | ||
519 | [--sp] = SEQSTAT; | 371 | [--sp] = SEQSTAT; |
372 | [--sp] = r7; | ||
373 | |||
374 | /* Save first func arg in M3 */ | ||
375 | M3 = R0; | ||
376 | |||
377 | /* Save system MMRs */ | ||
378 | FP.H = hi(SYSMMR_BASE); | ||
379 | FP.L = lo(SYSMMR_BASE); | ||
380 | |||
381 | #ifdef SIC_IMASK0 | ||
382 | PM_SYS_PUSH(0, SIC_IMASK0) | ||
383 | PM_SYS_PUSH(1, SIC_IMASK1) | ||
384 | # ifdef SIC_IMASK2 | ||
385 | PM_SYS_PUSH(2, SIC_IMASK2) | ||
386 | # endif | ||
387 | #else | ||
388 | PM_SYS_PUSH(0, SIC_IMASK) | ||
389 | #endif | ||
390 | #ifdef SIC_IAR0 | ||
391 | PM_SYS_PUSH(3, SIC_IAR0) | ||
392 | PM_SYS_PUSH(4, SIC_IAR1) | ||
393 | PM_SYS_PUSH(5, SIC_IAR2) | ||
394 | #endif | ||
395 | #ifdef SIC_IAR3 | ||
396 | PM_SYS_PUSH(6, SIC_IAR3) | ||
397 | #endif | ||
398 | #ifdef SIC_IAR4 | ||
399 | PM_SYS_PUSH(7, SIC_IAR4) | ||
400 | PM_SYS_PUSH(8, SIC_IAR5) | ||
401 | PM_SYS_PUSH(9, SIC_IAR6) | ||
402 | #endif | ||
403 | #ifdef SIC_IAR7 | ||
404 | PM_SYS_PUSH(10, SIC_IAR7) | ||
405 | #endif | ||
406 | #ifdef SIC_IAR8 | ||
407 | PM_SYS_PUSH(11, SIC_IAR8) | ||
408 | PM_SYS_PUSH(12, SIC_IAR9) | ||
409 | PM_SYS_PUSH(13, SIC_IAR10) | ||
410 | #endif | ||
411 | PM_PUSH_SYNC(13) | ||
412 | #ifdef SIC_IAR11 | ||
413 | PM_SYS_PUSH(0, SIC_IAR11) | ||
414 | #endif | ||
415 | |||
416 | #ifdef SIC_IWR | ||
417 | PM_SYS_PUSH(1, SIC_IWR) | ||
418 | #endif | ||
419 | #ifdef SIC_IWR0 | ||
420 | PM_SYS_PUSH(1, SIC_IWR0) | ||
421 | #endif | ||
422 | #ifdef SIC_IWR1 | ||
423 | PM_SYS_PUSH(2, SIC_IWR1) | ||
424 | #endif | ||
425 | #ifdef SIC_IWR2 | ||
426 | PM_SYS_PUSH(3, SIC_IWR2) | ||
427 | #endif | ||
428 | |||
429 | #ifdef PINT0_ASSIGN | ||
430 | PM_SYS_PUSH(4, PINT0_MASK_SET) | ||
431 | PM_SYS_PUSH(5, PINT1_MASK_SET) | ||
432 | PM_SYS_PUSH(6, PINT2_MASK_SET) | ||
433 | PM_SYS_PUSH(7, PINT3_MASK_SET) | ||
434 | PM_SYS_PUSH(8, PINT0_ASSIGN) | ||
435 | PM_SYS_PUSH(9, PINT1_ASSIGN) | ||
436 | PM_SYS_PUSH(10, PINT2_ASSIGN) | ||
437 | PM_SYS_PUSH(11, PINT3_ASSIGN) | ||
438 | PM_SYS_PUSH(12, PINT0_INVERT_SET) | ||
439 | PM_SYS_PUSH(13, PINT1_INVERT_SET) | ||
440 | PM_PUSH_SYNC(13) | ||
441 | PM_SYS_PUSH(0, PINT2_INVERT_SET) | ||
442 | PM_SYS_PUSH(1, PINT3_INVERT_SET) | ||
443 | PM_SYS_PUSH(2, PINT0_EDGE_SET) | ||
444 | PM_SYS_PUSH(3, PINT1_EDGE_SET) | ||
445 | PM_SYS_PUSH(4, PINT2_EDGE_SET) | ||
446 | PM_SYS_PUSH(5, PINT3_EDGE_SET) | ||
447 | #endif | ||
448 | |||
449 | PM_SYS_PUSH16(6, SYSCR) | ||
450 | |||
451 | PM_SYS_PUSH16(7, EBIU_AMGCTL) | ||
452 | PM_SYS_PUSH(8, EBIU_AMBCTL0) | ||
453 | PM_SYS_PUSH(9, EBIU_AMBCTL1) | ||
454 | #ifdef EBIU_FCTL | ||
455 | PM_SYS_PUSH(10, EBIU_MBSCTL) | ||
456 | PM_SYS_PUSH(11, EBIU_MODE) | ||
457 | PM_SYS_PUSH(12, EBIU_FCTL) | ||
458 | PM_PUSH_SYNC(12) | ||
459 | #else | ||
460 | PM_PUSH_SYNC(9) | ||
461 | #endif | ||
462 | |||
463 | /* Save Core MMRs */ | ||
464 | I0.H = hi(COREMMR_BASE); | ||
465 | I0.L = lo(COREMMR_BASE); | ||
466 | I1 = I0; | ||
467 | I2 = I0; | ||
468 | I3 = I0; | ||
469 | B0 = I0; | ||
470 | B1 = I0; | ||
471 | B2 = I0; | ||
472 | B3 = I0; | ||
473 | I1.L = lo(DCPLB_ADDR0); | ||
474 | I2.L = lo(DCPLB_DATA0); | ||
475 | I3.L = lo(ICPLB_ADDR0); | ||
476 | B0.L = lo(ICPLB_DATA0); | ||
477 | B1.L = lo(EVT2); | ||
478 | B2.L = lo(IMASK); | ||
479 | B3.L = lo(TCNTL); | ||
480 | |||
481 | /* DCPLB Addr */ | ||
482 | FP = I1; | ||
483 | PM_PUSH(0, DCPLB_ADDR0) | ||
484 | PM_PUSH(1, DCPLB_ADDR1) | ||
485 | PM_PUSH(2, DCPLB_ADDR2) | ||
486 | PM_PUSH(3, DCPLB_ADDR3) | ||
487 | PM_PUSH(4, DCPLB_ADDR4) | ||
488 | PM_PUSH(5, DCPLB_ADDR5) | ||
489 | PM_PUSH(6, DCPLB_ADDR6) | ||
490 | PM_PUSH(7, DCPLB_ADDR7) | ||
491 | PM_PUSH(8, DCPLB_ADDR8) | ||
492 | PM_PUSH(9, DCPLB_ADDR9) | ||
493 | PM_PUSH(10, DCPLB_ADDR10) | ||
494 | PM_PUSH(11, DCPLB_ADDR11) | ||
495 | PM_PUSH(12, DCPLB_ADDR12) | ||
496 | PM_PUSH(13, DCPLB_ADDR13) | ||
497 | PM_PUSH_SYNC(13) | ||
498 | PM_PUSH(0, DCPLB_ADDR14) | ||
499 | PM_PUSH(1, DCPLB_ADDR15) | ||
500 | |||
501 | /* DCPLB Data */ | ||
502 | FP = I2; | ||
503 | PM_PUSH(2, DCPLB_DATA0) | ||
504 | PM_PUSH(3, DCPLB_DATA1) | ||
505 | PM_PUSH(4, DCPLB_DATA2) | ||
506 | PM_PUSH(5, DCPLB_DATA3) | ||
507 | PM_PUSH(6, DCPLB_DATA4) | ||
508 | PM_PUSH(7, DCPLB_DATA5) | ||
509 | PM_PUSH(8, DCPLB_DATA6) | ||
510 | PM_PUSH(9, DCPLB_DATA7) | ||
511 | PM_PUSH(10, DCPLB_DATA8) | ||
512 | PM_PUSH(11, DCPLB_DATA9) | ||
513 | PM_PUSH(12, DCPLB_DATA10) | ||
514 | PM_PUSH(13, DCPLB_DATA11) | ||
515 | PM_PUSH_SYNC(13) | ||
516 | PM_PUSH(0, DCPLB_DATA12) | ||
517 | PM_PUSH(1, DCPLB_DATA13) | ||
518 | PM_PUSH(2, DCPLB_DATA14) | ||
519 | PM_PUSH(3, DCPLB_DATA15) | ||
520 | |||
521 | /* ICPLB Addr */ | ||
522 | FP = I3; | ||
523 | PM_PUSH(4, ICPLB_ADDR0) | ||
524 | PM_PUSH(5, ICPLB_ADDR1) | ||
525 | PM_PUSH(6, ICPLB_ADDR2) | ||
526 | PM_PUSH(7, ICPLB_ADDR3) | ||
527 | PM_PUSH(8, ICPLB_ADDR4) | ||
528 | PM_PUSH(9, ICPLB_ADDR5) | ||
529 | PM_PUSH(10, ICPLB_ADDR6) | ||
530 | PM_PUSH(11, ICPLB_ADDR7) | ||
531 | PM_PUSH(12, ICPLB_ADDR8) | ||
532 | PM_PUSH(13, ICPLB_ADDR9) | ||
533 | PM_PUSH_SYNC(13) | ||
534 | PM_PUSH(0, ICPLB_ADDR10) | ||
535 | PM_PUSH(1, ICPLB_ADDR11) | ||
536 | PM_PUSH(2, ICPLB_ADDR12) | ||
537 | PM_PUSH(3, ICPLB_ADDR13) | ||
538 | PM_PUSH(4, ICPLB_ADDR14) | ||
539 | PM_PUSH(5, ICPLB_ADDR15) | ||
540 | |||
541 | /* ICPLB Data */ | ||
542 | FP = B0; | ||
543 | PM_PUSH(6, ICPLB_DATA0) | ||
544 | PM_PUSH(7, ICPLB_DATA1) | ||
545 | PM_PUSH(8, ICPLB_DATA2) | ||
546 | PM_PUSH(9, ICPLB_DATA3) | ||
547 | PM_PUSH(10, ICPLB_DATA4) | ||
548 | PM_PUSH(11, ICPLB_DATA5) | ||
549 | PM_PUSH(12, ICPLB_DATA6) | ||
550 | PM_PUSH(13, ICPLB_DATA7) | ||
551 | PM_PUSH_SYNC(13) | ||
552 | PM_PUSH(0, ICPLB_DATA8) | ||
553 | PM_PUSH(1, ICPLB_DATA9) | ||
554 | PM_PUSH(2, ICPLB_DATA10) | ||
555 | PM_PUSH(3, ICPLB_DATA11) | ||
556 | PM_PUSH(4, ICPLB_DATA12) | ||
557 | PM_PUSH(5, ICPLB_DATA13) | ||
558 | PM_PUSH(6, ICPLB_DATA14) | ||
559 | PM_PUSH(7, ICPLB_DATA15) | ||
560 | |||
561 | /* Event Vectors */ | ||
562 | FP = B1; | ||
563 | PM_PUSH(8, EVT2) | ||
564 | PM_PUSH(9, EVT3) | ||
565 | FP += 4; /* EVT4 */ | ||
566 | PM_PUSH(10, EVT5) | ||
567 | PM_PUSH(11, EVT6) | ||
568 | PM_PUSH(12, EVT7) | ||
569 | PM_PUSH(13, EVT8) | ||
570 | PM_PUSH_SYNC(13) | ||
571 | PM_PUSH(0, EVT9) | ||
572 | PM_PUSH(1, EVT10) | ||
573 | PM_PUSH(2, EVT11) | ||
574 | PM_PUSH(3, EVT12) | ||
575 | PM_PUSH(4, EVT13) | ||
576 | PM_PUSH(5, EVT14) | ||
577 | PM_PUSH(6, EVT15) | ||
578 | |||
579 | /* CEC */ | ||
580 | FP = B2; | ||
581 | PM_PUSH(7, IMASK) | ||
582 | FP += 4; /* IPEND */ | ||
583 | PM_PUSH(8, ILAT) | ||
584 | PM_PUSH(9, IPRIO) | ||
585 | |||
586 | /* Core Timer */ | ||
587 | FP = B3; | ||
588 | PM_PUSH(10, TCNTL) | ||
589 | PM_PUSH(11, TPERIOD) | ||
590 | PM_PUSH(12, TSCALE) | ||
591 | PM_PUSH(13, TCOUNT) | ||
592 | PM_PUSH_SYNC(13) | ||
593 | |||
594 | /* Misc non-contiguous registers */ | ||
595 | FP = I0; | ||
596 | PM_CORE_PUSH(0, DMEM_CONTROL); | ||
597 | PM_CORE_PUSH(1, IMEM_CONTROL); | ||
598 | PM_CORE_PUSH(2, TBUFCTL); | ||
599 | PM_PUSH_SYNC(2) | ||
600 | |||
601 | /* Setup args to hibernate mode early for pipeline optimization */ | ||
602 | R0 = M3; | ||
603 | P1.H = _hibernate_mode; | ||
604 | P1.L = _hibernate_mode; | ||
520 | 605 | ||
521 | /* Save Magic, return address and Stack Pointer */ | 606 | /* Save Magic, return address and Stack Pointer */ |
522 | P0.H = 0; | 607 | P0 = 0; |
523 | P0.L = 0; | 608 | R1.H = 0xDEAD; /* Hibernate Magic */ |
524 | R0.H = 0xDEAD; /* Hibernate Magic */ | 609 | R1.L = 0xBEEF; |
525 | R0.L = 0xBEEF; | 610 | R2.H = .Lpm_resume_here; |
526 | [P0++] = R0; /* Store Hibernate Magic */ | 611 | R2.L = .Lpm_resume_here; |
527 | R0.H = .Lpm_resume_here; | 612 | [P0++] = R1; /* Store Hibernate Magic */ |
528 | R0.L = .Lpm_resume_here; | 613 | [P0++] = R2; /* Save Return Address */ |
529 | [P0++] = R0; /* Save Return Address */ | ||
530 | [P0++] = SP; /* Save Stack Pointer */ | 614 | [P0++] = SP; /* Save Stack Pointer */ |
531 | P0.H = _hibernate_mode; | 615 | |
532 | P0.L = _hibernate_mode; | 616 | /* Must use an indirect call as we need to jump to L1 */ |
533 | R0 = R2; | 617 | call (P1); /* Goodbye */ |
534 | call (P0); /* Goodbye */ | ||
535 | 618 | ||
536 | .Lpm_resume_here: | 619 | .Lpm_resume_here: |
537 | 620 | ||
621 | /* Restore Core MMRs */ | ||
622 | I0.H = hi(COREMMR_BASE); | ||
623 | I0.L = lo(COREMMR_BASE); | ||
624 | I1 = I0; | ||
625 | I2 = I0; | ||
626 | I3 = I0; | ||
627 | B0 = I0; | ||
628 | B1 = I0; | ||
629 | B2 = I0; | ||
630 | B3 = I0; | ||
631 | I1.L = lo(DCPLB_ADDR15); | ||
632 | I2.L = lo(DCPLB_DATA15); | ||
633 | I3.L = lo(ICPLB_ADDR15); | ||
634 | B0.L = lo(ICPLB_DATA15); | ||
635 | B1.L = lo(EVT15); | ||
636 | B2.L = lo(IPRIO); | ||
637 | B3.L = lo(TCOUNT); | ||
638 | |||
639 | /* Misc non-contiguous registers */ | ||
640 | FP = I0; | ||
641 | PM_POP_SYNC(2) | ||
642 | PM_CORE_POP(2, TBUFCTL) | ||
643 | PM_CORE_POP(1, IMEM_CONTROL) | ||
644 | PM_CORE_POP(0, DMEM_CONTROL) | ||
645 | |||
646 | /* Core Timer */ | ||
647 | PM_POP_SYNC(13) | ||
648 | FP = B3; | ||
649 | PM_POP(13, TCOUNT) | ||
650 | PM_POP(12, TSCALE) | ||
651 | PM_POP(11, TPERIOD) | ||
652 | PM_POP(10, TCNTL) | ||
653 | |||
654 | /* CEC */ | ||
655 | FP = B2; | ||
656 | PM_POP(9, IPRIO) | ||
657 | PM_POP(8, ILAT) | ||
658 | FP += -4; /* IPEND */ | ||
659 | PM_POP(7, IMASK) | ||
660 | |||
661 | /* Event Vectors */ | ||
662 | FP = B1; | ||
663 | PM_POP(6, EVT15) | ||
664 | PM_POP(5, EVT14) | ||
665 | PM_POP(4, EVT13) | ||
666 | PM_POP(3, EVT12) | ||
667 | PM_POP(2, EVT11) | ||
668 | PM_POP(1, EVT10) | ||
669 | PM_POP(0, EVT9) | ||
670 | PM_POP_SYNC(13) | ||
671 | PM_POP(13, EVT8) | ||
672 | PM_POP(12, EVT7) | ||
673 | PM_POP(11, EVT6) | ||
674 | PM_POP(10, EVT5) | ||
675 | FP += -4; /* EVT4 */ | ||
676 | PM_POP(9, EVT3) | ||
677 | PM_POP(8, EVT2) | ||
678 | |||
679 | /* ICPLB Data */ | ||
680 | FP = B0; | ||
681 | PM_POP(7, ICPLB_DATA15) | ||
682 | PM_POP(6, ICPLB_DATA14) | ||
683 | PM_POP(5, ICPLB_DATA13) | ||
684 | PM_POP(4, ICPLB_DATA12) | ||
685 | PM_POP(3, ICPLB_DATA11) | ||
686 | PM_POP(2, ICPLB_DATA10) | ||
687 | PM_POP(1, ICPLB_DATA9) | ||
688 | PM_POP(0, ICPLB_DATA8) | ||
689 | PM_POP_SYNC(13) | ||
690 | PM_POP(13, ICPLB_DATA7) | ||
691 | PM_POP(12, ICPLB_DATA6) | ||
692 | PM_POP(11, ICPLB_DATA5) | ||
693 | PM_POP(10, ICPLB_DATA4) | ||
694 | PM_POP(9, ICPLB_DATA3) | ||
695 | PM_POP(8, ICPLB_DATA2) | ||
696 | PM_POP(7, ICPLB_DATA1) | ||
697 | PM_POP(6, ICPLB_DATA0) | ||
698 | |||
699 | /* ICPLB Addr */ | ||
700 | FP = I3; | ||
701 | PM_POP(5, ICPLB_ADDR15) | ||
702 | PM_POP(4, ICPLB_ADDR14) | ||
703 | PM_POP(3, ICPLB_ADDR13) | ||
704 | PM_POP(2, ICPLB_ADDR12) | ||
705 | PM_POP(1, ICPLB_ADDR11) | ||
706 | PM_POP(0, ICPLB_ADDR10) | ||
707 | PM_POP_SYNC(13) | ||
708 | PM_POP(13, ICPLB_ADDR9) | ||
709 | PM_POP(12, ICPLB_ADDR8) | ||
710 | PM_POP(11, ICPLB_ADDR7) | ||
711 | PM_POP(10, ICPLB_ADDR6) | ||
712 | PM_POP(9, ICPLB_ADDR5) | ||
713 | PM_POP(8, ICPLB_ADDR4) | ||
714 | PM_POP(7, ICPLB_ADDR3) | ||
715 | PM_POP(6, ICPLB_ADDR2) | ||
716 | PM_POP(5, ICPLB_ADDR1) | ||
717 | PM_POP(4, ICPLB_ADDR0) | ||
718 | |||
719 | /* DCPLB Data */ | ||
720 | FP = I2; | ||
721 | PM_POP(3, DCPLB_DATA15) | ||
722 | PM_POP(2, DCPLB_DATA14) | ||
723 | PM_POP(1, DCPLB_DATA13) | ||
724 | PM_POP(0, DCPLB_DATA12) | ||
725 | PM_POP_SYNC(13) | ||
726 | PM_POP(13, DCPLB_DATA11) | ||
727 | PM_POP(12, DCPLB_DATA10) | ||
728 | PM_POP(11, DCPLB_DATA9) | ||
729 | PM_POP(10, DCPLB_DATA8) | ||
730 | PM_POP(9, DCPLB_DATA7) | ||
731 | PM_POP(8, DCPLB_DATA6) | ||
732 | PM_POP(7, DCPLB_DATA5) | ||
733 | PM_POP(6, DCPLB_DATA4) | ||
734 | PM_POP(5, DCPLB_DATA3) | ||
735 | PM_POP(4, DCPLB_DATA2) | ||
736 | PM_POP(3, DCPLB_DATA1) | ||
737 | PM_POP(2, DCPLB_DATA0) | ||
738 | |||
739 | /* DCPLB Addr */ | ||
740 | FP = I1; | ||
741 | PM_POP(1, DCPLB_ADDR15) | ||
742 | PM_POP(0, DCPLB_ADDR14) | ||
743 | PM_POP_SYNC(13) | ||
744 | PM_POP(13, DCPLB_ADDR13) | ||
745 | PM_POP(12, DCPLB_ADDR12) | ||
746 | PM_POP(11, DCPLB_ADDR11) | ||
747 | PM_POP(10, DCPLB_ADDR10) | ||
748 | PM_POP(9, DCPLB_ADDR9) | ||
749 | PM_POP(8, DCPLB_ADDR8) | ||
750 | PM_POP(7, DCPLB_ADDR7) | ||
751 | PM_POP(6, DCPLB_ADDR6) | ||
752 | PM_POP(5, DCPLB_ADDR5) | ||
753 | PM_POP(4, DCPLB_ADDR4) | ||
754 | PM_POP(3, DCPLB_ADDR3) | ||
755 | PM_POP(2, DCPLB_ADDR2) | ||
756 | PM_POP(1, DCPLB_ADDR1) | ||
757 | PM_POP(0, DCPLB_ADDR0) | ||
758 | |||
759 | /* Restore System MMRs */ | ||
760 | FP.H = hi(SYSMMR_BASE); | ||
761 | FP.L = lo(SYSMMR_BASE); | ||
762 | |||
763 | #ifdef EBIU_FCTL | ||
764 | PM_POP_SYNC(12) | ||
765 | PM_SYS_POP(12, EBIU_FCTL) | ||
766 | PM_SYS_POP(11, EBIU_MODE) | ||
767 | PM_SYS_POP(10, EBIU_MBSCTL) | ||
768 | #else | ||
769 | PM_POP_SYNC(9) | ||
770 | #endif | ||
771 | PM_SYS_POP(9, EBIU_AMBCTL1) | ||
772 | PM_SYS_POP(8, EBIU_AMBCTL0) | ||
773 | PM_SYS_POP16(7, EBIU_AMGCTL) | ||
774 | |||
775 | PM_SYS_POP16(6, SYSCR) | ||
776 | |||
777 | #ifdef PINT0_ASSIGN | ||
778 | PM_SYS_POP(5, PINT3_EDGE_SET) | ||
779 | PM_SYS_POP(4, PINT2_EDGE_SET) | ||
780 | PM_SYS_POP(3, PINT1_EDGE_SET) | ||
781 | PM_SYS_POP(2, PINT0_EDGE_SET) | ||
782 | PM_SYS_POP(1, PINT3_INVERT_SET) | ||
783 | PM_SYS_POP(0, PINT2_INVERT_SET) | ||
784 | PM_POP_SYNC(13) | ||
785 | PM_SYS_POP(13, PINT1_INVERT_SET) | ||
786 | PM_SYS_POP(12, PINT0_INVERT_SET) | ||
787 | PM_SYS_POP(11, PINT3_ASSIGN) | ||
788 | PM_SYS_POP(10, PINT2_ASSIGN) | ||
789 | PM_SYS_POP(9, PINT1_ASSIGN) | ||
790 | PM_SYS_POP(8, PINT0_ASSIGN) | ||
791 | PM_SYS_POP(7, PINT3_MASK_SET) | ||
792 | PM_SYS_POP(6, PINT2_MASK_SET) | ||
793 | PM_SYS_POP(5, PINT1_MASK_SET) | ||
794 | PM_SYS_POP(4, PINT0_MASK_SET) | ||
795 | #endif | ||
796 | |||
797 | #ifdef SIC_IWR2 | ||
798 | PM_SYS_POP(3, SIC_IWR2) | ||
799 | #endif | ||
800 | #ifdef SIC_IWR1 | ||
801 | PM_SYS_POP(2, SIC_IWR1) | ||
802 | #endif | ||
803 | #ifdef SIC_IWR0 | ||
804 | PM_SYS_POP(1, SIC_IWR0) | ||
805 | #endif | ||
806 | #ifdef SIC_IWR | ||
807 | PM_SYS_POP(1, SIC_IWR) | ||
808 | #endif | ||
809 | |||
810 | #ifdef SIC_IAR11 | ||
811 | PM_SYS_POP(0, SIC_IAR11) | ||
812 | #endif | ||
813 | PM_POP_SYNC(13) | ||
814 | #ifdef SIC_IAR8 | ||
815 | PM_SYS_POP(13, SIC_IAR10) | ||
816 | PM_SYS_POP(12, SIC_IAR9) | ||
817 | PM_SYS_POP(11, SIC_IAR8) | ||
818 | #endif | ||
819 | #ifdef SIC_IAR7 | ||
820 | PM_SYS_POP(10, SIC_IAR7) | ||
821 | #endif | ||
822 | #ifdef SIC_IAR6 | ||
823 | PM_SYS_POP(9, SIC_IAR6) | ||
824 | PM_SYS_POP(8, SIC_IAR5) | ||
825 | PM_SYS_POP(7, SIC_IAR4) | ||
826 | #endif | ||
827 | #ifdef SIC_IAR3 | ||
828 | PM_SYS_POP(6, SIC_IAR3) | ||
829 | #endif | ||
830 | #ifdef SIC_IAR0 | ||
831 | PM_SYS_POP(5, SIC_IAR2) | ||
832 | PM_SYS_POP(4, SIC_IAR1) | ||
833 | PM_SYS_POP(3, SIC_IAR0) | ||
834 | #endif | ||
835 | #ifdef SIC_IMASK0 | ||
836 | # ifdef SIC_IMASK2 | ||
837 | PM_SYS_POP(2, SIC_IMASK2) | ||
838 | # endif | ||
839 | PM_SYS_POP(1, SIC_IMASK1) | ||
840 | PM_SYS_POP(0, SIC_IMASK0) | ||
841 | #else | ||
842 | PM_SYS_POP(0, SIC_IMASK) | ||
843 | #endif | ||
844 | |||
538 | /* Restore Core Registers */ | 845 | /* Restore Core Registers */ |
846 | RETI = [sp++]; | ||
539 | SEQSTAT = [sp++]; | 847 | SEQSTAT = [sp++]; |
540 | RETE = [sp++]; | ||
541 | RETN = [sp++]; | ||
542 | RETX = [sp++]; | 848 | RETX = [sp++]; |
543 | r0 = [sp++]; | 849 | SYSCFG = [sp++]; |
544 | RETI = r0; | ||
545 | RETS = [sp++]; | ||
546 | |||
547 | CYCLES2 = [sp++]; | 850 | CYCLES2 = [sp++]; |
548 | CYCLES = [sp++]; | 851 | CYCLES = [sp++]; |
549 | ASTAT = [sp++]; | 852 | ASTAT = [sp++]; |
853 | RETS = [sp++]; | ||
550 | 854 | ||
551 | LB1 = [sp++]; | 855 | LB1 = [sp++]; |
552 | LB0 = [sp++]; | 856 | LB0 = [sp++]; |
@@ -581,204 +885,10 @@ ENTRY(_do_hibernate) | |||
581 | 885 | ||
582 | usp = [sp++]; | 886 | usp = [sp++]; |
583 | fp = [sp++]; | 887 | fp = [sp++]; |
584 | 888 | (R7:0, P5:0) = [sp++]; | |
585 | ( R7 : 0, P5 : 0) = [ SP ++ ]; | ||
586 | SYSCFG = [sp++]; | ||
587 | |||
588 | /* Restore Core MMRs */ | ||
589 | |||
590 | PM_POP(TBUFCTL) | ||
591 | PM_POP(TCOUNT) | ||
592 | PM_POP(TSCALE) | ||
593 | PM_POP(TPERIOD) | ||
594 | PM_POP(TCNTL) | ||
595 | PM_POP(IPRIO) | ||
596 | PM_POP(ILAT) | ||
597 | PM_POP(IMASK) | ||
598 | PM_POP(EVT15) | ||
599 | PM_POP(EVT14) | ||
600 | PM_POP(EVT13) | ||
601 | PM_POP(EVT12) | ||
602 | PM_POP(EVT11) | ||
603 | PM_POP(EVT10) | ||
604 | PM_POP(EVT9) | ||
605 | PM_POP(EVT8) | ||
606 | PM_POP(EVT7) | ||
607 | PM_POP(EVT6) | ||
608 | PM_POP(EVT5) | ||
609 | PM_POP(EVT4) | ||
610 | PM_POP(EVT3) | ||
611 | PM_POP(EVT2) | ||
612 | PM_POP(EVT1) | ||
613 | PM_POP(EVT0) | ||
614 | PM_POP(ICPLB_DATA15) | ||
615 | PM_POP(ICPLB_DATA14) | ||
616 | PM_POP(ICPLB_DATA13) | ||
617 | PM_POP(ICPLB_DATA12) | ||
618 | PM_POP(ICPLB_DATA11) | ||
619 | PM_POP(ICPLB_DATA10) | ||
620 | PM_POP(ICPLB_DATA9) | ||
621 | PM_POP(ICPLB_DATA8) | ||
622 | PM_POP(ICPLB_DATA7) | ||
623 | PM_POP(ICPLB_DATA6) | ||
624 | PM_POP(ICPLB_DATA5) | ||
625 | PM_POP(ICPLB_DATA4) | ||
626 | PM_POP(ICPLB_DATA3) | ||
627 | PM_POP(ICPLB_DATA2) | ||
628 | PM_POP(ICPLB_DATA1) | ||
629 | PM_POP(ICPLB_DATA0) | ||
630 | PM_POP(ICPLB_ADDR15) | ||
631 | PM_POP(ICPLB_ADDR14) | ||
632 | PM_POP(ICPLB_ADDR13) | ||
633 | PM_POP(ICPLB_ADDR12) | ||
634 | PM_POP(ICPLB_ADDR11) | ||
635 | PM_POP(ICPLB_ADDR10) | ||
636 | PM_POP(ICPLB_ADDR9) | ||
637 | PM_POP(ICPLB_ADDR8) | ||
638 | PM_POP(ICPLB_ADDR7) | ||
639 | PM_POP(ICPLB_ADDR6) | ||
640 | PM_POP(ICPLB_ADDR5) | ||
641 | PM_POP(ICPLB_ADDR4) | ||
642 | PM_POP(ICPLB_ADDR3) | ||
643 | PM_POP(ICPLB_ADDR2) | ||
644 | PM_POP(ICPLB_ADDR1) | ||
645 | PM_POP(ICPLB_ADDR0) | ||
646 | PM_POP(IMEM_CONTROL) | ||
647 | PM_POP(DCPLB_DATA15) | ||
648 | PM_POP(DCPLB_DATA14) | ||
649 | PM_POP(DCPLB_DATA13) | ||
650 | PM_POP(DCPLB_DATA12) | ||
651 | PM_POP(DCPLB_DATA11) | ||
652 | PM_POP(DCPLB_DATA10) | ||
653 | PM_POP(DCPLB_DATA9) | ||
654 | PM_POP(DCPLB_DATA8) | ||
655 | PM_POP(DCPLB_DATA7) | ||
656 | PM_POP(DCPLB_DATA6) | ||
657 | PM_POP(DCPLB_DATA5) | ||
658 | PM_POP(DCPLB_DATA4) | ||
659 | PM_POP(DCPLB_DATA3) | ||
660 | PM_POP(DCPLB_DATA2) | ||
661 | PM_POP(DCPLB_DATA1) | ||
662 | PM_POP(DCPLB_DATA0) | ||
663 | PM_POP(DCPLB_ADDR15) | ||
664 | PM_POP(DCPLB_ADDR14) | ||
665 | PM_POP(DCPLB_ADDR13) | ||
666 | PM_POP(DCPLB_ADDR12) | ||
667 | PM_POP(DCPLB_ADDR11) | ||
668 | PM_POP(DCPLB_ADDR10) | ||
669 | PM_POP(DCPLB_ADDR9) | ||
670 | PM_POP(DCPLB_ADDR8) | ||
671 | PM_POP(DCPLB_ADDR7) | ||
672 | PM_POP(DCPLB_ADDR6) | ||
673 | PM_POP(DCPLB_ADDR5) | ||
674 | PM_POP(DCPLB_ADDR4) | ||
675 | PM_POP(DCPLB_ADDR3) | ||
676 | PM_POP(DCPLB_ADDR2) | ||
677 | PM_POP(DCPLB_ADDR1) | ||
678 | PM_POP(DCPLB_ADDR0) | ||
679 | PM_POP(DMEM_CONTROL) | ||
680 | |||
681 | /* Restore System MMRs */ | ||
682 | |||
683 | P0.H = hi(PLL_CTL); | ||
684 | P0.L = lo(PLL_CTL); | ||
685 | PM_SYS_POP16(SYSCR) | ||
686 | |||
687 | #ifdef PORTCIO_FER | ||
688 | PM_SYS_POP16(PORTEIO_FER) | ||
689 | PM_SYS_POP16(PORTEIO) | ||
690 | PM_SYS_POP16(PORTEIO_INEN) | ||
691 | PM_SYS_POP16(PORTEIO_DIR) | ||
692 | PM_SYS_POP16(PORTDIO_FER) | ||
693 | PM_SYS_POP16(PORTDIO) | ||
694 | PM_SYS_POP16(PORTDIO_INEN) | ||
695 | PM_SYS_POP16(PORTDIO_DIR) | ||
696 | PM_SYS_POP16(PORTCIO_FER) | ||
697 | PM_SYS_POP16(PORTCIO) | ||
698 | PM_SYS_POP16(PORTCIO_INEN) | ||
699 | PM_SYS_POP16(PORTCIO_DIR) | ||
700 | #endif | ||
701 | |||
702 | #ifdef EBIU_FCTL | ||
703 | PM_SYS_POP(EBIU_FCTL) | ||
704 | PM_SYS_POP(EBIU_MODE) | ||
705 | PM_SYS_POP(EBIU_MBSCTL) | ||
706 | #endif | ||
707 | PM_SYS_POP16(EBIU_AMGCTL) | ||
708 | PM_SYS_POP(EBIU_AMBCTL1) | ||
709 | PM_SYS_POP(EBIU_AMBCTL0) | ||
710 | |||
711 | #ifdef PINT0_ASSIGN | ||
712 | PM_SYS_POP(PINT3_EDGE_SET) | ||
713 | PM_SYS_POP(PINT2_EDGE_SET) | ||
714 | PM_SYS_POP(PINT1_EDGE_SET) | ||
715 | PM_SYS_POP(PINT0_EDGE_SET) | ||
716 | PM_SYS_POP(PINT3_INVERT_SET) | ||
717 | PM_SYS_POP(PINT2_INVERT_SET) | ||
718 | PM_SYS_POP(PINT1_INVERT_SET) | ||
719 | PM_SYS_POP(PINT0_INVERT_SET) | ||
720 | PM_SYS_POP(PINT3_ASSIGN) | ||
721 | PM_SYS_POP(PINT2_ASSIGN) | ||
722 | PM_SYS_POP(PINT1_ASSIGN) | ||
723 | PM_SYS_POP(PINT0_ASSIGN) | ||
724 | PM_SYS_POP(PINT3_MASK_SET) | ||
725 | PM_SYS_POP(PINT2_MASK_SET) | ||
726 | PM_SYS_POP(PINT1_MASK_SET) | ||
727 | PM_SYS_POP(PINT0_MASK_SET) | ||
728 | #endif | ||
729 | |||
730 | #ifdef SIC_IWR2 | ||
731 | PM_SYS_POP(SIC_IWR2) | ||
732 | #endif | ||
733 | #ifdef SIC_IWR1 | ||
734 | PM_SYS_POP(SIC_IWR1) | ||
735 | #endif | ||
736 | #ifdef SIC_IWR0 | ||
737 | PM_SYS_POP(SIC_IWR0) | ||
738 | #endif | ||
739 | #ifdef SIC_IWR | ||
740 | PM_SYS_POP(SIC_IWR) | ||
741 | #endif | ||
742 | |||
743 | #ifdef SIC_IAR8 | ||
744 | PM_SYS_POP(SIC_IAR11) | ||
745 | PM_SYS_POP(SIC_IAR10) | ||
746 | PM_SYS_POP(SIC_IAR9) | ||
747 | PM_SYS_POP(SIC_IAR8) | ||
748 | #endif | ||
749 | #ifdef SIC_IAR7 | ||
750 | PM_SYS_POP(SIC_IAR7) | ||
751 | #endif | ||
752 | #ifdef SIC_IAR6 | ||
753 | PM_SYS_POP(SIC_IAR6) | ||
754 | PM_SYS_POP(SIC_IAR5) | ||
755 | PM_SYS_POP(SIC_IAR4) | ||
756 | #endif | ||
757 | #ifdef SIC_IAR3 | ||
758 | PM_SYS_POP(SIC_IAR3) | ||
759 | #endif | ||
760 | #ifdef SIC_IAR0 | ||
761 | PM_SYS_POP(SIC_IAR2) | ||
762 | PM_SYS_POP(SIC_IAR1) | ||
763 | PM_SYS_POP(SIC_IAR0) | ||
764 | #endif | ||
765 | #ifdef SIC_IMASK | ||
766 | PM_SYS_POP(SIC_IMASK) | ||
767 | #endif | ||
768 | #ifdef SIC_IMASK2 | ||
769 | PM_SYS_POP(SIC_IMASK2) | ||
770 | #endif | ||
771 | #ifdef SIC_IMASK1 | ||
772 | PM_SYS_POP(SIC_IMASK1) | ||
773 | #endif | ||
774 | #ifdef SIC_IMASK0 | ||
775 | PM_SYS_POP(SIC_IMASK0) | ||
776 | #endif | ||
777 | 889 | ||
778 | [--sp] = RETI; /* Clear Global Interrupt Disable */ | 890 | [--sp] = RETI; /* Clear Global Interrupt Disable */ |
779 | SP += 4; | 891 | SP += 4; |
780 | 892 | ||
781 | RETS = [SP++]; | ||
782 | ( R7:0, P5:0 ) = [SP++]; | ||
783 | RTS; | 893 | RTS; |
784 | ENDPROC(_do_hibernate) | 894 | ENDPROC(_do_hibernate) |
diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S index 225d311c9701..e4137297b790 100644 --- a/arch/blackfin/mach-common/entry.S +++ b/arch/blackfin/mach-common/entry.S | |||
@@ -1543,7 +1543,7 @@ ENTRY(_sys_call_table) | |||
1543 | .long _sys_ni_syscall /* for vm86 */ | 1543 | .long _sys_ni_syscall /* for vm86 */ |
1544 | .long _sys_ni_syscall /* old "query_module" */ | 1544 | .long _sys_ni_syscall /* old "query_module" */ |
1545 | .long _sys_ni_syscall /* sys_poll */ | 1545 | .long _sys_ni_syscall /* sys_poll */ |
1546 | .long _sys_nfsservctl | 1546 | .long _sys_ni_syscall /* old nfsservctl */ |
1547 | .long _sys_setresgid /* setresgid16 */ /* 170 */ | 1547 | .long _sys_setresgid /* setresgid16 */ /* 170 */ |
1548 | .long _sys_getresgid /* getresgid16 */ | 1548 | .long _sys_getresgid /* getresgid16 */ |
1549 | .long _sys_prctl | 1549 | .long _sys_prctl |
diff --git a/arch/blackfin/mach-common/head.S b/arch/blackfin/mach-common/head.S index 76de5724c1e3..8b4d98854403 100644 --- a/arch/blackfin/mach-common/head.S +++ b/arch/blackfin/mach-common/head.S | |||
@@ -85,37 +85,25 @@ ENTRY(__start) | |||
85 | SSYNC; | 85 | SSYNC; |
86 | 86 | ||
87 | /* in case of double faults, save a few things */ | 87 | /* in case of double faults, save a few things */ |
88 | p0.l = _init_retx; | 88 | p1.l = _initial_pda; |
89 | p0.h = _init_retx; | 89 | p1.h = _initial_pda; |
90 | R0 = RETX; | 90 | r4 = RETX; |
91 | [P0] = R0; | ||
92 | |||
93 | #ifdef CONFIG_DEBUG_DOUBLEFAULT | 91 | #ifdef CONFIG_DEBUG_DOUBLEFAULT |
94 | /* Only save these if we are storing them, | 92 | /* Only save these if we are storing them, |
95 | * This happens here, since L1 gets clobbered | 93 | * This happens here, since L1 gets clobbered |
96 | * below | 94 | * below |
97 | */ | 95 | */ |
98 | GET_PDA(p0, r0); | 96 | GET_PDA(p0, r0); |
99 | r5 = [p0 + PDA_DF_RETX]; | 97 | r0 = [p0 + PDA_DF_RETX]; |
100 | p1.l = _init_saved_retx; | 98 | r1 = [p0 + PDA_DF_DCPLB]; |
101 | p1.h = _init_saved_retx; | 99 | r2 = [p0 + PDA_DF_ICPLB]; |
102 | [p1] = r5; | 100 | r3 = [p0 + PDA_DF_SEQSTAT]; |
103 | 101 | [p1 + PDA_INIT_DF_RETX] = r0; | |
104 | r5 = [p0 + PDA_DF_DCPLB]; | 102 | [p1 + PDA_INIT_DF_DCPLB] = r1; |
105 | p1.l = _init_saved_dcplb_fault_addr; | 103 | [p1 + PDA_INIT_DF_ICPLB] = r2; |
106 | p1.h = _init_saved_dcplb_fault_addr; | 104 | [p1 + PDA_INIT_DF_SEQSTAT] = r3; |
107 | [p1] = r5; | ||
108 | |||
109 | r5 = [p0 + PDA_DF_ICPLB]; | ||
110 | p1.l = _init_saved_icplb_fault_addr; | ||
111 | p1.h = _init_saved_icplb_fault_addr; | ||
112 | [p1] = r5; | ||
113 | |||
114 | r5 = [p0 + PDA_DF_SEQSTAT]; | ||
115 | p1.l = _init_saved_seqstat; | ||
116 | p1.h = _init_saved_seqstat; | ||
117 | [p1] = r5; | ||
118 | #endif | 105 | #endif |
106 | [p1 + PDA_INIT_RETX] = r4; | ||
119 | 107 | ||
120 | /* Initialize stack pointer */ | 108 | /* Initialize stack pointer */ |
121 | sp.l = _init_thread_union + THREAD_SIZE; | 109 | sp.l = _init_thread_union + THREAD_SIZE; |
diff --git a/arch/blackfin/mach-common/ints-priority.c b/arch/blackfin/mach-common/ints-priority.c index 1177369f9922..332dace6af34 100644 --- a/arch/blackfin/mach-common/ints-priority.c +++ b/arch/blackfin/mach-common/ints-priority.c | |||
@@ -444,7 +444,7 @@ static inline void bfin_set_irq_handler(unsigned irq, irq_flow_handler_t handle) | |||
444 | static DECLARE_BITMAP(gpio_enabled, MAX_BLACKFIN_GPIOS); | 444 | static DECLARE_BITMAP(gpio_enabled, MAX_BLACKFIN_GPIOS); |
445 | extern void bfin_gpio_irq_prepare(unsigned gpio); | 445 | extern void bfin_gpio_irq_prepare(unsigned gpio); |
446 | 446 | ||
447 | #if !defined(CONFIG_BF54x) | 447 | #if !BFIN_GPIO_PINT |
448 | 448 | ||
449 | static void bfin_gpio_ack_irq(struct irq_data *d) | 449 | static void bfin_gpio_ack_irq(struct irq_data *d) |
450 | { | 450 | { |
@@ -633,7 +633,7 @@ void bfin_demux_gpio_irq(unsigned int inta_irq, | |||
633 | bfin_demux_gpio_block(irq); | 633 | bfin_demux_gpio_block(irq); |
634 | } | 634 | } |
635 | 635 | ||
636 | #else /* CONFIG_BF54x */ | 636 | #else |
637 | 637 | ||
638 | #define NR_PINT_SYS_IRQS 4 | 638 | #define NR_PINT_SYS_IRQS 4 |
639 | #define NR_PINT_BITS 32 | 639 | #define NR_PINT_BITS 32 |
@@ -647,24 +647,11 @@ void bfin_demux_gpio_irq(unsigned int inta_irq, | |||
647 | static unsigned char irq2pint_lut[NR_PINTS]; | 647 | static unsigned char irq2pint_lut[NR_PINTS]; |
648 | static unsigned char pint2irq_lut[NR_PINT_SYS_IRQS * NR_PINT_BITS]; | 648 | static unsigned char pint2irq_lut[NR_PINT_SYS_IRQS * NR_PINT_BITS]; |
649 | 649 | ||
650 | struct pin_int_t { | 650 | static struct bfin_pint_regs * const pint[NR_PINT_SYS_IRQS] = { |
651 | unsigned int mask_set; | 651 | (struct bfin_pint_regs *)PINT0_MASK_SET, |
652 | unsigned int mask_clear; | 652 | (struct bfin_pint_regs *)PINT1_MASK_SET, |
653 | unsigned int request; | 653 | (struct bfin_pint_regs *)PINT2_MASK_SET, |
654 | unsigned int assign; | 654 | (struct bfin_pint_regs *)PINT3_MASK_SET, |
655 | unsigned int edge_set; | ||
656 | unsigned int edge_clear; | ||
657 | unsigned int invert_set; | ||
658 | unsigned int invert_clear; | ||
659 | unsigned int pinstate; | ||
660 | unsigned int latch; | ||
661 | }; | ||
662 | |||
663 | static struct pin_int_t *pint[NR_PINT_SYS_IRQS] = { | ||
664 | (struct pin_int_t *)PINT0_MASK_SET, | ||
665 | (struct pin_int_t *)PINT1_MASK_SET, | ||
666 | (struct pin_int_t *)PINT2_MASK_SET, | ||
667 | (struct pin_int_t *)PINT3_MASK_SET, | ||
668 | }; | 655 | }; |
669 | 656 | ||
670 | inline unsigned int get_irq_base(u32 bank, u8 bmap) | 657 | inline unsigned int get_irq_base(u32 bank, u8 bmap) |
@@ -981,7 +968,7 @@ int __init init_arch_irq(void) | |||
981 | 968 | ||
982 | local_irq_disable(); | 969 | local_irq_disable(); |
983 | 970 | ||
984 | #ifdef CONFIG_BF54x | 971 | #if BFIN_GPIO_PINT |
985 | # ifdef CONFIG_PINTx_REASSIGN | 972 | # ifdef CONFIG_PINTx_REASSIGN |
986 | pint[0]->assign = CONFIG_PINT0_ASSIGN; | 973 | pint[0]->assign = CONFIG_PINT0_ASSIGN; |
987 | pint[1]->assign = CONFIG_PINT1_ASSIGN; | 974 | pint[1]->assign = CONFIG_PINT1_ASSIGN; |
@@ -999,16 +986,16 @@ int __init init_arch_irq(void) | |||
999 | irq_set_chip(irq, &bfin_internal_irqchip); | 986 | irq_set_chip(irq, &bfin_internal_irqchip); |
1000 | 987 | ||
1001 | switch (irq) { | 988 | switch (irq) { |
1002 | #if defined(BF537_FAMILY) | 989 | #if BFIN_GPIO_PINT |
1003 | case IRQ_PH_INTA_MAC_RX: | ||
1004 | case IRQ_PF_INTA_PG_INTA: | ||
1005 | #elif defined(BF533_FAMILY) | ||
1006 | case IRQ_PROG_INTA: | ||
1007 | #elif defined(CONFIG_BF54x) | ||
1008 | case IRQ_PINT0: | 990 | case IRQ_PINT0: |
1009 | case IRQ_PINT1: | 991 | case IRQ_PINT1: |
1010 | case IRQ_PINT2: | 992 | case IRQ_PINT2: |
1011 | case IRQ_PINT3: | 993 | case IRQ_PINT3: |
994 | #elif defined(BF537_FAMILY) | ||
995 | case IRQ_PH_INTA_MAC_RX: | ||
996 | case IRQ_PF_INTA_PG_INTA: | ||
997 | #elif defined(BF533_FAMILY) | ||
998 | case IRQ_PROG_INTA: | ||
1012 | #elif defined(CONFIG_BF52x) || defined(CONFIG_BF51x) | 999 | #elif defined(CONFIG_BF52x) || defined(CONFIG_BF51x) |
1013 | case IRQ_PORTF_INTA: | 1000 | case IRQ_PORTF_INTA: |
1014 | case IRQ_PORTG_INTA: | 1001 | case IRQ_PORTG_INTA: |
diff --git a/arch/blackfin/mach-common/smp.c b/arch/blackfin/mach-common/smp.c index 35e7e1eb0188..0784a52389c8 100644 --- a/arch/blackfin/mach-common/smp.c +++ b/arch/blackfin/mach-common/smp.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <linux/seq_file.h> | 23 | #include <linux/seq_file.h> |
24 | #include <linux/irq.h> | 24 | #include <linux/irq.h> |
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <asm/atomic.h> | 26 | #include <linux/atomic.h> |
27 | #include <asm/cacheflush.h> | 27 | #include <asm/cacheflush.h> |
28 | #include <asm/irq_handler.h> | 28 | #include <asm/irq_handler.h> |
29 | #include <asm/mmu_context.h> | 29 | #include <asm/mmu_context.h> |
@@ -45,9 +45,7 @@ struct corelock_slot corelock __attribute__ ((__section__(".l2.bss"))); | |||
45 | unsigned long blackfin_iflush_l1_entry[NR_CPUS]; | 45 | unsigned long blackfin_iflush_l1_entry[NR_CPUS]; |
46 | #endif | 46 | #endif |
47 | 47 | ||
48 | void __cpuinitdata *init_retx_coreb, *init_saved_retx_coreb, | 48 | struct blackfin_initial_pda __cpuinitdata initial_pda_coreb; |
49 | *init_saved_seqstat_coreb, *init_saved_icplb_fault_addr_coreb, | ||
50 | *init_saved_dcplb_fault_addr_coreb; | ||
51 | 49 | ||
52 | #define BFIN_IPI_RESCHEDULE 0 | 50 | #define BFIN_IPI_RESCHEDULE 0 |
53 | #define BFIN_IPI_CALL_FUNC 1 | 51 | #define BFIN_IPI_CALL_FUNC 1 |
@@ -297,10 +295,15 @@ EXPORT_SYMBOL_GPL(smp_call_function_single); | |||
297 | 295 | ||
298 | void smp_send_reschedule(int cpu) | 296 | void smp_send_reschedule(int cpu) |
299 | { | 297 | { |
298 | cpumask_t callmap; | ||
300 | /* simply trigger an ipi */ | 299 | /* simply trigger an ipi */ |
301 | if (cpu_is_offline(cpu)) | 300 | if (cpu_is_offline(cpu)) |
302 | return; | 301 | return; |
303 | platform_send_ipi_cpu(cpu, IRQ_SUPPLE_0); | 302 | |
303 | cpumask_clear(&callmap); | ||
304 | cpumask_set_cpu(cpu, &callmap); | ||
305 | |||
306 | smp_send_message(callmap, BFIN_IPI_RESCHEDULE, NULL, NULL, 0); | ||
304 | 307 | ||
305 | return; | 308 | return; |
306 | } | 309 | } |
@@ -369,13 +372,16 @@ void __cpuinit secondary_start_kernel(void) | |||
369 | if (_bfin_swrst & SWRST_DBL_FAULT_B) { | 372 | if (_bfin_swrst & SWRST_DBL_FAULT_B) { |
370 | printk(KERN_EMERG "CoreB Recovering from DOUBLE FAULT event\n"); | 373 | printk(KERN_EMERG "CoreB Recovering from DOUBLE FAULT event\n"); |
371 | #ifdef CONFIG_DEBUG_DOUBLEFAULT | 374 | #ifdef CONFIG_DEBUG_DOUBLEFAULT |
372 | printk(KERN_EMERG " While handling exception (EXCAUSE = 0x%x) at %pF\n", | 375 | printk(KERN_EMERG " While handling exception (EXCAUSE = %#x) at %pF\n", |
373 | (int)init_saved_seqstat_coreb & SEQSTAT_EXCAUSE, init_saved_retx_coreb); | 376 | initial_pda_coreb.seqstat_doublefault & SEQSTAT_EXCAUSE, |
374 | printk(KERN_NOTICE " DCPLB_FAULT_ADDR: %pF\n", init_saved_dcplb_fault_addr_coreb); | 377 | initial_pda_coreb.retx_doublefault); |
375 | printk(KERN_NOTICE " ICPLB_FAULT_ADDR: %pF\n", init_saved_icplb_fault_addr_coreb); | 378 | printk(KERN_NOTICE " DCPLB_FAULT_ADDR: %pF\n", |
379 | initial_pda_coreb.dcplb_doublefault_addr); | ||
380 | printk(KERN_NOTICE " ICPLB_FAULT_ADDR: %pF\n", | ||
381 | initial_pda_coreb.icplb_doublefault_addr); | ||
376 | #endif | 382 | #endif |
377 | printk(KERN_NOTICE " The instruction at %pF caused a double exception\n", | 383 | printk(KERN_NOTICE " The instruction at %pF caused a double exception\n", |
378 | init_retx_coreb); | 384 | initial_pda_coreb.retx); |
379 | } | 385 | } |
380 | 386 | ||
381 | /* | 387 | /* |
diff --git a/arch/blackfin/mm/init.c b/arch/blackfin/mm/init.c index f8435cd36c7c..78daae084915 100644 --- a/arch/blackfin/mm/init.c +++ b/arch/blackfin/mm/init.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/swap.h> | 8 | #include <linux/swap.h> |
9 | #include <linux/bootmem.h> | 9 | #include <linux/bootmem.h> |
10 | #include <linux/uaccess.h> | 10 | #include <linux/uaccess.h> |
11 | #include <linux/export.h> | ||
11 | #include <asm/bfin-global.h> | 12 | #include <asm/bfin-global.h> |
12 | #include <asm/pda.h> | 13 | #include <asm/pda.h> |
13 | #include <asm/cplbinit.h> | 14 | #include <asm/cplbinit.h> |