|
18 | 18 | #include <zephyr/drivers/clock_control/stm32_clock_control.h>
|
19 | 19 | #include <zephyr/drivers/clock_control.h>
|
20 | 20 | #include <zephyr/drivers/reset.h>
|
| 21 | +#include <zephyr/linker/devicetree_regions.h> |
21 | 22 | #include <zephyr/pm/device.h>
|
22 | 23 | #include <zephyr/sys/barrier.h>
|
23 | 24 | #include <zephyr/cache.h>
|
@@ -555,19 +556,8 @@ static DEVICE_API(display, stm32_ltdc_display_api) = {
|
555 | 556 | };
|
556 | 557 |
|
557 | 558 | #if DT_INST_NODE_HAS_PROP(0, ext_sdram)
|
558 |
| - |
559 |
| -#if DT_SAME_NODE(DT_INST_PHANDLE(0, ext_sdram), DT_NODELABEL(sdram1)) |
560 |
| -#define FRAME_BUFFER_SECTION __stm32_sdram1_section |
561 |
| -#elif DT_SAME_NODE(DT_INST_PHANDLE(0, ext_sdram), DT_NODELABEL(sdram2)) |
562 |
| -#define FRAME_BUFFER_SECTION __stm32_sdram2_section |
563 |
| -#elif DT_SAME_NODE(DT_INST_PHANDLE(0, ext_sdram), DT_NODELABEL(psram)) |
564 |
| -#define FRAME_BUFFER_SECTION __stm32_psram_section |
565 |
| -#else |
566 |
| -#error "LTDC ext-sdram property in device tree does not reference SDRAM1 or SDRAM2 node or PSRAM "\ |
567 |
| - "node" |
568 |
| -#define FRAME_BUFFER_SECTION |
569 |
| -#endif /* DT_SAME_NODE(DT_INST_PHANDLE(0, ext_sdram), DT_NODELABEL(sdram1)) */ |
570 |
| - |
| 559 | +#define FRAME_BUFFER_SECTION \ |
| 560 | + Z_GENERIC_SECTION(LINKER_DT_NODE_REGION_NAME(DT_INST_PHANDLE(0, ext_sdram))) |
571 | 561 | #else
|
572 | 562 | #define FRAME_BUFFER_SECTION
|
573 | 563 | #endif /* DT_INST_NODE_HAS_PROP(0, ext_sdram) */
|
|
0 commit comments