]> git.sur5r.net Git - u-boot/log
u-boot
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>
8 years agoREADME: Review the u-boot porting guide list
Phil Sutter [Fri, 25 Dec 2015 13:41:18 +0000 (14:41 +0100)]
README: Review the u-boot porting guide list

* There is no boards.cfg anymore, so drop (1).
* Creating flash.c and u-boot.lds seems not mandatory as well.
* Adjusting the enumerators for the above implicitly fixed for
  double items numbered (3).

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: Fix for debug builds without CONFIG_PCI_ENUM_ONLY
Phil Sutter [Fri, 25 Dec 2015 13:41:17 +0000 (14:41 +0100)]
drivers/pci: Fix for debug builds without CONFIG_PCI_ENUM_ONLY

The debug printing references bar_res, which exists only if
CONFIG_PCI_ENUM_ONLY is not defined. Therefore move it into the ifdef'd
area.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: Stefan Roese <sr@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
8 years agoarm: mvebu: Add runtime detection of UART (xmodem) boot-mode
Stefan Roese [Thu, 7 Jan 2016 13:12:04 +0000 (14:12 +0100)]
arm: mvebu: Add runtime detection of UART (xmodem) boot-mode

This patch adds runtime detection of the Marvell UART boot-mode (xmodem
protocol). If this boot-mode is detected, SPL will return to the
BootROM to continue the UART booting.

With this patch its now possible, to generate a U-Boot image that
can be booted either from the strapped boot-device (e.g. SPI NOR, MMC,
etc) or via the xmodem protocol from the UART. In the UART case,
the kwboot tool will dynamically insert the UART boot-device type
into the image. And also patch the load address in the header, so
that the mkimage header will be skipped (as its not expected by the
Marvell BootROM).

This simplifies the development for Armada XP / 38x based boards.
As no special images need to be generated by selecting the
MVEBU_BOOTROM_UARTBOOT Kconfig option.

Since the Kconfig option MVEBU_BOOTROM_UARTBOOT is not needed any
more, its now completely removed.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Cc: Dirk Eibach <dirk.eibach@gdsys.cc>
Cc: Phil Sutter <phil@nwl.cc>
Cc: Kevin Smith <kevin.smith@elecsyscorp.com>
8 years agoarm: mvebu: Add runtime boot-device detection
Stefan Roese [Thu, 7 Jan 2016 13:09:09 +0000 (14:09 +0100)]
arm: mvebu: Add runtime boot-device detection

This patch adds runtime boot-device detection to SPL U-Boot.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Cc: Dirk Eibach <dirk.eibach@gdsys.cc>
Cc: Phil Sutter <phil@nwl.cc>
Cc: Kevin Smith <kevin.smith@elecsyscorp.com>
8 years agoarm: mvebu: Make local structs static const
Stefan Roese [Thu, 7 Jan 2016 13:04:51 +0000 (14:04 +0100)]
arm: mvebu: Make local structs static const

As these structs are local only and const, declare them accordingly.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Cc: Dirk Eibach <dirk.eibach@gdsys.cc>
Cc: Phil Sutter <phil@nwl.cc>
Cc: Kevin Smith <kevin.smith@elecsyscorp.com>
8 years agoarm: mvebu: Move SAR register defines into header
Stefan Roese [Thu, 7 Jan 2016 13:03:11 +0000 (14:03 +0100)]
arm: mvebu: Move SAR register defines into header

This is preparation for the runtime bootmode detection in spl.c.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Cc: Dirk Eibach <dirk.eibach@gdsys.cc>
Cc: Phil Sutter <phil@nwl.cc>
Cc: Kevin Smith <kevin.smith@elecsyscorp.com>
8 years agoarm: mvebu: Remove leftover Makefile
Stefan Roese [Mon, 21 Dec 2015 13:30:30 +0000 (14:30 +0100)]
arm: mvebu: Remove leftover Makefile

This Makefile was not used since quite some time. I only missed to
remove it in the move to mach-mvebu. So lets remove it now so
that the mvebu-common directory is really removed completely.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
8 years agoarm: mvebu: Move SoC selection (A38X vs AXP) into Kconfig
Stefan Roese [Mon, 21 Dec 2015 12:56:33 +0000 (13:56 +0100)]
arm: mvebu: Move SoC selection (A38X vs AXP) into Kconfig

Until now, the SoC selection for the ARCH_MVEBU platforms has been done
in the config header. Using CONFIG_ARMADA_XP in a non-clear way. As
it needed to get selected for AXP and A38x based boards. This patch
now changes this to move the SoC selection to Kconfig. And also
uses CONFIG_ARCH_MVEBU as a common define for both AXP and A38x.
This makes things a bit clearer - especially for new board additions.

Additionally the defines CONFIG_SYS_MVEBU_DDR_AXP and
CONFIG_SYS_MVEBU_DDR_A38X are replaced with the already available
CONFIG_ARMADA_38X and CONFIG_ARMADA_XP.

And CONFIG_DDR3 is removed, as its not referenced anywhere.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
8 years agoarm: mvebu: Consolidate board Kconfig options into one file
Stefan Roese [Mon, 21 Dec 2015 12:40:37 +0000 (13:40 +0100)]
arm: mvebu: Consolidate board Kconfig options into one file

Merging all the board specific Kconfig options into the main Kconfig file
for mach-mvebu makes things easier to maintain.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
8 years agoarm: mvebu: Print CPU and SDRAM frequency upon startup
Stefan Roese [Mon, 21 Dec 2015 11:36:40 +0000 (12:36 +0100)]
arm: mvebu: Print CPU and SDRAM frequency upon startup

With this patch, the CPU and the DDR frequencies will get printed in the
U-Boot startup messages. Resulting in such a log:

U-Boot 2016.01-rc2-00188-gb8eeaec-dirty (Dec 21 2015 - 12:32:35 +0100)

SoC:   MV78460-B0 at 1600 MHz
I2C:   ready
DRAM:  4 GiB (800 MHz, ECC not enabled)
...

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
8 years agoarm: mvebu: Make serdes setup on Armada XP less noisy
Stefan Roese [Thu, 10 Dec 2015 09:32:36 +0000 (10:32 +0100)]
arm: mvebu: Make serdes setup on Armada XP less noisy

Change some of the PEX configuration output lines from always output to
only ouput upon specific debug enabling.

This changes the SPL output from:

U-Boot SPL 2016.01-rc2-00037-g9353a7f (Dec 10 2015 - 10:27:42)
High speed PHY - Version: 2.1.5 (COM-PHY-V20)
Update Device ID PEX0782611ab
Update Device ID PEX1782611ab
Update Device ID PEX2782611ab
Update Device ID PEX3782611ab
Update Device ID PEX8782611ab
Update PEX Device ID 0x78260
High speed PHY - Ended Successfully
DDR3 Training Sequence - Ver 5.7.4
DDR3 Training Sequence - Ended Successfully

to:

U-Boot SPL 2016.01-rc2-00037-g9353a7f-dirty (Dec 10 2015 - 10:32:04)
High speed PHY - Version: 2.1.5 (COM-PHY-V20)
High speed PHY - Ended Successfully
DDR3 Training Sequence - Ver 5.7.4
DDR3 Training Sequence - Ended Successfully

Resulting in a little faster bootup time.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
8 years agoarm: mvebu: Don't include "netdev.h" in cpu.c
Stefan Roese [Fri, 11 Dec 2015 07:24:20 +0000 (08:24 +0100)]
arm: mvebu: Don't include "netdev.h" in cpu.c

This is not needed any more since the switch to DM / DTS network
initialization on MVEBU. Lets remove it, as it otherwise leads
to compilation warning when CONFIG_NET is not enabled.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
8 years agoarm: mvebu: Make ECC support configurable on Armada XP
Stefan Roese [Thu, 10 Dec 2015 14:02:38 +0000 (15:02 +0100)]
arm: mvebu: Make ECC support configurable on Armada XP

Currently, ECC support is enabled for all Armada XP boards. So the
DDR3 driver tries to configure the controller with ECC support, even
on boards without ECC. This patch makes this ECC optional which now
can be configured on a board-per-board basis.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Cc: Phil Sutter <phil@nwl.cc>
8 years agoarm: mvebu: Add support for MV78260
Stefan Roese [Wed, 9 Dec 2015 10:00:51 +0000 (11:00 +0100)]
arm: mvebu: Add support for MV78260

This patch adds support for the dual core Armada XP variant, the
MV78260. It has some minor differences to the 4-core MV78460,
e.g. only 12 serdes lanes.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Cc: Phil Sutter <phil@nwl.cc>
8 years agoarm: mvebu: Don't use 0 as board ID as its used for the custom boards
Stefan Roese [Wed, 9 Dec 2015 09:25:10 +0000 (10:25 +0100)]
arm: mvebu: Don't use 0 as board ID as its used for the custom boards

Using board ID 0 is reserved for the non-Marvell "custom" boards. So
move the board ID's to reflect this.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Cc: Phil Sutter <phil@nwl.cc>
8 years agoarm: mvebu: Simplify code in setup_usb_phys() a bit
Stefan Roese [Fri, 4 Dec 2015 12:08:34 +0000 (13:08 +0100)]
arm: mvebu: Simplify code in setup_usb_phys() a bit

Use the clrbits() / setbits() functions instead of clrsetbits() when
bit are only cleared or set.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
8 years agoarm: mvebu: Don't disable cache at startup on Armada XP at all
Stefan Roese [Thu, 3 Dec 2015 11:39:45 +0000 (12:39 +0100)]
arm: mvebu: Don't disable cache at startup on Armada XP at all

This patch leaces the cache configuration untouched for the AXP in the
setup done by the BootROM. Resulting in the cache still being enabled
at the startup of U-Boot. This leads to a slightly faster boot to the
U-Boot prompt (or Linux of course).

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
8 years agoarm: mvebu: Remove SYS_MALLOC_CLEAR_ON_INIT from DB-MV784MP-GP AXP board
Stefan Roese [Thu, 3 Dec 2015 11:39:45 +0000 (12:39 +0100)]
arm: mvebu: Remove SYS_MALLOC_CLEAR_ON_INIT from DB-MV784MP-GP AXP board

By removing CONFIG_SYS_MALLOC_CLEAR_ON_INIT, the bootup time is a bit
faster.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
8 years agoarm: mvebu: Don't call arch_cpu_init() from SPL at all
Stefan Roese [Thu, 3 Dec 2015 11:39:45 +0000 (12:39 +0100)]
arm: mvebu: Don't call arch_cpu_init() from SPL at all

This patch removes the call to arch_cpu_init() in the SPL U-Boot version.
As SPL does not need all the configuration done in this function. And
also does not need the reconfiguration of the internal register
address to 0xf1000000. This will be done by the main U-Boot later on.

This also fixes a problem with the timer not beeing initialized on AXP,
as needed for the mdelay in the setup_usb_phys(). This will now only
be called once in main U-Boot.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
8 years agoarm: mvebu: Add v7_outer_cache_disable function for AXP & A38x
Stefan Roese [Mon, 14 Dec 2015 11:31:48 +0000 (12:31 +0100)]
arm: mvebu: Add v7_outer_cache_disable function for AXP & A38x

Add functionality to correctly disable the L2 cache on the Armada XP
and 38x platforms.

Without this, booting into Linux on ClearFog (A38x) results in a hangup
without any output on the serial console at all. Even with earlyprintk
enabled.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>