aboutsummaryrefslogtreecommitdiff
path: root/common/cmd_fpga.c
AgeCommit message (Collapse)AuthorFilesLines
2016-01-25Move all command code into its own directorySimon Glass1-376/+0
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>
2015-01-30fpga: Extend dump descriptionMichal Simek1-1/+1
There are missing parameters in help which fpga dump command requires. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-01-21fpga: Protect GZIP usage when LOADMK is enabledMichal Simek1-0/+5
For case where CMD_FPGA_LOADMK is enabled and GZIP disable. Warning log: common/built-in.o: In function `do_fpga': /mnt/disk/u-boot/common/cmd_fpga.c:218: undefined reference to `gunzip' Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2014-06-05bootm: make use of legacy image format configurableHeiko Schocher1-0/+2
make the use of legacy image format configurable through the config define CONFIG_IMAGE_FORMAT_LEGACY. When relying on signed FIT images with required signature check the legacy image format should be disabled. Therefore introduce this new define and enable legacy image format if CONFIG_FIT_SIGNATURE is not set. If CONFIG_FIT_SIGNATURE is set disable per default the legacy image format. Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Lars Steubesand <lars.steubesand@philips.com> Cc: Mike Pearce <mike@kaew.be> Cc: Wolfgang Denk <wd@denx.de> Cc: Tom Rini <trini@ti.com> Cc: Michal Simek <monstr@monstr.eu> Acked-by: Simon Glass <sjg@chromium.org>
2014-05-20fpga: Added support to load bit stream from SD/MMCSiva Durga Prasad Paladugu1-0/+40
Added support to load a bitstream image in chunks by reading it in chunks from SD/MMC. Command format: loadfs [dev] [address] [image size] [blocksize] <interface> [<dev[:part]>] <filename> Example: fpga loadfs 0 1000000 3dbafc 4000 mmc 0 fpga.bin Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-20fpga: Add support to load partial bitstreamsMichal Simek1-0/+33
Added support to load partial bitstreams. The partial bitstreams can be loaded using the below commands Commands: fpga loadp <dev> <addr> <size> fpga loadbp <dev> <addr> <size> The full bit streams can be loaded using the old commands(fpga load and fpga loadb). Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-20fpga: Define bitstream type based on command selectionMichal Simek1-4/+6
Clean up partial, full and compressed bitstream handling. U-Boot supports full bitstream loading and partial based on detection which is not 100% correct. Extending fpga_load/fpga_loadbitstream() with one more argument which stores bitstream type. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-20fpga: Guard the LOADMK functionality with CMD_FPGA_LOADMKSiva Durga Prasad Paladugu1-0/+8
Guard the LOADMK functionality with config to provide an option to enable or disable it. Enable it for all platforms in mainline which enable CONFIG_CMD_FPGA. Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2013-11-06fpga: Add support for gzip images with bitstreamsMichal Simek1-3/+19
Here is the set of command which has been performed to proof this feature. gzip < fpga.bin > fpga.bin.gz mkimage -A arm -O u-boot -T firmware -C gzip \ -a 20000000 -n "zc702_fpga_bin" -d fpga.bin.gz fpga.bin.gz.ub tftp 100000 fpga.bin.gz.ub fpga loadmk 0 100000 This flow should speedup loading bitstream data from external memory and save image footprint in non volatile memory. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
2013-07-24Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk1-18/+1
Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
2013-05-30Merge branch 'u-boot/master' into 'u-boot-arm/master'Albert ARIBAUD1-2/+2
Conflicts: common/cmd_fpga.c drivers/usb/host/ohci-at91.c
2013-05-14image: Rename fit_image_check_hashes() to fit_image_verify()Simon Glass1-1/+1
This is the main entry point to the FIT image verification code. We will be using it to handle image verification with signatures, so rename the function. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
2013-05-06cmd: fpga: Do not include net.hMichal Simek1-3/+0
There is no reason to include net.h header in fpga code. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@ti.com>
2013-05-06cmd: fpga: Move fpga_loadbitstream to fpga.cMichal Simek1-94/+0
In bitstream decoding you can directly check device which you want to load and in fpga.c are fpga_validate and fpga_dev_info functions which should be used for it. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@ti.com>
2013-05-06cmd: fpga: Clean coding styleMichal Simek1-106/+107
No functional changes. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@ti.com>
2012-03-06Convert cmd_usage() calls in common to use a return valueSimon Glass1-2/+2
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>
2012-01-05FPGA: use debug() instead of module debug printfStefano Babic1-31/+28
Replace also __FUNCTION__ with standard __func__ Signed-off-by: Stefano Babic <sbabic@denx.de>
2011-08-01fpga: constify to fix build warningWolfgang Denk1-1/+1
Fix compiler warning: cmd_fpga.c:318: warning: passing argument 3 of 'fit_image_get_data' from incompatible pointer type Adding the needed 'const' here entails a whole bunch of additonal changes all over the FPGA code. Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Andre Schwarz <andre.schwarz@matrix-vision.de> Cc: Murray Jensen <Murray.Jensen@csiro.au> Acked-by: Andre Schwarz<andre.schwarz@matrix-vision.de>
2010-10-19cmd_fpga: cleanup help and check parametersStefano Babic1-11/+39
The usage and help for the fpga command is wrong and incomplete, and the parameters are not checked before to be passed to the underlying subfunction. Signed-off-by: Stefano Babic <sbabic@denx.de>
2010-07-24cmd_usage(): simplify return code handlingWolfgang Denk1-10/+2
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>
2010-07-04Make sure that argv[] argument pointers are not modified.Wolfgang Denk1-1/+1
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>
2009-06-12General help message cleanupWolfgang Denk1-2/+3
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>
2009-01-28Command usage cleanupPeter Tyser1-1/+1
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>
2009-01-28Standardize command usage messages with cmd_usage()Peter Tyser1-1/+1
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2008-07-14Code cleanup: fix old style assignment ambiguities like "=-" etc.Wolfgang Denk1-4/+4
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-03-12[new uImage] Add new uImage fromat support to fpga commandMarian Balakowicz1-9/+76
Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-29[new uImage] Update naming convention for bootm/uImage related codeMarian Balakowicz1-1/+1
This patch introduces the following prefix convention for the image format handling and bootm related code: genimg_ - dual format shared code image_ - legacy uImage format specific code fit_ - new uImage format specific code boot_ - booting process related code Related routines are renamed and a few pieces of code are moved around and re-grouped. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-25[new uImage] Add dual format uImage support frameworkMarian Balakowicz1-12/+24
This patch adds framework for dual format images. Format detection is added and the bootm controll flow is updated to include cases for new FIT format uImages. When the legacy (image_header based) format is detected appropriate legacy specific handling is invoked. For the new (FIT based) format uImages dual boot framework has a minial support, that will only print out a corresponding debug messages. Implementation of the FIT specific handling will be added in following patches. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-07[new uImage] Define a API for image handling operationsMarian Balakowicz1-4/+4
- Add inline helper macros for basic header processing - Move common non inline code common/image.c - Replace direct header access with the API routines - Rename IH_CPU_* to IH_ARCH_* Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-01-09Remove bit swapping in Xilinx Spartan bitfile loadingMatthias Fuchs1-36/+1
This patch removes the unnecessary bit swapping when booting .bit files with the 'fpga loadb' command. Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
2008-01-09Improve configuration of FPGA subsystemMatthias Fuchs1-1/+1
This patch removes the FPGA subsystem configuration through the CONFIG_FPGA bitmask configuration option. See README for the new options: CONFIG_FPGA, CONFIG_FPGA_<vendor>, CONFIG_FPGA_<family> Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
2007-11-20[BUILD] conditionally compile common/cmd_*.c in common/MakefileGrant Likely1-3/+0
Modify common/Makefile to conditionally compile the cmd_*.c files based on the board config. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2007-09-26Fpga: fix incorrect test of CFG_FPGA_XILINX macroGrant Likely1-1/+1
CFG_FPGA_XILINX is a bit value used to test against the value in CONFIG_FPGA. Testing for a value will always return TRUE. I don't think that is the intention in this code. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2007-07-08common/cmd_[af]*: Remove obsolete references to CONFIG_COMMANDS.Jon Loeliger1-3/+3
Signed-off-by: Jon Loeliger <jdl@freescale.com>
2007-07-04common/cmd_[a-f]* : Augment CONFIG_COMMANDS tests with defined(CONFIG_CMD_*).Jon Loeliger1-2/+2
This is a compatibility step that allows both the older form and the new form to co-exist for a while until the older can be removed entirely. All transformations are of the form: Before: #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) After: #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) || defined(CONFIG_CMD_AUTOSCRIPT) Signed-off-by: Jon Loeliger <jdl@freescale.com>
2006-10-07Remove compile warnings in fpga codeStefan Roese1-2/+2
Patch by Stefan Roese, 07 Oct 2006
2006-08-15Add FPGA Altera Cyclone 2 supportStefan Roese1-0/+21
Patch by Heiko Schocher, 15 Aug 2006
2005-10-13Cleanup for GCC-4.xWolfgang Denk1-1/+1
2005-08-10Add configuration for IFM AEV FIFO board.Wolfgang Denk1-4/+4
Minor coding style cleanup.
2005-08-08Fix sign extension bug in 'fpga loadb' command;Wolfgang Denk1-41/+56
make 'fpga loadb' always print the file header info Patch by Andrew Dyer, 11 Jan 2005
2005-01-22Code cleanup.wdenk1-18/+18
2005-01-09Patch by Florian Schlote, 08 Sep 2004:wdenk1-11/+11
Add support for SenTec-COBRA5272-board (Coldfire).
2005-01-09* Patch by Gleb Natapov, 07 Sep 2004:wdenk1-0/+121
mpc824x: set PCI latency timer to a sane value (is 0 after reset). * Patch by Kurt Stremerch, 03 Sep 2004: Add bitstream configuration option for fpga command (Xilinx only).
2004-01-03* Patch by Robert Schwebel, 15 Dec 2003:wdenk1-1/+1
add support for cramfs (uses JFFS2 command interface)
2004-01-02* Cleanup lowboot code for MPC5200wdenk1-81/+81
* Minor code cleanup (coding style) * Patch by Reinhard Meyer, 30 Dec 2003: - cpu/mpc5xxx/fec.c: added CONFIG_PHY_ADDR, added CONFIG_PHY_TYPE, - added CONFIG_PHY_ADDR to include/configs/IceCube.h, - turned debug print of PHY registers into a function (called in two places) - added support for EMK MPC5200 based modules * Fix MPC8xx PLPRCR_MFD_SHIFT typo * Add support for TQM866M modules * Fixes for TQM855M with 4 MB flash (Am29DL163 = _no_ mirror bit flash) * Fix a few compiler warnings
2003-12-07* Patch by Pierre Aubert, 24 Nov 2003:wdenk1-4/+5
- add a return value for the fpga command - add ide_preinit() function called in ide_init if CONFIG_IDE_PREINIT is defined. If ide_preinit fails, ide_init is aborted. - fix an endianess problem in fat.h
2003-07-01Patch by Kenneth Johansson, 30 Jun 2003:wdenk1-2/+2
get rid of MK_CMD_ENTRY macro; update doc/README.command
2003-06-29Fix some missing commands, cleanup header filesU-Boot-0_4_1wdenk1-1/+0
(autoscript, bmp, bsp, fat, mmc, nand, portio, ...)
2003-06-27* Code cleanup:LABEL_2003_06_27_2340wdenk1-2/+11
- remove trailing white space, trailing empty lines, C++ comments, etc. - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c) * Patches by Kenneth Johansson, 25 Jun 2003: - major rework of command structure (work done mostly by Michal Cendrowski and Joakim Kristiansen)
2002-08-27Initial revisionwdenk1-0/+158