Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
rev13@wp.pl | fec465a | 2015-03-01 12:44:40 +0100 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2011 |
| 4 | * Yuri Tikhonov, Emcraft Systems, yur@emcraft.com |
| 5 | * |
| 6 | * (C) Copyright 2015 |
Kamil Lulko | 75d48a6 | 2015-12-01 09:08:19 +0100 | [diff] [blame] | 7 | * Kamil Lulko, <kamil.lulko@gmail.com> |
rev13@wp.pl | fec465a | 2015-03-01 12:44:40 +0100 | [diff] [blame] | 8 | */ |
| 9 | |
| 10 | #ifndef _MACH_STM32_H_ |
| 11 | #define _MACH_STM32_H_ |
| 12 | |
Patrice Chotard | edd95ac | 2018-02-09 13:09:55 +0100 | [diff] [blame] | 13 | #include <asm/arch-stm32/stm32f.h> |
| 14 | |
rev13@wp.pl | fec465a | 2015-03-01 12:44:40 +0100 | [diff] [blame] | 15 | /* |
| 16 | * Peripheral memory map |
| 17 | */ |
Antonio Borneo | 989e8b2 | 2015-07-19 22:19:46 +0800 | [diff] [blame] | 18 | #define STM32_SYSMEM_BASE 0x1FFF0000 |
rev13@wp.pl | fec465a | 2015-03-01 12:44:40 +0100 | [diff] [blame] | 19 | |
| 20 | /* |
| 21 | * Register maps |
| 22 | */ |
Antonio Borneo | 989e8b2 | 2015-07-19 22:19:46 +0800 | [diff] [blame] | 23 | struct stm32_u_id_regs { |
| 24 | u32 u_id_low; |
| 25 | u32 u_id_mid; |
| 26 | u32 u_id_high; |
| 27 | }; |
| 28 | |
rev13@wp.pl | fec465a | 2015-03-01 12:44:40 +0100 | [diff] [blame] | 29 | /* |
| 30 | * Registers access macros |
| 31 | */ |
Antonio Borneo | 989e8b2 | 2015-07-19 22:19:46 +0800 | [diff] [blame] | 32 | #define STM32_U_ID_BASE (STM32_SYSMEM_BASE + 0x7A10) |
| 33 | #define STM32_U_ID ((struct stm32_u_id_regs *)STM32_U_ID_BASE) |
Vikas Manocha | e750d56 | 2016-03-09 15:18:13 -0800 | [diff] [blame] | 34 | static const u32 sect_sz_kb[CONFIG_SYS_MAX_FLASH_SECT] = { |
| 35 | [0 ... 3] = 16 * 1024, |
| 36 | [4] = 64 * 1024, |
| 37 | [5 ... 11] = 128 * 1024 |
| 38 | }; |
| 39 | |
rev13@wp.pl | fec465a | 2015-03-01 12:44:40 +0100 | [diff] [blame] | 40 | #endif /* _MACH_STM32_H_ */ |