York Sun [Wed, 12 Feb 2014 23:55:35 +0000 (15:55 -0800)]
Fix memory commands for 64-bit platforms
For aarch64, unsigned long is 64-bit data. Memory commands should be fixed
with u32 for 32-bit address access. To be clear, ushort is replace with
u16, u_char is replaced with u8.
Signed-off-by: York Sun <yorksun@freescale.com> Acked-by: Wolfgang Denk <wd@denx.de>
Stephen Warren [Wed, 12 Feb 2014 21:30:04 +0000 (14:30 -0700)]
pxe: prepend fdtdir to DTB name irrespective of source
The directory name from an fdtdir directive in a PXE config file should
always be pre-pended to the DTB filename; it shouldn't matter whether
the DTB filename came from the $fdtfile environment variable, or whether
it was constructed dynamically from ${soc}-${board}.dtb. Fix the code to
always prepend the directory name.
Reported-by: Dennis Gilmore <dennis@ausil.us> Fixes: c61d94d86035 ("pxe: implement fdtdir extlinux.conf tag") Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Dennis Gilmore <dennis@ausil.us> Tested-by: Dennis Gilmore <dennis@ausil.us>
David Feng [Wed, 12 Feb 2014 08:10:08 +0000 (16:10 +0800)]
fix address of error message in mtest command
This patch deal with error message of mtest command.
When test failed, the mtest command will output error information
that include memory address and value. But the address field is
not correct or misleading.
Signed-off-by: David Feng <fenghua@phytium.com.cn>
York Sun [Tue, 11 Feb 2014 19:57:26 +0000 (11:57 -0800)]
common: Add get_effective_memsize() to memsize.c
This function has been around for powerpc. It is used for systems with
memory more than CONFIG_MAX_MEM_MAPPED. In case of non-contiguous memory,
this feature can limit U-boot to one block without going over the limit.
Signed-off-by: York Sun <yorksun@freescale.com> Acked-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
York Sun [Mon, 10 Feb 2014 21:59:43 +0000 (13:59 -0800)]
Driver/ddr: Add support of different DDR base address
DDR base address has been the same from the view of core and DDR
controllers. This has changed for Freescale ARM-based SoCs. Controllers
setup DDR memory in a contiguous space and cores view it at separated
locations.
Without this conversion the code works correctly at least on AT91SAM9G45.
On big endian systems there should be no difference after applying this
patch because uimage_to_cpu(x) and ntohl(x) both expand to 'x'.
Alexey Brodkin [Tue, 18 Feb 2014 11:10:58 +0000 (15:10 +0400)]
arc: fix relocation for big-endian target
In case of little-endian ARC700 instructions (which may include target
address) are encoded as middle-endian. That's why it's required to swap
bytes after read and ten right before write back.
But in case of big-endian ARC700 instructions are encoded as a plain
big-endian. Thus no need for byte swapping.
Alexey Brodkin [Sat, 8 Feb 2014 06:24:35 +0000 (10:24 +0400)]
axs101: fix dw gmac instantiation for updated dw gmac driver
With accepted change to DW GMAC driver - 92a190aaab3536d695c51e0739f925910eb49889 (net/designware - switch driver
to phylib usage) we need to update this board because
"designware_initialize" now accepts only 2 parameters instead of 4.
Alexey Brodkin [Sat, 8 Feb 2014 06:10:02 +0000 (10:10 +0400)]
serial/serial_arc: switch from {read|write}l to {read|write}b accessors
This is required for proper functionality on big-endian targets.
Memory-mapped registres of ARC UART are not 32-bit words but 8-bit bytes
so on little-endian target either acessor (_l or _b) works fine.
On big-endian only _b accessors works as expected.
Tom Rini [Thu, 20 Feb 2014 15:14:10 +0000 (10:14 -0500)]
blackfin: Add <asm/clock.h> to numerous drivers
With d6a320d we moved some clock externs out of blackfin_local.h and
into clock.h but now need to include <asm/clock.h> in more drivers to
avoid warnings.
Cc: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Tom Rini <trini@ti.com>
Masahiro Yamada [Thu, 20 Feb 2014 08:18:42 +0000 (17:18 +0900)]
venice2: move device tree to fix build error
Commit 5ab502cb gathered all device tree sources
to arch/$(ARCH)/dts/.
So tegra124-venice2.dts also must go to arch/arm/dts directory
to build venice2 board.
(Commit 5ab502cb had been posted before venice2 board support
was merged. So an unvisible conflict happened.)
Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@ti.com>
Albert ARIBAUD [Thu, 20 Feb 2014 12:16:05 +0000 (13:16 +0100)]
Merge branch 'u-boot/master' into 'u-boot-arm/master'
Conflicts:
Makefile
drivers/net/npe/Makefile
These two conflicts arise from commit 0b2d3f20
("ARM: NET: Remove the IXP NPE ethernet driver") and are
resolved by deleting the drivers/net/npe/Makefile file
and removing the CONFIG_IXP4XX_NPE line from Makefile.
Alexey Brodkin [Mon, 10 Feb 2014 08:20:13 +0000 (12:20 +0400)]
arc: remove "hardware.h"
This file was only required for compilation of designware_i2c driver.
Since explicit inclusion of "hardware.h" is now removed from the driver
we may safely remove this empty header as well.
Alexey Brodkin [Mon, 10 Feb 2014 08:20:12 +0000 (12:20 +0400)]
designware_i2c: remove inclusion of <asm/arch/hardware.h>
As soon as all boards have their CONFIG_SYS_I2C_BASE defined in
configuration files instead of "asm/arch/hardware.h" it's safe to remove
the inclusion in question and make driver platform-independent.
Adds support for set-speed on the OMAP24xx I2C Adapter.
Changes to omap24_i2c_write(...) for polling ARDY Bit from IRQ-Status.
Otherwise on a subsequent call the transfer of last byte from the
predecessor is aborted and therefore lost. For exmaple when
i2c_write(...) is followed by a i2c_setspeed(...) (which has to
deactivate and activate master for changing psc,...).
Minor cosmetical changes.
Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at> Cc: Heiko Schocher <hs@denx.de>
Marek Vasut [Thu, 6 Feb 2014 01:59:34 +0000 (02:59 +0100)]
i2c: i2c-mxs: Wait for I2C to empty queue
Make sure the I2C write queue is empty before leaving the mxs_i2c_write().
If we start and I2C write and only wait for ACK, the MXS I2C IP block may
enter next operation while still processing the write aftermath internally.
This will in turn disrupt one or more subsequent transfer(s).
A testcase for this issue is as such. This testcase is also interesting because
the first I2C_WRITE which becomes disruptive happens in the 'i2c read' command.
The 'i2c read' command first uses I2C_WRITE to send I2C address of the chip and
then uses I2C_READ to read data from the chip. After this command completes, the
'i2c probe' will use sequence of I2C_WRITE commands to probe the I2C bus. The
problem is that the first I2C_WRITE disrupted the I2C IP block operation and
this sideeffect propagates all the way to this next I2C_WRITE used by the 'i2c
probe' call. The result is the 'i2c probe' receives an ACK on I2C address 0x00,
even if this ACK was owned by the previous I2C_WRITE operation. Note that the
'i2c read' command must read from a valid I2C chip address.
Chin Liang See [Tue, 4 Feb 2014 17:56:23 +0000 (11:56 -0600)]
designware_i2c: Enhance DesignWare I2C driver address support
Enhance the DesignWare I2C driver to support address length more
than 1 byte. This enhancement is required as some I2C slave
device such as EEPROM chip might have 16 bit address byte.
Signed-off-by: Chin Liang See <clsee@altera.com> Acked-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com> Cc: Tom Rini <trini@ti.com>
cc: Armando Visconti <armando.visconti@st.com> Cc: Stefan Roese <sr@denx.de> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net> Cc: Heiko Schocher <hs@denx.de>
Michael Burr [Wed, 22 Jan 2014 08:46:07 +0000 (09:46 +0100)]
i2c: zynq: Support for 0-length register address
Fixed bug with alen == 0 in 'i2c_write', 'i2c_read'
Further minor corrections:
- Write 'address' register before 'data' register.
- Write 'transfer_size' register before 'address' register.
Signed-off-by: Michael Burr <michael.burr@logicpd.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Masahiro Yamada [Thu, 13 Feb 2014 09:30:26 +0000 (18:30 +0900)]
Move #ifdef(CONFIG_DISPLAY_CPUINFO) from caller to callee
- When CONFIG_DISPLAY_CPUINFO is not enabled,
print_cpuinfo() should be defined as an empty function
in a header, include/common.h
- Remove #ifdef CONFIG_DISPLAY_CPUINFO .. #endif
from caller, common/board_f.c and arch/arm/lib/board.c
- Remove redundant prototypes in arch/arm/lib/board.c,
arch/arm/include/asm/arch-am33x/sys_proto.h and
board/nokia/rx51/rx51.h, keeping the one in include/common.h
- Add #ifdef CONFIG_DISPLAY_CPUINFO to the func definition
where it is missing
Masahiro Yamada [Wed, 5 Feb 2014 02:28:26 +0000 (11:28 +0900)]
dts: move device tree sources to arch/$(ARCH)/dts/
Unlike Linux Kernel, U-Boot historically had *.dts files under
board/$(VENDOR)/dts/ and *.dtsi files under arch/$(ARCH)/dts/.
I think arch/$(ARCH)/dts dicretory is a better location
to store both *.dts and *.dtsi files.
For example, before this commit, board/xilinx/dts directory
had both Microblaze dts (microblaze-generic.dts) and
ARM dts (zynq-*.dts), which are totally unrelated.
This commit moves *.dts to arch/$(ARCH)/dts/ directories,
allowing us to describe nicely mutiple DTBs generation in the next commit.
Masahiro Yamada [Wed, 5 Feb 2014 01:52:52 +0000 (10:52 +0900)]
kernel-doc: fix some errors
- Delete fs.xml from DOCBOOKS to fix an error.
Commit e3ff797c added fs.xml to DOCBOOKS
but missed to add doc/DocBook/fs.tmpl.
- Fix the location of include guard in include/linker_lists.h.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Reported-by: Abraham Varricatt <abraham.varricatt@vvdntech.com> Acked-by: Simon Glass <sjg@chromium.org>
Masahiro Yamada [Tue, 4 Feb 2014 08:24:44 +0000 (17:24 +0900)]
kbuild: Do not generate .*.su files at the top directory
Without this workaround, you will see a lot of ".*.su" files
at the top directory after building with a compiler
which supports "-fstack-usage" option.
Masahiro Yamada [Tue, 4 Feb 2014 08:24:43 +0000 (17:24 +0900)]
board: sandburst: delete FORCEBUILD
We had switched to Kbuild, so we do not need to
delete sandburst board files at every build.
U-Boot conventional build system did not check the
update of command line option, -DBUILDUSER.
Kbuild can handle it nicely and re-builds object files
when command line options are changed.
(The file ".*.cmd" stores the information how the file
was generated at the previous build.)
Masahiro Yamada [Tue, 4 Feb 2014 08:24:41 +0000 (17:24 +0900)]
kbuild: support simultaneous board configuration and "make all"
This commit fixes two problems:
[1] We could not do board configuration and "make all"
in one command line.
For example, the following did not work as we expect:
$ make sandbox_config all
Configuring for sandbox board...
make: Nothing to be done for `all'.
[2] mixed-target build did not work with -j option
For example, the following did not work:
$ make -j8 sandbox_config u-boot
Makefile:481: *** "System not configured - see README". Stop.
make: *** [u-boot] Error 2
make: *** Waiting for unfinished jobs....
Configuring for sandbox board...
Going forward, we can do
$ make -j8 sandbox_config all
This is the same as
$ make sandbox_config
$ make -j8
Masahiro Yamada [Tue, 4 Feb 2014 08:24:38 +0000 (17:24 +0900)]
Makefile: Do not pass MTD_VERSION from the top Makefile
$(MTD_VERSION) is used in tools/env/Makefile
If you specify a variable at a command line like:
$ make MTD_VERSION=old env
or specify it thru an envrionment variable like:
$ export MTD_VERSION=old
$ make env
it is inherited to the sub-make too.
We do not need to pass it from the top Makefile explicitely.
Masahiro Yamada [Tue, 4 Feb 2014 08:24:37 +0000 (17:24 +0900)]
kbuild: refactor Makefile and spl/Makefile more
This commit refactors rules of directory descending
and defines u-boot-dirs and u-boot-all-dirs.
(We will need u-boot-all-dirs when using
scripts/Makefile.clean)
Masahiro Yamada [Tue, 4 Feb 2014 08:24:33 +0000 (17:24 +0900)]
kbuild: generate {spl, tpl}-autoconf.mk only when it is necessary
Before this commit, {spl,tpl}-autoconf.mk was always generated
at the top Makefile even if SPL(TPL) build was not selected.
This commit moves the build rule of {spl,tpl}-autoconf.mk
from the top Makefile to spl/Makefile.
It prevents unnecessary {spl,tpl}-autoconf.mk from being
generated.
Masahiro Yamada [Tue, 4 Feb 2014 08:24:32 +0000 (17:24 +0900)]
kbuild: move include directives of board configuration files
This commit changes the location of include directives
of board configuration files.
The purpose of this change is:
- Slim down $(TOPDIR)/config.mk
- Prevent $(TOPDIR)/Makefile from including the same
configuration file twice
- Do not include include/config.mk multiple times
because ARCH, CPU, BOARD, VENDOR, SOC are exported
Before this commit:
- include/autoconf.mk was included from $(TOPDIR)/Makefile
and $(TOPDIR)/config.mk
(This means $(TOPDIR)/Makefile included include/autoconf.mk twice)
- include/{spl,tpl}-autoconf.mk was included from $(TOPDIR)/config.mk
- include/config.mk was included from $(TOPDIR)/Makefile
and $(TOPDIR)/config.mk
(This means $(TOPDIR)/Makefile included include/config.mk twice)
After this commit:
- include/autoconf.mk is included from $(TOPDIR)/Makefile
and $(TOPDIR)/scripts/Makefile.build
- include/{spl,tpl}-autoconf.mk is included from $(TOPDIR)/spl/Makefile
and $(TOPDIR)/scripts/Makefile.build
- include/config.mk is included from $(TOPDIR)/config.mk and
$(TOPDIR)/spl/Makefile
Masahiro Yamada [Tue, 4 Feb 2014 08:24:28 +0000 (17:24 +0900)]
kbuild: use Linux Kernel build scripts
Now we are ready to switch over to real Kbuild.
This commit disables temporary scripts:
scripts/{Makefile.build.tmp, Makefile.host.tmp}
and enables real Kbuild scripts:
scripts/{Makefile.build,Makefile.host,Makefile.lib}.
This switch is triggered by the line in scripts/Kbuild.include
-build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build.tmp obj
+build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj
We need to adjust some build scripts for U-Boot.
But smaller amount of modification is preferable.
Additionally, we need to fix compiler flags which are
locally added or removed.
In Kbuild, it is not allowed to change CFLAGS locally.
Instead, ccflags-y, asflags-y, cppflags-y,
CFLAGS_$(basetarget).o, CFLAGS_REMOVE_$(basetarget).o
are prepared for that purpose.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Tested-by: Gerhard Sittig <gsi@denx.de>
Masahiro Yamada [Tue, 4 Feb 2014 08:24:26 +0000 (17:24 +0900)]
Makefile: rename scripts/Makefile.build to scripts/Makefile.build.tmp
Some build scripts including scripts/Makefile.build
will be imported from Linux Kernel in the next commit.
We need to adjust them for U-Boot in the following commits.
To make it easier for reviewers to track the modification,
this commit renames scripts/Makefile.build to
scripts/Makefile.build.tmp beforehand.
Masahiro Yamada [Tue, 4 Feb 2014 08:24:24 +0000 (17:24 +0900)]
kbuild: change out-of-tree build
This commit changes the working directory
where the build process occurs.
Before this commit, build process occurred under the source
tree for both in-tree and out-of-tree build.
That's why we needed to add $(obj) prefix to all generated
files in makefiles like follows:
$(obj)u-boot.bin: $(obj)u-boot
Here, $(obj) is empty for in-tree build, whereas it points
to the output directory for out-of-tree build.
And our old build system changes the current working directory
with "make -C <sub-dir>" syntax when descending into the
sub-directories.
On the other hand, Kbuild uses a different idea
to handle out-of-tree build and directory descending.
The build process of Kbuild always occurs under the output tree.
When "O=dir/to/store/output/files" is given, the build system
changes the current working directory to that directory and
restarts the make.
Kbuild uses "make -f $(srctree)/scripts/Makefile.build obj=<sub-dir>"
syntax for descending into sub-directories.
(We can write it like "make $(obj)=<sub-dir>" with a shorthand.)
This means the current working directory is always the top
of the output directory.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Tested-by: Gerhard Sittig <gsi@denx.de>
Masahiro Yamada [Tue, 4 Feb 2014 08:24:19 +0000 (17:24 +0900)]
Makefile: move more flags to the top Makefile
Before this commit, most of compiler flags were defined in config.mk.
But it is redundant because config.mk is included from all recursive make.
This commit moves many complier flags to the top Makefile
and export them.
And we use new vaiarables to store them:
KBUILD_CPPFLAGS, KBUILD_CFLAGS, KBUILD_AFLAGS.
This will allow us to switch more smoothly to Kbuild.
Masahiro Yamada [Tue, 4 Feb 2014 08:24:18 +0000 (17:24 +0900)]
kbuild: Use Kbuild.include
This commit adjusts some files to use Kbuild.include.
- Use cc-option defined in Kbuild.include
(Delete cc-option in config.mk)
- Use cc-version defined in
(Delete cc-version in config.mk)
- Move binutils-version and dtc-version to Kbuild.include
by analogy to cc-version
This commit also adds srctree (same as SRCTREE)
to use Kbuild scripts.
Masahiro Yamada [Tue, 4 Feb 2014 08:24:15 +0000 (17:24 +0900)]
Makefile: move some variable definitions to the top Makefile
This commit moves some variable definitions from config.mk
to the top Makefile:
- HOSTCC, HOSTCFLAGS, HOSTLDFLAGS
- AS, LD, CC, CPP, etc.
- SHELL (renamed to CONFIG_SHELL)
I'd like to slim down config.mk file
because it is included from all recursive make.
It is redundant to re-define the variables
every time descending into sub directories.
We should rather define them at the top Makefile
and export them.
U-Boot makefiles has been used "SHELL" variable to store shell
chosen for the user, whereas Linux Kernel uses "CONFIG_SHELL".
We should never use "SHELL" variable because it is
a special variable for GNU Make.
Changing SHELL may cause unpredictable side effects
whose root cause is usually difficult to find.
We should use a generic variable name "CONFIG_SHELL".
We should not use the syntax as follows either:
rm -f $(obj)tools/env/{fw_printenv,fw_setenv}
This depends on "bash" although GNU Make generally
invokes "sh" to run the each rule.
Masahiro Yamada [Tue, 4 Feb 2014 08:24:14 +0000 (17:24 +0900)]
Makfile: move suffix rules to Makefile.build
This commit moves suffix rules from config.mk
to scripts/Makefile.build, which will allow us
to switch smoothly to real Kbuild.
Note1:
post/lib_powerpc/fpu/Makefile has
its own rule to compile C sources.
We need to tweak it to keep the same behavior.
Note2:
There are two file2 with the same name:
arch/arm/lib/crt0.S and eamples/api/crt0.S.
To keep the same build behavior,
examples/api/Makefile also has to be treaked.
Wolfgang Denk [Fri, 31 Jan 2014 08:28:25 +0000 (09:28 +0100)]
EXT4: Fix number base handling of "ext4write" command
Unlike other commands (for example, "fatwrite"), ext4write would
interpret the "sizebytes" as decimal number. This is not only
inconsistend and unexpected to most users, it also breaks usage
like this: