]> Git Repo - u-boot.git/log
u-boot.git
9 years agodm: core: Don't set pinctrl for pinctrl devices
Simon Glass [Fri, 22 Jan 2016 02:43:25 +0000 (19:43 -0700)]
dm: core: Don't set pinctrl for pinctrl devices

There is sort-of race condition when a pinctrl device is probed. The pinctrl
function is called which may end up using the same device as is being
probed. This results in operations being used before the device is actually
probed.

For now, disallow pinctrl operations on pinctrl devices while probing. An
alternative solution would be to move the operation to later in the
device_probe() function (for pinctrl devices only) but this needs more
thought.

Signed-off-by: Simon Glass <[email protected]>
9 years agorockchip: kylin: Store env in emmc
Jeffy Chen [Thu, 14 Jan 2016 02:19:41 +0000 (10:19 +0800)]
rockchip: kylin: Store env in emmc

There's a 64K reserved area at the end of the first 4M.
Store env there, so we can use fastboot to flash it.

Signed-off-by: Jeffy Chen <[email protected]>
Acked-by: Simon Glass <[email protected]>
9 years agorockchip: kylin: Check fastboot request
Jeffy Chen [Thu, 14 Jan 2016 02:19:40 +0000 (10:19 +0800)]
rockchip: kylin: Check fastboot request

We will save boot mode flag in grf's os_reg[4], if fastboot
requested or fastboot key pressed, try to enter fastboot mode
at preboot stage.

Signed-off-by: Jeffy Chen <[email protected]>
Acked-by: Simon Glass <[email protected]>
9 years agorockchip: kylin: Add default gpt partition table
Jeffy Chen [Thu, 14 Jan 2016 02:19:38 +0000 (10:19 +0800)]
rockchip: kylin: Add default gpt partition table

Add default android gpt partition table for kylin board.

Use "gpt write mmc 0 $partitions" to apply.

Signed-off-by: Jeffy Chen <[email protected]>
Acked-by: Simon Glass <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
9 years agorockchip: rk3036: Bind GPIO banks
Jeffy Chen [Thu, 14 Jan 2016 02:19:37 +0000 (10:19 +0800)]
rockchip: rk3036: Bind GPIO banks

Call dm_scan_fdt_node() in rk3036 pinctrl uclass binding.

Signed-off-by: Jeffy Chen <[email protected]>
Acked-by: Simon Glass <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
9 years agoARM: bootm: Try to use relocated ramdisk
Jeffy Chen [Thu, 14 Jan 2016 02:19:36 +0000 (10:19 +0800)]
ARM: bootm: Try to use relocated ramdisk

After boot_ramdisk_high(), ramdisk would be relocated to
initrd_start & initrd_end, so use them instead of rd_start & rd_end.

Signed-off-by: Jeffy Chen <[email protected]>
Acked-by: Simon Glass <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
9 years agodm: clk: Add support for decoding clocks from the device tree
Simon Glass [Thu, 21 Jan 2016 02:43:02 +0000 (19:43 -0700)]
dm: clk: Add support for decoding clocks from the device tree

Add a method which can locate a clock for a device, given its index. This
uses the normal device tree bindings to return the clock device and the
first argument which is normally used as a peripheral ID in U-Boot.

Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Masahiro Yamada <[email protected]>
9 years agoclk: add fixed rate clock driver
Masahiro Yamada [Tue, 19 Jan 2016 04:55:28 +0000 (13:55 +0900)]
clk: add fixed rate clock driver

This commit intends to implement "fixed-clock" as in Linux.
(drivers/clk/clk-fixed-rate.c in Linux)

If you need a very simple clock to just provide fixed clock rate
like a crystal oscillator, you do not have to write a new driver.
This driver can support it.

Signed-off-by: Masahiro Yamada <[email protected]>
Acked-by: Simon Glass <[email protected]>
9 years agoMerge git://git.denx.de/u-boot-dm
Tom Rini [Thu, 21 Jan 2016 16:49:49 +0000 (11:49 -0500)]
Merge git://git.denx.de/u-boot-dm

9 years agoMerge branch 'master' of git://git.denx.de/u-boot-i2c; branch 'master' of git://git...
Tom Rini [Thu, 21 Jan 2016 14:12:22 +0000 (09:12 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-i2c; branch 'master' of git://git.denx.de/u-boot-nds32

9 years agosunxi: Add support for the I2C controller which is part of the PRCM
Jelle van der Waa [Thu, 14 Jan 2016 13:06:26 +0000 (14:06 +0100)]
sunxi: Add support for the I2C controller which is part of the PRCM

Signed-off-by: Jelle van der Waa <[email protected]>
[[email protected]: Minor cleanups]
Signed-off-by: Hans de Goede <[email protected]>
applied with fixing 2 checkpatch warnings:
WARNING: please, no space before tabs

Signed-off-by: Heiko Schocher <[email protected]>
9 years agoi2c: mvtwsi: Fix mvtwsi not working on sun6i and newer sunxi SoCs
Hans de Goede [Thu, 14 Jan 2016 13:06:25 +0000 (14:06 +0100)]
i2c: mvtwsi: Fix mvtwsi not working on sun6i and newer sunxi SoCs

On sun6i and newer IFLG is a write-clear bit which is cleared by writing 1,
rather then a normal r/w bit which is cleared by writing 0.

Signed-off-by: Hans de Goede <[email protected]>
applied with fixing 3 checkpatch warnings
in drivers/i2c/mvtwsi.c:
WARNING: line over 80 characters
ERROR: code indent should use tabs where possible
WARNING: please, no spaces at the start of a line

Signed-off-by: Heiko Schocher <[email protected]>
9 years agonds32: Fix compile error.
rick [Tue, 19 Jan 2016 05:52:10 +0000 (13:52 +0800)]
nds32: Fix compile error.

Fix compile error with gcc 4.9.3

Signed-off-by: rick <[email protected]>
Cc: Andes <[email protected]>
9 years agodm: video: test: Test that bitmap display works correctly
Simon Glass [Tue, 19 Jan 2016 02:52:28 +0000 (19:52 -0700)]
dm: video: test: Test that bitmap display works correctly

Add a test for the 'bmp' command. Test both the uncompressed and compressed
versions of the file, since they use different code paths.

Signed-off-by: Simon Glass <[email protected]>
Acked-by: Anatolij Gustschin <[email protected]>
9 years agodm: video: test: Add tests for rotated consoles
Simon Glass [Tue, 19 Jan 2016 02:52:27 +0000 (19:52 -0700)]
dm: video: test: Add tests for rotated consoles

Test that text is displayed correctly when the console is rotated.

Signed-off-by: Simon Glass <[email protected]>
Acked-by: Anatolij Gustschin <[email protected]>
9 years agodm: video: test: Add tests for the video uclass
Simon Glass [Tue, 19 Jan 2016 02:52:26 +0000 (19:52 -0700)]
dm: video: test: Add tests for the video uclass

Add tests that check that the video console is working correcty. Also check
that text output produces the expected result. Test coverage includes
character output, wrapping and scrolling.

Signed-off-by: Simon Glass <[email protected]>
Acked-by: Anatolij Gustschin <[email protected]>
9 years agodm: video: sandbox: Convert sandbox to use driver model for video
Simon Glass [Tue, 19 Jan 2016 02:52:25 +0000 (19:52 -0700)]
dm: video: sandbox: Convert sandbox to use driver model for video

Now that driver model support is available, convert sandbox over to use it.
We can remove a few of the special hooks that sandbox currently has.

Signed-off-by: Simon Glass <[email protected]>
Acked-by: Anatolij Gustschin <[email protected]>
9 years agosandbox: Move CONFIG_VIDEO_SANDBOX_SDL to Kconfig
Simon Glass [Tue, 19 Jan 2016 02:52:24 +0000 (19:52 -0700)]
sandbox: Move CONFIG_VIDEO_SANDBOX_SDL to Kconfig

Move this option to Kconfig. This is quite simple as only sandbox uses the
driver.

Signed-off-by: Simon Glass <[email protected]>
Acked-by: Anatolij Gustschin <[email protected]>
9 years agodm: stdio: video: Plumb the video uclass into stdio
Simon Glass [Tue, 19 Jan 2016 02:52:23 +0000 (19:52 -0700)]
dm: stdio: video: Plumb the video uclass into stdio

Register video drivers with stdio so that they can be used for text output.
This needs to be done explicitly for now. At some point we should be able to
convert stdio itself to driver model and avoid this step.

Signed-off-by: Simon Glass <[email protected]>
Acked-by: Anatolij Gustschin <[email protected]>
9 years agodm: video: Implement the bmp command for driver model
Simon Glass [Tue, 19 Jan 2016 02:52:22 +0000 (19:52 -0700)]
dm: video: Implement the bmp command for driver model

This command can use the bitmap display code in the uclass. This is similar
to the code in lcd.c and cfb_console.c. These other copies will go away when
all boards are converted to use driver model for video.

Signed-off-by: Simon Glass <[email protected]>
Acked-by: Anatolij Gustschin <[email protected]>
9 years agodm: common: Add memory reservation for the video uclass
Simon Glass [Tue, 19 Jan 2016 02:52:21 +0000 (19:52 -0700)]
dm: common: Add memory reservation for the video uclass

Before relocation we need to reserve memory for the video driver frame
buffers so that they can use this memory when they start up (after
relocation). Add a call to the uclass to permit this.

The current top and bottom of the region is stored in global_data so that
it can be checked post-relocation to ensure enough memory is available. No
video device should be probed before relocation.

Signed-off-by: Simon Glass <[email protected]>
Acked-by: Anatolij Gustschin <[email protected]>
9 years agocommon: Move LCD and video memory reservation together
Simon Glass [Tue, 19 Jan 2016 02:52:20 +0000 (19:52 -0700)]
common: Move LCD and video memory reservation together

These two functions are conceptually the same. Move them together in the
pre-relocation init.

Signed-off-by: Simon Glass <[email protected]>
Acked-by: Anatolij Gustschin <[email protected]>
9 years agodm: video: Add a driver for a rotated text console
Simon Glass [Tue, 19 Jan 2016 02:52:19 +0000 (19:52 -0700)]
dm: video: Add a driver for a rotated text console

Sometimes the console must be rotated. Add a driver which supports rotating
the text clockwise to 90, 180 and 270 degrees. This can support devices
where the display is rotated for mechanical reasons.

Signed-off-by: Simon Glass <[email protected]>
Acked-by: Anatolij Gustschin <[email protected]>
9 years agodm: video: Add a 'normal' text console driver
Simon Glass [Tue, 19 Jan 2016 02:52:18 +0000 (19:52 -0700)]
dm: video: Add a 'normal' text console driver

Most of the time we don't need to rotate the display so a simple font
blitting feature is enough for our purposes. Add a simple driver which
supports this function. It provides text output on the console using
the standard 8x16-pixel font.

Signed-off-by: Simon Glass <[email protected]>
Acked-by: Anatolij Gustschin <[email protected]>
9 years agodm: video: Add a uclass for the text console
Simon Glass [Tue, 19 Jan 2016 02:52:17 +0000 (19:52 -0700)]
dm: video: Add a uclass for the text console

The existing LCD/video interface suffers from conflating the bitmap display
with text output on that display. As a result the implementation is more
complex than it needs to me.

We can support multiple text console drivers. Create a separate uclass to
support this, with its own API.

Signed-off-by: Simon Glass <[email protected]>
Acked-by: Anatolij Gustschin <[email protected]>
9 years agodm: lcd: Avoid using the lcd.h header file with driver model
Simon Glass [Tue, 19 Jan 2016 02:52:16 +0000 (19:52 -0700)]
dm: lcd: Avoid using the lcd.h header file with driver model

The LCD functions and definitions are not used with the driver model video
uclass. When all boards are converted over we can remove the file. For now,
use #ifdef to omit the contents.

Signed-off-by: Simon Glass <[email protected]>
Acked-by: Anatolij Gustschin <[email protected]>
9 years agodm: video: Add a video uclass
Simon Glass [Tue, 19 Jan 2016 02:52:15 +0000 (19:52 -0700)]
dm: video: Add a video uclass

U-Boot has separate code for LCDs and 'video' devices. Both now use a
very similar API thanks to earlier work by Nikita Kiryanov. With the driver-
model conversion we should unify these into a single uclass.

Unfortunately there are different features supported by each. This
implementation provides for a common set of features which should serve
most purposes. The intent is to support:

- bitmap devices with 8, 16 and 32 bits per pixel
- text console wih white on black or vice versa
- rotated text console
- bitmap display (BMP format)

More can be added as additional boards are ported over to use driver model
for video.

The name 'video' is chosen for the uclass since it is more generic than LCD.
Another option would be 'display' but that would introduce a third concept
to U-Boot which seems like the wrong approach.

The existing LCD and video init functions are not needed now, so this uclass
makes no attempt to implement them.

Signed-off-by: Simon Glass <[email protected]>
Acked-by: Anatolij Gustschin <[email protected]>
9 years agoarm: ls1021atwr: Enable driver model lpuart serial driver
Bin Meng [Thu, 14 Jan 2016 03:39:06 +0000 (19:39 -0800)]
arm: ls1021atwr: Enable driver model lpuart serial driver

Convert ls1021atwr_nor_lpuart to driver model support. As a start,
enable lpuart serial port driver.

Signed-off-by: Bin Meng <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Reviewed-by: Alison Wang <[email protected]>
Tested-by: Alison Wang <[email protected]>
Acked-by: Simon Glass <[email protected]>
9 years agoarm: ls1021atwr: Split off board device tree
Bin Meng [Thu, 14 Jan 2016 03:39:05 +0000 (19:39 -0800)]
arm: ls1021atwr: Split off board device tree

Move /chosen node out of the board device tree.

Signed-off-by: Bin Meng <[email protected]>
Acked-by: Simon Glass <[email protected]>
9 years agoserial: lpuart: Add driver model serial support
Bin Meng [Thu, 14 Jan 2016 03:39:04 +0000 (19:39 -0800)]
serial: lpuart: Add driver model serial support

This adds driver model support to lpuart serial driver.

Signed-off-by: Bin Meng <[email protected]>
Acked-by: Bhuvanchandra DV <[email protected]>
Tested-by: Bhuvanchandra DV <[email protected]>
9 years agoserial: lpuart: Prepare the driver for DM conversion
Bin Meng [Thu, 14 Jan 2016 03:39:03 +0000 (19:39 -0800)]
serial: lpuart: Prepare the driver for DM conversion

Create internal routines which take lpuart's register base as
a parameter, in preparation for driver model conversion.

Signed-off-by: Bin Meng <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Acked-by: Simon Glass <[email protected]>
9 years agoserial: lpuart: Call local version of setbrg and putc directly
Bin Meng [Thu, 14 Jan 2016 03:39:02 +0000 (19:39 -0800)]
serial: lpuart: Call local version of setbrg and putc directly

There is no need to go through serial driver subsystem, instead
call the driver's setbrg and putc routines directly.

Signed-off-by: Bin Meng <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Acked-by: Simon Glass <[email protected]>
9 years agoserial: lpuart: Fix several cosmetic issues
Bin Meng [Thu, 14 Jan 2016 03:39:01 +0000 (19:39 -0800)]
serial: lpuart: Fix several cosmetic issues

Clean up the driver codes a little bit, by:
- Use tab instead of space in the macro defines
- Use single line comment whenever possible
- Fix insertion of blank lines

Signed-off-by: Bin Meng <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Acked-by: Simon Glass <[email protected]>
9 years agoserial: lpuart: Move CONFIG_FSL_LPUART to Kconfig
Bin Meng [Thu, 14 Jan 2016 03:39:00 +0000 (19:39 -0800)]
serial: lpuart: Move CONFIG_FSL_LPUART to Kconfig

LPUART is seen on Freescale VF610 and QorIQ Layerscape devices.
Create a Kconfig option and move it to defconfig for all boards
that have this serial driver.

Signed-off-by: Bin Meng <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Acked-by: Stefan Agner <[email protected]>
Acked-by: Simon Glass <[email protected]>
9 years agoarm: ls1021atwr: Convert to driver model and enable serial support
Bin Meng [Thu, 14 Jan 2016 03:38:59 +0000 (19:38 -0800)]
arm: ls1021atwr: Convert to driver model and enable serial support

Convert ls1021atwr_nor to driver model support. As a start, enable
ns16550 serial port driver.

Signed-off-by: Bin Meng <[email protected]>
Acked-by: Simon Glass <[email protected]>
9 years agoRevert "fdt_support: Add multi-serial support for stdout fixup"
Bin Meng [Thu, 14 Jan 2016 03:38:58 +0000 (19:38 -0800)]
Revert "fdt_support: Add multi-serial support for stdout fixup"

This reverts commit 3e303f748cf57fb23e8ec95ab7eac0074be50e2b.

The fix up in the /aliases node does not work under the following
scenarios:
- Not every non-DM serial driver was written to have a driver name
  that conforms the format of "serial%d" or "eserial%d".
- With driver model serial, the stdio_devices[] stores the serial
  device node name in the device tree.

Signed-off-by: Bin Meng <[email protected]>
Acked-by: Simon Glass <[email protected]>
9 years agotest/py: add a test for the sleep command
Stephen Warren [Fri, 15 Jan 2016 18:15:31 +0000 (11:15 -0700)]
test/py: add a test for the sleep command

Execute "sleep", and validate that it sleeps for approximately the correct
amount of time.

Signed-off-by: Stephen Warren <[email protected]>
Acked-by: Simon Glass <[email protected]>
9 years agotest/py: test the ums command
Stephen Warren [Fri, 15 Jan 2016 18:15:30 +0000 (11:15 -0700)]
test/py: test the ums command

This test invokes the "ums" command in U-Boot, and validates that a USB
storage device is enumerated on the test host system, and can be read
from.

Signed-off-by: Stephen Warren <[email protected]>
Acked-by: Simon Glass <[email protected]>
9 years agotest/py: test the shell if command
Stephen Warren [Fri, 15 Jan 2016 18:15:29 +0000 (11:15 -0700)]
test/py: test the shell if command

Migrate all most tests from command_ut.c into the Python test system.
This allows the tests to be run against any U-Boot binary that supports
the if command (i.e. where hush is enabled) without requiring that
binary to be permanently bloated with the code from command_ut.

Some tests in command_ut.c can only be executed from C code, since they
test internal (more unit-level) features of various U-Boot APIs. The
migrated tests can all operate directly from the U-Boot console.

Signed-off-by: Stephen Warren <[email protected]>
Acked-by: Simon Glass <[email protected]>
9 years agotest/py: add test of basic shell functionality
Stephen Warren [Fri, 15 Jan 2016 18:15:28 +0000 (11:15 -0700)]
test/py: add test of basic shell functionality

This tests whether the following features of the U-Boot shell:
- Execution of a directly entered command.
- Compound commands (; delimiter).
- Quoting of arguments containing spaces.
- Executing commands from environment variables.

Signed-off-by: Stephen Warren <[email protected]>
Acked-by: Simon Glass <[email protected]>
9 years agotest/py: test the md/mw commands
Stephen Warren [Fri, 15 Jan 2016 18:15:27 +0000 (11:15 -0700)]
test/py: test the md/mw commands

This tests whether md/mw work, and affect each-other.

Command repeat is also tested.

test/cmd_repeat.sh is removed, since the new Python-based test does
everything it used to.

Signed-off-by: Stephen Warren <[email protected]>
Signed-off-by: Stephen Warren <[email protected]>
Acked-by: Simon Glass <[email protected]>
9 years agotest/py: add test of setenv/printenv/echo
Stephen Warren [Fri, 15 Jan 2016 18:15:26 +0000 (11:15 -0700)]
test/py: add test of setenv/printenv/echo

This tests basic environment variable functionality.

Signed-off-by: Stephen Warren <[email protected]>
Signed-off-by: Stephen Warren <[email protected]>
Acked-by: Simon Glass <[email protected]>
9 years agotest/py: test that sandbox exits when asked
Stephen Warren [Fri, 15 Jan 2016 18:15:25 +0000 (11:15 -0700)]
test/py: test that sandbox exits when asked

Test the sandbox port's implementation of the reset command and SIGHUP
handling. These should both cause the U-Boot process to exit gracefully.

Signed-off-by: Stephen Warren <[email protected]>
Signed-off-by: Stephen Warren <[email protected]>
Acked-by: Simon Glass <[email protected]>
9 years agotest/py: Implement pytest infrastructure
Stephen Warren [Fri, 15 Jan 2016 18:15:24 +0000 (11:15 -0700)]
test/py: Implement pytest infrastructure

This tool aims to test U-Boot by executing U-Boot shell commands using the
console interface. A single top-level script exists to execute or attach
to the U-Boot console, run the entire script of tests against it, and
summarize the results. Advantages of this approach are:

- Testing is performed in the same way a user or script would interact
  with U-Boot; there can be no disconnect.
- There is no need to write or embed test-related code into U-Boot itself.
  It is asserted that writing test-related code in Python is simpler and
  more flexible that writing it all in C.
- It is reasonably simple to interact with U-Boot in this way.

A few simple tests are provided as examples. Soon, we should convert as
many as possible of the other tests in test/* and test/cmd_ut.c too.

The hook scripts, relay control utilities, and udev rules I use for my
own HW setup are published at https://github.com/swarren/uboot-test-hooks.

See README.md for more details!

Signed-off-by: Stephen Warren <[email protected]>
Signed-off-by: Stephen Warren <[email protected]>
Tested-by: Michal Simek <[email protected]>
Tested-by: Simon Glass <[email protected]>
Acked-by: Simon Glass <[email protected]> #v3
9 years agopatman: Add --thread option
Mateusz Kulikowski [Thu, 14 Jan 2016 19:37:41 +0000 (20:37 +0100)]
patman: Add --thread option

Add option to create threaded series of patches.
With it, it will be possible to create patch threads like this:
[PATCH 0/10] Add support for time travel
  [PATCH 1/10] Add Flux Capacitor driver
  [PATCH 2/10] Add Mr. Fusion driver
  (...)

Internally it will call git send-email with --thread option

Signed-off-by: Mateusz Kulikowski <[email protected]>
Acked-by: Simon Glass <[email protected]>
9 years agoclk: add API to enable clock
Masahiro Yamada [Wed, 13 Jan 2016 04:16:12 +0000 (13:16 +0900)]
clk: add API to enable clock

The most basic thing for clock is to enable it, but it is missing
in this uclass.

Signed-off-by: Masahiro Yamada <[email protected]>
Acked-by: Simon Glass <[email protected]>
9 years agoclk: add static qualifier to local functions
Masahiro Yamada [Wed, 13 Jan 2016 04:16:10 +0000 (13:16 +0900)]
clk: add static qualifier to local functions

Signed-off-by: Masahiro Yamada <[email protected]>
Acked-by: Simon Glass <[email protected]>
9 years agoclk: add needed include and declaration to include/clk.h
Masahiro Yamada [Wed, 13 Jan 2016 04:16:09 +0000 (13:16 +0900)]
clk: add needed include and declaration to include/clk.h

This header uses ulong, so it needs to include <linux/types.h>.
Likewise, "struct udevice" must be declared before it is used.

Signed-off-by: Masahiro Yamada <[email protected]>
Acked-by: Simon Glass <[email protected]>
9 years agoclk: fix comments in include/clk.h
Masahiro Yamada [Wed, 13 Jan 2016 04:16:08 +0000 (13:16 +0900)]
clk: fix comments in include/clk.h

The comment about get_periph_rate() is the same as that of
set_periph_rate().

I am fixing typos here and there while I am in this file.

Signed-off-by: Masahiro Yamada <[email protected]>
Acked-by: Simon Glass <[email protected]>
9 years agoclk: move Kconfig options into sub-menu
Masahiro Yamada [Tue, 12 Jan 2016 07:36:38 +0000 (16:36 +0900)]
clk: move Kconfig options into sub-menu

Signed-off-by: Masahiro Yamada <[email protected]>
Acked-by: Simon Glass <[email protected]>
9 years agousb: Define USB_MAX_STOR_DEV in only one place
Simon Glass [Thu, 7 Jan 2016 22:16:08 +0000 (15:16 -0700)]
usb: Define USB_MAX_STOR_DEV in only one place

We can define this in the header file and use it in usb_storage.c. There is
no need to define it twice. Remove the #define from usb_storage.c.

Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Marek Vasut <[email protected]>
9 years agotimer: sandbox: work without device tree
Stephen Warren [Wed, 6 Jan 2016 17:33:04 +0000 (10:33 -0700)]
timer: sandbox: work without device tree

A default invocation of sandbox U-Boot apparently uses no device tree,
which means that no timer is registers, which in turn means that the
sleep shell command hangs.

Fix the sandbox timer code to register a device when there's no DT, just
like e.g. the sandbox reset driver does. When there's no DT, the DM uclass
can't initialize clock_rate from DT, so set a default value in the
timer code instead.

Signed-off-by: Stephen Warren <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Acked-by: Simon Glass <[email protected]>
9 years agodm: timer: refuse timers with zero clock_rate
Stephen Warren [Wed, 6 Jan 2016 17:33:03 +0000 (10:33 -0700)]
dm: timer: refuse timers with zero clock_rate

If a timer has a zero clock_rate, get_tbclk() will return zero for it,
which will cause tick_to_time() to perform a division-by-zero, which will
crash U-Boot.

Signed-off-by: Stephen Warren <[email protected]>
Acked-by: Simon Glass <[email protected]>
9 years agobzip2: Support compression for sandbox
Simon Glass [Tue, 5 Jan 2016 16:31:00 +0000 (09:31 -0700)]
bzip2: Support compression for sandbox

Add the missing code to allow bzip2 compression to be used. This is useful
for sandbox tests. These files are taken from the bzip2 1.0.6 release.
The license text is copied to the top of each file as is done with other
bzip2 files in U-Boot. The only other change is to squash a compiler warning
with nBytes.

Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
9 years agodm: core: Call uclass post_bind() after the driver's bind() method
Simon Glass [Tue, 5 Jan 2016 16:30:59 +0000 (09:30 -0700)]
dm: core: Call uclass post_bind() after the driver's bind() method

At present the uclass's post_bind() method is called before the driver's
bind() method. This means that the uclass cannot use any of the information
set up by the driver. Move it later in the sequence to permit this.

This is an ordering change which is always fairly major in nature. The main
impact is that devices which have children will not see them appear in their
bind() method. From what I can see, existing drivers do not look at their
children in the bind() method, so this should be safe.

Conceptually this change seems to result in a 'more correct' ordering, since
the uclass (which is broader than the device) gets the last word.

Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
9 years agosandbox: Support the bmp command
Simon Glass [Tue, 5 Jan 2016 16:30:58 +0000 (09:30 -0700)]
sandbox: Support the bmp command

Adjust this command to use map_sysmem() correctly so that it works on
sandbox.

Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
9 years agotiny-printf: Always print zeroes
Simon Glass [Tue, 5 Jan 2016 16:30:57 +0000 (09:30 -0700)]
tiny-printf: Always print zeroes

At present this does not print zero values in numeric format (hex and
decimal). Add a special case for this.

Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Stefan Roese <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
9 years agopinctrl: Avoid binding all pinconfig nodes before relocation
Simon Glass [Tue, 29 Dec 2015 12:22:52 +0000 (05:22 -0700)]
pinctrl: Avoid binding all pinconfig nodes before relocation

This can create a large number of pinctrl devices. It chews up early
malloc() memory and takes time. Only bind those which are marked as needed
before relocation.

Signed-off-by: Simon Glass <[email protected]>
9 years agoi2c: Correct command return values
Simon Glass [Tue, 29 Dec 2015 12:22:50 +0000 (05:22 -0700)]
i2c: Correct command return values

We should not return a -ve error code from command functions. Instead,
return CMD_RET_FAILURE. This avoids the "exit not allowed from main input
shell" error messages from the hush shell.

Signed-off-by: Simon Glass <[email protected]>
Acked-by: Heiko Schocher <[email protected]>
9 years agodm: mmc: Try to honour the sequence order
Simon Glass [Tue, 29 Dec 2015 12:22:49 +0000 (05:22 -0700)]
dm: mmc: Try to honour the sequence order

At present we add driver-model MMC devices in the order we find them. The
'alias' order is not honoured.

It is difficult to fix this for the case where we have holes in the
sequence. But for the common case where the devices are numbered from 0
without any gaps, we can add the devices to the internal data structures
in this order.

Signed-off-by: Simon Glass <[email protected]>
9 years agodm: gpio: Allow the uclass to work without printf()
Simon Glass [Tue, 29 Dec 2015 12:22:48 +0000 (05:22 -0700)]
dm: gpio: Allow the uclass to work without printf()

For SPL we don't really need sprintf() and with tiny-printf this is not
available. Allow this to be dropped in SPL when using tiny-printf.

Signed-off-by: Simon Glass <[email protected]>
9 years agotiny-printf: Avoid printing NULL strings
Simon Glass [Tue, 29 Dec 2015 12:22:46 +0000 (05:22 -0700)]
tiny-printf: Avoid printing NULL strings

Add a check for NULL strings to avoid printing junk to the console.

Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Stefan Roese <[email protected]>
9 years agodefconfig: dra74_evm: enable timer driver model
Mugunthan V N [Thu, 24 Dec 2015 10:38:22 +0000 (16:08 +0530)]
defconfig: dra74_evm: enable timer driver model

Enable timer driver model for dra74_evm_defconfig as omap-timer
supports driver model.

Signed-off-by: Mugunthan V N <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
9 years agoarm: dts: dra7-evm: add tick-timer to chosen node
Mugunthan V N [Thu, 24 Dec 2015 10:38:21 +0000 (16:08 +0530)]
arm: dts: dra7-evm: add tick-timer to chosen node

Specify timer2 to be used as tick-timer in chosen node.

Signed-off-by: Mugunthan V N <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
9 years agodefconfig: dra72_evm: enable timer driver model
Mugunthan V N [Thu, 24 Dec 2015 10:38:20 +0000 (16:08 +0530)]
defconfig: dra72_evm: enable timer driver model

Enable timer driver model for dra72_evm_defconfig as omap-timer
supports driver model.

Signed-off-by: Mugunthan V N <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
9 years agoarm: dts: dra72-evm: add tick-timer to chosen node
Mugunthan V N [Thu, 24 Dec 2015 10:38:19 +0000 (16:08 +0530)]
arm: dts: dra72-evm: add tick-timer to chosen node

Specify timer2 to be used as tick-timer in chosen node.

Signed-off-by: Mugunthan V N <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
9 years agoti_omap5_common: timer: do not define CONFIG_TIMER for spl
Mugunthan V N [Thu, 24 Dec 2015 10:38:18 +0000 (16:08 +0530)]
ti_omap5_common: timer: do not define CONFIG_TIMER for spl

Since OMAP's spl doesn't support DM currently, do not define
CONFIG_TIMER for spl build.

Signed-off-by: Mugunthan V N <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
9 years agodefconfig: am335x_gp_evm: enable timer driver model
Mugunthan V N [Thu, 24 Dec 2015 10:38:17 +0000 (16:08 +0530)]
defconfig: am335x_gp_evm: enable timer driver model

Enable timer driver model for am335x_gp_evm as omap-timer supports
driver model.

Signed-off-by: Mugunthan V N <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
9 years agoarm: dts: am335x-evm: add tick-timer to chosen node
Mugunthan V N [Thu, 24 Dec 2015 10:38:16 +0000 (16:08 +0530)]
arm: dts: am335x-evm: add tick-timer to chosen node

Specify timer2 to be used as tick-timer in chosen node.

Signed-off-by: Mugunthan V N <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
9 years agodefconfig: am335x_boneblack_vboot: enable timer driver model
Mugunthan V N [Thu, 24 Dec 2015 10:38:15 +0000 (16:08 +0530)]
defconfig: am335x_boneblack_vboot: enable timer driver model

Enable timer driver model for am335x_boneblack_vboot as
omap-timer supports driver model.

Signed-off-by: Mugunthan V N <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
9 years agoarm: dts: am335x-boneblack: add tick-timer to chosen node
Mugunthan V N [Thu, 24 Dec 2015 10:38:14 +0000 (16:08 +0530)]
arm: dts: am335x-boneblack: add tick-timer to chosen node

Specify which timer to be used as tick-timer in chosen node.

Signed-off-by: Mugunthan V N <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
9 years agoam335x_evm: timer: do not define CONFIG_TIMER for spl
Mugunthan V N [Thu, 24 Dec 2015 10:38:13 +0000 (16:08 +0530)]
am335x_evm: timer: do not define CONFIG_TIMER for spl

Since OMAP's spl doesn't support DM currently, do not define
CONFIG_TIMER for spl build.

Signed-off-by: Mugunthan V N <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
9 years agodefconfig: am437x_gp_evm: enable timer driver model
Mugunthan V N [Thu, 24 Dec 2015 10:38:12 +0000 (16:08 +0530)]
defconfig: am437x_gp_evm: enable timer driver model

Enable timer driver model for am437x_gp_evm as omap-timer supports
driver model.

Signed-off-by: Mugunthan V N <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
9 years agoarm: dts: am437x-gp-evm: add tick-timer to chosen node
Mugunthan V N [Thu, 24 Dec 2015 10:38:11 +0000 (16:08 +0530)]
arm: dts: am437x-gp-evm: add tick-timer to chosen node

Specify which timer to be used as tick-timer in chosen node.

Signed-off-by: Mugunthan V N <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
9 years agodefconfig: am437x_sk_evm: enable timer driver model
Mugunthan V N [Thu, 24 Dec 2015 10:38:10 +0000 (16:08 +0530)]
defconfig: am437x_sk_evm: enable timer driver model

Enable timer driver model for am437x_sk_evm as omap-timer supports
driver model.

Signed-off-by: Mugunthan V N <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
9 years agoarm: dts: am437x-sk-evm: add tick-timer to chosen node
Mugunthan V N [Thu, 24 Dec 2015 10:38:09 +0000 (16:08 +0530)]
arm: dts: am437x-sk-evm: add tick-timer to chosen node

Specify which timer to be used as tick-timer in chosen node.

Signed-off-by: Mugunthan V N <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
9 years agoam43xx_evm: timer: do not define CONFIG_TIMER for spl
Mugunthan V N [Thu, 24 Dec 2015 10:38:08 +0000 (16:08 +0530)]
am43xx_evm: timer: do not define CONFIG_TIMER for spl

Since OMAP's spl doesn't support DM currently, do not define
CONFIG_TIMER for spl build.

Signed-off-by: Mugunthan V N <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
9 years agodrivers: timer: omap_timer: add timer driver for omap devices based on dm
Mugunthan V N [Thu, 24 Dec 2015 10:38:07 +0000 (16:08 +0530)]
drivers: timer: omap_timer: add timer driver for omap devices based on dm

Adding a timer driver for omap devices based on driver model
and device tree.

Signed-off-by: Mugunthan V N <[email protected]>
9 years agodm: timer: uclass: Add flag to control sequence numbering
Mugunthan V N [Thu, 24 Dec 2015 10:38:06 +0000 (16:08 +0530)]
dm: timer: uclass: Add flag to control sequence numbering

Like SPI and I2C, timer devices also have multiple chip
instances. This patch adds the flag 'DM_UC_FLAG_SEQ_ALIAS' in
timer_uclass driver to control device sequence numbering.

Signed-off-by: Mugunthan V N <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
9 years agodm: timer: uclass: add timer init in uclass driver to add timer device
Mugunthan V N [Sat, 16 Jan 2016 16:03:58 +0000 (21:33 +0530)]
dm: timer: uclass: add timer init in uclass driver to add timer device

Adding timer init function in timer-uclass driver to create and
initialize the timer device on platforms where u-boot,dm-pre-reloc
is not used. Since there will be multiple timer devices in the
system, adding a tick-timer node in chosen node to know which
timer device to be used as tick timer in u-boot.

Signed-off-by: Mugunthan V N <[email protected]>
9 years agoarm: omap-common: do not build timer when CONFIG_TIMER defined
Mugunthan V N [Thu, 24 Dec 2015 10:38:04 +0000 (16:08 +0530)]
arm: omap-common: do not build timer when CONFIG_TIMER defined

To prepare timer driver to DM/DT conversion do not build the
exiting timer driver when CONFIG_TIMER is defined. But since
omap's SPL doesn't support DM yet so built timer driver only for
SPL build when CONFIG_TIMER is defined.

Signed-off-by: Mugunthan V N <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
9 years agodm: core: Provide uclass_find_device_by_phandle() only when needed
Simon Glass [Sun, 20 Dec 2015 02:38:55 +0000 (19:38 -0700)]
dm: core: Provide uclass_find_device_by_phandle() only when needed

This function cannot be used unless support is enabled for device tree
control. Adjust the code to reflect that.

Signed-off-by: Simon Glass <[email protected]>
9 years agoiocon / bamboo: Drop CONFIG_SYS_LONGHELP
Tom Rini [Tue, 19 Jan 2016 18:01:59 +0000 (13:01 -0500)]
iocon / bamboo: Drop CONFIG_SYS_LONGHELP

The iocon and bamboo boards are often on the verge of, or going over,
their allowed size limits depending on toolchain used.  If we turn off
CONFIG_SYS_LONGHELP we can gain approximately 14KiB back.

Signed-off-by: Tom Rini <[email protected]>
Acked-by: Stefan Roese <[email protected]>
Acked-by: Dirk Eibach <[email protected]>
9 years agostm32: move stm32 specific code to mach-stm32
Vikas Manocha [Sat, 16 Jan 2016 01:49:06 +0000 (17:49 -0800)]
stm32: move stm32 specific code to mach-stm32

This patch moves stm32 sources at one place, with this armv7m now contains
only generic stuff.

Signed-off-by: Vikas Manocha <[email protected]>
9 years agoudoo:use load instead of fatload
Oscar Curero [Fri, 15 Jan 2016 20:12:24 +0000 (21:12 +0100)]
udoo:use load instead of fatload

That way the FS can also be ext2/3/4

Signed-off-by: Oscar Curero <[email protected]>
Acked-by: Fabio Estevam <[email protected]>
9 years agoam335x: BeagleBones enable CONFIG_AUTOBOOT_KEYED
[email protected] [Thu, 14 Jan 2016 18:15:25 +0000 (12:15 -0600)]
am335x: BeagleBones enable CONFIG_AUTOBOOT_KEYED

On startup, the BeagleBone family of boards can occationally halt at
the U-Boot prompt.  Due to U-Boot receiving random data on the usart.

Migrate BeagleBone based boards to use CONFIG_AUTOBOOT_KEYED, user
will now have to enter the <SPACE> key to get to U-Boot prompt

Signed-off-by: Robert Nelson <[email protected]>
CC: Craig McQueen <[email protected]>
CC: Tom Rini <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
9 years agopowerpc/83xx: fix build failure
Shengzhou Liu [Thu, 14 Jan 2016 10:45:30 +0000 (18:45 +0800)]
powerpc/83xx: fix build failure

Remove duplicated SDRAM_INTERVAL_BSTOPRE from mpc83xx.h,
which has been defined in fsl_ddr_sdram.h

Signed-off-by: Shengzhou Liu <[email protected]>
9 years agoigep00x0: Remove no-op macros from config header
Ladislav Michl [Mon, 4 Jan 2016 22:08:02 +0000 (23:08 +0100)]
igep00x0: Remove no-op macros from config header

The patch removes some macros that are not used.

Signed-off-by: Ladislav Michl <[email protected]>
Acked-by: Enric Balletbo Serra <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
Reviewed-by: Heiko Schocher <[email protected]>
9 years agoigep00x0: Fix config header indentation
Ladislav Michl [Mon, 4 Jan 2016 22:08:01 +0000 (23:08 +0100)]
igep00x0: Fix config header indentation

The patch fixes some indentation style problems in omap3_igep00x0.h file.

Signed-off-by: Ladislav Michl <[email protected]>
Acked-by: Enric Balletbo Serra <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
Reviewed-by: Heiko Schocher <[email protected]>
9 years agoigep00x0: Do not include config_distro_defaults.h
Ladislav Michl [Mon, 4 Jan 2016 22:08:00 +0000 (23:08 +0100)]
igep00x0: Do not include config_distro_defaults.h

File is already included:
omap3_igep00x0.h -> ti_omap3_common.h -> ti_armv7_omap.h ->
ti_armv7_common.h -> config_distro_defaults.h

Signed-off-by: Ladislav Michl <[email protected]>
Acked-by: Enric Balletbo Serra <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
Reviewed-by: Heiko Schocher <[email protected]>
9 years agoigep00x0: Cleanup ethernet support
Ladislav Michl [Mon, 4 Jan 2016 22:07:59 +0000 (23:07 +0100)]
igep00x0: Cleanup ethernet support

- move chip reset to separate function
- use CONFIG_SMC911X_BASE instead of hardcoded value
- remove unneeded local variable from board_eth_init.

Signed-off-by: Ladislav Michl <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
Acked-by: Enric Balletbo Serra <[email protected]>
Reviewed-by: Heiko Schocher <[email protected]>
9 years agoigep00x0: enable CONFIG_NET_RANDOM_ETHADDR
Enric Balletbò i Serra [Mon, 4 Jan 2016 22:07:58 +0000 (23:07 +0100)]
igep00x0: enable CONFIG_NET_RANDOM_ETHADDR

Enable CONFIG_NET_RANDOM_ETHADDR to generate a random MAC address
when ETHADDR is not set.

Signed-off-by: Enric Balletbo i Serra <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
Reviewed-by: Heiko Schocher <[email protected]>
9 years agoarmv7: Add missing newline after OMAP die ID
Ladislav Michl [Sun, 3 Jan 2016 17:24:27 +0000 (18:24 +0100)]
armv7: Add missing newline after OMAP die ID

Signed-off-by: Ladislav Michl <[email protected]>
Acked-by: Enric Balletbo Serra <[email protected]>
9 years agoti_omap3_common: Do not define CONFIG_SPL_NAND_SUPPORT
Ladislav Michl [Wed, 30 Dec 2015 01:45:26 +0000 (02:45 +0100)]
ti_omap3_common: Do not define CONFIG_SPL_NAND_SUPPORT

Symbol is already defined in ti_armv7_common.h which is included
via ti_armv7_omap.h

Signed-off-by: Ladislav Michl <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
9 years agokbuild: drop workaround for old style CONFIG_SYS_TEXT_BASE defines
Masahiro Yamada [Fri, 11 Dec 2015 03:22:31 +0000 (12:22 +0900)]
kbuild: drop workaround for old style CONFIG_SYS_TEXT_BASE defines

Now, there is no board defining CONFIG_SYS_TEXT_BASE by its config.mk,
so this workaround is no longer needed.

Signed-off-by: Masahiro Yamada <[email protected]>
Acked-by: Stefan Roese <[email protected]>
9 years agopowerpc: yucca: drop redundant CONFIG_SYS_TEXT_BASE from config.mk
Masahiro Yamada [Fri, 11 Dec 2015 03:22:30 +0000 (12:22 +0900)]
powerpc: yucca: drop redundant CONFIG_SYS_TEXT_BASE from config.mk

The include/configs/yucca.h already has the same define:
    #define CONFIG_SYS_TEXT_BASE 0xfffb0000

Remove the redundant one from board/amcc/yucca/config.mk.

Signed-off-by: Masahiro Yamada <[email protected]>
Acked-by: Stefan Roese <[email protected]>
9 years agomips: pb1x00: move CONFIG_SYS_TEXT_BASE away from config.mk
Masahiro Yamada [Fri, 11 Dec 2015 03:22:29 +0000 (12:22 +0900)]
mips: pb1x00: move CONFIG_SYS_TEXT_BASE away from config.mk

We can delete board/pb1x00/config.mk by moving the define of
CONFIG_SYS_TEXT_BASE to somewhere else.  Other MIPS boards are
still defining it in include/config/${BOARD}.h, so I am following
that way here.

Signed-off-by: Masahiro Yamada <[email protected]>
Acked-by: Daniel Schwierzeck <[email protected]>
9 years agomips: dbau1x00: move CONFIG_SYS_TEXT_BASE away from config.mk
Masahiro Yamada [Fri, 11 Dec 2015 03:22:28 +0000 (12:22 +0900)]
mips: dbau1x00: move CONFIG_SYS_TEXT_BASE away from config.mk

We can delete board/dbau1x00/config.mk by moving the define of
CONFIG_SYS_TEXT_BASE to somewhere else.  Other MIPS boards are
still defining it in include/config/${BOARD}.h, so I am following
that way here.

Signed-off-by: Masahiro Yamada <[email protected]>
Acked-by: Daniel Schwierzeck <[email protected]>
9 years agomips: vct: move CONFIG_SYS_TEXT_BASE away from config.mk
Masahiro Yamada [Fri, 11 Dec 2015 03:22:27 +0000 (12:22 +0900)]
mips: vct: move CONFIG_SYS_TEXT_BASE away from config.mk

We can delete board/micronas/vct/config.mk by moving the define of
CONFIG_SYS_TEXT_BASE to somewhere else.  Other MIPS boards are
still defining it in include/config/${BOARD}.h, so I am following
that way here.

Signed-off-by: Masahiro Yamada <[email protected]>
Acked-by: Daniel Schwierzeck <[email protected]>
9 years agomicroblaze: move CONFIG_SYS_TEXT_BASE to defconfig
Masahiro Yamada [Fri, 11 Dec 2015 03:22:26 +0000 (12:22 +0900)]
microblaze: move CONFIG_SYS_TEXT_BASE to defconfig

This is how CONFIG options are defined by Kconfig.

Signed-off-by: Masahiro Yamada <[email protected]>
Acked-by: Michal Simek <[email protected]>
This page took 0.087339 seconds and 4 git commands to generate.