mirror of
https://github.com/Dasharo/zephyr.git
synced 2026-03-06 14:57:20 -08:00
linker: Introduce zephyr,memory-region compatible
Introduce a new "zephyr,memory-region" compatible to be used when a new memory region must be created in the linker script from the devicetree nodes using the compatible. Remove also the LINKER_DT_REGION_FROM_NODE macro and add a new LINKER_DT_REGIONS macro to cycle through all the compatible regions. In the same PR modify the DTS files and the linker scripts. Signed-off-by: Carlo Caione <ccaione@baylibre.com>
This commit is contained in:
committed by
Anas Nashif
parent
3c0c03b9eb
commit
18ffcdcf74
@@ -26,13 +26,13 @@
|
||||
|
||||
soc {
|
||||
itcm: memory@0 {
|
||||
compatible = "arm,itcm";
|
||||
compatible = "zephyr,memory-region", "arm,itcm";
|
||||
reg = <0x00000000 DT_SIZE_K(64)>;
|
||||
zephyr,memory-region = "ITCM";
|
||||
};
|
||||
|
||||
dtcm: memory@20000000 {
|
||||
compatible = "arm,dtcm";
|
||||
compatible = "zephyr,memory-region", "arm,dtcm";
|
||||
reg = <0x20000000 DT_SIZE_K(32)>;
|
||||
zephyr,memory-region = "DTCM";
|
||||
};
|
||||
|
||||
@@ -32,13 +32,13 @@
|
||||
|
||||
soc {
|
||||
itcm: memory@0 {
|
||||
compatible = "arm,itcm";
|
||||
compatible = "zephyr,memory-region", "arm,itcm";
|
||||
reg = <0x00000000 DT_SIZE_K(32)>;
|
||||
zephyr,memory-region = "ITCM";
|
||||
};
|
||||
|
||||
dtcm: memory@20000000 {
|
||||
compatible = "arm,dtcm";
|
||||
compatible = "zephyr,memory-region", "arm,dtcm";
|
||||
reg = <0x20000000 DT_SIZE_K(32)>;
|
||||
zephyr,memory-region = "DTCM";
|
||||
};
|
||||
|
||||
@@ -80,13 +80,13 @@
|
||||
*/
|
||||
|
||||
sram1: memory@10000000 {
|
||||
compatible = "mmio-sram";
|
||||
compatible = "zephyr,memory-region", "mmio-sram";
|
||||
reg = <0x10000000 DT_SIZE_M(4)>;
|
||||
zephyr,memory-region = "SRAM1";
|
||||
};
|
||||
|
||||
sram2_3: memory@38000000 {
|
||||
compatible = "mmio-sram";
|
||||
compatible = "zephyr,memory-region", "mmio-sram";
|
||||
reg = <0x38000000 DT_SIZE_M(4)>;
|
||||
zephyr,memory-region = "SRAM2_3";
|
||||
};
|
||||
|
||||
@@ -80,13 +80,13 @@
|
||||
*/
|
||||
|
||||
sram1: memory@0 {
|
||||
compatible = "mmio-sram";
|
||||
compatible = "zephyr,memory-region", "mmio-sram";
|
||||
reg = <0x0 DT_SIZE_M(4)>;
|
||||
zephyr,memory-region = "SRAM1";
|
||||
};
|
||||
|
||||
sram2_3: memory@28000000 {
|
||||
compatible = "mmio-sram";
|
||||
compatible = "zephyr,memory-region", "mmio-sram";
|
||||
reg = <0x28000000 DT_SIZE_M(4)>;
|
||||
zephyr,memory-region = "SRAM2_3";
|
||||
};
|
||||
|
||||
@@ -80,13 +80,13 @@
|
||||
*/
|
||||
|
||||
sram1: memory@0 {
|
||||
compatible = "mmio-sram";
|
||||
compatible = "zephyr,memory-region", "mmio-sram";
|
||||
reg = <0x0 DT_SIZE_M(4)>;
|
||||
zephyr,memory-region = "SRAM1";
|
||||
};
|
||||
|
||||
sram2_3: memory@28000000 {
|
||||
compatible = "mmio-sram";
|
||||
compatible = "zephyr,memory-region", "mmio-sram";
|
||||
reg = <0x28000000 DT_SIZE_M(4)>;
|
||||
zephyr,memory-region = "SRAM2_3";
|
||||
};
|
||||
|
||||
@@ -108,6 +108,7 @@
|
||||
* you'll get the non-secure alias
|
||||
*/
|
||||
itcm: itcm@10000000 { /* alias @ 0x0 */
|
||||
compatible = "zephyr,memory-region";
|
||||
reg = <0x10000000 DT_SIZE_K(512)>;
|
||||
zephyr,memory-region = "ITCM";
|
||||
};
|
||||
@@ -118,6 +119,7 @@
|
||||
};
|
||||
|
||||
dtcm: dtcm@30000000 { /* alias @ 0x20000000 */
|
||||
compatible = "zephyr,memory-region";
|
||||
reg = <0x30000000 DT_SIZE_K(512)>;
|
||||
zephyr,memory-region = "DTCM";
|
||||
};
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
};
|
||||
|
||||
sdram2: sdram@d0000000 {
|
||||
compatible = "mmio-sram";
|
||||
compatible = "zephyr,memory-region", "mmio-sram";
|
||||
device_type = "memory";
|
||||
reg = <0xd0000000 DT_SIZE_M(8)>;
|
||||
zephyr,memory-region = "SDRAM2";
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
};
|
||||
|
||||
sdram1: sdram@c0000000 {
|
||||
compatible = "mmio-sram";
|
||||
compatible = "zephyr,memory-region", "mmio-sram";
|
||||
device_type = "memory";
|
||||
reg = <0xc0000000 DT_SIZE_M(16)>;
|
||||
zephyr,memory-region = "SDRAM1";
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
};
|
||||
|
||||
sdram2: sdram@d0000000 {
|
||||
compatible = "mmio-sram";
|
||||
compatible = "zephyr,memory-region", "mmio-sram";
|
||||
device_type = "memory";
|
||||
reg = <0xd0000000 DT_SIZE_M(32)>;
|
||||
zephyr,memory-region = "SDRAM2";
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
* exclusive for USB descriptors
|
||||
*/
|
||||
sram1: memory@21000000 {
|
||||
compatible = "mmio-sram";
|
||||
compatible = "zephyr,memory-region", "mmio-sram";
|
||||
reg = <0x21000000 DT_SIZE_K(4)>;
|
||||
zephyr,memory-region = "SRAM1";
|
||||
};
|
||||
|
||||
@@ -57,13 +57,13 @@
|
||||
};
|
||||
|
||||
sram1: memory@8023000 {
|
||||
compatible = "mmio-sram";
|
||||
compatible = "zephyr,memory-region", "mmio-sram";
|
||||
reg = <0x08023000 DT_SIZE_K(4)>;
|
||||
zephyr,memory-region = "SRAM1";
|
||||
};
|
||||
|
||||
sram2: memory@8024000 {
|
||||
compatible = "mmio-sram";
|
||||
compatible = "zephyr,memory-region", "mmio-sram";
|
||||
reg = <0x08024000 DT_SIZE_K(112)>;
|
||||
zephyr,memory-region = "SRAM2";
|
||||
};
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
};
|
||||
|
||||
sram1: memory@21000000 {
|
||||
compatible = "mmio-sram";
|
||||
compatible = "zephyr,memory-region", "mmio-sram";
|
||||
zephyr,memory-region = "SRAM1";
|
||||
};
|
||||
|
||||
|
||||
@@ -24,13 +24,13 @@
|
||||
};
|
||||
|
||||
sram1:memory@20000000 {
|
||||
compatible = "mmio-sram";
|
||||
compatible = "zephyr,memory-region", "mmio-sram";
|
||||
reg = <0x20000000 0x800>;
|
||||
zephyr,memory-region = "SRAM1";
|
||||
};
|
||||
|
||||
sram2:memory@20004000 {
|
||||
compatible = "mmio-sram";
|
||||
compatible = "zephyr,memory-region", "mmio-sram";
|
||||
reg = <0x20004000 0x800>;
|
||||
zephyr,memory-region = "SRAM2";
|
||||
};
|
||||
|
||||
@@ -50,13 +50,13 @@
|
||||
};
|
||||
|
||||
sram1:memory@20010000 {
|
||||
compatible = "mmio-sram";
|
||||
compatible = "zephyr,memory-region", "mmio-sram";
|
||||
reg = <0x20010000 DT_SIZE_K(64)>;
|
||||
zephyr,memory-region = "SRAM1";
|
||||
};
|
||||
|
||||
sram2:memory@20020000 {
|
||||
compatible = "mmio-sram";
|
||||
compatible = "zephyr,memory-region", "mmio-sram";
|
||||
reg = <0x20020000 DT_SIZE_K(32)>;
|
||||
zephyr,memory-region = "SRAM2";
|
||||
};
|
||||
|
||||
@@ -45,20 +45,20 @@
|
||||
};
|
||||
|
||||
sram1: memory@20008000 {
|
||||
compatible = "mmio-sram";
|
||||
compatible = "zephyr,memory-region", "mmio-sram";
|
||||
reg = <0x20008000 DT_SIZE_K(16)>;
|
||||
zephyr,memory-region = "SRAM1";
|
||||
};
|
||||
|
||||
sram2: memory@2000c000 {
|
||||
compatible = "mmio-sram";
|
||||
compatible = "zephyr,memory-region", "mmio-sram";
|
||||
reg = <0x2000c000 DT_SIZE_K(16)>;
|
||||
zephyr,memory-region = "SRAM2";
|
||||
};
|
||||
|
||||
sram4: memory@20010000 {
|
||||
/* Conencted to USB bus*/
|
||||
compatible = "mmio-sram";
|
||||
compatible = "zephyr,memory-region", "mmio-sram";
|
||||
reg = <0x20010000 DT_SIZE_K(16)>;
|
||||
zephyr,memory-region = "SRAM4";
|
||||
};
|
||||
|
||||
@@ -53,19 +53,19 @@
|
||||
};
|
||||
|
||||
sram1: memory@20010000 {
|
||||
compatible = "mmio-sram";
|
||||
compatible = "zephyr,memory-region", "mmio-sram";
|
||||
reg = <0x20010000 DT_SIZE_K(64)>;
|
||||
zephyr,memory-region = "SRAM1";
|
||||
};
|
||||
|
||||
sram2: memory@20020000 {
|
||||
compatible = "mmio-sram";
|
||||
compatible = "zephyr,memory-region", "mmio-sram";
|
||||
reg = <0x20020000 DT_SIZE_K(64)>;
|
||||
zephyr,memory-region = "SRAM2";
|
||||
};
|
||||
|
||||
sram4: memory@20040000 {
|
||||
compatible = "mmio-sram";
|
||||
compatible = "zephyr,memory-region", "mmio-sram";
|
||||
reg = <0x20040000 DT_SIZE_K(16)>;
|
||||
zephyr,memory-region = "SRAM4";
|
||||
};
|
||||
|
||||
@@ -57,25 +57,25 @@
|
||||
};
|
||||
|
||||
sram1: memory@20010000 {
|
||||
compatible = "mmio-sram";
|
||||
compatible = "zephyr,memory-region", "mmio-sram";
|
||||
reg = <0x20010000 DT_SIZE_K(32)>;
|
||||
zephyr,memory-region = "SRAM1";
|
||||
};
|
||||
|
||||
sram2: memory@20018000 {
|
||||
compatible = "mmio-sram";
|
||||
compatible = "zephyr,memory-region", "mmio-sram";
|
||||
reg = <0x20018000 DT_SIZE_K(32)>;
|
||||
zephyr,memory-region = "SRAM2";
|
||||
};
|
||||
|
||||
sram3: memory@20020000 {
|
||||
compatible = "mmio-sram";
|
||||
compatible = "zephyr,memory-region", "mmio-sram";
|
||||
reg = <0x20020000 DT_SIZE_K(32)>;
|
||||
zephyr,memory-region = "SRAM3";
|
||||
};
|
||||
|
||||
sram4: memory@40100000 {
|
||||
compatible = "mmio-sram";
|
||||
compatible = "zephyr,memory-region", "mmio-sram";
|
||||
reg = <0x40100000 DT_SIZE_K(16)>;
|
||||
zephyr,memory-region = "SRAM4";
|
||||
};
|
||||
|
||||
@@ -50,13 +50,13 @@
|
||||
#size-cells = <1>;
|
||||
|
||||
itcm: itcm@0 {
|
||||
compatible = "nxp,imx-itcm";
|
||||
compatible = "zephyr,memory-region", "nxp,imx-itcm";
|
||||
reg = <0x00000000 DT_SIZE_K(128)>;
|
||||
zephyr,memory-region = "ITCM";
|
||||
};
|
||||
|
||||
dtcm: dtcm@20000000 {
|
||||
compatible = "nxp,imx-dtcm";
|
||||
compatible = "zephyr,memory-region", "nxp,imx-dtcm";
|
||||
reg = <0x20000000 DT_SIZE_K(128)>;
|
||||
zephyr,memory-region = "DTCM";
|
||||
};
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
};
|
||||
|
||||
sram1: memory@20000000 {
|
||||
compatible = "mmio-sram";
|
||||
compatible = "zephyr,memory-region", "mmio-sram";
|
||||
reg = <0x20000000 DT_SIZE_K(128)>;
|
||||
zephyr,memory-region = "SRAM1";
|
||||
};
|
||||
|
||||
@@ -29,13 +29,13 @@
|
||||
#size-cells = <1>;
|
||||
|
||||
itcm: itcm@0 {
|
||||
compatible = "nxp,imx-itcm";
|
||||
compatible = "zephyr,memory-region", "nxp,imx-itcm";
|
||||
reg = <0x00000000 DT_SIZE_K(256)>;
|
||||
zephyr,memory-region = "ITCM";
|
||||
};
|
||||
|
||||
dtcm: dtcm@20000000 {
|
||||
compatible = "nxp,imx-dtcm";
|
||||
compatible = "zephyr,memory-region", "nxp,imx-dtcm";
|
||||
reg = <0x20000000 DT_SIZE_K(256)>;
|
||||
zephyr,memory-region = "DTCM";
|
||||
};
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user