Commit c57920e6 authored by Lee Jones's avatar Lee Jones Committed by Arnd Bergmann

ARM: ux500: Fix build errors/warnings when MACH_UX500_DT is not set

When MACH_UX500_DT and all related Device Tree configurations are forced
off the warning and error below prevent the kernel from compiling. This
simple patch fixes both issues and allows for full build and boot of
ST-Ericsson's low-cost development board, Snowball.

Warnings fixed:
  arch/arm/mach-ux500/board-mop500.c:680:32: warning: ‘snowball_of_platform_devs’ defined but not used

Errors fixed:
  arch/arm/mach-ux500/timer.c: In function ‘ux500_timer_init’:
  arch/arm/mach-ux500/timer.c:66:3: error: implicit declaration of function ‘of_find_matching_node’
  arch/arm/mach-ux500/timer.c:66:6: warning: assignment makes pointer from integer without a cast

Cc: stable@vger.kernel.org
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 84774e61
...@@ -625,11 +625,6 @@ static struct platform_device *snowball_platform_devs[] __initdata = { ...@@ -625,11 +625,6 @@ static struct platform_device *snowball_platform_devs[] __initdata = {
&ab8500_device, &ab8500_device,
}; };
static struct platform_device *snowball_of_platform_devs[] __initdata = {
&snowball_led_dev,
&snowball_key_dev,
};
static void __init mop500_init_machine(void) static void __init mop500_init_machine(void)
{ {
struct device *parent = NULL; struct device *parent = NULL;
...@@ -769,6 +764,11 @@ MACHINE_END ...@@ -769,6 +764,11 @@ MACHINE_END
#ifdef CONFIG_MACH_UX500_DT #ifdef CONFIG_MACH_UX500_DT
static struct platform_device *snowball_of_platform_devs[] __initdata = {
&snowball_led_dev,
&snowball_key_dev,
};
struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = { struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
/* Requires DMA and call-back bindings. */ /* Requires DMA and call-back bindings. */
OF_DEV_AUXDATA("arm,pl011", 0x80120000, "uart0", &uart0_plat), OF_DEV_AUXDATA("arm,pl011", 0x80120000, "uart0", &uart0_plat),
......
...@@ -63,8 +63,10 @@ static void __init ux500_timer_init(void) ...@@ -63,8 +63,10 @@ static void __init ux500_timer_init(void)
/* TODO: Once MTU has been DT:ed place code above into else. */ /* TODO: Once MTU has been DT:ed place code above into else. */
if (of_have_populated_dt()) { if (of_have_populated_dt()) {
#ifdef CONFIG_OF
np = of_find_matching_node(NULL, prcmu_timer_of_match); np = of_find_matching_node(NULL, prcmu_timer_of_match);
if (!np) if (!np)
#endif
goto dt_fail; goto dt_fail;
tmp_base = of_iomap(np, 0); tmp_base = of_iomap(np, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment