diff options
author | Simon Glass | 2023-04-25 10:54:35 -0600 |
---|---|---|
committer | Tom Rini | 2023-04-27 13:51:06 -0400 |
commit | 646deed40b8ffe9aa9c10b86f1addbb4a9788e91 (patch) | |
tree | bd59bb992dfda8f342bc15a72300d847db2bfa73 /include | |
parent | 1486c906230ca61580a65421adb26a24f5128a4e (diff) |
ide: Correct use of ATAPI
The use of atapi_read() was incorrect dropped. Fix this so that it will
be used when needed. Use a udevice for the first argument of atapi_read()
so it is consistent with ide_read().
This requires much of the ATAPI code to be brought out from behind the
existing #ifdef. It will still be removed by the compiler if it is not
needed.
Add an atapi flag to struct blk_desc so the information can be retained.
Fixes: 145df842b44 ("dm: ide: Add support for driver-model block devices")
Fixes: d0075059e4d ("ide: Drop non-DM code for BLK")
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/blk.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/blk.h b/include/blk.h index 1db203c1bab..871922dcde0 100644 --- a/include/blk.h +++ b/include/blk.h @@ -66,6 +66,7 @@ struct blk_desc { /* device can use 48bit addr (ATA/ATAPI v7) */ unsigned char lba48; #endif + unsigned char atapi; /* Use ATAPI protocol */ lbaint_t lba; /* number of blocks */ unsigned long blksz; /* block size */ int log2blksz; /* for convenience: log2(blksz) */ |