Skip to contentSkip to conversation

ARM: NUC900: Implements putc() which is needed when uncompressing linux

PATCH New Li Jie 2 participants 2 messages Dec 3, 2009 – Dec 4, 2009

Subsystems (2)
lore
Share & tools
lore

Li Jie

author
#0 lore raw

PATCH 1/1 ARM: NUC900: Implements putc() which is needed when uncompressing linux

Hi,

This patch implements the putc(), 'Uncompressing linux...done' can be outputs when booting zImage.

---
 arch/arm/mach-w90x900/include/mach/uncompress.h |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
(quoted diff) +0 -0

b/arch/arm/mach-w90x900/include/mach/uncompress.h
index 050d9fe..56f1a74 100644

arch/arm/mach-w90x900/include/mach/uncompress.h +10 -0
@@ -22,11 +22,21 @@
 
 #include <mach/regs-serial.h>
 #include <mach/map.h>
+#include <linux/serial_reg.h>
 
 #define arch_decomp_wdog()
 
+#define TX_DONE	(UART_LSR_TEMT | UART_LSR_THRE)
+static volatile u32 * uart_base = (u32 *)UART0_PA;
+
 static void putc(int ch)
 {
+	/* Check THRE and TEMT bits before we transmit the character.
+	 */
+	while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE)
+		barrier();
+
+	*uart_base = ch;
 }
 
 static inline void flush(void)
Signature · 1 line
1.6.5.3
#1 lore raw

PATCH 1/1 ARM: NUC900: Implements putc() which is needed when uncompressing linux

Okay, thanks for your patch.

2009/12/3 Li Jie <[email protected]>:

Quoted 40 lines

Hi,

This patch implements the putc(), 'Uncompressing linux...done' can be outputs when booting zImage.

---
?arch/arm/mach-w90x900/include/mach/uncompress.h | ? 10 ++++++++++ ?1 files changed, 10 insertions(+), 0 deletions(-)

arch/arm/mach-w90x900/include/mach/uncompress.h +0 -0
index 050d9fe..56f1a74 100644
@@ -22,11 +22,21 @@
 

?#include <mach/regs-serial.h>
?#include <mach/map.h>
+#include <linux/serial_reg.h>

?#define arch_decomp_wdog()

arch/arm/mach-w90x900/include/mach/uncompress.h +3 -0
+#define TX_DONE ? ? ? ?(UART_LSR_TEMT | UART_LSR_THRE)
+static volatile u32 * uart_base = (u32 *)UART0_PA;
+

?static void putc(int ch)
?{
+ ? ? ? /* Check THRE and TEMT bits before we transmit the character.
+ ? ? ? ?*/
+ ? ? ? while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE)
+ ? ? ? ? ? ? ? barrier();
+
+ ? ? ? *uart_base = ch;
?}

?static inline void flush(void)
--
1.6.5.3

Signature · 3 lines
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel