This patch is for s5pc210 support.
Due to the resigter of baudrate is changed from slot to value,
add both of them to uart structure.
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
#define __ASM_ARCH_UART_H_
#ifndef __ASSEMBLY__
+/* baudrate rest value */
+union br_rest {
+ unsigned short slot; /* udivslot */
+ unsigned char value; /* ufracval */
+};
+
struct s5p_uart {
unsigned int ulcon;
unsigned int ucon;
unsigned char urxh;
unsigned char res2[3];
unsigned int ubrdiv;
- unsigned short udivslot;
- unsigned char res3[2];
- unsigned char res4[0x3d0];
+ union br_rest rest;
+ unsigned char res3[0x3d0];
};
+
+static int use_divslot = 1;
+
#endif /* __ASSEMBLY__ */
#endif
val = uclk / baudrate;
writel(val / 16 - 1, &uart->ubrdiv);
- writew(udivslot[val % 16], &uart->udivslot);
+
+ if (use_divslot)
+ writew(udivslot[val % 16], &uart->rest.slot);
+ else
+ writeb(val % 16, &uart->rest.value);
}
/*