| d0cff03e | 25-Jan-2015 |
Simon Glass <sjg@chromium.org> |
dm: spi: Move slave details to child platdata
At present we go through various contortions to store the SPI slave's chip select in its private data. This only exists when the slave is active so must
dm: spi: Move slave details to child platdata
At present we go through various contortions to store the SPI slave's chip select in its private data. This only exists when the slave is active so must be set up when it is probed. Until the device is probed we don't actually know what chip select it will appear on.
However, now that we can support per-child platform data, we can use that instead. This allows us to set up the chip select when the child is bound, and avoid the messy contortions.
Unfortunately this is a fairly large change and it seems to be difficult to break it down further.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 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 ...
|
| 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 ...
|
| 39931f96 | 15-Jan-2015 |
Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com> |
dumpimage: fit: extract FIT images
The dumpimage is able to extract components contained in a FIT image:
$ ./dumpimage -T flat_dt -i CONTAINER.ITB -p INDEX FILE
The CONTAINER.ITB is a regular FI
dumpimage: fit: extract FIT images
The dumpimage is able to extract components contained in a FIT image:
$ ./dumpimage -T flat_dt -i CONTAINER.ITB -p INDEX FILE
The CONTAINER.ITB is a regular FIT container file. The INDEX is the poisition of the sub-image to be retrieved, and FILE is the file (path+name) to save the extracted sub-image.
For example, given the following kernel.its to build a kernel.itb:
/dts-v1/; / { ... images { kernel@1 { description = "Kernel 2.6.32-34"; data = /incbin/("/boot/vmlinuz-2.6.32-34-generic"); type = "kernel"; arch = "ppc"; os = "linux"; compression = "gzip"; load = <00000000>; entry = <00000000>; hash@1 { algo = "md5"; }; }; ... }; ... };
The dumpimage can extract the 'kernel@1' node through the following command:
$ ./dumpimage -T flat_dt -i kernel.itb -p 0 kernel Extracted: Image 0 (kernel@1) Description: Kernel 2.6.32-34 Created: Wed Oct 22 15:50:26 2014 Type: Kernel Image Compression: gzip compressed Data Size: 4040128 Bytes = 3945.44 kB = 3.85 MB Architecture: PowerPC OS: Linux Load Address: 0x00000000 Entry Point: 0x00000000 Hash algo: md5 Hash value: 22352ad39bdc03e2e50f9cc28c1c3652
Which results in the file 'kernel' being exactly the same as '/boot/vmlinuz-2.6.32-34-generic'.
Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
show more ...
|
| 6ed4dc78 | 02-Dec-2014 |
Simon Glass <sjg@chromium.org> |
test: Add unit tests for bootm image decompression
Use each compression method (including uncompressed). Test for normal operation, insufficient space and corrupted data.
Signed-off-by: Simon Glass
test: Add unit tests for bootm image decompression
Use each compression method (including uncompressed). Test for normal operation, insufficient space and corrupted data.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|