stm32: Use the consistent type for stm32_dmacapable

This commit is contained in:
YAMAMOTO Takashi
2020-11-11 11:05:57 +09:00
committed by Xiang Xiao
parent 7999ff0633
commit 01abc41caf
7 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -743,7 +743,7 @@ size_t stm32_dmaresidual(DMA_HANDLE handle)
****************************************************************************/
#ifdef CONFIG_STM32_DMACAPABLE
bool stm32_dmacapable(uint32_t maddr, uint32_t count, uint32_t ccr)
bool stm32_dmacapable(uintptr_t maddr, uint32_t count, uint32_t ccr)
{
uint32_t transfer_size;
uint32_t mend;
+1 -1
View File
@@ -864,7 +864,7 @@ size_t stm32_dmaresidual(DMA_HANDLE handle)
****************************************************************************/
#ifdef CONFIG_STM32_DMACAPABLE
bool stm32_dmacapable(uint32_t maddr, uint32_t count, uint32_t ccr)
bool stm32_dmacapable(uintptr_t maddr, uint32_t count, uint32_t ccr)
{
uint32_t transfer_size;
uint32_t burst_length;
+2 -2
View File
@@ -1797,9 +1797,9 @@ static void spi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer,
#ifdef CONFIG_STM32_DMACAPABLE
if ((txbuffer && priv->txbuf == 0 &&
!stm32_dmacapable((uint32_t)txbuffer, nwords, priv->txccr)) ||
!stm32_dmacapable((uintptr_t)txbuffer, nwords, priv->txccr)) ||
(rxbuffer && priv->rxbuf == 0 &&
!stm32_dmacapable((uint32_t)rxbuffer, nwords, priv->rxccr)))
!stm32_dmacapable((uintptr_t)rxbuffer, nwords, priv->rxccr)))
{
/* Unsupported memory region fall back to non-DMA method. */
+1 -1
View File
@@ -650,7 +650,7 @@ size_t stm32_dmaresidual(DMA_HANDLE handle)
****************************************************************************/
#ifdef CONFIG_STM32F0L0G0_DMACAPABLE
bool stm32_dmacapable(uint32_t maddr, uint32_t count, uint32_t ccr)
bool stm32_dmacapable(uintptr_t maddr, uint32_t count, uint32_t ccr)
{
uint32_t transfer_size;
uint32_t mend;
+2 -2
View File
@@ -1408,9 +1408,9 @@ static void spi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer,
#ifdef CONFIG_STM32F0L0G0_DMACAPABLE
if ((txbuffer &&
!stm32_dmacapable((uint32_t)txbuffer, nwords, priv->txccr)) ||
!stm32_dmacapable((uintptr_t)txbuffer, nwords, priv->txccr)) ||
(rxbuffer &&
!stm32_dmacapable((uint32_t)rxbuffer, nwords, priv->rxccr)))
!stm32_dmacapable((uintptr_t)rxbuffer, nwords, priv->rxccr)))
{
/* Unsupported memory region, fall back to non-DMA method. */
+1 -1
View File
@@ -875,7 +875,7 @@ size_t stm32_dmaresidual(DMA_HANDLE handle)
****************************************************************************/
#ifdef CONFIG_STM32F7_DMACAPABLE
bool stm32_dmacapable(uint32_t maddr, uint32_t count, uint32_t ccr)
bool stm32_dmacapable(uintptr_t maddr, uint32_t count, uint32_t ccr)
{
uint32_t transfer_size;
uint32_t burst_length;
+2 -2
View File
@@ -1820,9 +1820,9 @@ static void spi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer,
/* If this bus uses a in driver DMA aligned buffers we can skip the test */
if ((txbuffer && priv->txbuf == 0 &&
!stm32_dmacapable((uint32_t)txbuffer, nwords, priv->txccr)) ||
!stm32_dmacapable((uintptr_t)txbuffer, nwords, priv->txccr)) ||
(rxbuffer && priv->rxbuf == 0 &&
!stm32_dmacapable((uint32_t)rxbuffer, nwords, priv->rxccr)))
!stm32_dmacapable((uintptr_t)rxbuffer, nwords, priv->rxccr)))
{
/* Unsupported memory region or not in driver buffers
* fall back to non-DMA method.