disk: convert CONFIG_EFI_PARTITION to Kconfig
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay73@gmail.com>
diff --git a/disk/Kconfig b/disk/Kconfig
index 8adf59e..03bf05d 100644
--- a/disk/Kconfig
+++ b/disk/Kconfig
@@ -68,4 +68,20 @@
depends on SPL && PARTITIONS
default y if AMIGA_PARTITION
+config EFI_PARTITION
+ bool "Enable EFI GPT partition table"
+ depends on PARTITIONS
+ default y if DISTRO_DEFAULTS
+ default y if TEGRA
+ help
+ Say Y here if you would like to use device under U-Boot which
+ were partitioned using EFI GPT.
+ common when EFI is the bootloader. Note 2TB partition limit;
+ see disk/part_efi.c
+
+config SPL_EFI_PARTITION
+ bool "Enable EFI GPT partition table for SPL"
+ depends on SPL && PARTITIONS
+ default y if EFI_PARTITION
+
endmenu
diff --git a/disk/Makefile b/disk/Makefile
index aa6ee45..12c0531 100644
--- a/disk/Makefile
+++ b/disk/Makefile
@@ -12,4 +12,4 @@
obj-$(CONFIG_$(SPL_)DOS_PARTITION) += part_dos.o
obj-$(CONFIG_$(SPL_)ISO_PARTITION) += part_iso.o
obj-$(CONFIG_$(SPL_)AMIGA_PARTITION) += part_amiga.o
-obj-$(CONFIG_EFI_PARTITION) += part_efi.o
+obj-$(CONFIG_$(SPL_)EFI_PARTITION) += part_efi.o
diff --git a/disk/part.c b/disk/part.c
index ad38164..cd14e98 100644
--- a/disk/part.c
+++ b/disk/part.c
@@ -238,7 +238,7 @@
CONFIG_IS_ENABLED(DOS_PARTITION) || \
CONFIG_IS_ENABLED(ISO_PARTITION) || \
CONFIG_IS_ENABLED(AMIGA_PARTITION) || \
- defined(CONFIG_EFI_PARTITION)
+ CONFIG_IS_ENABLED(EFI_PARTITION)
puts ("\nPartition Map for ");
switch (dev_desc->if_type) {
case IF_TYPE_IDE:
diff --git a/disk/part_efi.c b/disk/part_efi.c
index 1924338..f1b7116 100644
--- a/disk/part_efi.c
+++ b/disk/part_efi.c
@@ -171,7 +171,7 @@
gpt_h->header_crc32 = cpu_to_le32(calc_crc32);
}
-#ifdef CONFIG_EFI_PARTITION
+#if CONFIG_IS_ENABLED(EFI_PARTITION)
/*
* Public Functions (include/part.h)
*/