disk: convert CONFIG_ISO_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 1bb5d84..1400b26 100644
--- a/disk/Kconfig
+++ b/disk/Kconfig
@@ -45,4 +45,15 @@
depends on SPL && PARTITIONS
default y if DOS_PARTITION
+config ISO_PARTITION
+ bool "Enable ISO partition table"
+ depends on PARTITIONS
+ default y if DISTRO_DEFAULTS
+ default y if SPARC || MIPS || TEGRA
+
+config SPL_ISO_PARTITION
+ bool "Enable ISO partition table for SPL"
+ depends on SPL && PARTITIONS
+ default y if ISO_PARTITION
+
endmenu
diff --git a/disk/Makefile b/disk/Makefile
index 8b36b17..95d286b 100644
--- a/disk/Makefile
+++ b/disk/Makefile
@@ -10,6 +10,6 @@
obj-$(CONFIG_PARTITIONS) += part.o
obj-$(CONFIG_$(SPL_)MAC_PARTITION) += part_mac.o
obj-$(CONFIG_$(SPL_)DOS_PARTITION) += part_dos.o
-obj-$(CONFIG_ISO_PARTITION) += part_iso.o
+obj-$(CONFIG_$(SPL_)ISO_PARTITION) += part_iso.o
obj-$(CONFIG_AMIGA_PARTITION) += part_amiga.o
obj-$(CONFIG_EFI_PARTITION) += part_efi.o
diff --git a/disk/part.c b/disk/part.c
index 03da243..4731ae9 100644
--- a/disk/part.c
+++ b/disk/part.c
@@ -236,7 +236,7 @@
{
#if CONFIG_IS_ENABLED(MAC_PARTITION) || \
CONFIG_IS_ENABLED(DOS_PARTITION) || \
- defined(CONFIG_ISO_PARTITION) || \
+ CONFIG_IS_ENABLED(ISO_PARTITION) || \
defined(CONFIG_AMIGA_PARTITION) || \
defined(CONFIG_EFI_PARTITION)
puts ("\nPartition Map for ");
diff --git a/disk/part_amiga.h b/disk/part_amiga.h
index 0f04e97..a3fe1a9 100644
--- a/disk/part_amiga.h
+++ b/disk/part_amiga.h
@@ -10,7 +10,7 @@
#define _DISK_PART_AMIGA_H
#include <common.h>
-#ifdef CONFIG_ISO_PARTITION
+#if CONFIG_IS_ENABLED(ISO_PARTITION)
/* Make the buffers bigger if ISO partition support is enabled -- CD-ROMS
have 2048 byte blocks */
#define DEFAULT_SECTOR_SIZE 2048
diff --git a/disk/part_mac.h b/disk/part_mac.h
index 7b754e1..6735144 100644
--- a/disk/part_mac.h
+++ b/disk/part_mac.h
@@ -73,7 +73,7 @@
__u32 boot_cksum; /* boot code checksum */
uchar processor[16]; /* Type of Processor */
__u16 part_pad[188]; /* reserved */
-#ifdef CONFIG_ISO_PARTITION
+#if CONFIG_IS_ENABLED(ISO_PARTITION)
uchar iso_dummy[2048];/* Reservere enough room for an ISO partition block to fit */
#endif
} mac_partition_t;