| 4ef79099 | 07-Jan-2016 |
Simon Glass <sjg@chromium.org> |
usb: Define USB_MAX_STOR_DEV in only one place
We can define this in the header file and use it in usb_storage.c. There is no need to define it twice. Remove the #define from usb_storage.c.
Signed-
usb: Define USB_MAX_STOR_DEV in only one place
We can define this in the header file and use it in usb_storage.c. There is no need to define it twice. Remove the #define from usb_storage.c.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
show more ...
|
| 72b335e9 | 05-Jan-2016 |
Simon Glass <sjg@chromium.org> |
sandbox: Support the bmp command
Adjust this command to use map_sysmem() correctly so that it works on sandbox.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.c
sandbox: Support the bmp command
Adjust this command to use map_sysmem() correctly so that it works on sandbox.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
show more ...
|
| 4fbd258e | 29-Dec-2015 |
Simon Glass <sjg@chromium.org> |
i2c: Correct command return values
We should not return a -ve error code from command functions. Instead, return CMD_RET_FAILURE. This avoids the "exit not allowed from main input shell" error messa
i2c: Correct command return values
We should not return a -ve error code from command functions. Instead, return CMD_RET_FAILURE. This avoids the "exit not allowed from main input shell" error messages from the hush shell.
Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Heiko Schocher <hs@denx.de>
show more ...
|
| 5b8031cc | 15-Jan-2016 |
Tom Rini <trini@konsulko.com> |
Add more SPDX-License-Identifier tags
In a number of places we had wordings of the GPL (or LGPL in a few cases) license text that were split in such a way that it wasn't caught previously. Convert
Add more SPDX-License-Identifier tags
In a number of places we had wordings of the GPL (or LGPL in a few cases) license text that were split in such a way that it wasn't caught previously. Convert all of these to the correct SPDX-License-Identifier tag.
Signed-off-by: Tom Rini <trini@konsulko.com>
show more ...
|
| 9c11135c | 18-Dec-2015 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
image: fix getenv_bootm_size() function
Currently, this function returns wrong size if "bootm_low" is defined, but "bootm_size" is not.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com
image: fix getenv_bootm_size() function
Currently, this function returns wrong size if "bootm_low" is defined, but "bootm_size" is not.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 447b9cdf | 12-Jan-2016 |
Peng Fan <peng.fan@nxp.com> |
common: usb: fix checking condition
We support max USB_MAXENDPOINTS, so need to use "epno >= USB_MAXENDPOINTS", but not "epno > USB_MAXENDPOINTS". If use ">", we may exceeds the array of if_desc->ep
common: usb: fix checking condition
We support max USB_MAXENDPOINTS, so need to use "epno >= USB_MAXENDPOINTS", but not "epno > USB_MAXENDPOINTS". If use ">", we may exceeds the array of if_desc->ep_desc.
Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Simon Glass <sjg@chromium.org> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Marek Vasut <marex@denx.de> Cc: Paul Kocialkowski <contact@paulk.fr> Cc: "Stefan Brüns" <stefan.bruens@rwth-aachen.de> Cc: Vincent Palatin <vpalatin@chromium.org>
show more ...
|
| af7a5551 | 15-Jan-2016 |
Simon Glass <sjg@chromium.org> |
x86: Fix board init breakage
Commit ecc30663 ("Fix board init code to respect the C runtime environment") breaks x86. This was mentioned on https://patchwork.ozlabs.org/patch/548644 but not addresse
x86: Fix board init breakage
Commit ecc30663 ("Fix board init code to respect the C runtime environment") breaks x86. This was mentioned on https://patchwork.ozlabs.org/patch/548644 but not addressed. Correct it so that x86 boards boot again.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
show more ...
|
| 192bc694 | 30-Dec-2015 |
Ben Whitten <ben.whitten@gmail.com> |
Fix GCC format-security errors and convert sprintfs.
With format-security errors turned on, GCC picks up the use of sprintf with a format parameter not being a string literal.
Simple uses of sprint
Fix GCC format-security errors and convert sprintfs.
With format-security errors turned on, GCC picks up the use of sprintf with a format parameter not being a string literal.
Simple uses of sprintf are also converted to use strcpy.
Signed-off-by: Ben Whitten <ben.whitten@gmail.com> Acked-by: Wolfgang Denk <wd@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
show more ...
|
| db18f548 | 12-Jan-2016 |
Peng Fan <peng.fan@nxp.com> |
common: env_flags: fix loop condition when using env_flags_varaccess_mask
We should use ARRAY_SIZE, but not sizeof. The size of env_flags_varaccess_mask is 16bytes, but we only need 4 loops. If usin
common: env_flags: fix loop condition when using env_flags_varaccess_mask
We should use ARRAY_SIZE, but not sizeof. The size of env_flags_varaccess_mask is 16bytes, but we only need 4 loops. If using 16 as the end condition, we may access memory that not belong to array env_flags_varaccess_mask.
Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: York Sun <yorksun@freescale.com> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
show more ...
|
| bb08a6e7 | 10-Jan-2016 |
Peng Fan <van.freenix@gmail.com> |
common: cli_simple: use strlcpy instead of strcpy
Report Coverity log: Destination buffer too small (STRING_OVERFLOW) string_overflow: You might overrun the 1024 byte destination string lastcommand
common: cli_simple: use strlcpy instead of strcpy
Report Coverity log: Destination buffer too small (STRING_OVERFLOW) string_overflow: You might overrun the 1024 byte destination string lastcommand by writing 1025 bytes from console_buffer
Signed-off-by: Peng Fan <van.freenix@gmail.com> Cc: Heiko Schocher <hs@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 4e42e29f | 13-Jan-2016 |
Michael van Slingerland <michael@deviousops.nl> |
cmd_boot: Add a poweroff command
Add a 'poweroff' command to boot commands, this only gets enabled if the board Kconfig does a "select CMD_POWEROFF".
Signed-off-by: Michael van Slingerland <michael
cmd_boot: Add a poweroff command
Add a 'poweroff' command to boot commands, this only gets enabled if the board Kconfig does a "select CMD_POWEROFF".
Signed-off-by: Michael van Slingerland <michael@deviousops.nl> [hdegoede@redhat.com: Make the cmd conditional on a CMD_POWEROFF Kconfig] Signed-off-by: Hans de Goede <hdegoede@redhat.com>
show more ...
|
| 02585eb3 | 07-Dec-2015 |
Stephen Warren <swarren@nvidia.com> |
ums: support multiple LUNs at once
Extend the ums command to accept a list of block devices. Each of these will be exported as a separate LUN. An example use-case would be:
ums 0 mmc 0,0.1,0.2
...
ums: support multiple LUNs at once
Extend the ums command to accept a list of block devices. Each of these will be exported as a separate LUN. An example use-case would be:
ums 0 mmc 0,0.1,0.2
... which would export LUNs for eMMC 0's user data, boot0, and boot1 HW partitions. This is useful since it allows the host access to everything on the eMMC without having to somehow stop the ums command from executing and restart it with different parameters.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Tom Rini <trini@konsulko.com>
show more ...
|
| 873cc1d7 | 07-Dec-2015 |
Stephen Warren <swarren@nvidia.com> |
mmc: store hwpart in the block device
This will allow us to have multiple block device structs each referring to the same eMMC device, yet different HW partitions.
For now, there is still a single
mmc: store hwpart in the block device
This will allow us to have multiple block device structs each referring to the same eMMC device, yet different HW partitions.
For now, there is still a single block device per eMMC device. As before, this block device always accesses whichever HW partition was most recently selected. Clients wishing to make use of multiple block devices referring to different HW partitions can simply take a copy of this block device once it points at the correct HW partition, and use each one as they wish. This feature will be used by the next patch.
In the future, perhaps get_device() could be enhanced to return a dynamically allocated block device struct, to avoid the client needing to copy it in order to maintain multiple block devices. However, this would require all users to be updated to free those block device structs at some point, which is rather a large change.
Most callers of mmc_switch_part() wish to permanently switch the default MMC block device's HW partition. Enhance mmc_switch_part() so that it does this. This removes the need for callers to do this. However, common/env_mmc.c needs to save and restore the current HW partition. Make it do this more explicitly.
Replace use of mmc_switch_part() with mmc_select_hwpart() in order to remove duplicate code that skips the call if that HW partition is already selected.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Tom Rini <trini@konsulko.com>
show more ...
|
| 7c4213f6 | 07-Dec-2015 |
Stephen Warren <swarren@nvidia.com> |
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: 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>
show more ...
|
| adc421e4 | 25-Nov-2015 |
Albert ARIBAUD <albert.u.boot@aribaud.net> |
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
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>
show more ...
|
| ecc30663 | 25-Nov-2015 |
Albert ARIBAUD <albert.u.boot@aribaud.net> |
Fix board init code to respect the C runtime environment
board_init_f_mem() alters the C runtime environment's stack it is actually already using. This is not a valid behaviour within a C runtime en
Fix board init code to respect the C runtime environment
board_init_f_mem() alters the C runtime environment's stack it is actually already using. This is not a valid behaviour within a C runtime environment.
Split board_init_f_mem into C functions which do not alter their own stack and always behave properly with respect to their C runtime environment.
Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net> Acked-by: Thomas Chou <thomas@wytron.com.tw>
show more ...
|
| 774da4b9 | 13-Jan-2016 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-net |
| 48ad68de | 05-Jan-2016 |
Tom Rini <trini@konsulko.com> |
hash.c: Conditionally compile hash_command, static hash_show
The function hash_show is now only called by hash_command, so mark it as static (and drop from hash.h). We only call hash_command when a
hash.c: Conditionally compile hash_command, static hash_show
The function hash_show is now only called by hash_command, so mark it as static (and drop from hash.h). We only call hash_command when any of CONFIG_CMD_CRC32, CONFIG_CMD_SHA1SUM or CONFIG_CMD_HASH are set. Since hash.c is linked in unconditionally we must take extra care with functions that bring in read-only strings as these will not be discarded.
Signed-off-by: Tom Rini <trini@konsulko.com>
show more ...
|
| 20e072f3 | 17-Dec-2015 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
image: check "bootm_low" and "bootm_size" if "initrd_high" is missing
To boot Linux, we should prevent Initramdisk and FDT from going too high.
Currently, boot_relocate_fdt() checks "fdt_high" envi
image: check "bootm_low" and "bootm_size" if "initrd_high" is missing
To boot Linux, we should prevent Initramdisk and FDT from going too high.
Currently, boot_relocate_fdt() checks "fdt_high" environment first, and then falls back to getenv_bootm_mapsize() + getenv_bootm_low() if "fdt_high" is missing.
On the other hand, boot_ramdisk_high() only checks "initrd_high" to get the address limit for the Initramdisk. We also want to let this case fall back to getenv_bootm_mapsize() + getenv_bootm_low().
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
| 9fbdb946 | 29-Nov-2015 |
Simon Glass <sjg@chromium.org> |
dm: pci: scsi: Use driver-model PCI API
Adjust the SCSI command to use driver model for its PCI interface.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> T
dm: pci: scsi: Use driver-model PCI API
Adjust the SCSI command to use driver model for its PCI interface.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| f3f1faef | 29-Nov-2015 |
Simon Glass <sjg@chromium.org> |
dm: pci: Add a dm_ prefix to pci_bus_find_bdf()
Most driver model PCI functions have a dm_ prefix. At some point, when the old code is converted to driver model and the old functions are removed, we
dm: pci: Add a dm_ prefix to pci_bus_find_bdf()
Most driver model PCI functions have a dm_ prefix. At some point, when the old code is converted to driver model and the old functions are removed, we will drop that prefix.
For consistency, we should use the dm_ prefix for all driver model functions. Update pci_bus_find_bdf() accordingly.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
| fea6730e | 07-Jan-2016 |
Rasmus Villemoes <rasmus.villemoes@prevas.dk> |
fix always succesful memory test
Since 51209b1f42cb ("Use common mtest iteration counting"), do_mem_mtest has always reported 0 errors and hence returned 0, even if errors were detected. Fix the hel
fix always succesful memory test
Since 51209b1f42cb ("Use common mtest iteration counting"), do_mem_mtest has always reported 0 errors and hence returned 0, even if errors were detected. Fix the helpers mem_test_alt() and mem_test_quick() to return the number of errors found.
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
show more ...
|
| 71105f50 | 28-Oct-2015 |
Przemyslaw Marczak <p.marczak@samsung.com> |
fdt: fix address cell count checking in fdt_translate_address()
Commit: dm: core: Enable optional use of fdt_translate_address()
Enables use of this function as default, but after this it's not pos
fdt: fix address cell count checking in fdt_translate_address()
Commit: dm: core: Enable optional use of fdt_translate_address()
Enables use of this function as default, but after this it's not possible to get dev address for the case in which: '#size-cells == 0'
This causes errors when getting address for some GPIOs, for which the '#size-cells' is set to 0.
Example error: '__of_translate_address: Bad cell count for gpx0'
Allowing for that case by modifying the macro 'OF_CHECK_COUNTS', (called from )__of_translate_address(), fixes the issue.
Now, this macro doesn't check, that '#size-cells' is greater than 0.
This is possible from the specification point of view, but I'm not sure that it doesn't introduce a regression for other configs.
Please test and share the results.
Tested-on: Odroid U3, Odroid X2, Odroid XU3, Sandbox.
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Jaehoon Chung <jh80.chung@samsung.com> Cc: Stefan Roese <sr@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Marek Vasut <marex@denx.de> Tested-by: Jaehoon Chung <jh80.chung@samsung.com> Tested-by: Lukasz Majewski <l.majewski@samsung.com>
show more ...
|
| 8a834870 | 03-Jan-2016 |
Simon Glass <sjg@chromium.org> |
dm: usb: Add a remove() method for USB keyboards
At present USB keyboards are not properly removed with driver model. Add the code to handle this.
Signed-off-by: Simon Glass <sjg@chromium.org> Revi
dm: usb: Add a remove() method for USB keyboards
At present USB keyboards are not properly removed with driver model. Add the code to handle this.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
show more ...
|
| 70caa971 | 03-Jan-2016 |
Simon Glass <sjg@chromium.org> |
usb: Allow up to 7 storage devices
The current limit of 5 is not enough for the driver model USB tests. Really we should not have a limit but the driver model code still uses the usb_dev_desc[] arra
usb: Allow up to 7 storage devices
The current limit of 5 is not enough for the driver model USB tests. Really we should not have a limit but the driver model code still uses the usb_dev_desc[] array, which has a limit.
Increasing the limit by 2 should not bother anyone. Adjust it.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
show more ...
|