From 857cad37a41c431582a74be56f858ee0476cd0d9 Mon Sep 17 00:00:00 2001 From: wdenk Date: Sat, 10 Jul 2004 23:48:41 +0000 Subject: 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 --- lib_microblaze/Makefile | 2 +- lib_microblaze/board.c | 13 +++++++++++++ lib_microblaze/cache.c | 31 +++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 lib_microblaze/cache.c (limited to 'lib_microblaze') diff --git a/lib_microblaze/Makefile b/lib_microblaze/Makefile index b683da8d38..ec01722f87 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 b720e82039..bc987a3380 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 0000000000..a2f7493b61 --- /dev/null +++ b/lib_microblaze/cache.c @@ -0,0 +1,31 @@ +/* + * (C) Copyright 2004 Atmark Techno, Inc. + * + * Yasushi SHOJI + * + * 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 + +void flush_cache (ulong addr, ulong size) +{ + /* MicroBlaze have write thruough cache. nothing to do. */ + return; +} -- cgit v1.2.3