summaryrefslogtreecommitdiff
path: root/board/esd/common/lcd.c
Commit message (Collapse)AuthorAgeLines
* cmd_usage(): simplify return code handlingWolfgang Denk2010-07-24-4/+2
| | | | | | | | | | | | | | | | Lots of code use this construct: cmd_usage(cmdtp); return 1; Change cmd_usage() let it return 1 - then we can replace all these ocurrances by return cmd_usage(cmdtp); This fixes a few places with incorrect return code handling, too. Signed-off-by: Wolfgang Denk <wd@denx.de>
* Make sure that argv[] argument pointers are not modified.Wolfgang Denk2010-07-04-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hush shell dynamically allocates (and re-allocates) memory for the argument strings in the "char *argv[]" argument vector passed to commands. Any code that modifies these pointers will cause serious corruption of the malloc data structures and crash U-Boot, so make sure the compiler can check that no such modifications are being done by changing the code into "char * const argv[]". This modification is the result of debugging a strange crash caused after adding a new command, which used the following argument processing code which has been working perfectly fine in all Unix systems since version 6 - but not so in U-Boot: int main (int argc, char **argv) { while (--argc > 0 && **++argv == '-') { /* ====> */ while (*++*argv) { switch (**argv) { case 'd': debug++; break; ... default: usage (); } } } ... } The line marked "====>" will corrupt the malloc data structures and usually cause U-Boot to crash when the next command gets executed by the shell. With the modification, the compiler will prevent this with an error: increment of read-only location '*argv' N.B.: The code above can be trivially rewritten like this: while (--argc > 0 && **++argv == '-') { char *arg = *argv; while (*++arg) { switch (*arg) { ... Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org>
* General help message cleanupWolfgang Denk2009-06-12-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many of the help messages were not really helpful; for example, many commands that take no arguments would not print a correct synopsis line, but "No additional help available." which is not exactly wrong, but not helpful either. Commit ``Make "usage" messages more helpful.'' changed this partially. But it also became clear that lots of "Usage" and "Help" messages (fields "usage" and "help" in struct cmd_tbl_s respective) were actually redundant. This patch cleans this up - for example: Before: => help dtt dtt - Digital Thermometer and Thermostat Usage: dtt - Read temperature from digital thermometer and thermostat. After: => help dtt dtt - Read temperature from Digital Thermometer and Thermostat Usage: dtt Signed-off-by: Wolfgang Denk <wd@denx.de>
* Command usage cleanupPeter Tyser2009-01-28-1/+1
| | | | | | | | Remove command name from all command "usage" fields and update common/command.c to display "name - usage" instead of just "usage". Also remove newlines from command usage fields. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* Standardize command usage messages with cmd_usage()Peter Tyser2009-01-28-1/+1
| | | | Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* rename CFG_ macros to CONFIG_SYSJean-Christophe PLAGNIOL-VILLARD2008-10-18-17/+17
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* ppc4xx: Update esd's common LCD code for 405 boardsMatthias Fuchs2008-04-22-38/+85
| | | | | | | | - Coding style cleanup (long lines) - Add s1d13505 support - Make some functions return a result code instead of void Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
* ppc4xx: More cleanup for esd's LCD codeMatthias Fuchs2008-01-04-20/+18
| | | | Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
* ppc4xx: Coding style cleanupStefan Roese2007-12-28-17/+11
| | | | Signed-off-by: Stefan Roese <sr@denx.de>
* ppc4xx: use correct io accessors for esd's LCD codeMatthias Fuchs2007-12-28-7/+8
| | | | | | | This patch fixes esd's LCD dectection code to work correctly with newer gcc versions. Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
* Various changes to esd HH405 board specific filesStefan Roese2006-02-07-0/+3
| | | | Patch by Matthias Fuchs, 07 Feb 2006
* Fix gzip bmp support (test if malloc fails, warning when truncated).Stefan Roese2005-10-08-8/+15
| | | | | Increase CFG_VIDEO_LOGO_MAX_SIZE on HH405 board. Patch by Stefan Roese, 08 Oct 2005
* Fix VOH405 SupportWolfgang Denk2005-09-25-2/+3
| | | | Patch by Matthias Fuchs, 25 Sep 2005
* Add SM501 support to HH405 board.Stefan Roese2005-09-22-81/+177
| | | | | | Add support for gzip compressed bmp's (CONFIG_VIDEO_BMP_GZIP). Add support for eeprom write-enable (CFG_EEPROM_WREN). Patch by Stefan Roese, 22 Sep 2005
* Code cleanup.wdenk2004-12-16-1/+1
|
* esd common updatestroese2004-12-16-0/+230