oweals/u-boot.git
9 years agox86: ivybridge: Add LAPIC support
Simon Glass [Thu, 13 Nov 2014 05:42:27 +0000 (22:42 -0700)]
x86: ivybridge: Add LAPIC support

The local advanced programmable interrupt controller is not used much in
U-Boot but we do need to set it up. Add basic support for this, which will
be extended as needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: Make show_boot_progress() common
Simon Glass [Thu, 13 Nov 2014 05:42:26 +0000 (22:42 -0700)]
x86: Make show_boot_progress() common

This function can probably be used on all x86 boards, so move it into the
common file.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: chromebook_link: Enable GPIO support
Simon Glass [Thu, 13 Nov 2014 05:42:25 +0000 (22:42 -0700)]
x86: chromebook_link: Enable GPIO support

Enable GPIO support and provide the required GPIO setup information to
the driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: ivybridge: Add support for early GPIO init
Simon Glass [Thu, 13 Nov 2014 05:42:24 +0000 (22:42 -0700)]
x86: ivybridge: Add support for early GPIO init

When not relying on Coreboot for GPIO init the GPIOs must be set up
correctly. This is currently done statically through a rather ugly method.
As the GPIOs are figured out they can be moved to the device tree and set
up as needed rather than all at the start.

In this implementation, board files should call ich_gpio_set_gpio_map()
before the GPIO driver is used in order to provide the GPIO information.
We use the early PCI interface so that this driver can now be used before
relocation.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: ivybridge: Add early init for PCH devices
Simon Glass [Thu, 13 Nov 2014 05:42:23 +0000 (22:42 -0700)]
x86: ivybridge: Add early init for PCH devices

Many PCH devices are hard-coded to a particular PCI address. Set these
up early in case they are needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: dts: Add microcode updates for ivybridge CPU
Simon Glass [Thu, 13 Nov 2014 05:42:22 +0000 (22:42 -0700)]
x86: dts: Add microcode updates for ivybridge CPU

Add two microcode updates that are provided for this CPU. The updates
have been converted to a device tree form.

Note: SPDX submission has been done. If this license is approved I will
convert the files to use SPDX.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: ivybridge: Perform Intel microcode update on boot
Simon Glass [Thu, 13 Nov 2014 05:42:21 +0000 (22:42 -0700)]
x86: ivybridge: Perform Intel microcode update on boot

Microcode updates are stored in the device tree. Work through these and
apply any that are needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: ivybridge: Check BIST value on boot
Simon Glass [Thu, 13 Nov 2014 05:42:20 +0000 (22:42 -0700)]
x86: ivybridge: Check BIST value on boot

The built-in self test value should be checked before we continue booting.
Refuse to continue if there is something wrong.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: ivybridge: Perform initial CPU setup
Simon Glass [Thu, 13 Nov 2014 05:42:19 +0000 (22:42 -0700)]
x86: ivybridge: Perform initial CPU setup

Set up the flex ratio (controls speed versus heat output) and a few other
very early things.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: Add msr read/write functions that use a structure
Simon Glass [Thu, 13 Nov 2014 05:42:18 +0000 (22:42 -0700)]
x86: Add msr read/write functions that use a structure

It is convenient to be able to adjust MSRs with a structure that splits the
two 32-bit halves into separate fields, as they are often dealt with
separately. Add a few functions to support this.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: Add clr/setbits functions
Simon Glass [Thu, 13 Nov 2014 05:42:17 +0000 (22:42 -0700)]
x86: Add clr/setbits functions

These are available on other architectures. Make them available on x86 also.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: Tidy up coreboot header usage
Simon Glass [Thu, 13 Nov 2014 05:42:16 +0000 (22:42 -0700)]
x86: Tidy up coreboot header usage

There is no need to explicitly write 'arch-coreboot' when including headers,
as when the arch directory points to coreboot the correct files will be
used.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: ivybridge: Add early LPC init so that serial works
Simon Glass [Thu, 13 Nov 2014 05:42:15 +0000 (22:42 -0700)]
x86: ivybridge: Add early LPC init so that serial works

The PCH (Platform Controller Hub) includes an LPC (Low Pin Count) device
which provides a serial port. This is accessible on Chromebooks, so enable
it early in the boot process.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: pci: Allow configuration before relocation
Simon Glass [Thu, 13 Nov 2014 05:42:14 +0000 (22:42 -0700)]
x86: pci: Allow configuration before relocation

Add simple PCI access routines for x86 which permit use before relocation.
The normal PCI stack is still used, but for pre-relocation use there can
only ever be a single hose. After relocation, fall back to the normal
access, although even then on x86 machines there is normally only a single
PCI bus.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: ivybridge: Enable PCI in early init
Simon Glass [Thu, 13 Nov 2014 05:42:13 +0000 (22:42 -0700)]
x86: ivybridge: Enable PCI in early init

Enable PCI so we can access devices that need to be set up before relocation.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: Support use of PCI before relocation
Simon Glass [Thu, 13 Nov 2014 05:42:12 +0000 (22:42 -0700)]
x86: Support use of PCI before relocation

Add support for using PCI before SDRAM is available, using early malloc()
and global_data.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: Refactor PCI to permit alternate init
Simon Glass [Thu, 13 Nov 2014 05:42:11 +0000 (22:42 -0700)]
x86: Refactor PCI to permit alternate init

We want access PCI earlier in the init sequence, so refactor the code so
that it does not require use of a BSS variable to work. This will allow us
to use early malloc() to store information about a PCI hose.

Common PCI code moves to arch/x86/cpu/pci.c and a new
board_pci_setup_hose() function is provided by boards to set up the (single)
hose used by that board.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: chromebook_link: Implement CAR support (cache as RAM)
Simon Glass [Thu, 13 Nov 2014 05:42:10 +0000 (22:42 -0700)]
x86: chromebook_link: Implement CAR support (cache as RAM)

Add support for CAR so that we have memory to use prior to DRAM init.
On link there is a total of 128KB of CAR available, although some is
used for the memory reference code.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: Emit post codes in startup code for Chromebooks
Simon Glass [Thu, 13 Nov 2014 05:42:09 +0000 (22:42 -0700)]
x86: Emit post codes in startup code for Chromebooks

On x86 it is common to use 'post codes' which are 8-bit hex values emitted
from the code and visible to the user. Traditionally two 7-segment displays
were made available on the motherboard to show the last post code that was
emitted. This allows diagnosis of a boot problem since it is possible to
see where the code got to before it died.

On modern hardware these codes are not normally visible. On Chromebooks
they are displayed by the Embedded Controller (EC), so it is useful to emit
them. We must enable this feature for the EC to see the codes, so add an
option for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: Build a .rom file which can be flashed to an x86 machine
Simon Glass [Thu, 13 Nov 2014 05:42:08 +0000 (22:42 -0700)]
x86: Build a .rom file which can be flashed to an x86 machine

On x86 machines U-Boot needs to be added to a large ROM image which is
then flashed onto the target board. The ROM has a particular format so it
makes sense for U-Boot to build this image automatically. Unfortunately
it relies on binary blobs so we cannot require this for the default
build as yet.

Create a u-boot.rom output file for this purpose.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: Add chromebook_link board
Simon Glass [Thu, 13 Nov 2014 05:42:07 +0000 (22:42 -0700)]
x86: Add chromebook_link board

This board is a 'bare' version of the existing 'link 'board. It does not
require coreboot to run, but is intended to start directly from the reset
vector.

This initial commit has place holders for a wide range of features. These
will be added in follow-on patches and series. So far it cannot be booted
as there is no ROM image produced, but it does build without errors.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: ifdtool: Allow creation of an empty ROM
Simon Glass [Thu, 13 Nov 2014 05:42:06 +0000 (22:42 -0700)]
x86: ifdtool: Allow creation of an empty ROM

Allow an empty ROM to be created, without needing to provide a descriptor.
The descriptor is not needed on some x86 boards.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: Allow timer calibration to work on ivybridge
Simon Glass [Thu, 13 Nov 2014 05:42:04 +0000 (22:42 -0700)]
x86: Allow timer calibration to work on ivybridge

Unfortunately MSR_FSB_FREQ is not available on this CPU, and the PIT method
seems to take up to 50ms which is much too long.

For this CPU we know the frequency, so add another special case for now.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: use CONFIG_SYS_COREBOOT to descend into coreboot/ directory
Masahiro Yamada [Thu, 13 Nov 2014 03:28:41 +0000 (12:28 +0900)]
x86: use CONFIG_SYS_COREBOOT to descend into coreboot/ directory

The references of CONFIG_SYS_COREBOOT in arch/x86/cpu/coreboot/Makefile
are redundant because the build system descends into the directory
only when CONFIG_SYS_COREBOOT is defined.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agox86: Replace fill_processor_name() with cpu_get_name()
Simon Glass [Tue, 11 Nov 2014 01:00:26 +0000 (18:00 -0700)]
x86: Replace fill_processor_name() with cpu_get_name()

This implementation has a 'cpu' prefix and returns a pointer to the string,
avoiding the need for copying.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: Remove unnecessary find_fdt(), prepare_fdt() functions
Simon Glass [Tue, 11 Nov 2014 01:00:25 +0000 (18:00 -0700)]
x86: Remove unnecessary find_fdt(), prepare_fdt() functions

These are no-longer needed so drop them.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: Add processor functions to halt and get stack pointer
Simon Glass [Tue, 11 Nov 2014 01:00:24 +0000 (18:00 -0700)]
x86: Add processor functions to halt and get stack pointer

Add a function to get the stack pointer and another to halt the CPU.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: config: Move common x86 configs to a common file
Simon Glass [Tue, 11 Nov 2014 01:00:23 +0000 (18:00 -0700)]
x86: config: Move common x86 configs to a common file

Many of the x86 CONFIG options will be common across different boards. Move
them to a common file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: Add ifdtool for working with Intel Flash Descriptor ROM images
Simon Glass [Tue, 11 Nov 2014 01:00:22 +0000 (18:00 -0700)]
x86: Add ifdtool for working with Intel Flash Descriptor ROM images

Newer Intel chips require a Management Engine which requires a particular
format for the SPI flash that contains the boot loader. Add a tool that
supports creating and modifying these ROM images.

This tool is from Chrome OS but has been cleaned up to use U-Boot style
and to add comments. A few features have been added also.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: gpio: Add a function to read an ID from a list of GPIOs
Simon Glass [Tue, 11 Nov 2014 01:00:21 +0000 (18:00 -0700)]
dm: gpio: Add a function to read an ID from a list of GPIOs

For board IDs a common approach is to set aside several GPIOs for use in
determining the board ID. This can provide information about board features
and the revision.

Add a function that turns a list of GPIOs into an integer by assigning
each GPIO to a single bit.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: serial: Move current serial port pointer to global_data
Simon Glass [Tue, 11 Nov 2014 01:00:20 +0000 (18:00 -0700)]
dm: serial: Move current serial port pointer to global_data

In general we can't store things in the data section until we have inited
SDRAM. Some platforms allow this (e.g. those with SPL) but some don't. Move
the pointer to global_data so that it will work on all platforms.

Without this fix the serial port will not work prior to relocation with
driver model on some platforms.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agofdt: Add a function to decode a variable-sized u32 array
Simon Glass [Tue, 11 Nov 2014 01:00:19 +0000 (18:00 -0700)]
fdt: Add a function to decode a variable-sized u32 array

Sometimes an array can be of variable size up to a maximum. Add a helper
function to decode this.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoMove early malloc() to before arch_cpu_init()
Simon Glass [Tue, 11 Nov 2014 01:00:18 +0000 (18:00 -0700)]
Move early malloc() to before arch_cpu_init()

For some CPUs, having malloc() available very early is useful. There is no
reason to delay this since early malloc is allocated before board_init_f()
is called.

Move early malloc() init nearer to the start of the init sequence.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: Fix a warning with gcc 4.4.4
Simon Glass [Thu, 13 Nov 2014 03:27:55 +0000 (20:27 -0700)]
x86: Fix a warning with gcc 4.4.4

This warning appears even though it seems that the compiler could work it
out. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: Save TSC frequency in the global data
Bin Meng [Sun, 9 Nov 2014 14:19:35 +0000 (22:19 +0800)]
x86: Save TSC frequency in the global data

Return the saved TSC frequency in get_tbclk_mhz().

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
9 years agox86: Add quick TSC calibration via PIT
Bin Meng [Sun, 9 Nov 2014 14:19:25 +0000 (22:19 +0800)]
x86: Add quick TSC calibration via PIT

Use the same way that Linux does for quick TSC calibration via PIT
when calibration via MSR fails.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agox86: Do TSC MSR calibration only for known/supported CPUs
Bin Meng [Sun, 9 Nov 2014 14:19:13 +0000 (22:19 +0800)]
x86: Do TSC MSR calibration only for known/supported CPUs

Using MSR_PLATFORM_INFO (0xCE) to calibrate TSR will cause #GP on
processors which do not have this MSR. Instead only doing the MSR
calibration for known/supported CPUs.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
9 years agox86: Do CPU identification in the early phase
Bin Meng [Sun, 9 Nov 2014 14:18:56 +0000 (22:18 +0800)]
x86: Do CPU identification in the early phase

The CPU identification happens in x86_cpu_init_f() and corresponding
fields are saved in the global data for later use.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: Save the BIST value on reset
Simon Glass [Thu, 6 Nov 2014 20:20:10 +0000 (13:20 -0700)]
x86: Save the BIST value on reset

The built in self test value is available in register eax on start-up. Save
it so that it can be accessed later. Unfortunately we must wait until the
global_data is available before we can do this, so there is a little bit of
shuffling to keep it around.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: Fix up some missing prototypes
Simon Glass [Thu, 6 Nov 2014 20:20:08 +0000 (13:20 -0700)]
x86: Fix up some missing prototypes

Some functions are missing prototypes. Fix those that are specific to x86.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: Use the standard arch_cpu_init() function
Simon Glass [Thu, 6 Nov 2014 20:20:06 +0000 (13:20 -0700)]
x86: Use the standard arch_cpu_init() function

Instead of an x86-specific cpu_init_f() function, use the normal U-Boot one
for this purpose. Also remove a useless/misleading comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: Use the standard dram_init() function
Simon Glass [Thu, 6 Nov 2014 20:20:05 +0000 (13:20 -0700)]
x86: Use the standard dram_init() function

Instead of having an x86-specific DRAM init function, adjust things so we
can use the normal one.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: Tidy up global descriptor table setup
Simon Glass [Thu, 6 Nov 2014 20:20:04 +0000 (13:20 -0700)]
x86: Tidy up global descriptor table setup

This code is a little muddled, so tidy it up. Make sure that we put the
GDT in the right place and set it up properly.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: Invalidate TLB as early as possible
Simon Glass [Thu, 6 Nov 2014 20:20:03 +0000 (13:20 -0700)]
x86: Invalidate TLB as early as possible

We should invalidate the TLB right at the start to ensure that we don't get
false address translations even though paging is disabled.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: Remove board_init16() call which is not used
Simon Glass [Thu, 6 Nov 2014 20:20:01 +0000 (13:20 -0700)]
x86: Remove board_init16() call which is not used

This allows a board to do very early init, but no boards need to do this.
We may as well drop this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: Remove REALMODE_BASE which is no longer used
Simon Glass [Thu, 6 Nov 2014 20:20:00 +0000 (13:20 -0700)]
x86: Remove REALMODE_BASE which is no longer used

This was missed when the real mode support was dropped. Remove it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-ubi
Tom Rini [Thu, 20 Nov 2014 04:18:29 +0000 (23:18 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-ubi

9 years agoMerge branch 'master' of git://git.denx.de/u-boot-i2c
Tom Rini [Thu, 20 Nov 2014 04:18:19 +0000 (23:18 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-i2c

9 years agoMerge branch 'master' of git://git.denx.de/u-boot-mpc5xxx
Tom Rini [Thu, 20 Nov 2014 04:17:13 +0000 (23:17 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-mpc5xxx

9 years agopowerpc: mpc52xx: Clear GD in the main U-Boot stage for SPL usage
Stefan Roese [Wed, 19 Nov 2014 08:37:48 +0000 (09:37 +0100)]
powerpc: mpc52xx: Clear GD in the main U-Boot stage for SPL usage

When an MPC5200 based board is used with SPL support, the main
U-Boot needs to clear the GD (global data) struct again.

Otherwise the generic board init code in board_init_f (when
CONFIG_SYS_GENERIC_BOARD is defined) will not initialize all
GD variables correctly. Resulting in a hangup on the a4m2k
board.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
9 years agopowerpc: mpc52xx: a3m071/a4m2k: Convert to generic board
Stefan Roese [Wed, 19 Nov 2014 08:37:47 +0000 (09:37 +0100)]
powerpc: mpc52xx: a3m071/a4m2k: Convert to generic board

a3m071 and a4m2k share one config header. So adding the generic board defines
in this one file is enough to convert both boards.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
9 years agopowerpc: mpc52xx: a4m072: Convert to generic board
Stefan Roese [Wed, 19 Nov 2014 08:37:46 +0000 (09:37 +0100)]
powerpc: mpc52xx: a4m072: Convert to generic board

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
9 years agompc83xx: Add gdsys hrcon board
Dirk Eibach [Thu, 13 Nov 2014 18:21:18 +0000 (19:21 +0100)]
mpc83xx: Add gdsys hrcon board

The gdsys hrcon board is based on a Freescale MPC8308 SOC.
It boots from NOR-Flash, kernel and rootfs are stored on
SD-Card.

On board peripherals include:
- 1x GbE (optional)
- Lattice ECP3 FPGA connected via eLBC and PCIe

Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Signed-off-by: Stefan Roese <sr@denx.de>
9 years agoboard: iocon: Fix uninitialized access
Dirk Eibach [Thu, 13 Nov 2014 18:21:17 +0000 (19:21 +0100)]
board: iocon: Fix uninitialized access

Wolfgang Denk found this issue using cppcheck:
(error) Uninitialized variable: fpga_features

Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Signed-off-by: Stefan Roese <sr@denx.de>
9 years agoboard: iocon: Fix fpga index in print_fpga_info()
Dirk Eibach [Thu, 13 Nov 2014 18:21:16 +0000 (19:21 +0100)]
board: iocon: Fix fpga index in print_fpga_info()

Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Signed-off-by: Stefan Roese <sr@denx.de>
9 years agoboard: dlvision-10g: Compile fix
Dirk Eibach [Thu, 13 Nov 2014 18:21:15 +0000 (19:21 +0100)]
board: dlvision-10g: Compile fix

Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Signed-off-by: Stefan Roese <sr@denx.de>
9 years agocommon: Fix cmd_fpgad addressing
Dirk Eibach [Thu, 13 Nov 2014 18:21:14 +0000 (19:21 +0100)]
common: Fix cmd_fpgad addressing

Addressing was completely broken for cmd_fpgad.

Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Signed-off-by: Stefan Roese <sr@denx.de>
9 years agomtd: Handle 29LV800BT
Dirk Eibach [Thu, 13 Nov 2014 18:21:13 +0000 (19:21 +0100)]
mtd: Handle 29LV800BT

The device id makes u-boot think that this chip needs
cfi_reverse_geometry(), which is not the case.
Add it to jedec_flash, so it is handled properly.

Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Signed-off-by: Stefan Roese <sr@denx.de>
9 years agoboard: dlvision: Reduce memory footprint
Dirk Eibach [Thu, 13 Nov 2014 18:21:12 +0000 (19:21 +0100)]
board: dlvision: Reduce memory footprint

Tune dlvision configuration similar to other gdsys boards to reduce memory
footprint.

Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Signed-off-by: Stefan Roese <sr@denx.de>
9 years agoubi: enable error reporting in initialization
Andrew Ruder [Wed, 5 Nov 2014 19:31:57 +0000 (13:31 -0600)]
ubi: enable error reporting in initialization

The UBI layer will disable much of its error reporting when it is
compiled into the linux kernel to avoid stopping boot.  We want this
error reporting in U-Boot since we don't initialize the UBI layer until
it is used and want the error reporting.

We force this by telling the UBI layer we are building as a module.

Signed-off-by: Andrew Ruder <andrew.ruder@elecsyscorp.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Kyungmin Park <kmpark@infradead.org>
9 years agomtd, cfi, ubi: add missing writebufsize initialization
Heiko Schocher [Fri, 31 Oct 2014 10:29:45 +0000 (11:29 +0100)]
mtd, cfi, ubi: add missing writebufsize initialization

ff94bc40af3481d47546595ba73c136de6af6929 "mtd, ubi, ubifs: resync with Linux-3.14"
introduced the writebufsize field in struct mtd_info, which
is not initialized in the cfi_flash driver, which leads in
not working ubi on cfi flashes. Fix it

Signed-off-by: Heiko Schocher <hs@denx.de>
Reported-by: Andrew Ruder <andrew.ruder@elecsyscorp.com>
Acked-by: Stefan Roese <sr@denx.de>
Acked-by: Andrew Ruder <andrew.ruder@elecsyscorp.com>
9 years agoARM: atmel: add sama5d4 xplained ultra board support
Bo Shen [Mon, 10 Nov 2014 07:46:22 +0000 (15:46 +0800)]
ARM: atmel: add sama5d4 xplained ultra board support

The code for this board supports following features:
  - Boot media support: NAND flash/SD card/SPI flash
  - Support LCD display (optional, disabled by default)
  - Support ethernet
  - Support USB mass storage

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoARM: atmel: add sama5d4ek board support
Bo Shen [Mon, 10 Nov 2014 07:24:02 +0000 (15:24 +0800)]
ARM: atmel: add sama5d4ek board support

The code for this board supports following features:
  - Boot media support: NAND flash/SD card/SPI flash
  - Support LCD display
  - Support ethernet
  - Support USB mass storage

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agonet: macb: enable GMAC IP without GE feature support
Bo Shen [Mon, 10 Nov 2014 07:24:01 +0000 (15:24 +0800)]
net: macb: enable GMAC IP without GE feature support

The User Register in GMAC IP is used to select interface type.
When with GE feature, it is used to select interface between
RGMII and GMII. If without GE feature, it is used to select
interface between MII and RMII.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agomtd: atmel_nand: runtime to build gf table for pmecc
Josh Wu [Mon, 10 Nov 2014 07:24:00 +0000 (15:24 +0800)]
mtd: atmel_nand: runtime to build gf table for pmecc

As in SAMA5D4 SoC, the gf table in ROM code can not be seen.
So, when we try to use PMECC, we need to build it when do
initialization.
Add a macro NO_GALOIS_TABLE_IN_ROM in soc header file. If it
is defined we will build gf table runtime.

The PMECC use the BCH algorithm, so based on the build_gf_tables()
function in lib/bch.c, we can build the Galois Field lookup table.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoarm, spl, at91: add spl support for the corvus board
Heiko Schocher [Fri, 31 Oct 2014 07:31:06 +0000 (08:31 +0100)]
arm, spl, at91: add spl support for the corvus board

replaces the at91bootstrap code with SPL code.
make the spl image with:
./tools/mkimage -T atmelimage -d spl/u-boot-spl.bin spl/boot.bin

this writes the length of the spl image into the 6th
execption vector. This is needed from the ROM bootloader.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Bo Shen <voice.shen@atmel.com>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoarm, at91, spl: add spl support for the taurus board
Heiko Schocher [Fri, 31 Oct 2014 07:31:05 +0000 (08:31 +0100)]
arm, at91, spl: add spl support for the taurus board

replaces the at91bootstrap code with SPL code.

make the spl image with:
./tools/mkimage -T atmelimage -d spl/u-boot-spl.bin spl/boot.bin

this writes the length of the spl image into the 6th
execption vector. This is needed from the ROM bootloader.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoarm, spl, at91: add at91sam9260 and at91sam9g45 spl support
Heiko Schocher [Fri, 31 Oct 2014 07:31:04 +0000 (08:31 +0100)]
arm, spl, at91: add at91sam9260 and at91sam9g45 spl support

add support for using spl code on at91sam9260 and at91sam9g45
based boards.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Bo Shen <voice.shen@atmel.com>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
[adopt Bo's change in spl.c]
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agospl, mtd, nand, atmel_nand: invert device ready pin logic
Heiko Schocher [Fri, 31 Oct 2014 07:31:03 +0000 (08:31 +0100)]
spl, mtd, nand, atmel_nand: invert device ready pin logic

device ready pin is signalling that the device is ready on state 1
not on 0. Simmiliar as it is in drivers/mtd/nand/nand_spl_simple.c

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
Reviewed-by: Bo Shen <voice.shen@atmel.com>
Acked-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agospl, nand, atmel_nand: add erase one block function
Heiko Schocher [Fri, 31 Oct 2014 07:31:02 +0000 (08:31 +0100)]
spl, nand, atmel_nand: add erase one block function

erase one nand block in spl code. keep it simple, as size matters
This is used on the upcoming taurus spl support.

Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Scott Wood <scottwood@freescale.com>
Reviewed-by: Bo Shen <voice.shen@atmel.com>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agomtd: atmel_nand: add missing include
Heiko Schocher [Fri, 31 Oct 2014 07:31:01 +0000 (08:31 +0100)]
mtd: atmel_nand: add missing include

using this driver in SPL code with CONFIG_SPL_NAND_ECC
configured leads in an compileerror. Fix this.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
Reviewed-by: Bo Shen <voice.shen@atmel.com>
[fix subject]
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agospl, nand: add option to boot raw u-boot.bin image only
Heiko Schocher [Fri, 31 Oct 2014 07:31:00 +0000 (08:31 +0100)]
spl, nand: add option to boot raw u-boot.bin image only

enable to boot only a raw u-boot.bin image from nand with the
CONFIG_SPL_NAND_RAW_ONLY define. This option saves space on
boards where spl space is low.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
Reviewed-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoarm, at91: add missing ddr2 cr register MPDDRC_CR_EBISHARE define
Heiko Schocher [Fri, 31 Oct 2014 07:30:59 +0000 (08:30 +0100)]
arm, at91: add missing ddr2 cr register MPDDRC_CR_EBISHARE define

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoarm, at91: compile mpddrc ram init code also for AT91SAM9M10G45
Heiko Schocher [Fri, 31 Oct 2014 07:30:58 +0000 (08:30 +0100)]
arm, at91: compile mpddrc ram init code also for AT91SAM9M10G45

- compile mpddrc ram init code also for AT91SAM9M10G45
  based boards.
- in CONFIG_SAMA5D3 case, look for the ATMEL_MPDDRC_CR_DECOD_INTERLEAVED
  in the cr configuration

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
Reviewed-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoarm, at91, mpddrc: fix typo in ddr2_init()
Heiko Schocher [Fri, 31 Oct 2014 07:30:57 +0000 (08:30 +0100)]
arm, at91, mpddrc: fix typo in ddr2_init()

use the configure value for computing the ba_off value
not the value from the cr register. This leaded in a
wrong ram configuration on the upcoming corvus spl board
support.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoarm, at91: add spi dataflash support for the taurus board
Heiko Schocher [Fri, 31 Oct 2014 07:30:56 +0000 (08:30 +0100)]
arm, at91: add spi dataflash support for the taurus board

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Bo Shen <voice.shen@atmel.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agospi, atmel: move CONFIG_SYS_SPI_WRITE_TOUT into common header
Heiko Schocher [Fri, 31 Oct 2014 07:30:55 +0000 (08:30 +0100)]
spi, atmel: move CONFIG_SYS_SPI_WRITE_TOUT into common header

move CONFIG_SYS_SPI_WRITE_TOUT into drivers/spi/atmel_spi.h
and define a default value. Delete this define in the board
config files, where it is possible (all boards use currently
the same value).

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoarm, at91: generate boot.bin file for all atmel SoC
Heiko Schocher [Thu, 30 Oct 2014 08:59:59 +0000 (09:59 +0100)]
arm, at91: generate boot.bin file for all atmel SoC

generate the boot.bin file for all atmel SoC (arm920, arm926, armv7)

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
[fix subject]
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoARM: atmel: spl: make css field configurable
Bo Shen [Fri, 24 Oct 2014 08:13:26 +0000 (16:13 +0800)]
ARM: atmel: spl: make css field configurable

The clock source for master clock can be slow clock, main clock,
plla clock or upll clock. So, make the clock source selection
field in mckr can be configured.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoARM: atmel: spl: make initialization more stable
Bo Shen [Fri, 24 Oct 2014 08:13:25 +0000 (16:13 +0800)]
ARM: atmel: spl: make initialization more stable

We need to make sure the main clock ready field in MCFR is set
after switch to main crystal oscillator.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoARM: at91 series: convert to generic board
Bo Shen [Wed, 22 Oct 2014 10:01:23 +0000 (18:01 +0800)]
ARM: at91 series: convert to generic board

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agonet: macb: write mac address when initialization
Bo Shen [Wed, 22 Oct 2014 06:45:56 +0000 (14:45 +0800)]
net: macb: write mac address when initialization

When boot up without mac address setting, it will give the warning
message like: "Warning: failed to set MAC address", however when
execute network related command, it still execute them without any
warning information.

With this patch, it will exit directly with following information:
"gmac0: mac address is not valid"

It also solve the problem after bootup then set mac address and the
mac address won't set to net device issue.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Tested-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-sh
Tom Rini [Mon, 17 Nov 2014 13:43:40 +0000 (08:43 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-sh

9 years agoMerge branch 'rmobile' of git://git.denx.de/u-boot-sh
Tom Rini [Mon, 17 Nov 2014 13:43:21 +0000 (08:43 -0500)]
Merge branch 'rmobile' of git://git.denx.de/u-boot-sh

9 years agoblackfin: convert to use CONFIG_SYS_I2C framework
Scott Jiang [Thu, 13 Nov 2014 07:30:55 +0000 (15:30 +0800)]
blackfin: convert to use CONFIG_SYS_I2C framework

Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com>
9 years agoadi_i2c: convert to use general io accessors.
Scott Jiang [Thu, 13 Nov 2014 07:30:54 +0000 (15:30 +0800)]
adi_i2c: convert to use general io accessors.

Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com>
9 years agoblackfin: rename bfin-twi_i2c driver to adi_i2c
Scott Jiang [Thu, 13 Nov 2014 07:30:53 +0000 (15:30 +0800)]
blackfin: rename bfin-twi_i2c driver to adi_i2c

Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com>
9 years agoarm: rmobile: replacement of common parts of config by rcar-gen2-common.h
Nobuhiro Iwamatsu [Mon, 10 Nov 2014 05:34:07 +0000 (14:34 +0900)]
arm: rmobile: replacement of common parts of config by rcar-gen2-common.h

Common part of config for lager, koelsch, alt and gose board will be able to
replace rcar-gen2-common.h.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
9 years agoarm: rmobile: configs: Collect up common part of config for R-Car SoCs
Nobuhiro Iwamatsu [Thu, 6 Nov 2014 07:30:56 +0000 (16:30 +0900)]
arm: rmobile: configs: Collect up common part of config for R-Car SoCs

The lager, koelsch, alt, gose board supported in rmobile is
distinguished as the R-Car Gen2 series and has much common setting.
This collect up the common part of config as rcar-gen2-common.h.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
9 years agoarm: rmobile: gose: Remove dram_init_banksize function
Nobuhiro Iwamatsu [Mon, 10 Nov 2014 04:58:50 +0000 (13:58 +0900)]
arm: rmobile: gose: Remove dram_init_banksize function

Gose board is defined CONFIG_SYS_SDRAM_BASE, and this can use a basic function of
dram_init_banksize instead.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
9 years agoarm: rmobile: lager: Remove dram_init_banksize function
Nobuhiro Iwamatsu [Mon, 10 Nov 2014 04:58:50 +0000 (13:58 +0900)]
arm: rmobile: lager: Remove dram_init_banksize function

Lager board is defined CONFIG_SYS_SDRAM_BASE, and this can use a basic function of
dram_init_banksize instead.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
9 years agoarm: rmobile: koelsch: Remove dram_init_banksize function
Nobuhiro Iwamatsu [Mon, 10 Nov 2014 04:58:50 +0000 (13:58 +0900)]
arm: rmobile: koelsch: Remove dram_init_banksize function

Koesch board is defined CONFIG_SYS_SDRAM_BASE, and this can use a basic function of
dram_init_banksize instead.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
9 years agoarm: rmobile: alt: Remove dram_init_banksize function
Nobuhiro Iwamatsu [Mon, 10 Nov 2014 04:58:50 +0000 (13:58 +0900)]
arm: rmobile: alt: Remove dram_init_banksize function

Alt board is defined CONFIG_SYS_SDRAM_BASE, and this can use a basic function of
dram_init_banksize instead.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
9 years agosh: Move SH_32BIT to Kconfig
Nobuhiro Iwamatsu [Fri, 14 Nov 2014 03:52:47 +0000 (12:52 +0900)]
sh: Move SH_32BIT to Kconfig

This moves SH_32BIT to Kconfig, and removes SH_32BIT from config
files.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-mpc85xx
Tom Rini [Fri, 14 Nov 2014 21:39:32 +0000 (16:39 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx

9 years agoMerge branch 'master' of git://git.denx.de/u-boot-video
Tom Rini [Fri, 14 Nov 2014 20:05:53 +0000 (15:05 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-video

9 years agopowerpc/85xx: enable some P1/P2 boards mtdparts for nor flash
Yangbo Lu [Thu, 16 Oct 2014 02:58:55 +0000 (10:58 +0800)]
powerpc/85xx: enable some P1/P2 boards mtdparts for nor flash

Enable these boards mtdparts for nor flash:
p1020rdb-pd, p1021rdb-pc, p1022ds, p1025twr, and p2020rdb-pc.

Signed-off-by: Xie Xiaobo <X.Xie@freescale.com>
Signed-off-by: Yangbo Lu <yangbo.lu@freescale.com>
Cc: York Sun <yorksun@freescale.com>
Cc: Scott Wood <scottwood@freescale.com>
9 years agokeymile/powerpc: move to the architecture-generic board system
Valentin Longchamp [Fri, 3 Oct 2014 09:45:24 +0000 (11:45 +0200)]
keymile/powerpc: move to the architecture-generic board system

This converts all the Keymile powerpc boards to the generic board
initialization.

This includes the 3 Keymile powerpc subsystems: km82xx, km83xx,
and kmp204x.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agopowerpc/mpc83xx: Zero boot_flags arg for calling board_init_f()
Valentin Longchamp [Fri, 3 Oct 2014 09:45:23 +0000 (11:45 +0200)]
powerpc/mpc83xx: Zero boot_flags arg for calling board_init_f()

The argument boot_flags of board_init_f() is not used at all in the
powerpc specific board.c init sequence. Now with the generic init
sequence, this boot_flags arg is used by board_init_f().

This patch sets the r3 register that is used to pass the boot_flags
argument from the start.S board_init_f() call to 0 prior to the function
call to avoid unknown content to end up in gd->flags.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agopowerpc/BSC9131RDB: Enable creation of dynamic partitions for NAND
Ashish Kumar [Tue, 7 Oct 2014 12:32:23 +0000 (18:02 +0530)]
powerpc/BSC9131RDB: Enable creation of dynamic partitions for NAND

* fdt_fixup_mtdparts is called from ft_board_setup
 * Run "mtdparts default" to create NAND partition on uboot
 * Use mtdparts to create partitions dynamically rather
    than using static partitions in device tree

Signed-off-by: Ashish Kumar <Ashish.Kumar@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>