Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: Loongson early_printk: Fix variable type of uart_base

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>
Cc: Linux-MIPS <linux-mips@linux-mips.org>
Cc: yanh@lemote.com
Cc: huhb@lemote.com
Cc: Zhang Le <r0bertz@gentoo.org>
Cc: zhangfx@lemote.com
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Wu Zhangjin and committed by
Ralf Baechle
db54ff24 f6d4ff02

+5 -5
+5 -5
arch/mips/loongson/common/early_printk.c
··· 1 1 /* early printk support 2 2 * 3 3 * Copyright (c) 2009 Philippe Vachon <philippe@cowpig.ca> 4 - * Copyright (C) 2009 Lemote Inc. & Insititute of Computing Technology 4 + * Copyright (c) 2009 Lemote Inc. 5 5 * Author: Wu Zhangjin, wuzj@lemote.com 6 6 * 7 7 * This program is free software; you can redistribute it and/or modify it ··· 16 16 17 17 #define PORT(base, offset) (u8 *)(base + offset) 18 18 19 - static inline unsigned int serial_in(phys_addr_t base, int offset) 19 + static inline unsigned int serial_in(unsigned char *base, int offset) 20 20 { 21 21 return readb(PORT(base, offset)); 22 22 } 23 23 24 - static inline void serial_out(phys_addr_t base, int offset, int value) 24 + static inline void serial_out(unsigned char *base, int offset, int value) 25 25 { 26 26 writeb(value, PORT(base, offset)); 27 27 } 28 28 29 29 void prom_putchar(char c) 30 30 { 31 - phys_addr_t uart_base = 32 - (phys_addr_t) ioremap_nocache(LOONGSON_UART_BASE, 8); 31 + unsigned char *uart_base = 32 + (unsigned char *) ioremap_nocache(LOONGSON_UART_BASE, 8); 33 33 34 34 while ((serial_in(uart_base, UART_LSR) & UART_LSR_THRE) == 0) 35 35 ;