diff options
author | Bryan Wu <bryan.wu@analog.com> | 2007-05-06 17:50:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-07 15:12:58 -0400 |
commit | 1394f03221790a988afc3e4b3cb79f2e477246a9 (patch) | |
tree | 2c1963c9a4f2d84a5e021307fde240c5d567cf70 /Documentation/blackfin | |
parent | 73243284463a761e04d69d22c7516b2be7de096c (diff) |
blackfin architecture
This adds support for the Analog Devices Blackfin processor architecture, and
currently supports the BF533, BF532, BF531, BF537, BF536, BF534, and BF561
(Dual Core) devices, with a variety of development platforms including those
avaliable from Analog Devices (BF533-EZKit, BF533-STAMP, BF537-STAMP,
BF561-EZKIT), and Bluetechnix! Tinyboards.
The Blackfin architecture was jointly developed by Intel and Analog Devices
Inc. (ADI) as the Micro Signal Architecture (MSA) core and introduced it in
December of 2000. Since then ADI has put this core into its Blackfin
processor family of devices. The Blackfin core has the advantages of a clean,
orthogonal,RISC-like microprocessor instruction set. It combines a dual-MAC
(Multiply/Accumulate), state-of-the-art signal processing engine and
single-instruction, multiple-data (SIMD) multimedia capabilities into a single
instruction-set architecture.
The Blackfin architecture, including the instruction set, is described by the
ADSP-BF53x/BF56x Blackfin Processor Programming Reference
http://blackfin.uclinux.org/gf/download/frsrelease/29/2549/Blackfin_PRM.pdf
The Blackfin processor is already supported by major releases of gcc, and
there are binary and source rpms/tarballs for many architectures at:
http://blackfin.uclinux.org/gf/project/toolchain/frs There is complete
documentation, including "getting started" guides available at:
http://docs.blackfin.uclinux.org/ which provides links to the sources and
patches you will need in order to set up a cross-compiling environment for
bfin-linux-uclibc
This patch, as well as the other patches (toolchain, distribution,
uClibc) are actively supported by Analog Devices Inc, at:
http://blackfin.uclinux.org/
We have tested this on LTP, and our test plan (including pass/fails) can
be found at:
http://docs.blackfin.uclinux.org/doku.php?id=testing_the_linux_kernel
[m.kozlowski@tuxland.pl: balance parenthesis in blackfin header files]
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Aubrey Li <aubrey.li@analog.com>
Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/blackfin')
-rw-r--r-- | Documentation/blackfin/00-INDEX | 11 | ||||
-rw-r--r-- | Documentation/blackfin/Filesystems | 169 | ||||
-rw-r--r-- | Documentation/blackfin/cache-lock.txt | 48 | ||||
-rw-r--r-- | Documentation/blackfin/cachefeatures.txt | 65 |
4 files changed, 293 insertions, 0 deletions
diff --git a/Documentation/blackfin/00-INDEX b/Documentation/blackfin/00-INDEX new file mode 100644 index 000000000000..7cb3b356b249 --- /dev/null +++ b/Documentation/blackfin/00-INDEX | |||
@@ -0,0 +1,11 @@ | |||
1 | 00-INDEX | ||
2 | - This file | ||
3 | |||
4 | cache-lock.txt | ||
5 | - HOWTO for blackfin cache locking. | ||
6 | |||
7 | cachefeatures.txt | ||
8 | - Supported cache features. | ||
9 | |||
10 | Filesystems | ||
11 | - Requirements for mounting the root file system. | ||
diff --git a/Documentation/blackfin/Filesystems b/Documentation/blackfin/Filesystems new file mode 100644 index 000000000000..51260a1b8032 --- /dev/null +++ b/Documentation/blackfin/Filesystems | |||
@@ -0,0 +1,169 @@ | |||
1 | /* | ||
2 | * File: Documentation/blackfin/Filesystems | ||
3 | * Based on: | ||
4 | * Author: | ||
5 | * | ||
6 | * Created: | ||
7 | * Description: This file contains the simple DMA Implementation for Blackfin | ||
8 | * | ||
9 | * Rev: $Id: Filesystems 2384 2006-11-01 04:12:43Z magicyang $ | ||
10 | * | ||
11 | * Modified: | ||
12 | * Copyright 2004-2006 Analog Devices Inc. | ||
13 | * | ||
14 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | ||
15 | * | ||
16 | */ | ||
17 | |||
18 | How to mount the root file system in uClinux/Blackfin | ||
19 | ----------------------------------------------------- | ||
20 | |||
21 | 1 Mounting EXT3 File system. | ||
22 | ------------------------ | ||
23 | |||
24 | Creating an EXT3 File system for uClinux/Blackfin: | ||
25 | |||
26 | |||
27 | Please follow the steps to form the EXT3 File system and mount the same as root | ||
28 | file system. | ||
29 | |||
30 | a Make an ext3 file system as large as you want the final root file | ||
31 | system. | ||
32 | |||
33 | mkfs.ext3 /dev/ram0 <your-rootfs-size-in-1k-blocks> | ||
34 | |||
35 | b Mount this Empty file system on a free directory as: | ||
36 | |||
37 | mount -t ext3 /dev/ram0 ./test | ||
38 | where ./test is the empty directory. | ||
39 | |||
40 | c Copy your root fs directory that you have so carefully made over. | ||
41 | |||
42 | cp -af /tmp/my_final_rootfs_files/* ./test | ||
43 | |||
44 | (For ex: cp -af uClinux-dist/romfs/* ./test) | ||
45 | |||
46 | d If you have done everything right till now you should be able to see | ||
47 | the required "root" dir's (that's etc, root, bin, lib, sbin...) | ||
48 | |||
49 | e Now unmount the file system | ||
50 | |||
51 | umount ./test | ||
52 | |||
53 | f Create the root file system image. | ||
54 | |||
55 | dd if=/dev/ram0 bs=1k count=<your-rootfs-size-in-1k-blocks> \ | ||
56 | > ext3fs.img | ||
57 | |||
58 | |||
59 | Now you have to tell the kernel that will be mounting this file system as | ||
60 | rootfs. | ||
61 | So do a make menuconfig under kernel and select the Ext3 journaling file system | ||
62 | support under File system --> submenu. | ||
63 | |||
64 | |||
65 | 2. Mounting EXT2 File system. | ||
66 | ------------------------- | ||
67 | |||
68 | By default the ext2 file system image will be created if you invoke make from | ||
69 | the top uClinux-dist directory. | ||
70 | |||
71 | |||
72 | 3. Mounting CRAMFS File System | ||
73 | ---------------------------- | ||
74 | |||
75 | To create a CRAMFS file system image execute the command | ||
76 | |||
77 | mkfs.cramfs ./test cramfs.img | ||
78 | |||
79 | where ./test is the target directory. | ||
80 | |||
81 | |||
82 | 4. Mounting ROMFS File System | ||
83 | -------------------------- | ||
84 | |||
85 | To create a ROMFS file system image execute the command | ||
86 | |||
87 | genromfs -v -V "ROMdisk" -f romfs.img -d ./test | ||
88 | |||
89 | where ./test is the target directory | ||
90 | |||
91 | |||
92 | 5. Mounting the JFFS2 Filesystem | ||
93 | ----------------------------- | ||
94 | |||
95 | To create a compressed JFFS filesystem (JFFS2), please execute the command | ||
96 | |||
97 | mkfs.jffs2 -d ./test -o jffs2.img | ||
98 | |||
99 | where ./test is the target directory. | ||
100 | |||
101 | However, please make sure the following is in your kernel config. | ||
102 | |||
103 | /* | ||
104 | * RAM/ROM/Flash chip drivers | ||
105 | */ | ||
106 | #define CONFIG_MTD_CFI 1 | ||
107 | #define CONFIG_MTD_ROM 1 | ||
108 | /* | ||
109 | * Mapping drivers for chip access | ||
110 | */ | ||
111 | #define CONFIG_MTD_COMPLEX_MAPPINGS 1 | ||
112 | #define CONFIG_MTD_BF533 1 | ||
113 | #undef CONFIG_MTD_UCLINUX | ||
114 | |||
115 | Through the u-boot boot loader, use the jffs2.img in the corresponding | ||
116 | partition made in linux-2.6.x/drivers/mtd/maps/bf533_flash.c. | ||
117 | |||
118 | NOTE - Currently the Flash driver is available only for EZKIT. Watch out for a | ||
119 | STAMP driver soon. | ||
120 | |||
121 | |||
122 | 6. Mounting the NFS File system | ||
123 | ----------------------------- | ||
124 | |||
125 | For mounting the NFS please do the following in the kernel config. | ||
126 | |||
127 | In Networking Support --> Networking options --> TCP/IP networking --> | ||
128 | IP: kernel level autoconfiguration | ||
129 | |||
130 | Enable BOOTP Support. | ||
131 | |||
132 | In Kernel hacking --> Compiled-in kernel boot parameter add the following | ||
133 | |||
134 | root=/dev/nfs rw ip=bootp | ||
135 | |||
136 | In File system --> Network File system, Enable | ||
137 | |||
138 | NFS file system support --> NFSv3 client support | ||
139 | Root File system on NFS | ||
140 | |||
141 | in uClibc menuconfig, do the following | ||
142 | In Networking Support | ||
143 | enable Remote Procedure Call (RPC) support | ||
144 | Full RPC Support | ||
145 | |||
146 | On the Host side, ensure that /etc/dhcpd.conf looks something like this | ||
147 | |||
148 | ddns-update-style ad-hoc; | ||
149 | allow bootp; | ||
150 | subnet 10.100.4.0 netmask 255.255.255.0 { | ||
151 | default-lease-time 122209600; | ||
152 | max-lease-time 31557600; | ||
153 | group { | ||
154 | host bf533 { | ||
155 | hardware ethernet 00:CF:52:49:C3:01; | ||
156 | fixed-address 10.100.4.50; | ||
157 | option root-path "/home/nfsmount"; | ||
158 | } | ||
159 | } | ||
160 | |||
161 | ensure that /etc/exports looks something like this | ||
162 | /home/nfsmount *(rw,no_root_squash,no_all_squash) | ||
163 | |||
164 | run the following commands as root (may differ depending on your | ||
165 | distribution) : | ||
166 | - service nfs start | ||
167 | - service portmap start | ||
168 | - service dhcpd start | ||
169 | - /usr/sbin/exportfs | ||
diff --git a/Documentation/blackfin/cache-lock.txt b/Documentation/blackfin/cache-lock.txt new file mode 100644 index 000000000000..88ba1e6c31c3 --- /dev/null +++ b/Documentation/blackfin/cache-lock.txt | |||
@@ -0,0 +1,48 @@ | |||
1 | /* | ||
2 | * File: Documentation/blackfin/cache-lock.txt | ||
3 | * Based on: | ||
4 | * Author: | ||
5 | * | ||
6 | * Created: | ||
7 | * Description: This file contains the simple DMA Implementation for Blackfin | ||
8 | * | ||
9 | * Rev: $Id: cache-lock.txt 2384 2006-11-01 04:12:43Z magicyang $ | ||
10 | * | ||
11 | * Modified: | ||
12 | * Copyright 2004-2006 Analog Devices Inc. | ||
13 | * | ||
14 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | ||
15 | * | ||
16 | */ | ||
17 | |||
18 | How to lock your code in cache in uClinux/blackfin | ||
19 | -------------------------------------------------- | ||
20 | |||
21 | There are only a few steps required to lock your code into the cache. | ||
22 | Currently you can lock the code by Way. | ||
23 | |||
24 | Below are the interface provided for locking the cache. | ||
25 | |||
26 | |||
27 | 1. cache_grab_lock(int Ways); | ||
28 | |||
29 | This function grab the lock for locking your code into the cache specified | ||
30 | by Ways. | ||
31 | |||
32 | |||
33 | 2. cache_lock(int Ways); | ||
34 | |||
35 | This function should be called after your critical code has been executed. | ||
36 | Once the critical code exits, the code is now loaded into the cache. This | ||
37 | function locks the code into the cache. | ||
38 | |||
39 | |||
40 | So, the example sequence will be: | ||
41 | |||
42 | cache_grab_lock(WAY0_L); /* Grab the lock */ | ||
43 | |||
44 | critical_code(); /* Execute the code of interest */ | ||
45 | |||
46 | cache_lock(WAY0_L); /* Lock the cache */ | ||
47 | |||
48 | Where WAY0_L signifies WAY0 locking. | ||
diff --git a/Documentation/blackfin/cachefeatures.txt b/Documentation/blackfin/cachefeatures.txt new file mode 100644 index 000000000000..0fbec23becb5 --- /dev/null +++ b/Documentation/blackfin/cachefeatures.txt | |||
@@ -0,0 +1,65 @@ | |||
1 | /* | ||
2 | * File: Documentation/blackfin/cachefeatures.txt | ||
3 | * Based on: | ||
4 | * Author: | ||
5 | * | ||
6 | * Created: | ||
7 | * Description: This file contains the simple DMA Implementation for Blackfin | ||
8 | * | ||
9 | * Rev: $Id: cachefeatures.txt 2384 2006-11-01 04:12:43Z magicyang $ | ||
10 | * | ||
11 | * Modified: | ||
12 | * Copyright 2004-2006 Analog Devices Inc. | ||
13 | * | ||
14 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | ||
15 | * | ||
16 | */ | ||
17 | |||
18 | - Instruction and Data cache initialization. | ||
19 | icache_init(); | ||
20 | dcache_init(); | ||
21 | |||
22 | - Instruction and Data cache Invalidation Routines, when flushing the | ||
23 | same is not required. | ||
24 | _icache_invalidate(); | ||
25 | _dcache_invalidate(); | ||
26 | |||
27 | Also, for invalidating the entire instruction and data cache, the below | ||
28 | routines are provided (another method for invalidation, refer page no 267 and 287 of | ||
29 | ADSP-BF533 Hardware Reference manual) | ||
30 | |||
31 | invalidate_entire_dcache(); | ||
32 | invalidate_entire_icache(); | ||
33 | |||
34 | -External Flushing of Instruction and data cache routines. | ||
35 | |||
36 | flush_instruction_cache(); | ||
37 | flush_data_cache(); | ||
38 | |||
39 | - Internal Flushing of Instruction and Data Cache. | ||
40 | |||
41 | icplb_flush(); | ||
42 | dcplb_flush(); | ||
43 | |||
44 | - Locking the cache. | ||
45 | |||
46 | cache_grab_lock(); | ||
47 | cache_lock(); | ||
48 | |||
49 | Please refer linux-2.6.x/Documentation/blackfin/cache-lock.txt for how to | ||
50 | lock the cache. | ||
51 | |||
52 | Locking the cache is optional feature. | ||
53 | |||
54 | - Miscellaneous cache functions. | ||
55 | |||
56 | flush_cache_all(); | ||
57 | flush_cache_mm(); | ||
58 | invalidate_dcache_range(); | ||
59 | flush_dcache_range(); | ||
60 | flush_dcache_page(); | ||
61 | flush_cache_range(); | ||
62 | flush_cache_page(); | ||
63 | invalidate_dcache_range(); | ||
64 | flush_page_to_ram(); | ||
65 | |||