aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/idp.c
diff options
context:
space:
mode:
authorEric Miao <eric.miao@marvell.com>2008-08-08 01:33:31 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-09-26 18:43:21 -0400
commit399ba6268b6ecf6466c7b223a3f1982c53b6870e (patch)
tree1b167c403ed7587380e2032ac29eb1885227a219 /arch/arm/mach-pxa/idp.c
parentc0b1541fc7d3969b662f39214c58fe796e9e4a51 (diff)
[ARM] pxa/idp: convert to use new MFP API
Signed-off-by: Eric Miao <eric.miao@marvell.com> Cc: Cliff Brake <cliff.brake@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-pxa/idp.c')
-rw-r--r--arch/arm/mach-pxa/idp.c43
1 files changed, 23 insertions, 20 deletions
diff --git a/arch/arm/mach-pxa/idp.c b/arch/arm/mach-pxa/idp.c
index 5aa0270d5605..7289363be47f 100644
--- a/arch/arm/mach-pxa/idp.c
+++ b/arch/arm/mach-pxa/idp.c
@@ -32,7 +32,7 @@
32#include <asm/mach/map.h> 32#include <asm/mach/map.h>
33 33
34#include <mach/pxa-regs.h> 34#include <mach/pxa-regs.h>
35#include <mach/pxa2xx-gpio.h> 35#include <mach/mfp-pxa25x.h>
36#include <mach/idp.h> 36#include <mach/idp.h>
37#include <mach/pxafb.h> 37#include <mach/pxafb.h>
38#include <mach/bitfield.h> 38#include <mach/bitfield.h>
@@ -46,6 +46,26 @@
46 * - Ethernet interrupt 46 * - Ethernet interrupt
47 */ 47 */
48 48
49static unsigned long idp_pin_config[] __initdata = {
50 /* BTUART */
51 GPIO42_BTUART_RXD,
52 GPIO43_BTUART_TXD,
53 GPIO44_BTUART_CTS,
54 GPIO45_BTUART_RTS,
55
56 /* STUART */
57 GPIO46_STUART_RXD,
58 GPIO47_STUART_TXD,
59
60 /* MMC */
61 GPIO6_MMC_CLK,
62 GPIO8_MMC_CS0,
63
64 /* Ethernet */
65 GPIO33_nCS_5, /* Ethernet CS */
66 GPIO4_GPIO, /* Ethernet IRQ */
67};
68
49static struct resource smc91x_resources[] = { 69static struct resource smc91x_resources[] = {
50 [0] = { 70 [0] = {
51 .start = (IDP_ETH_PHYS + 0x300), 71 .start = (IDP_ETH_PHYS + 0x300),
@@ -127,24 +147,16 @@ static struct pxafb_mach_info sharp_lm8v31 = {
127 .pxafb_lcd_power = &idp_lcd_power 147 .pxafb_lcd_power = &idp_lcd_power
128}; 148};
129 149
130static int idp_mci_init(struct device *dev, irq_handler_t idp_detect_int, void *data)
131{
132 /* setup GPIO for PXA25x MMC controller */
133 pxa_gpio_mode(GPIO6_MMCCLK_MD);
134 pxa_gpio_mode(GPIO8_MMCCS0_MD);
135
136 return 0;
137}
138
139static struct pxamci_platform_data idp_mci_platform_data = { 150static struct pxamci_platform_data idp_mci_platform_data = {
140 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 151 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
141 .init = idp_mci_init,
142}; 152};
143 153
144static void __init idp_init(void) 154static void __init idp_init(void)
145{ 155{
146 printk("idp_init()\n"); 156 printk("idp_init()\n");
147 157
158 pxa2xx_mfp_config(ARRAY_AND_SIZE(idp_pin_config));
159
148 platform_device_register(&smc91x_device); 160 platform_device_register(&smc91x_device);
149 //platform_device_register(&mst_audio_device); 161 //platform_device_register(&mst_audio_device);
150 set_pxa_fb_info(&sharp_lm8v31); 162 set_pxa_fb_info(&sharp_lm8v31);
@@ -177,15 +189,6 @@ static void __init idp_map_io(void)
177{ 189{
178 pxa_map_io(); 190 pxa_map_io();
179 iotable_init(idp_io_desc, ARRAY_SIZE(idp_io_desc)); 191 iotable_init(idp_io_desc, ARRAY_SIZE(idp_io_desc));
180
181 // serial ports 2 & 3
182 pxa_gpio_mode(GPIO42_BTRXD_MD);
183 pxa_gpio_mode(GPIO43_BTTXD_MD);
184 pxa_gpio_mode(GPIO44_BTCTS_MD);
185 pxa_gpio_mode(GPIO45_BTRTS_MD);
186 pxa_gpio_mode(GPIO46_STRXD_MD);
187 pxa_gpio_mode(GPIO47_STTXD_MD);
188
189} 192}
190 193
191 194