1
0
Fork 0
Commit Graph

24865 Commits (ecd1446fe1df00d7f7b9de286dba309d93b51870)

Author SHA1 Message Date
Alexander Holler ecd1446fe1 Add option -r to env import to allow import of text files with CRLF as line endings
When this option is enabled, CRLF is treated like LF when importing environments
from text files, which means CRs ('\r') in front of LFs ('\n') are just ignored.

Drawback of enabling this option is that (maybe exported) variables which have
a trailing CR in their content will get imported without that CR. But this
drawback is very unlikely and the big advantage of letting Windows user create
a *working* uEnv.txt too is likely more welcome.

Signed-off-by: Alexander Holler <holler@ahsoftware.de>
2014-07-22 07:44:26 -04:00
Tom Rini 8973601c38 h2200: Disable SHA256 on FIT images
This board is close in binary size to one of its hard limits, so disable
SHA256 FIT image support to gain some breathing room.

Signed-off-by: Tom Rini <trini@ti.com>
2014-07-22 07:44:26 -04:00
Pavel Machek fccacd3b4c lib/time.c cleanups
As I initially suspected overflow in time handling, I took a detailed
look at lib/time.c. This adds comments about units being used, reduces
amount of type casting being done, and makes __udelay() always wait at
least one tick. (Current code could do no delaying at all for short
delays).

Signed-off-by: Pavel Machek <pavel@denx.de>
2014-07-22 07:44:26 -04:00
Jeroen Hofstee 288afdc9b9 common: cmd_ide: use __weak and add prototypes
clang chokes about the concept of having an alias to an
always_inlined function. gcc likely just ignores the always
inlined since binary sizes are equal before and after this
patch. Convert the aliases to weak functions and provide
missing prototypes.

cc: Pavel Herrmann <morpheus.ibis@gmail.com>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-07-22 07:44:26 -04:00
Jeroen Hofstee 2bb8eb8ec6 common: cmd_ide: remove PIO mode
Since no board defines CONFIG_TUNE_PIO this is just dead
code, so remove it.

cc: Pavel Herrmann <morpheus.ibis@gmail.com>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-07-22 07:44:26 -04:00
Masahiro Yamada 5b9587ae31 serial: ns16550: use a const variable instead of macro
Just for type checking.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
2014-07-22 07:44:25 -04:00
Masahiro Yamada f8c7c2033d serial: ns16550: use DIV_ROUND_CLOSEST macro to compute the divisor
The function still returns the same value.

The comment block is no longer necessary because our intention is
clear enough by using DIV_ROUND_CLOSEST() macro.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-07-22 07:44:25 -04:00
Masahiro Yamada 841977df21 serial: ns16550: drop CONFIG_OMAP1610 from the special case
If CONFIG_OMAP1610 is defined, the code returning the fixed value (26)
is enabled. But this case is covered by the following code.

(CONFIG_SYS_NS16550_CLK + (gd->baudrate * (MODE_X_DIV / 2))) /
    (MODE_X_DIV * gd->baudrate)
= (48000000 + (115200 * (16 / 2))) / (16 * 115200)
= 48921600 / 1843200
= 26

The "#ifdef CONFIG_OMAP1610" was added by commit 6f21347d more than
ten years ago. In those days, the divide-and-round was not used.
I guess that is why this weird code was added here.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
Cc: Rishi Bhattacharya <rishi@ti.com>
2014-07-22 07:44:25 -04:00
Pavel Machek 8e8d73b4a5 bootp can use mdelay
Cleanup bootp code by using mdelay.

Signed-off-by: Pavel Machek <pavel@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
2014-07-22 07:44:25 -04:00
Masahiro Yamada c13bb16757 spl: nand: read only in the size of image_header on the first access
For the same reason as in commit 50c8d66d, all the remaining
CONFIG_SYS_NAND_PAGE_SIZE in common/spl/spl_nand.c can be replaced
with sizeof(*header).

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tim Harvey <tharvey@gateworks.com>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
2014-07-22 07:44:25 -04:00
Pavel Machek 949bbd7c86 catch wrong load address passed to fatload / ext2load
If filename is passed instead of address to ext2load or fatload,
u-boot silently accepts that, and uses 0 for load address and default
filename from environment. That is confusing, display help instead.

Signed-off-by: Pavel Machek <pavel@denx.de>
2014-07-22 07:44:25 -04:00
Pavel Machek 6b367467f1 Fix help text of ext2load and fatload.
Fix help text of ext2load and fatload to match code in fs/fs.c

Signed-off-by: Pavel Machek <pavel@denx.de>
Reviewed-by: Marek Vasut <marex@denx.de>
2014-07-22 07:44:25 -04:00
Jeroen Hofstee 9d16e93dc2 tools: compiler.h: add missing time.h
genimg_print_time uses time_t, but time.h is never included.
Linux gets away with this since types.h includes time.h.
Explicitly include the header file so building on e.g. FreeBSD
also works.

cc: Tom Rini <trini@ti.com>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-07-22 07:44:25 -04:00
Lijun Pan 4a755f1da5 driver/usb: include upper/lower_32_bits() from linux/compat.h
upper_32_bits() and lower_32_bits() have been ported into linux/compat.h.
Start use them now in drivers/usb/host/xhci.h.

Signed-off-by: Lijun Pan <Lijun.Pan@freescale.com>
2014-07-22 07:44:24 -04:00
Lijun Pan 8f2df5d369 linux/compat.h: port lower_32_bits and upper_32_bits from Linux
[backport from linux commit 204b885e and 218e180e7]
64 bit processors are becomming more and more popular.
lower_32_bits and upper_32_bits save our labor doing
shifts/manipulations like (u32)(n) and (u32)((n) >> 32).
They are good helpers in both little and big endian cases.
Port these two functions here from Linux:include/linux/kernel.h,
cater the comment message to little/big endian cases.
Later on, developers could include linux/compat.h if they want to
use these two functions.

Signed-off-by: Lijun Pan <Lijun.Pan@freescale.com>
2014-07-22 07:44:24 -04:00
Masahiro Yamada 9d78b9ae8d sparc: merge LEON2 and LEON3 linker scripts
There is only one line diff between LEON2 and LEON3 linker scripts:

  -             arch/sparc/cpu/leon2/start.o (.text)
  +             arch/sparc/cpu/leon3/start.o (.text)

They can be written in the same way:

                */start.o (.text)

So, board/gaisler/grsim_leon2/u-boot.lds
and arch/sparc/cpu/leon3/u-boot.lds
can be merged into arch/sparc/cpu/u-boot.lds.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Daniel Hellstrom <daniel@gaisler.com>
2014-07-22 07:44:24 -04:00
Masahiro Yamada 9f847b8201 sparc: merge LEON3 linker scripts
The linker scripts of LEON3

 - board/gaisler/grsim/u-boot.lds
 - board/gaisler/gr_cpci_ax2000/u-boot.lds
 - board/gaisler/gr_ep2s60/u-boot.lds
 - board/gaisler/gr_xc3s_1500/u-boot.lds

are the same (except cosmetic differences such as indentation).

This commit merges them into arch/sparc/cpu/leon3/u-boot.lds.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Daniel Hellstrom <daniel@gaisler.com>
2014-07-22 07:44:24 -04:00
Tom Rini ec4f5040f7 esd:cmd_loadpci.c: Switch from "do_source" to "source"
Rather than calling do_source directly (which is not officially exported
from cmd_source.c) call 'source' which is exported and requires a little
less code to do so as well.

Signed-off-by: Tom Rini <trini@ti.com>
2014-07-22 07:44:24 -04:00
Tom Rini 3364b1898c Merge branch 'master' of git://git.denx.de/u-boot-i2c 2014-07-21 11:04:10 -04:00
Jeroen Hofstee c68112f3f5 common: cmd_mii: fix printf format warning
The and operator implicitly upcasts the value to
int, hence the format should expect an int type
as well. (and make checkpatch happy)

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-07-18 17:53:24 -04:00
Jeroen Hofstee 39e1230ed0 autoboot: add its own header
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-07-18 17:53:24 -04:00
Jeroen Hofstee 5dfd162eea board: rpi_b: include mmc header and fix prototype
While at it add fdt_support.h as well.

cc: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-07-18 17:53:24 -04:00
Jeroen Hofstee 750121c350 mmc: prevent some warnings with make W=1
Add missing prototypes for global functions and
make local functions static.

cc: panto@antoniou-consulting.com
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-07-18 17:53:24 -04:00
Jeroen Hofstee 0b7df65657 common: env_common: make env_get_char_spec __weak
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-07-18 17:53:24 -04:00
Jeroen Hofstee 862c93e96e yaffs2: preprocessor cleanup
Current code uses the preprocessor to change an else case
to a statement without any if condition at all. Although
this works, change the optional code to return early, so
all optional code is contained within a single #ifdef.

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-07-18 17:53:23 -04:00
Jeroen Hofstee e803fa2c4b yaffs2: cosmetic: remove self assignments
Remove self assignments which is just dead code to prevent
compiler warnings about non used arguments. For u-boot this
does not prevent any warning though, on the contrary it actual
introduces warnings when compiling with clang. Remove them.

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-07-18 17:53:23 -04:00
Jeroen Hofstee 82c3a4c445 common: bootm_os: make arch_preboot_os __weak
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-07-18 17:53:23 -04:00
Jeroen Hofstee cee9ab7cb6 dirvers: mmc: use __weak
use weak instead of alias to prevent some clang warnings.
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-07-18 17:53:23 -04:00
Jeroen Hofstee d7b2d9df02 lib:vsprintf: reduce scope of pack_hex_byte
pack_hex_byte is only used when CONFIG_CMD_NET is
defined so limit it to that scope. This prevents
a clang warning.

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-07-18 17:53:23 -04:00
Jeroen Hofstee 3ea664c7c3 env_callback.h: spl: mark callback as maybe_unused
When static inline is used in a header file the function
should preferably be inlined and if not possible made a
static function. When declared inside a c file there is a
static function, which might be inlined. Since SPL uses a
define to declare the static inline it becomes part of the
c file although it is declared in a header and clang will
warn that you have introduced unused static functions. Add
maybe_unused to prevent such warnings.

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-07-18 17:53:23 -04:00
Jeroen Hofstee 6b13f0c050 lib:sha1: remove unused constant
This prevents a clang warning.
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-07-18 17:53:23 -04:00
Jeroen Hofstee 3422299dc2 common: main.c: make show_boot_progress __weak
This not only looks a bit better it also prevents a
warning with W=1 (no previous prototype).

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Acked-by: Simon Glass <sjg@chromium.org>
2014-07-18 17:53:23 -04:00
Jeroen Hofstee 2c34f3f547 lib:lmb: use __weak
This not only looks a bit better it also prevents a
warning with W=1 (no previous prototype).

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-07-18 17:53:23 -04:00
Jeroen Hofstee cc64b92cde common:splash: use __weak
This not only looks a bit better it also prevents a
warning with W=1 (no previous prototype).

cc: agust@denx.de
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-07-18 17:53:23 -04:00
Jeroen Hofstee fd536d818d dm: add missing includes
lists.c / root.c do not include their own header and they
could potentially implement a different function. Therefore
actually include the headers.

cc: sjg@chromium.org
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Acked-by: Simon Glass <sjg@chromium.org>
2014-07-18 17:53:23 -04:00
Jeroen Hofstee c5d4001a1c common: board_f: cosmetic use __weak for leds
First of all this looks a lot better, but it also
prevents a gcc warning (W=1), that the weak function
has no previous prototype.

cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Acked-by: Simon Glass <sjg@chromium.org>
2014-07-18 17:53:23 -04:00
Jeroen Hofstee 0e350f81e1 common: commands: make commands static
Since most commands are not public, make them static. This
prevents warnings that no common prototype is available.

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-07-18 17:53:23 -04:00
Jeroen Hofstee e259d6a320 lib: div64: add missing include
Include the function its prototype to prevent the warning
that it has no prototype.

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-07-18 17:53:22 -04:00
Jeroen Hofstee c15df21fe7 mtd: cfi_flash: fix clang warning
clang warns this check is silly; it is since s is
a local variable.

u-boot/drivers/mtd/cfi_flash.c:2363:13: warning: comparison of
  array 's' not equal to a null pointer is always true
  else if ((s != NULL) && (strcmp(s, "yes") == 0)) {

cc: Stefan Roese <sr@denx.de>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-07-18 17:53:22 -04:00
Shengzhou Liu a17fd10fb5 fsl_i2c: add support for 3rd and 4th I2C
Add support for 3rd and 4th I2C.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
2014-07-16 05:19:15 +02:00
Heiko Schocher f7c1053535 i2c, omap24xx: add i2c deblock sequenz
If a bus busy is detected when intializing the driver,
toggle 9 times the scl pin. Therefore enable the test mode
of the controller, in which the scl, sda pins can be
controlled manually.

Tested on the siemens boards pxm2, rut and dxr2.

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Tom Rini <trini@ti.com>
Cc: Hannes Petermaier <oe5hpm@oevsv.at>
Cc: Lubomir Popov <lpopov@mm-sol.com>
Cc: Steve Sakoman <steve@sakoman.com>
Cc: Sandeep Paulraj <s-paulraj@ti.com>
Cc: Vincent Stehlé <v-stehle@ti.com>
Cc: Samuel Egli <samuel.egli@siemens.com>
2014-07-16 05:18:55 +02:00
Tom Rini 524123a707 Prepare v2014.07
Signed-off-by: Tom Rini <trini@ti.com>
2014-07-14 13:16:45 -04:00
Pavel Machek 2cc0ea72ef socfpga: timer actually counts down
Timer on cyclone5 actually counts down. It took me a while to figure
out, as timer counting in wrong direction actually _can_ be used, it
just appears to tick at extremely high frequency in u-boot.

The bug was introduced in commit
23ab7ee0ff.

Signed-off-by: Pavel Machek <pavel@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
2014-07-14 11:21:35 -04:00
Lokesh Vutla 4ec3f6e510 ARM: DRA7xx: Update the board_name env variable
Update the board_name env variable and accordingly
populate the dtb file.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2014-07-14 11:16:38 -04:00
Masahiro Yamada 75e6cd2799 boards.cfg: change "<none>" in the board field to "-"
In the previous commit, all the board fields were filled.

Now we can use "-" in the board field for a different meaning.

Going forward, "-" stands for no board directory
as in cpu, soc, vendor fields.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-07-14 10:55:58 -04:00
Masahiro Yamada 5b0421e67c boards.cfg: keep it sorted filling the board field
The boards.cfg file has allowed to use "-" for the board (= 6th) field
if the board name is the same as the 7th field.

But I notice one problem.
Because tools/reformat.py sorts the lines in the simple alphabetical
order (= the order of character code), some entries for the same board
are not lined up together.

For example, "bf527-ezkit" and "bf527-ezkit-v2" share the same board.
But they are located separately because "bf527-ezkit" fills the board
field with "-" whereas "bf527-ezkit-v2" specifies it explicitely.

The similar things can be seen:
 - between "trizepsive" and "polaris"
 - between "RRvision" and "RRvision_LCD"
 - between "korat" and "korat_perm"
 - between "lwmon5" and "lcd4_lwmon5"

This commit was generated by the following command:

awk '$6 == "-" { $6 = $7 } { print }' boards.cfg \
  | tools/reformat.py -i -d '-' -s 8  > boards0.cfg; \
  mv boards0.cfg boards.cfg

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-07-14 10:55:56 -04:00
Tom Rini 84f24ac827 Merge branch 'master' of git://www.denx.de/git/u-boot-imx 2014-07-11 14:54:48 -04:00
Eric Nelson e153333eeb i.MX6DL/S: add drive-strength back to pads DISP0_DAT2/DAT10
The pad settings for DISP0_DATA02 and DISP0_DAT10 were not
set in the same way as DISP0_DAT00-23, causing much flicker
in parallel RGB displays on Dual-Lite and Solo processors.

These settings now match the i.MX6 Dual and Quad core versions.

Note that this fixes a regression in commit b47abc3 and that
this is the second time we've had a regression on these two
pads (See commit e654ddf).

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
2014-07-10 15:23:56 +02:00
Felipe Balbi 5ba95541b7 usb: phy: omap_usb_phy: implement usb_phy_power() for AM437x
Newer AM437x silicon requires us to explicitly power up
the USB2 PHY. By implementing usb_phy_power() we can
achieve that.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-07-09 22:11:51 +02:00
Felipe Balbi 26707d9e6b usb: host: xhci: make sure to power up PHY
some boards won't work if the PHY isn't explicitly
powered up.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-07-09 22:11:51 +02:00