Set up a test framework.
[yaffs2.git] / direct / test-framework / yaffscfg2k.c
1 /*
2  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
3  *
4  * Copyright (C) 2002-2011 Aleph One Ltd.
5  *   for Toby Churchill Ltd and Brightstar Engineering
6  *
7  * Created by Charles Manning <charles@aleph1.co.uk>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License version 2 as
11  * published by the Free Software Foundation.
12  */
13
14 /*
15  * yaffscfg2k.c  The configuration for the "direct" use of yaffs.
16  *
17  * This file is intended to be modified to your requirements.
18  * There is no need to redistribute this file.
19  */
20
21 #include "yaffscfg.h"
22 #include "yaffs_guts.h"
23 #include "yaffsfs.h"
24 #include "yaffs_fileem2k.h"
25 #include "yaffs_nandemul2k.h"
26 #include "yaffs_trace.h"
27 #include "yaffs_osglue.h"
28
29
30 #include <errno.h>
31
32 unsigned yaffs_trace_mask =
33
34         YAFFS_TRACE_SCAN |
35         YAFFS_TRACE_GC |
36         YAFFS_TRACE_ERASE |
37         YAFFS_TRACE_ERROR |
38         YAFFS_TRACE_TRACING |
39         YAFFS_TRACE_ALLOCATE |
40         YAFFS_TRACE_BAD_BLOCKS |
41         YAFFS_TRACE_VERIFY |
42
43         0;
44
45
46
47 // Configuration
48
49 #include "yaffs_flashif2.h"
50 #include "yaffs_m18_drv.h"
51
52 int yaffs_start_up(void)
53 {
54         static int start_up_called = 0;
55
56         if(start_up_called)
57                 return 0;
58         start_up_called = 1;
59
60         // Stuff to configure YAFFS
61         // Stuff to initialise anything special (eg lock semaphore).
62         yaffsfs_OSInitialisation();
63
64
65         yaffs_m18_install_drv("M18-1");
66
67         // /yaffs2  yaffs2 file emulation
68         yflash2_install_drv("yaffs2");
69
70         return 0;
71 }
72
73
74