diff options
author | Johan Jonker <jbx6244@gmail.com> | 2023-10-18 16:01:10 +0200 |
---|---|---|
committer | Kever Yang <kever.yang@rock-chips.com> | 2023-10-24 15:55:17 +0800 |
commit | 81bd22e935dc9e5f38863a674d50cb3a804f0804 (patch) | |
tree | 566a7b2d380fec25fd56c3e5338420821782b195 /drivers/block | |
parent | 80201eccaa3b2e5068f0d707682e73bcbee1f149 (diff) | |
download | u-boot-81bd22e935dc9e5f38863a674d50cb3a804f0804.tar.gz u-boot-81bd22e935dc9e5f38863a674d50cb3a804f0804.tar.bz2 u-boot-81bd22e935dc9e5f38863a674d50cb3a804f0804.zip |
rockchip: block: blk-uclass: add bounce buffer flag to blk_desc
Currently bounce buffer support is enabled for all block devices
when available. Add a flag to blk_desc to enable only on demand.
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/blk-uclass.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/blk-uclass.c b/drivers/block/blk-uclass.c index 30ad5bbb00..77066da352 100644 --- a/drivers/block/blk-uclass.c +++ b/drivers/block/blk-uclass.c @@ -441,7 +441,7 @@ long blk_read(struct udevice *dev, lbaint_t start, lbaint_t blkcnt, void *buf) start, blkcnt, desc->blksz, buf)) return blkcnt; - if (IS_ENABLED(CONFIG_BOUNCE_BUFFER)) { + if (IS_ENABLED(CONFIG_BOUNCE_BUFFER) && desc->bb) { struct blk_bounce_buffer bbstate = { .dev = dev }; int ret; @@ -478,7 +478,7 @@ long blk_write(struct udevice *dev, lbaint_t start, lbaint_t blkcnt, blkcache_invalidate(desc->uclass_id, desc->devnum); - if (IS_ENABLED(CONFIG_BOUNCE_BUFFER)) { + if (IS_ENABLED(CONFIG_BOUNCE_BUFFER) && desc->bb) { struct blk_bounce_buffer bbstate = { .dev = dev }; int ret; |