06 Dec, 2018

1 commit


03 Dec, 2018

1 commit


27 Nov, 2018

1 commit


07 May, 2018

1 commit

  • When U-Boot started using SPDX tags we were among the early adopters and
    there weren't a lot of other examples to borrow from. So we picked the
    area of the file that usually had a full license text and replaced it
    with an appropriate SPDX-License-Identifier: entry. Since then, the
    Linux Kernel has adopted SPDX tags and they place it as the very first
    line in a file (except where shebangs are used, then it's second line)
    and with slightly different comment styles than us.

    In part due to community overlap, in part due to better tag visibility
    and in part for other minor reasons, switch over to that style.

    This commit changes all instances where we have a single declared
    license in the tag as both the before and after are identical in tag
    contents. There's also a few places where I found we did not have a tag
    and have introduced one.

    Signed-off-by: Tom Rini

    Tom Rini
     

28 Apr, 2018

1 commit

  • This converts the following to Kconfig:
    CONFIG_SPI

    This partly involves updating code that assumes that CONFIG_SPI implies
    things that are specific to the MPC8xx SPI driver. For now, just update
    the CONFIG tests. This also involves reworking the default for
    CONFIG_SYS_DEF_EEPROM_ADDR so that we don't set it when we cannot make a
    reasonable default, as it does not cause any compile failures.

    Signed-off-by: Adam Ford
    Signed-off-by: Tom Rini

    Adam Ford
     

22 May, 2017

1 commit

  • This converts the following to Kconfig:
    CONFIG_CMD_EEPROM
    CONFIG_CMD_EEPROM_LAYOUT
    CONFIG_EEPROM_LAYOUT_HELP_STRING

    Signed-off-by: Simon Glass
    Reviewed-by: Tom Rini
    [trini: Rework Kconfig logic slightly, define EEPROM location on TI eval
    platforms]
    Signed-off-by: Tom Rini

    Simon Glass
     

15 May, 2017

1 commit


21 May, 2016

5 commits

  • Merge the parsing of layout aware and layout unaware eeprom commands into
    one parsing function. With this change, layout aware commands now follow
    the eeprom read and eeprom write conventions of making i2c bus and i2c address
    parameters optional.

    Cc: Heiko Schocher
    Cc: Marek Vasut
    Cc: Simon Glass
    Cc: Igor Grinberg
    Cc: Tom Rini
    Signed-off-by: Nikita Kiryanov

    Nikita Kiryanov
     
  • Update eeprom_execute_command() and related code to accommodate both layout
    aware and layout unaware functions.

    No functional changes.

    Cc: Heiko Schocher
    Cc: Marek Vasut
    Cc: Simon Glass
    Cc: Igor Grinberg
    Cc: Tom Rini
    Signed-off-by: Nikita Kiryanov
    [trini: Make eeprom_execute_command have ulong for i2c_addr]
    Signed-off-by: Tom Rini

    Nikita Kiryanov
     
  • 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
    Cc: Marek Vasut
    Cc: Simon Glass
    Cc: Igor Grinberg
    Cc: Tom Rini
    Signed-off-by: Nikita Kiryanov

    Nikita Kiryanov
     
  • 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
    Cc: Marek Vasut
    Cc: Simon Glass
    Cc: Igor Grinberg
    Cc: Tom Rini
    Signed-off-by: Nikita Kiryanov

    Nikita Kiryanov
     
  • 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
    Cc: Marek Vasut
    Cc: Igor Grinberg
    Cc: Tom Rini
    Signed-off-by: Nikita Kiryanov

    Nikita Kiryanov
     

03 May, 2016

1 commit

  • I2C_RXTX_LEN from include/i2c.h is not defined if CONFIG_DM_I2C is
    enabled. This leads to a compilation error on boards that enable both
    CONFIG_CMD_EEPROM and CONFIG_DM_I2C.

    To avoid this, we define I2C_RXTX_LEN in cmd/eeprom.c if it is not
    already defined.

    Signed-off-by: Mario Six

    Mario Six
     

25 Jan, 2016

1 commit

  • Now that they are in their own directory, we can remove this prefix.
    This makes it easier to find a file since the prefix does not get in the
    way.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng
    Reviewed-by: Heiko Schocher
    Acked-by: Stefan Roese
    Acked-by: Przemyslaw Marczak

    Simon Glass