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

Imx9 bug fixes 2511 #318

Merged
merged 2 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions arch/arm64/src/imx9/imx9_edma.c
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,10 @@ void weak_function arm64_dma_initialize(void)

putreg32(0, IMX9_EDMA_TCD(base, chan) + IMX9_EDMA_CH_CSR_OFFSET);

/* Clear interrupt if any */

putreg32(1, IMX9_EDMA_TCD(base, chan) + IMX9_EDMA_CH_INT_OFFSET);

/* Set all TCD CSR, biter and citer entries to 0 so that
* will be 0 when DONE is not set so that imx9_dmach_getcount
* reports 0.
Expand Down
11 changes: 5 additions & 6 deletions arch/arm64/src/imx9/imx9_flexspi_nor.c
Original file line number Diff line number Diff line change
Expand Up @@ -790,14 +790,13 @@ static ssize_t imx9_flexspi_nor_read(struct mtd_dev_s *dev,
}

src = priv->ahb_base + offset;
DEBUGASSERT(((uintptr_t)src & ALIGN_MASK) == 0);

up_invalidate_dcache((uintptr_t)buffer,
(uintptr_t)buffer + ALIGN_UP(nbytes));
int n = nbytes;

Choose a reason for hiding this comment

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

This is fine, but what is the cache invalidate above about???

Copy link
Author

Choose a reason for hiding this comment

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

done, removed

memcpy(buffer, src, nbytes);

up_clean_dcache((uintptr_t)buffer, (uintptr_t)buffer + ALIGN_UP(nbytes));
while (n-- > 0)
{
*buffer++ = *src++;
}

Choose a reason for hiding this comment

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

Again, the cache clean below? Should we remove those at the same if they are useless?

Copy link
Author

Choose a reason for hiding this comment

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

done


finfo("return nbytes: %d\n", (int)nbytes);
return (ssize_t)nbytes;
Expand Down
Loading