| To: | Linux-MIPS <linux-mips@linux-mips.org> |
|---|---|
| Subject: | [PATCH -queue 3/7] [loongson] early_printk: fix the variable type of uart_base |
| From: | Wu Zhangjin <wuzhangjin@gmail.com> |
| Date: | Fri, 16 Oct 2009 14:17:16 +0800 |
| Cc: | Ralf Baechle <ralf@linux-mips.org>, yanh@lemote.com, huhb@lemote.com, Zhang Le <r0bertz@gentoo.org>, zhangfx@lemote.com, Wu Zhangjin <wuzhangjin@gmail.com> |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references:in-reply-to:references; bh=dUbJ02gLkbcjlVcK993GC354YDseF6CRQ6Gysy6Ib58=; b=L4xZqQQHbYjhGnm71KvjZqp3bsO0yr/rTBoXwYSnut/n5ammhNxUQhaaJvsi4uZ8xR lJMJxiEv9eTI/m5a54dcuaZI+BsCgtLTndMkWDyWKc8kmzic7841QYtwdAceQPEHAgA/ 2/B87X/59k7/PfOVxHTbBNM0jf3XRFGELb0Yg= |
| Domainkey-signature: | a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=UR6eQYdIRAkGOBSaUHK6NaLfMnkZW9gy8kH6glMTZHJqizKDLMhdwxFSkGlxNjdvgx z8tuXCEcjVM67IpFoNT4qLVdvpWnKvrq+7lsQ/VNOOJUx4Ba9Ct+OhQzyEDHH84rRahE ObpLogweitZ0H9llDPTfQibEXzZ+O1Ie/ExoI= |
| In-reply-to: | <c709487f102bcd028fd637f5692ff42d94c55b33.1255673756.git.wuzhangjin@gmail.com> |
| In-reply-to: | <cover.1255673756.git.wuzhangjin@gmail.com> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <cover.1255672832.git.wuzhangjin@gmail.com> <83f0ebe8e34e5da49d0cb3487a7ef53f4edd69af.1255673756.git.wuzhangjin@gmail.com> <c709487f102bcd028fd637f5692ff42d94c55b33.1255673756.git.wuzhangjin@gmail.com> |
| References: | <cover.1255673756.git.wuzhangjin@gmail.com> |
| Sender: | linux-mips-bounce@linux-mips.org |
The uart_base variable here is not a physical address, so, we replace it
by unsigned char *.
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
---
arch/mips/loongson/common/early_printk.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/mips/loongson/common/early_printk.c
b/arch/mips/loongson/common/early_printk.c
index bc73edc..8ec4fb2 100644
--- a/arch/mips/loongson/common/early_printk.c
+++ b/arch/mips/loongson/common/early_printk.c
@@ -1,7 +1,7 @@
/* early printk support
*
* Copyright (c) 2009 Philippe Vachon <philippe@cowpig.ca>
- * Copyright (C) 2009 Lemote Inc. & Insititute of Computing Technology
+ * Copyright (c) 2009 Lemote Inc.
* Author: Wu Zhangjin, wuzj@lemote.com
*
* This program is free software; you can redistribute it and/or modify it
@@ -16,20 +16,20 @@
#define PORT(base, offset) (u8 *)(base + offset)
-static inline unsigned int serial_in(phys_addr_t base, int offset)
+static inline unsigned int serial_in(unsigned char *base, int offset)
{
return readb(PORT(base, offset));
}
-static inline void serial_out(phys_addr_t base, int offset, int value)
+static inline void serial_out(unsigned char *base, int offset, int value)
{
writeb(value, PORT(base, offset));
}
void prom_putchar(char c)
{
- phys_addr_t uart_base =
- (phys_addr_t) ioremap_nocache(LOONGSON_UART_BASE, 8);
+ unsigned char *uart_base =
+ (unsigned char *) ioremap_nocache(LOONGSON_UART_BASE, 8);
while ((serial_in(uart_base, UART_LSR) & UART_LSR_THRE) == 0)
;
--
1.6.2.1
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH -queue 1/7] [loongson] fuloong2e: Cleanup the Kconfig, Wu Zhangjin |
|---|---|
| Next by Date: | [PATCH -queue 2/7] [loongson] mem.c: Register reserved memory pages, Wu Zhangjin |
| Previous by Thread: | [PATCH -queue 2/7] [loongson] mem.c: Register reserved memory pages, Wu Zhangjin |
| Next by Thread: | [PATCH -queue 4/7] [loongosn] add a new serial port debug function, Wu Zhangjin |
| Indexes: | [Date] [Thread] [Top] [All Lists] |