提交 10546263 编写于 作者: A Anders Blomdell 提交者: Haavard Skinnemoen

avr32: Enable pullup on USART TX lines

Make USART initialization conform to Section 24.6.1 in the AT32AP7000 manual,
i.e. "To prevent the TXD line from falling when the USART is disabled, the use
of an internal pull up is mandatory."
Signed-off-by: NAnders Blomdell <anders.blomdell@control.lth.se>
[haavard.skinnemoen@atmel.com: enable pullup on RX as well]
Signed-off-by: NHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
上级 57f8f7b6
...@@ -967,28 +967,28 @@ static inline void configure_usart0_pins(void) ...@@ -967,28 +967,28 @@ static inline void configure_usart0_pins(void)
{ {
u32 pin_mask = (1 << 8) | (1 << 9); /* RXD & TXD */ u32 pin_mask = (1 << 8) | (1 << 9); /* RXD & TXD */
select_peripheral(PIOA, pin_mask, PERIPH_B, 0); select_peripheral(PIOA, pin_mask, PERIPH_B, AT32_GPIOF_PULLUP);
} }
static inline void configure_usart1_pins(void) static inline void configure_usart1_pins(void)
{ {
u32 pin_mask = (1 << 17) | (1 << 18); /* RXD & TXD */ u32 pin_mask = (1 << 17) | (1 << 18); /* RXD & TXD */
select_peripheral(PIOA, pin_mask, PERIPH_A, 0); select_peripheral(PIOA, pin_mask, PERIPH_A, AT32_GPIOF_PULLUP);
} }
static inline void configure_usart2_pins(void) static inline void configure_usart2_pins(void)
{ {
u32 pin_mask = (1 << 26) | (1 << 27); /* RXD & TXD */ u32 pin_mask = (1 << 26) | (1 << 27); /* RXD & TXD */
select_peripheral(PIOB, pin_mask, PERIPH_B, 0); select_peripheral(PIOB, pin_mask, PERIPH_B, AT32_GPIOF_PULLUP);
} }
static inline void configure_usart3_pins(void) static inline void configure_usart3_pins(void)
{ {
u32 pin_mask = (1 << 18) | (1 << 17); /* RXD & TXD */ u32 pin_mask = (1 << 18) | (1 << 17); /* RXD & TXD */
select_peripheral(PIOB, pin_mask, PERIPH_B, 0); select_peripheral(PIOB, pin_mask, PERIPH_B, AT32_GPIOF_PULLUP);
} }
static struct platform_device *__initdata at32_usarts[4]; static struct platform_device *__initdata at32_usarts[4];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册