aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-m68knommu/nettel.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-m68knommu/nettel.h')
-rw-r--r--include/asm-m68knommu/nettel.h109
1 files changed, 109 insertions, 0 deletions
diff --git a/include/asm-m68knommu/nettel.h b/include/asm-m68knommu/nettel.h
new file mode 100644
index 000000000000..9bda307e6544
--- /dev/null
+++ b/include/asm-m68knommu/nettel.h
@@ -0,0 +1,109 @@
1/****************************************************************************/
2
3/*
4 * nettel.h -- Lineo (formerly Moreton Bay) NETtel support.
5 *
6 * (C) Copyright 1999-2000, Moreton Bay (www.moretonbay.com)
7 * (C) Copyright 2000-2001, Lineo Inc. (www.lineo.com)
8 * (C) Copyright 2001-2002, SnapGear Inc., (www.snapgear.com)
9 */
10
11/****************************************************************************/
12#ifndef nettel_h
13#define nettel_h
14/****************************************************************************/
15
16#include <linux/config.h>
17
18/****************************************************************************/
19#ifdef CONFIG_NETtel
20/****************************************************************************/
21
22#ifdef CONFIG_COLDFIRE
23#include <asm/coldfire.h>
24#include <asm/mcfsim.h>
25#endif
26
27/*---------------------------------------------------------------------------*/
28#if defined(CONFIG_M5307)
29/*
30 * NETtel/5307 based hardware first. DTR/DCD lines are wired to
31 * GPIO lines. Most of the LED's are driver through a latch
32 * connected to CS2.
33 */
34#define MCFPP_DCD1 0x0001
35#define MCFPP_DCD0 0x0002
36#define MCFPP_DTR1 0x0004
37#define MCFPP_DTR0 0x0008
38
39#define NETtel_LEDADDR 0x30400000
40
41#ifndef __ASSEMBLY__
42
43extern volatile unsigned short ppdata;
44
45/*
46 * These functions defined to give quasi generic access to the
47 * PPIO bits used for DTR/DCD.
48 */
49static __inline__ unsigned int mcf_getppdata(void)
50{
51 volatile unsigned short *pp;
52 pp = (volatile unsigned short *) (MCF_MBAR + MCFSIM_PADAT);
53 return((unsigned int) *pp);
54}
55
56static __inline__ void mcf_setppdata(unsigned int mask, unsigned int bits)
57{
58 volatile unsigned short *pp;
59 pp = (volatile unsigned short *) (MCF_MBAR + MCFSIM_PADAT);
60 ppdata = (ppdata & ~mask) | bits;
61 *pp = ppdata;
62}
63#endif
64
65/*---------------------------------------------------------------------------*/
66#elif defined(CONFIG_M5206e)
67/*
68 * NETtel/5206e based hardware has leds on latch on CS3.
69 * No support modem for lines??
70 */
71#define NETtel_LEDADDR 0x50000000
72
73/*---------------------------------------------------------------------------*/
74#elif defined(CONFIG_M5272)
75/*
76 * NETtel/5272 based hardware. DTR/DCD lines are wired to GPB lines.
77 */
78#define MCFPP_DCD0 0x0080
79#define MCFPP_DCD1 0x0000 /* Port 1 no DCD support */
80#define MCFPP_DTR0 0x0040
81#define MCFPP_DTR1 0x0000 /* Port 1 no DTR support */
82
83#ifndef __ASSEMBLY__
84/*
85 * These functions defined to give quasi generic access to the
86 * PPIO bits used for DTR/DCD.
87 */
88static __inline__ unsigned int mcf_getppdata(void)
89{
90 volatile unsigned short *pp;
91 pp = (volatile unsigned short *) (MCF_MBAR + MCFSIM_PBDAT);
92 return((unsigned int) *pp);
93}
94
95static __inline__ void mcf_setppdata(unsigned int mask, unsigned int bits)
96{
97 volatile unsigned short *pp;
98 pp = (volatile unsigned short *) (MCF_MBAR + MCFSIM_PBDAT);
99 *pp = (*pp & ~mask) | bits;
100}
101#endif
102
103#endif
104/*---------------------------------------------------------------------------*/
105
106/****************************************************************************/
107#endif /* CONFIG_NETtel */
108/****************************************************************************/
109#endif /* nettel_h */