From: Paul M. <le...@us...> - 2001-08-25 11:20:22
|
Update of /cvsroot/linux-mips/linux/arch/mips/ps2 In directory usw-pr-cvs1:/tmp/cvs-serv9789/arch/mips/ps2 Added Files: Makefile reset.c setup.c Log Message: Started on R5900 integration.. as well as some basic PS2 code.. --- NEW FILE: Makefile --- # # Makefile for common code of Sony's PlayStation 2 # # Note! Dependencies are done automagically by 'make dep', which also # removes any old dependencies. DON'T put your own dependencies here # unless it's something special (ie not a .c file). # .S.s: $(CPP) $(CFLAGS) $< -o $*.s .S.o: $(CC) $(CFLAGS) -c $< -o $*.o O_TARGET := ps2.o obj-y := setup.o reset.o include $(TOPDIR)/Rules.make --- NEW FILE: reset.c --- /* * arch/mips/ps2/reset.c * * PlayStation 2 Reset Routines * * Copyright (C) 2001 MontaVista Software, Inc. * * Written by: Paul Mundt <pm...@mv...> * * 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. */ #include <linux/kernel.h> #include <linux/sched.h> #include <linux/init.h> void ps2_machine_restart(void) { /* FIXME: Unsupported at the moment.. */ } void ps2_machine_halt(void) { printk(KERN_NOTICE "\n** You can safely turn off the power\n"); /* * Should halt properly, but this will do for now.. */ for (;;) { __asm__ __volatile__ ( ".set mips3\n\t" ".set noreorder\n\t" "wait\n\t" ".set reorder\n\t" ".set mips0\n\t" : /* no outputs */ : /* no inputs */ ); } } void ps2_machine_power_off(void) { /* * Again, we should make an attempt to actually power * off the machine at this point.. but we'll just * wait indefinately instead (until a proper implementation * happens). */ ps2_machine_halt(); } --- NEW FILE: setup.c --- /* * arch/mips/ps2/setup.c * * PlayStation 2 Setup Routines * * Copyright (C) 2001 MontaVista Software, Inc. * * Written by: Paul Mundt <pm...@mv...> * * 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. */ #include <linux/config.h> #include <linux/init.h> #include <linux/ioport.h> #include <linux/sched.h> #include <asm/addrspace.h> extern void ps2_machine_restart(void); extern void ps2_machine_halt(void); extern void ps2_machine_power_off(void); struct { struct resource mem; struct resource ee_reg; struct resource gs_reg; struct resource boot; struct resource ext_mem; } ps2_resources = { { "Main Memory", 0x00000000, 0x0fffffff, IORESOURCE_MEM }, { "EE Registers", 0x10000000, 0x11ffffff }, { "GS Registers", 0x12000000, 0x13ffffff }, { "Boot ROM", 0x1fc00000, 0x1fffffff }, { "Extend Main Memory", 0x40000000, 0x7fffffff, IORESOURCE_MEM }, }; void __init ps2_setup(void) { _machine_restart = ps2_machine_restart; _machine_halt = ps2_machine_halt; _machine_power_off = ps2_machine_power_off; mips_io_port_base = KSEG0; ioport_resource.start = ps2_resources.ee_reg.start; ioport_resource.end = ps2_resources.gs_reg.end; iomem_resource.start = ps2_resources.mem.start; iomem_resource.end = ps2_resources.ext_mem.end; } |