]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
8 years agoARM: uniphier: reserve the last 64 byte of SDRAM
Masahiro Yamada [Thu, 21 Apr 2016 05:43:19 +0000 (14:43 +0900)]
ARM: uniphier: reserve the last 64 byte of SDRAM

The last 64 byte of each DDR channel of PH1-LD20 is periodically
used as a scratch area for the DDR PHY training.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: add PH1-LD20 SoC support
Masahiro Yamada [Thu, 21 Apr 2016 05:43:18 +0000 (14:43 +0900)]
ARM: uniphier: add PH1-LD20 SoC support

This is the first ARMv8 SoC from Socionext Inc.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: rework uniphier_set_fdt_file()
Masahiro Yamada [Thu, 21 Apr 2016 05:43:17 +0000 (14:43 +0900)]
ARM: uniphier: rework uniphier_set_fdt_file()

The current table look-up for the DTB file name turned out bothersome
in terms of maintainability; I ended up adding a new entry every time
a new board is supported.

There is a common pattern between the DT compatible string and the
corresponding file name; drop the vendor prefix "socionext," and
prefix it with "uniphier-" and suffix it with ".dtb".

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: carry on booting for Unknown boot mode
Masahiro Yamada [Thu, 21 Apr 2016 05:43:16 +0000 (14:43 +0900)]
ARM: uniphier: carry on booting for Unknown boot mode

No need to stop booting U-Boot even if boot mode is unknown.
Setting the "bootmode" environment is only useful for booting
Linux Kernel.  Anyway, U-Boot has already booted by this point.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: add sg_set_iectrl_range()
Masahiro Yamada [Thu, 21 Apr 2016 05:43:15 +0000 (14:43 +0900)]
ARM: uniphier: add sg_set_iectrl_range()

For PH1-LD20 or later, per-pin input-enable control is supported,
that is, we need to set-up IECTRL registers for a group of pins.
This helper function will be useful for a bunch of register settings.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: dts: uniphier: move aliases node up to satisfy fdtgrep
Masahiro Yamada [Thu, 21 Apr 2016 05:43:14 +0000 (14:43 +0900)]
ARM: dts: uniphier: move aliases node up to satisfy fdtgrep

Currently, fdtgrep would not accept uniphier-ph1-ld20-ref.dtb
and uniphier-ph1-ld11-ref.dtb unless the aliases node comes
the first in the root node.

$ make -s uniphier_pxs2_ld6b_defconfig
$ make CROSS_COMPILE=arm-linux-gnueabi- DEVICE_TREE=uniphier-ph1-ld20-ref
  [snip]
  LDS     spl/u-boot-spl.lds
  LD      spl/u-boot-spl
  OBJCOPY spl/u-boot-spl-nodtb.bin
  FDTGREP spl/u-boot-spl.dtb
Error at 'fdt_find_regions': FDT_ERR_BADLAYOUT
/aliases node must come before all other nodes
Error: FDT_ERR_BADMAGIC
make[1]: *** [spl/u-boot-spl.dtb] Error 1
make: *** [spl/u-boot-spl] Error 2

This commit moves the aliases node as the error message from the
fdtgrep tool suggests, although this requirement does not sound
reasonable to me.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: dts: uniphier: use Ref Daughter board on PH1-LD20 Ref board
Masahiro Yamada [Thu, 21 Apr 2016 05:43:13 +0000 (14:43 +0900)]
ARM: dts: uniphier: use Ref Daughter board on PH1-LD20 Ref board

This makes the EEPROM device on the Reference Daughter board
available.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: avoid unaligned access to DT on 64bit SoC
Masahiro Yamada [Thu, 21 Apr 2016 05:43:12 +0000 (14:43 +0900)]
ARM: uniphier: avoid unaligned access to DT on 64bit SoC

Because DT properties are 4-byte aligned, the pointer access
*(fdt64_t *) in this code causes unaligned access.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agopinctrl: uniphier: fix NAND and SD pin-mux settings for PH1-LD11/LD20
Masahiro Yamada [Thu, 21 Apr 2016 05:43:11 +0000 (14:43 +0900)]
pinctrl: uniphier: fix NAND and SD pin-mux settings for PH1-LD11/LD20

I found many mistakes in the initial version.

Fixes: 8a3328c209d0 ("pinctrl: uniphier: support UniPhier PH1-LD20 pinctrl driver")
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agopinctrl: uniphier: rename function/array names
Masahiro Yamada [Thu, 21 Apr 2016 05:43:10 +0000 (14:43 +0900)]
pinctrl: uniphier: rename function/array names

Make function/array names match the file names for consistency.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-x86
Tom Rini [Fri, 22 Apr 2016 11:25:18 +0000 (07:25 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-x86

8 years agox86: Correct typo of Miao Yan's email address
Bin Meng [Wed, 13 Apr 2016 08:00:51 +0000 (01:00 -0700)]
x86: Correct typo of Miao Yan's email address

Miao Yan's email address is wrong in fw_cfg.c. Fix it.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: qemu: Drop our own ACPI implementation
Bin Meng [Wed, 13 Apr 2016 07:52:49 +0000 (00:52 -0700)]
x86: qemu: Drop our own ACPI implementation

Our own ACPI implementation (when CONFIG_QEMU_ACPI_TABLE is not set)
does not build anymore after x86 has been fully converted to DM PCI.
Instead of trying to fix the build errors, given we now have the ACPI
support via QEMU's fw_cfg interface, which is a more reliable way to
generate correct ACPI tables than by ourselves, hence drop our own
ACPI implementation.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoarc/cache: really do flush_dcache_all() even if IOC exists
Alexey Brodkin [Sat, 16 Apr 2016 12:28:30 +0000 (15:28 +0300)]
arc/cache: really do flush_dcache_all() even if IOC exists

flush_dcache_all() is used in the very end of U-Boot self relocation
to write back all copied and then patched code and data to their
new location in the very end of available memory space.

Since that has nothing to do with IO (i.e. no external DMA happens
here) IOC won't help here and we need to write back data cache contents
manually.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
8 years agoPrepare v2016.05-rc2
Tom Rini [Thu, 21 Apr 2016 13:37:33 +0000 (09:37 -0400)]
Prepare v2016.05-rc2

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoconfigs: Update some Xilinx configs
Tom Rini [Wed, 20 Apr 2016 19:33:05 +0000 (15:33 -0400)]
configs: Update some Xilinx configs

As part of 3457bba these configs didn't get updated.  Update them now.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agocmd/usb_mass_storage.c: Rework ums_init() ret logic slightly
Tom Rini [Wed, 20 Apr 2016 14:59:32 +0000 (10:59 -0400)]
cmd/usb_mass_storage.c: Rework ums_init() ret logic slightly

Previously, ret could be used uninitialized if
blk_get_device_part_str() failed.  Default to ret being set to -1 so
that we always return an err up if we have a problem and then invert the
logic on testing ums_count as when that is non-zero is the time we can
return 0.

Cc: John Tobias <john.tobias.ph@gmail.com>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Tom Rini [Wed, 20 Apr 2016 13:31:58 +0000 (09:31 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

Conflicts:
configs/bcm28155_ap_defconfig
configs/dra72_evm_defconfig
configs/dra74_evm_defconfig
configs/ma5d4evk_defconfig

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-socfpga
Tom Rini [Wed, 20 Apr 2016 13:23:42 +0000 (09:23 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-socfpga

8 years agousb: gadget Move: CONFIG_G_DNL_* to Kconfig
Sam Protsenko [Wed, 13 Apr 2016 11:20:30 +0000 (14:20 +0300)]
usb: gadget Move: CONFIG_G_DNL_* to Kconfig

And also reformat defconfigs using "make savedefconfig" rule.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
8 years agousb: dwc3: Move CONFIG_USB_DWC3_PHY_* to Kconfig
Sam Protsenko [Wed, 13 Apr 2016 11:20:29 +0000 (14:20 +0300)]
usb: dwc3: Move CONFIG_USB_DWC3_PHY_* to Kconfig

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
8 years agousb: dwc3: Move CONFIG_USB_DWC3_OMAP to Kconfig
Sam Protsenko [Wed, 13 Apr 2016 11:20:28 +0000 (14:20 +0300)]
usb: dwc3: Move CONFIG_USB_DWC3_OMAP to Kconfig

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
8 years agousb: dwc3: Move CONFIG_USB_DWC3_GADGET/HOST to Kconfig
Sam Protsenko [Wed, 13 Apr 2016 11:20:27 +0000 (14:20 +0300)]
usb: dwc3: Move CONFIG_USB_DWC3_GADGET/HOST to Kconfig

Description was borrowed from kernel dwc3 Kconfig.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
8 years agousb: gadget: Move CONFIG_USB_GADGET_DOWNLOAD to Kconfig
Sam Protsenko [Wed, 13 Apr 2016 11:20:26 +0000 (14:20 +0300)]
usb: gadget: Move CONFIG_USB_GADGET_DOWNLOAD to Kconfig

While at it, remove obsolete CONFIG_USBDOWNLOAD_GADGET option from some
config headers. This is also probably fixes am335x_baltos board.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
8 years agousb: gadget: Move CONFIG_USB_GADGET_DUALSPEED to Kconfig
Sam Protsenko [Wed, 13 Apr 2016 11:20:25 +0000 (14:20 +0300)]
usb: gadget: Move CONFIG_USB_GADGET_DUALSPEED to Kconfig

Move CONFIG_USB_GADGET_DUALSPEED option to Kconfig and
make all UDC controllers select USB_GADGET_DUALSPEED:
  - add next options to Kconfig selecting USB_GADGET_DUALSPEED:
    - USB_GADGET_ATMEL_USBA
    - USB_GADGET_DWC2_OTG
    - USB_DWC3
    - CI_UDC
  - make USB_MUSB_GADGET select USB_GADGET_DUALSPEED

While at it, make some related fixes:
  - remove DUALSPEED from configs that don't enable gadget support:
    - kwb.h
    - tseries.h
  - add missing USB_GADGET option to next configs:
    - novena_defconfig
    - pcm051_rev*_defconfig
    - xfi3_defconfig

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
8 years agousb: gadget: Move CONFIG_USB_GADGET_VBUS_DRAW to Kconfig
Sam Protsenko [Wed, 13 Apr 2016 11:20:24 +0000 (14:20 +0300)]
usb: gadget: Move CONFIG_USB_GADGET_VBUS_DRAW to Kconfig

The description was borrowed from kernel. Definitions were added to
defconfig files in a way that "make savedefconfig" generates exactly
the same file as used defconfig.

Boards using 0 mA as CONFIG_USB_GADGET_VBUS_DRAW value were moved to use
2 mA (as minimal allowed by Kconfig).

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
8 years agousb: ums - expose selected partition/s
John Tobias [Wed, 13 Apr 2016 19:06:51 +0000 (12:06 -0700)]
usb: ums - expose selected partition/s

By applying this patch, it will give us some flexibility to expose
a selected partition/s.

e.g:
1. To expose several partitions
ums 0 mmc 0:1,0:6

2. To expose the all partitions
ums 0 mmc 0:0

3. To expose multiple partititions on several devices
ums 0 mmc 0:1,1:6

4. It support legacy format
ums 0 mmc 0

Signed-off-by: John Tobias <john.tobias.ph@gmail.com>
8 years agoUSB: g_dnl: Change device class
John Tobias [Thu, 7 Apr 2016 23:49:03 +0000 (16:49 -0700)]
USB: g_dnl: Change device class

The USB Mass Storage (ums) works in Windows, Linux and OS X (EL Capitan).
But, not in OS X (Yosemite). By applying the said patch, it extends
the ums support.

Signed-off-by: John Tobias <john.tobias.ph@gmail.com>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>
Test HW: Odroid XU3 (./test/py UMS + DFU tests)

Tested-by: John Tobias <john.tobias.ph@gmail.com>
Linux:
    - Run ums to expose all my eMMC partition - shows all correctly
    - Run ums to expose only 1 partition of my eMMC - show correctly

Windows:
    - Run ums to expose all my eMMC partition - it detects but it prompts,
    if I want to format it (due to a non windows partition)
    - Run ums to expose only the FAT32 partition - it show the partition
      correctly.

8 years agoarm: socfpga: socrates: Add eth0 alias to enable ethernet
Stefan Roese [Mon, 18 Apr 2016 12:22:05 +0000 (14:22 +0200)]
arm: socfpga: socrates: Add eth0 alias to enable ethernet

This enables full ethernet usage, including U-Boot to write the board
specific MAC address (ethaddr) into the DT blob before passing it to
Linux.

Without this, the ethaddr is not detected in U-Boot at all, resulting
in this error upon bootup:

...
Model: EBV SOCrates
Net:
Error: ethernet@ff702000 address not set.
No ethernet found.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Chin Liang See <clsee@altera.com>
8 years agoarm: socfpga: Fix typos in DT files (environmnet -> environment)
Stefan Roese [Mon, 18 Apr 2016 12:22:04 +0000 (14:22 +0200)]
arm: socfpga: Fix typos in DT files (environmnet -> environment)

Fix a small typo in some of the SoCFPGA dts files that has spread via
copy-and-paste.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Chin Liang See <clsee@altera.com>
8 years agoddr: altera: Repair DQ window centering code
Marek Vasut [Tue, 5 Apr 2016 21:17:35 +0000 (23:17 +0200)]
ddr: altera: Repair DQ window centering code

The code uses a lot of signed numbers, which ended up in variables
of unsigned type, which resulted in all sorts of underflows. This
in turn caused incorrect calibration on certain boards. Moreover,
repair the readout of the DQ delay, which was being pulled from
wrong register.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Chin Liang See <clsee@altera.com>
8 years agoddr: altera: Staticize global variables
Marek Vasut [Tue, 5 Apr 2016 09:18:38 +0000 (11:18 +0200)]
ddr: altera: Staticize global variables

Just staticize global variables in sequencer, since there is no
point in having these symbols available outside of the DDR code.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Chin Liang See <clsee@altera.com>
8 years agoddr: altera: Make DLEVEL behavior inclusive
Marek Vasut [Mon, 4 Apr 2016 19:21:05 +0000 (21:21 +0200)]
ddr: altera: Make DLEVEL behavior inclusive

Originally, the DLEVEL selects the debug level within the sequencer code,
but only displays the messages on that particular debug level. Tweak the
handling such that for particular debug level, debug messages on that
level and lower are displayed. This allows better regulation of debug
message verbosity.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Chin Liang See <clsee@altera.com>
8 years agoddr: altera: Zero DM IN delay in scc_mgr_zero_group()
Marek Vasut [Mon, 4 Apr 2016 19:16:18 +0000 (21:16 +0200)]
ddr: altera: Zero DM IN delay in scc_mgr_zero_group()

This one last set of delay configuration registers was not properly
zeroed out originally, fix it and zero them out.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Chin Liang See <clsee@altera.com>
8 years agoddr: altera: Remove unnecessary ODT mode config
Marek Vasut [Mon, 4 Apr 2016 17:10:12 +0000 (19:10 +0200)]
ddr: altera: Remove unnecessary ODT mode config

There is no point in resetting the ODT setting if the write test
failed, since the code will always retry the calibration and thus
reconfigure the ODT anyway OR the code will fail calibration and
halt.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Chin Liang See <clsee@altera.com>
8 years agoddr: altera: Remove unnecessary update of the SCC
Marek Vasut [Mon, 4 Apr 2016 16:41:53 +0000 (18:41 +0200)]
ddr: altera: Remove unnecessary update of the SCC

Every invocation of the scc_mgr_set_dqs_en_delay_all_ranks() is
followed by SCC manager update. Moreover, only this function
triggers the SCC manager update internally. Thus, remove the
internal invocation to avoid triggering the update twice.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Chin Liang See <clsee@altera.com>
8 years agoddr: altera: Fix DRAM end value in protection rule
Marek Vasut [Mon, 4 Apr 2016 15:52:21 +0000 (17:52 +0200)]
ddr: altera: Fix DRAM end value in protection rule

The hi address bitfield in the protection rule must be set to
the last address in the region which the rule represents. The
behavior is now in-line with code generated by Quartus 15.1 .

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Chin Liang See <clsee@altera.com>
8 years agoddr: altera: Fix scc_mgr_set() argument order
Marek Vasut [Mon, 4 Apr 2016 15:28:16 +0000 (17:28 +0200)]
ddr: altera: Fix scc_mgr_set() argument order

The code should be setting registers to zero, not one register to value.
Swap the order of arguments to correct the behavior. The behavior is now
in-line with code generated by Quartus 15.1 .

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Chin Liang See <clsee@altera.com>
8 years agoddr: altera: Tweak DQS tracking enable handling
Marek Vasut [Tue, 5 Apr 2016 21:41:56 +0000 (23:41 +0200)]
ddr: altera: Tweak DQS tracking enable handling

In the most unlikely case the DQS tracking was to be disabled,
make sure we do not errornously re-enable it. Note that DQS
tracking is enabled on all systems observed thus far.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Chin Liang See <clsee@altera.com>
8 years agoddr: altera: Replace ad-hoc constant with macro
Marek Vasut [Mon, 4 Apr 2016 14:07:11 +0000 (16:07 +0200)]
ddr: altera: Replace ad-hoc constant with macro

The bit 22 is in fact DQS tracking enable bit (dqstrken) and there
is a macro for this bit already, so use it.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Chin Liang See <clsee@altera.com>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-mips
Tom Rini [Tue, 19 Apr 2016 12:07:41 +0000 (08:07 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-mips

8 years agoMIPS: bootm: Add fixup of '/memory' node.
Purna Chandra Mandal [Mon, 18 Apr 2016 13:01:38 +0000 (18:31 +0530)]
MIPS: bootm: Add fixup of '/memory' node.

MIPS arch do not update 'reg' property of /memory node.
As a result Linux bootup will not work unless board.dts
file contains right /memory offset-size information or
board implements required memory fixup.
Fixing by renaming (unused) _arch_fixup_memory_node_ to
_arch_fixup_fdt_ in arch/mips/lib/bootm.c inline with ARM arch.

Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
8 years agoKconfig: Simple aesthetic/grammar fixes to top-level Kconfig
Robert P. J. Day [Sat, 16 Apr 2016 09:53:07 +0000 (05:53 -0400)]
Kconfig: Simple aesthetic/grammar fixes to top-level Kconfig

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
8 years agoARM: always perform per-CPU GIC init
Stephen Warren [Fri, 15 Apr 2016 20:40:37 +0000 (14:40 -0600)]
ARM: always perform per-CPU GIC init

The current code in ARMv8's lowlevel_init() skips the per-CPU GIC
initialization ifndef CONFIG_ARMV8_MULTIENTRY. However, the per-CPU init
should always occur; it's just the one-time init that should only happen
on the master.

Once this consideration is taken into account, the only difference between
the paths when CONFIG_ARMV8_MULTIENTRY is undefined/defined is the use of
branch_if_slave. Naively, any unified code would need to invoke this
conditionally upon ifdef CONFIG_ARMV8_MULTIENTRY. However, branch_if_slave
already checks CONFIG_ARMV8_MULTIENTRY and does nothing if it isn't
defined, so we don't even need that ifdef at the call site.

Reported-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agobx50v3: Enable CONFIG_OF_LIBFDT in defconfig
Akshay Bhat [Thu, 14 Apr 2016 17:55:08 +0000 (13:55 -0400)]
bx50v3: Enable CONFIG_OF_LIBFDT in defconfig

As of commit 69e173eb57d1f4848f070c83456096ba5d2ba1b4, CONFIG_OF_LIBFDT
needs to be selected in defconfig instead of board specific header file.
Hence enable CONFIG_OF_LIBFDT in defconfig.

Signed-off-by: Akshay Bhat <akshay.bhat@timesys.com>
8 years agoefi_loader: Fall back to fdtfile naming convention
Alexander Graf [Thu, 14 Apr 2016 14:07:54 +0000 (16:07 +0200)]
efi_loader: Fall back to fdtfile naming convention

When there is no $fdtfile variable set, we still have a good chance
that on 32bit arm the fdtfile really is just called $soc-$board.dtb.

Enable the exports for $soc and $board in our distr defaults and make
use of them in the efi boot script.

Reported-by: Andreas Faerber <afaerber@suse.de>
Reported-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Andreas Färber <afaerber@suse.de>
8 years agoefi_loader: Pass fdt address directly to bootefi cmd
Alexander Graf [Thu, 14 Apr 2016 14:07:53 +0000 (16:07 +0200)]
efi_loader: Pass fdt address directly to bootefi cmd

The bootefi cmd today fetches its device tree pointer from either the
location appointed by "fdt addr" with a fallback to the U-Boot control
fdt.

This integration is unusual for U-Boot and diverges from the way we
usually handle parameters to boot commands. So let's pass the fdt
directly into the bootefi command instead and move the control fdt
logic into the distro boot script.

Signed-off-by: Alexander Graf <agraf@suse.de>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Reviewed-by: Andreas Färber <afaerber@suse.de>
8 years agosandbox: Set CONFIG_SYS_CPU
Tom Rini [Mon, 18 Apr 2016 17:57:42 +0000 (13:57 -0400)]
sandbox: Set CONFIG_SYS_CPU

Give a valid value here as well to allow things which want
CONFIG_ENV_VARS_UBOOT_CONFIG to build

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoboard: Remove overlooked vestiges of "dave" board.
Robert P. J. Day [Thu, 14 Apr 2016 10:15:07 +0000 (06:15 -0400)]
board: Remove overlooked vestiges of "dave" board.

Apparently, all "dave"-related vendor content was removed in commit
5344cc1a82fcc2817d4671696b3939b0dfa4323e; remove remaining directory
board/dave/, which consists solely of board/dave/common/flash.c.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
8 years agoahci: flush dcache before issuing command
Tang Yuantian [Thu, 14 Apr 2016 08:21:00 +0000 (16:21 +0800)]
ahci: flush dcache before issuing command

Ensure data the following sata command used is flushed out of dcache
and written to physical memory or timeout error may happen.

Signed-off-by: Tang Yuantian <yuantian.tang@nxp.com>
8 years agoserial: bcm283x_mu: make pending values more explicit
Stephen Warren [Thu, 14 Apr 2016 04:29:52 +0000 (22:29 -0600)]
serial: bcm283x_mu: make pending values more explicit

dm_serial_ops.pending should return the number of characters, not just a
valid C Boolean integer value. The existing code does already does this,
but only as an accident since BCM283X_MU_LSR_RX_READY happens to be
BIT(0). Enhance the code to be more explicit about the values it returns.

Suggested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
8 years agodoc: Updated README.ext4
Robert P. J. Day [Wed, 13 Apr 2016 22:30:16 +0000 (18:30 -0400)]
doc: Updated README.ext4

Clean up the ext4 README file.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
8 years agoRemove references to CONFIG_CMD_EXT3, no such command
Robert P. J. Day [Wed, 13 Apr 2016 15:40:01 +0000 (11:40 -0400)]
Remove references to CONFIG_CMD_EXT3, no such command

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
8 years agodragonboard410c: Fix environment variables
Andreas Färber [Wed, 13 Apr 2016 12:16:22 +0000 (14:16 +0200)]
dragonboard410c: Fix environment variables

Some variables for the distro boot commands were missing, using some
custom name instead. Rename them.

Cc: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
8 years agoefi_loader: Handle memory overflows
Andreas Färber [Wed, 13 Apr 2016 12:04:38 +0000 (14:04 +0200)]
efi_loader: Handle memory overflows

jetson-tk1 has 2 GB of RAM at 0x80000000, causing gd->ram_top to be zero.
Handle this by either avoiding ram_top or by using the same type as
ram_top to reverse the overflow effect.

Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Alexander Graf <agraf@suse.de>
8 years agoARM: AM43xx: Fix BOOT_DEVICE_USB ID
Lokesh Vutla [Wed, 13 Apr 2016 04:27:04 +0000 (09:57 +0530)]
ARM: AM43xx: Fix BOOT_DEVICE_USB ID

commit 62c5674ea136a ("omap: SPL boot devices cleanup and completion")
cleans up the boot device ids for amx3xx soc. But mistakenly updates wrong
device IDs for AM43xx USB. Fixing the same here.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoconfigs: ks2: move CMD_NAND to defconfigs
Lokesh Vutla [Wed, 13 Apr 2016 04:21:00 +0000 (09:51 +0530)]
configs: ks2: move CMD_NAND to defconfigs

NAND is not yet enabled on all Keystone2 platforms. So enabled
CMD_NAND in the respective defconfigs only if available.

Reported-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agomemory: Move TI_AEMIF config to KCONFIG
Lokesh Vutla [Wed, 13 Apr 2016 04:20:59 +0000 (09:50 +0530)]
memory: Move TI_AEMIF config to KCONFIG

Not all Keystone2 devices has AEMIF NAND controller. So adding Kconfig
entry for CONFIG_TI_AEMIF and enabling it in respective defconfigs on
platforms with AEMIF controller.

Reported-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agodrivers/power/pmic/pm8916.c: Make usid be uint32_t
Tom Rini [Tue, 12 Apr 2016 19:11:24 +0000 (15:11 -0400)]
drivers/power/pmic/pm8916.c: Make usid be uint32_t

If get_dev_addr fails it will return FDT_ADDR_T_NONE and:
>>>     "priv->usid == 4294967295U" is always false regardless of the values of its operands. This occurs as the logical operand of if.

Cc: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Reported-by: Coverity (CID: 143914)
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agodrivers/gpio/pm8916_gpio.c: Make pid be uint32_t
Tom Rini [Tue, 12 Apr 2016 19:11:23 +0000 (15:11 -0400)]
drivers/gpio/pm8916_gpio.c: Make pid be uint32_t

If get_dev_addr fails it will return FDT_ADDR_T_NONE and:
>>>     "priv->pid == 4294967295U" is always false regardless of the values of its operands. This occurs as the logical operand of if.

Cc: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Reported-by: Coverity (CID: 143913)
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agom68k: fix broken buildman m68k
angelo@sysam.it [Mon, 11 Apr 2016 22:30:59 +0000 (00:30 +0200)]
m68k: fix broken buildman m68k

fix 19/48 broken board compilations, due to a now too smal 16-bit
relative jump

Signed-off-by: Angelo Dureghello <angelo@sysam.it>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>
8 years agogunzip.c: use block layer for writes
Eric Nelson [Mon, 11 Apr 2016 22:21:37 +0000 (15:21 -0700)]
gunzip.c: use block layer for writes

Call blk_dwrite to ensure that the block cache is notified
if enabled and remove build breakage when CONFIG_BLK is enabled.

Signed-off-by: Eric Nelson <eric@nelint.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
8 years agoefi_loader: Expose ascending efi memory map
Alexander Graf [Mon, 11 Apr 2016 21:51:02 +0000 (23:51 +0200)]
efi_loader: Expose ascending efi memory map

The EFI memory map does not need to be in a strict order, but 32bit
grub2 does expect it to be ascending. If it's not, it may try to
allocate memory inside the U-Boot data memory region.

We already sort the memory map in descending order, so let's just
reverse it when we pass it to a payload.

Signed-off-by: Alexander Graf <agraf@suse.de>
Tested-by: Andreas Färber <afaerber@suse.de>
8 years agoefi_loader: Put fdt into convenient location
Alexander Graf [Mon, 11 Apr 2016 21:51:01 +0000 (23:51 +0200)]
efi_loader: Put fdt into convenient location

The uEFI spec doesn't dictate where the device tree should live at, but
legacy 32bit ARM grub2 has some assumptions that it may stay at its place
when it's already loaded by the firmware.

So let's put it somewhere where Linux that comes after would happily find
it - around the recommended 128MB line.

Signed-off-by: Alexander Graf <agraf@suse.de>
Tested-by: Andreas Färber <afaerber@suse.de>
8 years agoefi_loader: Always flush in cache line size granularity
Alexander Graf [Mon, 11 Apr 2016 21:20:39 +0000 (23:20 +0200)]
efi_loader: Always flush in cache line size granularity

The cache line flush helpers only work properly when they get aligned
start and end addresses. Round our flush range to cache line size. It's
safe because we're guaranteed to flush within a single page which has the
same cache attributes.

Reported-by: Marek Vasut <marex@denx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Tested-by: Andreas Färber <afaerber@suse.de>
8 years agodragonboard410c: Add CONFIG_SYS_CACHELINE_SIZE
Mateusz Kulikowski [Mon, 11 Apr 2016 20:45:46 +0000 (22:45 +0200)]
dragonboard410c: Add CONFIG_SYS_CACHELINE_SIZE

Add missing define to board header file.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Acked-by: Marek Vasut <marex@denx.de>
Reviewed-by: Andreas Färber <afaerber@suse.de>
8 years agoefi_loader: Use system fdt as fallback
Alexander Graf [Mon, 11 Apr 2016 14:55:26 +0000 (16:55 +0200)]
efi_loader: Use system fdt as fallback

When the user did not pass any device tree or the boot script
didn't find any, let's use the system device tree as last resort
to get something the payload (Linux) may understand.

This means that on systems that use the same device tree for U-Boot
and Linux we can just share it and there's no need to manually provide
a device tree in the target image.

While at it, also copy and pad the device tree by 64kb to give us
space for modifications.

Signed-off-by: Alexander Graf <agraf@suse.de>
Tested-by: Andreas Färber <afaerber@suse.de>
8 years agodistro: Enable iso partition code
Alexander Graf [Mon, 11 Apr 2016 14:16:21 +0000 (16:16 +0200)]
distro: Enable iso partition code

Now that we can properly boot EFI payloads from iso el torito
images, let's enable support for isos by default in the distro
header.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoefi_loader: Increase path string to 32 characters
Alexander Graf [Mon, 11 Apr 2016 14:16:20 +0000 (16:16 +0200)]
efi_loader: Increase path string to 32 characters

Whenever we want to tell our payload about a path, we limit ourselves
to a reasonable amount of characters. So far we only passed in device
names - exceeding 16 chars was unlikely there.

However by now we also pass real file path information, so let's increase
the limit to 32 characters. That way common paths like "boot/efi/bootaa64.efi"
fit just fine.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoefi_loader: Pass file path to payload
Alexander Graf [Mon, 11 Apr 2016 14:16:19 +0000 (16:16 +0200)]
efi_loader: Pass file path to payload

The payload gets information on where it got loaded from. This includes
the device as well as file path.

So far we've treated both as the same thing and always gave it the device
name. However, in some situations grub2 actually wants to find its loading
path to find its configuration file.

So let's split the two semantically separte bits into separate structs and
pass the loaded file name into our payload when we load it using "load".

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoefi_loader: Add el torito support
Alexander Graf [Mon, 11 Apr 2016 14:16:18 +0000 (16:16 +0200)]
efi_loader: Add el torito support

When loading an el torito image, uEFI exposes said image as a raw
block device to the payload.

Let's do the same by creating new block devices with added offsets for
the respective el torito partitions.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoefi_loader: Split drive add into function
Alexander Graf [Mon, 11 Apr 2016 14:16:17 +0000 (16:16 +0200)]
efi_loader: Split drive add into function

The snippet of code to add a drive to our drive list needs to
get called from 2 places in the future. Split it into a separate
function.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoiso: Allow 512 byte sector size
Alexander Graf [Mon, 11 Apr 2016 14:16:16 +0000 (16:16 +0200)]
iso: Allow 512 byte sector size

Real CD-ROMs are pretty obsolete these days. Usually people still keep
iso files around, but just put them on USB sticks or SD cards and expect
them to "just work".

To support this use case with El Torito images, add support for 512 byte
sector size to the iso parsing code.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoiso: Start with partition 1
Alexander Graf [Mon, 11 Apr 2016 14:16:15 +0000 (16:16 +0200)]
iso: Start with partition 1

The generic partition code treats partition 0 as "whole disk". So
we should start with partition 1 as the first partition in the iso
partition table.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoiso: Make little endian and 64bit safe
Alexander Graf [Mon, 11 Apr 2016 14:16:14 +0000 (16:16 +0200)]
iso: Make little endian and 64bit safe

The iso partition table implementation has a few endian and 64bit
problems. Clean it up a bit to become endian and bitness safe.

Signed-off-by: Alexander Graf <agraf@suse.de>
8 years agoboard: ti: am57xx: Add support for am572x idk in SPL
Steve Kipisz [Fri, 8 Apr 2016 22:01:29 +0000 (17:01 -0500)]
board: ti: am57xx: Add support for am572x idk in SPL

The AM572x-IDK board (Industrial Dev Kit) is a board based on TI's AM5728x
SOC which has a dual core 1.5GHz A15 processor. This board is a development
platform for the Industrial market with:
- 2GB of DDR3L
- Dual 1Gbps Ethernet
- HDMI,
- PRU-ICSS
- uSD
- 16GB eMMC
- CAN
- RS-485
- PCIe
- USB3.0
- Video Input Port
- Industrial IO port and expansion connector

The link to the data sheet and TRM can be found here:

http://www.ti.com/product/AM5728

NOTE: DT support is still pending upstream kernel acceptance but we
should be able to get the base system support with this patch.

Signed-off-by: Schuyler Patton <spatton@ti.com>
Signed-off-by: Steve Kipisz <s-kipisz2@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoboard: ti: am57xx: Update EMIF SDRAM 1 and 3 Timings
Schuyler Patton [Fri, 8 Apr 2016 21:53:44 +0000 (16:53 -0500)]
board: ti: am57xx: Update EMIF SDRAM 1 and 3 Timings

Update EMIF data based on recommendations from the now standard TI
EMIF tool version 1.1.1 based on 256MBx16 DDR3L Kingston D2516EC4BXGGB
data sheet

Update T_RRD from 5 to 6 based on AM57xx TRM -
Minimum number of DDR cycles from activate to ativate for a different
bank, minus 1.

Update T_CKESR from 4 to 3 based on AM57xx TRM - Minimum number of DDR
clocks cycles for which SDRAM must remain in self refresh, minus 1.

Signed-off-by: Schuyler Patton <spatton@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoam57x: Move CONS_INDEX to Kconfig
Daniel Allred [Thu, 7 Apr 2016 02:59:34 +0000 (21:59 -0500)]
am57x: Move CONS_INDEX to Kconfig

- Move the CONS_INDEX selection out of CONFIG_SYS_EXTRA_OPTIONS and
      into Kconfig proper.
    - Edit the relevant am57x configs to remove the now unneeded
      CONFIG_SYS_EXTRA_OPTIONS.

Signed-off-by: Daniel Allred <d-allred@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agocmd: fdt: Use separate CMD_FDT Kconfig entry instead of OF_LIBFDT
Michal Simek [Wed, 6 Apr 2016 18:28:04 +0000 (20:28 +0200)]
cmd: fdt: Use separate CMD_FDT Kconfig entry instead of OF_LIBFDT

Create CMD_FDT Kconfig entry to have an option to disable fdt command
which is not required for small configuration which requires libfdt
only.
Enable it by default for all targets which enables OF_LIBFDT.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
[trini: Fixup flea3/sandbox/id8313/siemens-am33xx/smartweb]
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agokconfig: Move CONFIG_OF_LIBFDT to Kconfig
Michal Simek [Wed, 6 Apr 2016 18:28:03 +0000 (20:28 +0200)]
kconfig: Move CONFIG_OF_LIBFDT to Kconfig

This patch follows work done by:
"Move CONFIG_OF_LIBFDT to Kconfig"
(sha1: 69e173eb57d1f4848f070c83456096ba5d2ba1b4)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
[trini: Add xpress* to the patch]
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agobcm281xx: save ENV to MMC
Steve Rae [Mon, 4 Apr 2016 19:59:45 +0000 (12:59 -0700)]
bcm281xx: save ENV to MMC

Enable saving ENV to MMC for the bcm281xx boards.

Signed-off-by: Steve Rae <srae@broadcom.com>
8 years agobcm281xx: enable CONFIG_OF_LIBFDT
Steve Rae [Mon, 4 Apr 2016 19:59:44 +0000 (12:59 -0700)]
bcm281xx: enable CONFIG_OF_LIBFDT

set the Kconfig parameter: CONFIG_OF_LIBFDT

Signed-off-by: Steve Rae <srae@broadcom.com>
8 years agoconfigs: dra74_evm: enable mmc driver model
Mugunthan V N [Mon, 4 Apr 2016 11:58:05 +0000 (17:28 +0530)]
configs: dra74_evm: enable mmc driver model

enable mmc driver model for dra74 evm as omap_hsmmc
supports driver model

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoconfigs: dra72_evm: enable mmc driver model
Mugunthan V N [Mon, 4 Apr 2016 11:58:04 +0000 (17:28 +0530)]
configs: dra72_evm: enable mmc driver model

enable mmc driver model for dra72 evm as omap_hsmmc
supports driver model

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: dts: dra7xx: am57xx: fix cd-gpios definition as per hardware design and dt bindi...
Mugunthan V N [Mon, 4 Apr 2016 11:58:03 +0000 (17:28 +0530)]
ARM: dts: dra7xx: am57xx: fix cd-gpios definition as per hardware design and dt binding docs

As per mmc device tree binding documentation card detect gpio has
to be active low signal. When a hardware is designed with active
high card detect, gpio polarity has to be changed with
cd-inverted dt property.

In DRA72x and AM57xx EVMs the card detect gpio is designed as
active low gpio. So correcting the dt card detect gpio
definition.

Also adding card-detect gpio for DRA74x EVM.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: dts: am43xx: fix cd-gpios definition as per hardware design and dt binding docs
Mugunthan V N [Mon, 4 Apr 2016 11:58:02 +0000 (17:28 +0530)]
ARM: dts: am43xx: fix cd-gpios definition as per hardware design and dt binding docs

As per mmc device tree binding documentation card detect gpio has
to be active low signal. When a hardware is designed with active
high card detect, gpio polarity has to be changed with
cd-inverted dt property.

In AM43xx the card detect gpio is designed as active low gpio.
So correcting the dt card detect gpio definition.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agodrivers: mmc: omap_hsmmc: request cd and wp gpios when DM_MMC is defined
Mugunthan V N [Mon, 4 Apr 2016 11:58:01 +0000 (17:28 +0530)]
drivers: mmc: omap_hsmmc: request cd and wp gpios when DM_MMC is defined

Add request gpio for CD and WP gpios, so that the gpio can be
used for the respective purposes.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agodrivers: mmc: omap_hsmmc: Fix conversion of address to a pointer
Mugunthan V N [Mon, 4 Apr 2016 09:52:49 +0000 (15:22 +0530)]
drivers: mmc: omap_hsmmc: Fix conversion of address to a pointer

omap_hsmmc driver directly typecasts fdt_addr_t to a pointer.
This is not strictly correct, as it gives a build warning when
fdt_addr_t is u64. So, use map_physmem for a proper typecasts.

This is inspired by commit 167efe01bc5a9 ("dm: ns16550: Use an address
instead of a pointer for the uart base")

drivers/mmc/omap_hsmmc.c: In function ‘omap_hsmmc_ofdata_to_platdata’:
drivers/mmc/omap_hsmmc.c:776:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  priv->base_addr = (struct hsmmc *)dev_get_addr(dev);
                      ^

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agocommon: env: support sata device
Peng Fan [Sun, 3 Apr 2016 13:52:13 +0000 (21:52 +0800)]
common: env: support sata device

Introduce env support for sata device.
1. Implement write_env/read_env/env_relocate_spec/saveenv/sata_get_env_dev
2. If want to enable this feature, define CONFIG_ENV_IS_IN_SATA, and
   define CONFIG_SYS_SATA_ENV_DEV or implement your own sata_get_ev_dev.

Signed-off-by: Peng Fan <van.freenix@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Stuart Longland <stuartl@vrt.com.au>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoARM: rpi: fix 64-bit CONFIG_SYS_TEXT_BASE
Stephen Warren [Sat, 16 Apr 2016 02:42:59 +0000 (20:42 -0600)]
ARM: rpi: fix 64-bit CONFIG_SYS_TEXT_BASE

The Pi firmware has changed the default "kernel" load address for 64-bit
mode. The authors have confirmed that this is a deliberate and long-term
change. Adapt U-Boot to the new value.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
8 years agodrivers/tpm/tpm_tis_sandbox.c: Fix uninitialized variable use
Tom Rini [Tue, 12 Apr 2016 19:11:22 +0000 (15:11 -0400)]
drivers/tpm/tpm_tis_sandbox.c: Fix uninitialized variable use

In rollback_space_kernel we were not initializing the reserved fields
which should be for safety sake, and doing memset here means we don't
need to set the version field specifically either.

Reported-by: Coverity (CID: 143917)
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agofdt: implement dev_get_addr_name()
Stephen Warren [Wed, 6 Apr 2016 18:49:19 +0000 (12:49 -0600)]
fdt: implement dev_get_addr_name()

This function parses the reg property based on an index found in the
reg-names property. This is required for bindings that are written
using reg-names rather than hard-coding indices in reg.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agosandbox: Enable many more commands
Tom Rini [Tue, 15 Mar 2016 17:20:23 +0000 (13:20 -0400)]
sandbox: Enable many more commands

- Set CONFIG_SYS_CACHELINE_SIZE to ARCH_DMA_MINALIGN as that should be
  good enough.
- Make <asm/io.h> include <asm/types.h> like other arches do
- Enable many many more drivers in sandbox_defconfig so that we can get
  more build-time testing on this platform.

Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agotest/dm/core.c: Make pre-reloc test use pre-reloc struct
Tom Rini [Sun, 20 Mar 2016 14:10:28 +0000 (10:10 -0400)]
test/dm/core.c: Make pre-reloc test use pre-reloc struct

LLVM 3.5 noted:
test/dm/core.c:41:35: warning: unused variable 'test_pdata_pre_reloc' [-Wunused-const-variable]
static const struct dm_test_pdata test_pdata_pre_reloc = {

And the correct fix here is that the driver_info_pre_reloc test should
use the test_pdata_pre_reloc not test_pdata_manual variable

Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoboard: README.sandbox: Update dm test command
Jagan Teki [Thu, 17 Mar 2016 06:53:19 +0000 (12:23 +0530)]
board: README.sandbox: Update dm test command

Update dm test command with pytest instead of ./test/dm/test-dm.sh

Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agodoc: driver-model: Update dm tests run using test.py
Jagan Teki [Thu, 17 Mar 2016 06:53:18 +0000 (12:23 +0530)]
doc: driver-model: Update dm tests run using test.py

Since all the tests are implemented in pytest infrastructure,
So update the dm tests with the same instead of ./test/dm/test-dm.sh

Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
8 years agodm: device.c: Minor coding-style fix
Stefan Roese [Wed, 16 Mar 2016 08:58:01 +0000 (09:58 +0100)]
dm: device.c: Minor coding-style fix

Fix multi-line comment indentation in device_bind()

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agodm: part: fix missing driver name in debug print
Nishanth Menon [Tue, 15 Mar 2016 21:15:32 +0000 (16:15 -0500)]
dm: part: fix missing driver name in debug print

Fixes the following warning with PART_DEBUG enabled:
disk/part.c: In function ‘get_partition_info’:
disk/part.c:372:3: warning: format ‘%s’ expects a matching ‘char *’ argument [-Wformat]

Signed-off-by: Nishanth Menon <nm@ti.com>
8 years agodm: core: device: set pinctrl state for pinctrl device
Peng Fan [Sat, 12 Mar 2016 05:17:38 +0000 (13:17 +0800)]
dm: core: device: set pinctrl state for pinctrl device

We may have pinmux settings for pinctrl device, like the following
example:
"
&iomuxc {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_hog_1>;
imx6ul-evk {
pinctrl_hog_1: hoggrp-1 {
fsl,pins = <
MX6UL_PAD_UART1_RTS_B__GPIO1_IO19 0x17059 /* SD1 CD */
MX6UL_PAD_GPIO1_IO05__USDHC1_VSELECT 0x17059 /* SD1 VSELECT */
MX6UL_PAD_GPIO1_IO09__GPIO1_IO09        0x17059 /* SD1 RESET */
MX6UL_PAD_SNVS_TAMPER0__GPIO5_IO00 0x80000000
>;
};
[......]
};
"

We should not only select pinctrl state for non pinctrl devices, we
need also to handle pin mux settings such as pinctrl_log for pinctrl
devices.

So at the end of probing process of pinctrl device, select the default
state of pinctrl device.

Signed-off-by: Peng Fan <van.freenix@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoxpress: Update <usb/ehci-fsl.h> include
Tom Rini [Wed, 13 Apr 2016 19:45:50 +0000 (15:45 -0400)]
xpress: Update <usb/ehci-fsl.h> include

This has been renamed to <usb/ehci-ci.h> some time ago but was missed
here.

Signed-off-by: Tom Rini <trini@konsulko.com>