16 Aug, 2017

3 commits

  • Rename this function for consistency with env_set().

    Signed-off-by: Simon Glass

    Simon Glass
     
  • We are now using an env_ prefix for environment functions. Rename setenv()
    for consistency. Also add function comments in common.h.

    Suggested-by: Wolfgang Denk
    Signed-off-by: Simon Glass

    Simon Glass
     
  • At present we support multiple environment drivers but there is not way to
    select between them at run time. Also settings related to the position and
    size of the environment area are global (i.e. apply to all locations).

    Until these limitations are removed we cannot really support more than one
    environment location. Adjust the location to be a choice so that only one
    can be selected. By default the environment is 'nowhere', meaning that the
    environment exists only in memory and cannot be saved.

    Also expand the help for the 'nowhere' option and move it to the top since
    it is the default.

    Signed-off-by: Simon Glass
    [trini: Move all of the imply logic to default X if Y so it works again]
    Signed-off-by: Tom Rini

    Simon Glass
     

01 Aug, 2017

1 commit


11 Jul, 2017

2 commits

  • When the EEPROM is first read its contents are stored in memory as a
    cache to avoid further I2C operations. To determine if the EEPROM was
    previously read the easiest way is to check the memory to see if the
    EEPROM's magic header value is set. Create a new function that can
    determine if the EEPROM was previously read or not without having to
    perform a I2C transaction.

    Signed-off-by: Franklin S Cooper Jr
    Reviewed-by: Tom Rini

    Cooper Jr., Franklin
     
  • In some situations the EEPROM used for board detection may not be
    programmed or simply programmed incorrectly. Therefore, it may be
    necessary to "simulate" reading the contents of the EEPROM to set
    appropriate variables used in the board detection code.

    This may also be helpful in certain boot modes where doing i2c reads
    may be costly and the config supports running only a specific board.

    Signed-off-by: Nishanth Menon
    Signed-off-by: Tero Kristo
    Signed-off-by: Keerthy
    Signed-off-by: Franklin S Cooper Jr.
    Reviewed-by: Tom Rini

    Nishanth Menon
     

04 Jun, 2017

1 commit


01 Jun, 2017

1 commit

  • Currently these (board agnostic) commands cannot be selected using
    menuconfig and friends. Fix this the obvious way. As part of this,
    don't muddle the meaning of CONFIG_HASH_VERIFY to mean both 'hash -v'
    and "we have a hashing command" as this makes the Kconfig logic odd.

    Signed-off-by: Daniel Thompson
    [trini: Re-apply, add imply for a few cases, run moveconfig.py, also
    migrate CRC32_VERIFY]
    Signed-off-by: Tom Rini

    Daniel Thompson
     

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
     

09 May, 2017

2 commits

  • In non DM I2C read operations the address length passed in during a read
    operation will be used automatically. However, in DM I2C the address length
    is set to a default value of one which causes problems when trying to
    perform a read with a differing alen. Therefore, before the first read in a
    series of read operations set the alen to the correct value.

    Signed-off-by: Franklin S Cooper Jr
    Reviewed-by: Tom Rini
    Reviewed-by: Heiko Schocher

    Cooper Jr., Franklin
     
  • Reading from the I2C EEPROM used typically requires using an address length
    of 2. However, when using DM for I2C the default address length used is 1.
    To fix this introduce a new function that allows the address length to be
    changed. The logic to do so was copied from cmd/i2c.c.

    Signed-off-by: Franklin S Cooper Jr
    Reviewed-by: Tom Rini
    Reviewed-by: Heiko Schocher

    Cooper Jr., Franklin
     

08 May, 2017

1 commit


21 Mar, 2017

3 commits


10 Mar, 2017

1 commit


06 Dec, 2016

1 commit


31 Oct, 2016

3 commits

  • Current logic for query of revision, board_name, config returns
    NULL. Users of these functions do a direct strncmp to compare.
    Unfortunately, as per conventions require two valid strings to compare
    against and the current implementation causes a crash when compared
    with NULL.

    We'd still like to maintain the simplistic usage of these APIs instead
    of redundant if (string) res=strncmp(fn(),"cmp",n); flowing all over
    the place.

    Hence, since the version, name and config is already pre-initialized
    with empty string, just dont check for invalid header in the first
    place and return the empty string to the caller.

    Reported-by: Brad Griffis
    Signed-off-by: Nishanth Menon
    Reviewed-by: Lokesh Vutla
    Reviewed-by: Tom Rini
    [trini: Correct was'nt -> wasn't typo]
    Signed-off-by: Tom Rini

    Nishanth Menon
     
  • config should have been initialized along with others as defaults.

    Signed-off-by: Nishanth Menon
    Reviewed-by: Lokesh Vutla
    Reviewed-by: Tom Rini

    Nishanth Menon
     
  • We should have used TI_DEAD_EEPROM_MAGIC in the first place.

    Fixes: d3b98a9eb941 ("ti: common: dra7: Add standard access for board description EEPROM")
    Signed-off-by: Nishanth Menon
    Reviewed-by: Lokesh Vutla
    Reviewed-by: Tom Rini

    Nishanth Menon
     

17 Sep, 2016

12 commits


15 Mar, 2016

2 commits

  • DRA7 EVM revH and later EVMs have EEPROM populated that can contain board
    description information such as name, revision, DDR definition, etc. Adding
    support for this EEPROM format.

    Acked-by: Nishanth Menon
    Reviewed-by: Tom Rini
    Signed-off-by: Lokesh Vutla

    Lokesh Vutla
     
  • Several TI EVMs have EEPROM that can contain board description information
    such as revision, DDR definition, serial number, etc. In just about all
    cases, these EEPROM are on the I2C bus and provides us the opportunity
    to centralize the generic operations involved.

    The on-board EEPROM on the BeagleBone Black, BeagleBone, AM335x EVM,
    AM43x GP EVM, AM57xx-evm, BeagleBoard-X15 share the same format.
    However, DRA-7* EVMs, OMAP4SDP use a modified format.

    We hence introduce logic which is generic between these platforms
    without enforcing any specific format. This allows the boards to use the
    relevant format for operations that they might choose.

    This module will compile for all TI SoC based boards when
    CONFIG_TI_I2C_BOARD_DETECT is enabled to have optimal build times for
    platforms that require this support.

    It is important to note that this logic is fundamental to the board
    configuration process such as DDR configuration which is needed in
    SPL, hence cannot be part of the standard u-boot driver model (which
    is available later in the process). Hence, to aid efficiency, the
    eeprom contents are copied over to SRAM scratchpad memory area at the
    first invocation to retrieve data.

    To prevent churn with cases such as DRA7, where eeprom format maybe
    incompatible, we introduce a generic common format in eeprom which
    is made available over accessor functions for usage.

    Special handling for BBG1 EEPROM had to be introduced thanks to the
    weird eeprom rev contents used.

    The follow on patches introduce the use of this library for AM335x,
    AM437x, and AM57xx.

    Signed-off-by: Lokesh Vutla
    Signed-off-by: Steve Kipisz
    Signed-off-by: Roger Quadros
    Signed-off-by: Nishanth Menon
    Reviewed-by: Tom Rini

    Lokesh Vutla