Skip to contentSkip to conversation

4/7 Nios: new CPU configuration / support at DK1S10 (Microtronix LDK 2.0)

PATCH New Stephan Linz 1 participant 1 message Feb 2, 2004 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 4/7 Nios: new CPU configuration / support at DK1S10 (Microtronix LDK 2.0)

------------------ THIS IS PATCH 4/7 ------------------

* Patch by Stephan Linz, 30 Jan 2004
- Add support for the Microtronix Linux Development Kit NIOS CPU configuration at the Altera Nios Development Kit, Stratix Edition (DK-1S10)
-------------- next part --------------

board/altera/dk1s10/dk1s10.c +8 -0
diff -purN -x CVS u-boot-20040130cvs-dk1xxx_split_conf/board/altera/dk1s10/dk1s10.c u-boot-20040130cvs-dk1s10_mtx_ldk_20/board/altera/dk1s10/dk1s10.c
@@ -43,6 +43,14 @@ int board_early_init_f (void)
 int checkboard (void)
 {
 	puts ("Board: Altera Nios 1S10 Development Kit\n");
+#if     defined(CONFIG_NIOS_SAFE_32)
+	puts ("Conf.: Altera Safe 32 (safe_32)\n");
+#elif   defined(CONFIG_NIOS_STANDARD_32)
+	puts ("Conf.: Altera Standard 32 (standard_32)\n");
+#elif   defined(CONFIG_NIOS_MTX_LDK_20)
+	puts ("Conf.: Microtronix LDK 2.0 (LDK2)\n");
+#endif
+
 	return 0;
 }
 
board/altera/dk1s10/vectors.S +19 -2
diff -purN -x CVS u-boot-20040130cvs-dk1xxx_split_conf/board/altera/dk1s10/vectors.S u-boot-20040130cvs-dk1s10_mtx_ldk_20/board/altera/dk1s10/vectors.S
@@ -1,6 +1,7 @@
 /*
  * (C) Copyright 2003, Psyent Corporation <www.psyent.com>
  * Scott McNutt <[email protected]>
+ * Stephan Linz <[email protected]>
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -21,6 +22,8 @@
  * MA 02111-1307 USA
  */
 
+#include <config.h>
+
 
 /*************************************************************************
  * Exception Vector Table
@@ -55,8 +58,14 @@
 	.align	4
 _vectors:
 
-	.long	_def_xhandler at h		/* Vector 0  - NMI */
-	.long	_cwp_lolimit at h		/* Vector 1  -  underflow */
+#if	defined(CFG_NIOS_CPU_OCI_BASE)
+	/* OCI does the reset job */
+	.long	_def_xhandler at h		/* Vector 0  - NMI / Reset */
+#else
+	/* there is no OCI, so we have to do a direct reset jump here */
+	.long	CFG_NIOS_CPU_RST_VECT	/* Vector 0  - Reset to GERMS */
+#endif
+	.long	_cwp_lolimit at h		/* Vector 1  - underflow */
 	.long	_cwp_hilimit at h		/* Vector 2  - overflow	*/
 
 	.long	_def_xhandler at h		/* Vector 3 - GNUPro debug */
@@ -72,7 +81,11 @@ _vectors:
 	.long	_def_xhandler at h		/* Vector 13 - future reserved */
 	.long	_def_xhandler at h		/* Vector 14 - future reserved */
 	.long	_def_xhandler at h		/* Vector 15 - future reserved */
+#if	(CFG_NIOS_TMRIRQ == 16)
+	.long	_timebase_int at h		/* Vector 16 - lopri timer*/
+#else
 	.long	_def_xhandler at h		/* Vector 16 */
+#endif
 	.long	_def_xhandler at h		/* Vector 17 */
 	.long	_def_xhandler at h		/* Vector 18 */
 	.long	_def_xhandler at h		/* Vector 19 */
@@ -106,7 +119,11 @@ _vectors:
 	.long	_def_xhandler at h		/* Vector 47 */
 	.long	_def_xhandler at h		/* Vector 48 */
 	.long	_def_xhandler at h		/* Vector 49 */
+#if	(CFG_NIOS_TMRIRQ == 50)
 	.long	_timebase_int at h		/* Vector 50 - lopri timer*/
+#else
+	.long	_def_xhandler at h		/* Vector 50 */
+#endif
 	.long	_def_xhandler at h		/* Vector 51 */
 	.long	_def_xhandler at h		/* Vector 52 */
 	.long	_def_xhandler at h		/* Vector 53 */
doc/README.dk1s10_mldk20 +286 -0

286 lines not on this page · raw message

include/configs/DK1S10.h +61 -11

124 lines not on this page · raw message

include/configs/DK1S10_mtx_ldk_20.h +187 -0

187 lines not on this page · raw message

lib_nios/board.c +2 -0
diff -purN -x CVS u-boot-20040130cvs-dk1xxx_split_conf/lib_nios/board.c u-boot-20040130cvs-dk1s10_mtx_ldk_20/lib_nios/board.c
@@ -132,8 +132,10 @@ void board_init (void)
 	bd->bi_memstart	= CFG_SDRAM_BASE;
 	bd->bi_memsize = CFG_SDRAM_SIZE;
 	bd->bi_flashstart = CFG_FLASH_BASE;
+#if	defined(CFG_SRAM_BASE) && defined(CFG_SRAM_SIZE)
 	bd->bi_sramstart= CFG_SRAM_BASE;
 	bd->bi_sramsize	= CFG_SRAM_SIZE;
+#endif
 	bd->bi_baudrate	= CONFIG_BAUDRATE;
 
 	for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
MAKEALL +1 -1
diff -purN -x CVS u-boot-20040130cvs-dk1xxx_split_conf/MAKEALL u-boot-20040130cvs-dk1s10_mtx_ldk_20/MAKEALL
@@ -176,7 +176,7 @@ LIST_x86="${LIST_I486}"
 
 LIST_nios="	\
 	DK1C20 DK1C20_standard_32					\
-	DK1S10 DK1S10_standard_32					\
+	DK1S10 DK1S10_standard_32 DK1S10_mtx_ldk_20			\
 "
 
 #-----------------------------------------------------------------------
Makefile +5 -0
diff -purN -x CVS u-boot-20040130cvs-dk1xxx_split_conf/Makefile u-boot-20040130cvs-dk1s10_mtx_ldk_20/Makefile
@@ -1058,6 +1058,7 @@ DK1C20_config:	unconfig
 
 DK1S10_safe_32_config		\
 DK1S10_standard_32_config	\
+DK1S10_mtx_ldk_20_config	\
 DK1S10_config:	unconfig
 	@ >include/config.h
 	@[ -z "$(findstring _safe_32,$@)" ] || \
@@ -1068,6 +1069,10 @@ DK1S10_config:	unconfig
 		{ echo "#define CONFIG_NIOS_STANDARD_32 1" >>include/config.h ; \
 		  echo "... NIOS 'standard_32' configuration" ; \
 		}
+	@[ -z "$(findstring _mtx_ldk_20,$@)" ] || \
+		{ echo "#define CONFIG_NIOS_MTX_LDK_20 1" >>include/config.h ; \
+		  echo "... NIOS 'mtx_ldk_20' configuration" ; \
+		}
 	@[ -z "$(findstring DK1S10_config,$@)" ] || \
 		{ echo "#define CONFIG_NIOS_STANDARD_32 1" >>include/config.h ; \
 		  echo "... NIOS 'standard_32' configuration (DEFAULT)" ; \

-------------- next part --------------
* Patch by Stephan Linz, 30 Jan 2004
- Add support for the Microtronix Linux Development Kit NIOS CPU configuration at the Altera Nios Development Kit, Stratix Edition (DK-1S10)