xref: /openbmc/linux/arch/arm/mach-davinci/mux.h (revision 55fd7e02)
1 /*
2  * Pin-multiplex helper macros for TI DaVinci family devices
3  *
4  * Author: Vladimir Barinov, MontaVista Software, Inc. <source@mvista.com>
5  *
6  * 2007 (c) MontaVista Software, Inc. This file is licensed under
7  * the terms of the GNU General Public License version 2. This program
8  * is licensed "as is" without any warranty of any kind, whether express
9  * or implied.
10  *
11  * Copyright (C) 2008 Texas Instruments.
12  */
13 #ifndef _MACH_DAVINCI_MUX_H_
14 #define _MACH_DAVINCI_MUX_H_
15 
16 #include <mach/mux.h>
17 
18 #define MUX_CFG(soc, desc, muxreg, mode_offset, mode_mask, mux_mode, dbg)\
19 [soc##_##desc] = {							\
20 			.name =  #desc,					\
21 			.debug = dbg,					\
22 			.mux_reg_name = "PINMUX"#muxreg,		\
23 			.mux_reg = PINMUX(muxreg),			\
24 			.mask_offset = mode_offset,			\
25 			.mask = mode_mask,				\
26 			.mode = mux_mode,				\
27 		},
28 
29 #define INT_CFG(soc, desc, mode_offset, mode_mask, mux_mode, dbg)	\
30 [soc##_##desc] = {							\
31 			.name =  #desc,					\
32 			.debug = dbg,					\
33 			.mux_reg_name = "INTMUX",			\
34 			.mux_reg = INTMUX,				\
35 			.mask_offset = mode_offset,			\
36 			.mask = mode_mask,				\
37 			.mode = mux_mode,				\
38 		},
39 
40 #define EVT_CFG(soc, desc, mode_offset, mode_mask, mux_mode, dbg)	\
41 [soc##_##desc] = {							\
42 			.name =  #desc,					\
43 			.debug = dbg,					\
44 			.mux_reg_name = "EVTMUX",			\
45 			.mux_reg = EVTMUX,				\
46 			.mask_offset = mode_offset,			\
47 			.mask = mode_mask,				\
48 			.mode = mux_mode,				\
49 		},
50 
51 #endif /* _MACH_DAVINCI_MUX_H */
52