]> git.sur5r.net Git - u-boot/log
u-boot
6 years agoefi_loader: fix signature of efi_disconnect_controller
Heinrich Schuchardt [Thu, 11 Jan 2018 07:16:03 +0000 (08:16 +0100)]
efi_loader: fix signature of efi_disconnect_controller

Handles should be passed as efi_handle_t and not as void *.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: implement ConnectController
Heinrich Schuchardt [Thu, 11 Jan 2018 07:16:02 +0000 (08:16 +0100)]
efi_loader: implement ConnectController

Implement the ConnectController boot service.

A unit test is supplied in a subsequent patch.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: debug output installed device path
Heinrich Schuchardt [Thu, 11 Jan 2018 07:16:01 +0000 (08:16 +0100)]
efi_loader: debug output installed device path

When a device path protocol is installed write the device
path to the console in debug mode.

For printing the new macro EFI_PRINT is used, which can be reused
for future diagnostic output.

Remove unused EFI_PRINT_GUID macro

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: implement OpenProtocolInformation
Heinrich Schuchardt [Thu, 11 Jan 2018 07:16:00 +0000 (08:16 +0100)]
efi_loader: implement OpenProtocolInformation

efi_open_protocol_information provides the agent and controller
handles as well as the attributes and open count of an protocol
on a handle.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
[agraf: fix counting error]
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: open_info in CloseProtocol
Heinrich Schuchardt [Thu, 11 Jan 2018 07:15:59 +0000 (08:15 +0100)]
efi_loader: open_info in CloseProtocol

efi_open_protocol and efi_close_protocol have to keep track of
opened protocols.

Check if the protocol was opened for the same agent and
controller.

Remove all open protocol information for this pair.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: open_info in OpenProtocol
Heinrich Schuchardt [Thu, 11 Jan 2018 07:15:58 +0000 (08:15 +0100)]
efi_loader: open_info in OpenProtocol

efi_open_protocol has to keep track of opened protocols.

OpenProtocol enters the agent and controller handle
information into this list.

A unit test is supplied with a subsequent patch.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: list of open protocol infos
Heinrich Schuchardt [Thu, 11 Jan 2018 07:15:57 +0000 (08:15 +0100)]
efi_loader: list of open protocol infos

Add a list of open protocol infos to each protocol of a handle.

Provide helper functions to access the list items.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_selftest: do not try to close device path protocol
Heinrich Schuchardt [Thu, 11 Jan 2018 07:15:56 +0000 (08:15 +0100)]
efi_selftest: do not try to close device path protocol

CloseProtocol cannot be called without agent handle.

There is no need to close the device path protocol if
it has been opened without agent handle.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: simplify efi_remove_all_protocols
Heinrich Schuchardt [Thu, 11 Jan 2018 07:15:55 +0000 (08:15 +0100)]
efi_loader: simplify efi_remove_all_protocols

Replace list_for_each_safe() and list_entry() by
list_for_each_entry_safe().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_selftest: colored test output
Heinrich Schuchardt [Thu, 11 Jan 2018 07:15:54 +0000 (08:15 +0100)]
efi_selftest: colored test output

Add color coding to output:
test section    blue
success         green
errors          red
todo            yellow
summary         white
others          light gray

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
[agraf: Fold in move of set_attribute before the print]
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agotools: provide a tool to convert a binary file to an include
Heinrich Schuchardt [Wed, 17 Jan 2018 19:16:09 +0000 (20:16 +0100)]
tools: provide a tool to convert a binary file to an include

For testing EFI disk management we need an in-memory image of
a disk.

The tool file2include converts a file to a C include. The file
is separated into strings of 8 bytes. Only the non-zero strings
are written to the include. The output format has been designed
to maintain readability.

 #define EFI_ST_DISK_IMG { 0x00010000, { \
  {0x000001b8, "\x94\x37\x69\xfc\x00\x00\x00\x00"}, /* .7i..... */ \
  {0x000001c0, "\x02\x00\x83\x02\x02\x00\x01\x00"}, /* ........ */ \
  {0x000001c8, "\x00\x00\x7f\x00\x00\x00\x00\x00"}, /* ........ */ \
  {0x000001f8, "\x00\x00\x00\x00\x00\x00\x55\xaa"}, /* ......U. */ \
 ...
  {0x00006000, "\x48\x65\x6c\x6c\x6f\x20\x77\x6f"}, /* Hello wo */ \
  {0x00006008, "\x72\x6c\x64\x21\x0a\x00\x00\x00"}, /* rld!.... */ \
  {0, NULL} } }

As the disk image needed for testing contains mostly zeroes a high
compression ratio can be attained.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: correctly call images
Heinrich Schuchardt [Thu, 18 Jan 2018 19:28:43 +0000 (20:28 +0100)]
efi_loader: correctly call images

Avoid a failed assertion when an EFI app calls an EFI app.

Avoid that the indent level increases when calling 'bootefi hello'
repeatedly.

Avoid negative indent level when an EFI app calls an EFI app that
calls an EFI app (e.g. iPXE loads grub which starts the kernel).

Return the status code of a loaded image that returns without
calling the Exit boot service.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agovsprintf.c: add EFI device path printing
Heinrich Schuchardt [Wed, 10 Jan 2018 17:06:08 +0000 (18:06 +0100)]
vsprintf.c: add EFI device path printing

For debugging efi_loader we need the capability to print EFI
device paths. With this patch we can write:

    debug("device path: %pD", dp);

A possible output would be

    device path: /MemoryMapped(0x0,0x3ff93a82,0x3ff93a82)

This enhancement is not available when building without EFI support
and neither in the SPL nor in the API example.

A test is provided. It can be executed in the sandbox with command
ut_print.

The development for EFI support in the sandbox is currently in
branch u-boot-dm/efi-working. The branch currently lacks
commit 6ea8b580f06b ("efi_loader: correct DeviceNodeToText
for media types"). Ater rebasing the aforementioned branch on
U-Boot v2018.01 the test is executed successfully.

Without EFI support in the sandbox the test is simply skipped.

Suggested-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: text output for device path end node
Heinrich Schuchardt [Sun, 14 Jan 2018 16:05:57 +0000 (17:05 +0100)]
efi_loader: text output for device path end node

Without the patch a device path consisting only of an end node is
displayed as '/UNKNOWN(007f,00ff)'. It should be displayed as '/'.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoMAINTAINERS: correct entry for lib/efi*/
Heinrich Schuchardt [Tue, 2 Jan 2018 15:00:45 +0000 (16:00 +0100)]
MAINTAINERS: correct entry for lib/efi*/

lib/efi* indicates files efi* in directory lib.
lib/efi*/ indicates all files in directories lib/efi*.

Fixes: 623b3a579765 efi_selftest: provide an EFI selftest application
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_selftest: do not cut off u16 strings when printing
Heinrich Schuchardt [Fri, 22 Dec 2017 18:21:04 +0000 (19:21 +0100)]
efi_selftest: do not cut off u16 strings when printing

Device paths can be very long. Due to a limited output buffer
the output for device paths is cut off. We can avoid this by
directly calling the boottime service with the the device path
string.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
[agraf: Remove coloring code change]
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_selftest: avoid superfluous messages for task priority levels
Heinrich Schuchardt [Fri, 22 Dec 2017 18:21:03 +0000 (19:21 +0100)]
efi_selftest: avoid superfluous messages for task priority levels

In the task priority levels test debug output is written even if no
failure is detected.

Remove this distracting output.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_selftest: avoid superfluous messages for event services
Heinrich Schuchardt [Fri, 22 Dec 2017 18:21:02 +0000 (19:21 +0100)]
efi_selftest: avoid superfluous messages for event services

In the event services test debug output is written even if no
failure is detected.

Remove this distracting output.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: use correct format string for unsigned long
Heinrich Schuchardt [Fri, 22 Dec 2017 18:16:57 +0000 (19:16 +0100)]
efi_loader: use correct format string for unsigned long

virt_size is of type unsigned long.
So it should be printed with %ul.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: add comments to memory functions
Heinrich Schuchardt [Mon, 4 Dec 2017 19:52:41 +0000 (20:52 +0100)]
efi_loader: add comments to memory functions

Add comments describing memory functions.

Fix the formatting of a function declaration.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: use wide string do define firmware vendor
Heinrich Schuchardt [Mon, 11 Dec 2017 19:10:20 +0000 (20:10 +0100)]
efi_loader: use wide string do define firmware vendor

As the U-Boot is compiled with -fshort-wchar we can define
the firmware vendor constant as wide string.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: support device path for IDE and SCSI disks
Heinrich Schuchardt [Mon, 11 Dec 2017 11:56:44 +0000 (12:56 +0100)]
efi_loader: support device path for IDE and SCSI disks

Correctly create the device path for IDE and SCSI disks.

Support for SATA remains to be done in a future patch.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: create full device path for block devices
Heinrich Schuchardt [Mon, 11 Dec 2017 11:56:43 +0000 (12:56 +0100)]
efi_loader: create full device path for block devices

When creating the device path of a block device it has to
comprise the block device itself and should not end at
its parent.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agofs: fat: Drop CONFIG_SUPPORT_VFAT
Tuomas Tynkkynen [Fri, 5 Jan 2018 00:45:21 +0000 (02:45 +0200)]
fs: fat: Drop CONFIG_SUPPORT_VFAT

fat.h unconditionally defines CONFIG_SUPPORT_VFAT (and has done since
2003), so as a result VFAT support is always enabled regardless of
whether a board config defines it or not. Drop this unnecessary option.

Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
6 years agofs: FAT: Fix typo in FS_FAT_MAX_CLUSTSIZE description
Tuomas Tynkkynen [Fri, 5 Jan 2018 00:45:20 +0000 (02:45 +0200)]
fs: FAT: Fix typo in FS_FAT_MAX_CLUSTSIZE description

Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
6 years agoenv: ENV_IS_IN_FAT improvements
Tuomas Tynkkynen [Fri, 5 Jan 2018 00:45:19 +0000 (02:45 +0200)]
env: ENV_IS_IN_FAT improvements

Make it select FS_FAT as well, because if it's not selected, enabling
ENV_IS_IN_FAT causes a Kconfig warning:

warning: (ENV_IS_IN_FAT) selects FAT_WRITE which has unmet direct dependencies (FS_FAT)

This also allows dropping some code from config_fallbacks.

Also drop the unnecessary help text about having to enable
CONFIG_FAT_WRITE - Kconfig automatically handles that.

Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
6 years agoARM: poplar: Use Kconfig to enable CONFIG_FAT_WRITE
Tuomas Tynkkynen [Fri, 5 Jan 2018 00:45:18 +0000 (02:45 +0200)]
ARM: poplar: Use Kconfig to enable CONFIG_FAT_WRITE

The symbol's been converted to Kconfig for a while, poplar is the only
one #defining it.

Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
6 years agofs: Migrate ext4 to Kconfig
Tuomas Tynkkynen [Fri, 5 Jan 2018 00:45:17 +0000 (02:45 +0200)]
fs: Migrate ext4 to Kconfig

Migrate the following symbols to Kconfig:

CONFIG_FS_EXT4
CONFIG_EXT4_WRITE

The definitions in config_fallbacks.h can now be expressed in Kconfig.

Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
6 years agoConvert CONFIG_ROCKCHIP_USB2_PHY to Kconfig
Adam Ford [Tue, 2 Jan 2018 16:39:52 +0000 (10:39 -0600)]
Convert CONFIG_ROCKCHIP_USB2_PHY to Kconfig

This converts the following to Kconfig:
   CONFIG_ROCKCHIP_USB2_PHY

Signed-off-by: Adam Ford <aford173@gmail.com>
6 years agoConvert CONFIG_OMAP_USB_PHY to Kconfig
Adam Ford [Tue, 2 Jan 2018 16:39:21 +0000 (10:39 -0600)]
Convert CONFIG_OMAP_USB_PHY to Kconfig

This converts the following to Kconfig:
   CONFIG_OMAP_USB_PHY

Signed-off-by: Adam Ford <aford173@gmail.com>
6 years agoConvert CONFIG_TWL4030_USB to Kconfig
Adam Ford [Tue, 2 Jan 2018 16:38:36 +0000 (10:38 -0600)]
Convert CONFIG_TWL4030_USB to Kconfig

This converts the following to Kconfig:
   CONFIG_TWL4030_USB

Signed-off-by: Adam Ford <aford173@gmail.com>
6 years agoConvert CONFIG_DAVINCI_SPI to Kconfig
Adam Ford [Sat, 30 Dec 2017 13:33:42 +0000 (07:33 -0600)]
Convert CONFIG_DAVINCI_SPI to Kconfig

This converts the following to Kconfig:
   CONFIG_DAVINCI_SPI

Signed-off-by: Adam Ford <aford173@gmail.com>
6 years agoConvert CONFIG_USB_MUSB_HCD et al to Kconfig
Adam Ford [Fri, 29 Dec 2017 15:15:41 +0000 (09:15 -0600)]
Convert CONFIG_USB_MUSB_HCD et al to Kconfig

This converts the following to Kconfig:
   CONFIG_USB_MUSB_HCD
   CONFIG_USB_MUSB_UDC
   CONFIG_USB_DAVINCI
   CONFIG_USB_OMAP3
   CONFIG_USB_DA8XX
   CONFIG_USB_AM35X

Signed-off-by: Adam Ford <aford173@gmail.com>
6 years agoConvert CONFIG_USB_MUSB_OMAP2PLUS et al to Kconfig
Adam Ford [Fri, 29 Dec 2017 14:16:05 +0000 (08:16 -0600)]
Convert CONFIG_USB_MUSB_OMAP2PLUS et al to Kconfig

This converts the following to Kconfig:
   CONFIG_USB_MUSB_OMAP2PLUS
   CONFIG_USB_MUSB_AM35X
   CONFIG_USB_MUSB_DSPS
   CONFIG_USB_MUSB_PIO_ONLY

Signed-off-by: Adam Ford <aford173@gmail.com>
6 years agoARM: omap3_logic: Enable SPL_OF_CONTROL and SPL_OF_PLATDATA
Adam Ford [Wed, 27 Dec 2017 19:39:56 +0000 (13:39 -0600)]
ARM: omap3_logic: Enable SPL_OF_CONTROL and SPL_OF_PLATDATA

The SPL doesn't have much room, so in order to support OF_CONTROL
in SPL, we need the extra functionality of SPL_OF_PLATDATA.

Adding these features allows us to remove a small part of code without
losing the serial port during SPL.

Signed-off-by: Adam Ford <aford173@gmail.com>
6 years agotravis-ci: Add qemu-x86_64 target
Tom Rini [Sat, 11 Feb 2017 15:44:05 +0000 (10:44 -0500)]
travis-ci: Add qemu-x86_64 target

Add qemu-x86_64 to the list of targets we use for test.py runs.

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agommc: fsl_esdhc: Fix i.MX53 eSDHCv3 clock
Benoît Thébaudeau [Tue, 16 Jan 2018 21:44:18 +0000 (22:44 +0100)]
mmc: fsl_esdhc: Fix i.MX53 eSDHCv3 clock

Commit 4f425280fa71 ("mmc: fsl_esdhc: Allow all supported prescaler
values") made it possible to set SYSCTL.SDCLKFS to 0 in SDR mode on
i.MX, thus bypassing the SD clock frequency prescaler, in order to be
able to get higher SD clock frequencies in some contexts. However, that
commit missed the fact that this value is illegal on the eSDHCv3
instance of the i.MX53. This seems to be the only exception on i.MX,
this value being legal even for the eSDHCv2 instances of the i.MX53.

Fix this issue by changing the minimum prescaler value for the single
instance of the i.MX53 eSDHCv3 controller.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agommc: fix the wrong disabling clock
Jaehoon Chung [Wed, 17 Jan 2018 10:36:58 +0000 (19:36 +0900)]
mmc: fix the wrong disabling clock

When power is off, clock is not disabling.
Because it's passed to 1, mmc->clock should be set to f_min value.
Some drivers can't initialize the eMMC/SD card with current status.

This patch is to fix the disabling clock value to 0.

Fixes: 2e7410d76ad1 ("mmc: disable the mmc clock during power off")
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Tested-by: Guillaume GARDET <guillaume.gardet@free.fr>
Tested-by: Anand Moon <linux.amoon@gmail.com>
6 years agommc: sdhci: change data transfer failure into debug message
Masahiro Yamada [Fri, 29 Dec 2017 17:00:12 +0000 (02:00 +0900)]
mmc: sdhci: change data transfer failure into debug message

During the tuning, drivers repeat data transfer, changing timing
parameters in the controller hardware.  So, the tuning commands
(CMD19 for SD, CMD21 for eMMC) fail, and this is not a problem
at all.

Showing "Error detected..." in normal operation just make users
upset.  This should not be shown.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agommc: sdhci-cadence: add HS200 support
Masahiro Yamada [Fri, 12 Jan 2018 09:10:38 +0000 (18:10 +0900)]
mmc: sdhci-cadence: add HS200 support

Add HS200 timing setting and the MMC tuning callback.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
6 years agommc: sdhci-cadence: call mmc_of_parse()
Masahiro Yamada [Fri, 29 Dec 2017 17:00:10 +0000 (02:00 +0900)]
mmc: sdhci-cadence: call mmc_of_parse()

This is needed to parse more capabilities such as mmc-hs200-1_8v.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agommc: sdhci-cadence: use bitfield access macros for cleanup
Masahiro Yamada [Fri, 29 Dec 2017 17:00:09 +0000 (02:00 +0900)]
mmc: sdhci-cadence: use bitfield access macros for cleanup

This driver is a counterpart from the one in Linux.  Follow the
clean-up I did in Linux.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agommc: sdhci: do not overwrite host_caps in sdhci_setup_cfg()
Masahiro Yamada [Fri, 29 Dec 2017 17:00:08 +0000 (02:00 +0900)]
mmc: sdhci: do not overwrite host_caps in sdhci_setup_cfg()

This line overwrites host_cap that has been set by drivers and/or
helpers like mmc_of_parse().  Accumulate capabilities flags.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agommc: let mmc_of_parse() fail for insane bus-width value
Masahiro Yamada [Fri, 29 Dec 2017 17:00:07 +0000 (02:00 +0900)]
mmc: let mmc_of_parse() fail for insane bus-width value

You must fix your DT if it specifies insane bus-width, for example,
  bus-width = <3>;

debug() is not displayed in usual configuration, so people will not
even notice weirdness.  Use dev_err() instead, then let it fail.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agommc: do not overwrite cfg->f_max if "max-frequency" if missing
Masahiro Yamada [Fri, 29 Dec 2017 17:00:06 +0000 (02:00 +0900)]
mmc: do not overwrite cfg->f_max if "max-frequency" if missing

mmc_of_parse() in U-Boot is a pussy helper; it sets cfg->f_max to
52MHz even if DT does not provide "max-frequency" at all.  This can
overwrite cfg->f_max that may have been set to a reasonable default.

As the DT binding says, "max-frequency" is an optional property.
Do nothing if DT does not specify it.  This is the behavior of
mmc_of_parse() in Linux.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agodm: add dev_read_u32()
Masahiro Yamada [Fri, 29 Dec 2017 17:00:05 +0000 (02:00 +0900)]
dm: add dev_read_u32()

dev_read_u32_default() always returns something even when the property
is missing.  So, it is impossible to do nothing in the case.  One
solution is to use ofnode_read_u32() instead, but adding dev_read_u32()
will be helpful.

BTW, Linux has an equvalent function, device_property_read_u32();
it is clearer that it reads a property.  I cannot understand the
behavior of dev_read_u32() from its name.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoMerge git://git.denx.de/u-boot-dm
Tom Rini [Mon, 22 Jan 2018 01:13:29 +0000 (20:13 -0500)]
Merge git://git.denx.de/u-boot-dm

6 years agolib: fdtdec: Fix some style violations
Mario Six [Mon, 15 Jan 2018 10:07:36 +0000 (11:07 +0100)]
lib: fdtdec: Fix some style violations

Fix some style violations in fdtdec.c, and reduce the scope of some
variables.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mario Six <mario.six@gdsys.cc>
6 years agolib: fdtdec: Fix whitespace style violations
Mario Six [Mon, 15 Jan 2018 10:07:35 +0000 (11:07 +0100)]
lib: fdtdec: Fix whitespace style violations

Fix some whitespace-related style violations in fdtdec.c.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mario Six <mario.six@gdsys.cc>
6 years agocore: Make device_is_compatible live-tree compatible
Mario Six [Mon, 15 Jan 2018 10:07:20 +0000 (11:07 +0100)]
core: Make device_is_compatible live-tree compatible

Judging from its name and parameters, device_is_compatible looks like it
is compatible with a live device tree, but it actually isn't.

Make it compatible with a live device tree.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mario Six <mario.six@gdsys.cc>
6 years agocore: Add {ofnode, dev}_translate_address functions
Mario Six [Mon, 15 Jan 2018 10:07:19 +0000 (11:07 +0100)]
core: Add {ofnode, dev}_translate_address functions

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mario Six <mario.six@gdsys.cc>
6 years agocore: read: Fix style violations
Mario Six [Mon, 15 Jan 2018 10:07:18 +0000 (11:07 +0100)]
core: read: Fix style violations

There are some whitespace-related style violations in read.c; fix those.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mario Six <mario.six@gdsys.cc>
6 years agocore: ofnode: Fix style violations
Mario Six [Mon, 15 Jan 2018 10:07:17 +0000 (11:07 +0100)]
core: ofnode: Fix style violations

There are some style violations in ofnode.c; fix those.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mario Six <mario.six@gdsys.cc>
6 years agoclk: Makefile: Sort entries alphabetically
Mario Six [Mon, 15 Jan 2018 10:06:54 +0000 (11:06 +0100)]
clk: Makefile: Sort entries alphabetically

The Makefile entries in the clk driver directory were not alphabetically
sorted. Correct this.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mario Six <mario.six@gdsys.cc>
6 years agoclk: Remove superfluous gd declarations
Mario Six [Mon, 15 Jan 2018 10:06:53 +0000 (11:06 +0100)]
clk: Remove superfluous gd declarations

The clk uclass was converted to support a live device tree recently,
hence the global data pointer declarations are no longer needed.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mario Six <mario.six@gdsys.cc>
6 years agoclk: clk_fixed_rate: Fix style violation
Mario Six [Mon, 15 Jan 2018 10:06:52 +0000 (11:06 +0100)]
clk: clk_fixed_rate: Fix style violation

Fix a mis-indented function call in clk_fixed_rate.c

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mario Six <mario.six@gdsys.cc>
6 years agoclk: clk-uclass: Fix style violations
Mario Six [Mon, 15 Jan 2018 10:06:51 +0000 (11:06 +0100)]
clk: clk-uclass: Fix style violations

checkpatch.pl complains that the clk_ops structures used in clk-uclass.c
ought to be const, so we mark them as const.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mario Six <mario.six@gdsys.cc>
6 years agodm: pinctrl: sync with Linux to use pin_config_param
Peng Fan [Fri, 5 Jan 2018 06:05:17 +0000 (14:05 +0800)]
dm: pinctrl: sync with Linux to use pin_config_param

Sync with Linux commit 30a7acd573899fd8b("Linux 4.15-rc6")
to use enum pin_config_param.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agopatman: Unquote output from get_maintainer.pl
Stefan Brüns [Sun, 31 Dec 2017 22:21:17 +0000 (23:21 +0100)]
patman: Unquote output from get_maintainer.pl

get_maintainer.pl quotes names which it considers unsafe, i.e. anything
containing [^a-zA-Z0-9_ \-]. This confuses patman, it will duplicate
addresses which are also in Series-to/cc. Strip the quotes.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agodrivers: core: Add translation in live tree case
Mario Six [Wed, 20 Dec 2017 08:52:12 +0000 (09:52 +0100)]
drivers: core: Add translation in live tree case

The function dev_read_addr calls ofnode_get_addr_index in the live tree
case, which does not apply bus translations to the address read from the
device tree. This results in illegal addresses on boards that rely on
bus translations being applied.

Fix this situation by applying bus translations in the live tree case as
well.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Tested-by: Stephen Warren <swarren@nvidia.com>
6 years agodm: fix typo falback
Heinrich Schuchardt [Sun, 17 Dec 2017 17:19:43 +0000 (18:19 +0100)]
dm: fix typo falback

%s/falback/fallback/g

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoMerge git://git.denx.de/u-boot-marvell
Tom Rini [Sat, 20 Jan 2018 13:39:47 +0000 (08:39 -0500)]
Merge git://git.denx.de/u-boot-marvell

6 years agoMerge git://git.denx.de/u-boot-arc
Tom Rini [Fri, 19 Jan 2018 21:07:36 +0000 (16:07 -0500)]
Merge git://git.denx.de/u-boot-arc

6 years agoconfigs: keystone2: env: Fix burn_uboot_spi command
Faiz Abbas [Tue, 16 Jan 2018 08:13:40 +0000 (13:43 +0530)]
configs: keystone2: env: Fix burn_uboot_spi command

Now the u-boot spi image is greater than 0x90000, increase the same in
env during spi erase.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agocheckpatch: Ignore 'short' Kconfig help entries
Tom Rini [Mon, 15 Jan 2018 13:47:05 +0000 (08:47 -0500)]
checkpatch: Ignore 'short' Kconfig help entries

A 2 line help entry for a new Kconfig entry is, at this time, sufficient
in some cases, so lets drop that warning for now.

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agopowerpc: Drop unreferenced CONFIG_* defines
Tuomas Tynkkynen [Sat, 13 Jan 2018 00:21:37 +0000 (02:21 +0200)]
powerpc: Drop unreferenced CONFIG_* defines

The following config symbols are only defined once and never referenced
anywhere else:

CONFIG_CYRUS
CONFIG_IDS8313
CONFIG_MPC8308_P1M
CONFIG_MPC8308RDB
CONFIG_MPC8349EMDS
CONFIG_MPC8349ITXGP
CONFIG_SBC8349
CONFIG_SBC8548
CONFIG_SBC8641D
CONFIG_TQM834X
CONFIG_VE8313
CONFIG_XPEDITE5140
CONFIG_XPEDITE5200
CONFIG_XPEDITE550X

Most of them are config symbols named after the respective boards which
seems to have been a standard practice at some point.

Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
Acked-by: Mario Six <mario.six@gdsys.cc>
6 years agoconfigs: stm32: move config flag from defconfig to Kconfig
Patrice Chotard [Fri, 12 Jan 2018 08:23:50 +0000 (09:23 +0100)]
configs: stm32: move config flag from defconfig to Kconfig

Move system flags from defconfig to mach-stm32/Kconfig

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Vikas Manocha <vikas.manocha@st.com>
6 years agoserial: stm32: Rename serial_stm32x7.c to serial_stm32.c
Patrice Chotard [Fri, 12 Jan 2018 08:23:49 +0000 (09:23 +0100)]
serial: stm32: Rename serial_stm32x7.c to serial_stm32.c

Now this driver is used across stm32f4, stm32f7 and stm32h7
SoCs family, give it a generic name.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Vikas Manocha <vikas.manocha@st.com>
6 years agom68k: Drop unreferenced CONFIG_* defines
Tuomas Tynkkynen [Fri, 12 Jan 2018 01:11:52 +0000 (03:11 +0200)]
m68k: Drop unreferenced CONFIG_* defines

The following config symbols are only defined once and never referenced
anywhere else:

CONFIG_AMCORE
CONFIG_ASTRO5373L
CONFIG_M52277EVB
CONFIG_M5253DEMO
CONFIG_M5253EVBE
CONFIG_M5275EVB
CONFIG_M54418TWR
CONFIG_STMARK2

Most of them are config symbols named after the respective boards which
seems to have been a standard practice at some point.

Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
6 years agonds32: Drop unreferenced CONFIG_ADP_AG101P
Tuomas Tynkkynen [Fri, 12 Jan 2018 00:55:35 +0000 (02:55 +0200)]
nds32: Drop unreferenced CONFIG_ADP_AG101P

Seems to be again one of those CONFIG_ symbols named after a board, with
nothing referencing it.

Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
6 years agopcmcia: Drop a bunch of unused CONFIG_SYS_PCMCIA_ macros
Tuomas Tynkkynen [Fri, 12 Jan 2018 00:47:20 +0000 (02:47 +0200)]
pcmcia: Drop a bunch of unused CONFIG_SYS_PCMCIA_ macros

Last users of the following macros (for n = 0..7) were removed in
commit 5b8e76c35ec312a ("powerpc, 8xx: remove support for 8xx"):

CONFIG_SYS_PCMCIA_PBRn
CONFIG_SYS_PCMCIA_PORn

Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
6 years agoTravis-CI: Add job for running test.py on qemu_arm64
Tuomas Tynkkynen [Thu, 11 Jan 2018 14:11:26 +0000 (16:11 +0200)]
Travis-CI: Add job for running test.py on qemu_arm64

The corresponding changes in the uboot-test-hooks repo are:

https://github.com/swarren/uboot-test-hooks/pull/15

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agoTravis-CI: Download ARM64 version of GRUB as well
Tuomas Tynkkynen [Thu, 11 Jan 2018 14:11:25 +0000 (16:11 +0200)]
Travis-CI: Download ARM64 version of GRUB as well

For preparation of adding AArch64 test.py jobs.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agoARM: Document AArch64 version of qemu-arm
Tuomas Tynkkynen [Thu, 11 Jan 2018 14:11:24 +0000 (16:11 +0200)]
ARM: Document AArch64 version of qemu-arm

It's mostly obvious, except that QEMU is annoying and requires an
explicit '-cpu cortex-a57' (or some other 64-bit core) to actually run
in 64-bit mode.

While at it, remove the references to setting the ARCH environment
variable; that is not used in U-Boot.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agoARM: qemu-arm: Add support for AArch64
Tuomas Tynkkynen [Thu, 11 Jan 2018 14:11:23 +0000 (16:11 +0200)]
ARM: qemu-arm: Add support for AArch64

This adds support for '-machine virt' on AArch64. This is rather simple:
we just add TARGET_QEMU_ARM_xxBIT to select a few different Kconfig
symbols, provide the ARMv8 memory map from the board file and add a new
defconfig based on the 32-bit defconfig.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agoarm: mach-omap2: Remove secure certificate name printing
Andrew F. Davis [Tue, 9 Jan 2018 20:33:54 +0000 (14:33 -0600)]
arm: mach-omap2: Remove secure certificate name printing

The signing certificate name is always 15 chars long, but need not be
null terminated. One solution is then to use printf precision modifiers
to only print this many chars ("%.15s"), but tiny printf does not support
this, so lets just drop printing the cert name for now.

Signed-off-by: Andrew F. Davis <afd@ti.com>
6 years agoarm: am33xx: security: Fix size calculation on header
Madan Srinivas [Tue, 9 Jan 2018 20:32:41 +0000 (14:32 -0600)]
arm: am33xx: security: Fix size calculation on header

Fix the size calculation in the verify boot. The header size
should be subtracted from the image size, not be assigned to
the image size.

Fixes: 0830d72bb9f8 ("arm: am33xx: security: adds auth support for encrypted images")
Signed-off-by: Madan Srinivas <madans@ti.com>
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
6 years agorpi_0_w: Add configs consistent with RpI3
Drew Moseley [Sun, 7 Jan 2018 16:48:06 +0000 (11:48 -0500)]
rpi_0_w: Add configs consistent with RpI3

CONFIG_OF_EMBED in particular is needed to allow the Raspberry Pi
firmware to pass the DTB to U-Boot and on to the kernel.

Signed-off-by: Drew Moseley <drew.moseley@northern.tech>
6 years agoARM: omap3: evm: Add kernel image loading from UBIFS and EXT4
Derald D. Woods [Sun, 7 Jan 2018 05:10:06 +0000 (23:10 -0600)]
ARM: omap3: evm: Add kernel image loading from UBIFS and EXT4

This commit adds UBIFS_NAND to BOOT_TARGET_DEVICES. This will
allow the kernel zImage to be loaded from '/boot/zImage' in UBIFS
(ubi0:rootfs).

Additionally update the *_MMC devices to also load kernel image from
the MMC 0:2 EXT4 file system.

DISTRO_DEFAULTS Setup

=====================

[primary] Check MMC 0:1 for /extlinux/extlinux.conf and boot
[fallback 1] Check MMC 0:2 /boot/zImage and run mmcbootz
[fallback 2] Check MMC 0:2 /boot/uImage and run mmcboot
[fallback 3] Check NAND UBIFS /boot/zImage and run nandbootubifs
[fallback 4] Check NAND partitions and run nandboot

The following "extlinux.conf" can be used to load images in the
top-level of the MMC 0:1 FAT partition.

[MMC(0:1)/extlinux/extlinux.conf]
---8<-------------------------------------------------------------------
default omap3-evm
label omap3-evm
kernel /zImage
fdt /omap3-evm.dtb
append console=ttyO0,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait
---8<-------------------------------------------------------------------

Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
6 years agoboard_r: remove superfluous #ifdef CONFIG_PRAM
Heinrich Schuchardt [Sat, 6 Jan 2018 23:54:20 +0000 (00:54 +0100)]
board_r: remove superfluous #ifdef CONFIG_PRAM

initr_mem() is already enclosed by
#if defined(CONFIG_PRAM)
#endif

So there is no need to check CONFIG_PRAM again inside the
function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoGPIO: tca642x: Rework to not include commands in SPL
Tom Rini [Wed, 3 Jan 2018 14:24:24 +0000 (09:24 -0500)]
GPIO: tca642x: Rework to not include commands in SPL

The command portion of the GPIO driver can only be used in full SPL so
re-work to guard the command related portions and mark it as static.

Cc: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoGPIO: pca953x: Rework to not include commands in SPL
Tom Rini [Wed, 3 Jan 2018 14:23:14 +0000 (09:23 -0500)]
GPIO: pca953x: Rework to not include commands in SPL

The command portion of the GPIO driver can only be used in full SPL so
re-work to guard the command related portions and mark it as static.

Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agocmd: pmic: update help description
Klaus Goger [Wed, 3 Jan 2018 08:10:34 +0000 (09:10 +0100)]
cmd: pmic: update help description

Change help description to match the style of the other U-Boot commands
and get rid of the leading whitespace.

Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
6 years agofs/fat: remove distractive message in file_fat_read_at()
Heinrich Schuchardt [Mon, 1 Jan 2018 20:31:58 +0000 (21:31 +0100)]
fs/fat: remove distractive message in file_fat_read_at()

The message "reading %s\n" may be interesting when
debugging but otherwise it is superfluous.

Only output the message when debugging.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agofs: remove distractive message in fs_read()
Heinrich Schuchardt [Mon, 1 Jan 2018 20:15:37 +0000 (21:15 +0100)]
fs: remove distractive message in fs_read()

The message
"** %s shorter than offset + len **\n"
may be interesting when debugging but it does not indicate an
error.

So we should not write it if we are not in debug mode.

Fixes: 7a3e70cfd88c fs/fs.c: read up to EOF when len would read past EOF
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoDA850evm: Remove dead code
Adam Ford [Sat, 30 Dec 2017 12:04:03 +0000 (06:04 -0600)]
DA850evm: Remove dead code

There is an #ifdef and #endif with nothing in between.  This patch simply
removes this dead/useless code.

Signed-off-by: Adam Ford <aford173@gmail.com>
6 years agoARM: dts: omap3-beagle{-xm}: Enable DM and devicetree for BeagleBoard
Derald D. Woods [Fri, 29 Dec 2017 16:37:32 +0000 (10:37 -0600)]
ARM: dts: omap3-beagle{-xm}: Enable DM and devicetree for BeagleBoard

This commit updates the configuration files needed to support OF_CONTROL
on the OMAP3 BeagleBoard(s).

6 years agoARM: dts: omap3-beagle{-xm}: Add support for BeagleBoard
Derald D. Woods [Fri, 29 Dec 2017 16:37:31 +0000 (10:37 -0600)]
ARM: dts: omap3-beagle{-xm}: Add support for BeagleBoard

This commit adds OMAP3 BeagleBoard devicetree files from
Linux v4.15-rc5. This includes standard OMAP34XX board revisions as
well as the 'xM' which is OMAP36XX.

Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
6 years agoenv: ti: Select dtb name for dra76x and am574
Lokesh Vutla [Fri, 29 Dec 2017 06:17:58 +0000 (11:47 +0530)]
env: ti: Select dtb name for dra76x and am574

Select dtb name for am574x-idk and dra76x evm with acd package.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
6 years agoARM: dts: am574x-idk: Add initial support
Lokesh Vutla [Fri, 29 Dec 2017 06:17:57 +0000 (11:47 +0530)]
ARM: dts: am574x-idk: Add initial support

Add initial dts support for am574x-idk

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
6 years agoboard: ti: am57xx: Enable CMD_DDR3
Lokesh Vutla [Fri, 29 Dec 2017 06:17:56 +0000 (11:47 +0530)]
board: ti: am57xx: Enable CMD_DDR3

Enable CMD_DDR3 on all am57xx based platforms.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
6 years agoboard: ti: am574x-idk: Update pinmux using latest PMT
Lokesh Vutla [Fri, 29 Dec 2017 06:17:55 +0000 (11:47 +0530)]
board: ti: am574x-idk: Update pinmux using latest PMT

Update the board pinmux for AM574x-IDK board using latest PMT[1] and the
board files named am574x_idk_v1p3b_sr2p0 that were auto generated on
13th October, 2017 by "Ahmad Rashed <a-rashed@ti.com>".

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
6 years agoboard: ti: am574x-idk: Add ddr data support
Lokesh Vutla [Fri, 29 Dec 2017 06:17:54 +0000 (11:47 +0530)]
board: ti: am574x-idk: Add ddr data support

AM574x-idk has the following DDR parts attached:
EMIF1: MT41K256M16HA (1GB with ECC)
EMIF2: MT41K256M16HA (1GB without ECC)

Enabling 2GB DDR without interleaving between EMIFs. And
enabling ECC on EMIF1.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Krunal Bhargav <k-bhargav@ti.com>
6 years agoboard: ti: am574x-idk: Add hw data support
Lokesh Vutla [Fri, 29 Dec 2017 06:17:53 +0000 (11:47 +0530)]
board: ti: am574x-idk: Add hw data support

Update prcm, voltages and pinmux support for am574x-idk.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
6 years agoboard: ti: am574x-idk: Add epprom support
Lokesh Vutla [Fri, 29 Dec 2017 06:17:52 +0000 (11:47 +0530)]
board: ti: am574x-idk: Add epprom support

am574x-idk is a board based on TI's am574 processor
Add eeprom support.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
6 years agoarm: dra762: Add support for device package identification
Lokesh Vutla [Fri, 29 Dec 2017 06:17:51 +0000 (11:47 +0530)]
arm: dra762: Add support for device package identification

DRA762 comes in two packages:
- ABZ: Pin compatible package with DRA742 with DDR@1333MHz
- ACD: High performance(OPP_PLUS) package with new IPs

Both the above packages uses the same IDCODE hence needs to
differentiate using package information in DIE_ID_2.
Add support for the same. Also update clock, ddr, emif information.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
6 years agocmd: ti: Generalize cmd_ddr3 command
Lokesh Vutla [Fri, 29 Dec 2017 06:17:50 +0000 (11:47 +0530)]
cmd: ti: Generalize cmd_ddr3 command

Keystone and DRA7 based TI platforms uses same
EMIF memory controller. cmd_ddr3 command is customized
for keystone platforms, make it generic so that it can
be re used for DRA7  platforms.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
6 years agoarm: keystone: Move cmd_ddr3 to a common place
Lokesh Vutla [Fri, 29 Dec 2017 06:17:49 +0000 (11:47 +0530)]
arm: keystone: Move cmd_ddr3 to a common place

Move cmd_ddr3 to cmd/ti in order to make
it build for non-keystone TI platforms.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
[trini: Rename to ddr3.c not cmd_ddr3.c]
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoarm: emif-common: Add suppport for enabling ECC
Lokesh Vutla [Fri, 29 Dec 2017 06:17:48 +0000 (11:47 +0530)]
arm: emif-common: Add suppport for enabling ECC

For data integrity, the EMIF1 supports ECC on the data
written or read from the SDRAM. Add support for enabling
ECC support in EMIF1.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Krunal Bhargav <k-bhargav@ti.com>
6 years agoarm: emif-common: Add ecc specific emif registers
Lokesh Vutla [Fri, 29 Dec 2017 06:17:47 +0000 (11:47 +0530)]
arm: emif-common: Add ecc specific emif registers

This is a slight difference in emif_ddr_phy_status register offsets for
DRA7xx EMIF and older versions. And ecc registers are available only
in DRA7xx EMIC. Add support for this difference and ecc registers.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>