u-boot/doc/README.at91-soc
Jens Scharsig 98250e8e17 prepare joining at91rm9200 into at91
* prepare joining at91 and at91rm9200
 * add modified copy of soc files to cpu/arm920t/at91 to make
   possible to compile at91rm9200 boards in at91 tree instead
   of at91rm9200
 * add header files with c structure defs for AT91 MC, ST and TC
 * the new cpu files are using at91 c structure soc access
 * please read README.soc-at91 for details

Signed-off-by: Jens Scharsig <js_at_ng@scharsoft.de>
2010-02-12 12:31:55 -06:00

64 lines
2.1 KiB
Text

New C structure AT91 SoC access
=================================
The goal
--------
Currently the at91 arch uses hundreds of address defines and special
at91_xxxx_write/read functions to access the SOC.
The u-boot project perferred method is to access memory mapped hw
regisister via a c structure.
e.g. old
*AT91C_PIOA_IDR = AT91_PMX_AA_TWD | AT91_PMX_AA_TWCK;
*AT91C_PIOC_PUDR = AT91_PMX_AA_TWD | AT91_PMX_AA_TWCK;
*AT91C_PIOC_PER = AT91_PMX_AA_TWD | AT91_PMX_AA_TWCK;
*AT91C_PIOC_OER = AT91_PMX_AA_TWD | AT91_PMX_AA_TWCK;
*AT91C_PIOC_PIO = AT91_PMX_AA_TWD | AT91_PMX_AA_TWCK;
at91_sys_write(AT91_RSTC_CR,
AT91_RSTC_KEY | AT91_RSTC_PROCRST | AT91_RSTC_PERRST);
e.g new
pin = AT91_PMX_AA_TWD | AT91_PMX_AA_TWCK;
writel(pin, &pio->pioa.idr);
writel(pin, &pio->pioa.pudr);
writel(pin, &pio->pioa.per);
writel(pin, &pio->pioa.oer);
writel(pin, &pio->pioa.sodr);
writel(AT91_RSTC_KEY | AT91_RSTC_CR_PROCRST |
AT91_RSTC_CR_PERRST, &rstc->cr);
The method for updating
------------------------
1. add's the temporary CONFIG_AT91_LEGACY to all at91 board configs
2. Display a compile time warning, if the board has not been converted
3. add new structures for SoC access
4. Convert arch, driver and boards file to new SoC
5. remove legacy code, if all boards and drives are ready
Join AT91 and AT91RM9200 SoC
==============================
Approximately 95 percent of AT91 and AT91RM9200 SoC parts are the same.
So, we should use the chance, to join both archs togetter.
To do this follow step needed:
1. change Makefile
@$(MKCONFIG) $(@:_config=) arm arm920t board vendor at91rm9200
to
@$(MKCONFIG) $(@:_config=) arm arm920t board vendor at91
2. remove CONFIG_AT91_LEGACY in board config
3. convert boards file to new SoC access
4. convert or change drivers
To support the joining process, a new SoC dir (at91) has been adding to
arm920t arch directory. This directory contains files like at91rm9200 dir, but
uses the new c structure Soc access. The advantage of this is, we don't merge
old Soc access code and new code while the board are not converted.
Finally we can delete the whole at91rm9200 dir, if all board support the
new AT91-SoC access.