/* (C) 2018 Theobroma Systems Design und Consulting GmbH  */
static int dm_test_bootcount(struct unit_test_state *uts)
/* (C) 2018 Theobroma Systems Design und Consulting GmbH  */
static int dm_test_bootcount(struct unit_test_state *uts)
{
	struct udevice *dev;
	u32 val;
	ut_assertok(uclass_get_device(UCLASS_BOOTCOUNT, 0, &dev));
	ut_assertok(dm_bootcount_set(dev, 0));
	ut_assertok(dm_bootcount_get(dev, &val));
	ut_assert(val == 0);
	ut_assertok(dm_bootcount_set(dev, 0xab));
	ut_assertok(dm_bootcount_get(dev, &val));
	ut_assert(val == 0xab);
	return 0;
}