Skip to content
Snippets Groups Projects
  1. Nov 29, 2016
  2. Nov 19, 2016
  3. Oct 06, 2016
  4. Jul 27, 2016
  5. Jul 11, 2016
  6. Jun 26, 2016
    • Marek Vasut's avatar
      common: Pass the boot device into spl_boot_mode() · 2b1cdafa
      Marek Vasut authored
      
      The SPL code already knows which boot device it calls the spl_boot_mode()
      on, so pass that information into the function. This allows the code of
      spl_boot_mode() avoid invoking spl_boot_device() again, but it also lets
      board_boot_order() correctly alter the behavior of the boot process.
      
      The later one is important, since in certain cases, it is desired that
      spl_boot_device() return value be overriden using board_boot_order().
      
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Andreas Bießmann <andreas.devel@googlemail.com>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      Cc: Tom Rini <trini@konsulko.com>
      Reviewed-by: default avatarAndreas Bießmann <andreas@biessmann.org>
      [add newly introduced zynq variant]
      Signed-aff-by: default avatarAndreas Bießmann <andreas@biessmann.org>
      2b1cdafa
  7. May 27, 2016
  8. May 17, 2016
  9. Apr 25, 2016
  10. Apr 12, 2016
  11. Mar 23, 2016
  12. Mar 14, 2016
  13. Feb 19, 2016
    • Guillaume GARDET's avatar
      spl: if MMCSD_MODE_RAW fails, try MMCSD_MODE_FS · 86a0df73
      Guillaume GARDET authored
      
      Since commit fd61d399:
              spl: mmc: add break statements in spl_mmc_load_image()
      RAW and FS boot modes are now exclusive again. So, if MMCSD_MODE_RAW fails, the
      board hangs. This patch allows to try MMCSD_MODE_FS then.
      
      It has been tested on a beaglebone black to boot on an EXT partition.
      
      Signed-off-by: default avatarGuillaume GARDET <guillaume.gardet@free.fr>
      Cc: Tom Rini <trini@konsulko.com>
      Cc: Nikita Kiryanov <nikita@compulab.co.il>
      Cc: Igor Grinberg <grinberg@compulab.co.il>
      Cc: Paul Kocialkowski <contact@paulk.fr>
      Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Matwey V. Kornilov <matwey.kornilov@gmail.com>
      Acked-by: default avatarNikita Kiryanov <nikita@compulab.co.il>
      86a0df73
  14. Jan 14, 2016
  15. Dec 14, 2015
  16. Dec 05, 2015
  17. Nov 18, 2015
    • Nikita Kiryanov's avatar
      spl: mmc: add support for BOOT_DEVICE_MMC2 · a1e56cf6
      Nikita Kiryanov authored
      
      Currently the mmc device that SPL looks at is always mmc0, regardless
      of the BOOT_DEVICE_MMCx value. This forces some boards to
      implement hacks in order to boot from other mmc devices.
      
      Make SPL take into account the correct mmc device.
      
      Signed-off-by: default avatarNikita Kiryanov <nikita@compulab.co.il>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      a1e56cf6
    • Nikita Kiryanov's avatar
      spl: change return values of spl_*_load_image() · 36afd451
      Nikita Kiryanov authored
      
      Make spl_*_load_image() functions return a value instead of
      hanging if a problem is encountered. This enables main spl code
      to make the decision whether to hang or not, thus preparing
      it to support alternative boot devices.
      
      Some boot devices (namely nand and spi) do not hang on error.
      Instead, they return normally and SPL proceeds to boot the
      contents of the load address. This is considered a bug and
      is rectified by hanging on error for these devices as well.
      
      Signed-off-by: default avatarNikita Kiryanov <nikita@compulab.co.il>
      Cc: Igor Grinberg <grinberg@compulab.co.il>
      Cc: Tom Rini <trini@konsulko.com>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Ian Campbell <ijc@hellion.org.uk>
      Cc: Hans De Goede <hdegoede@redhat.com>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      Cc: Jagan Teki <jteki@openedev.com>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      36afd451
    • Nikita Kiryanov's avatar
      spl: mmc: get rid of emmc boot code duplication · 83cdf6fa
      Nikita Kiryanov authored
      
      Get rid of emmc boot code duplication in spl_mmc_load_image() using a switch
      case fallthrough into MMCSD_MODE_RAW. Since the #ifdef CONFIG_SUPPORT_EMMC_BOOT
      check is not really necessary, remove it in the process.
      
      No functional changes.
      
      Signed-off-by: default avatarNikita Kiryanov <nikita@compulab.co.il>
      Cc: Igor Grinberg <grinberg@compulab.co.il>
      Cc: Paul Kocialkowski <contact@paulk.fr>
      Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
      Cc: Tom Rini <trini@konsulko.com>
      Cc: Simon Glass <sjg@chromium.org>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      83cdf6fa
    • Nikita Kiryanov's avatar
      spl: mmc: move fs boot into its own function · f52b7293
      Nikita Kiryanov authored
      
      Move the code that handles fs boot out of spl_mmc_load_image() and into its
      own function to reduce the #ifdef complexity of spl_mmc_load_image().
      
      No functional changes.
      
      Signed-off-by: default avatarNikita Kiryanov <nikita@compulab.co.il>
      Cc: Igor Grinberg <grinberg@compulab.co.il>
      Cc: Paul Kocialkowski <contact@paulk.fr>
      Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
      Cc: Tom Rini <trini@konsulko.com>
      Cc: Simon Glass <sjg@chromium.org>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      f52b7293
    • Nikita Kiryanov's avatar
      spl: mmc: get rid of #ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION check · d074ebb9
      Nikita Kiryanov authored
      
      Implement defaults for the raw partition image loading so that the #ifdef
      CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION in spl_mmc_load_image() will no
      longer be necessary.
      
      This change makes it possible for mmc_load_image_raw_partition() and
      mmc_load_image_raw_sector() to coexist.
      
      Signed-off-by: default avatarNikita Kiryanov <nikita@compulab.co.il>
      Cc: Igor Grinberg <grinberg@compulab.co.il>
      Cc: Paul Kocialkowski <contact@paulk.fr>
      Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
      Cc: Tom Rini <trini@konsulko.com>
      Cc: Simon Glass <sjg@chromium.org>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      d074ebb9
    • Nikita Kiryanov's avatar
      spl: mmc: remove #ifdef CONFIG_SPL_OS_BOOT check · 339245b7
      Nikita Kiryanov authored
      
      Implement default versions of falcon mode functions to make the
      CONFIG_SPL_OS_BOOT check in spl_mmc_load_image() unnecessary, thus reducing
      its #ifdef complexity.
      
      No functional changes.
      
      Signed-off-by: default avatarNikita Kiryanov <nikita@compulab.co.il>
      Cc: Igor Grinberg <grinberg@compulab.co.il>
      Cc: Paul Kocialkowski <contact@paulk.fr>
      Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
      Cc: Tom Rini <trini@konsulko.com>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Guillaume GARDET <guillaume.gardet@free.fr>
      Cc: Suriyan Ramasami <suriyan.r@gmail.com>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      339245b7
    • Nikita Kiryanov's avatar
      spl: mmc: refactor device location code to its own function · 4188ba32
      Nikita Kiryanov authored
      
      Simplify spl_mmc_load_image() code by moving the part that finds the mmc device
      into its own function spl_mmc_find_device(), available in two flavors: DM and
      non-DM.
      
      This refactor fixes a bug in which an error in the device location sequence
      does not necessarily aborts the rest of the code. With this refactor, we fail
      the moment there is an error.
      
      Signed-off-by: default avatarNikita Kiryanov <nikita@compulab.co.il>
      Cc: Igor Grinberg <grinberg@compulab.co.il>
      Cc: Paul Kocialkowski <contact@paulk.fr>
      Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
      Cc: Tom Rini <trini@konsulko.com>
      Cc: Simon Glass <sjg@chromium.org>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      4188ba32
    • Nikita Kiryanov's avatar
      spl: mmc: add break statements in spl_mmc_load_image() · fd61d399
      Nikita Kiryanov authored
      
      The original intention of the mmc load_image() function was to try multiple
      boot modes before failing. This is evident by the lack of break statements
      in the switch, and the following line in the default case:
      puts("spl: mmc: no boot mode left to try\n");
      
      This implementation is problematic because:
      - The availability of alternative boot modes is very arbitrary since it
      depends on the specific order of the switch cases. If your boot mode happens to
      be the first case, then you'll have a bunch of other boot modes as alternatives.
      If it happens to be the last case, then you have none.
      - Opting in/out is tied to config options, so the only way for you to prevent an
      alternative boot mode from being attempted is to give up on the feature completely.
      - This implementation makes the code more complicated and difficult to
      understand.
      
      Address these issues by inserting a break statements between the cases to make the
      function try only one boot mode.
      
      Signed-off-by: default avatarNikita Kiryanov <nikita@compulab.co.il>
      Cc: Igor Grinberg <grinberg@compulab.co.il>
      Cc: Paul Kocialkowski <contact@paulk.fr>
      Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
      Cc: Tom Rini <trini@konsulko.com>
      Cc: Simon Glass <sjg@chromium.org>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      fd61d399
  18. Aug 13, 2015
  19. Jul 24, 2015
    • Stefan Roese's avatar
      spl: spl_mmc: Add option to boot from a MMC partition with offset · 4bfcc54c
      Stefan Roese authored
      
      This patch introduces the option to boot from a MMC card parition with
      an offset. This can be done by using both defines together:
      
      define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION 1
      define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR    ((160 << 10) / 512)
      
      The example above loads the main U-Boot at offset 160KiB from the MMC
      partition 1.
      
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      Cc: Luka Perkov <luka.perkov@sartura.hr>
      Cc: Dirk Eibach <eibach@gdsys.de>
      Cc: Tom Rini <trini@konsulko.com>
      4bfcc54c
  20. Jul 21, 2015
  21. Jun 18, 2015
    • Paul Kocialkowski's avatar
      spl: spl_mmc: MMC boot mode provisions checks · 3ae8f4c8
      Paul Kocialkowski authored
      
      This allows using only one of either raw or fs mode for SPL mmc boot, without
      the need to have provisions for the other. In particular, a device may have
      U-Boot installed on a file system on the mmc, without ever needing to read
      U-Boot from raw memory. Thus, there is no reason to provide a sector or
      partition for raw mode. This allows this behaviour and still provides a robust
      fallback mechanism in case provisions for both modes are defined.
      
      Signed-off-by: default avatarPaul Kocialkowski <contact@paulk.fr>
      3ae8f4c8
Loading