fdt_addr_t base = plat->base;
u32 isr = readl(base + ISR_OFFSET(stm32f4));
- if ((isr & USART_SR_FLAG_RXNE) == 0)
+ if ((isr & USART_ISR_FLAG_RXNE) == 0)
return -EAGAIN;
- if (isr & USART_SR_FLAG_ORE) {
+ if (isr & USART_ISR_FLAG_ORE) {
if (!stm32f4)
setbits_le32(base + ICR_OFFSET, USART_ICR_OREF);
else
bool stm32f4 = plat->uart_info->stm32f4;
fdt_addr_t base = plat->base;
- if ((readl(base + ISR_OFFSET(stm32f4)) & USART_SR_FLAG_TXE) == 0)
+ if ((readl(base + ISR_OFFSET(stm32f4)) & USART_ISR_FLAG_TXE) == 0)
return -EAGAIN;
writel(c, base + TDR_OFFSET(stm32f4));
if (input)
return readl(base + ISR_OFFSET(stm32f4)) &
- USART_SR_FLAG_RXNE ? 1 : 0;
+ USART_ISR_FLAG_RXNE ? 1 : 0;
else
return readl(base + ISR_OFFSET(stm32f4)) &
- USART_SR_FLAG_TXE ? 0 : 1;
+ USART_ISR_FLAG_TXE ? 0 : 1;
}
static int stm32_serial_probe(struct udevice *dev)
#define USART_CR3_OVRDIS BIT(12)
-#define USART_SR_FLAG_ORE BIT(3)
-#define USART_SR_FLAG_RXNE BIT(5)
-#define USART_SR_FLAG_TXE BIT(7)
+#define USART_ISR_FLAG_ORE BIT(3)
+#define USART_ISR_FLAG_RXNE BIT(5)
+#define USART_ISR_FLAG_TXE BIT(7)
#define USART_BRR_F_MASK GENMASK(7, 0)
#define USART_BRR_M_SHIFT 4