boards: arc: nsim: cleanup dts warnings
Fix the following device tree warnings: unit-address and first reg (0x40000) don't match for iccm@0 unit-address and first reg (0x80040000) don't match for dccm@80000000 Re-work iccm and dccm reg address and size to be based on #defines. This allows the nsim_sem_normal.dts to override defaults that are set in nsim.dtsi. Utilize DT_ADDR macro to take a 'unit-address' still value and convert it into a hex value (just prepending 0x). Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
dacf211d36
commit
b921955e44
3 changed files with 32 additions and 18 deletions
|
@ -7,6 +7,23 @@
|
|||
/dts-v1/;
|
||||
|
||||
#include "skeleton.dtsi"
|
||||
#include <mem.h>
|
||||
|
||||
#ifndef ICCM_ADDR
|
||||
#define ICCM_ADDR 0
|
||||
#endif
|
||||
|
||||
#ifndef ICCM_SIZE
|
||||
#define ICCM_SIZE DT_SIZE_K(512)
|
||||
#endif
|
||||
|
||||
#ifndef DCCM_ADDR
|
||||
#define DCCM_ADDR 80000000
|
||||
#endif
|
||||
|
||||
#ifndef DCCM_SIZE
|
||||
#define DCCM_SIZE DT_SIZE_K(512)
|
||||
#endif
|
||||
|
||||
/ {
|
||||
cpus {
|
||||
|
@ -20,14 +37,16 @@
|
|||
};
|
||||
};
|
||||
|
||||
iccm0: iccm@0 {
|
||||
iccm0: iccm@ICCM_ADDR {
|
||||
device_type = "memory";
|
||||
compatible = "arc,iccm";
|
||||
reg = <0x0 0x80000>;
|
||||
reg = <DT_ADDR(ICCM_ADDR) ICCM_SIZE>;
|
||||
};
|
||||
|
||||
dccm0: dccm@80000000 {
|
||||
dccm0: dccm@DCCM_ADDR {
|
||||
compatible = "arc,dccm";
|
||||
reg = <0x80000000 0x80000>;
|
||||
device_type = "memory";
|
||||
reg = <DT_ADDR(DCCM_ADDR) DCCM_SIZE>;
|
||||
};
|
||||
|
||||
uart0: uart@f0000000 {
|
||||
|
|
|
@ -7,6 +7,13 @@
|
|||
/dts-v1/;
|
||||
|
||||
#include <mem.h>
|
||||
|
||||
/* must be before include of nsim_em.dtsi */
|
||||
#define ICCM_ADDR 40000
|
||||
#define ICCM_SIZE DT_SIZE_K(256)
|
||||
#define DCCM_ADDR 80040000
|
||||
#define DCCM_SIZE DT_SIZE_K(256)
|
||||
|
||||
#include "nsim_em.dtsi"
|
||||
|
||||
/ {
|
||||
|
@ -14,18 +21,6 @@
|
|||
model = "nsim_sem_normal";
|
||||
compatible = "snps,nsim_sem_normal";
|
||||
|
||||
iccm0: iccm@0 {
|
||||
device_type = "memory";
|
||||
compatible = "arc,iccm";
|
||||
reg = <0x40000 DT_SIZE_K(256)>;
|
||||
};
|
||||
|
||||
dccm0: dccm@80000000 {
|
||||
device_type = "memory";
|
||||
compatible = "arc,dccm";
|
||||
reg = <0x80040000 DT_SIZE_K(256)>;
|
||||
};
|
||||
|
||||
chosen {
|
||||
zephyr,sram = &dccm0;
|
||||
};
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
/* SoC level DTS fixup file */
|
||||
|
||||
/* CCM configuration */
|
||||
#define DT_DCCM_BASE_ADDRESS DT_ARC_DCCM_80000000_BASE_ADDRESS
|
||||
#define DT_DCCM_SIZE (DT_ARC_DCCM_80000000_SIZE >> 10)
|
||||
#define DT_DCCM_BASE_ADDRESS DT_INST_0_ARC_DCCM_BASE_ADDRESS
|
||||
#define DT_DCCM_SIZE (DT_INST_0_ARC_DCCM_SIZE >> 10)
|
||||
|
||||
#define DT_ICCM_BASE_ADDRESS DT_INST_0_ARC_ICCM_BASE_ADDRESS
|
||||
#define DT_ICCM_SIZE (DT_INST_0_ARC_ICCM_SIZE >> 10)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue