* [PATCH] fixup! state: add fixup to copy state from barebox to kernel device tree
@ 2015-05-26 11:33 Marc Kleine-Budde
2015-05-26 12:22 ` Sascha Hauer
0 siblings, 1 reply; 4+ messages in thread
From: Marc Kleine-Budde @ 2015-05-26 11:33 UTC (permalink / raw)
To: barebox
During of_state_fixup() we have to write the #address-cells and #size-cells
property of the node we're copying the data to, not the "root" node of the
device tree we're working on.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
common/state.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/state.c b/common/state.c
index cc0e168a7b99..655c9a63e333 100644
--- a/common/state.c
+++ b/common/state.c
@@ -737,11 +737,11 @@ static int of_state_fixup(struct device_node *root, void *ctx)
goto out;
/* address-cells + size-cells */
- ret = of_property_write_u32(root, "#address-cells", 1);
+ ret = of_property_write_u32(new_node, "#address-cells", 1);
if (ret)
goto out;
- ret = of_property_write_u32(root, "#size-cells", 1);
+ ret = of_property_write_u32(new_node, "#size-cells", 1);
if (ret)
goto out;
--
2.1.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fixup! state: add fixup to copy state from barebox to kernel device tree
2015-05-26 11:33 [PATCH] fixup! state: add fixup to copy state from barebox to kernel device tree Marc Kleine-Budde
@ 2015-05-26 12:22 ` Sascha Hauer
0 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2015-05-26 12:22 UTC (permalink / raw)
To: Marc Kleine-Budde; +Cc: barebox
On Tue, May 26, 2015 at 01:33:57PM +0200, Marc Kleine-Budde wrote:
> During of_state_fixup() we have to write the #address-cells and #size-cells
> property of the node we're copying the data to, not the "root" node of the
> device tree we're working on.
>
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> ---
> common/state.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Applied, thanks
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fixup! state: add fixup to copy state from barebox to kernel device tree
2015-05-16 10:15 ` [PATCH] fixup! " Uwe Kleine-König
@ 2015-05-18 6:07 ` Sascha Hauer
0 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2015-05-18 6:07 UTC (permalink / raw)
To: Uwe Kleine-König; +Cc: barebox
On Sat, May 16, 2015 at 12:15:27PM +0200, Uwe Kleine-König wrote:
> of_unregister_fixup must also be called in the release function.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> This depends on the patch "of: add a function to remove an of_fixup" I
> just sent to the list
> ---
> common/state.c | 15 ++++++++-------
> 1 file changed, 8 insertions(+), 7 deletions(-)
Applied with said patch beforehand.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] fixup! state: add fixup to copy state from barebox to kernel device tree
2015-05-13 10:12 [PATCH 6/7] " Marc Kleine-Budde
@ 2015-05-16 10:15 ` Uwe Kleine-König
2015-05-18 6:07 ` Sascha Hauer
0 siblings, 1 reply; 4+ messages in thread
From: Uwe Kleine-König @ 2015-05-16 10:15 UTC (permalink / raw)
To: barebox, Marc Kleine-Budde
of_unregister_fixup must also be called in the release function.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
This depends on the patch "of: add a function to remove an of_fixup" I
just sent to the list
---
common/state.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/common/state.c b/common/state.c
index fb13ae272db9..bd9c5a712aac 100644
--- a/common/state.c
+++ b/common/state.c
@@ -435,13 +435,6 @@ static struct state *state_new(const char *name)
return state;
}
-void state_release(struct state *state)
-{
- list_del(&state->list);
- unregister_device(&state->dev);
- free(state);
-}
-
static struct state_variable *state_find_var(struct state *state,
const char *name)
{
@@ -760,6 +753,14 @@ static int of_state_fixup(struct device_node *root, void *ctx)
return ret;
}
+void state_release(struct state *state)
+{
+ of_unregister_fixup(of_state_fixup, state);
+ list_del(&state->list);
+ unregister_device(&state->dev);
+ free(state);
+}
+
/*
* state_new_from_node - create a new state instance from a device_node
*
--
2.1.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-05-26 12:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-26 11:33 [PATCH] fixup! state: add fixup to copy state from barebox to kernel device tree Marc Kleine-Budde
2015-05-26 12:22 ` Sascha Hauer
-- strict thread matches above, loose matches on Subject: below --
2015-05-13 10:12 [PATCH 6/7] " Marc Kleine-Budde
2015-05-16 10:15 ` [PATCH] fixup! " Uwe Kleine-König
2015-05-18 6:07 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox