Commit 6d6be43d authored by Linus Torvalds's avatar Linus Torvalds

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
  ...
parents f5fc8790 10617340
...@@ -9,6 +9,8 @@ the entire SPI transfer. - And not just bits_per_word duration. ...@@ -9,6 +9,8 @@ the entire SPI transfer. - And not just bits_per_word duration.
In most cases you can utilize SPI MODE_3 instead of MODE_0 to work-around this In most cases you can utilize SPI MODE_3 instead of MODE_0 to work-around this
behavior. If your SPI slave device in question requires SPI MODE_0 or MODE_2 behavior. If your SPI slave device in question requires SPI MODE_0 or MODE_2
timing, you can utilize the GPIO controlled SPI Slave Select option instead. timing, you can utilize the GPIO controlled SPI Slave Select option instead.
In this case, you should use GPIO based CS for all of your slaves and not just
the ones using mode 0 or 2 in order to guarantee correct CS toggling behavior.
You can even use the same pin whose peripheral role is a SSEL, You can even use the same pin whose peripheral role is a SSEL,
but use it as a GPIO instead. but use it as a GPIO instead.
...@@ -953,6 +953,16 @@ config BFIN_GPTIMERS ...@@ -953,6 +953,16 @@ config BFIN_GPTIMERS
To compile this driver as a module, choose M here: the module To compile this driver as a module, choose M here: the module
will be called gptimers. will be called gptimers.
config HAVE_PWM
tristate "Enable PWM API support"
depends on BFIN_GPTIMERS
help
Enable support for the Pulse Width Modulation framework (as
found in linux/pwm.h).
To compile this driver as a module, choose M here: the module
will be called pwm.
choice choice
prompt "Uncached DMA region" prompt "Uncached DMA region"
default DMA_UNCACHED_1M default DMA_UNCACHED_1M
......
...@@ -58,13 +58,13 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" ...@@ -58,13 +58,13 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_MTD=y CONFIG_MTD=y
CONFIG_MTD_PARTITIONS=y CONFIG_MTD_PARTITIONS=y
CONFIG_MTD_CMDLINE_PARTS=y CONFIG_MTD_CMDLINE_PARTS=y
CONFIG_MTD_CHAR=m CONFIG_MTD_CHAR=y
CONFIG_MTD_BLOCK=y CONFIG_MTD_BLOCK=y
CONFIG_MTD_CFI=m CONFIG_MTD_CFI=y
CONFIG_MTD_CFI_AMDSTD=m CONFIG_MTD_CFI_AMDSTD=y
CONFIG_MTD_RAM=y CONFIG_MTD_RAM=y
CONFIG_MTD_ROM=m CONFIG_MTD_ROM=m
CONFIG_MTD_PHYSMAP=m CONFIG_MTD_PHYSMAP=y
CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM=y
CONFIG_NETDEVICES=y CONFIG_NETDEVICES=y
CONFIG_NET_ETHERNET=y CONFIG_NET_ETHERNET=y
......
include include/asm-generic/Kbuild.asm include include/asm-generic/Kbuild.asm
generic-y += auxvec.h
generic-y += bitsperlong.h
generic-y += bugs.h
generic-y += cputime.h
generic-y += current.h
generic-y += device.h
generic-y += div64.h
generic-y += emergency-restart.h
generic-y += errno.h
generic-y += fb.h
generic-y += futex.h
generic-y += hw_irq.h
generic-y += ioctl.h
generic-y += ipcbuf.h
generic-y += irq_regs.h
generic-y += kdebug.h
generic-y += kmap_types.h
generic-y += local64.h
generic-y += local.h
generic-y += mman.h
generic-y += msgbuf.h
generic-y += param.h
generic-y += percpu.h
generic-y += pgalloc.h
generic-y += resource.h
generic-y += scatterlist.h
generic-y += sembuf.h
generic-y += serial.h
generic-y += setup.h
generic-y += shmbuf.h
generic-y += shmparam.h
generic-y += socket.h
generic-y += sockios.h
generic-y += statfs.h
generic-y += termbits.h
generic-y += termios.h
generic-y += topology.h
generic-y += types.h
generic-y += ucontext.h
generic-y += unaligned.h
generic-y += user.h
generic-y += xor.h
header-y += bfin_sport.h header-y += bfin_sport.h
header-y += cachectl.h header-y += cachectl.h
header-y += fixed_code.h header-y += fixed_code.h
/* /*
 * Copyright 2004-2009 Analog Devices Inc. * Copyright 2004-2009 Analog Devices Inc.
 * *
 * Licensed under the GPL-2 or later. * Licensed under the GPL-2 or later.
 */ */
#ifndef __ARCH_BLACKFIN_ATOMIC__ #ifndef __ARCH_BLACKFIN_ATOMIC__
#define __ARCH_BLACKFIN_ATOMIC__ #define __ARCH_BLACKFIN_ATOMIC__
...@@ -76,11 +76,6 @@ static inline void atomic_set_mask(int mask, atomic_t *v) ...@@ -76,11 +76,6 @@ static inline void atomic_set_mask(int mask, atomic_t *v)
__raw_atomic_set_asm(&v->counter, mask); __raw_atomic_set_asm(&v->counter, mask);
} }
static inline int atomic_test_mask(int mask, atomic_t *v)
{
return __raw_atomic_test_asm(&v->counter, mask);
}
/* Atomic operations are already serializing */ /* Atomic operations are already serializing */
#define smp_mb__before_atomic_dec() barrier() #define smp_mb__before_atomic_dec() barrier()
#define smp_mb__after_atomic_dec() barrier() #define smp_mb__after_atomic_dec() barrier()
......
#include <asm-generic/auxvec.h>
#include <asm-generic/bitsperlong.h>
/* /*
* Common header file for Blackfin family of processors. * Common header file for Blackfin family of processors.
* *
 * Copyright 2004-2009 Analog Devices Inc. * Copyright 2004-2009 Analog Devices Inc.
 * *
 * Licensed under the GPL-2 or later. * Licensed under the GPL-2 or later.
*/ */
#ifndef _BLACKFIN_H_ #ifndef _BLACKFIN_H_
......
#include <asm-generic/bugs.h>
#include <asm-generic/cputime.h>
#include <asm-generic/current.h>
#include <asm-generic/device.h>
#include <asm-generic/div64.h>
...@@ -117,7 +117,6 @@ ...@@ -117,7 +117,6 @@
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
void sleep_mode(u32 sic_iwr0, u32 sic_iwr1, u32 sic_iwr2); void sleep_mode(u32 sic_iwr0, u32 sic_iwr1, u32 sic_iwr2);
void hibernate_mode(u32 sic_iwr0, u32 sic_iwr1, u32 sic_iwr2);
void sleep_deeper(u32 sic_iwr0, u32 sic_iwr1, u32 sic_iwr2); void sleep_deeper(u32 sic_iwr0, u32 sic_iwr1, u32 sic_iwr2);
void do_hibernate(int wakeup); void do_hibernate(int wakeup);
void set_dram_srfs(void); void set_dram_srfs(void);
...@@ -134,32 +133,6 @@ struct bfin_dpmc_platform_data { ...@@ -134,32 +133,6 @@ struct bfin_dpmc_platform_data {
unsigned short vr_settling_time; /* in us */ unsigned short vr_settling_time; /* in us */
}; };
#else
#define PM_PUSH(x) \
R0 = [P0 + (x - SRAM_BASE_ADDRESS)];\
[--SP] = R0;\
#define PM_POP(x) \
R0 = [SP++];\
[P0 + (x - SRAM_BASE_ADDRESS)] = R0;\
#define PM_SYS_PUSH(x) \
R0 = [P0 + (x - PLL_CTL)];\
[--SP] = R0;\
#define PM_SYS_POP(x) \
R0 = [SP++];\
[P0 + (x - PLL_CTL)] = R0;\
#define PM_SYS_PUSH16(x) \
R0 = w[P0 + (x - PLL_CTL)];\
[--SP] = R0;\
#define PM_SYS_POP16(x) \
R0 = [SP++];\
w[P0 + (x - PLL_CTL)] = R0;\
#endif #endif
#endif /*_BLACKFIN_DPMC_H_*/ #endif /*_BLACKFIN_DPMC_H_*/
#include <asm-generic/emergency-restart.h>
#include <asm-generic/errno.h>
#include <asm-generic/fb.h>
#include <asm-generic/futex.h>
...@@ -16,58 +16,13 @@ ...@@ -16,58 +16,13 @@
#include <mach/gpio.h> #include <mach/gpio.h>
#define GPIO_0 0
#define GPIO_1 1
#define GPIO_2 2
#define GPIO_3 3
#define GPIO_4 4
#define GPIO_5 5
#define GPIO_6 6
#define GPIO_7 7
#define GPIO_8 8
#define GPIO_9 9
#define GPIO_10 10
#define GPIO_11 11
#define GPIO_12 12
#define GPIO_13 13
#define GPIO_14 14
#define GPIO_15 15
#define GPIO_16 16
#define GPIO_17 17
#define GPIO_18 18
#define GPIO_19 19
#define GPIO_20 20
#define GPIO_21 21
#define GPIO_22 22
#define GPIO_23 23
#define GPIO_24 24
#define GPIO_25 25
#define GPIO_26 26
#define GPIO_27 27
#define GPIO_28 28
#define GPIO_29 29
#define GPIO_30 30
#define GPIO_31 31
#define GPIO_32 32
#define GPIO_33 33
#define GPIO_34 34
#define GPIO_35 35
#define GPIO_36 36
#define GPIO_37 37
#define GPIO_38 38
#define GPIO_39 39
#define GPIO_40 40
#define GPIO_41 41
#define GPIO_42 42
#define GPIO_43 43
#define GPIO_44 44
#define GPIO_45 45
#define GPIO_46 46
#define GPIO_47 47
#define PERIPHERAL_USAGE 1 #define PERIPHERAL_USAGE 1
#define GPIO_USAGE 0 #define GPIO_USAGE 0
#ifndef BFIN_GPIO_PINT
# define BFIN_GPIO_PINT 0
#endif
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#include <linux/compiler.h> #include <linux/compiler.h>
...@@ -89,7 +44,7 @@ ...@@ -89,7 +44,7 @@
* MODIFICATION HISTORY : * MODIFICATION HISTORY :
**************************************************************/ **************************************************************/
#ifndef CONFIG_BF54x #if !BFIN_GPIO_PINT
void set_gpio_dir(unsigned, unsigned short); void set_gpio_dir(unsigned, unsigned short);
void set_gpio_inen(unsigned, unsigned short); void set_gpio_inen(unsigned, unsigned short);
void set_gpio_polar(unsigned, unsigned short); void set_gpio_polar(unsigned, unsigned short);
...@@ -164,6 +119,10 @@ struct gpio_port_t { ...@@ -164,6 +119,10 @@ struct gpio_port_t {
#ifdef BFIN_SPECIAL_GPIO_BANKS #ifdef BFIN_SPECIAL_GPIO_BANKS
void bfin_special_gpio_free(unsigned gpio); void bfin_special_gpio_free(unsigned gpio);
int bfin_special_gpio_request(unsigned gpio, const char *label); int bfin_special_gpio_request(unsigned gpio, const char *label);
# ifdef CONFIG_PM
void bfin_special_gpio_pm_hibernate_restore(void);
void bfin_special_gpio_pm_hibernate_suspend(void);
# endif
#endif #endif
#ifdef CONFIG_PM #ifdef CONFIG_PM
...@@ -182,7 +141,7 @@ static inline void bfin_pm_standby_restore(void) ...@@ -182,7 +141,7 @@ static inline void bfin_pm_standby_restore(void)
void bfin_gpio_pm_hibernate_restore(void); void bfin_gpio_pm_hibernate_restore(void);
void bfin_gpio_pm_hibernate_suspend(void); void bfin_gpio_pm_hibernate_suspend(void);
#ifndef CONFIG_BF54x # if !BFIN_GPIO_PINT
int gpio_pm_wakeup_ctrl(unsigned gpio, unsigned ctrl); int gpio_pm_wakeup_ctrl(unsigned gpio, unsigned ctrl);
struct gpio_port_s { struct gpio_port_s {
...@@ -199,8 +158,9 @@ struct gpio_port_s { ...@@ -199,8 +158,9 @@ struct gpio_port_s {
unsigned short reserved; unsigned short reserved;
unsigned short mux; unsigned short mux;
}; };
#endif /*CONFIG_BF54x*/ # endif
#endif /*CONFIG_PM*/ #endif /*CONFIG_PM*/
/*********************************************************** /***********************************************************
* *
* FUNCTIONS: Blackfin GPIO Driver * FUNCTIONS: Blackfin GPIO Driver
......
...@@ -193,6 +193,16 @@ uint16_t get_enabled_gptimers(void); ...@@ -193,6 +193,16 @@ uint16_t get_enabled_gptimers(void);
uint32_t get_gptimer_status(unsigned int group); uint32_t get_gptimer_status(unsigned int group);
void set_gptimer_status(unsigned int group, uint32_t value); void set_gptimer_status(unsigned int group, uint32_t value);
static inline void enable_gptimer(unsigned int timer_id)
{
enable_gptimers(1 << timer_id);
}
static inline void disable_gptimer(unsigned int timer_id)
{
disable_gptimers(1 << timer_id);
}
/* /*
* All Blackfin system MMRs are padded to 32bits even if the register * All Blackfin system MMRs are padded to 32bits even if the register
* itself is only 16bits. So use a helper macro to streamline this. * itself is only 16bits. So use a helper macro to streamline this.
...@@ -209,6 +219,15 @@ struct bfin_gptimer_regs { ...@@ -209,6 +219,15 @@ struct bfin_gptimer_regs {
u32 width; u32 width;
}; };
/*
* bfin group timer registers layout
*/
struct bfin_gptimer_group_regs {
__BFP(enable);
__BFP(disable);
u32 status;
};
#undef __BFP #undef __BFP
#endif #endif
#include <asm-generic/hw_irq.h>
#include <asm-generic/ioctl.h>
#include <asm-generic/ipcbuf.h>
#include <asm-generic/irq_regs.h>
...@@ -18,12 +18,12 @@ ...@@ -18,12 +18,12 @@
extern unsigned long bfin_irq_flags; extern unsigned long bfin_irq_flags;
#endif #endif
static inline void bfin_sti(unsigned long flags) static inline notrace void bfin_sti(unsigned long flags)
{ {
asm volatile("sti %0;" : : "d" (flags)); asm volatile("sti %0;" : : "d" (flags));
} }
static inline unsigned long bfin_cli(void) static inline notrace unsigned long bfin_cli(void)
{ {
unsigned long flags; unsigned long flags;
asm volatile("cli %0;" : "=d" (flags)); asm volatile("cli %0;" : "=d" (flags));
...@@ -40,22 +40,22 @@ static inline unsigned long bfin_cli(void) ...@@ -40,22 +40,22 @@ static inline unsigned long bfin_cli(void)
/* /*
* Hard, untraced CPU interrupt flag manipulation and access. * Hard, untraced CPU interrupt flag manipulation and access.
*/ */
static inline void __hard_local_irq_disable(void) static inline notrace void __hard_local_irq_disable(void)
{ {
bfin_cli(); bfin_cli();
} }
static inline void __hard_local_irq_enable(void) static inline notrace void __hard_local_irq_enable(void)
{ {
bfin_sti(bfin_irq_flags); bfin_sti(bfin_irq_flags);
} }
static inline unsigned long hard_local_save_flags(void) static inline notrace unsigned long hard_local_save_flags(void)
{ {
return bfin_read_IMASK(); return bfin_read_IMASK();
} }
static inline unsigned long __hard_local_irq_save(void) static inline notrace unsigned long __hard_local_irq_save(void)
{ {
unsigned long flags; unsigned long flags;
flags = bfin_cli(); flags = bfin_cli();
...@@ -65,18 +65,18 @@ static inline unsigned long __hard_local_irq_save(void) ...@@ -65,18 +65,18 @@ static inline unsigned long __hard_local_irq_save(void)
return flags; return flags;
} }
static inline int hard_irqs_disabled_flags(unsigned long flags) static inline notrace int hard_irqs_disabled_flags(unsigned long flags)
{ {
return (flags & ~0x3f) == 0; return (flags & ~0x3f) == 0;
} }
static inline int hard_irqs_disabled(void) static inline notrace int hard_irqs_disabled(void)
{ {
unsigned long flags = hard_local_save_flags(); unsigned long flags = hard_local_save_flags();
return hard_irqs_disabled_flags(flags); return hard_irqs_disabled_flags(flags);
} }
static inline void __hard_local_irq_restore(unsigned long flags) static inline notrace void __hard_local_irq_restore(unsigned long flags)
{ {
if (!hard_irqs_disabled_flags(flags)) if (!hard_irqs_disabled_flags(flags))
__hard_local_irq_enable(); __hard_local_irq_enable();
...@@ -113,31 +113,31 @@ void ipipe_check_context(struct ipipe_domain *ipd); ...@@ -113,31 +113,31 @@ void ipipe_check_context(struct ipipe_domain *ipd);
/* /*
* Interrupt pipe interface to linux/irqflags.h. * Interrupt pipe interface to linux/irqflags.h.
*/ */
static inline void arch_local_irq_disable(void) static inline notrace void arch_local_irq_disable(void)
{ {
__check_irqop_context(); __check_irqop_context();
__ipipe_stall_root(); __ipipe_stall_root();
barrier(); barrier();
} }
static inline void arch_local_irq_enable(void) static inline notrace void arch_local_irq_enable(void)
{ {
barrier(); barrier();
__check_irqop_context(); __check_irqop_context();
__ipipe_unstall_root(); __ipipe_unstall_root();
} }
static inline unsigned long arch_local_save_flags(void) static inline notrace unsigned long arch_local_save_flags(void)
{ {
return __ipipe_test_root() ? bfin_no_irqs : bfin_irq_flags; return __ipipe_test_root() ? bfin_no_irqs : bfin_irq_flags;
} }
static inline int arch_irqs_disabled_flags(unsigned long flags) static inline notrace int arch_irqs_disabled_flags(unsigned long flags)
{ {
return flags == bfin_no_irqs; return flags == bfin_no_irqs;
} }
static inline unsigned long arch_local_irq_save(void) static inline notrace unsigned long arch_local_irq_save(void)
{ {
unsigned long flags; unsigned long flags;
...@@ -148,13 +148,13 @@ static inline unsigned long arch_local_irq_save(void) ...@@ -148,13 +148,13 @@ static inline unsigned long arch_local_irq_save(void)
return flags; return flags;
} }
static inline void arch_local_irq_restore(unsigned long flags) static inline notrace void arch_local_irq_restore(unsigned long flags)
{ {
__check_irqop_context(); __check_irqop_context();
__ipipe_restore_root(flags == bfin_no_irqs); __ipipe_restore_root(flags == bfin_no_irqs);
} }
static inline unsigned long arch_mangle_irq_bits(int virt, unsigned long real) static inline notrace unsigned long arch_mangle_irq_bits(int virt, unsigned long real)
{ {
/* /*
* Merge virtual and real interrupt mask bits into a single * Merge virtual and real interrupt mask bits into a single
...@@ -163,7 +163,7 @@ static inline unsigned long arch_mangle_irq_bits(int virt, unsigned long real) ...@@ -163,7 +163,7 @@ static inline unsigned long arch_mangle_irq_bits(int virt, unsigned long real)
return (real & ~(1 << 31)) | ((virt != 0) << 31); return (real & ~(1 << 31)) | ((virt != 0) << 31);
} }
static inline int arch_demangle_irq_bits(unsigned long *x) static inline notrace int arch_demangle_irq_bits(unsigned long *x)
{ {
int virt = (*x & (1 << 31)) != 0; int virt = (*x & (1 << 31)) != 0;
*x &= ~(1L << 31); *x &= ~(1L << 31);
...@@ -174,7 +174,7 @@ static inline int arch_demangle_irq_bits(unsigned long *x) ...@@ -174,7 +174,7 @@ static inline int arch_demangle_irq_bits(unsigned long *x)
* Interface to various arch routines that may be traced. * Interface to various arch routines that may be traced.
*/ */
#ifdef CONFIG_IPIPE_TRACE_IRQSOFF #ifdef CONFIG_IPIPE_TRACE_IRQSOFF
static inline void hard_local_irq_disable(void) static inline notrace void hard_local_irq_disable(void)
{ {
if (!hard_irqs_disabled()) { if (!hard_irqs_disabled()) {
__hard_local_irq_disable(); __hard_local_irq_disable();
...@@ -182,7 +182,7 @@ static inline void hard_local_irq_disable(void) ...@@ -182,7 +182,7 @@ static inline void hard_local_irq_disable(void)
} }
} }
static inline void hard_local_irq_enable(void) static inline notrace void hard_local_irq_enable(void)
{ {
if (hard_irqs_disabled()) { if (hard_irqs_disabled()) {
ipipe_trace_end(0x80000000); ipipe_trace_end(0x80000000);
...@@ -190,7 +190,7 @@ static inline void hard_local_irq_enable(void) ...@@ -190,7 +190,7 @@ static inline void hard_local_irq_enable(void)
} }
} }
static inline unsigned long hard_local_irq_save(void) static inline notrace unsigned long hard_local_irq_save(void)
{ {
unsigned long flags = hard_local_save_flags(); unsigned long flags = hard_local_save_flags();
if (!hard_irqs_disabled_flags(flags)) { if (!hard_irqs_disabled_flags(flags)) {
...@@ -200,7 +200,7 @@ static inline unsigned long hard_local_irq_save(void) ...@@ -200,7 +200,7 @@ static inline unsigned long hard_local_irq_save(void)
return flags; return flags;
} }
static inline void hard_local_irq_restore(unsigned long flags) static inline notrace void hard_local_irq_restore(unsigned long flags)
{ {
if (!hard_irqs_disabled_flags(flags)) { if (!hard_irqs_disabled_flags(flags)) {
ipipe_trace_end(0x80000001); ipipe_trace_end(0x80000001);
......
#include <asm-generic/kdebug.h>
#include <asm-generic/kmap_types.h>
#include <asm-generic/local.h>
#include <asm-generic/local64.h>
#include <asm-generic/mman.h>
/* /*
 * Copyright 2004-2008 Analog Devices Inc. * Copyright 2004-2008 Analog Devices Inc.
 * *
 * Licensed under the GPL-2 or later. * Licensed under the GPL-2 or later.
 */ */
#ifndef _ASM_BFIN_MODULE_H #ifndef _ASM_BFIN_MODULE_H
#define _ASM_BFIN_MODULE_H #define _ASM_BFIN_MODULE_H
......
#include <asm-generic/msgbuf.h>
/* #include <asm-generic/mutex-dec.h>
* Pull in the generic implementation for the mutex fastpath.
*
* TODO: implement optimized primitives instead, or leave the generic
* implementation in place, or pick the atomic_xchg() based generic
* implementation. (see asm-generic/mutex-xchg.h for details)
*
* Copyright 2006-2009 Analog Devices Inc.
*
* Licensed under the GPL-2 or later.
*/
#ifndef _ASM_MUTEX_H
#define _ASM_MUTEX_H
#ifndef CONFIG_SMP
#include <asm-generic/mutex.h>
#else
static inline void
__mutex_fastpath_lock(atomic_t *count, void (*fail_fn)(atomic_t *))
{
if (unlikely(atomic_dec_return(count) < 0))
fail_fn(count);
else
smp_mb();
}
static inline int
__mutex_fastpath_lock_retval(atomic_t *count, int (*fail_fn)(atomic_t *))
{
if (unlikely(atomic_dec_return(count) < 0))
return fail_fn(count);
else {
smp_mb();
return 0;
}
}
static inline void
__mutex_fastpath_unlock(atomic_t *count, void (*fail_fn)(atomic_t *))
{
smp_mb();
if (unlikely(atomic_inc_return(count) <= 0))
fail_fn(count);
}
#define __mutex_slowpath_needs_to_unlock() 1
static inline int
__mutex_fastpath_trylock(atomic_t *count, int (*fail_fn)(atomic_t *))
{
/*
* We have two variants here. The cmpxchg based one is the best one
* because it never induce a false contention state. It is included
* here because architectures using the inc/dec algorithms over the
* xchg ones are much more likely to support cmpxchg natively.
*
* If not we fall back to the spinlock based variant - that is
* just as efficient (and simpler) as a 'destructive' probing of
* the mutex state would be.
*/
#ifdef __HAVE_ARCH_CMPXCHG
if (likely(atomic_cmpxchg(count, 1, 0) == 1)) {
smp_mb();
return 1;
}
return 0;
#else
return fail_fn(count);
#endif
}
#endif
#endif
/* /*
 * Copyright 2004-2009 Analog Devices Inc. * Copyright 2004-2009 Analog Devices Inc.
 * *
 * Licensed under the GPL-2 or later. * Licensed under the GPL-2 or later.
 */ */
#ifndef _BLACKFIN_PAGE_H #ifndef _BLACKFIN_PAGE_H
#define _BLACKFIN_PAGE_H #define _BLACKFIN_PAGE_H
......
#include <asm-generic/param.h>
...@@ -54,6 +54,16 @@ struct blackfin_pda { /* Per-processor Data Area */ ...@@ -54,6 +54,16 @@ struct blackfin_pda { /* Per-processor Data Area */
#endif #endif
}; };
struct blackfin_initial_pda {
void *retx;
#ifdef CONFIG_DEBUG_DOUBLEFAULT
void *dcplb_doublefault_addr;
void *icplb_doublefault_addr;
void *retx_doublefault;
unsigned seqstat_doublefault;
#endif
};
extern struct blackfin_pda cpu_pda[]; extern struct blackfin_pda cpu_pda[];
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
......
#include <asm-generic/percpu.h>
#include <asm-generic/pgalloc.h>
#include <asm-generic/resource.h>
#ifndef _BLACKFIN_SCATTERLIST_H
#define _BLACKFIN_SCATTERLIST_H
#include <asm-generic/scatterlist.h>
#endif /* !(_BLACKFIN_SCATTERLIST_H) */
/* /*
 * Copyright 2004-2009 Analog Devices Inc. * Copyright 2004-2009 Analog Devices Inc.
 * *
 * Licensed under the GPL-2 or later. * Licensed under the GPL-2 or later.
 */ */
#ifndef _BLACKFIN_SECTIONS_H #ifndef _BLACKFIN_SECTIONS_H
#define _BLACKFIN_SECTIONS_H #define _BLACKFIN_SECTIONS_H
......
#include <asm-generic/sembuf.h>
#include <asm-generic/serial.h>
#include <asm-generic/setup.h>
#include <asm-generic/shmbuf.h>
#include <asm-generic/shmparam.h>
/* /*
 * Copyright 2004-2008 Analog Devices Inc. * Copyright 2004-2008 Analog Devices Inc.
 * *
 * Licensed under the GPL-2 or later. * Licensed under the GPL-2 or later.
 */ */
#ifndef _ASM_BLACKFIN_SIGCONTEXT_H #ifndef _ASM_BLACKFIN_SIGCONTEXT_H
#define _ASM_BLACKFIN_SIGCONTEXT_H #define _ASM_BLACKFIN_SIGCONTEXT_H
......
#include <asm-generic/socket.h>
#include <asm-generic/sockios.h>
/* /*
 * Copyright 2004-2009 Analog Devices Inc. * Copyright 2004-2009 Analog Devices Inc.
 * *
 * Licensed under the GPL-2 or later. * Licensed under the GPL-2 or later.
 */ */
#ifndef __BFIN_SPINLOCK_H #ifndef __BFIN_SPINLOCK_H
#define __BFIN_SPINLOCK_H #define __BFIN_SPINLOCK_H
......
#include <asm-generic/statfs.h>
#include <asm-generic/termbits.h>
#include <asm-generic/termios.h>
#include <asm-generic/topology.h>
#include <asm-generic/types.h>
#include <asm-generic/ucontext.h>
#include <asm-generic/unaligned.h>
#include <asm-generic/user.h>
#include <asm-generic/xor.h>
...@@ -21,6 +21,7 @@ obj-$(CONFIG_FUNCTION_TRACER) += ftrace-entry.o ...@@ -21,6 +21,7 @@ obj-$(CONFIG_FUNCTION_TRACER) += ftrace-entry.o
obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o
CFLAGS_REMOVE_ftrace.o = -pg CFLAGS_REMOVE_ftrace.o = -pg
obj-$(CONFIG_HAVE_PWM) += pwm.o
obj-$(CONFIG_IPIPE) += ipipe.o obj-$(CONFIG_IPIPE) += ipipe.o
obj-$(CONFIG_BFIN_GPTIMERS) += gptimers.o obj-$(CONFIG_BFIN_GPTIMERS) += gptimers.o
obj-$(CONFIG_CPLB_INFO) += cplbinfo.o obj-$(CONFIG_CPLB_INFO) += cplbinfo.o
......
...@@ -138,6 +138,16 @@ int main(void) ...@@ -138,6 +138,16 @@ int main(void)
DEFINE(PDA_DF_SEQSTAT, offsetof(struct blackfin_pda, seqstat_doublefault)); DEFINE(PDA_DF_SEQSTAT, offsetof(struct blackfin_pda, seqstat_doublefault));
DEFINE(PDA_DF_RETX, offsetof(struct blackfin_pda, retx_doublefault)); DEFINE(PDA_DF_RETX, offsetof(struct blackfin_pda, retx_doublefault));
#endif #endif
/* PDA initial management */
DEFINE(PDA_INIT_RETX, offsetof(struct blackfin_initial_pda, retx));
#ifdef CONFIG_DEBUG_DOUBLEFAULT
DEFINE(PDA_INIT_DF_DCPLB, offsetof(struct blackfin_initial_pda, dcplb_doublefault_addr));
DEFINE(PDA_INIT_DF_ICPLB, offsetof(struct blackfin_initial_pda, icplb_doublefault_addr));
DEFINE(PDA_INIT_DF_SEQSTAT, offsetof(struct blackfin_initial_pda, seqstat_doublefault));
DEFINE(PDA_INIT_DF_RETX, offsetof(struct blackfin_initial_pda, retx_doublefault));
#endif
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
/* Inter-core lock (in L2 SRAM) */ /* Inter-core lock (in L2 SRAM) */
DEFINE(SIZEOF_CORELOCK, sizeof(struct corelock_slot)); DEFINE(SIZEOF_CORELOCK, sizeof(struct corelock_slot));
......
...@@ -118,6 +118,9 @@ static struct str_ident { ...@@ -118,6 +118,9 @@ static struct str_ident {
#if defined(CONFIG_PM) #if defined(CONFIG_PM)
static struct gpio_port_s gpio_bank_saved[GPIO_BANK_NUM]; static struct gpio_port_s gpio_bank_saved[GPIO_BANK_NUM];
# ifdef BF538_FAMILY
static unsigned short port_fer_saved[3];
# endif
#endif #endif
static void gpio_error(unsigned gpio) static void gpio_error(unsigned gpio)
...@@ -604,6 +607,11 @@ void bfin_gpio_pm_hibernate_suspend(void) ...@@ -604,6 +607,11 @@ void bfin_gpio_pm_hibernate_suspend(void)
{ {
int i, bank; int i, bank;
#ifdef BF538_FAMILY
for (i = 0; i < ARRAY_SIZE(port_fer_saved); ++i)
port_fer_saved[i] = *port_fer[i];
#endif
for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) { for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) {
bank = gpio_bank(i); bank = gpio_bank(i);
...@@ -625,6 +633,10 @@ void bfin_gpio_pm_hibernate_suspend(void) ...@@ -625,6 +633,10 @@ void bfin_gpio_pm_hibernate_suspend(void)
gpio_bank_saved[bank].maska = gpio_array[bank]->maska; gpio_bank_saved[bank].maska = gpio_array[bank]->maska;
} }
#ifdef BFIN_SPECIAL_GPIO_BANKS
bfin_special_gpio_pm_hibernate_suspend();
#endif
AWA_DUMMY_READ(maska); AWA_DUMMY_READ(maska);
} }
...@@ -632,6 +644,11 @@ void bfin_gpio_pm_hibernate_restore(void) ...@@ -632,6 +644,11 @@ void bfin_gpio_pm_hibernate_restore(void)
{ {
int i, bank; int i, bank;
#ifdef BF538_FAMILY
for (i = 0; i < ARRAY_SIZE(port_fer_saved); ++i)
*port_fer[i] = port_fer_saved[i];
#endif
for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) { for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) {
bank = gpio_bank(i); bank = gpio_bank(i);
...@@ -653,6 +670,11 @@ void bfin_gpio_pm_hibernate_restore(void) ...@@ -653,6 +670,11 @@ void bfin_gpio_pm_hibernate_restore(void)
gpio_array[bank]->both = gpio_bank_saved[bank].both; gpio_array[bank]->both = gpio_bank_saved[bank].both;
gpio_array[bank]->maska = gpio_bank_saved[bank].maska; gpio_array[bank]->maska = gpio_bank_saved[bank].maska;
} }
#ifdef BFIN_SPECIAL_GPIO_BANKS
bfin_special_gpio_pm_hibernate_restore();
#endif
AWA_DUMMY_READ(maska); AWA_DUMMY_READ(maska);
} }
...@@ -691,9 +713,9 @@ void bfin_gpio_pm_hibernate_restore(void) ...@@ -691,9 +713,9 @@ void bfin_gpio_pm_hibernate_restore(void)
gpio_array[bank]->port_mux = gpio_bank_saved[bank].mux; gpio_array[bank]->port_mux = gpio_bank_saved[bank].mux;
gpio_array[bank]->port_fer = gpio_bank_saved[bank].fer; gpio_array[bank]->port_fer = gpio_bank_saved[bank].fer;
gpio_array[bank]->inen = gpio_bank_saved[bank].inen; gpio_array[bank]->inen = gpio_bank_saved[bank].inen;
gpio_array[bank]->dir_set = gpio_bank_saved[bank].dir;
gpio_array[bank]->data_set = gpio_bank_saved[bank].data gpio_array[bank]->data_set = gpio_bank_saved[bank].data
| gpio_bank_saved[bank].dir; & gpio_bank_saved[bank].dir;
gpio_array[bank]->dir_set = gpio_bank_saved[bank].dir;
} }
} }
#endif #endif
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#define PORT_MUX BFIN_PORT_MUX #define PORT_MUX BFIN_PORT_MUX
#endif #endif
#define _d(name, bits, addr, perms) debugfs_create_x##bits(name, perms, parent, (u##bits *)addr) #define _d(name, bits, addr, perms) debugfs_create_x##bits(name, perms, parent, (u##bits *)(addr))
#define d(name, bits, addr) _d(name, bits, addr, S_IRUSR|S_IWUSR) #define d(name, bits, addr) _d(name, bits, addr, S_IRUSR|S_IWUSR)
#define d_RO(name, bits, addr) _d(name, bits, addr, S_IRUSR) #define d_RO(name, bits, addr) _d(name, bits, addr, S_IRUSR)
#define d_WO(name, bits, addr) _d(name, bits, addr, S_IWUSR) #define d_WO(name, bits, addr) _d(name, bits, addr, S_IWUSR)
...@@ -223,7 +223,8 @@ bfin_debug_mmrs_dma(struct dentry *parent, unsigned long base, int num, char mdm ...@@ -223,7 +223,8 @@ bfin_debug_mmrs_dma(struct dentry *parent, unsigned long base, int num, char mdm
__DMA(CURR_DESC_PTR, curr_desc_ptr); __DMA(CURR_DESC_PTR, curr_desc_ptr);
__DMA(CURR_ADDR, curr_addr); __DMA(CURR_ADDR, curr_addr);
__DMA(IRQ_STATUS, irq_status); __DMA(IRQ_STATUS, irq_status);
__DMA(PERIPHERAL_MAP, peripheral_map); if (strcmp(pfx, "IMDMA") != 0)
__DMA(PERIPHERAL_MAP, peripheral_map);
__DMA(CURR_X_COUNT, curr_x_count); __DMA(CURR_X_COUNT, curr_x_count);
__DMA(CURR_Y_COUNT, curr_y_count); __DMA(CURR_Y_COUNT, curr_y_count);
} }
...@@ -277,6 +278,32 @@ bfin_debug_mmrs_gptimer(struct dentry *parent, unsigned long base, int num) ...@@ -277,6 +278,32 @@ bfin_debug_mmrs_gptimer(struct dentry *parent, unsigned long base, int num)
} }
#define GPTIMER(num) bfin_debug_mmrs_gptimer(parent, TIMER##num##_CONFIG, num) #define GPTIMER(num) bfin_debug_mmrs_gptimer(parent, TIMER##num##_CONFIG, num)
#define GPTIMER_GROUP_OFF(mmr) REGS_OFF(gptimer_group, mmr)
#define __GPTIMER_GROUP(uname, lname) __REGS(gptimer_group, #uname, lname)
static void __init __maybe_unused
bfin_debug_mmrs_gptimer_group(struct dentry *parent, unsigned long base, int num)
{
char buf[32], *_buf;
if (num == -1) {
_buf = buf + sprintf(buf, "TIMER_");
__GPTIMER_GROUP(ENABLE, enable);
__GPTIMER_GROUP(DISABLE, disable);
__GPTIMER_GROUP(STATUS, status);
} else {
/* These MMRs are a bit odd as the group # is a suffix */
_buf = buf + sprintf(buf, "TIMER_ENABLE%i", num);
d(buf, 16, base + GPTIMER_GROUP_OFF(enable));
_buf = buf + sprintf(buf, "TIMER_DISABLE%i", num);
d(buf, 16, base + GPTIMER_GROUP_OFF(disable));
_buf = buf + sprintf(buf, "TIMER_STATUS%i", num);
d(buf, 32, base + GPTIMER_GROUP_OFF(status));
}
}
#define GPTIMER_GROUP(mmr, num) bfin_debug_mmrs_gptimer_group(parent, mmr, num)
/* /*
* Handshake MDMA * Handshake MDMA
*/ */
...@@ -295,6 +322,29 @@ bfin_debug_mmrs_hmdma(struct dentry *parent, unsigned long base, int num) ...@@ -295,6 +322,29 @@ bfin_debug_mmrs_hmdma(struct dentry *parent, unsigned long base, int num)
} }
#define HMDMA(num) bfin_debug_mmrs_hmdma(parent, HMDMA##num##_CONTROL, num) #define HMDMA(num) bfin_debug_mmrs_hmdma(parent, HMDMA##num##_CONTROL, num)
/*
* Peripheral Interrupts (PINT/GPIO)
*/
#ifdef PINT0_MASK_SET
#define __PINT(uname, lname) __REGS(pint, #uname, lname)
static void __init __maybe_unused
bfin_debug_mmrs_pint(struct dentry *parent, unsigned long base, int num)
{
char buf[32], *_buf = REGS_STR_PFX(buf, PINT, num);
__PINT(MASK_SET, mask_set);
__PINT(MASK_CLEAR, mask_clear);
__PINT(REQUEST, request);
__PINT(ASSIGN, assign);
__PINT(EDGE_SET, edge_set);
__PINT(EDGE_CLEAR, edge_clear);
__PINT(INVERT_SET, invert_set);
__PINT(INVERT_CLEAR, invert_clear);
__PINT(PINSTATE, pinstate);
__PINT(LATCH, latch);
}
#define PINT(num) bfin_debug_mmrs_pint(parent, PINT##num##_MASK_SET, num)
#endif
/* /*
* Port/GPIO * Port/GPIO
*/ */
...@@ -747,7 +797,7 @@ static int __init bfin_debug_mmrs_init(void) ...@@ -747,7 +797,7 @@ static int __init bfin_debug_mmrs_init(void)
#endif #endif
parent = debugfs_create_dir("dmac", top); parent = debugfs_create_dir("dmac", top);
#ifdef DMA_TC_CNT #ifdef DMAC_TC_CNT
D16(DMAC_TC_CNT); D16(DMAC_TC_CNT);
D16(DMAC_TC_PER); D16(DMAC_TC_PER);
#endif #endif
...@@ -1005,29 +1055,19 @@ static int __init bfin_debug_mmrs_init(void) ...@@ -1005,29 +1055,19 @@ static int __init bfin_debug_mmrs_init(void)
#endif #endif
parent = debugfs_create_dir("gptimer", top); parent = debugfs_create_dir("gptimer", top);
#ifdef TIMER_DISABLE #ifdef TIMER_ENABLE
D16(TIMER_DISABLE); GPTIMER_GROUP(TIMER_ENABLE, -1);
D16(TIMER_ENABLE);
D32(TIMER_STATUS);
#endif #endif
#ifdef TIMER_DISABLE0 #ifdef TIMER_ENABLE0
D16(TIMER_DISABLE0); GPTIMER_GROUP(TIMER_ENABLE0, 0);
D16(TIMER_ENABLE0);
D32(TIMER_STATUS0);
#endif #endif
#ifdef TIMER_DISABLE1 #ifdef TIMER_ENABLE1
D16(TIMER_DISABLE1); GPTIMER_GROUP(TIMER_ENABLE1, 1);
D16(TIMER_ENABLE1);
D32(TIMER_STATUS1);
#endif #endif
/* XXX: Should convert BF561 MMR names */ /* XXX: Should convert BF561 MMR names */
#ifdef TMRS4_DISABLE #ifdef TMRS4_DISABLE
D16(TMRS4_DISABLE); GPTIMER_GROUP(TMRS4_ENABLE, 0);
D16(TMRS4_ENABLE); GPTIMER_GROUP(TMRS8_ENABLE, 1);
D32(TMRS4_STATUS);
D16(TMRS8_DISABLE);
D16(TMRS8_ENABLE);
D32(TMRS8_STATUS);
#endif #endif
GPTIMER(0); GPTIMER(0);
GPTIMER(1); GPTIMER(1);
...@@ -1253,6 +1293,14 @@ static int __init bfin_debug_mmrs_init(void) ...@@ -1253,6 +1293,14 @@ static int __init bfin_debug_mmrs_init(void)
D32(OTP_DATA3); D32(OTP_DATA3);
#endif #endif
#ifdef PINT0_MASK_SET
parent = debugfs_create_dir("pint", top);
PINT(0);
PINT(1);
PINT(2);
PINT(3);
#endif
#ifdef PIXC_CTL #ifdef PIXC_CTL
parent = debugfs_create_dir("pixc", top); parent = debugfs_create_dir("pixc", top);
D16(PIXC_CTL); D16(PIXC_CTL);
...@@ -1816,7 +1864,6 @@ static int __init bfin_debug_mmrs_init(void) ...@@ -1816,7 +1864,6 @@ static int __init bfin_debug_mmrs_init(void)
{ {
int num; int num;
unsigned long base; unsigned long base;
char *_buf, buf[32];
base = PORTA_FER; base = PORTA_FER;
for (num = 0; num < 10; ++num) { for (num = 0; num < 10; ++num) {
...@@ -1824,24 +1871,6 @@ static int __init bfin_debug_mmrs_init(void) ...@@ -1824,24 +1871,6 @@ static int __init bfin_debug_mmrs_init(void)
base += sizeof(struct bfin_gpio_regs); base += sizeof(struct bfin_gpio_regs);
} }
#define __PINT(uname, lname) __REGS(pint, #uname, lname)
parent = debugfs_create_dir("pint", top);
base = PINT0_MASK_SET;
for (num = 0; num < 4; ++num) {
_buf = REGS_STR_PFX(buf, PINT, num);
__PINT(MASK_SET, mask_set);
__PINT(MASK_CLEAR, mask_clear);
__PINT(IRQ, irq);
__PINT(ASSIGN, assign);
__PINT(EDGE_SET, edge_set);
__PINT(EDGE_CLEAR, edge_clear);
__PINT(INVERT_SET, invert_set);
__PINT(INVERT_CLEAR, invert_clear);
__PINT(PINSTATE, pinstate);
__PINT(LATCH, latch);
base += sizeof(struct bfin_pint_regs);
}
} }
#endif /* BF54x */ #endif /* BF54x */
......
...@@ -25,49 +25,33 @@ ...@@ -25,49 +25,33 @@
#define BFIN_TIMER_NUM_GROUP (BFIN_TIMER_OCTET(MAX_BLACKFIN_GPTIMERS - 1) + 1) #define BFIN_TIMER_NUM_GROUP (BFIN_TIMER_OCTET(MAX_BLACKFIN_GPTIMERS - 1) + 1)
typedef struct { static struct bfin_gptimer_regs * const timer_regs[MAX_BLACKFIN_GPTIMERS] =
uint16_t config;
uint16_t __pad;
uint32_t counter;
uint32_t period;
uint32_t width;
} GPTIMER_timer_regs;
typedef struct {
uint16_t enable;
uint16_t __pad0;
uint16_t disable;
uint16_t __pad1;
uint32_t status;
} GPTIMER_group_regs;
static volatile GPTIMER_timer_regs *const timer_regs[MAX_BLACKFIN_GPTIMERS] =
{ {
(GPTIMER_timer_regs *)TIMER0_CONFIG, (void *)TIMER0_CONFIG,
(GPTIMER_timer_regs *)TIMER1_CONFIG, (void *)TIMER1_CONFIG,
(GPTIMER_timer_regs *)TIMER2_CONFIG, (void *)TIMER2_CONFIG,
#if (MAX_BLACKFIN_GPTIMERS > 3) #if (MAX_BLACKFIN_GPTIMERS > 3)
(GPTIMER_timer_regs *)TIMER3_CONFIG, (void *)TIMER3_CONFIG,
(GPTIMER_timer_regs *)TIMER4_CONFIG, (void *)TIMER4_CONFIG,
(GPTIMER_timer_regs *)TIMER5_CONFIG, (void *)TIMER5_CONFIG,
(GPTIMER_timer_regs *)TIMER6_CONFIG, (void *)TIMER6_CONFIG,
(GPTIMER_timer_regs *)TIMER7_CONFIG, (void *)TIMER7_CONFIG,
# if (MAX_BLACKFIN_GPTIMERS > 8) # if (MAX_BLACKFIN_GPTIMERS > 8)
(GPTIMER_timer_regs *)TIMER8_CONFIG, (void *)TIMER8_CONFIG,
(GPTIMER_timer_regs *)TIMER9_CONFIG, (void *)TIMER9_CONFIG,
(GPTIMER_timer_regs *)TIMER10_CONFIG, (void *)TIMER10_CONFIG,
# if (MAX_BLACKFIN_GPTIMERS > 11) # if (MAX_BLACKFIN_GPTIMERS > 11)
(GPTIMER_timer_regs *)TIMER11_CONFIG, (void *)TIMER11_CONFIG,
# endif # endif
# endif # endif
#endif #endif
}; };
static volatile GPTIMER_group_regs *const group_regs[BFIN_TIMER_NUM_GROUP] = static struct bfin_gptimer_group_regs * const group_regs[BFIN_TIMER_NUM_GROUP] =
{ {
(GPTIMER_group_regs *)TIMER0_GROUP_REG, (void *)TIMER0_GROUP_REG,
#if (MAX_BLACKFIN_GPTIMERS > 8) #if (MAX_BLACKFIN_GPTIMERS > 8)
(GPTIMER_group_regs *)TIMER8_GROUP_REG, (void *)TIMER8_GROUP_REG,
#endif #endif
}; };
...@@ -140,7 +124,7 @@ static uint32_t const timil_mask[MAX_BLACKFIN_GPTIMERS] = ...@@ -140,7 +124,7 @@ static uint32_t const timil_mask[MAX_BLACKFIN_GPTIMERS] =
void set_gptimer_pwidth(unsigned int timer_id, uint32_t value) void set_gptimer_pwidth(unsigned int timer_id, uint32_t value)
{ {
tassert(timer_id < MAX_BLACKFIN_GPTIMERS); tassert(timer_id < MAX_BLACKFIN_GPTIMERS);
timer_regs[timer_id]->width = value; bfin_write(&timer_regs[timer_id]->width, value);
SSYNC(); SSYNC();
} }
EXPORT_SYMBOL(set_gptimer_pwidth); EXPORT_SYMBOL(set_gptimer_pwidth);
...@@ -148,14 +132,14 @@ EXPORT_SYMBOL(set_gptimer_pwidth); ...@@ -148,14 +132,14 @@ EXPORT_SYMBOL(set_gptimer_pwidth);
uint32_t get_gptimer_pwidth(unsigned int timer_id) uint32_t get_gptimer_pwidth(unsigned int timer_id)
{ {
tassert(timer_id < MAX_BLACKFIN_GPTIMERS); tassert(timer_id < MAX_BLACKFIN_GPTIMERS);
return timer_regs[timer_id]->width; return bfin_read(&timer_regs[timer_id]->width);
} }
EXPORT_SYMBOL(get_gptimer_pwidth); EXPORT_SYMBOL(get_gptimer_pwidth);
void set_gptimer_period(unsigned int timer_id, uint32_t period) void set_gptimer_period(unsigned int timer_id, uint32_t period)
{ {
tassert(timer_id < MAX_BLACKFIN_GPTIMERS); tassert(timer_id < MAX_BLACKFIN_GPTIMERS);
timer_regs[timer_id]->period = period; bfin_write(&timer_regs[timer_id]->period, period);
SSYNC(); SSYNC();
} }
EXPORT_SYMBOL(set_gptimer_period); EXPORT_SYMBOL(set_gptimer_period);
...@@ -163,71 +147,76 @@ EXPORT_SYMBOL(set_gptimer_period); ...@@ -163,71 +147,76 @@ EXPORT_SYMBOL(set_gptimer_period);
uint32_t get_gptimer_period(unsigned int timer_id) uint32_t get_gptimer_period(unsigned int timer_id)
{ {
tassert(timer_id < MAX_BLACKFIN_GPTIMERS); tassert(timer_id < MAX_BLACKFIN_GPTIMERS);
return timer_regs[timer_id]->period; return bfin_read(&timer_regs[timer_id]->period);
} }
EXPORT_SYMBOL(get_gptimer_period); EXPORT_SYMBOL(get_gptimer_period);
uint32_t get_gptimer_count(unsigned int timer_id) uint32_t get_gptimer_count(unsigned int timer_id)
{ {
tassert(timer_id < MAX_BLACKFIN_GPTIMERS); tassert(timer_id < MAX_BLACKFIN_GPTIMERS);
return timer_regs[timer_id]->counter; return bfin_read(&timer_regs[timer_id]->counter);
} }
EXPORT_SYMBOL(get_gptimer_count); EXPORT_SYMBOL(get_gptimer_count);
uint32_t get_gptimer_status(unsigned int group) uint32_t get_gptimer_status(unsigned int group)
{ {
tassert(group < BFIN_TIMER_NUM_GROUP); tassert(group < BFIN_TIMER_NUM_GROUP);
return group_regs[group]->status; return bfin_read(&group_regs[group]->status);
} }
EXPORT_SYMBOL(get_gptimer_status); EXPORT_SYMBOL(get_gptimer_status);
void set_gptimer_status(unsigned int group, uint32_t value) void set_gptimer_status(unsigned int group, uint32_t value)
{ {
tassert(group < BFIN_TIMER_NUM_GROUP); tassert(group < BFIN_TIMER_NUM_GROUP);
group_regs[group]->status = value; bfin_write(&group_regs[group]->status, value);
SSYNC(); SSYNC();
} }
EXPORT_SYMBOL(set_gptimer_status); EXPORT_SYMBOL(set_gptimer_status);
static uint32_t read_gptimer_status(unsigned int timer_id)
{
return bfin_read(&group_regs[BFIN_TIMER_OCTET(timer_id)]->status);
}
int get_gptimer_intr(unsigned int timer_id) int get_gptimer_intr(unsigned int timer_id)
{ {
tassert(timer_id < MAX_BLACKFIN_GPTIMERS); tassert(timer_id < MAX_BLACKFIN_GPTIMERS);
return !!(group_regs[BFIN_TIMER_OCTET(timer_id)]->status & timil_mask[timer_id]); return !!(read_gptimer_status(timer_id) & timil_mask[timer_id]);
} }
EXPORT_SYMBOL(get_gptimer_intr); EXPORT_SYMBOL(get_gptimer_intr);
void clear_gptimer_intr(unsigned int timer_id) void clear_gptimer_intr(unsigned int timer_id)
{ {
tassert(timer_id < MAX_BLACKFIN_GPTIMERS); tassert(timer_id < MAX_BLACKFIN_GPTIMERS);
group_regs[BFIN_TIMER_OCTET(timer_id)]->status = timil_mask[timer_id]; bfin_write(&group_regs[BFIN_TIMER_OCTET(timer_id)]->status, timil_mask[timer_id]);
} }
EXPORT_SYMBOL(clear_gptimer_intr); EXPORT_SYMBOL(clear_gptimer_intr);
int get_gptimer_over(unsigned int timer_id) int get_gptimer_over(unsigned int timer_id)
{ {
tassert(timer_id < MAX_BLACKFIN_GPTIMERS); tassert(timer_id < MAX_BLACKFIN_GPTIMERS);
return !!(group_regs[BFIN_TIMER_OCTET(timer_id)]->status & tovf_mask[timer_id]); return !!(read_gptimer_status(timer_id) & tovf_mask[timer_id]);
} }
EXPORT_SYMBOL(get_gptimer_over); EXPORT_SYMBOL(get_gptimer_over);
void clear_gptimer_over(unsigned int timer_id) void clear_gptimer_over(unsigned int timer_id)
{ {
tassert(timer_id < MAX_BLACKFIN_GPTIMERS); tassert(timer_id < MAX_BLACKFIN_GPTIMERS);
group_regs[BFIN_TIMER_OCTET(timer_id)]->status = tovf_mask[timer_id]; bfin_write(&group_regs[BFIN_TIMER_OCTET(timer_id)]->status, tovf_mask[timer_id]);
} }
EXPORT_SYMBOL(clear_gptimer_over); EXPORT_SYMBOL(clear_gptimer_over);
int get_gptimer_run(unsigned int timer_id) int get_gptimer_run(unsigned int timer_id)
{ {
tassert(timer_id < MAX_BLACKFIN_GPTIMERS); tassert(timer_id < MAX_BLACKFIN_GPTIMERS);
return !!(group_regs[BFIN_TIMER_OCTET(timer_id)]->status & trun_mask[timer_id]); return !!(read_gptimer_status(timer_id) & trun_mask[timer_id]);
} }
EXPORT_SYMBOL(get_gptimer_run); EXPORT_SYMBOL(get_gptimer_run);
void set_gptimer_config(unsigned int timer_id, uint16_t config) void set_gptimer_config(unsigned int timer_id, uint16_t config)
{ {
tassert(timer_id < MAX_BLACKFIN_GPTIMERS); tassert(timer_id < MAX_BLACKFIN_GPTIMERS);
timer_regs[timer_id]->config = config; bfin_write(&timer_regs[timer_id]->config, config);
SSYNC(); SSYNC();
} }
EXPORT_SYMBOL(set_gptimer_config); EXPORT_SYMBOL(set_gptimer_config);
...@@ -235,7 +224,7 @@ EXPORT_SYMBOL(set_gptimer_config); ...@@ -235,7 +224,7 @@ EXPORT_SYMBOL(set_gptimer_config);
uint16_t get_gptimer_config(unsigned int timer_id) uint16_t get_gptimer_config(unsigned int timer_id)
{ {
tassert(timer_id < MAX_BLACKFIN_GPTIMERS); tassert(timer_id < MAX_BLACKFIN_GPTIMERS);
return timer_regs[timer_id]->config; return bfin_read(&timer_regs[timer_id]->config);
} }
EXPORT_SYMBOL(get_gptimer_config); EXPORT_SYMBOL(get_gptimer_config);
...@@ -244,7 +233,7 @@ void enable_gptimers(uint16_t mask) ...@@ -244,7 +233,7 @@ void enable_gptimers(uint16_t mask)
int i; int i;
tassert((mask & ~BLACKFIN_GPTIMER_IDMASK) == 0); tassert((mask & ~BLACKFIN_GPTIMER_IDMASK) == 0);
for (i = 0; i < BFIN_TIMER_NUM_GROUP; ++i) { for (i = 0; i < BFIN_TIMER_NUM_GROUP; ++i) {
group_regs[i]->enable = mask & 0xFF; bfin_write(&group_regs[i]->enable, mask & 0xFF);
mask >>= 8; mask >>= 8;
} }
SSYNC(); SSYNC();
...@@ -257,7 +246,7 @@ static void _disable_gptimers(uint16_t mask) ...@@ -257,7 +246,7 @@ static void _disable_gptimers(uint16_t mask)
uint16_t m = mask; uint16_t m = mask;
tassert((mask & ~BLACKFIN_GPTIMER_IDMASK) == 0); tassert((mask & ~BLACKFIN_GPTIMER_IDMASK) == 0);
for (i = 0; i < BFIN_TIMER_NUM_GROUP; ++i) { for (i = 0; i < BFIN_TIMER_NUM_GROUP; ++i) {
group_regs[i]->disable = m & 0xFF; bfin_write(&group_regs[i]->disable, m & 0xFF);
m >>= 8; m >>= 8;
} }
} }
...@@ -268,7 +257,7 @@ void disable_gptimers(uint16_t mask) ...@@ -268,7 +257,7 @@ void disable_gptimers(uint16_t mask)
_disable_gptimers(mask); _disable_gptimers(mask);
for (i = 0; i < MAX_BLACKFIN_GPTIMERS; ++i) for (i = 0; i < MAX_BLACKFIN_GPTIMERS; ++i)
if (mask & (1 << i)) if (mask & (1 << i))
group_regs[BFIN_TIMER_OCTET(i)]->status = trun_mask[i]; bfin_write(&group_regs[BFIN_TIMER_OCTET(i)]->status, trun_mask[i]);
SSYNC(); SSYNC();
} }
EXPORT_SYMBOL(disable_gptimers); EXPORT_SYMBOL(disable_gptimers);
...@@ -283,7 +272,7 @@ EXPORT_SYMBOL(disable_gptimers_sync); ...@@ -283,7 +272,7 @@ EXPORT_SYMBOL(disable_gptimers_sync);
void set_gptimer_pulse_hi(unsigned int timer_id) void set_gptimer_pulse_hi(unsigned int timer_id)
{ {
tassert(timer_id < MAX_BLACKFIN_GPTIMERS); tassert(timer_id < MAX_BLACKFIN_GPTIMERS);
timer_regs[timer_id]->config |= TIMER_PULSE_HI; bfin_write_or(&timer_regs[timer_id]->config, TIMER_PULSE_HI);
SSYNC(); SSYNC();
} }
EXPORT_SYMBOL(set_gptimer_pulse_hi); EXPORT_SYMBOL(set_gptimer_pulse_hi);
...@@ -291,7 +280,7 @@ EXPORT_SYMBOL(set_gptimer_pulse_hi); ...@@ -291,7 +280,7 @@ EXPORT_SYMBOL(set_gptimer_pulse_hi);
void clear_gptimer_pulse_hi(unsigned int timer_id) void clear_gptimer_pulse_hi(unsigned int timer_id)
{ {
tassert(timer_id < MAX_BLACKFIN_GPTIMERS); tassert(timer_id < MAX_BLACKFIN_GPTIMERS);
timer_regs[timer_id]->config &= ~TIMER_PULSE_HI; bfin_write_and(&timer_regs[timer_id]->config, ~TIMER_PULSE_HI);
SSYNC(); SSYNC();
} }
EXPORT_SYMBOL(clear_gptimer_pulse_hi); EXPORT_SYMBOL(clear_gptimer_pulse_hi);
...@@ -301,7 +290,7 @@ uint16_t get_enabled_gptimers(void) ...@@ -301,7 +290,7 @@ uint16_t get_enabled_gptimers(void)
int i; int i;
uint16_t result = 0; uint16_t result = 0;
for (i = 0; i < BFIN_TIMER_NUM_GROUP; ++i) for (i = 0; i < BFIN_TIMER_NUM_GROUP; ++i)
result |= (group_regs[i]->enable << (i << 3)); result |= (bfin_read(&group_regs[i]->enable) << (i << 3));
return result; return result;
} }
EXPORT_SYMBOL(get_enabled_gptimers); EXPORT_SYMBOL(get_enabled_gptimers);
......
...@@ -140,7 +140,6 @@ EXPORT_SYMBOL(kernel_thread); ...@@ -140,7 +140,6 @@ EXPORT_SYMBOL(kernel_thread);
*/ */
void start_thread(struct pt_regs *regs, unsigned long new_ip, unsigned long new_sp) void start_thread(struct pt_regs *regs, unsigned long new_ip, unsigned long new_sp)
{ {
set_fs(USER_DS);
regs->pc = new_ip; regs->pc = new_ip;
if (current->mm) if (current->mm)
regs->p5 = current->mm->start_data; regs->p5 = current->mm->start_data;
......
/*
* Blackfin Pulse Width Modulation (PWM) core
*
* Copyright (c) 2011 Analog Devices Inc.
*
* Licensed under the GPL-2 or later.
*/
#include <linux/module.h>
#include <linux/pwm.h>
#include <linux/slab.h>
#include <asm/gptimers.h>
#include <asm/portmux.h>
struct pwm_device {
unsigned id;
unsigned short pin;
};
static const unsigned short pwm_to_gptimer_per[] = {
P_TMR0, P_TMR1, P_TMR2, P_TMR3, P_TMR4, P_TMR5,
P_TMR6, P_TMR7, P_TMR8, P_TMR9, P_TMR10, P_TMR11,
};
struct pwm_device *pwm_request(int pwm_id, const char *label)
{
struct pwm_device *pwm;
int ret;
/* XXX: pwm_id really should be unsigned */
if (pwm_id < 0)
return NULL;
pwm = kzalloc(sizeof(*pwm), GFP_KERNEL);
if (!pwm)
return pwm;
pwm->id = pwm_id;
if (pwm->id >= ARRAY_SIZE(pwm_to_gptimer_per))
goto err;
pwm->pin = pwm_to_gptimer_per[pwm->id];
ret = peripheral_request(pwm->pin, label);
if (ret)
goto err;
return pwm;
err:
kfree(pwm);
return NULL;
}
EXPORT_SYMBOL(pwm_request);
void pwm_free(struct pwm_device *pwm)
{
peripheral_free(pwm->pin);
kfree(pwm);
}
EXPORT_SYMBOL(pwm_free);
int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)
{
unsigned long period, duty;
unsigned long long val;
if (duty_ns < 0 || duty_ns > period_ns)
return -EINVAL;
val = (unsigned long long)get_sclk() * period_ns;
do_div(val, NSEC_PER_SEC);
period = val;
val = (unsigned long long)period * duty_ns;
do_div(val, period_ns);
duty = period - val;
if (duty >= period)
duty = period - 1;
set_gptimer_config(pwm->id, TIMER_MODE_PWM | TIMER_PERIOD_CNT);
set_gptimer_pwidth(pwm->id, duty);
set_gptimer_period(pwm->id, period);
return 0;
}
EXPORT_SYMBOL(pwm_config);
int pwm_enable(struct pwm_device *pwm)
{
enable_gptimer(pwm->id);
return 0;
}
EXPORT_SYMBOL(pwm_enable);
void pwm_disable(struct pwm_device *pwm)
{
disable_gptimer(pwm->id);
}
EXPORT_SYMBOL(pwm_disable);
...@@ -54,7 +54,9 @@ static void bfin_reset(void) ...@@ -54,7 +54,9 @@ static void bfin_reset(void)
/* The BF526 ROM will crash during reset */ /* The BF526 ROM will crash during reset */
#if defined(__ADSPBF522__) || defined(__ADSPBF524__) || defined(__ADSPBF526__) #if defined(__ADSPBF522__) || defined(__ADSPBF524__) || defined(__ADSPBF526__)
bfin_read_SWRST(); /* Seems to be fixed with newer parts though ... */
if (__SILICON_REVISION__ < 1 && bfin_revid() < 1)
bfin_read_SWRST();
#endif #endif
/* Wait for the SWRST write to complete. Cannot rely on SSYNC /* Wait for the SWRST write to complete. Cannot rely on SSYNC
......
...@@ -54,8 +54,7 @@ EXPORT_SYMBOL(mtd_size); ...@@ -54,8 +54,7 @@ EXPORT_SYMBOL(mtd_size);
#endif #endif
char __initdata command_line[COMMAND_LINE_SIZE]; char __initdata command_line[COMMAND_LINE_SIZE];
void __initdata *init_retx, *init_saved_retx, *init_saved_seqstat, struct blackfin_initial_pda __initdata initial_pda;
*init_saved_icplb_fault_addr, *init_saved_dcplb_fault_addr;
/* boot memmap, for parsing "memmap=" */ /* boot memmap, for parsing "memmap=" */
#define BFIN_MEMMAP_MAX 128 /* number of entries in bfin_memmap */ #define BFIN_MEMMAP_MAX 128 /* number of entries in bfin_memmap */
...@@ -957,13 +956,16 @@ void __init setup_arch(char **cmdline_p) ...@@ -957,13 +956,16 @@ void __init setup_arch(char **cmdline_p)
printk(KERN_EMERG "Recovering from DOUBLE FAULT event\n"); printk(KERN_EMERG "Recovering from DOUBLE FAULT event\n");
#ifdef CONFIG_DEBUG_DOUBLEFAULT #ifdef CONFIG_DEBUG_DOUBLEFAULT
/* We assume the crashing kernel, and the current symbol table match */ /* We assume the crashing kernel, and the current symbol table match */
printk(KERN_EMERG " While handling exception (EXCAUSE = 0x%x) at %pF\n", printk(KERN_EMERG " While handling exception (EXCAUSE = %#x) at %pF\n",
(int)init_saved_seqstat & SEQSTAT_EXCAUSE, init_saved_retx); initial_pda.seqstat_doublefault & SEQSTAT_EXCAUSE,
printk(KERN_NOTICE " DCPLB_FAULT_ADDR: %pF\n", init_saved_dcplb_fault_addr); initial_pda.retx_doublefault);
printk(KERN_NOTICE " ICPLB_FAULT_ADDR: %pF\n", init_saved_icplb_fault_addr); printk(KERN_NOTICE " DCPLB_FAULT_ADDR: %pF\n",
initial_pda.dcplb_doublefault_addr);
printk(KERN_NOTICE " ICPLB_FAULT_ADDR: %pF\n",
initial_pda.icplb_doublefault_addr);
#endif #endif
printk(KERN_NOTICE " The instruction at %pF caused a double exception\n", printk(KERN_NOTICE " The instruction at %pF caused a double exception\n",
init_retx); initial_pda.retx);
} else if (_bfin_swrst & RESET_WDOG) } else if (_bfin_swrst & RESET_WDOG)
printk(KERN_INFO "Recovering from Watchdog event\n"); printk(KERN_INFO "Recovering from Watchdog event\n");
else if (_bfin_swrst & RESET_SOFTWARE) else if (_bfin_swrst & RESET_SOFTWARE)
......
...@@ -51,7 +51,7 @@ void __init setup_core_timer(void) ...@@ -51,7 +51,7 @@ void __init setup_core_timer(void)
u32 tcount; u32 tcount;
/* power up the timer, but don't enable it just yet */ /* power up the timer, but don't enable it just yet */
bfin_write_TCNTL(1); bfin_write_TCNTL(TMPWR);
CSYNC(); CSYNC();
/* the TSCALE prescaler counter */ /* the TSCALE prescaler counter */
...@@ -64,7 +64,7 @@ void __init setup_core_timer(void) ...@@ -64,7 +64,7 @@ void __init setup_core_timer(void)
/* now enable the timer */ /* now enable the timer */
CSYNC(); CSYNC();
bfin_write_TCNTL(7); bfin_write_TCNTL(TAUTORLD | TMREN | TMPWR);
} }
#endif #endif
......
...@@ -155,6 +155,7 @@ SECTIONS ...@@ -155,6 +155,7 @@ SECTIONS
SECURITY_INITCALL SECURITY_INITCALL
INIT_RAM_FS INIT_RAM_FS
. = ALIGN(PAGE_SIZE);
___per_cpu_load = .; ___per_cpu_load = .;
PERCPU_INPUT(32) PERCPU_INPUT(32)
......
...@@ -11,55 +11,75 @@ menu "BF518 Specific Configuration" ...@@ -11,55 +11,75 @@ menu "BF518 Specific Configuration"
comment "Alternative Multiplexing Scheme" comment "Alternative Multiplexing Scheme"
choice choice
prompt "SPORT0" prompt "PWM Channel Pins"
default BF518_SPORT0_PORTG default BF518_PWM_ALL_PORTF
help help
Select PORT used for SPORT0. See Hardware Reference Manual Select pins used for the PWM channels:
PWM_AH PWM_AL PWM_BH PWM_BL PWM_CH PWM_CL
config BF518_SPORT0_PORTF See the Hardware Reference Manual for more details.
bool "PORT F"
config BF518_PWM_ALL_PORTF
bool "PF1 - PF6"
help help
PORT F PF{1,2,3,4,5,6} <-> PWM_{AH,AL,BH,BL,CH,CL}
config BF518_SPORT0_PORTG config BF518_PWM_PORTF_PORTG
bool "PORT G" bool "PF11 - PF14 / PG1 - PG2"
help help
PORT G PF{11,12,13,14} <-> PWM_{AH,AL,BH,BL}
PG{1,2} <-> PWM_{CH,CL}
endchoice endchoice
choice choice
prompt "SPORT0 TSCLK Location" prompt "PWM Sync Pin"
depends on BF518_SPORT0_PORTG default BF518_PWM_SYNC_PF7
default BF518_SPORT0_TSCLK_PG10
help help
Select PIN used for SPORT0_TSCLK. See Hardware Reference Manual Select the pin used for PWM_SYNC.
config BF518_SPORT0_TSCLK_PG10 See the Hardware Reference Manual for more details.
bool "PORT PG10"
help config BF518_PWM_SYNC_PF7
PORT PG10 bool "PF7"
config BF518_PWM_SYNC_PF15
bool "PF15"
endchoice
config BF518_SPORT0_TSCLK_PG14 choice
bool "PORT PG14" prompt "PWM Trip B Pin"
default BF518_PWM_TRIPB_PG10
help help
PORT PG14 Select the pin used for PWM_TRIPB.
See the Hardware Reference Manual for more details.
config BF518_PWM_TRIPB_PG10
bool "PG10"
config BF518_PWM_TRIPB_PG14
bool "PG14"
endchoice endchoice
choice choice
prompt "UART1" prompt "PPI / Timer Pins"
default BF518_UART1_PORTF default BF518_PPI_TMR_PG5
help help
Select PORT used for UART1. See Hardware Reference Manual Select pins used for PPI/Timer:
PPICLK PPIFS1 PPIFS2
TMRCLK TMR0 TMR1
config BF518_UART1_PORTF See the Hardware Reference Manual for more details.
bool "PORT F"
config BF518_PPI_TMR_PG5
bool "PG5 - PG7"
help help
PORT F PG{5,6,7} <-> {PPICLK/TMRCLK,TMR0/PPIFS1,TMR1/PPIFS2}
config BF518_UART1_PORTG config BF518_PPI_TMR_PG12
bool "PORT G" bool "PG12 - PG14"
help help
PORT G PG{12,13,14} <-> {PPICLK/TMRCLK,TMR0/PPIFS1,TMR1/PPIFS2}
endchoice endchoice
comment "Hysteresis/Schmitt Trigger Control" comment "Hysteresis/Schmitt Trigger Control"
......
...@@ -187,43 +187,16 @@ static struct flash_platform_data bfin_spi_flash_data = { ...@@ -187,43 +187,16 @@ static struct flash_platform_data bfin_spi_flash_data = {
/* SPI flash chip (m25p64) */ /* SPI flash chip (m25p64) */
static struct bfin5xx_spi_chip spi_flash_chip_info = { static struct bfin5xx_spi_chip spi_flash_chip_info = {
.enable_dma = 0, /* use dma transfer with this chip*/ .enable_dma = 0, /* use dma transfer with this chip*/
.bits_per_word = 8,
}; };
#endif #endif
#if defined(CONFIG_BFIN_SPI_ADC) \
|| defined(CONFIG_BFIN_SPI_ADC_MODULE)
/* SPI ADC chip */
static struct bfin5xx_spi_chip spi_adc_chip_info = {
.enable_dma = 1, /* use dma transfer with this chip*/
.bits_per_word = 16,
};
#endif
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
#if defined(CONFIG_NET_DSA_KSZ8893M) \
|| defined(CONFIG_NET_DSA_KSZ8893M_MODULE)
/* SPI SWITCH CHIP */
static struct bfin5xx_spi_chip spi_switch_info = {
.enable_dma = 0,
.bits_per_word = 8,
};
#endif
#endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
static struct bfin5xx_spi_chip mmc_spi_chip_info = { static struct bfin5xx_spi_chip mmc_spi_chip_info = {
.enable_dma = 0, .enable_dma = 0,
.bits_per_word = 8,
}; };
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
.enable_dma = 0,
.bits_per_word = 16,
};
static const struct ad7877_platform_data bfin_ad7877_ts_info = { static const struct ad7877_platform_data bfin_ad7877_ts_info = {
.model = 7877, .model = 7877,
.vref_delay_usecs = 50, /* internal, no capacitor */ .vref_delay_usecs = 50, /* internal, no capacitor */
...@@ -239,21 +212,6 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = { ...@@ -239,21 +212,6 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = {
}; };
#endif #endif
#if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \
&& defined(CONFIG_SND_SOC_WM8731_SPI)
static struct bfin5xx_spi_chip spi_wm8731_chip_info = {
.enable_dma = 0,
.bits_per_word = 16,
};
#endif
#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
static struct bfin5xx_spi_chip spidev_chip_info = {
.enable_dma = 0,
.bits_per_word = 8,
};
#endif
static struct spi_board_info bfin_spi_board_info[] __initdata = { static struct spi_board_info bfin_spi_board_info[] __initdata = {
#if defined(CONFIG_MTD_M25P80) \ #if defined(CONFIG_MTD_M25P80) \
|| defined(CONFIG_MTD_M25P80_MODULE) || defined(CONFIG_MTD_M25P80_MODULE)
...@@ -269,18 +227,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -269,18 +227,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_BFIN_SPI_ADC) \
|| defined(CONFIG_BFIN_SPI_ADC_MODULE)
{
.modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
.max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, /* Framework bus number */
.chip_select = 1, /* Framework chip select. */
.platform_data = NULL, /* No spi_driver specific config */
.controller_data = &spi_adc_chip_info,
},
#endif
#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
#if defined(CONFIG_NET_DSA_KSZ8893M) \ #if defined(CONFIG_NET_DSA_KSZ8893M) \
|| defined(CONFIG_NET_DSA_KSZ8893M_MODULE) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE)
...@@ -290,7 +236,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -290,7 +236,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.bus_num = 0, .bus_num = 0,
.chip_select = 1, .chip_select = 1,
.platform_data = NULL, .platform_data = NULL,
.controller_data = &spi_switch_info,
.mode = SPI_MODE_3, .mode = SPI_MODE_3,
}, },
#endif #endif
...@@ -314,7 +259,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -314,7 +259,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = 2, .chip_select = 2,
.controller_data = &spi_ad7877_chip_info,
}, },
#endif #endif
#if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \
...@@ -324,7 +268,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -324,7 +268,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = 5, .chip_select = 5,
.controller_data = &spi_wm8731_chip_info,
.mode = SPI_MODE_0, .mode = SPI_MODE_0,
}, },
#endif #endif
...@@ -334,7 +277,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -334,7 +277,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = 1, .chip_select = 1,
.controller_data = &spidev_chip_info,
}, },
#endif #endif
#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
...@@ -343,7 +285,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -343,7 +285,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = 1, .chip_select = 1,
.controller_data = &lq035q1_spi_chip_info,
.mode = SPI_CPHA | SPI_CPOL, .mode = SPI_CPHA | SPI_CPOL,
}, },
#endif #endif
......
...@@ -138,32 +138,16 @@ static struct flash_platform_data bfin_spi_flash_data = { ...@@ -138,32 +138,16 @@ static struct flash_platform_data bfin_spi_flash_data = {
/* SPI flash chip (m25p64) */ /* SPI flash chip (m25p64) */
static struct bfin5xx_spi_chip spi_flash_chip_info = { static struct bfin5xx_spi_chip spi_flash_chip_info = {
.enable_dma = 0, /* use dma transfer with this chip*/ .enable_dma = 0, /* use dma transfer with this chip*/
.bits_per_word = 8,
};
#endif
#if defined(CONFIG_BFIN_SPI_ADC) \
|| defined(CONFIG_BFIN_SPI_ADC_MODULE)
/* SPI ADC chip */
static struct bfin5xx_spi_chip spi_adc_chip_info = {
.enable_dma = 1, /* use dma transfer with this chip*/
.bits_per_word = 16,
}; };
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
static struct bfin5xx_spi_chip mmc_spi_chip_info = { static struct bfin5xx_spi_chip mmc_spi_chip_info = {
.enable_dma = 0, .enable_dma = 0,
.bits_per_word = 8,
}; };
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
.enable_dma = 0,
.bits_per_word = 16,
};
static const struct ad7877_platform_data bfin_ad7877_ts_info = { static const struct ad7877_platform_data bfin_ad7877_ts_info = {
.model = 7877, .model = 7877,
.vref_delay_usecs = 50, /* internal, no capacitor */ .vref_delay_usecs = 50, /* internal, no capacitor */
...@@ -179,21 +163,6 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = { ...@@ -179,21 +163,6 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = {
}; };
#endif #endif
#if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \
&& defined(CONFIG_SND_SOC_WM8731_SPI)
static struct bfin5xx_spi_chip spi_wm8731_chip_info = {
.enable_dma = 0,
.bits_per_word = 16,
};
#endif
#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
static struct bfin5xx_spi_chip spidev_chip_info = {
.enable_dma = 0,
.bits_per_word = 8,
};
#endif
static struct spi_board_info bfin_spi_board_info[] __initdata = { static struct spi_board_info bfin_spi_board_info[] __initdata = {
#if defined(CONFIG_MTD_M25P80) \ #if defined(CONFIG_MTD_M25P80) \
|| defined(CONFIG_MTD_M25P80_MODULE) || defined(CONFIG_MTD_M25P80_MODULE)
...@@ -209,18 +178,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -209,18 +178,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_BFIN_SPI_ADC) \
|| defined(CONFIG_BFIN_SPI_ADC_MODULE)
{
.modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
.max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, /* Framework bus number */
.chip_select = 1, /* Framework chip select. */
.platform_data = NULL, /* No spi_driver specific config */
.controller_data = &spi_adc_chip_info,
},
#endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
{ {
.modalias = "mmc_spi", .modalias = "mmc_spi",
...@@ -239,7 +196,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -239,7 +196,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = 2, .chip_select = 2,
.controller_data = &spi_ad7877_chip_info,
}, },
#endif #endif
#if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \
...@@ -249,7 +205,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -249,7 +205,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = 5, .chip_select = 5,
.controller_data = &spi_wm8731_chip_info,
.mode = SPI_MODE_0, .mode = SPI_MODE_0,
}, },
#endif #endif
...@@ -259,7 +214,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -259,7 +214,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = 1, .chip_select = 1,
.controller_data = &spidev_chip_info,
}, },
#endif #endif
#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
...@@ -268,7 +222,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -268,7 +222,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = 1, .chip_select = 1,
.controller_data = &lq035q1_spi_chip_info,
.mode = SPI_CPHA | SPI_CPOL, .mode = SPI_CPHA | SPI_CPOL,
}, },
#endif #endif
......
...@@ -11,10 +11,9 @@ ...@@ -11,10 +11,9 @@
*/ */
/* This file should be up to date with: /* This file should be up to date with:
* - Revision E, 01/26/2010; ADSP-BF512/BF514/BF516/BF518 Blackfin Processor Anomaly List * - Revision F, 05/23/2011; ADSP-BF512/BF514/BF516/BF518 Blackfin Processor Anomaly List
*/ */
/* We plan on not supporting 0.0 silicon, but 0.1 isn't out yet - sorry */
#if __SILICON_REVISION__ < 0 #if __SILICON_REVISION__ < 0
# error will not work on BF518 silicon version # error will not work on BF518 silicon version
#endif #endif
...@@ -77,19 +76,29 @@ ...@@ -77,19 +76,29 @@
/* False Hardware Error when RETI Points to Invalid Memory */ /* False Hardware Error when RETI Points to Invalid Memory */
#define ANOMALY_05000461 (1) #define ANOMALY_05000461 (1)
/* Synchronization Problem at Startup May Cause SPORT Transmit Channels to Misalign */ /* Synchronization Problem at Startup May Cause SPORT Transmit Channels to Misalign */
#define ANOMALY_05000462 (1) #define ANOMALY_05000462 (__SILICON_REVISION__ < 2)
/* PLL Latches Incorrect Settings During Reset */
#define ANOMALY_05000469 (1)
/* Incorrect Default MSEL Value in PLL_CTL */ /* Incorrect Default MSEL Value in PLL_CTL */
#define ANOMALY_05000472 (1) #define ANOMALY_05000472 (__SILICON_REVISION__ < 2)
/* Interrupted SPORT Receive Data Register Read Results In Underflow when SLEN > 15 */ /* Interrupted SPORT Receive Data Register Read Results In Underflow when SLEN > 15 */
#define ANOMALY_05000473 (1) #define ANOMALY_05000473 (1)
/* TESTSET Instruction Cannot Be Interrupted */ /* TESTSET Instruction Cannot Be Interrupted */
#define ANOMALY_05000477 (1) #define ANOMALY_05000477 (1)
/* Reads of ITEST_COMMAND and ITEST_DATA Registers Cause Cache Corruption */ /* Reads of ITEST_COMMAND and ITEST_DATA Registers Cause Cache Corruption */
#define ANOMALY_05000481 (1) #define ANOMALY_05000481 (1)
/* IFLUSH sucks at life */ /* PLL Latches Incorrect Settings During Reset */
#define ANOMALY_05000482 (__SILICON_REVISION__ < 2)
/* PLL_CTL Change Using bfrom_SysControl() Can Result in Processor Overclocking */
#define ANOMALY_05000485 (__SILICON_REVISION__ < 2)
/* SPI Master Boot Can Fail Under Certain Conditions */
#define ANOMALY_05000490 (1)
/* Instruction Memory Stalls Can Cause IFLUSH to Fail */
#define ANOMALY_05000491 (1) #define ANOMALY_05000491 (1)
/* EXCPT Instruction May Be Lost If NMI Happens Simultaneously */
#define ANOMALY_05000494 (1)
/* CNT_COMMAND Functionality Depends on CNT_IMASK Configuration */
#define ANOMALY_05000498 (1)
/* RXS Bit in SPI_STAT May Become Stuck In RX DMA Modes */
#define ANOMALY_05000501 (1)
/* Anomalies that don't exist on this proc */ /* Anomalies that don't exist on this proc */
#define ANOMALY_05000099 (0) #define ANOMALY_05000099 (0)
...@@ -157,6 +166,5 @@ ...@@ -157,6 +166,5 @@
#define ANOMALY_05000474 (0) #define ANOMALY_05000474 (0)
#define ANOMALY_05000475 (0) #define ANOMALY_05000475 (0)
#define ANOMALY_05000480 (0) #define ANOMALY_05000480 (0)
#define ANOMALY_05000485 (0)
#endif #endif
...@@ -81,9 +81,15 @@ ...@@ -81,9 +81,15 @@
#define P_PPI0_D14 (P_DEFINED | P_IDENT(GPIO_PF14) | P_FUNCT(1)) #define P_PPI0_D14 (P_DEFINED | P_IDENT(GPIO_PF14) | P_FUNCT(1))
#define P_PPI0_D15 (P_DEFINED | P_IDENT(GPIO_PF15) | P_FUNCT(1)) #define P_PPI0_D15 (P_DEFINED | P_IDENT(GPIO_PF15) | P_FUNCT(1))
#ifndef CONFIG_BF518_PPI_TMR_PG12
#define P_PPI0_CLK (P_DEFINED | P_IDENT(GPIO_PG5) | P_FUNCT(1))
#define P_PPI0_FS1 (P_DEFINED | P_IDENT(GPIO_PG6) | P_FUNCT(1))
#define P_PPI0_FS2 (P_DEFINED | P_IDENT(GPIO_PG7) | P_FUNCT(1))
#else
#define P_PPI0_CLK (P_DEFINED | P_IDENT(GPIO_PG12) | P_FUNCT(1)) #define P_PPI0_CLK (P_DEFINED | P_IDENT(GPIO_PG12) | P_FUNCT(1))
#define P_PPI0_FS1 (P_DEFINED | P_IDENT(GPIO_PG13) | P_FUNCT(1)) #define P_PPI0_FS1 (P_DEFINED | P_IDENT(GPIO_PG13) | P_FUNCT(1))
#define P_PPI0_FS2 (P_DEFINED | P_IDENT(GPIO_PG14) | P_FUNCT(1)) #define P_PPI0_FS2 (P_DEFINED | P_IDENT(GPIO_PG14) | P_FUNCT(1))
#endif
#define P_PPI0_FS3 (P_DEFINED | P_IDENT(GPIO_PG15) | P_FUNCT(1)) #define P_PPI0_FS3 (P_DEFINED | P_IDENT(GPIO_PG15) | P_FUNCT(1))
/* SPI Port Mux */ /* SPI Port Mux */
...@@ -139,9 +145,15 @@ ...@@ -139,9 +145,15 @@
#define P_UART1_RX (P_DEFINED | P_IDENT(GPIO_PH7) | P_FUNCT(1)) #define P_UART1_RX (P_DEFINED | P_IDENT(GPIO_PH7) | P_FUNCT(1))
/* Timer */ /* Timer */
#ifndef CONFIG_BF518_PPI_TMR_PG12
#define P_TMRCLK (P_DEFINED | P_IDENT(GPIO_PG5) | P_FUNCT(2)) #define P_TMRCLK (P_DEFINED | P_IDENT(GPIO_PG5) | P_FUNCT(2))
#define P_TMR0 (P_DEFINED | P_IDENT(GPIO_PG6) | P_FUNCT(2)) #define P_TMR0 (P_DEFINED | P_IDENT(GPIO_PG6) | P_FUNCT(2))
#define P_TMR1 (P_DEFINED | P_IDENT(GPIO_PG7) | P_FUNCT(2)) #define P_TMR1 (P_DEFINED | P_IDENT(GPIO_PG7) | P_FUNCT(2))
#else
#define P_TMRCLK (P_DEFINED | P_IDENT(GPIO_PG12) | P_FUNCT(2))
#define P_TMR0 (P_DEFINED | P_IDENT(GPIO_PG13) | P_FUNCT(2))
#define P_TMR1 (P_DEFINED | P_IDENT(GPIO_PG14) | P_FUNCT(2))
#endif
#define P_TMR2 (P_DEFINED | P_IDENT(GPIO_PF9) | P_FUNCT(2)) #define P_TMR2 (P_DEFINED | P_IDENT(GPIO_PF9) | P_FUNCT(2))
#define P_TMR3 (P_DEFINED | P_IDENT(GPIO_PF10) | P_FUNCT(2)) #define P_TMR3 (P_DEFINED | P_IDENT(GPIO_PF10) | P_FUNCT(2))
#define P_TMR4 (P_DEFINED | P_IDENT(GPIO_PG9) | P_FUNCT(2)) #define P_TMR4 (P_DEFINED | P_IDENT(GPIO_PG9) | P_FUNCT(2))
...@@ -158,23 +170,33 @@ ...@@ -158,23 +170,33 @@
#define P_TWI0_SDA (P_DONTCARE) #define P_TWI0_SDA (P_DONTCARE)
/* PWM */ /* PWM */
#define P_PWM0_AH (P_DEFINED | P_IDENT(GPIO_PF1) | P_FUNCT(2)) #ifndef CONFIG_BF518_PWM_PORTF_PORTG
#define P_PWM0_AL (P_DEFINED | P_IDENT(GPIO_PF2) | P_FUNCT(2)) #define P_PWM_AH (P_DEFINED | P_IDENT(GPIO_PF1) | P_FUNCT(2))
#define P_PWM0_BH (P_DEFINED | P_IDENT(GPIO_PF3) | P_FUNCT(2)) #define P_PWM_AL (P_DEFINED | P_IDENT(GPIO_PF2) | P_FUNCT(2))
#define P_PWM0_BL (P_DEFINED | P_IDENT(GPIO_PF4) | P_FUNCT(2)) #define P_PWM_BH (P_DEFINED | P_IDENT(GPIO_PF3) | P_FUNCT(2))
#define P_PWM0_CH (P_DEFINED | P_IDENT(GPIO_PF5) | P_FUNCT(2)) #define P_PWM_BL (P_DEFINED | P_IDENT(GPIO_PF4) | P_FUNCT(2))
#define P_PWM0_CL (P_DEFINED | P_IDENT(GPIO_PF6) | P_FUNCT(2)) #define P_PWM_CH (P_DEFINED | P_IDENT(GPIO_PF5) | P_FUNCT(2))
#define P_PWM0_SYNC (P_DEFINED | P_IDENT(GPIO_PF7) | P_FUNCT(2)) #define P_PWM_CL (P_DEFINED | P_IDENT(GPIO_PF6) | P_FUNCT(2))
#else
#define P_PWM1_AH (P_DEFINED | P_IDENT(GPIO_PF11) | P_FUNCT(2)) #define P_PWM_AH (P_DEFINED | P_IDENT(GPIO_PF11) | P_FUNCT(2))
#define P_PWM1_AL (P_DEFINED | P_IDENT(GPIO_PF12) | P_FUNCT(2)) #define P_PWM_AL (P_DEFINED | P_IDENT(GPIO_PF12) | P_FUNCT(2))
#define P_PWM1_BH (P_DEFINED | P_IDENT(GPIO_PF13) | P_FUNCT(2)) #define P_PWM_BH (P_DEFINED | P_IDENT(GPIO_PF13) | P_FUNCT(2))
#define P_PWM1_BL (P_DEFINED | P_IDENT(GPIO_PF14) | P_FUNCT(2)) #define P_PWM_BL (P_DEFINED | P_IDENT(GPIO_PF14) | P_FUNCT(2))
#define P_PWM1_CH (P_DEFINED | P_IDENT(GPIO_PG1) | P_FUNCT(2)) #define P_PWM_CH (P_DEFINED | P_IDENT(GPIO_PG1) | P_FUNCT(2))
#define P_PWM1_CL (P_DEFINED | P_IDENT(GPIO_PG2) | P_FUNCT(2)) #define P_PWM_CL (P_DEFINED | P_IDENT(GPIO_PG2) | P_FUNCT(2))
#define P_PWM1_SYNC (P_DEFINED | P_IDENT(GPIO_PF15) | P_FUNCT(2)) #endif
#ifndef CONFIG_BF518_PWM_SYNC_PF15
#define P_PWM_SYNC (P_DEFINED | P_IDENT(GPIO_PF7) | P_FUNCT(2))
#else
#define P_PWM_SYNC (P_DEFINED | P_IDENT(GPIO_PF15) | P_FUNCT(2))
#endif
#ifndef CONFIG_BF518_PWM_TRIPB_PG14
#define P_PWM_TRIPB (P_DEFINED | P_IDENT(GPIO_PG10) | P_FUNCT(2))
#else
#define P_PWM_TRIPB (P_DEFINED | P_IDENT(GPIO_PG14) | P_FUNCT(2)) #define P_PWM_TRIPB (P_DEFINED | P_IDENT(GPIO_PG14) | P_FUNCT(2))
#endif
/* RSI */ /* RSI */
#define P_RSI_DATA0 (P_DEFINED | P_IDENT(GPIO_PG3) | P_FUNCT(1)) #define P_RSI_DATA0 (P_DEFINED | P_IDENT(GPIO_PG3) | P_FUNCT(1))
......
...@@ -265,29 +265,12 @@ static struct flash_platform_data bfin_spi_flash_data = { ...@@ -265,29 +265,12 @@ static struct flash_platform_data bfin_spi_flash_data = {
/* SPI flash chip (m25p64) */ /* SPI flash chip (m25p64) */
static struct bfin5xx_spi_chip spi_flash_chip_info = { static struct bfin5xx_spi_chip spi_flash_chip_info = {
.enable_dma = 0, /* use dma transfer with this chip*/ .enable_dma = 0, /* use dma transfer with this chip*/
.bits_per_word = 8,
};
#endif
#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \
|| defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
.enable_dma = 0,
.bits_per_word = 16,
}; };
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
static struct bfin5xx_spi_chip mmc_spi_chip_info = { static struct bfin5xx_spi_chip mmc_spi_chip_info = {
.enable_dma = 0, .enable_dma = 0,
.bits_per_word = 8,
};
#endif
#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
static struct bfin5xx_spi_chip spidev_chip_info = {
.enable_dma = 0,
.bits_per_word = 8,
}; };
#endif #endif
...@@ -328,7 +311,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -328,7 +311,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = 4, .chip_select = 4,
.controller_data = &ad1836_spi_chip_info,
}, },
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
...@@ -347,7 +329,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -347,7 +329,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = 1, .chip_select = 1,
.controller_data = &spidev_chip_info,
}, },
#endif #endif
}; };
......
...@@ -354,40 +354,16 @@ static struct flash_platform_data bfin_spi_flash_data = { ...@@ -354,40 +354,16 @@ static struct flash_platform_data bfin_spi_flash_data = {
/* SPI flash chip (m25p64) */ /* SPI flash chip (m25p64) */
static struct bfin5xx_spi_chip spi_flash_chip_info = { static struct bfin5xx_spi_chip spi_flash_chip_info = {
.enable_dma = 0, /* use dma transfer with this chip*/ .enable_dma = 0, /* use dma transfer with this chip*/
.bits_per_word = 8,
};
#endif
#if defined(CONFIG_BFIN_SPI_ADC) \
|| defined(CONFIG_BFIN_SPI_ADC_MODULE)
/* SPI ADC chip */
static struct bfin5xx_spi_chip spi_adc_chip_info = {
.enable_dma = 1, /* use dma transfer with this chip*/
.bits_per_word = 16,
};
#endif
#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \
|| defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
.enable_dma = 0,
.bits_per_word = 16,
}; };
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
static struct bfin5xx_spi_chip mmc_spi_chip_info = { static struct bfin5xx_spi_chip mmc_spi_chip_info = {
.enable_dma = 0, .enable_dma = 0,
.bits_per_word = 8,
}; };
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
.enable_dma = 0,
.bits_per_word = 16,
};
static const struct ad7877_platform_data bfin_ad7877_ts_info = { static const struct ad7877_platform_data bfin_ad7877_ts_info = {
.model = 7877, .model = 7877,
.vref_delay_usecs = 50, /* internal, no capacitor */ .vref_delay_usecs = 50, /* internal, no capacitor */
...@@ -403,21 +379,6 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = { ...@@ -403,21 +379,6 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = {
}; };
#endif #endif
#if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \
&& defined(CONFIG_SND_SOC_WM8731_SPI)
static struct bfin5xx_spi_chip spi_wm8731_chip_info = {
.enable_dma = 0,
.bits_per_word = 16,
};
#endif
#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
static struct bfin5xx_spi_chip spidev_chip_info = {
.enable_dma = 0,
.bits_per_word = 8,
};
#endif
static struct spi_board_info bfin_spi_board_info[] __initdata = { static struct spi_board_info bfin_spi_board_info[] __initdata = {
#if defined(CONFIG_MTD_M25P80) \ #if defined(CONFIG_MTD_M25P80) \
|| defined(CONFIG_MTD_M25P80_MODULE) || defined(CONFIG_MTD_M25P80_MODULE)
...@@ -433,18 +394,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -433,18 +394,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_BFIN_SPI_ADC) \
|| defined(CONFIG_BFIN_SPI_ADC_MODULE)
{
.modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
.max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, /* Framework bus number */
.chip_select = 1, /* Framework chip select. */
.platform_data = NULL, /* No spi_driver specific config */
.controller_data = &spi_adc_chip_info,
},
#endif
#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ #if defined(CONFIG_SND_BF5XX_SOC_AD183X) \
|| defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
{ {
...@@ -452,7 +401,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -452,7 +401,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = 4, .chip_select = 4,
.controller_data = &ad1836_spi_chip_info,
}, },
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
...@@ -473,7 +421,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -473,7 +421,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = 2, .chip_select = 2,
.controller_data = &spi_ad7877_chip_info,
}, },
#endif #endif
#if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \
...@@ -483,7 +430,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -483,7 +430,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = 5, .chip_select = 5,
.controller_data = &spi_wm8731_chip_info,
.mode = SPI_MODE_0, .mode = SPI_MODE_0,
}, },
#endif #endif
...@@ -493,7 +439,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -493,7 +439,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = 1, .chip_select = 1,
.controller_data = &spidev_chip_info,
}, },
#endif #endif
}; };
......
...@@ -253,32 +253,16 @@ static struct flash_platform_data bfin_spi_flash_data = { ...@@ -253,32 +253,16 @@ static struct flash_platform_data bfin_spi_flash_data = {
/* SPI flash chip (sst25wf040) */ /* SPI flash chip (sst25wf040) */
static struct bfin5xx_spi_chip spi_flash_chip_info = { static struct bfin5xx_spi_chip spi_flash_chip_info = {
.enable_dma = 0, /* use dma transfer with this chip*/ .enable_dma = 0, /* use dma transfer with this chip*/
.bits_per_word = 8,
};
#endif
#if defined(CONFIG_BFIN_SPI_ADC) \
|| defined(CONFIG_BFIN_SPI_ADC_MODULE)
/* SPI ADC chip */
static struct bfin5xx_spi_chip spi_adc_chip_info = {
.enable_dma = 1, /* use dma transfer with this chip*/
.bits_per_word = 16,
}; };
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
static struct bfin5xx_spi_chip mmc_spi_chip_info = { static struct bfin5xx_spi_chip mmc_spi_chip_info = {
.enable_dma = 0, .enable_dma = 0,
.bits_per_word = 8,
}; };
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
.enable_dma = 0,
.bits_per_word = 16,
};
static const struct ad7877_platform_data bfin_ad7877_ts_info = { static const struct ad7877_platform_data bfin_ad7877_ts_info = {
.model = 7877, .model = 7877,
.vref_delay_usecs = 50, /* internal, no capacitor */ .vref_delay_usecs = 50, /* internal, no capacitor */
...@@ -311,35 +295,6 @@ static const struct ad7879_platform_data bfin_ad7879_ts_info = { ...@@ -311,35 +295,6 @@ static const struct ad7879_platform_data bfin_ad7879_ts_info = {
}; };
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE)
static struct bfin5xx_spi_chip spi_ad7879_chip_info = {
.enable_dma = 0,
.bits_per_word = 16,
};
#endif
#if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \
&& defined(CONFIG_SND_SOC_WM8731_SPI)
static struct bfin5xx_spi_chip spi_wm8731_chip_info = {
.enable_dma = 0,
.bits_per_word = 16,
};
#endif
#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
static struct bfin5xx_spi_chip spidev_chip_info = {
.enable_dma = 0,
.bits_per_word = 8,
};
#endif
#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
static struct bfin5xx_spi_chip lq035q1_spi_chip_info = {
.enable_dma = 0,
.bits_per_word = 8,
};
#endif
static struct spi_board_info bfin_spi_board_info[] __initdata = { static struct spi_board_info bfin_spi_board_info[] __initdata = {
#if defined(CONFIG_MTD_M25P80) \ #if defined(CONFIG_MTD_M25P80) \
|| defined(CONFIG_MTD_M25P80_MODULE) || defined(CONFIG_MTD_M25P80_MODULE)
...@@ -355,18 +310,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -355,18 +310,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_BFIN_SPI_ADC) \
|| defined(CONFIG_BFIN_SPI_ADC_MODULE)
{
.modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
.max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, /* Framework bus number */
.chip_select = 1, /* Framework chip select. */
.platform_data = NULL, /* No spi_driver specific config */
.controller_data = &spi_adc_chip_info,
},
#endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
{ {
.modalias = "mmc_spi", .modalias = "mmc_spi",
...@@ -385,7 +328,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -385,7 +328,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = 2, .chip_select = 2,
.controller_data = &spi_ad7877_chip_info,
}, },
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE)
...@@ -396,7 +338,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -396,7 +338,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = 5, .chip_select = 5,
.controller_data = &spi_ad7879_chip_info,
.mode = SPI_CPHA | SPI_CPOL, .mode = SPI_CPHA | SPI_CPOL,
}, },
#endif #endif
...@@ -407,7 +348,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -407,7 +348,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = 5, .chip_select = 5,
.controller_data = &spi_wm8731_chip_info,
.mode = SPI_MODE_0, .mode = SPI_MODE_0,
}, },
#endif #endif
...@@ -417,7 +357,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -417,7 +357,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = 1, .chip_select = 1,
.controller_data = &spidev_chip_info,
}, },
#endif #endif
#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
...@@ -426,7 +365,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -426,7 +365,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = 1, .chip_select = 1,
.controller_data = &lq035q1_spi_chip_info,
.mode = SPI_CPHA | SPI_CPOL, .mode = SPI_CPHA | SPI_CPOL,
}, },
#endif #endif
......
...@@ -408,6 +408,9 @@ static struct resource net2272_bfin_resources[] = { ...@@ -408,6 +408,9 @@ static struct resource net2272_bfin_resources[] = {
.start = 0x20300000, .start = 0x20300000,
.end = 0x20300000 + 0x100, .end = 0x20300000 + 0x100,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}, {
.start = 1,
.flags = IORESOURCE_BUS,
}, { }, {
.start = IRQ_PF7, .start = IRQ_PF7,
.end = IRQ_PF7, .end = IRQ_PF7,
...@@ -448,40 +451,16 @@ static struct flash_platform_data bfin_spi_flash_data = { ...@@ -448,40 +451,16 @@ static struct flash_platform_data bfin_spi_flash_data = {
/* SPI flash chip (m25p64) */ /* SPI flash chip (m25p64) */
static struct bfin5xx_spi_chip spi_flash_chip_info = { static struct bfin5xx_spi_chip spi_flash_chip_info = {
.enable_dma = 0, /* use dma transfer with this chip*/ .enable_dma = 0, /* use dma transfer with this chip*/
.bits_per_word = 8,
};
#endif
#if defined(CONFIG_BFIN_SPI_ADC) \
|| defined(CONFIG_BFIN_SPI_ADC_MODULE)
/* SPI ADC chip */
static struct bfin5xx_spi_chip spi_adc_chip_info = {
.enable_dma = 1, /* use dma transfer with this chip*/
.bits_per_word = 16,
};
#endif
#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \
|| defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
.enable_dma = 0,
.bits_per_word = 16,
}; };
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
static struct bfin5xx_spi_chip mmc_spi_chip_info = { static struct bfin5xx_spi_chip mmc_spi_chip_info = {
.enable_dma = 0, .enable_dma = 0,
.bits_per_word = 8,
}; };
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
.enable_dma = 0,
.bits_per_word = 16,
};
static const struct ad7877_platform_data bfin_ad7877_ts_info = { static const struct ad7877_platform_data bfin_ad7877_ts_info = {
.model = 7877, .model = 7877,
.vref_delay_usecs = 50, /* internal, no capacitor */ .vref_delay_usecs = 50, /* internal, no capacitor */
...@@ -513,20 +492,6 @@ static const struct ad7879_platform_data bfin_ad7879_ts_info = { ...@@ -513,20 +492,6 @@ static const struct ad7879_platform_data bfin_ad7879_ts_info = {
}; };
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE)
static struct bfin5xx_spi_chip spi_ad7879_chip_info = {
.enable_dma = 0,
.bits_per_word = 16,
};
#endif
#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
static struct bfin5xx_spi_chip spidev_chip_info = {
.enable_dma = 0,
.bits_per_word = 8,
};
#endif
#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \ #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \
defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE)
...@@ -574,9 +539,25 @@ static struct resource bfin_snd_resources[][4] = { ...@@ -574,9 +539,25 @@ static struct resource bfin_snd_resources[][4] = {
BFIN_SND_RES(0), BFIN_SND_RES(0),
BFIN_SND_RES(1), BFIN_SND_RES(1),
}; };
#endif
static struct platform_device bfin_pcm = { #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
.name = "bfin-pcm-audio", static struct platform_device bfin_i2s_pcm = {
.name = "bfin-i2s-pcm-audio",
.id = -1,
};
#endif
#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE)
static struct platform_device bfin_tdm_pcm = {
.name = "bfin-tdm-pcm-audio",
.id = -1,
};
#endif
#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE)
static struct platform_device bfin_ac97_pcm = {
.name = "bfin-ac97-pcm-audio",
.id = -1, .id = -1,
}; };
#endif #endif
...@@ -605,13 +586,6 @@ static struct platform_device bfin_tdm = { ...@@ -605,13 +586,6 @@ static struct platform_device bfin_tdm = {
}; };
#endif #endif
#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
static struct bfin5xx_spi_chip lq035q1_spi_chip_info = {
.enable_dma = 0,
.bits_per_word = 8,
};
#endif
static struct spi_board_info bfin_spi_board_info[] __initdata = { static struct spi_board_info bfin_spi_board_info[] __initdata = {
#if defined(CONFIG_MTD_M25P80) \ #if defined(CONFIG_MTD_M25P80) \
|| defined(CONFIG_MTD_M25P80_MODULE) || defined(CONFIG_MTD_M25P80_MODULE)
...@@ -627,18 +601,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -627,18 +601,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_BFIN_SPI_ADC) \
|| defined(CONFIG_BFIN_SPI_ADC_MODULE)
{
.modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
.max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, /* Framework bus number */
.chip_select = 1, /* Framework chip select. */
.platform_data = NULL, /* No spi_driver specific config */
.controller_data = &spi_adc_chip_info,
},
#endif
#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ #if defined(CONFIG_SND_BF5XX_SOC_AD183X) \
|| defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
{ {
...@@ -647,7 +609,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -647,7 +609,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.bus_num = 0, .bus_num = 0,
.chip_select = 4, .chip_select = 4,
.platform_data = "ad1836", .platform_data = "ad1836",
.controller_data = &ad1836_spi_chip_info,
.mode = SPI_MODE_3, .mode = SPI_MODE_3,
}, },
#endif #endif
...@@ -670,7 +631,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -670,7 +631,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = 2, .chip_select = 2,
.controller_data = &spi_ad7877_chip_info,
}, },
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE)
...@@ -681,7 +641,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -681,7 +641,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = 3, .chip_select = 3,
.controller_data = &spi_ad7879_chip_info,
.mode = SPI_CPHA | SPI_CPOL, .mode = SPI_CPHA | SPI_CPOL,
}, },
#endif #endif
...@@ -691,7 +650,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -691,7 +650,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = 1, .chip_select = 1,
.controller_data = &spidev_chip_info,
}, },
#endif #endif
#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
...@@ -700,7 +658,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -700,7 +658,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = 7, .chip_select = 7,
.controller_data = &lq035q1_spi_chip_info,
.mode = SPI_CPHA | SPI_CPOL, .mode = SPI_CPHA | SPI_CPOL,
}, },
#endif #endif
...@@ -1276,9 +1233,16 @@ static struct platform_device *stamp_devices[] __initdata = { ...@@ -1276,9 +1233,16 @@ static struct platform_device *stamp_devices[] __initdata = {
&ezkit_flash_device, &ezkit_flash_device,
#endif #endif
#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \ #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) &bfin_i2s_pcm,
&bfin_pcm, #endif
#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE)
&bfin_tdm_pcm,
#endif
#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE)
&bfin_ac97_pcm,
#endif #endif
#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
......
...@@ -314,29 +314,12 @@ static struct flash_platform_data bfin_spi_flash_data = { ...@@ -314,29 +314,12 @@ static struct flash_platform_data bfin_spi_flash_data = {
/* SPI flash chip (m25p64) */ /* SPI flash chip (m25p64) */
static struct bfin5xx_spi_chip spi_flash_chip_info = { static struct bfin5xx_spi_chip spi_flash_chip_info = {
.enable_dma = 0, /* use dma transfer with this chip*/ .enable_dma = 0, /* use dma transfer with this chip*/
.bits_per_word = 8,
};
#endif
#if defined(CONFIG_BFIN_SPI_ADC) \
|| defined(CONFIG_BFIN_SPI_ADC_MODULE)
/* SPI ADC chip */
static struct bfin5xx_spi_chip spi_adc_chip_info = {
.enable_dma = 0, /* use dma transfer with this chip*/
/*
* tll6527m V1.0 does not support native spi slave selects
* hence DMA mode will not be useful since the ADC needs
* CS to toggle for each sample and cs_change_per_word
* seems to be removed from spi_bfin5xx.c
*/
.bits_per_word = 16,
}; };
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
static struct bfin5xx_spi_chip mmc_spi_chip_info = { static struct bfin5xx_spi_chip mmc_spi_chip_info = {
.enable_dma = 0, .enable_dma = 0,
.bits_per_word = 8,
}; };
#endif #endif
...@@ -359,21 +342,6 @@ static const struct ad7879_platform_data bfin_ad7879_ts_info = { ...@@ -359,21 +342,6 @@ static const struct ad7879_platform_data bfin_ad7879_ts_info = {
}; };
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) \
|| defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE)
static struct bfin5xx_spi_chip spi_ad7879_chip_info = {
.enable_dma = 0,
.bits_per_word = 16,
};
#endif
#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
static struct bfin5xx_spi_chip spidev_chip_info = {
.enable_dma = 0,
.bits_per_word = 8,
};
#endif
#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
static struct platform_device bfin_i2s = { static struct platform_device bfin_i2s = {
.name = "bfin-i2s", .name = "bfin-i2s",
...@@ -382,24 +350,7 @@ static struct platform_device bfin_i2s = { ...@@ -382,24 +350,7 @@ static struct platform_device bfin_i2s = {
}; };
#endif #endif
#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
static struct bfin5xx_spi_chip lq035q1_spi_chip_info = {
.enable_dma = 0,
.bits_per_word = 8,
};
#endif
#if defined(CONFIG_GPIO_MCP23S08) || defined(CONFIG_GPIO_MCP23S08_MODULE) #if defined(CONFIG_GPIO_MCP23S08) || defined(CONFIG_GPIO_MCP23S08_MODULE)
static struct bfin5xx_spi_chip spi_mcp23s08_sys_chip_info = {
.enable_dma = 0,
.bits_per_word = 8,
};
static struct bfin5xx_spi_chip spi_mcp23s08_usr_chip_info = {
.enable_dma = 0,
.bits_per_word = 8,
};
#include <linux/spi/mcp23s08.h> #include <linux/spi/mcp23s08.h>
static const struct mcp23s08_platform_data bfin_mcp23s08_sys_gpio_info = { static const struct mcp23s08_platform_data bfin_mcp23s08_sys_gpio_info = {
.chip[0].is_present = true, .chip[0].is_present = true,
...@@ -429,22 +380,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -429,22 +380,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_BFIN_SPI_ADC)
|| defined(CONFIG_BFIN_SPI_ADC_MODULE)
{
.modalias = "bfin_spi_adc",
/* Name of spi_driver for this device */
.max_speed_hz = 10000000,
/* max spi clock (SCK) speed in HZ */
.bus_num = 0, /* Framework bus number */
.chip_select = EXP_GPIO_SPISEL_BASE + 0x04 + MAX_CTRL_CS,
/* Framework chip select. */
.platform_data = NULL, /* No spi_driver specific config */
.controller_data = &spi_adc_chip_info,
.mode = SPI_MODE_0,
},
#endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
{ {
.modalias = "mmc_spi", .modalias = "mmc_spi",
...@@ -470,7 +405,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -470,7 +405,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
/* max spi clock (SCK) speed in HZ */ /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = EXP_GPIO_SPISEL_BASE + 0x07 + MAX_CTRL_CS, .chip_select = EXP_GPIO_SPISEL_BASE + 0x07 + MAX_CTRL_CS,
.controller_data = &spi_ad7879_chip_info,
.mode = SPI_CPHA | SPI_CPOL, .mode = SPI_CPHA | SPI_CPOL,
}, },
#endif #endif
...@@ -482,7 +416,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -482,7 +416,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.bus_num = 0, .bus_num = 0,
.chip_select = EXP_GPIO_SPISEL_BASE + 0x03 + MAX_CTRL_CS, .chip_select = EXP_GPIO_SPISEL_BASE + 0x03 + MAX_CTRL_CS,
.mode = SPI_CPHA | SPI_CPOL, .mode = SPI_CPHA | SPI_CPOL,
.controller_data = &spidev_chip_info,
}, },
#endif #endif
#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
...@@ -491,7 +424,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -491,7 +424,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.max_speed_hz = 20000000, .max_speed_hz = 20000000,
.bus_num = 0, .bus_num = 0,
.chip_select = EXP_GPIO_SPISEL_BASE + 0x06 + MAX_CTRL_CS, .chip_select = EXP_GPIO_SPISEL_BASE + 0x06 + MAX_CTRL_CS,
.controller_data = &lq035q1_spi_chip_info,
.mode = SPI_CPHA | SPI_CPOL, .mode = SPI_CPHA | SPI_CPOL,
}, },
#endif #endif
...@@ -502,7 +434,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -502,7 +434,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = EXP_GPIO_SPISEL_BASE + 0x01 + MAX_CTRL_CS, .chip_select = EXP_GPIO_SPISEL_BASE + 0x01 + MAX_CTRL_CS,
.controller_data = &spi_mcp23s08_sys_chip_info,
.mode = SPI_CPHA | SPI_CPOL, .mode = SPI_CPHA | SPI_CPOL,
}, },
{ {
...@@ -511,7 +442,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -511,7 +442,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = EXP_GPIO_SPISEL_BASE + 0x02 + MAX_CTRL_CS, .chip_select = EXP_GPIO_SPISEL_BASE + 0x02 + MAX_CTRL_CS,
.controller_data = &spi_mcp23s08_usr_chip_info,
.mode = SPI_CPHA | SPI_CPOL, .mode = SPI_CPHA | SPI_CPOL,
}, },
#endif #endif
......
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
*/ */
/* This file should be up to date with: /* This file should be up to date with:
* - Revision E, 03/15/2010; ADSP-BF526 Blackfin Processor Anomaly List * - Revision F, 05/23/2011; ADSP-BF526 Blackfin Processor Anomaly List
* - Revision H, 04/29/2010; ADSP-BF527 Blackfin Processor Anomaly List * - Revision I, 05/23/2011; ADSP-BF527 Blackfin Processor Anomaly List
*/ */
#ifndef _MACH_ANOMALY_H_ #ifndef _MACH_ANOMALY_H_
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
/* Incorrect Access of OTP_STATUS During otp_write() Function */ /* Incorrect Access of OTP_STATUS During otp_write() Function */
#define ANOMALY_05000328 (_ANOMALY_BF527(< 2)) #define ANOMALY_05000328 (_ANOMALY_BF527(< 2))
/* Host DMA Boot Modes Are Not Functional */ /* Host DMA Boot Modes Are Not Functional */
#define ANOMALY_05000330 (__SILICON_REVISION__ < 2) #define ANOMALY_05000330 (_ANOMALY_BF527(< 2))
/* Disallowed Configuration Prevents Subsequent Allowed Configuration on Host DMA Port */ /* Disallowed Configuration Prevents Subsequent Allowed Configuration on Host DMA Port */
#define ANOMALY_05000337 (_ANOMALY_BF527(< 2)) #define ANOMALY_05000337 (_ANOMALY_BF527(< 2))
/* Ethernet MAC MDIO Reads Do Not Meet IEEE Specification */ /* Ethernet MAC MDIO Reads Do Not Meet IEEE Specification */
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
/* Incorrect Default Internal Voltage Regulator Setting */ /* Incorrect Default Internal Voltage Regulator Setting */
#define ANOMALY_05000410 (_ANOMALY_BF527(< 2)) #define ANOMALY_05000410 (_ANOMALY_BF527(< 2))
/* bfrom_SysControl() Firmware Function Cannot be Used to Enter Power Saving Modes */ /* bfrom_SysControl() Firmware Function Cannot be Used to Enter Power Saving Modes */
#define ANOMALY_05000411 (_ANOMALY_BF526_BF527(< 1, < 2)) #define ANOMALY_05000411 (_ANOMALY_BF526(< 1))
/* OTP_CHECK_FOR_PREV_WRITE Bit is Not Functional in bfrom_OtpWrite() API */ /* OTP_CHECK_FOR_PREV_WRITE Bit is Not Functional in bfrom_OtpWrite() API */
#define ANOMALY_05000414 (_ANOMALY_BF526_BF527(< 1, < 2)) #define ANOMALY_05000414 (_ANOMALY_BF526_BF527(< 1, < 2))
/* DEB2_URGENT Bit Not Functional */ /* DEB2_URGENT Bit Not Functional */
...@@ -181,11 +181,11 @@ ...@@ -181,11 +181,11 @@
/* IFLUSH Instruction at End of Hardware Loop Causes Infinite Stall */ /* IFLUSH Instruction at End of Hardware Loop Causes Infinite Stall */
#define ANOMALY_05000443 (1) #define ANOMALY_05000443 (1)
/* The WURESET Bit in the SYSCR Register is not Functional */ /* The WURESET Bit in the SYSCR Register is not Functional */
#define ANOMALY_05000445 (1) #define ANOMALY_05000445 (_ANOMALY_BF527(>= 0))
/* USB DMA Mode 1 Short Packet Data Corruption */ /* USB DMA Short Packet Data Corruption */
#define ANOMALY_05000450 (1) #define ANOMALY_05000450 (1)
/* BCODE_QUICKBOOT, BCODE_ALLBOOT, and BCODE_FULLBOOT Settings in SYSCR Register Not Functional */ /* BCODE_QUICKBOOT, BCODE_ALLBOOT, and BCODE_FULLBOOT Settings in SYSCR Register Not Functional */
#define ANOMALY_05000451 (1) #define ANOMALY_05000451 (_ANOMALY_BF527(>= 0))
/* Incorrect Default Hysteresis Setting for RESET, NMI, and BMODE Signals */ /* Incorrect Default Hysteresis Setting for RESET, NMI, and BMODE Signals */
#define ANOMALY_05000452 (_ANOMALY_BF526_BF527(< 1, >= 0)) #define ANOMALY_05000452 (_ANOMALY_BF526_BF527(< 1, >= 0))
/* USB Receive Interrupt Is Not Generated in DMA Mode 1 */ /* USB Receive Interrupt Is Not Generated in DMA Mode 1 */
...@@ -198,19 +198,19 @@ ...@@ -198,19 +198,19 @@
#define ANOMALY_05000461 (1) #define ANOMALY_05000461 (1)
/* Synchronization Problem at Startup May Cause SPORT Transmit Channels to Misalign */ /* Synchronization Problem at Startup May Cause SPORT Transmit Channels to Misalign */
#define ANOMALY_05000462 (1) #define ANOMALY_05000462 (1)
/* USB Rx DMA hang */ /* USB Rx DMA Hang */
#define ANOMALY_05000465 (1) #define ANOMALY_05000465 (1)
/* TxPktRdy Bit Not Set for Transmit Endpoint When Core and DMA Access USB Endpoint FIFOs Simultaneously */ /* TxPktRdy Bit Not Set for Transmit Endpoint When Core and DMA Access USB Endpoint FIFOs Simultaneously */
#define ANOMALY_05000466 (1) #define ANOMALY_05000466 (1)
/* Possible RX data corruption when control & data EP FIFOs are accessed via the core */ /* Possible USB RX Data Corruption When Control & Data EP FIFOs are Accessed via the Core */
#define ANOMALY_05000467 (1) #define ANOMALY_05000467 (1)
/* PLL Latches Incorrect Settings During Reset */ /* PLL Latches Incorrect Settings During Reset */
#define ANOMALY_05000469 (1) #define ANOMALY_05000469 (1)
/* Incorrect Default MSEL Value in PLL_CTL */ /* Incorrect Default MSEL Value in PLL_CTL */
#define ANOMALY_05000472 (_ANOMALY_BF526(>= 0)) #define ANOMALY_05000472 (_ANOMALY_BF526(>= 0))
/* Interrupted 32-Bit SPORT Data Register Access Results In Underflow */ /* Interrupted SPORT Receive Data Register Read Results In Underflow when SLEN > 15 */
#define ANOMALY_05000473 (1) #define ANOMALY_05000473 (1)
/* Possible Lockup Condition whem Modifying PLL from External Memory */ /* Possible Lockup Condition when Modifying PLL from External Memory */
#define ANOMALY_05000475 (1) #define ANOMALY_05000475 (1)
/* TESTSET Instruction Cannot Be Interrupted */ /* TESTSET Instruction Cannot Be Interrupted */
#define ANOMALY_05000477 (1) #define ANOMALY_05000477 (1)
...@@ -219,11 +219,19 @@ ...@@ -219,11 +219,19 @@
/* Possible USB Data Corruption When Multiple Endpoints Are Accessed by the Core */ /* Possible USB Data Corruption When Multiple Endpoints Are Accessed by the Core */
#define ANOMALY_05000483 (1) #define ANOMALY_05000483 (1)
/* PLL_CTL Change Using bfrom_SysControl() Can Result in Processor Overclocking */ /* PLL_CTL Change Using bfrom_SysControl() Can Result in Processor Overclocking */
#define ANOMALY_05000485 (_ANOMALY_BF526_BF527(< 2, < 3)) #define ANOMALY_05000485 (_ANOMALY_BF526_BF527(< 2, >= 0))
/* The CODEC Zero-Cross Detect Feature is not Functional */ /* The CODEC Zero-Cross Detect Feature is not Functional */
#define ANOMALY_05000487 (1) #define ANOMALY_05000487 (1)
/* IFLUSH sucks at life */ /* SPI Master Boot Can Fail Under Certain Conditions */
#define ANOMALY_05000490 (1)
/* Instruction Memory Stalls Can Cause IFLUSH to Fail */
#define ANOMALY_05000491 (1) #define ANOMALY_05000491 (1)
/* EXCPT Instruction May Be Lost If NMI Happens Simultaneously */
#define ANOMALY_05000494 (1)
/* CNT_COMMAND Functionality Depends on CNT_IMASK Configuration */
#define ANOMALY_05000498 (1)
/* RXS Bit in SPI_STAT May Become Stuck In RX DMA Modes */
#define ANOMALY_05000501 (1)
/* Anomalies that don't exist on this proc */ /* Anomalies that don't exist on this proc */
#define ANOMALY_05000099 (0) #define ANOMALY_05000099 (0)
......
...@@ -159,22 +159,6 @@ static struct flash_platform_data bfin_spi_flash_data = { ...@@ -159,22 +159,6 @@ static struct flash_platform_data bfin_spi_flash_data = {
/* SPI flash chip (m25p64) */ /* SPI flash chip (m25p64) */
static struct bfin5xx_spi_chip spi_flash_chip_info = { static struct bfin5xx_spi_chip spi_flash_chip_info = {
.enable_dma = 0, /* use dma transfer with this chip*/ .enable_dma = 0, /* use dma transfer with this chip*/
.bits_per_word = 8,
};
#endif
#if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE)
/* SPI ADC chip */
static struct bfin5xx_spi_chip spi_adc_chip_info = {
.enable_dma = 1, /* use dma transfer with this chip*/
.bits_per_word = 16,
};
#endif
#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
.enable_dma = 0,
.bits_per_word = 16,
}; };
#endif #endif
...@@ -195,24 +179,12 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -195,24 +179,12 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE)
{
.modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
.max_speed_hz = 4, /* actual baudrate is SCLK/(2xspeed_hz) */
.bus_num = 1, /* Framework bus number */
.chip_select = 1, /* Framework chip select. */
.platform_data = NULL, /* No spi_driver specific config */
.controller_data = &spi_adc_chip_info,
},
#endif
#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
{ {
.modalias = "ad183x", .modalias = "ad183x",
.max_speed_hz = 16, .max_speed_hz = 16,
.bus_num = 1, .bus_num = 1,
.chip_select = 4, .chip_select = 4,
.controller_data = &ad1836_spi_chip_info,
}, },
#endif #endif
......
...@@ -102,21 +102,12 @@ static struct flash_platform_data bfin_spi_flash_data = { ...@@ -102,21 +102,12 @@ static struct flash_platform_data bfin_spi_flash_data = {
/* SPI flash chip (m25p64) */ /* SPI flash chip (m25p64) */
static struct bfin5xx_spi_chip spi_flash_chip_info = { static struct bfin5xx_spi_chip spi_flash_chip_info = {
.enable_dma = 0, /* use dma transfer with this chip*/ .enable_dma = 0, /* use dma transfer with this chip*/
.bits_per_word = 8,
}; };
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
static struct bfin5xx_spi_chip mmc_spi_chip_info = { static struct bfin5xx_spi_chip mmc_spi_chip_info = {
.enable_dma = 0, .enable_dma = 0,
.bits_per_word = 8,
};
#endif
#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
static struct bfin5xx_spi_chip spidev_chip_info = {
.enable_dma = 0,
.bits_per_word = 8,
}; };
#endif #endif
...@@ -151,7 +142,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -151,7 +142,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = 7, .chip_select = 7,
.controller_data = &spidev_chip_info,
}, },
#endif #endif
}; };
......
...@@ -59,29 +59,12 @@ static struct flash_platform_data bfin_spi_flash_data = { ...@@ -59,29 +59,12 @@ static struct flash_platform_data bfin_spi_flash_data = {
/* SPI flash chip (m25p64) */ /* SPI flash chip (m25p64) */
static struct bfin5xx_spi_chip spi_flash_chip_info = { static struct bfin5xx_spi_chip spi_flash_chip_info = {
.enable_dma = 0, /* use dma transfer with this chip*/ .enable_dma = 0, /* use dma transfer with this chip*/
.bits_per_word = 8,
};
#endif
/* SPI ADC chip */
#if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE)
static struct bfin5xx_spi_chip spi_adc_chip_info = {
.enable_dma = 1, /* use dma transfer with this chip*/
.bits_per_word = 16,
};
#endif
#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
.enable_dma = 0,
.bits_per_word = 16,
}; };
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
static struct bfin5xx_spi_chip mmc_spi_chip_info = { static struct bfin5xx_spi_chip mmc_spi_chip_info = {
.enable_dma = 0, .enable_dma = 0,
.bits_per_word = 8,
}; };
#endif #endif
...@@ -99,24 +82,12 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -99,24 +82,12 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE)
{
.modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
.max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, /* Framework bus number */
.chip_select = 2, /* Framework chip select. */
.platform_data = NULL, /* No spi_driver specific config */
.controller_data = &spi_adc_chip_info,
},
#endif
#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
{ {
.modalias = "ad183x", .modalias = "ad183x",
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = 4, .chip_select = 4,
.controller_data = &ad1836_spi_chip_info,
}, },
#endif #endif
......
...@@ -210,29 +210,6 @@ static struct flash_platform_data bfin_spi_flash_data = { ...@@ -210,29 +210,6 @@ static struct flash_platform_data bfin_spi_flash_data = {
/* SPI flash chip (m25p64) */ /* SPI flash chip (m25p64) */
static struct bfin5xx_spi_chip spi_flash_chip_info = { static struct bfin5xx_spi_chip spi_flash_chip_info = {
.enable_dma = 0, /* use dma transfer with this chip*/ .enable_dma = 0, /* use dma transfer with this chip*/
.bits_per_word = 8,
};
#endif
#if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE)
/* SPI ADC chip */
static struct bfin5xx_spi_chip spi_adc_chip_info = {
.enable_dma = 1, /* use dma transfer with this chip*/
.bits_per_word = 16,
};
#endif
#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
.enable_dma = 0,
.bits_per_word = 16,
};
#endif
#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
static struct bfin5xx_spi_chip spidev_chip_info = {
.enable_dma = 0,
.bits_per_word = 8,
}; };
#endif #endif
...@@ -250,24 +227,12 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -250,24 +227,12 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE)
{
.modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
.max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, /* Framework bus number */
.chip_select = 1, /* Framework chip select. */
.platform_data = NULL, /* No spi_driver specific config */
.controller_data = &spi_adc_chip_info,
},
#endif
#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
{ {
.modalias = "ad183x", .modalias = "ad183x",
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = 4, .chip_select = 4,
.controller_data = &ad1836_spi_chip_info,
}, },
#endif #endif
#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
...@@ -276,7 +241,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -276,7 +241,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = 1, .chip_select = 1,
.controller_data = &spidev_chip_info,
}, },
#endif #endif
}; };
......
...@@ -110,7 +110,6 @@ static struct platform_device dm9000_device2 = { ...@@ -110,7 +110,6 @@ static struct platform_device dm9000_device2 = {
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
static struct bfin5xx_spi_chip mmc_spi_chip_info = { static struct bfin5xx_spi_chip mmc_spi_chip_info = {
.enable_dma = 0, /* if 1 - block!!! */ .enable_dma = 0, /* if 1 - block!!! */
.bits_per_word = 8,
}; };
#endif #endif
......
...@@ -79,6 +79,9 @@ static struct resource net2272_bfin_resources[] = { ...@@ -79,6 +79,9 @@ static struct resource net2272_bfin_resources[] = {
.start = 0x20300000, .start = 0x20300000,
.end = 0x20300000 + 0x100, .end = 0x20300000 + 0x100,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}, {
.start = 1,
.flags = IORESOURCE_BUS,
}, { }, {
.start = IRQ_PF10, .start = IRQ_PF10,
.end = IRQ_PF10, .end = IRQ_PF10,
...@@ -172,29 +175,6 @@ static struct flash_platform_data bfin_spi_flash_data = { ...@@ -172,29 +175,6 @@ static struct flash_platform_data bfin_spi_flash_data = {
/* SPI flash chip (m25p64) */ /* SPI flash chip (m25p64) */
static struct bfin5xx_spi_chip spi_flash_chip_info = { static struct bfin5xx_spi_chip spi_flash_chip_info = {
.enable_dma = 0, /* use dma transfer with this chip*/ .enable_dma = 0, /* use dma transfer with this chip*/
.bits_per_word = 8,
};
#endif
#if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE)
/* SPI ADC chip */
static struct bfin5xx_spi_chip spi_adc_chip_info = {
.enable_dma = 1, /* use dma transfer with this chip*/
.bits_per_word = 16,
};
#endif
#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
.enable_dma = 0,
.bits_per_word = 16,
};
#endif
#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
static struct bfin5xx_spi_chip spidev_chip_info = {
.enable_dma = 0,
.bits_per_word = 8,
}; };
#endif #endif
...@@ -221,7 +201,6 @@ static struct mmc_spi_platform_data bfin_mmc_spi_pdata = { ...@@ -221,7 +201,6 @@ static struct mmc_spi_platform_data bfin_mmc_spi_pdata = {
static struct bfin5xx_spi_chip mmc_spi_chip_info = { static struct bfin5xx_spi_chip mmc_spi_chip_info = {
.enable_dma = 0, .enable_dma = 0,
.bits_per_word = 8,
.pio_interrupt = 0, .pio_interrupt = 0,
}; };
#endif #endif
...@@ -240,17 +219,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -240,17 +219,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE)
{
.modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
.max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, /* Framework bus number */
.chip_select = 1, /* Framework chip select. */
.platform_data = NULL, /* No spi_driver specific config */
.controller_data = &spi_adc_chip_info,
},
#endif
#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
{ {
.modalias = "ad183x", .modalias = "ad183x",
...@@ -258,7 +226,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -258,7 +226,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.bus_num = 0, .bus_num = 0,
.chip_select = 4, .chip_select = 4,
.platform_data = "ad1836", /* only includes chip name for the moment */ .platform_data = "ad1836", /* only includes chip name for the moment */
.controller_data = &ad1836_spi_chip_info,
.mode = SPI_MODE_3, .mode = SPI_MODE_3,
}, },
#endif #endif
...@@ -269,7 +236,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -269,7 +236,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = 1, .chip_select = 1,
.controller_data = &spidev_chip_info,
}, },
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
...@@ -659,6 +625,41 @@ static struct platform_device *stamp_devices[] __initdata = { ...@@ -659,6 +625,41 @@ static struct platform_device *stamp_devices[] __initdata = {
#endif #endif
}; };
static int __init net2272_init(void)
{
#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
int ret;
/* Set PF0 to 0, PF1 to 1 make /AMS3 work properly */
ret = gpio_request(GPIO_PF0, "net2272");
if (ret)
return ret;
ret = gpio_request(GPIO_PF1, "net2272");
if (ret) {
gpio_free(GPIO_PF0);
return ret;
}
ret = gpio_request(GPIO_PF11, "net2272");
if (ret) {
gpio_free(GPIO_PF0);
gpio_free(GPIO_PF1);
return ret;
}
gpio_direction_output(GPIO_PF0, 0);
gpio_direction_output(GPIO_PF1, 1);
/* Reset the USB chip */
gpio_direction_output(GPIO_PF11, 0);
mdelay(2);
gpio_set_value(GPIO_PF11, 1);
#endif
return 0;
}
static int __init stamp_init(void) static int __init stamp_init(void)
{ {
int ret; int ret;
...@@ -685,6 +686,9 @@ static int __init stamp_init(void) ...@@ -685,6 +686,9 @@ static int __init stamp_init(void)
} }
#endif #endif
if (net2272_init())
pr_warning("unable to configure net2272; it probably won't work\n");
spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
return 0; return 0;
} }
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
*/ */
/* This file should be up to date with: /* This file should be up to date with:
* - Revision F, 05/25/2010; ADSP-BF531/BF532/BF533 Blackfin Processor Anomaly List * - Revision G, 05/23/2011; ADSP-BF531/BF532/BF533 Blackfin Processor Anomaly List
*/ */
#ifndef _MACH_ANOMALY_H_ #ifndef _MACH_ANOMALY_H_
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
#define ANOMALY_05000277 (__SILICON_REVISION__ < 6) #define ANOMALY_05000277 (__SILICON_REVISION__ < 6)
/* Disabling Peripherals with DMA Running May Cause DMA System Instability */ /* Disabling Peripherals with DMA Running May Cause DMA System Instability */
#define ANOMALY_05000278 (__SILICON_REVISION__ < 6) #define ANOMALY_05000278 (__SILICON_REVISION__ < 6)
/* False Hardware Error Exception when ISR Context Is Not Restored */ /* False Hardware Error when ISR Context Is Not Restored */
#define ANOMALY_05000281 (__SILICON_REVISION__ < 6) #define ANOMALY_05000281 (__SILICON_REVISION__ < 6)
/* Memory DMA Corruption with 32-Bit Data and Traffic Control */ /* Memory DMA Corruption with 32-Bit Data and Traffic Control */
#define ANOMALY_05000282 (__SILICON_REVISION__ < 6) #define ANOMALY_05000282 (__SILICON_REVISION__ < 6)
...@@ -210,18 +210,25 @@ ...@@ -210,18 +210,25 @@
#define ANOMALY_05000462 (1) #define ANOMALY_05000462 (1)
/* Boot Failure When SDRAM Control Signals Toggle Coming Out Of Reset */ /* Boot Failure When SDRAM Control Signals Toggle Coming Out Of Reset */
#define ANOMALY_05000471 (1) #define ANOMALY_05000471 (1)
/* Interrupted 32-Bit SPORT Data Register Access Results In Underflow */ /* Interrupted SPORT Receive Data Register Read Results In Underflow when SLEN > 15 */
#define ANOMALY_05000473 (1) #define ANOMALY_05000473 (1)
/* Possible Lockup Condition whem Modifying PLL from External Memory */ /* Possible Lockup Condition when Modifying PLL from External Memory */
#define ANOMALY_05000475 (1) #define ANOMALY_05000475 (1)
/* TESTSET Instruction Cannot Be Interrupted */ /* TESTSET Instruction Cannot Be Interrupted */
#define ANOMALY_05000477 (1) #define ANOMALY_05000477 (1)
/* Reads of ITEST_COMMAND and ITEST_DATA Registers Cause Cache Corruption */ /* Reads of ITEST_COMMAND and ITEST_DATA Registers Cause Cache Corruption */
#define ANOMALY_05000481 (1) #define ANOMALY_05000481 (1)
/* IFLUSH sucks at life */ /* PLL May Latch Incorrect Values Coming Out of Reset */
#define ANOMALY_05000489 (1)
/* Instruction Memory Stalls Can Cause IFLUSH to Fail */
#define ANOMALY_05000491 (1) #define ANOMALY_05000491 (1)
/* EXCPT Instruction May Be Lost If NMI Happens Simultaneously */
#define ANOMALY_05000494 (1)
/* RXS Bit in SPI_STAT May Become Stuck In RX DMA Modes */
#define ANOMALY_05000501 (1)
/* These anomalies have been "phased" out of analog.com anomaly sheets and are /*
* These anomalies have been "phased" out of analog.com anomaly sheets and are
* here to show running on older silicon just isn't feasible. * here to show running on older silicon just isn't feasible.
*/ */
......
...@@ -61,29 +61,12 @@ static struct flash_platform_data bfin_spi_flash_data = { ...@@ -61,29 +61,12 @@ static struct flash_platform_data bfin_spi_flash_data = {
/* SPI flash chip (m25p64) */ /* SPI flash chip (m25p64) */
static struct bfin5xx_spi_chip spi_flash_chip_info = { static struct bfin5xx_spi_chip spi_flash_chip_info = {
.enable_dma = 0, /* use dma transfer with this chip*/ .enable_dma = 0, /* use dma transfer with this chip*/
.bits_per_word = 8,
};
#endif
#if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE)
/* SPI ADC chip */
static struct bfin5xx_spi_chip spi_adc_chip_info = {
.enable_dma = 1, /* use dma transfer with this chip*/
.bits_per_word = 16,
};
#endif
#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
.enable_dma = 0,
.bits_per_word = 16,
}; };
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
static struct bfin5xx_spi_chip mmc_spi_chip_info = { static struct bfin5xx_spi_chip mmc_spi_chip_info = {
.enable_dma = 0, .enable_dma = 0,
.bits_per_word = 8,
}; };
#endif #endif
...@@ -101,24 +84,12 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -101,24 +84,12 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE)
{
.modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
.max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, /* Framework bus number */
.chip_select = 1, /* Framework chip select. */
.platform_data = NULL, /* No spi_driver specific config */
.controller_data = &spi_adc_chip_info,
},
#endif
#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
{ {
.modalias = "ad183x", .modalias = "ad183x",
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = 4, .chip_select = 4,
.controller_data = &ad1836_spi_chip_info,
}, },
#endif #endif
...@@ -766,6 +737,24 @@ static struct platform_device *cm_bf537e_devices[] __initdata = { ...@@ -766,6 +737,24 @@ static struct platform_device *cm_bf537e_devices[] __initdata = {
#endif #endif
}; };
static int __init net2272_init(void)
{
#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
int ret;
ret = gpio_request(GPIO_PG14, "net2272");
if (ret)
return ret;
/* Reset USB Chip, PG14 */
gpio_direction_output(GPIO_PG14, 0);
mdelay(2);
gpio_set_value(GPIO_PG14, 1);
#endif
return 0;
}
static int __init cm_bf537e_init(void) static int __init cm_bf537e_init(void)
{ {
printk(KERN_INFO "%s(): registering device resources\n", __func__); printk(KERN_INFO "%s(): registering device resources\n", __func__);
...@@ -777,6 +766,10 @@ static int __init cm_bf537e_init(void) ...@@ -777,6 +766,10 @@ static int __init cm_bf537e_init(void)
#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN);
#endif #endif
if (net2272_init())
pr_warning("unable to configure net2272; it probably won't work\n");
return 0; return 0;
} }
......
...@@ -62,29 +62,12 @@ static struct flash_platform_data bfin_spi_flash_data = { ...@@ -62,29 +62,12 @@ static struct flash_platform_data bfin_spi_flash_data = {
/* SPI flash chip (m25p64) */ /* SPI flash chip (m25p64) */
static struct bfin5xx_spi_chip spi_flash_chip_info = { static struct bfin5xx_spi_chip spi_flash_chip_info = {
.enable_dma = 0, /* use dma transfer with this chip*/ .enable_dma = 0, /* use dma transfer with this chip*/
.bits_per_word = 8,
};
#endif
#if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE)
/* SPI ADC chip */
static struct bfin5xx_spi_chip spi_adc_chip_info = {
.enable_dma = 1, /* use dma transfer with this chip*/
.bits_per_word = 16,
};
#endif
#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
.enable_dma = 0,
.bits_per_word = 16,
}; };
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
static struct bfin5xx_spi_chip mmc_spi_chip_info = { static struct bfin5xx_spi_chip mmc_spi_chip_info = {
.enable_dma = 0, .enable_dma = 0,
.bits_per_word = 8,
}; };
#endif #endif
...@@ -102,24 +85,12 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -102,24 +85,12 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE)
{
.modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
.max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, /* Framework bus number */
.chip_select = 1, /* Framework chip select. */
.platform_data = NULL, /* No spi_driver specific config */
.controller_data = &spi_adc_chip_info,
},
#endif
#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
{ {
.modalias = "ad183x", .modalias = "ad183x",
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = 4, .chip_select = 4,
.controller_data = &ad1836_spi_chip_info,
}, },
#endif #endif
...@@ -731,6 +702,36 @@ static struct platform_device *cm_bf537u_devices[] __initdata = { ...@@ -731,6 +702,36 @@ static struct platform_device *cm_bf537u_devices[] __initdata = {
#endif #endif
}; };
static int __init net2272_init(void)
{
#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
int ret;
ret = gpio_request(GPIO_PH15, driver_name);
if (ret)
return ret;
ret = gpio_request(GPIO_PH13, "net2272");
if (ret) {
gpio_free(GPIO_PH15);
return ret;
}
/* Set PH15 Low make /AMS2 work properly */
gpio_direction_output(GPIO_PH15, 0);
/* enable CLKBUF output */
bfin_write_VR_CTL(bfin_read_VR_CTL() | CLKBUFOE);
/* Reset the USB chip */
gpio_direction_output(GPIO_PH13, 0);
mdelay(2);
gpio_set_value(GPIO_PH13, 1);
#endif
return 0;
}
static int __init cm_bf537u_init(void) static int __init cm_bf537u_init(void)
{ {
printk(KERN_INFO "%s(): registering device resources\n", __func__); printk(KERN_INFO "%s(): registering device resources\n", __func__);
...@@ -742,6 +743,10 @@ static int __init cm_bf537u_init(void) ...@@ -742,6 +743,10 @@ static int __init cm_bf537u_init(void)
#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN);
#endif #endif
if (net2272_init())
pr_warning("unable to configure net2272; it probably won't work\n");
return 0; return 0;
} }
......
...@@ -130,7 +130,6 @@ static struct platform_device asmb_flash_device = { ...@@ -130,7 +130,6 @@ static struct platform_device asmb_flash_device = {
static struct bfin5xx_spi_chip mmc_spi_chip_info = { static struct bfin5xx_spi_chip mmc_spi_chip_info = {
.enable_dma = 0, /* use no dma transfer with this chip*/ .enable_dma = 0, /* use no dma transfer with this chip*/
.bits_per_word = 8,
}; };
#endif #endif
...@@ -161,7 +160,6 @@ static struct flash_platform_data bfin_spi_dataflash_data = { ...@@ -161,7 +160,6 @@ static struct flash_platform_data bfin_spi_dataflash_data = {
static struct bfin5xx_spi_chip spi_dataflash_chip_info = { static struct bfin5xx_spi_chip spi_dataflash_chip_info = {
.enable_dma = 0, /* use no dma transfer with this chip*/ .enable_dma = 0, /* use no dma transfer with this chip*/
.bits_per_word = 8,
}; };
#endif #endif
......
...@@ -159,14 +159,12 @@ static struct flash_platform_data bfin_spi_flash_data = { ...@@ -159,14 +159,12 @@ static struct flash_platform_data bfin_spi_flash_data = {
/* SPI flash chip (m25p64) */ /* SPI flash chip (m25p64) */
static struct bfin5xx_spi_chip spi_flash_chip_info = { static struct bfin5xx_spi_chip spi_flash_chip_info = {
.enable_dma = 0, /* use dma transfer with this chip*/ .enable_dma = 0, /* use dma transfer with this chip*/
.bits_per_word = 8,
}; };
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
static struct bfin5xx_spi_chip mmc_spi_chip_info = { static struct bfin5xx_spi_chip mmc_spi_chip_info = {
.enable_dma = 0, .enable_dma = 0,
.bits_per_word = 8,
}; };
#endif #endif
......
...@@ -184,40 +184,16 @@ static struct flash_platform_data bfin_spi_flash_data = { ...@@ -184,40 +184,16 @@ static struct flash_platform_data bfin_spi_flash_data = {
/* SPI flash chip (m25p64) */ /* SPI flash chip (m25p64) */
static struct bfin5xx_spi_chip spi_flash_chip_info = { static struct bfin5xx_spi_chip spi_flash_chip_info = {
.enable_dma = 0, /* use dma transfer with this chip*/ .enable_dma = 0, /* use dma transfer with this chip*/
.bits_per_word = 8,
};
#endif
#if defined(CONFIG_BFIN_SPI_ADC) \
|| defined(CONFIG_BFIN_SPI_ADC_MODULE)
/* SPI ADC chip */
static struct bfin5xx_spi_chip spi_adc_chip_info = {
.enable_dma = 1, /* use dma transfer with this chip*/
.bits_per_word = 16,
};
#endif
#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \
|| defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
.enable_dma = 0,
.bits_per_word = 16,
}; };
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
static struct bfin5xx_spi_chip mmc_spi_chip_info = { static struct bfin5xx_spi_chip mmc_spi_chip_info = {
.enable_dma = 0, .enable_dma = 0,
.bits_per_word = 8,
}; };
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
.enable_dma = 0,
.bits_per_word = 16,
};
static const struct ad7877_platform_data bfin_ad7877_ts_info = { static const struct ad7877_platform_data bfin_ad7877_ts_info = {
.model = 7877, .model = 7877,
.vref_delay_usecs = 50, /* internal, no capacitor */ .vref_delay_usecs = 50, /* internal, no capacitor */
...@@ -248,18 +224,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -248,18 +224,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_BFIN_SPI_ADC) \
|| defined(CONFIG_BFIN_SPI_ADC_MODULE)
{
.modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
.max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, /* Framework bus number */
.chip_select = 1, /* Framework chip select. */
.platform_data = NULL, /* No spi_driver specific config */
.controller_data = &spi_adc_chip_info,
},
#endif
#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ #if defined(CONFIG_SND_BF5XX_SOC_AD183X) \
|| defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
{ {
...@@ -267,7 +231,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -267,7 +231,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = 4, .chip_select = 4,
.controller_data = &ad1836_spi_chip_info,
}, },
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
...@@ -288,7 +251,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -288,7 +251,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
.max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = 5, .chip_select = 5,
.controller_data = &spi_ad7877_chip_info,
}, },
#endif #endif
......
This diff is collapsed.
...@@ -62,29 +62,12 @@ static struct flash_platform_data bfin_spi_flash_data = { ...@@ -62,29 +62,12 @@ static struct flash_platform_data bfin_spi_flash_data = {
/* SPI flash chip (m25p64) */ /* SPI flash chip (m25p64) */
static struct bfin5xx_spi_chip spi_flash_chip_info = { static struct bfin5xx_spi_chip spi_flash_chip_info = {
.enable_dma = 0, /* use dma transfer with this chip*/ .enable_dma = 0, /* use dma transfer with this chip*/
.bits_per_word = 8,
};
#endif
#if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE)
/* SPI ADC chip */
static struct bfin5xx_spi_chip spi_adc_chip_info = {
.enable_dma = 1, /* use dma transfer with this chip*/
.bits_per_word = 16,
};
#endif
#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
.enable_dma = 0,
.bits_per_word = 16,
}; };
#endif #endif
#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
static struct bfin5xx_spi_chip mmc_spi_chip_info = { static struct bfin5xx_spi_chip mmc_spi_chip_info = {
.enable_dma = 0, .enable_dma = 0,
.bits_per_word = 8,
}; };
#endif #endif
...@@ -102,24 +85,12 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -102,24 +85,12 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
}, },
#endif #endif
#if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE)
{
.modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
.max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, /* Framework bus number */
.chip_select = 1, /* Framework chip select. */
.platform_data = NULL, /* No spi_driver specific config */
.controller_data = &spi_adc_chip_info,
},
#endif
#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
{ {
.modalias = "ad183x", .modalias = "ad183x",
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = 4, .chip_select = 4,
.controller_data = &ad1836_spi_chip_info,
}, },
#endif #endif
...@@ -733,6 +704,24 @@ static struct platform_device *cm_bf537_devices[] __initdata = { ...@@ -733,6 +704,24 @@ static struct platform_device *cm_bf537_devices[] __initdata = {
#endif #endif
}; };
static int __init net2272_init(void)
{
#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
int ret;
ret = gpio_request(GPIO_PG14, "net2272");
if (ret)
return ret;
/* Reset USB Chip, PG14 */
gpio_direction_output(GPIO_PG14, 0);
mdelay(2);
gpio_set_value(GPIO_PG14, 1);
#endif
return 0;
}
static int __init tcm_bf537_init(void) static int __init tcm_bf537_init(void)
{ {
printk(KERN_INFO "%s(): registering device resources\n", __func__); printk(KERN_INFO "%s(): registering device resources\n", __func__);
...@@ -744,6 +733,10 @@ static int __init tcm_bf537_init(void) ...@@ -744,6 +733,10 @@ static int __init tcm_bf537_init(void)
#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN);
#endif #endif
if (net2272_init())
pr_warning("unable to configure net2272; it probably won't work\n");
return 0; return 0;
} }
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
*/ */
/* This file should be up to date with: /* This file should be up to date with:
* - Revision E, 05/25/2010; ADSP-BF534/ADSP-BF536/ADSP-BF537 Blackfin Processor Anomaly List * - Revision F, 05/23/2011; ADSP-BF534/ADSP-BF536/ADSP-BF537 Blackfin Processor Anomaly List
*/ */
#ifndef _MACH_ANOMALY_H_ #ifndef _MACH_ANOMALY_H_
...@@ -44,18 +44,12 @@ ...@@ -44,18 +44,12 @@
#define ANOMALY_05000119 (1) #define ANOMALY_05000119 (1)
/* Rx.H Cannot Be Used to Access 16-bit System MMR Registers */ /* Rx.H Cannot Be Used to Access 16-bit System MMR Registers */
#define ANOMALY_05000122 (1) #define ANOMALY_05000122 (1)
/* Killed 32-Bit MMR Write Leads to Next System MMR Access Thinking It Should Be 32-Bit */
#define ANOMALY_05000157 (__SILICON_REVISION__ < 2)
/* PPI_DELAY Not Functional in PPI Modes with 0 Frame Syncs */ /* PPI_DELAY Not Functional in PPI Modes with 0 Frame Syncs */
#define ANOMALY_05000180 (1) #define ANOMALY_05000180 (1)
/* Instruction Cache Is Not Functional */
#define ANOMALY_05000237 (__SILICON_REVISION__ < 2)
/* If I-Cache Is On, CSYNC/SSYNC/IDLE Around Change of Control Causes Failures */ /* If I-Cache Is On, CSYNC/SSYNC/IDLE Around Change of Control Causes Failures */
#define ANOMALY_05000244 (__SILICON_REVISION__ < 3) #define ANOMALY_05000244 (__SILICON_REVISION__ < 3)
/* False Hardware Error from an Access in the Shadow of a Conditional Branch */ /* False Hardware Error from an Access in the Shadow of a Conditional Branch */
#define ANOMALY_05000245 (1) #define ANOMALY_05000245 (1)
/* Buffered CLKIN Output Is Disabled by Default */
#define ANOMALY_05000247 (1)
/* Incorrect Bit Shift of Data Word in Multichannel (TDM) Mode in Certain Conditions */ /* Incorrect Bit Shift of Data Word in Multichannel (TDM) Mode in Certain Conditions */
#define ANOMALY_05000250 (__SILICON_REVISION__ < 3) #define ANOMALY_05000250 (__SILICON_REVISION__ < 3)
/* EMAC TX DMA Error After an Early Frame Abort */ /* EMAC TX DMA Error After an Early Frame Abort */
...@@ -98,7 +92,7 @@ ...@@ -98,7 +92,7 @@
#define ANOMALY_05000278 (((ANOMALY_BF536 || ANOMALY_BF537) && __SILICON_REVISION__ < 3) || (ANOMALY_BF534 && __SILICON_REVISION__ < 2)) #define ANOMALY_05000278 (((ANOMALY_BF536 || ANOMALY_BF537) && __SILICON_REVISION__ < 3) || (ANOMALY_BF534 && __SILICON_REVISION__ < 2))
/* SPI Master Boot Mode Does Not Work Well with Atmel Data Flash Devices */ /* SPI Master Boot Mode Does Not Work Well with Atmel Data Flash Devices */
#define ANOMALY_05000280 (1) #define ANOMALY_05000280 (1)
/* False Hardware Error Exception when ISR Context Is Not Restored */ /* False Hardware Error when ISR Context Is Not Restored */
#define ANOMALY_05000281 (__SILICON_REVISION__ < 3) #define ANOMALY_05000281 (__SILICON_REVISION__ < 3)
/* Memory DMA Corruption with 32-Bit Data and Traffic Control */ /* Memory DMA Corruption with 32-Bit Data and Traffic Control */
#define ANOMALY_05000282 (__SILICON_REVISION__ < 3) #define ANOMALY_05000282 (__SILICON_REVISION__ < 3)
...@@ -162,9 +156,9 @@ ...@@ -162,9 +156,9 @@
#define ANOMALY_05000461 (1) #define ANOMALY_05000461 (1)
/* Synchronization Problem at Startup May Cause SPORT Transmit Channels to Misalign */ /* Synchronization Problem at Startup May Cause SPORT Transmit Channels to Misalign */
#define ANOMALY_05000462 (1) #define ANOMALY_05000462 (1)
/* Interrupted 32-Bit SPORT Data Register Access Results In Underflow */ /* Interrupted SPORT Receive Data Register Read Results In Underflow when SLEN > 15 */
#define ANOMALY_05000473 (1) #define ANOMALY_05000473 (1)
/* Possible Lockup Condition whem Modifying PLL from External Memory */ /* Possible Lockup Condition when Modifying PLL from External Memory */
#define ANOMALY_05000475 (1) #define ANOMALY_05000475 (1)
/* TESTSET Instruction Cannot Be Interrupted */ /* TESTSET Instruction Cannot Be Interrupted */
#define ANOMALY_05000477 (1) #define ANOMALY_05000477 (1)
...@@ -172,8 +166,26 @@ ...@@ -172,8 +166,26 @@
#define ANOMALY_05000480 (__SILICON_REVISION__ < 3) #define ANOMALY_05000480 (__SILICON_REVISION__ < 3)
/* Reads of ITEST_COMMAND and ITEST_DATA Registers Cause Cache Corruption */ /* Reads of ITEST_COMMAND and ITEST_DATA Registers Cause Cache Corruption */
#define ANOMALY_05000481 (1) #define ANOMALY_05000481 (1)
/* IFLUSH sucks at life */ /* PLL May Latch Incorrect Values Coming Out of Reset */
#define ANOMALY_05000489 (1)
/* Instruction Memory Stalls Can Cause IFLUSH to Fail */
#define ANOMALY_05000491 (1) #define ANOMALY_05000491 (1)
/* EXCPT Instruction May Be Lost If NMI Happens Simultaneously */
#define ANOMALY_05000494 (1)
/* RXS Bit in SPI_STAT May Become Stuck In RX DMA Modes */
#define ANOMALY_05000501 (1)
/*
* These anomalies have been "phased" out of analog.com anomaly sheets and are
* here to show running on older silicon just isn't feasible.
*/
/* Killed 32-Bit MMR Write Leads to Next System MMR Access Thinking It Should Be 32-Bit */
#define ANOMALY_05000157 (__SILICON_REVISION__ < 2)
/* Instruction Cache Is Not Functional */
#define ANOMALY_05000237 (__SILICON_REVISION__ < 2)
/* Buffered CLKIN Output Is Disabled by Default */
#define ANOMALY_05000247 (__SILICON_REVISION__ < 2)
/* Anomalies that don't exist on this proc */ /* Anomalies that don't exist on this proc */
#define ANOMALY_05000099 (0) #define ANOMALY_05000099 (0)
......
...@@ -502,7 +502,6 @@ static struct flash_platform_data bfin_spi_flash_data = { ...@@ -502,7 +502,6 @@ static struct flash_platform_data bfin_spi_flash_data = {
static struct bfin5xx_spi_chip spi_flash_chip_info = { static struct bfin5xx_spi_chip spi_flash_chip_info = {
.enable_dma = 0, /* use dma transfer with this chip*/ .enable_dma = 0, /* use dma transfer with this chip*/
.bits_per_word = 8,
}; };
#endif #endif
...@@ -523,13 +522,6 @@ static const struct ad7879_platform_data bfin_ad7879_ts_info = { ...@@ -523,13 +522,6 @@ static const struct ad7879_platform_data bfin_ad7879_ts_info = {
}; };
#endif #endif
#if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE)
static struct bfin5xx_spi_chip spi_ad7879_chip_info = {
.enable_dma = 0,
.bits_per_word = 16,
};
#endif
#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
#include <asm/bfin-lq035q1.h> #include <asm/bfin-lq035q1.h>
...@@ -559,20 +551,6 @@ static struct platform_device bfin_lq035q1_device = { ...@@ -559,20 +551,6 @@ static struct platform_device bfin_lq035q1_device = {
}; };
#endif #endif
#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
static struct bfin5xx_spi_chip spidev_chip_info = {
.enable_dma = 0,
.bits_per_word = 8,
};
#endif
#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
static struct bfin5xx_spi_chip lq035q1_spi_chip_info = {
.enable_dma = 0,
.bits_per_word = 8,
};
#endif
static struct spi_board_info bf538_spi_board_info[] __initdata = { static struct spi_board_info bf538_spi_board_info[] __initdata = {
#if defined(CONFIG_MTD_M25P80) \ #if defined(CONFIG_MTD_M25P80) \
|| defined(CONFIG_MTD_M25P80_MODULE) || defined(CONFIG_MTD_M25P80_MODULE)
...@@ -595,7 +573,6 @@ static struct spi_board_info bf538_spi_board_info[] __initdata = { ...@@ -595,7 +573,6 @@ static struct spi_board_info bf538_spi_board_info[] __initdata = {
.max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = 1, .chip_select = 1,
.controller_data = &spi_ad7879_chip_info,
.mode = SPI_CPHA | SPI_CPOL, .mode = SPI_CPHA | SPI_CPOL,
}, },
#endif #endif
...@@ -605,7 +582,6 @@ static struct spi_board_info bf538_spi_board_info[] __initdata = { ...@@ -605,7 +582,6 @@ static struct spi_board_info bf538_spi_board_info[] __initdata = {
.max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = 2, .chip_select = 2,
.controller_data = &lq035q1_spi_chip_info,
.mode = SPI_CPHA | SPI_CPOL, .mode = SPI_CPHA | SPI_CPOL,
}, },
#endif #endif
...@@ -615,7 +591,6 @@ static struct spi_board_info bf538_spi_board_info[] __initdata = { ...@@ -615,7 +591,6 @@ static struct spi_board_info bf538_spi_board_info[] __initdata = {
.max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0, .bus_num = 0,
.chip_select = 1, .chip_select = 1,
.controller_data = &spidev_chip_info,
}, },
#endif #endif
}; };
......
/* /*
* GPIOLIB interface for BF538/9 PORT C, D, and E GPIOs * GPIOLIB interface for BF538/9 PORT C, D, and E GPIOs
* *
* Copyright 2009 Analog Devices Inc. * Copyright 2009-2011 Analog Devices Inc.
* *
* Licensed under the GPL-2 or later. * Licensed under the GPL-2 or later.
*/ */
...@@ -121,3 +121,38 @@ static int __init bf538_extgpio_setup(void) ...@@ -121,3 +121,38 @@ static int __init bf538_extgpio_setup(void)
gpiochip_add(&bf538_porte_chip); gpiochip_add(&bf538_porte_chip);
} }
arch_initcall(bf538_extgpio_setup); arch_initcall(bf538_extgpio_setup);
#ifdef CONFIG_PM
static struct {
u16 data, dir, inen;
} gpio_bank_saved[3];
static void __iomem * const port_bases[3] = {
(void *)PORTCIO,
(void *)PORTDIO,
(void *)PORTEIO,
};
void bfin_special_gpio_pm_hibernate_suspend(void)
{
int i;
for (i = 0; i < ARRAY_SIZE(port_bases); ++i) {
gpio_bank_saved[i].data = read_PORTIO(port_bases[i]);
gpio_bank_saved[i].inen = read_PORTIO_INEN(port_bases[i]);
gpio_bank_saved[i].dir = read_PORTIO_DIR(port_bases[i]);
}
}
void bfin_special_gpio_pm_hibernate_restore(void)
{
int i;
for (i = 0; i < ARRAY_SIZE(port_bases); ++i) {
write_PORTIO_INEN(port_bases[i], gpio_bank_saved[i].inen);
write_PORTIO_SET(port_bases[i],
gpio_bank_saved[i].data & gpio_bank_saved[i].dir);
write_PORTIO_DIR(port_bases[i], gpio_bank_saved[i].dir);
}
}
#endif
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
*/ */
/* This file should be up to date with: /* This file should be up to date with:
* - Revision I, 05/25/2010; ADSP-BF538/BF538F Blackfin Processor Anomaly List * - Revision J, 05/23/2011; ADSP-BF538/BF538F Blackfin Processor Anomaly List
* - Revision N, 05/25/2010; ADSP-BF539/BF539F Blackfin Processor Anomaly List * - Revision O, 05/23/2011; ADSP-BF539/BF539F Blackfin Processor Anomaly List
*/ */
#ifndef _MACH_ANOMALY_H_ #ifndef _MACH_ANOMALY_H_
...@@ -56,25 +56,21 @@ ...@@ -56,25 +56,21 @@
#define ANOMALY_05000229 (1) #define ANOMALY_05000229 (1)
/* PPI_FS3 Is Not Driven in 2 or 3 Internal Frame Sync Transmit Modes */ /* PPI_FS3 Is Not Driven in 2 or 3 Internal Frame Sync Transmit Modes */
#define ANOMALY_05000233 (1) #define ANOMALY_05000233 (1)
/* If I-Cache Is On, CSYNC/SSYNC/IDLE Around Change of Control Causes Failures */
#define ANOMALY_05000244 (__SILICON_REVISION__ < 3)
/* False Hardware Error from an Access in the Shadow of a Conditional Branch */ /* False Hardware Error from an Access in the Shadow of a Conditional Branch */
#define ANOMALY_05000245 (1) #define ANOMALY_05000245 (1)
/* Maximum External Clock Speed for Timers */ /* Maximum External Clock Speed for Timers */
#define ANOMALY_05000253 (1) #define ANOMALY_05000253 (1)
/* DCPLB_FAULT_ADDR MMR Register May Be Corrupted */
#define ANOMALY_05000261 (__SILICON_REVISION__ < 3)
/* High I/O Activity Causes Output Voltage of Internal Voltage Regulator (Vddint) to Decrease */ /* High I/O Activity Causes Output Voltage of Internal Voltage Regulator (Vddint) to Decrease */
#define ANOMALY_05000270 (__SILICON_REVISION__ < 4) #define ANOMALY_05000270 (__SILICON_REVISION__ < 4)
/* Certain Data Cache Writethrough Modes Fail for Vddint <= 0.9V */ /* Certain Data Cache Writethrough Modes Fail for Vddint <= 0.9V */
#define ANOMALY_05000272 (1) #define ANOMALY_05000272 (ANOMALY_BF538)
/* Writes to Synchronous SDRAM Memory May Be Lost */ /* Writes to Synchronous SDRAM Memory May Be Lost */
#define ANOMALY_05000273 (__SILICON_REVISION__ < 4) #define ANOMALY_05000273 (__SILICON_REVISION__ < 4)
/* Writes to an I/O Data Register One SCLK Cycle after an Edge Is Detected May Clear Interrupt */ /* Writes to an I/O Data Register One SCLK Cycle after an Edge Is Detected May Clear Interrupt */
#define ANOMALY_05000277 (__SILICON_REVISION__ < 4) #define ANOMALY_05000277 (__SILICON_REVISION__ < 4)
/* Disabling Peripherals with DMA Running May Cause DMA System Instability */ /* Disabling Peripherals with DMA Running May Cause DMA System Instability */
#define ANOMALY_05000278 (__SILICON_REVISION__ < 4) #define ANOMALY_05000278 (__SILICON_REVISION__ < 4)
/* False Hardware Error Exception when ISR Context Is Not Restored */ /* False Hardware Error when ISR Context Is Not Restored */
#define ANOMALY_05000281 (__SILICON_REVISION__ < 4) #define ANOMALY_05000281 (__SILICON_REVISION__ < 4)
/* Memory DMA Corruption with 32-Bit Data and Traffic Control */ /* Memory DMA Corruption with 32-Bit Data and Traffic Control */
#define ANOMALY_05000282 (__SILICON_REVISION__ < 4) #define ANOMALY_05000282 (__SILICON_REVISION__ < 4)
...@@ -102,8 +98,10 @@ ...@@ -102,8 +98,10 @@
#define ANOMALY_05000313 (__SILICON_REVISION__ < 4) #define ANOMALY_05000313 (__SILICON_REVISION__ < 4)
/* Killed System MMR Write Completes Erroneously on Next System MMR Access */ /* Killed System MMR Write Completes Erroneously on Next System MMR Access */
#define ANOMALY_05000315 (__SILICON_REVISION__ < 4) #define ANOMALY_05000315 (__SILICON_REVISION__ < 4)
/* PFx Glitch on Write to PORTFIO or PORTFIO_TOGGLE */
#define ANOMALY_05000317 (__SILICON_REVISION__ < 4) /* XXX: Same as 05000318 */
/* PFx Glitch on Write to FIO_FLAG_D or FIO_FLAG_T */ /* PFx Glitch on Write to FIO_FLAG_D or FIO_FLAG_T */
#define ANOMALY_05000318 (ANOMALY_BF539 && __SILICON_REVISION__ < 4) #define ANOMALY_05000318 (__SILICON_REVISION__ < 4) /* XXX: Same as 05000317 */
/* Regulator Programming Blocked when Hibernate Wakeup Source Remains Active */ /* Regulator Programming Blocked when Hibernate Wakeup Source Remains Active */
#define ANOMALY_05000355 (__SILICON_REVISION__ < 5) #define ANOMALY_05000355 (__SILICON_REVISION__ < 5)
/* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ /* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */
...@@ -134,16 +132,32 @@ ...@@ -134,16 +132,32 @@
#define ANOMALY_05000461 (1) #define ANOMALY_05000461 (1)
/* Synchronization Problem at Startup May Cause SPORT Transmit Channels to Misalign */ /* Synchronization Problem at Startup May Cause SPORT Transmit Channels to Misalign */
#define ANOMALY_05000462 (1) #define ANOMALY_05000462 (1)
/* Interrupted 32-Bit SPORT Data Register Access Results In Underflow */ /* Interrupted SPORT Receive Data Register Read Results In Underflow when SLEN > 15 */
#define ANOMALY_05000473 (1) #define ANOMALY_05000473 (1)
/* Possible Lockup Condition whem Modifying PLL from External Memory */ /* Possible Lockup Condition when Modifying PLL from External Memory */
#define ANOMALY_05000475 (1) #define ANOMALY_05000475 (1)
/* TESTSET Instruction Cannot Be Interrupted */ /* TESTSET Instruction Cannot Be Interrupted */
#define ANOMALY_05000477 (1) #define ANOMALY_05000477 (1)
/* Reads of ITEST_COMMAND and ITEST_DATA Registers Cause Cache Corruption */ /* Reads of ITEST_COMMAND and ITEST_DATA Registers Cause Cache Corruption */
#define ANOMALY_05000481 (1) #define ANOMALY_05000481 (1)
/* IFLUSH sucks at life */ /* PLL May Latch Incorrect Values Coming Out of Reset */
#define ANOMALY_05000489 (1)
/* Instruction Memory Stalls Can Cause IFLUSH to Fail */
#define ANOMALY_05000491 (1) #define ANOMALY_05000491 (1)
/* EXCPT Instruction May Be Lost If NMI Happens Simultaneously */
#define ANOMALY_05000494 (1)
/* RXS Bit in SPI_STAT May Become Stuck In RX DMA Modes */
#define ANOMALY_05000501 (1)
/*
* These anomalies have been "phased" out of analog.com anomaly sheets and are
* here to show running on older silicon just isn't feasible.
*/
/* If I-Cache Is On, CSYNC/SSYNC/IDLE Around Change of Control Causes Failures */
#define ANOMALY_05000244 (__SILICON_REVISION__ < 3)
/* DCPLB_FAULT_ADDR MMR Register May Be Corrupted */
#define ANOMALY_05000261 (__SILICON_REVISION__ < 3)
/* Anomalies that don't exist on this proc */ /* Anomalies that don't exist on this proc */
#define ANOMALY_05000099 (0) #define ANOMALY_05000099 (0)
......
...@@ -8,7 +8,10 @@ ...@@ -8,7 +8,10 @@
#define _MACH_GPIO_H_ #define _MACH_GPIO_H_
#define MAX_BLACKFIN_GPIOS 16 #define MAX_BLACKFIN_GPIOS 16
#ifdef CONFIG_GPIOLIB
/* We only use the special logic with GPIOLIB devices */
#define BFIN_SPECIAL_GPIO_BANKS 3 #define BFIN_SPECIAL_GPIO_BANKS 3
#endif
#define GPIO_PF0 0 /* PF */ #define GPIO_PF0 0 /* PF */
#define GPIO_PF1 1 #define GPIO_PF1 1
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment