Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial
[pandora-kernel.git] / include / asm-m32r / m32700ut / m32700ut_lan.h
1 /*
2  * include/asm-m32r/m32700ut/m32700ut_lan.h
3  *
4  * M32700UT-LAN board
5  *
6  * Copyright (c) 2002   Takeo Takahashi
7  *
8  * This file is subject to the terms and conditions of the GNU General
9  * Public License.  See the file "COPYING" in the main directory of
10  * this archive for more details.
11  *
12  * $Id$
13  */
14
15 #ifndef _M32700UT_M32700UT_LAN_H
16 #define _M32700UT_M32700UT_LAN_H
17
18
19 #ifndef __ASSEMBLY__
20 /*
21  * C functions use non-cache address.
22  */
23 #define M32700UT_LAN_BASE       (0x10000000 /* + NONCACHE_OFFSET */)
24 #else
25 #define M32700UT_LAN_BASE       (0x10000000 + NONCACHE_OFFSET)
26 #endif  /* __ASSEMBLY__ */
27
28 /* ICU
29  *  ICUISTS:    status register
30  *  ICUIREQ0:   request register
31  *  ICUIREQ1:   request register
32  *  ICUCR3:     control register for CFIREQ# interrupt
33  *  ICUCR4:     control register for CFC Card insert interrupt
34  *  ICUCR5:     control register for CFC Card eject interrupt
35  *  ICUCR6:     control register for external interrupt
36  *  ICUCR11:    control register for MMC Card insert/eject interrupt
37  *  ICUCR13:    control register for SC error interrupt
38  *  ICUCR14:    control register for SC receive interrupt
39  *  ICUCR15:    control register for SC send interrupt
40  *  ICUCR16:    control register for SIO0 receive interrupt
41  *  ICUCR17:    control register for SIO0 send interrupt
42  */
43 #define M32700UT_LAN_IRQ_LAN    (M32700UT_LAN_PLD_IRQ_BASE + 1) /* LAN */
44 #define M32700UT_LAN_IRQ_I2C    (M32700UT_LAN_PLD_IRQ_BASE + 3) /* I2C */
45
46 #define M32700UT_LAN_ICUISTS    __reg16(M32700UT_LAN_BASE + 0xc0002)
47 #define M32700UT_LAN_ICUISTS_VECB_MASK  (0xf000)
48 #define M32700UT_LAN_VECB(x)    ((x) & M32700UT_LAN_ICUISTS_VECB_MASK)
49 #define M32700UT_LAN_ICUISTS_ISN_MASK   (0x07c0)
50 #define M32700UT_LAN_ICUISTS_ISN(x)     ((x) & M32700UT_LAN_ICUISTS_ISN_MASK)
51 #define M32700UT_LAN_ICUIREQ0   __reg16(M32700UT_LAN_BASE + 0xc0004)
52 #define M32700UT_LAN_ICUCR1     __reg16(M32700UT_LAN_BASE + 0xc0010)
53 #define M32700UT_LAN_ICUCR3     __reg16(M32700UT_LAN_BASE + 0xc0014)
54
55 /*
56  * AR register on PLD
57  */
58 #define ARVCR0          __reg32(M32700UT_LAN_BASE + 0x40000)
59 #define ARVCR0_VDS              0x00080000
60 #define ARVCR0_RST              0x00010000
61 #define ARVCR1          __reg32(M32700UT_LAN_BASE + 0x40004)
62 #define ARVCR1_QVGA             0x02000000
63 #define ARVCR1_NORMAL           0x01000000
64 #define ARVCR1_HIEN             0x00010000
65 #define ARVHCOUNT       __reg32(M32700UT_LAN_BASE + 0x40008)
66 #define ARDATA          __reg32(M32700UT_LAN_BASE + 0x40010)
67 #define ARINTSEL        __reg32(M32700UT_LAN_BASE + 0x40014)
68 #define ARINTSEL_INT3           0x10000000      /* CPU INT3 */
69 #define ARDATA32        __reg32(M32700UT_LAN_BASE + 0x04040010) // Block 5
70 /*
71 #define ARINTSEL_SEL2           0x00002000
72 #define ARINTSEL_SEL3           0x00001000
73 #define ARINTSEL_SEL6           0x00000200
74 #define ARINTSEL_SEL7           0x00000100
75 #define ARINTSEL_SEL9           0x00000040
76 #define ARINTSEL_SEL10          0x00000020
77 #define ARINTSEL_SEL11          0x00000010
78 #define ARINTSEL_SEL12          0x00000008
79 */
80
81 /*
82  * I2C register on PLD
83  */
84 #define PLDI2CCR        __reg32(M32700UT_LAN_BASE + 0x40040)
85 #define PLDI2CCR_ES0            0x00000001      /* enable I2C interface */
86 #define PLDI2CMOD       __reg32(M32700UT_LAN_BASE + 0x40044)
87 #define PLDI2CMOD_ACKCLK        0x00000200
88 #define PLDI2CMOD_DTWD          0x00000100
89 #define PLDI2CMOD_10BT          0x00000004
90 #define PLDI2CMOD_ATM_NORMAL    0x00000000
91 #define PLDI2CMOD_ATM_AUTO      0x00000003
92 #define PLDI2CACK       __reg32(M32700UT_LAN_BASE + 0x40048)
93 #define PLDI2CACK_ACK           0x00000001
94 #define PLDI2CFREQ      __reg32(M32700UT_LAN_BASE + 0x4004c)
95 #define PLDI2CCND       __reg32(M32700UT_LAN_BASE + 0x40050)
96 #define PLDI2CCND_START         0x00000001
97 #define PLDI2CCND_STOP          0x00000002
98 #define PLDI2CSTEN      __reg32(M32700UT_LAN_BASE + 0x40054)
99 #define PLDI2CSTEN_STEN         0x00000001
100 #define PLDI2CDATA      __reg32(M32700UT_LAN_BASE + 0x40060)
101 #define PLDI2CSTS       __reg32(M32700UT_LAN_BASE + 0x40064)
102 #define PLDI2CSTS_TRX           0x00000020
103 #define PLDI2CSTS_BB            0x00000010
104 #define PLDI2CSTS_NOACK         0x00000001      /* 0:ack, 1:noack */
105
106 #endif  /* _M32700UT_M32700UT_LAN_H */