Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 79c3c0b7 authored by Mark A. Greer's avatar Mark A. Greer Committed by Kevin Hilman
Browse files

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: default avatarMark A. Greer <mgreer@mvista.com>
Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
parent ac7b75b5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@

# Common objects
obj-y 			:= time.o irq.o clock.o serial.o io.o id.o psc.o \
			   gpio.o devices.o dma.o usb.o
			   gpio.o devices.o dma.o usb.o common.o

obj-$(CONFIG_DAVINCI_MUX)		+= mux.o
obj-$(CONFIG_CP_INTC)			+= cp_intc.o
+1 −1
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@
#include <mach/serial.h>
#include <mach/nand.h>
#include <mach/mmc.h>
#include <mach/common.h>

#define DAVINCI_ASYNC_EMIF_CONTROL_BASE		0x01e10000
#define DAVINCI_ASYNC_EMIF_DATA_CE0_BASE	0x02000000
@@ -188,7 +189,6 @@ static struct davinci_uart_config uart_config __initdata = {

static void __init dm355_evm_map_io(void)
{
	davinci_map_common_io();
	dm355_init();
}

+1 −1
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@
#include <mach/serial.h>
#include <mach/nand.h>
#include <mach/mmc.h>
#include <mach/common.h>

#define DAVINCI_ASYNC_EMIF_CONTROL_BASE		0x01e10000
#define DAVINCI_ASYNC_EMIF_DATA_CE0_BASE	0x02000000
@@ -187,7 +188,6 @@ static struct davinci_uart_config uart_config __initdata = {

static void __init dm355_leopard_map_io(void)
{
	davinci_map_common_io();
	dm355_init();
}

+1 −1
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@
#include <mach/psc.h>
#include <mach/nand.h>
#include <mach/mmc.h>
#include <mach/common.h>

#define DM644X_EVM_PHY_MASK		(0x2)
#define DM644X_EVM_MDIO_FREQUENCY	(2200000) /* PHY bus frequency */
@@ -609,7 +610,6 @@ static struct davinci_uart_config uart_config __initdata = {
static void __init
davinci_evm_map_io(void)
{
	davinci_map_common_io();
	dm644x_init();
}

+1 −1
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@
#include <mach/i2c.h>
#include <mach/mmc.h>
#include <mach/emac.h>
#include <mach/common.h>

#define DM646X_EVM_PHY_MASK		(0x2)
#define DM646X_EVM_MDIO_FREQUENCY	(2200000) /* PHY bus frequency */
@@ -265,7 +266,6 @@ static void __init evm_init_i2c(void)

static void __init davinci_map_io(void)
{
	davinci_map_common_io();
	dm646x_init();
}

Loading