* [U-Boot] [PATCH] powerpc/mpc85xx: Fix compiling error for common/cmd_gpio.c
@ 2015-04-28 17:59 Oleksandr G Zhadan
2015-05-05 16:41 ` York Sun
0 siblings, 1 reply; 2+ messages in thread
From: Oleksandr G Zhadan @ 2015-04-28 17:59 UTC (permalink / raw)
To: u-boot
To replicate:
1. add to include/configs/p1_p2_rdb_pc.h "#define CONFIG_CMD_GPIO"
2. run `make P1020RDB-PC_defconfig`
3. run CROSS_COMPILE=powerpc-linux- make
and you will get:
common/built-in.o: In function `do_gpio':
u-boot/common/cmd_gpio.c:186: undefined reference to `gpio_request'
u-boot/common/cmd_gpio.c:194: undefined reference to `gpio_direction_input'
u-boot/common/cmd_gpio.c:195: undefined reference to `gpio_get_value'
u-boot/common/cmd_gpio.c:200: undefined reference to `gpio_get_value'
u-boot/common/cmd_gpio.c:203: undefined reference to `gpio_direction_output'
u-boot/common/cmd_gpio.c:209: undefined reference to `gpio_free
Signed-off-by: Michael Durrant <mdurrant@arcturusnetworks.com>
Signed-off-by: Oleksandr G Zhadan <oleks@arcturusnetworks.com>
---
arch/powerpc/include/asm/arch-mpc85xx/gpio.h | 2 ++
arch/powerpc/include/asm/mpc85xx_gpio.h | 6 ++++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/include/asm/arch-mpc85xx/gpio.h b/arch/powerpc/include/asm/arch-mpc85xx/gpio.h
index 8beed30..71794a8 100644
--- a/arch/powerpc/include/asm/arch-mpc85xx/gpio.h
+++ b/arch/powerpc/include/asm/arch-mpc85xx/gpio.h
@@ -12,4 +12,6 @@
#ifndef __ASM_ARCH_MX85XX_GPIO_H
#define __ASM_ARCH_MX85XX_GPIO_H
+#include <asm/mpc85xx_gpio.h>
+
#endif
diff --git a/arch/powerpc/include/asm/mpc85xx_gpio.h b/arch/powerpc/include/asm/mpc85xx_gpio.h
index 87bb4a0..1d0dad4 100644
--- a/arch/powerpc/include/asm/mpc85xx_gpio.h
+++ b/arch/powerpc/include/asm/mpc85xx_gpio.h
@@ -72,9 +72,10 @@ static inline int gpio_request(unsigned gpio, const char *label)
return 0;
}
-static inline void gpio_free(unsigned gpio)
+static inline int gpio_free(unsigned gpio)
{
/* Compatibility shim */
+ return 0;
}
static inline int gpio_direction_input(unsigned gpio)
@@ -97,12 +98,13 @@ static inline int gpio_get_value(unsigned gpio)
return !!mpc85xx_gpio_get(1U << gpio);
}
-static inline void gpio_set_value(unsigned gpio, int value)
+static inline int gpio_set_value(unsigned gpio, int value)
{
if (value)
mpc85xx_gpio_set_high(1U << gpio);
else
mpc85xx_gpio_set_low(1U << gpio);
+ return 0;
}
static inline int gpio_is_valid(int gpio)
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread* [U-Boot] [PATCH] powerpc/mpc85xx: Fix compiling error for common/cmd_gpio.c
2015-04-28 17:59 [U-Boot] [PATCH] powerpc/mpc85xx: Fix compiling error for common/cmd_gpio.c Oleksandr G Zhadan
@ 2015-05-05 16:41 ` York Sun
0 siblings, 0 replies; 2+ messages in thread
From: York Sun @ 2015-05-05 16:41 UTC (permalink / raw)
To: u-boot
On 04/28/2015 10:59 AM, Oleksandr G Zhadan wrote:
> To replicate:
> 1. add to include/configs/p1_p2_rdb_pc.h "#define CONFIG_CMD_GPIO"
> 2. run `make P1020RDB-PC_defconfig`
> 3. run CROSS_COMPILE=powerpc-linux- make
>
> and you will get:
> common/built-in.o: In function `do_gpio':
> u-boot/common/cmd_gpio.c:186: undefined reference to `gpio_request'
> u-boot/common/cmd_gpio.c:194: undefined reference to `gpio_direction_input'
> u-boot/common/cmd_gpio.c:195: undefined reference to `gpio_get_value'
> u-boot/common/cmd_gpio.c:200: undefined reference to `gpio_get_value'
> u-boot/common/cmd_gpio.c:203: undefined reference to `gpio_direction_output'
> u-boot/common/cmd_gpio.c:209: undefined reference to `gpio_free
>
> Signed-off-by: Michael Durrant <mdurrant@arcturusnetworks.com>
> Signed-off-by: Oleksandr G Zhadan <oleks@arcturusnetworks.com>
> ---
>
> arch/powerpc/include/asm/arch-mpc85xx/gpio.h | 2 ++
> arch/powerpc/include/asm/mpc85xx_gpio.h | 6 ++++--
> 2 files changed, 6 insertions(+), 2 deletions(-)
>
Applied to u-boot-mpc85xx master. Awaiting upstream.
York
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-05-05 16:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-28 17:59 [U-Boot] [PATCH] powerpc/mpc85xx: Fix compiling error for common/cmd_gpio.c Oleksandr G Zhadan
2015-05-05 16:41 ` York Sun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox