]> git.ipfire.org Git - people/ms/u-boot.git/blame - doc/README.at91-soc
NAND: Fix integer overflow in ONFI detection of chips >= 4GiB
[people/ms/u-boot.git] / doc / README.at91-soc
CommitLineData
425de62d
JS
1 New C structure AT91 SoC access
2=================================
3
4The goal
5--------
6
7Currently the at91 arch uses hundreds of address defines and special
8at91_xxxx_write/read functions to access the SOC.
9The u-boot project perferred method is to access memory mapped hw
10regisister via a c structure.
11
12e.g. old
13
14 *AT91C_PIOA_IDR = AT91_PMX_AA_TWD | AT91_PMX_AA_TWCK;
15 *AT91C_PIOC_PUDR = AT91_PMX_AA_TWD | AT91_PMX_AA_TWCK;
16 *AT91C_PIOC_PER = AT91_PMX_AA_TWD | AT91_PMX_AA_TWCK;
17 *AT91C_PIOC_OER = AT91_PMX_AA_TWD | AT91_PMX_AA_TWCK;
18 *AT91C_PIOC_PIO = AT91_PMX_AA_TWD | AT91_PMX_AA_TWCK;
19
20 at91_sys_write(AT91_RSTC_CR,
21 AT91_RSTC_KEY | AT91_RSTC_PROCRST | AT91_RSTC_PERRST);
22
23e.g new
24 pin = AT91_PMX_AA_TWD | AT91_PMX_AA_TWCK;
25 writel(pin, &pio->pioa.idr);
26 writel(pin, &pio->pioa.pudr);
27 writel(pin, &pio->pioa.per);
28 writel(pin, &pio->pioa.oer);
29 writel(pin, &pio->pioa.sodr);
30
31 writel(AT91_RSTC_KEY | AT91_RSTC_CR_PROCRST |
32 AT91_RSTC_CR_PERRST, &rstc->cr);
33
34The method for updating
35------------------------
36
371. add's the temporary CONFIG_AT91_LEGACY to all at91 board configs
382. Display a compile time warning, if the board has not been converted
393. add new structures for SoC access
404. Convert arch, driver and boards file to new SoC
415. remove legacy code, if all boards and drives are ready
98250e8e
JS
42
43 Join AT91 and AT91RM9200 SoC
44==============================
45
46Approximately 95 percent of AT91 and AT91RM9200 SoC parts are the same.
47So, we should use the chance, to join both archs togetter.
48
49To do this follow step needed:
50
511. change Makefile
52 @$(MKCONFIG) $(@:_config=) arm arm920t board vendor at91rm9200
53 to
54 @$(MKCONFIG) $(@:_config=) arm arm920t board vendor at91
552. remove CONFIG_AT91_LEGACY in board config
563. convert boards file to new SoC access
574. convert or change drivers
58
59To support the joining process, a new SoC dir (at91) has been adding to
60arm920t arch directory. This directory contains files like at91rm9200 dir, but
61uses the new c structure Soc access. The advantage of this is, we don't merge
62old Soc access code and new code while the board are not converted.
63Finally we can delete the whole at91rm9200 dir, if all board support the
64new AT91-SoC access.