[U-Boot] [PATCH v2 2/4] gpio: do not include <asm/arch/gpio.h> for UniPhier

Masahiro Yamada yamada.masahiro at socionext.com
Wed Aug 26 06:08:16 CEST 2015


Hi Simon,


2015-08-26 12:53 GMT+09:00 Simon Glass <sjg at chromium.org>:
> Hi,
>
> On 17 July 2015 at 05:15, Masahiro Yamada <yamada.masahiro at socionext.com> wrote:
>> I implemented a GPIO driver based on Driver Model for the UniPhier
>> SoC family, but I could not find any good reason why such SoC
>> specific GPIO headers are needed.
>>
>> Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>
>> ---
>>
>> Changes in v2: None
>>
>>  arch/arm/include/asm/gpio.h | 2 ++
>>  1 file changed, 2 insertions(+)
>
> It is true that with device tree this probably isn't needed.
>
> Some other boards just have dummy files. How do you suggest we deal
> with this? I feel that adding dummy files is a reasonable approach
> until everything is converted.
>
> But I suppose this is another way.
>
> Acked-by: Simon Glass <sjg at chromium.org>
>


I do not prefer dummy files.


We can increase ifdefs with conversion progress


#if !defined(CONFIG_ARCH_UNIPHIER) && \
    !defined(CONFIG_ARCH_FOO) && \
    !defined(CONFIG_ARCH_BAR)
 #include <asm/arch/gpio.h>
#endif





Or, let SoCs select HAVE_ARCH_GPIO.



In Kconfig,

config TEGRA
      ...
      select HAVE_ARCH_GPIO



then,



#ifdef CONFIG_HAVE_ARCH_GPIO
#include <asm/arch/gpio.h>
#endif





We can later drop "select HAVE_ARCH_GPIO" after converting the GPIO to DM.



-- 
Best Regards
Masahiro Yamada


More information about the U-Boot mailing list