From: Ralf Baechle <ralf@linux-mips.org>
To: Wu Zhangjin <wuzhangjin@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-mips@linux-mips.org,
Jason Wessel <jason.wessel@windriver.com>,
Wu Zhangjin <wuzj@lemote.com>, Yan Hua <yanh@lemote.com>,
Philippe Vachon <philippe@cowpig.ca>,
Zhang Le <r0bertz@gentoo.org>, Zhang Fuxin <zhangfx@lemote.com>,
loongson-dev <loongson-dev@googlegroups.com>,
Liu Junliang <liujl@lemote.com>, Erwan Lerale <erwan@thiscow.com>,
Arnaud Patard <apatard@mandriva.com>
Subject: Re: [PATCH v4 03/16] [loongson] early_printk: add new implmentation
Date: Mon, 6 Jul 2009 11:43:21 +0100 [thread overview]
Message-ID: <20090706104321.GC11727@linux-mips.org> (raw)
In-Reply-To: <9e23b4150f183c0817f2abbb95525279c2006a83.1246546684.git.wuzhangjin@gmail.com>
On Thu, Jul 02, 2009 at 11:20:20PM +0800, Wu Zhangjin wrote:
> +#include <asm/mips-boards/bonito64.h>
> +
> +#define UART_BASE (BONITO_PCIIO_BASE + 0x3f8)
> +
> +#define PORT(base, offset) (u8 *)(base + offset)
> +
> +static inline unsigned int serial_in(phys_addr_t base, int offset)
> +{
> + return readb(PORT(base, offset));
> +}
> +
> +static inline void serial_out(phys_addr_t base, int offset, int value)
> +{
> + writeb(value, PORT(base, offset));
Why not inb(0x3f8, + offset) rsp. outb()?
> +}
> +
> +void prom_putchar(char c)
> +{
> + phys_addr_t uart_base =
> + (phys_addr_t) ioremap_nocache(UART_BASE, 8);
ioremap_nocache returns a virtual address, not a physical address, so
this type should probably be unsigned char *.
> + while ((serial_in(uart_base, UART_LSR) & UART_LSR_THRE) == 0)
Ralf
next prev parent reply other threads:[~2009-07-06 10:50 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-02 15:15 [PATCH v4 00/16] Cleanup Lemote FuLoong2e Support Wu
2009-07-02 15:18 ` [PATCH v4 01/16] [loongson] eary_printk: Remove existing implementation Wu Zhangjin
2009-07-02 15:19 ` [PATCH v4 02/16] [loongson] kgdb: Remove out-of-date board-specific source code Wu Zhangjin
2009-07-22 20:31 ` Jason Wessel
2009-07-02 15:20 ` [PATCH v4 03/16] [loongson] early_printk: add new implmentation Wu Zhangjin
2009-07-06 10:43 ` Ralf Baechle [this message]
2009-07-06 13:57 ` Wu Zhangjin
2009-07-02 15:20 ` [PATCH v4 04/16] [loongson] pm: Remove redundant source code Wu Zhangjin
2009-07-02 15:21 ` [PATCH v4 05/16] [loongson] pm: clean up the reboot support Wu Zhangjin
2009-07-02 15:22 ` [PATCH v4 06/16] [loongson] pci: use existing mips_io_port_base Wu Zhangjin
2009-07-02 15:22 ` [PATCH v4 07/16] [loongson] split the implementation of prom,setup parts Wu Zhangjin
2009-07-02 15:23 ` [PATCH v4 08/16] [loongson] clean up the coding style Wu Zhangjin
2009-07-02 15:23 ` [PATCH v4 09/16] [loongson] pci: clean up pcimap setup Wu Zhangjin
2009-07-02 15:24 ` [PATCH v4 10/16] [loongson] rtc: enable legacy RTC driver on fulong Wu Zhangjin
2009-07-02 15:25 ` [PATCH v4 11/16] [loongson] add oprofile support Wu Zhangjin
2009-07-02 15:26 ` [PATCH v4 12/16] [loongson] change naming methods Wu Zhangjin
2009-07-02 15:26 ` [PATCH v4 13/16] [loongson] split common loongson source code out Wu Zhangjin
2009-07-02 15:27 ` [PATCH v4 14/16] [loongson] add a machtype kernel command line argument Wu Zhangjin
2009-07-02 15:27 ` [PATCH v4 15/16] [loongson] add gcc 4.4 support for Loongson2E Wu Zhangjin
2009-07-02 15:28 ` [PATCH v4 16/16] [loongson] update the default config file for fuloong2e Wu Zhangjin
2010-06-17 10:47 ` [PATCH v4 00/16] Cleanup Lemote FuLoong2e Support Stuart Longland
2010-06-17 10:47 ` Stuart Longland
2010-06-17 11:06 ` Stuart Longland
[not found] ` <AANLkTikaIbsfqoJR6OfOMbhyEWiFil_A22pAs1J_TRIS@mail.gmail.com>
2010-06-18 10:53 ` Stuart Longland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090706104321.GC11727@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=apatard@mandriva.com \
--cc=erwan@thiscow.com \
--cc=jason.wessel@windriver.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=liujl@lemote.com \
--cc=loongson-dev@googlegroups.com \
--cc=philippe@cowpig.ca \
--cc=r0bertz@gentoo.org \
--cc=wuzhangjin@gmail.com \
--cc=wuzj@lemote.com \
--cc=yanh@lemote.com \
--cc=zhangfx@lemote.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.