diff options
author | Sonic Zhang <sonic.zhang@analog.com> | 2011-11-24 04:40:07 -0500 |
---|---|---|
committer | Bob Liu <lliubbo@gmail.com> | 2012-05-21 02:54:21 -0400 |
commit | c55c89e939f2a0a83d5c61462be554d5d2408178 (patch) | |
tree | f3fe0781b6bf66acb3fb1a321ff446c240afeb73 /arch/blackfin/mach-bf538 | |
parent | 2879bb30d788bb3841e2f1675ea7af5204eb171c (diff) |
blackfin: twi: move twi bit mask macro to twi head file
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
Diffstat (limited to 'arch/blackfin/mach-bf538')
-rw-r--r-- | arch/blackfin/mach-bf538/include/mach/defBF538.h | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/arch/blackfin/mach-bf538/include/mach/defBF538.h b/arch/blackfin/mach-bf538/include/mach/defBF538.h index d27f81d6c4b1..f5aaf0573c07 100644 --- a/arch/blackfin/mach-bf538/include/mach/defBF538.h +++ b/arch/blackfin/mach-bf538/include/mach/defBF538.h | |||
@@ -1746,80 +1746,4 @@ | |||
1746 | #define SDEASE 0x00000010 /* SDRAM EAB sticky error status - W1C */ | 1746 | #define SDEASE 0x00000010 /* SDRAM EAB sticky error status - W1C */ |
1747 | #define BGSTAT 0x00000020 /* Bus granted */ | 1747 | #define BGSTAT 0x00000020 /* Bus granted */ |
1748 | 1748 | ||
1749 | |||
1750 | /* ******************** TWO-WIRE INTERFACE (TWIx) MASKS ***********************/ | ||
1751 | /* TWIx_CLKDIV Macros (Use: *pTWIx_CLKDIV = CLKLOW(x)|CLKHI(y); ) */ | ||
1752 | #ifdef _MISRA_RULES | ||
1753 | #define CLKLOW(x) ((x) & 0xFFu) /* Periods Clock Is Held Low */ | ||
1754 | #define CLKHI(y) (((y)&0xFFu)<<0x8) /* Periods Before New Clock Low */ | ||
1755 | #else | ||
1756 | #define CLKLOW(x) ((x) & 0xFF) /* Periods Clock Is Held Low */ | ||
1757 | #define CLKHI(y) (((y)&0xFF)<<0x8) /* Periods Before New Clock Low */ | ||
1758 | #endif /* _MISRA_RULES */ | ||
1759 | |||
1760 | /* TWIx_PRESCALE Masks */ | ||
1761 | #define PRESCALE 0x007F /* SCLKs Per Internal Time Reference (10MHz) */ | ||
1762 | #define TWI_ENA 0x0080 /* TWI Enable */ | ||
1763 | #define SCCB 0x0200 /* SCCB Compatibility Enable */ | ||
1764 | |||
1765 | /* TWIx_SLAVE_CTRL Masks */ | ||
1766 | #define SEN 0x0001 /* Slave Enable */ | ||
1767 | #define SADD_LEN 0x0002 /* Slave Address Length */ | ||
1768 | #define STDVAL 0x0004 /* Slave Transmit Data Valid */ | ||
1769 | #define NAK 0x0008 /* NAK/ACK* Generated At Conclusion Of Transfer */ | ||
1770 | #define GEN 0x0010 /* General Call Adrress Matching Enabled */ | ||
1771 | |||
1772 | /* TWIx_SLAVE_STAT Masks */ | ||
1773 | #define SDIR 0x0001 /* Slave Transfer Direction (Transmit/Receive*) */ | ||
1774 | #define GCALL 0x0002 /* General Call Indicator */ | ||
1775 | |||
1776 | /* TWIx_MASTER_CTRL Masks */ | ||
1777 | #define MEN 0x0001 /* Master Mode Enable */ | ||
1778 | #define MADD_LEN 0x0002 /* Master Address Length */ | ||
1779 | #define MDIR 0x0004 /* Master Transmit Direction (RX/TX*) */ | ||
1780 | #define FAST 0x0008 /* Use Fast Mode Timing Specs */ | ||
1781 | #define STOP 0x0010 /* Issue Stop Condition */ | ||
1782 | #define RSTART 0x0020 /* Repeat Start or Stop* At End Of Transfer */ | ||
1783 | #define DCNT 0x3FC0 /* Data Bytes To Transfer */ | ||
1784 | #define SDAOVR 0x4000 /* Serial Data Override */ | ||
1785 | #define SCLOVR 0x8000 /* Serial Clock Override */ | ||
1786 | |||
1787 | /* TWIx_MASTER_STAT Masks */ | ||
1788 | #define MPROG 0x0001 /* Master Transfer In Progress */ | ||
1789 | #define LOSTARB 0x0002 /* Lost Arbitration Indicator (Xfer Aborted) */ | ||
1790 | #define ANAK 0x0004 /* Address Not Acknowledged */ | ||
1791 | #define DNAK 0x0008 /* Data Not Acknowledged */ | ||
1792 | #define BUFRDERR 0x0010 /* Buffer Read Error */ | ||
1793 | #define BUFWRERR 0x0020 /* Buffer Write Error */ | ||
1794 | #define SDASEN 0x0040 /* Serial Data Sense */ | ||
1795 | #define SCLSEN 0x0080 /* Serial Clock Sense */ | ||
1796 | #define BUSBUSY 0x0100 /* Bus Busy Indicator */ | ||
1797 | |||
1798 | /* TWIx_INT_SRC and TWIx_INT_ENABLE Masks */ | ||
1799 | #define SINIT 0x0001 /* Slave Transfer Initiated */ | ||
1800 | #define SCOMP 0x0002 /* Slave Transfer Complete */ | ||
1801 | #define SERR 0x0004 /* Slave Transfer Error */ | ||
1802 | #define SOVF 0x0008 /* Slave Overflow */ | ||
1803 | #define MCOMP 0x0010 /* Master Transfer Complete */ | ||
1804 | #define MERR 0x0020 /* Master Transfer Error */ | ||
1805 | #define XMTSERV 0x0040 /* Transmit FIFO Service */ | ||
1806 | #define RCVSERV 0x0080 /* Receive FIFO Service */ | ||
1807 | |||
1808 | /* TWIx_FIFO_CTL Masks */ | ||
1809 | #define XMTFLUSH 0x0001 /* Transmit Buffer Flush */ | ||
1810 | #define RCVFLUSH 0x0002 /* Receive Buffer Flush */ | ||
1811 | #define XMTINTLEN 0x0004 /* Transmit Buffer Interrupt Length */ | ||
1812 | #define RCVINTLEN 0x0008 /* Receive Buffer Interrupt Length */ | ||
1813 | |||
1814 | /* TWIx_FIFO_STAT Masks */ | ||
1815 | #define XMTSTAT 0x0003 /* Transmit FIFO Status */ | ||
1816 | #define XMT_EMPTY 0x0000 /* Transmit FIFO Empty */ | ||
1817 | #define XMT_HALF 0x0001 /* Transmit FIFO Has 1 Byte To Write */ | ||
1818 | #define XMT_FULL 0x0003 /* Transmit FIFO Full (2 Bytes To Write) */ | ||
1819 | |||
1820 | #define RCVSTAT 0x000C /* Receive FIFO Status */ | ||
1821 | #define RCV_EMPTY 0x0000 /* Receive FIFO Empty */ | ||
1822 | #define RCV_HALF 0x0004 /* Receive FIFO Has 1 Byte To Read */ | ||
1823 | #define RCV_FULL 0x000C /* Receive FIFO Full (2 Bytes To Read) */ | ||
1824 | |||
1825 | #endif | 1749 | #endif |