public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] twl6030: add base addr for ID0, ID1, ID2
@ 2010-02-18 17:00 balajitk
  2010-02-18 17:05 ` Krishnamoorthy, Balaji T
  0 siblings, 1 reply; 4+ messages in thread
From: balajitk @ 2010-02-18 17:00 UTC (permalink / raw)
  To: linux-omap, sameo; +Cc: tony, santosh.shilimkar, Balaji T K

From: Balaji T K <balajitk@ti.com>

Add base address for generic slave ID0, ID1, ID2
and introduced one more entry to align RTC module number between
twl4030 and twl6030

Signed-off-by: Balaji T K <balajitk@ti.com>
---
 drivers/mfd/twl-core.c  |    7 +++++--
 include/linux/i2c/twl.h |    5 +++++
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
index 2a76065..d820e87 100644
--- a/drivers/mfd/twl-core.c
+++ b/drivers/mfd/twl-core.c
@@ -204,6 +204,7 @@
 /* subchip/slave 3 0x4B - AUDIO */
 #define TWL6030_BASEADD_AUDIO		0x0000
 #define TWL6030_BASEADD_RSV		0x0000
+#define TWL6030_BASEADD_ZERO		0x0000
 
 /* Few power values */
 #define R_CFG_BOOT			0x05
@@ -319,9 +320,11 @@ static struct twl_mapping twl6030_map[] = {
 	{ SUB_CHIP_ID1, TWL6030_BASEADD_CHARGER },
 	{ SUB_CHIP_ID1, TWL6030_BASEADD_GASGAUGE },
 	{ SUB_CHIP_ID1, TWL6030_BASEADD_PWM },
-	{ SUB_CHIP_ID2, TWL6030_BASEADD_RSV },
-	{ SUB_CHIP_ID2, TWL6030_BASEADD_RSV },
+	{ SUB_CHIP_ID0, TWL6030_BASEADD_ZERO },
+	{ SUB_CHIP_ID1, TWL6030_BASEADD_ZERO },
 
+	{ SUB_CHIP_ID2, TWL6030_BASEADD_ZERO },
+	{ SUB_CHIP_ID2, TWL6030_BASEADD_ZERO },
 	{ SUB_CHIP_ID2, TWL6030_BASEADD_RSV },
 	{ SUB_CHIP_ID2, TWL6030_BASEADD_RSV },
 	{ SUB_CHIP_ID2, TWL6030_BASEADD_RSV },
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h
index bf1c5be..fcf9286 100644
--- a/include/linux/i2c/twl.h
+++ b/include/linux/i2c/twl.h
@@ -80,6 +80,11 @@
 #define TWL_MODULE_PM_MASTER	TWL4030_MODULE_PM_MASTER
 #define TWL_MODULE_PM_RECEIVER	TWL4030_MODULE_PM_RECEIVER
 #define TWL_MODULE_RTC		TWL4030_MODULE_RTC
+#define TWL_MODULE_PWM		TWL4030_MODULE_PWM0
+
+#define TWL6030_MODULE_ID0	0x0D
+#define TWL6030_MODULE_ID1	0x0E
+#define TWL6030_MODULE_ID2	0x0F
 
 #define GPIO_INTR_OFFSET	0
 #define KEYPAD_INTR_OFFSET	1
-- 
1.6.0.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [PATCH] omap 3/4: uart: fix full-fifo write abort
@ 2010-02-16 15:41 Santosh Shilimkar
  2010-02-16 15:41 ` [PATCH] omap2/3/4: ioremap omap_globals module Santosh Shilimkar
  0 siblings, 1 reply; 4+ messages in thread
From: Santosh Shilimkar @ 2010-02-16 15:41 UTC (permalink / raw)
  To: tony
  Cc: linux-omap, ben, sameo, lrg, paul, Santosh Shilimkar,
	Woodruff Richard, Ghorai Sukumar

This patch is addition to the already merged commit on non-empty
uart fifo read abort. "ce13d4716a276f4331d78ba28a5093a63822ab95"

OMAP3630 and OMAP4430 UART IP blocks have a restriction on TX FIFO
too. If you try to write to the tx fifo when it is full, the system aborts.

This can be easily reproducible by not suppressing interconnect errors or
long duration testing where continuous prints over console from multiple
threads. This patch is addressing the issue by ensuring that write is
not issued while fifo is full. A timeout is added to avoid any hang
on fifo-full for 10 mS which is unlikely case.

Patch is validated on OMAP3630 and OMAP4 SDP.

V2 version removed the additional 1 uS on every TX as per
Tony's suggestion

Signed-off-by: Woodruff Richard <r-woodruff2@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
CC: Ghorai Sukumar <s-ghorai@ti.com>
---
 arch/arm/mach-omap2/serial.c |   31 ++++++++++++++++++++++++++++---
 1 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 5f3035e..b79bc89 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -23,6 +23,7 @@
 #include <linux/serial_reg.h>
 #include <linux/clk.h>
 #include <linux/io.h>
+#include <linux/delay.h>
 
 #include <plat/common.h>
 #include <plat/board.h>
@@ -160,6 +161,13 @@ static inline unsigned int serial_read_reg(struct plat_serial8250_port *up,
 	return (unsigned int)__raw_readb(up->membase + offset);
 }
 
+static inline void __serial_write_reg(struct uart_port *up, int offset,
+		int value)
+{
+	offset <<= up->regshift;
+	__raw_writeb(value, up->membase + offset);
+}
+
 static inline void serial_write_reg(struct plat_serial8250_port *p, int offset,
 				    int value)
 {
@@ -620,6 +628,20 @@ static unsigned int serial_in_override(struct uart_port *up, int offset)
 	return __serial_read_reg(up, offset);
 }
 
+static void serial_out_override(struct uart_port *up, int offset, int value)
+{
+	unsigned int status, tmout = 10000;
+
+	status = __serial_read_reg(up, UART_LSR);
+	while (!(status & UART_LSR_THRE)) {
+		/* Wait up to 10ms for the character(s) to be sent. */
+		if (--tmout == 0)
+			break;
+		udelay(1);
+		status = __serial_read_reg(up, UART_LSR);
+	}
+	__serial_write_reg(up, offset, value);
+}
 void __init omap_serial_early_init(void)
 {
 	int i;
@@ -721,11 +743,14 @@ void __init omap_serial_init_port(int port)
 	 * omap3xxx: Never read empty UART fifo on UARTs
 	 * with IP rev >=0x52
 	 */
-	if (cpu_is_omap44xx())
+	if (cpu_is_omap44xx()) {
 		uart->p->serial_in = serial_in_override;
-	else if ((serial_read_reg(uart->p, UART_OMAP_MVER) & 0xFF)
-			>= UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV)
+		uart->p->serial_out = serial_out_override;
+	} else if ((serial_read_reg(uart->p, UART_OMAP_MVER) & 0xFF)
+			>= UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV) {
 		uart->p->serial_in = serial_in_override;
+		uart->p->serial_out = serial_out_override;
+	}
 }
 
 /**
-- 
1.6.0.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-02-19 12:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-18 17:00 [PATCH] twl6030: add base addr for ID0, ID1, ID2 balajitk
2010-02-18 17:05 ` Krishnamoorthy, Balaji T
2010-02-19 12:14   ` Samuel Ortiz
  -- strict thread matches above, loose matches on Subject: below --
2010-02-16 15:41 [PATCH] omap 3/4: uart: fix full-fifo write abort Santosh Shilimkar
2010-02-16 15:41 ` [PATCH] omap2/3/4: ioremap omap_globals module Santosh Shilimkar
2010-02-16 15:41   ` [PATCH] omap4: sdma: Enable the idle modes on omap4 Santosh Shilimkar
2010-02-16 15:41     ` [PATCH] omap: sdma: Limit the secure reserve channel fix for omap3 Santosh Shilimkar
2010-02-16 15:41       ` [PATCH] omap4: Add needed IRQ line into irqs.h Santosh Shilimkar
2010-02-16 15:41         ` [PATCH] omap4: Fix omap_type() for omap4 Santosh Shilimkar
2010-02-16 15:41           ` [PATCH] omap 3/4: Remove overlapping mapping of L4_WKUP io space Santosh Shilimkar
2010-02-16 15:41             ` [PATCH] omap4: clocks: Make Uart driver's clock calls OMAP4 compatible Santosh Shilimkar
2010-02-16 15:41               ` [PATCH] omap4: clocks: Make mcbsp " Santosh Shilimkar
2010-02-16 15:41                 ` [PATCH] omap4: clokcs: Make gpio " Santosh Shilimkar
2010-02-16 15:41                   ` [PATCH] omap4: clocks: Make watchdog " Santosh Shilimkar
2010-02-16 15:41                     ` [PATCH] omap4: clocks: Make dmtimer clocks " Santosh Shilimkar
2010-02-16 15:41                       ` [PATCH] omap4: clocks: Remove clock hacks from timer-gp.c Santosh Shilimkar
2010-02-16 15:41                         ` [PATCH] omap4: Enable WDT and McBSP support Santosh Shilimkar
2010-02-16 15:41                           ` [PATCH] omap4: clocks: Convert i2c clocks data to fclks Santosh Shilimkar
2010-02-16 15:41                             ` [PATCH] omap4: Add i2c support on omap4 platform Santosh Shilimkar
2010-02-16 15:41                               ` [PATCH] omap4: Add i2c board support for " Santosh Shilimkar
2010-02-16 15:41                                 ` [PATCH] omap4: clocks: Make i2c driver's clock calls OMAP4 compatible Santosh Shilimkar
2010-02-16 15:41                                   ` [PATCH] twl6030: Fix vsel calculations in set/get voltage api's Santosh Shilimkar
2010-02-16 15:41                                     ` [PATCH] twl6030: add base addr for ID0, ID1, ID2 Santosh Shilimkar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox