aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-blackfin/mach-bf527
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-blackfin/mach-bf527')
-rw-r--r--include/asm-blackfin/mach-bf527/anomaly.h80
-rw-r--r--include/asm-blackfin/mach-bf527/bfin_serial_5xx.h48
-rw-r--r--include/asm-blackfin/mach-bf527/bfin_sir.h133
-rw-r--r--include/asm-blackfin/mach-bf527/blackfin.h15
-rw-r--r--include/asm-blackfin/mach-bf527/cdefBF52x_base.h90
-rw-r--r--include/asm-blackfin/mach-bf527/dma.h3
6 files changed, 300 insertions, 69 deletions
diff --git a/include/asm-blackfin/mach-bf527/anomaly.h b/include/asm-blackfin/mach-bf527/anomaly.h
index a89120445be6..735fa02fafb2 100644
--- a/include/asm-blackfin/mach-bf527/anomaly.h
+++ b/include/asm-blackfin/mach-bf527/anomaly.h
@@ -2,12 +2,12 @@
2 * File: include/asm-blackfin/mach-bf527/anomaly.h 2 * File: include/asm-blackfin/mach-bf527/anomaly.h
3 * Bugs: Enter bugs at http://blackfin.uclinux.org/ 3 * Bugs: Enter bugs at http://blackfin.uclinux.org/
4 * 4 *
5 * Copyright (C) 2004-2007 Analog Devices Inc. 5 * Copyright (C) 2004-2008 Analog Devices Inc.
6 * Licensed under the GPL-2 or later. 6 * Licensed under the GPL-2 or later.
7 */ 7 */
8 8
9/* This file shoule be up to date with: 9/* This file shoule be up to date with:
10 * - Revision A, May 30, 2007; ADSP-BF527 Blackfin Processor Anomaly List 10 * - Revision C, 01/25/2008; ADSP-BF527 Blackfin Processor Anomaly List
11 */ 11 */
12 12
13#ifndef _MACH_ANOMALY_H_ 13#ifndef _MACH_ANOMALY_H_
@@ -15,35 +15,85 @@
15 15
16/* Multi-Issue Instruction with dsp32shiftimm in slot1 and P-reg Store in slot2 Not Supported */ 16/* Multi-Issue Instruction with dsp32shiftimm in slot1 and P-reg Store in slot2 Not Supported */
17#define ANOMALY_05000074 (1) 17#define ANOMALY_05000074 (1)
18/* DMA_RUN Bit Is Not Valid after a Peripheral Receive Channel DMA Stops */
19#define ANOMALY_05000119 (1)
20/* Rx.H Cannot Be Used to Access 16-bit System MMR Registers */ 18/* Rx.H Cannot Be Used to Access 16-bit System MMR Registers */
21#define ANOMALY_05000122 (1) 19#define ANOMALY_05000122 (1)
22/* Spurious Hardware Error from an Access in the Shadow of a Conditional Branch */ 20/* Spurious Hardware Error from an Access in the Shadow of a Conditional Branch */
23#define ANOMALY_05000245 (1) 21#define ANOMALY_05000245 (1)
24/* Sensitivity To Noise with Slow Input Edge Rates on External SPORT TX and RX Clocks */ 22/* Sensitivity To Noise with Slow Input Edge Rates on External SPORT TX and RX Clocks */
25#define ANOMALY_05000265 (1) 23#define ANOMALY_05000265 (1)
26/* Memory-To-Memory DMA Source/Destination Descriptors Must Be in Same Memory Space */
27#define ANOMALY_05000301 (1)
28/* Errors When SSYNC, CSYNC, or Loads to LT, LB and LC Registers Are Interrupted */
29#define ANOMALY_05000312 (1)
30/* Incorrect Access of OTP_STATUS During otp_write() Function */ 24/* Incorrect Access of OTP_STATUS During otp_write() Function */
31#define ANOMALY_05000328 (1) 25#define ANOMALY_05000328 (1)
32/* Disallowed Configuration Prevents Subsequent Allowed Configuration on Host DMA Port */ 26/* Disallowed Configuration Prevents Subsequent Allowed Configuration on Host DMA Port */
33#define ANOMALY_05000337 (1) 27#define ANOMALY_05000337 (1)
34/* TWI Does Not Operate Correctly Under Certain Signal Termination Conditions */ 28/* Ethernet MAC MDIO Reads Do Not Meet IEEE Specification */
29#define ANOMALY_05000341 (1)
30/* TWI May Not Operate Correctly Under Certain Signal Termination Conditions */
35#define ANOMALY_05000342 (1) 31#define ANOMALY_05000342 (1)
36/* Boot ROM Kernel Incorrectly Alters Reset Value of USB Register */ 32/* USB Calibration Value Is Not Initialized */
33#define ANOMALY_05000346 (1)
34/* Preboot Routine Incorrectly Alters Reset Value of USB Register */
37#define ANOMALY_05000347 (1) 35#define ANOMALY_05000347 (1)
36/* Security Features Are Not Functional */
37#define ANOMALY_05000348 (__SILICON_REVISION__ < 1)
38/* Regulator Programming Blocked when Hibernate Wakeup Source Remains Active */
39#define ANOMALY_05000355 (1)
40/* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */
41#define ANOMALY_05000357 (1)
42/* Incorrect Revision Number in DSPID Register */
43#define ANOMALY_05000364 (__SILICON_REVISION__ > 0)
44/* PPI Underflow Error Goes Undetected in ITU-R 656 Mode */
45#define ANOMALY_05000366 (1)
46/* New Feature: Higher Default CCLK Rate */
47#define ANOMALY_05000368 (1)
48/* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */
49#define ANOMALY_05000371 (1)
50/* Authentication Fails To Initiate */
51#define ANOMALY_05000376 (__SILICON_REVISION__ > 0)
52/* Data Read From L3 Memory by USB DMA May be Corrupted */
53#define ANOMALY_05000380 (1)
54/* USB Full-speed Mode not Fully Tested */
55#define ANOMALY_05000381 (1)
56/* New Feature: Boot from OTP Memory */
57#define ANOMALY_05000385 (1)
58/* New Feature: bfrom_SysControl() Routine */
59#define ANOMALY_05000386 (1)
60/* New Feature: Programmable Preboot Settings */
61#define ANOMALY_05000387 (1)
62/* Reset Vector Must Not Be in SDRAM Memory Space */
63#define ANOMALY_05000389 (1)
64/* New Feature: pTempCurrent Added to ADI_BOOT_DATA Structure */
65#define ANOMALY_05000392 (1)
66/* New Feature: dTempByteCount Value Increased in ADI_BOOT_DATA Structure */
67#define ANOMALY_05000393 (1)
68/* New Feature: Log Buffer Functionality */
69#define ANOMALY_05000394 (1)
70/* New Feature: Hook Routine Functionality */
71#define ANOMALY_05000395 (1)
72/* New Feature: Header Indirect Bit */
73#define ANOMALY_05000396 (1)
74/* New Feature: BK_ONES, BK_ZEROS, and BK_DATECODE Constants */
75#define ANOMALY_05000397 (1)
76/* New Feature: SWRESET, DFRESET and WDRESET Bits Added to SYSCR Register */
77#define ANOMALY_05000398 (1)
78/* New Feature: BCODE_NOBOOT Added to BCODE Field of SYSCR Register */
79#define ANOMALY_05000399 (1)
80/* PPI Data Signals D0 and D8 do not Tristate After Disabling PPI */
81#define ANOMALY_05000401 (1)
38 82
39/* Anomalies that don't exist on this proc */ 83/* Anomalies that don't exist on this proc */
40#define ANOMALY_05000323 (0)
41#define ANOMALY_05000244 (0)
42#define ANOMALY_05000198 (0)
43#define ANOMALY_05000125 (0) 84#define ANOMALY_05000125 (0)
44#define ANOMALY_05000158 (0) 85#define ANOMALY_05000158 (0)
45#define ANOMALY_05000273 (0) 86#define ANOMALY_05000183 (0)
87#define ANOMALY_05000198 (0)
88#define ANOMALY_05000230 (0)
89#define ANOMALY_05000244 (0)
90#define ANOMALY_05000261 (0)
46#define ANOMALY_05000263 (0) 91#define ANOMALY_05000263 (0)
92#define ANOMALY_05000266 (0)
93#define ANOMALY_05000273 (0)
47#define ANOMALY_05000311 (0) 94#define ANOMALY_05000311 (0)
48#define ANOMALY_05000230 (0) 95#define ANOMALY_05000312 (0)
96#define ANOMALY_05000323 (0)
97#define ANOMALY_05000363 (0)
98
49#endif 99#endif
diff --git a/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h
index c0694ecd2ecd..f0ab2736a680 100644
--- a/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h
+++ b/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h
@@ -1,22 +1,38 @@
1/*
2 * file: include/asm-blackfin/mach-bf527/bfin_serial_5xx.h
3 * based on:
4 * author:
5 *
6 * created:
7 * description:
8 * blackfin serial driver head file
9 * rev:
10 *
11 * modified:
12 *
13 *
14 * bugs: enter bugs at http://blackfin.uclinux.org/
15 *
16 * this program is free software; you can redistribute it and/or modify
17 * it under the terms of the gnu general public license as published by
18 * the free software foundation; either version 2, or (at your option)
19 * any later version.
20 *
21 * this program is distributed in the hope that it will be useful,
22 * but without any warranty; without even the implied warranty of
23 * merchantability or fitness for a particular purpose. see the
24 * gnu general public license for more details.
25 *
26 * you should have received a copy of the gnu general public license
27 * along with this program; see the file copying.
28 * if not, write to the free software foundation,
29 * 59 temple place - suite 330, boston, ma 02111-1307, usa.
30 */
31
1#include <linux/serial.h> 32#include <linux/serial.h>
2#include <asm/dma.h> 33#include <asm/dma.h>
3#include <asm/portmux.h> 34#include <asm/portmux.h>
4 35
5#define NR_PORTS 2
6
7#define OFFSET_THR 0x00 /* Transmit Holding register */
8#define OFFSET_RBR 0x00 /* Receive Buffer register */
9#define OFFSET_DLL 0x00 /* Divisor Latch (Low-Byte) */
10#define OFFSET_IER 0x04 /* Interrupt Enable Register */
11#define OFFSET_DLH 0x04 /* Divisor Latch (High-Byte) */
12#define OFFSET_IIR 0x08 /* Interrupt Identification Register */
13#define OFFSET_LCR 0x0C /* Line Control Register */
14#define OFFSET_MCR 0x10 /* Modem Control Register */
15#define OFFSET_LSR 0x14 /* Line Status Register */
16#define OFFSET_MSR 0x18 /* Modem Status Register */
17#define OFFSET_SCR 0x1C /* SCR Scratch Register */
18#define OFFSET_GCTL 0x24 /* Global Control Register */
19
20#define UART_GET_CHAR(uart) bfin_read16(((uart)->port.membase + OFFSET_RBR)) 36#define UART_GET_CHAR(uart) bfin_read16(((uart)->port.membase + OFFSET_RBR))
21#define UART_GET_DLL(uart) bfin_read16(((uart)->port.membase + OFFSET_DLL)) 37#define UART_GET_DLL(uart) bfin_read16(((uart)->port.membase + OFFSET_DLL))
22#define UART_GET_IER(uart) bfin_read16(((uart)->port.membase + OFFSET_IER)) 38#define UART_GET_IER(uart) bfin_read16(((uart)->port.membase + OFFSET_IER))
@@ -92,7 +108,7 @@ static inline void UART_CLEAR_LSR(struct bfin_serial_port *uart)
92 bfin_write16(uart->port.membase + OFFSET_LSR, -1); 108 bfin_write16(uart->port.membase + OFFSET_LSR, -1);
93} 109}
94 110
95struct bfin_serial_port bfin_serial_ports[NR_PORTS]; 111struct bfin_serial_port bfin_serial_ports[BFIN_UART_NR_PORTS];
96struct bfin_serial_res { 112struct bfin_serial_res {
97 unsigned long uart_base_addr; 113 unsigned long uart_base_addr;
98 int uart_irq; 114 int uart_irq;
diff --git a/include/asm-blackfin/mach-bf527/bfin_sir.h b/include/asm-blackfin/mach-bf527/bfin_sir.h
new file mode 100644
index 000000000000..0612d0c9501c
--- /dev/null
+++ b/include/asm-blackfin/mach-bf527/bfin_sir.h
@@ -0,0 +1,133 @@
1/*
2 * Blackfin Infra-red Driver
3 *
4 * Copyright 2006-2008 Analog Devices Inc.
5 *
6 * Enter bugs at http://blackfin.uclinux.org/
7 *
8 * Licensed under the GPL-2 or later.
9 *
10 */
11
12#include <linux/serial.h>
13#include <asm/dma.h>
14#include <asm/portmux.h>
15
16#define SIR_UART_GET_CHAR(port) bfin_read16((port)->membase + OFFSET_RBR)
17#define SIR_UART_GET_DLL(port) bfin_read16((port)->membase + OFFSET_DLL)
18#define SIR_UART_GET_IER(port) bfin_read16((port)->membase + OFFSET_IER)
19#define SIR_UART_GET_DLH(port) bfin_read16((port)->membase + OFFSET_DLH)
20#define SIR_UART_GET_IIR(port) bfin_read16((port)->membase + OFFSET_IIR)
21#define SIR_UART_GET_LCR(port) bfin_read16((port)->membase + OFFSET_LCR)
22#define SIR_UART_GET_GCTL(port) bfin_read16((port)->membase + OFFSET_GCTL)
23
24#define SIR_UART_PUT_CHAR(port, v) bfin_write16(((port)->membase + OFFSET_THR), v)
25#define SIR_UART_PUT_DLL(port, v) bfin_write16(((port)->membase + OFFSET_DLL), v)
26#define SIR_UART_PUT_IER(port, v) bfin_write16(((port)->membase + OFFSET_IER), v)
27#define SIR_UART_PUT_DLH(port, v) bfin_write16(((port)->membase + OFFSET_DLH), v)
28#define SIR_UART_PUT_LCR(port, v) bfin_write16(((port)->membase + OFFSET_LCR), v)
29#define SIR_UART_PUT_GCTL(port, v) bfin_write16(((port)->membase + OFFSET_GCTL), v)
30
31#ifdef CONFIG_SIR_BFIN_DMA
32struct dma_rx_buf {
33 char *buf;
34 int head;
35 int tail;
36 };
37#endif /* CONFIG_SIR_BFIN_DMA */
38
39struct bfin_sir_port {
40 unsigned char __iomem *membase;
41 unsigned int irq;
42 unsigned int lsr;
43 unsigned long clk;
44 struct net_device *dev;
45#ifdef CONFIG_SIR_BFIN_DMA
46 int tx_done;
47 struct dma_rx_buf rx_dma_buf;
48 struct timer_list rx_dma_timer;
49 int rx_dma_nrows;
50#endif /* CONFIG_SIR_BFIN_DMA */
51 unsigned int tx_dma_channel;
52 unsigned int rx_dma_channel;
53};
54
55struct bfin_sir_port sir_ports[BFIN_UART_NR_PORTS];
56
57struct bfin_sir_port_res {
58 unsigned long base_addr;
59 int irq;
60 unsigned int rx_dma_channel;
61 unsigned int tx_dma_channel;
62};
63
64struct bfin_sir_port_res bfin_sir_port_resource[] = {
65#ifdef CONFIG_BFIN_SIR0
66 {
67 0xFFC00400,
68 IRQ_UART0_RX,
69 CH_UART0_RX,
70 CH_UART0_TX,
71 },
72#endif
73#ifdef CONFIG_BFIN_SIR1
74 {
75 0xFFC02000,
76 IRQ_UART1_RX,
77 CH_UART1_RX,
78 CH_UART1_TX,
79 },
80#endif
81};
82
83int nr_sirs = ARRAY_SIZE(bfin_sir_port_resource);
84
85struct bfin_sir_self {
86 struct bfin_sir_port *sir_port;
87 spinlock_t lock;
88 unsigned int open;
89 int speed;
90 int newspeed;
91
92 struct sk_buff *txskb;
93 struct sk_buff *rxskb;
94 struct net_device_stats stats;
95 struct device *dev;
96 struct irlap_cb *irlap;
97 struct qos_info qos;
98
99 iobuff_t tx_buff;
100 iobuff_t rx_buff;
101
102 struct work_struct work;
103 int mtt;
104};
105
106static inline unsigned int SIR_UART_GET_LSR(struct bfin_sir_port *port)
107{
108 unsigned int lsr = bfin_read16(port->membase + OFFSET_LSR);
109 port->lsr |= (lsr & (BI|FE|PE|OE));
110 return lsr | port->lsr;
111}
112
113static inline void SIR_UART_CLEAR_LSR(struct bfin_sir_port *port)
114{
115 port->lsr = 0;
116 bfin_read16(port->membase + OFFSET_LSR);
117}
118
119#define DRIVER_NAME "bfin_sir"
120
121static void bfin_sir_hw_init(void)
122{
123#ifdef CONFIG_BFIN_SIR0
124 peripheral_request(P_UART0_TX, DRIVER_NAME);
125 peripheral_request(P_UART0_RX, DRIVER_NAME);
126#endif
127
128#ifdef CONFIG_BFIN_SIR1
129 peripheral_request(P_UART1_TX, DRIVER_NAME);
130 peripheral_request(P_UART1_RX, DRIVER_NAME);
131#endif
132 SSYNC();
133}
diff --git a/include/asm-blackfin/mach-bf527/blackfin.h b/include/asm-blackfin/mach-bf527/blackfin.h
index 1bd07e30781c..2891727b6176 100644
--- a/include/asm-blackfin/mach-bf527/blackfin.h
+++ b/include/asm-blackfin/mach-bf527/blackfin.h
@@ -64,6 +64,21 @@
64#define STATUS_P1 0x02 64#define STATUS_P1 0x02
65#define STATUS_P0 0x01 65#define STATUS_P0 0x01
66 66
67#define BFIN_UART_NR_PORTS 2
68
69#define OFFSET_THR 0x00 /* Transmit Holding register */
70#define OFFSET_RBR 0x00 /* Receive Buffer register */
71#define OFFSET_DLL 0x00 /* Divisor Latch (Low-Byte) */
72#define OFFSET_IER 0x04 /* Interrupt Enable Register */
73#define OFFSET_DLH 0x04 /* Divisor Latch (High-Byte) */
74#define OFFSET_IIR 0x08 /* Interrupt Identification Register */
75#define OFFSET_LCR 0x0C /* Line Control Register */
76#define OFFSET_MCR 0x10 /* Modem Control Register */
77#define OFFSET_LSR 0x14 /* Line Status Register */
78#define OFFSET_MSR 0x18 /* Modem Status Register */
79#define OFFSET_SCR 0x1C /* SCR Scratch Register */
80#define OFFSET_GCTL 0x24 /* Global Control Register */
81
67/* DPMC*/ 82/* DPMC*/
68#define bfin_read_STOPCK_OFF() bfin_read_STOPCK() 83#define bfin_read_STOPCK_OFF() bfin_read_STOPCK()
69#define bfin_write_STOPCK_OFF(val) bfin_write_STOPCK(val) 84#define bfin_write_STOPCK_OFF(val) bfin_write_STOPCK(val)
diff --git a/include/asm-blackfin/mach-bf527/cdefBF52x_base.h b/include/asm-blackfin/mach-bf527/cdefBF52x_base.h
index 3f4de5d9d4cb..9dbdbec8ea1b 100644
--- a/include/asm-blackfin/mach-bf527/cdefBF52x_base.h
+++ b/include/asm-blackfin/mach-bf527/cdefBF52x_base.h
@@ -29,18 +29,71 @@
29 */ 29 */
30 30
31#ifndef _CDEF_BF52X_H 31#ifndef _CDEF_BF52X_H
32#define _CDEF_BF52X_H
33
34#include <asm/system.h>
35#include <asm/blackfin.h>
32 36
33#include "defBF52x_base.h" 37#include "defBF52x_base.h"
34 38
39/* Include core specific register pointer definitions */
40#include <asm/mach-common/cdef_LPBlackfin.h>
41
35/* ==== begin from cdefBF534.h ==== */ 42/* ==== begin from cdefBF534.h ==== */
36 43
37/* Clock and System Control (0xFFC00000 - 0xFFC000FF) */ 44/* Clock and System Control (0xFFC00000 - 0xFFC000FF) */
38#define bfin_read_PLL_CTL() bfin_read16(PLL_CTL) 45#define bfin_read_PLL_CTL() bfin_read16(PLL_CTL)
39#define bfin_write_PLL_CTL(val) bfin_write16(PLL_CTL, val) 46/* Writing to PLL_CTL initiates a PLL relock sequence. */
47static __inline__ void bfin_write_PLL_CTL(unsigned int val)
48{
49 unsigned long flags, iwr0, iwr1;
50
51 if (val == bfin_read_PLL_CTL())
52 return;
53
54 local_irq_save(flags);
55 /* Enable the PLL Wakeup bit in SIC IWR */
56 iwr0 = bfin_read32(SIC_IWR0);
57 iwr1 = bfin_read32(SIC_IWR1);
58 /* Only allow PPL Wakeup) */
59 bfin_write32(SIC_IWR0, IWR_ENABLE(0));
60 bfin_write32(SIC_IWR1, 0);
61
62 bfin_write16(PLL_CTL, val);
63 SSYNC();
64 asm("IDLE;");
65
66 bfin_write32(SIC_IWR0, iwr0);
67 bfin_write32(SIC_IWR1, iwr1);
68 local_irq_restore(flags);
69}
40#define bfin_read_PLL_DIV() bfin_read16(PLL_DIV) 70#define bfin_read_PLL_DIV() bfin_read16(PLL_DIV)
41#define bfin_write_PLL_DIV(val) bfin_write16(PLL_DIV, val) 71#define bfin_write_PLL_DIV(val) bfin_write16(PLL_DIV, val)
42#define bfin_read_VR_CTL() bfin_read16(VR_CTL) 72#define bfin_read_VR_CTL() bfin_read16(VR_CTL)
43#define bfin_write_VR_CTL(val) bfin_write16(VR_CTL, val) 73/* Writing to VR_CTL initiates a PLL relock sequence. */
74static __inline__ void bfin_write_VR_CTL(unsigned int val)
75{
76 unsigned long flags, iwr0, iwr1;
77
78 if (val == bfin_read_VR_CTL())
79 return;
80
81 local_irq_save(flags);
82 /* Enable the PLL Wakeup bit in SIC IWR */
83 iwr0 = bfin_read32(SIC_IWR0);
84 iwr1 = bfin_read32(SIC_IWR1);
85 /* Only allow PPL Wakeup) */
86 bfin_write32(SIC_IWR0, IWR_ENABLE(0));
87 bfin_write32(SIC_IWR1, 0);
88
89 bfin_write16(VR_CTL, val);
90 SSYNC();
91 asm("IDLE;");
92
93 bfin_write32(SIC_IWR0, iwr0);
94 bfin_write32(SIC_IWR1, iwr1);
95 local_irq_restore(flags);
96}
44#define bfin_read_PLL_STAT() bfin_read16(PLL_STAT) 97#define bfin_read_PLL_STAT() bfin_read16(PLL_STAT)
45#define bfin_write_PLL_STAT(val) bfin_write16(PLL_STAT, val) 98#define bfin_write_PLL_STAT(val) bfin_write16(PLL_STAT, val)
46#define bfin_read_PLL_LOCKCNT() bfin_read16(PLL_LOCKCNT) 99#define bfin_read_PLL_LOCKCNT() bfin_read16(PLL_LOCKCNT)
@@ -873,39 +926,6 @@
873 926
874 927
875/* Two-Wire Interface (0xFFC01400 - 0xFFC014FF) */ 928/* Two-Wire Interface (0xFFC01400 - 0xFFC014FF) */
876#define bfin_read_TWI_CLKDIV() bfin_read16(TWI_CLKDIV)
877#define bfin_write_TWI_CLKDIV(val) bfin_write16(TWI_CLKDIV, val)
878#define bfin_read_TWI_CONTROL() bfin_read16(TWI_CONTROL)
879#define bfin_write_TWI_CONTROL(val) bfin_write16(TWI_CONTROL, val)
880#define bfin_read_TWI_SLAVE_CTL() bfin_read16(TWI_SLAVE_CTL)
881#define bfin_write_TWI_SLAVE_CTL(val) bfin_write16(TWI_SLAVE_CTL, val)
882#define bfin_read_TWI_SLAVE_STAT() bfin_read16(TWI_SLAVE_STAT)
883#define bfin_write_TWI_SLAVE_STAT(val) bfin_write16(TWI_SLAVE_STAT, val)
884#define bfin_read_TWI_SLAVE_ADDR() bfin_read16(TWI_SLAVE_ADDR)
885#define bfin_write_TWI_SLAVE_ADDR(val) bfin_write16(TWI_SLAVE_ADDR, val)
886#define bfin_read_TWI_MASTER_CTL() bfin_read16(TWI_MASTER_CTL)
887#define bfin_write_TWI_MASTER_CTL(val) bfin_write16(TWI_MASTER_CTL, val)
888#define bfin_read_TWI_MASTER_STAT() bfin_read16(TWI_MASTER_STAT)
889#define bfin_write_TWI_MASTER_STAT(val) bfin_write16(TWI_MASTER_STAT, val)
890#define bfin_read_TWI_MASTER_ADDR() bfin_read16(TWI_MASTER_ADDR)
891#define bfin_write_TWI_MASTER_ADDR(val) bfin_write16(TWI_MASTER_ADDR, val)
892#define bfin_read_TWI_INT_STAT() bfin_read16(TWI_INT_STAT)
893#define bfin_write_TWI_INT_STAT(val) bfin_write16(TWI_INT_STAT, val)
894#define bfin_read_TWI_INT_MASK() bfin_read16(TWI_INT_MASK)
895#define bfin_write_TWI_INT_MASK(val) bfin_write16(TWI_INT_MASK, val)
896#define bfin_read_TWI_FIFO_CTL() bfin_read16(TWI_FIFO_CTL)
897#define bfin_write_TWI_FIFO_CTL(val) bfin_write16(TWI_FIFO_CTL, val)
898#define bfin_read_TWI_FIFO_STAT() bfin_read16(TWI_FIFO_STAT)
899#define bfin_write_TWI_FIFO_STAT(val) bfin_write16(TWI_FIFO_STAT, val)
900#define bfin_read_TWI_XMT_DATA8() bfin_read16(TWI_XMT_DATA8)
901#define bfin_write_TWI_XMT_DATA8(val) bfin_write16(TWI_XMT_DATA8, val)
902#define bfin_read_TWI_XMT_DATA16() bfin_read16(TWI_XMT_DATA16)
903#define bfin_write_TWI_XMT_DATA16(val) bfin_write16(TWI_XMT_DATA16, val)
904#define bfin_read_TWI_RCV_DATA8() bfin_read16(TWI_RCV_DATA8)
905#define bfin_write_TWI_RCV_DATA8(val) bfin_write16(TWI_RCV_DATA8, val)
906#define bfin_read_TWI_RCV_DATA16() bfin_read16(TWI_RCV_DATA16)
907#define bfin_write_TWI_RCV_DATA16(val) bfin_write16(TWI_RCV_DATA16, val)
908
909 929
910/* General Purpose I/O Port G (0xFFC01500 - 0xFFC015FF) */ 930/* General Purpose I/O Port G (0xFFC01500 - 0xFFC015FF) */
911#define bfin_read_PORTGIO() bfin_read16(PORTGIO) 931#define bfin_read_PORTGIO() bfin_read16(PORTGIO)
diff --git a/include/asm-blackfin/mach-bf527/dma.h b/include/asm-blackfin/mach-bf527/dma.h
index 2dfee12864f6..49dd693223e8 100644
--- a/include/asm-blackfin/mach-bf527/dma.h
+++ b/include/asm-blackfin/mach-bf527/dma.h
@@ -59,7 +59,4 @@
59#define CH_NFC CH_EMAC_TX /* PPI receive/transmit or NFC */ 59#define CH_NFC CH_EMAC_TX /* PPI receive/transmit or NFC */
60#endif 60#endif
61 61
62extern int channel2irq(unsigned int channel);
63extern struct dma_register *base_addr[];
64
65#endif 62#endif