mirror of
				https://xff.cz/git/u-boot/
				synced 2025-10-30 18:05:48 +01:00 
			
		
		
		
	blackfin: Use getenv_ulong() in place of getenv(), strtoul
This changes the board code to use the new getenv_ulong() function. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
		
				
					committed by
					
						 Wolfgang Denk
						Wolfgang Denk
					
				
			
			
				
	
			
			
			
						parent
						
							eb68b41d5a
						
					
				
				
					commit
					c1f485a1e8
				
			| @@ -62,11 +62,7 @@ static int display_banner(void) | |||||||
|  |  | ||||||
| static int init_baudrate(void) | static int init_baudrate(void) | ||||||
| { | { | ||||||
| 	char baudrate[15]; | 	gd->baudrate = getenv_ulong("baudrate", 10, CONFIG_BAUDRATE); | ||||||
| 	int i = getenv_f("baudrate", baudrate, sizeof(baudrate)); |  | ||||||
| 	gd->bd->bi_baudrate = gd->baudrate = (i > 0) |  | ||||||
| 	    ? simple_strtoul(baudrate, NULL, 10) |  | ||||||
| 	    : CONFIG_BAUDRATE; |  | ||||||
| 	return 0; | 	return 0; | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -374,8 +370,7 @@ void board_init_r(gd_t * id, ulong dest_addr) | |||||||
| #endif | #endif | ||||||
|  |  | ||||||
| 	/* Initialize from environment */ | 	/* Initialize from environment */ | ||||||
| 	if ((s = getenv("loadaddr")) != NULL) | 	load_addr = getenv_ulong("loadaddr", 16, load_addr); | ||||||
| 		load_addr = simple_strtoul(s, NULL, 16); |  | ||||||
|  |  | ||||||
| #if defined(CONFIG_MISC_INIT_R) | #if defined(CONFIG_MISC_INIT_R) | ||||||
| 	/* miscellaneous platform dependent initialisations */ | 	/* miscellaneous platform dependent initialisations */ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user