Update of /cvsroot/linux-mips/linux/arch/mips/vr41xx/vr4111/casio-e15
In directory usw-pr-cvs1:/tmp/cvs-serv29866/casio-e15
Added Files:
Makefile prom.c setup.c
Log Message:
Add it back in, under the new structure..
--- NEW FILE: Makefile ---
# Makefile for the VR41XX-specific parts of the kernel
#
# This file is subject to the terms and conditions of the GNU General Public
# License. See the file "COPYING" in the main directory of this archive
# for more details.
#
# Copyright (C) 1999 by Bradley D. LaRonde and Mike Klar.
#
# 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) $(AFLAGS) $< -o $@
.S.o:
$(CC) $(AFLAGS) -c $< -o $@
O_TARGET := casio.o
all: casio.o
obj-y += setup.o prom.o
include $(TOPDIR)/Rules.make
--- NEW FILE: prom.c ---
/*
* arch/mips/vr4111/casio/prom.c
*
* Copyright (C) 1999 Bradley D. LaRonde and Michael Klar
*
* Copyright (C) 2001 Jim Paris <ji...@jt...>
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
*/
#include <linux/init.h>
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/mm.h>
#include <linux/bootmem.h>
#include <asm/bootinfo.h>
#include <asm/vr41xx.h>
char arcs_cmdline[CL_SIZE];
extern unsigned long probe_ram_size(void);
const char *get_system_type(void)
{
return "NEC_Vr41xx Casio Cassiopeia E15";
}
void __init prom_init(int argc, char **argv, char **envp)
{
unsigned long mem_detected;
int i;
/*
* Clear ERL and EXL in case the bootloader got us here
* through an exception
*/
write_32bit_cp0_register(CP0_STATUS, 0);
/*
* Collect args and prepare cmd_line
*/
strcpy(arcs_cmdline, "");
for (i = 1; i < argc; i++) {
strcat(arcs_cmdline, argv[i]);
if (i < (argc - 1))
strcat(arcs_cmdline, " ");
}
mips_machgroup = MACH_GROUP_NEC_VR41XX;
mips_machtype = MACH_CASIO_E15;
mem_detected = probe_ram_size();
printk("Detected %dMB of memory.\n",(int)mem_detected >> 20);
add_memory_region(0, mem_detected, BOOT_MEM_RAM);
}
void __init prom_free_prom_memory(void)
{
}
--- NEW FILE: setup.c ---
/*
* linux/arch/mips/vr4111/casio/setup.c
*
* VR41xx setup routines
*
* Copyright (C) 1999 Bradley D. LaRonde
* Copyright (C) 1999, 2000 Michael Klar
*
* Copyright 2001 MontaVista Software Inc.
* Author: js...@mv... or js...@ju...
*
* Copyright 2001 Jim Paris <ji...@jt...>
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
*/
#include <linux/config.h>
#include <linux/console.h>
#ifdef CONFIG_IDE
#include <linux/ide.h>
#endif
#include <linux/init.h>
#include <linux/delay.h>
#include <asm/time.h>
#include <asm/reboot.h>
#include <asm/vr41xx.h>
#include <asm/io.h>
#ifdef CONFIG_PM_SUSPEND_WAKEUP
#include <asm/power.h>
#endif
extern void vr41xx_restart(char *c);
extern void vr4111_standby(void);
extern void vr4111_suspend(void);
extern void vr4111_hibernate(void);
extern void vr4111_wait(void);
extern void vr4111_time_init(void);
extern void vr4111_timer_setup(void);
extern void vr4111_init_serial(void);
extern void vr41xx_xblink_led(unsigned int times, unsigned int time_on, unsigned int time_off);
#ifdef CONFIG_BLK_DEV_IDE
extern struct ide_ops std_ide_ops;
//extern struct ide_ops vr41xx_ide_ops;
#endif
struct semaphore vr41xx_dma_sem;
#ifdef CONFIG_PCMCIA
void __init put_cf_reg(unsigned char reg, unsigned char val)
{
/* PCMCIA controller (VG469) is mapped here */
outb(reg, 0x3e0);
outb(val, 0x3e1);
}
#endif
void __init bus_error_init(void)
{
}
void __init casio_e15_setup(void)
{
set_io_port_base(VR41XX_PORT_BASE);
isa_slot_offset = VR41XX_ISAMEM_BASE;
board_time_init = vr4111_time_init;
board_timer_setup = vr4111_timer_setup;
#ifdef CONFIG_PM_SUSPEND_WAKEUP
_machine_restart = do_wakeup;
#else
_machine_restart = vr41xx_restart;
#endif
_machine_halt = vr4111_hibernate;
_machine_power_off = vr4111_suspend;
cpu_wait = vr4111_wait;
#ifdef CONFIG_BLK_DEV_IDE
ide_ops = &std_ide_ops;
//ide_ops = &vr41xx_ide_ops;
#endif
#ifdef CONFIG_FB
conswitchp = &dummy_con;
#endif
#ifdef CONFIG_PCMCIA
/* Reset the PCMCIA and CF and power them off */
put_cf_reg(0x03, 0x20); /* Socket 0 */
put_cf_reg(0x43, 0x20); /* Socket 1 */
put_cf_reg(0x02, 0x00); /* Socket 0 */
put_cf_reg(0x42, 0x00); /* Socket 1 */
#endif
vr4111_init_serial();
// Insure that vr41xx_dma_sem is initialized as unlocked, even
// in the case of a failed hibernate/wakeup:
init_MUTEX(&vr41xx_dma_sem);
#ifdef CONFIG_VR41XX_LED
vr41xx_xblink_led(4, 16, 4);
#endif
}
|