- Dec 02, 2016
-
-
Michal Simek authored
Two functions should be static because they are not exported to any other file. Warnings were reported by sparse C=1. Signed-off-by:
Michal Simek <michal.simek@xilinx.com> Reviewed-by:
Tom Rini <trini@konsulko.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Michal Simek authored
With DM_SCSI this function will return more than one return value to cover errors. Suggested-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Michal Simek <michal.simek@xilinx.com> Reviewed-by:
Tom Rini <trini@konsulko.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
- May 17, 2016
-
-
Simon Glass authored
At present the SCSI command code includes both the command-processing code and the core SCSI functions and data structures. Separate the latter into its own file, adding functions as needed to avoid the command code accessing data structures directly. This functions use the new legacy block functions. With this commit: - There is no CONFIG option referenced from the command code - The concept of a 'current SCSI device' is confined to the command code This will make it easier to convert this code to driver model. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Update the code style of this file so that it passes checkpatch.pl. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Reorder the code to avoid needing forward declarations. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Mar 16, 2016
-
-
Tom Rini authored
When we switch to including all linker lists in SPL it is important to not include commands as that may lead to link errors due to other things we have already discarded. In this case, the SCSI code needs a lot of attention so for now just guard the command portions. Signed-off-by:
Tom Rini <trini@konsulko.com>
-
- Mar 14, 2016
-
-
Simon Glass authored
This is a device number, and we want to use 'dev' to mean a driver model device. Rename the member. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Tested-by:
Stephen Warren <swarren@nvidia.com>
-
Simon Glass authored
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>
-
Simon Glass authored
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>
-
- Jan 25, 2016
-
-
Simon Glass authored
Now that they are in their own directory, we can remove this prefix. This makes it easier to find a file since the prefix does not get in the way. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Heiko Schocher <hs@denx.de> Acked-by:
Stefan Roese <sr@denx.de> Acked-by:
Przemyslaw Marczak <p.marczak@samsung.com>
-
Simon Glass authored
There are a lot of unrelated files in common, including all of the commands. Moving them into their own directory makes them easier to find and is more logical. Some commands include non-command code, such as cmd_scsi.c. This should be sorted out at some point so that the function can be enabled with or without the associated command. Unfortunately, with m68k I get this error: m68k: + M5329AFEE +arch/m68k/cpu/mcf532x/start.o: In function `_start': +arch/m68k/cpu/mcf532x/start.S:159:(.text+0x452): relocation truncated to fit: R_68K_PC16 against symbol `board_init_f' defined in .text.board_init_f section in common/built-in.o I hope someone can shed some light on what this means. I hope it isn't depending on the position of code in the image. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Heiko Schocher <hs@denx.de> Acked-by:
Stefan Roese <sr@denx.de> Acked-by:
Przemyslaw Marczak <p.marczak@samsung.com>
-
- Jan 14, 2016
-
-
Stephen Warren authored
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>
-
- Jan 12, 2016
-
-
Simon Glass authored
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>
-
- Jul 11, 2015
-
-
Andre Przywara authored
Commit 2b42c931 ("ahci: support LBA48 data reads for 2+TB drives") introduced conditional code which triggers a warning when compiled with DEBUG enabled: In file included from common/cmd_scsi.c:12:0: common/cmd_scsi.c: In function 'scsi_read': include/common.h:109:4: warning: 'smallblks' may be used uninitialized in this function [-Wmaybe-uninitialized] ... Since this is for debug only, take the easy way and initialize the variable explicitly on declaration to avoid the warning. (Fix a nearby whitespace error on the way.) Tested-by:
Bin Meng <bmeng.cn@gmail.com> Signed-off-by:
Andre Przywara <osp@andrep.de>
-
- Jun 12, 2015
-
-
Mark Langsdorf authored
Enable full 48-bit LBA48 data reads by passing the upper word of the LBA block pointer in bytes 9 and 10 of the FIS. This allows uboot to load data from any arbitrary sector on a drive with 2 or more TB of available data connected to an AHCI controller. Signed-off-by:
Mark Langsdorf <mark.langsdorf@gmail.com> Signed-off-by:
Andre Przywara <osp@andrep.de> [trini: Make use of CONFIG_SYS_64BIT_LBA in a few places to drop warnings on platforms that don't enable that feature ] Signed-off-by:
Tom Rini <trini@konsulko.com>
-
Mark Langsdorf authored
Signed-off-by:
Mark Langsdorf <mark.langsdorf@gmail.com> Signed-off-by:
Andre Przywara <osp@andrep.de>
-
- Apr 22, 2015
-
-
tang yuantian authored
Current driver assumes the AHCI is connected to PCI, this is not true on some SoCs, e.g. LS1021A, which has PCI but the AHCI is in SoC. This patch will enable embedded AHCI devices on platforms with PCI. PCI AHCI devices still can be used by commenting CONFIG_SCSI_AHCI_PLAT option in head file. Signed-off-by:
Shaohui Xie <Shaohui.Xie@freescale.com> Signed-off-by:
Tang Yuantian <Yuantian.Tang@freescale.com> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Tom Rini <trini@konsulko.com>
-
- Feb 06, 2015
-
-
Simon Glass authored
On some hardware this time can be significant. Add bootstage support for measuring this. The result can be obtained using 'bootstage report' or passed on to the Linux via the device tree. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
- Oct 27, 2014
-
-
Simon Glass authored
Use the inttypes header file to provide this. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Feb 19, 2014
-
-
Dan Murphy authored
Add spl_sata to read a fat partition from a bootable SATA drive. Signed-off-by:
Dan Murphy <dmurphy@ti.com> Reviewed-by:
Roger Quadros <rogerq@ti.com>
-
- Jul 24, 2013
-
-
Wolfgang Denk authored
Signed-off-by:
Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by:
Tom Rini <trini@ti.com>
-
- Jul 15, 2013
-
-
Simon Glass authored
The block device expects to see lbaint_t for the blknr parameter. Change the SCSI read/write functions to suit. This fixes the following build warnings for coreboot: cmd_scsi.c: In function ‘scsi_scan’: cmd_scsi.c:119:30: error: assignment from incompatible pointer type [-Werror] cmd_scsi.c:120:32: error: assignment from incompatible pointer type [-Werror] Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- May 01, 2013
-
-
Egbert Eich authored
log2 of the device block size serves as the shift value used to calculate the block number to read in file systems when implementing avaiable block sizes. It is needed quite often in file systems thus it is pre-calculated and stored in the block device descriptor. Signed-off-by:
Egbert Eich <eich@suse.com>
-
- Apr 01, 2013
-
-
York Sun authored
'bool' is defined in random places. This patch consolidates them into a single header file include/linux/types.h, using stdbool.h introduced in C99. All other #define, typedef and enum are removed. They are all consistent with true = 1, false = 0. Replace FALSE, False with false. Replace TRUE, True with true. Skip *.py, *.php, lib/* files. Signed-off-by:
York Sun <yorksun@freescale.com>
-
- Nov 02, 2012
-
-
Gabe Black authored
Capacity needs to allow for a 64-bit value. Signed-off-by:
Gabe Black <gabeblack@google.com> Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Stefan Reinauer authored
Add a new function to find out the number of available SCSI disks. Also set the 'scsidevs' environment variable after each scan. Signed-off-by:
Stefan Reinauer <reinauer@chromium.org> Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Hung-Te Lin authored
Implement write functionality in the scsi layer. A ''scsi write' command is also added to console for testing. Signed-off-by:
Hung-Te Lin <hungte@chromium.org> Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Vadim Bendebury authored
Many AHCI controllers are identical, the main (and often the only) difference being the PCI Vendor ID/Device ID combination reported by the device. This change allows the config file to define a list of PCI vendor ID/device ID pairs. The driver would scan the list and initialize the first device it finds. No actual multiple device list is introduced yet, this change just add the framework. Signed-off-by:
Vadim Bendebury <vbendeb@chromium.org> Signed-off-by:
Taylor Hutt <thutt@chromium.org> Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Sep 25, 2012
-
-
Rob Herring authored
All the raw block load commands duplicate the same code. Starting with the ide version as it has progress updates convert ide, usb, and scsi boot commands to all use a common version. Signed-off-by:
Rob Herring <rob.herring@calxeda.com>
-
- Mar 06, 2012
-
-
Simon Glass authored
Change all files in common/ to use CMD_RET_USAGE instead of calling cmd_usage() directly. I'm not completely sure about this patch since the code since impact is small (100 byte or so on ARM) and it might need splitting into smaller patches. But for now here it is. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Jul 26, 2011
-
-
Matthew McClintock authored
If we don't want to build support for any partition types we can now add #undef CONFIG_PARTITIONS in a board config file to keep this from being compiled in. Otherwise boards assume this is compiled in by default Signed-off-by:
Matthew McClintock <msm@freescale.com>
-
- Jul 25, 2011
-
-
Rob Herring authored
Add support for AHCI controllers that are not PCI based. Signed-off-by:
Rob Herring <rob.herring@calxeda.com> Cc: Wolfgang Denk <wd@denx.de>
-
Mike Frysinger authored
Rather than having a bunch of random commands handle autostart behavior, unify the logic in a single place. This also fixes building of these different commands when bootm is disabled. Acked-by:
Matthew McClintock <msm@freescale.com> Acked-by:
Scott Wood <scottwood@freescale.com> Signed-off-by:
Mike Frysinger <vapier@gentoo.org>
-
- Jan 11, 2011
-
-
Wolfgang Denk authored
This reverts commit 5a442c0a. This commit changed the behaviour of getenv_yesno() (both the default behaviour and the documented behaviour for abbreviated arguments) which resulted in problems in several areas. Signed-off-by:
Wolfgang Denk <wd@denx.de>
-
- Nov 28, 2010
-
-
Mike Frysinger authored
Use the new helper func to clean up duplicate logic handling of the autostart env var. Signed-off-by:
Mike Frysinger <vapier@gentoo.org>
-
Mike Frysinger authored
The duplication of the do_bootm prototype has gotten out of hand, and they're pretty much all outdated (wrt constness). Unify them all in command.h. Signed-off-by:
Mike Frysinger <vapier@gentoo.org>
-
- Jul 24, 2010
-
-
Wolfgang Denk authored
Lots of code use this construct: cmd_usage(cmdtp); return 1; Change cmd_usage() let it return 1 - then we can replace all these ocurrances by return cmd_usage(cmdtp); This fixes a few places with incorrect return code handling, too. Signed-off-by:
Wolfgang Denk <wd@denx.de>
-
- Jul 04, 2010
-
-
Wolfgang Denk authored
The hush shell dynamically allocates (and re-allocates) memory for the argument strings in the "char *argv[]" argument vector passed to commands. Any code that modifies these pointers will cause serious corruption of the malloc data structures and crash U-Boot, so make sure the compiler can check that no such modifications are being done by changing the code into "char * const argv[]". This modification is the result of debugging a strange crash caused after adding a new command, which used the following argument processing code which has been working perfectly fine in all Unix systems since version 6 - but not so in U-Boot: int main (int argc, char **argv) { while (--argc > 0 && **++argv == '-') { /* ====> */ while (*++*argv) { switch (**argv) { case 'd': debug++; break; ... default: usage (); } } } ... } The line marked "====>" will corrupt the malloc data structures and usually cause U-Boot to crash when the next command gets executed by the shell. With the modification, the compiler will prevent this with an error: increment of read-only location '*argv' N.B.: The code above can be trivially rewritten like this: while (--argc > 0 && **++argv == '-') { char *arg = *argv; while (*++arg) { switch (*arg) { ... Signed-off-by:
Wolfgang Denk <wd@denx.de> Acked-by:
Mike Frysinger <vapier@gentoo.org>
-
- Jun 12, 2009
-
-
Wolfgang Denk authored
Many of the help messages were not really helpful; for example, many commands that take no arguments would not print a correct synopsis line, but "No additional help available." which is not exactly wrong, but not helpful either. Commit ``Make "usage" messages more helpful.'' changed this partially. But it also became clear that lots of "Usage" and "Help" messages (fields "usage" and "help" in struct cmd_tbl_s respective) were actually redundant. This patch cleans this up - for example: Before: => help dtt dtt - Digital Thermometer and Thermostat Usage: dtt - Read temperature from digital thermometer and thermostat. After: => help dtt dtt - Read temperature from Digital Thermometer and Thermostat Usage: dtt Signed-off-by:
Wolfgang Denk <wd@denx.de>
-
- Jan 28, 2009
-
-
Peter Tyser authored
Remove command name from all command "usage" fields and update common/command.c to display "name - usage" instead of just "usage". Also remove newlines from command usage fields. Signed-off-by:
Peter Tyser <ptyser@xes-inc.com>
-