diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-13 13:08:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-13 13:08:43 -0400 |
commit | 54cebc68c81eacac41a21bdfe99dc889d3882c60 (patch) | |
tree | da1d3872c6ddf208768e784bd1ea09054a81462d /arch/blackfin/mach-bf527 | |
parent | fffdedef691a0f6fa7ca1fc0a2a508cbb49def69 (diff) | |
parent | 71de1f8a6365ea65346881e526132563d93696d1 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6: (60 commits)
Blackfin arch: make sure we include the fix for SPORT hysteresis when reprogramming clocks
Blackfin arch: Fix bogus str_ident check in gpio code
Blackfin arch: AD7879 Touchscreen driver
Blackfin arch: introducing bfin_addr_dcachable
Blackfin arch: fix a typo in comments
Blackfin arch: Remove useless head file
Blackfin arch: make sure L2 start and length are always defined (fixes building on BF542)
Blackfin arch: use the Blackfin on-chip ROM to do software reset when possible
Blackfin arch: update anomaly headers to match the latest sheet
Blackfin arch: bfin_reset() is an internal reboot function ... everyone should go through machine_restart()
Blackfin arch: print out error/warning if you are running on the incorrect CPU type
Blackfin arch: remove non-bf54x ifdef logic since this file is only compiled on bf54x parts
Blackfin arch: update board defconfigs
Blackfin arch: Add optional verbose debug
Blackfin arch: emulate a TTY over the EMUDAT/JTAG interface
Blackfin arch: have is_user_addr_valid() check for overflows (like when address is -1)
Blackfin arch: ptrace - fix off-by-one check on end of memory regions
Blackfin arch: Enable framebuffer support for the BF526-EZkit TFT LCD display
Blackfin arch: flash memory map and dm9000 resources updating
Blackfin arch: early prink code still use uart core console functions to parse and set configure option string
...
Diffstat (limited to 'arch/blackfin/mach-bf527')
-rw-r--r-- | arch/blackfin/mach-bf527/boards/Kconfig | 5 | ||||
-rw-r--r-- | arch/blackfin/mach-bf527/boards/Makefile | 1 | ||||
-rw-r--r-- | arch/blackfin/mach-bf527/boards/cm_bf527.c | 17 | ||||
-rw-r--r-- | arch/blackfin/mach-bf527/boards/ezbrd.c | 734 | ||||
-rw-r--r-- | arch/blackfin/mach-bf527/boards/ezkit.c | 53 | ||||
-rw-r--r-- | arch/blackfin/mach-bf527/head.S | 3 | ||||
-rw-r--r-- | arch/blackfin/mach-bf527/include/mach/anomaly.h | 160 | ||||
-rw-r--r-- | arch/blackfin/mach-bf527/include/mach/bf527.h | 21 | ||||
-rw-r--r-- | arch/blackfin/mach-bf527/include/mach/defBF52x_base.h | 27 | ||||
-rw-r--r-- | arch/blackfin/mach-bf527/include/mach/portmux.h | 4 |
10 files changed, 966 insertions, 59 deletions
diff --git a/arch/blackfin/mach-bf527/boards/Kconfig b/arch/blackfin/mach-bf527/boards/Kconfig index 8bf9e58f0148..df224d04e167 100644 --- a/arch/blackfin/mach-bf527/boards/Kconfig +++ b/arch/blackfin/mach-bf527/boards/Kconfig | |||
@@ -14,4 +14,9 @@ config BFIN527_BLUETECHNIX_CM | |||
14 | help | 14 | help |
15 | CM-BF527 support for EVAL- and DEV-Board. | 15 | CM-BF527 support for EVAL- and DEV-Board. |
16 | 16 | ||
17 | config BFIN526_EZBRD | ||
18 | bool "BF526-EZBRD" | ||
19 | help | ||
20 | BF526-EZBRD/EZKIT Lite board support. | ||
21 | |||
17 | endchoice | 22 | endchoice |
diff --git a/arch/blackfin/mach-bf527/boards/Makefile b/arch/blackfin/mach-bf527/boards/Makefile index 7ba7d256bbb8..eb6ed3362f9f 100644 --- a/arch/blackfin/mach-bf527/boards/Makefile +++ b/arch/blackfin/mach-bf527/boards/Makefile | |||
@@ -4,3 +4,4 @@ | |||
4 | 4 | ||
5 | obj-$(CONFIG_BFIN527_EZKIT) += ezkit.o | 5 | obj-$(CONFIG_BFIN527_EZKIT) += ezkit.o |
6 | obj-$(CONFIG_BFIN527_BLUETECHNIX_CM) += cm_bf527.o | 6 | obj-$(CONFIG_BFIN527_BLUETECHNIX_CM) += cm_bf527.o |
7 | obj-$(CONFIG_BFIN526_EZBRD) += ezbrd.o | ||
diff --git a/arch/blackfin/mach-bf527/boards/cm_bf527.c b/arch/blackfin/mach-bf527/boards/cm_bf527.c index d22bc7773717..9ea440bbb13d 100644 --- a/arch/blackfin/mach-bf527/boards/cm_bf527.c +++ b/arch/blackfin/mach-bf527/boards/cm_bf527.c | |||
@@ -43,10 +43,7 @@ | |||
43 | #include <linux/irq.h> | 43 | #include <linux/irq.h> |
44 | #include <linux/interrupt.h> | 44 | #include <linux/interrupt.h> |
45 | #include <linux/usb/sl811.h> | 45 | #include <linux/usb/sl811.h> |
46 | #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) | ||
47 | #include <linux/usb/musb.h> | 46 | #include <linux/usb/musb.h> |
48 | #endif | ||
49 | #include <asm/cplb.h> | ||
50 | #include <asm/dma.h> | 47 | #include <asm/dma.h> |
51 | #include <asm/bfin5xx_spi.h> | 48 | #include <asm/bfin5xx_spi.h> |
52 | #include <asm/reboot.h> | 49 | #include <asm/reboot.h> |
@@ -130,6 +127,16 @@ static struct resource musb_resources[] = { | |||
130 | }, | 127 | }, |
131 | }; | 128 | }; |
132 | 129 | ||
130 | static struct musb_hdrc_config musb_config = { | ||
131 | .multipoint = 0, | ||
132 | .dyn_fifo = 0, | ||
133 | .soft_con = 1, | ||
134 | .dma = 1, | ||
135 | .num_eps = 7, | ||
136 | .dma_channels = 7, | ||
137 | .gpio_vrsel = GPIO_PF11, | ||
138 | }; | ||
139 | |||
133 | static struct musb_hdrc_platform_data musb_plat = { | 140 | static struct musb_hdrc_platform_data musb_plat = { |
134 | #if defined(CONFIG_USB_MUSB_OTG) | 141 | #if defined(CONFIG_USB_MUSB_OTG) |
135 | .mode = MUSB_OTG, | 142 | .mode = MUSB_OTG, |
@@ -138,7 +145,7 @@ static struct musb_hdrc_platform_data musb_plat = { | |||
138 | #elif defined(CONFIG_USB_GADGET_MUSB_HDRC) | 145 | #elif defined(CONFIG_USB_GADGET_MUSB_HDRC) |
139 | .mode = MUSB_PERIPHERAL, | 146 | .mode = MUSB_PERIPHERAL, |
140 | #endif | 147 | #endif |
141 | .multipoint = 0, | 148 | .config = &musb_config, |
142 | }; | 149 | }; |
143 | 150 | ||
144 | static u64 musb_dmamask = ~(u32)0; | 151 | static u64 musb_dmamask = ~(u32)0; |
@@ -201,7 +208,7 @@ static struct mtd_partition partition_info[] = { | |||
201 | { | 208 | { |
202 | .name = "linux kernel(nand)", | 209 | .name = "linux kernel(nand)", |
203 | .offset = 0, | 210 | .offset = 0, |
204 | .size = 4 * SIZE_1M, | 211 | .size = 4 * 1024 * 1024, |
205 | }, | 212 | }, |
206 | { | 213 | { |
207 | .name = "file system(nand)", | 214 | .name = "file system(nand)", |
diff --git a/arch/blackfin/mach-bf527/boards/ezbrd.c b/arch/blackfin/mach-bf527/boards/ezbrd.c new file mode 100644 index 000000000000..36c87b6fbdec --- /dev/null +++ b/arch/blackfin/mach-bf527/boards/ezbrd.c | |||
@@ -0,0 +1,734 @@ | |||
1 | /* | ||
2 | * File: arch/blackfin/mach-bf527/boards/ezbrd.c | ||
3 | * Based on: arch/blackfin/mach-bf537/boards/stamp.c | ||
4 | * Author: Aidan Williams <aidan@nicta.com.au> | ||
5 | * | ||
6 | * Created: | ||
7 | * Description: | ||
8 | * | ||
9 | * Modified: | ||
10 | * Copyright 2005 National ICT Australia (NICTA) | ||
11 | * Copyright 2004-2008 Analog Devices Inc. | ||
12 | * | ||
13 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | ||
14 | * | ||
15 | * This program is free software; you can redistribute it and/or modify | ||
16 | * it under the terms of the GNU General Public License as published by | ||
17 | * the Free Software Foundation; either version 2 of the License, or | ||
18 | * (at your option) any later version. | ||
19 | * | ||
20 | * This program is distributed in the hope that it will be useful, | ||
21 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
22 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
23 | * GNU General Public License for more details. | ||
24 | * | ||
25 | * You should have received a copy of the GNU General Public License | ||
26 | * along with this program; if not, see the file COPYING, or write | ||
27 | * to the Free Software Foundation, Inc., | ||
28 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
29 | */ | ||
30 | |||
31 | #include <linux/device.h> | ||
32 | #include <linux/platform_device.h> | ||
33 | #include <linux/mtd/mtd.h> | ||
34 | #include <linux/mtd/partitions.h> | ||
35 | #include <linux/mtd/physmap.h> | ||
36 | #include <linux/spi/spi.h> | ||
37 | #include <linux/spi/flash.h> | ||
38 | |||
39 | #include <linux/i2c.h> | ||
40 | #include <linux/irq.h> | ||
41 | #include <linux/interrupt.h> | ||
42 | #include <linux/usb/musb.h> | ||
43 | #include <asm/dma.h> | ||
44 | #include <asm/bfin5xx_spi.h> | ||
45 | #include <asm/reboot.h> | ||
46 | #include <asm/nand.h> | ||
47 | #include <asm/portmux.h> | ||
48 | #include <asm/dpmc.h> | ||
49 | #include <linux/spi/ad7877.h> | ||
50 | |||
51 | /* | ||
52 | * Name the Board for the /proc/cpuinfo | ||
53 | */ | ||
54 | const char bfin_board_name[] = "BF526-EZBRD"; | ||
55 | |||
56 | /* | ||
57 | * Driver needs to know address, irq and flag pin. | ||
58 | */ | ||
59 | |||
60 | #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) | ||
61 | static struct resource musb_resources[] = { | ||
62 | [0] = { | ||
63 | .start = 0xffc03800, | ||
64 | .end = 0xffc03cff, | ||
65 | .flags = IORESOURCE_MEM, | ||
66 | }, | ||
67 | [1] = { /* general IRQ */ | ||
68 | .start = IRQ_USB_INT0, | ||
69 | .end = IRQ_USB_INT0, | ||
70 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | ||
71 | }, | ||
72 | [2] = { /* DMA IRQ */ | ||
73 | .start = IRQ_USB_DMA, | ||
74 | .end = IRQ_USB_DMA, | ||
75 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | ||
76 | }, | ||
77 | }; | ||
78 | |||
79 | static struct musb_hdrc_config musb_config = { | ||
80 | .multipoint = 0, | ||
81 | .dyn_fifo = 0, | ||
82 | .soft_con = 1, | ||
83 | .dma = 1, | ||
84 | .num_eps = 7, | ||
85 | .dma_channels = 7, | ||
86 | .gpio_vrsel = GPIO_PG13, | ||
87 | }; | ||
88 | |||
89 | static struct musb_hdrc_platform_data musb_plat = { | ||
90 | #if defined(CONFIG_USB_MUSB_OTG) | ||
91 | .mode = MUSB_OTG, | ||
92 | #elif defined(CONFIG_USB_MUSB_HDRC_HCD) | ||
93 | .mode = MUSB_HOST, | ||
94 | #elif defined(CONFIG_USB_GADGET_MUSB_HDRC) | ||
95 | .mode = MUSB_PERIPHERAL, | ||
96 | #endif | ||
97 | .config = &musb_config, | ||
98 | }; | ||
99 | |||
100 | static u64 musb_dmamask = ~(u32)0; | ||
101 | |||
102 | static struct platform_device musb_device = { | ||
103 | .name = "musb_hdrc", | ||
104 | .id = 0, | ||
105 | .dev = { | ||
106 | .dma_mask = &musb_dmamask, | ||
107 | .coherent_dma_mask = 0xffffffff, | ||
108 | .platform_data = &musb_plat, | ||
109 | }, | ||
110 | .num_resources = ARRAY_SIZE(musb_resources), | ||
111 | .resource = musb_resources, | ||
112 | }; | ||
113 | #endif | ||
114 | |||
115 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) | ||
116 | static struct mtd_partition ezbrd_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 | |||
132 | static struct physmap_flash_data ezbrd_flash_data = { | ||
133 | .width = 2, | ||
134 | .parts = ezbrd_partitions, | ||
135 | .nr_parts = ARRAY_SIZE(ezbrd_partitions), | ||
136 | }; | ||
137 | |||
138 | static struct resource ezbrd_flash_resource = { | ||
139 | .start = 0x20000000, | ||
140 | .end = 0x203fffff, | ||
141 | .flags = IORESOURCE_MEM, | ||
142 | }; | ||
143 | |||
144 | static struct platform_device ezbrd_flash_device = { | ||
145 | .name = "physmap-flash", | ||
146 | .id = 0, | ||
147 | .dev = { | ||
148 | .platform_data = &ezbrd_flash_data, | ||
149 | }, | ||
150 | .num_resources = 1, | ||
151 | .resource = &ezbrd_flash_resource, | ||
152 | }; | ||
153 | #endif | ||
154 | |||
155 | #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) | ||
156 | static 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 | |||
169 | static struct bf5xx_nand_platform bf5xx_nand_platform = { | ||
170 | .page_size = NFC_PG_SIZE_256, | ||
171 | .data_width = NFC_NWIDTH_8, | ||
172 | .partitions = partition_info, | ||
173 | .nr_partitions = ARRAY_SIZE(partition_info), | ||
174 | .rd_dly = 3, | ||
175 | .wr_dly = 3, | ||
176 | }; | ||
177 | |||
178 | static struct resource bf5xx_nand_resources[] = { | ||
179 | { | ||
180 | .start = NFC_CTL, | ||
181 | .end = NFC_DATA_RD + 2, | ||
182 | .flags = IORESOURCE_MEM, | ||
183 | }, | ||
184 | { | ||
185 | .start = CH_NFC, | ||
186 | .end = CH_NFC, | ||
187 | .flags = IORESOURCE_IRQ, | ||
188 | }, | ||
189 | }; | ||
190 | |||
191 | static struct platform_device bf5xx_nand_device = { | ||
192 | .name = "bf5xx-nand", | ||
193 | .id = 0, | ||
194 | .num_resources = ARRAY_SIZE(bf5xx_nand_resources), | ||
195 | .resource = bf5xx_nand_resources, | ||
196 | .dev = { | ||
197 | .platform_data = &bf5xx_nand_platform, | ||
198 | }, | ||
199 | }; | ||
200 | #endif | ||
201 | |||
202 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) | ||
203 | static struct platform_device rtc_device = { | ||
204 | .name = "rtc-bfin", | ||
205 | .id = -1, | ||
206 | }; | ||
207 | #endif | ||
208 | |||
209 | |||
210 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | ||
211 | static struct platform_device bfin_mac_device = { | ||
212 | .name = "bfin_mac", | ||
213 | }; | ||
214 | #endif | ||
215 | |||
216 | #if defined(CONFIG_MTD_M25P80) \ | ||
217 | || defined(CONFIG_MTD_M25P80_MODULE) | ||
218 | static struct mtd_partition bfin_spi_flash_partitions[] = { | ||
219 | { | ||
220 | .name = "bootloader(spi)", | ||
221 | .size = 0x00040000, | ||
222 | .offset = 0, | ||
223 | .mask_flags = MTD_CAP_ROM | ||
224 | }, { | ||
225 | .name = "linux kernel(spi)", | ||
226 | .size = MTDPART_SIZ_FULL, | ||
227 | .offset = MTDPART_OFS_APPEND, | ||
228 | } | ||
229 | }; | ||
230 | |||
231 | static struct flash_platform_data bfin_spi_flash_data = { | ||
232 | .name = "m25p80", | ||
233 | .parts = bfin_spi_flash_partitions, | ||
234 | .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions), | ||
235 | .type = "m25p16", | ||
236 | }; | ||
237 | |||
238 | /* SPI flash chip (m25p64) */ | ||
239 | static struct bfin5xx_spi_chip spi_flash_chip_info = { | ||
240 | .enable_dma = 0, /* use dma transfer with this chip*/ | ||
241 | .bits_per_word = 8, | ||
242 | }; | ||
243 | #endif | ||
244 | |||
245 | #if defined(CONFIG_SPI_ADC_BF533) \ | ||
246 | || defined(CONFIG_SPI_ADC_BF533_MODULE) | ||
247 | /* SPI ADC chip */ | ||
248 | static struct bfin5xx_spi_chip spi_adc_chip_info = { | ||
249 | .enable_dma = 1, /* use dma transfer with this chip*/ | ||
250 | .bits_per_word = 16, | ||
251 | }; | ||
252 | #endif | ||
253 | |||
254 | #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE) | ||
255 | static struct bfin5xx_spi_chip spi_mmc_chip_info = { | ||
256 | .enable_dma = 1, | ||
257 | .bits_per_word = 8, | ||
258 | }; | ||
259 | #endif | ||
260 | |||
261 | #if defined(CONFIG_PBX) | ||
262 | static struct bfin5xx_spi_chip spi_si3xxx_chip_info = { | ||
263 | .ctl_reg = 0x4, /* send zero */ | ||
264 | .enable_dma = 0, | ||
265 | .bits_per_word = 8, | ||
266 | .cs_change_per_word = 1, | ||
267 | }; | ||
268 | #endif | ||
269 | |||
270 | #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) | ||
271 | static struct bfin5xx_spi_chip spi_ad7877_chip_info = { | ||
272 | .enable_dma = 0, | ||
273 | .bits_per_word = 16, | ||
274 | }; | ||
275 | |||
276 | static const struct ad7877_platform_data bfin_ad7877_ts_info = { | ||
277 | .model = 7877, | ||
278 | .vref_delay_usecs = 50, /* internal, no capacitor */ | ||
279 | .x_plate_ohms = 419, | ||
280 | .y_plate_ohms = 486, | ||
281 | .pressure_max = 1000, | ||
282 | .pressure_min = 0, | ||
283 | .stopacq_polarity = 1, | ||
284 | .first_conversion_delay = 3, | ||
285 | .acquisition_time = 1, | ||
286 | .averaging = 1, | ||
287 | .pen_down_acc_interval = 1, | ||
288 | }; | ||
289 | #endif | ||
290 | |||
291 | #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ | ||
292 | && defined(CONFIG_SND_SOC_WM8731_SPI) | ||
293 | static struct bfin5xx_spi_chip spi_wm8731_chip_info = { | ||
294 | .enable_dma = 0, | ||
295 | .bits_per_word = 16, | ||
296 | }; | ||
297 | #endif | ||
298 | |||
299 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) | ||
300 | static struct bfin5xx_spi_chip spidev_chip_info = { | ||
301 | .enable_dma = 0, | ||
302 | .bits_per_word = 8, | ||
303 | }; | ||
304 | #endif | ||
305 | |||
306 | #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) | ||
307 | static struct bfin5xx_spi_chip lq035q1_spi_chip_info = { | ||
308 | .enable_dma = 0, | ||
309 | .bits_per_word = 8, | ||
310 | }; | ||
311 | #endif | ||
312 | |||
313 | static struct spi_board_info bfin_spi_board_info[] __initdata = { | ||
314 | #if defined(CONFIG_MTD_M25P80) \ | ||
315 | || defined(CONFIG_MTD_M25P80_MODULE) | ||
316 | { | ||
317 | /* the modalias must be the same as spi device driver name */ | ||
318 | .modalias = "m25p80", /* Name of spi_driver for this device */ | ||
319 | .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ | ||
320 | .bus_num = 0, /* Framework bus number */ | ||
321 | .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/ | ||
322 | .platform_data = &bfin_spi_flash_data, | ||
323 | .controller_data = &spi_flash_chip_info, | ||
324 | .mode = SPI_MODE_3, | ||
325 | }, | ||
326 | #endif | ||
327 | |||
328 | #if defined(CONFIG_SPI_ADC_BF533) \ | ||
329 | || defined(CONFIG_SPI_ADC_BF533_MODULE) | ||
330 | { | ||
331 | .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */ | ||
332 | .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */ | ||
333 | .bus_num = 0, /* Framework bus number */ | ||
334 | .chip_select = 1, /* Framework chip select. */ | ||
335 | .platform_data = NULL, /* No spi_driver specific config */ | ||
336 | .controller_data = &spi_adc_chip_info, | ||
337 | }, | ||
338 | #endif | ||
339 | |||
340 | #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE) | ||
341 | { | ||
342 | .modalias = "spi_mmc_dummy", | ||
343 | .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ | ||
344 | .bus_num = 0, | ||
345 | .chip_select = 0, | ||
346 | .platform_data = NULL, | ||
347 | .controller_data = &spi_mmc_chip_info, | ||
348 | .mode = SPI_MODE_3, | ||
349 | }, | ||
350 | { | ||
351 | .modalias = "spi_mmc", | ||
352 | .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ | ||
353 | .bus_num = 0, | ||
354 | .chip_select = CONFIG_SPI_MMC_CS_CHAN, | ||
355 | .platform_data = NULL, | ||
356 | .controller_data = &spi_mmc_chip_info, | ||
357 | .mode = SPI_MODE_3, | ||
358 | }, | ||
359 | #endif | ||
360 | #if defined(CONFIG_PBX) | ||
361 | { | ||
362 | .modalias = "fxs-spi", | ||
363 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ | ||
364 | .bus_num = 0, | ||
365 | .chip_select = 8 - CONFIG_J11_JUMPER, | ||
366 | .controller_data = &spi_si3xxx_chip_info, | ||
367 | .mode = SPI_MODE_3, | ||
368 | }, | ||
369 | { | ||
370 | .modalias = "fxo-spi", | ||
371 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ | ||
372 | .bus_num = 0, | ||
373 | .chip_select = 8 - CONFIG_J19_JUMPER, | ||
374 | .controller_data = &spi_si3xxx_chip_info, | ||
375 | .mode = SPI_MODE_3, | ||
376 | }, | ||
377 | #endif | ||
378 | #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) | ||
379 | { | ||
380 | .modalias = "ad7877", | ||
381 | .platform_data = &bfin_ad7877_ts_info, | ||
382 | .irq = IRQ_PF8, | ||
383 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ | ||
384 | .bus_num = 0, | ||
385 | .chip_select = 2, | ||
386 | .controller_data = &spi_ad7877_chip_info, | ||
387 | }, | ||
388 | #endif | ||
389 | #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ | ||
390 | && defined(CONFIG_SND_SOC_WM8731_SPI) | ||
391 | { | ||
392 | .modalias = "wm8731", | ||
393 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | ||
394 | .bus_num = 0, | ||
395 | .chip_select = 5, | ||
396 | .controller_data = &spi_wm8731_chip_info, | ||
397 | .mode = SPI_MODE_0, | ||
398 | }, | ||
399 | #endif | ||
400 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) | ||
401 | { | ||
402 | .modalias = "spidev", | ||
403 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | ||
404 | .bus_num = 0, | ||
405 | .chip_select = 1, | ||
406 | .controller_data = &spidev_chip_info, | ||
407 | }, | ||
408 | #endif | ||
409 | #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) | ||
410 | { | ||
411 | .modalias = "bfin-lq035q1-spi", | ||
412 | .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ | ||
413 | .bus_num = 0, | ||
414 | .chip_select = 1, | ||
415 | .controller_data = &lq035q1_spi_chip_info, | ||
416 | .mode = SPI_CPHA | SPI_CPOL, | ||
417 | }, | ||
418 | #endif | ||
419 | }; | ||
420 | |||
421 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | ||
422 | /* SPI controller data */ | ||
423 | static struct bfin5xx_spi_master bfin_spi0_info = { | ||
424 | .num_chipselect = 8, | ||
425 | .enable_dma = 1, /* master has the ability to do dma transfer */ | ||
426 | .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, | ||
427 | }; | ||
428 | |||
429 | /* SPI (0) */ | ||
430 | static struct resource bfin_spi0_resource[] = { | ||
431 | [0] = { | ||
432 | .start = SPI0_REGBASE, | ||
433 | .end = SPI0_REGBASE + 0xFF, | ||
434 | .flags = IORESOURCE_MEM, | ||
435 | }, | ||
436 | [1] = { | ||
437 | .start = CH_SPI, | ||
438 | .end = CH_SPI, | ||
439 | .flags = IORESOURCE_IRQ, | ||
440 | }, | ||
441 | }; | ||
442 | |||
443 | static struct platform_device bfin_spi0_device = { | ||
444 | .name = "bfin-spi", | ||
445 | .id = 0, /* Bus number */ | ||
446 | .num_resources = ARRAY_SIZE(bfin_spi0_resource), | ||
447 | .resource = bfin_spi0_resource, | ||
448 | .dev = { | ||
449 | .platform_data = &bfin_spi0_info, /* Passed to driver */ | ||
450 | }, | ||
451 | }; | ||
452 | #endif /* spi master and devices */ | ||
453 | |||
454 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | ||
455 | static struct resource bfin_uart_resources[] = { | ||
456 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
457 | { | ||
458 | .start = 0xFFC00400, | ||
459 | .end = 0xFFC004FF, | ||
460 | .flags = IORESOURCE_MEM, | ||
461 | }, | ||
462 | #endif | ||
463 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
464 | { | ||
465 | .start = 0xFFC02000, | ||
466 | .end = 0xFFC020FF, | ||
467 | .flags = IORESOURCE_MEM, | ||
468 | }, | ||
469 | #endif | ||
470 | }; | ||
471 | |||
472 | static struct platform_device bfin_uart_device = { | ||
473 | .name = "bfin-uart", | ||
474 | .id = 1, | ||
475 | .num_resources = ARRAY_SIZE(bfin_uart_resources), | ||
476 | .resource = bfin_uart_resources, | ||
477 | }; | ||
478 | #endif | ||
479 | |||
480 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | ||
481 | static struct resource bfin_sir_resources[] = { | ||
482 | #ifdef CONFIG_BFIN_SIR0 | ||
483 | { | ||
484 | .start = 0xFFC00400, | ||
485 | .end = 0xFFC004FF, | ||
486 | .flags = IORESOURCE_MEM, | ||
487 | }, | ||
488 | #endif | ||
489 | #ifdef CONFIG_BFIN_SIR1 | ||
490 | { | ||
491 | .start = 0xFFC02000, | ||
492 | .end = 0xFFC020FF, | ||
493 | .flags = IORESOURCE_MEM, | ||
494 | }, | ||
495 | #endif | ||
496 | }; | ||
497 | |||
498 | static struct platform_device bfin_sir_device = { | ||
499 | .name = "bfin_sir", | ||
500 | .id = 0, | ||
501 | .num_resources = ARRAY_SIZE(bfin_sir_resources), | ||
502 | .resource = bfin_sir_resources, | ||
503 | }; | ||
504 | #endif | ||
505 | |||
506 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) | ||
507 | static struct resource bfin_twi0_resource[] = { | ||
508 | [0] = { | ||
509 | .start = TWI0_REGBASE, | ||
510 | .end = TWI0_REGBASE, | ||
511 | .flags = IORESOURCE_MEM, | ||
512 | }, | ||
513 | [1] = { | ||
514 | .start = IRQ_TWI, | ||
515 | .end = IRQ_TWI, | ||
516 | .flags = IORESOURCE_IRQ, | ||
517 | }, | ||
518 | }; | ||
519 | |||
520 | static struct platform_device i2c_bfin_twi_device = { | ||
521 | .name = "i2c-bfin-twi", | ||
522 | .id = 0, | ||
523 | .num_resources = ARRAY_SIZE(bfin_twi0_resource), | ||
524 | .resource = bfin_twi0_resource, | ||
525 | }; | ||
526 | #endif | ||
527 | |||
528 | #ifdef CONFIG_I2C_BOARDINFO | ||
529 | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | ||
530 | #if defined(CONFIG_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE) | ||
531 | { | ||
532 | I2C_BOARD_INFO("pcf8574_lcd", 0x22), | ||
533 | }, | ||
534 | #endif | ||
535 | #if defined(CONFIG_TWI_KEYPAD) || defined(CONFIG_TWI_KEYPAD_MODULE) | ||
536 | { | ||
537 | I2C_BOARD_INFO("pcf8574_keypad", 0x27), | ||
538 | .irq = IRQ_PF8, | ||
539 | }, | ||
540 | #endif | ||
541 | }; | ||
542 | #endif | ||
543 | |||
544 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | ||
545 | static struct platform_device bfin_sport0_uart_device = { | ||
546 | .name = "bfin-sport-uart", | ||
547 | .id = 0, | ||
548 | }; | ||
549 | |||
550 | static struct platform_device bfin_sport1_uart_device = { | ||
551 | .name = "bfin-sport-uart", | ||
552 | .id = 1, | ||
553 | }; | ||
554 | #endif | ||
555 | |||
556 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | ||
557 | #include <linux/input.h> | ||
558 | #include <linux/gpio_keys.h> | ||
559 | |||
560 | static struct gpio_keys_button bfin_gpio_keys_table[] = { | ||
561 | {BTN_0, GPIO_PG0, 1, "gpio-keys: BTN0"}, | ||
562 | {BTN_1, GPIO_PG13, 1, "gpio-keys: BTN1"}, | ||
563 | }; | ||
564 | |||
565 | static struct gpio_keys_platform_data bfin_gpio_keys_data = { | ||
566 | .buttons = bfin_gpio_keys_table, | ||
567 | .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table), | ||
568 | }; | ||
569 | |||
570 | static struct platform_device bfin_device_gpiokeys = { | ||
571 | .name = "gpio-keys", | ||
572 | .dev = { | ||
573 | .platform_data = &bfin_gpio_keys_data, | ||
574 | }, | ||
575 | }; | ||
576 | #endif | ||
577 | |||
578 | static struct resource bfin_gpios_resources = { | ||
579 | .start = 0, | ||
580 | .end = MAX_BLACKFIN_GPIOS - 1, | ||
581 | .flags = IORESOURCE_IRQ, | ||
582 | }; | ||
583 | |||
584 | static struct platform_device bfin_gpios_device = { | ||
585 | .name = "simple-gpio", | ||
586 | .id = -1, | ||
587 | .num_resources = 1, | ||
588 | .resource = &bfin_gpios_resources, | ||
589 | }; | ||
590 | |||
591 | static const unsigned int cclk_vlev_datasheet[] = | ||
592 | { | ||
593 | VRPAIR(VLEV_100, 400000000), | ||
594 | VRPAIR(VLEV_105, 426000000), | ||
595 | VRPAIR(VLEV_110, 500000000), | ||
596 | VRPAIR(VLEV_115, 533000000), | ||
597 | VRPAIR(VLEV_120, 600000000), | ||
598 | }; | ||
599 | |||
600 | static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = { | ||
601 | .tuple_tab = cclk_vlev_datasheet, | ||
602 | .tabsize = ARRAY_SIZE(cclk_vlev_datasheet), | ||
603 | .vr_settling_time = 25 /* us */, | ||
604 | }; | ||
605 | |||
606 | static struct platform_device bfin_dpmc = { | ||
607 | .name = "bfin dpmc", | ||
608 | .dev = { | ||
609 | .platform_data = &bfin_dmpc_vreg_data, | ||
610 | }, | ||
611 | }; | ||
612 | |||
613 | #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) | ||
614 | #include <asm/bfin-lq035q1.h> | ||
615 | |||
616 | static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = { | ||
617 | .mode = LQ035_NORM | LQ035_RGB | LQ035_RL | LQ035_TB, | ||
618 | .use_bl = 1, | ||
619 | .gpio_bl = GPIO_PG12, | ||
620 | }; | ||
621 | |||
622 | static struct resource bfin_lq035q1_resources[] = { | ||
623 | { | ||
624 | .start = IRQ_PPI_ERROR, | ||
625 | .end = IRQ_PPI_ERROR, | ||
626 | .flags = IORESOURCE_IRQ, | ||
627 | }, | ||
628 | }; | ||
629 | |||
630 | static struct platform_device bfin_lq035q1_device = { | ||
631 | .name = "bfin-lq035q1", | ||
632 | .id = -1, | ||
633 | .num_resources = ARRAY_SIZE(bfin_lq035q1_resources), | ||
634 | .resource = bfin_lq035q1_resources, | ||
635 | .dev = { | ||
636 | .platform_data = &bfin_lq035q1_data, | ||
637 | }, | ||
638 | }; | ||
639 | #endif | ||
640 | |||
641 | static struct platform_device *stamp_devices[] __initdata = { | ||
642 | |||
643 | &bfin_dpmc, | ||
644 | |||
645 | #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) | ||
646 | &bf5xx_nand_device, | ||
647 | #endif | ||
648 | |||
649 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) | ||
650 | &rtc_device, | ||
651 | #endif | ||
652 | |||
653 | #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) | ||
654 | &musb_device, | ||
655 | #endif | ||
656 | |||
657 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | ||
658 | &bfin_mac_device, | ||
659 | #endif | ||
660 | |||
661 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | ||
662 | &bfin_spi0_device, | ||
663 | #endif | ||
664 | |||
665 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | ||
666 | &bfin_uart_device, | ||
667 | #endif | ||
668 | |||
669 | #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) | ||
670 | &bfin_lq035q1_device, | ||
671 | #endif | ||
672 | |||
673 | #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) | ||
674 | &bfin_sir_device, | ||
675 | #endif | ||
676 | |||
677 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) | ||
678 | &i2c_bfin_twi_device, | ||
679 | #endif | ||
680 | |||
681 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | ||
682 | &bfin_sport0_uart_device, | ||
683 | &bfin_sport1_uart_device, | ||
684 | #endif | ||
685 | |||
686 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | ||
687 | &bfin_device_gpiokeys, | ||
688 | #endif | ||
689 | |||
690 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) | ||
691 | &ezbrd_flash_device, | ||
692 | #endif | ||
693 | |||
694 | &bfin_gpios_device, | ||
695 | }; | ||
696 | |||
697 | static int __init stamp_init(void) | ||
698 | { | ||
699 | printk(KERN_INFO "%s(): registering device resources\n", __func__); | ||
700 | |||
701 | #ifdef CONFIG_I2C_BOARDINFO | ||
702 | i2c_register_board_info(0, bfin_i2c_board_info, | ||
703 | ARRAY_SIZE(bfin_i2c_board_info)); | ||
704 | #endif | ||
705 | |||
706 | platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); | ||
707 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); | ||
708 | return 0; | ||
709 | } | ||
710 | |||
711 | arch_initcall(stamp_init); | ||
712 | |||
713 | void native_machine_restart(char *cmd) | ||
714 | { | ||
715 | /* workaround reboot hang when booting from SPI */ | ||
716 | if ((bfin_read_SYSCR() & 0x7) == 0x3) | ||
717 | bfin_gpio_reset_spi0_ssel1(); | ||
718 | } | ||
719 | |||
720 | void bfin_get_ether_addr(char *addr) | ||
721 | { | ||
722 | /* the MAC is stored in OTP memory page 0xDF */ | ||
723 | u32 ret; | ||
724 | u64 otp_mac; | ||
725 | u32 (*otp_read)(u32 page, u32 flags, u64 *page_content) = (void *)0xEF00001A; | ||
726 | |||
727 | ret = otp_read(0xDF, 0x00, &otp_mac); | ||
728 | if (!(ret & 0x1)) { | ||
729 | char *otp_mac_p = (char *)&otp_mac; | ||
730 | for (ret = 0; ret < 6; ++ret) | ||
731 | addr[ret] = otp_mac_p[5 - ret]; | ||
732 | } | ||
733 | } | ||
734 | EXPORT_SYMBOL(bfin_get_ether_addr); | ||
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c index 762f754c06cc..8ee2b744e234 100644 --- a/arch/blackfin/mach-bf527/boards/ezkit.c +++ b/arch/blackfin/mach-bf527/boards/ezkit.c | |||
@@ -42,10 +42,7 @@ | |||
42 | #include <linux/irq.h> | 42 | #include <linux/irq.h> |
43 | #include <linux/interrupt.h> | 43 | #include <linux/interrupt.h> |
44 | #include <linux/usb/sl811.h> | 44 | #include <linux/usb/sl811.h> |
45 | #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) | ||
46 | #include <linux/usb/musb.h> | 45 | #include <linux/usb/musb.h> |
47 | #endif | ||
48 | #include <asm/cplb.h> | ||
49 | #include <asm/dma.h> | 46 | #include <asm/dma.h> |
50 | #include <asm/bfin5xx_spi.h> | 47 | #include <asm/bfin5xx_spi.h> |
51 | #include <asm/reboot.h> | 48 | #include <asm/reboot.h> |
@@ -129,6 +126,16 @@ static struct resource musb_resources[] = { | |||
129 | }, | 126 | }, |
130 | }; | 127 | }; |
131 | 128 | ||
129 | static struct musb_hdrc_config musb_config = { | ||
130 | .multipoint = 0, | ||
131 | .dyn_fifo = 0, | ||
132 | .soft_con = 1, | ||
133 | .dma = 1, | ||
134 | .num_eps = 7, | ||
135 | .dma_channels = 7, | ||
136 | .gpio_vrsel = GPIO_PG13, | ||
137 | }; | ||
138 | |||
132 | static struct musb_hdrc_platform_data musb_plat = { | 139 | static struct musb_hdrc_platform_data musb_plat = { |
133 | #if defined(CONFIG_USB_MUSB_OTG) | 140 | #if defined(CONFIG_USB_MUSB_OTG) |
134 | .mode = MUSB_OTG, | 141 | .mode = MUSB_OTG, |
@@ -137,7 +144,7 @@ static struct musb_hdrc_platform_data musb_plat = { | |||
137 | #elif defined(CONFIG_USB_GADGET_MUSB_HDRC) | 144 | #elif defined(CONFIG_USB_GADGET_MUSB_HDRC) |
138 | .mode = MUSB_PERIPHERAL, | 145 | .mode = MUSB_PERIPHERAL, |
139 | #endif | 146 | #endif |
140 | .multipoint = 0, | 147 | .config = &musb_config, |
141 | }; | 148 | }; |
142 | 149 | ||
143 | static u64 musb_dmamask = ~(u32)0; | 150 | static u64 musb_dmamask = ~(u32)0; |
@@ -218,7 +225,7 @@ static struct mtd_partition partition_info[] = { | |||
218 | { | 225 | { |
219 | .name = "linux kernel(nand)", | 226 | .name = "linux kernel(nand)", |
220 | .offset = 0, | 227 | .offset = 0, |
221 | .size = 4 * SIZE_1M, | 228 | .size = 4 * 1024 * 1024, |
222 | }, | 229 | }, |
223 | { | 230 | { |
224 | .name = "file system(nand)", | 231 | .name = "file system(nand)", |
@@ -846,6 +853,38 @@ static struct platform_device bfin_device_gpiokeys = { | |||
846 | }; | 853 | }; |
847 | #endif | 854 | #endif |
848 | 855 | ||
856 | #if defined(CONFIG_JOYSTICK_BFIN_ROTARY) || defined(CONFIG_JOYSTICK_BFIN_ROTARY_MODULE) | ||
857 | #include <linux/input.h> | ||
858 | #include <asm/bfin_rotary.h> | ||
859 | |||
860 | static struct bfin_rotary_platform_data bfin_rotary_data = { | ||
861 | /*.rotary_up_key = KEY_UP,*/ | ||
862 | /*.rotary_down_key = KEY_DOWN,*/ | ||
863 | .rotary_rel_code = REL_WHEEL, | ||
864 | .rotary_button_key = KEY_ENTER, | ||
865 | .debounce = 10, /* 0..17 */ | ||
866 | .mode = ROT_QUAD_ENC | ROT_DEBE, | ||
867 | }; | ||
868 | |||
869 | static struct resource bfin_rotary_resources[] = { | ||
870 | { | ||
871 | .start = IRQ_CNT, | ||
872 | .end = IRQ_CNT, | ||
873 | .flags = IORESOURCE_IRQ, | ||
874 | }, | ||
875 | }; | ||
876 | |||
877 | static struct platform_device bfin_rotary_device = { | ||
878 | .name = "bfin-rotary", | ||
879 | .id = -1, | ||
880 | .num_resources = ARRAY_SIZE(bfin_rotary_resources), | ||
881 | .resource = bfin_rotary_resources, | ||
882 | .dev = { | ||
883 | .platform_data = &bfin_rotary_data, | ||
884 | }, | ||
885 | }; | ||
886 | #endif | ||
887 | |||
849 | static struct resource bfin_gpios_resources = { | 888 | static struct resource bfin_gpios_resources = { |
850 | .start = 0, | 889 | .start = 0, |
851 | .end = MAX_BLACKFIN_GPIOS - 1, | 890 | .end = MAX_BLACKFIN_GPIOS - 1, |
@@ -962,6 +1001,10 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
962 | &bfin_device_gpiokeys, | 1001 | &bfin_device_gpiokeys, |
963 | #endif | 1002 | #endif |
964 | 1003 | ||
1004 | #if defined(CONFIG_JOYSTICK_BFIN_ROTARY) || defined(CONFIG_JOYSTICK_BFIN_ROTARY_MODULE) | ||
1005 | &bfin_rotary_device, | ||
1006 | #endif | ||
1007 | |||
965 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) | 1008 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) |
966 | &ezkit_flash_device, | 1009 | &ezkit_flash_device, |
967 | #endif | 1010 | #endif |
diff --git a/arch/blackfin/mach-bf527/head.S b/arch/blackfin/mach-bf527/head.S index 28c486191209..6588170e3845 100644 --- a/arch/blackfin/mach-bf527/head.S +++ b/arch/blackfin/mach-bf527/head.S | |||
@@ -87,6 +87,9 @@ ENTRY(_start_dma_code) | |||
87 | r1 = PLL_BYPASS; /* Bypass the PLL? */ | 87 | r1 = PLL_BYPASS; /* Bypass the PLL? */ |
88 | r1 = r1 << 8; /* Shift it over */ | 88 | r1 = r1 << 8; /* Shift it over */ |
89 | r0 = r1 | r0; /* add them all together */ | 89 | r0 = r1 | r0; /* add them all together */ |
90 | #ifdef ANOMALY_05000265 | ||
91 | r0 = BITSET(r0, 15); /* Add 250 mV of hysteresis to SPORT input pins */ | ||
92 | #endif | ||
90 | 93 | ||
91 | p0.h = hi(PLL_CTL); | 94 | p0.h = hi(PLL_CTL); |
92 | p0.l = lo(PLL_CTL); /* Load the address */ | 95 | p0.l = lo(PLL_CTL); /* Load the address */ |
diff --git a/arch/blackfin/mach-bf527/include/mach/anomaly.h b/arch/blackfin/mach-bf527/include/mach/anomaly.h index b7b166f4f064..62373e61c585 100644 --- a/arch/blackfin/mach-bf527/include/mach/anomaly.h +++ b/arch/blackfin/mach-bf527/include/mach/anomaly.h | |||
@@ -7,12 +7,24 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | /* This file shoule be up to date with: | 9 | /* This file shoule be up to date with: |
10 | * - Revision C, 01/25/2008; ADSP-BF527 Blackfin Processor Anomaly List | 10 | * - Revision B, 08/12/2008; ADSP-BF526 Blackfin Processor Anomaly List |
11 | * - Revision E, 08/18/2008; ADSP-BF527 Blackfin Processor Anomaly List | ||
11 | */ | 12 | */ |
12 | 13 | ||
13 | #ifndef _MACH_ANOMALY_H_ | 14 | #ifndef _MACH_ANOMALY_H_ |
14 | #define _MACH_ANOMALY_H_ | 15 | #define _MACH_ANOMALY_H_ |
15 | 16 | ||
17 | #if defined(__ADSPBF522__) || defined(__ADSPBF524__) || defined(__ADSPBF526__) | ||
18 | # define ANOMALY_BF526 1 | ||
19 | #else | ||
20 | # define ANOMALY_BF526 0 | ||
21 | #endif | ||
22 | #if defined(__ADSPBF523__) || defined(__ADSPBF525__) || defined(__ADSPBF527__) | ||
23 | # define ANOMALY_BF527 1 | ||
24 | #else | ||
25 | # define ANOMALY_BF527 0 | ||
26 | #endif | ||
27 | |||
16 | /* Multi-Issue Instruction with dsp32shiftimm in slot1 and P-reg Store in slot2 Not Supported */ | 28 | /* Multi-Issue Instruction with dsp32shiftimm in slot1 and P-reg Store in slot2 Not Supported */ |
17 | #define ANOMALY_05000074 (1) | 29 | #define ANOMALY_05000074 (1) |
18 | /* DMA_RUN Bit Is Not Valid after a Peripheral Receive Channel DMA Stops */ | 30 | /* DMA_RUN Bit Is Not Valid after a Peripheral Receive Channel DMA Stops */ |
@@ -23,68 +35,124 @@ | |||
23 | #define ANOMALY_05000245 (1) | 35 | #define ANOMALY_05000245 (1) |
24 | /* Sensitivity To Noise with Slow Input Edge Rates on External SPORT TX and RX Clocks */ | 36 | /* Sensitivity To Noise with Slow Input Edge Rates on External SPORT TX and RX Clocks */ |
25 | #define ANOMALY_05000265 (1) | 37 | #define ANOMALY_05000265 (1) |
26 | /* New Feature: EMAC TX DMA Word Alignment */ | 38 | /* False Hardware Errors Caused by Fetches at the Boundary of Reserved Memory */ |
27 | #define ANOMALY_05000285 (1) | 39 | #define ANOMALY_05000310 (1) |
28 | /* Errors when SSYNC, CSYNC, or Loads to LT, LB and LC Registers Are Interrupted */ | 40 | /* Errors when SSYNC, CSYNC, or Loads to LT, LB and LC Registers Are Interrupted */ |
29 | #define ANOMALY_05000312 (1) | 41 | #define ANOMALY_05000312 (ANOMALY_BF527) |
42 | /* PPI Is Level-Sensitive on First Transfer In Single Frame Sync Modes */ | ||
43 | #define ANOMALY_05000313 (__SILICON_REVISION__ < 2) | ||
30 | /* Incorrect Access of OTP_STATUS During otp_write() Function */ | 44 | /* Incorrect Access of OTP_STATUS During otp_write() Function */ |
31 | #define ANOMALY_05000328 (1) | 45 | #define ANOMALY_05000328 (ANOMALY_BF527 && __SILICON_REVISION__ < 2) |
32 | /* Disallowed Configuration Prevents Subsequent Allowed Configuration on Host DMA Port */ | 46 | /* Disallowed Configuration Prevents Subsequent Allowed Configuration on Host DMA Port */ |
33 | #define ANOMALY_05000337 (1) | 47 | #define ANOMALY_05000337 (ANOMALY_BF527 && __SILICON_REVISION__ < 2) |
34 | /* Ethernet MAC MDIO Reads Do Not Meet IEEE Specification */ | 48 | /* Ethernet MAC MDIO Reads Do Not Meet IEEE Specification */ |
35 | #define ANOMALY_05000341 (1) | 49 | #define ANOMALY_05000341 (ANOMALY_BF527 && __SILICON_REVISION__ < 2) |
36 | /* TWI May Not Operate Correctly Under Certain Signal Termination Conditions */ | 50 | /* TWI May Not Operate Correctly Under Certain Signal Termination Conditions */ |
37 | #define ANOMALY_05000342 (1) | 51 | #define ANOMALY_05000342 (ANOMALY_BF527 && __SILICON_REVISION__ < 2) |
38 | /* USB Calibration Value Is Not Initialized */ | 52 | /* USB Calibration Value Is Not Initialized */ |
39 | #define ANOMALY_05000346 (1) | 53 | #define ANOMALY_05000346 (ANOMALY_BF527 && __SILICON_REVISION__ < 2) |
54 | /* USB Calibration Value to use */ | ||
55 | #define ANOMALY_05000346_value 0xE510 | ||
40 | /* Preboot Routine Incorrectly Alters Reset Value of USB Register */ | 56 | /* Preboot Routine Incorrectly Alters Reset Value of USB Register */ |
41 | #define ANOMALY_05000347 (1) | 57 | #define ANOMALY_05000347 (ANOMALY_BF527 && __SILICON_REVISION__ < 2) |
42 | /* Security Features Are Not Functional */ | 58 | /* Security Features Are Not Functional */ |
43 | #define ANOMALY_05000348 (__SILICON_REVISION__ < 1) | 59 | #define ANOMALY_05000348 (ANOMALY_BF527 && __SILICON_REVISION__ < 1) |
60 | /* bfrom_SysControl() Firmware Function Performs Improper System Reset */ | ||
61 | #define ANOMALY_05000353 (ANOMALY_BF526) | ||
44 | /* Regulator Programming Blocked when Hibernate Wakeup Source Remains Active */ | 62 | /* Regulator Programming Blocked when Hibernate Wakeup Source Remains Active */ |
45 | #define ANOMALY_05000355 (1) | 63 | #define ANOMALY_05000355 (ANOMALY_BF527 && __SILICON_REVISION__ < 2) |
46 | /* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ | 64 | /* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ |
47 | #define ANOMALY_05000357 (1) | 65 | #define ANOMALY_05000357 (ANOMALY_BF527 && __SILICON_REVISION__ < 2) |
48 | /* Incorrect Revision Number in DSPID Register */ | 66 | /* Incorrect Revision Number in DSPID Register */ |
49 | #define ANOMALY_05000364 (__SILICON_REVISION__ > 0) | 67 | #define ANOMALY_05000364 (ANOMALY_BF527 && __SILICON_REVISION__ == 1) |
50 | /* PPI Underflow Error Goes Undetected in ITU-R 656 Mode */ | 68 | /* PPI Underflow Error Goes Undetected in ITU-R 656 Mode */ |
51 | #define ANOMALY_05000366 (1) | 69 | #define ANOMALY_05000366 (1) |
52 | /* New Feature: Higher Default CCLK Rate */ | 70 | /* Incorrect Default CSEL Value in PLL_DIV */ |
53 | #define ANOMALY_05000368 (1) | 71 | #define ANOMALY_05000368 (ANOMALY_BF527 && __SILICON_REVISION__ < 2) |
54 | /* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ | 72 | /* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ |
55 | #define ANOMALY_05000371 (1) | 73 | #define ANOMALY_05000371 (ANOMALY_BF527 && __SILICON_REVISION__ < 2) |
56 | /* Authentication Fails To Initiate */ | 74 | /* Authentication Fails To Initiate */ |
57 | #define ANOMALY_05000376 (__SILICON_REVISION__ > 0) | 75 | #define ANOMALY_05000376 (ANOMALY_BF527 && __SILICON_REVISION__ < 2) |
58 | /* Data Read From L3 Memory by USB DMA May be Corrupted */ | 76 | /* Data Read From L3 Memory by USB DMA May be Corrupted */ |
59 | #define ANOMALY_05000380 (1) | 77 | #define ANOMALY_05000380 (ANOMALY_BF527 && __SILICON_REVISION__ < 2) |
60 | /* USB Full-speed Mode not Fully Tested */ | 78 | /* 8-Bit NAND Flash Boot Mode Not Functional */ |
61 | #define ANOMALY_05000381 (1) | 79 | #define ANOMALY_05000382 (__SILICON_REVISION__ < 2) |
62 | /* New Feature: Boot from OTP Memory */ | 80 | /* Host Must Not Read Back During Host DMA Boot */ |
63 | #define ANOMALY_05000385 (1) | 81 | #define ANOMALY_05000384 (ANOMALY_BF527 && __SILICON_REVISION__ < 2) |
64 | /* New Feature: bfrom_SysControl() Routine */ | 82 | /* Boot from OTP Memory Not Functional */ |
65 | #define ANOMALY_05000386 (1) | 83 | #define ANOMALY_05000385 (ANOMALY_BF527 && __SILICON_REVISION__ < 2) |
66 | /* New Feature: Programmable Preboot Settings */ | 84 | /* bfrom_SysControl() Firmware Routine Not Functional */ |
67 | #define ANOMALY_05000387 (1) | 85 | #define ANOMALY_05000386 (ANOMALY_BF527 && __SILICON_REVISION__ < 2) |
86 | /* Programmable Preboot Settings Not Functional */ | ||
87 | #define ANOMALY_05000387 (ANOMALY_BF527 && __SILICON_REVISION__ < 2) | ||
88 | /* CRC32 Checksum Support Not Functional */ | ||
89 | #define ANOMALY_05000388 (__SILICON_REVISION__ < 2) | ||
68 | /* Reset Vector Must Not Be in SDRAM Memory Space */ | 90 | /* Reset Vector Must Not Be in SDRAM Memory Space */ |
69 | #define ANOMALY_05000389 (1) | 91 | #define ANOMALY_05000389 (ANOMALY_BF527 && __SILICON_REVISION__ < 2) |
70 | /* New Feature: pTempCurrent Added to ADI_BOOT_DATA Structure */ | 92 | /* pTempCurrent Not Present in ADI_BOOT_DATA Structure */ |
71 | #define ANOMALY_05000392 (1) | 93 | #define ANOMALY_05000392 (ANOMALY_BF527 && __SILICON_REVISION__ < 2) |
72 | /* New Feature: dTempByteCount Value Increased in ADI_BOOT_DATA Structure */ | 94 | /* Deprecated Value of dTempByteCount in ADI_BOOT_DATA Structure */ |
73 | #define ANOMALY_05000393 (1) | 95 | #define ANOMALY_05000393 (ANOMALY_BF527 && __SILICON_REVISION__ < 2) |
74 | /* New Feature: Log Buffer Functionality */ | 96 | /* Log Buffer Not Functional */ |
75 | #define ANOMALY_05000394 (1) | 97 | #define ANOMALY_05000394 (ANOMALY_BF527 && __SILICON_REVISION__ < 2) |
76 | /* New Feature: Hook Routine Functionality */ | 98 | /* Hook Routine Not Functional */ |
77 | #define ANOMALY_05000395 (1) | 99 | #define ANOMALY_05000395 (ANOMALY_BF527 && __SILICON_REVISION__ < 2) |
78 | /* New Feature: Header Indirect Bit */ | 100 | /* Header Indirect Bit Not Functional */ |
79 | #define ANOMALY_05000396 (1) | 101 | #define ANOMALY_05000396 (ANOMALY_BF527 && __SILICON_REVISION__ < 2) |
80 | /* New Feature: BK_ONES, BK_ZEROS, and BK_DATECODE Constants */ | 102 | /* BK_ONES, BK_ZEROS, and BK_DATECODE Constants Not Functional */ |
81 | #define ANOMALY_05000397 (1) | 103 | #define ANOMALY_05000397 (ANOMALY_BF527 && __SILICON_REVISION__ < 2) |
82 | /* New Feature: SWRESET, DFRESET and WDRESET Bits Added to SYSCR Register */ | 104 | /* SWRESET, DFRESET and WDRESET Bits in the SYSCR Register Not Functional */ |
83 | #define ANOMALY_05000398 (1) | 105 | #define ANOMALY_05000398 (ANOMALY_BF527 && __SILICON_REVISION__ < 2) |
84 | /* New Feature: BCODE_NOBOOT Added to BCODE Field of SYSCR Register */ | 106 | /* BCODE_NOBOOT in BCODE Field of SYSCR Register Not Functional */ |
85 | #define ANOMALY_05000399 (1) | 107 | #define ANOMALY_05000399 (ANOMALY_BF527 && __SILICON_REVISION__ < 2) |
86 | /* PPI Data Signals D0 and D8 do not Tristate After Disabling PPI */ | 108 | /* PPI Data Signals D0 and D8 do not Tristate After Disabling PPI */ |
87 | #define ANOMALY_05000401 (1) | 109 | #define ANOMALY_05000401 (__SILICON_REVISION__ < 2) |
110 | /* Level-Sensitive External GPIO Wakeups May Cause Indefinite Stall */ | ||
111 | #define ANOMALY_05000403 (__SILICON_REVISION__ < 2) | ||
112 | /* Lockbox SESR Disallows Certain User Interrupts */ | ||
113 | #define ANOMALY_05000404 (__SILICON_REVISION__ < 2) | ||
114 | /* Lockbox SESR Firmware Does Not Save/Restore Full Context */ | ||
115 | #define ANOMALY_05000405 (1) | ||
116 | /* Lockbox SESR Firmware Arguments Are Not Retained After First Initialization */ | ||
117 | #define ANOMALY_05000407 (__SILICON_REVISION__ < 2) | ||
118 | /* Lockbox Firmware Memory Cleanup Routine Does not Clear Registers */ | ||
119 | #define ANOMALY_05000408 (1) | ||
120 | /* Lockbox firmware leaves MDMA0 channel enabled */ | ||
121 | #define ANOMALY_05000409 (__SILICON_REVISION__ < 2) | ||
122 | /* Incorrect Default Internal Voltage Regulator Setting */ | ||
123 | #define ANOMALY_05000410 (ANOMALY_BF527 && __SILICON_REVISION__ < 2) | ||
124 | /* bfrom_SysControl() Firmware Function Cannot be Used to Enter Power Saving Modes */ | ||
125 | #define ANOMALY_05000411 (__SILICON_REVISION__ < 2) | ||
126 | /* OTP_CHECK_FOR_PREV_WRITE Bit is Not Functional in bfrom_OtpWrite() API */ | ||
127 | #define ANOMALY_05000414 (__SILICON_REVISION__ < 2) | ||
128 | /* DEB2_URGENT Bit Not Functional */ | ||
129 | #define ANOMALY_05000415 (__SILICON_REVISION__ < 2) | ||
130 | /* Speculative Fetches Can Cause Undesired External FIFO Operations */ | ||
131 | #define ANOMALY_05000416 (1) | ||
132 | /* SPORT0 Ignores External TSCLK0 on PG14 When TMR6 is an Output */ | ||
133 | #define ANOMALY_05000417 (ANOMALY_BF527 && __SILICON_REVISION__ < 2) | ||
134 | /* tSFSPE and tHFSPE Do Not Meet Data Sheet Specifications */ | ||
135 | #define ANOMALY_05000418 (__SILICON_REVISION__ < 2) | ||
136 | /* USB PLL_STABLE Bit May Not Accurately Reflect the USB PLL's Status */ | ||
137 | #define ANOMALY_05000420 (__SILICON_REVISION__ < 2) | ||
138 | /* TWI Fall Time (Tof) May Violate the Minimum I2C Specification */ | ||
139 | #define ANOMALY_05000421 (1) | ||
140 | /* TWI Input Capacitance (Ci) May Violate the Maximum I2C Specification */ | ||
141 | #define ANOMALY_05000422 (ANOMALY_BF527 && __SILICON_REVISION__ > 1) | ||
142 | /* Certain Ethernet Frames With Errors are Misclassified in RMII Mode */ | ||
143 | #define ANOMALY_05000423 (__SILICON_REVISION__ < 2) | ||
144 | /* Internal Voltage Regulator Not Trimmed */ | ||
145 | #define ANOMALY_05000424 (ANOMALY_BF527 && __SILICON_REVISION__ < 2) | ||
146 | /* Multichannel SPORT Channel Misalignment Under Specific Configuration */ | ||
147 | #define ANOMALY_05000425 (__SILICON_REVISION__ < 2) | ||
148 | /* Speculative Fetches of Indirect-Pointer Instructions Can Cause Spurious Hardware Errors */ | ||
149 | #define ANOMALY_05000426 (1) | ||
150 | /* WB_EDGE Bit in NFC_IRQSTAT Incorrectly Reflects Buffer Status Instead of IRQ Status */ | ||
151 | #define ANOMALY_05000429 (__SILICON_REVISION__ < 2) | ||
152 | /* Software System Reset Corrupts PLL_LOCKCNT Register */ | ||
153 | #define ANOMALY_05000430 (ANOMALY_BF527 && __SILICON_REVISION__ > 1) | ||
154 | /* bfrom_SysControl() Does Not Clear SIC_IWR1 Before Executing PLL Programming Sequence */ | ||
155 | #define ANOMALY_05000432 (ANOMALY_BF526) | ||
88 | 156 | ||
89 | /* Anomalies that don't exist on this proc */ | 157 | /* Anomalies that don't exist on this proc */ |
90 | #define ANOMALY_05000125 (0) | 158 | #define ANOMALY_05000125 (0) |
@@ -97,6 +165,8 @@ | |||
97 | #define ANOMALY_05000263 (0) | 165 | #define ANOMALY_05000263 (0) |
98 | #define ANOMALY_05000266 (0) | 166 | #define ANOMALY_05000266 (0) |
99 | #define ANOMALY_05000273 (0) | 167 | #define ANOMALY_05000273 (0) |
168 | #define ANOMALY_05000285 (0) | ||
169 | #define ANOMALY_05000307 (0) | ||
100 | #define ANOMALY_05000311 (0) | 170 | #define ANOMALY_05000311 (0) |
101 | #define ANOMALY_05000323 (0) | 171 | #define ANOMALY_05000323 (0) |
102 | #define ANOMALY_05000363 (0) | 172 | #define ANOMALY_05000363 (0) |
diff --git a/arch/blackfin/mach-bf527/include/mach/bf527.h b/arch/blackfin/mach-bf527/include/mach/bf527.h index 056eb4b9cd25..144f08d3f8ea 100644 --- a/arch/blackfin/mach-bf527/include/mach/bf527.h +++ b/arch/blackfin/mach-bf527/include/mach/bf527.h | |||
@@ -30,8 +30,6 @@ | |||
30 | #ifndef __MACH_BF527_H__ | 30 | #ifndef __MACH_BF527_H__ |
31 | #define __MACH_BF527_H__ | 31 | #define __MACH_BF527_H__ |
32 | 32 | ||
33 | #define SUPPORTED_REVID 2 | ||
34 | |||
35 | #define OFFSET_(x) ((x) & 0x0000FFFF) | 33 | #define OFFSET_(x) ((x) & 0x0000FFFF) |
36 | 34 | ||
37 | /*some misc defines*/ | 35 | /*some misc defines*/ |
@@ -112,16 +110,31 @@ | |||
112 | 110 | ||
113 | #ifdef CONFIG_BF527 | 111 | #ifdef CONFIG_BF527 |
114 | #define CPU "BF527" | 112 | #define CPU "BF527" |
113 | #define CPUID 0x27e4 | ||
114 | #endif | ||
115 | #ifdef CONFIG_BF526 | ||
116 | #define CPU "BF526" | ||
117 | #define CPUID 0x27e4 | ||
115 | #endif | 118 | #endif |
116 | #ifdef CONFIG_BF525 | 119 | #ifdef CONFIG_BF525 |
117 | #define CPU "BF525" | 120 | #define CPU "BF525" |
121 | #define CPUID 0x27e4 | ||
122 | #endif | ||
123 | #ifdef CONFIG_BF524 | ||
124 | #define CPU "BF524" | ||
125 | #define CPUID 0x27e4 | ||
126 | #endif | ||
127 | #ifdef CONFIG_BF523 | ||
128 | #define CPU "BF523" | ||
129 | #define CPUID 0x27e4 | ||
118 | #endif | 130 | #endif |
119 | #ifdef CONFIG_BF522 | 131 | #ifdef CONFIG_BF522 |
120 | #define CPU "BF522" | 132 | #define CPU "BF522" |
133 | #define CPUID 0x27e4 | ||
121 | #endif | 134 | #endif |
135 | |||
122 | #ifndef CPU | 136 | #ifndef CPU |
123 | #define CPU "UNKNOWN" | 137 | #error Unknown CPU type - This kernel doesn't seem to be configured properly |
124 | #define CPUID 0x0 | ||
125 | #endif | 138 | #endif |
126 | 139 | ||
127 | #endif /* __MACH_BF527_H__ */ | 140 | #endif /* __MACH_BF527_H__ */ |
diff --git a/arch/blackfin/mach-bf527/include/mach/defBF52x_base.h b/arch/blackfin/mach-bf527/include/mach/defBF52x_base.h index 6ac2ed7026eb..68b55d03fedf 100644 --- a/arch/blackfin/mach-bf527/include/mach/defBF52x_base.h +++ b/arch/blackfin/mach-bf527/include/mach/defBF52x_base.h | |||
@@ -1840,6 +1840,33 @@ | |||
1840 | 1840 | ||
1841 | #define DPRESCALE 0xf /* Load Counter Register */ | 1841 | #define DPRESCALE 0xf /* Load Counter Register */ |
1842 | 1842 | ||
1843 | /* CNT_COMMAND bit field options */ | ||
1844 | |||
1845 | #define W1LCNT_ZERO 0x0001 /* write 1 to load CNT_COUNTER with zero */ | ||
1846 | #define W1LCNT_MIN 0x0004 /* write 1 to load CNT_COUNTER from CNT_MIN */ | ||
1847 | #define W1LCNT_MAX 0x0008 /* write 1 to load CNT_COUNTER from CNT_MAX */ | ||
1848 | |||
1849 | #define W1LMIN_ZERO 0x0010 /* write 1 to load CNT_MIN with zero */ | ||
1850 | #define W1LMIN_CNT 0x0020 /* write 1 to load CNT_MIN from CNT_COUNTER */ | ||
1851 | #define W1LMIN_MAX 0x0080 /* write 1 to load CNT_MIN from CNT_MAX */ | ||
1852 | |||
1853 | #define W1LMAX_ZERO 0x0100 /* write 1 to load CNT_MAX with zero */ | ||
1854 | #define W1LMAX_CNT 0x0200 /* write 1 to load CNT_MAX from CNT_COUNTER */ | ||
1855 | #define W1LMAX_MIN 0x0400 /* write 1 to load CNT_MAX from CNT_MIN */ | ||
1856 | |||
1857 | /* CNT_CONFIG bit field options */ | ||
1858 | |||
1859 | #define CNTMODE_QUADENC 0x0000 /* quadrature encoder mode */ | ||
1860 | #define CNTMODE_BINENC 0x0100 /* binary encoder mode */ | ||
1861 | #define CNTMODE_UDCNT 0x0200 /* up/down counter mode */ | ||
1862 | #define CNTMODE_DIRCNT 0x0400 /* direction counter mode */ | ||
1863 | #define CNTMODE_DIRTMR 0x0500 /* direction timer mode */ | ||
1864 | |||
1865 | #define BNDMODE_COMP 0x0000 /* boundary compare mode */ | ||
1866 | #define BNDMODE_ZERO 0x1000 /* boundary compare and zero mode */ | ||
1867 | #define BNDMODE_CAPT 0x2000 /* boundary capture mode */ | ||
1868 | #define BNDMODE_AEXT 0x3000 /* boundary auto-extend mode */ | ||
1869 | |||
1843 | /* Bit masks for OTP_CONTROL */ | 1870 | /* Bit masks for OTP_CONTROL */ |
1844 | 1871 | ||
1845 | #define FUSE_FADDR 0x1ff /* OTP/Fuse Address */ | 1872 | #define FUSE_FADDR 0x1ff /* OTP/Fuse Address */ |
diff --git a/arch/blackfin/mach-bf527/include/mach/portmux.h b/arch/blackfin/mach-bf527/include/mach/portmux.h index ae4d205bfcf5..7f6da2c386bb 100644 --- a/arch/blackfin/mach-bf527/include/mach/portmux.h +++ b/arch/blackfin/mach-bf527/include/mach/portmux.h | |||
@@ -67,6 +67,10 @@ | |||
67 | #define P_UART1_RX (P_DEFINED | P_IDENT(GPIO_PG13) | P_FUNCT(1)) | 67 | #define P_UART1_RX (P_DEFINED | P_IDENT(GPIO_PG13) | P_FUNCT(1)) |
68 | #endif | 68 | #endif |
69 | 69 | ||
70 | #define P_CNT_CZM (P_DEFINED | P_IDENT(GPIO_PF11) | P_FUNCT(3)) | ||
71 | #define P_CNT_CDG (P_DEFINED | P_IDENT(GPIO_PF12) | P_FUNCT(3)) | ||
72 | #define P_CNT_CUD (P_DEFINED | P_IDENT(GPIO_PF13) | P_FUNCT(3)) | ||
73 | |||
70 | #define P_HWAIT (P_DONTCARE) | 74 | #define P_HWAIT (P_DONTCARE) |
71 | 75 | ||
72 | #define P_SPI0_SS (P_DEFINED | P_IDENT(GPIO_PG1) | P_FUNCT(0)) | 76 | #define P_SPI0_SS (P_DEFINED | P_IDENT(GPIO_PG1) | P_FUNCT(0)) |