aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin')
-rw-r--r--arch/blackfin/Kconfig19
-rw-r--r--arch/blackfin/Kconfig.debug11
-rw-r--r--arch/blackfin/Makefile3
-rw-r--r--arch/blackfin/configs/BF518F-EZBRD_defconfig2
-rw-r--r--arch/blackfin/configs/BF526-EZBRD_defconfig2
-rw-r--r--arch/blackfin/configs/BF527-AD7160-EVAL_defconfig105
-rw-r--r--arch/blackfin/configs/BF527-EZKIT-V2_defconfig3
-rw-r--r--arch/blackfin/configs/BF527-EZKIT_defconfig3
-rw-r--r--arch/blackfin/configs/BF527-TLL6527M_defconfig179
-rw-r--r--arch/blackfin/configs/BF533-EZKIT_defconfig2
-rw-r--r--arch/blackfin/configs/BF533-STAMP_defconfig2
-rw-r--r--arch/blackfin/configs/BF537-STAMP_defconfig3
-rw-r--r--arch/blackfin/configs/BF538-EZKIT_defconfig3
-rw-r--r--arch/blackfin/configs/BF548-EZKIT_defconfig4
-rw-r--r--arch/blackfin/configs/BF561-ACVILON_defconfig4
-rw-r--r--arch/blackfin/configs/BF561-EZKIT_defconfig1
-rw-r--r--arch/blackfin/configs/BlackStamp_defconfig3
-rw-r--r--arch/blackfin/configs/CM-BF527_defconfig4
-rw-r--r--arch/blackfin/configs/CM-BF533_defconfig3
-rw-r--r--arch/blackfin/configs/CM-BF537E_defconfig3
-rw-r--r--arch/blackfin/configs/CM-BF537U_defconfig3
-rw-r--r--arch/blackfin/configs/CM-BF548_defconfig3
-rw-r--r--arch/blackfin/configs/CM-BF561_defconfig3
-rw-r--r--arch/blackfin/configs/H8606_defconfig3
-rw-r--r--arch/blackfin/configs/IP0X_defconfig3
-rw-r--r--arch/blackfin/configs/PNAV-10_defconfig2
-rw-r--r--arch/blackfin/configs/SRV1_defconfig3
-rw-r--r--arch/blackfin/configs/TCM-BF518_defconfig1
-rw-r--r--arch/blackfin/configs/TCM-BF537_defconfig2
-rw-r--r--arch/blackfin/include/asm/Kbuild1
-rw-r--r--arch/blackfin/include/asm/bfin5xx_spi.h21
-rw-r--r--arch/blackfin/include/asm/bfin_can.h9
-rw-r--r--arch/blackfin/include/asm/bfin_ppi.h53
-rw-r--r--arch/blackfin/include/asm/bfin_twi.h45
-rw-r--r--arch/blackfin/include/asm/cachectl.h20
-rw-r--r--arch/blackfin/include/asm/cdef_LPBlackfin.h9
-rw-r--r--arch/blackfin/include/asm/entry.h8
-rw-r--r--arch/blackfin/include/asm/ptrace.h3
-rw-r--r--arch/blackfin/include/asm/serial.h1
-rw-r--r--arch/blackfin/include/asm/unistd.h3
-rw-r--r--arch/blackfin/kernel/bfin_gpio.c185
-rw-r--r--arch/blackfin/kernel/kgdb.c3
-rw-r--r--arch/blackfin/kernel/kgdb_test.c1
-rw-r--r--arch/blackfin/kernel/process.c5
-rw-r--r--arch/blackfin/kernel/ptrace.c28
-rw-r--r--arch/blackfin/kernel/sys_bfin.c15
-rw-r--r--arch/blackfin/mach-bf518/boards/ezbrd.c65
-rw-r--r--arch/blackfin/mach-bf518/boards/tcm-bf518.c26
-rw-r--r--arch/blackfin/mach-bf518/include/mach/cdefBF51x_base.h32
-rw-r--r--arch/blackfin/mach-bf518/include/mach/defBF51x_base.h45
-rw-r--r--arch/blackfin/mach-bf527/boards/Kconfig10
-rw-r--r--arch/blackfin/mach-bf527/boards/Makefile2
-rw-r--r--arch/blackfin/mach-bf527/boards/ad7160eval.c870
-rw-r--r--arch/blackfin/mach-bf527/boards/cm_bf527.c36
-rw-r--r--arch/blackfin/mach-bf527/boards/ezbrd.c30
-rw-r--r--arch/blackfin/mach-bf527/boards/ezkit.c49
-rw-r--r--arch/blackfin/mach-bf527/boards/tll6527m.c1008
-rw-r--r--arch/blackfin/mach-bf527/include/mach/cdefBF52x_base.h32
-rw-r--r--arch/blackfin/mach-bf527/include/mach/defBF52x_base.h45
-rw-r--r--arch/blackfin/mach-bf533/boards/H8606.c10
-rw-r--r--arch/blackfin/mach-bf533/boards/blackstamp.c4
-rw-r--r--arch/blackfin/mach-bf533/boards/cm_bf533.c10
-rw-r--r--arch/blackfin/mach-bf533/boards/ezkit.c12
-rw-r--r--arch/blackfin/mach-bf533/boards/ip0x.c2
-rw-r--r--arch/blackfin/mach-bf533/boards/stamp.c19
-rw-r--r--arch/blackfin/mach-bf533/include/mach/defBF532.h70
-rw-r--r--arch/blackfin/mach-bf537/Kconfig4
-rw-r--r--arch/blackfin/mach-bf537/boards/cm_bf537e.c34
-rw-r--r--arch/blackfin/mach-bf537/boards/cm_bf537u.c34
-rw-r--r--arch/blackfin/mach-bf537/boards/minotaur.c24
-rw-r--r--arch/blackfin/mach-bf537/boards/pnav10.c36
-rw-r--r--arch/blackfin/mach-bf537/boards/stamp.c623
-rw-r--r--arch/blackfin/mach-bf537/boards/tcm_bf537.c34
-rw-r--r--arch/blackfin/mach-bf537/include/mach/defBF534.h44
-rw-r--r--arch/blackfin/mach-bf538/boards/ezkit.c4
-rw-r--r--arch/blackfin/mach-bf538/include/mach/defBF539.h73
-rw-r--r--arch/blackfin/mach-bf548/boards/cm_bf548.c47
-rw-r--r--arch/blackfin/mach-bf548/boards/ezkit.c31
-rw-r--r--arch/blackfin/mach-bf548/dma.c1
-rw-r--r--arch/blackfin/mach-bf548/include/mach/cdefBF54x_base.h2
-rw-r--r--arch/blackfin/mach-bf548/include/mach/defBF54x_base.h51
-rw-r--r--arch/blackfin/mach-bf561/boards/acvilon.c2
-rw-r--r--arch/blackfin/mach-bf561/boards/cm_bf561.c10
-rw-r--r--arch/blackfin/mach-bf561/boards/ezkit.c68
-rw-r--r--arch/blackfin/mach-bf561/coreb.c12
-rw-r--r--arch/blackfin/mach-bf561/include/mach/blackfin.h33
-rw-r--r--arch/blackfin/mach-bf561/include/mach/cdefBF561.h76
-rw-r--r--arch/blackfin/mach-bf561/include/mach/defBF561.h94
-rw-r--r--arch/blackfin/mach-bf561/ints-priority.c16
-rw-r--r--arch/blackfin/mach-bf561/smp.c24
-rw-r--r--arch/blackfin/mach-common/Makefile1
-rw-r--r--arch/blackfin/mach-common/dpmc_modes.S50
-rw-r--r--arch/blackfin/mach-common/entry.S113
-rw-r--r--arch/blackfin/mach-common/interrupt.S17
-rw-r--r--arch/blackfin/mach-common/ints-priority.c11
-rw-r--r--arch/blackfin/mach-common/irqpanic.c106
-rw-r--r--arch/blackfin/mm/init.c3
97 files changed, 3830 insertions, 1017 deletions
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index 5a3152b75cdb..0a221d48152d 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -1,10 +1,3 @@
1#
2# For a description of the syntax of this configuration file,
3# see Documentation/kbuild/kconfig-language.txt.
4#
5
6mainmenu "Blackfin Kernel Configuration"
7
8config SYMBOL_PREFIX 1config SYMBOL_PREFIX
9 string 2 string
10 default "_" 3 default "_"
@@ -300,7 +293,7 @@ config BF_REV_0_1
300 293
301config BF_REV_0_2 294config BF_REV_0_2
302 bool "0.2" 295 bool "0.2"
303 depends on (BF52x || BF537 || BF536 || BF534 || (BF54x && !BF54xM)) 296 depends on (BF51x || BF52x || BF537 || BF536 || BF534 || (BF54x && !BF54xM))
304 297
305config BF_REV_0_3 298config BF_REV_0_3
306 bool "0.3" 299 bool "0.3"
@@ -356,7 +349,7 @@ config MEM_MT48LC8M32B2B5_7
356 349
357config MEM_MT48LC32M16A2TG_75 350config MEM_MT48LC32M16A2TG_75
358 bool 351 bool
359 depends on (BFIN527_EZKIT || BFIN527_EZKIT_V2 || BFIN532_IP0X || BLACKSTAMP) 352 depends on (BFIN527_EZKIT || BFIN527_EZKIT_V2 || BFIN532_IP0X || BLACKSTAMP || BFIN527_AD7160EVAL)
360 default y 353 default y
361 354
362config MEM_MT48H32M16LFCJ_75 355config MEM_MT48H32M16LFCJ_75
@@ -426,6 +419,7 @@ config CLKIN_HZ
426 default "25000000" # most people use this 419 default "25000000" # most people use this
427 default "27000000" if BFIN533_EZKIT 420 default "27000000" if BFIN533_EZKIT
428 default "30000000" if BFIN561_EZKIT 421 default "30000000" if BFIN561_EZKIT
422 default "24000000" if BFIN527_AD7160EVAL
429 help 423 help
430 The frequency of CLKIN crystal oscillator on the board in Hz. 424 The frequency of CLKIN crystal oscillator on the board in Hz.
431 Warning: This value should match the crystal on the board. Otherwise, 425 Warning: This value should match the crystal on the board. Otherwise,
@@ -463,6 +457,7 @@ config VCO_MULT
463 default "20" if (BFIN537_BLUETECHNIX_CM_E || BFIN537_BLUETECHNIX_CM_U || BFIN527_BLUETECHNIX_CM || BFIN561_BLUETECHNIX_CM) 457 default "20" if (BFIN537_BLUETECHNIX_CM_E || BFIN537_BLUETECHNIX_CM_U || BFIN527_BLUETECHNIX_CM || BFIN561_BLUETECHNIX_CM)
464 default "20" if BFIN561_EZKIT 458 default "20" if BFIN561_EZKIT
465 default "16" if (H8606_HVSISTEMAS || BLACKSTAMP || BFIN526_EZBRD || BFIN518F_EZBRD) 459 default "16" if (H8606_HVSISTEMAS || BLACKSTAMP || BFIN526_EZBRD || BFIN518F_EZBRD)
460 default "25" if BFIN527_AD7160EVAL
466 help 461 help
467 This controls the frequency of the on-chip PLL. This can be between 1 and 64. 462 This controls the frequency of the on-chip PLL. This can be between 1 and 64.
468 PLL Frequency = (Crystal Frequency) * (this setting) 463 PLL Frequency = (Crystal Frequency) * (this setting)
@@ -926,6 +921,12 @@ config ROMKERNEL
926 921
927endchoice 922endchoice
928 923
924# Common code uses "ROMKERNEL" or "XIP_KERNEL", so define both
925config XIP_KERNEL
926 bool
927 default y
928 depends on ROMKERNEL
929
929source "mm/Kconfig" 930source "mm/Kconfig"
930 931
931config BFIN_GPTIMERS 932config BFIN_GPTIMERS
diff --git a/arch/blackfin/Kconfig.debug b/arch/blackfin/Kconfig.debug
index d1825cb24768..acb83799a215 100644
--- a/arch/blackfin/Kconfig.debug
+++ b/arch/blackfin/Kconfig.debug
@@ -102,17 +102,6 @@ config DEBUG_DOUBLEFAULT_RESET
102 102
103endchoice 103endchoice
104 104
105config DEBUG_ICACHE_CHECK
106 bool "Check Instruction cache coherency"
107 depends on DEBUG_KERNEL
108 depends on DEBUG_HWERR
109 help
110 Say Y here if you are getting weird unexplained errors. This will
111 ensure that icache is what SDRAM says it should be by doing a
112 byte wise comparison between SDRAM and instruction cache. This
113 also relocates the irq_panic() function to L1 memory, (which is
114 un-cached).
115
116config DEBUG_HUNT_FOR_ZERO 105config DEBUG_HUNT_FOR_ZERO
117 bool "Catch NULL pointer reads/writes" 106 bool "Catch NULL pointer reads/writes"
118 default y 107 default y
diff --git a/arch/blackfin/Makefile b/arch/blackfin/Makefile
index 3e65b0ffe084..46738d49b7c8 100644
--- a/arch/blackfin/Makefile
+++ b/arch/blackfin/Makefile
@@ -101,9 +101,8 @@ KBUILD_CFLAGS += -mcpu=$(cpu-y)-$(rev-y)
101KBUILD_AFLAGS += -mcpu=$(cpu-y)-$(rev-y) 101KBUILD_AFLAGS += -mcpu=$(cpu-y)-$(rev-y)
102 102
103# - we utilize the silicon rev from the toolchain, so move it over to the checkflags 103# - we utilize the silicon rev from the toolchain, so move it over to the checkflags
104# - the l1_text attribute is Blackfin specific, so fake it out as used to kill warnings
105CHECKFLAGS_SILICON = $(shell echo "" | $(CPP) $(KBUILD_CFLAGS) -dD - 2>/dev/null | awk '$$2 == "__SILICON_REVISION__" { print $$3 }') 104CHECKFLAGS_SILICON = $(shell echo "" | $(CPP) $(KBUILD_CFLAGS) -dD - 2>/dev/null | awk '$$2 == "__SILICON_REVISION__" { print $$3 }')
106CHECKFLAGS += -D__SILICON_REVISION__=$(CHECKFLAGS_SILICON) -Dl1_text=__used__ 105CHECKFLAGS += -D__SILICON_REVISION__=$(CHECKFLAGS_SILICON) -D__bfin__
107 106
108head-y := arch/$(ARCH)/kernel/init_task.o 107head-y := arch/$(ARCH)/kernel/init_task.o
109 108
diff --git a/arch/blackfin/configs/BF518F-EZBRD_defconfig b/arch/blackfin/configs/BF518F-EZBRD_defconfig
index 46fac1bf0605..c0b988ee30df 100644
--- a/arch/blackfin/configs/BF518F-EZBRD_defconfig
+++ b/arch/blackfin/configs/BF518F-EZBRD_defconfig
@@ -35,6 +35,7 @@ CONFIG_C_CDPRIO=y
35CONFIG_BANK_3=0x99B2 35CONFIG_BANK_3=0x99B2
36CONFIG_BINFMT_FLAT=y 36CONFIG_BINFMT_FLAT=y
37CONFIG_BINFMT_ZFLAT=y 37CONFIG_BINFMT_ZFLAT=y
38CONFIG_PM=y
38CONFIG_NET=y 39CONFIG_NET=y
39CONFIG_PACKET=y 40CONFIG_PACKET=y
40CONFIG_UNIX=y 41CONFIG_UNIX=y
@@ -114,7 +115,6 @@ CONFIG_DEBUG_DOUBLEFAULT=y
114CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE=y 115CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE=y
115CONFIG_EARLY_PRINTK=y 116CONFIG_EARLY_PRINTK=y
116CONFIG_CPLB_INFO=y 117CONFIG_CPLB_INFO=y
117CONFIG_SECURITY=y
118CONFIG_CRYPTO=y 118CONFIG_CRYPTO=y
119# CONFIG_CRYPTO_ANSI_CPRNG is not set 119# CONFIG_CRYPTO_ANSI_CPRNG is not set
120CONFIG_CRC_CCITT=m 120CONFIG_CRC_CCITT=m
diff --git a/arch/blackfin/configs/BF526-EZBRD_defconfig b/arch/blackfin/configs/BF526-EZBRD_defconfig
index 80240806cf9e..864af5b68874 100644
--- a/arch/blackfin/configs/BF526-EZBRD_defconfig
+++ b/arch/blackfin/configs/BF526-EZBRD_defconfig
@@ -40,6 +40,7 @@ CONFIG_C_CDPRIO=y
40CONFIG_BANK_3=0x99B2 40CONFIG_BANK_3=0x99B2
41CONFIG_BINFMT_FLAT=y 41CONFIG_BINFMT_FLAT=y
42CONFIG_BINFMT_ZFLAT=y 42CONFIG_BINFMT_ZFLAT=y
43CONFIG_PM=y
43CONFIG_NET=y 44CONFIG_NET=y
44CONFIG_PACKET=y 45CONFIG_PACKET=y
45CONFIG_UNIX=y 46CONFIG_UNIX=y
@@ -152,7 +153,6 @@ CONFIG_DEBUG_DOUBLEFAULT=y
152CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE=y 153CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE=y
153CONFIG_EARLY_PRINTK=y 154CONFIG_EARLY_PRINTK=y
154CONFIG_CPLB_INFO=y 155CONFIG_CPLB_INFO=y
155CONFIG_SECURITY=y
156CONFIG_CRYPTO=y 156CONFIG_CRYPTO=y
157# CONFIG_CRYPTO_ANSI_CPRNG is not set 157# CONFIG_CRYPTO_ANSI_CPRNG is not set
158CONFIG_CRC_CCITT=m 158CONFIG_CRC_CCITT=m
diff --git a/arch/blackfin/configs/BF527-AD7160-EVAL_defconfig b/arch/blackfin/configs/BF527-AD7160-EVAL_defconfig
new file mode 100644
index 000000000000..7b6a3370dbe2
--- /dev/null
+++ b/arch/blackfin/configs/BF527-AD7160-EVAL_defconfig
@@ -0,0 +1,105 @@
1CONFIG_EXPERIMENTAL=y
2CONFIG_SYSVIPC=y
3CONFIG_IKCONFIG=y
4CONFIG_IKCONFIG_PROC=y
5CONFIG_LOG_BUF_SHIFT=14
6CONFIG_BLK_DEV_INITRD=y
7# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
8CONFIG_EMBEDDED=y
9# CONFIG_ELF_CORE is not set
10# CONFIG_AIO is not set
11CONFIG_SLAB=y
12CONFIG_MMAP_ALLOW_UNINITIALIZED=y
13CONFIG_MODULES=y
14CONFIG_MODULE_UNLOAD=y
15# CONFIG_BLK_DEV_BSG is not set
16# CONFIG_IOSCHED_DEADLINE is not set
17CONFIG_PREEMPT=y
18CONFIG_BF527=y
19CONFIG_BF_REV_0_2=y
20CONFIG_IRQ_TWI=7
21CONFIG_IRQ_PORTH_INTA=7
22CONFIG_IRQ_PORTH_INTB=7
23CONFIG_BFIN527_AD7160EVAL=y
24CONFIG_BF527_SPORT0_PORTF=y
25CONFIG_BF527_UART1_PORTG=y
26CONFIG_IRQ_USB_INT0=11
27CONFIG_IRQ_USB_INT1=11
28CONFIG_IRQ_USB_INT2=11
29CONFIG_IRQ_USB_DMA=11
30CONFIG_CMDLINE_BOOL=y
31CONFIG_CMDLINE="bootargs=root=/dev/mtdblock0 rw clkin_hz=24000000 earlyprintk=serial,uart0,57600 console=tty0 console=ttyBF0,57600"
32CONFIG_CLKIN_HZ=24000000
33CONFIG_HZ_300=y
34# CONFIG_CYCLES_CLOCKSOURCE is not set
35CONFIG_IP_CHECKSUM_L1=y
36CONFIG_SYSCALL_TAB_L1=y
37CONFIG_CPLB_SWITCH_TAB_L1=y
38CONFIG_BFIN_GPTIMERS=y
39CONFIG_C_CDPRIO=y
40CONFIG_BANK_1=0x5554
41CONFIG_BANK_3=0xFFC0
42CONFIG_BINFMT_FLAT=y
43CONFIG_BINFMT_ZFLAT=y
44CONFIG_NET=y
45CONFIG_UNIX=y
46# CONFIG_WIRELESS is not set
47CONFIG_BLK_DEV_LOOP=y
48CONFIG_BLK_DEV_RAM=y
49# CONFIG_MISC_DEVICES is not set
50# CONFIG_INPUT_MOUSEDEV is not set
51CONFIG_INPUT_EVDEV=y
52# CONFIG_INPUT_KEYBOARD is not set
53# CONFIG_INPUT_MOUSE is not set
54CONFIG_INPUT_TOUCHSCREEN=y
55CONFIG_TOUCHSCREEN_AD7160=y
56CONFIG_TOUCHSCREEN_AD7160_FW=y
57# CONFIG_SERIO is not set
58# CONFIG_BFIN_DMA_INTERFACE is not set
59# CONFIG_DEVKMEM is not set
60CONFIG_SERIAL_BFIN=y
61CONFIG_SERIAL_BFIN_CONSOLE=y
62CONFIG_SERIAL_BFIN_UART0=y
63# CONFIG_LEGACY_PTYS is not set
64# CONFIG_BFIN_OTP is not set
65# CONFIG_HW_RANDOM is not set
66CONFIG_I2C=y
67# CONFIG_I2C_HELPER_AUTO is not set
68CONFIG_I2C_ALGOBIT=y
69CONFIG_I2C_BLACKFIN_TWI=y
70CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=400
71CONFIG_SPI=y
72CONFIG_SPI_BFIN=y
73CONFIG_GPIOLIB=y
74CONFIG_GPIO_SYSFS=y
75# CONFIG_HWMON is not set
76CONFIG_FB=y
77CONFIG_FRAMEBUFFER_CONSOLE=y
78CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
79CONFIG_LOGO=y
80# CONFIG_LOGO_LINUX_MONO is not set
81# CONFIG_LOGO_LINUX_VGA16 is not set
82# CONFIG_LOGO_LINUX_CLUT224 is not set
83# CONFIG_LOGO_BLACKFIN_VGA16 is not set
84# CONFIG_HID_SUPPORT is not set
85CONFIG_USB_MUSB_HDRC=y
86CONFIG_USB_GADGET_MUSB_HDRC=y
87CONFIG_USB_GADGET=y
88CONFIG_USB_GADGET_VBUS_DRAW=500
89CONFIG_USB_G_SERIAL=y
90CONFIG_MMC=y
91CONFIG_MMC_SPI=y
92CONFIG_EXT2_FS=y
93# CONFIG_DNOTIFY is not set
94CONFIG_MSDOS_FS=y
95CONFIG_VFAT_FS=y
96CONFIG_NLS_CODEPAGE_437=y
97CONFIG_NLS_ISO8859_1=y
98CONFIG_DEBUG_KERNEL=y
99CONFIG_DETECT_HUNG_TASK=y
100# CONFIG_SCHED_DEBUG is not set
101# CONFIG_DEBUG_BUGVERBOSE is not set
102# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set
103CONFIG_EARLY_PRINTK=y
104CONFIG_CPLB_INFO=y
105CONFIG_CRC_CCITT=m
diff --git a/arch/blackfin/configs/BF527-EZKIT-V2_defconfig b/arch/blackfin/configs/BF527-EZKIT-V2_defconfig
index 4a9125558fcf..4faa6b46a352 100644
--- a/arch/blackfin/configs/BF527-EZKIT-V2_defconfig
+++ b/arch/blackfin/configs/BF527-EZKIT-V2_defconfig
@@ -20,6 +20,7 @@ CONFIG_MODULE_UNLOAD=y
20# CONFIG_LBDAF is not set 20# CONFIG_LBDAF is not set
21# CONFIG_BLK_DEV_BSG is not set 21# CONFIG_BLK_DEV_BSG is not set
22# CONFIG_IOSCHED_DEADLINE is not set 22# CONFIG_IOSCHED_DEADLINE is not set
23# CONFIG_IOSCHED_CFQ is not set
23CONFIG_PREEMPT_VOLUNTARY=y 24CONFIG_PREEMPT_VOLUNTARY=y
24CONFIG_BF527=y 25CONFIG_BF527=y
25CONFIG_BF_REV_0_2=y 26CONFIG_BF_REV_0_2=y
@@ -38,6 +39,7 @@ CONFIG_C_CDPRIO=y
38CONFIG_BANK_3=0x99B2 39CONFIG_BANK_3=0x99B2
39CONFIG_BINFMT_FLAT=y 40CONFIG_BINFMT_FLAT=y
40CONFIG_BINFMT_ZFLAT=y 41CONFIG_BINFMT_ZFLAT=y
42CONFIG_PM=y
41CONFIG_NET=y 43CONFIG_NET=y
42CONFIG_PACKET=y 44CONFIG_PACKET=y
43CONFIG_UNIX=y 45CONFIG_UNIX=y
@@ -181,6 +183,5 @@ CONFIG_DEBUG_DOUBLEFAULT=y
181CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE=y 183CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE=y
182CONFIG_EARLY_PRINTK=y 184CONFIG_EARLY_PRINTK=y
183CONFIG_CPLB_INFO=y 185CONFIG_CPLB_INFO=y
184CONFIG_SECURITY=y
185CONFIG_CRYPTO=y 186CONFIG_CRYPTO=y
186# CONFIG_CRYPTO_ANSI_CPRNG is not set 187# CONFIG_CRYPTO_ANSI_CPRNG is not set
diff --git a/arch/blackfin/configs/BF527-EZKIT_defconfig b/arch/blackfin/configs/BF527-EZKIT_defconfig
index 8ccf3cec7534..9d893eb68243 100644
--- a/arch/blackfin/configs/BF527-EZKIT_defconfig
+++ b/arch/blackfin/configs/BF527-EZKIT_defconfig
@@ -20,6 +20,7 @@ CONFIG_MODULE_UNLOAD=y
20# CONFIG_LBDAF is not set 20# CONFIG_LBDAF is not set
21# CONFIG_BLK_DEV_BSG is not set 21# CONFIG_BLK_DEV_BSG is not set
22# CONFIG_IOSCHED_DEADLINE is not set 22# CONFIG_IOSCHED_DEADLINE is not set
23# CONFIG_IOSCHED_CFQ is not set
23CONFIG_PREEMPT_VOLUNTARY=y 24CONFIG_PREEMPT_VOLUNTARY=y
24CONFIG_BF527=y 25CONFIG_BF527=y
25CONFIG_BF_REV_0_1=y 26CONFIG_BF_REV_0_1=y
@@ -37,6 +38,7 @@ CONFIG_C_CDPRIO=y
37CONFIG_BANK_3=0x99B2 38CONFIG_BANK_3=0x99B2
38CONFIG_BINFMT_FLAT=y 39CONFIG_BINFMT_FLAT=y
39CONFIG_BINFMT_ZFLAT=y 40CONFIG_BINFMT_ZFLAT=y
41CONFIG_PM=y
40CONFIG_NET=y 42CONFIG_NET=y
41CONFIG_PACKET=y 43CONFIG_PACKET=y
42CONFIG_UNIX=y 44CONFIG_UNIX=y
@@ -173,6 +175,5 @@ CONFIG_DEBUG_DOUBLEFAULT=y
173CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE=y 175CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE=y
174CONFIG_EARLY_PRINTK=y 176CONFIG_EARLY_PRINTK=y
175CONFIG_CPLB_INFO=y 177CONFIG_CPLB_INFO=y
176CONFIG_SECURITY=y
177CONFIG_CRYPTO=y 178CONFIG_CRYPTO=y
178# CONFIG_CRYPTO_ANSI_CPRNG is not set 179# CONFIG_CRYPTO_ANSI_CPRNG is not set
diff --git a/arch/blackfin/configs/BF527-TLL6527M_defconfig b/arch/blackfin/configs/BF527-TLL6527M_defconfig
new file mode 100644
index 000000000000..97a2767c80f8
--- /dev/null
+++ b/arch/blackfin/configs/BF527-TLL6527M_defconfig
@@ -0,0 +1,179 @@
1CONFIG_EXPERIMENTAL=y
2CONFIG_LOCALVERSION="DEV_0-1_pre2010"
3CONFIG_SYSVIPC=y
4CONFIG_IKCONFIG=y
5CONFIG_IKCONFIG_PROC=y
6CONFIG_LOG_BUF_SHIFT=14
7CONFIG_BLK_DEV_INITRD=y
8# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
9CONFIG_EMBEDDED=y
10# CONFIG_SYSCTL_SYSCALL is not set
11# CONFIG_ELF_CORE is not set
12# CONFIG_FUTEX is not set
13# CONFIG_SIGNALFD is not set
14# CONFIG_TIMERFD is not set
15# CONFIG_EVENTFD is not set
16# CONFIG_AIO is not set
17CONFIG_SLAB=y
18CONFIG_MMAP_ALLOW_UNINITIALIZED=y
19CONFIG_MODULES=y
20CONFIG_MODULE_UNLOAD=y
21# CONFIG_LBDAF is not set
22# CONFIG_BLK_DEV_BSG is not set
23# CONFIG_IOSCHED_DEADLINE is not set
24CONFIG_PREEMPT_VOLUNTARY=y
25CONFIG_BF527=y
26CONFIG_BF_REV_0_2=y
27CONFIG_BFIN527_TLL6527M=y
28CONFIG_BF527_UART1_PORTG=y
29CONFIG_IRQ_USB_INT0=11
30CONFIG_IRQ_USB_INT1=11
31CONFIG_IRQ_USB_INT2=11
32CONFIG_IRQ_USB_DMA=11
33CONFIG_BOOT_LOAD=0x400000
34# CONFIG_CYCLES_CLOCKSOURCE is not set
35# CONFIG_SCHEDULE_L1 is not set
36# CONFIG_MEMSET_L1 is not set
37# CONFIG_MEMCPY_L1 is not set
38# CONFIG_SYS_BFIN_SPINLOCK_L1 is not set
39CONFIG_NOMMU_INITIAL_TRIM_EXCESS=0
40CONFIG_BFIN_GPTIMERS=y
41CONFIG_DMA_UNCACHED_2M=y
42CONFIG_C_CDPRIO=y
43CONFIG_BANK_0=0xFFC2
44CONFIG_BANK_1=0xFFC2
45CONFIG_BANK_2=0xFFC2
46CONFIG_BANK_3=0xFFC2
47CONFIG_BINFMT_FLAT=y
48CONFIG_BINFMT_ZFLAT=y
49CONFIG_NET=y
50CONFIG_PACKET=y
51CONFIG_UNIX=y
52CONFIG_INET=y
53CONFIG_IP_PNP=y
54# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
55# CONFIG_INET_XFRM_MODE_TUNNEL is not set
56# CONFIG_INET_XFRM_MODE_BEET is not set
57# CONFIG_INET_LRO is not set
58# CONFIG_INET_DIAG is not set
59# CONFIG_IPV6 is not set
60CONFIG_IRDA=m
61CONFIG_IRLAN=m
62CONFIG_IRCOMM=m
63CONFIG_IRTTY_SIR=m
64CONFIG_BFIN_SIR=m
65CONFIG_BFIN_SIR0=y
66# CONFIG_WIRELESS is not set
67CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
68# CONFIG_FW_LOADER is not set
69CONFIG_MTD=y
70CONFIG_MTD_CHAR=y
71CONFIG_MTD_BLOCK=y
72CONFIG_MTD_CFI=y
73CONFIG_MTD_CFI_INTELEXT=y
74CONFIG_MTD_RAM=y
75CONFIG_MTD_ROM=y
76CONFIG_MTD_COMPLEX_MAPPINGS=y
77CONFIG_MTD_GPIO_ADDR=y
78CONFIG_BLK_DEV_RAM=y
79CONFIG_SCSI=y
80# CONFIG_SCSI_PROC_FS is not set
81CONFIG_BLK_DEV_SD=y
82CONFIG_BLK_DEV_SR=m
83# CONFIG_SCSI_LOWLEVEL is not set
84CONFIG_NETDEVICES=y
85CONFIG_NET_ETHERNET=y
86CONFIG_BFIN_MAC=y
87# CONFIG_NETDEV_1000 is not set
88# CONFIG_NETDEV_10000 is not set
89# CONFIG_WLAN is not set
90# CONFIG_INPUT_MOUSEDEV is not set
91CONFIG_INPUT_EVDEV=y
92# CONFIG_INPUT_KEYBOARD is not set
93# CONFIG_INPUT_MOUSE is not set
94CONFIG_INPUT_TOUCHSCREEN=y
95CONFIG_TOUCHSCREEN_AD7879=m
96CONFIG_INPUT_MISC=y
97CONFIG_INPUT_AD714X=y
98CONFIG_INPUT_ADXL34X=y
99# CONFIG_SERIO is not set
100CONFIG_BFIN_PPI=m
101CONFIG_BFIN_SIMPLE_TIMER=m
102CONFIG_BFIN_SPORT=m
103# CONFIG_CONSOLE_TRANSLATIONS is not set
104# CONFIG_DEVKMEM is not set
105CONFIG_BFIN_JTAG_COMM=m
106CONFIG_SERIAL_BFIN=y
107CONFIG_SERIAL_BFIN_CONSOLE=y
108CONFIG_SERIAL_BFIN_UART1=y
109# CONFIG_LEGACY_PTYS is not set
110# CONFIG_HW_RANDOM is not set
111CONFIG_I2C_CHARDEV=y
112# CONFIG_I2C_HELPER_AUTO is not set
113CONFIG_I2C_SMBUS=y
114CONFIG_I2C_BLACKFIN_TWI=y
115CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=100
116CONFIG_GPIOLIB=y
117CONFIG_GPIO_SYSFS=y
118# CONFIG_HWMON is not set
119CONFIG_WATCHDOG=y
120CONFIG_BFIN_WDT=y
121CONFIG_MEDIA_SUPPORT=y
122CONFIG_VIDEO_DEV=y
123# CONFIG_MEDIA_TUNER_CUSTOMISE is not set
124CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
125CONFIG_VIDEO_BLACKFIN_CAM=m
126CONFIG_OV9655=y
127CONFIG_FB=y
128CONFIG_BACKLIGHT_LCD_SUPPORT=y
129CONFIG_FRAMEBUFFER_CONSOLE=y
130CONFIG_FONTS=y
131CONFIG_FONT_6x11=y
132CONFIG_LOGO=y
133# CONFIG_LOGO_LINUX_MONO is not set
134# CONFIG_LOGO_LINUX_VGA16 is not set
135# CONFIG_LOGO_LINUX_CLUT224 is not set
136# CONFIG_LOGO_BLACKFIN_VGA16 is not set
137CONFIG_SOUND=y
138CONFIG_SND=y
139CONFIG_SND_MIXER_OSS=y
140CONFIG_SND_PCM_OSS=y
141CONFIG_SND_SOC=y
142CONFIG_SND_BF5XX_I2S=y
143CONFIG_SND_BF5XX_SOC_SSM2602=y
144# CONFIG_HID_SUPPORT is not set
145# CONFIG_USB_SUPPORT is not set
146CONFIG_MMC=m
147CONFIG_RTC_CLASS=y
148CONFIG_RTC_DRV_BFIN=y
149CONFIG_EXT2_FS=y
150# CONFIG_DNOTIFY is not set
151CONFIG_ISO9660_FS=m
152CONFIG_JOLIET=y
153CONFIG_UDF_FS=m
154CONFIG_MSDOS_FS=y
155CONFIG_VFAT_FS=y
156CONFIG_JFFS2_FS=y
157CONFIG_NFS_FS=m
158CONFIG_NFS_V3=y
159# CONFIG_RPCSEC_GSS_KRB5 is not set
160CONFIG_NLS_CODEPAGE_437=m
161CONFIG_NLS_CODEPAGE_936=m
162CONFIG_NLS_ISO8859_1=m
163CONFIG_NLS_UTF8=m
164CONFIG_DEBUG_KERNEL=y
165CONFIG_DEBUG_SHIRQ=y
166CONFIG_DETECT_HUNG_TASK=y
167CONFIG_DEBUG_INFO=y
168# CONFIG_RCU_CPU_STALL_DETECTOR is not set
169# CONFIG_FTRACE is not set
170CONFIG_DEBUG_MMRS=y
171CONFIG_DEBUG_HWERR=y
172CONFIG_EXACT_HWERR=y
173CONFIG_DEBUG_DOUBLEFAULT=y
174CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE=y
175CONFIG_EARLY_PRINTK=y
176CONFIG_CPLB_INFO=y
177CONFIG_CRYPTO=y
178# CONFIG_CRYPTO_ANSI_CPRNG is not set
179CONFIG_CRC7=m
diff --git a/arch/blackfin/configs/BF533-EZKIT_defconfig b/arch/blackfin/configs/BF533-EZKIT_defconfig
index c40e0f1c7eac..f84774360c5b 100644
--- a/arch/blackfin/configs/BF533-EZKIT_defconfig
+++ b/arch/blackfin/configs/BF533-EZKIT_defconfig
@@ -20,6 +20,7 @@ CONFIG_MODULE_UNLOAD=y
20# CONFIG_LBDAF is not set 20# CONFIG_LBDAF is not set
21# CONFIG_BLK_DEV_BSG is not set 21# CONFIG_BLK_DEV_BSG is not set
22# CONFIG_IOSCHED_DEADLINE is not set 22# CONFIG_IOSCHED_DEADLINE is not set
23# CONFIG_IOSCHED_CFQ is not set
23CONFIG_PREEMPT_VOLUNTARY=y 24CONFIG_PREEMPT_VOLUNTARY=y
24CONFIG_BFIN533_EZKIT=y 25CONFIG_BFIN533_EZKIT=y
25CONFIG_TIMER0=11 26CONFIG_TIMER0=11
@@ -107,6 +108,5 @@ CONFIG_DEBUG_DOUBLEFAULT=y
107CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE=y 108CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE=y
108CONFIG_EARLY_PRINTK=y 109CONFIG_EARLY_PRINTK=y
109CONFIG_CPLB_INFO=y 110CONFIG_CPLB_INFO=y
110CONFIG_SECURITY=y
111CONFIG_CRYPTO=y 111CONFIG_CRYPTO=y
112# CONFIG_CRYPTO_ANSI_CPRNG is not set 112# CONFIG_CRYPTO_ANSI_CPRNG is not set
diff --git a/arch/blackfin/configs/BF533-STAMP_defconfig b/arch/blackfin/configs/BF533-STAMP_defconfig
index aa8c1d7453ba..0e7262c04cc2 100644
--- a/arch/blackfin/configs/BF533-STAMP_defconfig
+++ b/arch/blackfin/configs/BF533-STAMP_defconfig
@@ -20,6 +20,7 @@ CONFIG_MODULE_UNLOAD=y
20# CONFIG_LBDAF is not set 20# CONFIG_LBDAF is not set
21# CONFIG_BLK_DEV_BSG is not set 21# CONFIG_BLK_DEV_BSG is not set
22# CONFIG_IOSCHED_DEADLINE is not set 22# CONFIG_IOSCHED_DEADLINE is not set
23# CONFIG_IOSCHED_CFQ is not set
23CONFIG_PREEMPT_VOLUNTARY=y 24CONFIG_PREEMPT_VOLUNTARY=y
24CONFIG_TIMER0=11 25CONFIG_TIMER0=11
25CONFIG_HIGH_RES_TIMERS=y 26CONFIG_HIGH_RES_TIMERS=y
@@ -121,6 +122,5 @@ CONFIG_DEBUG_DOUBLEFAULT=y
121CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE=y 122CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE=y
122CONFIG_EARLY_PRINTK=y 123CONFIG_EARLY_PRINTK=y
123CONFIG_CPLB_INFO=y 124CONFIG_CPLB_INFO=y
124CONFIG_SECURITY=y
125CONFIG_CRYPTO=y 125CONFIG_CRYPTO=y
126# CONFIG_CRYPTO_ANSI_CPRNG is not set 126# CONFIG_CRYPTO_ANSI_CPRNG is not set
diff --git a/arch/blackfin/configs/BF537-STAMP_defconfig b/arch/blackfin/configs/BF537-STAMP_defconfig
index f245c0b427e4..4d14a002e7bd 100644
--- a/arch/blackfin/configs/BF537-STAMP_defconfig
+++ b/arch/blackfin/configs/BF537-STAMP_defconfig
@@ -20,9 +20,9 @@ CONFIG_MODULE_UNLOAD=y
20# CONFIG_LBDAF is not set 20# CONFIG_LBDAF is not set
21# CONFIG_BLK_DEV_BSG is not set 21# CONFIG_BLK_DEV_BSG is not set
22# CONFIG_IOSCHED_DEADLINE is not set 22# CONFIG_IOSCHED_DEADLINE is not set
23# CONFIG_IOSCHED_CFQ is not set
23CONFIG_PREEMPT_VOLUNTARY=y 24CONFIG_PREEMPT_VOLUNTARY=y
24CONFIG_BF537=y 25CONFIG_BF537=y
25CONFIG_IRQ_ERROR=11
26CONFIG_HIGH_RES_TIMERS=y 26CONFIG_HIGH_RES_TIMERS=y
27CONFIG_NOMMU_INITIAL_TRIM_EXCESS=0 27CONFIG_NOMMU_INITIAL_TRIM_EXCESS=0
28CONFIG_BFIN_GPTIMERS=m 28CONFIG_BFIN_GPTIMERS=m
@@ -133,6 +133,5 @@ CONFIG_DEBUG_DOUBLEFAULT=y
133CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE=y 133CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE=y
134CONFIG_EARLY_PRINTK=y 134CONFIG_EARLY_PRINTK=y
135CONFIG_CPLB_INFO=y 135CONFIG_CPLB_INFO=y
136CONFIG_SECURITY=y
137CONFIG_CRYPTO=y 136CONFIG_CRYPTO=y
138# CONFIG_CRYPTO_ANSI_CPRNG is not set 137# CONFIG_CRYPTO_ANSI_CPRNG is not set
diff --git a/arch/blackfin/configs/BF538-EZKIT_defconfig b/arch/blackfin/configs/BF538-EZKIT_defconfig
index 74a330cca9b4..fbee9d776f56 100644
--- a/arch/blackfin/configs/BF538-EZKIT_defconfig
+++ b/arch/blackfin/configs/BF538-EZKIT_defconfig
@@ -20,6 +20,7 @@ CONFIG_MODULE_UNLOAD=y
20# CONFIG_LBDAF is not set 20# CONFIG_LBDAF is not set
21# CONFIG_BLK_DEV_BSG is not set 21# CONFIG_BLK_DEV_BSG is not set
22# CONFIG_IOSCHED_DEADLINE is not set 22# CONFIG_IOSCHED_DEADLINE is not set
23# CONFIG_IOSCHED_CFQ is not set
23CONFIG_PREEMPT_VOLUNTARY=y 24CONFIG_PREEMPT_VOLUNTARY=y
24CONFIG_BF538=y 25CONFIG_BF538=y
25CONFIG_IRQ_TIMER0=12 26CONFIG_IRQ_TIMER0=12
@@ -31,6 +32,7 @@ CONFIG_C_CDPRIO=y
31CONFIG_BANK_3=0x99B2 32CONFIG_BANK_3=0x99B2
32CONFIG_BINFMT_FLAT=y 33CONFIG_BINFMT_FLAT=y
33CONFIG_BINFMT_ZFLAT=y 34CONFIG_BINFMT_ZFLAT=y
35CONFIG_PM=y
34CONFIG_NET=y 36CONFIG_NET=y
35CONFIG_PACKET=y 37CONFIG_PACKET=y
36CONFIG_UNIX=y 38CONFIG_UNIX=y
@@ -129,6 +131,5 @@ CONFIG_DEBUG_DOUBLEFAULT=y
129CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE=y 131CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE=y
130CONFIG_EARLY_PRINTK=y 132CONFIG_EARLY_PRINTK=y
131CONFIG_CPLB_INFO=y 133CONFIG_CPLB_INFO=y
132CONFIG_SECURITY=y
133CONFIG_CRYPTO=y 134CONFIG_CRYPTO=y
134# CONFIG_CRYPTO_ANSI_CPRNG is not set 135# CONFIG_CRYPTO_ANSI_CPRNG is not set
diff --git a/arch/blackfin/configs/BF548-EZKIT_defconfig b/arch/blackfin/configs/BF548-EZKIT_defconfig
index 29373cbba227..05dd11db2f7d 100644
--- a/arch/blackfin/configs/BF548-EZKIT_defconfig
+++ b/arch/blackfin/configs/BF548-EZKIT_defconfig
@@ -40,6 +40,7 @@ CONFIG_EBIU_MODEVAL=0x1
40CONFIG_EBIU_FCTLVAL=0x6 40CONFIG_EBIU_FCTLVAL=0x6
41CONFIG_BINFMT_FLAT=y 41CONFIG_BINFMT_FLAT=y
42CONFIG_BINFMT_ZFLAT=y 42CONFIG_BINFMT_ZFLAT=y
43CONFIG_PM=y
43CONFIG_NET=y 44CONFIG_NET=y
44CONFIG_PACKET=y 45CONFIG_PACKET=y
45CONFIG_UNIX=y 46CONFIG_UNIX=y
@@ -62,7 +63,7 @@ CONFIG_IRCOMM=m
62CONFIG_IRTTY_SIR=m 63CONFIG_IRTTY_SIR=m
63CONFIG_BFIN_SIR=m 64CONFIG_BFIN_SIR=m
64CONFIG_BFIN_SIR3=y 65CONFIG_BFIN_SIR3=y
65CONFIG_LIB80211=m 66# CONFIG_WIRELESS is not set
66CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 67CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
67CONFIG_FW_LOADER=m 68CONFIG_FW_LOADER=m
68CONFIG_MTD=y 69CONFIG_MTD=y
@@ -92,6 +93,7 @@ CONFIG_NET_ETHERNET=y
92CONFIG_SMSC911X=y 93CONFIG_SMSC911X=y
93# CONFIG_NETDEV_1000 is not set 94# CONFIG_NETDEV_1000 is not set
94# CONFIG_NETDEV_10000 is not set 95# CONFIG_NETDEV_10000 is not set
96# CONFIG_WLAN is not set
95CONFIG_INPUT_FF_MEMLESS=m 97CONFIG_INPUT_FF_MEMLESS=m
96# CONFIG_INPUT_MOUSEDEV is not set 98# CONFIG_INPUT_MOUSEDEV is not set
97CONFIG_INPUT_EVDEV=m 99CONFIG_INPUT_EVDEV=m
diff --git a/arch/blackfin/configs/BF561-ACVILON_defconfig b/arch/blackfin/configs/BF561-ACVILON_defconfig
index 1f12034f5610..bcb14d1c5664 100644
--- a/arch/blackfin/configs/BF561-ACVILON_defconfig
+++ b/arch/blackfin/configs/BF561-ACVILON_defconfig
@@ -14,6 +14,7 @@ CONFIG_EMBEDDED=y
14# CONFIG_EVENTFD is not set 14# CONFIG_EVENTFD is not set
15# CONFIG_AIO is not set 15# CONFIG_AIO is not set
16CONFIG_SLAB=y 16CONFIG_SLAB=y
17CONFIG_MMAP_ALLOW_UNINITIALIZED=y
17CONFIG_MODULES=y 18CONFIG_MODULES=y
18CONFIG_MODULE_UNLOAD=y 19CONFIG_MODULE_UNLOAD=y
19# CONFIG_LBDAF is not set 20# CONFIG_LBDAF is not set
@@ -44,6 +45,7 @@ CONFIG_IP_PNP=y
44CONFIG_SYN_COOKIES=y 45CONFIG_SYN_COOKIES=y
45# CONFIG_INET_LRO is not set 46# CONFIG_INET_LRO is not set
46# CONFIG_IPV6 is not set 47# CONFIG_IPV6 is not set
48# CONFIG_WIRELESS is not set
47CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 49CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
48# CONFIG_FW_LOADER is not set 50# CONFIG_FW_LOADER is not set
49CONFIG_MTD=y 51CONFIG_MTD=y
@@ -71,6 +73,7 @@ CONFIG_NET_ETHERNET=y
71CONFIG_SMSC911X=y 73CONFIG_SMSC911X=y
72# CONFIG_NETDEV_1000 is not set 74# CONFIG_NETDEV_1000 is not set
73# CONFIG_NETDEV_10000 is not set 75# CONFIG_NETDEV_10000 is not set
76# CONFIG_WLAN is not set
74# CONFIG_INPUT is not set 77# CONFIG_INPUT is not set
75# CONFIG_SERIO is not set 78# CONFIG_SERIO is not set
76# CONFIG_VT is not set 79# CONFIG_VT is not set
@@ -147,5 +150,4 @@ CONFIG_DEBUG_INFO=y
147CONFIG_DEBUG_MMRS=y 150CONFIG_DEBUG_MMRS=y
148# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set 151# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set
149CONFIG_CPLB_INFO=y 152CONFIG_CPLB_INFO=y
150CONFIG_SECURITY=y
151# CONFIG_CRYPTO_ANSI_CPRNG is not set 153# CONFIG_CRYPTO_ANSI_CPRNG is not set
diff --git a/arch/blackfin/configs/BF561-EZKIT_defconfig b/arch/blackfin/configs/BF561-EZKIT_defconfig
index 8913d997fa47..843aaa54a9e3 100644
--- a/arch/blackfin/configs/BF561-EZKIT_defconfig
+++ b/arch/blackfin/configs/BF561-EZKIT_defconfig
@@ -35,6 +35,7 @@ CONFIG_C_CDPRIO=y
35CONFIG_BANK_3=0xAAC2 35CONFIG_BANK_3=0xAAC2
36CONFIG_BINFMT_FLAT=y 36CONFIG_BINFMT_FLAT=y
37CONFIG_BINFMT_ZFLAT=y 37CONFIG_BINFMT_ZFLAT=y
38CONFIG_PM=y
38CONFIG_NET=y 39CONFIG_NET=y
39CONFIG_PACKET=y 40CONFIG_PACKET=y
40CONFIG_UNIX=y 41CONFIG_UNIX=y
diff --git a/arch/blackfin/configs/BlackStamp_defconfig b/arch/blackfin/configs/BlackStamp_defconfig
index 0242917b69c9..dae7adf3b2a2 100644
--- a/arch/blackfin/configs/BlackStamp_defconfig
+++ b/arch/blackfin/configs/BlackStamp_defconfig
@@ -40,6 +40,7 @@ CONFIG_INET=y
40CONFIG_IP_PNP=y 40CONFIG_IP_PNP=y
41# CONFIG_INET_LRO is not set 41# CONFIG_INET_LRO is not set
42# CONFIG_IPV6 is not set 42# CONFIG_IPV6 is not set
43# CONFIG_WIRELESS is not set
43CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 44CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
44# CONFIG_FW_LOADER is not set 45# CONFIG_FW_LOADER is not set
45CONFIG_MTD=y 46CONFIG_MTD=y
@@ -63,6 +64,7 @@ CONFIG_NET_ETHERNET=y
63CONFIG_SMC91X=y 64CONFIG_SMC91X=y
64# CONFIG_NETDEV_1000 is not set 65# CONFIG_NETDEV_1000 is not set
65# CONFIG_NETDEV_10000 is not set 66# CONFIG_NETDEV_10000 is not set
67# CONFIG_WLAN is not set
66# CONFIG_INPUT_MOUSEDEV is not set 68# CONFIG_INPUT_MOUSEDEV is not set
67CONFIG_INPUT_EVDEV=m 69CONFIG_INPUT_EVDEV=m
68# CONFIG_INPUT_KEYBOARD is not set 70# CONFIG_INPUT_KEYBOARD is not set
@@ -104,5 +106,4 @@ CONFIG_DEBUG_MMRS=y
104# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set 106# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set
105CONFIG_EARLY_PRINTK=y 107CONFIG_EARLY_PRINTK=y
106CONFIG_CPLB_INFO=y 108CONFIG_CPLB_INFO=y
107CONFIG_SECURITY=y
108CONFIG_CRC_CCITT=m 109CONFIG_CRC_CCITT=m
diff --git a/arch/blackfin/configs/CM-BF527_defconfig b/arch/blackfin/configs/CM-BF527_defconfig
index 0512fef3d55a..f3414244bfed 100644
--- a/arch/blackfin/configs/CM-BF527_defconfig
+++ b/arch/blackfin/configs/CM-BF527_defconfig
@@ -50,6 +50,7 @@ CONFIG_IP_PNP=y
50# CONFIG_INET_LRO is not set 50# CONFIG_INET_LRO is not set
51# CONFIG_INET_DIAG is not set 51# CONFIG_INET_DIAG is not set
52# CONFIG_IPV6 is not set 52# CONFIG_IPV6 is not set
53# CONFIG_WIRELESS is not set
53CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 54CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
54# CONFIG_FW_LOADER is not set 55# CONFIG_FW_LOADER is not set
55CONFIG_MTD=y 56CONFIG_MTD=y
@@ -70,9 +71,9 @@ CONFIG_BLK_DEV_SD=y
70CONFIG_NETDEVICES=y 71CONFIG_NETDEVICES=y
71CONFIG_NET_ETHERNET=y 72CONFIG_NET_ETHERNET=y
72CONFIG_BFIN_MAC=y 73CONFIG_BFIN_MAC=y
73CONFIG_BFIN_MAC_RMII=y
74# CONFIG_NETDEV_1000 is not set 74# CONFIG_NETDEV_1000 is not set
75# CONFIG_NETDEV_10000 is not set 75# CONFIG_NETDEV_10000 is not set
76# CONFIG_WLAN is not set
76# CONFIG_INPUT is not set 77# CONFIG_INPUT is not set
77# CONFIG_SERIO is not set 78# CONFIG_SERIO is not set
78# CONFIG_VT is not set 79# CONFIG_VT is not set
@@ -124,7 +125,6 @@ CONFIG_DEBUG_FS=y
124# CONFIG_RCU_CPU_STALL_DETECTOR is not set 125# CONFIG_RCU_CPU_STALL_DETECTOR is not set
125# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set 126# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set
126CONFIG_EARLY_PRINTK=y 127CONFIG_EARLY_PRINTK=y
127CONFIG_SECURITY=y
128CONFIG_CRYPTO=y 128CONFIG_CRYPTO=y
129# CONFIG_CRYPTO_ANSI_CPRNG is not set 129# CONFIG_CRYPTO_ANSI_CPRNG is not set
130CONFIG_CRC_CCITT=m 130CONFIG_CRC_CCITT=m
diff --git a/arch/blackfin/configs/CM-BF533_defconfig b/arch/blackfin/configs/CM-BF533_defconfig
index 05e09be8b4c5..8c7e08f173d4 100644
--- a/arch/blackfin/configs/CM-BF533_defconfig
+++ b/arch/blackfin/configs/CM-BF533_defconfig
@@ -33,6 +33,7 @@ CONFIG_BINFMT_SHARED_FLAT=y
33CONFIG_NET=y 33CONFIG_NET=y
34CONFIG_PACKET=y 34CONFIG_PACKET=y
35CONFIG_UNIX=y 35CONFIG_UNIX=y
36# CONFIG_WIRELESS is not set
36CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 37CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
37CONFIG_MTD=y 38CONFIG_MTD=y
38CONFIG_MTD_PARTITIONS=y 39CONFIG_MTD_PARTITIONS=y
@@ -47,6 +48,7 @@ CONFIG_MTD_PHYSMAP=y
47CONFIG_NETDEVICES=y 48CONFIG_NETDEVICES=y
48# CONFIG_NETDEV_1000 is not set 49# CONFIG_NETDEV_1000 is not set
49# CONFIG_NETDEV_10000 is not set 50# CONFIG_NETDEV_10000 is not set
51# CONFIG_WLAN is not set
50# CONFIG_INPUT is not set 52# CONFIG_INPUT is not set
51# CONFIG_SERIO is not set 53# CONFIG_SERIO is not set
52# CONFIG_VT is not set 54# CONFIG_VT is not set
@@ -72,7 +74,6 @@ CONFIG_DEBUG_MMRS=y
72# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set 74# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set
73CONFIG_EARLY_PRINTK=y 75CONFIG_EARLY_PRINTK=y
74CONFIG_CPLB_INFO=y 76CONFIG_CPLB_INFO=y
75CONFIG_SECURITY=y
76CONFIG_CRC_CCITT=y 77CONFIG_CRC_CCITT=y
77CONFIG_CRC_ITU_T=y 78CONFIG_CRC_ITU_T=y
78CONFIG_CRC7=y 79CONFIG_CRC7=y
diff --git a/arch/blackfin/configs/CM-BF537E_defconfig b/arch/blackfin/configs/CM-BF537E_defconfig
index d2eb5325b9c3..bd3cb766d078 100644
--- a/arch/blackfin/configs/CM-BF537E_defconfig
+++ b/arch/blackfin/configs/CM-BF537E_defconfig
@@ -48,6 +48,7 @@ CONFIG_IP_PNP=y
48# CONFIG_INET_LRO is not set 48# CONFIG_INET_LRO is not set
49# CONFIG_INET_DIAG is not set 49# CONFIG_INET_DIAG is not set
50# CONFIG_IPV6 is not set 50# CONFIG_IPV6 is not set
51# CONFIG_WIRELESS is not set
51CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 52CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
52CONFIG_MTD=y 53CONFIG_MTD=y
53CONFIG_MTD_CMDLINE_PARTS=y 54CONFIG_MTD_CMDLINE_PARTS=y
@@ -65,6 +66,7 @@ CONFIG_NET_ETHERNET=y
65CONFIG_BFIN_MAC=y 66CONFIG_BFIN_MAC=y
66# CONFIG_NETDEV_1000 is not set 67# CONFIG_NETDEV_1000 is not set
67# CONFIG_NETDEV_10000 is not set 68# CONFIG_NETDEV_10000 is not set
69# CONFIG_WLAN is not set
68# CONFIG_INPUT is not set 70# CONFIG_INPUT is not set
69# CONFIG_SERIO is not set 71# CONFIG_SERIO is not set
70# CONFIG_VT is not set 72# CONFIG_VT is not set
@@ -99,7 +101,6 @@ CONFIG_DEBUG_MMRS=y
99# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set 101# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set
100CONFIG_EARLY_PRINTK=y 102CONFIG_EARLY_PRINTK=y
101CONFIG_CPLB_INFO=y 103CONFIG_CPLB_INFO=y
102CONFIG_SECURITY=y
103CONFIG_CRYPTO=y 104CONFIG_CRYPTO=y
104# CONFIG_CRYPTO_ANSI_CPRNG is not set 105# CONFIG_CRYPTO_ANSI_CPRNG is not set
105CONFIG_CRC_CCITT=m 106CONFIG_CRC_CCITT=m
diff --git a/arch/blackfin/configs/CM-BF537U_defconfig b/arch/blackfin/configs/CM-BF537U_defconfig
index 9d52c443eb09..82224f37c04e 100644
--- a/arch/blackfin/configs/CM-BF537U_defconfig
+++ b/arch/blackfin/configs/CM-BF537U_defconfig
@@ -44,6 +44,7 @@ CONFIG_INET=y
44# CONFIG_INET_XFRM_MODE_BEET is not set 44# CONFIG_INET_XFRM_MODE_BEET is not set
45# CONFIG_INET_DIAG is not set 45# CONFIG_INET_DIAG is not set
46# CONFIG_IPV6 is not set 46# CONFIG_IPV6 is not set
47# CONFIG_WIRELESS is not set
47CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 48CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
48CONFIG_MTD=y 49CONFIG_MTD=y
49CONFIG_MTD_CMDLINE_PARTS=y 50CONFIG_MTD_CMDLINE_PARTS=y
@@ -59,6 +60,7 @@ CONFIG_BLK_DEV_RAM=y
59CONFIG_NETDEVICES=y 60CONFIG_NETDEVICES=y
60# CONFIG_NETDEV_1000 is not set 61# CONFIG_NETDEV_1000 is not set
61# CONFIG_NETDEV_10000 is not set 62# CONFIG_NETDEV_10000 is not set
63# CONFIG_WLAN is not set
62# CONFIG_INPUT is not set 64# CONFIG_INPUT is not set
63# CONFIG_SERIO is not set 65# CONFIG_SERIO is not set
64# CONFIG_VT is not set 66# CONFIG_VT is not set
@@ -90,7 +92,6 @@ CONFIG_DEBUG_MMRS=y
90# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set 92# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set
91CONFIG_EARLY_PRINTK=y 93CONFIG_EARLY_PRINTK=y
92CONFIG_CPLB_INFO=y 94CONFIG_CPLB_INFO=y
93CONFIG_SECURITY=y
94CONFIG_CRC_CCITT=m 95CONFIG_CRC_CCITT=m
95CONFIG_CRC_ITU_T=y 96CONFIG_CRC_ITU_T=y
96CONFIG_CRC7=y 97CONFIG_CRC7=y
diff --git a/arch/blackfin/configs/CM-BF548_defconfig b/arch/blackfin/configs/CM-BF548_defconfig
index 9de13cf2cdda..433598c6e773 100644
--- a/arch/blackfin/configs/CM-BF548_defconfig
+++ b/arch/blackfin/configs/CM-BF548_defconfig
@@ -49,6 +49,7 @@ CONFIG_INET_XFRM_MODE_BEET=m
49# CONFIG_INET_LRO is not set 49# CONFIG_INET_LRO is not set
50# CONFIG_INET_DIAG is not set 50# CONFIG_INET_DIAG is not set
51# CONFIG_IPV6 is not set 51# CONFIG_IPV6 is not set
52# CONFIG_WIRELESS is not set
52CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 53CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
53# CONFIG_FW_LOADER is not set 54# CONFIG_FW_LOADER is not set
54CONFIG_MTD=y 55CONFIG_MTD=y
@@ -71,6 +72,7 @@ CONFIG_NET_ETHERNET=y
71CONFIG_SMSC911X=y 72CONFIG_SMSC911X=y
72# CONFIG_NETDEV_1000 is not set 73# CONFIG_NETDEV_1000 is not set
73# CONFIG_NETDEV_10000 is not set 74# CONFIG_NETDEV_10000 is not set
75# CONFIG_WLAN is not set
74# CONFIG_INPUT_MOUSEDEV is not set 76# CONFIG_INPUT_MOUSEDEV is not set
75CONFIG_INPUT_EVDEV=m 77CONFIG_INPUT_EVDEV=m
76CONFIG_INPUT_EVBUG=m 78CONFIG_INPUT_EVBUG=m
@@ -167,7 +169,6 @@ CONFIG_DEBUG_FS=y
167# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set 169# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set
168CONFIG_EARLY_PRINTK=y 170CONFIG_EARLY_PRINTK=y
169CONFIG_CPLB_INFO=y 171CONFIG_CPLB_INFO=y
170CONFIG_SECURITY=y
171# CONFIG_CRYPTO_ANSI_CPRNG is not set 172# CONFIG_CRYPTO_ANSI_CPRNG is not set
172# CONFIG_CRYPTO_HW is not set 173# CONFIG_CRYPTO_HW is not set
173CONFIG_CRC_CCITT=m 174CONFIG_CRC_CCITT=m
diff --git a/arch/blackfin/configs/CM-BF561_defconfig b/arch/blackfin/configs/CM-BF561_defconfig
index 238353a53bf0..ded7d845cb39 100644
--- a/arch/blackfin/configs/CM-BF561_defconfig
+++ b/arch/blackfin/configs/CM-BF561_defconfig
@@ -48,6 +48,7 @@ CONFIG_INET=y
48# CONFIG_INET_LRO is not set 48# CONFIG_INET_LRO is not set
49# CONFIG_INET_DIAG is not set 49# CONFIG_INET_DIAG is not set
50# CONFIG_IPV6 is not set 50# CONFIG_IPV6 is not set
51# CONFIG_WIRELESS is not set
51CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 52CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
52CONFIG_MTD=y 53CONFIG_MTD=y
53CONFIG_MTD_PARTITIONS=y 54CONFIG_MTD_PARTITIONS=y
@@ -67,6 +68,7 @@ CONFIG_MII=y
67CONFIG_SMSC911X=m 68CONFIG_SMSC911X=m
68# CONFIG_NETDEV_1000 is not set 69# CONFIG_NETDEV_1000 is not set
69# CONFIG_NETDEV_10000 is not set 70# CONFIG_NETDEV_10000 is not set
71# CONFIG_WLAN is not set
70# CONFIG_INPUT is not set 72# CONFIG_INPUT is not set
71# CONFIG_SERIO is not set 73# CONFIG_SERIO is not set
72# CONFIG_VT is not set 74# CONFIG_VT is not set
@@ -99,7 +101,6 @@ CONFIG_DEBUG_MMRS=y
99# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set 101# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set
100CONFIG_EARLY_PRINTK=y 102CONFIG_EARLY_PRINTK=y
101CONFIG_CPLB_INFO=y 103CONFIG_CPLB_INFO=y
102CONFIG_SECURITY=y
103CONFIG_CRC_CCITT=m 104CONFIG_CRC_CCITT=m
104CONFIG_CRC_ITU_T=y 105CONFIG_CRC_ITU_T=y
105CONFIG_CRC7=y 106CONFIG_CRC7=y
diff --git a/arch/blackfin/configs/H8606_defconfig b/arch/blackfin/configs/H8606_defconfig
index 0cb524e8947f..700fb701c121 100644
--- a/arch/blackfin/configs/H8606_defconfig
+++ b/arch/blackfin/configs/H8606_defconfig
@@ -33,6 +33,7 @@ CONFIG_IRLAN=m
33CONFIG_IRCOMM=m 33CONFIG_IRCOMM=m
34CONFIG_IRDA_CACHE_LAST_LSAP=y 34CONFIG_IRDA_CACHE_LAST_LSAP=y
35CONFIG_IRTTY_SIR=m 35CONFIG_IRTTY_SIR=m
36# CONFIG_WIRELESS is not set
36# CONFIG_FW_LOADER is not set 37# CONFIG_FW_LOADER is not set
37CONFIG_MTD=y 38CONFIG_MTD=y
38CONFIG_MTD_PARTITIONS=y 39CONFIG_MTD_PARTITIONS=y
@@ -50,6 +51,7 @@ CONFIG_NET_ETHERNET=y
50CONFIG_DM9000=y 51CONFIG_DM9000=y
51# CONFIG_NETDEV_1000 is not set 52# CONFIG_NETDEV_1000 is not set
52# CONFIG_NETDEV_10000 is not set 53# CONFIG_NETDEV_10000 is not set
54# CONFIG_WLAN is not set
53# CONFIG_INPUT_MOUSEDEV is not set 55# CONFIG_INPUT_MOUSEDEV is not set
54CONFIG_INPUT_EVDEV=y 56CONFIG_INPUT_EVDEV=y
55# CONFIG_KEYBOARD_ATKBD is not set 57# CONFIG_KEYBOARD_ATKBD is not set
@@ -84,4 +86,3 @@ CONFIG_NFS_V3=y
84CONFIG_NLS=m 86CONFIG_NLS=m
85# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set 87# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set
86CONFIG_CPLB_INFO=y 88CONFIG_CPLB_INFO=y
87CONFIG_SECURITY=y
diff --git a/arch/blackfin/configs/IP0X_defconfig b/arch/blackfin/configs/IP0X_defconfig
index 2a3411ef19fd..b40156d217e3 100644
--- a/arch/blackfin/configs/IP0X_defconfig
+++ b/arch/blackfin/configs/IP0X_defconfig
@@ -41,6 +41,7 @@ CONFIG_IP_NF_IPTABLES=y
41CONFIG_IP_NF_FILTER=y 41CONFIG_IP_NF_FILTER=y
42CONFIG_IP_NF_TARGET_REJECT=y 42CONFIG_IP_NF_TARGET_REJECT=y
43CONFIG_IP_NF_MANGLE=y 43CONFIG_IP_NF_MANGLE=y
44# CONFIG_WIRELESS is not set
44CONFIG_MTD=y 45CONFIG_MTD=y
45CONFIG_MTD_PARTITIONS=y 46CONFIG_MTD_PARTITIONS=y
46CONFIG_MTD_CHAR=y 47CONFIG_MTD_CHAR=y
@@ -60,6 +61,7 @@ CONFIG_NET_ETHERNET=y
60CONFIG_DM9000=y 61CONFIG_DM9000=y
61# CONFIG_NETDEV_1000 is not set 62# CONFIG_NETDEV_1000 is not set
62# CONFIG_NETDEV_10000 is not set 63# CONFIG_NETDEV_10000 is not set
64# CONFIG_WLAN is not set
63# CONFIG_INPUT is not set 65# CONFIG_INPUT is not set
64# CONFIG_SERIO is not set 66# CONFIG_SERIO is not set
65# CONFIG_VT is not set 67# CONFIG_VT is not set
@@ -89,5 +91,4 @@ CONFIG_NLS_CODEPAGE_437=y
89CONFIG_NLS_ISO8859_1=y 91CONFIG_NLS_ISO8859_1=y
90# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set 92# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set
91CONFIG_CPLB_INFO=y 93CONFIG_CPLB_INFO=y
92CONFIG_SECURITY=y
93CONFIG_CRC_CCITT=y 94CONFIG_CRC_CCITT=y
diff --git a/arch/blackfin/configs/PNAV-10_defconfig b/arch/blackfin/configs/PNAV-10_defconfig
index fea303386548..be866d95ed76 100644
--- a/arch/blackfin/configs/PNAV-10_defconfig
+++ b/arch/blackfin/configs/PNAV-10_defconfig
@@ -14,6 +14,7 @@ CONFIG_MODULE_UNLOAD=y
14# CONFIG_LBDAF is not set 14# CONFIG_LBDAF is not set
15# CONFIG_BLK_DEV_BSG is not set 15# CONFIG_BLK_DEV_BSG is not set
16# CONFIG_IOSCHED_DEADLINE is not set 16# CONFIG_IOSCHED_DEADLINE is not set
17# CONFIG_IOSCHED_CFQ is not set
17CONFIG_PREEMPT_VOLUNTARY=y 18CONFIG_PREEMPT_VOLUNTARY=y
18CONFIG_BF537=y 19CONFIG_BF537=y
19CONFIG_IRQ_TIMER0=12 20CONFIG_IRQ_TIMER0=12
@@ -107,7 +108,6 @@ CONFIG_SMB_FS=m
107# CONFIG_DEBUG_HUNT_FOR_ZERO is not set 108# CONFIG_DEBUG_HUNT_FOR_ZERO is not set
108# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set 109# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set
109# CONFIG_ACCESS_CHECK is not set 110# CONFIG_ACCESS_CHECK is not set
110CONFIG_SECURITY=y
111CONFIG_CRYPTO=y 111CONFIG_CRYPTO=y
112# CONFIG_CRYPTO_ANSI_CPRNG is not set 112# CONFIG_CRYPTO_ANSI_CPRNG is not set
113CONFIG_CRC_CCITT=m 113CONFIG_CRC_CCITT=m
diff --git a/arch/blackfin/configs/SRV1_defconfig b/arch/blackfin/configs/SRV1_defconfig
index 9811b3186847..b64bdf759b82 100644
--- a/arch/blackfin/configs/SRV1_defconfig
+++ b/arch/blackfin/configs/SRV1_defconfig
@@ -35,6 +35,7 @@ CONFIG_IRLAN=m
35CONFIG_IRCOMM=m 35CONFIG_IRCOMM=m
36CONFIG_IRDA_CACHE_LAST_LSAP=y 36CONFIG_IRDA_CACHE_LAST_LSAP=y
37CONFIG_IRTTY_SIR=m 37CONFIG_IRTTY_SIR=m
38# CONFIG_WIRELESS is not set
38# CONFIG_FW_LOADER is not set 39# CONFIG_FW_LOADER is not set
39CONFIG_MTD=y 40CONFIG_MTD=y
40CONFIG_MTD_PARTITIONS=y 41CONFIG_MTD_PARTITIONS=y
@@ -51,6 +52,7 @@ CONFIG_EEPROM_AT25=m
51CONFIG_NETDEVICES=y 52CONFIG_NETDEVICES=y
52# CONFIG_NETDEV_1000 is not set 53# CONFIG_NETDEV_1000 is not set
53# CONFIG_NETDEV_10000 is not set 54# CONFIG_NETDEV_10000 is not set
55# CONFIG_WLAN is not set
54# CONFIG_INPUT_MOUSEDEV is not set 56# CONFIG_INPUT_MOUSEDEV is not set
55CONFIG_INPUT_EVDEV=m 57CONFIG_INPUT_EVDEV=m
56# CONFIG_INPUT_KEYBOARD is not set 58# CONFIG_INPUT_KEYBOARD is not set
@@ -85,4 +87,3 @@ CONFIG_DEBUG_KERNEL=y
85CONFIG_DEBUG_INFO=y 87CONFIG_DEBUG_INFO=y
86# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set 88# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set
87CONFIG_CPLB_INFO=y 89CONFIG_CPLB_INFO=y
88CONFIG_SECURITY=y
diff --git a/arch/blackfin/configs/TCM-BF518_defconfig b/arch/blackfin/configs/TCM-BF518_defconfig
index 412bf79b9724..1bccd9a50986 100644
--- a/arch/blackfin/configs/TCM-BF518_defconfig
+++ b/arch/blackfin/configs/TCM-BF518_defconfig
@@ -128,7 +128,6 @@ CONFIG_DEBUG_DOUBLEFAULT=y
128CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE=y 128CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE=y
129CONFIG_EARLY_PRINTK=y 129CONFIG_EARLY_PRINTK=y
130CONFIG_CPLB_INFO=y 130CONFIG_CPLB_INFO=y
131CONFIG_SECURITY=y
132CONFIG_CRYPTO=y 131CONFIG_CRYPTO=y
133# CONFIG_CRYPTO_ANSI_CPRNG is not set 132# CONFIG_CRYPTO_ANSI_CPRNG is not set
134CONFIG_CRC_CCITT=m 133CONFIG_CRC_CCITT=m
diff --git a/arch/blackfin/configs/TCM-BF537_defconfig b/arch/blackfin/configs/TCM-BF537_defconfig
index 04bf52c4cf12..00ce899e9e5d 100644
--- a/arch/blackfin/configs/TCM-BF537_defconfig
+++ b/arch/blackfin/configs/TCM-BF537_defconfig
@@ -40,6 +40,7 @@ CONFIG_UNIX=y
40CONFIG_INET=y 40CONFIG_INET=y
41# CONFIG_INET_DIAG is not set 41# CONFIG_INET_DIAG is not set
42# CONFIG_IPV6 is not set 42# CONFIG_IPV6 is not set
43# CONFIG_WIRELESS is not set
43CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 44CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
44CONFIG_MTD=y 45CONFIG_MTD=y
45CONFIG_MTD_CMDLINE_PARTS=y 46CONFIG_MTD_CMDLINE_PARTS=y
@@ -57,6 +58,7 @@ CONFIG_NET_ETHERNET=y
57CONFIG_BFIN_MAC=y 58CONFIG_BFIN_MAC=y
58# CONFIG_NETDEV_1000 is not set 59# CONFIG_NETDEV_1000 is not set
59# CONFIG_NETDEV_10000 is not set 60# CONFIG_NETDEV_10000 is not set
61# CONFIG_WLAN is not set
60# CONFIG_INPUT is not set 62# CONFIG_INPUT is not set
61# CONFIG_SERIO is not set 63# CONFIG_SERIO is not set
62# CONFIG_VT is not set 64# CONFIG_VT is not set
diff --git a/arch/blackfin/include/asm/Kbuild b/arch/blackfin/include/asm/Kbuild
index d9eb29e2555c..9e7c5379d3ff 100644
--- a/arch/blackfin/include/asm/Kbuild
+++ b/arch/blackfin/include/asm/Kbuild
@@ -1,4 +1,5 @@
1include include/asm-generic/Kbuild.asm 1include include/asm-generic/Kbuild.asm
2 2
3header-y += bfin_sport.h 3header-y += bfin_sport.h
4header-y += cachectl.h
4header-y += fixed_code.h 5header-y += fixed_code.h
diff --git a/arch/blackfin/include/asm/bfin5xx_spi.h b/arch/blackfin/include/asm/bfin5xx_spi.h
index 4223cf08ce83..5392583d0253 100644
--- a/arch/blackfin/include/asm/bfin5xx_spi.h
+++ b/arch/blackfin/include/asm/bfin5xx_spi.h
@@ -41,6 +41,27 @@
41#define BIT_STU_SENDOVER 0x0001 41#define BIT_STU_SENDOVER 0x0001
42#define BIT_STU_RECVFULL 0x0020 42#define BIT_STU_RECVFULL 0x0020
43 43
44/*
45 * All Blackfin system MMRs are padded to 32bits even if the register
46 * itself is only 16bits. So use a helper macro to streamline this.
47 */
48#define __BFP(m) u16 m; u16 __pad_##m
49
50/*
51 * bfin spi registers layout
52 */
53struct bfin_spi_regs {
54 __BFP(ctl);
55 __BFP(flg);
56 __BFP(stat);
57 __BFP(tdbr);
58 __BFP(rdbr);
59 __BFP(baud);
60 __BFP(shadow);
61};
62
63#undef __BFP
64
44#define MAX_CTRL_CS 8 /* cs in spi controller */ 65#define MAX_CTRL_CS 8 /* cs in spi controller */
45 66
46/* device.platform_data for SSP controller devices */ 67/* device.platform_data for SSP controller devices */
diff --git a/arch/blackfin/include/asm/bfin_can.h b/arch/blackfin/include/asm/bfin_can.h
index eec0076a385b..b1492e0bcabb 100644
--- a/arch/blackfin/include/asm/bfin_can.h
+++ b/arch/blackfin/include/asm/bfin_can.h
@@ -34,6 +34,7 @@ struct bfin_can_mask_regs {
34}; 34};
35 35
36struct bfin_can_channel_regs { 36struct bfin_can_channel_regs {
37 /* data[0,2,4,6] -> data{0,1,2,3} while data[1,3,5,7] is padding */
37 u16 data[8]; 38 u16 data[8];
38 __BFP(dlc); 39 __BFP(dlc);
39 __BFP(tsv); 40 __BFP(tsv);
@@ -83,16 +84,18 @@ struct bfin_can_regs {
83 __BFP(gif); /* offset 0x9c */ 84 __BFP(gif); /* offset 0x9c */
84 __BFP(control); /* offset 0xa0 */ 85 __BFP(control); /* offset 0xa0 */
85 __BFP(intr); /* offset 0xa4 */ 86 __BFP(intr); /* offset 0xa4 */
86 u32 __pad3[1]; 87 __BFP(version); /* offset 0xa8 */
87 __BFP(mbtd); /* offset 0xac */ 88 __BFP(mbtd); /* offset 0xac */
88 __BFP(ewr); /* offset 0xb0 */ 89 __BFP(ewr); /* offset 0xb0 */
89 __BFP(esr); /* offset 0xb4 */ 90 __BFP(esr); /* offset 0xb4 */
90 u32 __pad4[2]; 91 u32 __pad3[2];
91 __BFP(ucreg); /* offset 0xc0 */ 92 __BFP(ucreg); /* offset 0xc0 */
92 __BFP(uccnt); /* offset 0xc4 */ 93 __BFP(uccnt); /* offset 0xc4 */
93 __BFP(ucrc); /* offset 0xc8 */ 94 __BFP(ucrc); /* offset 0xc8 */
94 __BFP(uccnf); /* offset 0xcc */ 95 __BFP(uccnf); /* offset 0xcc */
95 u32 __pad5[12]; 96 u32 __pad4[1];
97 __BFP(version2); /* offset 0xd4 */
98 u32 __pad5[10];
96 99
97 /* 100 /*
98 * channel(mailbox) mask and message registers 101 * channel(mailbox) mask and message registers
diff --git a/arch/blackfin/include/asm/bfin_ppi.h b/arch/blackfin/include/asm/bfin_ppi.h
new file mode 100644
index 000000000000..3be05faa2c65
--- /dev/null
+++ b/arch/blackfin/include/asm/bfin_ppi.h
@@ -0,0 +1,53 @@
1/*
2 * bfin_ppi.h - interface to Blackfin PPIs
3 *
4 * Copyright 2005-2010 Analog Devices Inc.
5 *
6 * Licensed under the GPL-2 or later.
7 */
8
9#ifndef __ASM_BFIN_PPI_H__
10#define __ASM_BFIN_PPI_H__
11
12#include <linux/types.h>
13
14/*
15 * All Blackfin system MMRs are padded to 32bits even if the register
16 * itself is only 16bits. So use a helper macro to streamline this.
17 */
18#define __BFP(m) u16 m; u16 __pad_##m
19
20/*
21 * bfin ppi registers layout
22 */
23struct bfin_ppi_regs {
24 __BFP(control);
25 __BFP(status);
26 __BFP(count);
27 __BFP(delay);
28 __BFP(frame);
29};
30
31/*
32 * bfin eppi registers layout
33 */
34struct bfin_eppi_regs {
35 __BFP(status);
36 __BFP(hcount);
37 __BFP(hdelay);
38 __BFP(vcount);
39 __BFP(vdelay);
40 __BFP(frame);
41 __BFP(line);
42 __BFP(clkdiv);
43 u32 control;
44 u32 fs1w_hbl;
45 u32 fs1p_avpl;
46 u32 fs2w_lvb;
47 u32 fs2p_lavf;
48 u32 clip;
49};
50
51#undef __BFP
52
53#endif
diff --git a/arch/blackfin/include/asm/bfin_twi.h b/arch/blackfin/include/asm/bfin_twi.h
new file mode 100644
index 000000000000..e767d649dfc4
--- /dev/null
+++ b/arch/blackfin/include/asm/bfin_twi.h
@@ -0,0 +1,45 @@
1/*
2 * bfin_twi.h - interface to Blackfin TWIs
3 *
4 * Copyright 2005-2010 Analog Devices Inc.
5 *
6 * Licensed under the GPL-2 or later.
7 */
8
9#ifndef __ASM_BFIN_TWI_H__
10#define __ASM_BFIN_TWI_H__
11
12#include <linux/types.h>
13
14/*
15 * All Blackfin system MMRs are padded to 32bits even if the register
16 * itself is only 16bits. So use a helper macro to streamline this.
17 */
18#define __BFP(m) u16 m; u16 __pad_##m
19
20/*
21 * bfin twi registers layout
22 */
23struct bfin_twi_regs {
24 __BFP(clkdiv);
25 __BFP(control);
26 __BFP(slave_ctl);
27 __BFP(slave_stat);
28 __BFP(slave_addr);
29 __BFP(master_ctl);
30 __BFP(master_stat);
31 __BFP(master_addr);
32 __BFP(int_stat);
33 __BFP(int_mask);
34 __BFP(fifo_ctl);
35 __BFP(fifo_stat);
36 u32 __pad[20];
37 __BFP(xmt_data8);
38 __BFP(xmt_data16);
39 __BFP(rcv_data8);
40 __BFP(rcv_data16);
41};
42
43#undef __BFP
44
45#endif
diff --git a/arch/blackfin/include/asm/cachectl.h b/arch/blackfin/include/asm/cachectl.h
new file mode 100644
index 000000000000..03255df6c1ea
--- /dev/null
+++ b/arch/blackfin/include/asm/cachectl.h
@@ -0,0 +1,20 @@
1/*
2 * based on the mips/cachectl.h
3 *
4 * Copyright 2010 Analog Devices Inc.
5 * Copyright (C) 1994, 1995, 1996 by Ralf Baechle
6 *
7 * Licensed under the GPL-2 or later.
8 */
9
10#ifndef _ASM_CACHECTL
11#define _ASM_CACHECTL
12
13/*
14 * Options for cacheflush system call
15 */
16#define ICACHE (1<<0) /* flush instruction cache */
17#define DCACHE (1<<1) /* writeback and flush data cache */
18#define BCACHE (ICACHE|DCACHE) /* flush both caches */
19
20#endif /* _ASM_CACHECTL */
diff --git a/arch/blackfin/include/asm/cdef_LPBlackfin.h b/arch/blackfin/include/asm/cdef_LPBlackfin.h
index 6c39d94b44d0..59af63c0c2be 100644
--- a/arch/blackfin/include/asm/cdef_LPBlackfin.h
+++ b/arch/blackfin/include/asm/cdef_LPBlackfin.h
@@ -172,16 +172,19 @@
172#define bfin_write_ICPLB_DATA14(val) bfin_write32(ICPLB_DATA14,val) 172#define bfin_write_ICPLB_DATA14(val) bfin_write32(ICPLB_DATA14,val)
173#define bfin_read_ICPLB_DATA15() bfin_read32(ICPLB_DATA15) 173#define bfin_read_ICPLB_DATA15() bfin_read32(ICPLB_DATA15)
174#define bfin_write_ICPLB_DATA15(val) bfin_write32(ICPLB_DATA15,val) 174#define bfin_write_ICPLB_DATA15(val) bfin_write32(ICPLB_DATA15,val)
175#define bfin_read_ITEST_COMMAND() bfin_read32(ITEST_COMMAND)
176#define bfin_write_ITEST_COMMAND(val) bfin_write32(ITEST_COMMAND,val) 175#define bfin_write_ITEST_COMMAND(val) bfin_write32(ITEST_COMMAND,val)
177#if 0 176#if 0
178#define ITEST_INDEX 0xFFE01304 /* Instruction Test Index Register */ 177#define ITEST_INDEX 0xFFE01304 /* Instruction Test Index Register */
179#endif 178#endif
180#define bfin_read_ITEST_DATA0() bfin_read32(ITEST_DATA0)
181#define bfin_write_ITEST_DATA0(val) bfin_write32(ITEST_DATA0,val) 179#define bfin_write_ITEST_DATA0(val) bfin_write32(ITEST_DATA0,val)
182#define bfin_read_ITEST_DATA1() bfin_read32(ITEST_DATA1)
183#define bfin_write_ITEST_DATA1(val) bfin_write32(ITEST_DATA1,val) 180#define bfin_write_ITEST_DATA1(val) bfin_write32(ITEST_DATA1,val)
184 181
182#if !ANOMALY_05000481
183#define bfin_read_ITEST_COMMAND() bfin_read32(ITEST_COMMAND)
184#define bfin_read_ITEST_DATA0() bfin_read32(ITEST_DATA0)
185#define bfin_read_ITEST_DATA1() bfin_read32(ITEST_DATA1)
186#endif
187
185/* Event/Interrupt Registers*/ 188/* Event/Interrupt Registers*/
186 189
187#define bfin_read_EVT0() bfin_read32(EVT0) 190#define bfin_read_EVT0() bfin_read32(EVT0)
diff --git a/arch/blackfin/include/asm/entry.h b/arch/blackfin/include/asm/entry.h
index a6886f6e4819..4104d5783e2c 100644
--- a/arch/blackfin/include/asm/entry.h
+++ b/arch/blackfin/include/asm/entry.h
@@ -15,14 +15,6 @@
15#define LFLUSH_I_AND_D 0x00000808 15#define LFLUSH_I_AND_D 0x00000808
16#define LSIGTRAP 5 16#define LSIGTRAP 5
17 17
18/* process bits for task_struct.flags */
19#define PF_TRACESYS_OFF 3
20#define PF_TRACESYS_BIT 5
21#define PF_PTRACED_OFF 3
22#define PF_PTRACED_BIT 4
23#define PF_DTRACE_OFF 1
24#define PF_DTRACE_BIT 5
25
26/* 18/*
27 * NOTE! The single-stepping code assumes that all interrupt handlers 19 * NOTE! The single-stepping code assumes that all interrupt handlers
28 * start by saving SYSCFG on the stack with their first instruction. 20 * start by saving SYSCFG on the stack with their first instruction.
diff --git a/arch/blackfin/include/asm/ptrace.h b/arch/blackfin/include/asm/ptrace.h
index aaa1c6c2bc19..832d7c009a2c 100644
--- a/arch/blackfin/include/asm/ptrace.h
+++ b/arch/blackfin/include/asm/ptrace.h
@@ -113,6 +113,9 @@ extern void user_disable_single_step(struct task_struct *child);
113/* common code demands this function */ 113/* common code demands this function */
114#define ptrace_disable(child) user_disable_single_step(child) 114#define ptrace_disable(child) user_disable_single_step(child)
115 115
116extern int is_user_addr_valid(struct task_struct *child,
117 unsigned long start, unsigned long len);
118
116/* 119/*
117 * Get the address of the live pt_regs for the specified task. 120 * Get the address of the live pt_regs for the specified task.
118 * These are saved onto the top kernel stack when the process 121 * These are saved onto the top kernel stack when the process
diff --git a/arch/blackfin/include/asm/serial.h b/arch/blackfin/include/asm/serial.h
index 94a4a12e3bf2..a0cb0caff152 100644
--- a/arch/blackfin/include/asm/serial.h
+++ b/arch/blackfin/include/asm/serial.h
@@ -1,2 +1 @@
1#include <asm-generic/serial.h> #include <asm-generic/serial.h>
2#define SERIAL_EXTRA_IRQ_FLAGS IRQF_TRIGGER_HIGH
diff --git a/arch/blackfin/include/asm/unistd.h b/arch/blackfin/include/asm/unistd.h
index 14fcd254b185..928ae975b87e 100644
--- a/arch/blackfin/include/asm/unistd.h
+++ b/arch/blackfin/include/asm/unistd.h
@@ -392,8 +392,9 @@
392#define __NR_fanotify_init 371 392#define __NR_fanotify_init 371
393#define __NR_fanotify_mark 372 393#define __NR_fanotify_mark 372
394#define __NR_prlimit64 373 394#define __NR_prlimit64 373
395#define __NR_cacheflush 374
395 396
396#define __NR_syscall 374 397#define __NR_syscall 375
397#define NR_syscalls __NR_syscall 398#define NR_syscalls __NR_syscall
398 399
399/* Old optional stuff no one actually uses */ 400/* Old optional stuff no one actually uses */
diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c
index ca1c1f9debd6..170cf90735ba 100644
--- a/arch/blackfin/kernel/bfin_gpio.c
+++ b/arch/blackfin/kernel/bfin_gpio.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * GPIO Abstraction Layer 2 * GPIO Abstraction Layer
3 * 3 *
4 * Copyright 2006-2009 Analog Devices Inc. 4 * Copyright 2006-2010 Analog Devices Inc.
5 * 5 *
6 * Licensed under the GPL-2 or later 6 * Licensed under the GPL-2 or later
7 */ 7 */
@@ -215,82 +215,91 @@ static void port_setup(unsigned gpio, unsigned short usage)
215} 215}
216 216
217#ifdef BF537_FAMILY 217#ifdef BF537_FAMILY
218static struct { 218static const s8 port_mux[] = {
219 unsigned short res; 219 [GPIO_PF0] = 3,
220 unsigned short offset; 220 [GPIO_PF1] = 3,
221} port_mux_lut[] = { 221 [GPIO_PF2] = 4,
222 {.res = P_PPI0_D13, .offset = 11}, 222 [GPIO_PF3] = 4,
223 {.res = P_PPI0_D14, .offset = 11}, 223 [GPIO_PF4] = 5,
224 {.res = P_PPI0_D15, .offset = 11}, 224 [GPIO_PF5] = 6,
225 {.res = P_SPORT1_TFS, .offset = 11}, 225 [GPIO_PF6] = 7,
226 {.res = P_SPORT1_TSCLK, .offset = 11}, 226 [GPIO_PF7] = 8,
227 {.res = P_SPORT1_DTPRI, .offset = 11}, 227 [GPIO_PF8 ... GPIO_PF15] = -1,
228 {.res = P_PPI0_D10, .offset = 10}, 228 [GPIO_PG0 ... GPIO_PG7] = -1,
229 {.res = P_PPI0_D11, .offset = 10}, 229 [GPIO_PG8] = 9,
230 {.res = P_PPI0_D12, .offset = 10}, 230 [GPIO_PG9] = 9,
231 {.res = P_SPORT1_RSCLK, .offset = 10}, 231 [GPIO_PG10] = 10,
232 {.res = P_SPORT1_RFS, .offset = 10}, 232 [GPIO_PG11] = 10,
233 {.res = P_SPORT1_DRPRI, .offset = 10}, 233 [GPIO_PG12] = 10,
234 {.res = P_PPI0_D8, .offset = 9}, 234 [GPIO_PG13] = 11,
235 {.res = P_PPI0_D9, .offset = 9}, 235 [GPIO_PG14] = 11,
236 {.res = P_SPORT1_DRSEC, .offset = 9}, 236 [GPIO_PG15] = 11,
237 {.res = P_SPORT1_DTSEC, .offset = 9}, 237 [GPIO_PH0 ... GPIO_PH15] = -1,
238 {.res = P_TMR2, .offset = 8}, 238 [PORT_PJ0 ... PORT_PJ3] = -1,
239 {.res = P_PPI0_FS3, .offset = 8}, 239 [PORT_PJ4] = 1,
240 {.res = P_TMR3, .offset = 7}, 240 [PORT_PJ5] = 1,
241 {.res = P_SPI0_SSEL4, .offset = 7}, 241 [PORT_PJ6 ... PORT_PJ9] = -1,
242 {.res = P_TMR4, .offset = 6}, 242 [PORT_PJ10] = 0,
243 {.res = P_SPI0_SSEL5, .offset = 6}, 243 [PORT_PJ11] = 0,
244 {.res = P_TMR5, .offset = 5},
245 {.res = P_SPI0_SSEL6, .offset = 5},
246 {.res = P_UART1_RX, .offset = 4},
247 {.res = P_UART1_TX, .offset = 4},
248 {.res = P_TMR6, .offset = 4},
249 {.res = P_TMR7, .offset = 4},
250 {.res = P_UART0_RX, .offset = 3},
251 {.res = P_UART0_TX, .offset = 3},
252 {.res = P_DMAR0, .offset = 3},
253 {.res = P_DMAR1, .offset = 3},
254 {.res = P_SPORT0_DTSEC, .offset = 1},
255 {.res = P_SPORT0_DRSEC, .offset = 1},
256 {.res = P_CAN0_RX, .offset = 1},
257 {.res = P_CAN0_TX, .offset = 1},
258 {.res = P_SPI0_SSEL7, .offset = 1},
259 {.res = P_SPORT0_TFS, .offset = 0},
260 {.res = P_SPORT0_DTPRI, .offset = 0},
261 {.res = P_SPI0_SSEL2, .offset = 0},
262 {.res = P_SPI0_SSEL3, .offset = 0},
263}; 244};
264 245
265static void portmux_setup(unsigned short per) 246static int portmux_group_check(unsigned short per)
266{ 247{
267 u16 y, offset, muxreg; 248 u16 ident = P_IDENT(per);
268 u16 function = P_FUNCT2MUX(per); 249 u16 function = P_FUNCT2MUX(per);
250 s8 offset = port_mux[ident];
251 u16 m, pmux, pfunc;
269 252
270 for (y = 0; y < ARRAY_SIZE(port_mux_lut); y++) { 253 if (offset < 0)
271 if (port_mux_lut[y].res == per) { 254 return 0;
272
273 /* SET PORTMUX REG */
274
275 offset = port_mux_lut[y].offset;
276 muxreg = bfin_read_PORT_MUX();
277 255
278 if (offset != 1) 256 pmux = bfin_read_PORT_MUX();
279 muxreg &= ~(1 << offset); 257 for (m = 0; m < ARRAY_SIZE(port_mux); ++m) {
280 else 258 if (m == ident)
281 muxreg &= ~(3 << 1); 259 continue;
260 if (port_mux[m] != offset)
261 continue;
262 if (!is_reserved(peri, m, 1))
263 continue;
282 264
283 muxreg |= (function << offset); 265 if (offset == 1)
284 bfin_write_PORT_MUX(muxreg); 266 pfunc = (pmux >> offset) & 3;
267 else
268 pfunc = (pmux >> offset) & 1;
269 if (pfunc != function) {
270 pr_err("pin group conflict! request pin %d func %d conflict with pin %d func %d\n",
271 ident, function, m, pfunc);
272 return -EINVAL;
285 } 273 }
286 } 274 }
275
276 return 0;
277}
278
279static void portmux_setup(unsigned short per)
280{
281 u16 ident = P_IDENT(per);
282 u16 function = P_FUNCT2MUX(per);
283 s8 offset = port_mux[ident];
284 u16 pmux;
285
286 if (offset == -1)
287 return;
288
289 pmux = bfin_read_PORT_MUX();
290 if (offset != 1)
291 pmux &= ~(1 << offset);
292 else
293 pmux &= ~(3 << 1);
294 pmux |= (function << offset);
295 bfin_write_PORT_MUX(pmux);
287} 296}
288#elif defined(CONFIG_BF54x) 297#elif defined(CONFIG_BF54x)
289inline void portmux_setup(unsigned short per) 298inline void portmux_setup(unsigned short per)
290{ 299{
291 u32 pmux;
292 u16 ident = P_IDENT(per); 300 u16 ident = P_IDENT(per);
293 u16 function = P_FUNCT2MUX(per); 301 u16 function = P_FUNCT2MUX(per);
302 u32 pmux;
294 303
295 pmux = gpio_array[gpio_bank(ident)]->port_mux; 304 pmux = gpio_array[gpio_bank(ident)]->port_mux;
296 305
@@ -302,20 +311,54 @@ inline void portmux_setup(unsigned short per)
302 311
303inline u16 get_portmux(unsigned short per) 312inline u16 get_portmux(unsigned short per)
304{ 313{
305 u32 pmux;
306 u16 ident = P_IDENT(per); 314 u16 ident = P_IDENT(per);
307 315 u32 pmux = gpio_array[gpio_bank(ident)]->port_mux;
308 pmux = gpio_array[gpio_bank(ident)]->port_mux;
309
310 return (pmux >> (2 * gpio_sub_n(ident)) & 0x3); 316 return (pmux >> (2 * gpio_sub_n(ident)) & 0x3);
311} 317}
318static int portmux_group_check(unsigned short per)
319{
320 return 0;
321}
312#elif defined(CONFIG_BF52x) || defined(CONFIG_BF51x) 322#elif defined(CONFIG_BF52x) || defined(CONFIG_BF51x)
323static int portmux_group_check(unsigned short per)
324{
325 u16 ident = P_IDENT(per);
326 u16 function = P_FUNCT2MUX(per);
327 u8 offset = pmux_offset[gpio_bank(ident)][gpio_sub_n(ident)];
328 u16 pin, gpiopin, pfunc;
329
330 for (pin = 0; pin < GPIO_BANKSIZE; ++pin) {
331 if (offset != pmux_offset[gpio_bank(ident)][pin])
332 continue;
333
334 gpiopin = gpio_bank(ident) * GPIO_BANKSIZE + pin;
335 if (gpiopin == ident)
336 continue;
337 if (!is_reserved(peri, gpiopin, 1))
338 continue;
339
340 pfunc = *port_mux[gpio_bank(ident)];
341 pfunc = (pfunc >> offset) & 3;
342 if (pfunc != function) {
343 pr_err("pin group conflict! request pin %d func %d conflict with pin %d func %d\n",
344 ident, function, gpiopin, pfunc);
345 return -EINVAL;
346 }
347 }
348
349 return 0;
350}
351
313inline void portmux_setup(unsigned short per) 352inline void portmux_setup(unsigned short per)
314{ 353{
315 u16 pmux, ident = P_IDENT(per), function = P_FUNCT2MUX(per); 354 u16 ident = P_IDENT(per);
355 u16 function = P_FUNCT2MUX(per);
316 u8 offset = pmux_offset[gpio_bank(ident)][gpio_sub_n(ident)]; 356 u8 offset = pmux_offset[gpio_bank(ident)][gpio_sub_n(ident)];
357 u16 pmux;
317 358
318 pmux = *port_mux[gpio_bank(ident)]; 359 pmux = *port_mux[gpio_bank(ident)];
360 if (((pmux >> offset) & 3) == function)
361 return;
319 pmux &= ~(3 << offset); 362 pmux &= ~(3 << offset);
320 pmux |= (function & 3) << offset; 363 pmux |= (function & 3) << offset;
321 *port_mux[gpio_bank(ident)] = pmux; 364 *port_mux[gpio_bank(ident)] = pmux;
@@ -323,6 +366,10 @@ inline void portmux_setup(unsigned short per)
323} 366}
324#else 367#else
325# define portmux_setup(...) do { } while (0) 368# define portmux_setup(...) do { } while (0)
369static int portmux_group_check(unsigned short per)
370{
371 return 0;
372}
326#endif 373#endif
327 374
328#ifndef CONFIG_BF54x 375#ifndef CONFIG_BF54x
@@ -735,6 +782,10 @@ int peripheral_request(unsigned short per, const char *label)
735 } 782 }
736 } 783 }
737 784
785 if (unlikely(portmux_group_check(per))) {
786 hard_local_irq_restore(flags);
787 return -EBUSY;
788 }
738 anyway: 789 anyway:
739 reserve(peri, ident); 790 reserve(peri, ident);
740 791
diff --git a/arch/blackfin/kernel/kgdb.c b/arch/blackfin/kernel/kgdb.c
index 08bc44ea6883..edae461b1c54 100644
--- a/arch/blackfin/kernel/kgdb.c
+++ b/arch/blackfin/kernel/kgdb.c
@@ -320,7 +320,7 @@ static void bfin_correct_hw_break(void)
320 } 320 }
321} 321}
322 322
323void kgdb_disable_hw_debug(struct pt_regs *regs) 323static void bfin_disable_hw_debug(struct pt_regs *regs)
324{ 324{
325 /* Disable hardware debugging while we are in kgdb */ 325 /* Disable hardware debugging while we are in kgdb */
326 bfin_write_WPIACTL(0); 326 bfin_write_WPIACTL(0);
@@ -406,6 +406,7 @@ struct kgdb_arch arch_kgdb_ops = {
406#endif 406#endif
407 .set_hw_breakpoint = bfin_set_hw_break, 407 .set_hw_breakpoint = bfin_set_hw_break,
408 .remove_hw_breakpoint = bfin_remove_hw_break, 408 .remove_hw_breakpoint = bfin_remove_hw_break,
409 .disable_hw_break = bfin_disable_hw_debug,
409 .remove_all_hw_break = bfin_remove_all_hw_break, 410 .remove_all_hw_break = bfin_remove_all_hw_break,
410 .correct_hw_break = bfin_correct_hw_break, 411 .correct_hw_break = bfin_correct_hw_break,
411}; 412};
diff --git a/arch/blackfin/kernel/kgdb_test.c b/arch/blackfin/kernel/kgdb_test.c
index 9a4b07594389..08c0236acf3c 100644
--- a/arch/blackfin/kernel/kgdb_test.c
+++ b/arch/blackfin/kernel/kgdb_test.c
@@ -88,6 +88,7 @@ static const struct file_operations kgdb_test_proc_fops = {
88 .owner = THIS_MODULE, 88 .owner = THIS_MODULE,
89 .read = kgdb_test_proc_read, 89 .read = kgdb_test_proc_read,
90 .write = kgdb_test_proc_write, 90 .write = kgdb_test_proc_write,
91 .llseek = noop_llseek,
91}; 92};
92 93
93static int __init kgdbtest_init(void) 94static int __init kgdbtest_init(void)
diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c
index c86a3ed5f48f..cd0c090ebc54 100644
--- a/arch/blackfin/kernel/process.c
+++ b/arch/blackfin/kernel/process.c
@@ -493,6 +493,11 @@ int _access_ok(unsigned long addr, unsigned long size)
493 return 1; 493 return 1;
494#endif 494#endif
495 495
496#ifndef CONFIG_EXCEPTION_L1_SCRATCH
497 if (in_mem_const(addr, size, (unsigned long)l1_stack_base, l1_stack_len))
498 return 1;
499#endif
500
496 aret = in_async(addr, size); 501 aret = in_async(addr, size);
497 if (aret < 2) 502 if (aret < 2)
498 return aret; 503 return aret;
diff --git a/arch/blackfin/kernel/ptrace.c b/arch/blackfin/kernel/ptrace.c
index 6ec77685df52..75089f80855d 100644
--- a/arch/blackfin/kernel/ptrace.c
+++ b/arch/blackfin/kernel/ptrace.c
@@ -27,6 +27,7 @@
27#include <asm/fixed_code.h> 27#include <asm/fixed_code.h>
28#include <asm/cacheflush.h> 28#include <asm/cacheflush.h>
29#include <asm/mem_map.h> 29#include <asm/mem_map.h>
30#include <asm/mmu_context.h>
30 31
31/* 32/*
32 * does not yet catch signals sent when the child dies. 33 * does not yet catch signals sent when the child dies.
@@ -37,12 +38,13 @@
37 * Get contents of register REGNO in task TASK. 38 * Get contents of register REGNO in task TASK.
38 */ 39 */
39static inline long 40static inline long
40get_reg(struct task_struct *task, long regno, unsigned long __user *datap) 41get_reg(struct task_struct *task, unsigned long regno,
42 unsigned long __user *datap)
41{ 43{
42 long tmp; 44 long tmp;
43 struct pt_regs *regs = task_pt_regs(task); 45 struct pt_regs *regs = task_pt_regs(task);
44 46
45 if (regno & 3 || regno > PT_LAST_PSEUDO || regno < 0) 47 if (regno & 3 || regno > PT_LAST_PSEUDO)
46 return -EIO; 48 return -EIO;
47 49
48 switch (regno) { 50 switch (regno) {
@@ -73,11 +75,11 @@ get_reg(struct task_struct *task, long regno, unsigned long __user *datap)
73 * Write contents of register REGNO in task TASK. 75 * Write contents of register REGNO in task TASK.
74 */ 76 */
75static inline int 77static inline int
76put_reg(struct task_struct *task, long regno, unsigned long data) 78put_reg(struct task_struct *task, unsigned long regno, unsigned long data)
77{ 79{
78 struct pt_regs *regs = task_pt_regs(task); 80 struct pt_regs *regs = task_pt_regs(task);
79 81
80 if (regno & 3 || regno > PT_LAST_PSEUDO || regno < 0) 82 if (regno & 3 || regno > PT_LAST_PSEUDO)
81 return -EIO; 83 return -EIO;
82 84
83 switch (regno) { 85 switch (regno) {
@@ -113,8 +115,8 @@ put_reg(struct task_struct *task, long regno, unsigned long data)
113/* 115/*
114 * check that an address falls within the bounds of the target process's memory mappings 116 * check that an address falls within the bounds of the target process's memory mappings
115 */ 117 */
116static inline int is_user_addr_valid(struct task_struct *child, 118int
117 unsigned long start, unsigned long len) 119is_user_addr_valid(struct task_struct *child, unsigned long start, unsigned long len)
118{ 120{
119 struct vm_area_struct *vma; 121 struct vm_area_struct *vma;
120 struct sram_list_struct *sraml; 122 struct sram_list_struct *sraml;
@@ -135,6 +137,13 @@ static inline int is_user_addr_valid(struct task_struct *child,
135 if (start >= FIXED_CODE_START && start + len < FIXED_CODE_END) 137 if (start >= FIXED_CODE_START && start + len < FIXED_CODE_END)
136 return 0; 138 return 0;
137 139
140#ifdef CONFIG_APP_STACK_L1
141 if (child->mm->context.l1_stack_save)
142 if (start >= (unsigned long)l1_stack_base &&
143 start + len < (unsigned long)l1_stack_base + l1_stack_len)
144 return 0;
145#endif
146
138 return -EIO; 147 return -EIO;
139} 148}
140 149
@@ -232,7 +241,8 @@ void user_disable_single_step(struct task_struct *child)
232 clear_tsk_thread_flag(child, TIF_SINGLESTEP); 241 clear_tsk_thread_flag(child, TIF_SINGLESTEP);
233} 242}
234 243
235long arch_ptrace(struct task_struct *child, long request, long addr, long data) 244long arch_ptrace(struct task_struct *child, long request,
245 unsigned long addr, unsigned long data)
236{ 246{
237 int ret; 247 int ret;
238 unsigned long __user *datap = (unsigned long __user *)data; 248 unsigned long __user *datap = (unsigned long __user *)data;
@@ -360,14 +370,14 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
360 return copy_regset_to_user(child, &user_bfin_native_view, 370 return copy_regset_to_user(child, &user_bfin_native_view,
361 REGSET_GENERAL, 371 REGSET_GENERAL,
362 0, sizeof(struct pt_regs), 372 0, sizeof(struct pt_regs),
363 (void __user *)data); 373 datap);
364 374
365 case PTRACE_SETREGS: 375 case PTRACE_SETREGS:
366 pr_debug("ptrace: PTRACE_SETREGS\n"); 376 pr_debug("ptrace: PTRACE_SETREGS\n");
367 return copy_regset_from_user(child, &user_bfin_native_view, 377 return copy_regset_from_user(child, &user_bfin_native_view,
368 REGSET_GENERAL, 378 REGSET_GENERAL,
369 0, sizeof(struct pt_regs), 379 0, sizeof(struct pt_regs),
370 (const void __user *)data); 380 datap);
371 381
372 case_default: 382 case_default:
373 default: 383 default:
diff --git a/arch/blackfin/kernel/sys_bfin.c b/arch/blackfin/kernel/sys_bfin.c
index bdc1e2f0da32..89448ed7065d 100644
--- a/arch/blackfin/kernel/sys_bfin.c
+++ b/arch/blackfin/kernel/sys_bfin.c
@@ -21,6 +21,8 @@
21 21
22#include <asm/cacheflush.h> 22#include <asm/cacheflush.h>
23#include <asm/dma.h> 23#include <asm/dma.h>
24#include <asm/cachectl.h>
25#include <asm/ptrace.h>
24 26
25asmlinkage void *sys_sram_alloc(size_t size, unsigned long flags) 27asmlinkage void *sys_sram_alloc(size_t size, unsigned long flags)
26{ 28{
@@ -70,3 +72,16 @@ asmlinkage int sys_bfin_spinlock(int *p)
70 72
71 return ret; 73 return ret;
72} 74}
75
76SYSCALL_DEFINE3(cacheflush, unsigned long, addr, unsigned long, len, int, op)
77{
78 if (is_user_addr_valid(current, addr, len) != 0)
79 return -EINVAL;
80
81 if (op & DCACHE)
82 blackfin_dcache_flush_range(addr, addr + len);
83 if (op & ICACHE)
84 blackfin_icache_flush_range(addr, addr + len);
85
86 return 0;
87}
diff --git a/arch/blackfin/mach-bf518/boards/ezbrd.c b/arch/blackfin/mach-bf518/boards/ezbrd.c
index 44d6d5299022..b894c8abe7ec 100644
--- a/arch/blackfin/mach-bf518/boards/ezbrd.c
+++ b/arch/blackfin/mach-bf518/boards/ezbrd.c
@@ -87,13 +87,55 @@ static struct platform_device rtc_device = {
87#endif 87#endif
88 88
89#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 89#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
90#include <linux/bfin_mac.h>
91static const unsigned short bfin_mac_peripherals[] = {
92 P_MII0_ETxD0,
93 P_MII0_ETxD1,
94 P_MII0_ETxEN,
95 P_MII0_ERxD0,
96 P_MII0_ERxD1,
97 P_MII0_TxCLK,
98 P_MII0_PHYINT,
99 P_MII0_CRS,
100 P_MII0_MDC,
101 P_MII0_MDIO,
102 0
103};
104
105static struct bfin_phydev_platform_data bfin_phydev_data[] = {
106 {
107 .addr = 1,
108 .irq = IRQ_MAC_PHYINT,
109 },
110 {
111 .addr = 2,
112 .irq = IRQ_MAC_PHYINT,
113 },
114 {
115 .addr = 3,
116 .irq = IRQ_MAC_PHYINT,
117 },
118};
119
120static struct bfin_mii_bus_platform_data bfin_mii_bus_data = {
121 .phydev_number = 3,
122 .phydev_data = bfin_phydev_data,
123 .phy_mode = PHY_INTERFACE_MODE_MII,
124 .mac_peripherals = bfin_mac_peripherals,
125};
126
90static struct platform_device bfin_mii_bus = { 127static struct platform_device bfin_mii_bus = {
91 .name = "bfin_mii_bus", 128 .name = "bfin_mii_bus",
129 .dev = {
130 .platform_data = &bfin_mii_bus_data,
131 }
92}; 132};
93 133
94static struct platform_device bfin_mac_device = { 134static struct platform_device bfin_mac_device = {
95 .name = "bfin_mac", 135 .name = "bfin_mac",
96 .dev.platform_data = &bfin_mii_bus, 136 .dev = {
137 .platform_data = &bfin_mii_bus,
138 }
97}; 139};
98 140
99#if defined(CONFIG_NET_DSA_KSZ8893M) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE) 141#if defined(CONFIG_NET_DSA_KSZ8893M) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE)
@@ -312,7 +354,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
312#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 354#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
313/* SPI (0) */ 355/* SPI (0) */
314static struct bfin5xx_spi_master bfin_spi0_info = { 356static struct bfin5xx_spi_master bfin_spi0_info = {
315 .num_chipselect = 5, 357 .num_chipselect = 6,
316 .enable_dma = 1, /* master has the ability to do dma transfer */ 358 .enable_dma = 1, /* master has the ability to do dma transfer */
317 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, 359 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
318}; 360};
@@ -347,7 +389,7 @@ static struct platform_device bfin_spi0_device = {
347 389
348/* SPI (1) */ 390/* SPI (1) */
349static struct bfin5xx_spi_master bfin_spi1_info = { 391static struct bfin5xx_spi_master bfin_spi1_info = {
350 .num_chipselect = 5, 392 .num_chipselect = 6,
351 .enable_dma = 1, /* master has the ability to do dma transfer */ 393 .enable_dma = 1, /* master has the ability to do dma transfer */
352 .pin_req = {P_SPI1_SCK, P_SPI1_MISO, P_SPI1_MOSI, 0}, 394 .pin_req = {P_SPI1_SCK, P_SPI1_MISO, P_SPI1_MOSI, 0},
353}; 395};
@@ -525,6 +567,14 @@ static struct platform_device bfin_sir1_device = {
525#endif 567#endif
526#endif 568#endif
527 569
570#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
571static struct platform_device bfin_i2s = {
572 .name = "bfin-i2s",
573 .id = CONFIG_SND_BF5XX_SPORT_NUM,
574 /* TODO: add platform data here */
575};
576#endif
577
528#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 578#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
529static struct resource bfin_twi0_resource[] = { 579static struct resource bfin_twi0_resource[] = {
530 [0] = { 580 [0] = {
@@ -559,6 +609,11 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
559 .irq = IRQ_PF8, 609 .irq = IRQ_PF8,
560 }, 610 },
561#endif 611#endif
612#if defined(CONFIG_SND_SOC_SSM2602) || defined(CONFIG_SND_SOC_SSM2602_MODULE)
613 {
614 I2C_BOARD_INFO("ssm2602", 0x1b),
615 },
616#endif
562}; 617};
563 618
564#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 619#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
@@ -736,6 +791,10 @@ static struct platform_device *stamp_devices[] __initdata = {
736 &i2c_bfin_twi_device, 791 &i2c_bfin_twi_device,
737#endif 792#endif
738 793
794#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
795 &bfin_i2s,
796#endif
797
739#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 798#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
740#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 799#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
741 &bfin_sport0_uart_device, 800 &bfin_sport0_uart_device,
diff --git a/arch/blackfin/mach-bf518/boards/tcm-bf518.c b/arch/blackfin/mach-bf518/boards/tcm-bf518.c
index 9b72e5cb21fe..e6ce1d7c523a 100644
--- a/arch/blackfin/mach-bf518/boards/tcm-bf518.c
+++ b/arch/blackfin/mach-bf518/boards/tcm-bf518.c
@@ -81,13 +81,35 @@ static struct platform_device rtc_device = {
81#endif 81#endif
82 82
83#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 83#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
84#include <linux/bfin_mac.h>
85static const unsigned short bfin_mac_peripherals[] = P_MII0;
86
87static struct bfin_phydev_platform_data bfin_phydev_data[] = {
88 {
89 .addr = 1,
90 .irq = IRQ_MAC_PHYINT,
91 },
92};
93
94static struct bfin_mii_bus_platform_data bfin_mii_bus_data = {
95 .phydev_number = 1,
96 .phydev_data = bfin_phydev_data,
97 .phy_mode = PHY_INTERFACE_MODE_MII,
98 .mac_peripherals = bfin_mac_peripherals,
99};
100
84static struct platform_device bfin_mii_bus = { 101static struct platform_device bfin_mii_bus = {
85 .name = "bfin_mii_bus", 102 .name = "bfin_mii_bus",
103 .dev = {
104 .platform_data = &bfin_mii_bus_data,
105 }
86}; 106};
87 107
88static struct platform_device bfin_mac_device = { 108static struct platform_device bfin_mac_device = {
89 .name = "bfin_mac", 109 .name = "bfin_mac",
90 .dev.platform_data = &bfin_mii_bus, 110 .dev = {
111 .platform_data = &bfin_mii_bus,
112 }
91}; 113};
92#endif 114#endif
93 115
@@ -291,7 +313,7 @@ static struct platform_device bfin_spi0_device = {
291 313
292/* SPI (1) */ 314/* SPI (1) */
293static struct bfin5xx_spi_master bfin_spi1_info = { 315static struct bfin5xx_spi_master bfin_spi1_info = {
294 .num_chipselect = 5, 316 .num_chipselect = 6,
295 .enable_dma = 1, /* master has the ability to do dma transfer */ 317 .enable_dma = 1, /* master has the ability to do dma transfer */
296 .pin_req = {P_SPI1_SCK, P_SPI1_MISO, P_SPI1_MOSI, 0}, 318 .pin_req = {P_SPI1_SCK, P_SPI1_MISO, P_SPI1_MOSI, 0},
297}; 319};
diff --git a/arch/blackfin/mach-bf518/include/mach/cdefBF51x_base.h b/arch/blackfin/mach-bf518/include/mach/cdefBF51x_base.h
index 29498e59e71f..e16969f24ffd 100644
--- a/arch/blackfin/mach-bf518/include/mach/cdefBF51x_base.h
+++ b/arch/blackfin/mach-bf518/include/mach/cdefBF51x_base.h
@@ -262,14 +262,14 @@
262#define bfin_write_SPORT0_TX(val) bfin_write32(SPORT0_TX, val) 262#define bfin_write_SPORT0_TX(val) bfin_write32(SPORT0_TX, val)
263#define bfin_read_SPORT0_RX() bfin_read32(SPORT0_RX) 263#define bfin_read_SPORT0_RX() bfin_read32(SPORT0_RX)
264#define bfin_write_SPORT0_RX(val) bfin_write32(SPORT0_RX, val) 264#define bfin_write_SPORT0_RX(val) bfin_write32(SPORT0_RX, val)
265#define bfin_read_SPORT0_TX32() bfin_read32(SPORT0_TX32) 265#define bfin_read_SPORT0_TX32() bfin_read32(SPORT0_TX)
266#define bfin_write_SPORT0_TX32(val) bfin_write32(SPORT0_TX32, val) 266#define bfin_write_SPORT0_TX32(val) bfin_write32(SPORT0_TX, val)
267#define bfin_read_SPORT0_RX32() bfin_read32(SPORT0_RX32) 267#define bfin_read_SPORT0_RX32() bfin_read32(SPORT0_RX)
268#define bfin_write_SPORT0_RX32(val) bfin_write32(SPORT0_RX32, val) 268#define bfin_write_SPORT0_RX32(val) bfin_write32(SPORT0_RX, val)
269#define bfin_read_SPORT0_TX16() bfin_read16(SPORT0_TX16) 269#define bfin_read_SPORT0_TX16() bfin_read16(SPORT0_TX)
270#define bfin_write_SPORT0_TX16(val) bfin_write16(SPORT0_TX16, val) 270#define bfin_write_SPORT0_TX16(val) bfin_write16(SPORT0_TX, val)
271#define bfin_read_SPORT0_RX16() bfin_read16(SPORT0_RX16) 271#define bfin_read_SPORT0_RX16() bfin_read16(SPORT0_RX)
272#define bfin_write_SPORT0_RX16(val) bfin_write16(SPORT0_RX16, val) 272#define bfin_write_SPORT0_RX16(val) bfin_write16(SPORT0_RX, val)
273#define bfin_read_SPORT0_RCR1() bfin_read16(SPORT0_RCR1) 273#define bfin_read_SPORT0_RCR1() bfin_read16(SPORT0_RCR1)
274#define bfin_write_SPORT0_RCR1(val) bfin_write16(SPORT0_RCR1, val) 274#define bfin_write_SPORT0_RCR1(val) bfin_write16(SPORT0_RCR1, val)
275#define bfin_read_SPORT0_RCR2() bfin_read16(SPORT0_RCR2) 275#define bfin_read_SPORT0_RCR2() bfin_read16(SPORT0_RCR2)
@@ -317,14 +317,14 @@
317#define bfin_write_SPORT1_TX(val) bfin_write32(SPORT1_TX, val) 317#define bfin_write_SPORT1_TX(val) bfin_write32(SPORT1_TX, val)
318#define bfin_read_SPORT1_RX() bfin_read32(SPORT1_RX) 318#define bfin_read_SPORT1_RX() bfin_read32(SPORT1_RX)
319#define bfin_write_SPORT1_RX(val) bfin_write32(SPORT1_RX, val) 319#define bfin_write_SPORT1_RX(val) bfin_write32(SPORT1_RX, val)
320#define bfin_read_SPORT1_TX32() bfin_read32(SPORT1_TX32) 320#define bfin_read_SPORT1_TX32() bfin_read32(SPORT1_TX)
321#define bfin_write_SPORT1_TX32(val) bfin_write32(SPORT1_TX32, val) 321#define bfin_write_SPORT1_TX32(val) bfin_write32(SPORT1_TX, val)
322#define bfin_read_SPORT1_RX32() bfin_read32(SPORT1_RX32) 322#define bfin_read_SPORT1_RX32() bfin_read32(SPORT1_RX)
323#define bfin_write_SPORT1_RX32(val) bfin_write32(SPORT1_RX32, val) 323#define bfin_write_SPORT1_RX32(val) bfin_write32(SPORT1_RX, val)
324#define bfin_read_SPORT1_TX16() bfin_read16(SPORT1_TX16) 324#define bfin_read_SPORT1_TX16() bfin_read16(SPORT1_TX)
325#define bfin_write_SPORT1_TX16(val) bfin_write16(SPORT1_TX16, val) 325#define bfin_write_SPORT1_TX16(val) bfin_write16(SPORT1_TX, val)
326#define bfin_read_SPORT1_RX16() bfin_read16(SPORT1_RX16) 326#define bfin_read_SPORT1_RX16() bfin_read16(SPORT1_RX)
327#define bfin_write_SPORT1_RX16(val) bfin_write16(SPORT1_RX16, val) 327#define bfin_write_SPORT1_RX16(val) bfin_write16(SPORT1_RX, val)
328#define bfin_read_SPORT1_RCR1() bfin_read16(SPORT1_RCR1) 328#define bfin_read_SPORT1_RCR1() bfin_read16(SPORT1_RCR1)
329#define bfin_write_SPORT1_RCR1(val) bfin_write16(SPORT1_RCR1, val) 329#define bfin_write_SPORT1_RCR1(val) bfin_write16(SPORT1_RCR1, val)
330#define bfin_read_SPORT1_RCR2() bfin_read16(SPORT1_RCR2) 330#define bfin_read_SPORT1_RCR2() bfin_read16(SPORT1_RCR2)
diff --git a/arch/blackfin/mach-bf518/include/mach/defBF51x_base.h b/arch/blackfin/mach-bf518/include/mach/defBF51x_base.h
index 037a51fd8e93..5f84913dcd91 100644
--- a/arch/blackfin/mach-bf518/include/mach/defBF51x_base.h
+++ b/arch/blackfin/mach-bf518/include/mach/defBF51x_base.h
@@ -748,51 +748,6 @@
748#define FFE 0x20 /* Force Framing Error On Transmit */ 748#define FFE 0x20 /* Force Framing Error On Transmit */
749 749
750 750
751/* *********** SERIAL PERIPHERAL INTERFACE (SPI) MASKS ****************************/
752/* SPI_CTL Masks */
753#define TIMOD 0x0003 /* Transfer Initiate Mode */
754#define RDBR_CORE 0x0000 /* RDBR Read Initiates, IRQ When RDBR Full */
755#define TDBR_CORE 0x0001 /* TDBR Write Initiates, IRQ When TDBR Empty */
756#define RDBR_DMA 0x0002 /* DMA Read, DMA Until FIFO Empty */
757#define TDBR_DMA 0x0003 /* DMA Write, DMA Until FIFO Full */
758#define SZ 0x0004 /* Send Zero (When TDBR Empty, Send Zero/Last*) */
759#define GM 0x0008 /* Get More (When RDBR Full, Overwrite/Discard*) */
760#define PSSE 0x0010 /* Slave-Select Input Enable */
761#define EMISO 0x0020 /* Enable MISO As Output */
762#define SIZE 0x0100 /* Size of Words (16/8* Bits) */
763#define LSBF 0x0200 /* LSB First */
764#define CPHA 0x0400 /* Clock Phase */
765#define CPOL 0x0800 /* Clock Polarity */
766#define MSTR 0x1000 /* Master/Slave* */
767#define WOM 0x2000 /* Write Open Drain Master */
768#define SPE 0x4000 /* SPI Enable */
769
770/* SPI_FLG Masks */
771#define FLS1 0x0002 /* Enables SPI_FLOUT1 as SPI Slave-Select Output */
772#define FLS2 0x0004 /* Enables SPI_FLOUT2 as SPI Slave-Select Output */
773#define FLS3 0x0008 /* Enables SPI_FLOUT3 as SPI Slave-Select Output */
774#define FLS4 0x0010 /* Enables SPI_FLOUT4 as SPI Slave-Select Output */
775#define FLS5 0x0020 /* Enables SPI_FLOUT5 as SPI Slave-Select Output */
776#define FLS6 0x0040 /* Enables SPI_FLOUT6 as SPI Slave-Select Output */
777#define FLS7 0x0080 /* Enables SPI_FLOUT7 as SPI Slave-Select Output */
778#define FLG1 0xFDFF /* Activates SPI_FLOUT1 */
779#define FLG2 0xFBFF /* Activates SPI_FLOUT2 */
780#define FLG3 0xF7FF /* Activates SPI_FLOUT3 */
781#define FLG4 0xEFFF /* Activates SPI_FLOUT4 */
782#define FLG5 0xDFFF /* Activates SPI_FLOUT5 */
783#define FLG6 0xBFFF /* Activates SPI_FLOUT6 */
784#define FLG7 0x7FFF /* Activates SPI_FLOUT7 */
785
786/* SPI_STAT Masks */
787#define SPIF 0x0001 /* SPI Finished (Single-Word Transfer Complete) */
788#define MODF 0x0002 /* Mode Fault Error (Another Device Tried To Become Master) */
789#define TXE 0x0004 /* Transmission Error (Data Sent With No New Data In TDBR) */
790#define TXS 0x0008 /* SPI_TDBR Data Buffer Status (Full/Empty*) */
791#define RBSY 0x0010 /* Receive Error (Data Received With RDBR Full) */
792#define RXS 0x0020 /* SPI_RDBR Data Buffer Status (Full/Empty*) */
793#define TXCOL 0x0040 /* Transmit Collision Error (Corrupt Data May Have Been Sent) */
794
795
796/* **************** GENERAL PURPOSE TIMER MASKS **********************/ 751/* **************** GENERAL PURPOSE TIMER MASKS **********************/
797/* TIMER_ENABLE Masks */ 752/* TIMER_ENABLE Masks */
798#define TIMEN0 0x0001 /* Enable Timer 0 */ 753#define TIMEN0 0x0001 /* Enable Timer 0 */
diff --git a/arch/blackfin/mach-bf527/boards/Kconfig b/arch/blackfin/mach-bf527/boards/Kconfig
index b14c28810a44..1cc2667c10f1 100644
--- a/arch/blackfin/mach-bf527/boards/Kconfig
+++ b/arch/blackfin/mach-bf527/boards/Kconfig
@@ -24,4 +24,14 @@ config BFIN526_EZBRD
24 help 24 help
25 BF526-EZBRD/EZKIT Lite board support. 25 BF526-EZBRD/EZKIT Lite board support.
26 26
27config BFIN527_AD7160EVAL
28 bool "BF527-AD7160-EVAL"
29 help
30 BF527-AD7160-EVAL board support.
31
32config BFIN527_TLL6527M
33 bool "The Learning Labs TLL6527M"
34 help
35 TLL6527M V1.0 platform support
36
27endchoice 37endchoice
diff --git a/arch/blackfin/mach-bf527/boards/Makefile b/arch/blackfin/mach-bf527/boards/Makefile
index 51a5817c4a90..1d67da9f05ac 100644
--- a/arch/blackfin/mach-bf527/boards/Makefile
+++ b/arch/blackfin/mach-bf527/boards/Makefile
@@ -6,3 +6,5 @@ obj-$(CONFIG_BFIN527_EZKIT) += ezkit.o
6obj-$(CONFIG_BFIN527_EZKIT_V2) += ezkit.o 6obj-$(CONFIG_BFIN527_EZKIT_V2) += ezkit.o
7obj-$(CONFIG_BFIN527_BLUETECHNIX_CM) += cm_bf527.o 7obj-$(CONFIG_BFIN527_BLUETECHNIX_CM) += cm_bf527.o
8obj-$(CONFIG_BFIN526_EZBRD) += ezbrd.o 8obj-$(CONFIG_BFIN526_EZBRD) += ezbrd.o
9obj-$(CONFIG_BFIN527_AD7160EVAL) += ad7160eval.o
10obj-$(CONFIG_BFIN527_TLL6527M) += tll6527m.o
diff --git a/arch/blackfin/mach-bf527/boards/ad7160eval.c b/arch/blackfin/mach-bf527/boards/ad7160eval.c
new file mode 100644
index 000000000000..fc767ac76381
--- /dev/null
+++ b/arch/blackfin/mach-bf527/boards/ad7160eval.c
@@ -0,0 +1,870 @@
1/*
2 * Copyright 2004-20010 Analog Devices Inc.
3 * 2005 National ICT Australia (NICTA)
4 * Aidan Williams <aidan@nicta.com.au>
5 *
6 * Licensed under the GPL-2 or later.
7 */
8
9#include <linux/device.h>
10#include <linux/platform_device.h>
11#include <linux/mtd/mtd.h>
12#include <linux/mtd/partitions.h>
13#include <linux/mtd/physmap.h>
14#include <linux/spi/spi.h>
15#include <linux/spi/flash.h>
16#include <linux/i2c.h>
17#include <linux/irq.h>
18#include <linux/interrupt.h>
19#include <linux/usb/musb.h>
20#include <linux/leds.h>
21#include <linux/input.h>
22#include <asm/dma.h>
23#include <asm/bfin5xx_spi.h>
24#include <asm/reboot.h>
25#include <asm/nand.h>
26#include <asm/portmux.h>
27#include <asm/dpmc.h>
28
29
30/*
31 * Name the Board for the /proc/cpuinfo
32 */
33const char bfin_board_name[] = "ADI BF527-AD7160EVAL";
34
35/*
36 * Driver needs to know address, irq and flag pin.
37 */
38
39#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
40static struct resource musb_resources[] = {
41 [0] = {
42 .start = 0xffc03800,
43 .end = 0xffc03cff,
44 .flags = IORESOURCE_MEM,
45 },
46 [1] = { /* general IRQ */
47 .start = IRQ_USB_INT0,
48 .end = IRQ_USB_INT0,
49 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
50 },
51 [2] = { /* DMA IRQ */
52 .start = IRQ_USB_DMA,
53 .end = IRQ_USB_DMA,
54 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
55 },
56};
57
58static struct musb_hdrc_config musb_config = {
59 .multipoint = 0,
60 .dyn_fifo = 0,
61 .soft_con = 1,
62 .dma = 1,
63 .num_eps = 8,
64 .dma_channels = 8,
65 .gpio_vrsel = GPIO_PG13,
66 /* Some custom boards need to be active low, just set it to "0"
67 * if it is the case.
68 */
69 .gpio_vrsel_active = 1,
70};
71
72static struct musb_hdrc_platform_data musb_plat = {
73#if defined(CONFIG_USB_MUSB_OTG)
74 .mode = MUSB_OTG,
75#elif defined(CONFIG_USB_MUSB_HDRC_HCD)
76 .mode = MUSB_HOST,
77#elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
78 .mode = MUSB_PERIPHERAL,
79#endif
80 .config = &musb_config,
81};
82
83static u64 musb_dmamask = ~(u32)0;
84
85static struct platform_device musb_device = {
86 .name = "musb_hdrc",
87 .id = 0,
88 .dev = {
89 .dma_mask = &musb_dmamask,
90 .coherent_dma_mask = 0xffffffff,
91 .platform_data = &musb_plat,
92 },
93 .num_resources = ARRAY_SIZE(musb_resources),
94 .resource = musb_resources,
95};
96#endif
97
98#if defined(CONFIG_FB_BFIN_RA158Z) || defined(CONFIG_FB_BFIN_RA158Z_MODULE)
99static struct resource bf52x_ra158z_resources[] = {
100 {
101 .start = IRQ_PPI_ERROR,
102 .end = IRQ_PPI_ERROR,
103 .flags = IORESOURCE_IRQ,
104 },
105};
106
107static struct platform_device bf52x_ra158z_device = {
108 .name = "bfin-ra158z",
109 .id = -1,
110 .num_resources = ARRAY_SIZE(bf52x_ra158z_resources),
111 .resource = bf52x_ra158z_resources,
112};
113#endif
114
115#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
116static struct mtd_partition ad7160eval_partitions[] = {
117 {
118 .name = "bootloader(nor)",
119 .size = 0x40000,
120 .offset = 0,
121 }, {
122 .name = "linux kernel(nor)",
123 .size = 0x1C0000,
124 .offset = MTDPART_OFS_APPEND,
125 }, {
126 .name = "file system(nor)",
127 .size = MTDPART_SIZ_FULL,
128 .offset = MTDPART_OFS_APPEND,
129 }
130};
131
132static struct physmap_flash_data ad7160eval_flash_data = {
133 .width = 2,
134 .parts = ad7160eval_partitions,
135 .nr_parts = ARRAY_SIZE(ad7160eval_partitions),
136};
137
138static struct resource ad7160eval_flash_resource = {
139 .start = 0x20000000,
140 .end = 0x203fffff,
141 .flags = IORESOURCE_MEM,
142};
143
144static struct platform_device ad7160eval_flash_device = {
145 .name = "physmap-flash",
146 .id = 0,
147 .dev = {
148 .platform_data = &ad7160eval_flash_data,
149 },
150 .num_resources = 1,
151 .resource = &ad7160eval_flash_resource,
152};
153#endif
154
155#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
156static struct mtd_partition partition_info[] = {
157 {
158 .name = "linux kernel(nand)",
159 .offset = 0,
160 .size = 4 * 1024 * 1024,
161 },
162 {
163 .name = "file system(nand)",
164 .offset = MTDPART_OFS_APPEND,
165 .size = MTDPART_SIZ_FULL,
166 },
167};
168
169static struct bf5xx_nand_platform bf5xx_nand_platform = {
170 .data_width = NFC_NWIDTH_8,
171 .partitions = partition_info,
172 .nr_partitions = ARRAY_SIZE(partition_info),
173 .rd_dly = 3,
174 .wr_dly = 3,
175};
176
177static struct resource bf5xx_nand_resources[] = {
178 {
179 .start = NFC_CTL,
180 .end = NFC_DATA_RD + 2,
181 .flags = IORESOURCE_MEM,
182 },
183 {
184 .start = CH_NFC,
185 .end = CH_NFC,
186 .flags = IORESOURCE_IRQ,
187 },
188};
189
190static struct platform_device bf5xx_nand_device = {
191 .name = "bf5xx-nand",
192 .id = 0,
193 .num_resources = ARRAY_SIZE(bf5xx_nand_resources),
194 .resource = bf5xx_nand_resources,
195 .dev = {
196 .platform_data = &bf5xx_nand_platform,
197 },
198};
199#endif
200
201#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
202static struct platform_device rtc_device = {
203 .name = "rtc-bfin",
204 .id = -1,
205};
206#endif
207
208#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
209#include <linux/bfin_mac.h>
210static const unsigned short bfin_mac_peripherals[] = P_RMII0;
211
212static struct bfin_phydev_platform_data bfin_phydev_data[] = {
213 {
214 .addr = 1,
215 .irq = IRQ_MAC_PHYINT,
216 },
217};
218
219static struct bfin_mii_bus_platform_data bfin_mii_bus_data = {
220 .phydev_number = 1,
221 .phydev_data = bfin_phydev_data,
222 .phy_mode = PHY_INTERFACE_MODE_RMII,
223 .mac_peripherals = bfin_mac_peripherals,
224};
225
226static struct platform_device bfin_mii_bus = {
227 .name = "bfin_mii_bus",
228 .dev = {
229 .platform_data = &bfin_mii_bus_data,
230 }
231};
232
233static struct platform_device bfin_mac_device = {
234 .name = "bfin_mac",
235 .dev = {
236 .platform_data = &bfin_mii_bus,
237 }
238};
239#endif
240
241
242#if defined(CONFIG_MTD_M25P80) \
243 || defined(CONFIG_MTD_M25P80_MODULE)
244static struct mtd_partition bfin_spi_flash_partitions[] = {
245 {
246 .name = "bootloader(spi)",
247 .size = 0x00040000,
248 .offset = 0,
249 .mask_flags = MTD_CAP_ROM
250 }, {
251 .name = "linux kernel(spi)",
252 .size = MTDPART_SIZ_FULL,
253 .offset = MTDPART_OFS_APPEND,
254 }
255};
256
257static struct flash_platform_data bfin_spi_flash_data = {
258 .name = "m25p80",
259 .parts = bfin_spi_flash_partitions,
260 .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
261 .type = "m25p16",
262};
263
264/* SPI flash chip (m25p64) */
265static struct bfin5xx_spi_chip spi_flash_chip_info = {
266 .enable_dma = 0, /* use dma transfer with this chip*/
267 .bits_per_word = 8,
268};
269#endif
270
271#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \
272 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
273static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
274 .enable_dma = 0,
275 .bits_per_word = 16,
276};
277#endif
278
279#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
280static struct bfin5xx_spi_chip mmc_spi_chip_info = {
281 .enable_dma = 0,
282 .bits_per_word = 8,
283};
284#endif
285
286#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
287static struct bfin5xx_spi_chip spidev_chip_info = {
288 .enable_dma = 0,
289 .bits_per_word = 8,
290};
291#endif
292
293#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
294static struct platform_device bfin_i2s = {
295 .name = "bfin-i2s",
296 .id = CONFIG_SND_BF5XX_SPORT_NUM,
297 /* TODO: add platform data here */
298};
299#endif
300
301#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE)
302static struct platform_device bfin_tdm = {
303 .name = "bfin-tdm",
304 .id = CONFIG_SND_BF5XX_SPORT_NUM,
305 /* TODO: add platform data here */
306};
307#endif
308
309static struct spi_board_info bfin_spi_board_info[] __initdata = {
310#if defined(CONFIG_MTD_M25P80) \
311 || defined(CONFIG_MTD_M25P80_MODULE)
312 {
313 /* the modalias must be the same as spi device driver name */
314 .modalias = "m25p80", /* Name of spi_driver for this device */
315 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
316 .bus_num = 0, /* Framework bus number */
317 .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
318 .platform_data = &bfin_spi_flash_data,
319 .controller_data = &spi_flash_chip_info,
320 .mode = SPI_MODE_3,
321 },
322#endif
323#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \
324 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
325 {
326 .modalias = "ad183x",
327 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
328 .bus_num = 0,
329 .chip_select = 4,
330 .controller_data = &ad1836_spi_chip_info,
331 },
332#endif
333#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
334 {
335 .modalias = "mmc_spi",
336 .max_speed_hz = 30000000, /* max spi clock (SCK) speed in HZ */
337 .bus_num = 0,
338 .chip_select = GPIO_PH3 + MAX_CTRL_CS,
339 .controller_data = &mmc_spi_chip_info,
340 .mode = SPI_MODE_3,
341 },
342#endif
343#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
344 {
345 .modalias = "spidev",
346 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
347 .bus_num = 0,
348 .chip_select = 1,
349 .controller_data = &spidev_chip_info,
350 },
351#endif
352};
353
354#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
355/* SPI controller data */
356static struct bfin5xx_spi_master bfin_spi0_info = {
357 .num_chipselect = MAX_CTRL_CS + MAX_BLACKFIN_GPIOS,
358 .enable_dma = 1, /* master has the ability to do dma transfer */
359 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
360};
361
362/* SPI (0) */
363static struct resource bfin_spi0_resource[] = {
364 [0] = {
365 .start = SPI0_REGBASE,
366 .end = SPI0_REGBASE + 0xFF,
367 .flags = IORESOURCE_MEM,
368 },
369 [1] = {
370 .start = CH_SPI,
371 .end = CH_SPI,
372 .flags = IORESOURCE_DMA,
373 },
374 [2] = {
375 .start = IRQ_SPI,
376 .end = IRQ_SPI,
377 .flags = IORESOURCE_IRQ,
378 },
379};
380
381static struct platform_device bfin_spi0_device = {
382 .name = "bfin-spi",
383 .id = 0, /* Bus number */
384 .num_resources = ARRAY_SIZE(bfin_spi0_resource),
385 .resource = bfin_spi0_resource,
386 .dev = {
387 .platform_data = &bfin_spi0_info, /* Passed to driver */
388 },
389};
390#endif /* spi master and devices */
391
392#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
393#ifdef CONFIG_SERIAL_BFIN_UART0
394static struct resource bfin_uart0_resources[] = {
395 {
396 .start = UART0_THR,
397 .end = UART0_GCTL+2,
398 .flags = IORESOURCE_MEM,
399 },
400 {
401 .start = IRQ_UART0_RX,
402 .end = IRQ_UART0_RX+1,
403 .flags = IORESOURCE_IRQ,
404 },
405 {
406 .start = IRQ_UART0_ERROR,
407 .end = IRQ_UART0_ERROR,
408 .flags = IORESOURCE_IRQ,
409 },
410 {
411 .start = CH_UART0_TX,
412 .end = CH_UART0_TX,
413 .flags = IORESOURCE_DMA,
414 },
415 {
416 .start = CH_UART0_RX,
417 .end = CH_UART0_RX,
418 .flags = IORESOURCE_DMA,
419 },
420};
421
422unsigned short bfin_uart0_peripherals[] = {
423 P_UART0_TX, P_UART0_RX, 0
424};
425
426static struct platform_device bfin_uart0_device = {
427 .name = "bfin-uart",
428 .id = 0,
429 .num_resources = ARRAY_SIZE(bfin_uart0_resources),
430 .resource = bfin_uart0_resources,
431 .dev = {
432 .platform_data = &bfin_uart0_peripherals, /* Passed to driver */
433 },
434};
435#endif
436#ifdef CONFIG_SERIAL_BFIN_UART1
437static struct resource bfin_uart1_resources[] = {
438 {
439 .start = UART1_THR,
440 .end = UART1_GCTL+2,
441 .flags = IORESOURCE_MEM,
442 },
443 {
444 .start = IRQ_UART1_RX,
445 .end = IRQ_UART1_RX+1,
446 .flags = IORESOURCE_IRQ,
447 },
448 {
449 .start = IRQ_UART1_ERROR,
450 .end = IRQ_UART1_ERROR,
451 .flags = IORESOURCE_IRQ,
452 },
453 {
454 .start = CH_UART1_TX,
455 .end = CH_UART1_TX,
456 .flags = IORESOURCE_DMA,
457 },
458 {
459 .start = CH_UART1_RX,
460 .end = CH_UART1_RX,
461 .flags = IORESOURCE_DMA,
462 },
463#ifdef CONFIG_BFIN_UART1_CTSRTS
464 { /* CTS pin */
465 .start = GPIO_PF9,
466 .end = GPIO_PF9,
467 .flags = IORESOURCE_IO,
468 },
469 { /* RTS pin */
470 .start = GPIO_PF10,
471 .end = GPIO_PF10,
472 .flags = IORESOURCE_IO,
473 },
474#endif
475};
476
477unsigned short bfin_uart1_peripherals[] = {
478 P_UART1_TX, P_UART1_RX, 0
479};
480
481static struct platform_device bfin_uart1_device = {
482 .name = "bfin-uart",
483 .id = 1,
484 .num_resources = ARRAY_SIZE(bfin_uart1_resources),
485 .resource = bfin_uart1_resources,
486 .dev = {
487 .platform_data = &bfin_uart1_peripherals, /* Passed to driver */
488 },
489};
490#endif
491#endif
492
493#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
494#ifdef CONFIG_BFIN_SIR0
495static struct resource bfin_sir0_resources[] = {
496 {
497 .start = 0xFFC00400,
498 .end = 0xFFC004FF,
499 .flags = IORESOURCE_MEM,
500 },
501 {
502 .start = IRQ_UART0_RX,
503 .end = IRQ_UART0_RX+1,
504 .flags = IORESOURCE_IRQ,
505 },
506 {
507 .start = CH_UART0_RX,
508 .end = CH_UART0_RX+1,
509 .flags = IORESOURCE_DMA,
510 },
511};
512
513static struct platform_device bfin_sir0_device = {
514 .name = "bfin_sir",
515 .id = 0,
516 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
517 .resource = bfin_sir0_resources,
518};
519#endif
520#ifdef CONFIG_BFIN_SIR1
521static struct resource bfin_sir1_resources[] = {
522 {
523 .start = 0xFFC02000,
524 .end = 0xFFC020FF,
525 .flags = IORESOURCE_MEM,
526 },
527 {
528 .start = IRQ_UART1_RX,
529 .end = IRQ_UART1_RX+1,
530 .flags = IORESOURCE_IRQ,
531 },
532 {
533 .start = CH_UART1_RX,
534 .end = CH_UART1_RX+1,
535 .flags = IORESOURCE_DMA,
536 },
537};
538
539static struct platform_device bfin_sir1_device = {
540 .name = "bfin_sir",
541 .id = 1,
542 .num_resources = ARRAY_SIZE(bfin_sir1_resources),
543 .resource = bfin_sir1_resources,
544};
545#endif
546#endif
547
548#if defined(CONFIG_TOUCHSCREEN_AD7160) || defined(CONFIG_TOUCHSCREEN_AD7160_MODULE)
549#include <linux/input/ad7160.h>
550static const struct ad7160_platform_data bfin_ad7160_ts_info = {
551 .sensor_x_res = 854,
552 .sensor_y_res = 480,
553 .pressure = 100,
554 .filter_coef = 3,
555 .coord_pref = AD7160_ORIG_TOP_LEFT,
556 .first_touch_window = 5,
557 .move_window = 3,
558 .event_cabs = AD7160_EMIT_ABS_MT_TRACKING_ID |
559 AD7160_EMIT_ABS_MT_PRESSURE |
560 AD7160_TRACKING_ID_ASCENDING,
561 .finger_act_ctrl = 0x64,
562 .haptic_effect1_ctrl = AD7160_HAPTIC_SLOT_A(60) |
563 AD7160_HAPTIC_SLOT_A_LVL_HIGH |
564 AD7160_HAPTIC_SLOT_B(60) |
565 AD7160_HAPTIC_SLOT_B_LVL_LOW,
566
567 .haptic_effect2_ctrl = AD7160_HAPTIC_SLOT_A(20) |
568 AD7160_HAPTIC_SLOT_A_LVL_HIGH |
569 AD7160_HAPTIC_SLOT_B(80) |
570 AD7160_HAPTIC_SLOT_B_LVL_LOW |
571 AD7160_HAPTIC_SLOT_C(120) |
572 AD7160_HAPTIC_SLOT_C_LVL_HIGH |
573 AD7160_HAPTIC_SLOT_D(30) |
574 AD7160_HAPTIC_SLOT_D_LVL_LOW,
575};
576#endif
577
578#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
579static struct resource bfin_twi0_resource[] = {
580 [0] = {
581 .start = TWI0_REGBASE,
582 .end = TWI0_REGBASE,
583 .flags = IORESOURCE_MEM,
584 },
585 [1] = {
586 .start = IRQ_TWI,
587 .end = IRQ_TWI,
588 .flags = IORESOURCE_IRQ,
589 },
590};
591
592static struct platform_device i2c_bfin_twi_device = {
593 .name = "i2c-bfin-twi",
594 .id = 0,
595 .num_resources = ARRAY_SIZE(bfin_twi0_resource),
596 .resource = bfin_twi0_resource,
597};
598#endif
599
600static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
601#if defined(CONFIG_TOUCHSCREEN_AD7160) || defined(CONFIG_TOUCHSCREEN_AD7160_MODULE)
602 {
603 I2C_BOARD_INFO("ad7160", 0x33),
604 .irq = IRQ_PH1,
605 .platform_data = (void *)&bfin_ad7160_ts_info,
606 },
607#endif
608};
609
610#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
611#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
612static struct resource bfin_sport0_uart_resources[] = {
613 {
614 .start = SPORT0_TCR1,
615 .end = SPORT0_MRCS3+4,
616 .flags = IORESOURCE_MEM,
617 },
618 {
619 .start = IRQ_SPORT0_RX,
620 .end = IRQ_SPORT0_RX+1,
621 .flags = IORESOURCE_IRQ,
622 },
623 {
624 .start = IRQ_SPORT0_ERROR,
625 .end = IRQ_SPORT0_ERROR,
626 .flags = IORESOURCE_IRQ,
627 },
628};
629
630unsigned short bfin_sport0_peripherals[] = {
631 P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
632 P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0
633};
634
635static struct platform_device bfin_sport0_uart_device = {
636 .name = "bfin-sport-uart",
637 .id = 0,
638 .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources),
639 .resource = bfin_sport0_uart_resources,
640 .dev = {
641 .platform_data = &bfin_sport0_peripherals, /* Passed to driver */
642 },
643};
644#endif
645#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
646static struct resource bfin_sport1_uart_resources[] = {
647 {
648 .start = SPORT1_TCR1,
649 .end = SPORT1_MRCS3+4,
650 .flags = IORESOURCE_MEM,
651 },
652 {
653 .start = IRQ_SPORT1_RX,
654 .end = IRQ_SPORT1_RX+1,
655 .flags = IORESOURCE_IRQ,
656 },
657 {
658 .start = IRQ_SPORT1_ERROR,
659 .end = IRQ_SPORT1_ERROR,
660 .flags = IORESOURCE_IRQ,
661 },
662};
663
664unsigned short bfin_sport1_peripherals[] = {
665 P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS,
666 P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0
667};
668
669static struct platform_device bfin_sport1_uart_device = {
670 .name = "bfin-sport-uart",
671 .id = 1,
672 .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources),
673 .resource = bfin_sport1_uart_resources,
674 .dev = {
675 .platform_data = &bfin_sport1_peripherals, /* Passed to driver */
676 },
677};
678#endif
679#endif
680
681#if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE)
682#include <asm/bfin_rotary.h>
683
684static struct bfin_rotary_platform_data bfin_rotary_data = {
685 /*.rotary_up_key = KEY_UP,*/
686 /*.rotary_down_key = KEY_DOWN,*/
687 .rotary_rel_code = REL_WHEEL,
688 .rotary_button_key = KEY_ENTER,
689 .debounce = 10, /* 0..17 */
690 .mode = ROT_QUAD_ENC | ROT_DEBE,
691};
692
693static struct resource bfin_rotary_resources[] = {
694 {
695 .start = IRQ_CNT,
696 .end = IRQ_CNT,
697 .flags = IORESOURCE_IRQ,
698 },
699};
700
701static struct platform_device bfin_rotary_device = {
702 .name = "bfin-rotary",
703 .id = -1,
704 .num_resources = ARRAY_SIZE(bfin_rotary_resources),
705 .resource = bfin_rotary_resources,
706 .dev = {
707 .platform_data = &bfin_rotary_data,
708 },
709};
710#endif
711
712static const unsigned int cclk_vlev_datasheet[] = {
713 VRPAIR(VLEV_100, 400000000),
714 VRPAIR(VLEV_105, 426000000),
715 VRPAIR(VLEV_110, 500000000),
716 VRPAIR(VLEV_115, 533000000),
717 VRPAIR(VLEV_120, 600000000),
718};
719
720static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = {
721 .tuple_tab = cclk_vlev_datasheet,
722 .tabsize = ARRAY_SIZE(cclk_vlev_datasheet),
723 .vr_settling_time = 25 /* us */,
724};
725
726static struct platform_device bfin_dpmc = {
727 .name = "bfin dpmc",
728 .dev = {
729 .platform_data = &bfin_dmpc_vreg_data,
730 },
731};
732
733static struct platform_device *stamp_devices[] __initdata = {
734
735 &bfin_dpmc,
736
737#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
738 &bf5xx_nand_device,
739#endif
740
741#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
742 &rtc_device,
743#endif
744
745#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
746 &musb_device,
747#endif
748
749#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
750 &bfin_mii_bus,
751 &bfin_mac_device,
752#endif
753
754#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
755 &bfin_spi0_device,
756#endif
757
758#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
759#ifdef CONFIG_SERIAL_BFIN_UART0
760 &bfin_uart0_device,
761#endif
762#ifdef CONFIG_SERIAL_BFIN_UART1
763 &bfin_uart1_device,
764#endif
765#endif
766
767#if defined(CONFIG_FB_BFIN_RA158Z) || defined(CONFIG_FB_BFIN_RA158Z_MODULE)
768 &bf52x_ra158z_device,
769#endif
770
771#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
772#ifdef CONFIG_BFIN_SIR0
773 &bfin_sir0_device,
774#endif
775#ifdef CONFIG_BFIN_SIR1
776 &bfin_sir1_device,
777#endif
778#endif
779
780#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
781 &i2c_bfin_twi_device,
782#endif
783
784#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
785#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
786 &bfin_sport0_uart_device,
787#endif
788#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
789 &bfin_sport1_uart_device,
790#endif
791#endif
792
793#if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE)
794 &bfin_rotary_device,
795#endif
796
797#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
798 &ad7160eval_flash_device,
799#endif
800
801#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
802 &bfin_i2s,
803#endif
804
805#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE)
806 &bfin_tdm,
807#endif
808};
809
810static int __init ad7160eval_init(void)
811{
812 printk(KERN_INFO "%s(): registering device resources\n", __func__);
813 i2c_register_board_info(0, bfin_i2c_board_info,
814 ARRAY_SIZE(bfin_i2c_board_info));
815 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
816 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
817 return 0;
818}
819
820arch_initcall(ad7160eval_init);
821
822static struct platform_device *ad7160eval_early_devices[] __initdata = {
823#if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK)
824#ifdef CONFIG_SERIAL_BFIN_UART0
825 &bfin_uart0_device,
826#endif
827#ifdef CONFIG_SERIAL_BFIN_UART1
828 &bfin_uart1_device,
829#endif
830#endif
831
832#if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE)
833#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
834 &bfin_sport0_uart_device,
835#endif
836#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
837 &bfin_sport1_uart_device,
838#endif
839#endif
840};
841
842void __init native_machine_early_platform_add_devices(void)
843{
844 printk(KERN_INFO "register early platform devices\n");
845 early_platform_add_devices(ad7160eval_early_devices,
846 ARRAY_SIZE(ad7160eval_early_devices));
847}
848
849void native_machine_restart(char *cmd)
850{
851 /* workaround reboot hang when booting from SPI */
852 if ((bfin_read_SYSCR() & 0x7) == 0x3)
853 bfin_reset_boot_spi_cs(P_DEFAULT_BOOT_SPI_CS);
854}
855
856void bfin_get_ether_addr(char *addr)
857{
858 /* the MAC is stored in OTP memory page 0xDF */
859 u32 ret;
860 u64 otp_mac;
861 u32 (*otp_read)(u32 page, u32 flags, u64 *page_content) = (void *)0xEF00001A;
862
863 ret = otp_read(0xDF, 0x00, &otp_mac);
864 if (!(ret & 0x1)) {
865 char *otp_mac_p = (char *)&otp_mac;
866 for (ret = 0; ret < 6; ++ret)
867 addr[ret] = otp_mac_p[5 - ret];
868 }
869}
870EXPORT_SYMBOL(bfin_get_ether_addr);
diff --git a/arch/blackfin/mach-bf527/boards/cm_bf527.c b/arch/blackfin/mach-bf527/boards/cm_bf527.c
index 645ba5c8077b..2c31af7a320a 100644
--- a/arch/blackfin/mach-bf527/boards/cm_bf527.c
+++ b/arch/blackfin/mach-bf527/boards/cm_bf527.c
@@ -273,13 +273,35 @@ static struct platform_device dm9000_device = {
273#endif 273#endif
274 274
275#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 275#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
276#include <linux/bfin_mac.h>
277static const unsigned short bfin_mac_peripherals[] = P_RMII0;
278
279static struct bfin_phydev_platform_data bfin_phydev_data[] = {
280 {
281 .addr = 1,
282 .irq = IRQ_MAC_PHYINT,
283 },
284};
285
286static struct bfin_mii_bus_platform_data bfin_mii_bus_data = {
287 .phydev_number = 1,
288 .phydev_data = bfin_phydev_data,
289 .phy_mode = PHY_INTERFACE_MODE_RMII,
290 .mac_peripherals = bfin_mac_peripherals,
291};
292
276static struct platform_device bfin_mii_bus = { 293static struct platform_device bfin_mii_bus = {
277 .name = "bfin_mii_bus", 294 .name = "bfin_mii_bus",
295 .dev = {
296 .platform_data = &bfin_mii_bus_data,
297 }
278}; 298};
279 299
280static struct platform_device bfin_mac_device = { 300static struct platform_device bfin_mac_device = {
281 .name = "bfin_mac", 301 .name = "bfin_mac",
282 .dev.platform_data = &bfin_mii_bus, 302 .dev = {
303 .platform_data = &bfin_mii_bus,
304 }
283}; 305};
284#endif 306#endif
285 307
@@ -342,8 +364,8 @@ static struct bfin5xx_spi_chip spi_adc_chip_info = {
342}; 364};
343#endif 365#endif
344 366
345#if defined(CONFIG_SND_BLACKFIN_AD183X) \ 367#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \
346 || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) 368 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
347static struct bfin5xx_spi_chip ad1836_spi_chip_info = { 369static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
348 .enable_dma = 0, 370 .enable_dma = 0,
349 .bits_per_word = 16, 371 .bits_per_word = 16,
@@ -420,13 +442,13 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
420 }, 442 },
421#endif 443#endif
422 444
423#if defined(CONFIG_SND_BLACKFIN_AD183X) \ 445#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \
424 || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) 446 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
425 { 447 {
426 .modalias = "ad1836", 448 .modalias = "ad183x",
427 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 449 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
428 .bus_num = 0, 450 .bus_num = 0,
429 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 451 .chip_select = 4,
430 .controller_data = &ad1836_spi_chip_info, 452 .controller_data = &ad1836_spi_chip_info,
431 }, 453 },
432#endif 454#endif
diff --git a/arch/blackfin/mach-bf527/boards/ezbrd.c b/arch/blackfin/mach-bf527/boards/ezbrd.c
index c975fe88eba3..9a736a850c5c 100644
--- a/arch/blackfin/mach-bf527/boards/ezbrd.c
+++ b/arch/blackfin/mach-bf527/boards/ezbrd.c
@@ -137,8 +137,12 @@ static struct platform_device ezbrd_flash_device = {
137#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 137#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
138static struct mtd_partition partition_info[] = { 138static struct mtd_partition partition_info[] = {
139 { 139 {
140 .name = "linux kernel(nand)", 140 .name = "bootloader(nand)",
141 .offset = 0, 141 .offset = 0,
142 .size = 0x40000,
143 }, {
144 .name = "linux kernel(nand)",
145 .offset = MTDPART_OFS_APPEND,
142 .size = 4 * 1024 * 1024, 146 .size = 4 * 1024 * 1024,
143 }, 147 },
144 { 148 {
@@ -189,13 +193,35 @@ static struct platform_device rtc_device = {
189 193
190 194
191#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 195#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
196#include <linux/bfin_mac.h>
197static const unsigned short bfin_mac_peripherals[] = P_RMII0;
198
199static struct bfin_phydev_platform_data bfin_phydev_data[] = {
200 {
201 .addr = 1,
202 .irq = IRQ_MAC_PHYINT,
203 },
204};
205
206static struct bfin_mii_bus_platform_data bfin_mii_bus_data = {
207 .phydev_number = 1,
208 .phydev_data = bfin_phydev_data,
209 .phy_mode = PHY_INTERFACE_MODE_RMII,
210 .mac_peripherals = bfin_mac_peripherals,
211};
212
192static struct platform_device bfin_mii_bus = { 213static struct platform_device bfin_mii_bus = {
193 .name = "bfin_mii_bus", 214 .name = "bfin_mii_bus",
215 .dev = {
216 .platform_data = &bfin_mii_bus_data,
217 }
194}; 218};
195 219
196static struct platform_device bfin_mac_device = { 220static struct platform_device bfin_mac_device = {
197 .name = "bfin_mac", 221 .name = "bfin_mac",
198 .dev.platform_data = &bfin_mii_bus, 222 .dev = {
223 .platform_data = &bfin_mii_bus,
224 }
199}; 225};
200#endif 226#endif
201 227
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c
index 87b41e994ba3..9222bc00bbd3 100644
--- a/arch/blackfin/mach-bf527/boards/ezkit.c
+++ b/arch/blackfin/mach-bf527/boards/ezkit.c
@@ -222,8 +222,12 @@ static struct platform_device ezkit_flash_device = {
222#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 222#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
223static struct mtd_partition partition_info[] = { 223static struct mtd_partition partition_info[] = {
224 { 224 {
225 .name = "linux kernel(nand)", 225 .name = "bootloader(nand)",
226 .offset = 0, 226 .offset = 0,
227 .size = 0x40000,
228 }, {
229 .name = "linux kernel(nand)",
230 .offset = MTDPART_OFS_APPEND,
227 .size = 4 * 1024 * 1024, 231 .size = 4 * 1024 * 1024,
228 }, 232 },
229 { 233 {
@@ -362,13 +366,35 @@ static struct platform_device dm9000_device = {
362#endif 366#endif
363 367
364#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 368#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
369#include <linux/bfin_mac.h>
370static const unsigned short bfin_mac_peripherals[] = P_RMII0;
371
372static struct bfin_phydev_platform_data bfin_phydev_data[] = {
373 {
374 .addr = 1,
375 .irq = IRQ_MAC_PHYINT,
376 },
377};
378
379static struct bfin_mii_bus_platform_data bfin_mii_bus_data = {
380 .phydev_number = 1,
381 .phydev_data = bfin_phydev_data,
382 .phy_mode = PHY_INTERFACE_MODE_RMII,
383 .mac_peripherals = bfin_mac_peripherals,
384};
385
365static struct platform_device bfin_mii_bus = { 386static struct platform_device bfin_mii_bus = {
366 .name = "bfin_mii_bus", 387 .name = "bfin_mii_bus",
388 .dev = {
389 .platform_data = &bfin_mii_bus_data,
390 }
367}; 391};
368 392
369static struct platform_device bfin_mac_device = { 393static struct platform_device bfin_mac_device = {
370 .name = "bfin_mac", 394 .name = "bfin_mac",
371 .dev.platform_data = &bfin_mii_bus, 395 .dev = {
396 .platform_data = &bfin_mii_bus,
397 }
372}; 398};
373#endif 399#endif
374 400
@@ -431,8 +457,8 @@ static struct bfin5xx_spi_chip spi_adc_chip_info = {
431}; 457};
432#endif 458#endif
433 459
434#if defined(CONFIG_SND_BLACKFIN_AD183X) \ 460#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \
435 || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) 461 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
436static struct bfin5xx_spi_chip ad1836_spi_chip_info = { 462static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
437 .enable_dma = 0, 463 .enable_dma = 0,
438 .bits_per_word = 16, 464 .bits_per_word = 16,
@@ -547,13 +573,13 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
547 }, 573 },
548#endif 574#endif
549 575
550#if defined(CONFIG_SND_BLACKFIN_AD183X) \ 576#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \
551 || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) 577 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
552 { 578 {
553 .modalias = "ad1836", 579 .modalias = "ad183x",
554 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 580 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
555 .bus_num = 0, 581 .bus_num = 0,
556 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 582 .chip_select = 4,
557 .controller_data = &ad1836_spi_chip_info, 583 .controller_data = &ad1836_spi_chip_info,
558 }, 584 },
559#endif 585#endif
@@ -883,7 +909,7 @@ static struct adp5520_keys_platform_data adp5520_keys_data = {
883}; 909};
884 910
885 /* 911 /*
886 * ADP5520/5501 Multifuction Device Init Data 912 * ADP5520/5501 Multifunction Device Init Data
887 */ 913 */
888 914
889static struct adp5520_platform_data adp5520_pdev_data = { 915static struct adp5520_platform_data adp5520_pdev_data = {
@@ -929,6 +955,11 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
929 I2C_BOARD_INFO("ssm2602", 0x1b), 955 I2C_BOARD_INFO("ssm2602", 0x1b),
930 }, 956 },
931#endif 957#endif
958#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
959 {
960 I2C_BOARD_INFO("ad5252", 0x2f),
961 },
962#endif
932}; 963};
933 964
934#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 965#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
diff --git a/arch/blackfin/mach-bf527/boards/tll6527m.c b/arch/blackfin/mach-bf527/boards/tll6527m.c
new file mode 100644
index 000000000000..9ec575729e2c
--- /dev/null
+++ b/arch/blackfin/mach-bf527/boards/tll6527m.c
@@ -0,0 +1,1008 @@
1/* File: arch/blackfin/mach-bf527/boards/tll6527m.c
2 * Based on: arch/blackfin/mach-bf527/boards/ezkit.c
3 * Author: Ashish Gupta
4 *
5 * Copyright: 2010 - The Learning Labs Inc.
6 *
7 * Licensed under the GPL-2 or later.
8 */
9
10#include <linux/device.h>
11#include <linux/platform_device.h>
12#include <linux/mtd/mtd.h>
13#include <linux/mtd/partitions.h>
14#include <linux/mtd/physmap.h>
15#include <linux/spi/spi.h>
16#include <linux/spi/flash.h>
17#include <linux/i2c.h>
18#include <linux/irq.h>
19#include <linux/interrupt.h>
20#include <linux/usb/musb.h>
21#include <linux/leds.h>
22#include <linux/input.h>
23#include <asm/dma.h>
24#include <asm/bfin5xx_spi.h>
25#include <asm/reboot.h>
26#include <asm/nand.h>
27#include <asm/portmux.h>
28#include <asm/dpmc.h>
29
30#if defined(CONFIG_TOUCHSCREEN_AD7879) \
31 || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE)
32#include <linux/spi/ad7879.h>
33#define LCD_BACKLIGHT_GPIO 0x40
34/* TLL6527M uses TLL7UIQ35 / ADI LCD EZ Extender. AD7879 AUX GPIO is used for
35 * LCD Backlight Enable
36 */
37#endif
38
39/*
40 * Name the Board for the /proc/cpuinfo
41 */
42const char bfin_board_name[] = "TLL6527M";
43/*
44 * Driver needs to know address, irq and flag pin.
45 */
46
47#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
48static struct resource musb_resources[] = {
49 [0] = {
50 .start = 0xffc03800,
51 .end = 0xffc03cff,
52 .flags = IORESOURCE_MEM,
53 },
54 [1] = { /* general IRQ */
55 .start = IRQ_USB_INT0,
56 .end = IRQ_USB_INT0,
57 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
58 },
59 [2] = { /* DMA IRQ */
60 .start = IRQ_USB_DMA,
61 .end = IRQ_USB_DMA,
62 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
63 },
64};
65
66static struct musb_hdrc_config musb_config = {
67 .multipoint = 0,
68 .dyn_fifo = 0,
69 .soft_con = 1,
70 .dma = 1,
71 .num_eps = 8,
72 .dma_channels = 8,
73 /*.gpio_vrsel = GPIO_PG13,*/
74 /* Some custom boards need to be active low, just set it to "0"
75 * if it is the case.
76 */
77 .gpio_vrsel_active = 1,
78};
79
80static struct musb_hdrc_platform_data musb_plat = {
81#if defined(CONFIG_USB_MUSB_OTG)
82 .mode = MUSB_OTG,
83#elif defined(CONFIG_USB_MUSB_HDRC_HCD)
84 .mode = MUSB_HOST,
85#elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
86 .mode = MUSB_PERIPHERAL,
87#endif
88 .config = &musb_config,
89};
90
91static u64 musb_dmamask = ~(u32)0;
92
93static struct platform_device musb_device = {
94 .name = "musb_hdrc",
95 .id = 0,
96 .dev = {
97 .dma_mask = &musb_dmamask,
98 .coherent_dma_mask = 0xffffffff,
99 .platform_data = &musb_plat,
100 },
101 .num_resources = ARRAY_SIZE(musb_resources),
102 .resource = musb_resources,
103};
104#endif
105
106#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
107#include <asm/bfin-lq035q1.h>
108
109static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = {
110 .mode = LQ035_NORM | LQ035_RGB | LQ035_RL | LQ035_TB,
111 .ppi_mode = USE_RGB565_16_BIT_PPI,
112 .use_bl = 1,
113 .gpio_bl = LCD_BACKLIGHT_GPIO,
114};
115
116static struct resource bfin_lq035q1_resources[] = {
117 {
118 .start = IRQ_PPI_ERROR,
119 .end = IRQ_PPI_ERROR,
120 .flags = IORESOURCE_IRQ,
121 },
122};
123
124static struct platform_device bfin_lq035q1_device = {
125 .name = "bfin-lq035q1",
126 .id = -1,
127 .num_resources = ARRAY_SIZE(bfin_lq035q1_resources),
128 .resource = bfin_lq035q1_resources,
129 .dev = {
130 .platform_data = &bfin_lq035q1_data,
131 },
132};
133#endif
134
135#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE)
136static struct mtd_partition tll6527m_partitions[] = {
137 {
138 .name = "bootloader(nor)",
139 .size = 0xA0000,
140 .offset = 0,
141 }, {
142 .name = "linux kernel(nor)",
143 .size = 0xD00000,
144 .offset = MTDPART_OFS_APPEND,
145 }, {
146 .name = "file system(nor)",
147 .size = MTDPART_SIZ_FULL,
148 .offset = MTDPART_OFS_APPEND,
149 }
150};
151
152static struct physmap_flash_data tll6527m_flash_data = {
153 .width = 2,
154 .parts = tll6527m_partitions,
155 .nr_parts = ARRAY_SIZE(tll6527m_partitions),
156};
157
158static unsigned tll6527m_flash_gpios[] = { GPIO_PG11, GPIO_PH11, GPIO_PH12 };
159
160static struct resource tll6527m_flash_resource[] = {
161 {
162 .name = "cfi_probe",
163 .start = 0x20000000,
164 .end = 0x201fffff,
165 .flags = IORESOURCE_MEM,
166 }, {
167 .start = (unsigned long)tll6527m_flash_gpios,
168 .end = ARRAY_SIZE(tll6527m_flash_gpios),
169 .flags = IORESOURCE_IRQ,
170 }
171};
172
173static struct platform_device tll6527m_flash_device = {
174 .name = "gpio-addr-flash",
175 .id = 0,
176 .dev = {
177 .platform_data = &tll6527m_flash_data,
178 },
179 .num_resources = ARRAY_SIZE(tll6527m_flash_resource),
180 .resource = tll6527m_flash_resource,
181};
182#endif
183
184#if defined(CONFIG_GPIO_DECODER) || defined(CONFIG_GPIO_DECODER_MODULE)
185/* An SN74LVC138A 3:8 decoder chip has been used to generate 7 augmented
186 * outputs used as SPI CS lines for all SPI SLAVE devices on TLL6527v1-0.
187 * EXP_GPIO_SPISEL_BASE is the base number for the expanded outputs being
188 * used as SPI CS lines, this should be > MAX_BLACKFIN_GPIOS
189 */
190#include <linux/gpio-decoder.h>
191#define EXP_GPIO_SPISEL_BASE 0x64
192static unsigned gpio_addr_inputs[] = {
193 GPIO_PG1, GPIO_PH9, GPIO_PH10
194};
195
196static struct gpio_decoder_platfrom_data spi_decoded_cs = {
197 .base = EXP_GPIO_SPISEL_BASE,
198 .input_addrs = gpio_addr_inputs,
199 .nr_input_addrs = ARRAY_SIZE(gpio_addr_inputs),
200 .default_output = 0,
201/* .default_output = (1 << ARRAY_SIZE(gpio_addr_inputs)) - 1 */
202};
203
204static struct platform_device spi_decoded_gpio = {
205 .name = "gpio-decoder",
206 .id = 0,
207 .dev = {
208 .platform_data = &spi_decoded_cs,
209 },
210};
211
212#else
213#define EXP_GPIO_SPISEL_BASE 0x0
214
215#endif
216
217#if defined(CONFIG_INPUT_ADXL34X) || defined(CONFIG_INPUT_ADXL34X_MODULE)
218#include <linux/input/adxl34x.h>
219static const struct adxl34x_platform_data adxl345_info = {
220 .x_axis_offset = 0,
221 .y_axis_offset = 0,
222 .z_axis_offset = 0,
223 .tap_threshold = 0x31,
224 .tap_duration = 0x10,
225 .tap_latency = 0x60,
226 .tap_window = 0xF0,
227 .tap_axis_control = ADXL_TAP_X_EN | ADXL_TAP_Y_EN | ADXL_TAP_Z_EN,
228 .act_axis_control = 0xFF,
229 .activity_threshold = 5,
230 .inactivity_threshold = 2,
231 .inactivity_time = 2,
232 .free_fall_threshold = 0x7,
233 .free_fall_time = 0x20,
234 .data_rate = 0x8,
235 .data_range = ADXL_FULL_RES,
236
237 .ev_type = EV_ABS,
238 .ev_code_x = ABS_X, /* EV_REL */
239 .ev_code_y = ABS_Y, /* EV_REL */
240 .ev_code_z = ABS_Z, /* EV_REL */
241
242 .ev_code_tap = {BTN_TOUCH, BTN_TOUCH, BTN_TOUCH}, /* EV_KEY x,y,z */
243
244/* .ev_code_ff = KEY_F,*/ /* EV_KEY */
245 .ev_code_act_inactivity = KEY_A, /* EV_KEY */
246 .use_int2 = 1,
247 .power_mode = ADXL_AUTO_SLEEP | ADXL_LINK,
248 .fifo_mode = ADXL_FIFO_STREAM,
249};
250#endif
251
252#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
253static struct platform_device rtc_device = {
254 .name = "rtc-bfin",
255 .id = -1,
256};
257#endif
258
259#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
260#include <linux/bfin_mac.h>
261static const unsigned short bfin_mac_peripherals[] = P_RMII0;
262
263static struct bfin_phydev_platform_data bfin_phydev_data[] = {
264 {
265 .addr = 1,
266 .irq = IRQ_MAC_PHYINT,
267 },
268};
269
270static struct bfin_mii_bus_platform_data bfin_mii_bus_data = {
271 .phydev_number = 1,
272 .phydev_data = bfin_phydev_data,
273 .phy_mode = PHY_INTERFACE_MODE_RMII,
274 .mac_peripherals = bfin_mac_peripherals,
275};
276
277static struct platform_device bfin_mii_bus = {
278 .name = "bfin_mii_bus",
279 .dev = {
280 .platform_data = &bfin_mii_bus_data,
281 }
282};
283
284static struct platform_device bfin_mac_device = {
285 .name = "bfin_mac",
286 .dev = {
287 .platform_data = &bfin_mii_bus,
288 }
289};
290#endif
291
292#if defined(CONFIG_MTD_M25P80) \
293 || defined(CONFIG_MTD_M25P80_MODULE)
294static struct mtd_partition bfin_spi_flash_partitions[] = {
295 {
296 .name = "bootloader(spi)",
297 .size = 0x00040000,
298 .offset = 0,
299 .mask_flags = MTD_CAP_ROM
300 }, {
301 .name = "linux kernel(spi)",
302 .size = MTDPART_SIZ_FULL,
303 .offset = MTDPART_OFS_APPEND,
304 }
305};
306
307static struct flash_platform_data bfin_spi_flash_data = {
308 .name = "m25p80",
309 .parts = bfin_spi_flash_partitions,
310 .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
311 .type = "m25p16",
312};
313
314/* SPI flash chip (m25p64) */
315static struct bfin5xx_spi_chip spi_flash_chip_info = {
316 .enable_dma = 0, /* use dma transfer with this chip*/
317 .bits_per_word = 8,
318};
319#endif
320
321#if defined(CONFIG_BFIN_SPI_ADC) \
322 || defined(CONFIG_BFIN_SPI_ADC_MODULE)
323/* SPI ADC chip */
324static struct bfin5xx_spi_chip spi_adc_chip_info = {
325 .enable_dma = 0, /* use dma transfer with this chip*/
326/*
327 * tll6527m V1.0 does not support native spi slave selects
328 * hence DMA mode will not be useful since the ADC needs
329 * CS to toggle for each sample and cs_change_per_word
330 * seems to be removed from spi_bfin5xx.c
331 */
332 .bits_per_word = 16,
333};
334#endif
335
336#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
337static struct bfin5xx_spi_chip mmc_spi_chip_info = {
338 .enable_dma = 0,
339 .bits_per_word = 8,
340};
341#endif
342
343#if defined(CONFIG_TOUCHSCREEN_AD7879) \
344 || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE)
345static const struct ad7879_platform_data bfin_ad7879_ts_info = {
346 .model = 7879, /* Model = AD7879 */
347 .x_plate_ohms = 620, /* 620 Ohm from the touch datasheet */
348 .pressure_max = 10000,
349 .pressure_min = 0,
350 .first_conversion_delay = 3,
351 /* wait 512us before do a first conversion */
352 .acquisition_time = 1, /* 4us acquisition time per sample */
353 .median = 2, /* do 8 measurements */
354 .averaging = 1,
355 /* take the average of 4 middle samples */
356 .pen_down_acc_interval = 255, /* 9.4 ms */
357 .gpio_export = 1, /* configure AUX as GPIO output*/
358 .gpio_base = LCD_BACKLIGHT_GPIO,
359};
360#endif
361
362#if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) \
363 || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE)
364static struct bfin5xx_spi_chip spi_ad7879_chip_info = {
365 .enable_dma = 0,
366 .bits_per_word = 16,
367};
368#endif
369
370#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
371static struct bfin5xx_spi_chip spidev_chip_info = {
372 .enable_dma = 0,
373 .bits_per_word = 8,
374};
375#endif
376
377#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
378static struct platform_device bfin_i2s = {
379 .name = "bfin-i2s",
380 .id = CONFIG_SND_BF5XX_SPORT_NUM,
381 /* TODO: add platform data here */
382};
383#endif
384
385#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
386static struct bfin5xx_spi_chip lq035q1_spi_chip_info = {
387 .enable_dma = 0,
388 .bits_per_word = 8,
389};
390#endif
391
392#if defined(CONFIG_GPIO_MCP23S08) || defined(CONFIG_GPIO_MCP23S08_MODULE)
393static struct bfin5xx_spi_chip spi_mcp23s08_sys_chip_info = {
394 .enable_dma = 0,
395 .bits_per_word = 8,
396};
397
398static struct bfin5xx_spi_chip spi_mcp23s08_usr_chip_info = {
399 .enable_dma = 0,
400 .bits_per_word = 8,
401};
402
403#include <linux/spi/mcp23s08.h>
404static const struct mcp23s08_platform_data bfin_mcp23s08_sys_gpio_info = {
405 .chip[0].is_present = true,
406 .base = 0x30,
407};
408static const struct mcp23s08_platform_data bfin_mcp23s08_usr_gpio_info = {
409 .chip[2].is_present = true,
410 .base = 0x38,
411};
412#endif
413
414static struct spi_board_info bfin_spi_board_info[] __initdata = {
415#if defined(CONFIG_MTD_M25P80) \
416 || defined(CONFIG_MTD_M25P80_MODULE)
417 {
418 /* the modalias must be the same as spi device driver name */
419 .modalias = "m25p80", /* Name of spi_driver for this device */
420 .max_speed_hz = 25000000,
421 /* max spi clock (SCK) speed in HZ */
422 .bus_num = 0, /* Framework bus number */
423 .chip_select = EXP_GPIO_SPISEL_BASE + 0x04 + MAX_CTRL_CS,
424 /* Can be connected to TLL6527M GPIO connector */
425 /* Either SPI_ADC or M25P80 FLASH can be installed at a time */
426 .platform_data = &bfin_spi_flash_data,
427 .controller_data = &spi_flash_chip_info,
428 .mode = SPI_MODE_3,
429 },
430#endif
431
432#if defined(CONFIG_BFIN_SPI_ADC)
433 || defined(CONFIG_BFIN_SPI_ADC_MODULE)
434 {
435 .modalias = "bfin_spi_adc",
436 /* Name of spi_driver for this device */
437 .max_speed_hz = 10000000,
438 /* max spi clock (SCK) speed in HZ */
439 .bus_num = 0, /* Framework bus number */
440 .chip_select = EXP_GPIO_SPISEL_BASE + 0x04 + MAX_CTRL_CS,
441 /* Framework chip select. */
442 .platform_data = NULL, /* No spi_driver specific config */
443 .controller_data = &spi_adc_chip_info,
444 .mode = SPI_MODE_0,
445 },
446#endif
447
448#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
449 {
450 .modalias = "mmc_spi",
451/*
452 * TLL6527M V1.0 does not support SD Card at SPI Clock > 10 MHz due to
453 * SPI buffer limitations
454 */
455 .max_speed_hz = 10000000,
456 /* max spi clock (SCK) speed in HZ */
457 .bus_num = 0,
458 .chip_select = EXP_GPIO_SPISEL_BASE + 0x05 + MAX_CTRL_CS,
459 .controller_data = &mmc_spi_chip_info,
460 .mode = SPI_MODE_0,
461 },
462#endif
463#if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) \
464 || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE)
465 {
466 .modalias = "ad7879",
467 .platform_data = &bfin_ad7879_ts_info,
468 .irq = IRQ_PH14,
469 .max_speed_hz = 5000000,
470 /* max spi clock (SCK) speed in HZ */
471 .bus_num = 0,
472 .chip_select = EXP_GPIO_SPISEL_BASE + 0x07 + MAX_CTRL_CS,
473 .controller_data = &spi_ad7879_chip_info,
474 .mode = SPI_CPHA | SPI_CPOL,
475 },
476#endif
477#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
478 {
479 .modalias = "spidev",
480 .max_speed_hz = 10000000,
481 /* TLL6527Mv1-0 supports max spi clock (SCK) speed = 10 MHz */
482 .bus_num = 0,
483 .chip_select = EXP_GPIO_SPISEL_BASE + 0x03 + MAX_CTRL_CS,
484 .mode = SPI_CPHA | SPI_CPOL,
485 .controller_data = &spidev_chip_info,
486 },
487#endif
488#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
489 {
490 .modalias = "bfin-lq035q1-spi",
491 .max_speed_hz = 20000000,
492 .bus_num = 0,
493 .chip_select = EXP_GPIO_SPISEL_BASE + 0x06 + MAX_CTRL_CS,
494 .controller_data = &lq035q1_spi_chip_info,
495 .mode = SPI_CPHA | SPI_CPOL,
496 },
497#endif
498#if defined(CONFIG_GPIO_MCP23S08) || defined(CONFIG_GPIO_MCP23S08_MODULE)
499 {
500 .modalias = "mcp23s08",
501 .platform_data = &bfin_mcp23s08_sys_gpio_info,
502 .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */
503 .bus_num = 0,
504 .chip_select = EXP_GPIO_SPISEL_BASE + 0x01 + MAX_CTRL_CS,
505 .controller_data = &spi_mcp23s08_sys_chip_info,
506 .mode = SPI_CPHA | SPI_CPOL,
507 },
508 {
509 .modalias = "mcp23s08",
510 .platform_data = &bfin_mcp23s08_usr_gpio_info,
511 .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */
512 .bus_num = 0,
513 .chip_select = EXP_GPIO_SPISEL_BASE + 0x02 + MAX_CTRL_CS,
514 .controller_data = &spi_mcp23s08_usr_chip_info,
515 .mode = SPI_CPHA | SPI_CPOL,
516 },
517#endif
518};
519
520#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
521/* SPI controller data */
522static struct bfin5xx_spi_master bfin_spi0_info = {
523 .num_chipselect = EXP_GPIO_SPISEL_BASE + 8 + MAX_CTRL_CS,
524 /* EXP_GPIO_SPISEL_BASE will be > MAX_BLACKFIN_GPIOS */
525 .enable_dma = 1, /* master has the ability to do dma transfer */
526 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
527};
528
529/* SPI (0) */
530static struct resource bfin_spi0_resource[] = {
531 [0] = {
532 .start = SPI0_REGBASE,
533 .end = SPI0_REGBASE + 0xFF,
534 .flags = IORESOURCE_MEM,
535 },
536 [1] = {
537 .start = CH_SPI,
538 .end = CH_SPI,
539 .flags = IORESOURCE_DMA,
540 },
541 [2] = {
542 .start = IRQ_SPI,
543 .end = IRQ_SPI,
544 .flags = IORESOURCE_IRQ,
545 },
546};
547
548static struct platform_device bfin_spi0_device = {
549 .name = "bfin-spi",
550 .id = 0, /* Bus number */
551 .num_resources = ARRAY_SIZE(bfin_spi0_resource),
552 .resource = bfin_spi0_resource,
553 .dev = {
554 .platform_data = &bfin_spi0_info, /* Passed to driver */
555 },
556};
557#endif /* spi master and devices */
558
559#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
560#ifdef CONFIG_SERIAL_BFIN_UART0
561static struct resource bfin_uart0_resources[] = {
562 {
563 .start = UART0_THR,
564 .end = UART0_GCTL+2,
565 .flags = IORESOURCE_MEM,
566 },
567 {
568 .start = IRQ_UART0_RX,
569 .end = IRQ_UART0_RX+1,
570 .flags = IORESOURCE_IRQ,
571 },
572 {
573 .start = IRQ_UART0_ERROR,
574 .end = IRQ_UART0_ERROR,
575 .flags = IORESOURCE_IRQ,
576 },
577 {
578 .start = CH_UART0_TX,
579 .end = CH_UART0_TX,
580 .flags = IORESOURCE_DMA,
581 },
582 {
583 .start = CH_UART0_RX,
584 .end = CH_UART0_RX,
585 .flags = IORESOURCE_DMA,
586 },
587};
588
589unsigned short bfin_uart0_peripherals[] = {
590 P_UART0_TX, P_UART0_RX, 0
591};
592
593static struct platform_device bfin_uart0_device = {
594 .name = "bfin-uart",
595 .id = 0,
596 .num_resources = ARRAY_SIZE(bfin_uart0_resources),
597 .resource = bfin_uart0_resources,
598 .dev = {
599 .platform_data = &bfin_uart0_peripherals,
600 /* Passed to driver */
601 },
602};
603#endif
604#ifdef CONFIG_SERIAL_BFIN_UART1
605static struct resource bfin_uart1_resources[] = {
606 {
607 .start = UART1_THR,
608 .end = UART1_GCTL+2,
609 .flags = IORESOURCE_MEM,
610 },
611 {
612 .start = IRQ_UART1_RX,
613 .end = IRQ_UART1_RX+1,
614 .flags = IORESOURCE_IRQ,
615 },
616 {
617 .start = IRQ_UART1_ERROR,
618 .end = IRQ_UART1_ERROR,
619 .flags = IORESOURCE_IRQ,
620 },
621 {
622 .start = CH_UART1_TX,
623 .end = CH_UART1_TX,
624 .flags = IORESOURCE_DMA,
625 },
626 {
627 .start = CH_UART1_RX,
628 .end = CH_UART1_RX,
629 .flags = IORESOURCE_DMA,
630 },
631#ifdef CONFIG_BFIN_UART1_CTSRTS
632 { /* CTS pin */
633 .start = GPIO_PF9,
634 .end = GPIO_PF9,
635 .flags = IORESOURCE_IO,
636 },
637 { /* RTS pin */
638 .start = GPIO_PF10,
639 .end = GPIO_PF10,
640 .flags = IORESOURCE_IO,
641 },
642#endif
643};
644
645unsigned short bfin_uart1_peripherals[] = {
646 P_UART1_TX, P_UART1_RX, 0
647};
648
649static struct platform_device bfin_uart1_device = {
650 .name = "bfin-uart",
651 .id = 1,
652 .num_resources = ARRAY_SIZE(bfin_uart1_resources),
653 .resource = bfin_uart1_resources,
654 .dev = {
655 .platform_data = &bfin_uart1_peripherals,
656 /* Passed to driver */
657 },
658};
659#endif
660#endif
661
662#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
663#ifdef CONFIG_BFIN_SIR0
664static struct resource bfin_sir0_resources[] = {
665 {
666 .start = 0xFFC00400,
667 .end = 0xFFC004FF,
668 .flags = IORESOURCE_MEM,
669 },
670 {
671 .start = IRQ_UART0_RX,
672 .end = IRQ_UART0_RX+1,
673 .flags = IORESOURCE_IRQ,
674 },
675 {
676 .start = CH_UART0_RX,
677 .end = CH_UART0_RX+1,
678 .flags = IORESOURCE_DMA,
679 },
680};
681
682static struct platform_device bfin_sir0_device = {
683 .name = "bfin_sir",
684 .id = 0,
685 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
686 .resource = bfin_sir0_resources,
687};
688#endif
689#ifdef CONFIG_BFIN_SIR1
690static struct resource bfin_sir1_resources[] = {
691 {
692 .start = 0xFFC02000,
693 .end = 0xFFC020FF,
694 .flags = IORESOURCE_MEM,
695 },
696 {
697 .start = IRQ_UART1_RX,
698 .end = IRQ_UART1_RX+1,
699 .flags = IORESOURCE_IRQ,
700 },
701 {
702 .start = CH_UART1_RX,
703 .end = CH_UART1_RX+1,
704 .flags = IORESOURCE_DMA,
705 },
706};
707
708static struct platform_device bfin_sir1_device = {
709 .name = "bfin_sir",
710 .id = 1,
711 .num_resources = ARRAY_SIZE(bfin_sir1_resources),
712 .resource = bfin_sir1_resources,
713};
714#endif
715#endif
716
717#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
718static struct resource bfin_twi0_resource[] = {
719 [0] = {
720 .start = TWI0_REGBASE,
721 .end = TWI0_REGBASE,
722 .flags = IORESOURCE_MEM,
723 },
724 [1] = {
725 .start = IRQ_TWI,
726 .end = IRQ_TWI,
727 .flags = IORESOURCE_IRQ,
728 },
729};
730
731static struct platform_device i2c_bfin_twi_device = {
732 .name = "i2c-bfin-twi",
733 .id = 0,
734 .num_resources = ARRAY_SIZE(bfin_twi0_resource),
735 .resource = bfin_twi0_resource,
736};
737#endif
738
739static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
740#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
741 {
742 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
743 },
744#endif
745
746#if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
747 {
748 I2C_BOARD_INFO("bfin-adv7393", 0x2B),
749 },
750#endif
751#if defined(CONFIG_TOUCHSCREEN_AD7879_I2C) \
752 || defined(CONFIG_TOUCHSCREEN_AD7879_I2C_MODULE)
753 {
754 I2C_BOARD_INFO("ad7879", 0x2C),
755 .irq = IRQ_PH14,
756 .platform_data = (void *)&bfin_ad7879_ts_info,
757 },
758#endif
759#if defined(CONFIG_SND_SOC_SSM2602) || defined(CONFIG_SND_SOC_SSM2602_MODULE)
760 {
761 I2C_BOARD_INFO("ssm2602", 0x1b),
762 },
763#endif
764 {
765 I2C_BOARD_INFO("adm1192", 0x2e),
766 },
767
768 {
769 I2C_BOARD_INFO("ltc3576", 0x09),
770 },
771#if defined(CONFIG_INPUT_ADXL34X_I2C) \
772 || defined(CONFIG_INPUT_ADXL34X_I2C_MODULE)
773 {
774 I2C_BOARD_INFO("adxl34x", 0x53),
775 .irq = IRQ_PH13,
776 .platform_data = (void *)&adxl345_info,
777 },
778#endif
779};
780
781#if defined(CONFIG_SERIAL_BFIN_SPORT) \
782 || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
783#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
784static struct resource bfin_sport0_uart_resources[] = {
785 {
786 .start = SPORT0_TCR1,
787 .end = SPORT0_MRCS3+4,
788 .flags = IORESOURCE_MEM,
789 },
790 {
791 .start = IRQ_SPORT0_RX,
792 .end = IRQ_SPORT0_RX+1,
793 .flags = IORESOURCE_IRQ,
794 },
795 {
796 .start = IRQ_SPORT0_ERROR,
797 .end = IRQ_SPORT0_ERROR,
798 .flags = IORESOURCE_IRQ,
799 },
800};
801
802unsigned short bfin_sport0_peripherals[] = {
803 P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
804 P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0
805};
806
807static struct platform_device bfin_sport0_uart_device = {
808 .name = "bfin-sport-uart",
809 .id = 0,
810 .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources),
811 .resource = bfin_sport0_uart_resources,
812 .dev = {
813 .platform_data = &bfin_sport0_peripherals,
814 /* Passed to driver */
815 },
816};
817#endif
818#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
819static struct resource bfin_sport1_uart_resources[] = {
820 {
821 .start = SPORT1_TCR1,
822 .end = SPORT1_MRCS3+4,
823 .flags = IORESOURCE_MEM,
824 },
825 {
826 .start = IRQ_SPORT1_RX,
827 .end = IRQ_SPORT1_RX+1,
828 .flags = IORESOURCE_IRQ,
829 },
830 {
831 .start = IRQ_SPORT1_ERROR,
832 .end = IRQ_SPORT1_ERROR,
833 .flags = IORESOURCE_IRQ,
834 },
835};
836
837unsigned short bfin_sport1_peripherals[] = {
838 P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS,
839 P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0
840};
841
842static struct platform_device bfin_sport1_uart_device = {
843 .name = "bfin-sport-uart",
844 .id = 1,
845 .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources),
846 .resource = bfin_sport1_uart_resources,
847 .dev = {
848 .platform_data = &bfin_sport1_peripherals,
849 /* Passed to driver */
850 },
851};
852#endif
853#endif
854
855static const unsigned int cclk_vlev_datasheet[] = {
856 VRPAIR(VLEV_100, 400000000),
857 VRPAIR(VLEV_105, 426000000),
858 VRPAIR(VLEV_110, 500000000),
859 VRPAIR(VLEV_115, 533000000),
860 VRPAIR(VLEV_120, 600000000),
861};
862
863static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = {
864 .tuple_tab = cclk_vlev_datasheet,
865 .tabsize = ARRAY_SIZE(cclk_vlev_datasheet),
866 .vr_settling_time = 25 /* us */,
867};
868
869static struct platform_device bfin_dpmc = {
870 .name = "bfin dpmc",
871 .dev = {
872 .platform_data = &bfin_dmpc_vreg_data,
873 },
874};
875
876static struct platform_device *tll6527m_devices[] __initdata = {
877
878 &bfin_dpmc,
879
880#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
881 &rtc_device,
882#endif
883
884#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
885 &musb_device,
886#endif
887
888#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
889 &bfin_mii_bus,
890 &bfin_mac_device,
891#endif
892
893#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
894 &bfin_spi0_device,
895#endif
896
897#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
898 &bfin_lq035q1_device,
899#endif
900
901#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
902#ifdef CONFIG_SERIAL_BFIN_UART0
903 &bfin_uart0_device,
904#endif
905#ifdef CONFIG_SERIAL_BFIN_UART1
906 &bfin_uart1_device,
907#endif
908#endif
909
910#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
911#ifdef CONFIG_BFIN_SIR0
912 &bfin_sir0_device,
913#endif
914#ifdef CONFIG_BFIN_SIR1
915 &bfin_sir1_device,
916#endif
917#endif
918
919#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
920 &i2c_bfin_twi_device,
921#endif
922
923#if defined(CONFIG_SERIAL_BFIN_SPORT) \
924 || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
925#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
926 &bfin_sport0_uart_device,
927#endif
928#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
929 &bfin_sport1_uart_device,
930#endif
931#endif
932
933#if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE)
934 &tll6527m_flash_device,
935#endif
936
937#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
938 &bfin_i2s,
939#endif
940
941#if defined(CONFIG_GPIO_DECODER) || defined(CONFIG_GPIO_DECODER_MODULE)
942 &spi_decoded_gpio,
943#endif
944};
945
946static int __init tll6527m_init(void)
947{
948 printk(KERN_INFO "%s(): registering device resources\n", __func__);
949 i2c_register_board_info(0, bfin_i2c_board_info,
950 ARRAY_SIZE(bfin_i2c_board_info));
951 platform_add_devices(tll6527m_devices, ARRAY_SIZE(tll6527m_devices));
952 spi_register_board_info(bfin_spi_board_info,
953 ARRAY_SIZE(bfin_spi_board_info));
954 return 0;
955}
956
957arch_initcall(tll6527m_init);
958
959static struct platform_device *tll6527m_early_devices[] __initdata = {
960#if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK)
961#ifdef CONFIG_SERIAL_BFIN_UART0
962 &bfin_uart0_device,
963#endif
964#ifdef CONFIG_SERIAL_BFIN_UART1
965 &bfin_uart1_device,
966#endif
967#endif
968
969#if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE)
970#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
971 &bfin_sport0_uart_device,
972#endif
973#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
974 &bfin_sport1_uart_device,
975#endif
976#endif
977};
978
979void __init native_machine_early_platform_add_devices(void)
980{
981 printk(KERN_INFO "register early platform devices\n");
982 early_platform_add_devices(tll6527m_early_devices,
983 ARRAY_SIZE(tll6527m_early_devices));
984}
985
986void native_machine_restart(char *cmd)
987{
988 /* workaround reboot hang when booting from SPI */
989 if ((bfin_read_SYSCR() & 0x7) == 0x3)
990 bfin_reset_boot_spi_cs(P_DEFAULT_BOOT_SPI_CS);
991}
992
993void bfin_get_ether_addr(char *addr)
994{
995 /* the MAC is stored in OTP memory page 0xDF */
996 u32 ret;
997 u64 otp_mac;
998 u32 (*otp_read)(u32 page, u32 flags,
999 u64 *page_content) = (void *)0xEF00001A;
1000
1001 ret = otp_read(0xDF, 0x00, &otp_mac);
1002 if (!(ret & 0x1)) {
1003 char *otp_mac_p = (char *)&otp_mac;
1004 for (ret = 0; ret < 6; ++ret)
1005 addr[ret] = otp_mac_p[5 - ret];
1006 }
1007}
1008EXPORT_SYMBOL(bfin_get_ether_addr);
diff --git a/arch/blackfin/mach-bf527/include/mach/cdefBF52x_base.h b/arch/blackfin/mach-bf527/include/mach/cdefBF52x_base.h
index 11fb27bc427d..3048b52bf46a 100644
--- a/arch/blackfin/mach-bf527/include/mach/cdefBF52x_base.h
+++ b/arch/blackfin/mach-bf527/include/mach/cdefBF52x_base.h
@@ -279,14 +279,14 @@
279#define bfin_write_SPORT0_TX(val) bfin_write32(SPORT0_TX, val) 279#define bfin_write_SPORT0_TX(val) bfin_write32(SPORT0_TX, val)
280#define bfin_read_SPORT0_RX() bfin_read32(SPORT0_RX) 280#define bfin_read_SPORT0_RX() bfin_read32(SPORT0_RX)
281#define bfin_write_SPORT0_RX(val) bfin_write32(SPORT0_RX, val) 281#define bfin_write_SPORT0_RX(val) bfin_write32(SPORT0_RX, val)
282#define bfin_read_SPORT0_TX32() bfin_read32(SPORT0_TX32) 282#define bfin_read_SPORT0_TX32() bfin_read32(SPORT0_TX)
283#define bfin_write_SPORT0_TX32(val) bfin_write32(SPORT0_TX32, val) 283#define bfin_write_SPORT0_TX32(val) bfin_write32(SPORT0_TX, val)
284#define bfin_read_SPORT0_RX32() bfin_read32(SPORT0_RX32) 284#define bfin_read_SPORT0_RX32() bfin_read32(SPORT0_RX)
285#define bfin_write_SPORT0_RX32(val) bfin_write32(SPORT0_RX32, val) 285#define bfin_write_SPORT0_RX32(val) bfin_write32(SPORT0_RX, val)
286#define bfin_read_SPORT0_TX16() bfin_read16(SPORT0_TX16) 286#define bfin_read_SPORT0_TX16() bfin_read16(SPORT0_TX)
287#define bfin_write_SPORT0_TX16(val) bfin_write16(SPORT0_TX16, val) 287#define bfin_write_SPORT0_TX16(val) bfin_write16(SPORT0_TX, val)
288#define bfin_read_SPORT0_RX16() bfin_read16(SPORT0_RX16) 288#define bfin_read_SPORT0_RX16() bfin_read16(SPORT0_RX)
289#define bfin_write_SPORT0_RX16(val) bfin_write16(SPORT0_RX16, val) 289#define bfin_write_SPORT0_RX16(val) bfin_write16(SPORT0_RX, val)
290#define bfin_read_SPORT0_RCR1() bfin_read16(SPORT0_RCR1) 290#define bfin_read_SPORT0_RCR1() bfin_read16(SPORT0_RCR1)
291#define bfin_write_SPORT0_RCR1(val) bfin_write16(SPORT0_RCR1, val) 291#define bfin_write_SPORT0_RCR1(val) bfin_write16(SPORT0_RCR1, val)
292#define bfin_read_SPORT0_RCR2() bfin_read16(SPORT0_RCR2) 292#define bfin_read_SPORT0_RCR2() bfin_read16(SPORT0_RCR2)
@@ -334,14 +334,14 @@
334#define bfin_write_SPORT1_TX(val) bfin_write32(SPORT1_TX, val) 334#define bfin_write_SPORT1_TX(val) bfin_write32(SPORT1_TX, val)
335#define bfin_read_SPORT1_RX() bfin_read32(SPORT1_RX) 335#define bfin_read_SPORT1_RX() bfin_read32(SPORT1_RX)
336#define bfin_write_SPORT1_RX(val) bfin_write32(SPORT1_RX, val) 336#define bfin_write_SPORT1_RX(val) bfin_write32(SPORT1_RX, val)
337#define bfin_read_SPORT1_TX32() bfin_read32(SPORT1_TX32) 337#define bfin_read_SPORT1_TX32() bfin_read32(SPORT1_TX)
338#define bfin_write_SPORT1_TX32(val) bfin_write32(SPORT1_TX32, val) 338#define bfin_write_SPORT1_TX32(val) bfin_write32(SPORT1_TX, val)
339#define bfin_read_SPORT1_RX32() bfin_read32(SPORT1_RX32) 339#define bfin_read_SPORT1_RX32() bfin_read32(SPORT1_RX)
340#define bfin_write_SPORT1_RX32(val) bfin_write32(SPORT1_RX32, val) 340#define bfin_write_SPORT1_RX32(val) bfin_write32(SPORT1_RX, val)
341#define bfin_read_SPORT1_TX16() bfin_read16(SPORT1_TX16) 341#define bfin_read_SPORT1_TX16() bfin_read16(SPORT1_TX)
342#define bfin_write_SPORT1_TX16(val) bfin_write16(SPORT1_TX16, val) 342#define bfin_write_SPORT1_TX16(val) bfin_write16(SPORT1_TX, val)
343#define bfin_read_SPORT1_RX16() bfin_read16(SPORT1_RX16) 343#define bfin_read_SPORT1_RX16() bfin_read16(SPORT1_RX)
344#define bfin_write_SPORT1_RX16(val) bfin_write16(SPORT1_RX16, val) 344#define bfin_write_SPORT1_RX16(val) bfin_write16(SPORT1_RX, val)
345#define bfin_read_SPORT1_RCR1() bfin_read16(SPORT1_RCR1) 345#define bfin_read_SPORT1_RCR1() bfin_read16(SPORT1_RCR1)
346#define bfin_write_SPORT1_RCR1(val) bfin_write16(SPORT1_RCR1, val) 346#define bfin_write_SPORT1_RCR1(val) bfin_write16(SPORT1_RCR1, val)
347#define bfin_read_SPORT1_RCR2() bfin_read16(SPORT1_RCR2) 347#define bfin_read_SPORT1_RCR2() bfin_read16(SPORT1_RCR2)
diff --git a/arch/blackfin/mach-bf527/include/mach/defBF52x_base.h b/arch/blackfin/mach-bf527/include/mach/defBF52x_base.h
index 3e000756aacd..09475034c6a1 100644
--- a/arch/blackfin/mach-bf527/include/mach/defBF52x_base.h
+++ b/arch/blackfin/mach-bf527/include/mach/defBF52x_base.h
@@ -749,51 +749,6 @@
749#define FFE 0x20 /* Force Framing Error On Transmit */ 749#define FFE 0x20 /* Force Framing Error On Transmit */
750 750
751 751
752/* *********** SERIAL PERIPHERAL INTERFACE (SPI) MASKS ****************************/
753/* SPI_CTL Masks */
754#define TIMOD 0x0003 /* Transfer Initiate Mode */
755#define RDBR_CORE 0x0000 /* RDBR Read Initiates, IRQ When RDBR Full */
756#define TDBR_CORE 0x0001 /* TDBR Write Initiates, IRQ When TDBR Empty */
757#define RDBR_DMA 0x0002 /* DMA Read, DMA Until FIFO Empty */
758#define TDBR_DMA 0x0003 /* DMA Write, DMA Until FIFO Full */
759#define SZ 0x0004 /* Send Zero (When TDBR Empty, Send Zero/Last*) */
760#define GM 0x0008 /* Get More (When RDBR Full, Overwrite/Discard*) */
761#define PSSE 0x0010 /* Slave-Select Input Enable */
762#define EMISO 0x0020 /* Enable MISO As Output */
763#define SIZE 0x0100 /* Size of Words (16/8* Bits) */
764#define LSBF 0x0200 /* LSB First */
765#define CPHA 0x0400 /* Clock Phase */
766#define CPOL 0x0800 /* Clock Polarity */
767#define MSTR 0x1000 /* Master/Slave* */
768#define WOM 0x2000 /* Write Open Drain Master */
769#define SPE 0x4000 /* SPI Enable */
770
771/* SPI_FLG Masks */
772#define FLS1 0x0002 /* Enables SPI_FLOUT1 as SPI Slave-Select Output */
773#define FLS2 0x0004 /* Enables SPI_FLOUT2 as SPI Slave-Select Output */
774#define FLS3 0x0008 /* Enables SPI_FLOUT3 as SPI Slave-Select Output */
775#define FLS4 0x0010 /* Enables SPI_FLOUT4 as SPI Slave-Select Output */
776#define FLS5 0x0020 /* Enables SPI_FLOUT5 as SPI Slave-Select Output */
777#define FLS6 0x0040 /* Enables SPI_FLOUT6 as SPI Slave-Select Output */
778#define FLS7 0x0080 /* Enables SPI_FLOUT7 as SPI Slave-Select Output */
779#define FLG1 0xFDFF /* Activates SPI_FLOUT1 */
780#define FLG2 0xFBFF /* Activates SPI_FLOUT2 */
781#define FLG3 0xF7FF /* Activates SPI_FLOUT3 */
782#define FLG4 0xEFFF /* Activates SPI_FLOUT4 */
783#define FLG5 0xDFFF /* Activates SPI_FLOUT5 */
784#define FLG6 0xBFFF /* Activates SPI_FLOUT6 */
785#define FLG7 0x7FFF /* Activates SPI_FLOUT7 */
786
787/* SPI_STAT Masks */
788#define SPIF 0x0001 /* SPI Finished (Single-Word Transfer Complete) */
789#define MODF 0x0002 /* Mode Fault Error (Another Device Tried To Become Master) */
790#define TXE 0x0004 /* Transmission Error (Data Sent With No New Data In TDBR) */
791#define TXS 0x0008 /* SPI_TDBR Data Buffer Status (Full/Empty*) */
792#define RBSY 0x0010 /* Receive Error (Data Received With RDBR Full) */
793#define RXS 0x0020 /* SPI_RDBR Data Buffer Status (Full/Empty*) */
794#define TXCOL 0x0040 /* Transmit Collision Error (Corrupt Data May Have Been Sent) */
795
796
797/* **************** GENERAL PURPOSE TIMER MASKS **********************/ 752/* **************** GENERAL PURPOSE TIMER MASKS **********************/
798/* TIMER_ENABLE Masks */ 753/* TIMER_ENABLE Masks */
799#define TIMEN0 0x0001 /* Enable Timer 0 */ 754#define TIMEN0 0x0001 /* Enable Timer 0 */
diff --git a/arch/blackfin/mach-bf533/boards/H8606.c b/arch/blackfin/mach-bf533/boards/H8606.c
index 175371af0692..2ce7b16faee1 100644
--- a/arch/blackfin/mach-bf533/boards/H8606.c
+++ b/arch/blackfin/mach-bf533/boards/H8606.c
@@ -171,7 +171,7 @@ static struct bfin5xx_spi_chip spi_adc_chip_info = {
171}; 171};
172#endif 172#endif
173 173
174#if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) 174#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
175static struct bfin5xx_spi_chip ad1836_spi_chip_info = { 175static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
176 .enable_dma = 0, 176 .enable_dma = 0,
177 .bits_per_word = 16, 177 .bits_per_word = 16,
@@ -206,12 +206,12 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
206 }, 206 },
207#endif 207#endif
208 208
209#if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) 209#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
210 { 210 {
211 .modalias = "ad1836", 211 .modalias = "ad183x",
212 .max_speed_hz = 16, 212 .max_speed_hz = 16,
213 .bus_num = 1, 213 .bus_num = 1,
214 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 214 .chip_select = 4,
215 .controller_data = &ad1836_spi_chip_info, 215 .controller_data = &ad1836_spi_chip_info,
216 }, 216 },
217#endif 217#endif
@@ -347,6 +347,7 @@ static struct plat_serial8250_port serial8250_platform_data [] = {
347 .membase = (void *)0x20200000, 347 .membase = (void *)0x20200000,
348 .mapbase = 0x20200000, 348 .mapbase = 0x20200000,
349 .irq = IRQ_PF8, 349 .irq = IRQ_PF8,
350 .irqflags = IRQF_TRIGGER_HIGH,
350 .flags = UPF_BOOT_AUTOCONF | UART_CONFIG_TYPE, 351 .flags = UPF_BOOT_AUTOCONF | UART_CONFIG_TYPE,
351 .iotype = UPIO_MEM, 352 .iotype = UPIO_MEM,
352 .regshift = 1, 353 .regshift = 1,
@@ -355,6 +356,7 @@ static struct plat_serial8250_port serial8250_platform_data [] = {
355 .membase = (void *)0x20200010, 356 .membase = (void *)0x20200010,
356 .mapbase = 0x20200010, 357 .mapbase = 0x20200010,
357 .irq = IRQ_PF8, 358 .irq = IRQ_PF8,
359 .irqflags = IRQF_TRIGGER_HIGH,
358 .flags = UPF_BOOT_AUTOCONF | UART_CONFIG_TYPE, 360 .flags = UPF_BOOT_AUTOCONF | UART_CONFIG_TYPE,
359 .iotype = UPIO_MEM, 361 .iotype = UPIO_MEM,
360 .regshift = 1, 362 .regshift = 1,
diff --git a/arch/blackfin/mach-bf533/boards/blackstamp.c b/arch/blackfin/mach-bf533/boards/blackstamp.c
index 84a06f677dff..20c102285bef 100644
--- a/arch/blackfin/mach-bf533/boards/blackstamp.c
+++ b/arch/blackfin/mach-bf533/boards/blackstamp.c
@@ -368,8 +368,8 @@ static struct platform_device bfin_device_gpiokeys = {
368#include <linux/i2c-gpio.h> 368#include <linux/i2c-gpio.h>
369 369
370static struct i2c_gpio_platform_data i2c_gpio_data = { 370static struct i2c_gpio_platform_data i2c_gpio_data = {
371 .sda_pin = 8, 371 .sda_pin = GPIO_PF8,
372 .scl_pin = 9, 372 .scl_pin = GPIO_PF9,
373 .sda_is_open_drain = 0, 373 .sda_is_open_drain = 0,
374 .scl_is_open_drain = 0, 374 .scl_is_open_drain = 0,
375 .udelay = 40, 375 .udelay = 40,
diff --git a/arch/blackfin/mach-bf533/boards/cm_bf533.c b/arch/blackfin/mach-bf533/boards/cm_bf533.c
index fdcde61906dc..adbe62a81e25 100644
--- a/arch/blackfin/mach-bf533/boards/cm_bf533.c
+++ b/arch/blackfin/mach-bf533/boards/cm_bf533.c
@@ -71,7 +71,7 @@ static struct bfin5xx_spi_chip spi_adc_chip_info = {
71}; 71};
72#endif 72#endif
73 73
74#if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) 74#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
75static struct bfin5xx_spi_chip ad1836_spi_chip_info = { 75static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
76 .enable_dma = 0, 76 .enable_dma = 0,
77 .bits_per_word = 16, 77 .bits_per_word = 16,
@@ -110,12 +110,12 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
110 }, 110 },
111#endif 111#endif
112 112
113#if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) 113#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
114 { 114 {
115 .modalias = "ad1836", 115 .modalias = "ad183x",
116 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 116 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
117 .bus_num = 0, 117 .bus_num = 0,
118 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 118 .chip_select = 4,
119 .controller_data = &ad1836_spi_chip_info, 119 .controller_data = &ad1836_spi_chip_info,
120 }, 120 },
121#endif 121#endif
@@ -400,7 +400,7 @@ static struct resource isp1362_hcd_resources[] = {
400 }, { 400 }, {
401 .start = IRQ_PF4, 401 .start = IRQ_PF4,
402 .end = IRQ_PF4, 402 .end = IRQ_PF4,
403 .flags = IORESOURCE_IRQ, 403 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE,
404 }, 404 },
405}; 405};
406 406
diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c
index 739773cb7fc6..a1cb8e7c1010 100644
--- a/arch/blackfin/mach-bf533/boards/ezkit.c
+++ b/arch/blackfin/mach-bf533/boards/ezkit.c
@@ -222,7 +222,7 @@ static struct bfin5xx_spi_chip spi_adc_chip_info = {
222}; 222};
223#endif 223#endif
224 224
225#if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) 225#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
226static struct bfin5xx_spi_chip ad1836_spi_chip_info = { 226static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
227 .enable_dma = 0, 227 .enable_dma = 0,
228 .bits_per_word = 16, 228 .bits_per_word = 16,
@@ -261,12 +261,12 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
261 }, 261 },
262#endif 262#endif
263 263
264#if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) 264#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
265 { 265 {
266 .modalias = "ad1836", 266 .modalias = "ad183x",
267 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 267 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
268 .bus_num = 0, 268 .bus_num = 0,
269 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 269 .chip_select = 4,
270 .controller_data = &ad1836_spi_chip_info, 270 .controller_data = &ad1836_spi_chip_info,
271 }, 271 },
272#endif 272#endif
@@ -422,8 +422,8 @@ static struct platform_device bfin_device_gpiokeys = {
422#include <linux/i2c-gpio.h> 422#include <linux/i2c-gpio.h>
423 423
424static struct i2c_gpio_platform_data i2c_gpio_data = { 424static struct i2c_gpio_platform_data i2c_gpio_data = {
425 .sda_pin = 1, 425 .sda_pin = GPIO_PF1,
426 .scl_pin = 0, 426 .scl_pin = GPIO_PF0,
427 .sda_is_open_drain = 0, 427 .sda_is_open_drain = 0,
428 .scl_is_open_drain = 0, 428 .scl_is_open_drain = 0,
429 .udelay = 40, 429 .udelay = 40,
diff --git a/arch/blackfin/mach-bf533/boards/ip0x.c b/arch/blackfin/mach-bf533/boards/ip0x.c
index b8474cac6b03..5ba4b02a12eb 100644
--- a/arch/blackfin/mach-bf533/boards/ip0x.c
+++ b/arch/blackfin/mach-bf533/boards/ip0x.c
@@ -232,7 +232,7 @@ static struct resource isp1362_hcd_resources[] = {
232 },{ 232 },{
233 .start = IRQ_PF11, 233 .start = IRQ_PF11,
234 .end = IRQ_PF11, 234 .end = IRQ_PF11,
235 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 235 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE,
236 }, 236 },
237}; 237};
238 238
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c
index 29c219eff2ff..b3b1cdea2703 100644
--- a/arch/blackfin/mach-bf533/boards/stamp.c
+++ b/arch/blackfin/mach-bf533/boards/stamp.c
@@ -185,7 +185,7 @@ static struct bfin5xx_spi_chip spi_adc_chip_info = {
185}; 185};
186#endif 186#endif
187 187
188#if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) 188#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
189static struct bfin5xx_spi_chip ad1836_spi_chip_info = { 189static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
190 .enable_dma = 0, 190 .enable_dma = 0,
191 .bits_per_word = 16, 191 .bits_per_word = 16,
@@ -252,13 +252,15 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
252 }, 252 },
253#endif 253#endif
254 254
255#if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) 255#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
256 { 256 {
257 .modalias = "ad1836", 257 .modalias = "ad183x",
258 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 258 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
259 .bus_num = 0, 259 .bus_num = 0,
260 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 260 .chip_select = 4,
261 .platform_data = "ad1836", /* only includes chip name for the moment */
261 .controller_data = &ad1836_spi_chip_info, 262 .controller_data = &ad1836_spi_chip_info,
263 .mode = SPI_MODE_3,
262 }, 264 },
263#endif 265#endif
264 266
@@ -495,8 +497,8 @@ static struct platform_device bfin_device_gpiokeys = {
495#include <linux/i2c-gpio.h> 497#include <linux/i2c-gpio.h>
496 498
497static struct i2c_gpio_platform_data i2c_gpio_data = { 499static struct i2c_gpio_platform_data i2c_gpio_data = {
498 .sda_pin = 2, 500 .sda_pin = GPIO_PF2,
499 .scl_pin = 3, 501 .scl_pin = GPIO_PF3,
500 .sda_is_open_drain = 0, 502 .sda_is_open_drain = 0,
501 .scl_is_open_drain = 0, 503 .scl_is_open_drain = 0,
502 .udelay = 40, 504 .udelay = 40,
@@ -534,6 +536,11 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
534 I2C_BOARD_INFO("bfin-adv7393", 0x2B), 536 I2C_BOARD_INFO("bfin-adv7393", 0x2B),
535 }, 537 },
536#endif 538#endif
539#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
540 {
541 I2C_BOARD_INFO("ad5252", 0x2f),
542 },
543#endif
537}; 544};
538 545
539static const unsigned int cclk_vlev_datasheet[] = 546static const unsigned int cclk_vlev_datasheet[] =
diff --git a/arch/blackfin/mach-bf533/include/mach/defBF532.h b/arch/blackfin/mach-bf533/include/mach/defBF532.h
index 04acf1ed10f9..3adb0b44e597 100644
--- a/arch/blackfin/mach-bf533/include/mach/defBF532.h
+++ b/arch/blackfin/mach-bf533/include/mach/defBF532.h
@@ -681,76 +681,6 @@
681#define PF14_P 14 681#define PF14_P 14
682#define PF15_P 15 682#define PF15_P 15
683 683
684/* *********** SERIAL PERIPHERAL INTERFACE (SPI) MASKS **************** */
685
686/* SPI_CTL Masks */
687#define TIMOD 0x00000003 /* Transfer initiation mode and interrupt generation */
688#define RDBR_CORE 0x0000 /* RDBR Read Initiates, IRQ When RDBR Full */
689#define TDBR_CORE 0x0001 /* TDBR Write Initiates, IRQ When TDBR Empty */
690#define RDBR_DMA 0x0002 /* DMA Read, DMA Until FIFO Empty */
691#define TDBR_DMA 0x0003 /* DMA Write, DMA Until FIFO Full */
692#define SZ 0x00000004 /* Send Zero (=0) or last (=1) word when TDBR empty. */
693#define GM 0x00000008 /* When RDBR full, get more (=1) data or discard (=0) incoming Data */
694#define PSSE 0x00000010 /* Enable (=1) Slave-Select input for Master. */
695#define EMISO 0x00000020 /* Enable (=1) MISO pin as an output. */
696#define SIZE 0x00000100 /* Word length (0 => 8 bits, 1 => 16 bits) */
697#define LSBF 0x00000200 /* Data format (0 => MSB sent/received first 1 => LSB sent/received first) */
698#define CPHA 0x00000400 /* Clock phase (0 => SPICLK starts toggling in middle of xfer, 1 => SPICLK toggles at the beginning of xfer. */
699#define CPOL 0x00000800 /* Clock polarity (0 => active-high, 1 => active-low) */
700#define MSTR 0x00001000 /* Configures SPI as master (=1) or slave (=0) */
701#define WOM 0x00002000 /* Open drain (=1) data output enable (for MOSI and MISO) */
702#define SPE 0x00004000 /* SPI module enable (=1), disable (=0) */
703
704/* SPI_FLG Masks */
705#define FLS1 0x00000002 /* Enables (=1) SPI_FLOUT1 as flag output for SPI Slave-select */
706#define FLS2 0x00000004 /* Enables (=1) SPI_FLOUT2 as flag output for SPI Slave-select */
707#define FLS3 0x00000008 /* Enables (=1) SPI_FLOUT3 as flag output for SPI Slave-select */
708#define FLS4 0x00000010 /* Enables (=1) SPI_FLOUT4 as flag output for SPI Slave-select */
709#define FLS5 0x00000020 /* Enables (=1) SPI_FLOUT5 as flag output for SPI Slave-select */
710#define FLS6 0x00000040 /* Enables (=1) SPI_FLOUT6 as flag output for SPI Slave-select */
711#define FLS7 0x00000080 /* Enables (=1) SPI_FLOUT7 as flag output for SPI Slave-select */
712#define FLG1 0x00000200 /* Activates (=0) SPI_FLOUT1 as flag output for SPI Slave-select */
713#define FLG2 0x00000400 /* Activates (=0) SPI_FLOUT2 as flag output for SPI Slave-select */
714#define FLG3 0x00000800 /* Activates (=0) SPI_FLOUT3 as flag output for SPI Slave-select */
715#define FLG4 0x00001000 /* Activates (=0) SPI_FLOUT4 as flag output for SPI Slave-select */
716#define FLG5 0x00002000 /* Activates (=0) SPI_FLOUT5 as flag output for SPI Slave-select */
717#define FLG6 0x00004000 /* Activates (=0) SPI_FLOUT6 as flag output for SPI Slave-select */
718#define FLG7 0x00008000 /* Activates (=0) SPI_FLOUT7 as flag output for SPI Slave-select */
719
720/* SPI_FLG Bit Positions */
721#define FLS1_P 0x00000001 /* Enables (=1) SPI_FLOUT1 as flag output for SPI Slave-select */
722#define FLS2_P 0x00000002 /* Enables (=1) SPI_FLOUT2 as flag output for SPI Slave-select */
723#define FLS3_P 0x00000003 /* Enables (=1) SPI_FLOUT3 as flag output for SPI Slave-select */
724#define FLS4_P 0x00000004 /* Enables (=1) SPI_FLOUT4 as flag output for SPI Slave-select */
725#define FLS5_P 0x00000005 /* Enables (=1) SPI_FLOUT5 as flag output for SPI Slave-select */
726#define FLS6_P 0x00000006 /* Enables (=1) SPI_FLOUT6 as flag output for SPI Slave-select */
727#define FLS7_P 0x00000007 /* Enables (=1) SPI_FLOUT7 as flag output for SPI Slave-select */
728#define FLG1_P 0x00000009 /* Activates (=0) SPI_FLOUT1 as flag output for SPI Slave-select */
729#define FLG2_P 0x0000000A /* Activates (=0) SPI_FLOUT2 as flag output for SPI Slave-select */
730#define FLG3_P 0x0000000B /* Activates (=0) SPI_FLOUT3 as flag output for SPI Slave-select */
731#define FLG4_P 0x0000000C /* Activates (=0) SPI_FLOUT4 as flag output for SPI Slave-select */
732#define FLG5_P 0x0000000D /* Activates (=0) SPI_FLOUT5 as flag output for SPI Slave-select */
733#define FLG6_P 0x0000000E /* Activates (=0) SPI_FLOUT6 as flag output for SPI Slave-select */
734#define FLG7_P 0x0000000F /* Activates (=0) SPI_FLOUT7 as flag output for SPI Slave-select */
735
736/* SPI_STAT Masks */
737#define SPIF 0x00000001 /* Set (=1) when SPI single-word transfer complete */
738#define MODF 0x00000002 /* Set (=1) in a master device when some other device tries to become master */
739#define TXE 0x00000004 /* Set (=1) when transmission occurs with no new data in SPI_TDBR */
740#define TXS 0x00000008 /* SPI_TDBR Data Buffer Status (0=Empty, 1=Full) */
741#define RBSY 0x00000010 /* Set (=1) when data is received with RDBR full */
742#define RXS 0x00000020 /* SPI_RDBR Data Buffer Status (0=Empty, 1=Full) */
743#define TXCOL 0x00000040 /* When set (=1), corrupt data may have been transmitted */
744
745/* SPIx_FLG Masks */
746#define FLG1E 0xFDFF /* Activates SPI_FLOUT1 */
747#define FLG2E 0xFBFF /* Activates SPI_FLOUT2 */
748#define FLG3E 0xF7FF /* Activates SPI_FLOUT3 */
749#define FLG4E 0xEFFF /* Activates SPI_FLOUT4 */
750#define FLG5E 0xDFFF /* Activates SPI_FLOUT5 */
751#define FLG6E 0xBFFF /* Activates SPI_FLOUT6 */
752#define FLG7E 0x7FFF /* Activates SPI_FLOUT7 */
753
754/* ********************* ASYNCHRONOUS MEMORY CONTROLLER MASKS ************* */ 684/* ********************* ASYNCHRONOUS MEMORY CONTROLLER MASKS ************* */
755 685
756/* AMGCTL Masks */ 686/* AMGCTL Masks */
diff --git a/arch/blackfin/mach-bf537/Kconfig b/arch/blackfin/mach-bf537/Kconfig
index d81224f9d723..08b2b343ccec 100644
--- a/arch/blackfin/mach-bf537/Kconfig
+++ b/arch/blackfin/mach-bf537/Kconfig
@@ -14,8 +14,8 @@ config IRQ_DMA_ERROR
14 int "IRQ_DMA_ERROR Generic" 14 int "IRQ_DMA_ERROR Generic"
15 default 7 15 default 7
16config IRQ_ERROR 16config IRQ_ERROR
17 int "IRQ_ERROR: CAN MAC SPORT0 SPORT1 SPI UART0 UART1" 17 int "IRQ_ERROR: PPI CAN MAC SPORT0 SPORT1 SPI UART0 UART1"
18 default 7 18 default 11
19config IRQ_RTC 19config IRQ_RTC
20 int "IRQ_RTC" 20 int "IRQ_RTC"
21 default 8 21 default 8
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537e.c b/arch/blackfin/mach-bf537/boards/cm_bf537e.c
index d35fc5fe4c2b..836698c4ee54 100644
--- a/arch/blackfin/mach-bf537/boards/cm_bf537e.c
+++ b/arch/blackfin/mach-bf537/boards/cm_bf537e.c
@@ -73,7 +73,7 @@ static struct bfin5xx_spi_chip spi_adc_chip_info = {
73}; 73};
74#endif 74#endif
75 75
76#if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) 76#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
77static struct bfin5xx_spi_chip ad1836_spi_chip_info = { 77static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
78 .enable_dma = 0, 78 .enable_dma = 0,
79 .bits_per_word = 16, 79 .bits_per_word = 16,
@@ -112,12 +112,12 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
112 }, 112 },
113#endif 113#endif
114 114
115#if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) 115#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
116 { 116 {
117 .modalias = "ad1836", 117 .modalias = "ad183x",
118 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 118 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
119 .bus_num = 0, 119 .bus_num = 0,
120 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 120 .chip_select = 4,
121 .controller_data = &ad1836_spi_chip_info, 121 .controller_data = &ad1836_spi_chip_info,
122 }, 122 },
123#endif 123#endif
@@ -229,7 +229,7 @@ static struct resource isp1362_hcd_resources[] = {
229 }, { 229 }, {
230 .start = IRQ_PG15, 230 .start = IRQ_PG15,
231 .end = IRQ_PG15, 231 .end = IRQ_PG15,
232 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 232 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE,
233 }, 233 },
234}; 234};
235 235
@@ -597,13 +597,35 @@ static struct platform_device bfin_sport1_uart_device = {
597#endif 597#endif
598 598
599#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 599#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
600#include <linux/bfin_mac.h>
601static const unsigned short bfin_mac_peripherals[] = P_MII0;
602
603static struct bfin_phydev_platform_data bfin_phydev_data[] = {
604 {
605 .addr = 1,
606 .irq = IRQ_MAC_PHYINT,
607 },
608};
609
610static struct bfin_mii_bus_platform_data bfin_mii_bus_data = {
611 .phydev_number = 1,
612 .phydev_data = bfin_phydev_data,
613 .phy_mode = PHY_INTERFACE_MODE_MII,
614 .mac_peripherals = bfin_mac_peripherals,
615};
616
600static struct platform_device bfin_mii_bus = { 617static struct platform_device bfin_mii_bus = {
601 .name = "bfin_mii_bus", 618 .name = "bfin_mii_bus",
619 .dev = {
620 .platform_data = &bfin_mii_bus_data,
621 }
602}; 622};
603 623
604static struct platform_device bfin_mac_device = { 624static struct platform_device bfin_mac_device = {
605 .name = "bfin_mac", 625 .name = "bfin_mac",
606 .dev.platform_data = &bfin_mii_bus, 626 .dev = {
627 .platform_data = &bfin_mii_bus,
628 }
607}; 629};
608#endif 630#endif
609 631
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537u.c b/arch/blackfin/mach-bf537/boards/cm_bf537u.c
index d464ad5b72b2..2a85670273cb 100644
--- a/arch/blackfin/mach-bf537/boards/cm_bf537u.c
+++ b/arch/blackfin/mach-bf537/boards/cm_bf537u.c
@@ -74,7 +74,7 @@ static struct bfin5xx_spi_chip spi_adc_chip_info = {
74}; 74};
75#endif 75#endif
76 76
77#if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) 77#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
78static struct bfin5xx_spi_chip ad1836_spi_chip_info = { 78static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
79 .enable_dma = 0, 79 .enable_dma = 0,
80 .bits_per_word = 16, 80 .bits_per_word = 16,
@@ -113,12 +113,12 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
113 }, 113 },
114#endif 114#endif
115 115
116#if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) 116#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
117 { 117 {
118 .modalias = "ad1836", 118 .modalias = "ad183x",
119 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 119 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
120 .bus_num = 0, 120 .bus_num = 0,
121 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 121 .chip_select = 4,
122 .controller_data = &ad1836_spi_chip_info, 122 .controller_data = &ad1836_spi_chip_info,
123 }, 123 },
124#endif 124#endif
@@ -230,7 +230,7 @@ static struct resource isp1362_hcd_resources[] = {
230 }, { 230 }, {
231 .start = IRQ_PG15, 231 .start = IRQ_PG15,
232 .end = IRQ_PG15, 232 .end = IRQ_PG15,
233 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 233 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE,
234 }, 234 },
235}; 235};
236 236
@@ -562,13 +562,35 @@ static struct platform_device bfin_sport1_uart_device = {
562#endif 562#endif
563 563
564#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 564#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
565#include <linux/bfin_mac.h>
566static const unsigned short bfin_mac_peripherals[] = P_MII0;
567
568static struct bfin_phydev_platform_data bfin_phydev_data[] = {
569 {
570 .addr = 1,
571 .irq = IRQ_MAC_PHYINT,
572 },
573};
574
575static struct bfin_mii_bus_platform_data bfin_mii_bus_data = {
576 .phydev_number = 1,
577 .phydev_data = bfin_phydev_data,
578 .phy_mode = PHY_INTERFACE_MODE_MII,
579 .mac_peripherals = bfin_mac_peripherals,
580};
581
565static struct platform_device bfin_mii_bus = { 582static struct platform_device bfin_mii_bus = {
566 .name = "bfin_mii_bus", 583 .name = "bfin_mii_bus",
584 .dev = {
585 .platform_data = &bfin_mii_bus_data,
586 }
567}; 587};
568 588
569static struct platform_device bfin_mac_device = { 589static struct platform_device bfin_mac_device = {
570 .name = "bfin_mac", 590 .name = "bfin_mac",
571 .dev.platform_data = &bfin_mii_bus, 591 .dev = {
592 .platform_data = &bfin_mii_bus,
593 }
572}; 594};
573#endif 595#endif
574 596
diff --git a/arch/blackfin/mach-bf537/boards/minotaur.c b/arch/blackfin/mach-bf537/boards/minotaur.c
index 05d45994480e..49800518412c 100644
--- a/arch/blackfin/mach-bf537/boards/minotaur.c
+++ b/arch/blackfin/mach-bf537/boards/minotaur.c
@@ -68,13 +68,35 @@ static struct platform_device rtc_device = {
68#endif 68#endif
69 69
70#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 70#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
71#include <linux/bfin_mac.h>
72static const unsigned short bfin_mac_peripherals[] = P_MII0;
73
74static struct bfin_phydev_platform_data bfin_phydev_data[] = {
75 {
76 .addr = 1,
77 .irq = IRQ_MAC_PHYINT,
78 },
79};
80
81static struct bfin_mii_bus_platform_data bfin_mii_bus_data = {
82 .phydev_number = 1,
83 .phydev_data = bfin_phydev_data,
84 .phy_mode = PHY_INTERFACE_MODE_MII,
85 .mac_peripherals = bfin_mac_peripherals,
86};
87
71static struct platform_device bfin_mii_bus = { 88static struct platform_device bfin_mii_bus = {
72 .name = "bfin_mii_bus", 89 .name = "bfin_mii_bus",
90 .dev = {
91 .platform_data = &bfin_mii_bus_data,
92 }
73}; 93};
74 94
75static struct platform_device bfin_mac_device = { 95static struct platform_device bfin_mac_device = {
76 .name = "bfin_mac", 96 .name = "bfin_mac",
77 .dev.platform_data = &bfin_mii_bus, 97 .dev = {
98 .platform_data = &bfin_mii_bus,
99 }
78}; 100};
79#endif 101#endif
80 102
diff --git a/arch/blackfin/mach-bf537/boards/pnav10.c b/arch/blackfin/mach-bf537/boards/pnav10.c
index 812e8f991601..b95807894e25 100644
--- a/arch/blackfin/mach-bf537/boards/pnav10.c
+++ b/arch/blackfin/mach-bf537/boards/pnav10.c
@@ -99,13 +99,35 @@ static struct platform_device smc91x_device = {
99#endif 99#endif
100 100
101#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 101#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
102#include <linux/bfin_mac.h>
103static const unsigned short bfin_mac_peripherals[] = P_RMII0;
104
105static struct bfin_phydev_platform_data bfin_phydev_data[] = {
106 {
107 .addr = 1,
108 .irq = IRQ_MAC_PHYINT,
109 },
110};
111
112static struct bfin_mii_bus_platform_data bfin_mii_bus_data = {
113 .phydev_number = 1,
114 .phydev_data = bfin_phydev_data,
115 .phy_mode = PHY_INTERFACE_MODE_RMII,
116 .mac_peripherals = bfin_mac_peripherals,
117};
118
102static struct platform_device bfin_mii_bus = { 119static struct platform_device bfin_mii_bus = {
103 .name = "bfin_mii_bus", 120 .name = "bfin_mii_bus",
121 .dev = {
122 .platform_data = &bfin_mii_bus_data,
123 }
104}; 124};
105 125
106static struct platform_device bfin_mac_device = { 126static struct platform_device bfin_mac_device = {
107 .name = "bfin_mac", 127 .name = "bfin_mac",
108 .dev.platform_data = &bfin_mii_bus, 128 .dev = {
129 .platform_data = &bfin_mii_bus,
130 }
109}; 131};
110#endif 132#endif
111 133
@@ -175,8 +197,8 @@ static struct bfin5xx_spi_chip spi_adc_chip_info = {
175}; 197};
176#endif 198#endif
177 199
178#if defined(CONFIG_SND_BLACKFIN_AD183X) \ 200#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \
179 || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) 201 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
180static struct bfin5xx_spi_chip ad1836_spi_chip_info = { 202static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
181 .enable_dma = 0, 203 .enable_dma = 0,
182 .bits_per_word = 16, 204 .bits_per_word = 16,
@@ -238,13 +260,13 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
238 }, 260 },
239#endif 261#endif
240 262
241#if defined(CONFIG_SND_BLACKFIN_AD183X) \ 263#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \
242 || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) 264 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
243 { 265 {
244 .modalias = "ad1836", 266 .modalias = "ad183x",
245 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 267 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
246 .bus_num = 0, 268 .bus_num = 0,
247 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 269 .chip_select = 4,
248 .controller_data = &ad1836_spi_chip_info, 270 .controller_data = &ad1836_spi_chip_info,
249 }, 271 },
250#endif 272#endif
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
index 68a27bccc7d4..3aa344ce8e52 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -35,12 +35,10 @@
35#include <asm/reboot.h> 35#include <asm/reboot.h>
36#include <asm/portmux.h> 36#include <asm/portmux.h>
37#include <asm/dpmc.h> 37#include <asm/dpmc.h>
38#ifdef CONFIG_REGULATOR_ADP_SWITCH 38#ifdef CONFIG_REGULATOR_FIXED_VOLTAGE
39#include <linux/regulator/adp_switch.h> 39#include <linux/regulator/fixed.h>
40#endif
41#ifdef CONFIG_REGULATOR_AD5398
42#include <linux/regulator/ad5398.h>
43#endif 40#endif
41#include <linux/regulator/machine.h>
44#include <linux/regulator/consumer.h> 42#include <linux/regulator/consumer.h>
45#include <linux/regulator/userspace-consumer.h> 43#include <linux/regulator/userspace-consumer.h>
46 44
@@ -264,7 +262,7 @@ static struct resource isp1362_hcd_resources[] = {
264 }, { 262 }, {
265 .start = IRQ_PF3, 263 .start = IRQ_PF3,
266 .end = IRQ_PF3, 264 .end = IRQ_PF3,
267 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 265 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE,
268 }, 266 },
269}; 267};
270 268
@@ -329,13 +327,35 @@ static struct platform_device bfin_can_device = {
329#endif 327#endif
330 328
331#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 329#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
330#include <linux/bfin_mac.h>
331static const unsigned short bfin_mac_peripherals[] = P_MII0;
332
333static struct bfin_phydev_platform_data bfin_phydev_data[] = {
334 {
335 .addr = 1,
336 .irq = PHY_POLL, /* IRQ_MAC_PHYINT */
337 },
338};
339
340static struct bfin_mii_bus_platform_data bfin_mii_bus_data = {
341 .phydev_number = 1,
342 .phydev_data = bfin_phydev_data,
343 .phy_mode = PHY_INTERFACE_MODE_MII,
344 .mac_peripherals = bfin_mac_peripherals,
345};
346
332static struct platform_device bfin_mii_bus = { 347static struct platform_device bfin_mii_bus = {
333 .name = "bfin_mii_bus", 348 .name = "bfin_mii_bus",
349 .dev = {
350 .platform_data = &bfin_mii_bus_data,
351 }
334}; 352};
335 353
336static struct platform_device bfin_mac_device = { 354static struct platform_device bfin_mac_device = {
337 .name = "bfin_mac", 355 .name = "bfin_mac",
338 .dev.platform_data = &bfin_mii_bus, 356 .dev = {
357 .platform_data = &bfin_mii_bus,
358 }
339}; 359};
340#endif 360#endif
341 361
@@ -418,7 +438,7 @@ static struct platform_nand_data bfin_plat_nand_data = {
418static struct resource bfin_plat_nand_resources = { 438static struct resource bfin_plat_nand_resources = {
419 .start = 0x20212000, 439 .start = 0x20212000,
420 .end = 0x20212000 + (1 << MAX(BFIN_NAND_PLAT_CLE, BFIN_NAND_PLAT_ALE)), 440 .end = 0x20212000 + (1 << MAX(BFIN_NAND_PLAT_CLE, BFIN_NAND_PLAT_ALE)),
421 .flags = IORESOURCE_IO, 441 .flags = IORESOURCE_MEM,
422}; 442};
423 443
424static struct platform_device bfin_async_nand_device = { 444static struct platform_device bfin_async_nand_device = {
@@ -545,6 +565,14 @@ static struct bfin5xx_spi_chip ad1938_spi_chip_info = {
545}; 565};
546#endif 566#endif
547 567
568#if defined(CONFIG_SND_BF5XX_SOC_ADAV80X) \
569 || defined(CONFIG_SND_BF5XX_SOC_ADAV80X_MODULE)
570static struct bfin5xx_spi_chip adav801_spi_chip_info = {
571 .enable_dma = 0,
572 .bits_per_word = 8,
573};
574#endif
575
548#if defined(CONFIG_INPUT_AD714X_SPI) || defined(CONFIG_INPUT_AD714X_SPI_MODULE) 576#if defined(CONFIG_INPUT_AD714X_SPI) || defined(CONFIG_INPUT_AD714X_SPI_MODULE)
549#include <linux/input/ad714x.h> 577#include <linux/input/ad714x.h>
550static struct bfin5xx_spi_chip ad7147_spi_chip_info = { 578static struct bfin5xx_spi_chip ad7147_spi_chip_info = {
@@ -693,6 +721,65 @@ static struct bfin5xx_spi_chip ad2s1210_spi_chip_info = {
693}; 721};
694#endif 722#endif
695 723
724#if defined(CONFIG_AD7314) || defined(CONFIG_AD7314_MODULE)
725static struct bfin5xx_spi_chip ad7314_spi_chip_info = {
726 .enable_dma = 0,
727 .bits_per_word = 16,
728};
729#endif
730
731#if defined(CONFIG_AD7816) || defined(CONFIG_AD7816_MODULE)
732static unsigned short ad7816_platform_data[] = {
733 GPIO_PF4, /* rdwr_pin */
734 GPIO_PF5, /* convert_pin */
735 GPIO_PF7, /* busy_pin */
736 0,
737};
738
739static struct bfin5xx_spi_chip ad7816_spi_chip_info = {
740 .enable_dma = 0,
741 .bits_per_word = 8,
742};
743#endif
744
745#if defined(CONFIG_ADT7310) || defined(CONFIG_ADT7310_MODULE)
746static unsigned long adt7310_platform_data[3] = {
747/* INT bound temperature alarm event. line 1 */
748 IRQ_PG4, IRQF_TRIGGER_LOW,
749/* CT bound temperature alarm event irq_flags. line 0 */
750 IRQF_TRIGGER_LOW,
751};
752
753static struct bfin5xx_spi_chip adt7310_spi_chip_info = {
754 .enable_dma = 0,
755 .bits_per_word = 8,
756};
757#endif
758
759#if defined(CONFIG_AD7298) || defined(CONFIG_AD7298_MODULE)
760static unsigned short ad7298_platform_data[] = {
761 GPIO_PF7, /* busy_pin */
762 0,
763};
764
765static struct bfin5xx_spi_chip ad7298_spi_chip_info = {
766 .enable_dma = 0,
767 .bits_per_word = 16,
768};
769#endif
770
771#if defined(CONFIG_ADT7316_SPI) || defined(CONFIG_ADT7316_SPI_MODULE)
772static unsigned long adt7316_spi_data[2] = {
773 IRQF_TRIGGER_LOW, /* interrupt flags */
774 GPIO_PF7, /* ldac_pin, 0 means DAC/LDAC registers control DAC update */
775};
776
777static struct bfin5xx_spi_chip adt7316_spi_chip_info = {
778 .enable_dma = 0,
779 .bits_per_word = 8,
780};
781#endif
782
696#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 783#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
697#define MMC_SPI_CARD_DETECT_INT IRQ_PF5 784#define MMC_SPI_CARD_DETECT_INT IRQ_PF5
698 785
@@ -824,14 +911,12 @@ static struct bfin5xx_spi_chip lq035q1_spi_chip_info = {
824static struct bfin5xx_spi_chip enc28j60_spi_chip_info = { 911static struct bfin5xx_spi_chip enc28j60_spi_chip_info = {
825 .enable_dma = 1, 912 .enable_dma = 1,
826 .bits_per_word = 8, 913 .bits_per_word = 8,
827 .cs_gpio = GPIO_PF10,
828}; 914};
829#endif 915#endif
830 916
831#if defined(CONFIG_ADF702X) || defined(CONFIG_ADF702X_MODULE) 917#if defined(CONFIG_ADF702X) || defined(CONFIG_ADF702X_MODULE)
832static struct bfin5xx_spi_chip adf7021_spi_chip_info = { 918static struct bfin5xx_spi_chip adf7021_spi_chip_info = {
833 .bits_per_word = 16, 919 .bits_per_word = 16,
834 .cs_gpio = GPIO_PF10,
835}; 920};
836 921
837#include <linux/spi/adf702x.h> 922#include <linux/spi/adf702x.h>
@@ -938,6 +1023,13 @@ static struct bfin5xx_spi_chip spi_adxl34x_chip_info = {
938}; 1023};
939#endif 1024#endif
940 1025
1026#if defined(CONFIG_AD7476) || defined(CONFIG_AD7476_MODULE)
1027static struct bfin5xx_spi_chip spi_ad7476_chip_info = {
1028 .enable_dma = 0, /* use dma transfer with this chip*/
1029 .bits_per_word = 8,
1030};
1031#endif
1032
941static struct spi_board_info bfin_spi_board_info[] __initdata = { 1033static struct spi_board_info bfin_spi_board_info[] __initdata = {
942#if defined(CONFIG_MTD_M25P80) \ 1034#if defined(CONFIG_MTD_M25P80) \
943 || defined(CONFIG_MTD_M25P80_MODULE) 1035 || defined(CONFIG_MTD_M25P80_MODULE)
@@ -982,7 +1074,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
982 .modalias = "ad183x", 1074 .modalias = "ad183x",
983 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 1075 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
984 .bus_num = 0, 1076 .bus_num = 0,
985 .chip_select = 4,/* CONFIG_SND_BLACKFIN_SPI_PFBIT */ 1077 .chip_select = 4,
986 .platform_data = "ad1836", /* only includes chip name for the moment */ 1078 .platform_data = "ad1836", /* only includes chip name for the moment */
987 .controller_data = &ad1836_spi_chip_info, 1079 .controller_data = &ad1836_spi_chip_info,
988 .mode = SPI_MODE_3, 1080 .mode = SPI_MODE_3,
@@ -1000,6 +1092,17 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1000 }, 1092 },
1001#endif 1093#endif
1002 1094
1095#if defined(CONFIG_SND_BF5XX_SOC_ADAV80X) || defined(CONFIG_SND_BF5XX_SOC_ADAV80X_MODULE)
1096 {
1097 .modalias = "adav80x",
1098 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
1099 .bus_num = 0,
1100 .chip_select = 1,
1101 .controller_data = &adav801_spi_chip_info,
1102 .mode = SPI_MODE_3,
1103 },
1104#endif
1105
1003#if defined(CONFIG_INPUT_AD714X_SPI) || defined(CONFIG_INPUT_AD714X_SPI_MODULE) 1106#if defined(CONFIG_INPUT_AD714X_SPI) || defined(CONFIG_INPUT_AD714X_SPI_MODULE)
1004 { 1107 {
1005 .modalias = "ad714x_captouch", 1108 .modalias = "ad714x_captouch",
@@ -1018,6 +1121,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1018 .modalias = "ad2s90", 1121 .modalias = "ad2s90",
1019 .bus_num = 0, 1122 .bus_num = 0,
1020 .chip_select = 3, /* change it for your board */ 1123 .chip_select = 3, /* change it for your board */
1124 .mode = SPI_MODE_3,
1021 .platform_data = NULL, 1125 .platform_data = NULL,
1022 .controller_data = &ad2s90_spi_chip_info, 1126 .controller_data = &ad2s90_spi_chip_info,
1023 }, 1127 },
@@ -1044,6 +1148,67 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1044 }, 1148 },
1045#endif 1149#endif
1046 1150
1151#if defined(CONFIG_AD7314) || defined(CONFIG_AD7314_MODULE)
1152 {
1153 .modalias = "ad7314",
1154 .max_speed_hz = 1000000,
1155 .bus_num = 0,
1156 .chip_select = 4, /* CS, change it for your board */
1157 .controller_data = &ad7314_spi_chip_info,
1158 .mode = SPI_MODE_1,
1159 },
1160#endif
1161
1162#if defined(CONFIG_AD7816) || defined(CONFIG_AD7816_MODULE)
1163 {
1164 .modalias = "ad7818",
1165 .max_speed_hz = 1000000,
1166 .bus_num = 0,
1167 .chip_select = 4, /* CS, change it for your board */
1168 .platform_data = ad7816_platform_data,
1169 .controller_data = &ad7816_spi_chip_info,
1170 .mode = SPI_MODE_3,
1171 },
1172#endif
1173
1174#if defined(CONFIG_ADT7310) || defined(CONFIG_ADT7310_MODULE)
1175 {
1176 .modalias = "adt7310",
1177 .max_speed_hz = 1000000,
1178 .irq = IRQ_PG5, /* CT alarm event. Line 0 */
1179 .bus_num = 0,
1180 .chip_select = 4, /* CS, change it for your board */
1181 .platform_data = adt7310_platform_data,
1182 .controller_data = &adt7310_spi_chip_info,
1183 .mode = SPI_MODE_3,
1184 },
1185#endif
1186
1187#if defined(CONFIG_AD7298) || defined(CONFIG_AD7298_MODULE)
1188 {
1189 .modalias = "ad7298",
1190 .max_speed_hz = 1000000,
1191 .bus_num = 0,
1192 .chip_select = 4, /* CS, change it for your board */
1193 .platform_data = ad7298_platform_data,
1194 .controller_data = &ad7298_spi_chip_info,
1195 .mode = SPI_MODE_3,
1196 },
1197#endif
1198
1199#if defined(CONFIG_ADT7316_SPI) || defined(CONFIG_ADT7316_SPI_MODULE)
1200 {
1201 .modalias = "adt7316",
1202 .max_speed_hz = 1000000,
1203 .irq = IRQ_PG5, /* interrupt line */
1204 .bus_num = 0,
1205 .chip_select = 4, /* CS, change it for your board */
1206 .platform_data = adt7316_spi_data,
1207 .controller_data = &adt7316_spi_chip_info,
1208 .mode = SPI_MODE_3,
1209 },
1210#endif
1211
1047#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 1212#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
1048 { 1213 {
1049 .modalias = "mmc_spi", 1214 .modalias = "mmc_spi",
@@ -1103,7 +1268,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1103 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ 1268 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
1104 .irq = IRQ_PF6, 1269 .irq = IRQ_PF6,
1105 .bus_num = 0, 1270 .bus_num = 0,
1106 .chip_select = 0, /* GPIO controlled SSEL */ 1271 .chip_select = GPIO_PF10 + MAX_CTRL_CS, /* GPIO controlled SSEL */
1107 .controller_data = &enc28j60_spi_chip_info, 1272 .controller_data = &enc28j60_spi_chip_info,
1108 .mode = SPI_MODE_0, 1273 .mode = SPI_MODE_0,
1109 }, 1274 },
@@ -1125,7 +1290,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1125 .modalias = "adf702x", 1290 .modalias = "adf702x",
1126 .max_speed_hz = 16000000, /* max spi clock (SCK) speed in HZ */ 1291 .max_speed_hz = 16000000, /* max spi clock (SCK) speed in HZ */
1127 .bus_num = 0, 1292 .bus_num = 0,
1128 .chip_select = 0, /* GPIO controlled SSEL */ 1293 .chip_select = GPIO_PF10 + MAX_CTRL_CS, /* GPIO controlled SSEL */
1129 .controller_data = &adf7021_spi_chip_info, 1294 .controller_data = &adf7021_spi_chip_info,
1130 .platform_data = &adf7021_platform_data, 1295 .platform_data = &adf7021_platform_data,
1131 .mode = SPI_MODE_0, 1296 .mode = SPI_MODE_0,
@@ -1143,12 +1308,239 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1143 .mode = SPI_MODE_0, 1308 .mode = SPI_MODE_0,
1144 }, 1309 },
1145#endif 1310#endif
1311#if defined(CONFIG_AD7476) \
1312 || defined(CONFIG_AD7476_MODULE)
1313 {
1314 .modalias = "ad7476", /* Name of spi_driver for this device */
1315 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
1316 .bus_num = 0, /* Framework bus number */
1317 .chip_select = 1, /* Framework chip select. */
1318 .platform_data = NULL, /* No spi_driver specific config */
1319 .controller_data = &spi_ad7476_chip_info,
1320 .mode = SPI_MODE_3,
1321 },
1322#endif
1323#if defined(CONFIG_ADE7753) \
1324 || defined(CONFIG_ADE7753_MODULE)
1325 {
1326 .modalias = "ade7753",
1327 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1328 .bus_num = 0,
1329 .chip_select = 1, /* CS, change it for your board */
1330 .platform_data = NULL, /* No spi_driver specific config */
1331 .mode = SPI_MODE_1,
1332 },
1333#endif
1334#if defined(CONFIG_ADE7754) \
1335 || defined(CONFIG_ADE7754_MODULE)
1336 {
1337 .modalias = "ade7754",
1338 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1339 .bus_num = 0,
1340 .chip_select = 1, /* CS, change it for your board */
1341 .platform_data = NULL, /* No spi_driver specific config */
1342 .mode = SPI_MODE_1,
1343 },
1344#endif
1345#if defined(CONFIG_ADE7758) \
1346 || defined(CONFIG_ADE7758_MODULE)
1347 {
1348 .modalias = "ade7758",
1349 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1350 .bus_num = 0,
1351 .chip_select = 1, /* CS, change it for your board */
1352 .platform_data = NULL, /* No spi_driver specific config */
1353 .mode = SPI_MODE_1,
1354 },
1355#endif
1356#if defined(CONFIG_ADE7759) \
1357 || defined(CONFIG_ADE7759_MODULE)
1358 {
1359 .modalias = "ade7759",
1360 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1361 .bus_num = 0,
1362 .chip_select = 1, /* CS, change it for your board */
1363 .platform_data = NULL, /* No spi_driver specific config */
1364 .mode = SPI_MODE_1,
1365 },
1366#endif
1367#if defined(CONFIG_ADE7854_SPI) \
1368 || defined(CONFIG_ADE7854_SPI_MODULE)
1369 {
1370 .modalias = "ade7854",
1371 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1372 .bus_num = 0,
1373 .chip_select = 1, /* CS, change it for your board */
1374 .platform_data = NULL, /* No spi_driver specific config */
1375 .mode = SPI_MODE_3,
1376 },
1377#endif
1378#if defined(CONFIG_ADIS16060) \
1379 || defined(CONFIG_ADIS16060_MODULE)
1380 {
1381 .modalias = "adis16060_r",
1382 .max_speed_hz = 2900000, /* max spi clock (SCK) speed in HZ */
1383 .bus_num = 0,
1384 .chip_select = MAX_CTRL_CS + 1, /* CS for read, change it for your board */
1385 .platform_data = NULL, /* No spi_driver specific config */
1386 .mode = SPI_MODE_0,
1387 },
1388 {
1389 .modalias = "adis16060_w",
1390 .max_speed_hz = 2900000, /* max spi clock (SCK) speed in HZ */
1391 .bus_num = 0,
1392 .chip_select = 2, /* CS for write, change it for your board */
1393 .platform_data = NULL, /* No spi_driver specific config */
1394 .mode = SPI_MODE_1,
1395 },
1396#endif
1397#if defined(CONFIG_ADIS16130) \
1398 || defined(CONFIG_ADIS16130_MODULE)
1399 {
1400 .modalias = "adis16130",
1401 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1402 .bus_num = 0,
1403 .chip_select = 1, /* CS for read, change it for your board */
1404 .platform_data = NULL, /* No spi_driver specific config */
1405 .mode = SPI_MODE_3,
1406 },
1407#endif
1408#if defined(CONFIG_ADIS16201) \
1409 || defined(CONFIG_ADIS16201_MODULE)
1410 {
1411 .modalias = "adis16201",
1412 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1413 .bus_num = 0,
1414 .chip_select = 5, /* CS, change it for your board */
1415 .platform_data = NULL, /* No spi_driver specific config */
1416 .mode = SPI_MODE_3,
1417 .irq = IRQ_PF4,
1418 },
1419#endif
1420#if defined(CONFIG_ADIS16203) \
1421 || defined(CONFIG_ADIS16203_MODULE)
1422 {
1423 .modalias = "adis16203",
1424 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1425 .bus_num = 0,
1426 .chip_select = 5, /* CS, change it for your board */
1427 .platform_data = NULL, /* No spi_driver specific config */
1428 .mode = SPI_MODE_3,
1429 .irq = IRQ_PF4,
1430 },
1431#endif
1432#if defined(CONFIG_ADIS16204) \
1433 || defined(CONFIG_ADIS16204_MODULE)
1434 {
1435 .modalias = "adis16204",
1436 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1437 .bus_num = 0,
1438 .chip_select = 5, /* CS, change it for your board */
1439 .platform_data = NULL, /* No spi_driver specific config */
1440 .mode = SPI_MODE_3,
1441 .irq = IRQ_PF4,
1442 },
1443#endif
1444#if defined(CONFIG_ADIS16209) \
1445 || defined(CONFIG_ADIS16209_MODULE)
1446 {
1447 .modalias = "adis16209",
1448 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1449 .bus_num = 0,
1450 .chip_select = 5, /* CS, change it for your board */
1451 .platform_data = NULL, /* No spi_driver specific config */
1452 .mode = SPI_MODE_3,
1453 .irq = IRQ_PF4,
1454 },
1455#endif
1456#if defined(CONFIG_ADIS16220) \
1457 || defined(CONFIG_ADIS16220_MODULE)
1458 {
1459 .modalias = "adis16220",
1460 .max_speed_hz = 2000000, /* max spi clock (SCK) speed in HZ */
1461 .bus_num = 0,
1462 .chip_select = 5, /* CS, change it for your board */
1463 .platform_data = NULL, /* No spi_driver specific config */
1464 .mode = SPI_MODE_3,
1465 .irq = IRQ_PF4,
1466 },
1467#endif
1468#if defined(CONFIG_ADIS16240) \
1469 || defined(CONFIG_ADIS16240_MODULE)
1470 {
1471 .modalias = "adis16240",
1472 .max_speed_hz = 1500000, /* max spi clock (SCK) speed in HZ */
1473 .bus_num = 0,
1474 .chip_select = 5, /* CS, change it for your board */
1475 .platform_data = NULL, /* No spi_driver specific config */
1476 .mode = SPI_MODE_3,
1477 .irq = IRQ_PF4,
1478 },
1479#endif
1480#if defined(CONFIG_ADIS16260) \
1481 || defined(CONFIG_ADIS16260_MODULE)
1482 {
1483 .modalias = "adis16260",
1484 .max_speed_hz = 1500000, /* max spi clock (SCK) speed in HZ */
1485 .bus_num = 0,
1486 .chip_select = 5, /* CS, change it for your board */
1487 .platform_data = NULL, /* No spi_driver specific config */
1488 .mode = SPI_MODE_3,
1489 .irq = IRQ_PF4,
1490 },
1491#endif
1492#if defined(CONFIG_ADIS16261) \
1493 || defined(CONFIG_ADIS16261_MODULE)
1494 {
1495 .modalias = "adis16261",
1496 .max_speed_hz = 2500000, /* max spi clock (SCK) speed in HZ */
1497 .bus_num = 0,
1498 .chip_select = 1, /* CS, change it for your board */
1499 .platform_data = NULL, /* No spi_driver specific config */
1500 .mode = SPI_MODE_3,
1501 },
1502#endif
1503#if defined(CONFIG_ADIS16300) \
1504 || defined(CONFIG_ADIS16300_MODULE)
1505 {
1506 .modalias = "adis16300",
1507 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1508 .bus_num = 0,
1509 .chip_select = 5, /* CS, change it for your board */
1510 .platform_data = NULL, /* No spi_driver specific config */
1511 .mode = SPI_MODE_3,
1512 .irq = IRQ_PF4,
1513 },
1514#endif
1515#if defined(CONFIG_ADIS16350) \
1516 || defined(CONFIG_ADIS16350_MODULE)
1517 {
1518 .modalias = "adis16364",
1519 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1520 .bus_num = 0,
1521 .chip_select = 5, /* CS, change it for your board */
1522 .platform_data = NULL, /* No spi_driver specific config */
1523 .mode = SPI_MODE_3,
1524 .irq = IRQ_PF4,
1525 },
1526#endif
1527#if defined(CONFIG_ADIS16400) \
1528 || defined(CONFIG_ADIS16400_MODULE)
1529 {
1530 .modalias = "adis16400",
1531 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1532 .bus_num = 0,
1533 .chip_select = 1, /* CS, change it for your board */
1534 .platform_data = NULL, /* No spi_driver specific config */
1535 .mode = SPI_MODE_3,
1536 },
1537#endif
1146}; 1538};
1147 1539
1148#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 1540#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
1149/* SPI controller data */ 1541/* SPI controller data */
1150static struct bfin5xx_spi_master bfin_spi0_info = { 1542static struct bfin5xx_spi_master bfin_spi0_info = {
1151 .num_chipselect = 8, 1543 .num_chipselect = MAX_CTRL_CS + MAX_BLACKFIN_GPIOS,
1152 .enable_dma = 1, /* master has the ability to do dma transfer */ 1544 .enable_dma = 1, /* master has the ability to do dma transfer */
1153 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, 1545 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
1154}; 1546};
@@ -1645,7 +2037,7 @@ static struct adp5520_keys_platform_data adp5520_keys_data = {
1645}; 2037};
1646 2038
1647 /* 2039 /*
1648 * ADP5520/5501 Multifuction Device Init Data 2040 * ADP5520/5501 Multifunction Device Init Data
1649 */ 2041 */
1650 2042
1651static struct adp5520_platform_data adp5520_pdev_data = { 2043static struct adp5520_platform_data adp5520_pdev_data = {
@@ -1773,12 +2165,6 @@ static struct regulator_init_data ad5398_regulator_data = {
1773 .consumer_supplies = &ad5398_consumer, 2165 .consumer_supplies = &ad5398_consumer,
1774}; 2166};
1775 2167
1776static struct ad5398_platform_data ad5398_i2c_platform_data = {
1777 .current_bits = 10,
1778 .current_offset = 4,
1779 .regulator_data = &ad5398_regulator_data,
1780};
1781
1782#if defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER) || \ 2168#if defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER) || \
1783 defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER_MODULE) 2169 defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER_MODULE)
1784static struct platform_device ad5398_virt_consumer_device = { 2170static struct platform_device ad5398_virt_consumer_device = {
@@ -1811,7 +2197,34 @@ static struct platform_device ad5398_userspace_consumer_device = {
1811#endif 2197#endif
1812#endif 2198#endif
1813 2199
2200#if defined(CONFIG_ADT7410) || defined(CONFIG_ADT7410_MODULE)
2201/* INT bound temperature alarm event. line 1 */
2202static unsigned long adt7410_platform_data[2] = {
2203 IRQ_PG4, IRQF_TRIGGER_LOW,
2204};
2205#endif
2206
2207#if defined(CONFIG_ADT7316_I2C) || defined(CONFIG_ADT7316_I2C_MODULE)
2208/* INT bound temperature alarm event. line 1 */
2209static unsigned long adt7316_i2c_data[2] = {
2210 IRQF_TRIGGER_LOW, /* interrupt flags */
2211 GPIO_PF4, /* ldac_pin, 0 means DAC/LDAC registers control DAC update */
2212};
2213#endif
2214
1814static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 2215static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
2216#if defined(CONFIG_SND_BF5XX_SOC_AD193X) || defined(CONFIG_SND_BF5XX_SOC_AD193X_MODULE)
2217 {
2218 I2C_BOARD_INFO("ad1937", 0x04),
2219 },
2220#endif
2221
2222#if defined(CONFIG_SND_BF5XX_SOC_ADAV80X) || defined(CONFIG_SND_BF5XX_SOC_ADAV80X_MODULE)
2223 {
2224 I2C_BOARD_INFO("adav803", 0x10),
2225 },
2226#endif
2227
1815#if defined(CONFIG_INPUT_AD714X_I2C) || defined(CONFIG_INPUT_AD714X_I2C_MODULE) 2228#if defined(CONFIG_INPUT_AD714X_I2C) || defined(CONFIG_INPUT_AD714X_I2C_MODULE)
1816 { 2229 {
1817 I2C_BOARD_INFO("ad7142_captouch", 0x2C), 2230 I2C_BOARD_INFO("ad7142_captouch", 0x2C),
@@ -1843,12 +2256,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
1843 { 2256 {
1844 I2C_BOARD_INFO("ad7414", 0x9), 2257 I2C_BOARD_INFO("ad7414", 0x9),
1845 .irq = IRQ_PG5, 2258 .irq = IRQ_PG5,
1846 /* 2259 .irq_flags = IRQF_TRIGGER_LOW,
1847 * platform_data pointer is borrwoed by the driver to
1848 * store custimer defined IRQ ALART level mode.
1849 * only IRQF_TRIGGER_HIGH and IRQF_TRIGGER_LOW are valid.
1850 */
1851 .platform_data = (void *)IRQF_TRIGGER_LOW,
1852 }, 2260 },
1853#endif 2261#endif
1854 2262
@@ -1856,12 +2264,56 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
1856 { 2264 {
1857 I2C_BOARD_INFO("ad7417", 0xb), 2265 I2C_BOARD_INFO("ad7417", 0xb),
1858 .irq = IRQ_PG5, 2266 .irq = IRQ_PG5,
1859 /* 2267 .irq_flags = IRQF_TRIGGER_LOW,
1860 * platform_data pointer is borrwoed by the driver to 2268 .platform_data = (void *)GPIO_PF4,
1861 * store custimer defined IRQ ALART level mode. 2269 },
1862 * only IRQF_TRIGGER_HIGH and IRQF_TRIGGER_LOW are valid. 2270#endif
1863 */ 2271
1864 .platform_data = (void *)IRQF_TRIGGER_LOW, 2272#if defined(CONFIG_ADE7854_I2C) || defined(CONFIG_ADE7854_I2C_MODULE)
2273 {
2274 I2C_BOARD_INFO("ade7854", 0x38),
2275 },
2276#endif
2277
2278#if defined(CONFIG_ADT75) || defined(CONFIG_ADT75_MODULE)
2279 {
2280 I2C_BOARD_INFO("adt75", 0x9),
2281 .irq = IRQ_PG5,
2282 .irq_flags = IRQF_TRIGGER_LOW,
2283 },
2284#endif
2285
2286#if defined(CONFIG_ADT7408) || defined(CONFIG_ADT7408_MODULE)
2287 {
2288 I2C_BOARD_INFO("adt7408", 0x18),
2289 .irq = IRQ_PG5,
2290 .irq_flags = IRQF_TRIGGER_LOW,
2291 },
2292#endif
2293
2294#if defined(CONFIG_ADT7410) || defined(CONFIG_ADT7410_MODULE)
2295 {
2296 I2C_BOARD_INFO("adt7410", 0x48),
2297 /* CT critical temperature event. line 0 */
2298 .irq = IRQ_PG5,
2299 .irq_flags = IRQF_TRIGGER_LOW,
2300 .platform_data = (void *)&adt7410_platform_data,
2301 },
2302#endif
2303
2304#if defined(CONFIG_AD7291) || defined(CONFIG_AD7291_MODULE)
2305 {
2306 I2C_BOARD_INFO("ad7291", 0x20),
2307 .irq = IRQ_PG5,
2308 .irq_flags = IRQF_TRIGGER_LOW,
2309 },
2310#endif
2311
2312#if defined(CONFIG_ADT7316_I2C) || defined(CONFIG_ADT7316_I2C_MODULE)
2313 {
2314 I2C_BOARD_INFO("adt7316", 0x48),
2315 .irq = IRQ_PG6,
2316 .platform_data = (void *)&adt7316_i2c_data,
1865 }, 2317 },
1866#endif 2318#endif
1867 2319
@@ -1917,7 +2369,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
1917#endif 2369#endif
1918#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE) 2370#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
1919 { 2371 {
1920 I2C_BOARD_INFO("bf537-lq035-ad5280", 0x2C), 2372 I2C_BOARD_INFO("bf537-lq035-ad5280", 0x2F),
1921 }, 2373 },
1922#endif 2374#endif
1923#if defined(CONFIG_BACKLIGHT_ADP8870) || defined(CONFIG_BACKLIGHT_ADP8870_MODULE) 2375#if defined(CONFIG_BACKLIGHT_ADP8870) || defined(CONFIG_BACKLIGHT_ADP8870_MODULE)
@@ -1954,7 +2406,7 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
1954#if defined(CONFIG_REGULATOR_AD5398) || defined(CONFIG_REGULATOR_AD5398_MODULE) 2406#if defined(CONFIG_REGULATOR_AD5398) || defined(CONFIG_REGULATOR_AD5398_MODULE)
1955 { 2407 {
1956 I2C_BOARD_INFO("ad5398", 0xC), 2408 I2C_BOARD_INFO("ad5398", 0xC),
1957 .platform_data = (void *)&ad5398_i2c_platform_data, 2409 .platform_data = (void *)&ad5398_regulator_data,
1958 }, 2410 },
1959#endif 2411#endif
1960#if defined(CONFIG_BACKLIGHT_ADP8860) || defined(CONFIG_BACKLIGHT_ADP8860_MODULE) 2412#if defined(CONFIG_BACKLIGHT_ADP8860) || defined(CONFIG_BACKLIGHT_ADP8860_MODULE)
@@ -1963,6 +2415,16 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
1963 .platform_data = (void *)&adp8860_pdata, 2415 .platform_data = (void *)&adp8860_pdata,
1964 }, 2416 },
1965#endif 2417#endif
2418#if defined(CONFIG_SND_SOC_ADAU1373) || defined(CONFIG_SND_SOC_ADAU1373_MODULE)
2419 {
2420 I2C_BOARD_INFO("adau1373", 0x1A),
2421 },
2422#endif
2423#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
2424 {
2425 I2C_BOARD_INFO("ad5252", 0x2e),
2426 },
2427#endif
1966}; 2428};
1967 2429
1968#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 2430#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
@@ -2147,50 +2609,38 @@ static struct platform_device bfin_ac97 = {
2147}; 2609};
2148#endif 2610#endif
2149 2611
2150#if defined(CONFIG_REGULATOR_ADP_SWITCH) || defined(CONFIG_REGULATOR_ADP_SWITCH_MODULE) 2612#if defined(CONFIG_REGULATOR_FIXED_VOLTAGE) || defined(CONFIG_REGULATOR_FIXED_VOLTAGE_MODULE)
2151#define REGULATOR_ADP122 "adp122" 2613#define REGULATOR_ADP122 "adp122"
2152#define REGULATOR_ADP150 "adp150" 2614#define REGULATOR_ADP122_UV 2500000
2153 2615
2154static struct regulator_consumer_supply adp122_consumers = { 2616static struct regulator_consumer_supply adp122_consumers = {
2155 .supply = REGULATOR_ADP122, 2617 .supply = REGULATOR_ADP122,
2156}; 2618};
2157 2619
2158static struct regulator_consumer_supply adp150_consumers = { 2620static struct regulator_init_data adp_switch_regulator_data = {
2159 .supply = REGULATOR_ADP150, 2621 .constraints = {
2160}; 2622 .name = REGULATOR_ADP122,
2161 2623 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
2162static struct regulator_init_data adp_switch_regulator_data[] = { 2624 .min_uV = REGULATOR_ADP122_UV,
2163 { 2625 .max_uV = REGULATOR_ADP122_UV,
2164 .constraints = { 2626 .min_uA = 0,
2165 .name = REGULATOR_ADP122, 2627 .max_uA = 300000,
2166 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
2167 .min_uA = 0,
2168 .max_uA = 300000,
2169 },
2170 .num_consumer_supplies = 1, /* only 1 */
2171 .consumer_supplies = &adp122_consumers,
2172 .driver_data = (void *)GPIO_PF2, /* gpio port only */
2173 },
2174 {
2175 .constraints = {
2176 .name = REGULATOR_ADP150,
2177 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
2178 .min_uA = 0,
2179 .max_uA = 150000,
2180 },
2181 .num_consumer_supplies = 1, /* only 1 */
2182 .consumer_supplies = &adp150_consumers,
2183 .driver_data = (void *)GPIO_PF3, /* gpio port only */
2184 }, 2628 },
2629 .num_consumer_supplies = 1, /* only 1 */
2630 .consumer_supplies = &adp122_consumers,
2185}; 2631};
2186 2632
2187static struct adp_switch_platform_data adp_switch_pdata = { 2633static struct fixed_voltage_config adp_switch_pdata = {
2188 .regulator_num = ARRAY_SIZE(adp_switch_regulator_data), 2634 .supply_name = REGULATOR_ADP122,
2189 .regulator_data = adp_switch_regulator_data, 2635 .microvolts = REGULATOR_ADP122_UV,
2636 .gpio = GPIO_PF2,
2637 .enable_high = 1,
2638 .enabled_at_boot = 0,
2639 .init_data = &adp_switch_regulator_data,
2190}; 2640};
2191 2641
2192static struct platform_device adp_switch_device = { 2642static struct platform_device adp_switch_device = {
2193 .name = "adp_switch", 2643 .name = "reg-fixed-voltage",
2194 .id = 0, 2644 .id = 0,
2195 .dev = { 2645 .dev = {
2196 .platform_data = &adp_switch_pdata, 2646 .platform_data = &adp_switch_pdata,
@@ -2216,27 +2666,26 @@ static struct platform_device adp122_userspace_consumer_device = {
2216 .platform_data = &adp122_userspace_comsumer_data, 2666 .platform_data = &adp122_userspace_comsumer_data,
2217 }, 2667 },
2218}; 2668};
2669#endif
2670#endif
2219 2671
2220static struct regulator_bulk_data adp150_bulk_data = { 2672#if defined(CONFIG_IIO_GPIO_TRIGGER) || \
2221 .supply = REGULATOR_ADP150, 2673 defined(CONFIG_IIO_GPIO_TRIGGER_MODULE)
2222};
2223 2674
2224static struct regulator_userspace_consumer_data adp150_userspace_comsumer_data = { 2675static struct resource iio_gpio_trigger_resources[] = {
2225 .name = REGULATOR_ADP150, 2676 [0] = {
2226 .num_supplies = 1, 2677 .start = IRQ_PF5,
2227 .supplies = &adp150_bulk_data, 2678 .end = IRQ_PF5,
2679 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE,
2680 },
2228}; 2681};
2229 2682
2230static struct platform_device adp150_userspace_consumer_device = { 2683static struct platform_device iio_gpio_trigger = {
2231 .name = "reg-userspace-consumer", 2684 .name = "iio_gpio_trigger",
2232 .id = 1, 2685 .num_resources = ARRAY_SIZE(iio_gpio_trigger_resources),
2233 .dev = { 2686 .resource = iio_gpio_trigger_resources,
2234 .platform_data = &adp150_userspace_comsumer_data,
2235 },
2236}; 2687};
2237#endif 2688#endif
2238#endif
2239
2240 2689
2241static struct platform_device *stamp_devices[] __initdata = { 2690static struct platform_device *stamp_devices[] __initdata = {
2242 2691
@@ -2369,14 +2818,18 @@ static struct platform_device *stamp_devices[] __initdata = {
2369#endif 2818#endif
2370#endif 2819#endif
2371 2820
2372#if defined(CONFIG_REGULATOR_ADP_SWITCH) || defined(CONFIG_REGULATOR_ADP_SWITCH_MODULE) 2821#if defined(CONFIG_REGULATOR_FIXED_VOLTAGE) || defined(CONFIG_REGULATOR_FIXED_VOLTAGE_MODULE)
2373 &adp_switch_device, 2822 &adp_switch_device,
2374#if defined(CONFIG_REGULATOR_USERSPACE_CONSUMER) || \ 2823#if defined(CONFIG_REGULATOR_USERSPACE_CONSUMER) || \
2375 defined(CONFIG_REGULATOR_USERSPACE_CONSUMER_MODULE) 2824 defined(CONFIG_REGULATOR_USERSPACE_CONSUMER_MODULE)
2376 &adp122_userspace_consumer_device, 2825 &adp122_userspace_consumer_device,
2377 &adp150_userspace_consumer_device,
2378#endif 2826#endif
2379#endif 2827#endif
2828
2829#if defined(CONFIG_IIO_GPIO_TRIGGER) || \
2830 defined(CONFIG_IIO_GPIO_TRIGGER_MODULE)
2831 &iio_gpio_trigger,
2832#endif
2380}; 2833};
2381 2834
2382static int __init stamp_init(void) 2835static int __init stamp_init(void)
diff --git a/arch/blackfin/mach-bf537/boards/tcm_bf537.c b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
index 4f0a2e72ce4c..31498add1a42 100644
--- a/arch/blackfin/mach-bf537/boards/tcm_bf537.c
+++ b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
@@ -74,7 +74,7 @@ static struct bfin5xx_spi_chip spi_adc_chip_info = {
74}; 74};
75#endif 75#endif
76 76
77#if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) 77#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
78static struct bfin5xx_spi_chip ad1836_spi_chip_info = { 78static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
79 .enable_dma = 0, 79 .enable_dma = 0,
80 .bits_per_word = 16, 80 .bits_per_word = 16,
@@ -113,12 +113,12 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
113 }, 113 },
114#endif 114#endif
115 115
116#if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) 116#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
117 { 117 {
118 .modalias = "ad1836", 118 .modalias = "ad183x",
119 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 119 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
120 .bus_num = 0, 120 .bus_num = 0,
121 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 121 .chip_select = 4,
122 .controller_data = &ad1836_spi_chip_info, 122 .controller_data = &ad1836_spi_chip_info,
123 }, 123 },
124#endif 124#endif
@@ -230,7 +230,7 @@ static struct resource isp1362_hcd_resources[] = {
230 }, { 230 }, {
231 .start = IRQ_PG15, 231 .start = IRQ_PG15,
232 .end = IRQ_PG15, 232 .end = IRQ_PG15,
233 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 233 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE,
234 }, 234 },
235}; 235};
236 236
@@ -564,13 +564,35 @@ static struct platform_device bfin_sport1_uart_device = {
564#endif 564#endif
565 565
566#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 566#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
567#include <linux/bfin_mac.h>
568static const unsigned short bfin_mac_peripherals[] = P_MII0;
569
570static struct bfin_phydev_platform_data bfin_phydev_data[] = {
571 {
572 .addr = 1,
573 .irq = IRQ_MAC_PHYINT,
574 },
575};
576
577static struct bfin_mii_bus_platform_data bfin_mii_bus_data = {
578 .phydev_number = 1,
579 .phydev_data = bfin_phydev_data,
580 .phy_mode = PHY_INTERFACE_MODE_MII,
581 .mac_peripherals = bfin_mac_peripherals,
582};
583
567static struct platform_device bfin_mii_bus = { 584static struct platform_device bfin_mii_bus = {
568 .name = "bfin_mii_bus", 585 .name = "bfin_mii_bus",
586 .dev = {
587 .platform_data = &bfin_mii_bus_data,
588 }
569}; 589};
570 590
571static struct platform_device bfin_mac_device = { 591static struct platform_device bfin_mac_device = {
572 .name = "bfin_mac", 592 .name = "bfin_mac",
573 .dev.platform_data = &bfin_mii_bus, 593 .dev = {
594 .platform_data = &bfin_mii_bus,
595 }
574}; 596};
575#endif 597#endif
576 598
diff --git a/arch/blackfin/mach-bf537/include/mach/defBF534.h b/arch/blackfin/mach-bf537/include/mach/defBF534.h
index 6f56907a18c0..0323e6bacdae 100644
--- a/arch/blackfin/mach-bf537/include/mach/defBF534.h
+++ b/arch/blackfin/mach-bf537/include/mach/defBF534.h
@@ -1071,50 +1071,6 @@
1071#define FPE 0x10 /* Force Parity Error On Transmit */ 1071#define FPE 0x10 /* Force Parity Error On Transmit */
1072#define FFE 0x20 /* Force Framing Error On Transmit */ 1072#define FFE 0x20 /* Force Framing Error On Transmit */
1073 1073
1074/* *********** SERIAL PERIPHERAL INTERFACE (SPI) MASKS ****************************/
1075/* SPI_CTL Masks */
1076#define TIMOD 0x0003 /* Transfer Initiate Mode */
1077#define RDBR_CORE 0x0000 /* RDBR Read Initiates, IRQ When RDBR Full */
1078#define TDBR_CORE 0x0001 /* TDBR Write Initiates, IRQ When TDBR Empty */
1079#define RDBR_DMA 0x0002 /* DMA Read, DMA Until FIFO Empty */
1080#define TDBR_DMA 0x0003 /* DMA Write, DMA Until FIFO Full */
1081#define SZ 0x0004 /* Send Zero (When TDBR Empty, Send Zero/Last*) */
1082#define GM 0x0008 /* Get More (When RDBR Full, Overwrite/Discard*) */
1083#define PSSE 0x0010 /* Slave-Select Input Enable */
1084#define EMISO 0x0020 /* Enable MISO As Output */
1085#define SIZE 0x0100 /* Size of Words (16/8* Bits) */
1086#define LSBF 0x0200 /* LSB First */
1087#define CPHA 0x0400 /* Clock Phase */
1088#define CPOL 0x0800 /* Clock Polarity */
1089#define MSTR 0x1000 /* Master/Slave* */
1090#define WOM 0x2000 /* Write Open Drain Master */
1091#define SPE 0x4000 /* SPI Enable */
1092
1093/* SPI_FLG Masks */
1094#define FLS1 0x0002 /* Enables SPI_FLOUT1 as SPI Slave-Select Output */
1095#define FLS2 0x0004 /* Enables SPI_FLOUT2 as SPI Slave-Select Output */
1096#define FLS3 0x0008 /* Enables SPI_FLOUT3 as SPI Slave-Select Output */
1097#define FLS4 0x0010 /* Enables SPI_FLOUT4 as SPI Slave-Select Output */
1098#define FLS5 0x0020 /* Enables SPI_FLOUT5 as SPI Slave-Select Output */
1099#define FLS6 0x0040 /* Enables SPI_FLOUT6 as SPI Slave-Select Output */
1100#define FLS7 0x0080 /* Enables SPI_FLOUT7 as SPI Slave-Select Output */
1101#define FLG1 0xFDFF /* Activates SPI_FLOUT1 */
1102#define FLG2 0xFBFF /* Activates SPI_FLOUT2 */
1103#define FLG3 0xF7FF /* Activates SPI_FLOUT3 */
1104#define FLG4 0xEFFF /* Activates SPI_FLOUT4 */
1105#define FLG5 0xDFFF /* Activates SPI_FLOUT5 */
1106#define FLG6 0xBFFF /* Activates SPI_FLOUT6 */
1107#define FLG7 0x7FFF /* Activates SPI_FLOUT7 */
1108
1109/* SPI_STAT Masks */
1110#define SPIF 0x0001 /* SPI Finished (Single-Word Transfer Complete) */
1111#define MODF 0x0002 /* Mode Fault Error (Another Device Tried To Become Master) */
1112#define TXE 0x0004 /* Transmission Error (Data Sent With No New Data In TDBR) */
1113#define TXS 0x0008 /* SPI_TDBR Data Buffer Status (Full/Empty*) */
1114#define RBSY 0x0010 /* Receive Error (Data Received With RDBR Full) */
1115#define RXS 0x0020 /* SPI_RDBR Data Buffer Status (Full/Empty*) */
1116#define TXCOL 0x0040 /* Transmit Collision Error (Corrupt Data May Have Been Sent) */
1117
1118/* **************** GENERAL PURPOSE TIMER MASKS **********************/ 1074/* **************** GENERAL PURPOSE TIMER MASKS **********************/
1119/* TIMER_ENABLE Masks */ 1075/* TIMER_ENABLE Masks */
1120#define TIMEN0 0x0001 /* Enable Timer 0 */ 1076#define TIMEN0 0x0001 /* Enable Timer 0 */
diff --git a/arch/blackfin/mach-bf538/boards/ezkit.c b/arch/blackfin/mach-bf538/boards/ezkit.c
index 1a1f65855b03..c6fb0a52f849 100644
--- a/arch/blackfin/mach-bf538/boards/ezkit.c
+++ b/arch/blackfin/mach-bf538/boards/ezkit.c
@@ -695,7 +695,7 @@ static struct platform_device bf538_spi_master0 = {
695}; 695};
696 696
697static struct bfin5xx_spi_master bf538_spi_master_info1 = { 697static struct bfin5xx_spi_master bf538_spi_master_info1 = {
698 .num_chipselect = 8, 698 .num_chipselect = 2,
699 .enable_dma = 1, /* master has the ability to do dma transfer */ 699 .enable_dma = 1, /* master has the ability to do dma transfer */
700 .pin_req = {P_SPI1_SCK, P_SPI1_MISO, P_SPI1_MOSI, 0}, 700 .pin_req = {P_SPI1_SCK, P_SPI1_MISO, P_SPI1_MOSI, 0},
701}; 701};
@@ -711,7 +711,7 @@ static struct platform_device bf538_spi_master1 = {
711}; 711};
712 712
713static struct bfin5xx_spi_master bf538_spi_master_info2 = { 713static struct bfin5xx_spi_master bf538_spi_master_info2 = {
714 .num_chipselect = 8, 714 .num_chipselect = 2,
715 .enable_dma = 1, /* master has the ability to do dma transfer */ 715 .enable_dma = 1, /* master has the ability to do dma transfer */
716 .pin_req = {P_SPI2_SCK, P_SPI2_MISO, P_SPI2_MOSI, 0}, 716 .pin_req = {P_SPI2_SCK, P_SPI2_MISO, P_SPI2_MOSI, 0},
717}; 717};
diff --git a/arch/blackfin/mach-bf538/include/mach/defBF539.h b/arch/blackfin/mach-bf538/include/mach/defBF539.h
index fe43062b4975..7a8ac5f44204 100644
--- a/arch/blackfin/mach-bf538/include/mach/defBF539.h
+++ b/arch/blackfin/mach-bf538/include/mach/defBF539.h
@@ -32,6 +32,7 @@
32/* System Interrupt Controller (0xFFC00100 - 0xFFC001FF) */ 32/* System Interrupt Controller (0xFFC00100 - 0xFFC001FF) */
33#define SWRST 0xFFC00100 /* Software Reset Register (16-bit) */ 33#define SWRST 0xFFC00100 /* Software Reset Register (16-bit) */
34#define SYSCR 0xFFC00104 /* System Configuration registe */ 34#define SYSCR 0xFFC00104 /* System Configuration registe */
35#define SIC_RVECT 0xFFC00108
35#define SIC_IMASK0 0xFFC0010C /* Interrupt Mask Register */ 36#define SIC_IMASK0 0xFFC0010C /* Interrupt Mask Register */
36#define SIC_IAR0 0xFFC00110 /* Interrupt Assignment Register 0 */ 37#define SIC_IAR0 0xFFC00110 /* Interrupt Assignment Register 0 */
37#define SIC_IAR1 0xFFC00114 /* Interrupt Assignment Register 1 */ 38#define SIC_IAR1 0xFFC00114 /* Interrupt Assignment Register 1 */
@@ -1894,78 +1895,6 @@
1894#define PE14_P 0xE 1895#define PE14_P 0xE
1895#define PE15_P 0xF 1896#define PE15_P 0xF
1896 1897
1897
1898/* *********** SERIAL PERIPHERAL INTERFACE (SPI) MASKS **************** */
1899/* SPIx_CTL Masks */
1900#define TIMOD 0x0003 /* Transfer Initiate Mode */
1901#define RDBR_CORE 0x0000 /* RDBR Read Initiates, IRQ When RDBR Full */
1902#define TDBR_CORE 0x0001 /* TDBR Write Initiates, IRQ When TDBR Empty */
1903#define RDBR_DMA 0x0002 /* DMA Read, DMA Until FIFO Empty */
1904#define TDBR_DMA 0x0003 /* DMA Write, DMA Until FIFO Full */
1905#define SZ 0x0004 /* Send Zero (When TDBR Empty, Send Zero/Last*) */
1906#define GM 0x0008 /* Get More (When RDBR Full, Overwrite/Discard*) */
1907#define PSSE 0x0010 /* Slave-Select Input Enable */
1908#define EMISO 0x0020 /* Enable MISO As Output */
1909#define SIZE 0x0100 /* Size of Words (16/8* Bits) */
1910#define LSBF 0x0200 /* LSB First */
1911#define CPHA 0x0400 /* Clock Phase */
1912#define CPOL 0x0800 /* Clock Polarity */
1913#define MSTR 0x1000 /* Master/Slave* */
1914#define WOM 0x2000 /* Write Open Drain Master */
1915#define SPE 0x4000 /* SPI Enable */
1916
1917/* SPIx_FLG Masks */
1918#define FLS1 0x0002 /* Enables (=1) SPI_FLOUT1 as flag output for SPI Slave-select */
1919#define FLS2 0x0004 /* Enables (=1) SPI_FLOUT2 as flag output for SPI Slave-select */
1920#define FLS3 0x0008 /* Enables (=1) SPI_FLOUT3 as flag output for SPI Slave-select */
1921#define FLS4 0x0010 /* Enables (=1) SPI_FLOUT4 as flag output for SPI Slave-select */
1922#define FLS5 0x0020 /* Enables (=1) SPI_FLOUT5 as flag output for SPI Slave-select */
1923#define FLS6 0x0040 /* Enables (=1) SPI_FLOUT6 as flag output for SPI Slave-select */
1924#define FLS7 0x0080 /* Enables (=1) SPI_FLOUT7 as flag output for SPI Slave-select */
1925
1926#define FLG1 0x0200 /* Activates (=0) SPI_FLOUT1 as flag output for SPI Slave-select */
1927#define FLG2 0x0400 /* Activates (=0) SPI_FLOUT2 as flag output for SPI Slave-select */
1928#define FLG3 0x0800 /* Activates (=0) SPI_FLOUT3 as flag output for SPI Slave-select */
1929#define FLG4 0x1000 /* Activates (=0) SPI_FLOUT4 as flag output for SPI Slave-select */
1930#define FLG5 0x2000 /* Activates (=0) SPI_FLOUT5 as flag output for SPI Slave-select */
1931#define FLG6 0x4000 /* Activates (=0) SPI_FLOUT6 as flag output for SPI Slave-select */
1932#define FLG7 0x8000 /* Activates (=0) SPI_FLOUT7 as flag output for SPI Slave-select */
1933
1934/* SPIx_FLG Bit Positions */
1935#define FLS1_P 0x0001 /* Enables (=1) SPI_FLOUT1 as flag output for SPI Slave-select */
1936#define FLS2_P 0x0002 /* Enables (=1) SPI_FLOUT2 as flag output for SPI Slave-select */
1937#define FLS3_P 0x0003 /* Enables (=1) SPI_FLOUT3 as flag output for SPI Slave-select */
1938#define FLS4_P 0x0004 /* Enables (=1) SPI_FLOUT4 as flag output for SPI Slave-select */
1939#define FLS5_P 0x0005 /* Enables (=1) SPI_FLOUT5 as flag output for SPI Slave-select */
1940#define FLS6_P 0x0006 /* Enables (=1) SPI_FLOUT6 as flag output for SPI Slave-select */
1941#define FLS7_P 0x0007 /* Enables (=1) SPI_FLOUT7 as flag output for SPI Slave-select */
1942#define FLG1_P 0x0009 /* Activates (=0) SPI_FLOUT1 as flag output for SPI Slave-select */
1943#define FLG2_P 0x000A /* Activates (=0) SPI_FLOUT2 as flag output for SPI Slave-select */
1944#define FLG3_P 0x000B /* Activates (=0) SPI_FLOUT3 as flag output for SPI Slave-select */
1945#define FLG4_P 0x000C /* Activates (=0) SPI_FLOUT4 as flag output for SPI Slave-select */
1946#define FLG5_P 0x000D /* Activates (=0) SPI_FLOUT5 as flag output for SPI Slave-select */
1947#define FLG6_P 0x000E /* Activates (=0) SPI_FLOUT6 as flag output for SPI Slave-select */
1948#define FLG7_P 0x000F /* Activates (=0) SPI_FLOUT7 as flag output for SPI Slave-select */
1949
1950/* SPIx_STAT Masks */
1951#define SPIF 0x0001 /* Set (=1) when SPI single-word transfer complete */
1952#define MODF 0x0002 /* Set (=1) in a master device when some other device tries to become master */
1953#define TXE 0x0004 /* Set (=1) when transmission occurs with no new data in SPI_TDBR */
1954#define TXS 0x0008 /* SPI_TDBR Data Buffer Status (0=Empty, 1=Full) */
1955#define RBSY 0x0010 /* Set (=1) when data is received with RDBR full */
1956#define RXS 0x0020 /* SPI_RDBR Data Buffer Status (0=Empty, 1=Full) */
1957#define TXCOL 0x0040 /* When set (=1), corrupt data may have been transmitted */
1958
1959/* SPIx_FLG Masks */
1960#define FLG1E 0xFDFF /* Activates SPI_FLOUT1 */
1961#define FLG2E 0xFBFF /* Activates SPI_FLOUT2 */
1962#define FLG3E 0xF7FF /* Activates SPI_FLOUT3 */
1963#define FLG4E 0xEFFF /* Activates SPI_FLOUT4 */
1964#define FLG5E 0xDFFF /* Activates SPI_FLOUT5 */
1965#define FLG6E 0xBFFF /* Activates SPI_FLOUT6 */
1966#define FLG7E 0x7FFF /* Activates SPI_FLOUT7 */
1967
1968
1969/* ********************* ASYNCHRONOUS MEMORY CONTROLLER MASKS ************* */ 1898/* ********************* ASYNCHRONOUS MEMORY CONTROLLER MASKS ************* */
1970/* EBIU_AMGCTL Masks */ 1899/* EBIU_AMGCTL Masks */
1971#define AMCKEN 0x0001 /* Enable CLKOUT */ 1900#define AMCKEN 0x0001 /* Enable CLKOUT */
diff --git a/arch/blackfin/mach-bf548/boards/cm_bf548.c b/arch/blackfin/mach-bf548/boards/cm_bf548.c
index 0c38eec9ade1..f0c0eef95ba8 100644
--- a/arch/blackfin/mach-bf548/boards/cm_bf548.c
+++ b/arch/blackfin/mach-bf548/boards/cm_bf548.c
@@ -753,6 +753,44 @@ static struct platform_device bf54x_sdh_device = {
753}; 753};
754#endif 754#endif
755 755
756#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE)
757unsigned short bfin_can_peripherals[] = {
758 P_CAN0_RX, P_CAN0_TX, 0
759};
760
761static struct resource bfin_can_resources[] = {
762 {
763 .start = 0xFFC02A00,
764 .end = 0xFFC02FFF,
765 .flags = IORESOURCE_MEM,
766 },
767 {
768 .start = IRQ_CAN0_RX,
769 .end = IRQ_CAN0_RX,
770 .flags = IORESOURCE_IRQ,
771 },
772 {
773 .start = IRQ_CAN0_TX,
774 .end = IRQ_CAN0_TX,
775 .flags = IORESOURCE_IRQ,
776 },
777 {
778 .start = IRQ_CAN0_ERROR,
779 .end = IRQ_CAN0_ERROR,
780 .flags = IORESOURCE_IRQ,
781 },
782};
783
784static struct platform_device bfin_can_device = {
785 .name = "bfin_can",
786 .num_resources = ARRAY_SIZE(bfin_can_resources),
787 .resource = bfin_can_resources,
788 .dev = {
789 .platform_data = &bfin_can_peripherals, /* Passed to driver */
790 },
791};
792#endif
793
756#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 794#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
757static struct mtd_partition para_partitions[] = { 795static struct mtd_partition para_partitions[] = {
758 { 796 {
@@ -928,7 +966,7 @@ static struct resource bfin_spi1_resource[] = {
928 966
929/* SPI controller data */ 967/* SPI controller data */
930static struct bfin5xx_spi_master bf54x_spi_master_info0 = { 968static struct bfin5xx_spi_master bf54x_spi_master_info0 = {
931 .num_chipselect = 3, 969 .num_chipselect = 4,
932 .enable_dma = 1, /* master has the ability to do dma transfer */ 970 .enable_dma = 1, /* master has the ability to do dma transfer */
933 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, 971 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
934}; 972};
@@ -944,7 +982,7 @@ static struct platform_device bf54x_spi_master0 = {
944}; 982};
945 983
946static struct bfin5xx_spi_master bf54x_spi_master_info1 = { 984static struct bfin5xx_spi_master bf54x_spi_master_info1 = {
947 .num_chipselect = 3, 985 .num_chipselect = 4,
948 .enable_dma = 1, /* master has the ability to do dma transfer */ 986 .enable_dma = 1, /* master has the ability to do dma transfer */
949 .pin_req = {P_SPI1_SCK, P_SPI1_MISO, P_SPI1_MOSI, 0}, 987 .pin_req = {P_SPI1_SCK, P_SPI1_MISO, P_SPI1_MOSI, 0},
950}; 988};
@@ -1152,6 +1190,11 @@ static struct platform_device *cm_bf548_devices[] __initdata = {
1152#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 1190#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
1153 &para_flash_device, 1191 &para_flash_device,
1154#endif 1192#endif
1193
1194#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE)
1195 &bfin_can_device,
1196#endif
1197
1155}; 1198};
1156 1199
1157static int __init cm_bf548_init(void) 1200static int __init cm_bf548_init(void)
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c
index 56682a36e42d..216e26999af9 100644
--- a/arch/blackfin/mach-bf548/boards/ezkit.c
+++ b/arch/blackfin/mach-bf548/boards/ezkit.c
@@ -837,8 +837,12 @@ static struct platform_device bfin_atapi_device = {
837#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) 837#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
838static struct mtd_partition partition_info[] = { 838static struct mtd_partition partition_info[] = {
839 { 839 {
840 .name = "linux kernel(nand)", 840 .name = "bootloader(nand)",
841 .offset = 0, 841 .offset = 0,
842 .size = 0x80000,
843 }, {
844 .name = "linux kernel(nand)",
845 .offset = MTDPART_OFS_APPEND,
842 .size = 4 * 1024 * 1024, 846 .size = 4 * 1024 * 1024,
843 }, 847 },
844 { 848 {
@@ -901,7 +905,7 @@ static struct platform_device bf54x_sdh_device = {
901static struct mtd_partition ezkit_partitions[] = { 905static struct mtd_partition ezkit_partitions[] = {
902 { 906 {
903 .name = "bootloader(nor)", 907 .name = "bootloader(nor)",
904 .size = 0x40000, 908 .size = 0x80000,
905 .offset = 0, 909 .offset = 0,
906 }, { 910 }, {
907 .name = "linux kernel(nor)", 911 .name = "linux kernel(nor)",
@@ -943,7 +947,7 @@ static struct platform_device ezkit_flash_device = {
943static struct mtd_partition bfin_spi_flash_partitions[] = { 947static struct mtd_partition bfin_spi_flash_partitions[] = {
944 { 948 {
945 .name = "bootloader(spi)", 949 .name = "bootloader(spi)",
946 .size = 0x00040000, 950 .size = 0x00080000,
947 .offset = 0, 951 .offset = 0,
948 .mask_flags = MTD_CAP_ROM 952 .mask_flags = MTD_CAP_ROM
949 }, { 953 }, {
@@ -966,8 +970,8 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
966}; 970};
967#endif 971#endif
968 972
969#if defined(CONFIG_SND_BLACKFIN_AD183X) \ 973#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \
970 || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) 974 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
971static struct bfin5xx_spi_chip ad1836_spi_chip_info = { 975static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
972 .enable_dma = 0, 976 .enable_dma = 0,
973 .bits_per_word = 16, 977 .bits_per_word = 16,
@@ -1023,13 +1027,13 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1023 .mode = SPI_MODE_3, 1027 .mode = SPI_MODE_3,
1024 }, 1028 },
1025#endif 1029#endif
1026#if defined(CONFIG_SND_BLACKFIN_AD183X) \ 1030#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \
1027 || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) 1031 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
1028 { 1032 {
1029 .modalias = "ad1836", 1033 .modalias = "ad183x",
1030 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 1034 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
1031 .bus_num = 1, 1035 .bus_num = 1,
1032 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 1036 .chip_select = 4,
1033 .controller_data = &ad1836_spi_chip_info, 1037 .controller_data = &ad1836_spi_chip_info,
1034 }, 1038 },
1035#endif 1039#endif
@@ -1107,7 +1111,7 @@ static struct resource bfin_spi1_resource[] = {
1107 1111
1108/* SPI controller data */ 1112/* SPI controller data */
1109static struct bfin5xx_spi_master bf54x_spi_master_info0 = { 1113static struct bfin5xx_spi_master bf54x_spi_master_info0 = {
1110 .num_chipselect = 3, 1114 .num_chipselect = 4,
1111 .enable_dma = 1, /* master has the ability to do dma transfer */ 1115 .enable_dma = 1, /* master has the ability to do dma transfer */
1112 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, 1116 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
1113}; 1117};
@@ -1123,7 +1127,7 @@ static struct platform_device bf54x_spi_master0 = {
1123}; 1127};
1124 1128
1125static struct bfin5xx_spi_master bf54x_spi_master_info1 = { 1129static struct bfin5xx_spi_master bf54x_spi_master_info1 = {
1126 .num_chipselect = 3, 1130 .num_chipselect = 4,
1127 .enable_dma = 1, /* master has the ability to do dma transfer */ 1131 .enable_dma = 1, /* master has the ability to do dma transfer */
1128 .pin_req = {P_SPI1_SCK, P_SPI1_MISO, P_SPI1_MOSI, 0}, 1132 .pin_req = {P_SPI1_SCK, P_SPI1_MISO, P_SPI1_MOSI, 0},
1129}; 1133};
@@ -1206,6 +1210,11 @@ static struct i2c_board_info __initdata bfin_i2c_board_info1[] = {
1206 .platform_data = (void *)&adxl34x_info, 1210 .platform_data = (void *)&adxl34x_info,
1207 }, 1211 },
1208#endif 1212#endif
1213#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
1214 {
1215 I2C_BOARD_INFO("ad5252", 0x2f),
1216 },
1217#endif
1209}; 1218};
1210#endif 1219#endif
1211 1220
diff --git a/arch/blackfin/mach-bf548/dma.c b/arch/blackfin/mach-bf548/dma.c
index 039a6d9d38f3..888b9cc0b822 100644
--- a/arch/blackfin/mach-bf548/dma.c
+++ b/arch/blackfin/mach-bf548/dma.c
@@ -63,6 +63,7 @@ int channel2irq(unsigned int channel)
63 break; 63 break;
64 case CH_SPORT1_TX: 64 case CH_SPORT1_TX:
65 ret_irq = IRQ_SPORT1_TX; 65 ret_irq = IRQ_SPORT1_TX;
66 break;
66 case CH_SPI0: 67 case CH_SPI0:
67 ret_irq = IRQ_SPI0; 68 ret_irq = IRQ_SPI0;
68 break; 69 break;
diff --git a/arch/blackfin/mach-bf548/include/mach/cdefBF54x_base.h b/arch/blackfin/mach-bf548/include/mach/cdefBF54x_base.h
index 0c16067df4f3..deaf5d6542d5 100644
--- a/arch/blackfin/mach-bf548/include/mach/cdefBF54x_base.h
+++ b/arch/blackfin/mach-bf548/include/mach/cdefBF54x_base.h
@@ -40,6 +40,8 @@
40 40
41/* SIC Registers */ 41/* SIC Registers */
42 42
43#define bfin_read_SIC_RVECT() bfin_read32(SIC_RVECT)
44#define bfin_write_SIC_RVECT(val) bfin_write32(SIC_RVECT, val)
43#define bfin_read_SIC_IMASK0() bfin_read32(SIC_IMASK0) 45#define bfin_read_SIC_IMASK0() bfin_read32(SIC_IMASK0)
44#define bfin_write_SIC_IMASK0(val) bfin_write32(SIC_IMASK0, val) 46#define bfin_write_SIC_IMASK0(val) bfin_write32(SIC_IMASK0, val)
45#define bfin_read_SIC_IMASK1() bfin_read32(SIC_IMASK1) 47#define bfin_read_SIC_IMASK1() bfin_read32(SIC_IMASK1)
diff --git a/arch/blackfin/mach-bf548/include/mach/defBF54x_base.h b/arch/blackfin/mach-bf548/include/mach/defBF54x_base.h
index 7866197f5485..78f91103f175 100644
--- a/arch/blackfin/mach-bf548/include/mach/defBF54x_base.h
+++ b/arch/blackfin/mach-bf548/include/mach/defBF54x_base.h
@@ -35,6 +35,7 @@
35 35
36/* SIC Registers */ 36/* SIC Registers */
37 37
38#define SIC_RVECT 0xffc00108
38#define SIC_IMASK0 0xffc0010c /* System Interrupt Mask Register 0 */ 39#define SIC_IMASK0 0xffc0010c /* System Interrupt Mask Register 0 */
39#define SIC_IMASK1 0xffc00110 /* System Interrupt Mask Register 1 */ 40#define SIC_IMASK1 0xffc00110 /* System Interrupt Mask Register 1 */
40#define SIC_IMASK2 0xffc00114 /* System Interrupt Mask Register 2 */ 41#define SIC_IMASK2 0xffc00114 /* System Interrupt Mask Register 2 */
@@ -2061,56 +2062,6 @@
2061#define LOW_EVEN 0xff0000 /* Lower Limit for Even Bytes (Luma) */ 2062#define LOW_EVEN 0xff0000 /* Lower Limit for Even Bytes (Luma) */
2062#define HIGH_EVEN 0xff000000 /* Upper Limit for Even Bytes (Luma) */ 2063#define HIGH_EVEN 0xff000000 /* Upper Limit for Even Bytes (Luma) */
2063 2064
2064/* Bit masks for SPIx_BAUD */
2065
2066#define SPI_BAUD 0xffff /* Baud Rate */
2067
2068/* Bit masks for SPIx_CTL */
2069
2070#define SPE 0x4000 /* SPI Enable */
2071#define WOM 0x2000 /* Write Open Drain Master */
2072#define MSTR 0x1000 /* Master Mode */
2073#define CPOL 0x800 /* Clock Polarity */
2074#define CPHA 0x400 /* Clock Phase */
2075#define LSBF 0x200 /* LSB First */
2076#define SIZE 0x100 /* Size of Words */
2077#define EMISO 0x20 /* Enable MISO Output */
2078#define PSSE 0x10 /* Slave-Select Enable */
2079#define GM 0x8 /* Get More Data */
2080#define SZ 0x4 /* Send Zero */
2081#define TIMOD 0x3 /* Transfer Initiation Mode */
2082
2083/* Bit masks for SPIx_FLG */
2084
2085#define FLS1 0x2 /* Slave Select Enable 1 */
2086#define FLS2 0x4 /* Slave Select Enable 2 */
2087#define FLS3 0x8 /* Slave Select Enable 3 */
2088#define FLG1 0x200 /* Slave Select Value 1 */
2089#define FLG2 0x400 /* Slave Select Value 2 */
2090#define FLG3 0x800 /* Slave Select Value 3 */
2091
2092/* Bit masks for SPIx_STAT */
2093
2094#define TXCOL 0x40 /* Transmit Collision Error */
2095#define RXS 0x20 /* RDBR Data Buffer Status */
2096#define RBSY 0x10 /* Receive Error */
2097#define TXS 0x8 /* TDBR Data Buffer Status */
2098#define TXE 0x4 /* Transmission Error */
2099#define MODF 0x2 /* Mode Fault Error */
2100#define SPIF 0x1 /* SPI Finished */
2101
2102/* Bit masks for SPIx_TDBR */
2103
2104#define TDBR 0xffff /* Transmit Data Buffer */
2105
2106/* Bit masks for SPIx_RDBR */
2107
2108#define RDBR 0xffff /* Receive Data Buffer */
2109
2110/* Bit masks for SPIx_SHADOW */
2111
2112#define SHADOW 0xffff /* RDBR Shadow */
2113
2114/* ************************************************ */ 2065/* ************************************************ */
2115/* The TWI bit masks fields are from the ADSP-BF538 */ 2066/* The TWI bit masks fields are from the ADSP-BF538 */
2116/* and they have not been verified as the final */ 2067/* and they have not been verified as the final */
diff --git a/arch/blackfin/mach-bf561/boards/acvilon.c b/arch/blackfin/mach-bf561/boards/acvilon.c
index 35b6d124c1e3..0b1c20f14fe0 100644
--- a/arch/blackfin/mach-bf561/boards/acvilon.c
+++ b/arch/blackfin/mach-bf561/boards/acvilon.c
@@ -302,7 +302,7 @@ static struct platform_nand_data bfin_plat_nand_data = {
302static struct resource bfin_plat_nand_resources = { 302static struct resource bfin_plat_nand_resources = {
303 .start = 0x24000000, 303 .start = 0x24000000,
304 .end = 0x24000000 + (1 << MAX(BFIN_NAND_PLAT_CLE, BFIN_NAND_PLAT_ALE)), 304 .end = 0x24000000 + (1 << MAX(BFIN_NAND_PLAT_CLE, BFIN_NAND_PLAT_ALE)),
305 .flags = IORESOURCE_IO, 305 .flags = IORESOURCE_MEM,
306}; 306};
307 307
308static struct platform_device bfin_async_nand_device = { 308static struct platform_device bfin_async_nand_device = {
diff --git a/arch/blackfin/mach-bf561/boards/cm_bf561.c b/arch/blackfin/mach-bf561/boards/cm_bf561.c
index e127aedc1d7f..087b6b05cc73 100644
--- a/arch/blackfin/mach-bf561/boards/cm_bf561.c
+++ b/arch/blackfin/mach-bf561/boards/cm_bf561.c
@@ -72,7 +72,7 @@ static struct bfin5xx_spi_chip spi_adc_chip_info = {
72}; 72};
73#endif 73#endif
74 74
75#if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) 75#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
76static struct bfin5xx_spi_chip ad1836_spi_chip_info = { 76static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
77 .enable_dma = 0, 77 .enable_dma = 0,
78 .bits_per_word = 16, 78 .bits_per_word = 16,
@@ -111,12 +111,12 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
111 }, 111 },
112#endif 112#endif
113 113
114#if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) 114#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
115 { 115 {
116 .modalias = "ad1836", 116 .modalias = "ad183x",
117 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 117 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
118 .bus_num = 0, 118 .bus_num = 0,
119 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 119 .chip_select = 4,
120 .controller_data = &ad1836_spi_chip_info, 120 .controller_data = &ad1836_spi_chip_info,
121 }, 121 },
122#endif 122#endif
@@ -278,7 +278,7 @@ static struct resource isp1362_hcd_resources[] = {
278 }, { 278 }, {
279 .start = IRQ_PF47, 279 .start = IRQ_PF47,
280 .end = IRQ_PF47, 280 .end = IRQ_PF47,
281 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, 281 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE,
282 }, 282 },
283}; 283};
284 284
diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c
index 9b93e2f95791..ab7a487975fd 100644
--- a/arch/blackfin/mach-bf561/boards/ezkit.c
+++ b/arch/blackfin/mach-bf561/boards/ezkit.c
@@ -14,6 +14,7 @@
14#include <linux/spi/spi.h> 14#include <linux/spi/spi.h>
15#include <linux/irq.h> 15#include <linux/irq.h>
16#include <linux/interrupt.h> 16#include <linux/interrupt.h>
17#include <linux/delay.h>
17#include <asm/dma.h> 18#include <asm/dma.h>
18#include <asm/bfin5xx_spi.h> 19#include <asm/bfin5xx_spi.h>
19#include <asm/portmux.h> 20#include <asm/portmux.h>
@@ -74,7 +75,7 @@ static struct resource isp1362_hcd_resources[] = {
74 }, { 75 }, {
75 .start = IRQ_PF8, 76 .start = IRQ_PF8,
76 .end = IRQ_PF8, 77 .end = IRQ_PF8,
77 .flags = IORESOURCE_IRQ, 78 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE,
78 }, 79 },
79}; 80};
80 81
@@ -274,8 +275,8 @@ static struct platform_device ezkit_flash_device = {
274}; 275};
275#endif 276#endif
276 277
277#if defined(CONFIG_SND_BLACKFIN_AD183X) \ 278#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \
278 || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) 279 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
279static struct bfin5xx_spi_chip ad1836_spi_chip_info = { 280static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
280 .enable_dma = 0, 281 .enable_dma = 0,
281 .bits_per_word = 16, 282 .bits_per_word = 16,
@@ -328,14 +329,16 @@ static struct platform_device bfin_spi0_device = {
328#endif 329#endif
329 330
330static struct spi_board_info bfin_spi_board_info[] __initdata = { 331static struct spi_board_info bfin_spi_board_info[] __initdata = {
331#if defined(CONFIG_SND_BLACKFIN_AD183X) \ 332#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \
332 || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE) 333 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
333 { 334 {
334 .modalias = "ad1836", 335 .modalias = "ad183x",
335 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 336 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
336 .bus_num = 0, 337 .bus_num = 0,
337 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, 338 .chip_select = 4,
339 .platform_data = "ad1836", /* only includes chip name for the moment */
338 .controller_data = &ad1836_spi_chip_info, 340 .controller_data = &ad1836_spi_chip_info,
341 .mode = SPI_MODE_3,
339 }, 342 },
340#endif 343#endif
341#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 344#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
@@ -377,8 +380,8 @@ static struct platform_device bfin_device_gpiokeys = {
377#include <linux/i2c-gpio.h> 380#include <linux/i2c-gpio.h>
378 381
379static struct i2c_gpio_platform_data i2c_gpio_data = { 382static struct i2c_gpio_platform_data i2c_gpio_data = {
380 .sda_pin = 1, 383 .sda_pin = GPIO_PF1,
381 .scl_pin = 0, 384 .scl_pin = GPIO_PF0,
382 .sda_is_open_drain = 0, 385 .sda_is_open_drain = 0,
383 .scl_is_open_drain = 0, 386 .scl_is_open_drain = 0,
384 .udelay = 40, 387 .udelay = 40,
@@ -420,6 +423,30 @@ static struct platform_device bfin_dpmc = {
420 }, 423 },
421}; 424};
422 425
426#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
427static struct platform_device bfin_i2s = {
428 .name = "bfin-i2s",
429 .id = CONFIG_SND_BF5XX_SPORT_NUM,
430 /* TODO: add platform data here */
431};
432#endif
433
434#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE)
435static struct platform_device bfin_tdm = {
436 .name = "bfin-tdm",
437 .id = CONFIG_SND_BF5XX_SPORT_NUM,
438 /* TODO: add platform data here */
439};
440#endif
441
442#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE)
443static struct platform_device bfin_ac97 = {
444 .name = "bfin-ac97",
445 .id = CONFIG_SND_BF5XX_SPORT_NUM,
446 /* TODO: add platform data here */
447};
448#endif
449
423static struct platform_device *ezkit_devices[] __initdata = { 450static struct platform_device *ezkit_devices[] __initdata = {
424 451
425 &bfin_dpmc, 452 &bfin_dpmc,
@@ -467,6 +494,18 @@ static struct platform_device *ezkit_devices[] __initdata = {
467#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) 494#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
468 &ezkit_flash_device, 495 &ezkit_flash_device,
469#endif 496#endif
497
498#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
499 &bfin_i2s,
500#endif
501
502#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE)
503 &bfin_tdm,
504#endif
505
506#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE)
507 &bfin_ac97,
508#endif
470}; 509};
471 510
472static int __init ezkit_init(void) 511static int __init ezkit_init(void)
@@ -484,6 +523,17 @@ static int __init ezkit_init(void)
484 SSYNC(); 523 SSYNC();
485#endif 524#endif
486 525
526#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
527 bfin_write_FIO0_DIR(bfin_read_FIO0_DIR() | (1 << 15));
528 bfin_write_FIO0_FLAG_S(1 << 15);
529 SSYNC();
530 /*
531 * This initialization lasts for approximately 4500 MCLKs.
532 * MCLK = 12.288MHz
533 */
534 udelay(400);
535#endif
536
487 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 537 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
488 return 0; 538 return 0;
489} 539}
diff --git a/arch/blackfin/mach-bf561/coreb.c b/arch/blackfin/mach-bf561/coreb.c
index deb2271d09a3..78ecb50bafc8 100644
--- a/arch/blackfin/mach-bf561/coreb.c
+++ b/arch/blackfin/mach-bf561/coreb.c
@@ -18,9 +18,9 @@
18#include <linux/miscdevice.h> 18#include <linux/miscdevice.h>
19#include <linux/module.h> 19#include <linux/module.h>
20 20
21#define CMD_COREB_START 2 21#define CMD_COREB_START _IO('b', 0)
22#define CMD_COREB_STOP 3 22#define CMD_COREB_STOP _IO('b', 1)
23#define CMD_COREB_RESET 4 23#define CMD_COREB_RESET _IO('b', 2)
24 24
25static long 25static long
26coreb_ioctl(struct file *file, unsigned int cmd, unsigned long arg) 26coreb_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
@@ -29,10 +29,10 @@ coreb_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
29 29
30 switch (cmd) { 30 switch (cmd) {
31 case CMD_COREB_START: 31 case CMD_COREB_START:
32 bfin_write_SICA_SYSCR(bfin_read_SICA_SYSCR() & ~0x0020); 32 bfin_write_SYSCR(bfin_read_SYSCR() & ~0x0020);
33 break; 33 break;
34 case CMD_COREB_STOP: 34 case CMD_COREB_STOP:
35 bfin_write_SICA_SYSCR(bfin_read_SICA_SYSCR() | 0x0020); 35 bfin_write_SYSCR(bfin_read_SYSCR() | 0x0020);
36 bfin_write_SICB_SYSCR(bfin_read_SICB_SYSCR() | 0x0080); 36 bfin_write_SICB_SYSCR(bfin_read_SICB_SYSCR() | 0x0080);
37 break; 37 break;
38 case CMD_COREB_RESET: 38 case CMD_COREB_RESET:
@@ -51,6 +51,7 @@ coreb_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
51static const struct file_operations coreb_fops = { 51static const struct file_operations coreb_fops = {
52 .owner = THIS_MODULE, 52 .owner = THIS_MODULE,
53 .unlocked_ioctl = coreb_ioctl, 53 .unlocked_ioctl = coreb_ioctl,
54 .llseek = noop_llseek,
54}; 55};
55 56
56static struct miscdevice coreb_dev = { 57static struct miscdevice coreb_dev = {
@@ -73,3 +74,4 @@ module_exit(bf561_coreb_exit);
73 74
74MODULE_AUTHOR("Bas Vermeulen <bvermeul@blackstar.xs4all.nl>"); 75MODULE_AUTHOR("Bas Vermeulen <bvermeul@blackstar.xs4all.nl>");
75MODULE_DESCRIPTION("BF561 Core B Support"); 76MODULE_DESCRIPTION("BF561 Core B Support");
77MODULE_LICENSE("GPL");
diff --git a/arch/blackfin/mach-bf561/include/mach/blackfin.h b/arch/blackfin/mach-bf561/include/mach/blackfin.h
index 67d6bdcd3fa8..6c7dc58c018c 100644
--- a/arch/blackfin/mach-bf561/include/mach/blackfin.h
+++ b/arch/blackfin/mach-bf561/include/mach/blackfin.h
@@ -24,29 +24,16 @@
24#define bfin_read_FIO_INEN() bfin_read_FIO0_INEN() 24#define bfin_read_FIO_INEN() bfin_read_FIO0_INEN()
25#define bfin_write_FIO_INEN(val) bfin_write_FIO0_INEN(val) 25#define bfin_write_FIO_INEN(val) bfin_write_FIO0_INEN(val)
26 26
27#define SIC_IWR0 SICA_IWR0 27/* Weird muxer funcs which pick SIC regs from IMASK base */
28#define SIC_IWR1 SICA_IWR1 28#define __SIC_MUX(base, x) ((base) + ((x) << 2))
29#define SIC_IAR0 SICA_IAR0 29#define bfin_read_SIC_IMASK(x) bfin_read32(__SIC_MUX(SIC_IMASK0, x))
30#define bfin_write_SIC_IMASK0 bfin_write_SICA_IMASK0 30#define bfin_write_SIC_IMASK(x, val) bfin_write32(__SIC_MUX(SIC_IMASK0, x), val)
31#define bfin_write_SIC_IMASK1 bfin_write_SICA_IMASK1 31#define bfin_read_SICB_IMASK(x) bfin_read32(__SIC_MUX(SICB_IMASK0, x))
32#define bfin_write_SIC_IWR0 bfin_write_SICA_IWR0 32#define bfin_write_SICB_IMASK(x, val) bfin_write32(__SIC_MUX(SICB_IMASK0, x), val)
33#define bfin_write_SIC_IWR1 bfin_write_SICA_IWR1 33#define bfin_read_SIC_ISR(x) bfin_read32(__SIC_MUX(SIC_ISR0, x))
34 34#define bfin_write_SIC_ISR(x, val) bfin_write32(__SIC_MUX(SIC_ISR0, x), val)
35#define bfin_read_SIC_IMASK0 bfin_read_SICA_IMASK0 35#define bfin_read_SICB_ISR(x) bfin_read32(__SIC_MUX(SICB_ISR0, x))
36#define bfin_read_SIC_IMASK1 bfin_read_SICA_IMASK1 36#define bfin_write_SICB_ISR(x, val) bfin_write32(__SIC_MUX(SICB_ISR0, x), val)
37#define bfin_read_SIC_IWR0 bfin_read_SICA_IWR0
38#define bfin_read_SIC_IWR1 bfin_read_SICA_IWR1
39#define bfin_read_SIC_ISR0 bfin_read_SICA_ISR0
40#define bfin_read_SIC_ISR1 bfin_read_SICA_ISR1
41
42#define bfin_read_SIC_IMASK(x) bfin_read32(SICA_IMASK0 + (x << 2))
43#define bfin_write_SIC_IMASK(x, val) bfin_write32((SICA_IMASK0 + (x << 2)), val)
44#define bfin_read_SICB_IMASK(x) bfin_read32(SICB_IMASK0 + (x << 2))
45#define bfin_write_SICB_IMASK(x, val) bfin_write32((SICB_IMASK0 + (x << 2)), val)
46#define bfin_read_SIC_ISR(x) bfin_read32(SICA_ISR0 + (x << 2))
47#define bfin_write_SIC_ISR(x, val) bfin_write32((SICA_ISR0 + (x << 2)), val)
48#define bfin_read_SICB_ISR(x) bfin_read32(SICB_ISR0 + (x << 2))
49#define bfin_write_SICB_ISR(x, val) bfin_write32((SICB_ISR0 + (x << 2)), val)
50 37
51#define BFIN_UART_NR_PORTS 1 38#define BFIN_UART_NR_PORTS 1
52 39
diff --git a/arch/blackfin/mach-bf561/include/mach/cdefBF561.h b/arch/blackfin/mach-bf561/include/mach/cdefBF561.h
index cc0416a5fa02..2bab99152495 100644
--- a/arch/blackfin/mach-bf561/include/mach/cdefBF561.h
+++ b/arch/blackfin/mach-bf561/include/mach/cdefBF561.h
@@ -30,49 +30,41 @@
30#define bfin_write_PLL_LOCKCNT(val) bfin_write16(PLL_LOCKCNT,val) 30#define bfin_write_PLL_LOCKCNT(val) bfin_write16(PLL_LOCKCNT,val)
31#define bfin_read_CHIPID() bfin_read32(CHIPID) 31#define bfin_read_CHIPID() bfin_read32(CHIPID)
32 32
33/* For MMR's that are reserved on Core B, set up defines to better integrate with other ports */
34#define bfin_read_SWRST() bfin_read_SICA_SWRST()
35#define bfin_write_SWRST(val) bfin_write_SICA_SWRST(val)
36#define bfin_read_SYSCR() bfin_read_SICA_SYSCR()
37#define bfin_write_SYSCR(val) bfin_write_SICA_SYSCR(val)
38
39/* System Reset and Interrupt Controller registers for core A (0xFFC0 0100-0xFFC0 01FF) */ 33/* System Reset and Interrupt Controller registers for core A (0xFFC0 0100-0xFFC0 01FF) */
40#define bfin_read_SICA_SWRST() bfin_read16(SICA_SWRST) 34#define bfin_read_SWRST() bfin_read16(SWRST)
41#define bfin_write_SICA_SWRST(val) bfin_write16(SICA_SWRST,val) 35#define bfin_write_SWRST(val) bfin_write16(SWRST,val)
42#define bfin_read_SICA_SYSCR() bfin_read16(SICA_SYSCR) 36#define bfin_read_SYSCR() bfin_read16(SYSCR)
43#define bfin_write_SICA_SYSCR(val) bfin_write16(SICA_SYSCR,val) 37#define bfin_write_SYSCR(val) bfin_write16(SYSCR,val)
44#define bfin_read_SICA_RVECT() bfin_read16(SICA_RVECT) 38#define bfin_read_SIC_RVECT() bfin_read16(SIC_RVECT)
45#define bfin_write_SICA_RVECT(val) bfin_write16(SICA_RVECT,val) 39#define bfin_write_SIC_RVECT(val) bfin_write16(SIC_RVECT,val)
46#define bfin_read_SICA_IMASK() bfin_read32(SICA_IMASK) 40#define bfin_read_SIC_IMASK0() bfin_read32(SIC_IMASK0)
47#define bfin_write_SICA_IMASK(val) bfin_write32(SICA_IMASK,val) 41#define bfin_write_SIC_IMASK0(val) bfin_write32(SIC_IMASK0,val)
48#define bfin_read_SICA_IMASK0() bfin_read32(SICA_IMASK0) 42#define bfin_read_SIC_IMASK1() bfin_read32(SIC_IMASK1)
49#define bfin_write_SICA_IMASK0(val) bfin_write32(SICA_IMASK0,val) 43#define bfin_write_SIC_IMASK1(val) bfin_write32(SIC_IMASK1,val)
50#define bfin_read_SICA_IMASK1() bfin_read32(SICA_IMASK1) 44#define bfin_read_SIC_IAR0() bfin_read32(SIC_IAR0)
51#define bfin_write_SICA_IMASK1(val) bfin_write32(SICA_IMASK1,val) 45#define bfin_write_SIC_IAR0(val) bfin_write32(SIC_IAR0,val)
52#define bfin_read_SICA_IAR0() bfin_read32(SICA_IAR0) 46#define bfin_read_SIC_IAR1() bfin_read32(SIC_IAR1)
53#define bfin_write_SICA_IAR0(val) bfin_write32(SICA_IAR0,val) 47#define bfin_write_SIC_IAR1(val) bfin_write32(SIC_IAR1,val)
54#define bfin_read_SICA_IAR1() bfin_read32(SICA_IAR1) 48#define bfin_read_SIC_IAR2() bfin_read32(SIC_IAR2)
55#define bfin_write_SICA_IAR1(val) bfin_write32(SICA_IAR1,val) 49#define bfin_write_SIC_IAR2(val) bfin_write32(SIC_IAR2,val)
56#define bfin_read_SICA_IAR2() bfin_read32(SICA_IAR2) 50#define bfin_read_SIC_IAR3() bfin_read32(SIC_IAR3)
57#define bfin_write_SICA_IAR2(val) bfin_write32(SICA_IAR2,val) 51#define bfin_write_SIC_IAR3(val) bfin_write32(SIC_IAR3,val)
58#define bfin_read_SICA_IAR3() bfin_read32(SICA_IAR3) 52#define bfin_read_SIC_IAR4() bfin_read32(SIC_IAR4)
59#define bfin_write_SICA_IAR3(val) bfin_write32(SICA_IAR3,val) 53#define bfin_write_SIC_IAR4(val) bfin_write32(SIC_IAR4,val)
60#define bfin_read_SICA_IAR4() bfin_read32(SICA_IAR4) 54#define bfin_read_SIC_IAR5() bfin_read32(SIC_IAR5)
61#define bfin_write_SICA_IAR4(val) bfin_write32(SICA_IAR4,val) 55#define bfin_write_SIC_IAR5(val) bfin_write32(SIC_IAR5,val)
62#define bfin_read_SICA_IAR5() bfin_read32(SICA_IAR5) 56#define bfin_read_SIC_IAR6() bfin_read32(SIC_IAR6)
63#define bfin_write_SICA_IAR5(val) bfin_write32(SICA_IAR5,val) 57#define bfin_write_SIC_IAR6(val) bfin_write32(SIC_IAR6,val)
64#define bfin_read_SICA_IAR6() bfin_read32(SICA_IAR6) 58#define bfin_read_SIC_IAR7() bfin_read32(SIC_IAR7)
65#define bfin_write_SICA_IAR6(val) bfin_write32(SICA_IAR6,val) 59#define bfin_write_SIC_IAR7(val) bfin_write32(SIC_IAR7,val)
66#define bfin_read_SICA_IAR7() bfin_read32(SICA_IAR7) 60#define bfin_read_SIC_ISR0() bfin_read32(SIC_ISR0)
67#define bfin_write_SICA_IAR7(val) bfin_write32(SICA_IAR7,val) 61#define bfin_write_SIC_ISR0(val) bfin_write32(SIC_ISR0,val)
68#define bfin_read_SICA_ISR0() bfin_read32(SICA_ISR0) 62#define bfin_read_SIC_ISR1() bfin_read32(SIC_ISR1)
69#define bfin_write_SICA_ISR0(val) bfin_write32(SICA_ISR0,val) 63#define bfin_write_SIC_ISR1(val) bfin_write32(SIC_ISR1,val)
70#define bfin_read_SICA_ISR1() bfin_read32(SICA_ISR1) 64#define bfin_read_SIC_IWR0() bfin_read32(SIC_IWR0)
71#define bfin_write_SICA_ISR1(val) bfin_write32(SICA_ISR1,val) 65#define bfin_write_SIC_IWR0(val) bfin_write32(SIC_IWR0,val)
72#define bfin_read_SICA_IWR0() bfin_read32(SICA_IWR0) 66#define bfin_read_SIC_IWR1() bfin_read32(SIC_IWR1)
73#define bfin_write_SICA_IWR0(val) bfin_write32(SICA_IWR0,val) 67#define bfin_write_SIC_IWR1(val) bfin_write32(SIC_IWR1,val)
74#define bfin_read_SICA_IWR1() bfin_read32(SICA_IWR1)
75#define bfin_write_SICA_IWR1(val) bfin_write32(SICA_IWR1,val)
76 68
77/* System Reset and Interrupt Controller registers for Core B (0xFFC0 1100-0xFFC0 11FF) */ 69/* System Reset and Interrupt Controller registers for Core B (0xFFC0 1100-0xFFC0 11FF) */
78#define bfin_read_SICB_SWRST() bfin_read16(SICB_SWRST) 70#define bfin_read_SICB_SWRST() bfin_read16(SICB_SWRST)
diff --git a/arch/blackfin/mach-bf561/include/mach/defBF561.h b/arch/blackfin/mach-bf561/include/mach/defBF561.h
index 2674f0097576..79e048d452e0 100644
--- a/arch/blackfin/mach-bf561/include/mach/defBF561.h
+++ b/arch/blackfin/mach-bf561/include/mach/defBF561.h
@@ -28,32 +28,29 @@
28#define CHIPID 0xFFC00014 /* Chip ID Register */ 28#define CHIPID 0xFFC00014 /* Chip ID Register */
29 29
30/* For MMR's that are reserved on Core B, set up defines to better integrate with other ports */ 30/* For MMR's that are reserved on Core B, set up defines to better integrate with other ports */
31#define SWRST SICA_SWRST
32#define SYSCR SICA_SYSCR
33#define DOUBLE_FAULT (DOUBLE_FAULT_B|DOUBLE_FAULT_A) 31#define DOUBLE_FAULT (DOUBLE_FAULT_B|DOUBLE_FAULT_A)
34#define RESET_DOUBLE (SWRST_DBL_FAULT_B|SWRST_DBL_FAULT_A) 32#define RESET_DOUBLE (SWRST_DBL_FAULT_B|SWRST_DBL_FAULT_A)
35#define RESET_WDOG (SWRST_WDT_B|SWRST_WDT_A) 33#define RESET_WDOG (SWRST_WDT_B|SWRST_WDT_A)
36#define RESET_SOFTWARE (SWRST_OCCURRED) 34#define RESET_SOFTWARE (SWRST_OCCURRED)
37 35
38/* System Reset and Interrupt Controller registers for core A (0xFFC0 0100-0xFFC0 01FF) */ 36/* System Reset and Interrupt Controller registers for core A (0xFFC0 0100-0xFFC0 01FF) */
39#define SICA_SWRST 0xFFC00100 /* Software Reset register */ 37#define SWRST 0xFFC00100 /* Software Reset register */
40#define SICA_SYSCR 0xFFC00104 /* System Reset Configuration register */ 38#define SYSCR 0xFFC00104 /* System Reset Configuration register */
41#define SICA_RVECT 0xFFC00108 /* SIC Reset Vector Address Register */ 39#define SIC_RVECT 0xFFC00108 /* SIC Reset Vector Address Register */
42#define SICA_IMASK 0xFFC0010C /* SIC Interrupt Mask register 0 - hack to fix old tests */ 40#define SIC_IMASK0 0xFFC0010C /* SIC Interrupt Mask register 0 */
43#define SICA_IMASK0 0xFFC0010C /* SIC Interrupt Mask register 0 */ 41#define SIC_IMASK1 0xFFC00110 /* SIC Interrupt Mask register 1 */
44#define SICA_IMASK1 0xFFC00110 /* SIC Interrupt Mask register 1 */ 42#define SIC_IAR0 0xFFC00124 /* SIC Interrupt Assignment Register 0 */
45#define SICA_IAR0 0xFFC00124 /* SIC Interrupt Assignment Register 0 */ 43#define SIC_IAR1 0xFFC00128 /* SIC Interrupt Assignment Register 1 */
46#define SICA_IAR1 0xFFC00128 /* SIC Interrupt Assignment Register 1 */ 44#define SIC_IAR2 0xFFC0012C /* SIC Interrupt Assignment Register 2 */
47#define SICA_IAR2 0xFFC0012C /* SIC Interrupt Assignment Register 2 */ 45#define SIC_IAR3 0xFFC00130 /* SIC Interrupt Assignment Register 3 */
48#define SICA_IAR3 0xFFC00130 /* SIC Interrupt Assignment Register 3 */ 46#define SIC_IAR4 0xFFC00134 /* SIC Interrupt Assignment Register 4 */
49#define SICA_IAR4 0xFFC00134 /* SIC Interrupt Assignment Register 4 */ 47#define SIC_IAR5 0xFFC00138 /* SIC Interrupt Assignment Register 5 */
50#define SICA_IAR5 0xFFC00138 /* SIC Interrupt Assignment Register 5 */ 48#define SIC_IAR6 0xFFC0013C /* SIC Interrupt Assignment Register 6 */
51#define SICA_IAR6 0xFFC0013C /* SIC Interrupt Assignment Register 6 */ 49#define SIC_IAR7 0xFFC00140 /* SIC Interrupt Assignment Register 7 */
52#define SICA_IAR7 0xFFC00140 /* SIC Interrupt Assignment Register 7 */ 50#define SIC_ISR0 0xFFC00114 /* SIC Interrupt Status register 0 */
53#define SICA_ISR0 0xFFC00114 /* SIC Interrupt Status register 0 */ 51#define SIC_ISR1 0xFFC00118 /* SIC Interrupt Status register 1 */
54#define SICA_ISR1 0xFFC00118 /* SIC Interrupt Status register 1 */ 52#define SIC_IWR0 0xFFC0011C /* SIC Interrupt Wakeup-Enable register 0 */
55#define SICA_IWR0 0xFFC0011C /* SIC Interrupt Wakeup-Enable register 0 */ 53#define SIC_IWR1 0xFFC00120 /* SIC Interrupt Wakeup-Enable register 1 */
56#define SICA_IWR1 0xFFC00120 /* SIC Interrupt Wakeup-Enable register 1 */
57 54
58/* System Reset and Interrupt Controller registers for Core B (0xFFC0 1100-0xFFC0 11FF) */ 55/* System Reset and Interrupt Controller registers for Core B (0xFFC0 1100-0xFFC0 11FF) */
59#define SICB_SWRST 0xFFC01100 /* reserved */ 56#define SICB_SWRST 0xFFC01100 /* reserved */
@@ -1271,63 +1268,6 @@
1271#define PF14_P 14 1268#define PF14_P 14
1272#define PF15_P 15 1269#define PF15_P 15
1273 1270
1274/* *********** SERIAL PERIPHERAL INTERFACE (SPI) MASKS **************** */
1275
1276/* SPI_CTL Masks */
1277#define TIMOD 0x00000003 /* Transfer initiation mode and interrupt generation */
1278#define SZ 0x00000004 /* Send Zero (=0) or last (=1) word when TDBR empty. */
1279#define GM 0x00000008 /* When RDBR full, get more (=1) data or discard (=0) incoming Data */
1280#define PSSE 0x00000010 /* Enable (=1) Slave-Select input for Master. */
1281#define EMISO 0x00000020 /* Enable (=1) MISO pin as an output. */
1282#define SIZE 0x00000100 /* Word length (0 => 8 bits, 1 => 16 bits) */
1283#define LSBF 0x00000200 /* Data format (0 => MSB sent/received first 1 => LSB sent/received first) */
1284#define CPHA 0x00000400 /* Clock phase (0 => SPICLK starts toggling in middle of xfer, 1 => SPICLK toggles at the beginning of xfer. */
1285#define CPOL 0x00000800 /* Clock polarity (0 => active-high, 1 => active-low) */
1286#define MSTR 0x00001000 /* Configures SPI as master (=1) or slave (=0) */
1287#define WOM 0x00002000 /* Open drain (=1) data output enable (for MOSI and MISO) */
1288#define SPE 0x00004000 /* SPI module enable (=1), disable (=0) */
1289
1290/* SPI_FLG Masks */
1291#define FLS1 0x00000002 /* Enables (=1) SPI_FLOUT1 as flag output for SPI Slave-select */
1292#define FLS2 0x00000004 /* Enables (=1) SPI_FLOUT2 as flag output for SPI Slave-select */
1293#define FLS3 0x00000008 /* Enables (=1) SPI_FLOUT3 as flag output for SPI Slave-select */
1294#define FLS4 0x00000010 /* Enables (=1) SPI_FLOUT4 as flag output for SPI Slave-select */
1295#define FLS5 0x00000020 /* Enables (=1) SPI_FLOUT5 as flag output for SPI Slave-select */
1296#define FLS6 0x00000040 /* Enables (=1) SPI_FLOUT6 as flag output for SPI Slave-select */
1297#define FLS7 0x00000080 /* Enables (=1) SPI_FLOUT7 as flag output for SPI Slave-select */
1298#define FLG1 0x00000200 /* Activates (=0) SPI_FLOUT1 as flag output for SPI Slave-select */
1299#define FLG2 0x00000400 /* Activates (=0) SPI_FLOUT2 as flag output for SPI Slave-select */
1300#define FLG3 0x00000800 /* Activates (=0) SPI_FLOUT3 as flag output for SPI Slave-select */
1301#define FLG4 0x00001000 /* Activates (=0) SPI_FLOUT4 as flag output for SPI Slave-select */
1302#define FLG5 0x00002000 /* Activates (=0) SPI_FLOUT5 as flag output for SPI Slave-select */
1303#define FLG6 0x00004000 /* Activates (=0) SPI_FLOUT6 as flag output for SPI Slave-select */
1304#define FLG7 0x00008000 /* Activates (=0) SPI_FLOUT7 as flag output for SPI Slave-select */
1305
1306/* SPI_FLG Bit Positions */
1307#define FLS1_P 0x00000001 /* Enables (=1) SPI_FLOUT1 as flag output for SPI Slave-select */
1308#define FLS2_P 0x00000002 /* Enables (=1) SPI_FLOUT2 as flag output for SPI Slave-select */
1309#define FLS3_P 0x00000003 /* Enables (=1) SPI_FLOUT3 as flag output for SPI Slave-select */
1310#define FLS4_P 0x00000004 /* Enables (=1) SPI_FLOUT4 as flag output for SPI Slave-select */
1311#define FLS5_P 0x00000005 /* Enables (=1) SPI_FLOUT5 as flag output for SPI Slave-select */
1312#define FLS6_P 0x00000006 /* Enables (=1) SPI_FLOUT6 as flag output for SPI Slave-select */
1313#define FLS7_P 0x00000007 /* Enables (=1) SPI_FLOUT7 as flag output for SPI Slave-select */
1314#define FLG1_P 0x00000009 /* Activates (=0) SPI_FLOUT1 as flag output for SPI Slave-select */
1315#define FLG2_P 0x0000000A /* Activates (=0) SPI_FLOUT2 as flag output for SPI Slave-select */
1316#define FLG3_P 0x0000000B /* Activates (=0) SPI_FLOUT3 as flag output for SPI Slave-select */
1317#define FLG4_P 0x0000000C /* Activates (=0) SPI_FLOUT4 as flag output for SPI Slave-select */
1318#define FLG5_P 0x0000000D /* Activates (=0) SPI_FLOUT5 as flag output for SPI Slave-select */
1319#define FLG6_P 0x0000000E /* Activates (=0) SPI_FLOUT6 as flag output for SPI Slave-select */
1320#define FLG7_P 0x0000000F /* Activates (=0) SPI_FLOUT7 as flag output for SPI Slave-select */
1321
1322/* SPI_STAT Masks */
1323#define SPIF 0x00000001 /* Set (=1) when SPI single-word transfer complete */
1324#define MODF 0x00000002 /* Set (=1) in a master device when some other device tries to become master */
1325#define TXE 0x00000004 /* Set (=1) when transmission occurs with no new data in SPI_TDBR */
1326#define TXS 0x00000008 /* SPI_TDBR Data Buffer Status (0=Empty, 1=Full) */
1327#define RBSY 0x00000010 /* Set (=1) when data is received with RDBR full */
1328#define RXS 0x00000020 /* SPI_RDBR Data Buffer Status (0=Empty, 1=Full) */
1329#define TXCOL 0x00000040 /* When set (=1), corrupt data may have been transmitted */
1330
1331/* ********************* ASYNCHRONOUS MEMORY CONTROLLER MASKS ************* */ 1271/* ********************* ASYNCHRONOUS MEMORY CONTROLLER MASKS ************* */
1332 1272
1333/* AMGCTL Masks */ 1273/* AMGCTL Masks */
diff --git a/arch/blackfin/mach-bf561/ints-priority.c b/arch/blackfin/mach-bf561/ints-priority.c
index b4424172ad9e..7ee9262fe132 100644
--- a/arch/blackfin/mach-bf561/ints-priority.c
+++ b/arch/blackfin/mach-bf561/ints-priority.c
@@ -13,7 +13,7 @@
13void __init program_IAR(void) 13void __init program_IAR(void)
14{ 14{
15 /* Program the IAR0 Register with the configured priority */ 15 /* Program the IAR0 Register with the configured priority */
16 bfin_write_SICA_IAR0(((CONFIG_IRQ_PLL_WAKEUP - 7) << IRQ_PLL_WAKEUP_POS) | 16 bfin_write_SIC_IAR0(((CONFIG_IRQ_PLL_WAKEUP - 7) << IRQ_PLL_WAKEUP_POS) |
17 ((CONFIG_IRQ_DMA1_ERROR - 7) << IRQ_DMA1_ERROR_POS) | 17 ((CONFIG_IRQ_DMA1_ERROR - 7) << IRQ_DMA1_ERROR_POS) |
18 ((CONFIG_IRQ_DMA2_ERROR - 7) << IRQ_DMA2_ERROR_POS) | 18 ((CONFIG_IRQ_DMA2_ERROR - 7) << IRQ_DMA2_ERROR_POS) |
19 ((CONFIG_IRQ_IMDMA_ERROR - 7) << IRQ_IMDMA_ERROR_POS) | 19 ((CONFIG_IRQ_IMDMA_ERROR - 7) << IRQ_IMDMA_ERROR_POS) |
@@ -22,7 +22,7 @@ void __init program_IAR(void)
22 ((CONFIG_IRQ_SPORT0_ERROR - 7) << IRQ_SPORT0_ERROR_POS) | 22 ((CONFIG_IRQ_SPORT0_ERROR - 7) << IRQ_SPORT0_ERROR_POS) |
23 ((CONFIG_IRQ_SPORT1_ERROR - 7) << IRQ_SPORT1_ERROR_POS)); 23 ((CONFIG_IRQ_SPORT1_ERROR - 7) << IRQ_SPORT1_ERROR_POS));
24 24
25 bfin_write_SICA_IAR1(((CONFIG_IRQ_SPI_ERROR - 7) << IRQ_SPI_ERROR_POS) | 25 bfin_write_SIC_IAR1(((CONFIG_IRQ_SPI_ERROR - 7) << IRQ_SPI_ERROR_POS) |
26 ((CONFIG_IRQ_UART_ERROR - 7) << IRQ_UART_ERROR_POS) | 26 ((CONFIG_IRQ_UART_ERROR - 7) << IRQ_UART_ERROR_POS) |
27 ((CONFIG_IRQ_RESERVED_ERROR - 7) << IRQ_RESERVED_ERROR_POS) | 27 ((CONFIG_IRQ_RESERVED_ERROR - 7) << IRQ_RESERVED_ERROR_POS) |
28 ((CONFIG_IRQ_DMA1_0 - 7) << IRQ_DMA1_0_POS) | 28 ((CONFIG_IRQ_DMA1_0 - 7) << IRQ_DMA1_0_POS) |
@@ -31,7 +31,7 @@ void __init program_IAR(void)
31 ((CONFIG_IRQ_DMA1_3 - 7) << IRQ_DMA1_3_POS) | 31 ((CONFIG_IRQ_DMA1_3 - 7) << IRQ_DMA1_3_POS) |
32 ((CONFIG_IRQ_DMA1_4 - 7) << IRQ_DMA1_4_POS)); 32 ((CONFIG_IRQ_DMA1_4 - 7) << IRQ_DMA1_4_POS));
33 33
34 bfin_write_SICA_IAR2(((CONFIG_IRQ_DMA1_5 - 7) << IRQ_DMA1_5_POS) | 34 bfin_write_SIC_IAR2(((CONFIG_IRQ_DMA1_5 - 7) << IRQ_DMA1_5_POS) |
35 ((CONFIG_IRQ_DMA1_6 - 7) << IRQ_DMA1_6_POS) | 35 ((CONFIG_IRQ_DMA1_6 - 7) << IRQ_DMA1_6_POS) |
36 ((CONFIG_IRQ_DMA1_7 - 7) << IRQ_DMA1_7_POS) | 36 ((CONFIG_IRQ_DMA1_7 - 7) << IRQ_DMA1_7_POS) |
37 ((CONFIG_IRQ_DMA1_8 - 7) << IRQ_DMA1_8_POS) | 37 ((CONFIG_IRQ_DMA1_8 - 7) << IRQ_DMA1_8_POS) |
@@ -40,7 +40,7 @@ void __init program_IAR(void)
40 ((CONFIG_IRQ_DMA1_11 - 7) << IRQ_DMA1_11_POS) | 40 ((CONFIG_IRQ_DMA1_11 - 7) << IRQ_DMA1_11_POS) |
41 ((CONFIG_IRQ_DMA2_0 - 7) << IRQ_DMA2_0_POS)); 41 ((CONFIG_IRQ_DMA2_0 - 7) << IRQ_DMA2_0_POS));
42 42
43 bfin_write_SICA_IAR3(((CONFIG_IRQ_DMA2_1 - 7) << IRQ_DMA2_1_POS) | 43 bfin_write_SIC_IAR3(((CONFIG_IRQ_DMA2_1 - 7) << IRQ_DMA2_1_POS) |
44 ((CONFIG_IRQ_DMA2_2 - 7) << IRQ_DMA2_2_POS) | 44 ((CONFIG_IRQ_DMA2_2 - 7) << IRQ_DMA2_2_POS) |
45 ((CONFIG_IRQ_DMA2_3 - 7) << IRQ_DMA2_3_POS) | 45 ((CONFIG_IRQ_DMA2_3 - 7) << IRQ_DMA2_3_POS) |
46 ((CONFIG_IRQ_DMA2_4 - 7) << IRQ_DMA2_4_POS) | 46 ((CONFIG_IRQ_DMA2_4 - 7) << IRQ_DMA2_4_POS) |
@@ -49,7 +49,7 @@ void __init program_IAR(void)
49 ((CONFIG_IRQ_DMA2_7 - 7) << IRQ_DMA2_7_POS) | 49 ((CONFIG_IRQ_DMA2_7 - 7) << IRQ_DMA2_7_POS) |
50 ((CONFIG_IRQ_DMA2_8 - 7) << IRQ_DMA2_8_POS)); 50 ((CONFIG_IRQ_DMA2_8 - 7) << IRQ_DMA2_8_POS));
51 51
52 bfin_write_SICA_IAR4(((CONFIG_IRQ_DMA2_9 - 7) << IRQ_DMA2_9_POS) | 52 bfin_write_SIC_IAR4(((CONFIG_IRQ_DMA2_9 - 7) << IRQ_DMA2_9_POS) |
53 ((CONFIG_IRQ_DMA2_10 - 7) << IRQ_DMA2_10_POS) | 53 ((CONFIG_IRQ_DMA2_10 - 7) << IRQ_DMA2_10_POS) |
54 ((CONFIG_IRQ_DMA2_11 - 7) << IRQ_DMA2_11_POS) | 54 ((CONFIG_IRQ_DMA2_11 - 7) << IRQ_DMA2_11_POS) |
55 ((CONFIG_IRQ_TIMER0 - 7) << IRQ_TIMER0_POS) | 55 ((CONFIG_IRQ_TIMER0 - 7) << IRQ_TIMER0_POS) |
@@ -58,7 +58,7 @@ void __init program_IAR(void)
58 ((CONFIG_IRQ_TIMER3 - 7) << IRQ_TIMER3_POS) | 58 ((CONFIG_IRQ_TIMER3 - 7) << IRQ_TIMER3_POS) |
59 ((CONFIG_IRQ_TIMER4 - 7) << IRQ_TIMER4_POS)); 59 ((CONFIG_IRQ_TIMER4 - 7) << IRQ_TIMER4_POS));
60 60
61 bfin_write_SICA_IAR5(((CONFIG_IRQ_TIMER5 - 7) << IRQ_TIMER5_POS) | 61 bfin_write_SIC_IAR5(((CONFIG_IRQ_TIMER5 - 7) << IRQ_TIMER5_POS) |
62 ((CONFIG_IRQ_TIMER6 - 7) << IRQ_TIMER6_POS) | 62 ((CONFIG_IRQ_TIMER6 - 7) << IRQ_TIMER6_POS) |
63 ((CONFIG_IRQ_TIMER7 - 7) << IRQ_TIMER7_POS) | 63 ((CONFIG_IRQ_TIMER7 - 7) << IRQ_TIMER7_POS) |
64 ((CONFIG_IRQ_TIMER8 - 7) << IRQ_TIMER8_POS) | 64 ((CONFIG_IRQ_TIMER8 - 7) << IRQ_TIMER8_POS) |
@@ -67,7 +67,7 @@ void __init program_IAR(void)
67 ((CONFIG_IRQ_TIMER11 - 7) << IRQ_TIMER11_POS) | 67 ((CONFIG_IRQ_TIMER11 - 7) << IRQ_TIMER11_POS) |
68 ((CONFIG_IRQ_PROG0_INTA - 7) << IRQ_PROG0_INTA_POS)); 68 ((CONFIG_IRQ_PROG0_INTA - 7) << IRQ_PROG0_INTA_POS));
69 69
70 bfin_write_SICA_IAR6(((CONFIG_IRQ_PROG0_INTB - 7) << IRQ_PROG0_INTB_POS) | 70 bfin_write_SIC_IAR6(((CONFIG_IRQ_PROG0_INTB - 7) << IRQ_PROG0_INTB_POS) |
71 ((CONFIG_IRQ_PROG1_INTA - 7) << IRQ_PROG1_INTA_POS) | 71 ((CONFIG_IRQ_PROG1_INTA - 7) << IRQ_PROG1_INTA_POS) |
72 ((CONFIG_IRQ_PROG1_INTB - 7) << IRQ_PROG1_INTB_POS) | 72 ((CONFIG_IRQ_PROG1_INTB - 7) << IRQ_PROG1_INTB_POS) |
73 ((CONFIG_IRQ_PROG2_INTA - 7) << IRQ_PROG2_INTA_POS) | 73 ((CONFIG_IRQ_PROG2_INTA - 7) << IRQ_PROG2_INTA_POS) |
@@ -76,7 +76,7 @@ void __init program_IAR(void)
76 ((CONFIG_IRQ_DMA1_WRRD1 - 7) << IRQ_DMA1_WRRD1_POS) | 76 ((CONFIG_IRQ_DMA1_WRRD1 - 7) << IRQ_DMA1_WRRD1_POS) |
77 ((CONFIG_IRQ_DMA2_WRRD0 - 7) << IRQ_DMA2_WRRD0_POS)); 77 ((CONFIG_IRQ_DMA2_WRRD0 - 7) << IRQ_DMA2_WRRD0_POS));
78 78
79 bfin_write_SICA_IAR7(((CONFIG_IRQ_DMA2_WRRD1 - 7) << IRQ_DMA2_WRRD1_POS) | 79 bfin_write_SIC_IAR7(((CONFIG_IRQ_DMA2_WRRD1 - 7) << IRQ_DMA2_WRRD1_POS) |
80 ((CONFIG_IRQ_IMDMA_WRRD0 - 7) << IRQ_IMDMA_WRRD0_POS) | 80 ((CONFIG_IRQ_IMDMA_WRRD0 - 7) << IRQ_IMDMA_WRRD0_POS) |
81 ((CONFIG_IRQ_IMDMA_WRRD1 - 7) << IRQ_IMDMA_WRRD1_POS) | 81 ((CONFIG_IRQ_IMDMA_WRRD1 - 7) << IRQ_IMDMA_WRRD1_POS) |
82 ((CONFIG_IRQ_WDTIMER - 7) << IRQ_WDTIMER_POS) | 82 ((CONFIG_IRQ_WDTIMER - 7) << IRQ_WDTIMER_POS) |
diff --git a/arch/blackfin/mach-bf561/smp.c b/arch/blackfin/mach-bf561/smp.c
index 3b9a4bf7dacc..f540ed1257d6 100644
--- a/arch/blackfin/mach-bf561/smp.c
+++ b/arch/blackfin/mach-bf561/smp.c
@@ -52,19 +52,19 @@ int __init setup_profiling_timer(unsigned int multiplier) /* not supported */
52void __cpuinit platform_secondary_init(unsigned int cpu) 52void __cpuinit platform_secondary_init(unsigned int cpu)
53{ 53{
54 /* Clone setup for peripheral interrupt sources from CoreA. */ 54 /* Clone setup for peripheral interrupt sources from CoreA. */
55 bfin_write_SICB_IMASK0(bfin_read_SICA_IMASK0()); 55 bfin_write_SICB_IMASK0(bfin_read_SIC_IMASK0());
56 bfin_write_SICB_IMASK1(bfin_read_SICA_IMASK1()); 56 bfin_write_SICB_IMASK1(bfin_read_SIC_IMASK1());
57 SSYNC(); 57 SSYNC();
58 58
59 /* Clone setup for IARs from CoreA. */ 59 /* Clone setup for IARs from CoreA. */
60 bfin_write_SICB_IAR0(bfin_read_SICA_IAR0()); 60 bfin_write_SICB_IAR0(bfin_read_SIC_IAR0());
61 bfin_write_SICB_IAR1(bfin_read_SICA_IAR1()); 61 bfin_write_SICB_IAR1(bfin_read_SIC_IAR1());
62 bfin_write_SICB_IAR2(bfin_read_SICA_IAR2()); 62 bfin_write_SICB_IAR2(bfin_read_SIC_IAR2());
63 bfin_write_SICB_IAR3(bfin_read_SICA_IAR3()); 63 bfin_write_SICB_IAR3(bfin_read_SIC_IAR3());
64 bfin_write_SICB_IAR4(bfin_read_SICA_IAR4()); 64 bfin_write_SICB_IAR4(bfin_read_SIC_IAR4());
65 bfin_write_SICB_IAR5(bfin_read_SICA_IAR5()); 65 bfin_write_SICB_IAR5(bfin_read_SIC_IAR5());
66 bfin_write_SICB_IAR6(bfin_read_SICA_IAR6()); 66 bfin_write_SICB_IAR6(bfin_read_SIC_IAR6());
67 bfin_write_SICB_IAR7(bfin_read_SICA_IAR7()); 67 bfin_write_SICB_IAR7(bfin_read_SIC_IAR7());
68 bfin_write_SICB_IWR0(IWR_DISABLE_ALL); 68 bfin_write_SICB_IWR0(IWR_DISABLE_ALL);
69 bfin_write_SICB_IWR1(IWR_DISABLE_ALL); 69 bfin_write_SICB_IWR1(IWR_DISABLE_ALL);
70 SSYNC(); 70 SSYNC();
@@ -86,12 +86,12 @@ int __cpuinit platform_boot_secondary(unsigned int cpu, struct task_struct *idle
86 86
87 spin_lock(&boot_lock); 87 spin_lock(&boot_lock);
88 88
89 if ((bfin_read_SICA_SYSCR() & COREB_SRAM_INIT) == 0) { 89 if ((bfin_read_SIC_SYSCR() & COREB_SRAM_INIT) == 0) {
90 /* CoreB already running, sending ipi to wakeup it */ 90 /* CoreB already running, sending ipi to wakeup it */
91 platform_send_ipi_cpu(cpu, IRQ_SUPPLE_0); 91 platform_send_ipi_cpu(cpu, IRQ_SUPPLE_0);
92 } else { 92 } else {
93 /* Kick CoreB, which should start execution from CORE_SRAM_BASE. */ 93 /* Kick CoreB, which should start execution from CORE_SRAM_BASE. */
94 bfin_write_SICA_SYSCR(bfin_read_SICA_SYSCR() & ~COREB_SRAM_INIT); 94 bfin_write_SIC_SYSCR(bfin_read_SIC_SYSCR() & ~COREB_SRAM_INIT);
95 SSYNC(); 95 SSYNC();
96 } 96 }
97 97
diff --git a/arch/blackfin/mach-common/Makefile b/arch/blackfin/mach-common/Makefile
index 814cb483853b..ff299f24aba0 100644
--- a/arch/blackfin/mach-common/Makefile
+++ b/arch/blackfin/mach-common/Makefile
@@ -11,4 +11,3 @@ obj-$(CONFIG_CPU_FREQ) += cpufreq.o
11obj-$(CONFIG_CPU_VOLTAGE) += dpmc.o 11obj-$(CONFIG_CPU_VOLTAGE) += dpmc.o
12obj-$(CONFIG_SMP) += smp.o 12obj-$(CONFIG_SMP) += smp.o
13obj-$(CONFIG_BFIN_KERNEL_CLOCK) += clocks-init.o 13obj-$(CONFIG_BFIN_KERNEL_CLOCK) += clocks-init.o
14obj-$(CONFIG_DEBUG_ICACHE_CHECK) += irqpanic.o
diff --git a/arch/blackfin/mach-common/dpmc_modes.S b/arch/blackfin/mach-common/dpmc_modes.S
index 5969d86836a5..9cfdd49a3127 100644
--- a/arch/blackfin/mach-common/dpmc_modes.S
+++ b/arch/blackfin/mach-common/dpmc_modes.S
@@ -292,13 +292,7 @@ ENTRY(_do_hibernate)
292#ifdef SIC_IMASK 292#ifdef SIC_IMASK
293 PM_SYS_PUSH(SIC_IMASK) 293 PM_SYS_PUSH(SIC_IMASK)
294#endif 294#endif
295#ifdef SICA_IMASK0 295#ifdef SIC_IAR0
296 PM_SYS_PUSH(SICA_IMASK0)
297#endif
298#ifdef SICA_IMASK1
299 PM_SYS_PUSH(SICA_IMASK1)
300#endif
301#ifdef SIC_IAR2
302 PM_SYS_PUSH(SIC_IAR0) 296 PM_SYS_PUSH(SIC_IAR0)
303 PM_SYS_PUSH(SIC_IAR1) 297 PM_SYS_PUSH(SIC_IAR1)
304 PM_SYS_PUSH(SIC_IAR2) 298 PM_SYS_PUSH(SIC_IAR2)
@@ -321,17 +315,6 @@ ENTRY(_do_hibernate)
321 PM_SYS_PUSH(SIC_IAR11) 315 PM_SYS_PUSH(SIC_IAR11)
322#endif 316#endif
323 317
324#ifdef SICA_IAR0
325 PM_SYS_PUSH(SICA_IAR0)
326 PM_SYS_PUSH(SICA_IAR1)
327 PM_SYS_PUSH(SICA_IAR2)
328 PM_SYS_PUSH(SICA_IAR3)
329 PM_SYS_PUSH(SICA_IAR4)
330 PM_SYS_PUSH(SICA_IAR5)
331 PM_SYS_PUSH(SICA_IAR6)
332 PM_SYS_PUSH(SICA_IAR7)
333#endif
334
335#ifdef SIC_IWR 318#ifdef SIC_IWR
336 PM_SYS_PUSH(SIC_IWR) 319 PM_SYS_PUSH(SIC_IWR)
337#endif 320#endif
@@ -344,12 +327,6 @@ ENTRY(_do_hibernate)
344#ifdef SIC_IWR2 327#ifdef SIC_IWR2
345 PM_SYS_PUSH(SIC_IWR2) 328 PM_SYS_PUSH(SIC_IWR2)
346#endif 329#endif
347#ifdef SICA_IWR0
348 PM_SYS_PUSH(SICA_IWR0)
349#endif
350#ifdef SICA_IWR1
351 PM_SYS_PUSH(SICA_IWR1)
352#endif
353 330
354#ifdef PINT0_ASSIGN 331#ifdef PINT0_ASSIGN
355 PM_SYS_PUSH(PINT0_MASK_SET) 332 PM_SYS_PUSH(PINT0_MASK_SET)
@@ -750,12 +727,6 @@ ENTRY(_do_hibernate)
750 PM_SYS_POP(PINT0_MASK_SET) 727 PM_SYS_POP(PINT0_MASK_SET)
751#endif 728#endif
752 729
753#ifdef SICA_IWR1
754 PM_SYS_POP(SICA_IWR1)
755#endif
756#ifdef SICA_IWR0
757 PM_SYS_POP(SICA_IWR0)
758#endif
759#ifdef SIC_IWR2 730#ifdef SIC_IWR2
760 PM_SYS_POP(SIC_IWR2) 731 PM_SYS_POP(SIC_IWR2)
761#endif 732#endif
@@ -769,17 +740,6 @@ ENTRY(_do_hibernate)
769 PM_SYS_POP(SIC_IWR) 740 PM_SYS_POP(SIC_IWR)
770#endif 741#endif
771 742
772#ifdef SICA_IAR0
773 PM_SYS_POP(SICA_IAR7)
774 PM_SYS_POP(SICA_IAR6)
775 PM_SYS_POP(SICA_IAR5)
776 PM_SYS_POP(SICA_IAR4)
777 PM_SYS_POP(SICA_IAR3)
778 PM_SYS_POP(SICA_IAR2)
779 PM_SYS_POP(SICA_IAR1)
780 PM_SYS_POP(SICA_IAR0)
781#endif
782
783#ifdef SIC_IAR8 743#ifdef SIC_IAR8
784 PM_SYS_POP(SIC_IAR11) 744 PM_SYS_POP(SIC_IAR11)
785 PM_SYS_POP(SIC_IAR10) 745 PM_SYS_POP(SIC_IAR10)
@@ -797,17 +757,11 @@ ENTRY(_do_hibernate)
797#ifdef SIC_IAR3 757#ifdef SIC_IAR3
798 PM_SYS_POP(SIC_IAR3) 758 PM_SYS_POP(SIC_IAR3)
799#endif 759#endif
800#ifdef SIC_IAR2 760#ifdef SIC_IAR0
801 PM_SYS_POP(SIC_IAR2) 761 PM_SYS_POP(SIC_IAR2)
802 PM_SYS_POP(SIC_IAR1) 762 PM_SYS_POP(SIC_IAR1)
803 PM_SYS_POP(SIC_IAR0) 763 PM_SYS_POP(SIC_IAR0)
804#endif 764#endif
805#ifdef SICA_IMASK1
806 PM_SYS_POP(SICA_IMASK1)
807#endif
808#ifdef SICA_IMASK0
809 PM_SYS_POP(SICA_IMASK0)
810#endif
811#ifdef SIC_IMASK 765#ifdef SIC_IMASK
812 PM_SYS_POP(SIC_IMASK) 766 PM_SYS_POP(SIC_IMASK)
813#endif 767#endif
diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S
index af1bffa21dc1..2ca915ee181f 100644
--- a/arch/blackfin/mach-common/entry.S
+++ b/arch/blackfin/mach-common/entry.S
@@ -889,6 +889,66 @@ ENTRY(_ret_from_exception)
889 rts; 889 rts;
890ENDPROC(_ret_from_exception) 890ENDPROC(_ret_from_exception)
891 891
892#if defined(CONFIG_PREEMPT)
893
894ENTRY(_up_to_irq14)
895#if ANOMALY_05000281 || ANOMALY_05000461
896 r0.l = lo(SAFE_USER_INSTRUCTION);
897 r0.h = hi(SAFE_USER_INSTRUCTION);
898 reti = r0;
899#endif
900
901#ifdef CONFIG_DEBUG_HWERR
902 /* enable irq14 & hwerr interrupt, until we transition to _evt_evt14 */
903 r0 = (EVT_IVG14 | EVT_IVHW | EVT_IRPTEN | EVT_EVX | EVT_NMI | EVT_RST | EVT_EMU);
904#else
905 /* Only enable irq14 interrupt, until we transition to _evt_evt14 */
906 r0 = (EVT_IVG14 | EVT_IRPTEN | EVT_EVX | EVT_NMI | EVT_RST | EVT_EMU);
907#endif
908 sti r0;
909
910 p0.l = lo(EVT14);
911 p0.h = hi(EVT14);
912 p1.l = _evt_up_evt14;
913 p1.h = _evt_up_evt14;
914 [p0] = p1;
915 csync;
916
917 raise 14;
9181:
919 jump 1b;
920ENDPROC(_up_to_irq14)
921
922ENTRY(_evt_up_evt14)
923#ifdef CONFIG_DEBUG_HWERR
924 r0 = (EVT_IVHW | EVT_IRPTEN | EVT_EVX | EVT_NMI | EVT_RST | EVT_EMU);
925 sti r0;
926#else
927 cli r0;
928#endif
929#ifdef CONFIG_TRACE_IRQFLAGS
930 [--sp] = rets;
931 sp += -12;
932 call _trace_hardirqs_off;
933 sp += 12;
934 rets = [sp++];
935#endif
936 [--sp] = RETI;
937 SP += 4;
938
939 /* restore normal evt14 */
940 p0.l = lo(EVT14);
941 p0.h = hi(EVT14);
942 p1.l = _evt_evt14;
943 p1.h = _evt_evt14;
944 [p0] = p1;
945 csync;
946
947 rts;
948ENDPROC(_evt_up_evt14)
949
950#endif
951
892#ifdef CONFIG_IPIPE 952#ifdef CONFIG_IPIPE
893 953
894_resume_kernel_from_int: 954_resume_kernel_from_int:
@@ -902,8 +962,54 @@ _resume_kernel_from_int:
902 ( r7:4, p5:3 ) = [sp++]; 962 ( r7:4, p5:3 ) = [sp++];
903 rets = [sp++]; 963 rets = [sp++];
904 rts 964 rts
965#elif defined(CONFIG_PREEMPT)
966
967_resume_kernel_from_int:
968 /* check preempt_count */
969 r7 = sp;
970 r4.l = lo(ALIGN_PAGE_MASK);
971 r4.h = hi(ALIGN_PAGE_MASK);
972 r7 = r7 & r4;
973 p5 = r7;
974 r7 = [p5 + TI_PREEMPT];
975 cc = r7 == 0x0;
976 if !cc jump .Lreturn_to_kernel;
977.Lneed_schedule:
978 r7 = [p5 + TI_FLAGS];
979 r4.l = lo(_TIF_WORK_MASK);
980 r4.h = hi(_TIF_WORK_MASK);
981 r7 = r7 & r4;
982 cc = BITTST(r7, TIF_NEED_RESCHED);
983 if !cc jump .Lreturn_to_kernel;
984 /*
985 * let schedule done at level 15, otherwise sheduled process will run
986 * at high level and block low level interrupt
987 */
988 r6 = reti; /* save reti */
989 r5.l = .Lkernel_schedule;
990 r5.h = .Lkernel_schedule;
991 reti = r5;
992 rti;
993.Lkernel_schedule:
994 [--sp] = rets;
995 sp += -12;
996 pseudo_long_call _preempt_schedule_irq, p4;
997 sp += 12;
998 rets = [sp++];
999
1000 [--sp] = rets;
1001 sp += -12;
1002 /* up to irq14 so that reti after restore_all can return to irq15(kernel) */
1003 pseudo_long_call _up_to_irq14, p4;
1004 sp += 12;
1005 rets = [sp++];
1006
1007 reti = r6; /* restore reti so that origin process can return to interrupted point */
1008
1009 jump .Lneed_schedule;
905#else 1010#else
906#define _resume_kernel_from_int 2f 1011
1012#define _resume_kernel_from_int .Lreturn_to_kernel
907#endif 1013#endif
908 1014
909ENTRY(_return_from_int) 1015ENTRY(_return_from_int)
@@ -913,7 +1019,7 @@ ENTRY(_return_from_int)
913 p2.h = hi(ILAT); 1019 p2.h = hi(ILAT);
914 r0 = [p2]; 1020 r0 = [p2];
915 cc = bittst (r0, EVT_IVG15_P); 1021 cc = bittst (r0, EVT_IVG15_P);
916 if cc jump 2f; 1022 if cc jump .Lreturn_to_kernel;
917 1023
918 /* if not return to user mode, get out */ 1024 /* if not return to user mode, get out */
919 p2.l = lo(IPEND); 1025 p2.l = lo(IPEND);
@@ -945,7 +1051,7 @@ ENTRY(_return_from_int)
945 STI r0; 1051 STI r0;
946 raise 15; /* raise evt15 to do signal or reschedule */ 1052 raise 15; /* raise evt15 to do signal or reschedule */
947 rti; 1053 rti;
9482: 1054.Lreturn_to_kernel:
949 rts; 1055 rts;
950ENDPROC(_return_from_int) 1056ENDPROC(_return_from_int)
951 1057
@@ -1631,6 +1737,7 @@ ENTRY(_sys_call_table)
1631 .long _sys_fanotify_init 1737 .long _sys_fanotify_init
1632 .long _sys_fanotify_mark 1738 .long _sys_fanotify_mark
1633 .long _sys_prlimit64 1739 .long _sys_prlimit64
1740 .long _sys_cacheflush
1634 1741
1635 .rept NR_syscalls-(.-_sys_call_table)/4 1742 .rept NR_syscalls-(.-_sys_call_table)/4
1636 .long _sys_ni_syscall 1743 .long _sys_ni_syscall
diff --git a/arch/blackfin/mach-common/interrupt.S b/arch/blackfin/mach-common/interrupt.S
index cee62cf4acd4..2df37db3b49b 100644
--- a/arch/blackfin/mach-common/interrupt.S
+++ b/arch/blackfin/mach-common/interrupt.S
@@ -116,7 +116,24 @@ __common_int_entry:
116 cc = r0 == 0; 116 cc = r0 == 0;
117 if cc jump .Lcommon_restore_context; 117 if cc jump .Lcommon_restore_context;
118#else /* CONFIG_IPIPE */ 118#else /* CONFIG_IPIPE */
119
120#ifdef CONFIG_PREEMPT
121 r7 = sp;
122 r4.l = lo(ALIGN_PAGE_MASK);
123 r4.h = hi(ALIGN_PAGE_MASK);
124 r7 = r7 & r4;
125 p5 = r7;
126 r7 = [p5 + TI_PREEMPT]; /* get preempt count */
127 r7 += 1; /* increment it */
128 [p5 + TI_PREEMPT] = r7;
129#endif
119 pseudo_long_call _do_irq, p2; 130 pseudo_long_call _do_irq, p2;
131
132#ifdef CONFIG_PREEMPT
133 r7 += -1;
134 [p5 + TI_PREEMPT] = r7; /* restore preempt count */
135#endif
136
120 SP += 12; 137 SP += 12;
121#endif /* CONFIG_IPIPE */ 138#endif /* CONFIG_IPIPE */
122 pseudo_long_call _return_from_int, p2; 139 pseudo_long_call _return_from_int, p2;
diff --git a/arch/blackfin/mach-common/ints-priority.c b/arch/blackfin/mach-common/ints-priority.c
index eaece5f84e42..da7e3c63746b 100644
--- a/arch/blackfin/mach-common/ints-priority.c
+++ b/arch/blackfin/mach-common/ints-priority.c
@@ -511,7 +511,7 @@ static void bfin_demux_mac_status_irq(unsigned int int_err_irq,
511 int i, irq = 0; 511 int i, irq = 0;
512 u32 status = bfin_read_EMAC_SYSTAT(); 512 u32 status = bfin_read_EMAC_SYSTAT();
513 513
514 for (i = 0; i < (IRQ_MAC_STMDONE - IRQ_MAC_PHYINT); i++) 514 for (i = 0; i <= (IRQ_MAC_STMDONE - IRQ_MAC_PHYINT); i++)
515 if (status & (1L << i)) { 515 if (status & (1L << i)) {
516 irq = IRQ_MAC_PHYINT + i; 516 irq = IRQ_MAC_PHYINT + i;
517 break; 517 break;
@@ -529,8 +529,9 @@ static void bfin_demux_mac_status_irq(unsigned int int_err_irq,
529 } else 529 } else
530 printk(KERN_ERR 530 printk(KERN_ERR
531 "%s : %s : LINE %d :\nIRQ ?: MAC ERROR" 531 "%s : %s : LINE %d :\nIRQ ?: MAC ERROR"
532 " INTERRUPT ASSERTED BUT NO SOURCE FOUND\n", 532 " INTERRUPT ASSERTED BUT NO SOURCE FOUND"
533 __func__, __FILE__, __LINE__); 533 "(EMAC_SYSTAT=0x%X)\n",
534 __func__, __FILE__, __LINE__, status);
534} 535}
535#endif 536#endif
536 537
@@ -1298,7 +1299,7 @@ void do_irq(int vec, struct pt_regs *fp)
1298 } else { 1299 } else {
1299 struct ivgx *ivg = ivg7_13[vec - IVG7].ifirst; 1300 struct ivgx *ivg = ivg7_13[vec - IVG7].ifirst;
1300 struct ivgx *ivg_stop = ivg7_13[vec - IVG7].istop; 1301 struct ivgx *ivg_stop = ivg7_13[vec - IVG7].istop;
1301#if defined(SIC_ISR0) || defined(SICA_ISR0) 1302#if defined(SIC_ISR0)
1302 unsigned long sic_status[3]; 1303 unsigned long sic_status[3];
1303 1304
1304 if (smp_processor_id()) { 1305 if (smp_processor_id()) {
@@ -1378,7 +1379,7 @@ asmlinkage int __ipipe_grab_irq(int vec, struct pt_regs *regs)
1378 if (likely(vec == EVT_IVTMR_P)) 1379 if (likely(vec == EVT_IVTMR_P))
1379 irq = IRQ_CORETMR; 1380 irq = IRQ_CORETMR;
1380 else { 1381 else {
1381#if defined(SIC_ISR0) || defined(SICA_ISR0) 1382#if defined(SIC_ISR0)
1382 unsigned long sic_status[3]; 1383 unsigned long sic_status[3];
1383 1384
1384 sic_status[0] = bfin_read_SIC_ISR0() & bfin_read_SIC_IMASK0(); 1385 sic_status[0] = bfin_read_SIC_ISR0() & bfin_read_SIC_IMASK0();
diff --git a/arch/blackfin/mach-common/irqpanic.c b/arch/blackfin/mach-common/irqpanic.c
deleted file mode 100644
index c6496249e2bc..000000000000
--- a/arch/blackfin/mach-common/irqpanic.c
+++ /dev/null
@@ -1,106 +0,0 @@
1/*
2 * panic kernel with dump information
3 *
4 * Copyright 2005-2009 Analog Devices Inc.
5 *
6 * Licensed under the GPL-2 or later.
7 */
8
9#include <linux/module.h>
10#include <linux/kernel_stat.h>
11#include <linux/sched.h>
12#include <asm/blackfin.h>
13
14#define L1_ICACHE_START 0xffa10000
15#define L1_ICACHE_END 0xffa13fff
16
17/*
18 * irq_panic - calls panic with string setup
19 */
20__attribute__ ((l1_text))
21asmlinkage void irq_panic(int reason, struct pt_regs *regs)
22{
23 unsigned int cmd, tag, ca, cache_hi, cache_lo, *pa;
24 unsigned short i, j, die;
25 unsigned int bad[10][6];
26
27 /* check entire cache for coherency
28 * Since printk is in cacheable memory,
29 * don't call it until you have checked everything
30 */
31
32 die = 0;
33 i = 0;
34
35 /* check icache */
36
37 for (ca = L1_ICACHE_START; ca <= L1_ICACHE_END && i < 10; ca += 32) {
38
39 /* Grab various address bits for the itest_cmd fields */
40 cmd = (((ca & 0x3000) << 4) | /* ca[13:12] for SBNK[1:0] */
41 ((ca & 0x0c00) << 16) | /* ca[11:10] for WAYSEL[1:0] */
42 ((ca & 0x3f8)) | /* ca[09:03] for SET[4:0] and DW[1:0] */
43 0); /* Access Tag, Read access */
44
45 SSYNC();
46 bfin_write_ITEST_COMMAND(cmd);
47 SSYNC();
48 tag = bfin_read_ITEST_DATA0();
49 SSYNC();
50
51 /* if tag is marked as valid, check it */
52 if (tag & 1) {
53 /* The icache is arranged in 4 groups of 64-bits */
54 for (j = 0; j < 32; j += 8) {
55 cmd = ((((ca + j) & 0x3000) << 4) | /* ca[13:12] for SBNK[1:0] */
56 (((ca + j) & 0x0c00) << 16) | /* ca[11:10] for WAYSEL[1:0] */
57 (((ca + j) & 0x3f8)) | /* ca[09:03] for SET[4:0] and DW[1:0] */
58 4); /* Access Data, Read access */
59
60 SSYNC();
61 bfin_write_ITEST_COMMAND(cmd);
62 SSYNC();
63
64 cache_hi = bfin_read_ITEST_DATA1();
65 cache_lo = bfin_read_ITEST_DATA0();
66
67 pa = ((unsigned int *)((tag & 0xffffcc00) |
68 ((ca + j) & ~(0xffffcc00))));
69
70 /*
71 * Debugging this, enable
72 *
73 * printk("addr: %08x %08x%08x | %08x%08x\n",
74 * ((unsigned int *)((tag & 0xffffcc00) | ((ca+j) & ~(0xffffcc00)))),
75 * cache_hi, cache_lo, *(pa+1), *pa);
76 */
77
78 if (cache_hi != *(pa + 1) || cache_lo != *pa) {
79 /* Since icache is not working, stay out of it, by not printing */
80 die = 1;
81 bad[i][0] = (ca + j);
82 bad[i][1] = cache_hi;
83 bad[i][2] = cache_lo;
84 bad[i][3] = ((tag & 0xffffcc00) |
85 ((ca + j) & ~(0xffffcc00)));
86 bad[i][4] = *(pa + 1);
87 bad[i][5] = *(pa);
88 i++;
89 }
90 }
91 }
92 }
93 if (die) {
94 printk(KERN_EMERG "icache coherency error\n");
95 for (j = 0; j <= i; j++) {
96 printk(KERN_EMERG
97 "cache address : %08x cache value : %08x%08x\n",
98 bad[j][0], bad[j][1], bad[j][2]);
99 printk(KERN_EMERG
100 "physical address: %08x SDRAM value : %08x%08x\n",
101 bad[j][3], bad[j][4], bad[j][5]);
102 }
103 panic("icache coherency error");
104 } else
105 printk(KERN_EMERG "icache checked, and OK\n");
106}
diff --git a/arch/blackfin/mm/init.c b/arch/blackfin/mm/init.c
index bb4e8fff4b55..f8435cd36c7c 100644
--- a/arch/blackfin/mm/init.c
+++ b/arch/blackfin/mm/init.c
@@ -158,5 +158,8 @@ void __init_refok free_initmem(void)
158 free_init_pages("unused kernel memory", 158 free_init_pages("unused kernel memory",
159 (unsigned long)(&__init_begin), 159 (unsigned long)(&__init_begin),
160 (unsigned long)(&__init_end)); 160 (unsigned long)(&__init_end));
161
162 if (memory_start == (unsigned long)(&__init_end))
163 memory_start = (unsigned long)(&__init_begin);
161#endif 164#endif
162} 165}