Hi Simon,

2015-08-26 12:53 GMT+09:00 Simon Glass <[email protected]>:
> Hi,
>
> On 17 July 2015 at 05:15, Masahiro Yamada <[email protected]> 
> 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 <[email protected]>
>> ---
>>
>> 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 <[email protected]>
>


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
_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to