Skip to contentSkip to conversation

ARMV7: S5P: serial: support the s5pc210

PATCH New Minkyu Kang 2 participants 2 messages Sep 28, 2010 – Oct 19, 2010 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARMV7: S5P: serial: support the s5pc210

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.

---
 arch/arm/include/asm/arch-s5pc1xx/uart.h |   14 +++++++++++---
 drivers/serial/serial_s5p.c              |    6 +++++-
 2 files changed, 16 insertions(+), 4 deletions(-)
arch/arm/include/asm/arch-s5pc1xx/uart.h +11 -3
index 2d7ad7e..f6eeab4 100644
@@ -24,6 +24,12 @@
 #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;
@@ -38,10 +44,12 @@ struct s5p_uart {
 	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
drivers/serial/serial_s5p.c +5 -1
index 7709664..36333c3 100644
@@ -70,7 +70,11 @@ void serial_setbrg_dev(const int dev_index)
 	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);
 }
 
 /*
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH 1/1 ARMV7: S5P: serial: support the s5pc210

Quoted 11 lines · Minkyu Kang

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.

---
?arch/arm/include/asm/arch-s5pc1xx/uart.h | ? 14 +++++++++++--- ?drivers/serial/serial_s5p.c ? ? ? ? ? ? ?| ? ?6 +++++- ?2 files changed, 16 insertions(+), 4 deletions(-)

applied to u-boot-samsung

Signature · 2 lines
from. prom.
www.promsoft.net