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 /arch/v850/kernel/rte_nb85e_cb.c |
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 'arch/v850/kernel/rte_nb85e_cb.c')
-rw-r--r-- | arch/v850/kernel/rte_nb85e_cb.c | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/arch/v850/kernel/rte_nb85e_cb.c b/arch/v850/kernel/rte_nb85e_cb.c new file mode 100644 index 000000000000..990b20bffe47 --- /dev/null +++ b/arch/v850/kernel/rte_nb85e_cb.c | |||
@@ -0,0 +1,82 @@ | |||
1 | /* | ||
2 | * arch/v850/kernel/rte_nb85e_cb.c -- Midas labs RTE-V850E/NB85E-CB board | ||
3 | * | ||
4 | * Copyright (C) 2001,02,03 NEC Electronics Corporation | ||
5 | * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org> | ||
6 | * | ||
7 | * This file is subject to the terms and conditions of the GNU General | ||
8 | * Public License. See the file COPYING in the main directory of this | ||
9 | * archive for more details. | ||
10 | * | ||
11 | * Written by Miles Bader <miles@gnu.org> | ||
12 | */ | ||
13 | |||
14 | #include <linux/config.h> | ||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/init.h> | ||
17 | #include <linux/mm.h> | ||
18 | #include <linux/swap.h> | ||
19 | #include <linux/bootmem.h> | ||
20 | #include <linux/irq.h> | ||
21 | |||
22 | #include <asm/atomic.h> | ||
23 | #include <asm/page.h> | ||
24 | #include <asm/v850e.h> | ||
25 | #include <asm/rte_nb85e_cb.h> | ||
26 | |||
27 | #include "mach.h" | ||
28 | |||
29 | void __init mach_early_init (void) | ||
30 | { | ||
31 | /* Configure caching; some possible settings: | ||
32 | |||
33 | BHC = 0x0000, DCC = 0x0000 -- all caching disabled | ||
34 | BHC = 0x0040, DCC = 0x0000 -- SDRAM: icache only | ||
35 | BHC = 0x0080, DCC = 0x0C00 -- SDRAM: write-back dcache only | ||
36 | BHC = 0x00C0, DCC = 0x0C00 -- SDRAM: icache + write-back dcache | ||
37 | BHC = 0x00C0, DCC = 0x0800 -- SDRAM: icache + write-thru dcache | ||
38 | |||
39 | We can only cache SDRAM (we can't use cache SRAM because it's in | ||
40 | the same memory region as the on-chip RAM and I/O space). | ||
41 | |||
42 | Unfortunately, the dcache seems to be buggy, so we only use the | ||
43 | icache for now. */ | ||
44 | v850e_cache_enable (0x0040 /*BHC*/, 0x0003 /*ICC*/, 0x0000 /*DCC*/); | ||
45 | |||
46 | rte_cb_early_init (); | ||
47 | } | ||
48 | |||
49 | void __init mach_get_physical_ram (unsigned long *ram_start, | ||
50 | unsigned long *ram_len) | ||
51 | { | ||
52 | /* We just use SDRAM here. */ | ||
53 | *ram_start = SDRAM_ADDR; | ||
54 | *ram_len = SDRAM_SIZE; | ||
55 | } | ||
56 | |||
57 | void mach_gettimeofday (struct timespec *tv) | ||
58 | { | ||
59 | tv->tv_sec = 0; | ||
60 | tv->tv_nsec = 0; | ||
61 | } | ||
62 | |||
63 | /* Called before configuring an on-chip UART. */ | ||
64 | void rte_nb85e_cb_uart_pre_configure (unsigned chan, | ||
65 | unsigned cflags, unsigned baud) | ||
66 | { | ||
67 | /* The RTE-NB85E-CB connects some general-purpose I/O pins on the | ||
68 | CPU to the RTS/CTS lines the UART's serial connection, as follows: | ||
69 | P00 = CTS (in), P01 = DSR (in), P02 = RTS (out), P03 = DTR (out). */ | ||
70 | |||
71 | TEG_PORT0_PM = 0x03; /* P00 and P01 inputs, P02 and P03 outputs */ | ||
72 | TEG_PORT0_IO = 0x03; /* Accept input */ | ||
73 | |||
74 | /* Do pre-configuration for the actual UART. */ | ||
75 | teg_uart_pre_configure (chan, cflags, baud); | ||
76 | } | ||
77 | |||
78 | void __init mach_init_irqs (void) | ||
79 | { | ||
80 | teg_init_irqs (); | ||
81 | rte_cb_init_irqs (); | ||
82 | } | ||