2 * Setup pointers to hardware dependent routines.
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
8 * Copyright (C) 1996, 1997 by Ralf Baechle
9 * Copyright (C) 2001, 2002, 2003 by Liam Davies (ldavies@agile.tv)
13 #include <linux/config.h>
14 #include <linux/interrupt.h>
15 #include <linux/pci.h>
16 #include <linux/mc146818rtc.h>
17 #include <linux/init.h>
18 #include <linux/ide.h>
20 #include <asm/bootinfo.h>
24 #include <asm/processor.h>
25 #include <asm/reboot.h>
26 #include <asm/gt64120/gt64120.h>
28 #include <asm/cobalt/cobalt.h>
30 extern void cobalt_machine_restart(char *command);
31 extern void cobalt_machine_halt(void);
32 extern void cobalt_machine_power_off(void);
34 extern struct rtc_ops std_rtc_ops;
35 extern struct ide_ops std_ide_ops;
38 char arcs_cmdline[CL_SIZE] = {
39 "console=ttyS0,115200 "
43 #ifdef CONFIG_ROOT_NFS
50 const char *get_system_type(void)
56 static void __init cobalt_time_init(void)
58 rtc_ops = &std_rtc_ops;
61 static void __init cobalt_timer_setup(struct irqaction *irq)
63 /* Load timer value for 150 Hz */
64 GALILEO_OUTL(500000, GT_TC0_OFS);
66 /* Register our timer interrupt */
67 setup_irq(COBALT_TIMER_IRQ, irq);
69 /* Enable timer ints */
70 GALILEO_OUTL((GALILEO_ENTC0 | GALILEO_SELTC0), GT_TC_CONTROL_OFS);
71 /* Unmask timer int */
72 GALILEO_OUTL(0x100, GT_INTRMASK_OFS);
76 void __init cobalt_setup(void)
79 _machine_restart = cobalt_machine_restart;
80 _machine_halt = cobalt_machine_halt;
81 _machine_power_off = cobalt_machine_power_off;
83 board_time_init = cobalt_time_init;
84 board_timer_setup = cobalt_timer_setup;
86 #ifdef CONFIG_BLK_DEV_IDE
87 ide_ops = &std_ide_ops;
90 set_io_port_base(KSEG1ADDR(0x10000000));
93 * This is a prom style console. We just poke at the
94 * UART to make it talk.
95 * Only use this console if you really screw up and can't
96 * get to the stage of setting up a real serial console.
98 /*ns16550_setup_console();*/
101 /* Prom init. We read our one and only communication with the
102 firmware. Grab the amount of installed memory */
103 void __init prom_init(int argc)
105 mips_machgroup = MACH_GROUP_COBALT;
107 add_memory_region(0x0, argc & 0x7fffffff, BOOT_MEM_RAM);
110 void __init prom_free_prom_memory(void)