diff options
author | Ian Campbell <ijc@hellion.org.uk> | 2014-03-27 20:34:13 +0000 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-04-18 10:42:29 -0400 |
commit | fd11bea2ccb97909f421e20e6a5ba770dbf39d0b (patch) | |
tree | 5c5953653778bf5467f56103ca28fa693028b853 /common | |
parent | 3fa1981e243cbe8f4a31139740600eddde5a4da4 (diff) | |
download | u-boot-imx-fd11bea2ccb97909f421e20e6a5ba770dbf39d0b.zip u-boot-imx-fd11bea2ccb97909f421e20e6a5ba770dbf39d0b.tar.gz u-boot-imx-fd11bea2ccb97909f421e20e6a5ba770dbf39d0b.tar.bz2 |
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')
-rw-r--r-- | common/cmd_gpio.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/common/cmd_gpio.c b/common/cmd_gpio.c index 778aa5f..aff0445 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, |