diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-14 16:42:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-14 16:42:43 -0400 |
commit | 2cf4d4514d5b43c1f3b64bd0ec8b9853bde8f1dc (patch) | |
tree | e35a625496acc6ac852846d40b8851186b9d1ac4 /arch/arm/mach-davinci/mux.c | |
parent | 44b7532b8b464f606053562400719c9c21276037 (diff) | |
parent | ce53895a5d24e0ee19fb92f56c17323fb4c9ab27 (diff) |
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (417 commits)
MAINTAINERS: EB110ATX is not ebsa110
MAINTAINERS: update Eric Miao's email address and status
fb: add support of LCD display controller on pxa168/910 (base layer)
[ARM] 5552/1: ep93xx get_uart_rate(): use EP93XX_SYSCON_PWRCNT and EP93XX_SYSCON_PWRCN
[ARM] pxa/sharpsl_pm: zaurus needs generic pxa suspend/resume routines
[ARM] 5544/1: Trust PrimeCell resource sizes
[ARM] pxa/sharpsl_pm: cleanup of gpio-related code.
[ARM] pxa/sharpsl_pm: drop set_irq_type calls
[ARM] pxa/sharpsl_pm: merge pxa-specific code into generic one
[ARM] pxa/sharpsl_pm: merge the two sharpsl_pm.c since it's now pxa specific
[ARM] sa1100: remove unused collie_pm.c
[ARM] pxa: fix the conflicting non-static declarations of global_gpios[]
[ARM] 5550/1: Add default configure file for w90p910 platform
[ARM] 5549/1: Add clock api for w90p910 platform.
[ARM] 5548/1: Add gpio api for w90p910 platform
[ARM] 5551/1: Add multi-function pin api for w90p910 platform.
[ARM] Make ARM_VIC_NR depend on ARM_VIC
[ARM] 5546/1: ARM PL022 SSP/SPI driver v3
ARM: OMAP4: SMP: Update defconfig for OMAP4430
ARM: OMAP4: SMP: Enable SMP support for OMAP4430
...
Diffstat (limited to 'arch/arm/mach-davinci/mux.c')
-rw-r--r-- | arch/arm/mach-davinci/mux.c | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/arch/arm/mach-davinci/mux.c b/arch/arm/mach-davinci/mux.c index bbba0b247a44..d310f579aa85 100644 --- a/arch/arm/mach-davinci/mux.c +++ b/arch/arm/mach-davinci/mux.c | |||
@@ -21,18 +21,7 @@ | |||
21 | 21 | ||
22 | #include <mach/hardware.h> | 22 | #include <mach/hardware.h> |
23 | #include <mach/mux.h> | 23 | #include <mach/mux.h> |
24 | 24 | #include <mach/common.h> | |
25 | static const struct mux_config *mux_table; | ||
26 | static unsigned long pin_table_sz; | ||
27 | |||
28 | int __init davinci_mux_register(const struct mux_config *pins, | ||
29 | unsigned long size) | ||
30 | { | ||
31 | mux_table = pins; | ||
32 | pin_table_sz = size; | ||
33 | |||
34 | return 0; | ||
35 | } | ||
36 | 25 | ||
37 | /* | 26 | /* |
38 | * Sets the DAVINCI MUX register based on the table | 27 | * Sets the DAVINCI MUX register based on the table |
@@ -40,23 +29,24 @@ int __init davinci_mux_register(const struct mux_config *pins, | |||
40 | int __init_or_module davinci_cfg_reg(const unsigned long index) | 29 | int __init_or_module davinci_cfg_reg(const unsigned long index) |
41 | { | 30 | { |
42 | static DEFINE_SPINLOCK(mux_spin_lock); | 31 | static DEFINE_SPINLOCK(mux_spin_lock); |
43 | void __iomem *base = IO_ADDRESS(DAVINCI_SYSTEM_MODULE_BASE); | 32 | struct davinci_soc_info *soc_info = &davinci_soc_info; |
33 | void __iomem *base = soc_info->pinmux_base; | ||
44 | unsigned long flags; | 34 | unsigned long flags; |
45 | const struct mux_config *cfg; | 35 | const struct mux_config *cfg; |
46 | unsigned int reg_orig = 0, reg = 0; | 36 | unsigned int reg_orig = 0, reg = 0; |
47 | unsigned int mask, warn = 0; | 37 | unsigned int mask, warn = 0; |
48 | 38 | ||
49 | if (!mux_table) | 39 | if (!soc_info->pinmux_pins) |
50 | BUG(); | 40 | BUG(); |
51 | 41 | ||
52 | if (index >= pin_table_sz) { | 42 | if (index >= soc_info->pinmux_pins_num) { |
53 | printk(KERN_ERR "Invalid pin mux index: %lu (%lu)\n", | 43 | printk(KERN_ERR "Invalid pin mux index: %lu (%lu)\n", |
54 | index, pin_table_sz); | 44 | index, soc_info->pinmux_pins_num); |
55 | dump_stack(); | 45 | dump_stack(); |
56 | return -ENODEV; | 46 | return -ENODEV; |
57 | } | 47 | } |
58 | 48 | ||
59 | cfg = &mux_table[index]; | 49 | cfg = &soc_info->pinmux_pins[index]; |
60 | 50 | ||
61 | if (cfg->name == NULL) { | 51 | if (cfg->name == NULL) { |
62 | printk(KERN_ERR "No entry for the specified index\n"); | 52 | printk(KERN_ERR "No entry for the specified index\n"); |