17 Feb, 2015

1 commit


13 Feb, 2015

5 commits

  • Add Kconfig settings for these two options.

    Signed-off-by: Simon Glass
    Reviewed-by: Masahiro Yamada

    Simon Glass
     
  • As with i2c_read() and i2c_write(), add a dm_ prefix to the driver model
    versions of these functions to avoid conflicts.

    Signed-off-by: Simon Glass
    Acked-by: Heiko Schocher

    Simon Glass
     
  • At present on some architectures we set up the following before calling
    board_init_f():

    - global_data
    - stack
    - early malloc memory

    Adding the code to support early malloc and global data setup to every
    arch's assembler start-up is a pain. Also this code is not actually
    architecture-specific. We can use common code for all architectures and
    with a bit of care we can write this code in C.

    Add a new function to deal with this. It should be called after memory
    is available, with a pointer to the top of the area that should be used
    before relocation. The function will set things up and return the lowest
    memory address that it allocated/used. That can then be set as the top
    of the stack.

    Note that on some archs this function will use the stack, so the stack
    pointer should be set to same value as is pased to board_init_f_mem().
    A margin of 128 bytes will be left for this stack, so that it is not
    overwritten. This means that 64 bytes is wasted by this early call.
    This is not strictly necessary on several more modern archs, so we could
    remove this at the cost of some arch-dependent code.

    With this function there is no-longer any need for the assembler code to
    zero global_data or set up the early malloc pointers.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • All callers of malloc should already do error checking, and may even be able
    to continue without the alloc succeeding.

    Moreover, common/malloc_simple.c is the only user of .rodata.str1.1 in
    common/built-in.o when building the SPL, triggering this gcc bug:
    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54303

    Causing .rodata to grow with e.g. 0xc21 bytes, nullifying all benefits of
    using malloc_simple in the first place.

    Signed-off-by: Hans de Goede
    Acked-by: Simon Glass

    Hans de Goede
     
  • Segfaults can occur when a mandatory argument is not provided to
    "demo hello" and "demo status". Eg:

    => demo hello
    Segmentation fault (core dumped)

    Add a check to ensure all required arguments are provided.

    Signed-off-by: Peter Tyser
    Acked-by: Simon Glass

    Peter Tyser
     

10 Feb, 2015

16 commits

  • Tom Rini
     
  • Tom Rini
     
  • Conflicts:
    include/splash.h

    Signed-off-by: Tom Rini

    Tom Rini
     
  • Tom Rini
     
  • lcd_logo() currently performs tasks well beyond just displaying the logo.
    It has code which displays splash image, it has logic which determines
    when the different display features are displayed, and it is coupled with
    the lcd console because it holds the responsibility of returning the
    lcd console base address.

    Make lcd_logo() just about the logo by:
    * Moving splash image display code into a dedicated function
    * Moving the logic regarding when various features are displayed to
    lcd_clear() (which is arguably not the correct name for housing such
    code either, but it is currently the most fitting location code wise)
    * Move the responsibility of setting the console base address to
    lcd_clear() too.

    Signed-off-by: Nikita Kiryanov
    Reviewed-by: Simon Glass
    Tested-by: Bo Shen
    Tested-by: Josh Wu
    Cc: Bo Shen
    Cc: Simon Glass
    Cc: Anatolij Gustschin

    Nikita Kiryanov
     
  • We now have api functions that can support compiling simplefb code as its own
    module. Since this code is not part of the display functionality, extract it
    to its own file.

    Raspberry Pi is updated to accommodate the changes.

    Signed-off-by: Nikita Kiryanov
    Acked-by: Stephen Warren
    Reviewed-by: Simon Glass
    Tested-by: Bo Shen
    Tested-by: Josh Wu
    Cc: Simon Glass
    Cc: Anatolij Gustschin
    Cc: Stephen Warren

    Nikita Kiryanov
     
  • The name "bitmap_plot" is misleading because it implies that this is a generic
    function capable of dealing with any bitmap, but its implementation only works
    with the logo data.

    Rename the function to better reflect this.

    Signed-off-by: Nikita Kiryanov
    Reviewed-by: Simon Glass
    Tested-by: Bo Shen
    Tested-by: Josh Wu
    Cc: Simon Glass
    Cc: Anatolij Gustschin

    Nikita Kiryanov
     
  • This cleanup mostly focuses on removing unnecessary whitespace and comments
    which are superfluous and/or do not conform to the coding style.

    Signed-off-by: Nikita Kiryanov
    Reviewed-by: Simon Glass
    Tested-by: Bo Shen
    Tested-by: Josh Wu
    Cc: Simon Glass
    Cc: Anatolij Gustschin

    Nikita Kiryanov
     
  • Remove unused includes.

    Signed-off-by: Nikita Kiryanov
    Reviewed-by: Simon Glass
    Tested-by: Bo Shen
    Tested-by: Josh Wu
    Cc: Bo Shen
    Cc: Simon Glass
    Cc: Anatolij Gustschin

    Nikita Kiryanov
     
  • Reduce the lcd_display_bitmap #ifdef complexity by extracting Atmel-specific
    code for setting cmap for bitmap images into a new function lcd_set_cmap().
    A default version is implemented with the remainder of the code.

    Signed-off-by: Nikita Kiryanov
    Reviewed-by: Simon Glass
    Tested-by: Bo Shen
    Tested-by: Josh Wu
    Cc: Bo Shen
    Cc: Simon Glass
    Cc: Anatolij Gustschin

    Nikita Kiryanov
     
  • Get rid of platform-specific #ifdefs in bitmap_plot() by moving the generic
    case of setting cmap into the weak lcd_logo_set_cmap().

    Signed-off-by: Nikita Kiryanov
    Reviewed-by: Simon Glass
    Tested-by: Bo Shen
    Tested-by: Josh Wu
    Cc: Bo Shen
    Cc: Simon Glass
    Cc: Anatolij Gustschin

    Nikita Kiryanov
     
  • Reduce the bitmap_plot #ifdef complexity by extracting MPC823-specific code for
    setting cmap into its own implementation of lcd_logo_set_cmap(), implemented in
    mpc8xx_lcd.c. In the MPC823 implementation, ARRAY_SIZE(bmp_logo_palette) is
    switched for BMP_LOGO_COLORS to avoid having to include bmp_logo_data.h, which
    would cause a compilation error because the logo data and palette arrays would
    be defined twice.

    This is a step towards cleaning bitmap_plot() of platform-specific code.

    Signed-off-by: Nikita Kiryanov
    Reviewed-by: Simon Glass
    Tested-by: Bo Shen
    Tested-by: Josh Wu
    Cc: Simon Glass
    Cc: Anatolij Gustschin

    Nikita Kiryanov
     
  • Reduce the bitmap_plot #ifdef complexity by extracting Atmel-specific code for
    setting cmap into a new function lcd_logo_set_cmap(), which is implemented in
    atmel_lcdfb driver and defined as part of common/lcd.c api with a weak dummy
    version. In the Atmel implementation, ARRAY_SIZE(bmp_logo_palette) is
    switched for BMP_LOGO_COLORS to avoid having to include bmp_logo_data.h, which
    would cause a compilation error because the logo data and palette arrays would
    be defined twice.

    This is a step towards cleaning bitmap_plot() of platform-specific code.

    Signed-off-by: Nikita Kiryanov
    Reviewed-by: Simon Glass
    Tested-by: Bo Shen
    Tested-by: Josh Wu
    Cc: Bo Shen
    Cc: Simon Glass
    Cc: Anatolij Gustschin

    Nikita Kiryanov
     
  • Reduce the amount of platform-specific code in common/lcd.c by moving MPC823
    implementation of fb_put_byte() to mpc8xx_lcd.c. Since we must also have a
    default implementation for everybody else, make the remainder of the code
    into a weak function.

    Signed-off-by: Nikita Kiryanov
    Reviewed-by: Simon Glass
    Tested-by: Bo Shen
    Tested-by: Josh Wu
    Cc: Simon Glass
    Cc: Anatolij Gustschin

    Nikita Kiryanov
     
  • Reduce the amount of platform-specific code in common/lcd.c by moving Atmel
    implementation of fb_put_word() to atmel_lcdfb.c. Since we must also have a
    default implementation for everybody else, make the remainder of the code
    into a weak function.

    Signed-off-by: Nikita Kiryanov
    Reviewed-by: Simon Glass
    Acked-by: Bo Shen
    Tested-by: Bo Shen
    Tested-by: Josh Wu
    Cc: Bo Shen
    Cc: Simon Glass
    Cc: Anatolij Gustschin

    Nikita Kiryanov
     
  • configuration_get_cmap() is multiple platform-specific functions stuffed into
    one function. Split it into multiple versions, and move each version to the
    appropriate driver to reduce the #ifdef complexity.

    Signed-off-by: Nikita Kiryanov
    Reviewed-by: Simon Glass
    Tested-by: Bo Shen
    Tested-by: Josh Wu
    Cc: Bo Shen
    Cc: Simon Glass
    Cc: Anatolij Gustschin

    Nikita Kiryanov
     

09 Feb, 2015

3 commits


08 Feb, 2015

1 commit


07 Feb, 2015

1 commit


30 Jan, 2015

13 commits

  • Tom Rini
     
  • There are missing parameters in help which fpga dump command
    requires.

    Signed-off-by: Michal Simek

    Michal Simek
     
  • Remove the additional ',' and '\n' from the gettime command help.

    Signed-off-by: Bin Meng

    Bin Meng
     
  • Currently the hash functions used in RSA are called directly from the sha1
    and sha256 libraries. Change the RSA checksum library to use the progressive
    hash API's registered with struct hash_algo. This will allow the checksum
    library to use the hardware accelerated progressive hash API's once available.

    Signed-off-by: Ruchika Gupta
    CC: Simon Glass
    Acked-by: Simon Glass
    Signed-off-by: Simon Glass
    (Fixed build error in am335x_boneblack_vboot due to duplicate CONFIG_DM)

    Change-Id: Ic44279432f88d4e8594c6e94feb1cfcae2443a54

    Ruchika Gupta
     
  • Signed-off-by: Ruchika Gupta
    CC: Simon Glass
    Acked-by: Simon Glass

    Ruchika Gupta
     
  • The hash_algo structure has some implementations in which progressive hash
    API's are not defined. These are basically the hardware based implementations
    of SHA. An API is added to find the algo which has progressive hash API's
    defined. This can then be integrated with RSA checksum library which uses
    Progressive Hash API's.

    Signed-off-by: Ruchika Gupta
    CC: Simon Glass
    Acked-by: Simon Glass

    Ruchika Gupta
     
  • this is an atempt to make the export of functions typesafe.
    I replaced the jumptable void ** by a struct (jt_funcs) with function pointers.
    The EXPORT_FUNC macro now has 3 fixed parameters and one
    variadic parameter
    The first is the name of the exported function,
    the rest of the parameters are used to format a functionpointer
    in the jumptable,

    the EXPORT_FUNC macros are expanded three times,
    1. to declare the members of the struct
    2. to initialize the structmember pointers
    3. to call the functions in stubs.c

    Signed-off-by: Martin Dorwig
    Acked-by: Simon Glass

    Signed-off-by: Simon Glass
    (resending to the list since my tweaks are not quite trivial)

    Martin Dorwig
     
  • Rather than assuming that the chip offset length is 1, allow it to be
    provided. This allows chips that don't use the default offset length to
    be used (at present they are only supported by the command line 'i2c'
    command which sets the offset length explicitly).

    Signed-off-by: Simon Glass
    Acked-by: Heiko Schocher

    Simon Glass
     
  • Add a dm_ prefix to driver model I2C functions so that we can keep the old
    ones around.

    This is a little unfortunate, but on reflection it is too difficult to
    change the API. We can undo this rename when most boards and drivers are
    converted to use driver model for I2C.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Add a new 'demo light' command which uses GPIOs to control imaginary lights.
    Each light is assigned a bit number in the overall value. This provides an
    example driver for using the new GPIO API.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • The common/board_r.c has show_model_r() to display the model name
    if the DTB has a "model" property. It sounds useful to have a similar
    function in common/board_f.c too because most of the boards show
    their board name before relocation.

    Instead of implementing the same function in both common/board_f.c
    and common/board_r.c, let's split it up into common/show_board_info.c.

    Signed-off-by: Masahiro Yamada
    Acked-by: Simon Glass

    Masahiro Yamada
     
  • To store 10bit chip address, the variable type should not be uchar,
    but uint.

    Signed-off-by: Masahiro Yamada
    Cc: Heiko Schocher
    Cc: Simon Glass
    Acked-by: Simon Glass
    Acked-by: Heiko Schocher

    Masahiro Yamada
     
  • Fake option is enabled only when CONFIG_TRACE is
    enabled in common/bootm.c:do_boot_states().

    Signed-off-by: Michal Simek
    Reviewed-by: Simon Glass

    Michal Simek