[PATCH 0/2] TCB: Add DMA support to read the capture register AB

Dharma Balasubiramani posted 2 patches 6 months, 3 weeks ago
drivers/counter/microchip-tcb-capture.c | 128 +++++++++++++++++++++++++++++++-
include/soc/at91/atmel_tcb.h            |   1 +
2 files changed, 126 insertions(+), 3 deletions(-)
[PATCH 0/2] TCB: Add DMA support to read the capture register AB
Posted by Dharma Balasubiramani 6 months, 3 weeks ago
This patch series adds support to enable the DMA support for TCB.

When DMA is used, the Register AB (TC_RAB) address must be configured as
source address of the transfer. TC_RAB provides the next unread value from
TC_RA and TC_RB. It may be read by the DMA after a request has been
triggered upon loading TC_RA or TC_RB.

-----------------------------------
This is tested on sam9x60 curiosity

root@sam9x60-curiosity-sd:~# cat /sys/bus/counter/devices/counter0/count0/capture0
258428554
root@sam9x60-curiosity-sd:~# devmem2 0xf800800c 
/dev/mem opened.
Memory mapped at address 0xb6f78000.
Read at address  0xF800800C (0xb6f7800c): 0x0F674E8A

Signed-off-by: Dharma Balasubiramani <dharma.b@microchip.com>
---
Dharma Balasubiramani (2):
      counter: microchip-tcb-capture: Retrieve and map parent base address
      counter: microchip-tcb-capture: Add DMA support for TC_RAB register reads

 drivers/counter/microchip-tcb-capture.c | 128 +++++++++++++++++++++++++++++++-
 include/soc/at91/atmel_tcb.h            |   1 +
 2 files changed, 126 insertions(+), 3 deletions(-)
---
base-commit: fefff2755f2aa4125dce2a1edfe7e545c7c621f2
change-id: 20250528-mchp-tcb-dma-5a29148fe6e6

Best regards,
-- 
Dharma Balasubiramani <dharma.b@microchip.com>
Re: [PATCH 0/2] TCB: Add DMA support to read the capture register AB
Posted by David Lechner 6 months, 3 weeks ago
Please include the counter: prefix in the subject of the cover letter
as well. It makes it easier to see at a glance what this series might
be about.

On 5/28/25 1:13 AM, Dharma Balasubiramani wrote:
> This patch series adds support to enable the DMA support for TCB.
> 
> When DMA is used, the Register AB (TC_RAB) address must be configured as
> source address of the transfer. TC_RAB provides the next unread value from
> TC_RA and TC_RB. It may be read by the DMA after a request has been
> triggered upon loading TC_RA or TC_RB.

Can you please explain what problem this series is solving and why we
need this change?
Re: [PATCH 0/2] TCB: Add DMA support to read the capture register AB
Posted by Dharma.B@microchip.com 6 months, 2 weeks ago
On 29/05/25 8:56 pm, David Lechner wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> Please include the counter: prefix in the subject of the cover letter
> as well. It makes it easier to see at a glance what this series might
> be about.

Sure, I will take care of this next time, Thanks.

> 
> On 5/28/25 1:13 AM, Dharma Balasubiramani wrote:
>> This patch series adds support to enable the DMA support for TCB.
>>
>> When DMA is used, the Register AB (TC_RAB) address must be configured as
>> source address of the transfer. TC_RAB provides the next unread value from
>> TC_RA and TC_RB. It may be read by the DMA after a request has been
>> triggered upon loading TC_RA or TC_RB.
> 
> Can you please explain what problem this series is solving and why we
> need this change?

This isn't solving any issues but I'm trying to make use of the feature.
> 


-- 
With Best Regards,
Dharma B.