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

TOMOYO Linux Cross Reference
Linux/include/linux/platform_data/serial-sccnxp.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ 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.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-or-later */
  2 /*
  3  *  NXP (Philips) SCC+++(SCN+++) serial driver
  4  *
  5  *  Copyright (C) 2012 Alexander Shiyan <shc_work@mail.ru>
  6  *
  7  *  Based on sc26xx.c, by Thomas Bogendörfer (tsbogend@alpha.franken.de)
  8  */
  9 
 10 #ifndef _PLATFORM_DATA_SERIAL_SCCNXP_H_
 11 #define _PLATFORM_DATA_SERIAL_SCCNXP_H_
 12 
 13 #define SCCNXP_MAX_UARTS        2
 14 
 15 /* Output lines */
 16 #define LINE_OP0                1
 17 #define LINE_OP1                2
 18 #define LINE_OP2                3
 19 #define LINE_OP3                4
 20 #define LINE_OP4                5
 21 #define LINE_OP5                6
 22 #define LINE_OP6                7
 23 #define LINE_OP7                8
 24 
 25 /* Input lines */
 26 #define LINE_IP0                9
 27 #define LINE_IP1                10
 28 #define LINE_IP2                11
 29 #define LINE_IP3                12
 30 #define LINE_IP4                13
 31 #define LINE_IP5                14
 32 #define LINE_IP6                15
 33 
 34 /* Signals */
 35 #define DTR_OP                  0       /* DTR */
 36 #define RTS_OP                  4       /* RTS */
 37 #define DSR_IP                  8       /* DSR */
 38 #define CTS_IP                  12      /* CTS */
 39 #define DCD_IP                  16      /* DCD */
 40 #define RNG_IP                  20      /* RNG */
 41 
 42 #define DIR_OP                  24      /* Special signal for control RS-485.
 43                                          * Goes high when transmit,
 44                                          * then goes low.
 45                                          */
 46 
 47 /* Routing control signal 'sig' to line 'line' */
 48 #define MCTRL_SIG(sig, line)    ((line) << (sig))
 49 
 50 /*
 51  * Example board initialization data:
 52  *
 53  * static struct resource sc2892_resources[] = {
 54  *      DEFINE_RES_MEM(UART_PHYS_START, 0x10),
 55  *      DEFINE_RES_IRQ(IRQ_EXT2),
 56  * };
 57  *
 58  * static struct sccnxp_pdata sc2892_info = {
 59  *      .mctrl_cfg[0]   = MCTRL_SIG(DIR_OP, LINE_OP0),
 60  *      .mctrl_cfg[1]   = MCTRL_SIG(DIR_OP, LINE_OP1),
 61  * };
 62  *
 63  * static struct platform_device sc2892 = {
 64  *      .name           = "sc2892",
 65  *      .id             = -1,
 66  *      .resource       = sc2892_resources,
 67  *      .num_resources  = ARRAY_SIZE(sc2892_resources),
 68  *      .dev = {
 69  *              .platform_data  = &sc2892_info,
 70  *      },
 71  * };
 72  */
 73 
 74 /* SCCNXP platform data structure */
 75 struct sccnxp_pdata {
 76         /* Shift for A0 line */
 77         const u8                reg_shift;
 78         /* Modem control lines configuration */
 79         const u32               mctrl_cfg[SCCNXP_MAX_UARTS];
 80         /* Timer value for polling mode (usecs) */
 81         const unsigned int      poll_time_us;
 82 };
 83 
 84 #endif
 85 

~ [ 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