Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/21107 )
Change subject: sb/i82801ix: Fix flashconsole on platform
......................................................................
Patch Set 17: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/21107
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ifd3e8621fa4cb349b7e0e07118cab0380f24ff55
Gerrit-Change-Number: 21107
Gerrit-PatchSet: 17
Gerrit-Owner: Nicola Corna <nicola(a)corna.info>
Gerrit-Reviewer: Aaron Durbin <adurbin(a)chromium.org>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Huang Jin <huang.jin(a)intel.com>
Gerrit-Reviewer: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Nicola Corna <nicola(a)corna.info>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Philipp Deppenwiese <zaolin.daisuki(a)gmail.com>
Gerrit-Reviewer: Werner Zeh <werner.zeh(a)siemens.com>
Gerrit-Reviewer: Youness Alaoui <snifikino(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Tue, 04 Jun 2019 11:25:09 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
David Hendricks has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/30414 )
Change subject: mainboard/facebook/fbg1701: Do initial mainboard commit
......................................................................
Patch Set 25: Code-Review+1
(1 comment)
almost there...
https://review.coreboot.org/#/c/30414/25/src/mainboard/facebook/fbg1701/rom…
File src/mainboard/facebook/fbg1701/romstage.c:
https://review.coreboot.org/#/c/30414/25/src/mainboard/facebook/fbg1701/rom…
PS25, Line 28: /* First call into mainboard. */
: void mainboard_romstage_entry(struct romstage_params *params)
: {
: romstage_common(params);
: }
:
This seems to be leftover from earlier baytrail --> braswell porting, and is no longer needed. If I remove it then it will compile locally.
I don't think romstage_common() exists for braswell, so removing this should have no effect (aside from fixing compilation).
--
To view, visit https://review.coreboot.org/c/coreboot/+/30414
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I28ac78a630ee705b1e546031f024bfe7f952ab39
Gerrit-Change-Number: 30414
Gerrit-PatchSet: 25
Gerrit-Owner: Frans Hendriks <fhendriks(a)eltan.com>
Gerrit-Reviewer: Alex Thiessen <alex.thiessen.de+coreboot(a)gmail.com>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Frans Hendriks <fhendriks(a)eltan.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-CC: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-CC: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-CC: Philipp Deppenwiese <zaolin.daisuki(a)gmail.com>
Gerrit-Comment-Date: Tue, 04 Jun 2019 11:25:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Hello Patrick Rudolph,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/32868
to review the following change.
Change subject: device_tree: Make FDT property data non-const
......................................................................
device_tree: Make FDT property data non-const
FDT property data should not be const -- sometimes we need to update it,
for example when fixing up phandles in an overlay. On the other hand
it's occasionally desirable to put a string constant in there without
having to strdup() it all the time... let's just live with the tiny
implicit assumption that the data we'd want to modify (phandle
references, mostly) will never be added from string constants, and put a
cast in dt_add_string_prop().
Change-Id: Ifac103fcff0520cc427ab9a2aa141c65e12507ac
Signed-off-by: Julius Werner <jwerner(a)chromium.org>
---
M src/include/device_tree.h
M src/lib/device_tree.c
2 files changed, 4 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/68/32868/1
diff --git a/src/include/device_tree.h b/src/include/device_tree.h
index e3723c8..d9d9613 100644
--- a/src/include/device_tree.h
+++ b/src/include/device_tree.h
@@ -52,7 +52,7 @@
struct fdt_property
{
const char *name;
- const void *data;
+ void *data;
uint32_t size;
};
@@ -165,7 +165,7 @@
void dt_delete_prop(struct device_tree_node *node, const char *name);
// Add different kinds of properties to a node, or update existing ones.
void dt_add_bin_prop(struct device_tree_node *node, const char *name,
- const void *data, size_t size);
+ void *data, size_t size);
void dt_add_string_prop(struct device_tree_node *node, const char *name,
const char *str);
void dt_add_u32_prop(struct device_tree_node *node, const char *name, u32 val);
diff --git a/src/lib/device_tree.c b/src/lib/device_tree.c
index 3c4bd24..a5021ca 100644
--- a/src/lib/device_tree.c
+++ b/src/lib/device_tree.c
@@ -883,7 +883,7 @@
* @param size The size of data in bytes.
*/
void dt_add_bin_prop(struct device_tree_node *node, const char *name,
- const void *data, size_t size)
+ void *data, size_t size)
{
struct device_tree_property *prop;
@@ -955,7 +955,7 @@
void dt_add_string_prop(struct device_tree_node *node, const char *name,
const char *str)
{
- dt_add_bin_prop(node, name, str, strlen(str) + 1);
+ dt_add_bin_prop(node, name, (char *)str, strlen(str) + 1);
}
/*
--
To view, visit https://review.coreboot.org/c/coreboot/+/32868
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ifac103fcff0520cc427ab9a2aa141c65e12507ac
Gerrit-Change-Number: 32868
Gerrit-PatchSet: 1
Gerrit-Owner: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-MessageType: newchange
Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/32866 )
Change subject: device_tree: Add support for aliases
......................................................................
device_tree: Add support for aliases
This patch adds support to lookup nodes via the "/aliases" mechanism in
device trees. This may be required for overlay support (don't quite
remember tbh) and is also just a generally useful feature. It was
adapted from depthcharge's http://crosreview.com/1249703 and
http://crosreview.com/1542702.
Change-Id: I1289ab2f02c4877a2d0111040384827e2b48a34a
Signed-off-by: Julius Werner <jwerner(a)chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/32866
Reviewed-by: Hung-Te Lin <hungte(a)chromium.org>
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
---
M src/include/device_tree.h
M src/lib/device_tree.c
2 files changed, 77 insertions(+), 12 deletions(-)
Approvals:
build bot (Jenkins): Verified
Hung-Te Lin: Looks good to me, approved
diff --git a/src/include/device_tree.h b/src/include/device_tree.h
index 6eaeacd..e3723c8 100644
--- a/src/include/device_tree.h
+++ b/src/include/device_tree.h
@@ -146,6 +146,9 @@
// represented as a string of '/' separated node names.
struct device_tree_node *dt_find_node_by_path(struct device_tree *tree,
const char *path, u32 *addrcp, u32 *sizecp, int create);
+// Look up a node through an alias.
+struct device_tree_node *dt_find_node_by_alias(struct device_tree *tree,
+ const char *alias);
// Look up a node relative to a parent node, through its compatible string.
struct device_tree_node *dt_find_compat(struct device_tree_node *parent, const char *compatible);
// Look up the next child of a parent node, through its compatible string. It
diff --git a/src/lib/device_tree.c b/src/lib/device_tree.c
index e26021e..bbcd7c0 100644
--- a/src/lib/device_tree.c
+++ b/src/lib/device_tree.c
@@ -564,27 +564,65 @@
* @param create 1: Create node(s) if not found. 0: Return NULL instead.
* @return The found/created node, or NULL.
*
- * It is the caller responsibility to provide the correct path string, namely
- * starting with a '/', not ending in a '/' and not having "//" anywhere in it.
- */
+ * It is the caller responsibility to provide a path string that doesn't end
+ * with a '/' and doesn't contain any "//". If the path does not start with a
+ * '/', the first segment is interpreted as an alias. */
struct device_tree_node *dt_find_node_by_path(struct device_tree *tree,
const char *path, u32 *addrcp,
u32 *sizecp, int create)
{
- char *dup_path = strdup(&path[1]); /* remove leading '/' */
+ char *sub_path;
+ char *duped_str;
+ struct device_tree_node *parent;
+ char *next_slash;
/* Hopefully enough depth for any node. */
const char *path_array[15];
int i;
- char *next_slash;
struct device_tree_node *node = NULL;
- if (!dup_path)
- return NULL;
+ if (path[0] == '/') { // regular path
+ if (path[1] == '\0') { // special case: "/" is root node
+ dt_read_cell_props(tree->root, addrcp, sizecp);
+ return tree->root;
+ }
- next_slash = dup_path;
- path_array[0] = dup_path;
+ sub_path = duped_str = strdup(&path[1]);
+ if (!sub_path)
+ return NULL;
+
+ parent = tree->root;
+ } else { // alias
+ char *alias;
+
+ alias = duped_str = strdup(path);
+ if (!alias)
+ return NULL;
+
+ sub_path = strchr(alias, '/');
+ if (sub_path)
+ *sub_path = '\0';
+
+ parent = dt_find_node_by_alias(tree, alias);
+ if (!parent) {
+ printk(BIOS_DEBUG,
+ "Could not find node '%s', alias '%s' does not exist\n",
+ path, alias);
+ free(duped_str);
+ return NULL;
+ }
+
+ if (!sub_path) {
+ // it's just the alias, no sub-path
+ free(duped_str);
+ return parent;
+ }
+
+ sub_path++;
+ }
+
+ next_slash = sub_path;
+ path_array[0] = sub_path;
for (i = 1; i < (ARRAY_SIZE(path_array) - 1); i++) {
-
next_slash = strchr(next_slash, '/');
if (!next_slash)
break;
@@ -595,14 +633,38 @@
if (!next_slash) {
path_array[i] = NULL;
- node = dt_find_node(tree->root, path_array,
+ node = dt_find_node(parent, path_array,
addrcp, sizecp, create);
}
- free(dup_path);
+ free(duped_str);
return node;
}
+/*
+ * Find a node from an alias
+ *
+ * @param tree The device tree.
+ * @param alias The alias name.
+ * @return The found node, or NULL.
+ */
+struct device_tree_node *dt_find_node_by_alias(struct device_tree *tree,
+ const char *alias)
+{
+ struct device_tree_node *node;
+ const char *alias_path;
+
+ node = dt_find_node_by_path(tree, "/aliases", NULL, NULL, 0);
+ if (!node)
+ return NULL;
+
+ alias_path = dt_find_string_prop(node, alias);
+ if (!alias_path)
+ return NULL;
+
+ return dt_find_node_by_path(tree, alias_path, NULL, NULL, 0);
+}
+
struct device_tree_node *dt_find_node_by_phandle(struct device_tree_node *root,
uint32_t phandle)
{
--
To view, visit https://review.coreboot.org/c/coreboot/+/32866
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I1289ab2f02c4877a2d0111040384827e2b48a34a
Gerrit-Change-Number: 32866
Gerrit-PatchSet: 6
Gerrit-Owner: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-MessageType: merged
Hello Patrick Rudolph,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/32865
to review the following change.
Change subject: device_tree: Have absolute paths start with '/'
......................................................................
device_tree: Have absolute paths start with '/'
Currently DT paths are *not* expected to start with '/'. This is not
what the spec says (see Devicetree Specification v0.2, 2.2.3 Path Names)
and also not what is done by Linux.
Change dt_find_node_by_path() to expect paths to start with '/' and add
a leading '/' to all DT path strings. Besides the compatibility with the
spec this change is also needed to support aliases in the future.
This patch was adapted from depthcharge's http://crosreview.com/1252770
Change-Id: Ibdf59ccbb4ead38c6193b630642fd1f1e847dd89
Signed-off-by: Julius Werner <jwerner(a)chromium.org>
---
M src/lib/device_tree.c
M src/soc/cavium/cn81xx/soc.c
2 files changed, 9 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/65/32865/1
diff --git a/src/lib/device_tree.c b/src/lib/device_tree.c
index 3e1dd35..e26021e 100644
--- a/src/lib/device_tree.c
+++ b/src/lib/device_tree.c
@@ -556,7 +556,7 @@
*
* @param tree The device tree to search.
* @param path A string representing a path in the device tree, with
- * nodes separated by '/'. Example: "soc/firmware/coreboot"
+ * nodes separated by '/'. Example: "/firmware/coreboot"
* @param addrcp Pointer that will be updated with any #address-cells
* value found in the path. May be NULL to ignore.
* @param sizecp Pointer that will be updated with any #size-cells
@@ -565,13 +565,13 @@
* @return The found/created node, or NULL.
*
* It is the caller responsibility to provide the correct path string, namely
- * not starting or ending with a '/', and not having "//" anywhere in it.
+ * starting with a '/', not ending in a '/' and not having "//" anywhere in it.
*/
struct device_tree_node *dt_find_node_by_path(struct device_tree *tree,
const char *path, u32 *addrcp,
u32 *sizecp, int create)
{
- char *dup_path = strdup(path);
+ char *dup_path = strdup(&path[1]); /* remove leading '/' */
/* Hopefully enough depth for any node. */
const char *path_array[15];
int i;
@@ -995,7 +995,7 @@
struct device_tree_node *reserved;
u32 addr = 0, size = 0;
- reserved = dt_find_node_by_path(tree, "reserved-memory", &addr,
+ reserved = dt_find_node_by_path(tree, "/reserved-memory", &addr,
&size, 1);
if (!reserved)
return NULL;
diff --git a/src/soc/cavium/cn81xx/soc.c b/src/soc/cavium/cn81xx/soc.c
index 20542e5..efe7d6d 100644
--- a/src/soc/cavium/cn81xx/soc.c
+++ b/src/soc/cavium/cn81xx/soc.c
@@ -185,7 +185,7 @@
size_t i;
/* Set the sclk clock rate. */
- dt_node = dt_find_node_by_path(tree, "soc@0/sclk", NULL, NULL, 0);
+ dt_node = dt_find_node_by_path(tree, "/soc@0/sclk", NULL, NULL, 0);
if (dt_node) {
const u32 freq = thunderx_get_io_clock();
printk(BIOS_INFO, "%s: Set SCLK to %u Hz\n", __func__, freq);
@@ -195,7 +195,7 @@
__func__);
/* Set refclkuaa clock rate. */
- dt_node = dt_find_node_by_path(tree, "soc@0/refclkuaa", NULL,
+ dt_node = dt_find_node_by_path(tree, "/soc@0/refclkuaa", NULL,
NULL, 0);
if (dt_node) {
const u32 freq = uart_platform_refclk();
@@ -211,7 +211,7 @@
char path[32];
const uint64_t addr = UAAx_PF_BAR0(i);
/* Remove the node */
- snprintf(path, sizeof(path), "soc@0/serial@%llx", addr);
+ snprintf(path, sizeof(path), "/soc@0/serial@%llx", addr);
dt_node = dt_find_node_by_path(tree, path, NULL, NULL, 0);
if (!dt_node || uart_is_enabled(i)) {
printk(BIOS_INFO, "%s: ignoring %s\n", __func__, path);
@@ -227,7 +227,7 @@
u32 phandle = 0;
const uint64_t addr = PEM_PEMX_PF_BAR0(i);
/* Remove the node */
- snprintf(path, sizeof(path), "soc@0/pci@%llx", addr);
+ snprintf(path, sizeof(path), "/soc@0/pci@%llx", addr);
dt_node = dt_find_node_by_path(tree, path, NULL, NULL, 0);
if (!dt_node || bdk_pcie_is_running(0, i)) {
printk(BIOS_INFO, "%s: ignoring %s\n", __func__, path);
@@ -239,7 +239,7 @@
list_remove(&dt_node->list_node);
/* Remove phandle to non existing nodes */
- snprintf(path, sizeof(path), "soc@0/smmu0@%llx", SMMU_PF_BAR0);
+ snprintf(path, sizeof(path), "/soc@0/smmu0@%llx", SMMU_PF_BAR0);
dt_node = dt_find_node_by_path(tree, path, NULL, NULL, 0);
if (!dt_node) {
printk(BIOS_ERR, "%s: SMMU entry not found\n",
--
To view, visit https://review.coreboot.org/c/coreboot/+/32865
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ibdf59ccbb4ead38c6193b630642fd1f1e847dd89
Gerrit-Change-Number: 32865
Gerrit-PatchSet: 1
Gerrit-Owner: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-MessageType: newchange
Hello Patrick Rudolph,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/32864
to review the following change.
Change subject: device_tree: Drop sub-node path lookup from dt_find_node_by_path()
......................................................................
device_tree: Drop sub-node path lookup from dt_find_node_by_path()
Besides looking up a node with an absolute path dt_find_node_by_path()
currently also supports finding a sub-node of a non-root node. All
callers of the function pass the root node though, so it seems there
is no real need for this functionality. Also it is planned to support
DT path names with aliases, which would become messy in combination with
the lookup from a sub-node.
Change the interface of dt_find_node_by_path() to receive the DT tree
object instead of a parent node and adapt all callers accordingly.
This patch was adapted from depthcharge's http://crosreview.com/1252769
Change-Id: Iff56be4da2461ae73a7301dcaa315758d2a8c999
Signed-off-by: Julius Werner <jwerner(a)chromium.org>
---
M src/include/device_tree.h
M src/lib/device_tree.c
M src/soc/cavium/cn81xx/soc.c
3 files changed, 14 insertions(+), 14 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/64/32864/1
diff --git a/src/include/device_tree.h b/src/include/device_tree.h
index 8280dad..6eaeacd 100644
--- a/src/include/device_tree.h
+++ b/src/include/device_tree.h
@@ -142,10 +142,10 @@
u32 *addrcp, u32 *sizecp, int create);
struct device_tree_node *dt_find_node_by_phandle(struct device_tree_node *root,
uint32_t phandle);
-// Look up or create a node relative to a parent node, through its path
+// Look up or create a node in the tree, through its path
// represented as a string of '/' separated node names.
-struct device_tree_node *dt_find_node_by_path(struct device_tree_node *parent, const char *path,
- u32 *addrcp, u32 *sizecp, int create);
+struct device_tree_node *dt_find_node_by_path(struct device_tree *tree,
+ const char *path, u32 *addrcp, u32 *sizecp, int create);
// Look up a node relative to a parent node, through its compatible string.
struct device_tree_node *dt_find_compat(struct device_tree_node *parent, const char *compatible);
// Look up the next child of a parent node, through its compatible string. It
diff --git a/src/lib/device_tree.c b/src/lib/device_tree.c
index 44eca4e..3e1dd35 100644
--- a/src/lib/device_tree.c
+++ b/src/lib/device_tree.c
@@ -552,9 +552,9 @@
}
/*
- * Find a node from a string device tree path, relative to a parent node.
+ * Find a node in the tree from a string device tree path.
*
- * @param parent The node from which to start the relative path lookup.
+ * @param tree The device tree to search.
* @param path A string representing a path in the device tree, with
* nodes separated by '/'. Example: "soc/firmware/coreboot"
* @param addrcp Pointer that will be updated with any #address-cells
@@ -567,7 +567,7 @@
* It is the caller responsibility to provide the correct path string, namely
* not starting or ending with a '/', and not having "//" anywhere in it.
*/
-struct device_tree_node *dt_find_node_by_path(struct device_tree_node *parent,
+struct device_tree_node *dt_find_node_by_path(struct device_tree *tree,
const char *path, u32 *addrcp,
u32 *sizecp, int create)
{
@@ -595,7 +595,7 @@
if (!next_slash) {
path_array[i] = NULL;
- node = dt_find_node(parent, path_array,
+ node = dt_find_node(tree->root, path_array,
addrcp, sizecp, create);
}
@@ -965,7 +965,7 @@
*prop_name++ = '\0'; /* Separate path from the property name. */
- dt_node = dt_find_node_by_path(tree->root, path_copy, NULL,
+ dt_node = dt_find_node_by_path(tree, path_copy, NULL,
NULL, create);
if (!dt_node) {
@@ -995,7 +995,7 @@
struct device_tree_node *reserved;
u32 addr = 0, size = 0;
- reserved = dt_find_node_by_path(tree->root, "reserved-memory", &addr,
+ reserved = dt_find_node_by_path(tree, "reserved-memory", &addr,
&size, 1);
if (!reserved)
return NULL;
diff --git a/src/soc/cavium/cn81xx/soc.c b/src/soc/cavium/cn81xx/soc.c
index 0500749..20542e5 100644
--- a/src/soc/cavium/cn81xx/soc.c
+++ b/src/soc/cavium/cn81xx/soc.c
@@ -185,7 +185,7 @@
size_t i;
/* Set the sclk clock rate. */
- dt_node = dt_find_node_by_path(tree->root, "soc@0/sclk", NULL, NULL, 0);
+ dt_node = dt_find_node_by_path(tree, "soc@0/sclk", NULL, NULL, 0);
if (dt_node) {
const u32 freq = thunderx_get_io_clock();
printk(BIOS_INFO, "%s: Set SCLK to %u Hz\n", __func__, freq);
@@ -195,7 +195,7 @@
__func__);
/* Set refclkuaa clock rate. */
- dt_node = dt_find_node_by_path(tree->root, "soc@0/refclkuaa", NULL,
+ dt_node = dt_find_node_by_path(tree, "soc@0/refclkuaa", NULL,
NULL, 0);
if (dt_node) {
const u32 freq = uart_platform_refclk();
@@ -212,7 +212,7 @@
const uint64_t addr = UAAx_PF_BAR0(i);
/* Remove the node */
snprintf(path, sizeof(path), "soc@0/serial@%llx", addr);
- dt_node = dt_find_node_by_path(tree->root, path, NULL, NULL, 0);
+ dt_node = dt_find_node_by_path(tree, path, NULL, NULL, 0);
if (!dt_node || uart_is_enabled(i)) {
printk(BIOS_INFO, "%s: ignoring %s\n", __func__, path);
continue;
@@ -228,7 +228,7 @@
const uint64_t addr = PEM_PEMX_PF_BAR0(i);
/* Remove the node */
snprintf(path, sizeof(path), "soc@0/pci@%llx", addr);
- dt_node = dt_find_node_by_path(tree->root, path, NULL, NULL, 0);
+ dt_node = dt_find_node_by_path(tree, path, NULL, NULL, 0);
if (!dt_node || bdk_pcie_is_running(0, i)) {
printk(BIOS_INFO, "%s: ignoring %s\n", __func__, path);
continue;
@@ -240,7 +240,7 @@
/* Remove phandle to non existing nodes */
snprintf(path, sizeof(path), "soc@0/smmu0@%llx", SMMU_PF_BAR0);
- dt_node = dt_find_node_by_path(tree->root, path, NULL, NULL, 0);
+ dt_node = dt_find_node_by_path(tree, path, NULL, NULL, 0);
if (!dt_node) {
printk(BIOS_ERR, "%s: SMMU entry not found\n",
__func__);
--
To view, visit https://review.coreboot.org/c/coreboot/+/32864
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Iff56be4da2461ae73a7301dcaa315758d2a8c999
Gerrit-Change-Number: 32864
Gerrit-PatchSet: 1
Gerrit-Owner: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-MessageType: newchange