drivers: dma: dma_nxp_edma: support 64-bit TCD
On some EDMA versions, some TCD registers (e.g: SADDR, DADDR, SLAST, DLAST, etc...) are extended to 64 bits via adding a new HIGH register holding the value of bits [63:32]. Since, for now, the driver doesn't support 64-bit addresses, this scenario is supported by sign-extending the 32-bit value written to SLAST/DLAST. SADDR and DADDR are taken care of on HAL side. Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
This commit is contained in:
parent
7eb07479eb
commit
b26d21fcfd
|
@ -514,6 +514,13 @@ static inline int set_slast_dlast(struct dma_config *dma_cfg,
|
|||
EDMA_ChannelRegWrite(data->hal_cfg, chan_id, EDMA_TCD_SLAST_SDA, slast);
|
||||
EDMA_ChannelRegWrite(data->hal_cfg, chan_id, EDMA_TCD_DLAST_SGA, dlast);
|
||||
|
||||
if (data->hal_cfg->flags & EDMA_HAS_64BIT_TCD_FLAG) {
|
||||
EDMA_ChannelRegWrite(data->hal_cfg, chan_id, EDMA_TCD_SLAST_SDA_HIGH,
|
||||
slast >= 0x0 ? 0x0 : 0xffffffff);
|
||||
EDMA_ChannelRegWrite(data->hal_cfg, chan_id, EDMA_TCD_DLAST_SGA_HIGH,
|
||||
dlast >= 0x0 ? 0x0 : 0xffffffff);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue