14 Feb, 2017

2 commits


01 Feb, 2017

1 commit


31 Jan, 2017

2 commits

  • commit b3d2861eb20a795b99292b823c923935df26dfc6 upstream.

    spl_init on some boards is called after stack and heap relocation, on
    some platforms spl_relocate_stack_gd is called to handle setting the
    limit to its value CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN when simple
    SPL malloc is enabled during relocation. spl_init should then not
    re-assign the old pre-relocation limit when this is defined.

    Signed-off-by: Andrew F. Davis
    Reviewed-by: Tom Rini

    Andrew F. Davis
     
  • commit 1923d54bfc2261948448a821d284f10566fde7fe upstream.

    Add debug statements to memalign_simple to match malloc_simple.

    Signed-off-by: Andrew F. Davis
    Reviewed-by: Tom Rini

    Andrew F. Davis
     

23 Jan, 2017

2 commits


11 Jan, 2017

2 commits


03 Jan, 2017

1 commit

  • When we want to use Secure Boot with HAB from SPL over U-Boot.img,
    we need to append the IVT to the image and leave space for the CSF.
    Images generated as firmware_ivt can directly be signed using the
    Freescale code signing tool. For creation of a CSF, mkimage outputs
    the correct HAB Blocks for the image.
    The changes to the usual firmware image class are quite small,
    that is why I implemented that directly into the default_image.

    Cc: sbabic@denx.de

    v2-Changes: None

    Signed-off-by: Sven Ebenfeld
    Reviewed-by: George McCollister
    Tested-by: George McCollister

    Sven Ebenfeld
     

20 Dec, 2016

3 commits

  • Stop boot process if fpga programming fails.
    Without this patch boot process continues even if fpga programming
    failed.

    Signed-off-by: Michal Simek
    Reviewed-by: Simon Glass

    Michal Simek
     
  • All sata based drivers are bind and corresponding block
    device is created. Based on this find_scsi_device() is able
    to get back block device based on scsi_curr_dev pointer.

    intr_scsi() is commented now but it can be replaced by calling
    find_scsi_device() and scsi_scan().

    scsi_dev_desc[] is commented out but common/scsi.c heavily depends on
    it. That's why CONFIG_SYS_SCSI_MAX_DEVICE is hardcoded to 1 and symbol
    is reassigned to a block description allocated by uclass.
    There is only one block description by device now but it doesn't need to
    be correct when more devices are present.

    scsi_bind() ensures corresponding block device creation.
    uclass post_probe (scsi_post_probe()) is doing low level init.

    SCSI/SATA DM based drivers requires to have 64bit base address as
    the first entry in platform data structure to setup mmio_base.

    Signed-off-by: Michal Simek
    Reviewed-by: Simon Glass

    Michal Simek
     
  • The most of ethernet drivers are using this mdio registration sequence.
    strcpy(priv->bus->name, "emac");
    mdio_register(priv->bus);
    Where driver can be used only with one MDIO bus because only unique
    name should be used.

    Other drivers are using unique device name for MDIO registration to
    support multiple instances.
    snprintf(priv->bus->name, sizeof(bus->name), "%s", name);

    With DM dev->seq is used more even in logs
    (like random MAC address generation:
    printf("\nWarning: %s (eth%d) using random MAC address - %pM\n",
    dev->name, dev->seq, pdata->enetaddr);
    )
    where eth%d prefix is used.

    Simplify driver code to register mdio device with dev->seq number
    to simplify mdio registration and reduce code duplication across
    all drivers. With DM_SEQ_ALIAS enabled dev->seq reflects alias setting.

    Signed-off-by: Michal Simek
    Acked-by: Joe Hershberger
    Reviewed-by: Simon Glass

    Michal Simek
     

09 Dec, 2016

5 commits


08 Dec, 2016

2 commits

  • The most of ethernet drivers are using this mdio registration sequence.
    strcpy(priv->bus->name, "emac");
    mdio_register(priv->bus);
    Where driver can be used only with one MDIO bus because only unique
    name should be used.

    Other drivers are using unique device name for MDIO registration to
    support multiple instances.
    snprintf(priv->bus->name, sizeof(bus->name), "%s", name);

    With DM dev->seq is used more even in logs
    (like random MAC address generation:
    printf("\nWarning: %s (eth%d) using random MAC address - %pM\n",
    dev->name, dev->seq, pdata->enetaddr);
    )
    where eth%d prefix is used.

    Simplify driver code to register mdio device with dev->seq number
    to simplify mdio registration and reduce code duplication across
    all drivers. With DM_SEQ_ALIAS enabled dev->seq reflects alias setting.

    Signed-off-by: Michal Simek
    ---
    For example:

    Board: Xilinx Zynq
    Net: ZYNQ GEM: e000b000, phyaddr 7, interface rgmii-id

    Warning: ethernet@e000b000 (eth0) using random MAC address -
    7a:fc:90:53:6a:41
    eth0: ethernet@e000b000ZYNQ GEM: e000c000, phyaddr ffffffff, interface
    rgmii-id

    Warning: ethernet@e000c000 (eth3) using random MAC address -
    1a:ff:d7:1a:a1:b2
    , eth3: ethernet@e000c000
    ** Bad device size - mmc 0 **
    Checking if uenvcmd is set ...
    Hit any key to stop autoboot: 0
    Zynq> mdio list
    eth0:
    17 - Marvell 88E1111S ethernet@e000b000
    eth3:
    17 - Marvell 88E1111S ethernet@e000c000
    Zynq>

    Michal Simek
     
  • All sata based drivers are bind and corresponding block
    device is created. Based on this find_scsi_device() is able
    to get back block device based on scsi_curr_dev pointer.

    intr_scsi() is commented now but it can be replaced by calling
    find_scsi_device() and scsi_scan().

    scsi_dev_desc[] is commented out but common/scsi.c heavily depends on
    it. That's why CONFIG_SYS_SCSI_MAX_DEVICE is hardcoded to 1 and symbol
    is reassigned to a block description allocated by uclass.
    There is only one block description by device now but it doesn't need to
    be correct when more devices are present.

    scsi_bind() ensures corresponding block device creation.
    uclass post_probe (scsi_post_probe()) is doing low level init.

    SCSI/SATA DM based drivers requires to have 64bit base address as
    the first entry in platform data structure to setup mmio_base.

    Signed-off-by: Michal Simek
    Reviewed-by: Simon Glass
    Series-changes: 2
    - Use CONFIG_DM_SCSI instead of mix of DM_SCSI and DM_SATA
    Ceva sata has never used sata commands that's why keep it in
    SCSI part only.
    - Separate scsi_scan() for DM_SCSI and do not change cmd/scsi.c
    - Extend platdata

    Series-changes: 3
    - Fix scsi_scan return path
    - Fix header location uclass-internal.h
    - Add scsi_max_devs under !DM_SCSI
    - Add new header device-internal because of device_probe()
    - Redesign block device creation algorithm
    - Use device_unbind in error path
    - Create block device with id and lun numbers (lun was there in v2)
    - Cleanup dev_num initialization in block device description
    with fixing parameters in blk_create_devicef
    - Create new Kconfig menu for SATA/SCSI drivers
    - Extend description for DM_SCSI
    - Fix Kconfig dependencies
    - Fix kernel doc format in scsi_platdata
    - Fix ahci_init_one - vendor variable

    Series-changes: 4
    - Fix Kconfig entry
    - Remove SPL ifdef around SCSI uclass
    - Clean ahci_print_info() ifdef logic

    Michal Simek
     

06 Dec, 2016

1 commit

  • The patch
    "dm: spl: mmc: Support CONFIG_BLK in SPL MMC"
    (sha1: 87bce4e5c0b55452d70830928b2d7b98fa24d4e3)
    converted FAT part of spl_mmc_do_fs_boot() but forget to update also EXT
    part by 's/&mmc->block_dev/mmc_get_blk_desc(mmc)/'.
    This patch is fixing compilation error when CONFIG_SPL_EXT_SUPPORT
    is enabled.

    Signed-off-by: Michal Simek
    Reviewed-by: Jaehoon Chung
    Reviewed-by: Simon Glass

    Michal Simek
     

05 Dec, 2016

1 commit

  • After an image is selected out of a FIT blob for further processing we
    run an optional, platform specific, post-processing function on this
    component. This post-processing may modify the position and size of the
    image, so after post-processing we update the location and size for this
    image in the FIT header. This can cause problems as the position of
    subsequent components in the FIT blob are only referenced by relative
    position to the end of the last component. When we resize or move a
    component the following components position will be calculated
    incorrectly. To fix this, we do not update the FIT header but instead
    only update our local understanding of the image data. This also allows
    us to re-run post-processing steps if needed.

    Signed-off-by: Andrew F. Davis
    Tested-by: Carlos Hernandez
    Reviewed-by: Simon Glass
    Reviewed-by: Lokesh Vutla

    Andrew F. Davis
     

04 Dec, 2016

4 commits


03 Dec, 2016

3 commits

  • Commit e2f88dfd2d96 ("libfdt: Introduce new ARCH_FIXUP_FDT option")
    allows us to skip memory setup of DTB, but a problem for ARM is that
    spin_table_update_dt() and psci_update_dt() are skipped as well if
    CONFIG_ARCH_FIXUP_FDT is disabled.

    This commit allows us to skip only fdt_fixup_memory_banks() instead
    of the whole of arch_fixup_fdt(). It will be useful when we want to
    use a memory node from a kernel DTB as is, but need some fixups for
    Spin-Table/PSCI.

    Signed-off-by: Masahiro Yamada
    Acked-by: Alexey Brodkin
    Acked-by: Simon Glass
    Fixed build error for x86:
    Signed-off-by: Simon Glass

    Masahiro Yamada
     
  • When CONFIG_SPL_STACK_R is enabled, and spl_init() is called before
    board_init_r(), spl_relocate_stack_gd() will move global_data to a new
    place in memory. This affects driver model since it uses a list for the
    uclasses. Unless this is updated the list will become invalid. When
    looking for a non-existent uclass, such as when adding a new one, the loop
    in uclass_find() may continue forever, thus causing a hang.

    Add a function to correct this rather obscure bug.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Since a platform conversion to generic board support has not been
    accomplished some architecture specific bits are missing from board_f
    init sequence, the change adds a number of basic expected callbacks
    into early init sequence.

    Signed-off-by: Vladimir Zapolskiy
    Reviewed-by: Simon Glass

    Vladimir Zapolskiy
     

02 Dec, 2016

10 commits


01 Dec, 2016

1 commit