Skip to contentSkip to conversation

amba pl011: platform data for reg lockup and glitch

PATCH New Linus Walleij 3 participants 3 messages Jun 9, 2011 – Jun 10, 2011

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 amba pl011: platform data for reg lockup and glitch

From: Shreshtha Kumar Sahu <[email protected]>

This patch provides platform data for following
- uart reset function to assist uart register lockup workaround

- init/exit function to fix glitch in the tx pin in tty_open when tty port0 is opened a glitch is seen in the tx line of uart0. This happens in pl011_startup() when tx fifo interrupt is provoked into asserting.
Now uart0 pins are enabled (alt function) only when init is complete and turned back to gpio when closed.

---
 arch/arm/mach-ux500/board-mop500-pins.c |   16 +++++++--
 arch/arm/mach-ux500/board-mop500.c      |   54 +++++++++++++++++++++++++++++++
 2 files changed, 66 insertions(+), 4 deletions(-)
arch/arm/mach-ux500/board-mop500-pins.c +12 -4
index fd4cf1c..ceab640 100644
@@ -110,10 +110,18 @@ static pin_cfg_t mop500_pins_common[] = {
 	GPIO168_KP_O0,
 
 	/* UART */
-	GPIO0_U0_CTSn	| PIN_INPUT_PULLUP,
-	GPIO1_U0_RTSn	| PIN_OUTPUT_HIGH,
-	GPIO2_U0_RXD	| PIN_INPUT_PULLUP,
-	GPIO3_U0_TXD	| PIN_OUTPUT_HIGH,
+	/* uart-0 pins gpio configuration should be
+	 * kept intact to prevent glitch in tx line
+	 * when tty dev is opened. Later these pins
+	 * are configured to uart mop500_pins_uart0
+	 *
+	 * It will be replaced with uart configuration
+	 * once the issue is solved.
+	 */
+	GPIO0_GPIO	| PIN_INPUT_PULLUP,
+	GPIO1_GPIO	| PIN_OUTPUT_HIGH,
+	GPIO2_GPIO	| PIN_INPUT_PULLUP,
+	GPIO3_GPIO	| PIN_OUTPUT_LOW,
 
 	GPIO29_U2_RXD	| PIN_INPUT_PULLUP,
 	GPIO30_U2_TXD	| PIN_OUTPUT_HIGH,
arch/arm/mach-ux500/board-mop500.c +54 -0

84 lines not on this page · raw message

Signature · 1 line
1.7.3.2
#1 lore raw

PATCH 2/2 amba pl011: platform data for reg lockup and glitch

arch/arm/mach-ux500/board-mop500-pins.c static pin_cfg_t mop500_pins_common[] = { · line 124

Quoted 12 lines · Linus Walleij
arch/arm/mach-ux500/board-mop500-pins.c +12 -0
+	/* uart-0 pins gpio configuration should be
+	 * kept intact to prevent glitch in tx line
+	 * when tty dev is opened. Later these pins
+	 * are configured to uart mop500_pins_uart0
+	 *
+	 * It will be replaced with uart configuration
+	 * once the issue is solved.
+	 */
+	GPIO0_GPIO	| PIN_INPUT_PULLUP,
+	GPIO1_GPIO	| PIN_OUTPUT_HIGH,
+	GPIO2_GPIO	| PIN_INPUT_PULLUP,
+	GPIO3_GPIO	| PIN_OUTPUT_LOW,

Why do you want the TXD line (GPIO3) to be indicating a break condition?

#2 lore raw

PATCH 2/2 amba pl011: platform data for reg lockup and glitch

Quoted 15 lines · Russell King - ARM Linux

arch/arm/mach-ux500/board-mop500-pins.c static pin_cfg_t mop500_pins_common[] = { · line 124

Quoted 12 lines · Linus Walleij
arch/arm/mach-ux500/board-mop500-pins.c +12 -0
+	/* uart-0 pins gpio configuration should be
+	 * kept intact to prevent glitch in tx line
+	 * when tty dev is opened. Later these pins
+	 * are configured to uart mop500_pins_uart0
+	 *
+	 * It will be replaced with uart configuration
+	 * once the issue is solved.
+	 */
+	GPIO0_GPIO	| PIN_INPUT_PULLUP,
+	GPIO1_GPIO	| PIN_OUTPUT_HIGH,
+	GPIO2_GPIO	| PIN_INPUT_PULLUP,
+	GPIO3_GPIO	| PIN_OUTPUT_LOW,

Why do you want the TXD line (GPIO3) to be indicating a break condition?

Yes it should be PIN_OUTPUT_HIGH, as it is configured in mop500_pins_uart0.

Thanks,
Shreshtha