Skip to content

drivers: sdhc: intel_emmc_host: update irq handling and ADMA Desc#430

Open
Deepak-AlifSemi wants to merge 1 commit intoalifsemi:mainfrom
Deepak-AlifSemi:intel_emmc_driver_update
Open

drivers: sdhc: intel_emmc_host: update irq handling and ADMA Desc#430
Deepak-AlifSemi wants to merge 1 commit intoalifsemi:mainfrom
Deepak-AlifSemi:intel_emmc_driver_update

Conversation

@Deepak-AlifSemi
Copy link
Copy Markdown
Contributor

Use local variable in isr for better event handling.
Enhanced ADMA2 performance by utilizing maximum bytes per desc.

Deepak-AlifSemi added a commit to Deepak-AlifSemi/sdk-alif that referenced this pull request Mar 17, 2026
The PR refers to alifsemi/zephyr_alif/pull/430

Signed-off-by: Deepak Kumar <deepak@alifsemi.com>
@Deepak-AlifSemi Deepak-AlifSemi force-pushed the intel_emmc_driver_update branch from d3635bc to a2fa38c Compare March 17, 2026 17:38
@RupeshKumar-AlifSemi RupeshKumar-AlifSemi requested review from a team and Copilot March 18, 2026 02:42
@RupeshKumar-AlifSemi
Copy link
Copy Markdown
Contributor

@Deepak-AlifSemi Please fix checkpatch reported issues

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates Intel eMMC host ADMA2 descriptor generation and refines ISR interrupt-status handling to improve transfer efficiency and event processing.

Changes:

  • Build ADMA2 descriptors using the maximum bytes per descriptor (up to 64 KiB) rather than one descriptor per block.
  • Snapshot normal_int_stat in the ISR and use the local value for event posting.
  • Add new ADMA-related constants/macros for descriptor limits and error masking.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
drivers/sdhc/intel_emmc_host.h Adds ADMA max-length, action-bit, and error-mask defines used by the updated DMA/ISR logic.
drivers/sdhc/intel_emmc_host.c Reworks ADMA2 descriptor population for larger segments and updates ISR to use a snapshotted interrupt-status value.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

{
struct emmc_data *emmc = dev->data;
volatile struct emmc_reg *regs = (struct emmc_reg *)DEVICE_MMIO_GET(dev);
uint16_t normal_int_stat = regs->normal_int_stat;
@RupeshKumar-AlifSemi
Copy link
Copy Markdown
Contributor

please fix checkpatch errors:

23:17:04 ++ ./scripts/checkpatch.pl --patch 0001-drivers-sdhc-intel_emmc_host-update-irq-handling-and.patch
23:17:04 + check_patch_output='0001-drivers-sdhc-intel_emmc_host-update-irq-handling-and.patch:45: ERROR:TRAILING_WHITESPACE: trailing whitespace
23:17:04 #45: FILE: drivers/sdhc/intel_emmc_host.c:437:
23:17:04 +^I^I$
23:17:04
23:17:04 0001-drivers-sdhc-intel_emmc_host-update-irq-handling-and.patch total: 1 errors, 0 warnings, 105 lines checked
23:17:04
23:17:04 NOTE: For some of the reported defects, checkpatch may be able to
23:17:04 mechanically convert to the typical style using --fix or --fix-inplace.
23:17:04
23:17:04 NOTE: Whitespace errors detected.
23:17:04 You may wish to use scripts/cleanpatch or scripts/cleanfile
23:17:04
23:17:04 0001-drivers-sdhc-intel_emmc_host-update-irq-handling-and.patch has style problems, please review.
23:17:04

@Deepak-AlifSemi Deepak-AlifSemi force-pushed the intel_emmc_driver_update branch 3 times, most recently from 3624341 to 45a51bd Compare March 23, 2026 06:45
Use local variable in isr for better event handling.
Enhanced ADMA2 performance by utilizing maximum bytes per desc.

Signed-off-by: Deepak Kumar <deepak@alifsemi.com>

/* Setup DMA transfer using ADMA2 */
memset(emmc->desc_table, 0, sizeof(emmc->desc_table));
uint32_t desc_idx = 0, desc_cnt;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Prefer moving this variable declaration before memset

@Deepak-AlifSemi Deepak-AlifSemi self-assigned this Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants