oweals/u-boot.git
6 years agoMerge git://git.denx.de/u-boot-usb
Tom Rini [Fri, 23 Feb 2018 18:04:48 +0000 (13:04 -0500)]
Merge git://git.denx.de/u-boot-usb

6 years agoconfig_whitelist: remove false-positive CONFIG options
Masahiro Yamada [Fri, 5 Jan 2018 18:17:06 +0000 (03:17 +0900)]
config_whitelist: remove false-positive CONFIG options

U-Boot pulled in several core makefiles from Linux.  The following
are not used in U-Boot:

  - CONFIG_DEBUG_SECTION_MISMATCH
  - CONFIG_FTRACE_MCOUNT_RECORD
  - CONFIG_GCOV_KERNEL
  - CONFIG_GCOV_PROFILE_ALL
  - CONFIG_KASAN
  - CONFIG_MODVERSIONS

We can remove the unused code if we like. (although it will get the
scripts out of sync)

CONFIG_BOOM and CONFIG_HIS_DRIVER are just mentioned in the comment
block of scripts/basic/fixdep.c

CONFIG_SHELL is not configuration, but a variable for internal-use.
It is just a historical misnomer in Kbuild.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoomap3_logic: Fix Environmental location
Adam Ford [Thu, 22 Feb 2018 23:15:12 +0000 (17:15 -0600)]
omap3_logic: Fix Environmental location

For the omap3_logic boards, the environment is always in NAND.
This removes the ENV_IS_IN_FAT flag to eliminate the extra chatter.

Signed-off-by: Adam Ford <aford173@gmail.com>
6 years agosf: Add ISSI IS25LP256 entry
Marek Vasut [Wed, 21 Feb 2018 20:12:02 +0000 (21:12 +0100)]
sf: Add ISSI IS25LP256 entry

Add entry for ISSI IS25LP256 part.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Jagan Teki <jagan@openedev.com>
6 years agoMakefile: Don't mess with .text section location for selected arches
Alexey Brodkin [Wed, 21 Feb 2018 10:06:26 +0000 (13:06 +0300)]
Makefile: Don't mess with .text section location for selected arches

Most of architectures have .text section situated in the very beginning
of U-Boot binary and thus it is very logical that CONFIG_SYS_TEXT_BASE
is used on final linkage step to specify where U-Boot gets linked to.

For that we pass the following construction to the LD:
---------------------------->8-----------------------
xxx-ld ...  -Ttext $(CONFIG_SYS_TEXT_BASE) ...
---------------------------->8-----------------------

But there could be exceptions. For example:
 1. In case of ARCv2 we want to put vectors table in its own section
    .ivt in front of .text section which means we need either add an
    offset to CONFIG_SYS_TEXT_BASE to compensate for .ivt or don't
    pass "-Ttext" to the LD at all and specify link base in linker
    script directly.

 2. Some architectures even though have .text section in the very
    beginning of the U-Boot image still use different symbols to
    specify link-base:
       * NIOS2: CONFIG_SYS_MONITOR_BASE (which I really like because
         that exactly what makes sense - where out image starts but not
         beginning of its .text section which just happened to match the
         whole image beginning)
       * EXTENSA: CONFIG_SYS_TEXT_ADDR
       * X86: Which doesn't use CONFIG_SYS_MONITOR_BASE in case of EFI
         otherwise sets explicit link base in u-boot.lds

I think that's good to allow for flexibility and don't require each and
every architecture or even platform to specify CONFIG_SYS_TEXT_BASE as well
as use it to set .text section location.

So let's only pass "-Ttext xxx" for those architectures who don't set
link-base explicitly in their linker scripts.

This patch iaddresses comments for previously sent
https://patchwork.ozlabs.org/patch/867540/.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
6 years agoarm64: show_regs: Dump the LRs HW values
Karl Beldan [Tue, 20 Feb 2018 23:30:08 +0000 (23:30 +0000)]
arm64: show_regs: Dump the LRs HW values

These were dropped in [1], after relocation, for their values offset by
reloc_off.
Unconditionally show the HW values and add a '(reloc)' hint for the
offset values showed after relocation.
Also, the LRs' dumps are now formatted the same way the other regs' are.

[1] Commit 082693f4 ("arm64 :show_regs: show the address before relocation")

Signed-off-by: Karl Beldan <karl.beldan+oss@gmail.com>
6 years agotools/kwbimage: fix LibreSSL build
Jonathan Gray [Tue, 20 Feb 2018 15:59:01 +0000 (02:59 +1100)]
tools/kwbimage: fix LibreSSL build

Fix build after addition of RSA_get0_key() to LibreSSL.
Patch from Theo Buehler and Stuart Henderson.

Signed-off-by: Theo Buehler <tb@openbsd.org>
Signed-off-by: Stuart Henderson <sthen@openbsd.org>
6 years agonet: Remove Xilinx ll_temac driver
Michal Simek [Tue, 20 Feb 2018 09:19:00 +0000 (10:19 +0100)]
net: Remove Xilinx ll_temac driver

ll_temac driver was used by Xilinx Microblaze big endian and
Xilinx ppc405/ppc440 SoCs.

ppc support was removed by: "powerpc: remove 4xx support"
(sha1: 98f705c9cefdfdba62c069821bbba10273a0a8ed)
and Microblaze BE is not tested for a long time that's why this driver
can be removed because none is going to updated it to DM anyway.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
6 years agoconfigs: am335x_evm_usbspl: Add CONFIG_SPL_NET_VCI_STRING
Faiz Abbas [Fri, 16 Feb 2018 08:11:23 +0000 (13:41 +0530)]
configs: am335x_evm_usbspl: Add CONFIG_SPL_NET_VCI_STRING

Add CONFIG_SPL_NET_VCI_STRING to enable USB-Ethernet boot mode
support.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agofdt: Fixup only valid memory banks
Thierry Reding [Thu, 15 Feb 2018 18:05:59 +0000 (19:05 +0100)]
fdt: Fixup only valid memory banks

Memory banks with address 0 and size 0 are empty and should not be
passed to the OS via device tree.

Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
6 years agons16550: Fix mem mapped endian check
Bernhard Messerklinger [Thu, 15 Feb 2018 08:02:26 +0000 (09:02 +0100)]
ns16550: Fix mem mapped endian check

Do a explicit check for CONFIG_SYS_BIG_ENDIAN and
CONFIG_SYS_LITTLE_ENDIAN to avoid errors on platforms where both
are undefined (x86).

Signed-off-by: Bernhard Messerklinger <bernhard.messerklinger@br-automation.com>
Reviewed-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
6 years agopci: Fix decode regions for memory banks
Bernhard Messerklinger [Thu, 15 Feb 2018 07:59:53 +0000 (08:59 +0100)]
pci: Fix decode regions for memory banks

Since memory banks may not be located behind each other we need to add
them separately.

Signed-off-by: Bernhard Messerklinger <bernhard.messerklinger@br-automation.com>
Reviewed-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
6 years agodefconfig: k2x_hs_evm: Re-enable TI_SECURE_DEVICE in HS K2x parts
Andrew F. Davis [Wed, 14 Feb 2018 17:53:39 +0000 (11:53 -0600)]
defconfig: k2x_hs_evm: Re-enable TI_SECURE_DEVICE in HS K2x parts

These got removed in config re-syncs due to a Kconfig bug. Add these
back here.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
6 years agoenv: Fix missed getenv_ulong to env_get_ulong conversion
Andrew F. Davis [Wed, 14 Feb 2018 17:53:38 +0000 (11:53 -0600)]
env: Fix missed getenv_ulong to env_get_ulong conversion

This seems to have been missed, possibly due to the inability to
enable TI_SECURE_DEVICE on Keystone2 devices previously.

Fixes: bfebc8c965e4 ("env: Rename getenv_hex(), getenv_yesno(), getenv_ulong()")
Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
6 years agoARM: Kconfig: Move TI_SECURE_DEVICE to a common area
Andrew F. Davis [Wed, 14 Feb 2018 17:53:37 +0000 (11:53 -0600)]
ARM: Kconfig: Move TI_SECURE_DEVICE to a common area

TI_SECURE_DEVICE is used by both OMAP2+ and Keystone2 family devices,
and so when ARCH_OMAP2PLUS was used to gate off the OMAP2+ Kconfig
Keystone2 family devices lost this config option.

Move this option out of mach-omap2 Kconfig to a spot accessible by both
families. We picked arch/arm/Kconfig over the TI specific board/ti/
location as this option is not specific to our boards but rather our
architecture.

Plus at some point this option can be changed to just
SECURE_DEVICE, as having secure parts is not exclusive to TI and
so other vendors can interpret this option as needed by their device
configurations.

Fixes: a93fbf4a7892 ("ARM: omap2+: rename config to ARCH_OMAP2PLUS and consolidate Kconfig")
Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
6 years agoxtensa: clean up CONFIG_SYS_TEXT_ADDR
Max Filippov [Mon, 12 Feb 2018 23:39:19 +0000 (15:39 -0800)]
xtensa: clean up CONFIG_SYS_TEXT_ADDR

Drop CONFIG_SYS_MEMORY_TOP. Rename CONFIG_SYS_TEXT_ADDR to
XTENSA_SYS_TEXT_ADDR.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
6 years agoconfigs: Re-sync with CONFIG_DISTRO_DEFAULTS
Tom Rini [Sat, 10 Feb 2018 21:54:38 +0000 (16:54 -0500)]
configs: Re-sync with CONFIG_DISTRO_DEFAULTS

A number of platforms include config_distro_defaults.h but do not enable
CONFIG_DISTRO_DEFAULTS.  As they plainly intended to, set that flag and
re-sync config files.

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agocmd: fastboot: Kconfig: solve config issue
Patrick Delaunay [Thu, 7 Dec 2017 17:26:17 +0000 (18:26 +0100)]
cmd: fastboot: Kconfig: solve config issue

When FASTBOOT is activated, only one the supported device is supported in
code at the same time
- CONFIG_FASTBOOT_FLASH_MMC_DEV
- CONFIG_FASTBOOT_FLASH_NAND_DEV

But Today the choice is not exclusive in Kconfig
and that cause Kconfig issue when :
- CONFIG_FASTBOOT, CONFIG_MMC, CONFIG_NAND are activated
- CONFIG_FASTBOOT_FLASH_MMC_DEV = 0
- CONFIG_FASTBOOT_FLASH_NAND_DEV is not activated

The patch add a choice in Kconfig to select the FLASH provider
- CONFIG_FASTBOOT_FLASH_MMC
- CONFIG_FASTBOOT_FLASH_NAND

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
6 years agodfu: tftp: Fix arm64 build warnings
Marek Vasut [Fri, 16 Feb 2018 15:41:19 +0000 (16:41 +0100)]
dfu: tftp: Fix arm64 build warnings

Fix two build warnings when building for arm64:

drivers/dfu/dfu_tftp.c: In function ‘dfu_tftp_write’:
drivers/dfu/dfu_tftp.c:59:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  ret = dfu_write_from_mem_addr(dfu, (void *)addr, len);
                                     ^
and

drivers/dfu/dfu_tftp.c: In function ‘dfu_tftp_write’:
drivers/dfu/dfu_tftp.c:41:8: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 4 has type ‘__kernel_size_t {aka long unsigned int}’ [-Wformat=]
  debug("%s: image name: %s strlen: %u\n", __func__, sb, strlen(sb));
        ^

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Lukasz Majewski <lukma@denx.de>
6 years agodfu: Rename _FUNCTION_DFU to DFU_OVER_
Marek Vasut [Fri, 16 Feb 2018 15:41:18 +0000 (16:41 +0100)]
dfu: Rename _FUNCTION_DFU to DFU_OVER_

Do the following to make the symbol names less confusing.

sed -i "s/\([TU][^_]\+\)_FUNCTION_DFU/DFU_OVER_\1/g" \
`git grep _FUNCTION_DFU | cut -d ":" -f 1 | sort -u`

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Lukasz Majewski <lukma@denx.de>
6 years agodfu: Fix up the Kconfig mess
Marek Vasut [Fri, 16 Feb 2018 15:41:17 +0000 (16:41 +0100)]
dfu: Fix up the Kconfig mess

Clean up the screaming mess of configuration options that DFU is.
It was impossible to configure DFU such that TFTP is enabled and
USB is not, this patch fixes that and assures that DFU TFTP and
DFU USB can be enabled separatelly and that the correct pieces
of code are compiled in.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Lukasz Majewski <lukma@denx.de>
6 years agousb: kbd: select SYS_STDIO_DEREGISTER
Heinrich Schuchardt [Wed, 21 Feb 2018 03:57:09 +0000 (03:57 +0000)]
usb: kbd: select SYS_STDIO_DEREGISTER

If SYS_STDIO_DEREGISTER is not selected and USB_KEYBOARD is selected
U-Boot cannot be built due to missing function stdio_deregister_dev.

So USB_KEYBOARD should select SYS_STDIO_DEREGISTER.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
6 years agousb: gadget: sdp: fix pointer cast warnings for 64bit archs
Andre Heider [Thu, 15 Feb 2018 09:17:29 +0000 (10:17 +0100)]
usb: gadget: sdp: fix pointer cast warnings for 64bit archs

The SDP protocol contains multiple 32bit pointers. Add a helper function
to get a valid pointer from these values and use it.

This fixes the following warnings:

drivers/usb/gadget/f_sdp.c: In function ‘sdp_rx_data_complete’:
drivers/usb/gadget/f_sdp.c:347:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   memcpy((void *)sdp->dnl_address, req->buf + 1, datalen);
          ^
drivers/usb/gadget/f_sdp.c: In function ‘sdp_jump_imxheader’:
drivers/usb/gadget/f_sdp.c:625:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  entry = (void *)headerv2->entry;
          ^
drivers/usb/gadget/f_sdp.c: In function ‘sdp_handle_in_ep’:
drivers/usb/gadget/f_sdp.c:668:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   memcpy(&data[1], (void *)sdp_func->dnl_address, datalen);
                    ^
drivers/usb/gadget/f_sdp.c:679:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   status = sdp_jump_imxheader((void *)sdp_func->jmp_address);
                               ^

Signed-off-by: Andre Heider <a.heider@gmail.com>
6 years agousb: gadget: sdp: add missing line breaks
Andre Heider [Thu, 15 Feb 2018 06:08:55 +0000 (07:08 +0100)]
usb: gadget: sdp: add missing line breaks

Cosmetic change.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Acked-by: Stefan Agner <stefan.agner@toradex.com>
6 years agoPrepare v2018.03-rc3 v2018.03-rc3
Tom Rini [Tue, 20 Feb 2018 21:51:56 +0000 (16:51 -0500)]
Prepare v2018.03-rc3

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoscript: Make the get_default_envs.sh script working with newest u-boot
Lukasz Majewski [Wed, 14 Feb 2018 10:39:48 +0000 (11:39 +0100)]
script: Make the get_default_envs.sh script working with newest u-boot

This commit fixes several issues:

- After moving env related code to ./env directory the env_common.o file
is no longer present in the system (has been replaced with built-in.o).

- Use ${OBJCOPY} if available, fallback to system default's objcopy if not
present.

- Extend the script to accept different build directory than current one.
It is extremely handy with OE usage, where source code is separated from
build.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Tested-by: Alex Kiernan <alex.kiernan@gmail.com>
6 years agoenv: mmc/fat/ext4: make sure that the MMC sub-system is initialized before using it
Faiz Abbas [Mon, 12 Feb 2018 13:54:31 +0000 (19:24 +0530)]
env: mmc/fat/ext4: make sure that the MMC sub-system is initialized before using it

When booting from a non-MMC device, the MMC sub-system may not be
initialized when the environment is first accessed.
We need to make sure that the MMC sub-system is ready in even a non-MMC
boot case.

Therefore, initialize mmc before loading environment from it.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
6 years agoMerge git://git.denx.de/u-boot-mmc
Tom Rini [Tue, 20 Feb 2018 04:01:05 +0000 (23:01 -0500)]
Merge git://git.denx.de/u-boot-mmc

6 years agoMerge git://git.denx.de/u-boot-dm
Tom Rini [Mon, 19 Feb 2018 16:39:39 +0000 (11:39 -0500)]
Merge git://git.denx.de/u-boot-dm

6 years agoMerge git://git.denx.de/u-boot-ubi
Tom Rini [Mon, 19 Feb 2018 14:50:37 +0000 (09:50 -0500)]
Merge git://git.denx.de/u-boot-ubi

6 years agoMerge git://git.denx.de/u-boot-i2c
Tom Rini [Mon, 19 Feb 2018 14:50:18 +0000 (09:50 -0500)]
Merge git://git.denx.de/u-boot-i2c

6 years agoMerge git://git.denx.de/u-boot-sh
Tom Rini [Mon, 19 Feb 2018 14:50:15 +0000 (09:50 -0500)]
Merge git://git.denx.de/u-boot-sh

6 years agovexpress: Sign up as maintainer
Linus Walleij [Mon, 19 Feb 2018 13:49:07 +0000 (14:49 +0100)]
vexpress: Sign up as maintainer

These ARM boards are in nice shape and still being used a lot
with e.g. QEMU, so I can maintain them.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agommc: Fix uninitialised priv member
Alex Kiernan [Fri, 9 Feb 2018 15:24:38 +0000 (15:24 +0000)]
mmc: Fix uninitialised priv member

When using omap_hsmmc without the device model then the allocation
of mmc->priv ends up uninitialised.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Tested-by: Robert Nelson <robertcnelson@gmail.com>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
6 years agommc: fix bug in mmc_startup_v4()
Jean-Jacques Hiblot [Fri, 9 Feb 2018 11:09:28 +0000 (12:09 +0100)]
mmc: fix bug in mmc_startup_v4()

The correspondence between mmc versions as used in u-boot and the version
numbers reported in register EXT_CSD_REV is wrong for versions above and
including MMC_VERSION_4_41. All those versions were shifted by one:
real 4.5 hardware appeared to be MMC_VERSION_5_0.

Fix this by adding the missing version in the correspondence table.

Reported-by: eil Eilmsteiner Heribert <eil@keba.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
6 years agommc: Fix bug in sd_set_card_speed()
Jean-Jacques Hiblot [Fri, 9 Feb 2018 11:09:27 +0000 (12:09 +0100)]
mmc: Fix bug in sd_set_card_speed()

After settings the speed of the sd with the switch command, a check is
done to make sure that the new speed has been set. The current check has a
masking error: speed are encoded on 4 bits only.
Fix it by masking the upper bits.

This fixes a problem seen with QEmu emulating a vexpress-a15.

Reported-by: Jonathan Gray <jsg@jsg.id.au>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Tested-by: Jonathan Gray <jsg@jsg.id.au>
6 years agoconfigs: dra7xx_evm/dra7xx_hs_evm: Enable MMC HS200 and SD UHS support
Jean-Jacques Hiblot [Tue, 30 Jan 2018 15:01:53 +0000 (16:01 +0100)]
configs: dra7xx_evm/dra7xx_hs_evm: Enable MMC HS200 and SD UHS support

By default UHS and HS200 are not enabled.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
6 years agoARM: DRA7x/AM57x: Add MMC/SD fixups for rev1.0 and rev 1.1
Kishon Vijay Abraham I [Tue, 30 Jan 2018 15:01:52 +0000 (16:01 +0100)]
ARM: DRA7x/AM57x: Add MMC/SD fixups for rev1.0 and rev 1.1

Since DRA7xx/AM57xx SR1.1 and SR1.0 has errata to limit the frequency of
MMC1 to 96MHz and frequency of MMC2 to 48MHz for AM572x SR1.1, limit the
frequency and disable higher speed modes for those revision.
Also use the recommended IO delays (those tagged with "rev11")

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
6 years agodts: am57xx-idk: disable HS200 support
Jean-Jacques Hiblot [Tue, 30 Jan 2018 15:01:51 +0000 (16:01 +0100)]
dts: am57xx-idk: disable HS200 support

HS200 cannot be supported on mmc2, because the IO lines of mmc2 are
connected to 3.3v.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
6 years agodts: am57xx-beagle-x15: disable UHS and HS200 support
Jean-Jacques Hiblot [Tue, 30 Jan 2018 15:01:50 +0000 (16:01 +0100)]
dts: am57xx-beagle-x15: disable UHS and HS200 support

The UHS modes are not supported in beagle-x15 because it's not possible to
switch the IO lines supply voltage to 1.8v.
Also HS200 cannot be supported on mmc2, because the IO lines of mmc2 are
connected to 3.3v.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
6 years agoARM: dts: dra7: Add supported MMC/SD modes in MMC dt nodes
Jean-Jacques Hiblot [Tue, 30 Jan 2018 15:01:49 +0000 (16:01 +0100)]
ARM: dts: dra7: Add supported MMC/SD modes in MMC dt nodes

On DRA7 family SoCs, MMC1 controller supports SDR104,
SDR50, DDR50, SDR25 and SDR12 UHS modes.

MMC2 controller supports HS200 and DDR modes.

MMC3 controller supports SDR12, SDR25 and SDR50 modes.

MMC4 controller supports SDR12 and SDR25 modes.

Add these supported modes in device-tree file.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
6 years agoARM: dts: DRA7: use new dra7-specific compatible string
Kishon Vijay Abraham I [Tue, 30 Jan 2018 15:01:48 +0000 (16:01 +0100)]
ARM: dts: DRA7: use new dra7-specific compatible string

Use the new compatible string "ti,dra7-hsmmc" that was specifically
added for dra7 and dra72. This is required since for dra7 and dra72
processors iodelay values has to be set unlike other processors.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
6 years agoARM: OMAP5: set mmc clock frequency to 192MHz
Kishon Vijay Abraham I [Tue, 30 Jan 2018 15:01:47 +0000 (16:01 +0100)]
ARM: OMAP5: set mmc clock frequency to 192MHz

Now that omap_hsmmc has support for hs200 mode, change the clock
frequency to 192MHz. Also change the REFERENCE CLOCK frequency to
192MHz based on which the internal mmc clock divider is calculated.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
6 years agommc: omap_hsmmc: add signal voltage selection support
Jean-Jacques Hiblot [Tue, 30 Jan 2018 15:01:46 +0000 (16:01 +0100)]
mmc: omap_hsmmc: add signal voltage selection support

I/O data lines of UHS SD card operates at 1.8V when in UHS speed
mode (same is true for eMMC in DDR and HS200 modes). Add support
to switch signal voltage to 1.8V in order to support
UHS cards and eMMC HS200 and DDR modes.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
6 years agommc: omap_hsmmc: allow mmc clock to be gated
Kishon Vijay Abraham I [Tue, 30 Jan 2018 15:01:45 +0000 (16:01 +0100)]
mmc: omap_hsmmc: allow mmc clock to be gated

mmc core has defined a new parameter *clk_disable* to gate the clock.
Disable the clock here if *clk_disable* is set.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
6 years agommc: omap_hsmmc: implement send_init_stream callback
Jean-Jacques Hiblot [Tue, 30 Jan 2018 15:01:44 +0000 (16:01 +0100)]
mmc: omap_hsmmc: implement send_init_stream callback

This callback is used to send the 74 clock cycles after power up.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
6 years agommc: omap_hsmmc: update mmc->clock with the actual bus speed
Jean-Jacques Hiblot [Tue, 30 Jan 2018 15:01:43 +0000 (16:01 +0100)]
mmc: omap_hsmmc: update mmc->clock with the actual bus speed

When the clock is applied, compute the actual value of the clock. It may be
slightly different from the requested value (max freq, divisor threshold)

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
6 years agommc: omap_hsmmc: allow the simple HS modes to use the default pinctrl
Jean-Jacques Hiblot [Tue, 30 Jan 2018 15:01:42 +0000 (16:01 +0100)]
mmc: omap_hsmmc: allow the simple HS modes to use the default pinctrl

The default configuration is usually working fine for the the HS modes.
Don't enforce the presence of a dedicated pinmux for the HS modes.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
6 years agommc: omap_hsmmc: Add support to get pinctrl values and max frequency for different...
Kishon Vijay Abraham I [Tue, 30 Jan 2018 15:01:41 +0000 (16:01 +0100)]
mmc: omap_hsmmc: Add support to get pinctrl values and max frequency for different hw revisions

AM572x SR1.1 requires different IODelay values to be used than that used
in AM572x SR2.0. These values are populated in device tree. Add
capability in omap_hsmmc driver to extract IOdelay values for different
silicon revision. The maximum frequency is also reduced when using a ES1.1.
To keep the ability to boot both revsions with the same dtb, those values
can be provided by the platform code.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
6 years agommc: omap_hsmmc: Add support to set IODELAY values
Kishon Vijay Abraham I [Tue, 30 Jan 2018 15:01:40 +0000 (16:01 +0100)]
mmc: omap_hsmmc: Add support to set IODELAY values

The data manual of J6/J6 Eco recommends to set different IODELAY values
depending on the mode in which the MMC/SD is enumerated in order to
ensure IO timings are met.

Add support to parse mux values and iodelay values from device tree
and set these depending on the enumerated MMC mode.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
6 years agoARM: OMAP5/DRA7: Enable iodelay recalibration to be done from uboot
Kishon Vijay Abraham I [Tue, 30 Jan 2018 15:01:39 +0000 (16:01 +0100)]
ARM: OMAP5/DRA7: Enable iodelay recalibration to be done from uboot

Add a new API to perform iodelay recalibration without isolate
io to be used in uboot.

The data manual of J6/J6 Eco recommends to set different IODELAY values
depending on the mode in which the MMC/SD is enumerated in order to
ensure IO timings are met. The MMC driver can use the new API to
set the IO delay values depending on the MMC mode.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
6 years agommc: omap_hsmmc: use mmc_of_parse to populate mmc_config
Kishon Vijay Abraham I [Tue, 30 Jan 2018 15:01:38 +0000 (16:01 +0100)]
mmc: omap_hsmmc: use mmc_of_parse to populate mmc_config

Use the mmc_of_parse library function to populate mmc_config instead of
repeating the same code in host controller driver.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
6 years agommc: omap_hsmmc: Reduce the max timeout for reset controller fsm
Jean-Jacques Hiblot [Tue, 30 Jan 2018 15:01:37 +0000 (16:01 +0100)]
mmc: omap_hsmmc: Reduce the max timeout for reset controller fsm

>From OMAP3 SoCs (OMAP3, OMAP4, OMAP5, AM572x, AM571x), the DAT/CMD lines
reset procedure section in TRM suggests to first poll the SRD/SRC bit
until it is set to 0x1. But looks like that bit is never set to 1 and there
is an observable delay of 1sec everytime the driver tries to reset DAT/CMD.
(The same is observed in linux kernel).

Reduce the time the driver waits for the controller to set the SRC/SRD bits
to 1 so that there is no observable delay.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
6 years agommc: omap_hsmmc: Workaround for errata id i802
Jean-Jacques Hiblot [Tue, 30 Jan 2018 15:01:36 +0000 (16:01 +0100)]
mmc: omap_hsmmc: Workaround for errata id i802

According to errata i802, DCRC error interrupts
(MMCHS_STAT[21] DCRC=0x1) can occur during the tuning procedure.

The DCRC interrupt, occurs when the last tuning block fails
(the last ratio tested). The delay from CRC check until the
interrupt is asserted is bigger than the delay until assertion
of the tuning end flag. Assertion of tuning end flag is what
masks the interrupts. Because of this race, an erroneous DCRC
interrupt occurs.

The suggested  workaround is to disable DCRC interrupts during
the tuning procedure which is implemented here.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
6 years agommc: omap_hsmmc: Add tuning support
Jean-Jacques Hiblot [Tue, 30 Jan 2018 15:01:35 +0000 (16:01 +0100)]
mmc: omap_hsmmc: Add tuning support

HS200/SDR104 requires tuning command to be sent to the card. Use
the mmc_send_tuning library function to send the tuning
command and configure the internal DLL.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
6 years agommc: omap_hsmmc: Enable DDR mode support
Kishon Vijay Abraham I [Tue, 30 Jan 2018 15:01:34 +0000 (16:01 +0100)]
mmc: omap_hsmmc: Enable DDR mode support

In order to enable DDR mode, Dual Data Rate mode bit has to be set in
MMCHS_CON register. Set it here.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
6 years agommc: omap_hsmmc: set MMC mode in the UHSMS bit field
Jean-Jacques Hiblot [Tue, 30 Jan 2018 15:01:33 +0000 (16:01 +0100)]
mmc: omap_hsmmc: set MMC mode in the UHSMS bit field

Use the timing parameter set in the MMC core to set the
mode in UHSMS  bit field. This is in preparation for
adding HS200 support in omap hsmmc driver.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
6 years agommc: omap_hsmmc: add support to set default io voltage
Kishon Vijay Abraham I [Tue, 30 Jan 2018 15:01:32 +0000 (16:01 +0100)]
mmc: omap_hsmmc: add support to set default io voltage

"ti,dual-volt" is used in linux kernel to set the voltage capabilities.
For host controller dt nodes that doesn't have "ti,dual-volt",
it's assumed 1.8v is the io voltage. This is not always true (like in
the case of beagle-x15 where the io lines are connected to 3.3v).
Hence if "no-1-8-v" property is set, io voltage will be set to 3v.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
6 years agommc: omap_hsmmc: cleanup omap_hsmmc_set_ios
Kishon Vijay Abraham I [Tue, 30 Jan 2018 15:01:31 +0000 (16:01 +0100)]
mmc: omap_hsmmc: cleanup omap_hsmmc_set_ios

No functional change. Move bus width configuration setting to a
separate function and invoke it only if there is a change in the
bus width.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
6 years agommc: omap_hsmmc: cleanup clock configuration
Jean-Jacques Hiblot [Tue, 30 Jan 2018 15:01:30 +0000 (16:01 +0100)]
mmc: omap_hsmmc: cleanup clock configuration

Add a separate function for starting the clock, stopping the clock and
setting the clock. Starting the clock and stopping the clock can
be used irrespective of setting the clock (For example during iodelay
recalibration).
Also set the clock only if there is a change in frequency.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
6 years agommc: use pr_* log functions
Masahiro Yamada [Sun, 28 Jan 2018 10:11:42 +0000 (19:11 +0900)]
mmc: use pr_* log functions

Use pr_* log functions from Linux.  They can be enabled/disabled
via CONFIG_LOGLEVEL.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
6 years agomtd: ubi: Fix worker handling
Richard Weinberger [Thu, 8 Feb 2018 06:29:52 +0000 (07:29 +0100)]
mtd: ubi: Fix worker handling

Fixes a bug found on thuban boards, which were for 2 years in
a long-term test with varying temperatures. They showed
problems in u-boot when attaching the ubi partition:

U-Boot# run flash_self_test
Booting from nand
set A...
UBI: attaching mtd1 to ubi0
UBI: scanning is finished
data abort
pc : [<87f97c3c>]          lr : [<87f97c28>]
reloc pc : [<8012cc3c>]    lr : [<8012cc28>]
sp : 85f686e8  ip : 00000020     fp : 000001f7
r10: 8605ce40  r9 : 85f68ef8     r8 : 0001f000
r7 : 00000001  r6 : 00000006     r5 : 0001f000  r4 : 85f6ecc0
r3 : 00000000  r2 : 44e35000     r1 : 87fcbcd4  r0 : 87fc755b
Flags: nZCv  IRQs off  FIQs on  Mode SVC_32
Resetting CPU ...

Reason is, that accidentially the U-Boot implementation
from __schedule_ubi_work() did not check the flag
ubi->thread_enabled and started with wearleveling work,
but ubi did not have setup all structures at this point
and crashes.

Solve this problem by splitting work scheduling and processing.

Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Heiko Schocher <hs@denx.de>
6 years agoi2c: mvtwsi.c: Fix set speed
Stefan Mavrodiev [Tue, 13 Feb 2018 07:27:40 +0000 (09:27 +0200)]
i2c: mvtwsi.c: Fix set speed

Previous patch for this driver breaks i2c initialization.

commit 8bcf12ccce89 ("i2c: mvtwsi.c: Avoid NULL dereference")

If actual_speed is passed as NULL in this function:
static void __twsi_i2c_init(struct mvtwsi_registers *twsi, int speed,
    int slaveadd, uint *actual_speed)
than __twsi_i2c_set_bus_speed never get called. This causes i2c clock
to run on default speed - 2MHz (measured with oscilloscope). This is issue
on some boards, sunxi for example, since on I2C0 bus PMU is connected.

The bootlogs with and without the patch are as follows:

Wihtout the patch:
U-Boot SPL 2018.03-rc2 (Feb 13 2018 - 09:23:17 +0200)
DRAM: 1024 MiB
Failed to set core voltage! Can't set CPU frequency
Trying to boot from FEL

U-Boot 2018.03-rc2 (Feb 13 2018 - 09:23:17 +0200) Allwinner Technology

CPU:   Allwinner A20 (SUN7I)
Model: Olimex A20-OLinuXino-LIME2
I2C:   ready
DRAM:  1 GiB
MMC:   SUNXI SD/MMC: 0

With the patch:
U-Boot SPL 2018.03-rc2-00001-g838ff85 (Feb 13 2018 - 09:24:34 +0200)
DRAM: 1024 MiB
CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
Trying to boot from FEL

U-Boot 2018.03-rc2-00001-g838ff85 (Feb 13 2018 - 09:24:34 +0200) Allwinner Technology

CPU:   Allwinner A20 (SUN7I)
Model: Olimex A20-OLinuXino-LIME2
I2C:   ready
DRAM:  1 GiB
MMC:   SUNXI SD/MMC: 0

Signed-off-by: Stefan Mavrodiev <stefan@olimex.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
6 years agosandbox: Add 64-bit sandbox
Mario Six [Mon, 12 Feb 2018 07:05:57 +0000 (08:05 +0100)]
sandbox: Add 64-bit sandbox

To debug device tree issues involving 32- and 64-bit platforms, it is useful to
have a generic 64-bit platform available.

Add a version of the sandbox that uses 64-bit integers for its physical
addresses as well as a modified device tree.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Added CONFIG_SYS_TEXT_BASE to configs/sandbox64_defconfig
Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agosandbox: Rename 'num-gpios' property to avoid dtc warning
Simon Glass [Sat, 3 Feb 2018 17:36:59 +0000 (10:36 -0700)]
sandbox: Rename 'num-gpios' property to avoid dtc warning

At present dtc produces these warnings when compiling sandbox:

arch/sandbox/dts/test.dtb: Warning (gpios_property):
Could not get phandle node for /base-gpios:num-gpios(cell 0)
arch/sandbox/dts/test.dtb: Warning (gpios_property):
Missing property '#gpio-cells' in node /reset-ctl or bad phandle
(referred from /extra-gpios:num-gpios[0])

Both are due to it assuming that the 'num-gpios' property holds a phandle
pointing to a GPIO node.

To avoid these warnings, rename the sandbox property so that it does not
include the string 'gpios'.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agosandbox: Correct dtc warning in /chosen node
Simon Glass [Sat, 3 Feb 2018 17:36:58 +0000 (10:36 -0700)]
sandbox: Correct dtc warning in /chosen node

At present dtc produces these warnings when compiling sandbox:

arch/sandbox/dts/test.dtb: Warning (reg_format): "reg" property in /chosen/chosen-test has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1)
arch/sandbox/dts/test.dtb: Warning (avoid_default_addr_size): Relying on default #address-cells value for /chosen/chosen-test
arch/sandbox/dts/test.dtb: Warning (avoid_default_addr_size): Relying on default #size-cells value for /chosen/chosen-test

Add the missing properties to avoid this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: f200680 (dm: core: parse chosen node)

6 years agofdt: Fixup only valid memory banks
Thierry Reding [Tue, 30 Jan 2018 10:34:17 +0000 (11:34 +0100)]
fdt: Fixup only valid memory banks

Memory banks with address 0 and size 0 are empty and should not be
passed to the OS via device tree.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
6 years agofdt: Implement weak arch_fixup_fdt()
Alexey Brodkin [Wed, 24 Jan 2018 17:47:09 +0000 (20:47 +0300)]
fdt: Implement weak arch_fixup_fdt()

Only ARM and in some configs MIPS really implement arch_fixup_fdt().
Others just use the same boilerplate which is not good by itself,
but what's worse if we try to build with disabled CONFIG_CMD_BOOTM
and enabled CONFIG_OF_LIBFDT we'll hit an unknown symbol which was
apparently implemented in arch/xxx/lib/bootm.c.

Now with weak arch_fixup_fdt() right in image-fdt.c where it is
used we get both items highlighted above fixed.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: York Sun <york.sun@nxp.com>
Cc: Stefan Roese <sr@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
6 years agonet: sh_eth: Fix DT base address fetching
Marek Vasut [Fri, 16 Feb 2018 23:57:49 +0000 (00:57 +0100)]
net: sh_eth: Fix DT base address fetching

Drop the whole map/unmap_physmem stuff and just use the address
already obtained from DT in ofdata_to_platdata(), instead of
repeating that, wrongly, in probe.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Joe Hershberger <joe.hershberger@ni.com>
6 years agonet: sh_eth: Fix checkpatch warning
Marek Vasut [Fri, 16 Feb 2018 23:57:49 +0000 (00:57 +0100)]
net: sh_eth: Fix checkpatch warning

Fix minor checkpatch warning about udelay(3000) being too long
and should be replaced by mdelay(3).

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Joe Hershberger <joe.hershberger@ni.com>
6 years agonet: sh_eth: Return directly from sh_eth_recv_start
Marek Vasut [Fri, 16 Feb 2018 23:47:38 +0000 (00:47 +0100)]
net: sh_eth: Return directly from sh_eth_recv_start

Drop the len variable, it's useless.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Joe Hershberger <joe.hershberger@ni.com>
6 years agonet: sh_eth: Zap port variable
Marek Vasut [Fri, 16 Feb 2018 23:46:26 +0000 (00:46 +0100)]
net: sh_eth: Zap port variable

Inline this variable which is quite useless.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Joe Hershberger <joe.hershberger@ni.com>
6 years agoMerge git://git.denx.de/u-boot-sh
Tom Rini [Sat, 17 Feb 2018 21:06:59 +0000 (16:06 -0500)]
Merge git://git.denx.de/u-boot-sh

6 years agoARM: rmobile: Fix broken reset code on Porter
Marek Vasut [Sat, 17 Feb 2018 01:16:48 +0000 (02:16 +0100)]
ARM: rmobile: Fix broken reset code on Porter

The 'reset' command did not work on Porter because the reset code
was accessing the wrong PMIC address over broken I2C bus driver.
Replace the code with DM-aware code and fix up the PMIC address.
This makes the 'reset' command work again.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Replace SH I2C with IIC on Porter
Marek Vasut [Sat, 17 Feb 2018 01:15:08 +0000 (02:15 +0100)]
ARM: rmobile: Replace SH I2C with IIC on Porter

Get rid of the SH I2C driver on Porter and enable the IIC driver
instead . The old SH I2C is completely broken on Porter anyway
and the DM/DT capable IIC driver allows access to the PMIC too.
Use the DM/DT capable driver instead.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: dts: rmobile: Enable I2C6 on Porter
Marek Vasut [Sat, 17 Feb 2018 01:14:09 +0000 (02:14 +0100)]
ARM: dts: rmobile: Enable I2C6 on Porter

Enable I2C6 bus on Porter to access the PMIC , ie. to reset the board.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoi2c: rcar_iic: Allow IIC on RCar Gen2
Marek Vasut [Sat, 17 Feb 2018 01:17:40 +0000 (02:17 +0100)]
i2c: rcar_iic: Allow IIC on RCar Gen2

The IIC on Gen2 is compatible with this driver as well, allow it.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Set FDT/initramfs limits on Porter
Marek Vasut [Sat, 17 Feb 2018 00:21:15 +0000 (01:21 +0100)]
ARM: rmobile: Set FDT/initramfs limits on Porter

Set those limits to inform U-Boot about FDT and initramfs placement.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Enable convenient commands on Porter
Marek Vasut [Sat, 17 Feb 2018 00:19:20 +0000 (01:19 +0100)]
ARM: rmobile: Enable convenient commands on Porter

Enable cache and time commands, which are convenience tools for
doing benchmarks and various boot tests. Also enable FIT support
for booting fitImage.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Reset ethernet PHY
Marek Vasut [Fri, 16 Feb 2018 23:35:23 +0000 (00:35 +0100)]
ARM: rmobile: Reset ethernet PHY

Toggle the PHY reset GPIO to bring the ethernet PHY out of reset properly.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
---
NOTE: This should be moved to the SH ethernet driver, but it's quite
      late in the cycle, so this is something to be done in 2018.05.

6 years agoARM: dts: rmobile: Move the u-boot,dm-pre-reloc into u-boot DTS on porter
Marek Vasut [Fri, 16 Feb 2018 23:31:19 +0000 (00:31 +0100)]
ARM: dts: rmobile: Move the u-boot,dm-pre-reloc into u-boot DTS on porter

Fix ommission where the u-boot,dm-pre-reloc DT bit was pulled into the
common DT, not the U-Boot specific DT part. Move it to U-Boot DT part.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoMerge git://git.denx.de/u-boot-sh
Tom Rini [Fri, 16 Feb 2018 18:56:02 +0000 (13:56 -0500)]
Merge git://git.denx.de/u-boot-sh

6 years agoMerge git://git.denx.de/u-boot-socfpga
Tom Rini [Fri, 16 Feb 2018 18:55:51 +0000 (13:55 -0500)]
Merge git://git.denx.de/u-boot-socfpga

6 years agoMerge git://git.denx.de/u-boot-usb
Tom Rini [Fri, 16 Feb 2018 18:55:41 +0000 (13:55 -0500)]
Merge git://git.denx.de/u-boot-usb

6 years agoenv: restore old env_get_char() behaviour
Goldschmidt Simon [Fri, 9 Feb 2018 20:23:17 +0000 (20:23 +0000)]
env: restore old env_get_char() behaviour

With multiple environments, the 'get_char' callback for env
drivers does not really make sense any more because it is
only supported by two drivers (eeprom and nvram).

To restore single character loading for these drivers,
override 'env_get_char_spec'.

Signed-off-by: Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
6 years agoenv: Fix env_load_location
York Sun [Wed, 7 Feb 2018 22:17:11 +0000 (14:17 -0800)]
env: Fix env_load_location

Commit 7d714a24d725 ("env: Support multiple environments") added
static variable env_load_location. When saving environmental
variables, this variable is presumed to have the value set before.
In case the value was set before relocation and U-Boot runs from a
NOR flash, this variable wasn't writable. This causes failure when
saving the environment. To save this location, global data must be
used instead.

Signed-off-by: York Sun <york.sun@nxp.com>
CC: Maxime Ripard <maxime.ripard@free-electrons.com>
6 years agoARM: rmobile: Enable autocompletion on Gen2
Marek Vasut [Fri, 16 Feb 2018 15:37:46 +0000 (16:37 +0100)]
ARM: rmobile: Enable autocompletion on Gen2

This makes the shell so much more pleasant to use, so enable it.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Convert Porter to SPL
Marek Vasut [Fri, 16 Feb 2018 00:33:27 +0000 (01:33 +0100)]
ARM: rmobile: Convert Porter to SPL

Due to size limitations of the MERAM, switch U-Boot to SPL.
The SPL is loaded by the SPI_LOADER into MERAM and then loads
U-Boot proper into DRAM. This way U-Boot can freely grow in
size in DRAM, as there is plenty of it.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
---
NOTE: To update U-Boot, first install u-boot.img to 0x140000 in SPI NOR,
      then use the Minimon to flash u-boot-spl.srec using ls,2,e6304000.
      To generate u-boot-spl.srec, use objcopy:
        arm-linux-gnueabi-objcopy -O srec spl/u-boot-spl u-boot-spl.srec

6 years agoARM: dts: rmobile: Make PFC and RST available before reloc
Marek Vasut [Fri, 16 Feb 2018 00:33:27 +0000 (01:33 +0100)]
ARM: dts: rmobile: Make PFC and RST available before reloc

Those two nodes are needed to configure pinmux before relocation
and to configure clock before relocation, since CPG/MSSR needs
access to RST node. This is not noticable on Gen3, but on Gen2
this causes problems in SPL if they are not available early.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: dts: rmobile: Make scif0 available before reloc on Porter
Marek Vasut [Fri, 16 Feb 2018 00:33:27 +0000 (01:33 +0100)]
ARM: dts: rmobile: Make scif0 available before reloc on Porter

Make the SCIF available before relocation and in SPL on R8A7791 Porter.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoserial: Replace CONFIG_ with CONFIG_IS_ENABLED
Marek Vasut [Fri, 16 Feb 2018 00:33:27 +0000 (01:33 +0100)]
serial: Replace CONFIG_ with CONFIG_IS_ENABLED

Cosmetic change, replace CONFIG_* with CONFIG_IS_ENABLED(*) .

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Enable autocompletion on Gen3
Marek Vasut [Thu, 15 Feb 2018 12:33:37 +0000 (13:33 +0100)]
ARM: rmobile: Enable autocompletion on Gen3

This makes the shell so much more pleasant to use, so enable it.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Enable DTO support on Gen3
Marek Vasut [Thu, 15 Feb 2018 11:47:23 +0000 (12:47 +0100)]
ARM: rmobile: Enable DTO support on Gen3

Enable support for applying DT overlays on Gen3. This is convenient
for handling extra additional hardware, like ie. the Kingfisher.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agonet: ravb: Initialize PHY in probe() once
Marek Vasut [Tue, 13 Feb 2018 16:21:15 +0000 (17:21 +0100)]
net: ravb: Initialize PHY in probe() once

Reset and initialize the PHY once in the probe() function rather than
doing it over and over again is start() function. This requires us to
keep the clock enabled while the driver is in use. This significantly
reduces the time between transfers as the PHY doesn't have to restart
autonegotiation between transfers, which takes forever.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Joe Hershberger <joe.hershberger@ni.com>
6 years agoclk: rmobile: Assure SD-IF clock are configured correctly
Marek Vasut [Thu, 11 Jan 2018 15:28:31 +0000 (16:28 +0100)]
clk: rmobile: Assure SD-IF clock are configured correctly

The SD driver calls clk_set_rate() before clk_enable(), yet clk_set_rate()
implementation in the clock driver does not set the SD-IF divider. Fix it.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoMerge git://git.denx.de/u-boot-arc
Tom Rini [Thu, 15 Feb 2018 19:07:04 +0000 (14:07 -0500)]
Merge git://git.denx.de/u-boot-arc

6 years agoRPi: Add myself as board maintainer
Alexander Graf [Thu, 15 Feb 2018 14:50:54 +0000 (15:50 +0100)]
RPi: Add myself as board maintainer

Commit 958d55f26ce ("MAINTAINERS: Take over BCM2835 maintainership") put
me in as maintainer for the RPi soc, but forgot to update the board
MAINTAINERS file.

Add me there too.

Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoarm: socfpga: use imply instead of select where applicable
Simon Goldschmidt [Tue, 13 Feb 2018 05:34:14 +0000 (06:34 +0100)]
arm: socfpga: use imply instead of select where applicable

Kconfig should only 'select' features that are required for an arch.
Standard features that can be disabled without breaking board support
should use 'imply' instead, to allow users to disable it.

These options are changed for mach-socfpga:
- DM_SPI & DM_SPI_FLASH: only required with QSPI support enabled
- SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION: the boot rom supports a
  partitionless mode also, where SPL is located at address 0
- HW_WATCHDOG: while all mainline board defconfigs use it, U-Boot
  should still work without it.

Signed-off-by: Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com>
6 years agoConvert socfpga: select CONFIG_HW_WATCHDOG support for ARCH_SOCFPGA
Lukasz Majewski [Tue, 13 Feb 2018 05:34:13 +0000 (06:34 +0100)]
Convert socfpga: select CONFIG_HW_WATCHDOG support for ARCH_SOCFPGA

All Socfpga boards from ./include/configs/socfpga_* define
CONFIG_HW_WATCHDOG.
To ease CONFIG_HW_WATCHDOG conversion to Kconfig select it in
config ARCH_SOCFPGA (arch/arm/Kconfig) section.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com>
6 years agoarm: socfpga: fix qspi flash compatible (add "spi-flash")
Simon Goldschmidt [Mon, 29 Jan 2018 06:36:37 +0000 (07:36 +0100)]
arm: socfpga: fix qspi flash compatible (add "spi-flash")

This patch adds "spi-flash" to the compatible list of the qspi flash
chip for all socfpga boards. This is required to make qspi work on
these boards on top of the recent fixes. Without the "spi-flash"
compatible string for the flash chip, the speed cannot be read and a
speed of 0Hz is used (which results in a divide-by-zero on these
boards).

Signed-off-by: Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com>