diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-29 22:48:03 +1100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-29 22:48:03 +1100 |
commit | 21af0297c7e56024a5ccc4d8ad2a590f9ec371ba (patch) | |
tree | 5d288c1877b1ae9fbe24aa7fabd79565e73d3d2f /arch/mips/tx4927/common | |
parent | 5ea293a9048d3a58cb0c840fa719d85ad14cba47 (diff) | |
parent | a9d2517c7a5c8028fbc5296d3af3c75597d3d180 (diff) |
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (68 commits)
[MIPS] remove Documentation/mips/GT64120.README
[MIPS] Malta: remaining bits of the board support code cleanup
[MIPS] Malta: make the helper function static
[MIPS] Malta: fix braces at single statement blocks
[MIPS] Malta, Atlas: move an extern function declaration to the header file
[MIPS] Malta: Use C89 style for comments
[MIPS] Malta: else should follow close brace in malta_int.c
[MIPS] Malta: remove a superfluous comment
[MIPS] Malta: include <linux/cpu.h> instead of <asm/cpu.h>
[MIPS] Malta, Atlas, Sead: remove an extern from .c files
[MIPS] Malta: fix oversized lines in malta_int.c
[MIPS] Malta: remove a dead function declaration
[MIPS] Malta: use tabs not spaces
[MIPS] Malta: set up the screen info in a separate function
[MIPS] Malta: check the PCI clock frequency in a separate function
[MIPS] Malta: use the KERN_ facility level in printk()
[MIPS] Malta: use Linux kernel style for structure initialization
[MIPS]: constify function pointer tables
[MIPS] compat: handle argument endianess of sys32_(f)truncate64 with merge_64
[MIPS] Cobalt 64-bits kernels can be safely unmarked experimental
...
Diffstat (limited to 'arch/mips/tx4927/common')
-rw-r--r-- | arch/mips/tx4927/common/Makefile | 2 | ||||
-rw-r--r-- | arch/mips/tx4927/common/tx4927_setup.c | 186 |
2 files changed, 1 insertions, 187 deletions
diff --git a/arch/mips/tx4927/common/Makefile b/arch/mips/tx4927/common/Makefile index e8629617f25..a7fe76a6496 100644 --- a/arch/mips/tx4927/common/Makefile +++ b/arch/mips/tx4927/common/Makefile @@ -2,7 +2,7 @@ # Makefile for common code for Toshiba TX4927 based systems # -obj-y += tx4927_prom.o tx4927_setup.o tx4927_irq.o +obj-y += tx4927_prom.o tx4927_irq.o obj-$(CONFIG_TOSHIBA_FPCIB0) += smsc_fdc37m81x.o obj-$(CONFIG_KGDB) += tx4927_dbgio.o diff --git a/arch/mips/tx4927/common/tx4927_setup.c b/arch/mips/tx4927/common/tx4927_setup.c deleted file mode 100644 index 36c5f200eb3..00000000000 --- a/arch/mips/tx4927/common/tx4927_setup.c +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Author: MontaVista Software, Inc. - * source@mvista.com - * - * Copyright 2001-2002 MontaVista Software Inc. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE - * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 675 Mass Ave, Cambridge, MA 02139, USA. - */ -#include <linux/errno.h> -#include <linux/init.h> -#include <linux/kernel_stat.h> -#include <linux/module.h> -#include <linux/signal.h> -#include <linux/sched.h> -#include <linux/types.h> -#include <linux/interrupt.h> -#include <linux/ioport.h> -#include <linux/timex.h> -#include <linux/slab.h> -#include <linux/random.h> -#include <linux/irq.h> -#include <linux/bitops.h> -#include <asm/bootinfo.h> -#include <asm/io.h> -#include <asm/irq.h> -#include <asm/mipsregs.h> -#include <asm/system.h> -#include <asm/time.h> -#include <asm/tx4927/tx4927.h> - - -#undef DEBUG - -void dump_cp0(char *key); - - -void __init plat_mem_setup(void) -{ -#ifdef CONFIG_TOSHIBA_RBTX4927 - { - extern void toshiba_rbtx4927_setup(void); - toshiba_rbtx4927_setup(); - } -#endif -} - -void __init plat_time_init(void) -{ -#ifdef CONFIG_TOSHIBA_RBTX4927 - { - extern void toshiba_rbtx4927_time_init(void); - toshiba_rbtx4927_time_init(); - } -#endif -} - -#ifdef DEBUG -void print_cp0(char *key, int num, char *name, u32 val) -{ - printk("%s cp0:%02d:%s=0x%08x\n", key, num, name, val); - return; -} - -void -dump_cp0(char *key) -{ - if (key == NULL) - key = ""; - - print_cp0(key, 0, "INDEX ", read_c0_index()); - print_cp0(key, 2, "ENTRYLO1", read_c0_entrylo0()); - print_cp0(key, 3, "ENTRYLO2", read_c0_entrylo1()); - print_cp0(key, 4, "CONTEXT ", read_c0_context()); - print_cp0(key, 5, "PAGEMASK", read_c0_pagemask()); - print_cp0(key, 6, "WIRED ", read_c0_wired()); - //print_cp0(key, 8, "BADVADDR", read_c0_badvaddr()); - print_cp0(key, 9, "COUNT ", read_c0_count()); - print_cp0(key, 10, "ENTRYHI ", read_c0_entryhi()); - print_cp0(key, 11, "COMPARE ", read_c0_compare()); - print_cp0(key, 12, "STATUS ", read_c0_status()); - print_cp0(key, 13, "CAUSE ", read_c0_cause() & 0xffff87ff); - print_cp0(key, 16, "CONFIG ", read_c0_config()); - return; -} - -void print_pic(char *key, unsigned long reg, char *name) -{ - printk(KERN_INFO "%s pic:0x%08lx:%s=0x%08x\n", key, reg, name, - __raw_readl((void __iomem *)reg)); - return; -} - - -void dump_pic(char *key) -{ - if (key == NULL) - key = ""; - - print_pic(key, 0xff1ff600, "IRDEN "); - print_pic(key, 0xff1ff604, "IRDM0 "); - print_pic(key, 0xff1ff608, "IRDM1 "); - - print_pic(key, 0xff1ff610, "IRLVL0 "); - print_pic(key, 0xff1ff614, "IRLVL1 "); - print_pic(key, 0xff1ff618, "IRLVL2 "); - print_pic(key, 0xff1ff61c, "IRLVL3 "); - print_pic(key, 0xff1ff620, "IRLVL4 "); - print_pic(key, 0xff1ff624, "IRLVL5 "); - print_pic(key, 0xff1ff628, "IRLVL6 "); - print_pic(key, 0xff1ff62c, "IRLVL7 "); - - print_pic(key, 0xff1ff640, "IRMSK "); - print_pic(key, 0xff1ff660, "IREDC "); - print_pic(key, 0xff1ff680, "IRPND "); - print_pic(key, 0xff1ff6a0, "IRCS "); - - print_pic(key, 0xff1ff514, "IRFLAG1 "); /* don't read IRLAG0 -- it hangs system */ - - print_pic(key, 0xff1ff518, "IRPOL "); - print_pic(key, 0xff1ff51c, "IRRCNT "); - print_pic(key, 0xff1ff520, "IRMASKINT"); - print_pic(key, 0xff1ff524, "IRMASKEXT"); - - return; -} - - -void print_addr(char *hdr, char *key, unsigned long addr) -{ - printk(KERN_INFO "%s %s:0x%08lx=0x%08x\n", hdr, key, addr, - __raw_readl((void __iomem *)addr)); - return; -} - - -void dump_180(char *key) -{ - u32 i; - - for (i = 0x80000180; i < 0x80000180 + 0x80; i += 4) { - print_addr("180", key, i); - } - return; -} - - -void dump_eh0(char *key) -{ - int i; - extern unsigned long exception_handlers[]; - - for (i = (int) exception_handlers; - i < (int) (exception_handlers + 20); i += 4) { - print_addr("eh0", key, i); - } - - return; -} - -void pk0(void) -{ - volatile u32 val; - - __asm__ __volatile__("ori %0, $26, 0":"=r"(val) - ); - printk("k0=[0x%08x]\n", val); -} -#endif |