Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin: (43 commits)
Blackfin: spi-docs: further clarify GPIO CS behavior with various modes
Blackfin: boards: fix pcm device name
Blackfin: SMP: punt unused atomic_test_mask helper
Blackfin: irqs: do not trace arch_local_{*,irq_*} functions
Blackfin: bf526: restrict reboot workaround to 0.0 silicon
Blackfin: bf51x: fix alternative portmux options
Blackfin: bf54x: fix GPIO resume code
Blackfin: dpmc: optimize SDRAM programming slightly
Blackfin: dpmc: don't save/restore scratch registers
Blackfin: bf538: pull gpio/port logic out of core hibernate paths
Blackfin: dpmc: optimize hibernate/resume path
Blackfin: dpmc: do not save/restore EVT0/EVT1/EVT4 when hibernating
Blackfin: dpmc: relocate hibernate helper macros
Blackfin: dpmc: omit RETE/RETN when hibernating
Blackfin: dpmc: optimize SIC_IWR programming a little
Blackfin: gpio/ints: generalize pint logic
Blackfin: dpmc: bind to MMR names and not CPUs
Blackfin: debug-mmrs: generalize pint logic
Blackfin: bf54x: switch to common pint MMR struct
Blackfin: bf54x: tweak MMR pint names
...

+1743 -2146
+2
Documentation/blackfin/bfin-spi-notes.txt
··· 9 9 In most cases you can utilize SPI MODE_3 instead of MODE_0 to work-around this 10 10 behavior. If your SPI slave device in question requires SPI MODE_0 or MODE_2 11 11 timing, you can utilize the GPIO controlled SPI Slave Select option instead. 12 + In this case, you should use GPIO based CS for all of your slaves and not just 13 + the ones using mode 0 or 2 in order to guarantee correct CS toggling behavior. 12 14 13 15 You can even use the same pin whose peripheral role is a SSEL, 14 16 but use it as a GPIO instead.
+10
arch/blackfin/Kconfig
··· 953 953 To compile this driver as a module, choose M here: the module 954 954 will be called gptimers. 955 955 956 + config HAVE_PWM 957 + tristate "Enable PWM API support" 958 + depends on BFIN_GPTIMERS 959 + help 960 + Enable support for the Pulse Width Modulation framework (as 961 + found in linux/pwm.h). 962 + 963 + To compile this driver as a module, choose M here: the module 964 + will be called pwm. 965 + 956 966 choice 957 967 prompt "Uncached DMA region" 958 968 default DMA_UNCACHED_1M
+4 -4
arch/blackfin/configs/BF561-EZKIT_defconfig
··· 58 58 CONFIG_MTD=y 59 59 CONFIG_MTD_PARTITIONS=y 60 60 CONFIG_MTD_CMDLINE_PARTS=y 61 - CONFIG_MTD_CHAR=m 61 + CONFIG_MTD_CHAR=y 62 62 CONFIG_MTD_BLOCK=y 63 - CONFIG_MTD_CFI=m 64 - CONFIG_MTD_CFI_AMDSTD=m 63 + CONFIG_MTD_CFI=y 64 + CONFIG_MTD_CFI_AMDSTD=y 65 65 CONFIG_MTD_RAM=y 66 66 CONFIG_MTD_ROM=m 67 - CONFIG_MTD_PHYSMAP=m 67 + CONFIG_MTD_PHYSMAP=y 68 68 CONFIG_BLK_DEV_RAM=y 69 69 CONFIG_NETDEVICES=y 70 70 CONFIG_NET_ETHERNET=y
+43
arch/blackfin/include/asm/Kbuild
··· 1 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 += param.h 25 + generic-y += percpu.h 26 + generic-y += pgalloc.h 27 + generic-y += resource.h 28 + generic-y += scatterlist.h 29 + generic-y += sembuf.h 30 + generic-y += serial.h 31 + generic-y += setup.h 32 + generic-y += shmbuf.h 33 + generic-y += shmparam.h 34 + generic-y += socket.h 35 + generic-y += sockios.h 36 + generic-y += statfs.h 37 + generic-y += termbits.h 38 + generic-y += termios.h 39 + generic-y += topology.h 40 + generic-y += types.h 41 + generic-y += ucontext.h 42 + generic-y += unaligned.h 43 + generic-y += user.h 44 + generic-y += xor.h 45 + 3 46 header-y += bfin_sport.h 4 47 header-y += cachectl.h 5 48 header-y += fixed_code.h
+4 -9
arch/blackfin/include/asm/atomic.h
··· 1 1 /* 2 -  * Copyright 2004-2009 Analog Devices Inc. 3 -  * 4 -  * Licensed under the GPL-2 or later. 5 -  */ 2 + * Copyright 2004-2009 Analog Devices Inc. 3 + * 4 + * Licensed under the GPL-2 or later. 5 + */ 6 6 7 7 #ifndef __ARCH_BLACKFIN_ATOMIC__ 8 8 #define __ARCH_BLACKFIN_ATOMIC__ ··· 74 74 static inline void atomic_set_mask(int mask, atomic_t *v) 75 75 { 76 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 77 } 83 78 84 79 /* Atomic operations are already serializing */
-1
arch/blackfin/include/asm/auxvec.h
··· 1 - #include <asm-generic/auxvec.h>
-1
arch/blackfin/include/asm/bitsperlong.h
··· 1 - #include <asm-generic/bitsperlong.h>
+3 -3
arch/blackfin/include/asm/blackfin.h
··· 1 1 /* 2 2 * Common header file for Blackfin family of processors. 3 3 * 4 -  * Copyright 2004-2009 Analog Devices Inc. 5 -  * 6 -  * Licensed under the GPL-2 or later. 4 + * Copyright 2004-2009 Analog Devices Inc. 5 + * 6 + * Licensed under the GPL-2 or later. 7 7 */ 8 8 9 9 #ifndef _BLACKFIN_H_
-1
arch/blackfin/include/asm/bugs.h
··· 1 - #include <asm-generic/bugs.h>
-1
arch/blackfin/include/asm/cputime.h
··· 1 - #include <asm-generic/cputime.h>
-1
arch/blackfin/include/asm/current.h
··· 1 - #include <asm-generic/current.h>
-1
arch/blackfin/include/asm/device.h
··· 1 - #include <asm-generic/device.h>
-1
arch/blackfin/include/asm/div64.h
··· 1 - #include <asm-generic/div64.h>
-27
arch/blackfin/include/asm/dpmc.h
··· 117 117 #ifndef __ASSEMBLY__ 118 118 119 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 120 void sleep_deeper(u32 sic_iwr0, u32 sic_iwr1, u32 sic_iwr2); 122 121 void do_hibernate(int wakeup); 123 122 void set_dram_srfs(void); ··· 132 133 unsigned short tabsize; 133 134 unsigned short vr_settling_time; /* in us */ 134 135 }; 135 - 136 - #else 137 - 138 - #define PM_PUSH(x) \ 139 - R0 = [P0 + (x - SRAM_BASE_ADDRESS)];\ 140 - [--SP] = R0;\ 141 - 142 - #define PM_POP(x) \ 143 - R0 = [SP++];\ 144 - [P0 + (x - SRAM_BASE_ADDRESS)] = R0;\ 145 - 146 - #define PM_SYS_PUSH(x) \ 147 - R0 = [P0 + (x - PLL_CTL)];\ 148 - [--SP] = R0;\ 149 - 150 - #define PM_SYS_POP(x) \ 151 - R0 = [SP++];\ 152 - [P0 + (x - PLL_CTL)] = R0;\ 153 - 154 - #define PM_SYS_PUSH16(x) \ 155 - R0 = w[P0 + (x - PLL_CTL)];\ 156 - [--SP] = R0;\ 157 - 158 - #define PM_SYS_POP16(x) \ 159 - R0 = [SP++];\ 160 - w[P0 + (x - PLL_CTL)] = R0;\ 161 136 162 137 #endif 163 138
-1
arch/blackfin/include/asm/emergency-restart.h
··· 1 - #include <asm-generic/emergency-restart.h>
-1
arch/blackfin/include/asm/errno.h
··· 1 - #include <asm-generic/errno.h>
-1
arch/blackfin/include/asm/fb.h
··· 1 - #include <asm-generic/fb.h>
-1
arch/blackfin/include/asm/futex.h
··· 1 - #include <asm-generic/futex.h>
+12 -52
arch/blackfin/include/asm/gpio.h
··· 16 16 17 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 19 #define PERIPHERAL_USAGE 1 69 20 #define GPIO_USAGE 0 21 + 22 + #ifndef BFIN_GPIO_PINT 23 + # define BFIN_GPIO_PINT 0 24 + #endif 70 25 71 26 #ifndef __ASSEMBLY__ 72 27 ··· 44 89 * MODIFICATION HISTORY : 45 90 **************************************************************/ 46 91 47 - #ifndef CONFIG_BF54x 92 + #if !BFIN_GPIO_PINT 48 93 void set_gpio_dir(unsigned, unsigned short); 49 94 void set_gpio_inen(unsigned, unsigned short); 50 95 void set_gpio_polar(unsigned, unsigned short); ··· 119 164 #ifdef BFIN_SPECIAL_GPIO_BANKS 120 165 void bfin_special_gpio_free(unsigned gpio); 121 166 int bfin_special_gpio_request(unsigned gpio, const char *label); 167 + # ifdef CONFIG_PM 168 + void bfin_special_gpio_pm_hibernate_restore(void); 169 + void bfin_special_gpio_pm_hibernate_suspend(void); 170 + # endif 122 171 #endif 123 172 124 173 #ifdef CONFIG_PM ··· 141 182 void bfin_gpio_pm_hibernate_restore(void); 142 183 void bfin_gpio_pm_hibernate_suspend(void); 143 184 144 - #ifndef CONFIG_BF54x 185 + # if !BFIN_GPIO_PINT 145 186 int gpio_pm_wakeup_ctrl(unsigned gpio, unsigned ctrl); 146 187 147 188 struct gpio_port_s { ··· 158 199 unsigned short reserved; 159 200 unsigned short mux; 160 201 }; 161 - #endif /*CONFIG_BF54x*/ 202 + # endif 162 203 #endif /*CONFIG_PM*/ 204 + 163 205 /*********************************************************** 164 206 * 165 207 * FUNCTIONS: Blackfin GPIO Driver
+19
arch/blackfin/include/asm/gptimers.h
··· 193 193 uint32_t get_gptimer_status(unsigned int group); 194 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 207 * All Blackfin system MMRs are padded to 32bits even if the register 198 208 * itself is only 16bits. So use a helper macro to streamline this. ··· 217 207 u32 counter; 218 208 u32 period; 219 209 u32 width; 210 + }; 211 + 212 + /* 213 + * bfin group timer registers layout 214 + */ 215 + struct bfin_gptimer_group_regs { 216 + __BFP(enable); 217 + __BFP(disable); 218 + u32 status; 220 219 }; 221 220 222 221 #undef __BFP
-1
arch/blackfin/include/asm/hw_irq.h
··· 1 - #include <asm-generic/hw_irq.h>
-1
arch/blackfin/include/asm/ioctl.h
··· 1 - #include <asm-generic/ioctl.h>
-1
arch/blackfin/include/asm/ipcbuf.h
··· 1 - #include <asm-generic/ipcbuf.h>
-1
arch/blackfin/include/asm/irq_regs.h
··· 1 - #include <asm-generic/irq_regs.h>
+21 -21
arch/blackfin/include/asm/irqflags.h
··· 18 18 extern unsigned long bfin_irq_flags; 19 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 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 28 unsigned long flags; 29 29 asm volatile("cli %0;" : "=d" (flags)); ··· 40 40 /* 41 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 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 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 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 60 unsigned long flags; 61 61 flags = bfin_cli(); ··· 65 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 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 75 unsigned long flags = hard_local_save_flags(); 76 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 81 if (!hard_irqs_disabled_flags(flags)) 82 82 __hard_local_irq_enable(); ··· 113 113 /* 114 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 118 __check_irqop_context(); 119 119 __ipipe_stall_root(); 120 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 125 barrier(); 126 126 __check_irqop_context(); 127 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 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 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 142 unsigned long flags; 143 143 ··· 148 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 153 __check_irqop_context(); 154 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 160 * Merge virtual and real interrupt mask bits into a single ··· 163 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 168 int virt = (*x & (1 << 31)) != 0; 169 169 *x &= ~(1L << 31); ··· 174 174 * Interface to various arch routines that may be traced. 175 175 */ 176 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 179 if (!hard_irqs_disabled()) { 180 180 __hard_local_irq_disable(); ··· 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 187 if (hard_irqs_disabled()) { 188 188 ipipe_trace_end(0x80000000); ··· 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 195 unsigned long flags = hard_local_save_flags(); 196 196 if (!hard_irqs_disabled_flags(flags)) { ··· 200 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 205 if (!hard_irqs_disabled_flags(flags)) { 206 206 ipipe_trace_end(0x80000001);
-1
arch/blackfin/include/asm/kdebug.h
··· 1 - #include <asm-generic/kdebug.h>
-1
arch/blackfin/include/asm/kmap_types.h
··· 1 - #include <asm-generic/kmap_types.h>
-1
arch/blackfin/include/asm/local.h
··· 1 - #include <asm-generic/local.h>
-1
arch/blackfin/include/asm/local64.h
··· 1 - #include <asm-generic/local64.h>
-1
arch/blackfin/include/asm/mman.h
··· 1 - #include <asm-generic/mman.h>
+4 -4
arch/blackfin/include/asm/module.h
··· 1 1 /* 2 -  * Copyright 2004-2008 Analog Devices Inc. 3 -  * 4 -  * Licensed under the GPL-2 or later. 5 -  */ 2 + * Copyright 2004-2008 Analog Devices Inc. 3 + * 4 + * Licensed under the GPL-2 or later. 5 + */ 6 6 7 7 #ifndef _ASM_BFIN_MODULE_H 8 8 #define _ASM_BFIN_MODULE_H
-1
arch/blackfin/include/asm/msgbuf.h
··· 1 - #include <asm-generic/msgbuf.h>
+1 -76
arch/blackfin/include/asm/mutex.h
··· 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 1 + #include <asm-generic/mutex-dec.h>
+4 -4
arch/blackfin/include/asm/page.h
··· 1 1 /* 2 -  * Copyright 2004-2009 Analog Devices Inc. 3 -  * 4 -  * Licensed under the GPL-2 or later. 5 -  */ 2 + * Copyright 2004-2009 Analog Devices Inc. 3 + * 4 + * Licensed under the GPL-2 or later. 5 + */ 6 6 7 7 #ifndef _BLACKFIN_PAGE_H 8 8 #define _BLACKFIN_PAGE_H
-1
arch/blackfin/include/asm/param.h
··· 1 - #include <asm-generic/param.h>
+10
arch/blackfin/include/asm/pda.h
··· 54 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 67 extern struct blackfin_pda cpu_pda[]; 58 68 59 69 #endif /* __ASSEMBLY__ */
-1
arch/blackfin/include/asm/percpu.h
··· 1 - #include <asm-generic/percpu.h>
-1
arch/blackfin/include/asm/pgalloc.h
··· 1 - #include <asm-generic/pgalloc.h>
-1
arch/blackfin/include/asm/resource.h
··· 1 - #include <asm-generic/resource.h>
-6
arch/blackfin/include/asm/scatterlist.h
··· 1 - #ifndef _BLACKFIN_SCATTERLIST_H 2 - #define _BLACKFIN_SCATTERLIST_H 3 - 4 - #include <asm-generic/scatterlist.h> 5 - 6 - #endif /* !(_BLACKFIN_SCATTERLIST_H) */
+4 -4
arch/blackfin/include/asm/sections.h
··· 1 1 /* 2 -  * Copyright 2004-2009 Analog Devices Inc. 3 -  * 4 -  * Licensed under the GPL-2 or later. 5 -  */ 2 + * Copyright 2004-2009 Analog Devices Inc. 3 + * 4 + * Licensed under the GPL-2 or later. 5 + */ 6 6 7 7 #ifndef _BLACKFIN_SECTIONS_H 8 8 #define _BLACKFIN_SECTIONS_H
-1
arch/blackfin/include/asm/sembuf.h
··· 1 - #include <asm-generic/sembuf.h>
-1
arch/blackfin/include/asm/serial.h
··· 1 - #include <asm-generic/serial.h>
-1
arch/blackfin/include/asm/setup.h
··· 1 - #include <asm-generic/setup.h>
-1
arch/blackfin/include/asm/shmbuf.h
··· 1 - #include <asm-generic/shmbuf.h>
-1
arch/blackfin/include/asm/shmparam.h
··· 1 - #include <asm-generic/shmparam.h>
+4 -4
arch/blackfin/include/asm/sigcontext.h
··· 1 1 /* 2 -  * Copyright 2004-2008 Analog Devices Inc. 3 -  * 4 -  * Licensed under the GPL-2 or later. 5 -  */ 2 + * Copyright 2004-2008 Analog Devices Inc. 3 + * 4 + * Licensed under the GPL-2 or later. 5 + */ 6 6 7 7 #ifndef _ASM_BLACKFIN_SIGCONTEXT_H 8 8 #define _ASM_BLACKFIN_SIGCONTEXT_H
-1
arch/blackfin/include/asm/socket.h
··· 1 - #include <asm-generic/socket.h>
-1
arch/blackfin/include/asm/sockios.h
··· 1 - #include <asm-generic/sockios.h>
+4 -4
arch/blackfin/include/asm/spinlock.h
··· 1 1 /* 2 -  * Copyright 2004-2009 Analog Devices Inc. 3 -  * 4 -  * Licensed under the GPL-2 or later. 5 -  */ 2 + * Copyright 2004-2009 Analog Devices Inc. 3 + * 4 + * Licensed under the GPL-2 or later. 5 + */ 6 6 7 7 #ifndef __BFIN_SPINLOCK_H 8 8 #define __BFIN_SPINLOCK_H
-1
arch/blackfin/include/asm/statfs.h
··· 1 - #include <asm-generic/statfs.h>
-1
arch/blackfin/include/asm/termbits.h
··· 1 - #include <asm-generic/termbits.h>
-1
arch/blackfin/include/asm/termios.h
··· 1 - #include <asm-generic/termios.h>
-1
arch/blackfin/include/asm/topology.h
··· 1 - #include <asm-generic/topology.h>
-1
arch/blackfin/include/asm/types.h
··· 1 - #include <asm-generic/types.h>
-1
arch/blackfin/include/asm/ucontext.h
··· 1 - #include <asm-generic/ucontext.h>
-1
arch/blackfin/include/asm/unaligned.h
··· 1 - #include <asm-generic/unaligned.h>
-1
arch/blackfin/include/asm/user.h
··· 1 - #include <asm-generic/user.h>
-1
arch/blackfin/include/asm/xor.h
··· 1 - #include <asm-generic/xor.h>
+1
arch/blackfin/kernel/Makefile
··· 21 21 obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o 22 22 CFLAGS_REMOVE_ftrace.o = -pg 23 23 24 + obj-$(CONFIG_HAVE_PWM) += pwm.o 24 25 obj-$(CONFIG_IPIPE) += ipipe.o 25 26 obj-$(CONFIG_BFIN_GPTIMERS) += gptimers.o 26 27 obj-$(CONFIG_CPLB_INFO) += cplbinfo.o
+10
arch/blackfin/kernel/asm-offsets.c
··· 138 138 DEFINE(PDA_DF_SEQSTAT, offsetof(struct blackfin_pda, seqstat_doublefault)); 139 139 DEFINE(PDA_DF_RETX, offsetof(struct blackfin_pda, retx_doublefault)); 140 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 151 #ifdef CONFIG_SMP 142 152 /* Inter-core lock (in L2 SRAM) */ 143 153 DEFINE(SIZEOF_CORELOCK, sizeof(struct corelock_slot));
+24 -2
arch/blackfin/kernel/bfin_gpio.c
··· 118 118 119 119 #if defined(CONFIG_PM) 120 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 124 #endif 122 125 123 126 static void gpio_error(unsigned gpio) ··· 607 604 { 608 605 int i, bank; 609 606 607 + #ifdef BF538_FAMILY 608 + for (i = 0; i < ARRAY_SIZE(port_fer_saved); ++i) 609 + port_fer_saved[i] = *port_fer[i]; 610 + #endif 611 + 610 612 for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) { 611 613 bank = gpio_bank(i); 612 614 ··· 633 625 gpio_bank_saved[bank].maska = gpio_array[bank]->maska; 634 626 } 635 627 628 + #ifdef BFIN_SPECIAL_GPIO_BANKS 629 + bfin_special_gpio_pm_hibernate_suspend(); 630 + #endif 631 + 636 632 AWA_DUMMY_READ(maska); 637 633 } 638 634 639 635 void bfin_gpio_pm_hibernate_restore(void) 640 636 { 641 637 int i, bank; 638 + 639 + #ifdef BF538_FAMILY 640 + for (i = 0; i < ARRAY_SIZE(port_fer_saved); ++i) 641 + *port_fer[i] = port_fer_saved[i]; 642 + #endif 642 643 643 644 for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) { 644 645 bank = gpio_bank(i); ··· 670 653 gpio_array[bank]->both = gpio_bank_saved[bank].both; 671 654 gpio_array[bank]->maska = gpio_bank_saved[bank].maska; 672 655 } 656 + 657 + #ifdef BFIN_SPECIAL_GPIO_BANKS 658 + bfin_special_gpio_pm_hibernate_restore(); 659 + #endif 660 + 673 661 AWA_DUMMY_READ(maska); 674 662 } 675 663 ··· 713 691 gpio_array[bank]->port_mux = gpio_bank_saved[bank].mux; 714 692 gpio_array[bank]->port_fer = gpio_bank_saved[bank].fer; 715 693 gpio_array[bank]->inen = gpio_bank_saved[bank].inen; 716 - gpio_array[bank]->dir_set = gpio_bank_saved[bank].dir; 717 694 gpio_array[bank]->data_set = gpio_bank_saved[bank].data 718 - | gpio_bank_saved[bank].dir; 695 + & gpio_bank_saved[bank].dir; 696 + gpio_array[bank]->dir_set = gpio_bank_saved[bank].dir; 719 697 } 720 698 } 721 699 #endif
+69 -40
arch/blackfin/kernel/debug-mmrs.c
··· 27 27 #define PORT_MUX BFIN_PORT_MUX 28 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 31 #define d(name, bits, addr) _d(name, bits, addr, S_IRUSR|S_IWUSR) 32 32 #define d_RO(name, bits, addr) _d(name, bits, addr, S_IRUSR) 33 33 #define d_WO(name, bits, addr) _d(name, bits, addr, S_IWUSR) ··· 223 223 __DMA(CURR_DESC_PTR, curr_desc_ptr); 224 224 __DMA(CURR_ADDR, curr_addr); 225 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 228 __DMA(CURR_X_COUNT, curr_x_count); 228 229 __DMA(CURR_Y_COUNT, curr_y_count); 229 230 } ··· 278 277 } 279 278 #define GPTIMER(num) bfin_debug_mmrs_gptimer(parent, TIMER##num##_CONFIG, num) 280 279 280 + #define GPTIMER_GROUP_OFF(mmr) REGS_OFF(gptimer_group, mmr) 281 + #define __GPTIMER_GROUP(uname, lname) __REGS(gptimer_group, #uname, lname) 282 + static void __init __maybe_unused 283 + bfin_debug_mmrs_gptimer_group(struct dentry *parent, unsigned long base, int num) 284 + { 285 + char buf[32], *_buf; 286 + 287 + if (num == -1) { 288 + _buf = buf + sprintf(buf, "TIMER_"); 289 + __GPTIMER_GROUP(ENABLE, enable); 290 + __GPTIMER_GROUP(DISABLE, disable); 291 + __GPTIMER_GROUP(STATUS, status); 292 + } else { 293 + /* These MMRs are a bit odd as the group # is a suffix */ 294 + _buf = buf + sprintf(buf, "TIMER_ENABLE%i", num); 295 + d(buf, 16, base + GPTIMER_GROUP_OFF(enable)); 296 + 297 + _buf = buf + sprintf(buf, "TIMER_DISABLE%i", num); 298 + d(buf, 16, base + GPTIMER_GROUP_OFF(disable)); 299 + 300 + _buf = buf + sprintf(buf, "TIMER_STATUS%i", num); 301 + d(buf, 32, base + GPTIMER_GROUP_OFF(status)); 302 + } 303 + } 304 + #define GPTIMER_GROUP(mmr, num) bfin_debug_mmrs_gptimer_group(parent, mmr, num) 305 + 281 306 /* 282 307 * Handshake MDMA 283 308 */ ··· 321 294 __HMDMA(BCOUNT, bcount); 322 295 } 323 296 #define HMDMA(num) bfin_debug_mmrs_hmdma(parent, HMDMA##num##_CONTROL, num) 297 + 298 + /* 299 + * Peripheral Interrupts (PINT/GPIO) 300 + */ 301 + #ifdef PINT0_MASK_SET 302 + #define __PINT(uname, lname) __REGS(pint, #uname, lname) 303 + static void __init __maybe_unused 304 + bfin_debug_mmrs_pint(struct dentry *parent, unsigned long base, int num) 305 + { 306 + char buf[32], *_buf = REGS_STR_PFX(buf, PINT, num); 307 + __PINT(MASK_SET, mask_set); 308 + __PINT(MASK_CLEAR, mask_clear); 309 + __PINT(REQUEST, request); 310 + __PINT(ASSIGN, assign); 311 + __PINT(EDGE_SET, edge_set); 312 + __PINT(EDGE_CLEAR, edge_clear); 313 + __PINT(INVERT_SET, invert_set); 314 + __PINT(INVERT_CLEAR, invert_clear); 315 + __PINT(PINSTATE, pinstate); 316 + __PINT(LATCH, latch); 317 + } 318 + #define PINT(num) bfin_debug_mmrs_pint(parent, PINT##num##_MASK_SET, num) 319 + #endif 324 320 325 321 /* 326 322 * Port/GPIO ··· 797 747 #endif 798 748 799 749 parent = debugfs_create_dir("dmac", top); 800 - #ifdef DMA_TC_CNT 750 + #ifdef DMAC_TC_CNT 801 751 D16(DMAC_TC_CNT); 802 752 D16(DMAC_TC_PER); 803 753 #endif ··· 1055 1005 #endif 1056 1006 1057 1007 parent = debugfs_create_dir("gptimer", top); 1058 - #ifdef TIMER_DISABLE 1059 - D16(TIMER_DISABLE); 1060 - D16(TIMER_ENABLE); 1061 - D32(TIMER_STATUS); 1008 + #ifdef TIMER_ENABLE 1009 + GPTIMER_GROUP(TIMER_ENABLE, -1); 1062 1010 #endif 1063 - #ifdef TIMER_DISABLE0 1064 - D16(TIMER_DISABLE0); 1065 - D16(TIMER_ENABLE0); 1066 - D32(TIMER_STATUS0); 1011 + #ifdef TIMER_ENABLE0 1012 + GPTIMER_GROUP(TIMER_ENABLE0, 0); 1067 1013 #endif 1068 - #ifdef TIMER_DISABLE1 1069 - D16(TIMER_DISABLE1); 1070 - D16(TIMER_ENABLE1); 1071 - D32(TIMER_STATUS1); 1014 + #ifdef TIMER_ENABLE1 1015 + GPTIMER_GROUP(TIMER_ENABLE1, 1); 1072 1016 #endif 1073 1017 /* XXX: Should convert BF561 MMR names */ 1074 1018 #ifdef TMRS4_DISABLE 1075 - D16(TMRS4_DISABLE); 1076 - D16(TMRS4_ENABLE); 1077 - D32(TMRS4_STATUS); 1078 - D16(TMRS8_DISABLE); 1079 - D16(TMRS8_ENABLE); 1080 - D32(TMRS8_STATUS); 1019 + GPTIMER_GROUP(TMRS4_ENABLE, 0); 1020 + GPTIMER_GROUP(TMRS8_ENABLE, 1); 1081 1021 #endif 1082 1022 GPTIMER(0); 1083 1023 GPTIMER(1); ··· 1291 1251 D32(OTP_DATA1); 1292 1252 D32(OTP_DATA2); 1293 1253 D32(OTP_DATA3); 1254 + #endif 1255 + 1256 + #ifdef PINT0_MASK_SET 1257 + parent = debugfs_create_dir("pint", top); 1258 + PINT(0); 1259 + PINT(1); 1260 + PINT(2); 1261 + PINT(3); 1294 1262 #endif 1295 1263 1296 1264 #ifdef PIXC_CTL ··· 1864 1816 { 1865 1817 int num; 1866 1818 unsigned long base; 1867 - char *_buf, buf[32]; 1868 1819 1869 1820 base = PORTA_FER; 1870 1821 for (num = 0; num < 10; ++num) { 1871 1822 PORT(base, num); 1872 1823 base += sizeof(struct bfin_gpio_regs); 1873 - } 1874 - 1875 - #define __PINT(uname, lname) __REGS(pint, #uname, lname) 1876 - parent = debugfs_create_dir("pint", top); 1877 - base = PINT0_MASK_SET; 1878 - for (num = 0; num < 4; ++num) { 1879 - _buf = REGS_STR_PFX(buf, PINT, num); 1880 - __PINT(MASK_SET, mask_set); 1881 - __PINT(MASK_CLEAR, mask_clear); 1882 - __PINT(IRQ, irq); 1883 - __PINT(ASSIGN, assign); 1884 - __PINT(EDGE_SET, edge_set); 1885 - __PINT(EDGE_CLEAR, edge_clear); 1886 - __PINT(INVERT_SET, invert_set); 1887 - __PINT(INVERT_CLEAR, invert_clear); 1888 - __PINT(PINSTATE, pinstate); 1889 - __PINT(LATCH, latch); 1890 - base += sizeof(struct bfin_pint_regs); 1891 1824 } 1892 1825 1893 1826 }
+41 -52
arch/blackfin/kernel/gptimers.c
··· 25 25 26 26 #define BFIN_TIMER_NUM_GROUP (BFIN_TIMER_OCTET(MAX_BLACKFIN_GPTIMERS - 1) + 1) 27 27 28 - typedef struct { 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] = 28 + static struct bfin_gptimer_regs * const timer_regs[MAX_BLACKFIN_GPTIMERS] = 45 29 { 46 - (GPTIMER_timer_regs *)TIMER0_CONFIG, 47 - (GPTIMER_timer_regs *)TIMER1_CONFIG, 48 - (GPTIMER_timer_regs *)TIMER2_CONFIG, 30 + (void *)TIMER0_CONFIG, 31 + (void *)TIMER1_CONFIG, 32 + (void *)TIMER2_CONFIG, 49 33 #if (MAX_BLACKFIN_GPTIMERS > 3) 50 - (GPTIMER_timer_regs *)TIMER3_CONFIG, 51 - (GPTIMER_timer_regs *)TIMER4_CONFIG, 52 - (GPTIMER_timer_regs *)TIMER5_CONFIG, 53 - (GPTIMER_timer_regs *)TIMER6_CONFIG, 54 - (GPTIMER_timer_regs *)TIMER7_CONFIG, 34 + (void *)TIMER3_CONFIG, 35 + (void *)TIMER4_CONFIG, 36 + (void *)TIMER5_CONFIG, 37 + (void *)TIMER6_CONFIG, 38 + (void *)TIMER7_CONFIG, 55 39 # if (MAX_BLACKFIN_GPTIMERS > 8) 56 - (GPTIMER_timer_regs *)TIMER8_CONFIG, 57 - (GPTIMER_timer_regs *)TIMER9_CONFIG, 58 - (GPTIMER_timer_regs *)TIMER10_CONFIG, 40 + (void *)TIMER8_CONFIG, 41 + (void *)TIMER9_CONFIG, 42 + (void *)TIMER10_CONFIG, 59 43 # if (MAX_BLACKFIN_GPTIMERS > 11) 60 - (GPTIMER_timer_regs *)TIMER11_CONFIG, 44 + (void *)TIMER11_CONFIG, 61 45 # endif 62 46 # endif 63 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 53 #if (MAX_BLACKFIN_GPTIMERS > 8) 70 - (GPTIMER_group_regs *)TIMER8_GROUP_REG, 54 + (void *)TIMER8_GROUP_REG, 71 55 #endif 72 56 }; 73 57 ··· 124 140 void set_gptimer_pwidth(unsigned int timer_id, uint32_t value) 125 141 { 126 142 tassert(timer_id < MAX_BLACKFIN_GPTIMERS); 127 - timer_regs[timer_id]->width = value; 143 + bfin_write(&timer_regs[timer_id]->width, value); 128 144 SSYNC(); 129 145 } 130 146 EXPORT_SYMBOL(set_gptimer_pwidth); ··· 132 148 uint32_t get_gptimer_pwidth(unsigned int timer_id) 133 149 { 134 150 tassert(timer_id < MAX_BLACKFIN_GPTIMERS); 135 - return timer_regs[timer_id]->width; 151 + return bfin_read(&timer_regs[timer_id]->width); 136 152 } 137 153 EXPORT_SYMBOL(get_gptimer_pwidth); 138 154 139 155 void set_gptimer_period(unsigned int timer_id, uint32_t period) 140 156 { 141 157 tassert(timer_id < MAX_BLACKFIN_GPTIMERS); 142 - timer_regs[timer_id]->period = period; 158 + bfin_write(&timer_regs[timer_id]->period, period); 143 159 SSYNC(); 144 160 } 145 161 EXPORT_SYMBOL(set_gptimer_period); ··· 147 163 uint32_t get_gptimer_period(unsigned int timer_id) 148 164 { 149 165 tassert(timer_id < MAX_BLACKFIN_GPTIMERS); 150 - return timer_regs[timer_id]->period; 166 + return bfin_read(&timer_regs[timer_id]->period); 151 167 } 152 168 EXPORT_SYMBOL(get_gptimer_period); 153 169 154 170 uint32_t get_gptimer_count(unsigned int timer_id) 155 171 { 156 172 tassert(timer_id < MAX_BLACKFIN_GPTIMERS); 157 - return timer_regs[timer_id]->counter; 173 + return bfin_read(&timer_regs[timer_id]->counter); 158 174 } 159 175 EXPORT_SYMBOL(get_gptimer_count); 160 176 161 177 uint32_t get_gptimer_status(unsigned int group) 162 178 { 163 179 tassert(group < BFIN_TIMER_NUM_GROUP); 164 - return group_regs[group]->status; 180 + return bfin_read(&group_regs[group]->status); 165 181 } 166 182 EXPORT_SYMBOL(get_gptimer_status); 167 183 168 184 void set_gptimer_status(unsigned int group, uint32_t value) 169 185 { 170 186 tassert(group < BFIN_TIMER_NUM_GROUP); 171 - group_regs[group]->status = value; 187 + bfin_write(&group_regs[group]->status, value); 172 188 SSYNC(); 173 189 } 174 190 EXPORT_SYMBOL(set_gptimer_status); 175 191 192 + static uint32_t read_gptimer_status(unsigned int timer_id) 193 + { 194 + return bfin_read(&group_regs[BFIN_TIMER_OCTET(timer_id)]->status); 195 + } 196 + 176 197 int get_gptimer_intr(unsigned int timer_id) 177 198 { 178 199 tassert(timer_id < MAX_BLACKFIN_GPTIMERS); 179 - return !!(group_regs[BFIN_TIMER_OCTET(timer_id)]->status & timil_mask[timer_id]); 200 + return !!(read_gptimer_status(timer_id) & timil_mask[timer_id]); 180 201 } 181 202 EXPORT_SYMBOL(get_gptimer_intr); 182 203 183 204 void clear_gptimer_intr(unsigned int timer_id) 184 205 { 185 206 tassert(timer_id < MAX_BLACKFIN_GPTIMERS); 186 - group_regs[BFIN_TIMER_OCTET(timer_id)]->status = timil_mask[timer_id]; 207 + bfin_write(&group_regs[BFIN_TIMER_OCTET(timer_id)]->status, timil_mask[timer_id]); 187 208 } 188 209 EXPORT_SYMBOL(clear_gptimer_intr); 189 210 190 211 int get_gptimer_over(unsigned int timer_id) 191 212 { 192 213 tassert(timer_id < MAX_BLACKFIN_GPTIMERS); 193 - return !!(group_regs[BFIN_TIMER_OCTET(timer_id)]->status & tovf_mask[timer_id]); 214 + return !!(read_gptimer_status(timer_id) & tovf_mask[timer_id]); 194 215 } 195 216 EXPORT_SYMBOL(get_gptimer_over); 196 217 197 218 void clear_gptimer_over(unsigned int timer_id) 198 219 { 199 220 tassert(timer_id < MAX_BLACKFIN_GPTIMERS); 200 - group_regs[BFIN_TIMER_OCTET(timer_id)]->status = tovf_mask[timer_id]; 221 + bfin_write(&group_regs[BFIN_TIMER_OCTET(timer_id)]->status, tovf_mask[timer_id]); 201 222 } 202 223 EXPORT_SYMBOL(clear_gptimer_over); 203 224 204 225 int get_gptimer_run(unsigned int timer_id) 205 226 { 206 227 tassert(timer_id < MAX_BLACKFIN_GPTIMERS); 207 - return !!(group_regs[BFIN_TIMER_OCTET(timer_id)]->status & trun_mask[timer_id]); 228 + return !!(read_gptimer_status(timer_id) & trun_mask[timer_id]); 208 229 } 209 230 EXPORT_SYMBOL(get_gptimer_run); 210 231 211 232 void set_gptimer_config(unsigned int timer_id, uint16_t config) 212 233 { 213 234 tassert(timer_id < MAX_BLACKFIN_GPTIMERS); 214 - timer_regs[timer_id]->config = config; 235 + bfin_write(&timer_regs[timer_id]->config, config); 215 236 SSYNC(); 216 237 } 217 238 EXPORT_SYMBOL(set_gptimer_config); ··· 224 235 uint16_t get_gptimer_config(unsigned int timer_id) 225 236 { 226 237 tassert(timer_id < MAX_BLACKFIN_GPTIMERS); 227 - return timer_regs[timer_id]->config; 238 + return bfin_read(&timer_regs[timer_id]->config); 228 239 } 229 240 EXPORT_SYMBOL(get_gptimer_config); 230 241 ··· 233 244 int i; 234 245 tassert((mask & ~BLACKFIN_GPTIMER_IDMASK) == 0); 235 246 for (i = 0; i < BFIN_TIMER_NUM_GROUP; ++i) { 236 - group_regs[i]->enable = mask & 0xFF; 247 + bfin_write(&group_regs[i]->enable, mask & 0xFF); 237 248 mask >>= 8; 238 249 } 239 250 SSYNC(); ··· 246 257 uint16_t m = mask; 247 258 tassert((mask & ~BLACKFIN_GPTIMER_IDMASK) == 0); 248 259 for (i = 0; i < BFIN_TIMER_NUM_GROUP; ++i) { 249 - group_regs[i]->disable = m & 0xFF; 260 + bfin_write(&group_regs[i]->disable, m & 0xFF); 250 261 m >>= 8; 251 262 } 252 263 } ··· 257 268 _disable_gptimers(mask); 258 269 for (i = 0; i < MAX_BLACKFIN_GPTIMERS; ++i) 259 270 if (mask & (1 << i)) 260 - group_regs[BFIN_TIMER_OCTET(i)]->status = trun_mask[i]; 271 + bfin_write(&group_regs[BFIN_TIMER_OCTET(i)]->status, trun_mask[i]); 261 272 SSYNC(); 262 273 } 263 274 EXPORT_SYMBOL(disable_gptimers); ··· 272 283 void set_gptimer_pulse_hi(unsigned int timer_id) 273 284 { 274 285 tassert(timer_id < MAX_BLACKFIN_GPTIMERS); 275 - timer_regs[timer_id]->config |= TIMER_PULSE_HI; 286 + bfin_write_or(&timer_regs[timer_id]->config, TIMER_PULSE_HI); 276 287 SSYNC(); 277 288 } 278 289 EXPORT_SYMBOL(set_gptimer_pulse_hi); ··· 280 291 void clear_gptimer_pulse_hi(unsigned int timer_id) 281 292 { 282 293 tassert(timer_id < MAX_BLACKFIN_GPTIMERS); 283 - timer_regs[timer_id]->config &= ~TIMER_PULSE_HI; 294 + bfin_write_and(&timer_regs[timer_id]->config, ~TIMER_PULSE_HI); 284 295 SSYNC(); 285 296 } 286 297 EXPORT_SYMBOL(clear_gptimer_pulse_hi); ··· 290 301 int i; 291 302 uint16_t result = 0; 292 303 for (i = 0; i < BFIN_TIMER_NUM_GROUP; ++i) 293 - result |= (group_regs[i]->enable << (i << 3)); 304 + result |= (bfin_read(&group_regs[i]->enable) << (i << 3)); 294 305 return result; 295 306 } 296 307 EXPORT_SYMBOL(get_enabled_gptimers);
-1
arch/blackfin/kernel/process.c
··· 140 140 */ 141 141 void start_thread(struct pt_regs *regs, unsigned long new_ip, unsigned long new_sp) 142 142 { 143 - set_fs(USER_DS); 144 143 regs->pc = new_ip; 145 144 if (current->mm) 146 145 regs->p5 = current->mm->start_data;
+100
arch/blackfin/kernel/pwm.c
··· 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);
+3 -1
arch/blackfin/kernel/reboot.c
··· 54 54 55 55 /* The BF526 ROM will crash during reset */ 56 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 60 #endif 59 61 60 62 /* Wait for the SWRST write to complete. Cannot rely on SSYNC
+9 -7
arch/blackfin/kernel/setup.c
··· 54 54 #endif 55 55 56 56 char __initdata command_line[COMMAND_LINE_SIZE]; 57 - void __initdata *init_retx, *init_saved_retx, *init_saved_seqstat, 58 - *init_saved_icplb_fault_addr, *init_saved_dcplb_fault_addr; 57 + struct blackfin_initial_pda __initdata initial_pda; 59 58 60 59 /* boot memmap, for parsing "memmap=" */ 61 60 #define BFIN_MEMMAP_MAX 128 /* number of entries in bfin_memmap */ ··· 956 957 printk(KERN_EMERG "Recovering from DOUBLE FAULT event\n"); 957 958 #ifdef CONFIG_DEBUG_DOUBLEFAULT 958 959 /* We assume the crashing kernel, and the current symbol table match */ 959 - printk(KERN_EMERG " While handling exception (EXCAUSE = 0x%x) at %pF\n", 960 - (int)init_saved_seqstat & SEQSTAT_EXCAUSE, init_saved_retx); 961 - printk(KERN_NOTICE " DCPLB_FAULT_ADDR: %pF\n", init_saved_dcplb_fault_addr); 962 - printk(KERN_NOTICE " ICPLB_FAULT_ADDR: %pF\n", init_saved_icplb_fault_addr); 960 + printk(KERN_EMERG " While handling exception (EXCAUSE = %#x) at %pF\n", 961 + initial_pda.seqstat_doublefault & SEQSTAT_EXCAUSE, 962 + initial_pda.retx_doublefault); 963 + printk(KERN_NOTICE " DCPLB_FAULT_ADDR: %pF\n", 964 + initial_pda.dcplb_doublefault_addr); 965 + printk(KERN_NOTICE " ICPLB_FAULT_ADDR: %pF\n", 966 + initial_pda.icplb_doublefault_addr); 963 967 #endif 964 968 printk(KERN_NOTICE " The instruction at %pF caused a double exception\n", 965 - init_retx); 969 + initial_pda.retx); 966 970 } else if (_bfin_swrst & RESET_WDOG) 967 971 printk(KERN_INFO "Recovering from Watchdog event\n"); 968 972 else if (_bfin_swrst & RESET_SOFTWARE)
+2 -2
arch/blackfin/kernel/time.c
··· 51 51 u32 tcount; 52 52 53 53 /* power up the timer, but don't enable it just yet */ 54 - bfin_write_TCNTL(1); 54 + bfin_write_TCNTL(TMPWR); 55 55 CSYNC(); 56 56 57 57 /* the TSCALE prescaler counter */ ··· 64 64 /* now enable the timer */ 65 65 CSYNC(); 66 66 67 - bfin_write_TCNTL(7); 67 + bfin_write_TCNTL(TAUTORLD | TMREN | TMPWR); 68 68 } 69 69 #endif 70 70
+1
arch/blackfin/kernel/vmlinux.lds.S
··· 155 155 SECURITY_INITCALL 156 156 INIT_RAM_FS 157 157 158 + . = ALIGN(PAGE_SIZE); 158 159 ___per_cpu_load = .; 159 160 PERCPU_INPUT(32) 160 161
+52 -32
arch/blackfin/mach-bf518/Kconfig
··· 11 11 comment "Alternative Multiplexing Scheme" 12 12 13 13 choice 14 - prompt "SPORT0" 15 - default BF518_SPORT0_PORTG 14 + prompt "PWM Channel Pins" 15 + default BF518_PWM_ALL_PORTF 16 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 - bool "PORT F" 21 - help 22 - PORT F 20 + See the Hardware Reference Manual for more details. 23 21 24 - config BF518_SPORT0_PORTG 25 - bool "PORT G" 22 + config BF518_PWM_ALL_PORTF 23 + bool "PF1 - PF6" 26 24 help 27 - PORT G 25 + PF{1,2,3,4,5,6} <-> PWM_{AH,AL,BH,BL,CH,CL} 26 + 27 + config BF518_PWM_PORTF_PORTG 28 + bool "PF11 - PF14 / PG1 - PG2" 29 + help 30 + PF{11,12,13,14} <-> PWM_{AH,AL,BH,BL} 31 + PG{1,2} <-> PWM_{CH,CL} 32 + 28 33 endchoice 29 34 30 35 choice 31 - prompt "SPORT0 TSCLK Location" 32 - depends on BF518_SPORT0_PORTG 33 - default BF518_SPORT0_TSCLK_PG10 36 + prompt "PWM Sync Pin" 37 + default BF518_PWM_SYNC_PF7 34 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 38 - bool "PORT PG10" 39 - help 40 - PORT PG10 41 + See the Hardware Reference Manual for more details. 41 42 42 - config BF518_SPORT0_TSCLK_PG14 43 - bool "PORT PG14" 44 - help 45 - PORT PG14 43 + config BF518_PWM_SYNC_PF7 44 + bool "PF7" 45 + config BF518_PWM_SYNC_PF15 46 + bool "PF15" 46 47 endchoice 47 48 48 49 choice 49 - prompt "UART1" 50 - default BF518_UART1_PORTF 50 + prompt "PWM Trip B Pin" 51 + default BF518_PWM_TRIPB_PG10 51 52 help 52 - Select PORT used for UART1. See Hardware Reference Manual 53 + Select the pin used for PWM_TRIPB. 53 54 54 - config BF518_UART1_PORTF 55 - bool "PORT F" 56 - help 57 - PORT F 55 + See the Hardware Reference Manual for more details. 58 56 59 - config BF518_UART1_PORTG 60 - bool "PORT G" 57 + config BF518_PWM_TRIPB_PG10 58 + bool "PG10" 59 + config BF518_PWM_TRIPB_PG14 60 + bool "PG14" 61 + endchoice 62 + 63 + choice 64 + prompt "PPI / Timer Pins" 65 + default BF518_PPI_TMR_PG5 61 66 help 62 - PORT G 67 + Select pins used for PPI/Timer: 68 + PPICLK PPIFS1 PPIFS2 69 + TMRCLK TMR0 TMR1 70 + 71 + See the Hardware Reference Manual for more details. 72 + 73 + config BF518_PPI_TMR_PG5 74 + bool "PG5 - PG7" 75 + help 76 + PG{5,6,7} <-> {PPICLK/TMRCLK,TMR0/PPIFS1,TMR1/PPIFS2} 77 + 78 + config BF518_PPI_TMR_PG12 79 + bool "PG12 - PG14" 80 + help 81 + PG{12,13,14} <-> {PPICLK/TMRCLK,TMR0/PPIFS1,TMR1/PPIFS2} 82 + 63 83 endchoice 64 84 65 85 comment "Hysteresis/Schmitt Trigger Control"
-59
arch/blackfin/mach-bf518/boards/ezbrd.c
··· 187 187 /* SPI flash chip (m25p64) */ 188 188 static struct bfin5xx_spi_chip spi_flash_chip_info = { 189 189 .enable_dma = 0, /* use dma transfer with this chip*/ 190 - .bits_per_word = 8, 191 190 }; 192 - #endif 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 191 #endif 213 192 214 193 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 215 194 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 216 195 .enable_dma = 0, 217 - .bits_per_word = 8, 218 196 }; 219 197 #endif 220 198 221 199 #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 200 static const struct ad7877_platform_data bfin_ad7877_ts_info = { 228 201 .model = 7877, 229 202 .vref_delay_usecs = 50, /* internal, no capacitor */ ··· 209 236 .acquisition_time = 1, 210 237 .averaging = 1, 211 238 .pen_down_acc_interval = 1, 212 - }; 213 - #endif 214 - 215 - #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ 216 - && defined(CONFIG_SND_SOC_WM8731_SPI) 217 - static struct bfin5xx_spi_chip spi_wm8731_chip_info = { 218 - .enable_dma = 0, 219 - .bits_per_word = 16, 220 - }; 221 - #endif 222 - 223 - #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 224 - static struct bfin5xx_spi_chip spidev_chip_info = { 225 - .enable_dma = 0, 226 - .bits_per_word = 8, 227 239 }; 228 240 #endif 229 241 ··· 227 269 }, 228 270 #endif 229 271 230 - #if defined(CONFIG_BFIN_SPI_ADC) \ 231 - || defined(CONFIG_BFIN_SPI_ADC_MODULE) 232 - { 233 - .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ 234 - .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ 235 - .bus_num = 0, /* Framework bus number */ 236 - .chip_select = 1, /* Framework chip select. */ 237 - .platform_data = NULL, /* No spi_driver specific config */ 238 - .controller_data = &spi_adc_chip_info, 239 - }, 240 - #endif 241 - 242 272 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 243 273 #if defined(CONFIG_NET_DSA_KSZ8893M) \ 244 274 || defined(CONFIG_NET_DSA_KSZ8893M_MODULE) ··· 236 290 .bus_num = 0, 237 291 .chip_select = 1, 238 292 .platform_data = NULL, 239 - .controller_data = &spi_switch_info, 240 293 .mode = SPI_MODE_3, 241 294 }, 242 295 #endif ··· 259 314 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ 260 315 .bus_num = 0, 261 316 .chip_select = 2, 262 - .controller_data = &spi_ad7877_chip_info, 263 317 }, 264 318 #endif 265 319 #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ ··· 268 324 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 269 325 .bus_num = 0, 270 326 .chip_select = 5, 271 - .controller_data = &spi_wm8731_chip_info, 272 327 .mode = SPI_MODE_0, 273 328 }, 274 329 #endif ··· 277 334 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 278 335 .bus_num = 0, 279 336 .chip_select = 1, 280 - .controller_data = &spidev_chip_info, 281 337 }, 282 338 #endif 283 339 #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) ··· 285 343 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ 286 344 .bus_num = 0, 287 345 .chip_select = 1, 288 - .controller_data = &lq035q1_spi_chip_info, 289 346 .mode = SPI_CPHA | SPI_CPOL, 290 347 }, 291 348 #endif
-47
arch/blackfin/mach-bf518/boards/tcm-bf518.c
··· 138 138 /* SPI flash chip (m25p64) */ 139 139 static struct bfin5xx_spi_chip spi_flash_chip_info = { 140 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 142 #endif 153 143 154 144 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 155 145 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 156 146 .enable_dma = 0, 157 - .bits_per_word = 8, 158 147 }; 159 148 #endif 160 149 161 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 151 static const struct ad7877_platform_data bfin_ad7877_ts_info = { 168 152 .model = 7877, 169 153 .vref_delay_usecs = 50, /* internal, no capacitor */ ··· 163 179 }; 164 180 #endif 165 181 166 - #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ 167 - && defined(CONFIG_SND_SOC_WM8731_SPI) 168 - static struct bfin5xx_spi_chip spi_wm8731_chip_info = { 169 - .enable_dma = 0, 170 - .bits_per_word = 16, 171 - }; 172 - #endif 173 - 174 - #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 175 - static struct bfin5xx_spi_chip spidev_chip_info = { 176 - .enable_dma = 0, 177 - .bits_per_word = 8, 178 - }; 179 - #endif 180 - 181 182 static struct spi_board_info bfin_spi_board_info[] __initdata = { 182 183 #if defined(CONFIG_MTD_M25P80) \ 183 184 || defined(CONFIG_MTD_M25P80_MODULE) ··· 175 206 .platform_data = &bfin_spi_flash_data, 176 207 .controller_data = &spi_flash_chip_info, 177 208 .mode = SPI_MODE_3, 178 - }, 179 - #endif 180 - 181 - #if defined(CONFIG_BFIN_SPI_ADC) \ 182 - || defined(CONFIG_BFIN_SPI_ADC_MODULE) 183 - { 184 - .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ 185 - .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ 186 - .bus_num = 0, /* Framework bus number */ 187 - .chip_select = 1, /* Framework chip select. */ 188 - .platform_data = NULL, /* No spi_driver specific config */ 189 - .controller_data = &spi_adc_chip_info, 190 209 }, 191 210 #endif 192 211 ··· 196 239 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ 197 240 .bus_num = 0, 198 241 .chip_select = 2, 199 - .controller_data = &spi_ad7877_chip_info, 200 242 }, 201 243 #endif 202 244 #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ ··· 205 249 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 206 250 .bus_num = 0, 207 251 .chip_select = 5, 208 - .controller_data = &spi_wm8731_chip_info, 209 252 .mode = SPI_MODE_0, 210 253 }, 211 254 #endif ··· 214 259 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 215 260 .bus_num = 0, 216 261 .chip_select = 1, 217 - .controller_data = &spidev_chip_info, 218 262 }, 219 263 #endif 220 264 #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) ··· 222 268 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ 223 269 .bus_num = 0, 224 270 .chip_select = 1, 225 - .controller_data = &lq035q1_spi_chip_info, 226 271 .mode = SPI_CPHA | SPI_CPOL, 227 272 }, 228 273 #endif
+16 -8
arch/blackfin/mach-bf518/include/mach/anomaly.h
··· 11 11 */ 12 12 13 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 17 #if __SILICON_REVISION__ < 0 19 18 # error will not work on BF518 silicon version 20 19 #endif ··· 76 77 /* False Hardware Error when RETI Points to Invalid Memory */ 77 78 #define ANOMALY_05000461 (1) 78 79 /* Synchronization Problem at Startup May Cause SPORT Transmit Channels to Misalign */ 79 - #define ANOMALY_05000462 (1) 80 - /* PLL Latches Incorrect Settings During Reset */ 81 - #define ANOMALY_05000469 (1) 80 + #define ANOMALY_05000462 (__SILICON_REVISION__ < 2) 82 81 /* Incorrect Default MSEL Value in PLL_CTL */ 83 - #define ANOMALY_05000472 (1) 82 + #define ANOMALY_05000472 (__SILICON_REVISION__ < 2) 84 83 /* Interrupted SPORT Receive Data Register Read Results In Underflow when SLEN > 15 */ 85 84 #define ANOMALY_05000473 (1) 86 85 /* TESTSET Instruction Cannot Be Interrupted */ 87 86 #define ANOMALY_05000477 (1) 88 87 /* Reads of ITEST_COMMAND and ITEST_DATA Registers Cause Cache Corruption */ 89 88 #define ANOMALY_05000481 (1) 90 - /* IFLUSH sucks at life */ 89 + /* PLL Latches Incorrect Settings During Reset */ 90 + #define ANOMALY_05000482 (__SILICON_REVISION__ < 2) 91 + /* PLL_CTL Change Using bfrom_SysControl() Can Result in Processor Overclocking */ 92 + #define ANOMALY_05000485 (__SILICON_REVISION__ < 2) 93 + /* SPI Master Boot Can Fail Under Certain Conditions */ 94 + #define ANOMALY_05000490 (1) 95 + /* Instruction Memory Stalls Can Cause IFLUSH to Fail */ 91 96 #define ANOMALY_05000491 (1) 97 + /* EXCPT Instruction May Be Lost If NMI Happens Simultaneously */ 98 + #define ANOMALY_05000494 (1) 99 + /* CNT_COMMAND Functionality Depends on CNT_IMASK Configuration */ 100 + #define ANOMALY_05000498 (1) 101 + /* RXS Bit in SPI_STAT May Become Stuck In RX DMA Modes */ 102 + #define ANOMALY_05000501 (1) 92 103 93 104 /* Anomalies that don't exist on this proc */ 94 105 #define ANOMALY_05000099 (0) ··· 166 157 #define ANOMALY_05000474 (0) 167 158 #define ANOMALY_05000475 (0) 168 159 #define ANOMALY_05000480 (0) 169 - #define ANOMALY_05000485 (0) 170 160 171 161 #endif
+36 -14
arch/blackfin/mach-bf518/include/mach/portmux.h
··· 81 81 #define P_PPI0_D14 (P_DEFINED | P_IDENT(GPIO_PF14) | P_FUNCT(1)) 82 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 89 #define P_PPI0_CLK (P_DEFINED | P_IDENT(GPIO_PG12) | P_FUNCT(1)) 85 90 #define P_PPI0_FS1 (P_DEFINED | P_IDENT(GPIO_PG13) | P_FUNCT(1)) 86 91 #define P_PPI0_FS2 (P_DEFINED | P_IDENT(GPIO_PG14) | P_FUNCT(1)) 92 + #endif 87 93 #define P_PPI0_FS3 (P_DEFINED | P_IDENT(GPIO_PG15) | P_FUNCT(1)) 88 94 89 95 /* SPI Port Mux */ ··· 145 139 #define P_UART1_RX (P_DEFINED | P_IDENT(GPIO_PH7) | P_FUNCT(1)) 146 140 147 141 /* Timer */ 142 + #ifndef CONFIG_BF518_PPI_TMR_PG12 148 143 #define P_TMRCLK (P_DEFINED | P_IDENT(GPIO_PG5) | P_FUNCT(2)) 149 144 #define P_TMR0 (P_DEFINED | P_IDENT(GPIO_PG6) | P_FUNCT(2)) 150 145 #define P_TMR1 (P_DEFINED | P_IDENT(GPIO_PG7) | P_FUNCT(2)) 146 + #else 147 + #define P_TMRCLK (P_DEFINED | P_IDENT(GPIO_PG12) | P_FUNCT(2)) 148 + #define P_TMR0 (P_DEFINED | P_IDENT(GPIO_PG13) | P_FUNCT(2)) 149 + #define P_TMR1 (P_DEFINED | P_IDENT(GPIO_PG14) | P_FUNCT(2)) 150 + #endif 151 151 #define P_TMR2 (P_DEFINED | P_IDENT(GPIO_PF9) | P_FUNCT(2)) 152 152 #define P_TMR3 (P_DEFINED | P_IDENT(GPIO_PF10) | P_FUNCT(2)) 153 153 #define P_TMR4 (P_DEFINED | P_IDENT(GPIO_PG9) | P_FUNCT(2)) ··· 170 158 #define P_TWI0_SDA (P_DONTCARE) 171 159 172 160 /* PWM */ 173 - #define P_PWM0_AH (P_DEFINED | P_IDENT(GPIO_PF1) | P_FUNCT(2)) 174 - #define P_PWM0_AL (P_DEFINED | P_IDENT(GPIO_PF2) | P_FUNCT(2)) 175 - #define P_PWM0_BH (P_DEFINED | P_IDENT(GPIO_PF3) | P_FUNCT(2)) 176 - #define P_PWM0_BL (P_DEFINED | P_IDENT(GPIO_PF4) | P_FUNCT(2)) 177 - #define P_PWM0_CH (P_DEFINED | P_IDENT(GPIO_PF5) | P_FUNCT(2)) 178 - #define P_PWM0_CL (P_DEFINED | P_IDENT(GPIO_PF6) | P_FUNCT(2)) 179 - #define P_PWM0_SYNC (P_DEFINED | P_IDENT(GPIO_PF7) | P_FUNCT(2)) 161 + #ifndef CONFIG_BF518_PWM_PORTF_PORTG 162 + #define P_PWM_AH (P_DEFINED | P_IDENT(GPIO_PF1) | P_FUNCT(2)) 163 + #define P_PWM_AL (P_DEFINED | P_IDENT(GPIO_PF2) | P_FUNCT(2)) 164 + #define P_PWM_BH (P_DEFINED | P_IDENT(GPIO_PF3) | P_FUNCT(2)) 165 + #define P_PWM_BL (P_DEFINED | P_IDENT(GPIO_PF4) | P_FUNCT(2)) 166 + #define P_PWM_CH (P_DEFINED | P_IDENT(GPIO_PF5) | P_FUNCT(2)) 167 + #define P_PWM_CL (P_DEFINED | P_IDENT(GPIO_PF6) | P_FUNCT(2)) 168 + #else 169 + #define P_PWM_AH (P_DEFINED | P_IDENT(GPIO_PF11) | P_FUNCT(2)) 170 + #define P_PWM_AL (P_DEFINED | P_IDENT(GPIO_PF12) | P_FUNCT(2)) 171 + #define P_PWM_BH (P_DEFINED | P_IDENT(GPIO_PF13) | P_FUNCT(2)) 172 + #define P_PWM_BL (P_DEFINED | P_IDENT(GPIO_PF14) | P_FUNCT(2)) 173 + #define P_PWM_CH (P_DEFINED | P_IDENT(GPIO_PG1) | P_FUNCT(2)) 174 + #define P_PWM_CL (P_DEFINED | P_IDENT(GPIO_PG2) | P_FUNCT(2)) 175 + #endif 180 176 181 - #define P_PWM1_AH (P_DEFINED | P_IDENT(GPIO_PF11) | P_FUNCT(2)) 182 - #define P_PWM1_AL (P_DEFINED | P_IDENT(GPIO_PF12) | P_FUNCT(2)) 183 - #define P_PWM1_BH (P_DEFINED | P_IDENT(GPIO_PF13) | P_FUNCT(2)) 184 - #define P_PWM1_BL (P_DEFINED | P_IDENT(GPIO_PF14) | P_FUNCT(2)) 185 - #define P_PWM1_CH (P_DEFINED | P_IDENT(GPIO_PG1) | P_FUNCT(2)) 186 - #define P_PWM1_CL (P_DEFINED | P_IDENT(GPIO_PG2) | P_FUNCT(2)) 187 - #define P_PWM1_SYNC (P_DEFINED | P_IDENT(GPIO_PF15) | P_FUNCT(2)) 177 + #ifndef CONFIG_BF518_PWM_SYNC_PF15 178 + #define P_PWM_SYNC (P_DEFINED | P_IDENT(GPIO_PF7) | P_FUNCT(2)) 179 + #else 180 + #define P_PWM_SYNC (P_DEFINED | P_IDENT(GPIO_PF15) | P_FUNCT(2)) 181 + #endif 188 182 183 + #ifndef CONFIG_BF518_PWM_TRIPB_PG14 184 + #define P_PWM_TRIPB (P_DEFINED | P_IDENT(GPIO_PG10) | P_FUNCT(2)) 185 + #else 189 186 #define P_PWM_TRIPB (P_DEFINED | P_IDENT(GPIO_PG14) | P_FUNCT(2)) 187 + #endif 190 188 191 189 /* RSI */ 192 190 #define P_RSI_DATA0 (P_DEFINED | P_IDENT(GPIO_PG3) | P_FUNCT(1))
-19
arch/blackfin/mach-bf527/boards/ad7160eval.c
··· 265 265 /* SPI flash chip (m25p64) */ 266 266 static struct bfin5xx_spi_chip spi_flash_chip_info = { 267 267 .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 268 }; 278 269 #endif 279 270 280 271 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 281 272 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 282 273 .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 274 }; 292 275 #endif 293 276 ··· 311 328 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 312 329 .bus_num = 0, 313 330 .chip_select = 4, 314 - .controller_data = &ad1836_spi_chip_info, 315 331 }, 316 332 #endif 317 333 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) ··· 329 347 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 330 348 .bus_num = 0, 331 349 .chip_select = 1, 332 - .controller_data = &spidev_chip_info, 333 350 }, 334 351 #endif 335 352 };
-55
arch/blackfin/mach-bf527/boards/cm_bf527.c
··· 354 354 /* SPI flash chip (m25p64) */ 355 355 static struct bfin5xx_spi_chip spi_flash_chip_info = { 356 356 .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 357 }; 376 358 #endif 377 359 378 360 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 379 361 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 380 362 .enable_dma = 0, 381 - .bits_per_word = 8, 382 363 }; 383 364 #endif 384 365 385 366 #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 367 static const struct ad7877_platform_data bfin_ad7877_ts_info = { 392 368 .model = 7877, 393 369 .vref_delay_usecs = 50, /* internal, no capacitor */ ··· 376 400 .acquisition_time = 1, 377 401 .averaging = 1, 378 402 .pen_down_acc_interval = 1, 379 - }; 380 - #endif 381 - 382 - #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ 383 - && defined(CONFIG_SND_SOC_WM8731_SPI) 384 - static struct bfin5xx_spi_chip spi_wm8731_chip_info = { 385 - .enable_dma = 0, 386 - .bits_per_word = 16, 387 - }; 388 - #endif 389 - 390 - #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 391 - static struct bfin5xx_spi_chip spidev_chip_info = { 392 - .enable_dma = 0, 393 - .bits_per_word = 8, 394 403 }; 395 404 #endif 396 405 ··· 394 433 }, 395 434 #endif 396 435 397 - #if defined(CONFIG_BFIN_SPI_ADC) \ 398 - || defined(CONFIG_BFIN_SPI_ADC_MODULE) 399 - { 400 - .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ 401 - .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ 402 - .bus_num = 0, /* Framework bus number */ 403 - .chip_select = 1, /* Framework chip select. */ 404 - .platform_data = NULL, /* No spi_driver specific config */ 405 - .controller_data = &spi_adc_chip_info, 406 - }, 407 - #endif 408 - 409 436 #if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ 410 437 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 411 438 { ··· 401 452 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 402 453 .bus_num = 0, 403 454 .chip_select = 4, 404 - .controller_data = &ad1836_spi_chip_info, 405 455 }, 406 456 #endif 407 457 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) ··· 421 473 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ 422 474 .bus_num = 0, 423 475 .chip_select = 2, 424 - .controller_data = &spi_ad7877_chip_info, 425 476 }, 426 477 #endif 427 478 #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ ··· 430 483 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 431 484 .bus_num = 0, 432 485 .chip_select = 5, 433 - .controller_data = &spi_wm8731_chip_info, 434 486 .mode = SPI_MODE_0, 435 487 }, 436 488 #endif ··· 439 493 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 440 494 .bus_num = 0, 441 495 .chip_select = 1, 442 - .controller_data = &spidev_chip_info, 443 496 }, 444 497 #endif 445 498 };
-62
arch/blackfin/mach-bf527/boards/ezbrd.c
··· 253 253 /* SPI flash chip (sst25wf040) */ 254 254 static struct bfin5xx_spi_chip spi_flash_chip_info = { 255 255 .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 256 }; 267 257 #endif 268 258 269 259 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 270 260 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 271 261 .enable_dma = 0, 272 - .bits_per_word = 8, 273 262 }; 274 263 #endif 275 264 276 265 #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 266 static const struct ad7877_platform_data bfin_ad7877_ts_info = { 283 267 .model = 7877, 284 268 .vref_delay_usecs = 50, /* internal, no capacitor */ ··· 295 311 }; 296 312 #endif 297 313 298 - #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) 299 - static struct bfin5xx_spi_chip spi_ad7879_chip_info = { 300 - .enable_dma = 0, 301 - .bits_per_word = 16, 302 - }; 303 - #endif 304 - 305 - #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ 306 - && defined(CONFIG_SND_SOC_WM8731_SPI) 307 - static struct bfin5xx_spi_chip spi_wm8731_chip_info = { 308 - .enable_dma = 0, 309 - .bits_per_word = 16, 310 - }; 311 - #endif 312 - 313 - #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 314 - static struct bfin5xx_spi_chip spidev_chip_info = { 315 - .enable_dma = 0, 316 - .bits_per_word = 8, 317 - }; 318 - #endif 319 - 320 - #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 321 - static struct bfin5xx_spi_chip lq035q1_spi_chip_info = { 322 - .enable_dma = 0, 323 - .bits_per_word = 8, 324 - }; 325 - #endif 326 - 327 314 static struct spi_board_info bfin_spi_board_info[] __initdata = { 328 315 #if defined(CONFIG_MTD_M25P80) \ 329 316 || defined(CONFIG_MTD_M25P80_MODULE) ··· 307 352 .platform_data = &bfin_spi_flash_data, 308 353 .controller_data = &spi_flash_chip_info, 309 354 .mode = SPI_MODE_3, 310 - }, 311 - #endif 312 - 313 - #if defined(CONFIG_BFIN_SPI_ADC) \ 314 - || defined(CONFIG_BFIN_SPI_ADC_MODULE) 315 - { 316 - .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ 317 - .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ 318 - .bus_num = 0, /* Framework bus number */ 319 - .chip_select = 1, /* Framework chip select. */ 320 - .platform_data = NULL, /* No spi_driver specific config */ 321 - .controller_data = &spi_adc_chip_info, 322 355 }, 323 356 #endif 324 357 ··· 328 385 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ 329 386 .bus_num = 0, 330 387 .chip_select = 2, 331 - .controller_data = &spi_ad7877_chip_info, 332 388 }, 333 389 #endif 334 390 #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) ··· 338 396 .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ 339 397 .bus_num = 0, 340 398 .chip_select = 5, 341 - .controller_data = &spi_ad7879_chip_info, 342 399 .mode = SPI_CPHA | SPI_CPOL, 343 400 }, 344 401 #endif ··· 348 407 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 349 408 .bus_num = 0, 350 409 .chip_select = 5, 351 - .controller_data = &spi_wm8731_chip_info, 352 410 .mode = SPI_MODE_0, 353 411 }, 354 412 #endif ··· 357 417 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 358 418 .bus_num = 0, 359 419 .chip_select = 1, 360 - .controller_data = &spidev_chip_info, 361 420 }, 362 421 #endif 363 422 #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) ··· 365 426 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ 366 427 .bus_num = 0, 367 428 .chip_select = 1, 368 - .controller_data = &lq035q1_spi_chip_info, 369 429 .mode = SPI_CPHA | SPI_CPOL, 370 430 }, 371 431 #endif
+31 -67
arch/blackfin/mach-bf527/boards/ezkit.c
··· 409 409 .end = 0x20300000 + 0x100, 410 410 .flags = IORESOURCE_MEM, 411 411 }, { 412 + .start = 1, 413 + .flags = IORESOURCE_BUS, 414 + }, { 412 415 .start = IRQ_PF7, 413 416 .end = IRQ_PF7, 414 417 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, ··· 451 448 /* SPI flash chip (m25p64) */ 452 449 static struct bfin5xx_spi_chip spi_flash_chip_info = { 453 450 .enable_dma = 0, /* use dma transfer with this chip*/ 454 - .bits_per_word = 8, 455 - }; 456 - #endif 457 - 458 - #if defined(CONFIG_BFIN_SPI_ADC) \ 459 - || defined(CONFIG_BFIN_SPI_ADC_MODULE) 460 - /* SPI ADC chip */ 461 - static struct bfin5xx_spi_chip spi_adc_chip_info = { 462 - .enable_dma = 1, /* use dma transfer with this chip*/ 463 - .bits_per_word = 16, 464 - }; 465 - #endif 466 - 467 - #if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ 468 - || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 469 - static struct bfin5xx_spi_chip ad1836_spi_chip_info = { 470 - .enable_dma = 0, 471 - .bits_per_word = 16, 472 451 }; 473 452 #endif 474 453 475 454 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 476 455 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 477 456 .enable_dma = 0, 478 - .bits_per_word = 8, 479 457 }; 480 458 #endif 481 459 482 460 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 483 - static struct bfin5xx_spi_chip spi_ad7877_chip_info = { 484 - .enable_dma = 0, 485 - .bits_per_word = 16, 486 - }; 487 - 488 461 static const struct ad7877_platform_data bfin_ad7877_ts_info = { 489 462 .model = 7877, 490 463 .vref_delay_usecs = 50, /* internal, no capacitor */ ··· 489 510 .averaging = 1, /* take the average of 4 middle samples */ 490 511 .pen_down_acc_interval = 255, /* 9.4 ms */ 491 512 .gpio_export = 0, /* Export GPIO to gpiolib */ 492 - }; 493 - #endif 494 - 495 - #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) 496 - static struct bfin5xx_spi_chip spi_ad7879_chip_info = { 497 - .enable_dma = 0, 498 - .bits_per_word = 16, 499 - }; 500 - #endif 501 - 502 - #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 503 - static struct bfin5xx_spi_chip spidev_chip_info = { 504 - .enable_dma = 0, 505 - .bits_per_word = 8, 506 513 }; 507 514 #endif 508 515 ··· 539 574 BFIN_SND_RES(0), 540 575 BFIN_SND_RES(1), 541 576 }; 577 + #endif 542 578 543 - static struct platform_device bfin_pcm = { 544 - .name = "bfin-pcm-audio", 579 + #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 580 + static struct platform_device bfin_i2s_pcm = { 581 + .name = "bfin-i2s-pcm-audio", 582 + .id = -1, 583 + }; 584 + #endif 585 + 586 + #if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) 587 + static struct platform_device bfin_tdm_pcm = { 588 + .name = "bfin-tdm-pcm-audio", 589 + .id = -1, 590 + }; 591 + #endif 592 + 593 + #if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 594 + static struct platform_device bfin_ac97_pcm = { 595 + .name = "bfin-ac97-pcm-audio", 545 596 .id = -1, 546 597 }; 547 598 #endif ··· 586 605 }; 587 606 #endif 588 607 589 - #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 590 - static struct bfin5xx_spi_chip lq035q1_spi_chip_info = { 591 - .enable_dma = 0, 592 - .bits_per_word = 8, 593 - }; 594 - #endif 595 - 596 608 static struct spi_board_info bfin_spi_board_info[] __initdata = { 597 609 #if defined(CONFIG_MTD_M25P80) \ 598 610 || defined(CONFIG_MTD_M25P80_MODULE) ··· 601 627 }, 602 628 #endif 603 629 604 - #if defined(CONFIG_BFIN_SPI_ADC) \ 605 - || defined(CONFIG_BFIN_SPI_ADC_MODULE) 606 - { 607 - .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ 608 - .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ 609 - .bus_num = 0, /* Framework bus number */ 610 - .chip_select = 1, /* Framework chip select. */ 611 - .platform_data = NULL, /* No spi_driver specific config */ 612 - .controller_data = &spi_adc_chip_info, 613 - }, 614 - #endif 615 - 616 630 #if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ 617 631 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 618 632 { ··· 609 647 .bus_num = 0, 610 648 .chip_select = 4, 611 649 .platform_data = "ad1836", 612 - .controller_data = &ad1836_spi_chip_info, 613 650 .mode = SPI_MODE_3, 614 651 }, 615 652 #endif ··· 631 670 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ 632 671 .bus_num = 0, 633 672 .chip_select = 2, 634 - .controller_data = &spi_ad7877_chip_info, 635 673 }, 636 674 #endif 637 675 #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) ··· 641 681 .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ 642 682 .bus_num = 0, 643 683 .chip_select = 3, 644 - .controller_data = &spi_ad7879_chip_info, 645 684 .mode = SPI_CPHA | SPI_CPOL, 646 685 }, 647 686 #endif ··· 650 691 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 651 692 .bus_num = 0, 652 693 .chip_select = 1, 653 - .controller_data = &spidev_chip_info, 654 694 }, 655 695 #endif 656 696 #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) ··· 658 700 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ 659 701 .bus_num = 0, 660 702 .chip_select = 7, 661 - .controller_data = &lq035q1_spi_chip_info, 662 703 .mode = SPI_CPHA | SPI_CPOL, 663 704 }, 664 705 #endif ··· 1233 1276 &ezkit_flash_device, 1234 1277 #endif 1235 1278 1236 - #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \ 1237 - defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) 1238 - &bfin_pcm, 1279 + #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 1280 + &bfin_i2s_pcm, 1281 + #endif 1282 + 1283 + #if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) 1284 + &bfin_tdm_pcm, 1285 + #endif 1286 + 1287 + #if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 1288 + &bfin_ac97_pcm, 1239 1289 #endif 1240 1290 1241 1291 #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
-70
arch/blackfin/mach-bf527/boards/tll6527m.c
··· 314 314 /* SPI flash chip (m25p64) */ 315 315 static struct bfin5xx_spi_chip spi_flash_chip_info = { 316 316 .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 317 }; 334 318 #endif 335 319 336 320 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 337 321 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 338 322 .enable_dma = 0, 339 - .bits_per_word = 8, 340 323 }; 341 324 #endif 342 325 ··· 342 359 }; 343 360 #endif 344 361 345 - #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) \ 346 - || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) 347 - static struct bfin5xx_spi_chip spi_ad7879_chip_info = { 348 - .enable_dma = 0, 349 - .bits_per_word = 16, 350 - }; 351 - #endif 352 - 353 - #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 354 - static struct bfin5xx_spi_chip spidev_chip_info = { 355 - .enable_dma = 0, 356 - .bits_per_word = 8, 357 - }; 358 - #endif 359 - 360 362 #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 361 363 static struct platform_device bfin_i2s = { 362 364 .name = "bfin-i2s", ··· 350 382 }; 351 383 #endif 352 384 353 - #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 354 - static struct bfin5xx_spi_chip lq035q1_spi_chip_info = { 355 - .enable_dma = 0, 356 - .bits_per_word = 8, 357 - }; 358 - #endif 359 - 360 385 #if defined(CONFIG_GPIO_MCP23S08) || defined(CONFIG_GPIO_MCP23S08_MODULE) 361 - static struct bfin5xx_spi_chip spi_mcp23s08_sys_chip_info = { 362 - .enable_dma = 0, 363 - .bits_per_word = 8, 364 - }; 365 - 366 - static struct bfin5xx_spi_chip spi_mcp23s08_usr_chip_info = { 367 - .enable_dma = 0, 368 - .bits_per_word = 8, 369 - }; 370 - 371 386 #include <linux/spi/mcp23s08.h> 372 387 static const struct mcp23s08_platform_data bfin_mcp23s08_sys_gpio_info = { 373 388 .chip[0].is_present = true, ··· 380 429 }, 381 430 #endif 382 431 383 - #if defined(CONFIG_BFIN_SPI_ADC) 384 - || defined(CONFIG_BFIN_SPI_ADC_MODULE) 385 - { 386 - .modalias = "bfin_spi_adc", 387 - /* Name of spi_driver for this device */ 388 - .max_speed_hz = 10000000, 389 - /* max spi clock (SCK) speed in HZ */ 390 - .bus_num = 0, /* Framework bus number */ 391 - .chip_select = EXP_GPIO_SPISEL_BASE + 0x04 + MAX_CTRL_CS, 392 - /* Framework chip select. */ 393 - .platform_data = NULL, /* No spi_driver specific config */ 394 - .controller_data = &spi_adc_chip_info, 395 - .mode = SPI_MODE_0, 396 - }, 397 - #endif 398 - 399 432 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 400 433 { 401 434 .modalias = "mmc_spi", ··· 405 470 /* max spi clock (SCK) speed in HZ */ 406 471 .bus_num = 0, 407 472 .chip_select = EXP_GPIO_SPISEL_BASE + 0x07 + MAX_CTRL_CS, 408 - .controller_data = &spi_ad7879_chip_info, 409 473 .mode = SPI_CPHA | SPI_CPOL, 410 474 }, 411 475 #endif ··· 416 482 .bus_num = 0, 417 483 .chip_select = EXP_GPIO_SPISEL_BASE + 0x03 + MAX_CTRL_CS, 418 484 .mode = SPI_CPHA | SPI_CPOL, 419 - .controller_data = &spidev_chip_info, 420 485 }, 421 486 #endif 422 487 #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) ··· 424 491 .max_speed_hz = 20000000, 425 492 .bus_num = 0, 426 493 .chip_select = EXP_GPIO_SPISEL_BASE + 0x06 + MAX_CTRL_CS, 427 - .controller_data = &lq035q1_spi_chip_info, 428 494 .mode = SPI_CPHA | SPI_CPOL, 429 495 }, 430 496 #endif ··· 434 502 .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ 435 503 .bus_num = 0, 436 504 .chip_select = EXP_GPIO_SPISEL_BASE + 0x01 + MAX_CTRL_CS, 437 - .controller_data = &spi_mcp23s08_sys_chip_info, 438 505 .mode = SPI_CPHA | SPI_CPOL, 439 506 }, 440 507 { ··· 442 511 .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ 443 512 .bus_num = 0, 444 513 .chip_select = EXP_GPIO_SPISEL_BASE + 0x02 + MAX_CTRL_CS, 445 - .controller_data = &spi_mcp23s08_usr_chip_info, 446 514 .mode = SPI_CPHA | SPI_CPOL, 447 515 }, 448 516 #endif
+21 -13
arch/blackfin/mach-bf527/include/mach/anomaly.h
··· 11 11 */ 12 12 13 13 /* This file should be up to date with: 14 - * - Revision E, 03/15/2010; ADSP-BF526 Blackfin Processor Anomaly List 15 - * - Revision H, 04/29/2010; ADSP-BF527 Blackfin Processor Anomaly List 14 + * - Revision F, 05/23/2011; ADSP-BF526 Blackfin Processor Anomaly List 15 + * - Revision I, 05/23/2011; ADSP-BF527 Blackfin Processor Anomaly List 16 16 */ 17 17 18 18 #ifndef _MACH_ANOMALY_H_ ··· 57 57 /* Incorrect Access of OTP_STATUS During otp_write() Function */ 58 58 #define ANOMALY_05000328 (_ANOMALY_BF527(< 2)) 59 59 /* Host DMA Boot Modes Are Not Functional */ 60 - #define ANOMALY_05000330 (__SILICON_REVISION__ < 2) 60 + #define ANOMALY_05000330 (_ANOMALY_BF527(< 2)) 61 61 /* Disallowed Configuration Prevents Subsequent Allowed Configuration on Host DMA Port */ 62 62 #define ANOMALY_05000337 (_ANOMALY_BF527(< 2)) 63 63 /* Ethernet MAC MDIO Reads Do Not Meet IEEE Specification */ ··· 135 135 /* Incorrect Default Internal Voltage Regulator Setting */ 136 136 #define ANOMALY_05000410 (_ANOMALY_BF527(< 2)) 137 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 139 /* OTP_CHECK_FOR_PREV_WRITE Bit is Not Functional in bfrom_OtpWrite() API */ 140 140 #define ANOMALY_05000414 (_ANOMALY_BF526_BF527(< 1, < 2)) 141 141 /* DEB2_URGENT Bit Not Functional */ ··· 181 181 /* IFLUSH Instruction at End of Hardware Loop Causes Infinite Stall */ 182 182 #define ANOMALY_05000443 (1) 183 183 /* The WURESET Bit in the SYSCR Register is not Functional */ 184 - #define ANOMALY_05000445 (1) 185 - /* USB DMA Mode 1 Short Packet Data Corruption */ 184 + #define ANOMALY_05000445 (_ANOMALY_BF527(>= 0)) 185 + /* USB DMA Short Packet Data Corruption */ 186 186 #define ANOMALY_05000450 (1) 187 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 189 /* Incorrect Default Hysteresis Setting for RESET, NMI, and BMODE Signals */ 190 190 #define ANOMALY_05000452 (_ANOMALY_BF526_BF527(< 1, >= 0)) 191 191 /* USB Receive Interrupt Is Not Generated in DMA Mode 1 */ ··· 198 198 #define ANOMALY_05000461 (1) 199 199 /* Synchronization Problem at Startup May Cause SPORT Transmit Channels to Misalign */ 200 200 #define ANOMALY_05000462 (1) 201 - /* USB Rx DMA hang */ 201 + /* USB Rx DMA Hang */ 202 202 #define ANOMALY_05000465 (1) 203 203 /* TxPktRdy Bit Not Set for Transmit Endpoint When Core and DMA Access USB Endpoint FIFOs Simultaneously */ 204 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 206 #define ANOMALY_05000467 (1) 207 207 /* PLL Latches Incorrect Settings During Reset */ 208 208 #define ANOMALY_05000469 (1) 209 209 /* Incorrect Default MSEL Value in PLL_CTL */ 210 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 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 214 #define ANOMALY_05000475 (1) 215 215 /* TESTSET Instruction Cannot Be Interrupted */ 216 216 #define ANOMALY_05000477 (1) ··· 219 219 /* Possible USB Data Corruption When Multiple Endpoints Are Accessed by the Core */ 220 220 #define ANOMALY_05000483 (1) 221 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 223 /* The CODEC Zero-Cross Detect Feature is not Functional */ 224 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 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 236 /* Anomalies that don't exist on this proc */ 229 237 #define ANOMALY_05000099 (0)
-28
arch/blackfin/mach-bf533/boards/H8606.c
··· 159 159 /* SPI flash chip (m25p64) */ 160 160 static struct bfin5xx_spi_chip spi_flash_chip_info = { 161 161 .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 162 }; 179 163 #endif 180 164 ··· 179 195 }, 180 196 #endif 181 197 182 - #if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE) 183 - { 184 - .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ 185 - .max_speed_hz = 4, /* actual baudrate is SCLK/(2xspeed_hz) */ 186 - .bus_num = 1, /* Framework bus number */ 187 - .chip_select = 1, /* Framework chip select. */ 188 - .platform_data = NULL, /* No spi_driver specific config */ 189 - .controller_data = &spi_adc_chip_info, 190 - }, 191 - #endif 192 - 193 198 #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 194 199 { 195 200 .modalias = "ad183x", 196 201 .max_speed_hz = 16, 197 202 .bus_num = 1, 198 203 .chip_select = 4, 199 - .controller_data = &ad1836_spi_chip_info, 200 204 }, 201 205 #endif 202 206
-10
arch/blackfin/mach-bf533/boards/blackstamp.c
··· 102 102 /* SPI flash chip (m25p64) */ 103 103 static struct bfin5xx_spi_chip spi_flash_chip_info = { 104 104 .enable_dma = 0, /* use dma transfer with this chip*/ 105 - .bits_per_word = 8, 106 105 }; 107 106 #endif 108 107 109 108 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 110 109 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 111 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 112 #endif 122 113 ··· 142 151 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 143 152 .bus_num = 0, 144 153 .chip_select = 7, 145 - .controller_data = &spidev_chip_info, 146 154 }, 147 155 #endif 148 156 };
-29
arch/blackfin/mach-bf533/boards/cm_bf533.c
··· 59 59 /* SPI flash chip (m25p64) */ 60 60 static struct bfin5xx_spi_chip spi_flash_chip_info = { 61 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 63 #endif 80 64 81 65 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 82 66 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 83 67 .enable_dma = 0, 84 - .bits_per_word = 8, 85 68 }; 86 69 #endif 87 70 ··· 82 99 }, 83 100 #endif 84 101 85 - #if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE) 86 - { 87 - .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ 88 - .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ 89 - .bus_num = 0, /* Framework bus number */ 90 - .chip_select = 2, /* Framework chip select. */ 91 - .platform_data = NULL, /* No spi_driver specific config */ 92 - .controller_data = &spi_adc_chip_info, 93 - }, 94 - #endif 95 - 96 102 #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 97 103 { 98 104 .modalias = "ad183x", 99 105 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 100 106 .bus_num = 0, 101 107 .chip_select = 4, 102 - .controller_data = &ad1836_spi_chip_info, 103 108 }, 104 109 #endif 105 110
-36
arch/blackfin/mach-bf533/boards/ezkit.c
··· 210 210 /* SPI flash chip (m25p64) */ 211 211 static struct bfin5xx_spi_chip spi_flash_chip_info = { 212 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 214 #endif 238 215 ··· 227 250 }, 228 251 #endif 229 252 230 - #if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE) 231 - { 232 - .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ 233 - .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ 234 - .bus_num = 0, /* Framework bus number */ 235 - .chip_select = 1, /* Framework chip select. */ 236 - .platform_data = NULL, /* No spi_driver specific config */ 237 - .controller_data = &spi_adc_chip_info, 238 - }, 239 - #endif 240 - 241 253 #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 242 254 { 243 255 .modalias = "ad183x", 244 256 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 245 257 .bus_num = 0, 246 258 .chip_select = 4, 247 - .controller_data = &ad1836_spi_chip_info, 248 259 }, 249 260 #endif 250 261 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) ··· 241 276 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 242 277 .bus_num = 0, 243 278 .chip_select = 1, 244 - .controller_data = &spidev_chip_info, 245 279 }, 246 280 #endif 247 281 };
-1
arch/blackfin/mach-bf533/boards/ip0x.c
··· 110 110 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 111 111 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 112 112 .enable_dma = 0, /* if 1 - block!!! */ 113 - .bits_per_word = 8, 114 113 }; 115 114 #endif 116 115
+41 -37
arch/blackfin/mach-bf533/boards/stamp.c
··· 80 80 .end = 0x20300000 + 0x100, 81 81 .flags = IORESOURCE_MEM, 82 82 }, { 83 + .start = 1, 84 + .flags = IORESOURCE_BUS, 85 + }, { 83 86 .start = IRQ_PF10, 84 87 .end = IRQ_PF10, 85 88 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, ··· 175 172 /* SPI flash chip (m25p64) */ 176 173 static struct bfin5xx_spi_chip spi_flash_chip_info = { 177 174 .enable_dma = 0, /* use dma transfer with this chip*/ 178 - .bits_per_word = 8, 179 - }; 180 - #endif 181 - 182 - #if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE) 183 - /* SPI ADC chip */ 184 - static struct bfin5xx_spi_chip spi_adc_chip_info = { 185 - .enable_dma = 1, /* use dma transfer with this chip*/ 186 - .bits_per_word = 16, 187 - }; 188 - #endif 189 - 190 - #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 191 - static struct bfin5xx_spi_chip ad1836_spi_chip_info = { 192 - .enable_dma = 0, 193 - .bits_per_word = 16, 194 - }; 195 - #endif 196 - 197 - #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 198 - static struct bfin5xx_spi_chip spidev_chip_info = { 199 - .enable_dma = 0, 200 - .bits_per_word = 8, 201 175 }; 202 176 #endif 203 177 ··· 201 221 202 222 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 203 223 .enable_dma = 0, 204 - .bits_per_word = 8, 205 224 .pio_interrupt = 0, 206 225 }; 207 226 #endif ··· 219 240 }, 220 241 #endif 221 242 222 - #if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE) 223 - { 224 - .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ 225 - .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ 226 - .bus_num = 0, /* Framework bus number */ 227 - .chip_select = 1, /* Framework chip select. */ 228 - .platform_data = NULL, /* No spi_driver specific config */ 229 - .controller_data = &spi_adc_chip_info, 230 - }, 231 - #endif 232 - 233 243 #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 234 244 { 235 245 .modalias = "ad183x", ··· 226 258 .bus_num = 0, 227 259 .chip_select = 4, 228 260 .platform_data = "ad1836", /* only includes chip name for the moment */ 229 - .controller_data = &ad1836_spi_chip_info, 230 261 .mode = SPI_MODE_3, 231 262 }, 232 263 #endif ··· 236 269 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 237 270 .bus_num = 0, 238 271 .chip_select = 1, 239 - .controller_data = &spidev_chip_info, 240 272 }, 241 273 #endif 242 274 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) ··· 625 659 #endif 626 660 }; 627 661 662 + static int __init net2272_init(void) 663 + { 664 + #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 665 + int ret; 666 + 667 + /* Set PF0 to 0, PF1 to 1 make /AMS3 work properly */ 668 + ret = gpio_request(GPIO_PF0, "net2272"); 669 + if (ret) 670 + return ret; 671 + 672 + ret = gpio_request(GPIO_PF1, "net2272"); 673 + if (ret) { 674 + gpio_free(GPIO_PF0); 675 + return ret; 676 + } 677 + 678 + ret = gpio_request(GPIO_PF11, "net2272"); 679 + if (ret) { 680 + gpio_free(GPIO_PF0); 681 + gpio_free(GPIO_PF1); 682 + return ret; 683 + } 684 + 685 + gpio_direction_output(GPIO_PF0, 0); 686 + gpio_direction_output(GPIO_PF1, 1); 687 + 688 + /* Reset the USB chip */ 689 + gpio_direction_output(GPIO_PF11, 0); 690 + mdelay(2); 691 + gpio_set_value(GPIO_PF11, 1); 692 + #endif 693 + 694 + return 0; 695 + } 696 + 628 697 static int __init stamp_init(void) 629 698 { 630 699 int ret; ··· 685 684 gpio_free(GPIO_PF0); 686 685 } 687 686 #endif 687 + 688 + if (net2272_init()) 689 + pr_warning("unable to configure net2272; it probably won't work\n"); 688 690 689 691 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 690 692 return 0;
+13 -6
arch/blackfin/mach-bf533/include/mach/anomaly.h
··· 11 11 */ 12 12 13 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 17 #ifndef _MACH_ANOMALY_H_ ··· 152 152 #define ANOMALY_05000277 (__SILICON_REVISION__ < 6) 153 153 /* Disabling Peripherals with DMA Running May Cause DMA System Instability */ 154 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 156 #define ANOMALY_05000281 (__SILICON_REVISION__ < 6) 157 157 /* Memory DMA Corruption with 32-Bit Data and Traffic Control */ 158 158 #define ANOMALY_05000282 (__SILICON_REVISION__ < 6) ··· 210 210 #define ANOMALY_05000462 (1) 211 211 /* Boot Failure When SDRAM Control Signals Toggle Coming Out Of Reset */ 212 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 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 216 #define ANOMALY_05000475 (1) 217 217 /* TESTSET Instruction Cannot Be Interrupted */ 218 218 #define ANOMALY_05000477 (1) 219 219 /* Reads of ITEST_COMMAND and ITEST_DATA Registers Cause Cache Corruption */ 220 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 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 232 * here to show running on older silicon just isn't feasible. 226 233 */ 227 234
+22 -29
arch/blackfin/mach-bf537/boards/cm_bf537e.c
··· 61 61 /* SPI flash chip (m25p64) */ 62 62 static struct bfin5xx_spi_chip spi_flash_chip_info = { 63 63 .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 64 }; 81 65 #endif 82 66 83 67 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 84 68 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 85 69 .enable_dma = 0, 86 - .bits_per_word = 8, 87 70 }; 88 71 #endif 89 72 ··· 84 101 }, 85 102 #endif 86 103 87 - #if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE) 88 - { 89 - .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ 90 - .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ 91 - .bus_num = 0, /* Framework bus number */ 92 - .chip_select = 1, /* Framework chip select. */ 93 - .platform_data = NULL, /* No spi_driver specific config */ 94 - .controller_data = &spi_adc_chip_info, 95 - }, 96 - #endif 97 - 98 104 #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 99 105 { 100 106 .modalias = "ad183x", 101 107 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 102 108 .bus_num = 0, 103 109 .chip_select = 4, 104 - .controller_data = &ad1836_spi_chip_info, 105 110 }, 106 111 #endif 107 112 ··· 737 766 #endif 738 767 }; 739 768 769 + static int __init net2272_init(void) 770 + { 771 + #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 772 + int ret; 773 + 774 + ret = gpio_request(GPIO_PG14, "net2272"); 775 + if (ret) 776 + return ret; 777 + 778 + /* Reset USB Chip, PG14 */ 779 + gpio_direction_output(GPIO_PG14, 0); 780 + mdelay(2); 781 + gpio_set_value(GPIO_PG14, 1); 782 + #endif 783 + 784 + return 0; 785 + } 786 + 740 787 static int __init cm_bf537e_init(void) 741 788 { 742 789 printk(KERN_INFO "%s(): registering device resources\n", __func__); ··· 766 777 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 767 778 irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); 768 779 #endif 780 + 781 + if (net2272_init()) 782 + pr_warning("unable to configure net2272; it probably won't work\n"); 783 + 769 784 return 0; 770 785 } 771 786
+34 -29
arch/blackfin/mach-bf537/boards/cm_bf537u.c
··· 62 62 /* SPI flash chip (m25p64) */ 63 63 static struct bfin5xx_spi_chip spi_flash_chip_info = { 64 64 .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 65 }; 82 66 #endif 83 67 84 68 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 85 69 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 86 70 .enable_dma = 0, 87 - .bits_per_word = 8, 88 71 }; 89 72 #endif 90 73 ··· 85 102 }, 86 103 #endif 87 104 88 - #if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE) 89 - { 90 - .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ 91 - .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ 92 - .bus_num = 0, /* Framework bus number */ 93 - .chip_select = 1, /* Framework chip select. */ 94 - .platform_data = NULL, /* No spi_driver specific config */ 95 - .controller_data = &spi_adc_chip_info, 96 - }, 97 - #endif 98 - 99 105 #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 100 106 { 101 107 .modalias = "ad183x", 102 108 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 103 109 .bus_num = 0, 104 110 .chip_select = 4, 105 - .controller_data = &ad1836_spi_chip_info, 106 111 }, 107 112 #endif 108 113 ··· 702 731 #endif 703 732 }; 704 733 734 + static int __init net2272_init(void) 735 + { 736 + #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 737 + int ret; 738 + 739 + ret = gpio_request(GPIO_PH15, driver_name); 740 + if (ret) 741 + return ret; 742 + 743 + ret = gpio_request(GPIO_PH13, "net2272"); 744 + if (ret) { 745 + gpio_free(GPIO_PH15); 746 + return ret; 747 + } 748 + 749 + /* Set PH15 Low make /AMS2 work properly */ 750 + gpio_direction_output(GPIO_PH15, 0); 751 + 752 + /* enable CLKBUF output */ 753 + bfin_write_VR_CTL(bfin_read_VR_CTL() | CLKBUFOE); 754 + 755 + /* Reset the USB chip */ 756 + gpio_direction_output(GPIO_PH13, 0); 757 + mdelay(2); 758 + gpio_set_value(GPIO_PH13, 1); 759 + #endif 760 + 761 + return 0; 762 + } 763 + 705 764 static int __init cm_bf537u_init(void) 706 765 { 707 766 printk(KERN_INFO "%s(): registering device resources\n", __func__); ··· 743 742 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 744 743 irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); 745 744 #endif 745 + 746 + if (net2272_init()) 747 + pr_warning("unable to configure net2272; it probably won't work\n"); 748 + 746 749 return 0; 747 750 } 748 751
-2
arch/blackfin/mach-bf537/boards/dnp5370.c
··· 130 130 131 131 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 132 132 .enable_dma = 0, /* use no dma transfer with this chip*/ 133 - .bits_per_word = 8, 134 133 }; 135 134 136 135 #endif ··· 160 161 161 162 static struct bfin5xx_spi_chip spi_dataflash_chip_info = { 162 163 .enable_dma = 0, /* use no dma transfer with this chip*/ 163 - .bits_per_word = 8, 164 164 }; 165 165 #endif 166 166
-2
arch/blackfin/mach-bf537/boards/minotaur.c
··· 159 159 /* SPI flash chip (m25p64) */ 160 160 static struct bfin5xx_spi_chip spi_flash_chip_info = { 161 161 .enable_dma = 0, /* use dma transfer with this chip*/ 162 - .bits_per_word = 8, 163 162 }; 164 163 #endif 165 164 166 165 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 167 166 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 168 167 .enable_dma = 0, 169 - .bits_per_word = 8, 170 168 }; 171 169 #endif 172 170
-38
arch/blackfin/mach-bf537/boards/pnav10.c
··· 184 184 /* SPI flash chip (m25p64) */ 185 185 static struct bfin5xx_spi_chip spi_flash_chip_info = { 186 186 .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 187 }; 206 188 #endif 207 189 208 190 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 209 191 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 210 192 .enable_dma = 0, 211 - .bits_per_word = 8, 212 193 }; 213 194 #endif 214 195 215 196 #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 197 static const struct ad7877_platform_data bfin_ad7877_ts_info = { 222 198 .model = 7877, 223 199 .vref_delay_usecs = 50, /* internal, no capacitor */ ··· 224 248 }, 225 249 #endif 226 250 227 - #if defined(CONFIG_BFIN_SPI_ADC) \ 228 - || defined(CONFIG_BFIN_SPI_ADC_MODULE) 229 - { 230 - .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ 231 - .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ 232 - .bus_num = 0, /* Framework bus number */ 233 - .chip_select = 1, /* Framework chip select. */ 234 - .platform_data = NULL, /* No spi_driver specific config */ 235 - .controller_data = &spi_adc_chip_info, 236 - }, 237 - #endif 238 - 239 251 #if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ 240 252 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 241 253 { ··· 231 267 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 232 268 .bus_num = 0, 233 269 .chip_select = 4, 234 - .controller_data = &ad1836_spi_chip_info, 235 270 }, 236 271 #endif 237 272 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) ··· 251 288 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ 252 289 .bus_num = 0, 253 290 .chip_select = 5, 254 - .controller_data = &spi_ad7877_chip_info, 255 291 }, 256 292 #endif 257 293
+52 -124
arch/blackfin/mach-bf537/boards/stamp.c
··· 367 367 .end = 0x20300000 + 0x100, 368 368 .flags = IORESOURCE_MEM, 369 369 }, { 370 + .start = 1, 371 + .flags = IORESOURCE_BUS, 372 + }, { 370 373 .start = IRQ_PF7, 371 374 .end = IRQ_PF7, 372 375 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, ··· 536 533 /* SPI flash chip (m25p64) */ 537 534 static struct bfin5xx_spi_chip spi_flash_chip_info = { 538 535 .enable_dma = 0, /* use dma transfer with this chip*/ 539 - .bits_per_word = 8, 540 - }; 541 - #endif 542 - 543 - #if defined(CONFIG_BFIN_SPI_ADC) \ 544 - || defined(CONFIG_BFIN_SPI_ADC_MODULE) 545 - /* SPI ADC chip */ 546 - static struct bfin5xx_spi_chip spi_adc_chip_info = { 547 - .enable_dma = 1, /* use dma transfer with this chip*/ 548 - .bits_per_word = 16, 549 - }; 550 - #endif 551 - 552 - #if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ 553 - || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 554 - static struct bfin5xx_spi_chip ad1836_spi_chip_info = { 555 - .enable_dma = 0, 556 - .bits_per_word = 16, 557 - }; 558 - #endif 559 - 560 - #if defined(CONFIG_SND_BF5XX_SOC_AD193X) \ 561 - || defined(CONFIG_SND_BF5XX_SOC_AD193X_MODULE) 562 - static struct bfin5xx_spi_chip ad1938_spi_chip_info = { 563 - .enable_dma = 0, 564 - .bits_per_word = 8, 565 - }; 566 - #endif 567 - 568 - #if defined(CONFIG_SND_BF5XX_SOC_ADAV80X) \ 569 - || defined(CONFIG_SND_BF5XX_SOC_ADAV80X_MODULE) 570 - static struct bfin5xx_spi_chip adav801_spi_chip_info = { 571 - .enable_dma = 0, 572 - .bits_per_word = 8, 573 536 }; 574 537 #endif 575 538 576 539 #if defined(CONFIG_INPUT_AD714X_SPI) || defined(CONFIG_INPUT_AD714X_SPI_MODULE) 577 540 #include <linux/input/ad714x.h> 578 - static struct bfin5xx_spi_chip ad7147_spi_chip_info = { 579 - .enable_dma = 0, 580 - .bits_per_word = 16, 581 - }; 582 541 583 542 static struct ad714x_slider_plat ad7147_spi_slider_plat[] = { 584 543 { ··· 650 685 #if defined(CONFIG_AD2S90) || defined(CONFIG_AD2S90_MODULE) 651 686 static struct bfin5xx_spi_chip ad2s90_spi_chip_info = { 652 687 .enable_dma = 0, 653 - .bits_per_word = 16, 654 688 }; 655 689 #endif 656 690 ··· 661 697 662 698 static struct bfin5xx_spi_chip ad2s120x_spi_chip_info = { 663 699 .enable_dma = 0, 664 - .bits_per_word = 16, 665 700 }; 666 701 #endif 667 702 ··· 677 714 678 715 static struct bfin5xx_spi_chip ad2s1210_spi_chip_info = { 679 716 .enable_dma = 0, 680 - .bits_per_word = 8, 681 717 }; 682 718 #endif 683 719 684 720 #if defined(CONFIG_AD7314) || defined(CONFIG_AD7314_MODULE) 685 721 static struct bfin5xx_spi_chip ad7314_spi_chip_info = { 686 722 .enable_dma = 0, 687 - .bits_per_word = 16, 688 723 }; 689 724 #endif 690 725 ··· 696 735 697 736 static struct bfin5xx_spi_chip ad7816_spi_chip_info = { 698 737 .enable_dma = 0, 699 - .bits_per_word = 8, 700 738 }; 701 739 #endif 702 740 ··· 709 749 710 750 static struct bfin5xx_spi_chip adt7310_spi_chip_info = { 711 751 .enable_dma = 0, 712 - .bits_per_word = 8, 713 752 }; 714 753 #endif 715 754 ··· 716 757 static unsigned short ad7298_platform_data[] = { 717 758 GPIO_PF7, /* busy_pin */ 718 759 0, 719 - }; 720 - 721 - static struct bfin5xx_spi_chip ad7298_spi_chip_info = { 722 - .enable_dma = 0, 723 - .bits_per_word = 16, 724 760 }; 725 761 #endif 726 762 ··· 727 773 728 774 static struct bfin5xx_spi_chip adt7316_spi_chip_info = { 729 775 .enable_dma = 0, 730 - .bits_per_word = 8, 731 776 }; 732 777 #endif 733 778 ··· 753 800 754 801 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 755 802 .enable_dma = 0, 756 - .bits_per_word = 8, 757 803 .pio_interrupt = 0, 758 804 }; 759 805 #endif 760 806 761 807 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 762 808 #include <linux/spi/ad7877.h> 763 - static struct bfin5xx_spi_chip spi_ad7877_chip_info = { 764 - .enable_dma = 0, 765 - .bits_per_word = 16, 766 - }; 767 - 768 809 static const struct ad7877_platform_data bfin_ad7877_ts_info = { 769 810 .model = 7877, 770 811 .vref_delay_usecs = 50, /* internal, no capacitor */ ··· 830 883 }; 831 884 #endif 832 885 833 - #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) 834 - static struct bfin5xx_spi_chip spi_ad7879_chip_info = { 835 - .enable_dma = 0, 836 - .bits_per_word = 16, 837 - }; 838 - #endif 839 - 840 - #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 841 - static struct bfin5xx_spi_chip spidev_chip_info = { 842 - .enable_dma = 0, 843 - .bits_per_word = 8, 844 - }; 845 - #endif 846 - 847 - #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 848 - static struct bfin5xx_spi_chip lq035q1_spi_chip_info = { 849 - .enable_dma = 0, 850 - .bits_per_word = 8, 851 - }; 852 - #endif 853 - 854 886 #if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE) 855 887 static struct bfin5xx_spi_chip enc28j60_spi_chip_info = { 856 888 .enable_dma = 1, 857 - .bits_per_word = 8, 858 889 }; 859 890 #endif 860 891 861 892 #if defined(CONFIG_ADF702X) || defined(CONFIG_ADF702X_MODULE) 862 - static struct bfin5xx_spi_chip adf7021_spi_chip_info = { 863 - .bits_per_word = 16, 864 - }; 865 - 866 893 #include <linux/spi/adf702x.h> 867 894 #define TXREG 0x0160A470 868 895 static const u32 adf7021_regs[] = { ··· 880 959 881 960 #if defined(CONFIG_TOUCHSCREEN_ADS7846) || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) 882 961 #include <linux/spi/ads7846.h> 883 - static struct bfin5xx_spi_chip ad7873_spi_chip_info = { 884 - .bits_per_word = 8, 885 - }; 886 - 887 962 static int ads7873_get_pendown_state(void) 888 963 { 889 964 return gpio_get_value(GPIO_PF6); ··· 926 1009 /* DataFlash chip */ 927 1010 static struct bfin5xx_spi_chip data_flash_chip_info = { 928 1011 .enable_dma = 0, /* use dma transfer with this chip*/ 929 - .bits_per_word = 8, 930 - }; 931 - #endif 932 - 933 - #if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE) 934 - static struct bfin5xx_spi_chip spi_adxl34x_chip_info = { 935 - .enable_dma = 0, /* use dma transfer with this chip*/ 936 - .bits_per_word = 8, 937 1012 }; 938 1013 #endif 939 1014 940 1015 #if defined(CONFIG_AD7476) || defined(CONFIG_AD7476_MODULE) 941 1016 static struct bfin5xx_spi_chip spi_ad7476_chip_info = { 942 1017 .enable_dma = 0, /* use dma transfer with this chip*/ 943 - .bits_per_word = 8, 944 1018 }; 945 1019 #endif 946 1020 ··· 961 1053 .mode = SPI_MODE_3, 962 1054 }, 963 1055 #endif 964 - #if defined(CONFIG_BFIN_SPI_ADC) \ 965 - || defined(CONFIG_BFIN_SPI_ADC_MODULE) 966 - { 967 - .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ 968 - .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ 969 - .bus_num = 0, /* Framework bus number */ 970 - .chip_select = 1, /* Framework chip select. */ 971 - .platform_data = NULL, /* No spi_driver specific config */ 972 - .controller_data = &spi_adc_chip_info, 973 - }, 974 - #endif 975 1056 976 1057 #if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ 977 1058 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) ··· 970 1073 .bus_num = 0, 971 1074 .chip_select = 4, 972 1075 .platform_data = "ad1836", /* only includes chip name for the moment */ 973 - .controller_data = &ad1836_spi_chip_info, 974 1076 .mode = SPI_MODE_3, 975 1077 }, 976 1078 #endif ··· 980 1084 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 981 1085 .bus_num = 0, 982 1086 .chip_select = 5, 983 - .controller_data = &ad1938_spi_chip_info, 984 1087 .mode = SPI_MODE_3, 985 1088 }, 986 1089 #endif ··· 990 1095 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 991 1096 .bus_num = 0, 992 1097 .chip_select = 1, 993 - .controller_data = &adav801_spi_chip_info, 994 1098 .mode = SPI_MODE_3, 995 1099 }, 996 1100 #endif ··· 1003 1109 .chip_select = 5, 1004 1110 .mode = SPI_MODE_3, 1005 1111 .platform_data = &ad7147_spi_platform_data, 1006 - .controller_data = &ad7147_spi_chip_info, 1007 1112 }, 1008 1113 #endif 1009 1114 ··· 1081 1188 .bus_num = 0, 1082 1189 .chip_select = 4, /* CS, change it for your board */ 1083 1190 .platform_data = ad7298_platform_data, 1084 - .controller_data = &ad7298_spi_chip_info, 1085 1191 .mode = SPI_MODE_3, 1086 1192 }, 1087 1193 #endif ··· 1117 1225 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ 1118 1226 .bus_num = 0, 1119 1227 .chip_select = 1, 1120 - .controller_data = &spi_ad7877_chip_info, 1121 1228 }, 1122 1229 #endif 1123 1230 #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) ··· 1127 1236 .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ 1128 1237 .bus_num = 0, 1129 1238 .chip_select = 1, 1130 - .controller_data = &spi_ad7879_chip_info, 1131 1239 .mode = SPI_CPHA | SPI_CPOL, 1132 1240 }, 1133 1241 #endif ··· 1136 1246 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 1137 1247 .bus_num = 0, 1138 1248 .chip_select = 1, 1139 - .controller_data = &spidev_chip_info, 1140 1249 }, 1141 1250 #endif 1142 1251 #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) ··· 1144 1255 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ 1145 1256 .bus_num = 0, 1146 1257 .chip_select = 2, 1147 - .controller_data = &lq035q1_spi_chip_info, 1148 1258 .mode = SPI_CPHA | SPI_CPOL, 1149 1259 }, 1150 1260 #endif ··· 1166 1278 .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ 1167 1279 .bus_num = 0, 1168 1280 .chip_select = 2, 1169 - .controller_data = &spi_adxl34x_chip_info, 1170 1281 .mode = SPI_MODE_3, 1171 1282 }, 1172 1283 #endif ··· 1175 1288 .max_speed_hz = 16000000, /* max spi clock (SCK) speed in HZ */ 1176 1289 .bus_num = 0, 1177 1290 .chip_select = GPIO_PF10 + MAX_CTRL_CS, /* GPIO controlled SSEL */ 1178 - .controller_data = &adf7021_spi_chip_info, 1179 1291 .platform_data = &adf7021_platform_data, 1180 1292 .mode = SPI_MODE_0, 1181 1293 }, ··· 1186 1300 .bus_num = 0, 1187 1301 .irq = IRQ_PF6, 1188 1302 .chip_select = GPIO_PF10 + MAX_CTRL_CS, /* GPIO controlled SSEL */ 1189 - .controller_data = &ad7873_spi_chip_info, 1190 1303 .platform_data = &ad7873_pdata, 1191 1304 .mode = SPI_MODE_0, 1192 1305 }, ··· 2517 2632 BFIN_SND_RES(0), 2518 2633 BFIN_SND_RES(1), 2519 2634 }; 2635 + #endif 2520 2636 2521 - static struct platform_device bfin_pcm = { 2522 - .name = "bfin-pcm-audio", 2637 + #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 2638 + static struct platform_device bfin_i2s_pcm = { 2639 + .name = "bfin-i2s-pcm-audio", 2640 + .id = -1, 2641 + }; 2642 + #endif 2643 + 2644 + #if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) 2645 + static struct platform_device bfin_tdm_pcm = { 2646 + .name = "bfin-tdm-pcm-audio", 2647 + .id = -1, 2648 + }; 2649 + #endif 2650 + 2651 + #if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 2652 + static struct platform_device bfin_ac97_pcm = { 2653 + .name = "bfin-ac97-pcm-audio", 2523 2654 .id = -1, 2524 2655 }; 2525 2656 #endif ··· 2770 2869 &stamp_flash_device, 2771 2870 #endif 2772 2871 2773 - #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \ 2774 - defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) || \ 2775 - defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 2776 - &bfin_pcm, 2872 + #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 2873 + &bfin_i2s_pcm, 2874 + #endif 2875 + 2876 + #if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) 2877 + &bfin_tdm_pcm, 2878 + #endif 2879 + 2880 + #if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 2881 + &bfin_ac97_pcm, 2777 2882 #endif 2778 2883 2779 2884 #if defined(CONFIG_SND_BF5XX_SOC_AD73311) || defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE) ··· 2823 2916 #endif 2824 2917 }; 2825 2918 2919 + static int __init net2272_init(void) 2920 + { 2921 + #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 2922 + int ret; 2923 + 2924 + ret = gpio_request(GPIO_PF6, "net2272"); 2925 + if (ret) 2926 + return ret; 2927 + 2928 + /* Reset the USB chip */ 2929 + gpio_direction_output(GPIO_PF6, 0); 2930 + mdelay(2); 2931 + gpio_set_value(GPIO_PF6, 1); 2932 + #endif 2933 + 2934 + return 0; 2935 + } 2936 + 2826 2937 static int __init stamp_init(void) 2827 2938 { 2828 2939 printk(KERN_INFO "%s(): registering device resources\n", __func__); ··· 2850 2925 i2c_register_board_info(0, bfin_i2c_board_info, 2851 2926 ARRAY_SIZE(bfin_i2c_board_info)); 2852 2927 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 2928 + 2929 + if (net2272_init()) 2930 + pr_warning("unable to configure net2272; it probably won't work\n"); 2853 2931 2854 2932 return 0; 2855 2933 }
+22 -29
arch/blackfin/mach-bf537/boards/tcm_bf537.c
··· 62 62 /* SPI flash chip (m25p64) */ 63 63 static struct bfin5xx_spi_chip spi_flash_chip_info = { 64 64 .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 65 }; 82 66 #endif 83 67 84 68 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 85 69 static struct bfin5xx_spi_chip mmc_spi_chip_info = { 86 70 .enable_dma = 0, 87 - .bits_per_word = 8, 88 71 }; 89 72 #endif 90 73 ··· 85 102 }, 86 103 #endif 87 104 88 - #if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE) 89 - { 90 - .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ 91 - .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ 92 - .bus_num = 0, /* Framework bus number */ 93 - .chip_select = 1, /* Framework chip select. */ 94 - .platform_data = NULL, /* No spi_driver specific config */ 95 - .controller_data = &spi_adc_chip_info, 96 - }, 97 - #endif 98 - 99 105 #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 100 106 { 101 107 .modalias = "ad183x", 102 108 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 103 109 .bus_num = 0, 104 110 .chip_select = 4, 105 - .controller_data = &ad1836_spi_chip_info, 106 111 }, 107 112 #endif 108 113 ··· 704 733 #endif 705 734 }; 706 735 736 + static int __init net2272_init(void) 737 + { 738 + #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 739 + int ret; 740 + 741 + ret = gpio_request(GPIO_PG14, "net2272"); 742 + if (ret) 743 + return ret; 744 + 745 + /* Reset USB Chip, PG14 */ 746 + gpio_direction_output(GPIO_PG14, 0); 747 + mdelay(2); 748 + gpio_set_value(GPIO_PG14, 1); 749 + #endif 750 + 751 + return 0; 752 + } 753 + 707 754 static int __init tcm_bf537_init(void) 708 755 { 709 756 printk(KERN_INFO "%s(): registering device resources\n", __func__); ··· 733 744 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 734 745 irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); 735 746 #endif 747 + 748 + if (net2272_init()) 749 + pr_warning("unable to configure net2272; it probably won't work\n"); 750 + 736 751 return 0; 737 752 } 738 753
+23 -11
arch/blackfin/mach-bf537/include/mach/anomaly.h
··· 11 11 */ 12 12 13 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 17 #ifndef _MACH_ANOMALY_H_ ··· 44 44 #define ANOMALY_05000119 (1) 45 45 /* Rx.H Cannot Be Used to Access 16-bit System MMR Registers */ 46 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 47 /* PPI_DELAY Not Functional in PPI Modes with 0 Frame Syncs */ 50 48 #define ANOMALY_05000180 (1) 51 - /* Instruction Cache Is Not Functional */ 52 - #define ANOMALY_05000237 (__SILICON_REVISION__ < 2) 53 49 /* If I-Cache Is On, CSYNC/SSYNC/IDLE Around Change of Control Causes Failures */ 54 50 #define ANOMALY_05000244 (__SILICON_REVISION__ < 3) 55 51 /* False Hardware Error from an Access in the Shadow of a Conditional Branch */ 56 52 #define ANOMALY_05000245 (1) 57 - /* Buffered CLKIN Output Is Disabled by Default */ 58 - #define ANOMALY_05000247 (1) 59 53 /* Incorrect Bit Shift of Data Word in Multichannel (TDM) Mode in Certain Conditions */ 60 54 #define ANOMALY_05000250 (__SILICON_REVISION__ < 3) 61 55 /* EMAC TX DMA Error After an Early Frame Abort */ ··· 92 98 #define ANOMALY_05000278 (((ANOMALY_BF536 || ANOMALY_BF537) && __SILICON_REVISION__ < 3) || (ANOMALY_BF534 && __SILICON_REVISION__ < 2)) 93 99 /* SPI Master Boot Mode Does Not Work Well with Atmel Data Flash Devices */ 94 100 #define ANOMALY_05000280 (1) 95 - /* False Hardware Error Exception when ISR Context Is Not Restored */ 101 + /* False Hardware Error when ISR Context Is Not Restored */ 96 102 #define ANOMALY_05000281 (__SILICON_REVISION__ < 3) 97 103 /* Memory DMA Corruption with 32-Bit Data and Traffic Control */ 98 104 #define ANOMALY_05000282 (__SILICON_REVISION__ < 3) ··· 156 162 #define ANOMALY_05000461 (1) 157 163 /* Synchronization Problem at Startup May Cause SPORT Transmit Channels to Misalign */ 158 164 #define ANOMALY_05000462 (1) 159 - /* Interrupted 32-Bit SPORT Data Register Access Results In Underflow */ 165 + /* Interrupted SPORT Receive Data Register Read Results In Underflow when SLEN > 15 */ 160 166 #define ANOMALY_05000473 (1) 161 - /* Possible Lockup Condition whem Modifying PLL from External Memory */ 167 + /* Possible Lockup Condition when Modifying PLL from External Memory */ 162 168 #define ANOMALY_05000475 (1) 163 169 /* TESTSET Instruction Cannot Be Interrupted */ 164 170 #define ANOMALY_05000477 (1) ··· 166 172 #define ANOMALY_05000480 (__SILICON_REVISION__ < 3) 167 173 /* Reads of ITEST_COMMAND and ITEST_DATA Registers Cause Cache Corruption */ 168 174 #define ANOMALY_05000481 (1) 169 - /* IFLUSH sucks at life */ 175 + /* PLL May Latch Incorrect Values Coming Out of Reset */ 176 + #define ANOMALY_05000489 (1) 177 + /* Instruction Memory Stalls Can Cause IFLUSH to Fail */ 170 178 #define ANOMALY_05000491 (1) 179 + /* EXCPT Instruction May Be Lost If NMI Happens Simultaneously */ 180 + #define ANOMALY_05000494 (1) 181 + /* RXS Bit in SPI_STAT May Become Stuck In RX DMA Modes */ 182 + #define ANOMALY_05000501 (1) 183 + 184 + /* 185 + * These anomalies have been "phased" out of analog.com anomaly sheets and are 186 + * here to show running on older silicon just isn't feasible. 187 + */ 188 + 189 + /* Killed 32-Bit MMR Write Leads to Next System MMR Access Thinking It Should Be 32-Bit */ 190 + #define ANOMALY_05000157 (__SILICON_REVISION__ < 2) 191 + /* Instruction Cache Is Not Functional */ 192 + #define ANOMALY_05000237 (__SILICON_REVISION__ < 2) 193 + /* Buffered CLKIN Output Is Disabled by Default */ 194 + #define ANOMALY_05000247 (__SILICON_REVISION__ < 2) 171 195 172 196 /* Anomalies that don't exist on this proc */ 173 197 #define ANOMALY_05000099 (0)
-25
arch/blackfin/mach-bf538/boards/ezkit.c
··· 502 502 503 503 static struct bfin5xx_spi_chip spi_flash_chip_info = { 504 504 .enable_dma = 0, /* use dma transfer with this chip*/ 505 - .bits_per_word = 8, 506 505 }; 507 506 #endif 508 507 ··· 519 520 .pen_down_acc_interval = 255, /* 9.4 ms */ 520 521 .gpio_export = 1, /* Export GPIO to gpiolib */ 521 522 .gpio_base = -1, /* Dynamic allocation */ 522 - }; 523 - #endif 524 - 525 - #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) 526 - static struct bfin5xx_spi_chip spi_ad7879_chip_info = { 527 - .enable_dma = 0, 528 - .bits_per_word = 16, 529 523 }; 530 524 #endif 531 525 ··· 551 559 }; 552 560 #endif 553 561 554 - #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 555 - static struct bfin5xx_spi_chip spidev_chip_info = { 556 - .enable_dma = 0, 557 - .bits_per_word = 8, 558 - }; 559 - #endif 560 - 561 - #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 562 - static struct bfin5xx_spi_chip lq035q1_spi_chip_info = { 563 - .enable_dma = 0, 564 - .bits_per_word = 8, 565 - }; 566 - #endif 567 - 568 562 static struct spi_board_info bf538_spi_board_info[] __initdata = { 569 563 #if defined(CONFIG_MTD_M25P80) \ 570 564 || defined(CONFIG_MTD_M25P80_MODULE) ··· 573 595 .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ 574 596 .bus_num = 0, 575 597 .chip_select = 1, 576 - .controller_data = &spi_ad7879_chip_info, 577 598 .mode = SPI_CPHA | SPI_CPOL, 578 599 }, 579 600 #endif ··· 582 605 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ 583 606 .bus_num = 0, 584 607 .chip_select = 2, 585 - .controller_data = &lq035q1_spi_chip_info, 586 608 .mode = SPI_CPHA | SPI_CPOL, 587 609 }, 588 610 #endif ··· 591 615 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 592 616 .bus_num = 0, 593 617 .chip_select = 1, 594 - .controller_data = &spidev_chip_info, 595 618 }, 596 619 #endif 597 620 };
+36 -1
arch/blackfin/mach-bf538/ext-gpio.c
··· 1 1 /* 2 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 6 * Licensed under the GPL-2 or later. 7 7 */ ··· 121 121 gpiochip_add(&bf538_porte_chip); 122 122 } 123 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
+26 -12
arch/blackfin/mach-bf538/include/mach/anomaly.h
··· 11 11 */ 12 12 13 13 /* This file should be up to date with: 14 - * - Revision I, 05/25/2010; ADSP-BF538/BF538F Blackfin Processor Anomaly List 15 - * - Revision N, 05/25/2010; ADSP-BF539/BF539F Blackfin Processor Anomaly List 14 + * - Revision J, 05/23/2011; ADSP-BF538/BF538F Blackfin Processor Anomaly List 15 + * - Revision O, 05/23/2011; ADSP-BF539/BF539F Blackfin Processor Anomaly List 16 16 */ 17 17 18 18 #ifndef _MACH_ANOMALY_H_ ··· 56 56 #define ANOMALY_05000229 (1) 57 57 /* PPI_FS3 Is Not Driven in 2 or 3 Internal Frame Sync Transmit Modes */ 58 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 59 /* False Hardware Error from an Access in the Shadow of a Conditional Branch */ 62 60 #define ANOMALY_05000245 (1) 63 61 /* Maximum External Clock Speed for Timers */ 64 62 #define ANOMALY_05000253 (1) 65 - /* DCPLB_FAULT_ADDR MMR Register May Be Corrupted */ 66 - #define ANOMALY_05000261 (__SILICON_REVISION__ < 3) 67 63 /* High I/O Activity Causes Output Voltage of Internal Voltage Regulator (Vddint) to Decrease */ 68 64 #define ANOMALY_05000270 (__SILICON_REVISION__ < 4) 69 65 /* Certain Data Cache Writethrough Modes Fail for Vddint <= 0.9V */ 70 - #define ANOMALY_05000272 (1) 66 + #define ANOMALY_05000272 (ANOMALY_BF538) 71 67 /* Writes to Synchronous SDRAM Memory May Be Lost */ 72 68 #define ANOMALY_05000273 (__SILICON_REVISION__ < 4) 73 69 /* Writes to an I/O Data Register One SCLK Cycle after an Edge Is Detected May Clear Interrupt */ 74 70 #define ANOMALY_05000277 (__SILICON_REVISION__ < 4) 75 71 /* Disabling Peripherals with DMA Running May Cause DMA System Instability */ 76 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 74 #define ANOMALY_05000281 (__SILICON_REVISION__ < 4) 79 75 /* Memory DMA Corruption with 32-Bit Data and Traffic Control */ 80 76 #define ANOMALY_05000282 (__SILICON_REVISION__ < 4) ··· 98 102 #define ANOMALY_05000313 (__SILICON_REVISION__ < 4) 99 103 /* Killed System MMR Write Completes Erroneously on Next System MMR Access */ 100 104 #define ANOMALY_05000315 (__SILICON_REVISION__ < 4) 105 + /* PFx Glitch on Write to PORTFIO or PORTFIO_TOGGLE */ 106 + #define ANOMALY_05000317 (__SILICON_REVISION__ < 4) /* XXX: Same as 05000318 */ 101 107 /* PFx Glitch on Write to FIO_FLAG_D or FIO_FLAG_T */ 102 - #define ANOMALY_05000318 (ANOMALY_BF539 && __SILICON_REVISION__ < 4) 108 + #define ANOMALY_05000318 (__SILICON_REVISION__ < 4) /* XXX: Same as 05000317 */ 103 109 /* Regulator Programming Blocked when Hibernate Wakeup Source Remains Active */ 104 110 #define ANOMALY_05000355 (__SILICON_REVISION__ < 5) 105 111 /* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ ··· 132 134 #define ANOMALY_05000461 (1) 133 135 /* Synchronization Problem at Startup May Cause SPORT Transmit Channels to Misalign */ 134 136 #define ANOMALY_05000462 (1) 135 - /* Interrupted 32-Bit SPORT Data Register Access Results In Underflow */ 137 + /* Interrupted SPORT Receive Data Register Read Results In Underflow when SLEN > 15 */ 136 138 #define ANOMALY_05000473 (1) 137 - /* Possible Lockup Condition whem Modifying PLL from External Memory */ 139 + /* Possible Lockup Condition when Modifying PLL from External Memory */ 138 140 #define ANOMALY_05000475 (1) 139 141 /* TESTSET Instruction Cannot Be Interrupted */ 140 142 #define ANOMALY_05000477 (1) 141 143 /* Reads of ITEST_COMMAND and ITEST_DATA Registers Cause Cache Corruption */ 142 144 #define ANOMALY_05000481 (1) 143 - /* IFLUSH sucks at life */ 145 + /* PLL May Latch Incorrect Values Coming Out of Reset */ 146 + #define ANOMALY_05000489 (1) 147 + /* Instruction Memory Stalls Can Cause IFLUSH to Fail */ 144 148 #define ANOMALY_05000491 (1) 149 + /* EXCPT Instruction May Be Lost If NMI Happens Simultaneously */ 150 + #define ANOMALY_05000494 (1) 151 + /* RXS Bit in SPI_STAT May Become Stuck In RX DMA Modes */ 152 + #define ANOMALY_05000501 (1) 153 + 154 + /* 155 + * These anomalies have been "phased" out of analog.com anomaly sheets and are 156 + * here to show running on older silicon just isn't feasible. 157 + */ 158 + 159 + /* If I-Cache Is On, CSYNC/SSYNC/IDLE Around Change of Control Causes Failures */ 160 + #define ANOMALY_05000244 (__SILICON_REVISION__ < 3) 161 + /* DCPLB_FAULT_ADDR MMR Register May Be Corrupted */ 162 + #define ANOMALY_05000261 (__SILICON_REVISION__ < 3) 145 163 146 164 /* Anomalies that don't exist on this proc */ 147 165 #define ANOMALY_05000099 (0)
+3
arch/blackfin/mach-bf538/include/mach/gpio.h
··· 8 8 #define _MACH_GPIO_H_ 9 9 10 10 #define MAX_BLACKFIN_GPIOS 16 11 + #ifdef CONFIG_GPIOLIB 12 + /* We only use the special logic with GPIOLIB devices */ 11 13 #define BFIN_SPECIAL_GPIO_BANKS 3 14 + #endif 12 15 13 16 #define GPIO_PF0 0 /* PF */ 14 17 #define GPIO_PF1 1
-15
arch/blackfin/mach-bf548/boards/cm_bf548.c
··· 861 861 862 862 static struct bfin5xx_spi_chip spi_flash_chip_info = { 863 863 .enable_dma = 0, /* use dma transfer with this chip*/ 864 - .bits_per_word = 8, 865 864 }; 866 865 #endif 867 866 868 867 #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 868 static const struct ad7877_platform_data bfin_ad7877_ts_info = { 875 869 .model = 7877, 876 870 .vref_delay_usecs = 50, /* internal, no capacitor */ ··· 877 883 .acquisition_time = 1, 878 884 .averaging = 1, 879 885 .pen_down_acc_interval = 1, 880 - }; 881 - #endif 882 - 883 - #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 884 - static struct bfin5xx_spi_chip spidev_chip_info = { 885 - .enable_dma = 0, 886 - .bits_per_word = 8, 887 886 }; 888 887 #endif 889 888 ··· 902 915 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ 903 916 .bus_num = 0, 904 917 .chip_select = 2, 905 - .controller_data = &spi_ad7877_chip_info, 906 918 }, 907 919 #endif 908 920 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) ··· 910 924 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 911 925 .bus_num = 0, 912 926 .chip_select = 1, 913 - .controller_data = &spidev_chip_info, 914 927 }, 915 928 #endif 916 929 };
-32
arch/blackfin/mach-bf548/boards/ezkit.c
··· 1018 1018 1019 1019 static struct bfin5xx_spi_chip spi_flash_chip_info = { 1020 1020 .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 1021 }; 1031 1022 #endif 1032 1023 1033 1024 #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 1025 static const struct ad7877_platform_data bfin_ad7877_ts_info = { 1040 1026 .model = 7877, 1041 1027 .vref_delay_usecs = 50, /* internal, no capacitor */ ··· 1034 1048 .acquisition_time = 1, 1035 1049 .averaging = 1, 1036 1050 .pen_down_acc_interval = 1, 1037 - }; 1038 - #endif 1039 - 1040 - #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 1041 - static struct bfin5xx_spi_chip spidev_chip_info = { 1042 - .enable_dma = 0, 1043 - .bits_per_word = 8, 1044 - }; 1045 - #endif 1046 - 1047 - #if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE) 1048 - static struct bfin5xx_spi_chip spi_adxl34x_chip_info = { 1049 - .enable_dma = 0, /* use dma transfer with this chip*/ 1050 - .bits_per_word = 8, 1051 1051 }; 1052 1052 #endif 1053 1053 ··· 1058 1086 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 1059 1087 .bus_num = 1, 1060 1088 .chip_select = 4, 1061 - .controller_data = &ad1836_spi_chip_info, 1062 1089 }, 1063 1090 #endif 1064 1091 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) ··· 1068 1097 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ 1069 1098 .bus_num = 0, 1070 1099 .chip_select = 2, 1071 - .controller_data = &spi_ad7877_chip_info, 1072 1100 }, 1073 1101 #endif 1074 1102 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) ··· 1076 1106 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 1077 1107 .bus_num = 0, 1078 1108 .chip_select = 1, 1079 - .controller_data = &spidev_chip_info, 1080 1109 }, 1081 1110 #endif 1082 1111 #if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE) ··· 1086 1117 .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ 1087 1118 .bus_num = 1, 1088 1119 .chip_select = 2, 1089 - .controller_data = &spi_adxl34x_chip_info, 1090 1120 .mode = SPI_MODE_3, 1091 1121 }, 1092 1122 #endif
+129 -111
arch/blackfin/mach-bf548/include/mach/anomaly.h
··· 11 11 */ 12 12 13 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 17 #ifndef _MACH_ANOMALY_H_ ··· 29 29 /* Rx.H Cannot Be Used to Access 16-bit System MMR Registers */ 30 30 #define ANOMALY_05000122 (1) 31 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 33 /* False Hardware Error from an Access in the Shadow of a Conditional Branch */ 34 34 #define ANOMALY_05000245 (1) 35 35 /* Sensitivity To Noise with Slow Input Edge Rates on External SPORT TX and RX Clocks */ 36 36 #define ANOMALY_05000265 (1) 37 37 /* Certain Data Cache Writethrough Modes Fail for Vddint <= 0.9V */ 38 38 #define ANOMALY_05000272 (1) 39 - /* False Hardware Error Exception when ISR Context Is Not Restored */ 39 + /* False Hardware Errors Caused by Fetches at the Boundary of Reserved Memory */ 40 + #define ANOMALY_05000310 (1) 41 + /* FIFO Boot Mode Not Functional */ 42 + #define ANOMALY_05000325 (__SILICON_REVISION__ < 2) 43 + /* bfrom_SysControl() Firmware Function Performs Improper System Reset */ 44 + /* 45 + * Note: anomaly sheet says this is fixed with bf54x-0.2+, but testing 46 + * shows that the fix itself does not cover all cases. 47 + */ 48 + #define ANOMALY_05000353 (1) 49 + /* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ 50 + #define ANOMALY_05000357 (1) 51 + /* External Memory Read Access Hangs Core With PLL Bypass */ 52 + #define ANOMALY_05000360 (1) 53 + /* DMAs that Go Urgent during Tight Core Writes to External Memory Are Blocked */ 54 + #define ANOMALY_05000365 (1) 55 + /* Addressing Conflict between Boot ROM and Asynchronous Memory */ 56 + #define ANOMALY_05000369 (1) 57 + /* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ 58 + #define ANOMALY_05000371 (__SILICON_REVISION__ < 2) 59 + /* Security/Authentication Speedpath Causes Authentication To Fail To Initiate */ 60 + #define ANOMALY_05000378 (__SILICON_REVISION__ < 2) 61 + /* 16-Bit NAND FLASH Boot Mode Is Not Functional */ 62 + #define ANOMALY_05000379 (1) 63 + /* Lockbox SESR Disallows Certain User Interrupts */ 64 + #define ANOMALY_05000404 (__SILICON_REVISION__ < 2) 65 + /* Lockbox SESR Firmware Does Not Save/Restore Full Context */ 66 + #define ANOMALY_05000405 (1) 67 + /* Lockbox SESR Argument Checking Does Not Check L2 Memory Protection Range */ 68 + #define ANOMALY_05000406 (__SILICON_REVISION__ < 2) 69 + /* Lockbox SESR Firmware Arguments Are Not Retained After First Initialization */ 70 + #define ANOMALY_05000407 (__SILICON_REVISION__ < 2) 71 + /* Lockbox Firmware Memory Cleanup Routine Does not Clear Registers */ 72 + #define ANOMALY_05000408 (1) 73 + /* Lockbox firmware leaves MDMA0 channel enabled */ 74 + #define ANOMALY_05000409 (__SILICON_REVISION__ < 2) 75 + /* bfrom_SysControl() Firmware Function Cannot be Used to Enter Power Saving Modes */ 76 + #define ANOMALY_05000411 (__SILICON_REVISION__ < 2) 77 + /* NAND Boot Mode Not Compatible With Some NAND Flash Devices */ 78 + #define ANOMALY_05000413 (__SILICON_REVISION__ < 2) 79 + /* OTP_CHECK_FOR_PREV_WRITE Bit is Not Functional in bfrom_OtpWrite() API */ 80 + #define ANOMALY_05000414 (__SILICON_REVISION__ < 2) 81 + /* Speculative Fetches Can Cause Undesired External FIFO Operations */ 82 + #define ANOMALY_05000416 (1) 83 + /* Multichannel SPORT Channel Misalignment Under Specific Configuration */ 84 + #define ANOMALY_05000425 (__SILICON_REVISION__ < 4) 85 + /* Speculative Fetches of Indirect-Pointer Instructions Can Cause False Hardware Errors */ 86 + #define ANOMALY_05000426 (1) 87 + /* CORE_EPPI_PRIO bit and SYS_EPPI_PRIO bit in the HMDMA1_CONTROL register are not functional */ 88 + #define ANOMALY_05000427 (__SILICON_REVISION__ < 2) 89 + /* WB_EDGE Bit in NFC_IRQSTAT Incorrectly Reflects Buffer Status Instead of IRQ Status */ 90 + #define ANOMALY_05000429 (__SILICON_REVISION__ < 2) 91 + /* Software System Reset Corrupts PLL_LOCKCNT Register */ 92 + #define ANOMALY_05000430 (__SILICON_REVISION__ >= 2) 93 + /* Incorrect Use of Stack in Lockbox Firmware During Authentication */ 94 + #define ANOMALY_05000431 (__SILICON_REVISION__ < 3) 95 + /* SW Breakpoints Ignored Upon Return From Lockbox Authentication */ 96 + #define ANOMALY_05000434 (1) 97 + /* IFLUSH Instruction at End of Hardware Loop Causes Infinite Stall */ 98 + #define ANOMALY_05000443 (1) 99 + /* CDMAPRIO and L2DMAPRIO Bits in the SYSCR Register Are Not Functional */ 100 + #define ANOMALY_05000446 (1) 101 + /* UART IrDA Receiver Fails on Extended Bit Pulses */ 102 + #define ANOMALY_05000447 (1) 103 + /* DDR Clock Duty Cycle Spec Violation (tCH, tCL) */ 104 + #define ANOMALY_05000448 (__SILICON_REVISION__ == 1) 105 + /* Reduced Timing Margins on DDR Output Setup and Hold (tDS and tDH) */ 106 + #define ANOMALY_05000449 (__SILICON_REVISION__ == 1) 107 + /* USB DMA Short Packet Data Corruption */ 108 + #define ANOMALY_05000450 (1) 109 + /* USB Receive Interrupt Is Not Generated in DMA Mode 1 */ 110 + #define ANOMALY_05000456 (1) 111 + /* Host DMA Port Responds to Certain Bus Activity Without HOST_CE Assertion */ 112 + #define ANOMALY_05000457 (1) 113 + /* USB DMA Mode 1 Failure When Multiple USB DMA Channels Are Concurrently Enabled */ 114 + #define ANOMALY_05000460 (__SILICON_REVISION__ < 4) 115 + /* False Hardware Error when RETI Points to Invalid Memory */ 116 + #define ANOMALY_05000461 (1) 117 + /* Synchronization Problem at Startup May Cause SPORT Transmit Channels to Misalign */ 118 + #define ANOMALY_05000462 (__SILICON_REVISION__ < 4) 119 + /* USB DMA RX Data Corruption */ 120 + #define ANOMALY_05000463 (__SILICON_REVISION__ < 4) 121 + /* USB TX DMA Hang */ 122 + #define ANOMALY_05000464 (__SILICON_REVISION__ < 4) 123 + /* USB Rx DMA Hang */ 124 + #define ANOMALY_05000465 (1) 125 + /* TxPktRdy Bit Not Set for Transmit Endpoint When Core and DMA Access USB Endpoint FIFOs Simultaneously */ 126 + #define ANOMALY_05000466 (__SILICON_REVISION__ < 4) 127 + /* Possible USB RX Data Corruption When Control & Data EP FIFOs are Accessed via the Core */ 128 + #define ANOMALY_05000467 (__SILICON_REVISION__ < 4) 129 + /* Interrupted SPORT Receive Data Register Read Results In Underflow when SLEN > 15 */ 130 + #define ANOMALY_05000473 (1) 131 + /* Access to DDR SDRAM Causes System Hang with Certain PLL Settings */ 132 + #define ANOMALY_05000474 (__SILICON_REVISION__ < 4) 133 + /* TESTSET Instruction Cannot Be Interrupted */ 134 + #define ANOMALY_05000477 (1) 135 + /* Reads of ITEST_COMMAND and ITEST_DATA Registers Cause Cache Corruption */ 136 + #define ANOMALY_05000481 (1) 137 + /* Possible USB Data Corruption When Multiple Endpoints Are Accessed by the Core */ 138 + #define ANOMALY_05000483 (1) 139 + /* DDR Trim May Not Be Performed for Certain VLEV Values in OTP Page PBS00L */ 140 + #define ANOMALY_05000484 (__SILICON_REVISION__ < 3) 141 + /* PLL_CTL Change Using bfrom_SysControl() Can Result in Processor Overclocking */ 142 + #define ANOMALY_05000485 (__SILICON_REVISION__ > 1 && __SILICON_REVISION__ < 4) 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 */ 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 */ 40 166 #define ANOMALY_05000281 (__SILICON_REVISION__ < 1) 41 167 /* SSYNCs After Writes To CAN/DMA MMR Registers Are Not Always Handled Correctly */ 42 168 #define ANOMALY_05000304 (__SILICON_REVISION__ < 1) 43 - /* False Hardware Errors Caused by Fetches at the Boundary of Reserved Memory */ 44 - #define ANOMALY_05000310 (1) 45 169 /* Errors when SSYNC, CSYNC, or Loads to LT, LB and LC Registers Are Interrupted */ 46 170 #define ANOMALY_05000312 (__SILICON_REVISION__ < 1) 47 171 /* TWI Slave Boot Mode Is Not Functional */ 48 172 #define ANOMALY_05000324 (__SILICON_REVISION__ < 1) 49 - /* FIFO Boot Mode Not Functional */ 50 - #define ANOMALY_05000325 (__SILICON_REVISION__ < 2) 51 173 /* Data Lost When Core and DMA Accesses Are Made to the USB FIFO Simultaneously */ 52 174 #define ANOMALY_05000327 (__SILICON_REVISION__ < 1) 53 175 /* Incorrect Access of OTP_STATUS During otp_write() Function */ ··· 202 80 #define ANOMALY_05000349 (__SILICON_REVISION__ < 1) 203 81 /* PLL Status Register Is Inaccurate */ 204 82 #define ANOMALY_05000351 (__SILICON_REVISION__ < 1) 205 - /* bfrom_SysControl() Firmware Function Performs Improper System Reset */ 206 - /* 207 - * Note: anomaly sheet says this is fixed with bf54x-0.2+, but testing 208 - * shows that the fix itself does not cover all cases. 209 - */ 210 - #define ANOMALY_05000353 (1) 211 83 /* Regulator Programming Blocked when Hibernate Wakeup Source Remains Active */ 212 84 #define ANOMALY_05000355 (__SILICON_REVISION__ < 1) 213 85 /* System Stalled During A Core Access To AMC While A Core Access To NFC FIFO Is Required */ 214 86 #define ANOMALY_05000356 (__SILICON_REVISION__ < 1) 215 - /* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ 216 - #define ANOMALY_05000357 (1) 217 - /* External Memory Read Access Hangs Core With PLL Bypass */ 218 - #define ANOMALY_05000360 (1) 219 - /* DMAs that Go Urgent during Tight Core Writes to External Memory Are Blocked */ 220 - #define ANOMALY_05000365 (1) 221 87 /* WURESET Bit In SYSCR Register Does Not Properly Indicate Hibernate Wake-Up */ 222 88 #define ANOMALY_05000367 (__SILICON_REVISION__ < 1) 223 - /* Addressing Conflict between Boot ROM and Asynchronous Memory */ 224 - #define ANOMALY_05000369 (1) 225 89 /* Default PLL MSEL and SSEL Settings Can Cause 400MHz Product To Violate Specifications */ 226 90 #define ANOMALY_05000370 (__SILICON_REVISION__ < 1) 227 - /* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ 228 - #define ANOMALY_05000371 (__SILICON_REVISION__ < 2) 229 91 /* USB DP/DM Data Pins May Lose State When Entering Hibernate */ 230 92 #define ANOMALY_05000372 (__SILICON_REVISION__ < 1) 231 - /* Security/Authentication Speedpath Causes Authentication To Fail To Initiate */ 232 - #define ANOMALY_05000378 (__SILICON_REVISION__ < 2) 233 - /* 16-Bit NAND FLASH Boot Mode Is Not Functional */ 234 - #define ANOMALY_05000379 (1) 235 93 /* 8-Bit NAND Flash Boot Mode Not Functional */ 236 94 #define ANOMALY_05000382 (__SILICON_REVISION__ < 1) 237 - /* Some ATAPI Modes Are Not Functional */ 238 - #define ANOMALY_05000383 (1) 239 95 /* Boot from OTP Memory Not Functional */ 240 96 #define ANOMALY_05000385 (__SILICON_REVISION__ < 1) 241 97 /* bfrom_SysControl() Firmware Routine Not Functional */ ··· 240 140 #define ANOMALY_05000396 (__SILICON_REVISION__ < 1) 241 141 /* BK_ONES, BK_ZEROS, and BK_DATECODE Constants Not Functional */ 242 142 #define ANOMALY_05000397 (__SILICON_REVISION__ < 1) 243 - /* Lockbox SESR Disallows Certain User Interrupts */ 244 - #define ANOMALY_05000404 (__SILICON_REVISION__ < 2) 245 - /* Lockbox SESR Firmware Does Not Save/Restore Full Context */ 246 - #define ANOMALY_05000405 (1) 247 - /* Lockbox SESR Argument Checking Does Not Check L2 Memory Protection Range */ 248 - #define ANOMALY_05000406 (__SILICON_REVISION__ < 2) 249 - /* Lockbox SESR Firmware Arguments Are Not Retained After First Initialization */ 250 - #define ANOMALY_05000407 (__SILICON_REVISION__ < 2) 251 - /* Lockbox Firmware Memory Cleanup Routine Does not Clear Registers */ 252 - #define ANOMALY_05000408 (1) 253 - /* Lockbox firmware leaves MDMA0 channel enabled */ 254 - #define ANOMALY_05000409 (__SILICON_REVISION__ < 2) 255 - /* bfrom_SysControl() Firmware Function Cannot be Used to Enter Power Saving Modes */ 256 - #define ANOMALY_05000411 (__SILICON_REVISION__ < 2) 257 - /* NAND Boot Mode Not Compatible With Some NAND Flash Devices */ 258 - #define ANOMALY_05000413 (__SILICON_REVISION__ < 2) 259 - /* OTP_CHECK_FOR_PREV_WRITE Bit is Not Functional in bfrom_OtpWrite() API */ 260 - #define ANOMALY_05000414 (__SILICON_REVISION__ < 2) 261 - /* Speculative Fetches Can Cause Undesired External FIFO Operations */ 262 - #define ANOMALY_05000416 (1) 263 - /* Multichannel SPORT Channel Misalignment Under Specific Configuration */ 264 - #define ANOMALY_05000425 (1) 265 - /* Speculative Fetches of Indirect-Pointer Instructions Can Cause False Hardware Errors */ 266 - #define ANOMALY_05000426 (1) 267 - /* CORE_EPPI_PRIO bit and SYS_EPPI_PRIO bit in the HMDMA1_CONTROL register are not functional */ 268 - #define ANOMALY_05000427 (__SILICON_REVISION__ < 2) 269 - /* WB_EDGE Bit in NFC_IRQSTAT Incorrectly Reflects Buffer Status Instead of IRQ Status */ 270 - #define ANOMALY_05000429 (__SILICON_REVISION__ < 2) 271 - /* Software System Reset Corrupts PLL_LOCKCNT Register */ 272 - #define ANOMALY_05000430 (__SILICON_REVISION__ >= 2) 273 - /* Incorrect Use of Stack in Lockbox Firmware During Authentication */ 274 - #define ANOMALY_05000431 (__SILICON_REVISION__ < 3) 275 - /* SW Breakpoints Ignored Upon Return From Lockbox Authentication */ 276 - #define ANOMALY_05000434 (1) 277 143 /* OTP Write Accesses Not Supported */ 278 144 #define ANOMALY_05000442 (__SILICON_REVISION__ < 1) 279 - /* IFLUSH Instruction at End of Hardware Loop Causes Infinite Stall */ 280 - #define ANOMALY_05000443 (1) 281 - /* CDMAPRIO and L2DMAPRIO Bits in the SYSCR Register Are Not Functional */ 282 - #define ANOMALY_05000446 (1) 283 - /* UART IrDA Receiver Fails on Extended Bit Pulses */ 284 - #define ANOMALY_05000447 (1) 285 - /* DDR Clock Duty Cycle Spec Violation (tCH, tCL) */ 286 - #define ANOMALY_05000448 (__SILICON_REVISION__ == 1) 287 - /* Reduced Timing Margins on DDR Output Setup and Hold (tDS and tDH) */ 288 - #define ANOMALY_05000449 (__SILICON_REVISION__ == 1) 289 - /* USB DMA Mode 1 Short Packet Data Corruption */ 290 - #define ANOMALY_05000450 (1) 291 145 /* Incorrect Default Hysteresis Setting for RESET, NMI, and BMODE Signals */ 292 146 #define ANOMALY_05000452 (__SILICON_REVISION__ < 1) 293 - /* USB Receive Interrupt Is Not Generated in DMA Mode 1 */ 294 - #define ANOMALY_05000456 (1) 295 - /* Host DMA Port Responds to Certain Bus Activity Without HOST_CE Assertion */ 296 - #define ANOMALY_05000457 (1) 297 - /* USB DMA Mode 1 Failure When Multiple USB DMA Channels Are Concurrently Enabled */ 298 - #define ANOMALY_05000460 (1) 299 - /* False Hardware Error when RETI Points to Invalid Memory */ 300 - #define ANOMALY_05000461 (1) 301 - /* Synchronization Problem at Startup May Cause SPORT Transmit Channels to Misalign */ 302 - #define ANOMALY_05000462 (1) 303 - /* USB DMA RX Data Corruption */ 304 - #define ANOMALY_05000463 (1) 305 - /* USB TX DMA Hang */ 306 - #define ANOMALY_05000464 (1) 307 - /* USB Rx DMA hang */ 308 - #define ANOMALY_05000465 (1) 309 - /* TxPktRdy Bit Not Set for Transmit Endpoint When Core and DMA Access USB Endpoint FIFOs Simultaneously */ 310 - #define ANOMALY_05000466 (1) 311 - /* Possible RX data corruption when control & data EP FIFOs are accessed via the core */ 312 - #define ANOMALY_05000467 (1) 313 - /* Interrupted 32-Bit SPORT Data Register Access Results In Underflow */ 314 - #define ANOMALY_05000473 (1) 315 - /* Access to DDR-SDRAM causes system hang under certain PLL/VR settings */ 316 - #define ANOMALY_05000474 (1) 317 - /* TESTSET Instruction Cannot Be Interrupted */ 318 - #define ANOMALY_05000477 (1) 319 - /* Reads of ITEST_COMMAND and ITEST_DATA Registers Cause Cache Corruption */ 320 - #define ANOMALY_05000481 (1) 321 - /* Possible USB Data Corruption When Multiple Endpoints Are Accessed by the Core */ 322 - #define ANOMALY_05000483 (1) 323 - /* DDR Trim May Not Be Performed for Certain VLEV Values in OTP Page PBS00L */ 324 - #define ANOMALY_05000484 (__SILICON_REVISION__ < 3) 325 - /* PLL_CTL Change Using bfrom_SysControl() Can Result in Processor Overclocking */ 326 - #define ANOMALY_05000485 (__SILICON_REVISION__ >= 2) 327 - /* IFLUSH sucks at life */ 328 - #define ANOMALY_05000491 (1) 329 147 330 148 /* Anomalies that don't exist on this proc */ 331 149 #define ANOMALY_05000099 (0)
+2
arch/blackfin/mach-bf548/include/mach/gpio.h
··· 170 170 171 171 #define MAX_BLACKFIN_GPIOS 160 172 172 173 + #define BFIN_GPIO_PINT 1 174 + 173 175 #ifndef __ASSEMBLY__ 174 176 175 177 struct gpio_port_t {
+1 -1
arch/blackfin/mach-bf548/include/mach/irq.h
··· 438 438 struct bfin_pint_regs { 439 439 u32 mask_set; 440 440 u32 mask_clear; 441 - u32 irq; 441 + u32 request; 442 442 u32 assign; 443 443 u32 edge_set; 444 444 u32 edge_clear;
-9
arch/blackfin/mach-bf561/boards/acvilon.c
··· 364 364 /* DataFlash chip */ 365 365 static struct bfin5xx_spi_chip data_flash_chip_info = { 366 366 .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 367 }; 376 368 #endif 377 369 ··· 412 420 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 413 421 .bus_num = 0, 414 422 .chip_select = 3, 415 - .controller_data = &spidev_chip_info, 416 423 }, 417 424 #endif 418 425 #if defined(CONFIG_MTD_DATAFLASH) || defined(CONFIG_MTD_DATAFLASH_MODULE)
+22 -36
arch/blackfin/mach-bf561/boards/cm_bf561.c
··· 60 60 /* SPI flash chip (m25p64) */ 61 61 static struct bfin5xx_spi_chip spi_flash_chip_info = { 62 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 64 #endif 88 65 ··· 77 100 }, 78 101 #endif 79 102 80 - #if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE) 81 - { 82 - .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ 83 - .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ 84 - .bus_num = 0, /* Framework bus number */ 85 - .chip_select = 1, /* Framework chip select. */ 86 - .platform_data = NULL, /* No spi_driver specific config */ 87 - .controller_data = &spi_adc_chip_info, 88 - }, 89 - #endif 90 - 91 103 #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 92 104 { 93 105 .modalias = "ad183x", 94 106 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 95 107 .bus_num = 0, 96 108 .chip_select = 4, 97 - .controller_data = &ad1836_spi_chip_info, 98 109 }, 99 110 #endif 100 111 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) ··· 91 126 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ 92 127 .bus_num = 0, 93 128 .chip_select = 1, 94 - .controller_data = &mmc_spi_chip_info, 95 129 .mode = SPI_MODE_3, 96 130 }, 97 131 #endif ··· 496 532 #endif 497 533 }; 498 534 535 + static int __init net2272_init(void) 536 + { 537 + #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 538 + int ret; 539 + 540 + ret = gpio_request(GPIO_PF46, "net2272"); 541 + if (ret) 542 + return ret; 543 + 544 + /* Reset USB Chip, PF46 */ 545 + gpio_direction_output(GPIO_PF46, 0); 546 + mdelay(2); 547 + gpio_set_value(GPIO_PF46, 1); 548 + #endif 549 + 550 + return 0; 551 + } 552 + 499 553 static int __init cm_bf561_init(void) 500 554 { 501 555 printk(KERN_INFO "%s(): registering device resources\n", __func__); ··· 525 543 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 526 544 irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); 527 545 #endif 546 + 547 + if (net2272_init()) 548 + pr_warning("unable to configure net2272; it probably won't work\n"); 549 + 528 550 return 0; 529 551 } 530 552
+24 -17
arch/blackfin/mach-bf561/boards/ezkit.c
··· 108 108 .end = 0x2C000000 + 0x7F, 109 109 .flags = IORESOURCE_MEM, 110 110 }, { 111 + .start = 1, 112 + .flags = IORESOURCE_BUS, 113 + }, { 111 114 .start = IRQ_PF10, 112 115 .end = IRQ_PF10, 113 116 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, ··· 286 283 }; 287 284 #endif 288 285 289 - #if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ 290 - || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 291 - static struct bfin5xx_spi_chip ad1836_spi_chip_info = { 292 - .enable_dma = 0, 293 - .bits_per_word = 16, 294 - }; 295 - #endif 296 - 297 - #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 298 - static struct bfin5xx_spi_chip spidev_chip_info = { 299 - .enable_dma = 0, 300 - .bits_per_word = 8, 301 - }; 302 - #endif 303 - 304 286 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 305 287 /* SPI (0) */ 306 288 static struct resource bfin_spi0_resource[] = { ··· 333 345 .bus_num = 0, 334 346 .chip_select = 4, 335 347 .platform_data = "ad1836", /* only includes chip name for the moment */ 336 - .controller_data = &ad1836_spi_chip_info, 337 348 .mode = SPI_MODE_3, 338 349 }, 339 350 #endif ··· 342 355 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 343 356 .bus_num = 0, 344 357 .chip_select = 1, 345 - .controller_data = &spidev_chip_info, 346 358 }, 347 359 #endif 348 360 }; ··· 502 516 #endif 503 517 }; 504 518 519 + static int __init net2272_init(void) 520 + { 521 + #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) 522 + int ret; 523 + 524 + ret = gpio_request(GPIO_PF11, "net2272"); 525 + if (ret) 526 + return ret; 527 + 528 + /* Reset the USB chip */ 529 + gpio_direction_output(GPIO_PF11, 0); 530 + mdelay(2); 531 + gpio_set_value(GPIO_PF11, 1); 532 + #endif 533 + 534 + return 0; 535 + } 536 + 505 537 static int __init ezkit_init(void) 506 538 { 507 539 int ret; ··· 545 541 */ 546 542 udelay(400); 547 543 #endif 544 + 545 + if (net2272_init()) 546 + pr_warning("unable to configure net2272; it probably won't work\n"); 548 547 549 548 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 550 549 return 0;
+72 -60
arch/blackfin/mach-bf561/include/mach/anomaly.h
··· 11 11 */ 12 12 13 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 17 #ifndef _MACH_ANOMALY_H_ ··· 26 26 #define ANOMALY_05000074 (1) 27 27 /* UART Line Status Register (UART_LSR) Bits Are Not Updated at the Same Time */ 28 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 29 /* TESTSET Instructions Restricted to 32-Bit Aligned Memory Locations */ 32 30 #define ANOMALY_05000120 (1) 33 31 /* Rx.H Cannot Be Used to Access 16-bit System MMR Registers */ 34 32 #define ANOMALY_05000122 (1) 35 - /* Erroneous Exception when Enabling Cache */ 36 - #define ANOMALY_05000125 (__SILICON_REVISION__ < 3) 37 33 /* SIGNBITS Instruction Not Functional under Certain Conditions */ 38 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 35 /* IMDMA S1/D1 Channel May Stall */ 60 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 37 /* Timers in PWM-Out Mode with PPI GP Receive (Input) Mode with 0 Frame Syncs */ 72 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 39 /* PPI Data Lengths between 8 and 16 Do Not Zero Out Upper Bits */ 86 40 #define ANOMALY_05000166 (1) 87 41 /* Turning SPORTs on while External Frame Sync Is Active May Corrupt Data */ ··· 46 92 #define ANOMALY_05000169 (__SILICON_REVISION__ < 5) 47 93 /* Boot-ROM Modifies SICA_IWRx Wakeup Registers */ 48 94 #define ANOMALY_05000171 (__SILICON_REVISION__ < 5) 49 - /* DSPID register values incorrect */ 50 - #define ANOMALY_05000172 (__SILICON_REVISION__ < 3) 51 - /* DMA vs Core accesses to external memory */ 52 - #define ANOMALY_05000173 (__SILICON_REVISION__ < 3) 53 95 /* Cache Fill Buffer Data lost */ 54 96 #define ANOMALY_05000174 (__SILICON_REVISION__ < 5) 55 97 /* Overlapping Sequencer and Memory Stalls */ ··· 74 124 #define ANOMALY_05000189 (__SILICON_REVISION__ < 5) 75 125 /* PPI Not Functional at Core Voltage < 1Volt */ 76 126 #define ANOMALY_05000190 (1) 77 - /* PPI does not invert the Driving PPICLK edge in Transmit Modes */ 78 - #define ANOMALY_05000191 (__SILICON_REVISION__ < 3) 79 127 /* False I/O Pin Interrupts on Edge-Sensitive Inputs When Polarity Setting Is Changed */ 80 128 #define ANOMALY_05000193 (__SILICON_REVISION__ < 5) 81 129 /* Restarting SPORT in Specific Modes May Cause Data Corruption */ ··· 165 217 /* Timing Requirements Change for External Frame Sync PPI Modes with Non-Zero PPI_DELAY */ 166 218 #define ANOMALY_05000276 (__SILICON_REVISION__ < 5) 167 219 /* Writes to an I/O Data Register One SCLK Cycle after an Edge Is Detected May Clear Interrupt */ 168 - #define ANOMALY_05000277 (__SILICON_REVISION__ < 3) 220 + #define ANOMALY_05000277 (__SILICON_REVISION__ < 5) 169 221 /* Disabling Peripherals with DMA Running May Cause DMA System Instability */ 170 222 #define ANOMALY_05000278 (__SILICON_REVISION__ < 5) 171 - /* False Hardware Error Exception when ISR Context Is Not Restored */ 223 + /* False Hardware Error when ISR Context Is Not Restored */ 172 224 /* Temporarily walk around for bug 5423 till this issue is confirmed by 173 225 * official anomaly document. It looks 05000281 still exists on bf561 174 226 * v0.5. ··· 222 274 #define ANOMALY_05000366 (1) 223 275 /* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ 224 276 #define ANOMALY_05000371 (1) 225 - /* SSYNC Stalls Processor when Executed from Non-Cacheable Memory */ 226 - #define ANOMALY_05000402 (__SILICON_REVISION__ == 4) 227 277 /* Level-Sensitive External GPIO Wakeups May Cause Indefinite Stall */ 228 278 #define ANOMALY_05000403 (1) 229 279 /* TESTSET Instruction Causes Data Corruption with Writeback Data Cache Enabled */ ··· 244 298 #define ANOMALY_05000462 (1) 245 299 /* Boot Failure When SDRAM Control Signals Toggle Coming Out Of Reset */ 246 300 #define ANOMALY_05000471 (1) 247 - /* Interrupted 32-Bit SPORT Data Register Access Results In Underflow */ 301 + /* Interrupted SPORT Receive Data Register Read Results In Underflow when SLEN > 15 */ 248 302 #define ANOMALY_05000473 (1) 249 - /* Possible Lockup Condition whem Modifying PLL from External Memory */ 303 + /* Possible Lockup Condition when Modifying PLL from External Memory */ 250 304 #define ANOMALY_05000475 (1) 251 305 /* TESTSET Instruction Cannot Be Interrupted */ 252 306 #define ANOMALY_05000477 (1) 253 307 /* Reads of ITEST_COMMAND and ITEST_DATA Registers Cause Cache Corruption */ 254 308 #define ANOMALY_05000481 (1) 255 - /* IFLUSH sucks at life */ 309 + /* PLL May Latch Incorrect Values Coming Out of Reset */ 310 + #define ANOMALY_05000489 (1) 311 + /* Instruction Memory Stalls Can Cause IFLUSH to Fail */ 256 312 #define ANOMALY_05000491 (1) 313 + /* EXCPT Instruction May Be Lost If NMI Happens Simultaneously */ 314 + #define ANOMALY_05000494 (1) 315 + /* RXS Bit in SPI_STAT May Become Stuck In RX DMA Modes */ 316 + #define ANOMALY_05000501 (1) 317 + 318 + /* 319 + * These anomalies have been "phased" out of analog.com anomaly sheets and are 320 + * here to show running on older silicon just isn't feasible. 321 + */ 322 + 323 + /* Trace Buffers May Contain Errors in Emulation Mode and/or Exception, NMI, Reset Handlers */ 324 + #define ANOMALY_05000116 (__SILICON_REVISION__ < 3) 325 + /* Erroneous Exception when Enabling Cache */ 326 + #define ANOMALY_05000125 (__SILICON_REVISION__ < 3) 327 + /* Two bits in the Watchpoint Status Register (WPSTAT) are swapped */ 328 + #define ANOMALY_05000134 (__SILICON_REVISION__ < 3) 329 + /* Enable wires from the Data Watchpoint Address Control Register (WPDACTL) are swapped */ 330 + #define ANOMALY_05000135 (__SILICON_REVISION__ < 3) 331 + /* Stall in multi-unit DMA operations */ 332 + #define ANOMALY_05000136 (__SILICON_REVISION__ < 3) 333 + /* Allowing the SPORT RX FIFO to fill will cause an overflow */ 334 + #define ANOMALY_05000140 (__SILICON_REVISION__ < 3) 335 + /* Infinite Stall may occur with a particular sequence of consecutive dual dag events */ 336 + #define ANOMALY_05000141 (__SILICON_REVISION__ < 3) 337 + /* Interrupts may be lost when a programmable input flag is configured to be edge sensitive */ 338 + #define ANOMALY_05000142 (__SILICON_REVISION__ < 3) 339 + /* DMA and TESTSET conflict when both are accessing external memory */ 340 + #define ANOMALY_05000144 (__SILICON_REVISION__ < 3) 341 + /* In PWM_OUT mode, you must enable the PPI block to generate a waveform from PPI_CLK */ 342 + #define ANOMALY_05000145 (__SILICON_REVISION__ < 3) 343 + /* MDMA may lose the first few words of a descriptor chain */ 344 + #define ANOMALY_05000146 (__SILICON_REVISION__ < 3) 345 + /* Source MDMA descriptor may stop with a DMA Error near beginning of descriptor fetch */ 346 + #define ANOMALY_05000147 (__SILICON_REVISION__ < 3) 347 + /* DMA engine may lose data due to incorrect handshaking */ 348 + #define ANOMALY_05000150 (__SILICON_REVISION__ < 3) 349 + /* DMA stalls when all three controllers read data from the same source */ 350 + #define ANOMALY_05000151 (__SILICON_REVISION__ < 3) 351 + /* Execution stall when executing in L2 and doing external accesses */ 352 + #define ANOMALY_05000152 (__SILICON_REVISION__ < 3) 353 + /* Frame Delay in SPORT Multichannel Mode */ 354 + #define ANOMALY_05000153 (__SILICON_REVISION__ < 3) 355 + /* SPORT TFS signal stays active in multichannel mode outside of valid channels */ 356 + #define ANOMALY_05000154 (__SILICON_REVISION__ < 3) 357 + /* Killed 32-Bit MMR Write Leads to Next System MMR Access Thinking It Should Be 32-Bit */ 358 + #define ANOMALY_05000157 (__SILICON_REVISION__ < 3) 359 + /* DMA Lock-up at CCLK to SCLK ratios of 4:1, 2:1, or 1:1 */ 360 + #define ANOMALY_05000159 (__SILICON_REVISION__ < 3) 361 + /* A read from external memory may return a wrong value with data cache enabled */ 362 + #define ANOMALY_05000160 (__SILICON_REVISION__ < 3) 363 + /* Data Cache Fill data can be corrupted after/during Instruction DMA if certain core stalls exist */ 364 + #define ANOMALY_05000161 (__SILICON_REVISION__ < 3) 365 + /* DMEM_CONTROL<12> is not set on Reset */ 366 + #define ANOMALY_05000162 (__SILICON_REVISION__ < 3) 367 + /* SPORT Transmit Data Is Not Gated by External Frame Sync in Certain Conditions */ 368 + #define ANOMALY_05000163 (__SILICON_REVISION__ < 3) 369 + /* DSPID register values incorrect */ 370 + #define ANOMALY_05000172 (__SILICON_REVISION__ < 3) 371 + /* DMA vs Core accesses to external memory */ 372 + #define ANOMALY_05000173 (__SILICON_REVISION__ < 3) 373 + /* PPI does not invert the Driving PPICLK edge in Transmit Modes */ 374 + #define ANOMALY_05000191 (__SILICON_REVISION__ < 3) 375 + /* SSYNC Stalls Processor when Executed from Non-Cacheable Memory */ 376 + #define ANOMALY_05000402 (__SILICON_REVISION__ == 4) 257 377 258 378 /* Anomalies that don't exist on this proc */ 259 379 #define ANOMALY_05000119 (0)
+3 -3
arch/blackfin/mach-bf561/include/mach/gpio.h
··· 58 58 #define GPIO_PF46 46 59 59 #define GPIO_PF47 47 60 60 61 - #define PORT_FIO0 GPIO_0 62 - #define PORT_FIO1 GPIO_16 63 - #define PORT_FIO2 GPIO_32 61 + #define PORT_FIO0 GPIO_PF0 62 + #define PORT_FIO1 GPIO_PF16 63 + #define PORT_FIO2 GPIO_PF32 64 64 65 65 #include <mach-common/ports-f.h> 66 66
+53 -89
arch/blackfin/mach-bf561/secondary.S
··· 23 23 #define INITIAL_STACK (COREB_L1_SCRATCH_START + L1_SCRATCH_LENGTH - 12) 24 24 25 25 ENTRY(_coreb_trampoline_start) 26 - /* Set the SYSCFG register */ 27 - R0 = 0x36; 28 - SYSCFG = R0; /*Enable Cycle Counter and Nesting Of Interrupts(3rd Bit)*/ 29 - R0 = 0; 26 + /* Enable Cycle Counter and Nesting Of Interrupts */ 27 + #ifdef CONFIG_BFIN_SCRATCH_REG_CYCLES 28 + R0 = SYSCFG_SNEN; 29 + #else 30 + R0 = SYSCFG_SNEN | SYSCFG_CCEN; 31 + #endif 32 + SYSCFG = R0; 30 33 31 - /*Clear Out All the data and pointer Registers*/ 32 - R1 = R0; 33 - R2 = R0; 34 - R3 = R0; 35 - R4 = R0; 36 - R5 = R0; 37 - R6 = R0; 38 - R7 = 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); 39 43 40 - P0 = R0; 41 - P1 = R0; 42 - P2 = R0; 43 - P3 = R0; 44 - P4 = R0; 45 - P5 = R0; 44 + /* Zero out registers required by Blackfin ABI */ 46 45 47 - LC0 = r0; 48 - LC1 = r0; 49 - L0 = r0; 50 - L1 = r0; 51 - L2 = r0; 52 - L3 = r0; 46 + /* Disable circular buffers */ 47 + L0 = r6; 48 + L1 = r6; 49 + L2 = r6; 50 + L3 = r6; 53 51 54 - /* Clear Out All the DAG Registers*/ 55 - B0 = r0; 56 - B1 = r0; 57 - B2 = r0; 58 - B3 = r0; 52 + /* Disable hardware loops in case we were started by 'go' */ 53 + LC0 = r6; 54 + LC1 = r6; 59 55 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; 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; 62 + CSYNC; 69 63 70 64 trace_buffer_init(p0,r0); 71 65 72 66 /* Turn off the icache */ 73 - p0.l = LO(IMEM_CONTROL); 74 - p0.h = HI(IMEM_CONTROL); 75 - R1 = [p0]; 76 - R0 = ~ENICPLB; 77 - R0 = R0 & R1; 78 - 79 - /* Disabling of CPLBs should be proceeded by a CSYNC */ 80 - CSYNC; 81 - [p0] = R0; 67 + r1 = [p5 + (IMEM_CONTROL - COREMMR_BASE)]; 68 + BITCLR (r1, ENICPLB_P); 69 + [p5 + (IMEM_CONTROL - COREMMR_BASE)] = r1; 82 70 SSYNC; 83 71 84 72 /* Turn off the dcache */ 85 - p0.l = LO(DMEM_CONTROL); 86 - p0.h = HI(DMEM_CONTROL); 87 - R1 = [p0]; 88 - R0 = ~ENDCPLB; 89 - R0 = R0 & R1; 90 - 91 - /* Disabling of CPLBs should be proceeded by a CSYNC */ 92 - CSYNC; 93 - [p0] = R0; 73 + r1 = [p5 + (DMEM_CONTROL - COREMMR_BASE)]; 74 + BITCLR (r1, ENDCPLB_P); 75 + [p5 + (DMEM_CONTROL - COREMMR_BASE)] = r1; 94 76 SSYNC; 95 77 96 78 /* in case of double faults, save a few things */ 97 - p0.l = _init_retx_coreb; 98 - p0.h = _init_retx_coreb; 99 - R0 = RETX; 100 - [P0] = R0; 101 - 79 + p1.l = _initial_pda_coreb; 80 + p1.h = _initial_pda_coreb; 81 + r4 = RETX; 102 82 #ifdef CONFIG_DEBUG_DOUBLEFAULT 103 83 /* Only save these if we are storing them, 104 84 * This happens here, since L1 gets clobbered 105 85 * below 106 86 */ 107 87 GET_PDA(p0, r0); 108 - r7 = [p0 + PDA_DF_RETX]; 109 - p1.l = _init_saved_retx_coreb; 110 - p1.h = _init_saved_retx_coreb; 111 - [p1] = r7; 112 - 113 - r7 = [p0 + PDA_DF_DCPLB]; 114 - p1.l = _init_saved_dcplb_fault_addr_coreb; 115 - p1.h = _init_saved_dcplb_fault_addr_coreb; 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; 88 + r0 = [p0 + PDA_DF_RETX]; 89 + r1 = [p0 + PDA_DF_DCPLB]; 90 + r2 = [p0 + PDA_DF_ICPLB]; 91 + r3 = [p0 + PDA_DF_SEQSTAT]; 92 + [p1 + PDA_INIT_DF_RETX] = r0; 93 + [p1 + PDA_INIT_DF_DCPLB] = r1; 94 + [p1 + PDA_INIT_DF_ICPLB] = r2; 95 + [p1 + PDA_INIT_DF_SEQSTAT] = r3; 127 96 #endif 97 + [p1 + PDA_INIT_RETX] = r4; 128 98 129 99 /* Initialize stack pointer */ 130 100 sp.l = lo(INITIAL_STACK); ··· 108 138 109 139 /* EVT15 = _real_start */ 110 140 111 - p0.l = lo(EVT15); 112 - p0.h = hi(EVT15); 113 141 p1.l = _coreb_start; 114 142 p1.h = _coreb_start; 115 - [p0] = p1; 143 + [p5 + (EVT15 - COREMMR_BASE)] = p1; 116 144 csync; 117 145 118 - p0.l = lo(IMASK); 119 - p0.h = hi(IMASK); 120 - p1.l = IMASK_IVG15; 121 - p1.h = 0x0; 122 - [p0] = p1; 123 - csync; 146 + r0 = EVT_IVG15 (z); 147 + sti r0; 124 148 125 149 raise 15; 126 150 p0.l = .LWAIT_HERE;
+565 -455
arch/blackfin/mach-common/dpmc_modes.S
··· 12 12 .section .l1.text 13 13 14 14 ENTRY(_sleep_mode) 15 - [--SP] = ( R7:0, P5:0 ); 16 - [--SP] = RETS; 15 + [--SP] = (R7:4, P5:3); 16 + [--SP] = RETS; 17 17 18 18 call _set_sic_iwr; 19 19 ··· 46 46 call _test_pll_locked; 47 47 48 48 RETS = [SP++]; 49 - ( R7:0, P5:0 ) = [SP++]; 49 + (R7:4, P5:3) = [SP++]; 50 50 RTS; 51 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 61 ENTRY(_hibernate_mode) 54 - [--SP] = ( R7:0, P5:0 ); 55 - [--SP] = RETS; 62 + /* Save/setup the regs we need early for minor pipeline optimization */ 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 68 R0 = IWR_DISABLE_ALL; 59 69 R1 = IWR_DISABLE_ALL; 60 70 R2 = IWR_DISABLE_ALL; ··· 72 62 call _set_dram_srfs; 73 63 SSYNC; 74 64 75 - P0.H = hi(VR_CTL); 76 - P0.L = lo(VR_CTL); 77 - 78 - W[P0] = R3.L; 65 + /* Finally, we climb into our cave to hibernate */ 66 + W[P3] = R4.L; 79 67 CLI R2; 80 68 IDLE; 81 69 .Lforever: ··· 81 73 ENDPROC(_hibernate_mode) 82 74 83 75 ENTRY(_sleep_deeper) 84 - [--SP] = ( R7:0, P5:0 ); 85 - [--SP] = RETS; 76 + [--SP] = (R7:4, P5:3); 77 + [--SP] = RETS; 86 78 87 79 CLI R4; 88 80 ··· 175 167 STI R4; 176 168 177 169 RETS = [SP++]; 178 - ( R7:0, P5:0 ) = [SP++]; 170 + (R7:4, P5:3) = [SP++]; 179 171 RTS; 180 172 ENDPROC(_sleep_deeper) 181 173 ··· 196 188 #else /* SDRAM */ 197 189 P0.L = lo(EBIU_SDGCTL); 198 190 P0.H = hi(EBIU_SDGCTL); 191 + P1.L = lo(EBIU_SDSTAT); 192 + P1.H = hi(EBIU_SDSTAT); 193 + 199 194 R2 = [P0]; 200 195 BITSET(R2, 24); /* SRFS enter self-refresh mode */ 201 196 [P0] = R2; 202 197 SSYNC; 203 198 204 - P0.L = lo(EBIU_SDSTAT); 205 - P0.H = hi(EBIU_SDSTAT); 206 199 1: 207 - R2 = w[P0]; 200 + R2 = w[P1]; 208 201 SSYNC; 209 202 cc = BITTST(R2, 1); /* SDSRA poll self-refresh status */ 210 203 if !cc jump 1b; 211 204 212 - P0.L = lo(EBIU_SDGCTL); 213 - P0.H = hi(EBIU_SDGCTL); 214 205 R2 = [P0]; 215 206 BITCLR(R2, 0); /* SCTLE disable CLKOUT */ 216 207 [P0] = R2; ··· 219 212 220 213 ENTRY(_unset_dram_srfs) 221 214 /* set the dram out of self refresh mode */ 215 + 222 216 #if defined(EBIU_RSTCTL) /* DDR */ 223 217 P0.H = hi(EBIU_RSTCTL); 224 218 P0.L = lo(EBIU_RSTCTL); ··· 227 219 BITCLR(R2, 3); /* clear SRREQ bit */ 228 220 [P0] = R2; 229 221 #elif defined(EBIU_SDGCTL) /* SDRAM */ 230 - 231 - P0.L = lo(EBIU_SDGCTL); /* release CLKOUT from self-refresh */ 222 + /* release CLKOUT from self-refresh */ 223 + P0.L = lo(EBIU_SDGCTL); 232 224 P0.H = hi(EBIU_SDGCTL); 225 + 233 226 R2 = [P0]; 234 227 BITSET(R2, 0); /* SCTLE enable CLKOUT */ 235 228 [P0] = R2 236 229 SSYNC; 237 230 238 - P0.L = lo(EBIU_SDGCTL); /* release SDRAM from self-refresh */ 239 - P0.H = hi(EBIU_SDGCTL); 231 + /* release SDRAM from self-refresh */ 240 232 R2 = [P0]; 241 233 BITCLR(R2, 24); /* clear SRFS bit */ 242 234 [P0] = R2 243 235 #endif 236 + 244 237 SSYNC; 245 238 RTS; 246 239 ENDPROC(_unset_dram_srfs) 247 240 248 241 ENTRY(_set_sic_iwr) 249 - #if defined(CONFIG_BF54x) || defined(CONFIG_BF52x) || defined(CONFIG_BF561) || \ 250 - defined(CONFIG_BF538) || defined(CONFIG_BF539) || defined(CONFIG_BF51x) 251 - P0.H = hi(SIC_IWR0); 252 - P0.L = lo(SIC_IWR0); 253 - P1.H = hi(SIC_IWR1); 254 - P1.L = lo(SIC_IWR1); 255 - [P1] = R1; 256 - #if defined(CONFIG_BF54x) 257 - P1.H = hi(SIC_IWR2); 258 - P1.L = lo(SIC_IWR2); 259 - [P1] = R2; 260 - #endif 242 + #ifdef SIC_IWR0 243 + P0.H = hi(SYSMMR_BASE); 244 + P0.L = lo(SYSMMR_BASE); 245 + [P0 + (SIC_IWR0 - SYSMMR_BASE)] = R0; 246 + [P0 + (SIC_IWR1 - SYSMMR_BASE)] = R1; 247 + # ifdef SIC_IWR2 248 + [P0 + (SIC_IWR2 - SYSMMR_BASE)] = R2; 249 + # endif 261 250 #else 262 251 P0.H = hi(SIC_IWR); 263 252 P0.L = lo(SIC_IWR); 264 - #endif 265 253 [P0] = R0; 254 + #endif 266 255 267 256 SSYNC; 268 257 RTS; ··· 277 272 278 273 .section .text 279 274 275 + #define PM_REG0 R7 276 + #define PM_REG1 R6 277 + #define PM_REG2 R5 278 + #define PM_REG3 R4 279 + #define PM_REG4 R3 280 + #define PM_REG5 R2 281 + #define PM_REG6 R1 282 + #define PM_REG7 R0 283 + #define PM_REG8 P5 284 + #define PM_REG9 P4 285 + #define PM_REG10 P3 286 + #define PM_REG11 P2 287 + #define PM_REG12 P1 288 + #define PM_REG13 P0 289 + 290 + #define PM_REGSET0 R7:7 291 + #define PM_REGSET1 R7:6 292 + #define PM_REGSET2 R7:5 293 + #define PM_REGSET3 R7:4 294 + #define PM_REGSET4 R7:3 295 + #define PM_REGSET5 R7:2 296 + #define PM_REGSET6 R7:1 297 + #define PM_REGSET7 R7:0 298 + #define PM_REGSET8 R7:0, P5:5 299 + #define PM_REGSET9 R7:0, P5:4 300 + #define PM_REGSET10 R7:0, P5:3 301 + #define PM_REGSET11 R7:0, P5:2 302 + #define PM_REGSET12 R7:0, P5:1 303 + #define PM_REGSET13 R7:0, P5:0 304 + 305 + #define _PM_PUSH(n, x, w, base) PM_REG##n = w[FP + ((x) - (base))]; 306 + #define _PM_POP(n, x, w, base) w[FP + ((x) - (base))] = PM_REG##n; 307 + #define PM_PUSH_SYNC(n) [--sp] = (PM_REGSET##n); 308 + #define PM_POP_SYNC(n) (PM_REGSET##n) = [sp++]; 309 + #define PM_PUSH(n, x) PM_REG##n = [FP++]; 310 + #define PM_POP(n, x) [FP--] = PM_REG##n; 311 + #define PM_CORE_PUSH(n, x) _PM_PUSH(n, x, , COREMMR_BASE) 312 + #define PM_CORE_POP(n, x) _PM_POP(n, x, , COREMMR_BASE) 313 + #define PM_SYS_PUSH(n, x) _PM_PUSH(n, x, , SYSMMR_BASE) 314 + #define PM_SYS_POP(n, x) _PM_POP(n, x, , SYSMMR_BASE) 315 + #define PM_SYS_PUSH16(n, x) _PM_PUSH(n, x, w, SYSMMR_BASE) 316 + #define PM_SYS_POP16(n, x) _PM_POP(n, x, w, SYSMMR_BASE) 317 + 280 318 ENTRY(_do_hibernate) 281 - [--SP] = ( R7:0, P5:0 ); 282 - [--SP] = RETS; 283 - /* Save System MMRs */ 284 - R2 = R0; 285 - P0.H = hi(PLL_CTL); 286 - P0.L = lo(PLL_CTL); 287 - 288 - #ifdef SIC_IMASK0 289 - PM_SYS_PUSH(SIC_IMASK0) 290 - #endif 291 - #ifdef SIC_IMASK1 292 - PM_SYS_PUSH(SIC_IMASK1) 293 - #endif 294 - #ifdef SIC_IMASK2 295 - PM_SYS_PUSH(SIC_IMASK2) 296 - #endif 297 - #ifdef SIC_IMASK 298 - PM_SYS_PUSH(SIC_IMASK) 299 - #endif 300 - #ifdef SIC_IAR0 301 - PM_SYS_PUSH(SIC_IAR0) 302 - PM_SYS_PUSH(SIC_IAR1) 303 - PM_SYS_PUSH(SIC_IAR2) 304 - #endif 305 - #ifdef SIC_IAR3 306 - PM_SYS_PUSH(SIC_IAR3) 307 - #endif 308 - #ifdef SIC_IAR4 309 - PM_SYS_PUSH(SIC_IAR4) 310 - PM_SYS_PUSH(SIC_IAR5) 311 - PM_SYS_PUSH(SIC_IAR6) 312 - #endif 313 - #ifdef SIC_IAR7 314 - PM_SYS_PUSH(SIC_IAR7) 315 - #endif 316 - #ifdef SIC_IAR8 317 - PM_SYS_PUSH(SIC_IAR8) 318 - PM_SYS_PUSH(SIC_IAR9) 319 - PM_SYS_PUSH(SIC_IAR10) 320 - PM_SYS_PUSH(SIC_IAR11) 321 - #endif 322 - 323 - #ifdef SIC_IWR 324 - PM_SYS_PUSH(SIC_IWR) 325 - #endif 326 - #ifdef SIC_IWR0 327 - PM_SYS_PUSH(SIC_IWR0) 328 - #endif 329 - #ifdef SIC_IWR1 330 - PM_SYS_PUSH(SIC_IWR1) 331 - #endif 332 - #ifdef SIC_IWR2 333 - PM_SYS_PUSH(SIC_IWR2) 334 - #endif 335 - 336 - #ifdef PINT0_ASSIGN 337 - PM_SYS_PUSH(PINT0_MASK_SET) 338 - PM_SYS_PUSH(PINT1_MASK_SET) 339 - PM_SYS_PUSH(PINT2_MASK_SET) 340 - PM_SYS_PUSH(PINT3_MASK_SET) 341 - PM_SYS_PUSH(PINT0_ASSIGN) 342 - PM_SYS_PUSH(PINT1_ASSIGN) 343 - PM_SYS_PUSH(PINT2_ASSIGN) 344 - PM_SYS_PUSH(PINT3_ASSIGN) 345 - PM_SYS_PUSH(PINT0_INVERT_SET) 346 - PM_SYS_PUSH(PINT1_INVERT_SET) 347 - PM_SYS_PUSH(PINT2_INVERT_SET) 348 - PM_SYS_PUSH(PINT3_INVERT_SET) 349 - PM_SYS_PUSH(PINT0_EDGE_SET) 350 - PM_SYS_PUSH(PINT1_EDGE_SET) 351 - PM_SYS_PUSH(PINT2_EDGE_SET) 352 - PM_SYS_PUSH(PINT3_EDGE_SET) 353 - #endif 354 - 355 - PM_SYS_PUSH(EBIU_AMBCTL0) 356 - PM_SYS_PUSH(EBIU_AMBCTL1) 357 - PM_SYS_PUSH16(EBIU_AMGCTL) 358 - 359 - #ifdef EBIU_FCTL 360 - PM_SYS_PUSH(EBIU_MBSCTL) 361 - PM_SYS_PUSH(EBIU_MODE) 362 - PM_SYS_PUSH(EBIU_FCTL) 363 - #endif 364 - 365 - #ifdef PORTCIO_FER 366 - PM_SYS_PUSH16(PORTCIO_DIR) 367 - PM_SYS_PUSH16(PORTCIO_INEN) 368 - PM_SYS_PUSH16(PORTCIO) 369 - PM_SYS_PUSH16(PORTCIO_FER) 370 - PM_SYS_PUSH16(PORTDIO_DIR) 371 - PM_SYS_PUSH16(PORTDIO_INEN) 372 - PM_SYS_PUSH16(PORTDIO) 373 - PM_SYS_PUSH16(PORTDIO_FER) 374 - PM_SYS_PUSH16(PORTEIO_DIR) 375 - PM_SYS_PUSH16(PORTEIO_INEN) 376 - PM_SYS_PUSH16(PORTEIO) 377 - PM_SYS_PUSH16(PORTEIO_FER) 378 - #endif 379 - 380 - PM_SYS_PUSH16(SYSCR) 381 - 382 - /* Save Core MMRs */ 383 - P0.H = hi(SRAM_BASE_ADDRESS); 384 - P0.L = lo(SRAM_BASE_ADDRESS); 385 - 386 - PM_PUSH(DMEM_CONTROL) 387 - PM_PUSH(DCPLB_ADDR0) 388 - PM_PUSH(DCPLB_ADDR1) 389 - PM_PUSH(DCPLB_ADDR2) 390 - PM_PUSH(DCPLB_ADDR3) 391 - PM_PUSH(DCPLB_ADDR4) 392 - PM_PUSH(DCPLB_ADDR5) 393 - PM_PUSH(DCPLB_ADDR6) 394 - PM_PUSH(DCPLB_ADDR7) 395 - PM_PUSH(DCPLB_ADDR8) 396 - PM_PUSH(DCPLB_ADDR9) 397 - PM_PUSH(DCPLB_ADDR10) 398 - PM_PUSH(DCPLB_ADDR11) 399 - PM_PUSH(DCPLB_ADDR12) 400 - PM_PUSH(DCPLB_ADDR13) 401 - PM_PUSH(DCPLB_ADDR14) 402 - PM_PUSH(DCPLB_ADDR15) 403 - PM_PUSH(DCPLB_DATA0) 404 - PM_PUSH(DCPLB_DATA1) 405 - PM_PUSH(DCPLB_DATA2) 406 - PM_PUSH(DCPLB_DATA3) 407 - PM_PUSH(DCPLB_DATA4) 408 - PM_PUSH(DCPLB_DATA5) 409 - PM_PUSH(DCPLB_DATA6) 410 - PM_PUSH(DCPLB_DATA7) 411 - PM_PUSH(DCPLB_DATA8) 412 - PM_PUSH(DCPLB_DATA9) 413 - PM_PUSH(DCPLB_DATA10) 414 - PM_PUSH(DCPLB_DATA11) 415 - PM_PUSH(DCPLB_DATA12) 416 - PM_PUSH(DCPLB_DATA13) 417 - PM_PUSH(DCPLB_DATA14) 418 - PM_PUSH(DCPLB_DATA15) 419 - PM_PUSH(IMEM_CONTROL) 420 - PM_PUSH(ICPLB_ADDR0) 421 - PM_PUSH(ICPLB_ADDR1) 422 - PM_PUSH(ICPLB_ADDR2) 423 - PM_PUSH(ICPLB_ADDR3) 424 - PM_PUSH(ICPLB_ADDR4) 425 - PM_PUSH(ICPLB_ADDR5) 426 - PM_PUSH(ICPLB_ADDR6) 427 - PM_PUSH(ICPLB_ADDR7) 428 - PM_PUSH(ICPLB_ADDR8) 429 - PM_PUSH(ICPLB_ADDR9) 430 - PM_PUSH(ICPLB_ADDR10) 431 - PM_PUSH(ICPLB_ADDR11) 432 - PM_PUSH(ICPLB_ADDR12) 433 - PM_PUSH(ICPLB_ADDR13) 434 - PM_PUSH(ICPLB_ADDR14) 435 - PM_PUSH(ICPLB_ADDR15) 436 - PM_PUSH(ICPLB_DATA0) 437 - PM_PUSH(ICPLB_DATA1) 438 - PM_PUSH(ICPLB_DATA2) 439 - PM_PUSH(ICPLB_DATA3) 440 - PM_PUSH(ICPLB_DATA4) 441 - PM_PUSH(ICPLB_DATA5) 442 - PM_PUSH(ICPLB_DATA6) 443 - PM_PUSH(ICPLB_DATA7) 444 - PM_PUSH(ICPLB_DATA8) 445 - PM_PUSH(ICPLB_DATA9) 446 - PM_PUSH(ICPLB_DATA10) 447 - PM_PUSH(ICPLB_DATA11) 448 - PM_PUSH(ICPLB_DATA12) 449 - PM_PUSH(ICPLB_DATA13) 450 - PM_PUSH(ICPLB_DATA14) 451 - PM_PUSH(ICPLB_DATA15) 452 - PM_PUSH(EVT0) 453 - PM_PUSH(EVT1) 454 - PM_PUSH(EVT2) 455 - PM_PUSH(EVT3) 456 - PM_PUSH(EVT4) 457 - PM_PUSH(EVT5) 458 - PM_PUSH(EVT6) 459 - PM_PUSH(EVT7) 460 - PM_PUSH(EVT8) 461 - PM_PUSH(EVT9) 462 - PM_PUSH(EVT10) 463 - PM_PUSH(EVT11) 464 - PM_PUSH(EVT12) 465 - PM_PUSH(EVT13) 466 - PM_PUSH(EVT14) 467 - PM_PUSH(EVT15) 468 - PM_PUSH(IMASK) 469 - PM_PUSH(ILAT) 470 - PM_PUSH(IPRIO) 471 - PM_PUSH(TCNTL) 472 - PM_PUSH(TPERIOD) 473 - PM_PUSH(TSCALE) 474 - PM_PUSH(TCOUNT) 475 - PM_PUSH(TBUFCTL) 476 - 477 - /* Save Core Registers */ 478 - [--sp] = SYSCFG; 479 - [--sp] = ( R7:0, P5:0 ); 319 + /* 320 + * Save the core regs early so we can blow them away when 321 + * saving/restoring MMR states 322 + */ 323 + [--sp] = (R7:0, P5:0); 480 324 [--sp] = fp; 481 325 [--sp] = usp; 482 326 ··· 360 506 [--sp] = LB0; 361 507 [--sp] = LB1; 362 508 509 + /* We can't push RETI directly as that'll change IPEND[4] */ 510 + r7 = RETI; 511 + [--sp] = RETS; 363 512 [--sp] = ASTAT; 364 513 [--sp] = CYCLES; 365 514 [--sp] = CYCLES2; 366 - 367 - [--sp] = RETS; 368 - r0 = RETI; 369 - [--sp] = r0; 515 + [--sp] = SYSCFG; 370 516 [--sp] = RETX; 371 - [--sp] = RETN; 372 - [--sp] = RETE; 373 517 [--sp] = SEQSTAT; 518 + [--sp] = r7; 519 + 520 + /* Save first func arg in M3 */ 521 + M3 = R0; 522 + 523 + /* Save system MMRs */ 524 + FP.H = hi(SYSMMR_BASE); 525 + FP.L = lo(SYSMMR_BASE); 526 + 527 + #ifdef SIC_IMASK0 528 + PM_SYS_PUSH(0, SIC_IMASK0) 529 + PM_SYS_PUSH(1, SIC_IMASK1) 530 + # ifdef SIC_IMASK2 531 + PM_SYS_PUSH(2, SIC_IMASK2) 532 + # endif 533 + #else 534 + PM_SYS_PUSH(0, SIC_IMASK) 535 + #endif 536 + #ifdef SIC_IAR0 537 + PM_SYS_PUSH(3, SIC_IAR0) 538 + PM_SYS_PUSH(4, SIC_IAR1) 539 + PM_SYS_PUSH(5, SIC_IAR2) 540 + #endif 541 + #ifdef SIC_IAR3 542 + PM_SYS_PUSH(6, SIC_IAR3) 543 + #endif 544 + #ifdef SIC_IAR4 545 + PM_SYS_PUSH(7, SIC_IAR4) 546 + PM_SYS_PUSH(8, SIC_IAR5) 547 + PM_SYS_PUSH(9, SIC_IAR6) 548 + #endif 549 + #ifdef SIC_IAR7 550 + PM_SYS_PUSH(10, SIC_IAR7) 551 + #endif 552 + #ifdef SIC_IAR8 553 + PM_SYS_PUSH(11, SIC_IAR8) 554 + PM_SYS_PUSH(12, SIC_IAR9) 555 + PM_SYS_PUSH(13, SIC_IAR10) 556 + #endif 557 + PM_PUSH_SYNC(13) 558 + #ifdef SIC_IAR11 559 + PM_SYS_PUSH(0, SIC_IAR11) 560 + #endif 561 + 562 + #ifdef SIC_IWR 563 + PM_SYS_PUSH(1, SIC_IWR) 564 + #endif 565 + #ifdef SIC_IWR0 566 + PM_SYS_PUSH(1, SIC_IWR0) 567 + #endif 568 + #ifdef SIC_IWR1 569 + PM_SYS_PUSH(2, SIC_IWR1) 570 + #endif 571 + #ifdef SIC_IWR2 572 + PM_SYS_PUSH(3, SIC_IWR2) 573 + #endif 574 + 575 + #ifdef PINT0_ASSIGN 576 + PM_SYS_PUSH(4, PINT0_MASK_SET) 577 + PM_SYS_PUSH(5, PINT1_MASK_SET) 578 + PM_SYS_PUSH(6, PINT2_MASK_SET) 579 + PM_SYS_PUSH(7, PINT3_MASK_SET) 580 + PM_SYS_PUSH(8, PINT0_ASSIGN) 581 + PM_SYS_PUSH(9, PINT1_ASSIGN) 582 + PM_SYS_PUSH(10, PINT2_ASSIGN) 583 + PM_SYS_PUSH(11, PINT3_ASSIGN) 584 + PM_SYS_PUSH(12, PINT0_INVERT_SET) 585 + PM_SYS_PUSH(13, PINT1_INVERT_SET) 586 + PM_PUSH_SYNC(13) 587 + PM_SYS_PUSH(0, PINT2_INVERT_SET) 588 + PM_SYS_PUSH(1, PINT3_INVERT_SET) 589 + PM_SYS_PUSH(2, PINT0_EDGE_SET) 590 + PM_SYS_PUSH(3, PINT1_EDGE_SET) 591 + PM_SYS_PUSH(4, PINT2_EDGE_SET) 592 + PM_SYS_PUSH(5, PINT3_EDGE_SET) 593 + #endif 594 + 595 + PM_SYS_PUSH16(6, SYSCR) 596 + 597 + PM_SYS_PUSH16(7, EBIU_AMGCTL) 598 + PM_SYS_PUSH(8, EBIU_AMBCTL0) 599 + PM_SYS_PUSH(9, EBIU_AMBCTL1) 600 + #ifdef EBIU_FCTL 601 + PM_SYS_PUSH(10, EBIU_MBSCTL) 602 + PM_SYS_PUSH(11, EBIU_MODE) 603 + PM_SYS_PUSH(12, EBIU_FCTL) 604 + PM_PUSH_SYNC(12) 605 + #else 606 + PM_PUSH_SYNC(9) 607 + #endif 608 + 609 + /* Save Core MMRs */ 610 + I0.H = hi(COREMMR_BASE); 611 + I0.L = lo(COREMMR_BASE); 612 + I1 = I0; 613 + I2 = I0; 614 + I3 = I0; 615 + B0 = I0; 616 + B1 = I0; 617 + B2 = I0; 618 + B3 = I0; 619 + I1.L = lo(DCPLB_ADDR0); 620 + I2.L = lo(DCPLB_DATA0); 621 + I3.L = lo(ICPLB_ADDR0); 622 + B0.L = lo(ICPLB_DATA0); 623 + B1.L = lo(EVT2); 624 + B2.L = lo(IMASK); 625 + B3.L = lo(TCNTL); 626 + 627 + /* DCPLB Addr */ 628 + FP = I1; 629 + PM_PUSH(0, DCPLB_ADDR0) 630 + PM_PUSH(1, DCPLB_ADDR1) 631 + PM_PUSH(2, DCPLB_ADDR2) 632 + PM_PUSH(3, DCPLB_ADDR3) 633 + PM_PUSH(4, DCPLB_ADDR4) 634 + PM_PUSH(5, DCPLB_ADDR5) 635 + PM_PUSH(6, DCPLB_ADDR6) 636 + PM_PUSH(7, DCPLB_ADDR7) 637 + PM_PUSH(8, DCPLB_ADDR8) 638 + PM_PUSH(9, DCPLB_ADDR9) 639 + PM_PUSH(10, DCPLB_ADDR10) 640 + PM_PUSH(11, DCPLB_ADDR11) 641 + PM_PUSH(12, DCPLB_ADDR12) 642 + PM_PUSH(13, DCPLB_ADDR13) 643 + PM_PUSH_SYNC(13) 644 + PM_PUSH(0, DCPLB_ADDR14) 645 + PM_PUSH(1, DCPLB_ADDR15) 646 + 647 + /* DCPLB Data */ 648 + FP = I2; 649 + PM_PUSH(2, DCPLB_DATA0) 650 + PM_PUSH(3, DCPLB_DATA1) 651 + PM_PUSH(4, DCPLB_DATA2) 652 + PM_PUSH(5, DCPLB_DATA3) 653 + PM_PUSH(6, DCPLB_DATA4) 654 + PM_PUSH(7, DCPLB_DATA5) 655 + PM_PUSH(8, DCPLB_DATA6) 656 + PM_PUSH(9, DCPLB_DATA7) 657 + PM_PUSH(10, DCPLB_DATA8) 658 + PM_PUSH(11, DCPLB_DATA9) 659 + PM_PUSH(12, DCPLB_DATA10) 660 + PM_PUSH(13, DCPLB_DATA11) 661 + PM_PUSH_SYNC(13) 662 + PM_PUSH(0, DCPLB_DATA12) 663 + PM_PUSH(1, DCPLB_DATA13) 664 + PM_PUSH(2, DCPLB_DATA14) 665 + PM_PUSH(3, DCPLB_DATA15) 666 + 667 + /* ICPLB Addr */ 668 + FP = I3; 669 + PM_PUSH(4, ICPLB_ADDR0) 670 + PM_PUSH(5, ICPLB_ADDR1) 671 + PM_PUSH(6, ICPLB_ADDR2) 672 + PM_PUSH(7, ICPLB_ADDR3) 673 + PM_PUSH(8, ICPLB_ADDR4) 674 + PM_PUSH(9, ICPLB_ADDR5) 675 + PM_PUSH(10, ICPLB_ADDR6) 676 + PM_PUSH(11, ICPLB_ADDR7) 677 + PM_PUSH(12, ICPLB_ADDR8) 678 + PM_PUSH(13, ICPLB_ADDR9) 679 + PM_PUSH_SYNC(13) 680 + PM_PUSH(0, ICPLB_ADDR10) 681 + PM_PUSH(1, ICPLB_ADDR11) 682 + PM_PUSH(2, ICPLB_ADDR12) 683 + PM_PUSH(3, ICPLB_ADDR13) 684 + PM_PUSH(4, ICPLB_ADDR14) 685 + PM_PUSH(5, ICPLB_ADDR15) 686 + 687 + /* ICPLB Data */ 688 + FP = B0; 689 + PM_PUSH(6, ICPLB_DATA0) 690 + PM_PUSH(7, ICPLB_DATA1) 691 + PM_PUSH(8, ICPLB_DATA2) 692 + PM_PUSH(9, ICPLB_DATA3) 693 + PM_PUSH(10, ICPLB_DATA4) 694 + PM_PUSH(11, ICPLB_DATA5) 695 + PM_PUSH(12, ICPLB_DATA6) 696 + PM_PUSH(13, ICPLB_DATA7) 697 + PM_PUSH_SYNC(13) 698 + PM_PUSH(0, ICPLB_DATA8) 699 + PM_PUSH(1, ICPLB_DATA9) 700 + PM_PUSH(2, ICPLB_DATA10) 701 + PM_PUSH(3, ICPLB_DATA11) 702 + PM_PUSH(4, ICPLB_DATA12) 703 + PM_PUSH(5, ICPLB_DATA13) 704 + PM_PUSH(6, ICPLB_DATA14) 705 + PM_PUSH(7, ICPLB_DATA15) 706 + 707 + /* Event Vectors */ 708 + FP = B1; 709 + PM_PUSH(8, EVT2) 710 + PM_PUSH(9, EVT3) 711 + FP += 4; /* EVT4 */ 712 + PM_PUSH(10, EVT5) 713 + PM_PUSH(11, EVT6) 714 + PM_PUSH(12, EVT7) 715 + PM_PUSH(13, EVT8) 716 + PM_PUSH_SYNC(13) 717 + PM_PUSH(0, EVT9) 718 + PM_PUSH(1, EVT10) 719 + PM_PUSH(2, EVT11) 720 + PM_PUSH(3, EVT12) 721 + PM_PUSH(4, EVT13) 722 + PM_PUSH(5, EVT14) 723 + PM_PUSH(6, EVT15) 724 + 725 + /* CEC */ 726 + FP = B2; 727 + PM_PUSH(7, IMASK) 728 + FP += 4; /* IPEND */ 729 + PM_PUSH(8, ILAT) 730 + PM_PUSH(9, IPRIO) 731 + 732 + /* Core Timer */ 733 + FP = B3; 734 + PM_PUSH(10, TCNTL) 735 + PM_PUSH(11, TPERIOD) 736 + PM_PUSH(12, TSCALE) 737 + PM_PUSH(13, TCOUNT) 738 + PM_PUSH_SYNC(13) 739 + 740 + /* Misc non-contiguous registers */ 741 + FP = I0; 742 + PM_CORE_PUSH(0, DMEM_CONTROL); 743 + PM_CORE_PUSH(1, IMEM_CONTROL); 744 + PM_CORE_PUSH(2, TBUFCTL); 745 + PM_PUSH_SYNC(2) 746 + 747 + /* Setup args to hibernate mode early for pipeline optimization */ 748 + R0 = M3; 749 + P1.H = _hibernate_mode; 750 + P1.L = _hibernate_mode; 374 751 375 752 /* Save Magic, return address and Stack Pointer */ 376 - P0.H = 0; 377 - P0.L = 0; 378 - R0.H = 0xDEAD; /* Hibernate Magic */ 379 - R0.L = 0xBEEF; 380 - [P0++] = R0; /* Store Hibernate Magic */ 381 - R0.H = .Lpm_resume_here; 382 - R0.L = .Lpm_resume_here; 383 - [P0++] = R0; /* Save Return Address */ 753 + P0 = 0; 754 + R1.H = 0xDEAD; /* Hibernate Magic */ 755 + R1.L = 0xBEEF; 756 + R2.H = .Lpm_resume_here; 757 + R2.L = .Lpm_resume_here; 758 + [P0++] = R1; /* Store Hibernate Magic */ 759 + [P0++] = R2; /* Save Return Address */ 384 760 [P0++] = SP; /* Save Stack Pointer */ 385 - P0.H = _hibernate_mode; 386 - P0.L = _hibernate_mode; 387 - R0 = R2; 388 - call (P0); /* Goodbye */ 761 + 762 + /* Must use an indirect call as we need to jump to L1 */ 763 + call (P1); /* Goodbye */ 389 764 390 765 .Lpm_resume_here: 391 766 392 - /* Restore Core Registers */ 393 - SEQSTAT = [sp++]; 394 - RETE = [sp++]; 395 - RETN = [sp++]; 396 - RETX = [sp++]; 397 - r0 = [sp++]; 398 - RETI = r0; 399 - RETS = [sp++]; 767 + /* Restore Core MMRs */ 768 + I0.H = hi(COREMMR_BASE); 769 + I0.L = lo(COREMMR_BASE); 770 + I1 = I0; 771 + I2 = I0; 772 + I3 = I0; 773 + B0 = I0; 774 + B1 = I0; 775 + B2 = I0; 776 + B3 = I0; 777 + I1.L = lo(DCPLB_ADDR15); 778 + I2.L = lo(DCPLB_DATA15); 779 + I3.L = lo(ICPLB_ADDR15); 780 + B0.L = lo(ICPLB_DATA15); 781 + B1.L = lo(EVT15); 782 + B2.L = lo(IPRIO); 783 + B3.L = lo(TCOUNT); 400 784 785 + /* Misc non-contiguous registers */ 786 + FP = I0; 787 + PM_POP_SYNC(2) 788 + PM_CORE_POP(2, TBUFCTL) 789 + PM_CORE_POP(1, IMEM_CONTROL) 790 + PM_CORE_POP(0, DMEM_CONTROL) 791 + 792 + /* Core Timer */ 793 + PM_POP_SYNC(13) 794 + FP = B3; 795 + PM_POP(13, TCOUNT) 796 + PM_POP(12, TSCALE) 797 + PM_POP(11, TPERIOD) 798 + PM_POP(10, TCNTL) 799 + 800 + /* CEC */ 801 + FP = B2; 802 + PM_POP(9, IPRIO) 803 + PM_POP(8, ILAT) 804 + FP += -4; /* IPEND */ 805 + PM_POP(7, IMASK) 806 + 807 + /* Event Vectors */ 808 + FP = B1; 809 + PM_POP(6, EVT15) 810 + PM_POP(5, EVT14) 811 + PM_POP(4, EVT13) 812 + PM_POP(3, EVT12) 813 + PM_POP(2, EVT11) 814 + PM_POP(1, EVT10) 815 + PM_POP(0, EVT9) 816 + PM_POP_SYNC(13) 817 + PM_POP(13, EVT8) 818 + PM_POP(12, EVT7) 819 + PM_POP(11, EVT6) 820 + PM_POP(10, EVT5) 821 + FP += -4; /* EVT4 */ 822 + PM_POP(9, EVT3) 823 + PM_POP(8, EVT2) 824 + 825 + /* ICPLB Data */ 826 + FP = B0; 827 + PM_POP(7, ICPLB_DATA15) 828 + PM_POP(6, ICPLB_DATA14) 829 + PM_POP(5, ICPLB_DATA13) 830 + PM_POP(4, ICPLB_DATA12) 831 + PM_POP(3, ICPLB_DATA11) 832 + PM_POP(2, ICPLB_DATA10) 833 + PM_POP(1, ICPLB_DATA9) 834 + PM_POP(0, ICPLB_DATA8) 835 + PM_POP_SYNC(13) 836 + PM_POP(13, ICPLB_DATA7) 837 + PM_POP(12, ICPLB_DATA6) 838 + PM_POP(11, ICPLB_DATA5) 839 + PM_POP(10, ICPLB_DATA4) 840 + PM_POP(9, ICPLB_DATA3) 841 + PM_POP(8, ICPLB_DATA2) 842 + PM_POP(7, ICPLB_DATA1) 843 + PM_POP(6, ICPLB_DATA0) 844 + 845 + /* ICPLB Addr */ 846 + FP = I3; 847 + PM_POP(5, ICPLB_ADDR15) 848 + PM_POP(4, ICPLB_ADDR14) 849 + PM_POP(3, ICPLB_ADDR13) 850 + PM_POP(2, ICPLB_ADDR12) 851 + PM_POP(1, ICPLB_ADDR11) 852 + PM_POP(0, ICPLB_ADDR10) 853 + PM_POP_SYNC(13) 854 + PM_POP(13, ICPLB_ADDR9) 855 + PM_POP(12, ICPLB_ADDR8) 856 + PM_POP(11, ICPLB_ADDR7) 857 + PM_POP(10, ICPLB_ADDR6) 858 + PM_POP(9, ICPLB_ADDR5) 859 + PM_POP(8, ICPLB_ADDR4) 860 + PM_POP(7, ICPLB_ADDR3) 861 + PM_POP(6, ICPLB_ADDR2) 862 + PM_POP(5, ICPLB_ADDR1) 863 + PM_POP(4, ICPLB_ADDR0) 864 + 865 + /* DCPLB Data */ 866 + FP = I2; 867 + PM_POP(3, DCPLB_DATA15) 868 + PM_POP(2, DCPLB_DATA14) 869 + PM_POP(1, DCPLB_DATA13) 870 + PM_POP(0, DCPLB_DATA12) 871 + PM_POP_SYNC(13) 872 + PM_POP(13, DCPLB_DATA11) 873 + PM_POP(12, DCPLB_DATA10) 874 + PM_POP(11, DCPLB_DATA9) 875 + PM_POP(10, DCPLB_DATA8) 876 + PM_POP(9, DCPLB_DATA7) 877 + PM_POP(8, DCPLB_DATA6) 878 + PM_POP(7, DCPLB_DATA5) 879 + PM_POP(6, DCPLB_DATA4) 880 + PM_POP(5, DCPLB_DATA3) 881 + PM_POP(4, DCPLB_DATA2) 882 + PM_POP(3, DCPLB_DATA1) 883 + PM_POP(2, DCPLB_DATA0) 884 + 885 + /* DCPLB Addr */ 886 + FP = I1; 887 + PM_POP(1, DCPLB_ADDR15) 888 + PM_POP(0, DCPLB_ADDR14) 889 + PM_POP_SYNC(13) 890 + PM_POP(13, DCPLB_ADDR13) 891 + PM_POP(12, DCPLB_ADDR12) 892 + PM_POP(11, DCPLB_ADDR11) 893 + PM_POP(10, DCPLB_ADDR10) 894 + PM_POP(9, DCPLB_ADDR9) 895 + PM_POP(8, DCPLB_ADDR8) 896 + PM_POP(7, DCPLB_ADDR7) 897 + PM_POP(6, DCPLB_ADDR6) 898 + PM_POP(5, DCPLB_ADDR5) 899 + PM_POP(4, DCPLB_ADDR4) 900 + PM_POP(3, DCPLB_ADDR3) 901 + PM_POP(2, DCPLB_ADDR2) 902 + PM_POP(1, DCPLB_ADDR1) 903 + PM_POP(0, DCPLB_ADDR0) 904 + 905 + /* Restore System MMRs */ 906 + FP.H = hi(SYSMMR_BASE); 907 + FP.L = lo(SYSMMR_BASE); 908 + 909 + #ifdef EBIU_FCTL 910 + PM_POP_SYNC(12) 911 + PM_SYS_POP(12, EBIU_FCTL) 912 + PM_SYS_POP(11, EBIU_MODE) 913 + PM_SYS_POP(10, EBIU_MBSCTL) 914 + #else 915 + PM_POP_SYNC(9) 916 + #endif 917 + PM_SYS_POP(9, EBIU_AMBCTL1) 918 + PM_SYS_POP(8, EBIU_AMBCTL0) 919 + PM_SYS_POP16(7, EBIU_AMGCTL) 920 + 921 + PM_SYS_POP16(6, SYSCR) 922 + 923 + #ifdef PINT0_ASSIGN 924 + PM_SYS_POP(5, PINT3_EDGE_SET) 925 + PM_SYS_POP(4, PINT2_EDGE_SET) 926 + PM_SYS_POP(3, PINT1_EDGE_SET) 927 + PM_SYS_POP(2, PINT0_EDGE_SET) 928 + PM_SYS_POP(1, PINT3_INVERT_SET) 929 + PM_SYS_POP(0, PINT2_INVERT_SET) 930 + PM_POP_SYNC(13) 931 + PM_SYS_POP(13, PINT1_INVERT_SET) 932 + PM_SYS_POP(12, PINT0_INVERT_SET) 933 + PM_SYS_POP(11, PINT3_ASSIGN) 934 + PM_SYS_POP(10, PINT2_ASSIGN) 935 + PM_SYS_POP(9, PINT1_ASSIGN) 936 + PM_SYS_POP(8, PINT0_ASSIGN) 937 + PM_SYS_POP(7, PINT3_MASK_SET) 938 + PM_SYS_POP(6, PINT2_MASK_SET) 939 + PM_SYS_POP(5, PINT1_MASK_SET) 940 + PM_SYS_POP(4, PINT0_MASK_SET) 941 + #endif 942 + 943 + #ifdef SIC_IWR2 944 + PM_SYS_POP(3, SIC_IWR2) 945 + #endif 946 + #ifdef SIC_IWR1 947 + PM_SYS_POP(2, SIC_IWR1) 948 + #endif 949 + #ifdef SIC_IWR0 950 + PM_SYS_POP(1, SIC_IWR0) 951 + #endif 952 + #ifdef SIC_IWR 953 + PM_SYS_POP(1, SIC_IWR) 954 + #endif 955 + 956 + #ifdef SIC_IAR11 957 + PM_SYS_POP(0, SIC_IAR11) 958 + #endif 959 + PM_POP_SYNC(13) 960 + #ifdef SIC_IAR8 961 + PM_SYS_POP(13, SIC_IAR10) 962 + PM_SYS_POP(12, SIC_IAR9) 963 + PM_SYS_POP(11, SIC_IAR8) 964 + #endif 965 + #ifdef SIC_IAR7 966 + PM_SYS_POP(10, SIC_IAR7) 967 + #endif 968 + #ifdef SIC_IAR6 969 + PM_SYS_POP(9, SIC_IAR6) 970 + PM_SYS_POP(8, SIC_IAR5) 971 + PM_SYS_POP(7, SIC_IAR4) 972 + #endif 973 + #ifdef SIC_IAR3 974 + PM_SYS_POP(6, SIC_IAR3) 975 + #endif 976 + #ifdef SIC_IAR0 977 + PM_SYS_POP(5, SIC_IAR2) 978 + PM_SYS_POP(4, SIC_IAR1) 979 + PM_SYS_POP(3, SIC_IAR0) 980 + #endif 981 + #ifdef SIC_IMASK0 982 + # ifdef SIC_IMASK2 983 + PM_SYS_POP(2, SIC_IMASK2) 984 + # endif 985 + PM_SYS_POP(1, SIC_IMASK1) 986 + PM_SYS_POP(0, SIC_IMASK0) 987 + #else 988 + PM_SYS_POP(0, SIC_IMASK) 989 + #endif 990 + 991 + /* Restore Core Registers */ 992 + RETI = [sp++]; 993 + SEQSTAT = [sp++]; 994 + RETX = [sp++]; 995 + SYSCFG = [sp++]; 401 996 CYCLES2 = [sp++]; 402 997 CYCLES = [sp++]; 403 998 ASTAT = [sp++]; 999 + RETS = [sp++]; 404 1000 405 1001 LB1 = [sp++]; 406 1002 LB0 = [sp++]; ··· 885 581 886 582 usp = [sp++]; 887 583 fp = [sp++]; 888 - 889 - ( R7 : 0, P5 : 0) = [ SP ++ ]; 890 - SYSCFG = [sp++]; 891 - 892 - /* Restore Core MMRs */ 893 - 894 - PM_POP(TBUFCTL) 895 - PM_POP(TCOUNT) 896 - PM_POP(TSCALE) 897 - PM_POP(TPERIOD) 898 - PM_POP(TCNTL) 899 - PM_POP(IPRIO) 900 - PM_POP(ILAT) 901 - PM_POP(IMASK) 902 - PM_POP(EVT15) 903 - PM_POP(EVT14) 904 - PM_POP(EVT13) 905 - PM_POP(EVT12) 906 - PM_POP(EVT11) 907 - PM_POP(EVT10) 908 - PM_POP(EVT9) 909 - PM_POP(EVT8) 910 - PM_POP(EVT7) 911 - PM_POP(EVT6) 912 - PM_POP(EVT5) 913 - PM_POP(EVT4) 914 - PM_POP(EVT3) 915 - PM_POP(EVT2) 916 - PM_POP(EVT1) 917 - PM_POP(EVT0) 918 - PM_POP(ICPLB_DATA15) 919 - PM_POP(ICPLB_DATA14) 920 - PM_POP(ICPLB_DATA13) 921 - PM_POP(ICPLB_DATA12) 922 - PM_POP(ICPLB_DATA11) 923 - PM_POP(ICPLB_DATA10) 924 - PM_POP(ICPLB_DATA9) 925 - PM_POP(ICPLB_DATA8) 926 - PM_POP(ICPLB_DATA7) 927 - PM_POP(ICPLB_DATA6) 928 - PM_POP(ICPLB_DATA5) 929 - PM_POP(ICPLB_DATA4) 930 - PM_POP(ICPLB_DATA3) 931 - PM_POP(ICPLB_DATA2) 932 - PM_POP(ICPLB_DATA1) 933 - PM_POP(ICPLB_DATA0) 934 - PM_POP(ICPLB_ADDR15) 935 - PM_POP(ICPLB_ADDR14) 936 - PM_POP(ICPLB_ADDR13) 937 - PM_POP(ICPLB_ADDR12) 938 - PM_POP(ICPLB_ADDR11) 939 - PM_POP(ICPLB_ADDR10) 940 - PM_POP(ICPLB_ADDR9) 941 - PM_POP(ICPLB_ADDR8) 942 - PM_POP(ICPLB_ADDR7) 943 - PM_POP(ICPLB_ADDR6) 944 - PM_POP(ICPLB_ADDR5) 945 - PM_POP(ICPLB_ADDR4) 946 - PM_POP(ICPLB_ADDR3) 947 - PM_POP(ICPLB_ADDR2) 948 - PM_POP(ICPLB_ADDR1) 949 - PM_POP(ICPLB_ADDR0) 950 - PM_POP(IMEM_CONTROL) 951 - PM_POP(DCPLB_DATA15) 952 - PM_POP(DCPLB_DATA14) 953 - PM_POP(DCPLB_DATA13) 954 - PM_POP(DCPLB_DATA12) 955 - PM_POP(DCPLB_DATA11) 956 - PM_POP(DCPLB_DATA10) 957 - PM_POP(DCPLB_DATA9) 958 - PM_POP(DCPLB_DATA8) 959 - PM_POP(DCPLB_DATA7) 960 - PM_POP(DCPLB_DATA6) 961 - PM_POP(DCPLB_DATA5) 962 - PM_POP(DCPLB_DATA4) 963 - PM_POP(DCPLB_DATA3) 964 - PM_POP(DCPLB_DATA2) 965 - PM_POP(DCPLB_DATA1) 966 - PM_POP(DCPLB_DATA0) 967 - PM_POP(DCPLB_ADDR15) 968 - PM_POP(DCPLB_ADDR14) 969 - PM_POP(DCPLB_ADDR13) 970 - PM_POP(DCPLB_ADDR12) 971 - PM_POP(DCPLB_ADDR11) 972 - PM_POP(DCPLB_ADDR10) 973 - PM_POP(DCPLB_ADDR9) 974 - PM_POP(DCPLB_ADDR8) 975 - PM_POP(DCPLB_ADDR7) 976 - PM_POP(DCPLB_ADDR6) 977 - PM_POP(DCPLB_ADDR5) 978 - PM_POP(DCPLB_ADDR4) 979 - PM_POP(DCPLB_ADDR3) 980 - PM_POP(DCPLB_ADDR2) 981 - PM_POP(DCPLB_ADDR1) 982 - PM_POP(DCPLB_ADDR0) 983 - PM_POP(DMEM_CONTROL) 984 - 985 - /* Restore System MMRs */ 986 - 987 - P0.H = hi(PLL_CTL); 988 - P0.L = lo(PLL_CTL); 989 - PM_SYS_POP16(SYSCR) 990 - 991 - #ifdef PORTCIO_FER 992 - PM_SYS_POP16(PORTEIO_FER) 993 - PM_SYS_POP16(PORTEIO) 994 - PM_SYS_POP16(PORTEIO_INEN) 995 - PM_SYS_POP16(PORTEIO_DIR) 996 - PM_SYS_POP16(PORTDIO_FER) 997 - PM_SYS_POP16(PORTDIO) 998 - PM_SYS_POP16(PORTDIO_INEN) 999 - PM_SYS_POP16(PORTDIO_DIR) 1000 - PM_SYS_POP16(PORTCIO_FER) 1001 - PM_SYS_POP16(PORTCIO) 1002 - PM_SYS_POP16(PORTCIO_INEN) 1003 - PM_SYS_POP16(PORTCIO_DIR) 1004 - #endif 1005 - 1006 - #ifdef EBIU_FCTL 1007 - PM_SYS_POP(EBIU_FCTL) 1008 - PM_SYS_POP(EBIU_MODE) 1009 - PM_SYS_POP(EBIU_MBSCTL) 1010 - #endif 1011 - PM_SYS_POP16(EBIU_AMGCTL) 1012 - PM_SYS_POP(EBIU_AMBCTL1) 1013 - PM_SYS_POP(EBIU_AMBCTL0) 1014 - 1015 - #ifdef PINT0_ASSIGN 1016 - PM_SYS_POP(PINT3_EDGE_SET) 1017 - PM_SYS_POP(PINT2_EDGE_SET) 1018 - PM_SYS_POP(PINT1_EDGE_SET) 1019 - PM_SYS_POP(PINT0_EDGE_SET) 1020 - PM_SYS_POP(PINT3_INVERT_SET) 1021 - PM_SYS_POP(PINT2_INVERT_SET) 1022 - PM_SYS_POP(PINT1_INVERT_SET) 1023 - PM_SYS_POP(PINT0_INVERT_SET) 1024 - PM_SYS_POP(PINT3_ASSIGN) 1025 - PM_SYS_POP(PINT2_ASSIGN) 1026 - PM_SYS_POP(PINT1_ASSIGN) 1027 - PM_SYS_POP(PINT0_ASSIGN) 1028 - PM_SYS_POP(PINT3_MASK_SET) 1029 - PM_SYS_POP(PINT2_MASK_SET) 1030 - PM_SYS_POP(PINT1_MASK_SET) 1031 - PM_SYS_POP(PINT0_MASK_SET) 1032 - #endif 1033 - 1034 - #ifdef SIC_IWR2 1035 - PM_SYS_POP(SIC_IWR2) 1036 - #endif 1037 - #ifdef SIC_IWR1 1038 - PM_SYS_POP(SIC_IWR1) 1039 - #endif 1040 - #ifdef SIC_IWR0 1041 - PM_SYS_POP(SIC_IWR0) 1042 - #endif 1043 - #ifdef SIC_IWR 1044 - PM_SYS_POP(SIC_IWR) 1045 - #endif 1046 - 1047 - #ifdef SIC_IAR8 1048 - PM_SYS_POP(SIC_IAR11) 1049 - PM_SYS_POP(SIC_IAR10) 1050 - PM_SYS_POP(SIC_IAR9) 1051 - PM_SYS_POP(SIC_IAR8) 1052 - #endif 1053 - #ifdef SIC_IAR7 1054 - PM_SYS_POP(SIC_IAR7) 1055 - #endif 1056 - #ifdef SIC_IAR6 1057 - PM_SYS_POP(SIC_IAR6) 1058 - PM_SYS_POP(SIC_IAR5) 1059 - PM_SYS_POP(SIC_IAR4) 1060 - #endif 1061 - #ifdef SIC_IAR3 1062 - PM_SYS_POP(SIC_IAR3) 1063 - #endif 1064 - #ifdef SIC_IAR0 1065 - PM_SYS_POP(SIC_IAR2) 1066 - PM_SYS_POP(SIC_IAR1) 1067 - PM_SYS_POP(SIC_IAR0) 1068 - #endif 1069 - #ifdef SIC_IMASK 1070 - PM_SYS_POP(SIC_IMASK) 1071 - #endif 1072 - #ifdef SIC_IMASK2 1073 - PM_SYS_POP(SIC_IMASK2) 1074 - #endif 1075 - #ifdef SIC_IMASK1 1076 - PM_SYS_POP(SIC_IMASK1) 1077 - #endif 1078 - #ifdef SIC_IMASK0 1079 - PM_SYS_POP(SIC_IMASK0) 1080 - #endif 584 + (R7:0, P5:0) = [sp++]; 1081 585 1082 586 [--sp] = RETI; /* Clear Global Interrupt Disable */ 1083 587 SP += 4; 1084 588 1085 - RETS = [SP++]; 1086 - ( R7:0, P5:0 ) = [SP++]; 1087 589 RTS; 1088 590 ENDPROC(_do_hibernate)
+12 -24
arch/blackfin/mach-common/head.S
··· 85 85 SSYNC; 86 86 87 87 /* in case of double faults, save a few things */ 88 - p0.l = _init_retx; 89 - p0.h = _init_retx; 90 - R0 = RETX; 91 - [P0] = R0; 92 - 88 + p1.l = _initial_pda; 89 + p1.h = _initial_pda; 90 + r4 = RETX; 93 91 #ifdef CONFIG_DEBUG_DOUBLEFAULT 94 92 /* Only save these if we are storing them, 95 93 * This happens here, since L1 gets clobbered 96 94 * below 97 95 */ 98 96 GET_PDA(p0, r0); 99 - r5 = [p0 + PDA_DF_RETX]; 100 - p1.l = _init_saved_retx; 101 - p1.h = _init_saved_retx; 102 - [p1] = r5; 103 - 104 - r5 = [p0 + PDA_DF_DCPLB]; 105 - p1.l = _init_saved_dcplb_fault_addr; 106 - p1.h = _init_saved_dcplb_fault_addr; 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; 97 + r0 = [p0 + PDA_DF_RETX]; 98 + r1 = [p0 + PDA_DF_DCPLB]; 99 + r2 = [p0 + PDA_DF_ICPLB]; 100 + r3 = [p0 + PDA_DF_SEQSTAT]; 101 + [p1 + PDA_INIT_DF_RETX] = r0; 102 + [p1 + PDA_INIT_DF_DCPLB] = r1; 103 + [p1 + PDA_INIT_DF_ICPLB] = r2; 104 + [p1 + PDA_INIT_DF_SEQSTAT] = r3; 118 105 #endif 106 + [p1 + PDA_INIT_RETX] = r4; 119 107 120 108 /* Initialize stack pointer */ 121 109 sp.l = _init_thread_union + THREAD_SIZE;
+14 -27
arch/blackfin/mach-common/ints-priority.c
··· 444 444 static DECLARE_BITMAP(gpio_enabled, MAX_BLACKFIN_GPIOS); 445 445 extern void bfin_gpio_irq_prepare(unsigned gpio); 446 446 447 - #if !defined(CONFIG_BF54x) 447 + #if !BFIN_GPIO_PINT 448 448 449 449 static void bfin_gpio_ack_irq(struct irq_data *d) 450 450 { ··· 633 633 bfin_demux_gpio_block(irq); 634 634 } 635 635 636 - #else /* CONFIG_BF54x */ 636 + #else 637 637 638 638 #define NR_PINT_SYS_IRQS 4 639 639 #define NR_PINT_BITS 32 ··· 647 647 static unsigned char irq2pint_lut[NR_PINTS]; 648 648 static unsigned char pint2irq_lut[NR_PINT_SYS_IRQS * NR_PINT_BITS]; 649 649 650 - struct pin_int_t { 651 - unsigned int mask_set; 652 - unsigned int mask_clear; 653 - unsigned int request; 654 - unsigned int assign; 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, 650 + static struct bfin_pint_regs * const pint[NR_PINT_SYS_IRQS] = { 651 + (struct bfin_pint_regs *)PINT0_MASK_SET, 652 + (struct bfin_pint_regs *)PINT1_MASK_SET, 653 + (struct bfin_pint_regs *)PINT2_MASK_SET, 654 + (struct bfin_pint_regs *)PINT3_MASK_SET, 668 655 }; 669 656 670 657 inline unsigned int get_irq_base(u32 bank, u8 bmap) ··· 968 981 969 982 local_irq_disable(); 970 983 971 - #ifdef CONFIG_BF54x 984 + #if BFIN_GPIO_PINT 972 985 # ifdef CONFIG_PINTx_REASSIGN 973 986 pint[0]->assign = CONFIG_PINT0_ASSIGN; 974 987 pint[1]->assign = CONFIG_PINT1_ASSIGN; ··· 986 999 irq_set_chip(irq, &bfin_internal_irqchip); 987 1000 988 1001 switch (irq) { 989 - #if defined(BF537_FAMILY) 990 - case IRQ_PH_INTA_MAC_RX: 991 - case IRQ_PF_INTA_PG_INTA: 992 - #elif defined(BF533_FAMILY) 993 - case IRQ_PROG_INTA: 994 - #elif defined(CONFIG_BF54x) 1002 + #if BFIN_GPIO_PINT 995 1003 case IRQ_PINT0: 996 1004 case IRQ_PINT1: 997 1005 case IRQ_PINT2: 998 1006 case IRQ_PINT3: 1007 + #elif defined(BF537_FAMILY) 1008 + case IRQ_PH_INTA_MAC_RX: 1009 + case IRQ_PF_INTA_PG_INTA: 1010 + #elif defined(BF533_FAMILY) 1011 + case IRQ_PROG_INTA: 999 1012 #elif defined(CONFIG_BF52x) || defined(CONFIG_BF51x) 1000 1013 case IRQ_PORTF_INTA: 1001 1014 case IRQ_PORTG_INTA:
+9 -8
arch/blackfin/mach-common/smp.c
··· 45 45 unsigned long blackfin_iflush_l1_entry[NR_CPUS]; 46 46 #endif 47 47 48 - void __cpuinitdata *init_retx_coreb, *init_saved_retx_coreb, 49 - *init_saved_seqstat_coreb, *init_saved_icplb_fault_addr_coreb, 50 - *init_saved_dcplb_fault_addr_coreb; 48 + struct blackfin_initial_pda __cpuinitdata initial_pda_coreb; 51 49 52 50 #define BFIN_IPI_RESCHEDULE 0 53 51 #define BFIN_IPI_CALL_FUNC 1 ··· 367 369 if (_bfin_swrst & SWRST_DBL_FAULT_B) { 368 370 printk(KERN_EMERG "CoreB Recovering from DOUBLE FAULT event\n"); 369 371 #ifdef CONFIG_DEBUG_DOUBLEFAULT 370 - printk(KERN_EMERG " While handling exception (EXCAUSE = 0x%x) at %pF\n", 371 - (int)init_saved_seqstat_coreb & SEQSTAT_EXCAUSE, init_saved_retx_coreb); 372 - printk(KERN_NOTICE " DCPLB_FAULT_ADDR: %pF\n", init_saved_dcplb_fault_addr_coreb); 373 - printk(KERN_NOTICE " ICPLB_FAULT_ADDR: %pF\n", init_saved_icplb_fault_addr_coreb); 372 + printk(KERN_EMERG " While handling exception (EXCAUSE = %#x) at %pF\n", 373 + initial_pda_coreb.seqstat_doublefault & SEQSTAT_EXCAUSE, 374 + initial_pda_coreb.retx_doublefault); 375 + printk(KERN_NOTICE " DCPLB_FAULT_ADDR: %pF\n", 376 + initial_pda_coreb.dcplb_doublefault_addr); 377 + printk(KERN_NOTICE " ICPLB_FAULT_ADDR: %pF\n", 378 + initial_pda_coreb.icplb_doublefault_addr); 374 379 #endif 375 380 printk(KERN_NOTICE " The instruction at %pF caused a double exception\n", 376 - init_retx_coreb); 381 + initial_pda_coreb.retx); 377 382 } 378 383 379 384 /*