davinci: Encapsulate SoC-specific data in a structure
authorMark A. Greer <mgreer@mvista.com>
Wed, 15 Apr 2009 19:38:58 +0000 (12:38 -0700)
committerKevin Hilman <khilman@deeprootsystems.com>
Tue, 26 May 2009 15:14:04 +0000 (08:14 -0700)
commit79c3c0b729647a6246c120408f36e6804dab244e
tree5662bf481043b99b13951aaafd44d45a7903fa8b
parentac7b75b5bbbfd60b752869a22daa3be99b5b4f99
davinci: Encapsulate SoC-specific data in a structure

Create a structure to encapsulate SoC-specific information.
This will assist in generalizing code so it can be used by
different SoCs that have similar hardware but with minor
differences such as having a different base address.

The idea is that the code for each SoC fills out a structure
with the correct information.  The board-specific code then
calls the SoC init routine which in turn will call a common
init routine that makes a copy of the structure, maps in I/O
regions, etc.

After initialization, code can get a pointer to the structure
by calling davinci_get_soc_info().  Eventually, the common
init routine will make a copy of all of the data pointed to
by the structure so the original data can be made __init_data.
That way the data for SoC's that aren't being used won't consume
memory for the entire life of the kernel.

The structure will be extended in subsequent patches but
initially, it holds the map_desc structure for any I/O
regions the SoC/board wants statically mapped.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
13 files changed:
arch/arm/mach-davinci/Makefile
arch/arm/mach-davinci/board-dm355-evm.c
arch/arm/mach-davinci/board-dm355-leopard.c
arch/arm/mach-davinci/board-dm644x-evm.c
arch/arm/mach-davinci/board-dm646x-evm.c
arch/arm/mach-davinci/board-sffsdr.c
arch/arm/mach-davinci/common.c [new file with mode: 0644]
arch/arm/mach-davinci/dm355.c
arch/arm/mach-davinci/dm644x.c
arch/arm/mach-davinci/dm646x.c
arch/arm/mach-davinci/include/mach/common.h
arch/arm/mach-davinci/include/mach/dm355.h
arch/arm/mach-davinci/io.c