blob: 903931243c2c2fa84cce3e83fb51e30f8cd7c3c1 [file] [log] [blame]
rev13@wp.plfec465a2015-03-01 12:44:40 +01001/*
2 * (C) Copyright 2011
3 * Yuri Tikhonov, Emcraft Systems, yur@emcraft.com
4 *
5 * (C) Copyright 2015
Kamil Lulko75d48a62015-12-01 09:08:19 +01006 * Kamil Lulko, <kamil.lulko@gmail.com>
rev13@wp.plfec465a2015-03-01 12:44:40 +01007 *
8 * SPDX-License-Identifier: GPL-2.0+
9 */
10
11#ifndef _MACH_STM32_H_
12#define _MACH_STM32_H_
13
Patrice Chotardedd95ac2018-02-09 13:09:55 +010014#include <asm/arch-stm32/stm32f.h>
15
rev13@wp.plfec465a2015-03-01 12:44:40 +010016/*
17 * Peripheral memory map
18 */
Antonio Borneo989e8b22015-07-19 22:19:46 +080019#define STM32_SYSMEM_BASE 0x1FFF0000
rev13@wp.plfec465a2015-03-01 12:44:40 +010020
21/*
22 * Register maps
23 */
Antonio Borneo989e8b22015-07-19 22:19:46 +080024struct stm32_u_id_regs {
25 u32 u_id_low;
26 u32 u_id_mid;
27 u32 u_id_high;
28};
29
rev13@wp.plfec465a2015-03-01 12:44:40 +010030/*
31 * Registers access macros
32 */
Antonio Borneo989e8b22015-07-19 22:19:46 +080033#define STM32_U_ID_BASE (STM32_SYSMEM_BASE + 0x7A10)
34#define STM32_U_ID ((struct stm32_u_id_regs *)STM32_U_ID_BASE)
Vikas Manochae750d562016-03-09 15:18:13 -080035static const u32 sect_sz_kb[CONFIG_SYS_MAX_FLASH_SECT] = {
36 [0 ... 3] = 16 * 1024,
37 [4] = 64 * 1024,
38 [5 ... 11] = 128 * 1024
39};
40
rev13@wp.plfec465a2015-03-01 12:44:40 +010041#endif /* _MACH_STM32_H_ */