Re: [PATCH V2 4/8] soc: imx: add icc paths for i.MX8MP media blk ctrl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi "Peng,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on robh/for-next]
[also build test ERROR on shawnguo/for-next linus/master v5.19-rc2 next-20220616]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/intel-lab-lkp/linux/commits/Peng-Fan-OSS/Add-interconnect-for-i-MX8MP-blk-ctrl/20220616-153932
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arc-randconfig-r043-20220616 (https://download.01.org/0day-ci/archive/20220616/202206161757.tudlinMv-lkp@xxxxxxxxx/config)
compiler: arc-elf-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/118c632adf7409c5a51e85fa0c61286665116b10
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Peng-Fan-OSS/Add-interconnect-for-i-MX8MP-blk-ctrl/20220616-153932
        git checkout 118c632adf7409c5a51e85fa0c61286665116b10
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash drivers/soc/imx/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   drivers/soc/imx/imx8m-blk-ctrl.c: In function 'imx8m_blk_ctrl_probe':
>> drivers/soc/imx/imx8m-blk-ctrl.c:247:23: error: implicit declaration of function 'devm_of_icc_bulk_get'; did you mean 'of_icc_bulk_get'? [-Werror=implicit-function-declaration]
     247 |                 ret = devm_of_icc_bulk_get(dev, data->num_paths, domain->paths);
         |                       ^~~~~~~~~~~~~~~~~~~~
         |                       of_icc_bulk_get
   cc1: some warnings being treated as errors


vim +247 drivers/soc/imx/imx8m-blk-ctrl.c

   178	
   179	static int imx8m_blk_ctrl_probe(struct platform_device *pdev)
   180	{
   181		const struct imx8m_blk_ctrl_data *bc_data;
   182		struct device *dev = &pdev->dev;
   183		struct imx8m_blk_ctrl *bc;
   184		void __iomem *base;
   185		int i, ret;
   186	
   187		struct regmap_config regmap_config = {
   188			.reg_bits	= 32,
   189			.val_bits	= 32,
   190			.reg_stride	= 4,
   191		};
   192	
   193		bc = devm_kzalloc(dev, sizeof(*bc), GFP_KERNEL);
   194		if (!bc)
   195			return -ENOMEM;
   196	
   197		bc->dev = dev;
   198	
   199		bc_data = of_device_get_match_data(dev);
   200	
   201		base = devm_platform_ioremap_resource(pdev, 0);
   202		if (IS_ERR(base))
   203			return PTR_ERR(base);
   204	
   205		regmap_config.max_register = bc_data->max_reg;
   206		bc->regmap = devm_regmap_init_mmio(dev, base, &regmap_config);
   207		if (IS_ERR(bc->regmap))
   208			return dev_err_probe(dev, PTR_ERR(bc->regmap),
   209					     "failed to init regmap\n");
   210	
   211		bc->domains = devm_kcalloc(dev, bc_data->num_domains,
   212					   sizeof(struct imx8m_blk_ctrl_domain),
   213					   GFP_KERNEL);
   214		if (!bc->domains)
   215			return -ENOMEM;
   216	
   217		bc->onecell_data.num_domains = bc_data->num_domains;
   218		bc->onecell_data.xlate = imx8m_blk_ctrl_xlate;
   219		bc->onecell_data.domains =
   220			devm_kcalloc(dev, bc_data->num_domains,
   221				     sizeof(struct generic_pm_domain *), GFP_KERNEL);
   222		if (!bc->onecell_data.domains)
   223			return -ENOMEM;
   224	
   225		bc->bus_power_dev = genpd_dev_pm_attach_by_name(dev, "bus");
   226		if (IS_ERR(bc->bus_power_dev))
   227			return dev_err_probe(dev, PTR_ERR(bc->bus_power_dev),
   228					     "failed to attach power domain\n");
   229	
   230		for (i = 0; i < bc_data->num_domains; i++) {
   231			const struct imx8m_blk_ctrl_domain_data *data = &bc_data->domains[i];
   232			struct imx8m_blk_ctrl_domain *domain = &bc->domains[i];
   233			int j;
   234	
   235			domain->data = data;
   236	
   237			for (j = 0; j < data->num_clks; j++)
   238				domain->clks[j].id = data->clk_names[j];
   239	
   240			for (j = 0; j < data->num_paths; j++) {
   241				domain->paths[j].name = data->path_names[j];
   242				/* Fake value for now, just let ICC could configure NoC mode/priority */
   243				domain->paths[j].avg_bw = 1;
   244				domain->paths[j].peak_bw = 1;
   245			}
   246	
 > 247			ret = devm_of_icc_bulk_get(dev, data->num_paths, domain->paths);
   248			if (ret) {
   249				dev_err_probe(dev, ret, "failed to get noc entries\n");
   250				goto cleanup_pds;
   251			}
   252	
   253			ret = devm_clk_bulk_get(dev, data->num_clks, domain->clks);
   254			if (ret) {
   255				dev_err_probe(dev, ret, "failed to get clock\n");
   256				goto cleanup_pds;
   257			}
   258	
   259			domain->power_dev =
   260				dev_pm_domain_attach_by_name(dev, data->gpc_name);
   261			if (IS_ERR(domain->power_dev)) {
   262				dev_err_probe(dev, PTR_ERR(domain->power_dev),
   263					      "failed to attach power domain\n");
   264				ret = PTR_ERR(domain->power_dev);
   265				goto cleanup_pds;
   266			}
   267			dev_set_name(domain->power_dev, "%s", data->name);
   268	
   269			domain->genpd.name = data->name;
   270			domain->genpd.power_on = imx8m_blk_ctrl_power_on;
   271			domain->genpd.power_off = imx8m_blk_ctrl_power_off;
   272			domain->bc = bc;
   273	
   274			ret = pm_genpd_init(&domain->genpd, NULL, true);
   275			if (ret) {
   276				dev_err_probe(dev, ret, "failed to init power domain\n");
   277				dev_pm_domain_detach(domain->power_dev, true);
   278				goto cleanup_pds;
   279			}
   280	
   281			/*
   282			 * We use runtime PM to trigger power on/off of the upstream GPC
   283			 * domain, as a strict hierarchical parent/child power domain
   284			 * setup doesn't allow us to meet the sequencing requirements.
   285			 * This means we have nested locking of genpd locks, without the
   286			 * nesting being visible at the genpd level, so we need a
   287			 * separate lock class to make lockdep aware of the fact that
   288			 * this are separate domain locks that can be nested without a
   289			 * self-deadlock.
   290			 */
   291			lockdep_set_class(&domain->genpd.mlock,
   292					  &blk_ctrl_genpd_lock_class);
   293	
   294			bc->onecell_data.domains[i] = &domain->genpd;
   295		}
   296	
   297		ret = of_genpd_add_provider_onecell(dev->of_node, &bc->onecell_data);
   298		if (ret) {
   299			dev_err_probe(dev, ret, "failed to add power domain provider\n");
   300			goto cleanup_pds;
   301		}
   302	
   303		bc->power_nb.notifier_call = bc_data->power_notifier_fn;
   304		ret = dev_pm_genpd_add_notifier(bc->bus_power_dev, &bc->power_nb);
   305		if (ret) {
   306			dev_err_probe(dev, ret, "failed to add power notifier\n");
   307			goto cleanup_provider;
   308		}
   309	
   310		dev_set_drvdata(dev, bc);
   311	
   312		return 0;
   313	
   314	cleanup_provider:
   315		of_genpd_del_provider(dev->of_node);
   316	cleanup_pds:
   317		for (i--; i >= 0; i--) {
   318			pm_genpd_remove(&bc->domains[i].genpd);
   319			dev_pm_domain_detach(bc->domains[i].power_dev, true);
   320		}
   321	
   322		dev_pm_domain_detach(bc->bus_power_dev, true);
   323	
   324		return ret;
   325	}
   326	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux