#
7e0f2267 |
| 28-Apr-2016 |
Marek Vasut <marex@denx.de> |
SPL: Let spl_parse_image_header() return value
Allow the spl_parse_image_header() to return value. This is convenient for controlling the SPL boot flow if the loaded image is corrupted.
Signed-off-
SPL: Let spl_parse_image_header() return value
Allow the spl_parse_image_header() to return value. This is convenient for controlling the SPL boot flow if the loaded image is corrupted.
Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Peng Fan <van.freenix@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Tom Rini <trini@konsulko.com>
show more ...
|
#
5bbf4099 |
| 20-Apr-2016 |
Fabio Estevam <fabio.estevam@nxp.com> |
spl: spl_mmc: Disambiguate error message
The error message "spl: mmc block read error" may come from two different functions, so we should better annotate the function name where the error comes fro
spl: spl_mmc: Disambiguate error message
The error message "spl: mmc block read error" may come from two different functions, so we should better annotate the function name where the error comes from to help debugging.
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Tom Rini <trini@konsulko.com>
show more ...
|
#
811906ae |
| 11-Apr-2016 |
Lokesh Vutla <lokeshvutla@ti.com> |
spl: mmc: raw: Try to load u-boot if Linux image is not found
If CONFIG_SPL_OS_BOOT is enabled and Linux image is not flashed at RAW_MODE_KERNEL_SECTOR in MMC, spl still assumes that Linux is availa
spl: mmc: raw: Try to load u-boot if Linux image is not found
If CONFIG_SPL_OS_BOOT is enabled and Linux image is not flashed at RAW_MODE_KERNEL_SECTOR in MMC, spl still assumes that Linux is available and tries to boot it and hangs. In order to avoid this, adding a check to verify if parsed image header is of type IH_OS_LINUX. If it fails then fall back to load u-boot image.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
show more ...
|
#
4976f482 |
| 15-Mar-2016 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
spl_mmc: allow to load raw image
The function spl_parse_image_header() falls back to a raw image if the U-Boot header is missing and CONFIG_SPL_PANIC_ON_RAW_IMAGE is undefined. While, mmc_load_imag
spl_mmc: allow to load raw image
The function spl_parse_image_header() falls back to a raw image if the U-Boot header is missing and CONFIG_SPL_PANIC_ON_RAW_IMAGE is undefined. While, mmc_load_image_raw_sector() only accepts a U-Boot legacy image or an FIT image, preventing us from loading a raw image.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Tom Rini <trini@konsulko.com>
show more ...
|
#
88033d73 |
| 14-Mar-2016 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-dm
|
#
96debd1f |
| 22-Feb-2016 |
Simon Glass <sjg@chromium.org> |
spl: Support loading a FIT from MMC
Detect a FIT when loading from MMC and handle it using the new FIT SPL support.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
3e8bd469 |
| 29-Feb-2016 |
Simon Glass <sjg@chromium.org> |
dm: part: Rename some partition functions
Rename three partition functions so that they start with part_. This makes it clear what they relate to.
Signed-off-by: Simon Glass <sjg@chromium.org> Test
dm: part: Rename some partition functions
Rename three partition functions so that they start with part_. This makes it clear what they relate to.
Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com>
show more ...
|
#
86a0df73 |
| 18-Feb-2016 |
Guillaume GARDET <guillaume.gardet@free.fr> |
spl: if MMCSD_MODE_RAW fails, try MMCSD_MODE_FS
Since commit fd61d39970b9901217efc7536d9f3a61b4e1752a: spl: mmc: add break statements in spl_mmc_load_image() RAW and FS boot modes are now ex
spl: if MMCSD_MODE_RAW fails, try MMCSD_MODE_FS
Since commit fd61d39970b9901217efc7536d9f3a61b4e1752a: 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: Guillaume 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: Nikita Kiryanov <nikita@compulab.co.il>
show more ...
|
#
7c4213f6 |
| 07-Dec-2015 |
Stephen Warren <swarren@nvidia.com> |
block: pass block dev not num to read/write/erase()
This will allow the implementation to make use of data in the block_dev structure beyond the base device number. This will be useful so that eMMC
block: pass block dev not num to read/write/erase()
This will allow the implementation to make use of data in the block_dev structure beyond the base device number. This will be useful so that eMMC block devices can encompass the HW partition ID rather than treating this out-of-band. Equally, the existence of the priv field is crying out for this patch to exist.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Tom Rini <trini@konsulko.com>
show more ...
|
#
5915517b |
| 05-Dec-2015 |
Eric Nelson <eric@nelint.com> |
spl: mmc: use block device number, not hard-coded 0
In order to support boot from multiple devices through board_boot_order, it's necessary to use the block number of a device.
The use of a hard-co
spl: mmc: use block device number, not hard-coded 0
In order to support boot from multiple devices through board_boot_order, it's necessary to use the block number of a device.
The use of a hard-coded 0 for the device number also creates a need to re-order block devices for use in SPL like this: http://git.denx.de/?p=u-boot.git;a=blob;f=board/freescale/mx6slevk/mx6slevk.c;hb=HEAD#l195
Signed-off-by: Eric Nelson <eric@nelint.com>
show more ...
|
#
b4857aa9 |
| 02-Dec-2015 |
Simon Glass <sjg@chromium.org> |
spl: mmc: Unify non/driver model spl_mmc_find_device()
It is risky to have two different functions with much the same code. Future authors may update one but not the other. It is hard to see which p
spl: mmc: Unify non/driver model spl_mmc_find_device()
It is risky to have two different functions with much the same code. Future authors may update one but not the other. It is hard to see which parts are the same and which are different.
Unify the functions and drop the differences that are not really needed.
Note that one puts() becomes printf() as Tom mentioned that this does not affect image size:
https://patchwork.ozlabs.org/patch/537276/
Note: It would be better to have an empty printf() and avoid the #ifdef for CONFIG_SPL_LIBCOMMON_SUPPORT.
Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Michal Simek <michal.simek@xilinx.com>
show more ...
|
#
99c7a51a |
| 02-Dec-2015 |
Simon Glass <sjg@chromium.org> |
spl: mmc: Rename 'mmc' variable to 'mmcp'
The 'p' suffix makes it more obvious that we are dealing with a pointer to a (pointer) value that will be returned to its caller.
Signed-off-by: Simon Glas
spl: mmc: Rename 'mmc' variable to 'mmcp'
The 'p' suffix makes it more obvious that we are dealing with a pointer to a (pointer) value that will be returned to its caller.
Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Nikita Kiryanov <nikita@compulab.co.il> Tested-by: Michal Simek <michal.simek@xilinx.com>
show more ...
|
#
d773a008 |
| 02-Dec-2015 |
Simon Glass <sjg@chromium.org> |
spl: mmc: Fix compiler warning with CONFIG_DM_MMC
Since commit 4188ba3 we get the following warning on rockchip boards:
common/spl/spl_mmc.c:31:24: warning: ‘mmc’ may be used uninitialized in this
spl: mmc: Fix compiler warning with CONFIG_DM_MMC
Since commit 4188ba3 we get the following warning on rockchip boards:
common/spl/spl_mmc.c:31:24: warning: ‘mmc’ may be used uninitialized in this function [-Wmaybe-uninitialized] count = mmc->block_dev.block_read(0, sector, 1, header); ^ common/spl/spl_mmc.c:251:14: note: ‘mmc’ was declared here struct mmc *mmc;
Correct this by move the variable init earlier.
Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Nikita Kiryanov <nikita@compulab.co.il>
show more ...
|
Revision tags: v2016.01-rc1 |
|
#
a1e56cf6 |
| 08-Nov-2015 |
Nikita Kiryanov <nikita@compulab.co.il> |
spl: mmc: add support for BOOT_DEVICE_MMC2
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
spl: mmc: add support for BOOT_DEVICE_MMC2
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: Nikita Kiryanov <nikita@compulab.co.il> Reviewed-by: Tom Rini <trini@konsulko.com>
show more ...
|
#
36afd451 |
| 08-Nov-2015 |
Nikita Kiryanov <nikita@compulab.co.il> |
spl: change return values of spl_*_load_image()
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 wheth
spl: change return values of spl_*_load_image()
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: Nikita 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: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
#
83cdf6fa |
| 08-Nov-2015 |
Nikita Kiryanov <nikita@compulab.co.il> |
spl: mmc: get rid of emmc boot code duplication
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_EMM
spl: mmc: get rid of emmc boot code duplication
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: 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: Tom Rini <trini@konsulko.com> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
show more ...
|
#
f52b7293 |
| 08-Nov-2015 |
Nikita Kiryanov <nikita@compulab.co.il> |
spl: mmc: move fs boot into its own function
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 fun
spl: mmc: move fs boot into its own function
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: 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: Tom Rini <trini@konsulko.com> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
show more ...
|
#
d074ebb9 |
| 08-Nov-2015 |
Nikita Kiryanov <nikita@compulab.co.il> |
spl: mmc: get rid of #ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION check
Implement defaults for the raw partition image loading so that the #ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION in s
spl: mmc: get rid of #ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION check
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: 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: Tom Rini <trini@konsulko.com> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
show more ...
|
#
339245b7 |
| 08-Nov-2015 |
Nikita Kiryanov <nikita@compulab.co.il> |
spl: mmc: remove #ifdef CONFIG_SPL_OS_BOOT check
Implement default versions of falcon mode functions to make the CONFIG_SPL_OS_BOOT check in spl_mmc_load_image() unnecessary, thus reducing its #ifde
spl: mmc: remove #ifdef CONFIG_SPL_OS_BOOT check
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: 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: 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: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
show more ...
|
#
4188ba32 |
| 08-Nov-2015 |
Nikita Kiryanov <nikita@compulab.co.il> |
spl: mmc: refactor device location code to its own function
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
spl: mmc: refactor device location code to its own function
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: 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: Tom Rini <trini@konsulko.com> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
show more ...
|
#
fd61d399 |
| 08-Nov-2015 |
Nikita Kiryanov <nikita@compulab.co.il> |
spl: mmc: add break statements in spl_mmc_load_image()
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 sta
spl: mmc: add break statements in spl_mmc_load_image()
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: 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: Tom Rini <trini@konsulko.com> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
show more ...
|
Revision tags: v2015.10, v2015.10-rc5, v2015.10-rc4, v2015.10-rc3, v2015.10-rc2, v2015.10-rc1 |
|
#
7ef4c45c |
| 30-Jul-2015 |
Gong Qianyu <Qianyu.Gong@freescale.com> |
spl: Fix compile warning for arm64
Make the cast explicit for "warning: cast to pointer from integer of different size".
Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
|
#
4bfcc54c |
| 20-Jul-2015 |
Stefan Roese <sr@denx.de> |
spl: spl_mmc: Add option to boot from a MMC partition with offset
This patch introduces the option to boot from a MMC card parition with an offset. This can be done by using both defines together:
spl: spl_mmc: Add option to boot from a MMC partition with offset
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: Stefan Roese <sr@denx.de> Cc: Luka Perkov <luka.perkov@sartura.hr> Cc: Dirk Eibach <eibach@gdsys.de> Cc: Tom Rini <trini@konsulko.com>
show more ...
|
Revision tags: v2015.07, v2015.07-rc3 |
|
#
dc3dedfe |
| 23-Jun-2015 |
Simon Glass <sjg@chromium.org> |
dm: mmc: Allow driver model to be used for MMC in SPL
Enable MMC using driver model in SPL for consistency with U-Boot proper.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
#
fdfa39d3 |
| 23-Jun-2015 |
Simon Glass <sjg@chromium.org> |
spl: Add debugging info for spl_mmc boot
Add a few messages to indicate progress and failure.
Signed-off-by: Simon Glass <sjg@chromium.org>
|