[U-Boot] [PATCH v2 2/8] arm/km: remove last_stage_init and unneeded printouts

Valentin Longchamp valentin.longchamp at keymile.com
Wed May 4 09:43:13 CEST 2011


Prafulla Wadaskar wrote:
> 
>> -----Original Message-----
>> From: Valentin Longchamp [mailto:valentin.longchamp at keymile.com]
>> Sent: Tuesday, May 03, 2011 7:43 PM
>> To: u-boot at lists.denx.de
>> Cc: Prafulla Wadaskar; holger.brunck at keymile.com; Valentin Longchamp;
>> Wolfgang Denk; Detlev Zundel
>> Subject: [PATCH v2 2/8] arm/km: remove last_stage_init and unneeded
>> printouts
>>
>> From: Holger Brunck <holger.brunck at keymile.com>
>>
>> last_stage_init is not available for arm platforms. So move
>> the calls to set_km_var and set_bootcount_addr to misc_init_r
>> and remove this function.
>>
>> Additionally some unneeded printouts were removed.
>>
>> Signed-off-by: Valentin Longchamp <valentin.longchamp at keymile.com>
>> Signed-off-by: Holger Brunck <holger.brunck at keymile.com>
>> Acked-by: Heiko Schocher <hs at denx.de>
>> cc: Prafulla Wadaskar <prafulla at marvell.com>
>> cc: Wolfgang Denk <wd at denx.de>
>> cc: Detlev Zundel <dzu at denx.de>
>> ---
>> Changes for v2:
>>    - split up first large patch series to three independent smaller
>>      patch series
>>
>>  board/keymile/km_arm/km_arm.c |   20 ++++----------------
>>  1 files changed, 4 insertions(+), 16 deletions(-)
>>
>> diff --git a/board/keymile/km_arm/km_arm.c
>> b/board/keymile/km_arm/km_arm.c
>> index f147f1f..4049a4e 100644
>> --- a/board/keymile/km_arm/km_arm.c
>> +++ b/board/keymile/km_arm/km_arm.c
>> @@ -161,11 +161,6 @@ int misc_init_r(void)
>>  	char *str;
>>  	int mach_type;
>>
>> -	puts("Piggy:");
>> -	if (ethernet_present() == 0)
>> -		puts (" not");
>> -	puts(" present\n");
>> -
>>  	str = getenv("mach_type");
>>  	if (str != NULL) {
>>  		mach_type = simple_strtoul(str, NULL, 10);
>> @@ -174,7 +169,10 @@ int misc_init_r(void)
>>  	}
>>
>>  	initialize_unit_leds();
>> -
>> +	set_km_env();
>> +#if defined(CONFIG_BOOTCOUNT_LIMIT)
>> +	set_bootcount_addr();
>> +#endif
>>  	return 0;
>>  }
>>
>> @@ -193,7 +191,6 @@ int board_early_init_f(void)
>>  	writel(tmp | FLASH_GPIO_PIN , KW_GPIO0_BASE);
>>  	tmp = readl(KW_GPIO0_BASE + 4);
>>  	writel(tmp & (~FLASH_GPIO_PIN) , KW_GPIO0_BASE + 4);
>> -	printf("KM: setting NAND mode\n");
>>
>>  #if defined(CONFIG_SOFT_I2C)
>>  	/* init the GPIO for I2C Bitbang driver */
>> @@ -223,15 +220,6 @@ int board_init(void)
>>  	return 0;
>>  }
>>
>> -int last_stage_init(void)
>> -{
>> -	set_km_env();
>> -#if defined(CONFIG_BOOTCOUNT_LIMIT)
>> -	set_bootcount_addr();
>> -#endif
>> -	return 0;
>> -}
> 
> This patch can be merged with 1/8 since you are undoing the changes done there. BTW: what is purpose?
> 

Yes I agree, they can be merged. You mean the purpose of the bootcounter 
env variable ? Well, we have a bootcounter that is placed at a certain 
reserved memory address, and we compute the address so that we can give 
it to the kernel as a parameter (that's how we have done it on kirkwood 
since we don't have a reserved SRAM for such things).

Regards

-- 
Valentin Longchamp
Embedded Software Engineer
Hardware and Chip Integration
______________________________________
KEYMILE AG
Schwarzenburgstr. 73
CH-3097 Liebefeld
Phone +41 31 377 1318
Fax   +41 31 377 1212
valentin.longchamp at keymile.com
www.keymile.com
______________________________________
KEYMILE: A Specialist as a Partner


More information about the U-Boot mailing list