1
0
Fork 0
Commit Graph

36129 Commits (cdf172461caa1a2b29be54438628e4c227956565)

Author SHA1 Message Date
Masahiro Yamada f8facbe71e gpio: do not include <asm/arch/gpio.h> for UniPhier
I implemented a GPIO driver based on Driver Model for the UniPhier
SoC family, but I could not find any good reason why such SoC
specific GPIO headers are needed.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Simon Glass <sjg@chromium.org>
2016-02-29 03:50:15 +09:00
Masahiro Yamada b9a66b63b4 gpio: uniphier: add driver for UniPhier GPIO controller
This GPIO controller device is used on UniPhier SoCs.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Simon Glass <sjg@chromium.org>
2016-02-29 03:50:15 +09:00
Masahiro Yamada 0f5fb8ce40 ARM: dts: uniphier: rework System Bus nodes
Follow the changes of DTS in Linux.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-02-29 03:50:15 +09:00
Tom Rini 50dc8677d7 Merge git://git.denx.de/u-boot-usb 2016-02-26 18:08:43 -05:00
Tom Rini d5c6144fe3 Merge git://git.denx.de/u-boot-dm 2016-02-26 16:22:28 -05:00
Tom Rini 38e65aeb70 Merge branch 'master' of git://git.denx.de/u-boot-net 2016-02-26 14:56:23 -05:00
Alexandre Messier 50768f5b06 net: bootp: Add environment variable for timeout period
There is currently one config option (CONFIG_NET_RETRY_COUNT) that
is available to tune the retries of the network stack.
Unfortunately, it is global to all protocols, and the value is
interpreted differently in all of them.

Add a new environment variable that directly sets the retry period for
BOOTP timeouts. If this new value is not set, the period is still derived
from the default number of retries, or from CONFIG_NET_RETRY_COUNT if
defined. When both the new variable is set and CONFIG_NET_RETRY_COUNT
is defined, the variable has precedence.

Signed-off-by: Alexandre Messier <amessier@tycoint.com>
2016-02-26 13:37:38 -06:00
Alison Wang 903d384d40 net: phy: atheros: Fix problem with phy_reset() clearing BMCR
In commit <a058052c358c> [net: phy: do not read configuration register on
reset], phy_reset() will clear the BMCR register. Bit 12(AUTO_NEGOTIATION)
is cleared too. It causes auto-negotiation timeout error on Atheros's
PHY AR8033.

To fix this problem, genphy_config_aneg() and genphy_restart_aneg()
needs to be called in ar8035_config() to enable and restart
auto-negotiation.

Signed-off-by: Alison Wang <alison.wang@nxp.com>
Acked-by: Stefan Agner <stefan@agner.ch>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2016-02-26 13:32:37 -06:00
Yangbo Lu cf23b4da62 powerpc/t208xqds: fix esdhc peripheral clock support
The patch that enabled eSDHC peripheral clock support had an
obvious error as below. This patch is used to fix it.

+#define define CONFIG_FSL_ESDHC_USE_PERIPHERAL_CLK

Fixes: 3285e6cbcc ("powerpc/t2080qds: enable eSDHC peripheral clock support")
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
2016-02-26 10:48:07 -08:00
Marek Vasut abd702f48c usb: ehci: Fix warning on aarch64
Fix the following warning on aarch64 introduced by using p2v/v2p
functions in the code:

In file included from ./arch/arm/include/asm/byteorder.h:29:0,
                 from include/compiler.h:125,
                 from include/image.h:19,
                 from include/common.h:88,
                 from drivers/usb/host/ehci-hcd.c:10:
drivers/usb/host/ehci-hcd.c: In function ‘ehci_td_buffer’:
drivers/usb/host/ehci-hcd.c:250:49: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   td->qt_buffer[idx] = cpu_to_hc32(virt_to_phys((void *)addr));
                                                 ^
include/linux/byteorder/little_endian.h:34:51: note: in definition of macro ‘__cpu_to_le32’
 #define __cpu_to_le32(x) ((__force __le32)(__u32)(x))
                                                   ^
drivers/usb/host/ehci-hcd.c:250:24: note: in expansion of macro ‘cpu_to_hc32’
   td->qt_buffer[idx] = cpu_to_hc32(virt_to_phys((void *)addr));

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Tom Rini <trini@konsulko.com>
2016-02-26 19:45:05 +01:00
Bin Meng 6796704b0d pci: Fix compiler warnings in dm_pciauto_setup_device()
Fix the following compiler warnings when DEBUG is on.

warning: 'bar_res' may be used uninitialized in this function.
drivers/pci/pci_auto.c:101:21:
   if (!enum_only && pciauto_region_allocate(bar_res, bar_size,
                        ^

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2016-02-26 08:53:10 -07:00
Simon Glass f8025b58f8 spi: Re-enable the SPI flash tests
These are working correctly again, so re-enable them.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jagan Teki <jteki@openedev.com>
Tested-by: Jagan Teki <jteki@openedev.com>
2016-02-26 08:53:10 -07:00
Simon Glass 0badb23d11 spi: Correct two error return values
When an error number is provided we should use it, not change it. This fixes
the SPI and SPI flash tests.

One of these is long-standing. The other seems to have been introduced by
commit 1e90d9fd (sf: Move read_id code to sf_ops).

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 1e90d9fd (sf: Move read_id code to sf_ops)
Reviewed-by: Jagan Teki <jteki@openedev.com>
Tested-by: Jagan Teki <jteki@openedev.com>
2016-02-26 08:53:10 -07:00
Simon Glass ffe276d27a sandbox: spi: Remove an incorrect free()
We must not free data that is managed by driver mode. Remove this line,
which is a hangover from the pre-driver-model code.

This fixes a problem where 'sf probe' crashes U-Boot if the backing file
for the SPI flash cannot be found.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jagan Teki <jteki@openedev.com>
Tested-by: Jagan Teki <jteki@openedev.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-02-26 08:53:10 -07:00
Simon Glass 20f655da11 sandbox: spi: Add more debugging to SPI emulation
Add a little more debugging to help when things go wrong.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jagan Teki <jteki@openedev.com>
Tested-by: Jagan Teki <jteki@openedev.com>
2016-02-26 08:53:10 -07:00
Simon Glass 651490212a sandbox: Enable the early timer
Enable this so that tracing works with sandbox.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2016-02-26 08:53:10 -07:00
Simon Glass c00e922530 sandbox: Correct ordering of defconfig
This has got out of order: fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-02-26 08:53:10 -07:00
Simon Glass 01476eaf07 sandbox: timer: Support the early timer
Add support for the early timer so we can use tracing with sandbox again.

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-02-26 08:53:10 -07:00
Simon Glass 1057e6cfe1 timer: Set up the real timer after driver model is available
When using the early timer, we need to manually trigger setting up the
real timer. This will not happen automatically. Do this immediately after
starting driver model.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2016-02-26 08:53:10 -07:00
Simon Glass c95fec3192 timer: Provide an early timer
In some cases the timer must be accessible before driver model is active.
Examples include when using CONFIG_TRACE to trace U-Boot's execution before
driver model is set up. Enable this option to use an early timer. These
functions must be supported by your timer driver: timer_early_get_count()
and timer_early_get_rate().

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-02-26 08:53:10 -07:00
Simon Glass 4f051824b5 timer: Support tracing fully
A few of the functions in the timer uclass are not marked with 'notrace'. Fix
this so that tracing can be used with CONFIG_TRACE.

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-02-26 08:53:10 -07:00
Simon Glass f91281b1eb trace: Improve the trace test number recognition
The awk tool can be confused by return character (ASCII 13) in its input
since it thinks there is a separate field. These can appear if the terminal
is in raw mode, perhaps due to a previous U-Boot crash with sandbox. This
is very confusing. Remove these so that the trace test passes.

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-02-26 08:53:10 -07:00
Simon Glass 83cc112e82 lib: Don't instrument the div64 function
This function can be called from the timer code on instrumented functions.
Mark it as 'notrace' so that it doesn't cause infinite recursion.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2016-02-26 08:53:10 -07:00
Simon Glass 5eca977935 trace: Fix compiler warnings in trace
With min() we must use the same type for each parameter. Fix two problems
in trace.c which produce compiler warnings.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2016-02-26 08:53:10 -07:00
Simon Glass 0edd82e244 image: Fix FIT and vboot tests to exit sandbox correctly
When used with a device tree, sandbox now requires a 'reset' controller. Add
this to the device trees so that reset works and the tests can complete.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 5010d98f (sandbox: Use the reset driver to handle reset)
2016-02-26 08:53:10 -07:00
Simon Glass 2e33e76165 Revert "image-fit: Fix signature checking"
This reverts commit 84ca65aa4b.

On signature verification failures fit_image_verify() should NOT exit with
error. Only keys marked 'required' can cause image verification failure.
This logic is already there and works correctly.

Add a comment to make this clear.

Fixes: 84ca65aa (image-fit: Fix signature checking)
Signed-off-by: Simon Glass <sjg@chromium.org>
2016-02-26 08:53:10 -07:00
Simon Glass 7a80de4641 image: Correct the OS location code to work on sandbox
A recent change broke the 'bootm' command on sandbox. The root cause is
using a pointer as an address. Conversion from pointer to address needs to
use map_to_sysmem() so that sandbox can do the right thing. The problem was
pre-existing but uncovered by a recent commit.

Fix this. Also move fit_get_end() to the C file to avoid needing to include
mapmem.h (and thus asm/io.h) everywhere.

Fixes: 1fec3c5d (common/image.c: Make boot_get_ramdisk() perform a check for Android images)

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-02-26 08:53:10 -07:00
Stephen Warren 24862c640e test/py: skip tests that require large CONFIG_SYS_MAXARGS
test_hush_if_test.py executes commands that require large values of
CONFIG_SYS_MAXARGS. Detect cases where the configured value is too low
and skip those tests.

Ideally, this would be implemented inside console.run_command(). However,
the command passed to that function is already a completely formed string,
and determining its argument count usage would require splitting commands
at ;, handling quoting to deal with arguments containing spaces, etc. Even
passing the command as a list wouldn't solve all these issues, since we'd
still need to split commands on ; and deal with cases like "if test ..."
which consumes 0 of the argument count.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Simon Glass <sjg@chromium.org>
2016-02-26 08:42:12 -05:00
Stephen Warren 38831ca3be test/py: use space to interrupt autoboot
Sending CTRL-C to QEMU's stdin aborts the process, even if stdin is being
used as a serial port (at least in the raspi2 machine with "qemu -serial
stdin"). Avoid sending CTRL-C to U-Boot to prevent it exiting.

I'd originally used CTRL-C to make sure that if the character used to
abort autoboot ended up being treated as part of a command as well, it'd
abort command entry and return the prompt to a known state. However, this
is not needed, since aborting the autoboot eats the character used to do
that.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Simon Glass <sjg@chromium.org>
2016-02-26 08:42:11 -05:00
Stephen Warren 1f60d7c6e9 ARM: rpi: increase CONFIG_SYS_MAXARGS
This allows all the hush tests implemented in test/py to pass, under qemu
at least.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-02-26 08:42:10 -05:00
Michal Simek 636ac181fa ARM: zynq: zynqmp: Enable DCC serial driver by default
Compile DCC serial driver by default.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-02-25 19:06:37 -05:00
Michal Simek 966bfa7347 serial: dcc: Move driver to DM
Enabling this driver requires some DT changes.
Adding DCC to root or main bus:
dcc: dcc {
	compatible = "arm,dcc";
	u-boot,dm-pre-reloc;
};

Extend alias list to link DCC:
	serial0 = &uart0;
	serial1 = &uart1;
	serial2 = &dcc;

Change stdout-path to point to dcc port.
	stdout-path = "serial2:115200n8";

Also add support for debug uart to help with early debug.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2016-02-25 19:06:37 -05:00
Tom Rini 05195b2cbe Merge git://git.denx.de/u-boot-dm 2016-02-25 10:35:23 -05:00
Michal Simek 299e5bb7c2 test/py: Add option to skip SPL signature checking
Provide user option to skip SPL signature verification for cases where
u-boot is build with SPL support but full U-Boot is also verified
without SPL.

If you want to support this feature please add env__spl_skipped = True
to your boardenv configuration file.

For example Xilinx Zynq is using this feature where the same U-Boot
binary is checked with SPL and without SPL(with FSBL).

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-02-25 10:21:19 -05:00
Albert ARIBAUD 070b781b2b patman: fix series-notes handling for buildman
A patman series with a 'Series-notes' section causes
buildman to crash with:

    self.series.notes += self.section
    TypeError: cannot concatenate 'str' and 'list' objects

Fix by initializing series.notes as a one-element array
rather than a scalar.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
2016-02-24 20:06:19 -08:00
Masahiro Yamada 5f3f7b79db dts: keep clock-names and clocks in SPL DTB if SPL_CLK is enabled
These two properties are necessary for SPL to get clocks from DT.

Note:
For now, only clock look-up by index is supported (clk_get_by_index()
function), so "clock-names" is never parsed in U-Boot.  However, we
may want to support something like clk_get_by_name() in the future,
so let's keep "clock-names" as well as "clocks".

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-02-24 20:06:19 -08:00
Tom Rini cdb714d7c9 Merge branch 'master' of git://git.denx.de/u-boot-socfpga 2016-02-24 18:44:19 -05:00
Tom Rini fec26e7270 Merge branch 'master' of git://git.denx.de/u-boot-usb 2016-02-24 18:44:17 -05:00
Tom Rini e1417c7b66 Merge branch 'master' of git://git.denx.de/u-boot-fsl-qoriq 2016-02-24 18:44:15 -05:00
Michal Simek 20434c8a0b microblaze: Add missing chosen node
fdtgrep requires /chosen node to be specified or at least more nodes which
stays in DTS to generate output.
Error message:
./tools/fdtgrep -b u-boot,dm-pre-reloc -RT dts/dt.dtb -n /chosen -O
dtb | ./tools/fdtgrep -r -O dtb - -o spl/u-boot-spl.dtb -P pinctrl-0 -P
pinctrl-names -P clocks -P clock-names -P interrupt-parent
Error: FDT_ERR_BADMAGIC

This patch add empty chosen node to keep fdtgrep happy and pass
compilation for in tree DTS file.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-02-24 18:44:15 -05:00
Michal Simek dfe461d6b5 cmd: mem: Show 64bit addresses which are tested
Fix print message to show full 64bit addresses.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-02-24 18:44:14 -05:00
Michal Simek 508770ae37 dm: Remove ARM dcc from the list
Remove ARM Debug communication channel driver from the list
of not converted drivers to DM.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2016-02-24 18:44:14 -05:00
Lubomir Rintel 1fd4bed1d4 rpi: always scroll by 10 lines
Scrolling the simple framebuffer is really slow in Raspberry Pi to the
point it delays the boot by a second or two and makes longer output
inconvenient to follow (printenv, md).

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
2016-02-24 18:44:13 -05:00
Lubomir Rintel 757cd149b9 rpi: set board serial number in environment
Gets propagated into the device tree and then into /proc/cpuinfo where
users often expect it.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
Reviewed-by: Stephen Warren <swarren@wwwdotorg.org>
2016-02-24 18:44:12 -05:00
Karsten Merker 6f6051fac3 booti: Help text rework.
Fix spelling errors in the "booti" help text and bring it more
in line with the bootm/bootz help texts.

Signed-off-by: Karsten Merker <merker@debian.org>
2016-02-24 18:44:12 -05:00
Bin Meng e8aebc4744 tools: Update openrisc toolchain information
Since commit 87da2690ab
"openrisc: updating build tools naming convention", openrisc
kernel.org toolchain is out of date and cannot build U-Boot.
Update buildman and moveconfig tools to refer to the new one.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2016-02-24 18:44:11 -05:00
Bin Meng 3a53aba37d MAINTAINERS: Update no longer valid maintainers' status
The following maintainers' email addresses are no longer valid.

vipin.kumar@st.com
martin.krause@tq-systems.de
kim.phillips@freescale.com
fgretief@spaceteq.co.za

Update status of the components they used to maintain to be:
S: Orphaned (Since 2016-02)

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2016-02-24 18:44:11 -05:00
Nikita Kiryanov 4b8f489289 arm: am437x: cm-t43: bring back BOOTDELAY feature
Commit 755324 (configs: Use config_distro_defaults.h in ti_armv7_common.h)
made ti_armv7_common.h include config_distro_defaults.h. This breaks the
bootdelay feature in cm_t43 because now the
  - #include ti_armv7_common.h (#define CONFIG_BOOTDELAY 1)
  - #undef CONFIG_BOOTDELAY
  - #include config_distro_defaults.h (#define CONFIG_BOOTDELAY 2)
dance in cm_t43.h is no longer valid and in fact leads to CONFIG_BOOTDELAY
not being defined.

Adapt the config file to the new inclusion hierarchy.

Cc: Tom Rini <trini@konsulko.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-02-24 18:44:10 -05:00
Nikita Kiryanov 7d751d661a arm: am437x: cm-t43: update parameters for raw mmc boot
Update U-Boot offset and size for raw mmc boot.

Cc: Tom Rini <trini@konsulko.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-02-24 18:44:10 -05:00
Nikita Kiryanov 43e568c4ae arm: am437x: cm-t43: set MPU and CORE voltages on boot
During boot, U-Boot raises the CPU frequency but the CORE and MPU regulators
are not updated. This is not a problem in cold boot since the default values
that the pmic outputs are correct, but if Linux were to switch the module to a
low power OPP, the new voltage values will be retained after a reboot and the
module will likely hang once U-Boot raises the CPU frequency back up.

Set both CORE and MPU regulators to to 1.1V on boot.

Cc: Tom Rini <trini@konsulko.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-02-24 18:44:09 -05:00