summaryrefslogtreecommitdiff
path: root/common/spl
AgeCommit message (Collapse)Author
2015-02-17Merge branch 'master' of http://git.denx.de/u-boot-sunxiTom Rini
2015-02-16spl, spl_nor: fix compiler warningHeiko Schocher
executing "tools/buildman/buildman mpc5xx" drops this warning: common/spl/spl_nor.c: In function 'spl_nor_load_image': common/spl/spl_nor.c:26:10: warning: assignment discards 'const' qualifier from pointer target type [enabled by default] fix this. Signed-off-by: Heiko Schocher <hs@denx.de>
2015-02-16arm: spl: Provide for a board-specific loaderSimon Glass
Some boards have a special way of loading U-Boot that does not fit with the existing SPL code. For example sunxi uses an 'FEL' mode where U-Boot is loaded over USB. Add a CONFIG option and boot mode for this. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Siarhei Siamashka <siarhei.siamashka@gmail.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-01-28spl: Change printf to puts for "Unsupported boot-device"Stefan Roese
Microblaze currently doesn't use printf in SPL. So this one line was the only reference to it and resulted in the printf functionality to be pulled in. Exceeding the 4k size limit. Lets change the printf back to puts so that Microblaze is fixed again. The only drawback is that the detected boot-device number will not be printed. But this message alone should be helpful enough to get an idea where the boot process is broken. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Tom Rini <trini@ti.com> Cc: Michal Simek <michal.simek@xilinx.com> Acked-by: Michal Simek <michal.simek@xilinx.com>
2015-01-14spl: spl_nor: surround Linux-load code with #ifdef CONFIG_SPL_OS_BOOTMasahiro Yamada
If CONFIG_SPL_NOR_SUPPORT is defined, spl_nor_load_image() requires spl_start_uboot(), CONFIG_SYS_OS_BASE, CONFIG_SYS_SPL_ARGS_ADDR, CONFIG_SYS_FDT_BASE to be defined even if users just want to run U-Boot, not Linux. This is inconvenient. This patch is following the codying style of common/spl/spl_nand.c. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2015-01-06Merge branch 'master' of git://git.denx.de/u-boot-mmcTom Rini
2015-01-06spl: mmc: Fix raw boot mode (related to commit ↵Guillaume GARDET
4c5bbc2328a24f5e1ee990c9a9527e48e5fb3b5f) As reported by Robert Nelson, commit 4c5bbc2328a24f5e1ee990c9a9527e48e5fb3b5f may break MMC RAW boot mode. This patch fixes the check path to fix MMC Raw boot mode. Tested raw boot mode and FS boot mode on a pandaboard (rev. A3). Reported-by: Robert Nelson <robertcnelson@gmail.com> Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr> Cc: Tom Rini <trini@ti.com> Cc: Robert Nelson <robertcnelson@gmail.com> Tested-by: Robert Nelson <robertcnelson@gmail.com>
2015-01-05spl_sata.c: Add <scsi.h>Tom Rini
We need <scsi.h> for scsi_scan(). Signed-off-by: Tom Rini <trini@ti.com>
2014-12-08spl: if MMCSD_MODE_RAW fails, try MMCSD_MODE_FS, if availableGuillaume GARDET
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>
2014-12-08spl: MMC U-Boot image load from raw partitionPaul Kocialkowski
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>
2014-12-04MMC SD fs boot partition config coding style and proper descriptionPaul Kocialkowski
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>
2014-11-26spl: Fix SPL EXT supportGuillaume GARDET
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>
2014-11-24Merge git://git.denx.de/u-boot-dmTom Rini
Conflicts: drivers/serial/serial-uclass.c Signed-off-by: Tom Rini <trini@ti.com>
2014-11-23ext4: Prepare API change for files greater than 2GBSuriyan Ramasami
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>
2014-11-23spl: Change debug to printf for "Unsupported boot-device"Stefan Roese
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>
2014-11-21dm: spl: Allow driver model to be usedSimon Glass
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>
2014-11-21dm: spl: Make simple malloc() available when enabledSimon Glass
Set up the simple malloc() implementation when requested, in preference to the full malloc(). Signed-off-by: Simon Glass <sjg@chromium.org>
2014-11-17spl, nand: add option to boot raw u-boot.bin image onlyHeiko Schocher
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>
2014-10-27spl: move comment to the right placeAndreas Bießmann
Commit ae83d882f5fdf7aa7c5aec09cfafb593153c25d6 moved the fixed size mentioned in the comment but missed the comment. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2014-10-27spl: do not hang in spl_register_fat_device but return error value. It ↵Guillaume GARDET
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>
2014-10-27spl: Add EXT support to SPLGuillaume GARDET
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>
2014-10-27Rename some defines containing FAT in their name to be filesystem genericGuillaume GARDET
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>
2014-10-10common: spl_sata: perform SCSI scan before getting deviceRoger Quadros
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>
2014-09-15Fix a few printf argument verification warningsVasili Galka
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>
2014-07-22spl: nand: read only in the size of image_header on the first accessMasahiro Yamada
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>
2014-05-15nand: remove CONFIG_SYS_NAND_PAGE_SIZETim Harvey
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>
2014-04-17spl_mmc/CONFIG_SPL_OS_BOOT: Allow environment to determine what to bootTom Rini
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>
2014-02-19common: spl: Add spl sata boot supportDan Murphy
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>
2014-02-07SPL: Add CONFIG_SUPPORT_EMMC_BOOT support to CONFIG_SPL_FRAMEWORKTom Rini
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>
2014-01-24spl: common: Support for USB MSD FAT image loadingDan Murphy
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>
2014-01-24spl: common: Move FAT funcs to a common fileDan Murphy
Move the FAT functions to a common location for reuse. Signed-off-by: Dan Murphy <dmurphy@ti.com>
2013-10-31common: convert makefiles to Kbuild styleMasahiro Yamada
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2013-09-17spl_mmc: only call printf or puts with CONFIG_SPL_LIBCOMMON_SUPPORTPaul Burton
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>
2013-09-17spl: remove unnecessary (& ARM specific) include of asm/utils.hPaul Burton
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>
2013-08-18Merge branch 'master' of git://88.191.163.10/u-boot-armTom Rini
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>
2013-08-16SPL: Limit image name print lengthTaras Kondratiuk
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>
2013-07-26spl_mmc.c: Detect missing kernel image in RAW MMCTom Rini
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>
2013-07-24Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
2013-06-07spl_mmc: add Falcon mode support for raw variantPeter Korsgaard
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>
2013-06-07spl_mmc: mmc_load_image_raw(): Add sector argumentPeter Korsgaard
So we can use it for falcon mode as well. Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
2013-06-07spl_mmc: add Falcon mode support for FAT variantPeter Korsgaard
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>
2013-06-07spl_mmc: mmc_load_image_fat(): Add filename argument and move fat init outPeter Korsgaard
So we can use it for falcon mode as well. Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
2013-06-07spl_mmc: return error from mmc_load_image_{raw, fat} rather than hangingPeter Korsgaard
So we can instead fallback to doing something else on errors. Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
2013-05-30Merge branch 'u-boot/master' into 'u-boot-arm/master'Albert ARIBAUD
Conflicts: common/cmd_fpga.c drivers/usb/host/ohci-at91.c
2013-05-15drivers/mmc: move spl_mmc.c to common/splYing Zhang
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>
2013-05-11Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'Albert ARIBAUD
2013-05-10ARM: OMAP: Cleanup boot parameters usageSRICHARAN R
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>
2013-05-01lib: consolidate hang()Andreas Bießmann
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>
2013-03-11SPL: ONENAND: Support SPL to boot u-boot from OneNAND.Enric Balletbo i Serra
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>
2013-02-18spl: support for booting via usbethIlya Yanok
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>