On 07/03/21 9:23 am, Adam Ford wrote:
> try_unlock_memory() is only used in one file, so make it static
> in that file and remove it from the sys_proto header file. This
> may help with some further optimization in the future.
>
> Signed-off-by: Adam Ford
one of omap3 board is failing to buil
Hi Bin,
On Tue, 9 Mar 2021 at 15:34, Bin Meng wrote:
>
> Hi Simon,
>
> On Sun, Feb 7, 2021 at 12:13 AM Simon Glass wrote:
> >
> > Provide the model information through sysinfo so that it shows up on
> > boot. For memconfig 4 pins are provided, for 16 combinations. For SKU
> > ID there are two op
Hi Niko,
On Thu, 11 Mar 2021 at 20:34, Niko Mauno wrote:
>
> On 2/25/21 6:09 PM, Niko Mauno wrote:
> > On 2/24/21 3:51 PM, Tom Rini wrote:
> >> On Tue, Feb 23, 2021 at 08:33:36AM +0200, Niko Mauno wrote:
> >>> On 2/22/21 10:21 PM, Tom Rini wrote:
> On Mon, Feb 22, 2021 at 07:18:51PM +, N
On Fri, 5 Mar 2021 at 07:28, Heinrich Schuchardt wrote:
>
> Add the FAT environment driver to the priority list.
>
> When testing the UEFI sub-system the EFI system partition is formatted with
> FAT so it is reasonable to store the environment there.
>
> Signed-off-by: Heinrich Schuchardt
> ---
>
It is not possible to remove the state before driver model is uninited,
since the devices are allocated in the memory buffer. Also it is not
possible to uninit driver model afterwards, since the RAM has been
freed.
Drop the uninit altogether, since it is not actually necessary.
Signed-off-by: Sim
Add an extra condition here since we cannot put x86 tables in a bloblist
when bloblists are not supported.
Signed-off-by: Simon Glass
---
lib/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/Kconfig b/lib/Kconfig
index b35a71ac368..705196aef89 100644
--- a/lib/Kco
When there is no command line, we cannot enable this feature. Add a check
to avoid a build error.
Signed-off-by: Simon Glass
---
common/bootm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/common/bootm.c b/common/bootm.c
index dab7c3619fd..ea71522d0c9 100644
--- a/commo
Move this documentation over to reST. Move the example files into a files/
directory so they are still separate.
Do a few minor updates while we are here:
- Tidy up sandbox build instructions
- Update my github account name
- Add some talks and links
Signed-off-by: Simon Glass
---
.../chainloa
The U_BOOT_CMDREP_COMPLETE() macro produces a build error if CONFIG_CMDLINE
is not enabled. Fix this by updating the macro to provide the 'repeatable'
arugment in this case.
Signed-off-by: Simon Glass
---
include/command.h | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --
Export this function always so it can be used behind IS_ENABLED() instead
of requiring an #ifdef.
Signed-off-by: Simon Glass
---
include/malloc.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/malloc.h b/include/malloc.h
index e15e528a2e3..024b18be00e 100644
--- a
The _SUPPORT suffix is from an earlier time and interferes with use of
the CONFIG_IS_ENABLED() macro. Rename the option to drop the suffix.
Tidy up the TODO that prompted this.
Signed-off-by: Simon Glass
---
arch/riscv/cpu/ax25/Kconfig | 2 +-
arch/riscv/cpu/fu540/Kconfig| 2 +-
This feature was dropped from U-Boot some time ago:
f12f96cfaf5 (sf: Drop spl_flash_get_sw_write_prot")
However, we do need a way to see if a flash device is write-protected,
since if it is, it may not be possible to write to do (i.e. failing to
write is expected).
I am not sure of the correc
At present bootstage silently ignores new records if it runs out of
space. It is sometimes obvious by looking at the report, but the IDs are
not contiguous, so it is easy to miss.
Aad a message so that action can be taken.
Signed-off-by: Simon Glass
---
common/bootstage.c | 18
We have two separate places that need to figure out the bootstage ID to
use. Put this code in a function so that the logic is in one place.
Signed-off-by: Simon Glass
---
common/spl/spl.c | 23 +++
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/common/spl/spl
This change seems important enough to warrant a visible message. Change
the log_debug() to log_info().
Signed-off-by: Simon Glass
---
lib/binman.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/binman.c b/lib/binman.c
index 6040ec89241..530df6a4b4c 100644
--- a/lib/
Sandbox is special in that it is used for testing and it does not match
any particular target architecture. Allow it to load an image from any
architecture, so that 'bootm' can be used as needed.
Signed-off-by: Simon Glass
---
common/image-fit.c | 4
include/image.h| 5 +
2 files c
These tests current produce unwanted output on sandbox. Use the correct
functions to controller console output, to avoid this.
Signed-off-by: Simon Glass
---
test/cmd/test_echo.c | 3 ++-
test/lib/test_print.c | 8 ++--
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/test/cm
At present when a file is bound to a host device it is always marked as
removeable. Arguably the device is removeable, since it can be unbound at
will. However while it is bound, it is not considered removable by the
user. Also it is useful to be able to model both fixed and removeable
devices for
This function has a strange mix of declarations and argument parsing
which is a bit hard to follow and harder to modify. Separate out the
declarations at the start of the function and adjust the ordering of
the code slightly.
Signed-off-by: Simon Glass
---
cmd/host.c | 13 +
1 file
Remove the 'bind' subcommand before processing the arguments. This will
make it easier to add an optional flag.
Signed-off-by: Simon Glass
---
cmd/host.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/cmd/host.c b/cmd/host.c
index 927c23d0d9d..847bb1d3b5f 100644
--
This can crash if the EC has not yet been probed. Add a check to prevent
this.
Signed-off-by: Simon Glass
---
drivers/misc/cros_ec_sandbox.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/misc/cros_ec_sandbox.c b/drivers/misc/cros_ec_sandbox.c
index cb8adc4495a..bc01df0904e 100
At present sandbox removes its executable after failing to run it,
since there is no other way that it would get cleaned up.
However, this is actually only wanted if the image was created within
sandbox. For the case where the image was generated by the build system,
such as u-boot-spl, we don't w
This function only exists if CPU is enabled. Update the code to take
account of this, so that it does not have to be enabled on all sandbox
builds.
Signed-off-by: Simon Glass
---
drivers/timer/sandbox_timer.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/timer/sa
This currently hangs and it is not necessary in any case. Drop the code
when booting from coreboot.
Signed-off-by: Simon Glass
---
arch/x86/lib/init_helpers.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/x86/lib/init_helpers.c b/arch/x86/lib/init_helpers.c
inde
When booting from coreboot there is no need to notify the FSP of anything,
since coreboot has already done it. Nor it is possible, since the FSP
details are not provided by coreboot.
Skip it in this case.
Signed-off-by: Simon Glass
---
arch/x86/lib/fsp2/fsp_support.c | 4
1 file changed,
When booting from coreboot the FSP video information is no-longer
available. Enable the coreboot driver so that we can get some sort of
display in this case.
Signed-off-by: Simon Glass
---
arch/x86/dts/chromebook_coral.dts | 5 +
1 file changed, 5 insertions(+)
diff --git a/arch/x86/dts/ch
At present the debug UART is only set up in SPL, on the assumption that
the boot flow will always pass through there. When booting from coreboot,
SPL is not used, so the debug UART is not available.
Move the code into a common place so that it can be used in U-Boot proper
also. Add the required in
Allow referencing a CBFS file in the flashmap, so that it is possible to
boot from coreboot, where files are not available from binman.
Signed-off-by: Simon Glass
---
include/dm/of_extra.h | 8
1 file changed, 8 insertions(+)
diff --git a/include/dm/of_extra.h b/include/dm/of_extra.h
When CONFIG_ACPIGEN is not enabled the CPU code does not build. Fix this
by moving things around.
Signed-off-by: Simon Glass
---
arch/x86/cpu/apollolake/cpu.c | 14 +-
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/arch/x86/cpu/apollolake/cpu.c b/arch/x86/cpu/apollola
This driver cannot work when booted from coreboot, since the FSP
information is not available. Disable it in that case, so that the
coreboot video driver can be used instead.
Signed-off-by: Simon Glass
---
arch/x86/lib/fsp/fsp_graphics.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
di
When booting from coreboot we need this driver for the video to work.
Update the driver to be usable on any board.
The driver disables itself if it sees that is not booted from coreboot.
Signed-off-by: Simon Glass
---
drivers/video/Kconfig| 2 +-
drivers/video/coreboot.c | 16
The copy buffer, if enabled, prevents booting from coreboot correctly,
since no memory is allocated for it. Allow it to fall back to disabled
in this situation. This ensures that a console is displayed, even if
it is slow.
Signed-off-by: Simon Glass
---
drivers/pci/pci_rom.c | 7 ++-
1 file
Quite a few new tag types have been added over the years. Bring these into
U-Boot so that all required tags can be parsed.
Add a proper comment to struct sysinfo_t while we are here, since many of
the meanings are not obvious.
Signed-off-by: Simon Glass
---
arch/x86/include/asm/cb_sysinfo.h
Two commands are missing this check, so compilation fails when building
without CONFIG_CMDLINE. Add it.
Signed-off-by: Simon Glass
---
cmd/acpi.c | 2 ++
cmd/bloblist.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/cmd/acpi.c b/cmd/acpi.c
index 157261bffbe..e5b9a1752bc 100644
--- a
This information is interesting to look at and can be important for
debugging and inspection. Add a command to display it in a helpful
format.
Signed-off-by: Simon Glass
---
cmd/Kconfig | 9 +
cmd/x86/Makefile| 1 +
cmd/x86/cbsysinfo.c | 394 +
Move this code into a generic location so that it can be used by other x86
boards which want to boot from coreboot. Also ensure that this is called
if booting from coreboot.
Signed-off-by: Simon Glass
---
arch/x86/cpu/coreboot/sdram.c | 27 +---
arch/x86/include/asm/e820.h
It is useful to be able to parse coreboot tables on any x86 build which is
booted from coreboot. Add a new Kconfig option to enable this feature and
move the code so it can be used on any board, if enabled.
Signed-off-by: Simon Glass
---
arch/x86/Kconfig | 21 ++
Add new timestamp codes that are present in coreboot, so that we can decode
these in U-Boot.
At present TS_U_BOOT_START_KERNEL is used twice. It should only be used
just before jumping to Linux, so update the other call site to use
TS_START_KERNEL.
Signed-off-by: Simon Glass
---
arch/x86/inclu
This all relates to the sysinfo structure provided by coreboot. Put the
timestamp definitions into the same file as the others. Tidy up a few
comments at the same time.
Signed-off-by: Simon Glass
---
arch/x86/cpu/coreboot/timestamp.c | 12 --
.../x86/include/asm/arch-coreboot/ti
It is possible to boot U-Boot for chromebook_coral either 'bare metal' or
from coreboot. In the latter case we want to provide access to the coreboot
sysinfo tables. Move the definitions into a file available to any x86
board.
Signed-off-by: Simon Glass
---
arch/x86/cpu/coreboot/coreboot.c
The results of malloc() are a void * and so this cast is unnecessary. Drop
it.
Signed-off-by: Simon Glass
---
fs/cbfs/cbfs.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/cbfs/cbfs.c b/fs/cbfs/cbfs.c
index 443a148e3f1..415ea28b871 100644
--- a/fs/cbfs/cbfs.c
+++ b/fs/
CBFS now supports compressed filed. Add support for reading this
information so that the correct decompression can be applied. The
decompression itself is not implemented in CBFS.
Signed-off-by: Simon Glass
---
fs/cbfs/cbfs.c | 22 ++
include/cbfs.h | 11 +++
2 files
The file_cbfs_next_file() function is already fairly long. Before
expanding it further, move the core part into a separate function.
Signed-off-by: Simon Glass
---
fs/cbfs/cbfs.c | 45 +
1 file changed, 33 insertions(+), 12 deletions(-)
diff --git a/
In file_cbfs_next_file() there is a lot of complicated code to move to
the next file. Use the ALIGN() macros to simplify this.
Signed-off-by: Simon Glass
---
fs/cbfs/cbfs.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/fs/cbfs/cbfs.c b/fs/cbfs/cbfs.c
index a93dc3d0c1
The file traversal functions currently use a single global CBFS. In some
cases we need to access multiple CBFSs to obtain different files. Add new
functions to support this.
Signed-off-by: Simon Glass
---
fs/cbfs/cbfs.c | 11 +++
include/cbfs.h | 19 +--
2 files changed,
In some cases CBFS does not start with a header but is just a collection
of files. It is possible to support this so long as the size of the CBFS
is provided.
Update the cbfs_init_mem() function to support this.
Signed-off-by: Simon Glass
---
arch/x86/lib/fsp2/fsp_init.c | 3 ++-
fs/cbfs/cbfs
When U-Boot is booted from coreboot the SMBIOS tables are written by
coreboot, not U-Boot. The existing method of updating the BIOS version
string does not work in that case, since gd->smbios_version is only set
when U-Boot writes the tables.
Add a new function which allows the version to be updat
Rename this variable since there is no need to distinguish it from an old
node.
Signed-off-by: Simon Glass
---
fs/cbfs/cbfs.c | 32
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/fs/cbfs/cbfs.c b/fs/cbfs/cbfs.c
index abc43ad33f6..c9323a562c6 100
CBFS now supports attributes for things that cannot fit in the header as
originally conceived. Add the structures for these.
Also rename attributes_offset to something shorter, to ease code
readability.
Signed-off-by: Simon Glass
---
fs/cbfs/cbfs.c | 2 +-
include/cbfs.h | 39
The driver currently reads the card-detect but does not register it with
the MMC stack. Update this so that card-detect works as expected.
Signed-off-by: Simon Glass
---
drivers/mmc/pci_mmc.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/pci_mmc.c b/driver
We should not enable debugging by default. Drop this.
Signed-off-by: Simon Glass
---
drivers/sound/tegra_i2s.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/sound/tegra_i2s.c b/drivers/sound/tegra_i2s.c
index 5cf82250da2..932f737900e 100644
--- a/drivers/sound/tegra_i2s.c
+++ b/dri
Since the recent bug fix, it doesn't matter which GPIO phandle is used so
long as the GPIO number is right. Still, we may as well use the correct
one to avoid confusion.
Signed-off-by: Simon Glass
---
arch/x86/dts/chromebook_coral.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
At present the eMMC device does not have an alias so it appears after
the SD card which is device 1. There is no device 0 which is odd.
Make the eMMC device be the first one. Update the boot script to use the
new device.
Signed-off-by: Simon Glass
---
arch/x86/dts/chromebook_coral.dts | 1 +
The Intel GPIO binding allows GPIOs to be globally numbered, so that it
does not matter which GPIO bank is specified in the device tree. This is
convenient and avoid confusion since the banks do not have the same number
of GPIOs and the numbering is not sequential.
The GPIO uclass ensures that the
Add detailed information on how to build the coral image, since it needs
binary blobs. Provide a way to avoid the memory-training delay. Also show
the console output from a sample run.
Signed-off-by: Simon Glass
---
doc/board/google/chromebook_coral.rst | 234 --
1 file
We should not enable debugging by default. Drop this.
Signed-off-by: Simon Glass
---
drivers/misc/p2sb_emul.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/misc/p2sb_emul.c b/drivers/misc/p2sb_emul.c
index 973d02d6785..51f87161d5b 100644
--- a/drivers/misc/p2sb_emul.c
+++ b/drivers
This series contains various changes to improve U-Boots Coreboot
Filesystem (CBFS) implementation and the overall booting of U-Boot from
coreboot:
- CBFS compression, bare CBFSs
- More coreboot sysinfo parsing
- Command to display coreboot sysinfo
- Various other minor things
- Additional features
These GPIOs are needed later if Chromium OS verified boot is running,
so free them after use.
Signed-off-by: Simon Glass
---
board/google/chromebook_coral/coral.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/board/google/chromebook_coral/coral.c
b/board/google/chromebook_coral/coral.c
With Apollo Lake, SPL is placed in read-only memory. Set this new option
so that OF_PLATDATA_INST can be used.
Signed-off-by: Simon Glass
---
Changes in v4:
- Rebase to -next
arch/x86/cpu/apollolake/Kconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/cpu/apollolake/Kconfig b
These devices are not actually built in TPL but are currently active in
the TPL devicetree. For of-platdata-inst this means that we will try to
generate devices for them, which fails.
Update them to be active only in U-Boot proper.
Signed-off-by: Simon Glass
---
(no changes since v3)
Changes i
We don't use these in TPL or SPL, so drop them.
Signed-off-by: Simon Glass
---
(no changes since v3)
Changes in v3:
- Don't drop 'ranges' since we use the full PCI driver in SPL
configs/chromebook_coral_defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/configs/chromebook_coral_def
We don't normally need this driver in TPL/SPL, so drop it for now. It can
be enabled by individual boards if needed.
Signed-off-by: Simon Glass
---
(no changes since v1)
arch/x86/dts/reset.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/dts/reset.dtsi b/arch/x
With TPL we don't need full PCI support and it adds to code size. Instead,
a simple_bus driver is good enough to be able to read and write the PCI
config and do a little basic setup.
So at present there are two drivers in U-Boot called pci_x86. One is in
UCLASS_PCI, used in SPL and U-Boot proper.
With the standard of-platdata we must fix up driver_data manually. With
of-platadata-inst this is not necessary, since it is added to the device
by dtoc.
Update the code to handle this.
Signed-off-by: Simon Glass
---
(no changes since v1)
arch/x86/cpu/intel_common/itss.c | 5 +++--
1 file cha
This enum is needed to generate build-time devices. Tell dtoc where to
find the header, to avoid compile errors in the generated code.
Signed-off-by: Simon Glass
---
(no changes since v1)
arch/x86/cpu/apollolake/punit.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/cpu/apollolak
The dm.h header should come first. In fact it needs to, since otherwise
the driver model definitions are not available to dt-structs.h
Fix this, since it causes problems with OF_PLATDATA_INST.
Signed-off-by: Simon Glass
---
(no changes since v1)
arch/x86/cpu/apollolake/pmc.c | 2 +-
1 file ch
Add a description of the new features, along with internal technical
documentation.
Signed-off-by: Simon Glass
---
(no changes since v3)
Changes in v3:
- Add documentation for of-platdata-inst
doc/driver-model/of-plat.rst | 587 +++
1 file changed, 587 insertio
Collect this together in one place, so driver model can access set it up
in a new place if needed.
Signed-off-by: Simon Glass
---
(no changes since v1)
arch/x86/cpu/u-boot-spl.lds | 8
1 file changed, 8 insertions(+)
diff --git a/arch/x86/cpu/u-boot-spl.lds b/arch/x86/cpu/u-boot-spl.
This doc has a few pieces that are out-of-date. Fix these. Also we have
started to use 'devicetree' instead of 'device tree' or 'device-tree'
since it is easier to see as a single term, so replace all ocurrences
accordingly.
Also move the caveats to the end, since this is a fairly solid part of
U-
Add a warning to each of these functions so that people do not attempt to
use them outside driver model.
Signed-off-by: Simon Glass
---
(no changes since v3)
Changes in v3:
- Aew patch with warnings for private / platform setters
include/dm/device-internal.h | 18 ++
include/d
Make use of the new priv/plat data region if enabled. This is implemented
as a simple offset from the position set up by dtoc to the new position.
So long as all access goes through dm_priv_to_rw() this is safe.
Signed-off-by: Simon Glass
---
(no changes since v1)
drivers/core/device.c | 12 +
Collect this together in one place, so driver model can access set it up
in a new place if needed.
Signed-off-by: Simon Glass
---
(no changes since v1)
arch/sandbox/cpu/u-boot-spl.lds | 8
1 file changed, 8 insertions(+)
diff --git a/arch/sandbox/cpu/u-boot-spl.lds b/arch/sandbox/cpu
At present the device priv/data data allocated by dtoc is stored in the
data section along with other variables. On some platforms it is better
to allocate space for it separately, e.g. if SPL is running from read-only
memory.
Create a new space with the same size as that allocated by dtoc, ready
When of-platdata-inst is active, use the flags in the new udevice_rt
table, dropping them from the main struct udevice. This ensures that the
latter is not updated at runtime.
Signed-off-by: Simon Glass
---
(no changes since v2)
Changes in v2:
- Leave the flags_ memeber in the same struct posit
At present when driver model needs to change a device it simply updates
the struct udevice structure. But with of-platdata-inst most of the fields
are not modified at runtime. In fact, typically only the flags need to
change.
For systems running SPL from read-only memory it is convenient to separa
Some systems (e.g. x86 APL) run SPL from read-only memory. The device
instances created by dtoc are therefore not writeable. To make things work
we would need to copy the devices to read/write memory.
To avoid this, add an option to use a separate runtime struct for devices,
just as is done for dr
Add this new board to the test plans. Travis-CI is left out, since it is
being removed soon due to lack of capacity.
Signed-off-by: Simon Glass
---
(no changes since v1)
.azure-pipelines.yml | 3 +++
.gitlab-ci.yml | 10 +-
2 files changed, 12 insertions(+), 1 deletion(-)
diff
Run the tests on this build too, to prevent regressions.
Signed-off-by: Simon Glass
---
(no changes since v1)
test/run | 4
1 file changed, 4 insertions(+)
diff --git a/test/run b/test/run
index 735628e7e37..869406cd8d2 100755
--- a/test/run
+++ b/test/run
@@ -30,6 +30,10 @@ fi
run_test
Move sandbox_spl over to use OF_PLATDATA_INST. Create a new board to
test the case when this is not enabled, since we will be keeping that
code around for several months and want to avoid regressions.
Skip the dm_test_of_plat_dev() test since driver info is not available
for OF_PLATDATA_INST.
Sig
With recent changes this can be supported again. Add it back.
This reverts commit d85f2c4f2970d0ec2f5f075de734afd11200d153.
Signed-off-by: Simon Glass
---
(no changes since v1)
arch/sandbox/dts/sandbox.dtsi | 10 +++---
configs/sandbox_spl_defconfig | 1 +
drivers/i2c/Makefile |
At present the i2c emulators require access to the devicetree, which is
not possible (by design) with of-platdata.
Add a way for drivers to record the of-platdata index of their emulator,
so that we can still find the emulator.
This allows i2c emulation to work with of-platdata.
Signed-off-by: S
The test framework reinits driver model tests before running each test.
Since malloc_simple does not support free(), this eventually runs out of
memory.
Fix it for now by increasing the space to 32KB.
Signed-off-by: Simon Glass
Reviewed-by: Heinrich Schuchardt
---
(no changes since v1)
confi
This function finds a device by its driver_info index. With
of-platdata-inst we do not use driver_info, but instead instantiate
udevice records at build-time.
However the semantics of using the function are the same in each case:
the caller provides an index and gets back a device.
So rename the
At present the structs used by these drivers are declared in the C files
and so are not accessible to dtoc. Move them to header files, as required.
Signed-off-by: Simon Glass
---
(no changes since v1)
arch/sandbox/include/asm/i2c.h | 15 +++
arch/sandbox/include/asm/rtc.h | 24
At present this function is included in the build but with of-platdata it
only services to produce a confusing link error complaining about a call
to dev_read_u32_default().
Drop it so that any call to uclass_find_device_by_phandle() is flagged as
an error, making it easier to see what is going on
This function is now only used in a test. Drop it. Also drop
DM_DRVINFO_GET() which was the only purpose for having the function.
Signed-off-by: Simon Glass
---
(no changes since v3)
Changes in v3:
- Drop DM_DRVINFO_GET() also
drivers/core/device.c | 15 ---
include/dm/device.h
Create a version of this driver for sandbox so that it can use the
of-platdata struct.
Signed-off-by: Simon Glass
---
(no changes since v1)
arch/sandbox/dts/sandbox.dtsi | 2 +-
arch/sandbox/include/asm/clk.h | 8
drivers/clk/clk_sandbox.c | 33
We need to allow SoCs to create their own drivers for this so that they
can use their own of-platdata structs. To minimise code duplication,
export the driver operations and the ofdata_to_plat() setup function.
Signed-off-by: Simon Glass
---
(no changes since v1)
drivers/clk/clk_fixed_rate.c |
At present the structs used by this driver are not accessible outside it,
so cannot be used with OF_PLATDATA_INST. Move them to a header file to
fix this.
Signed-off-by: Simon Glass
---
(no changes since v1)
arch/sandbox/include/asm/clk.h | 16
drivers/clk/clk_sandbox.c |
It is not possible to destroy the uclasses when they are created at
build time. Skip this step so that SPL test can complete successfully.
Signed-off-by: Simon Glass
---
(no changes since v2)
Changes in v2:
- Update to deal with test refactoring series
test/test-main.c | 30 ++
When dt-structs.h is used, include the dt-decl.h header as well, so that
these declarations are available.
Signed-off-by: Simon Glass
---
(no changes since v1)
include/dt-structs.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/dt-structs.h b/include/dt-structs.h
index f0e1c9cb9
Now that dtoc generates some new C files, add these to the build so that
the instantiated devices and uclasses can be used.
Signed-off-by: Simon Glass
---
(no changes since v1)
scripts/Makefile.spl | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/scripts/Makefile.spl b/scr
With this we don't need to scan and bind drivers, not even the root
device. We just need to locate the root device that was set up at build
time, then set our root in global_data to point to it.
Update the code to handle this case.
Signed-off-by: Simon Glass
---
(no changes since v1)
drivers/
There is no need to ever add new uclasses since these are set up at build
time. Update the code to return an error if this is attempted.
Signed-off-by: Simon Glass
---
(no changes since v1)
drivers/core/uclass.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/co
When OF_PLATDATA_INST is enabled we don't need to create the uclass list.
Instead we just need to point to the existing list. Update the code
accordingly.
Signed-off-by: Simon Glass
---
(no changes since v1)
drivers/core/root.c | 8 ++--
include/dm/root.h | 3 +++
2 files changed, 9 inse
With OF_PLATDATA_INST devices are bound at build time. We should not need
binding of devices at runtime in most cases. However it is inflexible to
absolutely prohibit it, so add an option to control this.
Update the driver model core so that it does not bind devices. Update
device_bind() to return
Add macros which work with instantiated devices and uclasses, as created
at build time by dtoc. Include variants that can be used in data
structures.
These are mostly used by dtoc but it is worth documenting them fully for
the occasional case where they might come up in user code.
Signed-off-by:
This is not needed in normal operation. Drop it.
Signed-off-by: Simon Glass
Reviewed-by: Heinrich Schuchardt
---
(no changes since v1)
arch/sandbox/cpu/os.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/sandbox/cpu/os.c b/arch/sandbox/cpu/os.c
index 2d9583c17ca..68825d28d6a 100644
-
At present linker lists are designed for use in code. They make use of
statements within expressions ({...}), for example.
It is possible to generate a reference to a linker_list entry that can
be used in data structures, where such features are not permitted. It
requires that the reference first
We can use extern instead, so let's drop these macros. It adds one more
thing to learn about and doesn't make the code any clearer.
Signed-off-by: Simon Glass
---
(no changes since v3)
Changes in v3:
- Add new patch to drop DECL() macros from dtoc (to squash in)
tools/dtoc/dtb_platdata.py |
1 - 100 of 162 matches
Mail list logo