aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /arch/arm/mach-imx/eukrea_mbimx27-baseboard.c
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'arch/arm/mach-imx/eukrea_mbimx27-baseboard.c')
-rw-r--r--arch/arm/mach-imx/eukrea_mbimx27-baseboard.c39
1 files changed, 14 insertions, 25 deletions
diff --git a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c
index 4edc5f439201..5911281da5f5 100644
--- a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c
+++ b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c
@@ -26,23 +26,17 @@
26#include <linux/spi/ads7846.h> 26#include <linux/spi/ads7846.h>
27#include <linux/backlight.h> 27#include <linux/backlight.h>
28#include <video/platform_lcd.h> 28#include <video/platform_lcd.h>
29#include <linux/input/matrix_keypad.h>
30 29
31#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
32 31
33#include <mach/common.h> 32#include <mach/common.h>
34#include <mach/iomux-mx27.h> 33#include <mach/iomux-mx27.h>
35#include <mach/imxfb.h>
36#include <mach/hardware.h> 34#include <mach/hardware.h>
37#include <mach/mmc.h>
38#include <mach/spi.h>
39#include <mach/ssi.h>
40#include <mach/audmux.h> 35#include <mach/audmux.h>
41 36
42#include "devices-imx27.h" 37#include "devices-imx27.h"
43#include "devices.h"
44 38
45static int eukrea_mbimx27_pins[] = { 39static const int eukrea_mbimx27_pins[] __initconst = {
46 /* UART2 */ 40 /* UART2 */
47 PE3_PF_UART2_CTS, 41 PE3_PF_UART2_CTS,
48 PE4_PF_UART2_RTS, 42 PE4_PF_UART2_RTS,
@@ -112,7 +106,8 @@ static const uint32_t eukrea_mbimx27_keymap[] = {
112 KEY(1, 1, KEY_LEFT), 106 KEY(1, 1, KEY_LEFT),
113}; 107};
114 108
115static struct matrix_keymap_data eukrea_mbimx27_keymap_data = { 109static const struct matrix_keymap_data
110eukrea_mbimx27_keymap_data __initconst = {
116 .keymap = eukrea_mbimx27_keymap, 111 .keymap = eukrea_mbimx27_keymap,
117 .keymap_size = ARRAY_SIZE(eukrea_mbimx27_keymap), 112 .keymap_size = ARRAY_SIZE(eukrea_mbimx27_keymap),
118}; 113};
@@ -197,7 +192,7 @@ static struct imx_fb_videomode eukrea_mbimx27_modes[] = {
197 }, 192 },
198}; 193};
199 194
200static struct imx_fb_platform_data eukrea_mbimx27_fb_data = { 195static const struct imx_fb_platform_data eukrea_mbimx27_fb_data __initconst = {
201 .mode = eukrea_mbimx27_modes, 196 .mode = eukrea_mbimx27_modes,
202 .num_modes = ARRAY_SIZE(eukrea_mbimx27_modes), 197 .num_modes = ARRAY_SIZE(eukrea_mbimx27_modes),
203 198
@@ -251,12 +246,9 @@ static const struct imxuart_platform_data uart_pdata __initconst = {
251 .flags = IMXUART_HAVE_RTSCTS, 246 .flags = IMXUART_HAVE_RTSCTS,
252}; 247};
253 248
254#if defined(CONFIG_TOUCHSCREEN_ADS7846) \
255 || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
256
257#define ADS7846_PENDOWN (GPIO_PORTD | 25) 249#define ADS7846_PENDOWN (GPIO_PORTD | 25)
258 250
259static void ads7846_dev_init(void) 251static void __maybe_unused ads7846_dev_init(void)
260{ 252{
261 if (gpio_request(ADS7846_PENDOWN, "ADS7846 pendown") < 0) { 253 if (gpio_request(ADS7846_PENDOWN, "ADS7846 pendown") < 0) {
262 printk(KERN_ERR "can't get ads746 pen down GPIO\n"); 254 printk(KERN_ERR "can't get ads746 pen down GPIO\n");
@@ -274,10 +266,9 @@ static struct ads7846_platform_data ads7846_config __initdata = {
274 .get_pendown_state = ads7846_get_pendown_state, 266 .get_pendown_state = ads7846_get_pendown_state,
275 .keep_vref_on = 1, 267 .keep_vref_on = 1,
276}; 268};
277#endif
278 269
279#if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE) 270static struct spi_board_info __maybe_unused
280static struct spi_board_info eukrea_mbimx27_spi_board_info[] __initdata = { 271 eukrea_mbimx27_spi_board_info[] __initdata = {
281 [0] = { 272 [0] = {
282 .modalias = "ads7846", 273 .modalias = "ads7846",
283 .bus_num = 0, 274 .bus_num = 0,
@@ -295,7 +286,6 @@ static const struct spi_imx_master eukrea_mbimx27_spi0_data __initconst = {
295 .chipselect = eukrea_mbimx27_spi_cs, 286 .chipselect = eukrea_mbimx27_spi_cs,
296 .num_chipselect = ARRAY_SIZE(eukrea_mbimx27_spi_cs), 287 .num_chipselect = ARRAY_SIZE(eukrea_mbimx27_spi_cs),
297}; 288};
298#endif
299 289
300static struct i2c_board_info eukrea_mbimx27_i2c_devices[] = { 290static struct i2c_board_info eukrea_mbimx27_i2c_devices[] = {
301 { 291 {
@@ -307,11 +297,12 @@ static struct platform_device *platform_devices[] __initdata = {
307 &leds_gpio, 297 &leds_gpio,
308}; 298};
309 299
310static struct imxmmc_platform_data sdhc_pdata = { 300static const struct imxmmc_platform_data sdhc_pdata __initconst = {
311 .dat3_card_detect = 1, 301 .dat3_card_detect = 1,
312}; 302};
313 303
314struct imx_ssi_platform_data eukrea_mbimx27_ssi_pdata = { 304static const
305struct imx_ssi_platform_data eukrea_mbimx27_ssi_pdata __initconst = {
315 .flags = IMX_SSI_DMA | IMX_SSI_USE_I2S_SLAVE, 306 .flags = IMX_SSI_DMA | IMX_SSI_USE_I2S_SLAVE,
316}; 307};
317 308
@@ -351,13 +342,13 @@ void __init eukrea_mbimx27_baseboard_init(void)
351 imx27_add_imx_uart3(&uart_pdata); 342 imx27_add_imx_uart3(&uart_pdata);
352#endif 343#endif
353 344
354 mxc_register_device(&mxc_fb_device, &eukrea_mbimx27_fb_data); 345 imx27_add_imx_fb(&eukrea_mbimx27_fb_data);
355 mxc_register_device(&mxc_sdhc_device0, &sdhc_pdata); 346 imx27_add_mxc_mmc(0, &sdhc_pdata);
356 347
357 i2c_register_board_info(0, eukrea_mbimx27_i2c_devices, 348 i2c_register_board_info(0, eukrea_mbimx27_i2c_devices,
358 ARRAY_SIZE(eukrea_mbimx27_i2c_devices)); 349 ARRAY_SIZE(eukrea_mbimx27_i2c_devices));
359 350
360 mxc_register_device(&imx_ssi_device0, &eukrea_mbimx27_ssi_pdata); 351 imx27_add_imx_ssi(0, &eukrea_mbimx27_ssi_pdata);
361 352
362#if defined(CONFIG_TOUCHSCREEN_ADS7846) \ 353#if defined(CONFIG_TOUCHSCREEN_ADS7846) \
363 || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) 354 || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
@@ -366,13 +357,11 @@ void __init eukrea_mbimx27_baseboard_init(void)
366 ads7846_dev_init(); 357 ads7846_dev_init();
367#endif 358#endif
368 359
369#if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE)
370 /* SPI_CS0 init */ 360 /* SPI_CS0 init */
371 mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_OUT); 361 mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_OUT);
372 imx27_add_spi_imx0(&eukrea_mbimx27_spi0_data); 362 imx27_add_spi_imx0(&eukrea_mbimx27_spi0_data);
373 spi_register_board_info(eukrea_mbimx27_spi_board_info, 363 spi_register_board_info(eukrea_mbimx27_spi_board_info,
374 ARRAY_SIZE(eukrea_mbimx27_spi_board_info)); 364 ARRAY_SIZE(eukrea_mbimx27_spi_board_info));
375#endif
376 365
377 /* Leds configuration */ 366 /* Leds configuration */
378 mxc_gpio_mode(GPIO_PORTF | 16 | GPIO_GPIO | GPIO_OUT); 367 mxc_gpio_mode(GPIO_PORTF | 16 | GPIO_GPIO | GPIO_OUT);
@@ -386,7 +375,7 @@ void __init eukrea_mbimx27_baseboard_init(void)
386 gpio_request(GPIO_PORTA | 25, "lcd_enable"); 375 gpio_request(GPIO_PORTA | 25, "lcd_enable");
387 platform_device_register(&eukrea_mbimx27_lcd_powerdev); 376 platform_device_register(&eukrea_mbimx27_lcd_powerdev);
388 377
389 mxc_register_device(&imx_kpp_device, &eukrea_mbimx27_keymap_data); 378 imx27_add_imx_keypad(&eukrea_mbimx27_keymap_data);
390 379
391 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); 380 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
392} 381}