Skip to content

Convert drivers/serial/uart_sam0.c to new kwork API #34102

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

Closed
galak opened this issue Apr 7, 2021 · 9 comments · Fixed by #34549
Closed

Convert drivers/serial/uart_sam0.c to new kwork API #34102

galak opened this issue Apr 7, 2021 · 9 comments · Fixed by #34549
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug platform: Microchip SAM Microchip SAM Platform (formerly Atmel SAM) priority: high High impact/importance bug

Comments

@galak
Copy link
Collaborator

galak commented Apr 7, 2021

Convert drivers/serial/uart_sam0.c to use new kwork API.

See the following issue for details:

#33104

@galak galak added bug The issue is a bug, or the PR is fixing a bug platform: Microchip SAM Microchip SAM Platform (formerly Atmel SAM) priority: high High impact/importance bug labels Apr 7, 2021
@galak
Copy link
Collaborator Author

galak commented Apr 7, 2021

@nandojve @mnkp can one of you take a look at this?

@galak
Copy link
Collaborator Author

galak commented Apr 13, 2021

@nandojve @mnkp ping.

@mnkp
Copy link
Member

mnkp commented Apr 13, 2021

I don't have SAM0 hardware to test it, SAM and SAM0 families are quite different. I looked at the uart_sam0.c driver code however and it seems like it should be one of those easy cases where the change could be done with #33924 from @pabigot.

@nandojve
Copy link
Member

I can take a look and test on SAMR21.

@nandojve nandojve self-assigned this Apr 20, 2021
@galak
Copy link
Collaborator Author

galak commented Apr 20, 2021

I can take a look and test on SAMR21.

thanks

@nandojve
Copy link
Member

nandojve commented Apr 21, 2021

@galak, @mnkp

There are building problems with DT when using async for sam0.
Can someone help identify what is missing?

To reproduce can be (at master) any one from above below, don't need board:

west build -b atsamr21_xpro tests/drivers/uart/uart_async_api
west build -b atsamr21_xpro tests/drivers/spi/spi_loopback/

@galak
Copy link
Collaborator Author

galak commented Apr 21, 2021

@nandojve if I remember you need to disable all uarts except the one with dma as when you enable async uart its assumed to be supported on ALL uarts.

@nandojve
Copy link
Member

The sam0 DMA broke after 7967aa6. It was just before the mass const-ify on Zephyr. My guess is that some structure was supposed to not be const because device_get_binding returns NULL and then a hard fault happen.

My proposal is convert uart to use new kwork API but driver will continue with a bug. It may take long to understand what is going on with DMA driver.

Is it reasonable?

@galak
Copy link
Collaborator Author

galak commented Apr 24, 2021

@nandojve sounds good

nandojve pushed a commit to nandojve/zephyr that referenced this issue Apr 24, 2021
Replace all existing deprecated API with the recommended alternative.

Fixes zephyrproject-rtos#34102

Signed-off-by: Peter Bigot <[email protected]>
Signed-off-by: Gerson Fernando Budke <[email protected]>
nashif pushed a commit that referenced this issue Apr 26, 2021
Replace all existing deprecated API with the recommended alternative.

Fixes #34102

Signed-off-by: Peter Bigot <[email protected]>
Signed-off-by: Gerson Fernando Budke <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug platform: Microchip SAM Microchip SAM Platform (formerly Atmel SAM) priority: high High impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants