Some devices (particularly bus devices) must track their children, knowing
when a new child is added so that it can be set up for communication on the
bus.
Add a child_pre_probe() method to provide this feature, and a corresponding
child_post_remove() method.
Signed-off-by: Simon Glass
---
Chan
Don't allow access to uclasses before they have been initialised.
Signed-off-by: Simon Glass
---
Changes in v2: None
doc/driver-model/README.txt | 3 ++-
drivers/core/uclass.c | 2 ++
test/dm/core.c | 14 ++
3 files changed, 18 insertions(+), 1 deletion(-)
dif
Add a new method which removes and unbinds all drivers.
Signed-off-by: Simon Glass
Acked-by: Marek Vasut
---
Changes in v2: None
drivers/core/root.c | 8
include/dm/root.h | 8
2 files changed, 16 insertions(+)
diff --git a/drivers/core/root.c b/drivers/core/root.c
index
Aliases are used to provide U-Boot's numbering of devices, such as:
aliases {
spi0 = "/spi@1233";
}
spi@1233 {
...
}
This tells us that the SPI controller at 1233 is considered to be the
first SPI controller (SPI 0). So we have a numbering for the SPI node.
Add a fun
Devices can have childen that can be addressed by a simple index, the
sequence number or a device tree offset. Add functions to access a child
in each of these ways.
The index is typically used as a fallback when the sequence number is not
available. For example we may use a serial UART with seque
Each device that was bound from a device tree has an node that caused it to
be bound. Add functions that find and return a device based on a device tree
offset.
Signed-off-by: Simon Glass
---
Changes in v2: None
doc/driver-model/README.txt | 3 ++-
drivers/core/uclass.c | 35 +++
Some device types can have child devices and want to store information
about them. For example a USB flash stick attached to a USB host
controller would likely use this space. The controller can hold
information about the USB state of each of its children.
The data is stored attached to the child
At present only root nodes in the device tree are scanned for devices.
But some devices can have children. For example a SPI bus may have
several children for each of its chip selects.
Add a function which scans subnodes and binds devices for each one. This
can be used for the root node scan also,
The current functions for adding and removing devices require a device name.
This is not convenient for driver model, which wants to store a pointer to
the relevant device. Add new functions which provide this feature and adjust
the old ones to call these.
Signed-off-by: Simon Glass
---
Changes
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 init
If the console is not present, we try to reduce overhead by stopping any
output in vprintf(), before it gets to putc(). This is of dubious merit
in general, but in the case of sandbox it is incorrect since we have a
fallback console which reports errors very early in U-Boot. If this is
defeated U-B
Add a debug message for when a device tree node has no driver. Also reword
the warning when a device fails to bind, which was misleading.
Signed-off-by: Simon Glass
---
Changes in v2: None
drivers/core/lists.c | 16 +---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git
Uclasses should be named, so add a name for the demo uclass.
Signed-off-by: Simon Glass
---
Changes in v2:
- Expand series to include all driver-model-required changes
drivers/demo/demo-uclass.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/demo/demo-uclass.c b/drivers/demo/demo-
Add this information to 'dm tree' and 'dm uclass' commands.
Signed-off-by: Simon Glass
---
Changes in v2: None
test/dm/cmd_dm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/test/dm/cmd_dm.c b/test/dm/cmd_dm.c
index 93e5255..26980d2 100644
--- a/test/dm/cmd_dm.c
+++ b/test/dm/cmd_dm.c
For sandbox we have a fallback console which is used very early in
U-Boot, before serial drivers are available. Rather than try to guess
when to switch to the real console, add a flag so we can be sure. This
makes sure that sandbox can always output a panic() message, for example,
and avoids silent
At present stdio device functions do not get any clue as to which stdio
device is being acted on. Some implementations go to great lengths to work
around this, such as defining a whole separate set of functions for each
possible device.
For driver model we need to associate a stdio_dev with a devi
Initialise devices marked 'pre-reloc' and make them available prior to
relocation. Note that this requires pre-reloc malloc() to be available.
Signed-off-by: Simon Glass
---
Changes in v2:
- Minor reword to comment for dm_init_and_scan()
common/board_f.c | 16
Several functions will use this same pattern, so bring it into a function.
Signed-off-by: Simon Glass
---
Changes in v2: None
drivers/core/uclass.c | 28 ++--
1 file changed, 22 insertions(+), 6 deletions(-)
diff --git a/drivers/core/uclass.c b/drivers/core/uclass.c
in
This command currently activates devices as it lists them. This is not
desirable since it changes the system state. Fix it and avoid printing
a newline if there are no devices in a uclass.
Signed-off-by: Simon Glass
---
Changes in v2: None
test/dm/cmd_dm.c | 6 +++---
1 file changed, 3 inserti
The device display for 'dm tree' and 'dm uclass' is mostly the same, so
move it into a common function.
Signed-off-by: Simon Glass
---
Changes in v2: None
test/dm/cmd_dm.c | 27 +++
1 file changed, 19 insertions(+), 8 deletions(-)
diff --git a/test/dm/cmd_dm.c b/test/d
There is no point in setting a structure's memory to NULL when it has
already been zeroed with memset().
Also, there is no need to create a stub function for stdio to call - if the
function is NULL it will not be called.
This is a clean-up, with no change in functionality.
Signed-off-by: Simon G
Rather than reusing the 'reg' property, use an explicit property for the
expected ping value used in testing.
Signed-off-by: Simon Glass
---
Changes in v2: None
test/dm/test-fdt.c | 13 -
test/dm/test.dts | 5 -
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a
The root device should be probed just like any other device. The effect of
this is to mark the device as activated, so that it can be removed (along
with its children) if required.
Signed-off-by: Simon Glass
Acked-by: Marek Vasut
---
Changes in v2: None
drivers/core/root.c | 3 +++
test/dm/co
Drivers are supposed to be able to close down cleanly. To set a good example,
make sandbox shut down its driver model drivers and remove them before exit.
It may be desirable to do the same more generally once driver model is more
widely-used. This could be done during bootm, before U-Boot jumps t
Some boards will have devices which are not in the device tree and do not
have platform data. They may be programnatically created, for example.
Add a hook which boards can use to bind those devices early in boot.
Signed-off-by: Simon Glass
---
Changes in v2: None
drivers/core/root.c | 8
In U-Boot it is pretty common to number devices from 0 and access them
on the command line using this numbering. While it may come to pass that
we will move away from this numbering, the possibility seems remote at
present.
Given that devices within a uclass will have an implied numbering, it
make
This simple function returns the node offset of a named alias.
Signed-off-by: Simon Glass
---
Changes in v2: None
include/fdtdec.h | 11 +++
lib/fdtdec.c | 15 +++
2 files changed, 26 insertions(+)
diff --git a/include/fdtdec.h b/include/fdtdec.h
index f454f7e..856e6cf
Driver model does not support SPL yet, so we should not use the GPIO
uclass for SPL.
Signed-off-by: Simon Glass
---
Changes in v2: None
drivers/gpio/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile
index 4e001e1..fb8dcd9 100644
--- a/
Fix up the style of a few comments and add/clarify a few others.
Signed-off-by: Simon Glass
---
Changes in v2: None
include/dm/device.h| 2 +-
include/dm/platdata.h | 10 --
include/dm/root.h | 3 ++-
include/dm/uclass-id.h | 2 +-
include/dm/uclass.h| 2 +-
5 files c
This series includes a number of base driver model enhancements, mostly
targeted at pre-relocation and to enable buses to be easily implemented.
With the device tree, child nodes for buses can now be scanned to create
child devices, and bus-related information about each child can be
stored. Child
Hi Simon,
On Mon, 7 Jul 2014 16:44:36 -0600
Simon Glass wrote:
>
> But see question below.
> > diff --git a/mkconfig b/mkconfig
> > index 2bf5897..401f262 100755
> > --- a/mkconfig
> > +++ b/mkconfig
> > @@ -55,6 +55,11 @@ CONFIG_NAME="${7%_config}"
> > arch="$2"
> > cpu=`echo $3 | awk 'BEGI
Hi Pekon,
On Mon, Jul 7, 2014 at 11:19 PM, Gupta, Pekon wrote:
> Sorry seeing this bit late. Were you able to root cause the issue ?
Did you see http://patchwork.ozlabs.org/patch/356984/ ?
This resolves the issue for me but I'd welcome any feedback you have
on this fix.
...
> Also, the change in
Works for me on the Pepper board. Thanks for the fix!
Tested-By: Ash Charles
On Mon, Jul 7, 2014 at 6:40 PM, Tom Rini wrote:
> As noted by clang, we have been shifting certain values out of 32bit
> range when setting some DDR registers. Upon further inspection these
> had been touching reserv
We are working with the Broadcom BCM84834 PHY (4-port 10G-BASE-T) being
controlled by a Freescale T4240. The 84834 needs firmware in order to
operate. The device can either load its firmware from MDIO or from a SPI
EEPROM. Once loaded via MDIO, the PHY can write its new firmware to
EEPROM for f
This driver add support for STMicroelectronics ST33ZP24 SPI TPM.
Driver support 2 SPI TPMs.
Driver support also hash in Locality 4 feature (the only way to
update PCR17).
---
README | 29 ++
common/cmd_tpm.c | 63 +++-
drivers/tpm/Makefile |1
On 08-07-14 21:20, Ian Campbell wrote:
Hi Tom
Sending to you for #next in Albert's absence.
The following changes since commit 23f23f23d509e8e873797884456070c8a47d72b2:
socfpga: Relocate arch common functions away from board (2014-07-05 10:14:46
+0200)
are available in the git repository
Signed-off-by: Roman Byshko
---
drivers/usb/host/Makefile | 1 +
drivers/usb/host/ehci-sunxi.c | 236 ++
2 files changed, 237 insertions(+)
create mode 100644 drivers/usb/host/ehci-sunxi.c
diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Ma
Signed-off-by: Roman Byshko
---
include/configs/sun7i.h | 8
1 file changed, 8 insertions(+)
diff --git a/include/configs/sun7i.h b/include/configs/sun7i.h
index 9b693f7..0a1d83e 100644
--- a/include/configs/sun7i.h
+++ b/include/configs/sun7i.h
@@ -16,6 +16,14 @@
#define CONFIG_SYS_
Signed-off-by: Roman Byshko
---
boards.cfg | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/boards.cfg b/boards.cfg
index f16a0e6..e039d4c 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -377,7 +377,7 @@ Active arm armv7 rmobile renesas
lager
Active
Signed-off-by: Roman Byshko
---
arch/arm/include/asm/arch-sunxi/clock_sun4i.h | 4
1 file changed, 4 insertions(+)
diff --git a/arch/arm/include/asm/arch-sunxi/clock_sun4i.h
b/arch/arm/include/asm/arch-sunxi/clock_sun4i.h
index 928f3f2..fe7348a 100644
--- a/arch/arm/include/asm/arch-sunxi/
This patch series adds USB Host EHCI support to the sun7i SoC. It was
tested on Cubietruck. Now you could boot from a USB stick or use a
compatible Ethernet dongle to add a second Ethernet port in U-Boot.
ehci-sunxi.c contains some code for poking GPIOs. This code will go
away once some other patc
Signed-off-by: Roman Byshko
---
include/configs/sunxi-common.h | 6 ++
1 file changed, 6 insertions(+)
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 5d72d62..c7746bb 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -181,
Hello Simon,
On 08-07-14 20:41, Simon Glass wrote:
Hi Jeroen,
On 8 July 2014 11:13, Jeroen Hofstee wrote:
diff --git a/arch/arm/include/asm/config.h b/arch/arm/include/asm/config.h
index 2a20a77..abf79e5 100644
--- a/arch/arm/include/asm/config.h
+++ b/arch/arm/include/asm/config.h
@@ -7,8 +7
Hi Tom
Sending to you for #next in Albert's absence.
The following changes since commit 23f23f23d509e8e873797884456070c8a47d72b2:
socfpga: Relocate arch common functions away from board (2014-07-05 10:14:46
+0200)
are available in the git repository at:
git://git.denx.de/u-boot-sunxi.git
Hi Jeroen,
On 8 July 2014 11:13, Jeroen Hofstee wrote:
> Hello Simon,
>
>
> On 08-07-14 01:19, Simon Glass wrote:
>>
>> At present arm defines CONFIG_SYS_GENERIC_GLOBAL_DATA, meaning that
>> the global_data pointer is set up in board_init_f(). However it is
>> actually set up before this, it just
On 26 June 2014 12:18, Jeroen Hofstee wrote:
> This not only looks a bit better it also prevents a
> warning with W=1 (no previous prototype).
>
> Signed-off-by: Jeroen Hofstee
Acked-by: Simon Glass
___
U-Boot mailing list
U-Boot@lists.denx.de
http://
On 23 June 2014 15:20, Jeroen Hofstee wrote:
> First of all this looks a lot better, but it also
> prevents a gcc warning (W=1), that the weak function
> has no previous prototype.
>
> cc: Simon Glass
> Signed-off-by: Jeroen Hofstee
Build tested for sandbox and a few ARM boards.
Acked-by: Simo
Hi there,
I am trying to use the uboot-env.bin that I created using my uboot env
settings. My question is how do I point uboot to use this newly generated
settings file while loading up the environment ?
Thanks,
___
U-Boot mailing list
U-Boot@lists.d
On 07/04/2014 05:31 AM, Mark Rutland wrote:
> Hi York,
>
> I spotted a couple of generic issues below. Most of these are issues
> with the existing code that you happen to be moving around, rather than
> with the new code this patch introduces.
>
> There are a couple of gotchas around secondary s
Hello Simon,
On 08-07-14 01:19, Simon Glass wrote:
At present arm defines CONFIG_SYS_GENERIC_GLOBAL_DATA, meaning that
the global_data pointer is set up in board_init_f(). However it is
actually set up before this, it just isn't zeroed.
If we zero the global data before calling board_init_f() t
On Tue, Jul 8, 2014 at 6:08 AM, Stefano Babic wrote:
> On 24/06/2014 22:40, Fabio Estevam wrote:
>> From: Fabio Estevam
>>
>> mx6solox is the newest member of the mx6 family.
>>
>> Some of the new features on this variants are:
>> - Cortex M4 microcontroller (besides the CortexA9)
>> - Dual Gigab
On Tue, Jul 08, 2014 at 08:23:11AM +0100, Ian Campbell wrote:
> On Mon, 2014-07-07 at 16:45 -0400, Tom Rini wrote:
> > On Mon, Jul 07, 2014 at 09:23:13PM +0100, Ian Campbell wrote:
> > > On Mon, 2014-07-07 at 12:47 -0400, Tom Rini wrote:
> > > > That's not how we like things to look however when we
On 07/08/2014 02:32 PM, Helmut Raiger wrote:
On 07/08/2014 10:05 AM, Helmut Raiger wrote:
I meant, that the SPL is now doing the RAM init and copying of the
SPL code
correctly. RAM is working, the SPL code is at 0x87dc after that
(CRCed it via JTAG).
I could not track it further (I have v
On 07/08/2014 10:05 AM, Helmut Raiger wrote:
I meant, that the SPL is now doing the RAM init and copying of the SPL
code
correctly. RAM is working, the SPL code is at 0x87dc after that
(CRCed it via JTAG).
I could not track it further (I have very limited development time
right now ... re
Hi,
According to my calculations, as of commit 80a7cac we now have more
than 238 boards converted to generic board, out of 1171. That is a
little over 20%, which is a big improvement from last release. I am
unable to include MIPS or ARM64 so it is an under-estimate.
./tools/buildman/buildman -b
On Sun 2014-06-22 17:09:28, Nikolay Dimitrov wrote:
> Hi Gabriel,
>
> >This allows u-boot to load different OS or Bare Metal application on the
> >different cores of the i.MX6DQ.
> >For example: we can run Android on cpu0 and a RT OS like QNX/FreeRTOS on
> >cpu1.
>
> I think this explanation is
> > If someone really wants such a trial and error approach, he can still
> > do this without adding code that affects everybody with just a little
> > scripting - like "bootm $addr || bootz $addr || ...".
>
> That's not the usecase really. The usecase is roughly "I just want to
> boot what the
Hi Gabriel,
On 25/06/2014 04:32, Gabriel Huau wrote:
> This allows u-boot to load different OS or Bare Metal application on the
> different cores of the i.MX6DQ.
> For example: we can run Android on cpu0 and a RT OS like QNX/FreeRTOS on cpu1.
>
> Signed-off-by: Gabriel Huau
> ---
> Changes for v
On 24/06/2014 22:41, Fabio Estevam wrote:
> From: Fabio Estevam
>
> mx6sx does not have sata nor ipu blocks, so do not handle such clocks.
>
> Signed-off-by: Fabio Estevam
> ---
Applied to u-boot-imx, -next branch, thanks !
Best regards,
Stefano Babic
--
==
On 24/06/2014 22:41, Fabio Estevam wrote:
> From: Fabio Estevam
>
> Signed-off-by: Fabio Estevam
> ---
Applied to u-boot-imx, -next branch, thanks !
Best regards,
Stefano Babic
--
=
DENX Software Engineering GmbH, MD: W
On 24/06/2014 22:40, Fabio Estevam wrote:
> From: Fabio Estevam
>
> mx6solox is the newest member of the mx6 family.
>
> Some of the new features on this variants are:
> - Cortex M4 microcontroller (besides the CortexA9)
> - Dual Gigabit Ethernet
>
> Add the initial support for it.
>
> Signed-
On 24/06/2014 22:40, Fabio Estevam wrote:
> From: Fabio Estevam
>
> Add the pin definitions for mx6sx.
>
> Signed-off-by: Fabio Estevam
> ---
Applied to u-boot-imx, -next branch, thanks !
Best regards,
Stefano Babic
--
=
D
Hi Fabio,
On 07/07/2014 16:18, Fabio Estevam wrote:
> Hi Stefano,
>
> On Thu, Jul 3, 2014 at 3:22 PM, Fabio Estevam wrote:
>> Hi Stefano,
>>
>> On Thu, Jul 3, 2014 at 4:15 AM, Stefano Babic wrote:
>>
>>> I have only taken a short look because the series should flow after
>>> 2014.07. Anyway, I
On 07/03/2014 10:58 PM, Benoît Thébaudeau wrote:
Hi,
On Thu, Jul 3, 2014 at 10:19 AM, Helmut Raiger wrote:
On 07/03/2014 01:20 AM, Benoît Thébaudeau wrote:
)Dear Helmut Raiger,
On Wed, Jul 2, 2014 at 9:04 AM, Helmut Raiger
wrote:
the commit 41623c91 breaks the SPL on i.mx31 platform
Hi Stephen,
> From: Stephen Warren
>
> The buffer is too small if it's < size to read, not if it's <= the
> size. This fixes the 1MB test case on Tegra, which has a 1MB buffer.
>
> Signed-off-by: Stephen Warren
> ---
> drivers/dfu/dfu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Hi Stephen,
> From: Stephen Warren
>
> On Tegra, the DFU buffer size is 1M. Consequently, the 8M test always
> fails. Add tests for the 1M size, and one byte less as a corner case,
> so that some large tests are executed and expected to pass.
>
> Signed-off-by: Stephen Warren
> ---
> test/dfu
Hi Stephen,
> From: Stephen Warren
>
> Call cleanup() before running tests too. If a previous test was
> CTRL-C'd some stale files may have been left around. dfu-util refuses
> to receive a file to a filename that already exists, which results in
> false test failures if the files aren't cleaned
Hi,
On 07/07/2014 10:23 PM, Ian Campbell wrote:
> On Mon, 2014-07-07 at 12:47 -0400, Tom Rini wrote:
>> That's not how we like things to look however when we can help it. Just
>> toss a __maybe_unused in front of the declaration (and make sure we have
>> included.
>
> OK. How about the followin
Hi,
On 07/07/2014 05:13 PM, Ian Campbell wrote:
> On Mon, 2014-07-07 at 14:53 +0200, Hans de Goede wrote:
>> Hi,
>>
>> On 07/06/2014 09:26 PM, Ian Campbell wrote:
>>> On Mon, 2014-06-09 at 11:36 +0200, Hans de Goede wrote:
adds sun4i and sun5i support
>>>
>>> Does this series omit FEL mode su
On Mon, 2014-07-07 at 16:45 -0400, Tom Rini wrote:
> On Mon, Jul 07, 2014 at 09:23:13PM +0100, Ian Campbell wrote:
> > On Mon, 2014-07-07 at 12:47 -0400, Tom Rini wrote:
> > > That's not how we like things to look however when we can help it. Just
> > > toss a __maybe_unused in front of the declar
70 matches
Mail list logo