12 Apr, 2013

26 commits

  • This reverts commit 1285a2808a254f3d1a809c1a541f0c0f746e03d7 since the migration
    of boards from Makefile to boards.cfg is now complete.

    Signed-off-by: Benoît Thébaudeau

    Benoît Thébaudeau
     
  • The migration of boards from Makefile to boards.cfg was due for v2012.03, but
    smdk6400 did not follow, and it does not build, so move it to scrapyard. It will
    still be possible to restore it from the Git history before fixing it.

    Signed-off-by: Benoît Thébaudeau

    Benoît Thébaudeau
     
  • This image combines the SPL with the i.MX header, the FCB and U-Boot.

    For i.MX25/35/51, the FCB is ignored by the boot ROM, so this image is just
    useful because it can be programmed on a NAND Flash page boundary.

    For i.MX53, the FCB is required by the boot ROM.

    This does not support i.MX6 so far because its FCB is more complicated.

    Signed-off-by: Benoît Thébaudeau

    Benoît Thébaudeau
     
  • This image combines the SPL with the i.MX header and U-Boot. This is a
    convenient way of having a single image to program on some boot devices.

    The i.MX header has to be added to the SPL before appending U-Boot, so that the
    boot ROM loads only the SPL.

    Signed-off-by: Benoît Thébaudeau

    Benoît Thébaudeau
     
  • Signed-off-by: Benoît Thébaudeau

    Benoît Thébaudeau
     
  • make never uses the SHELL variable from the environment. Instead, it
    uses /bin/sh, or the value assigned to the SHELL variable by the Makefile. This
    makes the export of the SHELL variable useless for sub-makes (but still useful
    for the environment of recipes). However, we want all makes to use the same
    shell.

    This patch fixes this issue by moving the SHELL variable setup and export to the
    top config.mk, so that all Makefile-s including it use the same shell.

    Since BASH is used by default, this makes it possible to use things
    like 'echo -e ...' in sub-makes, which would otherwise fail e.g. with /bin/sh
    symlinked to /bin/dash on Ubuntu.

    Signed-off-by: Benoît Thébaudeau
    Reviewed-by: Tom Rini

    Benoît Thébaudeau
     
  • Commit e05e5de7fae5bec79617e113916dac6631251156 made the 2 1st parameters of
    ARM's relocate_code() useless since it moved the code handling them to crt0.S.
    So, drop these parameters.

    Signed-off-by: Benoît Thébaudeau

    Benoît Thébaudeau
     
  • Signed-off-by: Benoît Thébaudeau

    Benoît Thébaudeau
     
  • This also fixes support for mx31pdk and tx25, which had been broken by commit
    e05e5de7fae5bec79617e113916dac6631251156.

    Signed-off-by: Benoît Thébaudeau
    Acked-by: Scott Wood
    Tested-by: Fabio Estevam

    Benoît Thébaudeau
     
  • Automatically build the 'u-boot.imx' (i.e. imx header + u-boot.bin) and 'SPL'
    (i.e. imx header + u-boot-spl.bin) make targets for all imx processors
    supporting this header, so for arm926ejs, arm1136 and armv7. Some combinations
    were missing.

    At the same time, fix the build of SPL targets not supporting the imx header on
    arm1136. For arm1136, the 'SPL' make target was forced to build in all cases if
    CONFIG_SPL_BUILD was defined, even for non-imx platforms or imx setups without
    an imx header.

    Signed-off-by: Benoît Thébaudeau

    Benoît Thébaudeau
     
  • Change CONFIG_SPL_PAD_TO from a link address to an image offset since this is
    more handy and closer to the purpose of this config.

    Automatically define CONFIG_SPL_PAD_TO to CONFIG_SPL_MAX_SIZE (or 0 without
    CONFIG_SPL_MAX_SIZE).

    Test that CONFIG_SPL_PAD_TO >= CONFIG_SPL_MAX_SIZE if CONFIG_SPL_PAD_TO is
    non-zero.

    Signed-off-by: Benoît Thébaudeau

    Benoît Thébaudeau
     
  • Give more flexibility to define configs that can be interpreted by make, e.g. to
    define fallback values of configs like in the example below.

    Before this change, the config lines:
    #define CONFIG_SPL_MAX_SIZE 2048
    #define CONFIG_SPL_PAD_TO CONFIG_SPL_MAX_SIZE
    would have been changed in autoconfig.mk into:
    CONFIG_SPL_MAX_SIZE=2048
    CONFIG_SPL_PAD_TO="CONFIG_SPL_MAX_SIZE"

    Hence, a make recipe using as an argument to $(OBJCOPY):
    --pad-to=$(CONFIG_SPL_PAD_TO)
    would have issued:
    --pad-to="CONFIG_SPL_MAX_SIZE"
    which means nothing for $(OBJCOPY) and makes it fail.

    Thanks to this change, the config lines above are changed in autoconfig.mk into:
    CONFIG_SPL_MAX_SIZE=2048
    CONFIG_SPL_PAD_TO=$(CONFIG_SPL_MAX_SIZE)

    Hence, the make recipe above now issues:
    --pad-to=2048
    as expected from the defined config.

    Signed-off-by: Benoît Thébaudeau
    Reviewed-by: Tom Rini

    Benoît Thébaudeau
     
  • The purpose of .globl is to export symbols for ld, not to declare external
    symbols.

    By the way, use the ENTRY() and ENDPROC() macros to define functions rather than
    using .global directly.

    Signed-off-by: Benoît Thébaudeau

    Benoît Thébaudeau
     
  • Use __image_copy_end instead of __bss_start for the end of the image to
    relocate. This is the same as commit 033ca72, but applied to all ARM start.S.

    This is a more appropriate symbol naming for an image copy & relocate feature,
    and this also saves a useless copy of data put between __image_copy_end and
    __bss_start in linker scripts (e.g. relocation information, or MMU
    initialization tables used only before jumping to the relocated image).

    Signed-off-by: Benoît Thébaudeau

    Benoît Thébaudeau
     
  • Signed-off-by: Benoît Thébaudeau

    Benoît Thébaudeau
     
  • Signed-off-by: Benoît Thébaudeau

    Benoît Thébaudeau
     
  • Commit e05e5de7fae5bec79617e113916dac6631251156 made ARM's relocate_code()
    return to its caller, but it did not update its declaration accordingly.

    Fixing this function declaration fixes dropped C code following calls to
    relocate_code().

    Signed-off-by: Benoît Thébaudeau

    Benoît Thébaudeau
     
  • _TEXT_BASE must be set to CONFIG_SPL_TEXT_BASE for generic SPL, and to
    CONFIG_SYS_TEXT_BASE for non-SPL builds.

    Signed-off-by: Benoît Thébaudeau
    Reviewed-by: Tom Rini

    Benoît Thébaudeau
     
  • The syndrome functions should use the page number passed as argument instead of
    the page number saved upon NAND_CMD_READ0.

    This does not make any difference if the NAND_NO_AUTOINCR option is set, but
    otherwise this fixes accesses to the wrong pages.

    Signed-off-by: Benoît Thébaudeau
    Acked-by: Scott Wood

    Benoît Thébaudeau
     
  • The page number indicated in the debug trace of mxc_nand_read_oob_syndrome() did
    not match the page being worked on.

    By the way, replace the GCC-specific __FUNCTION__ with __func__.

    Signed-off-by: Benoît Thébaudeau
    Acked-by: Scott Wood

    Benoît Thébaudeau
     
  • Add support for the Samsung K9LAG08U0M NAND Flash (2-GiB MLC NAND Flash, 2-kiB
    pages, 256-kiB blocks, 30-ns R/W cycles, 1 CS) on mx53ard.

    eNFC_CLK_ROOT is set up with a cycle time of 37.5 ns (400 MHz / 3 / 5) for this
    board, which satisfies the 30-ns NF R/W cycle requirement.

    Signed-off-by: Benoît Thébaudeau
    Tested-by: Fabio Estevam

    Benoît Thébaudeau
     
  • Don't use several instructions to build constant values.

    Signed-off-by: Benoît Thébaudeau
    Acked-by: Stefano Babic

    Benoît Thébaudeau
     
  • Signed-off-by: Benoît Thébaudeau
    Acked-by: Scott Wood
    Tested-by: Fabio Estevam

    Benoît Thébaudeau
     
  • Add some abstraction to NFC definitions so that some parts of the current code
    can also be used for future i.MX5 code.

    Clean up a few things by the way.

    Signed-off-by: Benoît Thébaudeau
    Acked-by: Scott Wood
    Tested-by: Fabio Estevam

    Benoît Thébaudeau
     
  • Currently is_16bit_nand() is a per SoC function and it decides the bus nand
    width by reading some boot related registers.

    This method works when NAND is the boot medium, but does not work if another
    boot medium is used. For example: booting from a SD card and then using NAND
    to store the environment variables, would lead to the following error:

    NAND bus width 16 instead 8 bit
    No NAND device found!!!
    0 MiB

    Use CONFIG_SYS_NAND_BUSWIDTH_16BIT symbol to decide the bus width.

    If it is defined in the board file, then consider 16-bit NAND bus-width,
    otherwise assume 8-bit NAND is used.

    This also aligns with Documentation/devicetree/bindings/mtd/nand.txt, which
    states:

    nand-bus-width : 8 or 16 bus width if not present 8

    Signed-off-by: Fabio Estevam
    Acked-by: Scott Wood
    Reviewed-by: Benoît Thébaudeau

    Fabio Estevam
     
  • Introduce CONFIG_SYS_NAND_BUSWIDTH_16BIT option so that other NAND controller
    drivers could use it when a 16-bit NAND is deployed.

    drivers/mtd/nand/ndfc has CONFIG_SYS_NDFC_16BIT, so just rename it, so that
    other NAND drivers could reuse the same symbol.

    Signed-off-by: Fabio Estevam
    Acked-by: Scott Wood
    Reviewed-by: Benoît Thébaudeau

    Fabio Estevam
     

08 Apr, 2013

14 commits

  • Cc: Sricharan R
    Signed-off-by: Tom Rini

    Tom Rini
     
  • The omap5_uevm platform has eMMC, and it makes sense to say that our
    default env storage shall reside there. Other platforms may not, so
    move this choice to the EVM config. In addition, we should provide some
    way to partition the flash for later usage, so take advantage of the GPT
    partition table support code and allow that to be setup with some
    reasonable defaults.

    Cc: Sricharan R
    Signed-off-by: Tom Rini

    Tom Rini
     
  • In the case of booting from certain peripherals, such as UART, we must
    not see what the device descriptor says for RAW or FAT mode because in
    addition to being nonsensical, it leads to a hang. This is why we have
    a test currently for the boot mode being within range. The problem
    however is that on some platforms we get MMC2_2 as the boot mode and not
    the defined value for MMC2, and in others we get the value for MMC2_2.
    This is required to fix eMMC booting on omap5_uevm.

    Tested on am335x_evm (UART, NAND, SD), omap3_beagle (NAND, SD on
    classic, SD only on xM rev C5) and omap5_uevm (SD, eMMC).

    Signed-off-by: Tom Rini

    Tom Rini
     
  • Commit "8602114 omap: emif: configure emif only when required"
    breaks SDRAM_AUTO_DETECTION.
    The issue is dmm_init() depends on emif_sizes[](SDRAM Auto detection)
    done in do_sdram_init(). The above commit moves dmm_init() above
    do_sdram_init() because of which dmm_init() uses uninitialized
    emif_sizes[].
    So instead of using global emif_sizes[], get sdram details locally
    and calculate emif sizes.

    Reported-by: Michael Cashwell
    Signed-off-by: Lokesh Vutla

    Lokesh Vutla
     
  • V2 fixes line wrap issue of the patch itself.

    UART3 was enabled twice instead of UART4.

    One more cosmetic change in a comment on EMIF clock.

    Signed-off-by: Lubomir Popov
    Reviewed-by: R Sricharan

    Lubomir Popov
     
  • We shall remove these OMAP4/5-specific options in v2013.07, barring
    insufficient progress on the kernel side.

    Cc: Sricharan R
    Signed-off-by: Tom Rini

    Tom Rini
     
  • So with OMAP added to multi platform kernel,
    the uImage no more contains a valid load address.
    With the uboot already supporting zImage,
    change the default boot command to bootz
    instead.

    Acked-by: Nishanth Menon
    Signed-off-by: Sricharan R
    Tested-by: Nishanth Menon

    SRICHARAN R
     
  • Now with kernel moving to all device tree, the default
    boot command is changed to pass the device tree blob.
    Also, adding the findfdt command to get the dt-blob
    based on the board.

    Thanks to Tom Rini for suggesting this.

    Signed-off-by: Sricharan R

    SRICHARAN R
     
  • For production systems it is better to use script images since
    they are protected by checksums and carry valuable information
    like name and timestamp. Also, you can't validate the content
    passed to env import.

    But for development, it is easier to use the env import command and
    plain text files instead of script-images.

    Since both OMAP5evm/uevm boards are used primarily for development,
    we allow U-Boot to load env var from a text file in case that an
    boot.scr script-image is not present.

    The variable uenvcmd (if existent) will be executed (using run) after
    uEnv.txt was loaded. If uenvcmd doesn't exist the default boot sequence
    will be started.

    Inspired by commit: d70f54808dfa83b574e1239c3eccbcf3317343e1
    (omap4: allow the use of a plain text env file instead boot scripts)

    Signed-off-by: Sricharan R
    Signed-off-by: Nishanth Menon
    Tested-by: Sricharan R

    Nishanth Menon
     
  • While booting with dt blob, if fdt_high is not set to
    0xffffffff, the dt blob gets relocated to a high ram address,
    which the kernel is not able to use without HIGHMEM.

    So set it to 0xffffffff to avoid the issue.

    Acked-by: Nishanth Menon
    Signed-off-by: Sricharan R
    Tested-by: Nishanth Menon

    SRICHARAN R
     
  • The omap5-uevm is the reference board name for OMAP5 soc
    based platform. So rename it accordingly.

    Acked-by: Nishanth Menon
    Signed-off-by: Sricharan R
    Tested-by: Nishanth Menon

    SRICHARAN R
     
  • The function get_timer() should return time in ms and CONFIG_SYS_HZ
    should be set to 1000 by default. Fix both of these items.

    Signed-off-by: Jon Hunter

    Hunter, Jon
     
  • Enable device-tree support for the omap2420-h4 board.

    Signed-off-by: Jon Hunter

    Hunter, Jon
     
  • The omap2420-h4 board is using a RAM based address as the linker
    location for code. This is causing several problems when attempting
    to run the latest u-boot code base on this board from flash. Update
    the default linker location for code to be in NOR flash. Please note
    that OMAP maps the NOR flash to address 0x08000000 by default and so
    use this as the default address for the NOR flash.

    Also remove legacy code that attempts to calculate where in flash the
    sdata structure, that holds the memory interface configuration data,
    is located. By changing the default linker location for code to flash
    this is no longer necessary.

    Signed-off-by: Jon Hunter

    Hunter, Jon