diff options
author | Philippe Langlais <philippe.langlais@stericsson.com> | 2011-12-21 20:12:47 +0100 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@stericsson.com> | 2012-05-22 11:02:25 +0200 |
commit | a12a7d9673b35f82e69a5c3e433cbd13b9b9f663 (patch) | |
tree | 1b600cfa307aaefa84f290512d554e8617b762e9 /arch/arm/mach-ux500/board-mop500.c | |
parent | 20753d4cd393d4147b9bd6b35d1a17aad2cfd2ba (diff) |
mach-ux500: Update boards for topic branches isolation
Signed-off-by: Philippe Langlais <philippe.langlais@stericsson.com>
Diffstat (limited to 'arch/arm/mach-ux500/board-mop500.c')
-rw-r--r-- | arch/arm/mach-ux500/board-mop500.c | 57 |
1 files changed, 50 insertions, 7 deletions
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index 77d4ea90199..97cd28d034c 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c @@ -20,7 +20,9 @@ #include <linux/amba/pl022.h> #include <linux/amba/serial.h> #include <linux/spi/spi.h> +#ifdef CONFIG_HSI #include <linux/hsi/hsi.h> +#endif #include <linux/mfd/abx500/ab8500.h> #include <linux/regulator/ab8500.h> #include <linux/mfd/tc3589x.h> @@ -32,7 +34,9 @@ #include <linux/gpio_keys.h> #include <linux/delay.h> #include <linux/mfd/ab8500/denc.h> +#ifdef CONFIG_STM_MSP_I2S #include <linux/spi/stm_msp.h> +#endif #include <linux/leds_pwm.h> #include <linux/pwm_backlight.h> #include <linux/gpio/nomadik.h> @@ -54,14 +58,20 @@ #include <mach/setup.h> #include <mach/devices.h> #include <mach/sensors1p.h> +#ifdef CONFIG_INPUT_AB8500_ACCDET #include <mach/abx500-accdet.h> +#endif #include <mach/irqs.h> #include <mach/ste-dma40-db8500.h> #ifdef CONFIG_U8500_SIM_DETECT #include <mach/sim_detect.h> #endif +#ifdef CONFIG_CRYPTO_DEV_UX500 #include <mach/crypto-ux500.h> +#endif +#ifdef CONFIG_AV8100 #include <video/av8100.h> +#endif #ifdef CONFIG_KEYBOARD_NOMADIK_SKE #include <plat/ske.h> @@ -73,7 +83,9 @@ #include "board-mop500.h" #include "board-mop500-regulators.h" #include "board-mop500-bm.h" +#if defined(CONFIG_CW1200) || defined(CONFIG_CW1200_MODULE) #include "board-mop500-wlan.h" +#endif #ifdef CONFIG_AB8500_DENC static struct ab8500_denc_platform_data ab8500_denc_pdata = { @@ -525,6 +537,7 @@ static struct lp5521_led_config lp5521_pri_led[] = { }, }; +#ifdef CONFIG_AV8100 static struct av8100_platform_data av8100_plat_data = { .irq = NOMADIK_GPIO_TO_IRQ(192), .reset = MOP500_HDMI_RST_GPIO, @@ -533,7 +546,7 @@ static struct av8100_platform_data av8100_plat_data = { .alt_powerupseq = true, .mclk_freq = 3, /* MCLK_RNG_31_38 */ }; - +#endif static struct lp5521_platform_data __initdata lp5521_pri_data = { .label = "lp5521_pri", @@ -573,20 +586,24 @@ static struct i2c_board_info __initdata mop500_i2c0_devices[] = { .irq = NOMADIK_GPIO_TO_IRQ(217), .platform_data = &mop500_tc35892_data, }, +#ifdef CONFIG_AV8100 { I2C_BOARD_INFO("av8100", 0x70), .platform_data = &av8100_plat_data, }, +#endif /* I2C0 devices only available prior to HREFv60 */ }; #define NUM_PRE_V60_I2C0_DEVICES 1 static struct i2c_board_info __initdata snowball_i2c0_devices[] = { +#ifdef CONFIG_AV8100 { I2C_BOARD_INFO("av8100", 0x70), .platform_data = &av8100_plat_data, }, +#endif }; static struct i2c_board_info __initdata mop500_i2c2_devices[] = { @@ -888,6 +905,7 @@ struct platform_device sensors1p_device = { }; #endif +#ifdef CONFIG_CRYPTO_DEV_UX500 static struct cryp_platform_data u8500_cryp1_platform_data = { .mem_to_engine = { .dir = STEDMA40_MEM_TO_PERIPH, @@ -923,6 +941,7 @@ static struct hash_platform_data u8500_hash1_platform_data = { .dst_info.psize = STEDMA40_PSIZE_LOG_16, }, }; +#endif /* add any platform devices here - TODO */ static struct platform_device *mop500_platform_devs[] __initdata = { @@ -938,7 +957,9 @@ static struct platform_device *mop500_platform_devs[] __initdata = { &ux500_mmio_device, #endif &ux500_hwmem_device, +#ifdef CONFIG_FB_MCDE &u8500_mcde_device, +#endif &u8500_b2r2_device, &u8500_thsens_device, #ifdef CONFIG_STE_TRACE_MODEM @@ -963,6 +984,7 @@ static struct platform_device *mop500_platform_devs[] __initdata = { #endif }; +#ifdef CONFIG_STM_MSP_I2S /* * MSP-SPI */ @@ -1022,6 +1044,11 @@ static void __init mop500_spi_init(struct device *parent) if (!machine_is_snowball()) db8500_add_msp2_spi(parent, &mop500_msp2_spi_data); } +#else +static void __init mop500_spi_init(struct device *parent) +{ +} +#endif /* CONFIG_STM_MSP_I2S */ #ifdef CONFIG_STE_DMA40_REMOVE static struct stedma40_chan_cfg uart0_dma_cfg_rx = { @@ -1166,8 +1193,10 @@ static void __init mop500_uart_init(struct device *parent) static void __init u8500_cryp1_hash1_init(void) { +#ifdef CONFIG_CRYPTO_DEV_UX500 db8500_add_cryp1(&u8500_cryp1_platform_data); db8500_add_hash1(&u8500_hash1_platform_data); +#endif } static struct platform_device *snowball_platform_devs[] __initdata = { @@ -1181,7 +1210,9 @@ static struct platform_device *snowball_platform_devs[] __initdata = { &snowball_gpio_wlan_vbat_regulator_device, #endif &snowball_sbnet_dev, +#ifdef CONFIG_FB_MCDE &u8500_mcde_device, +#endif &u8500_b2r2_device, }; @@ -1202,7 +1233,6 @@ static void accessory_detect_config(void) static void __init mop500_init_machine(void) { struct device *parent = NULL; - int i2c0_devs; int i; mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR; @@ -1228,21 +1258,24 @@ static void __init mop500_init_machine(void) mop500_i2c_init(parent); mop500_sdi_init(parent); - mop500_msp_init(); mop500_spi_init(parent); mop500_uart_init(parent); +#ifdef CONFIG_STM_MSP_I2S + mop500_msp_init(); +#endif +#if defined(CONFIG_CW1200) || defined(CONFIG_CW1200_MODULE) mop500_wlan_init(); +#endif #ifdef CONFIG_KEYBOARD_NOMADIK_SKE db8500_add_ske_keypad(parent, &mop500_ske_keypad_data, sizeof(mop500_ske_keypad_data)); #endif - i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); - - i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); + i2c_register_board_info(0, mop500_i2c0_devices, + ARRAY_SIZE(mop500_i2c0_devices)); i2c_register_board_info(2, mop500_i2c2_devices, - ARRAY_SIZE(mop500_i2c2_devices)); + ARRAY_SIZE(mop500_i2c2_devices)); /* This board has full regulator constraints */ regulator_has_full_constraints(); @@ -1318,6 +1351,12 @@ static void __init hrefv60_init_machine(void) hrefv60_sdi_init(parent); mop500_spi_init(parent); mop500_uart_init(parent); +#ifdef CONFIG_STM_MSP_I2S + mop500_msp_init(); +#endif +#if defined(CONFIG_CW1200) || defined(CONFIG_CW1200_MODULE) + mop500_wlan_init(); +#endif #ifdef CONFIG_KEYBOARD_NOMADIK_SKE db8500_add_ske_keypad(parent, &mop500_ske_keypad_data, @@ -1331,9 +1370,11 @@ static void __init hrefv60_init_machine(void) i2c_register_board_info(2, mop500_i2c2_devices, ARRAY_SIZE(mop500_i2c2_devices)); +#ifdef CONFIG_SENSORS_LSM303DLH /* Snowball want sensors, u8500 get them from stuib */ if (machine_is_snowball()) mop500_sensors_init(); +#endif /* This board has full regulator constraints */ regulator_has_full_constraints(); @@ -1378,7 +1419,9 @@ struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = { OF_DEV_AUXDATA("arm,pl011", 0x80120000, "uart0", &uart0_plat), OF_DEV_AUXDATA("arm,pl011", 0x80121000, "uart1", &uart1_plat), OF_DEV_AUXDATA("arm,pl011", 0x80007000, "uart2", &uart2_plat), +#ifdef CONFIG_STM_MSP_SPI OF_DEV_AUXDATA("arm,pl022", 0x80002000, "ssp0", &ssp0_plat), +#endif {}, }; |