]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
8 years agodm: core: Provide uclass_find_device_by_phandle() only when needed
Simon Glass [Sun, 20 Dec 2015 02:38:55 +0000 (19:38 -0700)]
dm: core: Provide uclass_find_device_by_phandle() only when needed

This function cannot be used unless support is enabled for device tree
control. Adjust the code to reflect that.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agoiocon / bamboo: Drop CONFIG_SYS_LONGHELP
Tom Rini [Tue, 19 Jan 2016 18:01:59 +0000 (13:01 -0500)]
iocon / bamboo: Drop CONFIG_SYS_LONGHELP

The iocon and bamboo boards are often on the verge of, or going over,
their allowed size limits depending on toolchain used.  If we turn off
CONFIG_SYS_LONGHELP we can gain approximately 14KiB back.

Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Stefan Roese <sr@denx.de>
Acked-by: Dirk Eibach <dirk.eibach@gdsys.cc>
8 years agostm32: move stm32 specific code to mach-stm32
Vikas Manocha [Sat, 16 Jan 2016 01:49:06 +0000 (17:49 -0800)]
stm32: move stm32 specific code to mach-stm32

This patch moves stm32 sources at one place, with this armv7m now contains
only generic stuff.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
8 years agoudoo:use load instead of fatload
Oscar Curero [Fri, 15 Jan 2016 20:12:24 +0000 (21:12 +0100)]
udoo:use load instead of fatload

That way the FS can also be ext2/3/4

Signed-off-by: Oscar Curero <oscar@naiandei.net>
Acked-by: Fabio Estevam <fabio.estevam@nxp.com>
8 years agoam335x: BeagleBones enable CONFIG_AUTOBOOT_KEYED
robertcnelson@gmail.com [Thu, 14 Jan 2016 18:15:25 +0000 (12:15 -0600)]
am335x: BeagleBones enable CONFIG_AUTOBOOT_KEYED

On startup, the BeagleBone family of boards can occationally halt at
the U-Boot prompt.  Due to U-Boot receiving random data on the usart.

Migrate BeagleBone based boards to use CONFIG_AUTOBOOT_KEYED, user
will now have to enter the <SPACE> key to get to U-Boot prompt

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
CC: Craig McQueen <craig.mcqueen@innerrange.com>
CC: Tom Rini <trini@konsulko.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agopowerpc/83xx: fix build failure
Shengzhou Liu [Thu, 14 Jan 2016 10:45:30 +0000 (18:45 +0800)]
powerpc/83xx: fix build failure

Remove duplicated SDRAM_INTERVAL_BSTOPRE from mpc83xx.h,
which has been defined in fsl_ddr_sdram.h

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
8 years agoigep00x0: Remove no-op macros from config header
Ladislav Michl [Mon, 4 Jan 2016 22:08:02 +0000 (23:08 +0100)]
igep00x0: Remove no-op macros from config header

The patch removes some macros that are not used.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Acked-by: Enric Balletbo Serra <enric.balletbo@collabora.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
8 years agoigep00x0: Fix config header indentation
Ladislav Michl [Mon, 4 Jan 2016 22:08:01 +0000 (23:08 +0100)]
igep00x0: Fix config header indentation

The patch fixes some indentation style problems in omap3_igep00x0.h file.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Acked-by: Enric Balletbo Serra <enric.balletbo@collabora.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
8 years agoigep00x0: Do not include config_distro_defaults.h
Ladislav Michl [Mon, 4 Jan 2016 22:08:00 +0000 (23:08 +0100)]
igep00x0: Do not include config_distro_defaults.h

File is already included:
omap3_igep00x0.h -> ti_omap3_common.h -> ti_armv7_omap.h ->
ti_armv7_common.h -> config_distro_defaults.h

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Acked-by: Enric Balletbo Serra <enric.balletbo@collabora.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
8 years agoigep00x0: Cleanup ethernet support
Ladislav Michl [Mon, 4 Jan 2016 22:07:59 +0000 (23:07 +0100)]
igep00x0: Cleanup ethernet support

- move chip reset to separate function
- use CONFIG_SMC911X_BASE instead of hardcoded value
- remove unneeded local variable from board_eth_init.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Enric Balletbo Serra <enric.balletbo@collabora.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
8 years agoigep00x0: enable CONFIG_NET_RANDOM_ETHADDR
Enric Balletbò i Serra [Mon, 4 Jan 2016 22:07:58 +0000 (23:07 +0100)]
igep00x0: enable CONFIG_NET_RANDOM_ETHADDR

Enable CONFIG_NET_RANDOM_ETHADDR to generate a random MAC address
when ETHADDR is not set.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
8 years agoarmv7: Add missing newline after OMAP die ID
Ladislav Michl [Sun, 3 Jan 2016 17:24:27 +0000 (18:24 +0100)]
armv7: Add missing newline after OMAP die ID

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Acked-by: Enric Balletbo Serra <enric.balletbo@collabora.com>
8 years agoti_omap3_common: Do not define CONFIG_SPL_NAND_SUPPORT
Ladislav Michl [Wed, 30 Dec 2015 01:45:26 +0000 (02:45 +0100)]
ti_omap3_common: Do not define CONFIG_SPL_NAND_SUPPORT

Symbol is already defined in ti_armv7_common.h which is included
via ti_armv7_omap.h

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agokbuild: drop workaround for old style CONFIG_SYS_TEXT_BASE defines
Masahiro Yamada [Fri, 11 Dec 2015 03:22:31 +0000 (12:22 +0900)]
kbuild: drop workaround for old style CONFIG_SYS_TEXT_BASE defines

Now, there is no board defining CONFIG_SYS_TEXT_BASE by its config.mk,
so this workaround is no longer needed.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Stefan Roese <sr@denx.de>
8 years agopowerpc: yucca: drop redundant CONFIG_SYS_TEXT_BASE from config.mk
Masahiro Yamada [Fri, 11 Dec 2015 03:22:30 +0000 (12:22 +0900)]
powerpc: yucca: drop redundant CONFIG_SYS_TEXT_BASE from config.mk

The include/configs/yucca.h already has the same define:
    #define CONFIG_SYS_TEXT_BASE 0xfffb0000

Remove the redundant one from board/amcc/yucca/config.mk.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Stefan Roese <sr@denx.de>
8 years agomips: pb1x00: move CONFIG_SYS_TEXT_BASE away from config.mk
Masahiro Yamada [Fri, 11 Dec 2015 03:22:29 +0000 (12:22 +0900)]
mips: pb1x00: move CONFIG_SYS_TEXT_BASE away from config.mk

We can delete board/pb1x00/config.mk by moving the define of
CONFIG_SYS_TEXT_BASE to somewhere else.  Other MIPS boards are
still defining it in include/config/${BOARD}.h, so I am following
that way here.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
8 years agomips: dbau1x00: move CONFIG_SYS_TEXT_BASE away from config.mk
Masahiro Yamada [Fri, 11 Dec 2015 03:22:28 +0000 (12:22 +0900)]
mips: dbau1x00: move CONFIG_SYS_TEXT_BASE away from config.mk

We can delete board/dbau1x00/config.mk by moving the define of
CONFIG_SYS_TEXT_BASE to somewhere else.  Other MIPS boards are
still defining it in include/config/${BOARD}.h, so I am following
that way here.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
8 years agomips: vct: move CONFIG_SYS_TEXT_BASE away from config.mk
Masahiro Yamada [Fri, 11 Dec 2015 03:22:27 +0000 (12:22 +0900)]
mips: vct: move CONFIG_SYS_TEXT_BASE away from config.mk

We can delete board/micronas/vct/config.mk by moving the define of
CONFIG_SYS_TEXT_BASE to somewhere else.  Other MIPS boards are
still defining it in include/config/${BOARD}.h, so I am following
that way here.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
8 years agomicroblaze: move CONFIG_SYS_TEXT_BASE to defconfig
Masahiro Yamada [Fri, 11 Dec 2015 03:22:26 +0000 (12:22 +0900)]
microblaze: move CONFIG_SYS_TEXT_BASE to defconfig

This is how CONFIG options are defined by Kconfig.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
8 years agom68k: M54418TWR: drop board/freescale/m54418twr/config.mk
Masahiro Yamada [Fri, 11 Dec 2015 03:22:25 +0000 (12:22 +0900)]
m68k: M54418TWR: drop board/freescale/m54418twr/config.mk

The board/freescale/m54418twr/config.mk defined TEXT_BASE, which has
the same value as CONFIG_SYS_TEXT_BASE.  The TEXT_BASE is referenced
by two files:
 - arch/m68k/cpu/mcf5445x/start.S and include/
 - include/configs/M54418TWR.h

Replace the references with CONFIG_SYS_TEXT_BASE and delete
board/freescale/m54418twr/config.mk.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Angelo Dureghello <angelo at sysam.it>
8 years agom68k: move CONFIG_SYS_TEXT_BASE to defconfig files
Masahiro Yamada [Fri, 11 Dec 2015 03:22:24 +0000 (12:22 +0900)]
m68k: move CONFIG_SYS_TEXT_BASE to defconfig files

For historical reason, CONFIG_SYS_TEXT_BASE has been specified
in various ways:

[1] by board/${VENDOR}/${BOARD}/config.mk

[2] by CONFIG_SYS_EXTRA_OPTIONS
    (This was "options" field of boards.cfg before Kconfig conversion)

[3] by include/configs/${BOARD}.h

[4] by configs/${BOARD}_defconfig

Most of M68K boards use either [1] or [2], both of which we want to
deprecate.  Switch them into [4], which is the newest way (Kconfig).

We still allow [3] too, because it is still used by many boards and
we expect much time for conversion.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Angelo Dureghello <angelo at sysam.it>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agospi: ti_qspi: Use 4-byte opcode for mmap read
Vignesh R [Mon, 23 Nov 2015 12:13:36 +0000 (17:43 +0530)]
spi: ti_qspi: Use 4-byte opcode for mmap read

ti-qspi driver currently uses 3-byte addressing mode(and opcodes) for
memory-mapped read. This restricts maximum addressable flash size to
16MB.
Enable the 4-byte addressing(and use 4-byte opcode) for memory-mapped
read to allow access to addresses above 16MB.

Signed-off-by: Ravi Babu <ravibabu@ti.com>
[vigneshr@ti.com: Re-word commit description]
Signed-off-by: Vignesh R <vigneshr@ti.com>
8 years agommc: emmc and hw partitions partition table id bugfix.
Erik Tideman [Mon, 11 Jan 2016 13:39:07 +0000 (13:39 +0000)]
mmc: emmc and hw partitions partition table id bugfix.

On bootup the emmc's hw partition is always set to 0 and the partition
table is read from it. When switching to another hw partition the
partition table's id is not updated but instead the old one from
hw partition 0 is used. If there is no partition table on hw partition 0
then the code will terminate and return error even if the desired hw
partition contains a perfectly fine partition table. This fix updates
the partition table struct to correspond to the specified hw partition
before testing if the partition table is valid or not.

Signed-off-by: Erik Tideman <erik.tideman@faltcom.se>
Reviewed-by: Tom Rini <trini@konsulko.com>
[trini: Squash the patch that corrected whitespace in the original into
this one, wrap with HAVE_BLOCK_DEVICE test]
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoarm, ubifs: fix gcc5.x compiler warning
Heiko Schocher [Mon, 30 Nov 2015 07:47:42 +0000 (08:47 +0100)]
arm, ubifs: fix gcc5.x compiler warning

compiling U-Boot for openrd_base_defconfig with
gcc 5.x shows the following warning:

  CC      fs/ubifs/super.o
In file included from fs/ubifs/ubifs.h:35:0,
                 from fs/ubifs/super.c:37:
fs/ubifs/super.c: In function 'atomic_inc':
./arch/arm/include/asm/atomic.h:55:2: warning: 'flags' is used uninitialized in this function [-Wuninitialized]
  local_irq_save(flags);
  ^
fs/ubifs/super.c: In function 'atomic_dec':
./arch/arm/include/asm/atomic.h:64:2: warning: 'flags' is used uninitialized in this function [-Wuninitialized]
  local_irq_save(flags);
  ^
  CC      fs/ubifs/sb.o
[...]
  CC      fs/ubifs/lpt.o
In file included from include/linux/bitops.h:123:0,
                 from include/common.h:20,
                 from include/ubi_uboot.h:17,
                 from fs/ubifs/ubifs.h:37,
                 from fs/ubifs/lpt.c:35:
fs/ubifs/lpt.c: In function 'test_and_set_bit':
./arch/arm/include/asm/bitops.h:57:2: warning: 'flags' is used uninitialized in this function [-Wuninitialized]
  local_irq_save(flags);
  ^
  CC      fs/ubifs/lpt_commit.o
In file included from include/linux/bitops.h:123:0,
                 from include/common.h:20,
                 from include/ubi_uboot.h:17,
                 from fs/ubifs/ubifs.h:37,
                 from fs/ubifs/lpt_commit.c:26:
fs/ubifs/lpt_commit.c: In function 'test_and_set_bit':
./arch/arm/include/asm/bitops.h:57:2: warning: 'flags' is used uninitialized in this function [-Wuninitialized]
  local_irq_save(flags);
  ^
  CC      fs/ubifs/scan.o
  CC      fs/ubifs/lprops.o
  CC      fs/ubifs/tnc.o
In file included from include/linux/bitops.h:123:0,
                 from include/common.h:20,
                 from include/ubi_uboot.h:17,
                 from fs/ubifs/ubifs.h:37,
                 from fs/ubifs/tnc.c:30:
fs/ubifs/tnc.c: In function 'test_and_set_bit':
./arch/arm/include/asm/bitops.h:57:2: warning: 'flags' is used uninitialized in this function [-Wuninitialized]
  local_irq_save(flags);
  ^
  CC      fs/ubifs/tnc_misc.o

Fix it.

Signed-off-by: Heiko Schocher <hs@denx.de>
8 years agoARM: uniphier: remove unneeded if conditionals
Masahiro Yamada [Tue, 19 Jan 2016 17:05:38 +0000 (02:05 +0900)]
ARM: uniphier: remove unneeded if conditionals

The if block does the same as the else block does.  The conditional
is not necessary at all.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: move UMC register macros to umc-regs.h
Masahiro Yamada [Sun, 17 Jan 2016 06:03:29 +0000 (15:03 +0900)]
ARM: uniphier: move UMC register macros to umc-regs.h

The umc-proxstream2.c defiens the same macros as in umc-regs.h.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: set active ways to really enable outer cache
Masahiro Yamada [Sun, 17 Jan 2016 01:13:19 +0000 (10:13 +0900)]
ARM: uniphier: set active ways to really enable outer cache

Each way must be unlocked to make it effective.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: fix range invalidate for outer cache
Masahiro Yamada [Sun, 17 Jan 2016 01:13:18 +0000 (10:13 +0900)]
ARM: uniphier: fix range invalidate for outer cache

If invalidate operation is invoked against a cache-unaliged region,
the both ends of the region should be flushed, not invalidated.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: factor out outer cache sync as a helper function
Masahiro Yamada [Sun, 17 Jan 2016 01:13:17 +0000 (10:13 +0900)]
ARM: uniphier: factor out outer cache sync as a helper function

Avoid repeating the same code.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: refactor outer cache operation slightly
Masahiro Yamada [Sun, 17 Jan 2016 01:13:16 +0000 (10:13 +0900)]
ARM: uniphier: refactor outer cache operation slightly

Improve readability without changing the behavior.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: add bootm_low environment
Masahiro Yamada [Fri, 8 Jan 2016 17:12:27 +0000 (02:12 +0900)]
ARM: uniphier: add bootm_low environment

The load address of the kernel can be changed via "kernel_addr_r"
environment.  The device tree and the initramdisk should be relocated
according to the kernel location.

The "bootm_low" should be calculated by masking the lower bits
(TEXT_OFFSET part) of the "kernel_addr_r" environment value.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoARM: uniphier: define CONFIG_SYS_BOOTMAPSZ
Masahiro Yamada [Fri, 8 Jan 2016 17:12:26 +0000 (02:12 +0900)]
ARM: uniphier: define CONFIG_SYS_BOOTMAPSZ

U-Boot relocates the device tree and the initramdisk to the tail
of the memory region before booting the kernel.

Some UniPhier boards are equipped with a large amount of memory.
For those boards, the device tree and the initramdisk are placed out
of the the kernel causing a kernel panic.

Add CONFIG_SYS_BOOTMAPSZ to prevent them from going too high.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agoarmv8: cavium: Get DRAM size from ATF
Sergey Temerkhanov [Wed, 14 Oct 2015 16:55:52 +0000 (09:55 -0700)]
armv8: cavium: Get DRAM size from ATF

Change the dram_init() function on ThunderX to query ATF services for
the real installed DRAM size

Signed-off-by: Sergey Temerkhanov <s.temerkhanov@gmail.com>
Signed-off-by: Radha Mohan Chintakuntla <rchintakuntla@cavium.com>
8 years agoarmv8: cavium: Add an implementation of ATF calling functions
Sergey Temerkhanov [Wed, 14 Oct 2015 16:55:51 +0000 (09:55 -0700)]
armv8: cavium: Add an implementation of ATF calling functions

This commit adds functions issuing calls to the product-specific ATF
services

Signed-off-by: Sergey Temerkhanov <s.temerkhanov@gmail.com>
Signed-off-by: Radha Mohan Chintakuntla <rchintakuntla@cavium.com>
8 years agoarmv8: cavium: Add ThunderX 88xx board definition
Sergey Temerkhanov [Wed, 14 Oct 2015 16:55:50 +0000 (09:55 -0700)]
armv8: cavium: Add ThunderX 88xx board definition

This commit adds basic Cavium ThunderX 88xx board definitions and support.

Signed-off-by: Sergey Temerkhanov <s.temerkhanov@gmail.com>
Signed-off-by: Radha Mohan Chintakuntla <rchintakuntla@cavium.com>
[trini: Drop CONFIG_SYS_GENERIC_BOARD define]
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoarmv8: cavium: Add the device tree for ThunderX
Sergey Temerkhanov [Wed, 14 Oct 2015 16:55:49 +0000 (09:55 -0700)]
armv8: cavium: Add the device tree for ThunderX

This commit adds the FDT for the ThunderX family of SoCs

Signed-off-by: Sergey Temerkhanov <s.temerkhanov@gmail.com>
Signed-off-by: Radha Mohan Chintakuntla <rchintakuntla@cavium.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoarmv8: Add psci.h from the Linux kernel
Sergey Temerkhanov [Wed, 14 Oct 2015 16:55:47 +0000 (09:55 -0700)]
armv8: Add psci.h from the Linux kernel

This commit adds the psci.h header file from Linux kernel
which contains definitions related to the PSCI interface provided
by firmware

Signed-off-by: Sergey Temerkhanov <s.temerkhanov@gmail.com>
Signed-off-by: Radha Mohan Chintakuntla <rchintakuntla@cavium.com>
8 years agoarmv8: Add Secure Monitor/Hypervisor Call (SMC/HVC) infrastructure
Sergey Temerkhanov [Wed, 14 Oct 2015 16:55:46 +0000 (09:55 -0700)]
armv8: Add Secure Monitor/Hypervisor Call (SMC/HVC) infrastructure

This commit adds functions issuing calls to secure monitor or
hypervisore. This allows using services such as Power State
Coordination Interface (PSCI) provided by firmware, e.g. ARM
Trusted Firmware (ATF)

The SMC call can destroy all registers declared temporary by the
calling conventions. The clobber list is "x0..x17" because of
this

Signed-off-by: Sergey Temerkhanov <s.temerkhanov@gmail.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Radha Mohan Chintakuntla <rchintakuntla@cavium.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
8 years agoarmv8: New MMU setup code allowing to use 48+ bits PA/VA
Sergey Temerkhanov [Wed, 14 Oct 2015 16:55:45 +0000 (09:55 -0700)]
armv8: New MMU setup code allowing to use 48+ bits PA/VA

This patch adds code which sets up 2-level page tables on ARM64 thus
extending available VA space. CPUs implementing 64k translation
granule are able to use direct PA-VA mapping of the whole 48 bit
address space.
It also adds the ability to reset the SCTRL register at the very beginning
of execution to avoid interference from stale mappings set up by early
firmware/loaders/etc.

Signed-off-by: Sergey Temerkhanov <s.temerkhanov@gmail.com>
Signed-off-by: Radha Mohan Chintakuntla <rchintakuntla@cavium.com>
8 years agoarmv8: Add read_mpidr() function
Sergey Temerkhanov [Wed, 14 Oct 2015 16:55:44 +0000 (09:55 -0700)]
armv8: Add read_mpidr() function

This patch adds the read_mpidr() function which returns the
MPIDR_EL1 register value

Signed-off-by: Sergey Temerkhanov <s.temerkhanov@gmail.com>
Signed-off-by: Radha Mohan Chintakuntla <rchintakuntla@cavium.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoarm: serial: Add Kconfig entries to facilitate usage of the pl01x driver for early...
Sergey Temerkhanov [Wed, 14 Oct 2015 16:54:24 +0000 (09:54 -0700)]
arm: serial: Add Kconfig entries to facilitate usage of the pl01x driver for early debug output

This patch adds Kconfig entries to facilitate usage of pl01x as
a debug UART.

Signed-off-by: Sergey Temerkhanov <s.temerkhanov@gmail.com>
Signed-off-by: Radha Mohan Chintakuntla <rchintakuntla@cavium.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agoarm: serial: Add debug UART capability to the pl01x driver
Sergey Temerkhanov [Wed, 14 Oct 2015 16:54:23 +0000 (09:54 -0700)]
arm: serial: Add debug UART capability to the pl01x driver

This patch adds an ability to use pl01x as a debug UART. It must
be configured like other types of debug UARTs

Signed-off-by: Sergey Temerkhanov <s.temerkhanov@gmail.com>
Signed-off-by: Radha Mohan Chintakuntla <rchintakuntla@cavium.com>
[trini: Update for _debug_uart_init change]
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-video
Tom Rini [Tue, 19 Jan 2016 13:32:38 +0000 (08:32 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-video

8 years agox86: quark: Fix boot breakage
Bin Meng [Mon, 18 Jan 2016 15:29:32 +0000 (07:29 -0800)]
x86: quark: Fix boot breakage

With driver model timer conversion, quark based board does not boot
any more as mdelay() is called during quark_pcie_early_init() which
is before driver model gets initialized. Fix this breakage.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agopower: regulator: max77686: Don't use switch() on bools
Tom Rini [Sun, 17 Jan 2016 02:44:37 +0000 (02:44 +0000)]
power: regulator: max77686: Don't use switch() on bools

With gcc-5.3 we get a warning for using switch() on a bool type.
Rewrite these sections as if/else and update the one section that was
using 1/0 instead of true/false.

Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
8 years agospi: rk_spi: Fix debug format warning
Tom Rini [Sun, 17 Jan 2016 02:42:41 +0000 (02:42 +0000)]
spi: rk_spi: Fix debug format warning

We need to use %lx not %x to describe a fdt_addr_t

Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agopci_rom.c: Fix may be used uninitialized warning
Tom Rini [Sat, 16 Jan 2016 14:50:26 +0000 (14:50 +0000)]
pci_rom.c: Fix may be used uninitialized warning

With gcc-5.x we get:
drivers/pci/pci_rom.c: In function 'dm_pci_run_vga_bios':
drivers/pci/pci_rom.c:352:3: warning: 'ram' may be used uninitialized in
this function [-Wmaybe-uninitialized]

While unconvinced that this can happen in practice (if we malloc we set
alloced to true, it will be false otherwise), silence the compiler.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoAdd more SPDX-License-Identifier tags
Tom Rini [Fri, 15 Jan 2016 03:05:13 +0000 (22:05 -0500)]
Add more SPDX-License-Identifier tags

In a number of places we had wordings of the GPL (or LGPL in a few
cases) license text that were split in such a way that it wasn't caught
previously.  Convert all of these to the correct SPDX-License-Identifier
tag.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoscripts/Makefile* Add SPDX-License-Identifier tag
Tom Rini [Thu, 14 Jan 2016 23:24:44 +0000 (18:24 -0500)]
scripts/Makefile* Add SPDX-License-Identifier tag

A general best practice for SPDX is that Makefiles should have an
identifier, add these as everything else is currently covered.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agogunzip.c: Only include gzwrite on CONFIG_CMD_UNZIP
Tom Rini [Thu, 14 Jan 2016 18:02:05 +0000 (13:02 -0500)]
gunzip.c: Only include gzwrite on CONFIG_CMD_UNZIP

Only when we have CONFIG_CMD_UNZIP enabled do we have the 'gzwrite'
command.  While this command should be separated from CONFIG_CMD_UNZIP
we should also only include the write portion of the gz code in that
case as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoaxm/taurus: Enable tiny printf in SPL
Tom Rini [Thu, 14 Jan 2016 18:02:04 +0000 (13:02 -0500)]
axm/taurus: Enable tiny printf in SPL

Both of these boards are very close to their limit and with some toolchains
such as gcc 5.x are too large.  Switch to tiny printf to reclaim some size.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agovsprintf.c: Always enable CONFIG_SYS_VSNPRINTF
Tom Rini [Thu, 14 Jan 2016 18:02:03 +0000 (13:02 -0500)]
vsprintf.c: Always enable CONFIG_SYS_VSNPRINTF

Enabling this function always removes some class of string saftey issues.
The size change here in general is about 400 bytes and this seems a reasonable
trade-off.

Cc: Peng Fan <peng.fan@nxp.com>
Cc: Peter Robinson <pbrobinson@gmail.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Adrian Alonso <aalonso@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoimage: fix getenv_bootm_size() function
Masahiro Yamada [Fri, 18 Dec 2015 05:17:10 +0000 (14:17 +0900)]
image: fix getenv_bootm_size() function

Currently, this function returns wrong size if "bootm_low" is defined,
but "bootm_size" is not.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-mips
Tom Rini [Sun, 17 Jan 2016 02:45:31 +0000 (21:45 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-mips

8 years agoMIPS: implement bit manipulating I/O accessors
Daniel Schwierzeck [Fri, 15 Jan 2016 14:54:48 +0000 (15:54 +0100)]
MIPS: implement bit manipulating I/O accessors

Add support for functions clrbits_X(), setbits_X() and clrsetbits_X()
on MIPS.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
8 years agoMIPS: fix SPDX license identifier in remaining arch header files
Daniel Schwierzeck [Tue, 12 Jan 2016 20:48:27 +0000 (21:48 +0100)]
MIPS: fix SPDX license identifier in remaining arch header files

Add a SPDX license identifier to MIPS header files where it is
still missing.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
8 years agoMIPS: sync processor and register definitions with linux-4.4
Daniel Schwierzeck [Tue, 12 Jan 2016 20:48:26 +0000 (21:48 +0100)]
MIPS: sync processor and register definitions with linux-4.4

Update definitions for processor, registers as well as assemby
macros.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
8 years agoMIPS: sync I/O related header files with linux-4.4
Daniel Schwierzeck [Tue, 12 Jan 2016 20:48:25 +0000 (21:48 +0100)]
MIPS: sync I/O related header files with linux-4.4

Mainly sync asm/io.h to get a working ioremap() implementation
as well as the full set of I/O accessors. Pull in additional
header files to make this work.

Furthermore port over the directory 'arch/mips/include/asm/mach-generic/'
with contains default definitions for I/O and memory spaces and default
implementations for mapping those spaces. All files in that directory
can be overwritten by a SoC/machine.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
8 years agonet: pcnet: refactor mapping of virtual addresses to physical ones
Daniel Schwierzeck [Tue, 12 Jan 2016 20:48:24 +0000 (21:48 +0100)]
net: pcnet: refactor mapping of virtual addresses to physical ones

pci_virt_to_mem() uses virt_to_phys() to get the physical address.
But pci_virt_to_mem() is also called with uncached addresses which
is wrong according to the documentation of virt_to_phys().

Refactor the PCI_TO_MEM() macro to optionally map an uncached address
back to a cached one before calling pci_virt_to_mem().

Currently pcnet works because virt_to_phys() is incorrectly implemented
on MIPS. With the upcoming asm header file update for MIPS, the
virt_to_phys() implementation will be fixed. Thus this patch is needed
to keep pcnet working on MIPS Malta board.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
8 years agoMIPS: kconfig: add option for MIPS_L1_CACHE_SHIFT
Daniel Schwierzeck [Sat, 9 Jan 2016 16:32:50 +0000 (17:32 +0100)]
MIPS: kconfig: add option for MIPS_L1_CACHE_SHIFT

Add Kconfig symbol for L1 cache shift like the kernel does.
The value of CONFIG_SYS_CACHELINE_SIZE is not a reliable source
for ARCH_DMA_MINALIGN anymore, because it is optional on MIPS.
If CONFIG_SYS_CACHELINE_SIZE is not defined by a board, the
cache sizes are automatically detected and ARCH_DMA_MINALIGN
would be set to 128 Bytes.

The default value for CONFIG_MIPS_L1_CACHE_SHIFT is 5 which
corresponds to 32 Bytes. All current MIPS boards already used
that value. While on it, fix the Malta board to use a value of 6
like the kernel port does.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
8 years agoMIPS: vct: fix I/O accessor calls
Daniel Schwierzeck [Sat, 9 Jan 2016 16:32:46 +0000 (17:32 +0100)]
MIPS: vct: fix I/O accessor calls

Use void pointers as address argument for readl( and writel()).
This is required for the upcoming MIPS asm header file and I/O
accessor update.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
8 years agoMIPS: malta: fix IO accessor call
Daniel Schwierzeck [Sat, 9 Jan 2016 16:32:45 +0000 (17:32 +0100)]
MIPS: malta: fix IO accessor call

Use void pointer as address argument for readl(). This is required
for the upcoming MIPS asm header file and I/O accessor update.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
8 years agoMIPS: malta: do not pull in target header files in config.h
Daniel Schwierzeck [Sat, 9 Jan 2016 16:32:44 +0000 (17:32 +0100)]
MIPS: malta: do not pull in target header files in config.h

config.h is used in target and host code and therefore should not
pull in target header files to avoid compile errors. This change
is also required for the MIPS header file sync done in follow-up
patches.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
8 years agoMIPS: Kconfig: optimize gcc -march and -mtune setup
Daniel Schwierzeck [Sat, 26 Dec 2015 18:55:37 +0000 (19:55 +0100)]
MIPS: Kconfig: optimize gcc -march and -mtune setup

Move setup of -march to arch/mips/Makefile and follow the design on ARM.
Also add a possibility to chose specific CPU tune options.

Signed-off-by: Wills Wang <wills.wang@live.com>
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
8 years agoMIPS: au1x00: move SoC header files to arch/mips/mach-au1x00/include/mach/
Daniel Schwierzeck [Mon, 21 Dec 2015 15:35:14 +0000 (16:35 +0100)]
MIPS: au1x00: move SoC header files to arch/mips/mach-au1x00/include/mach/

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
8 years agoMIPS: Kconfig: refactor machine setup
Daniel Schwierzeck [Mon, 21 Dec 2015 15:35:13 +0000 (16:35 +0100)]
MIPS: Kconfig: refactor machine setup

Refactor machine setup like it is done on ARM. While on it,
also support "include <mach/file.h" for machine specific
header files.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
8 years agoMIPS: add initial infrastructure for device-tree files
Daniel Schwierzeck [Sat, 19 Dec 2015 19:20:48 +0000 (20:20 +0100)]
MIPS: add initial infrastructure for device-tree files

Prepare sub-folder for device-tree files. Make support for
device-tree on MIPS available in Kbuild/Kconfig.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com>
8 years agoMIPS: do not build position-independent executables for SPL
Daniel Schwierzeck [Sat, 19 Dec 2015 19:20:47 +0000 (20:20 +0100)]
MIPS: do not build position-independent executables for SPL

SPL binaries are usually linked to a fixed address in SRAM.
Furthermore SPL binaries do not need to relocate itself. Thus
do not build them as position-independent binaries which helps
to largely reduce the size of SPL binaries.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
8 years agoMIPS: create .text sub-sections for assembler functions
Daniel Schwierzeck [Sat, 19 Dec 2015 19:20:46 +0000 (20:20 +0100)]
MIPS: create .text sub-sections for assembler functions

Put all functions coded in assembly in sub-sections of
section .text. This allows the linker to garbage collect
unused assembly functions too.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
8 years agoMIPS: fix annotation of _start and relocate_code
Daniel Schwierzeck [Sat, 19 Dec 2015 19:20:45 +0000 (20:20 +0100)]
MIPS: fix annotation of _start and relocate_code

Correctly annotate _start and relocate_code as functions to
produce more readable disassembly code generated by objdump.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
8 years agoMIPS: add asm/gpio.h to fix compilation error with CONFIG_CMD_GPIO.
Purna Chandra Mandal [Thu, 17 Dec 2015 17:31:31 +0000 (23:01 +0530)]
MIPS: add asm/gpio.h to fix compilation error with CONFIG_CMD_GPIO.

With CONFIG_CMD_GPIO compilation reports error.
common/cmd_gpio.c:13:22: fatal error: asm/gpio.h: No such file or directory
 #include <asm/gpio.h>
                      ^
Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com>
Reviewed-by: Chin Liang See <clsee@altera.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-socfpga
Tom Rini [Sat, 16 Jan 2016 13:30:49 +0000 (08:30 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-socfpga

8 years agosocfpga: Modify qts-filter args to allow input for bsp generated files and quartus...
Dalon Westergreen [Tue, 12 Jan 2016 02:20:43 +0000 (18:20 -0800)]
socfpga: Modify qts-filter args to allow input for bsp generated files and quartus project directories

The hps_isw_handoff and bsp/generated folders are typically not in the same
path.This patch adds support for specifying the different input directories for
the bsp and quartus projects.

Signed-off-by: Dalon Westergreen <dwesterg@gmail.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Chin Liang See <clsee@altera.com>
8 years agoarm: socfpga: set the fpga global bit to disable HPS to FPGA signals
Dinh Nguyen [Wed, 6 Jan 2016 19:48:43 +0000 (13:48 -0600)]
arm: socfpga: set the fpga global bit to disable HPS to FPGA signals

We should be setting the FPGA Interface Group global bit that will correctly
disable all interfaces between the FPGA and HPS.

Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
8 years agoddr: altera: Init the rule ID in debug code
Marek Vasut [Tue, 29 Dec 2015 08:38:52 +0000 (09:38 +0100)]
ddr: altera: Init the rule ID in debug code

Init the rule ID, otherwise the debug code will always dump the
protection settings entry 0.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Dinh Nguyen <dinh.linux@gmail.com>
8 years agocommon: usb: fix checking condition
Peng Fan [Tue, 12 Jan 2016 07:57:01 +0000 (15:57 +0800)]
common: usb: fix checking condition

We support max USB_MAXENDPOINTS, so need to use
"epno >= USB_MAXENDPOINTS", but not "epno > USB_MAXENDPOINTS".
If use ">", we may exceeds the array of if_desc->ep_desc.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Paul Kocialkowski <contact@paulk.fr>
Cc: "Stefan Brüns" <stefan.bruens@rwth-aachen.de>
Cc: Vincent Palatin <vpalatin@chromium.org>
8 years agousb: host: ehci-vf: Implement board_usb_phy_mode weak function
Sanchayan Maity [Mon, 26 Oct 2015 12:58:50 +0000 (18:28 +0530)]
usb: host: ehci-vf: Implement board_usb_phy_mode weak function

Add board_usb_phy_mode weak function on similar lines to ehci-mx6.
However since Vybrid USB does not have a true OTG, make this weak
functon just return 0. The function is supposed to be implemented
by the individual boards using a GPIO for providing the OTG pin
functionality.

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
8 years agousb: host: ehci-vf: Remove hardcoded USB host client configuration
Sanchayan Maity [Mon, 26 Oct 2015 12:58:49 +0000 (18:28 +0530)]
usb: host: ehci-vf: Remove hardcoded USB host client configuration

The current ehci-vf USB driver for Vybrid hardcodes the USB host
and client functionality. Remove this.

Reported-by: Santhosh Kumar Janardhanam <santhosh.kj@hcl.com>
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
8 years agousb:ci_udc: Remove ULPI setting for i.MX OTG controller
Ye.Li [Thu, 31 Dec 2015 07:24:45 +0000 (15:24 +0800)]
usb:ci_udc: Remove ULPI setting for i.MX OTG controller

All the i.MX6, i.MX23 and i.MX28 OTG controllers only support UTMI
interface. Set to ULPI is not correct, even the controller will
reject this setting in PORTSC register.

Signed-off-by: Ye.Li <B37916@freescale.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
8 years agoMerge git://git.denx.de/u-boot-rockchip
Tom Rini [Fri, 15 Jan 2016 13:11:15 +0000 (08:11 -0500)]
Merge git://git.denx.de/u-boot-rockchip

8 years agoeth-raw-os.c: Add cast to bind(2) call
Tom Rini [Sat, 28 Nov 2015 13:04:40 +0000 (08:04 -0500)]
eth-raw-os.c: Add cast to bind(2) call

With more recent gcc versions we otherwise get an error like:
note: expected 'const struct sockaddr *' but argument is of type
'struct sockaddr_in *'

and the common solution here is to cast, rather than re-work the code.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agox86: Fix board init breakage
Simon Glass [Fri, 15 Jan 2016 12:23:23 +0000 (05:23 -0700)]
x86: Fix board init breakage

Commit ecc30663 ("Fix board init code to respect the C runtime environment")
breaks x86. This was mentioned on https://patchwork.ozlabs.org/patch/548644
but not addressed. Correct it so that x86 boards boot again.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agodm: pci: Avoid a memory leak when allocating the ROM
Simon Glass [Fri, 15 Jan 2016 12:23:22 +0000 (05:23 -0700)]
dm: pci: Avoid a memory leak when allocating the ROM

Adjust pci_rom_load() to return an indication of whether it allocated
memory or not. Adjust the caller to free it. This fixes a memory leak
when PCI_VGA_RAM_IMAGE_START is not used.

Reported-by: Coverity (CID: 134194)
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agodm: pci: Add a 'fall through' comment
Simon Glass [Fri, 15 Jan 2016 12:23:21 +0000 (05:23 -0700)]
dm: pci: Add a 'fall through' comment

For this class it is intended to set up the PCI device, so add a comment to
indicate this. This avoids a coverity warning.

Reported-by: Coverity (CID: 134194)
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agodm: spi_flash: Allow the uclass to work without printf()
Simon Glass [Tue, 29 Dec 2015 12:22:47 +0000 (05:22 -0700)]
dm: spi_flash: Allow the uclass to work without printf()

For SPL we don't really need sprintf() and with tiny-printf this is not
available. Allow this to be dropped in SPL when using tiny-printf.

Signed-off-by: Simon Glass <sjg@chromium.org>
8 years agommc: rockchip: the non-removable property must point to emmc
huang lin [Fri, 8 Jan 2016 06:06:49 +0000 (14:06 +0800)]
mmc: rockchip: the non-removable property must point to emmc

the non-removable property point to sdcard before, it is wrong,
it must point to emmc, correct it.

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
8 years agoMAINTAINERS: add entry for Rockchip
Masahiro Yamada [Tue, 5 Jan 2016 01:47:10 +0000 (10:47 +0900)]
MAINTAINERS: add entry for Rockchip

Rockchip has its own git repository maintained by Simon.
Document this.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agoFix GCC format-security errors and convert sprintfs.
Ben Whitten [Wed, 30 Dec 2015 13:05:58 +0000 (13:05 +0000)]
Fix GCC format-security errors and convert sprintfs.

With format-security errors turned on, GCC picks up the use of sprintf with
a format parameter not being a string literal.

Simple uses of sprintf are also converted to use strcpy.

Signed-off-by: Ben Whitten <ben.whitten@gmail.com>
Acked-by: Wolfgang Denk <wd@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-x86
Tom Rini [Fri, 15 Jan 2016 02:51:32 +0000 (21:51 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-x86

8 years agoarm: initialize gd for AArch64
Stephen Warren [Thu, 14 Jan 2016 21:03:11 +0000 (14:03 -0700)]
arm: initialize gd for AArch64

Commit adc421e4cee8 "arm: move gd handling outside of C code" removed
the call to arch_setup_gd() on ARM and replaced it with assembly code
in crt0.S. However, AArch64 uses a different startup file, and the same
change was not made to it. This leaves gd uninitialized on AArch64, which
typically leads to hangs or crashes. This change fixes that.

Fixes: adc421e4cee8 ("arm: move gd handling outside of C code")
Signed-off-by: Stephen Warren <swarren@nvidia.com>
8 years agoMerge git://www.denx.de/git/u-boot-marvell
Tom Rini [Thu, 14 Jan 2016 16:23:05 +0000 (11:23 -0500)]
Merge git://www.denx.de/git/u-boot-marvell

Conflicts:
arch/arm/Kconfig

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoMAINTAINERS: Update Marvell custodianship
Stefan Roese [Thu, 14 Jan 2016 04:00:00 +0000 (05:00 +0100)]
MAINTAINERS: Update Marvell custodianship

Add myself as custodian for the Marvell git repository. Additionally,
add the mach-mvebu directory to the list of files / directories. And
add Armada XP & Armada 38x to the title (not only kirkwood).

Signed-off-by: Stefan Roese <sr@denx.de>
Acked-by: Tom Rini <trini@konsulko.com>
Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
Acked-by: Luka Perkov <luka.perkov@sartura.hr>
8 years agomvebu: ds414: Implement Synology specific command set
Phil Sutter [Fri, 25 Dec 2015 13:41:26 +0000 (14:41 +0100)]
mvebu: ds414: Implement Synology specific command set

Synology keeps per item configuration in a dedicated 'partition' in SPI
flash, namely the one named 'vendor' in DTS file. It contains the two
NICs MAC addresses as well as the item's serial number. I didn't find a
way to have this information extracted automatically, therefore
implemented 'syno populate_env' command which extracts the three values
and puts them into environment. To make things permanent though, one has
to 'saveenv'.

Another command is 'syno clk_gate', which allows to change the clock
gating which is done in DS414 board file.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: Stefan Roese <sr@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agomvebu: Support Synology DS414
Phil Sutter [Fri, 25 Dec 2015 13:41:25 +0000 (14:41 +0100)]
mvebu: Support Synology DS414

This adds support for the MV78230 based DS414 NAS by Synology. The
relevant bits have been extracted from the 'synogpl-5004-armadaxp'
package Synology kindly published, garnished with a fair amount of
trial-and-error.

Sadly, support is far from perfect. The major parts I have failed in
are SATA and XHCI support. Details about these and some other things
follow:

Device Tree
-----------

The device tree file armada-xp-synology-ds414.dts has been copied from
Linux and enhanced by recent U-Boot specific changes to
armada-xp-gp.dts.

SATA Support
------------

There is a Marvell 88SX7042 controller attached to PCIe which is
supported by Linux's sata_mv driver but sadly not U-Boot's sata_mv.
I'm not sure if extending the latter to support PCI devices is worth the
effort at all. Porting sata_mv from Linux exceeded my brain's
capacities. :(

XHCI Support
------------

There is an EtronTech EJ168A XHCI controller attached to PCIe which
drives the two rear USB3 ports. After a bit of playing around I managed
to get it recognized by xhci-pci, but never was able to access any
devices attached to it. Enabling it in ds414 board config shows that it
does not respond to commands for whatever reason. The (somewhat) bright
side to it is that it is not even supported in Synology's customized
U-Boot, but that also means nowhere to steal the relevant bits from.

EHCI Support
------------

This seems functional after issuing 'usb start'. At least it detects USB
storage devices, and IIRC reading from them was OK. OTOH Linux fails to
register the controller if 'usb start' wasn't given before in U-Boot.

According to Synology sources, this board seems to support USB device
(gadget?) mode. Though I didn't play around with it.

PCIe Support
------------

This is fine, but trying to gate the clocks of unused lanes will hang
PCI enum. In addition to that, pci_mvebu seems not to support DM_PCI.

DDR3 Training
-------------

Marvell/Synology uses eight PUPs instead of four. Does not look like
this is meant to be customized in mainline U-Boot at all. OTOH I have
no idea what a "PUP" actually is.

PEX Init
--------

Synology uses different values than mainline U-Boot with this patch:
pex_max_unit_get returns 2, pex_max_if_get returns 7 and
max_serdes_lines is set to 7. Not changing this seems to not have an
impact, although I'm not entirely sure it does not cause issues I am not
aware of.

Static Environment
------------------

This allows to boot stock Synology firmware at least. In order to be a
little more flexible when it comes to booting custom kernels, do not
only load zImage partition, but also rd.gz into memory. This way it is
possible to use about 7MB for kernel with piggyback initramfs.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: Stefan Roese <sr@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agomvebu: Add rudimental MV78230 support
Phil Sutter [Fri, 25 Dec 2015 13:41:24 +0000 (14:41 +0100)]
mvebu: Add rudimental MV78230 support

This adds basic support for Marvell's MV78230 SoC which belongs to the
Armada XP series.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: Stefan Roese <sr@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agomvebu: axp: Rename MV_DDR_32BIT to CONFIG_DDR_32BIT
Phil Sutter [Fri, 25 Dec 2015 13:41:23 +0000 (14:41 +0100)]
mvebu: axp: Rename MV_DDR_32BIT to CONFIG_DDR_32BIT

This should make it clear that this symbol is meant to be defined by
board headers.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: Stefan Roese <sr@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agomvebu: Introduce kconfig symbols for SoC variants
Phil Sutter [Fri, 25 Dec 2015 13:41:22 +0000 (14:41 +0100)]
mvebu: Introduce kconfig symbols for SoC variants

This patch adds intermediate kconfig symbols which select their SoC
family. Boards then select them instead of the family symbol directly.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: Stefan Roese <sr@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agomvebu: axp: refactor board_sat_r_get() and caller
Phil Sutter [Fri, 25 Dec 2015 13:41:21 +0000 (14:41 +0100)]
mvebu: axp: refactor board_sat_r_get() and caller

Instead of calling board_sat_r_get() only for those boards providing the
satr11 value via I2C, call it for all boards and return static values
for those not using I2C.

In addition to that, make this a weak function to allow for board code
to override it.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: Stefan Roese <sr@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agodrivers/pci/pci_mvebu: Fix for boards with X4 lanes
Phil Sutter [Fri, 25 Dec 2015 13:41:20 +0000 (14:41 +0100)]
drivers/pci/pci_mvebu: Fix for boards with X4 lanes

Armada XP has support for X4 lanes, boards specify this in their
serdes_cfg. During PEX init in high_speed_env_lib.c, the configuration
is stored in GEN_PURP_RES_2_REG.

When enumerating PEX, subsequent interfaces of an X4 lane must be
skipped. Otherwise the enumeration hangs up the board.

The way this is implemented here is not exactly beautiful, but it mimics
how Marvell's BSP does it. Alternatively we could get the information
using board_serdes_cfg_get(), but that won't lead to clean code, either.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: Stefan Roese <sr@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoaxp: Fix debugging support in DDR3 write leveling
Phil Sutter [Fri, 25 Dec 2015 13:41:19 +0000 (14:41 +0100)]
axp: Fix debugging support in DDR3 write leveling

If MV_DEBUG_WL is defined, DEBUG_WL_S and DEBUG_WL_D macros are missing.
In addition to that, get rid of debug output printing non-existent
counter variable.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: Stefan Roese <sr@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>