Compare commits
3541 Commits
U_BOOT_0_1
...
v1.3.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
41be969f49 | ||
|
|
cf5933ba1e | ||
|
|
8d4f040a3c | ||
|
|
88fed9a120 | ||
|
|
a5f601fd1b | ||
|
|
fe08fb6580 | ||
|
|
3deca9d447 | ||
|
|
a340c325e6 | ||
|
|
87ddedd6ad | ||
|
|
59829cc189 | ||
|
|
318c0b9043 | ||
|
|
33daf5b785 | ||
|
|
0c698dcaa7 | ||
|
|
f868cc5a50 | ||
|
|
16b195c82a | ||
|
|
e455866629 | ||
|
|
1378df792a | ||
|
|
2439e4bfa1 | ||
|
|
352d259130 | ||
|
|
7364621718 | ||
|
|
93a686ee9c | ||
|
|
cfa4c9d899 | ||
|
|
9162352817 | ||
|
|
9eb77cea1f | ||
|
|
ab544633ab | ||
|
|
dbaf07ce62 | ||
|
|
8d04f02f62 | ||
|
|
e93becf80d | ||
|
|
f738b4a759 | ||
|
|
a3c2933e02 | ||
|
|
98e2867cc8 | ||
|
|
ed1353d74b | ||
|
|
4a43719a77 | ||
|
|
2f155f6c0a | ||
|
|
080c646dbf | ||
|
|
f92edbd8a0 | ||
|
|
9a337ddc15 | ||
|
|
f30ad49b16 | ||
|
|
f8c3206093 | ||
|
|
e8da58f2bc | ||
|
|
6bf4c686af | ||
|
|
6073f61e07 | ||
|
|
8412d814ce | ||
|
|
409ecdc0bb | ||
|
|
079c2c4fa7 | ||
|
|
0b20335015 | ||
|
|
7e14fc6536 | ||
|
|
2309c130aa | ||
|
|
7e1d884b7c | ||
|
|
16664f7285 | ||
|
|
03c031d566 | ||
|
|
f5e429d386 | ||
|
|
4fbd0741b2 | ||
|
|
f013204597 | ||
|
|
b09258c539 | ||
|
|
2e4a6e3667 | ||
|
|
662e5cb397 | ||
|
|
efe33035ac | ||
|
|
5947f6999a | ||
|
|
a75e1a3dda | ||
|
|
9e5285eca4 | ||
|
|
fd329e6f05 | ||
|
|
429c180eda | ||
|
|
1c3dd43338 | ||
|
|
5c15010efa | ||
|
|
e5e3d7d520 | ||
|
|
6ecbb7a3fa | ||
|
|
d08b7233bc | ||
|
|
f9d9164d9c | ||
|
|
db74b3c1c9 | ||
|
|
ee1f5e3bfe | ||
|
|
64bf555465 | ||
|
|
7a60ee7c62 | ||
|
|
a08ded4e63 | ||
|
|
4d4faae65e | ||
|
|
5798f87dc1 | ||
|
|
df58c81551 | ||
|
|
5dbb6ed622 | ||
|
|
ec00c76de0 | ||
|
|
754f230aa0 | ||
|
|
f0037c56b0 | ||
|
|
1b4aaffe4f | ||
|
|
955413f35f | ||
|
|
e15633888a | ||
|
|
139365fbe5 | ||
|
|
7092234236 | ||
|
|
96279ab4ca | ||
|
|
928fe33b24 | ||
|
|
c93945e8f9 | ||
|
|
54fd6c93c2 | ||
|
|
5c568d6a7f | ||
|
|
1ce55151c8 | ||
|
|
8d737a2815 | ||
|
|
7d7cdea769 | ||
|
|
09b26cf00d | ||
|
|
225a24b5e0 | ||
|
|
248c7c1483 | ||
|
|
d9240a5f82 | ||
|
|
1f103105a3 | ||
|
|
71bc6e6474 | ||
|
|
298035df49 | ||
|
|
881cf02f47 | ||
|
|
992742a5b0 | ||
|
|
e881cb563e | ||
|
|
ad845beef0 | ||
|
|
ec22755799 | ||
|
|
eb6f214d36 | ||
|
|
bbf4796f64 | ||
|
|
4e62041023 | ||
|
|
56622f8785 | ||
|
|
29c29c0267 | ||
|
|
59543fe00a | ||
|
|
c9e7b9b9a1 | ||
|
|
6abd82e19a | ||
|
|
e34a043892 | ||
|
|
e60adeac2d | ||
|
|
f0516920f6 | ||
|
|
8b6684a698 | ||
|
|
e5c794e491 | ||
|
|
8287b3b564 | ||
|
|
dbf3317623 | ||
|
|
8410d39070 | ||
|
|
5b746c3ea8 | ||
|
|
2fa0dd158c | ||
|
|
0f8b8d0f4c | ||
|
|
31548249de | ||
|
|
4980102871 | ||
|
|
e8ee8f3ade | ||
|
|
688e8eb414 | ||
|
|
c67e12e705 | ||
|
|
95e9f2c212 | ||
|
|
2acefa72ee | ||
|
|
d78791ae91 | ||
|
|
53acfb2983 | ||
|
|
1a0ce20aa4 | ||
|
|
be4a87f11e | ||
|
|
b31f64343e | ||
|
|
0fc0f91b20 | ||
|
|
7b0a42219f | ||
|
|
cb8250fe4b | ||
|
|
e9d0d52799 | ||
|
|
9c4884f54d | ||
|
|
e78220f6e5 | ||
|
|
10cdb8dbd6 | ||
|
|
41b4d282d3 | ||
|
|
58b74b05c6 | ||
|
|
96455bfebc | ||
|
|
2a4741d9a1 | ||
|
|
298cd4cafe | ||
|
|
d3afa1ee19 | ||
|
|
eff501904d | ||
|
|
7a9348728e | ||
|
|
20d500d531 | ||
|
|
341cc69d23 | ||
|
|
de9a738faa | ||
|
|
00101dd7a3 | ||
|
|
eb700636db | ||
|
|
22069215eb | ||
|
|
cbf2323b5b | ||
|
|
e5f325fec5 | ||
|
|
05bf4919c1 | ||
|
|
ff285ca07e | ||
|
|
07dd6eb040 | ||
|
|
b407f1a4b6 | ||
|
|
df90968b48 | ||
|
|
1e701e7013 | ||
|
|
5c7ea64bb7 | ||
|
|
7600d47b8f | ||
|
|
a3063eec77 | ||
|
|
e1ce3cb617 | ||
|
|
d4d1e9bee7 | ||
|
|
5441f61a3d | ||
|
|
27d2b1ed21 | ||
|
|
281df457c1 | ||
|
|
d2646554f5 | ||
|
|
f147dd15e8 | ||
|
|
3e11ae80fe | ||
|
|
7ee6ba1a05 | ||
|
|
eff786a9b8 | ||
|
|
2491167c24 | ||
|
|
aba637ba15 | ||
|
|
9e8362b689 | ||
|
|
99722330ae | ||
|
|
4d4a945e18 | ||
|
|
e2e93442e5 | ||
|
|
5a5958b7de | ||
|
|
da3aad55cb | ||
|
|
9d29250e2e | ||
|
|
d43e489baf | ||
|
|
9ef57bbee1 | ||
|
|
f8bf90461d | ||
|
|
e58ade3a5c | ||
|
|
95df6f4eba | ||
|
|
6364001982 | ||
|
|
68f14f77ca | ||
|
|
fc19e36f74 | ||
|
|
b005838132 | ||
|
|
8f05a661e9 | ||
|
|
86cc433e1b | ||
|
|
23c56f97ca | ||
|
|
de74b9eeac | ||
|
|
2885634d64 | ||
|
|
e1893815b0 | ||
|
|
72e55d03fc | ||
|
|
8faf69dc21 | ||
|
|
6091534b8c | ||
|
|
8002012041 | ||
|
|
7b624ad254 | ||
|
|
2b2a587d6d | ||
|
|
92869195ef | ||
|
|
e81a95a9e7 | ||
|
|
9add9884b1 | ||
|
|
b90296fc39 | ||
|
|
527c80f012 | ||
|
|
738815c0cc | ||
|
|
87c1833a39 | ||
|
|
2db6478406 | ||
|
|
785c13477b | ||
|
|
86ec86c043 | ||
|
|
636538c520 | ||
|
|
3e954beb61 | ||
|
|
1487adbdcf | ||
|
|
c3c909a209 | ||
|
|
0d38effc6e | ||
|
|
8ffc774993 | ||
|
|
853643d8cf | ||
|
|
f240356507 | ||
|
|
cb1bc63b75 | ||
|
|
0731cbae6c | ||
|
|
1c1100d2fc | ||
|
|
0731933ec8 | ||
|
|
db14d77995 | ||
|
|
481d432861 | ||
|
|
b90c045f03 | ||
|
|
6b6f287a33 | ||
|
|
9147ca849e | ||
|
|
66dcad3a9a | ||
|
|
90a3af45a0 | ||
|
|
135e19bc27 | ||
|
|
8a783a6585 | ||
|
|
f8d3ca7b6f | ||
|
|
bd86220f58 | ||
|
|
afd477b227 | ||
|
|
e80e585b00 | ||
|
|
a4f3aab6df | ||
|
|
f930922f06 | ||
|
|
97213f3241 | ||
|
|
30363e98fa | ||
|
|
d7e8ce101a | ||
|
|
17aa280045 | ||
|
|
916527f480 | ||
|
|
b49c90df6e | ||
|
|
7201cfc4a7 | ||
|
|
fd64975a88 | ||
|
|
67c31036ac | ||
|
|
eb6da80507 | ||
|
|
cd2d1602c5 | ||
|
|
5bd7fe9aeb | ||
|
|
c750d2e669 | ||
|
|
dcb8863029 | ||
|
|
314d5b6ce5 | ||
|
|
e21659e306 | ||
|
|
1218abf1b5 | ||
|
|
66b3f24d66 | ||
|
|
991b089d1c | ||
|
|
329ff3c938 | ||
|
|
d7fee32b7e | ||
|
|
6e7b7b6ea1 | ||
|
|
e1f601b572 | ||
|
|
f34024d4a3 | ||
|
|
d94c79e470 | ||
|
|
1fc11f736c | ||
|
|
38ad82da0c | ||
|
|
9d3cb9febe | ||
|
|
6c2f4f388e | ||
|
|
d45963854e | ||
|
|
9c73f4b811 | ||
|
|
978aec12fa | ||
|
|
38c1ef728d | ||
|
|
754bac4815 | ||
|
|
7a888d6b3c | ||
|
|
7d54d64e9c | ||
|
|
e251e00d0d | ||
|
|
1d9e31e049 | ||
|
|
a7d7eca791 | ||
|
|
87eb200ea8 | ||
|
|
fd63d832cd | ||
|
|
6efc1fc0b6 | ||
|
|
7f19139389 | ||
|
|
15ee4734e4 | ||
|
|
ff7640c9ea | ||
|
|
08e2e5fcd2 | ||
|
|
8d17979d03 | ||
|
|
470ffef72c | ||
|
|
a89cbbd27a | ||
|
|
5e5803e119 | ||
|
|
80172c6181 | ||
|
|
28bb3f72c6 | ||
|
|
1d2ca446e1 | ||
|
|
b4d8a55145 | ||
|
|
8ea2c4e548 | ||
|
|
3dd42fd5e2 | ||
|
|
5b729fb3bd | ||
|
|
bf72a4ca9e | ||
|
|
041a2554ad | ||
|
|
e79021223b | ||
|
|
cf2817a84c | ||
|
|
41bb76e941 | ||
|
|
80767a6cea | ||
|
|
56a9270521 | ||
|
|
f75e89e9b5 | ||
|
|
9f5c3d3720 | ||
|
|
7462fe0d5a | ||
|
|
6e4bf9b24e | ||
|
|
557ab89d29 | ||
|
|
1d1ab638f8 | ||
|
|
81b73dec16 | ||
|
|
60174746c6 | ||
|
|
696dd1307c | ||
|
|
c88b6e1cbf | ||
|
|
ff13ac8c7b | ||
|
|
1900fbf255 | ||
|
|
8f1bc28408 | ||
|
|
04625764cc | ||
|
|
d4a68f40a0 | ||
|
|
2602a5c40a | ||
|
|
c5bded3c88 | ||
|
|
2d1f23aa1e | ||
|
|
9468e6804b | ||
|
|
4bf4abb8a4 | ||
|
|
7a1ac419fa | ||
|
|
94c47fdaf1 | ||
|
|
7608d75f9c | ||
|
|
ef8f207527 | ||
|
|
5f47094857 | ||
|
|
4a8527ef08 | ||
|
|
16e23c3f5d | ||
|
|
0e700ce03a | ||
|
|
9bb8b209ed | ||
|
|
3bb342fc85 | ||
|
|
6af2eeb1e9 | ||
|
|
20640002e6 | ||
|
|
a861558c65 | ||
|
|
f98984cb19 | ||
|
|
2c05fd1257 | ||
|
|
9c02defc29 | ||
|
|
75e1a84d48 | ||
|
|
d7bfa62003 | ||
|
|
c25dd8fc25 | ||
|
|
c64fb30e4c | ||
|
|
93f7983460 | ||
|
|
3ad6387873 | ||
|
|
3e66c07800 | ||
|
|
05675735ef | ||
|
|
909627dca4 | ||
|
|
8f22b671eb | ||
|
|
1d55483cf7 | ||
|
|
9edd580e91 | ||
|
|
79f240f7ec | ||
|
|
815b5bd5b1 | ||
|
|
26667b7fa0 | ||
|
|
8280f6a1c4 | ||
|
|
4a442d3186 | ||
|
|
4cc1cd5941 | ||
|
|
e58fe95784 | ||
|
|
5aa4ad8d8e | ||
|
|
bbea46f76f | ||
|
|
14778585d1 | ||
|
|
8ae158cd87 | ||
|
|
a1436a8426 | ||
|
|
a605aacd83 | ||
|
|
f28e1bd9da | ||
|
|
870470dbf6 | ||
|
|
aa93d859d9 | ||
|
|
a9505510bf | ||
|
|
6cfd3c7bc8 | ||
|
|
6706424d0b | ||
|
|
56115665b4 | ||
|
|
83ec20bc43 | ||
|
|
f52e78304d | ||
|
|
7171977fb8 | ||
|
|
ab77bc547b | ||
|
|
81735b2568 | ||
|
|
10327dc554 | ||
|
|
d64ee908a1 | ||
|
|
ea5877e31e | ||
|
|
fc9970137c | ||
|
|
07bc20560c | ||
|
|
1e6b07c649 | ||
|
|
d35b508a55 | ||
|
|
82bd9ee774 | ||
|
|
7613afda77 | ||
|
|
b96c83d4ae | ||
|
|
3a79013e2a | ||
|
|
ec72382295 | ||
|
|
10aaf716cb | ||
|
|
78f9fef7f4 | ||
|
|
592391a6e5 | ||
|
|
002275a3ed | ||
|
|
a5a38f4fd7 | ||
|
|
4a3c7eb917 | ||
|
|
8fb6e80c06 | ||
|
|
2d78074d2e | ||
|
|
78cff50edb | ||
|
|
6e0e2253f0 | ||
|
|
9de469bd96 | ||
|
|
6da0c5bd4a | ||
|
|
02ba7022f6 | ||
|
|
f31b0aecb5 | ||
|
|
35cc4e4823 | ||
|
|
3fde9e8b22 | ||
|
|
6a16e0dfcc | ||
|
|
8f9e0e9f33 | ||
|
|
f4b2ac5ed9 | ||
|
|
19fa1c3536 | ||
|
|
5b4de9309d | ||
|
|
a44e7a97c8 | ||
|
|
19909edb97 | ||
|
|
b706d63559 | ||
|
|
d1ed28cf36 | ||
|
|
7aa63d8cd3 | ||
|
|
ed4058afc8 | ||
|
|
30b52df9e9 | ||
|
|
4ce917742b | ||
|
|
8662577fe3 | ||
|
|
210f463c71 | ||
|
|
d61ea14885 | ||
|
|
0e19209767 | ||
|
|
594e79838c | ||
|
|
b361acd64f | ||
|
|
541d41b2f2 | ||
|
|
f01dbb5424 | ||
|
|
3f76451b4a | ||
|
|
71d67f43da | ||
|
|
073e1b5099 | ||
|
|
e54b970173 | ||
|
|
3b3bff4cbf | ||
|
|
4ce846ec59 | ||
|
|
429d9571f6 | ||
|
|
34886bbea2 | ||
|
|
779e975117 | ||
|
|
c5a172a5fd | ||
|
|
eb2b4010ae | ||
|
|
0c42f36f15 | ||
|
|
65d7ada645 | ||
|
|
3454cece2d | ||
|
|
dcbfd2e564 | ||
|
|
d4fc6012fd | ||
|
|
4ef35e53c6 | ||
|
|
bf9583e544 | ||
|
|
85eb5caf6b | ||
|
|
7f3f2bd2dc | ||
|
|
e41094c7e3 | ||
|
|
da9d4610d7 | ||
|
|
c59e4091ff | ||
|
|
d111d6382c | ||
|
|
3db0bef59e | ||
|
|
39980c610c | ||
|
|
6c543597bb | ||
|
|
f2cff6b104 | ||
|
|
837f1ba05c | ||
|
|
61a21e980a | ||
|
|
7bd30fc4a6 | ||
|
|
40c7f9b0de | ||
|
|
29372ff38c | ||
|
|
41f0f8fb1a | ||
|
|
53a5c424bf | ||
|
|
5d110f0aa6 | ||
|
|
50cca8b976 | ||
|
|
d1bc6c8d5f | ||
|
|
8a92b7c60b | ||
|
|
be5d72d10d | ||
|
|
8e2dd87eee | ||
|
|
cca34967cb | ||
|
|
a08458303e | ||
|
|
0ba8eed28b | ||
|
|
375c2c9e57 | ||
|
|
f0d1246ed7 | ||
|
|
273db7e1bd | ||
|
|
9986bc3e40 | ||
|
|
77d19a8bf3 | ||
|
|
6b309f22a7 | ||
|
|
6f6d7b9c85 | ||
|
|
0cfc9d6ad1 | ||
|
|
a4d2636f2a | ||
|
|
e27f3a6efb | ||
|
|
afaac86fe2 | ||
|
|
308e2b3a6c | ||
|
|
5fe6be6208 | ||
|
|
99dffca3b7 | ||
|
|
91148bf7ae | ||
|
|
e125a2ffc2 | ||
|
|
fd61e55dd8 | ||
|
|
6f35ded9e8 | ||
|
|
c45874b05a | ||
|
|
35ec398f16 | ||
|
|
06e19a0770 | ||
|
|
9675ee7208 | ||
|
|
1a861169bc | ||
|
|
addd8ce830 | ||
|
|
25114033ab | ||
|
|
38eb508e8e | ||
|
|
89c8757d8f | ||
|
|
6be07cc1ca | ||
|
|
bb930e76fe | ||
|
|
ba24e2ac3b | ||
|
|
8096b3b8f7 | ||
|
|
29eaae9534 | ||
|
|
923efd2864 | ||
|
|
fb56579ffe | ||
|
|
2628114ec5 | ||
|
|
49bb59912d | ||
|
|
c646bba646 | ||
|
|
8ac273271d | ||
|
|
f2c459ce6e | ||
|
|
c2c0ab4aff | ||
|
|
59530af556 | ||
|
|
c74b2108e3 | ||
|
|
2e4d94f1e3 | ||
|
|
936b3e69b6 | ||
|
|
cf0b185e58 | ||
|
|
cfc7a7f5bb | ||
|
|
35d22f957a | ||
|
|
3a82d59154 | ||
|
|
545359dd27 | ||
|
|
3a6d56c209 | ||
|
|
f7c086e94e | ||
|
|
157cda4d0c | ||
|
|
6e5de26c6e | ||
|
|
e8397fc78c | ||
|
|
ac982ea5a4 | ||
|
|
137fdd9f47 | ||
|
|
714bc55b35 | ||
|
|
1894dd3811 | ||
|
|
641cca9569 | ||
|
|
3e4c90c623 | ||
|
|
29cb25da56 | ||
|
|
99c2fdab91 | ||
|
|
47e8bc8467 | ||
|
|
daab8c67d2 | ||
|
|
036575c544 | ||
|
|
1c274c4e05 | ||
|
|
343d91009d | ||
|
|
f57ac7a7b3 | ||
|
|
8be404459a | ||
|
|
26d02c9bba | ||
|
|
9be39a67c9 | ||
|
|
ff9658d704 | ||
|
|
66dc2c2dc5 | ||
|
|
e739bc9579 | ||
|
|
df33f6b4d6 | ||
|
|
9546266999 | ||
|
|
5d497e6bf0 | ||
|
|
1ded0242e4 | ||
|
|
b0d2962faf | ||
|
|
2ee8078f4f | ||
|
|
a22806469a | ||
|
|
0dc4279b08 | ||
|
|
ce981dc857 | ||
|
|
19901c6320 | ||
|
|
ed81064335 | ||
|
|
2c4faea84f | ||
|
|
0c4d65e33b | ||
|
|
dcb84b7208 | ||
|
|
3ba4c2d68f | ||
|
|
a41de1f0d3 | ||
|
|
1a33ce65a4 | ||
|
|
eaf9e447be | ||
|
|
99c03c175d | ||
|
|
8d1d66af54 | ||
|
|
6fde84a44b | ||
|
|
9e737d8476 | ||
|
|
9998bd37ea | ||
|
|
ed8e5f362a | ||
|
|
78549bbf44 | ||
|
|
85fad497b3 | ||
|
|
b23b547597 | ||
|
|
7c4c3722a3 | ||
|
|
bf1060ea4f | ||
|
|
706714d97a | ||
|
|
f500d9fdeb | ||
|
|
ab4b956d31 | ||
|
|
6c33c78557 | ||
|
|
537223afa6 | ||
|
|
ec06b2731b | ||
|
|
9c7e4b0621 | ||
|
|
221838cc7e | ||
|
|
5618332409 | ||
|
|
0f460a1ee1 | ||
|
|
ece92f8505 | ||
|
|
5072188aca | ||
|
|
f2c2a937d8 | ||
|
|
5728be389e | ||
|
|
46919751ea | ||
|
|
8092fef4c2 | ||
|
|
63cec5814f | ||
|
|
a274ca4f6d | ||
|
|
45b3fd2815 | ||
|
|
af8377d4eb | ||
|
|
98889edd50 | ||
|
|
537091b4ee | ||
|
|
86b116b1b1 | ||
|
|
c7e717ebc2 | ||
|
|
6bf6f114dc | ||
|
|
b1b54e3520 | ||
|
|
63e22764d2 | ||
|
|
b5dc4403f6 | ||
|
|
9ca8d79de0 | ||
|
|
c924098122 | ||
|
|
dec99558b9 | ||
|
|
cdd917a43d | ||
|
|
d2f6800662 | ||
|
|
ea9f6bce38 | ||
|
|
27a528fb41 | ||
|
|
e36220a4ba | ||
|
|
8993e54b6f | ||
|
|
1863cfb7b1 | ||
|
|
d4024bb72d | ||
|
|
b66091de6c | ||
|
|
9f24a808f1 | ||
|
|
aedf5bde17 | ||
|
|
a71d96eac8 | ||
|
|
531e3e8b83 | ||
|
|
9df6ad12cf | ||
|
|
cc3023b9f9 | ||
|
|
8f085e324a | ||
|
|
c883f6ea32 | ||
|
|
c7e8410e3c | ||
|
|
8848ec858f | ||
|
|
2a49fc17d0 | ||
|
|
df3f17422a | ||
|
|
6ed14addf9 | ||
|
|
5743a9207a | ||
|
|
0c0a9cda1b | ||
|
|
3a6cab844c | ||
|
|
5280f352c8 | ||
|
|
91bb4ca665 | ||
|
|
5da91f6ca9 | ||
|
|
0115953077 | ||
|
|
5a2f1098d8 | ||
|
|
a476ca2ac2 | ||
|
|
55e26ad621 | ||
|
|
bc2962482b | ||
|
|
fad6340715 | ||
|
|
9079024723 | ||
|
|
a2e1c7098c | ||
|
|
239f05ee4d | ||
|
|
fd3635190b | ||
|
|
5a56af3b52 | ||
|
|
982efcf23f | ||
|
|
d3ec0d943a | ||
|
|
bfb37b32d1 | ||
|
|
2a3cee43c3 | ||
|
|
ccc091aac6 | ||
|
|
7507d56cca | ||
|
|
9e04033d47 | ||
|
|
5dc210dec5 | ||
|
|
e8b85f3ba4 | ||
|
|
571f49fa71 | ||
|
|
ba5feb1258 | ||
|
|
40e81addab | ||
|
|
3865b1fb78 | ||
|
|
fa1df30892 | ||
|
|
96e1d75be8 | ||
|
|
53629f439c | ||
|
|
e9514751cf | ||
|
|
98c80b462f | ||
|
|
0dca874db6 | ||
|
|
52b017604a | ||
|
|
5cdc07c7ef | ||
|
|
2870e98ac8 | ||
|
|
45a25bfd0c | ||
|
|
0cee9c6631 | ||
|
|
a90e79de8d | ||
|
|
e04acb2eba | ||
|
|
2bd806fe4f | ||
|
|
f2208fbc2e | ||
|
|
2e3f25ae90 | ||
|
|
ddd104f1ed | ||
|
|
b9bf3de377 | ||
|
|
84a015b52e | ||
|
|
7a17e759c7 | ||
|
|
3b635492c9 | ||
|
|
c5ded275d8 | ||
|
|
427c814104 | ||
|
|
01a793fda0 | ||
|
|
2744354a84 | ||
|
|
2bd58608db | ||
|
|
8cd5cd6de4 | ||
|
|
514871f565 | ||
|
|
48dbfeabc7 | ||
|
|
be296e31c4 | ||
|
|
b3aff0cb9e | ||
|
|
ddb5d86f02 | ||
|
|
f40a7f3e38 | ||
|
|
610f2e9c28 | ||
|
|
9025317883 | ||
|
|
d39b574158 | ||
|
|
77a318545d | ||
|
|
068b60a0eb | ||
|
|
079a136c35 | ||
|
|
7f5c015774 | ||
|
|
80ff4f99b8 | ||
|
|
a1aa0bb502 | ||
|
|
659e2f6736 | ||
|
|
11799434c5 | ||
|
|
1fe80d79c5 | ||
|
|
d3b8c1a743 | ||
|
|
2fd90ce575 | ||
|
|
37d4bb7058 | ||
|
|
18225e8dd1 | ||
|
|
7be044e4ea | ||
|
|
5d2ebe1b3e | ||
|
|
f55f7f8d83 | ||
|
|
b5501f7d72 | ||
|
|
4431283c7e | ||
|
|
3a1ed1e1f9 | ||
|
|
ab3abcbabd | ||
|
|
3fe00109a5 | ||
|
|
c508a4cefd | ||
|
|
b9307262f8 | ||
|
|
fcec2eb93e | ||
|
|
a593814f2b | ||
|
|
67350568f9 | ||
|
|
7def6b34f9 | ||
|
|
dd60d1223b | ||
|
|
c91898bbc5 | ||
|
|
643d1ab239 | ||
|
|
cb51c0bf88 | ||
|
|
07d38a17e9 | ||
|
|
cde5c64d17 | ||
|
|
639221c76c | ||
|
|
4ef218f6fd | ||
|
|
bf6a9ca9b2 | ||
|
|
c8603cfbd4 | ||
|
|
0f92c7e7c9 | ||
|
|
bd84ee4c20 | ||
|
|
e09f7ab574 | ||
|
|
c3517f919d | ||
|
|
fd9bcaa35b | ||
|
|
c76fe47425 | ||
|
|
baa26db411 | ||
|
|
af075ee96e | ||
|
|
b363148710 | ||
|
|
a22d4da95e | ||
|
|
a556290166 | ||
|
|
fe7f782d5b | ||
|
|
e9a0f8f15c | ||
|
|
12aa9fd23d | ||
|
|
acf0269779 | ||
|
|
e18a1061a8 | ||
|
|
8353e139bf | ||
|
|
348f258f24 | ||
|
|
6c4f4da9bf | ||
|
|
60a0876b51 | ||
|
|
dcaa715628 | ||
|
|
3c3227f3c7 | ||
|
|
49cf7e8ee7 | ||
|
|
de8b2a6e33 | ||
|
|
498ff9a228 | ||
|
|
0459e7d3a0 | ||
|
|
10e038932f | ||
|
|
461f2274f8 | ||
|
|
334043f601 | ||
|
|
5d187430a0 | ||
|
|
dcc0264878 | ||
|
|
6b0a174a1e | ||
|
|
e80955f07d | ||
|
|
f1152f8c28 | ||
|
|
e4dbe1b215 | ||
|
|
b6b4684546 | ||
|
|
dca3b3d6d6 | ||
|
|
6c18eb9804 | ||
|
|
46da1e96b7 | ||
|
|
90cc3eb6d2 | ||
|
|
26a34560d5 | ||
|
|
a5cb23092a | ||
|
|
929a2bfd14 | ||
|
|
5dc11a5119 | ||
|
|
9bbb1c0820 | ||
|
|
bc234c129f | ||
|
|
1d2c6bc491 | ||
|
|
48d5d102a2 | ||
|
|
72eb0efaed | ||
|
|
1bec3d3002 | ||
|
|
ab999ba1b3 | ||
|
|
37e4f24b87 | ||
|
|
ba2351f9d1 | ||
|
|
0b361c9166 | ||
|
|
b730cda82e | ||
|
|
d794cfefea | ||
|
|
ef0df52ab4 | ||
|
|
866e3089bf | ||
|
|
2694690e28 | ||
|
|
1cc4c45832 | ||
|
|
8ea5499afd | ||
|
|
b44896215a | ||
|
|
b24629fa37 | ||
|
|
46175d9764 | ||
|
|
2835e518c9 | ||
|
|
56b304ac20 | ||
|
|
f780b83316 | ||
|
|
04e6c38b76 | ||
|
|
8e990cb076 | ||
|
|
549e3eb519 | ||
|
|
6810a34677 | ||
|
|
90b1b2d69b | ||
|
|
057004f4a4 | ||
|
|
5af61b2f4b | ||
|
|
f3a52fe059 | ||
|
|
a85dd254c0 | ||
|
|
6f7576b20e | ||
|
|
3649cd99ba | ||
|
|
f82b3b6304 | ||
|
|
e1a6144c32 | ||
|
|
17e32fc390 | ||
|
|
af7d38b393 | ||
|
|
f94a3aeceb | ||
|
|
a71c084f3a | ||
|
|
f670a15468 | ||
|
|
09555bd45a | ||
|
|
5efb992f04 | ||
|
|
07c13dfef6 | ||
|
|
b4f67513a6 | ||
|
|
b7d8e05f86 | ||
|
|
416a0b6d40 | ||
|
|
5fc59175b9 | ||
|
|
737f9eb02d | ||
|
|
9c757b789a | ||
|
|
d181c9a15c | ||
|
|
287ac924ad | ||
|
|
52b8704d02 | ||
|
|
78e0cf2de7 | ||
|
|
2f9c19e496 | ||
|
|
602ad3b33d | ||
|
|
72a074cec6 | ||
|
|
5fcf543e0b | ||
|
|
9107ebe0d3 | ||
|
|
5e378003d5 | ||
|
|
737184114e | ||
|
|
f48070fe5f | ||
|
|
0c505db0a0 | ||
|
|
73f032021e | ||
|
|
98b79003c2 | ||
|
|
6e2115acb6 | ||
|
|
45cdb9b72c | ||
|
|
4e109ae982 | ||
|
|
d5be43de93 | ||
|
|
b453960d4f | ||
|
|
65c450b47a | ||
|
|
a76adc8142 | ||
|
|
ec63b10b61 | ||
|
|
98c440bee6 | ||
|
|
1f2a058986 | ||
|
|
e4feb7638c | ||
|
|
a5d71e290f | ||
|
|
a1bd6200ec | ||
|
|
807018fb7f | ||
|
|
466fff1a7b | ||
|
|
6f35c53166 | ||
|
|
5a1c9ff0c4 | ||
|
|
1636d1c852 | ||
|
|
2dc64451b4 | ||
|
|
a11e06965e | ||
|
|
566a494f59 | ||
|
|
3a1f5c81b0 | ||
|
|
02032e8f14 | ||
|
|
d677b32855 | ||
|
|
e08e6453fc | ||
|
|
30d5c04c93 | ||
|
|
83b4cfa3d6 | ||
|
|
6b44466cde | ||
|
|
b3f9ec86e3 | ||
|
|
df8a24cdd3 | ||
|
|
86ba99e341 | ||
|
|
448f5fea4c | ||
|
|
8e585f02f8 | ||
|
|
5ffa76a032 | ||
|
|
093172f08d | ||
|
|
3666afffe7 | ||
|
|
e73846b7cf | ||
|
|
b7c3e93105 | ||
|
|
efa35cf12d | ||
|
|
b765ffb773 | ||
|
|
85f737376d | ||
|
|
b721ff745d | ||
|
|
dbca208518 | ||
|
|
9912121f7e | ||
|
|
5afb202093 | ||
|
|
9b7464a2c8 | ||
|
|
8f8416fada | ||
|
|
9045f33c02 | ||
|
|
fba3fb0449 | ||
|
|
f539edc076 | ||
|
|
725671ccd2 | ||
|
|
83b75ef3a6 | ||
|
|
d1246a4bb1 | ||
|
|
c4e2753436 | ||
|
|
19d763c35e | ||
|
|
dace45acd1 | ||
|
|
72657570b6 | ||
|
|
fc43be478f | ||
|
|
1cf6756333 | ||
|
|
c440bfe6d6 | ||
|
|
18135125f9 | ||
|
|
a81d1c0b85 | ||
|
|
4dae14ce8f | ||
|
|
fdcfaa1b02 | ||
|
|
9a1d00fa47 | ||
|
|
0944414367 | ||
|
|
ac0e8d08a1 | ||
|
|
32922cdc47 | ||
|
|
c0c292b285 | ||
|
|
e3cbe1f93c | ||
|
|
d7d5204ce2 | ||
|
|
5b1313fb27 | ||
|
|
8a364f0970 | ||
|
|
18d156eb37 | ||
|
|
f3679aa13d | ||
|
|
155a96478a | ||
|
|
9d9096043e | ||
|
|
cf959c7d66 | ||
|
|
42be56f53c | ||
|
|
a471db07fb | ||
|
|
53ad02103f | ||
|
|
91da09cfbc | ||
|
|
17b5e86228 | ||
|
|
d2d432760d | ||
|
|
e4bbed2803 | ||
|
|
7187db7349 | ||
|
|
f61137937d | ||
|
|
ee1529838a | ||
|
|
51d8e81322 | ||
|
|
19bf91f962 | ||
|
|
7049288fb1 | ||
|
|
4520fd4d2c | ||
|
|
a26eabeec3 | ||
|
|
9160b96f71 | ||
|
|
630ec84aef | ||
|
|
c00125e07c | ||
|
|
93b78f534a | ||
|
|
c75e639630 | ||
|
|
c99512d6bd | ||
|
|
a11c0b85dc | ||
|
|
7ebb4479b0 | ||
|
|
7d075ee1d8 | ||
|
|
d756894722 | ||
|
|
5d4a179013 | ||
|
|
822d55365b | ||
|
|
9f0077abd6 | ||
|
|
6f3dfc139a | ||
|
|
10603d7676 | ||
|
|
7bfebfe484 | ||
|
|
3e3b956906 | ||
|
|
879027daa8 | ||
|
|
93ef45c9dd | ||
|
|
fdda367561 | ||
|
|
1443a31457 | ||
|
|
ee96088ca5 | ||
|
|
255a3577c8 | ||
|
|
3a71b5ca77 | ||
|
|
70124c2602 | ||
|
|
ada4697d02 | ||
|
|
a7676ea773 | ||
|
|
256176d3d5 | ||
|
|
d62f64cc23 | ||
|
|
d602257374 | ||
|
|
3162eb8369 | ||
|
|
66d9dbec1c | ||
|
|
644e6fb4eb | ||
|
|
c3243cf7b4 | ||
|
|
1b305bdc75 | ||
|
|
5dfaa50eb8 | ||
|
|
56fd716298 | ||
|
|
6844535a71 | ||
|
|
e73865897f | ||
|
|
f0da1d1b3c | ||
|
|
61936667e8 | ||
|
|
343c48bd84 | ||
|
|
3423c44afa | ||
|
|
7d98ba770a | ||
|
|
65fb6a676e | ||
|
|
160131bf96 | ||
|
|
5c6d2b5a50 | ||
|
|
b0d8f5bf0d | ||
|
|
29f3be0caf | ||
|
|
b84289b595 | ||
|
|
e69f66c6eb | ||
|
|
1a50f164be | ||
|
|
ab874d5047 | ||
|
|
de1de02a7c | ||
|
|
fa5c2ba123 | ||
|
|
06241d50a3 | ||
|
|
1f1369c34b | ||
|
|
3c4bd60de1 | ||
|
|
fb05f6da35 | ||
|
|
008861a2f3 | ||
|
|
abca901869 | ||
|
|
207b7b2c9d | ||
|
|
a7bac7e9b5 | ||
|
|
193b4a3bb3 | ||
|
|
19bf1fbad7 | ||
|
|
792032baa7 | ||
|
|
f3f001a341 | ||
|
|
fb7c2dbef0 | ||
|
|
42efed6130 | ||
|
|
48fbd3a4cd | ||
|
|
3a619dd7be | ||
|
|
6ede0c8b69 | ||
|
|
426a44277f | ||
|
|
ac4cd59d59 | ||
|
|
a9d87e2707 | ||
|
|
4ec5bd55ed | ||
|
|
b7598a43f2 | ||
|
|
9ffd451afe | ||
|
|
ebd0a0ae05 | ||
|
|
2be1bab6a7 | ||
|
|
ffc50f9bb1 | ||
|
|
f7e2e0eb06 | ||
|
|
2f15278c2e | ||
|
|
f51697316a | ||
|
|
885ec89b64 | ||
|
|
49db23d452 | ||
|
|
5499645b3f | ||
|
|
55aee109ce | ||
|
|
5c3d767621 | ||
|
|
beb7dba2f5 | ||
|
|
e3b8c78bc2 | ||
|
|
f544ff6656 | ||
|
|
2f550ab976 | ||
|
|
9fab1181d0 | ||
|
|
a798865905 | ||
|
|
9877d7dcd1 | ||
|
|
068aab660b | ||
|
|
c64a89d6ce | ||
|
|
2c6fb199dc | ||
|
|
35171dc04e | ||
|
|
f2134f8e9e | ||
|
|
04fcb5d38b | ||
|
|
ffa621a0d1 | ||
|
|
6743105988 | ||
|
|
af1c2b84bf | ||
|
|
a75af9bfd8 | ||
|
|
f64702b7fc | ||
|
|
54b2d434ae | ||
|
|
c1ab82669d | ||
|
|
bd38b7ecfd | ||
|
|
6f69bbc8f3 | ||
|
|
8b39501d28 | ||
|
|
864aa6a6a4 | ||
|
|
5c5d324293 | ||
|
|
ada4d40091 | ||
|
|
144876a380 | ||
|
|
37ed6cdd41 | ||
|
|
66ed6cca3f | ||
|
|
81f481ca70 | ||
|
|
0d8c3a2096 | ||
|
|
45cef612cc | ||
|
|
1f9a318cea | ||
|
|
9343dbf85b | ||
|
|
85e7c7a45e | ||
|
|
03b81b48ee | ||
|
|
151d5d992e | ||
|
|
25d83d7f4a | ||
|
|
0cde4b00fc | ||
|
|
362dd83077 | ||
|
|
96629cbabd | ||
|
|
63247a5acd | ||
|
|
0b1934ba12 | ||
|
|
7337b237ff | ||
|
|
39b18c4f3e | ||
|
|
41fb7e0f1e | ||
|
|
96b8a05432 | ||
|
|
49ea3b6eaf | ||
|
|
7c98e5193e | ||
|
|
0f253283a3 | ||
|
|
95e7ef897e | ||
|
|
a35b0c4950 | ||
|
|
d87c57b201 | ||
|
|
396955fed2 | ||
|
|
7fc4c71a14 | ||
|
|
6554ca06a8 | ||
|
|
38257988ab | ||
|
|
afb903a2eb | ||
|
|
36f104e5ca | ||
|
|
61ea75aa07 | ||
|
|
e2fb36a57f | ||
|
|
d98c0885ad | ||
|
|
8d1c439e2d | ||
|
|
323bfa8f43 | ||
|
|
3255644384 | ||
|
|
0643631aa1 | ||
|
|
9d1d6a34d2 | ||
|
|
2e343b9a57 | ||
|
|
79cb47391e | ||
|
|
bd7851ce1e | ||
|
|
7dbdf28b8b | ||
|
|
14da5f7675 | ||
|
|
85f87fa412 | ||
|
|
0a4307c7af | ||
|
|
df9ef6d8fd | ||
|
|
6923565db1 | ||
|
|
39f23cd909 | ||
|
|
7651f8bdbb | ||
|
|
ee89bf2782 | ||
|
|
d216862635 | ||
|
|
37837828d8 | ||
|
|
5cca4092bd | ||
|
|
fd094c6379 | ||
|
|
a8227b66fa | ||
|
|
1d10b9e99d | ||
|
|
2a26ec4732 | ||
|
|
43f6226db0 | ||
|
|
b99c1e6d8e | ||
|
|
5f6c732aff | ||
|
|
01ebbab0cc | ||
|
|
0f5642d732 | ||
|
|
ad4eb55567 | ||
|
|
afc7e4c2a4 | ||
|
|
3747a3f010 | ||
|
|
e673226ff9 | ||
|
|
90e6f41cf0 | ||
|
|
9c00dfb0bf | ||
|
|
d3832e8fe1 | ||
|
|
f35a53fc7b | ||
|
|
6f1d57c567 | ||
|
|
c28abb9c61 | ||
|
|
3f9f08cf91 | ||
|
|
8048cdd56f | ||
|
|
8e6875183c | ||
|
|
fc26c97bb6 | ||
|
|
05fdab1ef6 | ||
|
|
7fac3f69e9 | ||
|
|
9a24f477a1 | ||
|
|
5c1fe1ffff | ||
|
|
b4ec9c2d43 | ||
|
|
d5acb95b16 | ||
|
|
91975b0fea | ||
|
|
1b804b2295 | ||
|
|
9c0deb5ae3 | ||
|
|
12f099c081 | ||
|
|
1f4f2121c2 | ||
|
|
df548d3c3e | ||
|
|
03d1e13657 | ||
|
|
28c699ef69 | ||
|
|
5374b36de9 | ||
|
|
c841beedde | ||
|
|
37403005cf | ||
|
|
7882751c78 | ||
|
|
0b94504d22 | ||
|
|
6fbf261f8d | ||
|
|
2ad3aba01d | ||
|
|
e8aac8e7bf | ||
|
|
6c9ba91937 | ||
|
|
51056dd986 | ||
|
|
3d98b85800 | ||
|
|
64dbbd40c5 | ||
|
|
6679f92995 | ||
|
|
c0707ce656 | ||
|
|
7b7e30aa64 | ||
|
|
0445e3a264 | ||
|
|
155fd76657 | ||
|
|
9fd437bbd7 | ||
|
|
889256e860 | ||
|
|
e0df1c921b | ||
|
|
dfeeab2cd6 | ||
|
|
443feb7405 | ||
|
|
25b0806fff | ||
|
|
31c98a8822 | ||
|
|
c8f2280162 | ||
|
|
94abd7c058 | ||
|
|
72c5e39c83 | ||
|
|
822af351ad | ||
|
|
edf5851be6 | ||
|
|
a65c5768e5 | ||
|
|
aea03c4e8c | ||
|
|
213bf8c822 | ||
|
|
781e09ee6e | ||
|
|
3af0d587d9 | ||
|
|
fa3a74cec7 | ||
|
|
35748177c6 | ||
|
|
7cd5da0fe8 | ||
|
|
0e7d4916af | ||
|
|
da6ebc1bc0 | ||
|
|
cabee756a6 | ||
|
|
6072380343 | ||
|
|
490e5730c6 | ||
|
|
94f54703c3 | ||
|
|
342cd097be | ||
|
|
6f934210fb | ||
|
|
6db7d0af23 | ||
|
|
430f1b0f9a | ||
|
|
0c75c9d843 | ||
|
|
5da048adf4 | ||
|
|
ae00bb4b29 | ||
|
|
ae79f60677 | ||
|
|
1798049522 | ||
|
|
e50b791b3f | ||
|
|
0d974d5297 | ||
|
|
2db633658b | ||
|
|
3cb86f3e40 | ||
|
|
f2b07ebd32 | ||
|
|
6eb1df8351 | ||
|
|
9964a4dd0d | ||
|
|
5a58a73ceb | ||
|
|
2ccceacc04 | ||
|
|
44ba464b99 | ||
|
|
a17824c749 | ||
|
|
2a8dfe0835 | ||
|
|
40750952c7 | ||
|
|
e6615ecf4e | ||
|
|
d5f4614c93 | ||
|
|
fc1e45ce6e | ||
|
|
16c0cc1c82 | ||
|
|
e01bd218b0 | ||
|
|
aea17f9927 | ||
|
|
07e82cb2e2 | ||
|
|
b2777c087b | ||
|
|
654589873d | ||
|
|
a20e710692 | ||
|
|
a6154fd1cf | ||
|
|
389b6bb50f | ||
|
|
8e709bbb26 | ||
|
|
26bf7deca3 | ||
|
|
87e0662762 | ||
|
|
8423e5e31a | ||
|
|
76d1466f91 | ||
|
|
a7090b993d | ||
|
|
f6d3faae79 | ||
|
|
8502e30a28 | ||
|
|
0d93de1144 | ||
|
|
bfa5754a58 | ||
|
|
8440bb1458 | ||
|
|
cfc67116a7 | ||
|
|
76316a318d | ||
|
|
8db13d6315 | ||
|
|
ef26a08fef | ||
|
|
3f0606ad0b | ||
|
|
cf3b41e0c1 | ||
|
|
992423ab43 | ||
|
|
eb92f61355 | ||
|
|
8ce16f55c7 | ||
|
|
37896293bc | ||
|
|
650a330dd2 | ||
|
|
d9fc703246 | ||
|
|
ced5b90290 | ||
|
|
d8a8ea5c47 | ||
|
|
f9fc6a5852 | ||
|
|
769104c935 | ||
|
|
dd0321f5f8 | ||
|
|
efa013df33 | ||
|
|
35ded29fd9 | ||
|
|
d8be57669b | ||
|
|
cd84528f20 | ||
|
|
00cdb4ce5e | ||
|
|
2f5df47351 | ||
|
|
2721a68a9e | ||
|
|
df29449747 | ||
|
|
83853178bd | ||
|
|
46270c2851 | ||
|
|
fa1aef15bc | ||
|
|
e2ebe69681 | ||
|
|
3921843398 | ||
|
|
8d7e273222 | ||
|
|
ad5bb451ad | ||
|
|
a5284efd12 | ||
|
|
07b7b0037a | ||
|
|
647d3c3eed | ||
|
|
b24444f1b3 | ||
|
|
781e026c8a | ||
|
|
4feab4de7b | ||
|
|
d51b3cf371 | ||
|
|
61f4f912ac | ||
|
|
22d71a71f5 | ||
|
|
3fc0bd1591 | ||
|
|
d61853cf24 | ||
|
|
b110f40bd1 | ||
|
|
8d172c0f0d | ||
|
|
f6f5f709e5 | ||
|
|
7a78f148d6 | ||
|
|
fab16807ad | ||
|
|
a87c856eb4 | ||
|
|
97c4b397dc | ||
|
|
b700474785 | ||
|
|
6752ed088c | ||
|
|
a28899c910 | ||
|
|
3e78a31cfe | ||
|
|
ae246dc6c1 | ||
|
|
4decd84e8f | ||
|
|
91e2576977 | ||
|
|
05031db456 | ||
|
|
f35f358241 | ||
|
|
48aecd9691 | ||
|
|
24c3aca3f1 | ||
|
|
e080313c32 | ||
|
|
ddd02492f4 | ||
|
|
87ed3bfb42 | ||
|
|
fdd1d6dcc9 | ||
|
|
c8556d0e0b | ||
|
|
3bf6c39b7b | ||
|
|
ba58e4c9a9 | ||
|
|
8c12045a3b | ||
|
|
00b574bdc8 | ||
|
|
ccbc703664 | ||
|
|
e344568b1b | ||
|
|
621a7873ef | ||
|
|
743571145b | ||
|
|
638dd1458b | ||
|
|
6c7cac8c4f | ||
|
|
8274ec0bd0 | ||
|
|
3a197b2fe4 | ||
|
|
da04995c7d | ||
|
|
eb41db6d22 | ||
|
|
958de0e22e | ||
|
|
751bb57107 | ||
|
|
d93e2212f9 | ||
|
|
874bb7b88f | ||
|
|
90b0cf47eb | ||
|
|
4745acaa1a | ||
|
|
0dc018ece1 | ||
|
|
4037ed3b63 | ||
|
|
36d830c983 | ||
|
|
79b2d0bb2e | ||
|
|
eb867a7623 | ||
|
|
53758fa20e | ||
|
|
f4852ebe6c | ||
|
|
3a8ce9af6f | ||
|
|
984618f3e7 | ||
|
|
80ba981d94 | ||
|
|
c95c4280d7 | ||
|
|
99b0f0fd3f | ||
|
|
735dd97b1b | ||
|
|
f5fcc3c20b | ||
|
|
620d3c9a14 | ||
|
|
2e46b8fc8c | ||
|
|
489c696ae7 | ||
|
|
64bd5e8214 | ||
|
|
4be23a12f2 | ||
|
|
bc2b9c3383 | ||
|
|
2605e90bf6 | ||
|
|
497d012e5b | ||
|
|
30bddf2c46 | ||
|
|
b0b1a920ae | ||
|
|
dd768162c2 | ||
|
|
53d4a4983f | ||
|
|
5a753f98c6 | ||
|
|
e7511c266f | ||
|
|
7372ca6822 | ||
|
|
2aa54f651a | ||
|
|
23744d6b5b | ||
|
|
2902fadade | ||
|
|
d5ea287b02 | ||
|
|
8b7d1f0ab7 | ||
|
|
71a4e5fda8 | ||
|
|
c105f4c660 | ||
|
|
e802594b6f | ||
|
|
700200c67e | ||
|
|
1bbf5eae32 | ||
|
|
d526de33d8 | ||
|
|
6304430ed6 | ||
|
|
73e815b7fc | ||
|
|
c1c52e38d3 | ||
|
|
f8db84f132 | ||
|
|
6bd2447ee4 | ||
|
|
b78bb469f5 | ||
|
|
2daf046ba6 | ||
|
|
f7db33101f | ||
|
|
0ed47bb119 | ||
|
|
363d1d8f9c | ||
|
|
fdef388758 | ||
|
|
ee460917af | ||
|
|
a401239664 | ||
|
|
2ed5594649 | ||
|
|
f539b7ba7d | ||
|
|
d0b6e14087 | ||
|
|
15e5025a73 | ||
|
|
9d8d5a5bfb | ||
|
|
0057d758e3 | ||
|
|
34167a36c2 | ||
|
|
cb4820725e | ||
|
|
3a83ee3021 | ||
|
|
5fb692cae5 | ||
|
|
aa962c15bf | ||
|
|
6d3e010723 | ||
|
|
a195ff95ac | ||
|
|
1bbbbdd20f | ||
|
|
f11033e739 | ||
|
|
ddd4123336 | ||
|
|
9c3b365a88 | ||
|
|
5a5c56986a | ||
|
|
c2a6e9091f | ||
|
|
a443d31410 | ||
|
|
b8a8bfc0c6 | ||
|
|
c6676c73dc | ||
|
|
0bba545283 | ||
|
|
44cd6de2e1 | ||
|
|
95981778cf | ||
|
|
77ddc5b9af | ||
|
|
36adff362c | ||
|
|
e0b9ea8c8a | ||
|
|
b8b7870652 | ||
|
|
ca43ba18e9 | ||
|
|
6abaee4262 | ||
|
|
0350e79d2a | ||
|
|
bab5a90d4c | ||
|
|
2e61581435 | ||
|
|
787fa15860 | ||
|
|
d9384de2f5 | ||
|
|
7590da92b1 | ||
|
|
67fea022fa | ||
|
|
8fc2102faa | ||
|
|
9295acb774 | ||
|
|
38ccd2fdf3 | ||
|
|
5921e5313f | ||
|
|
e4c2d37adc | ||
|
|
0be62728aa | ||
|
|
8139567b60 | ||
|
|
d8d9de1a02 | ||
|
|
3f34f86916 | ||
|
|
d28707dbce | ||
|
|
f4eb54529b | ||
|
|
f07ae7a9da | ||
|
|
f16c1da957 | ||
|
|
aeeced147c | ||
|
|
cd1d937f90 | ||
|
|
c04a1a7287 | ||
|
|
a78bc443ae | ||
|
|
0238898382 | ||
|
|
86cb03ac70 | ||
|
|
a41969e09b | ||
|
|
574ca77c41 | ||
|
|
cce2adfb93 | ||
|
|
cce4acbb68 | ||
|
|
92eb729bad | ||
|
|
9c0f42ecfe | ||
|
|
de8404441b | ||
|
|
bc5556d62b | ||
|
|
d784fdb059 | ||
|
|
1b3c360c23 | ||
|
|
074acedbff | ||
|
|
82e5236a8b | ||
|
|
fa23044564 | ||
|
|
6dedf3d49d | ||
|
|
78fddb8432 | ||
|
|
c84bad0ef6 | ||
|
|
daa6e418bc | ||
|
|
cdb97a6678 | ||
|
|
d3bb5ec198 | ||
|
|
9d27b3a068 | ||
|
|
4dbcd69e3e | ||
|
|
4efe20c957 | ||
|
|
6f12c61cf3 | ||
|
|
701f649aa3 | ||
|
|
c9c1eeed7d | ||
|
|
e0b369e4f7 | ||
|
|
ee311214e0 | ||
|
|
dd520bf314 | ||
|
|
5c97aeb8d8 | ||
|
|
ab07b6c221 | ||
|
|
8d9a8610b8 | ||
|
|
726e90aacf | ||
|
|
1eac2a7141 | ||
|
|
1bdd46832a | ||
|
|
4e26f1074c | ||
|
|
b690b7da0f | ||
|
|
1939d96944 | ||
|
|
14198bf768 | ||
|
|
32081125a0 | ||
|
|
cf3d045e51 | ||
|
|
1aa934c81b | ||
|
|
e857a5bdb3 | ||
|
|
6bd87c0aee | ||
|
|
e59581c56a | ||
|
|
e732faec95 | ||
|
|
e7f3e9ff01 | ||
|
|
58e3b14c18 | ||
|
|
d2c83f5493 | ||
|
|
4f4b602ec7 | ||
|
|
70864e6163 | ||
|
|
7de8354855 | ||
|
|
a5bfa2726b | ||
|
|
f7214cf9ea | ||
|
|
f6e495f54c | ||
|
|
d1a7254529 | ||
|
|
1578486285 | ||
|
|
da5553b095 | ||
|
|
83dc830b16 | ||
|
|
d3c5e8b2f5 | ||
|
|
a9398e0185 | ||
|
|
1729b92cde | ||
|
|
cc5ee8a92a | ||
|
|
1f94d162e2 | ||
|
|
ec0c2ec725 | ||
|
|
1c2ce22620 | ||
|
|
48c7d6dba9 | ||
|
|
3b58d94590 | ||
|
|
58b4857766 | ||
|
|
ae3b770e4e | ||
|
|
7b59b3c7a8 | ||
|
|
53e336e9ff | ||
|
|
78d620ebb5 | ||
|
|
2053283304 | ||
|
|
4ef6251403 | ||
|
|
e4bbd8da16 | ||
|
|
fb934873d6 | ||
|
|
260421a21e | ||
|
|
b21b511d4c | ||
|
|
cb2eb17b2f | ||
|
|
ce3f1a40c5 | ||
|
|
44a47e6db2 | ||
|
|
dfc8a9ee00 | ||
|
|
91650b3e4d | ||
|
|
be5e61815d | ||
|
|
d239d74b1c | ||
|
|
f7fb2e703e | ||
|
|
90f30a710a | ||
|
|
bf0b542d67 | ||
|
|
48041365b3 | ||
|
|
9ca880a250 | ||
|
|
ac4b5622ce | ||
|
|
7737d5c658 | ||
|
|
5f8204394e | ||
|
|
23892e4935 | ||
|
|
b701652a49 | ||
|
|
988833324a | ||
|
|
2ad6b513b3 | ||
|
|
183da6d9b4 | ||
|
|
b24f119d67 | ||
|
|
bb99ad6d82 | ||
|
|
bed85caf87 | ||
|
|
afd6e470f6 | ||
|
|
31068b7c4a | ||
|
|
2fc34ae66e | ||
|
|
f6eda7f80c | ||
|
|
3894c46c27 | ||
|
|
09a81ff740 | ||
|
|
04f899fc46 | ||
|
|
f484dc791a | ||
|
|
41862d13a8 | ||
|
|
1f2c5c5385 | ||
|
|
0a8eb59983 | ||
|
|
4831c8b8a9 | ||
|
|
99c09c4dec | ||
|
|
ee58ea2689 | ||
|
|
c592004430 | ||
|
|
c1fbe4103a | ||
|
|
b825f158e4 | ||
|
|
9226e7d6f0 | ||
|
|
d1927cee97 | ||
|
|
78aa0c3427 | ||
|
|
87c4db0969 | ||
|
|
27801b8ab1 | ||
|
|
c6411c0c3b | ||
|
|
625bb5ddb5 | ||
|
|
4c52783b3d | ||
|
|
69366bf42f | ||
|
|
25721b5cec | ||
|
|
ffa150bc90 | ||
|
|
dae80f3caf | ||
|
|
82d9c9ec29 | ||
|
|
d9831893ab | ||
|
|
1954be6e9c | ||
|
|
fae684e898 | ||
|
|
1265581502 | ||
|
|
856f054410 | ||
|
|
07a69a18c2 | ||
|
|
2751a95abd | ||
|
|
8078f1a5f6 | ||
|
|
471a7be7a0 | ||
|
|
19973b6ad9 | ||
|
|
e11887a77d | ||
|
|
ea08ff6e14 | ||
|
|
d38936cdae | ||
|
|
4653f91c13 | ||
|
|
b985b5d6e4 | ||
|
|
2b2a40bebb | ||
|
|
b9e9adce0b | ||
|
|
5e3b0bc19f | ||
|
|
c76f951a74 | ||
|
|
4e53a25855 | ||
|
|
7c52c4b943 | ||
|
|
7ade0c634a | ||
|
|
8ae3b713b2 | ||
|
|
d97370feca | ||
|
|
47a6989c10 | ||
|
|
034df411c1 | ||
|
|
0ab292cbc1 | ||
|
|
9748d5a9e8 | ||
|
|
3a78e3e75b | ||
|
|
6ccec4492e | ||
|
|
f93ae788c3 | ||
|
|
72a087e047 | ||
|
|
7b64fef33c | ||
|
|
2da2d9a476 | ||
|
|
9658298721 | ||
|
|
8318fbf8cc | ||
|
|
2ba20ec65a | ||
|
|
3dfa9cfdce | ||
|
|
d67c14c0f4 | ||
|
|
9fa48022e5 | ||
|
|
3acb7727ce | ||
|
|
f5012827df | ||
|
|
2047672684 | ||
|
|
ba999c531e | ||
|
|
f836e41460 | ||
|
|
f641471498 | ||
|
|
6a0766ed22 | ||
|
|
43a2b0e76a | ||
|
|
73652699dd | ||
|
|
a0d3518460 | ||
|
|
d22200f020 | ||
|
|
4d45f69e36 | ||
|
|
7237c033b0 | ||
|
|
13a7fcdf37 | ||
|
|
fcfed4f2f2 | ||
|
|
3231ea64f4 | ||
|
|
82165a334b | ||
|
|
edf0b54338 | ||
|
|
af9e1f5b9e | ||
|
|
5f3249a0a1 | ||
|
|
4707fb50cc | ||
|
|
d7762337cb | ||
|
|
e0a46554c3 | ||
|
|
f7b190d312 | ||
|
|
0ee90cb77e | ||
|
|
1eaf3a5ff4 | ||
|
|
87621bc247 | ||
|
|
5c34eee94d | ||
|
|
34a7ceeff4 | ||
|
|
ea237a4d25 | ||
|
|
c668670391 | ||
|
|
7e2a24dca9 | ||
|
|
7376eb87aa | ||
|
|
c3c3b089ad | ||
|
|
bf651baa36 | ||
|
|
752d6837c3 | ||
|
|
fb883a521e | ||
|
|
daaba9859b | ||
|
|
1fd5699a4a | ||
|
|
8b283dbb3a | ||
|
|
7b382b7125 | ||
|
|
e10390ddd7 | ||
|
|
89875e96ba | ||
|
|
333961ae70 | ||
|
|
2255b2d204 | ||
|
|
a3bb7bfc06 | ||
|
|
1a1b7374b8 | ||
|
|
d262a92f0f | ||
|
|
d82718fed0 | ||
|
|
1d92b2e550 | ||
|
|
2b208f5308 | ||
|
|
7ce343e499 | ||
|
|
511d0c72b8 | ||
|
|
8d4ac79436 | ||
|
|
9444b8818f | ||
|
|
5c912cb1c3 | ||
|
|
5bc528fa4d | ||
|
|
77d5034847 | ||
|
|
f3443867e9 | ||
|
|
eac5ba3e59 | ||
|
|
56fb6ba179 | ||
|
|
d373325efd | ||
|
|
7299712c86 | ||
|
|
4bbd453783 | ||
|
|
f55df18187 | ||
|
|
ac611700e5 | ||
|
|
504b5cd0e2 | ||
|
|
8272dc2f58 | ||
|
|
09f3e09e9e | ||
|
|
084d648b10 | ||
|
|
afbdc649f8 | ||
|
|
afa98843e4 | ||
|
|
64cd52efd1 | ||
|
|
b440d0ef72 | ||
|
|
d14ba6a798 | ||
|
|
854bc8da75 | ||
|
|
aeec782b02 | ||
|
|
d214fbbd87 | ||
|
|
5d5269f87f | ||
|
|
a87d46f732 | ||
|
|
d12ae80889 | ||
|
|
a73c8dbb43 | ||
|
|
98e43917dc | ||
|
|
baf3124953 | ||
|
|
2d658967e1 | ||
|
|
efa20585b3 | ||
|
|
8cacfb85a8 | ||
|
|
5e09054af6 | ||
|
|
4f0645eb79 | ||
|
|
887e2ec9ec | ||
|
|
0dab03ba8f | ||
|
|
f60ba0d35e | ||
|
|
6741ae92f3 | ||
|
|
360b410367 | ||
|
|
fc43de0d4a | ||
|
|
f93286397e | ||
|
|
24d3d37546 | ||
|
|
6608043fd4 | ||
|
|
4c15ef55a2 | ||
|
|
bfdfd7c26c | ||
|
|
2c05165173 | ||
|
|
ec0f7277cb | ||
|
|
d7c2a02dea | ||
|
|
43835aac48 | ||
|
|
7d0432c9e4 | ||
|
|
e8143e72e1 | ||
|
|
0fd30252c8 | ||
|
|
88c8f4921f | ||
|
|
0855c50e65 | ||
|
|
9bff7a69a8 | ||
|
|
42868896df | ||
|
|
cd6d73d5b8 | ||
|
|
34760e662e | ||
|
|
b5338b23a1 | ||
|
|
778d45049c | ||
|
|
2f15776ccc | ||
|
|
2b75062a0f | ||
|
|
21a9cc028d | ||
|
|
2b393b0f0a | ||
|
|
f5577aae4a | ||
|
|
16850919ff | ||
|
|
3a25220822 | ||
|
|
5567806b67 | ||
|
|
3b0ff842bf | ||
|
|
113f64e09a | ||
|
|
15f29f06ed | ||
|
|
ed1cf8456f | ||
|
|
b2b78421d9 | ||
|
|
41ec8b1803 | ||
|
|
4a7cc0f219 | ||
|
|
5e4c24bcb3 | ||
|
|
dabf9ef8c1 | ||
|
|
4782ac80b0 | ||
|
|
d8ea2acf5f | ||
|
|
ad09083c37 | ||
|
|
b93775c203 | ||
|
|
e80e82cbb9 | ||
|
|
ae6241685c | ||
|
|
38546f08c6 | ||
|
|
2c33e8a1c5 | ||
|
|
f1f33de332 | ||
|
|
80e955c7dd | ||
|
|
ffff3ae56f | ||
|
|
41a0e8b304 | ||
|
|
4b7576fb80 | ||
|
|
5de62c47a8 | ||
|
|
87a449c8ac | ||
|
|
ddde6b7cf8 | ||
|
|
4a39616da4 | ||
|
|
5196a7a03b | ||
|
|
6d3bc9b8cf | ||
|
|
c5185470fe | ||
|
|
4bfb632077 | ||
|
|
6fe16a8769 | ||
|
|
681fc61c4c | ||
|
|
75c299c383 | ||
|
|
67256678f0 | ||
|
|
1c8f6d8fb0 | ||
|
|
0d9ccc55ed | ||
|
|
0a0f3a46fb | ||
|
|
6183bb9e5b | ||
|
|
463764c893 | ||
|
|
86c8e17f25 | ||
|
|
25c751e9ad | ||
|
|
899620c2d6 | ||
|
|
f0ff4692ff | ||
|
|
e862ed1c22 | ||
|
|
fecf1c7e4d | ||
|
|
94568b600a | ||
|
|
2f6fa46d41 | ||
|
|
ddd5d9daf0 | ||
|
|
80f0c0f58f | ||
|
|
d689e3462c | ||
|
|
c72d9c5285 | ||
|
|
7213859d11 | ||
|
|
d8519dc718 | ||
|
|
015c200b1f | ||
|
|
36b904a7fd | ||
|
|
d10afb3916 | ||
|
|
692519b1ed | ||
|
|
a3d9181e00 | ||
|
|
3754d6987c | ||
|
|
40bc83559d | ||
|
|
92c427b189 | ||
|
|
34c3c0e01d | ||
|
|
b6c5e1373b | ||
|
|
bf1dfffd8c | ||
|
|
c88f9fe66b | ||
|
|
97074ed965 | ||
|
|
f0e6f57f71 | ||
|
|
a4e11558b8 | ||
|
|
0e16387db1 | ||
|
|
855e6fb073 | ||
|
|
5498d90312 | ||
|
|
0267768edd | ||
|
|
281f69ede2 | ||
|
|
870cbeaa45 | ||
|
|
8fc8bd2cc4 | ||
|
|
91a414c7d1 | ||
|
|
709d3073e7 | ||
|
|
98280e3d43 | ||
|
|
6587f7e1e9 | ||
|
|
d8f961bbda | ||
|
|
4f92ed5fc0 | ||
|
|
9ede3cc511 | ||
|
|
e335496a32 | ||
|
|
e51aae3829 | ||
|
|
7455af41d1 | ||
|
|
3aeec28604 | ||
|
|
71748af833 | ||
|
|
9cb3e8816a | ||
|
|
239db37c94 | ||
|
|
a2c95a7224 | ||
|
|
12d1ff4c18 | ||
|
|
492900b985 | ||
|
|
515ab8a62e | ||
|
|
5a8a5605b8 | ||
|
|
c86360b830 | ||
|
|
fc6c4a67ae | ||
|
|
193dd95834 | ||
|
|
3ca9122fec | ||
|
|
4c4aca8166 | ||
|
|
4819fad905 | ||
|
|
fd27996dac | ||
|
|
135ae0062f | ||
|
|
048f6b436b | ||
|
|
fc1840e881 | ||
|
|
966083e95f | ||
|
|
144f7795ee | ||
|
|
b9365a26a1 | ||
|
|
87a5c73d66 | ||
|
|
029b6dc77c | ||
|
|
2c33a38bac | ||
|
|
aa0c71acad | ||
|
|
dd9f06f0d5 | ||
|
|
501090aaa6 | ||
|
|
32cb2c70c4 | ||
|
|
e644670b68 | ||
|
|
53dd6ce4f0 | ||
|
|
8623c11e08 | ||
|
|
0352f17687 | ||
|
|
311d802790 | ||
|
|
5078cce81c | ||
|
|
978b10964c | ||
|
|
45a212c4d7 | ||
|
|
bd3143f040 | ||
|
|
edd0b509ba | ||
|
|
c786f427f9 | ||
|
|
d053ce62cd | ||
|
|
8936601084 | ||
|
|
5a3dfef732 | ||
|
|
0de7fa5939 | ||
|
|
b87dfd2854 | ||
|
|
f3e06df7e8 | ||
|
|
ae1d7d4b2e | ||
|
|
dbba399be0 | ||
|
|
cf8f60f0ea | ||
|
|
0f2859689a | ||
|
|
bea3f28d28 | ||
|
|
fcb28e7634 | ||
|
|
d22d102808 | ||
|
|
f88a0ae6d7 | ||
|
|
090eb73510 | ||
|
|
d6cc73e4e7 | ||
|
|
b02d0177c1 | ||
|
|
87791f3bf2 | ||
|
|
985b950a9b | ||
|
|
9d40799551 | ||
|
|
de07a6a59c | ||
|
|
e6cd2a1785 | ||
|
|
a874c8c65f | ||
|
|
edd6cf20e1 | ||
|
|
caaeaf925f | ||
|
|
0095b787fe | ||
|
|
ce05de2950 | ||
|
|
d19206b9a5 | ||
|
|
fbb0b559ae | ||
|
|
fe84b48a94 | ||
|
|
3f7a63e6a3 | ||
|
|
3b5f61a025 | ||
|
|
bba6837732 | ||
|
|
971a5dd11a | ||
|
|
f6e5739a68 | ||
|
|
6c5879f380 | ||
|
|
bb105f24cc | ||
|
|
38433ccc58 | ||
|
|
e4c2a0eb0c | ||
|
|
cbfc7ce756 | ||
|
|
52c7a68b8d | ||
|
|
087454609e | ||
|
|
b636aaeb6f | ||
|
|
20abbc6fff | ||
|
|
40d5fa35d0 | ||
|
|
be7e8b0cb5 | ||
|
|
1b380ec225 | ||
|
|
98a9c4d468 | ||
|
|
152a44c6cd | ||
|
|
da012ab661 | ||
|
|
894b773c86 | ||
|
|
bc09cf3c2b | ||
|
|
fcfb9a5794 | ||
|
|
bd22c2b975 | ||
|
|
fa7db9c377 | ||
|
|
99d70e3a47 | ||
|
|
a11f778d76 | ||
|
|
a63c31cff5 | ||
|
|
f0e3d2b422 | ||
|
|
321bbd41f9 | ||
|
|
684623ce92 | ||
|
|
8be429a5dd | ||
|
|
f73e73ba0e | ||
|
|
f5e0d03970 | ||
|
|
8d352247ec | ||
|
|
a650cfa286 | ||
|
|
0c32d96ddd | ||
|
|
c12cffc543 | ||
|
|
30a43cc2ae | ||
|
|
10af6d53bc | ||
|
|
14d9ab351c | ||
|
|
1ac7e17e86 | ||
|
|
bc8bb6d458 | ||
|
|
cebd1fcec0 | ||
|
|
cd65a3dc87 | ||
|
|
4bdb53cafb | ||
|
|
b9fff8ee83 | ||
|
|
3e9a299231 | ||
|
|
e00f41eb81 | ||
|
|
3332240318 | ||
|
|
bee01a3c16 | ||
|
|
0e4c2a17ca | ||
|
|
386eda0224 | ||
|
|
007d67da94 | ||
|
|
16c8d5e76a | ||
|
|
9e18a4bc6c | ||
|
|
df02bd1b3f | ||
|
|
ed4633c93a | ||
|
|
b1d71358a9 | ||
|
|
4176c79964 | ||
|
|
9d4d3e3833 | ||
|
|
5d7022b041 | ||
|
|
9cc8337832 | ||
|
|
1f6ce8f5ba | ||
|
|
3d22d0b89b | ||
|
|
c2ced000f4 | ||
|
|
8bb683b627 | ||
|
|
8ecc971618 | ||
|
|
d9bf4858fc | ||
|
|
3e8bbbd190 | ||
|
|
a941b83241 | ||
|
|
72ed528a94 | ||
|
|
c83ae9ea6d | ||
|
|
e461a24113 | ||
|
|
4526c87eec | ||
|
|
2fd9eb509d | ||
|
|
5abc2c5d4c | ||
|
|
e15cd6fdbe | ||
|
|
a4c8d1389f | ||
|
|
62b8f54877 | ||
|
|
ae53c8a705 | ||
|
|
c934f655f9 | ||
|
|
c926a82d82 | ||
|
|
cb5965fb95 | ||
|
|
3d5c5be547 | ||
|
|
4d3d729c16 | ||
|
|
b2a941de06 | ||
|
|
126aa70f10 | ||
|
|
81d72d7e2e | ||
|
|
392c252efd | ||
|
|
b9b2480f4f | ||
|
|
ddf83a2fce | ||
|
|
eaa1fa16c4 | ||
|
|
38cee12dcf | ||
|
|
d945527305 | ||
|
|
ba94a1bba3 | ||
|
|
70205e5a6d | ||
|
|
bdee35d0e0 | ||
|
|
d11fec5015 | ||
|
|
ed45d6c930 | ||
|
|
3033ebb20f | ||
|
|
301f1aa384 | ||
|
|
24e37645e7 | ||
|
|
3e326ece9e | ||
|
|
76bfacfd7c | ||
|
|
14e37081ff | ||
|
|
9a655876e5 | ||
|
|
586d1d5abd | ||
|
|
cccce5d058 | ||
|
|
f35ec68fb0 | ||
|
|
5770a1e488 | ||
|
|
b62fa913d4 | ||
|
|
27333f8c34 | ||
|
|
9f37dc8cab | ||
|
|
df3eece32d | ||
|
|
56ced709af | ||
|
|
bf690dcb51 | ||
|
|
6516525083 | ||
|
|
319b9a5467 | ||
|
|
8cba090c58 | ||
|
|
977b50f868 | ||
|
|
846c2d4a0e | ||
|
|
6cfea33477 | ||
|
|
d4dd317b58 | ||
|
|
278bc4b37f | ||
|
|
f90a39213e | ||
|
|
512f8d5d78 | ||
|
|
d1dd22f92e | ||
|
|
77f633425b | ||
|
|
6080a0eb63 | ||
|
|
a67255363a | ||
|
|
18b6c8cd8a | ||
|
|
4af099bda9 | ||
|
|
1cfefe8cb6 | ||
|
|
67a9468522 | ||
|
|
78b123cd69 | ||
|
|
6f5155a95c | ||
|
|
b75ef85f42 | ||
|
|
b4853b779e | ||
|
|
0c056f0e27 | ||
|
|
483a0cf804 | ||
|
|
f149d8643e | ||
|
|
0cf7d8aa0b | ||
|
|
cb0fdf3cfa | ||
|
|
610cf3676e | ||
|
|
da4849fb30 | ||
|
|
983bebbea3 | ||
|
|
ac2e2b82bc | ||
|
|
5720df78ad | ||
|
|
8546e23902 | ||
|
|
3577d3a33b | ||
|
|
7a635e004e | ||
|
|
5c9efb36a6 | ||
|
|
a2320a6bf8 | ||
|
|
debb7354d1 | ||
|
|
0e0ef590b2 | ||
|
|
d860c34ff0 | ||
|
|
7c93b2443c | ||
|
|
71ae411a63 | ||
|
|
76544f80e4 | ||
|
|
6ca24c64a5 | ||
|
|
8fe9bf61ef | ||
|
|
b86d7622b3 | ||
|
|
a83531bb62 | ||
|
|
7fd392c2d0 | ||
|
|
60e270a490 | ||
|
|
9acb626fc1 | ||
|
|
56a4a63c10 | ||
|
|
a367d42640 | ||
|
|
8419c01304 | ||
|
|
cf48eb9abd | ||
|
|
807522fc9a | ||
|
|
b81a4630a3 | ||
|
|
b28a31ca02 | ||
|
|
ad88297e2f | ||
|
|
bb74140def | ||
|
|
6db3970811 | ||
|
|
3a5e21881a | ||
|
|
5fbb2cd3b1 | ||
|
|
9bc97a3d91 | ||
|
|
71b405df4e | ||
|
|
197b049b8b | ||
|
|
2fc000d756 | ||
|
|
1707626650 | ||
|
|
db28ddb4da | ||
|
|
534ff676a9 | ||
|
|
2662b40cac | ||
|
|
d87080b721 | ||
|
|
3511853943 | ||
|
|
62534beb2f | ||
|
|
9e7b5ce61b | ||
|
|
f2841d3770 | ||
|
|
eeaab720f6 | ||
|
|
89f2dfa4c3 | ||
|
|
b66a938342 | ||
|
|
c855ef6768 | ||
|
|
f6dbbe9864 | ||
|
|
2770bcb21c | ||
|
|
0b953ffc65 | ||
|
|
40b0bafbb2 | ||
|
|
ba70d6a417 | ||
|
|
05d8dce9d0 | ||
|
|
5725f94aac | ||
|
|
552fc624f2 | ||
|
|
e443c944cf | ||
|
|
f8edca2e9a | ||
|
|
0b6ba547fa | ||
|
|
7b4fd36b03 | ||
|
|
0a112d8696 | ||
|
|
09e4b0c5d3 | ||
|
|
dc9e499c62 | ||
|
|
d326f4a242 | ||
|
|
97f98001a3 | ||
|
|
991425fe05 | ||
|
|
4c8d1ecce2 | ||
|
|
61f25155ac | ||
|
|
6d8ae5abb5 | ||
|
|
e24e0f0744 | ||
|
|
cd94ba397e | ||
|
|
a7c66ad2e5 | ||
|
|
6e53e27c50 | ||
|
|
ff7fefe679 | ||
|
|
86f5f0342d | ||
|
|
15940c9af3 | ||
|
|
f3fecfe6d7 | ||
|
|
9a7b408c11 | ||
|
|
9551530615 | ||
|
|
c15f80eaef | ||
|
|
b38dbd4622 | ||
|
|
f07217c9e2 | ||
|
|
84c960ce6d | ||
|
|
763b5f34c3 | ||
|
|
be5048f166 | ||
|
|
ca27381df1 | ||
|
|
8123eee875 | ||
|
|
7c60908ffb | ||
|
|
47705af5da | ||
|
|
795bee8496 | ||
|
|
7b230f61db | ||
|
|
a3f0169880 | ||
|
|
3b2e4fd9b0 | ||
|
|
0346983290 | ||
|
|
d8169c9f3b | ||
|
|
0a3471fc78 | ||
|
|
993a22756e | ||
|
|
953c5b6f8b | ||
|
|
23466d6a33 | ||
|
|
74f92e6a3f | ||
|
|
8e7b703a62 | ||
|
|
1264b4050c | ||
|
|
6cb142fa3b | ||
|
|
0afe519a43 | ||
|
|
dc013d4640 | ||
|
|
8ff0208d31 | ||
|
|
f47b661141 | ||
|
|
aba9f1af60 | ||
|
|
5797b821dc | ||
|
|
7c54c7018e | ||
|
|
92b197f0da | ||
|
|
82d716fd0d | ||
|
|
611125a292 | ||
|
|
2281490485 | ||
|
|
d509b81210 | ||
|
|
84ef51a632 | ||
|
|
d2ed2f661b | ||
|
|
8de7ed3abe | ||
|
|
d52fb7e3d1 | ||
|
|
4367a01036 | ||
|
|
5536b2b5a9 | ||
|
|
83784bf63f | ||
|
|
e4558768ae | ||
|
|
3d65390e21 | ||
|
|
8371a2c0d4 | ||
|
|
3c4eb0880b | ||
|
|
9c575e51de | ||
|
|
1f62bc2d08 | ||
|
|
0be248fa9a | ||
|
|
951a954b77 | ||
|
|
ac7d97dcbb | ||
|
|
43638c674a | ||
|
|
f9e029184b | ||
|
|
bfc81252c0 | ||
|
|
4e3ccd2692 | ||
|
|
addb2e1650 | ||
|
|
bf7cac033b | ||
|
|
f1ee982506 | ||
|
|
f8785e96c9 | ||
|
|
24e1217be3 | ||
|
|
9187a35b6c | ||
|
|
19fdeff433 | ||
|
|
e2053f9c7a | ||
|
|
aed9e2269c | ||
|
|
bb1ff049fb | ||
|
|
4f71866470 | ||
|
|
481911c78c | ||
|
|
f18e874ad5 | ||
|
|
e8cd00835e | ||
|
|
00c35bd214 | ||
|
|
82f2e33a8d | ||
|
|
6949328d7d | ||
|
|
f6c0068fc1 | ||
|
|
36d2c5387d | ||
|
|
58ad497833 | ||
|
|
79b4cda076 | ||
|
|
0377dca227 | ||
|
|
7d4d1ce48c | ||
|
|
038ccac511 | ||
|
|
c81eb1f5f5 | ||
|
|
7958202031 | ||
|
|
599f52253a | ||
|
|
ff3c2a9478 | ||
|
|
6624b687bc | ||
|
|
5f0be01356 | ||
|
|
9cdc838613 | ||
|
|
86ea5f93d7 | ||
|
|
48b6242aa1 | ||
|
|
881a87ecba | ||
|
|
654c2d2836 | ||
|
|
075866d840 | ||
|
|
4f7a0e3671 | ||
|
|
8fb1857b40 | ||
|
|
57dc57f14d | ||
|
|
230b31febf | ||
|
|
2688e2f972 | ||
|
|
bf5988e533 | ||
|
|
6ece03f267 | ||
|
|
b2b43463af | ||
|
|
b3c36e6b94 | ||
|
|
9d803d8c0b | ||
|
|
79830d591a | ||
|
|
af646e865f | ||
|
|
e0269579a5 | ||
|
|
48a05a5188 | ||
|
|
84e106c09d | ||
|
|
57cac1fa54 | ||
|
|
f8c3b4f310 | ||
|
|
3a108ed868 | ||
|
|
eacbd31775 | ||
|
|
b636d32261 | ||
|
|
c99f384dce | ||
|
|
27afa7d966 | ||
|
|
b970480948 | ||
|
|
18c5e64c5b | ||
|
|
a7b9fb9110 | ||
|
|
2076d0a15f | ||
|
|
c4b465f63e | ||
|
|
b443f7b628 | ||
|
|
86902b8e36 | ||
|
|
06508f1c9b | ||
|
|
d5e78b7bf4 | ||
|
|
bc680b12d0 | ||
|
|
dffb70f330 | ||
|
|
1e8f1da65b | ||
|
|
19ab485189 | ||
|
|
21a3cbd0d8 | ||
|
|
304ad60f7d | ||
|
|
62ec6418d4 | ||
|
|
e559a6901a | ||
|
|
c2871f0380 | ||
|
|
4e2531378f | ||
|
|
e4f880eddd | ||
|
|
3411d11761 | ||
|
|
a179012e37 | ||
|
|
ec00c33578 | ||
|
|
a15b44dbfa | ||
|
|
ce574ff506 | ||
|
|
9260a56151 | ||
|
|
756ceb8935 | ||
|
|
3bb6680655 | ||
|
|
c7428d49ac | ||
|
|
97c8d0bbbd | ||
|
|
27e166b875 | ||
|
|
e6b6d16de7 | ||
|
|
a9e642e2f8 | ||
|
|
81a3170b15 | ||
|
|
e43232dee8 | ||
|
|
7481266e4e | ||
|
|
3a7b142b62 | ||
|
|
a889bd27ef | ||
|
|
41253be442 | ||
|
|
f013dacf0a | ||
|
|
c75eba3b41 | ||
|
|
4a86d779ff | ||
|
|
b6f8435664 | ||
|
|
d00de23b15 | ||
|
|
d9785c14bf | ||
|
|
d96f41e016 | ||
|
|
a46726fdba | ||
|
|
6e7fb6eaa5 | ||
|
|
1178a412d2 | ||
|
|
0a69b26ed6 | ||
|
|
3d9569b232 | ||
|
|
f08abe311b | ||
|
|
aa7cfc463a | ||
|
|
5568e613ee | ||
|
|
fe126d8b34 | ||
|
|
5a164c8ca9 | ||
|
|
3ca377638a | ||
|
|
c7911c7e8f | ||
|
|
fd49bf0214 | ||
|
|
feaedfcf84 | ||
|
|
3ada834e30 | ||
|
|
ea339205a9 | ||
|
|
527b5a511c | ||
|
|
182e10691f | ||
|
|
f190c11b1f | ||
|
|
4d03a21f23 | ||
|
|
ef04a0aa26 | ||
|
|
8e9655f863 | ||
|
|
57275b69c6 | ||
|
|
d9f2f5008c | ||
|
|
be360d9824 | ||
|
|
5d4ee51061 | ||
|
|
99eb35dbbf | ||
|
|
63ff004c4f | ||
|
|
fe93483a0a | ||
|
|
170d5e6d4c | ||
|
|
e190290ba4 | ||
|
|
7b5cac0e19 | ||
|
|
e9f1110051 | ||
|
|
a547775bac | ||
|
|
c4c13df284 | ||
|
|
1e25f957c8 | ||
|
|
a93316c5e9 | ||
|
|
6902df56a0 | ||
|
|
326bf40fb7 | ||
|
|
ea1fba136a | ||
|
|
20a374fe02 | ||
|
|
84bd92bdda | ||
|
|
3b6748ea0d | ||
|
|
dc91701ff7 | ||
|
|
77ddac9480 | ||
|
|
17a8b276ba | ||
|
|
0f3f901496 | ||
|
|
814d98f24e | ||
|
|
cbdf8824fa | ||
|
|
b604a40b4f | ||
|
|
070610c529 | ||
|
|
f57f70aab9 | ||
|
|
36247821ef | ||
|
|
e6f2e90233 | ||
|
|
4f92ac3648 | ||
|
|
3df5bea0b0 | ||
|
|
7521af1c7d | ||
|
|
95f9dda216 | ||
|
|
47340a46f6 | ||
|
|
96782c63d3 | ||
|
|
c29ab9d71d | ||
|
|
b8e16a3450 | ||
|
|
64db4b10a5 | ||
|
|
87cb6862b9 | ||
|
|
bccae9039e | ||
|
|
6ebc792114 | ||
|
|
5ae31ee114 | ||
|
|
f5c254d719 | ||
|
|
78da60773c | ||
|
|
c0e82d5016 | ||
|
|
3b9dfddfd8 | ||
|
|
645da51097 | ||
|
|
fef636b0cf | ||
|
|
080bdb7f3a | ||
|
|
29ca46c445 | ||
|
|
99b0d2851a | ||
|
|
45237bc00b | ||
|
|
7d314992a8 | ||
|
|
e5e98edd77 | ||
|
|
9b880bd4d8 | ||
|
|
1820d4c73b | ||
|
|
9a8d82fd3c | ||
|
|
d843a575d7 | ||
|
|
93b17ec382 | ||
|
|
5362385ec3 | ||
|
|
2c7b2ab5a0 | ||
|
|
d9631ecf52 | ||
|
|
709d8ec0d8 | ||
|
|
e98f68be94 | ||
|
|
fb34a9a201 | ||
|
|
d8e7e0f044 | ||
|
|
98404649c8 | ||
|
|
0e4018d244 | ||
|
|
c570b2fdf5 | ||
|
|
c2d0ab4da8 | ||
|
|
e6f222815c | ||
|
|
a912733e9b | ||
|
|
f2af3eb55e | ||
|
|
8e6f1a8ec2 | ||
|
|
716c1dcb41 | ||
|
|
49a7581c6c | ||
|
|
8e2be51de8 | ||
|
|
a188b5854f | ||
|
|
31466294b0 | ||
|
|
b66eb5282d | ||
|
|
bd51626c8d | ||
|
|
7a22cd535b | ||
|
|
875c78934e | ||
|
|
db421e6451 | ||
|
|
c177bb5f6c | ||
|
|
1972dc0a9e | ||
|
|
0148e8cb43 | ||
|
|
389db1f113 | ||
|
|
6ed6ce62be | ||
|
|
70a2047ff6 | ||
|
|
2df741bf7c | ||
|
|
fd4bb67bd2 | ||
|
|
fe7eb5d88b | ||
|
|
74f4304ee7 | ||
|
|
e2146b6aea | ||
|
|
9f221d0738 | ||
|
|
c97a2aaf27 | ||
|
|
265817c7e6 | ||
|
|
b63de2c053 | ||
|
|
3706ba1a36 | ||
|
|
9a9200b4a7 | ||
|
|
dafbe3790e | ||
|
|
28cb937584 | ||
|
|
ecb0ccd9c2 | ||
|
|
4bc12f1ccf | ||
|
|
2b792afcc5 | ||
|
|
9ea4b5886a | ||
|
|
0c8721a466 | ||
|
|
a6e6cf0036 | ||
|
|
1caa70788c | ||
|
|
7644f16f6b | ||
|
|
026cb5d864 | ||
|
|
98f4a3dfcb | ||
|
|
5810dc3a2e | ||
|
|
8b4c9e7c14 | ||
|
|
59d80bf180 | ||
|
|
1806c75959 | ||
|
|
29fe1c0fa4 | ||
|
|
053b40fa0c | ||
|
|
34c0a5e98b | ||
|
|
ac7eb8a315 | ||
|
|
3edb0ccf61 | ||
|
|
47278471f9 | ||
|
|
e1b7296126 | ||
|
|
670d9f132d | ||
|
|
7d45477bfa | ||
|
|
4a3cd9e655 | ||
|
|
5d244ea128 | ||
|
|
c44ffb9efa | ||
|
|
80e238c7f0 | ||
|
|
6d51e505ad | ||
|
|
7b3e3c5954 | ||
|
|
ccd9d3d60c | ||
|
|
9d2a873bdf | ||
|
|
77f6580cc0 | ||
|
|
807d5d7319 | ||
|
|
bce84c4dab | ||
|
|
f7fbf269fe | ||
|
|
9f96ae44c6 | ||
|
|
7bc5ee0785 | ||
|
|
61dada83f3 | ||
|
|
a3e4fcb860 | ||
|
|
a9fe9f427d | ||
|
|
ec2e5a2cce | ||
|
|
2ac4785c2f | ||
|
|
d534f5cc38 | ||
|
|
5e4b3361bc | ||
|
|
c0233d979b | ||
|
|
aecd902aed | ||
|
|
94085698d0 | ||
|
|
c7db9a3805 | ||
|
|
6617aae9b9 | ||
|
|
df3c7c8f52 | ||
|
|
601aed1e8f | ||
|
|
dbc5819098 | ||
|
|
e8aa824eb2 | ||
|
|
4f562f145a | ||
|
|
e7e671b823 | ||
|
|
df04a3df33 | ||
|
|
8b99e512b5 | ||
|
|
05b47540aa | ||
|
|
932394ac43 | ||
|
|
ef3f9669ae | ||
|
|
30eb1770ca | ||
|
|
d6c61aabc4 | ||
|
|
22e05df45c | ||
|
|
98128f389c | ||
|
|
87b8bd5aed | ||
|
|
3d078ce6d7 | ||
|
|
6bdf430660 | ||
|
|
4dc37144f0 | ||
|
|
b79316f2a2 | ||
|
|
2893ecbf3e | ||
|
|
b62bdffb75 | ||
|
|
5ad2af341d | ||
|
|
46044b4817 | ||
|
|
0e1fb5eebf | ||
|
|
2afbe4ed97 | ||
|
|
55d150d95d | ||
|
|
90e4e78365 | ||
|
|
b2f508075c | ||
|
|
50814844e4 | ||
|
|
396387ab8d | ||
|
|
d992daf99d | ||
|
|
f9d77ed380 | ||
|
|
b3b0fd552e | ||
|
|
f89920c3e4 | ||
|
|
e544528831 | ||
|
|
ea99a73881 | ||
|
|
8d4ba3da5e | ||
|
|
4d302d69c8 | ||
|
|
d4f5c72896 | ||
|
|
8534bf9ac0 | ||
|
|
5315dfa9d1 | ||
|
|
82f4c6ac84 | ||
|
|
9bcf2ab41f | ||
|
|
6df6d38d2d | ||
|
|
dafba16e6f | ||
|
|
84286386a8 | ||
|
|
9e00589bdd | ||
|
|
c57c7980ff | ||
|
|
5a27f84855 | ||
|
|
adac376ef2 | ||
|
|
8f79e4c2da | ||
|
|
eece159cdd | ||
|
|
9d3338d2b9 | ||
|
|
c4e0e68604 | ||
|
|
38ec37d0f1 | ||
|
|
c19c313479 | ||
|
|
0841565cc7 | ||
|
|
f1340e2273 | ||
|
|
2191923072 | ||
|
|
846b0dd2dc | ||
|
|
700a0c648d | ||
|
|
452e8e72ad | ||
|
|
8b019da650 | ||
|
|
fe599e17ed | ||
|
|
7ebdb19b39 | ||
|
|
d980a1692a | ||
|
|
d06a5f7ebf | ||
|
|
f901a83b70 | ||
|
|
5633796c09 | ||
|
|
5ad73a81aa | ||
|
|
23a7a32d41 | ||
|
|
3836221d5b | ||
|
|
c04a76e6f0 | ||
|
|
d56019c0ee | ||
|
|
b4f15fdaf7 | ||
|
|
07a2505f67 | ||
|
|
b20d00328c | ||
|
|
992b402bbf | ||
|
|
cbf9c11728 | ||
|
|
2c61f14c60 | ||
|
|
a99a0a98b9 | ||
|
|
452f67407b | ||
|
|
17f50f22bc | ||
|
|
3e0bc4473a | ||
|
|
460c322f13 | ||
|
|
c43352ccfa | ||
|
|
6dfa434e32 | ||
|
|
507d3b0cde | ||
|
|
dc17fb6dc2 | ||
|
|
d3b86c496d | ||
|
|
4b1d95d96a | ||
|
|
bd546a1f78 | ||
|
|
095b8a3798 | ||
|
|
797638f9ff | ||
|
|
4f8657dbfc | ||
|
|
7d939f8947 | ||
|
|
7770ce47e4 | ||
|
|
de1d0a6995 | ||
|
|
8a316c9b62 | ||
|
|
c157d8e219 | ||
|
|
0f18cb6eef | ||
|
|
cf99192394 | ||
|
|
010162eb72 | ||
|
|
b0e3294923 | ||
|
|
a720fd99b6 | ||
|
|
f046ccd15c | ||
|
|
15f36a5efd | ||
|
|
e82bc62c03 | ||
|
|
63be111e72 | ||
|
|
d9b94f28a4 | ||
|
|
288693abe1 | ||
|
|
7202d43dde | ||
|
|
d65cfe89ec | ||
|
|
9c4c5ae3e1 | ||
|
|
2d5df63e4f | ||
|
|
1a79473bde | ||
|
|
08abe15850 | ||
|
|
ee073a558b | ||
|
|
9c998aa831 | ||
|
|
f530187dbd | ||
|
|
3bb9cec962 | ||
|
|
cd5b2b9941 | ||
|
|
88804d19e2 | ||
|
|
3c71f3e8aa | ||
|
|
bf41886f9d | ||
|
|
342717f72a | ||
|
|
024447b186 | ||
|
|
b2532eff87 | ||
|
|
a87589da74 | ||
|
|
51152c173d | ||
|
|
ba91e26a19 | ||
|
|
2eab48f511 | ||
|
|
16b013e750 | ||
|
|
121fc64022 | ||
|
|
3a574cbe72 | ||
|
|
7680c140af | ||
|
|
c01766307c | ||
|
|
343117bf12 | ||
|
|
9dd41a7b0c | ||
|
|
d44e14b5fc | ||
|
|
ed16fefcba | ||
|
|
931da93e0f | ||
|
|
412babe304 | ||
|
|
60fc6cbbb7 | ||
|
|
07cc099941 | ||
|
|
cf8bc5773c | ||
|
|
a710d4be80 | ||
|
|
90dc67049d | ||
|
|
434cf850a4 | ||
|
|
81b83c9ecc | ||
|
|
dcb2f95a60 | ||
|
|
9f709b6cee | ||
|
|
a63109281a | ||
|
|
7cc1438d43 | ||
|
|
ec0ca73190 | ||
|
|
b2323ea6f9 | ||
|
|
fddae7b811 | ||
|
|
5e5f9ed254 | ||
|
|
4c2a366db3 | ||
|
|
04e93ec979 | ||
|
|
2a8af18738 | ||
|
|
e694e08a8b | ||
|
|
b77fad3b25 | ||
|
|
7ec2550238 | ||
|
|
0a7c5391a0 | ||
|
|
68e0236f7e | ||
|
|
a85f9f21aa | ||
|
|
20787e23b8 | ||
|
|
3c2b3d454d | ||
|
|
b304c96871 | ||
|
|
12b43d515c | ||
|
|
f5c5ef4a1f | ||
|
|
3dd7f0f0ca | ||
|
|
8aa1a2d115 | ||
|
|
986ef4340e | ||
|
|
ba83a30765 | ||
|
|
101e8dfa2a | ||
|
|
50712ba16e | ||
|
|
901787d6e8 | ||
|
|
8b0bfc6804 | ||
|
|
384cc68744 | ||
|
|
c1a11c19ec | ||
|
|
6315349202 | ||
|
|
3ec924a3cb | ||
|
|
756f586a73 | ||
|
|
b1bf6f2c9b | ||
|
|
86c9888207 | ||
|
|
59acc296d9 | ||
|
|
400558b561 | ||
|
|
414eec35e3 | ||
|
|
be6b6e4e2d | ||
|
|
e6ba3c92ce | ||
|
|
f50cc09b61 | ||
|
|
ea287debe1 | ||
|
|
ef2807c667 | ||
|
|
83e40ba75d | ||
|
|
0c1c117cf1 | ||
|
|
8f0b7cbe80 | ||
|
|
256d31c046 | ||
|
|
e632515387 | ||
|
|
4d00eb0290 | ||
|
|
acdcd10c9a | ||
|
|
89c02e2c57 | ||
|
|
6c9e789e9e | ||
|
|
911d08f6ae | ||
|
|
bf7019c570 | ||
|
|
9d46ea4a55 | ||
|
|
c3fafecff1 | ||
|
|
a0bdf49e39 | ||
|
|
e9684a536a | ||
|
|
f4733a0764 | ||
|
|
b05dcb58fe | ||
|
|
47b1e3d77f | ||
|
|
e58cf2a0cf | ||
|
|
1968e615d4 | ||
|
|
151ab83a93 | ||
|
|
b9649854f6 | ||
|
|
e799d3755e | ||
|
|
2f916943c9 | ||
|
|
f8883cb101 | ||
|
|
20a80418f9 | ||
|
|
1a344f298d | ||
|
|
436be29cad | ||
|
|
cd172b7108 | ||
|
|
c3d2b4b48a | ||
|
|
5a95f6fbd2 | ||
|
|
289f932c5f | ||
|
|
082acfd484 | ||
|
|
652a10c096 | ||
|
|
6225c5db6c | ||
|
|
8ed9604613 | ||
|
|
ff36fd8591 | ||
|
|
6310eb9da7 | ||
|
|
a562e1bd9d | ||
|
|
30ce5ab043 | ||
|
|
9dd611b8c1 | ||
|
|
a1191902ca | ||
|
|
15c7a8efd2 | ||
|
|
e2ffd59b4d | ||
|
|
400ab719c6 | ||
|
|
08f272787a | ||
|
|
bff96b0e6b | ||
|
|
ec0aee7b68 | ||
|
|
f7d1572bf5 | ||
|
|
8e6b47a89b | ||
|
|
efe2a4d5cf | ||
|
|
bea8e84b52 | ||
|
|
917b8cc41c | ||
|
|
8cba1907b8 | ||
|
|
7b46664147 | ||
|
|
c419d1d6d0 | ||
|
|
0621f6f9d3 | ||
|
|
cd5396fa12 | ||
|
|
4510a7b736 | ||
|
|
12537cc5a9 | ||
|
|
c2642d14c9 | ||
|
|
25215ee2b0 | ||
|
|
31193c2cca | ||
|
|
ab379df353 | ||
|
|
f2dfe44fd6 | ||
|
|
20aacbf018 | ||
|
|
7acd6c2168 | ||
|
|
c491b442cc | ||
|
|
86cf82e07f | ||
|
|
8d3efe4e9a | ||
|
|
e399e4c670 | ||
|
|
87663b1cbc | ||
|
|
6cfb1f0da6 | ||
|
|
809ac5e7b0 | ||
|
|
8d8f894b51 | ||
|
|
1f54ce6df8 | ||
|
|
771e05be07 | ||
|
|
1bc0f14143 | ||
|
|
aee2fa27d9 | ||
|
|
5e746fce05 | ||
|
|
b39392a98b | ||
|
|
0912e483eb | ||
|
|
8c725b9364 | ||
|
|
a20b27a36b | ||
|
|
44acc8d334 | ||
|
|
4d535b51e1 | ||
|
|
3d936fd992 | ||
|
|
20cc00ddac | ||
|
|
cd42deebd2 | ||
|
|
e2c22d780e | ||
|
|
b7eaad8134 | ||
|
|
946c2185dd | ||
|
|
6bb992ba9d | ||
|
|
a842a6d23c | ||
|
|
4aaf29b2f5 | ||
|
|
fa838874cf | ||
|
|
1cdf5d92cf | ||
|
|
1740618202 | ||
|
|
256e4be814 | ||
|
|
bcd0be5cf1 | ||
|
|
2b9187127f | ||
|
|
138ff60c1e | ||
|
|
45ea3fca4a | ||
|
|
96085e347d | ||
|
|
689aec1b05 | ||
|
|
7e6bf358d8 | ||
|
|
25d6712a81 | ||
|
|
ed54e62125 | ||
|
|
bb310d462b | ||
|
|
9d5028c2f7 | ||
|
|
cacfab588a | ||
|
|
1f6d4258c2 | ||
|
|
983fda8391 | ||
|
|
e3c9b9f928 | ||
|
|
14699a22cf | ||
|
|
e86e5a0748 | ||
|
|
8b74bf31fe | ||
|
|
4cfaf55e5c | ||
|
|
d407bf52b5 | ||
|
|
2ee665339b | ||
|
|
9455b7f39c | ||
|
|
e1599e83d6 | ||
|
|
c15f3120ec | ||
|
|
656658dd15 | ||
|
|
5c952cf024 | ||
|
|
03f5c55021 | ||
|
|
cf33678e51 | ||
|
|
08b6aa6154 | ||
|
|
731215ebde | ||
|
|
b65085130a | ||
|
|
2cbe571a56 | ||
|
|
659883c298 | ||
|
|
f325e18beb | ||
|
|
8655b6f860 | ||
|
|
30d56fae23 | ||
|
|
63cfcbb4e2 | ||
|
|
1d9f410500 | ||
|
|
3e01d75ff2 | ||
|
|
a5bbcc3c53 | ||
|
|
a06752e36b | ||
|
|
da93ed8147 | ||
|
|
a5725fabc0 | ||
|
|
e1a3f6b39b | ||
|
|
c65fdc74aa | ||
|
|
64f70bede3 | ||
|
|
cce625e557 | ||
|
|
66ca92a5ba | ||
|
|
4ec3a7f0fd | ||
|
|
79536a6eb0 | ||
|
|
4734cb78d8 | ||
|
|
a9c37d561d | ||
|
|
c354839349 | ||
|
|
8b1ccd8693 | ||
|
|
e623a1a394 | ||
|
|
1d6f97209e | ||
|
|
eedcd078fe | ||
|
|
7ca202f566 | ||
|
|
31a649234e | ||
|
|
89394047ba | ||
|
|
429168ea88 | ||
|
|
6705d81e90 | ||
|
|
68ceb29e71 | ||
|
|
9aea95307f | ||
|
|
281e00a3be | ||
|
|
cfca5e604d | ||
|
|
45eeb8983c | ||
|
|
de8d5a3600 | ||
|
|
75b1fa7864 | ||
|
|
07cba3514b | ||
|
|
b8c8318160 | ||
|
|
cdc7fea173 | ||
|
|
a1f4a3dd05 | ||
|
|
b9283e2dbe | ||
|
|
810509266f | ||
|
|
6c7a14084a | ||
|
|
bc54f309a1 | ||
|
|
56523f1283 | ||
|
|
857cad37a4 | ||
|
|
fabd46acff | ||
|
|
10a36a98c4 | ||
|
|
466b74108f | ||
|
|
8b07a1103d | ||
|
|
0ac6f8b749 | ||
|
|
262381329b | ||
|
|
ede130229c | ||
|
|
2c96baa2a4 | ||
|
|
18f71f27ae | ||
|
|
78953f2f93 | ||
|
|
e55ca7e262 | ||
|
|
93f6a6771b | ||
|
|
39539887ea | ||
|
|
e94d2cd9d1 | ||
|
|
c3f4d17e05 | ||
|
|
021bfcd3c6 | ||
|
|
49822e23a0 | ||
|
|
46a414dc12 | ||
|
|
f832d8a143 | ||
|
|
b54d32b40d | ||
|
|
681334540d | ||
|
|
99edcfb29e | ||
|
|
2d24a3a787 | ||
|
|
e63c8ee3dc | ||
|
|
36c728774e | ||
|
|
4c0d4c3b78 | ||
|
|
ca0e774894 | ||
|
|
697037fe9b | ||
|
|
3ff02c27d5 | ||
|
|
70f05ac34e | ||
|
|
13a5695b7c | ||
|
|
c3c7f861ae | ||
|
|
f39748ae8e | ||
|
|
aa24509041 | ||
|
|
aa5590b66f | ||
|
|
48abe7bfab | ||
|
|
547b4cb25e | ||
|
|
97d80fc391 | ||
|
|
6bdd1377af | ||
|
|
356a0d9f31 | ||
|
|
1eaeb58e3c | ||
|
|
79fa88f3ed | ||
|
|
cea655a224 | ||
|
|
a56bd92289 | ||
|
|
5ca2679933 | ||
|
|
17ea117743 | ||
|
|
1114257c9d | ||
|
|
d7a04603ae | ||
|
|
979bdbc70e | ||
|
|
6945979126 | ||
|
|
e4cc71aa44 | ||
|
|
10767ccb86 | ||
|
|
02b11f8e09 | ||
|
|
6c1362cf63 | ||
|
|
953e2062c0 | ||
|
|
9d9e283790 | ||
|
|
baac607c13 | ||
|
|
32877d66aa | ||
|
|
62b4ac98a4 | ||
|
|
2729af9d54 | ||
|
|
08f1080c9c | ||
|
|
fc1cfcdb12 | ||
|
|
0b8fa03b6d | ||
|
|
b9711de102 | ||
|
|
e9132ea94c | ||
|
|
5cf91d6bdc | ||
|
|
e35745bb64 | ||
|
|
2471111d35 | ||
|
|
498b8db7f5 | ||
|
|
a8bd82de46 | ||
|
|
7abf0c5886 | ||
|
|
d4326aca18 | ||
|
|
507bbe3e80 | ||
|
|
998eaaecd4 | ||
|
|
6e5923851e | ||
|
|
c26e454dfc | ||
|
|
ea66bc8804 | ||
|
|
db01a2ea99 | ||
|
|
bda6c8aece | ||
|
|
a3d991bd0d | ||
|
|
a6ab4bf978 | ||
|
|
5a8c51cd5e | ||
|
|
04a85b3b36 | ||
|
|
d716b12671 | ||
|
|
56b86bf0cd | ||
|
|
f525c8a147 | ||
|
|
17d704eb95 | ||
|
|
7e780369e4 | ||
|
|
0608e04da9 | ||
|
|
b79a11cc2b | ||
|
|
518e2e1ae3 | ||
|
|
6fb6af6dc9 | ||
|
|
eeb1b77b7d | ||
|
|
27aa818670 | ||
|
|
4b9206ed51 | ||
|
|
109c0e3ad3 | ||
|
|
efa329cb89 | ||
|
|
7d7ce4125f | ||
|
|
d9df1f4e66 | ||
|
|
42dfe7a184 | ||
|
|
855a496fe9 | ||
|
|
4b248f3f71 | ||
|
|
aaf224ab4e | ||
|
|
3d3befa754 | ||
|
|
4d13cbad1c | ||
|
|
c3f9d4939a | ||
|
|
0e6d798cb3 | ||
|
|
c40b295682 | ||
|
|
6629d2f22b | ||
|
|
bdda519d3c | ||
|
|
232c150a25 | ||
|
|
79d696fc55 | ||
|
|
f8d813e34f | ||
|
|
e7c85689bb | ||
|
|
132ba5fdc5 | ||
|
|
11dadd547c | ||
|
|
80885a9d52 | ||
|
|
0c852a2886 | ||
|
|
a084f7da88 | ||
|
|
5cfbab3d82 | ||
|
|
cbd8a35c6d | ||
|
|
074cff0d28 | ||
|
|
028ab6b598 | ||
|
|
63e73c9a8e | ||
|
|
cd0a9de68b | ||
|
|
2d1a537d87 | ||
|
|
3f85ce2785 | ||
|
|
3c74e32a98 | ||
|
|
cf56e11019 | ||
|
|
198ea9e294 | ||
|
|
b2daeb8e0f | ||
|
|
bf9e3b38f7 | ||
|
|
a2d18bb7d3 | ||
|
|
cd37d9e6e5 | ||
|
|
ec4c544bed | ||
|
|
b98fff1d6a | ||
|
|
5653fc335a | ||
|
|
f6e20fc6ca | ||
|
|
f4863a7aec | ||
|
|
ba56f62576 | ||
|
|
a6cccaea5a | ||
|
|
5e4be00fb0 | ||
|
|
75d1ea7f6a | ||
|
|
6876609446 | ||
|
|
c178d3da6f | ||
|
|
ef978730dc | ||
|
|
c837dcb1a3 | ||
|
|
b0aef11c9f | ||
|
|
1c43771ba8 | ||
|
|
c83bf6a2d0 | ||
|
|
b299e41a0d | ||
|
|
b34ff81d9b | ||
|
|
a522fa0e7c | ||
|
|
180d3f74e4 | ||
|
|
dd875c767e | ||
|
|
c935d3bd8b | ||
|
|
3a473b2a65 | ||
|
|
b6e4c4033c | ||
|
|
63f3491242 | ||
|
|
d4ca31c40e | ||
|
|
c18960049f | ||
|
|
a2f34be7dd | ||
|
|
7cb22f97ee | ||
|
|
b2001f273f | ||
|
|
5c745d2613 | ||
|
|
50015ab3e1 | ||
|
|
d4f58f785d | ||
|
|
510ca13b15 | ||
|
|
e075fbe66c | ||
|
|
abcac8725f | ||
|
|
38a951956b | ||
|
|
939403bca9 | ||
|
|
b828dda657 | ||
|
|
4e5ca3eb67 | ||
|
|
9fd5e31fe0 | ||
|
|
3bbc899fc0 | ||
|
|
b028f71513 | ||
|
|
b4676a25e2 | ||
|
|
a2663ea4fc | ||
|
|
ef5a9672c7 | ||
|
|
5779d8d985 | ||
|
|
8bf3b005dd | ||
|
|
a8c7c708a9 | ||
|
|
fa1399ed12 | ||
|
|
b96619a117 | ||
|
|
af6d1dfc7f | ||
|
|
fd3103bb8e | ||
|
|
b4757cee52 | ||
|
|
5bb226e821 | ||
|
|
5cf9da4821 | ||
|
|
b13fb01a62 | ||
|
|
5fa66df63a | ||
|
|
a0f2fe524c | ||
|
|
a57a496f4d | ||
|
|
8cb8143ef7 | ||
|
|
4654af27b8 | ||
|
|
a3ad8e26a4 | ||
|
|
d7281f4109 | ||
|
|
e7df029f1a | ||
|
|
3d1e8a9d4e | ||
|
|
42d1f0394b | ||
|
|
2d5b561e2b | ||
|
|
f72da3406b | ||
|
|
5da627a424 | ||
|
|
15647dc7fd | ||
|
|
a0ff7f2eda | ||
|
|
4a5517094d | ||
|
|
54387ac931 | ||
|
|
fc3e2165ef | ||
|
|
ef1464cc01 | ||
|
|
d9a405aaf6 | ||
|
|
147031aef1 | ||
|
|
887b372f5d | ||
|
|
fbe4b5cbde | ||
|
|
bb65a31267 | ||
|
|
88a1bfa8b8 | ||
|
|
cad07371fc | ||
|
|
ab209d5107 | ||
|
|
87970ebeb5 | ||
|
|
8a42eac744 | ||
|
|
91e940d9bc | ||
|
|
29127b6a23 | ||
|
|
1d70468b03 | ||
|
|
c3d98ed9ca | ||
|
|
80369866a4 | ||
|
|
65bd0e284b | ||
|
|
206c60cbea | ||
|
|
5f535fe170 | ||
|
|
b0639ca332 | ||
|
|
f54ebdfa28 | ||
|
|
34b3049a60 | ||
|
|
ef709e9230 | ||
|
|
a57106fcb3 | ||
|
|
373e6bec13 | ||
|
|
4aeb251f90 | ||
|
|
acf98e7f30 | ||
|
|
b56ddc636d | ||
|
|
78137c3c93 | ||
|
|
35656de729 | ||
|
|
200f8c7a4c | ||
|
|
531716e171 | ||
|
|
b70e7a00c8 | ||
|
|
f5300ab241 | ||
|
|
68ce8957e5 | ||
|
|
72cd5aa703 | ||
|
|
13fdf8a6ba | ||
|
|
2853d29b52 | ||
|
|
428c563938 | ||
|
|
342f551bc9 | ||
|
|
ef9e86854e | ||
|
|
09433a781b | ||
|
|
1b554406cc | ||
|
|
895af12a21 | ||
|
|
9a2dd74032 | ||
|
|
22a40b0a88 | ||
|
|
b318262a71 | ||
|
|
a65cb68237 | ||
|
|
5ce08eea97 | ||
|
|
4f7cb08ee7 | ||
|
|
a43278a43d | ||
|
|
7205e4075d | ||
|
|
149dded2b1 | ||
|
|
7152b1d0b3 | ||
|
|
4d816774f1 | ||
|
|
093ae273da | ||
|
|
12f34241cb | ||
|
|
326428cc8b | ||
|
|
0cb61d7ddd | ||
|
|
6f21347d49 | ||
|
|
c29fdfc1d8 | ||
|
|
ca75added1 | ||
|
|
437ce07b8a | ||
|
|
fe389a82c9 | ||
|
|
d94f92cbd7 | ||
|
|
e0ac62d798 | ||
|
|
ae3af05ec9 | ||
|
|
9374fa287b | ||
|
|
013dc8d9b9 | ||
|
|
d41e5e6994 | ||
|
|
8f713fdfeb | ||
|
|
96e48cf6c1 | ||
|
|
bdccc4fedc | ||
|
|
96dd9af4c7 | ||
|
|
1f4bb37d6b | ||
|
|
7784674852 | ||
|
|
27b207fd0a | ||
|
|
2535d60277 | ||
|
|
945af8d723 | ||
|
|
cb4dbb7bbc | ||
|
|
ad12965db5 | ||
|
|
667122af2d | ||
|
|
2960b65add | ||
|
|
2e5983d2ea | ||
|
|
6dff552972 | ||
|
|
8564acf936 | ||
|
|
5702923e23 | ||
|
|
5b8b652519 | ||
|
|
2e533c373d | ||
|
|
b762b9f4fc | ||
|
|
c5d2290642 | ||
|
|
155cb0104a | ||
|
|
f12e568ca4 | ||
|
|
0d4983930a | ||
|
|
b37c7e5e5c | ||
|
|
b0fce99bfc | ||
|
|
eeacb89cb3 | ||
|
|
3d96ede975 | ||
|
|
9d2b18a0f9 | ||
|
|
d1cbe85b08 | ||
|
|
8bde7f776c | ||
|
|
993cad9364 | ||
|
|
b783edaee8 | ||
|
|
a300d83cb8 | ||
|
|
a6457f7971 | ||
|
|
a0e135b493 | ||
|
|
e118e233a8 | ||
|
|
95aeb34580 | ||
|
|
cceb871fff | ||
|
|
3595ac4979 | ||
|
|
9a0e21a3a8 | ||
|
|
592c5cabe7 | ||
|
|
72755c7137 | ||
|
|
0332990b85 | ||
|
|
0b97ab144f | ||
|
|
6dd652fa4d | ||
|
|
52f52c1494 | ||
|
|
48b42616e9 | ||
|
|
15ef8a5d17 | ||
|
|
2abbe07547 | ||
|
|
71f9511803 | ||
|
|
487778b781 | ||
|
|
8b601449e8 | ||
|
|
e58dc13283 | ||
|
|
a3ed3996cd | ||
|
|
73a8b27c57 | ||
|
|
08eaea9c9f | ||
|
|
53cf9435cc | ||
|
|
c602883592 | ||
|
|
3720878599 | ||
|
|
f3e0de60a6 | ||
|
|
682011ff69 | ||
|
|
7a8e9bed17 | ||
|
|
3b57fe0a70 | ||
|
|
f07771cc28 | ||
|
|
38b99261c1 | ||
|
|
4c3b21a5f9 | ||
|
|
d9ff6e84e4 | ||
|
|
e1e89324ad | ||
|
|
549826eaa0 | ||
|
|
1d49b1f365 | ||
|
|
33149b8812 | ||
|
|
9919f13cc1 | ||
|
|
071d897c96 | ||
|
|
3871842529 | ||
|
|
b6d9e4f5af | ||
|
|
1545ad35c5 | ||
|
|
c231d00f4e | ||
|
|
d4629c8c8d | ||
|
|
46578cc018 | ||
|
|
c93f70962b | ||
|
|
8749cfb44e | ||
|
|
b867d705b6 | ||
|
|
bedc497029 | ||
|
|
5d232d0e7e | ||
|
|
c8c3a8be2d | ||
|
|
82226bf4d2 | ||
|
|
7f70e85309 | ||
|
|
59de2ed6b5 | ||
|
|
86d82762f6 | ||
|
|
66fd3d1ce7 | ||
|
|
45219c4660 | ||
|
|
f7de16ae25 | ||
|
|
d6815435c0 | ||
|
|
e600962991 | ||
|
|
9c62cc58b8 | ||
|
|
7aa7861471 | ||
|
|
4532cb696e | ||
|
|
02c9bed451 | ||
|
|
53cad435bb | ||
|
|
059ae173e9 | ||
|
|
824a1ebffe | ||
|
|
d791b1dc3e | ||
|
|
4a6fd34b26 | ||
|
|
69f8f827d5 | ||
|
|
759a51b4f3 | ||
|
|
d126bfbdbd | ||
|
|
60fbe25424 | ||
|
|
3e38691e8f | ||
|
|
36c05a80ec | ||
|
|
afcc4a7404 | ||
|
|
9e7d5ebea9 | ||
|
|
baa3d528fe | ||
|
|
c1551ea817 | ||
|
|
0587597ca3 | ||
|
|
0db5bca807 | ||
|
|
85ec0bcc1b | ||
|
|
506f044131 | ||
|
|
cdd8a0f151 | ||
|
|
c021880ac5 | ||
|
|
ac6dbb85b7 | ||
|
|
2a46cabd77 | ||
|
|
dc7c9a1a52 | ||
|
|
10f670178c | ||
|
|
4d75a504d0 | ||
|
|
44e5c5c4f1 | ||
|
|
a02ab7d184 | ||
|
|
d69b100e70 | ||
|
|
5d5d44e717 | ||
|
|
6f4474e87b | ||
|
|
97a43d641d | ||
|
|
7e11d8269e | ||
|
|
38daa27d21 | ||
|
|
1957dd29d9 | ||
|
|
06d01dbe00 | ||
|
|
09127c6096 | ||
|
|
3bac351370 | ||
|
|
1cb8e980c4 | ||
|
|
500545cc6b | ||
|
|
47cd00fa70 | ||
|
|
db2f721ffc | ||
|
|
43d9616cff | ||
|
|
6069ff2653 | ||
|
|
2a9e02ead3 | ||
|
|
d7787c6e57 | ||
|
|
ad10dd9aaf | ||
|
|
e5ad56b13b | ||
|
|
ee1b3b5fe4 | ||
|
|
6177445dab | ||
|
|
aacf9a49aa | ||
|
|
608c91460b | ||
|
|
d0fb80c302 | ||
|
|
a25f862ba8 | ||
|
|
13122b4f1d | ||
|
|
288b3d7f5a | ||
|
|
2f91a3d0f8 | ||
|
|
93f19cc0ed | ||
|
|
6aff3115b9 | ||
|
|
228f29ac6e | ||
|
|
7c7a23bd5a | ||
|
|
1f53a41603 | ||
|
|
a6c7ad2f65 | ||
|
|
ea909b7604 | ||
|
|
b2184c314d | ||
|
|
0ae1175bb2 | ||
|
|
c7de829c79 | ||
|
|
2262cfeef9 | ||
|
|
1d0350ed0b | ||
|
|
eb9401e3eb | ||
|
|
7f6c2cbc2b | ||
|
|
2a3cb02076 | ||
|
|
56f94be3ef | ||
|
|
384ae02506 | ||
|
|
e95b61cfb0 | ||
|
|
699b13a606 | ||
|
|
24ee89b97a | ||
|
|
de180e6daa | ||
|
|
37bd321e99 | ||
|
|
c00b5f85ea | ||
|
|
0442ed869c | ||
|
|
5772de449d | ||
|
|
afd7f3d0de | ||
|
|
f18f47f4d4 | ||
|
|
bdb4a2f05e | ||
|
|
c542fb2e8d | ||
|
|
fe8c2806cd | ||
|
|
f9087a3213 | ||
|
|
c609719b8d | ||
|
|
5b1d713721 | ||
|
|
47d1a6e1ed | ||
|
|
e221174377 | ||
|
|
7ebf7443ad | ||
|
|
cc1c8a136f | ||
|
|
1a4d6164af | ||
|
|
848de349bb | ||
|
|
8966f33788 | ||
|
|
dc19ba8fe5 | ||
|
|
2d966958cd | ||
|
|
fef08ee805 | ||
|
|
fa850baf4c | ||
|
|
f2d42945ed | ||
|
|
11a72d9fce | ||
|
|
48c0010d96 | ||
|
|
0587dd173a | ||
|
|
f682e42599 | ||
|
|
ea8015b852 | ||
|
|
81a8824f2e | ||
|
|
1775979a28 | ||
|
|
7d393aed86 | ||
|
|
0de1ffc8be | ||
|
|
217c9dad82 | ||
|
|
ce23b153d8 | ||
|
|
b6d12c1077 | ||
|
|
5eefc95f38 | ||
|
|
0157cedb59 | ||
|
|
d0dd107775 | ||
|
|
5dfa25f25b | ||
|
|
e831ad54aa | ||
|
|
eee810b61d | ||
|
|
8fcbdbcc90 | ||
|
|
4d4c21dd95 | ||
|
|
a9ab73b02a | ||
|
|
a17d0ff41d | ||
|
|
d9fd6ff598 | ||
|
|
a68d3ed0ac | ||
|
|
32fe2871cb | ||
|
|
ec0852cf1e | ||
|
|
ed247f487e | ||
|
|
324f6cfd12 | ||
|
|
4ef60b6de6 | ||
|
|
121cb96d51 | ||
|
|
82e299bf89 | ||
|
|
3b285da69a | ||
|
|
62219a28cb | ||
|
|
f4675560e2 | ||
|
|
e3093091a9 | ||
|
|
a2cecab6df | ||
|
|
858b1a643f | ||
|
|
ef94f5da1d | ||
|
|
05706fddd0 | ||
|
|
14aba9c1dc | ||
|
|
3861aa5ce0 | ||
|
|
2194ffd5f4 | ||
|
|
17bd4a8426 | ||
|
|
77f855819e | ||
|
|
07c0487586 | ||
|
|
3d818266d7 | ||
|
|
458ded34b6 | ||
|
|
acea76a2f4 | ||
|
|
91d3256c6e | ||
|
|
4f163801ae | ||
|
|
983cced8f7 | ||
|
|
88cfb53c0c | ||
|
|
dd7d41f00d | ||
|
|
5b88144d01 | ||
|
|
f780aa2a95 | ||
|
|
fe57bb19b0 | ||
|
|
38a24a612e | ||
|
|
0bc4a1ac81 | ||
|
|
ab255f26f9 | ||
|
|
89930721bc | ||
|
|
1df49e27bc | ||
|
|
e69b4b8f1c | ||
|
|
0669d4d315 | ||
|
|
910607b743 | ||
|
|
9e3f8cdfb1 | ||
|
|
3e9f289c15 | ||
|
|
d8a555f2bb | ||
|
|
7133d4c4f1 | ||
|
|
a042ac8439 | ||
|
|
a46d821fc8 | ||
|
|
da27dcf008 | ||
|
|
7c202ac2e3 | ||
|
|
1580924841 | ||
|
|
a8f88918b1 | ||
|
|
79efd004e5 | ||
|
|
f47713f378 | ||
|
|
edc48b6619 | ||
|
|
20e0e2331c | ||
|
|
041b1deace | ||
|
|
d3163d3faa | ||
|
|
2f001a3c4c | ||
|
|
7666a9041c | ||
|
|
5afd1307c7 | ||
|
|
eba4ffc8af | ||
|
|
6830bca7ac | ||
|
|
153d511e36 | ||
|
|
b6a6460b7d | ||
|
|
1dda0b1f7c | ||
|
|
0f9cfa09df | ||
|
|
78f6622a1f | ||
|
|
4a9cbbe832 | ||
|
|
e887afc9da | ||
|
|
3863585bb1 | ||
|
|
f8cac651b3 | ||
|
|
67c4f48a49 | ||
|
|
16f217049a | ||
|
|
354bc6feac | ||
|
|
5d3207da3a | ||
|
|
5b845b668a | ||
|
|
024a26bc97 | ||
|
|
6a30c4ca62 | ||
|
|
d62589d5fd | ||
|
|
c12b5a3210 | ||
|
|
e0648062f7 | ||
|
|
75dc29ebc4 | ||
|
|
0f8c9768ff | ||
|
|
5d65f3a55c | ||
|
|
6c9c32f9b9 | ||
|
|
affae2bff8 | ||
|
|
cf356ef708 | ||
|
|
81da3633df | ||
|
|
39f0e5f8cd | ||
|
|
a33982a51b | ||
|
|
3ab675d30e | ||
|
|
2f54faae47 | ||
|
|
5f0c62ad94 | ||
|
|
21b7053edc | ||
|
|
0c8959d641 | ||
|
|
4c31c4b9c6 | ||
|
|
5108792575 | ||
|
|
923690123a | ||
|
|
935ecca1c3 | ||
|
|
71fc6c551d | ||
|
|
4483b581da | ||
|
|
9998b51512 | ||
|
|
efee170991 | ||
|
|
87e33a6fd7 | ||
|
|
43c377fc0a | ||
|
|
befe61a190 | ||
|
|
8da94e02f8 | ||
|
|
b573bf1dda | ||
|
|
13f9bf148f | ||
|
|
6534c9c248 | ||
|
|
76bdcefa52 | ||
|
|
e7b9d56df3 | ||
|
|
3cae4c9f61 | ||
|
|
76afbbcda6 | ||
|
|
c7b3f07f4b | ||
|
|
6afe92dcdd | ||
|
|
0312e6a7f3 | ||
|
|
416fef1ad0 | ||
|
|
717b5aad25 | ||
|
|
acd2fe37c8 | ||
|
|
5f2d51b226 | ||
|
|
0e08febaf0 | ||
|
|
9c1a129c34 | ||
|
|
e881953f7d | ||
|
|
e85390dc1d | ||
|
|
a6b6b68640 | ||
|
|
3b759bd63b | ||
|
|
2acb895783 | ||
|
|
3b58acd4a7 | ||
|
|
6c032441a5 | ||
|
|
59b4523d11 | ||
|
|
77bc4f9e30 | ||
|
|
0bbe2005ea | ||
|
|
f6d29959a8 | ||
|
|
7e7f3e352d | ||
|
|
c6f35e6998 | ||
|
|
1f04521773 | ||
|
|
161961b489 | ||
|
|
e54dc96530 | ||
|
|
9096e7a3a3 | ||
|
|
6fcc18e0a9 | ||
|
|
ae6448002a | ||
|
|
012771d88a | ||
|
|
67fc21f34e | ||
|
|
2f47d370fd | ||
|
|
ed9a2d38db | ||
|
|
bb0f96b0bb | ||
|
|
5a2543c93b | ||
|
|
14874972cb | ||
|
|
808f04e82e | ||
|
|
cc4b058ec1 | ||
|
|
b6c942382a | ||
|
|
2d00de40e9 | ||
|
|
d2efd771d6 | ||
|
|
f926cc34b2 | ||
|
|
97244317a2 | ||
|
|
d84c558153 | ||
|
|
a1e329b41b | ||
|
|
2496efde24 | ||
|
|
b4e1a4b45d | ||
|
|
7e4a3b5b5b | ||
|
|
b92ab0d727 | ||
|
|
ae41d6aa60 | ||
|
|
a16037d2f6 | ||
|
|
865f3f5641 | ||
|
|
a2824a0751 | ||
|
|
2f412b247e | ||
|
|
99dcb3fd52 | ||
|
|
327f7a020a | ||
|
|
12e4407c6a | ||
|
|
409bf35b91 | ||
|
|
167c5898b8 | ||
|
|
55978deb0c | ||
|
|
89752b9b54 | ||
|
|
c74078f8dc | ||
|
|
60b1bd0e0f | ||
|
|
0a6a04c60a | ||
|
|
89ab65e00c | ||
|
|
bca52d65cb | ||
|
|
fbd71bf679 | ||
|
|
214ec6bbd1 | ||
|
|
349e1442f3 | ||
|
|
32653c3cc9 | ||
|
|
c090390057 | ||
|
|
5745185e6a | ||
|
|
2dab301caa | ||
|
|
a475b5e2a0 | ||
|
|
31f60b6ec6 | ||
|
|
3a9f00da78 | ||
|
|
d94afdbe23 | ||
|
|
3bd602ea2b | ||
|
|
f2e4c3d34e | ||
|
|
e510cc3a1e | ||
|
|
0f82baec37 | ||
|
|
a17d6b01b4 | ||
|
|
4a5b6a356a | ||
|
|
b631bb9cad | ||
|
|
a6840a6ede | ||
|
|
ba8dbae623 | ||
|
|
afe3d130a7 | ||
|
|
6a22e453a1 | ||
|
|
5d154ba68a | ||
|
|
572c162207 | ||
|
|
51709aecd5 | ||
|
|
db5b0304fc | ||
|
|
f4e512059b | ||
|
|
1d589e3518 | ||
|
|
ea3b8c58ff | ||
|
|
788f07aae0 | ||
|
|
592ec2c500 | ||
|
|
c452f983d4 | ||
|
|
2d39b71fb2 | ||
|
|
10af385938 | ||
|
|
4248acf640 | ||
|
|
0f89ba4320 | ||
|
|
fb48c4afc4 | ||
|
|
17d1fd77c4 | ||
|
|
ddaf2fb159 | ||
|
|
3ba686544f | ||
|
|
b15cbc0be0 | ||
|
|
40c855574c | ||
|
|
7309612797 |
13
.gitignore
vendored
Normal file
13
.gitignore
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
*.orig
|
||||
*.a
|
||||
*.o
|
||||
*.depend
|
||||
System.map
|
||||
/u-boot
|
||||
/u-boot.map
|
||||
/u-boot.bin
|
||||
/u-boot.srec
|
||||
/LOG
|
||||
/errlog
|
||||
/reloc_off
|
||||
|
||||
5607
CHANGELOG-before-U-Boot-1.1.5
Normal file
5607
CHANGELOG-before-U-Boot-1.1.5
Normal file
File diff suppressed because it is too large
Load Diff
18
COPYING
18
COPYING
@@ -1,3 +1,21 @@
|
||||
NOTE! This copyright does *not* cover the so-called "standalone"
|
||||
applications that use U-Boot services by means of the jump table
|
||||
provided by U-Boot exactly for this purpose - this is merely
|
||||
considered normal use of U-Boot, and does *not* fall under the
|
||||
heading of "derived work".
|
||||
|
||||
The header files "include/image.h" and "include/asm-*/u-boot.h"
|
||||
define interfaces to U-Boot. Including these (unmodified) header
|
||||
files in another file is considered normal use of U-Boot, and does
|
||||
*not* fall under the heading of "derived work".
|
||||
|
||||
Also note that the GPL below is copyrighted by the Free Software
|
||||
Foundation, but the instance of code that it refers to (the U-Boot
|
||||
source code) is copyrighted by me and others who actually wrote it.
|
||||
-- Wolfgang Denk
|
||||
|
||||
=======================================================================
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
|
||||
501
CREDITS
Normal file
501
CREDITS
Normal file
@@ -0,0 +1,501 @@
|
||||
#
|
||||
# Parts of the development effort for this project have been
|
||||
# sponsored by SIEMENS AG, Austria. Thanks to SIEMENS for
|
||||
# supporting an Open Source project!
|
||||
#
|
||||
#
|
||||
# This is at least a partial credits-file of individual people that
|
||||
# have contributed to the U-Boot project. It is sorted by name and
|
||||
# formatted to allow easy grepping and beautification by scripts.
|
||||
# The fields are: name (N), email (E), web-address (W), PGP key ID
|
||||
# and fingerprint (P), description (D), and snail-mail address (S).
|
||||
# Thanks,
|
||||
#
|
||||
# Wolfgang Denk
|
||||
#----------
|
||||
|
||||
N: Dr. Bruno Achauer
|
||||
E: bruno@exet-ag.de
|
||||
D: Support for NetBSD (both as host and target system)
|
||||
|
||||
N: Guillaume Alexandre
|
||||
E: guillaume.alexandre@gespac.ch
|
||||
D: Add PCIPPC6 configuration
|
||||
|
||||
N: Swen Anderson
|
||||
E: sand@peppercon.de
|
||||
D: ERIC Support
|
||||
|
||||
N: Pantelis Antoniou
|
||||
E: panto@intracom.gr
|
||||
D: NETVIA & NETPHONE board support, ARTOS support.
|
||||
D: Support for Silicon Turnkey eXpress XTc
|
||||
|
||||
N: Pierre Aubert
|
||||
E: <p.aubert@staubli.com>
|
||||
D: Support for RPXClassic board
|
||||
|
||||
N: Yuli Barcohen
|
||||
E: yuli@arabellasw.com
|
||||
D: Unified support for Motorola MPC826xADS/MPC8272ADS/PQ2FADS boards.
|
||||
D: Support for Zephyr Engineering ZPC.1900 board.
|
||||
D: Support for Interphase iSPAN boards.
|
||||
D: Support for Analogue&Micro Adder boards.
|
||||
D: Support for Analogue&Micro Rattler boards.
|
||||
W: http://www.arabellasw.com
|
||||
|
||||
N: Jerry van Baren
|
||||
E: <vanbaren@cideas.com>
|
||||
D: BedBug port to 603e core (MPC82xx). Code for enhanced memory test.
|
||||
|
||||
N: Pavel Bartusek
|
||||
E: <pba@sysgo.com>
|
||||
D: Reiserfs support
|
||||
W: http://www.elinos.com
|
||||
|
||||
N: Andre Beaudin
|
||||
E: <andre.beaudin@colubris.com>
|
||||
D: PCMCIA, Ethernet, TFTP
|
||||
|
||||
N: Jon Benediktsson
|
||||
E: jonb@marel.is
|
||||
D: Support for Marel V37 board
|
||||
|
||||
N: Raphael Bossek
|
||||
E: raphael.bossek@solutions4linux.de
|
||||
D: 8xxrom-0.3.0
|
||||
|
||||
N: Cliff Brake
|
||||
E: cliff.brake@gmail.com
|
||||
D: Port to Vibren PXA255 IDP platform
|
||||
W: http://www.vibren.com
|
||||
W: http://bec-systems.com
|
||||
|
||||
N: Rick Bronson
|
||||
E: rick@efn.org
|
||||
D: Atmel AT91RM9200DK and NAND support
|
||||
|
||||
N: David Brown
|
||||
E: DBrown03@harris.com
|
||||
D: Extensions to 8xxrom-0.3.0
|
||||
|
||||
N: Oliver Brown
|
||||
E: obrown@adventnetworks.com
|
||||
D: Port to the gw8260 board
|
||||
|
||||
N: Curt Brune
|
||||
E: curt@cucy.com
|
||||
D: Added support for Samsung S3C4510B CPU (ARM7tdmi based SoC)
|
||||
D: Added support for ESPD-Inc. EVB4510 Board
|
||||
W: http://www.cucy.com
|
||||
|
||||
N: Jonathan De Bruyne
|
||||
E: jonathan.debruyne@siemens.atea.be
|
||||
D: Port to Siemens IAD210 board
|
||||
|
||||
N: Ken Chou
|
||||
E: kchou@ieee.org
|
||||
D: Support for A3000 SBC board
|
||||
|
||||
N: Conn Clark
|
||||
E: clark@esteem.com
|
||||
D: ESTEEM192E support
|
||||
|
||||
N: Magnus Damm
|
||||
E: damm@opensource.se
|
||||
D: 8xxrom
|
||||
|
||||
N: Richard Danter
|
||||
E: richard.danter@windriver.com
|
||||
D: Support for Wind River PPMC 7xx/74xx boards
|
||||
|
||||
N: George G. Davis
|
||||
E: gdavis@mvista.com
|
||||
D: Board ports for ADS GraphicsClient+ and Intel Assabet
|
||||
|
||||
N: Arun Dharankar
|
||||
E: ADharankar@ATTBI.Com
|
||||
D: threads / scheduler example code
|
||||
|
||||
N: K<>ri Dav<61><76>sson
|
||||
E: kd@flaga.is
|
||||
D: FLAGA DM Support
|
||||
|
||||
N: Wolfgang Denk
|
||||
E: wd@denx.de
|
||||
D: U-Boot initial version, continuing maintenance, ARMBoot merge
|
||||
W: http://www.denx.de
|
||||
|
||||
N: Dan A. Dickey
|
||||
E: ddickey@charter.net
|
||||
D: FADS Support
|
||||
|
||||
N: James F. Dougherty
|
||||
E: jfd@GigabitNetworks.COM
|
||||
D: Port to the MOUSSE board
|
||||
|
||||
N: Dave Ellis
|
||||
E: DGE@sixnetio.com
|
||||
D: EEPROM Speedup, SXNI855T port
|
||||
|
||||
N: Thomas Elste
|
||||
E: info@elste.org
|
||||
D: Port for the ModNET50 Board, NET+50 CPU Port
|
||||
W: http://www.imms.de
|
||||
|
||||
N: Daniel Engstr<74>m
|
||||
E: daniel@omicron.se
|
||||
D: x86 port, Support for sc520_cdp board
|
||||
|
||||
N: Hayden Fraser
|
||||
E: Hayden.Fraser@freescale.com
|
||||
D: Support for ColdFire MCF5253
|
||||
W: www.freescale.com
|
||||
|
||||
N: Dr. Wolfgang Grandegger
|
||||
E: wg@denx.de
|
||||
D: Support for Interphase 4539 T1/E1/J1 PMC, PN62, CCM, SCM boards
|
||||
W: www.denx.de
|
||||
|
||||
N: Peter Figuli
|
||||
E: peposh@etc.sk
|
||||
D: Support for WEP EP250 (PXA) board
|
||||
|
||||
N: Thomas Frieden
|
||||
E: ThomasF@hyperion-entertainment.com
|
||||
D: Support for AmigaOne
|
||||
|
||||
N: Niklaus Giger
|
||||
E: niklaus.giger@netstal.com
|
||||
D: Support for HCU(x) boards
|
||||
W: www.netstal.com
|
||||
|
||||
N: Paul Gortmaker
|
||||
E: paul.gortmaker@windriver.com
|
||||
D: Support for WRS SBC8347/8349 boards
|
||||
|
||||
N: Frank Gottschling
|
||||
E: fgottschling@eltec.de
|
||||
D: Support for ELTEC MHPC/BAB7xx/ELPPC boards, cfb-console, i8042, SMI LynxEM
|
||||
W: www.eltec.de
|
||||
|
||||
N: Marius Groeger
|
||||
E: mgroeger@sysgo.de
|
||||
D: MBX Support, board specific function interface, EST SBC8260 support; initial support for StrongARM (LART), ARM720TDMI (implementa A7)
|
||||
W: www.elinos.com
|
||||
|
||||
N: Kirk Haderlie
|
||||
E: khaderlie@vividimage.com
|
||||
D: Added TFTP to 8xxrom (-> 0.3.1)
|
||||
|
||||
N: Chris Hallinan
|
||||
E: clh@net1plus.com
|
||||
D: DHCP Support
|
||||
|
||||
N: Anne-Sophie Harnois
|
||||
E: Anne-Sophie.Harnois@nextream.fr
|
||||
D: Port to Walnut405 board
|
||||
|
||||
N: Andreas Heppel
|
||||
E: aheppel@sysgo.de
|
||||
D: CPU Support for MPC 75x; board support for Eltec BAB750 [obsolete!]
|
||||
|
||||
N: August Hoeraendl
|
||||
E: august.hoerandl@gmx.at
|
||||
D: Support for the logodl board (PXA2xx)
|
||||
|
||||
N: Josh Huber
|
||||
E: huber@alum.wpi.edu
|
||||
D: Port to the Galileo Evaluation Board, and the MPC74xx cpu series.
|
||||
W: http://www.mclx.com/
|
||||
|
||||
H: Stuart Hughes
|
||||
E: stuarth@lineo.com
|
||||
D: Port to MPC8260ADS board
|
||||
|
||||
H: Rich Ireland
|
||||
E: r.ireland@computer.org
|
||||
D: FPGA device configuration driver
|
||||
|
||||
N: Gary Jennejohn
|
||||
E: garyj@jennejohn.org, gj@denx.de
|
||||
D: Support for Samsung ARM920T S3C2400X, ARM920T "TRAB"
|
||||
W: www.denx.de
|
||||
|
||||
N: Murray Jensen
|
||||
E: Murray.Jensen@csiro.au
|
||||
D: Initial 8260 support; GDB support
|
||||
D: Port to Cogent+Hymod boards; Hymod Board Database
|
||||
|
||||
N: Yoo. Jonghoon
|
||||
E: yooth@ipone.co.kr
|
||||
D: Added port to the RPXlite board
|
||||
|
||||
N: Mark Jonas
|
||||
E: mark.jonas@freescale.com
|
||||
D: Support for Freescale Total5200 platform
|
||||
W: http://www.mobilegt.com/
|
||||
|
||||
N: Sam Song
|
||||
E: samsongshu@yahoo.com.cn
|
||||
D: Port to the RPXlite_DW board
|
||||
|
||||
N: Brad Kemp
|
||||
E: Brad.Kemp@seranoa.com
|
||||
D: Port to Windriver ppmc8260 board
|
||||
|
||||
N: Sangmoon Kim
|
||||
E: dogoil@etinsys.com
|
||||
D: Support for debris board
|
||||
D: Support for KVME080 board
|
||||
|
||||
N: Frederick W. Klatt
|
||||
E: fred.klatt@windriver.com
|
||||
D: Support for Wind River SBC8540/SBC8560 boards
|
||||
|
||||
N: Thomas Koeller
|
||||
E: tkoeller@gmx.net
|
||||
D: Port to Motorola Sandpoint 3 (MPC8240)
|
||||
|
||||
N: Raghu Krishnaprasad
|
||||
E: Raghu.Krishnaprasad@fci.com
|
||||
D: Support for Adder-II MPC852T evaluation board
|
||||
W: http://www.forcecomputers.com
|
||||
|
||||
N: Sergey Kubushyn
|
||||
E: ksi@koi8.net
|
||||
D: Support for various TI DaVinci based boards.
|
||||
|
||||
N: Bernhard Kuhn
|
||||
E: bkuhn@metrowerks.com
|
||||
D Support for Coldfire CPU; Support for Motorola M5272C3 and M5282EVB boards
|
||||
|
||||
N: Prakash Kumar
|
||||
E: prakash@embedx.com
|
||||
D Support for Intrinsyc CERF PXA250 board.
|
||||
|
||||
N: Thomas Lange
|
||||
E: thomas@corelatus.se
|
||||
D: Support for GTH, GTH2 and dbau1x00 boards; lots of PCMCIA fixes
|
||||
|
||||
N: Marc Leeman
|
||||
E: marc.leeman@barco.com
|
||||
D: Support for Barco Streaming Video Card (SVC) and Sample Compress Network (SCN)
|
||||
W: www.barco.com
|
||||
|
||||
N: The LEOX team
|
||||
E: team@leox.org
|
||||
D: Support for LEOX boards, DS164x RTC
|
||||
W: http://www.leox.org
|
||||
|
||||
N: TsiChung Liew
|
||||
E: Tsi-Chung.Liew@freescale.com
|
||||
D: Support for ColdFire MCF523x, MCF532x, MCF5445x
|
||||
W: www.freescale.com
|
||||
|
||||
N: Leif Lindholm
|
||||
E: leif.lindholm@i3micro.com
|
||||
D: Support for AMD dbau1550 board.
|
||||
|
||||
N: Stephan Linz
|
||||
E: linz@li-pro.net
|
||||
D: Support for Nios Stratix Development Kit (DK-1S10)
|
||||
D: Support for SSV ADNP/ESC1 (Nios Cyclone)
|
||||
W: http://www.li-pro.net
|
||||
|
||||
N: Raymond Lo
|
||||
E: lo@routefree.com
|
||||
D: Support for DOS partitions
|
||||
|
||||
N: James MacAulay
|
||||
E: james.macaulay@amirix.com
|
||||
D: Suppport for Amirix AP1000
|
||||
W: www.amirix.com
|
||||
|
||||
N: Dan Malek
|
||||
E: dan@embeddedalley.com
|
||||
D: FADSROM, the grandfather of all of this
|
||||
D: Support for Silicon Turnkey eXpress XTc
|
||||
|
||||
N: Andrea "llandre" Marson
|
||||
E: andrea.marson@dave-tech.it
|
||||
D: Port to PPChameleonEVB board
|
||||
W: www.dave-tech.it
|
||||
|
||||
N: Reinhard Meyer
|
||||
E: r.meyer@emk-elektronik.de
|
||||
D: Port to EMK TOP860 Module
|
||||
|
||||
N: Jay Monkman
|
||||
E: jtm@smoothsmoothie.com
|
||||
D: EST SBC8260 support
|
||||
|
||||
N: Frank Morauf
|
||||
E: frank.morauf@salzbrenner.com
|
||||
D: Support for Embedded Planet RPX Super Board
|
||||
|
||||
N: David M<>ller
|
||||
E: d.mueller@elsoft.ch
|
||||
D: Support for Samsung ARM920T SMDK2410 eval board
|
||||
|
||||
N: Scott McNutt
|
||||
E: smcnutt@psyent.com
|
||||
D: Support for Altera Nios-32 CPU
|
||||
D: Support for Altera Nios-II CPU
|
||||
D: Support for Nios Cyclone Development Kit (DK-1C20)
|
||||
W: http://www.psyent.com
|
||||
|
||||
N: Rolf Offermanns
|
||||
E: rof@sysgo.de
|
||||
D: Initial support for SSV-DNP1110, SMC91111 driver
|
||||
W: www.elinos.com
|
||||
|
||||
N: John Otken
|
||||
E: jotken@softadvances.com
|
||||
D: Support for AMCC Luan 440SP board
|
||||
|
||||
N: Tolunay Orkun
|
||||
E: torkun@nextio.com
|
||||
D: Support for Cogent CSB272 & CSB472 boards
|
||||
|
||||
N: Keith Outwater
|
||||
E: keith_outwater@mvis.com
|
||||
D: Support for generic/custom MPC860T boards (GEN860T, GEN860T_SC)
|
||||
|
||||
N: Frank Panno
|
||||
E: fpanno@delphintech.com
|
||||
D: Support for Embedded Planet EP8260 Board
|
||||
|
||||
N: Denis Peter
|
||||
E: d.peter@mpl.ch
|
||||
D: Support for 4xx SCSI, floppy, CDROM, CT69000 video, ...
|
||||
D: Support for PIP405 board
|
||||
D: Support for MIP405 board
|
||||
|
||||
N: Dave Peverley
|
||||
E: dpeverley@mpc-data.co.uk
|
||||
W: http://www.mpc-data.co.uk
|
||||
D: OMAP730 P2 board support
|
||||
|
||||
N: Bill Pitts
|
||||
E: wlp@mindspring.com
|
||||
D: BedBug embedded debugger code
|
||||
|
||||
N: Daniel Poirot
|
||||
E: dan.poirot@windriver.com
|
||||
D: Support for the Wind River sbc405, sbc8240 board
|
||||
W: http://www.windriver.com
|
||||
|
||||
N: Stefan Roese
|
||||
E: sr@denx.de
|
||||
D: AMCC PPC4xx Support
|
||||
W: http://www.denx.de
|
||||
|
||||
N: Erwin Rol
|
||||
E: erwin@muffin.org
|
||||
D: boot support for RTEMS
|
||||
|
||||
N: Paul Ruhland
|
||||
E: pruhland@rochester.rr.com
|
||||
D: Port to Logic Zoom LH7A40x SDK board(s)
|
||||
|
||||
N: Neil Russell
|
||||
E: caret@c-side.com
|
||||
D: Author of LiMon-1.4.2, which contributed some ideas
|
||||
|
||||
N: Travis B. Sawyer
|
||||
E: travis.sawyer@sandburst.com
|
||||
D: Support for AMCC PPC440GX, XES XPedite1000 440GX PrPMC board. AMCC 440gx Ref Platform (Ocotea)
|
||||
|
||||
N: Paolo Scaffardi
|
||||
E: arsenio@tin.it
|
||||
D: FADS823 configuration, MPC823 video support, I2C, wireless keyboard, lots more
|
||||
|
||||
N: Robert Schwebel
|
||||
E: r.schwebel@pengutronix.de
|
||||
D: Support for csb226, logodl and innokom boards (PXA2xx)
|
||||
|
||||
N: Aaron Sells
|
||||
E: sellsa@embeddedplanet.com
|
||||
D: Support for EP82xxM
|
||||
|
||||
N: Art Shipkowski
|
||||
E: art@videon-central.com
|
||||
D: Support for NetSilicon NS7520
|
||||
|
||||
N: Michal Simek
|
||||
E: monstr@monstr.eu
|
||||
D: Support for Microblaze, ML401, XUPV2P board
|
||||
W: www.monstr.eu
|
||||
|
||||
N: Yasushi Shoji
|
||||
E: yashi@atmark-techno.com
|
||||
D: Support for Xilinx MicroBlaze, for Atmark Techno SUZAKU FPGA board
|
||||
|
||||
N: Kurt Stremerch
|
||||
E: kurt@exys.be
|
||||
D: Support for Exys XSEngine board
|
||||
|
||||
N: Andrea Scian
|
||||
E: andrea.scian@dave-tech.it
|
||||
D: Port to B2 board
|
||||
W: www.dave-tech.it
|
||||
|
||||
N: Timur Tabi
|
||||
E: timur@freescale.com
|
||||
D: Support for MPC8349E-mITX
|
||||
W: www.freescale.com
|
||||
|
||||
N: Rob Taylor
|
||||
E: robt@flyingpig.com
|
||||
D: Port to MBX860T and Sandpoint8240
|
||||
|
||||
N: Erik Theisen
|
||||
E: etheisen@mindspring.com
|
||||
D: MBX8xx and many other patches
|
||||
|
||||
N: Jim Thompson
|
||||
E: jim@musenki.com
|
||||
D: Support for MUSENKI board
|
||||
|
||||
N: Rune Torgersen
|
||||
E: <runet@innovsys.com>
|
||||
D: Support for Motorola MPC8266ADS board
|
||||
|
||||
N: Greg Ungerer
|
||||
E: greg.ungerer@opengear.com
|
||||
D: Support for ks8695 CPU, and OpenGear cmXXXX boards
|
||||
|
||||
N: David Updegraff
|
||||
E: dave@cray.com
|
||||
D: Port to Cray L1 board; DHCP vendor extensions
|
||||
|
||||
N: Christian Vejlbo
|
||||
E: christian.vejlbo@tellabs.com
|
||||
D: FADS860T ethernet support
|
||||
|
||||
N: Robert Whaley
|
||||
E: rwhaley@applieddata.net
|
||||
D: Port to ARM PXA27x adsvix SBC
|
||||
|
||||
N: Martin Winistoerfer
|
||||
E: martinwinistoerfer@gmx.ch
|
||||
D: Port to MPC555/556 microcontrollers and support for cmi board
|
||||
|
||||
N: Ming-Len Wu
|
||||
E: minglen_wu@techware.com.tw
|
||||
D: Motorola MX1ADS board support
|
||||
W: http://www.techware.com.tw/
|
||||
|
||||
N: Xianghua Xiao
|
||||
E: x.xiao@motorola.com
|
||||
D: Support for Motorola 85xx(PowerQUICC III) chip, MPC8540ADS and MPC8560ADS boards.
|
||||
|
||||
N: John Zhan
|
||||
E: zhanz@sinovee.com
|
||||
D: Support for SinoVee Microsystems SC8xx SBC
|
||||
|
||||
N: Alex Zuepke
|
||||
E: azu@sysgo.de
|
||||
D: Overall improvements on StrongARM, ARM720TDMI; Support for Tuxscreen; initial PCMCIA support for ARM
|
||||
W: www.elinos.com
|
||||
637
MAINTAINERS
Normal file
637
MAINTAINERS
Normal file
@@ -0,0 +1,637 @@
|
||||
#########################################################################
|
||||
# #
|
||||
# Regular Maintainers for U-Boot board support: #
|
||||
# #
|
||||
# For any board without permanent maintainer, please contact #
|
||||
# Wolfgang Denk <wd@denx.de> #
|
||||
# and Cc: the <U-Boot-Users@lists.sourceforge.net> mailing lists. #
|
||||
# #
|
||||
# Note: lists sorted by Maintainer Name #
|
||||
#########################################################################
|
||||
|
||||
|
||||
#########################################################################
|
||||
# PowerPC Systems: #
|
||||
# #
|
||||
# Maintainer Name, Email Address #
|
||||
# Board CPU #
|
||||
#########################################################################
|
||||
|
||||
Greg Allen <gallen@arlut.utexas.edu>
|
||||
|
||||
UTX8245 MPC8245
|
||||
|
||||
Pantelis Antoniou <panto@intracom.gr>
|
||||
|
||||
NETVIA MPC8xx
|
||||
|
||||
Reinhard Arlt <reinhard.arlt@esd-electronics.com>
|
||||
|
||||
cpci5200 MPC5200
|
||||
mecp5200 MPC5200
|
||||
pf5200 MPC5200
|
||||
|
||||
CPCI750 PPC750FX/GX
|
||||
|
||||
Yuli Barcohen <yuli@arabellasw.com>
|
||||
|
||||
Adder MPC87x/MPC852T
|
||||
ep8248 MPC8248
|
||||
ISPAN MPC8260
|
||||
MPC8260ADS MPC826x/MPC827x/MPC8280
|
||||
Rattler MPC8248
|
||||
ZPC1900 MPC8265
|
||||
|
||||
Michael Barkowski <michael.barkowski@freescale.com>
|
||||
|
||||
MPC8323ERDB MPC8323
|
||||
|
||||
Jerry Van Baren <gerald.vanbaren@smiths-aerospace.com>
|
||||
|
||||
sacsng MPC8260
|
||||
|
||||
Oliver Brown <obrown@adventnetworks.com>
|
||||
|
||||
gw8260 MPC8260
|
||||
|
||||
Conn Clark <clark@esteem.com>
|
||||
|
||||
ESTEEM192E MPC8xx
|
||||
|
||||
K<EFBFBD>ri Dav<61><76>sson <kd@flaga.is>
|
||||
|
||||
FLAGADM MPC823
|
||||
|
||||
Torsten Demke <torsten.demke@fci.com>
|
||||
|
||||
eXalion MPC824x
|
||||
|
||||
Wolfgang Denk <wd@denx.de>
|
||||
|
||||
IceCube_5100 MGT5100
|
||||
IceCube_5200 MPC5200
|
||||
|
||||
AMX860 MPC860
|
||||
ETX094 MPC850
|
||||
FPS850L MPC850
|
||||
FPS860L MPC860
|
||||
ICU862 MPC862
|
||||
IP860 MPC860
|
||||
IVML24 MPC860
|
||||
IVML24_128 MPC860
|
||||
IVML24_256 MPC860
|
||||
IVMS8 MPC860
|
||||
IVMS8_128 MPC860
|
||||
IVMS8_256 MPC860
|
||||
LANTEC MPC850
|
||||
LWMON MPC823
|
||||
NC650 MPC852
|
||||
R360MPI MPC823
|
||||
RMU MPC850
|
||||
RRvision MPC823
|
||||
SM850 MPC850
|
||||
SPD823TS MPC823
|
||||
TQM823L MPC823
|
||||
TQM823L_LCD MPC823
|
||||
TQM850L MPC850
|
||||
TQM855L MPC855
|
||||
TQM860L MPC860
|
||||
TQM860L_FEC MPC860
|
||||
c2mon MPC855
|
||||
hermes MPC860
|
||||
lwmon MPC823
|
||||
pcu_e MPC855
|
||||
|
||||
CU824 MPC8240
|
||||
Sandpoint8240 MPC8240
|
||||
SL8245 MPC8245
|
||||
|
||||
ATC MPC8250
|
||||
PM825 MPC8250
|
||||
|
||||
TQM8255 MPC8255
|
||||
|
||||
CPU86 MPC8260
|
||||
PM826 MPC8260
|
||||
TQM8260 MPC8260
|
||||
|
||||
P3G4 MPC7410
|
||||
|
||||
PCIPPC2 MPC750
|
||||
PCIPPC6 MPC750
|
||||
|
||||
EXBITGEN PPC405GP
|
||||
|
||||
Jon Diekema <jon.diekema@smiths-aerospace.com>
|
||||
|
||||
sbc8260 MPC8260
|
||||
|
||||
Dave Ellis <DGE@sixnetio.com>
|
||||
|
||||
SXNI855T MPC8xx
|
||||
|
||||
Thomas Frieden <ThomasF@hyperion-entertainment.com>
|
||||
|
||||
AmigaOneG3SE MPC7xx
|
||||
|
||||
Matthias Fuchs <matthias.fuchs@esd-electronics.com>
|
||||
|
||||
ADCIOP IOP480 (PPC401)
|
||||
APC405 PPC405GP
|
||||
AR405 PPC405GP
|
||||
ASH405 PPC405EP
|
||||
CANBT PPC405CR
|
||||
CPCI2DP PPC405GP
|
||||
CPCI405 PPC405GP
|
||||
CPCI4052 PPC405GP
|
||||
CPCI405AB PPC405GP
|
||||
CPCI405DT PPC405GP
|
||||
CPCI440 PPC440GP
|
||||
CPCIISER4 PPC405GP
|
||||
DASA_SIM IOP480 (PPC401)
|
||||
DP405 PPC405EP
|
||||
DU405 PPC405GP
|
||||
G2000 PPC405EP
|
||||
HH405 PPC405EP
|
||||
HUB405 PPC405EP
|
||||
OCRTC PPC405GP
|
||||
ORSG PPC405GP
|
||||
PCI405 PPC405GP
|
||||
PLU405 PPC405EP
|
||||
PMC405 PPC405GP
|
||||
VOH405 PPC405EP
|
||||
VOM405 PPC405EP
|
||||
WUH405 PPC405EP
|
||||
CMS700 PPC405EP
|
||||
|
||||
Niklaus Giger <niklaus.giger@netstal.com>
|
||||
|
||||
HCU4 PPC405GPr
|
||||
HCU5 PPC440EPx
|
||||
|
||||
Frank Gottschling <fgottschling@eltec.de>
|
||||
|
||||
MHPC MPC8xx
|
||||
|
||||
BAB7xx MPC740/MPC750
|
||||
|
||||
Wolfgang Grandegger <wg@denx.de>
|
||||
|
||||
CCM MPC855
|
||||
|
||||
PN62 MPC8240
|
||||
|
||||
IPHASE4539 MPC8260
|
||||
SCM MPC8260
|
||||
|
||||
Howard Gray <mvsensor@matrix-vision.de>
|
||||
|
||||
MVS1 MPC823
|
||||
|
||||
Joe Hamman <joe.hamman@embeddedspecialties.com>
|
||||
|
||||
sbc8641d MPC8641D
|
||||
|
||||
Klaus Heydeck <heydeck@kieback-peter.de>
|
||||
|
||||
KUP4K MPC855
|
||||
KUP4X MPC859
|
||||
|
||||
Murray Jensen <Murray.Jensen@csiro.au>
|
||||
|
||||
cogent_mpc8xx MPC8xx
|
||||
|
||||
cogent_mpc8260 MPC8260
|
||||
hymod MPC8260
|
||||
|
||||
Brad Kemp <Brad.Kemp@seranoa.com>
|
||||
|
||||
ppmc8260 MPC8260
|
||||
|
||||
Sangmoon Kim <dogoil@etinsys.com>
|
||||
|
||||
debris MPC8245
|
||||
KVME080 MPC8245
|
||||
|
||||
Thomas Lange <thomas@corelatus.se>
|
||||
|
||||
GTH MPC860
|
||||
|
||||
The LEOX team <team@leox.org>
|
||||
|
||||
ELPT860 MPC860T
|
||||
|
||||
Dave Liu <daveliu@freescale.com>
|
||||
|
||||
MPC8360EMDS MPC8360
|
||||
|
||||
Nye Liu <nyet@zumanetworks.com>
|
||||
|
||||
ZUMA MPC7xx_74xx
|
||||
|
||||
Jon Loeliger <jdl@freescale.com>
|
||||
|
||||
MPC8540ADS MPC8540
|
||||
MPC8560ADS MPC8560
|
||||
MPC8541CDS MPC8541
|
||||
MPC8555CDS MPC8555
|
||||
|
||||
MPC8641HPCN MPC8641D
|
||||
|
||||
Dan Malek <dan@embeddedalley.com>
|
||||
|
||||
stxgp3 MPC85xx
|
||||
stxssa MPC85xx
|
||||
stxxtc MPC8xx
|
||||
|
||||
Eran Man <eran@nbase.co.il>
|
||||
|
||||
EVB64260_750CX MPC750CX
|
||||
|
||||
Andrea "llandre" Marson <andrea.marson@dave-tech.it>
|
||||
|
||||
PPChameleonEVB PPC405EP
|
||||
|
||||
Reinhard Meyer <r.meyer@emk-elektronik.de>
|
||||
|
||||
TOP860 MPC860T
|
||||
TOP5200 MPC5200
|
||||
|
||||
Tolunay Orkun <torkun@nextio.com>
|
||||
|
||||
csb272 PPC405GP
|
||||
csb472 PPC405GP
|
||||
|
||||
John Otken <jotken@softadvances.com>
|
||||
|
||||
luan PPC440SP
|
||||
taihu PPC405EP
|
||||
|
||||
Keith Outwater <Keith_Outwater@mvis.com>
|
||||
|
||||
GEN860T MPC860T
|
||||
GEN860T_SC MPC860T
|
||||
|
||||
Frank Panno <fpanno@delphintech.com>
|
||||
|
||||
ep8260 MPC8260
|
||||
|
||||
Denis Peter <d.peter@mpl.ch>
|
||||
|
||||
MIP405 PPC4xx
|
||||
PIP405 PPC4xx
|
||||
|
||||
Kim Phillips <kim.phillips@freescale.com>
|
||||
|
||||
MPC8349EMDS MPC8349
|
||||
|
||||
Daniel Poirot <dan.poirot@windriver.com>
|
||||
|
||||
sbc8240 MPC8240
|
||||
sbc405 PPC405GP
|
||||
|
||||
Stefan Roese <sr@denx.de>
|
||||
|
||||
P3M7448 MPC7448
|
||||
|
||||
uc100 MPC857
|
||||
|
||||
TQM85xx MPC8540/8541/8555/8560
|
||||
|
||||
acadia PPC405EZ
|
||||
alpr PPC440GX
|
||||
bamboo PPC440EP
|
||||
bunbinga PPC405EP
|
||||
ebony PPC440GP
|
||||
katmai PPC440SPe
|
||||
lwmon5 PPC440EPx
|
||||
ocotea PPC440GX
|
||||
p3p440 PPC440GP
|
||||
pcs440ep PPC440EP
|
||||
rainier PPC440GRx
|
||||
sequoia PPC440EPx
|
||||
sycamore PPC405GPr
|
||||
taishan PPC440GX
|
||||
walnut PPC405GP
|
||||
yellowstone PPC440GR
|
||||
yosemite PPC440EP
|
||||
zeus PPC405EP
|
||||
|
||||
P3M750 PPC750FX/GX/GL
|
||||
|
||||
Yusdi Santoso <yusdi_santoso@adaptec.com>
|
||||
|
||||
HIDDEN_DRAGON MPC8241/MPC8245
|
||||
|
||||
Travis Sawyer (travis.sawyer@sandburst.com>
|
||||
|
||||
KAREF PPC440GX
|
||||
METROBOX PPC440GX
|
||||
XPEDITE1K PPC440GX
|
||||
|
||||
Peter De Schrijver <p2@mind.be>
|
||||
|
||||
ML2 PPC4xx
|
||||
|
||||
Timur Tabi <timur@freescale.com>
|
||||
|
||||
MPC8349E-mITX MPC8349
|
||||
MPC8349E-mITX-GP MPC8349
|
||||
|
||||
Erik Theisen <etheisen@mindspring.com>
|
||||
|
||||
W7OLMC PPC4xx
|
||||
W7OLMG PPC4xx
|
||||
|
||||
Jim Thompson <jim@musenki.com>
|
||||
|
||||
MUSENKI MPC8245/8241
|
||||
Sandpoint8245 MPC8245
|
||||
|
||||
Rune Torgersen <runet@innovsys.com>
|
||||
|
||||
MPC8266ADS MPC8266
|
||||
|
||||
|
||||
David Updegraff <dave@cray.com>
|
||||
|
||||
CRAYL1 PPC4xx
|
||||
|
||||
Josef Wagner <Wagner@Microsys.de>
|
||||
|
||||
CPC45 MPC8245
|
||||
PM520 MPC5200
|
||||
|
||||
Stephen Williams <steve@icarus.com>
|
||||
|
||||
JSE PPC405GPr
|
||||
|
||||
John Zhan <zhanz@sinovee.com>
|
||||
|
||||
svm_sc8xx MPC8xx
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
Unknown / orphaned boards:
|
||||
|
||||
ADS860 MPC8xx
|
||||
FADS823 MPC8xx
|
||||
FADS850SAR MPC8xx
|
||||
FADS860T MPC8xx
|
||||
GENIETV MPC8xx
|
||||
IAD210 MPC8xx
|
||||
MBX MPC8xx
|
||||
MBX860T MPC8xx
|
||||
NX823 MPC8xx
|
||||
RPXClassic MPC8xx
|
||||
RPXlite MPC8xx
|
||||
|
||||
ERIC PPC4xx
|
||||
|
||||
MOUSSE MPC824x
|
||||
|
||||
RPXsuper MPC8260
|
||||
rsdproto MPC8260
|
||||
|
||||
EVB64260 MPC7xx_74xx
|
||||
|
||||
|
||||
#########################################################################
|
||||
# ARM Systems: #
|
||||
# #
|
||||
# Maintainer Name, Email Address #
|
||||
# Board CPU #
|
||||
#########################################################################
|
||||
|
||||
Rowel Atienza <rowel@diwalabs.com>
|
||||
|
||||
armadillo ARM720T
|
||||
|
||||
Rishi Bhattacharya <rishi@ti.com>
|
||||
|
||||
omap5912osk ARM926EJS
|
||||
|
||||
Cliff Brake <cliff.brake@gmail.com>
|
||||
|
||||
pxa255_idp xscale
|
||||
|
||||
Rick Bronson <rick@efn.org>
|
||||
|
||||
AT91RM9200DK at91rm9200
|
||||
|
||||
George G. Davis <gdavis@mvista.com>
|
||||
|
||||
assabet SA1100
|
||||
gcplus SA1100
|
||||
|
||||
Thomas Elste <info@elste.org>
|
||||
|
||||
modnet50 ARM720T (NET+50)
|
||||
|
||||
Peter Figuli <peposh@etc.sk>
|
||||
|
||||
wepep250 xscale
|
||||
|
||||
Marius Gr<47>ger <mag@sysgo.de>
|
||||
|
||||
impa7 ARM720T (EP7211)
|
||||
ep7312 ARM720T (EP7312)
|
||||
|
||||
Kshitij Gupta <kshitij@ti.com>
|
||||
|
||||
omap1510inn ARM925T
|
||||
omap1610inn ARM926EJS
|
||||
|
||||
Kyle Harris <kharris@nexus-tech.net>
|
||||
|
||||
lubbock xscale
|
||||
cradle xscale
|
||||
ixdp425 xscale
|
||||
|
||||
Gary Jennejohn <gj@denx.de>
|
||||
|
||||
smdk2400 ARM920T
|
||||
trab ARM920T
|
||||
|
||||
Konstantin Kletschke <kletschke@synertronixx.de>
|
||||
scb9328 ARM920T
|
||||
|
||||
Nishant Kamat <nskamat@ti.com>
|
||||
|
||||
omap1610h2 ARM926EJS
|
||||
|
||||
Sergey Kubushyn <ksi@koi8.net>
|
||||
|
||||
DV-EVM ARM926EJS
|
||||
SONATA ARM926EJS
|
||||
SCHMOOGIE ARM926EJS
|
||||
|
||||
Prakash Kumar <prakash@embedx.com>
|
||||
|
||||
cerf250 xscale
|
||||
|
||||
David M<>ller <d.mueller@elsoft.ch>
|
||||
|
||||
smdk2410 ARM920T
|
||||
VCMA9 ARM920T
|
||||
|
||||
Rolf Offermanns <rof@sysgo.de>
|
||||
|
||||
shannon SA1100
|
||||
|
||||
Peter Pearse <peter.pearse@arm.com>
|
||||
integratorcp All current ARM supplied &
|
||||
supported core modules
|
||||
-see http://www.arm.com
|
||||
/products/DevTools
|
||||
/Hardware_Platforms.html
|
||||
versatile ARM926EJ-S
|
||||
versatile ARM926EJ-S
|
||||
|
||||
Dave Peverley <dpeverley@mpc-data.co.uk>
|
||||
|
||||
omap730p2 ARM926EJS
|
||||
|
||||
Stefan Roese <sr@denx.de>
|
||||
|
||||
ixdpg425 xscale
|
||||
pdnb3 xscale
|
||||
scpu xscale
|
||||
|
||||
Robert Schwebel <r.schwebel@pengutronix.de>
|
||||
|
||||
csb226 xscale
|
||||
innokom xscale
|
||||
|
||||
Andrea Scian <andrea.scian@dave-tech.it>
|
||||
|
||||
B2 ARM7TDMI (S3C44B0X)
|
||||
|
||||
Greg Ungerer <greg.ungerer@opengear.com>
|
||||
|
||||
cm4008 ks8695p
|
||||
cm4116 ks8695p
|
||||
cm4148 ks8695p
|
||||
|
||||
Richard Woodruff <r-woodruff2@ti.com>
|
||||
|
||||
omap2420h4 ARM1136EJS
|
||||
|
||||
Alex Z<>pke <azu@sysgo.de>
|
||||
|
||||
lart SA1100
|
||||
dnp1110 SA1110
|
||||
|
||||
#########################################################################
|
||||
# x86 Systems: #
|
||||
# #
|
||||
# Maintainer Name, Email Address #
|
||||
# Board CPU #
|
||||
#########################################################################
|
||||
|
||||
Daniel Engstr<74>m <daniel@omicron.se>
|
||||
|
||||
sc520_cdp x86
|
||||
|
||||
#########################################################################
|
||||
# MIPS Systems: #
|
||||
# #
|
||||
# Maintainer Name, Email Address #
|
||||
# Board CPU #
|
||||
#########################################################################
|
||||
|
||||
Wolfgang Denk <wd@denx.de>
|
||||
|
||||
incaip MIPS32 4Kc
|
||||
purple MIPS64 5Kc
|
||||
|
||||
Thomas Lange <thomas@corelatus.se>
|
||||
dbau1x00 MIPS32 Au1000
|
||||
gth2 MIPS32 Au1000
|
||||
|
||||
#########################################################################
|
||||
# Nios-32 Systems: #
|
||||
# #
|
||||
# Maintainer Name, Email Address #
|
||||
# Board CPU #
|
||||
#########################################################################
|
||||
|
||||
Stephan Linz <linz@li-pro.net>
|
||||
|
||||
DK1S10 Nios-32
|
||||
ADNPESC1 Nios-32
|
||||
|
||||
Scott McNutt <smcnutt@psyent.com>
|
||||
|
||||
DK1C20 Nios-32
|
||||
|
||||
#########################################################################
|
||||
# Nios-II Systems: #
|
||||
# #
|
||||
# Maintainer Name, Email Address #
|
||||
# Board CPU #
|
||||
#########################################################################
|
||||
|
||||
Scott McNutt <smcnutt@psyent.com>
|
||||
|
||||
PCI5441 Nios-II
|
||||
PK1C20 Nios-II
|
||||
EP1C20 Nios-II
|
||||
EP1S10 Nios-II
|
||||
EP1S40 Nios-II
|
||||
|
||||
#########################################################################
|
||||
# MicroBlaze Systems: #
|
||||
# #
|
||||
# Maintainer Name, Email Address #
|
||||
# Board CPU #
|
||||
#########################################################################
|
||||
|
||||
Yasushi Shoji <yashi@atmark-techno.com>
|
||||
|
||||
SUZAKU MicroBlaze
|
||||
|
||||
Michal Simek <monstr@monstr.eu>
|
||||
|
||||
ML401 MicroBlaze
|
||||
XUPV2P MicroBlaze
|
||||
|
||||
#########################################################################
|
||||
# Coldfire Systems: #
|
||||
# #
|
||||
# Maintainer Name, Email Address #
|
||||
# Board CPU #
|
||||
#########################################################################
|
||||
|
||||
Matthias Fuchs <matthias.fuchs@esd-electronics.com>
|
||||
|
||||
TASREG MCF5249
|
||||
|
||||
Zachary P. Landau <zachary.landau@labxtechnologies.com>
|
||||
|
||||
r5200 mcf52x2
|
||||
|
||||
TsiChung Liew <Tsi-Chung.Liew@freescale.com>
|
||||
|
||||
M5235EVB mcf52x2
|
||||
M5329EVB mcf532x
|
||||
M54455EVB mcf5445x
|
||||
|
||||
Hayden Fraser <Hayden.Fraser@freescale.com>
|
||||
|
||||
M5253EVBE mcf52x2
|
||||
|
||||
#########################################################################
|
||||
# AVR32 Systems: #
|
||||
# #
|
||||
# Maintainer Name, Email Address #
|
||||
# Board CPU #
|
||||
#########################################################################
|
||||
|
||||
Haavard Skinnemoen <hskinnemoen@atmel.com>
|
||||
|
||||
ATSTK1000 AT32AP7000
|
||||
|
||||
#########################################################################
|
||||
# End of MAINTAINERS list #
|
||||
#########################################################################
|
||||
701
MAKEALL
Executable file
701
MAKEALL
Executable file
@@ -0,0 +1,701 @@
|
||||
#!/bin/sh
|
||||
|
||||
: ${JOBS:=}
|
||||
|
||||
if [ "${CROSS_COMPILE}" ] ; then
|
||||
MAKE="make CROSS_COMPILE=${CROSS_COMPILE}"
|
||||
else
|
||||
MAKE=make
|
||||
fi
|
||||
|
||||
if [ "${MAKEALL_LOGDIR}" ] ; then
|
||||
LOG_DIR=${MAKEALL_LOGDIR}
|
||||
else
|
||||
LOG_DIR="LOG"
|
||||
fi
|
||||
|
||||
if [ ! "${BUILD_DIR}" ] ; then
|
||||
BUILD_DIR="."
|
||||
fi
|
||||
|
||||
[ -d ${LOG_DIR} ] || mkdir ${LOG_DIR} || exit 1
|
||||
|
||||
LIST=""
|
||||
|
||||
#########################################################################
|
||||
## MPC5xx Systems
|
||||
#########################################################################
|
||||
|
||||
LIST_5xx=" \
|
||||
cmi_mpc5xx \
|
||||
"
|
||||
|
||||
#########################################################################
|
||||
## MPC5xxx Systems
|
||||
#########################################################################
|
||||
|
||||
LIST_5xxx=" \
|
||||
BC3450 \
|
||||
cm5200 \
|
||||
cpci5200 \
|
||||
EVAL5200 \
|
||||
fo300 \
|
||||
icecube_5100 \
|
||||
icecube_5200 \
|
||||
lite5200b \
|
||||
mcc200 \
|
||||
mecp5200 \
|
||||
motionpro \
|
||||
o2dnt \
|
||||
pf5200 \
|
||||
PM520 \
|
||||
TB5200 \
|
||||
Total5100 \
|
||||
Total5200 \
|
||||
Total5200_Rev2 \
|
||||
TQM5200 \
|
||||
TQM5200_B \
|
||||
TQM5200S \
|
||||
v38b \
|
||||
"
|
||||
|
||||
#########################################################################
|
||||
## MPC512x Systems
|
||||
#########################################################################
|
||||
|
||||
LIST_512x=" \
|
||||
ads5121 \
|
||||
"
|
||||
|
||||
#########################################################################
|
||||
## MPC8xx Systems
|
||||
#########################################################################
|
||||
LIST_8xx=" \
|
||||
Adder87x \
|
||||
AdderII \
|
||||
ADS860 \
|
||||
AMX860 \
|
||||
c2mon \
|
||||
CCM \
|
||||
cogent_mpc8xx \
|
||||
ELPT860 \
|
||||
EP88x \
|
||||
ESTEEM192E \
|
||||
ETX094 \
|
||||
FADS823 \
|
||||
FADS850SAR \
|
||||
FADS860T \
|
||||
FLAGADM \
|
||||
FPS850L \
|
||||
GEN860T \
|
||||
GEN860T_SC \
|
||||
GENIETV \
|
||||
GTH \
|
||||
hermes \
|
||||
IAD210 \
|
||||
ICU862_100MHz \
|
||||
IP860 \
|
||||
IVML24 \
|
||||
IVML24_128 \
|
||||
IVML24_256 \
|
||||
IVMS8 \
|
||||
IVMS8_128 \
|
||||
IVMS8_256 \
|
||||
KUP4K \
|
||||
KUP4X \
|
||||
LANTEC \
|
||||
lwmon \
|
||||
MBX \
|
||||
MBX860T \
|
||||
MHPC \
|
||||
MPC86xADS \
|
||||
MPC885ADS \
|
||||
MVS1 \
|
||||
NETPHONE \
|
||||
NETTA \
|
||||
NETTA2 \
|
||||
NETTA_ISDN \
|
||||
NETVIA \
|
||||
NETVIA_V2 \
|
||||
NX823 \
|
||||
pcu_e \
|
||||
QS823 \
|
||||
QS850 \
|
||||
QS860T \
|
||||
quantum \
|
||||
R360MPI \
|
||||
RBC823 \
|
||||
rmu \
|
||||
RPXClassic \
|
||||
RPXlite \
|
||||
RPXlite_DW \
|
||||
RRvision \
|
||||
SM850 \
|
||||
spc1920 \
|
||||
SPD823TS \
|
||||
svm_sc8xx \
|
||||
SXNI855T \
|
||||
TOP860 \
|
||||
TQM823L \
|
||||
TQM823L_LCD \
|
||||
TQM850L \
|
||||
TQM855L \
|
||||
TQM860L \
|
||||
TQM885D \
|
||||
uc100 \
|
||||
v37 \
|
||||
"
|
||||
|
||||
#########################################################################
|
||||
## PPC4xx Systems
|
||||
#########################################################################
|
||||
|
||||
LIST_4xx=" \
|
||||
acadia \
|
||||
acadia_nand \
|
||||
ADCIOP \
|
||||
alpr \
|
||||
AP1000 \
|
||||
AR405 \
|
||||
ASH405 \
|
||||
bamboo \
|
||||
bamboo_nand \
|
||||
bubinga \
|
||||
CANBT \
|
||||
CMS700 \
|
||||
CPCI2DP \
|
||||
CPCI405 \
|
||||
CPCI4052 \
|
||||
CPCI405AB \
|
||||
CPCI405DT \
|
||||
CPCI440 \
|
||||
CPCIISER4 \
|
||||
CRAYL1 \
|
||||
csb272 \
|
||||
csb472 \
|
||||
DASA_SIM \
|
||||
DP405 \
|
||||
DU405 \
|
||||
ebony \
|
||||
ERIC \
|
||||
EXBITGEN \
|
||||
G2000 \
|
||||
hcu4 \
|
||||
hcu5 \
|
||||
HH405 \
|
||||
HUB405 \
|
||||
JSE \
|
||||
KAREF \
|
||||
katmai \
|
||||
luan \
|
||||
lwmon5 \
|
||||
METROBOX \
|
||||
MIP405 \
|
||||
MIP405T \
|
||||
ML2 \
|
||||
ml300 \
|
||||
ocotea \
|
||||
OCRTC \
|
||||
ORSG \
|
||||
p3p440 \
|
||||
PCI405 \
|
||||
pcs440ep \
|
||||
PIP405 \
|
||||
PLU405 \
|
||||
PMC405 \
|
||||
PPChameleonEVB \
|
||||
rainier \
|
||||
sbc405 \
|
||||
sc3 \
|
||||
sequoia \
|
||||
sequoia_nand \
|
||||
taihu \
|
||||
taishan \
|
||||
VOH405 \
|
||||
VOM405 \
|
||||
W7OLMC \
|
||||
W7OLMG \
|
||||
walnut \
|
||||
WUH405 \
|
||||
XPEDITE1K \
|
||||
yellowstone \
|
||||
yosemite \
|
||||
yucca \
|
||||
zeus \
|
||||
"
|
||||
|
||||
#########################################################################
|
||||
## MPC8220 Systems
|
||||
#########################################################################
|
||||
|
||||
LIST_8220=" \
|
||||
Alaska8220 \
|
||||
Yukon8220 \
|
||||
"
|
||||
|
||||
#########################################################################
|
||||
## MPC824x Systems
|
||||
#########################################################################
|
||||
|
||||
LIST_824x=" \
|
||||
A3000 \
|
||||
barco \
|
||||
BMW \
|
||||
CPC45 \
|
||||
CU824 \
|
||||
debris \
|
||||
eXalion \
|
||||
HIDDEN_DRAGON \
|
||||
MOUSSE \
|
||||
MUSENKI \
|
||||
MVBLUE \
|
||||
OXC \
|
||||
PN62 \
|
||||
Sandpoint8240 \
|
||||
Sandpoint8245 \
|
||||
sbc8240 \
|
||||
SL8245 \
|
||||
utx8245 \
|
||||
"
|
||||
|
||||
#########################################################################
|
||||
## MPC8260 Systems (includes 8250, 8255 etc.)
|
||||
#########################################################################
|
||||
|
||||
LIST_8260=" \
|
||||
atc \
|
||||
cogent_mpc8260 \
|
||||
CPU86 \
|
||||
CPU87 \
|
||||
ep8248 \
|
||||
ep8260 \
|
||||
ep82xxm \
|
||||
gw8260 \
|
||||
hymod \
|
||||
IPHASE4539 \
|
||||
ISPAN \
|
||||
MPC8260ADS \
|
||||
MPC8266ADS \
|
||||
MPC8272ADS \
|
||||
PM826 \
|
||||
PM828 \
|
||||
ppmc8260 \
|
||||
Rattler8248 \
|
||||
RPXsuper \
|
||||
rsdproto \
|
||||
sacsng \
|
||||
sbc8260 \
|
||||
SCM \
|
||||
TQM8260_AC \
|
||||
TQM8260_AD \
|
||||
TQM8260_AE \
|
||||
ZPC1900 \
|
||||
"
|
||||
|
||||
#########################################################################
|
||||
## MPC83xx Systems (includes 8349, etc.)
|
||||
#########################################################################
|
||||
|
||||
LIST_83xx=" \
|
||||
MPC8313ERDB_33 \
|
||||
MPC8313ERDB_66 \
|
||||
MPC8323ERDB \
|
||||
MPC832XEMDS \
|
||||
MPC832XEMDS_ATM \
|
||||
MPC8349EMDS \
|
||||
MPC8349ITX \
|
||||
MPC8349ITXGP \
|
||||
MPC8360EMDS \
|
||||
MPC8360EMDS_ATM \
|
||||
sbc8349 \
|
||||
TQM834x \
|
||||
"
|
||||
|
||||
|
||||
#########################################################################
|
||||
## MPC85xx Systems (includes 8540, 8560 etc.)
|
||||
#########################################################################
|
||||
|
||||
LIST_85xx=" \
|
||||
MPC8540ADS \
|
||||
MPC8540EVAL \
|
||||
MPC8541CDS \
|
||||
MPC8544DS \
|
||||
MPC8548CDS \
|
||||
MPC8555CDS \
|
||||
MPC8560ADS \
|
||||
MPC8568MDS \
|
||||
PM854 \
|
||||
PM856 \
|
||||
sbc8540 \
|
||||
sbc8560 \
|
||||
stxgp3 \
|
||||
stxssa \
|
||||
TQM8540 \
|
||||
TQM8541 \
|
||||
TQM8555 \
|
||||
TQM8560 \
|
||||
"
|
||||
|
||||
#########################################################################
|
||||
## MPC86xx Systems
|
||||
#########################################################################
|
||||
|
||||
LIST_86xx=" \
|
||||
MPC8641HPCN \
|
||||
sbc8641d \
|
||||
"
|
||||
|
||||
#########################################################################
|
||||
## 74xx/7xx Systems
|
||||
#########################################################################
|
||||
|
||||
LIST_74xx=" \
|
||||
DB64360 \
|
||||
DB64460 \
|
||||
EVB64260 \
|
||||
mpc7448hpc2 \
|
||||
P3G4 \
|
||||
p3m7448 \
|
||||
PCIPPC2 \
|
||||
PCIPPC6 \
|
||||
ZUMA \
|
||||
"
|
||||
|
||||
LIST_TSEC=" \
|
||||
${LIST_85xx} \
|
||||
${LIST_86xx} \
|
||||
${LIST_83xx} \
|
||||
"
|
||||
|
||||
LIST_7xx=" \
|
||||
BAB7xx \
|
||||
CPCI750 \
|
||||
ELPPC \
|
||||
p3m750 \
|
||||
ppmc7xx \
|
||||
"
|
||||
|
||||
LIST_ppc=" \
|
||||
${LIST_5xx} \
|
||||
${LIST_512x} \
|
||||
${LIST_5xxx} \
|
||||
${LIST_8xx} \
|
||||
${LIST_8220} \
|
||||
${LIST_824x} \
|
||||
${LIST_8260} \
|
||||
${LIST_83xx} \
|
||||
${LIST_85xx} \
|
||||
${LIST_86xx} \
|
||||
${LIST_4xx} \
|
||||
${LIST_74xx} \
|
||||
${LIST_7xx} \
|
||||
"
|
||||
|
||||
#########################################################################
|
||||
## StrongARM Systems
|
||||
#########################################################################
|
||||
|
||||
LIST_SA=" \
|
||||
assabet \
|
||||
dnp1110 \
|
||||
gcplus \
|
||||
lart \
|
||||
shannon \
|
||||
"
|
||||
|
||||
#########################################################################
|
||||
## ARM7 Systems
|
||||
#########################################################################
|
||||
|
||||
LIST_ARM7=" \
|
||||
ap7 \
|
||||
ap720t \
|
||||
armadillo \
|
||||
B2 \
|
||||
ep7312 \
|
||||
evb4510 \
|
||||
impa7 \
|
||||
integratorap \
|
||||
lpc2292sodimm \
|
||||
modnet50 \
|
||||
SMN42 \
|
||||
"
|
||||
|
||||
#########################################################################
|
||||
## ARM9 Systems
|
||||
#########################################################################
|
||||
|
||||
LIST_ARM9=" \
|
||||
at91rm9200dk \
|
||||
cmc_pu2 \
|
||||
ap920t \
|
||||
ap922_XA10 \
|
||||
ap926ejs \
|
||||
ap946es \
|
||||
ap966 \
|
||||
cp920t \
|
||||
cp922_XA10 \
|
||||
cp926ejs \
|
||||
cp946es \
|
||||
cp966 \
|
||||
lpd7a400 \
|
||||
mp2usb \
|
||||
mx1ads \
|
||||
mx1fs2 \
|
||||
netstar \
|
||||
omap1510inn \
|
||||
omap1610h2 \
|
||||
omap1610inn \
|
||||
omap730p2 \
|
||||
sbc2410x \
|
||||
scb9328 \
|
||||
smdk2400 \
|
||||
smdk2410 \
|
||||
trab \
|
||||
VCMA9 \
|
||||
versatile \
|
||||
versatileab \
|
||||
versatilepb \
|
||||
voiceblue \
|
||||
davinci_dvevm \
|
||||
davinci_schmoogie \
|
||||
davinci_sonata \
|
||||
"
|
||||
|
||||
#########################################################################
|
||||
## ARM10 Systems
|
||||
#########################################################################
|
||||
LIST_ARM10=" \
|
||||
integratorcp \
|
||||
cp1026 \
|
||||
"
|
||||
|
||||
#########################################################################
|
||||
## ARM11 Systems
|
||||
#########################################################################
|
||||
LIST_ARM11=" \
|
||||
cp1136 \
|
||||
omap2420h4 \
|
||||
"
|
||||
|
||||
#########################################################################
|
||||
## Xscale Systems
|
||||
#########################################################################
|
||||
|
||||
LIST_pxa=" \
|
||||
adsvix \
|
||||
cerf250 \
|
||||
cradle \
|
||||
csb226 \
|
||||
delta \
|
||||
innokom \
|
||||
lubbock \
|
||||
pleb2 \
|
||||
pxa255_idp \
|
||||
wepep250 \
|
||||
xaeniax \
|
||||
xm250 \
|
||||
xsengine \
|
||||
zylonite \
|
||||
"
|
||||
|
||||
LIST_ixp=" \
|
||||
ixdp425 \
|
||||
ixdpg425 \
|
||||
pdnb3 \
|
||||
scpu \
|
||||
"
|
||||
|
||||
|
||||
LIST_arm=" \
|
||||
${LIST_SA} \
|
||||
${LIST_ARM7} \
|
||||
${LIST_ARM9} \
|
||||
${LIST_ARM10} \
|
||||
${LIST_ARM11} \
|
||||
${LIST_pxa} \
|
||||
${LIST_ixp} \
|
||||
"
|
||||
|
||||
#########################################################################
|
||||
## MIPS Systems (default = big endian)
|
||||
#########################################################################
|
||||
|
||||
LIST_mips4kc=" \
|
||||
incaip \
|
||||
"
|
||||
|
||||
LIST_mips5kc=" \
|
||||
purple \
|
||||
"
|
||||
|
||||
LIST_au1xx0=" \
|
||||
dbau1000 \
|
||||
dbau1100 \
|
||||
dbau1500 \
|
||||
dbau1550 \
|
||||
dbau1550_el \
|
||||
gth2 \
|
||||
"
|
||||
|
||||
LIST_mips=" \
|
||||
${LIST_mips4kc} \
|
||||
${LIST_mips5kc} \
|
||||
${LIST_au1xx0} \
|
||||
"
|
||||
|
||||
#########################################################################
|
||||
## MIPS Systems (little endian)
|
||||
#########################################################################
|
||||
|
||||
LIST_mips4kc_el=""
|
||||
|
||||
LIST_mips5kc_el=""
|
||||
|
||||
LIST_au1xx0_el=" \
|
||||
dbau1550_el \
|
||||
pb1000 \
|
||||
"
|
||||
|
||||
LIST_mips_el=" \
|
||||
${LIST_mips4kc_el} \
|
||||
${LIST_mips5kc_el} \
|
||||
${LIST_au1xx0_el} \
|
||||
"
|
||||
|
||||
#########################################################################
|
||||
## i386 Systems
|
||||
#########################################################################
|
||||
|
||||
LIST_I486=" \
|
||||
sc520_cdp \
|
||||
sc520_spunk \
|
||||
sc520_spunk_rel \
|
||||
"
|
||||
|
||||
LIST_x86=" \
|
||||
${LIST_I486} \
|
||||
"
|
||||
|
||||
#########################################################################
|
||||
## NIOS Systems
|
||||
#########################################################################
|
||||
|
||||
LIST_nios=" \
|
||||
ADNPESC1 \
|
||||
ADNPESC1_base_32 \
|
||||
ADNPESC1_DNPEVA2_base_32\
|
||||
DK1C20 \
|
||||
DK1C20_standard_32 \
|
||||
DK1S10 \
|
||||
DK1S10_standard_32 \
|
||||
DK1S10_mtx_ldk_20 \
|
||||
"
|
||||
|
||||
#########################################################################
|
||||
## Nios-II Systems
|
||||
#########################################################################
|
||||
|
||||
LIST_nios2=" \
|
||||
EP1C20 \
|
||||
EP1S10 \
|
||||
EP1S40 \
|
||||
PCI5441 \
|
||||
PK1C20 \
|
||||
"
|
||||
|
||||
#########################################################################
|
||||
## MicroBlaze Systems
|
||||
#########################################################################
|
||||
|
||||
LIST_microblaze=" \
|
||||
suzaku \
|
||||
ml401 \
|
||||
xupv2p \
|
||||
"
|
||||
|
||||
#########################################################################
|
||||
## ColdFire Systems
|
||||
#########################################################################
|
||||
|
||||
LIST_coldfire=" \
|
||||
cobra5272 \
|
||||
EB+MCF-EV123 \
|
||||
EB+MCF-EV123_internal \
|
||||
idmr \
|
||||
M5235EVB \
|
||||
M5249EVB \
|
||||
M5253EVB \
|
||||
M5271EVB \
|
||||
M5272C3 \
|
||||
M5282EVB \
|
||||
M5329EVB \
|
||||
M54455EVB \
|
||||
r5200 \
|
||||
TASREG \
|
||||
"
|
||||
|
||||
#########################################################################
|
||||
## AVR32 Systems
|
||||
#########################################################################
|
||||
|
||||
LIST_avr32=" \
|
||||
atstk1002 \
|
||||
"
|
||||
|
||||
#########################################################################
|
||||
## Blackfin Systems
|
||||
#########################################################################
|
||||
|
||||
LIST_blackfin=" \
|
||||
bf533-ezkit \
|
||||
bf533-stamp \
|
||||
bf537-stamp \
|
||||
bf561-ezkit \
|
||||
"
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
#----- for now, just run PPC by default -----
|
||||
[ $# = 0 ] && set $LIST_ppc
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
build_target() {
|
||||
target=$1
|
||||
|
||||
${MAKE} distclean >/dev/null
|
||||
${MAKE} ${target}_config
|
||||
|
||||
${MAKE} ${JOBS} all 2>&1 >${LOG_DIR}/$target.MAKELOG \
|
||||
| tee ${LOG_DIR}/$target.ERR
|
||||
|
||||
${CROSS_COMPILE:-ppc_8xx-}size ${BUILD_DIR}/u-boot \
|
||||
| tee -a ${LOG_DIR}/$target.MAKELOG
|
||||
}
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
|
||||
for arg in $@
|
||||
do
|
||||
case "$arg" in
|
||||
arm|SA|ARM7|ARM9|ARM10|ARM11|ixp|pxa| \
|
||||
avr32| \
|
||||
blackfin| \
|
||||
coldfire| \
|
||||
microblaze| \
|
||||
mips|mips_el| \
|
||||
nios|nios2| \
|
||||
ppc|5xx|5xxx|512x|8xx|8220|824x|8260|83xx|85xx|86xx|4xx|7xx|74xx| \
|
||||
x86|I486|TSEC)
|
||||
for target in `eval echo '$LIST_'${arg}`
|
||||
do
|
||||
build_target ${target}
|
||||
done
|
||||
;;
|
||||
*) build_target ${arg}
|
||||
;;
|
||||
esac
|
||||
done
|
||||
24
arm_config.mk
Normal file
24
arm_config.mk
Normal file
@@ -0,0 +1,24 @@
|
||||
#
|
||||
# (C) Copyright 2000-2002
|
||||
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
#
|
||||
# See file CREDITS for list of people who contributed to this
|
||||
# project.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
# MA 02111-1307 USA
|
||||
#
|
||||
|
||||
PLATFORM_CPPFLAGS += -DCONFIG_ARM -D__ARM__
|
||||
25
avr32_config.mk
Normal file
25
avr32_config.mk
Normal file
@@ -0,0 +1,25 @@
|
||||
#
|
||||
# (C) Copyright 2000-2002
|
||||
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
#
|
||||
# See file CREDITS for list of people who contributed to this
|
||||
# project.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
# MA 02111-1307 USA
|
||||
#
|
||||
|
||||
PLATFORM_RELFLAGS += -ffixed-r5 -fPIC -mno-init-got -mrelax
|
||||
PLATFORM_LDFLAGS += --relax
|
||||
24
blackfin_config.mk
Normal file
24
blackfin_config.mk
Normal file
@@ -0,0 +1,24 @@
|
||||
#
|
||||
# (C) Copyright 2000-2002
|
||||
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
#
|
||||
# See file CREDITS for list of people who contributed to this
|
||||
# project.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
# MA 02111-1307 USA
|
||||
#
|
||||
|
||||
PLATFORM_CPPFLAGS += -DCONFIG_BLACKFIN -D__BLACKFIN__
|
||||
44
board/AtmarkTechno/suzaku/Makefile
Normal file
44
board/AtmarkTechno/suzaku/Makefile
Normal file
@@ -0,0 +1,44 @@
|
||||
#
|
||||
# (C) Copyright 2003-2006
|
||||
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
#
|
||||
# See file CREDITS for list of people who contributed to this
|
||||
# project.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
# MA 02111-1307 USA
|
||||
#
|
||||
|
||||
include $(TOPDIR)/config.mk
|
||||
|
||||
LIB = $(obj)lib$(BOARD).a
|
||||
|
||||
COBJS = $(BOARD).o flash.o
|
||||
|
||||
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
|
||||
OBJS := $(addprefix $(obj),$(COBJS))
|
||||
SOBJS := $(addprefix $(obj),$(SOBJS))
|
||||
|
||||
$(LIB): $(obj).depend $(OBJS)
|
||||
$(AR) $(ARFLAGS) $@ $(OBJS)
|
||||
|
||||
#########################################################################
|
||||
|
||||
# defines $(obj).depend target
|
||||
include $(SRCTREE)/rules.mk
|
||||
|
||||
sinclude $(obj).depend
|
||||
|
||||
#########################################################################
|
||||
29
board/AtmarkTechno/suzaku/config.mk
Normal file
29
board/AtmarkTechno/suzaku/config.mk
Normal file
@@ -0,0 +1,29 @@
|
||||
#
|
||||
# (C) Copyright 2004 Atmark Techno, Inc.
|
||||
#
|
||||
# Yasushi SHOJI <yashi@atmark-techno.com>
|
||||
#
|
||||
# See file CREDITS for list of people who contributed to this
|
||||
# project.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
# MA 02111-1307 USA
|
||||
#
|
||||
|
||||
TEXT_BASE = 0x80F00000
|
||||
|
||||
PLATFORM_CPPFLAGS += -mno-xl-soft-mul
|
||||
PLATFORM_CPPFLAGS += -mno-xl-soft-div
|
||||
PLATFORM_CPPFLAGS += -mxl-barrel-shift
|
||||
46
board/AtmarkTechno/suzaku/flash.c
Normal file
46
board/AtmarkTechno/suzaku/flash.c
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* (C) Copyright 2004 Atmark Techno, Inc.
|
||||
*
|
||||
* Yasushi SHOJI <yashi@atmark-techno.com>
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
|
||||
flash_info_t flash_info[CFG_MAX_FLASH_BANKS];
|
||||
|
||||
unsigned long flash_init(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void flash_print_info(flash_info_t *info)
|
||||
{
|
||||
}
|
||||
|
||||
int flash_erase(flash_info_t *info, int s_first, int s_last)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
32
board/AtmarkTechno/suzaku/suzaku.c
Normal file
32
board/AtmarkTechno/suzaku/suzaku.c
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* (C) Copyright 2004 Atmark Techno, Inc.
|
||||
*
|
||||
* Yasushi SHOJI <yashi@atmark-techno.com>
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/* This is a board specific file. It's OK to include board specific
|
||||
* header files */
|
||||
#include <config.h>
|
||||
|
||||
void do_reset(void)
|
||||
{
|
||||
*((unsigned long *)(MICROBLAZE_SYSREG_BASE_ADDR)) = MICROBLAZE_SYSREG_RECONFIGURE;
|
||||
}
|
||||
67
board/AtmarkTechno/suzaku/u-boot.lds
Normal file
67
board/AtmarkTechno/suzaku/u-boot.lds
Normal file
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* (C) Copyright 2004 Atmark Techno, Inc.
|
||||
*
|
||||
* Yasushi SHOJI <yashi@atmark-techno.com>
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
OUTPUT_ARCH(microblaze)
|
||||
ENTRY(_start)
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.text ALIGN(0x4):
|
||||
{
|
||||
__text_start = .;
|
||||
cpu/microblaze/start.o (.text)
|
||||
*(.text)
|
||||
__text_end = .;
|
||||
}
|
||||
|
||||
.rodata ALIGN(0x4):
|
||||
{
|
||||
__rodata_start = .;
|
||||
*(.rodata)
|
||||
__rodata_end = .;
|
||||
}
|
||||
|
||||
.data ALIGN(0x4):
|
||||
{
|
||||
__data_start = .;
|
||||
*(.data)
|
||||
__data_end = .;
|
||||
}
|
||||
|
||||
.u_boot_cmd ALIGN(0x4):
|
||||
{
|
||||
. = .;
|
||||
__u_boot_cmd_start = .;
|
||||
*(.u_boot_cmd)
|
||||
__u_boot_cmd_end = .;
|
||||
}
|
||||
|
||||
.bss ALIGN(0x4):
|
||||
{
|
||||
__bss_start = .;
|
||||
*(.bss)
|
||||
__bss_end = .;
|
||||
}
|
||||
__end = . ;
|
||||
}
|
||||
162
board/BuS/EB+MCF-EV123/EB+MCF-EV123.c
Normal file
162
board/BuS/EB+MCF-EV123/EB+MCF-EV123.c
Normal file
@@ -0,0 +1,162 @@
|
||||
/*
|
||||
* (C) Copyright 2005
|
||||
* BuS Elektronik GmbH & Co.KG <esw@bus-elektonik.de>
|
||||
*
|
||||
* (C) Copyright 2000-2003
|
||||
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <command.h>
|
||||
#include "asm/m5282.h"
|
||||
#include "VCxK.h"
|
||||
|
||||
int checkboard (void)
|
||||
{
|
||||
puts ("Board: MCF-EV1 + MCF-EV23 (BuS Elektronik GmbH & Co. KG)\n");
|
||||
#if (TEXT_BASE == CFG_INT_FLASH_BASE)
|
||||
puts (" Boot from Internal FLASH\n");
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
long int initdram (int board_type)
|
||||
{
|
||||
int size,i;
|
||||
|
||||
size = 0;
|
||||
MCFSDRAMC_DCR = MCFSDRAMC_DCR_RTIM_6
|
||||
| MCFSDRAMC_DCR_RC((15 * CFG_CLK)>>4);
|
||||
#ifdef CFG_SDRAM_BASE0
|
||||
|
||||
MCFSDRAMC_DACR0 = MCFSDRAMC_DACR_BASE(CFG_SDRAM_BASE0)
|
||||
| MCFSDRAMC_DACR_CASL(1)
|
||||
| MCFSDRAMC_DACR_CBM(3)
|
||||
| MCFSDRAMC_DACR_PS_16);
|
||||
|
||||
MCFSDRAMC_DMR0 = MCFSDRAMC_DMR_BAM_16M
|
||||
| MCFSDRAMC_DMR_V;
|
||||
|
||||
MCFSDRAMC_DACR0 |= MCFSDRAMC_DACR_IP;
|
||||
|
||||
*(unsigned short *)(CFG_SDRAM_BASE0) = 0xA5A5;
|
||||
MCFSDRAMC_DACR0 |= MCFSDRAMC_DACR_RE;
|
||||
for (i=0; i < 2000; i++)
|
||||
asm(" nop");
|
||||
mbar_writeLong(MCFSDRAMC_DACR0, mbar_readLong(MCFSDRAMC_DACR0)
|
||||
| MCFSDRAMC_DACR_IMRS);
|
||||
*(unsigned int *)(CFG_SDRAM_BASE0 + 0x220) = 0xA5A5;
|
||||
size += CFG_SDRAM_SIZE * 1024 * 1024;
|
||||
#endif
|
||||
#ifdef CFG_SDRAM_BASE1
|
||||
MCFSDRAMC_DACR1 = MCFSDRAMC_DACR_BASE(CFG_SDRAM_BASE1)
|
||||
| MCFSDRAMC_DACR_CASL(1)
|
||||
| MCFSDRAMC_DACR_CBM(3)
|
||||
| MCFSDRAMC_DACR_PS_16;
|
||||
|
||||
MCFSDRAMC_DMR1 = MCFSDRAMC_DMR_BAM_16M
|
||||
| MCFSDRAMC_DMR_V;
|
||||
|
||||
MCFSDRAMC_DACR1 |= MCFSDRAMC_DACR_IP;
|
||||
|
||||
*(unsigned short *)(CFG_SDRAM_BASE1) = 0xA5A5;
|
||||
MCFSDRAMC_DACR1 |= MCFSDRAMC_DACR_RE;
|
||||
for (i=0; i < 2000; i++)
|
||||
asm(" nop");
|
||||
MCFSDRAMC_DACR1 |= MCFSDRAMC_DACR_IMRS;
|
||||
*(unsigned int *)(CFG_SDRAM_BASE1 + 0x220) = 0xA5A5;
|
||||
size += CFG_SDRAM_SIZE1 * 1024 * 1024;
|
||||
#endif
|
||||
return size;
|
||||
}
|
||||
|
||||
|
||||
#if defined(CFG_DRAM_TEST)
|
||||
int testdram (void)
|
||||
{
|
||||
uint *pstart = (uint *) CFG_MEMTEST_START;
|
||||
uint *pend = (uint *) CFG_MEMTEST_END;
|
||||
uint *p;
|
||||
|
||||
printf("SDRAM test phase 1:\n");
|
||||
for (p = pstart; p < pend; p++)
|
||||
*p = 0xaaaaaaaa;
|
||||
|
||||
for (p = pstart; p < pend; p++) {
|
||||
if (*p != 0xaaaaaaaa) {
|
||||
printf ("SDRAM test fails at: %08x\n", (uint) p);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
printf("SDRAM test phase 2:\n");
|
||||
for (p = pstart; p < pend; p++)
|
||||
*p = 0x55555555;
|
||||
|
||||
for (p = pstart; p < pend; p++) {
|
||||
if (*p != 0x55555555) {
|
||||
printf ("SDRAM test fails at: %08x\n", (uint) p);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
printf("SDRAM test passed.\n");
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
int misc_init_r(void)
|
||||
{
|
||||
init_vcxk();
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
int do_vcimage (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
||||
{
|
||||
int rcode = 0;
|
||||
ulong source;
|
||||
|
||||
switch (argc) {
|
||||
case 2:
|
||||
source = simple_strtoul(argv[1],NULL,16);
|
||||
vcxk_loadimage(source);
|
||||
rcode = 0;
|
||||
break;
|
||||
default:
|
||||
printf ("Usage:\n%s\n", cmdtp->usage);
|
||||
rcode = 1;
|
||||
break;
|
||||
}
|
||||
return rcode;
|
||||
}
|
||||
|
||||
/***************************************************/
|
||||
|
||||
U_BOOT_CMD(
|
||||
vcimage, 2, 0, do_vcimage,
|
||||
"vcimage - loads an image to Display\n",
|
||||
"vcimage addr\n"
|
||||
);
|
||||
|
||||
/* EOF EB+MCF-EV123c */
|
||||
44
board/BuS/EB+MCF-EV123/Makefile
Normal file
44
board/BuS/EB+MCF-EV123/Makefile
Normal file
@@ -0,0 +1,44 @@
|
||||
#
|
||||
# (C) Copyright 2000-2006
|
||||
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
#
|
||||
# See file CREDITS for list of people who contributed to this
|
||||
# project.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
# MA 02111-1307 USA
|
||||
#
|
||||
|
||||
include $(TOPDIR)/config.mk
|
||||
|
||||
LIB = $(obj)lib$(BOARD).a
|
||||
|
||||
COBJS = $(BOARD).o cfm_flash.o flash.o VCxK.o mii.o
|
||||
|
||||
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
|
||||
OBJS := $(addprefix $(obj),$(COBJS))
|
||||
SOBJS := $(addprefix $(obj),$(SOBJS))
|
||||
|
||||
$(LIB): $(obj).depend $(OBJS)
|
||||
$(AR) $(ARFLAGS) $@ $(OBJS)
|
||||
|
||||
#########################################################################
|
||||
|
||||
# defines $(obj).depend target
|
||||
include $(SRCTREE)/rules.mk
|
||||
|
||||
sinclude $(obj).depend
|
||||
|
||||
#########################################################################
|
||||
136
board/BuS/EB+MCF-EV123/VCxK.c
Normal file
136
board/BuS/EB+MCF-EV123/VCxK.c
Normal file
@@ -0,0 +1,136 @@
|
||||
/*
|
||||
* (C) Copyright 2005
|
||||
* BuS Elektronik GmbH & Co.KG <esw@bus-elektonik.de>
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <asm/m5282.h>
|
||||
#include "VCxK.h"
|
||||
|
||||
vu_char *vcxk_bws = (vu_char *)(CFG_CS3_BASE);
|
||||
#define VCXK_BWS vcxk_bws
|
||||
|
||||
static ulong vcxk_driver;
|
||||
|
||||
|
||||
ulong search_vcxk_driver(void);
|
||||
void vcxk_cls(void);
|
||||
void vcxk_setbrightness(short brightness);
|
||||
int vcxk_request(void);
|
||||
int vcxk_acknowledge_wait(void);
|
||||
void vcxk_clear(void);
|
||||
|
||||
int init_vcxk(void)
|
||||
{
|
||||
VIDEO_Invert_CFG &= ~VIDEO_Invert_IO;
|
||||
VIDEO_INVERT_PORT |= VIDEO_INVERT_PIN;
|
||||
VIDEO_INVERT_DDR |= VIDEO_INVERT_PIN;
|
||||
|
||||
VIDEO_REQUEST_PORT |= VIDEO_REQUEST_PIN;
|
||||
VIDEO_REQUEST_DDR |= VIDEO_REQUEST_PIN;
|
||||
|
||||
VIDEO_ACKNOWLEDGE_DDR &= ~VIDEO_ACKNOWLEDGE_PIN;
|
||||
|
||||
vcxk_driver = search_vcxk_driver();
|
||||
if (vcxk_driver)
|
||||
{
|
||||
/* use flash resist driver */
|
||||
}
|
||||
else
|
||||
{
|
||||
vcxk_cls();
|
||||
vcxk_cls();
|
||||
vcxk_setbrightness(1000);
|
||||
}
|
||||
VIDEO_ENABLE_DDR |= VIDEO_ENABLE_PIN;
|
||||
VIDEO_ENABLE_PORT |= VIDEO_ENABLE_PIN;
|
||||
VIDEO_ENABLE_PORT &= ~VIDEO_ENABLE_PIN;
|
||||
return 1;
|
||||
}
|
||||
|
||||
void vcxk_loadimage(ulong source)
|
||||
{
|
||||
int cnt;
|
||||
vcxk_acknowledge_wait();
|
||||
for (cnt=0; cnt<16384; cnt++)
|
||||
{
|
||||
VCXK_BWS[cnt*2] = (*(vu_char*) source);
|
||||
source++;
|
||||
}
|
||||
vcxk_request();
|
||||
}
|
||||
|
||||
void vcxk_cls(void)
|
||||
{
|
||||
vcxk_acknowledge_wait();
|
||||
vcxk_clear();
|
||||
vcxk_request();
|
||||
}
|
||||
|
||||
void vcxk_clear(void)
|
||||
{
|
||||
int cnt;
|
||||
for (cnt=0; cnt<16384; cnt++)
|
||||
{
|
||||
VCXK_BWS[cnt*2] = 0x00;
|
||||
}
|
||||
}
|
||||
|
||||
void vcxk_setbrightness(short brightness)
|
||||
{
|
||||
VCXK_BWS[0x8000]=(brightness >> 4) +2;
|
||||
VCXK_BWS[0xC000]= (brightness + 23) >> 8;
|
||||
VCXK_BWS[0xC001]= (brightness + 23) & 0xFF;
|
||||
}
|
||||
|
||||
int vcxk_request(void)
|
||||
{
|
||||
if (vcxk_driver)
|
||||
{
|
||||
/* use flash resist driver */
|
||||
}
|
||||
else
|
||||
{
|
||||
VIDEO_REQUEST_PORT &= ~VIDEO_REQUEST_PIN;
|
||||
VIDEO_REQUEST_PORT |= VIDEO_REQUEST_PIN;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
int vcxk_acknowledge_wait(void)
|
||||
{
|
||||
if (vcxk_driver)
|
||||
{
|
||||
/* use flash resist driver */
|
||||
}
|
||||
else
|
||||
{
|
||||
while (!(VIDEO_ACKNOWLEDGE_PORT & VIDEO_ACKNOWLEDGE_PIN));
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
ulong search_vcxk_driver(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* eof */
|
||||
48
board/BuS/EB+MCF-EV123/VCxK.h
Normal file
48
board/BuS/EB+MCF-EV123/VCxK.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* (C) Copyright 2005
|
||||
* BuS Elektronik GmbH & Co.KG <esw@bus-elektonik.de>
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef __VCXK_H_
|
||||
#define __VCXK_H_
|
||||
|
||||
extern int init_vcxk(void);
|
||||
void vcxk_loadimage(ulong source);
|
||||
|
||||
#define VIDEO_ACKNOWLEDGE_PORT MCFGPTB_GPTPORT
|
||||
#define VIDEO_ACKNOWLEDGE_DDR MCFGPTB_GPTDDR
|
||||
#define VIDEO_ACKNOWLEDGE_PIN 0x0001
|
||||
|
||||
#define VIDEO_ENABLE_PORT MCFGPTB_GPTPORT
|
||||
#define VIDEO_ENABLE_DDR MCFGPTB_GPTDDR
|
||||
#define VIDEO_ENABLE_PIN 0x0002
|
||||
|
||||
#define VIDEO_REQUEST_PORT MCFGPTB_GPTPORT
|
||||
#define VIDEO_REQUEST_DDR MCFGPTB_GPTDDR
|
||||
#define VIDEO_REQUEST_PIN 0x0004
|
||||
|
||||
#define VIDEO_Invert_CFG MCFGPIO_PEPAR
|
||||
#define VIDEO_Invert_IO MCFGPIO_PEPAR_PEPA2
|
||||
#define VIDEO_INVERT_PORT MCFGPIO_PORTE
|
||||
#define VIDEO_INVERT_DDR MCFGPIO_DDRE
|
||||
#define VIDEO_INVERT_PIN MCFGPIO_PORT2
|
||||
|
||||
#endif
|
||||
212
board/BuS/EB+MCF-EV123/cfm_flash.c
Normal file
212
board/BuS/EB+MCF-EV123/cfm_flash.c
Normal file
@@ -0,0 +1,212 @@
|
||||
/*
|
||||
* Basic Flash Driver for Freescale MCF 5281/5282 internal FLASH
|
||||
*
|
||||
* (C) Copyright 2005 BuS Elektronik GmbH & Co.KG <esw@bus-elektonik.de>
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <asm/m5282.h>
|
||||
#include "cfm_flash.h"
|
||||
|
||||
#if defined(CONFIG_M5281) || defined(CONFIG_M5282)
|
||||
|
||||
#if (CFG_CLK>20000000)
|
||||
#define CFM_CLK (((long) CFG_CLK / (400000 * 8) + 1) | 0x40)
|
||||
#else
|
||||
#define CFM_CLK ((long) CFG_CLK / 400000 + 1)
|
||||
#endif
|
||||
|
||||
#define cmf_backdoor_address(addr) (((addr) & 0x0007FFFF) | 0x04000000 | \
|
||||
(CFG_MBAR & 0xC0000000))
|
||||
|
||||
void cfm_flash_print_info (flash_info_t * info)
|
||||
{
|
||||
printf ("Freescale: ");
|
||||
switch (info->flash_id & FLASH_TYPEMASK) {
|
||||
case FREESCALE_ID_MCF5281 & FLASH_TYPEMASK:
|
||||
printf ("MCF5281 internal FLASH\n");
|
||||
break;
|
||||
case FREESCALE_ID_MCF5282 & FLASH_TYPEMASK:
|
||||
printf ("MCF5282 internal FLASH\n");
|
||||
break;
|
||||
default:
|
||||
printf ("Unknown Chip Type\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void cfm_flash_init (flash_info_t * info)
|
||||
{
|
||||
int sector;
|
||||
ulong protection;
|
||||
MCFCFM_MCR = 0;
|
||||
MCFCFM_CLKD = CFM_CLK;
|
||||
debug ("CFM Clock divider: %ld (%d Hz @ %ld Hz)\n",CFM_CLK,\
|
||||
CFG_CLK / (2* ((CFM_CLK & 0x3F)+1) * (1+((CFM_CLK & 0x40)>>6)*7)),\
|
||||
CFG_CLK);
|
||||
MCFCFM_SACC = 0;
|
||||
MCFCFM_DACC = 0;
|
||||
|
||||
if (MCFCFM_SEC & MCFCFM_SEC_KEYEN)
|
||||
puts("CFM backdoor access is enabled\n");
|
||||
if (MCFCFM_SEC & MCFCFM_SEC_SECSTAT)
|
||||
puts("CFM securety is enabled\n");
|
||||
|
||||
#ifdef CONFIG_M5281
|
||||
info->flash_id = (FREESCALE_MANUFACT & FLASH_VENDMASK) |
|
||||
(FREESCALE_ID_MCF5281 & FLASH_TYPEMASK);
|
||||
info->size = 256*1024;
|
||||
info->sector_count = 16;
|
||||
#else
|
||||
info->flash_id = (FREESCALE_MANUFACT & FLASH_VENDMASK) |
|
||||
(FREESCALE_ID_MCF5282 & FLASH_TYPEMASK);
|
||||
info->size = 512*1024;
|
||||
info->sector_count = 32;
|
||||
#endif
|
||||
protection = MCFCFM_PROT;
|
||||
for (sector = 0; sector < info->sector_count; sector++)
|
||||
{
|
||||
if (sector == 0)
|
||||
{
|
||||
info->start[sector] = CFG_INT_FLASH_BASE;
|
||||
}
|
||||
else
|
||||
{
|
||||
info->start[sector] = info->start[sector-1] + 0x04000;
|
||||
}
|
||||
info->protect[sector] = protection & 1;
|
||||
protection >>= 1;
|
||||
}
|
||||
}
|
||||
|
||||
int cfm_flash_readycheck(int checkblank)
|
||||
{
|
||||
int rc;
|
||||
unsigned char state;
|
||||
|
||||
rc = ERR_OK;
|
||||
while (!(MCFCFM_USTAT & MCFCFM_USTAT_CCIF));
|
||||
state = MCFCFM_USTAT;
|
||||
if (state & MCFCFM_USTAT_ACCERR)
|
||||
{
|
||||
debug ("%s(): CFM access error",__FUNCTION__);
|
||||
rc = ERR_PROG_ERROR;
|
||||
}
|
||||
if (state & MCFCFM_USTAT_PVIOL)
|
||||
{
|
||||
debug ("%s(): CFM protection violation",__FUNCTION__);
|
||||
rc = ERR_PROTECTED;
|
||||
}
|
||||
if (checkblank)
|
||||
{
|
||||
if (!(state & MCFCFM_USTAT_BLANK))
|
||||
{
|
||||
debug ("%s(): CFM erras error",__FUNCTION__);
|
||||
rc = ERR_NOT_ERASED;
|
||||
}
|
||||
}
|
||||
MCFCFM_USTAT = state & 0x34; /* reset state */
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* Erase 16KiB = 8 2KiB pages */
|
||||
|
||||
int cfm_flash_erase_sector (flash_info_t * info, int sector)
|
||||
{
|
||||
ulong address;
|
||||
int page;
|
||||
int rc;
|
||||
rc= ERR_OK;
|
||||
address = cmf_backdoor_address(info->start[sector]);
|
||||
for (page=0; (page<8) && (rc==ERR_OK); page++)
|
||||
{
|
||||
*(volatile __u32*) address = 0;
|
||||
MCFCFM_CMD = MCFCFM_CMD_PGERS;
|
||||
MCFCFM_USTAT = MCFCFM_USTAT_CBEIF;
|
||||
rc = cfm_flash_readycheck(0);
|
||||
if (rc==ERR_OK)
|
||||
{
|
||||
*(volatile __u32*) address = 0;
|
||||
MCFCFM_CMD = MCFCFM_CMD_PGERSVER;
|
||||
MCFCFM_USTAT = MCFCFM_USTAT_CBEIF;
|
||||
rc = cfm_flash_readycheck(1);
|
||||
}
|
||||
address += 0x800;
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
int cfm_flash_write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt)
|
||||
{
|
||||
int rc;
|
||||
ulong dest, data;
|
||||
|
||||
rc = ERR_OK;
|
||||
if (addr & 3)
|
||||
{
|
||||
debug ("Byte and Word alignment not supported\n");
|
||||
rc = ERR_ALIGN;
|
||||
}
|
||||
if (cnt & 3)
|
||||
{
|
||||
debug ("Byte and Word transfer not supported\n");
|
||||
rc = ERR_ALIGN;
|
||||
}
|
||||
dest = cmf_backdoor_address(addr);
|
||||
while ((cnt>=4) && (rc == ERR_OK))
|
||||
{
|
||||
data =*((volatile u32 *) src);
|
||||
*(volatile u32*) dest = data;
|
||||
MCFCFM_CMD = MCFCFM_CMD_PGM;
|
||||
MCFCFM_USTAT = MCFCFM_USTAT_CBEIF;
|
||||
rc = cfm_flash_readycheck(0);
|
||||
if (*(volatile u32*) addr != data) rc = ERR_PROG_ERROR;
|
||||
src +=4;
|
||||
dest +=4;
|
||||
addr +=4;
|
||||
cnt -=4;
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
#ifdef CFG_FLASH_PROTECTION
|
||||
|
||||
int cfm_flash_protect(flash_info_t * info,long sector,int prot)
|
||||
{
|
||||
int rc;
|
||||
|
||||
rc= ERR_OK;
|
||||
if (prot)
|
||||
{
|
||||
MCFCFM_PROT |= (1<<sector);
|
||||
info->protect[sector]=1;
|
||||
}
|
||||
else
|
||||
{
|
||||
MCFCFM_PROT &= ~(1<<sector);
|
||||
info->protect[sector]=0;
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
40
board/BuS/EB+MCF-EV123/cfm_flash.h
Normal file
40
board/BuS/EB+MCF-EV123/cfm_flash.h
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Basic Flash Driver for Freescale MCF 5282 internal FLASH
|
||||
*
|
||||
* (C) Copyright 2005 BuS Elektronik GmbH & Co.KG <esw@bus-elektonik.de>
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef __CFM_FLASH_H_
|
||||
#define __CFM_FLASH_H_
|
||||
|
||||
#define FREESCALE_MANUFACT 0xFACFFACF
|
||||
#define FREESCALE_ID_MCF5281 0x5281
|
||||
#define FREESCALE_ID_MCF5282 0x5282
|
||||
|
||||
extern void cfm_flash_print_info (flash_info_t * info);
|
||||
extern int cfm_flash_erase_sector (flash_info_t * info, int sector);
|
||||
extern void cfm_flash_init (flash_info_t * info);
|
||||
extern int cfm_flash_write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt);
|
||||
#ifdef CFG_FLASH_PROTECTION
|
||||
extern int cfm_flash_protect(flash_info_t * info,long sector,int prot);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
28
board/BuS/EB+MCF-EV123/config.mk
Normal file
28
board/BuS/EB+MCF-EV123/config.mk
Normal file
@@ -0,0 +1,28 @@
|
||||
#
|
||||
# (C) Copyright 2000-2003
|
||||
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
# Coldfire contribution by Bernhard Kuhn <bkuhn@metrowerks.com>
|
||||
#
|
||||
# See file CREDITS for list of people who contributed to this
|
||||
# project.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
# MA 02111-1307 USA
|
||||
#
|
||||
|
||||
sinclude $(TOPDIR)/board/$(BOARDDIR)/textbase.mk
|
||||
ifndef TEXT_BASE
|
||||
TEXT_BASE = 0xFE000000
|
||||
endif
|
||||
413
board/BuS/EB+MCF-EV123/flash.c
Normal file
413
board/BuS/EB+MCF-EV123/flash.c
Normal file
@@ -0,0 +1,413 @@
|
||||
/*
|
||||
* (C) Copyright 2005
|
||||
* BuS Elektronik GmbH & Co.KG <esw@bus-elektonik.de>
|
||||
*
|
||||
* Based On
|
||||
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include "cfm_flash.h"
|
||||
|
||||
#define PHYS_FLASH_1 CFG_FLASH_BASE
|
||||
#define FLASH_BANK_SIZE 0x200000
|
||||
|
||||
flash_info_t flash_info[CFG_MAX_FLASH_BANKS];
|
||||
|
||||
void flash_print_info (flash_info_t * info)
|
||||
{
|
||||
int i;
|
||||
|
||||
switch (info->flash_id & FLASH_VENDMASK) {
|
||||
case (AMD_MANUFACT & FLASH_VENDMASK):
|
||||
printf ("AMD: ");
|
||||
switch (info->flash_id & FLASH_TYPEMASK) {
|
||||
case (AMD_ID_LV160B & FLASH_TYPEMASK):
|
||||
printf ("AM29LV160B (16Bit)\n");
|
||||
break;
|
||||
default:
|
||||
printf ("Unknown Chip Type\n");
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case FREESCALE_MANUFACT & FLASH_VENDMASK:
|
||||
cfm_flash_print_info (info);
|
||||
break;
|
||||
default:
|
||||
printf ("Unknown Vendor ");
|
||||
break;
|
||||
}
|
||||
|
||||
puts (" Size: ");
|
||||
if ((info->size >> 20) > 0)
|
||||
{
|
||||
printf ("%ld MiB",info->size >> 20);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf ("%ld KiB",info->size >> 10);
|
||||
}
|
||||
printf (" in %d Sectors\n", info->sector_count);
|
||||
|
||||
printf (" Sector Start Addresses:");
|
||||
for (i = 0; i < info->sector_count; i++) {
|
||||
if ((i % 4) == 0) {
|
||||
printf ("\n ");
|
||||
}
|
||||
printf ("%02d: %08lX%s ", i,info->start[i],
|
||||
info->protect[i] ? " P" : " ");
|
||||
}
|
||||
printf ("\n\n");
|
||||
}
|
||||
|
||||
unsigned long flash_init (void)
|
||||
{
|
||||
int i, j;
|
||||
ulong size = 0;
|
||||
|
||||
for (i = 0; i < CFG_MAX_FLASH_BANKS; i++) {
|
||||
ulong flashbase = 0;
|
||||
|
||||
switch (i)
|
||||
{
|
||||
case 1:
|
||||
flash_info[i].flash_id =
|
||||
(AMD_MANUFACT & FLASH_VENDMASK) |
|
||||
(AMD_ID_LV160B & FLASH_TYPEMASK);
|
||||
flash_info[i].size = FLASH_BANK_SIZE;
|
||||
flash_info[i].sector_count = CFG_MAX_FLASH_SECT;
|
||||
memset (flash_info[i].protect, 0, CFG_MAX_FLASH_SECT);
|
||||
flashbase = PHYS_FLASH_1;
|
||||
for (j = 0; j < flash_info[i].sector_count; j++) {
|
||||
if (j == 0) {
|
||||
/* 1st is 16 KiB */
|
||||
flash_info[i].start[j] = flashbase;
|
||||
}
|
||||
if ((j >= 1) && (j <= 2)) {
|
||||
/* 2nd and 3rd are 8 KiB */
|
||||
flash_info[i].start[j] =
|
||||
flashbase + 0x4000 + 0x2000 * (j - 1);
|
||||
}
|
||||
if (j == 3) {
|
||||
/* 4th is 32 KiB */
|
||||
flash_info[i].start[j] = flashbase + 0x8000;
|
||||
}
|
||||
if ((j >= 4) && (j <= 34)) {
|
||||
/* rest is 256 KiB */
|
||||
flash_info[i].start[j] =
|
||||
flashbase + 0x10000 + 0x10000 * (j - 4);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 0:
|
||||
cfm_flash_init (&flash_info[i]);
|
||||
break;
|
||||
default:
|
||||
panic ("configured to many flash banks!\n");
|
||||
}
|
||||
|
||||
size += flash_info[i].size;
|
||||
}
|
||||
|
||||
flash_protect (FLAG_PROTECT_SET,
|
||||
CFG_FLASH_BASE,
|
||||
CFG_FLASH_BASE + 0xffff, &flash_info[0]);
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
#define CMD_READ_ARRAY 0x00F0
|
||||
#define CMD_UNLOCK1 0x00AA
|
||||
#define CMD_UNLOCK2 0x0055
|
||||
#define CMD_ERASE_SETUP 0x0080
|
||||
#define CMD_ERASE_CONFIRM 0x0030
|
||||
#define CMD_PROGRAM 0x00A0
|
||||
#define CMD_UNLOCK_BYPASS 0x0020
|
||||
|
||||
#define MEM_FLASH_ADDR1 (*(volatile u16 *)(info->start[0] + (0x00000555<<1)))
|
||||
#define MEM_FLASH_ADDR2 (*(volatile u16 *)(info->start[0] + (0x000002AA<<1)))
|
||||
|
||||
|
||||
#define BIT_ERASE_DONE 0x0080
|
||||
#define BIT_RDY_MASK 0x0080
|
||||
#define BIT_PROGRAM_ERROR 0x0020
|
||||
#define BIT_TIMEOUT 0x80000000 /* our flag */
|
||||
|
||||
#define ERR_READY -1
|
||||
|
||||
int amd_flash_erase_sector(flash_info_t * info, int sector)
|
||||
{
|
||||
int state;
|
||||
ulong result;
|
||||
|
||||
volatile u16 *addr =
|
||||
(volatile u16 *) (info->start[sector]);
|
||||
|
||||
MEM_FLASH_ADDR1 = CMD_UNLOCK1;
|
||||
MEM_FLASH_ADDR2 = CMD_UNLOCK2;
|
||||
MEM_FLASH_ADDR1 = CMD_ERASE_SETUP;
|
||||
|
||||
MEM_FLASH_ADDR1 = CMD_UNLOCK1;
|
||||
MEM_FLASH_ADDR2 = CMD_UNLOCK2;
|
||||
*addr = CMD_ERASE_CONFIRM;
|
||||
|
||||
/* wait until flash is ready */
|
||||
state = 0;
|
||||
set_timer (0);
|
||||
|
||||
do {
|
||||
result = *addr;
|
||||
|
||||
/* check timeout */
|
||||
if (get_timer (0) > CFG_FLASH_ERASE_TOUT) {
|
||||
MEM_FLASH_ADDR1 = CMD_READ_ARRAY;
|
||||
state = ERR_TIMOUT;
|
||||
}
|
||||
|
||||
if (!state && (result & 0xFFFF) & BIT_ERASE_DONE)
|
||||
state = ERR_READY;
|
||||
}
|
||||
while (!state);
|
||||
if (state == ERR_READY)
|
||||
state = ERR_OK;
|
||||
|
||||
MEM_FLASH_ADDR1 = CMD_READ_ARRAY;
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
int flash_erase (flash_info_t * info, int s_first, int s_last)
|
||||
{
|
||||
int iflag, cflag;
|
||||
int sector;
|
||||
int rc;
|
||||
|
||||
rc = ERR_OK;
|
||||
|
||||
if (info->flash_id == FLASH_UNKNOWN)
|
||||
{
|
||||
rc = ERR_UNKNOWN_FLASH_TYPE;
|
||||
} /* (info->flash_id == FLASH_UNKNOWN) */
|
||||
|
||||
if ((s_first < 0) || (s_first > s_last) || s_last >= info->sector_count)
|
||||
{
|
||||
rc = ERR_INVAL;
|
||||
}
|
||||
|
||||
cflag = icache_status ();
|
||||
icache_disable ();
|
||||
iflag = disable_interrupts ();
|
||||
|
||||
for (sector = s_first; (sector <= s_last) && (rc == ERR_OK); sector++) {
|
||||
|
||||
if (info->protect[sector])
|
||||
{
|
||||
putc('P'); /* protected sector will not erase */
|
||||
}
|
||||
else
|
||||
{
|
||||
/* erase on unprotected sector */
|
||||
puts("E\b");
|
||||
switch (info->flash_id & FLASH_VENDMASK)
|
||||
{
|
||||
case (AMD_MANUFACT & FLASH_VENDMASK):
|
||||
rc = amd_flash_erase_sector(info,sector);
|
||||
break;
|
||||
case (FREESCALE_MANUFACT & FLASH_VENDMASK):
|
||||
rc = cfm_flash_erase_sector(info,sector);
|
||||
break;
|
||||
default:
|
||||
return ERR_UNKNOWN_FLASH_VENDOR;
|
||||
}
|
||||
putc('.');
|
||||
}
|
||||
}
|
||||
if (rc!=ERR_OK)
|
||||
{
|
||||
printf ("\n ");
|
||||
flash_perror (rc);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf (" done\n");
|
||||
}
|
||||
|
||||
udelay (10000); /* allow flash to settle - wait 10 ms */
|
||||
|
||||
if (iflag)
|
||||
enable_interrupts ();
|
||||
|
||||
if (cflag)
|
||||
icache_enable ();
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
volatile static int amd_write_word (flash_info_t * info, ulong dest, u16 data)
|
||||
{
|
||||
volatile u16 *addr;
|
||||
ulong result;
|
||||
int cflag, iflag;
|
||||
int state;
|
||||
|
||||
/*
|
||||
* Check if Flash is (sufficiently) erased
|
||||
*/
|
||||
addr = (volatile u16 *) dest;
|
||||
|
||||
result = *addr;
|
||||
if ((result & data) != data)
|
||||
return ERR_NOT_ERASED;
|
||||
|
||||
/*
|
||||
* Disable interrupts which might cause a timeout
|
||||
* here. Remember that our exception vectors are
|
||||
* at address 0 in the flash, and we don't want a
|
||||
* (ticker) exception to happen while the flash
|
||||
* chip is in programming mode.
|
||||
*/
|
||||
|
||||
cflag = icache_status ();
|
||||
icache_disable ();
|
||||
iflag = disable_interrupts ();
|
||||
|
||||
MEM_FLASH_ADDR1 = CMD_UNLOCK1;
|
||||
MEM_FLASH_ADDR2 = CMD_UNLOCK2;
|
||||
MEM_FLASH_ADDR1 = CMD_PROGRAM;
|
||||
*addr = data;
|
||||
|
||||
/* arm simple, non interrupt dependent timer */
|
||||
set_timer (0);
|
||||
|
||||
/* wait until flash is ready */
|
||||
state = 0;
|
||||
do {
|
||||
result = *addr;
|
||||
|
||||
/* check timeout */
|
||||
if (get_timer (0) > CFG_FLASH_ERASE_TOUT) {
|
||||
state = ERR_TIMOUT;
|
||||
}
|
||||
if (!state && ((result & BIT_RDY_MASK) == (data & BIT_RDY_MASK)))
|
||||
state = ERR_READY;
|
||||
|
||||
} while (!state);
|
||||
|
||||
*addr = CMD_READ_ARRAY;
|
||||
|
||||
if (state == ERR_READY)
|
||||
state = ERR_OK;
|
||||
if ((*addr != data) && (state != ERR_TIMOUT))
|
||||
state = ERR_PROG_ERROR;
|
||||
|
||||
if (iflag)
|
||||
enable_interrupts ();
|
||||
|
||||
if (cflag)
|
||||
icache_enable ();
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
int amd_flash_write_buff(flash_info_t * info, uchar * src, ulong addr, ulong cnt)
|
||||
{
|
||||
int rc;
|
||||
ulong dest;
|
||||
u16 data;
|
||||
|
||||
rc = ERR_OK;
|
||||
if (addr & 1)
|
||||
{
|
||||
debug ("Byte alignment not supported\n");
|
||||
rc = ERR_ALIGN;
|
||||
}
|
||||
if (cnt & 1)
|
||||
{
|
||||
debug ("Byte transfer not supported\n");
|
||||
rc = ERR_ALIGN;
|
||||
}
|
||||
|
||||
dest = addr;
|
||||
while ((cnt>=2) && (rc == ERR_OK))
|
||||
{
|
||||
data =*((volatile u16 *) src);
|
||||
rc=amd_write_word (info,dest,data);
|
||||
src +=2;
|
||||
dest +=2;
|
||||
cnt -=2;
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt)
|
||||
{
|
||||
int rc;
|
||||
|
||||
switch (info->flash_id & FLASH_VENDMASK)
|
||||
{
|
||||
case (AMD_MANUFACT & FLASH_VENDMASK):
|
||||
rc = amd_flash_write_buff(info,src,addr,cnt);
|
||||
break;
|
||||
case (FREESCALE_MANUFACT & FLASH_VENDMASK):
|
||||
rc = cfm_flash_write_buff(info,src,addr,cnt);
|
||||
break;
|
||||
default:
|
||||
rc = ERR_UNKNOWN_FLASH_VENDOR;
|
||||
}
|
||||
return rc;
|
||||
|
||||
}
|
||||
int amd_flash_protect(flash_info_t * info,long sector,int prot)
|
||||
{
|
||||
int rc;
|
||||
rc= ERR_OK;
|
||||
if (prot)
|
||||
{
|
||||
info->protect[sector]=1;
|
||||
}
|
||||
else
|
||||
{
|
||||
info->protect[sector]=0;
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
#ifdef CFG_FLASH_PROTECTION
|
||||
|
||||
int flash_real_protect(flash_info_t * info,long sector,int prot)
|
||||
{
|
||||
int rc;
|
||||
|
||||
switch (info->flash_id & FLASH_VENDMASK)
|
||||
{
|
||||
case (AMD_MANUFACT & FLASH_VENDMASK):
|
||||
rc = amd_flash_protect(info,sector,prot);
|
||||
break;
|
||||
case (FREESCALE_MANUFACT & FLASH_VENDMASK):
|
||||
rc = cfm_flash_protect(info,sector,prot);
|
||||
break;
|
||||
default:
|
||||
rc = ERR_UNKNOWN_FLASH_VENDOR;
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
#endif
|
||||
304
board/BuS/EB+MCF-EV123/mii.c
Normal file
304
board/BuS/EB+MCF-EV123/mii.c
Normal file
@@ -0,0 +1,304 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2007 Freescale Semiconductor, Inc.
|
||||
* TsiChung Liew (Tsi-Chung.Liew@freescale.com)
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <asm/fec.h>
|
||||
#include <asm/immap.h>
|
||||
|
||||
#include <config.h>
|
||||
#include <net.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
#if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI)
|
||||
#undef MII_DEBUG
|
||||
#undef ET_DEBUG
|
||||
|
||||
int fecpin_setclear(struct eth_device *dev, int setclear)
|
||||
{
|
||||
if (setclear) {
|
||||
MCFGPIO_PASPAR |= 0x0F00;
|
||||
MCFGPIO_PEHLPAR = CFG_PEHLPAR;
|
||||
} else {
|
||||
MCFGPIO_PASPAR &= 0xF0FF;
|
||||
MCFGPIO_PEHLPAR &= ~CFG_PEHLPAR;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(CFG_DISCOVER_PHY) || defined(CONFIG_CMD_MII)
|
||||
#include <miiphy.h>
|
||||
|
||||
/* Make MII read/write commands for the FEC. */
|
||||
#define mk_mii_read(ADDR, REG) (0x60020000 | ((ADDR << 23) | (REG & 0x1f) << 18))
|
||||
|
||||
#define mk_mii_write(ADDR, REG, VAL) (0x50020000 | ((ADDR << 23) | (REG & 0x1f) << 18) | (VAL & 0xffff))
|
||||
|
||||
/* PHY identification */
|
||||
#define PHY_ID_LXT970 0x78100000 /* LXT970 */
|
||||
#define PHY_ID_LXT971 0x001378e0 /* LXT971 and 972 */
|
||||
#define PHY_ID_82555 0x02a80150 /* Intel 82555 */
|
||||
#define PHY_ID_QS6612 0x01814400 /* QS6612 */
|
||||
#define PHY_ID_AMD79C784 0x00225610 /* AMD 79C784 */
|
||||
#define PHY_ID_AMD79C874VC 0x0022561B /* AMD 79C874 */
|
||||
#define PHY_ID_LSI80225 0x0016f870 /* LSI 80225 */
|
||||
#define PHY_ID_LSI80225B 0x0016f880 /* LSI 80225/B */
|
||||
#define PHY_ID_DP83848VV 0x20005C90 /* National 83848 */
|
||||
#define PHY_ID_DP83849 0x20005CA2 /* National 82849 */
|
||||
|
||||
#define STR_ID_LXT970 "LXT970"
|
||||
#define STR_ID_LXT971 "LXT971"
|
||||
#define STR_ID_82555 "Intel82555"
|
||||
#define STR_ID_QS6612 "QS6612"
|
||||
#define STR_ID_AMD79C784 "AMD79C784"
|
||||
#define STR_ID_AMD79C874VC "AMD79C874VC"
|
||||
#define STR_ID_LSI80225 "LSI80225"
|
||||
#define STR_ID_LSI80225B "LSI80225/B"
|
||||
#define STR_ID_DP83848VV "N83848"
|
||||
#define STR_ID_DP83849 "N83849"
|
||||
|
||||
/****************************************************************************
|
||||
* mii_init -- Initialize the MII for MII command without ethernet
|
||||
* This function is a subset of eth_init
|
||||
****************************************************************************
|
||||
*/
|
||||
void mii_reset(struct fec_info_s *info)
|
||||
{
|
||||
volatile fec_t *fecp = (fec_t *) (info->miibase);
|
||||
int i;
|
||||
|
||||
fecp->ecr = FEC_ECR_RESET;
|
||||
for (i = 0; (fecp->ecr & FEC_ECR_RESET) && (i < FEC_RESET_DELAY); ++i) {
|
||||
udelay(1);
|
||||
}
|
||||
if (i == FEC_RESET_DELAY) {
|
||||
printf("FEC_RESET_DELAY timeout\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* send command to phy using mii, wait for result */
|
||||
uint mii_send(uint mii_cmd)
|
||||
{
|
||||
struct fec_info_s *info;
|
||||
struct eth_device *dev;
|
||||
volatile fec_t *ep;
|
||||
uint mii_reply;
|
||||
int j = 0;
|
||||
|
||||
/* retrieve from register structure */
|
||||
dev = eth_get_dev();
|
||||
info = dev->priv;
|
||||
|
||||
ep = (fec_t *) info->miibase;
|
||||
|
||||
ep->mmfr = mii_cmd; /* command to phy */
|
||||
|
||||
/* wait for mii complete */
|
||||
while (!(ep->eir & FEC_EIR_MII) && (j < MCFFEC_TOUT_LOOP)) {
|
||||
udelay(1);
|
||||
j++;
|
||||
}
|
||||
if (j >= MCFFEC_TOUT_LOOP) {
|
||||
printf("MII not complete\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
mii_reply = ep->mmfr; /* result from phy */
|
||||
ep->eir = FEC_EIR_MII; /* clear MII complete */
|
||||
#ifdef ET_DEBUG
|
||||
printf("%s[%d] %s: sent=0x%8.8x, reply=0x%8.8x\n",
|
||||
__FILE__, __LINE__, __FUNCTION__, mii_cmd, mii_reply);
|
||||
#endif
|
||||
|
||||
return (mii_reply & 0xffff); /* data read from phy */
|
||||
}
|
||||
#endif /* CFG_DISCOVER_PHY || (CONFIG_COMMANDS & CONFIG_CMD_MII) */
|
||||
|
||||
#if defined(CFG_DISCOVER_PHY)
|
||||
int mii_discover_phy(struct eth_device *dev)
|
||||
{
|
||||
#define MAX_PHY_PASSES 11
|
||||
struct fec_info_s *info = dev->priv;
|
||||
int phyaddr, pass;
|
||||
uint phyno, phytype;
|
||||
|
||||
if (info->phyname_init)
|
||||
return info->phy_addr;
|
||||
|
||||
phyaddr = -1; /* didn't find a PHY yet */
|
||||
for (pass = 1; pass <= MAX_PHY_PASSES && phyaddr < 0; ++pass) {
|
||||
if (pass > 1) {
|
||||
/* PHY may need more time to recover from reset.
|
||||
* The LXT970 needs 50ms typical, no maximum is
|
||||
* specified, so wait 10ms before try again.
|
||||
* With 11 passes this gives it 100ms to wake up.
|
||||
*/
|
||||
udelay(10000); /* wait 10ms */
|
||||
}
|
||||
|
||||
for (phyno = 0; phyno < 32 && phyaddr < 0; ++phyno) {
|
||||
|
||||
phytype = mii_send(mk_mii_read(phyno, PHY_PHYIDR1));
|
||||
#ifdef ET_DEBUG
|
||||
printf("PHY type 0x%x pass %d type\n", phytype, pass);
|
||||
#endif
|
||||
if (phytype != 0xffff) {
|
||||
phyaddr = phyno;
|
||||
phytype <<= 16;
|
||||
phytype |=
|
||||
mii_send(mk_mii_read(phyno, PHY_PHYIDR2));
|
||||
|
||||
switch (phytype & 0xffffffff) {
|
||||
case PHY_ID_AMD79C874VC:
|
||||
strcpy(info->phy_name,
|
||||
STR_ID_AMD79C874VC);
|
||||
info->phyname_init = 1;
|
||||
break;
|
||||
default:
|
||||
strcpy(info->phy_name, "unknown");
|
||||
info->phyname_init = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef ET_DEBUG
|
||||
printf("PHY @ 0x%x pass %d type ", phyno, pass);
|
||||
switch (phytype & 0xffffffff) {
|
||||
case PHY_ID_AMD79C874VC:
|
||||
printf(STR_ID_AMD79C874VC);
|
||||
break;
|
||||
default:
|
||||
printf("0x%08x\n", phytype);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
if (phyaddr < 0)
|
||||
printf("No PHY device found.\n");
|
||||
|
||||
return phyaddr;
|
||||
}
|
||||
#endif /* CFG_DISCOVER_PHY */
|
||||
|
||||
int mii_init(void) __attribute__((weak,alias("__mii_init")));
|
||||
|
||||
void __mii_init(void)
|
||||
{
|
||||
volatile fec_t *fecp;
|
||||
struct fec_info_s *info;
|
||||
struct eth_device *dev;
|
||||
int miispd = 0, i = 0;
|
||||
u16 autoneg = 0;
|
||||
|
||||
/* retrieve from register structure */
|
||||
dev = eth_get_dev();
|
||||
info = dev->priv;
|
||||
|
||||
fecp = (fec_t *) info->miibase;
|
||||
|
||||
fecpin_setclear(dev, 1);
|
||||
|
||||
mii_reset(info);
|
||||
|
||||
/* We use strictly polling mode only */
|
||||
fecp->eimr = 0;
|
||||
|
||||
/* Clear any pending interrupt */
|
||||
fecp->eir = 0xffffffff;
|
||||
|
||||
/* Set MII speed */
|
||||
miispd = (gd->bus_clk / 1000000) / 5;
|
||||
fecp->mscr = miispd << 1;
|
||||
|
||||
info->phy_addr = mii_discover_phy(dev);
|
||||
|
||||
#define AUTONEGLINK (PHY_BMSR_AUTN_COMP | PHY_BMSR_LS)
|
||||
while (i < MCFFEC_TOUT_LOOP) {
|
||||
autoneg = 0;
|
||||
miiphy_read(dev->name, info->phy_addr, PHY_BMSR, &autoneg);
|
||||
i++;
|
||||
|
||||
if ((autoneg & AUTONEGLINK) == AUTONEGLINK)
|
||||
break;
|
||||
|
||||
udelay(500);
|
||||
}
|
||||
if (i >= MCFFEC_TOUT_LOOP) {
|
||||
printf("Auto Negotiation not complete\n");
|
||||
}
|
||||
|
||||
/* adapt to the half/full speed settings */
|
||||
info->dup_spd = miiphy_duplex(dev->name, info->phy_addr) << 16;
|
||||
info->dup_spd |= miiphy_speed(dev->name, info->phy_addr);
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* Read and write a MII PHY register, routines used by MII Utilities
|
||||
*
|
||||
* FIXME: These routines are expected to return 0 on success, but mii_send
|
||||
* does _not_ return an error code. Maybe 0xFFFF means error, i.e.
|
||||
* no PHY connected...
|
||||
* For now always return 0.
|
||||
* FIXME: These routines only work after calling eth_init() at least once!
|
||||
* Otherwise they hang in mii_send() !!! Sorry!
|
||||
*****************************************************************************/
|
||||
|
||||
int mcffec_miiphy_read(char *devname, unsigned char addr, unsigned char reg,
|
||||
unsigned short *value)
|
||||
{
|
||||
short rdreg; /* register working value */
|
||||
|
||||
#ifdef MII_DEBUG
|
||||
printf("miiphy_read(0x%x) @ 0x%x = ", reg, addr);
|
||||
#endif
|
||||
rdreg = mii_send(mk_mii_read(addr, reg));
|
||||
|
||||
*value = rdreg;
|
||||
|
||||
#ifdef MII_DEBUG
|
||||
printf("0x%04x\n", *value);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int mcffec_miiphy_write(char *devname, unsigned char addr, unsigned char reg,
|
||||
unsigned short value)
|
||||
{
|
||||
short rdreg; /* register working value */
|
||||
|
||||
#ifdef MII_DEBUG
|
||||
printf("miiphy_write(0x%x) @ 0x%x = ", reg, addr);
|
||||
#endif
|
||||
|
||||
rdreg = mii_send(mk_mii_write(addr, reg, value));
|
||||
|
||||
#ifdef MII_DEBUG
|
||||
printf("0x%04x\n", value);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_CMD_NET, FEC_ENET & NET_MULTI */
|
||||
1
board/BuS/EB+MCF-EV123/textbase.mk
Normal file
1
board/BuS/EB+MCF-EV123/textbase.mk
Normal file
@@ -0,0 +1 @@
|
||||
TEXT_BASE = 0xFFE00000
|
||||
141
board/BuS/EB+MCF-EV123/u-boot.lds
Normal file
141
board/BuS/EB+MCF-EV123/u-boot.lds
Normal file
@@ -0,0 +1,141 @@
|
||||
/*
|
||||
* (C) Copyright 2000-2003
|
||||
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
OUTPUT_ARCH(m68k)
|
||||
SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib);
|
||||
/* Do we need any of these for elf?
|
||||
__DYNAMIC = 0; */
|
||||
SECTIONS
|
||||
{
|
||||
/* Read-only sections, merged into text segment: */
|
||||
. = + SIZEOF_HEADERS;
|
||||
.interp : { *(.interp) }
|
||||
.hash : { *(.hash) }
|
||||
.dynsym : { *(.dynsym) }
|
||||
.dynstr : { *(.dynstr) }
|
||||
.rel.text : { *(.rel.text) }
|
||||
.rela.text : { *(.rela.text) }
|
||||
.rel.data : { *(.rel.data) }
|
||||
.rela.data : { *(.rela.data) }
|
||||
.rel.rodata : { *(.rel.rodata) }
|
||||
.rela.rodata : { *(.rela.rodata) }
|
||||
.rel.got : { *(.rel.got) }
|
||||
.rela.got : { *(.rela.got) }
|
||||
.rel.ctors : { *(.rel.ctors) }
|
||||
.rela.ctors : { *(.rela.ctors) }
|
||||
.rel.dtors : { *(.rel.dtors) }
|
||||
.rela.dtors : { *(.rela.dtors) }
|
||||
.rel.bss : { *(.rel.bss) }
|
||||
.rela.bss : { *(.rela.bss) }
|
||||
.rel.plt : { *(.rel.plt) }
|
||||
.rela.plt : { *(.rela.plt) }
|
||||
.init : { *(.init) }
|
||||
.plt : { *(.plt) }
|
||||
.text :
|
||||
{
|
||||
/* WARNING - the following is hand-optimized to fit within */
|
||||
/* the sector layout of our flash chips! XXX FIXME XXX */
|
||||
|
||||
cpu/mcf52x2/start.o (.text)
|
||||
common/dlmalloc.o (.text)
|
||||
lib_generic/string.o (.text)
|
||||
lib_generic/vsprintf.o (.text)
|
||||
lib_generic/crc32.o (.text)
|
||||
lib_generic/zlib.o (.text)
|
||||
|
||||
/* . = env_offset; */
|
||||
common/environment.o(.text)
|
||||
|
||||
*(.text)
|
||||
*(.fixup)
|
||||
*(.got1)
|
||||
}
|
||||
_etext = .;
|
||||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
.dtors : { *(.dtors) }
|
||||
|
||||
/* Read-write section, merged into data segment: */
|
||||
. = (. + 0x00FF) & 0xFFFFFF00;
|
||||
_erotext = .;
|
||||
PROVIDE (erotext = .);
|
||||
.reloc :
|
||||
{
|
||||
__got_start = .;
|
||||
*(.got)
|
||||
__got_end = .;
|
||||
_GOT2_TABLE_ = .;
|
||||
*(.got2)
|
||||
_FIXUP_TABLE_ = .;
|
||||
*(.fixup)
|
||||
}
|
||||
__got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
|
||||
__fixup_entries = (. - _FIXUP_TABLE_)>>2;
|
||||
|
||||
.data :
|
||||
{
|
||||
*(.data)
|
||||
*(.data1)
|
||||
*(.sdata)
|
||||
*(.sdata2)
|
||||
*(.dynamic)
|
||||
CONSTRUCTORS
|
||||
}
|
||||
_edata = .;
|
||||
PROVIDE (edata = .);
|
||||
|
||||
__u_boot_cmd_start = .;
|
||||
.u_boot_cmd : { *(.u_boot_cmd) }
|
||||
__u_boot_cmd_end = .;
|
||||
|
||||
__start___ex_table = .;
|
||||
__ex_table : { *(__ex_table) }
|
||||
__stop___ex_table = .;
|
||||
|
||||
. = ALIGN(256);
|
||||
__init_begin = .;
|
||||
.text.init : { *(.text.init) }
|
||||
.data.init : { *(.data.init) }
|
||||
. = ALIGN(256);
|
||||
__init_end = .;
|
||||
|
||||
__bss_start = .;
|
||||
.bss :
|
||||
{
|
||||
_sbss = .;
|
||||
*(.sbss) *(.scommon)
|
||||
*(.dynbss)
|
||||
*(.bss)
|
||||
*(COMMON)
|
||||
. = ALIGN(4);
|
||||
_ebss = .;
|
||||
}
|
||||
_end = . ;
|
||||
PROVIDE (end = .);
|
||||
}
|
||||
55
board/LEOX/elpt860/Makefile
Normal file
55
board/LEOX/elpt860/Makefile
Normal file
@@ -0,0 +1,55 @@
|
||||
|
||||
#######################################################################
|
||||
#
|
||||
# Copyright (C) 2000, 2001, 2002, 2003
|
||||
# The LEOX team <team@leox.org>, http://www.leox.org
|
||||
#
|
||||
# (C) Copyright 2006
|
||||
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
#
|
||||
# LEOX.org is about the development of free hardware and software resources
|
||||
# for system on chip.
|
||||
#
|
||||
# Description: U-Boot port on the LEOX's ELPT860 CPU board
|
||||
# ~~~~~~~~~~~
|
||||
#
|
||||
#######################################################################
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
# MA 02111-1307 USA
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
include $(TOPDIR)/config.mk
|
||||
|
||||
LIB = $(obj)lib$(BOARD).a
|
||||
|
||||
COBJS = $(BOARD).o flash.o
|
||||
|
||||
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
|
||||
OBJS := $(addprefix $(obj),$(COBJS))
|
||||
SOBJS := $(addprefix $(obj),$(SOBJS))
|
||||
|
||||
$(LIB): $(obj).depend $(OBJS)
|
||||
$(AR) $(ARFLAGS) $@ $(OBJS)
|
||||
|
||||
#########################################################################
|
||||
|
||||
# defines $(obj).depend target
|
||||
include $(SRCTREE)/rules.mk
|
||||
|
||||
sinclude $(obj).depend
|
||||
|
||||
#########################################################################
|
||||
424
board/LEOX/elpt860/README.LEOX
Normal file
424
board/LEOX/elpt860/README.LEOX
Normal file
@@ -0,0 +1,424 @@
|
||||
=============================================================================
|
||||
|
||||
U-Boot port on the LEOX's ELPT860 CPU board
|
||||
-------------------------------------------
|
||||
|
||||
LEOX.org is about the development of free hardware and software resources
|
||||
for system on chip.
|
||||
|
||||
For more information, contact The LEOX team <team@leox.org>
|
||||
|
||||
References:
|
||||
~~~~~~~~~~
|
||||
1) Get the last stable release from denx.de:
|
||||
o ftp://ftp.denx.de/pub/u-boot/u-boot-0.2.0.tar.bz2
|
||||
2) Get the current CVS snapshot:
|
||||
o cvs -d:pserver:anonymous@cvs.u-boot.sourceforge.net:/cvsroot/u-boot login
|
||||
o cvs -z6 -d:pserver:anonymous@cvs.u-boot.sourceforge.net:/cvsroot/u-boot co -P u-boot
|
||||
|
||||
=============================================================================
|
||||
|
||||
The ELPT860 CPU board has the following features:
|
||||
|
||||
Processor: - MPC860T @ 50MHz
|
||||
- PowerPC Core
|
||||
- 65 MIPS
|
||||
- Caches: D->4KB, I->4KB
|
||||
- CPM: 4 SCCs, 2 SMCs
|
||||
- Ethernet 10/100
|
||||
- SPI, I2C, PCMCIA, Parallel
|
||||
|
||||
CPU board: - DRAM: 16 MB
|
||||
- FLASH: 512 KB + (2 * 4 MB)
|
||||
- NVRAM: 128 KB
|
||||
- 1 Serial link
|
||||
- 2 Ethernet 10 BaseT Channels
|
||||
|
||||
On power-up the processor jumps to the address of 0x02000100
|
||||
|
||||
Thus, U-Boot is configured to reside in flash starting at the address of
|
||||
0x02001000. The environment space is located in NVRAM separately from
|
||||
U-Boot, at the address of 0x03000000.
|
||||
|
||||
=============================================================================
|
||||
|
||||
U-Boot test results
|
||||
|
||||
=============================================================================
|
||||
|
||||
|
||||
##################################################
|
||||
# Operation on the serial console (SMC1)
|
||||
##############################
|
||||
|
||||
U-Boot 0.2.2 (Jan 19 2003 - 11:08:39)
|
||||
|
||||
CPU: XPC860xxZPnnB at 50 MHz: 4 kB I-Cache 4 kB D-Cache FEC present
|
||||
*** Warning: CPU Core has Silicon Bugs -- Check the Errata ***
|
||||
Board: ### No HW ID - assuming ELPT860
|
||||
DRAM: 16 MB
|
||||
FLASH: 512 kB
|
||||
In: serial
|
||||
Out: serial
|
||||
Err: serial
|
||||
Net: SCC ETHERNET
|
||||
|
||||
Type "run nfsboot" to mount root filesystem over NFS
|
||||
|
||||
Hit any key to stop autoboot: 0
|
||||
LEOX_elpt860: help
|
||||
askenv - get environment variables from stdin
|
||||
autoscr - run script from memory
|
||||
base - print or set address offset
|
||||
bdinfo - print Board Info structure
|
||||
bootm - boot application image from memory
|
||||
bootp - boot image via network using BootP/TFTP protocol
|
||||
bootd - boot default, i.e., run 'bootcmd'
|
||||
cmp - memory compare
|
||||
coninfo - print console devices and informations
|
||||
cp - memory copy
|
||||
crc32 - checksum calculation
|
||||
echo - echo args to console
|
||||
erase - erase FLASH memory
|
||||
flinfo - print FLASH memory information
|
||||
go - start application at address 'addr'
|
||||
help - print online help
|
||||
iminfo - print header information for application image
|
||||
loadb - load binary file over serial line (kermit mode)
|
||||
loads - load S-Record file over serial line
|
||||
loop - infinite loop on address range
|
||||
md - memory display
|
||||
mm - memory modify (auto-incrementing)
|
||||
mtest - simple RAM test
|
||||
mw - memory write (fill)
|
||||
nm - memory modify (constant address)
|
||||
printenv- print environment variables
|
||||
protect - enable or disable FLASH write protection
|
||||
rarpboot- boot image via network using RARP/TFTP protocol
|
||||
reset - Perform RESET of the CPU
|
||||
run - run commands in an environment variable
|
||||
saveenv - save environment variables to persistent storage
|
||||
setenv - set environment variables
|
||||
sleep - delay execution for some time
|
||||
tftpboot- boot image via network using TFTP protocol
|
||||
and env variables ipaddr and serverip
|
||||
version - print monitor version
|
||||
? - alias for 'help'
|
||||
|
||||
##################################################
|
||||
# Environment Variables (CFG_ENV_IS_IN_NVRAM)
|
||||
##############################
|
||||
|
||||
LEOX_elpt860: printenv
|
||||
bootdelay=5
|
||||
loads_echo=1
|
||||
baudrate=9600
|
||||
stdin=serial
|
||||
stdout=serial
|
||||
stderr=serial
|
||||
ethaddr=00:03:ca:00:64:df
|
||||
ipaddr=192.168.0.30
|
||||
netmask=255.255.255.0
|
||||
serverip=192.168.0.1
|
||||
nfsserverip=192.168.0.1
|
||||
preboot=echo;echo Type "run nfsboot" to mount root filesystem over NFS;echo
|
||||
gatewayip=192.168.0.1
|
||||
ramargs=setenv bootargs root=/dev/ram rw
|
||||
rootargs=setenv rootpath /tftp/${ipaddr}
|
||||
nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${nfsserverip}:${rootpath}
|
||||
addip=setenv bootargs ${bootargs} ip=${ipaddr}:${nfsserverip}:${gatewayip}:${netmask}:${hostname}:eth0:
|
||||
ramboot=tftp 400000 /home/leox/pMulti;run ramargs;bootm
|
||||
nfsboot=tftp 400000 /home/leox/uImage;run rootargs;run nfsargs;run addip;bootm
|
||||
bootcmd=run ramboot
|
||||
clocks_in_mhz=1
|
||||
|
||||
Environment size: 730/16380 bytes
|
||||
|
||||
##################################################
|
||||
# Flash Memory Information
|
||||
##############################
|
||||
|
||||
LEOX_elpt860: flinfo
|
||||
|
||||
Bank # 1: AMD AM29F040 (4 Mbits)
|
||||
Size: 512 KB in 8 Sectors
|
||||
Sector Start Addresses:
|
||||
02000000 (RO) 02010000 (RO) 02020000 (RO) 02030000 (RO) 02040000
|
||||
02050000 02060000 02070000
|
||||
|
||||
##################################################
|
||||
# Board Information Structure
|
||||
##############################
|
||||
|
||||
LEOX_elpt860: bdinfo
|
||||
memstart = 0x00000000
|
||||
memsize = 0x01000000
|
||||
flashstart = 0x02000000
|
||||
flashsize = 0x00080000
|
||||
flashoffset = 0x00030000
|
||||
sramstart = 0x00000000
|
||||
sramsize = 0x00000000
|
||||
immr_base = 0xFF000000
|
||||
bootflags = 0x00000001
|
||||
intfreq = 50 MHz
|
||||
busfreq = 50 MHz
|
||||
ethaddr = 00:03:ca:00:64:df
|
||||
IP addr = 192.168.0.30
|
||||
baudrate = 9600 bps
|
||||
|
||||
##################################################
|
||||
# Image Download and run over serial port
|
||||
# hello_world (S-Record image)
|
||||
# ===> 1) Enter "loads" command into U-Boot monitor
|
||||
# ===> 2) From TeraTerm's bar menu, Select 'File/Send file...'
|
||||
# Then select 'hello_world.srec' with the file browser
|
||||
##############################
|
||||
|
||||
U-Boot 0.2.2 (Jan 19 2003 - 11:08:39)
|
||||
|
||||
CPU: XPC860xxZPnnB at 50 MHz: 4 kB I-Cache 4 kB D-Cache FEC present
|
||||
*** Warning: CPU Core has Silicon Bugs -- Check the Errata ***
|
||||
Board: ### No HW ID - assuming ELPT860
|
||||
DRAM: 16 MB
|
||||
FLASH: 512 kB
|
||||
In: serial
|
||||
Out: serial
|
||||
Err: serial
|
||||
Net: SCC ETHERNET
|
||||
|
||||
Type "run nfsboot" to mount root filesystem over NFS
|
||||
|
||||
Hit any key to stop autoboot: 0
|
||||
LEOX_elpt860: loads
|
||||
## Ready for S-Record download ...
|
||||
S804040004F3050154000501709905014C000501388D
|
||||
## First Load Addr = 0x00040000
|
||||
## Last Load Addr = 0x0005018B
|
||||
## Total Size = 0x0001018C = 65932 Bytes
|
||||
## Start Addr = 0x00040004
|
||||
LEOX_elpt860: go 40004 This is a test !!!
|
||||
## Starting application at 0x00040004 ...
|
||||
Hello World
|
||||
argc = 6
|
||||
argv[0] = "40004"
|
||||
argv[1] = "This"
|
||||
argv[2] = "is"
|
||||
argv[3] = "a"
|
||||
argv[4] = "test"
|
||||
argv[5] = "!!!"
|
||||
argv[6] = "<NULL>"
|
||||
Hit any key to exit ...
|
||||
|
||||
## Application terminated, rc = 0x0
|
||||
|
||||
##################################################
|
||||
# Image download and run over ethernet interface
|
||||
# Linux-2.4.4 (uImage) + Root filesystem mounted over NFS
|
||||
##############################
|
||||
|
||||
U-Boot 0.2.2 (Jan 19 2003 - 11:08:39)
|
||||
|
||||
CPU: XPC860xxZPnnB at 50 MHz: 4 kB I-Cache 4 kB D-Cache FEC present
|
||||
*** Warning: CPU Core has Silicon Bugs -- Check the Errata ***
|
||||
Board: ### No HW ID - assuming ELPT860
|
||||
DRAM: 16 MB
|
||||
FLASH: 512 kB
|
||||
In: serial
|
||||
Out: serial
|
||||
Err: serial
|
||||
Net: SCC ETHERNET
|
||||
|
||||
Type "run nfsboot" to mount root filesystem over NFS
|
||||
|
||||
Hit any key to stop autoboot: 0
|
||||
LEOX_elpt860: run nfsboot
|
||||
ARP broadcast 1
|
||||
TFTP from server 192.168.0.1; our IP address is 192.168.0.30
|
||||
Filename '/home/leox/uImage'.
|
||||
Load address: 0x400000
|
||||
Loading: #################################################################
|
||||
#############################
|
||||
done
|
||||
Bytes transferred = 477294 (7486e hex)
|
||||
## Booting image at 00400000 ...
|
||||
Image Name: Linux-2.4.4
|
||||
Image Type: PowerPC Linux Kernel Image (gzip compressed)
|
||||
Data Size: 477230 Bytes = 466 kB = 0 MB
|
||||
Load Address: 00000000
|
||||
Entry Point: 00000000
|
||||
Verifying Checksum ... OK
|
||||
Uncompressing Kernel Image ... OK
|
||||
Linux version 2.4.4-rthal5 (leox@p5ak6650) (gcc version 2.95.3 20010315 (release/MontaVista)) #1 Wed Jul 3 10:23:53 CEST 2002
|
||||
On node 0 totalpages: 4096
|
||||
zone(0): 4096 pages.
|
||||
zone(1): 0 pages.
|
||||
zone(2): 0 pages.
|
||||
Kernel command line: root=/dev/nfs rw nfsroot=192.168.0.1:/tftp/192.168.0.30 ip=192.168.0.30:192.168.0.1:192.168.0.1:255.255.255.0::eth0:
|
||||
rtsched version <20010618.1050.24>
|
||||
Decrementer Frequency: 3125000
|
||||
Warning: real time clock seems stuck!
|
||||
Calibrating delay loop... 49.76 BogoMIPS
|
||||
Memory: 14720k available (928k kernel code, 384k data, 44k init, 0k highmem)
|
||||
Dentry-cache hash table entries: 2048 (order: 2, 16384 bytes)
|
||||
Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
|
||||
Page-cache hash table entries: 4096 (order: 2, 16384 bytes)
|
||||
Inode-cache hash table entries: 1024 (order: 1, 8192 bytes)
|
||||
POSIX conformance testing by UNIFIX
|
||||
Linux NET4.0 for Linux 2.4
|
||||
Based upon Swansea University Computer Society NET3.039
|
||||
Starting kswapd v1.8
|
||||
CPM UART driver version 0.03
|
||||
ttyS0 on SMC1 at 0x0280, BRG1
|
||||
block: queued sectors max/low 9701kB/3233kB, 64 slots per queue
|
||||
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
|
||||
eth0: CPM ENET Version 0.2 on SCC1, 00:03:ca:00:64:df
|
||||
NET4: Linux TCP/IP 1.0 for NET4.0
|
||||
IP Protocols: ICMP, UDP, TCP
|
||||
IP: routing cache hash table of 512 buckets, 4Kbytes
|
||||
TCP: Hash tables configured (established 1024 bind 1024)
|
||||
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
|
||||
Looking up port of RPC 100003/2 on 192.168.0.1
|
||||
Looking up port of RPC 100005/2 on 192.168.0.1
|
||||
VFS: Mounted root (nfs filesystem).
|
||||
Freeing unused kernel memory: 44k init
|
||||
INIT: version 2.78 booting
|
||||
Welcome to DENX Embedded Linux Environment
|
||||
Press 'I' to enter interactive startup.
|
||||
Mounting proc filesystem: [ OK ]
|
||||
Configuring kernel parameters: [ OK ]
|
||||
Cannot access the Hardware Clock via any known method.
|
||||
Use the --debug option to see the details of our search for an access method.
|
||||
Setting clock : Wed Dec 31 19:00:11 EST 1969 [ OK ]
|
||||
Activating swap partitions: [ OK ]
|
||||
Setting hostname 192.168.0.30: [ OK ]
|
||||
Finding module dependencies:
|
||||
[ OK ]
|
||||
Checking filesystems
|
||||
Checking all file systems.
|
||||
[ OK ]
|
||||
Mounting local filesystems: [ OK ]
|
||||
Enabling swap space: [ OK ]
|
||||
INIT: Entering runlevel: 3
|
||||
Entering non-interactive startup
|
||||
Starting system logger: [ OK ]
|
||||
Starting kernel logger: [ OK ]
|
||||
Starting xinetd: [ OK ]
|
||||
|
||||
192 login: root
|
||||
Last login: Wed Dec 31 19:00:41 on ttyS0
|
||||
bash-2.04#
|
||||
|
||||
##################################################
|
||||
# Image download and run over ethernet interface
|
||||
# Linux-2.4.4 + Root filesystem mounted from RAM (pMulti)
|
||||
##############################
|
||||
|
||||
U-Boot 0.2.2 (Jan 19 2003 - 11:08:39)
|
||||
|
||||
CPU: XPC860xxZPnnB at 50 MHz: 4 kB I-Cache 4 kB D-Cache FEC present
|
||||
*** Warning: CPU Core has Silicon Bugs -- Check the Errata ***
|
||||
Board: ### No HW ID - assuming ELPT860
|
||||
DRAM: 16 MB
|
||||
FLASH: 512 kB
|
||||
In: serial
|
||||
Out: serial
|
||||
Err: serial
|
||||
Net: SCC ETHERNET
|
||||
|
||||
Type "run nfsboot" to mount root filesystem over NFS
|
||||
|
||||
Hit any key to stop autoboot: 0
|
||||
LEOX_elpt860: run ramboot
|
||||
ARP broadcast 1
|
||||
TFTP from server 192.168.0.1; our IP address is 192.168.0.30
|
||||
Filename '/home/leox/pMulti'.
|
||||
Load address: 0x400000
|
||||
Loading: #################################################################
|
||||
#################################################################
|
||||
#################################################################
|
||||
#################################################################
|
||||
#################################################################
|
||||
########################################################
|
||||
done
|
||||
Bytes transferred = 1947816 (1db8a8 hex)
|
||||
## Booting image at 00400000 ...
|
||||
Image Name: linux-2.4.4-2002-03-21 Multiboot
|
||||
Image Type: PowerPC Linux Multi-File Image (gzip compressed)
|
||||
Data Size: 1947752 Bytes = 1902 kB = 1 MB
|
||||
Load Address: 00000000
|
||||
Entry Point: 00000000
|
||||
Contents:
|
||||
Image 0: 477230 Bytes = 466 kB = 0 MB
|
||||
Image 1: 1470508 Bytes = 1436 kB = 1 MB
|
||||
Verifying Checksum ... OK
|
||||
Uncompressing Multi-File Image ... OK
|
||||
Loading Ramdisk to 00e44000, end 00fab02c ... OK
|
||||
Linux version 2.4.4-rthal5 (leox@p5ak6650) (gcc version 2.95.3 20010315 (release/MontaVista)) #1 Wed Jul 3 10:23:53 CEST 2002
|
||||
On node 0 totalpages: 4096
|
||||
zone(0): 4096 pages.
|
||||
zone(1): 0 pages.
|
||||
zone(2): 0 pages.
|
||||
Kernel command line: root=/dev/ram rw
|
||||
rtsched version <20010618.1050.24>
|
||||
Decrementer Frequency: 3125000
|
||||
Warning: real time clock seems stuck!
|
||||
Calibrating delay loop... 49.76 BogoMIPS
|
||||
Memory: 13280k available (928k kernel code, 384k data, 44k init, 0k highmem)
|
||||
Dentry-cache hash table entries: 2048 (order: 2, 16384 bytes)
|
||||
Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
|
||||
Page-cache hash table entries: 4096 (order: 2, 16384 bytes)
|
||||
Inode-cache hash table entries: 1024 (order: 1, 8192 bytes)
|
||||
POSIX conformance testing by UNIFIX
|
||||
Linux NET4.0 for Linux 2.4
|
||||
Based upon Swansea University Computer Society NET3.039
|
||||
Starting kswapd v1.8
|
||||
CPM UART driver version 0.03
|
||||
ttyS0 on SMC1 at 0x0280, BRG1
|
||||
block: queued sectors max/low 8741kB/2913kB, 64 slots per queue
|
||||
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
|
||||
eth0: CPM ENET Version 0.2 on SCC1, 00:03:ca:00:64:df
|
||||
RAMDISK: Compressed image found at block 0
|
||||
Freeing initrd memory: 1436k freed
|
||||
NET4: Linux TCP/IP 1.0 for NET4.0
|
||||
IP Protocols: ICMP, UDP, TCP
|
||||
IP: routing cache hash table of 512 buckets, 4Kbytes
|
||||
TCP: Hash tables configured (established 1024 bind 1024)
|
||||
IP-Config: Incomplete network configuration information.
|
||||
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
|
||||
VFS: Mounted root (ext2 filesystem).
|
||||
Freeing unused kernel memory: 44k in<69>
|
||||
init started: BusyBox v0.60.2 (2002.07.01-12:06+0000) multi-call Configuring hostname
|
||||
Configuring lo...
|
||||
Configuring eth0...
|
||||
Configuring Gateway...
|
||||
|
||||
Please press Enter to activate this console.
|
||||
|
||||
ELPT860 login: root
|
||||
Password:
|
||||
Welcome to Linux-2.4.4 for ELPT CPU board (MPC860T @ 50MHz)
|
||||
|
||||
a8888b.
|
||||
d888888b.
|
||||
8P"YP"Y88
|
||||
_ _ 8|o||o|88
|
||||
| | |_| 8' .88
|
||||
| | _ ____ _ _ _ _ 8`._.' Y8.
|
||||
| | | | _ \| | | |\ \/ / d/ `8b.
|
||||
| |___ | | | | | |_| |/ \ .dP . Y8b.
|
||||
|_____||_|_| |_|\____|\_/\_/ d8:' " `::88b.
|
||||
d8" `Y88b
|
||||
:8P ' :888
|
||||
8a. : _a88P
|
||||
._/"Yaa_ : .| 88P|
|
||||
\ YP" `| 8P `.
|
||||
/ \._____.d| .'
|
||||
`--..__)888888P`._.'
|
||||
login[21]: root login on `ttyS0'
|
||||
|
||||
|
||||
|
||||
BusyBox v0.60.3 (2002.07.20-10:39+0000) Built-in shell (ash)
|
||||
Enter 'help' for a list of built-in commands.
|
||||
|
||||
root@ELPT860:~ #
|
||||
36
board/LEOX/elpt860/config.mk
Normal file
36
board/LEOX/elpt860/config.mk
Normal file
@@ -0,0 +1,36 @@
|
||||
#######################################################################
|
||||
#
|
||||
# Copyright (C) 2000, 2001, 2002, 2003
|
||||
# The LEOX team <team@leox.org>, http://www.leox.org
|
||||
#
|
||||
# LEOX.org is about the development of free hardware and software resources
|
||||
# for system on chip.
|
||||
#
|
||||
# Description: U-Boot port on the LEOX's ELPT860 CPU board
|
||||
# ~~~~~~~~~~~
|
||||
#
|
||||
#######################################################################
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
# MA 02111-1307 USA
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
#
|
||||
# ELPT860 board
|
||||
#
|
||||
|
||||
TEXT_BASE = 0x02000000
|
||||
#TEXT_BASE = 0x00FB0000
|
||||
348
board/LEOX/elpt860/elpt860.c
Normal file
348
board/LEOX/elpt860/elpt860.c
Normal file
@@ -0,0 +1,348 @@
|
||||
/*
|
||||
**=====================================================================
|
||||
**
|
||||
** Copyright (C) 2000, 2001, 2002, 2003
|
||||
** The LEOX team <team@leox.org>, http://www.leox.org
|
||||
**
|
||||
** LEOX.org is about the development of free hardware and software resources
|
||||
** for system on chip.
|
||||
**
|
||||
** Description: U-Boot port on the LEOX's ELPT860 CPU board
|
||||
** ~~~~~~~~~~~
|
||||
**
|
||||
**=====================================================================
|
||||
**
|
||||
** This program is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU General Public License as
|
||||
** published by the Free Software Foundation; either version 2 of
|
||||
** the License, or (at your option) any later version.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
** GNU General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU General Public License
|
||||
** along with this program; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
** MA 02111-1307 USA
|
||||
**
|
||||
**=====================================================================
|
||||
*/
|
||||
|
||||
/*
|
||||
** Note 1: In this file, you have to provide the following functions:
|
||||
** ------
|
||||
** int board_early_init_f(void)
|
||||
** int checkboard(void)
|
||||
** long int initdram(int board_type)
|
||||
** called from 'board_init_f()' into 'common/board.c'
|
||||
**
|
||||
** void reset_phy(void)
|
||||
** called from 'board_init_r()' into 'common/board.c'
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <mpc8xx.h>
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
static long int dram_size (long int, long int *, long int);
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
#define _NOT_USED_ 0xFFFFFFFF
|
||||
|
||||
const uint init_sdram_table[] = {
|
||||
/*
|
||||
* Single Read. (Offset 0 in UPMA RAM)
|
||||
*/
|
||||
0x0FFCCC04, 0xFFFFFC04, 0x0FFC3C04, 0xFFFFFC04,
|
||||
0xFFFFFC04, /* last */
|
||||
/*
|
||||
* SDRAM Initialization (offset 5 in UPMA RAM)
|
||||
*
|
||||
* This is no UPM entry point. The following definition uses
|
||||
* the remaining space to establish an initialization
|
||||
* sequence, which is executed by a RUN command.
|
||||
*
|
||||
*/
|
||||
0xFFFFFC04, 0xFFFFFC04, 0x0FFC3C04, /* last */
|
||||
/*
|
||||
* Burst Read. (Offset 8 in UPMA RAM)
|
||||
*/
|
||||
0xFFFFFC04, 0xFFFFFC04, 0xFFFFFC04, 0xFFFFFC04,
|
||||
0x0FFC3C04, 0xFFFFFC04, 0xFFFFFC04, 0xFFFFFC04,
|
||||
0xFFFFFC04, 0x0FFC3C04, 0xFFFFFC04, 0xFFFFFC04,
|
||||
0xFFFFFC04, 0xFFFFFC04, 0x0FFC3C04, 0xFFFFFC04, /* last */
|
||||
/*
|
||||
* Single Write. (Offset 18 in UPMA RAM)
|
||||
*/
|
||||
0xFFFFFC04, 0xFFFFFC04, 0xFFFFFC04, 0x0FFC3C04,
|
||||
0xFFFFFC04, 0xFFFFFC04, 0x0FFFFC04, 0xFFFFFC04, /* last */
|
||||
/*
|
||||
* Burst Write. (Offset 20 in UPMA RAM)
|
||||
*/
|
||||
0x0FFC3C04, 0xFFFFFC04, 0xFFFFFC04, 0xFFFFFC04,
|
||||
0xFFFFFC04, 0x0FFC3C04, 0xFFFFFC04, 0xFFFFFC04,
|
||||
0xFFFFFC04, 0xFFFFFC04, 0xFFFFFC34, 0x0FAC0C34,
|
||||
0xFFFFFC05, 0xFFFFFC04, 0x0FFCFC04, 0xFFFFFC05, /* last */
|
||||
};
|
||||
|
||||
const uint sdram_table[] = {
|
||||
/*
|
||||
* Single Read. (Offset 0 in UPMA RAM)
|
||||
*/
|
||||
0x0F0FFC24, 0x0F0CFC04, 0xFF0FFC04, 0x00AF3C04,
|
||||
0xFF0FFC00, /* last */
|
||||
/*
|
||||
* SDRAM Initialization (offset 5 in UPMA RAM)
|
||||
*
|
||||
* This is no UPM entry point. The following definition uses
|
||||
* the remaining space to establish an initialization
|
||||
* sequence, which is executed by a RUN command.
|
||||
*
|
||||
*/
|
||||
0x0FFCCC04, 0xFFAFFC05, 0xFFAFFC05, /* last */
|
||||
/*
|
||||
* Burst Read. (Offset 8 in UPMA RAM)
|
||||
*/
|
||||
0x0F0FFC24, 0x0F0CFC04, 0xFF0FFC04, 0x00AF3C04,
|
||||
0xF00FFC00, 0xF00FFC00, 0xF00FFC00, 0xFF0FFC00,
|
||||
0x0FFCCC04, 0xFFAFFC05, 0xFFAFFC04, 0xFFAFFC04,
|
||||
0xFFAFFC04, 0xFFAFFC04, 0xFFAFFC04, 0xFFAFFC04, /* last */
|
||||
/*
|
||||
* Single Write. (Offset 18 in UPMA RAM)
|
||||
*/
|
||||
0x0F0FFC24, 0x0F0CFC04, 0xFF0FFC04, 0x00AF0C00,
|
||||
0xFF0FFC04, 0x0FFCCC04, 0xFFAFFC05, /* last */
|
||||
_NOT_USED_,
|
||||
/*
|
||||
* Burst Write. (Offset 20 in UPMA RAM)
|
||||
*/
|
||||
0x0F0FFC24, 0x0F0CFC04, 0xFF0FFC00, 0x00AF0C00,
|
||||
0xF00FFC00, 0xF00FFC00, 0xF00FFC04, 0x0FFCCC04,
|
||||
0xFFAFFC04, 0xFFAFFC05, 0xFFAFFC04, 0xFFAFFC04,
|
||||
0xFFAFFC04, 0xFFAFFC04, 0xFFAFFC04, 0xFFAFFC04, /* last */
|
||||
/*
|
||||
* Refresh (Offset 30 in UPMA RAM)
|
||||
*/
|
||||
0x0FFC3C04, 0xFFFFFC04, 0xFFFFFC04, 0xFFFFFC04,
|
||||
0xFFFFFC05, 0xFFFFFC04, 0xFFFFFC05, _NOT_USED_,
|
||||
0xFFAFFC04, 0xFFAFFC04, 0xFFAFFC04, 0xFFAFFC04, /* last */
|
||||
/*
|
||||
* Exception. (Offset 3c in UPMA RAM)
|
||||
*/
|
||||
0x0FFFFC34, 0x0FAC0C34, 0xFFFFFC05, 0xFFAFFC04, /* last */
|
||||
};
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
#define CFG_PC4 0x0800
|
||||
|
||||
#define CFG_DS1 CFG_PC4
|
||||
|
||||
/*
|
||||
* Very early board init code (fpga boot, etc.)
|
||||
*/
|
||||
int board_early_init_f (void)
|
||||
{
|
||||
volatile immap_t *immr = (immap_t *) CFG_IMMR;
|
||||
|
||||
/*
|
||||
* Light up the red led on ELPT860 pcb (DS1) (PCDAT)
|
||||
*/
|
||||
immr->im_ioport.iop_pcdat &= ~CFG_DS1; /* PCDAT (DS1 = 0) */
|
||||
immr->im_ioport.iop_pcpar &= ~CFG_DS1; /* PCPAR (0=general purpose I/O) */
|
||||
immr->im_ioport.iop_pcdir |= CFG_DS1; /* PCDIR (I/O: 0=input, 1=output) */
|
||||
|
||||
return (0); /* success */
|
||||
}
|
||||
|
||||
/*
|
||||
* Check Board Identity:
|
||||
*
|
||||
* Test ELPT860 ID string
|
||||
*
|
||||
* Return 1 if no second DRAM bank, otherwise returns 0
|
||||
*/
|
||||
|
||||
int checkboard (void)
|
||||
{
|
||||
char *s = getenv ("serial#");
|
||||
|
||||
if (!s || strncmp (s, "ELPT860", 7))
|
||||
printf ("### No HW ID - assuming ELPT860\n");
|
||||
|
||||
return (0); /* success */
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
long int initdram (int board_type)
|
||||
{
|
||||
volatile immap_t *immap = (immap_t *) CFG_IMMR;
|
||||
volatile memctl8xx_t *memctl = &immap->im_memctl;
|
||||
long int size8, size9;
|
||||
long int size_b0 = 0;
|
||||
|
||||
/*
|
||||
* This sequence initializes SDRAM chips on ELPT860 board
|
||||
*/
|
||||
upmconfig (UPMA, (uint *) init_sdram_table,
|
||||
sizeof (init_sdram_table) / sizeof (uint));
|
||||
|
||||
memctl->memc_mptpr = 0x0200;
|
||||
memctl->memc_mamr = 0x18002111;
|
||||
|
||||
memctl->memc_mar = 0x00000088;
|
||||
memctl->memc_mcr = 0x80002000; /* CS1: SDRAM bank 0 */
|
||||
|
||||
upmconfig (UPMA, (uint *) sdram_table,
|
||||
sizeof (sdram_table) / sizeof (uint));
|
||||
|
||||
/*
|
||||
* Preliminary prescaler for refresh (depends on number of
|
||||
* banks): This value is selected for four cycles every 62.4 us
|
||||
* with two SDRAM banks or four cycles every 31.2 us with one
|
||||
* bank. It will be adjusted after memory sizing.
|
||||
*/
|
||||
memctl->memc_mptpr = CFG_MPTPR_2BK_8K;
|
||||
|
||||
/*
|
||||
* The following value is used as an address (i.e. opcode) for
|
||||
* the LOAD MODE REGISTER COMMAND during SDRAM initialisation. If
|
||||
* the port size is 32bit the SDRAM does NOT "see" the lower two
|
||||
* address lines, i.e. mar=0x00000088 -> opcode=0x00000022 for
|
||||
* MICRON SDRAMs:
|
||||
* -> 0 00 010 0 010
|
||||
* | | | | +- Burst Length = 4
|
||||
* | | | +----- Burst Type = Sequential
|
||||
* | | +------- CAS Latency = 2
|
||||
* | +----------- Operating Mode = Standard
|
||||
* +-------------- Write Burst Mode = Programmed Burst Length
|
||||
*/
|
||||
memctl->memc_mar = 0x00000088;
|
||||
|
||||
/*
|
||||
* Map controller banks 2 and 3 to the SDRAM banks 2 and 3 at
|
||||
* preliminary addresses - these have to be modified after the
|
||||
* SDRAM size has been determined.
|
||||
*/
|
||||
memctl->memc_or1 = CFG_OR1_PRELIM;
|
||||
memctl->memc_br1 = CFG_BR1_PRELIM;
|
||||
|
||||
memctl->memc_mamr = CFG_MAMR_8COL & (~(MAMR_PTAE)); /* no refresh yet */
|
||||
|
||||
udelay (200);
|
||||
|
||||
/* perform SDRAM initializsation sequence */
|
||||
|
||||
memctl->memc_mcr = 0x80002105; /* CS1: SDRAM bank 0 */
|
||||
udelay (1);
|
||||
memctl->memc_mcr = 0x80002230; /* CS1: SDRAM bank 0 - execute twice */
|
||||
udelay (1);
|
||||
|
||||
memctl->memc_mamr |= MAMR_PTAE; /* enable refresh */
|
||||
|
||||
udelay (1000);
|
||||
|
||||
/*
|
||||
* Check Bank 0 Memory Size for re-configuration
|
||||
*
|
||||
* try 8 column mode
|
||||
*/
|
||||
size8 = dram_size (CFG_MAMR_8COL,
|
||||
SDRAM_BASE1_PRELIM, SDRAM_MAX_SIZE);
|
||||
|
||||
udelay (1000);
|
||||
|
||||
/*
|
||||
* try 9 column mode
|
||||
*/
|
||||
size9 = dram_size (CFG_MAMR_9COL,
|
||||
SDRAM_BASE1_PRELIM, SDRAM_MAX_SIZE);
|
||||
|
||||
if (size8 < size9) { /* leave configuration at 9 columns */
|
||||
size_b0 = size9;
|
||||
/* debug ("SDRAM Bank 0 in 9 column mode: %ld MB\n", size >> 20); */
|
||||
} else { /* back to 8 columns */
|
||||
|
||||
size_b0 = size8;
|
||||
memctl->memc_mamr = CFG_MAMR_8COL;
|
||||
udelay (500);
|
||||
/* debug ("SDRAM Bank 0 in 8 column mode: %ld MB\n", size >> 20); */
|
||||
}
|
||||
|
||||
udelay (1000);
|
||||
|
||||
/*
|
||||
* Adjust refresh rate depending on SDRAM type, both banks
|
||||
* For types > 128 MBit leave it at the current (fast) rate
|
||||
*/
|
||||
if (size_b0 < 0x02000000) {
|
||||
/* reduce to 15.6 us (62.4 us / quad) */
|
||||
memctl->memc_mptpr = CFG_MPTPR_2BK_4K;
|
||||
udelay (1000);
|
||||
}
|
||||
|
||||
/*
|
||||
* Final mapping: map bigger bank first
|
||||
*/
|
||||
memctl->memc_or1 = ((-size_b0) & 0xFFFF0000) | CFG_OR_TIMING_SDRAM;
|
||||
memctl->memc_br1 = (CFG_SDRAM_BASE & BR_BA_MSK) | BR_MS_UPMA | BR_V;
|
||||
|
||||
{
|
||||
unsigned long reg;
|
||||
|
||||
/* adjust refresh rate depending on SDRAM type, one bank */
|
||||
reg = memctl->memc_mptpr;
|
||||
reg >>= 1; /* reduce to CFG_MPTPR_1BK_8K / _4K */
|
||||
memctl->memc_mptpr = reg;
|
||||
}
|
||||
|
||||
udelay (10000);
|
||||
|
||||
return (size_b0);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Check memory range for valid RAM. A simple memory test determines
|
||||
* the actually available RAM size between addresses `base' and
|
||||
* `base + maxsize'. Some (not all) hardware errors are detected:
|
||||
* - short between address lines
|
||||
* - short between data lines
|
||||
*/
|
||||
|
||||
static long int
|
||||
dram_size (long int mamr_value, long int *base, long int maxsize)
|
||||
{
|
||||
volatile immap_t *immap = (immap_t *) CFG_IMMR;
|
||||
volatile memctl8xx_t *memctl = &immap->im_memctl;
|
||||
|
||||
memctl->memc_mamr = mamr_value;
|
||||
|
||||
return (get_ram_size (base, maxsize));
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
#define CFG_PA1 0x4000
|
||||
#define CFG_PA2 0x2000
|
||||
|
||||
#define CFG_LBKs (CFG_PA2 | CFG_PA1)
|
||||
|
||||
void reset_phy (void)
|
||||
{
|
||||
volatile immap_t *immr = (immap_t *) CFG_IMMR;
|
||||
|
||||
/*
|
||||
* Ensure LBK LXT901 ethernet 1 & 2 = 0 ... for normal loopback in effect
|
||||
* and no AUI loopback
|
||||
*/
|
||||
immr->im_ioport.iop_padat &= ~CFG_LBKs; /* PADAT (LBK eth 1&2 = 0) */
|
||||
immr->im_ioport.iop_papar &= ~CFG_LBKs; /* PAPAR (0=general purpose I/O) */
|
||||
immr->im_ioport.iop_padir |= CFG_LBKs; /* PADIR (I/O: 0=input, 1=output) */
|
||||
}
|
||||
615
board/LEOX/elpt860/flash.c
Normal file
615
board/LEOX/elpt860/flash.c
Normal file
@@ -0,0 +1,615 @@
|
||||
/*
|
||||
**=====================================================================
|
||||
**
|
||||
** Copyright (C) 2000, 2001, 2002, 2003
|
||||
** The LEOX team <team@leox.org>, http://www.leox.org
|
||||
**
|
||||
** LEOX.org is about the development of free hardware and software resources
|
||||
** for system on chip.
|
||||
**
|
||||
** Description: U-Boot port on the LEOX's ELPT860 CPU board
|
||||
** ~~~~~~~~~~~
|
||||
**
|
||||
**=====================================================================
|
||||
**
|
||||
** This program is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU General Public License as
|
||||
** published by the Free Software Foundation; either version 2 of
|
||||
** the License, or (at your option) any later version.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
** GNU General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU General Public License
|
||||
** along with this program; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
** MA 02111-1307 USA
|
||||
**
|
||||
**=====================================================================
|
||||
*/
|
||||
|
||||
/*
|
||||
** Note 1: In this file, you have to provide the following variable:
|
||||
** ------
|
||||
** flash_info_t flash_info[CFG_MAX_FLASH_BANKS]
|
||||
** 'flash_info_t' structure is defined into 'include/flash.h'
|
||||
** and defined as extern into 'common/cmd_flash.c'
|
||||
**
|
||||
** Note 2: In this file, you have to provide the following functions:
|
||||
** ------
|
||||
** unsigned long flash_init(void)
|
||||
** called from 'board_init_r()' into 'common/board.c'
|
||||
**
|
||||
** void flash_print_info(flash_info_t *info)
|
||||
** called from 'do_flinfo()' into 'common/cmd_flash.c'
|
||||
**
|
||||
** int flash_erase(flash_info_t *info,
|
||||
** int s_first,
|
||||
** int s_last)
|
||||
** called from 'do_flerase()' & 'flash_sect_erase()' into 'common/cmd_flash.c'
|
||||
**
|
||||
** int write_buff (flash_info_t *info,
|
||||
** uchar *src,
|
||||
** ulong addr,
|
||||
** ulong cnt)
|
||||
** called from 'flash_write()' into 'common/cmd_flash.c'
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <mpc8xx.h>
|
||||
|
||||
|
||||
#ifndef CFG_ENV_ADDR
|
||||
# define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET)
|
||||
#endif
|
||||
|
||||
flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* Internal Functions
|
||||
*/
|
||||
static void flash_get_offsets (ulong base, flash_info_t *info);
|
||||
static ulong flash_get_size (volatile unsigned char *addr, flash_info_t *info);
|
||||
|
||||
static int write_word (flash_info_t *info, ulong dest, ulong data);
|
||||
static int write_byte (flash_info_t *info, ulong dest, uchar data);
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
unsigned long
|
||||
flash_init (void)
|
||||
{
|
||||
volatile immap_t *immap = (immap_t *)CFG_IMMR;
|
||||
volatile memctl8xx_t *memctl = &immap->im_memctl;
|
||||
unsigned long size_b0;
|
||||
int i;
|
||||
|
||||
/* Init: no FLASHes known */
|
||||
for (i=0; i<CFG_MAX_FLASH_BANKS; ++i)
|
||||
{
|
||||
flash_info[i].flash_id = FLASH_UNKNOWN;
|
||||
}
|
||||
|
||||
/* Static FLASH Bank configuration here - FIXME XXX */
|
||||
|
||||
size_b0 = flash_get_size ((volatile unsigned char *)FLASH_BASE0_PRELIM,
|
||||
&flash_info[0]);
|
||||
|
||||
if ( flash_info[0].flash_id == FLASH_UNKNOWN )
|
||||
{
|
||||
printf ("## Unknown FLASH on Bank 0 - Size = 0x%08lx = %ld MB\n",
|
||||
size_b0, size_b0<<20);
|
||||
}
|
||||
|
||||
/* Remap FLASH according to real size */
|
||||
memctl->memc_or0 = CFG_OR_TIMING_FLASH | (-size_b0 & OR_AM_MSK);
|
||||
memctl->memc_br0 = (CFG_FLASH_BASE & BR_BA_MSK) | BR_MS_GPCM | BR_PS_8 | BR_V;
|
||||
|
||||
/* Re-do sizing to get full correct info */
|
||||
size_b0 = flash_get_size ((volatile unsigned char *)CFG_FLASH_BASE,
|
||||
&flash_info[0]);
|
||||
|
||||
flash_get_offsets (CFG_FLASH_BASE, &flash_info[0]);
|
||||
|
||||
#if CFG_MONITOR_BASE >= CFG_FLASH_BASE
|
||||
/* monitor protection ON by default */
|
||||
flash_protect (FLAG_PROTECT_SET,
|
||||
CFG_MONITOR_BASE,
|
||||
CFG_MONITOR_BASE + monitor_flash_len-1,
|
||||
&flash_info[0]);
|
||||
#endif
|
||||
|
||||
#ifdef CFG_ENV_IS_IN_FLASH
|
||||
/* ENV protection ON by default */
|
||||
flash_protect(FLAG_PROTECT_SET,
|
||||
CFG_ENV_ADDR,
|
||||
CFG_ENV_ADDR + CFG_ENV_SIZE-1,
|
||||
&flash_info[0]);
|
||||
#endif
|
||||
|
||||
flash_info[0].size = size_b0;
|
||||
|
||||
return (size_b0);
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
*/
|
||||
static void
|
||||
flash_get_offsets (ulong base,
|
||||
flash_info_t *info)
|
||||
{
|
||||
int i;
|
||||
|
||||
#define SECTOR_64KB 0x00010000
|
||||
|
||||
/* set up sector start adress table */
|
||||
for (i = 0; i < info->sector_count; i++)
|
||||
{
|
||||
info->start[i] = base + (i * SECTOR_64KB);
|
||||
}
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
flash_print_info (flash_info_t *info)
|
||||
{
|
||||
int i;
|
||||
|
||||
if ( info->flash_id == FLASH_UNKNOWN )
|
||||
{
|
||||
printf ("missing or unknown FLASH type\n");
|
||||
return;
|
||||
}
|
||||
|
||||
switch ( info->flash_id & FLASH_VENDMASK )
|
||||
{
|
||||
case FLASH_MAN_AMD: printf ("AMD "); break;
|
||||
case FLASH_MAN_FUJ: printf ("FUJITSU "); break;
|
||||
case FLASH_MAN_STM: printf ("STM (Thomson) "); break;
|
||||
default: printf ("Unknown Vendor "); break;
|
||||
}
|
||||
|
||||
switch ( info->flash_id & FLASH_TYPEMASK )
|
||||
{
|
||||
case FLASH_AM040: printf ("AM29F040 (4 Mbits)\n");
|
||||
break;
|
||||
default: printf ("Unknown Chip Type\n");
|
||||
break;
|
||||
}
|
||||
|
||||
printf (" Size: %ld KB in %d Sectors\n",
|
||||
info->size >> 10, info->sector_count);
|
||||
|
||||
printf (" Sector Start Addresses:");
|
||||
for (i=0; i<info->sector_count; ++i)
|
||||
{
|
||||
if ((i % 5) == 0)
|
||||
printf ("\n ");
|
||||
printf (" %08lX%s",
|
||||
info->start[i],
|
||||
info->protect[i] ? " (RO)" : " "
|
||||
);
|
||||
}
|
||||
printf ("\n");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
* The following code cannot be run from FLASH!
|
||||
*/
|
||||
|
||||
static ulong
|
||||
flash_get_size (volatile unsigned char *addr,
|
||||
flash_info_t *info)
|
||||
{
|
||||
short i;
|
||||
uchar value;
|
||||
ulong base = (ulong)addr;
|
||||
|
||||
/* Write auto select command: read Manufacturer ID */
|
||||
addr[0x0555] = 0xAA;
|
||||
addr[0x02AA] = 0x55;
|
||||
addr[0x0555] = 0x90;
|
||||
|
||||
value = addr[0];
|
||||
|
||||
switch ( value )
|
||||
{
|
||||
/* case AMD_MANUFACT: */
|
||||
case 0x01:
|
||||
info->flash_id = FLASH_MAN_AMD;
|
||||
break;
|
||||
/* case FUJ_MANUFACT: */
|
||||
case 0x04:
|
||||
info->flash_id = FLASH_MAN_FUJ;
|
||||
break;
|
||||
/* case STM_MANUFACT: */
|
||||
case 0x20:
|
||||
info->flash_id = FLASH_MAN_STM;
|
||||
break;
|
||||
|
||||
default:
|
||||
info->flash_id = FLASH_UNKNOWN;
|
||||
info->sector_count = 0;
|
||||
info->size = 0;
|
||||
return (0); /* no or unknown flash */
|
||||
}
|
||||
|
||||
value = addr[1]; /* device ID */
|
||||
|
||||
switch ( value )
|
||||
{
|
||||
case STM_ID_F040B:
|
||||
case AMD_ID_F040B:
|
||||
info->flash_id += FLASH_AM040; /* 4 Mbits = 512k * 8 */
|
||||
info->sector_count = 8;
|
||||
info->size = 0x00080000;
|
||||
break;
|
||||
|
||||
default:
|
||||
info->flash_id = FLASH_UNKNOWN;
|
||||
return (0); /* => no or unknown flash */
|
||||
}
|
||||
|
||||
/* set up sector start adress table */
|
||||
for (i = 0; i < info->sector_count; i++)
|
||||
{
|
||||
info->start[i] = base + (i * 0x00010000);
|
||||
}
|
||||
|
||||
/* check for protected sectors */
|
||||
for (i = 0; i < info->sector_count; i++)
|
||||
{
|
||||
/* read sector protection at sector address, (A7 .. A0) = 0x02 */
|
||||
/* D0 = 1 if protected */
|
||||
addr = (volatile unsigned char *)(info->start[i]);
|
||||
info->protect[i] = addr[2] & 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Prevent writes to uninitialized FLASH.
|
||||
*/
|
||||
if ( info->flash_id != FLASH_UNKNOWN )
|
||||
{
|
||||
addr = (volatile unsigned char *)info->start[0];
|
||||
|
||||
*addr = 0xF0; /* reset bank */
|
||||
}
|
||||
|
||||
return (info->size);
|
||||
}
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
int
|
||||
flash_erase (flash_info_t *info,
|
||||
int s_first,
|
||||
int s_last)
|
||||
{
|
||||
volatile unsigned char *addr = (volatile unsigned char *)(info->start[0]);
|
||||
int flag, prot, sect, l_sect;
|
||||
ulong start, now, last;
|
||||
|
||||
if ( (s_first < 0) || (s_first > s_last) )
|
||||
{
|
||||
if ( info->flash_id == FLASH_UNKNOWN )
|
||||
{
|
||||
printf ("- missing\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
printf ("- no sectors to erase\n");
|
||||
}
|
||||
return ( 1 );
|
||||
}
|
||||
|
||||
if ( (info->flash_id == FLASH_UNKNOWN) ||
|
||||
(info->flash_id > FLASH_AMD_COMP) )
|
||||
{
|
||||
printf ("Can't erase unknown flash type %08lx - aborted\n",
|
||||
info->flash_id);
|
||||
return ( 1 );
|
||||
}
|
||||
|
||||
prot = 0;
|
||||
for (sect=s_first; sect<=s_last; ++sect)
|
||||
{
|
||||
if ( info->protect[sect] )
|
||||
{
|
||||
prot++;
|
||||
}
|
||||
}
|
||||
|
||||
if ( prot )
|
||||
{
|
||||
printf ("- Warning: %d protected sectors will not be erased!\n", prot);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf ("\n");
|
||||
}
|
||||
|
||||
l_sect = -1;
|
||||
|
||||
/* Disable interrupts which might cause a timeout here */
|
||||
flag = disable_interrupts();
|
||||
|
||||
addr[0x0555] = 0xAA;
|
||||
addr[0x02AA] = 0x55;
|
||||
addr[0x0555] = 0x80;
|
||||
addr[0x0555] = 0xAA;
|
||||
addr[0x02AA] = 0x55;
|
||||
|
||||
/* Start erase on unprotected sectors */
|
||||
for (sect = s_first; sect<=s_last; sect++)
|
||||
{
|
||||
if (info->protect[sect] == 0) /* not protected */
|
||||
{
|
||||
addr = (volatile unsigned char *)(info->start[sect]);
|
||||
addr[0] = 0x30;
|
||||
l_sect = sect;
|
||||
}
|
||||
}
|
||||
|
||||
/* re-enable interrupts if necessary */
|
||||
if ( flag )
|
||||
enable_interrupts();
|
||||
|
||||
/* wait at least 80us - let's wait 1 ms */
|
||||
udelay (1000);
|
||||
|
||||
/*
|
||||
* We wait for the last triggered sector
|
||||
*/
|
||||
if ( l_sect < 0 )
|
||||
goto DONE;
|
||||
|
||||
start = get_timer (0);
|
||||
last = start;
|
||||
addr = (volatile unsigned char *)(info->start[l_sect]);
|
||||
while ( (addr[0] & 0x80) != 0x80 )
|
||||
{
|
||||
if ( (now = get_timer(start)) > CFG_FLASH_ERASE_TOUT )
|
||||
{
|
||||
printf ("Timeout\n");
|
||||
return ( 1 );
|
||||
}
|
||||
/* show that we're waiting */
|
||||
if ( (now - last) > 1000 ) /* every second */
|
||||
{
|
||||
putc ('.');
|
||||
last = now;
|
||||
}
|
||||
}
|
||||
|
||||
DONE:
|
||||
/* reset to read mode */
|
||||
addr = (volatile unsigned char *)info->start[0];
|
||||
addr[0] = 0xF0; /* reset bank */
|
||||
|
||||
printf (" done\n");
|
||||
|
||||
return ( 0 );
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* Copy memory to flash, returns:
|
||||
* 0 - OK
|
||||
* 1 - write timeout
|
||||
* 2 - Flash not erased
|
||||
*/
|
||||
|
||||
int
|
||||
write_buff (flash_info_t *info,
|
||||
uchar *src,
|
||||
ulong addr,
|
||||
ulong cnt)
|
||||
{
|
||||
ulong cp, wp, data;
|
||||
uchar bdata;
|
||||
int i, l, rc;
|
||||
|
||||
if ( (info->flash_id & FLASH_TYPEMASK) == FLASH_AM040 )
|
||||
{
|
||||
/* Width of the data bus: 8 bits */
|
||||
|
||||
wp = addr;
|
||||
|
||||
while ( cnt )
|
||||
{
|
||||
bdata = *src++;
|
||||
|
||||
if ( (rc = write_byte(info, wp, bdata)) != 0 )
|
||||
{
|
||||
return (rc);
|
||||
}
|
||||
|
||||
++wp;
|
||||
--cnt;
|
||||
}
|
||||
|
||||
return ( 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Width of the data bus: 32 bits */
|
||||
|
||||
wp = (addr & ~3); /* get lower word aligned address */
|
||||
|
||||
/*
|
||||
* handle unaligned start bytes
|
||||
*/
|
||||
if ( (l = addr - wp) != 0 )
|
||||
{
|
||||
data = 0;
|
||||
for (i=0, cp=wp; i<l; ++i, ++cp)
|
||||
{
|
||||
data = (data << 8) | (*(uchar *)cp);
|
||||
}
|
||||
for (; i<4 && cnt>0; ++i)
|
||||
{
|
||||
data = (data << 8) | *src++;
|
||||
--cnt;
|
||||
++cp;
|
||||
}
|
||||
for (; cnt==0 && i<4; ++i, ++cp)
|
||||
{
|
||||
data = (data << 8) | (*(uchar *)cp);
|
||||
}
|
||||
|
||||
if ( (rc = write_word(info, wp, data)) != 0 )
|
||||
{
|
||||
return (rc);
|
||||
}
|
||||
wp += 4;
|
||||
}
|
||||
|
||||
/*
|
||||
* handle word aligned part
|
||||
*/
|
||||
while ( cnt >= 4 )
|
||||
{
|
||||
data = 0;
|
||||
for (i=0; i<4; ++i)
|
||||
{
|
||||
data = (data << 8) | *src++;
|
||||
}
|
||||
if ( (rc = write_word(info, wp, data)) != 0 )
|
||||
{
|
||||
return (rc);
|
||||
}
|
||||
wp += 4;
|
||||
cnt -= 4;
|
||||
}
|
||||
|
||||
if ( cnt == 0 )
|
||||
{
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* handle unaligned tail bytes
|
||||
*/
|
||||
data = 0;
|
||||
for (i=0, cp=wp; i<4 && cnt>0; ++i, ++cp)
|
||||
{
|
||||
data = (data << 8) | *src++;
|
||||
--cnt;
|
||||
}
|
||||
for (; i<4; ++i, ++cp)
|
||||
{
|
||||
data = (data << 8) | (*(uchar *)cp);
|
||||
}
|
||||
|
||||
return (write_word(info, wp, data));
|
||||
}
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* Write a word to Flash, returns:
|
||||
* 0 - OK
|
||||
* 1 - write timeout
|
||||
* 2 - Flash not erased
|
||||
*/
|
||||
static int
|
||||
write_word (flash_info_t *info,
|
||||
ulong dest,
|
||||
ulong data)
|
||||
{
|
||||
vu_long *addr = (vu_long*)(info->start[0]);
|
||||
ulong start;
|
||||
int flag;
|
||||
|
||||
/* Check if Flash is (sufficiently) erased */
|
||||
if ( (*((vu_long *)dest) & data) != data )
|
||||
{
|
||||
return (2);
|
||||
}
|
||||
/* Disable interrupts which might cause a timeout here */
|
||||
flag = disable_interrupts();
|
||||
|
||||
addr[0x0555] = 0x00AA00AA;
|
||||
addr[0x02AA] = 0x00550055;
|
||||
addr[0x0555] = 0x00A000A0;
|
||||
|
||||
*((vu_long *)dest) = data;
|
||||
|
||||
/* re-enable interrupts if necessary */
|
||||
if ( flag )
|
||||
enable_interrupts();
|
||||
|
||||
/* data polling for D7 */
|
||||
start = get_timer (0);
|
||||
while ( (*((vu_long *)dest) & 0x00800080) != (data & 0x00800080) )
|
||||
{
|
||||
if ( get_timer(start) > CFG_FLASH_WRITE_TOUT )
|
||||
{
|
||||
return (1);
|
||||
}
|
||||
}
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* Write a byte to Flash, returns:
|
||||
* 0 - OK
|
||||
* 1 - write timeout
|
||||
* 2 - Flash not erased
|
||||
*/
|
||||
static int
|
||||
write_byte (flash_info_t *info,
|
||||
ulong dest,
|
||||
uchar data)
|
||||
{
|
||||
volatile unsigned char *addr = (volatile unsigned char *)(info->start[0]);
|
||||
ulong start;
|
||||
int flag;
|
||||
|
||||
/* Check if Flash is (sufficiently) erased */
|
||||
if ( (*((volatile unsigned char *)dest) & data) != data )
|
||||
{
|
||||
return (2);
|
||||
}
|
||||
/* Disable interrupts which might cause a timeout here */
|
||||
flag = disable_interrupts();
|
||||
|
||||
addr[0x0555] = 0xAA;
|
||||
addr[0x02AA] = 0x55;
|
||||
addr[0x0555] = 0xA0;
|
||||
|
||||
*((volatile unsigned char *)dest) = data;
|
||||
|
||||
/* re-enable interrupts if necessary */
|
||||
if ( flag )
|
||||
enable_interrupts();
|
||||
|
||||
/* data polling for D7 */
|
||||
start = get_timer (0);
|
||||
while ( (*((volatile unsigned char *)dest) & 0x80) != (data & 0x80) )
|
||||
{
|
||||
if ( get_timer(start) > CFG_FLASH_WRITE_TOUT )
|
||||
{
|
||||
return (1);
|
||||
}
|
||||
}
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
*/
|
||||
154
board/LEOX/elpt860/u-boot.lds
Normal file
154
board/LEOX/elpt860/u-boot.lds
Normal file
@@ -0,0 +1,154 @@
|
||||
/*
|
||||
**=====================================================================
|
||||
**
|
||||
** Copyright (C) 2000, 2001, 2002, 2003
|
||||
** The LEOX team <team@leox.org>, http://www.leox.org
|
||||
**
|
||||
** LEOX.org is about the development of free hardware and software resources
|
||||
** for system on chip.
|
||||
**
|
||||
** Description: U-Boot port on the LEOX's ELPT860 CPU board
|
||||
** ~~~~~~~~~~~
|
||||
**
|
||||
**=====================================================================
|
||||
**
|
||||
** This program is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU General Public License as
|
||||
** published by the Free Software Foundation; either version 2 of
|
||||
** the License, or (at your option) any later version.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
** GNU General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU General Public License
|
||||
** along with this program; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
** MA 02111-1307 USA
|
||||
**
|
||||
**=====================================================================
|
||||
*/
|
||||
|
||||
OUTPUT_ARCH(powerpc)
|
||||
SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib); SEARCH_DIR(/usr/local/powerpc-any-elf/lib);
|
||||
/* Do we need any of these for elf?
|
||||
__DYNAMIC = 0; */
|
||||
SECTIONS
|
||||
{
|
||||
/* Read-only sections, merged into text segment: */
|
||||
. = + SIZEOF_HEADERS;
|
||||
.interp : { *(.interp) }
|
||||
.hash : { *(.hash) }
|
||||
.dynsym : { *(.dynsym) }
|
||||
.dynstr : { *(.dynstr) }
|
||||
.rel.text : { *(.rel.text) }
|
||||
.rela.text : { *(.rela.text) }
|
||||
.rel.data : { *(.rel.data) }
|
||||
.rela.data : { *(.rela.data) }
|
||||
.rel.rodata : { *(.rel.rodata) }
|
||||
.rela.rodata : { *(.rela.rodata) }
|
||||
.rel.got : { *(.rel.got) }
|
||||
.rela.got : { *(.rela.got) }
|
||||
.rel.ctors : { *(.rel.ctors) }
|
||||
.rela.ctors : { *(.rela.ctors) }
|
||||
.rel.dtors : { *(.rel.dtors) }
|
||||
.rela.dtors : { *(.rela.dtors) }
|
||||
.rel.bss : { *(.rel.bss) }
|
||||
.rela.bss : { *(.rela.bss) }
|
||||
.rel.plt : { *(.rel.plt) }
|
||||
.rela.plt : { *(.rela.plt) }
|
||||
.init : { *(.init) }
|
||||
.plt : { *(.plt) }
|
||||
.text :
|
||||
{
|
||||
/* WARNING - the following is hand-optimized to fit within */
|
||||
/* the sector layout of our flash chips! XXX FIXME XXX */
|
||||
|
||||
cpu/mpc8xx/start.o (.text)
|
||||
common/dlmalloc.o (.text)
|
||||
lib_ppc/ppcstring.o (.text)
|
||||
lib_generic/vsprintf.o (.text)
|
||||
lib_generic/crc32.o (.text)
|
||||
lib_generic/zlib.o (.text)
|
||||
lib_generic/string.o (.text)
|
||||
lib_ppc/cache.o (.text)
|
||||
lib_ppc/extable.o (.text)
|
||||
lib_ppc/time.o (.text)
|
||||
lib_ppc/ticks.o (.text)
|
||||
|
||||
. = env_offset;
|
||||
common/environment.o (.text)
|
||||
|
||||
*(.text)
|
||||
*(.fixup)
|
||||
*(.got1)
|
||||
}
|
||||
_etext = .;
|
||||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
.dtors : { *(.dtors) }
|
||||
|
||||
/* Read-write section, merged into data segment: */
|
||||
. = (. + 0x00FF) & 0xFFFFFF00;
|
||||
_erotext = .;
|
||||
PROVIDE (erotext = .);
|
||||
.reloc :
|
||||
{
|
||||
*(.got)
|
||||
_GOT2_TABLE_ = .;
|
||||
*(.got2)
|
||||
_FIXUP_TABLE_ = .;
|
||||
*(.fixup)
|
||||
}
|
||||
__got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
|
||||
__fixup_entries = (. - _FIXUP_TABLE_)>>2;
|
||||
|
||||
.data :
|
||||
{
|
||||
*(.data)
|
||||
*(.data1)
|
||||
*(.sdata)
|
||||
*(.sdata2)
|
||||
*(.dynamic)
|
||||
CONSTRUCTORS
|
||||
}
|
||||
_edata = .;
|
||||
PROVIDE (edata = .);
|
||||
|
||||
. = .;
|
||||
__u_boot_cmd_start = .;
|
||||
.u_boot_cmd : { *(.u_boot_cmd) }
|
||||
__u_boot_cmd_end = .;
|
||||
|
||||
. = .;
|
||||
__start___ex_table = .;
|
||||
__ex_table : { *(__ex_table) }
|
||||
__stop___ex_table = .;
|
||||
|
||||
. = ALIGN(256);
|
||||
__init_begin = .;
|
||||
.text.init : { *(.text.init) }
|
||||
.data.init : { *(.data.init) }
|
||||
. = ALIGN(256);
|
||||
__init_end = .;
|
||||
|
||||
__bss_start = .;
|
||||
.bss :
|
||||
{
|
||||
*(.sbss) *(.scommon)
|
||||
*(.dynbss)
|
||||
*(.bss)
|
||||
*(COMMON)
|
||||
}
|
||||
_end = . ;
|
||||
PROVIDE (end = .);
|
||||
}
|
||||
141
board/LEOX/elpt860/u-boot.lds.debug
Normal file
141
board/LEOX/elpt860/u-boot.lds.debug
Normal file
@@ -0,0 +1,141 @@
|
||||
/*
|
||||
**=====================================================================
|
||||
**
|
||||
** Copyright (C) 2000, 2001, 2002, 2003
|
||||
** The LEOX team <team@leox.org>, http://www.leox.org
|
||||
**
|
||||
** LEOX.org is about the development of free hardware and software resources
|
||||
** for system on chip.
|
||||
**
|
||||
** Description: U-Boot port on the LEOX's ELPT860 CPU board
|
||||
** ~~~~~~~~~~~
|
||||
**
|
||||
**=====================================================================
|
||||
**
|
||||
** This program is free software; you can redistribute it and/or
|
||||
** modify it under the terms of the GNU General Public License as
|
||||
** published by the Free Software Foundation; either version 2 of
|
||||
** the License, or (at your option) any later version.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
** GNU General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU General Public License
|
||||
** along with this program; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
** MA 02111-1307 USA
|
||||
**
|
||||
**=====================================================================
|
||||
*/
|
||||
|
||||
OUTPUT_ARCH(powerpc)
|
||||
SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib); SEARCH_DIR(/usr/local/powerpc-any-elf/lib);
|
||||
/* Do we need any of these for elf?
|
||||
__DYNAMIC = 0; */
|
||||
SECTIONS
|
||||
{
|
||||
/* Read-only sections, merged into text segment: */
|
||||
. = + SIZEOF_HEADERS;
|
||||
.interp : { *(.interp) }
|
||||
.hash : { *(.hash) }
|
||||
.dynsym : { *(.dynsym) }
|
||||
.dynstr : { *(.dynstr) }
|
||||
.rel.text : { *(.rel.text) }
|
||||
.rela.text : { *(.rela.text) }
|
||||
.rel.data : { *(.rel.data) }
|
||||
.rela.data : { *(.rela.data) }
|
||||
.rel.rodata : { *(.rel.rodata) }
|
||||
.rela.rodata : { *(.rela.rodata) }
|
||||
.rel.got : { *(.rel.got) }
|
||||
.rela.got : { *(.rela.got) }
|
||||
.rel.ctors : { *(.rel.ctors) }
|
||||
.rela.ctors : { *(.rela.ctors) }
|
||||
.rel.dtors : { *(.rel.dtors) }
|
||||
.rela.dtors : { *(.rela.dtors) }
|
||||
.rel.bss : { *(.rel.bss) }
|
||||
.rela.bss : { *(.rela.bss) }
|
||||
.rel.plt : { *(.rel.plt) }
|
||||
.rela.plt : { *(.rela.plt) }
|
||||
.init : { *(.init) }
|
||||
.plt : { *(.plt) }
|
||||
.text :
|
||||
{
|
||||
/* WARNING - the following is hand-optimized to fit within */
|
||||
/* the sector layout of our flash chips! XXX FIXME XXX */
|
||||
|
||||
cpu/mpc8xx/start.o (.text)
|
||||
common/dlmalloc.o (.text)
|
||||
lib_generic/vsprintf.o (.text)
|
||||
lib_generic/crc32.o (.text)
|
||||
|
||||
. = env_offset;
|
||||
common/environment.o (.text)
|
||||
|
||||
*(.text)
|
||||
*(.fixup)
|
||||
*(.got1)
|
||||
}
|
||||
_etext = .;
|
||||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
.dtors : { *(.dtors) }
|
||||
|
||||
/* Read-write section, merged into data segment: */
|
||||
. = (. + 0x0FFF) & 0xFFFFF000;
|
||||
_erotext = .;
|
||||
PROVIDE (erotext = .);
|
||||
.reloc :
|
||||
{
|
||||
*(.got)
|
||||
_GOT2_TABLE_ = .;
|
||||
*(.got2)
|
||||
_FIXUP_TABLE_ = .;
|
||||
*(.fixup)
|
||||
}
|
||||
__got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
|
||||
__fixup_entries = (. - _FIXUP_TABLE_)>>2;
|
||||
|
||||
.data :
|
||||
{
|
||||
*(.data)
|
||||
*(.data1)
|
||||
*(.sdata)
|
||||
*(.sdata2)
|
||||
*(.dynamic)
|
||||
CONSTRUCTORS
|
||||
}
|
||||
_edata = .;
|
||||
PROVIDE (edata = .);
|
||||
|
||||
__start___ex_table = .;
|
||||
__ex_table : { *(__ex_table) }
|
||||
__stop___ex_table = .;
|
||||
|
||||
. = ALIGN(4096);
|
||||
__init_begin = .;
|
||||
.text.init : { *(.text.init) }
|
||||
.data.init : { *(.data.init) }
|
||||
. = ALIGN(4096);
|
||||
__init_end = .;
|
||||
|
||||
__bss_start = .;
|
||||
.bss :
|
||||
{
|
||||
*(.sbss) *(.scommon)
|
||||
*(.dynbss)
|
||||
*(.bss)
|
||||
*(COMMON)
|
||||
}
|
||||
_end = . ;
|
||||
PROVIDE (end = .);
|
||||
}
|
||||
113
board/MAI/AmigaOneG3SE/AmigaOneG3SE.c
Normal file
113
board/MAI/AmigaOneG3SE/AmigaOneG3SE.c
Normal file
@@ -0,0 +1,113 @@
|
||||
/*
|
||||
* (C) Copyright 2002
|
||||
* Hyperion Entertainment, ThomasF@hyperion-entertainment.com
|
||||
* (C) Copyright 2006
|
||||
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <command.h>
|
||||
#include <pci.h>
|
||||
#include "articiaS.h"
|
||||
#include "memio.h"
|
||||
#include "via686.h"
|
||||
|
||||
__asm__(" .globl send_kb \n "
|
||||
"send_kb: \n "
|
||||
" lis r9, 0xfe00 \n "
|
||||
" \n "
|
||||
" li r4, 0x10 # retries \n "
|
||||
" mtctr r4 \n "
|
||||
" \n "
|
||||
"idle: \n "
|
||||
" lbz r4, 0x64(r9) \n "
|
||||
" andi. r4, r4, 0x02 \n "
|
||||
" bne idle \n "
|
||||
|
||||
"ready: \n "
|
||||
" stb r3, 0x60(r9) \n "
|
||||
" \n "
|
||||
"check: \n "
|
||||
" lbz r4, 0x64(r9) \n "
|
||||
" andi. r4, r4, 0x01 \n "
|
||||
" beq check \n "
|
||||
" \n "
|
||||
" lbz r4, 0x60(r9) \n "
|
||||
" cmpwi r4, 0xfa \n "
|
||||
" beq done \n "
|
||||
|
||||
" bdnz idle \n "
|
||||
|
||||
" li r3, 0 \n "
|
||||
" blr \n "
|
||||
|
||||
"done: \n "
|
||||
" li r3, 1 \n "
|
||||
" blr \n "
|
||||
|
||||
".globl test_kb \n "
|
||||
"test_kb: \n "
|
||||
" mflr r10 \n "
|
||||
" li r3, 0xed \n "
|
||||
" bl send_kb \n "
|
||||
" li r3, 0x01 \n "
|
||||
" bl send_kb \n "
|
||||
" mtlr r10 \n "
|
||||
" blr "
|
||||
);
|
||||
|
||||
|
||||
int checkboard (void)
|
||||
{
|
||||
printf ("Board: AmigaOneG3SE\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
long initdram (int board_type)
|
||||
{
|
||||
return articiaS_ram_init ();
|
||||
}
|
||||
|
||||
|
||||
void after_reloc (ulong dest_addr, gd_t *gd)
|
||||
{
|
||||
board_init_r (gd, dest_addr);
|
||||
}
|
||||
|
||||
|
||||
int misc_init_r (void)
|
||||
{
|
||||
extern pci_dev_t video_dev;
|
||||
extern void drv_video_init (void);
|
||||
|
||||
if (video_dev != ~0)
|
||||
drv_video_init ();
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
void pci_init_board (void)
|
||||
{
|
||||
#ifndef CONFIG_RAMBOOT
|
||||
articiaS_pci_init ();
|
||||
#endif
|
||||
}
|
||||
63
board/MAI/AmigaOneG3SE/Makefile
Normal file
63
board/MAI/AmigaOneG3SE/Makefile
Normal file
@@ -0,0 +1,63 @@
|
||||
#
|
||||
# (C) Copyright 2002-2006
|
||||
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
#
|
||||
# See file CREDITS for list of people who contributed to this
|
||||
# project.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
# MA 02111-1307 USA
|
||||
#
|
||||
|
||||
include $(TOPDIR)/config.mk
|
||||
ifneq ($(OBJTREE),$(SRCTREE))
|
||||
$(shell mkdir -p $(obj)../menu)
|
||||
$(shell mkdir -p $(obj)../bios_emulator)
|
||||
endif
|
||||
|
||||
LIB = $(obj)lib$(BOARD).a
|
||||
|
||||
COBJS = $(BOARD).o articiaS.o flash.o serial.o smbus.o articiaS_pci.o \
|
||||
via686.o i8259.o ../bios_emulator/x86interface.o \
|
||||
../bios_emulator/bios.o ../bios_emulator/glue.o \
|
||||
interrupts.o ps2kbd.o video.o usb_uhci.o enet.o \
|
||||
../menu/cmd_menu.o cmd_boota.o nvram.o
|
||||
|
||||
SOBJS = board_asm_init.o memio.o
|
||||
|
||||
EMUDIR = ../bios_emulator/scitech/src/x86emu/
|
||||
EMUOBJ = $(EMUDIR)decode.o $(EMUDIR)ops2.o $(EMUDIR)fpu.o $(EMUDIR)prim_ops.o \
|
||||
$(EMUDIR)ops.o $(EMUDIR)sys.o
|
||||
EMUSRC = $(EMUOBJ:.o=.c)
|
||||
|
||||
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
|
||||
OBJS := $(addprefix $(obj),$(COBJS))
|
||||
SOBJS := $(addprefix $(obj),$(SOBJS))
|
||||
EMUOBJ := $(addprefix $(obj),$(EMUOBJ))
|
||||
|
||||
$(LIB): $(obj).depend $(OBJS) $(SOBJS) $(EMUSRC)
|
||||
make $(obj)libx86emu.a -C ../bios_emulator/scitech/src/x86emu -f makefile.uboot CROSS_COMPILE=$(CROSS_COMPILE)
|
||||
-rm $(LIB)
|
||||
$(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) $(EMUOBJ)
|
||||
|
||||
|
||||
#########################################################################
|
||||
|
||||
# defines $(obj).depend target
|
||||
include $(SRCTREE)/rules.mk
|
||||
|
||||
sinclude $(obj).depend
|
||||
|
||||
#########################################################################
|
||||
704
board/MAI/AmigaOneG3SE/articiaS.c
Normal file
704
board/MAI/AmigaOneG3SE/articiaS.c
Normal file
@@ -0,0 +1,704 @@
|
||||
/*
|
||||
* (C) Copyright 2002
|
||||
* Hyperion Entertainment, ThomasF@hyperion-entertainment.com
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <pci.h>
|
||||
#include <asm/processor.h>
|
||||
#include "memio.h"
|
||||
#include "articiaS.h"
|
||||
#include "smbus.h"
|
||||
#include "via686.h"
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
#undef DEBUG
|
||||
|
||||
struct dimm_bank {
|
||||
uint8 used; /* Bank is populated */
|
||||
uint32 rows; /* Number of row addresses */
|
||||
uint32 columns; /* Number of column addresses */
|
||||
uint8 registered; /* SIMM is registered */
|
||||
uint8 ecc; /* SIMM has ecc */
|
||||
uint8 burst_len; /* Supported burst lengths */
|
||||
uint32 cas_lat; /* Supported CAS latencies */
|
||||
uint32 cas_used; /* CAS to use (not set by user) */
|
||||
uint32 trcd; /* RAS to CAS latency */
|
||||
uint32 trp; /* Precharge latency */
|
||||
uint32 tclk_hi; /* SDRAM cycle time (highest CAS latency) */
|
||||
uint32 tclk_2hi; /* SDRAM second highest CAS latency */
|
||||
uint32 size; /* Size of bank in bytes */
|
||||
uint8 auto_refresh; /* Module supports auto refresh */
|
||||
uint32 refresh_time; /* Refresh time (in ns) */
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
** Based in part on the evb64260 code
|
||||
*/
|
||||
|
||||
/*
|
||||
* translate ns.ns/10 coding of SPD timing values
|
||||
* into 10 ps unit values
|
||||
*/
|
||||
static inline unsigned short NS10to10PS (unsigned char spd_byte)
|
||||
{
|
||||
unsigned short ns, ns10;
|
||||
|
||||
/* isolate upper nibble */
|
||||
ns = (spd_byte >> 4) & 0x0F;
|
||||
/* isolate lower nibble */
|
||||
ns10 = (spd_byte & 0x0F);
|
||||
|
||||
return (ns * 100 + ns10 * 10);
|
||||
}
|
||||
|
||||
/*
|
||||
* translate ns coding of SPD timing values
|
||||
* into 10 ps unit values
|
||||
*/
|
||||
static inline unsigned short NSto10PS (unsigned char spd_byte)
|
||||
{
|
||||
return (spd_byte * 100);
|
||||
}
|
||||
|
||||
|
||||
long detect_sdram (uint8 * rom, int dimmNum, struct dimm_bank *banks)
|
||||
{
|
||||
int dimm_address = (dimmNum == 0) ? SM_DIMM0_ADDR : SM_DIMM1_ADDR;
|
||||
uint32 busclock = gd->bus_clk;
|
||||
uint32 memclock = busclock;
|
||||
uint32 tmemclock = 1000000000 / (memclock / 100);
|
||||
uint32 datawidth;
|
||||
|
||||
if (sm_get_data (rom, dimm_address) == 0) {
|
||||
/* Nothing in slot, make both banks empty */
|
||||
debug ("Slot %d: vacant\n", dimmNum);
|
||||
banks[0].used = 0;
|
||||
banks[1].used = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (rom[2] != 0x04) {
|
||||
debug ("Slot %d: No SDRAM\n", dimmNum);
|
||||
banks[0].used = 0;
|
||||
banks[1].used = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Determine number of banks/rows */
|
||||
if (rom[5] == 1) {
|
||||
banks[0].used = 1;
|
||||
banks[1].used = 0;
|
||||
} else {
|
||||
banks[0].used = 1;
|
||||
banks[1].used = 1;
|
||||
}
|
||||
|
||||
/* Determine number of row addresses */
|
||||
if (rom[3] & 0xf0) {
|
||||
/* Different banks sizes */
|
||||
banks[0].rows = rom[3] & 0x0f;
|
||||
banks[1].rows = (rom[3] & 0xf0) >> 4;
|
||||
} else {
|
||||
/* Equal sized banks */
|
||||
banks[0].rows = rom[3] & 0x0f;
|
||||
banks[1].rows = banks[0].rows;
|
||||
}
|
||||
|
||||
/* Determine number of column addresses */
|
||||
if (rom[4] & 0xf0) {
|
||||
/* Different bank sizes */
|
||||
banks[0].columns = rom[4] & 0x0f;
|
||||
banks[1].columns = (rom[4] & 0xf0) >> 4;
|
||||
} else {
|
||||
banks[0].columns = rom[4] & 0x0f;
|
||||
banks[1].columns = banks[0].columns;
|
||||
}
|
||||
|
||||
/* Check Jedec revision, and modify row/column accordingly */
|
||||
if (rom[62] > 0x10) {
|
||||
if (banks[0].rows <= 3)
|
||||
banks[0].rows += 15;
|
||||
if (banks[1].rows <= 3)
|
||||
banks[1].rows += 15;
|
||||
if (banks[0].columns <= 3)
|
||||
banks[0].columns += 15;
|
||||
if (banks[0].columns <= 3)
|
||||
banks[0].columns += 15;
|
||||
}
|
||||
|
||||
/* Check registered/unregisterd */
|
||||
if (rom[21] & 0x12) {
|
||||
banks[0].registered = 1;
|
||||
banks[1].registered = 1;
|
||||
} else {
|
||||
banks[0].registered = 0;
|
||||
banks[1].registered = 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ECC
|
||||
/* Check parity/ECC */
|
||||
banks[0].ecc = (rom[11] == 0x02);
|
||||
banks[1].ecc = (rom[11] == 0x02);
|
||||
#endif
|
||||
|
||||
/* Find burst lengths supported */
|
||||
banks[0].burst_len = rom[16] & 0x8f;
|
||||
banks[1].burst_len = rom[16] & 0x8f;
|
||||
|
||||
/* Find possible cas latencies */
|
||||
banks[0].cas_lat = rom[18] & 0x7F;
|
||||
banks[1].cas_lat = rom[18] & 0x7F;
|
||||
|
||||
/* RAS/CAS latency */
|
||||
banks[0].trcd = (NSto10PS (rom[29]) + (tmemclock - 1)) / tmemclock;
|
||||
banks[1].trcd = (NSto10PS (rom[29]) + (tmemclock - 1)) / tmemclock;
|
||||
|
||||
/* Precharge latency */
|
||||
banks[0].trp = (NSto10PS (rom[27]) + (tmemclock - 1)) / tmemclock;
|
||||
banks[1].trp = (NSto10PS (rom[27]) + (tmemclock - 1)) / tmemclock;
|
||||
|
||||
/* highest CAS latency */
|
||||
banks[0].tclk_hi = NS10to10PS (rom[9]);
|
||||
banks[1].tclk_hi = NS10to10PS (rom[9]);
|
||||
|
||||
/* second highest CAS latency */
|
||||
banks[0].tclk_2hi = NS10to10PS (rom[23]);
|
||||
banks[1].tclk_2hi = NS10to10PS (rom[23]);
|
||||
|
||||
/* bank sizes */
|
||||
datawidth = rom[13] & 0x7f;
|
||||
banks[0].size =
|
||||
(1L << (banks[0].rows + banks[0].columns)) *
|
||||
/* FIXME datawidth */ 8 * rom[17];
|
||||
if (rom[13] & 0x80)
|
||||
banks[1].size = 2 * banks[0].size;
|
||||
else
|
||||
banks[1].size = (1L << (banks[1].rows + banks[1].columns)) *
|
||||
/* FIXME datawidth */ 8 * rom[17];
|
||||
|
||||
/* Refresh */
|
||||
if (rom[12] & 0x80) {
|
||||
banks[0].auto_refresh = 1;
|
||||
banks[1].auto_refresh = 1;
|
||||
} else {
|
||||
banks[0].auto_refresh = 0;
|
||||
banks[1].auto_refresh = 0;
|
||||
}
|
||||
|
||||
switch (rom[12] & 0x7f) {
|
||||
case 0:
|
||||
banks[0].refresh_time = (1562500 + (tmemclock - 1)) / tmemclock;
|
||||
banks[1].refresh_time = (1562500 + (tmemclock - 1)) / tmemclock;
|
||||
break;
|
||||
case 1:
|
||||
banks[0].refresh_time = (390600 + (tmemclock - 1)) / tmemclock;
|
||||
banks[1].refresh_time = (390600 + (tmemclock - 1)) / tmemclock;
|
||||
break;
|
||||
case 2:
|
||||
banks[0].refresh_time = (781200 + (tmemclock - 1)) / tmemclock;
|
||||
banks[1].refresh_time = (781200 + (tmemclock - 1)) / tmemclock;
|
||||
break;
|
||||
case 3:
|
||||
banks[0].refresh_time = (3125000 + (tmemclock - 1)) / tmemclock;
|
||||
banks[1].refresh_time = (3125000 + (tmemclock - 1)) / tmemclock;
|
||||
break;
|
||||
case 4:
|
||||
banks[0].refresh_time = (6250000 + (tmemclock - 1)) / tmemclock;
|
||||
banks[1].refresh_time = (6250000 + (tmemclock - 1)) / tmemclock;
|
||||
break;
|
||||
case 5:
|
||||
banks[0].refresh_time = (12500000 + (tmemclock - 1)) / tmemclock;
|
||||
banks[1].refresh_time = (12500000 + (tmemclock - 1)) / tmemclock;
|
||||
break;
|
||||
default:
|
||||
banks[0].refresh_time = 0x100; /* Default of Articia S */
|
||||
banks[1].refresh_time = 0x100;
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
printf ("\nInformation for SIMM bank %ld:\n", dimmNum);
|
||||
printf ("Number of banks: %ld\n", banks[0].used + banks[1].used);
|
||||
printf ("Number of row addresses: %ld\n", banks[0].rows);
|
||||
printf ("Number of coumns addresses: %ld\n", banks[0].columns);
|
||||
printf ("SIMM is %sregistered\n",
|
||||
banks[0].registered == 0 ? "not " : "");
|
||||
#ifdef CONFIG_ECC
|
||||
printf ("SIMM %s ECC\n",
|
||||
banks[0].ecc == 1 ? "supports" : "doesn't support");
|
||||
#endif
|
||||
printf ("Supported burst lenghts: %s %s %s %s %s\n",
|
||||
banks[0].burst_len & 0x08 ? "8" : " ",
|
||||
banks[0].burst_len & 0x04 ? "4" : " ",
|
||||
banks[0].burst_len & 0x02 ? "2" : " ",
|
||||
banks[0].burst_len & 0x01 ? "1" : " ",
|
||||
banks[0].burst_len & 0x80 ? "PAGE" : " ");
|
||||
printf ("Supported CAS latencies: %s %s %s\n",
|
||||
banks[0].cas_lat & 0x04 ? "CAS 3" : " ",
|
||||
banks[0].cas_lat & 0x02 ? "CAS 2" : " ",
|
||||
banks[0].cas_lat & 0x01 ? "CAS 1" : " ");
|
||||
printf ("RAS to CAS latency: %ld\n", banks[0].trcd);
|
||||
printf ("Precharge latency: %ld\n", banks[0].trp);
|
||||
printf ("SDRAM highest CAS latency: %ld\n", banks[0].tclk_hi);
|
||||
printf ("SDRAM 2nd highest CAS latency: %ld\n", banks[0].tclk_2hi);
|
||||
printf ("SDRAM data width: %ld\n", datawidth);
|
||||
printf ("Auto Refresh %ssupported\n",
|
||||
banks[0].auto_refresh ? "" : "not ");
|
||||
printf ("Refresh time: %ld clocks\n", banks[0].refresh_time);
|
||||
if (banks[0].used)
|
||||
printf ("Bank 0 size: %ld MB\n", banks[0].size / 1024 / 1024);
|
||||
if (banks[1].used)
|
||||
printf ("Bank 1 size: %ld MB\n", banks[1].size / 1024 / 1024);
|
||||
|
||||
printf ("\n");
|
||||
#endif
|
||||
|
||||
sm_term ();
|
||||
return 1;
|
||||
}
|
||||
|
||||
void select_cas (struct dimm_bank *banks, uint8 fast)
|
||||
{
|
||||
if (!banks[0].used) {
|
||||
banks[0].cas_used = 0;
|
||||
banks[0].cas_used = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (fast) {
|
||||
/* Search for fast CAS */
|
||||
uint32 i;
|
||||
uint32 c = 0x01;
|
||||
|
||||
for (i = 1; i < 5; i++) {
|
||||
if (banks[0].cas_lat & c) {
|
||||
banks[0].cas_used = i;
|
||||
banks[1].cas_used = i;
|
||||
debug ("Using CAS %d (fast)\n", i);
|
||||
return;
|
||||
}
|
||||
c <<= 1;
|
||||
}
|
||||
|
||||
/* Default to CAS 3 */
|
||||
banks[0].cas_used = 3;
|
||||
banks[1].cas_used = 3;
|
||||
debug ("Using CAS 3 (fast)\n");
|
||||
|
||||
return;
|
||||
} else {
|
||||
/* Search for slow cas */
|
||||
uint32 i;
|
||||
uint32 c = 0x08;
|
||||
|
||||
for (i = 4; i > 1; i--) {
|
||||
if (banks[0].cas_lat & c) {
|
||||
banks[0].cas_used = i;
|
||||
banks[1].cas_used = i;
|
||||
debug ("Using CAS %d (slow)\n", i);
|
||||
return;
|
||||
}
|
||||
c >>= 1;
|
||||
}
|
||||
|
||||
/* Default to CAS 3 */
|
||||
banks[0].cas_used = 3;
|
||||
banks[1].cas_used = 3;
|
||||
debug ("Using CAS 3 (slow)\n");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
banks[0].cas_used = 3;
|
||||
banks[1].cas_used = 3;
|
||||
debug ("Using CAS 3\n");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
uint32 get_reg_setting (uint32 banks, uint32 rows, uint32 columns, uint32 size)
|
||||
{
|
||||
uint32 i;
|
||||
|
||||
struct RowColumnSize {
|
||||
uint32 banks;
|
||||
uint32 rows;
|
||||
uint32 columns;
|
||||
uint32 size;
|
||||
uint32 register_value;
|
||||
};
|
||||
|
||||
struct RowColumnSize rcs_map[] = {
|
||||
/* Sbk Radr Cadr MB Value */
|
||||
{1, 11, 8, 8, 0x00840f00},
|
||||
{1, 11, 9, 16, 0x00925f00},
|
||||
{1, 11, 10, 32, 0x00a64f00},
|
||||
{2, 12, 8, 32, 0x00c55f00},
|
||||
{2, 12, 9, 64, 0x00d66f00},
|
||||
{2, 12, 10, 128, 0x00e77f00},
|
||||
{2, 12, 11, 256, 0x00ff8f00},
|
||||
{2, 13, 11, 512, 0x00ff9f00},
|
||||
{0, 0, 0, 0, 0x00000000}
|
||||
};
|
||||
|
||||
|
||||
i = 0;
|
||||
|
||||
while (rcs_map[i].banks != 0) {
|
||||
if (rows == rcs_map[i].rows
|
||||
&& columns == rcs_map[i].columns
|
||||
&& (size / 1024 / 1024) == rcs_map[i].size)
|
||||
return rcs_map[i].register_value;
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32 burst_to_len (uint32 support)
|
||||
{
|
||||
if (support & 0x80)
|
||||
return 0x7;
|
||||
else if (support & 0x8)
|
||||
return 0x3;
|
||||
else if (support & 0x4)
|
||||
return 0x2;
|
||||
else if (support & 0x2)
|
||||
return 0x1;
|
||||
else if (support & 0x1)
|
||||
return 0x0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
long articiaS_ram_init (void)
|
||||
{
|
||||
register uint32 i;
|
||||
register uint32 value1;
|
||||
register uint32 value2;
|
||||
uint8 rom[128];
|
||||
uint32 burst_len;
|
||||
uint32 burst_support;
|
||||
uint32 total_ram = 0;
|
||||
|
||||
struct dimm_bank banks[4]; /* FIXME: Move to initram */
|
||||
uint32 busclock = gd->bus_clk;
|
||||
uint32 memclock = busclock;
|
||||
uint32 reg32;
|
||||
uint32 refresh_clocks;
|
||||
uint8 auto_refresh;
|
||||
|
||||
memset (banks, 0, sizeof (struct dimm_bank) * 4);
|
||||
|
||||
detect_sdram (rom, 0, &banks[0]);
|
||||
detect_sdram (rom, 1, &banks[2]);
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
total_ram = total_ram + (banks[i].used * banks[i].size);
|
||||
}
|
||||
|
||||
pci_write_cfg_long (0, 0, GLOBALINFO0, 0x117430c0);
|
||||
pci_write_cfg_long (0, 0, HBUSACR0, 0x1f0100b0);
|
||||
pci_write_cfg_long (0, 0, SRAM_CR, 0x00f12000); /* Note: Might also try 0x00f10000 (original: 0x00f12000) */
|
||||
pci_write_cfg_byte (0, 0, DRAM_RAS_CTL0, 0x3f);
|
||||
pci_write_cfg_byte (0, 0, DRAM_RAS_CTL1, 0x00); /* was: 0x04); */
|
||||
pci_write_cfg_word (0, 0, DRAM_ECC0, 0x2020); /* was: 0x2400); No ECC yet */
|
||||
|
||||
/* FIXME: Move this stuff to seperate function, like setup_dimm_bank */
|
||||
if (banks[0].used) {
|
||||
value1 = get_reg_setting (banks[0].used + banks[1].used,
|
||||
banks[0].rows, banks[0].columns,
|
||||
banks[0].size);
|
||||
} else {
|
||||
value1 = 0;
|
||||
}
|
||||
|
||||
if (banks[1].used) {
|
||||
value2 = get_reg_setting (banks[0].used + banks[1].used,
|
||||
banks[1].rows, banks[1].columns,
|
||||
banks[1].size);
|
||||
} else {
|
||||
value2 = 0;
|
||||
}
|
||||
|
||||
pci_write_cfg_long (0, 0, DIMM0_B0_SCR0, value1);
|
||||
pci_write_cfg_long (0, 0, DIMM0_B1_SCR0, value2);
|
||||
|
||||
debug ("DIMM0_B0_SCR0 = 0x%08x\n", value1);
|
||||
debug ("DIMM0_B1_SCR0 = 0x%08x\n", value2);
|
||||
|
||||
if (banks[2].used) {
|
||||
value1 = get_reg_setting (banks[2].used + banks[3].used,
|
||||
banks[2].rows, banks[2].columns,
|
||||
banks[2].size);
|
||||
} else {
|
||||
value1 = 0;
|
||||
}
|
||||
|
||||
if (banks[3].used) {
|
||||
value2 = get_reg_setting (banks[2].used + banks[3].used,
|
||||
banks[3].rows, banks[3].columns,
|
||||
banks[3].size);
|
||||
} else {
|
||||
value2 = 0;
|
||||
}
|
||||
|
||||
pci_write_cfg_long (0, 0, DIMM1_B2_SCR0, value1);
|
||||
pci_write_cfg_long (0, 0, DIMM1_B3_SCR0, value2);
|
||||
|
||||
debug ("DIMM0_B2_SCR0 = 0x%08x\n", value1);
|
||||
debug ("DIMM0_B3_SCR0 = 0x%08x\n", value2);
|
||||
|
||||
pci_write_cfg_long (0, 0, DIMM2_B4_SCR0, 0);
|
||||
pci_write_cfg_long (0, 0, DIMM2_B5_SCR0, 0);
|
||||
pci_write_cfg_long (0, 0, DIMM3_B6_SCR0, 0);
|
||||
pci_write_cfg_long (0, 0, DIMM3_B7_SCR0, 0);
|
||||
|
||||
/* Determine timing */
|
||||
select_cas (&banks[0], 0);
|
||||
select_cas (&banks[2], 0);
|
||||
|
||||
/* FIXME: What about write recovery */
|
||||
/* Auto refresh Precharge */
|
||||
#if 0
|
||||
reg32 = (0x3 << 13) | (0x7 << 10) | ((banks[0].trp - 2) << 8) |
|
||||
/* Write recovery CAS Latency */
|
||||
(0x1 << 6) | (banks[0].cas_used << 4) |
|
||||
/* RAS/CAS latency */
|
||||
((banks[0].trcd - 1) << 0);
|
||||
|
||||
reg32 |= ((0x3 << 13) | (0x7 << 10) | ((banks[2].trp - 2) << 8) |
|
||||
(0x1 << 6) | (banks[2].cas_used << 4) |
|
||||
((banks[2].trcd - 1) << 0)) << 16;
|
||||
#else
|
||||
if (100000000 == gd->bus_clk)
|
||||
reg32 = 0x71737173;
|
||||
else
|
||||
reg32 = 0x69736973;
|
||||
#endif
|
||||
pci_write_cfg_long (0, 0, DIMM0_TCR0, reg32);
|
||||
debug ("DIMM0_TCR0 = 0x%08x\n", reg32);
|
||||
|
||||
/* Write default in DIMM2/3 (not used on A1) */
|
||||
pci_write_cfg_long (0, 0, DIMM2_TCR0, 0x7d737d73);
|
||||
|
||||
|
||||
/* Determine buffered/unbuffered mode for each SIMM. Uses first bank as reference (second, if present, uses the same) */
|
||||
reg32 = pci_read_cfg_long (0, 0, DRAM_GCR0);
|
||||
reg32 &= 0xFF00FFFF;
|
||||
|
||||
#if 0
|
||||
if (banks[0].used && banks[0].registered)
|
||||
reg32 |= 0x1 << 16;
|
||||
|
||||
if (banks[2].used && banks[2].registered)
|
||||
reg32 |= 0x1 << 18;
|
||||
#else
|
||||
if (banks[0].registered || banks[2].registered)
|
||||
reg32 |= 0x55 << 16;
|
||||
#endif
|
||||
pci_write_cfg_long (0, 0, DRAM_GCR0, reg32);
|
||||
debug ("DRAM_GCR0 = 0x%08x\n", reg32);
|
||||
|
||||
/* Determine refresh */
|
||||
refresh_clocks = 0xffffffff;
|
||||
auto_refresh = 1;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
if (banks[i].used) {
|
||||
if (banks[i].auto_refresh == 0)
|
||||
auto_refresh = 0;
|
||||
if (banks[i].refresh_time < refresh_clocks)
|
||||
refresh_clocks = banks[i].refresh_time;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#if 1
|
||||
/* It seems this is suggested by the ArticiaS data book */
|
||||
if (100000000 == gd->bus_clk)
|
||||
refresh_clocks = 1561;
|
||||
else
|
||||
refresh_clocks = 2083;
|
||||
#endif
|
||||
|
||||
|
||||
debug ("Refresh set to %ld clocks, auto refresh %s\n",
|
||||
refresh_clocks, auto_refresh ? "on" : "off");
|
||||
|
||||
pci_write_cfg_long (0, 0, DRAM_REFRESH0,
|
||||
(1 << 16) | (1 << 15) | (auto_refresh << 12) |
|
||||
(refresh_clocks));
|
||||
debug ("DRAM_REFRESH0 = 0x%08x\n",
|
||||
(1 << 16) | (1 << 15) | (auto_refresh << 12) |
|
||||
(refresh_clocks));
|
||||
|
||||
/* pci_write_cfg_long(0, 0, DRAM_REFRESH0, 0x00019400); */
|
||||
|
||||
/* Set mode registers */
|
||||
/* FIXME: For now, set same burst len for all modules. Dunno if that's necessary */
|
||||
/* Find a common burst len */
|
||||
burst_support = 0xff;
|
||||
|
||||
if (banks[0].used)
|
||||
burst_support = banks[0].burst_len;
|
||||
if (banks[1].used)
|
||||
burst_support = banks[1].burst_len;
|
||||
if (banks[2].used)
|
||||
burst_support = banks[2].burst_len;
|
||||
if (banks[3].used)
|
||||
burst_support = banks[3].burst_len;
|
||||
|
||||
/*
|
||||
** Mode register:
|
||||
** Bits Use
|
||||
** 0-2 Burst len
|
||||
** 3 Burst type (0 = sequential, 1 = interleave)
|
||||
** 4-6 CAS latency
|
||||
** 7-8 Operation mode (0 = default, all others invalid)
|
||||
** 9 Write burst
|
||||
** 10-11 Reserved
|
||||
**
|
||||
** Mode register burst table:
|
||||
** A2 A1 A0 lenght
|
||||
** 0 0 0 1
|
||||
** 0 0 1 2
|
||||
** 0 1 0 4
|
||||
** 0 1 1 8
|
||||
** 1 0 0 invalid
|
||||
** 1 0 1 invalid
|
||||
** 1 1 0 invalid
|
||||
** 1 1 1 page (only valid for non-interleaved)
|
||||
*/
|
||||
|
||||
burst_len = burst_to_len (burst_support);
|
||||
burst_len = 2; /* FIXME */
|
||||
|
||||
if (banks[0].used) {
|
||||
pci_write_cfg_word (0, 0, DRAM_PCR0,
|
||||
0x8000 | burst_len | (banks[0].cas_used << 4));
|
||||
debug ("Mode bank 0: 0x%08x\n",
|
||||
0x8000 | burst_len | (banks[0].cas_used << 4));
|
||||
} else {
|
||||
/* Seems to be needed to disable the bank */
|
||||
pci_write_cfg_word (0, 0, DRAM_PCR0, 0x0000 | 0x032);
|
||||
}
|
||||
|
||||
if (banks[1].used) {
|
||||
pci_write_cfg_word (0, 0, DRAM_PCR0,
|
||||
0x9000 | burst_len | (banks[1].cas_used << 4));
|
||||
debug ("Mode bank 1: 0x%08x\n",
|
||||
0x8000 | burst_len | (banks[1].cas_used << 4));
|
||||
} else {
|
||||
/* Seems to be needed to disable the bank */
|
||||
pci_write_cfg_word (0, 0, DRAM_PCR0, 0x1000 | 0x032);
|
||||
}
|
||||
|
||||
|
||||
if (banks[2].used) {
|
||||
pci_write_cfg_word (0, 0, DRAM_PCR0,
|
||||
0xa000 | burst_len | (banks[2].cas_used << 4));
|
||||
debug ("Mode bank 2: 0x%08x\n",
|
||||
0x8000 | burst_len | (banks[2].cas_used << 4));
|
||||
} else {
|
||||
/* Seems to be needed to disable the bank */
|
||||
pci_write_cfg_word (0, 0, DRAM_PCR0, 0x2000 | 0x032);
|
||||
}
|
||||
|
||||
|
||||
if (banks[3].used) {
|
||||
pci_write_cfg_word (0, 0, DRAM_PCR0,
|
||||
0xb000 | burst_len | (banks[3].cas_used << 4));
|
||||
debug ("Mode bank 3: 0x%08x\n",
|
||||
0x8000 | burst_len | (banks[3].cas_used << 4));
|
||||
} else {
|
||||
/* Seems to be needed to disable the bank */
|
||||
pci_write_cfg_word (0, 0, DRAM_PCR0, 0x3000 | 0x032);
|
||||
}
|
||||
|
||||
|
||||
pci_write_cfg_word (0, 0, 0xba, 0x00);
|
||||
|
||||
return total_ram;
|
||||
}
|
||||
|
||||
extern int drv_isa_kbd_init (void);
|
||||
|
||||
int last_stage_init (void)
|
||||
{
|
||||
drv_isa_kbd_init ();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int overwrite_console (void)
|
||||
{
|
||||
return (0);
|
||||
}
|
||||
|
||||
#define in_8 read_byte
|
||||
#define out_8 write_byte
|
||||
|
||||
static __inline__ unsigned long get_msr (void)
|
||||
{
|
||||
unsigned long msr;
|
||||
|
||||
asm volatile ("mfmsr %0":"=r" (msr):);
|
||||
|
||||
return msr;
|
||||
}
|
||||
|
||||
static __inline__ void set_msr (unsigned long msr)
|
||||
{
|
||||
asm volatile ("mtmsr %0"::"r" (msr));
|
||||
}
|
||||
|
||||
int board_early_init_f (void)
|
||||
{
|
||||
unsigned char c_value = 0;
|
||||
unsigned long msr;
|
||||
|
||||
/* Basic init of PS/2 keyboard (needed for some reason)... */
|
||||
/* Ripped from John's code */
|
||||
while ((in_8 ((unsigned char *) 0xfe000064) & 0x02) != 0);
|
||||
out_8 ((unsigned char *) 0xfe000064, 0xaa);
|
||||
while ((in_8 ((unsigned char *) 0xfe000064) & 0x01) == 0);
|
||||
c_value = in_8 ((unsigned char *) 0xfe000060);
|
||||
while ((in_8 ((unsigned char *) 0xfe000064) & 0x02) != 0);
|
||||
out_8 ((unsigned char *) 0xfe000064, 0xab);
|
||||
while ((in_8 ((unsigned char *) 0xfe000064) & 0x01) == 0);
|
||||
c_value = in_8 ((unsigned char *) 0xfe000060);
|
||||
while ((in_8 ((unsigned char *) 0xfe000064) & 0x02) != 0);
|
||||
out_8 ((unsigned char *) 0xfe000064, 0xae);
|
||||
/* while ((in_8((unsigned char *)0xfe000064) & 0x01) == 0); */
|
||||
/* c_value = in_8((unsigned char *)0xfe000060); */
|
||||
|
||||
/* Enable FPU */
|
||||
msr = get_msr ();
|
||||
set_msr (msr | MSR_FP);
|
||||
|
||||
via_calibrate_bus_freq ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
142
board/MAI/AmigaOneG3SE/articiaS.h
Normal file
142
board/MAI/AmigaOneG3SE/articiaS.h
Normal file
@@ -0,0 +1,142 @@
|
||||
#ifndef ARTICIAS_H
|
||||
#define ARTICIAS_H
|
||||
|
||||
#include "short_types.h"
|
||||
#include <common.h>
|
||||
|
||||
#define REG_GROUP 0xF0
|
||||
|
||||
/* ArticiaS registers */
|
||||
#define GLOBALINFO0 0x50
|
||||
#define GLOBALINFO1 0x51
|
||||
#define GLOBALINFO2 0x52
|
||||
#define GLOBALINFO3 0x53
|
||||
#define GLOBALCTL0 0x54
|
||||
#define GLOBALCTL1 0x55
|
||||
#define NVRAMCTL 0x56
|
||||
#define PCI1ACR0 0x58
|
||||
#define PCI1ACR1 0x59
|
||||
#define PCI1ACR2 0x5a
|
||||
#define PCI1ACR3 0x5b
|
||||
#define HBUSACR0 0x5c
|
||||
#define HBUSACR1 0x5d
|
||||
#define HBUSACR2 0x5e
|
||||
#define HBUSACR3 0x5f
|
||||
#define HOSTINT0 0x68
|
||||
#define HOSTINT1 0x69
|
||||
#define HOSTINT2 0x6a
|
||||
#define HOSTINT3 0x6b
|
||||
#define HOSTRBCR 0x70
|
||||
#define XDBCR 0x74
|
||||
|
||||
#define LBSBCR2 0xd2
|
||||
|
||||
|
||||
/* Memory controller */
|
||||
|
||||
#define DIMM0_B0_SCR0 0x90
|
||||
#define DIMM0_B1_SCR0 0x94
|
||||
#define DIMM1_B2_SCR0 0x98
|
||||
#define DIMM1_B3_SCR0 0x9c
|
||||
#define DIMM2_B4_SCR0 0xa0
|
||||
#define DIMM2_B5_SCR0 0xa4
|
||||
#define DIMM3_B6_SCR0 0xa8
|
||||
#define DIMM3_B7_SCR0 0xac
|
||||
|
||||
#define DIMM0_TCR0 0xb0
|
||||
#define DIMM1_TCR0 0xb2
|
||||
#define DIMM2_TCR0 0xb4
|
||||
#define DIMM3_TCR0 0xb6
|
||||
|
||||
#define DRAM_REFRESH0 0xb8
|
||||
#define DRAM_GCR0 0xc0
|
||||
#define DRAM_PCR0 0xc6
|
||||
#define DRAM_ECC0 0xc4
|
||||
#define SRAM_CR 0xc8
|
||||
#define DRAM_RAS_CTL0 0xcc
|
||||
#define DRAM_RAS_CTL1 0xcd
|
||||
|
||||
/* Bits for REG_GROUP */
|
||||
#define REG_GROUP_MULTI (1<<1)
|
||||
#define REG_GROUP_SPECIAL (1<<3)
|
||||
#define REG_GROUP_DIAG (0x1<<4)
|
||||
#define REG_GROUP_POWER (0x2<<4)
|
||||
|
||||
|
||||
#define GLOBALINFO0_BO (1<<7)
|
||||
|
||||
|
||||
#define GLOBALINFO2_B1ARBITER (1<<6)
|
||||
|
||||
|
||||
#define HBUSACR0_CPUAPC (1<<0)
|
||||
#define HBUSACR0_NUMREQ_2 (0<<1)
|
||||
#define HBUSACR0_NUMREQ_3 (1<<1)
|
||||
#define HBUSACR0_NUMREQ_4 (2<<1)
|
||||
#define HBUSACR0_NUMREQ_MASK (7<<1)
|
||||
#define HBUSACR0_RAW (1<<6)
|
||||
#define HBUSACR0_WAIT (1<<7)
|
||||
#define HBUSACR0_RESERVED (0x30)
|
||||
|
||||
|
||||
#define HBUSACR2_BURST (1<<0)
|
||||
#define HBUSACR2_LAT (1<<1)
|
||||
|
||||
|
||||
#define HBUSACR3_LMWC_SM (1<<0)
|
||||
#define HBUSACR3_LMWC_PCI1 (1<<1)
|
||||
#define HBUSACR3_LMWC_PCI0 (1<<2)
|
||||
#define HBUSACR3_PMWC_PCI1 (1<<3)
|
||||
#define HBUSACR3_PMWC_PCI0 (1<<4)
|
||||
#define HBUSACR3_FKH (1<<5)
|
||||
#define HBUSACR3_92H_EN (1<<6)
|
||||
#define HBUSACR3_60H_64H_EN (1<<7)
|
||||
|
||||
|
||||
#define HOSTRBCR_PREFETCH (1<<4)
|
||||
|
||||
|
||||
#define XDBCR_HWTOXD (1<<0)
|
||||
#define XDBCR_KBTOXD (1<<1)
|
||||
#define XDBCR_RTCTOXD (1<<2)
|
||||
#define XDBCR_SCALE_1_1 (0x0<<3)
|
||||
#define XDBCR_SCALE_2_2 (0x1<<3)
|
||||
#define XDBCR_SCALE_3_2 (0x2<<3)
|
||||
#define XDBCR_SCALE_4_4 (0x3<<3)
|
||||
#define XDBCR_SCALE_5_8 (0x4<<3)
|
||||
#define XDBCR_SCALE_6_8 (0x5<<3)
|
||||
#define XDBCR_SCALE_8_8 (0x6<<3)
|
||||
#define XDBCR_SCALE_0_16 (0x7<<3)
|
||||
#define XDBCR_XDPROM (1<<7)
|
||||
|
||||
|
||||
#define LBSBCR2_1_RWAC (1<<2)
|
||||
|
||||
|
||||
/* PCI controller */
|
||||
#define ARTICIAS_PCI_CFGADDR 0xfec00cf8
|
||||
#define ARTICIAS_PCI_CFGDATA 0xfee00cfc
|
||||
|
||||
#define ARTICIAS_PCI_BUS 0x80000000
|
||||
#define ARTICIAS_PCI_MAXSIZE 0x7cffffff
|
||||
#define ARTICIAS_PCI_PHYS 0x80000000
|
||||
|
||||
#define ARTICIAS_SYS_BUS 0x00000000
|
||||
#define ARTICIAS_SYS_MAXSIZE 0x7fffffff
|
||||
#define ARTICIAS_SYS_PHYS 0x00000000
|
||||
|
||||
#define ARTICIAS_PCIIO_BUS 0x00800000
|
||||
#define ARTICIAS_PCIIO_MAXSIZE 0x003fffff
|
||||
#define ARTICIAS_PCIIO_PHYS 0xfe800000
|
||||
|
||||
#define ARTICIAS_ISAIO_BUS 0x00002000
|
||||
#define ARTICIAS_ISAIO_MAXSIZE 0x0000d000
|
||||
#define ARTICIAS_ISAIO_PHYS 0xfe002000
|
||||
|
||||
|
||||
/* Prototypes */
|
||||
long articiaS_ram_init(void);
|
||||
void articiaS_pci_init(void);
|
||||
|
||||
|
||||
#endif
|
||||
576
board/MAI/AmigaOneG3SE/articiaS_pci.c
Normal file
576
board/MAI/AmigaOneG3SE/articiaS_pci.c
Normal file
@@ -0,0 +1,576 @@
|
||||
/*
|
||||
* (C) Copyright 2002
|
||||
* Hyperion Entertainment, Hans-JoergF@hyperion-entertainment.com
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <pci.h>
|
||||
#include "memio.h"
|
||||
#include "articiaS.h"
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
#undef ARTICIA_PCI_DEBUG
|
||||
|
||||
#ifdef ARTICIA_PCI_DEBUG
|
||||
#define PRINTF(fmt,args...) printf (fmt ,##args)
|
||||
#else
|
||||
#define PRINTF(fmt,args...)
|
||||
#endif
|
||||
|
||||
struct pci_controller articiaS_hose;
|
||||
|
||||
long irq_alloc(long wanted);
|
||||
|
||||
static pci_dev_t pci_hose_find_class(struct pci_controller *hose, int bus, short find_class, int index);
|
||||
static int articiaS_init_vga(void);
|
||||
static void pci_cfgfunc_dummy(struct pci_controller *host, pci_dev_t dev, struct pci_config_table *table);
|
||||
unsigned char pci_irq_alloc(void);
|
||||
|
||||
extern void via_cfgfunc_via686(struct pci_controller * host, pci_dev_t dev, struct pci_config_table *table);
|
||||
extern void via_cfgfunc_ide_init(struct pci_controller *host, pci_dev_t dev, struct pci_config_table *table);
|
||||
extern void via_init_irq_routing(uint8 []);
|
||||
extern void via_init_afterscan(void);
|
||||
|
||||
#define cfgfunc_via686 1
|
||||
#define cfgfunc_dummy 2
|
||||
#define cfgfunc_ide_init 3
|
||||
|
||||
static struct pci_config_table config_table[] =
|
||||
{
|
||||
{
|
||||
0x1106, PCI_ANY_ID, PCI_CLASS_BRIDGE_ISA, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
|
||||
(void *)cfgfunc_via686, {0, 0, 0}
|
||||
},
|
||||
{
|
||||
0x1106, PCI_ANY_ID, PCI_ANY_ID, 0,7,4,
|
||||
(void *)cfgfunc_dummy, {0,0,0}
|
||||
},
|
||||
{
|
||||
0x1106, 0x3068, PCI_ANY_ID, 0, 7, PCI_ANY_ID,
|
||||
(void *)cfgfunc_dummy, {0,0,0}
|
||||
},
|
||||
{
|
||||
0x1106, PCI_ANY_ID, PCI_ANY_ID, 0,7,1,
|
||||
(void *)cfgfunc_ide_init, {0,0,0}
|
||||
},
|
||||
{
|
||||
0,
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
void pci_cfgfunc_dummy(struct pci_controller *host, pci_dev_t dev, struct pci_config_table *table)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
unsigned long irq_penalties[16] =
|
||||
{
|
||||
1000, /* 0:timer */
|
||||
1000, /* 1:keyboard */
|
||||
1000, /* 2:cascade */
|
||||
50, /* 3:serial (COM2) */
|
||||
50, /* 4:serial (COM1) */
|
||||
4, /* 5:USB2 */
|
||||
100, /* 6:floppy */
|
||||
3, /* 7:parallel */
|
||||
50, /* 8:AC97/MC97 */
|
||||
0, /* 9: */
|
||||
3, /* 10:: */
|
||||
0, /* 11: */
|
||||
3, /* 12: USB1 */
|
||||
0, /* 13: */
|
||||
100, /* 14: ide0 */
|
||||
100, /* 15: ide1 */
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* The following defines a hard-coded interrupt mapping for the
|
||||
* know devices on the board.
|
||||
* If a device isn't found here, assumed to be a device that's
|
||||
* plugged into a PCI or AGP slot
|
||||
* NOTE: This table is machine dependant.
|
||||
*/
|
||||
|
||||
struct pci_irq_fixup_table
|
||||
{
|
||||
uint8 bus; /* Bus number */
|
||||
uint8 device; /* Device number */
|
||||
uint8 func; /* Function number */
|
||||
uint8 interrupt; /* Interrupt to use (0xff to disable) */
|
||||
};
|
||||
|
||||
struct pci_irq_fixup_table fixuptab [] =
|
||||
{
|
||||
{ 0, 0, 0, 0xff}, /* Articia S host bridge */
|
||||
{ 0, 1, 0, 0xff}, /* Articia S AGP bridge */
|
||||
/* { 0, 6, 0, 0x05}, /###* 3COM ethernet */
|
||||
{ 0, 7, 0, 0xff}, /* VIA southbridge */
|
||||
{ 0, 7, 1, 0x0e}, /* IDE controller in legacy mode */
|
||||
/* { 0, 7, 2, 0x05}, /###* First USB controller */
|
||||
/* { 0, 7, 3, 0x0c}, /###* Second USB controller (shares interrupt with ethernet) */
|
||||
{ 0, 7, 4, 0xff}, /* ACPI Power Management */
|
||||
/* { 0, 7, 5, 0x08}, /###* AC97 */
|
||||
/* { 0, 7, 6, 0x08}, /###* MC97 */
|
||||
{ 0xff, 0xff, 0xff, 0xff}
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* This table maps IRQ's to PCI interrupts
|
||||
*/
|
||||
|
||||
uint8 pci_intmap[4] = {0, 0, 0, 0};
|
||||
|
||||
/*
|
||||
* Map PCI slots to interrupt routings
|
||||
* This table lists the device number assigned to a card inserted
|
||||
* into the slot, along with a permutation for the slot's IRQ routing.
|
||||
* NOTE: This table is machine dependant.
|
||||
*/
|
||||
|
||||
struct pci_slot_irq_routing
|
||||
{
|
||||
uint8 bus;
|
||||
uint8 device;
|
||||
|
||||
uint8 ints[4];
|
||||
};
|
||||
|
||||
struct pci_slot_irq_routing amigaone_pci_routing[] =
|
||||
{
|
||||
{0, 8, {0, 1, 2, 3}}, /* Slot 1 (left of riser slot) */
|
||||
{0, 9, {1, 2, 3, 0}}, /* Slot 2 (middle slot) */
|
||||
{0, 10, {2, 3, 0, 1}}, /* Slot 3 (leftmost slot) */
|
||||
{1, 0, {1, 0, 2, 3}}, /* AGP slot (only IRQA and IRQB) */
|
||||
{1, 1, {1, 2, 3, 0}}, /* PCI slot on AGP bus */
|
||||
{0, 6, {3, 3, 3, 3}}, /* On board ethernet */
|
||||
{0, 7, {0, 1, 2, 3}}, /* Southbridge */
|
||||
{0xff, 0, {0, 0, 0, 0}}
|
||||
};
|
||||
|
||||
void articiaS_pci_irq_init(void)
|
||||
{
|
||||
char *s;
|
||||
|
||||
s = getenv("pci_irqa");
|
||||
if (s)
|
||||
pci_intmap[0] = simple_strtoul (s, NULL, 10);
|
||||
else
|
||||
pci_intmap[0] = pci_irq_alloc();
|
||||
|
||||
s = getenv("pci_irqb");
|
||||
if (s)
|
||||
pci_intmap[1] = simple_strtoul (s, NULL, 10);
|
||||
else
|
||||
pci_intmap[1] = pci_irq_alloc();
|
||||
|
||||
s = getenv("pci_irqc");
|
||||
if (s)
|
||||
pci_intmap[2] = simple_strtoul (s, NULL, 10);
|
||||
else
|
||||
pci_intmap[2] = pci_irq_alloc();
|
||||
|
||||
s = getenv("pci_irqd");
|
||||
if (s)
|
||||
pci_intmap[3] = simple_strtoul (s, NULL, 10);
|
||||
else
|
||||
pci_intmap[3] = pci_irq_alloc();
|
||||
}
|
||||
|
||||
|
||||
unsigned char pci_irq_alloc(void)
|
||||
{
|
||||
int i;
|
||||
int interrupt = 10;
|
||||
unsigned long min_penalty = 1000;
|
||||
|
||||
/* Search for the minimal penalty, favoring interrupts at the end */
|
||||
for (i = 0; i < 16; i++)
|
||||
{
|
||||
if (irq_penalties[i] <= min_penalty)
|
||||
{
|
||||
interrupt = i;
|
||||
min_penalty = irq_penalties[i];
|
||||
}
|
||||
}
|
||||
|
||||
PRINTF("pci_irq_alloc: Minimal penalty is %ld for %d\n", min_penalty, interrupt);
|
||||
|
||||
irq_penalties[interrupt]++;
|
||||
|
||||
return interrupt;
|
||||
}
|
||||
|
||||
|
||||
void articiaS_pci_fixup_irq(struct pci_controller *hose, pci_dev_t dev)
|
||||
{
|
||||
int8 bus, device, func, pin, line;
|
||||
int i;
|
||||
|
||||
bus = PCI_BUS(dev);
|
||||
device = PCI_DEV(dev);
|
||||
func = PCI_FUNC(dev);
|
||||
|
||||
PRINTF("Fixup irq of %d:%d.%d\n", bus, device, func);
|
||||
|
||||
/* Search for the device in the table */
|
||||
for (i = 0; fixuptab[i].bus != 0xff; i++)
|
||||
{
|
||||
if (bus == fixuptab[i].bus && device == fixuptab[i].device && func == fixuptab[i].func)
|
||||
{
|
||||
/* If the device needs an interrupt, write it */
|
||||
if (fixuptab[i].interrupt != 0xff)
|
||||
{
|
||||
PRINTF("Assigning IRQ %d (fixed)\n", fixuptab[i].interrupt);
|
||||
pci_write_config_byte(dev, PCI_INTERRUPT_LINE, fixuptab[i].interrupt);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Otherwise, see if it wants an interrupt, and disable it if needed */
|
||||
pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
|
||||
if (pin)
|
||||
{
|
||||
PRINTF("Disabling IRQ\n");
|
||||
pci_write_config_byte(dev, PCI_INTERRUPT_LINE, 0xff);
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* If we get here, we have another PCI device in a slot... find the appropriate IRQ */
|
||||
|
||||
/* Find matching pin */
|
||||
pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
|
||||
pin--;
|
||||
|
||||
/* Search for it's map */
|
||||
for (i = 0; amigaone_pci_routing[i].bus != 0xff; i++)
|
||||
{
|
||||
if (bus == amigaone_pci_routing[i].bus && device == amigaone_pci_routing[i].device)
|
||||
{
|
||||
line = pci_intmap[amigaone_pci_routing[i].ints[pin]];
|
||||
PRINTF("Assigning IRQ %d (pin %d)\n", line, pin);
|
||||
pci_write_config_byte(dev, PCI_INTERRUPT_LINE, line);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
PRINTF("Unkonwn PCI device found\n");
|
||||
}
|
||||
|
||||
void articiaS_pci_init (void)
|
||||
{
|
||||
int i;
|
||||
char *s;
|
||||
|
||||
PRINTF("atriciaS_pci_init\n");
|
||||
|
||||
/* Why aren't these relocated?? */
|
||||
for (i=0; config_table[i].config_device; i++)
|
||||
{
|
||||
switch((int)config_table[i].config_device)
|
||||
{
|
||||
case cfgfunc_via686: config_table[i].config_device = via_cfgfunc_via686; break;
|
||||
case cfgfunc_dummy: config_table[i].config_device = pci_cfgfunc_dummy; break;
|
||||
case cfgfunc_ide_init: config_table[i].config_device = via_cfgfunc_ide_init; break;
|
||||
default: PRINTF("Error: Unknown constant\n");
|
||||
}
|
||||
}
|
||||
|
||||
articiaS_hose.first_busno = 0;
|
||||
articiaS_hose.last_busno = 0xff;
|
||||
articiaS_hose.config_table = config_table;
|
||||
articiaS_hose.fixup_irq = articiaS_pci_fixup_irq;
|
||||
|
||||
articiaS_pci_irq_init();
|
||||
|
||||
/* System memory */
|
||||
pci_set_region(articiaS_hose.regions + 0,
|
||||
ARTICIAS_SYS_BUS,
|
||||
ARTICIAS_SYS_PHYS,
|
||||
ARTICIAS_SYS_MAXSIZE,
|
||||
PCI_REGION_MEM | PCI_REGION_MEMORY);
|
||||
|
||||
/* PCI memory space */
|
||||
pci_set_region(articiaS_hose.regions + 1,
|
||||
ARTICIAS_PCI_BUS,
|
||||
ARTICIAS_PCI_PHYS,
|
||||
ARTICIAS_PCI_MAXSIZE,
|
||||
PCI_REGION_MEM);
|
||||
|
||||
/* PCI io space */
|
||||
pci_set_region(articiaS_hose.regions + 2,
|
||||
ARTICIAS_PCIIO_BUS,
|
||||
ARTICIAS_PCIIO_PHYS,
|
||||
ARTICIAS_PCIIO_MAXSIZE,
|
||||
PCI_REGION_IO);
|
||||
|
||||
/* PCI/ISA io space */
|
||||
pci_set_region(articiaS_hose.regions + 3,
|
||||
ARTICIAS_ISAIO_BUS,
|
||||
ARTICIAS_ISAIO_PHYS,
|
||||
ARTICIAS_ISAIO_MAXSIZE,
|
||||
PCI_REGION_IO);
|
||||
|
||||
|
||||
articiaS_hose.region_count = 4;
|
||||
|
||||
pci_setup_indirect(&articiaS_hose, ARTICIAS_PCI_CFGADDR, ARTICIAS_PCI_CFGDATA);
|
||||
PRINTF("Registering articia hose...\n");
|
||||
pci_register_hose(&articiaS_hose);
|
||||
PRINTF("Enabling AGP...\n");
|
||||
pci_write_config_byte(PCI_BDF(0,0,0), 0x58, 0x01);
|
||||
PRINTF("Scanning bus...\n");
|
||||
articiaS_hose.last_busno = pci_hose_scan(&articiaS_hose);
|
||||
|
||||
via_init_irq_routing(pci_intmap);
|
||||
|
||||
PRINTF("After-Scan results:\n");
|
||||
PRINTF("Bus range: %d - %d\n", articiaS_hose.first_busno , articiaS_hose.last_busno);
|
||||
|
||||
via_init_afterscan();
|
||||
|
||||
pci_write_config_byte(PCI_BDF(0,1,0), PCI_INTERRUPT_LINE, 0xFF);
|
||||
|
||||
s = getenv("as_irq");
|
||||
if (s)
|
||||
{
|
||||
pci_write_config_byte(PCI_BDF(0,0,0), PCI_INTERRUPT_LINE, simple_strtoul (s, NULL, 10));
|
||||
}
|
||||
|
||||
s = getenv("x86_run_bios");
|
||||
if (!s || (s && strcmp(s, "on")==0))
|
||||
{
|
||||
if (articiaS_init_vga() == -1)
|
||||
{
|
||||
/* If the VGA didn't init and we have stdout set to VGA, reset to serial */
|
||||
/* s = getenv("stdout"); */
|
||||
/* if (s && strcmp(s, "vga") == 0) */
|
||||
/* { */
|
||||
/* setenv("stdout", "serial"); */
|
||||
/* } */
|
||||
}
|
||||
}
|
||||
pci_write_config_byte(PCI_BDF(0,1,0), PCI_INTERRUPT_LINE, 0xFF);
|
||||
|
||||
}
|
||||
|
||||
pci_dev_t pci_hose_find_class(struct pci_controller *hose, int bus, short find_class, int index)
|
||||
{
|
||||
unsigned int sub_bus, found_multi=0;
|
||||
unsigned short vendor, class;
|
||||
unsigned char header_type;
|
||||
pci_dev_t dev;
|
||||
u8 c1, c2;
|
||||
|
||||
sub_bus = bus;
|
||||
|
||||
for (dev = PCI_BDF(bus,0,0);
|
||||
dev < PCI_BDF(bus,PCI_MAX_PCI_DEVICES-1,PCI_MAX_PCI_FUNCTIONS-1);
|
||||
dev += PCI_BDF(0,0,1))
|
||||
{
|
||||
if ( dev == PCI_BDF(hose->first_busno,0,0) )
|
||||
continue;
|
||||
|
||||
if (PCI_FUNC(dev) && !found_multi)
|
||||
continue;
|
||||
|
||||
pci_hose_read_config_byte(hose, dev, PCI_HEADER_TYPE, &header_type);
|
||||
|
||||
pci_hose_read_config_word(hose, dev, PCI_VENDOR_ID, &vendor);
|
||||
|
||||
if (vendor != 0xffff && vendor != 0x0000)
|
||||
{
|
||||
|
||||
if (!PCI_FUNC(dev))
|
||||
found_multi = header_type & 0x80;
|
||||
pci_hose_read_config_byte(hose, dev, 0x0B, &c1);
|
||||
pci_hose_read_config_byte(hose, dev, 0x0A, &c2);
|
||||
class = c1<<8 | c2;
|
||||
/*printf("At %02x:%02x:%02x: class %x\n", */
|
||||
/* PCI_BUS(dev), PCI_DEV(dev), PCI_FUNC(dev), class); */
|
||||
if (class == find_class)
|
||||
{
|
||||
if (index == 0)
|
||||
return dev;
|
||||
else index--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ~0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* For a given bus number, find the bridge on this hose that provides this
|
||||
* bus number. The function scans for bridges and peeks config space offset
|
||||
* 0x19 (PCI_SECONDARY_BUS).
|
||||
*/
|
||||
pci_dev_t pci_find_bridge_for_bus(struct pci_controller *hose, int busnr)
|
||||
{
|
||||
pci_dev_t dev;
|
||||
int bus;
|
||||
unsigned int found_multi=0;
|
||||
unsigned char header_type;
|
||||
unsigned short vendor;
|
||||
unsigned char secondary_bus;
|
||||
|
||||
if (hose == NULL) hose = &articiaS_hose;
|
||||
|
||||
if (busnr < hose->first_busno || busnr > hose->last_busno) return PCI_ANY_ID; /* Not in range */
|
||||
|
||||
/*
|
||||
* The bridge must be on a lower bus number
|
||||
*/
|
||||
for (bus = hose->first_busno; bus < busnr; bus++)
|
||||
{
|
||||
for (dev = PCI_BDF(bus,0,0);
|
||||
dev < PCI_BDF(bus,PCI_MAX_PCI_DEVICES-1,PCI_MAX_PCI_FUNCTIONS-1);
|
||||
dev += PCI_BDF(0,0,1))
|
||||
{
|
||||
if ( dev == PCI_BDF(hose->first_busno,0,0) )
|
||||
continue;
|
||||
|
||||
if (PCI_FUNC(dev) && !found_multi)
|
||||
continue;
|
||||
|
||||
pci_hose_read_config_byte(hose, dev, PCI_HEADER_TYPE, &header_type);
|
||||
|
||||
pci_hose_read_config_word(hose, dev, PCI_VENDOR_ID, &vendor);
|
||||
|
||||
if (vendor != 0xffff && vendor != 0x0000)
|
||||
{
|
||||
|
||||
if (!PCI_FUNC(dev))
|
||||
found_multi = header_type & 0x80;
|
||||
if (header_type == 1) /* Bridge device header */
|
||||
{
|
||||
pci_hose_read_config_byte(hose, dev, PCI_SECONDARY_BUS, &secondary_bus);
|
||||
if ((int)secondary_bus == busnr) return dev;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
return PCI_ANY_ID;
|
||||
}
|
||||
|
||||
static short classes[] =
|
||||
{
|
||||
PCI_CLASS_DISPLAY_VGA,
|
||||
PCI_CLASS_DISPLAY_XGA,
|
||||
PCI_CLASS_DISPLAY_3D,
|
||||
PCI_CLASS_DISPLAY_OTHER,
|
||||
~0
|
||||
};
|
||||
|
||||
extern int execute_bios(pci_dev_t gr_dev, void *);
|
||||
|
||||
pci_dev_t video_dev;
|
||||
|
||||
int articiaS_init_vga (void)
|
||||
{
|
||||
extern void shutdown_bios(void);
|
||||
pci_dev_t dev = ~0;
|
||||
int busnr = 0;
|
||||
int classnr = 0;
|
||||
|
||||
video_dev = PCI_ANY_ID;
|
||||
|
||||
printf("VGA: ");
|
||||
|
||||
PRINTF("Trying to initialize x86 VGA Card(s)\n");
|
||||
|
||||
while (dev == ~0)
|
||||
{
|
||||
PRINTF("Searching for class 0x%x on bus %d\n", classes[classnr], busnr);
|
||||
/* Find the first of this class on this bus */
|
||||
dev = pci_hose_find_class(&articiaS_hose, busnr, classes[classnr], 0);
|
||||
if (dev != ~0)
|
||||
{
|
||||
PRINTF("Found VGA Card at %02x:%02x:%02x\n", PCI_BUS(dev), PCI_DEV(dev), PCI_FUNC(dev));
|
||||
break;
|
||||
}
|
||||
busnr++;
|
||||
if (busnr > articiaS_hose.last_busno)
|
||||
{
|
||||
busnr = 0;
|
||||
classnr ++;
|
||||
if (classes[classnr] == ~0)
|
||||
{
|
||||
printf("NOT PRESENT\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* If we get here we have found the first graphics card.
|
||||
* If the bus number is not 0, then it is probably behind a bridge, and the
|
||||
* bridge needs to be told to forward VGA access.
|
||||
*/
|
||||
|
||||
if (PCI_BUS(dev) != 0)
|
||||
{
|
||||
pci_dev_t bridge;
|
||||
PRINTF("Behind bridge, looking for bridge\n");
|
||||
bridge = pci_find_bridge_for_bus(&articiaS_hose, PCI_BUS(dev));
|
||||
if (dev != PCI_ANY_ID)
|
||||
{
|
||||
unsigned char agp_control_0;
|
||||
PRINTF("Got the bridge at %02x:%02x:%02x\n",
|
||||
PCI_BUS(bridge), PCI_DEV(bridge), PCI_FUNC(bridge));
|
||||
pci_hose_read_config_byte(&articiaS_hose, bridge, 0x3E, &agp_control_0);
|
||||
agp_control_0 |= 0x18;
|
||||
pci_hose_write_config_byte(&articiaS_hose, bridge, 0x3E, agp_control_0);
|
||||
PRINTF("Configured for VGA forwarding\n");
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Now try to run the bios
|
||||
*/
|
||||
PRINTF("Trying to run bios now\n");
|
||||
if (execute_bios(dev, gd->relocaddr))
|
||||
{
|
||||
printf("OK\n");
|
||||
video_dev = dev;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("ERROR\n");
|
||||
}
|
||||
|
||||
PRINTF("Done scanning.\n");
|
||||
|
||||
shutdown_bios();
|
||||
|
||||
if (dev == PCI_ANY_ID) return -1;
|
||||
else return 0;
|
||||
|
||||
}
|
||||
156
board/MAI/AmigaOneG3SE/board_asm_init.S
Normal file
156
board/MAI/AmigaOneG3SE/board_asm_init.S
Normal file
@@ -0,0 +1,156 @@
|
||||
#include "macros.h"
|
||||
|
||||
|
||||
#define GLOBALINFO0 0x50
|
||||
#define GLOBALINFO0_BO (1<<7)
|
||||
#define GLOBALINFO2_B1ARBITER (1<<6)
|
||||
#define HBUSACR0 0x5c
|
||||
#define HBUSACR2_BURST (1<<0)
|
||||
#define HBUSACR2_LAT (1<<1)
|
||||
|
||||
#define RECEIVER_HOLDING 0
|
||||
#define TRANSMITTER_HOLDING 0
|
||||
#define INTERRUPT_ENABLE 1
|
||||
#define INTERRUPT_STATUS 2
|
||||
#define FIFO_CONTROL 2
|
||||
#define LINE_CONTROL 3
|
||||
#define MODEM_CONTROL 4
|
||||
#define LINE_STATUS 5
|
||||
#define MODEM_STATUS 6
|
||||
#define SCRATCH_PAD 7
|
||||
|
||||
#define DIVISOR_LATCH_LSB 0
|
||||
#define DIVISOR_LATCH_MSB 1
|
||||
#define PRESCALER_DIVISION 5
|
||||
|
||||
#define UART(x) (0x3f8+(x))
|
||||
|
||||
#define GLOBALINFO0 0x50
|
||||
#define GLOBALINFO0_BO (1<<7)
|
||||
#define GLOBALINFO2_B1ARBITER (1<<6)
|
||||
#define HBUSACR0 0x5c
|
||||
#define HBUSACR2_BURST (1<<0)
|
||||
#define HBUSACR2_LAT (1<<1)
|
||||
|
||||
#define SUPERIO_1 ((7 << 3) | (0))
|
||||
#define SUPERIO_2 ((7 << 3) | (1))
|
||||
|
||||
.globl board_asm_init
|
||||
|
||||
board_asm_init:
|
||||
mflr r29
|
||||
/* Set 'Must-set' register */
|
||||
li r3, 0
|
||||
li r4, 0
|
||||
li r5, 0x5e
|
||||
bl pci_read_cfg_byte
|
||||
ori r3, r3, (1<<1)
|
||||
xori r6, r3, (1<<1)
|
||||
li r3, 0
|
||||
bl pci_write_cfg_byte
|
||||
|
||||
li r3, 0
|
||||
li r5, 0x52
|
||||
bl pci_read_cfg_byte
|
||||
ori r6, r3, (1<<6)
|
||||
li r3, 0
|
||||
bl pci_write_cfg_byte
|
||||
|
||||
li r3, 0
|
||||
li r4, 0x08
|
||||
li r5, 0xd2
|
||||
bl pci_read_cfg_byte
|
||||
ori r6, r3, (1<<2)
|
||||
li r3, 0
|
||||
bl pci_write_cfg_byte
|
||||
|
||||
|
||||
/* Do PCI reset */
|
||||
/* li r3, 0
|
||||
li r4, 0x38
|
||||
li r5, 0x47
|
||||
bl pci_read_cfg_byte
|
||||
ori r6, r3, 0x01
|
||||
li r3, 0
|
||||
li r4, 0x38
|
||||
li r5, 0x47
|
||||
bl pci_write_cfg_byte*/
|
||||
|
||||
|
||||
/* Enable NVRAM for environment */
|
||||
li r3, 0
|
||||
li r4, 0
|
||||
li r5, 0x56
|
||||
li r6, 0x0B
|
||||
bl pci_write_cfg_byte
|
||||
|
||||
|
||||
/* Init Super-I/O chips */
|
||||
|
||||
siowb 0x40, 0x08
|
||||
siowb 0x41, 0x01
|
||||
siowb 0x45, 0x80
|
||||
siowb 0x46, 0x60
|
||||
siowb 0x47, 0x20
|
||||
siowb 0x48, 0x01
|
||||
siowb 0x4a, 0xc4
|
||||
siowb 0x50, 0x0e
|
||||
siowb 0x51, 0x76
|
||||
siowb 0x52, 0x34
|
||||
siowb 0x54, 0x00
|
||||
siowb 0x55, 0x90
|
||||
siowb 0x56, 0x99
|
||||
siowb 0x57, 0x90
|
||||
siowb 0x85, 0x01
|
||||
|
||||
/* Enable configuration mode for SuperIO */
|
||||
li r3, 0
|
||||
li r4, (7<<3)
|
||||
li r5, 0x85
|
||||
bl pci_read_cfg_byte
|
||||
ori r6, r3, 0x02
|
||||
mr r31, r6
|
||||
li r3,0
|
||||
bl pci_write_cfg_byte
|
||||
|
||||
/* COM1 as 3f8 */
|
||||
outb 0x3f0, 0xe7
|
||||
outb 0x3f1, 0xfe
|
||||
|
||||
/* COM2 as 2f8 */
|
||||
outb 0x3f0, 0xe8
|
||||
outb 0x3f1, 0xeb
|
||||
|
||||
/* Enable */
|
||||
outb 0x3f0, 0xe2
|
||||
inb r3, 0x3f1
|
||||
ori r3, r3, 0x0c
|
||||
outb 0x3f0, 0xe2
|
||||
outbr 0x3f1, r3
|
||||
|
||||
/* Disable configuration mode */
|
||||
li r3, 0
|
||||
li r4, (7<<3)
|
||||
li r5, 0x85
|
||||
mr r6, r31
|
||||
bl pci_write_cfg_byte
|
||||
|
||||
/* Set line control */
|
||||
outb UART(LINE_CONTROL), 0x83
|
||||
outb UART(DIVISOR_LATCH_LSB), 0x0c
|
||||
outb UART(DIVISOR_LATCH_MSB), 0x00
|
||||
outb UART(LINE_CONTROL), 0x3
|
||||
|
||||
mtlr r29
|
||||
blr
|
||||
|
||||
|
||||
.globl new_reset
|
||||
.globl new_reset_end
|
||||
new_reset:
|
||||
li r0, 0x100
|
||||
oris r0, r0, 0xFFF0
|
||||
mtlr r0
|
||||
blr
|
||||
|
||||
new_reset_end:
|
||||
128
board/MAI/AmigaOneG3SE/cmd_boota.c
Normal file
128
board/MAI/AmigaOneG3SE/cmd_boota.c
Normal file
@@ -0,0 +1,128 @@
|
||||
#include <common.h>
|
||||
#include <command.h>
|
||||
#include "../disk/part_amiga.h"
|
||||
#include <asm/cache.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
#undef BOOTA_DEBUG
|
||||
|
||||
#ifdef BOOTA_DEBUG
|
||||
#define PRINTF(fmt,args...) printf (fmt ,##args)
|
||||
#else
|
||||
#define PRINTF(fmt,args...)
|
||||
#endif
|
||||
|
||||
struct block_header {
|
||||
u32 id;
|
||||
u32 summed_longs;
|
||||
s32 chk_sum;
|
||||
};
|
||||
|
||||
extern block_dev_desc_t *ide_get_dev (int dev);
|
||||
extern struct bootcode_block *get_bootcode (block_dev_desc_t * dev_desc);
|
||||
extern int sum_block (struct block_header *header);
|
||||
|
||||
struct bootcode_block bblk;
|
||||
|
||||
int do_boota (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
|
||||
{
|
||||
unsigned char *load_address = (unsigned char *) CFG_LOAD_ADDR;
|
||||
unsigned char *base_address;
|
||||
unsigned long offset;
|
||||
|
||||
unsigned long part_number = 0;
|
||||
block_dev_desc_t *boot_disk;
|
||||
char *s;
|
||||
struct bootcode_block *boot_code;
|
||||
|
||||
/* Get parameters */
|
||||
|
||||
switch (argc) {
|
||||
case 2:
|
||||
load_address = (unsigned char *) simple_strtol (argv[1], NULL, 16);
|
||||
part_number = 0;
|
||||
break;
|
||||
case 3:
|
||||
load_address = (unsigned char *) simple_strtol (argv[1], NULL, 16);
|
||||
part_number = simple_strtol (argv[2], NULL, 16);
|
||||
break;
|
||||
}
|
||||
|
||||
base_address = load_address;
|
||||
|
||||
PRINTF ("Loading boot code from disk %d to %p\n", part_number,
|
||||
load_address);
|
||||
|
||||
/* Find the appropriate disk device */
|
||||
boot_disk = ide_get_dev (part_number);
|
||||
if (!boot_disk) {
|
||||
PRINTF ("Unknown disk %d\n", part_number);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Find the bootcode block */
|
||||
boot_code = get_bootcode (boot_disk);
|
||||
if (!boot_code) {
|
||||
PRINTF ("Not a bootable disk %d\n", part_number);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Only use the offset from the first block */
|
||||
offset = boot_code->load_data[0];
|
||||
memcpy (load_address, &boot_code->load_data[1], 122 * 4);
|
||||
load_address += 122 * 4;
|
||||
|
||||
/* Setup for the loop */
|
||||
bblk.next = boot_code->next;
|
||||
boot_code = &bblk;
|
||||
|
||||
/* Scan the chain, and copy the loader succesively into the destination area */
|
||||
while (0xffffffff != boot_code->next) {
|
||||
PRINTF ("Loading block %d\n", boot_code->next);
|
||||
|
||||
/* Load block */
|
||||
if (1 !=
|
||||
boot_disk->block_read (boot_disk->dev, boot_code->next, 1,
|
||||
(ulong *) & bblk)) {
|
||||
PRINTF ("Read error\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* check sum */
|
||||
if (sum_block ((struct block_header *) (ulong *) & bblk) != 0) {
|
||||
PRINTF ("Checksum error\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Ok, concatenate it to the already loaded code */
|
||||
memcpy (load_address, boot_code->load_data, 123 * 4);
|
||||
load_address += 123 * 4;
|
||||
}
|
||||
|
||||
printf ("Bootcode loaded to %p (size %d)\n", base_address,
|
||||
load_address - base_address);
|
||||
printf ("Entry point at %p\n", base_address + offset);
|
||||
|
||||
flush_cache (base_address, load_address - base_address);
|
||||
|
||||
|
||||
s = getenv ("autostart");
|
||||
if (s && strcmp (s, "yes") == 0) {
|
||||
void (*boot) (bd_t *, char *, block_dev_desc_t *);
|
||||
char *args;
|
||||
|
||||
boot = (void (*)(bd_t *, char *, block_dev_desc_t *)) (base_address + offset);
|
||||
boot (gd->bd, getenv ("amiga_bootargs"), boot_disk);
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
#if defined(CONFIG_AMIGAONEG3SE) && defined(CONFIG_CMD_BSP)
|
||||
U_BOOT_CMD(
|
||||
boota, 3, 1, do_boota,
|
||||
"boota - boot an Amiga kernel\n",
|
||||
"address disk"
|
||||
);
|
||||
#endif /* _CMD_BOOTA_H */
|
||||
32
board/MAI/AmigaOneG3SE/config.mk
Normal file
32
board/MAI/AmigaOneG3SE/config.mk
Normal file
@@ -0,0 +1,32 @@
|
||||
#
|
||||
# (C) Copyright 2002
|
||||
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
#
|
||||
# See file CREDITS for list of people who contributed to this
|
||||
# project.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
# MA 02111-1307 USA
|
||||
#
|
||||
|
||||
#
|
||||
# AmigaOneG3SE boards
|
||||
#
|
||||
|
||||
X86EMU = -I../bios_emulator/scitech/include -I../bios_emulator/scitech/src/x86emu
|
||||
|
||||
TEXT_BASE = 0xfff00000
|
||||
|
||||
PLATFORM_CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE) -Wa,-mregnames -DEASTEREGG $(X86EMU) -Dprintk=printf #-DDEBUG
|
||||
884
board/MAI/AmigaOneG3SE/enet.c
Normal file
884
board/MAI/AmigaOneG3SE/enet.c
Normal file
@@ -0,0 +1,884 @@
|
||||
/*
|
||||
* (C) Copyright 2002
|
||||
* Adam Kowalczyk, ACK Software Controls Inc. akowalczyk@cogeco.ca
|
||||
*
|
||||
* Some portions taken from 3c59x.c Written 1996-1999 by Donald Becker.
|
||||
*
|
||||
* Outline of the program based on eepro100.c which is
|
||||
*
|
||||
* (C) Copyright 2002
|
||||
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <malloc.h>
|
||||
#include <net.h>
|
||||
#include <asm/io.h>
|
||||
#include <pci.h>
|
||||
|
||||
#include "articiaS.h"
|
||||
#include "memio.h"
|
||||
|
||||
/* 3Com Ethernet PCI definitions*/
|
||||
|
||||
/* #define PCI_VENDOR_ID_3COM 0x10B7 */
|
||||
#define PCI_DEVICE_ID_3COM_3C905C 0x9200
|
||||
|
||||
/* 3Com Commands, top 5 bits are command and bottom 11 bits are parameters */
|
||||
|
||||
#define TotalReset (0<<11)
|
||||
#define SelectWindow (1<<11)
|
||||
#define StartCoax (2<<11)
|
||||
#define RxDisable (3<<11)
|
||||
#define RxEnable (4<<11)
|
||||
#define RxReset (5<<11)
|
||||
#define UpStall (6<<11)
|
||||
#define UpUnstall (6<<11)+1
|
||||
#define DownStall (6<<11)+2
|
||||
#define DownUnstall (6<<11)+3
|
||||
#define RxDiscard (8<<11)
|
||||
#define TxEnable (9<<11)
|
||||
#define TxDisable (10<<11)
|
||||
#define TxReset (11<<11)
|
||||
#define FakeIntr (12<<11)
|
||||
#define AckIntr (13<<11)
|
||||
#define SetIntrEnb (14<<11)
|
||||
#define SetStatusEnb (15<<11)
|
||||
#define SetRxFilter (16<<11)
|
||||
#define SetRxThreshold (17<<11)
|
||||
#define SetTxThreshold (18<<11)
|
||||
#define SetTxStart (19<<11)
|
||||
#define StartDMAUp (20<<11)
|
||||
#define StartDMADown (20<<11)+1
|
||||
#define StatsEnable (21<<11)
|
||||
#define StatsDisable (22<<11)
|
||||
#define StopCoax (23<<11)
|
||||
#define SetFilterBit (25<<11)
|
||||
|
||||
/* The SetRxFilter command accepts the following classes */
|
||||
|
||||
#define RxStation 1
|
||||
#define RxMulticast 2
|
||||
#define RxBroadcast 4
|
||||
#define RxProm 8
|
||||
|
||||
/* 3Com status word defnitions */
|
||||
|
||||
#define IntLatch 0x0001
|
||||
#define HostError 0x0002
|
||||
#define TxComplete 0x0004
|
||||
#define TxAvailable 0x0008
|
||||
#define RxComplete 0x0010
|
||||
#define RxEarly 0x0020
|
||||
#define IntReq 0x0040
|
||||
#define StatsFull 0x0080
|
||||
#define DMADone (1<<8)
|
||||
#define DownComplete (1<<9)
|
||||
#define UpComplete (1<<10)
|
||||
#define DMAInProgress (1<<11) /* DMA controller is still busy.*/
|
||||
#define CmdInProgress (1<<12) /* EL3_CMD is still busy.*/
|
||||
|
||||
/* Polling Registers */
|
||||
|
||||
#define DnPoll 0x2d
|
||||
#define UpPoll 0x3d
|
||||
|
||||
/* Register window 0 offets */
|
||||
|
||||
#define Wn0EepromCmd 10 /* Window 0: EEPROM command register. */
|
||||
#define Wn0EepromData 12 /* Window 0: EEPROM results register. */
|
||||
#define IntrStatus 0x0E /* Valid in all windows. */
|
||||
|
||||
/* Register window 0 EEPROM bits */
|
||||
|
||||
#define EEPROM_Read 0x80
|
||||
#define EEPROM_WRITE 0x40
|
||||
#define EEPROM_ERASE 0xC0
|
||||
#define EEPROM_EWENB 0x30 /* Enable erasing/writing for 10 msec. */
|
||||
#define EEPROM_EWDIS 0x00 /* Disable EWENB before 10 msec timeout. */
|
||||
|
||||
/* EEPROM locations. */
|
||||
|
||||
#define PhysAddr01 0
|
||||
#define PhysAddr23 1
|
||||
#define PhysAddr45 2
|
||||
#define ModelID 3
|
||||
#define EtherLink3ID 7
|
||||
#define IFXcvrIO 8
|
||||
#define IRQLine 9
|
||||
#define NodeAddr01 10
|
||||
#define NodeAddr23 11
|
||||
#define NodeAddr45 12
|
||||
#define DriverTune 13
|
||||
#define Checksum 15
|
||||
|
||||
/* Register window 1 offsets, the window used in normal operation */
|
||||
|
||||
#define TX_FIFO 0x10
|
||||
#define RX_FIFOa 0x10
|
||||
#define RxErrors 0x14
|
||||
#define RxStatus 0x18
|
||||
#define Timer 0x1A
|
||||
#define TxStatus 0x1B
|
||||
#define TxFree 0x1C /* Remaining free bytes in Tx buffer. */
|
||||
|
||||
/* Register Window 2 */
|
||||
|
||||
#define Wn2_ResetOptions 12
|
||||
|
||||
/* Register Window 3: MAC/config bits */
|
||||
|
||||
#define Wn3_Config 0 /* Internal Configuration */
|
||||
#define Wn3_MAC_Ctrl 6
|
||||
#define Wn3_Options 8
|
||||
|
||||
#define BFEXT(value, offset, bitcount) \
|
||||
((((unsigned long)(value)) >> (offset)) & ((1 << (bitcount)) - 1))
|
||||
|
||||
#define BFINS(lhs, rhs, offset, bitcount) \
|
||||
(((lhs) & ~((((1 << (bitcount)) - 1)) << (offset))) | \
|
||||
(((rhs) & ((1 << (bitcount)) - 1)) << (offset)))
|
||||
|
||||
#define RAM_SIZE(v) BFEXT(v, 0, 3)
|
||||
#define RAM_WIDTH(v) BFEXT(v, 3, 1)
|
||||
#define RAM_SPEED(v) BFEXT(v, 4, 2)
|
||||
#define ROM_SIZE(v) BFEXT(v, 6, 2)
|
||||
#define RAM_SPLIT(v) BFEXT(v, 16, 2)
|
||||
#define XCVR(v) BFEXT(v, 20, 4)
|
||||
#define AUTOSELECT(v) BFEXT(v, 24, 1)
|
||||
|
||||
/* Register Window 4: Xcvr/media bits */
|
||||
|
||||
#define Wn4_FIFODiag 4
|
||||
#define Wn4_NetDiag 6
|
||||
#define Wn4_PhysicalMgmt 8
|
||||
#define Wn4_Media 10
|
||||
|
||||
#define Media_SQE 0x0008 /* Enable SQE error counting for AUI. */
|
||||
#define Media_10TP 0x00C0 /* Enable link beat and jabber for 10baseT. */
|
||||
#define Media_Lnk 0x0080 /* Enable just link beat for 100TX/100FX. */
|
||||
#define Media_LnkBeat 0x0800
|
||||
|
||||
/* Register Window 7: Bus Master control */
|
||||
|
||||
#define Wn7_MasterAddr 0
|
||||
#define Wn7_MasterLen 6
|
||||
#define Wn7_MasterStatus 12
|
||||
|
||||
/* Boomerang bus master control registers. */
|
||||
|
||||
#define PktStatus 0x20
|
||||
#define DownListPtr 0x24
|
||||
#define FragAddr 0x28
|
||||
#define FragLen 0x2c
|
||||
#define TxFreeThreshold 0x2f
|
||||
#define UpPktStatus 0x30
|
||||
#define UpListPtr 0x38
|
||||
|
||||
/* The Rx and Tx descriptor lists. */
|
||||
|
||||
#define LAST_FRAG 0x80000000 /* Last Addr/Len pair in descriptor. */
|
||||
#define DN_COMPLETE 0x00010000 /* This packet has been downloaded */
|
||||
|
||||
struct rx_desc_3com {
|
||||
u32 next; /* Last entry points to 0 */
|
||||
u32 status; /* FSH -> Frame Start Header */
|
||||
u32 addr; /* Up to 63 addr/len pairs possible */
|
||||
u32 length; /* Set LAST_FRAG to indicate last pair */
|
||||
};
|
||||
|
||||
/* Values for the Rx status entry. */
|
||||
|
||||
#define RxDComplete 0x00008000
|
||||
#define RxDError 0x4000
|
||||
#define IPChksumErr (1<<25)
|
||||
#define TCPChksumErr (1<<26)
|
||||
#define UDPChksumErr (1<<27)
|
||||
#define IPChksumValid (1<<29)
|
||||
#define TCPChksumValid (1<<30)
|
||||
#define UDPChksumValid (1<<31)
|
||||
|
||||
struct tx_desc_3com {
|
||||
u32 next; /* Last entry points to 0 */
|
||||
u32 status; /* bits 0:12 length, others see below */
|
||||
u32 addr;
|
||||
u32 length;
|
||||
};
|
||||
|
||||
/* Values for the Tx status entry. */
|
||||
|
||||
#define CRCDisable 0x2000
|
||||
#define TxDComplete 0x8000
|
||||
#define AddIPChksum 0x02000000
|
||||
#define AddTCPChksum 0x04000000
|
||||
#define AddUDPChksum 0x08000000
|
||||
#define TxIntrUploaded 0x80000000 /* IRQ when in FIFO, but maybe not sent. */
|
||||
|
||||
/* XCVR Types */
|
||||
|
||||
#define XCVR_10baseT 0
|
||||
#define XCVR_AUI 1
|
||||
#define XCVR_10baseTOnly 2
|
||||
#define XCVR_10base2 3
|
||||
#define XCVR_100baseTx 4
|
||||
#define XCVR_100baseFx 5
|
||||
#define XCVR_MII 6
|
||||
#define XCVR_NWAY 8
|
||||
#define XCVR_ExtMII 9
|
||||
#define XCVR_Default 10 /* I don't think this is correct -> should have been 0x10 if Auto Negotiate */
|
||||
|
||||
struct descriptor { /* A generic descriptor. */
|
||||
u32 next; /* Last entry points to 0 */
|
||||
u32 status; /* FSH -> Frame Start Header */
|
||||
u32 addr; /* Up to 63 addr/len pairs possible */
|
||||
u32 length; /* Set LAST_FRAG to indicate last pair */
|
||||
};
|
||||
|
||||
/* Misc. definitions */
|
||||
|
||||
#define NUM_RX_DESC PKTBUFSRX * 10
|
||||
#define NUM_TX_DESC 1 /* Number of TX descriptors */
|
||||
|
||||
#define TOUT_LOOP 1000000
|
||||
|
||||
#define ETH_ALEN 6
|
||||
|
||||
#define EL3WINDOW(dev, win_num) ETH_OUTW(dev, SelectWindow + (win_num), EL3_CMD)
|
||||
#define EL3_CMD 0x0e
|
||||
#define EL3_STATUS 0x0e
|
||||
|
||||
|
||||
#undef ETH_DEBUG
|
||||
|
||||
#ifdef ETH_DEBUG
|
||||
#define PRINTF(fmt,args...) printf (fmt ,##args)
|
||||
#else
|
||||
#define PRINTF(fmt,args...)
|
||||
#endif
|
||||
|
||||
|
||||
static struct rx_desc_3com *rx_ring; /* RX descriptor ring */
|
||||
static struct tx_desc_3com *tx_ring; /* TX descriptor ring */
|
||||
static u8 rx_buffer[NUM_RX_DESC][PKTSIZE_ALIGN]; /* storage for the incoming messages */
|
||||
static int rx_next = 0; /* RX descriptor ring pointer */
|
||||
static int tx_next = 0; /* TX descriptor ring pointer */
|
||||
static int tx_threshold;
|
||||
|
||||
static void init_rx_ring(struct eth_device* dev);
|
||||
static void purge_tx_ring(struct eth_device* dev);
|
||||
|
||||
static void read_hw_addr(struct eth_device* dev, bd_t * bis);
|
||||
|
||||
static int eth_3com_init(struct eth_device* dev, bd_t *bis);
|
||||
static int eth_3com_send(struct eth_device* dev, volatile void *packet, int length);
|
||||
static int eth_3com_recv(struct eth_device* dev);
|
||||
static void eth_3com_halt(struct eth_device* dev);
|
||||
|
||||
#define io_to_phys(a) pci_io_to_phys((pci_dev_t)dev->priv, a)
|
||||
#define phys_to_io(a) pci_phys_to_io((pci_dev_t)dev->priv, a)
|
||||
#define mem_to_phys(a) pci_mem_to_phys((pci_dev_t)dev->priv, a)
|
||||
#define phys_to_mem(a) pci_phys_to_mem((pci_dev_t)dev->priv, a)
|
||||
|
||||
static inline int ETH_INL(struct eth_device* dev, u_long addr)
|
||||
{
|
||||
__asm volatile ("eieio");
|
||||
return le32_to_cpu(*(volatile u32 *)io_to_phys(addr + dev->iobase));
|
||||
}
|
||||
|
||||
static inline int ETH_INW(struct eth_device* dev, u_long addr)
|
||||
{
|
||||
__asm volatile ("eieio");
|
||||
return le16_to_cpu(*(volatile u16 *)io_to_phys(addr + dev->iobase));
|
||||
}
|
||||
|
||||
static inline int ETH_INB(struct eth_device* dev, u_long addr)
|
||||
{
|
||||
__asm volatile ("eieio");
|
||||
return *(volatile u8 *)io_to_phys(addr + dev->iobase);
|
||||
}
|
||||
|
||||
static inline void ETH_OUTB(struct eth_device* dev, int command, u_long addr)
|
||||
{
|
||||
*(volatile u8 *)io_to_phys(addr + dev->iobase) = command;
|
||||
__asm volatile ("eieio");
|
||||
}
|
||||
|
||||
static inline void ETH_OUTW(struct eth_device* dev, int command, u_long addr)
|
||||
{
|
||||
*(volatile u16 *)io_to_phys(addr + dev->iobase) = cpu_to_le16(command);
|
||||
__asm volatile ("eieio");
|
||||
}
|
||||
|
||||
static inline void ETH_OUTL(struct eth_device* dev, int command, u_long addr)
|
||||
{
|
||||
*(volatile u32 *)io_to_phys(addr + dev->iobase) = cpu_to_le32(command);
|
||||
__asm volatile ("eieio");
|
||||
}
|
||||
|
||||
static inline int ETH_STATUS(struct eth_device* dev)
|
||||
{
|
||||
__asm volatile ("eieio");
|
||||
return le16_to_cpu(*(volatile u16 *)io_to_phys(EL3_STATUS + dev->iobase));
|
||||
}
|
||||
|
||||
static inline void ETH_CMD(struct eth_device* dev, int command)
|
||||
{
|
||||
*(volatile u16 *)io_to_phys(EL3_CMD + dev->iobase) = cpu_to_le16(command);
|
||||
__asm volatile ("eieio");
|
||||
}
|
||||
|
||||
/* Command register is always in the same spot in all the register windows */
|
||||
/* This function issues a command and waits for it so complete by checking the CmdInProgress bit */
|
||||
|
||||
static int issue_and_wait(struct eth_device* dev, int command)
|
||||
{
|
||||
|
||||
int i, status;
|
||||
|
||||
ETH_CMD(dev, command);
|
||||
for (i = 0; i < 2000; i++) {
|
||||
status = ETH_STATUS(dev);
|
||||
/*printf ("Issue: status 0x%4x.\n", status); */
|
||||
if (!(status & CmdInProgress))
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* OK, that didn't work. Do it the slow way. One second */
|
||||
for (i = 0; i < 100000; i++) {
|
||||
status = ETH_STATUS(dev);
|
||||
/*printf ("Issue: status 0x%4x.\n", status); */
|
||||
return 1;
|
||||
udelay(10);
|
||||
}
|
||||
PRINTF("Ethernet command: 0x%4x did not complete! Status: 0x%4x\n", command, ETH_STATUS(dev) );
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Determine network media type and set up 3com accordingly */
|
||||
/* I think I'm going to start with something known first like 10baseT */
|
||||
|
||||
static int auto_negotiate(struct eth_device* dev)
|
||||
{
|
||||
int i;
|
||||
|
||||
EL3WINDOW(dev, 1);
|
||||
|
||||
/* Wait for Auto negotiation to complete */
|
||||
for (i = 0; i <= 1000; i++)
|
||||
{
|
||||
if (ETH_INW(dev, 2) & 0x04)
|
||||
break;
|
||||
udelay(100);
|
||||
|
||||
if (i == 1000)
|
||||
{
|
||||
PRINTF("Error: Auto negotiation failed\n");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void eth_interrupt(struct eth_device *dev)
|
||||
{
|
||||
u16 status = ETH_STATUS(dev);
|
||||
|
||||
printf("eth0: status = 0x%04x\n", status);
|
||||
|
||||
if (!(status & IntLatch))
|
||||
return;
|
||||
|
||||
if (status & (1<<6))
|
||||
{
|
||||
ETH_CMD(dev, AckIntr | (1<<6));
|
||||
printf("Acknowledged Interrupt command\n");
|
||||
}
|
||||
|
||||
if (status & DownComplete)
|
||||
{
|
||||
ETH_CMD(dev, AckIntr | DownComplete);
|
||||
printf("Acknowledged DownComplete\n");
|
||||
}
|
||||
|
||||
if (status & UpComplete)
|
||||
{
|
||||
ETH_CMD(dev, AckIntr | UpComplete);
|
||||
printf("Acknowledged UpComplete\n");
|
||||
}
|
||||
|
||||
ETH_CMD(dev, AckIntr | IntLatch);
|
||||
printf("Acknowledged IntLatch\n");
|
||||
}
|
||||
|
||||
int eth_3com_initialize(bd_t *bis)
|
||||
{
|
||||
u32 eth_iobase = 0, status;
|
||||
int card_number = 0, ret;
|
||||
struct eth_device* dev;
|
||||
pci_dev_t devno;
|
||||
char *s;
|
||||
|
||||
s = getenv("3com_base");
|
||||
|
||||
/* Find ethernet controller on the PCI bus */
|
||||
|
||||
if ((devno = pci_find_device(PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C905C, 0)) < 0)
|
||||
{
|
||||
PRINTF("Error: Cannot find the ethernet device on the PCI bus\n");
|
||||
goto Done;
|
||||
}
|
||||
|
||||
if (s)
|
||||
{
|
||||
unsigned long base = atoi(s);
|
||||
pci_write_config_dword(devno, PCI_BASE_ADDRESS_0, base | 0x01);
|
||||
}
|
||||
|
||||
ret = pci_read_config_dword(devno, PCI_BASE_ADDRESS_0, ð_iobase);
|
||||
eth_iobase &= ~0xf;
|
||||
|
||||
PRINTF("eth: 3Com Found at Address: 0x%x\n", eth_iobase);
|
||||
|
||||
pci_write_config_dword(devno, PCI_COMMAND, PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER);
|
||||
|
||||
/* Check if I/O accesses and Bus Mastering are enabled */
|
||||
|
||||
ret = pci_read_config_dword(devno, PCI_COMMAND, &status);
|
||||
|
||||
if (!(status & PCI_COMMAND_IO))
|
||||
{
|
||||
printf("Error: Cannot enable IO access.\n");
|
||||
goto Done;
|
||||
}
|
||||
|
||||
if (!(status & PCI_COMMAND_MEMORY))
|
||||
{
|
||||
printf("Error: Cannot enable MEMORY access.\n");
|
||||
goto Done;
|
||||
}
|
||||
|
||||
if (!(status & PCI_COMMAND_MASTER))
|
||||
{
|
||||
printf("Error: Cannot enable Bus Mastering.\n");
|
||||
goto Done;
|
||||
}
|
||||
|
||||
dev = (struct eth_device*) malloc(sizeof(*dev)); /*struct eth_device)); */
|
||||
|
||||
sprintf(dev->name, "3Com 3c920c#%d", card_number);
|
||||
dev->iobase = eth_iobase;
|
||||
dev->priv = (void*) devno;
|
||||
dev->init = eth_3com_init;
|
||||
dev->halt = eth_3com_halt;
|
||||
dev->send = eth_3com_send;
|
||||
dev->recv = eth_3com_recv;
|
||||
|
||||
eth_register(dev);
|
||||
|
||||
/* { */
|
||||
/* char interrupt; */
|
||||
/* devno = pci_find_device(PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C905C, 0); */
|
||||
/* pci_read_config_byte(devno, PCI_INTERRUPT_LINE, &interrupt); */
|
||||
|
||||
/* printf("Installing eth0 interrupt handler to %d\n", interrupt); */
|
||||
/* irq_install_handler(interrupt, eth_interrupt, dev); */
|
||||
/* } */
|
||||
|
||||
card_number++;
|
||||
|
||||
/* Set the latency timer for value */
|
||||
s = getenv("3com_latency");
|
||||
if (s)
|
||||
{
|
||||
ret = pci_write_config_byte(devno, PCI_LATENCY_TIMER, (unsigned char)atoi(s));
|
||||
}
|
||||
else ret = pci_write_config_byte(devno, PCI_LATENCY_TIMER, 0x0a);
|
||||
|
||||
read_hw_addr(dev, bis); /* get the MAC address from Window 2*/
|
||||
|
||||
/* Reset the ethernet controller */
|
||||
|
||||
PRINTF ("Issuing reset command....\n");
|
||||
if (!issue_and_wait(dev, TotalReset))
|
||||
{
|
||||
printf("Error: Cannot reset ethernet controller.\n");
|
||||
goto Done;
|
||||
}
|
||||
else
|
||||
PRINTF ("Ethernet controller reset.\n");
|
||||
|
||||
/* allocate memory for rx and tx rings */
|
||||
|
||||
if(!(rx_ring = memalign(sizeof(struct rx_desc_3com) * NUM_RX_DESC, 16)))
|
||||
{
|
||||
PRINTF ("Cannot allocate memory for RX_RING.....\n");
|
||||
goto Done;
|
||||
}
|
||||
|
||||
if (!(tx_ring = memalign(sizeof(struct tx_desc_3com) * NUM_TX_DESC, 16)))
|
||||
{
|
||||
PRINTF ("Cannot allocate memory for TX_RING.....\n");
|
||||
goto Done;
|
||||
}
|
||||
|
||||
Done:
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
static int eth_3com_init(struct eth_device* dev, bd_t *bis)
|
||||
{
|
||||
int i, status = 0;
|
||||
int tx_cur, loop;
|
||||
u16 status_enable, intr_enable;
|
||||
struct descriptor *ias_cmd;
|
||||
|
||||
/* Determine what type of network the machine is connected to */
|
||||
/* presently drops the connect to 10Mbps */
|
||||
|
||||
if (!auto_negotiate(dev))
|
||||
{
|
||||
printf("Error: Cannot determine network media.\n");
|
||||
goto Done;
|
||||
}
|
||||
|
||||
issue_and_wait(dev, TxReset);
|
||||
issue_and_wait(dev, RxReset|0x04);
|
||||
|
||||
/* Switch to register set 7 for normal use. */
|
||||
EL3WINDOW(dev, 7);
|
||||
|
||||
/* Initialize Rx and Tx rings */
|
||||
|
||||
init_rx_ring(dev);
|
||||
purge_tx_ring(dev);
|
||||
|
||||
ETH_CMD(dev, SetRxFilter | RxStation | RxBroadcast | RxProm);
|
||||
|
||||
issue_and_wait(dev,SetTxStart|0x07ff);
|
||||
|
||||
/* Below sets which indication bits to be seen. */
|
||||
|
||||
status_enable = SetStatusEnb | HostError | DownComplete | UpComplete | (1<<6);
|
||||
ETH_CMD(dev, status_enable);
|
||||
|
||||
/* Below sets no bits are to cause an interrupt since this is just polling */
|
||||
|
||||
intr_enable = SetIntrEnb;
|
||||
/* intr_enable = SetIntrEnb | (1<<9) | (1<<10) | (1<<6); */
|
||||
ETH_CMD(dev, intr_enable);
|
||||
ETH_OUTB(dev, 127, UpPoll);
|
||||
|
||||
/* Ack all pending events, and set active indicator mask */
|
||||
|
||||
ETH_CMD(dev, AckIntr | IntLatch | TxAvailable | RxEarly | IntReq);
|
||||
ETH_CMD(dev, intr_enable);
|
||||
|
||||
/* Tell the adapter where the RX ring is located */
|
||||
|
||||
issue_and_wait(dev,UpStall); /* Stall and set the UplistPtr */
|
||||
ETH_OUTL(dev, (u32)&rx_ring[rx_next], UpListPtr);
|
||||
ETH_CMD(dev, RxEnable); /* Enable the receiver. */
|
||||
issue_and_wait(dev,UpUnstall);
|
||||
|
||||
/* Send the Individual Address Setup frame */
|
||||
|
||||
tx_cur = tx_next;
|
||||
tx_next = ((tx_next+1) % NUM_TX_DESC);
|
||||
|
||||
ias_cmd = (struct descriptor *)&tx_ring[tx_cur];
|
||||
ias_cmd->status = cpu_to_le32(1<<31); /* set DnIndicate bit. */
|
||||
ias_cmd->next = 0;
|
||||
ias_cmd->addr = cpu_to_le32((u32)&bis->bi_enetaddr[0]);
|
||||
ias_cmd->length = cpu_to_le32(6 | LAST_FRAG);
|
||||
|
||||
/* Tell the adapter where the TX ring is located */
|
||||
|
||||
ETH_CMD(dev, TxEnable); /* Enable transmitter. */
|
||||
issue_and_wait(dev, DownStall); /* Stall and set the DownListPtr. */
|
||||
ETH_OUTL(dev, (u32)&tx_ring[tx_cur], DownListPtr);
|
||||
issue_and_wait(dev, DownUnstall);
|
||||
for (i=0; !(ETH_STATUS(dev) & DownComplete); i++)
|
||||
{
|
||||
if (i >= TOUT_LOOP)
|
||||
{
|
||||
PRINTF("TX Ring status (Init): 0x%4x\n", le32_to_cpu(tx_ring[tx_cur].status));
|
||||
PRINTF("ETH_STATUS: 0x%x\n", ETH_STATUS(dev));
|
||||
goto Done;
|
||||
}
|
||||
}
|
||||
if (ETH_STATUS(dev) & DownComplete) /* If DownLoad Complete ACK the bit */
|
||||
{
|
||||
ETH_CMD(dev, AckIntr | DownComplete); /* acknowledge the indication bit */
|
||||
issue_and_wait(dev, DownStall); /* stall and clear DownListPtr */
|
||||
ETH_OUTL(dev, 0, DownListPtr);
|
||||
issue_and_wait(dev, DownUnstall);
|
||||
}
|
||||
status = 1;
|
||||
|
||||
Done:
|
||||
return status;
|
||||
}
|
||||
|
||||
int eth_3com_send(struct eth_device* dev, volatile void *packet, int length)
|
||||
{
|
||||
int i, status = 0;
|
||||
int tx_cur;
|
||||
|
||||
if (length <= 0)
|
||||
{
|
||||
PRINTF("eth: bad packet size: %d\n", length);
|
||||
goto Done;
|
||||
}
|
||||
|
||||
tx_cur = tx_next;
|
||||
tx_next = (tx_next+1) % NUM_TX_DESC;
|
||||
|
||||
tx_ring[tx_cur].status = cpu_to_le32(1<<31); /* set DnIndicate bit */
|
||||
tx_ring[tx_cur].next = 0;
|
||||
tx_ring[tx_cur].addr = cpu_to_le32(((u32) packet));
|
||||
tx_ring[tx_cur].length = cpu_to_le32(length | LAST_FRAG);
|
||||
|
||||
/* Send the packet */
|
||||
|
||||
issue_and_wait(dev, DownStall); /* stall and set the DownListPtr */
|
||||
ETH_OUTL(dev, (u32) &tx_ring[tx_cur], DownListPtr);
|
||||
issue_and_wait(dev, DownUnstall);
|
||||
|
||||
for (i=0; !(ETH_STATUS(dev) & DownComplete); i++)
|
||||
{
|
||||
if (i >= TOUT_LOOP)
|
||||
{
|
||||
PRINTF("TX Ring status (send): 0x%4x\n", le32_to_cpu(tx_ring[tx_cur].status));
|
||||
goto Done;
|
||||
}
|
||||
}
|
||||
if (ETH_STATUS(dev) & DownComplete) /* If DownLoad Complete ACK the bit */
|
||||
{
|
||||
ETH_CMD(dev, AckIntr | DownComplete); /* acknowledge the indication bit */
|
||||
issue_and_wait(dev, DownStall); /* stall and clear DownListPtr */
|
||||
ETH_OUTL(dev, 0, DownListPtr);
|
||||
issue_and_wait(dev, DownUnstall);
|
||||
}
|
||||
status=1;
|
||||
Done:
|
||||
return status;
|
||||
}
|
||||
|
||||
void PrintPacket (uchar *packet, int length)
|
||||
{
|
||||
int loop;
|
||||
uchar *ptr;
|
||||
|
||||
printf ("Printing packet of length %x.\n\n", length);
|
||||
ptr = packet;
|
||||
for (loop = 1; loop <= length; loop++)
|
||||
{
|
||||
printf ("%2x ", *ptr++);
|
||||
if ((loop % 40)== 0)
|
||||
printf ("\n");
|
||||
}
|
||||
}
|
||||
|
||||
int eth_3com_recv(struct eth_device* dev)
|
||||
{
|
||||
u16 stat = 0;
|
||||
u32 status;
|
||||
int rx_prev, length = 0;
|
||||
|
||||
while (!(ETH_STATUS(dev) & UpComplete)) /* wait on receipt of packet */
|
||||
;
|
||||
|
||||
status = le32_to_cpu(rx_ring[rx_next].status); /* packet status */
|
||||
|
||||
while (status & (1<<15))
|
||||
{
|
||||
/* A packet has been received */
|
||||
|
||||
if (status & (1<<15))
|
||||
{
|
||||
/* A valid frame received */
|
||||
|
||||
length = le32_to_cpu(rx_ring[rx_next].status) & 0x1fff; /* length is in bits 0 - 12 */
|
||||
|
||||
/* Pass the packet up to the protocol layers */
|
||||
|
||||
NetReceive((uchar *)le32_to_cpu(rx_ring[rx_next].addr), length);
|
||||
rx_ring[rx_next].status = 0; /* clear the status word */
|
||||
ETH_CMD(dev, AckIntr | UpComplete);
|
||||
issue_and_wait(dev, UpUnstall);
|
||||
}
|
||||
else
|
||||
if (stat & HostError)
|
||||
{
|
||||
/* There was an error */
|
||||
|
||||
printf("Rx error status: 0x%4x\n", stat);
|
||||
init_rx_ring(dev);
|
||||
goto Done;
|
||||
}
|
||||
|
||||
rx_prev = rx_next;
|
||||
rx_next = (rx_next + 1) % NUM_RX_DESC;
|
||||
stat = ETH_STATUS(dev); /* register status */
|
||||
status = le32_to_cpu(rx_ring[rx_next].status); /* packet status */
|
||||
}
|
||||
|
||||
Done:
|
||||
return length;
|
||||
}
|
||||
|
||||
void eth_3com_halt(struct eth_device* dev)
|
||||
{
|
||||
if (!(dev->iobase))
|
||||
{
|
||||
goto Done;
|
||||
}
|
||||
|
||||
issue_and_wait(dev, DownStall); /* shut down transmit and receive */
|
||||
issue_and_wait(dev, UpStall);
|
||||
issue_and_wait(dev, RxDisable);
|
||||
issue_and_wait(dev, TxDisable);
|
||||
|
||||
/* free(tx_ring); /###* release memory allocated to the DPD and UPD rings */
|
||||
/* free(rx_ring); */
|
||||
|
||||
Done:
|
||||
return;
|
||||
}
|
||||
|
||||
static void init_rx_ring(struct eth_device* dev)
|
||||
{
|
||||
int i;
|
||||
|
||||
PRINTF("Initializing rx_ring. rx_buffer = %p\n", rx_buffer);
|
||||
issue_and_wait(dev, UpStall);
|
||||
|
||||
for (i = 0; i < NUM_RX_DESC; i++)
|
||||
{
|
||||
rx_ring[i].next = cpu_to_le32(((u32) &rx_ring[(i+1) % NUM_RX_DESC]));
|
||||
rx_ring[i].status = 0;
|
||||
rx_ring[i].addr = cpu_to_le32(((u32) &rx_buffer[i][0]));
|
||||
rx_ring[i].length = cpu_to_le32(PKTSIZE_ALIGN | LAST_FRAG);
|
||||
}
|
||||
rx_next = 0;
|
||||
}
|
||||
|
||||
static void purge_tx_ring(struct eth_device* dev)
|
||||
{
|
||||
int i;
|
||||
|
||||
PRINTF("Purging tx_ring.\n");
|
||||
|
||||
tx_next = 0;
|
||||
|
||||
for (i = 0; i < NUM_TX_DESC; i++)
|
||||
{
|
||||
tx_ring[i].next = 0;
|
||||
tx_ring[i].status = 0;
|
||||
tx_ring[i].addr = 0;
|
||||
tx_ring[i].length = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static void read_hw_addr(struct eth_device* dev, bd_t *bis)
|
||||
{
|
||||
u8 hw_addr[ETH_ALEN];
|
||||
unsigned int eeprom[0x40];
|
||||
unsigned int checksum = 0;
|
||||
int i, j, timer;
|
||||
|
||||
/* Read the station address from the EEPROM. */
|
||||
|
||||
EL3WINDOW(dev, 0);
|
||||
for (i = 0; i < 0x40; i++)
|
||||
{
|
||||
ETH_OUTW(dev, EEPROM_Read + i, Wn0EepromCmd);
|
||||
/* Pause for at least 162 us. for the read to take place. */
|
||||
for (timer = 10; timer >= 0; timer--)
|
||||
{
|
||||
udelay(162);
|
||||
if ((ETH_INW(dev, Wn0EepromCmd) & 0x8000) == 0)
|
||||
break;
|
||||
}
|
||||
eeprom[i] = ETH_INW(dev, Wn0EepromData);
|
||||
}
|
||||
|
||||
/* Checksum calculation. I'm not sure about this part and there seems to be a bug on the 3com side of things */
|
||||
|
||||
for (i = 0; i < 0x21; i++)
|
||||
checksum ^= eeprom[i];
|
||||
checksum = (checksum ^ (checksum >> 8)) & 0xff;
|
||||
|
||||
if (checksum != 0xbb)
|
||||
printf(" *** INVALID EEPROM CHECKSUM %4.4x *** \n", checksum);
|
||||
|
||||
for (i = 0, j = 0; i < 3; i++)
|
||||
{
|
||||
hw_addr[j++] = (u8)((eeprom[i+10] >> 8) & 0xff);
|
||||
hw_addr[j++] = (u8)(eeprom[i+10] & 0xff);
|
||||
}
|
||||
|
||||
/* MAC Address is in window 2, write value from EEPROM to window 2 */
|
||||
|
||||
EL3WINDOW(dev, 2);
|
||||
for (i = 0; i < 6; i++)
|
||||
ETH_OUTB(dev, hw_addr[i], i);
|
||||
|
||||
for (j = 0; j < ETH_ALEN; j+=2)
|
||||
{
|
||||
hw_addr[j] = (u8)(ETH_INW(dev, j) & 0xff);
|
||||
hw_addr[j+1] = (u8)((ETH_INW(dev, j) >> 8) & 0xff);
|
||||
}
|
||||
|
||||
for (i=0;i<ETH_ALEN;i++)
|
||||
{
|
||||
if (hw_addr[i] != bis->bi_enetaddr[i])
|
||||
{
|
||||
/* printf("Warning: HW address don't match:\n"); */
|
||||
/* printf("Address in 3Com Window 2 is " */
|
||||
/* "%02X:%02X:%02X:%02X:%02X:%02X\n", */
|
||||
/* hw_addr[0], hw_addr[1], hw_addr[2], */
|
||||
/* hw_addr[3], hw_addr[4], hw_addr[5]); */
|
||||
/* printf("Address used by U-Boot is " */
|
||||
/* "%02X:%02X:%02X:%02X:%02X:%02X\n", */
|
||||
/* bis->bi_enetaddr[0], bis->bi_enetaddr[1], */
|
||||
/* bis->bi_enetaddr[2], bis->bi_enetaddr[3], */
|
||||
/* bis->bi_enetaddr[4], bis->bi_enetaddr[5]); */
|
||||
/* goto Done; */
|
||||
char buffer[256];
|
||||
if (bis->bi_enetaddr[0] == 0 && bis->bi_enetaddr[1] == 0 &&
|
||||
bis->bi_enetaddr[2] == 0 && bis->bi_enetaddr[3] == 0 &&
|
||||
bis->bi_enetaddr[4] == 0 && bis->bi_enetaddr[5] == 0)
|
||||
{
|
||||
|
||||
sprintf(buffer, "%02X:%02X:%02X:%02X:%02X:%02X",
|
||||
hw_addr[0], hw_addr[1], hw_addr[2],
|
||||
hw_addr[3], hw_addr[4], hw_addr[5]);
|
||||
setenv("ethaddr", buffer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(i=0; i<ETH_ALEN; i++) dev->enetaddr[i] = hw_addr[i];
|
||||
|
||||
Done:
|
||||
return;
|
||||
}
|
||||
35
board/MAI/AmigaOneG3SE/flash.c
Normal file
35
board/MAI/AmigaOneG3SE/flash.c
Normal file
@@ -0,0 +1,35 @@
|
||||
#include <common.h>
|
||||
#include <flash.h>
|
||||
|
||||
flash_info_t flash_info[CFG_MAX_FLASH_BANKS];
|
||||
|
||||
|
||||
unsigned long flash_init(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < CFG_MAX_FLASH_BANKS; i++)
|
||||
{
|
||||
flash_info[i].flash_id = FLASH_UNKNOWN;
|
||||
flash_info[i].sector_count = 0;
|
||||
flash_info[i].size = 0;
|
||||
}
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int flash_erase(flash_info_t *info, int s_first, int s_last)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
void flash_print_info(flash_info_t *info)
|
||||
{
|
||||
printf("No flashrom installed\n");
|
||||
}
|
||||
|
||||
int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
651
board/MAI/AmigaOneG3SE/flash_new.c
Normal file
651
board/MAI/AmigaOneG3SE/flash_new.c
Normal file
@@ -0,0 +1,651 @@
|
||||
/*
|
||||
* (C) Copyright 2001
|
||||
* Josh Huber <huber@mclx.com>, Mission Critical Linux, Inc.
|
||||
*
|
||||
* (C) Copyright 2002
|
||||
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <flash.h>
|
||||
#include <asm/io.h>
|
||||
#include "memio.h"
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
#undef DEBUG_FLASH
|
||||
|
||||
#ifdef DEBUG_FLASH
|
||||
#define DEBUGF(fmt,args...) printf(fmt ,##args)
|
||||
#else
|
||||
#define DEBUGF(fmt,args...)
|
||||
#endif
|
||||
/*---------------------------------------------------------------------*/
|
||||
|
||||
flash_info_t flash_info[CFG_MAX_FLASH_BANKS];
|
||||
|
||||
static ulong flash_get_size (ulong addr, flash_info_t *info);
|
||||
static int flash_get_offsets (ulong base, flash_info_t *info);
|
||||
static int write_word (flash_info_t *info, ulong dest, ulong data);
|
||||
static void flash_reset (ulong addr);
|
||||
|
||||
int flash_xd_nest;
|
||||
|
||||
static void flash_to_xd(void)
|
||||
{
|
||||
unsigned char x;
|
||||
|
||||
flash_xd_nest ++;
|
||||
|
||||
if (flash_xd_nest == 1)
|
||||
{
|
||||
DEBUGF("Flash on XD\n");
|
||||
x = pci_read_cfg_byte(0, 0, 0x74);
|
||||
pci_write_cfg_byte(0, 0, 0x74, x|1);
|
||||
}
|
||||
}
|
||||
|
||||
static void flash_to_mem(void)
|
||||
{
|
||||
unsigned char x;
|
||||
|
||||
flash_xd_nest --;
|
||||
|
||||
if (flash_xd_nest == 0)
|
||||
{
|
||||
DEBUGF("Flash on memory bus\n");
|
||||
x = pci_read_cfg_byte(0, 0, 0x74);
|
||||
pci_write_cfg_byte(0, 0, 0x74, x&0xFE);
|
||||
}
|
||||
}
|
||||
|
||||
unsigned long flash_init_old(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < CFG_MAX_FLASH_BANKS; i++)
|
||||
{
|
||||
flash_info[i].flash_id = FLASH_UNKNOWN;
|
||||
flash_info[i].sector_count = 0;
|
||||
flash_info[i].size = 0;
|
||||
}
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
unsigned long flash_init (void)
|
||||
{
|
||||
unsigned int i;
|
||||
unsigned long flash_size = 0;
|
||||
|
||||
flash_xd_nest = 0;
|
||||
|
||||
flash_to_xd();
|
||||
|
||||
/* Init: no FLASHes known */
|
||||
for (i=0; i<CFG_MAX_FLASH_BANKS; ++i) {
|
||||
flash_info[i].flash_id = FLASH_UNKNOWN;
|
||||
flash_info[i].sector_count = 0;
|
||||
flash_info[i].size = 0;
|
||||
}
|
||||
|
||||
DEBUGF("\n## Get flash size @ 0x%08x\n", CFG_FLASH_BASE);
|
||||
|
||||
flash_size = flash_get_size (CFG_FLASH_BASE, flash_info);
|
||||
|
||||
DEBUGF("## Flash bank size: %08lx\n", flash_size);
|
||||
|
||||
if (flash_size) {
|
||||
#if CFG_MONITOR_BASE >= CFG_FLASH_BASE && \
|
||||
CFG_MONITOR_BASE < CFG_FLASH_BASE + CFG_FLASH_MAX_SIZE
|
||||
/* monitor protection ON by default */
|
||||
flash_protect(FLAG_PROTECT_SET,
|
||||
CFG_MONITOR_BASE,
|
||||
CFG_MONITOR_BASE + monitor_flash_len - 1,
|
||||
&flash_info[0]);
|
||||
#endif
|
||||
|
||||
#ifdef CFG_ENV_IS_IN_FLASH
|
||||
/* ENV protection ON by default */
|
||||
flash_protect(FLAG_PROTECT_SET,
|
||||
CFG_ENV_ADDR,
|
||||
CFG_ENV_ADDR + CFG_ENV_SECT_SIZE - 1,
|
||||
&flash_info[0]);
|
||||
#endif
|
||||
|
||||
} else {
|
||||
puts ("Warning: the BOOT Flash is not initialised !");
|
||||
}
|
||||
|
||||
flash_to_mem();
|
||||
|
||||
return flash_size;
|
||||
}
|
||||
|
||||
/*
|
||||
* The following code cannot be run from FLASH!
|
||||
*/
|
||||
static ulong flash_get_size (ulong addr, flash_info_t *info)
|
||||
{
|
||||
short i;
|
||||
uchar value;
|
||||
uchar *x = (uchar *)addr;
|
||||
|
||||
flash_to_xd();
|
||||
|
||||
/* Write auto select command: read Manufacturer ID */
|
||||
x[0x0555] = 0xAA;
|
||||
__asm volatile ("sync\n eieio");
|
||||
x[0x02AA] = 0x55;
|
||||
__asm volatile ("sync\n eieio");
|
||||
x[0x0555] = 0x90;
|
||||
__asm volatile ("sync\n eieio");
|
||||
|
||||
value = x[0];
|
||||
__asm volatile ("sync\n eieio");
|
||||
|
||||
DEBUGF("Manuf. ID @ 0x%08lx: 0x%08x\n", (ulong)addr, value);
|
||||
|
||||
switch (value | (value << 16)) {
|
||||
case AMD_MANUFACT:
|
||||
info->flash_id = FLASH_MAN_AMD;
|
||||
break;
|
||||
|
||||
case FUJ_MANUFACT:
|
||||
info->flash_id = FLASH_MAN_FUJ;
|
||||
break;
|
||||
|
||||
case STM_MANUFACT:
|
||||
info->flash_id = FLASH_MAN_STM;
|
||||
break;
|
||||
|
||||
default:
|
||||
info->flash_id = FLASH_UNKNOWN;
|
||||
info->sector_count = 0;
|
||||
info->size = 0;
|
||||
flash_reset (addr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
value = x[1];
|
||||
__asm volatile ("sync\n eieio");
|
||||
|
||||
DEBUGF("Device ID @ 0x%08lx: 0x%08x\n", addr+1, value);
|
||||
|
||||
switch (value) {
|
||||
case AMD_ID_F040B:
|
||||
DEBUGF("Am29F040B\n");
|
||||
info->flash_id += FLASH_AM040;
|
||||
info->sector_count = 8;
|
||||
info->size = 0x00080000;
|
||||
break; /* => 512 kB */
|
||||
|
||||
case AMD_ID_LV040B:
|
||||
DEBUGF("Am29LV040B\n");
|
||||
info->flash_id += FLASH_AM040;
|
||||
info->sector_count = 8;
|
||||
info->size = 0x00080000;
|
||||
break; /* => 512 kB */
|
||||
|
||||
case AMD_ID_LV400T:
|
||||
DEBUGF("Am29LV400T\n");
|
||||
info->flash_id += FLASH_AM400T;
|
||||
info->sector_count = 11;
|
||||
info->size = 0x00100000;
|
||||
break; /* => 1 MB */
|
||||
|
||||
case AMD_ID_LV400B:
|
||||
DEBUGF("Am29LV400B\n");
|
||||
info->flash_id += FLASH_AM400B;
|
||||
info->sector_count = 11;
|
||||
info->size = 0x00100000;
|
||||
break; /* => 1 MB */
|
||||
|
||||
case AMD_ID_LV800T:
|
||||
DEBUGF("Am29LV800T\n");
|
||||
info->flash_id += FLASH_AM800T;
|
||||
info->sector_count = 19;
|
||||
info->size = 0x00200000;
|
||||
break; /* => 2 MB */
|
||||
|
||||
case AMD_ID_LV800B:
|
||||
DEBUGF("Am29LV400B\n");
|
||||
info->flash_id += FLASH_AM800B;
|
||||
info->sector_count = 19;
|
||||
info->size = 0x00200000;
|
||||
break; /* => 2 MB */
|
||||
|
||||
case AMD_ID_LV160T:
|
||||
DEBUGF("Am29LV160T\n");
|
||||
info->flash_id += FLASH_AM160T;
|
||||
info->sector_count = 35;
|
||||
info->size = 0x00400000;
|
||||
break; /* => 4 MB */
|
||||
|
||||
case AMD_ID_LV160B:
|
||||
DEBUGF("Am29LV160B\n");
|
||||
info->flash_id += FLASH_AM160B;
|
||||
info->sector_count = 35;
|
||||
info->size = 0x00400000;
|
||||
break; /* => 4 MB */
|
||||
|
||||
case AMD_ID_LV320T:
|
||||
DEBUGF("Am29LV320T\n");
|
||||
info->flash_id += FLASH_AM320T;
|
||||
info->sector_count = 67;
|
||||
info->size = 0x00800000;
|
||||
break; /* => 8 MB */
|
||||
|
||||
#if 0
|
||||
/* Has the same ID as AMD_ID_LV320T, to be fixed */
|
||||
case AMD_ID_LV320B:
|
||||
DEBUGF("Am29LV320B\n");
|
||||
info->flash_id += FLASH_AM320B;
|
||||
info->sector_count = 67;
|
||||
info->size = 0x00800000;
|
||||
break; /* => 8 MB */
|
||||
#endif
|
||||
|
||||
case AMD_ID_LV033C:
|
||||
DEBUGF("Am29LV033C\n");
|
||||
info->flash_id += FLASH_AM033C;
|
||||
info->sector_count = 64;
|
||||
info->size = 0x01000000;
|
||||
break; /* => 16Mb */
|
||||
|
||||
case STM_ID_F040B:
|
||||
DEBUGF("M29F040B\n");
|
||||
info->flash_id += FLASH_AM040;
|
||||
info->sector_count = 8;
|
||||
info->size = 0x00080000;
|
||||
break; /* => 512 kB */
|
||||
|
||||
default:
|
||||
info->flash_id = FLASH_UNKNOWN;
|
||||
flash_reset (addr);
|
||||
flash_to_mem();
|
||||
return (0); /* => no or unknown flash */
|
||||
|
||||
}
|
||||
|
||||
if (info->sector_count > CFG_MAX_FLASH_SECT) {
|
||||
printf ("** ERROR: sector count %d > max (%d) **\n",
|
||||
info->sector_count, CFG_MAX_FLASH_SECT);
|
||||
info->sector_count = CFG_MAX_FLASH_SECT;
|
||||
}
|
||||
|
||||
if (! flash_get_offsets (addr, info)) {
|
||||
flash_reset (addr);
|
||||
flash_to_mem();
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* check for protected sectors */
|
||||
for (i = 0; i < info->sector_count; i++) {
|
||||
/* read sector protection at sector address, (A7 .. A0) = 0x02 */
|
||||
/* D0 = 1 if protected */
|
||||
value = in8(info->start[i] + 2);
|
||||
iobarrier_rw();
|
||||
info->protect[i] = (value & 1) != 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Reset bank to read mode
|
||||
*/
|
||||
flash_reset (addr);
|
||||
|
||||
flash_to_mem();
|
||||
|
||||
return (info->size);
|
||||
}
|
||||
|
||||
static int flash_get_offsets (ulong base, flash_info_t *info)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
switch (info->flash_id & FLASH_TYPEMASK) {
|
||||
case FLASH_AM040:
|
||||
/* set sector offsets for uniform sector type */
|
||||
for (i = 0; i < info->sector_count; i++) {
|
||||
info->start[i] = base + i * info->size /
|
||||
info->sector_count;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int flash_erase (flash_info_t *info, int s_first, int s_last)
|
||||
{
|
||||
volatile ulong addr = info->start[0];
|
||||
int flag, prot, sect, l_sect;
|
||||
ulong start, now, last;
|
||||
|
||||
flash_to_xd();
|
||||
|
||||
if (s_first < 0 || s_first > s_last) {
|
||||
if (info->flash_id == FLASH_UNKNOWN) {
|
||||
printf ("- missing\n");
|
||||
} else {
|
||||
printf ("- no sectors to erase\n");
|
||||
}
|
||||
flash_to_mem();
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (info->flash_id == FLASH_UNKNOWN) {
|
||||
printf ("Can't erase unknown flash type %08lx - aborted\n",
|
||||
info->flash_id);
|
||||
flash_to_mem();
|
||||
return 1;
|
||||
}
|
||||
|
||||
prot = 0;
|
||||
for (sect=s_first; sect<=s_last; ++sect) {
|
||||
if (info->protect[sect]) {
|
||||
prot++;
|
||||
}
|
||||
}
|
||||
|
||||
if (prot) {
|
||||
printf ("- Warning: %d protected sectors will not be erased!\n",
|
||||
prot);
|
||||
} else {
|
||||
printf ("\n");
|
||||
}
|
||||
|
||||
l_sect = -1;
|
||||
|
||||
/* Disable interrupts which might cause a timeout here */
|
||||
flag = disable_interrupts();
|
||||
|
||||
out8(addr + 0x555, 0xAA);
|
||||
iobarrier_rw();
|
||||
out8(addr + 0x2AA, 0x55);
|
||||
iobarrier_rw();
|
||||
out8(addr + 0x555, 0x80);
|
||||
iobarrier_rw();
|
||||
out8(addr + 0x555, 0xAA);
|
||||
iobarrier_rw();
|
||||
out8(addr + 0x2AA, 0x55);
|
||||
iobarrier_rw();
|
||||
|
||||
/* Start erase on unprotected sectors */
|
||||
for (sect = s_first; sect<=s_last; sect++) {
|
||||
if (info->protect[sect] == 0) { /* not protected */
|
||||
addr = info->start[sect];
|
||||
out8(addr, 0x30);
|
||||
iobarrier_rw();
|
||||
l_sect = sect;
|
||||
}
|
||||
}
|
||||
|
||||
/* re-enable interrupts if necessary */
|
||||
if (flag)
|
||||
enable_interrupts();
|
||||
|
||||
/* wait at least 80us - let's wait 1 ms */
|
||||
udelay (1000);
|
||||
|
||||
/*
|
||||
* We wait for the last triggered sector
|
||||
*/
|
||||
if (l_sect < 0)
|
||||
goto DONE;
|
||||
|
||||
start = get_timer (0);
|
||||
last = start;
|
||||
addr = info->start[l_sect];
|
||||
|
||||
DEBUGF ("Start erase timeout: %d\n", CFG_FLASH_ERASE_TOUT);
|
||||
|
||||
while ((in8(addr) & 0x80) != 0x80) {
|
||||
if ((now = get_timer(start)) > CFG_FLASH_ERASE_TOUT) {
|
||||
printf ("Timeout\n");
|
||||
flash_reset (info->start[0]);
|
||||
flash_to_mem();
|
||||
return 1;
|
||||
}
|
||||
/* show that we're waiting */
|
||||
if ((now - last) > 1000) { /* every second */
|
||||
putc ('.');
|
||||
last = now;
|
||||
}
|
||||
iobarrier_rw();
|
||||
}
|
||||
|
||||
DONE:
|
||||
/* reset to read mode */
|
||||
flash_reset (info->start[0]);
|
||||
flash_to_mem();
|
||||
|
||||
printf (" done\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Copy memory to flash, returns:
|
||||
* 0 - OK
|
||||
* 1 - write timeout
|
||||
* 2 - Flash not erased
|
||||
*/
|
||||
int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt)
|
||||
{
|
||||
ulong cp, wp, data;
|
||||
int i, l, rc;
|
||||
|
||||
flash_to_xd();
|
||||
|
||||
wp = (addr & ~3); /* get lower word aligned address */
|
||||
|
||||
/*
|
||||
* handle unaligned start bytes
|
||||
*/
|
||||
if ((l = addr - wp) != 0) {
|
||||
data = 0;
|
||||
for (i=0, cp=wp; i<l; ++i, ++cp) {
|
||||
data = (data << 8) | (*(uchar *)cp);
|
||||
}
|
||||
for (; i<4 && cnt>0; ++i) {
|
||||
data = (data << 8) | *src++;
|
||||
--cnt;
|
||||
++cp;
|
||||
}
|
||||
for (; cnt==0 && i<4; ++i, ++cp) {
|
||||
data = (data << 8) | (*(uchar *)cp);
|
||||
}
|
||||
|
||||
if ((rc = write_word(info, wp, data)) != 0) {
|
||||
flash_to_mem();
|
||||
return (rc);
|
||||
}
|
||||
wp += 4;
|
||||
}
|
||||
|
||||
/*
|
||||
* handle word aligned part
|
||||
*/
|
||||
while (cnt >= 4) {
|
||||
data = 0;
|
||||
for (i=0; i<4; ++i) {
|
||||
data = (data << 8) | *src++;
|
||||
}
|
||||
if ((rc = write_word(info, wp, data)) != 0) {
|
||||
flash_to_mem();
|
||||
return (rc);
|
||||
}
|
||||
wp += 4;
|
||||
cnt -= 4;
|
||||
}
|
||||
|
||||
if (cnt == 0) {
|
||||
flash_to_mem();
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* handle unaligned tail bytes
|
||||
*/
|
||||
data = 0;
|
||||
for (i=0, cp=wp; i<4 && cnt>0; ++i, ++cp) {
|
||||
data = (data << 8) | *src++;
|
||||
--cnt;
|
||||
}
|
||||
for (; i<4; ++i, ++cp) {
|
||||
data = (data << 8) | (*(uchar *)cp);
|
||||
}
|
||||
|
||||
|
||||
flash_to_mem();
|
||||
return (write_word(info, wp, data));
|
||||
}
|
||||
|
||||
/*
|
||||
* Write a word to Flash, returns:
|
||||
* 0 - OK
|
||||
* 1 - write timeout
|
||||
* 2 - Flash not erased
|
||||
*/
|
||||
static int write_word (flash_info_t *info, ulong dest, ulong data)
|
||||
{
|
||||
volatile ulong addr = info->start[0];
|
||||
ulong start;
|
||||
int i;
|
||||
|
||||
flash_to_xd();
|
||||
|
||||
/* Check if Flash is (sufficiently) erased */
|
||||
if ((in32(dest) & data) != data) {
|
||||
flash_to_mem();
|
||||
return (2);
|
||||
}
|
||||
|
||||
/* write each byte out */
|
||||
for (i = 0; i < 4; i++) {
|
||||
char *data_ch = (char *)&data;
|
||||
int flag = disable_interrupts();
|
||||
|
||||
out8(addr + 0x555, 0xAA);
|
||||
iobarrier_rw();
|
||||
out8(addr + 0x2AA, 0x55);
|
||||
iobarrier_rw();
|
||||
out8(addr + 0x555, 0xA0);
|
||||
iobarrier_rw();
|
||||
out8(dest+i, data_ch[i]);
|
||||
iobarrier_rw();
|
||||
|
||||
/* re-enable interrupts if necessary */
|
||||
if (flag)
|
||||
enable_interrupts();
|
||||
|
||||
/* data polling for D7 */
|
||||
start = get_timer (0);
|
||||
while ((in8(dest+i) & 0x80) != (data_ch[i] & 0x80)) {
|
||||
if (get_timer(start) > CFG_FLASH_WRITE_TOUT) {
|
||||
flash_reset (addr);
|
||||
flash_to_mem();
|
||||
return (1);
|
||||
}
|
||||
iobarrier_rw();
|
||||
}
|
||||
}
|
||||
|
||||
flash_reset (addr);
|
||||
flash_to_mem();
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Reset bank to read mode
|
||||
*/
|
||||
static void flash_reset (ulong addr)
|
||||
{
|
||||
flash_to_xd();
|
||||
out8(addr, 0xF0); /* reset bank */
|
||||
iobarrier_rw();
|
||||
flash_to_mem();
|
||||
}
|
||||
|
||||
void flash_print_info (flash_info_t *info)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (info->flash_id == FLASH_UNKNOWN) {
|
||||
printf ("missing or unknown FLASH type\n");
|
||||
return;
|
||||
}
|
||||
|
||||
switch (info->flash_id & FLASH_VENDMASK) {
|
||||
case FLASH_MAN_AMD: printf ("AMD "); break;
|
||||
case FLASH_MAN_FUJ: printf ("FUJITSU "); break;
|
||||
case FLASH_MAN_BM: printf ("BRIGHT MICRO "); break;
|
||||
case FLASH_MAN_STM: printf ("SGS THOMSON "); break;
|
||||
default: printf ("Unknown Vendor "); break;
|
||||
}
|
||||
|
||||
switch (info->flash_id & FLASH_TYPEMASK) {
|
||||
case FLASH_AM040: printf ("29F040 or 29LV040 (4 Mbit, uniform sectors)\n");
|
||||
break;
|
||||
case FLASH_AM400B: printf ("AM29LV400B (4 Mbit, bottom boot sect)\n");
|
||||
break;
|
||||
case FLASH_AM400T: printf ("AM29LV400T (4 Mbit, top boot sector)\n");
|
||||
break;
|
||||
case FLASH_AM800B: printf ("AM29LV800B (8 Mbit, bottom boot sect)\n");
|
||||
break;
|
||||
case FLASH_AM800T: printf ("AM29LV800T (8 Mbit, top boot sector)\n");
|
||||
break;
|
||||
case FLASH_AM160B: printf ("AM29LV160B (16 Mbit, bottom boot sect)\n");
|
||||
break;
|
||||
case FLASH_AM160T: printf ("AM29LV160T (16 Mbit, top boot sector)\n");
|
||||
break;
|
||||
case FLASH_AM320B: printf ("AM29LV320B (32 Mbit, bottom boot sect)\n");
|
||||
break;
|
||||
case FLASH_AM320T: printf ("AM29LV320T (32 Mbit, top boot sector)\n");
|
||||
break;
|
||||
default: printf ("Unknown Chip Type\n");
|
||||
break;
|
||||
}
|
||||
|
||||
if (info->size % 0x100000 == 0) {
|
||||
printf (" Size: %ld MB in %d Sectors\n",
|
||||
info->size / 0x100000, info->sector_count);
|
||||
} else if (info->size % 0x400 == 0) {
|
||||
printf (" Size: %ld KB in %d Sectors\n",
|
||||
info->size / 0x400, info->sector_count);
|
||||
} else {
|
||||
printf (" Size: %ld B in %d Sectors\n",
|
||||
info->size, info->sector_count);
|
||||
}
|
||||
|
||||
printf (" Sector Start Addresses:");
|
||||
for (i=0; i<info->sector_count; ++i) {
|
||||
if ((i % 5) == 0)
|
||||
printf ("\n ");
|
||||
printf (" %08lX%s",
|
||||
info->start[i],
|
||||
info->protect[i] ? " (RO)" : " "
|
||||
);
|
||||
}
|
||||
printf ("\n");
|
||||
}
|
||||
230
board/MAI/AmigaOneG3SE/i8259.c
Normal file
230
board/MAI/AmigaOneG3SE/i8259.c
Normal file
@@ -0,0 +1,230 @@
|
||||
/*
|
||||
* (C) Copyright 2002
|
||||
* John W. Linville, linville@tuxdriver.com
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include "i8259.h"
|
||||
|
||||
#undef IRQ_DEBUG
|
||||
|
||||
#ifdef IRQ_DEBUG
|
||||
#define PRINTF(fmt,args...) printf (fmt ,##args)
|
||||
#else
|
||||
#define PRINTF(fmt,args...)
|
||||
#endif
|
||||
|
||||
static inline unsigned char read_byte(volatile unsigned char* from)
|
||||
{
|
||||
int x;
|
||||
asm volatile ("lbz %0,%1\n eieio" : "=r" (x) : "m" (*from));
|
||||
return (unsigned char)x;
|
||||
}
|
||||
|
||||
static inline void write_byte(volatile unsigned char *to, int x)
|
||||
{
|
||||
asm volatile ("stb %1,%0\n eieio" : "=m" (*to) : "r" (x));
|
||||
}
|
||||
|
||||
static inline unsigned long read_long_little(volatile unsigned long *from)
|
||||
{
|
||||
unsigned long x;
|
||||
asm volatile ("lwbrx %0,0,%1\n eieio\n sync" : "=r" (x) : "r" (from), "m"(*from));
|
||||
return (unsigned long)x;
|
||||
}
|
||||
|
||||
#ifdef out8
|
||||
#undef out8
|
||||
#endif
|
||||
|
||||
#ifdef in8
|
||||
#undef in8
|
||||
#endif
|
||||
|
||||
#define out8(addr, byte) write_byte(0xFE000000 | addr, byte)
|
||||
#define in8(addr) read_byte(0xFE000000 | addr)
|
||||
|
||||
/*
|
||||
* This contains the irq mask for both 8259A irq controllers,
|
||||
*/
|
||||
static char cached_imr[2] = {0xff, 0xff};
|
||||
|
||||
#define cached_imr1 (cached_imr[0])
|
||||
#define cached_imr2 (cached_imr[1])
|
||||
|
||||
void i8259_init(void)
|
||||
{
|
||||
char dummy;
|
||||
PRINTF("Initializing Interrupt controller\n");
|
||||
/* init master interrupt controller */
|
||||
out8(0x20, 0x11); /* 0x19); /###* Start init sequence */
|
||||
out8(0x21, 0x00); /* Vector base */
|
||||
out8(0x21, 0x04); /* edge tiggered, Cascade (slave) on IRQ2 */
|
||||
out8(0x21, 0x11); /* was: 0x01); /###* Select 8086 mode */
|
||||
|
||||
/* init slave interrupt controller */
|
||||
out8(0xA0, 0x11); /* 0x19); /###* Start init sequence */
|
||||
out8(0xA1, 0x08); /* Vector base */
|
||||
out8(0xA1, 0x02); /* edge triggered, Cascade (slave) on IRQ2 */
|
||||
out8(0xA1, 0x11); /* was: 0x01); /###* Select 8086 mode */
|
||||
|
||||
/* always read ISR */
|
||||
out8(0x20, 0x0B);
|
||||
dummy = in8(ISR_1);
|
||||
out8(0xA0, 0x0B);
|
||||
dummy = in8(ISR_2);
|
||||
|
||||
/* out8(0x43, 0x30); */
|
||||
/* out8(0x40, 0); */
|
||||
/* out8(0x40, 0); */
|
||||
/* out8(0x43, 0x70); */
|
||||
/* out8(0x41, 0); */
|
||||
/* out8(0x41, 0); */
|
||||
/* out8(0x43, 0xb0); */
|
||||
/* out8(0x42, 0); */
|
||||
/* out8(0x42, 0); */
|
||||
|
||||
/* Mask all interrupts */
|
||||
out8(IMR_2, cached_imr2);
|
||||
out8(IMR_1, cached_imr1);
|
||||
|
||||
i8259_unmask_irq(2);
|
||||
#if 0
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<16; i++)
|
||||
{
|
||||
i8259_unmask_irq(i);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static volatile char *pci_intack = (void *)0xFEF00000;
|
||||
|
||||
int i8259_irq(void)
|
||||
{
|
||||
int irq;
|
||||
|
||||
irq = read_long_little(pci_intack) & 0xff;
|
||||
if (irq==7) {
|
||||
/*
|
||||
* This may be a spurious interrupt.
|
||||
*
|
||||
* Read the interrupt status register (ISR). If the most
|
||||
* significant bit is not set then there is no valid
|
||||
* interrupt.
|
||||
*/
|
||||
if(~in8(0x20)&0x80) {
|
||||
irq = -1;
|
||||
}
|
||||
}
|
||||
|
||||
return irq;
|
||||
}
|
||||
int i8259_get_irq(struct pt_regs *regs)
|
||||
{
|
||||
unsigned char irq;
|
||||
|
||||
/*
|
||||
* Perform an interrupt acknowledge cycle on controller 1
|
||||
*/
|
||||
out8(OCW3_1, 0x0C); /* prepare for poll */
|
||||
irq = in8(IPL_1) & 7;
|
||||
if (irq == 2) {
|
||||
/*
|
||||
* Interrupt is cascaded so perform interrupt
|
||||
* acknowledge on controller 2
|
||||
*/
|
||||
out8(OCW3_2, 0x0C); /* prepare for poll */
|
||||
irq = (in8(IPL_2) & 7) + 8;
|
||||
if (irq == 15) {
|
||||
/*
|
||||
* This may be a spurious interrupt
|
||||
*
|
||||
* Read the interrupt status register. If the most
|
||||
* significant bit is not set then there is no valid
|
||||
* interrupt
|
||||
*/
|
||||
out8(OCW3_2, 0x0b);
|
||||
if (~(in8(ISR_2) & 0x80)) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
} else if (irq == 7) {
|
||||
/*
|
||||
* This may be a spurious interrupt
|
||||
*
|
||||
* Read the interrupt status register. If the most
|
||||
* significant bit is not set then there is no valid
|
||||
* interrupt
|
||||
*/
|
||||
out8(OCW3_1, 0x0b);
|
||||
if (~(in8(ISR_1) & 0x80)) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
return irq;
|
||||
}
|
||||
|
||||
/*
|
||||
* Careful! The 8259A is a fragile beast, it pretty
|
||||
* much _has_ to be done exactly like this (mask it
|
||||
* first, _then_ send the EOI, and the order of EOI
|
||||
* to the two 8259s is important!
|
||||
*/
|
||||
void i8259_mask_and_ack(int irq)
|
||||
{
|
||||
if (irq > 7) {
|
||||
cached_imr2 |= (1 << (irq - 8));
|
||||
in8(IMR_2); /* DUMMY */
|
||||
out8(IMR_2, cached_imr2);
|
||||
out8(OCW2_2, 0x20); /* Non-specific EOI */
|
||||
out8(OCW2_1, 0x20); /* Non-specific EOI to cascade */
|
||||
} else {
|
||||
cached_imr1 |= (1 << irq);
|
||||
in8(IMR_1); /* DUMMY */
|
||||
out8(IMR_1, cached_imr1);
|
||||
out8(OCW2_1, 0x20); /* Non-specific EOI */
|
||||
}
|
||||
}
|
||||
|
||||
void i8259_mask_irq(int irq)
|
||||
{
|
||||
if (irq & 8) {
|
||||
cached_imr2 |= (1 << (irq & 7));
|
||||
out8(IMR_2, cached_imr2);
|
||||
} else {
|
||||
cached_imr1 |= (1 << irq);
|
||||
out8(IMR_1, cached_imr1);
|
||||
}
|
||||
}
|
||||
|
||||
void i8259_unmask_irq(int irq)
|
||||
{
|
||||
if (irq & 8) {
|
||||
cached_imr2 &= ~(1 << (irq & 7));
|
||||
out8(IMR_2, cached_imr2);
|
||||
} else {
|
||||
cached_imr1 &= ~(1 << irq);
|
||||
out8(IMR_1, cached_imr1);
|
||||
}
|
||||
}
|
||||
56
board/MAI/AmigaOneG3SE/i8259.h
Normal file
56
board/MAI/AmigaOneG3SE/i8259.h
Normal file
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* (C) Copyright 2002
|
||||
* John W. Linville, linville@tuxdriver.com
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#define ICW1_1 CFG_ISA_IO_BASE_ADDRESS + ISA_INT1_ICW1
|
||||
#define ICW1_2 CFG_ISA_IO_BASE_ADDRESS + ISA_INT2_ICW1
|
||||
#define ICW2_1 CFG_ISA_IO_BASE_ADDRESS + ISA_INT1_ICW2
|
||||
#define ICW2_2 CFG_ISA_IO_BASE_ADDRESS + ISA_INT2_ICW2
|
||||
#define ICW3_1 CFG_ISA_IO_BASE_ADDRESS + ISA_INT1_ICW3
|
||||
#define ICW3_2 CFG_ISA_IO_BASE_ADDRESS + ISA_INT2_ICW3
|
||||
#define ICW4_1 CFG_ISA_IO_BASE_ADDRESS + ISA_INT1_ICW4
|
||||
#define ICW4_2 CFG_ISA_IO_BASE_ADDRESS + ISA_INT2_ICW4
|
||||
#define OCW1_1 CFG_ISA_IO_BASE_ADDRESS + ISA_INT1_OCW1
|
||||
#define OCW1_2 CFG_ISA_IO_BASE_ADDRESS + ISA_INT2_OCW1
|
||||
#define OCW2_1 CFG_ISA_IO_BASE_ADDRESS + ISA_INT1_OCW2
|
||||
#define OCW2_2 CFG_ISA_IO_BASE_ADDRESS + ISA_INT2_OCW2
|
||||
#define OCW3_1 CFG_ISA_IO_BASE_ADDRESS + ISA_INT1_OCW3
|
||||
#define OCW3_2 CFG_ISA_IO_BASE_ADDRESS + ISA_INT2_OCW3
|
||||
|
||||
#define IMR_1 OCW1_1
|
||||
#define IMR_2 OCW1_2
|
||||
|
||||
#define ISR_1 ICW1_1
|
||||
#define ISR_2 ICW1_2
|
||||
|
||||
#define IPL_1 ICW1_1
|
||||
#define IPL_2 ICW1_2
|
||||
|
||||
extern void i8259_init(void);
|
||||
|
||||
extern int i8259_get_irq(struct pt_regs *regs);
|
||||
|
||||
extern void i8259_mask_and_ack(int irq);
|
||||
|
||||
extern void i8259_mask_irq(int irq);
|
||||
|
||||
extern void i8259_unmask_irq(int irq);
|
||||
266
board/MAI/AmigaOneG3SE/interrupts.c
Normal file
266
board/MAI/AmigaOneG3SE/interrupts.c
Normal file
@@ -0,0 +1,266 @@
|
||||
/*
|
||||
* (C) Copyright 2002
|
||||
* John W. Linville <linville@tuxdriver.com>
|
||||
*
|
||||
* Copied and modified from original code by Josh Huber. Original
|
||||
* copyright notice preserved below.
|
||||
*
|
||||
* (C) Copyright 2001
|
||||
* Josh Huber <huber@mclx.com>, Mission Critical Linux, Inc.
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/*
|
||||
* interrupts.c - just enough support for the decrementer/timer
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <asm/processor.h>
|
||||
#include <command.h>
|
||||
#include "i8259.h"
|
||||
|
||||
#undef DEBUG
|
||||
#ifdef DEBUG
|
||||
#define PRINTF(fmt,args...) printf (fmt ,##args)
|
||||
#else
|
||||
#define PRINTF(fmt,args...)
|
||||
#endif
|
||||
#define NR_IRQS 16
|
||||
|
||||
void irq_alloc_init(void);
|
||||
long irq_alloc(long wanted);
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
unsigned decrementer_count; /* count value for 1e6/HZ microseconds */
|
||||
|
||||
struct irq_action {
|
||||
interrupt_handler_t *handler;
|
||||
void *arg;
|
||||
ulong count;
|
||||
};
|
||||
|
||||
static struct irq_action irq_handlers[NR_IRQS];
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
static __inline__ unsigned long
|
||||
get_msr(void)
|
||||
{
|
||||
unsigned long msr;
|
||||
|
||||
asm volatile("mfmsr %0" : "=r" (msr) :);
|
||||
return msr;
|
||||
}
|
||||
|
||||
static __inline__ void
|
||||
set_msr(unsigned long msr)
|
||||
{
|
||||
asm volatile("mtmsr %0" : : "r" (msr));
|
||||
}
|
||||
|
||||
static __inline__ unsigned long
|
||||
get_dec(void)
|
||||
{
|
||||
unsigned long val;
|
||||
|
||||
asm volatile("mfdec %0" : "=r" (val) :);
|
||||
return val;
|
||||
}
|
||||
|
||||
|
||||
static __inline__ void
|
||||
set_dec(unsigned long val)
|
||||
{
|
||||
asm volatile("mtdec %0" : : "r" (val));
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
enable_interrupts(void)
|
||||
{
|
||||
set_msr (get_msr() | MSR_EE);
|
||||
}
|
||||
|
||||
/* returns flag if MSR_EE was set before */
|
||||
int
|
||||
disable_interrupts(void)
|
||||
{
|
||||
ulong msr;
|
||||
|
||||
msr = get_msr();
|
||||
set_msr (msr & ~MSR_EE);
|
||||
return ((msr & MSR_EE) != 0);
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
int interrupt_init (void)
|
||||
{
|
||||
extern void new_reset(void);
|
||||
extern void new_reset_end(void);
|
||||
#ifdef DEBUG
|
||||
puts("interrupt_init: setting decrementer_count\n");
|
||||
#endif
|
||||
decrementer_count = get_tbclk() / CFG_HZ;
|
||||
|
||||
#ifdef DEBUG
|
||||
puts("interrupt_init: setting actual decremter\n");
|
||||
#endif
|
||||
set_dec (get_tbclk() / CFG_HZ);
|
||||
|
||||
#ifdef DEBUG
|
||||
puts("interrupt_init: clearing external interrupt table\n");
|
||||
#endif
|
||||
/* clear external interrupt table here */
|
||||
memset(irq_handlers, 0, sizeof(irq_handlers));
|
||||
|
||||
#ifdef DEBUG
|
||||
puts("interrupt_init: initializing interrupt controller\n");
|
||||
#endif
|
||||
i8259_init();
|
||||
|
||||
#ifdef DEBUG
|
||||
puts("Copying reset trampoline\n");
|
||||
#endif
|
||||
/* WARNING: Assmues that the first megabyte is CACHEINHIBIT! */
|
||||
memcpy((void *)0x100, new_reset, new_reset_end - new_reset);
|
||||
|
||||
#ifdef DEBUG
|
||||
PRINTF("interrupt_init: enabling interrupts (msr = %08x)\n",
|
||||
get_msr());
|
||||
#endif
|
||||
set_msr (get_msr() | MSR_EE);
|
||||
|
||||
#ifdef DEBUG
|
||||
PRINTF("interrupt_init: done. (msr = %08x)\n", get_msr());
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
/*
|
||||
* Handle external interrupts
|
||||
*/
|
||||
void
|
||||
external_interrupt(struct pt_regs *regs)
|
||||
{
|
||||
extern int i8259_irq(void);
|
||||
|
||||
int irq, unmask = 1;
|
||||
|
||||
irq = i8259_irq(); /*i8259_get_irq(regs); */
|
||||
/* printf("irq = %d, handler at %p ack=%d\n", irq, irq_handlers[irq].handler, *(volatile unsigned char *)0xFEF00000); */
|
||||
i8259_mask_and_ack(irq);
|
||||
|
||||
if (irq_handlers[irq].handler != NULL)
|
||||
(*irq_handlers[irq].handler)(irq_handlers[irq].arg);
|
||||
else {
|
||||
PRINTF ("\nBogus External Interrupt IRQ %d\n", irq);
|
||||
/*
|
||||
* turn off the bogus interrupt, otherwise it
|
||||
* might repeat forever
|
||||
*/
|
||||
unmask = 0;
|
||||
}
|
||||
|
||||
if (unmask) i8259_unmask_irq(irq);
|
||||
}
|
||||
|
||||
volatile ulong timestamp = 0;
|
||||
|
||||
/*
|
||||
* timer_interrupt - gets called when the decrementer overflows,
|
||||
* with interrupts disabled.
|
||||
* Trivial implementation - no need to be really accurate.
|
||||
*/
|
||||
void
|
||||
timer_interrupt(struct pt_regs *regs)
|
||||
{
|
||||
set_dec(decrementer_count);
|
||||
timestamp++;
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
void
|
||||
reset_timer(void)
|
||||
{
|
||||
timestamp = 0;
|
||||
}
|
||||
|
||||
ulong
|
||||
get_timer(ulong base)
|
||||
{
|
||||
return (timestamp - base);
|
||||
}
|
||||
|
||||
void
|
||||
set_timer(ulong t)
|
||||
{
|
||||
timestamp = t;
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
/*
|
||||
* Install and free a interrupt handler.
|
||||
*/
|
||||
|
||||
void
|
||||
irq_install_handler(int irq, interrupt_handler_t *handler, void *arg)
|
||||
{
|
||||
if (irq < 0 || irq >= NR_IRQS) {
|
||||
PRINTF("irq_install_handler: bad irq number %d\n", irq);
|
||||
return;
|
||||
}
|
||||
|
||||
if (irq_handlers[irq].handler != NULL)
|
||||
PRINTF("irq_install_handler: 0x%08lx replacing 0x%08lx\n",
|
||||
(ulong)handler, (ulong)irq_handlers[irq].handler);
|
||||
|
||||
irq_handlers[irq].handler = handler;
|
||||
irq_handlers[irq].arg = arg;
|
||||
|
||||
i8259_unmask_irq(irq);
|
||||
}
|
||||
|
||||
void
|
||||
irq_free_handler(int irq)
|
||||
{
|
||||
if (irq < 0 || irq >= NR_IRQS) {
|
||||
PRINTF("irq_free_handler: bad irq number %d\n", irq);
|
||||
return;
|
||||
}
|
||||
|
||||
i8259_mask_irq(irq);
|
||||
|
||||
irq_handlers[irq].handler = NULL;
|
||||
irq_handlers[irq].arg = NULL;
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
void
|
||||
do_irqinfo(cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char *argv[])
|
||||
{
|
||||
puts("IRQ related functions are unimplemented currently.\n");
|
||||
}
|
||||
84
board/MAI/AmigaOneG3SE/macros.h
Normal file
84
board/MAI/AmigaOneG3SE/macros.h
Normal file
@@ -0,0 +1,84 @@
|
||||
|
||||
#ifndef _MACROS_H
|
||||
#define _MACROS_H
|
||||
|
||||
/*
|
||||
** Load a long integer into a register
|
||||
*/
|
||||
.macro liw reg, value
|
||||
lis \reg, \value@h
|
||||
ori \reg, \reg, \value@l
|
||||
.endm
|
||||
|
||||
|
||||
/*
|
||||
** Generate config_addr request
|
||||
** This macro expects the values in registers:
|
||||
** r3 - bus
|
||||
** r4 - devfn
|
||||
** r5 - offset
|
||||
*/
|
||||
.macro config_addr
|
||||
rlwinm r9, r5, 24, 0, 6
|
||||
rlwinm r8, r4, 16, 0, 31
|
||||
rlwinm r7, r3, 8, 0, 31
|
||||
or r9, r8, r9
|
||||
or r9, r7, r9
|
||||
ori r9, r9, 0x80
|
||||
liw r10, 0xfec00cf8
|
||||
stw r9, 0(r10)
|
||||
eieio
|
||||
sync
|
||||
.endm
|
||||
|
||||
|
||||
/*
|
||||
** Generate config_data address
|
||||
*/
|
||||
.macro config_data mask
|
||||
andi. r9, r5, \mask
|
||||
addi r9, r9, 0xcfc
|
||||
oris r9, r9, 0xfee0
|
||||
.endm
|
||||
|
||||
|
||||
/*
|
||||
** Write a byte value to an output port
|
||||
*/
|
||||
.macro outb port, value
|
||||
lis r2, 0xfe00
|
||||
li r0, \value
|
||||
stb r0, \port(r2)
|
||||
.endm
|
||||
|
||||
|
||||
/*
|
||||
** Write a register byte value to an output port
|
||||
*/
|
||||
.macro outbr port, value
|
||||
lis r2, 0xfe00
|
||||
stb \value, \port(r2)
|
||||
.endm
|
||||
|
||||
|
||||
/*
|
||||
** Read a byte value from a port into a specified register
|
||||
*/
|
||||
.macro inb reg, port
|
||||
lis r2, 0xfe00
|
||||
lbz \reg, \port(r2)
|
||||
.endm
|
||||
|
||||
|
||||
/*
|
||||
** Write a byte to the SuperIO config area
|
||||
*/
|
||||
.macro siowb offset, value
|
||||
li r3, 0
|
||||
li r4, (7<<3)
|
||||
li r5, \offset
|
||||
li r6, \value
|
||||
bl pci_write_cfg_byte
|
||||
.endm
|
||||
|
||||
#endif
|
||||
67
board/MAI/AmigaOneG3SE/memio.S
Normal file
67
board/MAI/AmigaOneG3SE/memio.S
Normal file
@@ -0,0 +1,67 @@
|
||||
#include "macros.h"
|
||||
|
||||
|
||||
.globl pci_read_cfg_byte
|
||||
|
||||
pci_read_cfg_byte:
|
||||
config_addr
|
||||
config_data 3
|
||||
eieio
|
||||
sync
|
||||
lbz r3, 0(r9)
|
||||
blr
|
||||
|
||||
|
||||
.globl pci_write_cfg_byte
|
||||
|
||||
pci_write_cfg_byte:
|
||||
config_addr
|
||||
config_data 3
|
||||
stb r6, 0(r9)
|
||||
eieio
|
||||
sync
|
||||
blr
|
||||
|
||||
|
||||
.globl pci_read_cfg_word
|
||||
|
||||
pci_read_cfg_word:
|
||||
config_addr
|
||||
config_data 2
|
||||
lhbrx r3, 0, r9
|
||||
eieio
|
||||
sync
|
||||
blr
|
||||
|
||||
|
||||
.globl pci_write_cfg_word
|
||||
|
||||
pci_write_cfg_word:
|
||||
config_addr
|
||||
config_data 2
|
||||
sthbrx r6, 0, r9
|
||||
eieio
|
||||
sync
|
||||
blr
|
||||
|
||||
|
||||
.globl pci_read_cfg_long
|
||||
|
||||
pci_read_cfg_long:
|
||||
config_addr
|
||||
config_data 0
|
||||
lwbrx r3, 0, r9
|
||||
eieio
|
||||
sync
|
||||
blr
|
||||
|
||||
|
||||
.globl pci_write_cfg_long
|
||||
|
||||
pci_write_cfg_long:
|
||||
config_addr
|
||||
config_data 0
|
||||
stwbrx r6, 0, r9
|
||||
eieio
|
||||
sync
|
||||
blr
|
||||
113
board/MAI/AmigaOneG3SE/memio.h
Normal file
113
board/MAI/AmigaOneG3SE/memio.h
Normal file
@@ -0,0 +1,113 @@
|
||||
/*
|
||||
* Memory mapped IO
|
||||
*
|
||||
* (C) Copyright 2002
|
||||
* Hyperion Entertainment, ThomasF@hyperion-entertainment.com
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
* You may also use this under a BSD license.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _MEMIO_H
|
||||
#define _MEMIO_H
|
||||
|
||||
#include "short_types.h"
|
||||
|
||||
#define IOBASE 0xFE000000
|
||||
|
||||
#define in_byte(from) read_byte( (uint8 *)(IOBASE | (from)))
|
||||
#define in_word(from) read_word_little((uint16 *)(IOBASE | (from)))
|
||||
#define in_long(from) read_long_little((uint32 *)(IOBASE | (from)))
|
||||
#define out_byte(to, val) write_byte((uint8 *)(IOBASE | (to)), val)
|
||||
#define out_word(to, val) write_word_little((uint16 *)(IOBASE | (to)), val)
|
||||
#define out_long(to, val) write_long_little((uint32 *)(IOBASE | (to)), val)
|
||||
|
||||
|
||||
static inline uint8 read_byte(volatile uint8 *from)
|
||||
{
|
||||
int x;
|
||||
asm volatile ("lbz %0,%1\n eieio\n sync" : "=r" (x) : "m" (*from));
|
||||
return (uint8)x;
|
||||
}
|
||||
|
||||
|
||||
static inline void write_byte(volatile uint8 *to, uint8 x)
|
||||
{
|
||||
asm volatile ("stb %1,%0\n eieio\n sync" : "=m" (*to) : "r" (x));
|
||||
}
|
||||
|
||||
static inline uint16 read_word_little(volatile uint16 *from)
|
||||
{
|
||||
int x;
|
||||
asm volatile ("lhbrx %0,0,%1\n eieio\n sync" : "=r" (x) : "r" (from), "m" (*from));
|
||||
return (uint16)x;
|
||||
}
|
||||
|
||||
static inline uint16 read_word_big(volatile uint16 *from)
|
||||
{
|
||||
int x;
|
||||
asm volatile ("lhz %0,%1\n eieio\n sync" : "=r" (x) : "m" (*from));
|
||||
return (uint16)x;
|
||||
}
|
||||
|
||||
static inline void write_word_little(volatile uint16 *to, int x)
|
||||
{
|
||||
asm volatile ("sthbrx %1,0,%2\n eieio\n sync" : "=m" (*to) : "r" (x), "r" (to));
|
||||
}
|
||||
|
||||
static inline void write_word_big(volatile uint16 *to, int x)
|
||||
{
|
||||
asm volatile ("sth %1,%0\n eieio\n sync" : "=m" (*to) : "r" (x));
|
||||
}
|
||||
|
||||
static inline uint32 read_long_little(volatile uint32 *from)
|
||||
{
|
||||
unsigned long x;
|
||||
asm volatile ("lwbrx %0,0,%1\n eieio\n sync" : "=r" (x) : "r" (from), "m"(*from));
|
||||
return (uint32)x;
|
||||
}
|
||||
|
||||
static inline uint32 read_long_big(volatile uint32 *from)
|
||||
{
|
||||
unsigned long x;
|
||||
asm volatile ("lwz %0,%1\n eieio\n sync" : "=r" (x) : "m" (*from));
|
||||
return (uint32)x;
|
||||
}
|
||||
|
||||
static inline void write_long_little(volatile uint32 *to, uint32 x)
|
||||
{
|
||||
asm volatile ("stwbrx %1,0,%2\n eieio\n sync" : "=m" (*to) : "r" (x), "r" (to));
|
||||
}
|
||||
|
||||
static inline void write_long_big(volatile uint32 *to, uint32 x)
|
||||
{
|
||||
asm volatile ("stw %1,%0\n eieio\n sync" : "=m" (*to) : "r" (x));
|
||||
}
|
||||
|
||||
#define CONFIG_ADDR(bus, devfn, offset) \
|
||||
write_long_big((uint32 *)0xFEC00CF8, \
|
||||
((offset & 0xFC)<<24) | (devfn << 16) \
|
||||
| (bus<<8) | 0x80);
|
||||
#define CONFIG_DATA(offset,mask) ((void *)(0xFEE00CFC+(offset & mask)))
|
||||
|
||||
|
||||
uint8 pci_read_cfg_byte(int32 bus, int32 devfn, int32 offset);
|
||||
void pci_write_cfg_byte(int32 bus, int32 devfn, int32 offset, uint8 x);
|
||||
uint16 pci_read_cfg_word(int32 bus, int32 devfn, int32 offset);
|
||||
void pci_write_cfg_word(int32 bus, int32 devfn, int32 offset, uint16 x);
|
||||
uint32 pci_read_cfg_long(int32 bus, int32 devfn, int32 offset);
|
||||
void pci_write_cfg_long(int32 bus, int32 devfn, int32 offset, uint32 x);
|
||||
|
||||
|
||||
#endif
|
||||
30
board/MAI/AmigaOneG3SE/memory_dump
Normal file
30
board/MAI/AmigaOneG3SE/memory_dump
Normal file
@@ -0,0 +1,30 @@
|
||||
64 MB:
|
||||
0x00: 80 08 04 0c 09 01 40 00 01 a0 60 00 80 08 00 01
|
||||
0x10: 8f 04 04 01 01 00 06 a0 60 00 00 14 10 14 2d 10
|
||||
0x20: 20 10 20 10 00 00 00 00 00 00 00 00 00 00 00 00
|
||||
0x30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 12 f2
|
||||
0x40: 7f 61 00 00 00 00 00 00 46 04 00 ff ff ff ff ff
|
||||
0x50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
|
||||
0x60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
|
||||
0x70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff 64 f4
|
||||
|
||||
512 MB:
|
||||
0x00: 80 08 04 0d 0a 02 40 00 01 75 54 00 82 08 00 01
|
||||
0x10: 8f 04 04 01 01 00 0f 00 00 00 00 14 0f 14 2d 40
|
||||
0x20: 15 08 15 08 00 00 00 00 00 00 00 00 00 00 00 00
|
||||
0x30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 12 d2
|
||||
0x40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|
||||
0x50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|
||||
0x60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|
||||
0x70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 64 fd
|
||||
|
||||
256 MB:
|
||||
0x00: 80 08 04 0c 0a 02 40 00 01 75 54 00 80 08 00 01
|
||||
0x10: 8f 04 06 01 01 00 0e a0 60 00 00 14 0f 14 2d 20
|
||||
0x20: 15 08 15 08 00 00 00 00 00 00 00 00 00 00 00 00
|
||||
0x30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 12 b0
|
||||
0x40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|
||||
0x50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|
||||
0x60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|
||||
0x70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 64 f6
|
||||
|
||||
36
board/MAI/AmigaOneG3SE/nvram.c
Normal file
36
board/MAI/AmigaOneG3SE/nvram.c
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* (C) Copyright 2002
|
||||
* Thomas Frieden, Hyperion Entertainment
|
||||
* ThomasF@hyperion-entertainment.com
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include "memio.h"
|
||||
|
||||
void enable_nvram(void)
|
||||
{
|
||||
pci_write_cfg_byte(0, 0, 0x56, 0x0b);
|
||||
}
|
||||
|
||||
void disable_nvram(void)
|
||||
{
|
||||
pci_write_cfg_byte(0, 0, 0x56, 0x0);
|
||||
}
|
||||
690
board/MAI/AmigaOneG3SE/ps2kbd.c
Normal file
690
board/MAI/AmigaOneG3SE/ps2kbd.c
Normal file
@@ -0,0 +1,690 @@
|
||||
/*
|
||||
* (C) Copyright 2002
|
||||
* John W. Linville, linville@tuxdriver.com
|
||||
*
|
||||
* Modified from code for support of MIP405 and PIP405 boards. Previous
|
||||
* copyright follows.
|
||||
*
|
||||
* (C) Copyright 2001
|
||||
* Denis Peter, MPL AG Switzerland, d.peter@mpl.ch
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*
|
||||
*
|
||||
* Source partly derived from:
|
||||
* linux/drivers/char/pc_keyb.c
|
||||
*
|
||||
*
|
||||
*/
|
||||
#include <common.h>
|
||||
#include <asm/processor.h>
|
||||
#include <devices.h>
|
||||
#include "ps2kbd.h"
|
||||
|
||||
|
||||
unsigned char kbd_read_status(void);
|
||||
unsigned char kbd_read_input(void);
|
||||
void kbd_send_data(unsigned char data);
|
||||
void i8259_mask_irq(unsigned int irq);
|
||||
void i8259_unmask_irq(unsigned int irq);
|
||||
|
||||
/* used only by send_data - set by keyboard_interrupt */
|
||||
|
||||
|
||||
#undef KBG_DEBUG
|
||||
|
||||
#ifdef KBG_DEBUG
|
||||
#define PRINTF(fmt,args...) printf (fmt ,##args)
|
||||
#else
|
||||
#define PRINTF(fmt,args...)
|
||||
#endif
|
||||
|
||||
#define KBD_STAT_KOBF 0x01
|
||||
#define KBD_STAT_IBF 0x02
|
||||
#define KBD_STAT_SYS 0x04
|
||||
#define KBD_STAT_CD 0x08
|
||||
#define KBD_STAT_LOCK 0x10
|
||||
#define KBD_STAT_MOBF 0x20
|
||||
#define KBD_STAT_TI_OUT 0x40
|
||||
#define KBD_STAT_PARERR 0x80
|
||||
|
||||
#define KBD_INIT_TIMEOUT 2000 /* Timeout in ms for initializing the keyboard */
|
||||
#define KBC_TIMEOUT 250 /* Timeout in ms for sending to keyboard controller */
|
||||
#define KBD_TIMEOUT 2000 /* Timeout in ms for keyboard command acknowledge */
|
||||
/*
|
||||
* Keyboard Controller Commands
|
||||
*/
|
||||
|
||||
#define KBD_CCMD_READ_MODE 0x20 /* Read mode bits */
|
||||
#define KBD_CCMD_WRITE_MODE 0x60 /* Write mode bits */
|
||||
#define KBD_CCMD_GET_VERSION 0xA1 /* Get controller version */
|
||||
#define KBD_CCMD_MOUSE_DISABLE 0xA7 /* Disable mouse interface */
|
||||
#define KBD_CCMD_MOUSE_ENABLE 0xA8 /* Enable mouse interface */
|
||||
#define KBD_CCMD_TEST_MOUSE 0xA9 /* Mouse interface test */
|
||||
#define KBD_CCMD_SELF_TEST 0xAA /* Controller self test */
|
||||
#define KBD_CCMD_KBD_TEST 0xAB /* Keyboard interface test */
|
||||
#define KBD_CCMD_KBD_DISABLE 0xAD /* Keyboard interface disable */
|
||||
#define KBD_CCMD_KBD_ENABLE 0xAE /* Keyboard interface enable */
|
||||
#define KBD_CCMD_WRITE_AUX_OBUF 0xD3 /* Write to output buffer as if
|
||||
initiated by the auxiliary device */
|
||||
#define KBD_CCMD_WRITE_MOUSE 0xD4 /* Write the following byte to the mouse */
|
||||
|
||||
/*
|
||||
* Keyboard Commands
|
||||
*/
|
||||
|
||||
#define KBD_CMD_SET_LEDS 0xED /* Set keyboard leds */
|
||||
#define KBD_CMD_SET_RATE 0xF3 /* Set typematic rate */
|
||||
#define KBD_CMD_ENABLE 0xF4 /* Enable scanning */
|
||||
#define KBD_CMD_DISABLE 0xF5 /* Disable scanning */
|
||||
#define KBD_CMD_RESET 0xFF /* Reset */
|
||||
|
||||
/*
|
||||
* Keyboard Replies
|
||||
*/
|
||||
|
||||
#define KBD_REPLY_POR 0xAA /* Power on reset */
|
||||
#define KBD_REPLY_ACK 0xFA /* Command ACK */
|
||||
#define KBD_REPLY_RESEND 0xFE /* Command NACK, send the cmd again */
|
||||
|
||||
/*
|
||||
* Status Register Bits
|
||||
*/
|
||||
|
||||
#define KBD_STAT_OBF 0x01 /* Keyboard output buffer full */
|
||||
#define KBD_STAT_IBF 0x02 /* Keyboard input buffer full */
|
||||
#define KBD_STAT_SELFTEST 0x04 /* Self test successful */
|
||||
#define KBD_STAT_CMD 0x08 /* Last write was a command write (0=data) */
|
||||
#define KBD_STAT_UNLOCKED 0x10 /* Zero if keyboard locked */
|
||||
#define KBD_STAT_MOUSE_OBF 0x20 /* Mouse output buffer full */
|
||||
#define KBD_STAT_GTO 0x40 /* General receive/xmit timeout */
|
||||
#define KBD_STAT_PERR 0x80 /* Parity error */
|
||||
|
||||
#define AUX_STAT_OBF (KBD_STAT_OBF | KBD_STAT_MOUSE_OBF)
|
||||
|
||||
/*
|
||||
* Controller Mode Register Bits
|
||||
*/
|
||||
|
||||
#define KBD_MODE_KBD_INT 0x01 /* Keyboard data generate IRQ1 */
|
||||
#define KBD_MODE_MOUSE_INT 0x02 /* Mouse data generate IRQ12 */
|
||||
#define KBD_MODE_SYS 0x04 /* The system flag (?) */
|
||||
#define KBD_MODE_NO_KEYLOCK 0x08 /* The keylock doesn't affect the keyboard if set */
|
||||
#define KBD_MODE_DISABLE_KBD 0x10 /* Disable keyboard interface */
|
||||
#define KBD_MODE_DISABLE_MOUSE 0x20 /* Disable mouse interface */
|
||||
#define KBD_MODE_KCC 0x40 /* Scan code conversion to PC format */
|
||||
#define KBD_MODE_RFU 0x80
|
||||
|
||||
|
||||
#define KDB_DATA_PORT 0x60
|
||||
#define KDB_COMMAND_PORT 0x64
|
||||
|
||||
#define LED_SCR 0x01 /* scroll lock led */
|
||||
#define LED_CAP 0x04 /* caps lock led */
|
||||
#define LED_NUM 0x02 /* num lock led */
|
||||
|
||||
#define KBD_BUFFER_LEN 0x20 /* size of the keyboardbuffer */
|
||||
|
||||
|
||||
static volatile char kbd_buffer[KBD_BUFFER_LEN];
|
||||
static volatile int in_pointer = 0;
|
||||
static volatile int out_pointer = 0;
|
||||
|
||||
|
||||
static unsigned char num_lock = 0;
|
||||
static unsigned char caps_lock = 0;
|
||||
static unsigned char scroll_lock = 0;
|
||||
static unsigned char shift = 0;
|
||||
static unsigned char ctrl = 0;
|
||||
static unsigned char alt = 0;
|
||||
static unsigned char e0 = 0;
|
||||
static unsigned char leds = 0;
|
||||
|
||||
#define DEVNAME "ps2kbd"
|
||||
|
||||
/* Simple translation table for the keys */
|
||||
|
||||
static unsigned char kbd_plain_xlate[] = {
|
||||
0xff,0x1b, '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '=','\b','\t', /* 0x00 - 0x0f */
|
||||
'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', '[', ']','\r',0xff, 'a', 's', /* 0x10 - 0x1f */
|
||||
'd', 'f', 'g', 'h', 'j', 'k', 'l', ';','\'', '`',0xff,'\\', 'z', 'x', 'c', 'v', /* 0x20 - 0x2f */
|
||||
'b', 'n', 'm', ',', '.', '/',0xff,0xff,0xff, ' ',0xff,0xff,0xff,0xff,0xff,0xff, /* 0x30 - 0x3f */
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff, '7', '8', '9', '-', '4', '5', '6', '+', '1', /* 0x40 - 0x4f */
|
||||
'2', '3', '0', '.',0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 0x50 - 0x5F */
|
||||
'\r',0xff,0xff
|
||||
};
|
||||
|
||||
static unsigned char kbd_shift_xlate[] = {
|
||||
0xff,0x1b, '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', '+','\b','\t', /* 0x00 - 0x0f */
|
||||
'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', '{', '}','\r',0xff, 'A', 'S', /* 0x10 - 0x1f */
|
||||
'D', 'F', 'G', 'H', 'J', 'K', 'L', ':', '"', '~',0xff, '|', 'Z', 'X', 'C', 'V', /* 0x20 - 0x2f */
|
||||
'B', 'N', 'M', '<', '>', '?',0xff,0xff,0xff, ' ',0xff,0xff,0xff,0xff,0xff,0xff, /* 0x30 - 0x3f */
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff, '7', '8', '9', '-', '4', '5', '6', '+', '1', /* 0x40 - 0x4f */
|
||||
'2', '3', '0', '.',0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 0x50 - 0x5F */
|
||||
'\r',0xff,0xff
|
||||
};
|
||||
|
||||
static unsigned char kbd_ctrl_xlate[] = {
|
||||
0xff,0x1b, '1',0x00, '3', '4', '5',0x1E, '7', '8', '9', '0',0x1F, '=','\b','\t', /* 0x00 - 0x0f */
|
||||
0x11,0x17,0x05,0x12,0x14,0x18,0x15,0x09,0x0f,0x10,0x1b,0x1d,'\n',0xff,0x01,0x13, /* 0x10 - 0x1f */
|
||||
0x04,0x06,0x08,0x09,0x0a,0x0b,0x0c, ';','\'', '~',0x00,0x1c,0x1a,0x18,0x03,0x16, /* 0x20 - 0x2f */
|
||||
0x02,0x0e,0x0d, '<', '>', '?',0xff,0xff,0xff,0x00,0xff,0xff,0xff,0xff,0xff,0xff, /* 0x30 - 0x3f */
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff, '7', '8', '9', '-', '4', '5', '6', '+', '1', /* 0x40 - 0x4f */
|
||||
'2', '3', '0', '.',0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 0x50 - 0x5F */
|
||||
'\r',0xff,0xff
|
||||
};
|
||||
|
||||
/******************************************************************
|
||||
* Init
|
||||
******************************************************************/
|
||||
|
||||
int isa_kbd_init(void)
|
||||
{
|
||||
char* result;
|
||||
result=kbd_initialize();
|
||||
if (result != NULL)
|
||||
{
|
||||
result = kbd_initialize();
|
||||
}
|
||||
if(result==NULL) {
|
||||
printf("AT Keyboard initialized\n");
|
||||
irq_install_handler(KBD_INTERRUPT, (interrupt_handler_t *)kbd_interrupt, NULL);
|
||||
return (1);
|
||||
}
|
||||
else {
|
||||
printf("%s\n",result);
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CFG_CONSOLE_OVERWRITE_ROUTINE
|
||||
extern int overwrite_console (void);
|
||||
#else
|
||||
int overwrite_console (void)
|
||||
{
|
||||
return (0);
|
||||
}
|
||||
#endif
|
||||
|
||||
int drv_isa_kbd_init (void)
|
||||
{
|
||||
int error;
|
||||
device_t kbddev ;
|
||||
char *stdinname = getenv ("stdin");
|
||||
|
||||
if(isa_kbd_init()==-1)
|
||||
return -1;
|
||||
memset (&kbddev, 0, sizeof(kbddev));
|
||||
strcpy(kbddev.name, DEVNAME);
|
||||
kbddev.flags = DEV_FLAGS_INPUT | DEV_FLAGS_SYSTEM;
|
||||
kbddev.putc = NULL ;
|
||||
kbddev.puts = NULL ;
|
||||
kbddev.getc = kbd_getc ;
|
||||
kbddev.tstc = kbd_testc ;
|
||||
|
||||
error = device_register (&kbddev);
|
||||
if(error==0) {
|
||||
/* check if this is the standard input device */
|
||||
if(strcmp(stdinname,DEVNAME)==0) {
|
||||
/* reassign the console */
|
||||
if(overwrite_console()) {
|
||||
return 1;
|
||||
}
|
||||
error=console_assign(stdin,DEVNAME);
|
||||
if(error==0)
|
||||
return 1;
|
||||
else
|
||||
return error;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
return error;
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
* Queue handling
|
||||
******************************************************************/
|
||||
/* puts character in the queue and sets up the in and out pointer */
|
||||
void kbd_put_queue(char data)
|
||||
{
|
||||
if((in_pointer+1)==KBD_BUFFER_LEN) {
|
||||
if(out_pointer==0) {
|
||||
return; /* buffer full */
|
||||
} else{
|
||||
in_pointer=0;
|
||||
}
|
||||
} else {
|
||||
if((in_pointer+1)==out_pointer)
|
||||
return; /* buffer full */
|
||||
in_pointer++;
|
||||
}
|
||||
kbd_buffer[in_pointer]=data;
|
||||
return;
|
||||
}
|
||||
|
||||
/* test if a character is in the queue */
|
||||
int kbd_testc(void)
|
||||
{
|
||||
if(in_pointer==out_pointer)
|
||||
return(0); /* no data */
|
||||
else
|
||||
return(1);
|
||||
}
|
||||
/* gets the character from the queue */
|
||||
int kbd_getc(void)
|
||||
{
|
||||
char c;
|
||||
|
||||
while(in_pointer==out_pointer);
|
||||
if((out_pointer+1)==KBD_BUFFER_LEN)
|
||||
out_pointer=0;
|
||||
else
|
||||
out_pointer++;
|
||||
c=kbd_buffer[out_pointer];
|
||||
return (int)c;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* set LEDs */
|
||||
|
||||
void kbd_set_leds(void)
|
||||
{
|
||||
if(caps_lock==0)
|
||||
leds&=~LED_CAP; /* switch caps_lock off */
|
||||
else
|
||||
leds|=LED_CAP; /* switch on LED */
|
||||
if(num_lock==0)
|
||||
leds&=~LED_NUM; /* switch LED off */
|
||||
else
|
||||
leds|=LED_NUM; /* switch on LED */
|
||||
if(scroll_lock==0)
|
||||
leds&=~LED_SCR; /* switch LED off */
|
||||
else
|
||||
leds|=LED_SCR; /* switch on LED */
|
||||
kbd_send_data(KBD_CMD_SET_LEDS);
|
||||
kbd_send_data(leds);
|
||||
}
|
||||
|
||||
|
||||
void handle_keyboard_event(unsigned char scancode)
|
||||
{
|
||||
unsigned char keycode;
|
||||
|
||||
/* Convert scancode to keycode */
|
||||
PRINTF("scancode %x\n",scancode);
|
||||
if(scancode==0xe0) {
|
||||
e0=1; /* special charakters */
|
||||
return;
|
||||
}
|
||||
if(e0==1) {
|
||||
e0=0; /* delete flag */
|
||||
if(!( ((scancode&0x7F)==0x38)|| /* the right ctrl key */
|
||||
((scancode&0x7F)==0x1D)|| /* the right alt key */
|
||||
((scancode&0x7F)==0x35)|| /* the right '/' key */
|
||||
((scancode&0x7F)==0x1C)|| /* the right enter key */
|
||||
((scancode)==0x48)|| /* arrow up */
|
||||
((scancode)==0x50)|| /* arrow down */
|
||||
((scancode)==0x4b)|| /* arrow left */
|
||||
((scancode)==0x4d))) /* arrow right */
|
||||
/* we swallow unknown e0 codes */
|
||||
return;
|
||||
}
|
||||
/* special cntrl keys */
|
||||
switch(scancode)
|
||||
{
|
||||
case 0x48:
|
||||
kbd_put_queue(27);
|
||||
kbd_put_queue(91);
|
||||
kbd_put_queue('A');
|
||||
return;
|
||||
case 0x50:
|
||||
kbd_put_queue(27);
|
||||
kbd_put_queue(91);
|
||||
kbd_put_queue('B');
|
||||
return;
|
||||
case 0x4b:
|
||||
kbd_put_queue(27);
|
||||
kbd_put_queue(91);
|
||||
kbd_put_queue('D');
|
||||
return;
|
||||
case 0x4D:
|
||||
kbd_put_queue(27);
|
||||
kbd_put_queue(91);
|
||||
kbd_put_queue('C');
|
||||
return;
|
||||
case 0x58: /* F12 key */
|
||||
if (ctrl == 1)
|
||||
{
|
||||
extern int console_changed;
|
||||
setenv("stdin", DEVNAME);
|
||||
setenv("stdout", "vga");
|
||||
console_changed = 1;
|
||||
}
|
||||
return;
|
||||
case 0x2A:
|
||||
case 0x36: /* shift pressed */
|
||||
shift=1;
|
||||
return; /* do nothing else */
|
||||
case 0xAA:
|
||||
case 0xB6: /* shift released */
|
||||
shift=0;
|
||||
return; /* do nothing else */
|
||||
case 0x38: /* alt pressed */
|
||||
alt=1;
|
||||
return; /* do nothing else */
|
||||
case 0xB8: /* alt released */
|
||||
alt=0;
|
||||
return; /* do nothing else */
|
||||
case 0x1d: /* ctrl pressed */
|
||||
ctrl=1;
|
||||
return; /* do nothing else */
|
||||
case 0x9d: /* ctrl released */
|
||||
ctrl=0;
|
||||
return; /* do nothing else */
|
||||
case 0x46: /* scrollock pressed */
|
||||
scroll_lock=~scroll_lock;
|
||||
kbd_set_leds();
|
||||
return; /* do nothing else */
|
||||
case 0x3A: /* capslock pressed */
|
||||
caps_lock=~caps_lock;
|
||||
kbd_set_leds();
|
||||
return;
|
||||
case 0x45: /* numlock pressed */
|
||||
num_lock=~num_lock;
|
||||
kbd_set_leds();
|
||||
return;
|
||||
case 0xC6: /* scroll lock released */
|
||||
case 0xC5: /* num lock released */
|
||||
case 0xBA: /* caps lock released */
|
||||
return; /* just swallow */
|
||||
}
|
||||
if((scancode&0x80)==0x80) /* key released */
|
||||
return;
|
||||
/* now, decide which table we need */
|
||||
if(scancode > (sizeof(kbd_plain_xlate)/sizeof(kbd_plain_xlate[0]))) { /* scancode not in list */
|
||||
PRINTF("unkown scancode %X\n",scancode);
|
||||
return; /* swallow it */
|
||||
}
|
||||
/* setup plain code first */
|
||||
keycode=kbd_plain_xlate[scancode];
|
||||
if(caps_lock==1) { /* caps_lock is pressed, overwrite plain code */
|
||||
if(scancode > (sizeof(kbd_shift_xlate)/sizeof(kbd_shift_xlate[0]))) { /* scancode not in list */
|
||||
PRINTF("unkown caps-locked scancode %X\n",scancode);
|
||||
return; /* swallow it */
|
||||
}
|
||||
keycode=kbd_shift_xlate[scancode];
|
||||
if(keycode<'A') { /* we only want the alphas capital */
|
||||
keycode=kbd_plain_xlate[scancode];
|
||||
}
|
||||
}
|
||||
if(shift==1) { /* shift overwrites caps_lock */
|
||||
if(scancode > (sizeof(kbd_shift_xlate)/sizeof(kbd_shift_xlate[0]))) { /* scancode not in list */
|
||||
PRINTF("unkown shifted scancode %X\n",scancode);
|
||||
return; /* swallow it */
|
||||
}
|
||||
keycode=kbd_shift_xlate[scancode];
|
||||
}
|
||||
if(ctrl==1) { /* ctrl overwrites caps_lock and shift */
|
||||
if(scancode > (sizeof(kbd_ctrl_xlate)/sizeof(kbd_ctrl_xlate[0]))) { /* scancode not in list */
|
||||
PRINTF("unkown ctrl scancode %X\n",scancode);
|
||||
return; /* swallow it */
|
||||
}
|
||||
keycode=kbd_ctrl_xlate[scancode];
|
||||
}
|
||||
/* check if valid keycode */
|
||||
if(keycode==0xff) {
|
||||
PRINTF("unkown scancode %X\n",scancode);
|
||||
return; /* swallow unknown codes */
|
||||
}
|
||||
|
||||
kbd_put_queue(keycode);
|
||||
PRINTF("%x\n",keycode);
|
||||
}
|
||||
|
||||
/*
|
||||
* This reads the keyboard status port, and does the
|
||||
* appropriate action.
|
||||
*
|
||||
*/
|
||||
unsigned char handle_kbd_event(void)
|
||||
{
|
||||
unsigned char status = kbd_read_status();
|
||||
unsigned int work = 10000;
|
||||
|
||||
while ((--work > 0) && (status & KBD_STAT_OBF)) {
|
||||
unsigned char scancode;
|
||||
|
||||
scancode = kbd_read_input();
|
||||
|
||||
/* Error bytes must be ignored to make the
|
||||
Synaptics touchpads compaq use work */
|
||||
/* Ignore error bytes */
|
||||
if (!(status & (KBD_STAT_GTO | KBD_STAT_PERR)))
|
||||
{
|
||||
if (status & KBD_STAT_MOUSE_OBF)
|
||||
; /* not supported: handle_mouse_event(scancode); */
|
||||
else
|
||||
handle_keyboard_event(scancode);
|
||||
}
|
||||
status = kbd_read_status();
|
||||
}
|
||||
if (!work)
|
||||
PRINTF("pc_keyb: controller jammed (0x%02X).\n", status);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* Lowlevel Part of keyboard section
|
||||
*/
|
||||
unsigned char kbd_read_status(void)
|
||||
{
|
||||
return(in8(CFG_ISA_IO_BASE_ADDRESS + KDB_COMMAND_PORT));
|
||||
}
|
||||
|
||||
unsigned char kbd_read_input(void)
|
||||
{
|
||||
return(in8(CFG_ISA_IO_BASE_ADDRESS + KDB_DATA_PORT));
|
||||
}
|
||||
|
||||
void kbd_write_command(unsigned char cmd)
|
||||
{
|
||||
out8(CFG_ISA_IO_BASE_ADDRESS + KDB_COMMAND_PORT,cmd);
|
||||
}
|
||||
|
||||
void kbd_write_output(unsigned char data)
|
||||
{
|
||||
out8(CFG_ISA_IO_BASE_ADDRESS + KDB_DATA_PORT, data);
|
||||
}
|
||||
|
||||
int kbd_read_data(void)
|
||||
{
|
||||
int val;
|
||||
unsigned char status;
|
||||
|
||||
val=-1;
|
||||
status = kbd_read_status();
|
||||
if (status & KBD_STAT_OBF) {
|
||||
val = kbd_read_input();
|
||||
if (status & (KBD_STAT_GTO | KBD_STAT_PERR))
|
||||
val = -2;
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
||||
int kbd_wait_for_input(void)
|
||||
{
|
||||
unsigned long timeout;
|
||||
int val;
|
||||
|
||||
timeout = KBD_TIMEOUT;
|
||||
val=kbd_read_data();
|
||||
while(val < 0)
|
||||
{
|
||||
if(timeout--==0)
|
||||
return -1;
|
||||
udelay(1000);
|
||||
val=kbd_read_data();
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
||||
|
||||
int kb_wait(void)
|
||||
{
|
||||
unsigned long timeout = KBC_TIMEOUT * 10;
|
||||
|
||||
do {
|
||||
unsigned char status = handle_kbd_event();
|
||||
if (!(status & KBD_STAT_IBF))
|
||||
return 0; /* ok */
|
||||
udelay(1000);
|
||||
timeout--;
|
||||
} while (timeout);
|
||||
return 1;
|
||||
}
|
||||
|
||||
void kbd_write_command_w(int data)
|
||||
{
|
||||
if(kb_wait())
|
||||
PRINTF("timeout in kbd_write_command_w\n");
|
||||
kbd_write_command(data);
|
||||
}
|
||||
|
||||
void kbd_write_output_w(int data)
|
||||
{
|
||||
if(kb_wait())
|
||||
PRINTF("timeout in kbd_write_output_w\n");
|
||||
kbd_write_output(data);
|
||||
}
|
||||
|
||||
void kbd_send_data(unsigned char data)
|
||||
{
|
||||
unsigned char status;
|
||||
i8259_mask_irq(KBD_INTERRUPT); /* disable interrupt */
|
||||
kbd_write_output_w(data);
|
||||
status = kbd_wait_for_input();
|
||||
if (status == KBD_REPLY_ACK)
|
||||
i8259_unmask_irq(KBD_INTERRUPT); /* enable interrupt */
|
||||
}
|
||||
|
||||
|
||||
char * kbd_initialize(void)
|
||||
{
|
||||
int status;
|
||||
|
||||
in_pointer = 0; /* delete in Buffer */
|
||||
out_pointer = 0;
|
||||
/*
|
||||
* Test the keyboard interface.
|
||||
* This seems to be the only way to get it going.
|
||||
* If the test is successful a x55 is placed in the input buffer.
|
||||
*/
|
||||
kbd_write_command_w(KBD_CCMD_SELF_TEST);
|
||||
if (kbd_wait_for_input() != 0x55)
|
||||
return "Kbd: failed self test";
|
||||
/*
|
||||
* Perform a keyboard interface test. This causes the controller
|
||||
* to test the keyboard clock and data lines. The results of the
|
||||
* test are placed in the input buffer.
|
||||
*/
|
||||
kbd_write_command_w(KBD_CCMD_KBD_TEST);
|
||||
if (kbd_wait_for_input() != 0x00)
|
||||
return "Kbd: interface failed self test";
|
||||
/*
|
||||
* Enable the keyboard by allowing the keyboard clock to run.
|
||||
*/
|
||||
kbd_write_command_w(KBD_CCMD_KBD_ENABLE);
|
||||
status = kbd_wait_for_input();
|
||||
/*
|
||||
* Reset keyboard. If the read times out
|
||||
* then the assumption is that no keyboard is
|
||||
* plugged into the machine.
|
||||
* This defaults the keyboard to scan-code set 2.
|
||||
*
|
||||
* Set up to try again if the keyboard asks for RESEND.
|
||||
*/
|
||||
do {
|
||||
kbd_write_output_w(KBD_CMD_RESET);
|
||||
status = kbd_wait_for_input();
|
||||
if (status == KBD_REPLY_ACK)
|
||||
break;
|
||||
if (status != KBD_REPLY_RESEND)
|
||||
{
|
||||
PRINTF("status: %X\n",status);
|
||||
return "Kbd: reset failed, no ACK";
|
||||
}
|
||||
} while (1);
|
||||
if (kbd_wait_for_input() != KBD_REPLY_POR)
|
||||
return "Kbd: reset failed, no POR";
|
||||
|
||||
/*
|
||||
* Set keyboard controller mode. During this, the keyboard should be
|
||||
* in the disabled state.
|
||||
*
|
||||
* Set up to try again if the keyboard asks for RESEND.
|
||||
*/
|
||||
do {
|
||||
kbd_write_output_w(KBD_CMD_DISABLE);
|
||||
status = kbd_wait_for_input();
|
||||
if (status == KBD_REPLY_ACK)
|
||||
break;
|
||||
if (status != KBD_REPLY_RESEND)
|
||||
return "Kbd: disable keyboard: no ACK";
|
||||
} while (1);
|
||||
|
||||
kbd_write_command_w(KBD_CCMD_WRITE_MODE);
|
||||
kbd_write_output_w(KBD_MODE_KBD_INT
|
||||
| KBD_MODE_SYS
|
||||
| KBD_MODE_DISABLE_MOUSE
|
||||
| KBD_MODE_KCC);
|
||||
|
||||
/* AMCC powerpc portables need this to use scan-code set 1 -- Cort */
|
||||
kbd_write_command_w(KBD_CCMD_READ_MODE);
|
||||
if (!(kbd_wait_for_input() & KBD_MODE_KCC)) {
|
||||
/*
|
||||
* If the controller does not support conversion,
|
||||
* Set the keyboard to scan-code set 1.
|
||||
*/
|
||||
kbd_write_output_w(0xF0);
|
||||
kbd_wait_for_input();
|
||||
kbd_write_output_w(0x01);
|
||||
kbd_wait_for_input();
|
||||
}
|
||||
kbd_write_output_w(KBD_CMD_ENABLE);
|
||||
if (kbd_wait_for_input() != KBD_REPLY_ACK)
|
||||
return "Kbd: enable keyboard: no ACK";
|
||||
|
||||
/*
|
||||
* Finally, set the typematic rate to maximum.
|
||||
*/
|
||||
kbd_write_output_w(KBD_CMD_SET_RATE);
|
||||
if (kbd_wait_for_input() != KBD_REPLY_ACK)
|
||||
return "Kbd: Set rate: no ACK";
|
||||
kbd_write_output_w(0x00);
|
||||
if (kbd_wait_for_input() != KBD_REPLY_ACK)
|
||||
return "Kbd: Set rate: no ACK";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void kbd_interrupt(void)
|
||||
{
|
||||
handle_kbd_event();
|
||||
}
|
||||
41
board/MAI/AmigaOneG3SE/ps2kbd.h
Normal file
41
board/MAI/AmigaOneG3SE/ps2kbd.h
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* (C) Copyright 2002
|
||||
* John W. Linville, linville@tuxdriver.com
|
||||
*
|
||||
* Modified from code for support of MIP405 and PIP405 boards. Previous
|
||||
* copyright follows.
|
||||
*
|
||||
* (C) Copyright 2001
|
||||
* Denis Peter, MPL AG Switzerland, d.peter@mpl.ch
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _KBD_H_
|
||||
#define _KBD_H_
|
||||
|
||||
extern int kbd_testc(void);
|
||||
extern int kbd_getc(void);
|
||||
extern void kbd_interrupt(void);
|
||||
extern char *kbd_initialize(void);
|
||||
|
||||
unsigned char kbd_is_init(void);
|
||||
#define KBD_INTERRUPT 1
|
||||
#endif
|
||||
245
board/MAI/AmigaOneG3SE/serial.c
Normal file
245
board/MAI/AmigaOneG3SE/serial.c
Normal file
@@ -0,0 +1,245 @@
|
||||
#include <common.h>
|
||||
#include <ns16550.h>
|
||||
#include "short_types.h"
|
||||
#include "memio.h"
|
||||
#include "articiaS.h"
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
#ifndef CFG_NS16550
|
||||
static uint32 ComPort1;
|
||||
|
||||
uint16 SerialEcho = 1;
|
||||
|
||||
|
||||
#define RECEIVER_HOLDING 0
|
||||
#define TRANSMITTER_HOLDING 0
|
||||
#define INTERRUPT_ENABLE 1
|
||||
#define INTERRUPT_STATUS 2
|
||||
#define FIFO_CONTROL 2
|
||||
#define LINE_CONTROL 3
|
||||
#define MODEM_CONTROL 4
|
||||
#define LINE_STATUS 5
|
||||
#define MODEM_STATUS 6
|
||||
#define SCRATCH_PAD 7
|
||||
|
||||
#define DIVISOR_LATCH_LSB 0
|
||||
#define DIVISOR_LATCH_MSB 1
|
||||
#define PRESCALER_DIVISION 5
|
||||
|
||||
#define COM_WRITE_BYTE(reg, byte) out_byte((ComPort1+reg), byte)
|
||||
#define COM_READ_BYTE(reg) in_byte((ComPort1+reg))
|
||||
|
||||
static int serial_init_done = 0;
|
||||
|
||||
void serial_init (void)
|
||||
{
|
||||
#if 0
|
||||
uint32 clock_divisor = 115200 / baudrate;
|
||||
uint8 cfg;
|
||||
uint8 a;
|
||||
uint16 devfn = 7 << 3;
|
||||
|
||||
if (serial_init_done)
|
||||
return;
|
||||
|
||||
/* Enter configuration mode */
|
||||
cfg = pci_read_cfg_byte (0, devfn, 0x85);
|
||||
pci_write_cfg_byte (0, devfn, 0x85, cfg | 0x02);
|
||||
|
||||
/* Set serial port COM1 as 3F8 */
|
||||
out_byte (0x3F0, 0xE7);
|
||||
out_byte (0x3f1, 0xfe);
|
||||
|
||||
/* Set serial port COM2 as 2F8 */
|
||||
out_byte (0x3f0, 0xe8);
|
||||
out_byte (0x3f1, 0xeb);
|
||||
|
||||
/* Enable */
|
||||
out_byte (0x3f0, 0xe2);
|
||||
a = in_byte (0x3f1);
|
||||
a |= 0xc;
|
||||
out_byte (0x3f0, 0xe2);
|
||||
out_byte (0x3f1, a);
|
||||
|
||||
/* Reset the configuration mode */
|
||||
pci_write_cfg_byte (0, devfn, 0x85, cfg);
|
||||
#endif
|
||||
|
||||
ComPort1 = 0x3F8;
|
||||
|
||||
/* Disable interrupts */
|
||||
COM_WRITE_BYTE (INTERRUPT_ENABLE, 0x00);
|
||||
|
||||
/* Set baud rate */
|
||||
/* COM_WRITE_BYTE(LINE_CONTROL, 0x83); */
|
||||
/* COM_WRITE_BYTE(DIVISOR_LATCH_LSB, (uint8)(clock_divisor & 0xFF)); */
|
||||
/* COM_WRITE_BYTE(DIVISOR_LATCH_MSB, (uint8)(clock_divisor >> 8)); */
|
||||
/* __asm("eieio"); */
|
||||
|
||||
/* Set 8-N-1 */
|
||||
COM_WRITE_BYTE (LINE_CONTROL, 0x03);
|
||||
__asm ("eieio");
|
||||
|
||||
/* Disable FIFO */
|
||||
COM_WRITE_BYTE (MODEM_CONTROL, 0x03);
|
||||
COM_WRITE_BYTE (FIFO_CONTROL, 0x07);
|
||||
|
||||
__asm ("eieio");
|
||||
serial_init_done = 1;
|
||||
}
|
||||
|
||||
extern int console_changed;
|
||||
|
||||
void serial_putc (const char sendme)
|
||||
{
|
||||
if (sendme == '\n') {
|
||||
while ((in_byte (0x3FD) & 0x40) == 0);
|
||||
out_byte (0x3f8, 0x0D);
|
||||
}
|
||||
|
||||
while ((in_byte (0x3FD) & 0x40) == 0);
|
||||
out_byte (0x3f8, sendme);
|
||||
}
|
||||
|
||||
int serial_getc (void)
|
||||
{
|
||||
#if 0
|
||||
uint8 c;
|
||||
|
||||
for (;;) {
|
||||
uint8 x = in_byte (0x3FD);
|
||||
|
||||
if (x & 0x01)
|
||||
break;
|
||||
|
||||
if (x & 0x0C)
|
||||
out_byte (0x3fd, 0x0c);
|
||||
}
|
||||
|
||||
c = in_byte (0x3F8);
|
||||
|
||||
return c;
|
||||
#else
|
||||
while ((in_byte (0x3FD) & 0x01) == 0) {
|
||||
if (console_changed != 0) {
|
||||
printf ("Console changed\n");
|
||||
console_changed = 0;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return in_byte (0x3F8);
|
||||
#endif
|
||||
}
|
||||
|
||||
int serial_tstc (void)
|
||||
{
|
||||
return (in_byte (0x03FD) & 0x01) != 0;
|
||||
}
|
||||
|
||||
void serial_debug_putc (int c)
|
||||
{
|
||||
serial_puts ("DBG");
|
||||
serial_putc (c);
|
||||
serial_putc (0x0d);
|
||||
serial_putc (0x0A);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
const NS16550_t Com0 = (NS16550_t) CFG_NS16550_COM1;
|
||||
const NS16550_t Com1 = (NS16550_t) CFG_NS16550_COM2;
|
||||
|
||||
int serial_init (void)
|
||||
{
|
||||
uint32 clock_divisor = 115200 / gd->baudrate;
|
||||
|
||||
NS16550_init (Com0, clock_divisor);
|
||||
/* NS16550_reinit(Com1, clock_divisor); */
|
||||
/* serial_puts("COM1: 3F8h initalized"); */
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
#if 0
|
||||
void serial_putc (const char c)
|
||||
{
|
||||
NS16550_putc (Com0, c);
|
||||
if (c == '\n')
|
||||
NS16550_putc (Com0, 0x0D);
|
||||
}
|
||||
|
||||
int serial_getc (void)
|
||||
{
|
||||
return (int) NS16550_getc (Com0);
|
||||
}
|
||||
|
||||
int serial_tstc (void)
|
||||
{
|
||||
return NS16550_tstc (Com0);
|
||||
}
|
||||
#else
|
||||
void serial_putc (const char sendme)
|
||||
{
|
||||
if (sendme == '\n') {
|
||||
while ((in_byte (0x3FD) & 0x40) == 0);
|
||||
out_byte (0x3f8, 0x0D);
|
||||
}
|
||||
|
||||
while ((in_byte (0x3FD) & 0x40) == 0);
|
||||
out_byte (0x3f8, sendme);
|
||||
}
|
||||
|
||||
|
||||
extern int console_changed;
|
||||
|
||||
int serial_getc (void)
|
||||
{
|
||||
#if 0
|
||||
uint8 c;
|
||||
|
||||
for (;;) {
|
||||
uint8 x = in_byte (0x3FD);
|
||||
|
||||
if (x & 0x01)
|
||||
break;
|
||||
|
||||
if (x & 0x0C)
|
||||
out_byte (0x3fd, 0x0c);
|
||||
}
|
||||
|
||||
c = in_byte (0x3F8);
|
||||
|
||||
return c;
|
||||
#else
|
||||
while ((in_byte (0x3FD) & 0x01) == 0) {
|
||||
if (console_changed != 0) {
|
||||
console_changed = 0;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return in_byte (0x3F8);
|
||||
#endif
|
||||
}
|
||||
|
||||
int serial_tstc (void)
|
||||
{
|
||||
return (in_byte (0x03FD) & 0x01) != 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
void serial_puts (const char *string)
|
||||
{
|
||||
while (*string)
|
||||
serial_putc (*string++);
|
||||
}
|
||||
|
||||
void serial_setbrg (void)
|
||||
{
|
||||
uint32 clock_divisor = 115200 / gd->baudrate;
|
||||
|
||||
NS16550_init (Com0, clock_divisor);
|
||||
}
|
||||
36
board/MAI/AmigaOneG3SE/short_types.h
Normal file
36
board/MAI/AmigaOneG3SE/short_types.h
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* short type names
|
||||
*
|
||||
* (C) Copyright 2002
|
||||
* Hyperion Entertainment, ThomasF@hyperion-entertainment.com
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef _SHORT_TYPES_H
|
||||
#define _SHORT_TYPES_H
|
||||
|
||||
typedef unsigned long uint32;
|
||||
typedef long int32;
|
||||
typedef unsigned short uint16;
|
||||
typedef short int16;
|
||||
typedef unsigned char uint8;
|
||||
typedef signed char int8;
|
||||
|
||||
#endif
|
||||
206
board/MAI/AmigaOneG3SE/smbus.c
Normal file
206
board/MAI/AmigaOneG3SE/smbus.c
Normal file
@@ -0,0 +1,206 @@
|
||||
#include "memio.h"
|
||||
#include "articiaS.h"
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
|
||||
void sm_write_mode(void)
|
||||
{
|
||||
out_byte(0xA539, 0x00);
|
||||
out_byte(0xA53A, 0x03);
|
||||
}
|
||||
|
||||
void sm_read_mode(void)
|
||||
{
|
||||
out_byte(0xA53A, 0x02);
|
||||
out_byte(0xA539, 0x02);
|
||||
}
|
||||
|
||||
void sm_write_byte(uint8 writeme)
|
||||
{
|
||||
int i;
|
||||
int level;
|
||||
|
||||
out_byte(0xA539, 0x00);
|
||||
|
||||
level = 0;
|
||||
|
||||
for (i=0; i<8; i++)
|
||||
{
|
||||
if ((writeme & 0x80) == (level<<7))
|
||||
{
|
||||
/* Bit did not change, rewrite strobe */
|
||||
out_byte(0xA539, level | 0x02);
|
||||
out_byte(0xA539, level);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Bit changed, set bit, then strobe */
|
||||
level = (writeme & 0x80) >> 7;
|
||||
out_byte(0xA539, level);
|
||||
out_byte(0xA539, level | 0x02);
|
||||
out_byte(0xA539, level);
|
||||
}
|
||||
writeme <<= 1;
|
||||
}
|
||||
out_byte(0xA539, 0x00);
|
||||
}
|
||||
|
||||
uint8 sm_read_byte(void)
|
||||
{
|
||||
uint8 retme, r;
|
||||
int i;
|
||||
|
||||
retme = 0;
|
||||
for (i=0; i<8; i++)
|
||||
{
|
||||
retme <<= 1;
|
||||
out_byte(0xA539, 0x00);
|
||||
out_byte(0xA539, 0x02);
|
||||
r = in_byte(0xA538) & 0x01;
|
||||
retme |= r;
|
||||
}
|
||||
|
||||
return retme;
|
||||
}
|
||||
|
||||
int sm_get_ack(void)
|
||||
{
|
||||
uint8 r;
|
||||
r = in_byte(0xA538);
|
||||
if ((r&0x01) == 0) return TRUE;
|
||||
else return FALSE;
|
||||
}
|
||||
|
||||
void sm_write_ack(void)
|
||||
{
|
||||
out_byte(0xA539, 0x00);
|
||||
out_byte(0xA539, 0x02);
|
||||
out_byte(0xA539, 0x00);
|
||||
}
|
||||
|
||||
void sm_write_nack(void)
|
||||
{
|
||||
out_byte(0xA539, 0x01);
|
||||
out_byte(0xA539, 0x03);
|
||||
out_byte(0xA539, 0x01);
|
||||
}
|
||||
|
||||
void sm_send_start(void)
|
||||
{
|
||||
out_byte(0xA539, 0x03);
|
||||
out_byte(0xA539, 0x02);
|
||||
}
|
||||
|
||||
void sm_send_stop(void)
|
||||
{
|
||||
out_byte(0xA539, 0x02);
|
||||
out_byte(0xA539, 0x03);
|
||||
}
|
||||
|
||||
int sm_read_byte_from_device(uint8 addr, uint8 reg, uint8 *storage)
|
||||
{
|
||||
/* S Addr Wr */
|
||||
sm_write_mode();
|
||||
sm_send_start();
|
||||
sm_write_byte((addr<<1));
|
||||
|
||||
/* [A] */
|
||||
sm_read_mode();
|
||||
if (sm_get_ack() == FALSE) return FALSE;
|
||||
|
||||
/* Comm */
|
||||
sm_write_mode();
|
||||
sm_write_byte(reg);
|
||||
|
||||
/* [A] */
|
||||
sm_read_mode();
|
||||
if (sm_get_ack() == FALSE) return FALSE;
|
||||
|
||||
/* S Addr Rd */
|
||||
sm_write_mode();
|
||||
sm_send_start();
|
||||
sm_write_byte((addr<<1)|1);
|
||||
|
||||
/* [A] */
|
||||
sm_read_mode();
|
||||
if (sm_get_ack() == FALSE) return FALSE;
|
||||
|
||||
/* [Data] */
|
||||
*storage = sm_read_byte();
|
||||
|
||||
/* NA */
|
||||
sm_write_mode();
|
||||
sm_write_nack();
|
||||
sm_send_stop();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void sm_init(void)
|
||||
{
|
||||
/* Switch to PMC mode */
|
||||
pci_write_cfg_byte(0, 0, REG_GROUP, (uint8)(REG_GROUP_SPECIAL|REG_GROUP_POWER));
|
||||
|
||||
/* Set GPIO Base */
|
||||
pci_write_cfg_long(0, 0, 0x40, 0xa500);
|
||||
|
||||
/* Enable GPIO */
|
||||
pci_write_cfg_byte(0, 0, 0x44, 0x11);
|
||||
|
||||
/* Set both GPIO 0 and 1 as output */
|
||||
out_byte(0xA53A, 0x03);
|
||||
}
|
||||
|
||||
|
||||
void sm_term(void)
|
||||
{
|
||||
/* Switch to normal mode */
|
||||
pci_write_cfg_byte(0, 0, REG_GROUP, 0);
|
||||
}
|
||||
|
||||
|
||||
int sm_get_data(uint8 *DataArray, int dimm_socket)
|
||||
{
|
||||
int j;
|
||||
|
||||
#if 0
|
||||
/* Switch to PMC mode */
|
||||
pci_write_cfg_byte(0, 0, REG_GROUP, (uint8)(REG_GROUP_SPECIAL|REG_GROUP_POWER));
|
||||
|
||||
/* Set GPIO Base */
|
||||
pci_write_cfg_long(0, 0, 0x40, 0xa500);
|
||||
|
||||
/* Enable GPIO */
|
||||
pci_write_cfg_byte(0, 0, 0x44, 0x11);
|
||||
|
||||
/* Set both GPIO 0 and 1 as output */
|
||||
out_byte(0xA53A, 0x03);
|
||||
#endif
|
||||
|
||||
sm_init();
|
||||
/* Start reading the rom */
|
||||
|
||||
j = 0;
|
||||
|
||||
do
|
||||
{
|
||||
if (sm_read_byte_from_device(dimm_socket, (uint8)j, DataArray) == FALSE)
|
||||
{
|
||||
sm_term();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
DataArray++;
|
||||
j++;
|
||||
} while (j < 128);
|
||||
|
||||
sm_term();
|
||||
return TRUE;
|
||||
}
|
||||
22
board/MAI/AmigaOneG3SE/smbus.h
Normal file
22
board/MAI/AmigaOneG3SE/smbus.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#ifndef _SMBUS_H_
|
||||
#define _SMBUS_H_
|
||||
|
||||
#include "short_types.h"
|
||||
|
||||
#define SM_DIMM0_ADDR 0x51
|
||||
#define SM_DIMM1_ADDR 0x52
|
||||
|
||||
void sm_write_mode(void);
|
||||
void sm_read_mode(void);
|
||||
void sm_write_byte(uint8 writeme);
|
||||
uint8 sm_read_byte(void);
|
||||
int sm_get_ack(void);
|
||||
void sm_write_ack(void);
|
||||
void sm_write_nack(void);
|
||||
void sm_send_start(void);
|
||||
void sm_send_stop(void);
|
||||
int sm_read_byte_from_device(uint8 addr, uint8 reg, uint8 *storage);
|
||||
int sm_get_data(uint8 *DataArray, int dimm_socket);
|
||||
void sm_init(void);
|
||||
void sm_term(void);
|
||||
#endif
|
||||
198
board/MAI/AmigaOneG3SE/start.txt
Normal file
198
board/MAI/AmigaOneG3SE/start.txt
Normal file
@@ -0,0 +1,198 @@
|
||||
|
||||
/*------------------------------------------------------*/
|
||||
/* TERON Articia / SDRAM Init */
|
||||
/*------------------------------------------------------*/
|
||||
|
||||
* XD_CTL = 0x81000000 (0x74)
|
||||
|
||||
* HBUS_ACC_CTL_0 &= 0xFFFFFDFF (0x5c)
|
||||
/* host bus access ctl reg 2(5e) */
|
||||
/* set - CPU read from memory data one clock after data is latched */
|
||||
|
||||
* GLOBL_INFO_0 |= 0x00004000 (0x50)
|
||||
/* global info register 2 (52), AGP/PCI bus 1 arbiter is addressed in Articia S */
|
||||
|
||||
PCI_1_SB_CONFIG_0 |= 0x00000400 (0x80d0)
|
||||
/* PCI1 side band config reg 2 (d2), enable read acces while write buffer not empty */
|
||||
|
||||
MEM_RAS_CTL_0 |= 0x3f000000 (0xcc)
|
||||
&= 0x3fffffff
|
||||
/* RAS park control reg 0(cc), park access enable is set */
|
||||
|
||||
HOST_RDBUF_CTL |= 0x10000000 (0x70)
|
||||
&= 0x10ffffff
|
||||
/* host read buffer control reg, enable prefetch for CPU read from DRAM control */
|
||||
|
||||
HBUS_ACC_CTL_0 |= 0x0100001f (0x5c)
|
||||
&= 0xf1ffffff
|
||||
/* host bus access control register, enable CPU address bus pipe control */
|
||||
/* two outstanding requests, *** changed to 2 from 3 */
|
||||
/* enable line merge write control for CPU write to system memory, PCI 1 */
|
||||
/* and PCI 0 bus memory; enable page merge write control for write to */
|
||||
/* PCI bus 0 & bus 1 memory */
|
||||
|
||||
SRAM_CTL |= 0x00004000 (0xc8)
|
||||
&= 0xffbff7ff
|
||||
/* DRAM detail timing control register 1 (ca), bit 3 set to 0 */
|
||||
/* DRAM start access latency control - wait for one clock */
|
||||
/* ff9f changed to ffbf */
|
||||
|
||||
DIM0_TIM_CTL_0 = 0x737d737d (0xc9)
|
||||
/* DRAM timing control for dimm0 & dimm1; set wait one clock */
|
||||
/* cycle for next data access */
|
||||
|
||||
DIM2_TIM_CTL_0 = 0x737d737d (0xca)
|
||||
/* DRAM timing control for dimm2 & dimm3; set wait one clock */
|
||||
/* cycle for next data access */
|
||||
|
||||
DIM0_BNK0_CTL_0 = BNK0_RAM_SIZ_128MB (0x90)
|
||||
/* set dimm0 bank0 for 128 MB */
|
||||
|
||||
DIM0_BNK1_CTL_0 = BNK1_RAM_SIZ_128MB (0x94)
|
||||
/* set dimm0 for bank1 */
|
||||
|
||||
DIM0_TIM_CTL_0 = 0xf3bf0000 (0xc9)
|
||||
/* dimm0 timing control register; RAS - CAS latency - 4 clock */
|
||||
/* CAS access latency - 3 wait; pre-charge latency - 3 wait */
|
||||
/* pre-charge command period control - 5 clock; wait one clock */
|
||||
/* cycle for next data access; read to write access latency control */
|
||||
/* - 2 clock cycles */
|
||||
|
||||
DRAM_GBL_CTL_0 |= 0x00000100 (0xc0)
|
||||
&= 0xffff01ff
|
||||
/* memory global control register - support buffer sdram on bank 0 */
|
||||
|
||||
DRAM_ECC_CTL_0 |= 0x00260000 (0xc4)
|
||||
&= 0xff26ffff
|
||||
/* enable ECC; enable read, modify, write control */
|
||||
|
||||
DRAM_REF_CTL_0 = DRAM_REF_DATA (0xb8)
|
||||
/* set DRAM refresh parameters *** changed to 00940100 */
|
||||
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
|
||||
DRAM_ECC_CTL_0 |= 0x20243280 (0xc4)
|
||||
/* turn off ecc */
|
||||
/* for SDRAM bank 0 */
|
||||
|
||||
DRAM_ECC_CTL_0 |= 0x20243290 (0xc4) ?
|
||||
/* for SDRAM bank 1 */
|
||||
|
||||
|
||||
/* Additional Stuff...*/
|
||||
|
||||
GLOBL_CTRL |= 0x20000b00 (0x54)
|
||||
|
||||
PCI_0_SB_CONFIG |= 0x04100007 (0xd0)
|
||||
/* PCI 0 Side band config reg*/
|
||||
|
||||
0x8000083c |= 0x00080000
|
||||
/* Disable VGA decode on PCI Bus 1 */
|
||||
|
||||
|
||||
/*End Additional Stuff..*/
|
||||
|
||||
/*--------------------------------------------------------------*/
|
||||
/* TERON serial port initialization code */
|
||||
/*--------------------------------------------------------------*/
|
||||
|
||||
0x84380080 |= 0x00030000
|
||||
/* enable super IO configuration VIA chip Register 85 */
|
||||
/* Enable super I/O config mode */
|
||||
|
||||
0xfe0003f0 = 0xe2
|
||||
bl delay1
|
||||
|
||||
0xfe0003f1 = 0x0f
|
||||
bl delay1
|
||||
/* enable com1 & com2, parallel port disabled */
|
||||
|
||||
0xfe0003f0 = 0xe7
|
||||
bl delay1
|
||||
/* let's make com1 base as 0x3f8 */
|
||||
|
||||
0xfe0003f1 = 0xfe
|
||||
bl delay1
|
||||
|
||||
0xfe0003f0 = 0xe8
|
||||
bl delay1
|
||||
/* let's make com2 base as 0x2f8 */
|
||||
|
||||
0xfe0003f1 = 0xbe
|
||||
|
||||
0x84380080 &= 0xfffdffff
|
||||
/* closing super IO configuration VIA chip Register 85 */
|
||||
|
||||
|
||||
/* -------------------------------*/
|
||||
|
||||
0xfe0003fb = 0x83
|
||||
bl delay1
|
||||
/*latch enable word length -8 bit */ /* set mslab bit */
|
||||
0xfe0003f8 = 0x0c
|
||||
bl delay1
|
||||
/* set baud rate lsb for 9600 baud */
|
||||
0xfe0003f9 = 0x0
|
||||
bl delay1
|
||||
/* set baud rate msb for 9600 baud */
|
||||
0xfe0003fb = 0x03
|
||||
bl delay1
|
||||
/* reset mslab */
|
||||
|
||||
/*--------------------------------------------------------------*/
|
||||
/* END TERON Serial Port Initialization Code */
|
||||
/*--------------------------------------------------------------*/
|
||||
|
||||
|
||||
/*--------------------------------------------------------------*/
|
||||
/* END TERON Articia / SDRAM Initialization code */
|
||||
/*--------------------------------------------------------------*/
|
||||
|
||||
Proposed from Documentation:
|
||||
|
||||
write dmem 0xfec00cf8 0x50000080
|
||||
write dmem 0xfee00cfc 0xc0305411
|
||||
|
||||
Writes to index 0x50-0x53.
|
||||
0x50: Global Information Register 0
|
||||
0xC0 = Little Endian CPU, Sequential order Burst
|
||||
0x51: Global Information Register 1
|
||||
Read only, 0x30 = Provides PowerPC and X86 support
|
||||
0x52: Global Information Register 2
|
||||
0x05 = 64/128 bit CPU bus support
|
||||
0x53: Global Information Register 3
|
||||
0x80 = PCI Bus 0 grant active time is 1 clock after REQ# deasserted
|
||||
|
||||
write dmem 0xfec00cf8 0x5c000080
|
||||
write dmem 0xfee00cfc 0xb300011F
|
||||
|
||||
write dmem 0xfec00cf8 0xc8000080
|
||||
write dmem 0xfee00cfc 0x0020f100
|
||||
|
||||
write dmem 0xfec00cf8 0x90000080
|
||||
write dmem 0xfee00cfc 0x007fe700
|
||||
|
||||
write dmem 0xfec00cf8 0x9400080
|
||||
write dmem 0xfee00cfc 0x007fe700
|
||||
|
||||
write dmem 0xfec00cf8 0xb0000080
|
||||
write dmem 0xfee00cfc 0x737d737d
|
||||
|
||||
write dmem 0xfec00cf8 0xb4000080
|
||||
write dmem 0xfee00cfc 0x737d737d
|
||||
|
||||
write dmem 0xfec00cf8 0xc0000080
|
||||
write dmem 0xfee00cfc 0x40005500
|
||||
|
||||
write dmem 0xfec00cf8 0xb8000080
|
||||
write dmem 0xfee00cfc 0x00940100
|
||||
|
||||
write dmem 0xfec00cf8 0xc4000080
|
||||
write dmem 0xfee00cfc 0x00003280
|
||||
|
||||
write dmem 0xfec00cf8 0xc4000080
|
||||
write dmem 0xfee00cfc 0x00003290
|
||||
3
board/MAI/AmigaOneG3SE/todo.txt
Normal file
3
board/MAI/AmigaOneG3SE/todo.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
- Init interrupt controller
|
||||
- init sdram
|
||||
- init ide controller
|
||||
140
board/MAI/AmigaOneG3SE/u-boot.lds
Normal file
140
board/MAI/AmigaOneG3SE/u-boot.lds
Normal file
@@ -0,0 +1,140 @@
|
||||
/*
|
||||
* (C) Copyright 2001
|
||||
* Josh Huber <huber@mclx.com>, Mission Critical Linux, Inc.
|
||||
*
|
||||
* (C) Copyright 2002
|
||||
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/*
|
||||
* u-boot.lds - linker script for U-Boot on the AmigaOneG3SE Board.
|
||||
*/
|
||||
|
||||
OUTPUT_ARCH(powerpc)
|
||||
SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib); SEARCH_DIR(/usr/local/powerpc-any-elf/lib);
|
||||
/* Do we need any of these for elf?
|
||||
__DYNAMIC = 0; */
|
||||
SECTIONS
|
||||
{
|
||||
/* Read-only sections, merged into text segment: */
|
||||
. = + SIZEOF_HEADERS;
|
||||
.interp : { *(.interp) }
|
||||
.hash : { *(.hash) }
|
||||
.dynsym : { *(.dynsym) }
|
||||
.dynstr : { *(.dynstr) }
|
||||
.rel.text : { *(.rel.text) }
|
||||
.rela.text : { *(.rela.text) }
|
||||
.rel.data : { *(.rel.data) }
|
||||
.rela.data : { *(.rela.data) }
|
||||
.rel.rodata : { *(.rel.rodata) }
|
||||
.rela.rodata : { *(.rela.rodata) }
|
||||
.rel.got : { *(.rel.got) }
|
||||
.rela.got : { *(.rela.got) }
|
||||
.rel.ctors : { *(.rel.ctors) }
|
||||
.rela.ctors : { *(.rela.ctors) }
|
||||
.rel.dtors : { *(.rel.dtors) }
|
||||
.rela.dtors : { *(.rela.dtors) }
|
||||
.rel.bss : { *(.rel.bss) }
|
||||
.rela.bss : { *(.rela.bss) }
|
||||
.rel.plt : { *(.rel.plt) }
|
||||
.rela.plt : { *(.rela.plt) }
|
||||
.init : { *(.init) }
|
||||
.plt : { *(.plt) }
|
||||
.text :
|
||||
{
|
||||
cpu/74xx_7xx/start.o (.text)
|
||||
/* store the environment in a seperate sector in the boot flash */
|
||||
/* . = env_offset; */
|
||||
common/environment.o(.text)
|
||||
|
||||
*(.text)
|
||||
*(.fixup)
|
||||
*(.got1)
|
||||
}
|
||||
_etext = .;
|
||||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
.dtors : { *(.dtors) }
|
||||
|
||||
/* Read-write section, merged into data segment: */
|
||||
. = (. + 0x00FF) & 0xFFFFFF00;
|
||||
_erotext = .;
|
||||
PROVIDE (erotext = .);
|
||||
.reloc :
|
||||
{
|
||||
*(.got)
|
||||
_GOT2_TABLE_ = .;
|
||||
*(.got2)
|
||||
_FIXUP_TABLE_ = .;
|
||||
*(.fixup)
|
||||
}
|
||||
__got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
|
||||
__fixup_entries = (. - _FIXUP_TABLE_)>>2;
|
||||
|
||||
.data :
|
||||
{
|
||||
*(.data)
|
||||
*(.data1)
|
||||
*(.sdata)
|
||||
*(.sdata2)
|
||||
*(.dynamic)
|
||||
CONSTRUCTORS
|
||||
}
|
||||
_edata = .;
|
||||
PROVIDE (edata = .);
|
||||
|
||||
. = .;
|
||||
__u_boot_cmd_start = .;
|
||||
.u_boot_cmd : { *(.u_boot_cmd) }
|
||||
__u_boot_cmd_end = .;
|
||||
|
||||
|
||||
. = .;
|
||||
__start___ex_table = .;
|
||||
__ex_table : { *(__ex_table) }
|
||||
__stop___ex_table = .;
|
||||
|
||||
. = ALIGN(256);
|
||||
__init_begin = .;
|
||||
.text.init : { *(.text.init) }
|
||||
.data.init : { *(.data.init) }
|
||||
. = ALIGN(256);
|
||||
__init_end = .;
|
||||
|
||||
__bss_start = .;
|
||||
.bss :
|
||||
{
|
||||
*(.sbss) *(.scommon)
|
||||
*(.dynbss)
|
||||
*(.bss)
|
||||
*(COMMON)
|
||||
}
|
||||
_end = ALIGN(4) /*.*/ ;
|
||||
PROVIDE (end = ALIGN(4) /*.*/);
|
||||
}
|
||||
1178
board/MAI/AmigaOneG3SE/usb_uhci.c
Normal file
1178
board/MAI/AmigaOneG3SE/usb_uhci.c
Normal file
File diff suppressed because it is too large
Load Diff
192
board/MAI/AmigaOneG3SE/usb_uhci.h
Normal file
192
board/MAI/AmigaOneG3SE/usb_uhci.h
Normal file
@@ -0,0 +1,192 @@
|
||||
/*
|
||||
* (C) Copyright 2001
|
||||
* Denis Peter, MPL AG Switzerland
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*
|
||||
* Note: Part of this code has been derived from linux
|
||||
*
|
||||
*/
|
||||
#ifndef _USB_UHCI_H_
|
||||
#define _USB_UHCI_H_
|
||||
|
||||
#undef USB_UHCI_VEND_ID
|
||||
#define USB_UHCI_VEND_ID PCI_VENDOR_ID_VIA
|
||||
#undef USB_UHCI_DEV_ID
|
||||
#define USB_UHCI_DEV_ID 0x3038
|
||||
|
||||
/* Command register */
|
||||
#define USBCMD 0
|
||||
#define USBCMD_RS 0x0001 /* Run/Stop */
|
||||
#define USBCMD_HCRESET 0x0002 /* Host reset */
|
||||
#define USBCMD_GRESET 0x0004 /* Global reset */
|
||||
#define USBCMD_EGSM 0x0008 /* Global Suspend Mode */
|
||||
#define USBCMD_FGR 0x0010 /* Force Global Resume */
|
||||
#define USBCMD_SWDBG 0x0020 /* SW Debug mode */
|
||||
#define USBCMD_CF 0x0040 /* Config Flag (sw only) */
|
||||
#define USBCMD_MAXP 0x0080 /* Max Packet (0 = 32, 1 = 64) */
|
||||
|
||||
/* Status register */
|
||||
#define USBSTS 2
|
||||
#define USBSTS_USBINT 0x0001 /* Interrupt due to IOC */
|
||||
#define USBSTS_ERROR 0x0002 /* Interrupt due to error */
|
||||
#define USBSTS_RD 0x0004 /* Resume Detect */
|
||||
#define USBSTS_HSE 0x0008 /* Host System Error - basically PCI problems */
|
||||
#define USBSTS_HCPE 0x0010 /* Host Controller Process Error - the scripts were buggy */
|
||||
#define USBSTS_HCH 0x0020 /* HC Halted */
|
||||
|
||||
/* Interrupt enable register */
|
||||
#define USBINTR 4
|
||||
#define USBINTR_TIMEOUT 0x0001 /* Timeout/CRC error enable */
|
||||
#define USBINTR_RESUME 0x0002 /* Resume interrupt enable */
|
||||
#define USBINTR_IOC 0x0004 /* Interrupt On Complete enable */
|
||||
#define USBINTR_SP 0x0008 /* Short packet interrupt enable */
|
||||
|
||||
#define USBFRNUM 6
|
||||
#define USBFLBASEADD 8
|
||||
#define USBSOF 12
|
||||
|
||||
/* USB port status and control registers */
|
||||
#define USBPORTSC1 16
|
||||
#define USBPORTSC2 18
|
||||
#define USBPORTSC_CCS 0x0001 /* Current Connect Status ("device present") */
|
||||
#define USBPORTSC_CSC 0x0002 /* Connect Status Change */
|
||||
#define USBPORTSC_PE 0x0004 /* Port Enable */
|
||||
#define USBPORTSC_PEC 0x0008 /* Port Enable Change */
|
||||
#define USBPORTSC_LS 0x0030 /* Line Status */
|
||||
#define USBPORTSC_RD 0x0040 /* Resume Detect */
|
||||
#define USBPORTSC_LSDA 0x0100 /* Low Speed Device Attached */
|
||||
#define USBPORTSC_PR 0x0200 /* Port Reset */
|
||||
#define USBPORTSC_SUSP 0x1000 /* Suspend */
|
||||
|
||||
/* Legacy support register */
|
||||
#define USBLEGSUP 0xc0
|
||||
#define USBLEGSUP_DEFAULT 0x2000 /* only PIRQ enable set */
|
||||
|
||||
#define UHCI_NULL_DATA_SIZE 0x7ff /* for UHCI controller TD */
|
||||
#define UHCI_PID 0xff /* PID MASK */
|
||||
|
||||
#define UHCI_PTR_BITS 0x000F
|
||||
#define UHCI_PTR_TERM 0x0001
|
||||
#define UHCI_PTR_QH 0x0002
|
||||
#define UHCI_PTR_DEPTH 0x0004
|
||||
|
||||
/* for TD <status>: */
|
||||
#define TD_CTRL_SPD (1 << 29) /* Short Packet Detect */
|
||||
#define TD_CTRL_C_ERR_MASK (3 << 27) /* Error Counter bits */
|
||||
#define TD_CTRL_LS (1 << 26) /* Low Speed Device */
|
||||
#define TD_CTRL_IOS (1 << 25) /* Isochronous Select */
|
||||
#define TD_CTRL_IOC (1 << 24) /* Interrupt on Complete */
|
||||
#define TD_CTRL_ACTIVE (1 << 23) /* TD Active */
|
||||
#define TD_CTRL_STALLED (1 << 22) /* TD Stalled */
|
||||
#define TD_CTRL_DBUFERR (1 << 21) /* Data Buffer Error */
|
||||
#define TD_CTRL_BABBLE (1 << 20) /* Babble Detected */
|
||||
#define TD_CTRL_NAK (1 << 19) /* NAK Received */
|
||||
#define TD_CTRL_CRCTIMEO (1 << 18) /* CRC/Time Out Error */
|
||||
#define TD_CTRL_BITSTUFF (1 << 17) /* Bit Stuff Error */
|
||||
#define TD_CTRL_ACTLEN_MASK 0x7ff /* actual length, encoded as n - 1 */
|
||||
|
||||
#define TD_CTRL_ANY_ERROR (TD_CTRL_STALLED | TD_CTRL_DBUFERR | \
|
||||
TD_CTRL_BABBLE | TD_CTRL_CRCTIME | TD_CTRL_BITSTUFF)
|
||||
|
||||
#define TD_TOKEN_TOGGLE 19
|
||||
|
||||
/* ------------------------------------------------------------------------------------
|
||||
Virtual Root HUB
|
||||
------------------------------------------------------------------------------------ */
|
||||
/* destination of request */
|
||||
#define RH_INTERFACE 0x01
|
||||
#define RH_ENDPOINT 0x02
|
||||
#define RH_OTHER 0x03
|
||||
|
||||
#define RH_CLASS 0x20
|
||||
#define RH_VENDOR 0x40
|
||||
|
||||
/* Requests: bRequest << 8 | bmRequestType */
|
||||
#define RH_GET_STATUS 0x0080
|
||||
#define RH_CLEAR_FEATURE 0x0100
|
||||
#define RH_SET_FEATURE 0x0300
|
||||
#define RH_SET_ADDRESS 0x0500
|
||||
#define RH_GET_DESCRIPTOR 0x0680
|
||||
#define RH_SET_DESCRIPTOR 0x0700
|
||||
#define RH_GET_CONFIGURATION 0x0880
|
||||
#define RH_SET_CONFIGURATION 0x0900
|
||||
#define RH_GET_STATE 0x0280
|
||||
#define RH_GET_INTERFACE 0x0A80
|
||||
#define RH_SET_INTERFACE 0x0B00
|
||||
#define RH_SYNC_FRAME 0x0C80
|
||||
/* Our Vendor Specific Request */
|
||||
#define RH_SET_EP 0x2000
|
||||
|
||||
/* Hub port features */
|
||||
#define RH_PORT_CONNECTION 0x00
|
||||
#define RH_PORT_ENABLE 0x01
|
||||
#define RH_PORT_SUSPEND 0x02
|
||||
#define RH_PORT_OVER_CURRENT 0x03
|
||||
#define RH_PORT_RESET 0x04
|
||||
#define RH_PORT_POWER 0x08
|
||||
#define RH_PORT_LOW_SPEED 0x09
|
||||
#define RH_C_PORT_CONNECTION 0x10
|
||||
#define RH_C_PORT_ENABLE 0x11
|
||||
#define RH_C_PORT_SUSPEND 0x12
|
||||
#define RH_C_PORT_OVER_CURRENT 0x13
|
||||
#define RH_C_PORT_RESET 0x14
|
||||
|
||||
/* Hub features */
|
||||
#define RH_C_HUB_LOCAL_POWER 0x00
|
||||
#define RH_C_HUB_OVER_CURRENT 0x01
|
||||
|
||||
#define RH_DEVICE_REMOTE_WAKEUP 0x00
|
||||
#define RH_ENDPOINT_STALL 0x01
|
||||
|
||||
/* Our Vendor Specific feature */
|
||||
#define RH_REMOVE_EP 0x00
|
||||
|
||||
|
||||
#define RH_ACK 0x01
|
||||
#define RH_REQ_ERR -1
|
||||
#define RH_NACK 0x00
|
||||
|
||||
|
||||
/* Transfer descriptor structure */
|
||||
typedef struct {
|
||||
unsigned long link; /* next td/qh (LE)*/
|
||||
unsigned long status; /* status of the td */
|
||||
unsigned long info; /* Max Lenght / Endpoint / device address and PID */
|
||||
unsigned long buffer; /* pointer to data buffer (LE) */
|
||||
unsigned long dev_ptr; /* pointer to the assigned device (BE) */
|
||||
unsigned long res[3]; /* reserved (TDs must be 8Byte aligned) */
|
||||
} uhci_td_t, *puhci_td_t;
|
||||
|
||||
/* Queue Header structure */
|
||||
typedef struct {
|
||||
unsigned long head; /* Next QH (LE)*/
|
||||
unsigned long element; /* Queue element pointer (LE) */
|
||||
unsigned long res[5]; /* reserved */
|
||||
unsigned long dev_ptr; /* if 0 no tds have been assigned to this qh */
|
||||
} uhci_qh_t, *puhci_qh_t;
|
||||
|
||||
struct virt_root_hub {
|
||||
int devnum; /* Address of Root Hub endpoint */
|
||||
int numports; /* number of ports */
|
||||
int c_p_r[8]; /* C_PORT_RESET */
|
||||
};
|
||||
|
||||
|
||||
#endif /* _USB_UHCI_H_ */
|
||||
299
board/MAI/AmigaOneG3SE/via686.c
Normal file
299
board/MAI/AmigaOneG3SE/via686.c
Normal file
@@ -0,0 +1,299 @@
|
||||
/*
|
||||
* (C) Copyright 2002
|
||||
* Hyperion Entertainment, Hans-JoergF@hyperion-entertainment.com
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
#include <common.h>
|
||||
#include <pci.h>
|
||||
#include <ata.h>
|
||||
#include "memio.h"
|
||||
#include "articiaS.h"
|
||||
#include "via686.h"
|
||||
#include "i8259.h"
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
#undef VIA_DEBUG
|
||||
|
||||
#ifdef VIA_DEBUG
|
||||
#define PRINTF(fmt,args...) printf (fmt ,##args)
|
||||
#else
|
||||
#define PRINTF(fmt,args...)
|
||||
#endif
|
||||
|
||||
|
||||
/* Setup the ISA-to-PCI host bridge */
|
||||
void via_isa_init(pci_dev_t dev, struct pci_config_table *table)
|
||||
{
|
||||
char regval;
|
||||
if (PCI_FUNC(dev) == 0)
|
||||
{
|
||||
PRINTF("... PCI-to-ISA bridge, dev=0x%X\n", dev);
|
||||
|
||||
/* Enable I/O Recovery time */
|
||||
pci_write_config_byte(dev, 0x40, 0x08);
|
||||
|
||||
/* Enable ISA refresh */
|
||||
pci_write_config_byte(dev, 0x41, 0x41); /* was 01 */
|
||||
|
||||
/* Enable ISA line buffer */
|
||||
pci_write_config_byte(dev, 0x45, 0x80);
|
||||
|
||||
/* Gate INTR, and flush line buffer */
|
||||
pci_write_config_byte(dev, 0x46, 0x60);
|
||||
|
||||
/* Enable EISA ports 4D0/4D1. Do we need this ? */
|
||||
pci_write_config_byte(dev, 0x47, 0xe6); /* was 20 */
|
||||
|
||||
/* 512 K PCI Decode */
|
||||
pci_write_config_byte(dev, 0x48, 0x01);
|
||||
|
||||
/* Wait for PGNT before grant to ISA Master/DMA */
|
||||
/* ports 0-FF to SDBus */
|
||||
/* IRQ 14 and 15 for ide 0/1 */
|
||||
pci_write_config_byte(dev, 0x4a, 0x04); /* Was c4 */
|
||||
|
||||
/* Plug'n'Play */
|
||||
/* Parallel DRQ 3, Floppy DRQ 2 (default) */
|
||||
pci_write_config_byte(dev, 0x50, 0x0e);
|
||||
|
||||
/* IRQ Routing for Floppy and Parallel port */
|
||||
/* IRQ 6 for floppy, IRQ 7 for parallel port */
|
||||
pci_write_config_byte(dev, 0x51, 0x76);
|
||||
|
||||
/* IRQ Routing for serial ports (take IRQ 3 and 4) */
|
||||
pci_write_config_byte(dev, 0x52, 0x34);
|
||||
|
||||
/* All IRQ's level triggered. */
|
||||
pci_write_config_byte(dev, 0x54, 0x00);
|
||||
|
||||
/* PCI IRQ's all at IRQ 9 */
|
||||
pci_write_config_byte(dev, 0x55, 0x90);
|
||||
pci_write_config_byte(dev, 0x56, 0x99);
|
||||
pci_write_config_byte(dev, 0x57, 0x90);
|
||||
|
||||
/* Enable Keyboard */
|
||||
pci_read_config_byte(dev, 0x5A, ®val);
|
||||
regval |= 0x01;
|
||||
pci_write_config_byte(dev, 0x5A, regval);
|
||||
|
||||
pci_write_config_byte(dev, 0x80, 0);
|
||||
pci_write_config_byte(dev, 0x85, 0x01);
|
||||
|
||||
/* pci_write_config_byte(dev, 0x77, 0x00); */
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize PNP irq routing
|
||||
*/
|
||||
|
||||
void via_init_irq_routing(uint8 irq_map[])
|
||||
{
|
||||
char *s;
|
||||
uint8 level_edge_bits = 0xf;
|
||||
|
||||
/* Set irq routings */
|
||||
pci_write_cfg_byte(0, 7<<3, 0x55, irq_map[0]<<4);
|
||||
pci_write_cfg_byte(0, 7<<3, 0x56, irq_map[1] | irq_map[2]<<4);
|
||||
pci_write_cfg_byte(0, 7<<3, 0x57, irq_map[3]<<4);
|
||||
|
||||
/*
|
||||
* Gather level/edge bits
|
||||
* Default is to assume level triggered
|
||||
*/
|
||||
|
||||
s = getenv("pci_irqa_select");
|
||||
if (s && strcmp(s, "level") == 0)
|
||||
level_edge_bits &= ~0x01;
|
||||
|
||||
s = getenv("pci_irqb_select");
|
||||
if (s && strcmp(s, "level") == 0)
|
||||
level_edge_bits &= ~0x02;
|
||||
|
||||
s = getenv("pci_irqc_select");
|
||||
if (s && strcmp(s, "level") == 0)
|
||||
level_edge_bits &= ~0x04;
|
||||
|
||||
s = getenv("pci_irqd_select");
|
||||
if (s && strcmp(s, "level") == 0)
|
||||
level_edge_bits &= ~0x08;
|
||||
|
||||
PRINTF("IRQ map\n");
|
||||
PRINTF("%d: %s\n", irq_map[0], level_edge_bits&0x1 ? "edge" : "level");
|
||||
PRINTF("%d: %s\n", irq_map[1], level_edge_bits&0x2 ? "edge" : "level");
|
||||
PRINTF("%d: %s\n", irq_map[2], level_edge_bits&0x4 ? "edge" : "level");
|
||||
PRINTF("%d: %s\n", irq_map[3], level_edge_bits&0x8 ? "edge" : "level");
|
||||
pci_write_cfg_byte(0, 7<<3, 0x54, level_edge_bits);
|
||||
|
||||
PRINTF("%02x %02x %02x %02x\n", pci_read_cfg_byte(0, 7<<3, 0x54),
|
||||
pci_read_cfg_byte(0, 7<<3, 0x55), pci_read_cfg_byte(0, 7<<3, 0x56),
|
||||
pci_read_cfg_byte(0, 7<<3, 0x57));
|
||||
}
|
||||
|
||||
|
||||
/* Setup the IDE controller. This doesn't seem to work yet. I/O to an IDE controller port */
|
||||
/* always return the last character output on the serial port (!) */
|
||||
/* This function is called by the pnp-library when it encounters 0:7:1 */
|
||||
void via_cfgfunc_ide_init(struct pci_controller *host, pci_dev_t dev, struct pci_config_table *table)
|
||||
{
|
||||
PRINTF("... IDE controller, dev=0x%X\n", dev);
|
||||
|
||||
/* Enable both IDE channels. */
|
||||
pci_write_config_byte(dev, 0x40, 0x03);
|
||||
/* udelay(10000); */
|
||||
/* udelay(10000); */
|
||||
|
||||
/* Enable IO Space */
|
||||
pci_write_config_word(dev, 0x04, 0x03);
|
||||
|
||||
/* Set to compatibility mode */
|
||||
pci_write_config_byte(dev, 0x09, 0x8A); /* WAS: 0x8f); */
|
||||
|
||||
/* Set to legacy interrupt mode */
|
||||
pci_write_config_byte(dev, 0x3d, 0x00); /* WAS: 0x01); */
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* Set the base address of the floppy controller to 0x3F0 */
|
||||
void via_fdc_init(pci_dev_t dev)
|
||||
{
|
||||
unsigned char c;
|
||||
/* Enable Configuration mode */
|
||||
pci_read_config_byte(dev, 0x85, &c);
|
||||
c |= 0x02;
|
||||
pci_write_config_byte(dev, 0x85, c);
|
||||
|
||||
/* Set floppy controller port to 0x3F0. */
|
||||
SIO_WRITE_CONFIG(0xE3, (0x3F<<2));
|
||||
|
||||
/* Enable floppy controller */
|
||||
SIO_READ_CONFIG(0xE2, c);
|
||||
c |= 0x10;
|
||||
SIO_WRITE_CONFIG(0xE2, c);
|
||||
|
||||
/* Switch of configuration mode */
|
||||
pci_read_config_byte(dev, 0x85, &c);
|
||||
c &= ~0x02;
|
||||
pci_write_config_byte(dev, 0x85, c);
|
||||
}
|
||||
|
||||
/* Init function 0 of the via southbridge. Called by the pnp-library */
|
||||
void via_cfgfunc_via686(struct pci_controller *host, pci_dev_t dev, struct pci_config_table *table)
|
||||
{
|
||||
if (PCI_FUNC(dev) == 0)
|
||||
{
|
||||
/* FIXME: Try to generate a PCI reset */
|
||||
/* unsigned char c; */
|
||||
/* pci_read_config_byte(dev, 0x47, &c); */
|
||||
/* pci_write_config_byte(dev, 0x47, c | 0x01); */
|
||||
|
||||
via_isa_init(dev, table);
|
||||
via_fdc_init(dev);
|
||||
}
|
||||
}
|
||||
|
||||
__asm (" .globl via_calibrate_time_base \n"
|
||||
"via_calibrate_time_base: \n"
|
||||
" lis 9, 0xfe00 \n"
|
||||
" li 0, 0x00 \n"
|
||||
" mttbu 0 \n"
|
||||
" mttbl 0 \n"
|
||||
"ctb_loop: \n"
|
||||
" lbz 0, 0x61(9) \n"
|
||||
" eieio \n"
|
||||
" andi. 0, 0, 0x20 \n"
|
||||
" beq ctb_loop \n"
|
||||
"ctb_done: \n"
|
||||
" mftb 3 \n"
|
||||
" blr");
|
||||
|
||||
extern unsigned long via_calibrate_time_base(void);
|
||||
|
||||
void via_calibrate_bus_freq (void)
|
||||
{
|
||||
unsigned long tb;
|
||||
|
||||
/* This is 20 microseconds */
|
||||
#define CALIBRATE_TIME 28636
|
||||
|
||||
/* Enable the timer (and disable speaker) */
|
||||
unsigned char c;
|
||||
|
||||
c = in_byte (0x61);
|
||||
out_byte (0x61, ((c & ~0x02) | 0x01));
|
||||
|
||||
/* Set timer 2 to low/high writing */
|
||||
out_byte (0x43, 0xb0);
|
||||
out_byte (0x42, CALIBRATE_TIME & 0xff);
|
||||
out_byte (0x42, CALIBRATE_TIME >> 8);
|
||||
|
||||
/* Read the time base */
|
||||
tb = via_calibrate_time_base ();
|
||||
|
||||
if (tb >= 700000)
|
||||
gd->bus_clk = 133333333;
|
||||
else
|
||||
gd->bus_clk = 100000000;
|
||||
|
||||
}
|
||||
|
||||
|
||||
void ide_led(uchar led, uchar status)
|
||||
{
|
||||
/* unsigned char c = in_byte(0x92); */
|
||||
|
||||
/* if (!status) */
|
||||
/* out_byte(0x92, c | 0xC0); */
|
||||
/* else */
|
||||
/* out_byte(0x92, c & ~0xC0); */
|
||||
}
|
||||
|
||||
|
||||
void via_init_afterscan(void)
|
||||
{
|
||||
/* Modify IDE controller setup */
|
||||
pci_write_cfg_byte(0, 7<<3|1, PCI_LATENCY_TIMER, 0x20);
|
||||
pci_write_cfg_byte(0, 7<<3|1, PCI_COMMAND, PCI_COMMAND_IO|PCI_COMMAND_MEMORY|PCI_COMMAND_MASTER);
|
||||
pci_write_cfg_byte(0, 7<<3|1, PCI_INTERRUPT_LINE, 0xff);
|
||||
pci_write_cfg_byte(0, 7<<3|1, 0x40, 0x0b); /* FIXME: Might depend on drives connected */
|
||||
pci_write_cfg_byte(0, 7<<3|1, 0x41, 0x42); /* FIXME: Might depend on drives connected */
|
||||
pci_write_cfg_byte(0, 7<<3|1, 0x43, 0x05);
|
||||
pci_write_cfg_byte(0, 7<<3|1, 0x44, 0x18);
|
||||
pci_write_cfg_byte(0, 7<<3|1, 0x45, 0x10);
|
||||
pci_write_cfg_byte(0, 7<<3|1, 0x4e, 0x22); /* FIXME: Not documented, but set in PC bios */
|
||||
pci_write_cfg_byte(0, 7<<3|1, 0x4f, 0x20); /* FIXME: Not documented */
|
||||
|
||||
/* Modify some values in the USB controller */
|
||||
pci_write_cfg_byte(0, 7<<3|2, 0x05, 0x17);
|
||||
pci_write_cfg_byte(0, 7<<3|2, 0x06, 0x01);
|
||||
pci_write_cfg_byte(0, 7<<3|2, 0x41, 0x12);
|
||||
pci_write_cfg_byte(0, 7<<3|2, 0x42, 0x03);
|
||||
pci_write_cfg_byte(0, 7<<3|2, PCI_LATENCY_TIMER, 0x40);
|
||||
|
||||
pci_write_cfg_byte(0, 7<<3|3, 0x05, 0x17);
|
||||
pci_write_cfg_byte(0, 7<<3|3, 0x06, 0x01);
|
||||
pci_write_cfg_byte(0, 7<<3|3, 0x41, 0x12);
|
||||
pci_write_cfg_byte(0, 7<<3|3, 0x42, 0x03);
|
||||
pci_write_cfg_byte(0, 7<<3|3, PCI_LATENCY_TIMER, 0x40);
|
||||
|
||||
|
||||
}
|
||||
29
board/MAI/AmigaOneG3SE/via686.h
Normal file
29
board/MAI/AmigaOneG3SE/via686.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#ifndef VIA686_H_
|
||||
#define VIA686_H_
|
||||
|
||||
|
||||
#define CMOS_ADDR 0x70
|
||||
#define CMOS_DATA 0x71
|
||||
|
||||
#define I8259_MASTER_CONTROL 0x20
|
||||
#define I8259_MASTER_MASK 0x21
|
||||
|
||||
#define I8259_SLAVE_CONTROL 0xA0
|
||||
#define I8259_SLAVE_MASK 0xA1
|
||||
|
||||
#define SIO_CONFIG_ADDR 0x3F0
|
||||
#define SIO_CONFIG_DATA 0x3F1
|
||||
|
||||
#define SIO_WRITE_CONFIG(addr, byte) \
|
||||
out_byte(SIO_CONFIG_ADDR, addr); \
|
||||
out_byte(SIO_CONFIG_DATA, byte);
|
||||
|
||||
#define SIO_READ_CONFIG(addr, byte) \
|
||||
out_byte(SIO_CONFIG_ADDR, addr); \
|
||||
byte = in_byte(SIO_CONFIG_DATA);
|
||||
|
||||
void via_init(void);
|
||||
|
||||
void via_calibrate_bus_freq(void);
|
||||
|
||||
#endif
|
||||
541
board/MAI/AmigaOneG3SE/video.c
Normal file
541
board/MAI/AmigaOneG3SE/video.c
Normal file
@@ -0,0 +1,541 @@
|
||||
/*
|
||||
* (C) Copyright 2002
|
||||
* Hyperion Entertainment, Hans-JoergF@hyperion-entertainment.com
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <devices.h>
|
||||
#include "memio.h"
|
||||
#include <part.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
unsigned char *cursor_position;
|
||||
unsigned int cursor_row;
|
||||
unsigned int cursor_col;
|
||||
|
||||
unsigned char current_attr;
|
||||
|
||||
unsigned int video_numrows = 25;
|
||||
unsigned int video_numcols = 80;
|
||||
unsigned int video_scrolls = 0;
|
||||
|
||||
#define VIDEO_BASE (unsigned char *)0xFD0B8000
|
||||
#define VIDEO_ROWS video_numrows
|
||||
#define VIDEO_COLS video_numcols
|
||||
#define VIDEO_PITCH (2 * video_numcols)
|
||||
#define VIDEO_SIZE (video_numrows * video_numcols * 2)
|
||||
#define VIDEO_NAME "vga"
|
||||
|
||||
void video_test(void);
|
||||
void video_putc(char ch);
|
||||
void video_puts(char *string);
|
||||
void video_scroll(int rows);
|
||||
void video_banner(void);
|
||||
int video_init(void);
|
||||
int video_start(void);
|
||||
int video_rows(void);
|
||||
int video_cols(void);
|
||||
|
||||
char *prompt_string = "=>";
|
||||
unsigned char video_get_attr(void);
|
||||
|
||||
void video_set_color(unsigned char attr)
|
||||
{
|
||||
unsigned char *fb = (unsigned char *)VIDEO_BASE;
|
||||
int i;
|
||||
|
||||
current_attr = video_get_attr();
|
||||
|
||||
for (i=0; i<VIDEO_SIZE; i+=2)
|
||||
{
|
||||
*(fb+i+1) = current_attr;
|
||||
}
|
||||
}
|
||||
|
||||
unsigned char video_get_attr(void)
|
||||
{
|
||||
char *s;
|
||||
unsigned char attr;
|
||||
|
||||
attr = 0x0f;
|
||||
|
||||
s = getenv("vga_fg_color");
|
||||
if (s)
|
||||
{
|
||||
attr = atoi(s);
|
||||
}
|
||||
|
||||
s = getenv("vga_bg_color");
|
||||
if (s)
|
||||
{
|
||||
attr |= atoi(s)<<4;
|
||||
}
|
||||
|
||||
return attr;
|
||||
}
|
||||
|
||||
int video_inited = 0;
|
||||
|
||||
int drv_video_init(void)
|
||||
{
|
||||
int error, devices = 1 ;
|
||||
device_t vgadev ;
|
||||
if (video_inited) return 1;
|
||||
video_inited = 1;
|
||||
video_init();
|
||||
memset (&vgadev, 0, sizeof(vgadev));
|
||||
|
||||
strcpy(vgadev.name, VIDEO_NAME);
|
||||
vgadev.flags = DEV_FLAGS_OUTPUT | DEV_FLAGS_SYSTEM;
|
||||
vgadev.putc = video_putc;
|
||||
vgadev.puts = video_puts;
|
||||
vgadev.getc = NULL;
|
||||
vgadev.tstc = NULL;
|
||||
vgadev.start = video_start;
|
||||
|
||||
error = device_register (&vgadev);
|
||||
|
||||
if (error == 0)
|
||||
{
|
||||
char *s = getenv("stdout");
|
||||
if (s && strcmp(s, VIDEO_NAME)==0)
|
||||
{
|
||||
if (overwrite_console()) return 1;
|
||||
error = console_assign(stdout, VIDEO_NAME);
|
||||
if (error == 0) return 1;
|
||||
else return error;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
int video_init(void)
|
||||
{
|
||||
cursor_position = VIDEO_BASE; /* Color text display base */
|
||||
cursor_row = 0;
|
||||
cursor_col = 0;
|
||||
current_attr = video_get_attr(); /* Currently selected value for attribute. */
|
||||
/* video_test(); */
|
||||
video_set_color(current_attr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void video_set_cursor(int line, int column)
|
||||
{
|
||||
unsigned short offset = line*video_numcols + column;
|
||||
cursor_position = VIDEO_BASE + line*VIDEO_PITCH + column*2;
|
||||
out_byte(0x3D4, 0x0E);
|
||||
out_byte(0x3D5, offset/256);
|
||||
out_byte(0x3D4, 0x0F);
|
||||
out_byte(0x3D5, offset%256);
|
||||
}
|
||||
|
||||
void video_write_char(int character)
|
||||
{
|
||||
*cursor_position = character;
|
||||
*(cursor_position+1) = current_attr;
|
||||
}
|
||||
|
||||
void video_test(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void video_putc(char ch)
|
||||
{
|
||||
switch(ch)
|
||||
{
|
||||
case '\n':
|
||||
cursor_col = 0;
|
||||
cursor_row += 1;
|
||||
break;
|
||||
case '\r':
|
||||
cursor_col = 0;
|
||||
break;
|
||||
case '\b':
|
||||
if (cursor_col) cursor_col--;
|
||||
else return;
|
||||
break;
|
||||
case '\t':
|
||||
cursor_col = (cursor_col/8+1)*8;
|
||||
break;
|
||||
default:
|
||||
video_write_char(ch);
|
||||
cursor_col++;
|
||||
if (cursor_col > VIDEO_COLS-1)
|
||||
{
|
||||
cursor_row++;
|
||||
cursor_col=0;
|
||||
}
|
||||
}
|
||||
|
||||
if (cursor_row > VIDEO_ROWS-1)
|
||||
video_scroll(1);
|
||||
video_set_cursor(cursor_row, cursor_col);
|
||||
}
|
||||
|
||||
void video_scroll(int rows)
|
||||
{
|
||||
unsigned short clear = ((unsigned short)current_attr) | (' '<<8);
|
||||
unsigned short* addr16 = &((unsigned short *)VIDEO_BASE)[(VIDEO_ROWS-rows)*VIDEO_COLS];
|
||||
int i;
|
||||
char *s;
|
||||
|
||||
s = getenv("vga_askscroll");
|
||||
video_scrolls += rows;
|
||||
|
||||
if (video_scrolls >= video_numrows)
|
||||
{
|
||||
if (s && strcmp(s, "yes"))
|
||||
{
|
||||
while (-1 == tstc());
|
||||
}
|
||||
|
||||
video_scrolls = 0;
|
||||
}
|
||||
|
||||
|
||||
memcpy(VIDEO_BASE, VIDEO_BASE+rows*(VIDEO_COLS*2), (VIDEO_ROWS-rows)*(VIDEO_COLS*2));
|
||||
for (i = 0 ; i < rows * VIDEO_COLS ; i++)
|
||||
addr16[i] = clear;
|
||||
cursor_row-=rows;
|
||||
cursor_col=0;
|
||||
}
|
||||
|
||||
void video_puts(char *string)
|
||||
{
|
||||
while (*string)
|
||||
{
|
||||
video_putc(*string);
|
||||
string++;
|
||||
}
|
||||
}
|
||||
|
||||
int video_start(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned char video_single_box[] =
|
||||
{
|
||||
218, 196, 191,
|
||||
179, 179,
|
||||
192, 196, 217
|
||||
};
|
||||
|
||||
unsigned char video_double_box[] =
|
||||
{
|
||||
201, 205, 187,
|
||||
186, 186,
|
||||
200, 205, 188
|
||||
};
|
||||
|
||||
unsigned char video_single_title[] =
|
||||
{
|
||||
195, 196, 180, 180, 195
|
||||
};
|
||||
|
||||
unsigned char video_double_title[] =
|
||||
{
|
||||
204, 205, 185, 181, 198
|
||||
};
|
||||
|
||||
#define SINGLE_BOX 0
|
||||
#define DOUBLE_BOX 1
|
||||
|
||||
unsigned char *video_addr(int x, int y)
|
||||
{
|
||||
return VIDEO_BASE + 2*(VIDEO_COLS*y) + 2*x;
|
||||
}
|
||||
|
||||
void video_bios_print_string(char *s, int x, int y, int attr, int count)
|
||||
{
|
||||
int cattr = current_attr;
|
||||
if (attr != -1) current_attr = attr;
|
||||
video_set_cursor(x,y);
|
||||
while (count)
|
||||
{
|
||||
char c = *s++;
|
||||
if (attr == -1) current_attr = *s++;
|
||||
video_putc(c);
|
||||
count--;
|
||||
}
|
||||
}
|
||||
|
||||
void video_draw_box(int style, int attr, char *title, int separate, int x, int y, int w, int h)
|
||||
{
|
||||
unsigned char *fb, *fb2;
|
||||
unsigned char *st = (style == SINGLE_BOX)?video_single_box : video_double_box;
|
||||
unsigned char *ti = (style == SINGLE_BOX)?video_single_title : video_double_title;
|
||||
int i;
|
||||
|
||||
fb = video_addr(x,y);
|
||||
*(fb) = st[0];
|
||||
*(fb+1) = attr;
|
||||
fb += 2;
|
||||
|
||||
fb2 = video_addr(x,y+h-1);
|
||||
*(fb2) = st[5];
|
||||
*(fb2+1) = attr;
|
||||
fb2 += 2;
|
||||
|
||||
for (i=0; i<w-2;i++)
|
||||
{
|
||||
*fb = st[1];
|
||||
fb++;
|
||||
*fb = attr;
|
||||
fb++;
|
||||
|
||||
*fb2 = st[6];
|
||||
fb2++;
|
||||
*fb2 = attr;
|
||||
fb2++;
|
||||
|
||||
}
|
||||
*fb = st[2];
|
||||
*(fb+1) = attr;
|
||||
|
||||
*fb2 = st[7];
|
||||
*(fb2+1) = attr;
|
||||
|
||||
fb = video_addr(x, y+1);
|
||||
fb2 = video_addr(x+w-1, y+1);
|
||||
for (i=0; i<h-2; i++)
|
||||
{
|
||||
*fb = st[3];
|
||||
*(fb+1) = attr; fb += 2*VIDEO_COLS;
|
||||
|
||||
*fb2 = st[4];
|
||||
*(fb2+1) = attr; fb2 += 2*VIDEO_COLS;
|
||||
}
|
||||
|
||||
/* Draw title */
|
||||
if (title)
|
||||
{
|
||||
if (separate == 0)
|
||||
{
|
||||
fb = video_addr(x+1, y);
|
||||
*fb = ti[3];
|
||||
fb += 2;
|
||||
*fb = ' ';
|
||||
fb += 2;
|
||||
while (*title)
|
||||
{
|
||||
*fb = *title;
|
||||
fb ++;
|
||||
*fb = attr;
|
||||
fb++; title++;
|
||||
}
|
||||
*fb = ' ';
|
||||
fb += 2;
|
||||
*fb = ti[4];
|
||||
}
|
||||
else
|
||||
{
|
||||
fb = video_addr(x, y+2);
|
||||
*fb = ti[0];
|
||||
fb += 2;
|
||||
for (i=0; i<w-2; i++)
|
||||
{
|
||||
*fb = ti[1];
|
||||
*(fb+1) = attr;
|
||||
fb += 2;
|
||||
}
|
||||
*fb = ti[2];
|
||||
*(fb+1) = attr;
|
||||
fb = video_addr(x+1, y+1);
|
||||
for (i=0; i<w-2; i++)
|
||||
{
|
||||
*fb = ' ';
|
||||
*(fb+1) = attr;
|
||||
fb += 2;
|
||||
}
|
||||
fb = video_addr(x+2, y+1);
|
||||
|
||||
while (*title)
|
||||
{
|
||||
*fb = *title;
|
||||
*(fb+1) = attr;
|
||||
fb += 2;
|
||||
title++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void video_draw_text(int x, int y, int attr, char *text)
|
||||
{
|
||||
unsigned char *fb = video_addr(x,y);
|
||||
while (*text)
|
||||
{
|
||||
*fb++ = *text++;
|
||||
*fb++ = attr;
|
||||
}
|
||||
}
|
||||
|
||||
void video_save_rect(int x, int y, int w, int h, void *save_area, int clearchar, int clearattr)
|
||||
{
|
||||
unsigned char *save = (unsigned char *)save_area;
|
||||
unsigned char *fb = video_addr(x,y);
|
||||
int i,j;
|
||||
for (i=0; i<h; i++)
|
||||
{
|
||||
unsigned char *fbb = fb;
|
||||
for (j=0; j<w; j++)
|
||||
{
|
||||
*save ++ = *fb;
|
||||
if (clearchar > 0) *fb = clearchar;
|
||||
fb ++;
|
||||
*save ++ = *fb;
|
||||
if (clearattr > 0) *fb = clearattr;
|
||||
}
|
||||
fb = fbb + 2*VIDEO_COLS;
|
||||
}
|
||||
}
|
||||
|
||||
void video_restore_rect(int x, int y, int w, int h, void *save_area)
|
||||
{
|
||||
unsigned char *save = (unsigned char *)save_area;
|
||||
unsigned char *fb = video_addr(x,y);
|
||||
int i,j;
|
||||
for (i=0; i<h; i++)
|
||||
{
|
||||
unsigned char *fbb = fb;
|
||||
for (j=0; j<w; j++)
|
||||
{
|
||||
*fb ++ = *save ++;
|
||||
*fb ++ = *save ++;
|
||||
}
|
||||
fb = fbb + 2*VIDEO_COLS;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int video_rows(void)
|
||||
{
|
||||
return VIDEO_ROWS;
|
||||
}
|
||||
|
||||
int video_cols(void)
|
||||
{
|
||||
return VIDEO_COLS;
|
||||
}
|
||||
|
||||
void video_size(int cols, int rows)
|
||||
{
|
||||
video_numrows = rows;
|
||||
video_numcols = cols;
|
||||
}
|
||||
|
||||
void video_clear(void)
|
||||
{
|
||||
unsigned short *fbb = (unsigned short *)0xFD0B8000;
|
||||
int i,j;
|
||||
unsigned short val = 0x2000 | current_attr;
|
||||
|
||||
for (i=0; i<video_rows(); i++)
|
||||
{
|
||||
for (j=0; j<video_cols(); j++)
|
||||
{
|
||||
*fbb++ = val;
|
||||
}
|
||||
}
|
||||
video_set_cursor(0,0);
|
||||
cursor_row = 0;
|
||||
cursor_col = 0;
|
||||
}
|
||||
|
||||
#ifdef EASTEREGG
|
||||
int video_easteregg_active = 0;
|
||||
|
||||
void video_easteregg(void)
|
||||
{
|
||||
video_easteregg_active = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
extern block_dev_desc_t * ide_get_dev(int dev);
|
||||
extern char version_string[];
|
||||
|
||||
void video_banner(void)
|
||||
{
|
||||
block_dev_desc_t *ide;
|
||||
int i;
|
||||
char *s;
|
||||
int maxdev;
|
||||
|
||||
|
||||
if (video_inited == 0) return;
|
||||
#ifdef EASTEREGG
|
||||
if (video_easteregg_active)
|
||||
{
|
||||
prompt_string="";
|
||||
video_clear();
|
||||
printf("\n");
|
||||
printf(" **** COMMODORE 64 BASIC X2 ****\n\n");
|
||||
printf(" 64K RAM SYSTEM 38911 BASIC BYTES FREE\n\n");
|
||||
printf("READY\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
#endif
|
||||
s = getenv("ide_maxbus");
|
||||
if (s)
|
||||
maxdev = atoi(s) * 2;
|
||||
else
|
||||
maxdev = 4;
|
||||
|
||||
s = getenv("stdout");
|
||||
if (s && strcmp(s, "serial") == 0)
|
||||
return;
|
||||
|
||||
video_clear();
|
||||
printf("%s\n\nCPU: ", version_string);
|
||||
checkcpu();
|
||||
printf("DRAM: %ld MB\n", gd->bd->bi_memsize/(1024*1024));
|
||||
printf("FSB: %ld MHz\n", gd->bd->bi_busfreq/1000000);
|
||||
|
||||
printf("\n---- Disk summary ----\n");
|
||||
for (i = 0; i < maxdev; i++)
|
||||
{
|
||||
ide = ide_get_dev(i);
|
||||
printf("Device %d: ", i);
|
||||
dev_print(ide);
|
||||
}
|
||||
|
||||
/*
|
||||
video_draw_box(SINGLE_BOX, 0x0F, "Test 1", 0, 0,18, 72, 4);
|
||||
video_draw_box(DOUBLE_BOX, 0x0F, "Test 2", 1, 4,10, 50, 6);
|
||||
video_draw_box(DOUBLE_BOX, 0x0F, "Test 3", 0, 40, 3, 20, 5);
|
||||
|
||||
video_draw_text(1, 4, 0x2F, "Highlighted options");
|
||||
video_draw_text(1, 5, 0x0F, "Non-selected option");
|
||||
video_draw_text(1, 6, 0x07, "disabled option");
|
||||
*/
|
||||
#ifdef EASTEREGG
|
||||
}
|
||||
#endif
|
||||
}
|
||||
16
board/MAI/menu/cmd_menu.c
Normal file
16
board/MAI/menu/cmd_menu.c
Normal file
@@ -0,0 +1,16 @@
|
||||
#include <common.h>
|
||||
#include <command.h>
|
||||
|
||||
int do_menu( cmd_tbl_t *cmdtp, /*bd_t *bd,*/ int flag, int argc, char *argv[] )
|
||||
{
|
||||
/* printf("<NOT YET IMPLEMENTED>\n"); */
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_AMIGAONEG3SE) && defined(CONFIG_CMD_BSP)
|
||||
U_BOOT_CMD(
|
||||
menu, 1, 1, do_menu,
|
||||
"menu - display BIOS setup menu\n",
|
||||
""
|
||||
);
|
||||
#endif
|
||||
66
board/MAI/menu/menu.c
Normal file
66
board/MAI/menu/menu.c
Normal file
@@ -0,0 +1,66 @@
|
||||
#include "menu.h"
|
||||
|
||||
#define SINGLE_BOX 0
|
||||
#define DOUBLE_BOX 1
|
||||
|
||||
void video_draw_box(int style, int attr, char *title, int separate, int x, int y, int w, int h);
|
||||
void video_draw_text(int x, int y, int attr, char *text);
|
||||
void video_save_rect(int x, int y, int w, int h, void *save_area, int clearchar, int clearattr);
|
||||
void video_restore_rect(int x, int y, int w, int h, void *save_area);
|
||||
int video_rows(void);
|
||||
int video_cols(void);
|
||||
|
||||
#define MAX_MENU_OPTIONS 200
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int used; /* flag if this entry is used */
|
||||
int entry_x; /* Character column of the menu entry */
|
||||
int entry_y; /* Character line of the entry */
|
||||
int option_x; /* Character colum of the option (entry is same) */
|
||||
} option_data_t;
|
||||
|
||||
option_data_t odata[MAX_MENU_OPTIONS];
|
||||
|
||||
int normal_attr = 0x0F;
|
||||
int select_attr = 0x2F;
|
||||
int disabled_attr = 0x07;
|
||||
|
||||
menu_t *root_menu;
|
||||
|
||||
int menu_init (menu_t *root)
|
||||
{
|
||||
char *s;
|
||||
int i;
|
||||
|
||||
s = getenv("menu_normal");
|
||||
if (s) normal_attr = atoi(s);
|
||||
|
||||
s = getenv("menu_select");
|
||||
if (s) select_attr = atoi(s);
|
||||
|
||||
s = getenv("menu_disabled");
|
||||
if (s) disabled_attr = atoi(s);
|
||||
|
||||
for (i=0; i<MAX_MENU_OPTIONS; i++) odata[i].used = 0;
|
||||
|
||||
root_menu = root;
|
||||
}
|
||||
|
||||
option_data_t *menu_alloc_odata(void)
|
||||
{
|
||||
int i;
|
||||
for (int i=0; i<MAX_MENU_OPTIONS; i++)
|
||||
{
|
||||
if (odata[i].used == 0) return &odata[i];
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void menu_free_odata(option_data_t *odata)
|
||||
{
|
||||
odata->used = 0;
|
||||
}
|
||||
|
||||
void menu_layout (menu_t *menu)
|
||||
{
|
||||
174
board/MAI/menu/menu.h
Normal file
174
board/MAI/menu/menu.h
Normal file
@@ -0,0 +1,174 @@
|
||||
#ifndef MENU_H
|
||||
#define MENU_H
|
||||
|
||||
/* A single menu */
|
||||
typedef void (*menu_finish_callback)(struct menu_s *menu);
|
||||
|
||||
typedef struct menu_s
|
||||
{
|
||||
char *name; /* Menu name */
|
||||
int num_options; /* Number of options in this menu */
|
||||
int flags; /* Various flags - see below */
|
||||
int option_align; /* Aligns options to a field width of this much characters if != 0 */
|
||||
|
||||
struct menu_option_s **options; /* Pointer to this menu's options */
|
||||
menu_finish_callback callback; /* Called when the menu closes */
|
||||
} menu_t;
|
||||
|
||||
/*
|
||||
* type: Type of the option (see below)
|
||||
* name: Name to display for this option
|
||||
* help: Optional help string
|
||||
* id : optional id number
|
||||
* sys : pointer for system-specific data, init to NULL and don't touch
|
||||
*/
|
||||
|
||||
#define OPTION_PREAMBLE \
|
||||
int type; \
|
||||
char *name; \
|
||||
char *help; \
|
||||
int id; \
|
||||
void *sys; \
|
||||
|
||||
|
||||
/*
|
||||
* Menu option types.
|
||||
* There are a number of different layouts for menu options depending
|
||||
* on their types. Currently there are the following possibilities:
|
||||
*
|
||||
* Submenu:
|
||||
* This entry links to a new menu.
|
||||
*
|
||||
* Boolean:
|
||||
* A simple on/off toggle entry. Booleans can be either yes/no, 0/1 or on/off.
|
||||
* Optionally, this entry can enable/disable a set of other options. An example would
|
||||
* be to enable/disable on-board USB, and if enabled give access to further options like
|
||||
* irq settings, base address etc.
|
||||
*
|
||||
* Text:
|
||||
* A single line/limited number of characters text entry box. Text can be restricted
|
||||
* to a certain charset (digits/hex digits/all/custom). Result is also available as an
|
||||
* int if numeric.
|
||||
*
|
||||
* Selection:
|
||||
* One-of-many type of selection entry. User may choose on of a set of strings, which
|
||||
* maps to a specific value for the variable.
|
||||
*
|
||||
* Routine:
|
||||
* Selecting this calls an entry-specific routine. This can be used for saving contents etc.
|
||||
*
|
||||
* Custom:
|
||||
* Display and behaviour of this entry is defined by a set of callbacks.
|
||||
*/
|
||||
|
||||
#define MENU_SUBMENU_TYPE 0
|
||||
typedef struct menu_submenu_s
|
||||
{
|
||||
OPTION_PREAMBLE
|
||||
|
||||
menu_t * submenu; /* Pointer to the submenu */
|
||||
} menu_submenu_t;
|
||||
|
||||
#define MENU_BOOLEAN_TYPE 1
|
||||
typedef struct menu_boolean_s
|
||||
{
|
||||
OPTION_PREAMBLE
|
||||
|
||||
char *variable; /* Name of the variable to getenv()/setenv() */
|
||||
int subtype; /* Subtype (on/off, 0/1, yes/no, enable/disable), see below */
|
||||
int mutex; /* Bit mask of options to enable/disable. Bit 0 is the option
|
||||
immediately following this one, bit 1 is the next one etc.
|
||||
bit 7 = 0 means to disable when this option is off,
|
||||
bit 7 = 1 means to disable when this option is on.
|
||||
An option is disabled when the type field's upper bit is set */
|
||||
} menu_boolean_t;
|
||||
|
||||
/* BOOLEAN Menu flags */
|
||||
#define MENU_BOOLEAN_ONOFF 0x01
|
||||
#define MENU_BOOLEAN_01 0x02
|
||||
#define MENU_BOOLEAN_YESNO 0x03
|
||||
#define MENU_BOOLEAN_ENDIS 0x04
|
||||
#define MENU_BOOLEAN_TYPE_MASK 0x07
|
||||
|
||||
|
||||
#define MENU_TEXT_TYPE 2
|
||||
typedef struct menu_text_s
|
||||
{
|
||||
OPTION_PREAMBLE
|
||||
|
||||
char *variable; /* Name of the variable to getenv()/setenv() */
|
||||
int maxchars; /* Max number of characters */
|
||||
char *charset; /* Optional charset to use */
|
||||
int flags; /* Flags - see below */
|
||||
} menu_text_t;
|
||||
|
||||
/* TEXT entry menu flags */
|
||||
#define MENU_TEXT_NUMERIC 0x01
|
||||
#define MENU_TEXT_HEXADECIMAL 0x02
|
||||
#define MENU_TEXT_FREE 0x03
|
||||
#define MENU_TEXT_TYPE_MASK 0x07
|
||||
|
||||
|
||||
#define MENU_SELECTION_TYPE 3
|
||||
typedef struct menu_select_option_s
|
||||
{
|
||||
char *map_from; /* Map this variable contents ... */
|
||||
char *map_to; /* ... to this menu text and vice versa */
|
||||
} menu_select_option_t;
|
||||
|
||||
typedef struct menu_select_s
|
||||
{
|
||||
OPTION_PREAMBLE
|
||||
|
||||
int num_options; /* Number of mappings */
|
||||
menu_select_option_t **options;
|
||||
/* Option list array */
|
||||
} menu_select_t;
|
||||
|
||||
|
||||
#define MENU_ROUTINE_TYPE 4
|
||||
typedef void (*menu_routine_callback)(struct menu_routine_s *);
|
||||
|
||||
typedef struct menu_routine_s
|
||||
{
|
||||
OPTION_PREAMBLE
|
||||
menu_routine_callback callback;
|
||||
/* routine to be called */
|
||||
void *user_data; /* User data, don't care for system */
|
||||
} menu_routine_t;
|
||||
|
||||
|
||||
#define MENU_CUSTOM_TYPE 5
|
||||
typedef void (*menu_custom_draw)(struct menu_custom_s *);
|
||||
typedef void (*menu_custom_key)(struct menu_custom_s *, int);
|
||||
|
||||
typedef struct menu_custom_s
|
||||
{
|
||||
OPTION_PREAMBLE
|
||||
menu_custom_draw drawfunc;
|
||||
menu_custom_key keyfunc;
|
||||
void *user_data;
|
||||
} menu_custom_t;
|
||||
|
||||
/*
|
||||
* The menu option superstructure
|
||||
*/
|
||||
typedef struct menu_option_s
|
||||
{
|
||||
union
|
||||
{
|
||||
menu_submenu_t m_sub_menu;
|
||||
menu_boolean_t m_boolean;
|
||||
menu_text_t m_text;
|
||||
menu_select_t m_select;
|
||||
menu_routine_t m_routine;
|
||||
};
|
||||
} menu_option_t;
|
||||
|
||||
/* Init the menu system. Returns <0 on error */
|
||||
int menu_init(menu_t *root);
|
||||
|
||||
/* Execute a single menu. Returns <0 on error */
|
||||
int menu_do(menu_t *menu);
|
||||
|
||||
#endif
|
||||
94
board/Marvell/common/bootseq.txt
Normal file
94
board/Marvell/common/bootseq.txt
Normal file
@@ -0,0 +1,94 @@
|
||||
(cpu/mpc7xxx/start.S)
|
||||
|
||||
start:
|
||||
b boot_cold
|
||||
|
||||
start_warm:
|
||||
b boot_warm
|
||||
|
||||
|
||||
boot_cold:
|
||||
boot_warm:
|
||||
clear bats
|
||||
init l2 (if enabled)
|
||||
init altivec (if enabled)
|
||||
invalidate l2 (if enabled)
|
||||
setup bats (from defines in config_EVB)
|
||||
enable_addr_trans: (if MMU enabled)
|
||||
enable MSR_IR and MSR_DR
|
||||
jump to in_flash
|
||||
|
||||
in_flash:
|
||||
enable l1 dcache
|
||||
gal_low_init: (board/evb64260/sdram_init.S)
|
||||
config SDRAM (CFG, TIMING, DECODE)
|
||||
init scratch regs (810 + 814)
|
||||
|
||||
detect DIMM0 (bank 0 only)
|
||||
config SDRAM_PARA0 to 256/512Mbit
|
||||
bl sdram_op_mode
|
||||
detect bank0 width
|
||||
write scratch reg 810
|
||||
config SDRAM_PARA0 with results
|
||||
config SDRAM_PARA1 with results
|
||||
|
||||
detect DIMM1 (bank 2 only)
|
||||
config SDRAM_PARA2 to 256/512Mbit
|
||||
detect bank2 width
|
||||
write scratch reg 814
|
||||
config SDRAM_PARA2 with results
|
||||
config SDRAM_PARA3 with results
|
||||
|
||||
setup device bus timings/width
|
||||
setup boot device timings/width
|
||||
|
||||
setup CPU_CONF (0x0)
|
||||
setup cpu master control register 0x160
|
||||
setup PCI0 TIMEOUT
|
||||
setup PCI1 TIMEOUT
|
||||
setup PCI0 BAR
|
||||
setup PCI1 BAR
|
||||
|
||||
setup MPP control 0-3
|
||||
setup GPP level control
|
||||
setup Serial ports multiplex
|
||||
|
||||
setup stack pointer (r1)
|
||||
setup GOT
|
||||
call cpu_init_f
|
||||
debug leds
|
||||
board_init_f: (common/board.c)
|
||||
board_early_init_f:
|
||||
remap gt regs?
|
||||
map PCI mem/io
|
||||
map device space
|
||||
clear out interupts
|
||||
init_timebase
|
||||
env_init
|
||||
serial_init
|
||||
console_init_f
|
||||
display_options
|
||||
initdram: (board/evb64260/evb64260.c)
|
||||
detect memory
|
||||
for each bank:
|
||||
dram_size()
|
||||
setup PCI slave memory mappings
|
||||
setup SCS
|
||||
setup monitor
|
||||
alloc board info struct
|
||||
init bd struct
|
||||
relocate_code: (cpu/mpc7xxx/start.S)
|
||||
copy,got,clearbss
|
||||
board_init_r(bd, dest_addr) (common/board.c)
|
||||
setup bd function pointers
|
||||
trap_init
|
||||
flash_init: (board/evb64260/flash.c)
|
||||
setup bd flash info
|
||||
cpu_init_r: (cpu/mpc7xxx/cpu_init.c)
|
||||
nothing
|
||||
mem_malloc_init
|
||||
malloc_bin_reloc
|
||||
spi_init (r or f)??? (CFG_ENV_IS_IN_EEPROM)
|
||||
env_relocated
|
||||
misc_init_r(bd): (board/evb64260/evb64260.c)
|
||||
mpsc_init2
|
||||
131
board/Marvell/common/ecctest.c
Normal file
131
board/Marvell/common/ecctest.c
Normal file
@@ -0,0 +1,131 @@
|
||||
/*
|
||||
* (C) Copyright 2001
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifdef ECC_TEST
|
||||
static inline void ecc_off (void)
|
||||
{
|
||||
*(volatile int *) (INTERNAL_REG_BASE_ADDR + 0x4b4) &= ~0x00200000;
|
||||
}
|
||||
|
||||
static inline void ecc_on (void)
|
||||
{
|
||||
*(volatile int *) (INTERNAL_REG_BASE_ADDR + 0x4b4) |= 0x00200000;
|
||||
}
|
||||
|
||||
static int putshex (const char *buf, int len)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
printf ("%02x", buf[i]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int char_memcpy (void *d, const void *s, int len)
|
||||
{
|
||||
int i;
|
||||
char *cd = d;
|
||||
const char *cs = s;
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
*(cd++) = *(cs++);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int memory_test (char *buf)
|
||||
{
|
||||
const char src[][16] = {
|
||||
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
||||
{0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
||||
0x01, 0x01, 0x01, 0x01, 0x01, 0x01},
|
||||
{0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
|
||||
0x02, 0x02, 0x02, 0x02, 0x02, 0x02},
|
||||
{0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
|
||||
0x04, 0x04, 0x04, 0x04, 0x04, 0x04},
|
||||
{0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08, 0x08},
|
||||
{0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
|
||||
0x10, 0x10, 0x10, 0x10, 0x10, 0x10},
|
||||
{0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
|
||||
0x20, 0x20, 0x20, 0x20, 0x20, 0x20},
|
||||
{0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
|
||||
0x40, 0x40, 0x40, 0x40, 0x40, 0x40},
|
||||
{0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
|
||||
0x80, 0x80, 0x80, 0x80, 0x80, 0x80},
|
||||
{0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
|
||||
0x55, 0x55, 0x55, 0x55, 0x55, 0x55},
|
||||
{0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
|
||||
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa},
|
||||
{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff}
|
||||
};
|
||||
const int foo[] = { 0 };
|
||||
int i, j, a;
|
||||
|
||||
printf ("\ntest @ %d %p\n", foo[0], buf);
|
||||
for (i = 0; i < 12; i++) {
|
||||
for (a = 0; a < 8; a++) {
|
||||
const char *s = src[i] + a;
|
||||
int align = (unsigned) (s) & 0x7;
|
||||
|
||||
/* ecc_off(); */
|
||||
memcpy (buf, s, 8);
|
||||
/* ecc_on(); */
|
||||
putshex (s, 8);
|
||||
if (memcmp (buf, s, 8)) {
|
||||
putc ('\n');
|
||||
putshex (buf, 8);
|
||||
printf (" [FAIL] (%p) align=%d\n", s, align);
|
||||
for (j = 0; j < 8; j++) {
|
||||
s[j] == buf[j] ? puts (" ") :
|
||||
printf ("%02x",
|
||||
(s[j]) ^ (buf[j]));
|
||||
}
|
||||
putc ('\n');
|
||||
} else {
|
||||
printf (" [PASS] (%p) align=%d\n", s, align);
|
||||
}
|
||||
/* ecc_off(); */
|
||||
char_memcpy (buf, s, 8);
|
||||
/* ecc_on(); */
|
||||
putshex (s, 8);
|
||||
if (memcmp (buf, s, 8)) {
|
||||
putc ('\n');
|
||||
putshex (buf, 8);
|
||||
printf (" [FAIL] (%p) align=%d\n", s, align);
|
||||
for (j = 0; j < 8; j++) {
|
||||
s[j] == buf[j] ? puts (" ") :
|
||||
printf ("%02x",
|
||||
(s[j]) ^ (buf[j]));
|
||||
}
|
||||
putc ('\n');
|
||||
} else {
|
||||
printf (" [PASS] (%p) align=%d\n", s, align);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
1072
board/Marvell/common/flash.c
Normal file
1072
board/Marvell/common/flash.c
Normal file
File diff suppressed because it is too large
Load Diff
532
board/Marvell/common/i2c.c
Normal file
532
board/Marvell/common/i2c.c
Normal file
@@ -0,0 +1,532 @@
|
||||
/*
|
||||
* (C) Copyright 2000
|
||||
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*
|
||||
* Hacked for the DB64360 board by Ingo.Assmus@keymile.com
|
||||
* extra improvments by Brain Waite
|
||||
*/
|
||||
#include <common.h>
|
||||
#include <mpc8xx.h>
|
||||
#include <malloc.h>
|
||||
#include "../include/mv_gen_reg.h"
|
||||
#include "../include/core.h"
|
||||
|
||||
#define MAX_I2C_RETRYS 10
|
||||
#define I2C_DELAY 1000 /* Should be at least the # of MHz of Tclk */
|
||||
#undef DEBUG_I2C
|
||||
/*#define DEBUG_I2C*/
|
||||
|
||||
#ifdef DEBUG_I2C
|
||||
#define DP(x) x
|
||||
#else
|
||||
#define DP(x)
|
||||
#endif
|
||||
|
||||
/* Assuming that there is only one master on the bus (us) */
|
||||
|
||||
static void i2c_init (int speed, int slaveaddr)
|
||||
{
|
||||
unsigned int n, m, freq, margin, power;
|
||||
unsigned int actualN = 0, actualM = 0;
|
||||
unsigned int control, status;
|
||||
unsigned int minMargin = 0xffffffff;
|
||||
unsigned int tclk = CFG_TCLK;
|
||||
unsigned int i2cFreq = speed; /* 100000 max. Fast mode not supported */
|
||||
|
||||
DP (puts ("i2c_init\n"));
|
||||
/* gtI2cMasterInit */
|
||||
for (n = 0; n < 8; n++) {
|
||||
for (m = 0; m < 16; m++) {
|
||||
power = 2 << n; /* power = 2^(n+1) */
|
||||
freq = tclk / (10 * (m + 1) * power);
|
||||
if (i2cFreq > freq)
|
||||
margin = i2cFreq - freq;
|
||||
else
|
||||
margin = freq - i2cFreq;
|
||||
if (margin < minMargin) {
|
||||
minMargin = margin;
|
||||
actualN = n;
|
||||
actualM = m;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DP (puts ("setup i2c bus\n"));
|
||||
|
||||
/* Setup bus */
|
||||
/* gtI2cReset */
|
||||
GT_REG_WRITE (I2C_SOFT_RESET, 0);
|
||||
|
||||
DP (puts ("udelay...\n"));
|
||||
|
||||
udelay (I2C_DELAY);
|
||||
|
||||
DP (puts ("set baudrate\n"));
|
||||
|
||||
GT_REG_WRITE (I2C_STATUS_BAUDE_RATE, (actualM << 3) | actualN);
|
||||
GT_REG_WRITE (I2C_CONTROL, (0x1 << 2) | (0x1 << 6));
|
||||
|
||||
udelay (I2C_DELAY * 10);
|
||||
|
||||
DP (puts ("read control, baudrate\n"));
|
||||
|
||||
GT_REG_READ (I2C_STATUS_BAUDE_RATE, &status);
|
||||
GT_REG_READ (I2C_CONTROL, &control);
|
||||
}
|
||||
|
||||
static uchar i2c_start (void)
|
||||
{ /* DB64360 checked -> ok */
|
||||
unsigned int control, status;
|
||||
int count = 0;
|
||||
|
||||
DP (puts ("i2c_start\n"));
|
||||
|
||||
/* Set the start bit */
|
||||
|
||||
/* gtI2cGenerateStartBit() */
|
||||
|
||||
GT_REG_READ (I2C_CONTROL, &control);
|
||||
control |= (0x1 << 5); /* generate the I2C_START_BIT */
|
||||
GT_REG_WRITE (I2C_CONTROL, control);
|
||||
|
||||
GT_REG_READ (I2C_STATUS_BAUDE_RATE, &status);
|
||||
|
||||
count = 0;
|
||||
while ((status & 0xff) != 0x08) {
|
||||
udelay (I2C_DELAY);
|
||||
if (count > 20) {
|
||||
GT_REG_WRITE (I2C_CONTROL, (0x1 << 4)); /*stop */
|
||||
return (status);
|
||||
}
|
||||
GT_REG_READ (I2C_STATUS_BAUDE_RATE, &status);
|
||||
count++;
|
||||
}
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
static uchar i2c_select_device (uchar dev_addr, uchar read, int ten_bit)
|
||||
{
|
||||
unsigned int status, data, bits = 7;
|
||||
int count = 0;
|
||||
|
||||
DP (puts ("i2c_select_device\n"));
|
||||
|
||||
/* Output slave address */
|
||||
|
||||
if (ten_bit) {
|
||||
bits = 10;
|
||||
}
|
||||
|
||||
data = (dev_addr << 1);
|
||||
/* set the read bit */
|
||||
data |= read;
|
||||
GT_REG_WRITE (I2C_DATA, data);
|
||||
/* assert the address */
|
||||
RESET_REG_BITS (I2C_CONTROL, BIT3);
|
||||
|
||||
udelay (I2C_DELAY);
|
||||
|
||||
GT_REG_READ (I2C_STATUS_BAUDE_RATE, &status);
|
||||
count = 0;
|
||||
while (((status & 0xff) != 0x40) && ((status & 0xff) != 0x18)) {
|
||||
udelay (I2C_DELAY);
|
||||
if (count > 20) {
|
||||
GT_REG_WRITE (I2C_CONTROL, (0x1 << 4)); /*stop */
|
||||
return (status);
|
||||
}
|
||||
GT_REG_READ (I2C_STATUS_BAUDE_RATE, &status);
|
||||
count++;
|
||||
}
|
||||
|
||||
if (bits == 10) {
|
||||
printf ("10 bit I2C addressing not yet implemented\n");
|
||||
return (0xff);
|
||||
}
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
static uchar i2c_get_data (uchar * return_data, int len)
|
||||
{
|
||||
|
||||
unsigned int data, status = 0;
|
||||
int count = 0;
|
||||
|
||||
DP (puts ("i2c_get_data\n"));
|
||||
|
||||
while (len) {
|
||||
|
||||
/* Get and return the data */
|
||||
|
||||
RESET_REG_BITS (I2C_CONTROL, (0x1 << 3));
|
||||
|
||||
udelay (I2C_DELAY * 5);
|
||||
|
||||
GT_REG_READ (I2C_STATUS_BAUDE_RATE, &status);
|
||||
count++;
|
||||
while ((status & 0xff) != 0x50) {
|
||||
udelay (I2C_DELAY);
|
||||
if (count > 2) {
|
||||
GT_REG_WRITE (I2C_CONTROL, (0x1 << 4)); /*stop */
|
||||
return 0;
|
||||
}
|
||||
GT_REG_READ (I2C_STATUS_BAUDE_RATE, &status);
|
||||
count++;
|
||||
}
|
||||
GT_REG_READ (I2C_DATA, &data);
|
||||
len--;
|
||||
*return_data = (uchar) data;
|
||||
return_data++;
|
||||
}
|
||||
RESET_REG_BITS (I2C_CONTROL, BIT2 | BIT3);
|
||||
while ((status & 0xff) != 0x58) {
|
||||
udelay (I2C_DELAY);
|
||||
if (count > 200) {
|
||||
GT_REG_WRITE (I2C_CONTROL, (0x1 << 4)); /*stop */
|
||||
return (status);
|
||||
}
|
||||
GT_REG_READ (I2C_STATUS_BAUDE_RATE, &status);
|
||||
count++;
|
||||
}
|
||||
GT_REG_WRITE (I2C_CONTROL, (0x1 << 4)); /* stop */
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
static uchar i2c_write_data (unsigned int *data, int len)
|
||||
{
|
||||
unsigned int status;
|
||||
int count = 0;
|
||||
unsigned int temp;
|
||||
unsigned int *temp_ptr = data;
|
||||
|
||||
DP (puts ("i2c_write_data\n"));
|
||||
|
||||
while (len) {
|
||||
temp = (unsigned int) (*temp_ptr);
|
||||
GT_REG_WRITE (I2C_DATA, temp);
|
||||
RESET_REG_BITS (I2C_CONTROL, (0x1 << 3));
|
||||
|
||||
udelay (I2C_DELAY);
|
||||
|
||||
GT_REG_READ (I2C_STATUS_BAUDE_RATE, &status);
|
||||
count++;
|
||||
while ((status & 0xff) != 0x28) {
|
||||
udelay (I2C_DELAY);
|
||||
if (count > 20) {
|
||||
GT_REG_WRITE (I2C_CONTROL, (0x1 << 4)); /*stop */
|
||||
return (status);
|
||||
}
|
||||
GT_REG_READ (I2C_STATUS_BAUDE_RATE, &status);
|
||||
count++;
|
||||
}
|
||||
len--;
|
||||
temp_ptr++;
|
||||
}
|
||||
/* 11-14-2002 Paul Marchese */
|
||||
/* Can't have the write issuing a stop command */
|
||||
/* it's wrong to have a stop bit in read stream or write stream */
|
||||
/* since we don't know if it's really the end of the command */
|
||||
/* or whether we have just send the device address + offset */
|
||||
/* we will push issuing the stop command off to the original */
|
||||
/* calling function */
|
||||
/* set the interrupt bit in the control register */
|
||||
GT_REG_WRITE (I2C_CONTROL, (0x1 << 3));
|
||||
udelay (I2C_DELAY * 10);
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* 11-14-2002 Paul Marchese */
|
||||
/* created this function to get the i2c_write() */
|
||||
/* function working properly. */
|
||||
/* function to write bytes out on the i2c bus */
|
||||
/* this is identical to the function i2c_write_data() */
|
||||
/* except that it requires a buffer that is an */
|
||||
/* unsigned character array. You can't use */
|
||||
/* i2c_write_data() to send an array of unsigned characters */
|
||||
/* since the byte of interest ends up on the wrong end of the bus */
|
||||
/* aah, the joys of big endian versus little endian! */
|
||||
/* */
|
||||
/* returns 0 = success */
|
||||
/* anything other than zero is failure */
|
||||
static uchar i2c_write_byte (unsigned char *data, int len)
|
||||
{
|
||||
unsigned int status;
|
||||
int count = 0;
|
||||
unsigned int temp;
|
||||
unsigned char *temp_ptr = data;
|
||||
|
||||
DP (puts ("i2c_write_byte\n"));
|
||||
|
||||
while (len) {
|
||||
/* Set and assert the data */
|
||||
temp = *temp_ptr;
|
||||
GT_REG_WRITE (I2C_DATA, temp);
|
||||
RESET_REG_BITS (I2C_CONTROL, (0x1 << 3));
|
||||
|
||||
udelay (I2C_DELAY);
|
||||
|
||||
GT_REG_READ (I2C_STATUS_BAUDE_RATE, &status);
|
||||
count++;
|
||||
while ((status & 0xff) != 0x28) {
|
||||
udelay (I2C_DELAY);
|
||||
if (count > 20) {
|
||||
GT_REG_WRITE (I2C_CONTROL, (0x1 << 4)); /*stop */
|
||||
return (status);
|
||||
}
|
||||
GT_REG_READ (I2C_STATUS_BAUDE_RATE, &status);
|
||||
count++;
|
||||
}
|
||||
len--;
|
||||
temp_ptr++;
|
||||
}
|
||||
/* Can't have the write issuing a stop command */
|
||||
/* it's wrong to have a stop bit in read stream or write stream */
|
||||
/* since we don't know if it's really the end of the command */
|
||||
/* or whether we have just send the device address + offset */
|
||||
/* we will push issuing the stop command off to the original */
|
||||
/* calling function */
|
||||
/* GT_REG_WRITE(I2C_CONTROL, (0x1 << 3) | (0x1 << 4));
|
||||
GT_REG_WRITE(I2C_CONTROL, (0x1 << 4)); */
|
||||
/* set the interrupt bit in the control register */
|
||||
GT_REG_WRITE (I2C_CONTROL, (0x1 << 3));
|
||||
udelay (I2C_DELAY * 10);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
static uchar
|
||||
i2c_set_dev_offset (uchar dev_addr, unsigned int offset, int ten_bit,
|
||||
int alen)
|
||||
{
|
||||
uchar status;
|
||||
unsigned int table[2];
|
||||
|
||||
/* initialize the table of address offset bytes */
|
||||
/* utilized for 2 byte address offsets */
|
||||
/* NOTE: the order is high byte first! */
|
||||
table[1] = offset & 0xff; /* low byte */
|
||||
table[0] = offset / 0x100; /* high byte */
|
||||
|
||||
DP (puts ("i2c_set_dev_offset\n"));
|
||||
|
||||
status = i2c_select_device (dev_addr, 0, ten_bit);
|
||||
if (status) {
|
||||
#ifdef DEBUG_I2C
|
||||
printf ("Failed to select device setting offset: 0x%02x\n",
|
||||
status);
|
||||
#endif
|
||||
return status;
|
||||
}
|
||||
/* check the address offset length */
|
||||
if (alen == 0)
|
||||
/* no address offset */
|
||||
return (0);
|
||||
else if (alen == 1) {
|
||||
/* 1 byte address offset */
|
||||
status = i2c_write_data (&offset, 1);
|
||||
if (status) {
|
||||
#ifdef DEBUG_I2C
|
||||
printf ("Failed to write data: 0x%02x\n", status);
|
||||
#endif
|
||||
return status;
|
||||
}
|
||||
} else if (alen == 2) {
|
||||
/* 2 bytes address offset */
|
||||
status = i2c_write_data (table, 2);
|
||||
if (status) {
|
||||
#ifdef DEBUG_I2C
|
||||
printf ("Failed to write data: 0x%02x\n", status);
|
||||
#endif
|
||||
return status;
|
||||
}
|
||||
} else {
|
||||
/* address offset unknown or not supported */
|
||||
printf ("Address length offset %d is not supported\n", alen);
|
||||
return 1;
|
||||
}
|
||||
return 0; /* sucessful completion */
|
||||
}
|
||||
|
||||
uchar
|
||||
i2c_read (uchar dev_addr, unsigned int offset, int alen, uchar * data,
|
||||
int len)
|
||||
{
|
||||
uchar status = 0;
|
||||
unsigned int i2cFreq = CFG_I2C_SPEED;
|
||||
|
||||
DP (puts ("i2c_read\n"));
|
||||
|
||||
i2c_init (i2cFreq, 0); /* set the i2c frequency */
|
||||
|
||||
status = i2c_start ();
|
||||
|
||||
if (status) {
|
||||
#ifdef DEBUG_I2C
|
||||
printf ("Transaction start failed: 0x%02x\n", status);
|
||||
#endif
|
||||
return status;
|
||||
}
|
||||
|
||||
status = i2c_set_dev_offset (dev_addr, offset, 0, alen); /* send the slave address + offset */
|
||||
if (status) {
|
||||
#ifdef DEBUG_I2C
|
||||
printf ("Failed to set slave address & offset: 0x%02x\n",
|
||||
status);
|
||||
#endif
|
||||
return status;
|
||||
}
|
||||
|
||||
i2c_init (i2cFreq, 0); /* set the i2c frequency again */
|
||||
|
||||
status = i2c_start ();
|
||||
if (status) {
|
||||
#ifdef DEBUG_I2C
|
||||
printf ("Transaction restart failed: 0x%02x\n", status);
|
||||
#endif
|
||||
return status;
|
||||
}
|
||||
|
||||
status = i2c_select_device (dev_addr, 1, 0); /* send the slave address */
|
||||
if (status) {
|
||||
#ifdef DEBUG_I2C
|
||||
printf ("Address not acknowledged: 0x%02x\n", status);
|
||||
#endif
|
||||
return status;
|
||||
}
|
||||
|
||||
status = i2c_get_data (data, len);
|
||||
if (status) {
|
||||
#ifdef DEBUG_I2C
|
||||
printf ("Data not recieved: 0x%02x\n", status);
|
||||
#endif
|
||||
return status;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* 11-14-2002 Paul Marchese */
|
||||
/* Function to set the I2C stop bit */
|
||||
void i2c_stop (void)
|
||||
{
|
||||
GT_REG_WRITE (I2C_CONTROL, (0x1 << 4));
|
||||
}
|
||||
|
||||
/* 11-14-2002 Paul Marchese */
|
||||
/* I2C write function */
|
||||
/* dev_addr = device address */
|
||||
/* offset = address offset */
|
||||
/* alen = length in bytes of the address offset */
|
||||
/* data = pointer to buffer to read data into */
|
||||
/* len = # of bytes to read */
|
||||
/* */
|
||||
/* returns 0 = succesful */
|
||||
/* anything but zero is failure */
|
||||
uchar
|
||||
i2c_write (uchar dev_addr, unsigned int offset, int alen, uchar * data,
|
||||
int len)
|
||||
{
|
||||
uchar status = 0;
|
||||
unsigned int i2cFreq = CFG_I2C_SPEED;
|
||||
|
||||
DP (puts ("i2c_write\n"));
|
||||
|
||||
i2c_init (i2cFreq, 0); /* set the i2c frequency */
|
||||
|
||||
status = i2c_start (); /* send a start bit */
|
||||
|
||||
if (status) {
|
||||
#ifdef DEBUG_I2C
|
||||
printf ("Transaction start failed: 0x%02x\n", status);
|
||||
#endif
|
||||
return status;
|
||||
}
|
||||
|
||||
status = i2c_set_dev_offset (dev_addr, offset, 0, alen); /* send the slave address + offset */
|
||||
if (status) {
|
||||
#ifdef DEBUG_I2C
|
||||
printf ("Failed to set slave address & offset: 0x%02x\n",
|
||||
status);
|
||||
#endif
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
status = i2c_write_byte (data, len); /* write the data */
|
||||
if (status) {
|
||||
#ifdef DEBUG_I2C
|
||||
printf ("Data not written: 0x%02x\n", status);
|
||||
#endif
|
||||
return status;
|
||||
}
|
||||
/* issue a stop bit */
|
||||
i2c_stop ();
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* 11-14-2002 Paul Marchese */
|
||||
/* function to determine if an I2C device is present */
|
||||
/* chip = device address of chip to check for */
|
||||
/* */
|
||||
/* returns 0 = sucessful, the device exists */
|
||||
/* anything other than zero is failure, no device */
|
||||
int i2c_probe (uchar chip)
|
||||
{
|
||||
|
||||
/* We are just looking for an <ACK> back. */
|
||||
/* To see if the device/chip is there */
|
||||
|
||||
#ifdef DEBUG_I2C
|
||||
unsigned int i2c_status;
|
||||
#endif
|
||||
uchar status = 0;
|
||||
unsigned int i2cFreq = CFG_I2C_SPEED;
|
||||
|
||||
DP (puts ("i2c_probe\n"));
|
||||
|
||||
i2c_init (i2cFreq, 0); /* set the i2c frequency */
|
||||
|
||||
status = i2c_start (); /* send a start bit */
|
||||
|
||||
if (status) {
|
||||
#ifdef DEBUG_I2C
|
||||
printf ("Transaction start failed: 0x%02x\n", status);
|
||||
#endif
|
||||
return (int) status;
|
||||
}
|
||||
|
||||
status = i2c_set_dev_offset (chip, 0, 0, 0); /* send the slave address + no offset */
|
||||
if (status) {
|
||||
#ifdef DEBUG_I2C
|
||||
printf ("Failed to set slave address: 0x%02x\n", status);
|
||||
#endif
|
||||
return (int) status;
|
||||
}
|
||||
#ifdef DEBUG_I2C
|
||||
GT_REG_READ (I2C_STATUS_BAUDE_RATE, &i2c_status);
|
||||
printf ("address %#x returned %#x\n", chip, i2c_status);
|
||||
#endif
|
||||
/* issue a stop bit */
|
||||
i2c_stop ();
|
||||
return 0; /* successful completion */
|
||||
}
|
||||
32
board/Marvell/common/i2c.h
Normal file
32
board/Marvell/common/i2c.h
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* (C) Copyright 2000
|
||||
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*
|
||||
* Hacked for the DB64360 board by Ingo.Assmus@keymile.com
|
||||
*/
|
||||
|
||||
#ifndef __I2C_H__
|
||||
#define __I2C_H__
|
||||
|
||||
/* function declarations */
|
||||
uchar i2c_read(uchar, unsigned int, int, uchar*, int);
|
||||
|
||||
#endif
|
||||
269
board/Marvell/common/intel_flash.c
Normal file
269
board/Marvell/common/intel_flash.c
Normal file
@@ -0,0 +1,269 @@
|
||||
/*
|
||||
* (C) Copyright 2000
|
||||
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*
|
||||
* Hacked for the marvell db64360 eval board by
|
||||
* Ingo Assmus <ingo.assmus@keymile.com>
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <mpc8xx.h>
|
||||
#include "../include/mv_gen_reg.h"
|
||||
#include "../include/memory.h"
|
||||
#include "intel_flash.h"
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* Protection Flags:
|
||||
*/
|
||||
#define FLAG_PROTECT_SET 0x01
|
||||
#define FLAG_PROTECT_CLEAR 0x02
|
||||
|
||||
static void bank_reset (flash_info_t * info, int sect)
|
||||
{
|
||||
bank_addr_t addrw, eaddrw;
|
||||
|
||||
addrw = (bank_addr_t) info->start[sect];
|
||||
eaddrw = BANK_ADDR_NEXT_WORD (addrw);
|
||||
|
||||
while (addrw < eaddrw) {
|
||||
#ifdef FLASH_DEBUG
|
||||
printf (" writing reset cmd to addr 0x%08lx\n",
|
||||
(unsigned long) addrw);
|
||||
#endif
|
||||
*addrw = BANK_CMD_RST;
|
||||
addrw++;
|
||||
}
|
||||
}
|
||||
|
||||
static void bank_erase_init (flash_info_t * info, int sect)
|
||||
{
|
||||
bank_addr_t addrw, saddrw, eaddrw;
|
||||
int flag;
|
||||
|
||||
#ifdef FLASH_DEBUG
|
||||
printf ("0x%08x BANK_CMD_PROG\n", BANK_CMD_PROG);
|
||||
printf ("0x%08x BANK_CMD_ERASE1\n", BANK_CMD_ERASE1);
|
||||
printf ("0x%08x BANK_CMD_ERASE2\n", BANK_CMD_ERASE2);
|
||||
printf ("0x%08x BANK_CMD_CLR_STAT\n", BANK_CMD_CLR_STAT);
|
||||
printf ("0x%08x BANK_CMD_RST\n", BANK_CMD_RST);
|
||||
printf ("0x%08x BANK_STAT_RDY\n", BANK_STAT_RDY);
|
||||
printf ("0x%08x BANK_STAT_ERR\n", BANK_STAT_ERR);
|
||||
#endif
|
||||
|
||||
saddrw = (bank_addr_t) info->start[sect];
|
||||
eaddrw = BANK_ADDR_NEXT_WORD (saddrw);
|
||||
|
||||
#ifdef FLASH_DEBUG
|
||||
printf ("erasing sector %d, start addr = 0x%08lx "
|
||||
"(bank next word addr = 0x%08lx)\n", sect,
|
||||
(unsigned long) saddrw, (unsigned long) eaddrw);
|
||||
#endif
|
||||
|
||||
/* Disable intrs which might cause a timeout here */
|
||||
flag = disable_interrupts ();
|
||||
|
||||
for (addrw = saddrw; addrw < eaddrw; addrw++) {
|
||||
#ifdef FLASH_DEBUG
|
||||
printf (" writing erase cmd to addr 0x%08lx\n",
|
||||
(unsigned long) addrw);
|
||||
#endif
|
||||
*addrw = BANK_CMD_ERASE1;
|
||||
*addrw = BANK_CMD_ERASE2;
|
||||
}
|
||||
|
||||
/* re-enable interrupts if necessary */
|
||||
if (flag)
|
||||
enable_interrupts ();
|
||||
}
|
||||
|
||||
static int bank_erase_poll (flash_info_t * info, int sect)
|
||||
{
|
||||
bank_addr_t addrw, saddrw, eaddrw;
|
||||
int sectdone, haderr;
|
||||
|
||||
saddrw = (bank_addr_t) info->start[sect];
|
||||
eaddrw = BANK_ADDR_NEXT_WORD (saddrw);
|
||||
|
||||
sectdone = 1;
|
||||
haderr = 0;
|
||||
|
||||
for (addrw = saddrw; addrw < eaddrw; addrw++) {
|
||||
bank_word_t stat = *addrw;
|
||||
|
||||
#ifdef FLASH_DEBUG
|
||||
printf (" checking status at addr "
|
||||
"0x%08x [0x%08x]\n", (unsigned long) addrw, stat);
|
||||
#endif
|
||||
if ((stat & BANK_STAT_RDY) != BANK_STAT_RDY)
|
||||
sectdone = 0;
|
||||
else if ((stat & BANK_STAT_ERR) != 0) {
|
||||
printf (" failed on sector %d "
|
||||
"(stat = 0x%08x) at "
|
||||
"address 0x%p\n", sect, stat, addrw);
|
||||
*addrw = BANK_CMD_CLR_STAT;
|
||||
haderr = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (haderr)
|
||||
return (-1);
|
||||
else
|
||||
return (sectdone);
|
||||
}
|
||||
|
||||
int write_word_intel (bank_addr_t addr, bank_word_t value)
|
||||
{
|
||||
bank_word_t stat;
|
||||
ulong start;
|
||||
int flag, retval;
|
||||
|
||||
/* Disable interrupts which might cause a timeout here */
|
||||
flag = disable_interrupts ();
|
||||
|
||||
*addr = BANK_CMD_PROG;
|
||||
|
||||
*addr = value;
|
||||
|
||||
/* re-enable interrupts if necessary */
|
||||
if (flag)
|
||||
enable_interrupts ();
|
||||
|
||||
retval = 0;
|
||||
|
||||
/* data polling for D7 */
|
||||
start = get_timer (0);
|
||||
do {
|
||||
if (get_timer (start) > CFG_FLASH_WRITE_TOUT) {
|
||||
retval = 1;
|
||||
goto done;
|
||||
}
|
||||
stat = *addr;
|
||||
} while ((stat & BANK_STAT_RDY) != BANK_STAT_RDY);
|
||||
|
||||
if ((stat & BANK_STAT_ERR) != 0) {
|
||||
printf ("flash program failed (stat = 0x%08lx) "
|
||||
"at address 0x%08lx\n", (ulong) stat, (ulong) addr);
|
||||
*addr = BANK_CMD_CLR_STAT;
|
||||
retval = 3;
|
||||
}
|
||||
|
||||
done:
|
||||
/* reset to read mode */
|
||||
*addr = BANK_CMD_RST;
|
||||
|
||||
return (retval);
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
int flash_erase_intel (flash_info_t * info, int s_first, int s_last)
|
||||
{
|
||||
int prot, sect, haderr;
|
||||
ulong start, now, last;
|
||||
|
||||
#ifdef FLASH_DEBUG
|
||||
printf ("\nflash_erase: erase %d sectors (%d to %d incl.) from\n"
|
||||
" Bank # %d: ", s_last - s_first + 1, s_first, s_last,
|
||||
(info - flash_info) + 1);
|
||||
flash_print_info (info);
|
||||
#endif
|
||||
|
||||
if ((s_first < 0) || (s_first > s_last)) {
|
||||
if (info->flash_id == FLASH_UNKNOWN) {
|
||||
printf ("- missing\n");
|
||||
} else {
|
||||
printf ("- no sectors to erase\n");
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
prot = 0;
|
||||
for (sect = s_first; sect <= s_last; ++sect) {
|
||||
if (info->protect[sect]) {
|
||||
prot++;
|
||||
}
|
||||
}
|
||||
|
||||
if (prot) {
|
||||
printf ("- Warning: %d protected sector%s will not be erased!\n", prot, (prot > 1 ? "s" : ""));
|
||||
}
|
||||
|
||||
start = get_timer (0);
|
||||
last = 0;
|
||||
haderr = 0;
|
||||
|
||||
for (sect = s_first; sect <= s_last; sect++) {
|
||||
if (info->protect[sect] == 0) { /* not protected */
|
||||
ulong estart;
|
||||
int sectdone;
|
||||
|
||||
bank_erase_init (info, sect);
|
||||
|
||||
/* wait at least 80us - let's wait 1 ms */
|
||||
udelay (1000);
|
||||
|
||||
estart = get_timer (start);
|
||||
|
||||
do {
|
||||
now = get_timer (start);
|
||||
|
||||
if (now - estart > CFG_FLASH_ERASE_TOUT) {
|
||||
printf ("Timeout (sect %d)\n", sect);
|
||||
haderr = 1;
|
||||
break;
|
||||
}
|
||||
#ifndef FLASH_DEBUG
|
||||
/* show that we're waiting */
|
||||
if ((now - last) > 1000) { /* every second */
|
||||
putc ('.');
|
||||
last = now;
|
||||
}
|
||||
#endif
|
||||
|
||||
sectdone = bank_erase_poll (info, sect);
|
||||
|
||||
if (sectdone < 0) {
|
||||
haderr = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
} while (!sectdone);
|
||||
|
||||
if (haderr)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (haderr > 0)
|
||||
printf (" failed\n");
|
||||
else
|
||||
printf (" done\n");
|
||||
|
||||
/* reset to read mode */
|
||||
for (sect = s_first; sect <= s_last; sect++) {
|
||||
if (info->protect[sect] == 0) { /* not protected */
|
||||
bank_reset (info, sect);
|
||||
}
|
||||
}
|
||||
return haderr;
|
||||
}
|
||||
186
board/Marvell/common/intel_flash.h
Normal file
186
board/Marvell/common/intel_flash.h
Normal file
@@ -0,0 +1,186 @@
|
||||
/*
|
||||
* (C) Copyright 2000
|
||||
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*
|
||||
* Hacked for the marvell db64360 eval board by
|
||||
* Ingo Assmus <ingo.assmus@keymile.com>
|
||||
*/
|
||||
|
||||
/*************** DEFINES for Intel StrataFlash FLASH chip ********************/
|
||||
|
||||
/*
|
||||
* acceptable chips types are:
|
||||
*
|
||||
* 28F320J5, 28F640J5, 28F320J3A, 28F640J3A and 28F128J3A
|
||||
*/
|
||||
|
||||
/* register addresses, valid only following an CHIP_CMD_RD_ID command */
|
||||
#define CHIP_ADDR_REG_MAN 0x000000 /* manufacturer's id */
|
||||
#define CHIP_ADDR_REG_DEV 0x000001 /* device id */
|
||||
#define CHIP_ADDR_REG_CFGM 0x000003 /* master lock config */
|
||||
#define CHIP_ADDR_REG_CFG(b) (((b)<<16)|2) /* lock config for block b */
|
||||
|
||||
/* Commands */
|
||||
#define CHIP_CMD_RST 0xFF /* reset flash */
|
||||
#define CHIP_CMD_RD_ID 0x90 /* read the id and lock bits */
|
||||
#define CHIP_CMD_RD_QUERY 0x98 /* read device capabilities */
|
||||
#define CHIP_CMD_RD_STAT 0x70 /* read the status register */
|
||||
#define CHIP_CMD_CLR_STAT 0x50 /* clear the staus register */
|
||||
#define CHIP_CMD_WR_BUF 0xE8 /* clear the staus register */
|
||||
#define CHIP_CMD_PROG 0x40 /* program word command */
|
||||
#define CHIP_CMD_ERASE1 0x20 /* 1st word for block erase */
|
||||
#define CHIP_CMD_ERASE2 0xD0 /* 2nd word for block erase */
|
||||
#define CHIP_CMD_ERASE_SUSP 0xB0 /* suspend block erase */
|
||||
#define CHIP_CMD_LOCK 0x60 /* 1st word for all lock cmds */
|
||||
#define CHIP_CMD_SET_LOCK_BLK 0x01 /* 2nd wrd set block lock bit */
|
||||
#define CHIP_CMD_SET_LOCK_MSTR 0xF1 /* 2nd wrd set master lck bit */
|
||||
#define CHIP_CMD_CLR_LOCK_BLK 0xD0 /* 2nd wrd clear blk lck bit */
|
||||
|
||||
/* status register bits */
|
||||
#define CHIP_STAT_DPS 0x02 /* Device Protect Status */
|
||||
#define CHIP_STAT_VPPS 0x08 /* VPP Status */
|
||||
#define CHIP_STAT_PSLBS 0x10 /* Program+Set Lock Bit Stat */
|
||||
#define CHIP_STAT_ECLBS 0x20 /* Erase+Clr Lock Bit Stat */
|
||||
#define CHIP_STAT_ESS 0x40 /* Erase Suspend Status */
|
||||
#define CHIP_STAT_RDY 0x80 /* WSM Mach Status, 1=rdy */
|
||||
|
||||
#define CHIP_STAT_ERR (CHIP_STAT_VPPS | CHIP_STAT_DPS | \
|
||||
CHIP_STAT_ECLBS | CHIP_STAT_PSLBS)
|
||||
|
||||
/* ID and Lock Configuration */
|
||||
#define CHIP_RD_ID_LOCK 0x01 /* Bit 0 of each byte */
|
||||
#define CHIP_RD_ID_MAN 0x89 /* Manufacturer code = 0x89 */
|
||||
#define CHIP_RD_ID_DEV CFG_FLASH_ID
|
||||
|
||||
/* dimensions */
|
||||
#define CHIP_WIDTH 2 /* chips are in 16 bit mode */
|
||||
#define CHIP_WSHIFT 1 /* (log2 of CHIP_WIDTH) */
|
||||
#define CHIP_NBLOCKS 128
|
||||
#define CHIP_BLKSZ (128 * 1024) /* of 128Kbytes each */
|
||||
#define CHIP_SIZE (CHIP_BLKSZ * CHIP_NBLOCKS)
|
||||
|
||||
/********************** DEFINES for Hymod Flash ******************************/
|
||||
|
||||
/*
|
||||
* The hymod board has 2 x 28F320J5 chips running in
|
||||
* 16 bit mode, for a 32 bit wide bank.
|
||||
*/
|
||||
|
||||
typedef unsigned short bank_word_t; /* 8/16/32/64bit unsigned int */
|
||||
typedef volatile bank_word_t *bank_addr_t;
|
||||
typedef unsigned long bank_size_t; /* want this big - >= 32 bit */
|
||||
|
||||
#define BANK_CHIP_WIDTH 1 /* each bank is 1 chip wide */
|
||||
#define BANK_CHIP_WSHIFT 0 /* (log2 of BANK_CHIP_WIDTH) */
|
||||
|
||||
#define BANK_WIDTH (CHIP_WIDTH * BANK_CHIP_WIDTH)
|
||||
#define BANK_WSHIFT (CHIP_WSHIFT + BANK_CHIP_WSHIFT)
|
||||
#define BANK_NBLOCKS CHIP_NBLOCKS
|
||||
#define BANK_BLKSZ (CHIP_BLKSZ * BANK_CHIP_WIDTH)
|
||||
#define BANK_SIZE (CHIP_SIZE * BANK_CHIP_WIDTH)
|
||||
|
||||
#define MAX_BANKS 1 /* only one bank possible */
|
||||
|
||||
/* align bank addresses and sizes to bank word boundaries */
|
||||
#define BANK_ADDR_WORD_ALIGN(a) ((bank_addr_t)((bank_size_t)(a) \
|
||||
& ~(BANK_WIDTH - 1)))
|
||||
#define BANK_SIZE_WORD_ALIGN(s) ((bank_size_t)BANK_ADDR_WORD_ALIGN( \
|
||||
(bank_size_t)(s) + (BANK_WIDTH - 1)))
|
||||
|
||||
/* align bank addresses and sizes to bank block boundaries */
|
||||
#define BANK_ADDR_BLK_ALIGN(a) ((bank_addr_t)((bank_size_t)(a) \
|
||||
& ~(BANK_BLKSZ - 1)))
|
||||
#define BANK_SIZE_BLK_ALIGN(s) ((bank_size_t)BANK_ADDR_BLK_ALIGN( \
|
||||
(bank_size_t)(s) + (BANK_BLKSZ - 1)))
|
||||
|
||||
/* align bank addresses and sizes to bank boundaries */
|
||||
#define BANK_ADDR_BANK_ALIGN(a) ((bank_addr_t)((bank_size_t)(a) \
|
||||
& ~(BANK_SIZE - 1)))
|
||||
#define BANK_SIZE_BANK_ALIGN(s) ((bank_size_t)BANK_ADDR_BANK_ALIGN( \
|
||||
(bank_size_t)(s) + (BANK_SIZE - 1)))
|
||||
|
||||
/* add an offset to a bank address */
|
||||
#define BANK_ADDR_OFFSET(a, o) (bank_addr_t)((bank_size_t)(a) + \
|
||||
(bank_size_t)(o))
|
||||
|
||||
/* get base address of bank b, given flash base address a */
|
||||
#define BANK_ADDR_BASE(a, b) BANK_ADDR_OFFSET(BANK_ADDR_BANK_ALIGN(a), \
|
||||
(bank_size_t)(b) * BANK_SIZE)
|
||||
|
||||
/* adjust a bank address to start of next word, block or bank */
|
||||
#define BANK_ADDR_NEXT_WORD(a) BANK_ADDR_OFFSET(BANK_ADDR_WORD_ALIGN(a), \
|
||||
BANK_WIDTH)
|
||||
#define BANK_ADDR_NEXT_BLK(a) BANK_ADDR_OFFSET(BANK_ADDR_BLK_ALIGN(a), \
|
||||
BANK_BLKSZ)
|
||||
#define BANK_ADDR_NEXT_BANK(a) BANK_ADDR_OFFSET(BANK_ADDR_BANK_ALIGN(a), \
|
||||
BANK_SIZE)
|
||||
|
||||
/* get bank address of chip register r given a bank base address a */
|
||||
#define BANK_ADDR_REG(a, r) BANK_ADDR_OFFSET(BANK_ADDR_BANK_ALIGN(a), \
|
||||
((bank_size_t)(r) << BANK_WSHIFT))
|
||||
|
||||
/* make a bank address for each chip register address */
|
||||
|
||||
#define BANK_ADDR_REG_MAN(a) BANK_ADDR_REG((a), CHIP_ADDR_REG_MAN)
|
||||
#define BANK_ADDR_REG_DEV(a) BANK_ADDR_REG((a), CHIP_ADDR_REG_DEV)
|
||||
#define BANK_ADDR_REG_CFGM(a) BANK_ADDR_REG((a), CHIP_ADDR_REG_CFGM)
|
||||
#define BANK_ADDR_REG_CFG(b,a) BANK_ADDR_REG((a), CHIP_ADDR_REG_CFG(b))
|
||||
|
||||
/*
|
||||
* replicate a chip cmd/stat/rd value into each byte position within a word
|
||||
* so that multiple chips are accessed in a single word i/o operation
|
||||
*
|
||||
* this must be as wide as the bank_word_t type, and take into account the
|
||||
* chip width and bank layout
|
||||
*/
|
||||
|
||||
#define BANK_FILL_WORD(o) ((bank_word_t)(o))
|
||||
|
||||
/* make a bank word value for each chip cmd/stat/rd value */
|
||||
|
||||
/* Commands */
|
||||
#define BANK_CMD_RST BANK_FILL_WORD(CHIP_CMD_RST)
|
||||
#define BANK_CMD_RD_ID BANK_FILL_WORD(CHIP_CMD_RD_ID)
|
||||
#define BANK_CMD_RD_STAT BANK_FILL_WORD(CHIP_CMD_RD_STAT)
|
||||
#define BANK_CMD_CLR_STAT BANK_FILL_WORD(CHIP_CMD_CLR_STAT)
|
||||
#define BANK_CMD_ERASE1 BANK_FILL_WORD(CHIP_CMD_ERASE1)
|
||||
#define BANK_CMD_ERASE2 BANK_FILL_WORD(CHIP_CMD_ERASE2)
|
||||
#define BANK_CMD_PROG BANK_FILL_WORD(CHIP_CMD_PROG)
|
||||
#define BANK_CMD_LOCK BANK_FILL_WORD(CHIP_CMD_LOCK)
|
||||
#define BANK_CMD_SET_LOCK_BLK BANK_FILL_WORD(CHIP_CMD_SET_LOCK_BLK)
|
||||
#define BANK_CMD_SET_LOCK_MSTR BANK_FILL_WORD(CHIP_CMD_SET_LOCK_MSTR)
|
||||
#define BANK_CMD_CLR_LOCK_BLK BANK_FILL_WORD(CHIP_CMD_CLR_LOCK_BLK)
|
||||
|
||||
/* status register bits */
|
||||
#define BANK_STAT_DPS BANK_FILL_WORD(CHIP_STAT_DPS)
|
||||
#define BANK_STAT_PSS BANK_FILL_WORD(CHIP_STAT_PSS)
|
||||
#define BANK_STAT_VPPS BANK_FILL_WORD(CHIP_STAT_VPPS)
|
||||
#define BANK_STAT_PSLBS BANK_FILL_WORD(CHIP_STAT_PSLBS)
|
||||
#define BANK_STAT_ECLBS BANK_FILL_WORD(CHIP_STAT_ECLBS)
|
||||
#define BANK_STAT_ESS BANK_FILL_WORD(CHIP_STAT_ESS)
|
||||
#define BANK_STAT_RDY BANK_FILL_WORD(CHIP_STAT_RDY)
|
||||
|
||||
#define BANK_STAT_ERR BANK_FILL_WORD(CHIP_STAT_ERR)
|
||||
|
||||
/* ID and Lock Configuration */
|
||||
#define BANK_RD_ID_LOCK BANK_FILL_WORD(CHIP_RD_ID_LOCK)
|
||||
#define BANK_RD_ID_MAN BANK_FILL_WORD(CHIP_RD_ID_MAN)
|
||||
#define BANK_RD_ID_DEV BANK_FILL_WORD(CHIP_RD_ID_DEV)
|
||||
1390
board/Marvell/common/memory.c
Normal file
1390
board/Marvell/common/memory.c
Normal file
File diff suppressed because it is too large
Load Diff
235
board/Marvell/common/misc.S
Normal file
235
board/Marvell/common/misc.S
Normal file
@@ -0,0 +1,235 @@
|
||||
#include <config.h>
|
||||
#include <74xx_7xx.h>
|
||||
#include "version.h"
|
||||
|
||||
#include <ppc_asm.tmpl>
|
||||
#include <ppc_defs.h>
|
||||
|
||||
#include <asm/cache.h>
|
||||
#include <asm/mmu.h>
|
||||
|
||||
#include "../include/mv_gen_reg.h"
|
||||
|
||||
#ifdef CONFIG_ECC
|
||||
/* Galileo specific asm code for initializing ECC */
|
||||
.globl board_relocate_rom
|
||||
board_relocate_rom:
|
||||
mflr r7
|
||||
/* update the location of the GT registers */
|
||||
lis r11, CFG_GT_REGS@h
|
||||
/* if we're using ECC, we must use the DMA engine to copy ourselves */
|
||||
bl start_idma_transfer_0
|
||||
bl wait_for_idma_0
|
||||
bl stop_idma_engine_0
|
||||
|
||||
mtlr r7
|
||||
blr
|
||||
|
||||
.globl board_init_ecc
|
||||
board_init_ecc:
|
||||
mflr r7
|
||||
/* NOTE: r10 still contains the location we've been relocated to
|
||||
* which happens to be TOP_OF_RAM - CFG_MONITOR_LEN */
|
||||
|
||||
/* now that we're running from ram, init the rest of main memory
|
||||
* for ECC use */
|
||||
lis r8, CFG_MONITOR_LEN@h
|
||||
ori r8, r8, CFG_MONITOR_LEN@l
|
||||
|
||||
divw r3, r10, r8
|
||||
|
||||
/* set up the counter, and init the starting address */
|
||||
mtctr r3
|
||||
li r12, 0
|
||||
|
||||
/* bytes per transfer */
|
||||
mr r5, r8
|
||||
about_to_init_ecc:
|
||||
1: mr r3, r12
|
||||
mr r4, r12
|
||||
bl start_idma_transfer_0
|
||||
bl wait_for_idma_0
|
||||
bl stop_idma_engine_0
|
||||
add r12, r12, r8
|
||||
bdnz 1b
|
||||
|
||||
mtlr r7
|
||||
blr
|
||||
|
||||
/* r3: dest addr
|
||||
* r4: source addr
|
||||
* r5: byte count
|
||||
* r11: gt regbase
|
||||
* trashes: r6, r5
|
||||
*/
|
||||
start_idma_transfer_0:
|
||||
/* set the byte count, including the OWN bit */
|
||||
mr r6, r11
|
||||
ori r6, r6, CHANNEL0_DMA_BYTE_COUNT
|
||||
stwbrx r5, 0, (r6)
|
||||
|
||||
/* set the source address */
|
||||
mr r6, r11
|
||||
ori r6, r6, CHANNEL0_DMA_SOURCE_ADDRESS
|
||||
stwbrx r4, 0, (r6)
|
||||
|
||||
/* set the dest address */
|
||||
mr r6, r11
|
||||
ori r6, r6, CHANNEL0_DMA_DESTINATION_ADDRESS
|
||||
stwbrx r3, 0, (r6)
|
||||
|
||||
/* set the next record pointer */
|
||||
li r5, 0
|
||||
mr r6, r11
|
||||
ori r6, r6, CHANNEL0NEXT_RECORD_POINTER
|
||||
stwbrx r5, 0, (r6)
|
||||
|
||||
/* set the low control register */
|
||||
/* bit 9 is NON chained mode, bit 31 is new style descriptors.
|
||||
bit 12 is channel enable */
|
||||
ori r5, r5, (1 << 12) | (1 << 12) | (1 << 11)
|
||||
/* 15 shifted by 16 (oris) == bit 31 */
|
||||
oris r5, r5, (1 << 15)
|
||||
mr r6, r11
|
||||
ori r6, r6, CHANNEL0CONTROL
|
||||
stwbrx r5, 0, (r6)
|
||||
|
||||
blr
|
||||
|
||||
/* this waits for the bytecount to return to zero, indicating
|
||||
* that the trasfer is complete */
|
||||
wait_for_idma_0:
|
||||
mr r5, r11
|
||||
lis r6, 0xff
|
||||
ori r6, r6, 0xffff
|
||||
ori r5, r5, CHANNEL0_DMA_BYTE_COUNT
|
||||
1: lwbrx r4, 0, (r5)
|
||||
and. r4, r4, r6
|
||||
bne 1b
|
||||
|
||||
blr
|
||||
|
||||
/* this turns off channel 0 of the idma engine */
|
||||
stop_idma_engine_0:
|
||||
/* shut off the DMA engine */
|
||||
li r5, 0
|
||||
mr r6, r11
|
||||
ori r6, r6, CHANNEL0CONTROL
|
||||
stwbrx r5, 0, (r6)
|
||||
|
||||
blr
|
||||
#endif
|
||||
|
||||
#ifdef CFG_BOARD_ASM_INIT
|
||||
/* NOTE: trashes r3-r7 */
|
||||
.globl board_asm_init
|
||||
board_asm_init:
|
||||
/* just move the GT registers to where they belong */
|
||||
lis r3, CFG_DFL_GT_REGS@h
|
||||
ori r3, r3, CFG_DFL_GT_REGS@l
|
||||
lis r4, CFG_GT_REGS@h
|
||||
ori r4, r4, CFG_GT_REGS@l
|
||||
li r5, INTERNAL_SPACE_DECODE
|
||||
|
||||
/* test to see if we've already moved */
|
||||
lwbrx r6, r5, r4
|
||||
andi. r6, r6, 0xffff
|
||||
/* check loading of R7 is: 0x0F80 should: 0xf800: DONE */
|
||||
/* rlwinm r7, r4, 8, 16, 31
|
||||
rlwinm r7, r4, 12, 16, 31 */ /* original */
|
||||
rlwinm r7, r4, 16, 16, 31
|
||||
/* -----------------------------------------------------*/
|
||||
cmp cr0, r7, r6
|
||||
beqlr
|
||||
|
||||
/* nope, have to move the registers */
|
||||
lwbrx r6, r5, r3
|
||||
andis. r6, r6, 0xffff
|
||||
or r6, r6, r7
|
||||
stwbrx r6, r5, r3
|
||||
|
||||
/* now, poll for the change */
|
||||
1: lwbrx r7, r5, r4
|
||||
cmp cr0, r7, r6
|
||||
bne 1b
|
||||
|
||||
/* done! */
|
||||
blr
|
||||
#endif
|
||||
|
||||
/* For use of the debug LEDs */
|
||||
.global led_on0_relocated
|
||||
led_on0_relocated:
|
||||
xor r21, r21, r21
|
||||
xor r18, r18, r18
|
||||
lis r18, 0xFC80
|
||||
ori r18, r18, 0x8000
|
||||
stw r21, 0x0(r18)
|
||||
/* stw r18, 0x0(r18) */
|
||||
sync
|
||||
blr
|
||||
|
||||
.global led_off0_relocated
|
||||
led_off0_relocated:
|
||||
xor r21, r21, r21
|
||||
xor r18, r18, r18
|
||||
lis r18, 0xFC81
|
||||
ori r18, r18, 0x4000
|
||||
stw r21, 0x0(r18)
|
||||
/* stw r18, 0x0(r18) */
|
||||
sync
|
||||
blr
|
||||
|
||||
.global led_on0
|
||||
led_on0:
|
||||
xor r18, r18, r18
|
||||
lis r18, 0x1c80
|
||||
ori r18, r18, 0x8000
|
||||
stw r18, 0x0(r18)
|
||||
sync
|
||||
blr
|
||||
|
||||
.global led_off0
|
||||
led_off0:
|
||||
xor r18, r18, r18
|
||||
lis r18, 0x1c81
|
||||
ori r18, r18, 0x4000
|
||||
stw r18, 0x0(r18)
|
||||
sync
|
||||
blr
|
||||
|
||||
.global led_on1
|
||||
led_on1:
|
||||
xor r18, r18, r18
|
||||
lis r18, 0x1c80
|
||||
ori r18, r18, 0xc000
|
||||
stw r18, 0x0(r18)
|
||||
sync
|
||||
blr
|
||||
|
||||
.global led_off1
|
||||
led_off1:
|
||||
xor r18, r18, r18
|
||||
lis r18, 0x1c81
|
||||
ori r18, r18, 0x8000
|
||||
stw r18, 0x0(r18)
|
||||
sync
|
||||
blr
|
||||
|
||||
.global led_on2
|
||||
led_on2:
|
||||
xor r18, r18, r18
|
||||
lis r18, 0x1c81
|
||||
ori r18, r18, 0x0000
|
||||
stw r18, 0x0(r18)
|
||||
sync
|
||||
blr
|
||||
|
||||
.global led_off2
|
||||
led_off2:
|
||||
xor r18, r18, r18
|
||||
lis r18, 0x1c81
|
||||
ori r18, r18, 0xc000
|
||||
stw r18, 0x0(r18)
|
||||
sync
|
||||
blr
|
||||
66
board/Marvell/common/ns16550.c
Normal file
66
board/Marvell/common/ns16550.c
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* COM1 NS16550 support
|
||||
* originally from linux source (arch/ppc/boot/ns16550.c)
|
||||
* modified to use CFG_ISA_MEM and new defines
|
||||
*
|
||||
* further modified by Josh Huber <huber@mclx.com> to support
|
||||
* the DUART on the Galileo Eval board. (db64360)
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include "ns16550.h"
|
||||
|
||||
#ifdef ZUMA_NTL
|
||||
/* no 16550 device */
|
||||
#else
|
||||
const NS16550_t COM_PORTS[] = { (NS16550_t) (CFG_DUART_IO + 0),
|
||||
(NS16550_t) (CFG_DUART_IO + 0x20)
|
||||
};
|
||||
|
||||
volatile struct NS16550 *NS16550_init (int chan, int baud_divisor)
|
||||
{
|
||||
volatile struct NS16550 *com_port;
|
||||
|
||||
com_port = (struct NS16550 *) COM_PORTS[chan];
|
||||
com_port->ier = 0x00;
|
||||
com_port->lcr = LCR_BKSE; /* Access baud rate */
|
||||
com_port->dll = baud_divisor & 0xff; /* 9600 baud */
|
||||
com_port->dlm = (baud_divisor >> 8) & 0xff;
|
||||
com_port->lcr = LCR_8N1; /* 8 data, 1 stop, no parity */
|
||||
com_port->mcr = MCR_DTR | MCR_RTS; /* RTS/DTR */
|
||||
|
||||
/* Clear & enable FIFOs */
|
||||
com_port->fcr = FCR_FIFO_EN | FCR_RXSR | FCR_TXSR;
|
||||
return (com_port);
|
||||
}
|
||||
|
||||
void NS16550_reinit (volatile struct NS16550 *com_port, int baud_divisor)
|
||||
{
|
||||
com_port->ier = 0x00;
|
||||
com_port->lcr = LCR_BKSE; /* Access baud rate */
|
||||
com_port->dll = baud_divisor & 0xff; /* 9600 baud */
|
||||
com_port->dlm = (baud_divisor >> 8) & 0xff;
|
||||
com_port->lcr = LCR_8N1; /* 8 data, 1 stop, no parity */
|
||||
com_port->mcr = MCR_DTR | MCR_RTS; /* RTS/DTR */
|
||||
|
||||
/* Clear & enable FIFOs */
|
||||
com_port->fcr = FCR_FIFO_EN | FCR_RXSR | FCR_TXSR;
|
||||
}
|
||||
|
||||
void NS16550_putc (volatile struct NS16550 *com_port, unsigned char c)
|
||||
{
|
||||
while ((com_port->lsr & LSR_THRE) == 0);
|
||||
com_port->thr = c;
|
||||
}
|
||||
|
||||
unsigned char NS16550_getc (volatile struct NS16550 *com_port)
|
||||
{
|
||||
while ((com_port->lsr & LSR_DR) == 0);
|
||||
return (com_port->rbr);
|
||||
}
|
||||
|
||||
int NS16550_tstc (volatile struct NS16550 *com_port)
|
||||
{
|
||||
return ((com_port->lsr & LSR_DR) != 0);
|
||||
}
|
||||
#endif
|
||||
102
board/Marvell/common/ns16550.h
Normal file
102
board/Marvell/common/ns16550.h
Normal file
@@ -0,0 +1,102 @@
|
||||
/*
|
||||
* NS16550 Serial Port
|
||||
* originally from linux source (arch/ppc/boot/ns16550.h)
|
||||
* modified slightly to
|
||||
* have addresses as offsets from CFG_ISA_BASE
|
||||
* added a few more definitions
|
||||
* added prototypes for ns16550.c
|
||||
* reduced no of com ports to 2
|
||||
* modifications (c) Rob Taylor, Flying Pig Systems. 2000.
|
||||
*
|
||||
* further modified to support the DUART in the Galileo eval board
|
||||
* modifications (c) Josh Huber <huber@mclx.com>, Mission Critical Linux, Inc.
|
||||
*/
|
||||
|
||||
#ifndef __NS16550_H__
|
||||
#define __NS16550_H__
|
||||
|
||||
/* the padding is necessary because on the galileo board the UART is
|
||||
wired in with the 3 address lines shifted over by 2 bits */
|
||||
struct NS16550
|
||||
{
|
||||
unsigned char rbr; /* 0 = 0-3*/
|
||||
int pad1:24;
|
||||
|
||||
unsigned char ier; /* 1 = 4-7*/
|
||||
int pad2:24;
|
||||
|
||||
unsigned char fcr; /* 2 = 8-b*/
|
||||
int pad3:24;
|
||||
|
||||
unsigned char lcr; /* 3 = c-f*/
|
||||
int pad4:24;
|
||||
|
||||
unsigned char mcr; /* 4 = 10-13*/
|
||||
int pad5:24;
|
||||
|
||||
unsigned char lsr; /* 5 = 14-17*/
|
||||
int pad6:24;
|
||||
|
||||
unsigned char msr; /* 6 =18-1b*/
|
||||
int pad7:24;
|
||||
|
||||
unsigned char scr; /* 7 =1c-1f*/
|
||||
int pad8:24;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* aliases */
|
||||
#define thr rbr
|
||||
#define iir fcr
|
||||
#define dll rbr
|
||||
#define dlm ier
|
||||
|
||||
#define FCR_FIFO_EN 0x01 /*fifo enable*/
|
||||
#define FCR_RXSR 0x02 /*reciever soft reset*/
|
||||
#define FCR_TXSR 0x04 /*transmitter soft reset*/
|
||||
|
||||
|
||||
#define MCR_DTR 0x01
|
||||
#define MCR_RTS 0x02
|
||||
#define MCR_DMA_EN 0x04
|
||||
#define MCR_TX_DFR 0x08
|
||||
|
||||
|
||||
#define LCR_WLS_MSK 0x03 /* character length slect mask*/
|
||||
#define LCR_WLS_5 0x00 /* 5 bit character length */
|
||||
#define LCR_WLS_6 0x01 /* 6 bit character length */
|
||||
#define LCR_WLS_7 0x02 /* 7 bit character length */
|
||||
#define LCR_WLS_8 0x03 /* 8 bit character length */
|
||||
#define LCR_STB 0x04 /* Number of stop Bits, off = 1, on = 1.5 or 2) */
|
||||
#define LCR_PEN 0x08 /* Parity eneble*/
|
||||
#define LCR_EPS 0x10 /* Even Parity Select*/
|
||||
#define LCR_STKP 0x20 /* Stick Parity*/
|
||||
#define LCR_SBRK 0x40 /* Set Break*/
|
||||
#define LCR_BKSE 0x80 /* Bank select enable*/
|
||||
|
||||
#define LSR_DR 0x01 /* Data ready */
|
||||
#define LSR_OE 0x02 /* Overrun */
|
||||
#define LSR_PE 0x04 /* Parity error */
|
||||
#define LSR_FE 0x08 /* Framing error */
|
||||
#define LSR_BI 0x10 /* Break */
|
||||
#define LSR_THRE 0x20 /* Xmit holding register empty */
|
||||
#define LSR_TEMT 0x40 /* Xmitter empty */
|
||||
#define LSR_ERR 0x80 /* Error */
|
||||
|
||||
/* useful defaults for LCR*/
|
||||
#define LCR_8N1 0x03
|
||||
|
||||
|
||||
#define COM1 0x03F8
|
||||
#define COM2 0x02F8
|
||||
|
||||
volatile struct NS16550 * NS16550_init(int chan, int baud_divisor);
|
||||
void NS16550_putc(volatile struct NS16550 *com_port, unsigned char c);
|
||||
unsigned char NS16550_getc(volatile struct NS16550 *com_port);
|
||||
int NS16550_tstc(volatile struct NS16550 *com_port);
|
||||
void NS16550_reinit(volatile struct NS16550 *com_port, int baud_divisor);
|
||||
|
||||
typedef struct NS16550 *NS16550_t;
|
||||
|
||||
extern const NS16550_t COM_PORTS[];
|
||||
|
||||
#endif
|
||||
164
board/Marvell/common/ppc_error_no.h
Normal file
164
board/Marvell/common/ppc_error_no.h
Normal file
@@ -0,0 +1,164 @@
|
||||
/*
|
||||
* (C) Copyright 2003
|
||||
* Ingo Assmus <ingo.assmus@keymile.com>
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/*
|
||||
* BK Id: SCCS/s.errno.h 1.9 06/05/01 21:45:21 paulus
|
||||
*/
|
||||
#ifndef _MV_PPC_ERRNO_H
|
||||
#define _MV_PPC_ERRNO_H
|
||||
|
||||
#define EPERM 1 /* Operation not permitted */
|
||||
#define ENOENT 2 /* No such file or directory */
|
||||
#define ESRCH 3 /* No such process */
|
||||
#define EINTR 4 /* Interrupted system call */
|
||||
#define EIO 5 /* I/O error */
|
||||
#define ENXIO 6 /* No such device or address */
|
||||
#define E2BIG 7 /* Arg list too long */
|
||||
#define ENOEXEC 8 /* Exec format error */
|
||||
#define EBADF 9 /* Bad file number */
|
||||
#define ECHILD 10 /* No child processes */
|
||||
#define EAGAIN 11 /* Try again */
|
||||
#define ENOMEM 12 /* Out of memory */
|
||||
#define EACCES 13 /* Permission denied */
|
||||
#define EFAULT 14 /* Bad address */
|
||||
#define ENOTBLK 15 /* Block device required */
|
||||
#define EBUSY 16 /* Device or resource busy */
|
||||
#define EEXIST 17 /* File exists */
|
||||
#define EXDEV 18 /* Cross-device link */
|
||||
#define ENODEV 19 /* No such device */
|
||||
#define ENOTDIR 20 /* Not a directory */
|
||||
#define EISDIR 21 /* Is a directory */
|
||||
#define EINVAL 22 /* Invalid argument */
|
||||
#define ENFILE 23 /* File table overflow */
|
||||
#define EMFILE 24 /* Too many open files */
|
||||
#define ENOTTY 25 /* Not a typewriter */
|
||||
#define ETXTBSY 26 /* Text file busy */
|
||||
#define EFBIG 27 /* File too large */
|
||||
#define ENOSPC 28 /* No space left on device */
|
||||
#define ESPIPE 29 /* Illegal seek */
|
||||
#define EROFS 30 /* Read-only file system */
|
||||
#define EMLINK 31 /* Too many links */
|
||||
#define EPIPE 32 /* Broken pipe */
|
||||
#define EDOM 33 /* Math argument out of domain of func */
|
||||
#define ERANGE 34 /* Math result not representable */
|
||||
#define EDEADLK 35 /* Resource deadlock would occur */
|
||||
#define ENAMETOOLONG 36 /* File name too long */
|
||||
#define ENOLCK 37 /* No record locks available */
|
||||
#define ENOSYS 38 /* Function not implemented */
|
||||
#define ENOTEMPTY 39 /* Directory not empty */
|
||||
#define ELOOP 40 /* Too many symbolic links encountered */
|
||||
#define EWOULDBLOCK EAGAIN /* Operation would block */
|
||||
#define ENOMSG 42 /* No message of desired type */
|
||||
#define EIDRM 43 /* Identifier removed */
|
||||
#define ECHRNG 44 /* Channel number out of range */
|
||||
#define EL2NSYNC 45 /* Level 2 not synchronized */
|
||||
#define EL3HLT 46 /* Level 3 halted */
|
||||
#define EL3RST 47 /* Level 3 reset */
|
||||
#define ELNRNG 48 /* Link number out of range */
|
||||
#define EUNATCH 49 /* Protocol driver not attached */
|
||||
#define ENOCSI 50 /* No CSI structure available */
|
||||
#define EL2HLT 51 /* Level 2 halted */
|
||||
#define EBADE 52 /* Invalid exchange */
|
||||
#define EBADR 53 /* Invalid request descriptor */
|
||||
#define EXFULL 54 /* Exchange full */
|
||||
#define ENOANO 55 /* No anode */
|
||||
#define EBADRQC 56 /* Invalid request code */
|
||||
#define EBADSLT 57 /* Invalid slot */
|
||||
#define EDEADLOCK 58 /* File locking deadlock error */
|
||||
#define EBFONT 59 /* Bad font file format */
|
||||
#define ENOSTR 60 /* Device not a stream */
|
||||
#define ENODATA 61 /* No data available */
|
||||
#define ETIME 62 /* Timer expired */
|
||||
#define ENOSR 63 /* Out of streams resources */
|
||||
#define ENONET 64 /* Machine is not on the network */
|
||||
#define ENOPKG 65 /* Package not installed */
|
||||
#define EREMOTE 66 /* Object is remote */
|
||||
#define ENOLINK 67 /* Link has been severed */
|
||||
#define EADV 68 /* Advertise error */
|
||||
#define ESRMNT 69 /* Srmount error */
|
||||
#define ECOMM 70 /* Communication error on send */
|
||||
#define EPROTO 71 /* Protocol error */
|
||||
#define EMULTIHOP 72 /* Multihop attempted */
|
||||
#define EDOTDOT 73 /* RFS specific error */
|
||||
#define EBADMSG 74 /* Not a data message */
|
||||
#define EOVERFLOW 75 /* Value too large for defined data type */
|
||||
#define ENOTUNIQ 76 /* Name not unique on network */
|
||||
#define EBADFD 77 /* File descriptor in bad state */
|
||||
#define EREMCHG 78 /* Remote address changed */
|
||||
#define ELIBACC 79 /* Can not access a needed shared library */
|
||||
#define ELIBBAD 80 /* Accessing a corrupted shared library */
|
||||
#define ELIBSCN 81 /* .lib section in a.out corrupted */
|
||||
#define ELIBMAX 82 /* Attempting to link in too many shared libraries */
|
||||
#define ELIBEXEC 83 /* Cannot exec a shared library directly */
|
||||
#define EILSEQ 84 /* Illegal byte sequence */
|
||||
#define ERESTART 85 /* Interrupted system call should be restarted */
|
||||
#define ESTRPIPE 86 /* Streams pipe error */
|
||||
#define EUSERS 87 /* Too many users */
|
||||
#define ENOTSOCK 88 /* Socket operation on non-socket */
|
||||
#define EDESTADDRREQ 89 /* Destination address required */
|
||||
#define EMSGSIZE 90 /* Message too long */
|
||||
#define EPROTOTYPE 91 /* Protocol wrong type for socket */
|
||||
#define ENOPROTOOPT 92 /* Protocol not available */
|
||||
#define EPROTONOSUPPORT 93 /* Protocol not supported */
|
||||
#define ESOCKTNOSUPPORT 94 /* Socket type not supported */
|
||||
#define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */
|
||||
#define EPFNOSUPPORT 96 /* Protocol family not supported */
|
||||
#define EAFNOSUPPORT 97 /* Address family not supported by protocol */
|
||||
#define EADDRINUSE 98 /* Address already in use */
|
||||
#define EADDRNOTAVAIL 99 /* Cannot assign requested address */
|
||||
#define ENETDOWN 100 /* Network is down */
|
||||
#define ENETUNREACH 101 /* Network is unreachable */
|
||||
#define ENETRESET 102 /* Network dropped connection because of reset */
|
||||
#define ECONNABORTED 103 /* Software caused connection abort */
|
||||
#define ECONNRESET 104 /* Connection reset by peer */
|
||||
#define ENOBUFS 105 /* No buffer space available */
|
||||
#define EISCONN 106 /* Transport endpoint is already connected */
|
||||
#define ENOTCONN 107 /* Transport endpoint is not connected */
|
||||
#define ESHUTDOWN 108 /* Cannot send after transport endpoint shutdown */
|
||||
#define ETOOMANYREFS 109 /* Too many references: cannot splice */
|
||||
#define ETIMEDOUT 110 /* Connection timed out */
|
||||
#define ECONNREFUSED 111 /* Connection refused */
|
||||
#define EHOSTDOWN 112 /* Host is down */
|
||||
#define EHOSTUNREACH 113 /* No route to host */
|
||||
#define EALREADY 114 /* Operation already in progress */
|
||||
#define EINPROGRESS 115 /* Operation now in progress */
|
||||
#define ESTALE 116 /* Stale NFS file handle */
|
||||
#define EUCLEAN 117 /* Structure needs cleaning */
|
||||
#define ENOTNAM 118 /* Not a XENIX named type file */
|
||||
#define ENAVAIL 119 /* No XENIX semaphores available */
|
||||
#define EISNAM 120 /* Is a named type file */
|
||||
#define EREMOTEIO 121 /* Remote I/O error */
|
||||
#define EDQUOT 122 /* Quota exceeded */
|
||||
|
||||
#define ENOMEDIUM 123 /* No medium found */
|
||||
#define EMEDIUMTYPE 124 /* Wrong medium type */
|
||||
|
||||
/* Should never be seen by user programs */
|
||||
#define ERESTARTSYS 512
|
||||
#define ERESTARTNOINTR 513
|
||||
#define ERESTARTNOHAND 514 /* restart if no handler.. */
|
||||
#define ENOIOCTLCMD 515 /* No ioctl command */
|
||||
|
||||
#define _LAST_ERRNO 515
|
||||
|
||||
#endif
|
||||
172
board/Marvell/common/serial.c
Normal file
172
board/Marvell/common/serial.c
Normal file
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* (C) Copyright 2001
|
||||
* Josh Huber <huber@mclx.com>, Mission Critical Linux, Inc.
|
||||
*
|
||||
* modified for marvell db64360 eval board by
|
||||
* Ingo Assmus <ingo.assmus@keymile.com>
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/*
|
||||
* serial.c - serial support for the gal ev board
|
||||
*/
|
||||
|
||||
/* supports both the 16650 duart and the MPSC */
|
||||
|
||||
#include <common.h>
|
||||
#include <command.h>
|
||||
#include "../include/memory.h"
|
||||
#include "serial.h"
|
||||
|
||||
#ifdef CONFIG_DB64360
|
||||
#include "../db64360/mpsc.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DB64460
|
||||
#include "../db64460/mpsc.h"
|
||||
#endif
|
||||
|
||||
#include "ns16550.h"
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
#ifdef CONFIG_MPSC
|
||||
|
||||
|
||||
int serial_init (void)
|
||||
{
|
||||
#if (defined CFG_INIT_CHAN1) || (defined CFG_INIT_CHAN2)
|
||||
int clock_divisor = 230400 / gd->baudrate;
|
||||
#endif
|
||||
|
||||
mpsc_init (gd->baudrate);
|
||||
|
||||
/* init the DUART chans so that KGDB in the kernel can use them */
|
||||
#ifdef CFG_INIT_CHAN1
|
||||
NS16550_reinit (COM_PORTS[0], clock_divisor);
|
||||
#endif
|
||||
#ifdef CFG_INIT_CHAN2
|
||||
NS16550_reinit (COM_PORTS[1], clock_divisor);
|
||||
#endif
|
||||
return (0);
|
||||
}
|
||||
|
||||
void serial_putc (const char c)
|
||||
{
|
||||
if (c == '\n')
|
||||
mpsc_putchar ('\r');
|
||||
|
||||
mpsc_putchar (c);
|
||||
}
|
||||
|
||||
int serial_getc (void)
|
||||
{
|
||||
return mpsc_getchar ();
|
||||
}
|
||||
|
||||
int serial_tstc (void)
|
||||
{
|
||||
return mpsc_test_char ();
|
||||
}
|
||||
|
||||
void serial_setbrg (void)
|
||||
{
|
||||
galbrg_set_baudrate (CONFIG_MPSC_PORT, gd->baudrate);
|
||||
}
|
||||
|
||||
#else /* ! CONFIG_MPSC */
|
||||
|
||||
int serial_init (void)
|
||||
{
|
||||
int clock_divisor = 230400 / gd->baudrate;
|
||||
|
||||
#ifdef CFG_INIT_CHAN1
|
||||
(void) NS16550_init (0, clock_divisor);
|
||||
#endif
|
||||
#ifdef CFG_INIT_CHAN2
|
||||
(void) NS16550_init (1, clock_divisor);
|
||||
#endif
|
||||
return (0);
|
||||
}
|
||||
|
||||
void serial_putc (const char c)
|
||||
{
|
||||
if (c == '\n')
|
||||
NS16550_putc (COM_PORTS[CFG_DUART_CHAN], '\r');
|
||||
|
||||
NS16550_putc (COM_PORTS[CFG_DUART_CHAN], c);
|
||||
}
|
||||
|
||||
int serial_getc (void)
|
||||
{
|
||||
return NS16550_getc (COM_PORTS[CFG_DUART_CHAN]);
|
||||
}
|
||||
|
||||
int serial_tstc (void)
|
||||
{
|
||||
return NS16550_tstc (COM_PORTS[CFG_DUART_CHAN]);
|
||||
}
|
||||
|
||||
void serial_setbrg (void)
|
||||
{
|
||||
int clock_divisor = 230400 / gd->baudrate;
|
||||
|
||||
#ifdef CFG_INIT_CHAN1
|
||||
NS16550_reinit (COM_PORTS[0], clock_divisor);
|
||||
#endif
|
||||
#ifdef CFG_INIT_CHAN2
|
||||
NS16550_reinit (COM_PORTS[1], clock_divisor);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* CONFIG_MPSC */
|
||||
|
||||
void serial_puts (const char *s)
|
||||
{
|
||||
while (*s) {
|
||||
serial_putc (*s++);
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(CONFIG_CMD_KGDB)
|
||||
void kgdb_serial_init (void)
|
||||
{
|
||||
}
|
||||
|
||||
void putDebugChar (int c)
|
||||
{
|
||||
serial_putc (c);
|
||||
}
|
||||
|
||||
void putDebugStr (const char *str)
|
||||
{
|
||||
serial_puts (str);
|
||||
}
|
||||
|
||||
int getDebugChar (void)
|
||||
{
|
||||
return serial_getc ();
|
||||
}
|
||||
|
||||
void kgdb_interruptible (int yes)
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
89
board/Marvell/common/serial.h
Normal file
89
board/Marvell/common/serial.h
Normal file
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* (C) Copyright 2001
|
||||
* Josh Huber <huber@mclx.com>, Mission Critical Linux, Inc.
|
||||
*
|
||||
* modified for marvell db64360 eval board by
|
||||
* Ingo Assmus <ingo.assmus@keymile.com>
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/* serial.h - mostly useful for DUART serial_init in serial.c */
|
||||
|
||||
#ifndef __SERIAL_H__
|
||||
#define __SERIAL_H__
|
||||
|
||||
#if 0
|
||||
|
||||
#define B230400 1
|
||||
#define B115200 2
|
||||
#define B57600 4
|
||||
#define B38400 82
|
||||
#define B19200 163
|
||||
#define B9600 24
|
||||
#define B4800 651
|
||||
#define B2400 1302
|
||||
#define B1200 2604
|
||||
#define B600 5208
|
||||
#define B300 10417
|
||||
#define B150 20833
|
||||
#define B110 28409
|
||||
#define BDEFAULT B115200
|
||||
|
||||
/* this stuff is important to initialize
|
||||
the DUART channels */
|
||||
|
||||
#define Scale 0x01L /* distance between port addresses */
|
||||
#define COM1 0x000003f8 /* Keyboard */
|
||||
#define COM2 0x000002f8 /* Host */
|
||||
|
||||
|
||||
/* Port Definitions relative to base COM port addresses */
|
||||
#define DataIn (0x00*Scale) /* data input port */
|
||||
#define DataOut (0x00*Scale) /* data output port */
|
||||
#define BaudLsb (0x00*Scale) /* baud rate divisor least significant byte */
|
||||
#define BaudMsb (0x01*Scale) /* baud rate divisor most significant byte */
|
||||
#define Ier (0x01*Scale) /* interrupt enable register */
|
||||
#define Iir (0x02*Scale) /* interrupt identification register */
|
||||
#define Lcr (0x03*Scale) /* line control register */
|
||||
#define Mcr (0x04*Scale) /* modem control register */
|
||||
#define Lsr (0x05*Scale) /* line status register */
|
||||
#define Msr (0x06*Scale) /* modem status register */
|
||||
|
||||
/* Bit Definitions for above ports */
|
||||
#define LcrDlab 0x80 /* b7: enable baud rate divisor registers */
|
||||
#define LcrDflt 0x03 /* b6-0: no parity, 1 stop, 8 data */
|
||||
|
||||
#define McrRts 0x02 /* b1: request to send (I am ready to xmit) */
|
||||
#define McrDtr 0x01 /* b0: data terminal ready (I am alive ready to rcv) */
|
||||
#define McrDflt (McrRts|McrDtr)
|
||||
|
||||
#define LsrTxD 0x6000 /* b5: transmit holding register empty (i.e. xmit OK!)*/
|
||||
/* b6: transmitter empty */
|
||||
#define LsrRxD 0x0100 /* b0: received data ready (i.e. got a byte!) */
|
||||
|
||||
#define MsrRi 0x0040 /* b6: ring indicator (other guy is ready to rcv) */
|
||||
#define MsrDsr 0x0020 /* b5: data set ready (other guy is alive ready to rcv */
|
||||
#define MsrCts 0x0010 /* b4: clear to send (other guy is ready to rcv) */
|
||||
|
||||
#define IerRda 0xf /* b0: Enable received data available interrupt */
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* __SERIAL_H__ */
|
||||
52
board/Marvell/db64360/64360.h
Normal file
52
board/Marvell/db64360/64360.h
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* (C) Copyright 2003
|
||||
* Ingo Assmus <ingo.assmus@keymile.com>
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/*
|
||||
* main board support/init for the Galileo Eval board DB64360.
|
||||
*/
|
||||
|
||||
#ifndef __64360_H__
|
||||
#define __64360_H__
|
||||
|
||||
/* CPU Configuration bits */
|
||||
#define CPU_CONF_ADDR_MISS_EN (1 << 8)
|
||||
#define CPU_CONF_SINGLE_CPU (1 << 11)
|
||||
#define CPU_CONF_ENDIANESS (1 << 12)
|
||||
#define CPU_CONF_PIPELINE (1 << 13)
|
||||
#define CPU_CONF_STOP_RETRY (1 << 17)
|
||||
#define CPU_CONF_MULTI_DECODE (1 << 18)
|
||||
#define CPU_CONF_DP_VALID (1 << 19)
|
||||
#define CPU_CONF_PERR_PROP (1 << 22)
|
||||
#define CPU_CONF_AACK_DELAY_2 (1 << 25)
|
||||
#define CPU_CONF_AP_VALID (1 << 26)
|
||||
#define CPU_CONF_REMAP_WR_DIS (1 << 27)
|
||||
|
||||
/* CPU Master Control bits */
|
||||
#define CPU_MAST_CTL_ARB_EN (1 << 8)
|
||||
#define CPU_MAST_CTL_MASK_BR_1 (1 << 9)
|
||||
#define CPU_MAST_CTL_M_WR_TRIG (1 << 10)
|
||||
#define CPU_MAST_CTL_M_RD_TRIG (1 << 11)
|
||||
#define CPU_MAST_CTL_CLEAN_BLK (1 << 12)
|
||||
#define CPU_MAST_CTL_FLUSH_BLK (1 << 13)
|
||||
|
||||
#endif /* __64360_H__ */
|
||||
54
board/Marvell/db64360/Makefile
Normal file
54
board/Marvell/db64360/Makefile
Normal file
@@ -0,0 +1,54 @@
|
||||
#
|
||||
# (C) Copyright 2006
|
||||
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
#
|
||||
# (C) Copyright 2001
|
||||
# Josh Huber <huber@mclx.com>, Mission Critical Linux, Inc.
|
||||
#
|
||||
# See file CREDITS for list of people who contributed to this
|
||||
# project.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
# MA 02111-1307 USA
|
||||
#
|
||||
|
||||
include $(TOPDIR)/config.mk
|
||||
ifneq ($(OBJTREE),$(SRCTREE))
|
||||
$(shell mkdir -p $(obj)../common)
|
||||
endif
|
||||
|
||||
LIB = $(obj)lib$(BOARD).a
|
||||
|
||||
SOBJS = ../common/misc.o
|
||||
|
||||
COBJS = $(BOARD).o ../common/flash.o ../common/serial.o ../common/memory.o pci.o \
|
||||
mv_eth.o ../common/ns16550.o mpsc.o ../common/i2c.o \
|
||||
sdram_init.o ../common/intel_flash.o
|
||||
|
||||
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
|
||||
OBJS := $(addprefix $(obj),$(COBJS))
|
||||
SOBJS := $(addprefix $(obj),$(SOBJS))
|
||||
|
||||
$(LIB): $(obj).depend $(OBJS) $(SOBJS)
|
||||
$(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
|
||||
|
||||
#########################################################################
|
||||
|
||||
# defines $(obj).depend target
|
||||
include $(SRCTREE)/rules.mk
|
||||
|
||||
sinclude $(obj).depend
|
||||
|
||||
#########################################################################
|
||||
28
board/Marvell/db64360/config.mk
Normal file
28
board/Marvell/db64360/config.mk
Normal file
@@ -0,0 +1,28 @@
|
||||
#
|
||||
# (C) Copyright 2001
|
||||
# Josh Huber <huber@mclx.com>, Mission Critical Linux, Inc.
|
||||
#
|
||||
# See file CREDITS for list of people who contributed to this
|
||||
# project.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
# MA 02111-1307 USA
|
||||
#
|
||||
|
||||
#
|
||||
# EVB64360 boards
|
||||
#
|
||||
|
||||
TEXT_BASE = 0xfff00000
|
||||
936
board/Marvell/db64360/db64360.c
Normal file
936
board/Marvell/db64360/db64360.c
Normal file
@@ -0,0 +1,936 @@
|
||||
/*
|
||||
* (C) Copyright 2001
|
||||
* Josh Huber <huber@mclx.com>, Mission Critical Linux, Inc.
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*
|
||||
* modifications for the DB64360 eval board based by Ingo.Assmus@keymile.com
|
||||
*/
|
||||
|
||||
/*
|
||||
* db64360.c - main board support/init for the Galileo Eval board.
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <74xx_7xx.h>
|
||||
#include "../include/memory.h"
|
||||
#include "../include/pci.h"
|
||||
#include "../include/mv_gen_reg.h"
|
||||
#include <net.h>
|
||||
|
||||
#include "eth.h"
|
||||
#include "mpsc.h"
|
||||
#include "i2c.h"
|
||||
#include "64360.h"
|
||||
#include "mv_regs.h"
|
||||
|
||||
#undef DEBUG
|
||||
/*#define DEBUG */
|
||||
|
||||
#define MAP_PCI
|
||||
|
||||
#ifdef DEBUG
|
||||
#define DP(x) x
|
||||
#else
|
||||
#define DP(x)
|
||||
#endif
|
||||
|
||||
extern void flush_data_cache (void);
|
||||
extern void invalidate_l1_instruction_cache (void);
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
/* this is the current GT register space location */
|
||||
/* it starts at CFG_DFL_GT_REGS but moves later to CFG_GT_REGS */
|
||||
|
||||
/* Unfortunately, we cant change it while we are in flash, so we initialize it
|
||||
* to the "final" value. This means that any debug_led calls before
|
||||
* board_early_init_f wont work right (like in cpu_init_f).
|
||||
* See also my_remap_gt_regs below. (NTL)
|
||||
*/
|
||||
|
||||
void board_prebootm_init (void);
|
||||
unsigned int INTERNAL_REG_BASE_ADDR = CFG_GT_REGS;
|
||||
int display_mem_map (void);
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* This is a version of the GT register space remapping function that
|
||||
* doesn't touch globals (meaning, it's ok to run from flash.)
|
||||
*
|
||||
* Unfortunately, this has the side effect that a writable
|
||||
* INTERNAL_REG_BASE_ADDR is impossible. Oh well.
|
||||
*/
|
||||
|
||||
void my_remap_gt_regs (u32 cur_loc, u32 new_loc)
|
||||
{
|
||||
u32 temp;
|
||||
|
||||
/* check and see if it's already moved */
|
||||
|
||||
/* original ppcboot 1.1.6 source
|
||||
|
||||
temp = in_le32((u32 *)(new_loc + INTERNAL_SPACE_DECODE));
|
||||
if ((temp & 0xffff) == new_loc >> 20)
|
||||
return;
|
||||
|
||||
temp = (in_le32((u32 *)(cur_loc + INTERNAL_SPACE_DECODE)) &
|
||||
0xffff0000) | (new_loc >> 20);
|
||||
|
||||
out_le32((u32 *)(cur_loc + INTERNAL_SPACE_DECODE), temp);
|
||||
|
||||
while (GTREGREAD(INTERNAL_SPACE_DECODE) != temp);
|
||||
original ppcboot 1.1.6 source end */
|
||||
|
||||
temp = in_le32 ((u32 *) (new_loc + INTERNAL_SPACE_DECODE));
|
||||
if ((temp & 0xffff) == new_loc >> 16)
|
||||
return;
|
||||
|
||||
temp = (in_le32 ((u32 *) (cur_loc + INTERNAL_SPACE_DECODE)) &
|
||||
0xffff0000) | (new_loc >> 16);
|
||||
|
||||
out_le32 ((u32 *) (cur_loc + INTERNAL_SPACE_DECODE), temp);
|
||||
|
||||
while (GTREGREAD (INTERNAL_SPACE_DECODE) != temp);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
|
||||
static void gt_pci_config (void)
|
||||
{
|
||||
unsigned int stat;
|
||||
unsigned int val = 0x00fff864; /* DINK32: BusNum 23:16, DevNum 15:11, FuncNum 10:8, RegNum 7:2 */
|
||||
|
||||
/* In PCIX mode devices provide their own bus and device numbers. We query the Discovery II's
|
||||
* config registers by writing ones to the bus and device.
|
||||
* We then update the Virtual register with the correct value for the bus and device.
|
||||
*/
|
||||
if ((GTREGREAD (PCI_0_MODE) & (BIT4 | BIT5)) != 0) { /*if PCI-X */
|
||||
GT_REG_WRITE (PCI_0_CONFIG_ADDR, BIT31 | val);
|
||||
|
||||
GT_REG_READ (PCI_0_CONFIG_DATA_VIRTUAL_REG, &stat);
|
||||
|
||||
GT_REG_WRITE (PCI_0_CONFIG_ADDR, BIT31 | val);
|
||||
GT_REG_WRITE (PCI_0_CONFIG_DATA_VIRTUAL_REG,
|
||||
(stat & 0xffff0000) | CFG_PCI_IDSEL);
|
||||
|
||||
}
|
||||
if ((GTREGREAD (PCI_1_MODE) & (BIT4 | BIT5)) != 0) { /*if PCI-X */
|
||||
GT_REG_WRITE (PCI_1_CONFIG_ADDR, BIT31 | val);
|
||||
GT_REG_READ (PCI_1_CONFIG_DATA_VIRTUAL_REG, &stat);
|
||||
|
||||
GT_REG_WRITE (PCI_1_CONFIG_ADDR, BIT31 | val);
|
||||
GT_REG_WRITE (PCI_1_CONFIG_DATA_VIRTUAL_REG,
|
||||
(stat & 0xffff0000) | CFG_PCI_IDSEL);
|
||||
}
|
||||
|
||||
/* Enable master */
|
||||
PCI_MASTER_ENABLE (0, SELF);
|
||||
PCI_MASTER_ENABLE (1, SELF);
|
||||
|
||||
/* Enable PCI0/1 Mem0 and IO 0 disable all others */
|
||||
GT_REG_READ (BASE_ADDR_ENABLE, &stat);
|
||||
stat |= (1 << 11) | (1 << 12) | (1 << 13) | (1 << 16) | (1 << 17) | (1
|
||||
<<
|
||||
18);
|
||||
stat &= ~((1 << 9) | (1 << 10) | (1 << 14) | (1 << 15));
|
||||
GT_REG_WRITE (BASE_ADDR_ENABLE, stat);
|
||||
|
||||
/* ronen- add write to pci remap registers for 64460.
|
||||
in 64360 when writing to pci base go and overide remap automaticaly,
|
||||
in 64460 it doesn't */
|
||||
GT_REG_WRITE (PCI_0_IO_BASE_ADDR, CFG_PCI0_IO_BASE >> 16);
|
||||
GT_REG_WRITE (PCI_0I_O_ADDRESS_REMAP, CFG_PCI0_IO_BASE >> 16);
|
||||
GT_REG_WRITE (PCI_0_IO_SIZE, (CFG_PCI0_IO_SIZE - 1) >> 16);
|
||||
|
||||
GT_REG_WRITE (PCI_0_MEMORY0_BASE_ADDR, CFG_PCI0_MEM_BASE >> 16);
|
||||
GT_REG_WRITE (PCI_0MEMORY0_ADDRESS_REMAP, CFG_PCI0_MEM_BASE >> 16);
|
||||
GT_REG_WRITE (PCI_0_MEMORY0_SIZE, (CFG_PCI0_MEM_SIZE - 1) >> 16);
|
||||
|
||||
GT_REG_WRITE (PCI_1_IO_BASE_ADDR, CFG_PCI1_IO_BASE >> 16);
|
||||
GT_REG_WRITE (PCI_1I_O_ADDRESS_REMAP, CFG_PCI1_IO_BASE >> 16);
|
||||
GT_REG_WRITE (PCI_1_IO_SIZE, (CFG_PCI1_IO_SIZE - 1) >> 16);
|
||||
|
||||
GT_REG_WRITE (PCI_1_MEMORY0_BASE_ADDR, CFG_PCI1_MEM_BASE >> 16);
|
||||
GT_REG_WRITE (PCI_1MEMORY0_ADDRESS_REMAP, CFG_PCI1_MEM_BASE >> 16);
|
||||
GT_REG_WRITE (PCI_1_MEMORY0_SIZE, (CFG_PCI1_MEM_SIZE - 1) >> 16);
|
||||
|
||||
/* PCI interface settings */
|
||||
/* Timeout set to retry forever */
|
||||
GT_REG_WRITE (PCI_0TIMEOUT_RETRY, 0x0);
|
||||
GT_REG_WRITE (PCI_1TIMEOUT_RETRY, 0x0);
|
||||
|
||||
/* ronen - enable only CS0 and Internal reg!! */
|
||||
GT_REG_WRITE (PCI_0BASE_ADDRESS_REGISTERS_ENABLE, 0xfffffdfe);
|
||||
GT_REG_WRITE (PCI_1BASE_ADDRESS_REGISTERS_ENABLE, 0xfffffdfe);
|
||||
|
||||
/*ronen update the pci internal registers base address.*/
|
||||
#ifdef MAP_PCI
|
||||
for (stat = 0; stat <= PCI_HOST1; stat++)
|
||||
pciWriteConfigReg (stat,
|
||||
PCI_INTERNAL_REGISTERS_MEMORY_MAPPED_BASE_ADDRESS,
|
||||
SELF, CFG_GT_REGS);
|
||||
#endif
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Setup CPU interface paramaters */
|
||||
static void gt_cpu_config (void)
|
||||
{
|
||||
cpu_t cpu = get_cpu_type ();
|
||||
ulong tmp;
|
||||
|
||||
/* cpu configuration register */
|
||||
tmp = GTREGREAD (CPU_CONFIGURATION);
|
||||
|
||||
/* set the SINGLE_CPU bit see MV64360 P.399 */
|
||||
#ifndef CFG_GT_DUAL_CPU /* SINGLE_CPU seems to cause JTAG problems */
|
||||
tmp |= CPU_CONF_SINGLE_CPU;
|
||||
#endif
|
||||
|
||||
tmp &= ~CPU_CONF_AACK_DELAY_2;
|
||||
|
||||
tmp |= CPU_CONF_DP_VALID;
|
||||
tmp |= CPU_CONF_AP_VALID;
|
||||
|
||||
tmp |= CPU_CONF_PIPELINE;
|
||||
|
||||
GT_REG_WRITE (CPU_CONFIGURATION, tmp); /* Marvell (VXWorks) writes 0x20220FF */
|
||||
|
||||
/* CPU master control register */
|
||||
tmp = GTREGREAD (CPU_MASTER_CONTROL);
|
||||
|
||||
tmp |= CPU_MAST_CTL_ARB_EN;
|
||||
|
||||
if ((cpu == CPU_7400) ||
|
||||
(cpu == CPU_7410) || (cpu == CPU_7455) || (cpu == CPU_7450)) {
|
||||
|
||||
tmp |= CPU_MAST_CTL_CLEAN_BLK;
|
||||
tmp |= CPU_MAST_CTL_FLUSH_BLK;
|
||||
|
||||
} else {
|
||||
/* cleanblock must be cleared for CPUs
|
||||
* that do not support this command (603e, 750)
|
||||
* see Res#1 */
|
||||
tmp &= ~CPU_MAST_CTL_CLEAN_BLK;
|
||||
tmp &= ~CPU_MAST_CTL_FLUSH_BLK;
|
||||
}
|
||||
GT_REG_WRITE (CPU_MASTER_CONTROL, tmp);
|
||||
}
|
||||
|
||||
/*
|
||||
* board_early_init_f.
|
||||
*
|
||||
* set up gal. device mappings, etc.
|
||||
*/
|
||||
int board_early_init_f (void)
|
||||
{
|
||||
uchar sram_boot = 0;
|
||||
|
||||
/*
|
||||
* set up the GT the way the kernel wants it
|
||||
* the call to move the GT register space will obviously
|
||||
* fail if it has already been done, but we're going to assume
|
||||
* that if it's not at the power-on location, it's where we put
|
||||
* it last time. (huber)
|
||||
*/
|
||||
|
||||
my_remap_gt_regs (CFG_DFL_GT_REGS, CFG_GT_REGS);
|
||||
|
||||
/* No PCI in first release of Port To_do: enable it. */
|
||||
#ifdef CONFIG_PCI
|
||||
gt_pci_config ();
|
||||
#endif
|
||||
/* mask all external interrupt sources */
|
||||
GT_REG_WRITE (CPU_INTERRUPT_MASK_REGISTER_LOW, 0);
|
||||
GT_REG_WRITE (CPU_INTERRUPT_MASK_REGISTER_HIGH, 0);
|
||||
/* new in MV6436x */
|
||||
GT_REG_WRITE (CPU_INTERRUPT_1_MASK_REGISTER_LOW, 0);
|
||||
GT_REG_WRITE (CPU_INTERRUPT_1_MASK_REGISTER_HIGH, 0);
|
||||
/* --------------------- */
|
||||
GT_REG_WRITE (PCI_0INTERRUPT_CAUSE_MASK_REGISTER_LOW, 0);
|
||||
GT_REG_WRITE (PCI_0INTERRUPT_CAUSE_MASK_REGISTER_HIGH, 0);
|
||||
GT_REG_WRITE (PCI_1INTERRUPT_CAUSE_MASK_REGISTER_LOW, 0);
|
||||
GT_REG_WRITE (PCI_1INTERRUPT_CAUSE_MASK_REGISTER_HIGH, 0);
|
||||
/* does not exist in MV6436x
|
||||
GT_REG_WRITE(CPU_INT_0_MASK, 0);
|
||||
GT_REG_WRITE(CPU_INT_1_MASK, 0);
|
||||
GT_REG_WRITE(CPU_INT_2_MASK, 0);
|
||||
GT_REG_WRITE(CPU_INT_3_MASK, 0);
|
||||
--------------------- */
|
||||
|
||||
|
||||
/* ----- DEVICE BUS SETTINGS ------ */
|
||||
|
||||
/*
|
||||
* EVB
|
||||
* 0 - SRAM ????
|
||||
* 1 - RTC ????
|
||||
* 2 - UART ????
|
||||
* 3 - Flash checked 32Bit Intel Strata
|
||||
* boot - BootCS checked 8Bit 29LV040B
|
||||
*
|
||||
* Zuma
|
||||
* 0 - Flash
|
||||
* boot - BootCS
|
||||
*/
|
||||
|
||||
/*
|
||||
* the dual 7450 module requires burst access to the boot
|
||||
* device, so the serial rom copies the boot device to the
|
||||
* on-board sram on the eval board, and updates the correct
|
||||
* registers to boot from the sram. (device0)
|
||||
*/
|
||||
if (memoryGetDeviceBaseAddress (DEVICE0) == CFG_DFL_BOOTCS_BASE)
|
||||
sram_boot = 1;
|
||||
if (!sram_boot)
|
||||
memoryMapDeviceSpace (DEVICE0, CFG_DEV0_SPACE, CFG_DEV0_SIZE);
|
||||
|
||||
memoryMapDeviceSpace (DEVICE1, CFG_DEV1_SPACE, CFG_DEV1_SIZE);
|
||||
memoryMapDeviceSpace (DEVICE2, CFG_DEV2_SPACE, CFG_DEV2_SIZE);
|
||||
memoryMapDeviceSpace (DEVICE3, CFG_DEV3_SPACE, CFG_DEV3_SIZE);
|
||||
|
||||
|
||||
/* configure device timing */
|
||||
#ifdef CFG_DEV0_PAR /* set port parameters for SRAM device module access */
|
||||
if (!sram_boot)
|
||||
GT_REG_WRITE (DEVICE_BANK0PARAMETERS, CFG_DEV0_PAR);
|
||||
#endif
|
||||
|
||||
#ifdef CFG_DEV1_PAR /* set port parameters for RTC device module access */
|
||||
GT_REG_WRITE (DEVICE_BANK1PARAMETERS, CFG_DEV1_PAR);
|
||||
#endif
|
||||
#ifdef CFG_DEV2_PAR /* set port parameters for DUART device module access */
|
||||
GT_REG_WRITE (DEVICE_BANK2PARAMETERS, CFG_DEV2_PAR);
|
||||
#endif
|
||||
|
||||
#ifdef CFG_32BIT_BOOT_PAR /* set port parameters for Flash device module access */
|
||||
/* detect if we are booting from the 32 bit flash */
|
||||
if (GTREGREAD (DEVICE_BOOT_BANK_PARAMETERS) & (0x3 << 20)) {
|
||||
/* 32 bit boot flash */
|
||||
GT_REG_WRITE (DEVICE_BANK3PARAMETERS, CFG_8BIT_BOOT_PAR);
|
||||
GT_REG_WRITE (DEVICE_BOOT_BANK_PARAMETERS,
|
||||
CFG_32BIT_BOOT_PAR);
|
||||
} else {
|
||||
/* 8 bit boot flash */
|
||||
GT_REG_WRITE (DEVICE_BANK3PARAMETERS, CFG_32BIT_BOOT_PAR);
|
||||
GT_REG_WRITE (DEVICE_BOOT_BANK_PARAMETERS, CFG_8BIT_BOOT_PAR);
|
||||
}
|
||||
#else
|
||||
/* 8 bit boot flash only */
|
||||
/* GT_REG_WRITE(DEVICE_BOOT_BANK_PARAMETERS, CFG_8BIT_BOOT_PAR);*/
|
||||
#endif
|
||||
|
||||
|
||||
gt_cpu_config ();
|
||||
|
||||
/* MPP setup */
|
||||
GT_REG_WRITE (MPP_CONTROL0, CFG_MPP_CONTROL_0);
|
||||
GT_REG_WRITE (MPP_CONTROL1, CFG_MPP_CONTROL_1);
|
||||
GT_REG_WRITE (MPP_CONTROL2, CFG_MPP_CONTROL_2);
|
||||
GT_REG_WRITE (MPP_CONTROL3, CFG_MPP_CONTROL_3);
|
||||
|
||||
GT_REG_WRITE (GPP_LEVEL_CONTROL, CFG_GPP_LEVEL_CONTROL);
|
||||
DEBUG_LED0_ON ();
|
||||
DEBUG_LED1_ON ();
|
||||
DEBUG_LED2_ON ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* various things to do after relocation */
|
||||
|
||||
int misc_init_r ()
|
||||
{
|
||||
icache_enable ();
|
||||
#ifdef CFG_L2
|
||||
l2cache_enable ();
|
||||
#endif
|
||||
#ifdef CONFIG_MPSC
|
||||
|
||||
mpsc_sdma_init ();
|
||||
mpsc_init2 ();
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
/* disable the dcache and MMU */
|
||||
dcache_lock ();
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
void after_reloc (ulong dest_addr, gd_t * gd)
|
||||
{
|
||||
/* check to see if we booted from the sram. If so, move things
|
||||
* back to the way they should be. (we're running from main
|
||||
* memory at this point now */
|
||||
if (memoryGetDeviceBaseAddress (DEVICE0) == CFG_DFL_BOOTCS_BASE) {
|
||||
memoryMapDeviceSpace (DEVICE0, CFG_DEV0_SPACE, CFG_DEV0_SIZE);
|
||||
memoryMapDeviceSpace (BOOT_DEVICE, CFG_DFL_BOOTCS_BASE, _8M);
|
||||
}
|
||||
display_mem_map ();
|
||||
/* now, jump to the main ppcboot board init code */
|
||||
board_init_r (gd, dest_addr);
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Check Board Identity:
|
||||
*
|
||||
* right now, assume borad type. (there is just one...after all)
|
||||
*/
|
||||
|
||||
int checkboard (void)
|
||||
{
|
||||
int l_type = 0;
|
||||
|
||||
printf ("BOARD: %s\n", CFG_BOARD_NAME);
|
||||
return (l_type);
|
||||
}
|
||||
|
||||
/* utility functions */
|
||||
void debug_led (int led, int mode)
|
||||
{
|
||||
volatile int *addr = 0;
|
||||
int dummy;
|
||||
|
||||
if (mode == 1) {
|
||||
switch (led) {
|
||||
case 0:
|
||||
addr = (int *) ((unsigned int) CFG_DEV1_SPACE |
|
||||
0x08000);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
addr = (int *) ((unsigned int) CFG_DEV1_SPACE |
|
||||
0x0c000);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
addr = (int *) ((unsigned int) CFG_DEV1_SPACE |
|
||||
0x10000);
|
||||
break;
|
||||
}
|
||||
} else if (mode == 0) {
|
||||
switch (led) {
|
||||
case 0:
|
||||
addr = (int *) ((unsigned int) CFG_DEV1_SPACE |
|
||||
0x14000);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
addr = (int *) ((unsigned int) CFG_DEV1_SPACE |
|
||||
0x18000);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
addr = (int *) ((unsigned int) CFG_DEV1_SPACE |
|
||||
0x1c000);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
dummy = *addr;
|
||||
}
|
||||
|
||||
int display_mem_map (void)
|
||||
{
|
||||
int i, j;
|
||||
unsigned int base, size, width;
|
||||
|
||||
/* SDRAM */
|
||||
printf ("SD (DDR) RAM\n");
|
||||
for (i = 0; i <= BANK3; i++) {
|
||||
base = memoryGetBankBaseAddress (i);
|
||||
size = memoryGetBankSize (i);
|
||||
if (size != 0) {
|
||||
printf ("BANK%d: base - 0x%08x\tsize - %dM bytes\n",
|
||||
i, base, size >> 20);
|
||||
}
|
||||
}
|
||||
|
||||
/* CPU's PCI windows */
|
||||
for (i = 0; i <= PCI_HOST1; i++) {
|
||||
printf ("\nCPU's PCI %d windows\n", i);
|
||||
base = pciGetSpaceBase (i, PCI_IO);
|
||||
size = pciGetSpaceSize (i, PCI_IO);
|
||||
printf (" IO: base - 0x%08x\tsize - %dM bytes\n", base,
|
||||
size >> 20);
|
||||
for (j = 0;
|
||||
j <=
|
||||
PCI_REGION0
|
||||
/*ronen currently only first PCI MEM is used 3 */ ;
|
||||
j++) {
|
||||
base = pciGetSpaceBase (i, j);
|
||||
size = pciGetSpaceSize (i, j);
|
||||
printf ("MEMORY %d: base - 0x%08x\tsize - %dM bytes\n", j, base, size >> 20);
|
||||
}
|
||||
}
|
||||
|
||||
/* Devices */
|
||||
printf ("\nDEVICES\n");
|
||||
for (i = 0; i <= DEVICE3; i++) {
|
||||
base = memoryGetDeviceBaseAddress (i);
|
||||
size = memoryGetDeviceSize (i);
|
||||
width = memoryGetDeviceWidth (i) * 8;
|
||||
printf ("DEV %d: base - 0x%08x size - %dM bytes\twidth - %d bits", i, base, size >> 20, width);
|
||||
if (i == 0)
|
||||
printf ("\t- EXT SRAM (actual - 1M)\n");
|
||||
else if (i == 1)
|
||||
printf ("\t- RTC\n");
|
||||
else if (i == 2)
|
||||
printf ("\t- UART\n");
|
||||
else
|
||||
printf ("\t- LARGE FLASH\n");
|
||||
}
|
||||
|
||||
/* Bootrom */
|
||||
base = memoryGetDeviceBaseAddress (BOOT_DEVICE); /* Boot */
|
||||
size = memoryGetDeviceSize (BOOT_DEVICE);
|
||||
width = memoryGetDeviceWidth (BOOT_DEVICE) * 8;
|
||||
printf (" BOOT: base - 0x%08x size - %dM bytes\twidth - %d bits\n",
|
||||
base, size >> 20, width);
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* DRAM check routines copied from gw8260 */
|
||||
|
||||
#if defined (CFG_DRAM_TEST)
|
||||
|
||||
/*********************************************************************/
|
||||
/* NAME: move64() - moves a double word (64-bit) */
|
||||
/* */
|
||||
/* DESCRIPTION: */
|
||||
/* this function performs a double word move from the data at */
|
||||
/* the source pointer to the location at the destination pointer. */
|
||||
/* */
|
||||
/* INPUTS: */
|
||||
/* unsigned long long *src - pointer to data to move */
|
||||
/* */
|
||||
/* OUTPUTS: */
|
||||
/* unsigned long long *dest - pointer to locate to move data */
|
||||
/* */
|
||||
/* RETURNS: */
|
||||
/* None */
|
||||
/* */
|
||||
/* RESTRICTIONS/LIMITATIONS: */
|
||||
/* May cloober fr0. */
|
||||
/* */
|
||||
/*********************************************************************/
|
||||
static void move64 (unsigned long long *src, unsigned long long *dest)
|
||||
{
|
||||
asm ("lfd 0, 0(3)\n\t" /* fpr0 = *scr */
|
||||
"stfd 0, 0(4)" /* *dest = fpr0 */
|
||||
: : : "fr0"); /* Clobbers fr0 */
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
#if defined (CFG_DRAM_TEST_DATA)
|
||||
|
||||
unsigned long long pattern[] = {
|
||||
0xaaaaaaaaaaaaaaaaULL,
|
||||
0xccccccccccccccccULL,
|
||||
0xf0f0f0f0f0f0f0f0ULL,
|
||||
0xff00ff00ff00ff00ULL,
|
||||
0xffff0000ffff0000ULL,
|
||||
0xffffffff00000000ULL,
|
||||
0x00000000ffffffffULL,
|
||||
0x0000ffff0000ffffULL,
|
||||
0x00ff00ff00ff00ffULL,
|
||||
0x0f0f0f0f0f0f0f0fULL,
|
||||
0x3333333333333333ULL,
|
||||
0x5555555555555555ULL,
|
||||
};
|
||||
|
||||
/*********************************************************************/
|
||||
/* NAME: mem_test_data() - test data lines for shorts and opens */
|
||||
/* */
|
||||
/* DESCRIPTION: */
|
||||
/* Tests data lines for shorts and opens by forcing adjacent data */
|
||||
/* to opposite states. Because the data lines could be routed in */
|
||||
/* an arbitrary manner the must ensure test patterns ensure that */
|
||||
/* every case is tested. By using the following series of binary */
|
||||
/* patterns every combination of adjacent bits is test regardless */
|
||||
/* of routing. */
|
||||
/* */
|
||||
/* ...101010101010101010101010 */
|
||||
/* ...110011001100110011001100 */
|
||||
/* ...111100001111000011110000 */
|
||||
/* ...111111110000000011111111 */
|
||||
/* */
|
||||
/* Carrying this out, gives us six hex patterns as follows: */
|
||||
/* */
|
||||
/* 0xaaaaaaaaaaaaaaaa */
|
||||
/* 0xcccccccccccccccc */
|
||||
/* 0xf0f0f0f0f0f0f0f0 */
|
||||
/* 0xff00ff00ff00ff00 */
|
||||
/* 0xffff0000ffff0000 */
|
||||
/* 0xffffffff00000000 */
|
||||
/* */
|
||||
/* The number test patterns will always be given by: */
|
||||
/* */
|
||||
/* log(base 2)(number data bits) = log2 (64) = 6 */
|
||||
/* */
|
||||
/* To test for short and opens to other signals on our boards. we */
|
||||
/* simply */
|
||||
/* test with the 1's complemnt of the paterns as well. */
|
||||
/* */
|
||||
/* OUTPUTS: */
|
||||
/* Displays failing test pattern */
|
||||
/* */
|
||||
/* RETURNS: */
|
||||
/* 0 - Passed test */
|
||||
/* 1 - Failed test */
|
||||
/* */
|
||||
/* RESTRICTIONS/LIMITATIONS: */
|
||||
/* Assumes only one one SDRAM bank */
|
||||
/* */
|
||||
/*********************************************************************/
|
||||
int mem_test_data (void)
|
||||
{
|
||||
unsigned long long *pmem = (unsigned long long *) CFG_MEMTEST_START;
|
||||
unsigned long long temp64 = 0;
|
||||
int num_patterns = sizeof (pattern) / sizeof (pattern[0]);
|
||||
int i;
|
||||
unsigned int hi, lo;
|
||||
|
||||
for (i = 0; i < num_patterns; i++) {
|
||||
move64 (&(pattern[i]), pmem);
|
||||
move64 (pmem, &temp64);
|
||||
|
||||
/* hi = (temp64>>32) & 0xffffffff; */
|
||||
/* lo = temp64 & 0xffffffff; */
|
||||
/* printf("\ntemp64 = 0x%08x%08x", hi, lo); */
|
||||
|
||||
hi = (pattern[i] >> 32) & 0xffffffff;
|
||||
lo = pattern[i] & 0xffffffff;
|
||||
/* printf("\npattern[%d] = 0x%08x%08x", i, hi, lo); */
|
||||
|
||||
if (temp64 != pattern[i]) {
|
||||
printf ("\n Data Test Failed, pattern 0x%08x%08x",
|
||||
hi, lo);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* CFG_DRAM_TEST_DATA */
|
||||
|
||||
#if defined (CFG_DRAM_TEST_ADDRESS)
|
||||
/*********************************************************************/
|
||||
/* NAME: mem_test_address() - test address lines */
|
||||
/* */
|
||||
/* DESCRIPTION: */
|
||||
/* This function performs a test to verify that each word im */
|
||||
/* memory is uniquly addressable. The test sequence is as follows: */
|
||||
/* */
|
||||
/* 1) write the address of each word to each word. */
|
||||
/* 2) verify that each location equals its address */
|
||||
/* */
|
||||
/* OUTPUTS: */
|
||||
/* Displays failing test pattern and address */
|
||||
/* */
|
||||
/* RETURNS: */
|
||||
/* 0 - Passed test */
|
||||
/* 1 - Failed test */
|
||||
/* */
|
||||
/* RESTRICTIONS/LIMITATIONS: */
|
||||
/* */
|
||||
/* */
|
||||
/*********************************************************************/
|
||||
int mem_test_address (void)
|
||||
{
|
||||
volatile unsigned int *pmem =
|
||||
(volatile unsigned int *) CFG_MEMTEST_START;
|
||||
const unsigned int size = (CFG_MEMTEST_END - CFG_MEMTEST_START) / 4;
|
||||
unsigned int i;
|
||||
|
||||
/* write address to each location */
|
||||
for (i = 0; i < size; i++) {
|
||||
pmem[i] = i;
|
||||
}
|
||||
|
||||
/* verify each loaction */
|
||||
for (i = 0; i < size; i++) {
|
||||
if (pmem[i] != i) {
|
||||
printf ("\n Address Test Failed at 0x%x", i);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif /* CFG_DRAM_TEST_ADDRESS */
|
||||
|
||||
#if defined (CFG_DRAM_TEST_WALK)
|
||||
/*********************************************************************/
|
||||
/* NAME: mem_march() - memory march */
|
||||
/* */
|
||||
/* DESCRIPTION: */
|
||||
/* Marches up through memory. At each location verifies rmask if */
|
||||
/* read = 1. At each location write wmask if write = 1. Displays */
|
||||
/* failing address and pattern. */
|
||||
/* */
|
||||
/* INPUTS: */
|
||||
/* volatile unsigned long long * base - start address of test */
|
||||
/* unsigned int size - number of dwords(64-bit) to test */
|
||||
/* unsigned long long rmask - read verify mask */
|
||||
/* unsigned long long wmask - wrtie verify mask */
|
||||
/* short read - verifies rmask if read = 1 */
|
||||
/* short write - writes wmask if write = 1 */
|
||||
/* */
|
||||
/* OUTPUTS: */
|
||||
/* Displays failing test pattern and address */
|
||||
/* */
|
||||
/* RETURNS: */
|
||||
/* 0 - Passed test */
|
||||
/* 1 - Failed test */
|
||||
/* */
|
||||
/* RESTRICTIONS/LIMITATIONS: */
|
||||
/* */
|
||||
/* */
|
||||
/*********************************************************************/
|
||||
int mem_march (volatile unsigned long long *base,
|
||||
unsigned int size,
|
||||
unsigned long long rmask,
|
||||
unsigned long long wmask, short read, short write)
|
||||
{
|
||||
unsigned int i;
|
||||
unsigned long long temp = 0;
|
||||
unsigned int hitemp, lotemp, himask, lomask;
|
||||
|
||||
for (i = 0; i < size; i++) {
|
||||
if (read != 0) {
|
||||
/* temp = base[i]; */
|
||||
move64 ((unsigned long long *) &(base[i]), &temp);
|
||||
if (rmask != temp) {
|
||||
hitemp = (temp >> 32) & 0xffffffff;
|
||||
lotemp = temp & 0xffffffff;
|
||||
himask = (rmask >> 32) & 0xffffffff;
|
||||
lomask = rmask & 0xffffffff;
|
||||
|
||||
printf ("\n Walking one's test failed: address = 0x%08x," "\n\texpected 0x%08x%08x, found 0x%08x%08x", i << 3, himask, lomask, hitemp, lotemp);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
if (write != 0) {
|
||||
/* base[i] = wmask; */
|
||||
move64 (&wmask, (unsigned long long *) &(base[i]));
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif /* CFG_DRAM_TEST_WALK */
|
||||
|
||||
/*********************************************************************/
|
||||
/* NAME: mem_test_walk() - a simple walking ones test */
|
||||
/* */
|
||||
/* DESCRIPTION: */
|
||||
/* Performs a walking ones through entire physical memory. The */
|
||||
/* test uses as series of memory marches, mem_march(), to verify */
|
||||
/* and write the test patterns to memory. The test sequence is as */
|
||||
/* follows: */
|
||||
/* 1) march writing 0000...0001 */
|
||||
/* 2) march verifying 0000...0001 , writing 0000...0010 */
|
||||
/* 3) repeat step 2 shifting masks left 1 bit each time unitl */
|
||||
/* the write mask equals 1000...0000 */
|
||||
/* 4) march verifying 1000...0000 */
|
||||
/* The test fails if any of the memory marches return a failure. */
|
||||
/* */
|
||||
/* OUTPUTS: */
|
||||
/* Displays which pass on the memory test is executing */
|
||||
/* */
|
||||
/* RETURNS: */
|
||||
/* 0 - Passed test */
|
||||
/* 1 - Failed test */
|
||||
/* */
|
||||
/* RESTRICTIONS/LIMITATIONS: */
|
||||
/* */
|
||||
/* */
|
||||
/*********************************************************************/
|
||||
int mem_test_walk (void)
|
||||
{
|
||||
unsigned long long mask;
|
||||
volatile unsigned long long *pmem =
|
||||
(volatile unsigned long long *) CFG_MEMTEST_START;
|
||||
const unsigned long size = (CFG_MEMTEST_END - CFG_MEMTEST_START) / 8;
|
||||
|
||||
unsigned int i;
|
||||
|
||||
mask = 0x01;
|
||||
|
||||
printf ("Initial Pass");
|
||||
mem_march (pmem, size, 0x0, 0x1, 0, 1);
|
||||
|
||||
printf ("\b\b\b\b\b\b\b\b\b\b\b\b");
|
||||
printf (" ");
|
||||
printf (" ");
|
||||
printf ("\b\b\b\b\b\b\b\b\b\b\b\b");
|
||||
|
||||
for (i = 0; i < 63; i++) {
|
||||
printf ("Pass %2d", i + 2);
|
||||
if (mem_march (pmem, size, mask, mask << 1, 1, 1) != 0) {
|
||||
/*printf("mask: 0x%x, pass: %d, ", mask, i); */
|
||||
return 1;
|
||||
}
|
||||
mask = mask << 1;
|
||||
printf ("\b\b\b\b\b\b\b");
|
||||
}
|
||||
|
||||
printf ("Last Pass");
|
||||
if (mem_march (pmem, size, 0, mask, 0, 1) != 0) {
|
||||
/* printf("mask: 0x%x", mask); */
|
||||
return 1;
|
||||
}
|
||||
printf ("\b\b\b\b\b\b\b\b\b");
|
||||
printf (" ");
|
||||
printf ("\b\b\b\b\b\b\b\b\b");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*********************************************************************/
|
||||
/* NAME: testdram() - calls any enabled memory tests */
|
||||
/* */
|
||||
/* DESCRIPTION: */
|
||||
/* Runs memory tests if the environment test variables are set to */
|
||||
/* 'y'. */
|
||||
/* */
|
||||
/* INPUTS: */
|
||||
/* testdramdata - If set to 'y', data test is run. */
|
||||
/* testdramaddress - If set to 'y', address test is run. */
|
||||
/* testdramwalk - If set to 'y', walking ones test is run */
|
||||
/* */
|
||||
/* OUTPUTS: */
|
||||
/* None */
|
||||
/* */
|
||||
/* RETURNS: */
|
||||
/* 0 - Passed test */
|
||||
/* 1 - Failed test */
|
||||
/* */
|
||||
/* RESTRICTIONS/LIMITATIONS: */
|
||||
/* */
|
||||
/* */
|
||||
/*********************************************************************/
|
||||
int testdram (void)
|
||||
{
|
||||
char *s;
|
||||
int rundata, runaddress, runwalk;
|
||||
|
||||
s = getenv ("testdramdata");
|
||||
rundata = (s && (*s == 'y')) ? 1 : 0;
|
||||
s = getenv ("testdramaddress");
|
||||
runaddress = (s && (*s == 'y')) ? 1 : 0;
|
||||
s = getenv ("testdramwalk");
|
||||
runwalk = (s && (*s == 'y')) ? 1 : 0;
|
||||
|
||||
/* rundata = 1; */
|
||||
/* runaddress = 0; */
|
||||
/* runwalk = 0; */
|
||||
|
||||
if ((rundata == 1) || (runaddress == 1) || (runwalk == 1)) {
|
||||
printf ("Testing RAM from 0x%08x to 0x%08x ... (don't panic... that will take a moment !!!!)\n", CFG_MEMTEST_START, CFG_MEMTEST_END);
|
||||
}
|
||||
#ifdef CFG_DRAM_TEST_DATA
|
||||
if (rundata == 1) {
|
||||
printf ("Test DATA ... ");
|
||||
if (mem_test_data () == 1) {
|
||||
printf ("failed \n");
|
||||
return 1;
|
||||
} else
|
||||
printf ("ok \n");
|
||||
}
|
||||
#endif
|
||||
#ifdef CFG_DRAM_TEST_ADDRESS
|
||||
if (runaddress == 1) {
|
||||
printf ("Test ADDRESS ... ");
|
||||
if (mem_test_address () == 1) {
|
||||
printf ("failed \n");
|
||||
return 1;
|
||||
} else
|
||||
printf ("ok \n");
|
||||
}
|
||||
#endif
|
||||
#ifdef CFG_DRAM_TEST_WALK
|
||||
if (runwalk == 1) {
|
||||
printf ("Test WALKING ONEs ... ");
|
||||
if (mem_test_walk () == 1) {
|
||||
printf ("failed \n");
|
||||
return 1;
|
||||
} else
|
||||
printf ("ok \n");
|
||||
}
|
||||
#endif
|
||||
if ((rundata == 1) || (runaddress == 1) || (runwalk == 1)) {
|
||||
printf ("passed\n");
|
||||
}
|
||||
return 0;
|
||||
|
||||
}
|
||||
#endif /* CFG_DRAM_TEST */
|
||||
|
||||
/* ronen - the below functions are used by the bootm function */
|
||||
/* - we map the base register to fbe00000 (same mapping as in the LSP) */
|
||||
/* - we turn off the RX gig dmas - to prevent the dma from overunning */
|
||||
/* the kernel data areas. */
|
||||
/* - we diable and invalidate the icache and dcache. */
|
||||
void my_remap_gt_regs_bootm (u32 cur_loc, u32 new_loc)
|
||||
{
|
||||
u32 temp;
|
||||
|
||||
temp = in_le32 ((u32 *) (new_loc + INTERNAL_SPACE_DECODE));
|
||||
if ((temp & 0xffff) == new_loc >> 16)
|
||||
return;
|
||||
|
||||
temp = (in_le32 ((u32 *) (cur_loc + INTERNAL_SPACE_DECODE)) &
|
||||
0xffff0000) | (new_loc >> 16);
|
||||
|
||||
out_le32 ((u32 *) (cur_loc + INTERNAL_SPACE_DECODE), temp);
|
||||
|
||||
while ((WORD_SWAP (*((volatile unsigned int *) (NONE_CACHEABLE |
|
||||
new_loc |
|
||||
(INTERNAL_SPACE_DECODE)))))
|
||||
!= temp);
|
||||
|
||||
}
|
||||
|
||||
void board_prebootm_init ()
|
||||
{
|
||||
|
||||
/* change window size of PCI1 IO in order tp prevent overlaping with REG BASE. */
|
||||
GT_REG_WRITE (PCI_1_IO_SIZE, (_64K - 1) >> 16);
|
||||
|
||||
/* Stop GigE Rx DMA engines */
|
||||
GT_REG_WRITE (MV64360_ETH_RECEIVE_QUEUE_COMMAND_REG (0), 0x0000ff00);
|
||||
GT_REG_WRITE (MV64360_ETH_RECEIVE_QUEUE_COMMAND_REG (1), 0x0000ff00);
|
||||
/* MV_REG_WRITE (MV64360_ETH_RECEIVE_QUEUE_COMMAND_REG(2), 0x0000ff00); */
|
||||
|
||||
/* Relocate MV64360 internal regs */
|
||||
my_remap_gt_regs_bootm (CFG_GT_REGS, BRIDGE_REG_BASE_BOOTM);
|
||||
|
||||
icache_disable ();
|
||||
invalidate_l1_instruction_cache ();
|
||||
flush_data_cache ();
|
||||
dcache_disable ();
|
||||
}
|
||||
43
board/Marvell/db64360/eth.h
Normal file
43
board/Marvell/db64360/eth.h
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* (C) Copyright 2001
|
||||
* Josh Huber <huber@mclx.com>, Mission Critical Linux, Inc.
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/*
|
||||
* eth.h - header file for the polled mode GT ethernet driver
|
||||
*/
|
||||
|
||||
#ifndef __EVB64360_ETH_H__
|
||||
#define __EVB64360_ETH_H__
|
||||
|
||||
#include <asm/types.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/byteorder.h>
|
||||
#include <common.h>
|
||||
|
||||
|
||||
int db64360_eth0_poll(void);
|
||||
int db64360_eth0_transmit(unsigned int s, volatile char *p);
|
||||
void db64360_eth0_disable(void);
|
||||
bool network_start(bd_t *bis);
|
||||
|
||||
|
||||
#endif /* __EVB64360_ETH_H__ */
|
||||
1017
board/Marvell/db64360/mpsc.c
Normal file
1017
board/Marvell/db64360/mpsc.c
Normal file
File diff suppressed because it is too large
Load Diff
156
board/Marvell/db64360/mpsc.h
Normal file
156
board/Marvell/db64360/mpsc.h
Normal file
@@ -0,0 +1,156 @@
|
||||
/*
|
||||
* (C) Copyright 2001
|
||||
* John Clemens <clemens@mclx.com>, Mission Critical Linux, Inc.
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/*************************************************************************
|
||||
* changes for Marvell DB64360 eval board 2003 by Ingo Assmus <ingo.assmus@keymile.com>
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
|
||||
/*
|
||||
* mpsc.h - header file for MPSC in uart mode (console driver)
|
||||
*/
|
||||
|
||||
#ifndef __MPSC_H__
|
||||
#define __MPSC_H__
|
||||
|
||||
/* include actual Galileo defines */
|
||||
#include "../include/mv_gen_reg.h"
|
||||
|
||||
/* driver related defines */
|
||||
|
||||
int mpsc_init(int baud);
|
||||
void mpsc_sdma_init(void);
|
||||
void mpsc_init2(void);
|
||||
int galbrg_set_baudrate(int channel, int rate);
|
||||
|
||||
int mpsc_putchar_early(char ch);
|
||||
char mpsc_getchar_debug(void);
|
||||
int mpsc_test_char_debug(void);
|
||||
|
||||
int mpsc_test_char_sdma(void);
|
||||
|
||||
extern int (*mpsc_putchar)(char ch);
|
||||
extern char (*mpsc_getchar)(void);
|
||||
extern int (*mpsc_test_char)(void);
|
||||
|
||||
#define CHANNEL CONFIG_MPSC_PORT
|
||||
|
||||
#define TX_DESC 5
|
||||
#define RX_DESC 20
|
||||
|
||||
#define DESC_FIRST 0x00010000
|
||||
#define DESC_LAST 0x00020000
|
||||
#define DESC_OWNER_BIT 0x80000000
|
||||
|
||||
#define TX_DEMAND 0x00800000
|
||||
#define TX_STOP 0x00010000
|
||||
#define RX_ENABLE 0x00000080
|
||||
|
||||
#define SDMA_RX_ABORT (1 << 15)
|
||||
#define SDMA_TX_ABORT (1 << 31)
|
||||
#define MPSC_TX_ABORT (1 << 7)
|
||||
#define MPSC_RX_ABORT (1 << 23)
|
||||
#define MPSC_ENTER_HUNT (1 << 31)
|
||||
|
||||
/* MPSC defines */
|
||||
|
||||
#define GALMPSC_CONNECT 0x1
|
||||
#define GALMPSC_DISCONNECT 0x0
|
||||
|
||||
#define GALMPSC_UART 0x1
|
||||
|
||||
#define GALMPSC_STOP_BITS_1 0x0
|
||||
#define GALMPSC_STOP_BITS_2 0x1
|
||||
#define GALMPSC_CHAR_LENGTH_8 0x3
|
||||
#define GALMPSC_CHAR_LENGTH_7 0x2
|
||||
|
||||
#define GALMPSC_PARITY_ODD 0x0
|
||||
#define GALMPSC_PARITY_EVEN 0x2
|
||||
#define GALMPSC_PARITY_MARK 0x3
|
||||
#define GALMPSC_PARITY_SPACE 0x1
|
||||
#define GALMPSC_PARITY_NONE -1
|
||||
|
||||
#define GALMPSC_SERIAL_MULTIPLEX SERIAL_PORT_MULTIPLEX /* 0xf010 */
|
||||
#define GALMPSC_ROUTING_REGISTER MAIN_ROUTING_REGISTER /* 0xb400 */
|
||||
#define GALMPSC_RxC_ROUTE RECEIVE_CLOCK_ROUTING_REGISTER /* 0xb404 */
|
||||
#define GALMPSC_TxC_ROUTE TRANSMIT_CLOCK_ROUTING_REGISTER /* 0xb408 */
|
||||
#define GALMPSC_MCONF_LOW MPSC0_MAIN_CONFIGURATION_LOW /* 0x8000 */
|
||||
#define GALMPSC_MCONF_HIGH MPSC0_MAIN_CONFIGURATION_HIGH /* 0x8004 */
|
||||
#define GALMPSC_PROTOCONF_REG MPSC0_PROTOCOL_CONFIGURATION /* 0x8008 */
|
||||
|
||||
#define GALMPSC_REG_GAP 0x1000
|
||||
|
||||
#define GALMPSC_MCONF_CHREG_BASE CHANNEL0_REGISTER1 /* 0x800c */
|
||||
#define GALMPSC_CHANNELREG_1 CHANNEL0_REGISTER1 /* 0x800c */
|
||||
#define GALMPSC_CHANNELREG_2 CHANNEL0_REGISTER2 /* 0x8010 */
|
||||
#define GALMPSC_CHANNELREG_3 CHANNEL0_REGISTER3 /* 0x8014 */
|
||||
#define GALMPSC_CHANNELREG_4 CHANNEL0_REGISTER4 /* 0x8018 */
|
||||
#define GALMPSC_CHANNELREG_5 CHANNEL0_REGISTER5 /* 0x801c */
|
||||
#define GALMPSC_CHANNELREG_6 CHANNEL0_REGISTER6 /* 0x8020 */
|
||||
#define GALMPSC_CHANNELREG_7 CHANNEL0_REGISTER7 /* 0x8024 */
|
||||
#define GALMPSC_CHANNELREG_8 CHANNEL0_REGISTER8 /* 0x8028 */
|
||||
#define GALMPSC_CHANNELREG_9 CHANNEL0_REGISTER9 /* 0x802c */
|
||||
#define GALMPSC_CHANNELREG_10 CHANNEL0_REGISTER10 /* 0x8030 */
|
||||
#define GALMPSC_CHANNELREG_11 CHANNEL0_REGISTER11 /* 0x8034 */
|
||||
|
||||
#define GALSDMA_COMMAND_FIRST (1 << 16)
|
||||
#define GALSDMA_COMMAND_LAST (1 << 17)
|
||||
#define GALSDMA_COMMAND_ENABLEINT (1 << 23)
|
||||
#define GALSDMA_COMMAND_AUTO (1 << 30)
|
||||
#define GALSDMA_COMMAND_OWNER (1 << 31)
|
||||
|
||||
#define GALSDMA_RX 0
|
||||
#define GALSDMA_TX 1
|
||||
|
||||
/* CHANNEL2 should be CHANNEL1, according to documentation,
|
||||
* but to work with the current GTREGS file...
|
||||
*/
|
||||
#define GALSDMA_0_CONF_REG CHANNEL0_CONFIGURATION_REGISTER /* 0x4000 */
|
||||
#define GALSDMA_1_CONF_REG CHANNEL2_CONFIGURATION_REGISTER /* 0x6000 */
|
||||
#define GALSDMA_0_COM_REG CHANNEL0_COMMAND_REGISTER /* 0x4008 */
|
||||
#define GALSDMA_1_COM_REG CHANNEL2_COMMAND_REGISTER /* 0x6008 */
|
||||
#define GALSDMA_0_CUR_RX_PTR CHANNEL0_CURRENT_RX_DESCRIPTOR_POINTER /* 0x4810 */
|
||||
#define GALSDMA_0_CUR_TX_PTR CHANNEL0_CURRENT_TX_DESCRIPTOR_POINTER /* 0x4c10 */
|
||||
#define GALSDMA_0_FIR_TX_PTR CHANNEL0_FIRST_TX_DESCRIPTOR_POINTER /* 0x4c14 */
|
||||
#define GALSDMA_1_CUR_RX_PTR CHANNEL2_CURRENT_RX_DESCRIPTOR_POINTER /* 0x6810 */
|
||||
#define GALSDMA_1_CUR_TX_PTR CHANNEL2_CURRENT_TX_DESCRIPTOR_POINTER /* 0x6c10 */
|
||||
#define GALSDMA_1_FIR_TX_PTR CHANNEL2_FIRST_TX_DESCRIPTOR_POINTER /* 0x6c14 */
|
||||
#define GALSDMA_REG_DIFF 0x2000
|
||||
|
||||
/* WRONG in gt64260R.h */
|
||||
#define GALSDMA_INT_CAUSE 0xb800 /* SDMA_CAUSE */
|
||||
#define GALSDMA_INT_MASK 0xb880 /* SDMA_MASK */
|
||||
#define GALMPSC_0_INT_CAUSE 0xb804
|
||||
#define GALMPSC_0_INT_MASK 0xb884
|
||||
|
||||
#define GALSDMA_MODE_UART 0
|
||||
#define GALSDMA_MODE_BISYNC 1
|
||||
#define GALSDMA_MODE_HDLC 2
|
||||
#define GALSDMA_MODE_TRANSPARENT 3
|
||||
|
||||
#define GALBRG_0_CONFREG BRG0_CONFIGURATION_REGISTER /* 0xb200 */
|
||||
#define GALBRG_REG_GAP 0x0008
|
||||
#define GALBRG_0_BTREG BRG0_BAUDE_TUNING_REGISTER /* 0xb204 */
|
||||
|
||||
#endif /* __MPSC_H__ */
|
||||
3184
board/Marvell/db64360/mv_eth.c
Normal file
3184
board/Marvell/db64360/mv_eth.c
Normal file
File diff suppressed because it is too large
Load Diff
844
board/Marvell/db64360/mv_eth.h
Normal file
844
board/Marvell/db64360/mv_eth.h
Normal file
@@ -0,0 +1,844 @@
|
||||
/*
|
||||
* (C) Copyright 2003
|
||||
* Ingo Assmus <ingo.assmus@keymile.com>
|
||||
*
|
||||
* based on - Driver for MV64360X ethernet ports
|
||||
* Copyright (C) 2002 rabeeh@galileo.co.il
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/*
|
||||
* mv_eth.h - header file for the polled mode GT ethernet driver
|
||||
*/
|
||||
|
||||
#ifndef __DB64360_ETH_H__
|
||||
#define __DB64360_ETH_H__
|
||||
|
||||
#include <asm/types.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/byteorder.h>
|
||||
#include <common.h>
|
||||
#include <net.h>
|
||||
#include "mv_regs.h"
|
||||
#include "../common/ppc_error_no.h"
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
**************************************************************************
|
||||
**************************************************************************
|
||||
* The first part is the high level driver of the gigE ethernet ports. *
|
||||
**************************************************************************
|
||||
**************************************************************************
|
||||
*************************************************************************/
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#endif
|
||||
#ifndef FALSE
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
/* In case not using SG on Tx, define MAX_SKB_FRAGS as 0 */
|
||||
#ifndef MAX_SKB_FRAGS
|
||||
#define MAX_SKB_FRAGS 0
|
||||
#endif
|
||||
|
||||
/* Port attributes */
|
||||
/*#define MAX_RX_QUEUE_NUM 8*/
|
||||
/*#define MAX_TX_QUEUE_NUM 8*/
|
||||
#define MAX_RX_QUEUE_NUM 1
|
||||
#define MAX_TX_QUEUE_NUM 1
|
||||
|
||||
|
||||
/* Use one TX queue and one RX queue */
|
||||
#define MV64360_TX_QUEUE_NUM 1
|
||||
#define MV64360_RX_QUEUE_NUM 1
|
||||
|
||||
/*
|
||||
* Number of RX / TX descriptors on RX / TX rings.
|
||||
* Note that allocating RX descriptors is done by allocating the RX
|
||||
* ring AND a preallocated RX buffers (skb's) for each descriptor.
|
||||
* The TX descriptors only allocates the TX descriptors ring,
|
||||
* with no pre allocated TX buffers (skb's are allocated by higher layers.
|
||||
*/
|
||||
|
||||
/* Default TX ring size is 10 descriptors */
|
||||
#ifdef CONFIG_MV64360_ETH_TXQUEUE_SIZE
|
||||
#define MV64360_TX_QUEUE_SIZE CONFIG_MV64360_ETH_TXQUEUE_SIZE
|
||||
#else
|
||||
#define MV64360_TX_QUEUE_SIZE 4
|
||||
#endif
|
||||
|
||||
/* Default RX ring size is 4 descriptors */
|
||||
#ifdef CONFIG_MV64360_ETH_RXQUEUE_SIZE
|
||||
#define MV64360_RX_QUEUE_SIZE CONFIG_MV64360_ETH_RXQUEUE_SIZE
|
||||
#else
|
||||
#define MV64360_RX_QUEUE_SIZE 4
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RX_BUFFER_SIZE
|
||||
#define MV64360_RX_BUFFER_SIZE CONFIG_RX_BUFFER_SIZE
|
||||
#else
|
||||
#define MV64360_RX_BUFFER_SIZE 1600
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TX_BUFFER_SIZE
|
||||
#define MV64360_TX_BUFFER_SIZE CONFIG_TX_BUFFER_SIZE
|
||||
#else
|
||||
#define MV64360_TX_BUFFER_SIZE 1600
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Network device statistics. Akin to the 2.0 ether stats but
|
||||
* with byte counters.
|
||||
*/
|
||||
|
||||
struct net_device_stats
|
||||
{
|
||||
unsigned long rx_packets; /* total packets received */
|
||||
unsigned long tx_packets; /* total packets transmitted */
|
||||
unsigned long rx_bytes; /* total bytes received */
|
||||
unsigned long tx_bytes; /* total bytes transmitted */
|
||||
unsigned long rx_errors; /* bad packets received */
|
||||
unsigned long tx_errors; /* packet transmit problems */
|
||||
unsigned long rx_dropped; /* no space in linux buffers */
|
||||
unsigned long tx_dropped; /* no space available in linux */
|
||||
unsigned long multicast; /* multicast packets received */
|
||||
unsigned long collisions;
|
||||
|
||||
/* detailed rx_errors: */
|
||||
unsigned long rx_length_errors;
|
||||
unsigned long rx_over_errors; /* receiver ring buff overflow */
|
||||
unsigned long rx_crc_errors; /* recved pkt with crc error */
|
||||
unsigned long rx_frame_errors; /* recv'd frame alignment error */
|
||||
unsigned long rx_fifo_errors; /* recv'r fifo overrun */
|
||||
unsigned long rx_missed_errors; /* receiver missed packet */
|
||||
|
||||
/* detailed tx_errors */
|
||||
unsigned long tx_aborted_errors;
|
||||
unsigned long tx_carrier_errors;
|
||||
unsigned long tx_fifo_errors;
|
||||
unsigned long tx_heartbeat_errors;
|
||||
unsigned long tx_window_errors;
|
||||
|
||||
/* for cslip etc */
|
||||
unsigned long rx_compressed;
|
||||
unsigned long tx_compressed;
|
||||
};
|
||||
|
||||
|
||||
/* Private data structure used for ethernet device */
|
||||
struct mv64360_eth_priv {
|
||||
unsigned int port_num;
|
||||
struct net_device_stats *stats;
|
||||
|
||||
/* to buffer area aligned */
|
||||
char * p_eth_tx_buffer[MV64360_TX_QUEUE_SIZE+1]; /*pointers to alligned tx buffs in memory space */
|
||||
char * p_eth_rx_buffer[MV64360_RX_QUEUE_SIZE+1]; /*pointers to allinged rx buffs in memory space */
|
||||
|
||||
/* Size of Tx Ring per queue */
|
||||
unsigned int tx_ring_size [MAX_TX_QUEUE_NUM];
|
||||
|
||||
|
||||
/* Size of Rx Ring per queue */
|
||||
unsigned int rx_ring_size [MAX_RX_QUEUE_NUM];
|
||||
|
||||
/* Magic Number for Ethernet running */
|
||||
unsigned int eth_running;
|
||||
|
||||
};
|
||||
|
||||
|
||||
int mv64360_eth_init (struct eth_device *dev);
|
||||
int mv64360_eth_stop (struct eth_device *dev);
|
||||
int mv64360_eth_start_xmit (struct eth_device*, volatile void* packet, int length);
|
||||
/* return db64360_eth0_poll(); */
|
||||
|
||||
int mv64360_eth_open (struct eth_device *dev);
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
**************************************************************************
|
||||
**************************************************************************
|
||||
* The second part is the low level driver of the gigE ethernet ports. *
|
||||
**************************************************************************
|
||||
**************************************************************************
|
||||
*************************************************************************/
|
||||
|
||||
|
||||
/********************************************************************************
|
||||
* Header File for : MV-643xx network interface header
|
||||
*
|
||||
* DESCRIPTION:
|
||||
* This header file contains macros typedefs and function declaration for
|
||||
* the Marvell Gig Bit Ethernet Controller.
|
||||
*
|
||||
* DEPENDENCIES:
|
||||
* None.
|
||||
*
|
||||
*******************************************************************************/
|
||||
|
||||
|
||||
#ifdef CONFIG_SPECIAL_CONSISTENT_MEMORY
|
||||
#ifdef CONFIG_MV64360_SRAM_CACHEABLE
|
||||
/* In case SRAM is cacheable but not cache coherent */
|
||||
#define D_CACHE_FLUSH_LINE(addr, offset) \
|
||||
{ \
|
||||
__asm__ __volatile__ ("dcbf %0,%1" : : "r" (addr), "r" (offset)); \
|
||||
}
|
||||
#else
|
||||
/* In case SRAM is cache coherent or non-cacheable */
|
||||
#define D_CACHE_FLUSH_LINE(addr, offset) ;
|
||||
#endif
|
||||
#else
|
||||
#ifdef CONFIG_NOT_COHERENT_CACHE
|
||||
/* In case of descriptors on DDR but not cache coherent */
|
||||
#define D_CACHE_FLUSH_LINE(addr, offset) \
|
||||
{ \
|
||||
__asm__ __volatile__ ("dcbf %0,%1" : : "r" (addr), "r" (offset)); \
|
||||
}
|
||||
#else
|
||||
/* In case of descriptors on DDR and cache coherent */
|
||||
#define D_CACHE_FLUSH_LINE(addr, offset) ;
|
||||
#endif /* CONFIG_NOT_COHERENT_CACHE */
|
||||
#endif /* CONFIG_SPECIAL_CONSISTENT_MEMORY */
|
||||
|
||||
|
||||
#define CPU_PIPE_FLUSH \
|
||||
{ \
|
||||
__asm__ __volatile__ ("eieio"); \
|
||||
}
|
||||
|
||||
|
||||
/* defines */
|
||||
|
||||
/* Default port configuration value */
|
||||
#define PORT_CONFIG_VALUE \
|
||||
ETH_UNICAST_NORMAL_MODE | \
|
||||
ETH_DEFAULT_RX_QUEUE_0 | \
|
||||
ETH_DEFAULT_RX_ARP_QUEUE_0 | \
|
||||
ETH_RECEIVE_BC_IF_NOT_IP_OR_ARP | \
|
||||
ETH_RECEIVE_BC_IF_IP | \
|
||||
ETH_RECEIVE_BC_IF_ARP | \
|
||||
ETH_CAPTURE_TCP_FRAMES_DIS | \
|
||||
ETH_CAPTURE_UDP_FRAMES_DIS | \
|
||||
ETH_DEFAULT_RX_TCP_QUEUE_0 | \
|
||||
ETH_DEFAULT_RX_UDP_QUEUE_0 | \
|
||||
ETH_DEFAULT_RX_BPDU_QUEUE_0
|
||||
|
||||
/* Default port extend configuration value */
|
||||
#define PORT_CONFIG_EXTEND_VALUE \
|
||||
ETH_SPAN_BPDU_PACKETS_AS_NORMAL | \
|
||||
ETH_PARTITION_DISABLE
|
||||
|
||||
|
||||
/* Default sdma control value */
|
||||
#ifdef CONFIG_NOT_COHERENT_CACHE
|
||||
#define PORT_SDMA_CONFIG_VALUE \
|
||||
ETH_RX_BURST_SIZE_16_64BIT | \
|
||||
GT_ETH_IPG_INT_RX(0) | \
|
||||
ETH_TX_BURST_SIZE_16_64BIT;
|
||||
#else
|
||||
#define PORT_SDMA_CONFIG_VALUE \
|
||||
ETH_RX_BURST_SIZE_4_64BIT | \
|
||||
GT_ETH_IPG_INT_RX(0) | \
|
||||
ETH_TX_BURST_SIZE_4_64BIT;
|
||||
#endif
|
||||
|
||||
#define GT_ETH_IPG_INT_RX(value) \
|
||||
((value & 0x3fff) << 8)
|
||||
|
||||
/* Default port serial control value */
|
||||
#define PORT_SERIAL_CONTROL_VALUE \
|
||||
ETH_FORCE_LINK_PASS | \
|
||||
ETH_ENABLE_AUTO_NEG_FOR_DUPLX | \
|
||||
ETH_DISABLE_AUTO_NEG_FOR_FLOW_CTRL | \
|
||||
ETH_ADV_SYMMETRIC_FLOW_CTRL | \
|
||||
ETH_FORCE_FC_MODE_NO_PAUSE_DIS_TX | \
|
||||
ETH_FORCE_BP_MODE_NO_JAM | \
|
||||
BIT9 | \
|
||||
ETH_DO_NOT_FORCE_LINK_FAIL | \
|
||||
ETH_RETRANSMIT_16_ETTEMPTS | \
|
||||
ETH_ENABLE_AUTO_NEG_SPEED_GMII | \
|
||||
ETH_DTE_ADV_0 | \
|
||||
ETH_DISABLE_AUTO_NEG_BYPASS | \
|
||||
ETH_AUTO_NEG_NO_CHANGE | \
|
||||
ETH_MAX_RX_PACKET_1552BYTE | \
|
||||
ETH_CLR_EXT_LOOPBACK | \
|
||||
ETH_SET_FULL_DUPLEX_MODE | \
|
||||
ETH_ENABLE_FLOW_CTRL_TX_RX_IN_FULL_DUPLEX;
|
||||
|
||||
#define RX_BUFFER_MAX_SIZE 0xFFFF
|
||||
#define TX_BUFFER_MAX_SIZE 0xFFFF /* Buffer are limited to 64k */
|
||||
|
||||
#define RX_BUFFER_MIN_SIZE 0x8
|
||||
#define TX_BUFFER_MIN_SIZE 0x8
|
||||
|
||||
/* Tx WRR confoguration macros */
|
||||
#define PORT_MAX_TRAN_UNIT 0x24 /* MTU register (default) 9KByte */
|
||||
#define PORT_MAX_TOKEN_BUCKET_SIZE 0x_fFFF /* PMTBS register (default) */
|
||||
#define PORT_TOKEN_RATE 1023 /* PTTBRC register (default) */
|
||||
|
||||
/* MAC accepet/reject macros */
|
||||
#define ACCEPT_MAC_ADDR 0
|
||||
#define REJECT_MAC_ADDR 1
|
||||
|
||||
/* Size of a Tx/Rx descriptor used in chain list data structure */
|
||||
#define RX_DESC_ALIGNED_SIZE 0x20
|
||||
#define TX_DESC_ALIGNED_SIZE 0x20
|
||||
|
||||
/* An offest in Tx descriptors to store data for buffers less than 8 Bytes */
|
||||
#define TX_BUF_OFFSET_IN_DESC 0x18
|
||||
/* Buffer offset from buffer pointer */
|
||||
#define RX_BUF_OFFSET 0x2
|
||||
|
||||
/* Gap define */
|
||||
#define ETH_BAR_GAP 0x8
|
||||
#define ETH_SIZE_REG_GAP 0x8
|
||||
#define ETH_HIGH_ADDR_REMAP_REG_GAP 0x4
|
||||
#define ETH_PORT_ACCESS_CTRL_GAP 0x4
|
||||
|
||||
/* Gigabit Ethernet Unit Global Registers */
|
||||
|
||||
/* MIB Counters register definitions */
|
||||
#define ETH_MIB_GOOD_OCTETS_RECEIVED_LOW 0x0
|
||||
#define ETH_MIB_GOOD_OCTETS_RECEIVED_HIGH 0x4
|
||||
#define ETH_MIB_BAD_OCTETS_RECEIVED 0x8
|
||||
#define ETH_MIB_INTERNAL_MAC_TRANSMIT_ERR 0xc
|
||||
#define ETH_MIB_GOOD_FRAMES_RECEIVED 0x10
|
||||
#define ETH_MIB_BAD_FRAMES_RECEIVED 0x14
|
||||
#define ETH_MIB_BROADCAST_FRAMES_RECEIVED 0x18
|
||||
#define ETH_MIB_MULTICAST_FRAMES_RECEIVED 0x1c
|
||||
#define ETH_MIB_FRAMES_64_OCTETS 0x20
|
||||
#define ETH_MIB_FRAMES_65_TO_127_OCTETS 0x24
|
||||
#define ETH_MIB_FRAMES_128_TO_255_OCTETS 0x28
|
||||
#define ETH_MIB_FRAMES_256_TO_511_OCTETS 0x2c
|
||||
#define ETH_MIB_FRAMES_512_TO_1023_OCTETS 0x30
|
||||
#define ETH_MIB_FRAMES_1024_TO_MAX_OCTETS 0x34
|
||||
#define ETH_MIB_GOOD_OCTETS_SENT_LOW 0x38
|
||||
#define ETH_MIB_GOOD_OCTETS_SENT_HIGH 0x3c
|
||||
#define ETH_MIB_GOOD_FRAMES_SENT 0x40
|
||||
#define ETH_MIB_EXCESSIVE_COLLISION 0x44
|
||||
#define ETH_MIB_MULTICAST_FRAMES_SENT 0x48
|
||||
#define ETH_MIB_BROADCAST_FRAMES_SENT 0x4c
|
||||
#define ETH_MIB_UNREC_MAC_CONTROL_RECEIVED 0x50
|
||||
#define ETH_MIB_FC_SENT 0x54
|
||||
#define ETH_MIB_GOOD_FC_RECEIVED 0x58
|
||||
#define ETH_MIB_BAD_FC_RECEIVED 0x5c
|
||||
#define ETH_MIB_UNDERSIZE_RECEIVED 0x60
|
||||
#define ETH_MIB_FRAGMENTS_RECEIVED 0x64
|
||||
#define ETH_MIB_OVERSIZE_RECEIVED 0x68
|
||||
#define ETH_MIB_JABBER_RECEIVED 0x6c
|
||||
#define ETH_MIB_MAC_RECEIVE_ERROR 0x70
|
||||
#define ETH_MIB_BAD_CRC_EVENT 0x74
|
||||
#define ETH_MIB_COLLISION 0x78
|
||||
#define ETH_MIB_LATE_COLLISION 0x7c
|
||||
|
||||
/* Port serial status reg (PSR) */
|
||||
#define ETH_INTERFACE_GMII_MII 0
|
||||
#define ETH_INTERFACE_PCM BIT0
|
||||
#define ETH_LINK_IS_DOWN 0
|
||||
#define ETH_LINK_IS_UP BIT1
|
||||
#define ETH_PORT_AT_HALF_DUPLEX 0
|
||||
#define ETH_PORT_AT_FULL_DUPLEX BIT2
|
||||
#define ETH_RX_FLOW_CTRL_DISABLED 0
|
||||
#define ETH_RX_FLOW_CTRL_ENBALED BIT3
|
||||
#define ETH_GMII_SPEED_100_10 0
|
||||
#define ETH_GMII_SPEED_1000 BIT4
|
||||
#define ETH_MII_SPEED_10 0
|
||||
#define ETH_MII_SPEED_100 BIT5
|
||||
#define ETH_NO_TX 0
|
||||
#define ETH_TX_IN_PROGRESS BIT7
|
||||
#define ETH_BYPASS_NO_ACTIVE 0
|
||||
#define ETH_BYPASS_ACTIVE BIT8
|
||||
#define ETH_PORT_NOT_AT_PARTITION_STATE 0
|
||||
#define ETH_PORT_AT_PARTITION_STATE BIT9
|
||||
#define ETH_PORT_TX_FIFO_NOT_EMPTY 0
|
||||
#define ETH_PORT_TX_FIFO_EMPTY BIT10
|
||||
|
||||
|
||||
/* These macros describes the Port configuration reg (Px_cR) bits */
|
||||
#define ETH_UNICAST_NORMAL_MODE 0
|
||||
#define ETH_UNICAST_PROMISCUOUS_MODE BIT0
|
||||
#define ETH_DEFAULT_RX_QUEUE_0 0
|
||||
#define ETH_DEFAULT_RX_QUEUE_1 BIT1
|
||||
#define ETH_DEFAULT_RX_QUEUE_2 BIT2
|
||||
#define ETH_DEFAULT_RX_QUEUE_3 (BIT2 | BIT1)
|
||||
#define ETH_DEFAULT_RX_QUEUE_4 BIT3
|
||||
#define ETH_DEFAULT_RX_QUEUE_5 (BIT3 | BIT1)
|
||||
#define ETH_DEFAULT_RX_QUEUE_6 (BIT3 | BIT2)
|
||||
#define ETH_DEFAULT_RX_QUEUE_7 (BIT3 | BIT2 | BIT1)
|
||||
#define ETH_DEFAULT_RX_ARP_QUEUE_0 0
|
||||
#define ETH_DEFAULT_RX_ARP_QUEUE_1 BIT4
|
||||
#define ETH_DEFAULT_RX_ARP_QUEUE_2 BIT5
|
||||
#define ETH_DEFAULT_RX_ARP_QUEUE_3 (BIT5 | BIT4)
|
||||
#define ETH_DEFAULT_RX_ARP_QUEUE_4 BIT6
|
||||
#define ETH_DEFAULT_RX_ARP_QUEUE_5 (BIT6 | BIT4)
|
||||
#define ETH_DEFAULT_RX_ARP_QUEUE_6 (BIT6 | BIT5)
|
||||
#define ETH_DEFAULT_RX_ARP_QUEUE_7 (BIT6 | BIT5 | BIT4)
|
||||
#define ETH_RECEIVE_BC_IF_NOT_IP_OR_ARP 0
|
||||
#define ETH_REJECT_BC_IF_NOT_IP_OR_ARP BIT7
|
||||
#define ETH_RECEIVE_BC_IF_IP 0
|
||||
#define ETH_REJECT_BC_IF_IP BIT8
|
||||
#define ETH_RECEIVE_BC_IF_ARP 0
|
||||
#define ETH_REJECT_BC_IF_ARP BIT9
|
||||
#define ETH_TX_AM_NO_UPDATE_ERROR_SUMMARY BIT12
|
||||
#define ETH_CAPTURE_TCP_FRAMES_DIS 0
|
||||
#define ETH_CAPTURE_TCP_FRAMES_EN BIT14
|
||||
#define ETH_CAPTURE_UDP_FRAMES_DIS 0
|
||||
#define ETH_CAPTURE_UDP_FRAMES_EN BIT15
|
||||
#define ETH_DEFAULT_RX_TCP_QUEUE_0 0
|
||||
#define ETH_DEFAULT_RX_TCP_QUEUE_1 BIT16
|
||||
#define ETH_DEFAULT_RX_TCP_QUEUE_2 BIT17
|
||||
#define ETH_DEFAULT_RX_TCP_QUEUE_3 (BIT17 | BIT16)
|
||||
#define ETH_DEFAULT_RX_TCP_QUEUE_4 BIT18
|
||||
#define ETH_DEFAULT_RX_TCP_QUEUE_5 (BIT18 | BIT16)
|
||||
#define ETH_DEFAULT_RX_TCP_QUEUE_6 (BIT18 | BIT17)
|
||||
#define ETH_DEFAULT_RX_TCP_QUEUE_7 (BIT18 | BIT17 | BIT16)
|
||||
#define ETH_DEFAULT_RX_UDP_QUEUE_0 0
|
||||
#define ETH_DEFAULT_RX_UDP_QUEUE_1 BIT19
|
||||
#define ETH_DEFAULT_RX_UDP_QUEUE_2 BIT20
|
||||
#define ETH_DEFAULT_RX_UDP_QUEUE_3 (BIT20 | BIT19)
|
||||
#define ETH_DEFAULT_RX_UDP_QUEUE_4 (BIT21
|
||||
#define ETH_DEFAULT_RX_UDP_QUEUE_5 (BIT21 | BIT19)
|
||||
#define ETH_DEFAULT_RX_UDP_QUEUE_6 (BIT21 | BIT20)
|
||||
#define ETH_DEFAULT_RX_UDP_QUEUE_7 (BIT21 | BIT20 | BIT19)
|
||||
#define ETH_DEFAULT_RX_BPDU_QUEUE_0 0
|
||||
#define ETH_DEFAULT_RX_BPDU_QUEUE_1 BIT22
|
||||
#define ETH_DEFAULT_RX_BPDU_QUEUE_2 BIT23
|
||||
#define ETH_DEFAULT_RX_BPDU_QUEUE_3 (BIT23 | BIT22)
|
||||
#define ETH_DEFAULT_RX_BPDU_QUEUE_4 BIT24
|
||||
#define ETH_DEFAULT_RX_BPDU_QUEUE_5 (BIT24 | BIT22)
|
||||
#define ETH_DEFAULT_RX_BPDU_QUEUE_6 (BIT24 | BIT23)
|
||||
#define ETH_DEFAULT_RX_BPDU_QUEUE_7 (BIT24 | BIT23 | BIT22)
|
||||
|
||||
|
||||
/* These macros describes the Port configuration extend reg (Px_cXR) bits*/
|
||||
#define ETH_CLASSIFY_EN BIT0
|
||||
#define ETH_SPAN_BPDU_PACKETS_AS_NORMAL 0
|
||||
#define ETH_SPAN_BPDU_PACKETS_TO_RX_QUEUE_7 BIT1
|
||||
#define ETH_PARTITION_DISABLE 0
|
||||
#define ETH_PARTITION_ENABLE BIT2
|
||||
|
||||
|
||||
/* Tx/Rx queue command reg (RQCR/TQCR)*/
|
||||
#define ETH_QUEUE_0_ENABLE BIT0
|
||||
#define ETH_QUEUE_1_ENABLE BIT1
|
||||
#define ETH_QUEUE_2_ENABLE BIT2
|
||||
#define ETH_QUEUE_3_ENABLE BIT3
|
||||
#define ETH_QUEUE_4_ENABLE BIT4
|
||||
#define ETH_QUEUE_5_ENABLE BIT5
|
||||
#define ETH_QUEUE_6_ENABLE BIT6
|
||||
#define ETH_QUEUE_7_ENABLE BIT7
|
||||
#define ETH_QUEUE_0_DISABLE BIT8
|
||||
#define ETH_QUEUE_1_DISABLE BIT9
|
||||
#define ETH_QUEUE_2_DISABLE BIT10
|
||||
#define ETH_QUEUE_3_DISABLE BIT11
|
||||
#define ETH_QUEUE_4_DISABLE BIT12
|
||||
#define ETH_QUEUE_5_DISABLE BIT13
|
||||
#define ETH_QUEUE_6_DISABLE BIT14
|
||||
#define ETH_QUEUE_7_DISABLE BIT15
|
||||
|
||||
|
||||
/* These macros describes the Port Sdma configuration reg (SDCR) bits */
|
||||
#define ETH_RIFB BIT0
|
||||
#define ETH_RX_BURST_SIZE_1_64BIT 0
|
||||
#define ETH_RX_BURST_SIZE_2_64BIT BIT1
|
||||
#define ETH_RX_BURST_SIZE_4_64BIT BIT2
|
||||
#define ETH_RX_BURST_SIZE_8_64BIT (BIT2 | BIT1)
|
||||
#define ETH_RX_BURST_SIZE_16_64BIT BIT3
|
||||
#define ETH_BLM_RX_NO_SWAP BIT4
|
||||
#define ETH_BLM_RX_BYTE_SWAP 0
|
||||
#define ETH_BLM_TX_NO_SWAP BIT5
|
||||
#define ETH_BLM_TX_BYTE_SWAP 0
|
||||
#define ETH_DESCRIPTORS_BYTE_SWAP BIT6
|
||||
#define ETH_DESCRIPTORS_NO_SWAP 0
|
||||
#define ETH_TX_BURST_SIZE_1_64BIT 0
|
||||
#define ETH_TX_BURST_SIZE_2_64BIT BIT22
|
||||
#define ETH_TX_BURST_SIZE_4_64BIT BIT23
|
||||
#define ETH_TX_BURST_SIZE_8_64BIT (BIT23 | BIT22)
|
||||
#define ETH_TX_BURST_SIZE_16_64BIT BIT24
|
||||
|
||||
|
||||
/* These macros describes the Port serial control reg (PSCR) bits */
|
||||
#define ETH_SERIAL_PORT_DISABLE 0
|
||||
#define ETH_SERIAL_PORT_ENABLE BIT0
|
||||
#define ETH_FORCE_LINK_PASS BIT1
|
||||
#define ETH_DO_NOT_FORCE_LINK_PASS 0
|
||||
#define ETH_ENABLE_AUTO_NEG_FOR_DUPLX 0
|
||||
#define ETH_DISABLE_AUTO_NEG_FOR_DUPLX BIT2
|
||||
#define ETH_ENABLE_AUTO_NEG_FOR_FLOW_CTRL 0
|
||||
#define ETH_DISABLE_AUTO_NEG_FOR_FLOW_CTRL BIT3
|
||||
#define ETH_ADV_NO_FLOW_CTRL 0
|
||||
#define ETH_ADV_SYMMETRIC_FLOW_CTRL BIT4
|
||||
#define ETH_FORCE_FC_MODE_NO_PAUSE_DIS_TX 0
|
||||
#define ETH_FORCE_FC_MODE_TX_PAUSE_DIS BIT5
|
||||
#define ETH_FORCE_BP_MODE_NO_JAM 0
|
||||
#define ETH_FORCE_BP_MODE_JAM_TX BIT7
|
||||
#define ETH_FORCE_BP_MODE_JAM_TX_ON_RX_ERR BIT8
|
||||
#define ETH_FORCE_LINK_FAIL 0
|
||||
#define ETH_DO_NOT_FORCE_LINK_FAIL BIT10
|
||||
#define ETH_RETRANSMIT_16_ETTEMPTS 0
|
||||
#define ETH_RETRANSMIT_FOREVER BIT11
|
||||
#define ETH_DISABLE_AUTO_NEG_SPEED_GMII BIT13
|
||||
#define ETH_ENABLE_AUTO_NEG_SPEED_GMII 0
|
||||
#define ETH_DTE_ADV_0 0
|
||||
#define ETH_DTE_ADV_1 BIT14
|
||||
#define ETH_DISABLE_AUTO_NEG_BYPASS 0
|
||||
#define ETH_ENABLE_AUTO_NEG_BYPASS BIT15
|
||||
#define ETH_AUTO_NEG_NO_CHANGE 0
|
||||
#define ETH_RESTART_AUTO_NEG BIT16
|
||||
#define ETH_MAX_RX_PACKET_1518BYTE 0
|
||||
#define ETH_MAX_RX_PACKET_1522BYTE BIT17
|
||||
#define ETH_MAX_RX_PACKET_1552BYTE BIT18
|
||||
#define ETH_MAX_RX_PACKET_9022BYTE (BIT18 | BIT17)
|
||||
#define ETH_MAX_RX_PACKET_9192BYTE BIT19
|
||||
#define ETH_MAX_RX_PACKET_9700BYTE (BIT19 | BIT17)
|
||||
#define ETH_SET_EXT_LOOPBACK BIT20
|
||||
#define ETH_CLR_EXT_LOOPBACK 0
|
||||
#define ETH_SET_FULL_DUPLEX_MODE BIT21
|
||||
#define ETH_SET_HALF_DUPLEX_MODE 0
|
||||
#define ETH_ENABLE_FLOW_CTRL_TX_RX_IN_FULL_DUPLEX BIT22
|
||||
#define ETH_DISABLE_FLOW_CTRL_TX_RX_IN_FULL_DUPLEX 0
|
||||
#define ETH_SET_GMII_SPEED_TO_10_100 0
|
||||
#define ETH_SET_GMII_SPEED_TO_1000 BIT23
|
||||
#define ETH_SET_MII_SPEED_TO_10 0
|
||||
#define ETH_SET_MII_SPEED_TO_100 BIT24
|
||||
|
||||
|
||||
/* SMI reg */
|
||||
#define ETH_SMI_BUSY BIT28 /* 0 - Write, 1 - Read */
|
||||
#define ETH_SMI_READ_VALID BIT27 /* 0 - Write, 1 - Read */
|
||||
#define ETH_SMI_OPCODE_WRITE 0 /* Completion of Read operation */
|
||||
#define ETH_SMI_OPCODE_READ BIT26 /* Operation is in progress */
|
||||
|
||||
/* SDMA command status fields macros */
|
||||
|
||||
/* Tx & Rx descriptors status */
|
||||
#define ETH_ERROR_SUMMARY (BIT0)
|
||||
|
||||
/* Tx & Rx descriptors command */
|
||||
#define ETH_BUFFER_OWNED_BY_DMA (BIT31)
|
||||
|
||||
/* Tx descriptors status */
|
||||
#define ETH_LC_ERROR (0 )
|
||||
#define ETH_UR_ERROR (BIT1 )
|
||||
#define ETH_RL_ERROR (BIT2 )
|
||||
#define ETH_LLC_SNAP_FORMAT (BIT9 )
|
||||
|
||||
/* Rx descriptors status */
|
||||
#define ETH_CRC_ERROR (0 )
|
||||
#define ETH_OVERRUN_ERROR (BIT1 )
|
||||
#define ETH_MAX_FRAME_LENGTH_ERROR (BIT2 )
|
||||
#define ETH_RESOURCE_ERROR ((BIT2 | BIT1))
|
||||
#define ETH_VLAN_TAGGED (BIT19)
|
||||
#define ETH_BPDU_FRAME (BIT20)
|
||||
#define ETH_TCP_FRAME_OVER_IP_V_4 (0 )
|
||||
#define ETH_UDP_FRAME_OVER_IP_V_4 (BIT21)
|
||||
#define ETH_OTHER_FRAME_TYPE (BIT22)
|
||||
#define ETH_LAYER_2_IS_ETH_V_2 (BIT23)
|
||||
#define ETH_FRAME_TYPE_IP_V_4 (BIT24)
|
||||
#define ETH_FRAME_HEADER_OK (BIT25)
|
||||
#define ETH_RX_LAST_DESC (BIT26)
|
||||
#define ETH_RX_FIRST_DESC (BIT27)
|
||||
#define ETH_UNKNOWN_DESTINATION_ADDR (BIT28)
|
||||
#define ETH_RX_ENABLE_INTERRUPT (BIT29)
|
||||
#define ETH_LAYER_4_CHECKSUM_OK (BIT30)
|
||||
|
||||
/* Rx descriptors byte count */
|
||||
#define ETH_FRAME_FRAGMENTED (BIT2)
|
||||
|
||||
/* Tx descriptors command */
|
||||
#define ETH_LAYER_4_CHECKSUM_FIRST_DESC (BIT10)
|
||||
#define ETH_FRAME_SET_TO_VLAN (BIT15)
|
||||
#define ETH_TCP_FRAME (0 )
|
||||
#define ETH_UDP_FRAME (BIT16)
|
||||
#define ETH_GEN_TCP_UDP_CHECKSUM (BIT17)
|
||||
#define ETH_GEN_IP_V_4_CHECKSUM (BIT18)
|
||||
#define ETH_ZERO_PADDING (BIT19)
|
||||
#define ETH_TX_LAST_DESC (BIT20)
|
||||
#define ETH_TX_FIRST_DESC (BIT21)
|
||||
#define ETH_GEN_CRC (BIT22)
|
||||
#define ETH_TX_ENABLE_INTERRUPT (BIT23)
|
||||
#define ETH_AUTO_MODE (BIT30)
|
||||
|
||||
/* Address decode parameters */
|
||||
/* Ethernet Base Address Register bits */
|
||||
#define EBAR_TARGET_DRAM 0x00000000
|
||||
#define EBAR_TARGET_DEVICE 0x00000001
|
||||
#define EBAR_TARGET_CBS 0x00000002
|
||||
#define EBAR_TARGET_PCI0 0x00000003
|
||||
#define EBAR_TARGET_PCI1 0x00000004
|
||||
#define EBAR_TARGET_CUNIT 0x00000005
|
||||
#define EBAR_TARGET_AUNIT 0x00000006
|
||||
#define EBAR_TARGET_GUNIT 0x00000007
|
||||
|
||||
/* Window attributes */
|
||||
#define EBAR_ATTR_DRAM_CS0 0x00000E00
|
||||
#define EBAR_ATTR_DRAM_CS1 0x00000D00
|
||||
#define EBAR_ATTR_DRAM_CS2 0x00000B00
|
||||
#define EBAR_ATTR_DRAM_CS3 0x00000700
|
||||
|
||||
/* DRAM Target interface */
|
||||
#define EBAR_ATTR_DRAM_NO_CACHE_COHERENCY 0x00000000
|
||||
#define EBAR_ATTR_DRAM_CACHE_COHERENCY_WT 0x00001000
|
||||
#define EBAR_ATTR_DRAM_CACHE_COHERENCY_WB 0x00002000
|
||||
|
||||
/* Device Bus Target interface */
|
||||
#define EBAR_ATTR_DEVICE_DEVCS0 0x00001E00
|
||||
#define EBAR_ATTR_DEVICE_DEVCS1 0x00001D00
|
||||
#define EBAR_ATTR_DEVICE_DEVCS2 0x00001B00
|
||||
#define EBAR_ATTR_DEVICE_DEVCS3 0x00001700
|
||||
#define EBAR_ATTR_DEVICE_BOOTCS3 0x00000F00
|
||||
|
||||
/* PCI Target interface */
|
||||
#define EBAR_ATTR_PCI_BYTE_SWAP 0x00000000
|
||||
#define EBAR_ATTR_PCI_NO_SWAP 0x00000100
|
||||
#define EBAR_ATTR_PCI_BYTE_WORD_SWAP 0x00000200
|
||||
#define EBAR_ATTR_PCI_WORD_SWAP 0x00000300
|
||||
#define EBAR_ATTR_PCI_NO_SNOOP_NOT_ASSERT 0x00000000
|
||||
#define EBAR_ATTR_PCI_NO_SNOOP_ASSERT 0x00000400
|
||||
#define EBAR_ATTR_PCI_IO_SPACE 0x00000000
|
||||
#define EBAR_ATTR_PCI_MEMORY_SPACE 0x00000800
|
||||
#define EBAR_ATTR_PCI_REQ64_FORCE 0x00000000
|
||||
#define EBAR_ATTR_PCI_REQ64_SIZE 0x00001000
|
||||
|
||||
/* CPU 60x bus or internal SRAM interface */
|
||||
#define EBAR_ATTR_CBS_SRAM_BLOCK0 0x00000000
|
||||
#define EBAR_ATTR_CBS_SRAM_BLOCK1 0x00000100
|
||||
#define EBAR_ATTR_CBS_SRAM 0x00000000
|
||||
#define EBAR_ATTR_CBS_CPU_BUS 0x00000800
|
||||
|
||||
/* Window access control */
|
||||
#define EWIN_ACCESS_NOT_ALLOWED 0
|
||||
#define EWIN_ACCESS_READ_ONLY BIT0
|
||||
#define EWIN_ACCESS_FULL (BIT1 | BIT0)
|
||||
#define EWIN0_ACCESS_MASK 0x0003
|
||||
#define EWIN1_ACCESS_MASK 0x000C
|
||||
#define EWIN2_ACCESS_MASK 0x0030
|
||||
#define EWIN3_ACCESS_MASK 0x00C0
|
||||
|
||||
/* typedefs */
|
||||
|
||||
typedef enum _eth_port
|
||||
{
|
||||
ETH_0 = 0,
|
||||
ETH_1 = 1,
|
||||
ETH_2 = 2
|
||||
}ETH_PORT;
|
||||
|
||||
typedef enum _eth_func_ret_status
|
||||
{
|
||||
ETH_OK, /* Returned as expected. */
|
||||
ETH_ERROR, /* Fundamental error. */
|
||||
ETH_RETRY, /* Could not process request. Try later. */
|
||||
ETH_END_OF_JOB, /* Ring has nothing to process. */
|
||||
ETH_QUEUE_FULL, /* Ring resource error. */
|
||||
ETH_QUEUE_LAST_RESOURCE /* Ring resources about to exhaust. */
|
||||
}ETH_FUNC_RET_STATUS;
|
||||
|
||||
typedef enum _eth_queue
|
||||
{
|
||||
ETH_Q0 = 0,
|
||||
ETH_Q1 = 1,
|
||||
ETH_Q2 = 2,
|
||||
ETH_Q3 = 3,
|
||||
ETH_Q4 = 4,
|
||||
ETH_Q5 = 5,
|
||||
ETH_Q6 = 6,
|
||||
ETH_Q7 = 7
|
||||
} ETH_QUEUE;
|
||||
|
||||
typedef enum _addr_win
|
||||
{
|
||||
ETH_WIN0,
|
||||
ETH_WIN1,
|
||||
ETH_WIN2,
|
||||
ETH_WIN3,
|
||||
ETH_WIN4,
|
||||
ETH_WIN5
|
||||
} ETH_ADDR_WIN;
|
||||
|
||||
typedef enum _eth_target
|
||||
{
|
||||
ETH_TARGET_DRAM ,
|
||||
ETH_TARGET_DEVICE,
|
||||
ETH_TARGET_CBS ,
|
||||
ETH_TARGET_PCI0 ,
|
||||
ETH_TARGET_PCI1
|
||||
}ETH_TARGET;
|
||||
|
||||
typedef struct _eth_rx_desc
|
||||
{
|
||||
unsigned short byte_cnt ; /* Descriptor buffer byte count */
|
||||
unsigned short buf_size ; /* Buffer size */
|
||||
unsigned int cmd_sts ; /* Descriptor command status */
|
||||
unsigned int next_desc_ptr; /* Next descriptor pointer */
|
||||
unsigned int buf_ptr ; /* Descriptor buffer pointer */
|
||||
unsigned int return_info ; /* User resource return information */
|
||||
} ETH_RX_DESC;
|
||||
|
||||
|
||||
typedef struct _eth_tx_desc
|
||||
{
|
||||
unsigned short byte_cnt ; /* Descriptor buffer byte count */
|
||||
unsigned short l4i_chk ; /* CPU provided TCP Checksum */
|
||||
unsigned int cmd_sts ; /* Descriptor command status */
|
||||
unsigned int next_desc_ptr; /* Next descriptor pointer */
|
||||
unsigned int buf_ptr ; /* Descriptor buffer pointer */
|
||||
unsigned int return_info ; /* User resource return information */
|
||||
} ETH_TX_DESC;
|
||||
|
||||
/* Unified struct for Rx and Tx operations. The user is not required to */
|
||||
/* be familier with neither Tx nor Rx descriptors. */
|
||||
typedef struct _pkt_info
|
||||
{
|
||||
unsigned short byte_cnt ; /* Descriptor buffer byte count */
|
||||
unsigned short l4i_chk ; /* Tx CPU provided TCP Checksum */
|
||||
unsigned int cmd_sts ; /* Descriptor command status */
|
||||
unsigned int buf_ptr ; /* Descriptor buffer pointer */
|
||||
unsigned int return_info ; /* User resource return information */
|
||||
} PKT_INFO;
|
||||
|
||||
|
||||
typedef struct _eth_win_param
|
||||
{
|
||||
ETH_ADDR_WIN win; /* Window number. See ETH_ADDR_WIN enum */
|
||||
ETH_TARGET target; /* System targets. See ETH_TARGET enum */
|
||||
unsigned short attributes; /* BAR attributes. See above macros. */
|
||||
unsigned int base_addr; /* Window base address in unsigned int form */
|
||||
unsigned int high_addr; /* Window high address in unsigned int form */
|
||||
unsigned int size; /* Size in MBytes. Must be % 64Kbyte. */
|
||||
bool enable; /* Enable/disable access to the window. */
|
||||
unsigned short access_ctrl; /* Access ctrl register. see above macros */
|
||||
} ETH_WIN_PARAM;
|
||||
|
||||
|
||||
/* Ethernet port specific infomation */
|
||||
|
||||
typedef struct _eth_port_ctrl
|
||||
{
|
||||
ETH_PORT port_num; /* User Ethernet port number */
|
||||
int port_phy_addr; /* User phy address of Ethrnet port */
|
||||
unsigned char port_mac_addr[6]; /* User defined port MAC address. */
|
||||
unsigned int port_config; /* User port configuration value */
|
||||
unsigned int port_config_extend; /* User port config extend value */
|
||||
unsigned int port_sdma_config; /* User port SDMA config value */
|
||||
unsigned int port_serial_control; /* User port serial control value */
|
||||
unsigned int port_tx_queue_command; /* Port active Tx queues summary */
|
||||
unsigned int port_rx_queue_command; /* Port active Rx queues summary */
|
||||
|
||||
/* User function to cast virtual address to CPU bus address */
|
||||
unsigned int (*port_virt_to_phys)(unsigned int addr);
|
||||
/* User scratch pad for user specific data structures */
|
||||
void *port_private;
|
||||
|
||||
bool rx_resource_err[MAX_RX_QUEUE_NUM]; /* Rx ring resource error flag */
|
||||
bool tx_resource_err[MAX_TX_QUEUE_NUM]; /* Tx ring resource error flag */
|
||||
|
||||
/* Tx/Rx rings managment indexes fields. For driver use */
|
||||
|
||||
/* Next available Rx resource */
|
||||
volatile ETH_RX_DESC *p_rx_curr_desc_q[MAX_RX_QUEUE_NUM];
|
||||
/* Returning Rx resource */
|
||||
volatile ETH_RX_DESC *p_rx_used_desc_q[MAX_RX_QUEUE_NUM];
|
||||
|
||||
/* Next available Tx resource */
|
||||
volatile ETH_TX_DESC *p_tx_curr_desc_q[MAX_TX_QUEUE_NUM];
|
||||
/* Returning Tx resource */
|
||||
volatile ETH_TX_DESC *p_tx_used_desc_q[MAX_TX_QUEUE_NUM];
|
||||
/* An extra Tx index to support transmit of multiple buffers per packet */
|
||||
volatile ETH_TX_DESC *p_tx_first_desc_q[MAX_TX_QUEUE_NUM];
|
||||
|
||||
/* Tx/Rx rings size and base variables fields. For driver use */
|
||||
|
||||
volatile ETH_RX_DESC *p_rx_desc_area_base[MAX_RX_QUEUE_NUM];
|
||||
unsigned int rx_desc_area_size[MAX_RX_QUEUE_NUM];
|
||||
char *p_rx_buffer_base[MAX_RX_QUEUE_NUM];
|
||||
|
||||
volatile ETH_TX_DESC *p_tx_desc_area_base[MAX_TX_QUEUE_NUM];
|
||||
unsigned int tx_desc_area_size[MAX_TX_QUEUE_NUM];
|
||||
char *p_tx_buffer_base[MAX_TX_QUEUE_NUM];
|
||||
|
||||
} ETH_PORT_INFO;
|
||||
|
||||
|
||||
/* ethernet.h API list */
|
||||
|
||||
/* Port operation control routines */
|
||||
static void eth_port_init (ETH_PORT_INFO *p_eth_port_ctrl);
|
||||
static void eth_port_reset(ETH_PORT eth_port_num);
|
||||
static bool eth_port_start(ETH_PORT_INFO *p_eth_port_ctrl);
|
||||
|
||||
|
||||
/* Port MAC address routines */
|
||||
static void eth_port_uc_addr_set (ETH_PORT eth_port_num,
|
||||
unsigned char *p_addr,
|
||||
ETH_QUEUE queue);
|
||||
#if 0 /* FIXME */
|
||||
static void eth_port_mc_addr (ETH_PORT eth_port_num,
|
||||
unsigned char *p_addr,
|
||||
ETH_QUEUE queue,
|
||||
int option);
|
||||
#endif
|
||||
|
||||
/* PHY and MIB routines */
|
||||
static bool ethernet_phy_reset(ETH_PORT eth_port_num);
|
||||
|
||||
static bool eth_port_write_smi_reg(ETH_PORT eth_port_num,
|
||||
unsigned int phy_reg,
|
||||
unsigned int value);
|
||||
|
||||
static bool eth_port_read_smi_reg(ETH_PORT eth_port_num,
|
||||
unsigned int phy_reg,
|
||||
unsigned int* value);
|
||||
|
||||
static void eth_clear_mib_counters(ETH_PORT eth_port_num);
|
||||
|
||||
/* Port data flow control routines */
|
||||
static ETH_FUNC_RET_STATUS eth_port_send (ETH_PORT_INFO *p_eth_port_ctrl,
|
||||
ETH_QUEUE tx_queue,
|
||||
PKT_INFO *p_pkt_info);
|
||||
static ETH_FUNC_RET_STATUS eth_tx_return_desc(ETH_PORT_INFO *p_eth_port_ctrl,
|
||||
ETH_QUEUE tx_queue,
|
||||
PKT_INFO *p_pkt_info);
|
||||
static ETH_FUNC_RET_STATUS eth_port_receive (ETH_PORT_INFO *p_eth_port_ctrl,
|
||||
ETH_QUEUE rx_queue,
|
||||
PKT_INFO *p_pkt_info);
|
||||
static ETH_FUNC_RET_STATUS eth_rx_return_buff(ETH_PORT_INFO *p_eth_port_ctrl,
|
||||
ETH_QUEUE rx_queue,
|
||||
PKT_INFO *p_pkt_info);
|
||||
|
||||
|
||||
static bool ether_init_tx_desc_ring(ETH_PORT_INFO *p_eth_port_ctrl,
|
||||
ETH_QUEUE tx_queue,
|
||||
int tx_desc_num,
|
||||
int tx_buff_size,
|
||||
unsigned int tx_desc_base_addr,
|
||||
unsigned int tx_buff_base_addr);
|
||||
|
||||
static bool ether_init_rx_desc_ring(ETH_PORT_INFO *p_eth_port_ctrl,
|
||||
ETH_QUEUE rx_queue,
|
||||
int rx_desc_num,
|
||||
int rx_buff_size,
|
||||
unsigned int rx_desc_base_addr,
|
||||
unsigned int rx_buff_base_addr);
|
||||
|
||||
#endif /* MV64360_ETH_ */
|
||||
1124
board/Marvell/db64360/mv_regs.h
Normal file
1124
board/Marvell/db64360/mv_regs.h
Normal file
File diff suppressed because it is too large
Load Diff
940
board/Marvell/db64360/pci.c
Normal file
940
board/Marvell/db64360/pci.c
Normal file
@@ -0,0 +1,940 @@
|
||||
/*
|
||||
* (C) Copyright 2000
|
||||
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
/* PCI.c - PCI functions */
|
||||
|
||||
|
||||
#include <common.h>
|
||||
#include <pci.h>
|
||||
|
||||
#include "../include/pci.h"
|
||||
|
||||
#undef DEBUG
|
||||
#undef IDE_SET_NATIVE_MODE
|
||||
static unsigned int local_buses[] = { 0, 0 };
|
||||
|
||||
static const unsigned char pci_irq_swizzle[2][PCI_MAX_DEVICES] = {
|
||||
{0, 0, 0, 0, 0, 0, 0, 27, 27, [9 ... PCI_MAX_DEVICES - 1] = 0 },
|
||||
{0, 0, 0, 0, 0, 0, 0, 29, 29, [9 ... PCI_MAX_DEVICES - 1] = 0 },
|
||||
};
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
static const unsigned int pci_bus_list[] = { PCI_0_MODE, PCI_1_MODE };
|
||||
static void gt_pci_bus_mode_display (PCI_HOST host)
|
||||
{
|
||||
unsigned int mode;
|
||||
|
||||
|
||||
mode = (GTREGREAD (pci_bus_list[host]) & (BIT4 | BIT5)) >> 4;
|
||||
switch (mode) {
|
||||
case 0:
|
||||
printf ("PCI %d bus mode: Conventional PCI\n", host);
|
||||
break;
|
||||
case 1:
|
||||
printf ("PCI %d bus mode: 66 Mhz PCIX\n", host);
|
||||
break;
|
||||
case 2:
|
||||
printf ("PCI %d bus mode: 100 Mhz PCIX\n", host);
|
||||
break;
|
||||
case 3:
|
||||
printf ("PCI %d bus mode: 133 Mhz PCIX\n", host);
|
||||
break;
|
||||
default:
|
||||
printf ("Unknown BUS %d\n", mode);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static const unsigned int pci_p2p_configuration_reg[] = {
|
||||
PCI_0P2P_CONFIGURATION, PCI_1P2P_CONFIGURATION
|
||||
};
|
||||
|
||||
static const unsigned int pci_configuration_address[] = {
|
||||
PCI_0CONFIGURATION_ADDRESS, PCI_1CONFIGURATION_ADDRESS
|
||||
};
|
||||
|
||||
static const unsigned int pci_configuration_data[] = {
|
||||
PCI_0CONFIGURATION_DATA_VIRTUAL_REGISTER,
|
||||
PCI_1CONFIGURATION_DATA_VIRTUAL_REGISTER
|
||||
};
|
||||
|
||||
static const unsigned int pci_error_cause_reg[] = {
|
||||
PCI_0ERROR_CAUSE, PCI_1ERROR_CAUSE
|
||||
};
|
||||
|
||||
static const unsigned int pci_arbiter_control[] = {
|
||||
PCI_0ARBITER_CONTROL, PCI_1ARBITER_CONTROL
|
||||
};
|
||||
|
||||
static const unsigned int pci_address_space_en[] = {
|
||||
PCI_0_BASE_ADDR_REG_ENABLE, PCI_1_BASE_ADDR_REG_ENABLE
|
||||
};
|
||||
|
||||
static const unsigned int pci_snoop_control_base_0_low[] = {
|
||||
PCI_0SNOOP_CONTROL_BASE_0_LOW, PCI_1SNOOP_CONTROL_BASE_0_LOW
|
||||
};
|
||||
static const unsigned int pci_snoop_control_top_0[] = {
|
||||
PCI_0SNOOP_CONTROL_TOP_0, PCI_1SNOOP_CONTROL_TOP_0
|
||||
};
|
||||
|
||||
static const unsigned int pci_access_control_base_0_low[] = {
|
||||
PCI_0ACCESS_CONTROL_BASE_0_LOW, PCI_1ACCESS_CONTROL_BASE_0_LOW
|
||||
};
|
||||
static const unsigned int pci_access_control_top_0[] = {
|
||||
PCI_0ACCESS_CONTROL_TOP_0, PCI_1ACCESS_CONTROL_TOP_0
|
||||
};
|
||||
|
||||
static const unsigned int pci_scs_bank_size[2][4] = {
|
||||
{PCI_0SCS_0_BANK_SIZE, PCI_0SCS_1_BANK_SIZE,
|
||||
PCI_0SCS_2_BANK_SIZE, PCI_0SCS_3_BANK_SIZE},
|
||||
{PCI_1SCS_0_BANK_SIZE, PCI_1SCS_1_BANK_SIZE,
|
||||
PCI_1SCS_2_BANK_SIZE, PCI_1SCS_3_BANK_SIZE}
|
||||
};
|
||||
|
||||
static const unsigned int pci_p2p_configuration[] = {
|
||||
PCI_0P2P_CONFIGURATION, PCI_1P2P_CONFIGURATION
|
||||
};
|
||||
|
||||
|
||||
/********************************************************************
|
||||
* pciWriteConfigReg - Write to a PCI configuration register
|
||||
* - Make sure the GT is configured as a master before writing
|
||||
* to another device on the PCI.
|
||||
* - The function takes care of Big/Little endian conversion.
|
||||
*
|
||||
*
|
||||
* Inputs: unsigned int regOffset: The register offset as it apears in the GT spec
|
||||
* (or any other PCI device spec)
|
||||
* pciDevNum: The device number needs to be addressed.
|
||||
*
|
||||
* Configuration Address 0xCF8:
|
||||
*
|
||||
* 31 30 24 23 16 15 11 10 8 7 2 0 <=bit Number
|
||||
* |congif|Reserved| Bus |Device|Function|Register|00|
|
||||
* |Enable| |Number|Number| Number | Number | | <=field Name
|
||||
*
|
||||
*********************************************************************/
|
||||
void pciWriteConfigReg (PCI_HOST host, unsigned int regOffset,
|
||||
unsigned int pciDevNum, unsigned int data)
|
||||
{
|
||||
volatile unsigned int DataForAddrReg;
|
||||
unsigned int functionNum;
|
||||
unsigned int busNum = 0;
|
||||
unsigned int addr;
|
||||
|
||||
if (pciDevNum > 32) /* illegal device Number */
|
||||
return;
|
||||
if (pciDevNum == SELF) { /* configure our configuration space. */
|
||||
pciDevNum =
|
||||
(GTREGREAD (pci_p2p_configuration_reg[host]) >> 24) &
|
||||
0x1f;
|
||||
busNum = GTREGREAD (pci_p2p_configuration_reg[host]) &
|
||||
0xff0000;
|
||||
}
|
||||
functionNum = regOffset & 0x00000700;
|
||||
pciDevNum = pciDevNum << 11;
|
||||
regOffset = regOffset & 0xfc;
|
||||
DataForAddrReg =
|
||||
(regOffset | pciDevNum | functionNum | busNum) | BIT31;
|
||||
GT_REG_WRITE (pci_configuration_address[host], DataForAddrReg);
|
||||
GT_REG_READ (pci_configuration_address[host], &addr);
|
||||
if (addr != DataForAddrReg)
|
||||
return;
|
||||
GT_REG_WRITE (pci_configuration_data[host], data);
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
* pciReadConfigReg - Read from a PCI0 configuration register
|
||||
* - Make sure the GT is configured as a master before reading
|
||||
* from another device on the PCI.
|
||||
* - The function takes care of Big/Little endian conversion.
|
||||
* INPUTS: regOffset: The register offset as it apears in the GT spec (or PCI
|
||||
* spec)
|
||||
* pciDevNum: The device number needs to be addressed.
|
||||
* RETURNS: data , if the data == 0xffffffff check the master abort bit in the
|
||||
* cause register to make sure the data is valid
|
||||
*
|
||||
* Configuration Address 0xCF8:
|
||||
*
|
||||
* 31 30 24 23 16 15 11 10 8 7 2 0 <=bit Number
|
||||
* |congif|Reserved| Bus |Device|Function|Register|00|
|
||||
* |Enable| |Number|Number| Number | Number | | <=field Name
|
||||
*
|
||||
*********************************************************************/
|
||||
unsigned int pciReadConfigReg (PCI_HOST host, unsigned int regOffset,
|
||||
unsigned int pciDevNum)
|
||||
{
|
||||
volatile unsigned int DataForAddrReg;
|
||||
unsigned int data;
|
||||
unsigned int functionNum;
|
||||
unsigned int busNum = 0;
|
||||
|
||||
if (pciDevNum > 32) /* illegal device Number */
|
||||
return 0xffffffff;
|
||||
if (pciDevNum == SELF) { /* configure our configuration space. */
|
||||
pciDevNum =
|
||||
(GTREGREAD (pci_p2p_configuration_reg[host]) >> 24) &
|
||||
0x1f;
|
||||
busNum = GTREGREAD (pci_p2p_configuration_reg[host]) &
|
||||
0xff0000;
|
||||
}
|
||||
functionNum = regOffset & 0x00000700;
|
||||
pciDevNum = pciDevNum << 11;
|
||||
regOffset = regOffset & 0xfc;
|
||||
DataForAddrReg =
|
||||
(regOffset | pciDevNum | functionNum | busNum) | BIT31;
|
||||
GT_REG_WRITE (pci_configuration_address[host], DataForAddrReg);
|
||||
GT_REG_READ (pci_configuration_address[host], &data);
|
||||
if (data != DataForAddrReg)
|
||||
return 0xffffffff;
|
||||
GT_REG_READ (pci_configuration_data[host], &data);
|
||||
return data;
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
* pciOverBridgeWriteConfigReg - Write to a PCI configuration register where
|
||||
* the agent is placed on another Bus. For more
|
||||
* information read P2P in the PCI spec.
|
||||
*
|
||||
* Inputs: unsigned int regOffset - The register offset as it apears in the
|
||||
* GT spec (or any other PCI device spec).
|
||||
* unsigned int pciDevNum - The device number needs to be addressed.
|
||||
* unsigned int busNum - On which bus does the Target agent connect
|
||||
* to.
|
||||
* unsigned int data - data to be written.
|
||||
*
|
||||
* Configuration Address 0xCF8:
|
||||
*
|
||||
* 31 30 24 23 16 15 11 10 8 7 2 0 <=bit Number
|
||||
* |congif|Reserved| Bus |Device|Function|Register|01|
|
||||
* |Enable| |Number|Number| Number | Number | | <=field Name
|
||||
*
|
||||
* The configuration Address is configure as type-I (bits[1:0] = '01') due to
|
||||
* PCI spec referring to P2P.
|
||||
*
|
||||
*********************************************************************/
|
||||
void pciOverBridgeWriteConfigReg (PCI_HOST host,
|
||||
unsigned int regOffset,
|
||||
unsigned int pciDevNum,
|
||||
unsigned int busNum, unsigned int data)
|
||||
{
|
||||
unsigned int DataForReg;
|
||||
unsigned int functionNum;
|
||||
|
||||
functionNum = regOffset & 0x00000700;
|
||||
pciDevNum = pciDevNum << 11;
|
||||
regOffset = regOffset & 0xff;
|
||||
busNum = busNum << 16;
|
||||
if (pciDevNum == SELF) { /* This board */
|
||||
DataForReg = (regOffset | pciDevNum | functionNum) | BIT0;
|
||||
} else {
|
||||
DataForReg = (regOffset | pciDevNum | functionNum | busNum) |
|
||||
BIT31 | BIT0;
|
||||
}
|
||||
GT_REG_WRITE (pci_configuration_address[host], DataForReg);
|
||||
GT_REG_WRITE (pci_configuration_data[host], data);
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************
|
||||
* pciOverBridgeReadConfigReg - Read from a PCIn configuration register where
|
||||
* the agent target locate on another PCI bus.
|
||||
* - Make sure the GT is configured as a master
|
||||
* before reading from another device on the PCI.
|
||||
* - The function takes care of Big/Little endian
|
||||
* conversion.
|
||||
* INPUTS: regOffset: The register offset as it apears in the GT spec (or PCI
|
||||
* spec). (configuration register offset.)
|
||||
* pciDevNum: The device number needs to be addressed.
|
||||
* busNum: the Bus number where the agent is place.
|
||||
* RETURNS: data , if the data == 0xffffffff check the master abort bit in the
|
||||
* cause register to make sure the data is valid
|
||||
*
|
||||
* Configuration Address 0xCF8:
|
||||
*
|
||||
* 31 30 24 23 16 15 11 10 8 7 2 0 <=bit Number
|
||||
* |congif|Reserved| Bus |Device|Function|Register|01|
|
||||
* |Enable| |Number|Number| Number | Number | | <=field Name
|
||||
*
|
||||
*********************************************************************/
|
||||
unsigned int pciOverBridgeReadConfigReg (PCI_HOST host,
|
||||
unsigned int regOffset,
|
||||
unsigned int pciDevNum,
|
||||
unsigned int busNum)
|
||||
{
|
||||
unsigned int DataForReg;
|
||||
unsigned int data;
|
||||
unsigned int functionNum;
|
||||
|
||||
functionNum = regOffset & 0x00000700;
|
||||
pciDevNum = pciDevNum << 11;
|
||||
regOffset = regOffset & 0xff;
|
||||
busNum = busNum << 16;
|
||||
if (pciDevNum == SELF) { /* This board */
|
||||
DataForReg = (regOffset | pciDevNum | functionNum) | BIT31;
|
||||
} else { /* agent on another bus */
|
||||
|
||||
DataForReg = (regOffset | pciDevNum | functionNum | busNum) |
|
||||
BIT0 | BIT31;
|
||||
}
|
||||
GT_REG_WRITE (pci_configuration_address[host], DataForReg);
|
||||
GT_REG_READ (pci_configuration_data[host], &data);
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************
|
||||
* pciGetRegOffset - Gets the register offset for this region config.
|
||||
*
|
||||
* INPUT: Bus, Region - The bus and region we ask for its base address.
|
||||
* OUTPUT: N/A
|
||||
* RETURNS: PCI register base address
|
||||
*********************************************************************/
|
||||
static unsigned int pciGetRegOffset (PCI_HOST host, PCI_REGION region)
|
||||
{
|
||||
switch (host) {
|
||||
case PCI_HOST0:
|
||||
switch (region) {
|
||||
case PCI_IO:
|
||||
return PCI_0I_O_LOW_DECODE_ADDRESS;
|
||||
case PCI_REGION0:
|
||||
return PCI_0MEMORY0_LOW_DECODE_ADDRESS;
|
||||
case PCI_REGION1:
|
||||
return PCI_0MEMORY1_LOW_DECODE_ADDRESS;
|
||||
case PCI_REGION2:
|
||||
return PCI_0MEMORY2_LOW_DECODE_ADDRESS;
|
||||
case PCI_REGION3:
|
||||
return PCI_0MEMORY3_LOW_DECODE_ADDRESS;
|
||||
}
|
||||
case PCI_HOST1:
|
||||
switch (region) {
|
||||
case PCI_IO:
|
||||
return PCI_1I_O_LOW_DECODE_ADDRESS;
|
||||
case PCI_REGION0:
|
||||
return PCI_1MEMORY0_LOW_DECODE_ADDRESS;
|
||||
case PCI_REGION1:
|
||||
return PCI_1MEMORY1_LOW_DECODE_ADDRESS;
|
||||
case PCI_REGION2:
|
||||
return PCI_1MEMORY2_LOW_DECODE_ADDRESS;
|
||||
case PCI_REGION3:
|
||||
return PCI_1MEMORY3_LOW_DECODE_ADDRESS;
|
||||
}
|
||||
}
|
||||
return PCI_0MEMORY0_LOW_DECODE_ADDRESS;
|
||||
}
|
||||
|
||||
static unsigned int pciGetRemapOffset (PCI_HOST host, PCI_REGION region)
|
||||
{
|
||||
switch (host) {
|
||||
case PCI_HOST0:
|
||||
switch (region) {
|
||||
case PCI_IO:
|
||||
return PCI_0I_O_ADDRESS_REMAP;
|
||||
case PCI_REGION0:
|
||||
return PCI_0MEMORY0_ADDRESS_REMAP;
|
||||
case PCI_REGION1:
|
||||
return PCI_0MEMORY1_ADDRESS_REMAP;
|
||||
case PCI_REGION2:
|
||||
return PCI_0MEMORY2_ADDRESS_REMAP;
|
||||
case PCI_REGION3:
|
||||
return PCI_0MEMORY3_ADDRESS_REMAP;
|
||||
}
|
||||
case PCI_HOST1:
|
||||
switch (region) {
|
||||
case PCI_IO:
|
||||
return PCI_1I_O_ADDRESS_REMAP;
|
||||
case PCI_REGION0:
|
||||
return PCI_1MEMORY0_ADDRESS_REMAP;
|
||||
case PCI_REGION1:
|
||||
return PCI_1MEMORY1_ADDRESS_REMAP;
|
||||
case PCI_REGION2:
|
||||
return PCI_1MEMORY2_ADDRESS_REMAP;
|
||||
case PCI_REGION3:
|
||||
return PCI_1MEMORY3_ADDRESS_REMAP;
|
||||
}
|
||||
}
|
||||
return PCI_0MEMORY0_ADDRESS_REMAP;
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
* pciGetBaseAddress - Gets the base address of a PCI.
|
||||
* - If the PCI size is 0 then this base address has no meaning!!!
|
||||
*
|
||||
*
|
||||
* INPUT: Bus, Region - The bus and region we ask for its base address.
|
||||
* OUTPUT: N/A
|
||||
* RETURNS: PCI base address.
|
||||
*********************************************************************/
|
||||
unsigned int pciGetBaseAddress (PCI_HOST host, PCI_REGION region)
|
||||
{
|
||||
unsigned int regBase;
|
||||
unsigned int regEnd;
|
||||
unsigned int regOffset = pciGetRegOffset (host, region);
|
||||
|
||||
GT_REG_READ (regOffset, ®Base);
|
||||
GT_REG_READ (regOffset + 8, ®End);
|
||||
|
||||
if (regEnd <= regBase)
|
||||
return 0xffffffff; /* ERROR !!! */
|
||||
|
||||
regBase = regBase << 16;
|
||||
return regBase;
|
||||
}
|
||||
|
||||
bool pciMapSpace (PCI_HOST host, PCI_REGION region, unsigned int remapBase,
|
||||
unsigned int bankBase, unsigned int bankLength)
|
||||
{
|
||||
unsigned int low = 0xfff;
|
||||
unsigned int high = 0x0;
|
||||
unsigned int regOffset = pciGetRegOffset (host, region);
|
||||
unsigned int remapOffset = pciGetRemapOffset (host, region);
|
||||
|
||||
if (bankLength != 0) {
|
||||
low = (bankBase >> 16) & 0xffff;
|
||||
high = ((bankBase + bankLength) >> 16) - 1;
|
||||
}
|
||||
|
||||
GT_REG_WRITE (regOffset, low | (1 << 24)); /* no swapping */
|
||||
GT_REG_WRITE (regOffset + 8, high);
|
||||
|
||||
if (bankLength != 0) { /* must do AFTER writing maps */
|
||||
GT_REG_WRITE (remapOffset, remapBase >> 16); /* sorry, 32 bits only.
|
||||
dont support upper 32
|
||||
in this driver */
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
unsigned int pciGetSpaceBase (PCI_HOST host, PCI_REGION region)
|
||||
{
|
||||
unsigned int low;
|
||||
unsigned int regOffset = pciGetRegOffset (host, region);
|
||||
|
||||
GT_REG_READ (regOffset, &low);
|
||||
return (low & 0xffff) << 16;
|
||||
}
|
||||
|
||||
unsigned int pciGetSpaceSize (PCI_HOST host, PCI_REGION region)
|
||||
{
|
||||
unsigned int low, high;
|
||||
unsigned int regOffset = pciGetRegOffset (host, region);
|
||||
|
||||
GT_REG_READ (regOffset, &low);
|
||||
GT_REG_READ (regOffset + 8, &high);
|
||||
return ((high & 0xffff) + 1) << 16;
|
||||
}
|
||||
|
||||
|
||||
/* ronen - 7/Dec/03*/
|
||||
/********************************************************************
|
||||
* gtPciDisable/EnableInternalBAR - This function enable/disable PCI BARS.
|
||||
* Inputs: one of the PCI BAR
|
||||
*********************************************************************/
|
||||
void gtPciEnableInternalBAR (PCI_HOST host, PCI_INTERNAL_BAR pciBAR)
|
||||
{
|
||||
RESET_REG_BITS (pci_address_space_en[host], BIT0 << pciBAR);
|
||||
}
|
||||
|
||||
void gtPciDisableInternalBAR (PCI_HOST host, PCI_INTERNAL_BAR pciBAR)
|
||||
{
|
||||
SET_REG_BITS (pci_address_space_en[host], BIT0 << pciBAR);
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
* pciMapMemoryBank - Maps PCI_host memory bank "bank" for the slave.
|
||||
*
|
||||
* Inputs: base and size of PCI SCS
|
||||
*********************************************************************/
|
||||
void pciMapMemoryBank (PCI_HOST host, MEMORY_BANK bank,
|
||||
unsigned int pciDramBase, unsigned int pciDramSize)
|
||||
{
|
||||
/*ronen different function for 3rd bank. */
|
||||
unsigned int offset = (bank < 2) ? bank * 8 : 0x100 + (bank - 2) * 8;
|
||||
|
||||
pciDramBase = pciDramBase & 0xfffff000;
|
||||
pciDramBase = pciDramBase | (pciReadConfigReg (host,
|
||||
PCI_SCS_0_BASE_ADDRESS
|
||||
+ offset,
|
||||
SELF) & 0x00000fff);
|
||||
pciWriteConfigReg (host, PCI_SCS_0_BASE_ADDRESS + offset, SELF,
|
||||
pciDramBase);
|
||||
if (pciDramSize == 0)
|
||||
pciDramSize++;
|
||||
GT_REG_WRITE (pci_scs_bank_size[host][bank], pciDramSize - 1);
|
||||
gtPciEnableInternalBAR (host, bank);
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
* pciSetRegionFeatures - This function modifys one of the 8 regions with
|
||||
* feature bits given as an input.
|
||||
* - Be advised to check the spec before modifying them.
|
||||
* Inputs: PCI_PROTECT_REGION region - one of the eight regions.
|
||||
* unsigned int features - See file: pci.h there are defintion for those
|
||||
* region features.
|
||||
* unsigned int baseAddress - The region base Address.
|
||||
* unsigned int topAddress - The region top Address.
|
||||
* Returns: false if one of the parameters is erroneous true otherwise.
|
||||
*********************************************************************/
|
||||
bool pciSetRegionFeatures (PCI_HOST host, PCI_ACCESS_REGIONS region,
|
||||
unsigned int features, unsigned int baseAddress,
|
||||
unsigned int regionLength)
|
||||
{
|
||||
unsigned int accessLow;
|
||||
unsigned int accessHigh;
|
||||
unsigned int accessTop = baseAddress + regionLength;
|
||||
|
||||
if (regionLength == 0) { /* close the region. */
|
||||
pciDisableAccessRegion (host, region);
|
||||
return true;
|
||||
}
|
||||
/* base Address is store is bits [11:0] */
|
||||
accessLow = (baseAddress & 0xfff00000) >> 20;
|
||||
/* All the features are update according to the defines in pci.h (to be on
|
||||
the safe side we disable bits: [11:0] */
|
||||
accessLow = accessLow | (features & 0xfffff000);
|
||||
/* write to the Low Access Region register */
|
||||
GT_REG_WRITE (pci_access_control_base_0_low[host] + 0x10 * region,
|
||||
accessLow);
|
||||
|
||||
accessHigh = (accessTop & 0xfff00000) >> 20;
|
||||
|
||||
/* write to the High Access Region register */
|
||||
GT_REG_WRITE (pci_access_control_top_0[host] + 0x10 * region,
|
||||
accessHigh - 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
* pciDisableAccessRegion - Disable The given Region by writing MAX size
|
||||
* to its low Address and MIN size to its high Address.
|
||||
*
|
||||
* Inputs: PCI_ACCESS_REGIONS region - The region we to be Disabled.
|
||||
* Returns: N/A.
|
||||
*********************************************************************/
|
||||
void pciDisableAccessRegion (PCI_HOST host, PCI_ACCESS_REGIONS region)
|
||||
{
|
||||
/* writing back the registers default values. */
|
||||
GT_REG_WRITE (pci_access_control_base_0_low[host] + 0x10 * region,
|
||||
0x01001fff);
|
||||
GT_REG_WRITE (pci_access_control_top_0[host] + 0x10 * region, 0);
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
* pciArbiterEnable - Enables PCI-0`s Arbitration mechanism.
|
||||
*
|
||||
* Inputs: N/A
|
||||
* Returns: true.
|
||||
*********************************************************************/
|
||||
bool pciArbiterEnable (PCI_HOST host)
|
||||
{
|
||||
unsigned int regData;
|
||||
|
||||
GT_REG_READ (pci_arbiter_control[host], ®Data);
|
||||
GT_REG_WRITE (pci_arbiter_control[host], regData | BIT31);
|
||||
return true;
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
* pciArbiterDisable - Disable PCI-0`s Arbitration mechanism.
|
||||
*
|
||||
* Inputs: N/A
|
||||
* Returns: true
|
||||
*********************************************************************/
|
||||
bool pciArbiterDisable (PCI_HOST host)
|
||||
{
|
||||
unsigned int regData;
|
||||
|
||||
GT_REG_READ (pci_arbiter_control[host], ®Data);
|
||||
GT_REG_WRITE (pci_arbiter_control[host], regData & 0x7fffffff);
|
||||
return true;
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
* pciSetArbiterAgentsPriority - Priority setup for the PCI agents (Hi or Low)
|
||||
*
|
||||
* Inputs: PCI_AGENT_PRIO internalAgent - priotity for internal agent.
|
||||
* PCI_AGENT_PRIO externalAgent0 - priotity for external#0 agent.
|
||||
* PCI_AGENT_PRIO externalAgent1 - priotity for external#1 agent.
|
||||
* PCI_AGENT_PRIO externalAgent2 - priotity for external#2 agent.
|
||||
* PCI_AGENT_PRIO externalAgent3 - priotity for external#3 agent.
|
||||
* PCI_AGENT_PRIO externalAgent4 - priotity for external#4 agent.
|
||||
* PCI_AGENT_PRIO externalAgent5 - priotity for external#5 agent.
|
||||
* Returns: true
|
||||
*********************************************************************/
|
||||
bool pciSetArbiterAgentsPriority (PCI_HOST host, PCI_AGENT_PRIO internalAgent,
|
||||
PCI_AGENT_PRIO externalAgent0,
|
||||
PCI_AGENT_PRIO externalAgent1,
|
||||
PCI_AGENT_PRIO externalAgent2,
|
||||
PCI_AGENT_PRIO externalAgent3,
|
||||
PCI_AGENT_PRIO externalAgent4,
|
||||
PCI_AGENT_PRIO externalAgent5)
|
||||
{
|
||||
unsigned int regData;
|
||||
unsigned int writeData;
|
||||
|
||||
GT_REG_READ (pci_arbiter_control[host], ®Data);
|
||||
writeData = (internalAgent << 7) + (externalAgent0 << 8) +
|
||||
(externalAgent1 << 9) + (externalAgent2 << 10) +
|
||||
(externalAgent3 << 11) + (externalAgent4 << 12) +
|
||||
(externalAgent5 << 13);
|
||||
regData = (regData & 0xffffc07f) | writeData;
|
||||
GT_REG_WRITE (pci_arbiter_control[host], regData & regData);
|
||||
return true;
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
* pciParkingDisable - Park on last option disable, with this function you can
|
||||
* disable the park on last mechanism for each agent.
|
||||
* disabling this option for all agents results parking
|
||||
* on the internal master.
|
||||
*
|
||||
* Inputs: PCI_AGENT_PARK internalAgent - parking Disable for internal agent.
|
||||
* PCI_AGENT_PARK externalAgent0 - parking Disable for external#0 agent.
|
||||
* PCI_AGENT_PARK externalAgent1 - parking Disable for external#1 agent.
|
||||
* PCI_AGENT_PARK externalAgent2 - parking Disable for external#2 agent.
|
||||
* PCI_AGENT_PARK externalAgent3 - parking Disable for external#3 agent.
|
||||
* PCI_AGENT_PARK externalAgent4 - parking Disable for external#4 agent.
|
||||
* PCI_AGENT_PARK externalAgent5 - parking Disable for external#5 agent.
|
||||
* Returns: true
|
||||
*********************************************************************/
|
||||
bool pciParkingDisable (PCI_HOST host, PCI_AGENT_PARK internalAgent,
|
||||
PCI_AGENT_PARK externalAgent0,
|
||||
PCI_AGENT_PARK externalAgent1,
|
||||
PCI_AGENT_PARK externalAgent2,
|
||||
PCI_AGENT_PARK externalAgent3,
|
||||
PCI_AGENT_PARK externalAgent4,
|
||||
PCI_AGENT_PARK externalAgent5)
|
||||
{
|
||||
unsigned int regData;
|
||||
unsigned int writeData;
|
||||
|
||||
GT_REG_READ (pci_arbiter_control[host], ®Data);
|
||||
writeData = (internalAgent << 14) + (externalAgent0 << 15) +
|
||||
(externalAgent1 << 16) + (externalAgent2 << 17) +
|
||||
(externalAgent3 << 18) + (externalAgent4 << 19) +
|
||||
(externalAgent5 << 20);
|
||||
regData = (regData & ~(0x7f << 14)) | writeData;
|
||||
GT_REG_WRITE (pci_arbiter_control[host], regData);
|
||||
return true;
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
* pciEnableBrokenAgentDetection - A master is said to be broken if it fails to
|
||||
* respond to grant assertion within a window specified in
|
||||
* the input value: 'brokenValue'.
|
||||
*
|
||||
* Inputs: unsigned char brokenValue - A value which limits the Master to hold the
|
||||
* grant without asserting frame.
|
||||
* Returns: Error for illegal broken value otherwise true.
|
||||
*********************************************************************/
|
||||
bool pciEnableBrokenAgentDetection (PCI_HOST host, unsigned char brokenValue)
|
||||
{
|
||||
unsigned int data;
|
||||
unsigned int regData;
|
||||
|
||||
if (brokenValue > 0xf)
|
||||
return false; /* brokenValue must be 4 bit */
|
||||
data = brokenValue << 3;
|
||||
GT_REG_READ (pci_arbiter_control[host], ®Data);
|
||||
regData = (regData & 0xffffff87) | data;
|
||||
GT_REG_WRITE (pci_arbiter_control[host], regData | BIT1);
|
||||
return true;
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
* pciDisableBrokenAgentDetection - This function disable the Broken agent
|
||||
* Detection mechanism.
|
||||
* NOTE: This operation may cause a dead lock on the
|
||||
* pci0 arbitration.
|
||||
*
|
||||
* Inputs: N/A
|
||||
* Returns: true.
|
||||
*********************************************************************/
|
||||
bool pciDisableBrokenAgentDetection (PCI_HOST host)
|
||||
{
|
||||
unsigned int regData;
|
||||
|
||||
GT_REG_READ (pci_arbiter_control[host], ®Data);
|
||||
regData = regData & 0xfffffffd;
|
||||
GT_REG_WRITE (pci_arbiter_control[host], regData);
|
||||
return true;
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
* pciP2PConfig - This function set the PCI_n P2P configurate.
|
||||
* For more information on the P2P read PCI spec.
|
||||
*
|
||||
* Inputs: unsigned int SecondBusLow - Secondery PCI interface Bus Range Lower
|
||||
* Boundry.
|
||||
* unsigned int SecondBusHigh - Secondry PCI interface Bus Range upper
|
||||
* Boundry.
|
||||
* unsigned int busNum - The CPI bus number to which the PCI interface
|
||||
* is connected.
|
||||
* unsigned int devNum - The PCI interface's device number.
|
||||
*
|
||||
* Returns: true.
|
||||
*********************************************************************/
|
||||
bool pciP2PConfig (PCI_HOST host, unsigned int SecondBusLow,
|
||||
unsigned int SecondBusHigh,
|
||||
unsigned int busNum, unsigned int devNum)
|
||||
{
|
||||
unsigned int regData;
|
||||
|
||||
regData = (SecondBusLow & 0xff) | ((SecondBusHigh & 0xff) << 8) |
|
||||
((busNum & 0xff) << 16) | ((devNum & 0x1f) << 24);
|
||||
GT_REG_WRITE (pci_p2p_configuration[host], regData);
|
||||
return true;
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
* pciSetRegionSnoopMode - This function modifys one of the 4 regions which
|
||||
* supports Cache Coherency in the PCI_n interface.
|
||||
* Inputs: region - One of the four regions.
|
||||
* snoopType - There is four optional Types:
|
||||
* 1. No Snoop.
|
||||
* 2. Snoop to WT region.
|
||||
* 3. Snoop to WB region.
|
||||
* 4. Snoop & Invalidate to WB region.
|
||||
* baseAddress - Base Address of this region.
|
||||
* regionLength - Region length.
|
||||
* Returns: false if one of the parameters is wrong otherwise return true.
|
||||
*********************************************************************/
|
||||
bool pciSetRegionSnoopMode (PCI_HOST host, PCI_SNOOP_REGION region,
|
||||
PCI_SNOOP_TYPE snoopType,
|
||||
unsigned int baseAddress,
|
||||
unsigned int regionLength)
|
||||
{
|
||||
unsigned int snoopXbaseAddress;
|
||||
unsigned int snoopXtopAddress;
|
||||
unsigned int data;
|
||||
unsigned int snoopHigh = baseAddress + regionLength;
|
||||
|
||||
if ((region > PCI_SNOOP_REGION3) || (snoopType > PCI_SNOOP_WB))
|
||||
return false;
|
||||
snoopXbaseAddress =
|
||||
pci_snoop_control_base_0_low[host] + 0x10 * region;
|
||||
snoopXtopAddress = pci_snoop_control_top_0[host] + 0x10 * region;
|
||||
if (regionLength == 0) { /* closing the region */
|
||||
GT_REG_WRITE (snoopXbaseAddress, 0x0000ffff);
|
||||
GT_REG_WRITE (snoopXtopAddress, 0);
|
||||
return true;
|
||||
}
|
||||
baseAddress = baseAddress & 0xfff00000; /* Granularity of 1MByte */
|
||||
data = (baseAddress >> 20) | snoopType << 12;
|
||||
GT_REG_WRITE (snoopXbaseAddress, data);
|
||||
snoopHigh = (snoopHigh & 0xfff00000) >> 20;
|
||||
GT_REG_WRITE (snoopXtopAddress, snoopHigh - 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
static int gt_read_config_dword (struct pci_controller *hose,
|
||||
pci_dev_t dev, int offset, u32 * value)
|
||||
{
|
||||
int bus = PCI_BUS (dev);
|
||||
|
||||
if ((bus == local_buses[0]) || (bus == local_buses[1])) {
|
||||
*value = pciReadConfigReg ((PCI_HOST) hose->cfg_addr, offset,
|
||||
PCI_DEV (dev));
|
||||
} else {
|
||||
*value = pciOverBridgeReadConfigReg ((PCI_HOST) hose->
|
||||
cfg_addr, offset,
|
||||
PCI_DEV (dev), bus);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int gt_write_config_dword (struct pci_controller *hose,
|
||||
pci_dev_t dev, int offset, u32 value)
|
||||
{
|
||||
int bus = PCI_BUS (dev);
|
||||
|
||||
if ((bus == local_buses[0]) || (bus == local_buses[1])) {
|
||||
pciWriteConfigReg ((PCI_HOST) hose->cfg_addr, offset,
|
||||
PCI_DEV (dev), value);
|
||||
} else {
|
||||
pciOverBridgeWriteConfigReg ((PCI_HOST) hose->cfg_addr,
|
||||
offset, PCI_DEV (dev), bus,
|
||||
value);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static void gt_setup_ide (struct pci_controller *hose,
|
||||
pci_dev_t dev, struct pci_config_table *entry)
|
||||
{
|
||||
static const int ide_bar[] = { 8, 4, 8, 4, 0, 0 };
|
||||
u32 bar_response, bar_value;
|
||||
int bar;
|
||||
|
||||
for (bar = 0; bar < 6; bar++) {
|
||||
/*ronen different function for 3rd bank. */
|
||||
unsigned int offset =
|
||||
(bar < 2) ? bar * 8 : 0x100 + (bar - 2) * 8;
|
||||
|
||||
pci_write_config_dword (dev, PCI_BASE_ADDRESS_0 + offset,
|
||||
0x0);
|
||||
pci_read_config_dword (dev, PCI_BASE_ADDRESS_0 + offset,
|
||||
&bar_response);
|
||||
|
||||
pciauto_region_allocate (bar_response &
|
||||
PCI_BASE_ADDRESS_SPACE_IO ? hose->
|
||||
pci_io : hose->pci_mem, ide_bar[bar],
|
||||
&bar_value);
|
||||
|
||||
pci_write_config_dword (dev, PCI_BASE_ADDRESS_0 + bar * 4,
|
||||
bar_value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* TODO BJW: Change this for DB64360. This was pulled from the EV64260 */
|
||||
/* and is curently not called *. */
|
||||
#if 0
|
||||
static void gt_fixup_irq (struct pci_controller *hose, pci_dev_t dev)
|
||||
{
|
||||
unsigned char pin, irq;
|
||||
|
||||
pci_read_config_byte (dev, PCI_INTERRUPT_PIN, &pin);
|
||||
|
||||
if (pin == 1) { /* only allow INT A */
|
||||
irq = pci_irq_swizzle[(PCI_HOST) hose->
|
||||
cfg_addr][PCI_DEV (dev)];
|
||||
if (irq)
|
||||
pci_write_config_byte (dev, PCI_INTERRUPT_LINE, irq);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
struct pci_config_table gt_config_table[] = {
|
||||
{PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE,
|
||||
PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, gt_setup_ide},
|
||||
|
||||
{}
|
||||
};
|
||||
|
||||
struct pci_controller pci0_hose = {
|
||||
/* fixup_irq: gt_fixup_irq, */
|
||||
config_table:gt_config_table,
|
||||
};
|
||||
|
||||
struct pci_controller pci1_hose = {
|
||||
/* fixup_irq: gt_fixup_irq, */
|
||||
config_table:gt_config_table,
|
||||
};
|
||||
|
||||
void pci_init_board (void)
|
||||
{
|
||||
unsigned int command;
|
||||
|
||||
#ifdef DEBUG
|
||||
gt_pci_bus_mode_display (PCI_HOST0);
|
||||
#endif
|
||||
|
||||
pci0_hose.first_busno = 0;
|
||||
pci0_hose.last_busno = 0xff;
|
||||
local_buses[0] = pci0_hose.first_busno;
|
||||
|
||||
/* PCI memory space */
|
||||
pci_set_region (pci0_hose.regions + 0,
|
||||
CFG_PCI0_0_MEM_SPACE,
|
||||
CFG_PCI0_0_MEM_SPACE,
|
||||
CFG_PCI0_MEM_SIZE, PCI_REGION_MEM);
|
||||
|
||||
/* PCI I/O space */
|
||||
pci_set_region (pci0_hose.regions + 1,
|
||||
CFG_PCI0_IO_SPACE_PCI,
|
||||
CFG_PCI0_IO_SPACE, CFG_PCI0_IO_SIZE, PCI_REGION_IO);
|
||||
|
||||
pci_set_ops (&pci0_hose,
|
||||
pci_hose_read_config_byte_via_dword,
|
||||
pci_hose_read_config_word_via_dword,
|
||||
gt_read_config_dword,
|
||||
pci_hose_write_config_byte_via_dword,
|
||||
pci_hose_write_config_word_via_dword,
|
||||
gt_write_config_dword);
|
||||
pci0_hose.region_count = 2;
|
||||
|
||||
pci0_hose.cfg_addr = (unsigned int *) PCI_HOST0;
|
||||
|
||||
pci_register_hose (&pci0_hose);
|
||||
pciArbiterEnable (PCI_HOST0);
|
||||
pciParkingDisable (PCI_HOST0, 1, 1, 1, 1, 1, 1, 1);
|
||||
command = pciReadConfigReg (PCI_HOST0, PCI_COMMAND, SELF);
|
||||
command |= PCI_COMMAND_MASTER;
|
||||
pciWriteConfigReg (PCI_HOST0, PCI_COMMAND, SELF, command);
|
||||
command = pciReadConfigReg (PCI_HOST0, PCI_COMMAND, SELF);
|
||||
command |= PCI_COMMAND_MEMORY;
|
||||
pciWriteConfigReg (PCI_HOST0, PCI_COMMAND, SELF, command);
|
||||
|
||||
pci0_hose.last_busno = pci_hose_scan (&pci0_hose);
|
||||
|
||||
#ifdef DEBUG
|
||||
gt_pci_bus_mode_display (PCI_HOST1);
|
||||
#endif
|
||||
pci1_hose.first_busno = pci0_hose.last_busno + 1;
|
||||
pci1_hose.last_busno = 0xff;
|
||||
pci1_hose.current_busno = pci1_hose.first_busno;
|
||||
local_buses[1] = pci1_hose.first_busno;
|
||||
|
||||
/* PCI memory space */
|
||||
pci_set_region (pci1_hose.regions + 0,
|
||||
CFG_PCI1_0_MEM_SPACE,
|
||||
CFG_PCI1_0_MEM_SPACE,
|
||||
CFG_PCI1_MEM_SIZE, PCI_REGION_MEM);
|
||||
|
||||
/* PCI I/O space */
|
||||
pci_set_region (pci1_hose.regions + 1,
|
||||
CFG_PCI1_IO_SPACE_PCI,
|
||||
CFG_PCI1_IO_SPACE, CFG_PCI1_IO_SIZE, PCI_REGION_IO);
|
||||
|
||||
pci_set_ops (&pci1_hose,
|
||||
pci_hose_read_config_byte_via_dword,
|
||||
pci_hose_read_config_word_via_dword,
|
||||
gt_read_config_dword,
|
||||
pci_hose_write_config_byte_via_dword,
|
||||
pci_hose_write_config_word_via_dword,
|
||||
gt_write_config_dword);
|
||||
|
||||
pci1_hose.region_count = 2;
|
||||
|
||||
pci1_hose.cfg_addr = (unsigned int *) PCI_HOST1;
|
||||
|
||||
pci_register_hose (&pci1_hose);
|
||||
|
||||
pciArbiterEnable (PCI_HOST1);
|
||||
pciParkingDisable (PCI_HOST1, 1, 1, 1, 1, 1, 1, 1);
|
||||
|
||||
command = pciReadConfigReg (PCI_HOST1, PCI_COMMAND, SELF);
|
||||
command |= PCI_COMMAND_MASTER;
|
||||
pciWriteConfigReg (PCI_HOST1, PCI_COMMAND, SELF, command);
|
||||
|
||||
pci1_hose.last_busno = pci_hose_scan (&pci1_hose);
|
||||
|
||||
command = pciReadConfigReg (PCI_HOST1, PCI_COMMAND, SELF);
|
||||
command |= PCI_COMMAND_MEMORY;
|
||||
pciWriteConfigReg (PCI_HOST1, PCI_COMMAND, SELF, command);
|
||||
|
||||
}
|
||||
1984
board/Marvell/db64360/sdram_init.c
Normal file
1984
board/Marvell/db64360/sdram_init.c
Normal file
File diff suppressed because it is too large
Load Diff
138
board/Marvell/db64360/u-boot.lds
Normal file
138
board/Marvell/db64360/u-boot.lds
Normal file
@@ -0,0 +1,138 @@
|
||||
/*
|
||||
* (C) Copyright 2001
|
||||
* Josh Huber <huber@mclx.com>, Mission Critical Linux, Inc.
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/*
|
||||
* u-boot.lds - linker script for U-Boot on the Galileo Eval Board.
|
||||
*/
|
||||
|
||||
OUTPUT_ARCH(powerpc)
|
||||
SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib); SEARCH_DIR(/usr/local/powerpc-any-elf/lib);
|
||||
/* Do we need any of these for elf?
|
||||
__DYNAMIC = 0; */
|
||||
SECTIONS
|
||||
{
|
||||
/* Read-only sections, merged into text segment: */
|
||||
. = + SIZEOF_HEADERS;
|
||||
.interp : { *(.interp) }
|
||||
.hash : { *(.hash) }
|
||||
.dynsym : { *(.dynsym) }
|
||||
.dynstr : { *(.dynstr) }
|
||||
.rel.text : { *(.rel.text) }
|
||||
.rela.text : { *(.rela.text) }
|
||||
.rel.data : { *(.rel.data) }
|
||||
.rela.data : { *(.rela.data) }
|
||||
.rel.rodata : { *(.rel.rodata) }
|
||||
.rela.rodata : { *(.rela.rodata) }
|
||||
.rel.got : { *(.rel.got) }
|
||||
.rela.got : { *(.rela.got) }
|
||||
.rel.ctors : { *(.rel.ctors) }
|
||||
.rela.ctors : { *(.rela.ctors) }
|
||||
.rel.dtors : { *(.rel.dtors) }
|
||||
.rela.dtors : { *(.rela.dtors) }
|
||||
.rel.bss : { *(.rel.bss) }
|
||||
.rela.bss : { *(.rela.bss) }
|
||||
.rel.plt : { *(.rel.plt) }
|
||||
.rela.plt : { *(.rela.plt) }
|
||||
.init : { *(.init) }
|
||||
.plt : { *(.plt) }
|
||||
.text :
|
||||
{
|
||||
cpu/74xx_7xx/start.o (.text)
|
||||
|
||||
/* store the environment in a seperate sector in the boot flash */
|
||||
/* . = env_offset; */
|
||||
/* common/environment.o(.text) */
|
||||
|
||||
*(.text)
|
||||
*(.fixup)
|
||||
*(.got1)
|
||||
}
|
||||
_etext = .;
|
||||
PROVIDE (etext = .);
|
||||
.rodata :
|
||||
{
|
||||
*(.rodata)
|
||||
*(.rodata1)
|
||||
*(.rodata.str1.4)
|
||||
*(.eh_frame)
|
||||
}
|
||||
.fini : { *(.fini) } =0
|
||||
.ctors : { *(.ctors) }
|
||||
.dtors : { *(.dtors) }
|
||||
|
||||
/* Read-write section, merged into data segment: */
|
||||
. = (. + 0x00FF) & 0xFFFFFF00;
|
||||
_erotext = .;
|
||||
PROVIDE (erotext = .);
|
||||
.reloc :
|
||||
{
|
||||
*(.got)
|
||||
_GOT2_TABLE_ = .;
|
||||
*(.got2)
|
||||
_FIXUP_TABLE_ = .;
|
||||
*(.fixup)
|
||||
}
|
||||
__got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
|
||||
__fixup_entries = (. - _FIXUP_TABLE_)>>2;
|
||||
|
||||
.data :
|
||||
{
|
||||
*(.data)
|
||||
*(.data1)
|
||||
*(.sdata)
|
||||
*(.sdata2)
|
||||
*(.dynamic)
|
||||
CONSTRUCTORS
|
||||
}
|
||||
_edata = .;
|
||||
PROVIDE (edata = .);
|
||||
|
||||
. = .;
|
||||
__u_boot_cmd_start = .;
|
||||
.u_boot_cmd : { *(.u_boot_cmd) }
|
||||
__u_boot_cmd_end = .;
|
||||
|
||||
|
||||
. = .;
|
||||
__start___ex_table = .;
|
||||
__ex_table : { *(__ex_table) }
|
||||
__stop___ex_table = .;
|
||||
|
||||
. = ALIGN(256);
|
||||
__init_begin = .;
|
||||
.text.init : { *(.text.init) }
|
||||
.data.init : { *(.data.init) }
|
||||
. = ALIGN(256);
|
||||
__init_end = .;
|
||||
|
||||
__bss_start = .;
|
||||
.bss :
|
||||
{
|
||||
*(.sbss) *(.scommon)
|
||||
*(.dynbss)
|
||||
*(.bss)
|
||||
*(COMMON)
|
||||
}
|
||||
_end = . ;
|
||||
PROVIDE (end = .);
|
||||
}
|
||||
52
board/Marvell/db64460/64460.h
Normal file
52
board/Marvell/db64460/64460.h
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* (C) Copyright 2003
|
||||
* Ingo Assmus <ingo.assmus@keymile.com>
|
||||
*
|
||||
* See file CREDITS for list of people who contributed to this
|
||||
* project.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/*
|
||||
* main board support/init for the Galileo Eval board DB64460.
|
||||
*/
|
||||
|
||||
#ifndef __64460_H__
|
||||
#define __64460_H__
|
||||
|
||||
/* CPU Configuration bits */
|
||||
#define CPU_CONF_ADDR_MISS_EN (1 << 8)
|
||||
#define CPU_CONF_SINGLE_CPU (1 << 11)
|
||||
#define CPU_CONF_ENDIANESS (1 << 12)
|
||||
#define CPU_CONF_PIPELINE (1 << 13)
|
||||
#define CPU_CONF_STOP_RETRY (1 << 17)
|
||||
#define CPU_CONF_MULTI_DECODE (1 << 18)
|
||||
#define CPU_CONF_DP_VALID (1 << 19)
|
||||
#define CPU_CONF_PERR_PROP (1 << 22)
|
||||
#define CPU_CONF_AACK_DELAY_2 (1 << 25)
|
||||
#define CPU_CONF_AP_VALID (1 << 26)
|
||||
#define CPU_CONF_REMAP_WR_DIS (1 << 27)
|
||||
|
||||
/* CPU Master Control bits */
|
||||
#define CPU_MAST_CTL_ARB_EN (1 << 8)
|
||||
#define CPU_MAST_CTL_MASK_BR_1 (1 << 9)
|
||||
#define CPU_MAST_CTL_M_WR_TRIG (1 << 10)
|
||||
#define CPU_MAST_CTL_M_RD_TRIG (1 << 11)
|
||||
#define CPU_MAST_CTL_CLEAN_BLK (1 << 12)
|
||||
#define CPU_MAST_CTL_FLUSH_BLK (1 << 13)
|
||||
|
||||
#endif /* __64460_H__ */
|
||||
54
board/Marvell/db64460/Makefile
Normal file
54
board/Marvell/db64460/Makefile
Normal file
@@ -0,0 +1,54 @@
|
||||
#
|
||||
# (C) Copyright 2006
|
||||
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
#
|
||||
# (C) Copyright 2001
|
||||
# Josh Huber <huber@mclx.com>, Mission Critical Linux, Inc.
|
||||
#
|
||||
# See file CREDITS for list of people who contributed to this
|
||||
# project.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation; either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
# MA 02111-1307 USA
|
||||
#
|
||||
|
||||
include $(TOPDIR)/config.mk
|
||||
ifneq ($(OBJTREE),$(SRCTREE))
|
||||
$(shell mkdir -p $(obj)../common)
|
||||
endif
|
||||
|
||||
LIB = $(obj)lib$(BOARD).a
|
||||
|
||||
SOBJS = ../common/misc.o
|
||||
|
||||
COBJS = $(BOARD).o ../common/flash.o ../common/serial.o ../common/memory.o pci.o \
|
||||
mv_eth.o ../common/ns16550.o mpsc.o ../common/i2c.o \
|
||||
sdram_init.o ../common/intel_flash.o
|
||||
|
||||
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
|
||||
OBJS := $(addprefix $(obj),$(COBJS))
|
||||
SOBJS := $(addprefix $(obj),$(SOBJS))
|
||||
|
||||
$(LIB): $(obj).depend $(OBJS) $(SOBJS)
|
||||
$(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
|
||||
|
||||
#########################################################################
|
||||
|
||||
# defines $(obj).depend target
|
||||
include $(SRCTREE)/rules.mk
|
||||
|
||||
sinclude $(obj).depend
|
||||
|
||||
#########################################################################
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user