Commit Graph

32953 Commits

Author SHA1 Message Date
Stephen Warren
930c514d47 ARM: tegra: expand all SPL sizes to be consistent
The size allocation for SPL is increased in all cases to match the
already-expanded value used on Tegra124. This is both for general
consistency, and because the seaboard build trips over the limit already
when using one of the ARM compilers packaged with 14.04. For the record,
when building Seaboard:

arm-linux-gnueabi- SPL is too big by 0x36 bytes
arm-linux-gnueabihf- SPL fits by 0x2a bytes
arm-none-eabi- SPL fits by 0xa bytes

(Those figures are from builds with the expanded SPL size allocation,
relative to the non-expanded SPL size limit; they're better by about
6 bytes in the more constrained build.)

Fixes: ba52199422 ("tegra124: Expand SPL space by 8KB")
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2015-10-02 11:05:30 -07:00
Stephen Warren
0c35e3a8b4 ARM: tegra: don't enable GPIOs until direction is set
Tegra's GPIO driver currently enables pins as GPIO as soon as they're
requested. This is not safe, since the desired direction and output value
are not yet known. This could cause a glitch on the output pins between
gpio_request() and gpio_direction_*(), depending on what values happen to
be in the GPIO controller's in/out and out-value registers vs. the final
desired configuration.

To solve this, defer enabling pins as GPIOs until some gpio_direction_*()
is invoked, and the desired configuration is explicitly programmed.

In theory this change could cause regressions, if code exists that claims
a GPIO, never explicitly sets a direction, and then gets/sets the GPIO
value based on that assumption. However, I've read through all the Tegra-
related board files and device drivers that touch GPIOs and I do not see
such buggy code anywhere.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2015-10-02 11:05:01 -07:00
Stephen Warren
f9d3cab091 ARM: tegra: fix GPIO init table programming
Tegra's gpio_config_table() currently uses common GPIO APIs. These used
to work without requesting the GPIO, but since commit 2fccd2d96b "tegra:
Convert tegra GPIO driver to use driver model" no longer do so. This
prevents any of the GPIO initialization table from being applied to HW.
Fix gpio_config_table() to directly program the HW to solve this.

Fixes: 2fccd2d96b ("tegra: Convert tegra GPIO driver to use driver model")
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2015-10-02 11:04:34 -07:00
Stephen Warren
cb96bf991b ARM: tegra: p2371-2180: import latest pinmux
In order to avoid any assumptions about any device connected to
P2371-2180's expansion connector, the latest pinmux spreadsheet
configures all muxable pins on that connector to be GPIO inputs, with
on-chip pulls where appropriate.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2015-10-02 11:04:05 -07:00
Tom Rini
1f8836396d Prepare v2015.10-rc4
Signed-off-by: Tom Rini <trini@konsulko.com>
2015-09-28 16:57:42 -04:00
Łukasz Majewski
4d58e10e3e mmc: dw_mmc: Increase timeout to 4 minutes (as in Linux kernel)
The commit: d9dbb97be0
"mmc: dw_mmc: Zap endless timeout" removed endless loop waiting for end
of dw mmc transfer.

For some workloads - dfu test @ Odroid XU3 (sending 8MiB file) -
and SD cards (e.g. MicroSD Kingston 4GiB, Adata 4GiB)
the default timeout is to short.

The new value - 4 minutes (240 seconds) - is the same as the one used in
Linux kernel driver. Such fix should be good enough until we come up
with better fix for this issue.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: Tom Rini <trini@konsulko.com>
Tested-by: Przemyslaw Marczak <p.marczak@samsung.com>
2015-09-28 11:03:56 -04:00
Bin Meng
4440ececed tools: moveconfig: Update the URL for nds32 toolchain
Give a full URL for a working nds32 toolchain for U-Boot.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-09-28 11:03:55 -04:00
Josh Wu
3e4dad5032 tools: gen_eth_addr: add getpid() to time(0) to avoid duplicated seed
As 'time(0) | getpid()' will have a lot of duplicated value. It is not a
expected behavior. We expect different value for the seed when when run
it in many times.

So this patch will left shift the getpid() and add to time(0). That
avoid duplicated value.

Test command is like:
  % RUN=0; while [ $RUN -lt 10000 ]; do
  tools/gen_eth_addr; RUN=$(($RUN+1)); done | sort | uniq | wc -l
  10000

This patch is incorporated with suggestions made by Wolfgang Denk and Andreas
Bießmann. Thanks them a lot.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
Acked-by: Andreas Bießmann <andreas.devel@googlemail.com>
Acked-by: Wolfgang Denk <wd@denx.de>
Tested-by: Wolfgang Denk <wd@denx.de>
2015-09-28 10:48:25 -04:00
Simon Glass
1090a56c87 arm: Drop old non-generic-board code
This code is no-longer used. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Andreas Bießmann <andreas.devel@gmail.com>
2015-09-28 10:48:24 -04:00
Simon Glass
b352182a00 arm: Remove wireless_space board
This board has not been converted to generic board by the deadline.
Remove it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-09-28 10:48:24 -04:00
Simon Glass
d7e8b2b98a arm: Remove da830evm board
This board has not been converted to generic board by the deadline.
Remove it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-09-28 10:48:23 -04:00
Peter Griffin
05e682d467 ARM: hikey: Adjust SDRAM_1_SIZE to 0x3EFFFFFF
DRAM region 0x3f000000 - 0x3fffffff is reserved for OP-TEE. Touching
0x3f000000 memory location from unsecure world causes the board
to hang.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-09-28 10:48:23 -04:00
Peter Griffin
9c71bcdc81 ARM: hikey: hi6220: Migrate over to DM_SERIAL and use UART3 by default.
Use DM for the pl01x serial driver on hikey. Also allow UART0 or
UART3 to be chosen via Kconfig.

By default we now output to UART3 as the latest version of ATF outputs
to this UART. Also UART3 comes out on the LS connector, as opposed to
UART0 which goes to a unpopulated header.

As part of this change we also enable CONFIG_BOARD_EARLY_INIT_F and
call the pinmux configuration code for the UART. Before we were
relying on ATF having already configured the pin configuration.

NB: Upstream Linux kernel doesn't yet support UART3, so serial console
will still be output on UART0 when booting a upstream kernel.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-09-28 10:48:22 -04:00
Peter Griffin
efd7b60a81 ARM: hikey: Select DM, DM_GPIO from Kconfig
Most platforms enable these options from Kconfig rather
than the configs header file.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-09-28 10:48:22 -04:00
Peter Griffin
17024e772e ARM: hikey: Remove resetting gd->flags in board_init()
This causes exceptions and other strange behaviour
when enabling CONFIG_SYS_MALLOC_F_LEN which is required to
migrate the serial driver over to DM_SERIAL.

As GD_FLG_FULL_MALLOC_INIT flag gets reset, after relocation
we don't end up using the full malloc which ultimately ends up
causing a synchronus abort.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-09-28 10:48:22 -04:00
Peter Griffin
f7ca45e891 ARM: hi6220: Add UART0 and UART3 base addresses
Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-09-28 10:48:21 -04:00
Peter Griffin
c9a67d2489 ARM: hikey: Use linux/sizes.h for malloc size
Use the #defines in linux/sizes for malloc size as it is
more readable.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-09-28 10:48:21 -04:00
Peter Griffin
b81ef8db8f ARM: hikey: Add ATF makefile referenced by README
Rather than relying on an external URL in the README
include the Makefile in the hikey directory.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
2015-09-28 10:48:20 -04:00
Peter Griffin
9c71a21dff ARM: hikey: Update README with various corrections
The README had a few mistakes, and one of the URL's
had changed. Also update the boot log with the latest
boot trace from ATF, which now includes the mcuimage.bin.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
2015-09-28 10:48:20 -04:00
Philipp Rosenberger
596380db28 malloc_simple: fix malloc_ptr calculation
The gd->malloc_ptr and the gd->malloc_limit are offsets to gd->malloc_base.
But the addr variable contains the absolute address. The new_ptr must be:
addr + bytes - gd->malloc_base.

Signed-off-by: Philipp Rosenberger <ilu@linutronix.de>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-09-28 10:15:48 -04:00
Sekhar Nori
d9da26ecc6 am437x_evm: increase phy autoneg timeout
When AM437x EVM is connected to Gigabit switch, it takes
more time to finish auto-negotiation than on a 10/100 switch.

The default 4 second limit times-out more often than not. This is
observed when testing with a D-Link DGS-1008A desktop switch.

Increase the auto-negotiation time-out for AM437x EVM to handle
this case.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
2015-09-28 10:15:48 -04:00
Igor Grinberg
1f9ac4a46c Kconfig: fix typo in CONFIG_FIT description
Fix typo in CONFIG_FIT description - remove the accidentially added
redundand 'the'.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-09-28 10:15:47 -04:00
Igor Grinberg
e0bed6b67d configs: remove remnants of CONFIG_SYS_NAND_QUIET_TEST
The config option has been removed by one of the syncs with the Linux
mainline MTD subsystem:
ff94bc40af (mtd, ubi, ubifs: resync with Linux-3.14)
It has been left inside the config files. Currently does not look to
serve any purpose, so remove it now from all the configs.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Cc: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
Cc: Stefan Roese <sr@denx.de>
Cc: "Albert ARIBAUD (3ADEV)" <albert.aribaud@3adev.fr>
Cc: Peter Barada <peter.barada@logicpd.com>
Cc: Steve Sakoman <sakoman@gmail.com>
Cc: Peter Tyser <ptyser@xes-inc.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Stefan Roese <sr@denx.de>
2015-09-28 10:15:46 -04:00
Bin Meng
80df691349 Reorder defconfigs with 'savedefconfig'
Some boards' defconfigs are disordered. Reorder them.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2015-09-28 09:06:13 -04:00
Tom Rini
1a9c229bf7 Merge branch 'master' of git://www.denx.de/git/u-boot-imx 2015-09-24 12:28:10 -04:00
Tom Rini
d0f30211e9 Merge git://git.denx.de/u-boot-socfpga 2015-09-24 12:28:06 -04:00
Tom Rini
7bb839d672 Merge branch 'master' of git://git.denx.de/u-boot-uniphier 2015-09-24 12:28:02 -04:00
Masahiro Yamada
a4bb44b027 ARM: dts: uniphier: use SPDX-License-Identifier
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-09-25 01:01:37 +09:00
Masahiro Yamada
d47fe9bb83 ARM: uniphier: fix init page table for ProXstream2/PH1-LD6b USB boot
Currently, the USB boot mode is supported by an external loader and
U-boot proper image is put on the section 0.  This commit allows
access there.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-09-25 00:59:33 +09:00
Masahiro Yamada
019df879a9 ARM: uniphier: add ProXstream2 and PH1-LD6b support
The DDR SDRAM initialization code has not been mainlined yet, but
U-Boot proper should work.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-09-25 00:59:33 +09:00
Masahiro Yamada
28f40d4a4d ARM: uniphier: add PH1-Pro5 support
The DDR SDRAM initialization code has not been mainlined yet, but
U-Boot proper should work.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-09-25 00:59:28 +09:00
Masahiro Yamada
323d1f9d5b ARM: uniphier: allow to enable multiple SoCs
Before this commit, the Kconfig menu in mach-uniphier only allowed us
to choose one SoC to be compiled.  Each SoC has its own defconfig file
for the build-test coverage.  Consequently, some defconfig files are
duplicated with only the difference in CONFIG_DEFAULT_DEVICE_TREE and
CONFIG_{SOC_NAME}=y.

Now, most of board-specific parameters have been moved to device trees,
so it makes sense to include init code of multiple SoCs into a single
image as long as the SoCs have similar architecture.  In fact, some
SoCs of UniPhier family are very similar:
 - PH1-LD4 and PH1-sLD8
 - PH1-LD6b and ProXstream2 (will be added in the upcoming commit)

This commit will be helpful to merge some defconfig files for better
maintainability.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-09-25 00:58:38 +09:00
Masahiro Yamada
5451b777de ARM: uniphier: remove kernel parameter settings from environment
Currently, console=ttyS0 is hard-coded in CONFIG_EXTRA_ENV_SETTINGS
and it replaces the bootargs in the chosen node of the device tree
passed to the kernel.  This is not preferable because I am going to
add some boards whose console is not ttyS0.

Drop bootargs settings from U-Boot's environment and use the one in
device tree by default.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-09-25 00:27:54 +09:00
Masahiro Yamada
e6eecca54f ARM: uniphier: unify low-level debug init code
Move init code of low-level debug into a single file.
This is helpful to create an image that runs on multiple SoCs.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-09-25 00:27:53 +09:00
Masahiro Yamada
fcbcd59730 ARM: uniphier: fix glitch signal problem for low-level debug
Currently, IECTRL is enabled after pin-mux settings for the low-level
debugging for PH1-LD4 and PH1-sLD8.  While IECTRL is disabled, input
signals are pulled-down, i.e. glitch signal (Low to High transition)
problem occurs if pin-mux is set up first.  As a result, one invalid
character is input to the UART block and the auto-boot counting is
terminated immediately.

The correct initialization procedure is:
 [1] Enable IECTRL (if IECTRL exists for the pins)
 [2] Set up pin-muxing
 [3] Deassert the reset of the hardware block

Currently, the low-level debugging is working for PH1-sLD3 and
PH1-Pro4, but just in case, follow the sequence for all the SoCs.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-09-25 00:27:53 +09:00
Masahiro Yamada
257b11f32d ARM: uniphier: delete unneeded input enable for low-level debug
The UART I/O ports for PH1-Pro4 has no input enable controlling.
This code is useless.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-09-25 00:27:53 +09:00
Masahiro Yamada
8497ccc4c2 ARM: uniphier: rename CONFIG_MACH_* to CONFIG_ARCH_UNIPHIER_*
I want these prefixed with CONFIG_ARCH_UNIPHIER_ to clarify
they belong to UniPhier SoC family.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-09-25 00:27:53 +09:00
Masahiro Yamada
c8df23cf33 ARM: uniphier: allow to disable CONFIG_MICRO_SUPPORT_CARD
Without this, build fails if CONFIG_MICRO_SUPPORT_CARD is disabled.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-09-25 00:27:53 +09:00
Masahiro Yamada
d7728aa408 ARM: uniphier: move CONFIG_SUPPORT_CARD_* macros to local file
It is no longer necessary to define CONFIG_SUPPORT_CARD_* globally.
Move them to a C file as local macros.  Also, rename the C file.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-09-25 00:27:53 +09:00
Masahiro Yamada
8469700b6c ARM: uniphier: refactor LED function
The macro, led_write(), is now only used in C sources.  There is no
more reason to keep the tricky assembly macro.  Replace it with a
new C function led_puts().

Also, rename board.h to micro-support-card.h.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-09-25 00:27:53 +09:00
Masahiro Yamada
0b198670c6 ARM: uniphier: remove useless wrapper functions
The wrapper functions, uniphier_board_*, are just making function
calls complex.  Remove them.

Also, use empty inline functions in case CONFIG_MICRO_SUPPORT_CARD
is disabled, so that prototype checking works.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-09-25 00:27:53 +09:00
Masahiro Yamada
f1378cabc0 ARM: uniphier: remove unused header file
This has been unused since commit f4e190e317 ("ARM: uniphier:
enable SPL_OF_CONTROL").

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-09-25 00:27:53 +09:00
Masahiro Yamada
cf88affab6 ARM: uniphier: parse device tree to determine DRAM base and size
Device tree specifies the available memory ranges in its "/memory"
node.  Use it to simplify the CONFIG defines.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-09-25 00:27:53 +09:00
Masahiro Yamada
9628afa7f5 ARM: uniphier: remove ifdef CONFIG_{SOC} conditionals from sg-regs.h
To achieve the complete run-time configuration by device trees, ifdef
conditionals in header files are not preferable.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-09-25 00:27:53 +09:00
Masahiro Yamada
d5ed8c5727 ARM: uniphier: change the external bus address mapping
In UniPhier SoCs before ProXstream2 and PH1-LD6b, two address spaces
 0x00000000 - 0x0fffffff
 0x40000000 - 0x4fffffff
are both mapped to the external bus (also called system bus),
so either was OK.

In the newest two SoCs, the former (0x00000000 - 0x0fffffff) is
assigned for the serial NOR interface.

Going forward, use the latter for the external bus.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-09-25 00:27:53 +09:00
Masahiro Yamada
4ef542efd5 ARM: uniphier: enable setexpr command
This command will be used in the next commit to calculate
base-offseted addresses.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-09-25 00:27:53 +09:00
Masahiro Yamada
9879842c6f ARM: uniphier: drop DCC micro support card support
Historically (for compatibility with very old platforms), two
different types of micro support cards have been used with the
UniPhier SoC development boards.  It has been painful to maintain
both.  Having one of them is enough.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-09-25 00:27:52 +09:00
Masahiro Yamada
1386233da3 ARM: uniphier: drop ad-hoc input enable settings
These input enable settings are handled by the pinctrl drivers.

Because the external bus pins are input-enabled by default, on-board
devices such as LED still work fine even with this delayed input
enabling.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-09-25 00:27:52 +09:00
Masahiro Yamada
11f3afeaa5 ARM: uniphier: drop ad-hoc early pin-muxing settings
As the UniPhier serial driver had already switched to Drive Model
and the pinctrl drivers are now enabled, these pin-muxing settings
are properly handled by the pinctrl drivers.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-09-25 00:27:52 +09:00
Masahiro Yamada
759ba3a874 ARM: uniphier: enable PINCTRL and SPL_PINCTRL
Now, UniPhier SoCs are ready to enable pinctrl drivers.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-09-25 00:27:52 +09:00