1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * NXP (Philips) SCC+++(SCN+++) serial driver
5 * Copyright (C) 2012 Alexander Shiyan <shc_work@mail.ru>
7 * Based on sc26xx.c, by Thomas Bogendörfer (tsbogend@alpha.franken.de)
10 #ifndef _PLATFORM_DATA_SERIAL_SCCNXP_H_
11 #define _PLATFORM_DATA_SERIAL_SCCNXP_H_
13 #define SCCNXP_MAX_UARTS 2
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 */
42 #define DIR_OP 24 /* Special signal for control RS-485.
43 * Goes high when transmit,
47 /* Routing control signal 'sig' to line 'line' */
48 #define MCTRL_SIG(sig, line) ((line) << (sig))
51 * Example board initialization data:
53 * static struct resource sc2892_resources[] = {
54 * DEFINE_RES_MEM(UART_PHYS_START, 0x10),
55 * DEFINE_RES_IRQ(IRQ_EXT2),
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),
63 * static struct platform_device sc2892 = {
66 * .resource = sc2892_resources,
67 * .num_resources = ARRAY_SIZE(sc2892_resources),
69 * .platform_data = &sc2892_info,
74 /* SCCNXP platform data structure */
76 /* Shift for A0 line */
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
;