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

chore(Other): Update Zephyr DMA wrapper for MAX32657 #1027

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

hfakkiz
Copy link
Contributor

@hfakkiz hfakkiz commented May 30, 2024

Description

MAX32657 driver functions require DMA instances. Because of that, I moved it into MAX32665/6 section. Also, I moved necessary register macros for MAX32657 into this section.

I added wrapper version of 'MXC_DMA_EnableInt' due to MSDK driver's changes.

Checklist Before Requesting Review

  • PR Title follows correct guidelines.
  • Description of changes and all other relevant information.
  • (Optional) Link any related GitHub issues using a keyword
  • (Optional) Provide info on any relevant functional testing/validation. For API changes or significant features, this is not optional.

@hfakkiz hfakkiz requested review from MaureenHelm and ozersa May 30, 2024 09:16
@hfakkiz hfakkiz force-pushed the update-zephyr-dma branch from 671318c to cd87ec0 Compare May 30, 2024 09:24
Comment on lines 32 to 43
#if defined(CONFIG_SOC_MAX32657) || (CONFIG_SOC_MAX32665) || (CONFIG_SOC_MAX32666)

#if defined(CONFIG_SOC_MAX32657)
#define ADI_MAX32_DMA_CTRL_DIS_IE MXC_F_DMA_CTRL_DIS_IE
#define ADI_MAX32_DMA_CTRL_CTZIEN MXC_F_DMA_CTRL_CTZ_IE

#define ADI_MAX32_DMA_STATUS_IPEND MXC_F_DMA_STATUS_IPEND
#define ADI_MAX32_DMA_STATUS_BUS_ERR MXC_F_DMA_STATUS_BUS_ERR
#define ADI_MAX32_DMA_STATUS_TO_IF MXC_F_DMA_STATUS_TO_IF
#define ADI_MAX32_DMA_STATUS_ST MXC_F_DMA_STATUS_STATUS

#define ADI_MAX32_DMA_CFG_REQ_POS MXC_F_DMA_CTRL_REQUEST_POS
Copy link
Contributor

Choose a reason for hiding this comment

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

The MAX32657 DMA IP source is MAX32655,
MAX32657 and MAX32655 register map and register names are exactly match, MAX32657 has two DMA this causes API function changes,

The reason we have this dma wrapper is because of there were two group MCUs, one group has multiple DMA and other group has one DMA but with new IP block. MAX32657 bring a third group which has multiple DMA and new IP block.
So that instead of adding MAX32657 as this I prefer totally removing device groups, to simplify file content.
Please check below file.
wrap_max32_dma.md

Copy link
Contributor

@ozersa ozersa left a comment

Choose a reason for hiding this comment

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

File content can be simplified.

- Removed device groups.
- Added wrapper version of 'MXC_DMA_EnableInt' due to MSDK driver's
changes.

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
@hfakkiz hfakkiz force-pushed the update-zephyr-dma branch from cd87ec0 to 7f677eb Compare June 3, 2024 08:59
Copy link
Contributor

@Jake-Carter Jake-Carter left a comment

Choose a reason for hiding this comment

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

@sihyung-maxim FYI the DMA API variations (#1008) also need to be addressed in the Zephyr HAL and are becoming more difficult to change/remove

@Jake-Carter Jake-Carter merged commit 09a77db into main Jun 5, 2024
9 checks passed
@Jake-Carter Jake-Carter deleted the update-zephyr-dma branch June 5, 2024 00:48
sihyung-maxim pushed a commit to analogdevicesinc/hal_adi that referenced this pull request Jun 5, 2024
ozersa pushed a commit that referenced this pull request Jun 14, 2024
Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
EricB-ADI pushed a commit that referenced this pull request Aug 21, 2024
ozersa pushed a commit to analogdevicesinc/hal_adi that referenced this pull request Sep 11, 2024
ozersa pushed a commit to analogdevicesinc/hal_adi that referenced this pull request Sep 11, 2024
ttmut pushed a commit to analogdevicesinc/hal_adi that referenced this pull request Oct 31, 2024
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.

3 participants