diff options
Diffstat (limited to 'arch/arm/mach-omap1')
-rw-r--r-- | arch/arm/mach-omap1/mux.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/arch/arm/mach-omap1/mux.c b/arch/arm/mach-omap1/mux.c index cf3bdc00cfdb..e207bf7cb853 100644 --- a/arch/arm/mach-omap1/mux.c +++ b/arch/arm/mach-omap1/mux.c | |||
@@ -3,9 +3,9 @@ | |||
3 | * | 3 | * |
4 | * OMAP1 pin multiplexing configurations | 4 | * OMAP1 pin multiplexing configurations |
5 | * | 5 | * |
6 | * Copyright (C) 2003 - 2005 Nokia Corporation | 6 | * Copyright (C) 2003 - 2008 Nokia Corporation |
7 | * | 7 | * |
8 | * Written by Tony Lindgren <tony.lindgren@nokia.com> | 8 | * Written by Tony Lindgren |
9 | * | 9 | * |
10 | * This program is free software; you can redistribute it and/or modify | 10 | * This program is free software; you can redistribute it and/or modify |
11 | * it under the terms of the GNU General Public License as published by | 11 | * it under the terms of the GNU General Public License as published by |
@@ -35,7 +35,7 @@ | |||
35 | static struct omap_mux_cfg arch_mux_cfg; | 35 | static struct omap_mux_cfg arch_mux_cfg; |
36 | 36 | ||
37 | #ifdef CONFIG_ARCH_OMAP730 | 37 | #ifdef CONFIG_ARCH_OMAP730 |
38 | struct pin_config __initdata_or_module omap730_pins[] = { | 38 | static struct pin_config __initdata_or_module omap730_pins[] = { |
39 | MUX_CFG_730("E2_730_KBR0", 12, 21, 0, 20, 1, 0) | 39 | MUX_CFG_730("E2_730_KBR0", 12, 21, 0, 20, 1, 0) |
40 | MUX_CFG_730("J7_730_KBR1", 12, 25, 0, 24, 1, 0) | 40 | MUX_CFG_730("J7_730_KBR1", 12, 25, 0, 24, 1, 0) |
41 | MUX_CFG_730("E1_730_KBR2", 12, 29, 0, 28, 1, 0) | 41 | MUX_CFG_730("E1_730_KBR2", 12, 29, 0, 28, 1, 0) |
@@ -51,10 +51,14 @@ MUX_CFG_730("AA17_730_USB_DM", 2, 21, 0, 20, 0, 0) | |||
51 | MUX_CFG_730("W16_730_USB_PU_EN", 2, 25, 0, 24, 0, 0) | 51 | MUX_CFG_730("W16_730_USB_PU_EN", 2, 25, 0, 24, 0, 0) |
52 | MUX_CFG_730("W17_730_USB_VBUSI", 2, 29, 0, 28, 0, 0) | 52 | MUX_CFG_730("W17_730_USB_VBUSI", 2, 29, 0, 28, 0, 0) |
53 | }; | 53 | }; |
54 | #endif | 54 | #define OMAP730_PINS_SZ ARRAY_SIZE(omap730_pins) |
55 | #else | ||
56 | #define omap730_pins NULL | ||
57 | #define OMAP730_PINS_SZ 0 | ||
58 | #endif /* CONFIG_ARCH_OMAP730 */ | ||
55 | 59 | ||
56 | #if defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX) | 60 | #if defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX) |
57 | struct pin_config __initdata_or_module omap1xxx_pins[] = { | 61 | static struct pin_config __initdata_or_module omap1xxx_pins[] = { |
58 | /* | 62 | /* |
59 | * description mux mode mux pull pull pull pu_pd pu dbg | 63 | * description mux mode mux pull pull pull pu_pd pu dbg |
60 | * reg offset mode reg bit ena reg | 64 | * reg offset mode reg bit ena reg |
@@ -308,8 +312,11 @@ MUX_CFG("Y12_1610_CCP_CLKP", 8, 18, 6, 1, 24, 1, 1, 0, 0) | |||
308 | MUX_CFG("W13_1610_CCP_CLKM", 9, 0, 6, 1, 28, 1, 1, 0, 0) | 312 | MUX_CFG("W13_1610_CCP_CLKM", 9, 0, 6, 1, 28, 1, 1, 0, 0) |
309 | MUX_CFG("W14_1610_CCP_DATAP", 9, 24, 6, 2, 4, 1, 2, 0, 0) | 313 | MUX_CFG("W14_1610_CCP_DATAP", 9, 24, 6, 2, 4, 1, 2, 0, 0) |
310 | MUX_CFG("Y14_1610_CCP_DATAM", 9, 21, 6, 2, 3, 1, 2, 0, 0) | 314 | MUX_CFG("Y14_1610_CCP_DATAM", 9, 21, 6, 2, 3, 1, 2, 0, 0) |
311 | |||
312 | }; | 315 | }; |
316 | #define OMAP1XXX_PINS_SZ ARRAY_SIZE(omap1xxx_pins) | ||
317 | #else | ||
318 | #define omap1xxx_pins NULL | ||
319 | #define OMAP1XXX_PINS_SZ 0 | ||
313 | #endif /* CONFIG_ARCH_OMAP15XX || CONFIG_ARCH_OMAP16XX */ | 320 | #endif /* CONFIG_ARCH_OMAP15XX || CONFIG_ARCH_OMAP16XX */ |
314 | 321 | ||
315 | int __init_or_module omap1_cfg_reg(const struct pin_config *cfg) | 322 | int __init_or_module omap1_cfg_reg(const struct pin_config *cfg) |
@@ -422,22 +429,17 @@ int __init_or_module omap1_cfg_reg(const struct pin_config *cfg) | |||
422 | 429 | ||
423 | int __init omap1_mux_init(void) | 430 | int __init omap1_mux_init(void) |
424 | { | 431 | { |
425 | |||
426 | #ifdef CONFIG_ARCH_OMAP730 | ||
427 | if (cpu_is_omap730()) { | 432 | if (cpu_is_omap730()) { |
428 | arch_mux_cfg.pins = omap730_pins; | 433 | arch_mux_cfg.pins = omap730_pins; |
429 | arch_mux_cfg.size = ARRAY_SIZE(omap730_pins); | 434 | arch_mux_cfg.size = OMAP730_PINS_SZ; |
430 | arch_mux_cfg.cfg_reg = omap1_cfg_reg; | 435 | arch_mux_cfg.cfg_reg = omap1_cfg_reg; |
431 | } | 436 | } |
432 | #endif | ||
433 | 437 | ||
434 | #if defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX) | ||
435 | if (cpu_is_omap15xx() || cpu_is_omap16xx()) { | 438 | if (cpu_is_omap15xx() || cpu_is_omap16xx()) { |
436 | arch_mux_cfg.pins = omap1xxx_pins; | 439 | arch_mux_cfg.pins = omap1xxx_pins; |
437 | arch_mux_cfg.size = ARRAY_SIZE(omap1xxx_pins); | 440 | arch_mux_cfg.size = OMAP1XXX_PINS_SZ; |
438 | arch_mux_cfg.cfg_reg = omap1_cfg_reg; | 441 | arch_mux_cfg.cfg_reg = omap1_cfg_reg; |
439 | } | 442 | } |
440 | #endif | ||
441 | 443 | ||
442 | return omap_mux_register(&arch_mux_cfg); | 444 | return omap_mux_register(&arch_mux_cfg); |
443 | } | 445 | } |