diff --git a/CHANGELOG b/CHANGELOG index 86d63691753fbb27227afe71914b6670eab72bb6..5a96ea7fd5b45b4599d6233c0e5fa39c78af3cf3 100644 --- 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 6944d392bc655ed6ff9a02b7de00c788ea5d0a5b..4d84a883b5179b3ff0baa342f34d3bfaa5cf21a2 100644 --- 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 diff --git a/MAINTAINERS b/MAINTAINERS index 6ffdead228d73a9dd47ed95bb10270d508f10e0a..9e622460347181dfa959be4463a3639e9bb703b1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -424,6 +424,17 @@ 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 fa8e89e70851d209b92f6577d9f1abcd4e779738..ac7d23a060543c15951b0b49452f1648c3bf2e7b 100644 --- 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 2c1c06be2eb0b2fb4d591cfe609f3562dd3707d1..338f39397d35e29deb325302176b6cf596a23790 100644 --- 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 diff --git a/board/AtmarkTechno/suzaku/suzaku.c b/board/AtmarkTechno/suzaku/suzaku.c index 3a47aa5a1108ed20d3d179805f34f7a707a5c23f..afe124a9d3cb089fe28bd3adcd7802c8de16946a 100644 --- a/board/AtmarkTechno/suzaku/suzaku.c +++ b/board/AtmarkTechno/suzaku/suzaku.c @@ -22,8 +22,11 @@ * 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; } diff --git a/drivers/serial_xuartlite.c b/drivers/serial_xuartlite.c index da2e7460872a64b25d10e5307e7fbdc5dd701ecb..ed59abea862ae4b7bb43fff097defea589369326 100644 --- a/drivers/serial_xuartlite.c +++ b/drivers/serial_xuartlite.c @@ -24,7 +24,7 @@ #include <config.h> -#ifdef CONFIG_MICROBLZE +#ifdef CONFIG_MICROBLAZE #include <asm/serial_xuartlite.h> diff --git a/examples/stubs.c b/examples/stubs.c index 324a953e1868a66909b4c34251f2291b337e834f..c3d2a77a8289da46a00ef020abe15ce899c81ba2 100644 --- a/examples/stubs.c +++ b/examples/stubs.c @@ -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 index 0000000000000000000000000000000000000000..78b8976ca3d94f65825bf9196e195161e03ba267 --- /dev/null +++ b/include/asm-microblaze/processor.h @@ -0,0 +1 @@ +/* FIXME: Implement this! */ diff --git a/include/asm-microblaze/suzaku.h b/include/asm-microblaze/suzaku.h index 4d2b270b231225e8932220ff2192a3ddea98f3ec..c57a144d3afe7dcb0782d3811bd3afabf97c62a5 100644 --- a/include/asm-microblaze/suzaku.h +++ b/include/asm-microblaze/suzaku.h @@ -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) diff --git a/include/configs/suzaku.h b/include/configs/suzaku.h index 5c5cdf48a63cab66164f91b441e1dba39e6a8727..e8c437364fcf765a17e618b94e1e4d3c74e32ba8 100644 --- a/include/configs/suzaku.h +++ b/include/configs/suzaku.h @@ -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)) @@ -87,4 +88,14 @@ #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 */ diff --git a/lib_microblaze/Makefile b/lib_microblaze/Makefile index b683da8d38d105469ffa8b0a38a15b16d3cc8902..ec01722f8715a0b131c1820299b1328b67d5c233 100644 --- a/lib_microblaze/Makefile +++ b/lib_microblaze/Makefile @@ -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) diff --git a/lib_microblaze/board.c b/lib_microblaze/board.c index b720e82039ab1e633d8c21bce974f3e855929e85..bc987a338088546c17685a231c9398f2965dbfd4 100644 --- a/lib_microblaze/board.c +++ b/lib_microblaze/board.c @@ -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 index 0000000000000000000000000000000000000000..a2f7493b61ee7e42af154f443261fa173bf0980b --- /dev/null +++ b/lib_microblaze/cache.c @@ -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; +} diff --git a/microblaze_config.mk b/microblaze_config.mk index cd7548c63fb4e99009672342da5f0c81b710a87f..b3ac8e08cfc0b73dcd03584907cbd2ec88ac12b3 100644 --- a/microblaze_config.mk +++ b/microblaze_config.mk @@ -22,6 +22,8 @@ # MA 02111-1307 USA # +PLATFORM_CPPFLAGS += -ffixed-r31 + ifdef CONFIG_MICROBLAZE_HARD_MULT PLATFORM_CPPFLAGS += -mno-xl-soft-mul endif