1. 05 Oct, 2015 1 commit
  2. 09 Sep, 2015 1 commit
  3. 07 Sep, 2015 1 commit
  4. 18 Aug, 2015 1 commit
    • Stephen Warren's avatar
      fs-test.sh: minor fixes · 04812605
      Stephen Warren authored
      - Re-direct stderr into the log files, so any errors U-Boot emits are
        visible in the logs. This is relevant if the "reset" shell command
        attempts to report that it's not supported on the sandbox board.
      - Fix test_fs_nonfs() to name the files it created differently for each
        invocation. Otherwise, the logs from different tests overwrite
        each-other.
      Signed-off-by: default avatarStephen Warren <swarren@wwwdotorg.org>
      Acked-by: default avatarSuriyan Ramasami <suriyan.r@gmail.com>
      04812605
  5. 06 Aug, 2015 1 commit
    • Masahiro Yamada's avatar
      devres: add debug command to dump device resources · 40b6f2d0
      Masahiro Yamada authored
      This new command can dump all device resources associated to
      each device.  The fields in every line shows:
        - The address of the resource
        - The size of the resource
        - The name of the release function
        - The stage in which the resource has been acquired (BIND/PROBE)
      
      Currently, there is no driver using devres, but if such drivers are
      implemented, the output of this command should look like this:
      
      => dm devres
      - root_driver
      - soc
      - extbus
      - serial@54006800
          bfb541e8 (8 byte) devm_kmalloc_release  BIND
          bfb54440 (4 byte) devm_kmalloc_release  PROBE
          bfb54460 (4 byte) devm_kmalloc_release  PROBE
      - serial@54006900
          bfb54270 (8 byte) devm_kmalloc_release  BIND
      - gpio@55000000
      - i2c@58780000
          bfb5bce8 (12 byte) devm_kmalloc_release  PROBE
          bfb5bd10 (4 byte) devm_kmalloc_release  PROBE
      - eeprom
          bfb54418 (12 byte) devm_kmalloc_release  BIND
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      40b6f2d0
  6. 21 Jul, 2015 10 commits
  7. 04 Jun, 2015 1 commit
    • Simon Glass's avatar
      dm: pci: Allow PCI bus numbering aliases · 2bb02e4f
      Simon Glass authored
      Commit 9cc36a2b 'dm: core: Add a flag to control sequence numbering' changed
      the default uclass behaviour to not support bus numbering. This is incorrect
      for PCI and that commit should have enabled the flag for PCI.
      
      Enable it so that PCI buses can be found and the 'pci' command works again.
      Also add a test for this.
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      2bb02e4f
  8. 28 May, 2015 1 commit
  9. 21 May, 2015 12 commits
  10. 15 May, 2015 2 commits
    • Przemyslaw Marczak's avatar
      test: dm: test.dts - move to sandbox dts directory · f64000c3
      Przemyslaw Marczak authored
      The file test.dts from driver model test directory,
      was compiled by call dtc in script: test/dm/test-dm.sh.
      
      This doesn't allow for including of dtsi files and using
      of C preprocessor routines in this dts file.
      
      Since the mentioned script builds U-Boot before tests,
      then moving the test.dts file into sandbox dts directory
      is reasonable.
      Signed-off-by: default avatarPrzemyslaw Marczak <p.marczak@samsung.com>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      Tested on sandbox:
      Tested-by: default avatarSimon Glass <sjg@chromium.org>
      f64000c3
    • Przemyslaw Marczak's avatar
      test: dm: add sandbox PMIC framework tests · e8f339e0
      Przemyslaw Marczak authored
      This change adds new file to sandbox driver model test environment.
      The file is: test/dm/power.c, and it includes tests for PMIC framework,
      which includes PMIC uclass and REGULATOR uclass.
      
      All tests are based od Sandbox PMIC emulated device. Some test constants for
      this device are defined in the header: include/power/sandbox_pmic.h
      
      PMIC tests includes:
      - pmic get - tests, that pmic_get() returns the requested device
      - pmic I/O - tests I/O by writing and reading some values to PMIC's registers
                   and then compares, that the write/read values are equal.
      
      The regulator tests includes:
      - Regulator get by devname/platname
      - Voltage set/get
      - Current set/get
      - Enable set/get
      - Mode set/get
      - Autoset
      - List autoset
      
      For the regulator 'get' test, the returned device pointers are compared,
      and their names are also compared to the requested one.
      Every other test, first sets the given attribute and next try to get it.
      The test pass, when the set/get values are equal.
      Signed-off-by: default avatarPrzemyslaw Marczak <p.marczak@samsung.com>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      Tested on sandbox:
      Tested-by: default avatarSimon Glass <sjg@chromium.org>
      e8f339e0
  11. 06 May, 2015 5 commits
  12. 22 Apr, 2015 4 commits
    • Simon Glass's avatar
      dm: test: Don't clear global_data in dm_test_uclass_before_ready() · f9fd4558
      Simon Glass authored
      We must not clear global_data even in tests, since the ram_buffer (which
      is used by malloc()) will also be lost, and subsequent tests will fail.
      
      Zero only the global_data fields that are required for the test to function.
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarJoe Hershberger <joe.hershberger@ni.com>
      Tested-by: default avatarJoe Hershberger <joe.hershberger@ni.com>
      f9fd4558
    • Przemyslaw Marczak's avatar
      dm: test: Add tests for get/find uclass's device by name · 6e0c4880
      Przemyslaw Marczak authored
      This commit introduces simple tests for functions:
      - uclass_find_device_by_name()
      - uclass_get_device_by_name()
      
      Tests added by this commit:
      - Test: dm_test_uclass_devices_find_by_name: for uclass id: UCLASS_TEST_FDT
       * get uclass's devices by uclass_find_first/next_device() each as 'testdev',
       * for each returned device, call: uclass_find_device_by_name(),
         with previously returned device's name as an argument ('testdev->name').
       * for the found device ('founddev') check if:
         * founddev != NULL
         * testdev == founddev
         * testdev->name == founddev->name (by strcmp)
      
      - Test: dm_test_uclass_devices_get_by_name: for uclass id: UCLASS_TEST_FDT
       * get uclass's devices by uclass_get_first/next_device() each as 'testdev',
       * for each returned device, call: uclass_get_device_by_name(),
         with previously returned device's name as an argument ('testdev->name').
       * for the found device ('founddev') check if:
         * founddev != NULL
         * founddev is active
         * testdev == founddev
         * testdev->name == founddev->name (by strcmp)
      Signed-off-by: default avatarPrzemyslaw Marczak <p.marczak@samsung.com>
      Cc: Simon Glass <sjg@chromium.org>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      6e0c4880
    • Przemyslaw Marczak's avatar
      dm: test: Add tests for get/find uclass devices · 9e85f13d
      Przemyslaw Marczak authored
      This commit introduces simple tests for functions:
      - uclass_find_first_device()
      - uclass_find_next_device()
      - uclass_first_device()
      - uclass_next_device()
      
      Tests added by this commit:
      - Test: dm_test_uclass_devices_find:
        * call uclass_find_first_device(), then check if: (dev != NULL), (ret == 0)
        * for the rest devices, call uclass_find_next_device() and do the same check
      
      - Test: dm_test_uclass_devices_get:
        * call uclass_first_device(), then check if:
          -- (dev != NULL), (ret == 0), device_active()
        * for the rest devices, call uclass_next_device() and do the same check
      Signed-off-by: default avatarPrzemyslaw Marczak <p.marczak@samsung.com>
      Cc: Simon Glass <sjg@chromium.org>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      9e85f13d
    • Przemyslaw Marczak's avatar
      dm: test: Add tests for device's uclass platform data · 754e71e8
      Przemyslaw Marczak authored
      This test introduces new test structure type:dm_test_perdev_uc_pdata.
      The structure consists of three int values only. For the test purposes,
      three pattern values are defined by enum, starting with TEST_UC_PDATA_INTVAL1.
      
      This commit adds two test cases for uclass platform data:
      - Test: dm_test_autobind_uclass_pdata_alloc - this tests if:
        * uclass driver sets: .per_device_platdata_auto_alloc_size field
        * the devices's: dev->uclass_platdata is non-NULL
      
      - Test: dm_test_autobind_uclass_pdata_valid - this tests:
        * if the devices's: dev->uclass_platdata is non-NULL
        * the structure of type 'dm_test_perdev_uc_pdata' allocated at address
          pointed by dev->uclass_platdata. Each structure field, should be equal
          to proper pattern data, starting from .intval1 == TEST_UC_PDATA_INTVAL1.
      Signed-off-by: default avatarPrzemyslaw Marczak <p.marczak@samsung.com>
      Cc: Simon Glass <sjg@chromium.org>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      754e71e8