Simon Glass [Mon, 24 Oct 2011 19:15:31 +0000 (19:15 +0000)]
fdt: Add support for a separate device tree (CONFIG_OF_SEPARATE)
This adds support for an FDT to be build as a separate binary file called
u-boot.dtb. This can be concatenated with the U-Boot binary to provide a
device tree located at run-time by U-Boot. The Makefile is modified to
provide this file in u-boot-dtb.bin.
Simon Glass [Sat, 15 Oct 2011 05:48:21 +0000 (05:48 +0000)]
fdt: Add support for embedded device tree (CONFIG_OF_EMBED)
This new option allows U-Boot to embed a binary device tree into its image
to allow run-time control of peripherals. This device tree is for U-Boot's
own use and is not necessarily the same one as is passed to the kernel.
The device tree compiler output should be placed in the $(obj)
rooted tree. Since $(OBJCOPY) insists on adding the path to the
generated symbol names, to ensure consistency it should be
invoked from the directory where the .dtb file is located and
given the input file name without the path.
This commit contains my entry for the ugliest Makefile / shell interaction
competition.
Simon Glass [Sat, 15 Oct 2011 05:48:20 +0000 (05:48 +0000)]
fdt: ARM: Add device tree control of U-Boot (CONFIG_OF_CONTROL)
This adds a device tree pointer to the global data. It can be set by
board code. A later commit will add support for making a device
tree binary blob available to U-Boot for run-time configuration.
Simon Glass [Mon, 24 Oct 2011 18:00:02 +0000 (18:00 +0000)]
net: tftpput: Rename TFTP to TFTPGET
This is a better name for this protocol. Also remove the typedef to keep
checkpatch happy, and move zeroing of NetBootFileXferSize a little
earlier since TFTPPUT will need to change this.
Simon Glass [Mon, 24 Oct 2011 18:00:01 +0000 (18:00 +0000)]
net: tftpput: Add support for receiving ICMP packets
ICMP packets can tell you when there is no server at the other end. It
is useful for tftp to figure this out, so that a quick error can be
displayed, rather than pointlessly retrying.
This adds an ICMP packet handler to the net interface.
Note: This is kind of guess work. The current code is preserved for
all RGMII related modes. It is different for flags=0 (GMII) and flags=5
(SGMII). The last case, SGMII, is successfully tested on
Altera's Terasic DE4.
Signed-off-by: Joachim Foerster <joachim.foerster@missinglinkelectronics.com>
Currently part_efi.c allocates buffers for the gpt_header, the
legacy_mbr, and the pte (partition table entry) that may be
incorrectly aligned for DMA operations.
This patch uses ALLOC_CACHE_ALIGN_BUFFER for the stack allocated
buffers and memalign to replace the malloc of the pte.
Signed-off-by: Anton Staaf <robotboy@chromium.org> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net> Acked-by: Mike Frysinger <vapier@gentoo.org>
Anton staaf [Tue, 4 Oct 2011 11:24:50 +0000 (11:24 +0000)]
mmc: dcache: allocate cache aligned buffers for ext_csd
Currently the mmc_change_freq and mmc_startup functions allocates
buffers on the stack that are passed down to the MMC device driver.
These buffers could be unaligned to the L1 dcache line size. This
causes problems when using DMA and with caches enabled.
This patch correctly cache alignes the buffers used for reading the
ext_csd data from an MMC device.
Signed-off-by: Anton Staaf <robotboy@chromium.org> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Anton staaf [Mon, 3 Oct 2011 13:55:00 +0000 (13:55 +0000)]
ext2: Cache line aligned partial sector bounce buffer
Currently, if a device read request is done that does not begin or end
on a sector boundary a stack allocated bounce buffer is used to perform
the read, and then just the part of the sector that is needed is copied
into the users buffer. This stack allocation can mean that the bounce
buffer will not be aligned to the dcache line size. This is a problem
when caches are enabled because unaligned cache invalidates are not
safe.
This patch uses ALLOC_CACHE_ALIGN_BUFFER to create a stack allocated
cache line size aligned bounce buffer.
Signed-off-by: Anton Staaf <robotboy@chromium.org> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Dave Liu <r63238@freescale.com> Cc: Andy Fleming <afleming@gmail.com> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Change-Id: I32e1594d90ef039137bb219b0f7ced55768744ff Acked-by: Mike Frysinger <vapier@gentoo.org>
Anton staaf [Mon, 3 Oct 2011 13:54:59 +0000 (13:54 +0000)]
mmc: dcache: allocate cache aligned buffer for scr and switch_status
Currently the sd_change_freq function allocates two buffers on the
stack that it passes down to the MMC device driver. These buffers
could be unaligned to the L1 dcache line size. This causes problems
when using DMA and with caches enabled.
This patch correctly cache alignes the buffers used for reading the
scr register and switch status values from an MMC device.
Change-Id: Ifa8414f572ef907681bd2d5ff3950285a215357d Signed-off-by: Anton Staaf <robotboy@chromium.org> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net> Acked-by: Mike Frysinger <vapier@gentoo.org>
Anton staaf [Mon, 3 Oct 2011 13:54:58 +0000 (13:54 +0000)]
tegra: define CONFIG_SYS_CACHELINE_SIZE for tegra
Signed-off-by: Anton Staaf <robotboy@chromium.org> Cc: Tom Warren <twarren.nvidia@gmail.com> Cc: Simon Glass <sjg@chromium.org> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Change-Id: I5c4bcfc0bfe59158ff249fe3be6640eec6d3cc76 Acked-by: Mike Frysinger <vapier@gentoo.org>
Anton staaf [Wed, 12 Oct 2011 13:55:59 +0000 (13:55 +0000)]
cache: add ALLOC_CACHE_ALIGN_BUFFER macro
This macro is used to allocate cache line size aligned stack
buffers for use with DMA hardware.
Signed-off-by: Anton Staaf <robotboy@chromium.org> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Aneesh V <aneesh@ti.com> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net> Cc: Wolfgang Denk <wd@denx.de>
Wolfgang Denk [Mon, 24 Oct 2011 19:14:42 +0000 (21:14 +0200)]
Revert "km_arm: enable POST for these boards"
This reverts commit a2da616311151ecfab8b8fcc510686fc3c0c9a21.
THis was applied by accident - a more recent version of this change
was already present, see commit 9400f8f 2011-10-05 22:03:11 +0200 km_arm: enable POST for these boards
Simon Glass [Sun, 23 Oct 2011 17:44:35 +0000 (17:44 +0000)]
arm: Correct build error introduced by getenv_ulong() patch
Commit dc8bbea removed a local variable that is used in most ARM boards.
Since we want to avoid an 'unused variable' warning with later compilers,
and the #ifdef logic of whether this variable is required is bit painful,
this declares the variable local to the block of code that needs it.
Stefano Babic [Mon, 17 Oct 2011 00:07:43 +0000 (00:07 +0000)]
mkimage: adding support for Davinci AIS image
Some Davinci processors supports the Application
Image Script (AIS) boot process. The patch adds the generation
of the AIS image inside the mkimage tool to make possible
to generate a bootable U-boot without external tools
(TI Davinci AIS Generator).
Signed-off-by: Stefano Babic <sbabic@denx.de> CC: Wolfgang Denk <wd@denx.de>
Mike Frysinger [Sun, 16 Oct 2011 10:04:10 +0000 (10:04 +0000)]
net: ns9750: drop !NET_MULTI driver
Only one board uses this driver (ns9750dev), but the board doesn't seem
to have an entry to actually build it in the Makefile/boards.cfg, so just
delete net support from its board config.
Bernhard Kaindl [Sun, 16 Oct 2011 00:07:08 +0000 (00:07 +0000)]
powerpc/lib/board.c: Call run_post(POST_ROM) before relocating
The call to run_post(POST_ROM) which can run the POST memory test
is currently called too late when gd has already been copied to DRAM.
This results in failure to boot Linux after a POST_ROM memory test
tested all RAM while gd was already relocated to DRAM due to gd being
overwritten by the POST_ROM memory test.
Support this by moving the call to run_post(POST_ROM) to run earlier,
before U-Boot has started to move data to DRAM (from late board_init_f
to early board_init_f) where DRAM is initialized, but not used yet.
This allows that an POST memory test can test the whole DRAM,
including the area where the board info struct is located.
Signed-off-by: Bernhard Kaindl <bernhard.kaindl@thalesgroup.com> Cc: Pieter Voorthuijsen <pieter.voorthuijsen@prodrive.nl>
Bernhard Kaindl [Sat, 15 Oct 2011 23:59:22 +0000 (23:59 +0000)]
net/dns.c: Fix endian conversion for big-endian in dns command
net/dns.c used endian conversion macros wrongly (shorts in reply
were put swapped into CPU, and then ntohs() was used to swap it
back, which broke on big-endian).
Fix this by using the correct linux conversion macro for reading
a unaligned short in network byte order: get_unaligned_be16()
Thanks to Mike Frysinger pointing at the best macro to use.
Tested on big and little endian qemu boards (mips and versatile)
Signed-off-by: Bernhard Kaindl <bernhard.kaindl@thalesgroup.com> Cc: Pieter Voorthuijsen <pieter.voorthuijsen@prodrive.nl> Cc: Robin Getz <rgetz@blackfin.uclinux.org> Acked-by: Mike Frysinger <vapier@gentoo.org>
Anton Staaf [Mon, 17 Oct 2011 23:46:13 +0000 (16:46 -0700)]
cache: include asm/cache.h for ARCH_DMA_MINALIGN definition
ARCH_DMA_MINALIGN will be used to allocate DMA buffers that are
aligned correctly. In all current cases this means that the DMA
buffer will be aligned to at least the L1 data cache line size of
the configured architecture. If the board configuration file
does not specify the architecture L1 data cache line size then the
maximum line size of the architecture is used to align DMA buffers.
Signed-off-by: Anton Staaf <robotboy@chromium.org> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Stefano Babic <sbabic@denx.de> Cc: Ilya Yanok <yanok@emcraft.com> Cc: Laurence Withers <lwithers@guralp.com>
Anton Staaf [Mon, 17 Oct 2011 23:46:06 +0000 (16:46 -0700)]
powerpc: cache: define ARCH_DMA_MINALIGN for DMA buffer alignment
Signed-off-by: Anton Staaf <robotboy@chromium.org> Acked-by: Stefan Roese <sr@denx.de> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Stefan Roese <sr@denx.de>
Anton Staaf [Mon, 17 Oct 2011 23:46:04 +0000 (16:46 -0700)]
m68k: cache: define ARCH_DMA_MINALIGN for DMA buffer alignment
Signed-off-by: Anton Staaf <robotboy@chromium.org> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Jason Jin <jason.jin@freescale.com>
Wolfgang Denk [Sun, 23 Oct 2011 15:00:47 +0000 (17:00 +0200)]
MPC85xx: remove broken "mpq101" board
The board stopped building some time ago, and the board maintainer
agrtees to drop it - see
http://article.gmane.org/gmane.comp.boot-loaders.u-boot/112674
Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Alex Dubov <oakad@yahoo.com> Cc: Andy Fleming <afleming@gmail.com> Cc: Kumar Gala <galak@kernel.crashing.org>
Michal Simek [Tue, 18 Oct 2011 00:22:10 +0000 (00:22 +0000)]
serial: uartlite: Fix compilation warnings
Do not setup userial_ports array as const because
in uartlite_serial_putc is out_be32 which can't write
to tx_fifo if is const.
Warning log:
serial_xuartlite.c: In function 'uartlite_serial_putc':
serial_xuartlite.c:60: warning: initialization discards qualifiers from pointer target type
serial_xuartlite.c: In function 'uartlite_serial_getc':
serial_xuartlite.c:78: warning: initialization discards qualifiers from pointer target type
serial_xuartlite.c: In function 'uartlite_serial_tstc':
serial_xuartlite.c:87: warning: initialization discards qualifiers from pointer target type
Remove MK_STR from places that consume CONFIG_BOOTFILE to force all definitions to be string literals.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Wolfgang Denk <wd@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org>
Remove MK_STR from places that consume CONFIG_ROOTPATH to force all definitions to be string literals.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Wolfgang Denk <wd@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Wed, 12 Oct 2011 19:48:00 +0000 (19:48 +0000)]
autoconf.mk.dep: use target cflags, not host
The current autoconf.mk.dep rule uses the host cflags when executing the
target compiler (which includes target header files). We don't want to
mix the target compiler and host compiler flags, so change it to CFLAGS.
Otherwise we get things like -pedantic which the U-Boot source code does
not build with.
Seems people fixed their files to use libfoo.o, but didn't actually
update the creation targets to use $(cmd_link_o_target). Update the
rest of the Makefile's found with grep.
Signed-off-by: Mike Frysinger <vapier@gentoo.org> Tested-by: Simon Glass <sjg@chromium.org>
Stephen Warren [Tue, 18 Oct 2011 11:11:49 +0000 (11:11 +0000)]
checkpatch whitespace cleanups
This avoids the following checkpatch warning in later patches:
ERROR: "(foo*)" should be "(foo *)"
ERROR: space required before the open brace '{'
ERROR: space prohibited before that close parenthesis ')'
ERROR: spaces required around that '||' (ctx:WxV)
WARNING: space prohibited between function name and open parenthesis '('
WARNING: line over 80 characters
This fixes all the white-space warnings/errors in my subsequent patch,
and within this current patch. A number of other checkpatch warnings
and errors are still present in this patch itself, but are beyond simple
whitespace fixes, so are not solved by this patch.
v2: New patch
Signed-off-by: Stephen Warren <swarren@nvidia.com> Tested-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
Tang Yuantian [Fri, 7 Oct 2011 19:26:58 +0000 (19:26 +0000)]
drivers: add the support for Silicon Image SATA controller
Add the Silicon Image series PCI Express to
Serial ATA controller support, including Sil3132,
Sil3131 and Sil3124.
The SATA controller can be used to load kernel.
The features list:
- Supports 1-lane 2.5 Gbit/s PCI Express
- Supports one/two/four independent Serial ATA channels
- Supports Serial ATA Generation 2 transfer rate of 3.0 Gbit/s
- Supports LBA28 and LBA48
Signed-off-by: Tang Yuantian <b29983@freescale.com> Signed-off-by: Aaron Williams <Aaron.Williams@cavium.com> Tested-by: Lan Chunhe <b25806@freescale.com>
Macpaul Lin [Tue, 11 Oct 2011 22:33:18 +0000 (22:33 +0000)]
nds32/ag101: cpu and init funcs of SoC ag101
SoC ag101 is the first chip using NDS32 N1213 cpu core.
Add header file of device offset support for SoC ag101.
Add main function of SoC ag101 based on NDS32 n1213 core.
Add lowlevel_init.S and other periphal related code.
This version of lowlevel_init.S also replace hardcode value
by MARCO defines from the GPL version andesboot for better
code quality.
Signed-off-by: Macpaul Lin <macpaul@andestech.com>
Macpaul Lin [Wed, 19 Oct 2011 20:41:05 +0000 (20:41 +0000)]
nds32/core N1213: NDS32 N12 core family N1213
Add N1213 cpu core (N12 Core family) support for NDS32 arch.
This patch includes start.S for the initialize procedure of N1213.
Start procedure:
start.S will start up the N1213 CPU core at first,
then jump to SoC dependent "lowlevel_init.S" and
"watchdog.S" to configure peripheral devices.
Signed-off-by: Macpaul Lin <macpaul@andestech.com> Signed-off-by: Greentime Hu <greentime@andestech.com>
Timur Tabi [Wed, 5 Oct 2011 22:08:07 +0000 (17:08 -0500)]
cmd_bdinfo: replace print_str() with print_mhz()
The print_str() helper function for cmd_bdinfo can print any string, but it
is only used to print MHz values. Replace it with print_mhz() that takes
a number and converts it to a string internally.
Linus Walleij [Sun, 2 Oct 2011 11:52:52 +0000 (11:52 +0000)]
serial: pl01x: drain PL01x FIFO before baudrate change
Not draining the FIFO and waiting for the UART to be non-busy
before changing baudrate results in crap characters on the
console, so let's wait for the FIFO to drain and the last
character to be clocked out before we do that.
Che-liang Chiou [Mon, 17 Oct 2011 21:04:15 +0000 (21:04 +0000)]
examples: api: allow build with private libgcc
The examples/api is not configured with USE_PRIVATE_LIBGCC. This makes
building examples/api break on certain boards that do not/cannot use the
public libgcc.
Nevertheless, this patch has to also touch the top-level Makefile to fix
this problem because the current top-level Makefile does not specify
libgcc as a prerequisite of examples/api, and explicitly builds
examples/api _before_ libgcc.
For testing this patch, I added the following to configs/seaboard.h and
ran demo.bin on a Seaboard.
The code had two paths depending on whether the card was to be
accessed from plain memory or the IO region. However the error
path checks whether IO region was obtained - twice. Fix up the
error path according to the probable intention.
Macpaul Lin [Tue, 20 Sep 2011 19:54:32 +0000 (19:54 +0000)]
ftgmac100: reset fix when supports wake on lan
This patch move the reset function from initialization to
driver register procedure.
Some embedded system supports wake on lan nowadays. On this kind of system,
the ftgmac100 will be still supplied power after the system has been
shut-down by Linux. Hence the register used by linux won't be clear
when the system has been powered-off.
The origin ftgmac100 driver in u-boot will only register
driver and functions to network stack and won't reset the ftgmac100
hardware if the network won't be used during boot-up.
This will lead ftgmac100 continue receiving packets and then might corrupt
linux kernel when booting up.
So we reorder the hardware reset function earlier to force the hardware
to be reset whether it will be used or not.
Signed-off-by: Macpaul Lin <macpaul@andestech.com>
Andreas Huber [Tue, 13 Sep 2011 23:06:11 +0000 (23:06 +0000)]
km/common: fix ramfs development target
Calucations of PRAM needs to take into account the 'rootfssize'.
Memory available to the linux kernel 'mem=' is in all cases set to the total
memory size minus the pram size.
Signed-off-by: Andreas Huber <andreas.huber@keymile.com> Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Wolfgang Denk <wd@denx.de>
Luka Perkov [Mon, 5 Sep 2011 21:40:13 +0000 (23:40 +0200)]
fix compile warning for env tools
Patch fixes this issue:
fw_env.c: In function ‘fw_setenv’:
fw_env.c:492:5: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 3 has type ‘size_t’ [-Wformat]
fw_env.c: In function ‘flash_write_buf’:
fw_env.c:806:6: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 3 has type ‘size_t’ [-Wformat]
Signed-off-by: Luka Perkov <lists@lukaperkov.net> Acked-by: Mike Frysinger <vapier@gentoo.org>
Wolfgang Denk [Fri, 21 Oct 2011 21:48:46 +0000 (23:48 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx
* 'master' of git://git.denx.de/u-boot-mpc85xx:
mpc85xx: Add inline GPIO acessor functions
powerpc/85xx: wait for alignment before resetting SERDES RX lanes (SERDES9)
powerpc/85xx: Fix P2020DS booting
powerpc/85xx: Update USB device tree status based on pin settings
fdt: Add new fdt_set_node_status & fdt_set_status_by_alias helpers
powerpc/85xx: Add support for RMan LIODN initialization
powerpc/85xx: Update device tree handling for SRIO
powerpc/85xx: Update setting of SRIO LIODNs
fm: Don't allow disabling of FM1-DTSEC1
fm-eth: Don't mark the MAC we use for MDIO as disabled in device tree
Wolfgang Denk [Fri, 21 Oct 2011 21:36:40 +0000 (23:36 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-coldfire
* 'master' of git://git.denx.de/u-boot-coldfire:
ColdFire: Clean Makefile _config rules
ColdFire: Move boards with simple _config rules to boards.cfg
ColdFire: Fix compilation with CONFIG_SYS_DRAMSZ1 defined
ColdFire: Merge differentiated linking files into a sigle one by board
ColdFire: Add $(obj) before cpu lib to correct build
ColdFire: Cleanup lds files for multiple defined symbols
Wolfgang Denk [Fri, 21 Oct 2011 21:35:12 +0000 (23:35 +0200)]
Merge branch 'master' of /home/wd/git/u-boot/master
* 'master' of /home/wd/git/u-boot/master:
cosmetic: Fixup fixup_silent_linux() for checkpatch
Correct dependency rule to fix SPL build
Move timestamp and version files into 'generated' subdir
sandbox: Makefile changes to build sandbox architecture
Add generic gpio.h in asm-generic
Adjust dependency rules to permit per-file flags
sandbox: Use uintptr_t for 32/64-bit compatibility
sandbox: Add basic config file
sandbox: Add serial uart
sandbox: Add main program
sandbox: Add OS dependent layer
sandbox: Force command sections to be 4-byte aligned
sandbox: Disable standalone/API support
sandbox: Disable built-in malloc
sandbox: Add bootm support
sandbox: Add board info for architecture
sandbox: Add sandbox board
sandbox: Add architecture lib files
sandbox: Add cpu files
sandbox: Add compiler defines to support a 64-bit x86_64 platform
sandbox: Add architecture image support
Fix use of int as pointer in image.c
sandbox: Add architecture header files
arm: ca9x4_ct_vxp: enable PXE BOOTP options support
arm: ca9x4_ct_vxp: enable pxe command support
Convert ca9x4_ct_vxp to standard env variables
net: bootp: add PXE/RFC 4578 DHCP options support
Add pxe command
lib: add uuid_str_to_bin for use with bootp and PXE uuid
README: document standard image variables
Replace space and tab checks with isblank
cosmetic: remove unneeded curly braces
Add isblank
common: add run_command2 for running simple or hush commands
common, menu: use abortboot for menu timeout
Add generic, reusable menu code
DM9000:Add a byte swap macro for dm9000 io operation.
kw_gpio: fix error in kw_gpio_direction_input
Blackfin: bfin_spi: fix build error when DEBUG is defined
Blackfin: define CONFIG_SYS_CACHELINE_SIZE
video: Moving mx3fb.c to CONFIG_VIDEO
mx31: make HSP clock for mx3fb driver available
MX5: Make IPU display output and pixel format configurable
VIDEO: MX5: export pix format
VIDEO: MX5: Switch MX5 to CONFIG_VIDEO
video: update the Freescale DIU driver to use linux/fb.h
powerpc: cpm2 boards: update fcc register logic