Skip to content
Snippets Groups Projects
  1. Jul 24, 2015
    • Stefan Roese's avatar
      spl: spl_mmc: Add option to boot from a MMC partition with offset · 4bfcc54c
      Stefan Roese authored
      
      This patch introduces the option to boot from a MMC card parition with
      an offset. This can be done by using both defines together:
      
      define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION 1
      define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR    ((160 << 10) / 512)
      
      The example above loads the main U-Boot at offset 160KiB from the MMC
      partition 1.
      
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      Cc: Luka Perkov <luka.perkov@sartura.hr>
      Cc: Dirk Eibach <eibach@gdsys.de>
      Cc: Tom Rini <trini@konsulko.com>
      4bfcc54c
  2. Jul 22, 2015
  3. Jul 21, 2015
  4. Jul 20, 2015
  5. Jul 15, 2015
  6. Jul 11, 2015
    • Andre Przywara's avatar
      scsi: fix compiler warning with DEBUG and 48bit LBAs · c7d0fd79
      Andre Przywara authored
      
      Commit 2b42c931 ("ahci: support LBA48 data reads for 2+TB drives")
      introduced conditional code which triggers a warning when compiled
      with DEBUG enabled:
      
      In file included from common/cmd_scsi.c:12:0:
      common/cmd_scsi.c: In function 'scsi_read':
      include/common.h:109:4: warning: 'smallblks' may be used uninitialized in this function [-Wmaybe-uninitialized]
      ...
      
      Since this is for debug only, take the easy way and initialize the
      variable explicitly on declaration to avoid the warning.
      (Fix a nearby whitespace error on the way.)
      
      Tested-by: default avatarBin Meng <bmeng.cn@gmail.com>
      Signed-off-by: default avatarAndre Przywara <osp@andrep.de>
      c7d0fd79
  7. Jul 01, 2015
  8. Jun 29, 2015
    • Heiko Schocher's avatar
      mtd, spi: Check if flash pointer is used · 8ee81b7f
      Heiko Schocher authored
      
      If flash pointer is used free it, before probing a new
      flash and storing it in flash.
      
      Signed-off-by: default avatarHeiko Schocher <hs@denx.de>
      Tested-by: default avatarJagannadh Teki <jteki@openedev.com>
      Reviewed-by: default avatarJagannadh Teki <jteki@openedev.com>
      8ee81b7f
    • Heiko Schocher's avatar
      spi, sf: Use offset and size in sf cmd from mtdpartition · 2ec1a405
      Heiko Schocher authored
      
      With this patch, it is possible to get the offset and size information
      from the mtdpartiton setting in "mtdparts", similiar to the
      "nand" commandos.
      
      => sf
      sf - SPI flash sub-system
      
      Usage:
      sf probe [[bus:]cs] [hz] [mode] - init flash device on given SPI bus
                                        and chip select
      sf read addr offset|partition len       - read `len' bytes starting at
                                                `offset' to memory at `addr'
      sf write addr offset|partition len      - write `len' bytes from memory
                                                at `addr' to flash at `offset'
      sf erase offset|partition [+]len        - erase `len' bytes from `offset'
                                                `+len' round up `len' to block size
      sf update addr offset|partition len     - erase and write `len' bytes from memory
                                                at `addr' to flash at `offset'
      =>
      for example "env" is defined in mtdparts:
      
      => sf read 13000000 env
      device 0 offset 0xd0000, size 0x10000
      SF: 65536 bytes @ 0xd0000 Read: OK
      
      zynq-uboot> mtdparts add nor0 0x10000@0x0 env
      zynq-uboot> sf erase env 0x10000
      SF: 65536 bytes @ 0x0 Erased: OK
      
      zynq-uboot> sf write 0x100 env
      device 0 offset 0x0, size 0x10000
      SF: 65536 bytes @ 0x0 Written: OK
      
      zynq-uboot> sf read 0x40000 env
      device 0 offset 0x0, size 0x10000
      SF: 65536 bytes @ 0x0 Read: OK
      
      Signed-off-by: default avatarHeiko Schocher <hs@denx.de>
      Tested-by: default avatarJagannadh Teki <jteki@openedev.com>
      Reviewed-by: default avatarJagannadh Teki <jteki@openedev.com>
      2ec1a405
    • Heiko Schocher's avatar
      mtd, nand: Move common functions from cmd_nand.c to common place · 09c32807
      Heiko Schocher authored
      
      Move common functions from cmd_nand.c (for calculating offset
      and size from cmdline paramter) to common place, so they could
      used from other commands which use mtd partitions.
      
      For onenand the arg_off_size() is left in common/cmd_onenand.c.
      It should use now the common arg_off() function, but as I could
      not test onenand I let it there ...
      
      Signed-off-by: default avatarHeiko Schocher <hs@denx.de>
      Acked-by: default avatarScott Wood <scottwood@freescale.com>
      Reviewed-by: default avatarJagannadh Teki <jteki@openedev.com>
      09c32807
    • Daniel Schwierzeck's avatar
      mtd, spi: Add MTD layer driver · 9fe6d871
      Daniel Schwierzeck authored
      Add MTD layer driver for spi, original patch from:
      http://git.denx.de/?p=u-boot/u-boot-mips.git;a=commitdiff;h=bb246819cdc90493dd7089eaa51b9e639765cced
      
      
      
      Changes from Heiko Schocher against this patch:
      - Remove compile error if not defining CONFIG_SPI_FLASH_MTD:
      
        LD      drivers/mtd/spi/built-in.o
      drivers/mtd/spi/sf_probe.o: In function `spi_flash_mtd_unregister':
      /home/hs/abb/imx6/u-boot/drivers/mtd/spi/sf_internal.h:168: multiple definition of `spi_flash_mtd_unregister'
      drivers/mtd/spi/sf_params.o:/home/hs/abb/imx6/u-boot/drivers/mtd/spi/sf_internal.h:168: first defined here
      drivers/mtd/spi/sf_ops.o: In function `spi_flash_mtd_unregister':
      /home/hs/abb/imx6/u-boot/drivers/mtd/spi/sf_internal.h:168: multiple definition of `spi_flash_mtd_unregister'
      drivers/mtd/spi/sf_params.o:/home/hs/abb/imx6/u-boot/drivers/mtd/spi/sf_internal.h:168: first defined here
      make[1]: *** [drivers/mtd/spi/built-in.o] Fehler 1
      make: *** [drivers/mtd/spi] Fehler 2
      
      - Add a README entry.
      - Add correct writebufsize, to fit with Linux v3.14
        MTD, UBI/UBIFS sync.
      
      Note (From Jagan): For testing raw mtd parition erase/read/write operations
      using cmd_sf, sf_mtd should be required to register the spi flash device to
      MTD layer but the sf_mtd_info ops were not required until and unless if we
      use any flash filesystem layer say for example UBI. Due to this the foot-print
      got increased ~290bytes in non-UBI case here that should be acceptible.
      
      Signed-off-by: default avatarDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
      Signed-off-by: default avatarHeiko Schocher <hs@denx.de>
      Tested-by: default avatarJagannadh Teki <jteki@openedev.com>
      Reviewed-by: default avatarJagannadh Teki <jteki@openedev.com>
      9fe6d871
  9. Jun 26, 2015
  10. Jun 25, 2015
  11. Jun 19, 2015
  12. Jun 18, 2015
    • Paul Kocialkowski's avatar
      spl: spl_mmc: MMC boot mode provisions checks · 3ae8f4c8
      Paul Kocialkowski authored
      
      This allows using only one of either raw or fs mode for SPL mmc boot, without
      the need to have provisions for the other. In particular, a device may have
      U-Boot installed on a file system on the mmc, without ever needing to read
      U-Boot from raw memory. Thus, there is no reason to provide a sector or
      partition for raw mode. This allows this behaviour and still provides a robust
      fallback mechanism in case provisions for both modes are defined.
      
      Signed-off-by: default avatarPaul Kocialkowski <contact@paulk.fr>
      3ae8f4c8
Loading