u-boot/fs
Simon Glass a51eb8de31 blk: Use a function for whether block devices are available
At present we use HAVE_BLOCK_DEVICE to indicate when block devices are
available.

This is a very strange option, since it partially duplicates the BLK
option used by driver model. It also covers both U-Boot proper and SPL,
even though one might have block devices and another not.

As a first step towards correcting this, create a new inline function
called blk_enabled() which indicates if block devices are available.
This cannot be used in Makefiles, or #if clauses, but can be used in C
code.

A function is useful because we cannot use CONFIG_IS_ENABLED(BLK) to
decide if block devices are needed, since we must consider the legacy
block interface, enabled by HAVE_BLOCK_DEVICE

Update a few places where it can be used and drop some unnecessary #if
checks around some functions in disk/part.c - rely on the compiler's
dead-code elimination instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-16 11:05:00 -04:00
..
btrfs treewide: Fix Marek's name and change my e-mail address 2022-07-21 10:14:04 +02:00
cbfs spl: Ensure all SPL symbols in Kconfig have some SPL dependency 2022-07-07 09:29:08 -04:00
cramfs cyclic: Integrate cyclic infrastructure into WATCHDOG_RESET 2022-09-13 16:01:43 -04:00
erofs fs/erofs: silence erofs_probe() 2022-08-13 11:09:49 +02:00
ext4 fs: ext4: Use CRC-16 implementation from linux/crc16.h 2022-04-21 14:32:40 -04:00
fat blk: Use a function for whether block devices are available 2022-09-16 11:05:00 -04:00
jffs2 Audit <flash.h> inclusion 2022-08-04 16:18:47 -04:00
reiserfs common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
sandbox bootstd: sandbox: Add a hostfs bootdev 2022-04-25 10:00:04 -04:00
squashfs Merge branch 'next' 2022-07-11 14:58:57 -04:00
ubifs ubifs: Use U-Boot assert() from <log.h> in UBI/UBIFS code 2022-07-20 05:50:13 +02:00
yaffs2 fs: yaffs2: Finish Kconfig migration 2021-11-05 11:23:29 -04:00
zfs common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
fs.c common: Drop display_options.h from common header 2022-08-10 13:46:55 -04:00
fs_internal.c treewide: Fix Marek's name and change my e-mail address 2022-07-21 10:14:04 +02:00
Kconfig bootstd: sandbox: Add a hostfs bootdev 2022-04-25 10:00:04 -04:00
Makefile fs: Add semihosting filesystem 2022-04-01 15:03:13 -04:00
semihostingfs.c fs: Add semihosting filesystem 2022-04-01 15:03:13 -04:00