ifdef CONFIG_$(SPL_TPL_)BLK
obj-$(CONFIG_$(SPL_TPL_)PARTITIONS) += disk-uclass.o
endif
+
+# Must have BLK or HAVE_BLOCK_DEVICE to support partitions
+ifneq ($(CONFIG_$(SPL_TPL_)BLK),$(CONFIG_HAVE_BLOCK_DEVICE),)
obj-$(CONFIG_$(SPL_TPL_)MAC_PARTITION) += part_mac.o
obj-$(CONFIG_$(SPL_TPL_)DOS_PARTITION) += part_dos.o
obj-$(CONFIG_$(SPL_TPL_)ISO_PARTITION) += part_iso.o
obj-$(CONFIG_$(SPL_TPL_)AMIGA_PARTITION) += part_amiga.o
obj-$(CONFIG_$(SPL_TPL_)EFI_PARTITION) += part_efi.o
+endif
#include "part_amiga.h"
#include <part.h>
-#ifdef CONFIG_HAVE_BLOCK_DEVICE
-
#undef AMIGA_DEBUG
#ifdef AMIGA_DEBUG
.print = part_print_amiga,
.test = part_test_amiga,
};
-
-#endif
#include "part_dos.h"
#include <part.h>
-#ifdef CONFIG_HAVE_BLOCK_DEVICE
-
#define DOS_PART_DEFAULT_SECTOR 512
/* should this be configurable? It looks like it's not very common at all
.print = part_print_ptr(part_print_dos),
.test = part_test_dos,
};
-
-#endif
#include <linux/ctype.h>
#include <u-boot/crc.h>
-#ifdef CONFIG_HAVE_BLOCK_DEVICE
-
/* GUID for basic data partitons */
#if CONFIG_IS_ENABLED(EFI_PARTITION)
static const efi_guid_t partition_basic_data_guid = PARTITION_BASIC_DATA_GUID;
.print = part_print_ptr(part_print_efi),
.test = part_test_efi,
};
-#endif /* CONFIG_HAVE_BLOCK_DEVICE */
#include <asm/unaligned.h>
#include "part_iso.h"
-#ifdef CONFIG_HAVE_BLOCK_DEVICE
-
/* #define ISO_PART_DEBUG */
#ifdef ISO_PART_DEBUG
.print = part_print_iso,
.test = part_test_iso,
};
-#endif
#include "part_mac.h"
#include <part.h>
-#ifdef CONFIG_HAVE_BLOCK_DEVICE
-
/* stdlib.h causes some compatibility problems; should fixe these! -- wd */
#ifndef __ldiv_t_defined
typedef struct {
.print = part_print_mac,
.test = part_test_mac,
};
-#endif
obj-$(CONFIG_OMAP_USB_PHY) += usb/phy/
obj-$(CONFIG_SPL_SATA) += ata/ scsi/
obj-$(CONFIG_HAVE_BLOCK_DEVICE) += block/
+obj-$(CONFIG_SPL_BLK) += block/
obj-$(CONFIG_SPL_THERMAL) += thermal/
endif