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