Commit Graph

1610 Commits

Author SHA1 Message Date
Marcin Mielczarczyk cef09789e6 sciphone_g2: Vibrator functionality
This patch adds vibrator functionality.
It implements vibrator driver and introduces new U-Boot command: vibrate

Signed-off-by: Marcin Mielczarczyk <marcin.mielczarczyk@tieto.com>
2011-02-17 07:08:18 +01:00
Marcin Mielczarczyk 9fa90e119d lcd: Support for LCD frame buffer.
Driver for LCD controller/frame buffer has been provided.
Now, it's possible to redirect console output to LCD screen and display
logo/splash screen on LCD. The driver has been tested with ILI9325 and ILI9331 chip drivers.

Signed-off-by: Krzysztof Antonowicz <krzysztof.antonowicz@tieto.com>
2011-02-17 07:08:18 +01:00
Wolfgang Denk 67fb0622a9 unzip: return uncompressed size in `filesize', and print it.
The unzip command did not provide a way for the caller to get any
information about the uncompressed size.  To make it better usable in
scripts, we now store the uncompressed size in the `filesize'
variable, like we do when for example loading a file over the network
or when reading it from a file system.  Following that analogy, it is
only consequent to also print the size.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-02-15 21:46:39 +01:00
Wolfgang Denk cc22b795fb itest: fix result of string compares
The implementation of the string compare function of the "itest"
command was weird, as only the length of the shortest argument was
included in the compare, with the result that something like
"itest.s abd == abddef" would return TRUE.  Fix this.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Detlev Zundel <dzu@denx.de>
2011-02-15 21:45:55 +01:00
Wolfgang Denk c65715de78 Merge branch 'master' of git://git.denx.de/u-boot-mips 2011-02-12 20:37:47 +01:00
Wolfgang Denk 17f79e45e1 cmd_bmp.c: message about compressed formats is debug info only.
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>
2011-02-09 21:32:20 +01:00
Scott Wood eef1d7199d NAND: env: remember the flags used in the previous environment
Previously, uninitialized stack space was being referenced.

Signed-off-by: Scott Wood <scottwood@freescale.com>
2011-02-08 15:25:02 -06:00
Alexander Holler ce297a8f7e USB: Change the necessary defines to get debug output
While debugging some USB stuff, I've first missed that there are actually
two defines necessary to get usefull output. The one needed to get debug output
for the communication with HUBs was burried somewhere deep inside the code.

Change that so that a #define DEBUG is enough while still leaving the possibility
to reduce unwanted debug output.

Signed-off-by: Alexander Holler <holler@ahsoftware.de>
2011-02-05 13:54:51 +01:00
Alexander Holler cb44091fdf USB: Fix device stati for removable and powerctrl (typo)
I currently don't know if the error could have other consequences
than a wrong output when turning debug on.

Signed-off-by: Alexander Holler <holler@ahsoftware.de>
2011-02-05 13:54:51 +01:00
Shinya Kuribayashi c6dc8a734d cmd_ide: Fix an unused CONFIG_AU1X00 symbol to work as intended
commit 8bde63eb3f ([MIPS] Rename Alchemy
processor configs into CONFIG_SOC_*) forgot to pick up this one.

Signed-off-by: Shinya Kuribayashi <skuribay@pobox.com>
2011-02-05 20:06:03 +09:00
Alexander Holler 920a5dd232 NAND: Fix saving of redundand environment
When redundand environments are used the serial needs
to get increased, otherwise the old one will still be used.

Signed-off-by: Alexander Holler <holler@ahsoftware.de>
2011-02-02 16:14:08 -06:00
Wolfgang Denk d1a24f0618 Minor Coding Style Cleanup.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-02-02 22:36:10 +01:00
Alexander Holler 89ffa8dbb5 Print compiler and linker version with the version command
After years of unsuccessful research I've finally shamelessly stolen other
peoples intellectual properties to present the all-new and world-changing
updated version command:
-
U-Boot>> version

U-Boot 2010.12-00014-g7435056-dirty (Jan 18 2011 - 23:19:38)
MyBoard
gcc (GCC) 0.42 (Distro foobar)
GNU ld (GNU Binutils) 0.314159265
-
May the toolchain bugs rest in peace.

Signed-off-by: Alexander Holler <holler@ahsoftware.de>
2011-02-02 21:56:39 +01:00
Liu Ying 8d46d5b186 lcd: align fb writing address for horizontal display offset
CONFIG_SPLASH_SCREEN_ALIGN makes uboot support display
offset for splashimage. The framebuffer writing address
should be calculated according to different kinds of
framebuffer pixel format, i.e., bits per pixel value.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
2011-01-27 00:20:59 +01:00
Wolfgang Denk 5aebe3b072 Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx 2011-01-25 21:13:04 +01:00
Kumar Gala dd50af2515 powerpc/8xxx: Add hwconfig APIs to address early parsing used by DDR init
There are several users of the hwconfig APIs (8xxx DDR) before we have
the environment properly setup.  This causes issues because of the
numerous ways the environment might be accessed because of the
non-volatile memory it might be stored in.  Additionally the access
might be so early that memory isn't even properly setup for us.

Towards resolving these issues we provide versions of all the hwconfig
APIs that can be passed in a buffer to parse and leave it to the caller
to determine how to allocate and populate the buffer.

We use the _f naming convention for these new APIs even though they are
perfectly useable after relocation and the environment being ready.

We also now warn if the non-f APIs are called before the environment is
ready to allow users to address the issues.

Finally, we convert the 8xxx DDR code to utilize the new APIs to
hopefully address the issue once and for all.  We have the 8xxx DDR code
create a buffer on the stack and populate it via getenv_f().

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Wolfgang Denk <wd@denx.de>
2011-01-19 22:58:23 -06:00
Alexander Holler c6b1ee664a Fix defines needed to enable command sha1sum
Documented is CONFIG_CMD_SHA1, through confusion in the source
CONFIG_CMD_SHA1 and CONFIG_CMD_SHA1SUM has to be used to enable
sha1sum.

Fix both, the documentation and the source, so that only
CONFIG_CMD_SHA1SUM is needed to enable the command sha1sum.

Signed-off-by: Alexander Holler <holler@ahsoftware.de>
2011-01-19 09:39:10 +01:00
Peter Tyser 141053d60a cmd_jffs2: Fix get_part_sector_size_nor() overflow bug
When a flash partition was positioned at the very top of a 32-bit memory
map (eg located at 0xf8000000 with a size of 0x8000000)
get_part_sector_size_nor() would incorrectly calculate the partition's
ending address to 0x0 due to overflow.  When the overflow occurred
get_part_sector_size_nor() would falsely return a sector size of 0.
A sector size of 0 results in subsequent jffs2 operations failing.

To workaround the overflow subtract 1 from calculated address of
the partition endpoint.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2011-01-19 00:04:43 +01:00
Lei Wen 47fc18f1e7 NAND: add the ability to directly write yaffs image
This patch add addition suffix to nand write to give the uboot
the power to directly burn the yaffs image to nand.

Signed-off-by: Lei Wen <leiwen@marvell.com>
2011-01-12 17:13:10 -06:00
Wolfgang Denk 3e5ab1af24 Revert "boot cmds: convert to getenv_yesno() with autostart"
This reverts commit 5a442c0add.

This commit changed the behaviour of getenv_yesno() (both the default
behaviour and the documented behaviour for abbreviated arguments)
which resulted in problems in several areas.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-01-11 20:56:34 +01:00
Mike Frysinger 8ef583a035 miiphy: convert to linux/mii.h
The include/miiphy.h header duplicates a lot of things from linux/mii.h.
So punt all the things that overlap to keep the API simple and to make
merging between U-Boot and Linux simpler.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-09 18:06:50 +01:00
Mike Frysinger 82359aec45 cmd editing: mark erase/tab seqs constant
These strings are only read, so no need to have them be writable.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-09 18:03:58 +01:00
Mike Frysinger d6efe244e4 cmd_mem: localize state variables
These "last" variables aren't used outside of this file, so add static.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-09 18:03:10 +01:00
Mike Frysinger 558605cf4f load_addr: move to common env code
Rather than keep the load_addr definition with the bootm code (which
just happens to use this), move it to the common env code.  This way
we can disable bootm support completely while retaining load_addr
usage with many other commands.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-09 18:02:06 +01:00
Mike Frysinger 52f0aa835f config_cmd_defaults.h: new header for common u-boot command defaults
We have config_defaults.h which are random configuration settings that
everyone gets by default.  We also have config_cmd_default.h which is a
recommended list of defaults but boards have to opt into.  Now we have
config_cmd_defaults.h which is a list of defaults that everyone gets
and has to actively opt out of.

For now, we populate it with the bootm command which previously was
unable to be disabled.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-09 18:01:03 +01:00
Mike Frysinger 560d424b6d env: re-add support for auto-completion
Currently, only basic completion is supported (no globs), but this is
what we had previously.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-09 17:57:37 +01:00
Wolfgang Denk 4b58266e95 cmd_net.c: fix build breakage
Commit 722b061 "autocomplete: remove runtime handler install" caused
some boards (like NETTA2_V2) to break with errors like these:

cmd_net.c:296: error: expected expression before ',' token

Fix this.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Mike Frysinger <vapier@gentoo.org>
2010-12-23 17:02:18 +01:00
Lei Wen 41c8624056 onenand: add yaffs write command
Yaffs image require to use the oob to store some info, so when we
burn the yaffs image, we need to also write the image's oob part
into flash.

This patch add addition suffix to onenand write to give the uboot
the power to directly burn the yaffs image to onenand.

Signed-off-by: Lei Wen <leiwen@marvell.com>
2010-12-17 14:32:12 -06:00
Mike Frysinger 2eb1573f01 hashtable: drop all non-reentrant versions
The non-reentrant versions of the hashtable functions operate on a single
shared hashtable.  So if two different people try using these funcs for
two different purposes, they'll cause problems for the other.

Avoid this by converting all existing hashtable consumers over to the
reentrant versions and then punting the non-reentrant ones.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-12-17 21:07:14 +01:00
Wolfgang Denk 006915fbb0 Merge branch 'master' of ../master into next 2010-12-16 23:00:53 +01:00
Kumar Gala bb141079d3 hwconfig: Fix handling of env_hwconfig, board_hwconfig, and cpu_hwconfig
The handling of env_hwconfig, board_hwconfig, and cpu_hwconfig got
broken when we removed the boards defining dummy board_hwconfig
& cpu_hwconfig values.

We fix this by handling the various strings in priority order.  If
hwconfig_parse returns NULL for a given string we check the next one
in order (env_hwconfig, board_hwconfig, followed by cpu_hwconfig).

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-12-09 11:01:13 +01:00
Lei Wen a430b137eb onenand: fix oob print out issue
Seems original implementation forget to set the pointer to point
to the oobbuf, so when we want to see oob buf, we see nothing...
Fix it by get pointer as the oobbuf set.

Signed-off-by: Lei Wen <leiwen@marvell.com>
2010-12-07 16:04:20 -06:00
Steve Sakoman 068a208b4a env_nand: Use nand_read_skip_bad instead of nand_read
The nand-read function returns an error code if correctable errors have occurred.
This is not desirable, since the errors have been corrected!

This patch switches to the nand_read_skip_bad function which does not
return an error code if the errors are correctable.

Signed-off-by: Steve Sakoman <steve.sakoman@linaro.org>
Acked-by: Scott Wood <scottwood@freescale.com>
2010-12-06 18:28:33 -06:00
Stefan Roese 2f15cfd187 UBI/UBIFS: Automatically unmount UBIFS volume upon UBI partition change
Automatically unmount UBIFS partition when user changes the UBI device.
Otherwise the following UBIFS commands will crash.

Signed-off-by: Stefan Roese <sr@denx.de>
2010-12-03 18:24:04 +01:00
Stefan Roese 9a2ea578bc UBIFS: Change "ubifs mount" to "ubifsmount" in ubifsls output
Signed-off-by: Stefan Roese <sr@denx.de>
2010-12-03 16:33:20 +01:00
Stefan Roese cb9c09d487 UBIFS: Add ubifsumount command to unmount an active volume
This new ubifsumount command allows the user to unmount a previously
mounted UBIFS volume.

Signed-off-by: Stefan Roese <sr@denx.de>
2010-12-03 16:32:09 +01:00
Kumar Gala b194577b29 hwconfig: Fix dummy initialization of {board, cpu}_hwconfig
Since board_hwconfig & cpu_hwconfig are defined as weak and dont have a
default value they will get put into the BSS if they aren't defined
elsewhere.  This is problematic as we try to utilize hwconfig before
we've relocated and thus BSS isn't setup.

Instead of giving dummy values in the board files that utilize this
feature, we can just initialize the variables to an empty string and
thus move them out of the BSS if they aren't defined elsewhere.

Also made board_hwconfig & cpu_hwconfig arrays to reduce size associated
with string pointers vs arrays.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-11-30 22:11:19 +01:00
Mike Frysinger d7be3056de stdio: constify "name" arg in public api
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-11-28 21:58:48 +01:00
Mike Frysinger 5a442c0add boot cmds: convert to getenv_yesno() with autostart
Use the new helper func to clean up duplicate logic handling of the
autostart env var.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-11-28 21:58:30 +01:00
Mike Frysinger 7edb186fcf image: constify lookup tables
These are pure lookup tables -- no need to be writable.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-11-28 21:58:27 +01:00
Mike Frysinger fc9903f38d cmd_itest: constify & localize op table
No one else needs this table.  While we're here, use the standard
ARRAY_SIZE helper macro.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-11-28 21:58:26 +01:00
Mike Frysinger bdbc1303cb cmd_date: constify
Many strings in this file need not be writable.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-11-28 21:58:24 +01:00
Mike Frysinger 722b061b6f autocomplete: remove runtime handler install
Rather than add runtime overhead of installing completion handlers, do it
statically at build time.  This requires a new build time helper macro to
declare a command and the completion handler at the same time.  Then we
convert the env related funcs over to this.

This gives an opportunity to also unify the U_BOOT_CMD macros.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-11-28 21:49:27 +01:00
Mike Frysinger 882b7d726f do_reset: unify duplicate prototypes
The duplication of the do_reset prototype has gotten out of hand,
and they're not all in sync.  Unify them all in command.h.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-11-28 21:47:24 +01:00
Mike Frysinger 7842fb7c4f do_bootd: unify duplicate prototypes
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-11-28 21:46:47 +01:00
Mike Frysinger 36ebb78779 do_bootm: unify duplicate prototypes
The duplication of the do_bootm prototype has gotten out of hand,
and they're pretty much all outdated (wrt constness).  Unify them
all in command.h.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-11-28 21:45:32 +01:00
Mike Frysinger 3a5ee0b1d6 cmd_mii: localize & constify local funcs/data
No need for these structures to be writable or global.

While we're here, also drop local versions of the ARRAY_SIZE macro.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-11-28 21:40:35 +01:00
Dirk Behme 71ae5f7a3f Fix compiler warning in fdt_support.c
Fix compiler warning

fdt_support.c: In function 'of_bus_default_count_cells':
fdt_support.c:957: warning: passing argument 1 of '__swab32p' discards qualifiers from pointer target type
fdt_support.c:965: warning: passing argument 1 of '__swab32p' discards qualifiers from pointer target type

be32_to_cpup() expects an 'u32 *' while prop is 'const u32 *'.

Signed-off-by: Dirk Behme <dirk.behme@googlemail.com>
2010-11-28 12:41:53 +01:00
Thomas Weber 0d302af0bb common/cmd_nvedit: Use return value of cmd_usage
Use the return value of cmd_usage instead of ignoring this
and returning a 1.

Signed-off-by: Thomas Weber <weber@corscience.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2010-11-27 23:35:13 +01:00
Thomas Weber 7013c06124 Common/command: Guard strchr/strlen from NULL pointer
Guard strchr/strlen from being called with NULL pointer.
This line is crashing when command "env" is called without subcommand.

The cmd is NULL in this case because the calling function "do_env"
decremented the argc without checking if there are still arguments available.

Signed-off-by: Thomas Weber <weber@corscience.de>
2010-11-27 23:35:13 +01:00