Page MenuHomeFreeBSD

ARM PrimeCell PL330 DMA engine driver
ClosedPublic

Authored by br on Mar 30 2017, 2:14 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 4 2024, 1:10 PM
Unknown Object (File)
Feb 26 2024, 1:27 AM
Unknown Object (File)
Jan 13 2024, 7:21 PM
Unknown Object (File)
Jan 3 2024, 5:19 AM
Unknown Object (File)
Dec 20 2023, 2:19 AM
Unknown Object (File)
Nov 14 2023, 11:53 PM
Unknown Object (File)
Nov 14 2023, 3:09 PM
Unknown Object (File)
Oct 13 2023, 2:07 PM
Subscribers

Details

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

andrew added a subscriber: andrew.

Looks good, however I think a few comments would be useful, e.g. in pl330_channel_submit_sg, and it seems to be missing the build glue.

sys/dev/xdma/controller/pl330.c
92–93

You could make these a single struct resource *, then use bus_read_4 and bus_write_4.

131

I think we might need to think about a new bus_alloc_resources like function to handle this sort of thing.

182

Why 0x10000?

198–200

I wonder if there should be macros for these, e.g.

#define MOV_3(val) (((val) >> 8) & 0xff)
...
buf[3] = MOV_3(val)
497

What will happen when len is not a multiple of 4?

499

What is the meaning of 0 here, and 1 below?

513–515

Could these be merged into a single call?

549–551

Is this needed?

554

Magic 0x10000 again

637

We should probably add a DMA bus pass.

sys/dev/xdma/controller/pl330.h
33

It might pay to add a guard against including this header twice.

44

You should put n in parentheses, i.e. #define FTR(n) (0x040 + 0x04 * (n))

77

Why #if 0 and not /* ... */?

109–112

I would put these in the .c file, they don't seem to be needed anywhere else.

br marked 12 inline comments as done.

dehardcode src/dst port width

br marked an inline comment as done.Apr 3 2017, 2:01 PM
br added inline comments.
sys/dev/xdma/controller/pl330.c
497

ok I dehardcoded port width.
port width is now specified by application.
Thanks!

499

offs0 is the jump address for loop0, while offs1 is the jump addr for loop1

513–515

Yes. I merged this to single call

549–551

No. Thanks

637

agree

br marked an inline comment as done.

add dprintf macro

This revision was not accepted when it landed; it landed in state Needs Review.Apr 13 2018, 12:44 PM
This revision was automatically updated to reflect the committed changes.