Add mkfiles test
[yaffs2.git] / linux-tests / initnandsim
1 #!/bin/sh
2 modprobe mtd
3 modprobe mtdblock
4
5 case $1 in
6         16MiB-512 )
7                 modprobe nandsim first_id_byte=0x20 second_id_byte=0x33
8                 ;;
9         32MiB-512 )
10                 modprobe nandsim first_id_byte=0x20 second_id_byte=0x35
11                 ;;
12         64MiB-512 )
13                 modprobe nandsim first_id_byte=0x20 second_id_byte=0x36
14                 ;;
15         128MiB-512 )
16                 modprobe nandsim first_id_byte=0x20 second_id_byte=0x78
17                 ;;
18         256MiB-512 )
19                 modprobe nandsim first_id_byte=0x20 second_id_byte=0x71
20                 ;;
21         64MiB-2048 )
22                 modprobe nandsim first_id_byte=0x20 second_id_byte=0xa2 third_id_byte=0x00 fourth_id_byte=0x15
23                 ;;
24         128MiB-2048 )
25                 modprobe nandsim first_id_byte=0xec second_id_byte=0xa1 third_id_byte=0x00 fourth_id_byte=0x15
26                 ;;
27         256MiB-2048 )
28                 modprobe nandsim first_id_byte=0x20 second_id_byte=0xaa third_id_byte=0x00 fourth_id_byte=0x15
29                 ;;
30         512MiB-2048 )
31                 modprobe nandsim first_id_byte=0x20 second_id_byte=0xac third_id_byte=0x00 fourth_id_byte=0x15
32                 ;;
33         1GiB-2048 )
34                 modprobe nandsim first_id_byte=0xec second_id_byte=0xd3 third_id_byte=0x51 fourth_id_byte=0x95
35                 ;;
36         * )
37                 echo "No nand config specified. Need one of:"
38                 echo " 16MiB-512, 32MiB-512, 64MiB-512, 128MiB-512, 256MiB-512, 64MiB-2048, 128MiB-2048, 256MiB-2048, 512MiB-2048, 1GiB-2048"
39                 return 1
40 esac
41
42 cat /proc/mtd