21 Sep, 2019

8 commits

  • Pull request for UEFI sub-system for v2019.10-rc4 (5)

    This patch set fixes errors in the UEFI sub-system and adds a function to
    compare u16 strings which is prerequisite for further patches.

    Tom Rini
     
  • - Fix rk3288 tinker and evb SPL boot fail
    - Enable get sn from cpuid for rk3399 rockpro64 board

    Tom Rini
     
  • New seven test cases for u16_strcmp() are added under Unicode unit test,
    which should be executed by "ut unicode" command.

    Signed-off-by: AKASHI Takahiro
    Reviewed-by: Heinrich Schuchardt

    AKASHI Takahiro
     
  • u16 version of strcmp(): u16_strncmp() works like u16_strcmp() but only
    at most n characters (in u16) are compared.
    This function will be used in my UEFI secure boot patch.

    Signed-off-by: AKASHI Takahiro
    Reviewed-by: Heinrich Schuchardt

    AKASHI Takahiro
     
  • Now that APPEND_WRITE is supported,
    the result check for the only existing test case should be changed to
    'todo' to 'error', while two more test cases are added.

    Signed-off-by: AKASHI Takahiro
    Signed-off-by: Heinrich Schuchardt

    AKASHI Takahiro
     
  • If EFI_VARIABLE_APPEND_WRITE is specified in attributes at
    efi_set_variable(), specified data will be appended to the variable's
    original value. Attributes other than APPEND_WRITE should not be
    modified.

    With this patch, APPEND_WRITE test in 'variables' selftest will pass.

    Signed-off-by: AKASHI Takahiro

    AKASHI Takahiro
     
  • DisconnectController() should never return EFI_NOT_FOUND.
    If EFI_DRIVER_BINDING_PROTOCOL.Stop() fails, return EFI_DEVICE_ERROR.

    If the driver handle does not expose the EFI_DRIVER_BINDING_PROTOCOL
    return EFI_INVALID_PARAMETER.

    Signed-off-by: Heinrich Schuchardt

    Heinrich Schuchardt
     
  • Sandbox's "host" devices are currently described as UCLASS_ROOT udevice
    with DEV_IF_HOST block device. As the current implementation of
    efi_device_path doesn't support such a type, any "host" device
    on sandbox cannot be seen as a distinct object.

    For example,
    => host bind 0 /foo/disk.img

    => efi devices
    Scanning disk host0...
    Found 1 disks
    Device Device Path
    ================ ====================
    0000000015c19970 /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)
    0000000015c19d70 /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)

    => efi dh
    Handle Protocols
    ================ ====================
    0000000015c19970 Device Path, Device Path To Text, Device Path Utilities, Unicode Collation 2, HII String, HII Database, HII Config Routing
    0000000015c19ba0 Driver Binding
    0000000015c19c10 Simple Text Output
    0000000015c19c80 Simple Text Input, Simple Text Input Ex
    0000000015c19d70 Block IO, Device Path, Simple File System

    As you can see here, efi_root (0x0000000015c19970) and host0 device
    (0x0000000015c19d70) have the same representation of device path.

    This is not only inconvenient, but also confusing since two different
    efi objects are associated with the same device path and
    efi_dp_find_obj() will possibly return a wrong result.

    Solution:
    Each "host" device should be given an additional device path node
    of "vendor device path" to make it distinguishable.

    Signed-off-by: AKASHI Takahiro
    Reviewed-by: Heinrich Schuchardt
    Signed-off-by: Heinrich Schuchardt

    AKASHI Takahiro
     

20 Sep, 2019

9 commits


19 Sep, 2019

11 commits

  • We need a new STACK in SDRAM instead of SRAM so that the EMMC controller
    can work properly. The EMMC/SD controller's master is not able to access
    SRAM area, it can only access DRAM area.

    Signed-off-by: Kever Yang

    Kever Yang
     
  • SPL_TEXT_BASE is 0x0 by default, based on the kconfig
    definition move in below commit.

    "configs: move CONFIG_SPL_TEXT_BASE to Kconfig"
    (sha1: f89d6133eef2e068f9c33853b6584d7fcbfa9d2e)

    So, don't define it explicitly.

    Signed-off-by: Kever Yang

    Kever Yang
     
  • Increase bootm length to 64MB satisfy max gunzip
    size, even other rockchip and know SoC are following
    same length check.

    Reported-by: Michael Trimarchi
    Signed-off-by: Jagan Teki
    Reviewed-by: Kever Yang

    Jagan Teki
     
  • Tinker board needs to mux all the sdmmc gpio and
    activate the regulator connected to bank 7. Remove
    all the bank that are not in use and mark them as dm,spl
    so-that it would initialize at SPL.

    Signed-off-by: Michael Trimarchi
    Signed-off-by: Jagan Teki
    Reviewed-by: Kever Yang

    Michael Trimarchi
     
  • SPL sets up SDRAM while in its board_init_f()
    function, it is possible for the stack to move
    there before board_init_r() is reached.

    So it is required to reserve the stack for SDRAM,
    with a proper location and size otherwise any
    operations during SPL handoff would leads to failure.

    On, this particular context tinker-rk3288 SPL is
    failing to launch U-Boot proper on SDRAM due to
    lack of stack.

    U-Boot SPL 2019.10-rc3-00297-g5ba8b12543 (Sep 12 2019 - 08:50:36 +0530)
    Trying to boot from MMC1
    spl: mmc init failed with error: -110
    SPL: failed to boot from all boot devices
    ### ERROR ### Please RESET the board ###

    So, enable SPL_STACK_R_ADDR and it's related-config
    items for SDRAM, SPL stack to setup properly.

    Reported-by: Jagan Teki
    Signed-off-by: Jagan Teki
    Reviewed-by: Kever Yang

    Jagan Teki
     
  • SPL_TEXT_BASE is 0x0 by default, based on the kconfig
    definition move in below commit.

    "configs: move CONFIG_SPL_TEXT_BASE to Kconfig"
    (sha1: f89d6133eef2e068f9c33853b6584d7fcbfa9d2e)

    So, don't define it explicitly.

    Signed-off-by: Jagan Teki
    Reviewed-by: Kever Yang

    Jagan Teki
     
  • newline \n was missed in fdt_path_offset, error loop.

    Signed-off-by: Jagan Teki
    Reviewed-by: Kever Yang

    Jagan Teki
     
  • Few of the rk3288 boards like tinker, vyasa are using
    TPL, SPL bootchain so the dram initialization must needed
    during TPL stage. So add proper ifconstruct to satisfy
    both TPL, SPL and SPL-only bootchain boards.

    This eventually fixing TPL to SPL handoff, otherwise missing
    dram initilaztion at TPL stage would leads to SPL hang.

    Signed-off-by: Jagan Teki
    Reviewed-by: Kever Yang

    Jagan Teki
     
  • The initial Vyasa-rk3288 TPL implementation is to reuse the
    SPL_TEXT_BASE for TPL and SPL as 0x0 and 0xff704000 respectively.

    But the below commit implements the reverse way of using TEXT_BASE's
    like 0xff704000 for TPL and 0x0 for SPL and which indeed update
    the SPL_TEXT_BASE for vyasa-rk3288 board.
    "rockchip: Kconfig: enable TPL support for rk3328"
    (sha1: 3f47db0275e0f1c1e89d8f13f8b4cdc86b1038ca)

    So, fix by dropping the legacy SPL_TEXT_BASE and it will
    reassign 0x0 by default based on Kconfig definition.

    Reported-by: Jagan Teki
    Signed-off-by: Jagan Teki
    Reviewed-by: Kever Yang

    Jagan Teki
     
  • ROCKCHIP_BROM_HELPER is selected as if TPL/SPL ROCKCHIP_BACK_TO_BROM
    has been defined, so drop the explicit enablement for vyasa board.

    This change is supposed to missed during config move to
    other locations, and missed to drop the same.

    Signed-off-by: Jagan Teki
    Reviewed-by: Kever Yang

    Jagan Teki
     
  • This enables reading the cpuid from e-fuse, and deriving a static
    MAC address from it. Without this, the ethernet interface on the
    rockpro64 can't be used to boot.

    Signed-off-by: Hugh Cole-Baker
    Cc: Philipp Tomsich
    Reviewed-by: Kever Yang

    Hugh Cole-Baker
     

17 Sep, 2019

2 commits


16 Sep, 2019

10 commits

  • Update SPI drivers, driver model conversion status for
    v2019.10 release.

    Signed-off-by: Jagan Teki

    Jagan Teki
     
  • Commit c4e8862308d4 (mtd: spi: Switch to new SPI NOR framework)
    performs switch from previous 'spi_flash' infrastructure without
    proper testing/investigations which results in a regressions for
    SST26 flash series.

    Enable protection ops for SST26 flash series which were
    previously enabled by
    Commit 3d4fed87a5fa (mtd: sf: Add support of sst26wf* flash ICs
    protection ops)

    Signed-off-by: Eugeniy Paltsev
    Reviewed-by: Jagan Teki

    Eugeniy Paltsev
     
  • Commit c4e8862308d4 (mtd: spi: Switch to new SPI NOR framework)
    performs switch from previous 'spi_flash' infrastructure without
    proper testing/investigations which results in a regressions for
    SST26 flash series.

    Add missing SST26* flash IC protection ops which were introduced
    previously by
    Commit 3d4fed87a5fa (mtd: sf: Add support of sst26wf* flash ICs
    protection ops)

    Signed-off-by: Eugeniy Paltsev
    Reviewed-by: Jagan Teki

    Eugeniy Paltsev
     
  • spi_write_then_read, will manage to do the respective
    spi_xfer based on the tx_buf, rx_buf so drop the
    legacy spi_flash_read/write/cm code.

    Tested-by: Adam Ford #da850-evm
    Signed-off-by: Jagan Teki

    Jagan Teki
     
  • Now, we have spi_write_then_read routine that would handle
    spi_xfer handling based on the tx_buf and rx_buf parameters.

    So, replace individual flash read/write/cmd transfer call
    with spi_write_then_read.

    Cc: Egnite GmbH
    Cc: Daniel Gorsulowski
    Cc: Ilko Iliev
    Cc: Marek Vasut
    Cc: Mateusz Kulikowski
    Cc: Alison Wang
    Tested-by: Adam Ford #da850-evm
    Signed-off-by: Jagan Teki

    Jagan Teki
     
  • Add support for SPI synchronous write followed by read,
    this is common interface call from spi-nor to spi drivers.

    Reviewed-by: Simon Glass
    Signed-off-by: Jagan Teki
    Tested-by: Adam Ford #da850-evm

    Jagan Teki
     
  • MXS_SPI driver now partially converted into driver-model,
    so unmark the DEPRECATED option for the same.

    Signed-off-by: Lukasz Majewski
    [jagan: update the commit message]
    Signed-off-by: Jagan Teki
    Reviewed-by: Jagan Teki

    Lukasz Majewski
     
  • In case spi_get_bus_and_cs callback is used, spi bus is first probed
    then slave devices are probed. To avoid a data abort in soft_spi probe
    function, we need to check that (slave != NULL).

    If slave is NULL, cs_flags and clk_flags will be initialized with
    respectively GPIOD_ACTIVE_LOW and 0.

    Signed-off-by: Christophe Kerello
    Signed-off-by: Patrice Chotard
    Reviewed-by: Jagan Teki

    Christophe Kerello
     
  • The prescaler value computation can yield wrong result if given 0x1f at
    the beginning: the value is computed to be 0x20, but the maximum value
    the register can hold 0x1f, so the actual stored value in this case is
    0, which is obviously wrong.
    Set the upper bound of the value to 0x1f with the min macro.

    Signed-off-by: Marek Behún
    Reviewed-by: Stefan Roese
    Reviewed-by: Jagan Teki

    Marek Behún
     
  • Tom Rini