cmd: Add Kconfig option for CMD_MTDPARTS and related options
CMD_MTDPARTS is something the user might or might not want to select, and might depends on (or be selected by) other options too. This is even truer for the MTDIDS_DEFAULT and MTDPARTS_DEFAULT options that might change from one board to another, or from one user to the other, depending on what it expects and what storage devices are available. In order to ease that configuration, add those options to Kconfig. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
This commit is contained in:
		
							parent
							
								
									fb1c43cc37
								
							
						
					
					
						commit
						0269dfae0e
					
				
							
								
								
									
										20
									
								
								cmd/Kconfig
								
								
								
								
							
							
						
						
									
										20
									
								
								cmd/Kconfig
								
								
								
								
							| 
						 | 
					@ -801,6 +801,26 @@ config CMD_FS_GENERIC
 | 
				
			||||||
	help
 | 
						help
 | 
				
			||||||
	  Enables filesystem commands (e.g. load, ls) that work for multiple
 | 
						  Enables filesystem commands (e.g. load, ls) that work for multiple
 | 
				
			||||||
	  fs types.
 | 
						  fs types.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					config CMD_MTDPARTS
 | 
				
			||||||
 | 
						depends on ARCH_SUNXI
 | 
				
			||||||
 | 
						bool "MTD partition support"
 | 
				
			||||||
 | 
						help
 | 
				
			||||||
 | 
						  MTD partition support
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					config MTDIDS_DEFAULT
 | 
				
			||||||
 | 
						string "Default MTD IDs"
 | 
				
			||||||
 | 
						depends on CMD_MTDPARTS
 | 
				
			||||||
 | 
						help
 | 
				
			||||||
 | 
						  Defines a default MTD ID
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					config MTDPARTS_DEFAULT
 | 
				
			||||||
 | 
						string "Default MTD partition scheme"
 | 
				
			||||||
 | 
						depends on CMD_MTDPARTS
 | 
				
			||||||
 | 
						help
 | 
				
			||||||
 | 
						  Defines a default MTD partitioning scheme in the Linux MTD command
 | 
				
			||||||
 | 
						  line partitions format
 | 
				
			||||||
 | 
					
 | 
				
			||||||
endmenu
 | 
					endmenu
 | 
				
			||||||
 | 
					
 | 
				
			||||||
config CMD_UBI
 | 
					config CMD_UBI
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -110,11 +110,19 @@ DECLARE_GLOBAL_DATA_PTR;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* default values for mtdids and mtdparts variables */
 | 
					/* default values for mtdids and mtdparts variables */
 | 
				
			||||||
#if !defined(MTDIDS_DEFAULT)
 | 
					#if !defined(MTDIDS_DEFAULT)
 | 
				
			||||||
 | 
					#ifdef CONFIG_MTDIDS_DEFAULT
 | 
				
			||||||
 | 
					#define MTDIDS_DEFAULT CONFIG_MTDIDS_DEFAULT
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
#define MTDIDS_DEFAULT NULL
 | 
					#define MTDIDS_DEFAULT NULL
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
#if !defined(MTDPARTS_DEFAULT)
 | 
					#if !defined(MTDPARTS_DEFAULT)
 | 
				
			||||||
 | 
					#ifdef CONFIG_MTDPARTS_DEFAULT
 | 
				
			||||||
 | 
					#define MTDPARTS_DEFAULT CONFIG_MTDPARTS_DEFAULT
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
#define MTDPARTS_DEFAULT NULL
 | 
					#define MTDPARTS_DEFAULT NULL
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
#if defined(CONFIG_SYS_MTDPARTS_RUNTIME)
 | 
					#if defined(CONFIG_SYS_MTDPARTS_RUNTIME)
 | 
				
			||||||
extern void board_mtdparts_default(const char **mtdids, const char **mtdparts);
 | 
					extern void board_mtdparts_default(const char **mtdids, const char **mtdparts);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue