diff options
Diffstat (limited to 'arch/arm/plat-mxc/include/mach/iomux-v3.h')
-rw-r--r-- | arch/arm/plat-mxc/include/mach/iomux-v3.h | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/arch/arm/plat-mxc/include/mach/iomux-v3.h b/arch/arm/plat-mxc/include/mach/iomux-v3.h index 0880a4a1aed1..811716fbfbe6 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-v3.h +++ b/arch/arm/plat-mxc/include/mach/iomux-v3.h | |||
@@ -44,7 +44,7 @@ | |||
44 | * | 44 | * |
45 | */ | 45 | */ |
46 | 46 | ||
47 | struct pad_desc { | 47 | typedef struct deprecated_pad_desc { |
48 | unsigned mux_ctrl_ofs:12; /* IOMUXC_SW_MUX_CTL_PAD offset */ | 48 | unsigned mux_ctrl_ofs:12; /* IOMUXC_SW_MUX_CTL_PAD offset */ |
49 | unsigned mux_mode:8; | 49 | unsigned mux_mode:8; |
50 | unsigned pad_ctrl_ofs:12; /* IOMUXC_SW_PAD_CTRL offset */ | 50 | unsigned pad_ctrl_ofs:12; /* IOMUXC_SW_PAD_CTRL offset */ |
@@ -52,7 +52,37 @@ struct pad_desc { | |||
52 | unsigned pad_ctrl:17; | 52 | unsigned pad_ctrl:17; |
53 | unsigned select_input_ofs:12; /* IOMUXC_SELECT_INPUT offset */ | 53 | unsigned select_input_ofs:12; /* IOMUXC_SELECT_INPUT offset */ |
54 | unsigned select_input:3; | 54 | unsigned select_input:3; |
55 | }; | 55 | } iomux_v3_cfg_t; |
56 | |||
57 | static inline unsigned int MUX_CTRL_OFS(iomux_v3_cfg_t *pad) | ||
58 | { | ||
59 | return pad->mux_ctrl_ofs; | ||
60 | } | ||
61 | |||
62 | static inline unsigned int MUX_MODE(iomux_v3_cfg_t *pad) | ||
63 | { | ||
64 | return pad->mux_mode; | ||
65 | } | ||
66 | |||
67 | static inline unsigned int MUX_SELECT_INPUT_OFS(iomux_v3_cfg_t *pad) | ||
68 | { | ||
69 | return pad->select_input_ofs; | ||
70 | } | ||
71 | |||
72 | static inline unsigned int MUX_SELECT_INPUT(iomux_v3_cfg_t *pad) | ||
73 | { | ||
74 | return pad->select_input; | ||
75 | } | ||
76 | |||
77 | static inline unsigned int MUX_PAD_CTRL_OFS(iomux_v3_cfg_t *pad) | ||
78 | { | ||
79 | return pad->pad_ctrl_ofs; | ||
80 | } | ||
81 | |||
82 | static inline unsigned int MUX_PAD_CTRL(iomux_v3_cfg_t *pad) | ||
83 | { | ||
84 | return pad->pad_ctrl; | ||
85 | } | ||
56 | 86 | ||
57 | #define IOMUX_PAD(_pad_ctrl_ofs, _mux_ctrl_ofs, _mux_mode, _select_input_ofs, \ | 87 | #define IOMUX_PAD(_pad_ctrl_ofs, _mux_ctrl_ofs, _mux_mode, _select_input_ofs, \ |
58 | _select_input, _pad_ctrl) \ | 88 | _select_input, _pad_ctrl) \ |
@@ -107,13 +137,13 @@ struct pad_desc { | |||
107 | /* | 137 | /* |
108 | * setups a single pad in the iomuxer | 138 | * setups a single pad in the iomuxer |
109 | */ | 139 | */ |
110 | int mxc_iomux_v3_setup_pad(struct pad_desc *pad); | 140 | int mxc_iomux_v3_setup_pad(iomux_v3_cfg_t *pad); |
111 | 141 | ||
112 | /* | 142 | /* |
113 | * setups mutliple pads | 143 | * setups mutliple pads |
114 | * convenient way to call the above function with tables | 144 | * convenient way to call the above function with tables |
115 | */ | 145 | */ |
116 | int mxc_iomux_v3_setup_multiple_pads(struct pad_desc *pad_list, unsigned count); | 146 | int mxc_iomux_v3_setup_multiple_pads(iomux_v3_cfg_t *pad_list, unsigned count); |
117 | 147 | ||
118 | /* | 148 | /* |
119 | * Initialise the iomux controller | 149 | * Initialise the iomux controller |