Skip to contentSkip to conversation

nds32: add NDS32 support into common header file

PATCH New Macpaul Lin 1 participant 2 messages Nov 19, 2010

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 nds32: add NDS32 support into common header file

Add NDS32 support into common header file.

---
Changes for v2:
- This files has no change.

 include/common.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
include/common.h +4 -0
index 189ad81..d7c452a 100644
@@ -273,6 +273,10 @@ int	setenv	     (char *, char *);
 #ifdef CONFIG_I386		/* x86 version to be fixed! */
 # include <asm/u-boot-i386.h>
 #endif /* CONFIG_I386 */
+#ifdef CONFIG_NDS32
+# include <asm/mach-types.h>
+# include <asm/u-boot-nds32.h>	/* NDS32 version to be fixed! */
+#endif /* CONFIG_NDS32 */
 
 #ifdef CONFIG_AUTO_COMPLETE
 int env_complete(char *var, int maxv, char *cmdv[], int maxsz, char *buf);
Signature · 1 line
1.7.3.2
#1 lore raw

PATCH v2 2/2 nds32/Core_N1213: add N1213 cpu core support for NDS32 arch

Add N1213 cpu core support for NDS32 arch. Included lowlevel_init procedures, and linker scripts.

NDS32 Core N1213 has the following features.

Core:
- 16-/32-bit mixable instruction format
- 32 general-purpose 32-bit registers
- 8-stage pipeline
- Dynamic branch prediction
- 32/64/128/256 BTB
- Return address stack (RAS)
- Vector interrupts for internal/external
- 3 HW-level nested interruptions
- User and super-user mode support
- Memory-mapped I/O
- Address space up to 4GB

Memory Management Unit:
- TLB
- Optional hardware page table walker
- Two groups of page size support

Memory Subsystem:
- I & D cache
- I & D local memory (LM)

Bus Interface:
- Synchronous/Asynchronous AHB bus: 0, 1 or 2 ports

Note:
1. start.S will start up the CPU core at first,
then jump to SoC dependent "lowlevel_init.S" and
"watchdog.S" to configure peripheral devices.

2. Replace old "TEXT_BASE" with new "CONFIG_SYS_TEXT_BASE" into Start.S

---
Changes for v2:
- Add descriptions for other SoC used core N1213 to organize their lowlevel_init.S and start.S.
- Replace old "TEXT_BASE" with new "CONFIG_SYS_TEXT_BASE" against the master tree.
- Fix upper case varible declartions used in asm/cache.h.

 arch/nds32/cpu/n1213/Makefile   |   50 +++++
 arch/nds32/cpu/n1213/start.S    |  449 +++++++++++++++++++++++++++++++++++++++
 arch/nds32/cpu/n1213/u-boot.lds |   68 ++++++
 3 files changed, 567 insertions(+), 0 deletions(-)
 create mode 100644 arch/nds32/cpu/n1213/Makefile
 create mode 100644 arch/nds32/cpu/n1213/start.S
 create mode 100644 arch/nds32/cpu/n1213/u-boot.lds
arch/nds32/cpu/n1213/Makefile new file +50 -0
new file mode 100644
index 0000000..3b81924
@@ -0,0 +1,50 @@
+#
+# (C) Copyright 2000-2006
+# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
+#
+# Copyright (C) 2010 Andes Technology Corporation
+# Shawn Lin, Andes Technology Corporation <[email protected]>
+# Macpaul Lin, Andes Technology Corporation <[email protected]>
+#
+# 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$(CPU).o
+
+START	= start.o
+
+SRCS	:= $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS	:= $(addprefix $(obj),$(COBJS) $(SOBJS))
+START	:= $(addprefix $(obj),$(START))
+
+all:	$(obj).depend $(START) $(LIB)
+
+$(LIB):	$(OBJS)
+	$(AR) $(ARFLAGS) $@ $(OBJS)
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
arch/nds32/cpu/n1213/start.S new file +449 -0

449 lines not on this page · raw message

arch/nds32/cpu/n1213/u-boot.lds new file +68 -0

68 lines not on this page · raw message

Signature · 1 line
1.7.3.2