oweals/u-boot.git
8 years agoPrepare v2016.09-rc2 v2016.09-rc2
Tom Rini [Tue, 23 Aug 2016 00:30:42 +0000 (20:30 -0400)]
Prepare v2016.09-rc2

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agofs-test.sh: Correct check_md5() test with newlines
Tom Rini [Mon, 22 Aug 2016 23:37:56 +0000 (19:37 -0400)]
fs-test.sh: Correct check_md5() test with newlines

The fs-test.sh script expected there to be a \n\r style newline at the
end of the output. This is no longer the case, so use 'tr' to remove the
\r that we get.

Fixes: (c5917b4b054d "dm: serial-uclass: Move a carriage return before a
        line feed")
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoMerge branch 'rmobile' of git://git.denx.de/u-boot-sh
Tom Rini [Sat, 20 Aug 2016 15:35:28 +0000 (11:35 -0400)]
Merge branch 'rmobile' of git://git.denx.de/u-boot-sh

[trini: Drop CMD_BOOTI as it's now on by default on ARM64]
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agopinctrl: fix typos in comment blocks of pinconfig_post_bind()
Masahiro Yamada [Fri, 19 Aug 2016 09:26:54 +0000 (18:26 +0900)]
pinctrl: fix typos in comment blocks of pinconfig_post_bind()

'-' is never used in function names.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoefi_loader: Fix relocations above 64kb image size
Alexander Graf [Thu, 18 Aug 2016 21:45:18 +0000 (23:45 +0200)]
efi_loader: Fix relocations above 64kb image size

We were truncating the image offset within the target image to 16 bits
which again meant that we were potentially overwriting random memory
in the lower 16 bits of the image.

This patch casts the offset to a more reasonable 32bits.

With this applied, I can successfully see Shell.efi assert because it
can't find a protocol it expects to be available.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoMakefile: Remove tags file on mrproper
Vignesh R [Thu, 18 Aug 2016 04:16:09 +0000 (09:46 +0530)]
Makefile: Remove tags file on mrproper

make tags creates a symbolic link called tags to ctags. Remove this file
on make mrproper or make distclean.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agotools/env: soften warning about erase block alignment
Andreas Fenkart [Wed, 17 Aug 2016 21:41:54 +0000 (23:41 +0200)]
tools/env: soften warning about erase block alignment

addon 183923d3e
MMC/SATA have no erase blocks, only blocks. Hence the warning
about erase block alignment might be confusing in such environment.

Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agotools/env: return with error if redundant environments have unequal size
Andreas Fenkart [Wed, 17 Aug 2016 21:41:53 +0000 (23:41 +0200)]
tools/env: return with error if redundant environments have unequal size

For double buffering to work, the target buffer must always be big
enough to hold all data. This can only be ensured if buffers are of
equal size, otherwise one must be smaller and we risk data loss
when copying from the bigger to the smaller buffer.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: OMAP4+: vcores: Remove duplicated code
Lokesh Vutla [Wed, 17 Aug 2016 10:55:36 +0000 (16:25 +0530)]
ARM: OMAP4+: vcores: Remove duplicated code

There is no reason to duplicate code for DRA7xx platforms as there
can be Rail grouping. The maximum voltage detection algorithm can still
be run on other platforms with no Rail grouping and does not harm as
it gives the same result.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: OMAP5+: vcores: Drop unnecessary #ifndefs
Lokesh Vutla [Wed, 17 Aug 2016 10:55:35 +0000 (16:25 +0530)]
ARM: OMAP5+: vcores: Drop unnecessary #ifndefs

gpio_en field is introduced to detect if pmic is controlled by GPIO.
Make this field 0 on all TPS659* pmics available on DRA7/OMAP5 based platforms
and remove the #ifndefs.

Reviewed-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agotest/py: match prompt only at line boundaries
Stephen Warren [Wed, 17 Aug 2016 01:58:59 +0000 (19:58 -0600)]
test/py: match prompt only at line boundaries

This prevents capture of command output from terminating early on boards
that use a simple prompt (e.g. "=> ") that appears in the middle of
command output (e.g. crc32's "... ==> 2fa737e0").

Reported-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Tested-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
8 years agocommon: cli_readline: Improve command line editing
James Byrne [Tue, 16 Aug 2016 17:16:28 +0000 (18:16 +0100)]
common: cli_readline: Improve command line editing

This improves the cread_line() function so that it will correctly
process the 'Home', 'End', 'Delete' and arrow key escape sequences
produced by various terminal emulators. This makes command line editing
a more pleasant experience.

The previous code only supported the cursor keys and the 'Home' key, and
only for certain terminal emulator configurations. This adds support for
the 'End and 'Delete' keys, and recognises a wider range of escape
sequences. For example, the left arrow key can be 'ESC O D' instead of
'ESC [ D', and the 'Home' key can be 'ESC [ H', 'ESC O H', 'ESC 1 ~' or
'ESC 7 ~', depending on what terminal emulator you use and how it is
configured.

Signed-off-by: James Byrne <james.byrne@origamienergy.com>
Changes for v2
   - Explicitly initialize variable to avoid spurious compiler warning.
Changes for v3
   - Remove unnecessary setting of 'act' to ESC_REJECT (now its default
     value).

8 years agofastboot: move to Kconfig
Steve Rae [Tue, 16 Aug 2016 00:26:27 +0000 (17:26 -0700)]
fastboot: move to Kconfig

- move bcm23550_w1d to Kconfig
- move bcm28155_ap to Kconfig

Signed-off-by: Steve Rae <steve.rae@raedomain.com>
8 years agofastboot: implement Kconfig
Steve Rae [Tue, 16 Aug 2016 00:26:26 +0000 (17:26 -0700)]
fastboot: implement Kconfig

implement Kconfig for the 'fastboot' feature set

Signed-off-by: Steve Rae <steve.rae@raedomain.com>
8 years agocmd: efi_loader: Return CMD_RET_USAGE in case of not enough arguments
Bin Meng [Sat, 13 Aug 2016 11:02:06 +0000 (04:02 -0700)]
cmd: efi_loader: Return CMD_RET_USAGE in case of not enough arguments

When typing 'bootefi' from U-Boot shell, nothing outputs. Like other
commands, return CMD_RET_USAGE so that it can print help message.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Alexander Graf <agraf@suse.de>
8 years agoKconfig: DISTRO_DEFAULTS: Only enable CMD_BOOTZ for ARM
Tom Rini [Fri, 12 Aug 2016 12:31:17 +0000 (08:31 -0400)]
Kconfig: DISTRO_DEFAULTS: Only enable CMD_BOOTZ for ARM

The 'bootz' command is really only for ARM32 Linux Kernel 'zImage' files
but has also been adapted for testing with sandbox.  Given that sandbox
is a test platform, don't add that logic under DISTRO_DEFAULTS.

Cc: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agocmd: booti: move CONFIG_CMD_BOOTI to Kconfig
Masahiro Yamada [Fri, 12 Aug 2016 12:31:16 +0000 (08:31 -0400)]
cmd: booti: move CONFIG_CMD_BOOTI to Kconfig

This command is used to boot ARM64 Linux.

I made DISTRO_DEFAULTS select this option for ARM64 to respect
include/config_distro_defaults.h.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agocmd: Split 'bootz' and 'booti' out from 'bootm'
Tom Rini [Fri, 12 Aug 2016 12:31:15 +0000 (08:31 -0400)]
cmd: Split 'bootz' and 'booti' out from 'bootm'

The bootz and booti commands rely on common functionality that is found
in common/bootm.c and common/bootm_os.c.  They do not however rely on
the rest of cmd/bootm.c to be implemented so split them into their own
files.  Have various Makefiles include the required infrastructure for
CONFIG_CMD_BOOT[IZ] as well as CONFIG_CMD_BOOTM.  Move the declaration
of 'images' over to common/bootm.c.

Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agotests: Introduce DT overlay tests
Maxime Ripard [Tue, 5 Jul 2016 08:26:46 +0000 (10:26 +0200)]
tests: Introduce DT overlay tests

This adds a bunch of unit tests for the "fdt apply" command.

They've all been run successfully in the sandbox. However, as you still
require an out-of-tree dtc with overlay support, this is disabled by
default.

Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
8 years agocmd: fdt: add fdt overlay application subcommand
Maxime Ripard [Tue, 5 Jul 2016 08:26:45 +0000 (10:26 +0200)]
cmd: fdt: add fdt overlay application subcommand

The device tree overlays are a good way to deal with user-modifyable
boards or boards with some kind of an expansion mechanism where we can
easily plug new board in (like the BBB or the raspberry pi).

However, so far, the usual mechanism to deal with it was to have in Linux
some driver detecting the expansion boards plugged in and then request
these overlays using the firmware interface.

That works in most cases, but in some cases, you might want to have the
overlays applied before the userspace comes in. Either because the new
board requires some kind of an early initialization, or because your root
filesystem is accessed through that expansion board.

The easiest solution in such a case is to simply have the component before
Linux applying that overlay, removing all these drawbacks.

Reviewed-by: Stefan Agner <stefan@agner.ch>
Acked-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
8 years agolibfdt: Add overlay application function
Maxime Ripard [Tue, 5 Jul 2016 08:26:44 +0000 (10:26 +0200)]
libfdt: Add overlay application function

The device tree overlays are a good way to deal with user-modifyable
boards or boards with some kind of an expansion mechanism where we can
easily plug new board in (like the BBB, the Raspberry Pi or the CHIP).

Add a new function to merge overlays with a base device tree.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
8 years agolibfdt: Add fdt_setprop_inplace_namelen_partial
Maxime Ripard [Tue, 5 Jul 2016 08:26:43 +0000 (10:26 +0200)]
libfdt: Add fdt_setprop_inplace_namelen_partial

Add a function to modify inplace only a portion of a property..

This is especially useful when the property is an array of values, and you
want to update one of them without changing the DT size.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agolibfdt: Add fdt_getprop_namelen_w
Maxime Ripard [Tue, 5 Jul 2016 08:26:42 +0000 (10:26 +0200)]
libfdt: Add fdt_getprop_namelen_w

Add a function to retrieve a writeable property only by the first
characters of its name.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
8 years agolibfdt: Add fdt_path_offset_namelen
Maxime Ripard [Tue, 5 Jul 2016 08:26:41 +0000 (10:26 +0200)]
libfdt: Add fdt_path_offset_namelen

Add a namelen variant of fdt_path_offset to retrieve the node offset using
only a fixed number of characters.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
8 years agolibfdt: Fix separator spelling
Maxime Ripard [Tue, 5 Jul 2016 08:26:40 +0000 (10:26 +0200)]
libfdt: Fix separator spelling

The function fdt_path_next_seperator had an obvious mispell. Fix it.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
8 years agolibfdt: Add max phandle retrieval function
Maxime Ripard [Tue, 5 Jul 2016 08:26:39 +0000 (10:26 +0200)]
libfdt: Add max phandle retrieval function

Add a function to retrieve the highest phandle in a given device tree.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Stefan Agner <stefan@agner.ch>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agolibfdt: Add iterator over properties
Maxime Ripard [Tue, 5 Jul 2016 08:26:38 +0000 (10:26 +0200)]
libfdt: Add iterator over properties

Implement a macro based on fdt_first_property_offset and
fdt_next_property_offset that provides a convenience to iterate over all
the properties of a given node.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agolibfdt: Add new headers and defines
Maxime Ripard [Tue, 5 Jul 2016 08:26:37 +0000 (10:26 +0200)]
libfdt: Add new headers and defines

The libfdt overlay support introduces a bunch of new includes and
functions.

Make sure we are able to build it by adding the needed glue.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agovsprintf: Include stdarg for va_list
Maxime Ripard [Tue, 5 Jul 2016 08:26:36 +0000 (10:26 +0200)]
vsprintf: Include stdarg for va_list

vsprintf.h doesn't include the stdarg.h file, which means that it relies on
the files that include vsprintf.h to include stdarg.h as well.

Add an explicit include to avoid build errors when simply including that
file.

Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
8 years agoscripts: Makefile.lib: Sanitize DTB names
Maxime Ripard [Tue, 5 Jul 2016 08:26:35 +0000 (10:26 +0200)]
scripts: Makefile.lib: Sanitize DTB names

Having dashes as a separator in the DTB name is a quite common practice.

However, the current code to generate objects from DTBs assumes the
separator is an underscore, leading to a compilation error when building a
device tree with dashes.

Replace all the dashes in the DTB name to generate the symbols name, which
should solve this issue.

Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
8 years agocmd: fdt: Narrow the check for fdt addr
Maxime Ripard [Tue, 5 Jul 2016 08:26:34 +0000 (10:26 +0200)]
cmd: fdt: Narrow the check for fdt addr

The current code only checks if the fdt subcommand is fdt addr by checking
whether it starts with 'a'.

Since this is a pretty widely used letter, narrow down that check a bit.

Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
8 years agoARM: rmobile: r8a7795: Add MMU layout
Nobuhiro Iwamatsu [Thu, 4 Aug 2016 05:10:26 +0000 (14:10 +0900)]
ARM: rmobile: r8a7795: Add MMU layout

This add MMU layout for R8A7795 of Renesas ARM64 SoC.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
8 years agoARM: rmobile: salvator-x: Update defconfig
Nobuhiro Iwamatsu [Thu, 4 Aug 2016 04:46:02 +0000 (13:46 +0900)]
ARM: rmobile: salvator-x: Update defconfig

This moves some config from config files.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
8 years agoARM: rmobile: Remove duplicate configs by Kconfig in rcar-gen3-common.h
Nobuhiro Iwamatsu [Thu, 4 Aug 2016 04:45:48 +0000 (13:45 +0900)]
ARM: rmobile: Remove duplicate configs by Kconfig in rcar-gen3-common.h

This commit remove dupilicate following configs from rcar-gen3-common.h.
  - CONFIG_CMD_BOOTZ
  - CONFIG_BOOTDELAY
  - CONFIG_CMD_EDITENV
  - CONFIG_CMD_SAVEENV
  - CONFIG_CMD_MEMORY
  - CONFIG_CMD_RUN
  - CONFIG_CMD_LOADS

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
8 years agoARM: rmobile: lager: Move rcar-gen2-common to rcar-common
Nobuhiro Iwamatsu [Thu, 21 Jul 2016 22:15:57 +0000 (07:15 +0900)]
ARM: rmobile: lager: Move rcar-gen2-common to rcar-common

To common use of rcar-gen2-common directory in the R-Car SoCs,
and change from rcar-gen2-common to rcar-common.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
8 years agoarm: rmobile: Update defconfig
Nobuhiro Iwamatsu [Mon, 30 May 2016 19:28:11 +0000 (04:28 +0900)]
arm: rmobile: Update defconfig

This updated defconfig following boards:
 - Alt
 - Gose
 - Koelsh
 - Lager
 - Porter
 - Silk
 - Stout
 - Blanche

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
8 years agoarm: rmobile: Fix HDMI output for BLANCHE board
masakazu.mochizuki.wd@hitachi.com [Tue, 17 May 2016 04:53:03 +0000 (13:53 +0900)]
arm: rmobile: Fix HDMI output for BLANCHE board

This commit fixes HDMI output for BLANCHE board

Signed-off-by: Masakazu Mochizuki <masakazu.mochizuki.wd@hitachi.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
8 years agoarm: rmobile: Add BLANCHE board support
masakazu.mochizuki.wd@hitachi.com [Tue, 12 Apr 2016 08:11:41 +0000 (17:11 +0900)]
arm: rmobile: Add BLANCHE board support

BLANCHE is development board based on R-Car V2H SoC (R8A7792)

This commit supports the following periherals:
- SCIF, Ethernet, QSPI, MMC

Signed-off-by: Masakazu Mochizuki <masakazu.mochizuki.wd@hitachi.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
8 years agommc: rmobile: add a compiler barrier
Yannick Gicquel [Mon, 4 Apr 2016 09:49:59 +0000 (11:49 +0200)]
mmc: rmobile: add a compiler barrier

Building w/ GCC v5.2, the SD card access is broken due to invalid data
in the response command reconstructed at the end of
sh_sdhci_get_response().

Add a memory barrier between the two main steps of this function to
ensure the resp[] table content is consistent before bits reordering.

This fix has been tested Ok on Porter board rev1.0 using v2016.03
release.

Signed-off-by: Yannick Gicquel <yannick.gicquel@iot.bzh>
8 years agoARM: rmobile: rcar-common: Fix warning of type difference
Nobuhiro Iwamatsu [Thu, 31 Mar 2016 18:51:37 +0000 (03:51 +0900)]
ARM: rmobile: rcar-common: Fix warning of type difference

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
8 years agoARM: rmobile: Add support salvator-x board
Nobuhiro Iwamatsu [Thu, 31 Mar 2016 18:51:36 +0000 (03:51 +0900)]
ARM: rmobile: Add support salvator-x board

Salvator-x is an entry level development board based on
R-Car H3 SoC (R8A7795). This commit supports SCIF only.

Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
8 years agoARM: rmobile: Add support R8A7795
Nobuhiro Iwamatsu [Thu, 31 Mar 2016 18:51:35 +0000 (03:51 +0900)]
ARM: rmobile: Add support R8A7795

Renesas R8A7795 is CPU with Cortex-a57.
This supports the basic register definition and GPIO and
framework of PFC.

Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
8 years agoARM: rmobile: Add support R-Car Generation 3
Nobuhiro Iwamatsu [Thu, 31 Mar 2016 18:51:34 +0000 (03:51 +0900)]
ARM: rmobile: Add support R-Car Generation 3

This adds supporting R-Car Generation 3 (Gen3) as Renesas ARM64 SoC.

Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
8 years agoARM: rmobile: Move rcar-gen2-common to rcar-common
Nobuhiro Iwamatsu [Thu, 31 Mar 2016 18:51:33 +0000 (03:51 +0900)]
ARM: rmobile: Move rcar-gen2-common to rcar-common

To common use of rcar-gen2-common directory in the R-Car SoCs, and change from
rcar-gen2-common to rcar-common.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
8 years agoARM: rmobile: Create R-Car 32bit (Gen1 and Gen2) for Kconfig
Nobuhiro Iwamatsu [Fri, 17 Jun 2016 04:52:13 +0000 (13:52 +0900)]
ARM: rmobile: Create R-Car 32bit (Gen1 and Gen2) for Kconfig

This creates Kconfig of R-Car 32bit for Kconfig of R-Car 64bit (Gen3).

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
8 years agoserial: sh: Add support R8A7795
Hiroyuki Yokoyama [Thu, 31 Mar 2016 18:51:31 +0000 (03:51 +0900)]
serial: sh: Add support R8A7795

This can be used in the same way as other R-CAR serial setting.

Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
8 years agoMAINTAINERS: Add maintainer entry of RMOBILE
Nobuhiro Iwamatsu [Fri, 9 Oct 2015 21:09:03 +0000 (06:09 +0900)]
MAINTAINERS: Add maintainer entry of RMOBILE

Add MAINTAINERS entry.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
8 years agoARM: Rmobile: Rename CONFIG_RMOBILE to CONFIG_ARCH_RMOBILE
Nobuhiro Iwamatsu [Fri, 9 Oct 2015 20:58:28 +0000 (05:58 +0900)]
ARM: Rmobile: Rename CONFIG_RMOBILE to CONFIG_ARCH_RMOBILE

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
8 years agoARM: rmobile: Move SoC headers to mach-rmobile/include/mach
Nobuhiro Iwamatsu [Fri, 9 Oct 2015 20:42:01 +0000 (05:42 +0900)]
ARM: rmobile: Move SoC headers to mach-rmobile/include/mach

Move form arch/arm/include/asm/arch-rmobile/ to arch/arm/mach-rmobile/include/mach/.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
8 years agoARM: rmobile: Move SoC sources to mach-rmobile
Nobuhiro Iwamatsu [Fri, 9 Oct 2015 07:40:09 +0000 (16:40 +0900)]
ARM: rmobile: Move SoC sources to mach-rmobile

Move from arch/arm/cpu/armv7/rmobile/ to arch/arm/mach-rmobile/.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-x86
Tom Rini [Tue, 16 Aug 2016 11:58:41 +0000 (07:58 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-x86

8 years agox86: Add theadorable-x86-dfi-bt700 board support
Stefan Roese [Mon, 15 Aug 2016 11:50:59 +0000 (13:50 +0200)]
x86: Add theadorable-x86-dfi-bt700 board support

This patch adds support for the BayTrail based theadorable-x86-dfi-bt700
board which uses the DFI BT700 BayTrail Qseven SoM on a custom baseboard.
The main difference to the DFI baseboard is, that it isn't equipped
with a Super IO chip and uses the internal HS SIO UART (memory mapped
PCI based) as the console UART.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Add DFI BT700 BayTrail board support
Stefan Roese [Mon, 15 Aug 2016 11:50:49 +0000 (13:50 +0200)]
x86: Add DFI BT700 BayTrail board support

This patch adds support for the DFI BayTrail BT700 QSeven SoM installed
on the DFI Q7X-151 baseboard. The baseboard is equipped with the Nuvoton
NCT6102D Super IO chip providing the UART as console.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: conga-qeval20-qa3: Add SMBus support and SMSC2513 config code
Stefan Roese [Tue, 28 Jun 2016 13:45:13 +0000 (15:45 +0200)]
x86: conga-qeval20-qa3: Add SMBus support and SMSC2513 config code

This patch includes the following changes:

- Remove Designware I2C support from dts as its not used
- Configure SMBus PADs in dts
- Enable I2C commands and I2C support
- Configure SMSC2513 USB hub via SMBus upon startup
- Move environment location to match Minnowmax example
- Enhancement of the default environment

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agoi2c: intel_i2c: SMBus driver PCI addition (e.g. BayTrail)
Stefan Roese [Tue, 9 Aug 2016 05:41:15 +0000 (07:41 +0200)]
i2c: intel_i2c: SMBus driver PCI addition (e.g. BayTrail)

This patch adds support for the SMBus block read/write functionality.
Other protocols like the SMBus quick command need to get added
if this is needed.

This patch also removed the SMBus related defines from the Ivybridge
pch.h header. As they are integrated in this driver and should be
used from here. This change is added in this patch to avoid compile
breakage to keep the source git bisectable.

Tested on a congatec BayTrail board to configure the SMSC2513 USB
hub.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Heiko Schocher <hs@denx.de>
Cc: George McCollister <george.mccollister@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agocbfs: Fix incorrect CBFS file header size being used
Yaroslav K [Tue, 9 Aug 2016 03:32:15 +0000 (20:32 -0700)]
cbfs: Fix incorrect CBFS file header size being used

This fixes incorrect filenames in cbfsls output.

Signed-off-by: Yaroslav K. <yar444@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
[clean up checkpatch errors and warnings]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: bdinfo: Drop meaningless values
Simon Glass [Sat, 6 Aug 2016 03:57:28 +0000 (21:57 -0600)]
x86: bdinfo: Drop meaningless values

These are not useful on x86 so do not print them.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agobdinfo: Don't print out empty DRAM banks
Simon Glass [Sat, 6 Aug 2016 03:57:27 +0000 (21:57 -0600)]
bdinfo: Don't print out empty DRAM banks

There is no sense in printing out DRAM banks of size 0 since this means they
are empty. Skip them.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: bayleybay: Add PS/2 keyboard and mouse to ASL file
Bin Meng [Tue, 2 Aug 2016 03:53:53 +0000 (20:53 -0700)]
x86: bayleybay: Add PS/2 keyboard and mouse to ASL file

Without PS/2 keyboard and mouse in the ASL file, Windows does not
see them. No problem for Linux as it probes keyboard and mouse via
the legacy 8042 I/O port.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: som-db5800-som-6867: fix SERIRQ on reset
George McCollister [Thu, 28 Jul 2016 14:49:37 +0000 (09:49 -0500)]
x86: som-db5800-som-6867: fix SERIRQ on reset

Explicitly enable ILB_SERIRQ function 1 in
cfio_regs_pad_ilb_serirq_PCONF0.

Pad configuration for SERIRQ is not set to enable the SERIRQ function
after a reset though strangely, it is on initial boot.

Rebooting from Linux, reset command in u-boot and even pushing the reset
button on the development board all lead to the SERIRQ function being
disabled (address 0xfed0c560 with value of 0x2003cc80).

Signed-off-by: George McCollister <george.mccollister@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agomisc: Add simple driver for some Nuvoton NCT6102D devices
Stefan Roese [Tue, 19 Jul 2016 05:45:46 +0000 (07:45 +0200)]
misc: Add simple driver for some Nuvoton NCT6102D devices

This simple driver provides some functions to control some of the
integrated devices. The watchdog is enabled per default. This driver
adds a function to disable the watchdog. Also the internal legacy
UART (io address 0x3f8/0x2f8) is enabled per default.

Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
8 years agox86: baytrail: Add SIO HS-UART clock setup
Stefan Roese [Tue, 19 Jul 2016 05:41:25 +0000 (07:41 +0200)]
x86: baytrail: Add SIO HS-UART clock setup

To support the BayTrail internal SIO HS UART, the internal UART clock
needs to get configured. This patch adds support for this clock
configuration which will be done, if the PCI device(s) are found.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: cache.h: Add default for CONFIG_SYS_CACHELINE_SIZE
Stefan Roese [Mon, 18 Jul 2016 10:53:31 +0000 (12:53 +0200)]
x86: cache.h: Add default for CONFIG_SYS_CACHELINE_SIZE

Don't just define ARCH_DMA_MINALIGN but also CONFIG_SYS_CACHELINE_SIZE
if it's undefined. This is needed for the xhci driver to compile.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Mention running U-Boot in 64-bit mode in the README
Simon Glass [Sun, 17 Jul 2016 07:23:46 +0000 (01:23 -0600)]
x86: Mention running U-Boot in 64-bit mode in the README

This feature is not supported. Document this, and add some details on how it
might be implemented.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Add a reference to README.efi
Simon Glass [Sun, 17 Jul 2016 07:23:45 +0000 (01:23 -0600)]
x86: Add a reference to README.efi

UEFI is commonly used on x86. Add a reference to U-Boot's support for this
in the x86 README.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Mention how to boot a 64-bit kernel from U-Boot
Simon Glass [Sun, 17 Jul 2016 07:22:41 +0000 (01:22 -0600)]
x86: Mention how to boot a 64-bit kernel from U-Boot

The README indicates that this is not supported, but this is no-longer true.
Update the text to indicate this and describe the FIT changes required.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: doc: Add note about the debug FSP usage on BayTrail
Stefan Roese [Wed, 13 Jul 2016 06:23:40 +0000 (08:23 +0200)]
x86: doc: Add note about the debug FSP usage on BayTrail

The debug FSP image is bigger in size than the normal FSP image. This
patch adds a small description on how to use this FSP debug version
by changing CONFIG_FSP_ADDR.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: conga-qeval20-qa3: Add missing MAINTERNERS entry
Stefan Roese [Mon, 15 Aug 2016 11:51:15 +0000 (13:51 +0200)]
x86: conga-qeval20-qa3: Add missing MAINTERNERS entry

Add entry for the missing internal UART defconfig to the MAINTAINERS
file.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Bin Meng <bmeng.cn@gmail.com>
CC: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agommc: mmc_legacy: fix the compiler error with disabled CONFIG_DM_MMC_OPS
Jaehoon Chung [Fri, 12 Aug 2016 02:39:05 +0000 (11:39 +0900)]
mmc: mmc_legacy: fix the compiler error with disabled CONFIG_DM_MMC_OPS

To prevent the compiler error, split the checking condition whether
cfg->ops is NULL or not.
It's more clearly, because it's not included in mmc_config structure
when CONFIG_DM_MMC_OPS is disabled.

drivers/mmc/mmc_legacy.c: In function ‘mmc_create’:
drivers/mmc/mmc_legacy.c:118:31: error: ‘const struct mmc_config’ has no member named ‘ops’
drivers/mmc/mmc_legacy.c:118:58: error: ‘const struct mmc_config’ has no member named ‘ops’
make[1]: *** [drivers/mmc/mmc_legacy.o] Error 1

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agommc: send CMD0 before CMD1 for some MMC cards
Yangbo Lu [Tue, 2 Aug 2016 07:33:18 +0000 (15:33 +0800)]
mmc: send CMD0 before CMD1 for some MMC cards

When the MMC framework was added in u-boot, the mmc_go_idle was
added before mmc_send_op_cond_iter in function mmc_send_op_cond
annotating that some cards seemed to need this. Actually, we still
need to do this in function mmc_complete_op_cond for those cards.
This has been verified on Micron MTFC4GACAECN eMMC chip.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
8 years agodefconfig: k2g_evm_defconfig: Enable mmc driver model
Sekhar Nori [Wed, 10 Aug 2016 13:54:06 +0000 (19:24 +0530)]
defconfig: k2g_evm_defconfig: Enable mmc driver model

K2G can benefit from driver model support in the
MMC/SD driver it uses: omap_hsmmc

Enable driver model MMC support for K2G.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Acked-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: dts: k2g-evm: enable mmc/sd suppport
Sekhar Nori [Wed, 10 Aug 2016 13:54:05 +0000 (19:24 +0530)]
ARM: dts: k2g-evm: enable mmc/sd suppport

The K2G EVM from TI has an SD card slot as
well as onboard eMMC for data storage.

Enable support for these.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Acked-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: dts: K2G: Add support for MMC controller
Sekhar Nori [Wed, 10 Aug 2016 13:54:04 +0000 (19:24 +0530)]
ARM: dts: K2G: Add support for MMC controller

K2G SoC from TI has two MMC/SD controllers.
Add device tree data for these.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Acked-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agodrivers: mmc: omap_hsmmc: fix build breakage
Sekhar Nori [Wed, 10 Aug 2016 13:54:03 +0000 (19:24 +0530)]
drivers: mmc: omap_hsmmc: fix build breakage

structure member 'cd_inverted' of omap_hsmmc_data
is available only when OMAP_HSMMC_USE_GPIO is
defined.

When CONFIG_DM_MMC is defined, but not
CONFIG_OMAP_GPIO, this will cause build breakage
in omap_hsmmc driver of the sort:

  CC      drivers/mmc/omap_hsmmc.o
../drivers/mmc/omap_hsmmc.c: In function 'omap_hsmmc_ofdata_to_platdata':
../drivers/mmc/omap_hsmmc.c:1763:6: error: 'struct omap_hsmmc_data' has no member named 'cd_inverted'
  priv->cd_inverted = fdtdec_get_bool(fdt, node, "cd-inverted");
      ^

Fix this by accessing cd_inverted only when
OMAP_HSMMC_USE_GPIO is defined.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Acked-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agocommon: env_nand: Ensure that we have nand_info[0] prior to use
Tom Rini [Mon, 15 Aug 2016 17:02:15 +0000 (13:02 -0400)]
common: env_nand: Ensure that we have nand_info[0] prior to use

Now that nand_info[] is an array of pointers we need to ensure that it's
been populated prior to use.  We may for example have ENV in NAND set in
configurations that run on boards with and without NAND (where default
env is fine enough, such as omap3_beagle and beagleboard (NAND) vs
beagle xM (no NAND)).

Fixes: b616d9b0a708 ("nand: Embed mtd_info in struct nand_chip")
Cc: Scott Wood <oss@buserror.net>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Scott Wood <oss@buserror.net>
8 years agotools/env: ensure environment starts at erase block boundary
Andreas Fenkart [Thu, 11 Aug 2016 19:39:17 +0000 (21:39 +0200)]
tools/env: ensure environment starts at erase block boundary

56086921 added support for unaligned environments access.
U-boot itself does not support this:
- env_nand.c fails when using an unaligned offset. It produces an
  error in nand_erase_opts{drivers/mtd/nand/nand_util.c}
- in env_sf/env_flash the unused space at the end is preserved, but
  not in the beginning. block alignment is assumed
- env_sata/env_mmc aligns offset/length to the block size of the
  underlying device. data is silently redirected to the beginning of
  a block

There is seems no use case for unaligned environment. If there is
some useful data at the beginning of the the block (e.g. end of u-boot)
that would be very unsafe. If the redundant environments are hosted by
the same erase block then that invalidates the idea of double buffering.
It might be that unaligned access was allowed in the past, and that
people with legacy u-boot are trapped. But at the time of 56086921
it wasn't supported and due to reasons above I guess it was never
introduced.
I prefer to remove that (unused) feature in favor of simplicity

Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com>
Acked-by: Stefan Agner <stefan.agner@toradex.com>
8 years agoxtensa: add support for the 'xtfpga' evaluation board
Chris Zankel [Wed, 10 Aug 2016 15:36:48 +0000 (18:36 +0300)]
xtensa: add support for the 'xtfpga' evaluation board

The 'xtfpga' board is actually a set of FPGA evaluation boards that
can be configured to run an Xtensa processor.

 - Avnet Xilinx LX60
 - Avnet Xilinx LX110
 - Avnet Xilinx LX200
 - Xilinx ML605
 - Xilinx KC705

These boards share the same components (open-ethernet, ns16550 serial,
lcd display, flash, etc.).

Signed-off-by: Chris Zankel <chris@zankel.net>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoxtensa: add core information for the de212 processor
Max Filippov [Wed, 10 Aug 2016 15:36:47 +0000 (18:36 +0300)]
xtensa: add core information for the de212 processor

DE212 is a general purpose xtensa processor without full MMU.
Core information files are autogenerated from the processor description
and are not meant to be edited.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoxtensa: add core information for the dc233c processor
Max Filippov [Wed, 10 Aug 2016 15:36:46 +0000 (18:36 +0300)]
xtensa: add core information for the dc233c processor

DC233C is an xtensa processor with full MMUv3 capable of running Linux.
Core information files are autogenerated from the processor description
and are not meant to be edited.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoxtensa: add core information for the dc232b processor
Chris Zankel [Wed, 10 Aug 2016 15:36:45 +0000 (18:36 +0300)]
xtensa: add core information for the dc232b processor

DC232B is an xtensa processor with full MMUv2 capable of running Linux.
Core information files are autogenerated from the processor description
and are not meant to be edited.

Signed-off-by: Chris Zankel <chris@zankel.net>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoxtensa: add support for the xtensa processor architecture [2/2]
Chris Zankel [Wed, 10 Aug 2016 15:36:44 +0000 (18:36 +0300)]
xtensa: add support for the xtensa processor architecture [2/2]

The Xtensa processor architecture is a configurable, extensible,
and synthesizable 32-bit RISC processor core provided by Tensilica, inc.

This is the second part of the basic architecture port, adding the
'arch/xtensa' directory and a readme file.

Signed-off-by: Chris Zankel <chris@zankel.net>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoxtensa: add support for the xtensa processor architecture [1/2]
Chris Zankel [Wed, 10 Aug 2016 15:36:43 +0000 (18:36 +0300)]
xtensa: add support for the xtensa processor architecture [1/2]

The Xtensa processor architecture is a configurable, extensible,
and synthesizable 32-bit RISC processor core provided by Cadence.

This is the first part of the basic architecture port with changes to
common files. The 'arch/xtensa' directory, and boards and additional
drivers will be in separate commits.

Signed-off-by: Chris Zankel <chris@zankel.net>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agovexpress: Check TC2 firmware support before defaulting to nonsec booting
Jon Medhurst \(Tixy\) [Thu, 23 Jun 2016 12:37:32 +0000 (13:37 +0100)]
vexpress: Check TC2 firmware support before defaulting to nonsec booting

The firmware on TC2 needs to be configured appropriately before booting
in nonsec mode will work as expected, so test for this and fall back to
sec mode if required.

Signed-off-by: Jon Medhurst <tixy@linaro.org>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-atmel
Tom Rini [Mon, 15 Aug 2016 21:31:23 +0000 (17:31 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-atmel

8 years agommc: atmel_sdhci: Convert to the driver model support
Wenyou Yang [Wed, 10 Aug 2016 02:51:05 +0000 (10:51 +0800)]
mmc: atmel_sdhci: Convert to the driver model support

Convert the driver to the driver model while retaining the existing
legacy code. This allows the driver to support boards that have
converted to driver model as well as those that have not.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
8 years agodm: atmel: Add driver model support for the ehci driver
Wenyou Yang [Fri, 5 Aug 2016 00:57:35 +0000 (08:57 +0800)]
dm: atmel: Add driver model support for the ehci driver

Add driver model support while retaining the existing legacy code.
This allows the driver to support boards that have converted to
driver model as well as those that have not.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agoARM: at91/dt: Add device tree for SAMA5D2 Xplained
Wenyou Yang [Mon, 25 Jul 2016 09:46:17 +0000 (17:46 +0800)]
ARM: at91/dt: Add device tree for SAMA5D2 Xplained

Add device tree for SAMA5D2 Xplained board.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
8 years agoatmel: Bring in at91 pio4 device tree file and bindings
Wenyou Yang [Wed, 20 Jul 2016 09:16:28 +0000 (17:16 +0800)]
atmel: Bring in at91 pio4 device tree file and bindings

Bring in required device tree file and bindings from Linux.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Andreas Bießmann <andreas@biessmann.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agopinctrl: at91-pio4: Add pinctrl driver
Wenyou Yang [Wed, 20 Jul 2016 09:16:27 +0000 (17:16 +0800)]
pinctrl: at91-pio4: Add pinctrl driver

AT91 PIO4 controller is a combined gpio-controller, pin-mux and
pin-config module. The peripheral's pins are assigned through
per-pin based muxing logic.

The pin configuration is performed on specific registers which
are shared along with the gpio controller. So regard the pinctrl
device as a child of atmel_pio4 device.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andreas Bießmann <andreas@biessmann.org>
8 years agogpio: atmel_pio4: Rework to support DM & DT
Wenyou Yang [Wed, 20 Jul 2016 09:16:26 +0000 (17:16 +0800)]
gpio: atmel_pio4: Rework to support DM & DT

Rework the driver to support driver model and device tree, and
support to regard the pio4 pinctrl device as a child of
atmel_pio4 device.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agogpio: atmel_pio4: Move PIO4 definitions to head file
Wenyou Yang [Wed, 20 Jul 2016 09:16:25 +0000 (17:16 +0800)]
gpio: atmel_pio4: Move PIO4 definitions to head file

In order to make these PIO4 definitions shared with AT91 PIO4
pinctrl driver, move them from the existing gpio driver to the
head file, and rephrase them.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoclk.h: inline clk_get_by_name()
Andreas Bießmann [Mon, 15 Aug 2016 19:04:41 +0000 (21:04 +0200)]
clk.h: inline clk_get_by_name()

Fix compile warning for non OF_CONTROL builds:

---8<---
In file included from /Volumes/devel/u-boot/drivers/gpio/atmel_pio4.c:10:0:
/Volumes/devel/u-boot/include/clk.h:107:12: warning: 'clk_get_by_name' defined but not used [-Wunused-function]
--->8---

Signed-off-by: Andreas Bießmann <andreas@biessmann.org>
Acked-by: Stephen Warren <swarren@nvidia.com>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-net
Tom Rini [Mon, 15 Aug 2016 20:38:39 +0000 (16:38 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-net

8 years agonet: mii: Clean up legacy glue that is not used
Joe Hershberger [Mon, 8 Aug 2016 16:28:41 +0000 (11:28 -0500)]
net: mii: Clean up legacy glue that is not used

The cleanup of the legacy mii registration API that's no longer used now
that the drivers have been converted to use the (more) modern API.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agonet: mii: Changes not made by spatch
Joe Hershberger [Mon, 8 Aug 2016 16:28:39 +0000 (11:28 -0500)]
net: mii: Changes not made by spatch

If the functions passed to the registration function are not in the same
C file (extern) then spatch will not handle the dependent changes.

Make those changes manually.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
For the 4xx related files:
Acked-by: Stefan Roese <sr@denx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agonet: mii: Fix changes made by spatch
Joe Hershberger [Mon, 8 Aug 2016 16:28:40 +0000 (11:28 -0500)]
net: mii: Fix changes made by spatch

Some of the changes were a bit too complex.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agonet: mii: Use spatch to update miiphy_register
Joe Hershberger [Mon, 8 Aug 2016 16:28:38 +0000 (11:28 -0500)]
net: mii: Use spatch to update miiphy_register

Run scripts/coccinelle/net/mdio_register.cocci on the U-Boot code base.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agoscripts: Add a cocci patch for miiphy_register
Joe Hershberger [Mon, 8 Aug 2016 16:28:37 +0000 (11:28 -0500)]
scripts: Add a cocci patch for miiphy_register

Many Ethernet drivers still use the legacy miiphy API to register their
mdio interface for access to the mdio commands.

This semantic patch will convert the drivers from the legacy adapter API
to the more modern alloc/register API.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agoclk: at91: Add clock driver
Wenyou Yang [Wed, 20 Jul 2016 09:55:12 +0000 (17:55 +0800)]
clk: at91: Add clock driver

The patch is referred to at91 clock driver of Linux, to make
the clock node descriptions in DT aligned with the Linux's.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agotpm: atmel_twi: Make compatible with DM I2C busses
mario.six@gdsys.cc [Mon, 18 Jul 2016 11:47:45 +0000 (13:47 +0200)]
tpm: atmel_twi: Make compatible with DM I2C busses

Commit 302c5db ("dm: tpm: Add Driver Model support for tpm_atmel_twi
driver") converted the Atmel TWI TPM driver itself to driver model, but
kept the legacy-style i2c_write/i2c_read calls.

Commit 3e7d940 ("dm: tpm: Every TPM drivers should depends on DM_TPM")
then made DM_I2C a dependency of the driver, effectively forcing users
to turn on CONFIG_DM_I2C_COMPAT to get it to work.

This patch adds the necessary dm_i2c_write/dm_i2c_read calls to make the
driver compatible with DM, but also keeps the legacy calls in ifdefs, so
that the driver is now compatible with both DM and non-DM setups.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andreas Bießmann <andreas@biessmann.org>