diff options
Diffstat (limited to 'arch/arm/mach-pxa/idp.c')
-rw-r--r-- | arch/arm/mach-pxa/idp.c | 78 |
1 files changed, 47 insertions, 31 deletions
diff --git a/arch/arm/mach-pxa/idp.c b/arch/arm/mach-pxa/idp.c index 5aa0270d5605..013b15baa034 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,47 @@ | |||
46 | * - Ethernet interrupt | 46 | * - Ethernet interrupt |
47 | */ | 47 | */ |
48 | 48 | ||
49 | static unsigned long idp_pin_config[] __initdata = { | ||
50 | /* LCD */ | ||
51 | GPIO58_LCD_LDD_0, | ||
52 | GPIO59_LCD_LDD_1, | ||
53 | GPIO60_LCD_LDD_2, | ||
54 | GPIO61_LCD_LDD_3, | ||
55 | GPIO62_LCD_LDD_4, | ||
56 | GPIO63_LCD_LDD_5, | ||
57 | GPIO64_LCD_LDD_6, | ||
58 | GPIO65_LCD_LDD_7, | ||
59 | GPIO66_LCD_LDD_8, | ||
60 | GPIO67_LCD_LDD_9, | ||
61 | GPIO68_LCD_LDD_10, | ||
62 | GPIO69_LCD_LDD_11, | ||
63 | GPIO70_LCD_LDD_12, | ||
64 | GPIO71_LCD_LDD_13, | ||
65 | GPIO72_LCD_LDD_14, | ||
66 | GPIO73_LCD_LDD_15, | ||
67 | GPIO74_LCD_FCLK, | ||
68 | GPIO75_LCD_LCLK, | ||
69 | GPIO76_LCD_PCLK, | ||
70 | |||
71 | /* BTUART */ | ||
72 | GPIO42_BTUART_RXD, | ||
73 | GPIO43_BTUART_TXD, | ||
74 | GPIO44_BTUART_CTS, | ||
75 | GPIO45_BTUART_RTS, | ||
76 | |||
77 | /* STUART */ | ||
78 | GPIO46_STUART_RXD, | ||
79 | GPIO47_STUART_TXD, | ||
80 | |||
81 | /* MMC */ | ||
82 | GPIO6_MMC_CLK, | ||
83 | GPIO8_MMC_CS0, | ||
84 | |||
85 | /* Ethernet */ | ||
86 | GPIO33_nCS_5, /* Ethernet CS */ | ||
87 | GPIO4_GPIO, /* Ethernet IRQ */ | ||
88 | }; | ||
89 | |||
49 | static struct resource smc91x_resources[] = { | 90 | static struct resource smc91x_resources[] = { |
50 | [0] = { | 91 | [0] = { |
51 | .start = (IDP_ETH_PHYS + 0x300), | 92 | .start = (IDP_ETH_PHYS + 0x300), |
@@ -121,44 +162,28 @@ static struct pxafb_mach_info sharp_lm8v31 = { | |||
121 | .num_modes = 1, | 162 | .num_modes = 1, |
122 | .cmap_inverse = 0, | 163 | .cmap_inverse = 0, |
123 | .cmap_static = 0, | 164 | .cmap_static = 0, |
124 | .lccr0 = LCCR0_SDS, | 165 | .lcd_conn = LCD_COLOR_DSTN_16BPP | LCD_PCLK_EDGE_FALL | |
125 | .lccr3 = LCCR3_PCP | LCCR3_Acb(255), | 166 | LCD_AC_BIAS_FREQ(255), |
126 | .pxafb_backlight_power = &idp_backlight_power, | 167 | .pxafb_backlight_power = &idp_backlight_power, |
127 | .pxafb_lcd_power = &idp_lcd_power | 168 | .pxafb_lcd_power = &idp_lcd_power |
128 | }; | 169 | }; |
129 | 170 | ||
130 | static 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 | |||
139 | static struct pxamci_platform_data idp_mci_platform_data = { | 171 | static struct pxamci_platform_data idp_mci_platform_data = { |
140 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, | 172 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, |
141 | .init = idp_mci_init, | ||
142 | }; | 173 | }; |
143 | 174 | ||
144 | static void __init idp_init(void) | 175 | static void __init idp_init(void) |
145 | { | 176 | { |
146 | printk("idp_init()\n"); | 177 | printk("idp_init()\n"); |
147 | 178 | ||
179 | pxa2xx_mfp_config(ARRAY_AND_SIZE(idp_pin_config)); | ||
180 | |||
148 | platform_device_register(&smc91x_device); | 181 | platform_device_register(&smc91x_device); |
149 | //platform_device_register(&mst_audio_device); | 182 | //platform_device_register(&mst_audio_device); |
150 | set_pxa_fb_info(&sharp_lm8v31); | 183 | set_pxa_fb_info(&sharp_lm8v31); |
151 | pxa_set_mci_info(&idp_mci_platform_data); | 184 | pxa_set_mci_info(&idp_mci_platform_data); |
152 | } | 185 | } |
153 | 186 | ||
154 | static void __init idp_init_irq(void) | ||
155 | { | ||
156 | |||
157 | pxa25x_init_irq(); | ||
158 | |||
159 | set_irq_type(TOUCH_PANEL_IRQ, TOUCH_PANEL_IRQ_EDGE); | ||
160 | } | ||
161 | |||
162 | static struct map_desc idp_io_desc[] __initdata = { | 187 | static struct map_desc idp_io_desc[] __initdata = { |
163 | { | 188 | { |
164 | .virtual = IDP_COREVOLT_VIRT, | 189 | .virtual = IDP_COREVOLT_VIRT, |
@@ -177,15 +202,6 @@ static void __init idp_map_io(void) | |||
177 | { | 202 | { |
178 | pxa_map_io(); | 203 | pxa_map_io(); |
179 | iotable_init(idp_io_desc, ARRAY_SIZE(idp_io_desc)); | 204 | 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 | } | 205 | } |
190 | 206 | ||
191 | 207 | ||
@@ -194,7 +210,7 @@ MACHINE_START(PXA_IDP, "Vibren PXA255 IDP") | |||
194 | .phys_io = 0x40000000, | 210 | .phys_io = 0x40000000, |
195 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | 211 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, |
196 | .map_io = idp_map_io, | 212 | .map_io = idp_map_io, |
197 | .init_irq = idp_init_irq, | 213 | .init_irq = pxa25x_init_irq, |
198 | .timer = &pxa_timer, | 214 | .timer = &pxa_timer, |
199 | .init_machine = idp_init, | 215 | .init_machine = idp_init, |
200 | MACHINE_END | 216 | MACHINE_END |