Skip to content

Commit

Permalink
ARM: 6017/1: ST SPEAr: Added source files for SPEAr3xx machine family
Browse files Browse the repository at this point in the history
Reviewed-by: Linus Walleij <linux.walleij@stericsson.com>

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
viresh kumar authored and Russell King committed Apr 14, 2010
1 parent cee37e5 commit bc4e814
Show file tree
Hide file tree
Showing 13 changed files with 472 additions and 0 deletions.
33 changes: 33 additions & 0 deletions arch/arm/mach-spear3xx/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#
# SPEAr3XX Machine configuration file
#

if ARCH_SPEAR3XX

choice
prompt "SPEAr3XX Family"
default MACH_SPEAR300

config MACH_SPEAR300
bool "SPEAr300"
help
Supports ST SPEAr300 Machine

config MACH_SPEAR310
bool "SPEAr310"
help
Supports ST SPEAr310 Machine

config MACH_SPEAR320
bool "SPEAr320"
help
Supports ST SPEAr320 Machine

endchoice

# Adding SPEAr3XX machine specific configuration files
source "arch/arm/mach-spear3xx/Kconfig300"
source "arch/arm/mach-spear3xx/Kconfig310"
source "arch/arm/mach-spear3xx/Kconfig320"

endif #ARCH_SPEAR3XX
17 changes: 17 additions & 0 deletions arch/arm/mach-spear3xx/Kconfig300
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#
# SPEAr300 machine configuration file
#

if MACH_SPEAR300

choice
prompt "SPEAr300 Boards"
default BOARD_SPEAR300_EVB

config BOARD_SPEAR300_EVB
bool "SPEAr300 Evaluation Board"
help
Supports ST SPEAr300 Evaluation Board
endchoice

endif #MACH_SPEAR300
17 changes: 17 additions & 0 deletions arch/arm/mach-spear3xx/Kconfig310
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#
# SPEAr310 machine configuration file
#

if MACH_SPEAR310

choice
prompt "SPEAr310 Boards"
default BOARD_SPEAR310_EVB

config BOARD_SPEAR310_EVB
bool "SPEAr310 Evaluation Board"
help
Supports ST SPEAr310 Evaluation Board
endchoice

endif #MACH_SPEAR310
17 changes: 17 additions & 0 deletions arch/arm/mach-spear3xx/Kconfig320
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#
# SPEAr320 machine configuration file
#

if MACH_SPEAR320

choice
prompt "SPEAr320 Boards"
default BOARD_SPEAR320_EVB

config BOARD_SPEAR320_EVB
bool "SPEAr320 Evaluation Board"
help
Supports ST SPEAr320 Evaluation Board
endchoice

endif #MACH_SPEAR320
26 changes: 26 additions & 0 deletions arch/arm/mach-spear3xx/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#
# Makefile for SPEAr3XX machine series
#

# common files
obj-y += spear3xx.o clock.o

# spear300 specific files
obj-$(CONFIG_MACH_SPEAR300) += spear300.o

# spear300 boards files
obj-$(CONFIG_BOARD_SPEAR300_EVB) += spear300_evb.o


# spear310 specific files
obj-$(CONFIG_MACH_SPEAR310) += spear310.o

# spear310 boards files
obj-$(CONFIG_BOARD_SPEAR310_EVB) += spear310_evb.o


# spear320 specific files
obj-$(CONFIG_MACH_SPEAR320) += spear320.o

# spear320 boards files
obj-$(CONFIG_BOARD_SPEAR320_EVB) += spear320_evb.o
3 changes: 3 additions & 0 deletions arch/arm/mach-spear3xx/Makefile.boot
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
zreladdr-y := 0x00008000
params_phys-y := 0x00000100
initrd_phys-y := 0x00800000
45 changes: 45 additions & 0 deletions arch/arm/mach-spear3xx/spear300.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* arch/arm/mach-spear3xx/spear300.c
*
* SPEAr300 machine source file
*
* Copyright (C) 2009 ST Microelectronics
* Viresh Kumar<viresh.kumar@st.com>
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/

#include <linux/types.h>
#include <linux/amba/pl061.h>
#include <linux/ptrace.h>
#include <asm/irq.h>
#include <mach/generic.h>
#include <mach/spear.h>

/* Add spear300 specific devices here */
/* arm gpio1 device registeration */
static struct pl061_platform_data gpio1_plat_data = {
.gpio_base = 8,
.irq_base = SPEAR_GPIO1_INT_BASE,
};

struct amba_device gpio1_device = {
.dev = {
.init_name = "gpio1",
.platform_data = &gpio1_plat_data,
},
.res = {
.start = SPEAR300_GPIO_BASE,
.end = SPEAR300_GPIO_BASE + SPEAR300_GPIO_SIZE - 1,
.flags = IORESOURCE_MEM,
},
.irq = {IRQ_GEN_RAS_1, NO_IRQ},
};

void __init spear300_init(void)
{
/* call spear3xx family common init function */
spear3xx_init();
}
55 changes: 55 additions & 0 deletions arch/arm/mach-spear3xx/spear300_evb.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*
* arch/arm/mach-spear3xx/spear300_evb.c
*
* SPEAr300 evaluation board source file
*
* Copyright (C) 2009 ST Microelectronics
* Viresh Kumar<viresh.kumar@st.com>
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/

#include <asm/mach/arch.h>
#include <asm/mach-types.h>
#include <mach/generic.h>
#include <mach/spear.h>

static struct amba_device *amba_devs[] __initdata = {
/* spear3xx specific devices */
&gpio_device,
&uart_device,

/* spear300 specific devices */
&gpio1_device,
};

static struct platform_device *plat_devs[] __initdata = {
/* spear3xx specific devices */

/* spear300 specific devices */
};

static void __init spear300_evb_init(void)
{
unsigned int i;

/* call spear300 machine init function */
spear300_init();

/* Add Platform Devices */
platform_add_devices(plat_devs, ARRAY_SIZE(plat_devs));

/* Add Amba Devices */
for (i = 0; i < ARRAY_SIZE(amba_devs); i++)
amba_device_register(amba_devs[i], &iomem_resource);
}

MACHINE_START(SPEAR300, "ST-SPEAR300-EVB")
.boot_params = 0x00000100,
.map_io = spear3xx_map_io,
.init_irq = spear3xx_init_irq,
.timer = &spear_sys_timer,
.init_machine = spear300_evb_init,
MACHINE_END
25 changes: 25 additions & 0 deletions arch/arm/mach-spear3xx/spear310.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* arch/arm/mach-spear3xx/spear310.c
*
* SPEAr310 machine source file
*
* Copyright (C) 2009 ST Microelectronics
* Viresh Kumar<viresh.kumar@st.com>
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/

#include <linux/ptrace.h>
#include <asm/irq.h>
#include <mach/generic.h>
#include <mach/spear.h>

/* Add spear310 specific devices here */

void __init spear310_init(void)
{
/* call spear3xx family common init function */
spear3xx_init();
}
54 changes: 54 additions & 0 deletions arch/arm/mach-spear3xx/spear310_evb.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/*
* arch/arm/mach-spear3xx/spear310_evb.c
*
* SPEAr310 evaluation board source file
*
* Copyright (C) 2009 ST Microelectronics
* Viresh Kumar<viresh.kumar@st.com>
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/

#include <asm/mach/arch.h>
#include <asm/mach-types.h>
#include <mach/generic.h>
#include <mach/spear.h>

static struct amba_device *amba_devs[] __initdata = {
/* spear3xx specific devices */
&gpio_device,
&uart_device,

/* spear310 specific devices */
};

static struct platform_device *plat_devs[] __initdata = {
/* spear3xx specific devices */

/* spear310 specific devices */
};

static void __init spear310_evb_init(void)
{
unsigned int i;

/* call spear310 machine init function */
spear310_init();

/* Add Platform Devices */
platform_add_devices(plat_devs, ARRAY_SIZE(plat_devs));

/* Add Amba Devices */
for (i = 0; i < ARRAY_SIZE(amba_devs); i++)
amba_device_register(amba_devs[i], &iomem_resource);
}

MACHINE_START(SPEAR310, "ST-SPEAR310-EVB")
.boot_params = 0x00000100,
.map_io = spear3xx_map_io,
.init_irq = spear3xx_init_irq,
.timer = &spear_sys_timer,
.init_machine = spear310_evb_init,
MACHINE_END
25 changes: 25 additions & 0 deletions arch/arm/mach-spear3xx/spear320.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* arch/arm/mach-spear3xx/spear320.c
*
* SPEAr320 machine source file
*
* Copyright (C) 2009 ST Microelectronics
* Viresh Kumar<viresh.kumar@st.com>
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/

#include <linux/ptrace.h>
#include <asm/irq.h>
#include <mach/generic.h>
#include <mach/spear.h>

/* Add spear320 specific devices here */

void __init spear320_init(void)
{
/* call spear3xx family common init function */
spear3xx_init();
}
54 changes: 54 additions & 0 deletions arch/arm/mach-spear3xx/spear320_evb.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/*
* arch/arm/mach-spear3xx/spear320_evb.c
*
* SPEAr320 evaluation board source file
*
* Copyright (C) 2009 ST Microelectronics
* Viresh Kumar<viresh.kumar@st.com>
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/

#include <asm/mach/arch.h>
#include <asm/mach-types.h>
#include <mach/generic.h>
#include <mach/spear.h>

static struct amba_device *amba_devs[] __initdata = {
/* spear3xx specific devices */
&gpio_device,
&uart_device,

/* spear320 specific devices */
};

static struct platform_device *plat_devs[] __initdata = {
/* spear3xx specific devices */

/* spear320 specific devices */
};

static void __init spear320_evb_init(void)
{
unsigned int i;

/* call spear320 machine init function */
spear320_init();

/* Add Platform Devices */
platform_add_devices(plat_devs, ARRAY_SIZE(plat_devs));

/* Add Amba Devices */
for (i = 0; i < ARRAY_SIZE(amba_devs); i++)
amba_device_register(amba_devs[i], &iomem_resource);
}

MACHINE_START(SPEAR320, "ST-SPEAR320-EVB")
.boot_params = 0x00000100,
.map_io = spear3xx_map_io,
.init_irq = spear3xx_init_irq,
.timer = &spear_sys_timer,
.init_machine = spear320_evb_init,
MACHINE_END
Loading

0 comments on commit bc4e814

Please sign in to comment.