dts: arm: st: Make flash/sram sizes human readable

Introduce a __SIZE_K macro to make things a bit more human readable.
Also fixed up sizes for CONFIG_SOC_STM32F411XE.

Change-Id: I01b8b5f627ad949c2af01ee966428bfabe09e2ee
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2017-04-05 09:52:22 -05:00
commit a125bb4483

View file

@ -1,27 +1,32 @@
#ifndef __DT_BINDING_ST_MEM_H
#define __DT_BINDING_ST_MEM_H
#define __SIZE_K(x) (x * 1024)
#if defined(CONFIG_SOC_STM32F103XB)
#define DT_FLASH_SIZE 0x20000
#define DT_SRAM_SIZE 0x5000
#define DT_FLASH_SIZE __SIZE_K(128)
#define DT_SRAM_SIZE __SIZE_K(20)
#elif defined(CONFIG_SOC_STM32F103XE)
#define DT_FLASH_SIZE 0x80000
#define DT_SRAM_SIZE 0x10000
#define DT_FLASH_SIZE __SIZE_K(512)
#define DT_SRAM_SIZE __SIZE_K(64)
#elif defined(CONFIG_SOC_STM32F107XC)
#define DT_FLASH_SIZE 0x40000
#define DT_SRAM_SIZE 0x10000
#define DT_FLASH_SIZE __SIZE_K(256)
#define DT_SRAM_SIZE __SIZE_K(64)
#elif defined(CONFIG_SOC_STM32F334X8)
#define DT_FLASH_SIZE 0x10000
#define DT_SRAM_SIZE 0x3000
#define DT_FLASH_SIZE __SIZE_K(64)
#define DT_SRAM_SIZE __SIZE_K(12)
#elif defined(CONFIG_SOC_STM32F373XC)
#define DT_FLASH_SIZE 0x40000
#define DT_SRAM_SIZE 0x8000
#elif defined(CONFIG_SOC_STM32F401XE) || defined(CONFIG_SOC_STM32F411XE)
#define DT_FLASH_SIZE 0x80000
#define DT_SRAM_SIZE 0x18000
#define DT_FLASH_SIZE __SIZE_K(256)
#define DT_SRAM_SIZE __SIZE_K(32)
#elif defined(CONFIG_SOC_STM32F401XE)
#define DT_FLASH_SIZE __SIZE_K(512)
#define DT_SRAM_SIZE __SIZE_K(96)
#elif defined(CONFIG_SOC_STM32F411XE)
#define DT_FLASH_SIZE __SIZE_K(512)
#define DT_SRAM_SIZE __SIZE_K(128)
#elif defined(CONFIG_SOC_STM32L476XX)
#define DT_FLASH_SIZE 0x100000
#define DT_SRAM_SIZE 0x18000
#define DT_FLASH_SIZE __SIZE_K(1024)
#define DT_SRAM_SIZE __SIZE_K(96)
#else
#error "Flash and RAM sizes not defined for this chip"
#endif