| 7793ac96 | 23-Jul-2014 |
Simon Glass <sjg@chromium.org> |
console: Remove vprintf() optimisation for sandbox
If the console is not present, we try to reduce overhead by stopping any output in vprintf(), before it gets to putc(). This is of dubious merit in
console: Remove vprintf() optimisation for sandbox
If the console is not present, we try to reduce overhead by stopping any output in vprintf(), before it gets to putc(). This is of dubious merit in general, but in the case of sandbox it is incorrect since we have a fallback console which reports errors very early in U-Boot. If this is defeated U-Boot can hang or exit with no indication of what is wrong.
Remove the optimisation for sandbox.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| d97143a6 | 23-Jul-2014 |
Simon Glass <sjg@chromium.org> |
stdio: Provide functions to add/remove devices using stdio_dev
The current functions for adding and removing devices require a device name. This is not convenient for driver model, which wants to st
stdio: Provide functions to add/remove devices using stdio_dev
The current functions for adding and removing devices require a device name. This is not convenient for driver model, which wants to store a pointer to the relevant device. Add new functions which provide this feature and adjust the old ones to call these.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| ab7cd627 | 23-Jul-2014 |
Simon Glass <sjg@chromium.org> |
dm: Support driver model prior to relocation
Initialise devices marked 'pre-reloc' and make them available prior to relocation. Note that this requires pre-reloc malloc() to be available.
Signed-of
dm: Support driver model prior to relocation
Initialise devices marked 'pre-reloc' and make them available prior to relocation. Note that this requires pre-reloc malloc() to be available.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 00606d7e | 23-Jul-2014 |
Simon Glass <sjg@chromium.org> |
dm: Allow drivers to be marked 'before relocation'
Driver model currently only operates after relocation is complete. In this state U-Boot typically has a small amount of memory available. In adding
dm: Allow drivers to be marked 'before relocation'
Driver model currently only operates after relocation is complete. In this state U-Boot typically has a small amount of memory available. In adding support for driver model prior to relocation we must try to use as little memory as possible.
In addition, on some machines the memory has not be inited and/or the CPU is not running at full speed or the data cache is off. These can reduce execution performance, so the less initialisation that is done before relocation the better.
An immediately-obvious improvement is to only initialise drivers which are actually going to be used before relocation. On many boards the only such driver is a serial UART, so this provides a very large potential benefit.
Allow drivers to mark themselves as 'pre-reloc' which means that they will be initialised prior to relocation. This can be done either with a driver flag or with a 'dm,pre-reloc' device tree property.
To support this, the various dm scanning function now take a 'pre_reloc_only' parameter which indicates that only drivers marked pre-reloc should be bound.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 709ea543 | 23-Jul-2014 |
Simon Glass <sjg@chromium.org> |
stdio: Pass device pointer to stdio methods
At present stdio device functions do not get any clue as to which stdio device is being acted on. Some implementations go to great lengths to work around
stdio: Pass device pointer to stdio methods
At present stdio device functions do not get any clue as to which stdio device is being acted on. Some implementations go to great lengths to work around this, such as defining a whole separate set of functions for each possible device.
For driver model we need to associate a stdio_dev with a device. It doesn't seem possible to continue with this work-around approach.
Instead, add a stdio_dev pointer to each of the stdio member functions.
Note: The serial drivers have the same problem, but it is not strictly necessary to fix that to get driver model running. Also, if we convert serial over to driver model the problem will go away.
Code size increases by 244 bytes for Thumb2 and 428 for PowerPC.
22: stdio: Pass device pointer to stdio methods arm: (for 2/2 boards) all +244.0 bss -4.0 text +248.0 powerpc: (for 1/1 boards) all +428.0 text +428.0
Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Marek Vasut <marex@denx.de> Reviewed-by: Marek Vasut <marex@denx.de>
show more ...
|
| 91d0be1d | 23-Jul-2014 |
Simon Glass <sjg@chromium.org> |
stdio: Remove redundant code around stdio_register() calls
There is no point in setting a structure's memory to NULL when it has already been zeroed with memset().
Also, there is no need to create
stdio: Remove redundant code around stdio_register() calls
There is no point in setting a structure's memory to NULL when it has already been zeroed with memset().
Also, there is no need to create a stub function for stdio to call - if the function is NULL it will not be called.
This is a clean-up, with no change in functionality.
Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Marek Vasut <marex@denx.de>
show more ...
|
| 6d7601e7 | 11-Jul-2014 |
Simon Glass <sjg@chromium.org> |
sandbox: Always enable malloc debug
Tun on DEBUG in malloc(). This adds code space and slows things down but for sandbox this is acceptable. We gain the ability to check for memory leaks in tests.
sandbox: Always enable malloc debug
Tun on DEBUG in malloc(). This adds code space and slows things down but for sandbox this is acceptable. We gain the ability to check for memory leaks in tests.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| d59476b6 | 11-Jul-2014 |
Simon Glass <sjg@chromium.org> |
Add a simple malloc() implementation for pre-relocation
If we are to have driver model before relocation we need to support some way of calling memory allocation routines.
The standard malloc() is
Add a simple malloc() implementation for pre-relocation
If we are to have driver model before relocation we need to support some way of calling memory allocation routines.
The standard malloc() is pretty complicated:
1. It uses some BSS memory for its state, and BSS is not available before relocation
2. It supports algorithms for reducing memory fragmentation and improving performace of free(). Before relocation we could happily just not support free().
3. It includes about 4KB of code (Thumb 2) and 1KB of data. However since this has been loaded anyway this is not really a problem.
The simplest way to support pre-relocation malloc() is to reserve an area of memory and allocate it in increasing blocks as needed. This implementation does this.
To enable it, you need to define the size of the malloc() pool as described in the README. It will be located above the pre-relocation stack on supported architectures.
Note that this implementation is only useful on machines which have some memory available before dram_init() is called - this includes those that do no DRAM init (like tegra) and those that do it in SPL (quite a few boards). Enabling driver model preior to relocation for the rest of the boards is left for a later exercise.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| d93041a4 | 11-Jul-2014 |
Simon Glass <sjg@chromium.org> |
Remove form-feeds from dlmalloc.c
These don't really serve any purpose in the modern age. On the other hand they show up as annoying control characters in my editor, which then happily removes them.
Remove form-feeds from dlmalloc.c
These don't really serve any purpose in the modern age. On the other hand they show up as annoying control characters in my editor, which then happily removes them.
I believe we can drop these characters from the file.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 2c997e7a | 21-Jul-2014 |
Ian Campbell <ijc@hellion.org.uk> |
board_r: run scsi init() on ARM too
This has been disabled for ARM in initr_scsi since that function was introduced. However it works fine for me on Cubieboard and Cubietruck (with the upcoming AHCI
board_r: run scsi init() on ARM too
This has been disabled for ARM in initr_scsi since that function was introduced. However it works fine for me on Cubieboard and Cubietruck (with the upcoming AHCI glue patch).
I also tested on two random ARM platforms which seem to define CONFIG_CMD_SCSI: - highbank worked fine (on midway hardware) - omap5_uevm built OK and I confirmed using objdump that things were as expected (i.e. the default weak scsi_init nop was used).
While there remove the mismatched comment from the #endif (omitting the comment seems to be the prevailing style in this file).
Signed-off-by: Ian Campbell <ijc@hellion.org.uk> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| ecd1446f | 14-Jul-2014 |
Alexander Holler <holler@ahsoftware.de> |
Add option -r to env import to allow import of text files with CRLF as line endings
When this option is enabled, CRLF is treated like LF when importing environments from text files, which means CRs
Add option -r to env import to allow import of text files with CRLF as line endings
When this option is enabled, CRLF is treated like LF when importing environments from text files, which means CRs ('\r') in front of LFs ('\n') are just ignored.
Drawback of enabling this option is that (maybe exported) variables which have a trailing CR in their content will get imported without that CR. But this drawback is very unlikely and the big advantage of letting Windows user create a *working* uEnv.txt too is likely more welcome.
Signed-off-by: Alexander Holler <holler@ahsoftware.de>
show more ...
|
| 288afdc9 | 12-Jul-2014 |
Jeroen Hofstee <jeroen@myspectrum.nl> |
common: cmd_ide: use __weak and add prototypes
clang chokes about the concept of having an alias to an always_inlined function. gcc likely just ignores the always inlined since binary sizes are equa
common: cmd_ide: use __weak and add prototypes
clang chokes about the concept of having an alias to an always_inlined function. gcc likely just ignores the always inlined since binary sizes are equal before and after this patch. Convert the aliases to weak functions and provide missing prototypes.
cc: Pavel Herrmann <morpheus.ibis@gmail.com> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
show more ...
|
| 2bb8eb8e | 12-Jul-2014 |
Jeroen Hofstee <jeroen@myspectrum.nl> |
common: cmd_ide: remove PIO mode
Since no board defines CONFIG_TUNE_PIO this is just dead code, so remove it.
cc: Pavel Herrmann <morpheus.ibis@gmail.com> Signed-off-by: Jeroen Hofstee <jeroen@mysp
common: cmd_ide: remove PIO mode
Since no board defines CONFIG_TUNE_PIO this is just dead code, so remove it.
cc: Pavel Herrmann <morpheus.ibis@gmail.com> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
show more ...
|
| c13bb167 | 10-Jul-2014 |
Masahiro Yamada <yamada.m@jp.panasonic.com> |
spl: nand: read only in the size of image_header on the first access
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 w
spl: nand: read only in the size of image_header on the first access
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>
show more ...
|
| 6b367467 | 09-Jul-2014 |
Pavel Machek <pavel@denx.de> |
Fix help text of ext2load and fatload.
Fix help text of ext2load and fatload to match code in fs/fs.c
Signed-off-by: Pavel Machek <pavel@denx.de> Reviewed-by: Marek Vasut <marex@denx.de> |
| c68112f3 | 13-Jul-2014 |
Jeroen Hofstee <jeroen@myspectrum.nl> |
common: cmd_mii: fix printf format warning
The and operator implicitly upcasts the value to int, hence the format should expect an int type as well. (and make checkpatch happy)
Signed-off-by: Jeroe
common: cmd_mii: fix printf format warning
The and operator implicitly upcasts the value to int, hence the format should expect an int type as well. (and make checkpatch happy)
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
show more ...
|
| 39e1230e | 13-Jul-2014 |
Jeroen Hofstee <jeroen@myspectrum.nl> |
autoboot: add its own header
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl> |
| 0b7df656 | 12-Jul-2014 |
Jeroen Hofstee <jeroen@myspectrum.nl> |
common: env_common: make env_get_char_spec __weak
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl> |
| 82c3a4c4 | 10-Jul-2014 |
Jeroen Hofstee <jeroen@myspectrum.nl> |
common: bootm_os: make arch_preboot_os __weak
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl> |
| 3422299d | 26-Jun-2014 |
Jeroen Hofstee <jeroen@myspectrum.nl> |
common: main.c: make show_boot_progress __weak
This not only looks a bit better it also prevents a warning with W=1 (no previous prototype).
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl> Ack
common: main.c: make show_boot_progress __weak
This not only looks a bit better it also prevents a warning with W=1 (no previous prototype).
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| cc64b92c | 26-Jun-2014 |
Jeroen Hofstee <jeroen@myspectrum.nl> |
common:splash: use __weak
This not only looks a bit better it also prevents a warning with W=1 (no previous prototype).
cc: agust@denx.de Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl> |
| c5d4001a | 23-Jun-2014 |
Jeroen Hofstee <jeroen@myspectrum.nl> |
common: board_f: cosmetic use __weak for leds
First of all this looks a lot better, but it also prevents a gcc warning (W=1), that the weak function has no previous prototype.
cc: Simon Glass <sjg@
common: board_f: cosmetic use __weak for leds
First of all this looks a lot better, but it also prevents a gcc warning (W=1), that the weak function has no previous prototype.
cc: Simon Glass <sjg@chromium.org> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 0e350f81 | 22-Jun-2014 |
Jeroen Hofstee <jeroen@myspectrum.nl> |
common: commands: make commands static
Since most commands are not public, make them static. This prevents warnings that no common prototype is available.
Signed-off-by: Jeroen Hofstee <jeroen@mysp
common: commands: make commands static
Since most commands are not public, make them static. This prevents warnings that no common prototype is available.
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
show more ...
|
| be354c1a | 24-Jun-2014 |
Wu, Josh <Josh.wu@atmel.com> |
env_fat: use get_device_and_partition() during env save and load
Use get_device_and_partition() is better since: 1. It will call the device initialize function internally. So we can remove the mmc i
env_fat: use get_device_and_partition() during env save and load
Use get_device_and_partition() is better since: 1. It will call the device initialize function internally. So we can remove the mmc intialization code to save many lines. 2. It is used by fatls/fatload/fatwrite. So saveenv & load env should use it too. 3. It can parse the "D:P", "D", "D:", "D:auto" string to get correct device and partition information by run-time.
Also we remove the FAT_ENV_DEVICE and FAT_ENV_PART. We use a string: FAT_ENV_DEVICE_AND_PART. For at91sam9m10g45ek, it is "0". That means use device 0 and if: a)device 0 has no partition table, use the whole device as a FAT file system. b)device 0 has partittion table, use the partition #1.
Refer to the commit: 10a37fd7a4 for details of device & partition string.
Signed-off-by: Josh Wu <josh.wu@atmel.com> Reviewed-by: Stephen Warren <swarren@nvidia.com>
show more ...
|
| afb8e71c | 10-Jun-2014 |
Stephen Warren <swarren@nvidia.com> |
dfu: free entities when parsing fails
When dfu_init_env_entities() fails part-way through, some entities may have been added to dfu_list. These are only removed by dfu_free_entities(). If that funct
dfu: free entities when parsing fails
When dfu_init_env_entities() fails part-way through, some entities may have been added to dfu_list. These are only removed by dfu_free_entities(). If that function isn't called, those stale entities will still exist the next time dfu_init_env_entities() is called, leading to confusion. Fix do_dfu() to ensure that dfu_free_entities() is always called, to avoid this confusion.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Lukasz Majewski <l.majewski@samsung.com> Tested-by: Lukasz Majewski <l.majewski@samsung.com>
show more ...
|