/* Write a data buffer to internal Flash. Note that we need for this function to reside in RAM since it will be used to self-upgrade U-boot in internal Flash.  */
u32 __attribute__((section(".ramcode")))
/* Write a data buffer to internal Flash. Note that we need for this function to reside in RAM since it will be used to self-upgrade U-boot in internal Flash.  */
u32 __attribute__((section(".ramcode")))
{
	if (STM32_FLASH_REGS->cr & STM32_FLASH_CR_LOCK) {
		STM32_FLASH_REGS->keyr = STM32_FLASH_KEYR_KEY1;
		STM32_FLASH_REGS->keyr = STM32_FLASH_KEYR_KEY2;
	}
}