Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

xxkent
Copy link

@xxkent xxkent commented Jul 18, 2023

Driver to support Cluster DMA(CDMA) controller for ARCv3. For HS58 tested on nSIM and HAPS using 'dmatest' driver. For HS68 tested on nSIM using 'dmatest' driver.

Known limitations:
Don't specify 'test_buf_size' 'dmatest' parameter more then 750000 when L2$ is enabled. Looks like L2$ operations in cache-arcv3.c:scm_op_rgn() fails when sz > 750000. Probably it is restriction in HW. Otherwise the kernel will crash.

Comment on lines 73 to 74

Choose a reason for hiding this comment

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

Let's not use these magic numbers and have proper defines instead (bits mask / bits shift)

Comment on lines 84 to 85

Choose a reason for hiding this comment

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

Ditto

Choose a reason for hiding this comment

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

Suggested change
/* Write will block iff busy i.e. DMA_C_STATUS_AUX.B bit is set */
/* Write will block if busy i.e. DMA_C_STATUS_AUX.B bit is set */

Choose a reason for hiding this comment

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

Let's have it as bool var.

Choose a reason for hiding this comment

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

probably we can remove 'WARN' from comment - this info is provided by dev_warn. Same for dev_err

Choose a reason for hiding this comment

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

Magic number. Probably we can name it as DW_CDMA_MIN_VERSION or something like that.

Comment on lines 192 to 195

Choose a reason for hiding this comment

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

This is suspicious as we set DMA_BIT_MASK(64)

Choose a reason for hiding this comment

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

Extra tab. I'd expect that it should be detected by checkpatch.

Choose a reason for hiding this comment

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

ditto

Choose a reason for hiding this comment

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

Suggested change
x = x & o;
x &= o;

@xxkent xxkent force-pushed the bolsh-arcv3-cluster-dma branch from dd2a71f to 5cc2b79 Compare August 1, 2023 18:35
Driver to support Cluster DMA(CDMA) controller for ARCv3.
For HS58 tested on nSIM and HAPS using 'dmatest' driver.
For HS68 tested on nSIM using 'dmatest' driver.

Known limitations:
Don't specify 'test_buf_size' 'dmatest' parameter more then 750000 when
L2$ is enabled. Looks like L2$ operations in cache-arcv3.c:scm_op_rgn()
fails when sz > 750000. Probably it is restriction in HW. Otherwise
the kernel will crash.
@xxkent xxkent force-pushed the bolsh-arcv3-cluster-dma branch from 5cc2b79 to 0caba66 Compare August 1, 2023 19:05
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.

2 participants