- Enable multi-image support to generate bootstream, sd-card and 2nd stage
images.
- Handle pin-mux in lowlevel.c only.
- Use fine-tuned memory setup from u-boot.
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The EMI pins are documented in the reference manual as using value 0 for both
1.8V and 2.5V. Value 1 is reserved.
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
- enable multiimage support to generate bootstream, sd-card and 2nd
stage images
- Enable new defaultenv support
- Enable more features
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The Freescale MXS SoCs have a multi staged boot process which needs
different images composed out of different binaries. The ROM executes
a so called bootstream which contains multiple executables. The first
one is executed in SRAM and the purpose of this binary is to setup
the internal PMIC and the SDRAM. The second image is usually the
bootloader itself. In case of barebox the bootstream is composed
out of the self extracting barebox image (pblx) and the prepare
stage for setting up the SDRAM.
The bootstream image itself is useful for USB boot, but for booting from
SD cards or NAND a BCB header has to be prepended to the image. In case
of SD boot the image has the .mxssd file extension in barebox.
Since the bootstream images are encrypted they are not suitable for
2nd stage execution. For this purpose the 2nd stage images are generated.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
U-Boot has code to replace the infamous Freescale bootlet code.
This patch adds this for barebox with some changes:
- Separate it more into mx23/mx28 functions instead of mxs functions
with #ifdefs for the actual SoC
- Add mx2x_power_init_battery_input() power entry point for boards
which have a regulated input on the battery pin to supply the board.
- Export more functions to be more flexible when boards need non standard
setup.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This is directly taken from the rockbox projects sbloader tool,
just renamed to mxs-usb-loader to avoid confusion with bareboxes
several different image tools.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This is copied from U-Boot v2014.10 and modified for use with
barebox:
- Add a main() function to make it a standalone tool
- Add option to pass in the prepare stage and bootloader
image as options. If the config file contains @PREP@ or
@BOOTLOADER@ the string will be replaced with the actual
image file passed via the -p and -b options.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Now that we have printf support in the PBL we can use it right
after setup_c(). Add some debug messages to the early PBL code
to make it more clear what is happening there.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
pr_debug can now be used right after setup_c(), so add some debug
messages to the early startup code to make it a bit more clear what
is happening there.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
To make it possible to call the pr_* functions very early before
malloc is initialized test if malloc is available before using
it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This adds simple console support to the PBL which makes it
possible to print more complex messages in the PBL than just
strings or hex numbers. For now puts_ll is used to print the
messages, so it depends on CONFIG_DEBUG_LL which makes it
more a debugging option. However, this could be extended later
to get regular output from the PBL if desired.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
To be independent of the _ctype array. This makes it possible
to add printf support to the PBL without adding _ctype aswell.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
panic() is not really a printf like function, so move it to common/misc.c.
This is done because we want to have printf support in the PBL, but PBL
has it's own panic() implementation.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
vsprintf needs strnlen, so in oder to add console support to
the PBL we need a strnlen implementation.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
We do not have a root partition in spi flash any more.
Adapt comment.
Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Fixes an error during doc generation that leads to the
code block being missing in the resulting docs.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The current iocsr-config-cyclone5.c is actually board specific, although the
file name suggests otherwise.
As the file was generated for the SoCkit, move it there and add a new one
for the socrates.
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>