Skip to content
Snippets Groups Projects
  1. Jun 13, 2013
    • Stephen Warren's avatar
      mmc: report capacity for the selected partition · f866a46d
      Stephen Warren authored
      
      Enhance the MMC core to calculate the size of each MMC partition, and
      update mmc->capacity whenever a partition is selected. This causes:
      
      mmc dev 0 1 ; mmcinfo
      
      ... to report the size of the currently selected partition, rather than
      always reporting the size of the user partition.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Signed-off-by: default avatarAndy Fleming <afleming@freescale.com>
      f866a46d
    • Stephen Warren's avatar
      README: document CONFIG_ENV_IS_IN_MMC · 06e4ae5f
      Stephen Warren authored
      
      Describe the meaning of CONFIG_ENV_IS_IN_MMC, and all related defines that
      must or can be set when using that option.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Reviewed-by: default avatarPeter Korsgaard <jacmet@sunsite.dk>
      Acked-by: default avatarTom Rini <trini@ti.com>
      Signed-off-by: default avatarAndy Fleming <afleming@freescale.com>
      06e4ae5f
    • Andrew Gabbasov's avatar
      fsl_esdhc: Do not clear interrupt status bits until data processed · 01b77353
      Andrew Gabbasov authored
      
      After waiting for the command completion event, the interrupt status
      bits, that occured to be set by that time, are cleared by writing them
      back. It is supposed, that it should be command related bits (command
      complete and may be command errors).
      
      However, in some cases the DMA already completes by that time before
      the full transaction completes. The corresponding DINT bit gets set
      and then cleared before even entering the loop, waiting for data part
      completion. That waiting loop never gets this bit set, causing the
      operation to hang. This is reported to happen, for example, for write
      operation of 1 sector to upper area (block #7400000) of SanDisk Ultra II
      8GB card.
      
      The solution could be to explicitly clear only command related interrupt
      status bits. However, since subsequent processing does not rely on
      any command bits state, it could be easier just to remove clearing
      of any bits at that point, leaving them all until all data processing
      completes. After that the whole register will be cleared at once.
      
      Also, on occasion, interrupts masking moved to before writing the command,
      just for the case there should be no chance of interrupt between the first
      command and interrupts masking.
      
      Reported-by: default avatarDirk Behme <dirk.behme@de.bosch.com>
      Signed-off-by: default avatarAndrew Gabbasov <andrew_gabbasov@mentor.com>
      Acked-by: default avatarDirk Behme <dirk.behme@de.bosch.com>
      Signed-off-by: default avatarAndy Fleming <afleming@freescale.com>
      01b77353
    • Fabio Estevam's avatar
      mmc: fsl_esdhc: Fix hang after 'save' command · c2137b10
      Fabio Estevam authored
      
      Since commit 48e0b2bd (powerpc/esdhc: Correct judgement for DATA PIO mode)
      we see mx6 systems to hang after doing a 'save' command.
      
      Revert this commit since the original 'ifdef' logic from 7b43db92
      (drivers/mmc/fsl_esdhc.c: fix compiler warnings) was the correct one.
      
      Reported-by: default avatarTapani Utriainen <tapani@technexion.com>
      Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
      Signed-off-by: default avatarAndy Fleming <afleming@freescale.com>
      c2137b10
    • Ruud Commandeur's avatar
      mmc write bug fix · a586c0aa
      Ruud Commandeur authored
      
      This patch fixes a bug related to mmc writes.
      
      When doing fatwrites on an SD-Card, MMC bus problems can occur. Depending
      on the size of the file, "MMC0: Bus busy timeout!" is reported, resulting
      in an SD-Card that is no longer responding.
      It appears to be, that set_cluster can be called with a size being zero.
      That can be with a file that has a size being an exact multiple
      (including 0) of the clustersize, but also for files that are smaller than
      the size of one cluster.
      The same problem occurs if the "mmc write" command is given with a block
      count being 0.
      
      By adding a check for the block count being zero in mmc_write_blocks
      (drivers/mmc.c), this problem is solved.
      
      Signed-off-by: default avatarRuud Commandeur <rcommandeur@clb.nl>
      Cc: Tom Rini <trini@ti.com>
      Cc: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
      Cc: Mats Karrman <Mats.Karrman@tritech.se>
      Cc: Andy Fleming <afleming@gmail.com>
      Signed-off-by: default avatarAndy Fleming <afleming@freescale.com>
      a586c0aa
    • Jagan Teki's avatar
      mmc: sdhci: Enable 8-bit bus width only for 3.0 spec onwards · 1695b29a
      Jagan Teki authored
      
      CAP register don't have any information for 8-bit buswidth support
      on 2.0 sdhci spec, only from 3.0 onwards bit[18] got this information.
      
      Due to this misassignment in sdhci, mmc is setting 8-bit buswidth using
      mmc_set_bus_width even if controller doesn't support.
      Below change has code information.
      "mmc: Properly determine maximum supported bus width"
      (sha1: 7798f6db)
      
      Bug log: <mmc plus and emmc cards)
      -------
      zynq-uboot> mmcinfo
      Error detected in status(0x208100)!
      Device: zynq_sdhci
      Manufacturer ID: fe
      .....
      
      So enable 8-bit support only for 3.0 spec using CAP and for below 3.0
      assign mmc->host_caps = MMC_MODE_8BIT on respective platform driver
      if host have a support.
      
      Signed-off-by: default avatarJagannadha Sutradharudu Teki <jaganna@xilinx.com>
      Signed-off-by: default avatarAndy Fleming <afleming@freescale.com>
      1695b29a
    • Bo Shen's avatar
      mmc: fix env in mmc with redundant compile error · 5707df77
      Bo Shen authored
      
      The commit d196bd88 (env_mmc: add support for redundant environment)
      introduce the following compile error when enable redundant
      environment support with MMC
      ---8<---
      env_mmc.c:149: error: 'env_t' has no member named 'flags'
      env_mmc.c:248: error: 'env_t' has no member named 'flags'
      env_mmc.c:248: error: 'env_t' has no member named 'flags'
      env_mmc.c:250: error: 'env_t' has no member named 'flags'
      env_mmc.c:250: error: 'env_t' has no member named 'flags'
      env_mmc.c:252: error: 'env_t' has no member named 'flags'
      env_mmc.c:252: error: 'env_t' has no member named 'flags'
      env_mmc.c:254: error: 'env_t' has no member named 'flags'
      env_mmc.c:254: error: 'env_t' has no member named 'flags'
      env_mmc.c:267: error: 'env_t' has no member named 'flags'
      make[1]: *** [env_mmc.o] Error 1
      --->8---
      
      Add this patch to fix it
      
      Signed-off-by: default avatarBo Shen <voice.shen@atmel.com>
      Reviewed-by: default avatarMichael Heimpold <mhei@heimpold.de>
      Signed-off-by: default avatarAndy Fleming <afleming@freescale.com>
      5707df77
  2. Jun 11, 2013
    • Tom Rini's avatar
      077becc3
    • Marek Vasut's avatar
      ppc: ppmc7xx: Fix possible out-of-bound access · 8cf69553
      Marek Vasut authored
      
      The flash_info_t->start[] field is limited in size by CONFIG_SYS_MAX_FLASH_SECT
      macro, which is set to 19 for this board in the board config file. If we inspect
      the board/ppmc7xx/flash.c closely, especially the flash_get_size() function, we
      can notice the "switch ((long)flashtest)" at around line 80 having a few results
      which will set flash_info_t->sector_count to value higher than 19, for example
      "case AMD_ID_LV640U" will set it to 128. Notice that right underneath, iteration
      over flash_info_t->start[] happens and the upper bound for the interation is
      flash_info_t->sector_count. Now if the sector_count is 128 as it is for the
      AMD_ID_LV640U case, but the CONFIG_SYS_MAX_FLASH_SECT limiting the start[] is
      only 19, an access past the start[] array much happen. Moreover, during this
      iteration, the field is written to, so memory corruption is inevitable.
      
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Wolfgang Denk <wd@denx.de>
      Cc: Tom Rini <trini@ti.com>
      Cc: Richard Danter <richard.danter@windriver.com>
      8cf69553
    • Scott Wood's avatar
      powerpc: fix 8xx and 82xx type-punning warnings with GCC 4.7 · a166fbca
      Scott Wood authored
      
      C99's strict aliasing rules are insane to use in low-level code such as a
      bootloader, but as Wolfgang has rejected -fno-strict-aliasing in the
      past, add a union so that 16-bit accesses can be performed.
      
      Compile-tested only.
      
      Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
      Acked-by: default avatarWolfgang Denk <wd@denx.de>
      a166fbca
  3. Jun 08, 2013
    • Daniel Schwierzeck's avatar
      MIPS: asm/errno.h: switch to asm-generic/errno.h · e1208c2f
      Daniel Schwierzeck authored
      
      This fixes several warnings like
      
      In file included from ./u-boot/include/linux/mtd/mtd.h:13:0,
                       from env_onenand.c:37:
      ./u-boot/build/vct_platinumavc_onenand_small/include2/asm/errno.h:52:0: warning: "ENOMSG" redefined [enabled by default]
      
      Signed-off-by: default avatarDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
      e1208c2f
    • Gabor Juhos's avatar
      MIPS: fix __raw_* IO accessors · f0550f87
      Gabor Juhos authored
      
      The purpose of the __raw* IO accessors is to provide
      IO access in native-endian order. However in the current
      MIPS implementation, the 16 and 32 bit variants of the
      __raw accessors are swapping the values on big-endian
      systems if the CONFIG_SWAP_IO_SPACE option is enabled.
      
      The patch changes the IO accessor macros to fix this
      broken behaviour.
      
      Signed-off-by: default avatarGabor Juhos <juhosg@openwrt.org>
      Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
      f0550f87
  4. Jun 07, 2013
  5. Jun 06, 2013
  6. Jun 05, 2013
  7. Jun 04, 2013
    • Tom Rini's avatar
      am33xx: Correct NON_SECURE_SRAM_START/END · 320d9746
      Tom Rini authored
      
      Prior to Sricharan's cleanup of the boot parameter saving code, we
      did not make use of NON_SECURE_SRAM_START on am33xx, so it wasn't a
      problem that the address was pointing to the middle of our running SPL.
      Correct to point to the base location of the download image area.
      Increase CONFIG_SPL_TEXT_BASE to account for this scratch area being
      used.  As part of correcting these tests, make use of the fact that
      we've always been placing our stack outside of the download image area
      (which is fine, once the downloaded image is run, ROM is gone) so
      correct the max size test to be the ROM defined top of the download area
      to where we link/load at.
      
      Signed-off-by: default avatarTom Rini <trini@ti.com>
      
      ---
      Changes in v2:
      - Fix typo noted by Peter Korsgaard
      320d9746
    • Tom Rini's avatar
      omap-common/hwinit-common.c: Mark omap_rev_string as static · 0ac6db26
      Tom Rini authored
      
      Only called in this file, mark as static.
      
      Signed-off-by: default avatarTom Rini <trini@ti.com>
      0ac6db26
    • Stephen Warren's avatar
      fdt: allow bootdelay to be specified via device tree · 99bd544e
      Stephen Warren authored
      
      This can be useful to force bootcmd to execute as soon as U-Boot has
      started.
      
      My use-case is: An SoC-specific tool pushes U-Boot into RAM, along with
      an image to be written to device boot flash, with the DT config property
      "bootcmd" set to contain a command to write that image to flash. In this
      scenario, we don't want to allow any stale bootdelay value taken from
      the current flash content to affect how long it takes before the
      flashing process starts.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      Acked-by: default avatarGerald Van Baren <vanbaren@cideas.com>
      99bd544e
    • Stephen Warren's avatar
      input: simplify key_matrix_decode_fdt() · df637fa6
      Stephen Warren authored
      
      We know the exact property names that the code wants to process. Look
      these up directly with fdt_get_property(), rather than iterating over
      all properties within the node, and checking each property's name, in
      a convoluted fashion, against the expected name.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      df637fa6
    • Stephen Warren's avatar
      input: fix unaligned access in key_matrix_decode_fdt() · e573617c
      Stephen Warren authored
      
      Initialized character arrays on the stack can cause gcc to emit code that
      performs unaligned accessess. Make the data static to avoid this.
      
      Note that the unaligned accesses are made when copying data to prefix[] on
      the stack from .rodata. By making the data static, the copy is completely
      avoided. All explicitly written code treats the data as u8[], so will never
      cause any unaligned accesses.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      e573617c
    • Masahiro Yamada's avatar
      common: board_f: Do not call board_postclk_init twice · b8521b74
      Masahiro Yamada authored
      
      The generic-board board_init_f function called board_postclk_init twice.
      
      The first one came from arch/arm/lib/board.c, while the second one
      from arch/powerpc/lib/board.c.
      
      This commit deletes the first occurrence.
      In addition, the second get_clocks call is moved after
      board_postclk_init in order to keep the function call order
      both for ARM and PowerPC.
      ARM board calles get_clocks function after board_postclk_init.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
      b8521b74
    • Marek Vasut's avatar
      disk: Fix possible out-of-bounds access in part_efi.c · 67cd4a63
      Marek Vasut authored
      
      Make sure to never access beyond bounds of either EFI partition name
      or DOS partition name. This situation is happening:
      
      part.h:     disk_partition_t->name is 32-byte long
      part_efi.h: gpt_entry->partition_name is 36-bytes long
      
      The loop in part_efi.c copies over 36 bytes and thus accesses beyond
      the disk_partition_t->name .
      
      Fix this by picking the shortest of source and destination arrays and
      make sure the destination array is cleared so the trailing bytes are
      zeroed-out and don't cause issues with string manipulation.
      
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Tom Rini <trini@ti.com>
      Cc: Simon Glass <sjg@chromium.org>
      67cd4a63
    • Simon Glass's avatar
      sandbox: image: Create a test for loading FIT images · 301e8038
      Simon Glass authored
      
      The image code is fairly complex with various different options. It would
      be useful to have comprehensive tests for this.
      
      As a start, create a script which tries out loading a kernel/ramdisk/fdt
      from a FIT and checks that the images appear in the right place in memory.
      
      This uses sandbox which now supports bootm and related features.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      301e8038
Loading