mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-06-07 07:11:35 +00:00
sandbox: Add a test device that uses of-platdata
Start up the test devices. These print out of-platdata contents, providing a check that the of-platdata feature is working correctly. The device-tree changes are made to sandbox.dts rather than test.dts. since the former controls the of-platdata generation. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
8797b2cae3
commit
a091a8f084
3 changed files with 50 additions and 0 deletions
|
@ -6,6 +6,7 @@
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <dm.h>
|
#include <dm.h>
|
||||||
#include <os.h>
|
#include <os.h>
|
||||||
|
#include <spl.h>
|
||||||
#include <asm/spl.h>
|
#include <asm/spl.h>
|
||||||
#include <asm/state.h>
|
#include <asm/state.h>
|
||||||
|
|
||||||
|
@ -49,3 +50,19 @@ int spl_board_load_image(void)
|
||||||
/* Hopefully this will not return */
|
/* Hopefully this will not return */
|
||||||
return os_spl_to_uboot(fname);
|
return os_spl_to_uboot(fname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void spl_board_init(void)
|
||||||
|
{
|
||||||
|
struct udevice *dev;
|
||||||
|
|
||||||
|
preloader_console_init();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Scan all the devices so that we can output their platform data. See
|
||||||
|
* sandbox_spl_probe().
|
||||||
|
*/
|
||||||
|
for (uclass_first_device(UCLASS_MISC, &dev);
|
||||||
|
dev;
|
||||||
|
uclass_next_device(&dev))
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
|
@ -172,6 +172,37 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
spl-test {
|
||||||
|
u-boot,dm-pre-reloc;
|
||||||
|
compatible = "sandbox,spl-test";
|
||||||
|
boolval;
|
||||||
|
intval = <1>;
|
||||||
|
intarray = <2 3 4>;
|
||||||
|
byteval = [05];
|
||||||
|
bytearray = [06];
|
||||||
|
longbytearray = [09 0a 0b 0c 0d 0e 0f 10 11];
|
||||||
|
stringval = "message";
|
||||||
|
stringarray = "multi-word", "message";
|
||||||
|
};
|
||||||
|
|
||||||
|
spl-test2 {
|
||||||
|
u-boot,dm-pre-reloc;
|
||||||
|
compatible = "sandbox,spl-test";
|
||||||
|
intval = <3>;
|
||||||
|
intarray = <5>;
|
||||||
|
byteval = [08];
|
||||||
|
bytearray = [01 23 34];
|
||||||
|
longbytearray = [09 0a 0b 0c];
|
||||||
|
stringval = "message2";
|
||||||
|
stringarray = "another", "multi-word", "message";
|
||||||
|
};
|
||||||
|
|
||||||
|
spl-test3 {
|
||||||
|
u-boot,dm-pre-reloc;
|
||||||
|
compatible = "sandbox,spl-test";
|
||||||
|
stringarray = "one";
|
||||||
|
};
|
||||||
|
|
||||||
square {
|
square {
|
||||||
compatible = "demo-shape";
|
compatible = "demo-shape";
|
||||||
colour = "blue";
|
colour = "blue";
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
|
|
||||||
#include <configs/sandbox.h>
|
#include <configs/sandbox.h>
|
||||||
|
|
||||||
|
#define CONFIG_SPL_BOARD_INIT
|
||||||
|
|
||||||
#define CONFIG_SPL_DRIVERS_MISC_SUPPORT
|
#define CONFIG_SPL_DRIVERS_MISC_SUPPORT
|
||||||
#define CONFIG_SPL_ENV_SUPPORT
|
#define CONFIG_SPL_ENV_SUPPORT
|
||||||
#define CONFIG_SPL_FRAMEWORK
|
#define CONFIG_SPL_FRAMEWORK
|
||||||
|
|
Loading…
Add table
Reference in a new issue