disk: Add an option for partitions in SPL
In some cases we do not want to enable partition support in SPL. Add an option to allow this. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
		
							parent
							
								
									5b66ebb4e9
								
							
						
					
					
						commit
						88ca8e2695
					
				
							
								
								
									
										24
									
								
								disk/Kconfig
								
								
								
								
							
							
						
						
									
										24
									
								
								disk/Kconfig
								
								
								
								
							|  | @ -4,10 +4,6 @@ menu "Partition Types" | ||||||
| config PARTITIONS | config PARTITIONS | ||||||
| 	bool "Enable Partition Labels (disklabels) support" | 	bool "Enable Partition Labels (disklabels) support" | ||||||
| 	default y | 	default y | ||||||
| 	select SPL_SPRINTF if SPL |  | ||||||
| 	select TPL_SPRINTF if TPL |  | ||||||
| 	select SPL_STRTO if SPL |  | ||||||
| 	select TPL_STRTO if TPL |  | ||||||
| 	help | 	help | ||||||
| 	  Partition Labels (disklabels) Supported: | 	  Partition Labels (disklabels) Supported: | ||||||
| 	  Zero or more of the following: | 	  Zero or more of the following: | ||||||
|  | @ -23,6 +19,26 @@ config PARTITIONS | ||||||
| 	  you must configure support for at least one non-MTD partition type | 	  you must configure support for at least one non-MTD partition type | ||||||
| 	  as well. | 	  as well. | ||||||
| 
 | 
 | ||||||
|  | config SPL_PARTITIONS | ||||||
|  | 	bool "Enable Partition Labels (disklabels) support in SPL" | ||||||
|  | 	default y if PARTITIONS | ||||||
|  | 	select SPL_SPRINTF | ||||||
|  | 	select SPL_STRTO | ||||||
|  | 	help | ||||||
|  | 	  Enable this for base partition support in SPL. The required | ||||||
|  | 	  partition table types shold be enabled separately. This add a | ||||||
|  | 	  small amount of size to SPL, typically 500 bytes. | ||||||
|  | 
 | ||||||
|  | config TPL_PARTITIONS | ||||||
|  | 	bool "Enable Partition Labels (disklabels) support in TPL" | ||||||
|  | 	default y if PARTITIONS | ||||||
|  | 	select TPL_SPRINTF | ||||||
|  | 	select TPL_STRTO | ||||||
|  | 	help | ||||||
|  | 	  Enable this for base partition support in SPL. The required | ||||||
|  | 	  partition table types shold be enabled separately. This add a | ||||||
|  | 	  small amount of size to SPL, typically 500 bytes. | ||||||
|  | 
 | ||||||
| config MAC_PARTITION | config MAC_PARTITION | ||||||
| 	bool "Enable Apple's MacOS partition table" | 	bool "Enable Apple's MacOS partition table" | ||||||
| 	depends on PARTITIONS | 	depends on PARTITIONS | ||||||
|  |  | ||||||
|  | @ -5,7 +5,7 @@ | ||||||
| 
 | 
 | ||||||
| #ccflags-y += -DET_DEBUG -DDEBUG
 | #ccflags-y += -DET_DEBUG -DDEBUG
 | ||||||
| 
 | 
 | ||||||
| obj-$(CONFIG_PARTITIONS)	+= part.o | obj-$(CONFIG_$(SPL_TPL_)PARTITIONS)  += part.o | ||||||
| obj-$(CONFIG_$(SPL_)MAC_PARTITION)   += part_mac.o | obj-$(CONFIG_$(SPL_)MAC_PARTITION)   += part_mac.o | ||||||
| obj-$(CONFIG_$(SPL_)DOS_PARTITION)   += part_dos.o | obj-$(CONFIG_$(SPL_)DOS_PARTITION)   += part_dos.o | ||||||
| obj-$(CONFIG_$(SPL_)ISO_PARTITION)   += part_iso.o | obj-$(CONFIG_$(SPL_)ISO_PARTITION)   += part_iso.o | ||||||
|  |  | ||||||
|  | @ -712,7 +712,7 @@ int blk_unbind_all(int if_type) | ||||||
| 
 | 
 | ||||||
| static int blk_post_probe(struct udevice *dev) | static int blk_post_probe(struct udevice *dev) | ||||||
| { | { | ||||||
| 	if (IS_ENABLED(CONFIG_PARTITIONS) && | 	if (CONFIG_IS_ENABLED(PARTITIONS) && | ||||||
| 	    IS_ENABLED(CONFIG_HAVE_BLOCK_DEVICE)) { | 	    IS_ENABLED(CONFIG_HAVE_BLOCK_DEVICE)) { | ||||||
| 		struct blk_desc *desc = dev_get_uclass_plat(dev); | 		struct blk_desc *desc = dev_get_uclass_plat(dev); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue