project/bcm63xx/u-boot.git
8 years agomx6ul_14x14_ev: Enable the CCGR clocks earlier
Fabio Estevam [Mon, 29 Aug 2016 23:37:18 +0000 (20:37 -0300)]
mx6ul_14x14_ev: Enable the CCGR clocks earlier

To be in the safe side we need to enable the CCGR clocks prior
to calling arch_cpu_init().

Inspired by Tim Harvey's commit d783c2744f9 ("imx: ventana: fix boot to SD").

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Eric Nelson <eric@nelint.com>
Tested-by: Eric Nelson <eric@nelint.com>
8 years agomx6ul_14x14_evk: Adjust SPL DDR3 settings
Fabio Estevam [Mon, 29 Aug 2016 23:37:17 +0000 (20:37 -0300)]
mx6ul_14x14_evk: Adjust SPL DDR3 settings

Adjust DDR3 initialization done in SPL by comparing them against
the NXP DCD table.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Eric Nelson <eric@nelint.com>
8 years agomx6ul_14x14_evk: Pass refsel and refr fields to avoid hang
Fabio Estevam [Mon, 29 Aug 2016 23:37:16 +0000 (20:37 -0300)]
mx6ul_14x14_evk: Pass refsel and refr fields to avoid hang

When running a NXP 4.1 kernel with U-Boot mainline on a mx6ul-evk,
we observe a hang when going into the lowest operational point of cpufreq.

This hang issue does not happen on the NXP U-Boot version.

After comparing the SPL DDR initialization against the DCD table
from NXP U-Boot, the key difference that causes the hang is the
MDREF register setting:

DATA 4 0x021B0020 0x00000800

,which means:

REF_SEL = 0 --> Periodic refresh cycle: 64kHz
REFR = 1 ---> Refresh Rate - 2 refreshes

So adjust the MDREF initialization for mx6ul_evk accordingly
to fix the kernel hang issue at low bus frequency.

Reported-by: Eric Nelson <eric@nelint.com>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Eric Nelson <eric@nelint.com>
8 years agomx6: ddr: Allow changing REFSEL and REFR fields
Fabio Estevam [Mon, 29 Aug 2016 23:37:15 +0000 (20:37 -0300)]
mx6: ddr: Allow changing REFSEL and REFR fields

Currently MX6 SPL DDR initialization hardcodes the REF_SEL and
REFR fields of the MDREF register as 1 and 7, respectively for
DDR3 and 0 and 3 for LPDDR2.

Looking at the MDREF initialization done via DCD we see that
boards do need to initialize these fields differently:

$ git grep 0x021b0020 board/
board/bachmann/ot1200/mx6q_4x_mt41j128.cfg:DATA 4 0x021b0020 0x00005800
board/ccv/xpress/imximage.cfg:DATA 4 0x021b0020 0x00000800 /* MMDC0_MDREF */
board/freescale/mx6qarm2/imximage.cfg:DATA 4 0x021b0020 0x7800
board/freescale/mx6qarm2/imximage.cfg:DATA 4 0x021b0020 0x00005800
board/freescale/mx6qarm2/imximage_mx6dl.cfg:DATA 4 0x021b0020 0x00005800
board/freescale/mx6qarm2/imximage_mx6dl.cfg:DATA 4 0x021b0020 0x00005800
board/freescale/mx6qsabreauto/imximage.cfg:DATA 4 0x021b0020 0x00005800
board/freescale/mx6qsabreauto/mx6dl.cfg:DATA 4 0x021b0020 0x00005800
board/freescale/mx6qsabreauto/mx6qp.cfg:DATA 4 0x021b0020 0x00005800
board/freescale/mx6sabresd/mx6dlsabresd.cfg:DATA 4      0x021b0020 0x00005800
board/freescale/mx6sabresd/mx6q_4x_mt41j128.cfg:DATA 4 0x021b0020 0x00005800
board/freescale/mx6slevk/imximage.cfg:DATA 4 0x021b0020 0x00001800
board/freescale/mx6sxsabreauto/imximage.cfg:DATA 4 0x021b0020 0x00000800
board/freescale/mx6sxsabresd/imximage.cfg:DATA 4 0x021b0020 0x00000800
board/warp/imximage.cfg:DATA 4 0x021b0020 0x00001800

So introduce a mechanism for users to be able to configure
REFSEL and REFR fields as needed.

Keep all the mx6 SPL users in their current REF_SEL and REFR values,
so no functional changes for the existing users.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Eric Nelson <eric@nelint.com>
8 years agomx7dsabresd: Directly write to register LDOGCTL
Fabio Estevam [Wed, 17 Aug 2016 12:46:24 +0000 (09:46 -0300)]
mx7dsabresd: Directly write to register LDOGCTL

Register LDOGCTL contains only bit 0 as a valid bit, so there is no need
to do a read-modify-write operation.

Simplify the code by writing directly to this register.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
8 years agomx7dsabresd: Directly write to register LDOGCTL
Fabio Estevam [Wed, 17 Aug 2016 12:46:23 +0000 (09:46 -0300)]
mx7dsabresd: Directly write to register LDOGCTL

Register LDOGCTL contains only bit 0 as a valid bit, so there is no need
to do a read-modify-write operation.

Simplify the code by writing directly to this register.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
8 years agopico-imx6ul: Directly write to register LDOGCTL
Fabio Estevam [Wed, 17 Aug 2016 12:46:22 +0000 (09:46 -0300)]
pico-imx6ul: Directly write to register LDOGCTL

Register LDOGCTL contains only bit 0 as a valid bit, so there is no need
to do a read-modify-write operation.

Simplify the code by writing directly to this register.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
8 years agoARM: board: cm_fx6: fix mtd partition fixup
Christopher Spinrath [Tue, 23 Aug 2016 14:08:52 +0000 (16:08 +0200)]
ARM: board: cm_fx6: fix mtd partition fixup

ft_board_setup may return early in the case that the board revision
cannot be obtained. In that case it is assumed that no revision
specific correction in the fdt is neccessary. But the mtd partitions
will not be fixed up either altough they are not revision specific.

Move the call to fdt_fixup_mtdparts in front of the revision specific
part to ensure that the partitions are fixed up even if the board
revision cannot be obtained.

While on it, fix a spelling mistake in a comment introduced by the
same commit.

Fixes: 62d6bac66038 ("ARM: board: cm_fx6: fixup mtd partitions in the fdt")
Signed-off-by: Christopher Spinrath <christopher.spinrath@rwth-aachen.de>
Reviewed-by: Stefano Babic <sbabic@denx.de>
Reviewed-by: Nikita Kiryanov <nikita@compulab.co.il>
8 years agomx6ul_14x14_evk: don't use array for SD2 card detect pad
Eric Nelson [Fri, 5 Aug 2016 23:51:17 +0000 (16:51 -0700)]
mx6ul_14x14_evk: don't use array for SD2 card detect pad

Only a single pad is changed to change sdhc2_dat3 from an
SDIO pin to and from GPIO4:5, so remove the array and use
the imx_iomux_v3_setup_pad() routine.

Signed-off-by: Eric Nelson <eric@nelint.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
8 years agowarp7: Modify fdt_file environment variable
Breno Lima [Mon, 8 Aug 2016 12:57:38 +0000 (09:57 -0300)]
warp7: Modify fdt_file environment variable

Use imx7s-warp.dts as fdt_file because this is the name that upstream
kernel will deploy.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Acked-by: Fabio Estevam <fabio.estevam@nxp.com>
8 years agowarp: Fix RAM size runtime detection
Fabio Estevam [Mon, 15 Aug 2016 13:07:12 +0000 (10:07 -0300)]
warp: Fix RAM size runtime detection

Since commit a13d3757f7df ("warp: Use imx_ddr_size() for calculating the
DDR size") warp board no longer boots.

The reason for the breakage is that the warp board is using the DDR
configuration from mx6slevk. A fundamental difference between warp and
mx6slevk is that warp only uses one DDR chip select while mx6slevk uses two.

The imx_ddr() function calculates the RAM size in runtime by reading the
values of registers MDCTL and MDMISC.

So in order to fix this warp boot issue, create a imximage DDR file specific
to warp, where the MDCTL register is configured to only activates a single
chip select.

Reported-by: Breno Lima <breno.lima@nxp.com>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Tested-by: Breno Lima <breno.lima@nxp.com>
8 years agowarp7: Add PMIC support
Vanessa Maegima [Fri, 19 Aug 2016 13:21:36 +0000 (10:21 -0300)]
warp7: Add PMIC support

Add PMIC support. Tested by command "pmic PFUZE3000 dump".

Signed-off-by: Vanessa Maegima <vanessa.maegima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
8 years agoarm: imx: Add support for Advantech DMS-BA16 board
Akshay Bhat [Fri, 29 Jul 2016 15:44:46 +0000 (11:44 -0400)]
arm: imx: Add support for Advantech DMS-BA16 board

Add support for Advantech DMS-BA16 board. The board is based on Advantech
BA16 module which has a i.MX6D processor. The board supports:
 - FEC Ethernet
 - USB Ports
 - SDHC and MMC boot
 - SPI NOR
 - LVDS and HDMI display

Basic information about the module:
 - Module manufacturer: Advantech
 - CPU: Freescale ARM Cortex-A9 i.MX6D
 - SPECS:
     Up to 2GB Onboard DDR3 Memory;
     Up to 16GB Onboard eMMC NAND Flash
     Supports OpenGL ES 2.0 and OpenVG 1.1
     HDMI, 24-bit LVDS
     1x UART, 2x I2C, 8x GPIO,
     4x Host USB 2.0 port, 1x USB OTG port,
     1x micro SD (SDHC),1x SDIO, 1x SATA II,
     1x 10/100/1000 Mbps Ethernet, 1x PCIe X1 Gen2

Signed-off-by: Akshay Bhat <akshay.bhat@timesys.com>
Cc: u-boot@lists.denx.de
Cc: sbabic@denx.de
8 years agomx7dsabresd: Print secure/non-secure mode info
Fabio Estevam [Thu, 28 Jul 2016 23:49:46 +0000 (20:49 -0300)]
mx7dsabresd: Print secure/non-secure mode info

mx7dsabresd has two targets:

- mx7dsabresd_defconfig: boots in non-secure mode
- mx7dsabresd_secure_defconfig: boots in secure mode

Print the mode that is being used to help users to easily identify
which target is running on the board.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
8 years agomtd: nand: mxs: fix cache alignment for cache lines >32
Stefan Agner [Tue, 2 Aug 2016 06:55:18 +0000 (23:55 -0700)]
mtd: nand: mxs: fix cache alignment for cache lines >32

Currently the command buffer gets allocated with a size of 32 bytes.
This causes warning messages on systems with cache lines bigger than
32 bytes:
CACHE: Misaligned operation at range [9df17a009df17a20]

Define command buffer to be at least 32 bytes, but more if cache
line is bigger.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
8 years agoimx: ventana: enable splashscreen support
Tim Harvey [Fri, 15 Jul 2016 14:17:20 +0000 (07:17 -0700)]
imx: ventana: enable splashscreen support

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
8 years agoboard: tbs2910: fix HDMI pre-console buffer
Soeren Moch [Wed, 27 Jul 2016 14:07:17 +0000 (16:07 +0200)]
board: tbs2910: fix HDMI pre-console buffer

HDMI output must be enabled very early to also enable the pre-console buffer

Signed-off-by: Soeren Moch <smoch@web.de>
Reviewed-by: Stefano Babic <sbabic@denx.de>
8 years agoboard: tbs2910: always enable usbkbd
Soeren Moch [Wed, 27 Jul 2016 14:07:16 +0000 (16:07 +0200)]
board: tbs2910: always enable usbkbd

'usb start' is much faster now, so always enable usb keyboard

Signed-off-by: Soeren Moch <smoch@web.de>
Reviewed-by: Stefano Babic <sbabic@denx.de>
8 years agoARM: tegra: Add support for TK1-SOM board from Colorado Engineering
Peter Chubb [Tue, 30 Aug 2016 22:54:46 +0000 (22:54 +0000)]
ARM: tegra: Add support for TK1-SOM board from Colorado Engineering

The Colorado TK1 SOM is a small form factor board similar to the
Jetson TK1.  The main differences lie in the pinmux, and in that the
PCIe controller is set to use in 4lanes+1lane, rather than 2+2.

The pinmux header here was generated from a spreadsheet provided by
Colorado Engineering using the tegra-pinmux scripts.  The spreadsheet
was converted from v09 to v11 by me.

Signed-off-by: Peter Chubb <peter.chubb@data61.csiro.au>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra: use numeric versioning for p2771-0000
Stephen Warren [Tue, 30 Aug 2016 16:22:07 +0000 (10:22 -0600)]
ARM: tegra: use numeric versioning for p2771-0000

The board ID EEPROM and board ID stickers on p2771-0000 will use a numeric
versioning scheme, with version numbers such as 000/100/200/300/400/500.
Within NVIDIA, these versions are also known as A00/A01/A02/A03/A04/B00.
However, that numbering scheme is not easily visible outside of NVIDIA,
and so does not make much sense to use. Convert U-Boot to use the readily
visible numeric scheme.

Also, it turns out that the current A02 DT actually applies to board
versions 000/100/200 (A00..A02). Consequently rename this to 000 not 200
so that all U-Boot builds are named after the first version of the HW they
support.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agox86: qemu: efi: Add two boards for EFI 32-bit and 64-bit payload
Bin Meng [Thu, 25 Aug 2016 08:47:19 +0000 (01:47 -0700)]
x86: qemu: efi: Add two boards for EFI 32-bit and 64-bit payload

This introduces two board defconfig files for generating EFI 32-bit
and 64-bit payloads, to run on QEMU x86 target.

With these in place, hopefully buildman will catch any build error
with EFI payload support on x86.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: efi: Fix EFI 64-bit payload build warnings
Bin Meng [Thu, 25 Aug 2016 08:47:18 +0000 (01:47 -0700)]
x86: efi: Fix EFI 64-bit payload build warnings

There are lots of warnings when building EFI 64-bit payload.

include/asm-generic/bitops/__fls.h:17:2:
  warning: left shift count >= width of type
   if (!(word & (~0ul << 32))) {
^

In fact, U-Boot itself as EFI payload is running in 32-bit mode.
So BITS_PER_LONG needs to still be 32, but EFI status codes are
64-bit when booting from 64-bit EFI. Introduce EFI_BITS_PER_LONG
to bridge those status codes with U-Boot's BITS_PER_LONG.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: efi: payload: Make EFI payload build again
Bin Meng [Thu, 25 Aug 2016 08:47:17 +0000 (01:47 -0700)]
x86: efi: payload: Make EFI payload build again

Since commit 73c5c39 "Makefile: Drop unnecessary -dtb suffixes",
EFI payload does not build anymore. This fixes the build.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agox86: Add debugging when cpu_common_init() fails
Simon Glass [Tue, 26 Jul 2016 00:58:59 +0000 (18:58 -0600)]
x86: Add debugging when cpu_common_init() fails

Add a debug() at this point to help figure out what is wrong.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: ivybridge: Allow microcode to be collated
Simon Glass [Tue, 26 Jul 2016 00:58:58 +0000 (18:58 -0600)]
x86: ivybridge: Allow microcode to be collated

Generally the microcode is combined into a single block only (and removed
from the device tree) when there are multiple blocks. But this is not a
requirement.

Adjust the ivybridge code to avoid assuming this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Add debugging when a microcode update fails
Simon Glass [Tue, 26 Jul 2016 00:58:57 +0000 (18:58 -0600)]
x86: Add debugging when a microcode update fails

Add a debug() at this point to help figure out what is wrong.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher<hs@denx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-uniphier
Tom Rini [Sun, 28 Aug 2016 14:36:20 +0000 (10:36 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-uniphier

8 years agoARM: uniphier: enable CONFIG_CMD_CACHE
Masahiro Yamada [Sun, 28 Aug 2016 03:44:41 +0000 (12:44 +0900)]
ARM: uniphier: enable CONFIG_CMD_CACHE

This will be useful, for example, to load firmware to DRAM and make
it visible to other agents.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: change UNIPHIER_SERIAL to default y option
Masahiro Yamada [Thu, 25 Aug 2016 10:00:37 +0000 (19:00 +0900)]
ARM: uniphier: change UNIPHIER_SERIAL to default y option

This is very likely to be necessary for normal use cases.
Set its default to 'y' for shorter defconfig files.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: dts: uniphier: add u-boot, dm-pre-reloc to use eMMC boot on sLD3
Masahiro Yamada [Thu, 25 Aug 2016 08:02:33 +0000 (17:02 +0900)]
ARM: dts: uniphier: add u-boot, dm-pre-reloc to use eMMC boot on sLD3

The eMMC on sLD3 is assigned with dedicated pins (only multiplexed
with GPIO), so it shouldn't hurt to enable eMMC on SPL all the time.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: increase CONFIG_SYS_MALLOC_F_LEN for sLD3
Masahiro Yamada [Thu, 25 Aug 2016 08:02:32 +0000 (17:02 +0900)]
ARM: uniphier: increase CONFIG_SYS_MALLOC_F_LEN for sLD3

Commit 76c52ce29fd7 ("ARM: uniphier: increase CONFIG_SYS_MALLOC_F_LEN
to bind all nodes") missed to increase this config for sLD3.

This change is needed to add "u-boot,dm-pre-reloc" to some nodes;
more devices are bound, more malloc memory is needed.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: display revision of Micro Support Card 3.6.x kindly
Masahiro Yamada [Thu, 25 Aug 2016 08:02:31 +0000 (17:02 +0900)]
ARM: uniphier: display revision of Micro Support Card 3.6.x kindly

The revision of the original support card (rev 3.5, rev 3.6) fits in
the 8 bit width revision register.  When it was extended in a weird
way, it was versioned in the format of "3.6.x" (where it should have
been "3.7", of course).  What is worse, only the sub-level version
"6.x" was recorded in the 8 bit width register, completely ignoring
the compatibility of the revision register format.

This patch saves madly-versioned support cards by assuming the major
version "3" when the MSB 4 bit of the register is read as "6".  With
this, the support card revision that were displayed as "6.10" is now
corrected to "3.6.10".

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: support system reset functionality for PSCI
Masahiro Yamada [Thu, 25 Aug 2016 12:03:41 +0000 (21:03 +0900)]
ARM: uniphier: support system reset functionality for PSCI

This supports the system reset via PSCI for ARMv7 SoCs.

Because the system reset is not supported on PSCI 0.1, let's define
CONFIG_ARMV7_PSCI_1_0. (it is supported since PSCI 0.2, but there
is no CONFIG to enable it in U-Boot for now.)

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agommc: uniphier-sd: just return if already set to desired clock rate
Masahiro Yamada [Thu, 25 Aug 2016 05:52:38 +0000 (14:52 +0900)]
mmc: uniphier-sd: just return if already set to desired clock rate

With this, we can save unnecessary udelay().

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agommc: uniphier-sd: return error code if unsupported width is given
Masahiro Yamada [Thu, 25 Aug 2016 05:52:37 +0000 (14:52 +0900)]
mmc: uniphier-sd: return error code if unsupported width is given

With the CONFIG_DM_MMC_OPS migration, the .set_ios callback can
return an integer now.  Return an appropriate error value rather
than sudden death by BUG().

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agommc: uniphier-sd: move uniphier_sd_init() below
Masahiro Yamada [Thu, 25 Aug 2016 05:52:36 +0000 (14:52 +0900)]
mmc: uniphier-sd: move uniphier_sd_init() below

No more reason to define this function above the ops structure.
Move it near the caller.  Also, change its return type to void
because it never fails.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agommc: uniphier-sd: migrate to CONFIG_DM_MMC_OPS
Masahiro Yamada [Thu, 25 Aug 2016 05:52:35 +0000 (14:52 +0900)]
mmc: uniphier-sd: migrate to CONFIG_DM_MMC_OPS

Catch up with the DM migration.

As struct dm_mmc_ops does not have .init callback, call the init
function directly from the probe function.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agommc: uniphier-sd: add static qualifiers to probe and remove callbacks
Masahiro Yamada [Fri, 12 Aug 2016 10:19:03 +0000 (19:19 +0900)]
mmc: uniphier-sd: add static qualifiers to probe and remove callbacks

They are both only referenced in this file.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoMerge git://git.denx.de/u-boot-rockchip
Tom Rini [Sat, 27 Aug 2016 19:22:30 +0000 (15:22 -0400)]
Merge git://git.denx.de/u-boot-rockchip

8 years agorockchip: rk3399: update MAINTAINER file
Kever Yang [Tue, 9 Aug 2016 07:29:47 +0000 (15:29 +0800)]
rockchip: rk3399: update MAINTAINER file

This patch add maintainer information for rk3399 evb.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andreas Färber <afaerber@suse.de>
8 years agoMerge branch 'master' of http://git.denx.de/u-boot-sunxi
Tom Rini [Fri, 26 Aug 2016 18:58:52 +0000 (14:58 -0400)]
Merge branch 'master' of git.denx.de/u-boot-sunxi

8 years agonand: Fix set_dev checks for no device
Tony Lindgren [Wed, 24 Aug 2016 16:46:32 +0000 (09:46 -0700)]
nand: Fix set_dev checks for no device

If we do nand device 0 command in u-boot on a device that has NAND support
enabled but no NAND chip, we can get data abort at least on omaps.

Fix the issue by replacing the check with nand_info[dev] as
suggested by Scott Wood. The check for name existed before because before
the array-to-pointer conversion there was no way to directly test
nand_info[dev] for emptiness.

Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agotreewide: fix "followings" to "following"
Masahiro Yamada [Sun, 21 Aug 2016 07:12:36 +0000 (16:12 +0900)]
treewide: fix "followings" to "following"

Most of them are my mistakes.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agotools: moveconfig: add Xtensa GCC prefix to CROSS_COMPILE list
Masahiro Yamada [Sun, 21 Aug 2016 07:03:08 +0000 (16:03 +0900)]
tools: moveconfig: add Xtensa GCC prefix to CROSS_COMPILE list

This is needed to move CONFIG options for the recently-added
xtfpga_defconfig.

The tarball of the pre-built toolchain can be downloaded from:
https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoarm: cache: always flush cache line size for page table
Stefan Agner [Mon, 15 Aug 2016 04:33:01 +0000 (21:33 -0700)]
arm: cache: always flush cache line size for page table

The page table is maintained by the CPU, hence it is safe to always
align cache flush to a whole cache line size. This allows to use
mmu_page_table_flush for a single page table, e.g. when configure
only small regions through mmu_set_region_dcache_behaviour.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Tested-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
8 years agoarm: cache: add support for LPAE for region D$ behavior
Stefan Agner [Mon, 15 Aug 2016 04:33:00 +0000 (21:33 -0700)]
arm: cache: add support for LPAE for region D$ behavior

Add LPAE support for mmu_set_region_dcache_behaviour. The function
is in use in some LPAE capable board such TI DRA7xx or NXP i.MX 7.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
8 years agoarch/arm/Kconfig: Whitespace correction
Tom Rini [Mon, 22 Aug 2016 12:22:18 +0000 (08:22 -0400)]
arch/arm/Kconfig: Whitespace correction

Use a tab not 8 spaces.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoARM: Move SYS_CACHELINE_SIZE over to Kconfig
Tom Rini [Mon, 22 Aug 2016 12:22:17 +0000 (08:22 -0400)]
ARM: Move SYS_CACHELINE_SIZE over to Kconfig

This series moves the CONFIG_SYS_CACHELINE_SIZE.  First, in nearly all
cases we are mirroring the values used by the Linux Kernel here.  Also,
so long as (and in this case, it is true) we implement flushes in hunks
that are no larger than the smallest implementation (and given that we
mirror the Linux Kernel, again we are fine) it is OK to align higher.
The biggest changes here are that we always use 64 bytes for CPU_V7 even
if for example the underlying core is only 32 bytes (this mirrors
Linux).  Second, we say ARM64 uses 64 bytes not 128 (as found in the
Linux Kernel) as we do not need multi-platform support (to this degree)
and only the Cavium ThunderX 88xx series has a use for such large
alignment.

Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Cc: Stefan Roese <sr@denx.de>
Cc: Nagendra T S <nagendra@mistralsolutions.com>
Cc: Vaibhav Hiremath <hvaibhav@ti.com>
Acked-by: Lokesh Vutla <lokeshvutla@ti.com>
Cc: Steve Rae <steve.rae@raedomain.com>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Nikita Kiryanov <nikita@compulab.co.il>
Cc: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Heiko Schocher <hs@denx.de>
Cc: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Cc: Peter Griffin <peter.griffin@linaro.org>
Acked-by: Paul Kocialkowski <contact@paulk.fr>
Cc: Anatolij Gustschin <agust@denx.de>
Acked-by: "Pali Rohár" <pali.rohar@gmail.com>
Cc: Adam Ford <aford173@gmail.com>
Cc: Steve Sakoman <sakoman@gmail.com>
Cc: Grazvydas Ignotas <notasas@gmail.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Robert Baldyga <r.baldyga@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Thomas Weber <weber@corscience.de>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: David Feng <fenghua@phytium.com.cn>
Cc: Alison Wang <b18965@freescale.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: York Sun <york.sun@nxp.com>
Cc: Shengzhou Liu <Shengzhou.Liu@nxp.com>
Cc: Mingkai Hu <mingkai.hu@nxp.com>
Cc: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Cc: Aneesh Bansal <aneesh.bansal@freescale.com>
Cc: Saksham Jain <saksham.jain@nxp.com>
Cc: Qianyu Gong <qianyu.gong@nxp.com>
Cc: Wang Dongsheng <dongsheng.wang@nxp.com>
Cc: Alex Porosanu <alexandru.porosanu@freescale.com>
Cc: Hongbo Zhang <hongbo.zhang@nxp.com>
Cc: tang yuantian <Yuantian.Tang@freescale.com>
Cc: Rajesh Bhagat <rajesh.bhagat@nxp.com>
Cc: Josh Wu <josh.wu@atmel.com>
Cc: Bo Shen <voice.shen@atmel.com>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Hannes Schmelzer <oe5hpm@oevsv.at>
Cc: Thomas Chou <thomas@wytron.com.tw>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Sam Protsenko <semen.protsenko@linaro.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Christophe Ricard <christophe-h.ricard@st.com>
Cc: Anand Moon <linux.amoon@gmail.com>
Cc: Beniamino Galvani <b.galvani@gmail.com>
Cc: Carlo Caione <carlo@endlessm.com>
Cc: huang lin <hl@rock-chips.com>
Cc: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Cc: Xu Ziyuan <xzy.xu@rock-chips.com>
Cc: "jk.kernel@gmail.com" <jk.kernel@gmail.com>
Cc: "Ariel D'Alessandro" <ariel@vanguardiasur.com.ar>
Cc: Kever Yang <kever.yang@rock-chips.com>
Cc: Samuel Egli <samuel.egli@siemens.com>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Ian Campbell <ijc@hellion.org.uk>
Cc: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: Andre Przywara <andre.przywara@arm.com>
Cc: Bernhard Nortmann <bernhard.nortmann@web.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Ben Whitten <ben.whitten@gmail.com>
Cc: Tom Warren <twarren@nvidia.com>
Cc: Alexander Graf <agraf@suse.de>
Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Vitaly Andrianov <vitalya@ti.com>
Cc: "Andrew F. Davis" <afd@ti.com>
Cc: Murali Karicheri <m-karicheri2@ti.com>
Cc: Carlos Hernandez <ceh@ti.com>
Cc: Ladislav Michl <ladis@linux-mips.org>
Cc: Ash Charles <ashcharles@gmail.com>
Cc: Mugunthan V N <mugunthanvnm@ti.com>
Cc: Daniel Allred <d-allred@ti.com>
Cc: Gong Qianyu <Qianyu.Gong@freescale.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Chin Liang See <clsee@altera.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Paul Kocialkowski <contact@paulk.fr>
8 years agosunxi: Tune H3 DRAM PLL to improve lock time
Jens Kuske [Fri, 19 Aug 2016 11:40:46 +0000 (13:40 +0200)]
sunxi: Tune H3 DRAM PLL to improve lock time

The H3 PLL5 used for DRAM barely manages to lock to the required
frequency before DRAM controller starts, sometimes leading to wrong
delay-line calibration results.
This patch changes the PLL tuning parameters to the same values as
boot0 used, which speeds up the locking and fixes the problem.

Signed-off-by: Jens Kuske <jenskuske@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agosunxi: display: Use PWM to drive backlight where applicable
Hans de Goede [Fri, 19 Aug 2016 13:25:41 +0000 (15:25 +0200)]
sunxi: display: Use PWM to drive backlight where applicable

When the backlight's pwm input is connected to a pwm output of the SoC,
actually use pwm to drive the backlight.

The mean reason for doing this is to fix the backlight turning off
for aprox. 1 second while the kernel is booting. This is caused by
the kernel actually using pwm to drive the backlight, so that it
can dim the backlight. First the pwm driver loads and switches the
pinmux for the pin driving the backlight's pwm input to the pwm
controller. Then about 1s later the actual backlight driver loads
and tells the pwm driver to actually update the pwm settings, which
have a power-on-reset value of "off".

An additional advantage is that this allows us to initatiate the
backlight at 80%, which is the kernel default, avoiding a brightness
change while the kernel loads.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed by: Peter Korsgaard <peter@korsgaard.com>

8 years agosun5i: Add defconfig and dts file for the Empire Electronix M712 tablet
Hans de Goede [Fri, 19 Aug 2016 10:21:49 +0000 (12:21 +0200)]
sun5i: Add defconfig and dts file for the Empire Electronix M712 tablet

Add a defconfig and dts file for the Empire Electronix M712 tablet, this
is a 7" A13 tablet, with micro-usb (otg), headphone and micro-sd slots on
the outside. It uses a Goodix gt811 touchscreen controller, a RTL8188CTV
wifi chip and a DMART06 (1238a4) accelerometer.

The dts file is identical to the one submitted to the upstream kernel.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
8 years agosunxi: Sync dts files with upstream kernel
Hans de Goede [Thu, 18 Aug 2016 18:51:12 +0000 (20:51 +0200)]
sunxi: Sync dts files with upstream kernel

Sync dts files with the current (Aug 18th 2016) state of Maxime's
linux/sunxi/for-next repo.

Note this commit also updates configs/MSI_Primo81_defconfig,
adding: "# CONFIG_REQUIRE_SERIAL_CONSOLE is not set", this is necessary
because the tablet does not have a reachable uart so the dts sync
drops its serial0 alias.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
8 years agosun6i: Add defconfig and dts file for tablets using the inet-q972 PCB
Hans de Goede [Thu, 18 Aug 2016 17:50:42 +0000 (19:50 +0200)]
sun6i: Add defconfig and dts file for tablets using the inet-q972 PCB

Add a defconfig and dts file for tablets using the generic inet-q972 PCB.

Tablets with this PCB feature a mini-hdmi output, micro-usb usb-host,
micro-usb usb-otg, 3.5mm headphone jack, a micro sd slot,
(mini) power-barrel and an usb wifi module.

This has been tested on a 9.7" 1024x768 qware qw tb9718-qhd tablet.

The dts files are identical to the ones submitted to the upstream kernel.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-i2c
Tom Rini [Fri, 26 Aug 2016 11:42:06 +0000 (07:42 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-i2c

8 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-marvell
Tom Rini [Fri, 26 Aug 2016 11:41:54 +0000 (07:41 -0400)]
Merge branch 'master' of git://denx.de/git/u-boot-marvell

8 years agotools: kwboot: patch destaddr only for SoCs with header version 1
Simon Baatz [Wed, 10 Aug 2016 08:15:42 +0000 (10:15 +0200)]
tools: kwboot: patch destaddr only for SoCs with header version 1

Commit f4db6c976cf ("arm: mvebu: Add runtime detection of UART (xmodem)
boot-mode") added a change to hdr->destaddr when dynamically patching an
image for UART boot mode.  With this change, kwboot ceases to work on
Kirkwood.

Thus, let's change hdr->destaddr only when we are patching an image with
header version 1 (Orion and Kirkwood use header version 0).

Signed-off-by: Simon Baatz <gmbnomis@gmail.com>
Fixes: f4db6c976cf ("arm: mvebu: Add runtime detection of UART (xmodem) boot-mode")
Cc: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Cc: Kevin Smith <kevin.smith@elecsyscorp.com>
Signed-off-by: Stefan Roese <sr@denx.de>
8 years agoarm: mvebu: a38x: typo fix cpabilities -> capbilities
Chris Packham [Tue, 23 Aug 2016 00:07:39 +0000 (12:07 +1200)]
arm: mvebu: a38x: typo fix cpabilities -> capbilities

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
8 years agoarm: mvebu: a38x: update serdes error handling
Chris Packham [Mon, 22 Aug 2016 08:52:49 +0000 (20:52 +1200)]
arm: mvebu: a38x: update serdes error handling

Ensure appropriate error messages are generated. Previously all errors
indicated that the serdes was already in use. Now appropriate error
messages are given.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
8 years agospl: Remove unused CONFIG_SPL_SPI_* definitions
Chris Packham [Mon, 22 Aug 2016 05:17:29 +0000 (17:17 +1200)]
spl: Remove unused CONFIG_SPL_SPI_* definitions

As of commit 88e34e5 ("spl: replace CONFIG_SPL_SPI_* with
CONFIG_SF_DEFAULT_*") these defines are not used. Remove them to avoid
confusion.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
8 years agoarm: mvebu: Add support for NAND interface on A-38x
Chris Packham [Mon, 22 Aug 2016 00:38:39 +0000 (12:38 +1200)]
arm: mvebu: Add support for NAND interface on A-38x

The NAND interface on the Armada-38x series is similar to that on the
Armada-XP. The key difference is that the NAND ECC clock ratio is
provided via the DFX Server registers instead of the Core Clock.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Cc: Dirk Eibach <eibach@gdsys.de>
Signed-off-by: Stefan Roese <sr@denx.de>
8 years agoi2c: mvtwsi: Fix order of address bytes (high to low)
Stefan Roese [Thu, 25 Aug 2016 13:20:01 +0000 (15:20 +0200)]
i2c: mvtwsi: Fix order of address bytes (high to low)

Patch f8a10ed1 [i2c: mvtwsi: Make address length variable] accidentally
inverted the sequence of address bytes sent to the I2C device. This
patch corrects this by sending the highest byte first and the lowest
byte last again.

Tested on theadorable Armada-XP board.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Mario Six <mario.six@gdsys.cc>
Cc: Heiko Schocher <hs@denx.de>
8 years agospi: tegra: fix hang in set_mode()
Stephen Warren [Thu, 18 Aug 2016 16:53:33 +0000 (10:53 -0600)]
spi: tegra: fix hang in set_mode()

In tegra20_slink.c, the set_mode() function may be executed before the
SPI bus is claimed the first time, and hence the clocks to the SPI
controller may not be running. If so, any register read/write at this
time will hang the CPU. Fix this by ensuring the clock is running as soon
as the driver is probed. This is observed on the Tegra30 Beaver board.

Apply the same clock initialization fix to all other Tegra SPI drivers so
that if set_mode() is ever implemented there, the same bug will not appear.
Note that tegra114_spi.c already operates in this fashion.

The clock manipulation code is copied from claim_bus() to probe() rather
than moved. This ensures that any calls to set_speed() take effect; the
clock can't be set once during probe and left unchanged.

Fixes: 5cb1b7b395c0 ("spi: tegra20: Add support for mode selection")
Cc: Mirza Krak <mirza.krak@hostmobility.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra: remove stale nvidia, bpmp I2C DT property
Stephen Warren [Mon, 22 Aug 2016 22:46:55 +0000 (16:46 -0600)]
ARM: tegra: remove stale nvidia, bpmp I2C DT property

The nvidia,bpmp property is left over from an old BPMP I2C binding, and
shouldn't be present. Remove it from the SoC DT file, and update the
I2C driver not to parse it; the value wasn't used for anything any more
anyway.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra: fix Tegra186 SDHCI clock/reset names
Stephen Warren [Thu, 18 Aug 2016 17:08:44 +0000 (11:08 -0600)]
ARM: tegra: fix Tegra186 SDHCI clock/reset names

The Tegra SDHCI binding dictates that the reseet name for the Tegra SDHCI
clock be "sdhci" not "sdmmc", and that the clock is accessed by index
rather than by name. Fix the Tegra186 DT and MMC driver to honor this.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoARM: tegra: fix Tegra186 I2C clock name
Stephen Warren [Thu, 18 Aug 2016 17:08:43 +0000 (11:08 -0600)]
ARM: tegra: fix Tegra186 I2C clock name

The Tegra I2C binding dictates that the clock name for the Tegra I2C clock
be "div-clk" not "i2c". Fix the Tegra186 DT and I2C driver to honor this.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-net
Tom Rini [Tue, 23 Aug 2016 11:20:36 +0000 (07:20 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-net

8 years agoPrepare 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 agonet: mii: check phy advertising register when geting link status
Dongpo Li [Mon, 22 Aug 2016 13:03:29 +0000 (21:03 +0800)]
net: mii: check phy advertising register when geting link status

When phy autoneg on, the link speed and duplex should be
determined by phy advertising register and
phy link partner ability register.
Check phy advertising register when geting phy link speed and
duplex if autoneg on.

Signed-off-by: Dongpo Li <lidongpo@hisilicon.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agonet: davinci_emac: Restore the internal MDIO accessors return values
karl beldan [Sat, 20 Aug 2016 08:56:53 +0000 (08:56 +0000)]
net: davinci_emac: Restore the internal MDIO accessors return values

The spatch series converting legacy drivers from miiphy_register to
mdio_register changed the return convention of the davinci_emac internal
MDIO accessors, making the internal code relying on it misbehaving:
no mdiodev get registered and U-Boot crashes when using net cmds in the
context of the old legacy net API.

ATM davinci_emac_initialize and cpu_eth_init don't return a proper value
in that case but fixing them would not avoid the crash.

This change is just a follow-up to the spatch pass, the MDIO accessors
of the mdiodev introduced by the spatch pass retain their proper values.

Signed-off-by: Karl Beldan <karl.beldan+oss@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agonet/fm: Remove unused code of FMan QMI
Hou Zhiqiang [Fri, 19 Aug 2016 03:35:35 +0000 (11:35 +0800)]
net/fm: Remove unused code of FMan QMI

The QMan is not used in FMan IM mode, so no QMI enqueue or QMI
dequeue are performed.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agonet: davinci_emac: Invalidate only the received portion of a buffer
karl beldan [Mon, 15 Aug 2016 17:23:01 +0000 (17:23 +0000)]
net: davinci_emac: Invalidate only the received portion of a buffer

ATM when receiving a packet the whole buffer is invalidated, this change
optimizes this behaviour.

Signed-off-by: Karl Beldan <karl.beldan+oss@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Mugunthan V N <mugunthanvnm@ti.com>
8 years agonet: davinci_emac: Round up top tx buffer boundaries for dcache ops
karl beldan [Mon, 15 Aug 2016 17:23:00 +0000 (17:23 +0000)]
net: davinci_emac: Round up top tx buffer boundaries for dcache ops

check_cache_range() warns that the top boundaries are not properly
aligned when flushing or invalidating the buffers and make these
operations fail.

This gets rid of the remaining warnings:
CACHE: Misaligned operation at range

Signed-off-by: Karl Beldan <karl.beldan+oss@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Mugunthan V N <mugunthanvnm@ti.com>
8 years agonet: davinci_emac: Remove useless dcache ops on descriptors
karl beldan [Sun, 14 Aug 2016 15:03:15 +0000 (15:03 +0000)]
net: davinci_emac: Remove useless dcache ops on descriptors

ATM the rx and tx descriptors are handled as cached memory while they
lie in a dedicated RAM of the SoCs, which is an uncached area.
Removing the said dcache ops, while optimizing the logic and clarifying
the code, also gets rid of most of the check_cache_range() incurred
warnings:
CACHE: Misaligned operation at range

Signed-off-by: Karl Beldan <karl.beldan+oss@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agonet: nfs: Simplify rpc_add_credentials()
Joe Hershberger [Mon, 15 Aug 2016 20:03:27 +0000 (15:03 -0500)]
net: nfs: Simplify rpc_add_credentials()

We use an empty hostname, so remove all the "processing" of the
known-to-be-empty hostname and just write 0's where needed.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agonet: nfs: Use the tx buffer to construct rpc msgs
Joe Hershberger [Mon, 15 Aug 2016 20:03:26 +0000 (15:03 -0500)]
net: nfs: Use the tx buffer to construct rpc msgs

Instead of always allocating a huge temporary buffer on the stack and
then memcpy()ing the result into the transmit buffer, simply figure out
where in the transmit buffer the bytes will belong and write them there
directly as each message is built.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agonet: nfs: Move some prints to debug statements
Joe Hershberger [Mon, 15 Aug 2016 20:03:25 +0000 (15:03 -0500)]
net: nfs: Move some prints to debug statements

Much of the information is verbose and derived directly from the
environment. Only output in debug mode. This also saves about 300 bytes
from the code size.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agonet: nfs: Use consistent names for the rpc_pkt
Joe Hershberger [Mon, 15 Aug 2016 20:03:24 +0000 (15:03 -0500)]
net: nfs: Use consistent names for the rpc_pkt

Use the same name throughout the nfs code and use the same member of the
union to avoid casts.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agonet: nfs: Correct a comment
Joe Hershberger [Mon, 15 Aug 2016 20:03:23 +0000 (15:03 -0500)]
net: nfs: Correct a comment

The buffer is of 32-bit elements, not bytes.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agonet: nfs: Consolidate handling of NFSv3 attributes
Joe Hershberger [Mon, 15 Aug 2016 20:03:22 +0000 (15:03 -0500)]
net: nfs: Consolidate handling of NFSv3 attributes

Instead of repeating the same large snippet for dealing with attributes
it should be shared with a helper function.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agonet: nfs: Fix lines that are too long
Joe Hershberger [Mon, 15 Aug 2016 20:03:21 +0000 (15:03 -0500)]
net: nfs: Fix lines that are too long

Fix complaints from checkpatch.pl.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agonet: nfs: Correct the reply data buffer size
Joe Hershberger [Mon, 15 Aug 2016 20:03:20 +0000 (15:03 -0500)]
net: nfs: Correct the reply data buffer size

The type of the buffer is uint32_t, but the parameter used to size it
is referring to bytes. Divide by the size of the array elements.

Strictly speaking, this shouldn't be needed at all... It could just be 1
just like the request.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agonet: nfs: Share the file handle buffer for v2 / v3
Joe Hershberger [Mon, 15 Aug 2016 20:03:19 +0000 (15:03 -0500)]
net: nfs: Share the file handle buffer for v2 / v3

The v3 handles can be larger than v2, but that doesn't mean we need a
separate buffer. Reuse the same (larger) buffer for both.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agonet: NFS: Add NFSv3 support
Guillaume GARDET [Fri, 29 Jul 2016 09:31:00 +0000 (11:31 +0200)]
net: NFS: Add NFSv3 support

This patch enables NFSv3 support.
If NFSv2 is available use it as usual.
If NFSv2 is not available, but NFSv3 is available, use NFSv3.
If NFSv2 and NFSv3 are not available, print an error message since NFSv4 is not supported.

Tested on iMX6 sabrelite with 4 Linux NFS servers:
  * NFSv2 + NFSv3 + NFSv4 server: use NFSv2 protocol
  * NFSv2 + NFSv3 server: use NFSv2 protocol
  * NFSv3 + NFSv4 server: use NFSv3 protocol
  * NFSv3 server: use NFSv3 protocol

Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Cc: Tom Rini <trini@konsulko.com>
Cc: joe.hershberger@ni.com
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agonet: nfs: Remove unused define
Joe Hershberger [Mon, 15 Aug 2016 19:42:17 +0000 (14:42 -0500)]
net: nfs: Remove unused define

Unreferenced, so remove the noise.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agonet: nfs: Remove separate buffer for default name
Joe Hershberger [Mon, 15 Aug 2016 19:42:16 +0000 (14:42 -0500)]
net: nfs: Remove separate buffer for default name

There is no reason to store the default filename in a separate buffer
only to immediately copy it to the main name buffer. Just write it there
directly and remove the other buffer.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agonet: Stop including NFS overhead in defragment max
Joe Hershberger [Mon, 15 Aug 2016 19:42:15 +0000 (14:42 -0500)]
net: Stop including NFS overhead in defragment max

At least on bfin, this "specimen" is actually allocated in the BSS and
wastes lots of memory in already tight memory conditions.

Also, with the introduction of NFSv3 support, this waste got
substantially larger.

Just remove it. If a board needs a specific different defragment size,
that board can override this setting.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.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>