summaryrefslogtreecommitdiffstats
path: root/common/spl
Commit message (Collapse)AuthorAgeFilesLines
* spl: if MMCSD_MODE_RAW fails, try MMCSD_MODE_FS, if availableGuillaume GARDET2014-12-081-1/+2
| | | | | | | | | | In SPL MMC, boot modes are exclusive. So, if MMCSD_MODE_RAW fails, the board hangs. This patch allows to try MMCSD_MODE_FS then, if available. It has been tested on a pandaboard (rev. A3). Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr> Cc: Tom Rini <trini@ti.com>
* spl: MMC U-Boot image load from raw partitionPaul Kocialkowski2014-12-081-4/+26
| | | | | | | | | | | | | Raw images of U-Boot can be stored inside MMC partitions, so it makes sense to read the partition table, looking for a partition number instead of using a fixed sector address. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Reviewed-by: Tom Rini <trini@ti.com> [trini: Only add mmc_load_image_raw_partition() when CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION to avoid warning, add missing conversion in spl_mmc_load_image()] Signed-off-by: Tom Rini <trini@ti.com>
* MMC SD fs boot partition config coding style and proper descriptionPaul Kocialkowski2014-12-041-4/+4
| | | | | | | | | | | CONFIG_SYS_MMC_SD_FS_BOOT_PARTITION ought to be called CONFIG_SYS_MMCSD_FS_BOOT_PARTITION to keep it consistent with other config options such as: CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR. In addition, it is not related to raw mode booting but to fs mode instead. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Reviewed-by: Tom Rini <trini@ti.com>
* spl: Fix SPL EXT supportGuillaume GARDET2014-11-261-5/+5
| | | | | | | | | | | | Commit 9f12cd0e062614e19734b2ab37842d387457c5e5 has broken SPL EXT support. This patch update error code check to get SPL EXT support working again. Tested on a Pandaboard (rev. A3). Reviewed-by: Suriyan Ramasami <suriyan.r@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr> Cc: Tom Rini <trini@ti.com>
* Merge git://git.denx.de/u-boot-dmTom Rini2014-11-241-1/+15
|\ | | | | | | | | | | | | Conflicts: drivers/serial/serial-uclass.c Signed-off-by: Tom Rini <trini@ti.com>
| * dm: spl: Allow driver model to be usedSimon Glass2014-11-211-0/+5
| | | | | | | | | | | | | | | | When enabled, set up driver model for SPL. This allows SPL to use the same drivers as the main U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Tom Rini <trini@ti.com>
| * dm: spl: Make simple malloc() available when enabledSimon Glass2014-11-211-1/+10
| | | | | | | | | | | | | | Set up the simple malloc() implementation when requested, in preference to the full malloc(). Signed-off-by: Simon Glass <sjg@chromium.org>
* | ext4: Prepare API change for files greater than 2GBSuriyan Ramasami2014-11-231-9/+9
| | | | | | | | | | | | | | | | | | Change the internal EXT4 functions to use loff_t for offsets. Signed-off-by: Suriyan Ramasami <suriyan.r@gmail.com> Acked-by: Simon Glass <sjg@chromium.org> [trini: Update common/spl/spl_ext.c] Signed-off-by: Tom Rini <trini@ti.com>
* | spl: Change debug to printf for "Unsupported boot-device"Stefan Roese2014-11-231-1/+3
|/ | | | | | | | | | | | | | We had the problem on an AM33xx platform, that SPL detected an unsupported boot-device. But since this message is a debug message it took a bit of time to really know, where the hangup in SPL resulted from. So let's change this debug message to a printf and also print the detected boot-device that is not supported. This makes debugging of such cases much easier. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Tom Rini <trini@ti.com> Acked-by: Heiko Schocher <hs@denx.de>
* spl, nand: add option to boot raw u-boot.bin image onlyHeiko Schocher2014-11-172-5/+23
| | | | | | | | | | | enable to boot only a raw u-boot.bin image from nand with the CONFIG_SPL_NAND_RAW_ONLY define. This option saves space on boards where spl space is low. Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com> Reviewed-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
* spl: move comment to the right placeAndreas Bießmann2014-10-271-1/+1
| | | | | | | Commit ae83d882f5fdf7aa7c5aec09cfafb593153c25d6 moved the fixed size mentioned in the comment but missed the comment. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
* spl: do not hang in spl_register_fat_device but return error value. It ↵Guillaume GARDET2014-10-271-1/+1
| | | | | | | | | | | allows to use both CONFIG_SPL_FAT_SUPPORT and CONFIG_SPL_EXT_SUPPORT. Do not hang in spl_register_fat_device but return an error value. It allows to use both CONFIG_SPL_FAT_SUPPORT and CONFIG_SPL_EXT_SUPPORT. If FAT load fails, then EXT load is tried. Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr> Cc: Tom Rini <trini@ti.com>
* spl: Add EXT support to SPLGuillaume GARDET2014-10-273-2/+156
| | | | | | | | Add EXT filesystem support to SPL. Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr> [trini: Fix a warning and checkpatch problems] Signed-off-by: Tom Rini <trini@ti.com>
* Rename some defines containing FAT in their name to be filesystem genericGuillaume GARDET2014-10-274-9/+9
| | | | | | | | | | | Rename some defines containing FAT in their name to be filesystem generic: MMCSD_MODE_FAT => MMCSD_MODE_FS CONFIG_SPL_FAT_LOAD_ARGS_NAME => CONFIG_SPL_FS_LOAD_ARGS_NAME CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME => CONFIG_SPL_FS_LOAD_PAYLOAD_NAME CONFIG_SYS_MMC_SD_FAT_BOOT_PARTITION => CONFIG_SYS_MMC_SD_FS_BOOT_PARTITION Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr> Cc: Tom Rini <trini@ti.com>
* common: spl_sata: perform SCSI scan before getting deviceRoger Quadros2014-10-101-0/+1
| | | | | | | | At least on OMAP, init_sata() no longer performs scsi_scan() so we must do it explicitly here. Cc: Dan Murphy <dmurphy@ti.com> Signed-off-by: Roger Quadros <rogerq@ti.com>
* Fix a few printf argument verification warningsVasili Galka2014-09-151-1/+1
| | | | | | | | | The parameters of size_t type shall be formatted using "%zu" and not using "%d". Precision argument for the "%.*s" parameters shall be of int type. Signed-off-by: Vasili Galka <vvv444@gmail.com>
* spl: nand: read only in the size of image_header on the first accessMasahiro Yamada2014-07-221-3/+3
| | | | | | | | | | | For the same reason as in commit 50c8d66d, all the remaining CONFIG_SYS_NAND_PAGE_SIZE in common/spl/spl_nand.c can be replaced with sizeof(*header). Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Tim Harvey <tharvey@gateworks.com> Cc: Scott Wood <scottwood@freescale.com> Cc: Stefano Babic <sbabic@denx.de>
* nand: remove CONFIG_SYS_NAND_PAGE_SIZETim Harvey2014-05-151-1/+1
| | | | | | | | | | We only need to read in the size of struct image_header and thus don't need to know the page size of the nand device. Cc: Scott Wood <scottwood@freescale.com> Signed-off-by: Tim Harvey <tharvey@gateworks.com> Acked-by: Stefano Babic <sbabic@denx.de> Acked-by: Scott Wood <scottwood@freescale.com>
* spl_mmc/CONFIG_SPL_OS_BOOT: Allow environment to determine what to bootTom Rini2014-04-171-0/+27
| | | | | | | | We add two new environment variables, falcon_args_file and falcon_image_file, which when set will override the compiled in default values for falcon mode. Signed-off-by: Tom Rini <trini@ti.com>
* common: spl: Add spl sata boot supportDan Murphy2014-02-193-0/+55
| | | | | | | | Add spl_sata to read a fat partition from a bootable SATA drive. Signed-off-by: Dan Murphy <dmurphy@ti.com> Reviewed-by: Roger Quadros <rogerq@ti.com>
* SPL: Add CONFIG_SUPPORT_EMMC_BOOT support to CONFIG_SPL_FRAMEWORKTom Rini2014-02-071-0/+24
| | | | | | | | | | | We use the switch CONFIG_SUPPORT_EMMC_BOOT today to enable some additional features of the eMMC boot partitions. Add support for being told that we have booted from one of these partitions to the spl framework and implement this on TI OMAP/related. Cc: Pantelis Antoniou <panto@antoniou-consulting.com> Signed-off-by: Tom Rini <trini@ti.com> Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
* spl: common: Support for USB MSD FAT image loadingDan Murphy2014-01-244-8/+72
| | | | | | | | Add SPL support to be able to detect a USB Mass Storage device connected to a USB host. Once a USB Mass storage device is detected the SPL will load the u-boot.img from a FAT partition to target address. Signed-off-by: Dan Murphy <dmurphy@ti.com>
* spl: common: Move FAT funcs to a common fileDan Murphy2014-01-243-62/+103
| | | | | | Move the FAT functions to a common location for reuse. Signed-off-by: Dan Murphy <dmurphy@ti.com>
* common: convert makefiles to Kbuild styleMasahiro Yamada2013-10-311-29/+7
| | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* spl_mmc: only call printf or puts with CONFIG_SPL_LIBCOMMON_SUPPORTPaul Burton2013-09-171-0/+16
| | | | | | | If we don't have CONFIG_SPL_LIBCOMMON_SUPPORT defined then stdio functions are unavailable & calling them will cause a link failure. Signed-off-by: Paul Burton <paul.burton@imgtec.com>
* spl: remove unnecessary (& ARM specific) include of asm/utils.hPaul Burton2013-09-171-1/+0
| | | | | | | ARM is the only architecture which includes this header and nothing in spl_mmc.c makes use of it. Remove the include. Signed-off-by: Paul Burton <paul.burton@imgtec.com>
* Merge branch 'master' of git://88.191.163.10/u-boot-armTom Rini2013-08-181-0/+4
|\ | | | | | | | | | | | | | | | | | | Fixup an easy conflict over adding the clk_get prototype and USB_OTG defines for am33xx having moved. Conflicts: arch/arm/include/asm/arch-am33xx/hardware.h Signed-off-by: Tom Rini <trini@ti.com>
| * spl_mmc.c: Detect missing kernel image in RAW MMCTom Rini2013-07-261-0/+4
| | | | | | | | | | | | | | | | | | Currently, we assume that if we can read from MMC correctly, we have found a valid image. This is not the case as an empty area will read just fine. Add a check for a valid IH_MAGIC. Signed-off-by: Tom Rini <trini@ti.com> Reviewed-by: Peter Korsgaard <jacmet@sunsite.dk>
* | SPL: Limit image name print lengthTaras Kondratiuk2013-08-161-2/+3
|/ | | | | | | | | If image name is longer than 32 bytes, then it will be truncated. This will remove '\0' at the end of the line, so printf will go out of string limit. Signed-off-by: Taras Kondratiuk <taras@ti.com> Reviewed-by: Tom Rini <trini@ti.com>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-248-115/+8
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* spl_mmc: add Falcon mode support for raw variantPeter Korsgaard2013-06-071-0/+18
| | | | | | | | | | If Falcon mode support is enabled (and the system isn't directed into booting u-boot), it will instead try to load kernel from sector CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR and CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS of kernel argument parameters starting from sector CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR. Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
* spl_mmc: mmc_load_image_raw(): Add sector argumentPeter Korsgaard2013-06-071-9/+6
| | | | | | So we can use it for falcon mode as well. Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
* spl_mmc: add Falcon mode support for FAT variantPeter Korsgaard2013-06-071-0/+21
| | | | | | | | | If Falcon mode support is enabled (and the system isn't directed into booting u-boot), it will instead try to load kernel from CONFIG_SPL_FAT_LOAD_KERNEL_NAME file and kernel argument parameters from CONFIG_SPL_FAT_LOAD_ARGS_NAME, both from the same partition as u-boot. Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
* spl_mmc: mmc_load_image_fat(): Add filename argument and move fat init outPeter Korsgaard2013-06-071-14/+13
| | | | | | So we can use it for falcon mode as well. Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
* spl_mmc: return error from mmc_load_image_{raw, fat} rather than hangingPeter Korsgaard2013-06-071-10/+14
| | | | | | So we can instead fallback to doing something else on errors. Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
* Merge branch 'u-boot/master' into 'u-boot-arm/master'Albert ARIBAUD2013-05-302-0/+138
|\ | | | | | | | | | | Conflicts: common/cmd_fpga.c drivers/usb/host/ohci-at91.c
| * drivers/mmc: move spl_mmc.c to common/splYing Zhang2013-05-152-0/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mpc85xx repuires a special layout on the memory device that is connected to the eSDHC controller interface. But the file spl_mmc.c didn't handle this specfic case, there needs a special treatmen, in the powerpc drictory. So, there is no longer to keep spl_mmc.c on mpc85xx, CONFIG_SPL_FRAMEWORK is not set. When CONFIG_SPL_MMC_SUPPORT is set and CONFIG_SPL_FRAMEWORK is not set, there was an error in drivers/mmc/spl_mmc.c: drivers/mmc/libmmc.o:(.got2+0x8): undefined reference to `spl_image'. Now, the solution is to move the file "spl_mmc.c" to directory "common/spl". Signed-off-by: Ying Zhang <b40530@freescale.com>
* | Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'Albert ARIBAUD2013-05-111-7/+3
|\ \ | |/ |/|
| * ARM: OMAP: Cleanup boot parameters usageSRICHARAN R2013-05-101-7/+3
| | | | | | | | | | | | | | | | | | | | | | The boot parameters are read from individual variables assigned for each of them. This been corrected and now they are stored as a part of the global data 'gd' structure. So read them from 'gd' instead. Signed-off-by: Sricharan R <r.sricharan@ti.com> [trini: Add igep0033 hunk] Signed-off-by: Tom Rini <trini@ti.com>
* | lib: consolidate hang()Andreas Bießmann2013-05-011-7/+0
|/ | | | | | | | | Delete all occurrences of hang() and provide a generic function. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com> Acked-by: Albert ARIBAUD <albert.u.boot@aribaud.net> [trini: Modify check around puts() in hang.c slightly] Signed-off-by: Tom Rini <trini@ti.com>
* SPL: ONENAND: Support SPL to boot u-boot from OneNAND.Enric Balletbo i Serra2013-03-113-0/+53
| | | | | | | | | | This patch will allow use SPL to boot an u-boot from the OneNAND. Tested with IGEPv2 board with a OneNAND from Numonyx Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com> [trini: Add <spl.h> hunk to fix warning] Signed-off-by: Tom Rini <trini@ti.com>
* spl: support for booting via usbethIlya Yanok2013-02-181-0/+5
| | | | | | | | | In case of usbeth booting just call net_load_image("usb_ether"). This patch also adds CONFIG_SPL_USBETH_SUPPORT and CONFIG_SPL_MUSB_NEW_SUPPORT config options to enable linking of SPL against USB gagdet support and new MUSB driver resp. Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
* SPL: Port SPL framework to powerpcStefan Roese2012-12-051-0/+16
| | | | | | | | | | | | | This patch enables the SPL framework to be used on powerpc platforms and not only ARM. timer_init() does not exist on PPC systems. The timer (decrementer) is initialized and enabled in interrupt_init() here. And currently interrupt_init() is called after relocation to SDRAM. Since the only powerpc SPL implementation (a3m071) doesn't need a timer, let's remove this timer_init() call for PPC systems. Signed-off-by: Stefan Roese <sr@denx.de>
* SPL: make jump_to_image_no_args a weak symbolAllen Martin2012-10-291-4/+4
| | | | | | | | | | | | | | Change jump_to_image_no_args() to a weak symbol to allow override by SoC specific code. This is required by tegra because the SPL runs on a different CPU from the image it is loading, so tegra specific initialization is required to start the host CPU. Pass in spl_image as a parameter for the same reason. Signed-off-by: Allen Martin <amartin@nvidia.com> Acked-by: Tom Rini <trini@ti.com> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
* SPL: Remove setting GD_FLG_RELOC in preloader_console_init()Tom Rini2012-10-151-1/+0
| | | | | | | We have not strictly speaking relocated at this point, do not claim that we have. This is not required for output. Signed-off-by: Tom Rini <trini@ti.com>
* OMAP: networking support for SPLIlya Yanok2012-10-013-0/+62
| | | | | | | | | | | | | | This patch adds support for networking in SPL. Some devices are capable of loading SPL via network so it makes sense to load the main U-Boot binary via network too. This patch tries to use existing network code as much as possible. Unfortunately, it depends on environment which in turn depends on other code so SPL size is increased significantly. No effort was done to decouple network code and environment so far. Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Tom Rini <trini@ti.com>
* OMAP: spl: call timer_init() from SPLIlya Yanok2012-10-011-0/+2
| | | | | | | We need to initialize timer properly, otherwise all delays inside SPL will be wrong. Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
* SPL: Add support for loading image from ram in SPL.Pavel Machek2012-09-271-0/+22
| | | | | Signed-off-by: Pavel Machek <pavel@denx.de> Signed-off-by: Tom Rini <trini@ti.com>
* SPL: Rework how we inform about un-headered imagesTom Rini2012-09-271-5/+2
| | | | | | | | | | | | First, remove the puts from the case where we don't have an mkimage header as this is somewhat common and intentional for no-arg target images. Second, rework the final switch statement in board_init_r to, in the case of !CONFIG_SPL_OS_BOOT be only about doing debug prints about if we know what the magic is or not (the CONFIG_SPL_OS_BOOT case is unchanged). Then we call jump_to_image_no_args(). This gives us the same behavior as before but with slightly smaller code. Signed-off-by: Tom Rini <trini@ti.com>
* SPL: Make un-supported boot device puts a debug insteadTom Rini2012-09-271-3/+1
| | | | Signed-off-by: Tom Rini <trini@ti.com>
OpenPOWER on IntegriCloud