issue: could not get #nvmem-cell-cells

Peng Fan peng.fan at nxp.com
Tue Jan 10 00:14:37 PST 2023


> Subject: Re: issue: could not get #nvmem-cell-cells
> 
> Hi Peng,
> 
> Am 2023-01-10 09:07, schrieb Peng Fan:
> > I see you have added nvmem-cell-cells support, but with linux-next, I
> > see error on i.MX8MP-EVK:
> > [    0.027518] OF: /soc at 0: could not get #nvmem-cell-cells for
> > /soc at 0/bus at 30000000/efuse at 30350000/unique-id at 8
> > [    0.027868] OF: /soc at 0/bus at 30000000/tmu at 30260000: could not get
> > #nvmem-cell-cells for
> /soc at 0/bus at 30000000/efuse at 30350000/calib at 264
> > [    0.030338] OF: /soc at 0/bus at 30800000/ethernet at 30be0000: could not
> > get #nvmem-cell-cells for
> > /soc at 0/bus at 30000000/efuse at 30350000/mac-address at 90
> > [    0.030511] OF: /soc at 0/bus at 30800000/ethernet at 30bf0000: could not
> > get #nvmem-cell-cells for
> > /soc at 0/bus at 30000000/efuse at 30350000/mac-address at 96
> >
> > Do you have ideas?
> 
> Do you have [1] applied? It is already in -next but just to be sure.
[Peng Fan] 

I think yes.

1329 struct nvmem_cell *of_nvmem_cell_get(struct device_node *np, const char *id)
1330 {
1331         struct device_node *cell_np, *nvmem_np;
1332         struct nvmem_device *nvmem;
1333         struct nvmem_cell_entry *cell_entry;
1334         struct nvmem_cell *cell;
1335         struct of_phandle_args cell_spec;
1336         int index = 0;
1337         int cell_index = 0;
1338         int ret;
1339
1340         /* if cell name exists, find index to the name */
1341         if (id)
1342                 index = of_property_match_string(np, "nvmem-cell-names", id);
1343
1344         ret = of_parse_phandle_with_optional_args(np, "nvmem-cells",
1345                                                   "#nvmem-cell-cells",
1346                                                   index, &cell_spec);
1347         if (ret)
1348                 return ERR_PTR(-ENOENT);
1349
1350         if (cell_spec.args_count > 1)
1351                 return ERR_PTR(-EINVAL);

Thanks,
Peng.
> 
> -michael
> 
> [1]
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.
> kernel.org%2Flkml%2F20230105135931.2743351-1-
> michael%40walle.cc%2F&data=05%7C01%7Cpeng.fan%40nxp.com%7Cfa0ed
> 6dbfb3b41c2de7908daf2e269e9%7C686ea1d3bc2b4c6fa92cd99c5c301635%
> 7C0%7C0%7C638089351499907297%7CUnknown%7CTWFpbGZsb3d8eyJWIj
> oiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C
> 3000%7C%7C%7C&sdata=9b5Q0lqQyj%2BBcrk%2BlYiQYYm3zPJeLxDgIKs63zf
> FNgI%3D&reserved=0



More information about the linux-arm-kernel mailing list