1. 27 5月, 2016 10 次提交
    • H
      test/py: fix NameError exception if bdi cmd is not supported · 7e6621a1
      Heiko Schocher 提交于
      test/py raises an error, if a board has not enabled bdi command
      
      >           pytest.skip('bdinfo command not supported')
      E           NameError: global name 'pytest' is not defined
      
      import pytest in test/py/u_boot_utils.py fixes this.
      Signed-off-by: NHeiko Schocher <hs@denx.de>
      Reviewed-by: NStephen Warren <swarren@nvidia.com>
      7e6621a1
    • K
      cmd: replace the cast of the memory access to a fixed bit type in itest · dafd6488
      Kunihiko Hayashi 提交于
      This patch fixes a bug that long word(.l) memory access in 'itest'
      command reads the 8bytes of the actual memory on 64-bit architecture.
      The cast to the memory pointer should use a fixed bit type.
      Signed-off-by: NKunihiko Hayashi <hayashi.kunihiko@socionext.com>
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Reviewed-by: NStefan Roese <sr@denx.de>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      dafd6488
    • P
      disk: part_efi: fix check of the max partition size · a5653867
      Patrick Delaunay 提交于
      the last value acceptable value for offset is last_usable_lba + 1
      and not last_usable_lba - 1
      
      issue found with SDCARD partition commands on u-boot 2015.10
      but this part of code don't change
      
      1- create GPT partion on all the card
        > gpt write mmc 0 name=test,start=0,size=0
        > part list mmc 0
      
      Partition Map for MMC device 0  --   Partition Type: EFI
      
      Part      Start LBA          End LBA                       Name
                  Attributes
                  Type GUID
                  Partition GUID
        1        0x00000022       0x003a9fde       "test"
                  attrs:     0x0000000000000000
                  type:     ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
                  type:     data
                  guid:     b710eb04-45b9-e94a-8d0b-21458d596f54
      
      => Start = 0x22*512 = 0x4400
      => Size = (0x003a9fde-0x22+1) * 512  = 0x753F7A00
      
      2- try to recreate the same partition with the next command
         (block size:512 bytes = 0x200)
      
        > gpt write mmc 0 name=test,start=0x4400,size=0x753F7A00
          Writing GPT: Partitions layout exceds disk size
      
        > gpt write mmc 0 name=test,start=0x4400,size=0x753F7800
          Writing GPT: Partitions layout exceds disk size
      
        > gpt write mmc 0 name=test,start=0x4400,size=0x753F7600
          Writing GPT: success!
      
      Partition Map for MMC device 0  --   Partition Type: EFI
      
      Part      Start LBA          End LBA                       Name
                  Attributes
                  Type GUID
                  Partition GUID
        1        0x00000022       0x003a9fdc       "test"
                  attrs:     0x0000000000000000
                  type:     ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
                  type:     data
                  guid:     36ec30ef-7ca4-cd48-97cd-ea9fb95185d0
      
      the max LBA when the size is indicated (0x003a9fdc) is lower than
      when u-boot compute the max allowed value with size=0 (0x003a9fde)
      
      in the code :
      
           /* partition ending lba */
           if ((i == parts - 1) && (partitions[i].size == 0))
      		/* extend the last partition to maximuim */
      		gpt_e[i].ending_lba = gpt_h->last_usable_lba;
           else
      		gpt_e[i].ending_lba = cpu_to_le64(offset - 1);
      
      so offset = gpt_h->last_usable_lba + 1 is acceptable !
      but the test (offset >= last_usable_lba) cause the error
      
      END
      
      Signed-off-by: Patrick Delaunay <patrick.delaunay73@gmail.com>disk: part_efi: fix check of the max partition size
      the last value acceptable value for offset is (last_usable_lba + 1)
      and not (last_usable_lba - 1)
      
      issue found with SDCARD partition commands on u-boot 2015.10
      but this part of code don't change
      
      1- I create GPT partion on all the card (start and size undefined)
      
        > gpt write mmc 0 name=test,start=0,size=0
        > part list mmc 0
      
      Partition Map for MMC device 0  --   Partition Type: EFI
      
      Part      Start LBA          End LBA                       Name
                  Attributes
                  Type GUID
                  Partition GUID
        1        0x00000022       0x003a9fde       "test"
                  attrs:     0x0000000000000000
                  type:     ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
                  type:     data
                  guid:     b710eb04-45b9-e94a-8d0b-21458d596f54
      
      => Start = 0x22*512 = 0x4400
      => Size = (0x003a9fde-0x22+1) * 512  = 0x753F7A00
      
      2- I try to recreate the same partition with the command gpt write
         and with start and size values (block size:512 bytes = 0x200)
      
        > gpt write mmc 0 name=test,start=0x4400,size=0x753F7A00
          Writing GPT: Partitions layout exceds disk size
      
        > gpt write mmc 0 name=test,start=0x4400,size=0x753F7800
          Writing GPT: Partitions layout exceds disk size
      
        > gpt write mmc 0 name=test,start=0x4400,size=0x753F7600
          Writing GPT: success!
      
        I check the partition created :
      
        > part list mmc 0
      
      Partition Map for MMC device 0  --   Partition Type: EFI
      
      Part      Start LBA          End LBA                       Name
                  Attributes
                  Type GUID
                  Partition GUID
        1        0x00000022       0x003a9fdc       "test"
                  attrs:     0x0000000000000000
                  type:     ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
                  type:     data
                  guid:     36ec30ef-7ca4-cd48-97cd-ea9fb95185d0
      
      => but the max LBA when the size is indicated (0x003a9fdc) is lower than
         when u-boot compute the max allowed value with size=0 (0x003a9fde)
      
      3- in the code, just after my patch, line 446
      
           /* partition ending lba */
           if ((i == parts - 1) && (partitions[i].size == 0))
      		/* extend the last partition to maximuim */
      		gpt_e[i].ending_lba = gpt_h->last_usable_lba;
           else
      		gpt_e[i].ending_lba = cpu_to_le64(offset - 1);
      
        so offset = gpt_h->last_usable_lba + 1 is acceptable !
        (it the value used when size is 0)
      
        but today the test (offset >= last_usable_lba) cause the error
        my patch only solve this issue
      
      END
      Signed-off-by: NPatrick Delaunay <patrick.delaunay73@gmail.com>
      a5653867
    • M
      cmd: disk: Fix unused variable warning · 04681cb3
      Marek Vasut 提交于
      If serial support is not compiled into U-Boot, which may be the case
      for some SPL builds, the following warning will be generated in disk.c:
      
      cmd/disk.c: In function 'common_diskboot':
      cmd/disk.c:16:6: warning: variable 'dev' set but not used [-Wunused-but-set-variable]
        int dev, part;
            ^
      The warning is a result of printf() calls being optimized away, and
      thus the whole dev variable becomes indeed unused. Mark the variable
      as __maybe_unused .
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Tom Rini <trini@konsulko.com>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      Reviewed-by: NTom Rini <trini@konsulko.com>
      04681cb3
    • M
      SPL: FIT: Align loading address for header · 90a74176
      Michal Simek 提交于
      If bl_len is not aligned it can caused a problem because another code
      expects that start is aligned.
      Signed-off-by: NMichal Simek <michal.simek@xilinx.com>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      90a74176
    • M
      dm: gpio: pca953x: Support PCA953X with 40 GPIOs · 71db3270
      mario.six@gdsys.cc 提交于
      A DM driver for PCA953x was recently introduced by Peng Fan, which lacked
      support for the 40 GPIO versions.
      
      This patch adds support for these chips.
      Signed-off-by: NMario Six <mario.six@gdsys.cc>
      Reviewed-by: NPeng Fan  <van.freenix@gmail.com>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      71db3270
    • A
      tools/env: compute size of usable area only once · f71cee4b
      Andreas Fenkart 提交于
      for double buffering to work, redundant buffers must have equal size
      Signed-off-by: NAndreas Fenkart <andreas.fenkart@digitalstrom.com>
      f71cee4b
    • A
    • A
      tools/env: remove 'extern' from function prototype in fw_env.h · c3a23e8b
      Andreas Fenkart 提交于
      checkpatch complains about in succeding patch. Prefer to fix all
      declarations in a dedicated patch.
      Signed-off-by: NAndreas Fenkart <andreas.fenkart@digitalstrom.com>
      c3a23e8b
    • A
  2. 26 5月, 2016 14 次提交
  3. 25 5月, 2016 16 次提交