06 Oct, 2014

1 commit

  • Like many platforms, the Altera socfpga platform requires that the
    preloader be "signed" in a certain way or the built-in boot ROM will
    not boot the code.

    This change automatically creates an appropriately signed preloader
    from an SPL image.

    The signed image includes a CRC which must, of course, be generated
    with a CRC generator that the SoCFPGA boot ROM agrees with otherwise
    the boot ROM will reject the image.

    Unfortunately the CRC used in this boot ROM is not the same as the
    Adler CRC in lib/crc32.c. Indeed the Adler code is not technically a
    CRC but is more correctly described as a checksum.

    Thus, the appropriate CRC generator is added to lib/ as crc32_alt.c.

    Signed-off-by: Charles Manning
    Signed-off-by: Marek Vasut
    Cc: Chin Liang See
    Cc: Dinh Nguyen
    Cc: Albert Aribaud
    Cc: Tom Rini
    Cc: Wolfgang Denk
    Cc: Pavel Machek
    Acked-by: Pavel Machek

    V2: - Zap unused constant
    - Explicitly print an error message in case of error
    - Rework the hdr_checksum() function to take the *header directly
    instead of a plan buffer pointer

    Charles Manning
     

27 Sep, 2014

2 commits


26 Sep, 2014

1 commit


25 Sep, 2014

14 commits


24 Sep, 2014

1 commit

  • Currently, CONFIG_SPL_SPI_* #defines are used for controlling SPI boot in
    SPL. These #defines do not allow the user to select SPI mode for the SPI flash
    (there's no CONFIG_SPL_SPI_MODE, so the SPI mode is hardcoded in
    spi_spl_load.c), and duplicate information already provided by
    CONFIG_SF_DEFAULT_* #defines.

    Kill CONFIG_SPL_SPI_*, and use CONFIG_SF_DEFAULT_* instead.

    Cc: Tom Rini
    Cc: Marek Vasut
    Cc: Sudhakar Rajashekhara
    Cc: Lokesh Vutla
    Cc: Vitaly Andrianov
    Cc: Lars Poeschel
    Cc: Bo Shen
    Cc: Hannes Petermaier
    Cc: Michal Simek
    Acked-by: Marek Vasut
    Signed-off-by: Nikita Kiryanov
    Reviewed-by: Jagannadha Sutradharudu Teki

    Nikita Kiryanov
     

17 Sep, 2014

8 commits


16 Sep, 2014

1 commit


14 Sep, 2014

1 commit


11 Sep, 2014

3 commits

  • For some boards board_init() will change GPIOs, so we need to have driver
    model available before then. Adjust the board init to arrange this, but
    enable it for driver model only, just to be safe.

    This does create additional #ifdef logic, but it is safer than trying to
    make a pervasive change which may cause some boards to break.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Since driver model registers itself with the stdio subsystem, and we
    want to avoid delayed registration and other complexity associated with
    the current serial console, move the stdio subsystem init earlier when
    driver model is used for serial.

    This simplifies the implementation. Should there be any problems with
    this approach they can be dealt with as boards are converted over to
    use driver model for serial.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • In order to support GPIO access in board_early_init_f() we must set up
    driver model before this function is called. In any case, earlier is
    better since driver model is (or will become) a key function for most
    init.

    Signed-off-by: Simon Glass

    Simon Glass
     

09 Sep, 2014

1 commit


03 Sep, 2014

1 commit


02 Sep, 2014

1 commit

  • This commit provides distinction between DFU device detach and reset.
    The -R behavior is preserved with proper handling of the dfu-util's -e
    switch, which detach the DFU device.

    By running dfu-util -e; one can force device to finish the execution of
    dfu command on target and execute some other scripted commands.

    Moreover, some naming has been changed - the dfu_reset() method now is known
    as dfu_detach(). New name better reflects the purpose of the code.

    It was also necessary to increase the number of usb_gadget_handle_interrupts()
    calls since we also must wait for detection of the USB reset event.

    Example usage:
    1. -e (detach) switch
    dfu-util -a0 -D file1.bin;dfu-util -a3 -D uImage;dfu-util -e

    access to u-boot prompt.

    2. -R (reset) switch
    dfu-util -a0 -D file1.bin;dfu-util -R -a3 -D uImage

    target board reset

    Signed-off-by: Lukasz Majewski
    Reviewed-by: Stephen Warren
    Tested-by: Stephen Warren

    Lukasz Majewski
     

01 Sep, 2014

2 commits

  • The gpio command mostly relies on gpio_request() and gpio_free() being
    nops, in that you can request a GPIO twice. With driver model this is
    now implemented correctly, so it fails.

    Change the command to deal with a failure to claim the GPIO.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • The GPIO list is very long in many cases and most of them are not used.
    By default, show only the GPIOs that are in use, and provide a flag to show
    all of them. This makes the 'gpio status' command much more pleasant.

    In order to do this, driver model now exposes a method for obtaining the
    'function' of a GPIO, which describes whether it is an input or output, for
    example. Implementation of this method is optional.

    Signed-off-by: Simon Glass

    Simon Glass
     

30 Aug, 2014

2 commits


29 Aug, 2014

1 commit