Patches by Yasushi Shoji, 29 Jun 2004:
authorwdenk <wdenk>
Sat, 10 Jul 2004 23:48:41 +0000 (23:48 +0000)
committerwdenk <wdenk>
Sat, 10 Jul 2004 23:48:41 +0000 (23:48 +0000)
- add empty include/asm-microblaze/processor.h
- add to CREDITS and MAINTAINERS
- add gd initialization
- add MicroBlaze and SUZAKU board to MAKEALL script
- add reset support for SUZAKU
- add flush_cache() for MicroBlaze
- add CFG_FLASH_SIZE to include/configs/suzaku.h since we have fixed
  size flash memory on SUZAKU

15 files changed:
CHANGELOG
CREDITS
MAINTAINERS
MAKEALL
README
board/AtmarkTechno/suzaku/suzaku.c
drivers/serial_xuartlite.c
examples/stubs.c
include/asm-microblaze/processor.h [new file with mode: 0644]
include/asm-microblaze/suzaku.h
include/configs/suzaku.h
lib_microblaze/Makefile
lib_microblaze/board.c
lib_microblaze/cache.c [new file with mode: 0644]
microblaze_config.mk

index 86d6369..5a96ea7 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,16 @@
 Changes since U-Boot 1.1.1:
 ======================================================================
 
+* Patches by Yasushi Shoji, 29 Jun 2004:
+  - add empty include/asm-microblaze/processor.h
+  - add to CREDITS and MAINTAINERS
+  - add gd initialization
+  - add MicroBlaze and SUZAKU board to MAKEALL script
+  - add reset support for SUZAKU
+  - add flush_cache() for MicroBlaze
+  - add CFG_FLASH_SIZE to include/configs/suzaku.h since we have fixed
+    size flash memory on SUZAKU
+
 * Patch by Prakash Kumar, 27 Jun 2004:
   Add support for the PXA250 based Intrinsyc Cerf board.
 
diff --git a/CREDITS b/CREDITS
index 6944d39..4d84a88 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -348,6 +348,10 @@ N: Robert Schwebel
 E: r.schwebel@pengutronix.de
 D: Support for csb226, logodl and innokom boards (PXA2xx)
 
+N: Yasushi Shoji
+E: yashi@atmark-techno.com
+D: Support for Xilinx MicroBlaze, for Atmark Techno SUZAKU FPGA board
+
 N: Kurt Stremerch
 E: kurt@exys.be
 D: Support for Exys XSEngine board
index 6ffdead..9e62246 100644 (file)
@@ -425,5 +425,16 @@ Scott McNutt <smcnutt@psyent.com>
        DK1C20                  Nios-32
 
 #########################################################################
+# MicroBlaze Systems:                                                  #
+#                                                                      #
+# Maintainer Name, Email Address                                       #
+#      Board                   CPU                                     #
+#########################################################################
+
+Yasushi Shoji <yashi@atmark-techno.com>
+
+       SUZAKU                  MicroBlaze
+
+#########################################################################
 # End of MAINTAINERS list                                              #
 #########################################################################
diff --git a/MAKEALL b/MAKEALL
index fa8e89e..ac7d23a 100644 (file)
--- a/MAKEALL
+++ b/MAKEALL
@@ -187,6 +187,12 @@ LIST_nios="        \
        DK1S10 DK1S10_standard_32 DK1S10_mtx_ldk_20                     \
 "
 
+#########################################################################
+## MicroBlaze Systems
+#########################################################################
+
+LIST_microblaze="suzaku"
+
 #-----------------------------------------------------------------------
 
 #----- for now, just run PPC by default -----
@@ -211,6 +217,7 @@ do
        case "$arg" in
        ppc|5xx|5xxx|8xx|824x|8260|85xx|4xx|7xx|74xx| \
        arm|SA|ARM7|ARM9|pxa|ixp| \
+       microblaze| \
        mips| \
        nios| \
        x86|I486)
diff --git a/README b/README
index 2c1c06b..338f393 100644 (file)
--- a/README
+++ b/README
@@ -242,7 +242,7 @@ The following options need to be configured:
 
                MicroBlaze based CPUs:
                ----------------------
-               CONFIG_MICROBLZE
+               CONFIG_MICROBLAZE
 
 
 - Board Type:  Define exactly one of
index 3a47aa5..afe124a 100644 (file)
  * MA 02111-1307 USA
  */
 
-#include <common.h>
+/* This is a board specific file.  It's OK to include board specific
+ * header files */
+#include <asm/suzaku.h>
 
 void do_reset(void)
 {
+       *((unsigned long *)(MICROBLAZE_SYSREG_BASE_ADDR)) = MICROBLAZE_SYSREG_RECONFIGURE;
 }
index da2e746..ed59abe 100644 (file)
@@ -24,7 +24,7 @@
 
 #include <config.h>
 
-#ifdef CONFIG_MICROBLZE
+#ifdef CONFIG_MICROBLAZE
 
 #include <asm/serial_xuartlite.h>
 
index 324a953..c3d2a77 100644 (file)
@@ -98,7 +98,7 @@ gd_t *global_data;
 "      move.l  (%%a0), %%a0\n"         \
 "      jmp     (%%a0)\n"                       \
        : : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "a0");
-#elif defined(CONFIG_MICROBLZE)
+#elif defined(CONFIG_MICROBLAZE)
 /*
  * r31 holds the pointer to the global_data. r5 is a call-clobbered.
  */
diff --git a/include/asm-microblaze/processor.h b/include/asm-microblaze/processor.h
new file mode 100644 (file)
index 0000000..78b8976
--- /dev/null
@@ -0,0 +1 @@
+/* FIXME: Implement this! */
index 4d2b270..c57a144 100644 (file)
@@ -22,4 +22,6 @@
  * MA 02111-1307 USA
  */
 
-/* EMPTY FILE */
+/* System Register (GPIO) */
+#define MICROBLAZE_SYSREG_BASE_ADDR 0xFFFFA000
+#define MICROBLAZE_SYSREG_RECONFIGURE (1 << 0)
index 5c5cdf4..e8c4373 100644 (file)
@@ -36,7 +36,7 @@
  * (easy to change)
  */
 
-#define CONFIG_MICROBLZE       1       /* This is an MicroBlaze CPU    */
+#define CONFIG_MICROBLAZE      1       /* This is an MicroBlaze CPU    */
 #define CONFIG_SUZAKU          1       /* on an SUZAKU Board           */
 
 /*-----------------------------------------------------------------------
@@ -47,6 +47,7 @@
 #define CFG_SDRAM_BASE         0x80000000
 #define CFG_SDRAM_SIZE         0x01000000
 #define CFG_FLASH_BASE         0xfff00000
+#define CFG_FLASH_SIZE         0x00400000
 #define CFG_RESET_ADDRESS      0xfff00100
 #define CFG_MONITOR_LEN                (256 << 10)     /* Reserve 256 kB for Monitor */
 #define CFG_MONITOR_BASE        (CFG_SDRAM_BASE + CFG_SDRAM_SIZE - (1024 * 1024))
 #define        CFG_ENV_SIZE            0x10000 /* Total Size of Environment Sector     */
 #define CFG_ENV_SECT_SIZE      0x10000 /* see README - env sector total size   */
 
+/*-----------------------------------------------------------------------
+ * Definitions for initial stack pointer and data area (in DPRAM)
+ */
+
+#define CFG_INIT_RAM_ADDR      0x80000000      /* inside of SDRAM */
+#define CFG_INIT_RAM_END       0x2000          /* End of used area in RAM */
+#define CFG_GBL_DATA_SIZE      128             /* size in bytes reserved for initial data */
+#define CFG_GBL_DATA_OFFSET    (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
+#define CFG_INIT_SP_OFFSET     CFG_GBL_DATA_OFFSET
+
 #endif /* __CONFIG_H */
index b683da8..ec01722 100644 (file)
@@ -27,7 +27,7 @@ LIB   = lib$(ARCH).a
 
 AOBJS  =
 
-COBJS  = board.o microblaze_linux.o time.o
+COBJS  = board.o microblaze_linux.o time.o cache.o
 
 OBJS   = $(AOBJS) $(COBJS)
 
index b720e82..bc987a3 100644 (file)
@@ -72,8 +72,21 @@ init_fnc_t *init_sequence[] = {
 
 void board_init(void)
 {
+       DECLARE_GLOBAL_DATA_PTR;
+
+       bd_t *bd;
        init_fnc_t **init_fnc_ptr;
 
+       /* Pointer is writable since we allocated a register for it. */
+       gd = (gd_t *)CFG_GBL_DATA_OFFSET;
+       memset((void *)gd, 0, CFG_GBL_DATA_SIZE);
+
+       gd->bd = (bd_t *)(gd+1);        /* At end of global data */
+       gd->baudrate = CONFIG_BAUDRATE;
+
+       bd = gd->bd;
+       bd->bi_baudrate = CONFIG_BAUDRATE;
+
        for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
                WATCHDOG_RESET ();
                if ((*init_fnc_ptr) () != 0) {
diff --git a/lib_microblaze/cache.c b/lib_microblaze/cache.c
new file mode 100644 (file)
index 0000000..a2f7493
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * (C) Copyright 2004 Atmark Techno, Inc.
+ *
+ * Yasushi SHOJI <yashi@atmark-techno.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>
+
+void flush_cache (ulong addr, ulong size)
+{
+       /* MicroBlaze have write thruough cache. nothing to do. */
+       return;
+}
index cd7548c..b3ac8e0 100644 (file)
@@ -22,6 +22,8 @@
 # MA 02111-1307 USA
 #
 
+PLATFORM_CPPFLAGS += -ffixed-r31
+
 ifdef CONFIG_MICROBLAZE_HARD_MULT
 PLATFORM_CPPFLAGS += -mno-xl-soft-mul
 endif