This adds the tables required to enable gpiolib support in trout. Signed-off-by: Daniel Walker <dwalker@xxxxxxxxxxxxxx> --- arch/arm/mach-msm/board-trout.c | 21 +++++++++++++++++++-- arch/arm/mach-msm/devices-msm7x00.c | 18 ++++++++++++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-msm/board-trout.c b/arch/arm/mach-msm/board-trout.c index 8f1b28f..bc0afa4 100644 --- a/arch/arm/mach-msm/board-trout.c +++ b/arch/arm/mach-msm/board-trout.c @@ -32,7 +32,23 @@ extern int trout_init_mmc(unsigned int); -static struct platform_device *devices[] __initdata = { +/* + * Early devices are those which provide a system service which will be + * required by one or more of the function calls in msm7x30_init. + * These devices must be probed and online first in order for + * the init routine to run successfully. + */ +static struct platform_device *early_devices[] __initdata = { + &msm_gpio_devices[0], + &msm_gpio_devices[1], + &msm_gpio_devices[2], + &msm_gpio_devices[3], + &msm_gpio_devices[4], + &msm_gpio_devices[5], +}; + + +static struct platform_device *late_devices[] __initdata = { &msm_device_uart3, &msm_device_smd, &msm_device_nand, @@ -60,7 +76,8 @@ static void __init trout_init(void) { int rc; - platform_add_devices(devices, ARRAY_SIZE(devices)); + platform_add_devices(early_devices, ARRAY_SIZE(early_devices)); + platform_add_devices(late_devices, ARRAY_SIZE(late_devices)); #ifdef CONFIG_MMC rc = trout_init_mmc(system_rev); diff --git a/arch/arm/mach-msm/devices-msm7x00.c b/arch/arm/mach-msm/devices-msm7x00.c index c782f72..a084d14 100644 --- a/arch/arm/mach-msm/devices-msm7x00.c +++ b/arch/arm/mach-msm/devices-msm7x00.c @@ -413,6 +413,24 @@ struct platform_device msm_device_mdp = { .resource = resources_mdp, }; +static struct msm7200a_gpio_platform_data gpio_platform_data[] = { + MSM7200A_GPIO_PLATFORM_DATA(0, 0, 15, INT_GPIO_GROUP1), + MSM7200A_GPIO_PLATFORM_DATA(1, 16, 42, INT_GPIO_GROUP2), + MSM7200A_GPIO_PLATFORM_DATA(2, 43, 67, INT_GPIO_GROUP1), + MSM7200A_GPIO_PLATFORM_DATA(3, 68, 94, INT_GPIO_GROUP1), + MSM7200A_GPIO_PLATFORM_DATA(4, 95, 106, INT_GPIO_GROUP1), + MSM7200A_GPIO_PLATFORM_DATA(5, 107, 121, INT_GPIO_GROUP1), +}; + +struct platform_device msm_gpio_devices[] = { + MSM7200A_GPIO_DEVICE(0, gpio_platform_data), + MSM7200A_GPIO_DEVICE(1, gpio_platform_data), + MSM7200A_GPIO_DEVICE(2, gpio_platform_data), + MSM7200A_GPIO_DEVICE(3, gpio_platform_data), + MSM7200A_GPIO_DEVICE(4, gpio_platform_data), + MSM7200A_GPIO_DEVICE(5, gpio_platform_data), +}; + struct clk msm_clocks_7x01a[] = { CLK_PCOM("adm_clk", ADM_CLK, NULL, 0), CLK_PCOM("adsp_clk", ADSP_CLK, NULL, 0), -- 1.7.0.4 -- Sent by an consultant of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum. -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html