summaryrefslogtreecommitdiff
path: root/cleopatre/linux-2.6.25.10-spc300/arch
diff options
context:
space:
mode:
authorYacine Belkadi2013-02-13 16:06:32 +0100
committerYacine Belkadi2013-03-06 15:36:27 +0100
commit9e1eafa26f147112ef7d939f69e6387662772ae7 (patch)
treef1534d112c7388e108f259d3fb696bc58124a963 /cleopatre/linux-2.6.25.10-spc300/arch
parentc9f8bd64133cf350063dff8b5a4909ce0860f2f1 (diff)
cleo/buildroot/target/Spidcom: add scr300, refs #3648
The scr300 board was present in EoC but not in AV. Add it to AV.
Diffstat (limited to 'cleopatre/linux-2.6.25.10-spc300/arch')
-rw-r--r--cleopatre/linux-2.6.25.10-spc300/arch/arm/mach-spc300/Kconfig7
-rw-r--r--cleopatre/linux-2.6.25.10-spc300/arch/arm/mach-spc300/Makefile1
-rw-r--r--cleopatre/linux-2.6.25.10-spc300/arch/arm/mach-spc300/board-scr300.c102
3 files changed, 110 insertions, 0 deletions
diff --git a/cleopatre/linux-2.6.25.10-spc300/arch/arm/mach-spc300/Kconfig b/cleopatre/linux-2.6.25.10-spc300/arch/arm/mach-spc300/Kconfig
index 6aef7ba930..4e51616675 100644
--- a/cleopatre/linux-2.6.25.10-spc300/arch/arm/mach-spc300/Kconfig
+++ b/cleopatre/linux-2.6.25.10-spc300/arch/arm/mach-spc300/Kconfig
@@ -46,6 +46,13 @@ config MACH_MSE500DINI_300
help
Include support for SPiDCOM spc300 Prototype board platform (DINI).
+config MACH_SCR300
+ bool "Support SCR300 platform"
+ select CHIP_SPC300
+ select HAVE_SPC300_GPIO_USABLE_ALL
+ help
+ Include support for SPiDCOM scr300 reference design board platform.
+
config MACH_SCR310
bool "Support SCR310 platform"
select CHIP_SPC300
diff --git a/cleopatre/linux-2.6.25.10-spc300/arch/arm/mach-spc300/Makefile b/cleopatre/linux-2.6.25.10-spc300/arch/arm/mach-spc300/Makefile
index 34eb705c00..93061f1e6d 100644
--- a/cleopatre/linux-2.6.25.10-spc300/arch/arm/mach-spc300/Makefile
+++ b/cleopatre/linux-2.6.25.10-spc300/arch/arm/mach-spc300/Makefile
@@ -17,6 +17,7 @@ obj-$(CONFIG_MACH_MCR500) += board-mse500.o
obj-$(CONFIG_MACH_MPR520) += board-mse500.o
obj-$(CONFIG_MACH_MSE500) += board-mse500.o
obj-$(CONFIG_MACH_MSE500DINI_300) += board-mse500dini_300.o
+obj-$(CONFIG_MACH_SCR300) += board-scr300.o
obj-$(CONFIG_MACH_SCR310) += board-scr310.o
obj-$(CONFIG_MACH_SPK300) += board-spk300.o
obj-$(CONFIG_MACH_SPK300G) += board-spk300g.o
diff --git a/cleopatre/linux-2.6.25.10-spc300/arch/arm/mach-spc300/board-scr300.c b/cleopatre/linux-2.6.25.10-spc300/arch/arm/mach-spc300/board-scr300.c
new file mode 100644
index 0000000000..3415c941b5
--- /dev/null
+++ b/cleopatre/linux-2.6.25.10-spc300/arch/arm/mach-spc300/board-scr300.c
@@ -0,0 +1,102 @@
+/*
+ * arch/arm/mach-spc300/board-scr300.c
+ *
+ * (C) Copyright 2009-2011 SPiDCOM Technologies
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+#include <linux/init.h>
+#include <linux/device.h>
+#include <asm/mach-types.h>
+#include <linux/mtd/partitions.h>
+#include <linux/spi/spi.h>
+
+#include "spc300.h"
+#include "spc300-devices.h"
+
+/**
+ * FLASH Device Structures
+ */
+struct spc300_flash_spi_dev flash_chip __initdata = {
+ .name = "m25p64",
+ .cs = 0,
+ .speed = 20000000,
+ .spimode = SPI_MODE_0,
+};
+struct spc300_afe_spi_dev afe_chip __initdata = {
+ .name = "ad986x",
+ .cs = 1,
+ .speed = 6250000, //PCLK/16
+ .spimode = SPI_3WIRE|SPI_MODE_0,
+};
+
+/**
+ * Initialize SCR300 GIC.
+ */
+static void scr300_init_irq(void)
+{
+ spc300_init_irq();
+}
+
+/**
+ * New mapping for IOs after MMU starting.
+ */
+static void __init scr300_map_io(void)
+{
+ spc300_map_io();
+}
+
+/**
+ * Second SCR300 initialisation,
+ * just before memory_init.
+ *
+ * \param desc machine descriptor.
+ * \param tags tag.
+ * \param cmdline command line.
+ * \param mi memory informations.
+ */
+static void __init scr300_fixup(struct machine_desc *desc, struct tag *tags, char **cmdline, struct meminfo *mi)
+{
+ spc300_fixup(desc, tags, cmdline, mi);
+}
+
+/**
+ * Initialize SCR300.
+ */
+static void __init scr300_init(void)
+{
+ spc300_init();
+ spc300_add_device_uart0();
+ spc300_add_device_uart1();
+ spc300_add_device_spidevs(&flash_chip, &afe_chip);
+ spc300_add_device_spictrl();
+ spc300_add_device_ethernet();
+ spc300_add_device_gpio();
+ spc300_add_device_wdt();
+}
+
+MACHINE_START(SPC300, "SCR300 - ARM SPC300 based board")
+ /* Maintainer: SPiDCOM Technologies */
+ .phys_io = ARM_APB_BASE,
+ .io_pg_offst = ((IO_ADDRESS(ARM_APB_BASE)) >> 18) & 0xfffc,
+ .boot_params = SDRAM_BASE + 0x100,
+ .fixup = scr300_fixup,
+ .map_io = scr300_map_io,
+ .timer = &spc300_timer,
+ .init_irq = scr300_init_irq,
+ .init_machine = scr300_init,
+MACHINE_END
+