Move the code related to scanning for devices to bind, into a new
function. This will make it easier to skip this step with the new
of-platdata improvements.
Signed-off-by: Simon Glass
---
drivers/core/root.c | 49 -
1 file changed, 35 insertions(+),
It is useful to see the error code when this fails. Add logging for this
function.
Signed-off-by: Simon Glass
---
drivers/core/lists.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/core/lists.c b/drivers/core/lists.c
index 426444db3a9..e214306b904 100644
--- a/driv
At present the uclass list head is in global_data. This is convenient
but with the new of-platdata we need the list head to be declared by
the generated code.
Change this over to be a pointer. Provide a 'static' version in
global_data to retain the current behaviour.
Signed-off-by: Simon Glass
-
At present various driver model data structures are accessed outside the
core driver mode code. This makes it harder to adjust how certain values
are stored, which is needed for of-platdata.
This series updates several a few more fields so that they are only
accessed via functions.
This series al
At present ofnode is present in the device even if it is never used. With
of-platdata this field is not used, so can be removed. In preparation for
this, change the access to go through inline functions.
Signed-off-by: Simon Glass
---
arch/arm/mach-stm32mp/pwr_regulator.c | 2 +-
board/syn
Hi Martin,
Am 19.12.20 um 14:58 schrieb Martin Blumenstingl:
Hi Otto,
On Mon, Dec 14, 2020 at 8:34 PM Otto Meier wrote:
Hi Martin,
Am 13.12.20 um 19:46 schrieb Martin Blumenstingl:
Hi Otto,
On Mon, Dec 7, 2020 at 1:43 PM Otto Meier wrote:
[...]
So with the latest u-boot and the kernel fr
Hi Martin,
On Sat, 19 Dec 2020 at 19:29, Martin Blumenstingl
wrote:
>
> Hi Otto,
>
> On Mon, Dec 14, 2020 at 8:34 PM Otto Meier wrote:
> >
> > Hi Martin,
> >
> > Am 13.12.20 um 19:46 schrieb Martin Blumenstingl:
> > > Hi Otto,
> > >
> > > On Mon, Dec 7, 2020 at 1:43 PM Otto Meier wrote:
> > > [
On Sat, 19 Dec 2020 17:15:21 +0100
Torsten Duwe wrote:
> On Fri, 18 Dec 2020 21:41:28 +0300
> Anton Gorlov wrote:
>
> > Hi all.
> >
> > Are there any plans to support AXP803 power regulator in u-boot?
>
> Well, I already wrote some generic AXP driver, inspired by the code in
> the Linux kerne
Thank you!
20.12.2020 2:41, Torsten Duwe пишет:
On Sat, 19 Dec 2020 17:15:21 +0100
Torsten Duwe wrote:
On Fri, 18 Dec 2020 21:41:28 +0300
Anton Gorlov wrote:
Hi all.
Are there any plans to support AXP803 power regulator in u-boot?
Well, I already wrote some generic AXP driver, inspired
On Friday 11 December 2020 16:23:50 Lokesh Vutla wrote:
> Hi Pali,
>
> On 11/12/20 1:31 am, Pali Rohár wrote:
> > Hello Lokesh, could you please process this patch series? USB serial
> > console on Nokia N900 is really useful for debugging and currently in
> > U-Boot master code is broken. Pavel h
Hi Simon,
>-Original Message-
>From: Simon Glass
>Sent: 12 December 2020 21:05
>To: Pragnesh Patel
>Cc: U-Boot Mailing List ; Atish Patra
>; Palmer Dabbelt ; Bin
>Meng ; Paul Walmsley ( Sifive)
>; Anup Patel ; Sagar Kadam
>; rick ; Naoki Hayama
>; Marek Vasut ;
>Patrick Delaunay ; Adam F
From: Marc Ferland
Signed-off-by: Marc Ferland
---
drivers/i2c/mxc_i2c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c
index 7609594bd0..d486dab043 100644
--- a/drivers/i2c/mxc_i2c.c
+++ b/drivers/i2c/mxc_i2c.c
@@ -954,7 +954,7
Hi Otto,
On Mon, Dec 14, 2020 at 8:34 PM Otto Meier wrote:
>
> Hi Martin,
>
> Am 13.12.20 um 19:46 schrieb Martin Blumenstingl:
> > Hi Otto,
> >
> > On Mon, Dec 7, 2020 at 1:43 PM Otto Meier wrote:
> > [...]
> So with the latest u-boot and the kernel from
> https://github.com/chewitt/
Hi Marc,
On Sat, Dec 19, 2020 at 11:27 AM wrote:
>
> From: Marc Ferland
>
> Signed-off-by: Marc Ferland
> ---
> drivers/i2c/mxc_i2c.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c
> index 7609594bd0..d486dab043 100644
> -
From: Amit Singh Tomar
This series(v2) has few important updates, while loading large files we found
that MMC framework puts "0x1fffe00" into DMA Frame Length(DMA_FRAME_LEN 0x000C)
but register itself is limited to 24 bits and hence it was failing.
It is due to the wrong Block count(cfg->b_max) u
From: Amit Singh Tomar
This commit introduces get/set_rate callbacks, these are dummy at
the moment, and can be used to get/set clock for various devices
based on the clk id.
Signed-off-by: Amit Singh Tomar
---
Changes since previous version:
* Removed premature initialization to avoid
From: Amit Singh Tomar
This commit adds SD/MMC clocks, and provides .set/get_rate callbacks
for SD/MMC device present on Actions OWL S700 SoCs.
Signed-off-by: Amit Singh Tomar
---
Changes since previous version:
* Removed rate *= 2 as this just overclocks.
* Separated the divide
From: Amit Singh Tomar
This Synchronizes the Actions Semi S700 SoC DT changes from
commit "0477e9288185" ("Linux 5.10-rc7").
Signed-off-by: Amit Singh Tomar
---
Changes since previous version
* No change.
---
arch/arm/dts/s700.dtsi | 17 -
includ
From: Amit Singh Tomar
This patch adds node for ethernet controller found on Action Semi OWL
S700 SoC.
Since, upstream Linux binding has not been merged for S700 MMC/SD
controller, Changes are put in u-boot specific dtsi file.
Signed-off-by: Amit Singh Tomar
---
Changes since previous version
From: Amit Singh Tomar
This commit adds support for MMC controllers found on Actions OWL
S700 SoC platform.
Signed-off-by: Amit Singh Tomar
---
Changes since previous version
* Corrected block count to 512.
* Changed the command timeout value to 30ms.
* Used readl_poll_t
From: Amit Singh Tomar
This commits enables mmc on the Actions Cubieboard7 board.
Signed-off-by: Amit Singh Tomar
---
Changes since previous version
* No change
---
configs/cubieboard7_defconfig | 3 +++
1 file changed, 3 insertions(+)
diff --git a/configs/cubieboard7_defconfig b/conf
On Fri, 18 Dec 2020 21:41:28 +0300
Anton Gorlov wrote:
> Hi all.
>
> Are there any plans to support AXP803 power regulator in u-boot?
Well, I already wrote some generic AXP driver, inspired by the code in
the Linux kernel:
https://build.opensuse.org/source/home:duwe:Teres-I/u-boot/0103-Add-AXP
Update the driver model documention to describe how sequence numbers now
work.
Signed-off-by: Simon Glass
---
(no changes since v2)
Changes in v2:
- Update the docs to indicate all devices get a sequence number
- Update the docs to explain how aliases reserve sequence numbers
- Drop commit chan
Now that migration to the new sequence numbers is complete, drop the old
fields. Add a test that covers the new behaviour.
Also drop the check for OF_PRIOR_STAGE since we always assign sequence
numbers now.
Signed-off-by: Simon Glass
---
(no changes since v2)
Changes in v2:
- Adjust the tests
Several commands use sequence numbers. Update them to use the new ones.
Signed-off-by: Simon Glass
---
(no changes since v1)
cmd/axi.c | 4 ++--
cmd/i2c.c | 2 +-
cmd/osd.c | 4 ++--
drivers/core/dump.c | 4 ++--
4 files changed, 7 insertions(+), 7 deletions(-)
A
This function current deals with req_seq which is deprecated. Update it to
use the new sequence numbers, putting them above existing aliases. Rename
the function to make this clear.
Signed-off-by: Simon Glass
---
(no changes since v2)
Changes in v2:
- Update for new logic
- Adjust commit messag
This function is not needed anymore. Drop it.
Signed-off-by: Simon Glass
---
(no changes since v1)
drivers/core/device.c | 8
drivers/core/uclass.c | 39 ---
include/dm/uclass.h | 15 ---
3 files changed, 62 deletions(-)
Applied to u
Update this function to use the new sequence number and fix up the test
that deals with this.
Signed-off-by: Simon Glass
---
(no changes since v2)
Changes in v2:
- Adjust the tests to handle the new allocation scheme
- Drop the networking changes which are no-longer needed
arch/sandbox/dts/te
Check that this flag operates as expected. This patch is not earlier in
this series since is uses the new behaviour of dev_seq().
Signed-off-by: Simon Glass
---
Changes in v3:
- Add new patch to test DM_UC_FLAG_NO_AUTO_SEQ
arch/sandbox/dts/test.dts | 13
include/dm/uclass-id.h
Use the dev_seq() sequence number in all cases.
Signed-off-by: Simon Glass
---
(no changes since v1)
drivers/pinctrl/exynos/pinctrl-exynos.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Applied to u-boot-dm/next, thanks!
Use the dev_seq() sequence number in all cases.
Signed-off-by: Simon Glass
---
(no changes since v1)
drivers/gpio/imx_rgpio2p.c | 2 +-
drivers/gpio/iproc_gpio.c | 2 +-
drivers/gpio/mvebu_gpio.c | 2 +-
drivers/gpio/mxc_gpio.c| 2 +-
drivers/gpio/vybrid_gpio.c | 2 +-
5 files changed, 5
There is no-longer any need to check if sequence numbers are valid, since
this is ensured by driver model. Drop the unwanted logic.
Signed-off-by: Simon Glass
---
(no changes since v1)
lib/acpi/acpi_device.c | 27 +++
test/dm/acpi.c | 6 +-
2 files changed,
This hack cannot work in the new sequence-numbering scheme. Remove it
while we wait for the maintainer to complete DM conversion as noted in
the existing comment.
Signed-off-by: Simon Glass
---
(no changes since v1)
drivers/usb/host/ehci-mx6.c | 12 +---
1 file changed, 9 insertions(+)
Use the new sequence number in all cases. Since all devices are assigned
a number when bound, this hack should not be needed.
Signed-off-by: Simon Glass
---
(no changes since v1)
drivers/usb/host/ehci-vf.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
Applied to u-boot-dm/next,
Use the new sequence number in all cases. Drop the logic to check for a
valid number in designware_i2c, since it will always be valid.
Also drop the numbering in the uclass, since we can rely on driver
model giving us the right sequence numbers.
Signed-off-by: Simon Glass
---
(no changes since
Some buses have their own rules which require assigning sequence numbers
with a bus-specific algorithm. For example, PCI requires that sub-buses
are numbered higher than their parent buses, meaning effectively that
parent buses must be numbered only after all of their child buses have
been numbered
Now that we know the sequence number at bind time, there is no need for
special-case code in dm_pci_hose_probe_bus().
Note: the PCI_CAP_ID_EA code may need a look, but there are no test
failures so I have left it as is.
Signed-off-by: Simon Glass
---
Changes in v3:
- Update PCI to use manual se
Checking for seq == -1 is effectively checking that the device is
activated. The new sequence numbers are never -1 for a bound device, so
update the check.
Also drop the note about valid sequence numbers so it is accurate with the
new approach.
Signed-off-by: Simon Glass
---
(no changes since v
Several Octeon drivers operate by setting the sequence number of their
device. This should not be needed with the new sequence number setup. Also
it is not permitted. Drop it.
Signed-off-by: Simon Glass
---
(no changes since v1)
drivers/i2c/octeon_i2c.c | 1 -
drivers/mmc/octeontx_hsmmc.c
Drop code in a few tests which assumes that sequence numbers are only
valid when a device is probed.
Signed-off-by: Simon Glass
---
(no changes since v1)
test/dm/blk.c | 3 ---
test/dm/i2c.c | 3 ---
test/dm/spi.c | 3 ---
3 files changed, 9 deletions(-)
Applied to u-boot-dm/next, thanks!
This should return 0 on success but currently does not. Fix it.
Signed-off-by: Simon Glass
---
(no changes since v1)
drivers/core/read.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Applied to u-boot-dm/next, thanks!
At present each device has two sequence numbers, with 'req_seq' being
set up at bind time and 'seq' at probe time. The idea is that devices
can 'request' a sequence number and then the conflicts are resolved when
the device is probed.
This makes things complicated in a few cases, since we don't re
At present this is passed a uclass ID and it has to do a lookup. The
callers all have the uclass pointer, except for the I2C uclass where the
code will soon be deleted.
Update the argument to a uclass * instead of an ID since it is more
efficient.
Signed-off-by: Simon Glass
---
(no changes sinc
Add a test that the new sequence numbers work as expected. Every device
should get one.
Signed-off-by: Simon Glass
---
(no changes since v2)
Changes in v2:
- Drop the GD_FLG_DM_NO_SEQ flag
test/dm/core.c | 19 +++
1 file changed, 19 insertions(+)
Applied to u-boot-dm/next, th
Now that there is only one sequence number (rather than both requested and
assigned ones) we can simplify this function. Also update its caller to
simplify the logic.
Signed-off-by: Simon Glass
---
(no changes since v1)
arch/arm/mach-k3/am6_init.c | 2 +-
arch/arm/mach-k3/j721e_init.c |
At present various drivers etc. access the device's 'seq' member directly.
This makes it harder to change the meaning of that member. Change access
to go through a function instead.
The drivers/i2c/lpc32xx_i2c.c file is left unchanged for now.
Signed-off-by: Simon Glass
---
(no changes since v1
The linker script uses alphabetic sorting to group the different linker
lists together. Each group has its own struct and potentially its own
alignment. But when the linker packs the structs together it cannot ensure
that a linker list starts on the expected alignment boundary.
For example, if the
Now that sequence numbers are set up when devices are bound, this code is
not needed. Also, we should use dev_seq() instead of req_seq. Update the
whole file accordingly.
Also fix up APL cpu while we are here.
Signed-off-by: Simon Glass
---
(no changes since v1)
arch/x86/cpu/apollolake/cpu.c
Use the new sequence number in all cases. Drop the rockchip case because
the sequence number should be 0 anyway, and assigning to the sequence
number is not permitted.
Signed-off-by: Simon Glass
---
(no changes since v1)
drivers/spi/fsl_dspi.c | 2 +-
drivers/spi/rk_spi.c | 1 -
2 files chan
Update the core logic to use the new approach. For now the old code is
left as is. Update one test so it still passes.
Signed-off-by: Simon Glass
---
(no changes since v1)
drivers/core/device.c | 5 +
test/dm/bus.c | 3 ++-
2 files changed, 3 insertions(+), 5 deletions(-)
Applied
Move this struct into a header file so that dtoc can include it in its
dt-platdata.c file.
Signed-off-by: Simon Glass
---
arch/sandbox/include/asm/serial.h | 30 ++
drivers/serial/sandbox.c | 16 +---
2 files changed, 31 insertions(+), 15 deletio
Move this struct into a header file so that dtoc can include it in its
dt-platdata.c file.
Signed-off-by: Simon Glass
---
arch/sandbox/include/asm/i2c.h | 14 ++
drivers/i2c/sandbox_i2c.c | 5 +
2 files changed, 15 insertions(+), 4 deletions(-)
create mode 100644 arch/san
At present there are require a few devices in the devicetree which are
not actually used in SPL. This will cause problems with the new
of-platdata, since it will try to instantiate devices which are not
compiled into U-Boot.
Update the devicetree to remove these devices from SPL.
Signed-off-by: S
With the new of-platdata, these need to be available to dt_platdata.c
so must be in header files. Move them.
Signed-off-by: Simon Glass
---
arch/x86/cpu/apollolake/hostbridge.c | 20 +
arch/x86/cpu/apollolake/pmc.c | 8 +-
arch/x86/include/asm/arch-apol
At present this driver does not have a compatible string. For it to be
used with the coming of-platadata, it must have one. Update it
accordingly.
Signed-off-by: Simon Glass
---
drivers/misc/spltest_sandbox.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/misc/spltest_sandbox
With the new of-platdata, these need to be available to dt_platdata.c
so must be in header files. Move them.
Signed-off-by: Simon Glass
---
arch/x86/cpu/intel_common/itss.c | 19 ---
arch/x86/cpu/intel_common/p2sb.c | 9 +
arch/x86/include/asm/itss.h | 21 +
With the new of-platdata, these need to be available to dt_platdata.c
so must be in header files. Move them.
Signed-off-by: Simon Glass
---
drivers/spi/ich.c | 11 ---
drivers/spi/ich.h | 11 +++
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/spi/ich.c
This code is a bit odd in that it only reads and updates the livetree
version of the device ofnode. This means it won't work with flattree.
Update the code to work as it was presumably intended.
Signed-off-by: Simon Glass
---
drivers/mtd/nand/spi/core.c | 2 +-
include/linux/mtd/mtd.h | 9
The #define of one struct to another has been around for a while. It
confuses dtoc and makes it think that struct spi_flash does not exist.
Make a few changes to improve things while we wait for migration to be
completed:
- Move the 'struct spi_flash' to column 1 so dtoc scans it
- Remove the #de
This construct effectively uses struct spi_nor due to a #define in
spi-nor.h so we may as well use that struct here. This allows dtoc to
parse it correctly.
Signed-off-by: Simon Glass
---
arch/x86/cpu/apollolake/spl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/
With the new of-platdata, these need to be available to dt_platdata.c
so must be in header files. Move them.
Signed-off-by: Simon Glass
---
drivers/core/simple-bus.c | 7 +--
include/dm/simple_bus.h | 15 +++
2 files changed, 16 insertions(+), 6 deletions(-)
create mode 1006
With the new of-platdata, these need to be available to dt_platdata.c
so must be in header files. Move them and add the dtd struct too.
Signed-off-by: Simon Glass
---
arch/x86/include/asm/sysreset.h | 18 ++
drivers/sysreset/sysreset_x86.c | 5 +
2 files changed, 19 inserti
Some devices are not needed in SPL/TPL. For TPL this causes the
generation of unnecessary of-platadata structs. Make some adjustments to
fix this.
Signed-off-by: Simon Glass
---
arch/x86/dts/chromebook_coral.dts | 17 +++--
1 file changed, 11 insertions(+), 6 deletions(-)
diff --gi
The RTC is not currently used in SPL. Drop it so that it does not take up
space.
Signed-off-by: Simon Glass
---
arch/x86/dts/rtc.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/dts/rtc.dtsi b/arch/x86/dts/rtc.dtsi
index d0bbd84e509..942cc937dc4 100644
--- a/arc
At present this driver calls malloc() to start a new platform data
structure, fills it in and tells driver model to use it.
We want to avoid malloc, particularly with the new version of of-platdata.
Create a new struct which encompasses both the dtd struct and the ns16550
one, to avoid this. Unfor
Add a new function to handle the allocation of private/platform data for
a device. This will make it easier to skip this feature when using the new
of-platdata.
Signed-off-by: Simon Glass
---
drivers/core/device.c | 89 +--
1 file changed, 52 insertions(+
Now that the sequence-numbering migration is complete, rename this member
back to seq_, adding an underscore to indicate it is internal to driver
model.
Signed-off-by: Simon Glass
---
drivers/core/device.c| 8
drivers/core/dump.c | 2 +-
drivers/core/uclass.c| 8
To avoid having people accidentally access this member, add a trailing
underscore.
Signed-off-by: Simon Glass
---
include/dm/device.h | 17 +
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/include/dm/device.h b/include/dm/device.h
index 4ec423e9618..a0c1752cddc 10
We have two functions which do the same thing. Standardise on
dev_has_ofnode() since there is no such thing as an 'invalid' ofnode in
normal operation: it is either null or missing.
Also move the functions into one place.
Signed-off-by: Simon Glass
---
drivers/clk/clk-uclass.c| 2
We use 'ofnode' rather than 'of_node' in U-Boot. Rename this function to
fit.
Signed-off-by: Simon Glass
---
drivers/core/device.c| 2 +-
drivers/mmc/octeontx_hsmmc.c | 2 +-
drivers/pinctrl/pinctrl-uclass.c | 2 +-
drivers/usb/host/usb-uclass.c| 2 +-
include/dm/device.h
At present flags are stored as part of the device. In preparation for
storing them separately, change the access to go through inline functions.
Signed-off-by: Simon Glass
---
cmd/remoteproc.c | 2 +-
drivers/clk/clk.c| 2 +-
drivers/core/device-remove.
To avoid having people accidentally access this member, add a trailing
underscore. Also remove it when of-platdata is enabled, since it is not
used.
Signed-off-by: Simon Glass
---
include/dm/device.h | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/include/dm/devi
72 matches
Mail list logo