common: Move LCD and video memory reservation together
These two functions are conceptually the same. Move them together in the pre-relocation init. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
This commit is contained in:
		
							parent
							
								
									b5146b2811
								
							
						
					
					
						commit
						8703ef3fdb
					
				|  | @ -451,6 +451,19 @@ static int reserve_lcd(void) | ||||||
| } | } | ||||||
| #endif /* CONFIG_LCD */ | #endif /* CONFIG_LCD */ | ||||||
| 
 | 
 | ||||||
|  | #if defined(CONFIG_VIDEO) && (!defined(CONFIG_PPC) || defined(CONFIG_8xx)) && \ | ||||||
|  | 		!defined(CONFIG_ARM) && !defined(CONFIG_X86) && \ | ||||||
|  | 		!defined(CONFIG_BLACKFIN) && !defined(CONFIG_M68K) | ||||||
|  | static int reserve_legacy_video(void) | ||||||
|  | { | ||||||
|  | 	/* reserve memory for video display (always full pages) */ | ||||||
|  | 	gd->relocaddr = video_setmem(gd->relocaddr); | ||||||
|  | 	gd->fb_base = gd->relocaddr; | ||||||
|  | 
 | ||||||
|  | 	return 0; | ||||||
|  | } | ||||||
|  | #endif | ||||||
|  | 
 | ||||||
| static int reserve_trace(void) | static int reserve_trace(void) | ||||||
| { | { | ||||||
| #ifdef CONFIG_TRACE | #ifdef CONFIG_TRACE | ||||||
|  | @ -463,19 +476,6 @@ static int reserve_trace(void) | ||||||
| 	return 0; | 	return 0; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| #if defined(CONFIG_VIDEO) && (!defined(CONFIG_PPC) || defined(CONFIG_8xx)) && \ |  | ||||||
| 		!defined(CONFIG_ARM) && !defined(CONFIG_X86) && \ |  | ||||||
| 		!defined(CONFIG_BLACKFIN) && !defined(CONFIG_M68K) |  | ||||||
| static int reserve_video(void) |  | ||||||
| { |  | ||||||
| 	/* reserve memory for video display (always full pages) */ |  | ||||||
| 	gd->relocaddr = video_setmem(gd->relocaddr); |  | ||||||
| 	gd->fb_base = gd->relocaddr; |  | ||||||
| 
 |  | ||||||
| 	return 0; |  | ||||||
| } |  | ||||||
| #endif |  | ||||||
| 
 |  | ||||||
| static int reserve_uboot(void) | static int reserve_uboot(void) | ||||||
| { | { | ||||||
| 	/*
 | 	/*
 | ||||||
|  | @ -960,13 +960,13 @@ static init_fnc_t init_sequence_f[] = { | ||||||
| #ifdef CONFIG_LCD | #ifdef CONFIG_LCD | ||||||
| 	reserve_lcd, | 	reserve_lcd, | ||||||
| #endif | #endif | ||||||
| 	reserve_trace, |  | ||||||
| 	/* TODO: Why the dependency on CONFIG_8xx? */ | 	/* TODO: Why the dependency on CONFIG_8xx? */ | ||||||
| #if defined(CONFIG_VIDEO) && (!defined(CONFIG_PPC) || defined(CONFIG_8xx)) && \ | #if defined(CONFIG_VIDEO) && (!defined(CONFIG_PPC) || defined(CONFIG_8xx)) && \ | ||||||
| 		!defined(CONFIG_ARM) && !defined(CONFIG_X86) && \ | 		!defined(CONFIG_ARM) && !defined(CONFIG_X86) && \ | ||||||
| 		!defined(CONFIG_BLACKFIN) && !defined(CONFIG_M68K) | 		!defined(CONFIG_BLACKFIN) && !defined(CONFIG_M68K) | ||||||
| 	reserve_video, | 	reserve_video, | ||||||
| #endif | #endif | ||||||
|  | 	reserve_trace, | ||||||
| #if !defined(CONFIG_BLACKFIN) | #if !defined(CONFIG_BLACKFIN) | ||||||
| 	reserve_uboot, | 	reserve_uboot, | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue