ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / include / asm-m68knommu / semp3.h
1 /****************************************************************************/
2
3 /*
4  *      semp.h -- SecureEdge MP3 hardware platform support.
5  *
6  *      (C) Copyright 2001-2002, Greg Ungerer (gerg@snapgear.com).
7  */
8
9 /****************************************************************************/
10 #ifndef semp3_h
11 #define semp3_h
12 /****************************************************************************/
13
14 #include <linux/config.h>
15
16 /****************************************************************************/
17 #ifdef CONFIG_SECUREEDGEMP3
18 /****************************************************************************/
19
20 #include <asm/coldfire.h>
21 #include <asm/mcfsim.h>
22
23 /*
24  *      The ColdFire UARTs do not have any support for DTR/DCD lines.
25  *      We have wired them onto some of the parallel IO lines.
26  */
27 #define MCFPP_DCD1      0x0004
28 #define MCFPP_DCD0      0x0000          /* No DCD line on port 0 */
29 #define MCFPP_DTR1      0x0080
30 #define MCFPP_DTR0      0x0000          /* No DTR line on port 0 */
31
32
33 #ifndef __ASSEMBLY__
34
35 extern volatile unsigned short ppdata;
36
37 /*
38  *      These functions defined to give quasi generic access to the
39  *      PPIO bits used for DTR/DCD.
40  */
41 static __inline__ unsigned int mcf_getppdata(void)
42 {
43         volatile unsigned short *pp;
44         pp = (volatile unsigned short *) (MCF_MBAR + MCFSIM_PADAT);
45         return((unsigned int) *pp);
46 }
47
48 static __inline__ void mcf_setppdata(unsigned int mask, unsigned int bits)
49 {
50         volatile unsigned short *pp;
51         pp = (volatile unsigned short *) (MCF_MBAR + MCFSIM_PADAT);
52         ppdata = (ppdata & ~mask) | bits;
53         *pp = ppdata;
54 }
55 #endif
56
57 /****************************************************************************/
58 #endif /* CONFIG_SECUREEDGEMP3 */
59 /****************************************************************************/
60 #endif  /* semp3_h */