summaryrefslogtreecommitdiffstats
path: root/common/cmd_gpio.c
diff options
context:
space:
mode:
authorIan Campbell <ijc@hellion.org.uk>2014-03-27 20:34:13 +0000
committerTom Rini <trini@ti.com>2014-04-18 10:42:29 -0400
commitfd11bea2ccb97909f421e20e6a5ba770dbf39d0b (patch)
tree5c5953653778bf5467f56103ca28fa693028b853 /common/cmd_gpio.c
parent3fa1981e243cbe8f4a31139740600eddde5a4da4 (diff)
downloadblackbird-obmc-uboot-fd11bea2ccb97909f421e20e6a5ba770dbf39d0b.tar.gz
blackbird-obmc-uboot-fd11bea2ccb97909f421e20e6a5ba770dbf39d0b.zip
blackfin: make name_to_gpio be a weak symbol
This required moving it into a C file from the header. The only user of a non-default name_to_gpio is blackfin, therefore build tested with the blackfin bct-brettl2 build, which is one I picked at random. Also tested with a build for the ARM tec board which uses the default/fallback implementation. Inspection with objdump shows that both have done the right thing. This change was requested by Marek during review of the sunxi patch series. Signed-off-by: Ian Campbell <ijc@hellion.org.uk> Cc: Marek Vasut <marex@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Sonic Zhang <sonic.adi@gmail.com>
Diffstat (limited to 'common/cmd_gpio.c')
-rw-r--r--common/cmd_gpio.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/common/cmd_gpio.c b/common/cmd_gpio.c
index 778aa5f098..aff044518f 100644
--- a/common/cmd_gpio.c
+++ b/common/cmd_gpio.c
@@ -11,9 +11,10 @@
#include <dm.h>
#include <asm/gpio.h>
-#ifndef name_to_gpio
-#define name_to_gpio(name) simple_strtoul(name, NULL, 10)
-#endif
+int __weak name_to_gpio(const char *name)
+{
+ return simple_strtoul(name, NULL, 10);
+}
enum gpio_cmd {
GPIO_INPUT,
OpenPOWER on IntegriCloud