Skip to content
Snippets Groups Projects
  1. Jan 25, 2016
  2. Jul 23, 2014
    • Simon Glass's avatar
      stdio: Pass device pointer to stdio methods · 709ea543
      Simon Glass authored
      
      At present stdio device functions do not get any clue as to which stdio
      device is being acted on. Some implementations go to great lengths to work
      around this, such as defining a whole separate set of functions for each
      possible device.
      
      For driver model we need to associate a stdio_dev with a device. It doesn't
      seem possible to continue with this work-around approach.
      
      Instead, add a stdio_dev pointer to each of the stdio member functions.
      
      Note: The serial drivers have the same problem, but it is not strictly
      necessary to fix that to get driver model running. Also, if we convert
      serial over to driver model the problem will go away.
      
      Code size increases by 244 bytes for Thumb2 and 428 for PowerPC.
      
      22: stdio: Pass device pointer to stdio methods
             arm: (for 2/2 boards)  all +244.0  bss -4.0  text +248.0
         powerpc: (for 1/1 boards)  all +428.0  text +428.0
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      Acked-by: default avatarMarek Vasut <marex@denx.de>
      Reviewed-by: default avatarMarek Vasut <marex@denx.de>
      709ea543
  3. Feb 21, 2014
  4. Jul 24, 2013
  5. Mar 30, 2012
  6. Mar 06, 2012
  7. Oct 27, 2011
  8. Jul 24, 2010
  9. Jul 04, 2010
    • Wolfgang Denk's avatar
      Make sure that argv[] argument pointers are not modified. · 54841ab5
      Wolfgang Denk authored
      
      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: default avatarWolfgang Denk <wd@denx.de>
      Acked-by: default avatarMike Frysinger <vapier@gentoo.org>
      54841ab5
  10. Jul 17, 2009
    • Jean-Christophe PLAGNIOL-VILLARD's avatar
      stdio/device: rework function naming convention · 52cb4d4f
      Jean-Christophe PLAGNIOL-VILLARD authored
      
      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: default avatarJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
      
      Edited commit message.
      
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
      52cb4d4f
  11. Jun 12, 2009
    • Wolfgang Denk's avatar
      General help message cleanup · a89c33db
      Wolfgang Denk authored
      
      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: default avatarWolfgang Denk <wd@denx.de>
      a89c33db
  12. Jan 28, 2009
  13. Oct 18, 2008
  14. Jun 03, 2008
  15. May 20, 2008
  16. May 11, 2008
  17. May 09, 2008
  18. Apr 17, 2008
  19. Mar 18, 2008
    • Yuri Tikhonov's avatar
      The patch introduces the alternative configuration of the log buffer for the... · 3d610186
      Yuri Tikhonov authored
      The patch introduces the alternative configuration of the log buffer for the lwmon5 board: the storage for the log-buffer itself is OCM(on-chip memory), the log-buffer header is moved to six GPT registers (PPC440EPX_GPT0_COMP1, ..., PPC440EPX_GPT0_COMP5).
      
       To enable this, alternative, configuration the U-Boot board configuration
      file for lwmon5 includes the definitions of alternative addresses for header
      (CONFIG_ALT_LH_ADDR) and buffer (CONFIG_ALT_LB_ADDR).
      
       The Linux shall be configured with the CONFIG_ALT_LB_LOCATION option set,
      and has the BOARD_ALT_LH_ADDR and BOARD_ALT_LB_ADDR constants defined in the
      lwmon5 board-specific header (arch/ppc/platforms/4xx/lwmon5.h).
      
      Signed-off-by: default avatarYuri Tikhonov <yur@emcraft.com>
      3d610186
    • Yuri Tikhonov's avatar
      The patch introduces the alternative configuration of the log buffer for · 2d991958
      Yuri Tikhonov authored
      the lwmon5 board: the storage for the log-buffer itself is OCM(on-chip memory),
      the log-buffer header is moved to six GPT registers (PPC440EPX_GPT0_COMP1, ...,
      PPC440EPX_GPT0_COMP5).
      
       To enable this, alternative, configuration the U-Boot board configuration
      file for lwmon5 includes the definitions of alternative addresses for header
      (CONFIG_ALT_LH_ADDR) and buffer (CONFIG_ALT_LB_ADDR).
      
       The Linux shall be configured with the CONFIG_ALT_LB_LOCATION option set,
      and has the BOARD_ALT_LH_ADDR and BOARD_ALT_LB_ADDR constants defined in the
      lwmon5 board-specific header (arch/ppc/platforms/4xx/lwmon5.h).
      
      Signed-off-by: default avatarYuri Tikhonov <yur@emcraft.com>
      2d991958
  20. Nov 21, 2007
  21. Jun 22, 2007
  22. Mar 31, 2006
  23. Oct 13, 2005
  24. Jul 24, 2003
  25. Jul 15, 2003
  26. Jul 01, 2003
  27. Jun 30, 2003
    • Wolfgang Denk's avatar
      * Patch by Seb James, 30 Jun 2003: · b37c7e5e
      Wolfgang Denk authored
        Improve documentation of I2C configuration in README
      
      * Fix problems with previous log buffer "fixes"
      
      * Fix minor help text issues
      
      * "log append" did not append a newline
      b37c7e5e
  28. Jun 28, 2003
    • Wolfgang Denk's avatar
      Merge from "stable branch", tag LABEL_2003_06_28_1800-stable: · d1cbe85b
      Wolfgang Denk authored
      - Allow to call sysmon function interactively
      - PIC on LWMON board needs delay after power-on
      - Add missing RSR definitions for MPC8xx
      - Improve log buffer handling: guarantee clean reset after power-on
      - Add support for EXBITGEN board
      - Add support for SL8245 board
      d1cbe85b
  29. Jun 27, 2003
    • Wolfgang Denk's avatar
      * Code cleanup: · 8bde7f77
      Wolfgang Denk authored
        - remove trailing white space, trailing empty lines, C++ comments, etc.
        - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c)
      
      * Patches by Kenneth Johansson, 25 Jun 2003:
        - major rework of command structure
          (work done mostly by Michal Cendrowski and Joakim Kristiansen)
      8bde7f77
  30. Dec 08, 2002
  31. Nov 05, 2002
Loading