Skip to content
Snippets Groups Projects
  1. May 20, 2016
    • 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
  2. May 17, 2016
Loading