05 Dec, 2013

1 commit

  • The local pointer of address (i.e., addr) only gets
    referenced under SPI mode, and it won't be appropriate
    to pass only 1-byte addr[1] to i2c_read/i2c_write while
    CONFIG_SYS_I2C_EEPROM_ADDR_LEN > 1.

    1. In U-boot's I2C model, the address would be re-assembled
    to a byte string in MSB order inside I2C controller drivers.

    2. The 'CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW' option which could
    be found at soft_i2c.c is always turned on in cmd_eeprom.c,
    the addr[0] always contains the device address with overflowed
    MSB address bits.

    Signed-off-by: Kuo-Jung Su
    Cc: Alexey Brodkin
    Cc: Jean-Christophe PLAGNIOL-VILLARD
    cc: Peter Tyser
    Cc: Heiko Schocher
    Cc: Wolfgang Denk
    Cc: Stefan Roese
    Cc: Mischa Jonker

    Kuo-Jung Su
     

13 Nov, 2013

1 commit


24 Jul, 2013

2 commits


23 Jul, 2013

1 commit


07 Mar, 2012

1 commit


15 Feb, 2012

1 commit


28 Jul, 2011

1 commit


25 Jul, 2010

1 commit

  • 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

    Wolfgang Denk
     

05 Jul, 2010

1 commit

  • 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
    Acked-by: Mike Frysinger

    Wolfgang Denk
     

18 Jan, 2010

1 commit

  • - CONFIG_ENV_EEPROM_IS_ON_I2C
    define this, if you have I2C and SPI activated, and your
    EEPROM, which holds the environment, is on the I2C bus.

    - CONFIG_I2C_ENV_EEPROM_BUS
    if you have an Environment on an EEPROM reached over
    I2C muxes, you can now define, how to reach this
    EEPROM.

    Signed-off-by: Heiko Schocher

    Heiko Schocher
     

13 Jun, 2009

2 commits

  • 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

    Wolfgang Denk
     
  • Many boards/controllers/drivers don't support an I2C slave interface,
    however CONFIG_SYS_I2C_SLAVE is used in common code so provide a
    default

    Signed-off-by: Peter Tyser

    Peter Tyser
     

28 Jan, 2009

2 commits


19 Oct, 2008

1 commit


11 Sep, 2008

2 commits


11 Jul, 2007

1 commit


09 Jul, 2007

1 commit


04 Jul, 2007

1 commit


22 Sep, 2005

1 commit


19 Aug, 2005

1 commit


13 Aug, 2005

1 commit


24 Mar, 2004

1 commit

  • - show PCI clock frequency on MPC8260 systems
    - add FCC_PSMR_RMII flag for HiP7 processors
    - in do_jffs2_fsload(), take load address from load_addr if not set
    explicit, update load_addr otherwise
    - replaced printf by putc/puts when no formatting is needed
    (smaller code size, faster execution)

    wdenk
     

02 Jul, 2003

1 commit


28 Jun, 2003

1 commit

  • - 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)

    wdenk
     

20 Jun, 2003

1 commit

  • - Hymod board database mods: add "who" field and new xilinx chip types
    - provide new "init_cmd_timeout()" function so code external to
    "common/main.c" can use the "reset_cmd_timeout()" function before
    entering the main loop
    - add DTT support for adm1021 (new file dtt/adm1021.c; config
    slightly different. see include/configs/hymod.h for an example
    (requires CONFIG_DTT_ADM1021, CONFIG_DTT_SENSORS, and
    CFG_DTT_ADM1021 defined)
    - add new "eeprom_probe()" function which has similar args and
    behaves in a similar way to "eeprom_read()" etc.
    - add 8260 FCC ethernet loopback code (new "eth_loopback_test()"
    function which is enabled by defining CONFIG_ETHER_LOOPBACK_TEST)
    - gdbtools copyright update
    - ensure that set_msr() executes the "sync" and "isync" instructions
    after the "mtmsr" instruction in cpu/mpc8260/interrupts.c
    - 8260 I/O ports fix: Open Drain should be set last when configuring
    - add SIU IRQ defines for 8260
    - allow LDSCRIPT override and OBJCFLAGS initialization: change to
    config.mk to allow board configurations to override the GNU
    linker script, selected via the LDSCRIPT, make variable, and to
    give an initial value to the OBJCFLAGS make variable
    - 8260 i2c enhancement:
    o correctly extends the timeout depending on the size of all
    queued messages for both transmit and receive
    o will not continue with receive if transmit times out
    o ensures that the error callback is done for all queued tx
    and rx messages
    o correctly detects both tx and rx timeouts, only delivers one to
    the callback, and does not overwrite an earlier error
    o logic in i2c_probe now correct
    - add "vprintf()" function so that "panic()" function can be
    technically correct
    - many Hymod board changes

    wdenk
     

18 Jan, 2003

1 commit

  • * Add support for LXT971 PHY on PM826

    * Patch by Tord Andersson, 16 Jan 2003:
    Fix flash sector count for TQM8xxL

    * Fix I2C EEPROM problem on ICU862 board (would only write the first
    16 bytes out of each 32 byte block)

    wdenk
     

27 Aug, 2002

1 commit