• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Pin-multiplex helper macros for TI DaVinci family devices
4  *
5  * Author: Vladimir Barinov, MontaVista Software, Inc. <source@mvista.com>
6  *
7  * 2007 (c) MontaVista Software, Inc.
8  *
9  * Copyright (C) 2008 Texas Instruments.
10  */
11 #ifndef _MACH_DAVINCI_MUX_H_
12 #define _MACH_DAVINCI_MUX_H_
13 
14 #include <mach/mux.h>
15 
16 #define MUX_CFG(soc, desc, muxreg, mode_offset, mode_mask, mux_mode, dbg)\
17 [soc##_##desc] = {							\
18 			.name =  #desc,					\
19 			.debug = dbg,					\
20 			.mux_reg_name = "PINMUX"#muxreg,		\
21 			.mux_reg = PINMUX(muxreg),			\
22 			.mask_offset = mode_offset,			\
23 			.mask = mode_mask,				\
24 			.mode = mux_mode,				\
25 		},
26 
27 #define INT_CFG(soc, desc, mode_offset, mode_mask, mux_mode, dbg)	\
28 [soc##_##desc] = {							\
29 			.name =  #desc,					\
30 			.debug = dbg,					\
31 			.mux_reg_name = "INTMUX",			\
32 			.mux_reg = INTMUX,				\
33 			.mask_offset = mode_offset,			\
34 			.mask = mode_mask,				\
35 			.mode = mux_mode,				\
36 		},
37 
38 #define EVT_CFG(soc, desc, mode_offset, mode_mask, mux_mode, dbg)	\
39 [soc##_##desc] = {							\
40 			.name =  #desc,					\
41 			.debug = dbg,					\
42 			.mux_reg_name = "EVTMUX",			\
43 			.mux_reg = EVTMUX,				\
44 			.mask_offset = mode_offset,			\
45 			.mask = mode_mask,				\
46 			.mode = mux_mode,				\
47 		},
48 
49 #endif /* _MACH_DAVINCI_MUX_H */
50