2018-05-06 21:58:06 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2015-03-01 11:44:40 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2011
|
|
|
|
* Yuri Tikhonov, Emcraft Systems, yur@emcraft.com
|
|
|
|
*
|
|
|
|
* (C) Copyright 2015
|
2015-12-01 08:08:19 +00:00
|
|
|
* Kamil Lulko, <kamil.lulko@gmail.com>
|
2015-03-01 11:44:40 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _MACH_STM32_H_
|
|
|
|
#define _MACH_STM32_H_
|
|
|
|
|
2018-02-09 12:09:55 +00:00
|
|
|
#include <asm/arch-stm32/stm32f.h>
|
|
|
|
|
2015-03-01 11:44:40 +00:00
|
|
|
/*
|
|
|
|
* Peripheral memory map
|
|
|
|
*/
|
2015-07-19 14:19:46 +00:00
|
|
|
#define STM32_SYSMEM_BASE 0x1FFF0000
|
2015-03-01 11:44:40 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Register maps
|
|
|
|
*/
|
2015-07-19 14:19:46 +00:00
|
|
|
struct stm32_u_id_regs {
|
|
|
|
u32 u_id_low;
|
|
|
|
u32 u_id_mid;
|
|
|
|
u32 u_id_high;
|
|
|
|
};
|
|
|
|
|
2015-03-01 11:44:40 +00:00
|
|
|
/*
|
|
|
|
* Registers access macros
|
|
|
|
*/
|
2015-07-19 14:19:46 +00:00
|
|
|
#define STM32_U_ID_BASE (STM32_SYSMEM_BASE + 0x7A10)
|
|
|
|
#define STM32_U_ID ((struct stm32_u_id_regs *)STM32_U_ID_BASE)
|
2016-03-09 23:18:13 +00:00
|
|
|
static const u32 sect_sz_kb[CONFIG_SYS_MAX_FLASH_SECT] = {
|
|
|
|
[0 ... 3] = 16 * 1024,
|
|
|
|
[4] = 64 * 1024,
|
|
|
|
[5 ... 11] = 128 * 1024
|
|
|
|
};
|
|
|
|
|
2015-03-01 11:44:40 +00:00
|
|
|
#endif /* _MACH_STM32_H_ */
|