Skip to content
Snippets Groups Projects
  1. May 08, 2019
    • Jagan Teki's avatar
      test/dm: clk: Add clk_get_by_index[_nodev] test · d7a672e3
      Jagan Teki authored
      
      Add sample dm clk test for clk_get_by_index and
      clk_get_by_index_nodev functionality code.
      
      Cc: Stephen Warren <swarren@nvidia.com>
      Signed-off-by: default avatarJagan Teki <jagan@amarulasolutions.com>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      d7a672e3
    • Jagan Teki's avatar
      clk: Use clk_get_by_index_tail() · dcb63fcd
      Jagan Teki authored
      
      clk_get_by_index_tail() now handle common clk get by index
      code so use it from clk_get_by_indexed_prop().
      
      Cc: Stephen Warren <swarren@nvidia.com>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Signed-off-by: default avatarJagan Teki <jagan@amarulasolutions.com>
      dcb63fcd
    • Jagan Teki's avatar
      clk: Get the CLK by index without device · 75f98314
      Jagan Teki authored
      
      Getting a CLK by index with device is not straight forward
      for some use-cases like handling clock operations for child
      node in parent driver. So we need to process the child node
      in parent probe via ofnode and process CLK operation for child
      without udevice but with ofnode.
      
      So add clk_get_by_index_nodev() and move the common code
      in clk_get_by_index_tail() to use for clk_get_by_index()
      
      Cc: Stephen Warren <swarren@nvidia.com>
      Signed-off-by: default avatarJagan Teki <jagan@amarulasolutions.com>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      75f98314
    • Jagan Teki's avatar
      serial: sifive: Change include order · b24f9057
      Jagan Teki authored
      
      Like clk_get_by_index, there is requirement for
      clk_get_by_index_nodev. In this case to make common
      code functionalities for dev and nodev, clk_get_by_index
      is trying to get the index of clock by passing ofnode
      instead of actual dev like current gpio uclass does.
      
      In these scenarios with current order of include files
      the serial_sifive driver is unable to find CONFIG_ENV_SIZE.
      
      In file included from arch/riscv/include/asm/u-boot.h:23:0,
                       from include/dm/of.h:10,
                       from include/dm/ofnode.h:12,
                       from include/clk.h:11,
                       from drivers/serial/serial_sifive.c:6:
      include/environment.h:145:19: error: 'CONFIG_ENV_SIZE'
      undeclared here (not in a function); did you mean 'CONFIG_CMD_XIMG'?
       #define ENV_SIZE (CONFIG_ENV_SIZE - ENV_HEADER_SIZE)
      
      So, fix consists of changing the order of include files
      in serial_sifive.c to include first common.h file.
      
      Cc: Anup Patel <Anup.Patel@wdc.com>
      Cc: Rick Chen <rick@andestech.com>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Reviewed-by: Bin Meng's avatarBin Meng <bmeng.cn@gmail.com>
      Signed-off-by: default avatarJagan Teki <jagan@amarulasolutions.com>
      b24f9057
    • Jagan Teki's avatar
      clk: sifive: fu540-prci: Change include order · db2f6961
      Jagan Teki authored
      
      Like clk_get_by_index, there is requirement for
      clk_get_by_index_nodev. In this case to make common
      code functionalities for dev and nodev, clk_get_by_index
      is trying to get the index of clock by passing ofnode
      instead of actual dev like current gpio uclass does.
      
      In these scenarios with current order of include files
      the fu540-prci driver is unable to find CONFIG_ENV_SIZE.
      
      In file included from arch/riscv/include/asm/u-boot.h:23:0,
                       from include/dm/of.h:10,
                       from include/dm/ofnode.h:12,
                       from include/clk.h:11,
                       from include/clk-uclass.h:13,
                       from drivers/clk/sifive/fu540-prci.c:32:
      include/environment.h:145:19: error: 'CONFIG_ENV_SIZE'
      undeclared here (not in a function); did you mean 'CONFIG_CMD_XIMG'?
       #define ENV_SIZE (CONFIG_ENV_SIZE - ENV_HEADER_SIZE)
      
      So, fix consists of changing the order of include files
      in fu540-prci.c to include first common.h file.
      
      Cc: Anup Patel <Anup.Patel@wdc.com>
      Cc: Rick Chen <rick@andestech.com>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Reviewed-by: Bin Meng's avatarBin Meng <bmeng.cn@gmail.com>
      Signed-off-by: default avatarJagan Teki <jagan@amarulasolutions.com>
      db2f6961
    • Jagan Teki's avatar
      spi: atcspi200: Change include order · 0cbee854
      Jagan Teki authored
      
      Like clk_get_by_index, there is requirement for
      clk_get_by_index_nodev. In this case to make common
      code functionalities for dev and nodev, clk_get_by_index
      is trying to get the index of clock by passing ofnode
      instead of actual dev like current gpio uclass does.
      
      In these scenarios with current order of include files
      the atcspi200_spi driver is unable to find CONFIG_ENV_SIZE.
      
      In file included from arch/nds32/include/asm/u-boot.h:24,
                       from include/dm/of.h:10,
                       from include/dm/ofnode.h:12,
                       from include/clk.h:11,
                       from drivers/spi/atcspi200_spi.c:9:
      include/environment.h:145:19: error: 'CONFIG_ENV_SIZE'
      undeclared here (not in a function); did you mean 'CONFIG_CMD_XIMG'?
       #define ENV_SIZE (CONFIG_ENV_SIZE - ENV_HEADER_SIZE)
      
      So, fix consists of changing the order of include files
      in atcspi200_spi.c to include first common.h file.
      
      Reviewed-by: Bin Meng's avatarBin Meng <bmeng.cn@gmail.com>
      Signed-off-by: default avatarJagan Teki <jagan@amarulasolutions.com>
      0cbee854
  2. Apr 18, 2019
  3. Apr 17, 2019
  4. Apr 16, 2019
Loading