-
Notifications
You must be signed in to change notification settings - Fork 8.1k
drivers: dma: BFLB DMA #95030
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
base: main
Are you sure you want to change the base?
drivers: dma: BFLB DMA #95030
Conversation
238c537
to
75399de
Compare
The following west manifest projects have changed revision in this Pull Request:
⛔ DNM label due to: 1 project with PR revision Note: This message is automatically posted and updated by the Manifest GitHub Action. |
776df91
to
2b5793b
Compare
uint32_t control = 0; | ||
uint16_t size; | ||
|
||
if (channel >= BFLB_DMA_CH_NB) { |
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.
if you want, you can make this code misra compatible.
Add a while(0) {
block at beggining
}
close before the inval.
then, you must use break;
to jump out without a goto;
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.
I assume you mean while(1) or while (true)? That is very cursed. Done.
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, it is really while (0). I questioned this too first time.
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.
that doesnt work... It just doesnt run the code in the while loop with while(0)
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.
I googled it, i think it's supposed to be a do while loop, not a while loop
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.
Yes, sorry.
do { |
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.
done
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.
if you want, you can make this code misra compatible. Add a
while(0) {
block at beggining}
close before the inval.then, you must use
break;
to jump out without agoto;
Is this really a misra guidline? This makes things far more unreadable than a simple goto or early return. Most of zephyr uses goto out OR early return.
Would prefer to stick with Zephyr code styling over misra here unless you can point at the rules for this.
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 wasn’t resolved
{ | ||
const struct dma_bflb_config *cfg = dev->config; | ||
uint32_t config, control; | ||
|
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.
useless space, fix all
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.
done
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.
still have useless space
} | ||
stat->pending_length = (control & DMA_TRANSFERSIZE_MASK) >> DMA_TRANSFERSIZE_SHIFT; | ||
|
||
stat->pending_length *= dma_bflb_get_transfer_size(dev, channel); |
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.
you should add 1 space after the if block
then drop the space between the stat->pending_length
having the stat->pending_length glued with the if statement is OK and shows that you are preparing the data to be evaluated.
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.
done
I think I have addressed all review comments, the do while loop has been reverted and simplified due to the lack of need for irq locking. |
I dont understand the build failures, why did enabling DMA enable flash tests? Also beagle board failing... |
It is also failing on 1a5bef6 from #96749 enables flash tests for all boards with - drivers.flash.common.disable_spi_nor:
- filter: dt_compat_enabled("soc-nv-flash") and dt_compat_enabled("jedec,spi-nor")
+ drivers.flash.common.test_storage_partition:
+ filter: dt_label_with_parent_compat_enabled("storage_partition", "fixed-partitions") For bouffalolab, the devicetree So merging it first will fix this current PR, or a hotfix PR to exclude the buggy board will also work. |
??? That's not very smart and means it shouldnt have passed the CI? |
And pretty obviously it should be checking for the presence of the 'flash' tag in supported |
Yes CI should have been catching that. I think twister does some heuristics to try to detect what might be affected by a PR to not re-test everything every time. Maybe that's why. |
I also looked at the test file and it really makes no sense, best I can tell the flash tag is necessary to run any of those tests anyway, i'm not sure how this is getting them triggered for the bflb boards. Possibly using the |
will be deleted Signed-off-by: Camille BAUD <[email protected]>
Adds the DMA node Signed-off-by: Camille BAUD <[email protected]>
Introduce BFLB's DMA. Signed-off-by: Camille BAUD <[email protected]>
Guarantees De-gating the peripherals. Signed-off-by: Camille BAUD <[email protected]>
Adds the dma to supported for testing Signed-off-by: Camille BAUD <[email protected]>
|
Adds BFLB DMA.