Tom Rini [Wed, 11 Feb 2015 00:07:22 +0000 (19:07 -0500)]
spl_atmel.c: Switch s_init to board_init_f
To facilitate changing lowlevel_init to become s_init, move the current
contents of s_init into board_init_f and add the rest of what
board_init_f does here.
In order to compile clean without CONFIG_SKIP_LOWLEVEL_INIT set, leave an
empty stub of s_init(). It can be removed when lowlevel_init becomes s_init.
Cc: Bo Shen <voice.shen@atmel.com> Cc: Andreas Bießmann <andreas.devel@googlemail.com> Tested-by: Matt Porter <mporter@konsulko.com> on sama5d3_xplained Signed-off-by: Tom Rini <trini@ti.com>
[rebased on current master, leave s_init() as empty stub] Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Iain Paton [Sat, 28 Mar 2015 10:26:38 +0000 (10:26 +0000)]
sunxi: use CONFIG_SYS_CLK_FREQ to set cpu clock
make the CPU clock selectable via Kconfig
this removes the sunxi specific CONFIG_CLK_FULL_SPEED defined in each
soc header and replaces it's use in board/sunxi/board.c with
CONFIG_SYS_CLK_FREQ from Kconfig which allows us to configure board
specific frequency on boot
Signed-off-by: Iain Paton <ipaton0@gmail.com>
[hdegoede@redhat.com s/CONFIG_SYS_CLK_FREQ/CONFIG_TIMER_CLK_FREQ/ for the
arch-timer clk speed on sun7i to fix mis-compile on sun7i] Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Iain Paton [Sat, 28 Mar 2015 10:25:28 +0000 (10:25 +0000)]
sunxi: sun4i: improve cpu clock selection method
clock_set_pll1 would pick the next highest available cpu clock speed if
a value not in the pre defined table was selected. this potentially
results in overclocking the soc.
reverse the selection method so that we select the next lowest speed
and add the missing 912Mhz setting that's requested by sun7i which also
uses the sun4i clock code.
Signed-off-by: Iain Paton <ipaton0@gmail.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Hans de Goede [Fri, 27 Mar 2015 19:54:25 +0000 (20:54 +0100)]
sunxi: musb: Fix some lo speed devices not working with musb host
The usb0 / otg phy on sunxi boards has a bug where it wrongly detects a
high speed squelch on usb reset deassert when a lo speed device is plugged in.
The android kernel has a work around for this in the form of temporary
disabling the phy's squelch detection on reset deassert, this commit adds
the same workaround to the u-boot sunxi musb code, thereby fixing various usb
lo speed devices not working.
Tested with a (before non working) usb keyboard and a usb 2.4 GHz wireless
keyboard/mouse combo receiver.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
powerpc: ppc4xx: convert AMCC boards to generic board
Add CONFIG_SYS_GENERIC_BOARD to amcc-common.h and CONFIG_DISPLAY_BOARDINFO
to Kconfig files. canyonlands.h includes amcc-common.h, so remove
CONFIG_SYS_GENERIC_BOARD definition there.
Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: Stefan Roese <sr@denx.de> Cc: Feng Kan <fkan@amcc.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Tom Rini <trini@konsulko.com>
Brian McFarland [Thu, 12 Mar 2015 15:52:49 +0000 (11:52 -0400)]
Patch to mkenvimage to handle text files with length that exceed env size
The current head revision of mkenvimage
(e72be8947e129f5ab274c0a9f235d2cc0014b2ea) will prevent you from creating
an env image from a text file that is larger than the env length specified
by the '-s' option. That doesn't make sense given that the tool now allows
comments and blank lines. This patch removes that limitation and allows
longer text files to be used.
I don't have time / desire at the moment to figure out "patman" and could
really care less if this is adopted up stream. Just figured I would share
in case anybody else finds it useful enough to take time to do a proper
patch.
>From 39ff30190c2bf687861f4b4b33230f1944fb64f9 Mon Sep 17 00:00:00 2001
From: Brian McFarland <bmcfarland@rldrake.com>
Date: Thu, 12 Mar 2015 11:37:19 -0400
Subject: [PATCH] In mkenvimage, removed the check that prevented using a
source text file larger than the output environment image. Instead, the main
parsing loop checks to see if the environment buffer is full, and quits if it
is. After the main parse loop, a second loop swallows comments and
whitespace until either the EOF is reached or more env vars are found, in
which case an error will be thrown.
Alexey Brodkin [Tue, 24 Mar 2015 08:12:47 +0000 (11:12 +0300)]
common/board_f: move board_init_f_mem() from #else CONFIG_X86
Purpose of this change is to make it possible to re-use code currently
used on X86 solely for other architectures. For example:
* init_sequence_f_r
* board_init_f_r
Even though board_init_f_mem() has nothing to do with any particular
architecture it won't work (at least in current implementation) for X86.
This is because on X86 "gd" is an alias to function get_fs_gd_ptr(),
thus we cannot assign anything to it.
So this change separates selection of board_init_f_mem() from X86 while
keeping it disabled for X86 still.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com>
Linus Walleij [Mon, 23 Mar 2015 10:06:14 +0000 (11:06 +0100)]
vexpress64: cut config and defaults for unclear variant
This variant that is neither FVP / Base Model or Juno Versatile
Express 64bit is confusing. Get rid of it unless someone can
point out what machine that really is. Seems to be an evolutional
artifact in the config base.
Linus Walleij [Mon, 23 Mar 2015 10:06:13 +0000 (11:06 +0100)]
armv8: semihosting: delete external interface
Now that loading files using semihosting can be done using
a command in standard scripts, and we have rewritten the boardfile
and added it to the Vexpress64, let's delete the external
interface to the semihosting file retrieveal and rely solely
on these commands, and staticize them inside that file so the
whole business is self-contained.
Linus Walleij [Mon, 23 Mar 2015 10:06:12 +0000 (11:06 +0100)]
vexpress64: remove board late init, use smhload
This removes the kludgy late board init from the FVP simulator
version of Versatile Express 64bit (ARMv8), and replace it with
a default boot command using the new smhload command to load
the files using semihosting. Tested on the Foundation Model.
Linus Walleij [Mon, 23 Mar 2015 10:06:11 +0000 (11:06 +0100)]
armv8: semihosting: add a command to load semihosted images
Instead of sprinkling custom code and calls over the Vexpress64
boardfile, create a command that loads images using semihosting
just like we would load from flash memory of over the network,
using a special command:
smhload <image> <address>
This will make it possible to remove some custom calls and
code and make the boot easier.
Linus Walleij [Mon, 23 Mar 2015 10:06:10 +0000 (11:06 +0100)]
armv8: semihosting: do not inline trap call
The semihosting trap call does not like being inlined, probably
because that will mean register reordering screwing up the return
value in r0, so tag this function "noinline".
Karsten Merker [Sat, 21 Mar 2015 13:15:38 +0000 (14:15 +0100)]
Document config_distro_bootcmd environment variables for interactive booting.
config_distro_bootcmd.h defines a common boot environment for multiple
platforms, including several environment variables that are intended for
interactive use by an end-user. Document which variables are considered
public interfaces that must remain compatible in future u-boot versions.
Signed-off-by: Karsten Merker <merker@debian.org> Acked-by: Stephen Warren <swarren@nvidia.com>
board/BuR/common: move I2C initialization from common part to board-specific
At this time I2C and responsible pin-mux is setup during PMIC initialziation
within common.c, this is possible because today PMIC is always connected on
I2C0.
In Future this will be changed, PMIC isn't anymore connected to bus0 in call
cases.
So we do following:
- rename enable_i2c_pin_mux0 to enable_i2c_pin_mux to be generic for enabling
pin-mux on different or more busses.
- move the call to i2c_pin_mux and i2c_init from common.c to the specific
board.c
Signed-off-by: Hannes Petermaier <hannes.petermaier@br-automation.com> Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
Masahiro Yamada [Fri, 27 Mar 2015 08:01:12 +0000 (17:01 +0900)]
m68k: mcf547x_8x: move CPU type to Kconfig and refactor config.mk
Move the CPU type config options from include/configs/*.h
to arch/m68k/Kconfig and refactor the CPU flags select in
arch/m68k/cpu/mcf547x_8x/config.mk.
Masahiro Yamada [Fri, 27 Mar 2015 08:01:11 +0000 (17:01 +0900)]
m68k: mcf523x: move CPU type to Kconfig and refactor config.mk
Move the CPU type config options from include/configs/M5235EVB.h
to arch/m68k/Kconfig and refactor the CPU flags select in
arch/m68k/cpu/mcf523x/config.mk.
Masahiro Yamada [Fri, 27 Mar 2015 08:01:10 +0000 (17:01 +0900)]
m68k: mcf5227x: move CPU type to Kconfig and refactor config.mk
Move the CPU type config options from include/configs/M52277EVB.h
to arch/m68k/Kconfig and refactor the CPU flags select in
arch/m68k/cpu/mcf5227x/config.mk.
Masahiro Yamada [Fri, 27 Mar 2015 08:01:07 +0000 (17:01 +0900)]
m68k: mcf530x: move CPU type to Kconfig and refactor config.mk
This commit intends to stop grepping CPU type in
arch/m68k/cpu/mcf530x/config.mk.
Move the CPU type config options from include/configs/amcore.h
to arch/m68k/Kconfig and refactor the CPU flags select in
arch/m68k/cpu/mcf530x/config.mk.
Masahiro Yamada [Fri, 27 Mar 2015 01:59:02 +0000 (10:59 +0900)]
kbuild: remove redundant line from (generic-)asm-offsets.h
This line produces an extra comment line for generic-asm-offsets.h
and asm-offsets.h.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
[ imported from Linux Kernel, commit 343d3e6cc861,
with modification of commit description ] Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Masahiro Yamada [Thu, 19 Mar 2015 10:42:56 +0000 (19:42 +0900)]
ARM: bcm283x: merge BCM2835/BCM2836 directories into mach-bcm283x
BCM2835 (used on Raspberry Pi) and BCM2836 (used on Raspberry Pi 2)
are similar enough. One of the biggest differences is the ARM
processor. It is reasonable to collect the source files into a
single place, arch/arm/mach-bcm283x/.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Masahiro Yamada [Thu, 19 Mar 2015 10:42:55 +0000 (19:42 +0900)]
malloc_f: enable SYS_MALLOC_F by default if DM is on
This option has a bool type, not hex.
Fix it and enable it if CONFIG_DM is on because Driver Model always
requires malloc memory. Devices are scanned twice, before/after
relocation. CONFIG_SYS_MALLOC_F should be enabled to use malloc
memory before relocation. As it is board-independent, handle it
globally.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Stephen Warren <swarren@wwwdotorg.org> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Robert Baldyga <r.baldyga@samsung.com>
Masahiro Yamada [Fri, 13 Mar 2015 09:08:55 +0000 (18:08 +0900)]
kbuild: remove scripts/multiconfig.sh
We have switched to the single .config configuration system,
the same one as used in Linux Kernel.
The necessary glue code is small enough now, so move it to the
top-level Makefile and scripts/kconfig/Makefile, and then delete
scripts/multiconfig.sh.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Masahiro Yamada [Fri, 13 Mar 2015 09:08:54 +0000 (18:08 +0900)]
kbuild: remove "*_felconfig" target
This target was added by commit cbdd9a9737cc (sunxi: kconfig: Add
%_felconfig rule to enable FEL build of sunxi platforms.).
At that time, U-Boot used separate .config files for U-Boot proper
and SPL. I understood the pain to modify both .config and
spl/.config.
Now, we have switched to single .config configuration.
It seems acceptable to run "make menuconfig" or friends to enable
CONFIG_SPL_FEL, as we do for other CONFIGs.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Ian Campbell <ijc@hellion.org.uk> Cc: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Iain Paton [Wed, 25 Mar 2015 16:03:26 +0000 (16:03 +0000)]
sunxi: axp209: fix incorrect limits on ldo3
board/sunxi/board.c tries to set ldo3 to 2.8v however drivers/power/axp209.c
contains an incorrect limit on ldo3 of 2.275v
The origin of the incorrect limit seems likely due to some inconsistencies
in the axp209 datasheet. ldo3 is described with different limits in
different sections. register 0x29 uses 7 bits for voltage configuration
while the 2.275v limit would apply if only 6 bits were used.
Probably this is a cut&paste error from register 0x23
The linux kernel driver has the correct limit and operation up to the 2.8v
required by my board has been physically verified with a multimeter.
Signed-off-by: Iain Paton <ipaton0@gmail.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Ian Campbell [Wed, 25 Mar 2015 13:39:05 +0000 (13:39 +0000)]
sunxi: set GMAC TX delay = 0x1 on Cubietruck.
Of 4 boards in our automated test system 2 do not have reliable
networking with the default TX delay of 0x0. Increasing to 0x1 seems
to make things reliable on all 4 boards.
Some previous ad-hpoc tests with tx delay set to 0, 1, 2 and 3 on one
of the problematic boards showed:
0: mw.l 0x1c20164 0x006 1 -- t/o in 4/5 tftp runs
1: mw.l 0x1c20164 0x406 1 -- t/o in 1/5 tftp runs
2: mw.l 0x1c20164 0x806 1 -- t/o in 1/5 tftp runs
3: mw.l 0x1c20164 0xc06 1 -- t/o many times in first tftp run
For 0, 1 and 2 "t/o" means one or two "T" glitches in the download,
but it did complete. For 3 those were basically continuous and it
couldn't complete.
tftp was of a 16M initrd.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Masahiro Yamada [Fri, 20 Mar 2015 04:24:45 +0000 (13:24 +0900)]
dm: serial: remove bogus include <ns16550.h>
Serial-uclass should be generically implemented without depending
a particular hardware. Fortunately, nothing in include/ns16550.h is
referenced from drivers/serial/serial-uclass.c, so remove this bogus
include.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Simon Glass <sjg@chromium.org>
Sjoerd Simons [Wed, 25 Feb 2015 22:23:52 +0000 (23:23 +0100)]
config_distro_bootcmd.h: Prefer booting from bootable paritions
List bootable partitions and only scan those for bootable files, falling
back to partition 1 if there are no bootable partitions
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Stephen Warren <swarren@nvidia.com>
Sjoerd Simons [Wed, 25 Feb 2015 22:23:51 +0000 (23:23 +0100)]
config_cmd_default.h: Add 'env exists' command
env exists allows scripts to query whether an environment variable
exists. Enable by default as it adds only a trivial amount of code and
can be useful in scripts.
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Stephen Warren <swarren@nvidia.com>
Bin Meng [Thu, 12 Mar 2015 05:08:46 +0000 (13:08 +0800)]
x86: Add ramboot and nfsboot commands in x86-common.h
It is very common in the debug stage to test U-Boot loading a linux
kernel. The commands to boot linux kernel with ramdisk and nfs as the
root are common to all x86 targets, so it makes sense to add them as
the U-Boot default environment in x86-common.h.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chroimum.org>
Bin Meng [Fri, 20 Mar 2015 09:12:20 +0000 (17:12 +0800)]
net: Add Intel Topcliff GMAC driver
Add a new driver for the Gigabit Ethernet MAC found on Intel Topcliff
Platform Controller Hub. Tested under 10/100 half/full duplex and 1000
full duplex modes using ping and tftpboot commands.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Bin Meng [Fri, 20 Mar 2015 09:12:18 +0000 (17:12 +0800)]
net: Add ethernet FCS length macro in net.h
Some ethernet drivers use their own version of ethernet FCS length
macro which is really common. We define ETH_FCS_LEN in net.h and
replace those custom versions in various places.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Bin Meng [Wed, 11 Mar 2015 03:25:56 +0000 (11:25 +0800)]
x86: quark: Enable on-chip ethernet controllers
Intel Quark SoC integrates two 10/100 ethernet controllers which can
be connected to an external RMII PHY. The MAC IP is from Designware.
Enable this support with the existing U-Boot Designware MAC driver
so that the ethernet port on Intel Galileo board can be used.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
Bin Meng [Thu, 5 Mar 2015 03:21:03 +0000 (11:21 +0800)]
x86: Add queensbay fsp patch information in README.x86
The FSP release version 001 for Intel Queensbay has a bug which
could cause random endless loop during the FspInit call. This bug
was published by Intel although Intel did not describe any details.
Describe this information in the x86 doc so that U-Boot Queensbay
support is invulnerable.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
Tom Rini [Thu, 19 Feb 2015 11:58:57 +0000 (06:58 -0500)]
arch/x86/cpu/quark/mrc.c: Switch to U_BOOT_DATE / U_BOOT_TIME
Using __DATE__ and __TIME__ results in an error due to -Werror=date-time
with gcc-4.9 (__DATE__ / __TIME__ might prevent reproducible builds) so
switch these over to U_BOOT_DATE / U_BOOT_TIME
Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@ti.com> Acked-by: Simon Glass <sjg@chromium.org>
Bin Meng [Tue, 10 Mar 2015 10:31:20 +0000 (18:31 +0800)]
x86: quark: MRC codes clean up
This patch cleans up the quark MRC codes coding style by:
- Remove BIT0/1../31 defines from mrc_util.h
- Create names for the documented BITs and use them
- For undocumented single BITs, use (1 << n) directly
- For undocumented ORed BITs, use the hex number directly
- Remove redundancy parenthesis all over the codes
- Replace to use lower case hex numbers
Stephen Warren [Tue, 24 Mar 2015 05:00:25 +0000 (23:00 -0600)]
ARM: rpi: fix RPi1 board rev detection for warranty bit
Apparently the firmware's board rev response includes both the board
revision and some other data even on the RPi1. In particular, the
"warranty bit" is bit 24. We need to mask that out when looking up the
board ID.
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
The callee (arch/arm/lib/cache-cp15.c) has a #ifdef
CONFIG_SYS_DCACHE_OFF conditional. The same conditional in the
caller (arch/arm/mach-uniphier/cache_uniphier.c) is redundant.
Masahiro Yamada [Sun, 22 Mar 2015 15:07:32 +0000 (00:07 +0900)]
ARM: UniPhier: disable L2 cache by lowlevel_init of U-Boot proper
The L2 cache is used as a temporary SRAM on SPL.
Now the secondary CPUs store the necessary code for jumping to
Linux on their L1 I-caches. So, the L2 cache can be disabled
much earlier, at the very entry of U-Boot proper (lowlevel_init).
This makes the boot sequence clearer.
Also, as the L1 cache has been disabled by the start.S,
enable_caches() does not need to do it again.
Currently, the secondary CPU(s) are kicked three times:
Boot ROM ---(kick)--> SPL ---(kick)--> U-boot ---(kick)--> Linux.
It makes the boot sequence very complicated.
This commit merges the first and the second kicks, so the secondary
CPU(s) can directly jump from SPL to Linux.
arch/arm/mach-uniphier/smp.S is no longer necessary.
Masahiro Yamada [Sun, 22 Mar 2015 15:07:25 +0000 (00:07 +0900)]
ARM: UniPhier: enable Driver Model and UART on SPL
Enable CONFIG_SPL_DM and CONFIG_SPL_SERIAL_SUPPORT, which provide
Driver Model UART support on SPL.
CONFIG_SYS_SPL_MALLOC_{START,SIZE} should be dropped because simple
malloc is preferred on SPL. Dlmalloc requires some static variables
on .data section that is not available yet for NOR boot mode etc.
Masahiro Yamada [Sun, 22 Mar 2015 15:07:21 +0000 (00:07 +0900)]
ARM: UniPhier: include PH1-LD4 Makefile from PH1-sLD8
The two Makefiles arch/arm/mach-uniphier/{ph1-ld4,ph1-sld8}/Makefile
are completely the same. We can improve the maintainability by
having one to include the other.
Masahiro Yamada [Mon, 16 Mar 2015 04:46:07 +0000 (13:46 +0900)]
ARM: UniPhier: remove unnecessary CONFIG_SYS_SOC
Since commit a86ac9540e20 (ARM: UniPhier: include <mach/*.h> instead
of <asm/arch/*.h>), UniPhier platform does not need the symbolic
link arch/arm/include/asm. This option is not necessary either.
Bo Shen [Wed, 4 Mar 2015 05:35:16 +0000 (13:35 +0800)]
Net: macb: reset GBE bit when fallback checking
If the GBE bit is set, when do next time autonegotiation,
if the result is not 1000Mbps, it will fallback to 100Mbps
checking. So, we need to clear the GBE bit.