Commit Graph

13979 Commits

Author SHA1 Message Date
Simon Glass
fe34107e38 sandbox: Disable built-in malloc
We prefer to U-Boot's malloc but for now it is easier to use the C library's
version.

Signed-off-by: Simon Glass <sjg@chromium.org>
2011-10-17 23:56:57 +02:00
Simon Glass
6d6f123632 sandbox: Add bootm support
This adds sandbox architecture support to bootm, although it is probably
not useful to load sandbox code into the address space and execute it.

This change at least make the file build correctly on 64-bit machines.

Signed-off-by: Simon Glass <sjg@chromium.org>
2011-10-17 23:56:57 +02:00
Simon Glass
6fcc3be453 sandbox: Add board info for architecture
This is required for the bdinfo command to work.

Signed-off-by: Simon Glass <sjg@chromium.org>

Fix syntax error.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-10-17 23:56:46 +02:00
Simon Glass
43bd194c42 sandbox: Add sandbox board
This adds basic files for the sandbox board. The lds file is very simple
since we can rely mostly on the linker defaults.

Signed-off-by: Simon Glass <sjg@chromium.org>
2011-10-17 23:53:46 +02:00
Simon Glass
b8605a1cbd sandbox: Add architecture lib files
These files are taken from the ARM board implementation and then reduced
to remove unneeded cruft.

Ideally we would work towards unifying arch/xxx/lib files, particularly
board.c.

Signed-off-by: Simon Glass <sjg@chromium.org>
2011-10-17 23:53:46 +02:00
Simon Glass
4b0730d242 sandbox: Add cpu files
This is an initial implementation with all functions defined but not working.

The lds file is very simple since we can mostly rely on the linker defaults.

Signed-off-by: Simon Glass <sjg@chromium.org>
2011-10-17 23:53:46 +02:00
Simon Glass
a7551a3f79 sandbox: Add compiler defines to support a 64-bit x86_64 platform
This sets __WORDSIZE to 8 correctly on 64-bit machines.

Signed-off-by: Simon Glass <sjg@chromium.org>
2011-10-17 23:53:39 +02:00
Simon Glass
65bf1d39f4 sandbox: Add architecture image support
We won't actually load an image with this architecture, but we still need to
define it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2011-10-17 22:46:38 +02:00
Simon Glass
0ec2ce4a67 Fix use of int as pointer in image.c
It is better to use %p in this case.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-10-17 22:46:13 +02:00
Simon Glass
744d9859a7 sandbox: Add architecture header files
This adds required header files for the sandbox architecture, and a basic
description of what sandbox is (README.sandbox).

Signed-off-by: Simon Glass <sjg@chromium.org>
2011-10-17 22:45:50 +02:00
Jason Hobbs
e72f0b1521 arm: ca9x4_ct_vxp: enable PXE BOOTP options support
Signed-off-by: Jason Hobbs <jason.hobbs@calxeda.com>
Cc: Matt Waddel <matt.waddel@linaro.org>
2011-10-17 22:25:36 +02:00
Jason Hobbs
e21669fd70 arm: ca9x4_ct_vxp: enable pxe command support
Signed-off-by: Jason Hobbs <jason.hobbs@calxeda.com>
Cc: Matt Waddel <matt.waddel@linaro.org>
2011-10-17 22:25:35 +02:00
Jason Hobbs
75e7f3f3dd Convert ca9x4_ct_vxp to standard env variables
Signed-off-by: Jason Hobbs <jason.hobbs@calxeda.com>
Cc: Matt Waddel <matt.waddel@linaro.org>
2011-10-17 22:25:35 +02:00
Jason Hobbs
d2b5d5c4c1 net: bootp: add PXE/RFC 4578 DHCP options support
These options are required to be present in RFC 4578 compliant DHCP
requests. They give more information to DHCP servers to allow serving

different DHCP responses to different systems based on client
architecture, client capabilities, UUID, or vendor.

Signed-off-by: Jason Hobbs <jason.hobbs@calxeda.com>
2011-10-17 22:25:35 +02:00
Jason Hobbs
06283a6401 Add pxe command
Add pxe command, which is intended to mimic PXELINUX functionality.
'pxe get' uses tftp to retrieve a file based on UUID, MAC address or IP
address. 'pxe boot' interprets the contents of PXELINUX config like file
to boot using a specific initrd, kernel and kernel command line.

This patch also adds a README.pxe file - see it for more details on the
pxe command.

Signed-off-by: Jason Hobbs <jason.hobbs@calxeda.com>
2011-10-17 22:25:35 +02:00
Jason Hobbs
e11938eabc lib: add uuid_str_to_bin for use with bootp and PXE uuid
Signed-off-by: Jason Hobbs <jason.hobbs@calxeda.com>
2011-10-17 22:25:35 +02:00
Jason Hobbs
dc0b7b0e61 README: document standard image variables
With these documented, we can start pushing towards standardizing their
use across boards.

Signed-off-by: Jason Hobbs <jason.hobbs@calxeda.com>
Cc: Mike Frysinger <vapier@gentoo.org>
2011-10-17 22:25:34 +02:00
Jason Hobbs
4d91a6ecab Replace space and tab checks with isblank
These are various places I found that checked for conditions equivalent
to isblank.

Signed-off-by: Jason Hobbs <jason.hobbs@calxeda.com>
2011-10-17 22:25:34 +02:00
Jason Hobbs
ce2d4c9532 cosmetic: remove unneeded curly braces
This prevents a checkpatch warning in the patch to use isblank

Signed-off-by: Jason Hobbs <jason.hobbs@calxeda.com>
2011-10-17 22:25:34 +02:00
Jason Hobbs
93337abbfe Add isblank
Existing ctype checks are implemented using a 256 byte lookup table,
allowing each character to be in any of 8 character classes. Since there
are 8 existing character classes without the blank class, I implemented
isblank without using the lookup table.  Since there are only two blank
characters - tab and space - this is a more reasonable approach than
doubling the size of the lookup table to accommodate one more class.

Signed-off-by: Jason Hobbs <jason.hobbs@calxeda.com>
2011-10-17 22:25:34 +02:00
Jason Hobbs
c8a2079e49 common: add run_command2 for running simple or hush commands
Signed-off-by: Jason Hobbs <jason.hobbs@calxeda.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-10-17 22:25:34 +02:00
Jason Hobbs
b41bc5a82d common, menu: use abortboot for menu timeout
Signed-off-by: Jason Hobbs <jason.hobbs@calxeda.com>
2011-10-17 22:25:33 +02:00
Jason Hobbs
b69bf52dfe Add generic, reusable menu code
This will be used first by the pxe code, but is intended to be
generic and reusable for other jobs in U-boot.

Signed-off-by: Jason Hobbs <jason.hobbs@calxeda.com>
2011-10-17 22:25:33 +02:00
Jason Jin
5c1d082b14 DM9000:Add a byte swap macro for dm9000 io operation.
commit a45dde2293 changed the dm9000
direct register access to standard IO. This should work
on the ColdFire platform as there are corresponding macros for
the LE devices. But the hardware settings on some ColdFire boards had
swapped the byte order which make the original macros such as out_le16
cannot work. To avoid changing the common io access code on ColdFire
platform, the DM9000_BYTE_SWAPPED define was added to make the dm9000 use
__raw* IO access on some ColdFire boards.

Signed-off-by: Jason Jin <Jason.jin@freescale.com>
2011-10-17 22:25:33 +02:00
Holger Brunck
e5afdf584c kw_gpio: fix error in kw_gpio_direction_input
The function kw_gpio_is_valid returns zero on success, so
adapt the error check accordingly.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
cc: Dieter Kiermaier <dk-arm-linux@gmx.de>
2011-10-17 22:25:33 +02:00
Mike Frysinger
0d2b0a8f45 Blackfin: bfin_spi: fix build error when DEBUG is defined
The new debug() changes pointed out debug code that rotted a little.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-10-17 22:25:33 +02:00
Mike Frysinger
5aa5b88404 Blackfin: define CONFIG_SYS_CACHELINE_SIZE
Common U-Boot API wants this define, so import asm/cache.h from Linux
to provide suitable defines.

Acked-by: Anton Staaf <robotboy@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-10-17 22:25:32 +02:00
Helmut Raiger
82a04900a5 video: Moving mx3fb.c to CONFIG_VIDEO
mx3fb.c was based on CONFIG_LCD and is moved by this patch to
CONFIG_VIDEO, which has greater freedom in selecting videomodes
even at runtime.

This renders the accumulating list of display defines
(CONFIG_DISPLAY_VBEST..., CONFIG_DISPLAY_C057...) obsolete as
these may be setup through env variables:

uboot> setenv mydisplay 'video=ctfb240,y:320,depth:16,mode:0,pclk:185925,
	le:9,ri:17,up:7,lo:10,hs:1,vs:1,sync:100663296,vmode:0'
uboot> setenv videomode ${mydisplay}

This commit also fixes the board config files for qong and
imx31_phycore boards as needed. The videomode settings of
previously supported displays are added to CONFIG_EXTRA_ENV_SETTINGS
now. CONFIG_SYS_MALLOC_LEN for imx31_phycore board is increased
to make the frame buffer allocation working with the changed
driver.

Signed-off-by: Helmut Raiger <helmut.raiger@hale.at>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
2011-10-17 22:25:32 +02:00
Helmut Raiger
3f480bf7c3 mx31: make HSP clock for mx3fb driver available
This additionally updates mx31/generic.c by
- replacing __REG() macro accesses with readl() and writel()
- providing macros for PDR0 and PLL bit accesses

Signed-off-by: Helmut Raiger <helmut.raiger@hale.at>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2011-10-17 22:25:32 +02:00
Marek Vasut
711a6722f9 MX5: Make IPU display output and pixel format configurable
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Stefano Babic <sbabic@denx.de>
Tested-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2011-10-17 22:25:32 +02:00
Stefano Babic
3d1d5e2379 VIDEO: MX5: export pix format
Pixel format defines must be available for boards to set up
the right display. Move them and export in a new file.

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Anatolij Gustschin <agust@denx.de>
CC: Marek Vasut <marek.vasut@gmail.com>
Tested-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2011-10-17 22:25:32 +02:00
Stefano Babic
63f832fbb8 VIDEO: MX5: Switch MX5 to CONFIG_VIDEO
The framebuffer driver for MX5 is based on CONFIG_LCD.
In the current implementation, there is a serious bug
because the required memory is allocated before
relocation, but the driver knows only later which is
the resolution of the display. The patch switches the driver
to CONFIG_VIDEO and the memory is allocated by the driver itself.

We also need to switch the vision2 board code and config file
in the same commit so that this commit will be bisectable.

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Anatolij Gustschin <agust@denx.de>
Tested-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2011-10-17 22:25:31 +02:00
Timur Tabi
3c59e3986c video: update the Freescale DIU driver to use linux/fb.h
Update the Freescale DIU video driver (fsl_diu_fb.c) to use linux/fb.h.
Some data structures from this header file were just copied into
fsl_diu_fb.c.

Signed-off-by: Timur Tabi <timur@freescale.com>
2011-10-17 22:25:31 +02:00
Mike Frysinger
d4590da436 powerpc: cpm2 boards: update fcc register logic
In the recent dropping of !NET_MULTI code (commit e2a53458a7),
I misread the logic in include/net.h.  Some of it was used by NET_MULTI
code as glue between the multi/non-multi worlds for cpm2 boards.

Rather than restore the block of code, push the logic to the board config
headers where it all belongs.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-10-17 22:25:31 +02:00
Anatolij Gustschin
92faa8b109 zlib: handle overflow while calculating available stream input size
If compressed data is located in sectors at the end of the flash and
it's offset + input stream size > 0xFFFFFFFF, the uncompressing time
is very long, since processing of the stream is done bytewise (and
not blockwise) due to overflow in inflate_fast() while calculation
and checking for enough input available.

Check for this overflow condition and limit the available stream
input size to the actually max. possible input size. This fixes
the problem.

The issue is easily reproduceable by placing a gziped bitmap in flash,
e.g. at FFF80000, and running 'bmp' commands like 'bmp info FFF80000'
or 'bmp display FFF80000'. The uncompressing can take up to 3 sec.
whereas it should normaly take a fraction of a second. If the
'splashimage' environment variable points to this address, the
booting time also increases significantly.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2011-10-17 21:45:35 +02:00
Mike Frysinger
8d80d05753 serial_exit: punt unused prototype
No code defines or calls this, so drop the prototype.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Simon Glass <sjg@chromium.org>
2011-10-15 22:20:59 +02:00
Mike Frysinger
464c79207c punt unused clean/distclean targets
The top level Makefile does not do any recursion into subdirs when
cleaning, so these clean/distclean targets in random arch/board dirs
never get used.  Punt them all.

MAKEALL didn't report any errors related to this that I could see.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-10-15 22:20:36 +02:00
Daniel Schwierzeck
fa28bd2eef common: fix missing function pointer relocation in fixup_cmdtable()
The command auto-completion does not work on architectures relying
on CONFIG_NEEDS_MANUAL_RELOC like MIPS. Cause is the missing function
pointer fixup for cmd_tbl_t::complete function in fixup_cmdtable().

This patch adds the missing pointer fixup in case of CONFIG_AUTO_COMPLETE
is defined.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
2011-10-15 22:19:36 +02:00
Anatolij Gustschin
4fc823ddb4 mpc5200: digsy_mtc: fix detection of Coral-PA
A delay of approximately 250 ms after PCI bus reset in
pci_mpc5xxx_init() is needed to recognize the Coral-PA
controller on the graphic extention board.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Acked-by: Detlev Zundel <dzu@denx.de>
2011-10-15 22:18:39 +02:00
Anatolij Gustschin
0da1fb03c5 pci: move pcidelay code to new location just before PCI bus scan
PCI cards might need some time after reset to respond. On some
boards (mpc5200 or mpc8260 based) the PCI bus reset is deasserted
at pci_init_board() time, so we currently can not use available
"pcidelay" option for waiting before PCI bus scan since this
waiting takes place before calling pci_init_board(). By moving
the pcidelay code to the new location using of the "pcidelay"
option is possible on mpc5200 or mpc8260 based boards, too.

Since pci_hose_scan() could be called multiple times, restrict
the function to wait only during its first call and to ignore
pcidelay for any further call (as pointed out by Matthias).

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Matthias Fuchs <matthias.fuchs@esd.eu>
Acked-by: Stefan Roese <sr@denx.de>
Acked-by: Matthias Fuchs <matthias.fuchs@esd.eu>
Tested-by: Matthias Fuchs <matthias.fuchs@esd.eu>
2011-10-15 22:16:53 +02:00
Michal Simek
4f1ec4c176 net: axi_ethernet: Add driver to u-boot
Add axi_ethernet driver for little-endian Microblaze.

RX/TX BDs and rxframe buffer are shared among all axi_ethernet MACs.
Only one MAC can work in one time.

Signed-off-by: Michal Simek <monstr@monstr.eu>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-10-15 22:12:05 +02:00
Michal Simek
5ac83801f9 net: emaclite: Fix coding style
Coding style should follow linux coding style.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2011-10-15 22:09:43 +02:00
Michal Simek
8043925204 net: emaclite: Use PKTSIZE directly
Do not setup additional ENET_MAX_MTU macro.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2011-10-15 22:09:27 +02:00
Michal Simek
947324b9ca net: emaclite: Setup RX/TX ping pong for every instance
Setup RX/TX ping-pong buffer for every emaclite IP separately.
The next patch move initialization directly to board code.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2011-10-15 22:06:38 +02:00
Wolfgang Denk
7bf5228ce1 Merge branch 'master' of git://git.denx.de/u-boot-fdt
* 'master' of git://git.denx.de/u-boot-fdt:
  powerpc/85xx: use fdt_create_phandle() to create the Fman firmware phandles
  fdt: update fdt_alloc_phandle to use fdt_get_phandle
  fdt: check for fdt errors in fdt_create_phandle
  fdt: Add a do_fixup_by_path_string() function
2011-10-15 22:00:01 +02:00
Timur Tabi
a2c1229c39 powerpc/85xx: use fdt_create_phandle() to create the Fman firmware phandles
Function fdt_create_phandle() conveniently creates new phandle properties
using both "linux,phandle" and "phandle", so it should be used by all code
that wants to create a phandle.

The Fman firmware code, which embeds an Fman firmware into the device tree,
was creating the phandle properties manually.  Instead, change it to use
fdt_create_phandle().

Signed-off-by: Timur Tabi <timur@freescale.com>
2011-10-15 09:35:15 -04:00
Timur Tabi
50bf17bd15 fdt: update fdt_alloc_phandle to use fdt_get_phandle
The device tree compiler, dtc, can use "phandle" and/or "linux,phandle"
properties to specify the phandle for any node.  By default, it uses
both, but "linux,phandle" is deprecated.  One day, we'd like to stop using
"linux,phandle", but U-boot needs to support both properties equally
first.

fdt_alloc_phandle() generates a unique phandle, but it was only checking
the "linux,phandle" properties.  Instead, we use fdt_get_phandle(),
which checks both properties automatically.  This ensures that we
support dtbs that only use "phandle".

The side-effect is that fdt_alloc_phandle() now takes twice as long, since
it has to check for two properties instead of one in each node that it
searches.

Signed-off-by: Timur Tabi <timur@freescale.com>
2011-10-15 09:35:09 -04:00
Timur Tabi
3c927cccdc fdt: check for fdt errors in fdt_create_phandle
fdt_create_phandle() was ignoring errors from fdt_set_phandle().  If an
error occurs, print an error message and return 0, which is an invalid
phandle.  We also need to change the return type for fdt_create_phandle()
to indicate that it cannot return an error code.

Signed-off-by: Timur Tabi <timur@freescale.com>
2011-10-15 09:35:00 -04:00
Chunhe Lan
8ddb10eae0 fdt: Add a do_fixup_by_path_string() function
The do_fixup_by_path_string() will set the specified node's property to the
value contained in "status". It would just be an inline wrapper for
do_fixup_by_path() that calls strlen on the argument.

Signed-off-by: Chunhe Lan <Chunhe.Lan@freescale.com>
2011-10-15 09:34:49 -04:00
Kumar Gala
e140aad18a powerpc/85xx: Drop CONFIG_VIDEO on P1_P2_RDB-PC boards to reduce size
With older compilers (gcc-4.2.x) we run into issues that resulting image
is too large.  We can save a bunch of space by removing the video support.
In general video support on these boards is a nice to have since it
requires a PCIe add-on card.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-10-13 23:57:48 -05:00