disk: define HAVE_BLOCK_DEVICE in a common place
This set of ifdefs is used in a number of places. Move its definition somewhere common so it doesn't have to be repeated. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org> Acked-by: Tom Rini <trini@ti.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
This commit is contained in:
parent
a885f85214
commit
2c1af9dcdc
10
disk/part.c
10
disk/part.c
|
@ -35,16 +35,6 @@
|
||||||
#define PRINTF(fmt,args...)
|
#define PRINTF(fmt,args...)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Rather than repeat this expression each time, add a define for it */
|
|
||||||
#if (defined(CONFIG_CMD_IDE) || \
|
|
||||||
defined(CONFIG_CMD_SATA) || \
|
|
||||||
defined(CONFIG_CMD_SCSI) || \
|
|
||||||
defined(CONFIG_CMD_USB) || \
|
|
||||||
defined(CONFIG_MMC) || \
|
|
||||||
defined(CONFIG_SYSTEMACE) )
|
|
||||||
#define HAVE_BLOCK_DEVICE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct block_drvr {
|
struct block_drvr {
|
||||||
char *name;
|
char *name;
|
||||||
block_dev_desc_t* (*get_dev)(int dev);
|
block_dev_desc_t* (*get_dev)(int dev);
|
||||||
|
|
|
@ -26,11 +26,7 @@
|
||||||
#include <ide.h>
|
#include <ide.h>
|
||||||
#include "part_amiga.h"
|
#include "part_amiga.h"
|
||||||
|
|
||||||
#if defined(CONFIG_CMD_IDE) || \
|
#ifdef HAVE_BLOCK_DEVICE
|
||||||
defined(CONFIG_CMD_SCSI) || \
|
|
||||||
defined(CONFIG_CMD_USB) || \
|
|
||||||
defined(CONFIG_MMC) || \
|
|
||||||
defined(CONFIG_SYSTEMACE)
|
|
||||||
|
|
||||||
#undef AMIGA_DEBUG
|
#undef AMIGA_DEBUG
|
||||||
|
|
||||||
|
|
|
@ -35,12 +35,7 @@
|
||||||
#include <ide.h>
|
#include <ide.h>
|
||||||
#include "part_dos.h"
|
#include "part_dos.h"
|
||||||
|
|
||||||
#if defined(CONFIG_CMD_IDE) || \
|
#ifdef HAVE_BLOCK_DEVICE
|
||||||
defined(CONFIG_CMD_SATA) || \
|
|
||||||
defined(CONFIG_CMD_SCSI) || \
|
|
||||||
defined(CONFIG_CMD_USB) || \
|
|
||||||
defined(CONFIG_MMC) || \
|
|
||||||
defined(CONFIG_SYSTEMACE)
|
|
||||||
|
|
||||||
/* Convert char[4] in little endian format to the host format integer
|
/* Convert char[4] in little endian format to the host format integer
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -39,13 +39,7 @@
|
||||||
|
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
#if defined(CONFIG_CMD_IDE) || \
|
#ifdef HAVE_BLOCK_DEVICE
|
||||||
defined(CONFIG_CMD_SATA) || \
|
|
||||||
defined(CONFIG_CMD_SCSI) || \
|
|
||||||
defined(CONFIG_CMD_USB) || \
|
|
||||||
defined(CONFIG_MMC) || \
|
|
||||||
defined(CONFIG_SYSTEMACE)
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* efi_crc32() - EFI version of crc32 function
|
* efi_crc32() - EFI version of crc32 function
|
||||||
* @buf: buffer to calculate crc32 of
|
* @buf: buffer to calculate crc32 of
|
||||||
|
|
|
@ -25,12 +25,7 @@
|
||||||
#include <command.h>
|
#include <command.h>
|
||||||
#include "part_iso.h"
|
#include "part_iso.h"
|
||||||
|
|
||||||
#if defined(CONFIG_CMD_IDE) || \
|
#ifdef HAVE_BLOCK_DEVICE
|
||||||
defined(CONFIG_CMD_SCSI) || \
|
|
||||||
defined(CONFIG_CMD_SATA) || \
|
|
||||||
defined(CONFIG_CMD_USB) || \
|
|
||||||
defined(CONFIG_MMC) || \
|
|
||||||
defined(CONFIG_SYSTEMACE)
|
|
||||||
|
|
||||||
/* #define ISO_PART_DEBUG */
|
/* #define ISO_PART_DEBUG */
|
||||||
|
|
||||||
|
|
|
@ -34,12 +34,7 @@
|
||||||
#include <ide.h>
|
#include <ide.h>
|
||||||
#include "part_mac.h"
|
#include "part_mac.h"
|
||||||
|
|
||||||
#if defined(CONFIG_CMD_IDE) || \
|
#ifdef HAVE_BLOCK_DEVICE
|
||||||
defined(CONFIG_CMD_SCSI) || \
|
|
||||||
defined(CONFIG_CMD_SATA) || \
|
|
||||||
defined(CONFIG_CMD_USB) || \
|
|
||||||
defined(CONFIG_MMC) || \
|
|
||||||
defined(CONFIG_SYSTEMACE)
|
|
||||||
|
|
||||||
/* stdlib.h causes some compatibility problems; should fixe these! -- wd */
|
/* stdlib.h causes some compatibility problems; should fixe these! -- wd */
|
||||||
#ifndef __ldiv_t_defined
|
#ifndef __ldiv_t_defined
|
||||||
|
|
|
@ -26,4 +26,14 @@
|
||||||
#define CONFIG_EXT4_WRITE
|
#define CONFIG_EXT4_WRITE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Rather than repeat this expression each time, add a define for it */
|
||||||
|
#if defined(CONFIG_CMD_IDE) || \
|
||||||
|
defined(CONFIG_CMD_SATA) || \
|
||||||
|
defined(CONFIG_CMD_SCSI) || \
|
||||||
|
defined(CONFIG_CMD_USB) || \
|
||||||
|
defined(CONFIG_MMC) || \
|
||||||
|
defined(CONFIG_SYSTEMACE)
|
||||||
|
#define HAVE_BLOCK_DEVICE
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* __CONFIG_FALLBACKS_H */
|
#endif /* __CONFIG_FALLBACKS_H */
|
||||||
|
|
Loading…
Reference in New Issue