From: Vipin KUMAR vipin.ku...@st.com
SPEAr1300 is an ARMCortexA9 dual core based SoC which supports
multiple peripherals such as
1. Ethernet Controller
2. USB Device Controller
3. USB Host Controllers
4. MTD interfaces for NAND and NOR(serial and parallel) flash devices
etc
For more information, visit www.st.com/spear
This patch adds the architecture support for spear1300.
Signed-off-by: Vipin Kumar vipin.ku...@st.com
---
arch/arm/cpu/arm_cortexa8/spear13xx/Makefile | 52
arch/arm/cpu/arm_cortexa8/spear13xx/ca9_ltimer.c | 136 +
arch/arm/cpu/arm_cortexa8/spear13xx/cache.S | 114
arch/arm/cpu/arm_cortexa8/spear13xx/cpu.c| 96 +++
arch/arm/cpu/arm_cortexa8/spear13xx/reset.c | 47
arch/arm/include/asm/arch-spear13xx/ca9_ltimer.h | 43 +++
arch/arm/include/asm/arch-spear13xx/hardware.h | 42 +++
arch/arm/include/asm/arch-spear13xx/spr_misc.h | 317 ++
arch/arm/include/asm/arch-spear13xx/sys_proto.h | 34 +++
9 files changed, 881 insertions(+), 0 deletions(-)
create mode 100644 arch/arm/cpu/arm_cortexa8/spear13xx/Makefile
create mode 100644 arch/arm/cpu/arm_cortexa8/spear13xx/ca9_ltimer.c
create mode 100644 arch/arm/cpu/arm_cortexa8/spear13xx/cache.S
create mode 100644 arch/arm/cpu/arm_cortexa8/spear13xx/cpu.c
create mode 100755 arch/arm/cpu/arm_cortexa8/spear13xx/reset.c
create mode 100644 arch/arm/include/asm/arch-spear13xx/ca9_ltimer.h
create mode 100644 arch/arm/include/asm/arch-spear13xx/hardware.h
create mode 100644 arch/arm/include/asm/arch-spear13xx/spr_misc.h
create mode 100644 arch/arm/include/asm/arch-spear13xx/sys_proto.h
diff --git a/arch/arm/cpu/arm_cortexa8/spear13xx/Makefile
b/arch/arm/cpu/arm_cortexa8/spear13xx/Makefile
new file mode 100644
index 000..a1e17d4
--- /dev/null
+++ b/arch/arm/cpu/arm_cortexa8/spear13xx/Makefile
@@ -0,0 +1,52 @@
+#
+# (C) Copyright 2000-2003
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# (C) Copyright 2008
+# Guennadi Liakhovetki, DENX Software Engineering, l...@denx.de
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# 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 $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(SOC).a
+
+COBJS += ca9_ltimer.o
+COBJS += cpu.o
+COBJS += reset.o
+
+SOBJS = cache.o
+
+SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS))
+
+all:$(obj).depend $(LIB)
+
+$(LIB):$(OBJS)
+ $(AR) $(ARFLAGS) $@ $(OBJS)
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/arch/arm/cpu/arm_cortexa8/spear13xx/ca9_ltimer.c
b/arch/arm/cpu/arm_cortexa8/spear13xx/ca9_ltimer.c
new file mode 100644
index 000..4a23390
--- /dev/null
+++ b/arch/arm/cpu/arm_cortexa8/spear13xx/ca9_ltimer.c
@@ -0,0 +1,136 @@
+/*
+ * (C) Copyright 2010
+ * Vipin Kumar, ST Micoelectronics, vipin.ku...@st.com.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * 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 common.h
+#include asm/io.h
+#include asm/arch/hardware.h
+#include asm/arch/ca9_ltimer.h
+
+#define PRESCALER PRESCALER_249
+#define TIMER_TICKS(CONFIG_SPEARCA9_HZ_CLK / (PRESCALER + 1))
+#define TIMER_RES (TIMER_TICKS / CONFIG_SYS_HZ)
+#define READ_TIMER() readl(ca9_timer_p-count)
+
+static struct ca9_timer_regs *const ca9_timer_p =
+(struct ca9_timer_regs