[PATCH] RPC: separate TCP and UDP socket write paths
[linux-2.6/verdex.git] / arch / xtensa / platform-iss / setup.c
blob2e6dcbf0cc04f3bda7b447239f60ccb5f50215c5
1 /*
3 * arch/xtensa/platform-iss/setup.c
5 * Platform specific initialization.
7 * Authors: Chris Zankel <chris@zankel.net>
8 * Joe Taylor <joe@tensilica.com>
10 * Copyright 2001 - 2005 Tensilica Inc.
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version.
18 #include <linux/config.h>
19 #include <linux/stddef.h>
20 #include <linux/kernel.h>
21 #include <linux/init.h>
22 #include <linux/errno.h>
23 #include <linux/reboot.h>
24 #include <linux/pci.h>
25 #include <linux/kdev_t.h>
26 #include <linux/types.h>
27 #include <linux/major.h>
28 #include <linux/blkdev.h>
29 #include <linux/console.h>
30 #include <linux/delay.h>
31 #include <linux/stringify.h>
32 #include <linux/notifier.h>
34 #include <asm/platform.h>
35 #include <asm/bootparam.h>
38 void __init platform_init(bp_tag_t* bootparam)
43 void platform_halt(void)
45 printk (" ** Called platform_halt(), looping forever! **\n");
46 while (1);
49 void platform_power_off(void)
51 printk (" ** Called platform_power_off(), looping forever! **\n");
52 while (1);
54 void platform_restart(void)
56 /* Flush and reset the mmu, simulate a processor reset, and
57 * jump to the reset vector. */
59 __asm__ __volatile__("movi a2, 15\n\t"
60 "wsr a2, " __stringify(ICOUNTLEVEL) "\n\t"
61 "movi a2, 0\n\t"
62 "wsr a2, " __stringify(ICOUNT) "\n\t"
63 "wsr a2, " __stringify(IBREAKENABLE) "\n\t"
64 "wsr a2, " __stringify(LCOUNT) "\n\t"
65 "movi a2, 0x1f\n\t"
66 "wsr a2, " __stringify(PS) "\n\t"
67 "isync\n\t"
68 "jx %0\n\t"
70 : "a" (XCHAL_RESET_VECTOR_VADDR)
71 : "a2");
73 /* control never gets here */
76 extern void iss_net_poll(void);
78 const char twirl[]="|/-\\|/-\\";
80 void platform_heartbeat(void)
82 #if 0
83 static int i = 0, j = 0;
85 if (--i < 0) {
86 i = 99;
87 printk("\r%c\r", twirl[j++]);
88 if (j == 8)
89 j = 0;
91 #endif
96 static int
97 iss_panic_event(struct notifier_block *this, unsigned long event, void *ptr)
99 __asm__ __volatile__("movi a2, -1; simcall\n");
100 return NOTIFY_DONE;
103 static struct notifier_block iss_panic_block = {
104 iss_panic_event,
105 NULL,
109 void __init platform_setup(char **p_cmdline)
111 notifier_chain_register(&panic_notifier_list, &iss_panic_block);