1
0
Fork 0
Commit Graph

24738 Commits (2f78eae5064728d6cd907148cfeaf8ba3e63b0ef)

Author SHA1 Message Date
Simon Glass aa69db1f7a Avoid including config.h in command.h
This is not necessary and prevents using this header when building tools.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-06-19 11:19:01 -04:00
Simon Glass e3c83c0a1f Fix small 'case' typo in image-fit.c
This typo makes the comment confusing. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-06-19 11:19:00 -04:00
Simon Glass 07c0cd7134 bootm: Support android boot on sandbox
A small change allows this to operate on sandbox.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-06-19 11:19:00 -04:00
Simon Glass 126cc86420 image: Remove the fit_load_image() property parameter
This can be obtained by looking up the image type, so is redundant. It is
better to centralise this lookup to avoid errors.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-06-19 11:18:59 -04:00
Simon Glass b639640371 bootm: Split out code from cmd_bootm.c
This file has code in three different categories:
- Command processing
- OS-specific boot code
- Locating images and setting up to boot

Only the first category really belongs in a file called cmd_bootm.c.

Leave the command processing code where it is. Split out the OS-specific
boot code into bootm_os.c. Split out the other code into bootm.c

Header files and extern declarations are tidied but otherwise no code
changes are made, to make it easier to review.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-06-19 11:18:58 -04:00
Simon Glass 12df2abe3e Reverse the meaning of the fit_config_verify() return code
It is more common to have 0 mean OK, and -ve mean error. Change this
function to work the same way to avoid confusion.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-06-19 11:18:58 -04:00
Simon Glass ba923cab00 tools: Check arguments in fit_check_sign/fit_info
These tools crash if no arguments are provided. Add checks to avoid this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
2014-06-19 11:18:57 -04:00
Simon Glass d18926af30 fdt: Rename the DEV_TREE_BIN Makefile flag to to EXT_DTB
This seems like a better name. This is a patch-up to the earlier commit
63b4b5b, and also removes a redundant Makefile change.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-06-19 11:18:56 -04:00
Simon Glass 597a8b2c68 mkimage: Automatically expand FDT in more cases
The original code did not cover every case and there was a missing negative
sign in one case. Expand the coverage and fix the bug.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-06-19 11:18:56 -04:00
Simon Glass 04819a4ff1 hash: Use uint8_t in preference to u8
This type is more readily available on the host compiler, so use it instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-06-19 11:18:55 -04:00
Tom Rini 52aa1cf5ec am335x_evm: Only enable OF_CONTROL/OF_SEPARATE on VBOOT for now
We don't make use of the device tree otherwise yet (and will need to
think how to not break the current multi-board support) and this causes
further breakage with additional changes.

Signed-off-by: Tom Rini <trini@ti.com>
2014-06-19 11:18:54 -04:00
Masahiro Yamada 0ffc986ac8 .gitignore: drop include/asm/proc from ignore pattern
Commit 7d89982b stopped creating symbolic link
arch/${arch}/include/asm/proc.

arch/.gitignore should be updated.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Vasili Galka <vvv444@gmail.com>
2014-06-19 11:18:54 -04:00
Stephen Warren d018028055 fs: ext4: fix writing zero-length files
ext4fs_allocate_blocks() always allocates at least one block for a file.
If the file size is zero, this causes total_remaining_blocks to
underflow, which then causes an apparent hang while 2^32 blocks are
allocated.

To solve this, check that total_remaining_blocks is non-zero as part of
the loop condition (i.e. before each loop) rather than at the end of
the loop.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
2014-06-19 11:18:53 -04:00
Masahiro Yamada 50babaf852 fdt_support: correct the return condition of fdt_initrd()
Before this commit, fdt_initrd() just returned if initrd
start address is zero.
But it is possible if the RAM is located at address 0.

This commit makes the return condition more reasonable:
Just return if the size of initrd is zero.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-06-19 11:18:52 -04:00
Masahiro Yamada f18295d383 fdt_support: fix an endian bug of fdt_initrd()
Data written to DTB must be converted to big endian order.
It is usually done by using cpu_to_fdt32(), cpu_to_fdt64(), etc.

fdt_initrd() invoked write_cell(), which always swaps byte order.
It means the function only worked on little endian architectures.
(On big endian architectures, the byte order should be kept as it is)

This commit uses cpu_to_fdt32() and cpu_to_fdt64()
and deletes write_cell().

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-06-19 11:18:51 -04:00
Masahiro Yamada 739a01ed8e fdt_support: fix an endian bug of fdt_fixup_memory_banks
Data written to DTB must be converted to big endian order.
It is usually done by using cpu_to_fdt32(), cpu_to_fdt64(), etc.

fdt_fixup_memory_banks() invoked write_cell(), which always
swaps byte order.
It means the function only worked on little endian architectures.

This commit adds and uses a new helper function, fdt_pack_reg(),
which works on both big endian and little endian architrectures.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-06-19 11:18:51 -04:00
Masahiro Yamada f89d482fe5 fdt_support: add 'const' qualifier for unchanged argument
In the next commit, I will add a new function, fdt_pack_reg()
which uses get_cells_len().

Beforehand, this commit adds 'const' qualifier to get_cells_len().
Otherwise, a warning message will appear:
 warning: passing argument 1 of 'get_cells_len' discards 'const'
 qualifier from pointer target type [enabled by default]

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-06-19 11:18:50 -04:00
Masahiro Yamada 972f2a8905 fdt_support: refactor fdt_fixup_stdout() function
- Do not use a deep indentation. We have only 80-character
   on each line and 1 indentation consumes 8 spaces. Before the
   code moves far to the right, you should consider to
   fix your code. See Linux Documentation/CodingStyle.

 - Add CONFIG_OF_STDOUT_VIA_ALIAS and OF_STDOUT_PATH macros
   only to their definition. Do not add them to both
   callee and caller. This is a tip to avoid using #ifdef
   everywhere.

 - OF_STDOUT_PATH and CONFIG_OF_STDOUT_VIA_ALIAS are exclusive.
   If both are defined, the former takes precedence.
   Do not try to fix-up "linux,stdout-path" property twice.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-06-19 11:18:49 -04:00
Masahiro Yamada bc6ed0f9dc fdt_support: delete force argument of fdt_chosen()
After all, we have realized "force" argument is completely
useless. fdt_chosen() was always called with force = 1.

We should always want to do the same thing
(set appropriate value to the property)
even if the property already exists.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-06-19 11:18:48 -04:00
Masahiro Yamada dbe963ae51 fdt_support: delete force argument of fdt_initrd()
After all, we have realized "force" argument is completely
useless. fdt_initrd() was always called with force = 1.

We should always want to do the same thing
(set appropriate value to the property)
even if the property already exists.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-06-19 11:18:47 -04:00
Masahiro Yamada 8edb21925e fdt_support: refactor with fdt_find_or_add_subnode helper func
Some functions in fdt_support.c do the same routine:
search a node with a given name ("chosen", "memory", etc.)
or newly create it if it does not exist.

So this commit makes that routine to a helper function.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-06-19 11:18:46 -04:00
Masahiro Yamada 0613c57ce3 fdt_support: delete unnecessary DECLARE_GLOBAL_DATA_PTR
gd->bd is not used in fdt_support.c.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-06-19 11:18:44 -04:00
Masahiro Yamada e6af385989 freescale: m5253demo: fix unused-but-set-variable warnings
Fix the following warning messages:

In function 'flash_erase': 180:21:
warning: variable 'last' set but not used [-Wunused-but-set-variable]
In function 'write_buff':  322:10:
warning: variable 'port_width' set but not used [-Wunused-but-set-variable]

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
2014-06-19 11:18:43 -04:00
Jon Nalley af67b25250 libfdt: Fix segfault when calling fit_check_format() on corrupt FIT images
It has been observed that fit_check_format() will fail when passed a
corrupt FIT image.  This was tracked down to _fdt_string_eq():
return (strlen(p) == len) && (memcmp(p, s, len) == 0);

In the case of a corrupt FIT image one can't depend on 'p' being NULL
terminated.  I changed it to use strnlen() to fix the issue.

Signed-off-by: Tom Rini <trini@ti.com>
2014-06-19 11:18:42 -04:00
Chao Fu f1329c9003 m68k:correct io macros about endian
M68k is big endian cpu ,so use be_out and be_in in big endian.

Signed-off-by: Chao Fu <b44548@freescale.com>
2014-06-19 11:18:42 -04:00
Masahiro Yamada 5744e53430 m68k: eliminate a warning in cpu_init
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-06-19 11:18:40 -04:00
Dan Murphy b1f49ab8c7 ARM: fdt support: Add usbethaddr as an acceptable MAC
A board that has a USB ethernet device only may set the usbetheraddr
and not the ethaddr.
ethaddr will be the default MAC address that is chosen and if that
is not populated then the usbethaddr is looked at.  If neither are set
then then device tree blob is not modified.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
2014-06-19 11:18:39 -04:00
Vasili Galka 2e43646782 Fix bug in io64 target (introduced by commit aba27ac)
From comparison of current logic and the logic that was prior to commit
aba27ac, we see that first parameter of FPGA_GET_REG() shall be the
FPGA index and not channel number. The re-factoring in commit aba27ac
accidentally changed that.

Cc: Stefan Roese <sr@denx.de>
Acked-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Signed-off-by: Vasili Galka <vvv444@gmail.com>
2014-06-19 11:18:37 -04:00
Przemyslaw Marczak 4a1883651f trats/trats2: exynos_power_init: return 0 if no battery detected.
Generic board support is now enabled for Exynos 4, and if any
init function returns an error then the init process is stopped.

This makes a boot issue on the Trats and Trats2 devices. If the device
is supplied by USB cable or an external power supply then it can't boot
because function exynos_power_init returns an error. Now this function
returns 0 if battery is not connected.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Piotr Wilczek <p.wilczek@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2014-06-19 09:37:16 +09:00
Michal Simek 7d2357c199 configs: iocon: Enabling CONFIG_CMD_FPGAD again
This is a MIME GnuPG-signed message.  If you see this text, it means that
your E-mail or Usenet software does not support MIME signed messages.
The Internet standard for MIME PGP messages, RFC 2015, was published in 1996.
To open this message correctly you will need to install E-mail or Usenet
software that supports modern Internet standards.

Revert changes in iocon.h config file caused by
these two commits:
"configs: iocom: Fix typo on CMD_FPGA command"
(sha1: d0db28f940)
and
"fpga: Guard the LOADMK functionality with CMD_FPGA_LOADMK"
(sha1: 64e809afea)

CONFIG_CMD_FPGAD is own command.

Reported-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-06-18 13:35:24 -04:00
Tushar Behera f8caed3131 Arndale: Enable preboot support
We need to run 'usb start' as preboot command so that ethernet comes up
during u-boot prompt.

Signed-off-by: Tushar Behera <tushar.b@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2014-06-18 19:21:45 +09:00
Łukasz Majewski 34ecd69445 FIX: config: goni: Change goni configuration to store envs at eMMC
Up till now goni's configuration has been stored at OneNAND. Since u-boot
itself is now stored at eMMC it is more handy to store envs there as well.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2014-06-18 19:21:34 +09:00
Stefano Babic f2f07e8553 imx: correct HAB status for new chip TO
According to:

http://git.freescale.com/git/cgit.cgi/imx/uboot-imx.git/log/?h=imx_v2009.08_3.0.35_4.1.0

ENGR00287268 mx6: fix the secure boot issue on the new tapout chip
commit 424cb1a79e9f5ae4ede9350dfb5e10dc9680e90b

newer i.MX6 silicon revisions have an updated ROM and HAB API table.
Please see also:

i.MX Applications Processors Documentation
Engineering Bulletins
EB803, i.MX 6Dual/6Quad Applications Processor Silicon Revsion 1.2 to 1.3 Comparison

With this change the secure boot status is correctly displayed

Signed-off-by: Stefano Babic <sbabic@denx.de>
2014-06-17 17:45:09 +02:00
Fabio Estevam a81c90f4c8 mx28evk: Add documentation on how to boot from SPI NOR
Explain the necessary steps in order to boot from SPI NOR.

Based on a earlier submission from Mårten Wikman.

Signed-off-by: Mårten Wikman <marten.wikman@novia.fi>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2014-06-17 16:39:10 +02:00
Fabio Estevam d4c8258812 mx28evk: Add a target for SPI NOR boot
Introduce 'mx28evk_spi' target which will store the environment variables
into SPI NOR, which is useful when booting from SPI NOR.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2014-06-17 16:39:09 +02:00
Fabio Estevam 3aa890525b mx28evk: Fix warning when CONFIG_ENV_IS_IN_SPI_FLASH is selected
When building a target with CONFIG_ENV_IS_IN_SPI_FLASH the following
warning is seen:

include/configs/mx28evk.h:73:0: warning: "CONFIG_ENV_SIZE" redefined [enabled by default]

Protect the definition of CONFIG_ENV_SIZE to avoid the warning.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2014-06-17 16:39:09 +02:00
Fabio Estevam a7650486a5 embestmx6boards: Fix the dtb file name for riotboard
The name of the dtb file used in the kernel is 'imx6dl-riotboard.dtb', so fix
it accordingly.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Tested-by: Iain Paton <ipaton0@gmail.com>
2014-06-17 16:37:21 +02:00
Fabio Estevam fa4a7a4319 embestmx6boards: Fix CONFIG_CONSOLE_DEV
mars and riot boards use UART2 as console, so CONFIG_CONSOLE_DEV should point
to 'ttymxc1' instead.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Tested-by: Iain Paton <ipaton0@gmail.com>
2014-06-17 16:35:53 +02:00
Shawn Guo 4a4784e974 mx6: drop ARM errata 742230
Commit e9fd66defd (ARM: mx6: define CONFIG_ARM_ERRATA_742230) enables
errata 742230 for imx6, because it helps remove one reboot issue.
However, this errata does not really apply on imx6, because Cortex-A9
on imx6 is r2p10 while the errata only applies to revisions r1p0..r2p2.

At a later time, commit f71cbfe3ca (ARM: Add workaround for Cortex-A9
errata 794072) adds support of errata 794072, which applies to all
Cortex-A9 revisions.  As the workaround for both errata are exactly
same, it makes a lot more sense to select 794072 instead of 742230 for
imx6.  Since we already enable 794072 for imx6, it's time to drop
errata 742230 to avoid confusion.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Acked-by: Nitin Garg <nitin.garg@freescale.com>
2014-06-17 16:33:24 +02:00
Marek Vasut 73ff04481f arm: mx5: Enable CONFIG_SYS_GENERIC_BOARD on M53EVK
Signed-off-by: Marek Vasut <marex@denx.de>
2014-06-17 16:30:48 +02:00
Fabio Estevam bad40e089f mx6: Fix definition of IOMUXC_GPR12_DEVICE_TYPE_RC
mx6 reference manual incorrectly states that the DEVICE_TYPE field of
IOMUXC_GPR12 register should be configured as '0010' for setting the PCI
controller in RC mode. The correct value should be '0100' instead.

This also aligns with the same value used in the mx6 pci kernel driver.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Stefano Babic <sbabic@denx.de>
2014-06-17 16:27:51 +02:00
Masahiro Yamada a811db5a8c arm: zynq: fix a bug in Zynq linker script
Commit 41623c91 moved exception handlers to ".vectores" section
but it missed to adjust Zynq linker script.

Zynq boards hang up after relocation because "_start" symbol
does not point to the correct address and gd->relocaddr gets insane.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Michal Simek <monstr@monstr.eu>
Tested-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2014-06-17 12:28:26 +02:00
Łukasz Majewski 0fabb6aff1 FIX: config: goni: Change goni configuration to use Tizen's THOR downlodader
Modify GONI's configuration to utilize THOR downloader.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2014-06-16 13:41:53 +09:00
Tim Schendekehl 6dbeb893c4 arm: ethernut5: convert to generic board
Enable CONFIG_SYS_GENERIC_BOARD for the Ethernut 5 board.

Signed-off-by: Tim Schendekehl <tim.schendekehl@egnite.de>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2014-06-14 18:13:15 +02:00
Wu, Josh d337a09c30 ARMv7: at91: enable ICache and DCache.
For at91 armv7 SoC (SAMA5D3x), only LCD and macb used DMA.
Now as the lcd and macb driver already support dcache. So we can
enable dcache now.

Also we can enable icache without any problem.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2014-06-14 18:07:03 +02:00
Wu, Josh b137bd8c8d video: atmel_hlcdfb: enable dcache support
To support dcache, we need flush DMA descriptor buffer before enable lcd
DMA.

Also we need call lcd_set_flush_dcache(1) to make lcd driver flush the
lcd buffer if there is any change.

Cc: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Acked-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2014-06-14 18:07:02 +02:00
Wu, Josh 5ae0e38278 net: macb: enable dcache in macb
Add to code to flush the dcache after we writing in DMA buffer.
Also we need invalidate the dcache before we check the status in the
DMA buffer.

Tested in SAMA5D3x-EK with gmac0. Tftp download speed shows in below:
	Disable DCache: 1.1 MiB/s
	Enable DCache: 1.6 MiB/s
Increase speed with about 40%.

The code should have no impact with the boards which are not
enable_dcache().
Tested in AT91SAM9M10G45EK.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2014-06-14 18:07:01 +02:00
Andreas Bießmann ceef983bf9 macb: make checkpatch clean
This also renames the CONFIG_SYS_MACB_xx defines. They are used just local and
therefore don't need the CONFIG_SYS_ prefix.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Reviewed-by: Josh Wu <josh.wu@atmel.com>
2014-06-14 18:07:00 +02:00
Andreas Bießmann 0e05543576 avr32: migrate cache functions
Unfortunately the avr32 cache implementation has another API than the one
described in common.h. Migrate the flush/invalidate dcache functions to the
common API to be usable in device drivers.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
CC: Josh Wu <josh.wu@atmel.com>
2014-06-14 18:06:58 +02:00
Akshay Saraswat ed32522fe0 Exynos5420: DMC: Add software read leveling
Sometimes Read DQ and DQS are not in phase. Since, this
phase shift differs from board to board, we need to
calibrate it at DRAM init phase, that's read DQ calibration.
This patch adds SW Read DQ calibration routine to compensate
this skew.

Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Akshay Saraswat <akshay.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2014-06-13 17:05:14 +09:00