Update of /cvsroot/linux-mips/linux/arch/mips/vr41xx/vr4111/clio-1000
In directory usw-pr-cvs1:/tmp/cvs-serv29866/clio-1000
Added Files:
Makefile prom.c setup.c
Log Message:
Add it back in, under the new structure..
--- NEW FILE: Makefile ---
#
# Makefile for the Vadem Clio 1000 / Sharp Mobilon Tripad PV-6000
#
# 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 := clio-1000.o
all: clio-1000.o
obj-y := setup.o prom.o
include $(TOPDIR)/Rules.make
--- NEW FILE: prom.c ---
/*
* arch/mips/vr4111/clio-1000/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 Vadem Clio 1000";
}
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_VADEM_CLIO_1000;
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/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>
extern void vr41xx_restart(char *c);
extern void vr4111_hibernate(void);
extern void vr4111_wait(void);
extern void vr4111_time_init(void);
extern void vr4111_timer_setup(void);
#ifdef CONFIG_IDE
extern struct ide_ops std_ide_ops;
#endif
#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 clio_1000_setup(void)
{
unsigned short val;
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;
_machine_restart = vr41xx_restart;
_machine_halt = vr4111_hibernate;
_machine_power_off = vr4111_hibernate;
cpu_wait = vr4111_wait;
#ifdef CONFIG_IDE
ide_ops = &std_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
/* Clio-specific RS232 enable */
*VR41XX_GIUPODATL |= VR41XX_GIUPODATL_GPIO42;
vr4111_init_serial();
/* Turn the green LED on (debug) */
*VR41XX_GIUPODATH = 0;
*VR41XX_GIUPODATH = 0x302;
*VR41XX_GIUPODATH = 0x303;
*VR41XX_GIUPODATH = 0;
}
|