Skip to content
Snippets Groups Projects
  1. May 23, 2016
    • Tom Rini's avatar
      SPL: fat: Fix spl_parse_image_header() return value handling · d550e82e
      Tom Rini authored
      
      The spl_parse_image_header() can return 0 and it is not an error.
      Only treat non-zero return value as an error.
      
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Reviewed-by: default avatarFabio Estevam <fabio.estevam@nxp.com>
      Reviewed-by: default avatarPeng Fan <van.freenix@gmail.com>
      Reviewed-by: default avatarStefano Babic <sbabic@denx.de>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      d550e82e
    • Martin Hejnfelt's avatar
      omap3: Fix SPI registers on am33xx and am43xx · 5f89a15e
      Martin Hejnfelt authored
      
      When the base registers are read from device tree the base is not
      0x48030100 as the driver expects, but 0x48030000, resulting in
      non functioning SPI. To deal with this, use same idea as how this
      is done in the linux kernel (drivers/spi/spi-omap2-mcspi.c) and
      add a structure with a field that is used to shift the registers
      on these systems.
      
      v2: Fixed commit subject line to correct cpu
      
      Signed-off-by: default avatarMartin Hejnfelt <mh@newtec.dk>
      5f89a15e
    • Tom Rini's avatar
      kbuild: fixdep: Check fstat(2) return value · c1420f8b
      Tom Rini authored
      
      Coverity has recently added a check that will find when we don't check
      the return code from fstat(2).  Copy/paste the checking logic that
      print_deps() has with an appropriate re-wording of the perror() message.
      
      [ Linux commit : 46fe94ad18aa7ce6b3dad8c035fb538942020f2b ]
      
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.com>
      c1420f8b
    • Michal Simek's avatar
      spl: Setup default value for OF_LIST · c409bd01
      Michal Simek authored
      
      OF_LIST can't remain empty that's why setup it up to default DTB.
      
      If it is empty u-boot.img is created without FDT partition:
      For example:
        ./tools/mkimage -f auto -A arm -T firmware -C none -O u-boot -a
      0x8000000 -e 0 -n "U-Boot 2016.05-rc3 ..." -E -b  -d u-boot-nodtb.bin u-boot.img
      Can't set 'timestamp' property for '' node (FDT_ERR_NOSPACE)
      FIT description: Firmware image with one or more FDT blobs
      Created:         Wed May  4 15:02:52 2016
       Image 0 (firmware@1)
        Description:  U-Boot 2016.05-rc3-00080-gff2e12ae22a8-dirty for zynqmp
      board
        Created:      Wed May  4 15:02:52 2016
        Type:         Firmware
        Compression:  uncompressed
        Data Size:    unavailable
        Architecture: ARM
        Load Address: 0x08000000
       Default Configuration: 'conf@1'
       Configuration 0 (conf@1)
        Description:  unavailable
        Kernel:       unavailable
      
      And then image like this doesn't contain description and link to FDT and
      can't boot.
      
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      c409bd01
    • Michal Simek's avatar
      spl: fit: Print error message when FDT is not present · 5adfa265
      Michal Simek authored
      
      When FDT is not present in the image user doesn't get any error what's
      wrong. Print error message if LIBCOMMON_SUPPORT is enabled.
      
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
      Seris-cc: uboot
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      5adfa265
    • Simon Glass's avatar
      mkimage: Add a quiet mode · bd6e1420
      Simon Glass authored
      
      Some build systems want to be quiet unless there is a problem. At present
      mkimage displays quite a bit of information when generating a FIT file. Add
      a '-q' flag to silence this.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      Acked-by: default avatarJoe Hershberger <joe.hershberger@ni.com>
      bd6e1420
    • Simon Glass's avatar
      image-fit: Don't display an error in fit_set_timestamp() · 8df81e17
      Simon Glass authored
      
      This function returns an error code and its caller may be able to fix the
      error. For example fit_handle_file() expands the device tree to fit if there
      is a lack of space.
      
      In this case the caller does not want an error displayed. It is confusing,
      since it suggests that something is wrong, when it fact everything is fine.
      Drop the error.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      8df81e17
    • Stephen Warren's avatar
      malloc: improve memalign fragmentation fix · 034eda86
      Stephen Warren authored
      
      Commit 4f144a41 "malloc: work around some memalign fragmentation
      issues" enhanced memalign() so that it can succeed in more cases where
      heap fragmentation is present. However, it did not solve as many cases
      as it could. This patch enhances the code to cover more cases.
      
      The alignment code works by allocating more space than the user requests,
      then adjusting the returned pointer to achieve alignment. In general, one
      must allocate "alignment" bytes more than the user requested in order to
      guarantee that alignment is possible. This is what the original code does.
      The previous enhancement attempted a second allocation if the padded
      allocation failed, and succeeded if that allocation just happened to be
      aligned; a fluke that happened often in practice. There are still cases
      where this could fail, yet where it is still possible to honor the user's
      allocation request. In particular, if the heap contains a free region that
      is large enough for the user's request, and for leading padding to ensure
      alignment, but has no or little space for any trailing padding. In this
      case, we can make a third(!) allocation attempt after calculating exactly
      the size of the leading padding required to achieve alignment, which is
      the minimal over-allocation needed for the overall memalign() operation to
      succeed if the third and second allocations end up at the same location.
      
      This patch isn't checkpatch-clean, since it conforms to the existing
      coding style in dlmalloc.c, which is different to the rest of U-Boot.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      034eda86
  2. May 21, 2016
  3. May 20, 2016
    • Nikita Kiryanov's avatar
      eeprom: refactor i2c bus and devaddr parsing · c40f0372
      Nikita Kiryanov authored
      
      Introduce parse_i2c_bus_addr() to generalize the parsing of i2c bus number and
      i2c device address. This is done in preparation for merging layout aware and
      layout unaware command parsing into one function.
      
      No functional changes.
      
      Cc: Heiko Schocher <hs@denx.de>
      Cc: Marek Vasut <marex@denx.de>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Igor Grinberg <grinberg@compulab.co.il>
      Cc: Tom Rini <trini@konsulko.com>
      Signed-off-by: default avatarNikita Kiryanov <nikita@compulab.co.il>
      c40f0372
    • Nikita Kiryanov's avatar
      arm: cm-t43: add support for eeprom layout comands · 2d9a76b6
      Nikita Kiryanov authored
      
      Add support for EEPROM and EEPROM layout commands for CM-T43.
      
      Cc: Igor Grinberg <grinberg@compulab.co.il>
      Cc: Tom Rini <trini@konsulko.com>
      Signed-off-by: default avatarNikita Kiryanov <nikita@compulab.co.il>
      2d9a76b6
    • Nikita Kiryanov's avatar
      arm: cm-t35: add support for eeprom layout comands · bcb447e1
      Nikita Kiryanov authored
      
      Add support for EEPROM and EEPROM layout commands for CM-T35.
      
      Cc: Igor Grinberg <grinberg@compulab.co.il>
      Cc: Tom Rini <trini@konsulko.com>
      Signed-off-by: default avatarNikita Kiryanov <nikita@compulab.co.il>
      bcb447e1
    • Nikita Kiryanov's avatar
      arm: cm-t3517: add support for eeprom layout comands · 19a90ed6
      Nikita Kiryanov authored
      
      Add support for EEPROM and EEPROM layout commands for CM-T3517.
      
      Cc: Igor Grinberg <grinberg@compulab.co.il>
      Cc: Tom Rini <trini@konsulko.com>
      Signed-off-by: default avatarNikita Kiryanov <nikita@compulab.co.il>
      19a90ed6
    • Nikita Kiryanov's avatar
      arm: cm-t54: add support for eeprom layout comands · 66b7e420
      Nikita Kiryanov authored
      
      Add support for EEPROM and EEPROM layout commands for CM-T54.
      
      Cc: Igor Grinberg <grinberg@compulab.co.il>
      Cc: Tom Rini <trini@konsulko.com>
      Signed-off-by: default avatarNikita Kiryanov <nikita@compulab.co.il>
      66b7e420
    • Nikita Kiryanov's avatar
      arm: cm-t335: add support for eeprom layout comands · 0e656b82
      Nikita Kiryanov authored
      
      Add support for EEPROM and EEPROM layout commands for CM-T335.
      
      Cc: Igor Grinberg <grinberg@compulab.co.il>
      Cc: Tom Rini <trini@konsulko.com>
      Signed-off-by: default avatarNikita Kiryanov <nikita@compulab.co.il>
      0e656b82
    • Nikita Kiryanov's avatar
      arm: cm-fx6: add support for eeprom layout comands · 12616531
      Nikita Kiryanov authored
      
      Add support for EEPROM and EEPROM layout commands for CM-FX6.
      
      Cc: Igor Grinberg <grinberg@compulab.co.il>
      Cc: Tom Rini <trini@konsulko.com>
      Signed-off-by: default avatarNikita Kiryanov <nikita@compulab.co.il>
      12616531
    • Nikita Kiryanov's avatar
      compulab: add support for layout aware eeprom commands · 8af5734b
      Nikita Kiryanov authored
      
      Add layout definitions and implement functions for field printing/updating,
      layout detection, layout assignment, and layout parsing.
      
      Cc: Igor Grinberg <grinberg@compulab.co.il>
      Cc: Tom Rini <trini@konsulko.com>
      Signed-off-by: default avatarNikita Kiryanov <nikita@compulab.co.il>
      8af5734b
    • Nikita Kiryanov's avatar
      cmd: eeprom: add support for layout aware commands · aa9e6044
      Nikita Kiryanov authored
      
      Introduce the (optional) eeprom print and eeprom update commands.
      
      These commands are eeprom layout aware:
      * The eeprom print command prints the contents of the eeprom in a human
        readable way (eeprom layout fields, and data formatted to be fit for human
        consumption).
      * The eeprom update command allows user to update eeprom fields by specifying
        the field name, and providing the new data in a human readable format (same
        format as displayed by the eeprom print command).
      * Both commands can either auto detect the layout, or be told which layout to
        use.
      
      New CONFIG options:
      CONFIG_CMD_EEPROM_LAYOUT - enables commands.
      CONFIG_EEPROM_LAYOUT_HELP_STRING - tells user what layout names are supported
      
      Feature API:
      __weak int parse_layout_version(char *str)
      	- override to provide your own layout name parsing
      __weak void __eeprom_layout_assign(struct eeprom_layout *layout, int layout_version);
      	- override to setup the layout metadata based on the version
      __weak int eeprom_layout_detect(unsigned char *data)
      	- override to provide your own algorithm for detecting layout version
      eeprom_field.c
      	- contains various printing and updating functions for common types of
      	  eeprom fields. Can be used for defining custom layouts.
      
      Cc: Heiko Schocher <hs@denx.de>
      Cc: Marek Vasut <marex@denx.de>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Igor Grinberg <grinberg@compulab.co.il>
      Cc: Tom Rini <trini@konsulko.com>
      Signed-off-by: default avatarNikita Kiryanov <nikita@compulab.co.il>
      aa9e6044
    • Nikita Kiryanov's avatar
      cmd: eeprom: add bus switching support for all i2c drivers · 2636ac65
      Nikita Kiryanov authored
      
      The i2c_init function is always provided when CONFIG_SYS_I2C is
      defined. No need to limit ourselves to just one supported I2C driver
      (soft_i2c). Update the #ifdef conditions to support bus switching for
      all I2C drivers.
      
      Cc: Heiko Schocher <hs@denx.de>
      Cc: Marek Vasut <marex@denx.de>
      Cc: Igor Grinberg <grinberg@compulab.co.il>
      Cc: Tom Rini <trini@konsulko.com>
      Signed-off-by: default avatarNikita Kiryanov <nikita@compulab.co.il>
      2636ac65
    • Stefan Roese's avatar
      arm: mvebu: theadorable: Enable CONFIG_ZERO_BOOTDELAY_CHECK · fbaf4272
      Stefan Roese authored
      
      Enable bootdelay 0 check so that booting can be interrupted even with
      bootdelay configured to 0.
      
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      fbaf4272
    • Marek Vasut's avatar
      arm: mvebu: a38x: Weed out floating point use · 29b59353
      Marek Vasut authored
      
      For reason unknown, recently, the DDR init code writers are really fond
      of hiding some small floating point operating deep in their creations.
      This patch removes one from the Marvell A38x code.
      
      Instead of returning size of chip as float from ddr3_get_device_size()
      in GiB units, return it as int in MiB units. Since this would interfere
      with the huge switch code in ddr3_calc_mem_cs_size(), rework the code
      to match the change.
      
      Before this patch, the cs_mem_size variable could have these values:
       ( { 16, 32 } x { 8, 16 } x { 0.01, 0.5, 1, 2, 4, 8 } ) / 8 =
         { 0.000000, 0.001250, 0.002500, 0.005000, 0.062500, 0.125000,
           0.250000, 0.500000, 1.000000, 2.000000, 4.000000, }
      The switch code checked for a subset of the resulting RAM sizes, which
      is in range 128 MiB ... 2048 MiB.
      
      With this patch, the cs_mem_size variable can have these values:
       ( { 16, 32 } x { 8, 16 } x { 0, 512, 1024, 2048, 4096, 8192 } ) / 8 =
         { 0, 64, 128, 256, 512, 1024, 2048, 4096 }
      To retain previous behavior, filter out 0 MiB (invalid size), 64 MiB
      and 4096 MiB options.
      
      Removing the floating point stuff also saves 1.5k from text segment:
        clearfog       :  spl/u-boot-spl:all -1592  spl/u-boot-spl:text -1592
      
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Dirk Eibach <dirk.eibach@gdsys.cc>
      Cc: Stefan Roese <sr@denx.de>
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      29b59353
  4. May 17, 2016
Loading