summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-05-15build: support a new image u-boot-dtb.imgMasahiro Yamada
In SPL framework, SPL uses u-boot.img to load u-boot.bin. Here, u-boot.img = uImage header + u-boot.bin To use OF control with a separate devicetree, u-boot.dtb must be placed right after u-boot.bin. In this case, u-boot-dtb.bin is generally used. Here, u-boot-dtb.bin = u-boot.bin + u-boot.dtb We need u-boot-dtb.img to use both SPL framework and separate OF control at the same time. u-boot-dtb.img = uImage header + u-boot-dtb.bin For example, Zynq boards already define all of - CONFIG_SPL - CONFIG_OF_CONTROL - CONFIG_OF_SEPARATE So, the support of u-boot-dtb.img is urgent. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Michal Simek <michal.simek@xilinx.com> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-14zynq: treat ps7_init.c/h as external files to ignore themMasahiro Yamada
ps7_init.c and ps7_init.h are supposed to be exported by hw project and copied to board/xilinx/zynq/ directory. We want them to be ignored by git. So what we should do is to always treat them as external files rather than replacing ps7_init.c This commit does: - Move a weak function ps7_init() to arch/arm/cpu/armv7/zynq/spl.c and delete board/xilinx/zynq/ps7_init.c - Compile board/xilinx/zynq/ps7_init.c only when it exists - Add .gitignore to ignore ps7_init.c/h Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-14zynq: add empty xil_io.h to avoid compile errorMasahiro Yamada
ps7_init.c exported by hw project has #include "xil_io.h" line but U-Boot does not have "xil_io.h". So we get an error on SPL build: ps7_init.c:12581:20: fatal error: xil_io.h: No such file or directory We can delete the include directive in ps7_init.c to avoid this error. But it is painful to do this every time we export ps7_init.c file. Instead, we can put an empty xil_io.h in the same directory so we can directly copy ps7_init.c as is. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Tom Rini <trini@ti.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-14ARM: zynq: Extend maximum number of command argumentsMichal Simek
15 was too small for variables stored in file on MMC. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-14ARM: zynq: Enable EXT4 configsSiva Durga Prasad Paladugu
Enabled the EXT4 configs. Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-14ARM: zynq: Move USB/SD/MMC common FAT configsSiva Durga Prasad Paladugu
Moved the USB/SD/MMC common FAT configs separately to avoid redefinition warnings. Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-14ARM: zynq: Enable the FAT write capabilitySiva Durga Prasad Paladugu
Enable the FAT write capability for SD/MMC write functionality. Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-14ARM: zynq: Added USB host support for zynq boardsSiva Durga Prasad Paladugu
Added configs to support USB host for zynq boards. Also added a command usbboot to boot from usb. Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-14ARM: zynq: ehci: Added USB host driver supportMichal Simek
Added USB host driver for zynq. Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-14ARM: zynq: Add MIO detection codeMichal Simek
Add run-time MIO pin detection to get actual pin configuration for specific periphery. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-14ARM: zynq: Extend kernel image size to 60MBMichal Simek
Extend max kernel image size. Gunzip is checking this value. If kernel is larger, message below is shown. Uncompressing Kernel Image ... Error: inflate() returned -5 GUNZIP: uncompress, out-of-mem or overwrite error - must RESET board to recover Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-14ARM: zynq: Fix building SPL without FPGA supportMichal Simek
When CONFIG_FPGA is defined but CONFIG_SPL_FPGA is not, the build fails: board.c: In function 'board_init': board.c:41:3: error: 'fpga' undeclared (first use in this function) fpga = fpga010; Fix this by expanding the "#if.." around this block to match the other FPGA checks and don't compile this block when buildign for SPL without FPGA support. Tested a bootloader that had CONFIG_FPGA defined without CONFIG_SPL_FPGA, this now compiles without errors and loading FPGA from u-boot works. Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-14ARM: zynq: Fix bootmode maskMike Looijmans
Bootmode mask was defined as 0x0F, but documentation mentions 0x07. Experiments show that bit "3" is the JTAG chain configuration. Change the mask to "7" to allow systems with a different chain configuration to boot correctly. Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Acked-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-14ARM: zynq: Setup correct slcr_lock valueMichal Simek
The driver should setup slcr state according to slcr operations. Reported-by: Andrey Filippov <andrey@elphel.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-14ARM: zynq: slcr: Fix incorrect commentaryMichal Simek
Fix c&p error in zynq_slcr_devcfg_enable() commentary and extending it with description according to Zynq TRM also in zynq_slcr_devcfg_disable(). Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-14ARM: zynq: Call zynq board_init() in SPLMichal Simek
Call board_init() if SPL is configured with CONFIG_SPL_BOARD_INIT. Signed-off-by: Michal Simek <monstr@monstr.eu>
2014-05-14ARM: zynq: Do not use half memory size for ECC caseMichal Simek
Memory size should be specified without ECC place. If you need to have half memory size, please change u-boot configuration. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-14ARM: zynq: Added efuse status register base addressSiva Durga Prasad Paladugu
Added efuse status register base address. This register is used for determining whether efuse was blown or not. Also, added the zynq_get_silicon_version() to get the silicon version of the zynq board. Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-14ARM: zynq: Remove sparse warningsMichal Simek
Warnings: board/xilinx/zynq/board.c:17:13: warning: symbol 'fpga' was not declared. Should it be static? board/xilinx/zynq/board.c:20:13: warning: symbol 'fpga010' was not declared. Should it be static? board/xilinx/zynq/board.c:21:13: warning: symbol 'fpga015' was not declared. Should it be static? board/xilinx/zynq/board.c:22:13: warning: symbol 'fpga020' was not declared. Should it be static? board/xilinx/zynq/board.c:23:13: warning: symbol 'fpga030' was not declared. Should it be static? board/xilinx/zynq/board.c:24:13: warning: symbol 'fpga045' was not declared. Should it be static? board/xilinx/zynq/board.c:25:13: warning: symbol 'fpga100' was not declared. Should it be static? board/xilinx/zynq/board.c:120:5: warning: symbol 'board_mmc_init' was not declared. Should it be static? Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-14ARM: zynq: Fix sparse warning in ddrc.cMichal Simek
Warning: arch/arm/cpu/armv7/zynq/ddrc.c:43:24: warning: Using plain integer as NULL pointer Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-14ARM: zynq: Fix sparse warnings in slcr.cMichal Simek
Warnings: arch/arm/cpu/armv7/zynq/slcr.c:21:6: warning: symbol 'zynq_slcr_lock' was not declared. Should it be static? arch/arm/cpu/armv7/zynq/slcr.c:27:6: warning: symbol 'zynq_slcr_unlock' was not declared. Should it be static? arch/arm/cpu/armv7/zynq/slcr.c:34:6: warning: symbol 'zynq_slcr_cpu_reset' was not declared. Should it be static? arch/arm/cpu/armv7/zynq/slcr.c:54:6: warning: symbol 'zynq_slcr_gem_clk_setup' was not declared. Should it be static? arch/arm/cpu/armv7/zynq/slcr.c:81:6: warning: symbol 'zynq_slcr_devcfg_disable' was not declared. Should it be static? arch/arm/cpu/armv7/zynq/slcr.c:94:6: warning: symbol 'zynq_slcr_devcfg_enable' was not declared. Should it be static? arch/arm/cpu/armv7/zynq/slcr.c:107:5: warning: symbol 'zynq_slcr_get_boot_mode' was not declared. Should it be static? arch/arm/cpu/armv7/zynq/slcr.c:113:5: warning: symbol 'zynq_slcr_get_idcode' was not declared. Should it be static? Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-13Merge branch 'fpga' of git://www.denx.de/git/u-boot-microblazeTom Rini
2014-05-13Merge branch 'master' of git://git.denx.de/u-boot-videoTom Rini
2014-05-13fpga: zynq: Use helper function zynq_validate_bitstreamSiva Durga Prasad Paladugu
Use helper function zynq_validate_bitstream so that the code can be reused easily for different cases of dma transfer. Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-13fpga: zynq: Use helper functions for zynq dmaSiva Durga Prasad Paladugu
Use zynq_dma_xfer_init, zynq_align_dma_buffer, zynq_dma_transfer helper function performing dma transfers so that the code can be reused easily for different cases of dma transfer. Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-13fpga: zynq: Remove sparse warningsMichal Simek
Warnings: drivers/fpga/zynqpl.c:150:32: warning: Using plain integer as NULL pointer drivers/fpga/zynqpl.c:152:16: warning: Using plain integer as NULL pointer Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-13fpga: xilinx: Simplify load/dump/info function handlingMichal Simek
Connect FPGA version with appropriate operations to remove huge switch-cases for every FPGA family. Tested on Zynq. Spartan2/Spartan3/Virtex2 just compile test. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-13fpga: xilinx: Fix the rest of CamelCasesMichal Simek
No functional changes. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-13fpga: xilinx: Avoid CamelCase for in Xilinx_descMichal Simek
No functional changes. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-13fpga: virtex2: Avoid CamelCaseMichal Simek
No functional changes. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-13fpga: spartan3: Avoid CamelCaseMichal Simek
No functional changes. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-13fpga: spartan2: Avoid CamelCaseMichal Simek
No functional changes. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-12kbuild: Fix trailing whitespacesMichal Simek
Trivial fix. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-05-12net/designware: call phy_connect_dev() to properly setup phylib deviceIan Campbell
This sets up the linkage from the phydev back to the ethernet device. This symptom of not doing this which I noticed was: <NULL> Waiting for PHY auto negotiation to complete.... rather than: dwmac.1c50000 Waiting for PHY auto negotiation to complete.... Signed-off-by: Ian Campbell <ijc@hellion.org.uk> Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
2014-05-12boards.cfg: Keep entries sortedFabio Estevam
Run "tools/reformat.py -i -d '-' -s 8 <boards.cfg >boards0.cfg && mv boards0 in order to keep the entries sorted. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2014-05-12fs/fat: correct FAT16/12 file finding in root dirWu, Josh
When write a file into FAT file system, it will search a match file in root dir. So the find_directory_entry() will get the first cluster of root dir content and search the directory item one by one. If the file is not found, we will call get_fatent_value() to get next cluster of root dir via lookup the FAT table and continue the search. The issue is in FAT16/12 system, we cannot get root dir's next clust from FAT table. The FAT table only be use to find the clust of data aera in FAT16/12. In FAT16/12 if the clust is in root dir, the clust number is a negative number or 0, 1. Since root dir is located in front of the data area. Data area start clust #2. So the root dir clust number should < 2. This patch will check above situation before call get_fatenv_value(). If curclust is < 2, include minus number, we just increase one on the curclust since root dir is in continous cluster. The patch also add a sanity check for entry in get_fatenv_value(). Signed-off-by: Josh Wu <josh.wu@atmel.com>
2014-05-12fs: fat_write: fix the incorrect last cluster checkingWu, Josh
In fat_write.c, the last clust condition check is incorrect: if ((curclust >= 0xffffff8) || (curclust >= 0xfff8)) { ... ... } For example, in FAT32 if curclust is 0x11000. It is a valid clust. But on above condition check, it will be think as a last clust. So the correct last clust check should be: in fat32, curclust >= 0xffffff8 in fat16, curclust >= 0xfff8 in fat12, curclust >= 0xff8 This patch correct the last clust check. Signed-off-by: Josh Wu <josh.wu@atmel.com>
2014-05-12fs/fat: add fat12 cluster checkWu, Josh
Signed-off-by: Josh Wu <josh.wu@atmel.com>
2014-05-12fs:ext4:write:fix: Reinitialize global variables after updating a fileŁukasz Majewski
This bug shows up when file stored on the ext4 file system is updated. The ext4fs_delete_file() is responsible for deleting file's (e.g. uImage) data. However some global data (especially ext4fs_indir2_block), which is used during file deletion are left unchanged. The ext4fs_indir2_block pointer stores reference to old ext4 double indirect allocated blocks. When it is unchanged, after file deletion, ext4fs_write_file() uses the same pointer (since it is already initialized - i.e. not NULL) to return number of blocks to write. This trunks larger file when previous one was smaller. Lets consider following scenario: 1. Flash target with ext4 formatted boot.img (which has uImage [*] on itself) 2. Developer wants to upload their custom uImage [**] - When new uImage [**] is smaller than the [*] - everything works correctly - we are able to store the whole smaller file with corrupted ext4fs_indir2_block pointer - When new uImage [**] is larger than the [*] - theCRC is corrupted, since truncation on data stored at eMMC was done. 3. When uImage CRC error appears, then reboot and LTHOR/DFU reflashing causes proper setting of ext4fs_indir2_block() and after that uImage[**] is successfully stored (correct uImage [*] metadata is stored at an eMMC on the first flashing). Due to above the bug was very difficult to reproduce. This patch sets default values for all ext4fs_indir* pointers/variables. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
2014-05-12fs:ext4:cleanup: Remove superfluous codeŁukasz Majewski
Code responsible for handling situation when ext4 has block size of 1024B can be ordered to take less space. This patch does that for ext4 common and write files. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
2014-05-12disk: part_efi: add support for the Backup GPTSteve Rae
Check the Backup GPT table if the Primary GPT table is invalid. Renamed "Secondary GPT" to "Backup GPT" as per: UEFI Specification (Version 2.3.1, Errata A) Signed-off-by: Steve Rae <srae@broadcom.com>
2014-05-12common/board_f: Fix size variableYork Sun
DRAM size should use 64-bit variable when the size could be more than 4GB. Caught and verified on P4080DS with 4GB DDR. Signed-off-by: York Sun <yorksun@freescale.com> Acked-by: Simon Glass <sjg@chromium.org>
2014-05-12common/board_f: Initialized global data for generic boardYork Sun
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 <yorksun@freescale.com> CC: Scott Wood <scottwood@freescale.com> CC: Simon Glass <sjg@chromium.org> CC: Albert ARIBAUD <albert.u.boot@aribaud.net> Acked-by: Simon Glass <sjg@chromium.org>
2014-05-12Trivial fix to .gitignore for spl/MakefileRalph Siemsen
Trivial fix to .gitignore for spl/Makefile According to the gitignore man page: "An optional prefix "!" which negates the pattern; any matching file excluded by a previous pattern will become included again." ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ So the directory exclude "/spl/*" must come before the exception for spl/Makefile otherwise it has no effect. Signed-off-by: Ralph Siemsen <ralphs@netwinder.org> Tested-by: Masahiro Yamada <yamada.m@jp.panasonic.com> [on git v1.7.9.5 / v1.8.3.2]
2014-05-12cmd_bootm.c: Only say XIP image when load is image_startTom Rini
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 <trini@ti.com>
2014-05-12tools: env: Add aes.c placeholderMarek Vasut
Add missing aes.c placeholder which includes lib/aes.c . Without this one, tools/env/ will fail to build. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com> Cc: Masahiro Yamada <yamada.m@jp.panasonic.com> Tested-by: Alexey Brodkin <abrodkin@synopsys.com> Tested-by: Heiko Schocher <hs@denx.de>
2014-05-12nand_spl: remove unused linker scripts u-boot-nand.ldsMasahiro Yamada
Commit 345b77ba removed some nand_spl boards but it missed to delete linker scripts. These linker scripts are not used now. And one more fix: amcc/acadia does not support nand_spl anymore, so remove #if !defined(CONFIG_NAND_U_BOOT) ... #endif Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Stefan Roese <sr@denx.de> Acked-by: Stefan Roese <sr@denx.de>
2014-05-12config: remove platform CONFIG_SYS_HZ definition part 4Masahiro Yamada
Some new boards define CONFIG_SYS_HZ again! Remove. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Bo Shen <voice.shen@atmel.com>
2014-05-12cosmetic: delete misleading comment /* CONFIG_BOARDDIR */Masahiro Yamada
CONFIG_BOARDDIR is not referenced in these linker scripts. The comment /* CONFIG_BOARDDIR */ is misleading. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-05-12hush shell: Avoid string write overflow when entering max cmd lengthKristian Otnes
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>