summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2015-10-08 03:03:41 -0400
committerTom Rini <trini@konsulko.com>2015-10-08 03:03:41 -0400
commit739c5e08335b15ac7c55c98ada32eb97ba508a5f (patch)
tree03c31998bab2b2ab653829e84a2560bbe04e007f
parentb1f492ca9e0c090209824ff36456d4f131843190 (diff)
parent7bb91dd109e2aff5f7f51aed44ac7890f9a4d158 (diff)
downloadu-boot-imx-739c5e08335b15ac7c55c98ada32eb97ba508a5f.zip
u-boot-imx-739c5e08335b15ac7c55c98ada32eb97ba508a5f.tar.gz
u-boot-imx-739c5e08335b15ac7c55c98ada32eb97ba508a5f.tar.bz2
Merge git://git.denx.de/u-boot-dm
-rw-r--r--arch/sandbox/dts/sandbox.dts4
-rw-r--r--drivers/core/device.c8
-rw-r--r--drivers/misc/reset_sandbox.c2
-rw-r--r--test/dm/core.c7
4 files changed, 17 insertions, 4 deletions
diff --git a/arch/sandbox/dts/sandbox.dts b/arch/sandbox/dts/sandbox.dts
index 65b9125..08f72ac 100644
--- a/arch/sandbox/dts/sandbox.dts
+++ b/arch/sandbox/dts/sandbox.dts
@@ -153,6 +153,10 @@
};
};
+ reset@1 {
+ compatible = "sandbox,reset";
+ };
+
spi@0 {
#address-cells = <1>;
#size-cells = <0>;
diff --git a/drivers/core/device.c b/drivers/core/device.c
index 0bc04d4..833a803 100644
--- a/drivers/core/device.c
+++ b/drivers/core/device.c
@@ -289,8 +289,12 @@ int device_probe_child(struct udevice *dev, void *parent_priv)
dev->flags |= DM_FLAG_ACTIVATED;
- /* continue regardless of the result of pinctrl */
- pinctrl_select_state(dev, "default");
+ /*
+ * Process pinctrl for everything except the root device, and
+ * continue regardless of the result of pinctrl.
+ */
+ if (dev->parent)
+ pinctrl_select_state(dev, "default");
ret = uclass_pre_probe_device(dev);
if (ret)
diff --git a/drivers/misc/reset_sandbox.c b/drivers/misc/reset_sandbox.c
index 917121b..2691bb0 100644
--- a/drivers/misc/reset_sandbox.c
+++ b/drivers/misc/reset_sandbox.c
@@ -40,7 +40,7 @@ static int sandbox_reset_request(struct udevice *dev, enum reset_t type)
* (see the U_BOOT_DEVICE() declaration below) should not do anything.
* If we are that device, return an error.
*/
- if (gd->fdt_blob && dev->of_offset == -1)
+ if (state->fdt_fname && dev->of_offset == -1)
return -ENODEV;
switch (type) {
diff --git a/test/dm/core.c b/test/dm/core.c
index 976a706..9fbc70d 100644
--- a/test/dm/core.c
+++ b/test/dm/core.c
@@ -77,7 +77,7 @@ void dm_leak_check_start(struct unit_test_state *uts)
int dm_leak_check_end(struct unit_test_state *uts)
{
struct mallinfo end;
- int id;
+ int id, diff;
/* Don't delete the root class, since we started with that */
for (id = UCLASS_ROOT + 1; id < UCLASS_COUNT; id++) {
@@ -90,6 +90,11 @@ int dm_leak_check_end(struct unit_test_state *uts)
}
end = mallinfo();
+ diff = end.uordblks - uts->start.uordblks;
+ if (diff > 0)
+ printf("Leak: lost %#xd bytes\n", diff);
+ else if (diff < 0)
+ printf("Leak: gained %#xd bytes\n", -diff);
ut_asserteq(uts->start.uordblks, end.uordblks);
return 0;