aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris
diff options
context:
space:
mode:
authorJesper Nilsson <jespern@axis.com>2012-06-20 11:17:10 -0400
committerJesper Nilsson <jespern@axis.com>2012-10-03 03:57:01 -0400
commitd75d806cbbfb9c775e87779cd281c9c408c7aba3 (patch)
tree64abfceb6e6a084c90cf7b2be60c72fc5935de84 /arch/cris
parent227c6fc296cb84577a4ec54b3c682d48a9ca09b3 (diff)
CRIS: Remove VCS simulator specific code
The VCS simulator was a tool used in the development of the chip and is no longer used or necessary. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Diffstat (limited to 'arch/cris')
-rw-r--r--arch/cris/Kconfig5
-rw-r--r--arch/cris/arch-v32/drivers/axisflashmap.c29
-rw-r--r--arch/cris/arch-v32/kernel/head.S58
-rw-r--r--arch/cris/arch-v32/kernel/kgdb.c14
-rw-r--r--arch/cris/arch-v32/mach-a3/Makefile2
-rw-r--r--arch/cris/arch-v32/mach-a3/vcs_hook.c103
-rw-r--r--arch/cris/arch-v32/mach-a3/vcs_hook.h58
-rw-r--r--arch/cris/arch-v32/mach-fs/Makefile2
-rw-r--r--arch/cris/arch-v32/mach-fs/vcs_hook.c100
-rw-r--r--arch/cris/arch-v32/mach-fs/vcs_hook.h42
-rw-r--r--arch/cris/arch-v32/mm/init.c8
-rw-r--r--arch/cris/include/arch-v32/arch/page.h5
-rw-r--r--arch/cris/include/arch-v32/arch/processor.h6
-rw-r--r--arch/cris/include/arch-v32/mach-fs/mach/startup.inc6
14 files changed, 3 insertions, 435 deletions
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig
index bb344650a14..ca038afb8b5 100644
--- a/arch/cris/Kconfig
+++ b/arch/cris/Kconfig
@@ -137,11 +137,6 @@ config CRIS_MACH_ARTPEC3
137 137
138endchoice 138endchoice
139 139
140config ETRAX_VCS_SIM
141 bool "VCS Simulator"
142 help
143 Setup hardware to be run in the VCS simulator.
144
145config ETRAX_ARCH_V10 140config ETRAX_ARCH_V10
146 bool 141 bool
147 default y if ETRAX100LX || ETRAX100LX_V2 142 default y if ETRAX100LX || ETRAX100LX_V2
diff --git a/arch/cris/arch-v32/drivers/axisflashmap.c b/arch/cris/arch-v32/drivers/axisflashmap.c
index b34438e026b..1b6ad624720 100644
--- a/arch/cris/arch-v32/drivers/axisflashmap.c
+++ b/arch/cris/arch-v32/drivers/axisflashmap.c
@@ -329,7 +329,6 @@ static int __init init_axis_flash(void)
329 } 329 }
330#endif 330#endif
331 331
332#ifndef CONFIG_ETRAX_VCS_SIM
333 main_mtd = flash_probe(); 332 main_mtd = flash_probe();
334 if (main_mtd) 333 if (main_mtd)
335 printk(KERN_INFO "%s: 0x%08x bytes of NOR flash memory.\n", 334 printk(KERN_INFO "%s: 0x%08x bytes of NOR flash memory.\n",
@@ -603,34 +602,7 @@ static int __init init_axis_flash(void)
603 "partition %d\n", part); 602 "partition %d\n", part);
604 } 603 }
605 } 604 }
606#endif /* CONFIG_EXTRAX_VCS_SIM */
607 605
608#ifdef CONFIG_ETRAX_VCS_SIM
609 /* For simulator, always use a RAM partition.
610 * The rootfs will be found after the kernel in RAM,
611 * with romfs_start and romfs_end indicating location and size.
612 */
613 struct mtd_info *mtd_ram;
614
615 mtd_ram = kmalloc(sizeof(struct mtd_info), GFP_KERNEL);
616 if (!mtd_ram) {
617 panic("axisflashmap: Couldn't allocate memory for "
618 "mtd_info!\n");
619 }
620
621 printk(KERN_INFO "axisflashmap: Adding RAM partition for romfs, "
622 "at %u, size %u\n",
623 (unsigned) romfs_start, (unsigned) romfs_length);
624
625 err = mtdram_init_device(mtd_ram, (void *)romfs_start,
626 romfs_length, "romfs");
627 if (err) {
628 panic("axisflashmap: Could not initialize MTD RAM "
629 "device!\n");
630 }
631#endif /* CONFIG_EXTRAX_VCS_SIM */
632
633#ifndef CONFIG_ETRAX_VCS_SIM
634 if (aux_mtd) { 606 if (aux_mtd) {
635 aux_partition.size = aux_mtd->size; 607 aux_partition.size = aux_mtd->size;
636 err = mtd_device_register(aux_mtd, &aux_partition, 1); 608 err = mtd_device_register(aux_mtd, &aux_partition, 1);
@@ -639,7 +611,6 @@ static int __init init_axis_flash(void)
639 "aux mtd device!\n"); 611 "aux mtd device!\n");
640 612
641 } 613 }
642#endif /* CONFIG_EXTRAX_VCS_SIM */
643 614
644 return err; 615 return err;
645} 616}
diff --git a/arch/cris/arch-v32/kernel/head.S b/arch/cris/arch-v32/kernel/head.S
index 5d502b9ab56..51e34165ece 100644
--- a/arch/cris/arch-v32/kernel/head.S
+++ b/arch/cris/arch-v32/kernel/head.S
@@ -36,13 +36,6 @@
36 .global nand_boot 36 .global nand_boot
37 .global swapper_pg_dir 37 .global swapper_pg_dir
38 38
39 ;; Dummy section to make it bootable with current VCS simulator
40#ifdef CONFIG_ETRAX_VCS_SIM
41 .section ".boot", "ax"
42 ba tstart
43 nop
44#endif
45
46 .text 39 .text
47tstart: 40tstart:
48 ;; This is the entry point of the kernel. The CPU is currently in 41 ;; This is the entry point of the kernel. The CPU is currently in
@@ -75,17 +68,10 @@ secondary_cpu_entry: /* Entry point for secondary CPUs */
75 | REG_FIELD(mmu, rw_mm_kbase_hi, base_c, 4) \ 68 | REG_FIELD(mmu, rw_mm_kbase_hi, base_c, 4) \
76 | REG_FIELD(mmu, rw_mm_kbase_hi, base_d, 5) \ 69 | REG_FIELD(mmu, rw_mm_kbase_hi, base_d, 5) \
77 | REG_FIELD(mmu, rw_mm_kbase_hi, base_b, 0xb), $r0 70 | REG_FIELD(mmu, rw_mm_kbase_hi, base_b, 0xb), $r0
78#elif !defined(CONFIG_ETRAX_VCS_SIM)
79 move.d REG_FIELD(mmu, rw_mm_kbase_hi, base_e, 8) \
80 | REG_FIELD(mmu, rw_mm_kbase_hi, base_c, 4) \
81 | REG_FIELD(mmu, rw_mm_kbase_hi, base_b, 0xb), $r0
82#else 71#else
83 ;; Map the virtual DRAM to the RW eprom area at address 0.
84 ;; Also map 0xa for the hook calls,
85 move.d REG_FIELD(mmu, rw_mm_kbase_hi, base_e, 8) \ 72 move.d REG_FIELD(mmu, rw_mm_kbase_hi, base_e, 8) \
86 | REG_FIELD(mmu, rw_mm_kbase_hi, base_c, 4) \ 73 | REG_FIELD(mmu, rw_mm_kbase_hi, base_c, 4) \
87 | REG_FIELD(mmu, rw_mm_kbase_hi, base_b, 0xb) \ 74 | REG_FIELD(mmu, rw_mm_kbase_hi, base_b, 0xb), $r0
88 | REG_FIELD(mmu, rw_mm_kbase_hi, base_a, 0xa), $r0
89#endif 75#endif
90 76
91 ;; Temporary map of 0x40 -> 0x40 and 0x00 -> 0x00. 77 ;; Temporary map of 0x40 -> 0x40 and 0x00 -> 0x00.
@@ -126,27 +112,6 @@ secondary_cpu_entry: /* Entry point for secondary CPUs */
126 | REG_STATE(mmu, rw_mm_cfg, seg_2, page) \ 112 | REG_STATE(mmu, rw_mm_cfg, seg_2, page) \
127 | REG_STATE(mmu, rw_mm_cfg, seg_1, page) \ 113 | REG_STATE(mmu, rw_mm_cfg, seg_1, page) \
128 | REG_STATE(mmu, rw_mm_cfg, seg_0, linear), $r2 114 | REG_STATE(mmu, rw_mm_cfg, seg_0, linear), $r2
129#elif !defined(CONFIG_ETRAX_VCS_SIM)
130 move.d REG_STATE(mmu, rw_mm_cfg, we, on) \
131 | REG_STATE(mmu, rw_mm_cfg, acc, on) \
132 | REG_STATE(mmu, rw_mm_cfg, ex, on) \
133 | REG_STATE(mmu, rw_mm_cfg, inv, on) \
134 | REG_STATE(mmu, rw_mm_cfg, seg_f, linear) \
135 | REG_STATE(mmu, rw_mm_cfg, seg_e, linear) \
136 | REG_STATE(mmu, rw_mm_cfg, seg_d, page) \
137 | REG_STATE(mmu, rw_mm_cfg, seg_c, linear) \
138 | REG_STATE(mmu, rw_mm_cfg, seg_b, linear) \
139 | REG_STATE(mmu, rw_mm_cfg, seg_a, page) \
140 | REG_STATE(mmu, rw_mm_cfg, seg_9, page) \
141 | REG_STATE(mmu, rw_mm_cfg, seg_8, page) \
142 | REG_STATE(mmu, rw_mm_cfg, seg_7, page) \
143 | REG_STATE(mmu, rw_mm_cfg, seg_6, page) \
144 | REG_STATE(mmu, rw_mm_cfg, seg_5, page) \
145 | REG_STATE(mmu, rw_mm_cfg, seg_4, linear) \
146 | REG_STATE(mmu, rw_mm_cfg, seg_3, page) \
147 | REG_STATE(mmu, rw_mm_cfg, seg_2, page) \
148 | REG_STATE(mmu, rw_mm_cfg, seg_1, page) \
149 | REG_STATE(mmu, rw_mm_cfg, seg_0, linear), $r2
150#else 115#else
151 move.d REG_STATE(mmu, rw_mm_cfg, we, on) \ 116 move.d REG_STATE(mmu, rw_mm_cfg, we, on) \
152 | REG_STATE(mmu, rw_mm_cfg, acc, on) \ 117 | REG_STATE(mmu, rw_mm_cfg, acc, on) \
@@ -157,7 +122,7 @@ secondary_cpu_entry: /* Entry point for secondary CPUs */
157 | REG_STATE(mmu, rw_mm_cfg, seg_d, page) \ 122 | REG_STATE(mmu, rw_mm_cfg, seg_d, page) \
158 | REG_STATE(mmu, rw_mm_cfg, seg_c, linear) \ 123 | REG_STATE(mmu, rw_mm_cfg, seg_c, linear) \
159 | REG_STATE(mmu, rw_mm_cfg, seg_b, linear) \ 124 | REG_STATE(mmu, rw_mm_cfg, seg_b, linear) \
160 | REG_STATE(mmu, rw_mm_cfg, seg_a, linear) \ 125 | REG_STATE(mmu, rw_mm_cfg, seg_a, page) \
161 | REG_STATE(mmu, rw_mm_cfg, seg_9, page) \ 126 | REG_STATE(mmu, rw_mm_cfg, seg_9, page) \
162 | REG_STATE(mmu, rw_mm_cfg, seg_8, page) \ 127 | REG_STATE(mmu, rw_mm_cfg, seg_8, page) \
163 | REG_STATE(mmu, rw_mm_cfg, seg_7, page) \ 128 | REG_STATE(mmu, rw_mm_cfg, seg_7, page) \
@@ -226,7 +191,6 @@ master_cpu:
226 move.d secondary_cpu_entry, $r1 191 move.d secondary_cpu_entry, $r1
227 move.d $r1, [$r0] 192 move.d $r1, [$r0]
228#endif 193#endif
229#ifndef CONFIG_ETRAX_VCS_SIM
230 ; Check if starting from DRAM (network->RAM boot or unpacked 194 ; Check if starting from DRAM (network->RAM boot or unpacked
231 ; compressed kernel), or directly from flash. 195 ; compressed kernel), or directly from flash.
232 lapcq ., $r0 196 lapcq ., $r0
@@ -234,7 +198,6 @@ master_cpu:
234 cmp.d 0x10000, $r0 ; Arbitrary, something above this code. 198 cmp.d 0x10000, $r0 ; Arbitrary, something above this code.
235 blo _inflash0 199 blo _inflash0
236 nop 200 nop
237#endif
238 201
239 jump _inram ; Jump to cached RAM. 202 jump _inram ; Jump to cached RAM.
240 nop 203 nop
@@ -326,7 +289,6 @@ move_cramfs:
326 move.d romfs_length, $r1 289 move.d romfs_length, $r1
327 move.d $r0, [$r1] 290 move.d $r0, [$r1]
328 291
329#ifndef CONFIG_ETRAX_VCS_SIM
330 ;; The kernel could have been unpacked to DRAM by the loader, but 292 ;; The kernel could have been unpacked to DRAM by the loader, but
331 ;; the cramfs image could still be in the flash immediately 293 ;; the cramfs image could still be in the flash immediately
332 ;; following the compressed kernel image. The loader passes the address 294 ;; following the compressed kernel image. The loader passes the address
@@ -335,10 +297,6 @@ move_cramfs:
335 cmp.d 0x0ffffff8, $r9 297 cmp.d 0x0ffffff8, $r9
336 bhs _no_romfs_in_flash ; R9 points outside the flash area. 298 bhs _no_romfs_in_flash ; R9 points outside the flash area.
337 nop 299 nop
338#else
339 ba _no_romfs_in_flash
340 nop
341#endif
342 ;; cramfs rootfs might to be in flash. Check for it. 300 ;; cramfs rootfs might to be in flash. Check for it.
343 move.d [$r9], $r0 ; cramfs_super.magic 301 move.d [$r9], $r0 ; cramfs_super.magic
344 cmp.d CRAMFS_MAGIC, $r0 302 cmp.d CRAMFS_MAGIC, $r0
@@ -396,7 +354,6 @@ _no_romfs_in_flash:
396 move.d romfs_length, $r3 354 move.d romfs_length, $r3
397 move.d $r2, [$r3] ; store size at romfs_length 355 move.d $r2, [$r3] ; store size at romfs_length
398 356
399#ifndef CONFIG_ETRAX_VCS_SIM
400 add.d $r2, $r0 ; copy from end and downwards 357 add.d $r2, $r0 ; copy from end and downwards
401 add.d $r2, $r1 358 add.d $r2, $r1
402 359
@@ -410,7 +367,6 @@ _no_romfs_in_flash:
410 subq 1, $r2 367 subq 1, $r2
411 bne 1b 368 bne 1b
412 nop 369 nop
413#endif
414 370
4154: 3714:
416 ;; BSS move done. 372 ;; BSS move done.
@@ -455,7 +411,6 @@ no_command_line:
455 move.d etrax_irv, $r1 ; Set the exception base register and pointer. 411 move.d etrax_irv, $r1 ; Set the exception base register and pointer.
456 move.d $r0, [$r1] 412 move.d $r0, [$r1]
457 413
458#ifndef CONFIG_ETRAX_VCS_SIM
459 ;; Clear the BSS region from _bss_start to _end. 414 ;; Clear the BSS region from _bss_start to _end.
460 move.d __bss_start, $r0 415 move.d __bss_start, $r0
461 move.d _end, $r1 416 move.d _end, $r1
@@ -463,15 +418,6 @@ no_command_line:
463 cmp.d $r1, $r0 418 cmp.d $r1, $r0
464 blo 1b 419 blo 1b
465 nop 420 nop
466#endif
467
468#ifdef CONFIG_ETRAX_VCS_SIM
469 /* Set the watchdog timeout to something big. Will be removed when */
470 /* watchdog can be disabled with command line option */
471 move.d 0x7fffffff, $r10
472 jsr CPU_WATCHDOG_TIMEOUT
473 nop
474#endif
475 421
476 ; Initialize registers to increase determinism 422 ; Initialize registers to increase determinism
477 move.d __bss_start, $r0 423 move.d __bss_start, $r0
diff --git a/arch/cris/arch-v32/kernel/kgdb.c b/arch/cris/arch-v32/kernel/kgdb.c
index 8c1d35cdf00..b06813aeb12 100644
--- a/arch/cris/arch-v32/kernel/kgdb.c
+++ b/arch/cris/arch-v32/kernel/kgdb.c
@@ -381,23 +381,9 @@ static int read_register(char regno, unsigned int *valptr);
381/* Serial port, reads one character. ETRAX 100 specific. from debugport.c */ 381/* Serial port, reads one character. ETRAX 100 specific. from debugport.c */
382int getDebugChar(void); 382int getDebugChar(void);
383 383
384#ifdef CONFIG_ETRAX_VCS_SIM
385int getDebugChar(void)
386{
387 return socketread();
388}
389#endif
390
391/* Serial port, writes one character. ETRAX 100 specific. from debugport.c */ 384/* Serial port, writes one character. ETRAX 100 specific. from debugport.c */
392void putDebugChar(int val); 385void putDebugChar(int val);
393 386
394#ifdef CONFIG_ETRAX_VCS_SIM
395void putDebugChar(int val)
396{
397 socketwrite((char *)&val, 1);
398}
399#endif
400
401/* Returns the integer equivalent of a hexadecimal character. */ 387/* Returns the integer equivalent of a hexadecimal character. */
402static int hex(char ch); 388static int hex(char ch);
403 389
diff --git a/arch/cris/arch-v32/mach-a3/Makefile b/arch/cris/arch-v32/mach-a3/Makefile
index 41fa6a6893a..d366e089198 100644
--- a/arch/cris/arch-v32/mach-a3/Makefile
+++ b/arch/cris/arch-v32/mach-a3/Makefile
@@ -1,10 +1,8 @@
1# $Id: Makefile,v 1.3 2007/03/13 11:57:46 starvik Exp $
2# 1#
3# Makefile for the linux kernel. 2# Makefile for the linux kernel.
4# 3#
5 4
6obj-y := dma.o pinmux.o io.o arbiter.o 5obj-y := dma.o pinmux.o io.o arbiter.o
7obj-$(CONFIG_ETRAX_VCS_SIM) += vcs_hook.o
8obj-$(CONFIG_CPU_FREQ) += cpufreq.o 6obj-$(CONFIG_CPU_FREQ) += cpufreq.o
9 7
10clean: 8clean:
diff --git a/arch/cris/arch-v32/mach-a3/vcs_hook.c b/arch/cris/arch-v32/mach-a3/vcs_hook.c
deleted file mode 100644
index 58b1a5469fd..00000000000
--- a/arch/cris/arch-v32/mach-a3/vcs_hook.c
+++ /dev/null
@@ -1,103 +0,0 @@
1/*
2 * Simulator hook mechanism
3 */
4
5#include "vcs_hook.h"
6#include <asm/io.h>
7#include <stdarg.h>
8
9#define HOOK_TRIG_ADDR 0xb7000000
10#define HOOK_MEM_BASE_ADDR 0xce000000
11
12static volatile unsigned *hook_base;
13
14#define HOOK_DATA(offset) hook_base[offset]
15#define VHOOK_DATA(offset) hook_base[offset]
16#define HOOK_TRIG(funcid) \
17 do { \
18 *((unsigned *) HOOK_TRIG_ADDR) = funcid; \
19 } while (0)
20#define HOOK_DATA_BYTE(offset) ((unsigned char *)hook_base)[offset]
21
22static void hook_init(void)
23{
24 static int first = 1;
25 if (first) {
26 first = 0;
27 hook_base = ioremap(HOOK_MEM_BASE_ADDR, 8192);
28 }
29}
30
31static unsigned hook_trig(unsigned id)
32{
33 unsigned ret;
34
35 /* preempt_disable(); */
36
37 /* Dummy read from mem to make sure data has propagated to memory
38 * before trigging */
39 ret = *hook_base;
40
41 /* trigger hook */
42 HOOK_TRIG(id);
43
44 /* wait for call to finish */
45 while (VHOOK_DATA(0) > 0) ;
46
47 /* extract return value */
48
49 ret = VHOOK_DATA(1);
50
51 return ret;
52}
53
54int hook_call(unsigned id, unsigned pcnt, ...)
55{
56 va_list ap;
57 int i;
58 unsigned ret;
59
60 hook_init();
61
62 HOOK_DATA(0) = id;
63
64 va_start(ap, pcnt);
65 for (i = 1; i <= pcnt; i++)
66 HOOK_DATA(i) = va_arg(ap, unsigned);
67 va_end(ap);
68
69 ret = hook_trig(id);
70
71 return ret;
72}
73
74int hook_call_str(unsigned id, unsigned size, const char *str)
75{
76 int i;
77 unsigned ret;
78
79 hook_init();
80
81 HOOK_DATA(0) = id;
82 HOOK_DATA(1) = size;
83
84 for (i = 0; i < size; i++)
85 HOOK_DATA_BYTE(8 + i) = str[i];
86 HOOK_DATA_BYTE(8 + i) = 0;
87
88 ret = hook_trig(id);
89
90 return ret;
91}
92
93void print_str(const char *str)
94{
95 int i;
96 /* find null at end of string */
97 for (i = 1; str[i]; i++) ;
98 hook_call(hook_print_str, i, str);
99}
100
101void CPU_WATCHDOG_TIMEOUT(unsigned t)
102{
103}
diff --git a/arch/cris/arch-v32/mach-a3/vcs_hook.h b/arch/cris/arch-v32/mach-a3/vcs_hook.h
deleted file mode 100644
index 8b73d0e8392..00000000000
--- a/arch/cris/arch-v32/mach-a3/vcs_hook.h
+++ /dev/null
@@ -1,58 +0,0 @@
1/*
2 * Simulator hook call mechanism
3 */
4
5#ifndef __hook_h__
6#define __hook_h__
7
8int hook_call(unsigned id, unsigned pcnt, ...);
9int hook_call_str(unsigned id, unsigned size, const char *str);
10
11enum hook_ids {
12 hook_debug_on = 1,
13 hook_debug_off,
14 hook_stop_sim_ok,
15 hook_stop_sim_fail,
16 hook_alloc_shared,
17 hook_ptr_shared,
18 hook_free_shared,
19 hook_file2shared,
20 hook_cmp_shared,
21 hook_print_params,
22 hook_sim_time,
23 hook_stop_sim,
24 hook_kick_dog,
25 hook_dog_timeout,
26 hook_rand,
27 hook_srand,
28 hook_rand_range,
29 hook_print_str,
30 hook_print_hex,
31 hook_cmp_offset_shared,
32 hook_fill_random_shared,
33 hook_alloc_random_data,
34 hook_calloc_random_data,
35 hook_print_int,
36 hook_print_uint,
37 hook_fputc,
38 hook_init_fd,
39 hook_sbrk,
40 hook_print_context_descr,
41 hook_print_data_descr,
42 hook_print_group_descr,
43 hook_fill_shared,
44 hook_sl_srand,
45 hook_sl_rand_irange,
46 hook_sl_rand_urange,
47 hook_sl_sh_malloc_aligned,
48 hook_sl_sh_calloc_aligned,
49 hook_sl_sh_alloc_random_data,
50 hook_sl_sh_file2mem,
51 hook_sl_vera_mbox_handle,
52 hook_sl_vera_mbox_put,
53 hook_sl_vera_mbox_get,
54 hook_sl_system,
55 hook_sl_sh_hexdump
56};
57
58#endif
diff --git a/arch/cris/arch-v32/mach-fs/Makefile b/arch/cris/arch-v32/mach-fs/Makefile
index 41fa6a6893a..d366e089198 100644
--- a/arch/cris/arch-v32/mach-fs/Makefile
+++ b/arch/cris/arch-v32/mach-fs/Makefile
@@ -1,10 +1,8 @@
1# $Id: Makefile,v 1.3 2007/03/13 11:57:46 starvik Exp $
2# 1#
3# Makefile for the linux kernel. 2# Makefile for the linux kernel.
4# 3#
5 4
6obj-y := dma.o pinmux.o io.o arbiter.o 5obj-y := dma.o pinmux.o io.o arbiter.o
7obj-$(CONFIG_ETRAX_VCS_SIM) += vcs_hook.o
8obj-$(CONFIG_CPU_FREQ) += cpufreq.o 6obj-$(CONFIG_CPU_FREQ) += cpufreq.o
9 7
10clean: 8clean:
diff --git a/arch/cris/arch-v32/mach-fs/vcs_hook.c b/arch/cris/arch-v32/mach-fs/vcs_hook.c
deleted file mode 100644
index b11594ae0cb..00000000000
--- a/arch/cris/arch-v32/mach-fs/vcs_hook.c
+++ /dev/null
@@ -1,100 +0,0 @@
1/*
2 * Call simulator hook. This is the part running in the
3 * simulated program.
4 */
5
6#include "vcs_hook.h"
7#include <stdarg.h>
8#include <arch-v32/hwregs/reg_map.h>
9#include <arch-v32/hwregs/intr_vect_defs.h>
10
11#define HOOK_TRIG_ADDR 0xb7000000 /* hook cvlog model reg address */
12#define HOOK_MEM_BASE_ADDR 0xa0000000 /* csp4 (shared mem) base addr */
13
14#define HOOK_DATA(offset) ((unsigned *)HOOK_MEM_BASE_ADDR)[offset]
15#define VHOOK_DATA(offset) ((volatile unsigned *)HOOK_MEM_BASE_ADDR)[offset]
16#define HOOK_TRIG(funcid) \
17 do { \
18 *((unsigned *) HOOK_TRIG_ADDR) = funcid; \
19 } while (0)
20#define HOOK_DATA_BYTE(offset) ((unsigned char *)HOOK_MEM_BASE_ADDR)[offset]
21
22int hook_call(unsigned id, unsigned pcnt, ...)
23{
24 va_list ap;
25 unsigned i;
26 unsigned ret;
27#ifdef USING_SOS
28 PREEMPT_OFF_SAVE();
29#endif
30
31 /* pass parameters */
32 HOOK_DATA(0) = id;
33
34 /* Have to make hook_print_str a special case since we call with a
35 * parameter of byte type. Should perhaps be a separate
36 * hook_call. */
37
38 if (id == hook_print_str) {
39 int i;
40 char *str;
41
42 HOOK_DATA(1) = pcnt;
43
44 va_start(ap, pcnt);
45 str = (char *)va_arg(ap, unsigned);
46
47 for (i = 0; i != pcnt; i++)
48 HOOK_DATA_BYTE(8 + i) = str[i];
49
50 HOOK_DATA_BYTE(8 + i) = 0; /* null byte */
51 } else {
52 va_start(ap, pcnt);
53 for (i = 1; i <= pcnt; i++)
54 HOOK_DATA(i) = va_arg(ap, unsigned);
55 va_end(ap);
56 }
57
58 /* read from mem to make sure data has propagated to memory before
59 * trigging */
60 ret = *((volatile unsigned *)HOOK_MEM_BASE_ADDR);
61
62 /* trigger hook */
63 HOOK_TRIG(id);
64
65 /* wait for call to finish */
66 while (VHOOK_DATA(0) > 0) ;
67
68 /* extract return value */
69
70 ret = VHOOK_DATA(1);
71
72#ifdef USING_SOS
73 PREEMPT_RESTORE();
74#endif
75 return ret;
76}
77
78unsigned hook_buf(unsigned i)
79{
80 return (HOOK_DATA(i));
81}
82
83void print_str(const char *str)
84{
85 int i;
86 /* find null at end of string */
87 for (i = 1; str[i]; i++) ;
88 hook_call(hook_print_str, i, str);
89}
90
91void CPU_KICK_DOG(void)
92{
93 (void)hook_call(hook_kick_dog, 0);
94}
95
96void CPU_WATCHDOG_TIMEOUT(unsigned t)
97{
98 (void)hook_call(hook_dog_timeout, 1, t);
99}
100
diff --git a/arch/cris/arch-v32/mach-fs/vcs_hook.h b/arch/cris/arch-v32/mach-fs/vcs_hook.h
deleted file mode 100644
index c000b9fece4..00000000000
--- a/arch/cris/arch-v32/mach-fs/vcs_hook.h
+++ /dev/null
@@ -1,42 +0,0 @@
1/*
2 * Call simulator hook functions
3 */
4
5#ifndef HOOK_H
6#define HOOK_H
7
8int hook_call(unsigned id, unsigned pcnt, ...);
9
10enum hook_ids {
11 hook_debug_on = 1,
12 hook_debug_off,
13 hook_stop_sim_ok,
14 hook_stop_sim_fail,
15 hook_alloc_shared,
16 hook_ptr_shared,
17 hook_free_shared,
18 hook_file2shared,
19 hook_cmp_shared,
20 hook_print_params,
21 hook_sim_time,
22 hook_stop_sim,
23 hook_kick_dog,
24 hook_dog_timeout,
25 hook_rand,
26 hook_srand,
27 hook_rand_range,
28 hook_print_str,
29 hook_print_hex,
30 hook_cmp_offset_shared,
31 hook_fill_random_shared,
32 hook_alloc_random_data,
33 hook_calloc_random_data,
34 hook_print_int,
35 hook_print_uint,
36 hook_fputc,
37 hook_init_fd,
38 hook_sbrk
39
40};
41
42#endif
diff --git a/arch/cris/arch-v32/mm/init.c b/arch/cris/arch-v32/mm/init.c
index 0768bc409ca..3deca5253d9 100644
--- a/arch/cris/arch-v32/mm/init.c
+++ b/arch/cris/arch-v32/mm/init.c
@@ -73,11 +73,7 @@ void __init cris_mmu_init(void)
73#endif 73#endif
74 REG_STATE(mmu, rw_mm_cfg, seg_c, linear) | 74 REG_STATE(mmu, rw_mm_cfg, seg_c, linear) |
75 REG_STATE(mmu, rw_mm_cfg, seg_b, linear) | 75 REG_STATE(mmu, rw_mm_cfg, seg_b, linear) |
76#ifndef CONFIG_ETRAX_VCS_SIM
77 REG_STATE(mmu, rw_mm_cfg, seg_a, page) | 76 REG_STATE(mmu, rw_mm_cfg, seg_a, page) |
78#else
79 REG_STATE(mmu, rw_mm_cfg, seg_a, linear) |
80#endif
81 REG_STATE(mmu, rw_mm_cfg, seg_9, page) | 77 REG_STATE(mmu, rw_mm_cfg, seg_9, page) |
82 REG_STATE(mmu, rw_mm_cfg, seg_8, page) | 78 REG_STATE(mmu, rw_mm_cfg, seg_8, page) |
83 REG_STATE(mmu, rw_mm_cfg, seg_7, page) | 79 REG_STATE(mmu, rw_mm_cfg, seg_7, page) |
@@ -100,11 +96,7 @@ void __init cris_mmu_init(void)
100#endif 96#endif
101 REG_FIELD(mmu, rw_mm_kbase_hi, base_c, 0x4) | 97 REG_FIELD(mmu, rw_mm_kbase_hi, base_c, 0x4) |
102 REG_FIELD(mmu, rw_mm_kbase_hi, base_b, 0xb) | 98 REG_FIELD(mmu, rw_mm_kbase_hi, base_b, 0xb) |
103#ifndef CONFIG_ETRAX_VCS_SIM
104 REG_FIELD(mmu, rw_mm_kbase_hi, base_a, 0x0) | 99 REG_FIELD(mmu, rw_mm_kbase_hi, base_a, 0x0) |
105#else
106 REG_FIELD(mmu, rw_mm_kbase_hi, base_a, 0xa) |
107#endif
108 REG_FIELD(mmu, rw_mm_kbase_hi, base_9, 0x0) | 100 REG_FIELD(mmu, rw_mm_kbase_hi, base_9, 0x0) |
109 REG_FIELD(mmu, rw_mm_kbase_hi, base_8, 0x0)); 101 REG_FIELD(mmu, rw_mm_kbase_hi, base_8, 0x0));
110 102
diff --git a/arch/cris/include/arch-v32/arch/page.h b/arch/cris/include/arch-v32/arch/page.h
index 20f1b4806bf..e5b5aab52de 100644
--- a/arch/cris/include/arch-v32/arch/page.h
+++ b/arch/cris/include/arch-v32/arch/page.h
@@ -11,13 +11,8 @@
11 * selected bit it's possible to convert between KSEG_x and 0x40000000 where the 11 * selected bit it's possible to convert between KSEG_x and 0x40000000 where the
12 * DRAM really resides. DRAM is virtually at 0xc. 12 * DRAM really resides. DRAM is virtually at 0xc.
13 */ 13 */
14#ifndef CONFIG_ETRAX_VCS_SIM
15#define __pa(x) ((unsigned long)(x) & 0x7fffffff) 14#define __pa(x) ((unsigned long)(x) & 0x7fffffff)
16#define __va(x) ((void *)((unsigned long)(x) | 0x80000000)) 15#define __va(x) ((void *)((unsigned long)(x) | 0x80000000))
17#else
18#define __pa(x) ((unsigned long)(x) & 0x3fffffff)
19#define __va(x) ((void *)((unsigned long)(x) | 0xc0000000))
20#endif
21 16
22#define VM_STACK_DEFAULT_FLAGS (VM_READ | VM_WRITE | \ 17#define VM_STACK_DEFAULT_FLAGS (VM_READ | VM_WRITE | \
23 VM_MAYREAD | VM_MAYWRITE) 18 VM_MAYREAD | VM_MAYWRITE)
diff --git a/arch/cris/include/arch-v32/arch/processor.h b/arch/cris/include/arch-v32/arch/processor.h
index 9603c907fbc..a024b7d32fe 100644
--- a/arch/cris/include/arch-v32/arch/processor.h
+++ b/arch/cris/include/arch-v32/arch/processor.h
@@ -21,13 +21,9 @@ struct thread_struct {
21 21
22/* 22/*
23 * User-space process size. This is hardcoded into a few places, so don't 23 * User-space process size. This is hardcoded into a few places, so don't
24 * changed it unless everything's clear! 24 * change it unless everything's clear!
25 */ 25 */
26#ifndef CONFIG_ETRAX_VCS_SIM
27#define TASK_SIZE (0xB0000000UL) 26#define TASK_SIZE (0xB0000000UL)
28#else
29#define TASK_SIZE (0xA0000000UL)
30#endif
31 27
32/* CCS I=1, enable interrupts. */ 28/* CCS I=1, enable interrupts. */
33#define INIT_THREAD { 0, 0, (1 << I_CCS_BITNR) } 29#define INIT_THREAD { 0, 0, (1 << I_CCS_BITNR) }
diff --git a/arch/cris/include/arch-v32/mach-fs/mach/startup.inc b/arch/cris/include/arch-v32/mach-fs/mach/startup.inc
index dd1abbdcbc7..96c3b0fb62c 100644
--- a/arch/cris/include/arch-v32/mach-fs/mach/startup.inc
+++ b/arch/cris/include/arch-v32/mach-fs/mach/startup.inc
@@ -71,12 +71,6 @@
71 move.d REG_ADDR(bif_core, regi_bif_core, rw_grp4_cfg), $r0 71 move.d REG_ADDR(bif_core, regi_bif_core, rw_grp4_cfg), $r0
72 move.d CONFIG_ETRAX_MEM_GRP4_CONFIG, $r1 72 move.d CONFIG_ETRAX_MEM_GRP4_CONFIG, $r1
73 move.d $r1, [$r0] 73 move.d $r1, [$r0]
74#ifdef CONFIG_ETRAX_VCS_SIM
75 ;; Set up minimal flash waitstates
76 move.d 0, $r10
77 move.d REG_ADDR(bif_core, regi_bif_core, rw_grp1_cfg), $r11
78 move.d $r10, [$r11]
79#endif
80 .endm 74 .endm
81 75
82#endif 76#endif