Commit Graph

120 Commits

Author SHA1 Message Date
Masahiro Yamada 70e6428d8c spl_nor: fix warning when compiled for 64bit target
Fix "warning: cast to pointer from integer of different size".

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-03-15 21:30:20 -04:00
Tom Rini 88033d737d Merge git://git.denx.de/u-boot-dm 2016-03-14 19:21:44 -04:00
Simon Glass 96debd1f0b 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>
2016-03-14 19:18:31 -04:00
Simon Glass f1dcee59a2 spl: Add an option to load a FIT containing U-Boot
This provides a way to load a FIT containing U-Boot and a selection of device
tree files. The board can select the correct device tree by probing the
hardware. Then U-Boot is started with the selected device tree.

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-03-14 19:18:30 -04:00
Simon Glass 3e8bd46950 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>
2016-03-14 15:34:50 -06:00
Simon Glass 4101f68792 dm: Drop the block_dev_desc_t typedef
Use 'struct' instead of a typdef. Also since 'struct block_dev_desc' is long
and causes 80-column violations, rename it to struct blk_desc.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
2016-03-14 15:34:50 -06:00
Guillaume GARDET 86a0df7328 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>
2016-02-19 09:31:37 -05:00
Stephen Warren 7c4213f6a5 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>
2016-01-13 21:05:18 -05:00
Albert ARIBAUD adc421e4ce arm: move gd handling outside of C code
As of gcc 5.2.1 for Thumb-1, it is not possible any
more to assign gd from C code, as gd is mapped to r9,
and r9 may now be saved in the prolog sequence, and
restored in the epilog sequence, of any C functions.

Therefore arch_setup_gd(), which is supposed to set
r9, may actually have no effect, causing U-Boot to
use a bad address to access GD.

Fix this by never calling arch_setup_gd() for ARM,
and instead setting r9 in arch/arm/lib/crt0.S, to
the value returned by board_init_f_alloc_reserve().

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Reviewed-by: Simon Glass <sjg@chromium.org>
2016-01-13 21:05:18 -05:00
Tom Rini 35065cdd94 Merge git://git.denx.de/u-boot-rockchip 2015-12-16 14:50:03 -05:00
Eric Nelson 5915517b7b 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>
2015-12-14 13:42:50 -05:00
Sjoerd Simons 4363de63a8 spl: use panic_str instead of panic
For a simple static string, use panic_str() which prevents calling
printf needlessly.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-12-13 17:07:30 -07:00
Simon Glass b4857aa901 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>
2015-12-05 18:22:34 -05:00
Simon Glass 99c7a51a24 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>
2015-12-05 18:22:33 -05:00
Simon Glass d773a008ee 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>
2015-12-05 18:22:33 -05:00
Nikita Kiryanov a1e56cf6d4 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>
2015-11-18 14:50:05 -05:00
Nikita Kiryanov 310c8466cf spl: announce boot devices
Now that we support alternative boot devices, it can sometimes be
unclear which boot devices was actually used. Provide a function to
announce which boot devices are attempted during boot.

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>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-11-18 14:50:04 -05:00
Nikita Kiryanov f101e4bd37 spl: add support for alternative boot device
Introduce spl_boot_list array, which defines a list of boot devices
that SPL will try before hanging. By default this list will consist
of only spl_boot_device(), but board_boot_order() can be overridden
by board code to populate the array with custom values.

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>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-11-18 14:50:03 -05:00
Nikita Kiryanov 5211b87e0c common: spl: move image load to its own function
Refactor spl image load code out of board_init_r and into its own
function. This is a preparation for supporting alternative boot
devices.

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>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2015-11-18 14:50:03 -05:00
Nikita Kiryanov 36afd45136 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>
2015-11-18 14:50:02 -05:00
Nikita Kiryanov 83cdf6faa6 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>
2015-11-18 14:50:02 -05:00
Nikita Kiryanov f52b729393 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>
2015-11-18 14:50:01 -05:00
Nikita Kiryanov d074ebb936 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>
2015-11-18 14:50:01 -05:00
Nikita Kiryanov 339245b70d 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>
2015-11-18 14:50:00 -05:00
Nikita Kiryanov 4188ba3202 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>
2015-11-18 14:50:00 -05:00
Nikita Kiryanov fd61d39970 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>
2015-11-18 14:49:59 -05:00
Nikita Kiryanov 483ab3dc80 spl: nand: remove code duplication
Remove code duplication in spl_nand_load_image().

No functional changes.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Acked-by: Scott Wood <scottwood@freescale.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
[trini: Add back cast to unsigned long of spl_image.load_addr]
Signed-off-by: Tom Rini <trini@konsulko.com>
2015-11-18 14:49:34 -05:00
Hans de Goede dcfcb8d49a malloc_simple: Add support for switching to DRAM heap
malloc_simple uses a part of the stack as heap, initially it uses
SYS_MALLOC_F_LEN bytes which typically is quite small as the initial
stacks sits in SRAM and we do not have that much SRAM to work with.

When DRAM becomes available we may switch the stack from SRAM to DRAM
to give use more room. This commit adds support for also switching to
a new bigger malloc_simple heap located in the new stack.

Note that this requires spl_init to be called before spl_relocate_stack_gd
which in practice means that spl_init must be called from board_init_f.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-10-20 18:40:27 +02:00
Hans de Goede 8656c4f76f spl: spl_relocate_stack_gd: Do not unnecessarily clear bss
spl_relocate_stack_gd only gets called from arch/arm/lib/crt0.S which
clears the bss directly after calling it, so there is no need to clear
it from spl_relocate_stack_gd.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-10-20 18:40:27 +02:00
Masahiro Yamada 0f9258228e of: clean up OF_CONTROL ifdef conditionals
We have flipped CONFIG_SPL_DISABLE_OF_CONTROL.  We have cleansing
devices, $(SPL_) and CONFIG_IS_ENABLED(), so we are ready to clear
away the ugly logic in include/fdtdec.h:

 #ifdef CONFIG_OF_CONTROL
 # if defined(CONFIG_SPL_BUILD) && !defined(SPL_OF_CONTROL)
 #  define OF_CONTROL 0
 # else
 #  define OF_CONTROL 1
 # endif
 #else
 # define OF_CONTROL 0
 #endif

Now CONFIG_IS_ENABLED(OF_CONTROL) is the substitute.  It refers to
CONFIG_OF_CONTROL for U-boot proper and CONFIG_SPL_OF_CONTROL for
SPL.

Also, we no longer have to cancel CONFIG_OF_CONTROL in
include/config_uncmd_spl.h and scripts/Makefile.spl.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
2015-08-18 13:46:05 -04:00
Masahiro Yamada dffb86e468 of: flip CONFIG_SPL_DISABLE_OF_CONTROL into CONFIG_SPL_OF_CONTROL
As we discussed a couple of times, negative CONFIG options make our
life difficult; CONFIG_SYS_NO_FLASH, CONFIG_SYS_DCACHE_OFF, ...
and here is another one.

Now, there are three boards enabling OF_CONTROL on SPL:
 - socfpga_arria5_defconfig
 - socfpga_cyclone5_defconfig
 - socfpga_socrates_defconfig

This commit adds CONFIG_SPL_OF_CONTROL for them and deletes
CONFIG_SPL_DISABLE_OF_CONTROL from the other boards to invert
the logic.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-08-18 13:46:04 -04:00
Gong Qianyu 7ef4c45c6e 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>
2015-08-12 20:47:56 -04:00
Stefan Roese 4bfcc54c0b 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>
2015-07-24 09:46:45 +02:00
Simon Glass aea3d40d05 spl: Add a debug string before the jump to U-Boot
As a debug option, add positive confirmation that SPL has completed
execution. This can help with diagnosing the location of unexpected hangs.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-07-21 17:39:29 -06:00
Simon Glass 070d00b8dc dm: spl: Allow device tree/driver model in board_init_f()
Add an spl_init() function that does basic init such that board_init_f() can
use simple malloc(), device tree and driver model. Each one is set up only
if enabled for SPL.

Note: We really should refactor SPL such that there is a single
board_init_f() and rename the existing weak board_init_f() functions
provided by boards, calling them from the single board_init_f().

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-07-21 17:39:28 -06:00
Simon Glass dc3dedfeb1 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>
2015-07-21 17:39:25 -06:00
Simon Glass fdfa39d3f2 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>
2015-07-21 17:39:24 -06:00
Paul Kocialkowski 3ae8f4c8ae spl: spl_mmc: MMC boot mode provisions checks
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: Paul Kocialkowski <contact@paulk.fr>
2015-06-18 16:11:42 -04:00
Paul Kocialkowski 1ec264695f spl: spl_mmc: Minor cosmetics
This switches some printf calls to puts and avoids a test repetition.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2015-06-18 16:11:42 -04:00
Paul Kocialkowski 3bc37b6d65 spl: spl_mmc: Error and count distinction
This introduces a distinction between return codes that are read bytes counts
and errors. Read bytes counts are erroneous when null (no data was read) while
errors are erroneous when non-null.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Tested-by: Tim Harvey <tharvey@gateworks.com>
2015-05-28 08:18:21 -04:00
Tim Harvey 9d3b565441 spl: spl_mmc: fix mmc Falcon mode regression
91199f4a5a broke mmc based Falcon mode.

The block_read function returns the number of blocks read thus the error
check needs to look for a return of 0 blocks read.

Cc: Paul Kocialkowski <contact@paulk.fr>
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Acked-by: Paul Kocialkowski <contact@paulk.fr>
2015-05-26 14:26:27 +02:00
Simon Glass ce49e79450 spl: Correct address in spl_relocate_stack_gd()
During the Kconfig conversion one of the changes was missed.
CONFIG_SPL_STACK_R should be CONFIG_SPL_STACK_R_ADDR since we want the
address.

Reported-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2015-05-14 06:57:23 -04:00
Paul Kocialkowski ecb301394b spl: spl_mmc: Partition raw boot mode for eMMC
This adds support for providing a partition number instead of a sector for eMMC.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2015-05-10 07:29:37 -04:00
Paul Kocialkowski 91199f4a5a spl: spl_mmc: Clearer structure in spl_mmc_load_image and cosmetics
This refactors spl_mmc_load_image to use a switch/case structure and easier
to understand spl_start_uboot checks. This also introduces some more automatic
fallback on the next mmc boot mode as long as it keeps failing.

Lines that go beyond 80 chars are also reduced by reducing the number of tabs.
Debug and error strings are refctored to match a common style.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
[trini: Fix a thinko in the SPL_EXT_SUPPORT + SPL_OS conversion, make part be
 __maybe_unused]
Signed-off-by: Tom Rini <trini@konsulko.com>
2015-05-10 07:27:19 -04:00
Tom Rini 3f6dcdb9cd Merge branch 'master' of git://git.denx.de/u-boot-fsl-qoriq 2015-04-24 13:43:24 -04:00
Scott Wood b2d5ac5985 armv8/ls2085aqds: NAND boot support
This adds NAND boot support for LS2085AQDS, using SPL framework.
Details of forming NAND image can be found in README.

Signed-off-by: Scott Wood <scottwood@freescale.com>
[York Sun: Remove +S from defconfig after commit 252ed872]
Signed-off-by: York Sun <yorksun@freescale.com>
2015-04-23 16:46:50 -07:00
Simon Glass f3d46bd658 dm: Init device tree as well as driver model in SPL
If enabled, make sure that the device tree is available in SPL before
setting up driver model.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-04-23 09:05:55 -06:00
Simon Glass 293f16b1e7 Correct malloc_limit value for pre-relocation malloc()
The limit is measured from the start of the malloc() area and is not an
absolute address. Correct this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-04-23 09:05:53 -06:00
Joe Hershberger bc0571fc10 net: cosmetic: Fix checkpatch.pl failures in net.c
Finish eliminating CamelCase from net.c and other failures

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-04-18 11:11:35 -06:00
Joe Hershberger d2eaec6006 net: Remove the bd* parameter from net stack functions
This value is not used by the network stack and is available in the
global data, so stop passing it around.  For the one legacy function
that still expects it (init op on old Ethernet drivers) pass in the
global pointer version directly to avoid changing that interface.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reported-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
(Trival fix to remove an unneeded variable declaration in 4xx_enet.c)
2015-04-18 11:11:11 -06:00