]> git.kernelconcepts.de Git - karo-tx-uboot.git/log
karo-tx-uboot.git
9 years agobuildman: Don't default to -e when building current source
Simon Glass [Thu, 16 Oct 2014 07:05:56 +0000 (01:05 -0600)]
buildman: Don't default to -e when building current source

We probably don't need to enable this option by default. It is useful to
display only failure boards (not errors) and it is easy to add -e if it
is required. Also update the docs.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Albert Aribaud <albert.u.boot@aribaud.net>
9 years agobuildman: Fix repeating board list with -l
Simon Glass [Thu, 16 Oct 2014 07:05:55 +0000 (01:05 -0600)]
buildman: Fix repeating board list with -l

Ensure that we don't print duplicate board names when -l is used.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Albert Aribaud <albert.u.boot@aribaud.net>
9 years agopatman: Use the full commit hash for 'git checkout'
Simon Glass [Wed, 15 Oct 2014 08:27:00 +0000 (02:27 -0600)]
patman: Use the full commit hash for 'git checkout'

Even with the initial 8 characeters of the hash we will sometimes get a
collision. Use the full hash.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agobuildman: Save *.img files too
Tom Rini [Tue, 11 Nov 2014 21:58:44 +0000 (16:58 -0500)]
buildman: Save *.img files too

When saving binary files we likely want to keep any .img files that have
been generated as well.

Signed-off-by: Tom Rini <trini@ti.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agosandbox: Fix warnings in cpu.c and os.c
Simon Glass [Tue, 11 Nov 2014 19:47:08 +0000 (12:47 -0700)]
sandbox: Fix warnings in cpu.c and os.c

This fixes the following two problems:

cppcheck reports:
[arch/sandbox/cpu/start.c:132]: (error) Uninitialized variable: err
[arch/sandbox/cpu/os.c:371]: (error) Memory leak: fname

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Wolfgang Denk <wd@denx.de>
9 years agosandbox: Fix warnings due to 64-bit printf() strings
Simon Glass [Tue, 11 Nov 2014 19:47:07 +0000 (12:47 -0700)]
sandbox: Fix warnings due to 64-bit printf() strings

Now that we have inttypes.h, use it in a few more places to avoid compiler
warnings on sandbox when building on 64-bit machines.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agomtd/nand/vf610_nfc: Disable subpage writes
Sanchayan Maity [Mon, 24 Nov 2014 05:33:59 +0000 (11:03 +0530)]
mtd/nand/vf610_nfc: Disable subpage writes

This patch disables subpage writes for vf610_nfc nand
driver. This is required, as without this fix, writing
unaligned u-boot images with DFU results in a hang.
Trying to write unalgined binary images also results
in a hang, without disabling subpage writes.

Patch has been tested on a Colibri VF61 module.

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
9 years agomtd: denali: set some registers after nand_scan_ident()
Masahiro Yamada [Thu, 13 Nov 2014 11:31:51 +0000 (20:31 +0900)]
mtd: denali: set some registers after nand_scan_ident()

Some but not all of implementations of the Denali NAND controller
have hardware circuits to detect the device parameters such as
page_size, erase_size, etc.  Even on those SoCs with such hardware
supported, the hardware is known to detect wrong parameters for some
nasty (almost buggy) NAND devices.  The device parameters detected
during nand_scan_ident() are more trustworthy.

This commit sets some hardware registers to mtd->pagesize,
mtd->oobsize, etc. in the code between nand_scan_ident() and
nand_scan_tail().

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Chin Liang See <clsee@altera.com>
9 years agomtd: denali: use CONFIG_SYS_NAND_SELF_INIT
Masahiro Yamada [Thu, 13 Nov 2014 11:31:50 +0000 (20:31 +0900)]
mtd: denali: use CONFIG_SYS_NAND_SELF_INIT

Some variants of the Denali NAND controller need some registers
set up based on the device information that has been detected during
nand_scan_ident().

CONFIG_SYS_NAND_SELF_INIT has to be defined to insert code between
nand_scan_ident() and nand_scan_tail().  It is also helpful to reduce
the difference between this driver and its Linux counterpart because
this driver was ported from Linux.  Moreover, doc/README.nand recommends
to use CONFIG_SYS_NAND_SELF_INIT.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Chin Liang See <clsee@altera.com>
9 years agonand: reinstate lazy bad block scanning
Rostislav Lisovy [Wed, 22 Oct 2014 11:40:44 +0000 (13:40 +0200)]
nand: reinstate lazy bad block scanning

Commit ff94bc40af3481d47546595ba73c136de6af6929
("mtd, ubi, ubifs: resync with Linux-3.14")
accidentally reverted part of the commit
13f0fd94e3cae6f8a0d9fba5d367e311edc8ebde
("NAND: Scan bad blocks lazily.").

Reinstate the change as by commit
fb49454b1b6c7c6e238ac3c0b1e302e73eb1a1ea
("nand: reinstate lazy bad block scanning")

Signed-off-by: Rostislav Lisovy <lisovy@merica.cz>
Acked-by: Heiko Schocher <hs@denx.de>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-fsl-qoriq
Tom Rini [Tue, 25 Nov 2014 21:51:47 +0000 (16:51 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-fsl-qoriq

9 years agoMerge branch 'master' of git://git.denx.de/u-boot-mpc85xx
Tom Rini [Wed, 26 Nov 2014 16:22:29 +0000 (11:22 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx

Conflicts:
drivers/mmc/fsl_esdhc.c

Signed-off-by: Tom Rini <trini@ti.com>
9 years agospl: Fix SPL EXT support
Guillaume GARDET [Tue, 25 Nov 2014 14:34:16 +0000 (15:34 +0100)]
spl: Fix SPL EXT support

Commit 9f12cd0e062614e19734b2ab37842d387457c5e5 has broken SPL EXT support.
This patch update error code check to get SPL EXT support working again.

Tested on a Pandaboard (rev. A3).

Reviewed-by: Suriyan Ramasami <suriyan.r@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Cc: Tom Rini <trini@ti.com>
9 years agoMerge branch 'master' of http://git.denx.de/u-boot-samsung
Tom Rini [Tue, 25 Nov 2014 16:10:01 +0000 (11:10 -0500)]
Merge branch 'master' of http://git.denx.de/u-boot-samsung

9 years agoMerge branch 'master' of http://git.denx.de/u-boot-sunxi
Tom Rini [Tue, 25 Nov 2014 16:09:48 +0000 (11:09 -0500)]
Merge branch 'master' of http://git.denx.de/u-boot-sunxi

9 years agoMerge git://git.denx.de/u-boot-fdt
Tom Rini [Tue, 25 Nov 2014 16:08:52 +0000 (11:08 -0500)]
Merge git://git.denx.de/u-boot-fdt

9 years agotools: Add ifdtool to .gitignore
Bin Meng [Tue, 25 Nov 2014 02:20:08 +0000 (10:20 +0800)]
tools: Add ifdtool to .gitignore

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agox86: chromebook_link: Enable the Chrome OS EC
Simon Glass [Sat, 15 Nov 2014 03:56:45 +0000 (20:56 -0700)]
x86: chromebook_link: Enable the Chrome OS EC

Enable the Chrome OS EC so that it can be used from U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: chromebook_link: Enable the x86 emulator
Simon Glass [Sat, 15 Nov 2014 03:56:44 +0000 (20:56 -0700)]
x86: chromebook_link: Enable the x86 emulator

Enable this so that it can be used instead of native execution if desired.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agobios_emulator: Always print errors when opcode decode fails
Simon Glass [Sat, 15 Nov 2014 03:56:43 +0000 (20:56 -0700)]
bios_emulator: Always print errors when opcode decode fails

This is a rare event and should not happen. When it does it is confusing to
work out why. At least we should print a message.

Adjust the emulator to always print decode errors to the console.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agobios_emulator: Add an option to enable debugging
Simon Glass [Sat, 15 Nov 2014 03:56:42 +0000 (20:56 -0700)]
bios_emulator: Add an option to enable debugging

At present there are DEBUG options spread around the place. If you enable
one and not another you can end up with an emulator that does not work,
since each file can have a different view of what the registers look like.
To fix this, create a global CONFIG_X86EMU_DEBUG option that keeps
everything consistent.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agobios_emulator: Allow a custom interrupt handler to be installed
Simon Glass [Sat, 15 Nov 2014 03:56:41 +0000 (20:56 -0700)]
bios_emulator: Allow a custom interrupt handler to be installed

Sometime we want to provide an interrupt handler for the ROM, Add a
function to allow this.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agobios_emulator: Add vesa support and allow ROMs to be passed in as data
Simon Glass [Sat, 15 Nov 2014 03:56:40 +0000 (20:56 -0700)]
bios_emulator: Add vesa support and allow ROMs to be passed in as data

As well as locating the ROM on the PCI bus, allow the ROM to be supplied to
the emulator. Split the init up a little so that callers can supply their
own interrupt routines. Also allow a vesa mode to be provided, to be
selected once the BIOS run is complete.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agobios_emulator: Allow x86 to use the emulator
Simon Glass [Sat, 15 Nov 2014 03:56:39 +0000 (20:56 -0700)]
bios_emulator: Allow x86 to use the emulator

There is an implicit assumption that x86 machines want to use raw I/O in the
BIOS emulator, but this should be selectable. Add an CONFIG_X86EMU_RAW_IO
option to control it instead.

Also fix a few bugs which cause warnings on x86 and adjust the Makefile to
remove the assumption that only PowerPC uses the emulator.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: config: Enable video support for chromebook_link
Simon Glass [Sat, 15 Nov 2014 03:56:38 +0000 (20:56 -0700)]
x86: config: Enable video support for chromebook_link

Now that we have the required drivers, enable video support with a suitable
option ROM.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: dts: Add video information to the device tree
Simon Glass [Sat, 15 Nov 2014 03:56:37 +0000 (20:56 -0700)]
x86: dts: Add video information to the device tree

This provides panel timing information needed by the video driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: Add initial video device init for Intel GMA
Simon Glass [Sat, 15 Nov 2014 03:56:36 +0000 (20:56 -0700)]
x86: Add initial video device init for Intel GMA

Intel's Graphics Media Accelerator (GMA) is a generic name for a wide range
of video devices. Add code to set up the hardware on ivybridge. Part of the
init happens in native code, part of it happens in a 16-bit option ROM for
those nostalgic for the 1970s.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: Allow an option ROM to be built into U-Boot
Simon Glass [Sat, 15 Nov 2014 03:56:35 +0000 (20:56 -0700)]
x86: Allow an option ROM to be built into U-Boot

Some x86 machines require a binary blob containing 16-bit initialisation
code for their video hardware. Allow this to be built into the x86 ROM so
that it is accessible during boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: video: Add video driver for bare x86 boards
Simon Glass [Sat, 15 Nov 2014 03:56:34 +0000 (20:56 -0700)]
x86: video: Add video driver for bare x86 boards

Add a very simple driver which uses vesa to discover the video mode and
then provides a frame buffer for use by U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
9 years agopci: Add general support for execution of video ROMs
Simon Glass [Sat, 15 Nov 2014 03:56:33 +0000 (20:56 -0700)]
pci: Add general support for execution of video ROMs

Some platforms don't have native code for dealing with their video
hardware. In some cases they use a binary blob to set it up and perform
required actions like setting the video mode. This approach is a hangover
from the old PC days where a ROM was provided and executed during startup.

Even now, these ROMs are supplied as a way to set up video. It avoids the
code for every video chip needing to be provided in the boot loader. But
it makes the video much less flexible - e.g. it is not possible to do
anything else while the video init is happening (including waiting hundreds
of milliseconds for display panels to start up).

In any case, to deal with this sad state of affairs, provide an API for
execution of x86 video ROMs, either natively or through emulation.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: Add support for running option ROMs natively
Simon Glass [Sat, 15 Nov 2014 03:56:32 +0000 (20:56 -0700)]
x86: Add support for running option ROMs natively

On x86 machines we can use an emulator to run option ROMS as with other
architectures. But with some additional effort (mostly due to the 16-bit
nature of option ROMs) we can run them natively. Add support for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoAdd support for Vesa BIOS extensions
Simon Glass [Sat, 15 Nov 2014 03:56:31 +0000 (20:56 -0700)]
Add support for Vesa BIOS extensions

For option ROMs we can use these extensions to request a particular video
mode. Add a header file which defines the binary interface.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: Add vesa mode configuration options
Simon Glass [Sat, 15 Nov 2014 03:56:30 +0000 (20:56 -0700)]
x86: Add vesa mode configuration options

Add Kconfig options to allow selection of a vesa mode on x86 machines.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: Add GDT descriptors for option ROMs
Simon Glass [Sat, 15 Nov 2014 03:56:29 +0000 (20:56 -0700)]
x86: Add GDT descriptors for option ROMs

Option ROMs require a few additional descriptors. Add these, and remove the
enum since we now have to access several descriptors from assembler.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoIntroduce a header file for the BIOS emulator
Simon Glass [Sat, 15 Nov 2014 03:56:28 +0000 (20:56 -0700)]
Introduce a header file for the BIOS emulator

We should have a public header so that users can avoid defining functions
themselves.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: Add a definition of asmlinkage
Simon Glass [Sat, 15 Nov 2014 03:56:27 +0000 (20:56 -0700)]
x86: Add a definition of asmlinkage

This is needed to permit calling C from assembler without too much pain.
Add a definition for x86.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: config: Enable SPI for chromebook_link
Simon Glass [Tue, 25 Nov 2014 04:18:19 +0000 (21:18 -0700)]
x86: config: Enable SPI for chromebook_link

Enable SPI so that the SPI flash can be used.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: ivybridge: Add northbridge init functions
Simon Glass [Tue, 25 Nov 2014 04:18:18 +0000 (21:18 -0700)]
x86: ivybridge: Add northbridge init functions

Add init for the northbridge, another part of the platform controller hub.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: Drop some msr functions that we don't support
Simon Glass [Tue, 25 Nov 2014 04:18:17 +0000 (21:18 -0700)]
x86: Drop some msr functions that we don't support

These are not available in U-Boot as yet, so drop them.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: Add init for model 206AX CPU
Simon Glass [Tue, 25 Nov 2014 04:18:16 +0000 (21:18 -0700)]
x86: Add init for model 206AX CPU

Add the setup code for the CPU so that it can be used at full speed.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: Add LAPIC setup code
Simon Glass [Tue, 25 Nov 2014 04:18:15 +0000 (21:18 -0700)]
x86: Add LAPIC setup code

Add code to set up the Local Advanced Peripheral Interrupt Controller.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: Drop old CONFIG_INTEL_CORE_ARCH code
Simon Glass [Tue, 25 Nov 2014 04:18:14 +0000 (21:18 -0700)]
x86: Drop old CONFIG_INTEL_CORE_ARCH code

This is no-longer used, so drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: Remove unnecessary call to initr_enable_interrupts()
Bin Meng [Thu, 20 Nov 2014 08:11:27 +0000 (16:11 +0800)]
x86: Remove unnecessary call to initr_enable_interrupts()

Actually initr_enable_interrupts() was never called in an x86 build
due to it was wrapped by CONFIG_x86 (typo of X86).

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: Refactor interrupt_init()
Bin Meng [Thu, 20 Nov 2014 08:11:16 +0000 (16:11 +0800)]
x86: Refactor interrupt_init()

Rename interrupt_init() in arch/x86/lib/pcat_interrupts.c to
i8259_init() and create a new interrupt_init() in
arch/x86/cpu/interrupt.c to call i8259_init() followed by a
call to cpu_init_interrupts().

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: Remove cpu_init_r() for x86
Bin Meng [Thu, 20 Nov 2014 08:11:00 +0000 (16:11 +0800)]
x86: Remove cpu_init_r() for x86

Since cpu_init_interrupts() was moved out of cpu_init_r(), it is
useless to keep cpu_init_r() for x86, thus remove it.

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: Call cpu_init_interrupts() from interrupt_init()
Bin Meng [Thu, 20 Nov 2014 08:10:49 +0000 (16:10 +0800)]
x86: Call cpu_init_interrupts() from interrupt_init()

Currently cpu_init_interrupts() is called from cpu_init_r() to
setup the interrupt and exception of the cpu core, but at that
time the i8259 has not been initialized to mask all the irqs
and remap the master i8259 interrupt vector base, so the whole
system is at risk of being interrupted, and if interrupted,
wrong interrupt/exception message is shown.

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 Intel speedstep and turbo mode code
Simon Glass [Sat, 15 Nov 2014 01:18:43 +0000 (18:18 -0700)]
x86: Add Intel speedstep and turbo mode code

Intel chips have a turbo mode where they can run faster for a short period
until they reach thermal limits. Add code to adjust and query this feature.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: ivybridge: Set up XHCI USB
Simon Glass [Sat, 15 Nov 2014 01:18:42 +0000 (18:18 -0700)]
x86: ivybridge: Set up XHCI USB

Add init for XHCI so that high-speed USB can be used.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: config: Enable USB on link
Simon Glass [Sat, 15 Nov 2014 01:18:41 +0000 (18:18 -0700)]
x86: config: Enable USB on link

Enable USB support on link - there are two EHCI ports available.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: ivybridge: Set up EHCI USB
Simon Glass [Sat, 15 Nov 2014 01:18:40 +0000 (18:18 -0700)]
x86: ivybridge: Set up EHCI USB

Add init for EHCI so that USB can be used.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: dts: Add SATA settings for link
Simon Glass [Sat, 15 Nov 2014 01:18:39 +0000 (18:18 -0700)]
x86: dts: Add SATA settings for link

Add the requires settings to enable SATA on link.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: ivybridge: Add SATA init
Simon Glass [Sat, 15 Nov 2014 01:18:38 +0000 (18:18 -0700)]
x86: ivybridge: Add SATA init

Add code to set up the SATA interfaces on boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: dts: Add LPC settings for link
Simon Glass [Sat, 15 Nov 2014 01:18:37 +0000 (18:18 -0700)]
x86: dts: Add LPC settings for link

Add some settings required to set up the LPC correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: dts: Move PCI peripherals into a pci node
Simon Glass [Sat, 15 Nov 2014 01:18:36 +0000 (18:18 -0700)]
x86: dts: Move PCI peripherals into a pci node

These peripherals should not be at the top level, since they exist inside
the PCI bus. We don't have a full device tree node for pci yet, but we
should at least put it at the right level.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: ivybridge: Add additional LPC init
Simon Glass [Sat, 15 Nov 2014 01:18:35 +0000 (18:18 -0700)]
x86: ivybridge: Add additional LPC init

Set up all the remaining pieces of the LPC (low-pin-count) peripheral in
PCH (Peripheral Controller Hub).

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: ivybridge: Add PCH init
Simon Glass [Sat, 15 Nov 2014 01:18:34 +0000 (18:18 -0700)]
x86: ivybridge: Add PCH init

Add required init for the Intel Platform Controller Hub in ivybridge.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: Add a simple header file for ACPI
Simon Glass [Sat, 15 Nov 2014 01:18:33 +0000 (18:18 -0700)]
x86: Add a simple header file for ACPI

We don't use many features yet, so this only has a few declarations.
It will be expanded as needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: ivybridge: Add support for BD82x6x PCH
Simon Glass [Sat, 15 Nov 2014 01:18:32 +0000 (18:18 -0700)]
x86: ivybridge: Add support for BD82x6x PCH

Add basic setup for the PCH.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: Set up edge triggering on interrupt 9
Simon Glass [Sat, 15 Nov 2014 01:18:31 +0000 (18:18 -0700)]
x86: Set up edge triggering on interrupt 9

Add this additional init in case it is needed by the OS.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agopci: Add functions to read and write a BAR address
Simon Glass [Sat, 15 Nov 2014 01:18:30 +0000 (18:18 -0700)]
pci: Add functions to read and write a BAR address

Some PCI functions cannot be auto-configured. Add a function to set up a
fixed BAR which can be used in these situations. Also add a function to read
the current address of a BAR.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: config: Enable plug-and-play for link PCI
Simon Glass [Sat, 15 Nov 2014 01:18:29 +0000 (18:18 -0700)]
x86: config: Enable plug-and-play for link PCI

Enable this option so that we can configure the available PCI devices. Also
make sure that PCI is available early after relocation as we use it for
several other subsystems.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: pci: Add handlers before and after a PCI hose scan
Simon Glass [Sat, 15 Nov 2014 01:18:28 +0000 (18:18 -0700)]
x86: pci: Add handlers before and after a PCI hose scan

Some boards will want to do some setup before and after a PCI hose
is scanned.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: Add ioapic.h header
Simon Glass [Sat, 15 Nov 2014 01:18:27 +0000 (18:18 -0700)]
x86: Add ioapic.h header

Add definitions for the I/O Advanced Peripheral Interrupt Controller.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agortc: mc146818: Set up RTC at start of day
Simon Glass [Sat, 15 Nov 2014 01:18:26 +0000 (18:18 -0700)]
rtc: mc146818: Set up RTC at start of day

Provide a function to set up the RTC ready for use.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: Factor out common values in the link script
Simon Glass [Sat, 15 Nov 2014 01:18:25 +0000 (18:18 -0700)]
x86: Factor out common values in the link script

Define the reset base in config.mk so that it does not need to be calculated
twice in the link script. Also tidy up the START_16 and RESET_VEC_LOC values
to fit with this new approach.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: Ensure that all relocation data is included in the image
Simon Glass [Sat, 15 Nov 2014 01:18:24 +0000 (18:18 -0700)]
x86: Ensure that all relocation data is included in the image

Some toolchains put the relocation data into separate sections. Adjust the
linker script to catch this case. Without relocation data, U-Boot will not
boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: Panic if there is no relocation data
Simon Glass [Sat, 15 Nov 2014 01:18:23 +0000 (18:18 -0700)]
x86: Panic if there is no relocation data

This normally indicates a problem which will prevent relocation from
functioning, resulting in a hang. Panic in this case to make it easier
to debug.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agox86: Remove board_early_init_r()
Simon Glass [Sat, 15 Nov 2014 01:18:22 +0000 (18:18 -0700)]
x86: Remove board_early_init_r()

This function is not needed. Remove it to improve the generic init sequence
slightly.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
9 years agopci: Update pci_ids.h to include some missing IDs
Simon Glass [Sat, 15 Nov 2014 01:18:21 +0000 (18:18 -0700)]
pci: Update pci_ids.h to include some missing IDs

This was taken from Linux 3.18 with some additional IDs from Chrome OS
Coreboot commit 688ef385.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoAlign embedded device tree correctly
Simon Glass [Sat, 15 Nov 2014 01:18:19 +0000 (18:18 -0700)]
Align embedded device tree correctly

Device trees must be aligned to a 4-byte boundary. This was dropped in the
Kbuild conversion. Bring it back, and use 16-byte alignment for good
measure.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoFix SIZE_MAX compiler warning when using stdint.h
Simon Glass [Tue, 25 Nov 2014 04:18:21 +0000 (21:18 -0700)]
Fix SIZE_MAX compiler warning when using stdint.h

This new symbol may be defined by the compiler. If it is, avoid a compiler
warning when USE_STDINT is defined.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agox86: Add ivybridge directory to Makefile
Simon Glass [Tue, 25 Nov 2014 04:18:20 +0000 (21:18 -0700)]
x86: Add ivybridge directory to Makefile

It is now required to add subdirectories in the x86 cpu Makefile. Add this
to fix a build breakage for chromebook_link.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agosun7i: Set ARMV7_BOOT_SEC_DEFAULT when OLD_SUNXI_KERNEL_COMPAT is set
Hans de Goede [Fri, 24 Oct 2014 18:12:04 +0000 (20:12 +0200)]
sun7i: Set ARMV7_BOOT_SEC_DEFAULT when OLD_SUNXI_KERNEL_COMPAT is set

Old kernels cannot handle booting in non-secure (hyp) mode, so when
OLD_SUNXI_KERNEL_COMPAT is set, also set ARMV7_BOOT_SEC_DEFAULT.

Note that whether to booting secure or non-secure can always be overriden
using the bootm_boot_mode environment variable.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosun7i: Drop CONFIG_ARMV7_PSCI_NR_CPUS
Hans de Goede [Fri, 24 Oct 2014 14:38:05 +0000 (16:38 +0200)]
sun7i: Drop CONFIG_ARMV7_PSCI_NR_CPUS

It is not used anywhere.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosun6i: Drop some "unknown magic" from dram init
Hans de Goede [Sat, 15 Nov 2014 22:19:42 +0000 (23:19 +0100)]
sun6i: Drop some "unknown magic" from dram init

Allwinner tells us that this bit of code is the rtc ram being used to detect
coming out of "super-standby" mode, and if that is the case, going out of
self-refresh mode.

Since we do not support "super-standby" mode, this can be dropped.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosun6i: Add gmac support for sun6i boards
Hans de Goede [Fri, 21 Nov 2014 16:19:45 +0000 (17:19 +0100)]
sun6i: Add gmac support for sun6i boards

Hookup the gmac found on the sun6i / A31 SoCs.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosun6i: Correct Mele M9 Vbus gpio settings
Hans de Goede [Sun, 23 Nov 2014 11:33:20 +0000 (12:33 +0100)]
sun6i: Correct Mele M9 Vbus gpio settings

I noticed that the kernel and u-boot settings were different, double checking
has confirmed that the kernel settings are correct.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: ahci: Add a delay after enabling target power
Hans de Goede [Fri, 14 Nov 2014 15:27:07 +0000 (16:27 +0100)]
sunxi: ahci: Add a delay after enabling target power

If the target power is connected through a gpio, then give the target some
time to power up before continuing with ahci / sata probing, this avoids
link timeouts, without penalizing other boards where there is no target
power gpio.

Why 500 ms ? I started with 200, that was not enough, then I went to 500 which
worked, lowering it to 350 broke things again, so 500 seems the minimum my
vertex2 needs to be ready to get probed.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: Add usb keyboard Kconfig option
Hans de Goede [Thu, 18 Sep 2014 19:03:34 +0000 (21:03 +0200)]
sunxi: Add usb keyboard Kconfig option

For use together with the hdmi console.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
9 years agosunxi: video: Add simplefb support
Luc Verhaegen [Wed, 13 Aug 2014 05:55:07 +0000 (07:55 +0200)]
sunxi: video: Add simplefb support

Add simplefb support, note this depends on the kernel having support for
the clocks property which has recently been added to the simplefb devicetree
binding.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
[hdegoede@redhat.com: Use pre-populated simplefb node under /chosen as
 disussed on the devicetree list]
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>.
9 years agocommon/lcd: Make lcd_dt_simplefb_configure_node use fdt_setup_simplefb_node
Hans de Goede [Wed, 19 Nov 2014 12:53:27 +0000 (13:53 +0100)]
common/lcd: Make lcd_dt_simplefb_configure_node use fdt_setup_simplefb_node

Change lcd_dt_simplefb_configure_node into a wrapper around the new generic
fdt_setup_simplefb_node helper function.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agofdt_support: Add a fdt_setup_simplefb_node helper function
Hans de Goede [Mon, 17 Nov 2014 14:29:11 +0000 (15:29 +0100)]
fdt_support: Add a fdt_setup_simplefb_node helper function

Add a generic helper to fill and enable simplefb nodes.

The first user of this will be the sunxi display code.

lcd_dt_simplefb_configure_node is also a good candidate to be converted
to use this, but that requires someone to run some tests first, as
lcd_dt_simplefb_configure_node does not honor #address-cells and #size-cells,
but simply assumes 1 and 1 for both.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agosunxi: video: Add sun6i support
Hans de Goede [Fri, 14 Nov 2014 16:42:14 +0000 (17:42 +0100)]
sunxi: video: Add sun6i support

Besided needing the usual sun6i specific ahb1_reset bits poking, it turns out
that sun6i also needs the drc to be taken out of reset and clocked even though
it is in pass-through mode.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Anatolij Gustschin <agust@denx.de>
9 years agosunxi: video: Add cfb console driver for sunxi
Luc Verhaegen [Wed, 13 Aug 2014 05:55:06 +0000 (07:55 +0200)]
sunxi: video: Add cfb console driver for sunxi

This adds a fixed mode hdmi driver for the sunxi platform. The fixed
mode is a relatively safe 1024x768, more complete EDID handling is
currently not provided. Only HDMI is supported today.

This code is enabled when HPD detects an attached monitor.

Current config is such that 8MB is shaved off at the top of the RAM.
This avoids several memory handling issues, most significant is the fact
that on linux on ARM you are not allowed to remap known RAM as IO. A
clued in display driver will be able to recycle this reserved RAM in
future though.

cfbconsole was chosen as it provides the most important functionality: a
working u-boot console, allowing for the debugging of certain issues
without the need for a UART.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
[hdegoede@redhat.com: Major cleanups and some small bugfixes]
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Anatolij Gustschin <agust@denx.de>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: Add video pll clock functions
Hans de Goede [Sat, 8 Nov 2014 13:07:27 +0000 (14:07 +0100)]
sunxi: Add video pll clock functions

This is a preparation patch for adding support for HDMI out.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosun4i: Rename dram_clk_cfg to dram_clk_gate
Hans de Goede [Sun, 9 Nov 2014 11:24:55 +0000 (12:24 +0100)]
sun4i: Rename dram_clk_cfg to dram_clk_gate

The data sheet just calls it DRAM_CLK_REG, and on sun6i we've both a
dram_clk_cfg and dram_clk_gate, and the sun4i reg matches dram_clk_gate on
sun6i, so name it the same on sun4i.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agoORIGEN: Enhance origen config to be more flexible on boot.
Guillaume GARDET [Wed, 8 Oct 2014 13:04:38 +0000 (15:04 +0200)]
ORIGEN: Enhance origen config to be more flexible on boot.

This patch enhances the boot of origen board by adding support to ext2, bootz, initrd, bootenv loading and boot script.
It still keeps the previous mmc load command if boot script fails.

Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agoRevert "common/board_f: add setup of initial stack frame for MIPS"
Tom Rini [Mon, 24 Nov 2014 22:20:46 +0000 (17:20 -0500)]
Revert "common/board_f: add setup of initial stack frame for MIPS"

Daniel discovered a better solution to the problem this was solving, so
don't do what this patch was doing anymore.

This reverts commit 666ba8444e81c3785a427ae6922e2feededab9a3.

Signed-off-by: Tom Rini <trini@ti.com>
9 years agoPrepare v2015.01-rc2
Tom Rini [Mon, 24 Nov 2014 22:08:47 +0000 (17:08 -0500)]
Prepare v2015.01-rc2

Signed-off-by: Tom Rini <trini@ti.com>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Tom Rini [Mon, 24 Nov 2014 22:05:11 +0000 (17:05 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

9 years agoarm: ls102xa: Select ge2_clk125 for eTSEC clock muxing
Alison Wang [Fri, 17 Oct 2014 07:26:36 +0000 (15:26 +0800)]
arm: ls102xa: Select ge2_clk125 for eTSEC clock muxing

EC1 pins in RCW can be selected as RGMII1, GPIO3, CAN1/2, FTM1 or
SAI1/2. There is a bug that EC3 RGMII could not work when selecting EC1
as other functionality except RGMII. The workaround is to select
ge2_clk125 for eTSEC clock muxing in register SCFG_ETSECCMCR.

Signed-off-by: Alison Wang <alison.wang@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoarm: ls102xa: Add SystemID EEPROM support for LS1021ATWR board
Alison Wang [Fri, 17 Oct 2014 07:26:35 +0000 (15:26 +0800)]
arm: ls102xa: Add SystemID EEPROM support for LS1021ATWR board

SystemID information could be read through I2C1 from EEPROM
on LS1021ATWR board.

As LS1 is a little-endian processor, getting the version ID by
be32_to_cpu() is wrong. Fix it by using e.version directly.
This change will be compatible for both ARM and PowerPC.

As there is an errata that I2C1 could not work in SD boot,
reading EEPROM through I2C1 is disabled too in SD boot.

Signed-off-by: Alison Wang <alison.wang@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agols102xa: ifc: nor: fix the write issue when bytes unaligned
Yuan Yao [Fri, 17 Oct 2014 07:26:34 +0000 (15:26 +0800)]
ls102xa: ifc: nor: fix the write issue when bytes unaligned

Add define CONFIG_SYS_WRITE_SWAPPED_DATA.
For LS1021AQDS and LS1021QTWR nor flash write should swap the
bytes when handle unaligned tail bytes.

Because of the ending, if the date bus width is 16-bits and the
number of bytes is odd, we should swap the byte when write the
last one.

Signed-off-by: Yuan Yao <yao.yuan@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoarm: ls102xa: Remove bit reversing for SCFG registers
Alison Wang [Fri, 17 Oct 2014 07:26:33 +0000 (15:26 +0800)]
arm: ls102xa: Remove bit reversing for SCFG registers

SCFG_SCFGREVCR is SCFG bit reverse register. This register
must be written with 0xFFFFFFFF before writing to any other
SCFG register. Then other SCFG register could be written in
big-endian mode.

Address: 157_0000h base + 200h offset = 157_0200h
Bit   0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15|16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
W/R                                   SCFGREV
Reset 0 0 0 0 0 0 0 0 0 0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
0-31
SCFGREV SCFG Bit Reverse Control Filed
32'h 0000_0000 - No bit reverse is applied
32'h FFFF_FFFF - Bit reverse is applied; so 31:0 will be stored/read as
0:31

This patch removes the bit reversing for SCFG registers in
u-boot. It will be implemented through PBI commands in RCW
.pbi
write 0x570200, 0xffffffff
.end
So other SCFG register could be written in big-endian mode
in u-boot or kernel directly.

Signed-off-by: Alison Wang <alison.wang@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoarm: ls102xa: Add snoop disable for slave port 0, 1 and 2
Jason Jin [Fri, 17 Oct 2014 07:26:32 +0000 (15:26 +0800)]
arm: ls102xa: Add snoop disable for slave port 0, 1 and 2

Disable the snoop for slave interface 0, 1 and 2
to avoid the interleaving on the CCI400 BUS.

Signed-off-by: Jason Jin <Jason.Jin@freescale.com>
Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agols1: config: Enable USB EHCI Host on LS1021AQDS
Nikhil Badola [Fri, 17 Oct 2014 06:07:25 +0000 (11:37 +0530)]
ls1: config: Enable USB EHCI Host on LS1021AQDS

Enable USB EHCI Host on LS1021AQDS

Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agodrivers: usb: fsl: Define USB configs for LS102XA
Nikhil Badola [Fri, 17 Oct 2014 06:05:46 +0000 (11:35 +0530)]
drivers: usb: fsl: Define USB configs for LS102XA

Define USB configs for LS1021XA such as CONFIG_SYS_FSL_USB1_ADDR,
CONFIG_USB_MAX_CONTROLLER_COUNT

Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agodrivers : usb: fsl: Implement usb Erratum A007798 workaround
Nikhil Badola [Fri, 17 Oct 2014 03:42:07 +0000 (09:12 +0530)]
drivers : usb: fsl: Implement usb Erratum A007798 workaround

Set TXFIFOTHRESH to adjust ddr pipeline delay for successful large
usb writes

Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoRevert "hush: fix segfault on syntax error"
Rabin Vincent [Fri, 21 Nov 2014 22:05:22 +0000 (23:05 +0100)]
Revert "hush: fix segfault on syntax error"

128059b92 ("hush: fix segfault on syntax error") attempted to fix a
segfault on syntax errors, but it broke Ctrl-C handling, and the
assumption that it made, that rcode could not be -1, is incorrect.
Revert this change.

Reported-by: Stephen Warren <swarren@wwwdotorg.org>
Reported-by: Przemyslaw Marczak <p.marczak@samsung.com>
Signed-off-by: Rabin Vincent <rabin@rab.in>
9 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-imx
Tom Rini [Mon, 24 Nov 2014 17:02:12 +0000 (12:02 -0500)]
Merge branch 'master' of git://www.denx.de/git/u-boot-imx