stm32.h 749 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * (C) Copyright 2011
  4. * Yuri Tikhonov, Emcraft Systems, yur@emcraft.com
  5. *
  6. * (C) Copyright 2015
  7. * Kamil Lulko, <kamil.lulko@gmail.com>
  8. */
  9. #ifndef _MACH_STM32_H_
  10. #define _MACH_STM32_H_
  11. #include <asm/arch-stm32/stm32f.h>
  12. /*
  13. * Peripheral memory map
  14. */
  15. #define STM32_SYSMEM_BASE 0x1FFF0000
  16. /*
  17. * Register maps
  18. */
  19. struct stm32_u_id_regs {
  20. u32 u_id_low;
  21. u32 u_id_mid;
  22. u32 u_id_high;
  23. };
  24. /*
  25. * Registers access macros
  26. */
  27. #define STM32_U_ID_BASE (STM32_SYSMEM_BASE + 0x7A10)
  28. #define STM32_U_ID ((struct stm32_u_id_regs *)STM32_U_ID_BASE)
  29. static const u32 sect_sz_kb[CONFIG_SYS_MAX_FLASH_SECT] = {
  30. [0 ... 3] = 16 * 1024,
  31. [4] = 64 * 1024,
  32. [5 ... 11] = 128 * 1024
  33. };
  34. #endif /* _MACH_STM32_H_ */