| Age | Commit message (Collapse) | Author |
|
Some platforms (tested on mpc85xx, mpc86xx) use global data before calling
function baord_inti_f(). The data should not be cleared later. Any arch
which uses global data in generic board board_init_f() should define
CONFIG_SYS_GENERIC_GLOBAL_DATA.
Signed-off-by: York Sun <[email protected]>
CC: Scott Wood <[email protected]>
CC: Simon Glass <[email protected]>
CC: Albert ARIBAUD <[email protected]>
Acked-by: Simon Glass <[email protected]>
|
|
We say we have an XIP (in this case, image loaded at desired execution
address) when the image header has been offset in the load. It's
possible that in some cases executing the header is non-fatal but that's
not true in many other cases.
Signed-off-by: Tom Rini <[email protected]>
|
|
console_buffer array is defined to be CONFIG_SYS_CBSIZE + 1 long,
whereas the_command array only CONFIG_SYS_CBSIZE long. Subsequent
use of strcpy(the_command, console_buffer) will write final \0
terminating byte outside the_command array when entering a command
of max length.
Signed-off-by: Kristian Otnes <kotnes <at> cisco <dot> com>
|
|
The command "time" shows the execution time of the command given
to the argument, like this:
time: 45.293 seconds, 45293 ticks
Since we adopted CONFIG_SYS_HZ = 1000 for all boards,
we always have a simple formula: "1 tick = 0.0001 second".
Showing ticks looks almost redundant.
Signed-off-by: Masahiro Yamada <[email protected]>
|
|
gd->bd->bi_baudrate is a copy of gd->baudrate.
Since baudrate is a common feature for all architectures,
keep gd->baudrate only.
It is true that bi_baudrate was passed to the kernel in that structure
but it was a long time ago.
Signed-off-by: Masahiro Yamada <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Wolfgang Denk <[email protected]>
Cc: Heiko Schocher <[email protected]>
Acked-by: Michal Simek <[email protected]> (For microblaze)
|
|
|
|
In the case where an environment variable spans multiple lines, we should
use run_command_list() so that all lines are executed. This shold be
backwards compatible with existing behaviour for existing scripts.
Signed-off-by: Simon Glass <[email protected]>
|
|
Adjust the code for these commands so that they work on sandbox.
Signed-off-by: Simon Glass <[email protected]>
(Adjusted to fix minor merge comflict, when applied)
Change-Id: I987dee6194cd5c83f82604caf894fc85e4eb71a8
|
|
Conflicts:
drivers/net/Makefile
(trivial merge)
|
|
This patch contains an implementation of the fastboot protocol on the
device side and documentation. This is based on USB download gadget
infrastructure. The fastboot function implements the getvar, reboot,
download and reboot commands. What is missing is the flash handling i.e.
writting the image to media.
v3 (Rob Herring):
This is based on http://patchwork.ozlabs.org/patch/126798/ with the
following changes:
- Rebase to current mainline and updates for current gadget API
- Use SPDX identifiers for licenses
- Traced the history and added missing copyright to cmd_fastboot.c
- Use load_addr/load_size for transfer buffer
- Allow vendor strings to be optional
- Set vendor/product ID from config defines
- Allow Ctrl-C to exit fastboot mode
v4:
- Major re-write to use the USB download gadget. Consolidated function
code to a single file.
- Moved globals into single struct.
- Use puts and putc as appropriate.
- Added CONFIG_USB_FASTBOOT_BUF_ADDR and CONFIG_USB_FASTBOOT_BUF_SIZE to
set the fastboot transfer buffer.
v5:
- Add CONFIG option documentation to README
- Rebase using new downloader registration
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Signed-off-by: Rob Herring <[email protected]>
|
|
This patch adds support for the Android boot-image format. The header
file is from the Android project and got slightly alterted so the struct +
its defines are not generic but have something like a namespace. The
header file is from bootloader/legacy/include/boot/bootimg.h. The header
parsing has been written from scratch and I looked at
bootloader/legacy/usbloader/usbloader.c for some details.
The image contains the physical address (load address) of the kernel and
ramdisk. This address is considered only for the kernel image.
The "second image" defined in the image header is currently not
supported. I haven't found anything that is creating this.
v3 (Rob Herring):
This is based on http://patchwork.ozlabs.org/patch/126797/ with the
following changes:
- Rebased to current mainline
- Moved android image handling to separate functions in
common/image-android.c
- s/u8/char/ in header to fix string function warnings
- Use SPDX identifiers for licenses
- Cleaned-up file source information:
android_image.h is from file include/boot/bootimg.h in repository:
https://android.googlesource.com/platform/bootable/bootloader/legacy
The git commit hash is 4205b865141ff2e255fe1d3bd16de18e217ef06a
usbloader.c would be from the same commit, but it does not appear
to have been used for any actual code.
v4:
- s/andriod/android/
- Use a separate flag ep_found to track if the entry point has been set
rather than using a magic value.
Cc: Wolfgang Denk <[email protected]>
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Signed-off-by: Rob Herring <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
Reviewed-by: Lukasz Majewski <[email protected]>
|
|
Allow an optional devtype parameter to the ums command, which specifies
the type of the device to be exported. This could allow exporting a SATA
or even another USB device.
Cc: Lukasz Majewski <[email protected]>
Signed-off-by: Stephen Warren <[email protected]>
Acked-by: Przemyslaw Marczak <[email protected]>
|
|
It's easier to assign values to the variables inside an if statement body
if the assignment and declaration are separate.
Cc: Lukasz Majewski <[email protected]>
Signed-off-by: Stephen Warren <[email protected]>
Acked-by: Przemyslaw Marczak <[email protected]>
|
|
get_device() is a generic routine that will support any type of block
device. Use this instead of the type-specific find_mmc_device(), for
future flexibility.
Cc: Lukasz Majewski <[email protected]>
Signed-off-by: Stephen Warren <[email protected]>
Acked-by: Przemyslaw Marczak <[email protected]>
|
|
There's nothing Samsung-/board-specfic about the implementation of
ums_init(). Move the code into cmd_usb_mass_storage.c, so that it can
be shared by any user of that command.
Cc: Lukasz Majewski <[email protected]>
Signed-off-by: Stephen Warren <[email protected]>
Acked-by: Przemyslaw Marczak <[email protected]>
|
|
Without this, if g_dnl_register() fails, the UMS code continues on
blindly and crashes. This fix makes it simply print an error message
instead.
Signed-off-by: Stephen Warren <[email protected]>
|
|
Preprocessor definitions and hardcoded implementation selection in
g_dnl core were replaced by a linker list made of (usb_function_name,
bind_callback) pairs.
Signed-off-by: Mateusz Zalega <[email protected]>
Acked-by: Lukasz Majewski <[email protected]>
Acked-by: Marek Vasut <[email protected]>
|
|
Former usb_cable_connected() patch broke compilation of boards which do
not support this feature.
I've renamed usb_cable_connected() to g_dnl_usb_cable_connected() and added
its default implementation to gadget downloader driver code. There's
only one driver of this kind and it's unlikely there'll be another, so
there's no point in keeping it in /common.
Previously this function was declared in usb.h. I've moved it, since
it's more appropriate to keep it in g_dnl.h - usb.h seems to be intended
for USB host implementation.
Existing code, confronted with default -EOPNOTSUPP return value,
continues as if the cable was connected.
CONFIG_USB_CABLE_CHECK was removed.
Change-Id: Ib9198621adee2811b391c64512f14646cefd0369
Signed-off-by: Mateusz Zalega <[email protected]>
Acked-by: Marek Vasut <[email protected]>
Acked-by: Lukasz Majewski <[email protected]>
|
|
USB keyboard polling failed for some keyboards on PowerPC 5020.
This was caused by requesting only 4 bytes of data from keyboards that
produce an 8 byte HID report.
Signed-off-by: Adrian Cox <[email protected]>
Signed-off-by: Wolfgang Denk <[email protected]>
Cc: Marek Vasut <[email protected]>
|
|
|
|
Mostly reusing DDR3 driver, this patch adds DDR4 SPD handling, register
calculation and programming.
Signed-off-by: York Sun <[email protected]>
|
|
This patch adds a helper function that can be used to interpret most
"ranges" properties in the device tree.
It reads the n'th range out of a "ranges" array and returns the node's
virtual address of the range, the physical address that range starts at
and the size of the range.
Signed-off-by: Alexander Graf <[email protected]>
Acked-by: Scott Wood <[email protected]>
Reviewed-by: York Sun <[email protected]>
|
|
We already have a nice helper to give us a property cell value with default
fall back from a path. Split that into two helpers - one for the old path
based lookup and one to give us a value based on a node offset.
Signed-off-by: Alexander Graf <[email protected]>
Acked-by: Scott Wood <[email protected]>
Reviewed-by: York Sun <[email protected]>
|
|
MIPS needs a call to timer_init to preserve its current behaviour
ensuring that the cop0 compare register is initialised appropriately.
Reported-by: Daniel Schwierzeck <[email protected]>
Signed-off-by: Paul Burton <[email protected]>
|
|
Assigning gd->ram_size the return value of initdram matches the existing
MIPS board behaviour.
Suggested-by: Daniel Schwierzeck <[email protected]>
Signed-off-by: Paul Burton <[email protected]>
|
|
The LZO decompressor wasn't initializing the maximum output size, which
meant it would fail to decompress most of the time.
Reported-by: Matthias Weißer <[email protected]>
Signed-off-by: Kees Cook <[email protected]>
Tested-by: Matthias Weißer <[email protected]>
Acked-by: Simon Glass <[email protected]>
|
|
The show_model_r function should return an int but didn't. Return 0 to
indicate inevitable success and avoid the following if it is used:
common/board_r.c: In function 'show_model_r':
common/board_r.c:531:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
Cc: Simon Glass <[email protected]>
Signed-off-by: Paul Burton <[email protected]>
Acked-by: Simon Glass <[email protected]>
|
|
This required moving it into a C file from the header.
The only user of a non-default name_to_gpio is blackfin, therefore build tested
with the blackfin bct-brettl2 build, which is one I picked at random. Also
tested with a build for the ARM tec board which uses the default/fallback
implementation. Inspection with objdump shows that both have done the right
thing.
This change was requested by Marek during review of the sunxi patch series.
Signed-off-by: Ian Campbell <[email protected]>
Cc: Marek Vasut <[email protected]>
Cc: Wolfgang Denk <[email protected]>
Cc: Sonic Zhang <[email protected]>
|
|
With 7ce1526 we no longer need 'len' or 'res', so drop these variables.
Signed-off-by: Tom Rini <[email protected]>
|
|
This patch add support for gpimage format as a preparatory
patch for porting u-boot for keystone2 devices and is
based on omapimage format. It re-uses gph header to store the
size and loadaddr as done in omapimage.c
Signed-off-by: Vitaly Andrianov <[email protected]>
Signed-off-by: Murali Karicheri <[email protected]>
Acked-by: Tom Rini <[email protected]>
|
|
The keystone2 SOC requires to fix all 32 bit aliased addresses
to their 36 physical format. This has to happen after all fdt
nodes are added or modified.
Signed-off-by: Vitaly Andrianov <[email protected]>
Signed-off-by: Murali Karicheri <[email protected]>
Acked-by: Tom Rini <[email protected]>
|
|
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 <[email protected]>
|
|
With 452a272 we moved to allocating these variables on the stack. So
they will never now be NULL so remove these checks.
Signed-off-by: Tom Rini <[email protected]>
|
|
Inside of SPL we only concern ourself with one MMC device, so instead of
being able to use CONFIG_SYS_MMC_ENV_DEV we need to use 0 in SPL.
Switch the code to use a 'dev' variable to facilitate this.
Signed-off-by: Tom Rini <[email protected]>
|
|
Signed-off-by: Masahiro Yamada <[email protected]>
|
|
|
|
We should move forward to remove the old board init code. Add a
prominent message to encourage maintainers to get started on this
work.
Signed-off-by: Simon Glass <[email protected]>
|
|
We've run into a non-trivial conversion to CONFIG_SYS_GENERIC_BOARD so
we'll postpone this notice until right after v2014.04 is out.
This reverts commit 36c4b1d98059244c34ec3327d9cc9f3c552fd01b.
Signed-off-by: Tom Rini <[email protected]>
|
|
Changes:
- randomly generate partition uuid if any is undefined and CONFIG_RAND_UUID
is defined
- print debug info about set/unset/generated uuid
- update doc/README.gpt
Signed-off-by: Przemyslaw Marczak <[email protected]>
Acked-by: Lukasz Majewski <[email protected]>
Cc: Piotr Wilczek <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: Stephen Warren <[email protected]>
Cc: Lukasz Majewski <[email protected]>
|
|
Some eMMC chips may need the RST_n_FUNCTION bit set to a non-zero value
in order for warm reset of the system to work. Details on this being
required will be part of the eMMC datasheet. Also add using this
command to the dra7xx README.
* Whitespace fix by panto
Signed-off-by: Tom Rini <[email protected]>
Acked-by: Pantelis Antoniou <[email protected]>
|
|
We should move forward to remove the old board init code. Add a
prominent message to encourage maintainers to get started on this
work.
Signed-off-by: Simon Glass <[email protected]>
|
|
When using CONFIG_SYS_I2C i2c needs to be initialized by
i2c_init_all(). This is done in some places but not in
eeprom_init().
Signed-off-by: Matthias Fuchs <[email protected]>
|
|
|
|
The way that struct mmc was implemented was a bit of a mess;
configuration and internal state all jumbled up in a single structure.
On top of that the way initialization is done with mmc_register leads
to a lot of duplicated code in drivers.
Typically the initialization got something like this in every driver.
struct mmc *mmc = malloc(sizeof(struct mmc));
memset(mmc, 0, sizeof(struct mmc);
/* fill in fields of mmc struct */
/* store private data pointer */
mmc_register(mmc);
By using the new mmc_create call one just passes an mmc config struct
and an optional private data pointer like this:
struct mmc = mmc_create(&cfg, priv);
All in tree drivers have been updated to the new form, and expect
mmc_register to go away before long.
Changes since v1:
* Use calloc instead of manually calling memset.
* Mark mmc_register as deprecated.
Signed-off-by: Pantelis Antoniou <[email protected]>
|
|
I needed to be able to uncompress lzma files. I did this command
based on unzip command and propose it if it could help.
Signed-off-by: Patrice Bouchand <[email protected]>
Changed to work with sandbox
Signed-off-by: Simon Glass <[email protected]>
|
|
Add function which allows encrypting the whole environment block with
AES-128-CBC. The key for the environment is retrieved by
env_aes_cbc_get_key() function, which must be implemented on a per-board
basis.
Signed-off-by: Marek Vasut <[email protected]>
|
|
Implement env_export() wrapper, so that all implementers of saveenv() don't
have to call hexport_r(), crc32() etc. sequence . This trims down a bit of
code duplication.
Signed-off-by: Marek Vasut <[email protected]>
|
|
Add simple 'aes' command, which allows using the AES-128-CBC encryption
and decryption functions from U-Boot command line.
Signed-off-by: Marek Vasut <[email protected]>
|
|
add host tool "fit_check_sign" which verifies, if a fit image is
signed correct.
Signed-off-by: Heiko Schocher <[email protected]>
Cc: Simon Glass <[email protected]>
|
|
Add hash_init(), hash_update() and hash_finish() to the
hash_algo struct. Add hash_lookup_algo() to look up the
struct given an algorithm name.
Signed-off-by: Hung-ying Tyan <[email protected]>
Signed-off-by: Simon Glass <[email protected]>
Signed-off-by: Heiko Schocher <[email protected]>
Acked-by: Simon Glass <[email protected]>
|