-
Notifications
You must be signed in to change notification settings - Fork 8.2k
stm32h7 use non cacheable region by alias #36152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,6 +42,7 @@ | |
| led0 = &green_led; | ||
| pwm-led0 = &red_pwm_led; | ||
| sw0 = &user_button; | ||
| sramnocache = &sram3; | ||
| }; | ||
| }; | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -92,11 +92,33 @@ MEMORY | |
| LINKER_DT_REGION_FROM_NODE(SRAM1, rw, DT_NODELABEL(sram1)) | ||
| LINKER_DT_REGION_FROM_NODE(SRAM2, rw, DT_NODELABEL(sram2)) | ||
| /* STM32 alternate RAM configurations */ | ||
| LINKER_DT_REGION_FROM_NODE(SRAM3, rw, DT_NODELABEL(sram3)) | ||
| LINKER_DT_REGION_FROM_NODE(SRAM4, rw, DT_NODELABEL(sram4)) | ||
| LINKER_DT_REGION_FROM_NODE(SDRAM1, rw, DT_NODELABEL(sdram1)) | ||
| LINKER_DT_REGION_FROM_NODE(SDRAM2, rw, DT_NODELABEL(sdram2)) | ||
| LINKER_DT_REGION_FROM_NODE(BACKUP_SRAM, rw, DT_NODELABEL(backup_sram)) | ||
|
|
||
| #if DT_NODE_HAS_STATUS(DT_ALIAS(sramnocache), okay) | ||
| DT_REGION_FROM_NODE_STATUS_OKAY(sramnocache, rw, DT_ALIAS(sramnocache)) | ||
|
||
|
|
||
| #if !DT_SAME_NODE(DT_ALIAS(sramnocache), DT_NODELABEL(sram3)) | ||
| DT_REGION_FROM_NODE_STATUS_OKAY(SRAM3, rw, DT_NODELABEL(sram3)) | ||
| #endif | ||
| #if !DT_SAME_NODE(DT_ALIAS(sramnocache), DT_NODELABEL(sram4)) | ||
| DT_REGION_FROM_NODE_STATUS_OKAY(SRAM4, rw, DT_NODELABEL(sram4)) | ||
| #endif | ||
| #if !DT_SAME_NODE(DT_ALIAS(sramnocache), DT_NODELABEL(sdram1)) | ||
| DT_REGION_FROM_NODE_STATUS_OKAY(SDRAM1, rw, DT_NODELABEL(sdram1)) | ||
| #endif | ||
| #if !DT_SAME_NODE(DT_ALIAS(sramnocache), DT_NODELABEL(sdram2)) | ||
| DT_REGION_FROM_NODE_STATUS_OKAY(SDRAM2, rw, DT_NODELABEL(sdram2)) | ||
| #endif | ||
| #if !DT_SAME_NODE(DT_ALIAS(sramnocache), DT_NODELABEL(backup_sram)) | ||
| DT_REGION_FROM_NODE_STATUS_OKAY(BACKUP_SRAM, rw, DT_NODELABEL(backup_sram)) | ||
| #endif | ||
|
|
||
| #else | ||
| DT_REGION_FROM_NODE_STATUS_OKAY(SRAM3, rw, DT_NODELABEL(sram3)) | ||
| DT_REGION_FROM_NODE_STATUS_OKAY(SRAM4, rw, DT_NODELABEL(sram4)) | ||
| DT_REGION_FROM_NODE_STATUS_OKAY(SDRAM1, rw, DT_NODELABEL(sdram1)) | ||
| DT_REGION_FROM_NODE_STATUS_OKAY(SDRAM2, rw, DT_NODELABEL(sdram2)) | ||
| DT_REGION_FROM_NODE_STATUS_OKAY(BACKUP_SRAM, rw, DT_NODELABEL(backup_sram)) | ||
| #endif | ||
| /* Used by and documented in include/linker/intlist.ld */ | ||
| IDT_LIST (wx) : ORIGIN = 0xFFFFF7FF, LENGTH = 2K | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change means that only
STM32H7Xboards that definesramnocachewill work with this driver now.As this is more than just
nucleo_h745zi_q, this will break the driver for many boards without further board updates.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. This is not. The other boards will still work. Please take a look on on first
#ifand last#else. There are many cases uponsramnocachealready covered.There maybe some documentation effort for stm32 needed to advice users to use
sramnocache.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, they will still work, but you are changing the behavior for every
STM32H7Xboard apart fromnucleo_h745zi_q. This is not necessarily wrong, but it is not explained anywhere in the commits as to why this is a good idea / why the previous way was bad.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good point. I would say, it would be nice to add some documentation to the whole he series. But there is no docs for it, as I know. Maybe it can be added to .yaml or the soc? @erwango?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The point is not that it is not documented in the code, but that you have provided no justification for the change in the commit messages.