Commit Graph

1277 Commits

Author SHA1 Message Date
Stefan Roese d1c3b27525 ppc4xx: Big cleanup of PPC4xx defines
This patch cleans up multiple issues of the 4xx register (mostly
DCR, SDR, CPR, etc) definitions:

- Change lower case defines to upper case (plb4_acr -> PLB4_ACR)
- Change the defines to better match the names from the
  user's manuals (e.g. cprpllc -> CPR0_PLLC)
- Removal of some unused defines

Please test this patch intensive on your PPC4xx platform. Even though
I tried not to break anything and tested successfully on multiple
4xx AMCC platforms, testing on custom platforms is recommended.

Signed-off-by: Stefan Roese <sr@denx.de>
2009-09-11 10:35:58 +02:00
Prafulla Wadaskar aa0c7a86cd mkimage: Add Kirkwood Boot Image support (kwbimage)
This patch adds support for "kwbimage" (Kirkwood Boot Image)
image types to the mkimage code.

For details refer to docs/README.kwbimage

This patch is tested with Sheevaplug board

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
Acked-by: Ron Lee <ron@debian.org>

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
2009-09-10 22:58:48 +02:00
Prafulla Wadaskar b029dddc9a mkimage: Make table_entry code global
- make get_table_entry_id() global
- make get_table_entry_name() global
- move struct table_entry to image.h

Currently this code is used by image.c only.

This patch makes this API global so it can be used by other parts of
code, too.

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
Acked-by: Ron Lee <ron.debian.org>

Edit comments and commit message.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-09-10 22:58:48 +02:00
Prafulla Wadaskar f666dea8ab mkimage: Make genimg_print_size() global
Currently it is used by image.c only, but the the function can be
used to support additional mkimage types like for example kwbimage,
so make this function globally visible.

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>

Edited commit message.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-09-10 22:58:48 +02:00
Wolfgang Denk 3a2003f61e tools/mkimage: fix compiler warnings, use "const"
This fixes some compiler warnings:
tools/default_image.c:141: warning: initialization from incompatible pointer type
tools/fit_image.c:202: warning: initialization from incompatible pointer type
and changes to code to use "const" attributes in a few places where
it's appropriate.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-09-10 22:58:48 +02:00
Wolfgang Denk 37daa77f3c cmd_mtdparts.c: fix compiler warning in debug code
Fix warning messages:
cmd_mtdparts.c:1429: warning: format '%08lx' expects type 'long
unsigned int', but argument 6 has type 'u32'
cmd_mtdparts.c:1429: warning: format '%08lx' expects type 'long
unsigned int', but argument 7 has type 'u32'

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-09-04 22:58:57 +02:00
Kumar Gala 3dfad40a04 Add ability for arch code to make changes before we boot
Added a arch_preboot_os() function that cpu specific code can implement to
allow for various modifications to the state of the machine right before
we boot.  This can be useful to setup register state to a specific
configuration.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-09-04 22:11:23 +02:00
Peter Tyser d4e8ada0f6 Consolidate arch-specific mem_malloc_init() implementations
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-09-04 21:47:07 +02:00
Peter Tyser 5e93bd1c9a Consolidate arch-specific sbrk() implementations
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-09-04 21:45:39 +02:00
Wolfgang Denk 3aa8b68d80 Merge branch 'next' of ../next 2009-08-31 22:21:47 +02:00
David Brownell 52f6c34c85 bugfix CONFIG_SYS_CONSOLE_INFO_QUIET
The "console: unify printing current devices" patch goofed:
CONFIG_SYS_CONSOLE_INFO_QUIET is supposed to *REMOVE* boot
time noise, not add it.  Said patch changed the #ifndefs
to #ifdef; this one restores them to the proper sense.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-08-30 21:00:21 +02:00
Poonam Aggrwal 0e870980a6 8xxx: Removed CONFIG_NUM_CPUS from 85xx/86xx
The number of CPUs are getting detected dynamically by checking the
processor SVR value.  Also removed CONFIG_NUM_CPUS references from all
the platforms with 85xx/86xx processors.

This can help to use the same u-boot image across the platforms.

Also revamped and corrected few Freescale Copyright messages.

Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-08-28 17:12:38 -05:00
Robin Getz 02c9aa1d41 Add md5sum and sha1 commands...
Now that we have sha1 and md5 in lib_generic, allow people to use
them on the command line, for checking downloaded files.

Signed-off-by: Robin Getz <rgetz@analog.com>
2009-08-25 12:57:54 +02:00
Kumar Gala cfd700be9f fdt: Fix fdt_pci_dma_ranges handling of 64-bit ranges
If the size of a region equal to 4G it can't be represnted in a 32-bit
BAR so we should have marked that case as MEM64.

Additionally bump the number of inbound windows up to 4 to handle the
fact that Freescale PPCs that have an implicit window for CCSRBAR.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-08-09 23:13:56 +02:00
Peter Tyser 197324d7d9 hush: Fix bogus free() call
An off-by-one error in hush.c resulted in an unintentional free() call
every time a command was executed

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-08-09 23:02:42 +02:00
Mike Frysinger 18304f7675 env: kill off default_environment_size
The only environment type that uses this variable is spi flash, and that is
only because it is reimplementing the common set_default_env() function.
So fix the spi flash code and kill off the default_environment_size in the
process.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-08-09 22:41:42 +02:00
Mike Frysinger bedd8403f7 export SPI functions to standalone apps
While we're here, fix the broken #ifdef handling in _exports.h.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-08-09 22:34:51 +02:00
Wolfgang Denk cb32ed1fc2 Merge branch 'next' of git://git.denx.de/u-boot-coldfire 2009-08-04 21:54:11 +02:00
Wolfgang Denk 4b7511478b Fix ext2load return code
Make the ext2load command return 0 on success (instead of the file
length).

Also fix output format (get rid of random newlines) and some coding
style issues (long lines etc.).

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-07-28 22:38:53 +02:00
Niklaus Giger 3c972849f2 Less verbose output when loading vxworks 6.x images
Loading vxWorks 5.x images resulted just into 3 or 4 lines of output.
With vxWorks 6.x and the new GCC it emits about 30 lines, which is
far too noisy in my opinion.

Signed-off-by: Niklaus Giger <niklaus.giger@member.fsf.org>
2009-07-27 00:15:53 +02:00
Kyungmin Park 4828779238 Fix compiler warnings after loff_t change
Now 'env_addr' type is loff_t so use correct field type.

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2009-07-27 00:08:50 +02:00
Alessandro Rubini 6111722a92 video: move extern declarations from C to headers
This moves some extern declaration from lcd.c to lcd.h, removing
unneeded ifdef around a pair of them.  Additionally, since
gunzip_bmp() was declared static in cmd_bmp.c but extern in lcd.c, I
removed the static.  The extra "#include <lcd.h>" in cmd_bmp.c is
added to ensure the header is consistent with the source.

This has been compile-tested on both ARM (at91 boards) and PowerPC
(HH405_config, TQM823L_LCD_config, mcc200_config), to test all use
combinations.

Signed-off-by: Alessandro Rubini <rubini@gnudd.it>
[agust@denx.de: removed gunzip_bmp() fixes as commit c01171ea did it]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2009-07-25 23:13:51 +02:00
Wolfgang Denk 28958b8bea Coding Style cleanup; update CHANGELOG.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-07-23 22:23:23 +02:00
Mark Jackson c01171eaec Remove static declaration from gunzip_bmp()
This patch removes the static declaration from gunzip_bmp()

Without it, the gunzip_bmp() function is not visible to
common/lcd.c and fails to compile with an error.

Signed-off-by: Mark Jackson <mpfj@mimc.co.uk>
2009-07-23 21:34:01 +02:00
Peter Tyser 2d4a43e230 cmd_tsi148: General cleanup
- Fix command help message
- Disable DEBUG by default
- Fix whitespace issues
- Fix lines > 80 characters

Signed-off-by: Peter Tyser <ptyser@gmail.com>
Acked-by: Stefan Roese <sr@denx.de>
2009-07-23 21:33:02 +02:00
Detlev Zundel f97ec30bb3 Re-add support for image type 'Standalone Program'
Support for this type was lost during the bootm refactoring.

Signed-off-by: Detlev Zundel <dzu@denx.de>
2009-07-23 21:02:09 +02:00
Detlev Zundel ca95c9df02 Add error checking for unsupported OS types.
Signed-off-by: Detlev Zundel <dzu@denx.de>
2009-07-23 21:02:07 +02:00
Robin Getz 1a32bf4188 Add DNS support
On 04 Oct 2008 Pieter posted a dns implementation for U-Boot.

http://www.mail-archive.com/u-boot-users@lists.sourceforge.net/msg10216.html
>
> DNS can be enabled by setting CFG_CMD_DNS. After performing a query,
> the serverip environment var is updated.
>
> Probably there are some cosmetic issues with the patch. Unfortunatly I
> do not have the time to correct these. So if anybody else likes DNS
> support in U-Boot and has the time, feel free to patch it in the main tree.

Here it is again - slightly modified & smaller:
  - update to 2009-06 (Pieter's patch was for U-Boot 1.2.0)
  - README.dns is added
  - syntax is changed (now takes a third option, the env var to store
    the result in)
  - add a random port() function in net.c
  - sort Makefile in ./net/Makefile
  - dns just returns unless a env var is given
  - run through checkpatch, and clean up style issues
  - remove packet from stack
  - cleaned up some comments
  - failure returns much faster (if server responds, don't wait for
    timeout)
  - use built in functions (memcpy) rather than byte copy.

Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Pieter Voorthuijsen <pieter.voorthuijsen@prodrive.nl>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-07-22 22:53:44 -07:00
Luigi 'Comio' Mantellini caf72ff329 Refresh LZMA-lib to v4.65
Signed-off-by: Luigi 'Comio' Mantellini <luigi.mantellini@idf-hit.com>
2009-07-22 09:43:27 +02:00
Andrzej Wolski f6ca3b7094 ubi: help message correction
Fix incorrect information about size units and correct typo.

Signed-off-by: Andrzej Wolski <awolski@poczta.fm>
Signed-off-by: Stefan Roese <sr@denx.de>
2009-07-20 23:54:57 +02:00
Kim Phillips 2a2ed845c0 common: fix 'dummy' is used uninitialized in this function warning
fix this gcc 4.4 warning:

xyzModem.c: In function 'xyzModem_stream_open':
xyzModem.c:564: warning: 'dummy' is used uninitialized in this function

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2009-07-19 21:37:02 +02:00
Wolfgang Denk 1a4664b53a cmd_flash.c: fix fix compile error for boards with DataFlash
Commit 5669ed45 ("cmd_flash.c: fix warning: unused variable
'addr_first'/'addr_last'") changed the #ifdef logic areound the
declaration of these variables and missed a combination of settings
of HAS_DATAFLASH with SYS_NO_FLASH; this patch fixes this.

Also spotted by Alessandro Rubini <rubini@gnudd.com>

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-07-19 19:36:14 +02:00
Reinhard Arlt 52a0e2dee9 Add support for the Tundra TSI148 VME-bridge
From: Reinhard Arlt <reinhard.arlt@esd-electronics.com>

This patch adds support for the Tundra TSI148 VME-bridge. It's used on
the upcoming esd VME8349 board.

Signed-off-by: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2009-07-19 11:21:08 +02:00
Jean-Christophe PLAGNIOL-VILLARD 7e3be7cf3b console: unify printing current devices
Create stdio_print_current_devices() for this purpose

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-07-19 01:02:46 +02:00
Wolfgang Denk a694610d33 Merge branch 'master' of git://git.denx.de/u-boot-nand-flash 2009-07-19 00:38:23 +02:00
Wolfgang Denk 5669ed4557 cmd_flash.c: fix warning: unused variable 'addr_first'/'addr_last'
Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-07-18 23:18:14 +02:00
Wolfgang Denk 462b103873 Merge branch 'master' of /home/wd/git/u-boot/custodians 2009-07-18 14:59:40 +02:00
Wolfgang Denk 0f1b3a2424 Merge branch 'master' of git://git.denx.de/u-boot-i2c 2009-07-18 14:59:05 +02:00
Alessandro Rubini 6aee304834 cmd_i2c: bugfix: add missing brace
The sub-command parser missed a brace, so "return 0;" is always
taken and no error message is diplayed if you say "i2c scan"
instead of "i2c probe", for example.

Proper brace is added. Also, a misleading and unneeded else
is removed.

Signed-off-by: Alessandro Rubini <rubini@gnudd.com.it>
2009-07-18 10:17:53 +02:00
Jean-Christophe PLAGNIOL-VILLARD 52cb4d4fb3 stdio/device: rework function naming convention
So far the console API uses the following naming convention:

	======Extract======
	typedef struct device_t;

	int	device_register (device_t * dev);
	int	devices_init (void);
	int	device_deregister(char *devname);
	struct list_head* device_get_list(void);
	device_t* device_get_by_name(char* name);
	device_t* device_clone(device_t *dev);
	=======

which is too generic and confusing.

Instead of using device_XX and device_t we change this
into stdio_XX and stdio_dev

This will also allow to add later a generic device mechanism in order
to have support for multiple devices and driver instances.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

Edited commit message.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-07-18 00:27:46 +02:00
Wolfgang Denk dcf728a6af Merge branch 'master' of git://git.denx.de/u-boot-video 2009-07-17 23:05:41 +02:00
Mike Frysinger 569460ebf1 sata: namespace curr_device variable
The curr_device variable really should be namespaced with a "sata_" prefix
since it is only used by the sata code.  It also avoids random conflicts
with other pieces of code (like cmd_mmc):
common/libcommon.a(cmd_sata.o):(.data.curr_device+0x0):
	multiple definition of `curr_device'
common/libcommon.a(cmd_mmc.o):(.data.curr_device+0x0): first defined here

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-17 22:15:27 +02:00
Mike Frysinger 02e22c2de1 cmd_mmc: make curr_device static
The curr_device variable isn't used outside of cmd_mmc, so mark it static
to avoid conflicts with other pieces of code (like sata which also exports
a curr_device).  Otherwise we end up with stuff like:
common/libcommon.a(cmd_sata.o):(.data.curr_device+0x0):
	multiple definition of `curr_device'
common/libcommon.a(cmd_mmc.o):(.data.curr_device+0x0): first defined here

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-17 22:14:41 +02:00
Matthias Weisser 1ca298ced0 Added support for splash screen positioning
This patch adds support splash image positioning by adding an
additional variable "splashpos" to the environment. Please see
README for details.

Signed-off-by: Matthias Weisser <matthias.weisser@graf-syteco.de>
Acked-by: Matthias Fuchs <matthias.fuchs@esd.eu>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2009-07-17 15:23:41 +02:00
Scott Wood be33b046b5 Remove legacy NAND and disk on chip code.
Legacy NAND had been scheduled for removal.  Any boards that use this
were already not building in the previous release due to an #error.

The disk on chip code in common/cmd_doc.c relies on legacy NAND,
and it has also been removed.  There is newer disk on chip code
in drivers/mtd/nand; someone with access to hardware and sufficient
time and motivation can try to get that working, but for now disk
on chip is not supported.

Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-07-16 19:07:47 -05:00
Kyungmin Park 937076f84c MTD: OneNAND: Increase the environment size to 4KiB
Also use mtd operation instead of onenand functions

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-07-16 17:52:00 -05:00
Anton Vorontsov 93f9dcf9e8 Add simple hwconfig infrastructure
This patch implements simple hwconfig infrastructure: an
interface for software knobs to control a hardware.

This is very simple implementation, i.e. it is implemented
via `hwconfig' environment variable. Later we could write
some "hwconfig <enable|disable|list>" commands, ncurses
interface for Award BIOS-like interface, and frame-buffer
interface for AMI GUI[1] BIOS-like interface with mouse
support[2].

Current implementation details/limitations:

1. Doesn't support options dependencies and mutual exclusion.
   We can implement this by integrating apt-get[3] into the
   u-boot. But I didn't bother yet.

2. Since we don't implement hwconfig command, i.e. we're working
   with the environement directly, there is no way to tell that
   toggling a particular option will need a reboot to take
   an effect. So, for now it's advised to always reboot the
   target after modifying hwconfig variable.

3. We support hwconfig options with arguments. For example,

   set hwconfig dr_usb:mode=peripheral,phy_type=ulpi

   That means:
   - dr_usb - enable Dual-Role USB controller;
   - dr_usb:mode=peripheral - USB in Function mode;
   - dr_usb:phy_type=ulpi - USB should work with ULPI PHYs;

The purpose of this simple implementation is to define some
internal API and then we can continue improving user experience
by adding more mature interface, like hwconfig command with
bells and whistles. Or not adding, if we feel that current
interface fits its needs.

[1] http://en.wikipedia.org/wiki/American_Megatrends
[2] Regarding ncurses and GUI with mouse support -- I'm just
    kidding.
[3] The comment regarding apt-get is also a joke, meaning that
    dependency tracking could be non-trivial. For example, for
    enabling HW feature X we may need to disable Y, and turn Z
    into reduced mode (like RMII-only interface for ethernet,
    no MII).

    It's quite trivial to implement simple cases though.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
2009-07-16 22:23:53 +02:00
TsiChung Liew 6e8d58d366 Command for accessing serial flash update
Change strtoul number base of argv 3 from 0 to 16

Signed-off-by: TsiChung Liew <tsicliew@gmail.com>
2009-07-14 09:46:39 -05:00
Simon Kagstrom 2896b5851f Command improvements for ubifs
Check that an argument is passed to ubifsmount and that addresses and
sizes are actually numbers for ubifsload. Also improve the instructions
a bit.

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Signed-off-by: Stefan Roese <sr@denx.de>
2009-07-09 13:04:25 +02:00
Simon Kagstrom 25c8f40059 Handle VID header offset in ubi part command
The VID header offset is sometimes needed to initialize the UBI
partition. This patch adds it (optionally) to the command line
for the ubi part command.

(Lines have been properly wrapped since last version)

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Acked-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
2009-07-09 09:57:54 +02:00