| #
9f103b9c |
| 27-May-2017 |
Simon Glass <sjg@chromium.org> |
dm: blk: Add a way to obtain a block device from its parent
Many devices support a child block device (e.g. MMC, USB). Add a convenient way to get this device given the parent device.
Signed-off-by
dm: blk: Add a way to obtain a block device from its parent
Many devices support a child block device (e.g. MMC, USB). Add a convenient way to get this device given the parent device.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
show more ...
|
| #
e48eeb9e |
| 24-Apr-2017 |
Simon Glass <sjg@chromium.org> |
dm: blk: Improve block device claiming
The intention with block devices is that the device number (devnum field in its descriptor) matches the alias of its parent device. For example, with:
aliase
dm: blk: Improve block device claiming
The intention with block devices is that the device number (devnum field in its descriptor) matches the alias of its parent device. For example, with:
aliases { mmc0 = "/sdhci@700b0600"; mmc1 = "/sdhci@700b0400"; }
we expect that the block devices for mmc0 and mmc1 would have device numbers of 0 and 1 respectively.
Unfortunately this does not currently always happen. If there is another MMC device earlier in the driver model data structures its block device will be created first. It will therefore get device number 0 and mmc0 will therefore miss out. In this case the MMC device will have sequence number 0 but its block device will not.
To avoid this, allow a device to request a device number and bump any existing device number that is using it. This all happens during the binding phase so it is safe to change these numbers around. This allows device numbers to match the aliases in all circumstances.
Add a test to verify the behaviour.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
e8abbb53 |
| 24-Apr-2017 |
Simon Glass <sjg@chromium.org> |
dm: blk: Add a function to find the next block device number
At present this code is inline. Move it into a function to allow it to be used elsewhere.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
| #
6139281a |
| 24-Apr-2017 |
Simon Glass <sjg@chromium.org> |
dm: blk: Allow finding block devices without probing
Sometimes it is useful to be able to find a block device without also probing it. Add a function for this as well as the associated test.
Signed
dm: blk: Allow finding block devices without probing
Sometimes it is useful to be able to find a block device without also probing it. Add a function for this as well as the associated test.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
433647a7 |
| 05-Apr-2017 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-dm
|
| #
706865af |
| 20-Mar-2017 |
Stefan Roese <sr@denx.de> |
dm: core: Add flags parameter to device_remove()
This patch adds the flags parameter to device_remove() and changes all calls to this function to provide the default value of DM_REMOVE_NORMAL for "n
dm: core: Add flags parameter to device_remove()
This patch adds the flags parameter to device_remove() and changes all calls to this function to provide the default value of DM_REMOVE_NORMAL for "normal" device removal.
This is in preparation for the driver specific pre-OS (e.g. DMA cancelling) remove support.
Signed-off-by: Stefan Roese <sr@denx.de> Cc: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
7588bf93 |
| 20-Dec-2016 |
Tom Rini <trini@konsulko.com> |
Merge branch 'master' of git://www.denx.de/git/u-boot-microblaze
|
| #
e8a016b5 |
| 08-Sep-2016 |
Michal Simek <michal.simek@xilinx.com> |
dm: Add support for scsi/sata based devices
All sata based drivers are bind and corresponding block device is created. Based on this find_scsi_device() is able to get back block device based on scsi
dm: Add support for scsi/sata based devices
All sata based drivers are bind and corresponding block device is created. Based on this find_scsi_device() is able to get back block device based on scsi_curr_dev pointer.
intr_scsi() is commented now but it can be replaced by calling find_scsi_device() and scsi_scan().
scsi_dev_desc[] is commented out but common/scsi.c heavily depends on it. That's why CONFIG_SYS_SCSI_MAX_DEVICE is hardcoded to 1 and symbol is reassigned to a block description allocated by uclass. There is only one block description by device now but it doesn't need to be correct when more devices are present.
scsi_bind() ensures corresponding block device creation. uclass post_probe (scsi_post_probe()) is doing low level init.
SCSI/SATA DM based drivers requires to have 64bit base address as the first entry in platform data structure to setup mmio_base.
Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
361a8799 |
| 09-Dec-2016 |
Tom Rini <trini@konsulko.com> |
Revert "Merge branch 'master' of git://www.denx.de/git/u-boot-microblaze"
This reverts commit 3edc0c252257e4afed163a3a74aba24a5509b198, reversing changes made to bb135a0180c31fbd7456021fb9700b49bba7
Revert "Merge branch 'master' of git://www.denx.de/git/u-boot-microblaze"
This reverts commit 3edc0c252257e4afed163a3a74aba24a5509b198, reversing changes made to bb135a0180c31fbd7456021fb9700b49bba7f533.
show more ...
|
| #
3edc0c25 |
| 09-Dec-2016 |
Tom Rini <trini@konsulko.com> |
Merge branch 'master' of git://www.denx.de/git/u-boot-microblaze
|
| #
bce4d18c |
| 08-Sep-2016 |
Michal Simek <michal.simek@xilinx.com> |
dm: Add support for scsi/sata based devices
All sata based drivers are bind and corresponding block device is created. Based on this find_scsi_device() is able to get back block device based on scsi
dm: Add support for scsi/sata based devices
All sata based drivers are bind and corresponding block device is created. Based on this find_scsi_device() is able to get back block device based on scsi_curr_dev pointer.
intr_scsi() is commented now but it can be replaced by calling find_scsi_device() and scsi_scan().
scsi_dev_desc[] is commented out but common/scsi.c heavily depends on it. That's why CONFIG_SYS_SCSI_MAX_DEVICE is hardcoded to 1 and symbol is reassigned to a block description allocated by uclass. There is only one block description by device now but it doesn't need to be correct when more devices are present.
scsi_bind() ensures corresponding block device creation. uclass post_probe (scsi_post_probe()) is doing low level init.
SCSI/SATA DM based drivers requires to have 64bit base address as the first entry in platform data structure to setup mmio_base.
Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org> Series-changes: 2 - Use CONFIG_DM_SCSI instead of mix of DM_SCSI and DM_SATA Ceva sata has never used sata commands that's why keep it in SCSI part only. - Separate scsi_scan() for DM_SCSI and do not change cmd/scsi.c - Extend platdata
Series-changes: 3 - Fix scsi_scan return path - Fix header location uclass-internal.h - Add scsi_max_devs under !DM_SCSI - Add new header device-internal because of device_probe() - Redesign block device creation algorithm - Use device_unbind in error path - Create block device with id and lun numbers (lun was there in v2) - Cleanup dev_num initialization in block device description with fixing parameters in blk_create_devicef - Create new Kconfig menu for SATA/SCSI drivers - Extend description for DM_SCSI - Fix Kconfig dependencies - Fix kernel doc format in scsi_platdata - Fix ahci_init_one - vendor variable
Series-changes: 4 - Fix Kconfig entry - Remove SPL ifdef around SCSI uclass - Clean ahci_print_info() ifdef logic
show more ...
|
| #
73eed452 |
| 04-Dec-2016 |
Tom Rini <trini@konsulko.com> |
Merge branch 'master' of git://www.denx.de/git/u-boot-dm
|
| #
4408f6f4 |
| 16-Nov-2016 |
Michal Simek <michal.simek@xilinx.com> |
dm: blk: Fix get_desc to return block device descriptor
Current get_desc() implementation is not able to succesfully finish and return pointer to block device descriptor.
Also function always retur
dm: blk: Fix get_desc to return block device descriptor
Current get_desc() implementation is not able to succesfully finish and return pointer to block device descriptor.
Also function always return non zero value even device is found.
The patch fills block device descriptor and return 0 if device is found.
Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
08ca213a |
| 24-May-2016 |
Stefano Babic <sbabic@denx.de> |
Merge branch 'master' of git://git.denx.de/u-boot
|
| #
4b6e1fda |
| 17-May-2016 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-dm
|
| #
cd0fb55b |
| 01-May-2016 |
Simon Glass <sjg@chromium.org> |
dm: blk: Add functions to select a hardware partition
The block device uclass does not currently support selecting a particular hardware partition but this is needed for MMC. Add it so that the blk
dm: blk: Add functions to select a hardware partition
The block device uclass does not currently support selecting a particular hardware partition but this is needed for MMC. Add it so that the blk API can support MMC properly.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
d0773524 |
| 01-May-2016 |
Simon Glass <sjg@chromium.org> |
dm: blk: Free the block device name when unbound
Mark the device name as allocated so that it will be freed correctly when the device is unbound.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
| #
72a85c0d |
| 01-May-2016 |
Simon Glass <sjg@chromium.org> |
dm: blk: Fix allocation of block-device numbering
Due to code ordering the block devices are not numbered sequentially. Fix this.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
| #
9107c973 |
| 01-May-2016 |
Simon Glass <sjg@chromium.org> |
dm: blk: Add a easier way to create a named block device
Add a function that automatically builds the device name given the parent and a supplied string. Most callers will want to do this, so puttin
dm: blk: Add a easier way to create a named block device
Add a function that automatically builds the device name given the parent and a supplied string. Most callers will want to do this, so putting this functionality in one place makes more sense.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
52138fd4 |
| 01-May-2016 |
Simon Glass <sjg@chromium.org> |
dm: blk: Allow blk_create_device() to allocate the device number
Allow a devnum parameter of -1 to indicate that the device number should be alocated automatically. The next highest available device
dm: blk: Allow blk_create_device() to allocate the device number
Allow a devnum parameter of -1 to indicate that the device number should be alocated automatically. The next highest available device number for that interface type is used.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
d508c82b |
| 01-May-2016 |
Simon Glass <sjg@chromium.org> |
dm: mmc: Add an implementation of the 'devnum' functions
Now that the MMC code accesses devices by number, we can implement this same interface for driver model, allowing MMC to support using driver
dm: mmc: Add an implementation of the 'devnum' functions
Now that the MMC code accesses devices by number, we can implement this same interface for driver model, allowing MMC to support using driver model for block devices.
Add the required functions to the uclass.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
e40cf34a |
| 28-Mar-2016 |
Eric Nelson <eric@nelint.com> |
drivers: block: add block device cache
Add a block device cache to speed up repeated reads of block devices by various filesystems.
This small amount of cache can dramatically speed up filesystem o
drivers: block: add block device cache
Add a block device cache to speed up repeated reads of block devices by various filesystems.
This small amount of cache can dramatically speed up filesystem operations by skipping repeated reads of common areas of a block device (typically directory structures).
This has shown to have some benefit on FAT filesystem operations of loading a kernel and RAM disk, but more dramatic benefits on ext4 filesystems when the kernel and/or RAM disk are spread across multiple extent header structures as described in commit fc0fc50.
The cache is implemented through a minimal list (block_cache) maintained in most-recently-used order and count of the current number of entries (cache_count). It uses a maximum block count setting to prevent copies of large block reads and an upper bound on the number of cached areas.
The maximum number of entries in the cache defaults to 32 and the maximum number of blocks per cache entry has a default of 2, which has shown to produce the best results on testing of ext4 and FAT filesystems.
The 'blkcache' command (enabled through CONFIG_CMD_BLOCK_CACHE) allows changing these values and can be used to tune for a particular filesystem layout.
Signed-off-by: Eric Nelson <eric@nelint.com>
show more ...
|
| #
88033d73 |
| 14-Mar-2016 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-dm
|
| #
09d71aac |
| 29-Feb-2016 |
Simon Glass <sjg@chromium.org> |
dm: blk: Add a block-device uclass
Add a uclass for block devices. These provide block-oriented data access, supporting reading, writing and erasing of whole blocks.
Signed-off-by: Simon Glass <sjg
dm: blk: Add a block-device uclass
Add a uclass for block devices. These provide block-oriented data access, supporting reading, writing and erasing of whole blocks.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
show more ...
|