diff options
author | Tony Lindgren <tony@atomide.com> | 2009-12-11 19:16:33 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2009-12-11 19:16:33 -0500 |
commit | 15f45e6f27b0ef0719171978acadf073b066fb74 (patch) | |
tree | ade2c84bbfca7c3f41acf56330ef8c171649defb /arch/arm/mach-omap2/mux.c | |
parent | 4896e3940a063fb03195d05806d28970dc3f102b (diff) |
omap: mux: Remove old mux code for 34xx
Remove old mux code for 34xx
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/mux.c')
-rw-r--r-- | arch/arm/mach-omap2/mux.c | 368 |
1 files changed, 11 insertions, 357 deletions
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index d9684331e080..e071b3fd1878 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c | |||
@@ -67,13 +67,12 @@ static inline void omap_mux_write(u16 val, u16 reg) | |||
67 | __raw_writew(val, mux_base + reg); | 67 | __raw_writew(val, mux_base + reg); |
68 | } | 68 | } |
69 | 69 | ||
70 | #ifdef CONFIG_OMAP_MUX | 70 | #if defined(CONFIG_ARCH_OMAP24XX) && defined(CONFIG_OMAP_MUX) |
71 | 71 | ||
72 | static struct omap_mux_cfg arch_mux_cfg; | 72 | static struct omap_mux_cfg arch_mux_cfg; |
73 | 73 | ||
74 | /* NOTE: See mux.h for the enumeration */ | 74 | /* NOTE: See mux.h for the enumeration */ |
75 | 75 | ||
76 | #ifdef CONFIG_ARCH_OMAP24XX | ||
77 | static struct pin_config __initdata_or_module omap24xx_pins[] = { | 76 | static struct pin_config __initdata_or_module omap24xx_pins[] = { |
78 | /* | 77 | /* |
79 | * description mux mux pull pull debug | 78 | * description mux mux pull pull debug |
@@ -283,333 +282,8 @@ MUX_CFG_24XX("AF19_2430_GPIO_85", 0x0113, 3, 0, 0, 1) | |||
283 | 282 | ||
284 | #define OMAP24XX_PINS_SZ ARRAY_SIZE(omap24xx_pins) | 283 | #define OMAP24XX_PINS_SZ ARRAY_SIZE(omap24xx_pins) |
285 | 284 | ||
286 | #else | ||
287 | #define omap24xx_pins NULL | ||
288 | #define OMAP24XX_PINS_SZ 0 | ||
289 | #endif /* CONFIG_ARCH_OMAP24XX */ | ||
290 | |||
291 | #ifdef CONFIG_ARCH_OMAP34XX | ||
292 | static struct pin_config __initdata_or_module omap34xx_pins[] = { | ||
293 | /* | ||
294 | * Name, reg-offset, | ||
295 | * mux-mode | [active-mode | off-mode] | ||
296 | */ | ||
297 | |||
298 | /* 34xx I2C */ | ||
299 | MUX_CFG_34XX("K21_34XX_I2C1_SCL", 0x1ba, | ||
300 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
301 | MUX_CFG_34XX("J21_34XX_I2C1_SDA", 0x1bc, | ||
302 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
303 | MUX_CFG_34XX("AF15_34XX_I2C2_SCL", 0x1be, | ||
304 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
305 | MUX_CFG_34XX("AE15_34XX_I2C2_SDA", 0x1c0, | ||
306 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
307 | MUX_CFG_34XX("AF14_34XX_I2C3_SCL", 0x1c2, | ||
308 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
309 | MUX_CFG_34XX("AG14_34XX_I2C3_SDA", 0x1c4, | ||
310 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
311 | MUX_CFG_34XX("AD26_34XX_I2C4_SCL", 0xa00, | ||
312 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
313 | MUX_CFG_34XX("AE26_34XX_I2C4_SDA", 0xa02, | ||
314 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
315 | |||
316 | /* PHY - HSUSB: 12-pin ULPI PHY: Port 1*/ | ||
317 | MUX_CFG_34XX("Y8_3430_USB1HS_PHY_CLK", 0x5da, | ||
318 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_OUTPUT) | ||
319 | MUX_CFG_34XX("Y9_3430_USB1HS_PHY_STP", 0x5d8, | ||
320 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_OUTPUT) | ||
321 | MUX_CFG_34XX("AA14_3430_USB1HS_PHY_DIR", 0x5ec, | ||
322 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
323 | MUX_CFG_34XX("AA11_3430_USB1HS_PHY_NXT", 0x5ee, | ||
324 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
325 | MUX_CFG_34XX("W13_3430_USB1HS_PHY_D0", 0x5dc, | ||
326 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
327 | MUX_CFG_34XX("W12_3430_USB1HS_PHY_D1", 0x5de, | ||
328 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
329 | MUX_CFG_34XX("W11_3430_USB1HS_PHY_D2", 0x5e0, | ||
330 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
331 | MUX_CFG_34XX("Y11_3430_USB1HS_PHY_D3", 0x5ea, | ||
332 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
333 | MUX_CFG_34XX("W9_3430_USB1HS_PHY_D4", 0x5e4, | ||
334 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
335 | MUX_CFG_34XX("Y12_3430_USB1HS_PHY_D5", 0x5e6, | ||
336 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
337 | MUX_CFG_34XX("W8_3430_USB1HS_PHY_D6", 0x5e8, | ||
338 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
339 | MUX_CFG_34XX("Y13_3430_USB1HS_PHY_D7", 0x5e2, | ||
340 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
341 | |||
342 | /* PHY - HSUSB: 12-pin ULPI PHY: Port 2*/ | ||
343 | MUX_CFG_34XX("AA8_3430_USB2HS_PHY_CLK", 0x5f0, | ||
344 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_OUTPUT) | ||
345 | MUX_CFG_34XX("AA10_3430_USB2HS_PHY_STP", 0x5f2, | ||
346 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_OUTPUT) | ||
347 | MUX_CFG_34XX("AA9_3430_USB2HS_PHY_DIR", 0x5f4, | ||
348 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
349 | MUX_CFG_34XX("AB11_3430_USB2HS_PHY_NXT", 0x5f6, | ||
350 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
351 | MUX_CFG_34XX("AB10_3430_USB2HS_PHY_D0", 0x5f8, | ||
352 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
353 | MUX_CFG_34XX("AB9_3430_USB2HS_PHY_D1", 0x5fa, | ||
354 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
355 | MUX_CFG_34XX("W3_3430_USB2HS_PHY_D2", 0x1d4, | ||
356 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
357 | MUX_CFG_34XX("T4_3430_USB2HS_PHY_D3", 0x1de, | ||
358 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
359 | MUX_CFG_34XX("T3_3430_USB2HS_PHY_D4", 0x1d8, | ||
360 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
361 | MUX_CFG_34XX("R3_3430_USB2HS_PHY_D5", 0x1da, | ||
362 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
363 | MUX_CFG_34XX("R4_3430_USB2HS_PHY_D6", 0x1dc, | ||
364 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
365 | MUX_CFG_34XX("T2_3430_USB2HS_PHY_D7", 0x1d6, | ||
366 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
367 | |||
368 | /* TLL - HSUSB: 12-pin TLL Port 1*/ | ||
369 | MUX_CFG_34XX("Y8_3430_USB1HS_TLL_CLK", 0x5da, | ||
370 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
371 | MUX_CFG_34XX("Y9_3430_USB1HS_TLL_STP", 0x5d8, | ||
372 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLUP) | ||
373 | MUX_CFG_34XX("AA14_3430_USB1HS_TLL_DIR", 0x5ec, | ||
374 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
375 | MUX_CFG_34XX("AA11_3430_USB1HS_TLL_NXT", 0x5ee, | ||
376 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
377 | MUX_CFG_34XX("W13_3430_USB1HS_TLL_D0", 0x5dc, | ||
378 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
379 | MUX_CFG_34XX("W12_3430_USB1HS_TLL_D1", 0x5de, | ||
380 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
381 | MUX_CFG_34XX("W11_3430_USB1HS_TLL_D2", 0x5e0, | ||
382 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
383 | MUX_CFG_34XX("Y11_3430_USB1HS_TLL_D3", 0x5ea, | ||
384 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
385 | MUX_CFG_34XX("W9_3430_USB1HS_TLL_D4", 0x5e4, | ||
386 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
387 | MUX_CFG_34XX("Y12_3430_USB1HS_TLL_D5", 0x5e6, | ||
388 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
389 | MUX_CFG_34XX("W8_3430_USB1HS_TLL_D6", 0x5e8, | ||
390 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
391 | MUX_CFG_34XX("Y13_3430_USB1HS_TLL_D7", 0x5e2, | ||
392 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
393 | |||
394 | /* TLL - HSUSB: 12-pin TLL Port 2*/ | ||
395 | MUX_CFG_34XX("AA8_3430_USB2HS_TLL_CLK", 0x5f0, | ||
396 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
397 | MUX_CFG_34XX("AA10_3430_USB2HS_TLL_STP", 0x5f2, | ||
398 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLUP) | ||
399 | MUX_CFG_34XX("AA9_3430_USB2HS_TLL_DIR", 0x5f4, | ||
400 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
401 | MUX_CFG_34XX("AB11_3430_USB2HS_TLL_NXT", 0x5f6, | ||
402 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
403 | MUX_CFG_34XX("AB10_3430_USB2HS_TLL_D0", 0x5f8, | ||
404 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
405 | MUX_CFG_34XX("AB9_3430_USB2HS_TLL_D1", 0x5fa, | ||
406 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
407 | MUX_CFG_34XX("W3_3430_USB2HS_TLL_D2", 0x1d4, | ||
408 | OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
409 | MUX_CFG_34XX("T4_3430_USB2HS_TLL_D3", 0x1de, | ||
410 | OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
411 | MUX_CFG_34XX("T3_3430_USB2HS_TLL_D4", 0x1d8, | ||
412 | OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
413 | MUX_CFG_34XX("R3_3430_USB2HS_TLL_D5", 0x1da, | ||
414 | OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
415 | MUX_CFG_34XX("R4_3430_USB2HS_TLL_D6", 0x1dc, | ||
416 | OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
417 | MUX_CFG_34XX("T2_3430_USB2HS_TLL_D7", 0x1d6, | ||
418 | OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
419 | |||
420 | /* TLL - HSUSB: 12-pin TLL Port 3*/ | ||
421 | MUX_CFG_34XX("AA6_3430_USB3HS_TLL_CLK", 0x180, | ||
422 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
423 | MUX_CFG_34XX("AB3_3430_USB3HS_TLL_STP", 0x166, | ||
424 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLUP) | ||
425 | MUX_CFG_34XX("AA3_3430_USB3HS_TLL_DIR", 0x168, | ||
426 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
427 | MUX_CFG_34XX("Y3_3430_USB3HS_TLL_NXT", 0x16a, | ||
428 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
429 | MUX_CFG_34XX("AA5_3430_USB3HS_TLL_D0", 0x186, | ||
430 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
431 | MUX_CFG_34XX("Y4_3430_USB3HS_TLL_D1", 0x184, | ||
432 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
433 | MUX_CFG_34XX("Y5_3430_USB3HS_TLL_D2", 0x188, | ||
434 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
435 | MUX_CFG_34XX("W5_3430_USB3HS_TLL_D3", 0x18a, | ||
436 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
437 | MUX_CFG_34XX("AB12_3430_USB3HS_TLL_D4", 0x16c, | ||
438 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
439 | MUX_CFG_34XX("AB13_3430_USB3HS_TLL_D5", 0x16e, | ||
440 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
441 | MUX_CFG_34XX("AA13_3430_USB3HS_TLL_D6", 0x170, | ||
442 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
443 | MUX_CFG_34XX("AA12_3430_USB3HS_TLL_D7", 0x172, | ||
444 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
445 | |||
446 | /* PHY FSUSB: FS Serial for Port 1 (multiple PHY modes supported) */ | ||
447 | MUX_CFG_34XX("AF10_3430_USB1FS_PHY_MM1_RXDP", 0x5d8, | ||
448 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
449 | MUX_CFG_34XX("AG9_3430_USB1FS_PHY_MM1_RXDM", 0x5ee, | ||
450 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
451 | MUX_CFG_34XX("W13_3430_USB1FS_PHY_MM1_RXRCV", 0x5dc, | ||
452 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
453 | MUX_CFG_34XX("W12_3430_USB1FS_PHY_MM1_TXSE0", 0x5de, | ||
454 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
455 | MUX_CFG_34XX("W11_3430_USB1FS_PHY_MM1_TXDAT", 0x5e0, | ||
456 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
457 | MUX_CFG_34XX("Y11_3430_USB1FS_PHY_MM1_TXEN_N", 0x5ea, | ||
458 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_OUTPUT) | ||
459 | |||
460 | /* PHY FSUSB: FS Serial for Port 2 (multiple PHY modes supported) */ | ||
461 | MUX_CFG_34XX("AF7_3430_USB2FS_PHY_MM2_RXDP", 0x5f2, | ||
462 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
463 | MUX_CFG_34XX("AH7_3430_USB2FS_PHY_MM2_RXDM", 0x5f6, | ||
464 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
465 | MUX_CFG_34XX("AB10_3430_USB2FS_PHY_MM2_RXRCV", 0x5f8, | ||
466 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
467 | MUX_CFG_34XX("AB9_3430_USB2FS_PHY_MM2_TXSE0", 0x5fa, | ||
468 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
469 | MUX_CFG_34XX("W3_3430_USB2FS_PHY_MM2_TXDAT", 0x1d4, | ||
470 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
471 | MUX_CFG_34XX("T4_3430_USB2FS_PHY_MM2_TXEN_N", 0x1de, | ||
472 | OMAP34XX_MUX_MODE5 | OMAP34XX_PIN_OUTPUT) | ||
473 | |||
474 | /* PHY FSUSB: FS Serial for Port 3 (multiple PHY modes supported) */ | ||
475 | MUX_CFG_34XX("AH3_3430_USB3FS_PHY_MM3_RXDP", 0x166, | ||
476 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
477 | MUX_CFG_34XX("AE3_3430_USB3FS_PHY_MM3_RXDM", 0x16a, | ||
478 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
479 | MUX_CFG_34XX("AD1_3430_USB3FS_PHY_MM3_RXRCV", 0x186, | ||
480 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
481 | MUX_CFG_34XX("AE1_3430_USB3FS_PHY_MM3_TXSE0", 0x184, | ||
482 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
483 | MUX_CFG_34XX("AD2_3430_USB3FS_PHY_MM3_TXDAT", 0x188, | ||
484 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
485 | MUX_CFG_34XX("AC1_3430_USB3FS_PHY_MM3_TXEN_N", 0x18a, | ||
486 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_OUTPUT) | ||
487 | |||
488 | |||
489 | /* 34XX GPIO - bidirectional, unless the name has an "_OUT" suffix. | ||
490 | * (Always specify PIN_INPUT, except for names suffixed by "_OUT".) | ||
491 | * No internal pullup/pulldown without "_UP" or "_DOWN" suffix. | ||
492 | */ | ||
493 | MUX_CFG_34XX("AF26_34XX_GPIO0", 0x1e0, | ||
494 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT) | ||
495 | MUX_CFG_34XX("AF22_34XX_GPIO9", 0xa18, | ||
496 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT) | ||
497 | MUX_CFG_34XX("AG9_34XX_GPIO23", 0x5ee, | ||
498 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT) | ||
499 | MUX_CFG_34XX("AH8_34XX_GPIO29", 0x5fa, | ||
500 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT) | ||
501 | MUX_CFG_34XX("U8_34XX_GPIO54_OUT", 0x0b4, | ||
502 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT) | ||
503 | MUX_CFG_34XX("U8_34XX_GPIO54_DOWN", 0x0b4, | ||
504 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT_PULLDOWN) | ||
505 | MUX_CFG_34XX("L8_34XX_GPIO63", 0x0ce, | ||
506 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT) | ||
507 | MUX_CFG_34XX("G25_34XX_GPIO86_OUT", 0x0fc, | ||
508 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT) | ||
509 | MUX_CFG_34XX("AG4_34XX_GPIO134_OUT", 0x160, | ||
510 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT) | ||
511 | MUX_CFG_34XX("AF4_34XX_GPIO135_OUT", 0x162, | ||
512 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT) | ||
513 | MUX_CFG_34XX("AE4_34XX_GPIO136_OUT", 0x164, | ||
514 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT) | ||
515 | MUX_CFG_34XX("AF6_34XX_GPIO140_UP", 0x16c, | ||
516 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT_PULLUP) | ||
517 | MUX_CFG_34XX("AE6_34XX_GPIO141", 0x16e, | ||
518 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT) | ||
519 | MUX_CFG_34XX("AF5_34XX_GPIO142", 0x170, | ||
520 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT) | ||
521 | MUX_CFG_34XX("AE5_34XX_GPIO143", 0x172, | ||
522 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT) | ||
523 | MUX_CFG_34XX("H19_34XX_GPIO164_OUT", 0x19c, | ||
524 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_OUTPUT) | ||
525 | MUX_CFG_34XX("J25_34XX_GPIO170", 0x1c6, | ||
526 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT) | ||
527 | |||
528 | /* OMAP3 SDRC CKE signals to SDR/DDR ram chips */ | ||
529 | MUX_CFG_34XX("H16_34XX_SDRC_CKE0", 0x262, | ||
530 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT) | ||
531 | MUX_CFG_34XX("H17_34XX_SDRC_CKE1", 0x264, | ||
532 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_OUTPUT) | ||
533 | |||
534 | /* MMC1 */ | ||
535 | MUX_CFG_34XX("N28_3430_MMC1_CLK", 0x144, | ||
536 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
537 | MUX_CFG_34XX("M27_3430_MMC1_CMD", 0x146, | ||
538 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
539 | MUX_CFG_34XX("N27_3430_MMC1_DAT0", 0x148, | ||
540 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
541 | MUX_CFG_34XX("N26_3430_MMC1_DAT1", 0x14a, | ||
542 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
543 | MUX_CFG_34XX("N25_3430_MMC1_DAT2", 0x14c, | ||
544 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
545 | MUX_CFG_34XX("P28_3430_MMC1_DAT3", 0x14e, | ||
546 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
547 | MUX_CFG_34XX("P27_3430_MMC1_DAT4", 0x150, | ||
548 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
549 | MUX_CFG_34XX("P26_3430_MMC1_DAT5", 0x152, | ||
550 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
551 | MUX_CFG_34XX("R27_3430_MMC1_DAT6", 0x154, | ||
552 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
553 | MUX_CFG_34XX("R25_3430_MMC1_DAT7", 0x156, | ||
554 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
555 | |||
556 | /* MMC2 */ | ||
557 | MUX_CFG_34XX("AE2_3430_MMC2_CLK", 0x158, | ||
558 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
559 | MUX_CFG_34XX("AG5_3430_MMC2_CMD", 0x15A, | ||
560 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
561 | MUX_CFG_34XX("AH5_3430_MMC2_DAT0", 0x15c, | ||
562 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
563 | MUX_CFG_34XX("AH4_3430_MMC2_DAT1", 0x15e, | ||
564 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
565 | MUX_CFG_34XX("AG4_3430_MMC2_DAT2", 0x160, | ||
566 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
567 | MUX_CFG_34XX("AF4_3430_MMC2_DAT3", 0x162, | ||
568 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
569 | MUX_CFG_34XX("AE4_3430_MMC2_DAT4", 0x164, | ||
570 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
571 | MUX_CFG_34XX("AH3_3430_MMC2_DAT5", 0x166, | ||
572 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
573 | MUX_CFG_34XX("AF3_3430_MMC2_DAT6", 0x168, | ||
574 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
575 | MUX_CFG_34XX("AE3_3430_MMC2_DAT7", 0x16A, | ||
576 | OMAP34XX_MUX_MODE0 | OMAP34XX_PIN_INPUT_PULLUP) | ||
577 | |||
578 | /* MMC3 */ | ||
579 | MUX_CFG_34XX("AF10_3430_MMC3_CLK", 0x5d8, | ||
580 | OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP) | ||
581 | MUX_CFG_34XX("AC3_3430_MMC3_CMD", 0x1d0, | ||
582 | OMAP34XX_MUX_MODE3 | OMAP34XX_PIN_INPUT_PULLUP) | ||
583 | MUX_CFG_34XX("AE11_3430_MMC3_DAT0", 0x5e4, | ||
584 | OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP) | ||
585 | MUX_CFG_34XX("AH9_3430_MMC3_DAT1", 0x5e6, | ||
586 | OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP) | ||
587 | MUX_CFG_34XX("AF13_3430_MMC3_DAT2", 0x5e8, | ||
588 | OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP) | ||
589 | MUX_CFG_34XX("AF13_3430_MMC3_DAT3", 0x5e2, | ||
590 | OMAP34XX_MUX_MODE2 | OMAP34XX_PIN_INPUT_PULLUP) | ||
591 | |||
592 | /* SYS_NIRQ T2 INT1 */ | ||
593 | MUX_CFG_34XX("AF26_34XX_SYS_NIRQ", 0x1E0, | ||
594 | OMAP3_WAKEUP_EN | OMAP34XX_PIN_INPUT_PULLUP | | ||
595 | OMAP34XX_MUX_MODE0) | ||
596 | /* EHCI GPIO's on OMAP3EVM (Rev >= E) */ | ||
597 | MUX_CFG_34XX("AH14_34XX_GPIO21", 0x5ea, | ||
598 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT_PULLUP) | ||
599 | MUX_CFG_34XX("AF9_34XX_GPIO22", 0x5ec, | ||
600 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT_PULLUP) | ||
601 | MUX_CFG_34XX("U3_34XX_GPIO61", 0x0c8, | ||
602 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT_PULLUP) | ||
603 | }; | ||
604 | |||
605 | #define OMAP34XX_PINS_SZ ARRAY_SIZE(omap34xx_pins) | ||
606 | |||
607 | #else | ||
608 | #define omap34xx_pins NULL | ||
609 | #define OMAP34XX_PINS_SZ 0 | ||
610 | #endif /* CONFIG_ARCH_OMAP34XX */ | ||
611 | |||
612 | #if defined(CONFIG_OMAP_MUX_DEBUG) || defined(CONFIG_OMAP_MUX_WARNINGS) | 285 | #if defined(CONFIG_OMAP_MUX_DEBUG) || defined(CONFIG_OMAP_MUX_WARNINGS) |
286 | |||
613 | static void __init_or_module omap2_cfg_debug(const struct pin_config *cfg, u16 reg) | 287 | static void __init_or_module omap2_cfg_debug(const struct pin_config *cfg, u16 reg) |
614 | { | 288 | { |
615 | u16 orig; | 289 | u16 orig; |
@@ -631,7 +305,6 @@ static void __init_or_module omap2_cfg_debug(const struct pin_config *cfg, u16 r | |||
631 | #define omap2_cfg_debug(x, y) do {} while (0) | 305 | #define omap2_cfg_debug(x, y) do {} while (0) |
632 | #endif | 306 | #endif |
633 | 307 | ||
634 | #ifdef CONFIG_ARCH_OMAP24XX | ||
635 | static int __init_or_module omap24xx_cfg_reg(const struct pin_config *cfg) | 308 | static int __init_or_module omap24xx_cfg_reg(const struct pin_config *cfg) |
636 | { | 309 | { |
637 | static DEFINE_SPINLOCK(mux_spin_lock); | 310 | static DEFINE_SPINLOCK(mux_spin_lock); |
@@ -650,28 +323,6 @@ static int __init_or_module omap24xx_cfg_reg(const struct pin_config *cfg) | |||
650 | 323 | ||
651 | return 0; | 324 | return 0; |
652 | } | 325 | } |
653 | #else | ||
654 | #define omap24xx_cfg_reg NULL | ||
655 | #endif | ||
656 | |||
657 | #ifdef CONFIG_ARCH_OMAP34XX | ||
658 | static int __init_or_module omap34xx_cfg_reg(const struct pin_config *cfg) | ||
659 | { | ||
660 | static DEFINE_SPINLOCK(mux_spin_lock); | ||
661 | unsigned long flags; | ||
662 | u16 reg = 0; | ||
663 | |||
664 | spin_lock_irqsave(&mux_spin_lock, flags); | ||
665 | reg |= cfg->mux_val; | ||
666 | omap2_cfg_debug(cfg, reg); | ||
667 | omap_mux_write(reg, cfg->mux_reg - OMAP_MUX_BASE_OFFSET); | ||
668 | spin_unlock_irqrestore(&mux_spin_lock, flags); | ||
669 | |||
670 | return 0; | ||
671 | } | ||
672 | #else | ||
673 | #define omap34xx_cfg_reg NULL | ||
674 | #endif | ||
675 | 326 | ||
676 | int __init omap2_mux_init(void) | 327 | int __init omap2_mux_init(void) |
677 | { | 328 | { |
@@ -694,21 +345,23 @@ int __init omap2_mux_init(void) | |||
694 | arch_mux_cfg.pins = omap24xx_pins; | 345 | arch_mux_cfg.pins = omap24xx_pins; |
695 | arch_mux_cfg.size = OMAP24XX_PINS_SZ; | 346 | arch_mux_cfg.size = OMAP24XX_PINS_SZ; |
696 | arch_mux_cfg.cfg_reg = omap24xx_cfg_reg; | 347 | arch_mux_cfg.cfg_reg = omap24xx_cfg_reg; |
697 | } else if (cpu_is_omap34xx()) { | 348 | |
698 | arch_mux_cfg.pins = omap34xx_pins; | 349 | return omap_mux_register(&arch_mux_cfg); |
699 | arch_mux_cfg.size = OMAP34XX_PINS_SZ; | ||
700 | arch_mux_cfg.cfg_reg = omap34xx_cfg_reg; | ||
701 | } | 350 | } |
702 | 351 | ||
703 | return omap_mux_register(&arch_mux_cfg); | 352 | return 0; |
704 | } | 353 | } |
705 | 354 | ||
355 | #else | ||
356 | int __init omap2_mux_init(void) | ||
357 | { | ||
358 | return 0; | ||
359 | } | ||
706 | #endif /* CONFIG_OMAP_MUX */ | 360 | #endif /* CONFIG_OMAP_MUX */ |
707 | 361 | ||
708 | /*----------------------------------------------------------------------------*/ | 362 | /*----------------------------------------------------------------------------*/ |
709 | 363 | ||
710 | #ifdef CONFIG_ARCH_OMAP34XX | 364 | #ifdef CONFIG_ARCH_OMAP34XX |
711 | |||
712 | static LIST_HEAD(muxmodes); | 365 | static LIST_HEAD(muxmodes); |
713 | static DEFINE_MUTEX(muxmode_mutex); | 366 | static DEFINE_MUTEX(muxmode_mutex); |
714 | 367 | ||
@@ -1353,3 +1006,4 @@ int __init omap_mux_init(u32 mux_pbase, u32 mux_size, | |||
1353 | } | 1006 | } |
1354 | 1007 | ||
1355 | #endif /* CONFIG_ARCH_OMAP34XX */ | 1008 | #endif /* CONFIG_ARCH_OMAP34XX */ |
1009 | |||