~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/m68k/include/asm/nettel.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /****************************************************************************/
  3 
  4 /*
  5  *      nettel.h -- Lineo (formerly Moreton Bay) NETtel support.
  6  *
  7  *      (C) Copyright 1999-2000, Moreton Bay (www.moretonbay.com)
  8  *      (C) Copyright 2000-2001, Lineo Inc. (www.lineo.com) 
  9  *      (C) Copyright 2001-2002, SnapGear Inc., (www.snapgear.com) 
 10  */
 11 
 12 /****************************************************************************/
 13 #ifndef nettel_h
 14 #define nettel_h
 15 /****************************************************************************/
 16 
 17 /****************************************************************************/
 18 #if defined(CONFIG_NETtel) || defined(CONFIG_CLEOPATRA)
 19 /****************************************************************************/
 20 
 21 #ifdef CONFIG_COLDFIRE
 22 #include <asm/coldfire.h>
 23 #include <asm/mcfsim.h>
 24 #include <asm/io.h>
 25 #endif
 26 
 27 /*---------------------------------------------------------------------------*/
 28 #if defined(CONFIG_M5307) || defined(CONFIG_M5407)
 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 
 43 extern 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  */
 49 static __inline__ unsigned int mcf_getppdata(void)
 50 {
 51         volatile unsigned short *pp;
 52         pp = (volatile unsigned short *) MCFSIM_PADAT;
 53         return((unsigned int) *pp);
 54 }
 55 
 56 static __inline__ void mcf_setppdata(unsigned int mask, unsigned int bits)
 57 {
 58         volatile unsigned short *pp;
 59         pp = (volatile unsigned short *) 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  */
 88 static __inline__ unsigned int mcf_getppdata(void)
 89 {
 90         return readw(MCFSIM_PBDAT);
 91 }
 92 
 93 static __inline__ void mcf_setppdata(unsigned int mask, unsigned int bits)
 94 {
 95         writew((readw(MCFSIM_PBDAT) & ~mask) | bits, MCFSIM_PBDAT);
 96 }
 97 #endif
 98 
 99 #endif
100 /*---------------------------------------------------------------------------*/
101 
102 /****************************************************************************/
103 #endif /* CONFIG_NETtel */
104 /****************************************************************************/
105 #endif  /* nettel_h */
106 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php