diff options
author | Marek Vasut <marek.vasut@gmail.com> | 2010-08-11 19:18:38 -0400 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2010-12-20 10:07:40 -0500 |
commit | 9b6956f45132f9bf696e9f6c2e457bdfa8e08721 (patch) | |
tree | 6b617e542192080d4c7b06cad15668a4453b59da /arch/arm/mach-pxa/colibri-pxa3xx.c | |
parent | 960c0acaabf603e39b121ae5c0580aaca6f8aa7b (diff) |
ARM: pxa: Push Colibri evalboard MFP into module files
This change -- pushing the MFP configuration back into Module files -- is
necessary because some evalboards can be used with multiple modules, where MFP
differs from module to module. Therefore MFP isn't board-specific, but
module-specific and the module should preconfigure itself for the board.
(And there is also the C preprocesor limitation and conflicting #define-s)
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm/mach-pxa/colibri-pxa3xx.c')
-rw-r--r-- | arch/arm/mach-pxa/colibri-pxa3xx.c | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/arch/arm/mach-pxa/colibri-pxa3xx.c b/arch/arm/mach-pxa/colibri-pxa3xx.c index 199afa2ae303..96b2d9fbfef0 100644 --- a/arch/arm/mach-pxa/colibri-pxa3xx.c +++ b/arch/arm/mach-pxa/colibri-pxa3xx.c | |||
@@ -64,55 +64,6 @@ void __init colibri_pxa3xx_init_eth(struct ax_plat_data *plat_data) | |||
64 | } | 64 | } |
65 | #endif | 65 | #endif |
66 | 66 | ||
67 | #if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE) | ||
68 | static int mmc_detect_pin; | ||
69 | |||
70 | static int colibri_pxa3xx_mci_init(struct device *dev, | ||
71 | irq_handler_t colibri_mmc_detect_int, | ||
72 | void *data) | ||
73 | { | ||
74 | int ret; | ||
75 | |||
76 | ret = gpio_request(mmc_detect_pin, "mmc card detect"); | ||
77 | if (ret) | ||
78 | return ret; | ||
79 | |||
80 | gpio_direction_input(mmc_detect_pin); | ||
81 | ret = request_irq(gpio_to_irq(mmc_detect_pin), colibri_mmc_detect_int, | ||
82 | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, | ||
83 | "MMC card detect", data); | ||
84 | if (ret) { | ||
85 | gpio_free(mmc_detect_pin); | ||
86 | return ret; | ||
87 | } | ||
88 | |||
89 | return 0; | ||
90 | } | ||
91 | |||
92 | static void colibri_pxa3xx_mci_exit(struct device *dev, void *data) | ||
93 | { | ||
94 | free_irq(mmc_detect_pin, data); | ||
95 | gpio_free(gpio_to_irq(mmc_detect_pin)); | ||
96 | } | ||
97 | |||
98 | static struct pxamci_platform_data colibri_pxa3xx_mci_platform_data = { | ||
99 | .detect_delay_ms = 200, | ||
100 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, | ||
101 | .init = colibri_pxa3xx_mci_init, | ||
102 | .exit = colibri_pxa3xx_mci_exit, | ||
103 | .gpio_card_detect = -1, | ||
104 | .gpio_card_ro = -1, | ||
105 | .gpio_power = -1, | ||
106 | }; | ||
107 | |||
108 | void __init colibri_pxa3xx_init_mmc(mfp_cfg_t *pins, int len, int detect_pin) | ||
109 | { | ||
110 | pxa3xx_mfp_config(pins, len); | ||
111 | mmc_detect_pin = detect_pin; | ||
112 | pxa_set_mci_info(&colibri_pxa3xx_mci_platform_data); | ||
113 | } | ||
114 | #endif /* CONFIG_MMC_PXA || CONFIG_MMC_PXA_MODULE */ | ||
115 | |||
116 | #if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE) | 67 | #if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE) |
117 | static int lcd_bl_pin; | 68 | static int lcd_bl_pin; |
118 | 69 | ||