aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf527
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2010-08-10 07:22:08 -0400
committerJiri Kosina <jkosina@suse.cz>2010-08-10 07:22:08 -0400
commitfb8231a8b139035476f2a8aaac837d0099b66dad (patch)
tree2875806beb96ea0cdab292146767a5085721dc6a /arch/blackfin/mach-bf527
parent426d31071ac476ea62c62656b242930c17b58c00 (diff)
parentf6cec0ae58c17522a7bc4e2f39dae19f199ab534 (diff)
Merge branch 'master' into for-next
Conflicts: arch/arm/mach-omap1/board-nokia770.c
Diffstat (limited to 'arch/blackfin/mach-bf527')
-rw-r--r--arch/blackfin/mach-bf527/Kconfig66
-rw-r--r--arch/blackfin/mach-bf527/include/mach/anomaly.h22
-rw-r--r--arch/blackfin/mach-bf527/include/mach/bf527.h120
-rw-r--r--arch/blackfin/mach-bf527/include/mach/defBF52x_base.h225
-rw-r--r--arch/blackfin/mach-bf527/include/mach/gpio.h96
-rw-r--r--arch/blackfin/mach-bf527/include/mach/portmux.h3
6 files changed, 272 insertions, 260 deletions
diff --git a/arch/blackfin/mach-bf527/Kconfig b/arch/blackfin/mach-bf527/Kconfig
index 1f8cbe9d6b9a..0ba54701af0b 100644
--- a/arch/blackfin/mach-bf527/Kconfig
+++ b/arch/blackfin/mach-bf527/Kconfig
@@ -79,6 +79,72 @@ config BF527_NAND_D_PORTH
79 PORT H 79 PORT H
80endchoice 80endchoice
81 81
82comment "Hysteresis/Schmitt Trigger Control"
83config BFIN_HYSTERESIS_CONTROL
84 bool "Enable Hysteresis Control"
85 help
86 The ADSP-BF52x allows to control input hysteresis for Port F,
87 Port G and Port H and other processor signal inputs.
88 The Schmitt trigger enables can be set only for pin groups.
89 Saying Y will overwrite the default reset or boot loader
90 initialization.
91
92menu "PORT F"
93 depends on BFIN_HYSTERESIS_CONTROL
94config GPIO_HYST_PORTF_0_7
95 bool "Enable Hysteresis on PORTF {0...7}"
96config GPIO_HYST_PORTF_8_9
97 bool "Enable Hysteresis on PORTF {8, 9}"
98config GPIO_HYST_PORTF_10
99 bool "Enable Hysteresis on PORTF 10"
100config GPIO_HYST_PORTF_11
101 bool "Enable Hysteresis on PORTF 11"
102config GPIO_HYST_PORTF_12_13
103 bool "Enable Hysteresis on PORTF {12, 13}"
104config GPIO_HYST_PORTF_14_15
105 bool "Enable Hysteresis on PORTF {14, 15}"
106endmenu
107
108menu "PORT G"
109 depends on BFIN_HYSTERESIS_CONTROL
110config GPIO_HYST_PORTG_0
111 bool "Enable Hysteresis on PORTG 0"
112config GPIO_HYST_PORTG_1_4
113 bool "Enable Hysteresis on PORTG {1...4}"
114config GPIO_HYST_PORTG_5_6
115 bool "Enable Hysteresis on PORTG {5, 6}"
116config GPIO_HYST_PORTG_7_8
117 bool "Enable Hysteresis on PORTG {7, 8}"
118config GPIO_HYST_PORTG_9
119 bool "Enable Hysteresis on PORTG 9"
120config GPIO_HYST_PORTG_10
121 bool "Enable Hysteresis on PORTG 10"
122config GPIO_HYST_PORTG_11_13
123 bool "Enable Hysteresis on PORTG {11...13}"
124config GPIO_HYST_PORTG_14_15
125 bool "Enable Hysteresis on PORTG {14, 15}"
126endmenu
127
128menu "PORT H"
129 depends on BFIN_HYSTERESIS_CONTROL
130config GPIO_HYST_PORTH_0_7
131 bool "Enable Hysteresis on PORTH {0...7}"
132config GPIO_HYST_PORTH_8
133 bool "Enable Hysteresis on PORTH 8"
134config GPIO_HYST_PORTH_9_15
135 bool "Enable Hysteresis on PORTH {9...15}"
136endmenu
137
138menu "None-GPIO"
139 depends on BFIN_HYSTERESIS_CONTROL
140config NONEGPIO_HYST_TMR0_FS1_PPICLK
141 bool "Enable Hysteresis on {TMR0, PPI_FS1, PPI_CLK}"
142config NONEGPIO_HYST_NMI_RST_BMODE
143 bool "Enable Hysteresis on {NMI, RESET, BMODE}"
144config NONEGPIO_HYST_JTAG
145 bool "Enable Hysteresis on JTAG"
146endmenu
147
82comment "Interrupt Priority Assignment" 148comment "Interrupt Priority Assignment"
83menu "Priority" 149menu "Priority"
84 150
diff --git a/arch/blackfin/mach-bf527/include/mach/anomaly.h b/arch/blackfin/mach-bf527/include/mach/anomaly.h
index 02040df8ec80..9358afa05c90 100644
--- a/arch/blackfin/mach-bf527/include/mach/anomaly.h
+++ b/arch/blackfin/mach-bf527/include/mach/anomaly.h
@@ -5,13 +5,13 @@
5 * and can be replaced with that version at any time 5 * and can be replaced with that version at any time
6 * DO NOT EDIT THIS FILE 6 * DO NOT EDIT THIS FILE
7 * 7 *
8 * Copyright 2004-2009 Analog Devices Inc. 8 * Copyright 2004-2010 Analog Devices Inc.
9 * Licensed under the ADI BSD license. 9 * Licensed under the ADI BSD license.
10 * https://docs.blackfin.uclinux.org/doku.php?id=adi_bsd 10 * https://docs.blackfin.uclinux.org/doku.php?id=adi_bsd
11 */ 11 */
12 12
13/* This file should be up to date with: 13/* This file should be up to date with:
14 * - Revision D, 08/14/2009; ADSP-BF526 Blackfin Processor Anomaly List 14 * - Revision E, 03/15/2010; ADSP-BF526 Blackfin Processor Anomaly List
15 * - Revision G, 08/25/2009; ADSP-BF527 Blackfin Processor Anomaly List 15 * - Revision G, 08/25/2009; ADSP-BF527 Blackfin Processor Anomaly List
16 */ 16 */
17 17
@@ -41,7 +41,7 @@
41/* Multi-Issue Instruction with dsp32shiftimm in slot1 and P-reg Store in slot2 Not Supported */ 41/* Multi-Issue Instruction with dsp32shiftimm in slot1 and P-reg Store in slot2 Not Supported */
42#define ANOMALY_05000074 (1) 42#define ANOMALY_05000074 (1)
43/* DMA_RUN Bit Is Not Valid after a Peripheral Receive Channel DMA Stops */ 43/* DMA_RUN Bit Is Not Valid after a Peripheral Receive Channel DMA Stops */
44#define ANOMALY_05000119 (1) /* note: brokenness is noted in documentation, not anomaly sheet */ 44#define ANOMALY_05000119 (1)
45/* Rx.H Cannot Be Used to Access 16-bit System MMR Registers */ 45/* Rx.H Cannot Be Used to Access 16-bit System MMR Registers */
46#define ANOMALY_05000122 (1) 46#define ANOMALY_05000122 (1)
47/* False Hardware Error from an Access in the Shadow of a Conditional Branch */ 47/* False Hardware Error from an Access in the Shadow of a Conditional Branch */
@@ -168,6 +168,8 @@
168#define ANOMALY_05000431 (1) 168#define ANOMALY_05000431 (1)
169/* bfrom_SysControl() Does Not Clear SIC_IWR1 Before Executing PLL Programming Sequence */ 169/* bfrom_SysControl() Does Not Clear SIC_IWR1 Before Executing PLL Programming Sequence */
170#define ANOMALY_05000432 (_ANOMALY_BF526(< 1)) 170#define ANOMALY_05000432 (_ANOMALY_BF526(< 1))
171/* SW Breakpoints Ignored Upon Return From Lockbox Authentication */
172#define ANOMALY_05000434 (1)
171/* Certain SIC Registers are not Reset After Soft or Core Double Fault Reset */ 173/* Certain SIC Registers are not Reset After Soft or Core Double Fault Reset */
172#define ANOMALY_05000435 (_ANOMALY_BF526_BF527(< 1, >= 0)) 174#define ANOMALY_05000435 (_ANOMALY_BF526_BF527(< 1, >= 0))
173/* Preboot Cannot be Used to Alter the PLL_DIV Register */ 175/* Preboot Cannot be Used to Alter the PLL_DIV Register */
@@ -204,10 +206,22 @@
204#define ANOMALY_05000467 (1) 206#define ANOMALY_05000467 (1)
205/* PLL Latches Incorrect Settings During Reset */ 207/* PLL Latches Incorrect Settings During Reset */
206#define ANOMALY_05000469 (1) 208#define ANOMALY_05000469 (1)
209/* Incorrect Default MSEL Value in PLL_CTL */
210#define ANOMALY_05000472 (_ANOMALY_BF526(>= 0))
207/* Interrupted 32-Bit SPORT Data Register Access Results In Underflow */ 211/* Interrupted 32-Bit SPORT Data Register Access Results In Underflow */
208#define ANOMALY_05000473 (1) 212#define ANOMALY_05000473 (1)
213/* Possible Lockup Condition whem Modifying PLL from External Memory */
214#define ANOMALY_05000475 (1)
209/* TESTSET Instruction Cannot Be Interrupted */ 215/* TESTSET Instruction Cannot Be Interrupted */
210#define ANOMALY_05000477 (1) 216#define ANOMALY_05000477 (1)
217/* Reads of ITEST_COMMAND and ITEST_DATA Registers Cause Cache Corruption */
218#define ANOMALY_05000481 (1)
219/* Possible USB Data Corruption When Multiple Endpoints Are Accessed by the Core */
220#define ANOMALY_05000483 (1)
221/* PLL_CTL Change Using bfrom_SysControl() Can Result in Processor Overclocking */
222#define ANOMALY_05000485 (_ANOMALY_BF526_BF527(< 2, < 3))
223/* IFLUSH sucks at life */
224#define ANOMALY_05000491 (1)
211 225
212/* Anomalies that don't exist on this proc */ 226/* Anomalies that don't exist on this proc */
213#define ANOMALY_05000099 (0) 227#define ANOMALY_05000099 (0)
@@ -223,6 +237,7 @@
223#define ANOMALY_05000198 (0) 237#define ANOMALY_05000198 (0)
224#define ANOMALY_05000202 (0) 238#define ANOMALY_05000202 (0)
225#define ANOMALY_05000215 (0) 239#define ANOMALY_05000215 (0)
240#define ANOMALY_05000219 (0)
226#define ANOMALY_05000220 (0) 241#define ANOMALY_05000220 (0)
227#define ANOMALY_05000227 (0) 242#define ANOMALY_05000227 (0)
228#define ANOMALY_05000230 (0) 243#define ANOMALY_05000230 (0)
@@ -259,6 +274,5 @@
259#define ANOMALY_05000447 (0) 274#define ANOMALY_05000447 (0)
260#define ANOMALY_05000448 (0) 275#define ANOMALY_05000448 (0)
261#define ANOMALY_05000474 (0) 276#define ANOMALY_05000474 (0)
262#define ANOMALY_05000475 (0)
263 277
264#endif 278#endif
diff --git a/arch/blackfin/mach-bf527/include/mach/bf527.h b/arch/blackfin/mach-bf527/include/mach/bf527.h
index ff68c8897087..8ff155b34f64 100644
--- a/arch/blackfin/mach-bf527/include/mach/bf527.h
+++ b/arch/blackfin/mach-bf527/include/mach/bf527.h
@@ -85,6 +85,126 @@
85 85
86#define AMGCTLVAL (V_AMBEN | V_AMCKEN | V_CDPRIO) 86#define AMGCTLVAL (V_AMBEN | V_AMCKEN | V_CDPRIO)
87 87
88/**************************** Hysteresis Settings ****************************/
89
90#ifdef CONFIG_BFIN_HYSTERESIS_CONTROL
91#ifdef CONFIG_GPIO_HYST_PORTF_0_7
92#define HYST_PORTF_0_7 (1 << 0)
93#else
94#define HYST_PORTF_0_7 (0 << 0)
95#endif
96#ifdef CONFIG_GPIO_HYST_PORTF_8_9
97#define HYST_PORTF_8_9 (1 << 2)
98#else
99#define HYST_PORTF_8_9 (0 << 2)
100#endif
101#ifdef CONFIG_GPIO_HYST_PORTF_10
102#define HYST_PORTF_10 (1 << 4)
103#else
104#define HYST_PORTF_10 (0 << 4)
105#endif
106#ifdef CONFIG_GPIO_HYST_PORTF_11
107#define HYST_PORTF_11 (1 << 6)
108#else
109#define HYST_PORTF_11 (0 << 6)
110#endif
111#ifdef CONFIG_GPIO_HYST_PORTF_12_13
112#define HYST_PORTF_12_13 (1 << 8)
113#else
114#define HYST_PORTF_12_13 (0 << 8)
115#endif
116#ifdef CONFIG_GPIO_HYST_PORTF_14_15
117#define HYST_PORTF_14_15 (1 << 10)
118#else
119#define HYST_PORTF_14_15 (0 << 10)
120#endif
121
122#define HYST_PORTF_0_15 (HYST_PORTF_0_7 | HYST_PORTF_8_9 | HYST_PORTF_10 | \
123 HYST_PORTF_11 | HYST_PORTF_12_13 | HYST_PORTF_14_15)
124
125#ifdef CONFIG_GPIO_HYST_PORTG_0
126#define HYST_PORTG_0 (1 << 0)
127#else
128#define HYST_PORTG_0 (0 << 0)
129#endif
130#ifdef CONFIG_GPIO_HYST_PORTG_1_4
131#define HYST_PORTG_1_4 (1 << 2)
132#else
133#define HYST_PORTG_1_4 (0 << 2)
134#endif
135#ifdef CONFIG_GPIO_HYST_PORTG_5_6
136#define HYST_PORTG_5_6 (1 << 4)
137#else
138#define HYST_PORTG_5_6 (0 << 4)
139#endif
140#ifdef CONFIG_GPIO_HYST_PORTG_7_8
141#define HYST_PORTG_7_8 (1 << 6)
142#else
143#define HYST_PORTG_7_8 (0 << 6)
144#endif
145#ifdef CONFIG_GPIO_HYST_PORTG_9
146#define HYST_PORTG_9 (1 << 8)
147#else
148#define HYST_PORTG_9 (0 << 8)
149#endif
150#ifdef CONFIG_GPIO_HYST_PORTG_10
151#define HYST_PORTG_10 (1 << 10)
152#else
153#define HYST_PORTG_10 (0 << 10)
154#endif
155#ifdef CONFIG_GPIO_HYST_PORTG_11_13
156#define HYST_PORTG_11_13 (1 << 12)
157#else
158#define HYST_PORTG_11_13 (0 << 12)
159#endif
160#ifdef CONFIG_GPIO_HYST_PORTG_14_15
161#define HYST_PORTG_14_15 (1 << 14)
162#else
163#define HYST_PORTG_14_15 (0 << 14)
164#endif
165
166#define HYST_PORTG_0_15 (HYST_PORTG_0 | HYST_PORTG_1_4 | HYST_PORTG_5_6 | \
167 HYST_PORTG_7_8 | HYST_PORTG_9 | HYST_PORTG_10 | \
168 HYST_PORTG_11_13 | HYST_PORTG_14_15)
169
170#ifdef CONFIG_GPIO_HYST_PORTH_0_7
171#define HYST_PORTH_0_7 (1 << 0)
172#else
173#define HYST_PORTH_0_7 (0 << 0)
174#endif
175#ifdef CONFIG_GPIO_HYST_PORTH_8
176#define HYST_PORTH_8 (1 << 2)
177#else
178#define HYST_PORTH_8 (0 << 2)
179#endif
180#ifdef CONFIG_GPIO_HYST_PORTH_9_15
181#define HYST_PORTH_9_15 (1 << 4)
182#else
183#define HYST_PORTH_9_15 (0 << 4)
184#endif
185
186#define HYST_PORTH_0_15 (HYST_PORTH_0_7 | HYST_PORTH_8 | HYST_PORTH_9_15)
187
188#ifdef CONFIG_NONEGPIO_HYST_TMR0_FS1_PPICLK
189#define HYST_TMR0_FS1_PPICLK (1 << 0)
190#else
191#define HYST_TMR0_FS1_PPICLK (0 << 0)
192#endif
193#ifdef CONFIG_NONEGPIO_HYST_NMI_RST_BMODE
194#define HYST_NMI_RST_BMODE (1 << 2)
195#else
196#define HYST_NMI_RST_BMODE (0 << 2)
197#endif
198#ifdef CONFIG_NONEGPIO_HYST_JTAG
199#define HYST_JTAG (1 << 4)
200#else
201#define HYST_JTAG (0 << 4)
202#endif
203
204#define HYST_NONEGPIO (HYST_TMR0_FS1_PPICLK | HYST_NMI_RST_BMODE | HYST_JTAG)
205#define HYST_NONEGPIO_MASK (0x3F)
206#endif /* CONFIG_BFIN_HYSTERESIS_CONTROL */
207
88#ifdef CONFIG_BF527 208#ifdef CONFIG_BF527
89#define CPU "BF527" 209#define CPU "BF527"
90#define CPUID 0x27e0 210#define CPUID 0x27e0
diff --git a/arch/blackfin/mach-bf527/include/mach/defBF52x_base.h b/arch/blackfin/mach-bf527/include/mach/defBF52x_base.h
index 8b18b5359210..5f97f01fcda6 100644
--- a/arch/blackfin/mach-bf527/include/mach/defBF52x_base.h
+++ b/arch/blackfin/mach-bf527/include/mach/defBF52x_base.h
@@ -458,22 +458,22 @@
458 458
459/* Two-Wire Interface (0xFFC01400 - 0xFFC014FF) */ 459/* Two-Wire Interface (0xFFC01400 - 0xFFC014FF) */
460#define TWI0_REGBASE 0xFFC01400 460#define TWI0_REGBASE 0xFFC01400
461#define TWI_CLKDIV 0xFFC01400 /* Serial Clock Divider Register */ 461#define TWI0_CLKDIV 0xFFC01400 /* Serial Clock Divider Register */
462#define TWI_CONTROL 0xFFC01404 /* TWI Control Register */ 462#define TWI0_CONTROL 0xFFC01404 /* TWI Control Register */
463#define TWI_SLAVE_CTL 0xFFC01408 /* Slave Mode Control Register */ 463#define TWI0_SLAVE_CTL 0xFFC01408 /* Slave Mode Control Register */
464#define TWI_SLAVE_STAT 0xFFC0140C /* Slave Mode Status Register */ 464#define TWI0_SLAVE_STAT 0xFFC0140C /* Slave Mode Status Register */
465#define TWI_SLAVE_ADDR 0xFFC01410 /* Slave Mode Address Register */ 465#define TWI0_SLAVE_ADDR 0xFFC01410 /* Slave Mode Address Register */
466#define TWI_MASTER_CTL 0xFFC01414 /* Master Mode Control Register */ 466#define TWI0_MASTER_CTL 0xFFC01414 /* Master Mode Control Register */
467#define TWI_MASTER_STAT 0xFFC01418 /* Master Mode Status Register */ 467#define TWI0_MASTER_STAT 0xFFC01418 /* Master Mode Status Register */
468#define TWI_MASTER_ADDR 0xFFC0141C /* Master Mode Address Register */ 468#define TWI0_MASTER_ADDR 0xFFC0141C /* Master Mode Address Register */
469#define TWI_INT_STAT 0xFFC01420 /* TWI Interrupt Status Register */ 469#define TWI0_INT_STAT 0xFFC01420 /* TWI Interrupt Status Register */
470#define TWI_INT_MASK 0xFFC01424 /* TWI Master Interrupt Mask Register */ 470#define TWI0_INT_MASK 0xFFC01424 /* TWI Master Interrupt Mask Register */
471#define TWI_FIFO_CTL 0xFFC01428 /* FIFO Control Register */ 471#define TWI0_FIFO_CTL 0xFFC01428 /* FIFO Control Register */
472#define TWI_FIFO_STAT 0xFFC0142C /* FIFO Status Register */ 472#define TWI0_FIFO_STAT 0xFFC0142C /* FIFO Status Register */
473#define TWI_XMT_DATA8 0xFFC01480 /* FIFO Transmit Data Single Byte Register */ 473#define TWI0_XMT_DATA8 0xFFC01480 /* FIFO Transmit Data Single Byte Register */
474#define TWI_XMT_DATA16 0xFFC01484 /* FIFO Transmit Data Double Byte Register */ 474#define TWI0_XMT_DATA16 0xFFC01484 /* FIFO Transmit Data Double Byte Register */
475#define TWI_RCV_DATA8 0xFFC01488 /* FIFO Receive Data Single Byte Register */ 475#define TWI0_RCV_DATA8 0xFFC01488 /* FIFO Receive Data Single Byte Register */
476#define TWI_RCV_DATA16 0xFFC0148C /* FIFO Receive Data Double Byte Register */ 476#define TWI0_RCV_DATA16 0xFFC0148C /* FIFO Receive Data Double Byte Register */
477 477
478 478
479/* General Purpose I/O Port G (0xFFC01500 - 0xFFC015FF) */ 479/* General Purpose I/O Port G (0xFFC01500 - 0xFFC015FF) */
@@ -1328,7 +1328,7 @@
1328#define TWI_ENA 0x0080 /* TWI Enable */ 1328#define TWI_ENA 0x0080 /* TWI Enable */
1329#define SCCB 0x0200 /* SCCB Compatibility Enable */ 1329#define SCCB 0x0200 /* SCCB Compatibility Enable */
1330 1330
1331/* TWI_SLAVE_CTRL Masks */ 1331/* TWI_SLAVE_CTL Masks */
1332#define SEN 0x0001 /* Slave Enable */ 1332#define SEN 0x0001 /* Slave Enable */
1333#define SADD_LEN 0x0002 /* Slave Address Length */ 1333#define SADD_LEN 0x0002 /* Slave Address Length */
1334#define STDVAL 0x0004 /* Slave Transmit Data Valid */ 1334#define STDVAL 0x0004 /* Slave Transmit Data Valid */
@@ -1339,7 +1339,7 @@
1339#define SDIR 0x0001 /* Slave Transfer Direction (Transmit/Receive*) */ 1339#define SDIR 0x0001 /* Slave Transfer Direction (Transmit/Receive*) */
1340#define GCALL 0x0002 /* General Call Indicator */ 1340#define GCALL 0x0002 /* General Call Indicator */
1341 1341
1342/* TWI_MASTER_CTRL Masks */ 1342/* TWI_MASTER_CTL Masks */
1343#define MEN 0x0001 /* Master Mode Enable */ 1343#define MEN 0x0001 /* Master Mode Enable */
1344#define MADD_LEN 0x0002 /* Master Address Length */ 1344#define MADD_LEN 0x0002 /* Master Address Length */
1345#define MDIR 0x0004 /* Master Transmit Direction (RX/TX*) */ 1345#define MDIR 0x0004 /* Master Transmit Direction (RX/TX*) */
@@ -1589,114 +1589,6 @@
1589 1589
1590#define HOST_COUNT_TIMEOUT 0x7ff /* Host Timeout count */ 1590#define HOST_COUNT_TIMEOUT 0x7ff /* Host Timeout count */
1591 1591
1592/* Bit masks for CNT_CONFIG */
1593
1594#define CNTE 0x1 /* Counter Enable */
1595#define nCNTE 0x0
1596#define DEBE 0x2 /* Debounce Enable */
1597#define nDEBE 0x0
1598#define CDGINV 0x10 /* CDG Pin Polarity Invert */
1599#define nCDGINV 0x0
1600#define CUDINV 0x20 /* CUD Pin Polarity Invert */
1601#define nCUDINV 0x0
1602#define CZMINV 0x40 /* CZM Pin Polarity Invert */
1603#define nCZMINV 0x0
1604#define CNTMODE 0x700 /* Counter Operating Mode */
1605#define ZMZC 0x800 /* CZM Zeroes Counter Enable */
1606#define nZMZC 0x0
1607#define BNDMODE 0x3000 /* Boundary register Mode */
1608#define INPDIS 0x8000 /* CUG and CDG Input Disable */
1609#define nINPDIS 0x0
1610
1611/* Bit masks for CNT_IMASK */
1612
1613#define ICIE 0x1 /* Illegal Gray/Binary Code Interrupt Enable */
1614#define nICIE 0x0
1615#define UCIE 0x2 /* Up count Interrupt Enable */
1616#define nUCIE 0x0
1617#define DCIE 0x4 /* Down count Interrupt Enable */
1618#define nDCIE 0x0
1619#define MINCIE 0x8 /* Min Count Interrupt Enable */
1620#define nMINCIE 0x0
1621#define MAXCIE 0x10 /* Max Count Interrupt Enable */
1622#define nMAXCIE 0x0
1623#define COV31IE 0x20 /* Bit 31 Overflow Interrupt Enable */
1624#define nCOV31IE 0x0
1625#define COV15IE 0x40 /* Bit 15 Overflow Interrupt Enable */
1626#define nCOV15IE 0x0
1627#define CZEROIE 0x80 /* Count to Zero Interrupt Enable */
1628#define nCZEROIE 0x0
1629#define CZMIE 0x100 /* CZM Pin Interrupt Enable */
1630#define nCZMIE 0x0
1631#define CZMEIE 0x200 /* CZM Error Interrupt Enable */
1632#define nCZMEIE 0x0
1633#define CZMZIE 0x400 /* CZM Zeroes Counter Interrupt Enable */
1634#define nCZMZIE 0x0
1635
1636/* Bit masks for CNT_STATUS */
1637
1638#define ICII 0x1 /* Illegal Gray/Binary Code Interrupt Identifier */
1639#define nICII 0x0
1640#define UCII 0x2 /* Up count Interrupt Identifier */
1641#define nUCII 0x0
1642#define DCII 0x4 /* Down count Interrupt Identifier */
1643#define nDCII 0x0
1644#define MINCII 0x8 /* Min Count Interrupt Identifier */
1645#define nMINCII 0x0
1646#define MAXCII 0x10 /* Max Count Interrupt Identifier */
1647#define nMAXCII 0x0
1648#define COV31II 0x20 /* Bit 31 Overflow Interrupt Identifier */
1649#define nCOV31II 0x0
1650#define COV15II 0x40 /* Bit 15 Overflow Interrupt Identifier */
1651#define nCOV15II 0x0
1652#define CZEROII 0x80 /* Count to Zero Interrupt Identifier */
1653#define nCZEROII 0x0
1654#define CZMII 0x100 /* CZM Pin Interrupt Identifier */
1655#define nCZMII 0x0
1656#define CZMEII 0x200 /* CZM Error Interrupt Identifier */
1657#define nCZMEII 0x0
1658#define CZMZII 0x400 /* CZM Zeroes Counter Interrupt Identifier */
1659#define nCZMZII 0x0
1660
1661/* Bit masks for CNT_COMMAND */
1662
1663#define W1LCNT 0xf /* Load Counter Register */
1664#define W1LMIN 0xf0 /* Load Min Register */
1665#define W1LMAX 0xf00 /* Load Max Register */
1666#define W1ZMONCE 0x1000 /* Enable CZM Clear Counter Once */
1667#define nW1ZMONCE 0x0
1668
1669/* Bit masks for CNT_DEBOUNCE */
1670
1671#define DPRESCALE 0xf /* Load Counter Register */
1672
1673/* CNT_COMMAND bit field options */
1674
1675#define W1LCNT_ZERO 0x0001 /* write 1 to load CNT_COUNTER with zero */
1676#define W1LCNT_MIN 0x0004 /* write 1 to load CNT_COUNTER from CNT_MIN */
1677#define W1LCNT_MAX 0x0008 /* write 1 to load CNT_COUNTER from CNT_MAX */
1678
1679#define W1LMIN_ZERO 0x0010 /* write 1 to load CNT_MIN with zero */
1680#define W1LMIN_CNT 0x0020 /* write 1 to load CNT_MIN from CNT_COUNTER */
1681#define W1LMIN_MAX 0x0080 /* write 1 to load CNT_MIN from CNT_MAX */
1682
1683#define W1LMAX_ZERO 0x0100 /* write 1 to load CNT_MAX with zero */
1684#define W1LMAX_CNT 0x0200 /* write 1 to load CNT_MAX from CNT_COUNTER */
1685#define W1LMAX_MIN 0x0400 /* write 1 to load CNT_MAX from CNT_MIN */
1686
1687/* CNT_CONFIG bit field options */
1688
1689#define CNTMODE_QUADENC 0x0000 /* quadrature encoder mode */
1690#define CNTMODE_BINENC 0x0100 /* binary encoder mode */
1691#define CNTMODE_UDCNT 0x0200 /* up/down counter mode */
1692#define CNTMODE_DIRCNT 0x0400 /* direction counter mode */
1693#define CNTMODE_DIRTMR 0x0500 /* direction timer mode */
1694
1695#define BNDMODE_COMP 0x0000 /* boundary compare mode */
1696#define BNDMODE_ZERO 0x1000 /* boundary compare and zero mode */
1697#define BNDMODE_CAPT 0x2000 /* boundary capture mode */
1698#define BNDMODE_AEXT 0x3000 /* boundary auto-extend mode */
1699
1700/* Bit masks for SECURE_SYSSWT */ 1592/* Bit masks for SECURE_SYSSWT */
1701 1593
1702#define EMUDABL 0x1 /* Emulation Disable. */ 1594#define EMUDABL 0x1 /* Emulation Disable. */
@@ -1738,85 +1630,4 @@
1738#define nAFEXIT 0x0 1630#define nAFEXIT 0x0
1739#define SECSTAT 0xe0 /* Secure Status */ 1631#define SECSTAT 0xe0 /* Secure Status */
1740 1632
1741/* Bit masks for NFC_CTL */
1742
1743#define WR_DLY 0xf /* Write Strobe Delay */
1744#define RD_DLY 0xf0 /* Read Strobe Delay */
1745#define NWIDTH 0x100 /* NAND Data Width */
1746#define nNWIDTH 0x0
1747#define PG_SIZE 0x200 /* Page Size */
1748#define nPG_SIZE 0x0
1749
1750/* Bit masks for NFC_STAT */
1751
1752#define NBUSY 0x1 /* Not Busy */
1753#define nNBUSY 0x0
1754#define WB_FULL 0x2 /* Write Buffer Full */
1755#define nWB_FULL 0x0
1756#define PG_WR_STAT 0x4 /* Page Write Pending */
1757#define nPG_WR_STAT 0x0
1758#define PG_RD_STAT 0x8 /* Page Read Pending */
1759#define nPG_RD_STAT 0x0
1760#define WB_EMPTY 0x10 /* Write Buffer Empty */
1761#define nWB_EMPTY 0x0
1762
1763/* Bit masks for NFC_IRQSTAT */
1764
1765#define NBUSYIRQ 0x1 /* Not Busy IRQ */
1766#define nNBUSYIRQ 0x0
1767#define WB_OVF 0x2 /* Write Buffer Overflow */
1768#define nWB_OVF 0x0
1769#define WB_EDGE 0x4 /* Write Buffer Edge Detect */
1770#define nWB_EDGE 0x0
1771#define RD_RDY 0x8 /* Read Data Ready */
1772#define nRD_RDY 0x0
1773#define WR_DONE 0x10 /* Page Write Done */
1774#define nWR_DONE 0x0
1775
1776/* Bit masks for NFC_IRQMASK */
1777
1778#define MASK_BUSYIRQ 0x1 /* Mask Not Busy IRQ */
1779#define nMASK_BUSYIRQ 0x0
1780#define MASK_WBOVF 0x2 /* Mask Write Buffer Overflow */
1781#define nMASK_WBOVF 0x0
1782#define MASK_WBEMPTY 0x4 /* Mask Write Buffer Empty */
1783#define nMASK_WBEMPTY 0x0
1784#define MASK_RDRDY 0x8 /* Mask Read Data Ready */
1785#define nMASK_RDRDY 0x0
1786#define MASK_WRDONE 0x10 /* Mask Write Done */
1787#define nMASK_WRDONE 0x0
1788
1789/* Bit masks for NFC_RST */
1790
1791#define ECC_RST 0x1 /* ECC (and NFC counters) Reset */
1792#define nECC_RST 0x0
1793
1794/* Bit masks for NFC_PGCTL */
1795
1796#define PG_RD_START 0x1 /* Page Read Start */
1797#define nPG_RD_START 0x0
1798#define PG_WR_START 0x2 /* Page Write Start */
1799#define nPG_WR_START 0x0
1800
1801/* Bit masks for NFC_ECC0 */
1802
1803#define ECC0 0x7ff /* Parity Calculation Result0 */
1804
1805/* Bit masks for NFC_ECC1 */
1806
1807#define ECC1 0x7ff /* Parity Calculation Result1 */
1808
1809/* Bit masks for NFC_ECC2 */
1810
1811#define ECC2 0x7ff /* Parity Calculation Result2 */
1812
1813/* Bit masks for NFC_ECC3 */
1814
1815#define ECC3 0x7ff /* Parity Calculation Result3 */
1816
1817/* Bit masks for NFC_COUNT */
1818
1819#define ECCCNT 0x3ff /* Transfer Count */
1820
1821
1822#endif /* _DEF_BF52X_H */ 1633#endif /* _DEF_BF52X_H */
diff --git a/arch/blackfin/mach-bf527/include/mach/gpio.h b/arch/blackfin/mach-bf527/include/mach/gpio.h
index 104bff85290d..f80c2995efdb 100644
--- a/arch/blackfin/mach-bf527/include/mach/gpio.h
+++ b/arch/blackfin/mach-bf527/include/mach/gpio.h
@@ -9,54 +9,54 @@
9 9
10#define MAX_BLACKFIN_GPIOS 48 10#define MAX_BLACKFIN_GPIOS 48
11 11
12#define GPIO_PF0 0 12#define GPIO_PF0 0
13#define GPIO_PF1 1 13#define GPIO_PF1 1
14#define GPIO_PF2 2 14#define GPIO_PF2 2
15#define GPIO_PF3 3 15#define GPIO_PF3 3
16#define GPIO_PF4 4 16#define GPIO_PF4 4
17#define GPIO_PF5 5 17#define GPIO_PF5 5
18#define GPIO_PF6 6 18#define GPIO_PF6 6
19#define GPIO_PF7 7 19#define GPIO_PF7 7
20#define GPIO_PF8 8 20#define GPIO_PF8 8
21#define GPIO_PF9 9 21#define GPIO_PF9 9
22#define GPIO_PF10 10 22#define GPIO_PF10 10
23#define GPIO_PF11 11 23#define GPIO_PF11 11
24#define GPIO_PF12 12 24#define GPIO_PF12 12
25#define GPIO_PF13 13 25#define GPIO_PF13 13
26#define GPIO_PF14 14 26#define GPIO_PF14 14
27#define GPIO_PF15 15 27#define GPIO_PF15 15
28#define GPIO_PG0 16 28#define GPIO_PG0 16
29#define GPIO_PG1 17 29#define GPIO_PG1 17
30#define GPIO_PG2 18 30#define GPIO_PG2 18
31#define GPIO_PG3 19 31#define GPIO_PG3 19
32#define GPIO_PG4 20 32#define GPIO_PG4 20
33#define GPIO_PG5 21 33#define GPIO_PG5 21
34#define GPIO_PG6 22 34#define GPIO_PG6 22
35#define GPIO_PG7 23 35#define GPIO_PG7 23
36#define GPIO_PG8 24 36#define GPIO_PG8 24
37#define GPIO_PG9 25 37#define GPIO_PG9 25
38#define GPIO_PG10 26 38#define GPIO_PG10 26
39#define GPIO_PG11 27 39#define GPIO_PG11 27
40#define GPIO_PG12 28 40#define GPIO_PG12 28
41#define GPIO_PG13 29 41#define GPIO_PG13 29
42#define GPIO_PG14 30 42#define GPIO_PG14 30
43#define GPIO_PG15 31 43#define GPIO_PG15 31
44#define GPIO_PH0 32 44#define GPIO_PH0 32
45#define GPIO_PH1 33 45#define GPIO_PH1 33
46#define GPIO_PH2 34 46#define GPIO_PH2 34
47#define GPIO_PH3 35 47#define GPIO_PH3 35
48#define GPIO_PH4 36 48#define GPIO_PH4 36
49#define GPIO_PH5 37 49#define GPIO_PH5 37
50#define GPIO_PH6 38 50#define GPIO_PH6 38
51#define GPIO_PH7 39 51#define GPIO_PH7 39
52#define GPIO_PH8 40 52#define GPIO_PH8 40
53#define GPIO_PH9 41 53#define GPIO_PH9 41
54#define GPIO_PH10 42 54#define GPIO_PH10 42
55#define GPIO_PH11 43 55#define GPIO_PH11 43
56#define GPIO_PH12 44 56#define GPIO_PH12 44
57#define GPIO_PH13 45 57#define GPIO_PH13 45
58#define GPIO_PH14 46 58#define GPIO_PH14 46
59#define GPIO_PH15 47 59#define GPIO_PH15 47
60 60
61#define PORT_F GPIO_PF0 61#define PORT_F GPIO_PF0
62#define PORT_G GPIO_PG0 62#define PORT_G GPIO_PG0
diff --git a/arch/blackfin/mach-bf527/include/mach/portmux.h b/arch/blackfin/mach-bf527/include/mach/portmux.h
index d4518b6f4adf..08bae421f5c9 100644
--- a/arch/blackfin/mach-bf527/include/mach/portmux.h
+++ b/arch/blackfin/mach-bf527/include/mach/portmux.h
@@ -7,7 +7,7 @@
7#ifndef _MACH_PORTMUX_H_ 7#ifndef _MACH_PORTMUX_H_
8#define _MACH_PORTMUX_H_ 8#define _MACH_PORTMUX_H_
9 9
10#define MAX_RESOURCES MAX_BLACKFIN_GPIOS 10#define MAX_RESOURCES MAX_BLACKFIN_GPIOS
11 11
12#define P_PPI0_D0 (P_DEFINED | P_IDENT(GPIO_PF0) | P_FUNCT(0)) 12#define P_PPI0_D0 (P_DEFINED | P_IDENT(GPIO_PF0) | P_FUNCT(0))
13#define P_PPI0_D1 (P_DEFINED | P_IDENT(GPIO_PF1) | P_FUNCT(0)) 13#define P_PPI0_D1 (P_DEFINED | P_IDENT(GPIO_PF1) | P_FUNCT(0))
@@ -79,6 +79,7 @@
79 79
80#define P_HWAIT (P_DONTCARE) 80#define P_HWAIT (P_DONTCARE)
81 81
82#define GPIO_DEFAULT_BOOT_SPI_CS GPIO_PG1
82#define P_DEFAULT_BOOT_SPI_CS P_SPI0_SSEL1 83#define P_DEFAULT_BOOT_SPI_CS P_SPI0_SSEL1
83 84
84#define P_SPI0_SS (P_DEFINED | P_IDENT(GPIO_PG1) | P_FUNCT(0)) 85#define P_SPI0_SS (P_DEFINED | P_IDENT(GPIO_PG1) | P_FUNCT(0))