]> git.dujemihanovic.xyz Git - u-boot.git/commit
ide: Correct use of ATAPI
authorSimon Glass <sjg@chromium.org>
Tue, 25 Apr 2023 16:54:35 +0000 (10:54 -0600)
committerTom Rini <trini@konsulko.com>
Thu, 27 Apr 2023 17:51:06 +0000 (13:51 -0400)
commit646deed40b8ffe9aa9c10b86f1addbb4a9788e91
treebd59bb992dfda8f342bc15a72300d847db2bfa73
parent1486c906230ca61580a65421adb26a24f5128a4e
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>
drivers/block/ide.c
include/blk.h