ide: Avoid preprocessor for CONFIG_LBA48

Use IS_ENABLED() instead for all conditions. Add the 'lba48' flag into
struct blk_desc always, since it uses very little space. Use a bool so
the meaning is clearer.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
This commit is contained in:
Simon Glass
2023-04-25 10:54:41 -06:00
committed by Tom Rini
parent c94a331061
commit 8b1b943a7a
2 changed files with 21 additions and 40 deletions

View File

@@ -62,10 +62,8 @@ struct blk_desc {
unsigned char hwpart; /* HW partition, e.g. for eMMC */
unsigned char type; /* device type */
unsigned char removable; /* removable device */
#ifdef CONFIG_LBA48
/* device can use 48bit addr (ATA/ATAPI v7) */
unsigned char lba48;
#endif
bool lba48;
unsigned char atapi; /* Use ATAPI protocol */
lbaint_t lba; /* number of blocks */
unsigned long blksz; /* block size */