
Hi,
On Wed, Jul 11, 2012 at 12:43 PM, Michal Simek monstr@monstr.eu wrote:
On 07/11/2012 11:59 AM, Simon Glass wrote:
Hi Michal,
On Wed, Jul 11, 2012 at 10:19 AM, Michal Simek <monstr@monstr.eu mailto: monstr@monstr.eu> wrote:
On 07/10/2012 11:13 PM, Simon Glass wrote: Hi Michal, On Tue, Jul 10, 2012 at 11:56 AM, Michal Simek <monstr@monstr.eu<mailto:
monstr@monstr.eu> <mailto:monstr@monstr.eu mailto:monstr@monstr.eu>> wrote:
Also include arch specific gpio.h which can contain gpio function implementation. Signed-off-by: Michal Simek <monstr@monstr.eu <mailto:
monstr@monstr.eu> <mailto:monstr@monstr.eu mailto:monstr@monstr.eu>> CC: Simon Glass <sjg@chromium.org mailto:sjg@chromium.org <mailto:sjg@chromium.org mailto:sjg@chromium.org>>
--- lib/fdtdec.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/lib/fdtdec.c b/lib/fdtdec.c index cc09e06..b12eb77 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -25,6 +25,7 @@ #include <fdtdec.h> /* we need the generic GPIO interface here */ +#include <asm/gpio.h> Can you not instead support the generic functions? What are you
missing from from there that fdtdec.c needs?
OK. The problem is with fdtdec_setup_gpio function where you called
gpio_request which is gpio specific function which you haven't included.
The most archs have this defined in arch/<cpuname>/include/asm/__**
gpio.h.
This is there in my tree. Please see commit:
5f533aeb gpio: Modify common gpio.h to more closely match Linux
This is generic gpio cleanup but I don't think this is the same thing. I think you should get some warnings for fdtdec compilation around missing gpio_request declaration or you include gpio.h in any other header file which is in fdtdec.c/h.
Sorry I don't really understand that. For me fdtdec.c has #include <asm-generic/gpio.h> and that is enough to get gpio_request(). Can you please advise what warning you see and for what board?
Regards, Simon
Thanks, Michal
-- Michal Simek, Ing. (M.Eng) w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/ Microblaze U-BOOT custodian