libpayload: Use #ifdef for CONFIG_* checks
Libpayload uses the linux kernel's config style, where CONFIG_* defines don't get written for unset tristates. Change-Id: I3f832cf86bca9a1e153d96af4bf6434a19eba2f6 Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: http://review.coreboot.org/1847 Tested-by: build bot (Jenkins) Reviewed-by: Anton Kochkov <anton.kochkov@gmail.com> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
		
				
					committed by
					
						
						Stefan Reinauer
					
				
			
			
				
	
			
			
			
						parent
						
							ff73306ec2
						
					
				
				
					commit
					dd5979ab43
				
			@@ -84,7 +84,7 @@ static void cb_parse_version(void *ptr, struct sysinfo_t *info)
 | 
				
			|||||||
	info->cb_version = (char *)ver->string;
 | 
						info->cb_version = (char *)ver->string;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if CONFIG_CHROMEOS
 | 
					#ifdef CONFIG_CHROMEOS
 | 
				
			||||||
static void cb_parse_vbnv(unsigned char *ptr, struct sysinfo_t *info)
 | 
					static void cb_parse_vbnv(unsigned char *ptr, struct sysinfo_t *info)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct cb_vbnv *vbnv = (struct cb_vbnv *)ptr;
 | 
						struct cb_vbnv *vbnv = (struct cb_vbnv *)ptr;
 | 
				
			||||||
@@ -251,7 +251,7 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
 | 
				
			|||||||
#endif
 | 
					#endif
 | 
				
			||||||
		case CB_TAG_MAINBOARD:
 | 
							case CB_TAG_MAINBOARD:
 | 
				
			||||||
			info->mainboard = (struct cb_mainboard *)ptr;
 | 
								info->mainboard = (struct cb_mainboard *)ptr;
 | 
				
			||||||
#if CONFIG_CHROMEOS
 | 
					#ifdef CONFIG_CHROMEOS
 | 
				
			||||||
		case CB_TAG_GPIO:
 | 
							case CB_TAG_GPIO:
 | 
				
			||||||
			cb_parse_gpios(ptr, info);
 | 
								cb_parse_gpios(ptr, info);
 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -50,8 +50,9 @@ void start_main(void)
 | 
				
			|||||||
	lib_get_sysinfo();
 | 
						lib_get_sysinfo();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Optionally set up the consoles. */
 | 
						/* Optionally set up the consoles. */
 | 
				
			||||||
	if (!CONFIG_SKIP_CONSOLE_INIT)
 | 
					#ifndef CONFIG_SKIP_CONSOLE_INIT
 | 
				
			||||||
		console_init();
 | 
						console_init();
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * Any other system init that has to happen before the
 | 
						 * Any other system init that has to happen before the
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -47,8 +47,9 @@ void start_main(void)
 | 
				
			|||||||
	extern int main(int argc, char **argv);
 | 
						extern int main(int argc, char **argv);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Optionally set up the consoles. */
 | 
						/* Optionally set up the consoles. */
 | 
				
			||||||
	if (!CONFIG_SKIP_CONSOLE_INIT)
 | 
					#ifndef CONFIG_SKIP_CONSOLE_INIT
 | 
				
			||||||
		console_init();
 | 
						console_init();
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Gather system information. */
 | 
						/* Gather system information. */
 | 
				
			||||||
	lib_get_sysinfo();
 | 
						lib_get_sysinfo();
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -57,7 +57,7 @@ struct sysinfo_t {
 | 
				
			|||||||
	u32 cmos_range_start;
 | 
						u32 cmos_range_start;
 | 
				
			||||||
	u32 cmos_range_end;
 | 
						u32 cmos_range_end;
 | 
				
			||||||
	u32 cmos_checksum_location;
 | 
						u32 cmos_checksum_location;
 | 
				
			||||||
#if CONFIG_CHROMEOS
 | 
					#ifdef CONFIG_CHROMEOS
 | 
				
			||||||
	u32 vbnv_start;
 | 
						u32 vbnv_start;
 | 
				
			||||||
	u32 vbnv_size;
 | 
						u32 vbnv_size;
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
@@ -77,7 +77,7 @@ struct sysinfo_t {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	struct cb_framebuffer *framebuffer;
 | 
						struct cb_framebuffer *framebuffer;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if CONFIG_CHROMEOS
 | 
					#ifdef CONFIG_CHROMEOS
 | 
				
			||||||
	int num_gpios;
 | 
						int num_gpios;
 | 
				
			||||||
	struct cb_gpio gpios[SYSINFO_MAX_GPIOS];
 | 
						struct cb_gpio gpios[SYSINFO_MAX_GPIOS];
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
@@ -87,7 +87,7 @@ struct sysinfo_t {
 | 
				
			|||||||
	struct cb_header *header;
 | 
						struct cb_header *header;
 | 
				
			||||||
	struct cb_mainboard *mainboard;
 | 
						struct cb_mainboard *mainboard;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if CONFIG_CHROMEOS
 | 
					#ifdef CONFIG_CHROMEOS
 | 
				
			||||||
	void	*vdat_addr;
 | 
						void	*vdat_addr;
 | 
				
			||||||
	u32	vdat_size;
 | 
						u32	vdat_size;
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user