[PATCH v1 2/2] [WIP] arm: mvebu: Enable helios4 opt-out of SPL GPIO

Joel Johnson mrjoel at lixil.net
Fri Apr 17 15:56:13 CEST 2020


On 2020-04-17 02:12, Stefan Roese wrote:
> On 17.04.20 09:19, Joel Johnson wrote:
>> Change the SPL boot selection of MMC from a hard selection of GPIO to
>> a softer imply and opt-out of GPIO support for helios4. This preserves
>> the previous GPIO-less configuration.
>> 
>> Signed-off-by: Joel Johnson <mrjoel at lixil.net>
> 
> Doesn't patch 1/2 generate a compile error (at least warning) on
> helios4? If yes, then please squash both patches together to preserve
> git bisect-ablility.
> 
> Thanks,
> Stefan

No, all mvebu targets build cleanly with just the first commit. My goal 
is to drop the second patch entirely and only have the first patch 
merged unless someone strongly objects.

The difference with helios4 is that it actually specifies 
MVEBU_SPL_BOOT_DEVICE_MMC explicitly and so takes that config path with 
the newly selected options. It is the only board besides ClearFog to do 
so, but I can only personally test with ClearFog hardware.

The only meaningful difference for helios4 is that the GPIO support is 
added where it wasn't included before, resulting in an increase of 2678 
bytes in the SPL image. I don't see any way including GPIO support would 
or could cause harm, especially since the device tree includes the same 
gpio line for sdhci detection as ClearFog. I am however, open to and 
inviting clarification if helios4 has a problem with that. As far as I 
could tell, Aditya Prayoga is the most recent and most active helios4 
contributor.

Concretely, the following is the buildman -sK -sS report for the series 
on helios4, showing config and resulting binary size differences.

01: Merge tag 'arc-fixes-for-2020.07-rc1' of 
https://gitlab.denx.de/u-boot/custodians/u-boot-arc
        arm:  w+   helios4
02: arm: mvebu: correct SPL boot configs for SPI/MMC
        arm: (for 1/1 boards) spl/u-boot-spl:all +2678.0 
spl/u-boot-spl:data +144.0 spl/u-boot-spl:rodata +214.0 
spl/u-boot-spl:text +2320.0
             helios4        : spl/u-boot-spl:all +2678 
spl/u-boot-spl:data +144 spl/u-boot-spl:rodata +214 spl/u-boot-spl:text 
+2320
                spl-u-boot-spl: add: 26/0, grow: 2/0 bytes: 2464/0 (2464)
                  function                                   old     new  
  delta
                  fdtdec_parse_phandle_with_args               -     332  
   +332
                  static.gpio_request_tail                     -     200  
   +200
                  dm_gpio_request                              -     148  
   +148
                  dm_gpio_set_dir_flags                        -     136  
   +136
                  gpio_renumber                                -     132  
   +132
                  check_reserved                               -     116  
   +116
                  gpio_request_by_name                         -     112  
   +112
                  fdt_get_phandle                              -     112  
   +112
                  uclass_find_device_by_ofnode                 -     108  
   +108
                  ofnode_parse_phandle_with_args               -     108  
   +108
                  fdt_node_offset_by_phandle                   -      96  
    +96
                  mvebu_gpio_probe                             -      76  
    +76
                  _u_boot_list_2_uclass_2_gpio                 -      76  
    +76
                  mvebu_gpio_direction_output                  -      72  
    +72
                  dm_gpio_get_value                            -      72  
    +72
                  gpio_xlate_offs_flags                        -      68  
    +68
                  _u_boot_list_2_driver_2_gpio_mvebu           -      68  
    +68
                  mvebu_gpio_set_value                         -      56  
    +56
                  gpio_post_probe                              -      56  
    +56
                  fdtdec_get_int                               -      52  
    +52
                  uclass_get_device_by_ofnode                  -      48  
    +48
                  mvebu_gpio_get_function                      -      44  
    +44
                  mvebu_gpio_direction_input                   -      40  
    +40
                  sdhci_probe                                336     372  
    +36
                  mvebu_gpio_get_value                         -      36  
    +36
                  sdhci_get_cd                                96     128  
    +32
                  gpio_pre_remove                              -      24  
    +24
                  gpio_post_bind                               -       8  
     +8
arm:
    + u-boot.cfg: CONFIG_SPL_DM_GPIO=1 CONFIG_SPL_GPIO_SUPPORT=1
    + u-boot-spl.cfg: CONFIG_SPL_DM_GPIO=1 CONFIG_SPL_GPIO_SUPPORT=1
    + all: CONFIG_SPL_DM_GPIO=1 CONFIG_SPL_GPIO_SUPPORT=1
helios4 :
    + u-boot.cfg: CONFIG_SPL_DM_GPIO=1 CONFIG_SPL_GPIO_SUPPORT=1
    + u-boot-spl.cfg: CONFIG_SPL_DM_GPIO=1 CONFIG_SPL_GPIO_SUPPORT=1
    + all: CONFIG_SPL_DM_GPIO=1 CONFIG_SPL_GPIO_SUPPORT=1
03: [WIP] arm: mvebu: Enable helios4 opt-out of SPL GPIO
        arm: (for 1/1 boards) spl/u-boot-spl:all -2678.0 
spl/u-boot-spl:data -144.0 spl/u-boot-spl:rodata -214.0 
spl/u-boot-spl:text -2320.0
             helios4        : spl/u-boot-spl:all -2678 
spl/u-boot-spl:data -144 spl/u-boot-spl:rodata -214 spl/u-boot-spl:text 
-2320
arm:
    - u-boot.cfg: CONFIG_SPL_DM_GPIO=1 CONFIG_SPL_GPIO_SUPPORT=1
    - u-boot-spl.cfg: CONFIG_SPL_DM_GPIO=1 CONFIG_SPL_GPIO_SUPPORT=1
    - all: CONFIG_SPL_DM_GPIO=1 CONFIG_SPL_GPIO_SUPPORT=1
helios4 :
    - u-boot.cfg: CONFIG_SPL_DM_GPIO=1 CONFIG_SPL_GPIO_SUPPORT=1
    - u-boot-spl.cfg: CONFIG_SPL_DM_GPIO=1 CONFIG_SPL_GPIO_SUPPORT=1
    - all: CONFIG_SPL_DM_GPIO=1 CONFIG_SPL_GPIO_SUPPORT=1
Joel

>> 
>> Aditya Prayoga - if you object to the addition of GPIO to the helios4
>>                   SPL, I'd be interested in your thoughts on this 
>> option
>> 
>> This is an exploratory commit of a viable approach to retain the
>> identical current helios4 current configuration. I think it's not 
>> worth
>> it and shouldn't be applied since helios4 uses default MMC boot and
>> there is sufficient space for the SPL image, but is a viable option
>> depending on the opinion of helios4 interested maintainers.


More information about the U-Boot mailing list