20 Jan, 2018

3 commits

  • Keystone and DRA7 based TI platforms uses same
    EMIF memory controller. cmd_ddr3 command is customized
    for keystone platforms, make it generic so that it can
    be re used for DRA7 platforms.

    Signed-off-by: Lokesh Vutla

    Lokesh Vutla
     
  • Move cmd_ddr3 to cmd/ti in order to make
    it build for non-keystone TI platforms.

    Signed-off-by: Lokesh Vutla
    [trini: Rename to ddr3.c not cmd_ddr3.c]
    Signed-off-by: Tom Rini

    Lokesh Vutla
     
  • Added support for K2G EVM with FlipChip SoC of which
    ARM/DDR3 runs at 1GHz/1066 MT/s. The patch is also
    backward compatible with old revision EVM and EVM
    with WireBond SoC. Their ARM/DDR3 run at 600MHz/800 MT/s.

    The new SoC supports 2 different speeds at 1GHz and 600MHz.
    Modyfied the CPU Name to show which SoC is used in the EVM.
    Modified the DDR3 configuration to reflect New SoC supports
    2 different CPU and DDR3 speeds, 1GHz/1066MT and 600MHz/800MT.

    Added new inline function board_it_k2g_g1() for the new FlipChip 1GHz,
    and set the u-boot env variable board_name accordingly.

    Modified findfdt script in u-boot environment variable to include new k2g board type.

    Signed-off-by: Rex Chang
    Signed-off-by: Lokesh Vutla

    Rex Chang
     

19 Jan, 2018

1 commit

  • Align the base address defined in header files with the base address used
    in the DTS. This will facilitate the introduction of the DMA support.

    Of all HSMMC users, only omap3 doesn't have the 0x100 reserved region at
    the top. This region will be used to determine if the controller supports
    DMA transfers

    Signed-off-by: Jean-Jacques Hiblot
    Reviewed-by: Tom Rini

    Jean-Jacques Hiblot
     

16 Aug, 2017

1 commit

  • We are now using an env_ prefix for environment functions. Rename these
    two functions for consistency. Also add function comments in common.h.

    Quite a few places use getenv() in a condition context, provoking a
    warning from checkpatch. These are fixed up in this patch also.

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

    Simon Glass
     

26 Jul, 2017

2 commits

  • The inline assembly functions in mon.c assume that the caller will
    check for the return value in r0 according to regular ARM calling
    conventions.

    However, this assumption breaks down if the compiler inlines the
    functions. The caller is then under no obligation to use r0 for the
    result.

    To fix this disconnect, we must explicitly move the return value
    from the smc/bl call to the variable that the function returns.

    Signed-off-by: Madan Srinivas
    Reviewed-by: Tom Rini

    Srinivas, Madan
     
  • On early K2 devices (eg. K2HK) the secure ROM code does not support
    loading secure code to firewall protected memory, before decrypting,
    authenticating and executing it.

    To load the boot monitor on these devices, it is necessary to first
    authenticate and run a copy loop from non-secure memory that copies
    the boot monitor behind firewall protected memory, before decrypting
    and executing it.

    On K2G, the secure ROM does not allow secure code executing from
    unprotected memory. Further, ROM first copies the signed and encrypted
    image into firewall protected memory, then decrypts, authenticates
    and executes it.

    As a result of this, we cannot use the copy loop for K2G. The
    mon_install has to be modified to pass the address the signed and
    encrypted secure boot monitor image to the authentication API.

    For backward compatibility with other K2 devices and K2G GP,
    the mon_install API still supports a single argument. In this case
    the second argument is set to 0 by u-boot and is ignored by ROM

    Signed-off-by: Thanh Tran
    Signed-off-by: Madan Srinivas
    Reviewed-by: Tom Rini

    Madan Srinivas
     

11 Jul, 2017

5 commits


22 May, 2017

1 commit


09 May, 2017

3 commits


09 Apr, 2017

2 commits

  • Adds an additional image type needed for supporting secure keystone
    devices. The build generates u-boot_HS_MLO which can be used to boot
    from all media on secure keystone devices.

    Signed-off-by: Madan Srinivas
    Signed-off-by: Andrew F. Davis
    Reviewed-by: Tom Rini
    Reviewed-by: Lokesh Vutla

    Madan Srinivas
     
  • This commit implements the board_fit_image_post_process() function for
    the keystone architecture. This function calls into the secure boot
    monitor for secure authentication/decryption of the image. All needed
    work is handled by the boot monitor and, depending on the keystone
    platform, the security functions may be offloaded to other secure
    processing elements in the SoC.

    The boot monitor acts as the gateway to these secure functions and the
    boot monitor for secure devices is available as part of the SECDEV
    package for KS2. For more details refer doc/README.ti-secure

    Signed-off-by: Vitaly Andrianov
    Signed-off-by: Madan Srinivas
    Signed-off-by: Andrew F. Davis
    Reviewed-by: Tom Rini
    Reviewed-by: Lokesh Vutla

    Vitaly Andrianov
     

07 Apr, 2017

1 commit

  • With d53ecad92f06 some unused interrupt related code was removed.
    However all of these options are currently unused. Rather than migrate
    some of these options to Kconfig we just remove the code in question.

    The only related code changes here are that in some cases we use
    CONFIG_STACKSIZE in non-IRQ related context. In these cases we rename
    and move the value local to the code in question.

    Fixes: d53ecad92f06 ("Merge branch 'master' of git://git.denx.de/u-boot-sunxi")
    Signed-off-by: Tom Rini

    Tom Rini
     

21 Mar, 2017

1 commit


04 Dec, 2016

1 commit

  • For ECC enabled DDR, we use EDMA to reset all memory values to 0. For
    K2E/L/H/K the priv ID of 8 was indicative of ARM, but that is not the
    case for K2G, where it is 1.

    Unfortunately, ddr3 code had hard coded the privID and had missed
    identification previously. Fix the same, else unforeseen behavior can
    be expected in our reset of DDR contents to 0 for ECC enablement.

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

    Nishanth Menon
     

29 Nov, 2016

1 commit

  • The config option TARGET_K2x_EVM is set by the k2x defconfigs to pick
    a board target, but the header configs also set K2x_EVM. This config
    is redundant, remove it and use TARGET_K2x_EVM everywhere in its place.

    Signed-off-by: Andrew F. Davis
    Reviewed-by: Lokesh Vutla

    Andrew F. Davis
     

14 Nov, 2016

1 commit


08 Oct, 2016

1 commit

  • The KeyStone platform has its own clk_get_rate() but its prototype
    is different from that of the common-clk (clk-uclass) framework.

    Prefix the KeyStone specific implementation with ks_ in order to
    avoid name-space conflict.

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Simon Glass
    Acked-by: Lokesh Vutla
    Reviewed-by: Tom Rini

    Masahiro Yamada
     

07 Oct, 2016

1 commit


02 Oct, 2016

2 commits

  • Given that boot monitor image is being generated to a specific target location
    depending on the SoC and U-boot relies on addr_mon env variable to be aligned
    with boot monitor target location. When ever the target address gets updated in
    boot monitor, it is difficult to sync between u-boot and boot monitor and also
    there is no way to update user that boot monitor image is updated.

    To avoid this problem, boot monitor image is being generated with mkimage
    header. Adding support in mon_install command for parsing this header.

    Signed-off-by: Suman Anna
    Signed-off-by: Lokesh Vutla
    Reviewed-by: Tom Rini

    Lokesh Vutla
     
  • Enable ECC byte lane for k2g-evm

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

    Lokesh Vutla
     

24 Sep, 2016

1 commit


26 Jul, 2016

1 commit

  • commit 1f807a9f32aa ("ARM: keystone2: Refactor MSMC macros to avoid
    left under a macro KS2_MSMC_SEGMENT_QM_PDSP which is no longer valid.
    This, in effect disabled DMA coherency for QM PDSP.

    Given that msmc_k2hkle_common_setup is valid for all K2H/K/L/E SoCs,
    the #ifdef should been removed in the first place. Do the same.

    Fixes: 1f807a9f32aa ("ARM: keystone2: Refactor MSMC macros to avoid #ifdeffery")
    Signed-off-by: Murali Karicheri
    Acked-by: Nishanth Menon
    Reviewed-by: Tom Rini

    Karicheri, Muralidharan
     

03 Jun, 2016

1 commit

  • BOOTCFG_RSTMUX8 register controls the reset mux associated with the ARM.
    Timer5(dedicated to ARM) when used as WatchDog timer, the events it
    generates are routed to the above mux.

    Following are the 3 events that can controlled bt the reset mux:
    - Device Reset
    - An interrupt to the ARM_GIC
    - An interrupt to the ARM_GIC followed by a device reset.

    Right now to give a default watchdog behaviour "Device reset" is
    being selected.

    Signed-off-by: Lokesh Vutla
    Acked-by: Nishanth Menon

    Lokesh Vutla
     

02 Apr, 2016

2 commits

  • Add missing Privilege ID settings for KS2 SoCs.

    Based on:
    K2H/K: Table 6-7. Privilege ID Settings from SPRS866E (Nov 2013)
    http://www.ti.com/lit/ds/symlink/66ak2h14.pdf (page 99)
    K2L: Table 7-7. Privilege ID Settings from SPRS930 (April 2015)
    http://www.ti.com/lit/ds/symlink/66ak2l06.pdf (page 71)
    K2E: Table 7-7. Privilege ID Settings from SPRS865D (Mar 2015)
    http://www.ti.com/lit/ds/symlink/66ak2e05.pdf (page 75)
    K2G: Table 3-16. PrivIDs from SPRUHY8 (Jan 2016)
    http://www.ti.com/lit/ug/spruhy8/spruhy8.pdf (page 238)

    Overall mapping:
    -------+-----------+-----------+-----------+---------
    PrivID | KS2H/K | K2L | K2E | K2G
    -------+-----------+-----------+-----------+---------
    0 | C66x 0 | C66x 0 | C66x 0 | C66x 0
    1 | C66x 1 | C66x 1 | Reserved | ARM
    2 | C66x 2 | C66x 2 | Reserved | ICSS0
    3 | C66x 3 | C66x 3 | Reserved | ICSS1
    4 | C66x 4 | Reserved | Reserved | NETCP
    5 | C66x 5 | Reserved | Reserved | CPIE
    6 | C66x 6 | Reserved | Reserved | USB
    7 | C66x 7 | Reserved | Reserved | Reserved
    8 | ARM | ARM | ARM | MLB
    9 | NetCP | NetCP | NetCP | PMMC
    10 | QM_PDSP | QM_PDSP | QM_PDSP | DSS
    11 | PCIe_0 | PCIe_0 | PCIe_0 | MMC
    12 | DEBUG/DAP | DEBUG/DAP | DEBUG/DAP | DEBUG/DAP
    13 | Reserved | Reserved | PCIe_1 | Reserved
    14 | HyperLink | PCIe_1 | HyperLink | Reserved
    15 | Reserved | Reserved | TSIP | Reserved
    -------+-----------+-----------+-----------+---------

    NOTE: Few of these might have default configurations, however,
    since most are software configurable, it is better to explicitly
    configure the system to have a known default state.

    Without programming these, we end up seeing lack of coherency on certain
    peripherals resulting in inexplicable failures (such as USB peripheral's
    DMA data not appearing on ARM etc and weird workarounds being done by
    drivers including cache flushes which tend to have system wide
    performance impact).

    By marking these segments as shared, we also ensure SoC wide coherency
    is enabled.

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

    Nishanth Menon
     
  • MSMC segment Privilege ID is not consistent accross the keystone2 SoCs.
    As the first step to ensure complete SoC wide coherency setup, lets
    refactor the macros to remove the #if-deffery around the code which
    obfuscates which IDs are actually enabled for which SoC.

    As a result of this change the PCIe configuration is moved after the
    msmc configuration is complete, but that should ideally have no
    functional impact.

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

    Nishanth Menon
     

27 Mar, 2016

3 commits


17 Mar, 2016

3 commits

  • When we switch to including all linker lists in SPL it is important
    to not include commands as that may lead to link errors due to other
    things we have already discarded. In this case simply move cmd_ddr3.o
    over to the list with the rest.

    Cc: Vitaly Andrianov
    Cc: Nishanth Menon
    Cc: Lokesh Vutla
    Signed-off-by: Tom Rini

    Tom Rini
     
  • Now that we have a standard way to power off the hardware, switch to
    using that rather than our own command.

    Cc: Vitaly Andrianov
    Cc: Nishanth Menon
    Cc: Lokesh Vutla
    Signed-off-by: Tom Rini

    Tom Rini
     
  • When we switch to including all linker lists in SPL it is important
    to not include commands as that may lead to link errors due to other
    things we have already discarded. In this case, we split the code for
    supporting the monitor out from the code for loading it.

    Cc: Vitaly Andrianov
    Cc: Nishanth Menon
    Cc: Lokesh Vutla
    Signed-off-by: Tom Rini

    Tom Rini
     

15 Mar, 2016

2 commits

  • Because KS2 u-boot works in 32 bit address space the existing ram_size
    global data field cannot be used. The maximum, which the get_ram_size()
    can detect is 2GB only. The ft_board_setup() needs the actual ddr3 size
    to fix up dtb.

    This commit introduces the ddr3_get_size() which uses SPD data to
    calculate the ddr3 size. This function replaces the "ddr3_size"
    environment variable, which was used to get the SODIMM size.

    For platforms, which don't have SODIMM with SPD and ddr3 is populated to
    a board a simple ddr3_get_size function that returns ddr3 size has to be
    implemented. See hardware-k2l.h

    Signed-off-by: Vitaly Andrianov
    Signed-off-by: Nishanth Menon
    Reviewed-by: Tom Rini

    Vitaly Andrianov
     
  • This commit replaces hard-coded EMIF and PHY DDR3 configurations for
    predefined SODIMMs to a calculated configuration. The SODIMM parameters
    are read from SODIMM's SPD and used to calculated the configuration.

    The current commit supports calculation for DDR3 with 1600MHz and 1333MHz
    only.

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

    Vitaly Andrianov