diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1999-09-28 22:25:29 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1999-09-28 22:25:29 +0000 |
commit | 0ae8dceaebe3659ee0c3352c08125f403e77ebca (patch) | |
tree | 5085c389f09da78182b899d19fe1068b619a69dd /arch/mips64/sgi-ip22 | |
parent | 273767781288c35c9d679e908672b9996cda4c34 (diff) |
Merge with 2.3.10.
Diffstat (limited to 'arch/mips64/sgi-ip22')
-rw-r--r-- | arch/mips64/sgi-ip22/ip22-int.c | 27 | ||||
-rw-r--r-- | arch/mips64/sgi-ip22/ip22-reset.c | 36 | ||||
-rw-r--r-- | arch/mips64/sgi-ip22/ip22-setup.c | 50 | ||||
-rw-r--r-- | arch/mips64/sgi-ip22/ip22-timer.c | 2 | ||||
-rw-r--r-- | arch/mips64/sgi-ip22/system.c | 10 |
5 files changed, 59 insertions, 66 deletions
diff --git a/arch/mips64/sgi-ip22/ip22-int.c b/arch/mips64/sgi-ip22/ip22-int.c index c6aa35747..e6fe49354 100644 --- a/arch/mips64/sgi-ip22/ip22-int.c +++ b/arch/mips64/sgi-ip22/ip22-int.c @@ -49,6 +49,7 @@ static char lc2msk_to_irqnr[256]; static char lc3msk_to_irqnr[256]; extern asmlinkage void indyIRQ(void); +int (*irq_cannonicalize)(int irq); #ifdef CONFIG_REMOTE_DEBUG extern void rs_kgdb_hook(int); @@ -416,19 +417,6 @@ void free_irq(unsigned int irq, void *dev_id) printk("Trying to free free IRQ%d\n",irq); } -int (*irq_cannonicalize)(int irq); - -static int indy_irq_cannonicalize(int irq) -{ - return irq; /* Sane hardware, sane code ... */ -} - -void __init init_IRQ(void) -{ - irq_cannonicalize = indy_irq_cannonicalize; - irq_setup(); -} - void indy_local0_irqdispatch(struct pt_regs *regs) { struct irqaction *action; @@ -502,7 +490,7 @@ int probe_irq_off (unsigned long irqs) return 0; } -void __init sgint_init(void) +static inline void sgint_init(void) { int i; #ifdef CONFIG_REMOTE_DEBUG @@ -606,3 +594,14 @@ void __init sgint_init(void) } #endif } + +static int indy_irq_cannonicalize(int irq) +{ + return irq; /* Sane hardware, sane code ... */ +} + +void __init init_IRQ(void) +{ + irq_cannonicalize = indy_irq_cannonicalize; + sgint_init(); +} diff --git a/arch/mips64/sgi-ip22/ip22-reset.c b/arch/mips64/sgi-ip22/ip22-reset.c index dc4fd0936..cd521291f 100644 --- a/arch/mips64/sgi-ip22/ip22-reset.c +++ b/arch/mips64/sgi-ip22/ip22-reset.c @@ -38,26 +38,26 @@ static unsigned char sgi_volume; static struct timer_list power_timer, blink_timer, debounce_timer, volume_timer; static int shuting_down, has_paniced; -static void sgi_machine_restart(char *command) __attribute__((noreturn)); -static void sgi_machine_halt(void) __attribute__((noreturn)); -static void sgi_machine_power_off(void) __attribute__((noreturn)); +static void ip22_machine_restart(char *command) __attribute__((noreturn)); +static void ip22_machine_halt(void) __attribute__((noreturn)); +static void ip22_machine_power_off(void) __attribute__((noreturn)); /* XXX How to pass the reboot command to the firmware??? */ -static void sgi_machine_restart(char *command) +static void ip22_machine_restart(char *command) { if (shuting_down) - sgi_machine_power_off(); - prom_reboot(); + ip22_machine_power_off(); + ArcReboot(); } -static void sgi_machine_halt(void) +static void ip22_machine_halt(void) { if (shuting_down) - sgi_machine_power_off(); - prom_imode(); + ip22_machine_power_off(); + ArcEnterInteractiveMode(); } -static void sgi_machine_power_off(void) +static void ip22_machine_power_off(void) { struct indy_clock *clock = (struct indy_clock *)INDY_CLOCK_REGS; @@ -79,7 +79,7 @@ static void sgi_machine_power_off(void) static void power_timeout(unsigned long data) { - sgi_machine_power_off(); + ip22_machine_power_off(); } static void blink_timeout(unsigned long data) @@ -106,7 +106,7 @@ static void debounce(unsigned long data) } if (has_paniced) - prom_reboot(); + ArcReboot(); enable_irq(9); } @@ -118,7 +118,7 @@ static inline void power_button(void) if (shuting_down || kill_proc(1, SIGINT, 1)) { /* No init process or button pressed twice. */ - sgi_machine_power_off(); + ip22_machine_power_off(); } shuting_down = 1; @@ -131,7 +131,7 @@ static inline void power_button(void) add_timer(&power_timer); } -void inline sgi_volume_set(unsigned char volume) +void inline ip22_volume_set(unsigned char volume) { sgi_volume = volume; @@ -139,7 +139,7 @@ void inline sgi_volume_set(unsigned char volume) hpc3c0->pbus_extregs[2][1] = sgi_volume; } -void inline sgi_volume_get(unsigned char *volume) +void inline ip22_volume_get(unsigned char *volume) { *volume = sgi_volume; } @@ -235,9 +235,9 @@ void ip22_reboot_setup(void) return; setup_done = 1; - _machine_restart = sgi_machine_restart; - _machine_halt = sgi_machine_halt; - _machine_power_off = sgi_machine_power_off; + _machine_restart = ip22_machine_restart; + _machine_halt = ip22_machine_halt; + _machine_power_off = ip22_machine_power_off; request_irq(9, panel_int, 0, "Front Panel", NULL); init_timer(&blink_timer); diff --git a/arch/mips64/sgi-ip22/ip22-setup.c b/arch/mips64/sgi-ip22/ip22-setup.c index 6657d0592..c3c41c387 100644 --- a/arch/mips64/sgi-ip22/ip22-setup.c +++ b/arch/mips64/sgi-ip22/ip22-setup.c @@ -34,47 +34,47 @@ #include <asm/sgi/sgint23.h> extern struct rtc_ops indy_rtc_ops; -void indy_reboot_setup(void); -void sgi_volume_set(unsigned char); +extern void ip22_reboot_setup(void); +extern void ip22_volume_set(unsigned char); #define sgi_kh ((struct hpc_keyb *) (KSEG1 + 0x1fbd9800 + 64)) #define KBD_STAT_IBF 0x02 /* Keyboard input buffer full */ -static void sgi_request_region(void) +static void ip22_request_region(void) { /* No I/O ports are being used on the Indy. */ } -static int sgi_request_irq(void (*handler)(int, void *, struct pt_regs *)) +static int ip22_request_irq(void (*handler)(int, void *, struct pt_regs *)) { /* Dirty hack, this get's called as a callback from the keyboard driver. We piggyback the initialization of the front panel button handling on it even though they're technically not related with the keyboard driver in any way. Doing it from indy_setup wouldn't work since kmalloc isn't initialized yet. */ - indy_reboot_setup(); + ip22_reboot_setup(); return request_irq(SGI_KEYBOARD_IRQ, handler, 0, "keyboard", NULL); } -static int sgi_aux_request_irq(void (*handler)(int, void *, struct pt_regs *)) +static int ip22_aux_request_irq(void (*handler)(int, void *, struct pt_regs *)) { /* Nothing to do, interrupt is shared with the keyboard hw */ return 0; } -static void sgi_aux_free_irq(void) +static void ip22_aux_free_irq(void) { /* Nothing to do, interrupt is shared with the keyboard hw */ } -static unsigned char sgi_read_input(void) +static unsigned char ip22_read_input(void) { return sgi_kh->data; } -static void sgi_write_output(unsigned char val) +static void ip22_write_output(unsigned char val) { int status; @@ -84,7 +84,7 @@ static void sgi_write_output(unsigned char val) sgi_kh->data = val; } -static void sgi_write_command(unsigned char val) +static void ip22_write_command(unsigned char val) { int status; @@ -94,37 +94,30 @@ static void sgi_write_command(unsigned char val) sgi_kh->command = val; } -static unsigned char sgi_read_status(void) +static unsigned char ip22_read_status(void) { return sgi_kh->command; } struct kbd_ops sgi_kbd_ops = { - sgi_request_region, - sgi_request_irq, + ip22_request_region, + ip22_request_irq, - sgi_aux_request_irq, - sgi_aux_free_irq, + ip22_aux_request_irq, + ip22_aux_free_irq, - sgi_read_input, - sgi_write_output, - sgi_write_command, - sgi_read_status + ip22_read_input, + ip22_write_output, + ip22_write_command, + ip22_read_status }; -static void __init sgi_irq_setup(void) -{ - sgint_init(); -} - void __init ip22_setup(void) { #ifdef CONFIG_SERIAL_CONSOLE char *ctype; #endif - irq_setup = sgi_irq_setup; - /* Init the INDY HPC I/O controller. Need to call this before * fucking with the memory controller because it needs to know the * boardID and whether this is a Guiness or a FullHouse machine. @@ -142,7 +135,7 @@ void __init ip22_setup(void) * graphics console, it is set to "d" for the first serial * line and "d2" for the second serial line. */ - ctype = prom_getenv("console"); + ctype = ArcArcGetEnvironmentVariable("console"); if(*ctype == 'd') { if(*(ctype+1)=='2') console_setup ("ttyS1"); @@ -154,7 +147,8 @@ void __init ip22_setup(void) console_setup("ttyS0"); #endif - sgi_volume_set(simple_strtoul(prom_getenv("volume"), NULL, 10)); + ip22_volume_set(simple_strtoul(ArcGetEnvironmentVariable("volume"), + NULL, 10)); #ifdef CONFIG_VT #ifdef CONFIG_SGI_NEWPORT_CONSOLE diff --git a/arch/mips64/sgi-ip22/ip22-timer.c b/arch/mips64/sgi-ip22/ip22-timer.c index c22651b86..3302ba1a7 100644 --- a/arch/mips64/sgi-ip22/ip22-timer.c +++ b/arch/mips64/sgi-ip22/ip22-timer.c @@ -268,7 +268,7 @@ void indy_8254timer_irq(void) kstat.irqs[0][irq]++; printk("indy_8254timer_irq: Whoops, should not have gotten this IRQ\n"); prom_getchar(); - prom_imode(); + ArcEnterInteractiveMode(); hardirq_exit(cpu); } diff --git a/arch/mips64/sgi-ip22/system.c b/arch/mips64/sgi-ip22/system.c index 69237a9f5..bd2a313f0 100644 --- a/arch/mips64/sgi-ip22/system.c +++ b/arch/mips64/sgi-ip22/system.c @@ -66,10 +66,10 @@ void __init sgi_sysinit(void) /* The root component tells us what machine architecture we * have here. */ - p = prom_getchild(PROM_NULL_COMPONENT); + p = ArcGetChild(PROM_NULL_COMPONENT); /* Now scan for cpu(s). */ - toplev = p = prom_getchild(p); + toplev = p = ArcGetChild(p); while(p) { int ncpus = 0; @@ -84,7 +84,7 @@ void __init sgi_sysinit(void) cpup = p; cputype = string_to_cpu(cpup->iname); } - p = prom_getsibling(p); + p = ArcGetPeer(p); } if(cputype == -1) { prom_printf("\nYeee, could not find cpu ARCS component\n"); @@ -92,7 +92,7 @@ void __init sgi_sysinit(void) prom_getchar(); romvec->imode(); } - p = prom_getchild(cpup); + p = ArcGetChild(cpup); while(p) { switch(p->class) { case processor: @@ -129,7 +129,7 @@ void __init sgi_sysinit(void) default: break; }; - p = prom_getsibling(p); + p = ArcGetPeer(p); } printk("\n"); } |