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

drivers: crc: initial support for renesas,ra-crc driver #87557

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

thenguyenyf
Copy link
Contributor

@thenguyenyf thenguyenyf commented Mar 24, 2025

This PR is inherited from #74977 to add a CRC device driver with hardware accelerator. We'd like to introduce:

  • New CRC device drivers: include/zephyr/drivers/crc.h
  • New CRC subsystem: include/zephyr/crc_new/crc_new.h

The crc_new subsys implementation can be chosen as:

  • A CRC device driver, get by zephyr,crc alias if it's defined
  • CRC software-based library: include/zephyr/sys/crc.h

The crc_new is an adapter layer with similar function like zephyr/include/zephyr/sys/crc.h, but has a compatible interface to the device driver model to make it work with hardware accelerators. Old libraries that are being used by other software will be retained.

Update rev of hal_renesas to add support for crc driver

Signed-off-by: Duy Vo <duy.vo.xc@bp.renesas.com>
@zephyrbot
Copy link
Collaborator

zephyrbot commented Mar 24, 2025

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff
hal_renesas zephyrproject-rtos/hal_renesas@a959f1b zephyrproject-rtos/hal_renesas#89 zephyrproject-rtos/hal_renesas#89/files

DNM label due to: 1 project with PR revision

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@zephyrbot zephyrbot added manifest manifest-hal_renesas DNM (manifest) This PR should not be merged (controlled by action-manifest) labels Mar 24, 2025
@henrikbrixandersen henrikbrixandersen self-requested a review March 24, 2025 20:32
@henrikbrixandersen henrikbrixandersen added the Architecture Review Discussion in the Architecture WG required label Mar 24, 2025
@henrikbrixandersen
Copy link
Member

@thenguyenyf Nice, thanks! Are you able to give a short presentation of this in an Architecture Working Group meeting?

@thenguyenyf
Copy link
Contributor Author

@thenguyenyf Nice, thanks! Are you able to give a short presentation of this in an Architecture Working Group meeting?

Hello @henrikbrixandersen . I'm willing to join and give a presentation for the new CRC subsystem. How about next week meeting? I may not be able to join this week.

@thenguyenyf thenguyenyf force-pushed the renesas_ra_crc_driver_support branch from 989afec to 2415e6e Compare March 25, 2025 11:40
Duy Vo added 5 commits March 27, 2025 15:17
- Implement CRC syscall.
- Add CRC driver API.
- Introduce support for the CRC driver.

Signed-off-by: Duy Vo <duy.vo.xc@bp.renesas.com>
Add device tree node for CRC driver on all Renesas MCU

Signed-off-by: Duy Vo <duy.vo.xc@bp.renesas.com>
Enable and add CRC node to aliases, chosen for all
Renesas MCU

Signed-off-by: Duy Vo <duy.vo.xc@bp.renesas.com>
- Introduce initial support for the CRC subsystem.
- Create new interface crc_new by copying sys/crc.h.
- Define macros for CRC polynomials.
- Modify each function to include an additional parameter for
retrieving the CRC result.
- Update function return values:
  - Return 0 on success.
  - Return an error code on failure.

Signed-off-by: Duy Vo <duy.vo.xc@bp.renesas.com>
Add samples for CRC driver

Signed-off-by: Duy Vo <duy.vo.xc@bp.renesas.com>
@thenguyenyf thenguyenyf force-pushed the renesas_ra_crc_driver_support branch from 2415e6e to bce01eb Compare March 27, 2025 08:17
Duy Vo added 3 commits March 28, 2025 10:29
Add samples for CRC subsystem

Signed-off-by: Duy Vo <duy.vo.xc@bp.renesas.com>
Add ztests for CRC driver

Signed-off-by: Duy Vo <duy.vo.xc@bp.renesas.com>
Add ztests for CRC subsystem

Signed-off-by: Duy Vo <duy.vo.xc@bp.renesas.com>
@thenguyenyf thenguyenyf force-pushed the renesas_ra_crc_driver_support branch from bce01eb to 6b4d778 Compare March 28, 2025 03:30
@thaoluonguw
Copy link
Collaborator

Please rebase to slove conflict.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Architecture Review Discussion in the Architecture WG required area: Samples Samples DNM (manifest) This PR should not be merged (controlled by action-manifest) manifest manifest-hal_renesas platform: Renesas RA Renesas Electronics Corporation, RA
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

None yet

5 participants