aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-01-10 20:36:43 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-10 20:36:43 -0500
commit28190145543260c155216b9bd3adf57bee50f8b2 (patch)
treeb79b0163158ae3fa7e0f4776fdfb64c435885608
parent001a541ea9163ace5e8243ee0e907ad80a4c0ec2 (diff)
parentdda6779f04fe7c6b61846b672b438bc08c2e08ac (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lliubbo/blackfin
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lliubbo/blackfin: blackfin: bf561: add adv7183 capture support blackfin: bf537: add capture support blackfin: bf548: add capture support blackfin: time-ts: rm unused func broadcast_timer_setup() blackfin: i2c-lcd: change default clock rate blackfin: mac: dsa: add vlan mask in board file blackfin: bf537: change num_chipselect for spi-sport blackfin: serial: bfin-uart: remove unused field bf54x: get mem size: missing break in switch blackfin: smp: fix msg queue overflow issue blackfin: config: update macro SPI_BFIN in board file blackfin: config: update def config for all boards blackfin: smp: cleanup smp code blackfin: smp: add suspend and wakeup irq flags blackfin: bf533-stamp: add missed patches for new asoc driver blackfin: bf533-stamp: fix ad1836 name
-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_defconfig2
-rw-r--r--arch/blackfin/configs/BF527-EZKIT-V2_defconfig2
-rw-r--r--arch/blackfin/configs/BF527-EZKIT_defconfig2
-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_defconfig2
-rw-r--r--arch/blackfin/configs/BF538-EZKIT_defconfig2
-rw-r--r--arch/blackfin/configs/BF548-EZKIT_defconfig2
-rw-r--r--arch/blackfin/configs/BF561-ACVILON_defconfig2
-rw-r--r--arch/blackfin/configs/BF561-EZKIT-SMP_defconfig2
-rw-r--r--arch/blackfin/configs/BF561-EZKIT_defconfig2
-rw-r--r--arch/blackfin/configs/BlackStamp_defconfig2
-rw-r--r--arch/blackfin/configs/CM-BF527_defconfig2
-rw-r--r--arch/blackfin/configs/CM-BF533_defconfig2
-rw-r--r--arch/blackfin/configs/CM-BF537E_defconfig2
-rw-r--r--arch/blackfin/configs/CM-BF537U_defconfig2
-rw-r--r--arch/blackfin/configs/CM-BF548_defconfig2
-rw-r--r--arch/blackfin/configs/CM-BF561_defconfig2
-rw-r--r--arch/blackfin/configs/DNP5370_defconfig2
-rw-r--r--arch/blackfin/configs/H8606_defconfig2
-rw-r--r--arch/blackfin/configs/IP0X_defconfig2
-rw-r--r--arch/blackfin/configs/PNAV-10_defconfig2
-rw-r--r--arch/blackfin/configs/SRV1_defconfig2
-rw-r--r--arch/blackfin/configs/TCM-BF518_defconfig2
-rw-r--r--arch/blackfin/configs/TCM-BF537_defconfig2
-rw-r--r--arch/blackfin/include/asm/bfin_serial.h3
-rw-r--r--arch/blackfin/include/asm/cpu.h3
-rw-r--r--arch/blackfin/include/asm/smp.h5
-rw-r--r--arch/blackfin/kernel/setup.c16
-rw-r--r--arch/blackfin/kernel/time-ts.c8
-rw-r--r--arch/blackfin/mach-bf518/boards/ezbrd.c10
-rw-r--r--arch/blackfin/mach-bf518/boards/tcm-bf518.c4
-rw-r--r--arch/blackfin/mach-bf527/boards/ad7160eval.c4
-rw-r--r--arch/blackfin/mach-bf527/boards/cm_bf527.c4
-rw-r--r--arch/blackfin/mach-bf527/boards/ezbrd.c4
-rw-r--r--arch/blackfin/mach-bf527/boards/ezkit.c4
-rw-r--r--arch/blackfin/mach-bf527/boards/tll6527m.c4
-rw-r--r--arch/blackfin/mach-bf533/boards/H8606.c6
-rw-r--r--arch/blackfin/mach-bf533/boards/blackstamp.c4
-rw-r--r--arch/blackfin/mach-bf533/boards/cm_bf533.c6
-rw-r--r--arch/blackfin/mach-bf533/boards/ezkit.c4
-rw-r--r--arch/blackfin/mach-bf533/boards/ip0x.c4
-rw-r--r--arch/blackfin/mach-bf533/boards/stamp.c179
-rw-r--r--arch/blackfin/mach-bf537/boards/cm_bf537e.c6
-rw-r--r--arch/blackfin/mach-bf537/boards/cm_bf537u.c6
-rw-r--r--arch/blackfin/mach-bf537/boards/dnp5370.c4
-rw-r--r--arch/blackfin/mach-bf537/boards/minotaur.c6
-rw-r--r--arch/blackfin/mach-bf537/boards/pnav10.c6
-rw-r--r--arch/blackfin/mach-bf537/boards/stamp.c78
-rw-r--r--arch/blackfin/mach-bf537/boards/tcm_bf537.c6
-rw-r--r--arch/blackfin/mach-bf538/boards/ezkit.c6
-rw-r--r--arch/blackfin/mach-bf548/boards/cm_bf548.c6
-rw-r--r--arch/blackfin/mach-bf548/boards/ezkit.c73
-rw-r--r--arch/blackfin/mach-bf561/boards/acvilon.c4
-rw-r--r--arch/blackfin/mach-bf561/boards/cm_bf561.c6
-rw-r--r--arch/blackfin/mach-bf561/boards/ezkit.c101
-rw-r--r--arch/blackfin/mach-bf561/include/mach/pll.h4
-rw-r--r--arch/blackfin/mach-bf561/smp.c5
-rw-r--r--arch/blackfin/mach-common/smp.c61
61 files changed, 570 insertions, 134 deletions
diff --git a/arch/blackfin/configs/BF518F-EZBRD_defconfig b/arch/blackfin/configs/BF518F-EZBRD_defconfig
index 5edcb58d6f73..0b7039cf07ff 100644
--- a/arch/blackfin/configs/BF518F-EZBRD_defconfig
+++ b/arch/blackfin/configs/BF518F-EZBRD_defconfig
@@ -80,7 +80,7 @@ CONFIG_I2C_CHARDEV=y
80CONFIG_I2C_BLACKFIN_TWI=y 80CONFIG_I2C_BLACKFIN_TWI=y
81CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=100 81CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=100
82CONFIG_SPI=y 82CONFIG_SPI=y
83CONFIG_SPI_BFIN=y 83CONFIG_SPI_BFIN5XX=y
84CONFIG_GPIOLIB=y 84CONFIG_GPIOLIB=y
85CONFIG_GPIO_SYSFS=y 85CONFIG_GPIO_SYSFS=y
86# CONFIG_HWMON is not set 86# CONFIG_HWMON is not set
diff --git a/arch/blackfin/configs/BF526-EZBRD_defconfig b/arch/blackfin/configs/BF526-EZBRD_defconfig
index 2e549572d4f5..5553205d7cbe 100644
--- a/arch/blackfin/configs/BF526-EZBRD_defconfig
+++ b/arch/blackfin/configs/BF526-EZBRD_defconfig
@@ -97,7 +97,7 @@ CONFIG_I2C_CHARDEV=m
97CONFIG_I2C_BLACKFIN_TWI=y 97CONFIG_I2C_BLACKFIN_TWI=y
98CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=100 98CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=100
99CONFIG_SPI=y 99CONFIG_SPI=y
100CONFIG_SPI_BFIN=y 100CONFIG_SPI_BFIN5XX=y
101CONFIG_GPIOLIB=y 101CONFIG_GPIOLIB=y
102CONFIG_GPIO_SYSFS=y 102CONFIG_GPIO_SYSFS=y
103CONFIG_WATCHDOG=y 103CONFIG_WATCHDOG=y
diff --git a/arch/blackfin/configs/BF527-AD7160-EVAL_defconfig b/arch/blackfin/configs/BF527-AD7160-EVAL_defconfig
index ad0881ba30af..d95658fc3127 100644
--- a/arch/blackfin/configs/BF527-AD7160-EVAL_defconfig
+++ b/arch/blackfin/configs/BF527-AD7160-EVAL_defconfig
@@ -68,7 +68,7 @@ CONFIG_I2C_ALGOBIT=y
68CONFIG_I2C_BLACKFIN_TWI=y 68CONFIG_I2C_BLACKFIN_TWI=y
69CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=400 69CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=400
70CONFIG_SPI=y 70CONFIG_SPI=y
71CONFIG_SPI_BFIN=y 71CONFIG_SPI_BFIN5XX=y
72CONFIG_GPIOLIB=y 72CONFIG_GPIOLIB=y
73CONFIG_GPIO_SYSFS=y 73CONFIG_GPIO_SYSFS=y
74# CONFIG_HWMON is not set 74# CONFIG_HWMON is not set
diff --git a/arch/blackfin/configs/BF527-EZKIT-V2_defconfig b/arch/blackfin/configs/BF527-EZKIT-V2_defconfig
index 8465b3e6b862..498f64a87050 100644
--- a/arch/blackfin/configs/BF527-EZKIT-V2_defconfig
+++ b/arch/blackfin/configs/BF527-EZKIT-V2_defconfig
@@ -105,7 +105,7 @@ CONFIG_I2C_CHARDEV=m
105CONFIG_I2C_BLACKFIN_TWI=y 105CONFIG_I2C_BLACKFIN_TWI=y
106CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=100 106CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=100
107CONFIG_SPI=y 107CONFIG_SPI=y
108CONFIG_SPI_BFIN=y 108CONFIG_SPI_BFIN5XX=y
109CONFIG_GPIOLIB=y 109CONFIG_GPIOLIB=y
110CONFIG_GPIO_SYSFS=y 110CONFIG_GPIO_SYSFS=y
111# CONFIG_HWMON is not set 111# CONFIG_HWMON is not set
diff --git a/arch/blackfin/configs/BF527-EZKIT_defconfig b/arch/blackfin/configs/BF527-EZKIT_defconfig
index 5e7321b26040..72e0317565ef 100644
--- a/arch/blackfin/configs/BF527-EZKIT_defconfig
+++ b/arch/blackfin/configs/BF527-EZKIT_defconfig
@@ -99,7 +99,7 @@ CONFIG_I2C_CHARDEV=m
99CONFIG_I2C_BLACKFIN_TWI=y 99CONFIG_I2C_BLACKFIN_TWI=y
100CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=100 100CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=100
101CONFIG_SPI=y 101CONFIG_SPI=y
102CONFIG_SPI_BFIN=y 102CONFIG_SPI_BFIN5XX=y
103CONFIG_GPIOLIB=y 103CONFIG_GPIOLIB=y
104CONFIG_GPIO_SYSFS=y 104CONFIG_GPIO_SYSFS=y
105# CONFIG_HWMON is not set 105# CONFIG_HWMON is not set
diff --git a/arch/blackfin/configs/BF533-EZKIT_defconfig b/arch/blackfin/configs/BF533-EZKIT_defconfig
index a7eb54bf3089..2f075e0b2624 100644
--- a/arch/blackfin/configs/BF533-EZKIT_defconfig
+++ b/arch/blackfin/configs/BF533-EZKIT_defconfig
@@ -81,7 +81,7 @@ CONFIG_SERIAL_BFIN_CONSOLE=y
81# CONFIG_LEGACY_PTYS is not set 81# CONFIG_LEGACY_PTYS is not set
82# CONFIG_HW_RANDOM is not set 82# CONFIG_HW_RANDOM is not set
83CONFIG_SPI=y 83CONFIG_SPI=y
84CONFIG_SPI_BFIN=y 84CONFIG_SPI_BFIN5XX=y
85CONFIG_GPIOLIB=y 85CONFIG_GPIOLIB=y
86CONFIG_GPIO_SYSFS=y 86CONFIG_GPIO_SYSFS=y
87# CONFIG_HWMON is not set 87# CONFIG_HWMON is not set
diff --git a/arch/blackfin/configs/BF533-STAMP_defconfig b/arch/blackfin/configs/BF533-STAMP_defconfig
index b90d3792ed52..ab38a82597b2 100644
--- a/arch/blackfin/configs/BF533-STAMP_defconfig
+++ b/arch/blackfin/configs/BF533-STAMP_defconfig
@@ -84,7 +84,7 @@ CONFIG_I2C=m
84CONFIG_I2C_CHARDEV=m 84CONFIG_I2C_CHARDEV=m
85CONFIG_I2C_GPIO=m 85CONFIG_I2C_GPIO=m
86CONFIG_SPI=y 86CONFIG_SPI=y
87CONFIG_SPI_BFIN=y 87CONFIG_SPI_BFIN5XX=y
88CONFIG_GPIOLIB=y 88CONFIG_GPIOLIB=y
89CONFIG_GPIO_SYSFS=y 89CONFIG_GPIO_SYSFS=y
90# CONFIG_HWMON is not set 90# CONFIG_HWMON is not set
diff --git a/arch/blackfin/configs/BF537-STAMP_defconfig b/arch/blackfin/configs/BF537-STAMP_defconfig
index 005362537a7b..5c802d6bbbc0 100644
--- a/arch/blackfin/configs/BF537-STAMP_defconfig
+++ b/arch/blackfin/configs/BF537-STAMP_defconfig
@@ -94,7 +94,7 @@ CONFIG_I2C_CHARDEV=m
94CONFIG_I2C_BLACKFIN_TWI=m 94CONFIG_I2C_BLACKFIN_TWI=m
95CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=100 95CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=100
96CONFIG_SPI=y 96CONFIG_SPI=y
97CONFIG_SPI_BFIN=y 97CONFIG_SPI_BFIN5XX=y
98CONFIG_GPIOLIB=y 98CONFIG_GPIOLIB=y
99CONFIG_GPIO_SYSFS=y 99CONFIG_GPIO_SYSFS=y
100# CONFIG_HWMON is not set 100# CONFIG_HWMON is not set
diff --git a/arch/blackfin/configs/BF538-EZKIT_defconfig b/arch/blackfin/configs/BF538-EZKIT_defconfig
index 580bf4296a14..972aa6263ad0 100644
--- a/arch/blackfin/configs/BF538-EZKIT_defconfig
+++ b/arch/blackfin/configs/BF538-EZKIT_defconfig
@@ -101,7 +101,7 @@ CONFIG_I2C=m
101CONFIG_I2C_BLACKFIN_TWI=m 101CONFIG_I2C_BLACKFIN_TWI=m
102CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=100 102CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=100
103CONFIG_SPI=y 103CONFIG_SPI=y
104CONFIG_SPI_BFIN=y 104CONFIG_SPI_BFIN5XX=y
105CONFIG_GPIOLIB=y 105CONFIG_GPIOLIB=y
106CONFIG_GPIO_SYSFS=y 106CONFIG_GPIO_SYSFS=y
107# CONFIG_HWMON is not set 107# CONFIG_HWMON is not set
diff --git a/arch/blackfin/configs/BF548-EZKIT_defconfig b/arch/blackfin/configs/BF548-EZKIT_defconfig
index 0e6d841b5d01..7a1e3bf2b04f 100644
--- a/arch/blackfin/configs/BF548-EZKIT_defconfig
+++ b/arch/blackfin/configs/BF548-EZKIT_defconfig
@@ -113,7 +113,7 @@ CONFIG_I2C_CHARDEV=y
113CONFIG_I2C_BLACKFIN_TWI=y 113CONFIG_I2C_BLACKFIN_TWI=y
114CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=100 114CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=100
115CONFIG_SPI=y 115CONFIG_SPI=y
116CONFIG_SPI_BFIN=y 116CONFIG_SPI_BFIN5XX=y
117CONFIG_GPIOLIB=y 117CONFIG_GPIOLIB=y
118CONFIG_GPIO_SYSFS=y 118CONFIG_GPIO_SYSFS=y
119# CONFIG_HWMON is not set 119# CONFIG_HWMON is not set
diff --git a/arch/blackfin/configs/BF561-ACVILON_defconfig b/arch/blackfin/configs/BF561-ACVILON_defconfig
index 77a27e31d6d1..0fdc4ecaa531 100644
--- a/arch/blackfin/configs/BF561-ACVILON_defconfig
+++ b/arch/blackfin/configs/BF561-ACVILON_defconfig
@@ -85,7 +85,7 @@ CONFIG_I2C=y
85CONFIG_I2C_CHARDEV=y 85CONFIG_I2C_CHARDEV=y
86CONFIG_I2C_PCA_PLATFORM=y 86CONFIG_I2C_PCA_PLATFORM=y
87CONFIG_SPI=y 87CONFIG_SPI=y
88CONFIG_SPI_BFIN=y 88CONFIG_SPI_BFIN5XX=y
89CONFIG_SPI_SPIDEV=y 89CONFIG_SPI_SPIDEV=y
90CONFIG_GPIOLIB=y 90CONFIG_GPIOLIB=y
91CONFIG_GPIO_SYSFS=y 91CONFIG_GPIO_SYSFS=y
diff --git a/arch/blackfin/configs/BF561-EZKIT-SMP_defconfig b/arch/blackfin/configs/BF561-EZKIT-SMP_defconfig
index f5ed34e12e0c..78adbbf39826 100644
--- a/arch/blackfin/configs/BF561-EZKIT-SMP_defconfig
+++ b/arch/blackfin/configs/BF561-EZKIT-SMP_defconfig
@@ -84,7 +84,7 @@ CONFIG_SERIAL_BFIN_CONSOLE=y
84# CONFIG_LEGACY_PTYS is not set 84# CONFIG_LEGACY_PTYS is not set
85# CONFIG_HW_RANDOM is not set 85# CONFIG_HW_RANDOM is not set
86CONFIG_SPI=y 86CONFIG_SPI=y
87CONFIG_SPI_BFIN=y 87CONFIG_SPI_BFIN5XX=y
88CONFIG_GPIOLIB=y 88CONFIG_GPIOLIB=y
89CONFIG_GPIO_SYSFS=y 89CONFIG_GPIO_SYSFS=y
90# CONFIG_HWMON is not set 90# CONFIG_HWMON is not set
diff --git a/arch/blackfin/configs/BF561-EZKIT_defconfig b/arch/blackfin/configs/BF561-EZKIT_defconfig
index d7ff2aee3fbc..d3cd0f561c84 100644
--- a/arch/blackfin/configs/BF561-EZKIT_defconfig
+++ b/arch/blackfin/configs/BF561-EZKIT_defconfig
@@ -86,7 +86,7 @@ CONFIG_SERIAL_BFIN_CONSOLE=y
86# CONFIG_LEGACY_PTYS is not set 86# CONFIG_LEGACY_PTYS is not set
87# CONFIG_HW_RANDOM is not set 87# CONFIG_HW_RANDOM is not set
88CONFIG_SPI=y 88CONFIG_SPI=y
89CONFIG_SPI_BFIN=y 89CONFIG_SPI_BFIN5XX=y
90CONFIG_GPIOLIB=y 90CONFIG_GPIOLIB=y
91CONFIG_GPIO_SYSFS=y 91CONFIG_GPIO_SYSFS=y
92# CONFIG_HWMON is not set 92# CONFIG_HWMON is not set
diff --git a/arch/blackfin/configs/BlackStamp_defconfig b/arch/blackfin/configs/BlackStamp_defconfig
index 85014319672c..7b982d0502ad 100644
--- a/arch/blackfin/configs/BlackStamp_defconfig
+++ b/arch/blackfin/configs/BlackStamp_defconfig
@@ -80,7 +80,7 @@ CONFIG_I2C=m
80CONFIG_I2C_CHARDEV=m 80CONFIG_I2C_CHARDEV=m
81CONFIG_I2C_GPIO=m 81CONFIG_I2C_GPIO=m
82CONFIG_SPI=y 82CONFIG_SPI=y
83CONFIG_SPI_BFIN=y 83CONFIG_SPI_BFIN5XX=y
84CONFIG_SPI_SPIDEV=m 84CONFIG_SPI_SPIDEV=m
85# CONFIG_HWMON is not set 85# CONFIG_HWMON is not set
86CONFIG_WATCHDOG=y 86CONFIG_WATCHDOG=y
diff --git a/arch/blackfin/configs/CM-BF527_defconfig b/arch/blackfin/configs/CM-BF527_defconfig
index dbf750cd2db8..c280a50e7943 100644
--- a/arch/blackfin/configs/CM-BF527_defconfig
+++ b/arch/blackfin/configs/CM-BF527_defconfig
@@ -88,7 +88,7 @@ CONFIG_I2C_CHARDEV=m
88CONFIG_I2C_BLACKFIN_TWI=m 88CONFIG_I2C_BLACKFIN_TWI=m
89CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=100 89CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=100
90CONFIG_SPI=y 90CONFIG_SPI=y
91CONFIG_SPI_BFIN=y 91CONFIG_SPI_BFIN5XX=y
92CONFIG_GPIOLIB=y 92CONFIG_GPIOLIB=y
93CONFIG_GPIO_SYSFS=y 93CONFIG_GPIO_SYSFS=y
94CONFIG_WATCHDOG=y 94CONFIG_WATCHDOG=y
diff --git a/arch/blackfin/configs/CM-BF533_defconfig b/arch/blackfin/configs/CM-BF533_defconfig
index 07ffbdae34ee..c940a1e3ab36 100644
--- a/arch/blackfin/configs/CM-BF533_defconfig
+++ b/arch/blackfin/configs/CM-BF533_defconfig
@@ -57,7 +57,7 @@ CONFIG_SERIAL_BFIN_CONSOLE=y
57# CONFIG_LEGACY_PTYS is not set 57# CONFIG_LEGACY_PTYS is not set
58# CONFIG_HW_RANDOM is not set 58# CONFIG_HW_RANDOM is not set
59CONFIG_SPI=y 59CONFIG_SPI=y
60CONFIG_SPI_BFIN=y 60CONFIG_SPI_BFIN5XX=y
61# CONFIG_HWMON is not set 61# CONFIG_HWMON is not set
62# CONFIG_USB_SUPPORT is not set 62# CONFIG_USB_SUPPORT is not set
63CONFIG_MMC=y 63CONFIG_MMC=y
diff --git a/arch/blackfin/configs/CM-BF537E_defconfig b/arch/blackfin/configs/CM-BF537E_defconfig
index 707cbf8a2590..2e47df77490f 100644
--- a/arch/blackfin/configs/CM-BF537E_defconfig
+++ b/arch/blackfin/configs/CM-BF537E_defconfig
@@ -78,7 +78,7 @@ CONFIG_SERIAL_BFIN_UART1=y
78# CONFIG_LEGACY_PTYS is not set 78# CONFIG_LEGACY_PTYS is not set
79# CONFIG_HW_RANDOM is not set 79# CONFIG_HW_RANDOM is not set
80CONFIG_SPI=y 80CONFIG_SPI=y
81CONFIG_SPI_BFIN=y 81CONFIG_SPI_BFIN5XX=y
82CONFIG_GPIOLIB=y 82CONFIG_GPIOLIB=y
83CONFIG_GPIO_SYSFS=y 83CONFIG_GPIO_SYSFS=y
84CONFIG_USB_GADGET=m 84CONFIG_USB_GADGET=m
diff --git a/arch/blackfin/configs/CM-BF537U_defconfig b/arch/blackfin/configs/CM-BF537U_defconfig
index 4596935eadac..6da629ffc2f1 100644
--- a/arch/blackfin/configs/CM-BF537U_defconfig
+++ b/arch/blackfin/configs/CM-BF537U_defconfig
@@ -72,7 +72,7 @@ CONFIG_SERIAL_BFIN_UART1=y
72# CONFIG_LEGACY_PTYS is not set 72# CONFIG_LEGACY_PTYS is not set
73# CONFIG_HW_RANDOM is not set 73# CONFIG_HW_RANDOM is not set
74CONFIG_SPI=y 74CONFIG_SPI=y
75CONFIG_SPI_BFIN=y 75CONFIG_SPI_BFIN5XX=y
76CONFIG_GPIOLIB=y 76CONFIG_GPIOLIB=y
77CONFIG_GPIO_SYSFS=y 77CONFIG_GPIO_SYSFS=y
78CONFIG_USB_GADGET=y 78CONFIG_USB_GADGET=y
diff --git a/arch/blackfin/configs/CM-BF548_defconfig b/arch/blackfin/configs/CM-BF548_defconfig
index 9f1d08401fca..349922be01f3 100644
--- a/arch/blackfin/configs/CM-BF548_defconfig
+++ b/arch/blackfin/configs/CM-BF548_defconfig
@@ -89,7 +89,7 @@ CONFIG_I2C=y
89CONFIG_I2C_CHARDEV=y 89CONFIG_I2C_CHARDEV=y
90CONFIG_I2C_BLACKFIN_TWI=y 90CONFIG_I2C_BLACKFIN_TWI=y
91CONFIG_SPI=y 91CONFIG_SPI=y
92CONFIG_SPI_BFIN=y 92CONFIG_SPI_BFIN5XX=y
93# CONFIG_HWMON is not set 93# CONFIG_HWMON is not set
94CONFIG_WATCHDOG=y 94CONFIG_WATCHDOG=y
95CONFIG_BFIN_WDT=y 95CONFIG_BFIN_WDT=y
diff --git a/arch/blackfin/configs/CM-BF561_defconfig b/arch/blackfin/configs/CM-BF561_defconfig
index 6c7b21585a43..0456deaa2d6f 100644
--- a/arch/blackfin/configs/CM-BF561_defconfig
+++ b/arch/blackfin/configs/CM-BF561_defconfig
@@ -78,7 +78,7 @@ CONFIG_SERIAL_BFIN_CONSOLE=y
78# CONFIG_LEGACY_PTYS is not set 78# CONFIG_LEGACY_PTYS is not set
79# CONFIG_HW_RANDOM is not set 79# CONFIG_HW_RANDOM is not set
80CONFIG_SPI=y 80CONFIG_SPI=y
81CONFIG_SPI_BFIN=y 81CONFIG_SPI_BFIN5XX=y
82CONFIG_GPIOLIB=y 82CONFIG_GPIOLIB=y
83CONFIG_GPIO_SYSFS=y 83CONFIG_GPIO_SYSFS=y
84CONFIG_USB_GADGET=m 84CONFIG_USB_GADGET=m
diff --git a/arch/blackfin/configs/DNP5370_defconfig b/arch/blackfin/configs/DNP5370_defconfig
index b192acfae386..89162d0fff9e 100644
--- a/arch/blackfin/configs/DNP5370_defconfig
+++ b/arch/blackfin/configs/DNP5370_defconfig
@@ -78,7 +78,7 @@ CONFIG_I2C=y
78CONFIG_I2C_CHARDEV=y 78CONFIG_I2C_CHARDEV=y
79CONFIG_I2C_BLACKFIN_TWI=y 79CONFIG_I2C_BLACKFIN_TWI=y
80CONFIG_SPI=y 80CONFIG_SPI=y
81CONFIG_SPI_BFIN=y 81CONFIG_SPI_BFIN5XX=y
82CONFIG_SPI_SPIDEV=y 82CONFIG_SPI_SPIDEV=y
83CONFIG_GPIOLIB=y 83CONFIG_GPIOLIB=y
84CONFIG_GPIO_SYSFS=y 84CONFIG_GPIO_SYSFS=y
diff --git a/arch/blackfin/configs/H8606_defconfig b/arch/blackfin/configs/H8606_defconfig
index 06e9f497faed..a26436bf50ff 100644
--- a/arch/blackfin/configs/H8606_defconfig
+++ b/arch/blackfin/configs/H8606_defconfig
@@ -68,7 +68,7 @@ CONFIG_SERIAL_BFIN_CONSOLE=y
68# CONFIG_LEGACY_PTYS is not set 68# CONFIG_LEGACY_PTYS is not set
69# CONFIG_HW_RANDOM is not set 69# CONFIG_HW_RANDOM is not set
70CONFIG_SPI=y 70CONFIG_SPI=y
71CONFIG_SPI_BFIN=y 71CONFIG_SPI_BFIN5XX=y
72CONFIG_SPI_SPIDEV=y 72CONFIG_SPI_SPIDEV=y
73CONFIG_WATCHDOG=y 73CONFIG_WATCHDOG=y
74CONFIG_SOUND=m 74CONFIG_SOUND=m
diff --git a/arch/blackfin/configs/IP0X_defconfig b/arch/blackfin/configs/IP0X_defconfig
index 5e797cf72043..647991514ac9 100644
--- a/arch/blackfin/configs/IP0X_defconfig
+++ b/arch/blackfin/configs/IP0X_defconfig
@@ -70,7 +70,7 @@ CONFIG_SERIAL_BFIN_CONSOLE=y
70# CONFIG_LEGACY_PTYS is not set 70# CONFIG_LEGACY_PTYS is not set
71CONFIG_HW_RANDOM=y 71CONFIG_HW_RANDOM=y
72CONFIG_SPI=y 72CONFIG_SPI=y
73CONFIG_SPI_BFIN=y 73CONFIG_SPI_BFIN5XX=y
74# CONFIG_HWMON is not set 74# CONFIG_HWMON is not set
75CONFIG_WATCHDOG=y 75CONFIG_WATCHDOG=y
76CONFIG_USB=y 76CONFIG_USB=y
diff --git a/arch/blackfin/configs/PNAV-10_defconfig b/arch/blackfin/configs/PNAV-10_defconfig
index a566a2fe6b9b..8fd9b446d658 100644
--- a/arch/blackfin/configs/PNAV-10_defconfig
+++ b/arch/blackfin/configs/PNAV-10_defconfig
@@ -84,7 +84,7 @@ CONFIG_I2C_CHARDEV=y
84CONFIG_I2C_BLACKFIN_TWI=y 84CONFIG_I2C_BLACKFIN_TWI=y
85CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=100 85CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=100
86CONFIG_SPI=y 86CONFIG_SPI=y
87CONFIG_SPI_BFIN=y 87CONFIG_SPI_BFIN5XX=y
88CONFIG_FB=y 88CONFIG_FB=y
89CONFIG_FIRMWARE_EDID=y 89CONFIG_FIRMWARE_EDID=y
90CONFIG_BACKLIGHT_LCD_SUPPORT=y 90CONFIG_BACKLIGHT_LCD_SUPPORT=y
diff --git a/arch/blackfin/configs/SRV1_defconfig b/arch/blackfin/configs/SRV1_defconfig
index 12e66cd7cdaa..0520c160230d 100644
--- a/arch/blackfin/configs/SRV1_defconfig
+++ b/arch/blackfin/configs/SRV1_defconfig
@@ -71,7 +71,7 @@ CONFIG_I2C_CHARDEV=y
71CONFIG_I2C_BLACKFIN_TWI=y 71CONFIG_I2C_BLACKFIN_TWI=y
72CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=100 72CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=100
73CONFIG_SPI=y 73CONFIG_SPI=y
74CONFIG_SPI_BFIN=y 74CONFIG_SPI_BFIN5XX=y
75CONFIG_HWMON=m 75CONFIG_HWMON=m
76CONFIG_WATCHDOG=y 76CONFIG_WATCHDOG=y
77CONFIG_BFIN_WDT=y 77CONFIG_BFIN_WDT=y
diff --git a/arch/blackfin/configs/TCM-BF518_defconfig b/arch/blackfin/configs/TCM-BF518_defconfig
index d496ae9a39b0..e4ed865b885e 100644
--- a/arch/blackfin/configs/TCM-BF518_defconfig
+++ b/arch/blackfin/configs/TCM-BF518_defconfig
@@ -92,7 +92,7 @@ CONFIG_I2C_CHARDEV=y
92CONFIG_I2C_BLACKFIN_TWI=y 92CONFIG_I2C_BLACKFIN_TWI=y
93CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=100 93CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=100
94CONFIG_SPI=y 94CONFIG_SPI=y
95CONFIG_SPI_BFIN=y 95CONFIG_SPI_BFIN5XX=y
96CONFIG_GPIOLIB=y 96CONFIG_GPIOLIB=y
97CONFIG_GPIO_SYSFS=y 97CONFIG_GPIO_SYSFS=y
98# CONFIG_HWMON is not set 98# CONFIG_HWMON is not set
diff --git a/arch/blackfin/configs/TCM-BF537_defconfig b/arch/blackfin/configs/TCM-BF537_defconfig
index 65f642167a50..c1f45f15295c 100644
--- a/arch/blackfin/configs/TCM-BF537_defconfig
+++ b/arch/blackfin/configs/TCM-BF537_defconfig
@@ -70,7 +70,7 @@ CONFIG_SERIAL_BFIN_UART1=y
70# CONFIG_LEGACY_PTYS is not set 70# CONFIG_LEGACY_PTYS is not set
71# CONFIG_HW_RANDOM is not set 71# CONFIG_HW_RANDOM is not set
72CONFIG_SPI=y 72CONFIG_SPI=y
73CONFIG_SPI_BFIN=y 73CONFIG_SPI_BFIN5XX=y
74# CONFIG_HWMON is not set 74# CONFIG_HWMON is not set
75CONFIG_WATCHDOG=y 75CONFIG_WATCHDOG=y
76CONFIG_BFIN_WDT=y 76CONFIG_BFIN_WDT=y
diff --git a/arch/blackfin/include/asm/bfin_serial.h b/arch/blackfin/include/asm/bfin_serial.h
index ecacdf34768b..68bcc3d119b6 100644
--- a/arch/blackfin/include/asm/bfin_serial.h
+++ b/arch/blackfin/include/asm/bfin_serial.h
@@ -51,9 +51,6 @@ struct bfin_serial_port {
51#elif ANOMALY_05000363 51#elif ANOMALY_05000363
52 unsigned int anomaly_threshold; 52 unsigned int anomaly_threshold;
53#endif 53#endif
54#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
55 int scts;
56#endif
57#if defined(CONFIG_SERIAL_BFIN_CTSRTS) || \ 54#if defined(CONFIG_SERIAL_BFIN_CTSRTS) || \
58 defined(CONFIG_SERIAL_BFIN_HARD_CTSRTS) 55 defined(CONFIG_SERIAL_BFIN_HARD_CTSRTS)
59 int cts_pin; 56 int cts_pin;
diff --git a/arch/blackfin/include/asm/cpu.h b/arch/blackfin/include/asm/cpu.h
index 05043786da21..e349631c8299 100644
--- a/arch/blackfin/include/asm/cpu.h
+++ b/arch/blackfin/include/asm/cpu.h
@@ -14,6 +14,9 @@ struct blackfin_cpudata {
14 struct cpu cpu; 14 struct cpu cpu;
15 unsigned int imemctl; 15 unsigned int imemctl;
16 unsigned int dmemctl; 16 unsigned int dmemctl;
17#ifdef CONFIG_SMP
18 struct task_struct *idle;
19#endif
17}; 20};
18 21
19DECLARE_PER_CPU(struct blackfin_cpudata, cpu_data); 22DECLARE_PER_CPU(struct blackfin_cpudata, cpu_data);
diff --git a/arch/blackfin/include/asm/smp.h b/arch/blackfin/include/asm/smp.h
index af6c0aa79bae..dc3d144b4bb5 100644
--- a/arch/blackfin/include/asm/smp.h
+++ b/arch/blackfin/include/asm/smp.h
@@ -37,7 +37,7 @@ extern unsigned long dcache_invld_count[NR_CPUS];
37#endif 37#endif
38 38
39void smp_icache_flush_range_others(unsigned long start, 39void smp_icache_flush_range_others(unsigned long start,
40 unsigned long end); 40 unsigned long end);
41#ifdef CONFIG_HOTPLUG_CPU 41#ifdef CONFIG_HOTPLUG_CPU
42void coreb_die(void); 42void coreb_die(void);
43void cpu_die(void); 43void cpu_die(void);
@@ -46,4 +46,7 @@ int __cpu_disable(void);
46int __cpu_die(unsigned int cpu); 46int __cpu_die(unsigned int cpu);
47#endif 47#endif
48 48
49void smp_timer_broadcast(const struct cpumask *mask);
50
51
49#endif /* !__ASM_BLACKFIN_SMP_H */ 52#endif /* !__ASM_BLACKFIN_SMP_H */
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c
index dfa2525a442d..d6102c86d037 100644
--- a/arch/blackfin/kernel/setup.c
+++ b/arch/blackfin/kernel/setup.c
@@ -828,10 +828,18 @@ static inline int __init get_mem_size(void)
828 u32 ddrctl = bfin_read_EBIU_DDRCTL1(); 828 u32 ddrctl = bfin_read_EBIU_DDRCTL1();
829 int ret = 0; 829 int ret = 0;
830 switch (ddrctl & 0xc0000) { 830 switch (ddrctl & 0xc0000) {
831 case DEVSZ_64: ret = 64 / 8; 831 case DEVSZ_64:
832 case DEVSZ_128: ret = 128 / 8; 832 ret = 64 / 8;
833 case DEVSZ_256: ret = 256 / 8; 833 break;
834 case DEVSZ_512: ret = 512 / 8; 834 case DEVSZ_128:
835 ret = 128 / 8;
836 break;
837 case DEVSZ_256:
838 ret = 256 / 8;
839 break;
840 case DEVSZ_512:
841 ret = 512 / 8;
842 break;
835 } 843 }
836 switch (ddrctl & 0x30000) { 844 switch (ddrctl & 0x30000) {
837 case DEVWD_4: ret *= 2; 845 case DEVWD_4: ret *= 2;
diff --git a/arch/blackfin/kernel/time-ts.c b/arch/blackfin/kernel/time-ts.c
index 1bcf3a3c57d8..d98f2d69b0c4 100644
--- a/arch/blackfin/kernel/time-ts.c
+++ b/arch/blackfin/kernel/time-ts.c
@@ -219,7 +219,7 @@ static void __init bfin_gptmr0_clockevent_init(struct clock_event_device *evt)
219 219
220#if defined(CONFIG_TICKSOURCE_CORETMR) 220#if defined(CONFIG_TICKSOURCE_CORETMR)
221/* per-cpu local core timer */ 221/* per-cpu local core timer */
222static DEFINE_PER_CPU(struct clock_event_device, coretmr_events); 222DEFINE_PER_CPU(struct clock_event_device, coretmr_events);
223 223
224static int bfin_coretmr_set_next_event(unsigned long cycles, 224static int bfin_coretmr_set_next_event(unsigned long cycles,
225 struct clock_event_device *evt) 225 struct clock_event_device *evt)
@@ -281,6 +281,7 @@ void bfin_coretmr_init(void)
281#ifdef CONFIG_CORE_TIMER_IRQ_L1 281#ifdef CONFIG_CORE_TIMER_IRQ_L1
282__attribute__((l1_text)) 282__attribute__((l1_text))
283#endif 283#endif
284
284irqreturn_t bfin_coretmr_interrupt(int irq, void *dev_id) 285irqreturn_t bfin_coretmr_interrupt(int irq, void *dev_id)
285{ 286{
286 int cpu = smp_processor_id(); 287 int cpu = smp_processor_id();
@@ -306,6 +307,11 @@ void bfin_coretmr_clockevent_init(void)
306 unsigned int cpu = smp_processor_id(); 307 unsigned int cpu = smp_processor_id();
307 struct clock_event_device *evt = &per_cpu(coretmr_events, cpu); 308 struct clock_event_device *evt = &per_cpu(coretmr_events, cpu);
308 309
310#ifdef CONFIG_SMP
311 evt->broadcast = smp_timer_broadcast;
312#endif
313
314
309 evt->name = "bfin_core_timer"; 315 evt->name = "bfin_core_timer";
310 evt->rating = 350; 316 evt->rating = 350;
311 evt->irq = -1; 317 evt->irq = -1;
diff --git a/arch/blackfin/mach-bf518/boards/ezbrd.c b/arch/blackfin/mach-bf518/boards/ezbrd.c
index d1c0c0cff3ef..a2d96d31bbf1 100644
--- a/arch/blackfin/mach-bf518/boards/ezbrd.c
+++ b/arch/blackfin/mach-bf518/boards/ezbrd.c
@@ -61,7 +61,7 @@ static struct physmap_flash_data ezbrd_flash_data = {
61 61
62static struct resource ezbrd_flash_resource = { 62static struct resource ezbrd_flash_resource = {
63 .start = 0x20000000, 63 .start = 0x20000000,
64#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 64#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
65 .end = 0x202fffff, 65 .end = 0x202fffff,
66#else 66#else
67 .end = 0x203fffff, 67 .end = 0x203fffff,
@@ -122,6 +122,8 @@ static struct bfin_mii_bus_platform_data bfin_mii_bus_data = {
122#if defined(CONFIG_NET_DSA_KSZ8893M) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE) 122#if defined(CONFIG_NET_DSA_KSZ8893M) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE)
123 .phy_mask = 0xfff7, /* Only probe the port phy connect to the on chip MAC */ 123 .phy_mask = 0xfff7, /* Only probe the port phy connect to the on chip MAC */
124#endif 124#endif
125 .vlan1_mask = 1,
126 .vlan2_mask = 2,
125}; 127};
126 128
127static struct platform_device bfin_mii_bus = { 129static struct platform_device bfin_mii_bus = {
@@ -292,7 +294,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
292}; 294};
293 295
294/* SPI controller data */ 296/* SPI controller data */
295#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 297#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
296/* SPI (0) */ 298/* SPI (0) */
297static struct bfin5xx_spi_master bfin_spi0_info = { 299static struct bfin5xx_spi_master bfin_spi0_info = {
298 .num_chipselect = 6, 300 .num_chipselect = 6,
@@ -715,7 +717,7 @@ static struct platform_device *stamp_devices[] __initdata = {
715#endif 717#endif
716#endif 718#endif
717 719
718#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 720#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
719 &bfin_spi0_device, 721 &bfin_spi0_device,
720 &bfin_spi1_device, 722 &bfin_spi1_device,
721#endif 723#endif
@@ -777,7 +779,7 @@ static int __init ezbrd_init(void)
777 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 779 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
778 /* setup BF518-EZBRD GPIO pin PG11 to AMS2, PG15 to AMS3. */ 780 /* setup BF518-EZBRD GPIO pin PG11 to AMS2, PG15 to AMS3. */
779 peripheral_request(P_AMS2, "ParaFlash"); 781 peripheral_request(P_AMS2, "ParaFlash");
780#if !defined(CONFIG_SPI_BFIN) && !defined(CONFIG_SPI_BFIN_MODULE) 782#if !defined(CONFIG_SPI_BFIN5XX) && !defined(CONFIG_SPI_BFIN5XX_MODULE)
781 peripheral_request(P_AMS3, "ParaFlash"); 783 peripheral_request(P_AMS3, "ParaFlash");
782#endif 784#endif
783 return 0; 785 return 0;
diff --git a/arch/blackfin/mach-bf518/boards/tcm-bf518.c b/arch/blackfin/mach-bf518/boards/tcm-bf518.c
index 5470bf89e52e..f271310f739d 100644
--- a/arch/blackfin/mach-bf518/boards/tcm-bf518.c
+++ b/arch/blackfin/mach-bf518/boards/tcm-bf518.c
@@ -228,7 +228,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
228}; 228};
229 229
230/* SPI controller data */ 230/* SPI controller data */
231#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 231#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
232/* SPI (0) */ 232/* SPI (0) */
233static struct bfin5xx_spi_master bfin_spi0_info = { 233static struct bfin5xx_spi_master bfin_spi0_info = {
234 .num_chipselect = 6, 234 .num_chipselect = 6,
@@ -635,7 +635,7 @@ static struct platform_device *tcm_devices[] __initdata = {
635 &bfin_mac_device, 635 &bfin_mac_device,
636#endif 636#endif
637 637
638#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 638#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
639 &bfin_spi0_device, 639 &bfin_spi0_device,
640 &bfin_spi1_device, 640 &bfin_spi1_device,
641#endif 641#endif
diff --git a/arch/blackfin/mach-bf527/boards/ad7160eval.c b/arch/blackfin/mach-bf527/boards/ad7160eval.c
index 5bc6938157ad..c8d5d2b7c732 100644
--- a/arch/blackfin/mach-bf527/boards/ad7160eval.c
+++ b/arch/blackfin/mach-bf527/boards/ad7160eval.c
@@ -334,7 +334,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
334#endif 334#endif
335}; 335};
336 336
337#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 337#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
338/* SPI controller data */ 338/* SPI controller data */
339static struct bfin5xx_spi_master bfin_spi0_info = { 339static struct bfin5xx_spi_master bfin_spi0_info = {
340 .num_chipselect = MAX_CTRL_CS + MAX_BLACKFIN_GPIOS, 340 .num_chipselect = MAX_CTRL_CS + MAX_BLACKFIN_GPIOS,
@@ -744,7 +744,7 @@ static struct platform_device *stamp_devices[] __initdata = {
744 &bfin_mac_device, 744 &bfin_mac_device,
745#endif 745#endif
746 746
747#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 747#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
748 &bfin_spi0_device, 748 &bfin_spi0_device,
749#endif 749#endif
750 750
diff --git a/arch/blackfin/mach-bf527/boards/cm_bf527.c b/arch/blackfin/mach-bf527/boards/cm_bf527.c
index cd289698b4dd..7330607856e9 100644
--- a/arch/blackfin/mach-bf527/boards/cm_bf527.c
+++ b/arch/blackfin/mach-bf527/boards/cm_bf527.c
@@ -444,7 +444,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
444#endif 444#endif
445}; 445};
446 446
447#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 447#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
448/* SPI controller data */ 448/* SPI controller data */
449static struct bfin5xx_spi_master bfin_spi0_info = { 449static struct bfin5xx_spi_master bfin_spi0_info = {
450 .num_chipselect = 8, 450 .num_chipselect = 8,
@@ -893,7 +893,7 @@ static struct platform_device *cmbf527_devices[] __initdata = {
893 &net2272_bfin_device, 893 &net2272_bfin_device,
894#endif 894#endif
895 895
896#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 896#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
897 &bfin_spi0_device, 897 &bfin_spi0_device,
898#endif 898#endif
899 899
diff --git a/arch/blackfin/mach-bf527/boards/ezbrd.c b/arch/blackfin/mach-bf527/boards/ezbrd.c
index 9f792eafd1cc..db3ecfce8306 100644
--- a/arch/blackfin/mach-bf527/boards/ezbrd.c
+++ b/arch/blackfin/mach-bf527/boards/ezbrd.c
@@ -371,7 +371,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
371#endif 371#endif
372}; 372};
373 373
374#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 374#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
375/* SPI controller data */ 375/* SPI controller data */
376static struct bfin5xx_spi_master bfin_spi0_info = { 376static struct bfin5xx_spi_master bfin_spi0_info = {
377 .num_chipselect = 8, 377 .num_chipselect = 8,
@@ -776,7 +776,7 @@ static struct platform_device *stamp_devices[] __initdata = {
776 &bfin_mac_device, 776 &bfin_mac_device,
777#endif 777#endif
778 778
779#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 779#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
780 &bfin_spi0_device, 780 &bfin_spi0_device,
781#endif 781#endif
782 782
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c
index 3ecafff5d2ef..dfdd8e6bac72 100644
--- a/arch/blackfin/mach-bf527/boards/ezkit.c
+++ b/arch/blackfin/mach-bf527/boards/ezkit.c
@@ -664,7 +664,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
664#endif 664#endif
665}; 665};
666 666
667#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 667#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
668/* SPI controller data */ 668/* SPI controller data */
669static struct bfin5xx_spi_master bfin_spi0_info = { 669static struct bfin5xx_spi_master bfin_spi0_info = {
670 .num_chipselect = 8, 670 .num_chipselect = 8,
@@ -1189,7 +1189,7 @@ static struct platform_device *stamp_devices[] __initdata = {
1189 &net2272_bfin_device, 1189 &net2272_bfin_device,
1190#endif 1190#endif
1191 1191
1192#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 1192#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
1193 &bfin_spi0_device, 1193 &bfin_spi0_device,
1194#endif 1194#endif
1195 1195
diff --git a/arch/blackfin/mach-bf527/boards/tll6527m.c b/arch/blackfin/mach-bf527/boards/tll6527m.c
index 3a92c4318d2d..360e97fc5293 100644
--- a/arch/blackfin/mach-bf527/boards/tll6527m.c
+++ b/arch/blackfin/mach-bf527/boards/tll6527m.c
@@ -448,7 +448,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
448#endif 448#endif
449}; 449};
450 450
451#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 451#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
452/* SPI controller data */ 452/* SPI controller data */
453static struct bfin5xx_spi_master bfin_spi0_info = { 453static struct bfin5xx_spi_master bfin_spi0_info = {
454 .num_chipselect = EXP_GPIO_SPISEL_BASE + 8 + MAX_CTRL_CS, 454 .num_chipselect = EXP_GPIO_SPISEL_BASE + 8 + MAX_CTRL_CS,
@@ -831,7 +831,7 @@ static struct platform_device *tll6527m_devices[] __initdata = {
831 &bfin_mac_device, 831 &bfin_mac_device,
832#endif 832#endif
833 833
834#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 834#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
835 &bfin_spi0_device, 835 &bfin_spi0_device,
836#endif 836#endif
837 837
diff --git a/arch/blackfin/mach-bf533/boards/H8606.c b/arch/blackfin/mach-bf533/boards/H8606.c
index 47cadd316e76..6cb7b3ed9b3d 100644
--- a/arch/blackfin/mach-bf533/boards/H8606.c
+++ b/arch/blackfin/mach-bf533/boards/H8606.c
@@ -125,7 +125,7 @@ static struct platform_device net2272_bfin_device = {
125}; 125};
126#endif 126#endif
127 127
128#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 128#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
129/* all SPI peripherals info goes here */ 129/* all SPI peripherals info goes here */
130 130
131#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 131#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
@@ -398,7 +398,7 @@ static struct platform_device *h8606_devices[] __initdata = {
398 &net2272_bfin_device, 398 &net2272_bfin_device,
399#endif 399#endif
400 400
401#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 401#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
402 &bfin_spi0_device, 402 &bfin_spi0_device,
403#endif 403#endif
404 404
@@ -428,7 +428,7 @@ static int __init H8606_init(void)
428 printk(KERN_INFO "HV Sistemas H8606 board support by http://www.hvsistemas.com\n"); 428 printk(KERN_INFO "HV Sistemas H8606 board support by http://www.hvsistemas.com\n");
429 printk(KERN_INFO "%s(): registering device resources\n", __func__); 429 printk(KERN_INFO "%s(): registering device resources\n", __func__);
430 platform_add_devices(h8606_devices, ARRAY_SIZE(h8606_devices)); 430 platform_add_devices(h8606_devices, ARRAY_SIZE(h8606_devices));
431#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 431#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
432 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 432 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
433#endif 433#endif
434 return 0; 434 return 0;
diff --git a/arch/blackfin/mach-bf533/boards/blackstamp.c b/arch/blackfin/mach-bf533/boards/blackstamp.c
index 18817d57c7a1..de44a3765e59 100644
--- a/arch/blackfin/mach-bf533/boards/blackstamp.c
+++ b/arch/blackfin/mach-bf533/boards/blackstamp.c
@@ -146,7 +146,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
146#endif 146#endif
147}; 147};
148 148
149#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 149#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
150/* SPI (0) */ 150/* SPI (0) */
151static struct resource bfin_spi0_resource[] = { 151static struct resource bfin_spi0_resource[] = {
152 [0] = { 152 [0] = {
@@ -422,7 +422,7 @@ static struct platform_device *stamp_devices[] __initdata = {
422#endif 422#endif
423 423
424 424
425#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 425#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
426 &bfin_spi0_device, 426 &bfin_spi0_device,
427#endif 427#endif
428 428
diff --git a/arch/blackfin/mach-bf533/boards/cm_bf533.c b/arch/blackfin/mach-bf533/boards/cm_bf533.c
index 2c8f30ef6a7b..fe47e048c4e6 100644
--- a/arch/blackfin/mach-bf533/boards/cm_bf533.c
+++ b/arch/blackfin/mach-bf533/boards/cm_bf533.c
@@ -29,7 +29,7 @@
29 */ 29 */
30const char bfin_board_name[] = "Bluetechnix CM BF533"; 30const char bfin_board_name[] = "Bluetechnix CM BF533";
31 31
32#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 32#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
33/* all SPI peripherals info goes here */ 33/* all SPI peripherals info goes here */
34#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 34#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
35static struct mtd_partition bfin_spi_flash_partitions[] = { 35static struct mtd_partition bfin_spi_flash_partitions[] = {
@@ -536,7 +536,7 @@ static struct platform_device *cm_bf533_devices[] __initdata = {
536 &net2272_bfin_device, 536 &net2272_bfin_device,
537#endif 537#endif
538 538
539#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 539#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
540 &bfin_spi0_device, 540 &bfin_spi0_device,
541#endif 541#endif
542 542
@@ -549,7 +549,7 @@ static int __init cm_bf533_init(void)
549{ 549{
550 printk(KERN_INFO "%s(): registering device resources\n", __func__); 550 printk(KERN_INFO "%s(): registering device resources\n", __func__);
551 platform_add_devices(cm_bf533_devices, ARRAY_SIZE(cm_bf533_devices)); 551 platform_add_devices(cm_bf533_devices, ARRAY_SIZE(cm_bf533_devices));
552#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 552#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
553 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 553 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
554#endif 554#endif
555 return 0; 555 return 0;
diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c
index 144556e14499..07811c209b9d 100644
--- a/arch/blackfin/mach-bf533/boards/ezkit.c
+++ b/arch/blackfin/mach-bf533/boards/ezkit.c
@@ -245,7 +245,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
245#endif 245#endif
246}; 246};
247 247
248#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 248#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
249/* SPI (0) */ 249/* SPI (0) */
250static struct resource bfin_spi0_resource[] = { 250static struct resource bfin_spi0_resource[] = {
251 [0] = { 251 [0] = {
@@ -484,7 +484,7 @@ static struct platform_device *ezkit_devices[] __initdata = {
484 &smc91x_device, 484 &smc91x_device,
485#endif 485#endif
486 486
487#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 487#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
488 &bfin_spi0_device, 488 &bfin_spi0_device,
489#endif 489#endif
490 490
diff --git a/arch/blackfin/mach-bf533/boards/ip0x.c b/arch/blackfin/mach-bf533/boards/ip0x.c
index b597d4e50d58..e303dae4e2d9 100644
--- a/arch/blackfin/mach-bf533/boards/ip0x.c
+++ b/arch/blackfin/mach-bf533/boards/ip0x.c
@@ -104,7 +104,7 @@ static struct platform_device dm9000_device2 = {
104#endif 104#endif
105 105
106 106
107#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 107#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
108/* all SPI peripherals info goes here */ 108/* all SPI peripherals info goes here */
109 109
110#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 110#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
@@ -270,7 +270,7 @@ static struct platform_device *ip0x_devices[] __initdata = {
270#endif 270#endif
271#endif 271#endif
272 272
273#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 273#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
274 &spi_bfin_master_device, 274 &spi_bfin_master_device,
275#endif 275#endif
276 276
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c
index 2afd02e14bd1..ce88a7165b62 100644
--- a/arch/blackfin/mach-bf533/boards/stamp.c
+++ b/arch/blackfin/mach-bf533/boards/stamp.c
@@ -219,9 +219,10 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
219 }, 219 },
220#endif 220#endif
221 221
222#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 222#if defined(CONFIG_SND_BF5XX_SOC_AD1836) || \
223 defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
223 { 224 {
224 .modalias = "ad183x", 225 .modalias = "ad1836",
225 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 226 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
226 .bus_num = 0, 227 .bus_num = 0,
227 .chip_select = 4, 228 .chip_select = 4,
@@ -251,7 +252,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
251#endif 252#endif
252}; 253};
253 254
254#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 255#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
255/* SPI (0) */ 256/* SPI (0) */
256static struct resource bfin_spi0_resource[] = { 257static struct resource bfin_spi0_resource[] = {
257 [0] = { 258 [0] = {
@@ -471,7 +472,7 @@ static struct i2c_gpio_platform_data i2c_gpio_data = {
471 .scl_pin = GPIO_PF3, 472 .scl_pin = GPIO_PF3,
472 .sda_is_open_drain = 0, 473 .sda_is_open_drain = 0,
473 .scl_is_open_drain = 0, 474 .scl_is_open_drain = 0,
474 .udelay = 40, 475 .udelay = 10,
475}; 476};
476 477
477static struct platform_device i2c_gpio_device = { 478static struct platform_device i2c_gpio_device = {
@@ -540,27 +541,150 @@ static struct platform_device bfin_dpmc = {
540 }, 541 },
541}; 542};
542 543
544#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \
545 defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) \
546 || defined(CONFIG_SND_BF5XX_AC97) || \
547 defined(CONFIG_SND_BF5XX_AC97_MODULE)
548
549#include <asm/bfin_sport.h>
550
551#define SPORT_REQ(x) \
552 [x] = {P_SPORT##x##_TFS, P_SPORT##x##_DTPRI, P_SPORT##x##_TSCLK, \
553 P_SPORT##x##_RFS, P_SPORT##x##_DRPRI, P_SPORT##x##_RSCLK, 0}
554
555static const u16 bfin_snd_pin[][7] = {
556 SPORT_REQ(0),
557 SPORT_REQ(1),
558};
559
560static struct bfin_snd_platform_data bfin_snd_data[] = {
561 {
562 .pin_req = &bfin_snd_pin[0][0],
563 },
564 {
565 .pin_req = &bfin_snd_pin[1][0],
566 },
567};
568
569#define BFIN_SND_RES(x) \
570 [x] = { \
571 { \
572 .start = SPORT##x##_TCR1, \
573 .end = SPORT##x##_TCR1, \
574 .flags = IORESOURCE_MEM \
575 }, \
576 { \
577 .start = CH_SPORT##x##_RX, \
578 .end = CH_SPORT##x##_RX, \
579 .flags = IORESOURCE_DMA, \
580 }, \
581 { \
582 .start = CH_SPORT##x##_TX, \
583 .end = CH_SPORT##x##_TX, \
584 .flags = IORESOURCE_DMA, \
585 }, \
586 { \
587 .start = IRQ_SPORT##x##_ERROR, \
588 .end = IRQ_SPORT##x##_ERROR, \
589 .flags = IORESOURCE_IRQ, \
590 } \
591 }
592
593static struct resource bfin_snd_resources[][4] = {
594 BFIN_SND_RES(0),
595 BFIN_SND_RES(1),
596};
597#endif
598
543#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 599#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
600static struct platform_device bfin_i2s_pcm = {
601 .name = "bfin-i2s-pcm-audio",
602 .id = -1,
603};
604#endif
605
606#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE)
607static struct platform_device bfin_tdm_pcm = {
608 .name = "bfin-tdm-pcm-audio",
609 .id = -1,
610};
611#endif
612
613#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE)
614static struct platform_device bfin_ac97_pcm = {
615 .name = "bfin-ac97-pcm-audio",
616 .id = -1,
617};
618#endif
619
620#if defined(CONFIG_SND_BF5XX_SOC_AD73311) || \
621 defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE)
622static const unsigned ad73311_gpio[] = {
623 GPIO_PF4,
624};
625
626static struct platform_device bfin_ad73311_machine = {
627 .name = "bfin-snd-ad73311",
628 .id = 1,
629 .dev = {
630 .platform_data = (void *)ad73311_gpio,
631 },
632};
633#endif
634
635#if defined(CONFIG_SND_SOC_AD73311) || defined(CONFIG_SND_SOC_AD73311_MODULE)
636static struct platform_device bfin_ad73311_codec_device = {
637 .name = "ad73311",
638 .id = -1,
639};
640#endif
641
642#if defined(CONFIG_SND_SOC_AD74111) || defined(CONFIG_SND_SOC_AD74111_MODULE)
643static struct platform_device bfin_ad74111_codec_device = {
644 .name = "ad74111",
645 .id = -1,
646};
647#endif
648
649#if defined(CONFIG_SND_BF5XX_SOC_I2S) || \
650 defined(CONFIG_SND_BF5XX_SOC_I2S_MODULE)
544static struct platform_device bfin_i2s = { 651static struct platform_device bfin_i2s = {
545 .name = "bfin-i2s", 652 .name = "bfin-i2s",
546 .id = CONFIG_SND_BF5XX_SPORT_NUM, 653 .id = CONFIG_SND_BF5XX_SPORT_NUM,
547 /* TODO: add platform data here */ 654 .num_resources =
655 ARRAY_SIZE(bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM]),
656 .resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM],
657 .dev = {
658 .platform_data = &bfin_snd_data[CONFIG_SND_BF5XX_SPORT_NUM],
659 },
548}; 660};
549#endif 661#endif
550 662
551#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) 663#if defined(CONFIG_SND_BF5XX_SOC_TDM) || \
664 defined(CONFIG_SND_BF5XX_SOC_TDM_MODULE)
552static struct platform_device bfin_tdm = { 665static struct platform_device bfin_tdm = {
553 .name = "bfin-tdm", 666 .name = "bfin-tdm",
554 .id = CONFIG_SND_BF5XX_SPORT_NUM, 667 .id = CONFIG_SND_BF5XX_SPORT_NUM,
555 /* TODO: add platform data here */ 668 .num_resources =
669 ARRAY_SIZE(bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM]),
670 .resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM],
671 .dev = {
672 .platform_data = &bfin_snd_data[CONFIG_SND_BF5XX_SPORT_NUM],
673 },
556}; 674};
557#endif 675#endif
558 676
559#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 677#if defined(CONFIG_SND_BF5XX_SOC_AC97) || \
678 defined(CONFIG_SND_BF5XX_SOC_AC97_MODULE)
560static struct platform_device bfin_ac97 = { 679static struct platform_device bfin_ac97 = {
561 .name = "bfin-ac97", 680 .name = "bfin-ac97",
562 .id = CONFIG_SND_BF5XX_SPORT_NUM, 681 .id = CONFIG_SND_BF5XX_SPORT_NUM,
563 /* TODO: add platform data here */ 682 .num_resources =
683 ARRAY_SIZE(bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM]),
684 .resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM],
685 .dev = {
686 .platform_data = &bfin_snd_data[CONFIG_SND_BF5XX_SPORT_NUM],
687 },
564}; 688};
565#endif 689#endif
566 690
@@ -580,7 +704,7 @@ static struct platform_device *stamp_devices[] __initdata = {
580 &net2272_bfin_device, 704 &net2272_bfin_device,
581#endif 705#endif
582 706
583#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 707#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
584 &bfin_spi0_device, 708 &bfin_spi0_device,
585#endif 709#endif
586 710
@@ -596,7 +720,8 @@ static struct platform_device *stamp_devices[] __initdata = {
596#endif 720#endif
597#endif 721#endif
598 722
599#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 723#if defined(CONFIG_SERIAL_BFIN_SPORT) || \
724 defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
600#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART 725#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
601 &bfin_sport0_uart_device, 726 &bfin_sport0_uart_device,
602#endif 727#endif
@@ -618,14 +743,42 @@ static struct platform_device *stamp_devices[] __initdata = {
618#endif 743#endif
619 744
620#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 745#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
621 &bfin_i2s, 746 &bfin_i2s_pcm,
622#endif 747#endif
623 748
624#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) 749#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE)
625 &bfin_tdm, 750 &bfin_tdm_pcm,
626#endif 751#endif
627 752
628#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE) 753#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE)
754 &bfin_ac97_pcm,
755#endif
756
757#if defined(CONFIG_SND_BF5XX_SOC_AD73311) || \
758 defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE)
759 &bfin_ad73311_machine,
760#endif
761
762#if defined(CONFIG_SND_SOC_AD73311) || defined(CONFIG_SND_SOC_AD73311_MODULE)
763 &bfin_ad73311_codec_device,
764#endif
765
766#if defined(CONFIG_SND_SOC_AD74111) || defined(CONFIG_SND_SOC_AD74111_MODULE)
767 &bfin_ad74111_codec_device,
768#endif
769
770#if defined(CONFIG_SND_BF5XX_SOC_I2S) || \
771 defined(CONFIG_SND_BF5XX_SOC_I2S_MODULE)
772 &bfin_i2s,
773#endif
774
775#if defined(CONFIG_SND_BF5XX_SOC_TDM) || \
776 defined(CONFIG_SND_BF5XX_SOC_TDM_MODULE)
777 &bfin_tdm,
778#endif
779
780#if defined(CONFIG_SND_BF5XX_SOC_AC97) || \
781 defined(CONFIG_SND_BF5XX_SOC_AC97_MODULE)
629 &bfin_ac97, 782 &bfin_ac97,
630#endif 783#endif
631}; 784};
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537e.c b/arch/blackfin/mach-bf537/boards/cm_bf537e.c
index 604a430038e1..0d4a2f61a973 100644
--- a/arch/blackfin/mach-bf537/boards/cm_bf537e.c
+++ b/arch/blackfin/mach-bf537/boards/cm_bf537e.c
@@ -31,7 +31,7 @@
31 */ 31 */
32const char bfin_board_name[] = "Bluetechnix CM BF537E"; 32const char bfin_board_name[] = "Bluetechnix CM BF537E";
33 33
34#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 34#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
35/* all SPI peripherals info goes here */ 35/* all SPI peripherals info goes here */
36 36
37#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 37#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
@@ -735,7 +735,7 @@ static struct platform_device *cm_bf537e_devices[] __initdata = {
735 &net2272_bfin_device, 735 &net2272_bfin_device,
736#endif 736#endif
737 737
738#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 738#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
739 &bfin_spi0_device, 739 &bfin_spi0_device,
740#endif 740#endif
741 741
@@ -770,7 +770,7 @@ static int __init cm_bf537e_init(void)
770{ 770{
771 printk(KERN_INFO "%s(): registering device resources\n", __func__); 771 printk(KERN_INFO "%s(): registering device resources\n", __func__);
772 platform_add_devices(cm_bf537e_devices, ARRAY_SIZE(cm_bf537e_devices)); 772 platform_add_devices(cm_bf537e_devices, ARRAY_SIZE(cm_bf537e_devices));
773#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 773#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
774 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 774 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
775#endif 775#endif
776 776
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537u.c b/arch/blackfin/mach-bf537/boards/cm_bf537u.c
index d916b46a44fe..f5536982706c 100644
--- a/arch/blackfin/mach-bf537/boards/cm_bf537u.c
+++ b/arch/blackfin/mach-bf537/boards/cm_bf537u.c
@@ -32,7 +32,7 @@
32 */ 32 */
33const char bfin_board_name[] = "Bluetechnix CM BF537U"; 33const char bfin_board_name[] = "Bluetechnix CM BF537U";
34 34
35#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 35#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
36/* all SPI peripherals info goes here */ 36/* all SPI peripherals info goes here */
37 37
38#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 38#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
@@ -700,7 +700,7 @@ static struct platform_device *cm_bf537u_devices[] __initdata = {
700 &net2272_bfin_device, 700 &net2272_bfin_device,
701#endif 701#endif
702 702
703#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 703#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
704 &bfin_spi0_device, 704 &bfin_spi0_device,
705#endif 705#endif
706 706
@@ -747,7 +747,7 @@ static int __init cm_bf537u_init(void)
747{ 747{
748 printk(KERN_INFO "%s(): registering device resources\n", __func__); 748 printk(KERN_INFO "%s(): registering device resources\n", __func__);
749 platform_add_devices(cm_bf537u_devices, ARRAY_SIZE(cm_bf537u_devices)); 749 platform_add_devices(cm_bf537u_devices, ARRAY_SIZE(cm_bf537u_devices));
750#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 750#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
751 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 751 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
752#endif 752#endif
753 753
diff --git a/arch/blackfin/mach-bf537/boards/dnp5370.c b/arch/blackfin/mach-bf537/boards/dnp5370.c
index 5f307228be63..11dadeb33d79 100644
--- a/arch/blackfin/mach-bf537/boards/dnp5370.c
+++ b/arch/blackfin/mach-bf537/boards/dnp5370.c
@@ -125,7 +125,7 @@ static struct platform_device asmb_flash_device = {
125}; 125};
126#endif 126#endif
127 127
128#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 128#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
129 129
130#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 130#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
131 131
@@ -370,7 +370,7 @@ static struct platform_device *dnp5370_devices[] __initdata = {
370 &bfin_mac_device, 370 &bfin_mac_device,
371#endif 371#endif
372 372
373#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 373#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
374 &spi_bfin_master_device, 374 &spi_bfin_master_device,
375#endif 375#endif
376 376
diff --git a/arch/blackfin/mach-bf537/boards/minotaur.c b/arch/blackfin/mach-bf537/boards/minotaur.c
index 3901dd093b90..d2d71282618f 100644
--- a/arch/blackfin/mach-bf537/boards/minotaur.c
+++ b/arch/blackfin/mach-bf537/boards/minotaur.c
@@ -121,7 +121,7 @@ static struct platform_device net2272_bfin_device = {
121}; 121};
122#endif 122#endif
123 123
124#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 124#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
125/* all SPI peripherals info goes here */ 125/* all SPI peripherals info goes here */
126 126
127#if defined(CONFIG_MTD_M25P80) \ 127#if defined(CONFIG_MTD_M25P80) \
@@ -496,7 +496,7 @@ static struct platform_device *minotaur_devices[] __initdata = {
496 &net2272_bfin_device, 496 &net2272_bfin_device,
497#endif 497#endif
498 498
499#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 499#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
500 &bfin_spi0_device, 500 &bfin_spi0_device,
501#endif 501#endif
502 502
@@ -537,7 +537,7 @@ static int __init minotaur_init(void)
537{ 537{
538 printk(KERN_INFO "%s(): registering device resources\n", __func__); 538 printk(KERN_INFO "%s(): registering device resources\n", __func__);
539 platform_add_devices(minotaur_devices, ARRAY_SIZE(minotaur_devices)); 539 platform_add_devices(minotaur_devices, ARRAY_SIZE(minotaur_devices));
540#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 540#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
541 spi_register_board_info(bfin_spi_board_info, 541 spi_register_board_info(bfin_spi_board_info,
542 ARRAY_SIZE(bfin_spi_board_info)); 542 ARRAY_SIZE(bfin_spi_board_info));
543#endif 543#endif
diff --git a/arch/blackfin/mach-bf537/boards/pnav10.c b/arch/blackfin/mach-bf537/boards/pnav10.c
index aebd31c845f0..6fd84709fc68 100644
--- a/arch/blackfin/mach-bf537/boards/pnav10.c
+++ b/arch/blackfin/mach-bf537/boards/pnav10.c
@@ -154,7 +154,7 @@ static struct platform_device net2272_bfin_device = {
154}; 154};
155#endif 155#endif
156 156
157#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 157#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
158/* all SPI peripherals info goes here */ 158/* all SPI peripherals info goes here */
159 159
160#if defined(CONFIG_MTD_M25P80) \ 160#if defined(CONFIG_MTD_M25P80) \
@@ -477,7 +477,7 @@ static struct platform_device *stamp_devices[] __initdata = {
477 &net2272_bfin_device, 477 &net2272_bfin_device,
478#endif 478#endif
479 479
480#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 480#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
481 &bfin_spi0_device, 481 &bfin_spi0_device,
482#endif 482#endif
483 483
@@ -508,7 +508,7 @@ static int __init pnav_init(void)
508{ 508{
509 printk(KERN_INFO "%s(): registering device resources\n", __func__); 509 printk(KERN_INFO "%s(): registering device resources\n", __func__);
510 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); 510 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
511#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 511#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
512 spi_register_board_info(bfin_spi_board_info, 512 spi_register_board_info(bfin_spi_board_info,
513 ARRAY_SIZE(bfin_spi_board_info)); 513 ARRAY_SIZE(bfin_spi_board_info));
514#endif 514#endif
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
index 7fbb0bbf8676..2221173e489e 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -1420,7 +1420,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1420#endif 1420#endif
1421}; 1421};
1422 1422
1423#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 1423#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
1424/* SPI controller data */ 1424/* SPI controller data */
1425static struct bfin5xx_spi_master bfin_spi0_info = { 1425static struct bfin5xx_spi_master bfin_spi0_info = {
1426 .num_chipselect = MAX_CTRL_CS + MAX_BLACKFIN_GPIOS, 1426 .num_chipselect = MAX_CTRL_CS + MAX_BLACKFIN_GPIOS,
@@ -1462,7 +1462,7 @@ static struct platform_device bfin_spi0_device = {
1462 1462
1463/* SPORT SPI controller data */ 1463/* SPORT SPI controller data */
1464static struct bfin5xx_spi_master bfin_sport_spi0_info = { 1464static struct bfin5xx_spi_master bfin_sport_spi0_info = {
1465 .num_chipselect = 1, /* master only supports one device */ 1465 .num_chipselect = MAX_BLACKFIN_GPIOS,
1466 .enable_dma = 0, /* master don't support DMA */ 1466 .enable_dma = 0, /* master don't support DMA */
1467 .pin_req = {P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_DRPRI, 1467 .pin_req = {P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_DRPRI,
1468 P_SPORT0_RSCLK, P_SPORT0_TFS, P_SPORT0_RFS, 0}, 1468 P_SPORT0_RSCLK, P_SPORT0_TFS, P_SPORT0_RFS, 0},
@@ -1492,7 +1492,7 @@ static struct platform_device bfin_sport_spi0_device = {
1492}; 1492};
1493 1493
1494static struct bfin5xx_spi_master bfin_sport_spi1_info = { 1494static struct bfin5xx_spi_master bfin_sport_spi1_info = {
1495 .num_chipselect = 1, /* master only supports one device */ 1495 .num_chipselect = MAX_BLACKFIN_GPIOS,
1496 .enable_dma = 0, /* master don't support DMA */ 1496 .enable_dma = 0, /* master don't support DMA */
1497 .pin_req = {P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_DRPRI, 1497 .pin_req = {P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_DRPRI,
1498 P_SPORT1_RSCLK, P_SPORT1_TFS, P_SPORT1_RFS, 0}, 1498 P_SPORT1_RSCLK, P_SPORT1_TFS, P_SPORT1_RFS, 0},
@@ -1558,6 +1558,71 @@ static struct platform_device bfin_lq035q1_device = {
1558}; 1558};
1559#endif 1559#endif
1560 1560
1561#if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \
1562 || defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE)
1563#include <linux/videodev2.h>
1564#include <media/blackfin/bfin_capture.h>
1565#include <media/blackfin/ppi.h>
1566
1567static const unsigned short ppi_req[] = {
1568 P_PPI0_D0, P_PPI0_D1, P_PPI0_D2, P_PPI0_D3,
1569 P_PPI0_D4, P_PPI0_D5, P_PPI0_D6, P_PPI0_D7,
1570 P_PPI0_CLK, P_PPI0_FS1, P_PPI0_FS2,
1571 0,
1572};
1573
1574static const struct ppi_info ppi_info = {
1575 .type = PPI_TYPE_PPI,
1576 .dma_ch = CH_PPI,
1577 .irq_err = IRQ_PPI_ERROR,
1578 .base = (void __iomem *)PPI_CONTROL,
1579 .pin_req = ppi_req,
1580};
1581
1582#if defined(CONFIG_VIDEO_VS6624) \
1583 || defined(CONFIG_VIDEO_VS6624_MODULE)
1584static struct v4l2_input vs6624_inputs[] = {
1585 {
1586 .index = 0,
1587 .name = "Camera",
1588 .type = V4L2_INPUT_TYPE_CAMERA,
1589 .std = V4L2_STD_UNKNOWN,
1590 },
1591};
1592
1593static struct bcap_route vs6624_routes[] = {
1594 {
1595 .input = 0,
1596 .output = 0,
1597 },
1598};
1599
1600static const unsigned vs6624_ce_pin = GPIO_PF10;
1601
1602static struct bfin_capture_config bfin_capture_data = {
1603 .card_name = "BF537",
1604 .inputs = vs6624_inputs,
1605 .num_inputs = ARRAY_SIZE(vs6624_inputs),
1606 .routes = vs6624_routes,
1607 .i2c_adapter_id = 0,
1608 .board_info = {
1609 .type = "vs6624",
1610 .addr = 0x10,
1611 .platform_data = (void *)&vs6624_ce_pin,
1612 },
1613 .ppi_info = &ppi_info,
1614 .ppi_control = (PACK_EN | DLEN_8 | XFR_TYPE | 0x0020),
1615};
1616#endif
1617
1618static struct platform_device bfin_capture_device = {
1619 .name = "bfin_capture",
1620 .dev = {
1621 .platform_data = &bfin_capture_data,
1622 },
1623};
1624#endif
1625
1561#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 1626#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
1562#ifdef CONFIG_SERIAL_BFIN_UART0 1627#ifdef CONFIG_SERIAL_BFIN_UART0
1563static struct resource bfin_uart0_resources[] = { 1628static struct resource bfin_uart0_resources[] = {
@@ -2716,7 +2781,7 @@ static struct platform_device *stamp_devices[] __initdata = {
2716 &net2272_bfin_device, 2781 &net2272_bfin_device,
2717#endif 2782#endif
2718 2783
2719#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 2784#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
2720 &bfin_spi0_device, 2785 &bfin_spi0_device,
2721#endif 2786#endif
2722 2787
@@ -2733,6 +2798,11 @@ static struct platform_device *stamp_devices[] __initdata = {
2733 &bfin_lq035q1_device, 2798 &bfin_lq035q1_device,
2734#endif 2799#endif
2735 2800
2801#if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \
2802 || defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE)
2803 &bfin_capture_device,
2804#endif
2805
2736#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 2806#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
2737#ifdef CONFIG_SERIAL_BFIN_UART0 2807#ifdef CONFIG_SERIAL_BFIN_UART0
2738 &bfin_uart0_device, 2808 &bfin_uart0_device,
diff --git a/arch/blackfin/mach-bf537/boards/tcm_bf537.c b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
index 6917ce2fa55e..988517671a5d 100644
--- a/arch/blackfin/mach-bf537/boards/tcm_bf537.c
+++ b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
@@ -32,7 +32,7 @@
32 */ 32 */
33const char bfin_board_name[] = "Bluetechnix TCM BF537"; 33const char bfin_board_name[] = "Bluetechnix TCM BF537";
34 34
35#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 35#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
36/* all SPI peripherals info goes here */ 36/* all SPI peripherals info goes here */
37 37
38#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 38#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
@@ -702,7 +702,7 @@ static struct platform_device *cm_bf537_devices[] __initdata = {
702 &net2272_bfin_device, 702 &net2272_bfin_device,
703#endif 703#endif
704 704
705#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 705#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
706 &bfin_spi0_device, 706 &bfin_spi0_device,
707#endif 707#endif
708 708
@@ -737,7 +737,7 @@ static int __init tcm_bf537_init(void)
737{ 737{
738 printk(KERN_INFO "%s(): registering device resources\n", __func__); 738 printk(KERN_INFO "%s(): registering device resources\n", __func__);
739 platform_add_devices(cm_bf537_devices, ARRAY_SIZE(cm_bf537_devices)); 739 platform_add_devices(cm_bf537_devices, ARRAY_SIZE(cm_bf537_devices));
740#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 740#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
741 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 741 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
742#endif 742#endif
743 743
diff --git a/arch/blackfin/mach-bf538/boards/ezkit.c b/arch/blackfin/mach-bf538/boards/ezkit.c
index 8356eb599f19..1633a6f306c0 100644
--- a/arch/blackfin/mach-bf538/boards/ezkit.c
+++ b/arch/blackfin/mach-bf538/boards/ezkit.c
@@ -490,7 +490,7 @@ static struct platform_device smc91x_device = {
490}; 490};
491#endif 491#endif
492 492
493#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 493#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
494/* all SPI peripherals info goes here */ 494/* all SPI peripherals info goes here */
495#if defined(CONFIG_MTD_M25P80) \ 495#if defined(CONFIG_MTD_M25P80) \
496 || defined(CONFIG_MTD_M25P80_MODULE) 496 || defined(CONFIG_MTD_M25P80_MODULE)
@@ -874,7 +874,7 @@ static struct platform_device *cm_bf538_devices[] __initdata = {
874#endif 874#endif
875#endif 875#endif
876 876
877#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 877#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
878 &bf538_spi_master0, 878 &bf538_spi_master0,
879 &bf538_spi_master1, 879 &bf538_spi_master1,
880 &bf538_spi_master2, 880 &bf538_spi_master2,
@@ -938,7 +938,7 @@ static int __init ezkit_init(void)
938 printk(KERN_INFO "%s(): registering device resources\n", __func__); 938 printk(KERN_INFO "%s(): registering device resources\n", __func__);
939 platform_add_devices(cm_bf538_devices, ARRAY_SIZE(cm_bf538_devices)); 939 platform_add_devices(cm_bf538_devices, ARRAY_SIZE(cm_bf538_devices));
940 940
941#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 941#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
942 spi_register_board_info(bf538_spi_board_info, 942 spi_register_board_info(bf538_spi_board_info,
943 ARRAY_SIZE(bf538_spi_board_info)); 943 ARRAY_SIZE(bf538_spi_board_info));
944#endif 944#endif
diff --git a/arch/blackfin/mach-bf548/boards/cm_bf548.c b/arch/blackfin/mach-bf548/boards/cm_bf548.c
index 0350eacec21b..68af594db48e 100644
--- a/arch/blackfin/mach-bf548/boards/cm_bf548.c
+++ b/arch/blackfin/mach-bf548/boards/cm_bf548.c
@@ -854,7 +854,7 @@ static struct platform_device para_flash_device = {
854}; 854};
855#endif 855#endif
856 856
857#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 857#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
858/* all SPI peripherals info goes here */ 858/* all SPI peripherals info goes here */
859#if defined(CONFIG_MTD_M25P80) \ 859#if defined(CONFIG_MTD_M25P80) \
860 || defined(CONFIG_MTD_M25P80_MODULE) 860 || defined(CONFIG_MTD_M25P80_MODULE)
@@ -1175,7 +1175,7 @@ static struct platform_device *cm_bf548_devices[] __initdata = {
1175 &bf54x_sdh_device, 1175 &bf54x_sdh_device,
1176#endif 1176#endif
1177 1177
1178#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 1178#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
1179 &bf54x_spi_master0, 1179 &bf54x_spi_master0,
1180 &bf54x_spi_master1, 1180 &bf54x_spi_master1,
1181#endif 1181#endif
@@ -1210,7 +1210,7 @@ static int __init cm_bf548_init(void)
1210 printk(KERN_INFO "%s(): registering device resources\n", __func__); 1210 printk(KERN_INFO "%s(): registering device resources\n", __func__);
1211 platform_add_devices(cm_bf548_devices, ARRAY_SIZE(cm_bf548_devices)); 1211 platform_add_devices(cm_bf548_devices, ARRAY_SIZE(cm_bf548_devices));
1212 1212
1213#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 1213#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
1214 spi_register_board_info(bf54x_spi_board_info, 1214 spi_register_board_info(bf54x_spi_board_info,
1215 ARRAY_SIZE(bf54x_spi_board_info)); 1215 ARRAY_SIZE(bf54x_spi_board_info));
1216#endif 1216#endif
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c
index bb868ac0fe2d..3ea45f8bd61c 100644
--- a/arch/blackfin/mach-bf548/boards/ezkit.c
+++ b/arch/blackfin/mach-bf548/boards/ezkit.c
@@ -1110,7 +1110,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1110 }, 1110 },
1111#endif 1111#endif
1112}; 1112};
1113#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 1113#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
1114/* SPI (0) */ 1114/* SPI (0) */
1115static struct resource bfin_spi0_resource[] = { 1115static struct resource bfin_spi0_resource[] = {
1116 [0] = { 1116 [0] = {
@@ -1183,6 +1183,71 @@ static struct platform_device bf54x_spi_master1 = {
1183}; 1183};
1184#endif /* spi master and devices */ 1184#endif /* spi master and devices */
1185 1185
1186#if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \
1187 || defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE)
1188#include <linux/videodev2.h>
1189#include <media/blackfin/bfin_capture.h>
1190#include <media/blackfin/ppi.h>
1191
1192static const unsigned short ppi_req[] = {
1193 P_PPI1_D0, P_PPI1_D1, P_PPI1_D2, P_PPI1_D3,
1194 P_PPI1_D4, P_PPI1_D5, P_PPI1_D6, P_PPI1_D7,
1195 P_PPI1_CLK, P_PPI1_FS1, P_PPI1_FS2,
1196 0,
1197};
1198
1199static const struct ppi_info ppi_info = {
1200 .type = PPI_TYPE_EPPI,
1201 .dma_ch = CH_EPPI1,
1202 .irq_err = IRQ_EPPI1_ERROR,
1203 .base = (void __iomem *)EPPI1_STATUS,
1204 .pin_req = ppi_req,
1205};
1206
1207#if defined(CONFIG_VIDEO_VS6624) \
1208 || defined(CONFIG_VIDEO_VS6624_MODULE)
1209static struct v4l2_input vs6624_inputs[] = {
1210 {
1211 .index = 0,
1212 .name = "Camera",
1213 .type = V4L2_INPUT_TYPE_CAMERA,
1214 .std = V4L2_STD_UNKNOWN,
1215 },
1216};
1217
1218static struct bcap_route vs6624_routes[] = {
1219 {
1220 .input = 0,
1221 .output = 0,
1222 },
1223};
1224
1225static const unsigned vs6624_ce_pin = GPIO_PG6;
1226
1227static struct bfin_capture_config bfin_capture_data = {
1228 .card_name = "BF548",
1229 .inputs = vs6624_inputs,
1230 .num_inputs = ARRAY_SIZE(vs6624_inputs),
1231 .routes = vs6624_routes,
1232 .i2c_adapter_id = 0,
1233 .board_info = {
1234 .type = "vs6624",
1235 .addr = 0x10,
1236 .platform_data = (void *)&vs6624_ce_pin,
1237 },
1238 .ppi_info = &ppi_info,
1239 .ppi_control = (POLC | PACKEN | DLEN_8 | XFR_TYPE | 0x20),
1240};
1241#endif
1242
1243static struct platform_device bfin_capture_device = {
1244 .name = "bfin_capture",
1245 .dev = {
1246 .platform_data = &bfin_capture_data,
1247 },
1248};
1249#endif
1250
1186#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) 1251#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
1187static struct resource bfin_twi0_resource[] = { 1252static struct resource bfin_twi0_resource[] = {
1188 [0] = { 1253 [0] = {
@@ -1502,10 +1567,14 @@ static struct platform_device *ezkit_devices[] __initdata = {
1502 &bf54x_sdh_device, 1567 &bf54x_sdh_device,
1503#endif 1568#endif
1504 1569
1505#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 1570#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
1506 &bf54x_spi_master0, 1571 &bf54x_spi_master0,
1507 &bf54x_spi_master1, 1572 &bf54x_spi_master1,
1508#endif 1573#endif
1574#if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \
1575 || defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE)
1576 &bfin_capture_device,
1577#endif
1509 1578
1510#if defined(CONFIG_KEYBOARD_BFIN) || defined(CONFIG_KEYBOARD_BFIN_MODULE) 1579#if defined(CONFIG_KEYBOARD_BFIN) || defined(CONFIG_KEYBOARD_BFIN_MODULE)
1511 &bf54x_kpad_device, 1580 &bf54x_kpad_device,
diff --git a/arch/blackfin/mach-bf561/boards/acvilon.c b/arch/blackfin/mach-bf561/boards/acvilon.c
index b1b7339b6ba7..f6ffd6f054c3 100644
--- a/arch/blackfin/mach-bf561/boards/acvilon.c
+++ b/arch/blackfin/mach-bf561/boards/acvilon.c
@@ -372,7 +372,7 @@ static struct bfin5xx_spi_chip data_flash_chip_info = {
372}; 372};
373#endif 373#endif
374 374
375#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 375#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
376/* SPI (0) */ 376/* SPI (0) */
377static struct resource bfin_spi0_resource[] = { 377static struct resource bfin_spi0_resource[] = {
378 [0] = { 378 [0] = {
@@ -475,7 +475,7 @@ static struct platform_device bfin_dpmc = {
475static struct platform_device *acvilon_devices[] __initdata = { 475static struct platform_device *acvilon_devices[] __initdata = {
476 &bfin_dpmc, 476 &bfin_dpmc,
477 477
478#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 478#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
479 &bfin_spi0_device, 479 &bfin_spi0_device,
480#endif 480#endif
481 481
diff --git a/arch/blackfin/mach-bf561/boards/cm_bf561.c b/arch/blackfin/mach-bf561/boards/cm_bf561.c
index c017cf07ed4e..d81450f635df 100644
--- a/arch/blackfin/mach-bf561/boards/cm_bf561.c
+++ b/arch/blackfin/mach-bf561/boards/cm_bf561.c
@@ -29,7 +29,7 @@
29 */ 29 */
30const char bfin_board_name[] = "Bluetechnix CM BF561"; 30const char bfin_board_name[] = "Bluetechnix CM BF561";
31 31
32#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 32#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
33/* all SPI peripherals info goes here */ 33/* all SPI peripherals info goes here */
34 34
35#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 35#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
@@ -488,7 +488,7 @@ static struct platform_device *cm_bf561_devices[] __initdata = {
488 &net2272_bfin_device, 488 &net2272_bfin_device,
489#endif 489#endif
490 490
491#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 491#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
492 &bfin_spi0_device, 492 &bfin_spi0_device,
493#endif 493#endif
494 494
@@ -523,7 +523,7 @@ static int __init cm_bf561_init(void)
523{ 523{
524 printk(KERN_INFO "%s(): registering device resources\n", __func__); 524 printk(KERN_INFO "%s(): registering device resources\n", __func__);
525 platform_add_devices(cm_bf561_devices, ARRAY_SIZE(cm_bf561_devices)); 525 platform_add_devices(cm_bf561_devices, ARRAY_SIZE(cm_bf561_devices));
526#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 526#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
527 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 527 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
528#endif 528#endif
529 529
diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c
index 27f22ed381d9..838978808a15 100644
--- a/arch/blackfin/mach-bf561/boards/ezkit.c
+++ b/arch/blackfin/mach-bf561/boards/ezkit.c
@@ -291,7 +291,7 @@ static struct platform_device ezkit_flash_device = {
291}; 291};
292#endif 292#endif
293 293
294#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 294#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
295/* SPI (0) */ 295/* SPI (0) */
296static struct resource bfin_spi0_resource[] = { 296static struct resource bfin_spi0_resource[] = {
297 [0] = { 297 [0] = {
@@ -383,7 +383,7 @@ static struct i2c_gpio_platform_data i2c_gpio_data = {
383 .scl_pin = GPIO_PF0, 383 .scl_pin = GPIO_PF0,
384 .sda_is_open_drain = 0, 384 .sda_is_open_drain = 0,
385 .scl_is_open_drain = 0, 385 .scl_is_open_drain = 0,
386 .udelay = 40, 386 .udelay = 10,
387}; 387};
388 388
389static struct platform_device i2c_gpio_device = { 389static struct platform_device i2c_gpio_device = {
@@ -422,6 +422,96 @@ static struct platform_device bfin_dpmc = {
422 }, 422 },
423}; 423};
424 424
425#if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \
426 || defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE)
427#include <linux/videodev2.h>
428#include <media/blackfin/bfin_capture.h>
429#include <media/blackfin/ppi.h>
430
431static const unsigned short ppi_req[] = {
432 P_PPI0_D0, P_PPI0_D1, P_PPI0_D2, P_PPI0_D3,
433 P_PPI0_D4, P_PPI0_D5, P_PPI0_D6, P_PPI0_D7,
434 P_PPI0_CLK, P_PPI0_FS1, P_PPI0_FS2,
435 0,
436};
437
438static const struct ppi_info ppi_info = {
439 .type = PPI_TYPE_PPI,
440 .dma_ch = CH_PPI0,
441 .irq_err = IRQ_PPI1_ERROR,
442 .base = (void __iomem *)PPI0_CONTROL,
443 .pin_req = ppi_req,
444};
445
446#if defined(CONFIG_VIDEO_ADV7183) \
447 || defined(CONFIG_VIDEO_ADV7183_MODULE)
448#include <media/adv7183.h>
449static struct v4l2_input adv7183_inputs[] = {
450 {
451 .index = 0,
452 .name = "Composite",
453 .type = V4L2_INPUT_TYPE_CAMERA,
454 .std = V4L2_STD_ALL,
455 },
456 {
457 .index = 1,
458 .name = "S-Video",
459 .type = V4L2_INPUT_TYPE_CAMERA,
460 .std = V4L2_STD_ALL,
461 },
462 {
463 .index = 2,
464 .name = "Component",
465 .type = V4L2_INPUT_TYPE_CAMERA,
466 .std = V4L2_STD_ALL,
467 },
468};
469
470static struct bcap_route adv7183_routes[] = {
471 {
472 .input = ADV7183_COMPOSITE4,
473 .output = ADV7183_8BIT_OUT,
474 },
475 {
476 .input = ADV7183_SVIDEO0,
477 .output = ADV7183_8BIT_OUT,
478 },
479 {
480 .input = ADV7183_COMPONENT0,
481 .output = ADV7183_8BIT_OUT,
482 },
483};
484
485
486static const unsigned adv7183_gpio[] = {
487 GPIO_PF13, /* reset pin */
488 GPIO_PF2, /* output enable pin */
489};
490
491static struct bfin_capture_config bfin_capture_data = {
492 .card_name = "BF561",
493 .inputs = adv7183_inputs,
494 .num_inputs = ARRAY_SIZE(adv7183_inputs),
495 .routes = adv7183_routes,
496 .i2c_adapter_id = 0,
497 .board_info = {
498 .type = "adv7183",
499 .addr = 0x20,
500 .platform_data = (void *)adv7183_gpio,
501 },
502 .ppi_info = &ppi_info,
503 .ppi_control = (PACK_EN | DLEN_8 | DMA32 | FLD_SEL),
504};
505#endif
506
507static struct platform_device bfin_capture_device = {
508 .name = "bfin_capture",
509 .dev = {
510 .platform_data = &bfin_capture_data,
511 },
512};
513#endif
514
425#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 515#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
426static struct platform_device bfin_i2s = { 516static struct platform_device bfin_i2s = {
427 .name = "bfin-i2s", 517 .name = "bfin-i2s",
@@ -462,7 +552,7 @@ static struct platform_device *ezkit_devices[] __initdata = {
462 &bfin_isp1760_device, 552 &bfin_isp1760_device,
463#endif 553#endif
464 554
465#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 555#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
466 &bfin_spi0_device, 556 &bfin_spi0_device,
467#endif 557#endif
468 558
@@ -494,6 +584,11 @@ static struct platform_device *ezkit_devices[] __initdata = {
494 &ezkit_flash_device, 584 &ezkit_flash_device,
495#endif 585#endif
496 586
587#if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \
588 || defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE)
589 &bfin_capture_device,
590#endif
591
497#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 592#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
498 &bfin_i2s, 593 &bfin_i2s,
499#endif 594#endif
diff --git a/arch/blackfin/mach-bf561/include/mach/pll.h b/arch/blackfin/mach-bf561/include/mach/pll.h
index 7977db2f1c12..00bdacee9cc2 100644
--- a/arch/blackfin/mach-bf561/include/mach/pll.h
+++ b/arch/blackfin/mach-bf561/include/mach/pll.h
@@ -16,6 +16,7 @@
16#include <mach/irq.h> 16#include <mach/irq.h>
17 17
18#define SUPPLE_0_WAKEUP ((IRQ_SUPPLE_0 - (IRQ_CORETMR + 1)) % 32) 18#define SUPPLE_0_WAKEUP ((IRQ_SUPPLE_0 - (IRQ_CORETMR + 1)) % 32)
19#define SUPPLE_1_WAKEUP ((IRQ_SUPPLE_1 - (IRQ_CORETMR + 1)) % 32)
19 20
20static inline void 21static inline void
21bfin_iwr_restore(unsigned long iwr0, unsigned long iwr1, unsigned long iwr2) 22bfin_iwr_restore(unsigned long iwr0, unsigned long iwr1, unsigned long iwr2)
@@ -42,7 +43,8 @@ bfin_iwr_save(unsigned long niwr0, unsigned long niwr1, unsigned long niwr2,
42static inline void 43static inline void
43bfin_iwr_set_sup0(unsigned long *iwr0, unsigned long *iwr1, unsigned long *iwr2) 44bfin_iwr_set_sup0(unsigned long *iwr0, unsigned long *iwr1, unsigned long *iwr2)
44{ 45{
45 bfin_iwr_save(0, IWR_ENABLE(SUPPLE_0_WAKEUP), 0, iwr0, iwr1, iwr2); 46 bfin_iwr_save(0, IWR_ENABLE(SUPPLE_0_WAKEUP) |
47 IWR_ENABLE(SUPPLE_1_WAKEUP), 0, iwr0, iwr1, iwr2);
46} 48}
47 49
48#endif 50#endif
diff --git a/arch/blackfin/mach-bf561/smp.c b/arch/blackfin/mach-bf561/smp.c
index db22401e7605..ab1c617b9cfc 100644
--- a/arch/blackfin/mach-bf561/smp.c
+++ b/arch/blackfin/mach-bf561/smp.c
@@ -84,7 +84,7 @@ int __cpuinit platform_boot_secondary(unsigned int cpu, struct task_struct *idle
84 84
85 if ((bfin_read_SYSCR() & COREB_SRAM_INIT) == 0) { 85 if ((bfin_read_SYSCR() & COREB_SRAM_INIT) == 0) {
86 /* CoreB already running, sending ipi to wakeup it */ 86 /* CoreB already running, sending ipi to wakeup it */
87 platform_send_ipi_cpu(cpu, IRQ_SUPPLE_0); 87 smp_send_reschedule(cpu);
88 } else { 88 } else {
89 /* Kick CoreB, which should start execution from CORE_SRAM_BASE. */ 89 /* Kick CoreB, which should start execution from CORE_SRAM_BASE. */
90 bfin_write_SYSCR(bfin_read_SYSCR() & ~COREB_SRAM_INIT); 90 bfin_write_SYSCR(bfin_read_SYSCR() & ~COREB_SRAM_INIT);
@@ -114,7 +114,8 @@ void __init platform_request_ipi(int irq, void *handler)
114 int ret; 114 int ret;
115 const char *name = (irq == IRQ_SUPPLE_0) ? supple0 : supple1; 115 const char *name = (irq == IRQ_SUPPLE_0) ? supple0 : supple1;
116 116
117 ret = request_irq(irq, handler, IRQF_PERCPU, name, handler); 117 ret = request_irq(irq, handler, IRQF_PERCPU | IRQF_NO_SUSPEND |
118 IRQF_FORCE_RESUME, name, handler);
118 if (ret) 119 if (ret)
119 panic("Cannot request %s for IPI service", name); 120 panic("Cannot request %s for IPI service", name);
120} 121}
diff --git a/arch/blackfin/mach-common/smp.c b/arch/blackfin/mach-common/smp.c
index 0784a52389c8..ac8f8a43158c 100644
--- a/arch/blackfin/mach-common/smp.c
+++ b/arch/blackfin/mach-common/smp.c
@@ -14,6 +14,7 @@
14#include <linux/sched.h> 14#include <linux/sched.h>
15#include <linux/interrupt.h> 15#include <linux/interrupt.h>
16#include <linux/cache.h> 16#include <linux/cache.h>
17#include <linux/clockchips.h>
17#include <linux/profile.h> 18#include <linux/profile.h>
18#include <linux/errno.h> 19#include <linux/errno.h>
19#include <linux/mm.h> 20#include <linux/mm.h>
@@ -47,9 +48,10 @@ unsigned long blackfin_iflush_l1_entry[NR_CPUS];
47 48
48struct blackfin_initial_pda __cpuinitdata initial_pda_coreb; 49struct blackfin_initial_pda __cpuinitdata initial_pda_coreb;
49 50
50#define BFIN_IPI_RESCHEDULE 0 51#define BFIN_IPI_TIMER 0
51#define BFIN_IPI_CALL_FUNC 1 52#define BFIN_IPI_RESCHEDULE 1
52#define BFIN_IPI_CPU_STOP 2 53#define BFIN_IPI_CALL_FUNC 2
54#define BFIN_IPI_CPU_STOP 3
53 55
54struct blackfin_flush_data { 56struct blackfin_flush_data {
55 unsigned long start; 57 unsigned long start;
@@ -160,6 +162,14 @@ static irqreturn_t ipi_handler_int0(int irq, void *dev_instance)
160 return IRQ_HANDLED; 162 return IRQ_HANDLED;
161} 163}
162 164
165DECLARE_PER_CPU(struct clock_event_device, coretmr_events);
166void ipi_timer(void)
167{
168 int cpu = smp_processor_id();
169 struct clock_event_device *evt = &per_cpu(coretmr_events, cpu);
170 evt->event_handler(evt);
171}
172
163static irqreturn_t ipi_handler_int1(int irq, void *dev_instance) 173static irqreturn_t ipi_handler_int1(int irq, void *dev_instance)
164{ 174{
165 struct ipi_message *msg; 175 struct ipi_message *msg;
@@ -176,18 +186,17 @@ static irqreturn_t ipi_handler_int1(int irq, void *dev_instance)
176 while (msg_queue->count) { 186 while (msg_queue->count) {
177 msg = &msg_queue->ipi_message[msg_queue->head]; 187 msg = &msg_queue->ipi_message[msg_queue->head];
178 switch (msg->type) { 188 switch (msg->type) {
189 case BFIN_IPI_TIMER:
190 ipi_timer();
191 break;
179 case BFIN_IPI_RESCHEDULE: 192 case BFIN_IPI_RESCHEDULE:
180 scheduler_ipi(); 193 scheduler_ipi();
181 break; 194 break;
182 case BFIN_IPI_CALL_FUNC: 195 case BFIN_IPI_CALL_FUNC:
183 spin_unlock_irqrestore(&msg_queue->lock, flags);
184 ipi_call_function(cpu, msg); 196 ipi_call_function(cpu, msg);
185 spin_lock_irqsave(&msg_queue->lock, flags);
186 break; 197 break;
187 case BFIN_IPI_CPU_STOP: 198 case BFIN_IPI_CPU_STOP:
188 spin_unlock_irqrestore(&msg_queue->lock, flags);
189 ipi_cpu_stop(cpu); 199 ipi_cpu_stop(cpu);
190 spin_lock_irqsave(&msg_queue->lock, flags);
191 break; 200 break;
192 default: 201 default:
193 printk(KERN_CRIT "CPU%u: Unknown IPI message 0x%lx\n", 202 printk(KERN_CRIT "CPU%u: Unknown IPI message 0x%lx\n",
@@ -297,8 +306,6 @@ void smp_send_reschedule(int cpu)
297{ 306{
298 cpumask_t callmap; 307 cpumask_t callmap;
299 /* simply trigger an ipi */ 308 /* simply trigger an ipi */
300 if (cpu_is_offline(cpu))
301 return;
302 309
303 cpumask_clear(&callmap); 310 cpumask_clear(&callmap);
304 cpumask_set_cpu(cpu, &callmap); 311 cpumask_set_cpu(cpu, &callmap);
@@ -308,6 +315,16 @@ void smp_send_reschedule(int cpu)
308 return; 315 return;
309} 316}
310 317
318void smp_send_msg(const struct cpumask *mask, unsigned long type)
319{
320 smp_send_message(*mask, type, NULL, NULL, 0);
321}
322
323void smp_timer_broadcast(const struct cpumask *mask)
324{
325 smp_send_msg(mask, BFIN_IPI_TIMER);
326}
327
311void smp_send_stop(void) 328void smp_send_stop(void)
312{ 329{
313 cpumask_t callmap; 330 cpumask_t callmap;
@@ -326,17 +343,24 @@ void smp_send_stop(void)
326int __cpuinit __cpu_up(unsigned int cpu) 343int __cpuinit __cpu_up(unsigned int cpu)
327{ 344{
328 int ret; 345 int ret;
329 static struct task_struct *idle; 346 struct blackfin_cpudata *ci = &per_cpu(cpu_data, cpu);
347 struct task_struct *idle = ci->idle;
330 348
331 if (idle) 349 if (idle) {
332 free_task(idle); 350 free_task(idle);
333 351 idle = NULL;
334 idle = fork_idle(cpu);
335 if (IS_ERR(idle)) {
336 printk(KERN_ERR "CPU%u: fork() failed\n", cpu);
337 return PTR_ERR(idle);
338 } 352 }
339 353
354 if (!idle) {
355 idle = fork_idle(cpu);
356 if (IS_ERR(idle)) {
357 printk(KERN_ERR "CPU%u: fork() failed\n", cpu);
358 return PTR_ERR(idle);
359 }
360 ci->idle = idle;
361 } else {
362 init_idle(idle, cpu);
363 }
340 secondary_stack = task_stack_page(idle) + THREAD_SIZE; 364 secondary_stack = task_stack_page(idle) + THREAD_SIZE;
341 365
342 ret = platform_boot_secondary(cpu, idle); 366 ret = platform_boot_secondary(cpu, idle);
@@ -411,6 +435,7 @@ void __cpuinit secondary_start_kernel(void)
411 435
412 bfin_setup_caches(cpu); 436 bfin_setup_caches(cpu);
413 437
438 notify_cpu_starting(cpu);
414 /* 439 /*
415 * Calibrate loops per jiffy value. 440 * Calibrate loops per jiffy value.
416 * IRQs need to be enabled here - D-cache can be invalidated 441 * IRQs need to be enabled here - D-cache can be invalidated
@@ -453,8 +478,10 @@ void smp_icache_flush_range_others(unsigned long start, unsigned long end)
453 smp_flush_data.start = start; 478 smp_flush_data.start = start;
454 smp_flush_data.end = end; 479 smp_flush_data.end = end;
455 480
456 if (smp_call_function(&ipi_flush_icache, &smp_flush_data, 0)) 481 preempt_disable();
482 if (smp_call_function(&ipi_flush_icache, &smp_flush_data, 1))
457 printk(KERN_WARNING "SMP: failed to run I-cache flush request on other CPUs\n"); 483 printk(KERN_WARNING "SMP: failed to run I-cache flush request on other CPUs\n");
484 preempt_enable();
458} 485}
459EXPORT_SYMBOL_GPL(smp_icache_flush_range_others); 486EXPORT_SYMBOL_GPL(smp_icache_flush_range_others);
460 487