Skip to content
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

PL330 DMA Controller #11

Merged
merged 1 commit into from
Nov 24, 2023
Merged

PL330 DMA Controller #11

merged 1 commit into from
Nov 24, 2023

Conversation

coolstar
Copy link
Collaborator

Add v1 DMA Controller driver

Supports:

  • Multiple DMA controllers (use ctlrName _DSD to specify a unique name for each one)
  • Multiple DMA channels per controller
  • Reading DMA position register
  • Submitting Cyclic DMA (for audio) -- note cyclic buffer must be contiguous
  • Interrupts for periodic DMA events

Planned:

  • Supporting normal DMA transactions (placeholder is in the interface standard, but is not implemented yet)

Tested with I2S driver that will be in a following PR

@coolstar coolstar merged commit 40b5574 into master Nov 24, 2023
2 checks passed
@coolstar coolstar deleted the dmac branch November 24, 2023 21:02
drivers/dma/README.md Show resolved Hide resolved
drivers/dma/pl330dma/trace.h Show resolved Hide resolved
@@ -0,0 +1,77 @@
;/*++
;
;Copyright (c) CoolStar. All rights reserved.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be a good place to say that this is released under Apache license.

drivers/dma/pl330dma/pl330dma.inx Show resolved Hide resolved
drivers/dma/pl330dma/bitops.h Show resolved Hide resolved
UINT32 timeout_us = 5 * 1000; // 5 ms

LARGE_INTEGER StartTime;
KeQuerySystemTimePrecise(&StartTime);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wait will be affected by somebody changing the clock, which is probably not what we want. Maybe this should be KeQueryUnbiasedInterruptTime?

drivers/dma/pl330dma/pl330.h Show resolved Hide resolved
drivers/dma/pl330dma/dmacontroller.c Show resolved Hide resolved
drivers/dma/pl330dma/pl330.c Show resolved Hide resolved
drivers/dma/pl330dma/pl330.c Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants