Commit Graph

4232 Commits

Author SHA1 Message Date
Darwin Rambo de351d6be6 lib: time: add weak timer_init() function
If timer_init() is made a weak stub function, then it allows us to
remove several empty timer_init functions for those boards that
already have a timer initialized when u-boot starts. Architectures
that use the timer framework may also remove the need for timer.c.

Signed-off-by: Darwin Rambo <drambo@broadcom.com>
Reviewed-by: Tim Kryger <tim.kryger@linaro.org>
2014-01-24 16:59:06 -05:00
Haijun.Zhang f28bea0003 eSDHC: Calculate envaddr accroding to the address format
On BSC9131, BSC9132, P1010 : For High Capacity SD Cards (> 2 GBytes), the
32-bit source address specifies the memory address in block address
format. Block length is fixed to 512 bytes as per the SD High Capacity
specification. So we need to convert the block address format
to byte address format to calculate the envaddr.

If there is no enough space for environment variables or envaddr
is larger than 4GiB, we relocate the envaddr to 0x400. The address
relocated is in the front of the first partition that is assigned
for sdboot only.

Signed-off-by: Haijun Zhang <haijun.zhang@freescale.com>
Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2014-01-22 08:56:44 -08:00
Po Liu 6609916efb powerpc:mpc85xx: Add ifc nand boot support for TPL/SPL
Using the TPL method for nand boot by sram was already
supported. Here add some code for mpc85xx ifc nand boot.

	- For ifc, elbc, esdhc, espi, all need the SPL without
	section .resetvec.
	- Use a clear function name for nand spl boot.
	- Add CONFIG_SPL_DRIVERS_MISC_SUPPORT to compile the fsl_ifc.c
	in spl/Makefile;

Signed-off-by: Po Liu <Po.Liu@freescale.com>
Acked-by: Scott Wood <scottwood@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2014-01-21 13:42:01 -08:00
York Sun b518816423 powerpc/mpc85xx: Fix a typo in workaround message for DDR erratum A003474
Unfortunately a typo presents "DDR-A003473" instead of "DDR-A003474".

Signed-off-by: York Sun <yorksun@freescale.com>
2014-01-21 13:40:18 -08:00
Shengzhou Liu 842eaa1361 powerpc/85xx: update erratum a006379
Enable Erratum A006379 for T2080, T2081, T4160, B4420.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2014-01-21 13:39:19 -08:00
Ramneek Mehresh 3f283f4bdc powerpc/83xx: Add support for get_svr() for 83xx devices
Defines get_svr() for 83xx devices

Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2014-01-21 13:35:43 -08:00
Stephen Warren 004c10598b ARM: bcm2835: fix mailbox timeout
My original intention was to have a 100ms timeout. However, the timer
operations used return values in ms not us, so we ended up with a 100s
timeout instead. Fixing this exposes that some operations need longer
to operate than 100ms, so bump the timeout up to a whole second.

Reported-by: Andre Heider <a.heider@gmail.com>
Reviewed-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
2014-01-20 17:11:39 -05:00
Stephen Warren f66f2aa265 ARM: rpi_b: power on SDHCI and USB HW modules
Send RPC commands to the VideoCore to turn on the SDHCI and USB modules.
For SDHCI this isn't needed in practice, since the firmware already
turned on the power in order to load U-Boot. However, it's best to be
explicit. For USB, this is necessary, since the module isn't powered
otherwise. This will allow the kernel USB driver to work.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
2014-01-20 17:11:39 -05:00
Tom Rini 4641c211f6 Merge branch 'master' of git://www.denx.de/git/u-boot-imx 2014-01-20 07:33:42 -05:00
Fabio Estevam be2a3bb39a mx6: Revert "mx6: soc: Disable VDDPU regulator"
Commit 022298278 (mx6: soc: Disable VDDPU regulator) is causing kernel hang
for people using FSL kernel 3.0.35 and 3.10, so revert it for now.

Reported-by: Otavio Salvador <otavio@ossystems.com.br>
Reported-by: Pierre Aubert <p.aubert@staubli.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2014-01-17 10:16:48 +01:00
Tom Rini 4913fc23f0 Merge branch 'master' of git://git.denx.de/u-boot-arm 2014-01-16 13:50:16 -05:00
Nobuhiro Iwamatsu 82852762ce arm: rmobile: Add SH QSPI base register address
This adds base register address of SH QSPI.
Currently, SH QSPI is used only from R8A7790 and R8A7791.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2014-01-16 08:07:20 +09:00
Albert ARIBAUD bf46e7d8d1 Merge branch 'u-boot-imx/master' into 'u-boot-arm/master' 2014-01-15 15:18:04 +01:00
Fabio Estevam 3a21773129 mx6: Add initial support for the Hummingboard solo
SolidRun has designed the Hummingboard board based on mx6q/dl/solo.

Add the initial support for the mx6 solo variant.

More information about this hardware can be found at:
http://imx.solid-run.com/wiki/index.php?title=Carrier-One_Hardware

(Carrier-One was the previous name of Hummingboard).

Based on the work from Jon Nettleton <jon.nettleton@gmail.com>.

Signed-off-by: Jon Nettleton <jon.nettleton@gmail.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2014-01-15 10:33:25 +01:00
Fabio Estevam 5f98d0b5d3 mx6: clock: Pass the frequency as argument of enable_fec_anatop_clock()
Provide an argument to enable_fec_anatop_clock() to specify the clock frequency
that will be generated.

No changes are made to mx6slevk, which uses the default 50MHz fec clock.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
2014-01-15 10:33:25 +01:00
Tom Rini b5c068f3f8 Merge branch 'master' of git://git.denx.de/u-boot-arm 2014-01-14 14:48:42 -05:00
Andreas Bießmann 6ba2bc8fa9 arm: use canonical sub mnemonic
Building some arm boards with older binutils may produce errors like this:

---8<---
crt0.S: Assembler messages:
crt0.S:70: Error: register expected, not '#(184)' -- `sub sp,#(184)'
--->8---

Use canonical version of the subtract mnemonic to avoid those issues.

Reported-by: Alexey Smishlayev <alexey@xtech2.lv>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2014-01-14 12:38:47 +01:00
Albert ARIBAUD e6fe4bd989 Merge 'u-boot-imx/master' into 'u-boot-arm/master' 2014-01-14 11:50:54 +01:00
Albert ARIBAUD b02bfc4dfc arm: put .hash, .got.plt and .machine_param back in binaries
Some targets will build fine but not boot if sections .hash and
.got.plt are not present in the binary. Add them back.

Also, Exynos machines require .machine_param section in SPL.
Add it.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Tested-by: Rajeshwari S Shinde <rajeshwari.s@samsung.com>
2014-01-14 11:43:10 +01:00
Tom Rini 0effc5e567 Merge branch 'master' of git://git.denx.de/u-boot-arm 2014-01-13 13:50:25 -05:00
Marek Vasut 67decc71ed ARM: pxa: Fix OneNAND SPL builds
The OneNAND SPL used on PXA is slightly obscure. Due to the OneNAND limitation,
where we have only the first 1KiB of the OneNAND available upon power-up as a
memory-mapped area, from which the CPU starts executing, we place only the most
essential code into this first 1KiB . This code copies the rest of the SPL into
SRAM and jumps to it. This code is stored in section .text.0 .

The rest of the SPL is stored in section .text.1 . When running the OBJCOPY on
the SPL, it will preserve only .text section, but the .text.0 and .text.1 are
stripped away from the result, thus making the SPL binary empty. The patch adds
additional -j parameters to the OBJCOPY for PXA during the SPL build, which will
preserve the .text.0 and .text.1 sections.

Moreover, this patch also adds missing functions into the .text.0 section, since
otherwise the PXA270 with 1KiB-window OneNAND won't be able to boot.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Tom Rini <trini@ti.com>
2014-01-13 12:39:10 +01:00
Inderpal Singh 16f9480dfc usb: ehci: exynos: set/reset hsic phys
The controller has 3 ports. The port0 is for USB 2.0 Phy, port1 and port2
are for HSIC phys. The usb 2.0 phy is already being setup. This patch
sets up the hsic phys.

Signed-off-by: Inderpal Singh <inderpal.singh@linaro.org>
2014-01-13 12:23:28 +01:00
Christian Gmeiner 5a66016987 imx6: make use of lldiv(..)
Commit 762a88ccf8 introduces
a 64-bit division without using the lldiv() function,
which pulls in previously unused libgcc stuff.

Signed-off-by: Måns Rullgård <mans@mansr.com>
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Acked-by: Stefano Babic <sbabic@denx.de>
2014-01-13 11:52:28 +01:00
Tom Rini 7f673c99c2 Merge branch 'master' of git://git.denx.de/u-boot-arm
Bringing in the MMC tree means that CONFIG_BOUNCE_BUFFER needed to be
added to include/configs/exynos5-dt.h now.

Conflicts:
	include/configs/exynos5250-dt.h

Signed-off-by: Tom Rini <trini@ti.com>
2014-01-10 10:56:00 -05:00
Jagannadha Sutradharudu Teki 84515165da gpio: zynq: Add dummy gpio routines
GPIO dummy routines are required for fdt build, may be removed
these dependencies once the u-boot fdt is fully optimized.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
2014-01-10 15:18:33 +01:00
Jagannadha Sutradharudu Teki f8f36c5dda dts: zynq: Add basic fdt support
This patch provides a basic fdt support for zynq u-boot.

zynq-7000.dtsi-> initial arch dts file
zynq-zed.dts -> initial zed board dts file
more devices should be added in subsequent patches.

u-boot build: once configuring of a board done
for building dtb with zynq-zed.dts as an input
zynq-uboot> make DEVICE_TREE=zynq-zed

Enabled CONFIG_OF_SEPARATE for building dtb separately.
There is a new binary called u-boot-dtb.bin which is a u-boot
with devicetree supported.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
2014-01-10 15:18:33 +01:00
Jagannadha Sutradharudu Teki b3de92495f zynq: Add support to find bootmode
Added support to find the bootmodes by reading
slcr bootmode register. this can be helpful to
autoboot the configurations w.r.t a specified bootmode.

Added this functionality on board_late_init as it's not
needed for normal initializtion part.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
2014-01-10 15:18:33 +01:00
Tom Rini 795611e6ff armv8: Use __aarch64__ rather than CONFIG_ARM64 in some cases
The toolchain sets __aarch64__ for both LE and BE.  In the case of
posix_types.h we cannot reliably use config.h as that will lead to
problems.  In the case of byteorder.h it's clearer to check the EB flag
being set in either case instead.

Cc: David Feng <fenghua@phytium.com.cn>
Signed-off-by: Tom Rini <trini@ti.com>

Amended by Albert ARIBAUD <albert.u.boot@aribaud.net> to
actually remove the config.h include from the posix_types.h
files, with permission from Tom Rini.
2014-01-10 10:10:23 +01:00
Tom Rini 8401bfa91e Merge branch 'master' of git://git.denx.de/u-boot-mmc 2014-01-09 11:05:32 -05:00
Tom Rini 33d413fc91 Merge branch 'master' of git://git.denx.de/u-boot-sh 2014-01-09 11:04:53 -05:00
David Feng 0ae7653128 arm64: core support
Relocation code based on a patch by Scott Wood, which is:
Signed-off-by: Scott Wood <scottwood@freescale.com>

Signed-off-by: David Feng <fenghua@phytium.com.cn>
2014-01-09 16:08:44 +01:00
Chin Liang See c5c1af2176 socfpga/dwmmc: Adding DesignWare MMC driver support for SOCFPGA
To add the DesignWare MMC driver support for Altera SOCFPGA. It
required information such as clocks and bus width from platform
specific files (SOCFPGA handoff files)

Signed-off-by: Chin Liang See <clsee@altera.com>
Cc: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: Wolfgang Denk <wd@denx.de>
Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
2014-01-09 11:53:55 +02:00
Nobuhiro Iwamatsu 5fe3aefd3d sh: sh2: Remove CONFIG_SH2A definition from asm/processor.h
SH2 and SH2A use a common header. Both checks are not necessary.
This removes CONFIG_SH2A definition from asm/processor.h.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2014-01-09 13:22:22 +09:00
Nobuhiro Iwamatsu 6b87abe3ac sh: sh4: Remove CONFIG_SH4A definition from source code
SH4 and SH4A are compatible. But some instructions are different from these.
In Linux kernel, It is treated as a separate CPU, but for now, I think that
there is no need to divide especially in the U-Boot.

This removes CONFIG_SH4A definition from source code, SH4A is treated as SH4.
And this fix white space.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2014-01-09 12:47:15 +09:00
Simon Glass b88eb329ce sandbox: Add a prototype for cleanup_before_linux()
This function is defined but has no prototype declaration. Add it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
2014-01-08 17:26:01 -07:00
Simon Glass 1209e2727c sandbox: Add facility to save/restore sandbox state
It is often useful to be able to save out the state from a sandbox test
run, for analysis or to restore it later to continue a test. Add generic
infrastructure for doing this using a device tree binary file. This is
a flexible tagged file format which is already supported by U-Boot, and
it supports hierarchy if needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Hung-ying Tyan <tyanh@chromium.org>
2014-01-08 17:25:08 -07:00
Simon Glass 5c2859cdc3 sandbox: Allow reading/writing of RAM buffer
It is useful to be able to save and restore the RAM contents of sandbox
U-Boot either for setting up tests, for later analysys, or for chaining
together multiple tests which need to keep the same memory contents.

Add a function to provide a memory file for U-Boot. This is read on
start-up and written when shutting down. If the file does not exist
on start-up, it will be created when shutting down.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
2014-01-08 17:25:03 -07:00
Simon Glass c5a62d4a7b sandbox: Add -i option to enter interactive mode
Normally when U-Boot starts with a command (-c option) it quits when the
command completes. Normally this is what is requires, since the test is
likely complete.

Provide an option to jump into the console instead, so that debugging or
other tasks may be performed before quitting.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
2014-01-08 17:24:53 -07:00
Simon Glass 91b136c798 sandbox: Allow the console to work earlier
With sandbox, errors and problems may be reported before console_init_f()
is executed. For example, an argument may not parse correctly or U-Boot may
panic(). At present this output is swallowed so there is no indication what
is going wrong.

Adjust the console to deal with a very early sandbox setup, by detecting that
there is no global_data yet, and calling os functions in that case.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
2014-01-08 17:24:50 -07:00
Simon Glass 88bd0e9d15 sandbox: Implement the bootm command for sandbox
When sandbox does a 'bootm' to run a kernel we cannot actually execute it.
So just exit sandbox, which is essentially what U-Boot does on other archs.
Also, allow sandbox to use bootm on any kernel, so that it can be used
to test booting of kernels from any architecture.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
2014-01-08 17:24:42 -07:00
Simon Glass 808434cdbd sandbox: Allow return from board_init_f()
The execution flow becomes easier if we can return from board_init_f()
as ARM does. We can control things from start.c instead of having to
call back into that file from other places.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
2014-01-08 17:24:38 -07:00
Simon Glass 6ebcab8de7 sandbox: Correct help message <arg> garbling
The <arg> is displayed for options with no argument, and omitted for those
with an argument. Swap this around.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
2014-01-08 17:24:23 -07:00
Simon Glass 77595c6d9e sandbox: Improve/augment memory allocation functions
Implement realloc() and free() for sandbox, by adding a header to each
block which contains the block size.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Hung-ying Tyan <tyanh@chromium.org>
2014-01-08 17:24:19 -07:00
Nobuhiro Iwamatsu 8f0960e837 sh: sh2: Change CONFIG_SYS_HZ to CONFIG_SH_CMT_CLK_FREQ
CONFIG_SYS_HZ of SH2 is not used as frequency of base timer. This is the
correct clock of CMT.
This changes from CONFIG_SYS_HZ to CONFIG_SH_CMT_CLK_FREQ, in order to use
CONFIG_SYS_HZ as clock of CMT.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
2014-01-08 14:59:53 +09:00
Nobuhiro Iwamatsu b1165adfd5 sh: sh4: Add CONFIG_SH4 definition to config.mk of SH4
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2014-01-08 14:47:40 +09:00
Nobuhiro Iwamatsu 22e7d66181 sh: sh3: Add CONFIG_SH3 definition to config.mk of SH3
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2014-01-08 14:47:36 +09:00
Nobuhiro Iwamatsu 14eeb926bb sh: sh2: Add CONFIG_SH2 definition to config.mk of SH2
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2014-01-08 14:13:55 +09:00
Albert ARIBAUD 4b0561d841 Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master' 2014-01-06 09:32:42 +01:00
Albert ARIBAUD a891601ce5 Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'
Conflicts:
	include/micrel.h

The conflict above was trivial, caused by four lines being
added in both branches with different whitepace.
2014-01-06 08:49:58 +01:00
Sergey Alyoshin 4611d5bab2 arm: mx5: Add fuse supply enable in fsl_iim
Enable fuse supply before fuse programming and disable after.

Signed-off-by: Sergey Alyoshin <alyoshin.s@gmail.com>
Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
2014-01-03 15:44:06 +01:00