diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-arm/arch-ixp2000/system.h |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'include/asm-arm/arch-ixp2000/system.h')
-rw-r--r-- | include/asm-arm/arch-ixp2000/system.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/include/asm-arm/arch-ixp2000/system.h b/include/asm-arm/arch-ixp2000/system.h new file mode 100644 index 000000000000..4f489cc0dfa5 --- /dev/null +++ b/include/asm-arm/arch-ixp2000/system.h | |||
@@ -0,0 +1,54 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-ixp2000/system.h | ||
3 | * | ||
4 | * Copyright (C) 2002 Intel Corp. | ||
5 | * Copyricht (C) 2003-2005 MontaVista Software, Inc. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #include <asm/hardware.h> | ||
13 | #include <asm/mach-types.h> | ||
14 | |||
15 | static inline void arch_idle(void) | ||
16 | { | ||
17 | cpu_do_idle(); | ||
18 | } | ||
19 | |||
20 | static inline void arch_reset(char mode) | ||
21 | { | ||
22 | local_irq_disable(); | ||
23 | |||
24 | /* | ||
25 | * Reset flash banking register so that we are pointing at | ||
26 | * RedBoot bank. | ||
27 | */ | ||
28 | if (machine_is_ixdp2401()) { | ||
29 | *IXDP2X01_CPLD_FLASH_REG = ((0 >> IXDP2X01_FLASH_WINDOW_BITS) | ||
30 | | IXDP2X01_CPLD_FLASH_INTERN); | ||
31 | *IXDP2X01_CPLD_RESET_REG = 0xffffffff; | ||
32 | } | ||
33 | |||
34 | /* | ||
35 | * On IXDP2801 we need to write this magic sequence to the CPLD | ||
36 | * to cause a complete reset of the CPU and all external devices | ||
37 | * and moves the flash bank register back to 0. | ||
38 | */ | ||
39 | if (machine_is_ixdp2801()) { | ||
40 | unsigned long reset_reg = *IXDP2X01_CPLD_RESET_REG; | ||
41 | reset_reg = 0x55AA0000 | (reset_reg & 0x0000FFFF); | ||
42 | *IXDP2X01_CPLD_RESET_REG = reset_reg; | ||
43 | mb(); | ||
44 | *IXDP2X01_CPLD_RESET_REG = 0x80000000; | ||
45 | } | ||
46 | |||
47 | /* | ||
48 | * We do a reset all if we are PCI master. We could be a slave and we | ||
49 | * don't want to do anything funky on the PCI bus. | ||
50 | */ | ||
51 | if (*IXP2000_STRAP_OPTIONS & CFG_PCI_BOOT_HOST) { | ||
52 | *(IXP2000_RESET0) |= (RSTALL); | ||
53 | } | ||
54 | } | ||