diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-19 15:53:02 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-19 15:53:02 -0800 |
commit | 989b0b930218661b504bbb056b309e2c7bcdfb86 (patch) | |
tree | dea722310d814fff27b02c0e00d8243252d74be4 /arch/xtensa/platforms/iss/setup.c | |
parent | e03f1a842287480aa03732612148c0d333baca61 (diff) | |
parent | 42086cec3263b8c015ca3faa01e8190f0e3ff445 (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/czankel/xtensa-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/czankel/xtensa-2.6: (29 commits)
[XTENSA] Allow debugger to modify the WINDOWBASE register.
[XTENSA] Fix makefile to work with binutils-2.18.
[XTENSA] Fix register corruption for certain processor configurations
[XTENSA] Fix cache flush macro for D$/I$ aliasing/non-aliasing
[XTENSA] Exclude thread-global registers from the xtregs structures.
[XTENSA] Add support for the sa_restorer function
[XTENSA] Add support for configurable registers and coprocessors
[XTENSA] Clean up stat structs.
[XTENSA] Use preprocessor to generate the linker script for the ELF boot image
[XTENSA] Add missing RELOCATE_ENTRY for debug vector
[XTENSA] Add volatile keyword to asm statements accessing counter registers
[XTENSA] Remove unused code
[XTENSA] Fix modules for non-exec processor configurations
[XTENSA] Add missing cast in elf.h ELF_CORE_COPY_REGS()
[XTENSA] Fix comments regarding the number of frames to save
[XTENSA] Add missing a2 register restore in register spill routine
[XTENSA] adjust boot linker script start addresses
[XTENSA] Remove oldmask from sigcontext and fix register flush
[XTENSA] Clean up elf-gregset.
[XTENSA] Fix icache flush for cache aliasing
...
Diffstat (limited to 'arch/xtensa/platforms/iss/setup.c')
-rw-r--r-- | arch/xtensa/platforms/iss/setup.c | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/arch/xtensa/platforms/iss/setup.c b/arch/xtensa/platforms/iss/setup.c new file mode 100644 index 00000000000..f60c8cf6dfb --- /dev/null +++ b/arch/xtensa/platforms/iss/setup.c @@ -0,0 +1,110 @@ +/* + * + * arch/xtensa/platform-iss/setup.c + * + * Platform specific initialization. + * + * Authors: Chris Zankel <chris@zankel.net> + * Joe Taylor <joe@tensilica.com> + * + * Copyright 2001 - 2005 Tensilica Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + */ +#include <linux/stddef.h> +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/errno.h> +#include <linux/reboot.h> +#include <linux/kdev_t.h> +#include <linux/types.h> +#include <linux/major.h> +#include <linux/blkdev.h> +#include <linux/console.h> +#include <linux/delay.h> +#include <linux/stringify.h> +#include <linux/notifier.h> + +#include <asm/platform.h> +#include <asm/bootparam.h> + + +void __init platform_init(bp_tag_t* bootparam) +{ + +} + +void platform_halt(void) +{ + printk (" ** Called platform_halt(), looping forever! **\n"); + while (1); +} + +void platform_power_off(void) +{ + printk (" ** Called platform_power_off(), looping forever! **\n"); + while (1); +} +void platform_restart(void) +{ + /* Flush and reset the mmu, simulate a processor reset, and + * jump to the reset vector. */ + + __asm__ __volatile__("movi a2, 15\n\t" + "wsr a2, " __stringify(ICOUNTLEVEL) "\n\t" + "movi a2, 0\n\t" + "wsr a2, " __stringify(ICOUNT) "\n\t" + "wsr a2, " __stringify(IBREAKENABLE) "\n\t" + "wsr a2, " __stringify(LCOUNT) "\n\t" + "movi a2, 0x1f\n\t" + "wsr a2, " __stringify(PS) "\n\t" + "isync\n\t" + "jx %0\n\t" + : + : "a" (XCHAL_RESET_VECTOR_VADDR) + : "a2"); + + /* control never gets here */ +} + +extern void iss_net_poll(void); + +const char twirl[]="|/-\\|/-\\"; + +void platform_heartbeat(void) +{ +#if 0 + static int i = 0, j = 0; + + if (--i < 0) { + i = 99; + printk("\r%c\r", twirl[j++]); + if (j == 8) + j = 0; + } +#endif +} + + + +static int +iss_panic_event(struct notifier_block *this, unsigned long event, void *ptr) +{ + __asm__ __volatile__("movi a2, -1; simcall\n"); + return NOTIFY_DONE; +} + +static struct notifier_block iss_panic_block = { + iss_panic_event, + NULL, + 0 +}; + +void __init platform_setup(char **p_cmdline) +{ + atomic_notifier_chain_register(&panic_notifier_list, &iss_panic_block); +} |