提交 a06bf59d 编写于 作者: J Julius Werner 提交者: Krzysztof Kozlowski

memory: Update of_memory lpddr2 revision-id binding

This patch updates the code parsing the "jedec,lpddr2" device tree
binding to use the new `revision-id` property instead of the deprecated
`revision-id1` and `revision-id2` properties if available.
Signed-off-by: NJulius Werner <jwerner@chromium.org>
Link: https://lore.kernel.org/r/20220224003421.3440124-3-jwerner@chromium.orgSigned-off-by: NKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
上级 80ce9173
...@@ -318,14 +318,21 @@ const struct lpddr2_info ...@@ -318,14 +318,21 @@ const struct lpddr2_info
struct property *prop; struct property *prop;
const char *cp; const char *cp;
int err; int err;
u32 revision_id[2];
err = of_property_read_u32(np, "revision-id1", &info.revision_id1);
if (err) err = of_property_read_u32_array(np, "revision-id", revision_id, 2);
info.revision_id1 = -ENOENT; if (!err) {
info.revision_id1 = revision_id[0];
err = of_property_read_u32(np, "revision-id2", &info.revision_id2); info.revision_id2 = revision_id[1];
if (err) } else {
info.revision_id2 = -ENOENT; err = of_property_read_u32(np, "revision-id1", &info.revision_id1);
if (err)
info.revision_id1 = -ENOENT;
err = of_property_read_u32(np, "revision-id2", &info.revision_id2);
if (err)
info.revision_id2 = -ENOENT;
}
err = of_property_read_u32(np, "io-width", &info.io_width); err = of_property_read_u32(np, "io-width", &info.io_width);
if (err) if (err)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册