From 84bef11710d14990f8c1213058c17d85b2ec432b Mon Sep 17 00:00:00 2001 From: Felipe Balbi Date: Sun, 16 Mar 2014 17:57:55 +0100 Subject: ARM: omap1: fix build when !CONFIG_OMAP_32K_TIMER If CONFIG_OMAP_32K_TIMER isn't enabled, we will try to use enable_dyn_sleep which wasn't defined anywhere. In order to fix the problem, we always define enable_dyn_sleep as 0 when !CONFIG_OMAP_32K_TIMER. Signed-off-by: Felipe Balbi Acked-by: Tony Lindgren Signed-off-by: Arnd Bergmann --- arch/arm/mach-omap1/pm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'arch/arm/mach-omap1') diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c index 40a1ae319610..dbee729e3b6d 100644 --- a/arch/arm/mach-omap1/pm.c +++ b/arch/arm/mach-omap1/pm.c @@ -71,7 +71,11 @@ static unsigned int mpui7xx_sleep_save[MPUI7XX_SLEEP_SAVE_SIZE]; static unsigned int mpui1510_sleep_save[MPUI1510_SLEEP_SAVE_SIZE]; static unsigned int mpui1610_sleep_save[MPUI1610_SLEEP_SAVE_SIZE]; -#ifdef CONFIG_OMAP_32K_TIMER +#ifndef CONFIG_OMAP_32K_TIMER + +static unsigned short enable_dyn_sleep = 0; + +#else static unsigned short enable_dyn_sleep = 1; -- cgit v1.2.3-58-ga151 From 0b31c53b13343a86bf579aaa7658e8d3ba95b946 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Fri, 21 Mar 2014 13:33:03 +0100 Subject: ARM: omap1: don't rely on tps65010 The code for h2 and osk implicitly assumes that the tps65010 driver is built-in, in order to perform the initial regulator setup. This is fine for most real uses, but it does get into the way of build testing with 'make randconfig', since we don't want platforms to implicitly select device drivers and subsystems such as I2C. This patch by contrast changes the board files to not call into the tps65010 driver when that is not built-in, allowing us to build all configurations including some that will not work properly on this hardware. Signed-off-by: Arnd Bergmann Acked-by: Tony Lindgren --- arch/arm/mach-omap1/board-h2.c | 3 +++ arch/arm/mach-omap1/board-osk.c | 3 +++ 2 files changed, 6 insertions(+) (limited to 'arch/arm/mach-omap1') diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c index fd90cafc2e36..65d2acb31498 100644 --- a/arch/arm/mach-omap1/board-h2.c +++ b/arch/arm/mach-omap1/board-h2.c @@ -318,6 +318,9 @@ static void __init h2_init_smc91x(void) static int tps_setup(struct i2c_client *client, void *context) { + if (!IS_BUILTIN(CONFIG_TPS65010)) + return -ENOSYS; + tps65010_config_vregs1(TPS_LDO2_ENABLE | TPS_VLDO2_3_0V | TPS_LDO1_ENABLE | TPS_VLDO1_3_0V); diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c index d68909b095f1..3a0262156e93 100644 --- a/arch/arm/mach-omap1/board-osk.c +++ b/arch/arm/mach-omap1/board-osk.c @@ -191,6 +191,9 @@ static struct platform_device osk5912_tps_leds = { static int osk_tps_setup(struct i2c_client *client, void *context) { + if (!IS_BUILTIN(CONFIG_TPS65010)) + return -ENOSYS; + /* Set GPIO 1 HIGH to disable VBUS power supply; * OHCI driver powers it up/down as needed. */ -- cgit v1.2.3-58-ga151