Skip to content
Snippets Groups Projects
  1. Feb 09, 2020
  2. Feb 07, 2020
    • Tom Rini's avatar
      cmd/elf.c: Add SPDX tag · 89789ebd
      Tom Rini authored
      
      Based on reading the text of the license comment this appears to be
      the BSD-2-Clause license but with an imperfect word match as
      BSD-2-Clause was not (as far as I recall) a common license choice at the
      time the code was written.
      
      Cc: Wolfgang Denk <wd@denx.de>
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      89789ebd
    • Luka Kovacic's avatar
      cmd: gpio: Correct do_gpio() return value · 4dbc107f
      Luka Kovacic authored
      
      Use the correct return value in function do_gpio() and update
      commands documentation with the return values from command_ret_t enum.
      
      CMD_RET_SUCCESS is returned on command success and CMD_RET_FAILURE is
      returned on command failure.
      
      The command was returning the pin value, which caused confusion when
      debugging (#define DEBUG).
      
      Signed-off-by: default avatarLuka Kovacic <luka.kovacic@sartura.hr>
      Tested-by: default avatarRobert Marko <robert.marko@sartura.hr>
      4dbc107f
  3. Feb 04, 2020
  4. Jan 30, 2020
    • Tom Rini's avatar
      cmd/gpt: Address error cases during gpt rename more correctly · 5749faa3
      Tom Rini authored
      
      New analysis by the tool has shown that we have some cases where we
      weren't handling the error exit condition correctly.  When we ran into
      the ENOMEM case we wouldn't exit the function and thus incorrect things
      could happen.  Rework the unwinding such that we don't need a helper
      function now and free what we may have allocated.
      
      Fixes: 18030d04 ("GPT: fix memory leaks identified by Coverity")
      Reported-by: Coverity (CID: 275475, 275476)
      Cc: Alison Chaiken <alison@she-devel.com>
      Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
      Cc: Jordy <jordy@simplyhacker.com>
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      Reviewed-by: default avatarSimon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
      5749faa3
  5. Jan 28, 2020
    • Martin Fuzzey's avatar
      pmic: allow dump command for non contiguous register maps · b852cca8
      Martin Fuzzey authored
      
      Some PMICs (such as the DA9063) have non-contiguous register maps.
      Attempting to read the non implemented registers returns an error
      rather than a dummy value which causes 'pmic dump' to terminate
      prematurely.
      
      Fix this by allowing the PMIC driver to return -ENODATA for such
      registers, which will then be displayed as '--' by pmic dump.
      
      Use a single error code rather than any error code so that
      we can distinguish between a hardware failure reading the PMIC
      and a non implemented register known to the driver.
      
      Signed-off-by: default avatarMartin Fuzzey <martin.fuzzey@flowbird.group>
      b852cca8
    • Peng Ma's avatar
      cmd: sata: Add block unbind device function · 2d7818d0
      Peng Ma authored
      
      If we didn't unbind the sata from block device, the same devices would
      be added after sata remove,
      This patch is to resolve this issue as below:
      
      => sata info
      SATA#0:
      	(3.0 Gbps)
      SATA#1:
      	(3.0 Gbps)
      Device 0: Model: INTEL SSDSA2BW300G3D Firm: 4PC10362 Ser#: BTPR247005PY30
                  Type: Hard Disk
                  Supports 48-bit addressing
                  Capacity: 286168.1 MB = 279.4 GB (586072368 x 512)
      Device 1: Model: INTEL SSDSA2BW300G3D Firm: 4PC10362 Ser#: BTPR247005VX30
                  Type: Hard Disk
                  Supports 48-bit addressing
                  Capacity: 286168.1 MB = 279.4 GB (586072368 x 512)
      => sata stop
      => sata info
      SATA#0:
      	(3.0 Gbps)
      SATA#1:
      	(3.0 Gbps)
      Device 0: Model: INTEL SSDSA2BW300G3D Firm: 4PC10362 Ser#: BTPR247005PY300
                  Type: Hard Disk
                  Supports 48-bit addressing
                  Capacity: 286168.1 MB = 279.4 GB (586072368 x 512)
      Device 1: Model: INTEL SSDSA2BW300G3D Firm: 4PC10362 Ser#: BTPR247005VX300
                  Type: Hard Disk
                  Supports 48-bit addressing
                  Capacity: 286168.1 MB = 279.4 GB (586072368 x 512)
      Device 2: Model: INTEL SSDSA2BW300G3D Firm: 4PC10362 Ser#: BTPR247005PY300
                  Type: Hard Disk
                  Supports 48-bit addressing
                  Capacity: 286168.1 MB = 279.4 GB (586072368 x 512)
      Device 3: Model: INTEL SSDSA2BW300G3D Firm: 4PC10362 Ser#: BTPR247005VX300
                  Type: Hard Disk
                  Supports 48-bit addressing
                  Capacity: 286168.1 MB = 279.4 GB (586072368 x 512)
      
      Signed-off-by: default avatarPeng Ma <peng.ma@nxp.com>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      2d7818d0
  6. Jan 27, 2020
  7. Jan 24, 2020
  8. Jan 23, 2020
  9. Jan 22, 2020
  10. Jan 21, 2020
  11. Jan 17, 2020
  12. Jan 16, 2020
  13. Jan 10, 2020
    • Eugeniu Rosca's avatar
      cmd: adtimg: Refactor usage style · 4f731c79
      Eugeniu Rosca authored
      Trying to extend 'adtimg' functionality [1], we've been severely hit
      by a major limitation in the command's usage scheme. Specifically, the
      command's user interface appears to be too centric to getting the
      DTB/DTBO entry [3] based on the index of the desired DT in the image,
      which makes it really difficult retrieving the DT entry based on
      alternative criteria (e.g. filtering by id/rev fields), the
      latter being demanded by real life customer use-cases [1].
      
      This went to the point of receiving below feedback from Sam [2]:
      
       -- snip --
       As for 'dtimg' command: after giving it some thought, I think not much
       people using it yet. So in this particular case I don't have some
       strong preference, and if you think the 'dtimg' interface is ugly, and
       it overcomes "don't break interfaces" rule, maybe now is a good time
       to rework it (before it gets widely used).
       -- snip --
      
      Given the above, rework the usage pattern from [4] to [5], in order to
      allow an intuitive enablement of "by id|rev" DT search [6].
      
      [1] https://patchwork.ozlabs.org/cover/1202575/
          ("cmd: dtimg: Enhance with --id and --rev options (take #1)")
      [2] https://patchwork.ozlabs.org/patch/1182207/#2317020
      [3] https://source.android.com/devices/architecture/dto/partitions
      
      
      [4] Old usage
      adtimg dump <addr>                    - Print image contents
      adtimg start <addr> <index> <varname> - Get DT address by index
      adtimg size <addr> <index> <varname>  - Get DT size by index
      
      [5] New usage
      adtimg addr <addr>                      - Set image location to <addr>
      adtimg dump                             - Print out image contents
      adtimg get dt --index=<i> [avar [svar]] - Get DT address and size by index
      
      [6] Soon-to-be-provided "by id|rev" add-on functionality
      adtimg get dt --id=<id> --rev=<rev> [avar [svar [ivar]]]
       - Get DT address/size/index by id|rev fields
      
      Signed-off-by: default avatarEugeniu Rosca <erosca@de.adit-jv.com>
      Reviewed-by: default avatarSam Protsenko <semen.protsenko@linaro.org>
      4f731c79
    • Eugeniu Rosca's avatar
      cmd: adtimg: Rename internal symbols · 4c6edc28
      Eugeniu Rosca authored
      
      With 'dtimg.c' renamed to 'adtimg.c', now ensure the naming
      consistency in the internal implementation of 'adtimg.c'.
      
      No functional change intended.
      
      Signed-off-by: default avatarEugeniu Rosca <erosca@de.adit-jv.com>
      Reviewed-by: default avatarSam Protsenko <semen.protsenko@linaro.org>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      4c6edc28
    • Eugeniu Rosca's avatar
      dtimg/am57xx_evm_defconfig: Rename dtimg to adtimg · b84acf10
      Eugeniu Rosca authored
      Rename the existing 'dtimg' command to 'adtimg', in order to:
       - Suggest the Android origins and scope
       - Be consistent with the upcoming 'abootimg' command (naming
         suggested by Simon [*])
      
      The change in _not_ backward compatible, but its benefits outweigh its
      downsides, given that we don't expect active users of 'dtimg' today.
      
      Perform the rename in several steps:
       1. Rename *.c file and Kconfig symbol. This should allow
          'git log --follow' to properly track the history of 'adtimg.c'
       2. 's/dtimg/adtimg/g' in the internal namespace of 'adtimg.c'
      
      ELF comparison [**] before and after shows no functional change.
      
      [*] https://patchwork.ozlabs.org/patch/1182212/#2291600
      
      
      [**] diff -u <(objdump -d cmd/dtimg.o) <(objdump -d cmd/adtimg.o)
      
      Cc: Tom Rini <trini@konsulko.com>
      Signed-off-by: default avatarEugeniu Rosca <erosca@de.adit-jv.com>
      Reviewed-by: default avatarSimon <Glass&lt;sjg@chromium.org>
      Reviewed-by: default avatarSam Protsenko <semen.protsenko@linaro.org>
      b84acf10
Loading