oweals/u-boot.git
10 years agoMerge branch 'master' of git://git.denx.de/u-boot-sh
Tom Rini [Fri, 25 Jul 2014 19:05:09 +0000 (15:05 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-sh

10 years agosh: unify sh2/sh3/sh4 linker scripts
Masahiro Yamada [Fri, 20 Jun 2014 07:40:14 +0000 (16:40 +0900)]
sh: unify sh2/sh3/sh4 linker scripts

The linker scripts of sh2/sh3/sh4 are almost the same.
The difference among them is essentially only one line.

They can be consolidated into a single file, arch/sh/cpu/u-boot.lds
by re-writing the diffrent line as follows:

KEEP(*/start.o (.text))

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
10 years agobuildman: Avoid retrying a build if it definitely failed
Simon Glass [Sun, 13 Jul 2014 20:03:41 +0000 (14:03 -0600)]
buildman: Avoid retrying a build if it definitely failed

After a build fails buildman will reconfigure and try again, if it did not
reconfigure before the build. However it doesn't actually keep track of
whether it did reconfigure on the previous attempt.

Fix that logic to avoid a pointless rebuild. This speeds things up quite a
bit for failing builds. Previously they would always be built twice.

Change-Id: Ib37f21320baa7c60bed98f4042c0b7ed7c0dc85e
Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agobuildman: Add -F flag to retry failed builds
Simon Glass [Sun, 13 Jul 2014 18:22:31 +0000 (12:22 -0600)]
buildman: Add -F flag to retry failed builds

Generally a build failure with a particular commit cannot be fixed except
by changing that commit. Changing the commit will automatically cause
buildman to retry when you run it again: buildman sees that the commit
hash is different and that it has no previous build result for the new
commit hash.

However sometimes the build failure is due to a toolchain issue or some
other environment problem. In that case, retrying failed builds may yield
a different result.

Add a flag to retry failed builds. This differs from the force rebuild
flag (-f) in that it will not rebuild commits which are already marked as
succeeded.

Series-to: u-boot

Change-Id: Iac4306df499d65ff0888b1c60f06fc162a6faad8

10 years agodm: Give the demo uclass a name
Simon Glass [Wed, 23 Jul 2014 12:55:24 +0000 (06:55 -0600)]
dm: Give the demo uclass a name

Uclasses should be named, so add a name for the demo uclass.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: Add dm_scan_other() to locate board-specific devices
Simon Glass [Wed, 23 Jul 2014 12:55:23 +0000 (06:55 -0600)]
dm: Add dm_scan_other() to locate board-specific devices

Some boards will have devices which are not in the device tree and do not
have platform data. They may be programnatically created, for example.
Add a hook which boards can use to bind those devices early in boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: Improve errors and warnings in lists_bind_fdt()
Simon Glass [Wed, 23 Jul 2014 12:55:22 +0000 (06:55 -0600)]
dm: Improve errors and warnings in lists_bind_fdt()

Add a debug message for when a device tree node has no driver. Also reword
the warning when a device fails to bind, which was misleading.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: Add child_pre_probe() and child_post_remove() methods
Simon Glass [Wed, 23 Jul 2014 12:55:21 +0000 (06:55 -0600)]
dm: Add child_pre_probe() and child_post_remove() methods

Some devices (particularly bus devices) must track their children, knowing
when a new child is added so that it can be set up for communication on the
bus.

Add a child_pre_probe() method to provide this feature, and a corresponding
child_post_remove() method.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: Introduce per-child data for devices
Simon Glass [Wed, 23 Jul 2014 12:55:20 +0000 (06:55 -0600)]
dm: Introduce per-child data for devices

Some device types can have child devices and want to store information
about them. For example a USB flash stick attached to a USB host
controller would likely use this space. The controller can hold
information about the USB state of each of its children.

The data is stored attached to the child device in the 'parent_priv'
member. It can be auto-allocated by dm when the child is probed. To
do this, add a per_child_auto_alloc_size value to the parent driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: Add functions to access a device's children
Simon Glass [Wed, 23 Jul 2014 12:55:19 +0000 (06:55 -0600)]
dm: Add functions to access a device's children

Devices can have childen that can be addressed by a simple index, the
sequence number or a device tree offset. Add functions to access a child
in each of these ways.

The index is typically used as a fallback when the sequence number is not
available. For example we may use a serial UART with sequence number 0 as
the console, but if no UART has sequence number 0, then we can fall back
to just using the first UART (index 0).

The device tree offset function is useful for buses, where they want to
locate one of their children. The device tree can be scanned to find the
offset of each child, and that offset can then find the device.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: Provide a function to scan child FDT nodes
Simon Glass [Wed, 23 Jul 2014 12:55:18 +0000 (06:55 -0600)]
dm: Provide a function to scan child FDT nodes

At present only root nodes in the device tree are scanned for devices.
But some devices can have children. For example a SPI bus may have
several children for each of its chip selects.

Add a function which scans subnodes and binds devices for each one. This
can be used for the root node scan also, so change it.

A device can call this function in its bind() or probe() methods to bind
its children.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: Tidy up some header file comments
Simon Glass [Wed, 23 Jul 2014 12:55:17 +0000 (06:55 -0600)]
dm: Tidy up some header file comments

Fix up the style of a few comments and add/clarify a few others.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agofdt: Add a function to get the node offset of an alias
Simon Glass [Wed, 23 Jul 2014 12:55:16 +0000 (06:55 -0600)]
fdt: Add a function to get the node offset of an alias

This simple function returns the node offset of a named alias.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: Avoid accessing uclasses before they are ready
Simon Glass [Wed, 23 Jul 2014 12:55:15 +0000 (06:55 -0600)]
dm: Avoid accessing uclasses before they are ready

Don't allow access to uclasses before they have been initialised.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: Allow a device to be found by its FDT offset
Simon Glass [Wed, 23 Jul 2014 12:55:14 +0000 (06:55 -0600)]
dm: Allow a device to be found by its FDT offset

Each device that was bound from a device tree has an node that caused it to
be bound. Add functions that find and return a device based on a device tree
offset.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: Display the sequence number for each device
Simon Glass [Wed, 23 Jul 2014 12:55:13 +0000 (06:55 -0600)]
dm: Display the sequence number for each device

Add this information to 'dm tree' and 'dm uclass' commands.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: Introduce device sequence numbering
Simon Glass [Wed, 23 Jul 2014 12:55:12 +0000 (06:55 -0600)]
dm: Introduce device sequence numbering

In U-Boot it is pretty common to number devices from 0 and access them
on the command line using this numbering. While it may come to pass that
we will move away from this numbering, the possibility seems remote at
present.

Given that devices within a uclass will have an implied numbering, it
makes sense to build this into driver model as a core feature. The cost
is fairly small in terms of code and data space.

With each uclass having numbered devices we can ask for SPI port 0 or
serial port 1 and receive a single device.

Devices typically request a sequence number using aliases in the device
tree. These are resolved when the device is probed, to deal with conflicts.
Sequence numbers need not be sequential and holes are permitted.

At present there is no support for sequence numbers using static platform
data. It could easily be added to 'struct driver_info' if needed, but it
seems better to add features as we find a use for them, and the use of -1
to mean 'no sequence' makes the default value somewhat painful.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: Avoid activating devices in 'dm uclass' command
Simon Glass [Wed, 23 Jul 2014 12:55:11 +0000 (06:55 -0600)]
dm: Avoid activating devices in 'dm uclass' command

This command currently activates devices as it lists them. This is not
desirable since it changes the system state. Fix it and avoid printing
a newline if there are no devices in a uclass.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: Move device display into its own function
Simon Glass [Wed, 23 Jul 2014 12:55:10 +0000 (06:55 -0600)]
dm: Move device display into its own function

The device display for 'dm tree' and 'dm uclass' is mostly the same, so
move it into a common function.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agofdt: Add a function to get the alias sequence of a node
Simon Glass [Wed, 23 Jul 2014 12:55:09 +0000 (06:55 -0600)]
fdt: Add a function to get the alias sequence of a node

Aliases are used to provide U-Boot's numbering of devices, such as:

aliases {
spi0 = "/spi@12330000";
}

spi@12330000 {
...
}

This tells us that the SPI controller at 12330000 is considered to be the
first SPI controller (SPI 0). So we have a numbering for the SPI node.

Add a function that returns the numbering for a node assume that it exists
in the list of aliases.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: Move uclass error checking/probing into a function
Simon Glass [Wed, 23 Jul 2014 12:55:08 +0000 (06:55 -0600)]
dm: Move uclass error checking/probing into a function

Several functions will use this same pattern, so bring it into a function.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agoAdd a flag indicating when the serial console is ready
Simon Glass [Wed, 23 Jul 2014 12:55:07 +0000 (06:55 -0600)]
Add a flag indicating when the serial console is ready

For sandbox we have a fallback console which is used very early in
U-Boot, before serial drivers are available. Rather than try to guess
when to switch to the real console, add a flag so we can be sure. This
makes sure that sandbox can always output a panic() message, for example,
and avoids silent failure (which is very annoying in sandbox).

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agoconsole: Remove vprintf() optimisation for sandbox
Simon Glass [Wed, 23 Jul 2014 12:55:06 +0000 (06:55 -0600)]
console: Remove vprintf() optimisation for sandbox

If the console is not present, we try to reduce overhead by stopping any
output in vprintf(), before it gets to putc(). This is of dubious merit
in general, but in the case of sandbox it is incorrect since we have a
fallback console which reports errors very early in U-Boot. If this is
defeated U-Boot can hang or exit with no indication of what is wrong.

Remove the optimisation for sandbox.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agostdio: Provide functions to add/remove devices using stdio_dev
Simon Glass [Wed, 23 Jul 2014 12:55:05 +0000 (06:55 -0600)]
stdio: Provide functions to add/remove devices using stdio_dev

The current functions for adding and removing devices require a device name.
This is not convenient for driver model, which wants to store a pointer to
the relevant device. Add new functions which provide this feature and adjust
the old ones to call these.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: Support driver model prior to relocation
Simon Glass [Wed, 23 Jul 2014 12:55:04 +0000 (06:55 -0600)]
dm: Support driver model prior to relocation

Initialise devices marked 'pre-reloc' and make them available prior to
relocation. Note that this requires pre-reloc malloc() to be available.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: Allow drivers to be marked 'before relocation'
Simon Glass [Wed, 23 Jul 2014 12:55:03 +0000 (06:55 -0600)]
dm: Allow drivers to be marked 'before relocation'

Driver model currently only operates after relocation is complete. In this
state U-Boot typically has a small amount of memory available. In adding
support for driver model prior to relocation we must try to use as little
memory as possible.

In addition, on some machines the memory has not be inited and/or the CPU
is not running at full speed or the data cache is off. These can reduce
execution performance, so the less initialisation that is done before
relocation the better.

An immediately-obvious improvement is to only initialise drivers which are
actually going to be used before relocation. On many boards the only such
driver is a serial UART, so this provides a very large potential benefit.

Allow drivers to mark themselves as 'pre-reloc' which means that they will
be initialised prior to relocation. This can be done either with a driver
flag or with a 'dm,pre-reloc' device tree property.

To support this, the various dm scanning function now take a 'pre_reloc_only'
parameter which indicates that only drivers marked pre-reloc should be
bound.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agosandbox: Remove all drivers before exit
Simon Glass [Wed, 23 Jul 2014 12:55:02 +0000 (06:55 -0600)]
sandbox: Remove all drivers before exit

Drivers are supposed to be able to close down cleanly. To set a good example,
make sandbox shut down its driver model drivers and remove them before exit.

It may be desirable to do the same more generally once driver model is more
widely-used. This could be done during bootm, before U-Boot jumps to the OS.
It seems far too early to make this change.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: Provide a way to shut down driver model
Simon Glass [Wed, 23 Jul 2014 12:55:01 +0000 (06:55 -0600)]
dm: Provide a way to shut down driver model

Add a new method which removes and unbinds all drivers.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Marek Vasut <marex@denx.de>
10 years agodm: Make sure that the root device is probed
Simon Glass [Wed, 23 Jul 2014 12:55:00 +0000 (06:55 -0600)]
dm: Make sure that the root device is probed

The root device should be probed just like any other device. The effect of
this is to mark the device as activated, so that it can be removed (along
with its children) if required.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Marek Vasut <marex@denx.de>
10 years agostdio: Pass device pointer to stdio methods
Simon Glass [Wed, 23 Jul 2014 12:54:59 +0000 (06:54 -0600)]
stdio: Pass device pointer to stdio methods

At present stdio device functions do not get any clue as to which stdio
device is being acted on. Some implementations go to great lengths to work
around this, such as defining a whole separate set of functions for each
possible device.

For driver model we need to associate a stdio_dev with a device. It doesn't
seem possible to continue with this work-around approach.

Instead, add a stdio_dev pointer to each of the stdio member functions.

Note: The serial drivers have the same problem, but it is not strictly
necessary to fix that to get driver model running. Also, if we convert
serial over to driver model the problem will go away.

Code size increases by 244 bytes for Thumb2 and 428 for PowerPC.

22: stdio: Pass device pointer to stdio methods
       arm: (for 2/2 boards)  all +244.0  bss -4.0  text +248.0
   powerpc: (for 1/1 boards)  all +428.0  text +428.0

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Marek Vasut <marex@denx.de>
Reviewed-by: Marek Vasut <marex@denx.de>
10 years agostdio: Remove redundant code around stdio_register() calls
Simon Glass [Wed, 23 Jul 2014 12:54:58 +0000 (06:54 -0600)]
stdio: Remove redundant code around stdio_register() calls

There is no point in setting a structure's memory to NULL when it has
already been zeroed with memset().

Also, there is no need to create a stub function for stdio to call - if the
function is NULL it will not be called.

This is a clean-up, with no change in functionality.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Marek Vasut <marex@denx.de>
10 years agodm: Use an explicit expect value in core tests
Simon Glass [Wed, 23 Jul 2014 12:54:57 +0000 (06:54 -0600)]
dm: Use an explicit expect value in core tests

Rather than reusing the 'reg' property, use an explicit property for the
expected ping value used in testing.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: gpio: Don't use the driver model uclass for SPL
Simon Glass [Wed, 23 Jul 2014 12:54:56 +0000 (06:54 -0600)]
dm: gpio: Don't use the driver model uclass for SPL

Driver model does not support SPL yet, so we should not use the GPIO
uclass for SPL.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agosandbox: Always enable malloc debug
Simon Glass [Fri, 11 Jul 2014 04:23:33 +0000 (22:23 -0600)]
sandbox: Always enable malloc debug

Tun on DEBUG in malloc(). This adds code space and slows things down but
for sandbox this is acceptable. We gain the ability to check for memory
leaks in tests.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agosandbox: config: Enable pre-relocation malloc()
Simon Glass [Fri, 11 Jul 2014 04:23:32 +0000 (22:23 -0600)]
sandbox: config: Enable pre-relocation malloc()

Enable this for sandbox so that we will be able to use driver model before
relocation.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agosandbox: Support pre-relocation malloc()
Simon Glass [Fri, 11 Jul 2014 04:23:31 +0000 (22:23 -0600)]
sandbox: Support pre-relocation malloc()

Set up and zero global data before board_init_f() is called so that we can
remove the need for CONFIG_SYS_GENERIC_GLOBAL_DATA.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agoAdd a simple malloc() implementation for pre-relocation
Simon Glass [Fri, 11 Jul 2014 04:23:28 +0000 (22:23 -0600)]
Add a simple malloc() implementation for pre-relocation

If we are to have driver model before relocation we need to support some
way of calling memory allocation routines.

The standard malloc() is pretty complicated:

1. It uses some BSS memory for its state, and BSS is not available before
relocation

2. It supports algorithms for reducing memory fragmentation and improving
performace of free(). Before relocation we could happily just not support
free().

3. It includes about 4KB of code (Thumb 2) and 1KB of data. However since
this has been loaded anyway this is not really a problem.

The simplest way to support pre-relocation malloc() is to reserve an area
of memory and allocate it in increasing blocks as needed. This
implementation does this.

To enable it, you need to define the size of the malloc() pool as described
in the README. It will be located above the pre-relocation stack on
supported architectures.

Note that this implementation is only useful on machines which have some
memory available before dram_init() is called - this includes those that
do no DRAM init (like tegra) and those that do it in SPL (quite a few
boards). Enabling driver model preior to relocation for the rest of the
boards is left for a later exercise.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agosandbox: Set up global data before board_init_f()
Simon Glass [Fri, 11 Jul 2014 04:23:27 +0000 (22:23 -0600)]
sandbox: Set up global data before board_init_f()

At present sandbox defines CONFIG_SYS_GENERIC_GLOBAL_DATA, meaning that
the global_data pointer is set up in board_init_f().

If we set up and zero the global data before calling board_init_f() then we
don't need to define CONFIG_SYS_GENERIC_GLOBAL_DATA.

Make this change to simplify the init process.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agoRemove form-feeds from dlmalloc.c
Simon Glass [Fri, 11 Jul 2014 04:23:25 +0000 (22:23 -0600)]
Remove form-feeds from dlmalloc.c

These don't really serve any purpose in the modern age. On the other hand
they show up as annoying control characters in my editor, which then happily
removes them.

I believe we can drop these characters from the file.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agom68k: define __kernel_size_t as unsinged int again
Masahiro Yamada [Tue, 22 Jul 2014 01:57:19 +0000 (10:57 +0900)]
m68k: define __kernel_size_t as unsinged int again

Commit ddc94378d changed the definition of __kernel_size_t
from unsigned int to unsigned long.

It is true that it fixed warnings on some crosstools
but it increased warnings on the others.

The problem is that we cannot see consistency in terms of
the typedef of __kernel_size_t on M68K architecture.

However, I'd like to suggest to have __kernel_size_t to be
unsigned int again.

Rationale:

[1] Linux Kernel defines __kernel_size_t on M68K as unsigned int.
    Let's stick to the Linux's way.

[2] We want to build boards with popular pre-built toolchains,
    not the one locally-built by indivisuals.
    I think m68-linux-gcc which can be downloaded from www.kernel.org
    is the candidate for our _recommended_ toolchains.

With this patch, all the m68k boards can be built without any warnings.

Give it a try with the following crosstools:

https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.6.3/
x86_64-gcc-4.6.3-nolibc_m68k-linux.tar.xz

or

https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/
x86_64-gcc-4.9.0-nolibc_m68k-linux.tar.xz

(The latter is newer.)

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Jason Jin <Jason.jin@freescale.com>
10 years agom68k: fix an undefined behavior warning of M5253DEMO board
Masahiro Yamada [Tue, 22 Jul 2014 01:57:18 +0000 (10:57 +0900)]
m68k: fix an undefined behavior warning of M5253DEMO board

The latest GCC is so clever that it reports more warnings
than old ones did:

 ------------------------------>8------------------------------

  board/freescale/m5253demo/flash.c: In function 'flash_get_offsets':
  board/freescale/m5253demo/flash.c:65:23: warning: iteration 2047u
  invokes undefined behavior [-Waggressive-loop-optimizations]
      info->start[k + 1] = info->start[k] + CONFIG_SYS_SST_SECTSZ;
                         ^
  board/freescale/m5253demo/flash.c:64:3: note: containing loop
     for (k = 0, j = 0; j < CONFIG_SYS_SST_SECT; j++, k++) {
     ^

 ------------------------------8<------------------------------

The cause of the warning is like this:

The for statement iterates 2048 times in flash_get_offsets() func.
(Notice CONFIG_SYS_SST_SECT is defined as 2048)

The last iteration does
  info->start[2048] = info->start[2047] + CONFIG_SYS_SST_SECTSZ;
causing an undefined behavior.

(Please note the array size of info->start is 2048.
CONFIG_SYS_MAX_FLASH_SECT is defined as 2048 for this board.)

This commit fixes that so as not to overrun the info->start array.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Jason Jin <Jason.jin@freescale.com>
10 years agoboards.cfg: re-claim ownership for TQM8xx boards
Wolfgang Denk [Tue, 22 Jul 2014 12:20:43 +0000 (14:20 +0200)]
boards.cfg: re-claim ownership for TQM8xx boards

Signed-off-by: Wolfgang Denk <wd@denx.de>
10 years agoEthernet: let user know if there is no valid ethernet address
Pavel Machek [Sun, 13 Jul 2014 08:27:02 +0000 (10:27 +0200)]
Ethernet: let user know if there is no valid ethernet address

Improve error messages in case of invalid/unset ethernet addresses.

Signed-off-by: Pavel Machek <pavel@denx.de>
10 years agoboard_r: run scsi init() on ARM too
Ian Campbell [Mon, 21 Jul 2014 18:23:18 +0000 (19:23 +0100)]
board_r: run scsi init() on ARM too

This has been disabled for ARM in initr_scsi since that function was
introduced. However it works fine for me on Cubieboard and Cubietruck (with the
upcoming AHCI glue patch).

I also tested on two random ARM platforms which seem to define CONFIG_CMD_SCSI:
 - highbank worked fine (on midway hardware)
 - omap5_uevm built OK and I confirmed using objdump that things were as
   expected (i.e. the default weak scsi_init nop was used).

While there remove the mismatched comment from the #endif (omitting the comment
seems to be the prevailing style in this file).

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agoAHCI: Increase link timeout to 200ms
Ian Campbell [Fri, 18 Jul 2014 19:38:39 +0000 (20:38 +0100)]
AHCI: Increase link timeout to 200ms

In 73545f75b66d "ahci: wait longer for link" I increased the
timeout to 40ms based on the observed behaviour of a WD disk on a
Cubietruck. Since then Karsten Merker and myself have both
observed timeouts with HGST disks (Karsten on Cubietruck, me on
Cubieboard2). Increasing the timeout to ~175ms fixes this, so go
to 200ms for a bit of headroom.

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Cc: Karsten Merker <merker@debian.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
10 years ago.gitignore: clean-up unnecessary entries
Masahiro Yamada [Thu, 17 Jul 2014 03:16:43 +0000 (12:16 +0900)]
.gitignore: clean-up unnecessary entries

There have been /errlog and /reloc_off in the top level .gitignore
since commit 1b4aaffe added it about 7 years ago.

But they are no longer generated.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agoUpdate .mailmap using scripts/mailmapper
Masahiro Yamada [Wed, 16 Jul 2014 08:49:46 +0000 (17:49 +0900)]
Update .mailmap using scripts/mailmapper

Add more entries to .mailmap for the canonical names with
50 commits or more.

This commit was generated by the following command:

  scripts/mailmapper > tmp; mv tmp .mailmap

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agoscripts: add mailmapper, a tool to create/update mailmap file
Masahiro Yamada [Wed, 16 Jul 2014 08:49:45 +0000 (17:49 +0900)]
scripts: add mailmapper, a tool to create/update mailmap file

This tool helps to create/update the mailmap file.

It runs 'git shortlog' internally and searches differently spelled author
names which share the same email address. The author name with the most
commits is asuumed to be a canonical real name. If the number of commits
from the cananonical name is equal to or greater than 'MIN_COMMITS' (=50),
the entry for the cananical name will be output. ('MIN_COMMITS' is used
here because we do not want to create a fat mailmap by adding every author
with only a few commits.)

If there exists a mailmap file specified by the mailmap.file configuration
options or '.mailmap' at the toplevel of the repository, it is used as
a base file.

The base file and the newly added entries are merged together and sorted
alphabetically (but the comment block is kept untouched), and then printed
to standard output.

 Usage
 -----

  scripts/mailmapper

prints the mailmapping to standard output.

  scripts/mailmapper > tmp; mv tmp .mailmap

will be useful for updating '.mailmap' file.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agoadd .mailmap for proper git-shortlog output
Masahiro Yamada [Wed, 16 Jul 2014 08:49:44 +0000 (17:49 +0900)]
add .mailmap for proper git-shortlog output

This is the first version of .mailmap created by hand.
Please see "man git-shortlog" for what this commit is trying to do.

Without this file, for example, "git shortlog -n -s" shows as follows:

  2693  Wolfgang Denk     <------
  1002  Stefan Roese      <------
   811  wdenk             <------
   808  Mike Frysinger
   806  Simon Glass
     [snip]
   177  Matthias Fuchs
   154  stroese           <------
   153  Timur Tabi

And then, with this file, it shows as follows:

  3504  Wolfgang Denk     <------
  1156  Stefan Roese      <------
   808  Mike Frysinger
   806  Simon Glass

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
10 years agowhitespace cleanups
Pavel Machek [Sat, 19 Jul 2014 21:50:44 +0000 (23:50 +0200)]
whitespace cleanups

Whitespace cleanups.

Signed-off-by: Pavel Machek <pavel@denx.de>
10 years agoMakefile: fix tags target documentation
Igor Grinberg [Tue, 15 Jul 2014 12:52:02 +0000 (15:52 +0300)]
Makefile: fix tags target documentation

Replace the TAGS target name by the actual ctags target name.
Also, add etags target documentation.

Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
10 years agoMakefile: fix ctags/etags clean targets
Igor Grinberg [Tue, 15 Jul 2014 12:52:01 +0000 (15:52 +0300)]
Makefile: fix ctags/etags clean targets

Commit efcf861 (kbuild: use scripts/Makefile.clean)
refactored the cleaning targets and accidentially replaced the actually
generated "ctags" and "etags" files in the file list by "tags" and "TAGS".
"tags" and "TAGS" are not part of the Makefile build targets and
therefore should not be a part of the list for clean targets.

Substitute the actually generated files instead, to fix the clean
targets behavior.

Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
10 years agoMakefile: fix the {c, e}tags/cscope build targets
Igor Grinberg [Tue, 15 Jul 2014 12:52:00 +0000 (15:52 +0300)]
Makefile: fix the {c, e}tags/cscope build targets

Commit 9e41403 (kbuild: change out-of-tree build)
changed the U-Boot build working directory to the output tree
for the out-of-tree builds.
This broke the {c,e}tags/cscope build targets as TAG_SUBDIRS variable
collected directories based on assumption that the build working
directory is the U-Boot source tree directory.

Fix the {c,e}tags/cscope build targets by adding the $(srctree) prefix.
Also, remove the $(obj) prefix from the etags build target to finish
the $(obj) prefix removal started by the same commit.

Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
10 years agorpi_b: handle import of environments in files with CRLF as line endings
Alexander Holler [Mon, 14 Jul 2014 15:49:58 +0000 (17:49 +0200)]
rpi_b: handle import of environments in files with CRLF as line endings

Use the new option -r for env import.

Signed-off-by: Alexander Holler <holler@ahsoftware.de>
10 years agoam335x_evm: handle import of environments in files with CRLF as line endings
Alexander Holler [Mon, 14 Jul 2014 15:49:57 +0000 (17:49 +0200)]
am335x_evm: handle import of environments in files with CRLF as line endings

Use the new option -r for env import.

Signed-off-by: Alexander Holler <holler@ahsoftware.de>
10 years agoomap3_beagle: handle import of environments in files with CRLF as line endings
Alexander Holler [Mon, 14 Jul 2014 15:49:56 +0000 (17:49 +0200)]
omap3_beagle: handle import of environments in files with CRLF as line endings

Use the new option -r for env import.

Signed-off-by: Alexander Holler <holler@ahsoftware.de>
10 years agoAdd option -r to env import to allow import of text files with CRLF as line endings
Alexander Holler [Mon, 14 Jul 2014 15:49:55 +0000 (17:49 +0200)]
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>
10 years agoh2200: Disable SHA256 on FIT images
Tom Rini [Tue, 22 Jul 2014 11:43:28 +0000 (07:43 -0400)]
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>
10 years agolib/time.c cleanups
Pavel Machek [Sun, 13 Jul 2014 11:14:27 +0000 (13:14 +0200)]
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>
10 years agocommon: cmd_ide: use __weak and add prototypes
Jeroen Hofstee [Sat, 12 Jul 2014 13:07:19 +0000 (15:07 +0200)]
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>
10 years agocommon: cmd_ide: remove PIO mode
Jeroen Hofstee [Sat, 12 Jul 2014 13:07:18 +0000 (15:07 +0200)]
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>
10 years agoserial: ns16550: use a const variable instead of macro
Masahiro Yamada [Fri, 11 Jul 2014 11:29:04 +0000 (20:29 +0900)]
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>
10 years agoserial: ns16550: use DIV_ROUND_CLOSEST macro to compute the divisor
Masahiro Yamada [Fri, 11 Jul 2014 11:29:03 +0000 (20:29 +0900)]
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>
10 years agoserial: ns16550: drop CONFIG_OMAP1610 from the special case
Masahiro Yamada [Fri, 11 Jul 2014 11:29:02 +0000 (20:29 +0900)]
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>
10 years agobootp can use mdelay
Pavel Machek [Fri, 11 Jul 2014 09:39:37 +0000 (11:39 +0200)]
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>
10 years agospl: nand: read only in the size of image_header on the first access
Masahiro Yamada [Thu, 10 Jul 2014 11:43:16 +0000 (20:43 +0900)]
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>
10 years agocatch wrong load address passed to fatload / ext2load
Pavel Machek [Wed, 9 Jul 2014 20:42:57 +0000 (22:42 +0200)]
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>
10 years agoFix help text of ext2load and fatload.
Pavel Machek [Wed, 9 Jul 2014 20:40:07 +0000 (22:40 +0200)]
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>
10 years agotools: compiler.h: add missing time.h
Jeroen Hofstee [Wed, 25 Jun 2014 21:02:21 +0000 (23:02 +0200)]
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>
10 years agodriver/usb: include upper/lower_32_bits() from linux/compat.h
Lijun Pan [Fri, 20 Jun 2014 17:18:39 +0000 (12:18 -0500)]
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>
10 years agolinux/compat.h: port lower_32_bits and upper_32_bits from Linux
Lijun Pan [Fri, 20 Jun 2014 17:17:29 +0000 (12:17 -0500)]
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>
10 years agosparc: merge LEON2 and LEON3 linker scripts
Masahiro Yamada [Fri, 20 Jun 2014 05:58:22 +0000 (14:58 +0900)]
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>
10 years agosparc: merge LEON3 linker scripts
Masahiro Yamada [Fri, 20 Jun 2014 05:58:21 +0000 (14:58 +0900)]
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>
10 years agoesd:cmd_loadpci.c: Switch from "do_source" to "source"
Tom Rini [Mon, 21 Jul 2014 15:16:07 +0000 (11:16 -0400)]
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>
10 years agoMerge branch 'master' of git://git.denx.de/u-boot-i2c
Tom Rini [Mon, 21 Jul 2014 15:04:10 +0000 (11:04 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-i2c

10 years agocommon: cmd_mii: fix printf format warning
Jeroen Hofstee [Sun, 13 Jul 2014 21:44:21 +0000 (23:44 +0200)]
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>
10 years agoautoboot: add its own header
Jeroen Hofstee [Sun, 13 Jul 2014 20:57:58 +0000 (22:57 +0200)]
autoboot: add its own header

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agoboard: rpi_b: include mmc header and fix prototype
Jeroen Hofstee [Sun, 13 Jul 2014 20:01:51 +0000 (22:01 +0200)]
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>
10 years agommc: prevent some warnings with make W=1
Jeroen Hofstee [Sat, 12 Jul 2014 19:24:08 +0000 (21:24 +0200)]
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>
10 years agocommon: env_common: make env_get_char_spec __weak
Jeroen Hofstee [Sat, 12 Jul 2014 13:22:13 +0000 (15:22 +0200)]
common: env_common: make env_get_char_spec __weak

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agoyaffs2: preprocessor cleanup
Jeroen Hofstee [Sat, 12 Jul 2014 13:16:52 +0000 (15:16 +0200)]
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>
10 years agoyaffs2: cosmetic: remove self assignments
Jeroen Hofstee [Sat, 12 Jul 2014 13:16:51 +0000 (15:16 +0200)]
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>
10 years agocommon: bootm_os: make arch_preboot_os __weak
Jeroen Hofstee [Thu, 10 Jul 2014 21:06:25 +0000 (23:06 +0200)]
common: bootm_os: make arch_preboot_os __weak

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agodirvers: mmc: use __weak
Jeroen Hofstee [Thu, 10 Jul 2014 20:46:28 +0000 (22:46 +0200)]
dirvers: mmc: use __weak

use weak instead of alias to prevent some clang warnings.
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agolib:vsprintf: reduce scope of pack_hex_byte
Jeroen Hofstee [Thu, 10 Jul 2014 20:33:00 +0000 (22:33 +0200)]
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>
10 years agoenv_callback.h: spl: mark callback as maybe_unused
Jeroen Hofstee [Thu, 10 Jul 2014 18:38:35 +0000 (20:38 +0200)]
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>
10 years agolib:sha1: remove unused constant
Jeroen Hofstee [Thu, 10 Jul 2014 18:12:45 +0000 (20:12 +0200)]
lib:sha1: remove unused constant

This prevents a clang warning.
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
10 years agocommon: main.c: make show_boot_progress __weak
Jeroen Hofstee [Thu, 26 Jun 2014 18:18:31 +0000 (20:18 +0200)]
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>
10 years agolib:lmb: use __weak
Jeroen Hofstee [Thu, 26 Jun 2014 18:04:37 +0000 (20:04 +0200)]
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>
10 years agocommon:splash: use __weak
Jeroen Hofstee [Thu, 26 Jun 2014 17:53:16 +0000 (19:53 +0200)]
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>
10 years agodm: add missing includes
Jeroen Hofstee [Wed, 25 Jun 2014 19:57:45 +0000 (21:57 +0200)]
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>
10 years agocommon: board_f: cosmetic use __weak for leds
Jeroen Hofstee [Mon, 23 Jun 2014 21:20:19 +0000 (23:20 +0200)]
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>
10 years agocommon: commands: make commands static
Jeroen Hofstee [Sun, 22 Jun 2014 22:22:08 +0000 (00:22 +0200)]
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>
10 years agolib: div64: add missing include
Jeroen Hofstee [Sun, 22 Jun 2014 21:24:04 +0000 (23:24 +0200)]
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>
10 years agomtd: cfi_flash: fix clang warning
Jeroen Hofstee [Tue, 17 Jun 2014 20:47:31 +0000 (22:47 +0200)]
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>
10 years agofsl_i2c: add support for 3rd and 4th I2C
Shengzhou Liu [Mon, 7 Jul 2014 04:17:48 +0000 (12:17 +0800)]
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>
10 years agoi2c, omap24xx: add i2c deblock sequenz
Heiko Schocher [Mon, 30 Jun 2014 07:12:09 +0000 (09:12 +0200)]
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>
10 years agoPrepare v2014.07 v2014.07
Tom Rini [Mon, 14 Jul 2014 17:16:45 +0000 (13:16 -0400)]
Prepare v2014.07

Signed-off-by: Tom Rini <trini@ti.com>
10 years agosocfpga: timer actually counts down
Pavel Machek [Sun, 13 Jul 2014 11:10:45 +0000 (13:10 +0200)]
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
23ab7ee0ffa9d5efd0b4ad830befba306d24a327.

Signed-off-by: Pavel Machek <pavel@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
10 years agoARM: DRA7xx: Update the board_name env variable
Lokesh Vutla [Mon, 14 Jul 2014 14:27:58 +0000 (19:57 +0530)]
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>