* issue: could not get #nvmem-cell-cells @ 2023-01-10 8:07 Peng Fan 2023-01-10 8:12 ` Michael Walle 2023-01-10 14:45 ` Michael Walle 0 siblings, 2 replies; 7+ messages in thread From: Peng Fan @ 2023-01-10 8:07 UTC (permalink / raw) To: michael@walle.cc Cc: Aisheng Dong, linux-arm-kernel@lists.infradead.org, Srinivas Kandagatla Hi Michael, I see you have added nvmem-cell-cells support, but with linux-next, I see error on i.MX8MP-EVK: [ 0.027518] OF: /soc@0: could not get #nvmem-cell-cells for /soc@0/bus@30000000/efuse@30350000/unique-id@8 [ 0.027868] OF: /soc@0/bus@30000000/tmu@30260000: could not get #nvmem-cell-cells for /soc@0/bus@30000000/efuse@30350000/calib@264 [ 0.030338] OF: /soc@0/bus@30800000/ethernet@30be0000: could not get #nvmem-cell-cells for /soc@0/bus@30000000/efuse@30350000/mac-address@90 [ 0.030511] OF: /soc@0/bus@30800000/ethernet@30bf0000: could not get #nvmem-cell-cells for /soc@0/bus@30000000/efuse@30350000/mac-address@96 Do you have ideas? Thanks, Peng. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: issue: could not get #nvmem-cell-cells 2023-01-10 8:07 issue: could not get #nvmem-cell-cells Peng Fan @ 2023-01-10 8:12 ` Michael Walle 2023-01-10 8:14 ` Peng Fan 2023-01-10 10:32 ` Alexander Stein 2023-01-10 14:45 ` Michael Walle 1 sibling, 2 replies; 7+ messages in thread From: Michael Walle @ 2023-01-10 8:12 UTC (permalink / raw) To: Peng Fan; +Cc: Aisheng Dong, linux-arm-kernel, Srinivas Kandagatla 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@0: could not get #nvmem-cell-cells for > /soc@0/bus@30000000/efuse@30350000/unique-id@8 > [ 0.027868] OF: /soc@0/bus@30000000/tmu@30260000: could not get > #nvmem-cell-cells for /soc@0/bus@30000000/efuse@30350000/calib@264 > [ 0.030338] OF: /soc@0/bus@30800000/ethernet@30be0000: could not > get #nvmem-cell-cells for > /soc@0/bus@30000000/efuse@30350000/mac-address@90 > [ 0.030511] OF: /soc@0/bus@30800000/ethernet@30bf0000: could not > get #nvmem-cell-cells for > /soc@0/bus@30000000/efuse@30350000/mac-address@96 > > Do you have ideas? Do you have [1] applied? It is already in -next but just to be sure. -michael [1] https://lore.kernel.org/lkml/20230105135931.2743351-1-michael@walle.cc/ _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: issue: could not get #nvmem-cell-cells 2023-01-10 8:12 ` Michael Walle @ 2023-01-10 8:14 ` Peng Fan 2023-01-10 10:32 ` Alexander Stein 1 sibling, 0 replies; 7+ messages in thread From: Peng Fan @ 2023-01-10 8:14 UTC (permalink / raw) To: Michael Walle Cc: Aisheng Dong, linux-arm-kernel@lists.infradead.org, Srinivas Kandagatla > 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@0: could not get #nvmem-cell-cells for > > /soc@0/bus@30000000/efuse@30350000/unique-id@8 > > [ 0.027868] OF: /soc@0/bus@30000000/tmu@30260000: could not get > > #nvmem-cell-cells for > /soc@0/bus@30000000/efuse@30350000/calib@264 > > [ 0.030338] OF: /soc@0/bus@30800000/ethernet@30be0000: could not > > get #nvmem-cell-cells for > > /soc@0/bus@30000000/efuse@30350000/mac-address@90 > > [ 0.030511] OF: /soc@0/bus@30800000/ethernet@30bf0000: could not > > get #nvmem-cell-cells for > > /soc@0/bus@30000000/efuse@30350000/mac-address@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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: issue: could not get #nvmem-cell-cells 2023-01-10 8:12 ` Michael Walle 2023-01-10 8:14 ` Peng Fan @ 2023-01-10 10:32 ` Alexander Stein 2023-01-10 10:47 ` Michael Walle 1 sibling, 1 reply; 7+ messages in thread From: Alexander Stein @ 2023-01-10 10:32 UTC (permalink / raw) To: linux-arm-kernel, Michael Walle Cc: Peng Fan, Aisheng Dong, linux-arm-kernel, Srinivas Kandagatla Hi Michael, Am Dienstag, 10. Januar 2023, 09:12:26 CET schrieb Michael Walle: > 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@0: could not get #nvmem-cell-cells for > > /soc@0/bus@30000000/efuse@30350000/unique-id@8 > > [ 0.027868] OF: /soc@0/bus@30000000/tmu@30260000: could not get > > #nvmem-cell-cells for /soc@0/bus@30000000/efuse@30350000/calib@264 > > [ 0.030338] OF: /soc@0/bus@30800000/ethernet@30be0000: could not > > get #nvmem-cell-cells for > > /soc@0/bus@30000000/efuse@30350000/mac-address@90 > > [ 0.030511] OF: /soc@0/bus@30800000/ethernet@30bf0000: could not > > get #nvmem-cell-cells for > > /soc@0/bus@30000000/efuse@30350000/mac-address@96 > > > > Do you have ideas? > > Do you have [1] applied? It is already in -next but just to be sure. This patch does fix requesting a non-existing io_impedance_ctrl nvmem cell. But these errors are about missing '#nvmem-cell-cells' properties. IIRC there should be another patch assuming '#nvmem-cell-cells = <0>' by default. Best regards, Alexander > -michael > > [1] > https://lore.kernel.org/lkml/20230105135931.2743351-1-michael@walle.cc/ > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: issue: could not get #nvmem-cell-cells 2023-01-10 10:32 ` Alexander Stein @ 2023-01-10 10:47 ` Michael Walle 0 siblings, 0 replies; 7+ messages in thread From: Michael Walle @ 2023-01-10 10:47 UTC (permalink / raw) To: Alexander Stein, Rob Herring, Krzysztof Kozlowski Cc: linux-arm-kernel, Peng Fan, Aisheng Dong, Srinivas Kandagatla [+ Rob and Krzysztof] Am 2023-01-10 11:32, schrieb Alexander Stein: > Hi Michael, > > Am Dienstag, 10. Januar 2023, 09:12:26 CET schrieb Michael Walle: >> 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@0: could not get #nvmem-cell-cells for >> > /soc@0/bus@30000000/efuse@30350000/unique-id@8 >> > [ 0.027868] OF: /soc@0/bus@30000000/tmu@30260000: could not get >> > #nvmem-cell-cells for /soc@0/bus@30000000/efuse@30350000/calib@264 >> > [ 0.030338] OF: /soc@0/bus@30800000/ethernet@30be0000: could not >> > get #nvmem-cell-cells for >> > /soc@0/bus@30000000/efuse@30350000/mac-address@90 >> > [ 0.030511] OF: /soc@0/bus@30800000/ethernet@30bf0000: could not >> > get #nvmem-cell-cells for >> > /soc@0/bus@30000000/efuse@30350000/mac-address@96 >> > >> > Do you have ideas? >> >> Do you have [1] applied? It is already in -next but just to be sure. > > This patch does fix requesting a non-existing io_impedance_ctrl nvmem > cell. > But these errors are about missing '#nvmem-cell-cells' properties. > IIRC there should be another patch assuming '#nvmem-cell-cells = <0>' > by > default. Yeah, I'm just looking at that. As I said, this should have been addressed with my commit 7850f3f4da30 (of: base: add of_parse_phandle_with_optional_args()). But it seems to be broken/not working as intended :/ It seems that we have to pass the information wether the cells_name is optional to of_phandle_iterator_init(). -michael _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: issue: could not get #nvmem-cell-cells 2023-01-10 8:07 issue: could not get #nvmem-cell-cells Peng Fan 2023-01-10 8:12 ` Michael Walle @ 2023-01-10 14:45 ` Michael Walle 2023-01-10 15:52 ` Robert Marko 1 sibling, 1 reply; 7+ messages in thread From: Michael Walle @ 2023-01-10 14:45 UTC (permalink / raw) To: Peng Fan, Alexander Stein Cc: Aisheng Dong, linux-arm-kernel, Srinivas Kandagatla, aisheng.dong, linux-arm-kernel, srinivas.kandagatla, Krzysztof Kozlowski, Rob Herring 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@0: could not get #nvmem-cell-cells for > /soc@0/bus@30000000/efuse@30350000/unique-id@8 > [ 0.027868] OF: /soc@0/bus@30000000/tmu@30260000: could not get > #nvmem-cell-cells for /soc@0/bus@30000000/efuse@30350000/calib@264 > [ 0.030338] OF: /soc@0/bus@30800000/ethernet@30be0000: could not > get #nvmem-cell-cells for > /soc@0/bus@30000000/efuse@30350000/mac-address@90 > [ 0.030511] OF: /soc@0/bus@30800000/ethernet@30bf0000: could not > get #nvmem-cell-cells for > /soc@0/bus@30000000/efuse@30350000/mac-address@96 > > Do you have ideas? Could you try the following patch: ---snip--- commit 83f1bd351a2194844599ffc08050f5bc61a06086 (HEAD -> master) Author: Michael Walle <michael@walle.cc> Date: Tue Jan 10 15:16:48 2023 +0100 of: property: fix #nvmem-cell-cells parsing Commit 67b8497f005 ("of: property: make #.*-cells optional for simple props") claims to make the cells-name property optional for simple properties, but changed the code for the wrong property, i.e. for DEFINE_SUFFIX_PROP(). Fix that. Fixes: 67b8497f005 ("of: property: make #.*-cells optional for simple props") Reported-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Michael Walle <michael@walle.cc> diff --git a/drivers/of/property.c b/drivers/of/property.c index 8d9ba20a8f90..95b838185b2f 100644 --- a/drivers/of/property.c +++ b/drivers/of/property.c @@ -1202,8 +1202,8 @@ static struct device_node *parse_prop_cells(struct device_node *np, if (strcmp(prop_name, list_name)) return NULL; - if (of_parse_phandle_with_args(np, list_name, cells_name, index, - &sup_args)) + if (__of_parse_phandle_with_args(np, list_name, cells_name, 0, index, + &sup_args)) return NULL; return sup_args.np; @@ -1256,8 +1256,8 @@ static struct device_node *parse_suffix_prop_cells(struct device_node *np, if (strcmp_suffix(prop_name, suffix)) return NULL; - if (__of_parse_phandle_with_args(np, prop_name, cells_name, 0, index, - &sup_args)) + if (of_parse_phandle_with_args(np, prop_name, cells_name, index, + &sup_args)) return NULL; return sup_args.np; ---snip--- - _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: issue: could not get #nvmem-cell-cells 2023-01-10 14:45 ` Michael Walle @ 2023-01-10 15:52 ` Robert Marko 0 siblings, 0 replies; 7+ messages in thread From: Robert Marko @ 2023-01-10 15:52 UTC (permalink / raw) To: Michael Walle, Peng Fan, Alexander Stein Cc: Aisheng Dong, linux-arm-kernel, Srinivas Kandagatla, Krzysztof Kozlowski, Rob Herring On 10. 01. 2023. 15:45, Michael Walle wrote: > 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@0: could not get #nvmem-cell-cells for >> /soc@0/bus@30000000/efuse@30350000/unique-id@8 >> [ 0.027868] OF: /soc@0/bus@30000000/tmu@30260000: could not get >> #nvmem-cell-cells for /soc@0/bus@30000000/efuse@30350000/calib@264 >> [ 0.030338] OF: /soc@0/bus@30800000/ethernet@30be0000: could not >> get #nvmem-cell-cells for >> /soc@0/bus@30000000/efuse@30350000/mac-address@90 >> [ 0.030511] OF: /soc@0/bus@30800000/ethernet@30bf0000: could not >> get #nvmem-cell-cells for >> /soc@0/bus@30000000/efuse@30350000/mac-address@96 >> >> Do you have ideas? > > Could you try the following patch: > > ---snip--- > commit 83f1bd351a2194844599ffc08050f5bc61a06086 (HEAD -> master) > Author: Michael Walle <michael@walle.cc> > Date: Tue Jan 10 15:16:48 2023 +0100 > > of: property: fix #nvmem-cell-cells parsing > > Commit 67b8497f005 ("of: property: make #.*-cells optional for simple > props") claims to make the cells-name property optional for simple > properties, but changed the code for the wrong property, i.e. for > DEFINE_SUFFIX_PROP(). Fix that. > > Fixes: 67b8497f005 ("of: property: make #.*-cells optional for > simple props") > Reported-by: Peng Fan <peng.fan@nxp.com> > Signed-off-by: Michael Walle <michael@walle.cc> Gets rid of the warning for me on IPQ8074, so: Tested-by: Robert Marko <robimarko@gmail.com> Regards, Robert > > diff --git a/drivers/of/property.c b/drivers/of/property.c > index 8d9ba20a8f90..95b838185b2f 100644 > --- a/drivers/of/property.c > +++ b/drivers/of/property.c > @@ -1202,8 +1202,8 @@ static struct device_node > *parse_prop_cells(struct device_node *np, > if (strcmp(prop_name, list_name)) > return NULL; > > - if (of_parse_phandle_with_args(np, list_name, cells_name, index, > - &sup_args)) > + if (__of_parse_phandle_with_args(np, list_name, cells_name, 0, > index, > + &sup_args)) > return NULL; > > return sup_args.np; > @@ -1256,8 +1256,8 @@ static struct device_node > *parse_suffix_prop_cells(struct device_node *np, > if (strcmp_suffix(prop_name, suffix)) > return NULL; > > - if (__of_parse_phandle_with_args(np, prop_name, cells_name, 0, > index, > - &sup_args)) > + if (of_parse_phandle_with_args(np, prop_name, cells_name, index, > + &sup_args)) > return NULL; > > return sup_args.np; > ---snip--- > > - > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-01-10 15:53 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-01-10 8:07 issue: could not get #nvmem-cell-cells Peng Fan 2023-01-10 8:12 ` Michael Walle 2023-01-10 8:14 ` Peng Fan 2023-01-10 10:32 ` Alexander Stein 2023-01-10 10:47 ` Michael Walle 2023-01-10 14:45 ` Michael Walle 2023-01-10 15:52 ` Robert Marko
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox