From 74c7e3d0bfabdfc71ddae19ee9ec39832eb39da6 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 18 Jan 2016 08:10:37 -0600 Subject: [PATCH] STM32 OTF FS/HS Host. Fix two cases where stm32_putreg parameters were backward. Noted by Hang Xu --- arch/arm/src/stm32/stm32_otgfshost.c | 4 ++-- arch/arm/src/stm32/stm32_otghshost.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/src/stm32/stm32_otgfshost.c b/arch/arm/src/stm32/stm32_otgfshost.c index 431d438ed74..f481f7718dd 100644 --- a/arch/arm/src/stm32/stm32_otgfshost.c +++ b/arch/arm/src/stm32/stm32_otgfshost.c @@ -4839,7 +4839,7 @@ static void stm32_flush_txfifos(uint32_t txfnum) /* Initiate the TX FIFO flush operation */ regval = OTGFS_GRSTCTL_TXFFLSH | txfnum; - stm32_putreg(regval, STM32_OTGFS_GRSTCTL); + stm32_putreg(STM32_OTGFS_GRSTCTL, regval); /* Wait for the FLUSH to complete */ @@ -4878,7 +4878,7 @@ static void stm32_flush_rxfifo(void) /* Initiate the RX FIFO flush operation */ - stm32_putreg(OTGFS_GRSTCTL_RXFFLSH, STM32_OTGFS_GRSTCTL); + stm32_putreg(STM32_OTGFS_GRSTCTL, OTGFS_GRSTCTL_RXFFLSH); /* Wait for the FLUSH to complete */ diff --git a/arch/arm/src/stm32/stm32_otghshost.c b/arch/arm/src/stm32/stm32_otghshost.c index 78e9909ecaf..811cadd885a 100644 --- a/arch/arm/src/stm32/stm32_otghshost.c +++ b/arch/arm/src/stm32/stm32_otghshost.c @@ -4839,7 +4839,7 @@ static void stm32_flush_txfifos(uint32_t txfnum) /* Initiate the TX FIFO flush operation */ regval = OTGHS_GRSTCTL_TXFFLSH | txfnum; - stm32_putreg(regval, STM32_OTGHS_GRSTCTL); + stm32_putreg(STM32_OTGHS_GRSTCTL, regval); /* Wait for the FLUSH to complete */ @@ -4878,7 +4878,7 @@ static void stm32_flush_rxfifo(void) /* Initiate the RX FIFO flush operation */ - stm32_putreg(OTGHS_GRSTCTL_RXFFLSH, STM32_OTGHS_GRSTCTL); + stm32_putreg(STM32_OTGHS_GRSTCTL, OTGHS_GRSTCTL_RXFFLSH); /* Wait for the FLUSH to complete */