arch/arm/src/stm32f7: Remove adhoc PM interfaces and add CONFIG_PM serial suspend.

This commit is contained in:
Gregory Nutt
2018-09-21 06:43:52 -06:00
parent 9a71fdc8c1
commit 2c0a0aef9f
10 changed files with 362 additions and 77 deletions
+2 -2
View File
@@ -1070,12 +1070,12 @@ static inline void up_setusartint(struct up_dev_s *priv, uint16_t ie)
/* And restore the interrupt state (see the interrupt enable/usage table above) */
cr = up_serialin(priv, STM32_USART_CR1_OFFSET);
cr = up_serialin(priv, STM32_USART_CR1_OFFSET);
cr &= ~(USART_CR1_USED_INTS);
cr |= (ie & (USART_CR1_USED_INTS));
up_serialout(priv, STM32_USART_CR1_OFFSET, cr);
cr = up_serialin(priv, STM32_USART_CR3_OFFSET);
cr = up_serialin(priv, STM32_USART_CR3_OFFSET);
cr &= ~USART_CR3_EIE;
cr |= (ie & USART_CR3_EIE);
up_serialout(priv, STM32_USART_CR3_OFFSET, cr);
+5
View File
@@ -2729,6 +2729,11 @@ static int stm32_i2c_pm_prepare(FAR struct pm_callback_s *cb, int domain,
}
break;
default:
/* Should not get here */
break;
}
return OK;
File diff suppressed because it is too large Load Diff
+5
View File
@@ -1787,6 +1787,11 @@ static int spi_pm_prepare(FAR struct pm_callback_s *cb, int domain,
}
break;
default:
/* Should not get here */
break;
}
return OK;
-10
View File
@@ -320,16 +320,6 @@ extern "C"
* Public Functions
************************************************************************************/
/************************************************************************************
* Name: stm32_serial_get_uart
*
* Description:
* Get serial driver structure for STM32 USART
*
************************************************************************************/
FAR uart_dev_t *stm32_serial_get_uart(int uart_num);
/************************************************************************************
* Name: stm32_serial_dma_poll
*
+5
View File
@@ -1179,6 +1179,11 @@ static int stm32_1wire_pm_prepare(FAR struct pm_callback_s *cb, int domain,
}
break;
default:
/* Should not get here */
break;
}
return OK;
+5
View File
@@ -2876,6 +2876,11 @@ static int stm32l4_i2c_pm_prepare(FAR struct pm_callback_s *cb, int domain,
}
break;
default:
/* Should not get here */
break;
}
return OK;
+9 -4
View File
@@ -340,7 +340,7 @@ static int stm32l4serial_pmprepare(FAR struct pm_callback_s *cb, int domain,
#endif
/****************************************************************************
* Private Variables
* Private Data
****************************************************************************/
#ifndef SERIAL_HAVE_ONLY_DMA
@@ -1187,7 +1187,7 @@ static void stm32l4serial_setsuspend(struct uart_dev_s *dev, bool suspend)
****************************************************************************/
#ifdef CONFIG_PM
void stm32l4serial_pm_setsuspend(bool suspend)
static void stm32l4serial_pm_setsuspend(bool suspend)
{
int n;
@@ -2613,6 +2613,7 @@ static void stm32l4serial_pmnotify(FAR struct pm_callback_s *cb, int domain,
default:
/* Should not get here */
break;
}
}
@@ -2709,9 +2710,13 @@ static int stm32l4serial_pmprepare(FAR struct pm_callback_s *cb, int domain,
return ERROR;
}
}
break;
default:
/* Should not get here */
break;
}
return OK;
}
#endif
@@ -2731,7 +2736,7 @@ static int stm32l4serial_pmprepare(FAR struct pm_callback_s *cb, int domain,
* Description:
* Performs the low level USART initialization early in debug so that the
* serial console will be available during bootup. This must be called
* before stm32l4serial_getregit.
* before up_serialinit.
*
****************************************************************************/
@@ -2899,7 +2904,7 @@ void stm32l4_serial_dma_poll(void)
* Name: up_putc
*
* Description:
* Provide priority, low-level access to support OS debug writes
* Provide priority, low-level access to support OS debug writes
*
****************************************************************************/
+5
View File
@@ -1560,6 +1560,11 @@ static int spi_pm_prepare(FAR struct pm_callback_s *cb, int domain,
}
break;
default:
/* Should not get here */
break;
}
return OK;
+5 -5
View File
@@ -588,14 +588,14 @@ enum pm_state_e pm_querystate(int domain);
*/
# define pm_initialize()
# define pm_register(cb) (0)
# define pm_unregister(cb) (0)
# define pm_register(cb) (0)
# define pm_unregister(cb) (0)
# define pm_activity(domain,prio)
# define pm_stay(domain,state)
# define pm_relax(domain,state)
# define pm_checkstate(domain) (0)
# define pm_changestate(domain,state)
# define pm_querystate(domain) (0)
# define pm_checkstate(domain) (0)
# define pm_changestate(domain,state) (0)
# define pm_querystate(domain) (0)
#endif /* CONFIG_PM */
#endif /* __INCLUDE_NUTTX_POWER_PM_H */