1 /* 2 * mux_ti814x.h 3 * 4 * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/ 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License as 8 * published by the Free Software Foundation version 2. 9 * 10 * This program is distributed "as is" WITHOUT ANY WARRANTY of any 11 * kind, whether express or implied; without even the implied warranty 12 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 */ 15 16 #ifndef _MUX_TI814X_H_ 17 #define _MUX_TI814X_H_ 18 19 /* PAD Control Fields */ 20 #define PINCNTL_RSV_MSK (0x3 << 18) /* Reserved bitmask */ 21 #define PULLUP_EN (0x1 << 17) /* Pull UP Selection */ 22 #define PULLUDEN (0x0 << 16) /* Pull up enabled */ 23 #define PULLUDDIS (0x1 << 16) /* Pull up disabled */ 24 #define MODE(val) val /* used for Readability */ 25 26 #define MUX_CFG(value, offset) \ 27 { \ 28 int tmp; \ 29 tmp = __raw_readl(CTRL_BASE + offset); \ 30 tmp &= PINCNTL_RSV_MSK; \ 31 __raw_writel(tmp | value, (CTRL_BASE + offset));\ 32 } 33 34 /* 35 * PAD CONTROL OFFSETS 36 * Field names corresponds to the pad signal name 37 */ 38 struct pad_signals { 39 int pincntl1; 40 int pincntl2; 41 int pincntl3; 42 int pincntl4; 43 int pincntl5; 44 int pincntl6; 45 int pincntl7; 46 int pincntl8; 47 int pincntl9; 48 int pincntl10; 49 int pincntl11; 50 int pincntl12; 51 int pincntl13; 52 int pincntl14; 53 int pincntl15; 54 int pincntl16; 55 int pincntl17; 56 int pincntl18; 57 int pincntl19; 58 int pincntl20; 59 int pincntl21; 60 int pincntl22; 61 int pincntl23; 62 int pincntl24; 63 int pincntl25; 64 int pincntl26; 65 int pincntl27; 66 int pincntl28; 67 int pincntl29; 68 int pincntl30; 69 int pincntl31; 70 int pincntl32; 71 int pincntl33; 72 int pincntl34; 73 int pincntl35; 74 int pincntl36; 75 int pincntl37; 76 int pincntl38; 77 int pincntl39; 78 int pincntl40; 79 int pincntl41; 80 int pincntl42; 81 int pincntl43; 82 int pincntl44; 83 int pincntl45; 84 int pincntl46; 85 int pincntl47; 86 int pincntl48; 87 int pincntl49; 88 int pincntl50; 89 int pincntl51; 90 int pincntl52; 91 int pincntl53; 92 int pincntl54; 93 int pincntl55; 94 int pincntl56; 95 int pincntl57; 96 int pincntl58; 97 int pincntl59; 98 int pincntl60; 99 int pincntl61; 100 int pincntl62; 101 int pincntl63; 102 int pincntl64; 103 int pincntl65; 104 int pincntl66; 105 int pincntl67; 106 int pincntl68; 107 int pincntl69; 108 int pincntl70; 109 int pincntl71; 110 int pincntl72; 111 int pincntl73; 112 int pincntl74; 113 int pincntl75; 114 int pincntl76; 115 int pincntl77; 116 int pincntl78; 117 int pincntl79; 118 int pincntl80; 119 int pincntl81; 120 int pincntl82; 121 int pincntl83; 122 int pincntl84; 123 int pincntl85; 124 int pincntl86; 125 int pincntl87; 126 int pincntl88; 127 int pincntl89; 128 int pincntl90; 129 int pincntl91; 130 int pincntl92; 131 int pincntl93; 132 int pincntl94; 133 int pincntl95; 134 int pincntl96; 135 int pincntl97; 136 int pincntl98; 137 int pincntl99; 138 int pincntl100; 139 int pincntl101; 140 int pincntl102; 141 int pincntl103; 142 int pincntl104; 143 int pincntl105; 144 int pincntl106; 145 int pincntl107; 146 int pincntl108; 147 int pincntl109; 148 int pincntl110; 149 int pincntl111; 150 int pincntl112; 151 int pincntl113; 152 int pincntl114; 153 int pincntl115; 154 int pincntl116; 155 int pincntl117; 156 int pincntl118; 157 int pincntl119; 158 int pincntl120; 159 int pincntl121; 160 int pincntl122; 161 int pincntl123; 162 int pincntl124; 163 int pincntl125; 164 int pincntl126; 165 int pincntl127; 166 int pincntl128; 167 int pincntl129; 168 int pincntl130; 169 int pincntl131; 170 int pincntl132; 171 int pincntl133; 172 int pincntl134; 173 int pincntl135; 174 int pincntl136; 175 int pincntl137; 176 int pincntl138; 177 int pincntl139; 178 int pincntl140; 179 int pincntl141; 180 int pincntl142; 181 int pincntl143; 182 int pincntl144; 183 int pincntl145; 184 int pincntl146; 185 int pincntl147; 186 int pincntl148; 187 int pincntl149; 188 int pincntl150; 189 int pincntl151; 190 int pincntl152; 191 int pincntl153; 192 int pincntl154; 193 int pincntl155; 194 int pincntl156; 195 int pincntl157; 196 int pincntl158; 197 int pincntl159; 198 int pincntl160; 199 int pincntl161; 200 int pincntl162; 201 int pincntl163; 202 int pincntl164; 203 int pincntl165; 204 int pincntl166; 205 int pincntl167; 206 int pincntl168; 207 int pincntl169; 208 int pincntl170; 209 int pincntl171; 210 int pincntl172; 211 int pincntl173; 212 int pincntl174; 213 int pincntl175; 214 int pincntl176; 215 int pincntl177; 216 int pincntl178; 217 int pincntl179; 218 int pincntl180; 219 int pincntl181; 220 int pincntl182; 221 int pincntl183; 222 int pincntl184; 223 int pincntl185; 224 int pincntl186; 225 int pincntl187; 226 int pincntl188; 227 int pincntl189; 228 int pincntl190; 229 int pincntl191; 230 int pincntl192; 231 int pincntl193; 232 int pincntl194; 233 int pincntl195; 234 int pincntl196; 235 int pincntl197; 236 int pincntl198; 237 int pincntl199; 238 int pincntl200; 239 int pincntl201; 240 int pincntl202; 241 int pincntl203; 242 int pincntl204; 243 int pincntl205; 244 int pincntl206; 245 int pincntl207; 246 int pincntl208; 247 int pincntl209; 248 int pincntl210; 249 int pincntl211; 250 int pincntl212; 251 int pincntl213; 252 int pincntl214; 253 int pincntl215; 254 int pincntl216; 255 int pincntl217; 256 int pincntl218; 257 int pincntl219; 258 int pincntl220; 259 int pincntl221; 260 int pincntl222; 261 int pincntl223; 262 int pincntl224; 263 int pincntl225; 264 int pincntl226; 265 int pincntl227; 266 int pincntl228; 267 int pincntl229; 268 int pincntl230; 269 int pincntl231; 270 int pincntl232; 271 int pincntl233; 272 int pincntl234; 273 int pincntl235; 274 int pincntl236; 275 int pincntl237; 276 int pincntl238; 277 int pincntl239; 278 int pincntl240; 279 int pincntl241; 280 int pincntl242; 281 int pincntl243; 282 int pincntl244; 283 int pincntl245; 284 int pincntl246; 285 int pincntl247; 286 int pincntl248; 287 int pincntl249; 288 int pincntl250; 289 int pincntl251; 290 int pincntl252; 291 int pincntl253; 292 int pincntl254; 293 int pincntl255; 294 int pincntl256; 295 int pincntl257; 296 int pincntl258; 297 int pincntl259; 298 int pincntl260; 299 int pincntl261; 300 int pincntl262; 301 int pincntl263; 302 int pincntl264; 303 int pincntl265; 304 int pincntl266; 305 int pincntl267; 306 int pincntl268; 307 int pincntl269; 308 int pincntl270; 309 }; 310 311 #endif /* endif _MUX_TI814X_H_ */ 312