| 081f2fcb | 25-Jan-2015 |
Simon Glass <sjg@chromium.org> |
dm: core: Allow the uclass to set up a device's child after binding
For buses, after a child is bound, allow the uclass to perform some processing. This can be used to figure out the address of the
dm: core: Allow the uclass to set up a device's child after binding
For buses, after a child is bound, allow the uclass to perform some processing. This can be used to figure out the address of the child (e.g. the chip select for SPI slaves) so that it is ready to be probed.
This avoids bus drivers having to repeat the same process, which really should be done by the uclass, since it is common.
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 ...
|
| 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 ...
|
| 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 ...
|
| a94f468f | 11-Nov-2014 |
Simon Glass <sjg@chromium.org> |
dm: Disable dm_warn() in SPL
Since this function can use up quite a bit of space for its strings, disable it by default in SPL. Use CONFIG_DM_WARN to re-enable it.
Signed-off-by: Simon Glass <sjg@c
dm: Disable dm_warn() in SPL
Since this function can use up quite a bit of space for its strings, disable it by default in SPL. Use CONFIG_DM_WARN to re-enable it.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@ti.com>
show more ...
|