Skip to contentSkip to conversation

amba-pl011: add missing ST specific registers

PATCH New Linus Walleij 3 participants 3 messages Sep 29, 2010 Arm primecell UART PL010 and PL011 drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 amba-pl011: add missing ST specific registers

From: Jonas Aaberg <[email protected]>

The ST Micro derivates have several extra interesting registers that we may soon use for something interesting so may just as well define them in the header.

---
 include/linux/amba/serial.h |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
include/linux/amba/serial.h +11 -0
index e1b634b..6021588 100644
@@ -32,7 +32,9 @@
 #define UART01x_RSR		0x04	/* Receive status register (Read). */
 #define UART01x_ECR		0x04	/* Error clear register (Write). */
 #define UART010_LCRH		0x08	/* Line control register, high byte. */
+#define ST_UART011_DMAWM	0x08    /* DMA watermark configure register. */
 #define UART010_LCRM		0x0C	/* Line control register, middle byte. */
+#define ST_UART011_TIMEOUT	0x0C    /* Timeout period register. */
 #define UART010_LCRL		0x10	/* Line control register, low byte. */
 #define UART010_CR		0x14	/* Control register. */
 #define UART01x_FR		0x18	/* Flag register (Read only). */
@@ -51,6 +53,15 @@
 #define UART011_MIS		0x40	/* Masked interrupt status. */
 #define UART011_ICR		0x44	/* Interrupt clear register. */
 #define UART011_DMACR		0x48	/* DMA control register. */
+#define ST_UART011_XFCR		0x50	/* XON/XOFF control register. */
+#define ST_UART011_XON1		0x54	/* XON1 register. */
+#define ST_UART011_XON2		0x58	/* XON2 register. */
+#define ST_UART011_XOFF1	0x5C	/* XON1 register. */
+#define ST_UART011_XOFF2	0x60	/* XON2 register. */
+#define ST_UART011_ITCR		0x80	/* Integration test control register. */
+#define ST_UART011_ITIP		0x84	/* Integration test input register. */
+#define ST_UART011_ABCR		0x100	/* Autobaud control register. */
+#define ST_UART011_ABIMSC	0x15C	/* Autobaud interrupt mask/clear register. */
 
 #define UART011_DR_OE		(1 << 11)
 #define UART011_DR_BE		(1 << 10)
Signature · 1 line
1.6.3.3
#1 lore raw

PATCH 1/1 amba-pl011: add missing ST specific registers

Quoted 17 lines · Linus Walleij

From: Jonas Aaberg <[email protected]>

The ST Micro derivates have several extra interesting registers that we may soon use for something interesting so may just as well define them in the header.

---
 include/linux/amba/serial.h |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
include/linux/amba/serial.h +0 -0
index e1b634b..6021588 100644

include/linux/amba/serial.h line 35

Quoted 4 lines
include/linux/amba/serial.h +1 -0
@@ -32,7 +32,9 @@
 #define UART01x_RSR		0x04	/* Receive status register (Read). */
 #define UART01x_ECR		0x04	/* Error clear register (Write). */
 #define UART010_LCRH		0x08	/* Line control register, high byte. */
+#define ST_UART011_DMAWM	0x08    /* DMA watermark configure register. */

this

include/linux/amba/serial.h line 37

Quoted 2 lines
include/linux/amba/serial.h +1 -0
 #define UART010_LCRM		0x0C	/* Line control register, middle byte. */
+#define ST_UART011_TIMEOUT	0x0C    /* Timeout period register. */

abd this are overwritng the default register how do plan to handle it? it will be better to add them at the same time as you use them

btw you have whitespace in patch

Best Regards,
J.

#2 lore raw

PATCH 1/1 amba-pl011: add missing ST specific registers

2010/9/29 Jean-Christophe PLAGNIOL-VILLARD <[email protected]>:

Quoted 23 lines · Linus Walleij
Quoted 17 lines

From: Jonas Aaberg <[email protected]>

The ST Micro derivates have several extra interesting registers that we may soon use for something interesting so may just as well define them in the header.

---
?include/linux/amba/serial.h | ? 11 +++++++++++ ?1 files changed, 11 insertions(+), 0 deletions(-)

include/linux/amba/serial.h +0 -0
index e1b634b..6021588 100644
@@ -32,7 +32,9 @@
Quoted 4 lines

?#define UART01x_RSR ? ? ? ? ?0x04 ? ?/* Receive status register (Read). */ ?#define UART01x_ECR ? ? ? ? ?0x04 ? ?/* Error clear register (Write). */ ?#define UART010_LCRH ? ? ? ? 0x08 ? ?/* Line control register, high byte. */ +#define ST_UART011_DMAWM ? ? 0x08 ? ?/* DMA watermark configure register. */

this

Quoted 3 lines
Quoted 2 lines

?#define UART010_LCRM ? ? ? ? 0x0C ? ?/* Line control register, middle byte. */ +#define ST_UART011_TIMEOUT ? 0x0C ? ?/* Timeout period register. */

abd this are overwritng the default register how do plan to handle it?

No it really isn't. (Unless I misunderstand what you're saying here.)

The other register is for the PL010 serial/amba-pl010.c and this patch adds registers used in our PL011 derivate in serial/amba-pl011.c, it is a habit of our hardware engineers to recycle register allocations from PL010 for the new PL011 derivate.

Even if they did overlap (as is the case in some other PrimeCell drivers) we usually handle this by runtime-switches per PrimeCell ID-based vendor data so there is a clear design pattern for how to handle that.

Quoted 1 line

btw you have whitespace in patch

Where? I can only see tabs.. I even downloaded the patch off the list and ran it through checkpatch in the fears there was. We usually adjust our whitespace to be the same as the file we're changing but in this case even checkpatch is happy.

Yours
Linus Walleij