Driver model currently only operates after relocation is complete. In this state U-Boot typically has a small amount of memory available. In adding support for driver model prior to relocation we must try to use as little memory as possible. In addition, on some machines the memory has not be inited and/or the CPU is not running at full speed or the data cache is off. These can reduce execution performance, so the less initialisation that is done before relocation the better. An immediately-obvious improvement is to only initialise drivers which are actually going to be used before relocation. On many boards the only such driver is a serial UART, so this provides a very large potential benefit. Allow drivers to mark themselves as 'pre-reloc' which means that they will be initialised prior to relocation. This can be done either with a driver flag or with a 'dm,pre-reloc' device tree property. To support this, the various dm scanning function now take a 'pre_reloc_only' parameter which indicates that only drivers marked pre-reloc should be bound. Signed-off-by: Simon Glass <sjg@chromium.org>
73 lines
1 KiB
Text
73 lines
1 KiB
Text
/dts-v1/;
|
|
|
|
/ {
|
|
model = "sandbox";
|
|
compatible = "sandbox";
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
|
|
aliases {
|
|
console = &uart0;
|
|
};
|
|
|
|
uart0: serial {
|
|
compatible = "sandbox,serial";
|
|
u-boot,dm-pre-reloc;
|
|
};
|
|
|
|
a-test {
|
|
reg = <0>;
|
|
compatible = "denx,u-boot-fdt-test";
|
|
ping-expect = <0>;
|
|
ping-add = <0>;
|
|
u-boot,dm-pre-reloc;
|
|
};
|
|
|
|
junk {
|
|
reg = <1>;
|
|
compatible = "not,compatible";
|
|
};
|
|
|
|
no-compatible {
|
|
reg = <2>;
|
|
};
|
|
|
|
b-test {
|
|
reg = <3>;
|
|
compatible = "denx,u-boot-fdt-test";
|
|
ping-expect = <3>;
|
|
ping-add = <3>;
|
|
};
|
|
|
|
some-bus {
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
ping-expect = <4>;
|
|
ping-add = <4>;
|
|
c-test {
|
|
compatible = "denx,u-boot-fdt-test";
|
|
reg = <5>;
|
|
ping-add = <5>;
|
|
};
|
|
};
|
|
|
|
d-test {
|
|
reg = <6>;
|
|
ping-expect = <6>;
|
|
ping-add = <6>;
|
|
compatible = "google,another-fdt-test";
|
|
};
|
|
|
|
base-gpios {
|
|
compatible = "sandbox,gpio";
|
|
gpio-bank-name = "a";
|
|
num-gpios = <20>;
|
|
};
|
|
|
|
extra-gpios {
|
|
compatible = "sandbox,gpio";
|
|
gpio-bank-name = "b";
|
|
num-gpios = <10>;
|
|
};
|
|
};
|