| #
02eeb1bb |
| 05-Mar-2015 |
Simon Glass <sjg@chromium.org> |
dm: core: Mark device as active before calling its probe() method
At present the device is not active when the probe() method is called. But some probe() methods want to set up the device and this c
dm: core: Mark device as active before calling its probe() method
At present the device is not active when the probe() method is called. But some probe() methods want to set up the device and this can involve accessing it through normal methods. For example a PCI bus may wish to set up its PCI parameters using calls to pci_hose_write_config_dword() and similar.
At present this does not work because every such call within the probe() method sees that the device is not active and attempts to probe it.
Already we mark the device as probed before calling the uclass post_probe() method. This is a subtle change but I believe the new approach is better. Since the scope of the change is only the probe() method and all its callees it should still be within the control of the board author.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
e564f054 |
| 05-Mar-2015 |
Simon Glass <sjg@chromium.org> |
dm: core: Add dev_get_uclass_priv() to access uclass private data
Add a convenience function to access the private data that a uclass stores for each of its devices. Convert over most existing uses
dm: core: Add dev_get_uclass_priv() to access uclass private data
Add a convenience function to access the private data that a uclass stores for each of its devices. Convert over most existing uses for consistency and to provide an example for others.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
b9cb6482 |
| 02-Mar-2015 |
Stefano Babic <sbabic@denx.de> |
Merge branch 'master' of git://git.denx.de/u-boot
|
| #
e1cc4d31 |
| 24-Feb-2015 |
Albert ARIBAUD <albert.u.boot@aribaud.net> |
Merge remote-tracking branch 'u-boot/master' into 'u-boot-arm/master'
|
| #
757566d1 |
| 13-Feb-2015 |
Tom Rini <trini@ti.com> |
Merge git://git.denx.de/u-boot-dm
|
| #
e72d3443 |
| 13-Feb-2015 |
Stefano Babic <sbabic@denx.de> |
Merge branch 'master' of git://git.denx.de/u-boot
|
| #
c9cac3f8 |
| 10-Feb-2015 |
Peng Fan <Peng.Fan@freescale.com> |
dm: introduce dev_get_addr interface
Abstracting dev_get_addr can improve drivers that want to get device's address.
Signed-off-by: Peng Fan <Peng.Fan@freescale.com> Acked-by: Igor Grinberg <grinbe
dm: introduce dev_get_addr interface
Abstracting dev_get_addr can improve drivers that want to get device's address.
Signed-off-by: Peng Fan <Peng.Fan@freescale.com> Acked-by: Igor Grinberg <grinberg@compulab.co.il> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
8e3da9dd |
| 30-Jan-2015 |
Tom Rini <trini@ti.com> |
Merge branch 'master' of git://git.denx.de/u-boot-dm
|
| #
83c7e434 |
| 25-Jan-2015 |
Simon Glass <sjg@chromium.org> |
dm: core: Allow uclass to set up a device's child before it is probed
Some buses need to set up their devices before they can be used. This setup may well be common to all buses in a particular ucla
dm: core: Allow uclass to set up a device's child before it is probed
Some buses need to set up their devices before they can be used. This setup may well be common to all buses in a particular uclass. Support a common pre-probe method for the uclass, called before any bus devices are probed.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
show more ...
|
| #
dac8db2c |
| 25-Jan-2015 |
Simon Glass <sjg@chromium.org> |
dm: core: Allow uclasses to specify private data for a device's children
In many cases the per-child private data for a device's children is defined by the uclass rather than the individual driver.
dm: core: Allow uclasses to specify private data for a device's children
In many cases the per-child private data for a device's children is defined by the uclass rather than the individual driver. For example, a SPI bus needs to store information about each of its children, but all SPI drivers store the same information. It makes sense to allow the uclass to define this data.
If the driver provides a size value for its per-child private data, then use it. Failng that, fall back to that provided by the uclass.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
show more ...
|
| #
9cc36a2b |
| 25-Jan-2015 |
Simon Glass <sjg@chromium.org> |
dm: core: Add a flag to control sequence numbering
At present we try to use the 'reg' property and device tree aliases to give devices a sequence number. The 'reg' property is often actually a memor
dm: core: Add a flag to control sequence numbering
At present we try to use the 'reg' property and device tree aliases to give devices a sequence number. The 'reg' property is often actually a memory address, so the sequence numbers thus-obtained are not useful. It would be better if the devices were just sequentially numbered in that case. In fact neither I2C nor SPI use this feature, so drop it.
Some devices need us to look up an alias to number them within the uclass. Add a flag to control this, so it is not done unless it is needed.
Adjust the tests to test this new behaviour.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
show more ...
|
| #
b3670531 |
| 25-Jan-2015 |
Simon Glass <sjg@chromium.org> |
dm: core: Add a function to get a device's uclass ID
This is useful to check which uclass a device is in.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Masahiro Yamada <yamada.m@jp.pan
dm: core: Add a function to get a device's uclass ID
This is useful to check which uclass a device is in.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
show more ...
|
| #
0118ce79 |
| 25-Jan-2015 |
Simon Glass <sjg@chromium.org> |
dm: core: Add a post_bind method for parents
Allow parent drivers to be called when a new child is bound to them. This allows a bus to set up information it needs for that child.
Signed-off-by: Sim
dm: core: Add a post_bind method for parents
Allow parent drivers to be called when a new child is bound to them. This allows a bus to set up information it needs for that child.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
show more ...
|
| #
ba8da9dc |
| 25-Jan-2015 |
Simon Glass <sjg@chromium.org> |
dm: core: Allow uclasses to specify platdata for a device's children
In many cases the child platform data for a device's children is defined by the uclass rather than the individual devices. For ex
dm: core: Allow uclasses to specify platdata for a device's children
In many cases the child platform data for a device's children is defined by the uclass rather than the individual devices. For example, a SPI bus needs to know the chip select and speed for each of its children. It makes sense to allow this information to be defined the SPI uclass rather than each individual driver.
If the device provides a size value for its child platdata, then use it. Failng that, fall back to that provided by the uclass.
Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
cdc133bd |
| 25-Jan-2015 |
Simon Glass <sjg@chromium.org> |
dm: core: Allow parents to have platform data for their children
For buses it is common for parents to need to know the address of the child on the bus, the bus speed to use for that child, and othe
dm: core: Allow parents to have platform data for their children
For buses it is common for parents to need to know the address of the child on the bus, the bus speed to use for that child, and other information. This can be provided in platform data attached to each child.
Add driver model support for this, including auto-allocation which can be requested using a new property to specify the size of the data.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
show more ...
|
| #
f8a85449 |
| 25-Jan-2015 |
Simon Glass <sjg@chromium.org> |
dm: core: Allocate platform data when binding a device
When using allocated platform data, allocate it when we bind the device. This makes it possible to fill in this information before the device i
dm: core: Allocate platform data when binding a device
When using allocated platform data, allocate it when we bind the device. This makes it possible to fill in this information before the device is probed.
This fits with the platform data model (when not using device tree), since platform data exists at bind-time.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
show more ...
|
| #
72ebfe86 |
| 25-Jan-2015 |
Simon Glass <sjg@chromium.org> |
dm: core: Tidy up error handling in device_bind()
Make the error handling more standard to make it easier to build on top of it. Also correct a bug in the error path where there is no parent.
Signe
dm: core: Tidy up error handling in device_bind()
Make the error handling more standard to make it easier to build on top of it. Also correct a bug in the error path where there is no parent.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
show more ...
|
| #
a5a58826 |
| 12-Dec-2014 |
Tom Rini <trini@ti.com> |
Merge git://git.denx.de/u-boot-dm
|
| #
964d153c |
| 10-Dec-2014 |
Simon Glass <sjg@chromium.org> |
dm: device: Add newline to debug() messages
Some of these are missing a newline. Add it.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
| #
1739564e |
| 24-Nov-2014 |
Tom Rini <trini@ti.com> |
Merge git://git.denx.de/u-boot-dm
Conflicts: drivers/serial/serial-uclass.c
Signed-off-by: Tom Rini <trini@ti.com>
|
| #
479728cb |
| 11-Nov-2014 |
Simon Glass <sjg@chromium.org> |
dm: core: Add functions to find parent and OF data
Add dev_get_parent() as a convenience to obtain the parent of a device.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini
dm: core: Add functions to find parent and OF data
Add dev_get_parent() as a convenience to obtain the parent of a device.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@ti.com> Acked-by: Heiko Schocher <hs@denx.de>
show more ...
|
| #
2ef249b4 |
| 11-Nov-2014 |
Simon Glass <sjg@chromium.org> |
dm: core: Allow access to the device's driver_id data
When the device is created from a device tree node, it matches a compatible string. Allow access to that string and the associated data.
Signed
dm: core: Allow access to the device's driver_id data
When the device is created from a device tree node, it matches a compatible string. Allow access to that string and the associated data.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@ti.com> Acked-by: Heiko Schocher <hs@denx.de>
show more ...
|
| #
3ac435d3 |
| 11-Nov-2014 |
Simon Glass <sjg@chromium.org> |
dm: Allow device removal features to be dropped
For SPL we don't expect to need to remove a device. Save some code space by dropping this feature. The board config can define CONFIG_DM_DEVICE_REMOVE
dm: Allow device removal features to be dropped
For SPL we don't expect to need to remove a device. Save some code space by dropping this feature. The board config can define CONFIG_DM_DEVICE_REMOVE if this is in fact needed.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@ti.com>
show more ...
|
| #
68e80fdd |
| 22-Oct-2014 |
Tom Rini <trini@ti.com> |
Merge git://git.denx.de/u-boot-dm
|
| #
accd4b19 |
| 14-Oct-2014 |
Simon Glass <sjg@chromium.org> |
dm: core: Allow parents to pass data to children during probe
Buses sometimes want to pass data to their children when they are probed. For example, a SPI bus may want to tell the slave device about
dm: core: Allow parents to pass data to children during probe
Buses sometimes want to pass data to their children when they are probed. For example, a SPI bus may want to tell the slave device about the chip select it is connected to.
Add a new function to permit the parent data to be supplied to the child.
Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
show more ...
|