Skip to contentSkip to conversation

microblaze: Rename ml401 to microblaze-generic

PATCH New monstr at monstr.eu 1 participant 4 messages Jan 5, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/4 microblaze: Rename ml401 to microblaze-generic

From: Michal Simek <[email protected]>

---
 MAINTAINERS                                        |    2 +-
 MAKEALL                                            |    6 +-
 Makefile                                           |    5 +-
 board/xilinx/microblaze-generic/Makefile           |   50 ++++
 board/xilinx/microblaze-generic/config.mk          |   32 +++
 .../xilinx/microblaze-generic/microblaze-generic.c |   69 +++++
 board/xilinx/microblaze-generic/u-boot.lds         |   68 +++++
 board/xilinx/microblaze-generic/xparameters.h      |   69 +++++
 board/xilinx/ml401/Makefile                        |   50 ----
 board/xilinx/ml401/config.mk                       |   32 ---
 board/xilinx/ml401/ml401.c                         |   69 -----
 board/xilinx/ml401/u-boot.lds                      |   68 -----
 board/xilinx/ml401/xparameters.h                   |   69 -----
 include/configs/microblaze-generic.h               |  280 +++++++++++++++++++
 include/configs/ml401.h                            |  281 --------------------
 15 files changed, 574 insertions(+), 576 deletions(-)
 create mode 100644 board/xilinx/microblaze-generic/Makefile
 create mode 100644 board/xilinx/microblaze-generic/config.mk
 create mode 100644 board/xilinx/microblaze-generic/microblaze-generic.c
 create mode 100644 board/xilinx/microblaze-generic/u-boot.lds
 create mode 100644 board/xilinx/microblaze-generic/xparameters.h
 delete mode 100644 board/xilinx/ml401/Makefile
 delete mode 100644 board/xilinx/ml401/config.mk
 delete mode 100644 board/xilinx/ml401/ml401.c
 delete mode 100644 board/xilinx/ml401/u-boot.lds
 delete mode 100644 board/xilinx/ml401/xparameters.h
 create mode 100644 include/configs/microblaze-generic.h
 delete mode 100644 include/configs/ml401.h
MAINTAINERS +1 -1
index 60def0c..dfe54a7 100644
@@ -707,7 +707,7 @@ Yasushi Shoji <[email protected]>
 
 Michal Simek <[email protected]>
 
-	ML401		MicroBlaze
+	microblaze-generic	MicroBlaze
 
 #########################################################################
 # Coldfire Systems:							#
MAKEALL +3 -3
index 5ce3f31..f6271a2 100755
@@ -697,9 +697,9 @@ LIST_nios2="		\
 ## MicroBlaze Systems
 #########################################################################
 
-LIST_microblaze="	\
-	ml401		\
-	suzaku		\
+LIST_microblaze="			\
+	microblaze-generic		\
+	suzaku				\
 "
 
 #########################################################################
Makefile +2 -3
index c532e5b..1432e6d 100644
@@ -3149,10 +3149,9 @@ PCI5441_config : unconfig
 ## Microblaze
 #========================================================================
 
-ml401_config:	unconfig
+microblaze-generic_config:	unconfig
 	@mkdir -p $(obj)include
-	@echo "#define CONFIG_ML401 1" > $(obj)include/config.h
-	@$(MKCONFIG) -a $(@:_config=) microblaze microblaze ml401 xilinx
+	@$(MKCONFIG) -a $(@:_config=) microblaze microblaze microblaze-generic xilinx
 
 suzaku_config:	unconfig
 	@mkdir -p $(obj)include
board/xilinx/microblaze-generic/Makefile new file +50 -0

50 lines not on this page · raw message

board/xilinx/microblaze-generic/config.mk new file +32 -0
new file mode 100644
index 0000000..c75daaf
@@ -0,0 +1,32 @@
+#
+# (C) Copyright 2007 Michal Simek
+#
+# Michal  SIMEK <[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
+#
+# CAUTION: This file is automatically generated by libgen.
+# Version: Xilinx EDK 6.3 EDK_Gmm.12.3
+#
+
+TEXT_BASE = 0x29000000
+
+PLATFORM_CPPFLAGS += -mno-xl-soft-mul
+PLATFORM_CPPFLAGS += -mno-xl-soft-div
+PLATFORM_CPPFLAGS += -mxl-barrel-shift
board/xilinx/microblaze-generic/microblaze-generic.c new file +69 -0

69 lines not on this page · raw message

board/xilinx/microblaze-generic/u-boot.lds new file +68 -0

68 lines not on this page · raw message

board/xilinx/microblaze-generic/xparameters.h new file +69 -0

69 lines not on this page · raw message

board/xilinx/ml401/Makefile deleted +0 -50

50 lines not on this page · raw message

board/xilinx/ml401/config.mk deleted +0 -32
deleted file mode 100644
index c75daaf..0000000
@@ -1,32 +0,0 @@
-#
-# (C) Copyright 2007 Michal Simek
-#
-# Michal  SIMEK <[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
-#
-# CAUTION: This file is automatically generated by libgen.
-# Version: Xilinx EDK 6.3 EDK_Gmm.12.3
-#
-
-TEXT_BASE = 0x29000000
-
-PLATFORM_CPPFLAGS += -mno-xl-soft-mul
-PLATFORM_CPPFLAGS += -mno-xl-soft-div
-PLATFORM_CPPFLAGS += -mxl-barrel-shift
board/xilinx/ml401/ml401.c deleted +0 -69

69 lines not on this page · raw message

board/xilinx/ml401/u-boot.lds deleted +0 -68

68 lines not on this page · raw message

board/xilinx/ml401/xparameters.h deleted +0 -69

69 lines not on this page · raw message

include/configs/microblaze-generic.h new file +280 -0

280 lines not on this page · raw message

include/configs/ml401.h deleted +0 -281

281 lines not on this page · raw message

Signature · 1 line
1.5.5.1
#1 lore raw

PATCH 2/4 microblaze: Change microblaze-generic config file

From: Michal Simek <[email protected]>

---
 board/xilinx/microblaze-generic/xparameters.h |    2 +
 include/configs/microblaze-generic.h          |   99 +++++++++++++------------
 2 files changed, 54 insertions(+), 47 deletions(-)
board/xilinx/microblaze-generic/xparameters.h +2 -0
index d805061..fae03bf 100644
@@ -25,6 +25,8 @@
  * Version: Xilinx EDK 8.2.02 EDK_Im_Sp2.4
  */
 
+#define XILINX_BOARD_NAME	microblaze-generic
+
 /* System Clock Frequency */
 #define XILINX_CLOCK_FREQ	100000000
 
include/configs/microblaze-generic.h +52 -47

167 lines not on this page · raw message

Signature · 1 line
1.5.5.1
#2 lore raw

PATCH 3/4 microblaze: Add bootup messages to board.c

From: Michal Simek <[email protected]>

---
 lib_microblaze/board.c |   31 +++++++++++++++++++++++++++++--
 1 files changed, 29 insertions(+), 2 deletions(-)
lib_microblaze/board.c +29 -2
index 4f48341..7b0bdc2 100644
@@ -112,6 +112,10 @@ void board_init (void)
 #if defined(CONFIG_CMD_FLASH)
 	ulong flash_size = 0;
 #endif
+#if defined(CONFIG_CMD_NET)
+	char *s, *e;
+	int i;
+#endif
 	asm ("nop");	/* FIXME gd is not initialize - wait */
 	memset ((void *)gd, 0, CONFIG_SYS_GBL_DATA_SIZE);
 	gd->bd = (bd_t *) (gd + 1);	/* At end of global data */
@@ -132,11 +136,35 @@ void board_init (void)
 		}
 	}
 
+	puts ("SDRAM :\n");
+	puts ("\tEnabling caches :\n");
+	printf ("\t\tIcache:%s\n", icache_status() ? "OK" : "FAIL");
+	printf ("\t\tDcache:%s\n", dcache_status() ? "OK" : "FAIL");
+	printf ("\tU-Boot Start:0x%08lx\n", TEXT_BASE);
+
 #if defined(CONFIG_CMD_FLASH)
+	puts ("FLASH: ");
 	bd->bi_flashstart = CONFIG_SYS_FLASH_BASE;
 	if (0 < (flash_size = flash_init ())) {
 		bd->bi_flashsize = flash_size;
 		bd->bi_flashoffset = CONFIG_SYS_FLASH_BASE + flash_size;
+# ifdef CONFIG_SYS_FLASH_CHECKSUM
+		print_size (flash_size, "");
+		/*
+		 * Compute and print flash CRC if flashchecksum is set to 'y'
+		 *
+		 * NOTE: Maybe we should add some WATCHDOG_RESET()? XXX
+		 */
+		s = getenv ("flashchecksum");
+		if (s && (*s == 'y')) {
+			printf ("  CRC: %08X",
+				crc32 (0, (const unsigned char *) CONFIG_SYS_FLASH_BASE, flash_size)
+			);
+		}
+		putc ('\n');
+# else	/* !CONFIG_SYS_FLASH_CHECKSUM */
+		print_size (flash_size, "\n");
+# endif /* CONFIG_SYS_FLASH_CHECKSUM */
 	} else {
 		puts ("Flash init FAILED");
 		bd->bi_flashstart = 0;
@@ -146,10 +174,9 @@ void board_init (void)
 #endif
 
 #if defined(CONFIG_CMD_NET)
-	char *s, *e;
-	int i;
 	/* board MAC address */
 	s = getenv ("ethaddr");
+	printf ("MAC:%s\n",s);
 	for (i = 0; i < 6; ++i) {
 		bd->bi_enetaddr[i] = s ? simple_strtoul (s, &e, 16) : 0;
 		if (s)
Signature · 1 line
1.5.5.1
#3 lore raw

PATCH 4/4 microblaze: Add cache flush

From: Michal Simek <[email protected]>

---
 include/configs/microblaze-generic.h |   19 ++++++++++++++++++-
 lib_microblaze/cache.c               |   16 ++++++++++++++--
 2 files changed, 32 insertions(+), 3 deletions(-)
include/configs/microblaze-generic.h +18 -1
index 867f885..4c6cc9f 100644
@@ -194,6 +194,18 @@
 	#define	CONFIG_DOS_PARTITION
 #endif
 
+#if defined(XILINX_USE_ICACHE)
+	#define CONFIG_ICACHE
+#else
+	#undef CONFIG_ICACHE
+#endif
+
+#if defined(XILINX_USE_DCACHE)
+	#define CONFIG_DCACHE
+#else
+	#undef CONFIG_DCACHE
+#endif
+
 /*
  * BOOTP options
  */
@@ -208,11 +220,16 @@
 #include <config_cmd_default.h>
 
 #define CONFIG_CMD_ASKENV
-#define CONFIG_CMD_CACHE
 #define CONFIG_CMD_IRQ
 #define CONFIG_CMD_MFSL
 #define CONFIG_CMD_ECHO
 
+#if defined(CONFIG_DCACHE) || defined(CONFIG_ICACHE)
+	#define CONFIG_CMD_CACHE
+#else
+	#undef CONFIG_CMD_CACHE
+#endif
+
 #ifndef CONFIG_SYS_ENET
 	#undef CONFIG_CMD_NET
 #else
lib_microblaze/cache.c +14 -2
index a2f7493..4b2e8e3 100644
@@ -26,6 +26,18 @@
 
 void flush_cache (ulong addr, ulong size)
 {
-	/* MicroBlaze have write thruough cache. nothing to do. */
-	return;
+	int i;
+	for (i = 0; i < size; i += 4)
+		asm volatile (
+#ifdef CONFIG_ICACHE
+				"wic	%0, r0;"
+#endif
+				"nop;"
+#ifdef CONFIG_DCACHE
+				"wdc	%0, r0;"
+#endif
+				"nop;"
+				:
+				: "r" (addr + i)
+				: "memory");
 }
Signature · 1 line
1.5.5.1