X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=include%2Fblk.h;h=6af219681cd1b52caee57fbb5dc07511933ed165;hb=cd83bb371ff3a8a61eb3f65ded762da7daaa9b06;hp=69b5a98e5673f01b87c0d2ee45f77a848d19e4d4;hpb=a3f77c810b1a57853e4d5fee3014ac8cbbd03a9a;p=oweals%2Fu-boot.git diff --git a/include/blk.h b/include/blk.h index 69b5a98e56..6af219681c 100644 --- a/include/blk.h +++ b/include/blk.h @@ -1,8 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * (C) Copyright 2000-2004 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ */ #ifndef BLK_H @@ -32,7 +31,6 @@ enum if_type { IF_TYPE_SD, IF_TYPE_SATA, IF_TYPE_HOST, - IF_TYPE_SYSTEMACE, IF_TYPE_NVME, IF_TYPE_EFI, @@ -113,7 +111,7 @@ struct blk_desc { #define PAD_TO_BLOCKSIZE(size, blk_desc) \ (PAD_SIZE(size, blk_desc->blksz)) -#ifdef CONFIG_BLOCK_CACHE +#if CONFIG_IS_ENABLED(BLOCK_CACHE) /** * blkcache_read() - attempt to read a set of blocks from cache * @@ -408,6 +406,15 @@ int blk_select_hwpart(struct udevice *dev, int hwpart); */ int blk_get_from_parent(struct udevice *parent, struct udevice **devp); +/** + * blk_get_by_device() - Get the block device descriptor for the given device + * @dev: Instance of a storage device + * + * Return: With block device descriptor on success , NULL if there is no such + * block device. + */ +struct blk_desc *blk_get_by_device(struct udevice *dev); + #else #include /*