diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-27 16:15:24 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-27 16:15:24 -0500 |
commit | 91525300baf162e83e923b09ca286f9205e21522 (patch) | |
tree | 115f50c0f270eb1bb032dc520e018d9aa65b957c /include | |
parent | 991dee591a99d035796a8c194eb1796cc020e142 (diff) | |
parent | 9c5e710bc1431f41ccdd0c294fa355aa0d45d2d7 (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: (54 commits)
MAINTIANERS: just use Mike gmail e-mail for contact and pawn the serial driver off onto Sonic
[Blackfin] arch: remove old I2C BF54x porting.
[Blackfin] arch: Add the semtimedop syscall. Upstream uClibc doesn't compile without it.
[Blackfin] arch: fix bug kernel boot message: memory information is not reasonable
[Blackfin] arch: use common flash driver to setup partitions rather than the bf5xx-flash driver
[Blackfin] arch: Fix bug - kernel build with Debug option enabled fails to boot up
[Blackfin] arch: Fix bug Only RTC interrupt can wake up deeper sleep core.
[Blackfin] arch: Add proper SW System Reset delay sequence
[Blackfin] arch: Update copyright date
[Blackfin] arch: GPIO API cleanup and anomaly update
[Blackfin] arch: Fix BUG gpio_direction_output API is not compatitable with GENERIC_GPIO API interface
[Blackfin] arch: Initial checkin of the memory protection support.
[Blackfin] arch: set_bfin_dma_config shouldnt set SYNC or RESTART by default - add argument or option
[Blackfin] arch: Add some comments - fix semicolons
[Blackfin] arch: move all code related to CPLB handling into a new subdirectory under kernel/
[Blackfin] arch: print out list of modules if kernel is crashing and tell people if the kernel is tainted
[Blackfin] arch: enable generic GPIO based I2C driver in STAMP-BF533, EZKIT-BF533 and EZKIT-BF561 boards
[Blackfin] arch: Don't oops_in_progress if single step is comming from the kernel
[Blackfin] arch: Fix BUG - kernel sometimes would stuck with KEYBOARD_GPIO on
[Blackfin] arch: update to latest anomaly sheets
...
Diffstat (limited to 'include')
31 files changed, 366 insertions, 130 deletions
diff --git a/include/asm-blackfin/bfin-global.h b/include/asm-blackfin/bfin-global.h index 39bdd86871cf..6ae0619d7696 100644 --- a/include/asm-blackfin/bfin-global.h +++ b/include/asm-blackfin/bfin-global.h | |||
@@ -51,7 +51,7 @@ extern unsigned long sclk_to_usecs(unsigned long sclk); | |||
51 | extern unsigned long usecs_to_sclk(unsigned long usecs); | 51 | extern unsigned long usecs_to_sclk(unsigned long usecs); |
52 | 52 | ||
53 | extern void dump_bfin_process(struct pt_regs *regs); | 53 | extern void dump_bfin_process(struct pt_regs *regs); |
54 | extern void dump_bfin_mem(void *retaddr); | 54 | extern void dump_bfin_mem(struct pt_regs *regs); |
55 | extern void dump_bfin_trace_buffer(void); | 55 | extern void dump_bfin_trace_buffer(void); |
56 | 56 | ||
57 | extern int init_arch_irq(void); | 57 | extern int init_arch_irq(void); |
diff --git a/include/asm-blackfin/cplb-mpu.h b/include/asm-blackfin/cplb-mpu.h new file mode 100644 index 000000000000..75c67b99d607 --- /dev/null +++ b/include/asm-blackfin/cplb-mpu.h | |||
@@ -0,0 +1,61 @@ | |||
1 | /* | ||
2 | * File: include/asm-blackfin/cplbinit.h | ||
3 | * Based on: | ||
4 | * Author: | ||
5 | * | ||
6 | * Created: | ||
7 | * Description: | ||
8 | * | ||
9 | * Modified: | ||
10 | * Copyright 2004-2006 Analog Devices Inc. | ||
11 | * | ||
12 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | ||
13 | * | ||
14 | * This program is free software; you can redistribute it and/or modify | ||
15 | * it under the terms of the GNU General Public License as published by | ||
16 | * the Free Software Foundation; either version 2 of the License, or | ||
17 | * (at your option) any later version. | ||
18 | * | ||
19 | * This program is distributed in the hope that it will be useful, | ||
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
22 | * GNU General Public License for more details. | ||
23 | * | ||
24 | * You should have received a copy of the GNU General Public License | ||
25 | * along with this program; if not, see the file COPYING, or write | ||
26 | * to the Free Software Foundation, Inc., | ||
27 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
28 | */ | ||
29 | #ifndef __ASM_BFIN_CPLB_MPU_H | ||
30 | #define __ASM_BFIN_CPLB_MPU_H | ||
31 | |||
32 | struct cplb_entry { | ||
33 | unsigned long data, addr; | ||
34 | }; | ||
35 | |||
36 | struct mem_region { | ||
37 | unsigned long start, end; | ||
38 | unsigned long dcplb_data; | ||
39 | unsigned long icplb_data; | ||
40 | }; | ||
41 | |||
42 | extern struct cplb_entry dcplb_tbl[MAX_CPLBS]; | ||
43 | extern struct cplb_entry icplb_tbl[MAX_CPLBS]; | ||
44 | extern int first_switched_icplb; | ||
45 | extern int first_mask_dcplb; | ||
46 | extern int first_switched_dcplb; | ||
47 | |||
48 | extern int nr_dcplb_miss, nr_icplb_miss, nr_icplb_supv_miss, nr_dcplb_prot; | ||
49 | extern int nr_cplb_flush; | ||
50 | |||
51 | extern int page_mask_order; | ||
52 | extern int page_mask_nelts; | ||
53 | |||
54 | extern unsigned long *current_rwx_mask; | ||
55 | |||
56 | extern void flush_switched_cplbs(void); | ||
57 | extern void set_mask_dcplbs(unsigned long *); | ||
58 | |||
59 | extern void __noreturn panic_cplb_error(int seqstat, struct pt_regs *); | ||
60 | |||
61 | #endif /* __ASM_BFIN_CPLB_MPU_H */ | ||
diff --git a/include/asm-blackfin/cplb.h b/include/asm-blackfin/cplb.h index 06828d77a58f..654375c2b746 100644 --- a/include/asm-blackfin/cplb.h +++ b/include/asm-blackfin/cplb.h | |||
@@ -65,7 +65,11 @@ | |||
65 | #define SIZE_1M 0x00100000 /* 1M */ | 65 | #define SIZE_1M 0x00100000 /* 1M */ |
66 | #define SIZE_4M 0x00400000 /* 4M */ | 66 | #define SIZE_4M 0x00400000 /* 4M */ |
67 | 67 | ||
68 | #ifdef CONFIG_MPU | ||
69 | #define MAX_CPLBS 16 | ||
70 | #else | ||
68 | #define MAX_CPLBS (16 * 2) | 71 | #define MAX_CPLBS (16 * 2) |
72 | #endif | ||
69 | 73 | ||
70 | #define ASYNC_MEMORY_CPLB_COVERAGE ((ASYNC_BANK0_SIZE + ASYNC_BANK1_SIZE + \ | 74 | #define ASYNC_MEMORY_CPLB_COVERAGE ((ASYNC_BANK0_SIZE + ASYNC_BANK1_SIZE + \ |
71 | ASYNC_BANK2_SIZE + ASYNC_BANK3_SIZE) / SIZE_4M) | 75 | ASYNC_BANK2_SIZE + ASYNC_BANK3_SIZE) / SIZE_4M) |
diff --git a/include/asm-blackfin/cplbinit.h b/include/asm-blackfin/cplbinit.h index c4d0596e8e9f..0eb1c1b685a7 100644 --- a/include/asm-blackfin/cplbinit.h +++ b/include/asm-blackfin/cplbinit.h | |||
@@ -33,6 +33,12 @@ | |||
33 | #include <asm/blackfin.h> | 33 | #include <asm/blackfin.h> |
34 | #include <asm/cplb.h> | 34 | #include <asm/cplb.h> |
35 | 35 | ||
36 | #ifdef CONFIG_MPU | ||
37 | |||
38 | #include <asm/cplb-mpu.h> | ||
39 | |||
40 | #else | ||
41 | |||
36 | #define INITIAL_T 0x1 | 42 | #define INITIAL_T 0x1 |
37 | #define SWITCH_T 0x2 | 43 | #define SWITCH_T 0x2 |
38 | #define I_CPLB 0x4 | 44 | #define I_CPLB 0x4 |
@@ -79,6 +85,8 @@ extern u_long ipdt_swapcount_table[]; | |||
79 | extern u_long dpdt_swapcount_table[]; | 85 | extern u_long dpdt_swapcount_table[]; |
80 | #endif | 86 | #endif |
81 | 87 | ||
88 | #endif /* CONFIG_MPU */ | ||
89 | |||
82 | extern unsigned long reserved_mem_dcache_on; | 90 | extern unsigned long reserved_mem_dcache_on; |
83 | extern unsigned long reserved_mem_icache_on; | 91 | extern unsigned long reserved_mem_icache_on; |
84 | 92 | ||
diff --git a/include/asm-blackfin/dma.h b/include/asm-blackfin/dma.h index b469505af364..5abaa2cee8db 100644 --- a/include/asm-blackfin/dma.h +++ b/include/asm-blackfin/dma.h | |||
@@ -76,6 +76,9 @@ enum dma_chan_status { | |||
76 | #define INTR_ON_BUF 2 | 76 | #define INTR_ON_BUF 2 |
77 | #define INTR_ON_ROW 3 | 77 | #define INTR_ON_ROW 3 |
78 | 78 | ||
79 | #define DMA_NOSYNC_KEEP_DMA_BUF 0 | ||
80 | #define DMA_SYNC_RESTART 1 | ||
81 | |||
79 | struct dmasg { | 82 | struct dmasg { |
80 | unsigned long next_desc_addr; | 83 | unsigned long next_desc_addr; |
81 | unsigned long start_addr; | 84 | unsigned long start_addr; |
@@ -157,7 +160,8 @@ void set_dma_y_count(unsigned int channel, unsigned short y_count); | |||
157 | void set_dma_y_modify(unsigned int channel, short y_modify); | 160 | void set_dma_y_modify(unsigned int channel, short y_modify); |
158 | void set_dma_config(unsigned int channel, unsigned short config); | 161 | void set_dma_config(unsigned int channel, unsigned short config); |
159 | unsigned short set_bfin_dma_config(char direction, char flow_mode, | 162 | unsigned short set_bfin_dma_config(char direction, char flow_mode, |
160 | char intr_mode, char dma_mode, char width); | 163 | char intr_mode, char dma_mode, char width, |
164 | char syncmode); | ||
161 | void set_dma_curr_addr(unsigned int channel, unsigned long addr); | 165 | void set_dma_curr_addr(unsigned int channel, unsigned long addr); |
162 | 166 | ||
163 | /* get curr status for polling */ | 167 | /* get curr status for polling */ |
diff --git a/include/asm-blackfin/gpio.h b/include/asm-blackfin/gpio.h index 33ce98ef7e0f..d0426c108262 100644 --- a/include/asm-blackfin/gpio.h +++ b/include/asm-blackfin/gpio.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * Description: | 7 | * Description: |
8 | * | 8 | * |
9 | * Modified: | 9 | * Modified: |
10 | * Copyright 2004-2006 Analog Devices Inc. | 10 | * Copyright 2004-2008 Analog Devices Inc. |
11 | * | 11 | * |
12 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | 12 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ |
13 | * | 13 | * |
@@ -304,39 +304,39 @@ | |||
304 | **************************************************************/ | 304 | **************************************************************/ |
305 | 305 | ||
306 | #ifndef BF548_FAMILY | 306 | #ifndef BF548_FAMILY |
307 | void set_gpio_dir(unsigned short, unsigned short); | 307 | void set_gpio_dir(unsigned, unsigned short); |
308 | void set_gpio_inen(unsigned short, unsigned short); | 308 | void set_gpio_inen(unsigned, unsigned short); |
309 | void set_gpio_polar(unsigned short, unsigned short); | 309 | void set_gpio_polar(unsigned, unsigned short); |
310 | void set_gpio_edge(unsigned short, unsigned short); | 310 | void set_gpio_edge(unsigned, unsigned short); |
311 | void set_gpio_both(unsigned short, unsigned short); | 311 | void set_gpio_both(unsigned, unsigned short); |
312 | void set_gpio_data(unsigned short, unsigned short); | 312 | void set_gpio_data(unsigned, unsigned short); |
313 | void set_gpio_maska(unsigned short, unsigned short); | 313 | void set_gpio_maska(unsigned, unsigned short); |
314 | void set_gpio_maskb(unsigned short, unsigned short); | 314 | void set_gpio_maskb(unsigned, unsigned short); |
315 | void set_gpio_toggle(unsigned short); | 315 | void set_gpio_toggle(unsigned); |
316 | void set_gpiop_dir(unsigned short, unsigned short); | 316 | void set_gpiop_dir(unsigned, unsigned short); |
317 | void set_gpiop_inen(unsigned short, unsigned short); | 317 | void set_gpiop_inen(unsigned, unsigned short); |
318 | void set_gpiop_polar(unsigned short, unsigned short); | 318 | void set_gpiop_polar(unsigned, unsigned short); |
319 | void set_gpiop_edge(unsigned short, unsigned short); | 319 | void set_gpiop_edge(unsigned, unsigned short); |
320 | void set_gpiop_both(unsigned short, unsigned short); | 320 | void set_gpiop_both(unsigned, unsigned short); |
321 | void set_gpiop_data(unsigned short, unsigned short); | 321 | void set_gpiop_data(unsigned, unsigned short); |
322 | void set_gpiop_maska(unsigned short, unsigned short); | 322 | void set_gpiop_maska(unsigned, unsigned short); |
323 | void set_gpiop_maskb(unsigned short, unsigned short); | 323 | void set_gpiop_maskb(unsigned, unsigned short); |
324 | unsigned short get_gpio_dir(unsigned short); | 324 | unsigned short get_gpio_dir(unsigned); |
325 | unsigned short get_gpio_inen(unsigned short); | 325 | unsigned short get_gpio_inen(unsigned); |
326 | unsigned short get_gpio_polar(unsigned short); | 326 | unsigned short get_gpio_polar(unsigned); |
327 | unsigned short get_gpio_edge(unsigned short); | 327 | unsigned short get_gpio_edge(unsigned); |
328 | unsigned short get_gpio_both(unsigned short); | 328 | unsigned short get_gpio_both(unsigned); |
329 | unsigned short get_gpio_maska(unsigned short); | 329 | unsigned short get_gpio_maska(unsigned); |
330 | unsigned short get_gpio_maskb(unsigned short); | 330 | unsigned short get_gpio_maskb(unsigned); |
331 | unsigned short get_gpio_data(unsigned short); | 331 | unsigned short get_gpio_data(unsigned); |
332 | unsigned short get_gpiop_dir(unsigned short); | 332 | unsigned short get_gpiop_dir(unsigned); |
333 | unsigned short get_gpiop_inen(unsigned short); | 333 | unsigned short get_gpiop_inen(unsigned); |
334 | unsigned short get_gpiop_polar(unsigned short); | 334 | unsigned short get_gpiop_polar(unsigned); |
335 | unsigned short get_gpiop_edge(unsigned short); | 335 | unsigned short get_gpiop_edge(unsigned); |
336 | unsigned short get_gpiop_both(unsigned short); | 336 | unsigned short get_gpiop_both(unsigned); |
337 | unsigned short get_gpiop_maska(unsigned short); | 337 | unsigned short get_gpiop_maska(unsigned); |
338 | unsigned short get_gpiop_maskb(unsigned short); | 338 | unsigned short get_gpiop_maskb(unsigned); |
339 | unsigned short get_gpiop_data(unsigned short); | 339 | unsigned short get_gpiop_data(unsigned); |
340 | 340 | ||
341 | struct gpio_port_t { | 341 | struct gpio_port_t { |
342 | unsigned short data; | 342 | unsigned short data; |
@@ -382,8 +382,8 @@ struct gpio_port_t { | |||
382 | #define PM_WAKE_LOW 0x8 | 382 | #define PM_WAKE_LOW 0x8 |
383 | #define PM_WAKE_BOTH_EDGES (PM_WAKE_RISING | PM_WAKE_FALLING) | 383 | #define PM_WAKE_BOTH_EDGES (PM_WAKE_RISING | PM_WAKE_FALLING) |
384 | 384 | ||
385 | int gpio_pm_wakeup_request(unsigned short gpio, unsigned char type); | 385 | int gpio_pm_wakeup_request(unsigned gpio, unsigned char type); |
386 | void gpio_pm_wakeup_free(unsigned short gpio); | 386 | void gpio_pm_wakeup_free(unsigned gpio); |
387 | unsigned int gpio_pm_setup(void); | 387 | unsigned int gpio_pm_setup(void); |
388 | void gpio_pm_restore(void); | 388 | void gpio_pm_restore(void); |
389 | 389 | ||
@@ -426,19 +426,19 @@ struct gpio_port_s { | |||
426 | * MODIFICATION HISTORY : | 426 | * MODIFICATION HISTORY : |
427 | **************************************************************/ | 427 | **************************************************************/ |
428 | 428 | ||
429 | int gpio_request(unsigned short, const char *); | 429 | int gpio_request(unsigned, const char *); |
430 | void gpio_free(unsigned short); | 430 | void gpio_free(unsigned); |
431 | 431 | ||
432 | void gpio_set_value(unsigned short gpio, unsigned short arg); | 432 | void gpio_set_value(unsigned gpio, int arg); |
433 | unsigned short gpio_get_value(unsigned short gpio); | 433 | int gpio_get_value(unsigned gpio); |
434 | 434 | ||
435 | #ifndef BF548_FAMILY | 435 | #ifndef BF548_FAMILY |
436 | #define gpio_get_value(gpio) get_gpio_data(gpio) | 436 | #define gpio_get_value(gpio) get_gpio_data(gpio) |
437 | #define gpio_set_value(gpio, value) set_gpio_data(gpio, value) | 437 | #define gpio_set_value(gpio, value) set_gpio_data(gpio, value) |
438 | #endif | 438 | #endif |
439 | 439 | ||
440 | void gpio_direction_input(unsigned short gpio); | 440 | int gpio_direction_input(unsigned gpio); |
441 | void gpio_direction_output(unsigned short gpio); | 441 | int gpio_direction_output(unsigned gpio, int value); |
442 | 442 | ||
443 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | 443 | #include <asm-generic/gpio.h> /* cansleep wrappers */ |
444 | #include <asm/irq.h> | 444 | #include <asm/irq.h> |
diff --git a/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h index 0b867e6a76c4..15dbc21eed8b 100644 --- a/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h +++ b/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h | |||
@@ -146,7 +146,7 @@ static void bfin_serial_hw_init(struct bfin_serial_port *uart) | |||
146 | 146 | ||
147 | if (uart->rts_pin >= 0) { | 147 | if (uart->rts_pin >= 0) { |
148 | gpio_request(uart->rts_pin, DRIVER_NAME); | 148 | gpio_request(uart->rts_pin, DRIVER_NAME); |
149 | gpio_direction_output(uart->rts_pin); | 149 | gpio_direction_output(uart->rts_pin, 0); |
150 | } | 150 | } |
151 | #endif | 151 | #endif |
152 | } | 152 | } |
diff --git a/include/asm-blackfin/mach-bf527/portmux.h b/include/asm-blackfin/mach-bf527/portmux.h index dcf001adc63c..ae4d205bfcf5 100644 --- a/include/asm-blackfin/mach-bf527/portmux.h +++ b/include/asm-blackfin/mach-bf527/portmux.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _MACH_PORTMUX_H_ | 1 | #ifndef _MACH_PORTMUX_H_ |
2 | #define _MACH_PORTMUX_H_ | 2 | #define _MACH_PORTMUX_H_ |
3 | 3 | ||
4 | #define MAX_RESOURCES MAX_BLACKFIN_GPIOS | ||
5 | |||
4 | #define P_PPI0_D0 (P_DEFINED | P_IDENT(GPIO_PF0) | P_FUNCT(0)) | 6 | #define P_PPI0_D0 (P_DEFINED | P_IDENT(GPIO_PF0) | P_FUNCT(0)) |
5 | #define P_PPI0_D1 (P_DEFINED | P_IDENT(GPIO_PF1) | P_FUNCT(0)) | 7 | #define P_PPI0_D1 (P_DEFINED | P_IDENT(GPIO_PF1) | P_FUNCT(0)) |
6 | #define P_PPI0_D2 (P_DEFINED | P_IDENT(GPIO_PF2) | P_FUNCT(0)) | 8 | #define P_PPI0_D2 (P_DEFINED | P_IDENT(GPIO_PF2) | P_FUNCT(0)) |
diff --git a/include/asm-blackfin/mach-bf533/anomaly.h b/include/asm-blackfin/mach-bf533/anomaly.h index f36ff5af1b91..98209d40abba 100644 --- a/include/asm-blackfin/mach-bf533/anomaly.h +++ b/include/asm-blackfin/mach-bf533/anomaly.h | |||
@@ -7,9 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | /* This file shoule be up to date with: | 9 | /* This file shoule be up to date with: |
10 | * - Revision X, March 23, 2007; ADSP-BF533 Blackfin Processor Anomaly List | 10 | * - Revision B, 12/10/2007; ADSP-BF531/BF532/BF533 Blackfin Processor Anomaly List |
11 | * - Revision AB, March 23, 2007; ADSP-BF532 Blackfin Processor Anomaly List | ||
12 | * - Revision W, March 23, 2007; ADSP-BF531 Blackfin Processor Anomaly List | ||
13 | */ | 11 | */ |
14 | 12 | ||
15 | #ifndef _MACH_ANOMALY_H_ | 13 | #ifndef _MACH_ANOMALY_H_ |
@@ -17,7 +15,7 @@ | |||
17 | 15 | ||
18 | /* We do not support 0.1 or 0.2 silicon - sorry */ | 16 | /* We do not support 0.1 or 0.2 silicon - sorry */ |
19 | #if __SILICON_REVISION__ < 3 | 17 | #if __SILICON_REVISION__ < 3 |
20 | # error Kernel will not work on BF533 silicon version 0.0, 0.1, or 0.2 | 18 | # error will not work on BF533 silicon version 0.0, 0.1, or 0.2 |
21 | #endif | 19 | #endif |
22 | 20 | ||
23 | #if defined(__ADSPBF531__) | 21 | #if defined(__ADSPBF531__) |
@@ -251,6 +249,12 @@ | |||
251 | #define ANOMALY_05000192 (__SILICON_REVISION__ < 3) | 249 | #define ANOMALY_05000192 (__SILICON_REVISION__ < 3) |
252 | /* Internal Voltage Regulator may not start up */ | 250 | /* Internal Voltage Regulator may not start up */ |
253 | #define ANOMALY_05000206 (__SILICON_REVISION__ < 3) | 251 | #define ANOMALY_05000206 (__SILICON_REVISION__ < 3) |
252 | /* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ | ||
253 | #define ANOMALY_05000357 (1) | ||
254 | /* PPI Underflow Error Goes Undetected in ITU-R 656 Mode */ | ||
255 | #define ANOMALY_05000366 (1) | ||
256 | /* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ | ||
257 | #define ANOMALY_05000371 (1) | ||
254 | 258 | ||
255 | /* Anomalies that don't exist on this proc */ | 259 | /* Anomalies that don't exist on this proc */ |
256 | #define ANOMALY_05000266 (0) | 260 | #define ANOMALY_05000266 (0) |
diff --git a/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h index 69b9f8e120e9..7871d4313f49 100644 --- a/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h +++ b/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h | |||
@@ -111,7 +111,7 @@ static void bfin_serial_hw_init(struct bfin_serial_port *uart) | |||
111 | } | 111 | } |
112 | if (uart->rts_pin >= 0) { | 112 | if (uart->rts_pin >= 0) { |
113 | gpio_request(uart->rts_pin, DRIVER_NAME); | 113 | gpio_request(uart->rts_pin, DRIVER_NAME); |
114 | gpio_direction_input(uart->rts_pin); | 114 | gpio_direction_input(uart->rts_pin, 0); |
115 | } | 115 | } |
116 | #endif | 116 | #endif |
117 | } | 117 | } |
diff --git a/include/asm-blackfin/mach-bf533/portmux.h b/include/asm-blackfin/mach-bf533/portmux.h index 137f4884acfe..685a2651dcda 100644 --- a/include/asm-blackfin/mach-bf533/portmux.h +++ b/include/asm-blackfin/mach-bf533/portmux.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _MACH_PORTMUX_H_ | 1 | #ifndef _MACH_PORTMUX_H_ |
2 | #define _MACH_PORTMUX_H_ | 2 | #define _MACH_PORTMUX_H_ |
3 | 3 | ||
4 | #define MAX_RESOURCES MAX_BLACKFIN_GPIOS | ||
5 | |||
4 | #define P_PPI0_CLK (P_DONTCARE) | 6 | #define P_PPI0_CLK (P_DONTCARE) |
5 | #define P_PPI0_FS1 (P_DONTCARE) | 7 | #define P_PPI0_FS1 (P_DONTCARE) |
6 | #define P_PPI0_FS2 (P_DONTCARE) | 8 | #define P_PPI0_FS2 (P_DONTCARE) |
diff --git a/include/asm-blackfin/mach-bf537/anomaly.h b/include/asm-blackfin/mach-bf537/anomaly.h index 2b66ecf489f7..746a794b3119 100644 --- a/include/asm-blackfin/mach-bf537/anomaly.h +++ b/include/asm-blackfin/mach-bf537/anomaly.h | |||
@@ -7,9 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | /* This file shoule be up to date with: | 9 | /* This file shoule be up to date with: |
10 | * - Revision M, March 13, 2007; ADSP-BF537 Blackfin Processor Anomaly List | 10 | * - Revision A, 09/04/2007; ADSP-BF534/ADSP-BF536/ADSP-BF537 Blackfin Processor Anomaly List |
11 | * - Revision L, March 13, 2007; ADSP-BF536 Blackfin Processor Anomaly List | ||
12 | * - Revision M, March 13, 2007; ADSP-BF534 Blackfin Processor Anomaly List | ||
13 | */ | 11 | */ |
14 | 12 | ||
15 | #ifndef _MACH_ANOMALY_H_ | 13 | #ifndef _MACH_ANOMALY_H_ |
@@ -17,7 +15,7 @@ | |||
17 | 15 | ||
18 | /* We do not support 0.1 silicon - sorry */ | 16 | /* We do not support 0.1 silicon - sorry */ |
19 | #if __SILICON_REVISION__ < 2 | 17 | #if __SILICON_REVISION__ < 2 |
20 | # error Kernel will not work on BF537 silicon version 0.0 or 0.1 | 18 | # error will not work on BF537 silicon version 0.0 or 0.1 |
21 | #endif | 19 | #endif |
22 | 20 | ||
23 | #if defined(__ADSPBF534__) | 21 | #if defined(__ADSPBF534__) |
@@ -44,6 +42,8 @@ | |||
44 | #define ANOMALY_05000122 (1) | 42 | #define ANOMALY_05000122 (1) |
45 | /* Killed 32-bit MMR write leads to next system MMR access thinking it should be 32-bit */ | 43 | /* Killed 32-bit MMR write leads to next system MMR access thinking it should be 32-bit */ |
46 | #define ANOMALY_05000157 (__SILICON_REVISION__ < 2) | 44 | #define ANOMALY_05000157 (__SILICON_REVISION__ < 2) |
45 | /* Turning SPORTs on while External Frame Sync Is Active May Corrupt Data */ | ||
46 | #define ANOMALY_05000167 (1) | ||
47 | /* PPI_DELAY not functional in PPI modes with 0 frame syncs */ | 47 | /* PPI_DELAY not functional in PPI modes with 0 frame syncs */ |
48 | #define ANOMALY_05000180 (1) | 48 | #define ANOMALY_05000180 (1) |
49 | /* Instruction Cache Is Not Functional */ | 49 | /* Instruction Cache Is Not Functional */ |
@@ -130,6 +130,12 @@ | |||
130 | #define ANOMALY_05000321 (__SILICON_REVISION__ < 3) | 130 | #define ANOMALY_05000321 (__SILICON_REVISION__ < 3) |
131 | /* EMAC RMII mode at 10-Base-T speed: RX frames not received properly */ | 131 | /* EMAC RMII mode at 10-Base-T speed: RX frames not received properly */ |
132 | #define ANOMALY_05000322 (1) | 132 | #define ANOMALY_05000322 (1) |
133 | /* Ethernet MAC MDIO Reads Do Not Meet IEEE Specification */ | ||
134 | #define ANOMALY_05000341 (__SILICON_REVISION__ >= 3) | ||
135 | /* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ | ||
136 | #define ANOMALY_05000357 (1) | ||
137 | /* DMAs that Go Urgent during Tight Core Writes to External Memory Are Blocked */ | ||
138 | #define ANOMALY_05000359 (1) | ||
133 | 139 | ||
134 | /* Anomalies that don't exist on this proc */ | 140 | /* Anomalies that don't exist on this proc */ |
135 | #define ANOMALY_05000125 (0) | 141 | #define ANOMALY_05000125 (0) |
diff --git a/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h index 6fb328f5186a..86e45c379838 100644 --- a/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h +++ b/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h | |||
@@ -146,7 +146,7 @@ static void bfin_serial_hw_init(struct bfin_serial_port *uart) | |||
146 | 146 | ||
147 | if (uart->rts_pin >= 0) { | 147 | if (uart->rts_pin >= 0) { |
148 | gpio_request(uart->rts_pin, DRIVER_NAME); | 148 | gpio_request(uart->rts_pin, DRIVER_NAME); |
149 | gpio_direction_output(uart->rts_pin); | 149 | gpio_direction_output(uart->rts_pin, 0); |
150 | } | 150 | } |
151 | #endif | 151 | #endif |
152 | } | 152 | } |
diff --git a/include/asm-blackfin/mach-bf537/portmux.h b/include/asm-blackfin/mach-bf537/portmux.h index 5a3f7d3bf73d..78fee6e0f237 100644 --- a/include/asm-blackfin/mach-bf537/portmux.h +++ b/include/asm-blackfin/mach-bf537/portmux.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _MACH_PORTMUX_H_ | 1 | #ifndef _MACH_PORTMUX_H_ |
2 | #define _MACH_PORTMUX_H_ | 2 | #define _MACH_PORTMUX_H_ |
3 | 3 | ||
4 | #define MAX_RESOURCES (MAX_BLACKFIN_GPIOS + GPIO_BANKSIZE) /* We additionally handle PORTJ */ | ||
5 | |||
4 | #define P_UART0_TX (P_DEFINED | P_IDENT(GPIO_PF0) | P_FUNCT(0)) | 6 | #define P_UART0_TX (P_DEFINED | P_IDENT(GPIO_PF0) | P_FUNCT(0)) |
5 | #define P_UART0_RX (P_DEFINED | P_IDENT(GPIO_PF1) | P_FUNCT(0)) | 7 | #define P_UART0_RX (P_DEFINED | P_IDENT(GPIO_PF1) | P_FUNCT(0)) |
6 | #define P_UART1_TX (P_DEFINED | P_IDENT(GPIO_PF2) | P_FUNCT(0)) | 8 | #define P_UART1_TX (P_DEFINED | P_IDENT(GPIO_PF2) | P_FUNCT(0)) |
diff --git a/include/asm-blackfin/mach-bf548/anomaly.h b/include/asm-blackfin/mach-bf548/anomaly.h index c5b63759cdee..850dc12eb7f2 100644 --- a/include/asm-blackfin/mach-bf548/anomaly.h +++ b/include/asm-blackfin/mach-bf548/anomaly.h | |||
@@ -7,7 +7,7 @@ | |||
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, July 16, 2007; ADSP-BF549 Silicon Anomaly List | 10 | * - Revision E, 11/28/2007; ADSP-BF542/BF544/BF547/BF548/BF549 Blackfin Processor Anomaly List |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #ifndef _MACH_ANOMALY_H_ | 13 | #ifndef _MACH_ANOMALY_H_ |
@@ -26,47 +26,59 @@ | |||
26 | /* Certain Data Cache Writethrough Modes Fail for Vddint <= 0.9V */ | 26 | /* Certain Data Cache Writethrough Modes Fail for Vddint <= 0.9V */ |
27 | #define ANOMALY_05000272 (1) | 27 | #define ANOMALY_05000272 (1) |
28 | /* False Hardware Error Exception when ISR context is not restored */ | 28 | /* False Hardware Error Exception when ISR context is not restored */ |
29 | #define ANOMALY_05000281 (1) | 29 | #define ANOMALY_05000281 (__SILICON_REVISION__ < 1) |
30 | /* SSYNCs After Writes To CAN/DMA MMR Registers Are Not Always Handled Correctly */ | 30 | /* SSYNCs After Writes To CAN/DMA MMR Registers Are Not Always Handled Correctly */ |
31 | #define ANOMALY_05000304 (1) | 31 | #define ANOMALY_05000304 (__SILICON_REVISION__ < 1) |
32 | /* False Hardware Errors Caused by Fetches at the Boundary of Reserved Memory */ | 32 | /* False Hardware Errors Caused by Fetches at the Boundary of Reserved Memory */ |
33 | #define ANOMALY_05000310 (1) | 33 | #define ANOMALY_05000310 (1) |
34 | /* Errors When SSYNC, CSYNC, or Loads to LT, LB and LC Registers Are Interrupted */ | 34 | /* Errors When SSYNC, CSYNC, or Loads to LT, LB and LC Registers Are Interrupted */ |
35 | #define ANOMALY_05000312 (1) | 35 | #define ANOMALY_05000312 (__SILICON_REVISION__ < 1) |
36 | /* TWI Slave Boot Mode Is Not Functional */ | 36 | /* TWI Slave Boot Mode Is Not Functional */ |
37 | #define ANOMALY_05000324 (1) | 37 | #define ANOMALY_05000324 (__SILICON_REVISION__ < 1) |
38 | /* External FIFO Boot Mode Is Not Functional */ | 38 | /* External FIFO Boot Mode Is Not Functional */ |
39 | #define ANOMALY_05000325 (1) | 39 | #define ANOMALY_05000325 (__SILICON_REVISION__ < 1) |
40 | /* Data Lost When Core and DMA Accesses Are Made to the USB FIFO Simultaneously */ | 40 | /* Data Lost When Core and DMA Accesses Are Made to the USB FIFO Simultaneously */ |
41 | #define ANOMALY_05000327 (1) | 41 | #define ANOMALY_05000327 (__SILICON_REVISION__ < 1) |
42 | /* Incorrect Access of OTP_STATUS During otp_write() Function */ | 42 | /* Incorrect Access of OTP_STATUS During otp_write() Function */ |
43 | #define ANOMALY_05000328 (1) | 43 | #define ANOMALY_05000328 (__SILICON_REVISION__ < 1) |
44 | /* Synchronous Burst Flash Boot Mode Is Not Functional */ | 44 | /* Synchronous Burst Flash Boot Mode Is Not Functional */ |
45 | #define ANOMALY_05000329 (1) | 45 | #define ANOMALY_05000329 (__SILICON_REVISION__ < 1) |
46 | /* Host DMA Boot Mode Is Not Functional */ | 46 | /* Host DMA Boot Mode Is Not Functional */ |
47 | #define ANOMALY_05000330 (1) | 47 | #define ANOMALY_05000330 (__SILICON_REVISION__ < 1) |
48 | /* Inadequate Timing Margins on DDR DQS to DQ and DQM Skew */ | 48 | /* Inadequate Timing Margins on DDR DQS to DQ and DQM Skew */ |
49 | #define ANOMALY_05000334 (1) | 49 | #define ANOMALY_05000334 (__SILICON_REVISION__ < 1) |
50 | /* Inadequate Rotary Debounce Logic Duration */ | 50 | /* Inadequate Rotary Debounce Logic Duration */ |
51 | #define ANOMALY_05000335 (1) | 51 | #define ANOMALY_05000335 (__SILICON_REVISION__ < 1) |
52 | /* Phantom Interrupt Occurs After First Configuration of Host DMA Port */ | 52 | /* Phantom Interrupt Occurs After First Configuration of Host DMA Port */ |
53 | #define ANOMALY_05000336 (1) | 53 | #define ANOMALY_05000336 (__SILICON_REVISION__ < 1) |
54 | /* Disallowed Configuration Prevents Subsequent Allowed Configuration on Host DMA Port */ | 54 | /* Disallowed Configuration Prevents Subsequent Allowed Configuration on Host DMA Port */ |
55 | #define ANOMALY_05000337 (1) | 55 | #define ANOMALY_05000337 (__SILICON_REVISION__ < 1) |
56 | /* Slave-Mode SPI0 MISO Failure With CPHA = 0 */ | 56 | /* Slave-Mode SPI0 MISO Failure With CPHA = 0 */ |
57 | #define ANOMALY_05000338 (1) | 57 | #define ANOMALY_05000338 (__SILICON_REVISION__ < 1) |
58 | /* If Memory Reads Are Enabled on SDH or HOSTDP, Other DMAC1 Peripherals Cannot Read */ | 58 | /* If Memory Reads Are Enabled on SDH or HOSTDP, Other DMAC1 Peripherals Cannot Read */ |
59 | #define ANOMALY_05000340 (1) | 59 | #define ANOMALY_05000340 (__SILICON_REVISION__ < 1) |
60 | /* Boot Host Wait (HWAIT) and Boot Host Wait Alternate (HWAITA) Signals Are Swapped */ | 60 | /* Boot Host Wait (HWAIT) and Boot Host Wait Alternate (HWAITA) Signals Are Swapped */ |
61 | #define ANOMALY_05000344 (1) | 61 | #define ANOMALY_05000344 (__SILICON_REVISION__ < 1) |
62 | /* USB Calibration Value Is Not Intialized */ | 62 | /* USB Calibration Value Is Not Intialized */ |
63 | #define ANOMALY_05000346 (1) | 63 | #define ANOMALY_05000346 (__SILICON_REVISION__ < 1) |
64 | /* Boot ROM Kernel Incorrectly Alters Reset Value of USB Register */ | 64 | /* Boot ROM Kernel Incorrectly Alters Reset Value of USB Register */ |
65 | #define ANOMALY_05000347 (1) | 65 | #define ANOMALY_05000347 (__SILICON_REVISION__ < 1) |
66 | /* Data Lost when Core Reads SDH Data FIFO */ | 66 | /* Data Lost when Core Reads SDH Data FIFO */ |
67 | #define ANOMALY_05000349 (1) | 67 | #define ANOMALY_05000349 (__SILICON_REVISION__ < 1) |
68 | /* PLL Status Register Is Inaccurate */ | 68 | /* PLL Status Register Is Inaccurate */ |
69 | #define ANOMALY_05000351 (1) | 69 | #define ANOMALY_05000351 (__SILICON_REVISION__ < 1) |
70 | /* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ | ||
71 | #define ANOMALY_05000357 (1) | ||
72 | /* External Memory Read Access Hangs Core With PLL Bypass */ | ||
73 | #define ANOMALY_05000360 (1) | ||
74 | /* DMAs that Go Urgent during Tight Core Writes to External Memory Are Blocked */ | ||
75 | #define ANOMALY_05000365 (1) | ||
76 | /* Addressing Conflict between Boot ROM and Asynchronous Memory */ | ||
77 | #define ANOMALY_05000369 (1) | ||
78 | /* Mobile DDR Operation Not Functional */ | ||
79 | #define ANOMALY_05000377 (1) | ||
80 | /* Security/Authentication Speedpath Causes Authentication To Fail To Initiate */ | ||
81 | #define ANOMALY_05000378 (1) | ||
70 | 82 | ||
71 | /* Anomalies that don't exist on this proc */ | 83 | /* Anomalies that don't exist on this proc */ |
72 | #define ANOMALY_05000125 (0) | 84 | #define ANOMALY_05000125 (0) |
diff --git a/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h index f21a1620e6bd..3770aa38ee9f 100644 --- a/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h +++ b/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h | |||
@@ -186,7 +186,7 @@ static void bfin_serial_hw_init(struct bfin_serial_port *uart) | |||
186 | 186 | ||
187 | if (uart->rts_pin >= 0) { | 187 | if (uart->rts_pin >= 0) { |
188 | gpio_request(uart->rts_pin, DRIVER_NAME); | 188 | gpio_request(uart->rts_pin, DRIVER_NAME); |
189 | gpio_direction_output(uart->rts_pin); | 189 | gpio_direction_output(uart->rts_pin, 0); |
190 | } | 190 | } |
191 | #endif | 191 | #endif |
192 | } | 192 | } |
diff --git a/include/asm-blackfin/mach-bf548/cdefBF54x_base.h b/include/asm-blackfin/mach-bf548/cdefBF54x_base.h index aefab3f618c1..19ddcd83c71f 100644 --- a/include/asm-blackfin/mach-bf548/cdefBF54x_base.h +++ b/include/asm-blackfin/mach-bf548/cdefBF54x_base.h | |||
@@ -244,39 +244,6 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
244 | #define bfin_read_TWI0_RCV_DATA16() bfin_read16(TWI0_RCV_DATA16) | 244 | #define bfin_read_TWI0_RCV_DATA16() bfin_read16(TWI0_RCV_DATA16) |
245 | #define bfin_write_TWI0_RCV_DATA16(val) bfin_write16(TWI0_RCV_DATA16, val) | 245 | #define bfin_write_TWI0_RCV_DATA16(val) bfin_write16(TWI0_RCV_DATA16, val) |
246 | 246 | ||
247 | #define bfin_read_TWI_CLKDIV() bfin_read16(TWI0_CLKDIV) | ||
248 | #define bfin_write_TWI_CLKDIV(val) bfin_write16(TWI0_CLKDIV, val) | ||
249 | #define bfin_read_TWI_CONTROL() bfin_read16(TWI0_CONTROL) | ||
250 | #define bfin_write_TWI_CONTROL(val) bfin_write16(TWI0_CONTROL, val) | ||
251 | #define bfin_read_TWI_SLAVE_CTRL() bfin_read16(TWI0_SLAVE_CTRL) | ||
252 | #define bfin_write_TWI_SLAVE_CTRL(val) bfin_write16(TWI0_SLAVE_CTRL, val) | ||
253 | #define bfin_read_TWI_SLAVE_STAT() bfin_read16(TWI0_SLAVE_STAT) | ||
254 | #define bfin_write_TWI_SLAVE_STAT(val) bfin_write16(TWI0_SLAVE_STAT, val) | ||
255 | #define bfin_read_TWI_SLAVE_ADDR() bfin_read16(TWI0_SLAVE_ADDR) | ||
256 | #define bfin_write_TWI_SLAVE_ADDR(val) bfin_write16(TWI0_SLAVE_ADDR, val) | ||
257 | #define bfin_read_TWI_MASTER_CTL() bfin_read16(TWI0_MASTER_CTRL) | ||
258 | #define bfin_write_TWI_MASTER_CTL(val) bfin_write16(TWI0_MASTER_CTRL, val) | ||
259 | #define bfin_read_TWI_MASTER_STAT() bfin_read16(TWI0_MASTER_STAT) | ||
260 | #define bfin_write_TWI_MASTER_STAT(val) bfin_write16(TWI0_MASTER_STAT, val) | ||
261 | #define bfin_read_TWI_MASTER_ADDR() bfin_read16(TWI0_MASTER_ADDR) | ||
262 | #define bfin_write_TWI_MASTER_ADDR(val) bfin_write16(TWI0_MASTER_ADDR, val) | ||
263 | #define bfin_read_TWI_INT_STAT() bfin_read16(TWI0_INT_STAT) | ||
264 | #define bfin_write_TWI_INT_STAT(val) bfin_write16(TWI0_INT_STAT, val) | ||
265 | #define bfin_read_TWI_INT_MASK() bfin_read16(TWI0_INT_MASK) | ||
266 | #define bfin_write_TWI_INT_MASK(val) bfin_write16(TWI0_INT_MASK, val) | ||
267 | #define bfin_read_TWI_FIFO_CTL() bfin_read16(TWI0_FIFO_CTRL) | ||
268 | #define bfin_write_TWI_FIFO_CTL(val) bfin_write16(TWI0_FIFO_CTRL, val) | ||
269 | #define bfin_read_TWI_FIFO_STAT() bfin_read16(TWI0_FIFO_STAT) | ||
270 | #define bfin_write_TWI_FIFO_STAT(val) bfin_write16(TWI0_FIFO_STAT, val) | ||
271 | #define bfin_read_TWI_XMT_DATA8() bfin_read16(TWI0_XMT_DATA8) | ||
272 | #define bfin_write_TWI_XMT_DATA8(val) bfin_write16(TWI0_XMT_DATA8, val) | ||
273 | #define bfin_read_TWI_XMT_DATA16() bfin_read16(TWI0_XMT_DATA16) | ||
274 | #define bfin_write_TWI_XMT_DATA16(val) bfin_write16(TWI0_XMT_DATA16, val) | ||
275 | #define bfin_read_TWI_RCV_DATA8() bfin_read16(TWI0_RCV_DATA8) | ||
276 | #define bfin_write_TWI_RCV_DATA8(val) bfin_write16(TWI0_RCV_DATA8, val) | ||
277 | #define bfin_read_TWI_RCV_DATA16() bfin_read16(TWI0_RCV_DATA16) | ||
278 | #define bfin_write_TWI_RCV_DATA16(val) bfin_write16(TWI0_RCV_DATA16, val) | ||
279 | |||
280 | /* SPORT0 is not defined in the shared file because it is not available on the ADSP-BF542 and ADSP-BF544 bfin_read_()rocessors */ | 247 | /* SPORT0 is not defined in the shared file because it is not available on the ADSP-BF542 and ADSP-BF544 bfin_read_()rocessors */ |
281 | 248 | ||
282 | /* SPORT1 Registers */ | 249 | /* SPORT1 Registers */ |
diff --git a/include/asm-blackfin/mach-bf548/defBF542.h b/include/asm-blackfin/mach-bf548/defBF542.h index 32d07130200c..a7c809f29ede 100644 --- a/include/asm-blackfin/mach-bf548/defBF542.h +++ b/include/asm-blackfin/mach-bf548/defBF542.h | |||
@@ -432,8 +432,8 @@ | |||
432 | 432 | ||
433 | #define CMD_CRC_FAIL 0x1 /* CMD CRC Fail */ | 433 | #define CMD_CRC_FAIL 0x1 /* CMD CRC Fail */ |
434 | #define DAT_CRC_FAIL 0x2 /* Data CRC Fail */ | 434 | #define DAT_CRC_FAIL 0x2 /* Data CRC Fail */ |
435 | #define CMD_TIMEOUT 0x4 /* CMD Time Out */ | 435 | #define CMD_TIME_OUT 0x4 /* CMD Time Out */ |
436 | #define DAT_TIMEOUT 0x8 /* Data Time Out */ | 436 | #define DAT_TIME_OUT 0x8 /* Data Time Out */ |
437 | #define TX_UNDERRUN 0x10 /* Transmit Underrun */ | 437 | #define TX_UNDERRUN 0x10 /* Transmit Underrun */ |
438 | #define RX_OVERRUN 0x20 /* Receive Overrun */ | 438 | #define RX_OVERRUN 0x20 /* Receive Overrun */ |
439 | #define CMD_RESP_END 0x40 /* CMD Response End */ | 439 | #define CMD_RESP_END 0x40 /* CMD Response End */ |
diff --git a/include/asm-blackfin/mach-bf548/defBF548.h b/include/asm-blackfin/mach-bf548/defBF548.h index ecbca952985c..e46f56891e6a 100644 --- a/include/asm-blackfin/mach-bf548/defBF548.h +++ b/include/asm-blackfin/mach-bf548/defBF548.h | |||
@@ -1095,8 +1095,8 @@ | |||
1095 | 1095 | ||
1096 | #define CMD_CRC_FAIL 0x1 /* CMD CRC Fail */ | 1096 | #define CMD_CRC_FAIL 0x1 /* CMD CRC Fail */ |
1097 | #define DAT_CRC_FAIL 0x2 /* Data CRC Fail */ | 1097 | #define DAT_CRC_FAIL 0x2 /* Data CRC Fail */ |
1098 | #define CMD_TIMEOUT 0x4 /* CMD Time Out */ | 1098 | #define CMD_TIME_OUT 0x4 /* CMD Time Out */ |
1099 | #define DAT_TIMEOUT 0x8 /* Data Time Out */ | 1099 | #define DAT_TIME_OUT 0x8 /* Data Time Out */ |
1100 | #define TX_UNDERRUN 0x10 /* Transmit Underrun */ | 1100 | #define TX_UNDERRUN 0x10 /* Transmit Underrun */ |
1101 | #define RX_OVERRUN 0x20 /* Receive Overrun */ | 1101 | #define RX_OVERRUN 0x20 /* Receive Overrun */ |
1102 | #define CMD_RESP_END 0x40 /* CMD Response End */ | 1102 | #define CMD_RESP_END 0x40 /* CMD Response End */ |
diff --git a/include/asm-blackfin/mach-bf548/defBF54x_base.h b/include/asm-blackfin/mach-bf548/defBF54x_base.h index 319a48590c9c..08f90c21fe8a 100644 --- a/include/asm-blackfin/mach-bf548/defBF54x_base.h +++ b/include/asm-blackfin/mach-bf548/defBF54x_base.h | |||
@@ -1772,17 +1772,36 @@ | |||
1772 | #define TRP 0x3c0000 /* Pre charge-to-active command period */ | 1772 | #define TRP 0x3c0000 /* Pre charge-to-active command period */ |
1773 | #define TRAS 0x3c00000 /* Min Active-to-pre charge time */ | 1773 | #define TRAS 0x3c00000 /* Min Active-to-pre charge time */ |
1774 | #define TRC 0x3c000000 /* Active-to-active time */ | 1774 | #define TRC 0x3c000000 /* Active-to-active time */ |
1775 | #define DDR_TRAS(x) ((x<<22)&TRAS) /* DDR tRAS = (1~15) cycles */ | ||
1776 | #define DDR_TRP(x) ((x<<18)&TRP) /* DDR tRP = (1~15) cycles */ | ||
1777 | #define DDR_TRC(x) ((x<<26)&TRC) /* DDR tRC = (1~15) cycles */ | ||
1778 | #define DDR_TRFC(x) ((x<<14)&TRFC) /* DDR tRFC = (1~15) cycles */ | ||
1779 | #define DDR_TREFI(x) (x&TREFI) /* DDR tRFC = (1~15) cycles */ | ||
1775 | 1780 | ||
1776 | /* Bit masks for EBIU_DDRCTL1 */ | 1781 | /* Bit masks for EBIU_DDRCTL1 */ |
1777 | 1782 | ||
1778 | #define TRCD 0xf /* Active-to-Read/write delay */ | 1783 | #define TRCD 0xf /* Active-to-Read/write delay */ |
1779 | #define MRD 0xf0 /* Mode register set to active */ | 1784 | #define TMRD 0xf0 /* Mode register set to active */ |
1780 | #define TWR 0x300 /* Write Recovery time */ | 1785 | #define TWR 0x300 /* Write Recovery time */ |
1781 | #define DDRDATWIDTH 0x3000 /* DDR data width */ | 1786 | #define DDRDATWIDTH 0x3000 /* DDR data width */ |
1782 | #define EXTBANKS 0xc000 /* External banks */ | 1787 | #define EXTBANKS 0xc000 /* External banks */ |
1783 | #define DDRDEVWIDTH 0x30000 /* DDR device width */ | 1788 | #define DDRDEVWIDTH 0x30000 /* DDR device width */ |
1784 | #define DDRDEVSIZE 0xc0000 /* DDR device size */ | 1789 | #define DDRDEVSIZE 0xc0000 /* DDR device size */ |
1785 | #define TWWTR 0xf0000000 /* Write-to-read delay */ | 1790 | #define TWTR 0xf0000000 /* Write-to-read delay */ |
1791 | #define DDR_TWTR(x) ((x<<28)&TWTR) /* DDR tWTR = (1~15) cycles */ | ||
1792 | #define DDR_TMRD(x) ((x<<4)&TMRD) /* DDR tMRD = (1~15) cycles */ | ||
1793 | #define DDR_TWR(x) ((x<<8)&TWR) /* DDR tWR = (1~15) cycles */ | ||
1794 | #define DDR_TRCD(x) (x&TRCD) /* DDR tRCD = (1~15) cycles */ | ||
1795 | #define DDR_DATWIDTH 0x2000 /* DDR data width */ | ||
1796 | #define EXTBANK_1 0 /* 1 external bank */ | ||
1797 | #define EXTBANK_2 0x4000 /* 2 external banks */ | ||
1798 | #define DEVSZ_64 0x40000 /* DDR External Bank Size = 64MB */ | ||
1799 | #define DEVSZ_128 0x80000 /* DDR External Bank Size = 128MB */ | ||
1800 | #define DEVSZ_256 0xc0000 /* DDR External Bank Size = 256MB */ | ||
1801 | #define DEVSZ_512 0 /* DDR External Bank Size = 512MB */ | ||
1802 | #define DEVWD_4 0 /* DDR Device Width = 4 Bits */ | ||
1803 | #define DEVWD_8 0x10000 /* DDR Device Width = 8 Bits */ | ||
1804 | #define DEVWD_16 0x20000 /* DDR Device Width = 16 Bits */ | ||
1786 | 1805 | ||
1787 | /* Bit masks for EBIU_DDRCTL2 */ | 1806 | /* Bit masks for EBIU_DDRCTL2 */ |
1788 | 1807 | ||
@@ -1790,6 +1809,10 @@ | |||
1790 | #define CASLATENCY 0x70 /* CAS latency */ | 1809 | #define CASLATENCY 0x70 /* CAS latency */ |
1791 | #define DLLRESET 0x100 /* DLL Reset */ | 1810 | #define DLLRESET 0x100 /* DLL Reset */ |
1792 | #define REGE 0x1000 /* Register mode enable */ | 1811 | #define REGE 0x1000 /* Register mode enable */ |
1812 | #define CL_1_5 0x50 /* DDR CAS Latency = 1.5 cycles */ | ||
1813 | #define CL_2 0x20 /* DDR CAS Latency = 2 cycles */ | ||
1814 | #define CL_2_5 0x60 /* DDR CAS Latency = 2.5 cycles */ | ||
1815 | #define CL_3 0x30 /* DDR CAS Latency = 3 cycles */ | ||
1793 | 1816 | ||
1794 | /* Bit masks for EBIU_DDRCTL3 */ | 1817 | /* Bit masks for EBIU_DDRCTL3 */ |
1795 | 1818 | ||
@@ -2257,6 +2280,10 @@ | |||
2257 | 2280 | ||
2258 | #define CSEL 0x30 /* Core Select */ | 2281 | #define CSEL 0x30 /* Core Select */ |
2259 | #define SSEL 0xf /* System Select */ | 2282 | #define SSEL 0xf /* System Select */ |
2283 | #define CSEL_DIV1 0x0000 /* CCLK = VCO / 1 */ | ||
2284 | #define CSEL_DIV2 0x0010 /* CCLK = VCO / 2 */ | ||
2285 | #define CSEL_DIV4 0x0020 /* CCLK = VCO / 4 */ | ||
2286 | #define CSEL_DIV8 0x0030 /* CCLK = VCO / 8 */ | ||
2260 | 2287 | ||
2261 | /* Bit masks for PLL_CTL */ | 2288 | /* Bit masks for PLL_CTL */ |
2262 | 2289 | ||
diff --git a/include/asm-blackfin/mach-bf548/irq.h b/include/asm-blackfin/mach-bf548/irq.h index 9fb7bc5399a8..c34507a3f1df 100644 --- a/include/asm-blackfin/mach-bf548/irq.h +++ b/include/asm-blackfin/mach-bf548/irq.h | |||
@@ -88,7 +88,7 @@ Events (highest priority) EMU 0 | |||
88 | #define IRQ_PINT1 BFIN_IRQ(20) /* PINT1 Interrupt */ | 88 | #define IRQ_PINT1 BFIN_IRQ(20) /* PINT1 Interrupt */ |
89 | #define IRQ_MDMAS0 BFIN_IRQ(21) /* MDMA Stream 0 Interrupt */ | 89 | #define IRQ_MDMAS0 BFIN_IRQ(21) /* MDMA Stream 0 Interrupt */ |
90 | #define IRQ_MDMAS1 BFIN_IRQ(22) /* MDMA Stream 1 Interrupt */ | 90 | #define IRQ_MDMAS1 BFIN_IRQ(22) /* MDMA Stream 1 Interrupt */ |
91 | #define IRQ_WATCHDOG BFIN_IRQ(23) /* Watchdog Interrupt */ | 91 | #define IRQ_WATCH BFIN_IRQ(23) /* Watchdog Interrupt */ |
92 | #define IRQ_DMAC1_ERROR BFIN_IRQ(24) /* DMAC1 Status (Error) Interrupt */ | 92 | #define IRQ_DMAC1_ERROR BFIN_IRQ(24) /* DMAC1 Status (Error) Interrupt */ |
93 | #define IRQ_SPORT2_ERROR BFIN_IRQ(25) /* SPORT2 Error Interrupt */ | 93 | #define IRQ_SPORT2_ERROR BFIN_IRQ(25) /* SPORT2 Error Interrupt */ |
94 | #define IRQ_SPORT3_ERROR BFIN_IRQ(26) /* SPORT3 Error Interrupt */ | 94 | #define IRQ_SPORT3_ERROR BFIN_IRQ(26) /* SPORT3 Error Interrupt */ |
@@ -406,7 +406,7 @@ Events (highest priority) EMU 0 | |||
406 | #define IRQ_PINT1_POS 16 | 406 | #define IRQ_PINT1_POS 16 |
407 | #define IRQ_MDMAS0_POS 20 | 407 | #define IRQ_MDMAS0_POS 20 |
408 | #define IRQ_MDMAS1_POS 24 | 408 | #define IRQ_MDMAS1_POS 24 |
409 | #define IRQ_WATCHDOG_POS 28 | 409 | #define IRQ_WATCH_POS 28 |
410 | 410 | ||
411 | /* IAR3 BIT FIELDS */ | 411 | /* IAR3 BIT FIELDS */ |
412 | #define IRQ_DMAC1_ERR_POS 0 | 412 | #define IRQ_DMAC1_ERR_POS 0 |
diff --git a/include/asm-blackfin/mach-bf548/mem_init.h b/include/asm-blackfin/mach-bf548/mem_init.h index 0cb279e973d7..befc2903d5a5 100644 --- a/include/asm-blackfin/mach-bf548/mem_init.h +++ b/include/asm-blackfin/mach-bf548/mem_init.h | |||
@@ -28,8 +28,68 @@ | |||
28 | * If not, write to the Free Software Foundation, | 28 | * If not, write to the Free Software Foundation, |
29 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 29 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
30 | */ | 30 | */ |
31 | #define MIN_DDR_SCLK(x) (x*(CONFIG_SCLK_HZ/1000/1000)/1000 + 1) | ||
32 | |||
33 | #if (CONFIG_MEM_MT46V32M16_6T) | ||
34 | #define DDR_SIZE DEVSZ_512 | ||
35 | #define DDR_WIDTH DEVWD_16 | ||
36 | |||
37 | #define DDR_tRC DDR_TRC(MIN_DDR_SCLK(60)) | ||
38 | #define DDR_tRAS DDR_TRAS(MIN_DDR_SCLK(42)) | ||
39 | #define DDR_tRP DDR_TRP(MIN_DDR_SCLK(15)) | ||
40 | #define DDR_tRFC DDR_TRFC(MIN_DDR_SCLK(72)) | ||
41 | #define DDR_tREFI DDR_TREFI(MIN_DDR_SCLK(7800)) | ||
42 | |||
43 | #define DDR_tRCD DDR_TRCD(MIN_DDR_SCLK(15)) | ||
44 | #define DDR_tWTR DDR_TWTR(1) | ||
45 | #define DDR_tMRD DDR_TMRD(MIN_DDR_SCLK(12)) | ||
46 | #define DDR_tWR DDR_TWR(MIN_DDR_SCLK(15)) | ||
47 | #endif | ||
48 | |||
49 | #if (CONFIG_MEM_MT46V32M16_5B) | ||
50 | #define DDR_SIZE DEVSZ_512 | ||
51 | #define DDR_WIDTH DEVWD_16 | ||
52 | |||
53 | #define DDR_tRC DDR_TRC(MIN_DDR_SCLK(55)) | ||
54 | #define DDR_tRAS DDR_TRAS(MIN_DDR_SCLK(40)) | ||
55 | #define DDR_tRP DDR_TRP(MIN_DDR_SCLK(15)) | ||
56 | #define DDR_tRFC DDR_TRFC(MIN_DDR_SCLK(70)) | ||
57 | #define DDR_tREFI DDR_TREFI(MIN_DDR_SCLK(7800)) | ||
58 | |||
59 | #define DDR_tRCD DDR_TRCD(MIN_DDR_SCLK(15)) | ||
60 | #define DDR_tWTR DDR_TWTR(2) | ||
61 | #define DDR_tMRD DDR_TMRD(MIN_DDR_SCLK(10)) | ||
62 | #define DDR_tWR DDR_TWR(MIN_DDR_SCLK(15)) | ||
63 | #endif | ||
64 | |||
65 | #if (CONFIG_MEM_GENERIC_BOARD) | ||
66 | #define DDR_SIZE DEVSZ_512 | ||
67 | #define DDR_WIDTH DEVWD_16 | ||
68 | |||
69 | #define DDR_tRCD DDR_TRCD(3) | ||
70 | #define DDR_tWTR DDR_TWTR(2) | ||
71 | #define DDR_tWR DDR_TWR(2) | ||
72 | #define DDR_tMRD DDR_TMRD(2) | ||
73 | #define DDR_tRP DDR_TRP(3) | ||
74 | #define DDR_tRAS DDR_TRAS(7) | ||
75 | #define DDR_tRC DDR_TRC(10) | ||
76 | #define DDR_tRFC DDR_TRFC(12) | ||
77 | #define DDR_tREFI DDR_TREFI(1288) | ||
78 | #endif | ||
79 | |||
80 | #if (CONFIG_SCLK_HZ <= 133333333) | ||
81 | #define DDR_CL CL_2 | ||
82 | #elif (CONFIG_SCLK_HZ <= 166666666) | ||
83 | #define DDR_CL CL_2_5 | ||
84 | #else | ||
85 | #define DDR_CL CL_3 | ||
86 | #endif | ||
87 | |||
88 | #define mem_DDRCTL0 (DDR_tRP | DDR_tRAS | DDR_tRC | DDR_tRFC | DDR_tREFI) | ||
89 | #define mem_DDRCTL1 (DDR_DATWIDTH | EXTBANK_1 | DDR_SIZE | DDR_WIDTH | DDR_tWTR \ | ||
90 | | DDR_tMRD | DDR_tWR | DDR_tRCD) | ||
91 | #define mem_DDRCTL2 DDR_CL | ||
31 | 92 | ||
32 | #if (CONFIG_MEM_MT46V32M16) | ||
33 | 93 | ||
34 | #if defined CONFIG_CLKIN_HALF | 94 | #if defined CONFIG_CLKIN_HALF |
35 | #define CLKIN_HALF 1 | 95 | #define CLKIN_HALF 1 |
diff --git a/include/asm-blackfin/mach-bf548/portmux.h b/include/asm-blackfin/mach-bf548/portmux.h index 6b485120015f..8177a567dcdb 100644 --- a/include/asm-blackfin/mach-bf548/portmux.h +++ b/include/asm-blackfin/mach-bf548/portmux.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _MACH_PORTMUX_H_ | 1 | #ifndef _MACH_PORTMUX_H_ |
2 | #define _MACH_PORTMUX_H_ | 2 | #define _MACH_PORTMUX_H_ |
3 | 3 | ||
4 | #define MAX_RESOURCES MAX_BLACKFIN_GPIOS | ||
5 | |||
4 | #define P_SPORT2_TFS (P_DEFINED | P_IDENT(GPIO_PA0) | P_FUNCT(0)) | 6 | #define P_SPORT2_TFS (P_DEFINED | P_IDENT(GPIO_PA0) | P_FUNCT(0)) |
5 | #define P_SPORT2_DTSEC (P_DEFINED | P_IDENT(GPIO_PA1) | P_FUNCT(0)) | 7 | #define P_SPORT2_DTSEC (P_DEFINED | P_IDENT(GPIO_PA1) | P_FUNCT(0)) |
6 | #define P_SPORT2_DTPRI (P_DEFINED | P_IDENT(GPIO_PA2) | P_FUNCT(0)) | 8 | #define P_SPORT2_DTPRI (P_DEFINED | P_IDENT(GPIO_PA2) | P_FUNCT(0)) |
diff --git a/include/asm-blackfin/mach-bf561/anomaly.h b/include/asm-blackfin/mach-bf561/anomaly.h index bed956456884..0c1d46193939 100644 --- a/include/asm-blackfin/mach-bf561/anomaly.h +++ b/include/asm-blackfin/mach-bf561/anomaly.h | |||
@@ -7,7 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | /* This file shoule be up to date with: | 9 | /* This file shoule be up to date with: |
10 | * - Revision N, March 28, 2007; ADSP-BF561 Silicon Anomaly List | 10 | * - Revision O, 11/15/2007; ADSP-BF561 Blackfin Processor Anomaly List |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #ifndef _MACH_ANOMALY_H_ | 13 | #ifndef _MACH_ANOMALY_H_ |
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | /* We do not support 0.1, 0.2, or 0.4 silicon - sorry */ | 16 | /* We do not support 0.1, 0.2, or 0.4 silicon - sorry */ |
17 | #if __SILICON_REVISION__ < 3 || __SILICON_REVISION__ == 4 | 17 | #if __SILICON_REVISION__ < 3 || __SILICON_REVISION__ == 4 |
18 | # error Kernel will not work on BF561 silicon version 0.0, 0.1, 0.2, or 0.4 | 18 | # error will not work on BF561 silicon version 0.0, 0.1, 0.2, or 0.4 |
19 | #endif | 19 | #endif |
20 | 20 | ||
21 | /* Multi-Issue Instruction with dsp32shiftimm in slot1 and P-reg Store in slot 2 Not Supported */ | 21 | /* Multi-Issue Instruction with dsp32shiftimm in slot1 and P-reg Store in slot 2 Not Supported */ |
@@ -208,6 +208,8 @@ | |||
208 | #define ANOMALY_05000275 (__SILICON_REVISION__ > 2) | 208 | #define ANOMALY_05000275 (__SILICON_REVISION__ > 2) |
209 | /* Timing Requirements Change for External Frame Sync PPI Modes with Non-Zero PPI_DELAY */ | 209 | /* Timing Requirements Change for External Frame Sync PPI Modes with Non-Zero PPI_DELAY */ |
210 | #define ANOMALY_05000276 (__SILICON_REVISION__ < 5) | 210 | #define ANOMALY_05000276 (__SILICON_REVISION__ < 5) |
211 | /* Writes to an I/O data register one SCLK cycle after an edge is detected may clear interrupt */ | ||
212 | #define ANOMALY_05000277 (__SILICON_REVISION__ < 3) | ||
211 | /* Disabling Peripherals with DMA Running May Cause DMA System Instability */ | 213 | /* Disabling Peripherals with DMA Running May Cause DMA System Instability */ |
212 | #define ANOMALY_05000278 (__SILICON_REVISION__ < 5) | 214 | #define ANOMALY_05000278 (__SILICON_REVISION__ < 5) |
213 | /* False Hardware Error Exception When ISR Context Is Not Restored */ | 215 | /* False Hardware Error Exception When ISR Context Is Not Restored */ |
@@ -246,6 +248,18 @@ | |||
246 | #define ANOMALY_05000332 (__SILICON_REVISION__ < 5) | 248 | #define ANOMALY_05000332 (__SILICON_REVISION__ < 5) |
247 | /* Flag Data Register Writes One SCLK Cycle After Edge Is Detected May Clear Interrupt Status */ | 249 | /* Flag Data Register Writes One SCLK Cycle After Edge Is Detected May Clear Interrupt Status */ |
248 | #define ANOMALY_05000333 (__SILICON_REVISION__ < 5) | 250 | #define ANOMALY_05000333 (__SILICON_REVISION__ < 5) |
251 | /* New Feature: Additional PPI Frame Sync Sampling Options (Not Available on Older Silicon) */ | ||
252 | #define ANOMALY_05000339 (__SILICON_REVISION__ < 5) | ||
253 | /* Memory DMA FIFO Causes Throughput Degradation on Writes to External Memory */ | ||
254 | #define ANOMALY_05000343 (__SILICON_REVISION__ < 5) | ||
255 | /* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ | ||
256 | #define ANOMALY_05000357 (1) | ||
257 | /* Conflicting Column Address Widths Causes SDRAM Errors */ | ||
258 | #define ANOMALY_05000362 (1) | ||
259 | /* PPI Underflow Error Goes Undetected in ITU-R 656 Mode */ | ||
260 | #define ANOMALY_05000366 (1) | ||
261 | /* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ | ||
262 | #define ANOMALY_05000371 (1) | ||
249 | 263 | ||
250 | /* Anomalies that don't exist on this proc */ | 264 | /* Anomalies that don't exist on this proc */ |
251 | #define ANOMALY_05000158 (0) | 265 | #define ANOMALY_05000158 (0) |
diff --git a/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h index 69b9f8e120e9..7871d4313f49 100644 --- a/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h +++ b/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h | |||
@@ -111,7 +111,7 @@ static void bfin_serial_hw_init(struct bfin_serial_port *uart) | |||
111 | } | 111 | } |
112 | if (uart->rts_pin >= 0) { | 112 | if (uart->rts_pin >= 0) { |
113 | gpio_request(uart->rts_pin, DRIVER_NAME); | 113 | gpio_request(uart->rts_pin, DRIVER_NAME); |
114 | gpio_direction_input(uart->rts_pin); | 114 | gpio_direction_input(uart->rts_pin, 0); |
115 | } | 115 | } |
116 | #endif | 116 | #endif |
117 | } | 117 | } |
diff --git a/include/asm-blackfin/mach-bf561/portmux.h b/include/asm-blackfin/mach-bf561/portmux.h index 132ad31665e3..a6ee8206efb6 100644 --- a/include/asm-blackfin/mach-bf561/portmux.h +++ b/include/asm-blackfin/mach-bf561/portmux.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _MACH_PORTMUX_H_ | 1 | #ifndef _MACH_PORTMUX_H_ |
2 | #define _MACH_PORTMUX_H_ | 2 | #define _MACH_PORTMUX_H_ |
3 | 3 | ||
4 | #define MAX_RESOURCES MAX_BLACKFIN_GPIOS | ||
5 | |||
4 | #define P_PPI0_CLK (P_DONTCARE) | 6 | #define P_PPI0_CLK (P_DONTCARE) |
5 | #define P_PPI0_FS1 (P_DONTCARE) | 7 | #define P_PPI0_FS1 (P_DONTCARE) |
6 | #define P_PPI0_FS2 (P_DONTCARE) | 8 | #define P_PPI0_FS2 (P_DONTCARE) |
diff --git a/include/asm-blackfin/mmu.h b/include/asm-blackfin/mmu.h index 11d52f1167d0..757e43906ed4 100644 --- a/include/asm-blackfin/mmu.h +++ b/include/asm-blackfin/mmu.h | |||
@@ -24,7 +24,9 @@ typedef struct { | |||
24 | unsigned long exec_fdpic_loadmap; | 24 | unsigned long exec_fdpic_loadmap; |
25 | unsigned long interp_fdpic_loadmap; | 25 | unsigned long interp_fdpic_loadmap; |
26 | #endif | 26 | #endif |
27 | 27 | #ifdef CONFIG_MPU | |
28 | unsigned long *page_rwx_mask; | ||
29 | #endif | ||
28 | } mm_context_t; | 30 | } mm_context_t; |
29 | 31 | ||
30 | #endif | 32 | #endif |
diff --git a/include/asm-blackfin/mmu_context.h b/include/asm-blackfin/mmu_context.h index c5c71a6aaf19..b5eb67596ad5 100644 --- a/include/asm-blackfin/mmu_context.h +++ b/include/asm-blackfin/mmu_context.h | |||
@@ -30,9 +30,12 @@ | |||
30 | #ifndef __BLACKFIN_MMU_CONTEXT_H__ | 30 | #ifndef __BLACKFIN_MMU_CONTEXT_H__ |
31 | #define __BLACKFIN_MMU_CONTEXT_H__ | 31 | #define __BLACKFIN_MMU_CONTEXT_H__ |
32 | 32 | ||
33 | #include <linux/gfp.h> | ||
34 | #include <linux/sched.h> | ||
33 | #include <asm/setup.h> | 35 | #include <asm/setup.h> |
34 | #include <asm/page.h> | 36 | #include <asm/page.h> |
35 | #include <asm/pgalloc.h> | 37 | #include <asm/pgalloc.h> |
38 | #include <asm/cplbinit.h> | ||
36 | 39 | ||
37 | extern void *current_l1_stack_save; | 40 | extern void *current_l1_stack_save; |
38 | extern int nr_l1stack_tasks; | 41 | extern int nr_l1stack_tasks; |
@@ -50,6 +53,12 @@ static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) | |||
50 | static inline int | 53 | static inline int |
51 | init_new_context(struct task_struct *tsk, struct mm_struct *mm) | 54 | init_new_context(struct task_struct *tsk, struct mm_struct *mm) |
52 | { | 55 | { |
56 | #ifdef CONFIG_MPU | ||
57 | unsigned long p = __get_free_pages(GFP_KERNEL, page_mask_order); | ||
58 | mm->context.page_rwx_mask = (unsigned long *)p; | ||
59 | memset(mm->context.page_rwx_mask, 0, | ||
60 | page_mask_nelts * 3 * sizeof(long)); | ||
61 | #endif | ||
53 | return 0; | 62 | return 0; |
54 | } | 63 | } |
55 | 64 | ||
@@ -73,6 +82,11 @@ static inline void destroy_context(struct mm_struct *mm) | |||
73 | sram_free(tmp->addr); | 82 | sram_free(tmp->addr); |
74 | kfree(tmp); | 83 | kfree(tmp); |
75 | } | 84 | } |
85 | #ifdef CONFIG_MPU | ||
86 | if (current_rwx_mask == mm->context.page_rwx_mask) | ||
87 | current_rwx_mask = NULL; | ||
88 | free_pages((unsigned long)mm->context.page_rwx_mask, page_mask_order); | ||
89 | #endif | ||
76 | } | 90 | } |
77 | 91 | ||
78 | static inline unsigned long | 92 | static inline unsigned long |
@@ -106,9 +120,21 @@ activate_l1stack(struct mm_struct *mm, unsigned long sp_base) | |||
106 | 120 | ||
107 | #define deactivate_mm(tsk,mm) do { } while (0) | 121 | #define deactivate_mm(tsk,mm) do { } while (0) |
108 | 122 | ||
109 | static inline void activate_mm(struct mm_struct *prev_mm, | 123 | #define activate_mm(prev, next) switch_mm(prev, next, NULL) |
110 | struct mm_struct *next_mm) | 124 | |
125 | static inline void switch_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm, | ||
126 | struct task_struct *tsk) | ||
111 | { | 127 | { |
128 | if (prev_mm == next_mm) | ||
129 | return; | ||
130 | #ifdef CONFIG_MPU | ||
131 | if (prev_mm->context.page_rwx_mask == current_rwx_mask) { | ||
132 | flush_switched_cplbs(); | ||
133 | set_mask_dcplbs(next_mm->context.page_rwx_mask); | ||
134 | } | ||
135 | #endif | ||
136 | |||
137 | /* L1 stack switching. */ | ||
112 | if (!next_mm->context.l1_stack_save) | 138 | if (!next_mm->context.l1_stack_save) |
113 | return; | 139 | return; |
114 | if (next_mm->context.l1_stack_save == current_l1_stack_save) | 140 | if (next_mm->context.l1_stack_save == current_l1_stack_save) |
@@ -120,10 +146,36 @@ static inline void activate_mm(struct mm_struct *prev_mm, | |||
120 | memcpy(l1_stack_base, current_l1_stack_save, l1_stack_len); | 146 | memcpy(l1_stack_base, current_l1_stack_save, l1_stack_len); |
121 | } | 147 | } |
122 | 148 | ||
123 | static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, | 149 | #ifdef CONFIG_MPU |
124 | struct task_struct *tsk) | 150 | static inline void protect_page(struct mm_struct *mm, unsigned long addr, |
151 | unsigned long flags) | ||
152 | { | ||
153 | unsigned long *mask = mm->context.page_rwx_mask; | ||
154 | unsigned long page = addr >> 12; | ||
155 | unsigned long idx = page >> 5; | ||
156 | unsigned long bit = 1 << (page & 31); | ||
157 | |||
158 | if (flags & VM_MAYREAD) | ||
159 | mask[idx] |= bit; | ||
160 | else | ||
161 | mask[idx] &= ~bit; | ||
162 | mask += page_mask_nelts; | ||
163 | if (flags & VM_MAYWRITE) | ||
164 | mask[idx] |= bit; | ||
165 | else | ||
166 | mask[idx] &= ~bit; | ||
167 | mask += page_mask_nelts; | ||
168 | if (flags & VM_MAYEXEC) | ||
169 | mask[idx] |= bit; | ||
170 | else | ||
171 | mask[idx] &= ~bit; | ||
172 | } | ||
173 | |||
174 | static inline void update_protections(struct mm_struct *mm) | ||
125 | { | 175 | { |
126 | activate_mm(prev, next); | 176 | flush_switched_cplbs(); |
177 | set_mask_dcplbs(mm->context.page_rwx_mask); | ||
127 | } | 178 | } |
179 | #endif | ||
128 | 180 | ||
129 | #endif | 181 | #endif |
diff --git a/include/asm-blackfin/traps.h b/include/asm-blackfin/traps.h index ee1cbf73a9ab..f0e5f940d9ca 100644 --- a/include/asm-blackfin/traps.h +++ b/include/asm-blackfin/traps.h | |||
@@ -45,6 +45,10 @@ | |||
45 | #define VEC_CPLB_I_M (44) | 45 | #define VEC_CPLB_I_M (44) |
46 | #define VEC_CPLB_I_MHIT (45) | 46 | #define VEC_CPLB_I_MHIT (45) |
47 | #define VEC_ILL_RES (46) /* including unvalid supervisor mode insn */ | 47 | #define VEC_ILL_RES (46) /* including unvalid supervisor mode insn */ |
48 | /* The hardware reserves (63) for future use - we use it to tell our | ||
49 | * normal exception handling code we have a hardware error | ||
50 | */ | ||
51 | #define VEC_HWERR (63) | ||
48 | 52 | ||
49 | #ifndef __ASSEMBLY__ | 53 | #ifndef __ASSEMBLY__ |
50 | 54 | ||
diff --git a/include/asm-blackfin/uaccess.h b/include/asm-blackfin/uaccess.h index 2233f8f9314d..22a410b8003b 100644 --- a/include/asm-blackfin/uaccess.h +++ b/include/asm-blackfin/uaccess.h | |||
@@ -31,7 +31,7 @@ static inline void set_fs(mm_segment_t fs) | |||
31 | #define VERIFY_READ 0 | 31 | #define VERIFY_READ 0 |
32 | #define VERIFY_WRITE 1 | 32 | #define VERIFY_WRITE 1 |
33 | 33 | ||
34 | #define access_ok(type,addr,size) _access_ok((unsigned long)(addr),(size)) | 34 | #define access_ok(type, addr, size) _access_ok((unsigned long)(addr), (size)) |
35 | 35 | ||
36 | static inline int is_in_rom(unsigned long addr) | 36 | static inline int is_in_rom(unsigned long addr) |
37 | { | 37 | { |
diff --git a/include/asm-blackfin/unistd.h b/include/asm-blackfin/unistd.h index 07ffe8b718c5..e98167358d26 100644 --- a/include/asm-blackfin/unistd.h +++ b/include/asm-blackfin/unistd.h | |||
@@ -369,8 +369,9 @@ | |||
369 | #define __NR_set_robust_list 354 | 369 | #define __NR_set_robust_list 354 |
370 | #define __NR_get_robust_list 355 | 370 | #define __NR_get_robust_list 355 |
371 | #define __NR_fallocate 356 | 371 | #define __NR_fallocate 356 |
372 | #define __NR_semtimedop 357 | ||
372 | 373 | ||
373 | #define __NR_syscall 357 | 374 | #define __NR_syscall 358 |
374 | #define NR_syscalls __NR_syscall | 375 | #define NR_syscalls __NR_syscall |
375 | 376 | ||
376 | /* Old optional stuff no one actually uses */ | 377 | /* Old optional stuff no one actually uses */ |